@univerjs-pro/thread-comment-datasource 0.12.2-experimental.20251129-0fa20cd → 0.12.2-experimental.20251201-5b27b55

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 _0x1e7cb5=_0x5f4e;(function(_0x2061f0,_0x3bcba8){const _0x29fe78=_0x5f4e,_0x4db2b2=_0x2061f0();while(!![]){try{const _0xa47e75=-parseInt(_0x29fe78(0x188))/0x1*(-parseInt(_0x29fe78(0x139))/0x2)+-parseInt(_0x29fe78(0x16d))/0x3+-parseInt(_0x29fe78(0x12d))/0x4+parseInt(_0x29fe78(0x177))/0x5+-parseInt(_0x29fe78(0x182))/0x6+-parseInt(_0x29fe78(0x13a))/0x7+-parseInt(_0x29fe78(0x192))/0x8*(-parseInt(_0x29fe78(0x165))/0x9);if(_0xa47e75===_0x3bcba8)break;else _0x4db2b2['push'](_0x4db2b2['shift']());}catch(_0x44203e){_0x4db2b2['push'](_0x4db2b2['shift']());}}}(_0x3046,0x89aa2));Object['defineProperty'](exports,Symbol[_0x1e7cb5(0x15b)],{'value':_0x1e7cb5(0x184)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x1e7cb5(0x141);var I=(_0x2800ef=>(_0x2800ef[_0x2800ef['OpenOrReOpen']=0x0]=_0x1e7cb5(0x15c),_0x2800ef[_0x2800ef[_0x1e7cb5(0x1a3)]=0x1]=_0x1e7cb5(0x1a3),_0x2800ef[_0x2800ef[_0x1e7cb5(0x178)]=-0x1]=_0x1e7cb5(0x178),_0x2800ef))(I||{}),v=(_0x3448dc=>(_0x3448dc[_0x3448dc['Unknown']=0x0]=_0x1e7cb5(0x131),_0x3448dc[_0x3448dc[_0x1e7cb5(0x14d)]=0x1]=_0x1e7cb5(0x14d),_0x3448dc[_0x3448dc[_0x1e7cb5(0x17a)]=0x2]=_0x1e7cb5(0x17a),_0x3448dc[_0x3448dc[_0x1e7cb5(0x19d)]=0x3]='Edit',_0x3448dc[_0x3448dc[_0x1e7cb5(0x197)]=0x4]=_0x1e7cb5(0x197),_0x3448dc[_0x3448dc[_0x1e7cb5(0x132)]=0x5]='Solve',_0x3448dc[_0x3448dc[_0x1e7cb5(0x178)]=-0x1]=_0x1e7cb5(0x178),_0x3448dc))(v||{});const f=_0x2a64ab=>c[_0x1e7cb5(0x19e)](new Date(+_0x2a64ab))[_0x1e7cb5(0x172)](_0x1e7cb5(0x189)),R=async(_0x359d27,_0x2b078f)=>{const _0x4238c9=_0x1e7cb5,_0xe7c026=_0x359d27[_0x4238c9(0x15f)](c[_0x4238c9(0x175)]),_0x4ed49e=_0x359d27[_0x4238c9(0x15f)](P[_0x4238c9(0x128)]);_0x2b078f['forEach'](_0x10bc60=>{const _0x37ee00=_0x4238c9;_0xe7c026[_0x37ee00(0x195)](_0x10bc60)&&_0x2b078f[_0x37ee00(0x162)](_0x10bc60);}),_0x2b078f[_0x4238c9(0x137)]&&(await _0x4ed49e[_0x4238c9(0x15f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2b078f]}}))[_0x4238c9(0x12b)][_0x4238c9(0x129)][_0x4238c9(0x159)](_0x18fffa=>{const _0x2c133f=_0x4238c9;_0x18fffa&&_0xe7c026[_0x2c133f(0x134)](_0x18fffa);});};var $=Object[_0x1e7cb5(0x174)],E=(_0x2bcbb3,_0x3b59b5,_0x361126,_0x3b466e)=>{const _0x4b67ed=_0x1e7cb5;for(var _0x1789bd=_0x3b466e>0x1?void 0x0:_0x3b466e?$(_0x3b59b5,_0x361126):_0x3b59b5,_0x2d686a=_0x2bcbb3[_0x4b67ed(0x160)]-0x1,_0x583293;_0x2d686a>=0x0;_0x2d686a--)(_0x583293=_0x2bcbb3[_0x2d686a])&&(_0x1789bd=_0x583293(_0x1789bd)||_0x1789bd);return _0x1789bd;},S=(_0x496b4f,_0x4cf4b9)=>(_0x4d679e,_0xb0d8f4)=>_0x4cf4b9(_0x4d679e,_0xb0d8f4,_0x496b4f);let _=class extends c['Disposable']{constructor(_0x51b070,_0x13dcc0,_0x41ab4b,_0x39b046){const _0x38652c=_0x1e7cb5;super(),this[_0x38652c(0x14e)]=_0x51b070,this[_0x38652c(0x18d)]=_0x13dcc0,this[_0x38652c(0x19b)]=_0x41ab4b,this['_injector']=_0x39b046,this['_init'](),this[_0x38652c(0x187)]();}[_0x1e7cb5(0x187)](){const _0x3005c9=_0x1e7cb5;this['disposeWithMe'](this[_0x3005c9(0x18d)][_0x3005c9(0x18c)]['pipe'](j[_0x3005c9(0x12c)](0x10))[_0x3005c9(0x161)](_0x4829c5=>{const _0x1e62fc=_0x3005c9,_0x2f0055=new Set();_0x4829c5['forEach'](_0xd2a82f=>{const _0x4e75e2=_0x5f4e;switch(_0xd2a82f[_0x4e75e2(0x18b)]){case'add':{const _0x18844c=_0xd2a82f[_0x4e75e2(0x171)][_0x4e75e2(0x167)];_0x2f0055[_0x4e75e2(0x19c)](_0x18844c);break;}}}),R(this[_0x1e62fc(0x133)],_0x2f0055);}));}[_0x1e7cb5(0x140)](){const _0x51aee0=_0x1e7cb5;this['disposeWithMe'](this[_0x51aee0(0x14e)]['commentUpdate$'][_0x51aee0(0x161)](async _0x2347a7=>{const _0x5811db=_0x51aee0;var _0x151c29,_0x51b07f,_0xec2dba,_0x23f185;const _0x1ef38e=(_0x151c29=this[_0x5811db(0x18d)][_0x5811db(0x16b)](_0x2347a7[_0x5811db(0x150)])[_0x5811db(0x148)](_0x17b92f=>_0x17b92f[_0x5811db(0x14c)]===_0x2347a7[_0x5811db(0x14c)]))==null?void 0x0:_0x151c29[_0x5811db(0x198)];if(!_0x1ef38e)return;const {unitId:_0x58f0dd,subUnitId:_0x1e7358}=_0x1ef38e;switch(_0x2347a7[_0x5811db(0x16f)]&&this[_0x5811db(0x19b)][_0x5811db(0x134)](_0x2347a7['user']),_0x2347a7[_0x5811db(0x18b)]){case v['Add']:break;case v['Reply']:{this[_0x5811db(0x18d)]['addComment'](_0x58f0dd,_0x1e7358,{'unitId':_0x58f0dd,'subUnitId':_0x1e7358,'ref':'','id':_0x2347a7['replyId'],'dT':f(+_0x2347a7['createTimestamp']),'threadId':_0x2347a7[_0x5811db(0x14c)],'personId':(_0xec2dba=(_0x51b07f=_0x2347a7['user'])==null?void 0x0:_0x51b07f[_0x5811db(0x15a)])!=null?_0xec2dba:_0x2347a7[_0x5811db(0x13e)],'text':JSON[_0x5811db(0x152)](_0x2347a7[_0x5811db(0x157)]),'parentId':_0x1ef38e['id']});break;}case v[_0x5811db(0x197)]:{const _0x227cea=this['_threadCommentModel'][_0x5811db(0x17c)](_0x58f0dd,_0x1e7358,_0x2347a7['replyId']);_0x227cea&&_0x227cea[_0x5811db(0x13c)]&&this[_0x5811db(0x18d)][_0x5811db(0x153)](_0x58f0dd,_0x1e7358,_0x2347a7[_0x5811db(0x17b)]);break;}case v[_0x5811db(0x19d)]:{this['_threadCommentModel']['updateComment'](_0x58f0dd,_0x1e7358,{'commentId':_0x2347a7[_0x5811db(0x17b)],'text':JSON[_0x5811db(0x152)](_0x2347a7[_0x5811db(0x157)])});break;}case v[_0x5811db(0x132)]:{const _0x47fb3c=(_0x23f185=this[_0x5811db(0x18d)]['getUnit'](_0x2347a7[_0x5811db(0x150)])[_0x5811db(0x148)](_0x2cf2dd=>_0x2cf2dd[_0x5811db(0x14c)]===_0x2347a7[_0x5811db(0x14c)]))==null?void 0x0:_0x23f185[_0x5811db(0x198)];_0x47fb3c&&this[_0x5811db(0x18d)][_0x5811db(0x168)](_0x58f0dd,_0x1e7358,_0x47fb3c['id'],_0x2347a7[_0x5811db(0x191)]===I[_0x5811db(0x1a3)]);break;}}}));}};_=E([S(0x0,c[_0x1e7cb5(0x196)](b[_0x1e7cb5(0x183)])),S(0x1,c['Inject'](M[_0x1e7cb5(0x142)])),S(0x2,c[_0x1e7cb5(0x196)](c['UserManagerService'])),S(0x3,c[_0x1e7cb5(0x196)](c[_0x1e7cb5(0x145)]))],_);const q=_0x1e7cb5(0x17e),D={};var A=Object[_0x1e7cb5(0x174)],x=(_0x1f28b6,_0x43ca8c,_0x21378a,_0x4a5ec9)=>{for(var _0x53cc0d=_0x4a5ec9>0x1?void 0x0:_0x4a5ec9?A(_0x43ca8c,_0x21378a):_0x43ca8c,_0x2d31fc=_0x1f28b6['length']-0x1,_0x496d5c;_0x2d31fc>=0x0;_0x2d31fc--)(_0x496d5c=_0x1f28b6[_0x2d31fc])&&(_0x53cc0d=_0x496d5c(_0x53cc0d)||_0x53cc0d);return _0x53cc0d;},C=(_0x3e91e1,_0x408eea)=>(_0x579df3,_0x3f8156)=>_0x408eea(_0x579df3,_0x3f8156,_0x3e91e1);function Y(_0x298722,_0x4c6eaf){const _0x399dce=_0x1e7cb5,_0x1580a0=_0x298722['replies'][0x0];return{..._0x4c6eaf,'id':_0x1580a0[_0x399dce(0x17b)],'resolved':_0x298722[_0x399dce(0x191)]===0x1,'dT':f(_0x1580a0['createTimestamp']),'personId':_0x1580a0[_0x399dce(0x13e)],'threadId':_0x1580a0['threadId']};}function G(_0x6dd30,_0x2684c7,_0x256ad6){const _0x3117df=_0x1e7cb5;var _0x55875f,_0xf992e7;if(((_0xf992e7=(_0x55875f=_0x6dd30==null?void 0x0:_0x6dd30[_0x3117df(0x146)])==null?void 0x0:_0x55875f[_0x3117df(0x160)])!=null?_0xf992e7:0x0)>0x0){const _0x225be5=(_0x44b1ed,_0x99de86)=>({'id':_0x44b1ed[_0x3117df(0x17b)],'threadId':_0x44b1ed['threadId'],'dT':f(_0x44b1ed[_0x3117df(0x17d)]),'personId':_0x44b1ed['userId'],'resolved':_0x6dd30['solved']===I[_0x3117df(0x1a3)],'unitId':_0x2684c7,'subUnitId':_0x256ad6,'text':JSON[_0x3117df(0x152)](_0x44b1ed[_0x3117df(0x157)]),'parentId':_0x99de86}),_0x3eb7cb=_0x225be5(_0x6dd30[_0x3117df(0x146)][0x0]);return{..._0x3eb7cb,'children':_0x6dd30[_0x3117df(0x146)][_0x3117df(0x185)](0x1)['map'](_0x53a68f=>_0x225be5(_0x53a68f,_0x3eb7cb['id']))};}return null;}let p=class{constructor(_0x55028b,_0x403b9d,_0x2e63a1){const _0x4727b2=_0x1e7cb5;this[_0x4727b2(0x13b)]=_0x55028b,this[_0x4727b2(0x19b)]=_0x403b9d,this[_0x4727b2(0x17f)]=_0x2e63a1;}async[_0x1e7cb5(0x14b)](_0x4b568a){const _0x491c80=_0x1e7cb5;var _0x15fec4,_0x4007b0;const {parentId:_0xfea93c,unitId:_0x2e8adc,text:_0x1bad22,threadId:_0xda7c73}=_0x4b568a,_0x29f89b=(_0x4007b0=(_0x15fec4=_0x1bad22[_0x491c80(0x180)])==null?void 0x0:_0x15fec4[_0x491c80(0x16a)](_0x40efd5=>_0x40efd5[_0x491c80(0x190)]===c[_0x491c80(0x14a)][_0x491c80(0x138)])[_0x491c80(0x18f)](_0x4d5b3b=>_0x4d5b3b[_0x491c80(0x156)]))!=null?_0x4007b0:[],_0x4d9f1d=JSON[_0x491c80(0x1a1)](_0x1bad22),_0x3eda97=(await this['_sessionService'][_0x491c80(0x164)](_0x2e8adc))[_0x491c80(0x14f)]();if(_0xfea93c){const _0x394315={'memberId':_0x3eda97,'unitId':_0x2e8adc,'content':_0x4d9f1d,'mention':_0x29f89b,'threadId':_0xda7c73},_0x5387ab=(await this[_0x491c80(0x13b)][_0x491c80(0x12e)](_0x491c80(0x19f)+_0x2e8adc+'/reply',{'body':_0x394315}))[_0x491c80(0x12b)][_0x491c80(0x15d)];return{..._0x4b568a,'id':_0x5387ab[_0x491c80(0x17b)],'dT':c[_0x491c80(0x19e)](+_0x5387ab[_0x491c80(0x17d)])[_0x491c80(0x172)](_0x491c80(0x189)),'personId':_0x5387ab['userId']};}else{const _0xdb8ce={'memberId':_0x3eda97,'unitId':_0x2e8adc,'content':_0x4d9f1d,'mention':_0x29f89b},_0x281353=await this[_0x491c80(0x13b)][_0x491c80(0x12e)]('/universer-api/comment/unit/'+_0x2e8adc+_0x491c80(0x12a),{'body':_0xdb8ce});return Y(_0x281353[_0x491c80(0x12b)][_0x491c80(0x158)],_0x4b568a);}}async[_0x1e7cb5(0x179)](_0x2b4a8e){const _0x41f6c6=_0x1e7cb5;var _0x1b7832,_0x15c3a4;const {text:_0xbb7631,unitId:_0x666f2d}=_0x2b4a8e,_0xadc1b2=(_0x15c3a4=(_0x1b7832=_0xbb7631[_0x41f6c6(0x180)])==null?void 0x0:_0x1b7832[_0x41f6c6(0x16a)](_0x1c432b=>_0x1c432b[_0x41f6c6(0x190)]===c[_0x41f6c6(0x14a)][_0x41f6c6(0x138)])[_0x41f6c6(0x18f)](_0x3e8c26=>_0x3e8c26[_0x41f6c6(0x156)]))!=null?_0x15c3a4:[],_0x4bf0d7=JSON[_0x41f6c6(0x1a1)](_0xbb7631),_0x5292ec=_0x2b4a8e[_0x41f6c6(0x14c)],_0x367973=_0x2b4a8e['id'],_0x185989={'memberId':(await this[_0x41f6c6(0x17f)]['requireSession'](_0x666f2d))[_0x41f6c6(0x14f)](),'unitId':_0x666f2d,'threadId':_0x5292ec,'mention':_0xadc1b2,'content':_0x4bf0d7,'replyId':_0x367973},_0x394ace=await this['_httpService'][_0x41f6c6(0x12e)](_0x41f6c6(0x19f)+_0x666f2d+'/edit',{'body':_0x185989});return!_0x394ace['body'][_0x41f6c6(0x199)]||_0x394ace['body']['error'][_0x41f6c6(0x143)]===0x1;}async[_0x1e7cb5(0x168)](_0x3ff9ea){const _0x2d4473=_0x1e7cb5,{unitId:_0x582c24}=_0x3ff9ea,_0x2729d1=_0x3ff9ea[_0x2d4473(0x14c)],_0xfc912e={'memberId':this['_userService'][_0x2d4473(0x13f)]()['userID'],'unitId':_0x582c24,'threadId':_0x2729d1,'solved':_0x3ff9ea[_0x2d4473(0x151)]?I[_0x2d4473(0x1a3)]:I['OpenOrReOpen']},_0x3ebc33=await this[_0x2d4473(0x13b)]['post']('/universer-api/comment/unit/'+_0x582c24+_0x2d4473(0x163),{'body':_0xfc912e});return!_0x3ebc33[_0x2d4473(0x12b)][_0x2d4473(0x199)]||_0x3ebc33['body']['error'][_0x2d4473(0x143)]===0x1;}async[_0x1e7cb5(0x153)](_0x1ca752,_0x386b12,_0x17bff5,_0x43ac6c){const _0x3e55e2=_0x1e7cb5,_0x59704f={'memberId':(await this['_sessionService'][_0x3e55e2(0x164)](_0x1ca752))[_0x3e55e2(0x14f)](),'threadId':_0x17bff5,'replyId':_0x43ac6c,'unitId':_0x1ca752},_0x936c02=await this['_httpService']['post'](_0x3e55e2(0x19f)+_0x1ca752+_0x3e55e2(0x154),{'body':_0x59704f});return!_0x936c02[_0x3e55e2(0x12b)][_0x3e55e2(0x199)]||_0x936c02[_0x3e55e2(0x12b)]['error'][_0x3e55e2(0x143)]===0x1;}async['listComments'](_0x94b353,_0x1f25cc,_0x4fa7f9){const _0x4a377f=_0x1e7cb5,_0x5eba11={'unitId':_0x94b353,'threadId':_0x4fa7f9},_0x2b708d=await this[_0x4a377f(0x13b)][_0x4a377f(0x12e)](_0x4a377f(0x19f)+_0x94b353+_0x4a377f(0x19a),{'body':_0x5eba11}),_0xf73ba7=_0x4fa7f9[_0x4a377f(0x18f)](_0xd023d8=>G(_0x2b708d[_0x4a377f(0x12b)][_0x4a377f(0x18a)][_0xd023d8],_0x94b353,_0x1f25cc))['filter'](Boolean);return Object[_0x4a377f(0x170)](_0x2b708d[_0x4a377f(0x12b)][_0x4a377f(0x129)])[_0x4a377f(0x159)](_0x56a594=>{const _0x599b12=_0x4a377f;this[_0x599b12(0x19b)][_0x599b12(0x134)](_0x56a594);}),_0xf73ba7;}[_0x1e7cb5(0x176)](_0x1af70c){const _0x56eac3=_0x1e7cb5;return{'id':_0x1af70c['id'],'threadId':_0x1af70c[_0x56eac3(0x14c)],'ref':_0x1af70c[_0x56eac3(0x1a6)]};}};p=x([C(0x0,c['Inject'](P['HTTPService'])),C(0x1,c[_0x1e7cb5(0x196)](c[_0x1e7cb5(0x175)])),C(0x2,c[_0x1e7cb5(0x196)](b[_0x1e7cb5(0x16e)]))],p);function _0x3046(){const _0x3ba01a=['Reply','replyId','getComment','createTimestamp','thread-comment-data-source.config','_sessionService','customRanges','_threadCommentDataSourceService','3367518tVwtpO','CommentService','Module','slice','symbol','_initUserSync','509nwvnhF','YYYY/MM/DD\x20HH:mm','comments','type','commentUpdate$','_threadCommentModel','pluginName','map','rangeType','solved','91912CEwTZg','UniverThreadCommentDataSourcePlugin','_initDataSource','getUser','Inject','Delete','root','error','/list','_userService','add','Edit','dayjs','/universer-api/comment/unit/','defineProperty','stringify','UniverThreadCommentUIPlugin','Solved','UniverCollaborationClientPlugin','_threadCommentDataSource','ref','HTTPService','users','/add','body','bufferTime','335812YeOHnO','post','Plugin','onReady','Unknown','Solve','_injector','addUser','_configService','syncUpdateMutationToColla','size','COMMENT','274xmtKkf','7305116genhgs','_httpService','parentId','_config','userId','getCurrentUser','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','ThreadCommentModel','code','IThreadCommentDataSourceService','Injector','replies','DependentOn','find','Disposable','CustomRangeType','addComment','threadId','Add','_commentService','getMemberID','unitId','resolved','parse','deleteComment','/delete','merge','rangeId','content','comment','forEach','userID','toStringTag','OpenOrReOpen','reply','IConfigService','get','length','subscribe','delete','/solved','requireSession','1899wxfjqe','onStarting','personId','resolveComment','UniverInstanceType','filter','getUnit','UNIVER_UNKNOWN','2098425qjvEhV','CollaborationSessionService','user','values','payload','format','UniverLicensePlugin','getOwnPropertyDescriptor','UserManagerService','saveCommentToSnapshot','2291155Rmadms','UNRECOGNIZED','updateComment'];_0x3046=function(){return _0x3ba01a;};return _0x3046();}var H=Object[_0x1e7cb5(0x174)],J=(_0x19a4fe,_0x2848c5,_0x2892cf,_0x4d837d)=>{for(var _0x3b50eb=_0x4d837d>0x1?void 0x0:_0x4d837d?H(_0x2848c5,_0x2892cf):_0x2848c5,_0x103b65=_0x19a4fe['length']-0x1,_0x47dd99;_0x103b65>=0x0;_0x103b65--)(_0x47dd99=_0x19a4fe[_0x103b65])&&(_0x3b50eb=_0x47dd99(_0x3b50eb)||_0x3b50eb);return _0x3b50eb;},y=(_0x296e10,_0x4f249e)=>(_0x352eda,_0x9990eb)=>_0x4f249e(_0x352eda,_0x9990eb,_0x296e10);let g=class extends c[_0x1e7cb5(0x149)]{constructor(_0x43a265,_0x46edc2){const _0x423359=_0x1e7cb5;super(),this[_0x423359(0x181)]=_0x43a265,this[_0x423359(0x1a5)]=_0x46edc2,this[_0x423359(0x194)]();}[_0x1e7cb5(0x194)](){const _0x2a2b2e=_0x1e7cb5;this['_threadCommentDataSourceService']['dataSource']=this[_0x2a2b2e(0x1a5)],this['_threadCommentDataSourceService'][_0x2a2b2e(0x136)]=!0x1;}};g=J([y(0x0,M[_0x1e7cb5(0x144)]),y(0x1,c[_0x1e7cb5(0x196)](p))],g);var F=Object[_0x1e7cb5(0x1a0)],L=Object[_0x1e7cb5(0x174)],Z=(_0x1714a6,_0x26246f,_0xa7a2a5)=>_0x26246f in _0x1714a6?F(_0x1714a6,_0x26246f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xa7a2a5}):_0x1714a6[_0x26246f]=_0xa7a2a5,W=(_0x110216,_0x16a4b5,_0x995c46,_0x1d34bb)=>{const _0x5ced0f=_0x1e7cb5;for(var _0x444738=_0x1d34bb>0x1?void 0x0:_0x1d34bb?L(_0x16a4b5,_0x995c46):_0x16a4b5,_0x1095bf=_0x110216[_0x5ced0f(0x160)]-0x1,_0x2953db;_0x1095bf>=0x0;_0x1095bf--)(_0x2953db=_0x110216[_0x1095bf])&&(_0x444738=_0x2953db(_0x444738)||_0x444738);return _0x444738;},O=(_0x3e3397,_0x17d1cf)=>(_0x3576b8,_0x5c7fa7)=>_0x17d1cf(_0x3576b8,_0x5c7fa7,_0x3e3397),N=(_0x30bf33,_0xb8fa7e,_0x4e6001)=>Z(_0x30bf33,typeof _0xb8fa7e!=_0x1e7cb5(0x186)?_0xb8fa7e+'':_0xb8fa7e,_0x4e6001);function _0x5f4e(_0x581fe4,_0x19ee87){const _0x304638=_0x3046();return _0x5f4e=function(_0x5f4e89,_0x1056e5){_0x5f4e89=_0x5f4e89-0x128;let _0x59ef03=_0x304638[_0x5f4e89];return _0x59ef03;},_0x5f4e(_0x581fe4,_0x19ee87);}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1e7cb5(0x12f)]{constructor(_0x592498=D,_0x5d5ced,_0x25c828){const _0x2d34e2=_0x1e7cb5;super(),this[_0x2d34e2(0x13d)]=_0x592498,this['_injector']=_0x5d5ced,this[_0x2d34e2(0x135)]=_0x25c828;const {..._0x2d4576}=c[_0x2d34e2(0x155)]({},D,this[_0x2d34e2(0x13d)]);this['_configService']['setConfig'](q,_0x2d4576);}[_0x1e7cb5(0x166)](){const _0xc93a6d=_0x1e7cb5;[[p],[g],[_]][_0xc93a6d(0x159)](_0x24d615=>{const _0x29eb2d=_0xc93a6d;this[_0x29eb2d(0x133)][_0x29eb2d(0x19c)](_0x24d615);});}[_0x1e7cb5(0x130)](){const _0xceff50=_0x1e7cb5;this[_0xceff50(0x133)][_0xceff50(0x15f)](g),this[_0xceff50(0x133)][_0xceff50(0x15f)](_);}},N(exports[_0x1e7cb5(0x193)],_0x1e7cb5(0x18e),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x1e7cb5(0x18b),c[_0x1e7cb5(0x169)][_0x1e7cb5(0x16c)]),exports[_0x1e7cb5(0x193)]=W([c[_0x1e7cb5(0x147)](w[_0x1e7cb5(0x1a2)],b[_0x1e7cb5(0x1a4)],T[_0x1e7cb5(0x173)]),O(0x1,c[_0x1e7cb5(0x196)](c[_0x1e7cb5(0x145)])),O(0x2,c[_0x1e7cb5(0x15e)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x4f38b=_0x197d;(function(_0xaed30e,_0x2ecd97){const _0x53f5d7=_0x197d,_0x4e42ee=_0xaed30e();while(!![]){try{const _0x395cd1=-parseInt(_0x53f5d7(0x206))/0x1+-parseInt(_0x53f5d7(0x1cb))/0x2*(-parseInt(_0x53f5d7(0x1f3))/0x3)+-parseInt(_0x53f5d7(0x1d9))/0x4+parseInt(_0x53f5d7(0x1da))/0x5+parseInt(_0x53f5d7(0x222))/0x6+-parseInt(_0x53f5d7(0x202))/0x7*(parseInt(_0x53f5d7(0x1f4))/0x8)+parseInt(_0x53f5d7(0x218))/0x9;if(_0x395cd1===_0x2ecd97)break;else _0x4e42ee['push'](_0x4e42ee['shift']());}catch(_0x334fcf){_0x4e42ee['push'](_0x4e42ee['shift']());}}}(_0x35ee,0xd0adc));Object[_0x4f38b(0x1fb)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4f38b(0x1f7);var I=(_0x2cf311=>(_0x2cf311[_0x2cf311['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2cf311[_0x2cf311[_0x4f38b(0x1ee)]=0x1]='Solved',_0x2cf311[_0x2cf311['UNRECOGNIZED']=-0x1]=_0x4f38b(0x22c),_0x2cf311))(I||{}),v=(_0xe10652=>(_0xe10652[_0xe10652['Unknown']=0x0]=_0x4f38b(0x21e),_0xe10652[_0xe10652[_0x4f38b(0x20c)]=0x1]=_0x4f38b(0x20c),_0xe10652[_0xe10652[_0x4f38b(0x20b)]=0x2]='Reply',_0xe10652[_0xe10652[_0x4f38b(0x210)]=0x3]=_0x4f38b(0x210),_0xe10652[_0xe10652[_0x4f38b(0x1c5)]=0x4]=_0x4f38b(0x1c5),_0xe10652[_0xe10652[_0x4f38b(0x1bc)]=0x5]=_0x4f38b(0x1bc),_0xe10652[_0xe10652[_0x4f38b(0x22c)]=-0x1]=_0x4f38b(0x22c),_0xe10652))(v||{});const f=_0x1854ac=>c['dayjs'](new Date(+_0x1854ac))[_0x4f38b(0x1f9)](_0x4f38b(0x1dc)),R=async(_0x1d3f45,_0x770f4a)=>{const _0x38f2ad=_0x4f38b,_0x2743b0=_0x1d3f45[_0x38f2ad(0x1de)](c[_0x38f2ad(0x1c4)]),_0x294cf7=_0x1d3f45[_0x38f2ad(0x1de)](P['HTTPService']);_0x770f4a[_0x38f2ad(0x215)](_0x4bcf1e=>{const _0x1458d6=_0x38f2ad;_0x2743b0[_0x1458d6(0x219)](_0x4bcf1e)&&_0x770f4a[_0x1458d6(0x216)](_0x4bcf1e);}),_0x770f4a['size']&&(await _0x294cf7[_0x38f2ad(0x1de)](_0x38f2ad(0x21a),{'params':{'userIDs':[..._0x770f4a]}}))[_0x38f2ad(0x1ec)]['users'][_0x38f2ad(0x215)](_0x157af8=>{const _0x438b4c=_0x38f2ad;_0x157af8&&_0x2743b0[_0x438b4c(0x1b9)](_0x157af8);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x52f295,_0x295301,_0x19ed69,_0x1aaed5)=>{const _0x478fa4=_0x4f38b;for(var _0x6eaad9=_0x1aaed5>0x1?void 0x0:_0x1aaed5?$(_0x295301,_0x19ed69):_0x295301,_0x4cb6b1=_0x52f295[_0x478fa4(0x22b)]-0x1,_0x35ef37;_0x4cb6b1>=0x0;_0x4cb6b1--)(_0x35ef37=_0x52f295[_0x4cb6b1])&&(_0x6eaad9=_0x35ef37(_0x6eaad9)||_0x6eaad9);return _0x6eaad9;},S=(_0x40f050,_0x2def6d)=>(_0x2a7c6d,_0x45a8ac)=>_0x2def6d(_0x2a7c6d,_0x45a8ac,_0x40f050);let _=class extends c['Disposable']{constructor(_0xc904a1,_0x2deec9,_0x2e459c,_0x143f24){const _0x308646=_0x4f38b;super(),this[_0x308646(0x1ea)]=_0xc904a1,this[_0x308646(0x1d2)]=_0x2deec9,this[_0x308646(0x1fe)]=_0x2e459c,this[_0x308646(0x1ef)]=_0x143f24,this[_0x308646(0x1c0)](),this['_initUserSync']();}['_initUserSync'](){const _0x36abe4=_0x4f38b;this[_0x36abe4(0x1c9)](this[_0x36abe4(0x1d2)][_0x36abe4(0x1ba)][_0x36abe4(0x1d8)](j[_0x36abe4(0x1bd)](0x10))['subscribe'](_0x24b3dc=>{const _0x496816=new Set();_0x24b3dc['forEach'](_0x47bbb4=>{const _0x1ae2ad=_0x197d;switch(_0x47bbb4[_0x1ae2ad(0x1e3)]){case _0x1ae2ad(0x1c7):{const _0x457fa8=_0x47bbb4['payload'][_0x1ae2ad(0x20a)];_0x496816['add'](_0x457fa8);break;}}}),R(this['_injector'],_0x496816);}));}[_0x4f38b(0x1c0)](){const _0x256d47=_0x4f38b;this[_0x256d47(0x1c9)](this['_commentService'][_0x256d47(0x1ba)]['subscribe'](async _0x1d00ce=>{const _0x4edfc8=_0x256d47;var _0xcafc4e,_0x36ff37,_0x1612b5,_0x269e75;const _0x3b5641=(_0xcafc4e=this['_threadCommentModel'][_0x4edfc8(0x1d5)](_0x1d00ce[_0x4edfc8(0x205)])['find'](_0x312e7d=>_0x312e7d[_0x4edfc8(0x213)]===_0x1d00ce[_0x4edfc8(0x213)]))==null?void 0x0:_0xcafc4e[_0x4edfc8(0x1ed)];if(!_0x3b5641)return;const {unitId:_0x3166f7,subUnitId:_0x7ff5fe}=_0x3b5641;switch(_0x1d00ce['user']&&this[_0x4edfc8(0x1fe)][_0x4edfc8(0x1b9)](_0x1d00ce[_0x4edfc8(0x1d4)]),_0x1d00ce[_0x4edfc8(0x1e3)]){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0x4edfc8(0x1ce)](_0x3166f7,_0x7ff5fe,{'unitId':_0x3166f7,'subUnitId':_0x7ff5fe,'ref':'','id':_0x1d00ce[_0x4edfc8(0x1ff)],'dT':f(+_0x1d00ce[_0x4edfc8(0x22d)]),'threadId':_0x1d00ce[_0x4edfc8(0x213)],'personId':(_0x1612b5=(_0x36ff37=_0x1d00ce[_0x4edfc8(0x1d4)])==null?void 0x0:_0x36ff37['userID'])!=null?_0x1612b5:_0x1d00ce[_0x4edfc8(0x1d1)],'text':JSON[_0x4edfc8(0x1fa)](_0x1d00ce[_0x4edfc8(0x1f6)]),'parentId':_0x3b5641['id']});break;}case v['Delete']:{const _0x3db41c=this[_0x4edfc8(0x1d2)][_0x4edfc8(0x1dd)](_0x3166f7,_0x7ff5fe,_0x1d00ce['replyId']);_0x3db41c&&_0x3db41c[_0x4edfc8(0x1bb)]&&this['_threadCommentModel'][_0x4edfc8(0x221)](_0x3166f7,_0x7ff5fe,_0x1d00ce[_0x4edfc8(0x1ff)]);break;}case v[_0x4edfc8(0x210)]:{this[_0x4edfc8(0x1d2)][_0x4edfc8(0x1c2)](_0x3166f7,_0x7ff5fe,{'commentId':_0x1d00ce[_0x4edfc8(0x1ff)],'text':JSON[_0x4edfc8(0x1fa)](_0x1d00ce[_0x4edfc8(0x1f6)])});break;}case v[_0x4edfc8(0x1bc)]:{const _0xb2e13a=(_0x269e75=this['_threadCommentModel'][_0x4edfc8(0x1d5)](_0x1d00ce['unitId'])[_0x4edfc8(0x1cd)](_0x422327=>_0x422327['threadId']===_0x1d00ce[_0x4edfc8(0x213)]))==null?void 0x0:_0x269e75[_0x4edfc8(0x1ed)];_0xb2e13a&&this[_0x4edfc8(0x1d2)]['resolveComment'](_0x3166f7,_0x7ff5fe,_0xb2e13a['id'],_0x1d00ce[_0x4edfc8(0x212)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x4f38b(0x226)](b[_0x4f38b(0x1cc)])),S(0x1,c[_0x4f38b(0x226)](M[_0x4f38b(0x1df)])),S(0x2,c[_0x4f38b(0x226)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x4f38b(0x21b)]))],_);const q=_0x4f38b(0x21f),D={};function _0x197d(_0x26a937,_0x4f1c7a){const _0x35ee6d=_0x35ee();return _0x197d=function(_0x197d1c,_0x3afea8){_0x197d1c=_0x197d1c-0x1b9;let _0x925a=_0x35ee6d[_0x197d1c];return _0x925a;},_0x197d(_0x26a937,_0x4f1c7a);}var A=Object[_0x4f38b(0x203)],x=(_0x56d906,_0x38ba82,_0x58e858,_0x1a1999)=>{const _0x42c6ef=_0x4f38b;for(var _0x48a824=_0x1a1999>0x1?void 0x0:_0x1a1999?A(_0x38ba82,_0x58e858):_0x38ba82,_0x4276b6=_0x56d906[_0x42c6ef(0x22b)]-0x1,_0x636c97;_0x4276b6>=0x0;_0x4276b6--)(_0x636c97=_0x56d906[_0x4276b6])&&(_0x48a824=_0x636c97(_0x48a824)||_0x48a824);return _0x48a824;},C=(_0x4de1ee,_0x5abf56)=>(_0x4306d5,_0x5582fd)=>_0x5abf56(_0x4306d5,_0x5582fd,_0x4de1ee);function Y(_0x70299c,_0x47badb){const _0x2ebc8e=_0x4f38b,_0xbd32c6=_0x70299c['replies'][0x0];return{..._0x47badb,'id':_0xbd32c6[_0x2ebc8e(0x1ff)],'resolved':_0x70299c[_0x2ebc8e(0x212)]===0x1,'dT':f(_0xbd32c6[_0x2ebc8e(0x22d)]),'personId':_0xbd32c6[_0x2ebc8e(0x1d1)],'threadId':_0xbd32c6[_0x2ebc8e(0x213)]};}function _0x35ee(){const _0x4e88f7=['Edit','_configService','solved','threadId','requireSession','forEach','delete','OpenOrReOpen','7268247moFPUP','getUser','/universer-api/user/list','Injector','UniverThreadCommentDataSourcePlugin','resolveComment','Unknown','thread-comment-data-source.config','UniverInstanceType','deleteComment','2592012zdHmrZ','/delete','rangeId','/universer-api/comment/unit/','Inject','onReady','pluginName','UNIVER_UNKNOWN','/reply','length','UNRECOGNIZED','createTimestamp','resolved','addUser','commentUpdate$','parentId','Solve','bufferTime','users','_threadCommentDataSource','_init','IThreadCommentDataSourceService','updateComment','/add','UserManagerService','Delete','slice','add','Plugin','disposeWithMe','listComments','58LgEoIS','CommentService','find','addComment','ref','UniverLicensePlugin','userId','_threadCommentModel','userID','user','getUnit','comments','/edit','pipe','5299840meBLon','5556510dseqci','dataSource','YYYY/MM/DD\x20HH:mm','getComment','get','ThreadCommentModel','values','getCurrentUser','_initDataSource','type','code','error','merge','customRanges','post','rangeType','_commentService','Disposable','body','root','Solved','_injector','_sessionService','CustomRangeType','saveCommentToSnapshot','49803GOKkip','5616MecQEx','HTTPService','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_config','format','parse','defineProperty','symbol','dayjs','_userService','replyId','replies','COMMENT','973gewdfN','getOwnPropertyDescriptor','_httpService','unitId','555030FphAxK','map','getMemberID','DependentOn','personId','Reply','Add','stringify','filter','_threadCommentDataSourceService'];_0x35ee=function(){return _0x4e88f7;};return _0x35ee();}function G(_0x5cb9ad,_0x23b96a,_0x19fe1c){const _0x4f7c50=_0x4f38b;var _0x1505be,_0x374e70;if(((_0x374e70=(_0x1505be=_0x5cb9ad==null?void 0x0:_0x5cb9ad[_0x4f7c50(0x200)])==null?void 0x0:_0x1505be['length'])!=null?_0x374e70:0x0)>0x0){const _0x388eb5=(_0x17f439,_0x42fcc8)=>({'id':_0x17f439[_0x4f7c50(0x1ff)],'threadId':_0x17f439[_0x4f7c50(0x213)],'dT':f(_0x17f439[_0x4f7c50(0x22d)]),'personId':_0x17f439[_0x4f7c50(0x1d1)],'resolved':_0x5cb9ad[_0x4f7c50(0x212)]===I['Solved'],'unitId':_0x23b96a,'subUnitId':_0x19fe1c,'text':JSON[_0x4f7c50(0x1fa)](_0x17f439['content']),'parentId':_0x42fcc8}),_0xfc9724=_0x388eb5(_0x5cb9ad['replies'][0x0]);return{..._0xfc9724,'children':_0x5cb9ad[_0x4f7c50(0x200)][_0x4f7c50(0x1c6)](0x1)['map'](_0x364441=>_0x388eb5(_0x364441,_0xfc9724['id']))};}return null;}let p=class{constructor(_0x4e201e,_0x137923,_0x266444){const _0x5a3bb0=_0x4f38b;this[_0x5a3bb0(0x204)]=_0x4e201e,this['_userService']=_0x137923,this[_0x5a3bb0(0x1f0)]=_0x266444;}async[_0x4f38b(0x1ce)](_0xdbe16b){const _0x29ba2d=_0x4f38b;var _0x5d38b3,_0x3076ad;const {parentId:_0x34d13b,unitId:_0x430ec2,text:_0x58772b,threadId:_0x1bee3a}=_0xdbe16b,_0x3402dc=(_0x3076ad=(_0x5d38b3=_0x58772b[_0x29ba2d(0x1e7)])==null?void 0x0:_0x5d38b3['filter'](_0xd4b430=>_0xd4b430[_0x29ba2d(0x1e9)]===c[_0x29ba2d(0x1f1)][_0x29ba2d(0x201)])['map'](_0x5b295b=>_0x5b295b[_0x29ba2d(0x224)]))!=null?_0x3076ad:[],_0x5685a6=JSON[_0x29ba2d(0x20d)](_0x58772b),_0x28cb8c=(await this[_0x29ba2d(0x1f0)][_0x29ba2d(0x214)](_0x430ec2))['getMemberID']();if(_0x34d13b){const _0xbefbac={'memberId':_0x28cb8c,'unitId':_0x430ec2,'content':_0x5685a6,'mention':_0x3402dc,'threadId':_0x1bee3a},_0x437beb=(await this[_0x29ba2d(0x204)]['post'](_0x29ba2d(0x225)+_0x430ec2+_0x29ba2d(0x22a),{'body':_0xbefbac}))['body']['reply'];return{..._0xdbe16b,'id':_0x437beb[_0x29ba2d(0x1ff)],'dT':c[_0x29ba2d(0x1fd)](+_0x437beb[_0x29ba2d(0x22d)])['format'](_0x29ba2d(0x1dc)),'personId':_0x437beb[_0x29ba2d(0x1d1)]};}else{const _0x557c3d={'memberId':_0x28cb8c,'unitId':_0x430ec2,'content':_0x5685a6,'mention':_0x3402dc},_0x33045a=await this['_httpService']['post'](_0x29ba2d(0x225)+_0x430ec2+_0x29ba2d(0x1c3),{'body':_0x557c3d});return Y(_0x33045a[_0x29ba2d(0x1ec)]['comment'],_0xdbe16b);}}async[_0x4f38b(0x1c2)](_0x1b2478){const _0xc0978e=_0x4f38b;var _0x361d7c,_0x569ebc;const {text:_0x1f2fb5,unitId:_0x50085a}=_0x1b2478,_0x4bb886=(_0x569ebc=(_0x361d7c=_0x1f2fb5[_0xc0978e(0x1e7)])==null?void 0x0:_0x361d7c[_0xc0978e(0x20e)](_0x4c245d=>_0x4c245d[_0xc0978e(0x1e9)]===c['CustomRangeType']['COMMENT'])['map'](_0x50fef7=>_0x50fef7[_0xc0978e(0x224)]))!=null?_0x569ebc:[],_0x15055b=JSON['stringify'](_0x1f2fb5),_0x245910=_0x1b2478[_0xc0978e(0x213)],_0x5bfa92=_0x1b2478['id'],_0x16e93d={'memberId':(await this[_0xc0978e(0x1f0)][_0xc0978e(0x214)](_0x50085a))[_0xc0978e(0x208)](),'unitId':_0x50085a,'threadId':_0x245910,'mention':_0x4bb886,'content':_0x15055b,'replyId':_0x5bfa92},_0x13d197=await this[_0xc0978e(0x204)][_0xc0978e(0x1e8)](_0xc0978e(0x225)+_0x50085a+_0xc0978e(0x1d7),{'body':_0x16e93d});return!_0x13d197[_0xc0978e(0x1ec)][_0xc0978e(0x1e5)]||_0x13d197[_0xc0978e(0x1ec)][_0xc0978e(0x1e5)][_0xc0978e(0x1e4)]===0x1;}async[_0x4f38b(0x21d)](_0x3a8152){const _0xea06b4=_0x4f38b,{unitId:_0x3517d8}=_0x3a8152,_0x4fd556=_0x3a8152['threadId'],_0x525d63={'memberId':this[_0xea06b4(0x1fe)][_0xea06b4(0x1e1)]()[_0xea06b4(0x1d3)],'unitId':_0x3517d8,'threadId':_0x4fd556,'solved':_0x3a8152[_0xea06b4(0x22e)]?I[_0xea06b4(0x1ee)]:I[_0xea06b4(0x217)]},_0xb32f0f=await this[_0xea06b4(0x204)][_0xea06b4(0x1e8)](_0xea06b4(0x225)+_0x3517d8+'/solved',{'body':_0x525d63});return!_0xb32f0f[_0xea06b4(0x1ec)][_0xea06b4(0x1e5)]||_0xb32f0f['body']['error']['code']===0x1;}async[_0x4f38b(0x221)](_0x504d2f,_0xc3e2d0,_0x231aea,_0x147dbd){const _0x27d514=_0x4f38b,_0x42e612={'memberId':(await this[_0x27d514(0x1f0)]['requireSession'](_0x504d2f))[_0x27d514(0x208)](),'threadId':_0x231aea,'replyId':_0x147dbd,'unitId':_0x504d2f},_0x39bd78=await this[_0x27d514(0x204)][_0x27d514(0x1e8)](_0x27d514(0x225)+_0x504d2f+_0x27d514(0x223),{'body':_0x42e612});return!_0x39bd78['body'][_0x27d514(0x1e5)]||_0x39bd78[_0x27d514(0x1ec)]['error'][_0x27d514(0x1e4)]===0x1;}async[_0x4f38b(0x1ca)](_0x4eed22,_0x24bc13,_0x366245){const _0x411b67=_0x4f38b,_0x29b1bc={'unitId':_0x4eed22,'threadId':_0x366245},_0x2ea4e1=await this[_0x411b67(0x204)][_0x411b67(0x1e8)](_0x411b67(0x225)+_0x4eed22+'/list',{'body':_0x29b1bc}),_0x3f01a2=_0x366245[_0x411b67(0x207)](_0x23959e=>G(_0x2ea4e1[_0x411b67(0x1ec)][_0x411b67(0x1d6)][_0x23959e],_0x4eed22,_0x24bc13))[_0x411b67(0x20e)](Boolean);return Object[_0x411b67(0x1e0)](_0x2ea4e1['body'][_0x411b67(0x1be)])[_0x411b67(0x215)](_0x5d185c=>{const _0x29fc9c=_0x411b67;this[_0x29fc9c(0x1fe)][_0x29fc9c(0x1b9)](_0x5d185c);}),_0x3f01a2;}[_0x4f38b(0x1f2)](_0x2766ad){const _0xe05842=_0x4f38b;return{'id':_0x2766ad['id'],'threadId':_0x2766ad[_0xe05842(0x213)],'ref':_0x2766ad[_0xe05842(0x1cf)]};}};p=x([C(0x0,c[_0x4f38b(0x226)](P[_0x4f38b(0x1f5)])),C(0x1,c[_0x4f38b(0x226)](c[_0x4f38b(0x1c4)])),C(0x2,c[_0x4f38b(0x226)](b['CollaborationSessionService']))],p);var H=Object[_0x4f38b(0x203)],J=(_0xc91105,_0x3f2f4f,_0x1d84db,_0x524e9f)=>{for(var _0x4e480c=_0x524e9f>0x1?void 0x0:_0x524e9f?H(_0x3f2f4f,_0x1d84db):_0x3f2f4f,_0x11e381=_0xc91105['length']-0x1,_0x25536d;_0x11e381>=0x0;_0x11e381--)(_0x25536d=_0xc91105[_0x11e381])&&(_0x4e480c=_0x25536d(_0x4e480c)||_0x4e480c);return _0x4e480c;},y=(_0x3884a,_0x6f5dda)=>(_0xe6837f,_0x379dd0)=>_0x6f5dda(_0xe6837f,_0x379dd0,_0x3884a);let g=class extends c[_0x4f38b(0x1eb)]{constructor(_0x2edb39,_0x16ee18){const _0x51a288=_0x4f38b;super(),this[_0x51a288(0x20f)]=_0x2edb39,this[_0x51a288(0x1bf)]=_0x16ee18,this['_initDataSource']();}[_0x4f38b(0x1e2)](){const _0xc85053=_0x4f38b;this[_0xc85053(0x20f)][_0xc85053(0x1db)]=this[_0xc85053(0x1bf)],this[_0xc85053(0x20f)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4f38b(0x1c1)]),y(0x1,c['Inject'](p))],g);var F=Object['defineProperty'],L=Object[_0x4f38b(0x203)],Z=(_0x361f3a,_0x1075bb,_0x234ce6)=>_0x1075bb in _0x361f3a?F(_0x361f3a,_0x1075bb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x234ce6}):_0x361f3a[_0x1075bb]=_0x234ce6,W=(_0x6b539c,_0x3b72fe,_0xb6b069,_0x48cc68)=>{const _0x205300=_0x4f38b;for(var _0x449d47=_0x48cc68>0x1?void 0x0:_0x48cc68?L(_0x3b72fe,_0xb6b069):_0x3b72fe,_0x418ce8=_0x6b539c[_0x205300(0x22b)]-0x1,_0x27c09b;_0x418ce8>=0x0;_0x418ce8--)(_0x27c09b=_0x6b539c[_0x418ce8])&&(_0x449d47=_0x27c09b(_0x449d47)||_0x449d47);return _0x449d47;},O=(_0x4193e4,_0x240168)=>(_0x2302fb,_0x5a58e5)=>_0x240168(_0x2302fb,_0x5a58e5,_0x4193e4),N=(_0x23e4bd,_0x24bc78,_0x1cd18f)=>Z(_0x23e4bd,typeof _0x24bc78!=_0x4f38b(0x1fc)?_0x24bc78+'':_0x24bc78,_0x1cd18f);exports[_0x4f38b(0x21c)]=class extends c[_0x4f38b(0x1c8)]{constructor(_0x399d73=D,_0x1a5840,_0x2256df){const _0x177325=_0x4f38b;super(),this[_0x177325(0x1f8)]=_0x399d73,this[_0x177325(0x1ef)]=_0x1a5840,this[_0x177325(0x211)]=_0x2256df;const {..._0x111d4f}=c[_0x177325(0x1e6)]({},D,this[_0x177325(0x1f8)]);this[_0x177325(0x211)]['setConfig'](q,_0x111d4f);}['onStarting'](){[[p],[g],[_]]['forEach'](_0x544443=>{const _0x4e3690=_0x197d;this[_0x4e3690(0x1ef)][_0x4e3690(0x1c7)](_0x544443);});}[_0x4f38b(0x227)](){const _0x5167f2=_0x4f38b;this['_injector'][_0x5167f2(0x1de)](g),this[_0x5167f2(0x1ef)]['get'](_);}},N(exports[_0x4f38b(0x21c)],_0x4f38b(0x228),U),N(exports[_0x4f38b(0x21c)],_0x4f38b(0x1e3),c[_0x4f38b(0x220)][_0x4f38b(0x229)]),exports[_0x4f38b(0x21c)]=W([c[_0x4f38b(0x209)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x4f38b(0x1d0)]),O(0x1,c[_0x4f38b(0x226)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x4f38b(0x21c)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x338a3e=_0x5a1c;(function(_0x421eef,_0x21576a){const _0x155f51=_0x5a1c,_0x1f40ca=_0x421eef();while(!![]){try{const _0x7a0bbb=-parseInt(_0x155f51(0x10b))/0x1*(-parseInt(_0x155f51(0x100))/0x2)+parseInt(_0x155f51(0x11b))/0x3+parseInt(_0x155f51(0x111))/0x4*(-parseInt(_0x155f51(0x14a))/0x5)+parseInt(_0x155f51(0x13a))/0x6+-parseInt(_0x155f51(0x156))/0x7+parseInt(_0x155f51(0x122))/0x8*(parseInt(_0x155f51(0x146))/0x9)+-parseInt(_0x155f51(0x12c))/0xa;if(_0x7a0bbb===_0x21576a)break;else _0x1f40ca['push'](_0x1f40ca['shift']());}catch(_0x2934f6){_0x1f40ca['push'](_0x1f40ca['shift']());}}}(_0x5587,0x4a60c));import{CommentService as _0x1def95,CollaborationSessionService as _0x2e0b26,UniverCollaborationClientPlugin as _0x5f22af}from'@univerjs-pro/collaboration-client';function _0x5587(){const _0x1ed97f=['add','defineProperty','/delete','error','_threadCommentDataSourceService','saveCommentToSnapshot','UNIVER_UNKNOWN','symbol','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','11ZMXMml','Reply','find','getUnit','get','dataSource','995772toOZkT','getOwnPropertyDescriptor','_config','Edit','post','users','/list','filter','comment','Delete','1028079AWGkrD','updateComment','_threadCommentModel','getComment','format','code','solved','8dHujXV','subscribe','_httpService','_initDataSource','slice','YYYY/MM/DD\x20HH:mm','pipe','userId','root','_initUserSync','5072660gWPFPJ','resolveComment','/add','content','unitId','length','listComments','rangeId','reply','commentUpdate$','_init','_configService','Solve','customRanges','920280DFVkgd','_sessionService','Add','delete','createTimestamp','replyId','user','type','onReady','resolved','/reply','pluginName','2690757eNPXGv','getUser','/universer-api/comment/unit/','addUser','5HIVOuH','userID','rangeType','threadId','addComment','Solved','_userService','map','parse','body','stringify','COMMENT','1820896gWeTNH','_injector','getMemberID','getCurrentUser','size','_threadCommentDataSource','forEach','OpenOrReOpen','setConfig','syncUpdateMutationToColla','parentId','deleteComment','_commentService','replies','UNRECOGNIZED','95626EdJvYz'];_0x5587=function(){return _0x1ed97f;};return _0x5587();}import{UniverLicensePlugin as _0x1fa237}from'@univerjs-pro/license';import{dayjs as _0x2e89bc,UserManagerService as _0x1fa847,Inject as _0x3dcfa0,Injector as _0xac405f,Disposable as _0x4d943a,CustomRangeType as _0x265937,UniverInstanceType as _0x2d50f1,DependentOn as _0x266507,IConfigService as _0x108d43,Plugin as _0xc515d7,merge as _0xaa02ee}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3d6cdd}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2cf2a9,IThreadCommentDataSourceService as _0x4cbc34}from'@univerjs/thread-comment';import{bufferTime as _0x4bb671}from'rxjs';import{HTTPService as _0x112d55}from'@univerjs/network';const W=_0x338a3e(0x109);var I=(_0x4500c7=>(_0x4500c7[_0x4500c7[_0x338a3e(0x15d)]=0x0]='OpenOrReOpen',_0x4500c7[_0x4500c7['Solved']=0x1]=_0x338a3e(0x14f),_0x4500c7[_0x4500c7[_0x338a3e(0xff)]=-0x1]=_0x338a3e(0xff),_0x4500c7))(I||{}),v=(_0x35e1fb=>(_0x35e1fb[_0x35e1fb['Unknown']=0x0]='Unknown',_0x35e1fb[_0x35e1fb[_0x338a3e(0x13c)]=0x1]=_0x338a3e(0x13c),_0x35e1fb[_0x35e1fb[_0x338a3e(0x10c)]=0x2]=_0x338a3e(0x10c),_0x35e1fb[_0x35e1fb[_0x338a3e(0x114)]=0x3]=_0x338a3e(0x114),_0x35e1fb[_0x35e1fb[_0x338a3e(0x11a)]=0x4]='Delete',_0x35e1fb[_0x35e1fb[_0x338a3e(0x138)]=0x5]=_0x338a3e(0x138),_0x35e1fb[_0x35e1fb[_0x338a3e(0xff)]=-0x1]=_0x338a3e(0xff),_0x35e1fb))(v||{});const y=_0x226e89=>_0x2e89bc(new Date(+_0x226e89))[_0x338a3e(0x11f)](_0x338a3e(0x127)),B=async(_0x378fa9,_0x142af3)=>{const _0x447adb=_0x338a3e,_0x182c3d=_0x378fa9[_0x447adb(0x10f)](_0x1fa847),_0x3c579b=_0x378fa9[_0x447adb(0x10f)](_0x112d55);_0x142af3[_0x447adb(0x15c)](_0x41b28e=>{const _0x5da1c3=_0x447adb;_0x182c3d[_0x5da1c3(0x147)](_0x41b28e)&&_0x142af3[_0x5da1c3(0x13d)](_0x41b28e);}),_0x142af3[_0x447adb(0x15a)]&&(await _0x3c579b['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x142af3]}}))['body'][_0x447adb(0x116)][_0x447adb(0x15c)](_0x56e572=>{const _0x56958b=_0x447adb;_0x56e572&&_0x182c3d[_0x56958b(0x149)](_0x56e572);});};var K=Object[_0x338a3e(0x112)],V=(_0x4f6e70,_0x1b3a77,_0x548a66,_0x26bec7)=>{const _0x114894=_0x338a3e;for(var _0x2dc9f9=_0x26bec7>0x1?void 0x0:_0x26bec7?K(_0x1b3a77,_0x548a66):_0x1b3a77,_0x23d12d=_0x4f6e70[_0x114894(0x131)]-0x1,_0x21d864;_0x23d12d>=0x0;_0x23d12d--)(_0x21d864=_0x4f6e70[_0x23d12d])&&(_0x2dc9f9=_0x21d864(_0x2dc9f9)||_0x2dc9f9);return _0x2dc9f9;},p=(_0x351c9a,_0x4ffbb4)=>(_0x21d346,_0x4064a0)=>_0x4ffbb4(_0x21d346,_0x4064a0,_0x351c9a);let _=class extends _0x4d943a{constructor(_0x297217,_0xf241f0,_0x16f3f2,_0x543ccf){const _0x15c834=_0x338a3e;super(),this[_0x15c834(0xfd)]=_0x297217,this[_0x15c834(0x11d)]=_0xf241f0,this['_userService']=_0x16f3f2,this['_injector']=_0x543ccf,this['_init'](),this[_0x15c834(0x12b)]();}[_0x338a3e(0x12b)](){const _0x82eccc=_0x338a3e;this['disposeWithMe'](this[_0x82eccc(0x11d)]['commentUpdate$'][_0x82eccc(0x128)](_0x4bb671(0x10))[_0x82eccc(0x123)](_0x56da90=>{const _0x5d7d54=_0x82eccc,_0x44e3ee=new Set();_0x56da90[_0x5d7d54(0x15c)](_0x538286=>{const _0x4fcb7e=_0x5d7d54;switch(_0x538286[_0x4fcb7e(0x141)]){case _0x4fcb7e(0x101):{const _0x1cbb31=_0x538286['payload']['personId'];_0x44e3ee[_0x4fcb7e(0x101)](_0x1cbb31);break;}}}),B(this['_injector'],_0x44e3ee);}));}[_0x338a3e(0x136)](){const _0xa4ead8=_0x338a3e;this['disposeWithMe'](this['_commentService'][_0xa4ead8(0x135)][_0xa4ead8(0x123)](async _0x3694f6=>{const _0xcd9c24=_0xa4ead8;var _0x1f5d51,_0x41643d,_0x15beaf,_0x40b714;const _0x3d802e=(_0x1f5d51=this[_0xcd9c24(0x11d)][_0xcd9c24(0x10e)](_0x3694f6[_0xcd9c24(0x130)])[_0xcd9c24(0x10d)](_0x25f61f=>_0x25f61f[_0xcd9c24(0x14d)]===_0x3694f6['threadId']))==null?void 0x0:_0x1f5d51[_0xcd9c24(0x12a)];if(!_0x3d802e)return;const {unitId:_0x1363a9,subUnitId:_0x42d716}=_0x3d802e;switch(_0x3694f6[_0xcd9c24(0x140)]&&this[_0xcd9c24(0x150)][_0xcd9c24(0x149)](_0x3694f6[_0xcd9c24(0x140)]),_0x3694f6['type']){case v['Add']:break;case v[_0xcd9c24(0x10c)]:{this[_0xcd9c24(0x11d)][_0xcd9c24(0x14e)](_0x1363a9,_0x42d716,{'unitId':_0x1363a9,'subUnitId':_0x42d716,'ref':'','id':_0x3694f6[_0xcd9c24(0x13f)],'dT':y(+_0x3694f6[_0xcd9c24(0x13e)]),'threadId':_0x3694f6[_0xcd9c24(0x14d)],'personId':(_0x15beaf=(_0x41643d=_0x3694f6['user'])==null?void 0x0:_0x41643d[_0xcd9c24(0x14b)])!=null?_0x15beaf:_0x3694f6[_0xcd9c24(0x129)],'text':JSON[_0xcd9c24(0x152)](_0x3694f6[_0xcd9c24(0x12f)]),'parentId':_0x3d802e['id']});break;}case v[_0xcd9c24(0x11a)]:{const _0x1224f1=this[_0xcd9c24(0x11d)][_0xcd9c24(0x11e)](_0x1363a9,_0x42d716,_0x3694f6[_0xcd9c24(0x13f)]);_0x1224f1&&_0x1224f1[_0xcd9c24(0xfb)]&&this[_0xcd9c24(0x11d)][_0xcd9c24(0xfc)](_0x1363a9,_0x42d716,_0x3694f6[_0xcd9c24(0x13f)]);break;}case v[_0xcd9c24(0x114)]:{this[_0xcd9c24(0x11d)][_0xcd9c24(0x11c)](_0x1363a9,_0x42d716,{'commentId':_0x3694f6['replyId'],'text':JSON[_0xcd9c24(0x152)](_0x3694f6[_0xcd9c24(0x12f)])});break;}case v[_0xcd9c24(0x138)]:{const _0x32af58=(_0x40b714=this[_0xcd9c24(0x11d)][_0xcd9c24(0x10e)](_0x3694f6[_0xcd9c24(0x130)])[_0xcd9c24(0x10d)](_0x5edea5=>_0x5edea5[_0xcd9c24(0x14d)]===_0x3694f6['threadId']))==null?void 0x0:_0x40b714[_0xcd9c24(0x12a)];_0x32af58&&this[_0xcd9c24(0x11d)]['resolveComment'](_0x1363a9,_0x42d716,_0x32af58['id'],_0x3694f6[_0xcd9c24(0x121)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x3dcfa0(_0x1def95)),p(0x1,_0x3dcfa0(_0x2cf2a9)),p(0x2,_0x3dcfa0(_0x1fa847)),p(0x3,_0x3dcfa0(_0xac405f))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x338a3e(0x112)],Q=(_0x5cffac,_0x9fdacf,_0x1fcf1f,_0x4ac5c6)=>{const _0x5d2aab=_0x338a3e;for(var _0x3ea5c6=_0x4ac5c6>0x1?void 0x0:_0x4ac5c6?k(_0x9fdacf,_0x1fcf1f):_0x9fdacf,_0x5a1a7d=_0x5cffac[_0x5d2aab(0x131)]-0x1,_0x4220eb;_0x5a1a7d>=0x0;_0x5a1a7d--)(_0x4220eb=_0x5cffac[_0x5a1a7d])&&(_0x3ea5c6=_0x4220eb(_0x3ea5c6)||_0x3ea5c6);return _0x3ea5c6;},b=(_0x9731cc,_0x4af6e8)=>(_0x510a8d,_0x2c6b36)=>_0x4af6e8(_0x510a8d,_0x2c6b36,_0x9731cc);function X(_0x2ccde8,_0x176d52){const _0x3a1a10=_0x338a3e,_0x19bf87=_0x2ccde8['replies'][0x0];return{..._0x176d52,'id':_0x19bf87[_0x3a1a10(0x13f)],'resolved':_0x2ccde8[_0x3a1a10(0x121)]===0x1,'dT':y(_0x19bf87[_0x3a1a10(0x13e)]),'personId':_0x19bf87[_0x3a1a10(0x129)],'threadId':_0x19bf87['threadId']};}function ee(_0x2a1ce0,_0x451b4b,_0x22e8dc){const _0x5e87f7=_0x338a3e;var _0x3777e1,_0x30a3dc;if(((_0x30a3dc=(_0x3777e1=_0x2a1ce0==null?void 0x0:_0x2a1ce0['replies'])==null?void 0x0:_0x3777e1[_0x5e87f7(0x131)])!=null?_0x30a3dc:0x0)>0x0){const _0x147947=(_0x4a85a1,_0x5bd59b)=>({'id':_0x4a85a1[_0x5e87f7(0x13f)],'threadId':_0x4a85a1['threadId'],'dT':y(_0x4a85a1[_0x5e87f7(0x13e)]),'personId':_0x4a85a1[_0x5e87f7(0x129)],'resolved':_0x2a1ce0['solved']===I[_0x5e87f7(0x14f)],'unitId':_0x451b4b,'subUnitId':_0x22e8dc,'text':JSON['parse'](_0x4a85a1[_0x5e87f7(0x12f)]),'parentId':_0x5bd59b}),_0x968d23=_0x147947(_0x2a1ce0[_0x5e87f7(0xfe)][0x0]);return{..._0x968d23,'children':_0x2a1ce0[_0x5e87f7(0xfe)][_0x5e87f7(0x126)](0x1)[_0x5e87f7(0x151)](_0x54641e=>_0x147947(_0x54641e,_0x968d23['id']))};}return null;}let S=class{constructor(_0x3e1357,_0x2ca5a6,_0x44dade){const _0x2f836e=_0x338a3e;this['_httpService']=_0x3e1357,this[_0x2f836e(0x150)]=_0x2ca5a6,this[_0x2f836e(0x13b)]=_0x44dade;}async[_0x338a3e(0x14e)](_0x5b06db){const _0xb5aa14=_0x338a3e;var _0x54f22d,_0x598e90;const {parentId:_0x40580b,unitId:_0x1bea6d,text:_0x8a6db2,threadId:_0x4781a4}=_0x5b06db,_0x4db24c=(_0x598e90=(_0x54f22d=_0x8a6db2['customRanges'])==null?void 0x0:_0x54f22d[_0xb5aa14(0x118)](_0x359dc5=>_0x359dc5['rangeType']===_0x265937[_0xb5aa14(0x155)])['map'](_0x1bf44b=>_0x1bf44b[_0xb5aa14(0x133)]))!=null?_0x598e90:[],_0x2a07ba=JSON[_0xb5aa14(0x154)](_0x8a6db2),_0x488f3c=(await this[_0xb5aa14(0x13b)][_0xb5aa14(0x10a)](_0x1bea6d))[_0xb5aa14(0x158)]();if(_0x40580b){const _0x381699={'memberId':_0x488f3c,'unitId':_0x1bea6d,'content':_0x2a07ba,'mention':_0x4db24c,'threadId':_0x4781a4},_0x5a780b=(await this['_httpService'][_0xb5aa14(0x115)]('/universer-api/comment/unit/'+_0x1bea6d+_0xb5aa14(0x144),{'body':_0x381699}))[_0xb5aa14(0x153)][_0xb5aa14(0x134)];return{..._0x5b06db,'id':_0x5a780b[_0xb5aa14(0x13f)],'dT':_0x2e89bc(+_0x5a780b[_0xb5aa14(0x13e)])[_0xb5aa14(0x11f)](_0xb5aa14(0x127)),'personId':_0x5a780b[_0xb5aa14(0x129)]};}else{const _0x4e65e3={'memberId':_0x488f3c,'unitId':_0x1bea6d,'content':_0x2a07ba,'mention':_0x4db24c},_0xb727bf=await this[_0xb5aa14(0x124)]['post']('/universer-api/comment/unit/'+_0x1bea6d+_0xb5aa14(0x12e),{'body':_0x4e65e3});return X(_0xb727bf[_0xb5aa14(0x153)][_0xb5aa14(0x119)],_0x5b06db);}}async[_0x338a3e(0x11c)](_0x14f34d){const _0x32c5d4=_0x338a3e;var _0x5df3a9,_0x506e1c;const {text:_0x49c043,unitId:_0x24b95f}=_0x14f34d,_0x42e7fa=(_0x506e1c=(_0x5df3a9=_0x49c043[_0x32c5d4(0x139)])==null?void 0x0:_0x5df3a9[_0x32c5d4(0x118)](_0x418b2d=>_0x418b2d[_0x32c5d4(0x14c)]===_0x265937[_0x32c5d4(0x155)])[_0x32c5d4(0x151)](_0x4c4660=>_0x4c4660['rangeId']))!=null?_0x506e1c:[],_0x4fe81d=JSON['stringify'](_0x49c043),_0x5e7004=_0x14f34d[_0x32c5d4(0x14d)],_0x337074=_0x14f34d['id'],_0x56bedd={'memberId':(await this[_0x32c5d4(0x13b)]['requireSession'](_0x24b95f))[_0x32c5d4(0x158)](),'unitId':_0x24b95f,'threadId':_0x5e7004,'mention':_0x42e7fa,'content':_0x4fe81d,'replyId':_0x337074},_0x1dbc8e=await this[_0x32c5d4(0x124)][_0x32c5d4(0x115)]('/universer-api/comment/unit/'+_0x24b95f+'/edit',{'body':_0x56bedd});return!_0x1dbc8e['body'][_0x32c5d4(0x104)]||_0x1dbc8e['body'][_0x32c5d4(0x104)][_0x32c5d4(0x120)]===0x1;}async[_0x338a3e(0x12d)](_0x3382c9){const _0x150cc7=_0x338a3e,{unitId:_0x141cbe}=_0x3382c9,_0x334650=_0x3382c9['threadId'],_0x104119={'memberId':this['_userService'][_0x150cc7(0x159)]()[_0x150cc7(0x14b)],'unitId':_0x141cbe,'threadId':_0x334650,'solved':_0x3382c9[_0x150cc7(0x143)]?I[_0x150cc7(0x14f)]:I[_0x150cc7(0x15d)]},_0x64487c=await this[_0x150cc7(0x124)][_0x150cc7(0x115)]('/universer-api/comment/unit/'+_0x141cbe+'/solved',{'body':_0x104119});return!_0x64487c['body'][_0x150cc7(0x104)]||_0x64487c[_0x150cc7(0x153)][_0x150cc7(0x104)]['code']===0x1;}async['deleteComment'](_0x536d8b,_0x3b1700,_0x2d620a,_0x489a84){const _0x451505=_0x338a3e,_0x4bda8c={'memberId':(await this[_0x451505(0x13b)][_0x451505(0x10a)](_0x536d8b))[_0x451505(0x158)](),'threadId':_0x2d620a,'replyId':_0x489a84,'unitId':_0x536d8b},_0x38a2b3=await this[_0x451505(0x124)][_0x451505(0x115)](_0x451505(0x148)+_0x536d8b+_0x451505(0x103),{'body':_0x4bda8c});return!_0x38a2b3[_0x451505(0x153)][_0x451505(0x104)]||_0x38a2b3[_0x451505(0x153)]['error']['code']===0x1;}async[_0x338a3e(0x132)](_0x1c8cac,_0x5481b0,_0x831ede){const _0x5f4a19=_0x338a3e,_0x10092c={'unitId':_0x1c8cac,'threadId':_0x831ede},_0x157b19=await this[_0x5f4a19(0x124)][_0x5f4a19(0x115)](_0x5f4a19(0x148)+_0x1c8cac+_0x5f4a19(0x117),{'body':_0x10092c}),_0x46485d=_0x831ede[_0x5f4a19(0x151)](_0x132065=>ee(_0x157b19['body']['comments'][_0x132065],_0x1c8cac,_0x5481b0))[_0x5f4a19(0x118)](Boolean);return Object['values'](_0x157b19['body']['users'])[_0x5f4a19(0x15c)](_0x211611=>{const _0x4d090c=_0x5f4a19;this[_0x4d090c(0x150)][_0x4d090c(0x149)](_0x211611);}),_0x46485d;}[_0x338a3e(0x106)](_0x212752){return{'id':_0x212752['id'],'threadId':_0x212752['threadId'],'ref':_0x212752['ref']};}};S=Q([b(0x0,_0x3dcfa0(_0x112d55)),b(0x1,_0x3dcfa0(_0x1fa847)),b(0x2,_0x3dcfa0(_0x2e0b26))],S);var re=Object[_0x338a3e(0x112)],te=(_0x18f331,_0x795dbf,_0x3e4002,_0x33eb0f)=>{const _0x35834a=_0x338a3e;for(var _0x51100e=_0x33eb0f>0x1?void 0x0:_0x33eb0f?re(_0x795dbf,_0x3e4002):_0x795dbf,_0x5e9855=_0x18f331[_0x35834a(0x131)]-0x1,_0x5aba81;_0x5e9855>=0x0;_0x5e9855--)(_0x5aba81=_0x18f331[_0x5e9855])&&(_0x51100e=_0x5aba81(_0x51100e)||_0x51100e);return _0x51100e;},M=(_0x918176,_0x219454)=>(_0x244624,_0x48c445)=>_0x219454(_0x244624,_0x48c445,_0x918176);let f=class extends _0x4d943a{constructor(_0x2a873,_0x1a6cad){const _0x397510=_0x338a3e;super(),this[_0x397510(0x105)]=_0x2a873,this[_0x397510(0x15b)]=_0x1a6cad,this[_0x397510(0x125)]();}['_initDataSource'](){const _0xa8573=_0x338a3e;this[_0xa8573(0x105)][_0xa8573(0x110)]=this[_0xa8573(0x15b)],this[_0xa8573(0x105)][_0xa8573(0xfa)]=!0x1;}};f=te([M(0x0,_0x4cbc34),M(0x1,_0x3dcfa0(S))],f);var se=Object[_0x338a3e(0x102)],oe=Object[_0x338a3e(0x112)],ne=(_0x181a5a,_0x7a7a70,_0x5cbeb5)=>_0x7a7a70 in _0x181a5a?se(_0x181a5a,_0x7a7a70,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5cbeb5}):_0x181a5a[_0x7a7a70]=_0x5cbeb5,ie=(_0x328dfb,_0x5df7d7,_0x2b461b,_0x477789)=>{const _0x375b10=_0x338a3e;for(var _0x45ddc3=_0x477789>0x1?void 0x0:_0x477789?oe(_0x5df7d7,_0x2b461b):_0x5df7d7,_0x42a7c5=_0x328dfb[_0x375b10(0x131)]-0x1,_0x12e377;_0x42a7c5>=0x0;_0x42a7c5--)(_0x12e377=_0x328dfb[_0x42a7c5])&&(_0x45ddc3=_0x12e377(_0x45ddc3)||_0x45ddc3);return _0x45ddc3;},N=(_0x1dffd5,_0x13cbd7)=>(_0x352a40,_0x2a90f9)=>_0x13cbd7(_0x352a40,_0x2a90f9,_0x1dffd5),$=(_0x3a438f,_0x9d9e30,_0x155efe)=>ne(_0x3a438f,typeof _0x9d9e30!=_0x338a3e(0x108)?_0x9d9e30+'':_0x9d9e30,_0x155efe);let g=class extends _0xc515d7{constructor(_0x44dd69=O,_0x9b157c,_0x3d048f){const _0xabcd55=_0x338a3e;super(),this[_0xabcd55(0x113)]=_0x44dd69,this[_0xabcd55(0x157)]=_0x9b157c,this['_configService']=_0x3d048f;const {..._0x4cb607}=_0xaa02ee({},O,this['_config']);this[_0xabcd55(0x137)][_0xabcd55(0x15e)](z,_0x4cb607);}['onStarting'](){const _0x26d32d=_0x338a3e;[[S],[f],[_]][_0x26d32d(0x15c)](_0x361d75=>{const _0x5b897a=_0x26d32d;this[_0x5b897a(0x157)][_0x5b897a(0x101)](_0x361d75);});}[_0x338a3e(0x142)](){const _0x48806f=_0x338a3e;this['_injector'][_0x48806f(0x10f)](f),this[_0x48806f(0x157)][_0x48806f(0x10f)](_);}};function _0x5a1c(_0x3f2a5f,_0x50d58e){const _0x5587d2=_0x5587();return _0x5a1c=function(_0x5a1c5f,_0x46e39a){_0x5a1c5f=_0x5a1c5f-0xfa;let _0xdaf486=_0x5587d2[_0x5a1c5f];return _0xdaf486;},_0x5a1c(_0x3f2a5f,_0x50d58e);}$(g,_0x338a3e(0x145),W),$(g,_0x338a3e(0x141),_0x2d50f1[_0x338a3e(0x107)]),g=ie([_0x266507(_0x3d6cdd,_0x5f22af,_0x1fa237),N(0x1,_0x3dcfa0(_0xac405f)),N(0x2,_0x108d43)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x48adec=_0x110e;(function(_0x512cd4,_0x53fbb0){const _0x30b997=_0x110e,_0x53e5d6=_0x512cd4();while(!![]){try{const _0x3be485=-parseInt(_0x30b997(0x177))/0x1+parseInt(_0x30b997(0x189))/0x2*(-parseInt(_0x30b997(0x173))/0x3)+-parseInt(_0x30b997(0x15b))/0x4+parseInt(_0x30b997(0x167))/0x5+-parseInt(_0x30b997(0x174))/0x6+parseInt(_0x30b997(0x15c))/0x7+parseInt(_0x30b997(0x16a))/0x8;if(_0x3be485===_0x53fbb0)break;else _0x53e5d6['push'](_0x53e5d6['shift']());}catch(_0x136989){_0x53e5d6['push'](_0x53e5d6['shift']());}}}(_0x4c9f,0x9caf0));import{CommentService as _0x4fbbbb,CollaborationSessionService as _0x3a373c,UniverCollaborationClientPlugin as _0x542fe2}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1cd485}from'@univerjs-pro/license';import{dayjs as _0x3e7d6e,UserManagerService as _0x39643a,Inject as _0x2b7fb0,Injector as _0x21ef67,Disposable as _0x274417,CustomRangeType as _0x3e7642,UniverInstanceType as _0x275ad0,DependentOn as _0x4f8b32,IConfigService as _0x1e3178,Plugin as _0x4c197b,merge as _0x4267fa}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3a8b74}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x106c35,IThreadCommentDataSourceService as _0x43ec35}from'@univerjs/thread-comment';import{bufferTime as _0x54fa14}from'rxjs';import{HTTPService as _0x448a56}from'@univerjs/network';const W=_0x48adec(0x16e);var I=(_0x17e3f0=>(_0x17e3f0[_0x17e3f0[_0x48adec(0x182)]=0x0]='OpenOrReOpen',_0x17e3f0[_0x17e3f0[_0x48adec(0x197)]=0x1]=_0x48adec(0x197),_0x17e3f0[_0x17e3f0[_0x48adec(0x169)]=-0x1]=_0x48adec(0x169),_0x17e3f0))(I||{}),v=(_0x2c3b88=>(_0x2c3b88[_0x2c3b88['Unknown']=0x0]='Unknown',_0x2c3b88[_0x2c3b88['Add']=0x1]='Add',_0x2c3b88[_0x2c3b88[_0x48adec(0x147)]=0x2]=_0x48adec(0x147),_0x2c3b88[_0x2c3b88[_0x48adec(0x160)]=0x3]=_0x48adec(0x160),_0x2c3b88[_0x2c3b88[_0x48adec(0x14e)]=0x4]='Delete',_0x2c3b88[_0x2c3b88[_0x48adec(0x196)]=0x5]='Solve',_0x2c3b88[_0x2c3b88[_0x48adec(0x169)]=-0x1]=_0x48adec(0x169),_0x2c3b88))(v||{});const y=_0x2d8b79=>_0x3e7d6e(new Date(+_0x2d8b79))[_0x48adec(0x179)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x42f994,_0x5b6040)=>{const _0x5725e7=_0x48adec,_0x23d1a8=_0x42f994['get'](_0x39643a),_0x226caa=_0x42f994['get'](_0x448a56);_0x5b6040[_0x5725e7(0x19d)](_0x21de49=>{const _0x433b13=_0x5725e7;_0x23d1a8[_0x433b13(0x17f)](_0x21de49)&&_0x5b6040['delete'](_0x21de49);}),_0x5b6040[_0x5725e7(0x198)]&&(await _0x226caa[_0x5725e7(0x199)](_0x5725e7(0x175),{'params':{'userIDs':[..._0x5b6040]}}))[_0x5725e7(0x176)][_0x5725e7(0x1a2)][_0x5725e7(0x19d)](_0x2f6a7b=>{const _0x178472=_0x5725e7;_0x2f6a7b&&_0x23d1a8[_0x178472(0x19f)](_0x2f6a7b);});};var K=Object[_0x48adec(0x171)],V=(_0x1461d8,_0x3d3968,_0x5b25e3,_0x33fa99)=>{const _0x5536f0=_0x48adec;for(var _0x3efa94=_0x33fa99>0x1?void 0x0:_0x33fa99?K(_0x3d3968,_0x5b25e3):_0x3d3968,_0x1bb2a3=_0x1461d8[_0x5536f0(0x19b)]-0x1,_0x438df4;_0x1bb2a3>=0x0;_0x1bb2a3--)(_0x438df4=_0x1461d8[_0x1bb2a3])&&(_0x3efa94=_0x438df4(_0x3efa94)||_0x3efa94);return _0x3efa94;},p=(_0x2a495d,_0x1f925c)=>(_0x2b40b7,_0x3cd1d5)=>_0x1f925c(_0x2b40b7,_0x3cd1d5,_0x2a495d);let _=class extends _0x274417{constructor(_0x57c853,_0x4b95d6,_0x216072,_0x3a7402){const _0x25755a=_0x48adec;super(),this[_0x25755a(0x14f)]=_0x57c853,this[_0x25755a(0x170)]=_0x4b95d6,this['_userService']=_0x216072,this[_0x25755a(0x16f)]=_0x3a7402,this[_0x25755a(0x187)](),this['_initUserSync']();}['_initUserSync'](){const _0x1f8308=_0x48adec;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x1f8308(0x15e)](_0x54fa14(0x10))['subscribe'](_0x588e44=>{const _0x499adb=_0x1f8308,_0x2ecb71=new Set();_0x588e44[_0x499adb(0x19d)](_0x36c054=>{const _0x35edf1=_0x499adb;switch(_0x36c054[_0x35edf1(0x18c)]){case _0x35edf1(0x15f):{const _0x5d4b55=_0x36c054[_0x35edf1(0x16b)]['personId'];_0x2ecb71['add'](_0x5d4b55);break;}}}),B(this[_0x499adb(0x16f)],_0x2ecb71);}));}[_0x48adec(0x187)](){const _0x11cc9c=_0x48adec;this[_0x11cc9c(0x17a)](this[_0x11cc9c(0x14f)][_0x11cc9c(0x155)][_0x11cc9c(0x194)](async _0x445c20=>{const _0x28092a=_0x11cc9c;var _0x315583,_0x517b99,_0x3dd92,_0x188098;const _0x3922ff=(_0x315583=this[_0x28092a(0x170)][_0x28092a(0x162)](_0x445c20['unitId'])[_0x28092a(0x1a0)](_0x504377=>_0x504377[_0x28092a(0x1a3)]===_0x445c20[_0x28092a(0x1a3)]))==null?void 0x0:_0x315583[_0x28092a(0x14a)];if(!_0x3922ff)return;const {unitId:_0x5376bb,subUnitId:_0x135b91}=_0x3922ff;switch(_0x445c20['user']&&this[_0x28092a(0x148)][_0x28092a(0x19f)](_0x445c20[_0x28092a(0x159)]),_0x445c20['type']){case v[_0x28092a(0x158)]:break;case v[_0x28092a(0x147)]:{this['_threadCommentModel'][_0x28092a(0x18a)](_0x5376bb,_0x135b91,{'unitId':_0x5376bb,'subUnitId':_0x135b91,'ref':'','id':_0x445c20[_0x28092a(0x151)],'dT':y(+_0x445c20[_0x28092a(0x15d)]),'threadId':_0x445c20[_0x28092a(0x1a3)],'personId':(_0x3dd92=(_0x517b99=_0x445c20['user'])==null?void 0x0:_0x517b99['userID'])!=null?_0x3dd92:_0x445c20[_0x28092a(0x188)],'text':JSON[_0x28092a(0x156)](_0x445c20[_0x28092a(0x172)]),'parentId':_0x3922ff['id']});break;}case v['Delete']:{const _0x293c53=this['_threadCommentModel'][_0x28092a(0x1a1)](_0x5376bb,_0x135b91,_0x445c20[_0x28092a(0x151)]);_0x293c53&&_0x293c53['parentId']&&this[_0x28092a(0x170)][_0x28092a(0x16c)](_0x5376bb,_0x135b91,_0x445c20[_0x28092a(0x151)]);break;}case v[_0x28092a(0x160)]:{this[_0x28092a(0x170)][_0x28092a(0x180)](_0x5376bb,_0x135b91,{'commentId':_0x445c20[_0x28092a(0x151)],'text':JSON[_0x28092a(0x156)](_0x445c20[_0x28092a(0x172)])});break;}case v[_0x28092a(0x196)]:{const _0x563930=(_0x188098=this['_threadCommentModel'][_0x28092a(0x162)](_0x445c20[_0x28092a(0x195)])[_0x28092a(0x1a0)](_0x5e015a=>_0x5e015a['threadId']===_0x445c20[_0x28092a(0x1a3)]))==null?void 0x0:_0x188098[_0x28092a(0x14a)];_0x563930&&this[_0x28092a(0x170)][_0x28092a(0x186)](_0x5376bb,_0x135b91,_0x563930['id'],_0x445c20[_0x28092a(0x191)]===I['Solved']);break;}}}));}};function _0x110e(_0x58bca,_0x50c825){const _0x4c9fea=_0x4c9f();return _0x110e=function(_0x110ee5,_0x54306a){_0x110ee5=_0x110ee5-0x147;let _0xe6558a=_0x4c9fea[_0x110ee5];return _0xe6558a;},_0x110e(_0x58bca,_0x50c825);}_=V([p(0x0,_0x2b7fb0(_0x4fbbbb)),p(0x1,_0x2b7fb0(_0x106c35)),p(0x2,_0x2b7fb0(_0x39643a)),p(0x3,_0x2b7fb0(_0x21ef67))],_);const z=_0x48adec(0x15a),O={};var k=Object[_0x48adec(0x171)],Q=(_0xac3178,_0x125aef,_0x4e1d1c,_0x45ba5b)=>{const _0x3573fc=_0x48adec;for(var _0x4b6ab0=_0x45ba5b>0x1?void 0x0:_0x45ba5b?k(_0x125aef,_0x4e1d1c):_0x125aef,_0x5b6cea=_0xac3178[_0x3573fc(0x19b)]-0x1,_0x598e40;_0x5b6cea>=0x0;_0x5b6cea--)(_0x598e40=_0xac3178[_0x5b6cea])&&(_0x4b6ab0=_0x598e40(_0x4b6ab0)||_0x4b6ab0);return _0x4b6ab0;},b=(_0x4cdaca,_0x329e5e)=>(_0x269a68,_0x162800)=>_0x329e5e(_0x269a68,_0x162800,_0x4cdaca);function X(_0x12184f,_0x515cb7){const _0x1dafd3=_0x48adec,_0x239333=_0x12184f[_0x1dafd3(0x14b)][0x0];return{..._0x515cb7,'id':_0x239333[_0x1dafd3(0x151)],'resolved':_0x12184f[_0x1dafd3(0x191)]===0x1,'dT':y(_0x239333[_0x1dafd3(0x15d)]),'personId':_0x239333[_0x1dafd3(0x188)],'threadId':_0x239333['threadId']};}function ee(_0x2966de,_0x13c98b,_0x53d6e4){const _0x3ca3d4=_0x48adec;var _0x4036b1,_0x28a8c4;if(((_0x28a8c4=(_0x4036b1=_0x2966de==null?void 0x0:_0x2966de[_0x3ca3d4(0x14b)])==null?void 0x0:_0x4036b1[_0x3ca3d4(0x19b)])!=null?_0x28a8c4:0x0)>0x0){const _0xa5bb15=(_0x5200a8,_0x4ad3e0)=>({'id':_0x5200a8[_0x3ca3d4(0x151)],'threadId':_0x5200a8[_0x3ca3d4(0x1a3)],'dT':y(_0x5200a8[_0x3ca3d4(0x15d)]),'personId':_0x5200a8[_0x3ca3d4(0x188)],'resolved':_0x2966de[_0x3ca3d4(0x191)]===I['Solved'],'unitId':_0x13c98b,'subUnitId':_0x53d6e4,'text':JSON[_0x3ca3d4(0x156)](_0x5200a8['content']),'parentId':_0x4ad3e0}),_0x1710a9=_0xa5bb15(_0x2966de['replies'][0x0]);return{..._0x1710a9,'children':_0x2966de[_0x3ca3d4(0x14b)][_0x3ca3d4(0x152)](0x1)[_0x3ca3d4(0x181)](_0x382878=>_0xa5bb15(_0x382878,_0x1710a9['id']))};}return null;}function _0x4c9f(){const _0x156489=['createTimestamp','pipe','add','Edit','symbol','getUnit','onReady','defineProperty','/add','post','4820640xAMSdt','getMemberID','UNRECOGNIZED','7952448MpAAEq','payload','deleteComment','_httpService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','_threadCommentModel','getOwnPropertyDescriptor','content','21lzmiOr','3028524udkfjt','/universer-api/user/list','body','857422GZvXLJ','/edit','format','disposeWithMe','onStarting','_sessionService','code','filter','getUser','updateComment','map','OpenOrReOpen','stringify','resolved','YYYY/MM/DD\x20HH:mm','resolveComment','_init','userId','50506TnmBZQ','addComment','comments','type','setConfig','_initDataSource','_configService','_threadCommentDataSourceService','solved','customRanges','rangeId','subscribe','unitId','Solve','Solved','size','get','COMMENT','length','comment','forEach','requireSession','addUser','find','getComment','users','threadId','Reply','_userService','rangeType','root','replies','/universer-api/comment/unit/','dataSource','Delete','_commentService','error','replyId','slice','values','saveCommentToSnapshot','commentUpdate$','parse','/solved','Add','user','thread-comment-data-source.config','3467216MGwWYy','7625401jQSKin'];_0x4c9f=function(){return _0x156489;};return _0x4c9f();}let S=class{constructor(_0x47cb97,_0xc18321,_0xfd51a1){const _0x4d3382=_0x48adec;this[_0x4d3382(0x16d)]=_0x47cb97,this[_0x4d3382(0x148)]=_0xc18321,this[_0x4d3382(0x17c)]=_0xfd51a1;}async[_0x48adec(0x18a)](_0x381fee){const _0x3639a0=_0x48adec;var _0x2d6db5,_0x58a9f7;const {parentId:_0x42e2d4,unitId:_0x52a6b0,text:_0x27c3ac,threadId:_0xca6043}=_0x381fee,_0x215c7a=(_0x58a9f7=(_0x2d6db5=_0x27c3ac[_0x3639a0(0x192)])==null?void 0x0:_0x2d6db5[_0x3639a0(0x17e)](_0x714043=>_0x714043[_0x3639a0(0x149)]===_0x3e7642[_0x3639a0(0x19a)])[_0x3639a0(0x181)](_0x49d69d=>_0x49d69d[_0x3639a0(0x193)]))!=null?_0x58a9f7:[],_0x112655=JSON[_0x3639a0(0x183)](_0x27c3ac),_0x2c222e=(await this['_sessionService']['requireSession'](_0x52a6b0))[_0x3639a0(0x168)]();if(_0x42e2d4){const _0x12c29c={'memberId':_0x2c222e,'unitId':_0x52a6b0,'content':_0x112655,'mention':_0x215c7a,'threadId':_0xca6043},_0x77f46=(await this[_0x3639a0(0x16d)][_0x3639a0(0x166)](_0x3639a0(0x14c)+_0x52a6b0+'/reply',{'body':_0x12c29c}))['body']['reply'];return{..._0x381fee,'id':_0x77f46[_0x3639a0(0x151)],'dT':_0x3e7d6e(+_0x77f46[_0x3639a0(0x15d)])['format'](_0x3639a0(0x185)),'personId':_0x77f46[_0x3639a0(0x188)]};}else{const _0x3112f0={'memberId':_0x2c222e,'unitId':_0x52a6b0,'content':_0x112655,'mention':_0x215c7a},_0x1d1f7a=await this[_0x3639a0(0x16d)]['post']('/universer-api/comment/unit/'+_0x52a6b0+_0x3639a0(0x165),{'body':_0x3112f0});return X(_0x1d1f7a[_0x3639a0(0x176)][_0x3639a0(0x19c)],_0x381fee);}}async['updateComment'](_0x1f841b){const _0x6dad84=_0x48adec;var _0x391d70,_0x2048af;const {text:_0x101eb6,unitId:_0x3e56c8}=_0x1f841b,_0x2b10fa=(_0x2048af=(_0x391d70=_0x101eb6['customRanges'])==null?void 0x0:_0x391d70[_0x6dad84(0x17e)](_0x24f515=>_0x24f515[_0x6dad84(0x149)]===_0x3e7642[_0x6dad84(0x19a)])[_0x6dad84(0x181)](_0x10dc30=>_0x10dc30[_0x6dad84(0x193)]))!=null?_0x2048af:[],_0x3f5dd3=JSON[_0x6dad84(0x183)](_0x101eb6),_0x20d790=_0x1f841b[_0x6dad84(0x1a3)],_0x2bff9a=_0x1f841b['id'],_0x1266bd={'memberId':(await this['_sessionService']['requireSession'](_0x3e56c8))['getMemberID'](),'unitId':_0x3e56c8,'threadId':_0x20d790,'mention':_0x2b10fa,'content':_0x3f5dd3,'replyId':_0x2bff9a},_0x41d163=await this[_0x6dad84(0x16d)][_0x6dad84(0x166)](_0x6dad84(0x14c)+_0x3e56c8+_0x6dad84(0x178),{'body':_0x1266bd});return!_0x41d163[_0x6dad84(0x176)][_0x6dad84(0x150)]||_0x41d163[_0x6dad84(0x176)]['error'][_0x6dad84(0x17d)]===0x1;}async[_0x48adec(0x186)](_0x1751d9){const _0x3b6a23=_0x48adec,{unitId:_0x376e7f}=_0x1751d9,_0x7019f2=_0x1751d9['threadId'],_0x184031={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x376e7f,'threadId':_0x7019f2,'solved':_0x1751d9[_0x3b6a23(0x184)]?I[_0x3b6a23(0x197)]:I[_0x3b6a23(0x182)]},_0x54fc1c=await this['_httpService'][_0x3b6a23(0x166)](_0x3b6a23(0x14c)+_0x376e7f+_0x3b6a23(0x157),{'body':_0x184031});return!_0x54fc1c[_0x3b6a23(0x176)][_0x3b6a23(0x150)]||_0x54fc1c[_0x3b6a23(0x176)]['error']['code']===0x1;}async[_0x48adec(0x16c)](_0x47c33b,_0x25efea,_0x2f238b,_0x5d24cf){const _0x3e5ce2=_0x48adec,_0x49a907={'memberId':(await this[_0x3e5ce2(0x17c)][_0x3e5ce2(0x19e)](_0x47c33b))[_0x3e5ce2(0x168)](),'threadId':_0x2f238b,'replyId':_0x5d24cf,'unitId':_0x47c33b},_0x4e5da4=await this['_httpService'][_0x3e5ce2(0x166)](_0x3e5ce2(0x14c)+_0x47c33b+'/delete',{'body':_0x49a907});return!_0x4e5da4[_0x3e5ce2(0x176)][_0x3e5ce2(0x150)]||_0x4e5da4['body']['error'][_0x3e5ce2(0x17d)]===0x1;}async['listComments'](_0x1fd226,_0x5d63e7,_0x859b81){const _0x40bded=_0x48adec,_0x44aee3={'unitId':_0x1fd226,'threadId':_0x859b81},_0x5f771f=await this['_httpService'][_0x40bded(0x166)]('/universer-api/comment/unit/'+_0x1fd226+'/list',{'body':_0x44aee3}),_0x5cb3a3=_0x859b81[_0x40bded(0x181)](_0x18b6e8=>ee(_0x5f771f[_0x40bded(0x176)][_0x40bded(0x18b)][_0x18b6e8],_0x1fd226,_0x5d63e7))[_0x40bded(0x17e)](Boolean);return Object[_0x40bded(0x153)](_0x5f771f[_0x40bded(0x176)][_0x40bded(0x1a2)])[_0x40bded(0x19d)](_0x1b37be=>{const _0x3a03e5=_0x40bded;this[_0x3a03e5(0x148)][_0x3a03e5(0x19f)](_0x1b37be);}),_0x5cb3a3;}[_0x48adec(0x154)](_0xf43c27){const _0x52d127=_0x48adec;return{'id':_0xf43c27['id'],'threadId':_0xf43c27[_0x52d127(0x1a3)],'ref':_0xf43c27['ref']};}};S=Q([b(0x0,_0x2b7fb0(_0x448a56)),b(0x1,_0x2b7fb0(_0x39643a)),b(0x2,_0x2b7fb0(_0x3a373c))],S);var re=Object[_0x48adec(0x171)],te=(_0x313d5f,_0x2d0374,_0xe96fec,_0x407950)=>{const _0x4a8f99=_0x48adec;for(var _0x37d9fb=_0x407950>0x1?void 0x0:_0x407950?re(_0x2d0374,_0xe96fec):_0x2d0374,_0x16d140=_0x313d5f[_0x4a8f99(0x19b)]-0x1,_0xbfffcd;_0x16d140>=0x0;_0x16d140--)(_0xbfffcd=_0x313d5f[_0x16d140])&&(_0x37d9fb=_0xbfffcd(_0x37d9fb)||_0x37d9fb);return _0x37d9fb;},M=(_0x41e3ab,_0x3b1625)=>(_0x8f812c,_0x3198e2)=>_0x3b1625(_0x8f812c,_0x3198e2,_0x41e3ab);let f=class extends _0x274417{constructor(_0x1fc0ec,_0x14e6ca){const _0x5acaff=_0x48adec;super(),this[_0x5acaff(0x190)]=_0x1fc0ec,this['_threadCommentDataSource']=_0x14e6ca,this['_initDataSource']();}[_0x48adec(0x18e)](){const _0x52e7e8=_0x48adec;this[_0x52e7e8(0x190)][_0x52e7e8(0x14d)]=this['_threadCommentDataSource'],this[_0x52e7e8(0x190)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x43ec35),M(0x1,_0x2b7fb0(S))],f);var se=Object[_0x48adec(0x164)],oe=Object[_0x48adec(0x171)],ne=(_0x484964,_0xfcb1af,_0xaadb2f)=>_0xfcb1af in _0x484964?se(_0x484964,_0xfcb1af,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xaadb2f}):_0x484964[_0xfcb1af]=_0xaadb2f,ie=(_0x97f438,_0x506f56,_0x575599,_0x38d795)=>{for(var _0x24d440=_0x38d795>0x1?void 0x0:_0x38d795?oe(_0x506f56,_0x575599):_0x506f56,_0x122e73=_0x97f438['length']-0x1,_0x5c42d3;_0x122e73>=0x0;_0x122e73--)(_0x5c42d3=_0x97f438[_0x122e73])&&(_0x24d440=_0x5c42d3(_0x24d440)||_0x24d440);return _0x24d440;},N=(_0x5e2bbc,_0x36451a)=>(_0x3d99da,_0x42790f)=>_0x36451a(_0x3d99da,_0x42790f,_0x5e2bbc),$=(_0x1d3623,_0x5d0d1a,_0x32ef4d)=>ne(_0x1d3623,typeof _0x5d0d1a!=_0x48adec(0x161)?_0x5d0d1a+'':_0x5d0d1a,_0x32ef4d);let g=class extends _0x4c197b{constructor(_0x4c018b=O,_0x2d379d,_0x16c43d){const _0x2a81b2=_0x48adec;super(),this['_config']=_0x4c018b,this['_injector']=_0x2d379d,this[_0x2a81b2(0x18f)]=_0x16c43d;const {..._0x5bfca6}=_0x4267fa({},O,this['_config']);this['_configService'][_0x2a81b2(0x18d)](z,_0x5bfca6);}[_0x48adec(0x17b)](){const _0x1e6f3f=_0x48adec;[[S],[f],[_]][_0x1e6f3f(0x19d)](_0xfce8a4=>{const _0x3aa938=_0x1e6f3f;this[_0x3aa938(0x16f)][_0x3aa938(0x15f)](_0xfce8a4);});}[_0x48adec(0x163)](){const _0x2097c7=_0x48adec;this[_0x2097c7(0x16f)][_0x2097c7(0x199)](f),this['_injector']['get'](_);}};$(g,'pluginName',W),$(g,_0x48adec(0x18c),_0x275ad0['UNIVER_UNKNOWN']),g=ie([_0x4f8b32(_0x3a8b74,_0x542fe2,_0x1cd485),N(0x1,_0x2b7fb0(_0x21ef67)),N(0x2,_0x1e3178)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x338a3e=_0x5a1c;(function(_0x421eef,_0x21576a){const _0x155f51=_0x5a1c,_0x1f40ca=_0x421eef();while(!![]){try{const _0x7a0bbb=-parseInt(_0x155f51(0x10b))/0x1*(-parseInt(_0x155f51(0x100))/0x2)+parseInt(_0x155f51(0x11b))/0x3+parseInt(_0x155f51(0x111))/0x4*(-parseInt(_0x155f51(0x14a))/0x5)+parseInt(_0x155f51(0x13a))/0x6+-parseInt(_0x155f51(0x156))/0x7+parseInt(_0x155f51(0x122))/0x8*(parseInt(_0x155f51(0x146))/0x9)+-parseInt(_0x155f51(0x12c))/0xa;if(_0x7a0bbb===_0x21576a)break;else _0x1f40ca['push'](_0x1f40ca['shift']());}catch(_0x2934f6){_0x1f40ca['push'](_0x1f40ca['shift']());}}}(_0x5587,0x4a60c));import{CommentService as _0x1def95,CollaborationSessionService as _0x2e0b26,UniverCollaborationClientPlugin as _0x5f22af}from'@univerjs-pro/collaboration-client';function _0x5587(){const _0x1ed97f=['add','defineProperty','/delete','error','_threadCommentDataSourceService','saveCommentToSnapshot','UNIVER_UNKNOWN','symbol','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','11ZMXMml','Reply','find','getUnit','get','dataSource','995772toOZkT','getOwnPropertyDescriptor','_config','Edit','post','users','/list','filter','comment','Delete','1028079AWGkrD','updateComment','_threadCommentModel','getComment','format','code','solved','8dHujXV','subscribe','_httpService','_initDataSource','slice','YYYY/MM/DD\x20HH:mm','pipe','userId','root','_initUserSync','5072660gWPFPJ','resolveComment','/add','content','unitId','length','listComments','rangeId','reply','commentUpdate$','_init','_configService','Solve','customRanges','920280DFVkgd','_sessionService','Add','delete','createTimestamp','replyId','user','type','onReady','resolved','/reply','pluginName','2690757eNPXGv','getUser','/universer-api/comment/unit/','addUser','5HIVOuH','userID','rangeType','threadId','addComment','Solved','_userService','map','parse','body','stringify','COMMENT','1820896gWeTNH','_injector','getMemberID','getCurrentUser','size','_threadCommentDataSource','forEach','OpenOrReOpen','setConfig','syncUpdateMutationToColla','parentId','deleteComment','_commentService','replies','UNRECOGNIZED','95626EdJvYz'];_0x5587=function(){return _0x1ed97f;};return _0x5587();}import{UniverLicensePlugin as _0x1fa237}from'@univerjs-pro/license';import{dayjs as _0x2e89bc,UserManagerService as _0x1fa847,Inject as _0x3dcfa0,Injector as _0xac405f,Disposable as _0x4d943a,CustomRangeType as _0x265937,UniverInstanceType as _0x2d50f1,DependentOn as _0x266507,IConfigService as _0x108d43,Plugin as _0xc515d7,merge as _0xaa02ee}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3d6cdd}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2cf2a9,IThreadCommentDataSourceService as _0x4cbc34}from'@univerjs/thread-comment';import{bufferTime as _0x4bb671}from'rxjs';import{HTTPService as _0x112d55}from'@univerjs/network';const W=_0x338a3e(0x109);var I=(_0x4500c7=>(_0x4500c7[_0x4500c7[_0x338a3e(0x15d)]=0x0]='OpenOrReOpen',_0x4500c7[_0x4500c7['Solved']=0x1]=_0x338a3e(0x14f),_0x4500c7[_0x4500c7[_0x338a3e(0xff)]=-0x1]=_0x338a3e(0xff),_0x4500c7))(I||{}),v=(_0x35e1fb=>(_0x35e1fb[_0x35e1fb['Unknown']=0x0]='Unknown',_0x35e1fb[_0x35e1fb[_0x338a3e(0x13c)]=0x1]=_0x338a3e(0x13c),_0x35e1fb[_0x35e1fb[_0x338a3e(0x10c)]=0x2]=_0x338a3e(0x10c),_0x35e1fb[_0x35e1fb[_0x338a3e(0x114)]=0x3]=_0x338a3e(0x114),_0x35e1fb[_0x35e1fb[_0x338a3e(0x11a)]=0x4]='Delete',_0x35e1fb[_0x35e1fb[_0x338a3e(0x138)]=0x5]=_0x338a3e(0x138),_0x35e1fb[_0x35e1fb[_0x338a3e(0xff)]=-0x1]=_0x338a3e(0xff),_0x35e1fb))(v||{});const y=_0x226e89=>_0x2e89bc(new Date(+_0x226e89))[_0x338a3e(0x11f)](_0x338a3e(0x127)),B=async(_0x378fa9,_0x142af3)=>{const _0x447adb=_0x338a3e,_0x182c3d=_0x378fa9[_0x447adb(0x10f)](_0x1fa847),_0x3c579b=_0x378fa9[_0x447adb(0x10f)](_0x112d55);_0x142af3[_0x447adb(0x15c)](_0x41b28e=>{const _0x5da1c3=_0x447adb;_0x182c3d[_0x5da1c3(0x147)](_0x41b28e)&&_0x142af3[_0x5da1c3(0x13d)](_0x41b28e);}),_0x142af3[_0x447adb(0x15a)]&&(await _0x3c579b['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x142af3]}}))['body'][_0x447adb(0x116)][_0x447adb(0x15c)](_0x56e572=>{const _0x56958b=_0x447adb;_0x56e572&&_0x182c3d[_0x56958b(0x149)](_0x56e572);});};var K=Object[_0x338a3e(0x112)],V=(_0x4f6e70,_0x1b3a77,_0x548a66,_0x26bec7)=>{const _0x114894=_0x338a3e;for(var _0x2dc9f9=_0x26bec7>0x1?void 0x0:_0x26bec7?K(_0x1b3a77,_0x548a66):_0x1b3a77,_0x23d12d=_0x4f6e70[_0x114894(0x131)]-0x1,_0x21d864;_0x23d12d>=0x0;_0x23d12d--)(_0x21d864=_0x4f6e70[_0x23d12d])&&(_0x2dc9f9=_0x21d864(_0x2dc9f9)||_0x2dc9f9);return _0x2dc9f9;},p=(_0x351c9a,_0x4ffbb4)=>(_0x21d346,_0x4064a0)=>_0x4ffbb4(_0x21d346,_0x4064a0,_0x351c9a);let _=class extends _0x4d943a{constructor(_0x297217,_0xf241f0,_0x16f3f2,_0x543ccf){const _0x15c834=_0x338a3e;super(),this[_0x15c834(0xfd)]=_0x297217,this[_0x15c834(0x11d)]=_0xf241f0,this['_userService']=_0x16f3f2,this['_injector']=_0x543ccf,this['_init'](),this[_0x15c834(0x12b)]();}[_0x338a3e(0x12b)](){const _0x82eccc=_0x338a3e;this['disposeWithMe'](this[_0x82eccc(0x11d)]['commentUpdate$'][_0x82eccc(0x128)](_0x4bb671(0x10))[_0x82eccc(0x123)](_0x56da90=>{const _0x5d7d54=_0x82eccc,_0x44e3ee=new Set();_0x56da90[_0x5d7d54(0x15c)](_0x538286=>{const _0x4fcb7e=_0x5d7d54;switch(_0x538286[_0x4fcb7e(0x141)]){case _0x4fcb7e(0x101):{const _0x1cbb31=_0x538286['payload']['personId'];_0x44e3ee[_0x4fcb7e(0x101)](_0x1cbb31);break;}}}),B(this['_injector'],_0x44e3ee);}));}[_0x338a3e(0x136)](){const _0xa4ead8=_0x338a3e;this['disposeWithMe'](this['_commentService'][_0xa4ead8(0x135)][_0xa4ead8(0x123)](async _0x3694f6=>{const _0xcd9c24=_0xa4ead8;var _0x1f5d51,_0x41643d,_0x15beaf,_0x40b714;const _0x3d802e=(_0x1f5d51=this[_0xcd9c24(0x11d)][_0xcd9c24(0x10e)](_0x3694f6[_0xcd9c24(0x130)])[_0xcd9c24(0x10d)](_0x25f61f=>_0x25f61f[_0xcd9c24(0x14d)]===_0x3694f6['threadId']))==null?void 0x0:_0x1f5d51[_0xcd9c24(0x12a)];if(!_0x3d802e)return;const {unitId:_0x1363a9,subUnitId:_0x42d716}=_0x3d802e;switch(_0x3694f6[_0xcd9c24(0x140)]&&this[_0xcd9c24(0x150)][_0xcd9c24(0x149)](_0x3694f6[_0xcd9c24(0x140)]),_0x3694f6['type']){case v['Add']:break;case v[_0xcd9c24(0x10c)]:{this[_0xcd9c24(0x11d)][_0xcd9c24(0x14e)](_0x1363a9,_0x42d716,{'unitId':_0x1363a9,'subUnitId':_0x42d716,'ref':'','id':_0x3694f6[_0xcd9c24(0x13f)],'dT':y(+_0x3694f6[_0xcd9c24(0x13e)]),'threadId':_0x3694f6[_0xcd9c24(0x14d)],'personId':(_0x15beaf=(_0x41643d=_0x3694f6['user'])==null?void 0x0:_0x41643d[_0xcd9c24(0x14b)])!=null?_0x15beaf:_0x3694f6[_0xcd9c24(0x129)],'text':JSON[_0xcd9c24(0x152)](_0x3694f6[_0xcd9c24(0x12f)]),'parentId':_0x3d802e['id']});break;}case v[_0xcd9c24(0x11a)]:{const _0x1224f1=this[_0xcd9c24(0x11d)][_0xcd9c24(0x11e)](_0x1363a9,_0x42d716,_0x3694f6[_0xcd9c24(0x13f)]);_0x1224f1&&_0x1224f1[_0xcd9c24(0xfb)]&&this[_0xcd9c24(0x11d)][_0xcd9c24(0xfc)](_0x1363a9,_0x42d716,_0x3694f6[_0xcd9c24(0x13f)]);break;}case v[_0xcd9c24(0x114)]:{this[_0xcd9c24(0x11d)][_0xcd9c24(0x11c)](_0x1363a9,_0x42d716,{'commentId':_0x3694f6['replyId'],'text':JSON[_0xcd9c24(0x152)](_0x3694f6[_0xcd9c24(0x12f)])});break;}case v[_0xcd9c24(0x138)]:{const _0x32af58=(_0x40b714=this[_0xcd9c24(0x11d)][_0xcd9c24(0x10e)](_0x3694f6[_0xcd9c24(0x130)])[_0xcd9c24(0x10d)](_0x5edea5=>_0x5edea5[_0xcd9c24(0x14d)]===_0x3694f6['threadId']))==null?void 0x0:_0x40b714[_0xcd9c24(0x12a)];_0x32af58&&this[_0xcd9c24(0x11d)]['resolveComment'](_0x1363a9,_0x42d716,_0x32af58['id'],_0x3694f6[_0xcd9c24(0x121)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x3dcfa0(_0x1def95)),p(0x1,_0x3dcfa0(_0x2cf2a9)),p(0x2,_0x3dcfa0(_0x1fa847)),p(0x3,_0x3dcfa0(_0xac405f))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x338a3e(0x112)],Q=(_0x5cffac,_0x9fdacf,_0x1fcf1f,_0x4ac5c6)=>{const _0x5d2aab=_0x338a3e;for(var _0x3ea5c6=_0x4ac5c6>0x1?void 0x0:_0x4ac5c6?k(_0x9fdacf,_0x1fcf1f):_0x9fdacf,_0x5a1a7d=_0x5cffac[_0x5d2aab(0x131)]-0x1,_0x4220eb;_0x5a1a7d>=0x0;_0x5a1a7d--)(_0x4220eb=_0x5cffac[_0x5a1a7d])&&(_0x3ea5c6=_0x4220eb(_0x3ea5c6)||_0x3ea5c6);return _0x3ea5c6;},b=(_0x9731cc,_0x4af6e8)=>(_0x510a8d,_0x2c6b36)=>_0x4af6e8(_0x510a8d,_0x2c6b36,_0x9731cc);function X(_0x2ccde8,_0x176d52){const _0x3a1a10=_0x338a3e,_0x19bf87=_0x2ccde8['replies'][0x0];return{..._0x176d52,'id':_0x19bf87[_0x3a1a10(0x13f)],'resolved':_0x2ccde8[_0x3a1a10(0x121)]===0x1,'dT':y(_0x19bf87[_0x3a1a10(0x13e)]),'personId':_0x19bf87[_0x3a1a10(0x129)],'threadId':_0x19bf87['threadId']};}function ee(_0x2a1ce0,_0x451b4b,_0x22e8dc){const _0x5e87f7=_0x338a3e;var _0x3777e1,_0x30a3dc;if(((_0x30a3dc=(_0x3777e1=_0x2a1ce0==null?void 0x0:_0x2a1ce0['replies'])==null?void 0x0:_0x3777e1[_0x5e87f7(0x131)])!=null?_0x30a3dc:0x0)>0x0){const _0x147947=(_0x4a85a1,_0x5bd59b)=>({'id':_0x4a85a1[_0x5e87f7(0x13f)],'threadId':_0x4a85a1['threadId'],'dT':y(_0x4a85a1[_0x5e87f7(0x13e)]),'personId':_0x4a85a1[_0x5e87f7(0x129)],'resolved':_0x2a1ce0['solved']===I[_0x5e87f7(0x14f)],'unitId':_0x451b4b,'subUnitId':_0x22e8dc,'text':JSON['parse'](_0x4a85a1[_0x5e87f7(0x12f)]),'parentId':_0x5bd59b}),_0x968d23=_0x147947(_0x2a1ce0[_0x5e87f7(0xfe)][0x0]);return{..._0x968d23,'children':_0x2a1ce0[_0x5e87f7(0xfe)][_0x5e87f7(0x126)](0x1)[_0x5e87f7(0x151)](_0x54641e=>_0x147947(_0x54641e,_0x968d23['id']))};}return null;}let S=class{constructor(_0x3e1357,_0x2ca5a6,_0x44dade){const _0x2f836e=_0x338a3e;this['_httpService']=_0x3e1357,this[_0x2f836e(0x150)]=_0x2ca5a6,this[_0x2f836e(0x13b)]=_0x44dade;}async[_0x338a3e(0x14e)](_0x5b06db){const _0xb5aa14=_0x338a3e;var _0x54f22d,_0x598e90;const {parentId:_0x40580b,unitId:_0x1bea6d,text:_0x8a6db2,threadId:_0x4781a4}=_0x5b06db,_0x4db24c=(_0x598e90=(_0x54f22d=_0x8a6db2['customRanges'])==null?void 0x0:_0x54f22d[_0xb5aa14(0x118)](_0x359dc5=>_0x359dc5['rangeType']===_0x265937[_0xb5aa14(0x155)])['map'](_0x1bf44b=>_0x1bf44b[_0xb5aa14(0x133)]))!=null?_0x598e90:[],_0x2a07ba=JSON[_0xb5aa14(0x154)](_0x8a6db2),_0x488f3c=(await this[_0xb5aa14(0x13b)][_0xb5aa14(0x10a)](_0x1bea6d))[_0xb5aa14(0x158)]();if(_0x40580b){const _0x381699={'memberId':_0x488f3c,'unitId':_0x1bea6d,'content':_0x2a07ba,'mention':_0x4db24c,'threadId':_0x4781a4},_0x5a780b=(await this['_httpService'][_0xb5aa14(0x115)]('/universer-api/comment/unit/'+_0x1bea6d+_0xb5aa14(0x144),{'body':_0x381699}))[_0xb5aa14(0x153)][_0xb5aa14(0x134)];return{..._0x5b06db,'id':_0x5a780b[_0xb5aa14(0x13f)],'dT':_0x2e89bc(+_0x5a780b[_0xb5aa14(0x13e)])[_0xb5aa14(0x11f)](_0xb5aa14(0x127)),'personId':_0x5a780b[_0xb5aa14(0x129)]};}else{const _0x4e65e3={'memberId':_0x488f3c,'unitId':_0x1bea6d,'content':_0x2a07ba,'mention':_0x4db24c},_0xb727bf=await this[_0xb5aa14(0x124)]['post']('/universer-api/comment/unit/'+_0x1bea6d+_0xb5aa14(0x12e),{'body':_0x4e65e3});return X(_0xb727bf[_0xb5aa14(0x153)][_0xb5aa14(0x119)],_0x5b06db);}}async[_0x338a3e(0x11c)](_0x14f34d){const _0x32c5d4=_0x338a3e;var _0x5df3a9,_0x506e1c;const {text:_0x49c043,unitId:_0x24b95f}=_0x14f34d,_0x42e7fa=(_0x506e1c=(_0x5df3a9=_0x49c043[_0x32c5d4(0x139)])==null?void 0x0:_0x5df3a9[_0x32c5d4(0x118)](_0x418b2d=>_0x418b2d[_0x32c5d4(0x14c)]===_0x265937[_0x32c5d4(0x155)])[_0x32c5d4(0x151)](_0x4c4660=>_0x4c4660['rangeId']))!=null?_0x506e1c:[],_0x4fe81d=JSON['stringify'](_0x49c043),_0x5e7004=_0x14f34d[_0x32c5d4(0x14d)],_0x337074=_0x14f34d['id'],_0x56bedd={'memberId':(await this[_0x32c5d4(0x13b)]['requireSession'](_0x24b95f))[_0x32c5d4(0x158)](),'unitId':_0x24b95f,'threadId':_0x5e7004,'mention':_0x42e7fa,'content':_0x4fe81d,'replyId':_0x337074},_0x1dbc8e=await this[_0x32c5d4(0x124)][_0x32c5d4(0x115)]('/universer-api/comment/unit/'+_0x24b95f+'/edit',{'body':_0x56bedd});return!_0x1dbc8e['body'][_0x32c5d4(0x104)]||_0x1dbc8e['body'][_0x32c5d4(0x104)][_0x32c5d4(0x120)]===0x1;}async[_0x338a3e(0x12d)](_0x3382c9){const _0x150cc7=_0x338a3e,{unitId:_0x141cbe}=_0x3382c9,_0x334650=_0x3382c9['threadId'],_0x104119={'memberId':this['_userService'][_0x150cc7(0x159)]()[_0x150cc7(0x14b)],'unitId':_0x141cbe,'threadId':_0x334650,'solved':_0x3382c9[_0x150cc7(0x143)]?I[_0x150cc7(0x14f)]:I[_0x150cc7(0x15d)]},_0x64487c=await this[_0x150cc7(0x124)][_0x150cc7(0x115)]('/universer-api/comment/unit/'+_0x141cbe+'/solved',{'body':_0x104119});return!_0x64487c['body'][_0x150cc7(0x104)]||_0x64487c[_0x150cc7(0x153)][_0x150cc7(0x104)]['code']===0x1;}async['deleteComment'](_0x536d8b,_0x3b1700,_0x2d620a,_0x489a84){const _0x451505=_0x338a3e,_0x4bda8c={'memberId':(await this[_0x451505(0x13b)][_0x451505(0x10a)](_0x536d8b))[_0x451505(0x158)](),'threadId':_0x2d620a,'replyId':_0x489a84,'unitId':_0x536d8b},_0x38a2b3=await this[_0x451505(0x124)][_0x451505(0x115)](_0x451505(0x148)+_0x536d8b+_0x451505(0x103),{'body':_0x4bda8c});return!_0x38a2b3[_0x451505(0x153)][_0x451505(0x104)]||_0x38a2b3[_0x451505(0x153)]['error']['code']===0x1;}async[_0x338a3e(0x132)](_0x1c8cac,_0x5481b0,_0x831ede){const _0x5f4a19=_0x338a3e,_0x10092c={'unitId':_0x1c8cac,'threadId':_0x831ede},_0x157b19=await this[_0x5f4a19(0x124)][_0x5f4a19(0x115)](_0x5f4a19(0x148)+_0x1c8cac+_0x5f4a19(0x117),{'body':_0x10092c}),_0x46485d=_0x831ede[_0x5f4a19(0x151)](_0x132065=>ee(_0x157b19['body']['comments'][_0x132065],_0x1c8cac,_0x5481b0))[_0x5f4a19(0x118)](Boolean);return Object['values'](_0x157b19['body']['users'])[_0x5f4a19(0x15c)](_0x211611=>{const _0x4d090c=_0x5f4a19;this[_0x4d090c(0x150)][_0x4d090c(0x149)](_0x211611);}),_0x46485d;}[_0x338a3e(0x106)](_0x212752){return{'id':_0x212752['id'],'threadId':_0x212752['threadId'],'ref':_0x212752['ref']};}};S=Q([b(0x0,_0x3dcfa0(_0x112d55)),b(0x1,_0x3dcfa0(_0x1fa847)),b(0x2,_0x3dcfa0(_0x2e0b26))],S);var re=Object[_0x338a3e(0x112)],te=(_0x18f331,_0x795dbf,_0x3e4002,_0x33eb0f)=>{const _0x35834a=_0x338a3e;for(var _0x51100e=_0x33eb0f>0x1?void 0x0:_0x33eb0f?re(_0x795dbf,_0x3e4002):_0x795dbf,_0x5e9855=_0x18f331[_0x35834a(0x131)]-0x1,_0x5aba81;_0x5e9855>=0x0;_0x5e9855--)(_0x5aba81=_0x18f331[_0x5e9855])&&(_0x51100e=_0x5aba81(_0x51100e)||_0x51100e);return _0x51100e;},M=(_0x918176,_0x219454)=>(_0x244624,_0x48c445)=>_0x219454(_0x244624,_0x48c445,_0x918176);let f=class extends _0x4d943a{constructor(_0x2a873,_0x1a6cad){const _0x397510=_0x338a3e;super(),this[_0x397510(0x105)]=_0x2a873,this[_0x397510(0x15b)]=_0x1a6cad,this[_0x397510(0x125)]();}['_initDataSource'](){const _0xa8573=_0x338a3e;this[_0xa8573(0x105)][_0xa8573(0x110)]=this[_0xa8573(0x15b)],this[_0xa8573(0x105)][_0xa8573(0xfa)]=!0x1;}};f=te([M(0x0,_0x4cbc34),M(0x1,_0x3dcfa0(S))],f);var se=Object[_0x338a3e(0x102)],oe=Object[_0x338a3e(0x112)],ne=(_0x181a5a,_0x7a7a70,_0x5cbeb5)=>_0x7a7a70 in _0x181a5a?se(_0x181a5a,_0x7a7a70,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5cbeb5}):_0x181a5a[_0x7a7a70]=_0x5cbeb5,ie=(_0x328dfb,_0x5df7d7,_0x2b461b,_0x477789)=>{const _0x375b10=_0x338a3e;for(var _0x45ddc3=_0x477789>0x1?void 0x0:_0x477789?oe(_0x5df7d7,_0x2b461b):_0x5df7d7,_0x42a7c5=_0x328dfb[_0x375b10(0x131)]-0x1,_0x12e377;_0x42a7c5>=0x0;_0x42a7c5--)(_0x12e377=_0x328dfb[_0x42a7c5])&&(_0x45ddc3=_0x12e377(_0x45ddc3)||_0x45ddc3);return _0x45ddc3;},N=(_0x1dffd5,_0x13cbd7)=>(_0x352a40,_0x2a90f9)=>_0x13cbd7(_0x352a40,_0x2a90f9,_0x1dffd5),$=(_0x3a438f,_0x9d9e30,_0x155efe)=>ne(_0x3a438f,typeof _0x9d9e30!=_0x338a3e(0x108)?_0x9d9e30+'':_0x9d9e30,_0x155efe);let g=class extends _0xc515d7{constructor(_0x44dd69=O,_0x9b157c,_0x3d048f){const _0xabcd55=_0x338a3e;super(),this[_0xabcd55(0x113)]=_0x44dd69,this[_0xabcd55(0x157)]=_0x9b157c,this['_configService']=_0x3d048f;const {..._0x4cb607}=_0xaa02ee({},O,this['_config']);this[_0xabcd55(0x137)][_0xabcd55(0x15e)](z,_0x4cb607);}['onStarting'](){const _0x26d32d=_0x338a3e;[[S],[f],[_]][_0x26d32d(0x15c)](_0x361d75=>{const _0x5b897a=_0x26d32d;this[_0x5b897a(0x157)][_0x5b897a(0x101)](_0x361d75);});}[_0x338a3e(0x142)](){const _0x48806f=_0x338a3e;this['_injector'][_0x48806f(0x10f)](f),this[_0x48806f(0x157)][_0x48806f(0x10f)](_);}};function _0x5a1c(_0x3f2a5f,_0x50d58e){const _0x5587d2=_0x5587();return _0x5a1c=function(_0x5a1c5f,_0x46e39a){_0x5a1c5f=_0x5a1c5f-0xfa;let _0xdaf486=_0x5587d2[_0x5a1c5f];return _0xdaf486;},_0x5a1c(_0x3f2a5f,_0x50d58e);}$(g,_0x338a3e(0x145),W),$(g,_0x338a3e(0x141),_0x2d50f1[_0x338a3e(0x107)]),g=ie([_0x266507(_0x3d6cdd,_0x5f22af,_0x1fa237),N(0x1,_0x3dcfa0(_0xac405f)),N(0x2,_0x108d43)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x48adec=_0x110e;(function(_0x512cd4,_0x53fbb0){const _0x30b997=_0x110e,_0x53e5d6=_0x512cd4();while(!![]){try{const _0x3be485=-parseInt(_0x30b997(0x177))/0x1+parseInt(_0x30b997(0x189))/0x2*(-parseInt(_0x30b997(0x173))/0x3)+-parseInt(_0x30b997(0x15b))/0x4+parseInt(_0x30b997(0x167))/0x5+-parseInt(_0x30b997(0x174))/0x6+parseInt(_0x30b997(0x15c))/0x7+parseInt(_0x30b997(0x16a))/0x8;if(_0x3be485===_0x53fbb0)break;else _0x53e5d6['push'](_0x53e5d6['shift']());}catch(_0x136989){_0x53e5d6['push'](_0x53e5d6['shift']());}}}(_0x4c9f,0x9caf0));import{CommentService as _0x4fbbbb,CollaborationSessionService as _0x3a373c,UniverCollaborationClientPlugin as _0x542fe2}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1cd485}from'@univerjs-pro/license';import{dayjs as _0x3e7d6e,UserManagerService as _0x39643a,Inject as _0x2b7fb0,Injector as _0x21ef67,Disposable as _0x274417,CustomRangeType as _0x3e7642,UniverInstanceType as _0x275ad0,DependentOn as _0x4f8b32,IConfigService as _0x1e3178,Plugin as _0x4c197b,merge as _0x4267fa}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3a8b74}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x106c35,IThreadCommentDataSourceService as _0x43ec35}from'@univerjs/thread-comment';import{bufferTime as _0x54fa14}from'rxjs';import{HTTPService as _0x448a56}from'@univerjs/network';const W=_0x48adec(0x16e);var I=(_0x17e3f0=>(_0x17e3f0[_0x17e3f0[_0x48adec(0x182)]=0x0]='OpenOrReOpen',_0x17e3f0[_0x17e3f0[_0x48adec(0x197)]=0x1]=_0x48adec(0x197),_0x17e3f0[_0x17e3f0[_0x48adec(0x169)]=-0x1]=_0x48adec(0x169),_0x17e3f0))(I||{}),v=(_0x2c3b88=>(_0x2c3b88[_0x2c3b88['Unknown']=0x0]='Unknown',_0x2c3b88[_0x2c3b88['Add']=0x1]='Add',_0x2c3b88[_0x2c3b88[_0x48adec(0x147)]=0x2]=_0x48adec(0x147),_0x2c3b88[_0x2c3b88[_0x48adec(0x160)]=0x3]=_0x48adec(0x160),_0x2c3b88[_0x2c3b88[_0x48adec(0x14e)]=0x4]='Delete',_0x2c3b88[_0x2c3b88[_0x48adec(0x196)]=0x5]='Solve',_0x2c3b88[_0x2c3b88[_0x48adec(0x169)]=-0x1]=_0x48adec(0x169),_0x2c3b88))(v||{});const y=_0x2d8b79=>_0x3e7d6e(new Date(+_0x2d8b79))[_0x48adec(0x179)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x42f994,_0x5b6040)=>{const _0x5725e7=_0x48adec,_0x23d1a8=_0x42f994['get'](_0x39643a),_0x226caa=_0x42f994['get'](_0x448a56);_0x5b6040[_0x5725e7(0x19d)](_0x21de49=>{const _0x433b13=_0x5725e7;_0x23d1a8[_0x433b13(0x17f)](_0x21de49)&&_0x5b6040['delete'](_0x21de49);}),_0x5b6040[_0x5725e7(0x198)]&&(await _0x226caa[_0x5725e7(0x199)](_0x5725e7(0x175),{'params':{'userIDs':[..._0x5b6040]}}))[_0x5725e7(0x176)][_0x5725e7(0x1a2)][_0x5725e7(0x19d)](_0x2f6a7b=>{const _0x178472=_0x5725e7;_0x2f6a7b&&_0x23d1a8[_0x178472(0x19f)](_0x2f6a7b);});};var K=Object[_0x48adec(0x171)],V=(_0x1461d8,_0x3d3968,_0x5b25e3,_0x33fa99)=>{const _0x5536f0=_0x48adec;for(var _0x3efa94=_0x33fa99>0x1?void 0x0:_0x33fa99?K(_0x3d3968,_0x5b25e3):_0x3d3968,_0x1bb2a3=_0x1461d8[_0x5536f0(0x19b)]-0x1,_0x438df4;_0x1bb2a3>=0x0;_0x1bb2a3--)(_0x438df4=_0x1461d8[_0x1bb2a3])&&(_0x3efa94=_0x438df4(_0x3efa94)||_0x3efa94);return _0x3efa94;},p=(_0x2a495d,_0x1f925c)=>(_0x2b40b7,_0x3cd1d5)=>_0x1f925c(_0x2b40b7,_0x3cd1d5,_0x2a495d);let _=class extends _0x274417{constructor(_0x57c853,_0x4b95d6,_0x216072,_0x3a7402){const _0x25755a=_0x48adec;super(),this[_0x25755a(0x14f)]=_0x57c853,this[_0x25755a(0x170)]=_0x4b95d6,this['_userService']=_0x216072,this[_0x25755a(0x16f)]=_0x3a7402,this[_0x25755a(0x187)](),this['_initUserSync']();}['_initUserSync'](){const _0x1f8308=_0x48adec;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x1f8308(0x15e)](_0x54fa14(0x10))['subscribe'](_0x588e44=>{const _0x499adb=_0x1f8308,_0x2ecb71=new Set();_0x588e44[_0x499adb(0x19d)](_0x36c054=>{const _0x35edf1=_0x499adb;switch(_0x36c054[_0x35edf1(0x18c)]){case _0x35edf1(0x15f):{const _0x5d4b55=_0x36c054[_0x35edf1(0x16b)]['personId'];_0x2ecb71['add'](_0x5d4b55);break;}}}),B(this[_0x499adb(0x16f)],_0x2ecb71);}));}[_0x48adec(0x187)](){const _0x11cc9c=_0x48adec;this[_0x11cc9c(0x17a)](this[_0x11cc9c(0x14f)][_0x11cc9c(0x155)][_0x11cc9c(0x194)](async _0x445c20=>{const _0x28092a=_0x11cc9c;var _0x315583,_0x517b99,_0x3dd92,_0x188098;const _0x3922ff=(_0x315583=this[_0x28092a(0x170)][_0x28092a(0x162)](_0x445c20['unitId'])[_0x28092a(0x1a0)](_0x504377=>_0x504377[_0x28092a(0x1a3)]===_0x445c20[_0x28092a(0x1a3)]))==null?void 0x0:_0x315583[_0x28092a(0x14a)];if(!_0x3922ff)return;const {unitId:_0x5376bb,subUnitId:_0x135b91}=_0x3922ff;switch(_0x445c20['user']&&this[_0x28092a(0x148)][_0x28092a(0x19f)](_0x445c20[_0x28092a(0x159)]),_0x445c20['type']){case v[_0x28092a(0x158)]:break;case v[_0x28092a(0x147)]:{this['_threadCommentModel'][_0x28092a(0x18a)](_0x5376bb,_0x135b91,{'unitId':_0x5376bb,'subUnitId':_0x135b91,'ref':'','id':_0x445c20[_0x28092a(0x151)],'dT':y(+_0x445c20[_0x28092a(0x15d)]),'threadId':_0x445c20[_0x28092a(0x1a3)],'personId':(_0x3dd92=(_0x517b99=_0x445c20['user'])==null?void 0x0:_0x517b99['userID'])!=null?_0x3dd92:_0x445c20[_0x28092a(0x188)],'text':JSON[_0x28092a(0x156)](_0x445c20[_0x28092a(0x172)]),'parentId':_0x3922ff['id']});break;}case v['Delete']:{const _0x293c53=this['_threadCommentModel'][_0x28092a(0x1a1)](_0x5376bb,_0x135b91,_0x445c20[_0x28092a(0x151)]);_0x293c53&&_0x293c53['parentId']&&this[_0x28092a(0x170)][_0x28092a(0x16c)](_0x5376bb,_0x135b91,_0x445c20[_0x28092a(0x151)]);break;}case v[_0x28092a(0x160)]:{this[_0x28092a(0x170)][_0x28092a(0x180)](_0x5376bb,_0x135b91,{'commentId':_0x445c20[_0x28092a(0x151)],'text':JSON[_0x28092a(0x156)](_0x445c20[_0x28092a(0x172)])});break;}case v[_0x28092a(0x196)]:{const _0x563930=(_0x188098=this['_threadCommentModel'][_0x28092a(0x162)](_0x445c20[_0x28092a(0x195)])[_0x28092a(0x1a0)](_0x5e015a=>_0x5e015a['threadId']===_0x445c20[_0x28092a(0x1a3)]))==null?void 0x0:_0x188098[_0x28092a(0x14a)];_0x563930&&this[_0x28092a(0x170)][_0x28092a(0x186)](_0x5376bb,_0x135b91,_0x563930['id'],_0x445c20[_0x28092a(0x191)]===I['Solved']);break;}}}));}};function _0x110e(_0x58bca,_0x50c825){const _0x4c9fea=_0x4c9f();return _0x110e=function(_0x110ee5,_0x54306a){_0x110ee5=_0x110ee5-0x147;let _0xe6558a=_0x4c9fea[_0x110ee5];return _0xe6558a;},_0x110e(_0x58bca,_0x50c825);}_=V([p(0x0,_0x2b7fb0(_0x4fbbbb)),p(0x1,_0x2b7fb0(_0x106c35)),p(0x2,_0x2b7fb0(_0x39643a)),p(0x3,_0x2b7fb0(_0x21ef67))],_);const z=_0x48adec(0x15a),O={};var k=Object[_0x48adec(0x171)],Q=(_0xac3178,_0x125aef,_0x4e1d1c,_0x45ba5b)=>{const _0x3573fc=_0x48adec;for(var _0x4b6ab0=_0x45ba5b>0x1?void 0x0:_0x45ba5b?k(_0x125aef,_0x4e1d1c):_0x125aef,_0x5b6cea=_0xac3178[_0x3573fc(0x19b)]-0x1,_0x598e40;_0x5b6cea>=0x0;_0x5b6cea--)(_0x598e40=_0xac3178[_0x5b6cea])&&(_0x4b6ab0=_0x598e40(_0x4b6ab0)||_0x4b6ab0);return _0x4b6ab0;},b=(_0x4cdaca,_0x329e5e)=>(_0x269a68,_0x162800)=>_0x329e5e(_0x269a68,_0x162800,_0x4cdaca);function X(_0x12184f,_0x515cb7){const _0x1dafd3=_0x48adec,_0x239333=_0x12184f[_0x1dafd3(0x14b)][0x0];return{..._0x515cb7,'id':_0x239333[_0x1dafd3(0x151)],'resolved':_0x12184f[_0x1dafd3(0x191)]===0x1,'dT':y(_0x239333[_0x1dafd3(0x15d)]),'personId':_0x239333[_0x1dafd3(0x188)],'threadId':_0x239333['threadId']};}function ee(_0x2966de,_0x13c98b,_0x53d6e4){const _0x3ca3d4=_0x48adec;var _0x4036b1,_0x28a8c4;if(((_0x28a8c4=(_0x4036b1=_0x2966de==null?void 0x0:_0x2966de[_0x3ca3d4(0x14b)])==null?void 0x0:_0x4036b1[_0x3ca3d4(0x19b)])!=null?_0x28a8c4:0x0)>0x0){const _0xa5bb15=(_0x5200a8,_0x4ad3e0)=>({'id':_0x5200a8[_0x3ca3d4(0x151)],'threadId':_0x5200a8[_0x3ca3d4(0x1a3)],'dT':y(_0x5200a8[_0x3ca3d4(0x15d)]),'personId':_0x5200a8[_0x3ca3d4(0x188)],'resolved':_0x2966de[_0x3ca3d4(0x191)]===I['Solved'],'unitId':_0x13c98b,'subUnitId':_0x53d6e4,'text':JSON[_0x3ca3d4(0x156)](_0x5200a8['content']),'parentId':_0x4ad3e0}),_0x1710a9=_0xa5bb15(_0x2966de['replies'][0x0]);return{..._0x1710a9,'children':_0x2966de[_0x3ca3d4(0x14b)][_0x3ca3d4(0x152)](0x1)[_0x3ca3d4(0x181)](_0x382878=>_0xa5bb15(_0x382878,_0x1710a9['id']))};}return null;}function _0x4c9f(){const _0x156489=['createTimestamp','pipe','add','Edit','symbol','getUnit','onReady','defineProperty','/add','post','4820640xAMSdt','getMemberID','UNRECOGNIZED','7952448MpAAEq','payload','deleteComment','_httpService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','_threadCommentModel','getOwnPropertyDescriptor','content','21lzmiOr','3028524udkfjt','/universer-api/user/list','body','857422GZvXLJ','/edit','format','disposeWithMe','onStarting','_sessionService','code','filter','getUser','updateComment','map','OpenOrReOpen','stringify','resolved','YYYY/MM/DD\x20HH:mm','resolveComment','_init','userId','50506TnmBZQ','addComment','comments','type','setConfig','_initDataSource','_configService','_threadCommentDataSourceService','solved','customRanges','rangeId','subscribe','unitId','Solve','Solved','size','get','COMMENT','length','comment','forEach','requireSession','addUser','find','getComment','users','threadId','Reply','_userService','rangeType','root','replies','/universer-api/comment/unit/','dataSource','Delete','_commentService','error','replyId','slice','values','saveCommentToSnapshot','commentUpdate$','parse','/solved','Add','user','thread-comment-data-source.config','3467216MGwWYy','7625401jQSKin'];_0x4c9f=function(){return _0x156489;};return _0x4c9f();}let S=class{constructor(_0x47cb97,_0xc18321,_0xfd51a1){const _0x4d3382=_0x48adec;this[_0x4d3382(0x16d)]=_0x47cb97,this[_0x4d3382(0x148)]=_0xc18321,this[_0x4d3382(0x17c)]=_0xfd51a1;}async[_0x48adec(0x18a)](_0x381fee){const _0x3639a0=_0x48adec;var _0x2d6db5,_0x58a9f7;const {parentId:_0x42e2d4,unitId:_0x52a6b0,text:_0x27c3ac,threadId:_0xca6043}=_0x381fee,_0x215c7a=(_0x58a9f7=(_0x2d6db5=_0x27c3ac[_0x3639a0(0x192)])==null?void 0x0:_0x2d6db5[_0x3639a0(0x17e)](_0x714043=>_0x714043[_0x3639a0(0x149)]===_0x3e7642[_0x3639a0(0x19a)])[_0x3639a0(0x181)](_0x49d69d=>_0x49d69d[_0x3639a0(0x193)]))!=null?_0x58a9f7:[],_0x112655=JSON[_0x3639a0(0x183)](_0x27c3ac),_0x2c222e=(await this['_sessionService']['requireSession'](_0x52a6b0))[_0x3639a0(0x168)]();if(_0x42e2d4){const _0x12c29c={'memberId':_0x2c222e,'unitId':_0x52a6b0,'content':_0x112655,'mention':_0x215c7a,'threadId':_0xca6043},_0x77f46=(await this[_0x3639a0(0x16d)][_0x3639a0(0x166)](_0x3639a0(0x14c)+_0x52a6b0+'/reply',{'body':_0x12c29c}))['body']['reply'];return{..._0x381fee,'id':_0x77f46[_0x3639a0(0x151)],'dT':_0x3e7d6e(+_0x77f46[_0x3639a0(0x15d)])['format'](_0x3639a0(0x185)),'personId':_0x77f46[_0x3639a0(0x188)]};}else{const _0x3112f0={'memberId':_0x2c222e,'unitId':_0x52a6b0,'content':_0x112655,'mention':_0x215c7a},_0x1d1f7a=await this[_0x3639a0(0x16d)]['post']('/universer-api/comment/unit/'+_0x52a6b0+_0x3639a0(0x165),{'body':_0x3112f0});return X(_0x1d1f7a[_0x3639a0(0x176)][_0x3639a0(0x19c)],_0x381fee);}}async['updateComment'](_0x1f841b){const _0x6dad84=_0x48adec;var _0x391d70,_0x2048af;const {text:_0x101eb6,unitId:_0x3e56c8}=_0x1f841b,_0x2b10fa=(_0x2048af=(_0x391d70=_0x101eb6['customRanges'])==null?void 0x0:_0x391d70[_0x6dad84(0x17e)](_0x24f515=>_0x24f515[_0x6dad84(0x149)]===_0x3e7642[_0x6dad84(0x19a)])[_0x6dad84(0x181)](_0x10dc30=>_0x10dc30[_0x6dad84(0x193)]))!=null?_0x2048af:[],_0x3f5dd3=JSON[_0x6dad84(0x183)](_0x101eb6),_0x20d790=_0x1f841b[_0x6dad84(0x1a3)],_0x2bff9a=_0x1f841b['id'],_0x1266bd={'memberId':(await this['_sessionService']['requireSession'](_0x3e56c8))['getMemberID'](),'unitId':_0x3e56c8,'threadId':_0x20d790,'mention':_0x2b10fa,'content':_0x3f5dd3,'replyId':_0x2bff9a},_0x41d163=await this[_0x6dad84(0x16d)][_0x6dad84(0x166)](_0x6dad84(0x14c)+_0x3e56c8+_0x6dad84(0x178),{'body':_0x1266bd});return!_0x41d163[_0x6dad84(0x176)][_0x6dad84(0x150)]||_0x41d163[_0x6dad84(0x176)]['error'][_0x6dad84(0x17d)]===0x1;}async[_0x48adec(0x186)](_0x1751d9){const _0x3b6a23=_0x48adec,{unitId:_0x376e7f}=_0x1751d9,_0x7019f2=_0x1751d9['threadId'],_0x184031={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x376e7f,'threadId':_0x7019f2,'solved':_0x1751d9[_0x3b6a23(0x184)]?I[_0x3b6a23(0x197)]:I[_0x3b6a23(0x182)]},_0x54fc1c=await this['_httpService'][_0x3b6a23(0x166)](_0x3b6a23(0x14c)+_0x376e7f+_0x3b6a23(0x157),{'body':_0x184031});return!_0x54fc1c[_0x3b6a23(0x176)][_0x3b6a23(0x150)]||_0x54fc1c[_0x3b6a23(0x176)]['error']['code']===0x1;}async[_0x48adec(0x16c)](_0x47c33b,_0x25efea,_0x2f238b,_0x5d24cf){const _0x3e5ce2=_0x48adec,_0x49a907={'memberId':(await this[_0x3e5ce2(0x17c)][_0x3e5ce2(0x19e)](_0x47c33b))[_0x3e5ce2(0x168)](),'threadId':_0x2f238b,'replyId':_0x5d24cf,'unitId':_0x47c33b},_0x4e5da4=await this['_httpService'][_0x3e5ce2(0x166)](_0x3e5ce2(0x14c)+_0x47c33b+'/delete',{'body':_0x49a907});return!_0x4e5da4[_0x3e5ce2(0x176)][_0x3e5ce2(0x150)]||_0x4e5da4['body']['error'][_0x3e5ce2(0x17d)]===0x1;}async['listComments'](_0x1fd226,_0x5d63e7,_0x859b81){const _0x40bded=_0x48adec,_0x44aee3={'unitId':_0x1fd226,'threadId':_0x859b81},_0x5f771f=await this['_httpService'][_0x40bded(0x166)]('/universer-api/comment/unit/'+_0x1fd226+'/list',{'body':_0x44aee3}),_0x5cb3a3=_0x859b81[_0x40bded(0x181)](_0x18b6e8=>ee(_0x5f771f[_0x40bded(0x176)][_0x40bded(0x18b)][_0x18b6e8],_0x1fd226,_0x5d63e7))[_0x40bded(0x17e)](Boolean);return Object[_0x40bded(0x153)](_0x5f771f[_0x40bded(0x176)][_0x40bded(0x1a2)])[_0x40bded(0x19d)](_0x1b37be=>{const _0x3a03e5=_0x40bded;this[_0x3a03e5(0x148)][_0x3a03e5(0x19f)](_0x1b37be);}),_0x5cb3a3;}[_0x48adec(0x154)](_0xf43c27){const _0x52d127=_0x48adec;return{'id':_0xf43c27['id'],'threadId':_0xf43c27[_0x52d127(0x1a3)],'ref':_0xf43c27['ref']};}};S=Q([b(0x0,_0x2b7fb0(_0x448a56)),b(0x1,_0x2b7fb0(_0x39643a)),b(0x2,_0x2b7fb0(_0x3a373c))],S);var re=Object[_0x48adec(0x171)],te=(_0x313d5f,_0x2d0374,_0xe96fec,_0x407950)=>{const _0x4a8f99=_0x48adec;for(var _0x37d9fb=_0x407950>0x1?void 0x0:_0x407950?re(_0x2d0374,_0xe96fec):_0x2d0374,_0x16d140=_0x313d5f[_0x4a8f99(0x19b)]-0x1,_0xbfffcd;_0x16d140>=0x0;_0x16d140--)(_0xbfffcd=_0x313d5f[_0x16d140])&&(_0x37d9fb=_0xbfffcd(_0x37d9fb)||_0x37d9fb);return _0x37d9fb;},M=(_0x41e3ab,_0x3b1625)=>(_0x8f812c,_0x3198e2)=>_0x3b1625(_0x8f812c,_0x3198e2,_0x41e3ab);let f=class extends _0x274417{constructor(_0x1fc0ec,_0x14e6ca){const _0x5acaff=_0x48adec;super(),this[_0x5acaff(0x190)]=_0x1fc0ec,this['_threadCommentDataSource']=_0x14e6ca,this['_initDataSource']();}[_0x48adec(0x18e)](){const _0x52e7e8=_0x48adec;this[_0x52e7e8(0x190)][_0x52e7e8(0x14d)]=this['_threadCommentDataSource'],this[_0x52e7e8(0x190)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x43ec35),M(0x1,_0x2b7fb0(S))],f);var se=Object[_0x48adec(0x164)],oe=Object[_0x48adec(0x171)],ne=(_0x484964,_0xfcb1af,_0xaadb2f)=>_0xfcb1af in _0x484964?se(_0x484964,_0xfcb1af,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xaadb2f}):_0x484964[_0xfcb1af]=_0xaadb2f,ie=(_0x97f438,_0x506f56,_0x575599,_0x38d795)=>{for(var _0x24d440=_0x38d795>0x1?void 0x0:_0x38d795?oe(_0x506f56,_0x575599):_0x506f56,_0x122e73=_0x97f438['length']-0x1,_0x5c42d3;_0x122e73>=0x0;_0x122e73--)(_0x5c42d3=_0x97f438[_0x122e73])&&(_0x24d440=_0x5c42d3(_0x24d440)||_0x24d440);return _0x24d440;},N=(_0x5e2bbc,_0x36451a)=>(_0x3d99da,_0x42790f)=>_0x36451a(_0x3d99da,_0x42790f,_0x5e2bbc),$=(_0x1d3623,_0x5d0d1a,_0x32ef4d)=>ne(_0x1d3623,typeof _0x5d0d1a!=_0x48adec(0x161)?_0x5d0d1a+'':_0x5d0d1a,_0x32ef4d);let g=class extends _0x4c197b{constructor(_0x4c018b=O,_0x2d379d,_0x16c43d){const _0x2a81b2=_0x48adec;super(),this['_config']=_0x4c018b,this['_injector']=_0x2d379d,this[_0x2a81b2(0x18f)]=_0x16c43d;const {..._0x5bfca6}=_0x4267fa({},O,this['_config']);this['_configService'][_0x2a81b2(0x18d)](z,_0x5bfca6);}[_0x48adec(0x17b)](){const _0x1e6f3f=_0x48adec;[[S],[f],[_]][_0x1e6f3f(0x19d)](_0xfce8a4=>{const _0x3aa938=_0x1e6f3f;this[_0x3aa938(0x16f)][_0x3aa938(0x15f)](_0xfce8a4);});}[_0x48adec(0x163)](){const _0x2097c7=_0x48adec;this[_0x2097c7(0x16f)][_0x2097c7(0x199)](f),this['_injector']['get'](_);}};$(g,'pluginName',W),$(g,_0x48adec(0x18c),_0x275ad0['UNIVER_UNKNOWN']),g=ie([_0x4f8b32(_0x3a8b74,_0x542fe2,_0x1cd485),N(0x1,_0x2b7fb0(_0x21ef67)),N(0x2,_0x1e3178)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1f0c(_0x3ef45c,_0x4f2046){const _0x1fde67=_0x1fde();return _0x1f0c=function(_0x1f0c3b,_0x9900f4){_0x1f0c3b=_0x1f0c3b-0xe1;let _0x19e2c1=_0x1fde67[_0x1f0c3b];return _0x19e2c1;},_0x1f0c(_0x3ef45c,_0x4f2046);}(function(_0x4ca8f5,_0x43720e){const _0x221748=_0x1f0c,_0x377697=_0x4ca8f5();while(!![]){try{const _0x24a847=-parseInt(_0x221748(0x165))/0x1*(parseInt(_0x221748(0x146))/0x2)+parseInt(_0x221748(0x113))/0x3*(-parseInt(_0x221748(0x110))/0x4)+-parseInt(_0x221748(0xed))/0x5*(parseInt(_0x221748(0x109))/0x6)+-parseInt(_0x221748(0xe8))/0x7*(parseInt(_0x221748(0x14e))/0x8)+parseInt(_0x221748(0x117))/0x9*(parseInt(_0x221748(0x108))/0xa)+-parseInt(_0x221748(0x12e))/0xb*(parseInt(_0x221748(0xe7))/0xc)+parseInt(_0x221748(0x136))/0xd;if(_0x24a847===_0x43720e)break;else _0x377697['push'](_0x377697['shift']());}catch(_0xf97030){_0x377697['push'](_0x377697['shift']());}}}(_0x1fde,0x20b68),function(_0x3520e9,_0x449285){const _0x1d9584=_0x1f0c;typeof exports=='object'&&typeof module<'u'?_0x449285(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==_0x1d9584(0x153)&&define[_0x1d9584(0x118)]?define(['exports',_0x1d9584(0xf1),_0x1d9584(0xf8),_0x1d9584(0x15c),_0x1d9584(0xeb),_0x1d9584(0x132),_0x1d9584(0xec),_0x1d9584(0x107)],_0x449285):(_0x3520e9=typeof globalThis<'u'?globalThis:_0x3520e9||self,_0x449285(_0x3520e9[_0x1d9584(0x125)]={},_0x3520e9[_0x1d9584(0xe6)],_0x3520e9[_0x1d9584(0x162)],_0x3520e9[_0x1d9584(0x15b)],_0x3520e9['UniverThreadCommentUi'],_0x3520e9[_0x1d9584(0xfc)],_0x3520e9[_0x1d9584(0xec)],_0x3520e9['UniverNetwork']));}(this,function(_0x1812bf,_0x53a0d2,_0x481f6b,_0x4e03f5,_0x377150,_0x2f2ab9,_0x2cbfc0,_0x3ca965){'use strict';const _0x26004a=_0x1f0c;const _0x4a0e0e='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x40d01b=(_0x28a3a7=>(_0x28a3a7[_0x28a3a7[_0x26004a(0x13b)]=0x0]=_0x26004a(0x13b),_0x28a3a7[_0x28a3a7[_0x26004a(0xfa)]=0x1]=_0x26004a(0xfa),_0x28a3a7[_0x28a3a7[_0x26004a(0x131)]=-0x1]='UNRECOGNIZED',_0x28a3a7))(_0x40d01b||{}),_0x138f2b=(_0x2c9cb1=>(_0x2c9cb1[_0x2c9cb1[_0x26004a(0x10e)]=0x0]=_0x26004a(0x10e),_0x2c9cb1[_0x2c9cb1[_0x26004a(0x163)]=0x1]=_0x26004a(0x163),_0x2c9cb1[_0x2c9cb1['Reply']=0x2]=_0x26004a(0xfe),_0x2c9cb1[_0x2c9cb1[_0x26004a(0x11d)]=0x3]=_0x26004a(0x11d),_0x2c9cb1[_0x2c9cb1[_0x26004a(0x160)]=0x4]='Delete',_0x2c9cb1[_0x2c9cb1[_0x26004a(0x128)]=0x5]=_0x26004a(0x128),_0x2c9cb1[_0x2c9cb1[_0x26004a(0x131)]=-0x1]='UNRECOGNIZED',_0x2c9cb1))(_0x138f2b||{});const _0x1f5e7f=_0x45358a=>_0x4e03f5[_0x26004a(0x155)](new Date(+_0x45358a))['format']('YYYY/MM/DD\x20HH:mm'),_0x19bf2f=async(_0x27a385,_0x481241)=>{const _0x45b921=_0x26004a,_0x1aad2c=_0x27a385['get'](_0x4e03f5['UserManagerService']),_0x1d629a=_0x27a385[_0x45b921(0xfd)](_0x3ca965[_0x45b921(0x13a)]);_0x481241[_0x45b921(0x15a)](_0x373e72=>{const _0xd5b99e=_0x45b921;_0x1aad2c[_0xd5b99e(0x14a)](_0x373e72)&&_0x481241[_0xd5b99e(0x158)](_0x373e72);}),_0x481241[_0x45b921(0x11e)]&&(await _0x1d629a[_0x45b921(0xfd)](_0x45b921(0x15e),{'params':{'userIDs':[..._0x481241]}}))['body'][_0x45b921(0xe5)][_0x45b921(0x15a)](_0xd1ec02=>{const _0x50b3a5=_0x45b921;_0xd1ec02&&_0x1aad2c[_0x50b3a5(0x124)](_0xd1ec02);});};var _0x23dec8=Object[_0x26004a(0x10a)],_0x328dc9=(_0xffaa6c,_0x1e1908,_0x4dac8a,_0x559b0c)=>{const _0x1aa1b8=_0x26004a;for(var _0x299c0a=_0x559b0c>0x1?void 0x0:_0x559b0c?_0x23dec8(_0x1e1908,_0x4dac8a):_0x1e1908,_0x13f80b=_0xffaa6c[_0x1aa1b8(0x164)]-0x1,_0x4d7f36;_0x13f80b>=0x0;_0x13f80b--)(_0x4d7f36=_0xffaa6c[_0x13f80b])&&(_0x299c0a=_0x4d7f36(_0x299c0a)||_0x299c0a);return _0x299c0a;},_0x1a4246=(_0x3126f4,_0x387b67)=>(_0x5afcc9,_0x5831a2)=>_0x387b67(_0x5afcc9,_0x5831a2,_0x3126f4);let _0x4cd53f=class extends _0x4e03f5['Disposable']{constructor(_0x68f521,_0x21ef8f,_0x4d81f4,_0x4ee209){const _0xee2d65=_0x26004a;super(),this['_commentService']=_0x68f521,this[_0xee2d65(0x13d)]=_0x21ef8f,this[_0xee2d65(0x104)]=_0x4d81f4,this[_0xee2d65(0x10f)]=_0x4ee209,this[_0xee2d65(0xf6)](),this[_0xee2d65(0x134)]();}[_0x26004a(0x134)](){const _0x23b3b0=_0x26004a;this['disposeWithMe'](this[_0x23b3b0(0x13d)]['commentUpdate$'][_0x23b3b0(0x144)](_0x2cbfc0[_0x23b3b0(0xe1)](0x10))[_0x23b3b0(0xee)](_0x83bdaf=>{const _0x25da11=_0x23b3b0,_0x5635c4=new Set();_0x83bdaf[_0x25da11(0x15a)](_0x2fa831=>{const _0x39af63=_0x25da11;switch(_0x2fa831[_0x39af63(0x11c)]){case'add':{const _0xe4caa=_0x2fa831[_0x39af63(0x148)][_0x39af63(0x137)];_0x5635c4['add'](_0xe4caa);break;}}}),_0x19bf2f(this[_0x25da11(0x10f)],_0x5635c4);}));}[_0x26004a(0xf6)](){const _0x46acec=_0x26004a;this['disposeWithMe'](this['_commentService'][_0x46acec(0x142)][_0x46acec(0xee)](async _0x3ff8f5=>{const _0x4811ec=_0x46acec;var _0x597b64,_0x262bac,_0x32e883,_0x5774fa;const _0x266d8a=(_0x597b64=this[_0x4811ec(0x13d)][_0x4811ec(0x12c)](_0x3ff8f5['unitId'])[_0x4811ec(0x11b)](_0x4fe11c=>_0x4fe11c[_0x4811ec(0x12a)]===_0x3ff8f5[_0x4811ec(0x12a)]))==null?void 0x0:_0x597b64[_0x4811ec(0x100)];if(!_0x266d8a)return;const {unitId:_0x42098a,subUnitId:_0x5cfb33}=_0x266d8a;switch(_0x3ff8f5[_0x4811ec(0x16b)]&&this[_0x4811ec(0x104)][_0x4811ec(0x124)](_0x3ff8f5['user']),_0x3ff8f5[_0x4811ec(0x11c)]){case _0x138f2b[_0x4811ec(0x163)]:break;case _0x138f2b[_0x4811ec(0xfe)]:{this[_0x4811ec(0x13d)][_0x4811ec(0x14d)](_0x42098a,_0x5cfb33,{'unitId':_0x42098a,'subUnitId':_0x5cfb33,'ref':'','id':_0x3ff8f5['replyId'],'dT':_0x1f5e7f(+_0x3ff8f5[_0x4811ec(0x122)]),'threadId':_0x3ff8f5[_0x4811ec(0x12a)],'personId':(_0x32e883=(_0x262bac=_0x3ff8f5[_0x4811ec(0x16b)])==null?void 0x0:_0x262bac[_0x4811ec(0x13f)])!=null?_0x32e883:_0x3ff8f5['userId'],'text':JSON[_0x4811ec(0x167)](_0x3ff8f5[_0x4811ec(0x161)]),'parentId':_0x266d8a['id']});break;}case _0x138f2b[_0x4811ec(0x160)]:{const _0x27c838=this[_0x4811ec(0x13d)][_0x4811ec(0x10d)](_0x42098a,_0x5cfb33,_0x3ff8f5[_0x4811ec(0xe2)]);_0x27c838&&_0x27c838[_0x4811ec(0xf2)]&&this[_0x4811ec(0x13d)][_0x4811ec(0x157)](_0x42098a,_0x5cfb33,_0x3ff8f5[_0x4811ec(0xe2)]);break;}case _0x138f2b[_0x4811ec(0x11d)]:{this['_threadCommentModel'][_0x4811ec(0x135)](_0x42098a,_0x5cfb33,{'commentId':_0x3ff8f5[_0x4811ec(0xe2)],'text':JSON[_0x4811ec(0x167)](_0x3ff8f5['content'])});break;}case _0x138f2b['Solve']:{const _0x2dd667=(_0x5774fa=this['_threadCommentModel']['getUnit'](_0x3ff8f5[_0x4811ec(0x16c)])[_0x4811ec(0x11b)](_0x20b300=>_0x20b300[_0x4811ec(0x12a)]===_0x3ff8f5[_0x4811ec(0x12a)]))==null?void 0x0:_0x5774fa[_0x4811ec(0x100)];_0x2dd667&&this[_0x4811ec(0x13d)]['resolveComment'](_0x42098a,_0x5cfb33,_0x2dd667['id'],_0x3ff8f5['solved']===_0x40d01b[_0x4811ec(0xfa)]);break;}}}));}};_0x4cd53f=_0x328dc9([_0x1a4246(0x0,_0x4e03f5['Inject'](_0x53a0d2[_0x26004a(0x151)])),_0x1a4246(0x1,_0x4e03f5['Inject'](_0x2f2ab9['ThreadCommentModel'])),_0x1a4246(0x2,_0x4e03f5[_0x26004a(0xf0)](_0x4e03f5['UserManagerService'])),_0x1a4246(0x3,_0x4e03f5[_0x26004a(0xf0)](_0x4e03f5['Injector']))],_0x4cd53f);const _0x3f49b4=_0x26004a(0x13e),_0x32c45a={};var _0x2e3587=Object['getOwnPropertyDescriptor'],_0x23fee2=(_0x36feea,_0x3ca54f,_0x5c43b4,_0x2ce9eb)=>{const _0x5484b1=_0x26004a;for(var _0x3a69b8=_0x2ce9eb>0x1?void 0x0:_0x2ce9eb?_0x2e3587(_0x3ca54f,_0x5c43b4):_0x3ca54f,_0x1ed29c=_0x36feea[_0x5484b1(0x164)]-0x1,_0x2c4ee7;_0x1ed29c>=0x0;_0x1ed29c--)(_0x2c4ee7=_0x36feea[_0x1ed29c])&&(_0x3a69b8=_0x2c4ee7(_0x3a69b8)||_0x3a69b8);return _0x3a69b8;},_0x4a34ac=(_0x2e86b8,_0x5cfa71)=>(_0x57bf01,_0x56b91a)=>_0x5cfa71(_0x57bf01,_0x56b91a,_0x2e86b8);function _0x50f40d(_0x442064,_0xe5cb2f){const _0x3b0786=_0x26004a,_0x40b23b=_0x442064[_0x3b0786(0x145)][0x0];return{..._0xe5cb2f,'id':_0x40b23b[_0x3b0786(0xe2)],'resolved':_0x442064[_0x3b0786(0x150)]===0x1,'dT':_0x1f5e7f(_0x40b23b['createTimestamp']),'personId':_0x40b23b[_0x3b0786(0x14b)],'threadId':_0x40b23b[_0x3b0786(0x12a)]};}function _0x4161cc(_0x45038d,_0x23612d,_0x550362){const _0x28606c=_0x26004a;var _0x1b308a,_0x3c7f5c;if(((_0x3c7f5c=(_0x1b308a=_0x45038d==null?void 0x0:_0x45038d[_0x28606c(0x145)])==null?void 0x0:_0x1b308a[_0x28606c(0x164)])!=null?_0x3c7f5c:0x0)>0x0){const _0xd5ccc6=(_0x1c7c53,_0x5f399f)=>({'id':_0x1c7c53[_0x28606c(0xe2)],'threadId':_0x1c7c53[_0x28606c(0x12a)],'dT':_0x1f5e7f(_0x1c7c53['createTimestamp']),'personId':_0x1c7c53['userId'],'resolved':_0x45038d[_0x28606c(0x150)]===_0x40d01b[_0x28606c(0xfa)],'unitId':_0x23612d,'subUnitId':_0x550362,'text':JSON[_0x28606c(0x167)](_0x1c7c53[_0x28606c(0x161)]),'parentId':_0x5f399f}),_0x5510df=_0xd5ccc6(_0x45038d['replies'][0x0]);return{..._0x5510df,'children':_0x45038d[_0x28606c(0x145)][_0x28606c(0x12b)](0x1)[_0x28606c(0x111)](_0x5e344b=>_0xd5ccc6(_0x5e344b,_0x5510df['id']))};}return null;}let _0x4cdabd=class{constructor(_0x1c0ec5,_0x5999f3,_0x5dff14){const _0x470a39=_0x26004a;this['_httpService']=_0x1c0ec5,this[_0x470a39(0x104)]=_0x5999f3,this['_sessionService']=_0x5dff14;}async[_0x26004a(0x14d)](_0x4b5992){const _0x52736b=_0x26004a;var _0x466ea5,_0x10b189;const {parentId:_0x38841c,unitId:_0x4847ea,text:_0xfd9516,threadId:_0x5ae0e1}=_0x4b5992,_0x2a41f3=(_0x10b189=(_0x466ea5=_0xfd9516['customRanges'])==null?void 0x0:_0x466ea5[_0x52736b(0xf9)](_0x28702b=>_0x28702b[_0x52736b(0x102)]===_0x4e03f5[_0x52736b(0x106)][_0x52736b(0x12d)])[_0x52736b(0x111)](_0x32f29e=>_0x32f29e[_0x52736b(0x168)]))!=null?_0x10b189:[],_0xbe13e6=JSON[_0x52736b(0x130)](_0xfd9516),_0xcca53e=(await this[_0x52736b(0x159)]['requireSession'](_0x4847ea))[_0x52736b(0x12f)]();if(_0x38841c){const _0x36fbb6={'memberId':_0xcca53e,'unitId':_0x4847ea,'content':_0xbe13e6,'mention':_0x2a41f3,'threadId':_0x5ae0e1},_0x2c58f4=(await this[_0x52736b(0xfb)][_0x52736b(0xf3)](_0x52736b(0x129)+_0x4847ea+_0x52736b(0x13c),{'body':_0x36fbb6}))[_0x52736b(0x140)][_0x52736b(0x123)];return{..._0x4b5992,'id':_0x2c58f4[_0x52736b(0xe2)],'dT':_0x4e03f5[_0x52736b(0x155)](+_0x2c58f4[_0x52736b(0x122)])[_0x52736b(0x14f)](_0x52736b(0x139)),'personId':_0x2c58f4['userId']};}else{const _0x4028ba={'memberId':_0xcca53e,'unitId':_0x4847ea,'content':_0xbe13e6,'mention':_0x2a41f3},_0x425f8b=await this['_httpService']['post'](_0x52736b(0x129)+_0x4847ea+'/add',{'body':_0x4028ba});return _0x50f40d(_0x425f8b[_0x52736b(0x140)]['comment'],_0x4b5992);}}async['updateComment'](_0x51c7fe){const _0x360fe6=_0x26004a;var _0x254942,_0x3db29e;const {text:_0x29fb83,unitId:_0x3db13f}=_0x51c7fe,_0x4a955b=(_0x3db29e=(_0x254942=_0x29fb83[_0x360fe6(0xf4)])==null?void 0x0:_0x254942['filter'](_0x95a85f=>_0x95a85f[_0x360fe6(0x102)]===_0x4e03f5[_0x360fe6(0x106)][_0x360fe6(0x12d)])['map'](_0x24ab1b=>_0x24ab1b['rangeId']))!=null?_0x3db29e:[],_0x413ce1=JSON[_0x360fe6(0x130)](_0x29fb83),_0x422c5a=_0x51c7fe[_0x360fe6(0x12a)],_0x457950=_0x51c7fe['id'],_0x4714c1={'memberId':(await this[_0x360fe6(0x159)][_0x360fe6(0x101)](_0x3db13f))[_0x360fe6(0x12f)](),'unitId':_0x3db13f,'threadId':_0x422c5a,'mention':_0x4a955b,'content':_0x413ce1,'replyId':_0x457950},_0x5779f6=await this[_0x360fe6(0xfb)][_0x360fe6(0xf3)](_0x360fe6(0x129)+_0x3db13f+_0x360fe6(0x169),{'body':_0x4714c1});return!_0x5779f6[_0x360fe6(0x140)][_0x360fe6(0x138)]||_0x5779f6['body'][_0x360fe6(0x138)][_0x360fe6(0x126)]===0x1;}async['resolveComment'](_0x1767bc){const _0x8905da=_0x26004a,{unitId:_0x2feafd}=_0x1767bc,_0x2fc52c=_0x1767bc[_0x8905da(0x12a)],_0x36083f={'memberId':this['_userService'][_0x8905da(0x141)]()[_0x8905da(0x13f)],'unitId':_0x2feafd,'threadId':_0x2fc52c,'solved':_0x1767bc[_0x8905da(0x105)]?_0x40d01b[_0x8905da(0xfa)]:_0x40d01b[_0x8905da(0x13b)]},_0x163169=await this['_httpService'][_0x8905da(0xf3)](_0x8905da(0x129)+_0x2feafd+_0x8905da(0x166),{'body':_0x36083f});return!_0x163169[_0x8905da(0x140)]['error']||_0x163169[_0x8905da(0x140)][_0x8905da(0x138)][_0x8905da(0x126)]===0x1;}async['deleteComment'](_0x508045,_0x2e61ff,_0x42c85c,_0x4c765e){const _0x1d4220=_0x26004a,_0x33bc6e={'memberId':(await this[_0x1d4220(0x159)][_0x1d4220(0x101)](_0x508045))['getMemberID'](),'threadId':_0x42c85c,'replyId':_0x4c765e,'unitId':_0x508045},_0x1b9bd1=await this['_httpService'][_0x1d4220(0xf3)](_0x1d4220(0x129)+_0x508045+_0x1d4220(0x11f),{'body':_0x33bc6e});return!_0x1b9bd1['body'][_0x1d4220(0x138)]||_0x1b9bd1[_0x1d4220(0x140)]['error']['code']===0x1;}async[_0x26004a(0x147)](_0x23807b,_0x7e9b37,_0x3f112c){const _0x5a7ba1=_0x26004a,_0x4d711c={'unitId':_0x23807b,'threadId':_0x3f112c},_0x2ebd9c=await this[_0x5a7ba1(0xfb)][_0x5a7ba1(0xf3)](_0x5a7ba1(0x129)+_0x23807b+'/list',{'body':_0x4d711c}),_0x50df0f=_0x3f112c[_0x5a7ba1(0x111)](_0x4ecf7c=>_0x4161cc(_0x2ebd9c[_0x5a7ba1(0x140)][_0x5a7ba1(0x154)][_0x4ecf7c],_0x23807b,_0x7e9b37))[_0x5a7ba1(0xf9)](Boolean);return Object[_0x5a7ba1(0x133)](_0x2ebd9c[_0x5a7ba1(0x140)]['users'])[_0x5a7ba1(0x15a)](_0x175b77=>{const _0x107818=_0x5a7ba1;this[_0x107818(0x104)][_0x107818(0x124)](_0x175b77);}),_0x50df0f;}[_0x26004a(0xf7)](_0x4ba1ff){const _0x51214c=_0x26004a;return{'id':_0x4ba1ff['id'],'threadId':_0x4ba1ff[_0x51214c(0x12a)],'ref':_0x4ba1ff[_0x51214c(0x149)]};}};_0x4cdabd=_0x23fee2([_0x4a34ac(0x0,_0x4e03f5['Inject'](_0x3ca965['HTTPService'])),_0x4a34ac(0x1,_0x4e03f5[_0x26004a(0xf0)](_0x4e03f5['UserManagerService'])),_0x4a34ac(0x2,_0x4e03f5[_0x26004a(0xf0)](_0x53a0d2['CollaborationSessionService']))],_0x4cdabd);var _0x13d8c3=Object[_0x26004a(0x10a)],_0x23c0eb=(_0x182af6,_0x145463,_0x4ef266,_0x30d9c4)=>{const _0x2d81e8=_0x26004a;for(var _0x2f71e1=_0x30d9c4>0x1?void 0x0:_0x30d9c4?_0x13d8c3(_0x145463,_0x4ef266):_0x145463,_0x34d278=_0x182af6[_0x2d81e8(0x164)]-0x1,_0x416479;_0x34d278>=0x0;_0x34d278--)(_0x416479=_0x182af6[_0x34d278])&&(_0x2f71e1=_0x416479(_0x2f71e1)||_0x2f71e1);return _0x2f71e1;},_0x3c7fa9=(_0x28be74,_0x1b02ee)=>(_0x1c386c,_0x4919a4)=>_0x1b02ee(_0x1c386c,_0x4919a4,_0x28be74);let _0x406b40=class extends _0x4e03f5[_0x26004a(0x119)]{constructor(_0x4ab3a5,_0x3f0407){const _0x3900cc=_0x26004a;super(),this['_threadCommentDataSourceService']=_0x4ab3a5,this[_0x3900cc(0xef)]=_0x3f0407,this['_initDataSource']();}[_0x26004a(0xea)](){const _0x5b1292=_0x26004a;this[_0x5b1292(0x115)][_0x5b1292(0x120)]=this[_0x5b1292(0xef)],this[_0x5b1292(0x115)][_0x5b1292(0x116)]=!0x1;}};_0x406b40=_0x23c0eb([_0x3c7fa9(0x0,_0x2f2ab9[_0x26004a(0x127)]),_0x3c7fa9(0x1,_0x4e03f5['Inject'](_0x4cdabd))],_0x406b40);var _0x3ceb0a=Object['defineProperty'],_0x5c14f5=Object['getOwnPropertyDescriptor'],_0x3f9d24=(_0x1e5822,_0x310981,_0x5524f9)=>_0x310981 in _0x1e5822?_0x3ceb0a(_0x1e5822,_0x310981,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5524f9}):_0x1e5822[_0x310981]=_0x5524f9,_0x46b467=(_0x1fdec1,_0xa27ff5,_0x5709fc,_0x47eaf9)=>{const _0x554b8c=_0x26004a;for(var _0x167e3b=_0x47eaf9>0x1?void 0x0:_0x47eaf9?_0x5c14f5(_0xa27ff5,_0x5709fc):_0xa27ff5,_0x20d668=_0x1fdec1[_0x554b8c(0x164)]-0x1,_0x36d26a;_0x20d668>=0x0;_0x20d668--)(_0x36d26a=_0x1fdec1[_0x20d668])&&(_0x167e3b=_0x36d26a(_0x167e3b)||_0x167e3b);return _0x167e3b;},_0x3ee0c0=(_0x3af733,_0x269093)=>(_0x272494,_0x70b85e)=>_0x269093(_0x272494,_0x70b85e,_0x3af733),_0x52bb14=(_0xdd445d,_0xe53dbf,_0x4697e8)=>_0x3f9d24(_0xdd445d,typeof _0xe53dbf!=_0x26004a(0x11a)?_0xe53dbf+'':_0xe53dbf,_0x4697e8);_0x1812bf[_0x26004a(0x143)]=class extends _0x4e03f5[_0x26004a(0xe3)]{constructor(_0x4c2d6a=_0x32c45a,_0x120982,_0x3afc2a){const _0x2ba581=_0x26004a;super(),this['_config']=_0x4c2d6a,this[_0x2ba581(0x10f)]=_0x120982,this[_0x2ba581(0x156)]=_0x3afc2a;const {..._0xbd74b4}=_0x4e03f5[_0x2ba581(0xf5)]({},_0x32c45a,this[_0x2ba581(0xe9)]);this['_configService'][_0x2ba581(0x14c)](_0x3f49b4,_0xbd74b4);}[_0x26004a(0xff)](){[[_0x4cdabd],[_0x406b40],[_0x4cd53f]]['forEach'](_0x44d3b1=>{const _0x2cf0c6=_0x1f0c;this[_0x2cf0c6(0x10f)]['add'](_0x44d3b1);});}[_0x26004a(0x16e)](){const _0x4609cc=_0x26004a;this['_injector'][_0x4609cc(0xfd)](_0x406b40),this[_0x4609cc(0x10f)][_0x4609cc(0xfd)](_0x4cd53f);}},_0x52bb14(_0x1812bf['UniverThreadCommentDataSourcePlugin'],_0x26004a(0x114),_0x4a0e0e),_0x52bb14(_0x1812bf[_0x26004a(0x143)],_0x26004a(0x11c),_0x4e03f5[_0x26004a(0x121)][_0x26004a(0x15f)]),_0x1812bf[_0x26004a(0x143)]=_0x46b467([_0x4e03f5[_0x26004a(0x10c)](_0x377150[_0x26004a(0x16a)],_0x53a0d2[_0x26004a(0x112)],_0x481f6b[_0x26004a(0x16d)]),_0x3ee0c0(0x1,_0x4e03f5[_0x26004a(0xf0)](_0x4e03f5[_0x26004a(0x103)])),_0x3ee0c0(0x2,_0x4e03f5[_0x26004a(0x10b)])],_0x1812bf[_0x26004a(0x143)]),Object[_0x26004a(0x152)](_0x1812bf,Symbol[_0x26004a(0xe4)],{'value':_0x26004a(0x15d)});}));function _0x1fde(){const _0x43d12a=['updateComment','8543028GJENlb','personId','error','YYYY/MM/DD\x20HH:mm','HTTPService','OpenOrReOpen','/reply','_threadCommentModel','thread-comment-data-source.config','userID','body','getCurrentUser','commentUpdate$','UniverThreadCommentDataSourcePlugin','pipe','replies','518iCzsWJ','listComments','payload','ref','getUser','userId','setConfig','addComment','301448mRjRAB','format','solved','CommentService','defineProperty','function','comments','dayjs','_configService','deleteComment','delete','_sessionService','forEach','UniverCore','@univerjs/core','Module','/universer-api/user/list','UNIVER_UNKNOWN','Delete','content','UniverProLicense','Add','length','167OxYvaU','/solved','parse','rangeId','/edit','UniverThreadCommentUIPlugin','user','unitId','UniverLicensePlugin','onReady','bufferTime','replyId','Plugin','toStringTag','users','UniverProCollaborationClient','36CiEqvC','7WDzPAI','_config','_initDataSource','@univerjs/thread-comment-ui','rxjs','5iHOGFc','subscribe','_threadCommentDataSource','Inject','@univerjs-pro/collaboration-client','parentId','post','customRanges','merge','_init','saveCommentToSnapshot','@univerjs-pro/license','filter','Solved','_httpService','UniverThreadComment','get','Reply','onStarting','root','requireSession','rangeType','Injector','_userService','resolved','CustomRangeType','@univerjs/network','330dNgwMP','1074318uoDCJW','getOwnPropertyDescriptor','IConfigService','DependentOn','getComment','Unknown','_injector','269788HyGnjm','map','UniverCollaborationClientPlugin','6eZmizk','pluginName','_threadCommentDataSourceService','syncUpdateMutationToColla','27567wnNnov','amd','Disposable','symbol','find','type','Edit','size','/delete','dataSource','UniverInstanceType','createTimestamp','reply','addUser','UniverProThreadCommentDatasource','code','IThreadCommentDataSourceService','Solve','/universer-api/comment/unit/','threadId','slice','getUnit','COMMENT','840994ezrDAk','getMemberID','stringify','UNRECOGNIZED','@univerjs/thread-comment','values','_initUserSync'];_0x1fde=function(){return _0x43d12a;};return _0x1fde();}
1
+ function _0x1c97(){const _0x10518a=['IThreadCommentDataSourceService','Delete','@univerjs/thread-comment','disposeWithMe','COMMENT','rxjs','_userService','_threadCommentDataSourceService','getUser','toStringTag','CollaborationSessionService','payload','length','createTimestamp','subscribe','add','rangeType','Solved','_injector','function','/universer-api/user/list','thread-comment-data-source.config','replies','YYYY/MM/DD\x20HH:mm','4939613DsUoVT','commentUpdate$','reply','slice','_configService','exports','UniverThreadCommentUIPlugin','map','Add','type','customRanges','size','getOwnPropertyDescriptor','filter','UniverNetwork','replyId','setConfig','onStarting','@univerjs-pro/collaboration-client','_threadCommentDataSource','_threadCommentModel','Disposable','resolved','requireSession','@univerjs/thread-comment-ui','pipe','find','object','parse','CommentService','/edit','stringify','Solve','1683sofGKa','UniverThreadCommentUi','/universer-api/comment/unit/','_commentService','OpenOrReOpen','_init','_initDataSource','dataSource','Edit','getCurrentUser','addUser','updateComment','get','error','code','_config','Module','post','Reply','saveCommentToSnapshot','73955ytZKPK','format','UserManagerService','delete','HTTPService','1013224HNnTEc','syncUpdateMutationToColla','threadId','user','userID','UniverProLicense','ref','UNIVER_UNKNOWN','@univerjs-pro/license','Unknown','values','deleteComment','UniverProThreadCommentDatasource','solved','rangeId','addComment','Inject','_httpService','_sessionService','body','symbol','onReady','DependentOn','_initUserSync','IConfigService','users','UniverThreadCommentDataSourcePlugin','1024119KaTZab','dayjs','resolveComment','defineProperty','104CYJQXC','UNRECOGNIZED','forEach','/solved','content','/add','UniverCollaborationClientPlugin','3704lsIktz','@univerjs/core','userId','24562400bFjhjL','pluginName','/reply','getMemberID','UniverProCollaborationClient','1BODdKr','personId','/delete','amd','201504cObhrz','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','root','listComments'];_0x1c97=function(){return _0x10518a;};return _0x1c97();}function _0x3d17(_0x4680af,_0xc88f40){const _0x1c97af=_0x1c97();return _0x3d17=function(_0x3d1744,_0x2de8d3){_0x3d1744=_0x3d1744-0x1d2;let _0x45b4b0=_0x1c97af[_0x3d1744];return _0x45b4b0;},_0x3d17(_0x4680af,_0xc88f40);}(function(_0x5ec5ea,_0x5c6187){const _0xc57454=_0x3d17,_0x19f76e=_0x5ec5ea();while(!![]){try{const _0x5d9f67=parseInt(_0xc57454(0x215))/0x1*(-parseInt(_0xc57454(0x1e7))/0x2)+-parseInt(_0xc57454(0x202))/0x3+parseInt(_0xc57454(0x206))/0x4*(-parseInt(_0xc57454(0x1e2))/0x5)+-parseInt(_0xc57454(0x219))/0x6+-parseInt(_0xc57454(0x236))/0x7+parseInt(_0xc57454(0x20d))/0x8*(-parseInt(_0xc57454(0x257))/0x9)+parseInt(_0xc57454(0x210))/0xa;if(_0x5d9f67===_0x5c6187)break;else _0x19f76e['push'](_0x19f76e['shift']());}catch(_0x5f02f4){_0x19f76e['push'](_0x19f76e['shift']());}}}(_0x1c97,0x61229),function(_0x2575bc,_0x1ce5ed){const _0x499016=_0x3d17;typeof exports==_0x499016(0x251)&&typeof module<'u'?_0x1ce5ed(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==_0x499016(0x231)&&define[_0x499016(0x218)]?define([_0x499016(0x23b),_0x499016(0x248),_0x499016(0x1ef),_0x499016(0x20e),_0x499016(0x24e),_0x499016(0x220),_0x499016(0x223),'@univerjs/network'],_0x1ce5ed):(_0x2575bc=typeof globalThis<'u'?globalThis:_0x2575bc||self,_0x1ce5ed(_0x2575bc[_0x499016(0x1f3)]={},_0x2575bc[_0x499016(0x214)],_0x2575bc[_0x499016(0x1ec)],_0x2575bc['UniverCore'],_0x2575bc[_0x499016(0x258)],_0x2575bc['UniverThreadComment'],_0x2575bc[_0x499016(0x223)],_0x2575bc[_0x499016(0x244)]));}(this,function(_0xd744f6,_0x3be277,_0x24e1bb,_0x14156a,_0x28798b,_0x9217ca,_0x52b944,_0x12195e){'use strict';const _0x4b6f5f=_0x3d17;const _0x2e5626=_0x4b6f5f(0x21b);var _0x2db4ab=(_0x43d8a8=>(_0x43d8a8[_0x43d8a8[_0x4b6f5f(0x1d2)]=0x0]='OpenOrReOpen',_0x43d8a8[_0x43d8a8['Solved']=0x1]=_0x4b6f5f(0x22f),_0x43d8a8[_0x43d8a8['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x43d8a8))(_0x2db4ab||{}),_0x5ea982=(_0x4465b4=>(_0x4465b4[_0x4465b4[_0x4b6f5f(0x1f0)]=0x0]='Unknown',_0x4465b4[_0x4465b4[_0x4b6f5f(0x23e)]=0x1]=_0x4b6f5f(0x23e),_0x4465b4[_0x4465b4[_0x4b6f5f(0x1e0)]=0x2]='Reply',_0x4465b4[_0x4465b4[_0x4b6f5f(0x1d6)]=0x3]=_0x4b6f5f(0x1d6),_0x4465b4[_0x4465b4[_0x4b6f5f(0x21f)]=0x4]=_0x4b6f5f(0x21f),_0x4465b4[_0x4465b4[_0x4b6f5f(0x256)]=0x5]='Solve',_0x4465b4[_0x4465b4['UNRECOGNIZED']=-0x1]=_0x4b6f5f(0x207),_0x4465b4))(_0x5ea982||{});const _0x5c8641=_0x4425d8=>_0x14156a[_0x4b6f5f(0x203)](new Date(+_0x4425d8))[_0x4b6f5f(0x1e3)]('YYYY/MM/DD\x20HH:mm'),_0x253ecb=async(_0x281b8d,_0x25ee6f)=>{const _0x2d7159=_0x4b6f5f,_0x1700a7=_0x281b8d[_0x2d7159(0x1da)](_0x14156a[_0x2d7159(0x1e4)]),_0x22cd3c=_0x281b8d[_0x2d7159(0x1da)](_0x12195e[_0x2d7159(0x1e6)]);_0x25ee6f['forEach'](_0x1197ca=>{const _0x170200=_0x2d7159;_0x1700a7[_0x170200(0x226)](_0x1197ca)&&_0x25ee6f[_0x170200(0x1e5)](_0x1197ca);}),_0x25ee6f[_0x2d7159(0x241)]&&(await _0x22cd3c[_0x2d7159(0x1da)](_0x2d7159(0x232),{'params':{'userIDs':[..._0x25ee6f]}}))['body'][_0x2d7159(0x200)]['forEach'](_0x5c177a=>{const _0x2869de=_0x2d7159;_0x5c177a&&_0x1700a7[_0x2869de(0x1d8)](_0x5c177a);});};var _0x1544b4=Object[_0x4b6f5f(0x242)],_0x5ac6ad=(_0x322401,_0x45fb75,_0x4e726d,_0x1bb5cd)=>{const _0x446e37=_0x4b6f5f;for(var _0x324c31=_0x1bb5cd>0x1?void 0x0:_0x1bb5cd?_0x1544b4(_0x45fb75,_0x4e726d):_0x45fb75,_0x48c773=_0x322401[_0x446e37(0x22a)]-0x1,_0x3debe2;_0x48c773>=0x0;_0x48c773--)(_0x3debe2=_0x322401[_0x48c773])&&(_0x324c31=_0x3debe2(_0x324c31)||_0x324c31);return _0x324c31;},_0x3fcc5c=(_0x23c7fe,_0x2ce160)=>(_0x3b0bc0,_0x5eb7e2)=>_0x2ce160(_0x3b0bc0,_0x5eb7e2,_0x23c7fe);let _0x16746b=class extends _0x14156a['Disposable']{constructor(_0x291cc4,_0x227d48,_0x5ad6be,_0x5cd5b3){const _0x5594fa=_0x4b6f5f;super(),this[_0x5594fa(0x25a)]=_0x291cc4,this[_0x5594fa(0x24a)]=_0x227d48,this[_0x5594fa(0x224)]=_0x5ad6be,this[_0x5594fa(0x230)]=_0x5cd5b3,this[_0x5594fa(0x1d3)](),this[_0x5594fa(0x1fe)]();}[_0x4b6f5f(0x1fe)](){const _0x419280=_0x4b6f5f;this[_0x419280(0x221)](this[_0x419280(0x24a)][_0x419280(0x237)][_0x419280(0x24f)](_0x52b944['bufferTime'](0x10))['subscribe'](_0x2321dc=>{const _0x3a3ec9=_0x419280,_0x2436dc=new Set();_0x2321dc['forEach'](_0x2d30f5=>{const _0x2a56d9=_0x3d17;switch(_0x2d30f5[_0x2a56d9(0x23f)]){case _0x2a56d9(0x22d):{const _0x364ac4=_0x2d30f5[_0x2a56d9(0x229)][_0x2a56d9(0x216)];_0x2436dc['add'](_0x364ac4);break;}}}),_0x253ecb(this[_0x3a3ec9(0x230)],_0x2436dc);}));}[_0x4b6f5f(0x1d3)](){const _0x1cb17c=_0x4b6f5f;this[_0x1cb17c(0x221)](this[_0x1cb17c(0x25a)][_0x1cb17c(0x237)][_0x1cb17c(0x22c)](async _0x142e1a=>{const _0x3a7fc6=_0x1cb17c;var _0x594aff,_0x12f84b,_0x548a37,_0x1573f2;const _0x5dc458=(_0x594aff=this['_threadCommentModel']['getUnit'](_0x142e1a['unitId'])[_0x3a7fc6(0x250)](_0x34226=>_0x34226[_0x3a7fc6(0x1e9)]===_0x142e1a[_0x3a7fc6(0x1e9)]))==null?void 0x0:_0x594aff[_0x3a7fc6(0x21c)];if(!_0x5dc458)return;const {unitId:_0x535f9e,subUnitId:_0x39a21a}=_0x5dc458;switch(_0x142e1a[_0x3a7fc6(0x1ea)]&&this[_0x3a7fc6(0x224)][_0x3a7fc6(0x1d8)](_0x142e1a[_0x3a7fc6(0x1ea)]),_0x142e1a['type']){case _0x5ea982[_0x3a7fc6(0x23e)]:break;case _0x5ea982[_0x3a7fc6(0x1e0)]:{this['_threadCommentModel'][_0x3a7fc6(0x1f6)](_0x535f9e,_0x39a21a,{'unitId':_0x535f9e,'subUnitId':_0x39a21a,'ref':'','id':_0x142e1a[_0x3a7fc6(0x245)],'dT':_0x5c8641(+_0x142e1a[_0x3a7fc6(0x22b)]),'threadId':_0x142e1a['threadId'],'personId':(_0x548a37=(_0x12f84b=_0x142e1a[_0x3a7fc6(0x1ea)])==null?void 0x0:_0x12f84b[_0x3a7fc6(0x1eb)])!=null?_0x548a37:_0x142e1a['userId'],'text':JSON[_0x3a7fc6(0x252)](_0x142e1a[_0x3a7fc6(0x20a)]),'parentId':_0x5dc458['id']});break;}case _0x5ea982[_0x3a7fc6(0x21f)]:{const _0x5d69f3=this['_threadCommentModel']['getComment'](_0x535f9e,_0x39a21a,_0x142e1a[_0x3a7fc6(0x245)]);_0x5d69f3&&_0x5d69f3['parentId']&&this[_0x3a7fc6(0x24a)][_0x3a7fc6(0x1f2)](_0x535f9e,_0x39a21a,_0x142e1a['replyId']);break;}case _0x5ea982[_0x3a7fc6(0x1d6)]:{this[_0x3a7fc6(0x24a)][_0x3a7fc6(0x1d9)](_0x535f9e,_0x39a21a,{'commentId':_0x142e1a['replyId'],'text':JSON[_0x3a7fc6(0x252)](_0x142e1a[_0x3a7fc6(0x20a)])});break;}case _0x5ea982['Solve']:{const _0x6d670a=(_0x1573f2=this[_0x3a7fc6(0x24a)]['getUnit'](_0x142e1a['unitId'])['find'](_0xf71333=>_0xf71333[_0x3a7fc6(0x1e9)]===_0x142e1a[_0x3a7fc6(0x1e9)]))==null?void 0x0:_0x1573f2[_0x3a7fc6(0x21c)];_0x6d670a&&this['_threadCommentModel'][_0x3a7fc6(0x204)](_0x535f9e,_0x39a21a,_0x6d670a['id'],_0x142e1a[_0x3a7fc6(0x1f4)]===_0x2db4ab[_0x3a7fc6(0x22f)]);break;}}}));}};_0x16746b=_0x5ac6ad([_0x3fcc5c(0x0,_0x14156a[_0x4b6f5f(0x1f7)](_0x3be277[_0x4b6f5f(0x253)])),_0x3fcc5c(0x1,_0x14156a[_0x4b6f5f(0x1f7)](_0x9217ca['ThreadCommentModel'])),_0x3fcc5c(0x2,_0x14156a[_0x4b6f5f(0x1f7)](_0x14156a[_0x4b6f5f(0x1e4)])),_0x3fcc5c(0x3,_0x14156a['Inject'](_0x14156a['Injector']))],_0x16746b);const _0x3dd47d=_0x4b6f5f(0x233),_0x1b2a9c={};var _0x3f5512=Object['getOwnPropertyDescriptor'],_0x17b74c=(_0x5ee88d,_0x51295f,_0x16b30d,_0xa9bc42)=>{for(var _0x59cad7=_0xa9bc42>0x1?void 0x0:_0xa9bc42?_0x3f5512(_0x51295f,_0x16b30d):_0x51295f,_0xf564d9=_0x5ee88d['length']-0x1,_0x14af0f;_0xf564d9>=0x0;_0xf564d9--)(_0x14af0f=_0x5ee88d[_0xf564d9])&&(_0x59cad7=_0x14af0f(_0x59cad7)||_0x59cad7);return _0x59cad7;},_0xc9af10=(_0x464188,_0x1463fc)=>(_0x10071c,_0x41fdd9)=>_0x1463fc(_0x10071c,_0x41fdd9,_0x464188);function _0x260188(_0x2aeb7a,_0x3b1627){const _0x1c589b=_0x4b6f5f,_0xdbd2aa=_0x2aeb7a['replies'][0x0];return{..._0x3b1627,'id':_0xdbd2aa['replyId'],'resolved':_0x2aeb7a[_0x1c589b(0x1f4)]===0x1,'dT':_0x5c8641(_0xdbd2aa[_0x1c589b(0x22b)]),'personId':_0xdbd2aa[_0x1c589b(0x20f)],'threadId':_0xdbd2aa[_0x1c589b(0x1e9)]};}function _0x57f91c(_0xea106a,_0x32f874,_0x49433d){const _0x30d3de=_0x4b6f5f;var _0x505041,_0x20fd6c;if(((_0x20fd6c=(_0x505041=_0xea106a==null?void 0x0:_0xea106a['replies'])==null?void 0x0:_0x505041[_0x30d3de(0x22a)])!=null?_0x20fd6c:0x0)>0x0){const _0x58fd08=(_0x4830c0,_0x39e1b5)=>({'id':_0x4830c0[_0x30d3de(0x245)],'threadId':_0x4830c0[_0x30d3de(0x1e9)],'dT':_0x5c8641(_0x4830c0[_0x30d3de(0x22b)]),'personId':_0x4830c0['userId'],'resolved':_0xea106a['solved']===_0x2db4ab[_0x30d3de(0x22f)],'unitId':_0x32f874,'subUnitId':_0x49433d,'text':JSON['parse'](_0x4830c0[_0x30d3de(0x20a)]),'parentId':_0x39e1b5}),_0x6c4bd1=_0x58fd08(_0xea106a[_0x30d3de(0x234)][0x0]);return{..._0x6c4bd1,'children':_0xea106a[_0x30d3de(0x234)][_0x30d3de(0x239)](0x1)[_0x30d3de(0x23d)](_0x196f28=>_0x58fd08(_0x196f28,_0x6c4bd1['id']))};}return null;}let _0x2da3ad=class{constructor(_0x2ee665,_0x335029,_0x33e095){const _0x1e7673=_0x4b6f5f;this[_0x1e7673(0x1f8)]=_0x2ee665,this[_0x1e7673(0x224)]=_0x335029,this[_0x1e7673(0x1f9)]=_0x33e095;}async[_0x4b6f5f(0x1f6)](_0x4927ee){const _0x5d2234=_0x4b6f5f;var _0x1ad7c3,_0x3b75c5;const {parentId:_0x4218af,unitId:_0x5bf92f,text:_0x2258c0,threadId:_0x157741}=_0x4927ee,_0x4576b9=(_0x3b75c5=(_0x1ad7c3=_0x2258c0['customRanges'])==null?void 0x0:_0x1ad7c3[_0x5d2234(0x243)](_0x468f8d=>_0x468f8d[_0x5d2234(0x22e)]===_0x14156a['CustomRangeType'][_0x5d2234(0x222)])[_0x5d2234(0x23d)](_0x35ffa2=>_0x35ffa2[_0x5d2234(0x1f5)]))!=null?_0x3b75c5:[],_0x533b8a=JSON[_0x5d2234(0x255)](_0x2258c0),_0x29b3a8=(await this[_0x5d2234(0x1f9)]['requireSession'](_0x5bf92f))[_0x5d2234(0x213)]();if(_0x4218af){const _0x4c2fe6={'memberId':_0x29b3a8,'unitId':_0x5bf92f,'content':_0x533b8a,'mention':_0x4576b9,'threadId':_0x157741},_0xbe3567=(await this['_httpService']['post'](_0x5d2234(0x259)+_0x5bf92f+_0x5d2234(0x212),{'body':_0x4c2fe6}))[_0x5d2234(0x1fa)][_0x5d2234(0x238)];return{..._0x4927ee,'id':_0xbe3567[_0x5d2234(0x245)],'dT':_0x14156a['dayjs'](+_0xbe3567[_0x5d2234(0x22b)])[_0x5d2234(0x1e3)](_0x5d2234(0x235)),'personId':_0xbe3567[_0x5d2234(0x20f)]};}else{const _0x4bc083={'memberId':_0x29b3a8,'unitId':_0x5bf92f,'content':_0x533b8a,'mention':_0x4576b9},_0x2b7413=await this[_0x5d2234(0x1f8)][_0x5d2234(0x1df)](_0x5d2234(0x259)+_0x5bf92f+_0x5d2234(0x20b),{'body':_0x4bc083});return _0x260188(_0x2b7413[_0x5d2234(0x1fa)]['comment'],_0x4927ee);}}async[_0x4b6f5f(0x1d9)](_0x3c870c){const _0x26c01a=_0x4b6f5f;var _0x39ef5b,_0x2c7560;const {text:_0x3459c5,unitId:_0x1c8cb7}=_0x3c870c,_0x191e2d=(_0x2c7560=(_0x39ef5b=_0x3459c5[_0x26c01a(0x240)])==null?void 0x0:_0x39ef5b[_0x26c01a(0x243)](_0x5bc0f7=>_0x5bc0f7[_0x26c01a(0x22e)]===_0x14156a['CustomRangeType'][_0x26c01a(0x222)])[_0x26c01a(0x23d)](_0x130b0e=>_0x130b0e[_0x26c01a(0x1f5)]))!=null?_0x2c7560:[],_0x446b8b=JSON[_0x26c01a(0x255)](_0x3459c5),_0x18af25=_0x3c870c[_0x26c01a(0x1e9)],_0x3b2089=_0x3c870c['id'],_0x29a2c0={'memberId':(await this[_0x26c01a(0x1f9)][_0x26c01a(0x24d)](_0x1c8cb7))[_0x26c01a(0x213)](),'unitId':_0x1c8cb7,'threadId':_0x18af25,'mention':_0x191e2d,'content':_0x446b8b,'replyId':_0x3b2089},_0x220bbd=await this[_0x26c01a(0x1f8)]['post']('/universer-api/comment/unit/'+_0x1c8cb7+_0x26c01a(0x254),{'body':_0x29a2c0});return!_0x220bbd['body']['error']||_0x220bbd[_0x26c01a(0x1fa)]['error'][_0x26c01a(0x1dc)]===0x1;}async[_0x4b6f5f(0x204)](_0x511599){const _0x27d994=_0x4b6f5f,{unitId:_0x159ef2}=_0x511599,_0x385fde=_0x511599['threadId'],_0x10edcb={'memberId':this[_0x27d994(0x224)][_0x27d994(0x1d7)]()[_0x27d994(0x1eb)],'unitId':_0x159ef2,'threadId':_0x385fde,'solved':_0x511599[_0x27d994(0x24c)]?_0x2db4ab[_0x27d994(0x22f)]:_0x2db4ab[_0x27d994(0x1d2)]},_0x572a79=await this[_0x27d994(0x1f8)][_0x27d994(0x1df)](_0x27d994(0x259)+_0x159ef2+_0x27d994(0x209),{'body':_0x10edcb});return!_0x572a79['body'][_0x27d994(0x1db)]||_0x572a79[_0x27d994(0x1fa)]['error'][_0x27d994(0x1dc)]===0x1;}async['deleteComment'](_0x2dd25c,_0x57c1ea,_0x3bc636,_0x4883f4){const _0x5ca719=_0x4b6f5f,_0x1c3525={'memberId':(await this[_0x5ca719(0x1f9)]['requireSession'](_0x2dd25c))[_0x5ca719(0x213)](),'threadId':_0x3bc636,'replyId':_0x4883f4,'unitId':_0x2dd25c},_0x2cf57c=await this[_0x5ca719(0x1f8)]['post'](_0x5ca719(0x259)+_0x2dd25c+_0x5ca719(0x217),{'body':_0x1c3525});return!_0x2cf57c[_0x5ca719(0x1fa)]['error']||_0x2cf57c[_0x5ca719(0x1fa)][_0x5ca719(0x1db)][_0x5ca719(0x1dc)]===0x1;}async[_0x4b6f5f(0x21d)](_0x44ad56,_0x1728fc,_0x5a2d4f){const _0x200795=_0x4b6f5f,_0x37ec49={'unitId':_0x44ad56,'threadId':_0x5a2d4f},_0x91ef69=await this[_0x200795(0x1f8)]['post'](_0x200795(0x259)+_0x44ad56+'/list',{'body':_0x37ec49}),_0x2f7a94=_0x5a2d4f[_0x200795(0x23d)](_0x6331d1=>_0x57f91c(_0x91ef69['body'][_0x200795(0x21a)][_0x6331d1],_0x44ad56,_0x1728fc))['filter'](Boolean);return Object[_0x200795(0x1f1)](_0x91ef69[_0x200795(0x1fa)]['users'])['forEach'](_0x18e258=>{const _0x3ca2bf=_0x200795;this['_userService'][_0x3ca2bf(0x1d8)](_0x18e258);}),_0x2f7a94;}[_0x4b6f5f(0x1e1)](_0x59ed07){const _0x31be26=_0x4b6f5f;return{'id':_0x59ed07['id'],'threadId':_0x59ed07['threadId'],'ref':_0x59ed07[_0x31be26(0x1ed)]};}};_0x2da3ad=_0x17b74c([_0xc9af10(0x0,_0x14156a[_0x4b6f5f(0x1f7)](_0x12195e[_0x4b6f5f(0x1e6)])),_0xc9af10(0x1,_0x14156a[_0x4b6f5f(0x1f7)](_0x14156a['UserManagerService'])),_0xc9af10(0x2,_0x14156a[_0x4b6f5f(0x1f7)](_0x3be277[_0x4b6f5f(0x228)]))],_0x2da3ad);var _0x366615=Object[_0x4b6f5f(0x242)],_0x3f6d9f=(_0x52c399,_0x4b7bb8,_0x489cd7,_0x2e5a9a)=>{for(var _0x1e4cd4=_0x2e5a9a>0x1?void 0x0:_0x2e5a9a?_0x366615(_0x4b7bb8,_0x489cd7):_0x4b7bb8,_0x31c724=_0x52c399['length']-0x1,_0x435f7c;_0x31c724>=0x0;_0x31c724--)(_0x435f7c=_0x52c399[_0x31c724])&&(_0x1e4cd4=_0x435f7c(_0x1e4cd4)||_0x1e4cd4);return _0x1e4cd4;},_0x85678b=(_0x56f50d,_0x22ddbd)=>(_0x1be7dc,_0x134079)=>_0x22ddbd(_0x1be7dc,_0x134079,_0x56f50d);let _0x725820=class extends _0x14156a[_0x4b6f5f(0x24b)]{constructor(_0x302250,_0x42d43b){const _0x444bc2=_0x4b6f5f;super(),this[_0x444bc2(0x225)]=_0x302250,this['_threadCommentDataSource']=_0x42d43b,this[_0x444bc2(0x1d4)]();}[_0x4b6f5f(0x1d4)](){const _0x36fe00=_0x4b6f5f;this[_0x36fe00(0x225)][_0x36fe00(0x1d5)]=this[_0x36fe00(0x249)],this[_0x36fe00(0x225)][_0x36fe00(0x1e8)]=!0x1;}};_0x725820=_0x3f6d9f([_0x85678b(0x0,_0x9217ca[_0x4b6f5f(0x21e)]),_0x85678b(0x1,_0x14156a['Inject'](_0x2da3ad))],_0x725820);var _0x2c6919=Object[_0x4b6f5f(0x205)],_0x3416b5=Object[_0x4b6f5f(0x242)],_0x32a1cf=(_0x56f42b,_0x43351f,_0x462b64)=>_0x43351f in _0x56f42b?_0x2c6919(_0x56f42b,_0x43351f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x462b64}):_0x56f42b[_0x43351f]=_0x462b64,_0x2b3e92=(_0x1901b6,_0x1ac601,_0x46cf7b,_0x5ba83c)=>{const _0x236317=_0x4b6f5f;for(var _0x5c6cc0=_0x5ba83c>0x1?void 0x0:_0x5ba83c?_0x3416b5(_0x1ac601,_0x46cf7b):_0x1ac601,_0x2baf7a=_0x1901b6[_0x236317(0x22a)]-0x1,_0x52528a;_0x2baf7a>=0x0;_0x2baf7a--)(_0x52528a=_0x1901b6[_0x2baf7a])&&(_0x5c6cc0=_0x52528a(_0x5c6cc0)||_0x5c6cc0);return _0x5c6cc0;},_0x792674=(_0x9f4900,_0x3364a7)=>(_0x3abde8,_0x2ab6db)=>_0x3364a7(_0x3abde8,_0x2ab6db,_0x9f4900),_0x462b26=(_0x3ebc91,_0x3a6653,_0x35e3f3)=>_0x32a1cf(_0x3ebc91,typeof _0x3a6653!=_0x4b6f5f(0x1fb)?_0x3a6653+'':_0x3a6653,_0x35e3f3);_0xd744f6[_0x4b6f5f(0x201)]=class extends _0x14156a['Plugin']{constructor(_0x256328=_0x1b2a9c,_0x389811,_0x4cdacb){const _0x4bedd8=_0x4b6f5f;super(),this[_0x4bedd8(0x1dd)]=_0x256328,this[_0x4bedd8(0x230)]=_0x389811,this[_0x4bedd8(0x23a)]=_0x4cdacb;const {..._0x47d0ed}=_0x14156a['merge']({},_0x1b2a9c,this[_0x4bedd8(0x1dd)]);this[_0x4bedd8(0x23a)][_0x4bedd8(0x246)](_0x3dd47d,_0x47d0ed);}[_0x4b6f5f(0x247)](){const _0x696018=_0x4b6f5f;[[_0x2da3ad],[_0x725820],[_0x16746b]][_0x696018(0x208)](_0x265974=>{const _0x270c26=_0x696018;this[_0x270c26(0x230)][_0x270c26(0x22d)](_0x265974);});}[_0x4b6f5f(0x1fc)](){const _0x22e107=_0x4b6f5f;this['_injector']['get'](_0x725820),this['_injector'][_0x22e107(0x1da)](_0x16746b);}},_0x462b26(_0xd744f6[_0x4b6f5f(0x201)],_0x4b6f5f(0x211),_0x2e5626),_0x462b26(_0xd744f6['UniverThreadCommentDataSourcePlugin'],_0x4b6f5f(0x23f),_0x14156a['UniverInstanceType'][_0x4b6f5f(0x1ee)]),_0xd744f6[_0x4b6f5f(0x201)]=_0x2b3e92([_0x14156a[_0x4b6f5f(0x1fd)](_0x28798b[_0x4b6f5f(0x23c)],_0x3be277[_0x4b6f5f(0x20c)],_0x24e1bb['UniverLicensePlugin']),_0x792674(0x1,_0x14156a[_0x4b6f5f(0x1f7)](_0x14156a['Injector'])),_0x792674(0x2,_0x14156a[_0x4b6f5f(0x1ff)])],_0xd744f6[_0x4b6f5f(0x201)]),Object['defineProperty'](_0xd744f6,Symbol[_0x4b6f5f(0x227)],{'value':_0x4b6f5f(0x1de)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.12.2-experimental.20251129-0fa20cd",
3
+ "version": "0.12.2-experimental.20251201-5b27b55",
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/license": "0.12.2-experimental.20251129-0fa20cd",
49
- "@univerjs/core": "0.12.2-experimental.20251129-0fa20cd",
50
- "@univerjs/network": "0.12.2-experimental.20251129-0fa20cd",
51
- "@univerjs/thread-comment": "0.12.2-experimental.20251129-0fa20cd",
48
+ "@univerjs-pro/collaboration-client": "0.12.2-experimental.20251201-5b27b55",
49
+ "@univerjs-pro/license": "0.12.2-experimental.20251201-5b27b55",
50
+ "@univerjs/core": "0.12.2-experimental.20251201-5b27b55",
51
+ "@univerjs/network": "0.12.2-experimental.20251201-5b27b55",
52
+ "@univerjs/thread-comment": "0.12.2-experimental.20251201-5b27b55",
52
53
  "@univerjs/protocol": "0.1.47",
53
- "@univerjs/thread-comment-ui": "0.12.2-experimental.20251129-0fa20cd",
54
- "@univerjs-pro/collaboration-client": "0.12.2-experimental.20251129-0fa20cd"
54
+ "@univerjs/thread-comment-ui": "0.12.2-experimental.20251201-5b27b55"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",