@univerjs-pro/thread-comment-datasource 0.12.4-insiders.20251211-c28f914 → 0.12.4-insiders.20251213-692494c

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 _0x46e9c6=_0x3112;(function(_0x427bde,_0x1225a5){const _0x5a69d1=_0x3112,_0x19b7c8=_0x427bde();while(!![]){try{const _0x30ba0e=parseInt(_0x5a69d1(0x112))/0x1+-parseInt(_0x5a69d1(0x17b))/0x2+-parseInt(_0x5a69d1(0x11e))/0x3*(parseInt(_0x5a69d1(0x124))/0x4)+-parseInt(_0x5a69d1(0x151))/0x5+-parseInt(_0x5a69d1(0x10f))/0x6*(-parseInt(_0x5a69d1(0x178))/0x7)+-parseInt(_0x5a69d1(0x138))/0x8+-parseInt(_0x5a69d1(0x16d))/0x9*(-parseInt(_0x5a69d1(0x160))/0xa);if(_0x30ba0e===_0x1225a5)break;else _0x19b7c8['push'](_0x19b7c8['shift']());}catch(_0x3c272d){_0x19b7c8['push'](_0x19b7c8['shift']());}}}(_0x163e,0x7f917));Object[_0x46e9c6(0x140)](exports,Symbol['toStringTag'],{'value':_0x46e9c6(0x123)});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='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3cd504=>(_0x3cd504[_0x3cd504[_0x46e9c6(0x15d)]=0x0]='OpenOrReOpen',_0x3cd504[_0x3cd504['Solved']=0x1]=_0x46e9c6(0x141),_0x3cd504[_0x3cd504[_0x46e9c6(0x16c)]=-0x1]=_0x46e9c6(0x16c),_0x3cd504))(I||{}),v=(_0x27fa7f=>(_0x27fa7f[_0x27fa7f['Unknown']=0x0]='Unknown',_0x27fa7f[_0x27fa7f[_0x46e9c6(0x131)]=0x1]='Add',_0x27fa7f[_0x27fa7f[_0x46e9c6(0x174)]=0x2]=_0x46e9c6(0x174),_0x27fa7f[_0x27fa7f[_0x46e9c6(0x159)]=0x3]=_0x46e9c6(0x159),_0x27fa7f[_0x27fa7f[_0x46e9c6(0x129)]=0x4]='Delete',_0x27fa7f[_0x27fa7f['Solve']=0x5]=_0x46e9c6(0x148),_0x27fa7f[_0x27fa7f[_0x46e9c6(0x16c)]=-0x1]='UNRECOGNIZED',_0x27fa7f))(v||{});const f=_0x35154e=>c[_0x46e9c6(0x139)](new Date(+_0x35154e))[_0x46e9c6(0x173)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x18b54d,_0x3b3c9a)=>{const _0x27bfa9=_0x46e9c6,_0x5e12ad=_0x18b54d[_0x27bfa9(0x180)](c[_0x27bfa9(0x12d)]),_0x2b1c8e=_0x18b54d[_0x27bfa9(0x180)](P[_0x27bfa9(0x166)]);_0x3b3c9a['forEach'](_0x3e0ac0=>{const _0x433a33=_0x27bfa9;_0x5e12ad[_0x433a33(0x118)](_0x3e0ac0)&&_0x3b3c9a[_0x433a33(0x164)](_0x3e0ac0);}),_0x3b3c9a[_0x27bfa9(0x137)]&&(await _0x2b1c8e[_0x27bfa9(0x180)](_0x27bfa9(0x176),{'params':{'userIDs':[..._0x3b3c9a]}}))['body'][_0x27bfa9(0x117)][_0x27bfa9(0x152)](_0x245ee0=>{const _0x368afe=_0x27bfa9;_0x245ee0&&_0x5e12ad[_0x368afe(0x130)](_0x245ee0);});};var $=Object[_0x46e9c6(0x175)],E=(_0x206b66,_0x4bd8c8,_0x3b6c85,_0x13bb52)=>{const _0x458266=_0x46e9c6;for(var _0x2afa1b=_0x13bb52>0x1?void 0x0:_0x13bb52?$(_0x4bd8c8,_0x3b6c85):_0x4bd8c8,_0xa99517=_0x206b66[_0x458266(0x14e)]-0x1,_0x485eba;_0xa99517>=0x0;_0xa99517--)(_0x485eba=_0x206b66[_0xa99517])&&(_0x2afa1b=_0x485eba(_0x2afa1b)||_0x2afa1b);return _0x2afa1b;},S=(_0x3263cb,_0x1f7976)=>(_0x2b1c5c,_0x3f29ec)=>_0x1f7976(_0x2b1c5c,_0x3f29ec,_0x3263cb);function _0x163e(){const _0x1720ab=['createTimestamp','user','/edit','96gQPONA','/universer-api/comment/unit/','slice','1030407XVrCEh','IThreadCommentDataSourceService','userID','map','pluginName','users','getUser','_commentService','disposeWithMe','getUnit','resolved','unitId','3579piCnxT','values','code','root','stringify','Module','2004srjeZO','comments','syncUpdateMutationToColla','COMMENT','rangeType','Delete','commentUpdate$','/list','parentId','UserManagerService','solved','replies','addUser','Add','_config','pipe','error','add','_httpService','size','4616104GGegvL','dayjs','Inject','getComment','_initUserSync','UniverCollaborationClientPlugin','_init','ref','defineProperty','Solved','_threadCommentDataSource','customRanges','onReady','rangeId','userId','getCurrentUser','Solve','subscribe','_configService','ThreadCommentModel','body','_threadCommentDataSourceService','length','/reply','IConfigService','4697695aBvyxV','forEach','DependentOn','Plugin','addComment','dataSource','_initDataSource','deleteComment','Edit','content','filter','post','OpenOrReOpen','getMemberID','YYYY/MM/DD\x20HH:mm','20KprfKc','_userService','_sessionService','_injector','delete','UniverThreadCommentDataSourcePlugin','HTTPService','parse','CustomRangeType','CollaborationSessionService','UniverLicensePlugin','symbol','UNRECOGNIZED','7304481iUmIzW','UNIVER_UNKNOWN','setConfig','payload','_threadCommentModel','replyId','format','Reply','getOwnPropertyDescriptor','/universer-api/user/list','threadId','215803PfFHzM','UniverInstanceType','type','1020250cUollu','Disposable','onStarting','resolveComment','requireSession','get'];_0x163e=function(){return _0x1720ab;};return _0x163e();}let _=class extends c[_0x46e9c6(0x17c)]{constructor(_0x178063,_0xf9d160,_0x59727a,_0x32110f){const _0x267f95=_0x46e9c6;super(),this[_0x267f95(0x119)]=_0x178063,this[_0x267f95(0x171)]=_0xf9d160,this[_0x267f95(0x161)]=_0x59727a,this['_injector']=_0x32110f,this[_0x267f95(0x13e)](),this[_0x267f95(0x13c)]();}[_0x46e9c6(0x13c)](){const _0x1ead02=_0x46e9c6;this[_0x1ead02(0x11a)](this['_threadCommentModel'][_0x1ead02(0x12a)][_0x1ead02(0x133)](j['bufferTime'](0x10))[_0x1ead02(0x149)](_0x3be0bc=>{const _0x1574cc=_0x1ead02,_0x44d4fa=new Set();_0x3be0bc[_0x1574cc(0x152)](_0x23a3e7=>{const _0x5de0aa=_0x1574cc;switch(_0x23a3e7[_0x5de0aa(0x17a)]){case _0x5de0aa(0x135):{const _0xb32be=_0x23a3e7[_0x5de0aa(0x170)]['personId'];_0x44d4fa['add'](_0xb32be);break;}}}),R(this[_0x1574cc(0x163)],_0x44d4fa);}));}[_0x46e9c6(0x13e)](){const _0x3b99fa=_0x46e9c6;this['disposeWithMe'](this[_0x3b99fa(0x119)][_0x3b99fa(0x12a)]['subscribe'](async _0x3e3c22=>{const _0x29aa94=_0x3b99fa;var _0x260913,_0x3d9518,_0x346f8e,_0x328aee;const _0x37f878=(_0x260913=this['_threadCommentModel'][_0x29aa94(0x11b)](_0x3e3c22[_0x29aa94(0x11d)])['find'](_0x192950=>_0x192950[_0x29aa94(0x177)]===_0x3e3c22[_0x29aa94(0x177)]))==null?void 0x0:_0x260913['root'];if(!_0x37f878)return;const {unitId:_0x2b21b9,subUnitId:_0x4e2008}=_0x37f878;switch(_0x3e3c22[_0x29aa94(0x10d)]&&this[_0x29aa94(0x161)][_0x29aa94(0x130)](_0x3e3c22[_0x29aa94(0x10d)]),_0x3e3c22[_0x29aa94(0x17a)]){case v['Add']:break;case v['Reply']:{this[_0x29aa94(0x171)][_0x29aa94(0x155)](_0x2b21b9,_0x4e2008,{'unitId':_0x2b21b9,'subUnitId':_0x4e2008,'ref':'','id':_0x3e3c22[_0x29aa94(0x172)],'dT':f(+_0x3e3c22[_0x29aa94(0x181)]),'threadId':_0x3e3c22[_0x29aa94(0x177)],'personId':(_0x346f8e=(_0x3d9518=_0x3e3c22[_0x29aa94(0x10d)])==null?void 0x0:_0x3d9518[_0x29aa94(0x114)])!=null?_0x346f8e:_0x3e3c22['userId'],'text':JSON[_0x29aa94(0x167)](_0x3e3c22[_0x29aa94(0x15a)]),'parentId':_0x37f878['id']});break;}case v[_0x29aa94(0x129)]:{const _0x39fe25=this[_0x29aa94(0x171)][_0x29aa94(0x13b)](_0x2b21b9,_0x4e2008,_0x3e3c22[_0x29aa94(0x172)]);_0x39fe25&&_0x39fe25[_0x29aa94(0x12c)]&&this['_threadCommentModel'][_0x29aa94(0x158)](_0x2b21b9,_0x4e2008,_0x3e3c22[_0x29aa94(0x172)]);break;}case v[_0x29aa94(0x159)]:{this[_0x29aa94(0x171)]['updateComment'](_0x2b21b9,_0x4e2008,{'commentId':_0x3e3c22[_0x29aa94(0x172)],'text':JSON[_0x29aa94(0x167)](_0x3e3c22['content'])});break;}case v[_0x29aa94(0x148)]:{const _0x4cf9aa=(_0x328aee=this['_threadCommentModel'][_0x29aa94(0x11b)](_0x3e3c22[_0x29aa94(0x11d)])['find'](_0x3b444d=>_0x3b444d[_0x29aa94(0x177)]===_0x3e3c22[_0x29aa94(0x177)]))==null?void 0x0:_0x328aee[_0x29aa94(0x121)];_0x4cf9aa&&this[_0x29aa94(0x171)][_0x29aa94(0x17e)](_0x2b21b9,_0x4e2008,_0x4cf9aa['id'],_0x3e3c22[_0x29aa94(0x12e)]===I['Solved']);break;}}}));}};_=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0x46e9c6(0x13a)](M[_0x46e9c6(0x14b)])),S(0x2,c[_0x46e9c6(0x13a)](c[_0x46e9c6(0x12d)])),S(0x3,c['Inject'](c['Injector']))],_);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x4b589b,_0x4e03a3,_0x4f241b,_0x37b4fe)=>{const _0x4c4c90=_0x46e9c6;for(var _0x76beee=_0x37b4fe>0x1?void 0x0:_0x37b4fe?A(_0x4e03a3,_0x4f241b):_0x4e03a3,_0x401625=_0x4b589b[_0x4c4c90(0x14e)]-0x1,_0x2a8ed7;_0x401625>=0x0;_0x401625--)(_0x2a8ed7=_0x4b589b[_0x401625])&&(_0x76beee=_0x2a8ed7(_0x76beee)||_0x76beee);return _0x76beee;},C=(_0x22e6f7,_0x45e2b0)=>(_0x56654c,_0x341835)=>_0x45e2b0(_0x56654c,_0x341835,_0x22e6f7);function Y(_0x2b87e7,_0x5da547){const _0x484fa3=_0x46e9c6,_0x37a0e4=_0x2b87e7[_0x484fa3(0x12f)][0x0];return{..._0x5da547,'id':_0x37a0e4[_0x484fa3(0x172)],'resolved':_0x2b87e7['solved']===0x1,'dT':f(_0x37a0e4['createTimestamp']),'personId':_0x37a0e4['userId'],'threadId':_0x37a0e4['threadId']};}function G(_0x39b0b6,_0x571eef,_0x557b8e){const _0x5c6fa5=_0x46e9c6;var _0x20cbb2,_0x1b0fa7;if(((_0x1b0fa7=(_0x20cbb2=_0x39b0b6==null?void 0x0:_0x39b0b6[_0x5c6fa5(0x12f)])==null?void 0x0:_0x20cbb2[_0x5c6fa5(0x14e)])!=null?_0x1b0fa7:0x0)>0x0){const _0x160604=(_0x317ac1,_0x2d829b)=>({'id':_0x317ac1['replyId'],'threadId':_0x317ac1[_0x5c6fa5(0x177)],'dT':f(_0x317ac1[_0x5c6fa5(0x181)]),'personId':_0x317ac1[_0x5c6fa5(0x146)],'resolved':_0x39b0b6[_0x5c6fa5(0x12e)]===I[_0x5c6fa5(0x141)],'unitId':_0x571eef,'subUnitId':_0x557b8e,'text':JSON[_0x5c6fa5(0x167)](_0x317ac1[_0x5c6fa5(0x15a)]),'parentId':_0x2d829b}),_0x465e10=_0x160604(_0x39b0b6[_0x5c6fa5(0x12f)][0x0]);return{..._0x465e10,'children':_0x39b0b6[_0x5c6fa5(0x12f)][_0x5c6fa5(0x111)](0x1)[_0x5c6fa5(0x115)](_0x435eb3=>_0x160604(_0x435eb3,_0x465e10['id']))};}return null;}function _0x3112(_0x442ea5,_0x2fae5a){_0x442ea5=_0x442ea5-0x10d;const _0x163e8d=_0x163e();let _0x3112a2=_0x163e8d[_0x442ea5];return _0x3112a2;}let p=class{constructor(_0x51dff2,_0x423984,_0x279369){const _0x492eb0=_0x46e9c6;this[_0x492eb0(0x136)]=_0x51dff2,this[_0x492eb0(0x161)]=_0x423984,this[_0x492eb0(0x162)]=_0x279369;}async[_0x46e9c6(0x155)](_0x30d1a2){const _0x3f8a31=_0x46e9c6;var _0x2ee456,_0x146a0f;const {parentId:_0x5e853d,unitId:_0x40c4e8,text:_0x3f4e33,threadId:_0x4817ab}=_0x30d1a2,_0x51e124=(_0x146a0f=(_0x2ee456=_0x3f4e33[_0x3f8a31(0x143)])==null?void 0x0:_0x2ee456[_0x3f8a31(0x15b)](_0x408aa4=>_0x408aa4[_0x3f8a31(0x128)]===c[_0x3f8a31(0x168)][_0x3f8a31(0x127)])['map'](_0xeff5b8=>_0xeff5b8[_0x3f8a31(0x145)]))!=null?_0x146a0f:[],_0x4a4e52=JSON[_0x3f8a31(0x122)](_0x3f4e33),_0x55429b=(await this[_0x3f8a31(0x162)][_0x3f8a31(0x17f)](_0x40c4e8))['getMemberID']();if(_0x5e853d){const _0x117b10={'memberId':_0x55429b,'unitId':_0x40c4e8,'content':_0x4a4e52,'mention':_0x51e124,'threadId':_0x4817ab},_0x4cf72d=(await this[_0x3f8a31(0x136)]['post'](_0x3f8a31(0x110)+_0x40c4e8+_0x3f8a31(0x14f),{'body':_0x117b10}))['body']['reply'];return{..._0x30d1a2,'id':_0x4cf72d[_0x3f8a31(0x172)],'dT':c[_0x3f8a31(0x139)](+_0x4cf72d[_0x3f8a31(0x181)])[_0x3f8a31(0x173)](_0x3f8a31(0x15f)),'personId':_0x4cf72d[_0x3f8a31(0x146)]};}else{const _0x49ca6c={'memberId':_0x55429b,'unitId':_0x40c4e8,'content':_0x4a4e52,'mention':_0x51e124},_0x424ee5=await this[_0x3f8a31(0x136)][_0x3f8a31(0x15c)](_0x3f8a31(0x110)+_0x40c4e8+'/add',{'body':_0x49ca6c});return Y(_0x424ee5[_0x3f8a31(0x14c)]['comment'],_0x30d1a2);}}async['updateComment'](_0x176a5c){const _0x3a1f57=_0x46e9c6;var _0x242059,_0x1058a4;const {text:_0x58dfed,unitId:_0x273be4}=_0x176a5c,_0x1be85b=(_0x1058a4=(_0x242059=_0x58dfed[_0x3a1f57(0x143)])==null?void 0x0:_0x242059[_0x3a1f57(0x15b)](_0x51f612=>_0x51f612['rangeType']===c[_0x3a1f57(0x168)][_0x3a1f57(0x127)])[_0x3a1f57(0x115)](_0xfa1a20=>_0xfa1a20[_0x3a1f57(0x145)]))!=null?_0x1058a4:[],_0x24ae34=JSON[_0x3a1f57(0x122)](_0x58dfed),_0xe99165=_0x176a5c[_0x3a1f57(0x177)],_0x20c48a=_0x176a5c['id'],_0x450f6d={'memberId':(await this['_sessionService'][_0x3a1f57(0x17f)](_0x273be4))[_0x3a1f57(0x15e)](),'unitId':_0x273be4,'threadId':_0xe99165,'mention':_0x1be85b,'content':_0x24ae34,'replyId':_0x20c48a},_0x476a98=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x273be4+_0x3a1f57(0x10e),{'body':_0x450f6d});return!_0x476a98['body'][_0x3a1f57(0x134)]||_0x476a98['body'][_0x3a1f57(0x134)][_0x3a1f57(0x120)]===0x1;}async[_0x46e9c6(0x17e)](_0x291140){const _0x3288f4=_0x46e9c6,{unitId:_0x134c9b}=_0x291140,_0x3aadec=_0x291140['threadId'],_0x1ca8df={'memberId':this[_0x3288f4(0x161)][_0x3288f4(0x147)]()[_0x3288f4(0x114)],'unitId':_0x134c9b,'threadId':_0x3aadec,'solved':_0x291140[_0x3288f4(0x11c)]?I[_0x3288f4(0x141)]:I[_0x3288f4(0x15d)]},_0x4e24f5=await this[_0x3288f4(0x136)][_0x3288f4(0x15c)](_0x3288f4(0x110)+_0x134c9b+'/solved',{'body':_0x1ca8df});return!_0x4e24f5[_0x3288f4(0x14c)][_0x3288f4(0x134)]||_0x4e24f5[_0x3288f4(0x14c)]['error'][_0x3288f4(0x120)]===0x1;}async['deleteComment'](_0x570573,_0x5b8909,_0x4890a0,_0x4a31db){const _0x87431e=_0x46e9c6,_0x4d8a25={'memberId':(await this[_0x87431e(0x162)][_0x87431e(0x17f)](_0x570573))['getMemberID'](),'threadId':_0x4890a0,'replyId':_0x4a31db,'unitId':_0x570573},_0x5cd1c2=await this[_0x87431e(0x136)]['post'](_0x87431e(0x110)+_0x570573+'/delete',{'body':_0x4d8a25});return!_0x5cd1c2['body'][_0x87431e(0x134)]||_0x5cd1c2['body']['error']['code']===0x1;}async['listComments'](_0x3fb297,_0x4f5d95,_0x403195){const _0x3034eb=_0x46e9c6,_0x2e8bd2={'unitId':_0x3fb297,'threadId':_0x403195},_0x41391b=await this[_0x3034eb(0x136)][_0x3034eb(0x15c)](_0x3034eb(0x110)+_0x3fb297+_0x3034eb(0x12b),{'body':_0x2e8bd2}),_0x4cab01=_0x403195['map'](_0x4b9781=>G(_0x41391b['body'][_0x3034eb(0x125)][_0x4b9781],_0x3fb297,_0x4f5d95))[_0x3034eb(0x15b)](Boolean);return Object[_0x3034eb(0x11f)](_0x41391b[_0x3034eb(0x14c)]['users'])[_0x3034eb(0x152)](_0x3924bf=>{const _0x51265e=_0x3034eb;this['_userService'][_0x51265e(0x130)](_0x3924bf);}),_0x4cab01;}['saveCommentToSnapshot'](_0x40a3a8){const _0x4c3690=_0x46e9c6;return{'id':_0x40a3a8['id'],'threadId':_0x40a3a8[_0x4c3690(0x177)],'ref':_0x40a3a8[_0x4c3690(0x13f)]};}};p=x([C(0x0,c[_0x46e9c6(0x13a)](P[_0x46e9c6(0x166)])),C(0x1,c[_0x46e9c6(0x13a)](c['UserManagerService'])),C(0x2,c['Inject'](b[_0x46e9c6(0x169)]))],p);var H=Object[_0x46e9c6(0x175)],J=(_0x33262d,_0x496af8,_0x60409c,_0x431a53)=>{const _0x110688=_0x46e9c6;for(var _0x1a0e95=_0x431a53>0x1?void 0x0:_0x431a53?H(_0x496af8,_0x60409c):_0x496af8,_0x1ecb82=_0x33262d[_0x110688(0x14e)]-0x1,_0x254421;_0x1ecb82>=0x0;_0x1ecb82--)(_0x254421=_0x33262d[_0x1ecb82])&&(_0x1a0e95=_0x254421(_0x1a0e95)||_0x1a0e95);return _0x1a0e95;},y=(_0x205aa5,_0x1b6edf)=>(_0x9ddeb2,_0x37c99b)=>_0x1b6edf(_0x9ddeb2,_0x37c99b,_0x205aa5);let g=class extends c[_0x46e9c6(0x17c)]{constructor(_0x2b4332,_0x4cc9f1){const _0xd49495=_0x46e9c6;super(),this[_0xd49495(0x14d)]=_0x2b4332,this[_0xd49495(0x142)]=_0x4cc9f1,this[_0xd49495(0x157)]();}['_initDataSource'](){const _0x9843af=_0x46e9c6;this['_threadCommentDataSourceService'][_0x9843af(0x156)]=this[_0x9843af(0x142)],this[_0x9843af(0x14d)][_0x9843af(0x126)]=!0x1;}};g=J([y(0x0,M[_0x46e9c6(0x113)]),y(0x1,c[_0x46e9c6(0x13a)](p))],g);var F=Object[_0x46e9c6(0x140)],L=Object[_0x46e9c6(0x175)],Z=(_0x4a7ad7,_0x2edc54,_0x2290c4)=>_0x2edc54 in _0x4a7ad7?F(_0x4a7ad7,_0x2edc54,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2290c4}):_0x4a7ad7[_0x2edc54]=_0x2290c4,W=(_0x16fcff,_0x442763,_0x159ee6,_0x4b2760)=>{const _0x56a6be=_0x46e9c6;for(var _0x165dd9=_0x4b2760>0x1?void 0x0:_0x4b2760?L(_0x442763,_0x159ee6):_0x442763,_0x5e993c=_0x16fcff[_0x56a6be(0x14e)]-0x1,_0x436200;_0x5e993c>=0x0;_0x5e993c--)(_0x436200=_0x16fcff[_0x5e993c])&&(_0x165dd9=_0x436200(_0x165dd9)||_0x165dd9);return _0x165dd9;},O=(_0x5093a5,_0x470254)=>(_0x2c4d21,_0x4e487e)=>_0x470254(_0x2c4d21,_0x4e487e,_0x5093a5),N=(_0x131619,_0x6bad7c,_0x61e9f5)=>Z(_0x131619,typeof _0x6bad7c!=_0x46e9c6(0x16b)?_0x6bad7c+'':_0x6bad7c,_0x61e9f5);exports[_0x46e9c6(0x165)]=class extends c[_0x46e9c6(0x154)]{constructor(_0x16ccf7=D,_0x34467c,_0x1ea287){const _0xe2fa80=_0x46e9c6;super(),this[_0xe2fa80(0x132)]=_0x16ccf7,this['_injector']=_0x34467c,this[_0xe2fa80(0x14a)]=_0x1ea287;const {..._0x3a6bf3}=c['merge']({},D,this[_0xe2fa80(0x132)]);this['_configService'][_0xe2fa80(0x16f)](q,_0x3a6bf3);}[_0x46e9c6(0x17d)](){const _0x36f722=_0x46e9c6;[[p],[g],[_]][_0x36f722(0x152)](_0x35f2b6=>{const _0x17a4a5=_0x36f722;this['_injector'][_0x17a4a5(0x135)](_0x35f2b6);});}[_0x46e9c6(0x144)](){const _0x2190fb=_0x46e9c6;this['_injector'][_0x2190fb(0x180)](g),this[_0x2190fb(0x163)][_0x2190fb(0x180)](_);}},N(exports[_0x46e9c6(0x165)],_0x46e9c6(0x116),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x46e9c6(0x17a),c[_0x46e9c6(0x179)][_0x46e9c6(0x16e)]),exports[_0x46e9c6(0x165)]=W([c[_0x46e9c6(0x153)](w['UniverThreadCommentUIPlugin'],b[_0x46e9c6(0x13d)],T[_0x46e9c6(0x16a)]),O(0x1,c[_0x46e9c6(0x13a)](c['Injector'])),O(0x2,c[_0x46e9c6(0x150)])],exports[_0x46e9c6(0x165)]);
1
+ 'use strict';const _0x39cd9e=_0x38c6;(function(_0x52ef9f,_0x13bb64){const _0x3e7288=_0x38c6,_0x17cb15=_0x52ef9f();while(!![]){try{const _0x4afee9=-parseInt(_0x3e7288(0x1cf))/0x1*(-parseInt(_0x3e7288(0x1f9))/0x2)+parseInt(_0x3e7288(0x1ba))/0x3*(parseInt(_0x3e7288(0x1d9))/0x4)+parseInt(_0x3e7288(0x1c0))/0x5*(parseInt(_0x3e7288(0x1b6))/0x6)+parseInt(_0x3e7288(0x206))/0x7+parseInt(_0x3e7288(0x1a9))/0x8+-parseInt(_0x3e7288(0x1be))/0x9*(parseInt(_0x3e7288(0x1d4))/0xa)+-parseInt(_0x3e7288(0x205))/0xb;if(_0x4afee9===_0x13bb64)break;else _0x17cb15['push'](_0x17cb15['shift']());}catch(_0x3477e2){_0x17cb15['push'](_0x17cb15['shift']());}}}(_0x15fe,0xb258b));Object[_0x39cd9e(0x1fb)](exports,Symbol[_0x39cd9e(0x1af)],{'value':_0x39cd9e(0x20a)});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=_0x39cd9e(0x1f8);var I=(_0x59d66b=>(_0x59d66b[_0x59d66b[_0x39cd9e(0x1bd)]=0x0]=_0x39cd9e(0x1bd),_0x59d66b[_0x59d66b['Solved']=0x1]=_0x39cd9e(0x1b9),_0x59d66b[_0x59d66b['UNRECOGNIZED']=-0x1]=_0x39cd9e(0x20c),_0x59d66b))(I||{}),v=(_0x29ce6f=>(_0x29ce6f[_0x29ce6f['Unknown']=0x0]=_0x39cd9e(0x1ac),_0x29ce6f[_0x29ce6f[_0x39cd9e(0x1b1)]=0x1]=_0x39cd9e(0x1b1),_0x29ce6f[_0x29ce6f['Reply']=0x2]='Reply',_0x29ce6f[_0x29ce6f[_0x39cd9e(0x213)]=0x3]='Edit',_0x29ce6f[_0x29ce6f[_0x39cd9e(0x1ee)]=0x4]=_0x39cd9e(0x1ee),_0x29ce6f[_0x29ce6f['Solve']=0x5]='Solve',_0x29ce6f[_0x29ce6f[_0x39cd9e(0x20c)]=-0x1]=_0x39cd9e(0x20c),_0x29ce6f))(v||{});const f=_0x335a82=>c[_0x39cd9e(0x1ce)](new Date(+_0x335a82))[_0x39cd9e(0x1f0)](_0x39cd9e(0x1c4)),R=async(_0x2ad364,_0x59fd93)=>{const _0x5446c1=_0x39cd9e,_0x519026=_0x2ad364[_0x5446c1(0x21f)](c[_0x5446c1(0x1ca)]),_0xfa0908=_0x2ad364[_0x5446c1(0x21f)](P['HTTPService']);_0x59fd93[_0x5446c1(0x21b)](_0x249f31=>{const _0x5a3723=_0x5446c1;_0x519026[_0x5a3723(0x1c8)](_0x249f31)&&_0x59fd93['delete'](_0x249f31);}),_0x59fd93[_0x5446c1(0x1bb)]&&(await _0xfa0908[_0x5446c1(0x21f)](_0x5446c1(0x1f1),{'params':{'userIDs':[..._0x59fd93]}}))[_0x5446c1(0x1a7)][_0x5446c1(0x208)][_0x5446c1(0x21b)](_0x14c117=>{const _0x46ef22=_0x5446c1;_0x14c117&&_0x519026[_0x46ef22(0x1c7)](_0x14c117);});};var $=Object[_0x39cd9e(0x20e)],E=(_0x55efa9,_0x4a4c41,_0x3c96a7,_0x140e3c)=>{const _0x52b430=_0x39cd9e;for(var _0x18d823=_0x140e3c>0x1?void 0x0:_0x140e3c?$(_0x4a4c41,_0x3c96a7):_0x4a4c41,_0x369789=_0x55efa9[_0x52b430(0x20b)]-0x1,_0x3ea411;_0x369789>=0x0;_0x369789--)(_0x3ea411=_0x55efa9[_0x369789])&&(_0x18d823=_0x3ea411(_0x18d823)||_0x18d823);return _0x18d823;},S=(_0x59ec5f,_0x13d378)=>(_0x6c8f45,_0x156d51)=>_0x13d378(_0x6c8f45,_0x156d51,_0x59ec5f);function _0x15fe(){const _0x55fc3d=['Reply','rangeId','Solved','249bpBMwi','size','UniverInstanceType','OpenOrReOpen','9mpCPEZ','threadId','2012295AaQOXl','_httpService','setConfig','comment','YYYY/MM/DD\x20HH:mm','type','personId','addUser','getUser','rangeType','UserManagerService','payload','replyId','userID','dayjs','430937zpSXBk','_commentService','map','addComment','unitId','11820310oPKDHC','getUnit','CustomRangeType','parse','dataSource','46388JCUfMB','content','onReady','_injector','UniverThreadCommentDataSourcePlugin','/reply','reply','_initDataSource','HTTPService','stringify','solved','_config','_sessionService','/add','customRanges','disposeWithMe','COMMENT','commentUpdate$','slice','_threadCommentModel','UniverCollaborationClientPlugin','Delete','find','format','/universer-api/user/list','/delete','error','deleteComment','resolved','resolveComment','Disposable','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','2zHyYMB','/universer-api/comment/unit/','defineProperty','add','CommentService','pipe','comments','replies','userId','IConfigService','post','Inject','24135452tCqUtX','7303142zEebVN','bufferTime','users','ThreadCommentModel','Module','length','UNRECOGNIZED','IThreadCommentDataSourceService','getOwnPropertyDescriptor','DependentOn','syncUpdateMutationToColla','ref','_userService','Edit','getCurrentUser','requireSession','_init','root','/list','/edit','UniverLicensePlugin','forEach','getMemberID','code','pluginName','get','createTimestamp','Injector','updateComment','_threadCommentDataSource','user','body','onStarting','10139336DlFlpy','subscribe','_threadCommentDataSourceService','Unknown','filter','merge','toStringTag','CollaborationSessionService','Add','Solve','Plugin','_configService','getComment','6xjHuOO'];_0x15fe=function(){return _0x55fc3d;};return _0x15fe();}function _0x38c6(_0xf01d7b,_0x214f47){_0xf01d7b=_0xf01d7b-0x1a4;const _0x15fe84=_0x15fe();let _0x38c69f=_0x15fe84[_0xf01d7b];return _0x38c69f;}let _=class extends c[_0x39cd9e(0x1f7)]{constructor(_0x2da5db,_0x21a9ed,_0x56f7c6,_0x11f535){const _0x571320=_0x39cd9e;super(),this[_0x571320(0x1d0)]=_0x2da5db,this['_threadCommentModel']=_0x21a9ed,this[_0x571320(0x212)]=_0x56f7c6,this['_injector']=_0x11f535,this[_0x571320(0x216)](),this['_initUserSync']();}['_initUserSync'](){const _0x5c112e=_0x39cd9e;this[_0x5c112e(0x1e8)](this[_0x5c112e(0x1ec)][_0x5c112e(0x1ea)][_0x5c112e(0x1fe)](j[_0x5c112e(0x207)](0x10))[_0x5c112e(0x1aa)](_0x5df37b=>{const _0x2bd787=_0x5c112e,_0x3e94ca=new Set();_0x5df37b[_0x2bd787(0x21b)](_0x17d075=>{const _0x1a7ddb=_0x2bd787;switch(_0x17d075[_0x1a7ddb(0x1c5)]){case _0x1a7ddb(0x1fc):{const _0x23e0e1=_0x17d075[_0x1a7ddb(0x1cb)][_0x1a7ddb(0x1c6)];_0x3e94ca[_0x1a7ddb(0x1fc)](_0x23e0e1);break;}}}),R(this[_0x2bd787(0x1dc)],_0x3e94ca);}));}[_0x39cd9e(0x216)](){const _0x5a95ab=_0x39cd9e;this[_0x5a95ab(0x1e8)](this[_0x5a95ab(0x1d0)][_0x5a95ab(0x1ea)][_0x5a95ab(0x1aa)](async _0xac9c68=>{const _0x2cce43=_0x5a95ab;var _0x397191,_0xc2c8f0,_0x5e34e6,_0x482301;const _0x381474=(_0x397191=this['_threadCommentModel'][_0x2cce43(0x1d5)](_0xac9c68[_0x2cce43(0x1d3)])['find'](_0x5ae257=>_0x5ae257[_0x2cce43(0x1bf)]===_0xac9c68['threadId']))==null?void 0x0:_0x397191['root'];if(!_0x381474)return;const {unitId:_0x49a13d,subUnitId:_0x516f78}=_0x381474;switch(_0xac9c68['user']&&this[_0x2cce43(0x212)][_0x2cce43(0x1c7)](_0xac9c68[_0x2cce43(0x1a6)]),_0xac9c68[_0x2cce43(0x1c5)]){case v['Add']:break;case v[_0x2cce43(0x1b7)]:{this[_0x2cce43(0x1ec)]['addComment'](_0x49a13d,_0x516f78,{'unitId':_0x49a13d,'subUnitId':_0x516f78,'ref':'','id':_0xac9c68[_0x2cce43(0x1cc)],'dT':f(+_0xac9c68[_0x2cce43(0x220)]),'threadId':_0xac9c68[_0x2cce43(0x1bf)],'personId':(_0x5e34e6=(_0xc2c8f0=_0xac9c68['user'])==null?void 0x0:_0xc2c8f0['userID'])!=null?_0x5e34e6:_0xac9c68[_0x2cce43(0x201)],'text':JSON[_0x2cce43(0x1d7)](_0xac9c68[_0x2cce43(0x1da)]),'parentId':_0x381474['id']});break;}case v[_0x2cce43(0x1ee)]:{const _0x10bc16=this[_0x2cce43(0x1ec)][_0x2cce43(0x1b5)](_0x49a13d,_0x516f78,_0xac9c68[_0x2cce43(0x1cc)]);_0x10bc16&&_0x10bc16['parentId']&&this[_0x2cce43(0x1ec)][_0x2cce43(0x1f4)](_0x49a13d,_0x516f78,_0xac9c68[_0x2cce43(0x1cc)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x2cce43(0x1a4)](_0x49a13d,_0x516f78,{'commentId':_0xac9c68[_0x2cce43(0x1cc)],'text':JSON[_0x2cce43(0x1d7)](_0xac9c68[_0x2cce43(0x1da)])});break;}case v[_0x2cce43(0x1b2)]:{const _0x3ed754=(_0x482301=this['_threadCommentModel']['getUnit'](_0xac9c68[_0x2cce43(0x1d3)])[_0x2cce43(0x1ef)](_0x4f38e5=>_0x4f38e5[_0x2cce43(0x1bf)]===_0xac9c68['threadId']))==null?void 0x0:_0x482301[_0x2cce43(0x217)];_0x3ed754&&this['_threadCommentModel'][_0x2cce43(0x1f6)](_0x49a13d,_0x516f78,_0x3ed754['id'],_0xac9c68[_0x2cce43(0x1e3)]===I[_0x2cce43(0x1b9)]);break;}}}));}};_=E([S(0x0,c[_0x39cd9e(0x204)](b[_0x39cd9e(0x1fd)])),S(0x1,c[_0x39cd9e(0x204)](M[_0x39cd9e(0x209)])),S(0x2,c[_0x39cd9e(0x204)](c[_0x39cd9e(0x1ca)])),S(0x3,c['Inject'](c[_0x39cd9e(0x221)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x39cd9e(0x20e)],x=(_0x375ea7,_0x8ffa94,_0xc4ccfc,_0x1df547)=>{for(var _0x3fd3ac=_0x1df547>0x1?void 0x0:_0x1df547?A(_0x8ffa94,_0xc4ccfc):_0x8ffa94,_0x15b061=_0x375ea7['length']-0x1,_0x3f151d;_0x15b061>=0x0;_0x15b061--)(_0x3f151d=_0x375ea7[_0x15b061])&&(_0x3fd3ac=_0x3f151d(_0x3fd3ac)||_0x3fd3ac);return _0x3fd3ac;},C=(_0x29e769,_0x33046a)=>(_0x4aa702,_0x1d5cd5)=>_0x33046a(_0x4aa702,_0x1d5cd5,_0x29e769);function Y(_0x127912,_0x235d92){const _0x2f9503=_0x39cd9e,_0x254c3c=_0x127912[_0x2f9503(0x200)][0x0];return{..._0x235d92,'id':_0x254c3c['replyId'],'resolved':_0x127912['solved']===0x1,'dT':f(_0x254c3c['createTimestamp']),'personId':_0x254c3c[_0x2f9503(0x201)],'threadId':_0x254c3c[_0x2f9503(0x1bf)]};}function G(_0x50de8f,_0x4c0c8c,_0x58e622){const _0x282034=_0x39cd9e;var _0x254d2e,_0x3cb45b;if(((_0x3cb45b=(_0x254d2e=_0x50de8f==null?void 0x0:_0x50de8f['replies'])==null?void 0x0:_0x254d2e[_0x282034(0x20b)])!=null?_0x3cb45b:0x0)>0x0){const _0x42299d=(_0x9741de,_0x4c6aa0)=>({'id':_0x9741de[_0x282034(0x1cc)],'threadId':_0x9741de[_0x282034(0x1bf)],'dT':f(_0x9741de[_0x282034(0x220)]),'personId':_0x9741de[_0x282034(0x201)],'resolved':_0x50de8f[_0x282034(0x1e3)]===I[_0x282034(0x1b9)],'unitId':_0x4c0c8c,'subUnitId':_0x58e622,'text':JSON[_0x282034(0x1d7)](_0x9741de['content']),'parentId':_0x4c6aa0}),_0x3f9946=_0x42299d(_0x50de8f[_0x282034(0x200)][0x0]);return{..._0x3f9946,'children':_0x50de8f['replies'][_0x282034(0x1eb)](0x1)[_0x282034(0x1d1)](_0x37bd25=>_0x42299d(_0x37bd25,_0x3f9946['id']))};}return null;}let p=class{constructor(_0x32b253,_0x105f27,_0xb282d3){const _0x4fb193=_0x39cd9e;this['_httpService']=_0x32b253,this[_0x4fb193(0x212)]=_0x105f27,this[_0x4fb193(0x1e5)]=_0xb282d3;}async[_0x39cd9e(0x1d2)](_0x27e7c3){const _0x214823=_0x39cd9e;var _0x266017,_0x213b88;const {parentId:_0x4b4bcb,unitId:_0x20c0ea,text:_0x23dfb8,threadId:_0x53ce3d}=_0x27e7c3,_0x5e65b0=(_0x213b88=(_0x266017=_0x23dfb8[_0x214823(0x1e7)])==null?void 0x0:_0x266017[_0x214823(0x1ad)](_0x54803e=>_0x54803e['rangeType']===c[_0x214823(0x1d6)][_0x214823(0x1e9)])[_0x214823(0x1d1)](_0x16195c=>_0x16195c[_0x214823(0x1b8)]))!=null?_0x213b88:[],_0x4249d1=JSON[_0x214823(0x1e2)](_0x23dfb8),_0x295c8c=(await this[_0x214823(0x1e5)]['requireSession'](_0x20c0ea))['getMemberID']();if(_0x4b4bcb){const _0x3cc9dd={'memberId':_0x295c8c,'unitId':_0x20c0ea,'content':_0x4249d1,'mention':_0x5e65b0,'threadId':_0x53ce3d},_0x45d314=(await this[_0x214823(0x1c1)][_0x214823(0x203)](_0x214823(0x1fa)+_0x20c0ea+_0x214823(0x1de),{'body':_0x3cc9dd}))[_0x214823(0x1a7)][_0x214823(0x1df)];return{..._0x27e7c3,'id':_0x45d314['replyId'],'dT':c['dayjs'](+_0x45d314[_0x214823(0x220)])[_0x214823(0x1f0)](_0x214823(0x1c4)),'personId':_0x45d314[_0x214823(0x201)]};}else{const _0x5cc501={'memberId':_0x295c8c,'unitId':_0x20c0ea,'content':_0x4249d1,'mention':_0x5e65b0},_0x41a5bd=await this[_0x214823(0x1c1)][_0x214823(0x203)](_0x214823(0x1fa)+_0x20c0ea+_0x214823(0x1e6),{'body':_0x5cc501});return Y(_0x41a5bd[_0x214823(0x1a7)][_0x214823(0x1c3)],_0x27e7c3);}}async[_0x39cd9e(0x1a4)](_0x5894b3){const _0xb64223=_0x39cd9e;var _0x2fa005,_0x1f0e42;const {text:_0x2faa29,unitId:_0x31585a}=_0x5894b3,_0x28ece3=(_0x1f0e42=(_0x2fa005=_0x2faa29[_0xb64223(0x1e7)])==null?void 0x0:_0x2fa005[_0xb64223(0x1ad)](_0x66e9d3=>_0x66e9d3[_0xb64223(0x1c9)]===c[_0xb64223(0x1d6)][_0xb64223(0x1e9)])[_0xb64223(0x1d1)](_0x205240=>_0x205240[_0xb64223(0x1b8)]))!=null?_0x1f0e42:[],_0x5dd23a=JSON[_0xb64223(0x1e2)](_0x2faa29),_0x22ef47=_0x5894b3[_0xb64223(0x1bf)],_0x5c8c7f=_0x5894b3['id'],_0x2fb54b={'memberId':(await this[_0xb64223(0x1e5)][_0xb64223(0x215)](_0x31585a))['getMemberID'](),'unitId':_0x31585a,'threadId':_0x22ef47,'mention':_0x28ece3,'content':_0x5dd23a,'replyId':_0x5c8c7f},_0x46105c=await this[_0xb64223(0x1c1)][_0xb64223(0x203)](_0xb64223(0x1fa)+_0x31585a+_0xb64223(0x219),{'body':_0x2fb54b});return!_0x46105c[_0xb64223(0x1a7)]['error']||_0x46105c[_0xb64223(0x1a7)]['error'][_0xb64223(0x21d)]===0x1;}async[_0x39cd9e(0x1f6)](_0x543e6f){const _0x315d61=_0x39cd9e,{unitId:_0x5c4233}=_0x543e6f,_0x44d0b4=_0x543e6f[_0x315d61(0x1bf)],_0x3aad58={'memberId':this[_0x315d61(0x212)][_0x315d61(0x214)]()[_0x315d61(0x1cd)],'unitId':_0x5c4233,'threadId':_0x44d0b4,'solved':_0x543e6f[_0x315d61(0x1f5)]?I[_0x315d61(0x1b9)]:I[_0x315d61(0x1bd)]},_0xe01942=await this[_0x315d61(0x1c1)][_0x315d61(0x203)](_0x315d61(0x1fa)+_0x5c4233+'/solved',{'body':_0x3aad58});return!_0xe01942[_0x315d61(0x1a7)][_0x315d61(0x1f3)]||_0xe01942['body']['error'][_0x315d61(0x21d)]===0x1;}async[_0x39cd9e(0x1f4)](_0x5706db,_0x3fff49,_0x1e0ab0,_0x416d69){const _0x20d756=_0x39cd9e,_0x3f07e1={'memberId':(await this[_0x20d756(0x1e5)][_0x20d756(0x215)](_0x5706db))[_0x20d756(0x21c)](),'threadId':_0x1e0ab0,'replyId':_0x416d69,'unitId':_0x5706db},_0x1e850b=await this['_httpService'][_0x20d756(0x203)]('/universer-api/comment/unit/'+_0x5706db+_0x20d756(0x1f2),{'body':_0x3f07e1});return!_0x1e850b[_0x20d756(0x1a7)]['error']||_0x1e850b[_0x20d756(0x1a7)][_0x20d756(0x1f3)][_0x20d756(0x21d)]===0x1;}async['listComments'](_0x1e23ac,_0x1df984,_0x68596e){const _0x5f1175=_0x39cd9e,_0x3d62ff={'unitId':_0x1e23ac,'threadId':_0x68596e},_0xf1439a=await this[_0x5f1175(0x1c1)][_0x5f1175(0x203)]('/universer-api/comment/unit/'+_0x1e23ac+_0x5f1175(0x218),{'body':_0x3d62ff}),_0x525acb=_0x68596e[_0x5f1175(0x1d1)](_0x2de6da=>G(_0xf1439a[_0x5f1175(0x1a7)][_0x5f1175(0x1ff)][_0x2de6da],_0x1e23ac,_0x1df984))[_0x5f1175(0x1ad)](Boolean);return Object['values'](_0xf1439a['body'][_0x5f1175(0x208)])[_0x5f1175(0x21b)](_0x44cc48=>{const _0x172627=_0x5f1175;this[_0x172627(0x212)][_0x172627(0x1c7)](_0x44cc48);}),_0x525acb;}['saveCommentToSnapshot'](_0x1b0559){const _0xfe797e=_0x39cd9e;return{'id':_0x1b0559['id'],'threadId':_0x1b0559['threadId'],'ref':_0x1b0559[_0xfe797e(0x211)]};}};p=x([C(0x0,c[_0x39cd9e(0x204)](P[_0x39cd9e(0x1e1)])),C(0x1,c[_0x39cd9e(0x204)](c[_0x39cd9e(0x1ca)])),C(0x2,c[_0x39cd9e(0x204)](b[_0x39cd9e(0x1b0)]))],p);var H=Object[_0x39cd9e(0x20e)],J=(_0x193889,_0x2279e4,_0x1ab2f3,_0x51fe45)=>{const _0x254668=_0x39cd9e;for(var _0x4c7c9f=_0x51fe45>0x1?void 0x0:_0x51fe45?H(_0x2279e4,_0x1ab2f3):_0x2279e4,_0x12d0df=_0x193889[_0x254668(0x20b)]-0x1,_0x212f0d;_0x12d0df>=0x0;_0x12d0df--)(_0x212f0d=_0x193889[_0x12d0df])&&(_0x4c7c9f=_0x212f0d(_0x4c7c9f)||_0x4c7c9f);return _0x4c7c9f;},y=(_0x4b7578,_0x563989)=>(_0x3c2530,_0x2a8fa)=>_0x563989(_0x3c2530,_0x2a8fa,_0x4b7578);let g=class extends c[_0x39cd9e(0x1f7)]{constructor(_0x45dd60,_0x90bb8f){const _0xff20d7=_0x39cd9e;super(),this['_threadCommentDataSourceService']=_0x45dd60,this[_0xff20d7(0x1a5)]=_0x90bb8f,this['_initDataSource']();}[_0x39cd9e(0x1e0)](){const _0x28ec03=_0x39cd9e;this['_threadCommentDataSourceService'][_0x28ec03(0x1d8)]=this[_0x28ec03(0x1a5)],this[_0x28ec03(0x1ab)][_0x28ec03(0x210)]=!0x1;}};g=J([y(0x0,M[_0x39cd9e(0x20d)]),y(0x1,c[_0x39cd9e(0x204)](p))],g);var F=Object['defineProperty'],L=Object[_0x39cd9e(0x20e)],Z=(_0x392561,_0x405ef9,_0x3ebddf)=>_0x405ef9 in _0x392561?F(_0x392561,_0x405ef9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3ebddf}):_0x392561[_0x405ef9]=_0x3ebddf,W=(_0x34959f,_0x26d0c0,_0x26c090,_0x935f06)=>{const _0x2f4759=_0x39cd9e;for(var _0x25cbb5=_0x935f06>0x1?void 0x0:_0x935f06?L(_0x26d0c0,_0x26c090):_0x26d0c0,_0x295489=_0x34959f[_0x2f4759(0x20b)]-0x1,_0x1d6f1a;_0x295489>=0x0;_0x295489--)(_0x1d6f1a=_0x34959f[_0x295489])&&(_0x25cbb5=_0x1d6f1a(_0x25cbb5)||_0x25cbb5);return _0x25cbb5;},O=(_0x8d4afb,_0x26c5a7)=>(_0x478488,_0x25ac6a)=>_0x26c5a7(_0x478488,_0x25ac6a,_0x8d4afb),N=(_0x5f34f9,_0x1de444,_0x52e4d8)=>Z(_0x5f34f9,typeof _0x1de444!='symbol'?_0x1de444+'':_0x1de444,_0x52e4d8);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x39cd9e(0x1b3)]{constructor(_0x4016de=D,_0x1a246a,_0x1029b6){const _0x130b86=_0x39cd9e;super(),this[_0x130b86(0x1e4)]=_0x4016de,this['_injector']=_0x1a246a,this['_configService']=_0x1029b6;const {..._0x2495d8}=c[_0x130b86(0x1ae)]({},D,this[_0x130b86(0x1e4)]);this[_0x130b86(0x1b4)][_0x130b86(0x1c2)](q,_0x2495d8);}[_0x39cd9e(0x1a8)](){const _0x50a008=_0x39cd9e;[[p],[g],[_]][_0x50a008(0x21b)](_0x1083e8=>{const _0x522b5c=_0x50a008;this[_0x522b5c(0x1dc)][_0x522b5c(0x1fc)](_0x1083e8);});}[_0x39cd9e(0x1db)](){const _0x2eb2a9=_0x39cd9e;this[_0x2eb2a9(0x1dc)][_0x2eb2a9(0x21f)](g),this[_0x2eb2a9(0x1dc)][_0x2eb2a9(0x21f)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x39cd9e(0x21e),U),N(exports[_0x39cd9e(0x1dd)],'type',c[_0x39cd9e(0x1bc)]['UNIVER_UNKNOWN']),exports[_0x39cd9e(0x1dd)]=W([c[_0x39cd9e(0x20f)](w['UniverThreadCommentUIPlugin'],b[_0x39cd9e(0x1ed)],T[_0x39cd9e(0x21a)]),O(0x1,c['Inject'](c[_0x39cd9e(0x221)])),O(0x2,c[_0x39cd9e(0x202)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5b4b18=_0x2abc;(function(_0x373411,_0x2c57d6){const _0x48c78d=_0x2abc,_0x398f8b=_0x373411();while(!![]){try{const _0x3d2076=-parseInt(_0x48c78d(0xd6))/0x1+-parseInt(_0x48c78d(0x85))/0x2*(-parseInt(_0x48c78d(0xd8))/0x3)+-parseInt(_0x48c78d(0xd5))/0x4+-parseInt(_0x48c78d(0xe1))/0x5*(-parseInt(_0x48c78d(0x83))/0x6)+-parseInt(_0x48c78d(0x7e))/0x7+-parseInt(_0x48c78d(0xc9))/0x8*(parseInt(_0x48c78d(0xdc))/0x9)+-parseInt(_0x48c78d(0x92))/0xa*(-parseInt(_0x48c78d(0x8a))/0xb);if(_0x3d2076===_0x2c57d6)break;else _0x398f8b['push'](_0x398f8b['shift']());}catch(_0x2d9a18){_0x398f8b['push'](_0x398f8b['shift']());}}}(_0x38e8,0xf202b));import{CommentService as _0x5cceb5,CollaborationSessionService as _0x46094c,UniverCollaborationClientPlugin as _0x28de78}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xd9c1f9}from'@univerjs-pro/license';import{dayjs as _0x3e7be6,UserManagerService as _0x1d9a15,Inject as _0x241ced,Injector as _0x59bd72,Disposable as _0x24aa00,CustomRangeType as _0x204e42,UniverInstanceType as _0x549035,DependentOn as _0x43f6a1,IConfigService as _0x2266a5,Plugin as _0x7c2625,merge as _0x30d2bc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5ef373}from'@univerjs/thread-comment-ui';function _0x2abc(_0x5760a2,_0x361617){_0x5760a2=_0x5760a2-0x7d;const _0x38e8e8=_0x38e8();let _0x2abc01=_0x38e8e8[_0x5760a2];return _0x2abc01;}import{ThreadCommentModel as _0x5caa47,IThreadCommentDataSourceService as _0x2f2070}from'@univerjs/thread-comment';function _0x38e8(){const _0x111dc2=['getOwnPropertyDescriptor','symbol','parse','reply','rangeType','_userService','_threadCommentDataSource','ref','_sessionService','_configService','threadId','OpenOrReOpen','Solve','7137672EOUXij','YYYY/MM/DD\x20HH:mm','addUser','createTimestamp','_commentService','_httpService','updateComment','addComment','pluginName','root','userID','comment','7384648SiFwpR','552084qCRUYn','getUnit','485322caRlfx','parentId','_initDataSource','get','9zGdQbS','_threadCommentModel','replyId','type','/universer-api/comment/unit/','1860vIwiqb','getCurrentUser','values','75684XSHrAN','_initUserSync','saveCommentToSnapshot','/reply','_config','4692SbOIMM','deleteComment','16DRvgHj','commentUpdate$','COMMENT','solved','Edit','4963651dEGnpV','getMemberID','map','getUser','pipe','stringify','customRanges','thread-comment-data-source.config','60LDpXMq','Reply','post','size','/delete','resolved','replies','personId','add','/list','dataSource','UNIVER_UNKNOWN','Unknown','unitId','error','code','_threadCommentDataSourceService','comments','_init','disposeWithMe','setConfig','Delete','user','/add','Add','syncUpdateMutationToColla','forEach','Solved','getComment','users','_injector','content','subscribe','UNRECOGNIZED','userId','/edit','requireSession','length','slice','resolveComment','onReady','body'];_0x38e8=function(){return _0x111dc2;};return _0x38e8();}import{bufferTime as _0x2770a1}from'rxjs';import{HTTPService as _0x35de56}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1041f6=>(_0x1041f6[_0x1041f6[_0x5b4b18(0xc7)]=0x0]=_0x5b4b18(0xc7),_0x1041f6[_0x1041f6[_0x5b4b18(0xad)]=0x1]=_0x5b4b18(0xad),_0x1041f6[_0x1041f6[_0x5b4b18(0xb3)]=-0x1]=_0x5b4b18(0xb3),_0x1041f6))(I||{}),v=(_0x273b9c=>(_0x273b9c[_0x273b9c['Unknown']=0x0]=_0x5b4b18(0x9e),_0x273b9c[_0x273b9c[_0x5b4b18(0xaa)]=0x1]=_0x5b4b18(0xaa),_0x273b9c[_0x273b9c['Reply']=0x2]=_0x5b4b18(0x93),_0x273b9c[_0x273b9c[_0x5b4b18(0x89)]=0x3]=_0x5b4b18(0x89),_0x273b9c[_0x273b9c[_0x5b4b18(0xa7)]=0x4]='Delete',_0x273b9c[_0x273b9c[_0x5b4b18(0xc8)]=0x5]=_0x5b4b18(0xc8),_0x273b9c[_0x273b9c[_0x5b4b18(0xb3)]=-0x1]=_0x5b4b18(0xb3),_0x273b9c))(v||{});const y=_0x476f44=>_0x3e7be6(new Date(+_0x476f44))['format'](_0x5b4b18(0xca)),B=async(_0x1727b9,_0xc465d1)=>{const _0x34a331=_0x5b4b18,_0x3ac4bb=_0x1727b9['get'](_0x1d9a15),_0x4853a9=_0x1727b9[_0x34a331(0xdb)](_0x35de56);_0xc465d1['forEach'](_0x1d34ab=>{const _0x16c18a=_0x34a331;_0x3ac4bb[_0x16c18a(0x8d)](_0x1d34ab)&&_0xc465d1['delete'](_0x1d34ab);}),_0xc465d1[_0x34a331(0x95)]&&(await _0x4853a9['get']('/universer-api/user/list',{'params':{'userIDs':[..._0xc465d1]}}))[_0x34a331(0xbb)][_0x34a331(0xaf)]['forEach'](_0x5e9b92=>{const _0x1cf271=_0x34a331;_0x5e9b92&&_0x3ac4bb[_0x1cf271(0xcb)](_0x5e9b92);});};var K=Object[_0x5b4b18(0xbc)],V=(_0x3ee7f9,_0x437594,_0x5c3260,_0x1ba229)=>{const _0x3d9194=_0x5b4b18;for(var _0x502a93=_0x1ba229>0x1?void 0x0:_0x1ba229?K(_0x437594,_0x5c3260):_0x437594,_0x42c5ff=_0x3ee7f9[_0x3d9194(0xb7)]-0x1,_0x4b5863;_0x42c5ff>=0x0;_0x42c5ff--)(_0x4b5863=_0x3ee7f9[_0x42c5ff])&&(_0x502a93=_0x4b5863(_0x502a93)||_0x502a93);return _0x502a93;},p=(_0x291178,_0x3b8eca)=>(_0x31378c,_0x26679e)=>_0x3b8eca(_0x31378c,_0x26679e,_0x291178);let _=class extends _0x24aa00{constructor(_0x45fa9e,_0x28967b,_0xc9c982,_0x190bbc){const _0x19aef1=_0x5b4b18;super(),this[_0x19aef1(0xcd)]=_0x45fa9e,this[_0x19aef1(0xdd)]=_0x28967b,this[_0x19aef1(0xc1)]=_0xc9c982,this['_injector']=_0x190bbc,this['_init'](),this['_initUserSync']();}[_0x5b4b18(0x7f)](){const _0x3cbf42=_0x5b4b18;this['disposeWithMe'](this[_0x3cbf42(0xdd)]['commentUpdate$'][_0x3cbf42(0x8e)](_0x2770a1(0x10))[_0x3cbf42(0xb2)](_0x47b934=>{const _0x4cd67d=_0x3cbf42,_0x5f1252=new Set();_0x47b934[_0x4cd67d(0xac)](_0x26b950=>{const _0x4e730f=_0x4cd67d;switch(_0x26b950['type']){case _0x4e730f(0x9a):{const _0x346d64=_0x26b950['payload'][_0x4e730f(0x99)];_0x5f1252[_0x4e730f(0x9a)](_0x346d64);break;}}}),B(this[_0x4cd67d(0xb0)],_0x5f1252);}));}[_0x5b4b18(0xa4)](){const _0x3e703f=_0x5b4b18;this[_0x3e703f(0xa5)](this[_0x3e703f(0xcd)][_0x3e703f(0x86)]['subscribe'](async _0x11ca92=>{const _0x4914a7=_0x3e703f;var _0x45f3f7,_0x450f4a,_0x55966f,_0x33b620;const _0x99c1a3=(_0x45f3f7=this['_threadCommentModel'][_0x4914a7(0xd7)](_0x11ca92['unitId'])['find'](_0x4d71a1=>_0x4d71a1['threadId']===_0x11ca92[_0x4914a7(0xc6)]))==null?void 0x0:_0x45f3f7['root'];if(!_0x99c1a3)return;const {unitId:_0x20a3b9,subUnitId:_0x453347}=_0x99c1a3;switch(_0x11ca92[_0x4914a7(0xa8)]&&this[_0x4914a7(0xc1)][_0x4914a7(0xcb)](_0x11ca92[_0x4914a7(0xa8)]),_0x11ca92[_0x4914a7(0xdf)]){case v[_0x4914a7(0xaa)]:break;case v[_0x4914a7(0x93)]:{this[_0x4914a7(0xdd)]['addComment'](_0x20a3b9,_0x453347,{'unitId':_0x20a3b9,'subUnitId':_0x453347,'ref':'','id':_0x11ca92[_0x4914a7(0xde)],'dT':y(+_0x11ca92[_0x4914a7(0xcc)]),'threadId':_0x11ca92[_0x4914a7(0xc6)],'personId':(_0x55966f=(_0x450f4a=_0x11ca92[_0x4914a7(0xa8)])==null?void 0x0:_0x450f4a[_0x4914a7(0xd3)])!=null?_0x55966f:_0x11ca92[_0x4914a7(0xb4)],'text':JSON[_0x4914a7(0xbe)](_0x11ca92[_0x4914a7(0xb1)]),'parentId':_0x99c1a3['id']});break;}case v[_0x4914a7(0xa7)]:{const _0x3e1905=this[_0x4914a7(0xdd)][_0x4914a7(0xae)](_0x20a3b9,_0x453347,_0x11ca92[_0x4914a7(0xde)]);_0x3e1905&&_0x3e1905[_0x4914a7(0xd9)]&&this[_0x4914a7(0xdd)][_0x4914a7(0x84)](_0x20a3b9,_0x453347,_0x11ca92['replyId']);break;}case v[_0x4914a7(0x89)]:{this['_threadCommentModel'][_0x4914a7(0xcf)](_0x20a3b9,_0x453347,{'commentId':_0x11ca92['replyId'],'text':JSON['parse'](_0x11ca92[_0x4914a7(0xb1)])});break;}case v[_0x4914a7(0xc8)]:{const _0x3c60fb=(_0x33b620=this[_0x4914a7(0xdd)][_0x4914a7(0xd7)](_0x11ca92[_0x4914a7(0x9f)])['find'](_0x3d6fd5=>_0x3d6fd5['threadId']===_0x11ca92[_0x4914a7(0xc6)]))==null?void 0x0:_0x33b620[_0x4914a7(0xd2)];_0x3c60fb&&this[_0x4914a7(0xdd)][_0x4914a7(0xb9)](_0x20a3b9,_0x453347,_0x3c60fb['id'],_0x11ca92[_0x4914a7(0x88)]===I[_0x4914a7(0xad)]);break;}}}));}};_=V([p(0x0,_0x241ced(_0x5cceb5)),p(0x1,_0x241ced(_0x5caa47)),p(0x2,_0x241ced(_0x1d9a15)),p(0x3,_0x241ced(_0x59bd72))],_);const z=_0x5b4b18(0x91),O={};var k=Object[_0x5b4b18(0xbc)],Q=(_0x478398,_0x2f5298,_0x3c8166,_0x1c8fad)=>{const _0x3ca97c=_0x5b4b18;for(var _0x425a0e=_0x1c8fad>0x1?void 0x0:_0x1c8fad?k(_0x2f5298,_0x3c8166):_0x2f5298,_0x36b132=_0x478398[_0x3ca97c(0xb7)]-0x1,_0x2a62ed;_0x36b132>=0x0;_0x36b132--)(_0x2a62ed=_0x478398[_0x36b132])&&(_0x425a0e=_0x2a62ed(_0x425a0e)||_0x425a0e);return _0x425a0e;},b=(_0x302927,_0x1ae294)=>(_0x5c6046,_0xa3adf8)=>_0x1ae294(_0x5c6046,_0xa3adf8,_0x302927);function X(_0x378741,_0x1d3db8){const _0x4df98e=_0x5b4b18,_0x1a31c6=_0x378741['replies'][0x0];return{..._0x1d3db8,'id':_0x1a31c6['replyId'],'resolved':_0x378741[_0x4df98e(0x88)]===0x1,'dT':y(_0x1a31c6['createTimestamp']),'personId':_0x1a31c6[_0x4df98e(0xb4)],'threadId':_0x1a31c6[_0x4df98e(0xc6)]};}function ee(_0x22eb22,_0x1f1f32,_0x5ebb9b){const _0x445ec4=_0x5b4b18;var _0x472ae7,_0x2f2b02;if(((_0x2f2b02=(_0x472ae7=_0x22eb22==null?void 0x0:_0x22eb22['replies'])==null?void 0x0:_0x472ae7['length'])!=null?_0x2f2b02:0x0)>0x0){const _0x32961b=(_0x349169,_0x4e524d)=>({'id':_0x349169[_0x445ec4(0xde)],'threadId':_0x349169[_0x445ec4(0xc6)],'dT':y(_0x349169[_0x445ec4(0xcc)]),'personId':_0x349169[_0x445ec4(0xb4)],'resolved':_0x22eb22[_0x445ec4(0x88)]===I['Solved'],'unitId':_0x1f1f32,'subUnitId':_0x5ebb9b,'text':JSON[_0x445ec4(0xbe)](_0x349169['content']),'parentId':_0x4e524d}),_0x491b2c=_0x32961b(_0x22eb22['replies'][0x0]);return{..._0x491b2c,'children':_0x22eb22[_0x445ec4(0x98)][_0x445ec4(0xb8)](0x1)[_0x445ec4(0x8c)](_0x36a0c1=>_0x32961b(_0x36a0c1,_0x491b2c['id']))};}return null;}let S=class{constructor(_0x3add97,_0x1be88b,_0x3e57dd){const _0x319e9d=_0x5b4b18;this[_0x319e9d(0xce)]=_0x3add97,this[_0x319e9d(0xc1)]=_0x1be88b,this[_0x319e9d(0xc4)]=_0x3e57dd;}async[_0x5b4b18(0xd0)](_0x423331){const _0x3ce5df=_0x5b4b18;var _0x4b45ce,_0x21ffc3;const {parentId:_0x4c578f,unitId:_0x32bac3,text:_0x296af0,threadId:_0x2cf274}=_0x423331,_0x382ac4=(_0x21ffc3=(_0x4b45ce=_0x296af0['customRanges'])==null?void 0x0:_0x4b45ce['filter'](_0x3f35e7=>_0x3f35e7['rangeType']===_0x204e42[_0x3ce5df(0x87)])['map'](_0x30f66a=>_0x30f66a['rangeId']))!=null?_0x21ffc3:[],_0x18d7c2=JSON[_0x3ce5df(0x8f)](_0x296af0),_0x467a21=(await this['_sessionService'][_0x3ce5df(0xb6)](_0x32bac3))[_0x3ce5df(0x8b)]();if(_0x4c578f){const _0x2638c5={'memberId':_0x467a21,'unitId':_0x32bac3,'content':_0x18d7c2,'mention':_0x382ac4,'threadId':_0x2cf274},_0x4bd123=(await this['_httpService'][_0x3ce5df(0x94)](_0x3ce5df(0xe0)+_0x32bac3+_0x3ce5df(0x81),{'body':_0x2638c5}))[_0x3ce5df(0xbb)][_0x3ce5df(0xbf)];return{..._0x423331,'id':_0x4bd123[_0x3ce5df(0xde)],'dT':_0x3e7be6(+_0x4bd123[_0x3ce5df(0xcc)])['format'](_0x3ce5df(0xca)),'personId':_0x4bd123[_0x3ce5df(0xb4)]};}else{const _0x1be740={'memberId':_0x467a21,'unitId':_0x32bac3,'content':_0x18d7c2,'mention':_0x382ac4},_0x3ca892=await this[_0x3ce5df(0xce)][_0x3ce5df(0x94)](_0x3ce5df(0xe0)+_0x32bac3+_0x3ce5df(0xa9),{'body':_0x1be740});return X(_0x3ca892[_0x3ce5df(0xbb)][_0x3ce5df(0xd4)],_0x423331);}}async[_0x5b4b18(0xcf)](_0x20702f){const _0x36bc4f=_0x5b4b18;var _0x31fe3e,_0x1ce532;const {text:_0x420f38,unitId:_0x4c9017}=_0x20702f,_0x404357=(_0x1ce532=(_0x31fe3e=_0x420f38[_0x36bc4f(0x90)])==null?void 0x0:_0x31fe3e['filter'](_0x356722=>_0x356722[_0x36bc4f(0xc0)]===_0x204e42[_0x36bc4f(0x87)])[_0x36bc4f(0x8c)](_0x5b12b5=>_0x5b12b5['rangeId']))!=null?_0x1ce532:[],_0x37c967=JSON[_0x36bc4f(0x8f)](_0x420f38),_0x17c345=_0x20702f[_0x36bc4f(0xc6)],_0x5677ce=_0x20702f['id'],_0x3017cb={'memberId':(await this['_sessionService']['requireSession'](_0x4c9017))[_0x36bc4f(0x8b)](),'unitId':_0x4c9017,'threadId':_0x17c345,'mention':_0x404357,'content':_0x37c967,'replyId':_0x5677ce},_0x35e214=await this['_httpService'][_0x36bc4f(0x94)](_0x36bc4f(0xe0)+_0x4c9017+_0x36bc4f(0xb5),{'body':_0x3017cb});return!_0x35e214[_0x36bc4f(0xbb)]['error']||_0x35e214[_0x36bc4f(0xbb)][_0x36bc4f(0xa0)][_0x36bc4f(0xa1)]===0x1;}async[_0x5b4b18(0xb9)](_0x356f5f){const _0x2377c4=_0x5b4b18,{unitId:_0x3d8058}=_0x356f5f,_0xafc633=_0x356f5f[_0x2377c4(0xc6)],_0xed83c={'memberId':this[_0x2377c4(0xc1)][_0x2377c4(0xe2)]()['userID'],'unitId':_0x3d8058,'threadId':_0xafc633,'solved':_0x356f5f[_0x2377c4(0x97)]?I[_0x2377c4(0xad)]:I[_0x2377c4(0xc7)]},_0xc01be7=await this['_httpService'][_0x2377c4(0x94)](_0x2377c4(0xe0)+_0x3d8058+'/solved',{'body':_0xed83c});return!_0xc01be7['body'][_0x2377c4(0xa0)]||_0xc01be7[_0x2377c4(0xbb)]['error'][_0x2377c4(0xa1)]===0x1;}async['deleteComment'](_0x215656,_0x27258b,_0xf95e97,_0x14a193){const _0x3b1925=_0x5b4b18,_0x202106={'memberId':(await this[_0x3b1925(0xc4)][_0x3b1925(0xb6)](_0x215656))[_0x3b1925(0x8b)](),'threadId':_0xf95e97,'replyId':_0x14a193,'unitId':_0x215656},_0x286c0b=await this[_0x3b1925(0xce)][_0x3b1925(0x94)](_0x3b1925(0xe0)+_0x215656+_0x3b1925(0x96),{'body':_0x202106});return!_0x286c0b[_0x3b1925(0xbb)]['error']||_0x286c0b[_0x3b1925(0xbb)]['error'][_0x3b1925(0xa1)]===0x1;}async['listComments'](_0x2d2ec6,_0x1a9f59,_0x2f49a7){const _0x1d5c14=_0x5b4b18,_0x323fa3={'unitId':_0x2d2ec6,'threadId':_0x2f49a7},_0x18be39=await this[_0x1d5c14(0xce)]['post'](_0x1d5c14(0xe0)+_0x2d2ec6+_0x1d5c14(0x9b),{'body':_0x323fa3}),_0x197e4e=_0x2f49a7['map'](_0x322714=>ee(_0x18be39[_0x1d5c14(0xbb)][_0x1d5c14(0xa3)][_0x322714],_0x2d2ec6,_0x1a9f59))['filter'](Boolean);return Object[_0x1d5c14(0x7d)](_0x18be39[_0x1d5c14(0xbb)][_0x1d5c14(0xaf)])[_0x1d5c14(0xac)](_0x565c79=>{const _0xd28464=_0x1d5c14;this[_0xd28464(0xc1)][_0xd28464(0xcb)](_0x565c79);}),_0x197e4e;}[_0x5b4b18(0x80)](_0x5c8cb0){const _0x1bb765=_0x5b4b18;return{'id':_0x5c8cb0['id'],'threadId':_0x5c8cb0[_0x1bb765(0xc6)],'ref':_0x5c8cb0[_0x1bb765(0xc3)]};}};S=Q([b(0x0,_0x241ced(_0x35de56)),b(0x1,_0x241ced(_0x1d9a15)),b(0x2,_0x241ced(_0x46094c))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x2e77f9,_0xfb9c96,_0x311f68,_0x223a76)=>{for(var _0x554744=_0x223a76>0x1?void 0x0:_0x223a76?re(_0xfb9c96,_0x311f68):_0xfb9c96,_0x39e6f8=_0x2e77f9['length']-0x1,_0x9a546b;_0x39e6f8>=0x0;_0x39e6f8--)(_0x9a546b=_0x2e77f9[_0x39e6f8])&&(_0x554744=_0x9a546b(_0x554744)||_0x554744);return _0x554744;},M=(_0x52cf56,_0x1cf09d)=>(_0x37254a,_0x48f554)=>_0x1cf09d(_0x37254a,_0x48f554,_0x52cf56);let f=class extends _0x24aa00{constructor(_0x26d477,_0x43dc53){const _0x5ebbc9=_0x5b4b18;super(),this[_0x5ebbc9(0xa2)]=_0x26d477,this[_0x5ebbc9(0xc2)]=_0x43dc53,this['_initDataSource']();}[_0x5b4b18(0xda)](){const _0x4006ca=_0x5b4b18;this[_0x4006ca(0xa2)][_0x4006ca(0x9c)]=this[_0x4006ca(0xc2)],this[_0x4006ca(0xa2)][_0x4006ca(0xab)]=!0x1;}};f=te([M(0x0,_0x2f2070),M(0x1,_0x241ced(S))],f);var se=Object['defineProperty'],oe=Object[_0x5b4b18(0xbc)],ne=(_0x2de6ab,_0x2b40f9,_0x558233)=>_0x2b40f9 in _0x2de6ab?se(_0x2de6ab,_0x2b40f9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x558233}):_0x2de6ab[_0x2b40f9]=_0x558233,ie=(_0x50ad44,_0x33ad7c,_0x4713f6,_0x313b52)=>{for(var _0x369adc=_0x313b52>0x1?void 0x0:_0x313b52?oe(_0x33ad7c,_0x4713f6):_0x33ad7c,_0x4ed72c=_0x50ad44['length']-0x1,_0x50614c;_0x4ed72c>=0x0;_0x4ed72c--)(_0x50614c=_0x50ad44[_0x4ed72c])&&(_0x369adc=_0x50614c(_0x369adc)||_0x369adc);return _0x369adc;},N=(_0x1c2ebb,_0xca0680)=>(_0x3b91a4,_0x2de7ab)=>_0xca0680(_0x3b91a4,_0x2de7ab,_0x1c2ebb),$=(_0x2b956e,_0x318c3a,_0x186821)=>ne(_0x2b956e,typeof _0x318c3a!=_0x5b4b18(0xbd)?_0x318c3a+'':_0x318c3a,_0x186821);let g=class extends _0x7c2625{constructor(_0x871de8=O,_0x302440,_0x51972f){const _0x38d4e6=_0x5b4b18;super(),this[_0x38d4e6(0x82)]=_0x871de8,this['_injector']=_0x302440,this[_0x38d4e6(0xc5)]=_0x51972f;const {..._0x5c1a3e}=_0x30d2bc({},O,this[_0x38d4e6(0x82)]);this[_0x38d4e6(0xc5)][_0x38d4e6(0xa6)](z,_0x5c1a3e);}['onStarting'](){const _0x516017=_0x5b4b18;[[S],[f],[_]][_0x516017(0xac)](_0x13f963=>{const _0x376943=_0x516017;this[_0x376943(0xb0)][_0x376943(0x9a)](_0x13f963);});}[_0x5b4b18(0xba)](){const _0x794edb=_0x5b4b18;this[_0x794edb(0xb0)][_0x794edb(0xdb)](f),this[_0x794edb(0xb0)]['get'](_);}};$(g,_0x5b4b18(0xd1),W),$(g,'type',_0x549035[_0x5b4b18(0x9d)]),g=ie([_0x43f6a1(_0x5ef373,_0x28de78,_0xd9c1f9),N(0x1,_0x241ced(_0x59bd72)),N(0x2,_0x2266a5)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1b503f=_0x53d2;(function(_0x5ecad4,_0x1ce279){const _0x4e49bf=_0x53d2,_0x29d002=_0x5ecad4();while(!![]){try{const _0x37fd48=-parseInt(_0x4e49bf(0x23b))/0x1+parseInt(_0x4e49bf(0x21b))/0x2+parseInt(_0x4e49bf(0x1ee))/0x3+parseInt(_0x4e49bf(0x226))/0x4*(-parseInt(_0x4e49bf(0x206))/0x5)+-parseInt(_0x4e49bf(0x223))/0x6+parseInt(_0x4e49bf(0x22d))/0x7*(-parseInt(_0x4e49bf(0x1eb))/0x8)+-parseInt(_0x4e49bf(0x1f0))/0x9*(-parseInt(_0x4e49bf(0x228))/0xa);if(_0x37fd48===_0x1ce279)break;else _0x29d002['push'](_0x29d002['shift']());}catch(_0x36ac3f){_0x29d002['push'](_0x29d002['shift']());}}}(_0x5491,0x3fd84));import{CommentService as _0x177479,CollaborationSessionService as _0x5d29c3,UniverCollaborationClientPlugin as _0x4ac8a8}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x54b9da}from'@univerjs-pro/license';import{dayjs as _0x5b328b,UserManagerService as _0x27b619,Inject as _0xe56929,Injector as _0x323c4c,Disposable as _0x496c11,CustomRangeType as _0x1a50f9,UniverInstanceType as _0x4ce168,DependentOn as _0x422474,IConfigService as _0x3cb82c,Plugin as _0x55d139,merge as _0xd65155}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x181ffd}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x34daab,IThreadCommentDataSourceService as _0x51dd11}from'@univerjs/thread-comment';import{bufferTime as _0x487d8e}from'rxjs';function _0x5491(){const _0x3cc461=['solved','35NuGFLm','getComment','map','slice','_httpService','/add','userID','_userService','Unknown','_config','Add','_configService','values','stringify','516782dtHjKf','userId','Solve','_injector','dataSource','body','error','delete','rangeType','replyId','resolved','length','_commentService','_threadCommentModel','/edit','185608fqMmaa','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','119997Jlgsit','size','12303CqawDH','deleteComment','commentUpdate$','requireSession','disposeWithMe','UNRECOGNIZED','resolveComment','onReady','updateComment','type','get','Solved','_threadCommentDataSourceService','symbol','root','find','_initUserSync','OpenOrReOpen','getOwnPropertyDescriptor','syncUpdateMutationToColla','ref','/reply','2311115sPwUbB','_init','rangeId','comments','add','code','_initDataSource','forEach','threadId','content','thread-comment-data-source.config','getUser','setConfig','user','replies','comment','Edit','parentId','Reply','Delete','createTimestamp','919058sOfUAk','addComment','format','onStarting','post','addUser','reply','getMemberID','2182446wvnrOQ','_threadCommentDataSource','/universer-api/comment/unit/','4OqzOCN','_sessionService','8930viHjRA','customRanges','/solved','parse'];_0x5491=function(){return _0x3cc461;};return _0x5491();}import{HTTPService as _0x4b3a69}from'@univerjs/network';const W=_0x1b503f(0x1ed);var I=(_0xf2fff0=>(_0xf2fff0[_0xf2fff0[_0x1b503f(0x201)]=0x0]=_0x1b503f(0x201),_0xf2fff0[_0xf2fff0[_0x1b503f(0x1fb)]=0x1]=_0x1b503f(0x1fb),_0xf2fff0[_0xf2fff0[_0x1b503f(0x1f5)]=-0x1]=_0x1b503f(0x1f5),_0xf2fff0))(I||{}),v=(_0x37b9a2=>(_0x37b9a2[_0x37b9a2[_0x1b503f(0x235)]=0x0]=_0x1b503f(0x235),_0x37b9a2[_0x37b9a2[_0x1b503f(0x237)]=0x1]=_0x1b503f(0x237),_0x37b9a2[_0x37b9a2[_0x1b503f(0x218)]=0x2]=_0x1b503f(0x218),_0x37b9a2[_0x37b9a2[_0x1b503f(0x216)]=0x3]=_0x1b503f(0x216),_0x37b9a2[_0x37b9a2[_0x1b503f(0x219)]=0x4]='Delete',_0x37b9a2[_0x37b9a2[_0x1b503f(0x23d)]=0x5]='Solve',_0x37b9a2[_0x37b9a2[_0x1b503f(0x1f5)]=-0x1]=_0x1b503f(0x1f5),_0x37b9a2))(v||{});const y=_0x1c2e89=>_0x5b328b(new Date(+_0x1c2e89))[_0x1b503f(0x21d)]('YYYY/MM/DD\x20HH:mm'),B=async(_0xc81d1c,_0x561816)=>{const _0x3a5f86=_0x1b503f,_0x2a6bcb=_0xc81d1c['get'](_0x27b619),_0x36d59e=_0xc81d1c['get'](_0x4b3a69);_0x561816[_0x3a5f86(0x20d)](_0xb2e873=>{const _0x3a3acb=_0x3a5f86;_0x2a6bcb[_0x3a3acb(0x211)](_0xb2e873)&&_0x561816[_0x3a3acb(0x1e3)](_0xb2e873);}),_0x561816[_0x3a5f86(0x1ef)]&&(await _0x36d59e[_0x3a5f86(0x1fa)]('/universer-api/user/list',{'params':{'userIDs':[..._0x561816]}}))['body'][_0x3a5f86(0x1ec)][_0x3a5f86(0x20d)](_0x43e85f=>{const _0x415732=_0x3a5f86;_0x43e85f&&_0x2a6bcb[_0x415732(0x220)](_0x43e85f);});};var K=Object[_0x1b503f(0x202)],V=(_0x387c97,_0x5c32d4,_0x428338,_0x5f41b7)=>{for(var _0xf0b265=_0x5f41b7>0x1?void 0x0:_0x5f41b7?K(_0x5c32d4,_0x428338):_0x5c32d4,_0x1395d6=_0x387c97['length']-0x1,_0x1bb40a;_0x1395d6>=0x0;_0x1395d6--)(_0x1bb40a=_0x387c97[_0x1395d6])&&(_0xf0b265=_0x1bb40a(_0xf0b265)||_0xf0b265);return _0xf0b265;},p=(_0x2fc504,_0x5c1669)=>(_0x2e4e18,_0x5f1862)=>_0x5c1669(_0x2e4e18,_0x5f1862,_0x2fc504);let _=class extends _0x496c11{constructor(_0x14c945,_0x1836d1,_0x3ec5a8,_0x27aa08){const _0x4f27a5=_0x1b503f;super(),this[_0x4f27a5(0x1e8)]=_0x14c945,this[_0x4f27a5(0x1e9)]=_0x1836d1,this['_userService']=_0x3ec5a8,this[_0x4f27a5(0x23e)]=_0x27aa08,this[_0x4f27a5(0x207)](),this[_0x4f27a5(0x200)]();}['_initUserSync'](){const _0x4cb21d=_0x1b503f;this[_0x4cb21d(0x1f4)](this[_0x4cb21d(0x1e9)][_0x4cb21d(0x1f2)]['pipe'](_0x487d8e(0x10))['subscribe'](_0x33590f=>{const _0x3e36e9=_0x4cb21d,_0x5b166c=new Set();_0x33590f[_0x3e36e9(0x20d)](_0x37ba4c=>{const _0x1133f2=_0x3e36e9;switch(_0x37ba4c[_0x1133f2(0x1f9)]){case _0x1133f2(0x20a):{const _0x330e8d=_0x37ba4c['payload']['personId'];_0x5b166c[_0x1133f2(0x20a)](_0x330e8d);break;}}}),B(this['_injector'],_0x5b166c);}));}[_0x1b503f(0x207)](){const _0x20b5b2=_0x1b503f;this['disposeWithMe'](this[_0x20b5b2(0x1e8)][_0x20b5b2(0x1f2)]['subscribe'](async _0x16eda5=>{const _0x56ef1b=_0x20b5b2;var _0x458bf3,_0xd96ddd,_0x4f9b16,_0x3ed873;const _0xb15ac0=(_0x458bf3=this[_0x56ef1b(0x1e9)]['getUnit'](_0x16eda5['unitId'])[_0x56ef1b(0x1ff)](_0x2752bb=>_0x2752bb['threadId']===_0x16eda5['threadId']))==null?void 0x0:_0x458bf3['root'];if(!_0xb15ac0)return;const {unitId:_0x23a6ff,subUnitId:_0x153a0a}=_0xb15ac0;switch(_0x16eda5[_0x56ef1b(0x213)]&&this[_0x56ef1b(0x234)][_0x56ef1b(0x220)](_0x16eda5[_0x56ef1b(0x213)]),_0x16eda5[_0x56ef1b(0x1f9)]){case v[_0x56ef1b(0x237)]:break;case v[_0x56ef1b(0x218)]:{this['_threadCommentModel'][_0x56ef1b(0x21c)](_0x23a6ff,_0x153a0a,{'unitId':_0x23a6ff,'subUnitId':_0x153a0a,'ref':'','id':_0x16eda5[_0x56ef1b(0x1e5)],'dT':y(+_0x16eda5[_0x56ef1b(0x21a)]),'threadId':_0x16eda5[_0x56ef1b(0x20e)],'personId':(_0x4f9b16=(_0xd96ddd=_0x16eda5['user'])==null?void 0x0:_0xd96ddd[_0x56ef1b(0x233)])!=null?_0x4f9b16:_0x16eda5[_0x56ef1b(0x23c)],'text':JSON[_0x56ef1b(0x22b)](_0x16eda5[_0x56ef1b(0x20f)]),'parentId':_0xb15ac0['id']});break;}case v[_0x56ef1b(0x219)]:{const _0x5eb921=this[_0x56ef1b(0x1e9)][_0x56ef1b(0x22e)](_0x23a6ff,_0x153a0a,_0x16eda5[_0x56ef1b(0x1e5)]);_0x5eb921&&_0x5eb921[_0x56ef1b(0x217)]&&this[_0x56ef1b(0x1e9)][_0x56ef1b(0x1f1)](_0x23a6ff,_0x153a0a,_0x16eda5[_0x56ef1b(0x1e5)]);break;}case v[_0x56ef1b(0x216)]:{this[_0x56ef1b(0x1e9)][_0x56ef1b(0x1f8)](_0x23a6ff,_0x153a0a,{'commentId':_0x16eda5[_0x56ef1b(0x1e5)],'text':JSON[_0x56ef1b(0x22b)](_0x16eda5[_0x56ef1b(0x20f)])});break;}case v[_0x56ef1b(0x23d)]:{const _0x3a9c54=(_0x3ed873=this[_0x56ef1b(0x1e9)]['getUnit'](_0x16eda5['unitId'])[_0x56ef1b(0x1ff)](_0x55c33d=>_0x55c33d[_0x56ef1b(0x20e)]===_0x16eda5[_0x56ef1b(0x20e)]))==null?void 0x0:_0x3ed873[_0x56ef1b(0x1fe)];_0x3a9c54&&this['_threadCommentModel'][_0x56ef1b(0x1f6)](_0x23a6ff,_0x153a0a,_0x3a9c54['id'],_0x16eda5['solved']===I[_0x56ef1b(0x1fb)]);break;}}}));}};_=V([p(0x0,_0xe56929(_0x177479)),p(0x1,_0xe56929(_0x34daab)),p(0x2,_0xe56929(_0x27b619)),p(0x3,_0xe56929(_0x323c4c))],_);const z=_0x1b503f(0x210),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1f24c0,_0xf3bd,_0x28f0f0,_0x2e75bb)=>{const _0xb8a12a=_0x1b503f;for(var _0x48e1eb=_0x2e75bb>0x1?void 0x0:_0x2e75bb?k(_0xf3bd,_0x28f0f0):_0xf3bd,_0x515e7d=_0x1f24c0[_0xb8a12a(0x1e7)]-0x1,_0x3ddbfb;_0x515e7d>=0x0;_0x515e7d--)(_0x3ddbfb=_0x1f24c0[_0x515e7d])&&(_0x48e1eb=_0x3ddbfb(_0x48e1eb)||_0x48e1eb);return _0x48e1eb;},b=(_0x342fff,_0x44dcd2)=>(_0xd804f3,_0x3c2e2b)=>_0x44dcd2(_0xd804f3,_0x3c2e2b,_0x342fff);function X(_0x480133,_0x29c503){const _0x525730=_0x1b503f,_0x5464c1=_0x480133[_0x525730(0x214)][0x0];return{..._0x29c503,'id':_0x5464c1['replyId'],'resolved':_0x480133[_0x525730(0x22c)]===0x1,'dT':y(_0x5464c1['createTimestamp']),'personId':_0x5464c1[_0x525730(0x23c)],'threadId':_0x5464c1[_0x525730(0x20e)]};}function ee(_0x409c40,_0x206ede,_0x172d6b){const _0x3ddf74=_0x1b503f;var _0x53b8bd,_0x5f5593;if(((_0x5f5593=(_0x53b8bd=_0x409c40==null?void 0x0:_0x409c40[_0x3ddf74(0x214)])==null?void 0x0:_0x53b8bd['length'])!=null?_0x5f5593:0x0)>0x0){const _0x18da36=(_0x12305d,_0x343833)=>({'id':_0x12305d['replyId'],'threadId':_0x12305d[_0x3ddf74(0x20e)],'dT':y(_0x12305d[_0x3ddf74(0x21a)]),'personId':_0x12305d[_0x3ddf74(0x23c)],'resolved':_0x409c40[_0x3ddf74(0x22c)]===I[_0x3ddf74(0x1fb)],'unitId':_0x206ede,'subUnitId':_0x172d6b,'text':JSON[_0x3ddf74(0x22b)](_0x12305d['content']),'parentId':_0x343833}),_0x16582e=_0x18da36(_0x409c40[_0x3ddf74(0x214)][0x0]);return{..._0x16582e,'children':_0x409c40['replies'][_0x3ddf74(0x230)](0x1)[_0x3ddf74(0x22f)](_0x498e08=>_0x18da36(_0x498e08,_0x16582e['id']))};}return null;}function _0x53d2(_0x2f8f1d,_0x3438e8){_0x2f8f1d=_0x2f8f1d-0x1e0;const _0x5491da=_0x5491();let _0x53d231=_0x5491da[_0x2f8f1d];return _0x53d231;}let S=class{constructor(_0x208ca2,_0xb7c40e,_0x2b4bcd){const _0x31a10c=_0x1b503f;this[_0x31a10c(0x231)]=_0x208ca2,this['_userService']=_0xb7c40e,this['_sessionService']=_0x2b4bcd;}async[_0x1b503f(0x21c)](_0x3a8e1e){const _0x387822=_0x1b503f;var _0x9a661d,_0x13e52b;const {parentId:_0x27a3df,unitId:_0x142237,text:_0xc8886c,threadId:_0x269136}=_0x3a8e1e,_0xd3b4d=(_0x13e52b=(_0x9a661d=_0xc8886c[_0x387822(0x229)])==null?void 0x0:_0x9a661d['filter'](_0x2f7eb3=>_0x2f7eb3[_0x387822(0x1e4)]===_0x1a50f9['COMMENT'])[_0x387822(0x22f)](_0x1c1b48=>_0x1c1b48[_0x387822(0x208)]))!=null?_0x13e52b:[],_0x49d2d5=JSON[_0x387822(0x23a)](_0xc8886c),_0x300ebf=(await this[_0x387822(0x227)][_0x387822(0x1f3)](_0x142237))[_0x387822(0x222)]();if(_0x27a3df){const _0x3167b1={'memberId':_0x300ebf,'unitId':_0x142237,'content':_0x49d2d5,'mention':_0xd3b4d,'threadId':_0x269136},_0x1b0851=(await this[_0x387822(0x231)][_0x387822(0x21f)](_0x387822(0x225)+_0x142237+_0x387822(0x205),{'body':_0x3167b1}))[_0x387822(0x1e1)][_0x387822(0x221)];return{..._0x3a8e1e,'id':_0x1b0851['replyId'],'dT':_0x5b328b(+_0x1b0851[_0x387822(0x21a)])[_0x387822(0x21d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1b0851[_0x387822(0x23c)]};}else{const _0x35be21={'memberId':_0x300ebf,'unitId':_0x142237,'content':_0x49d2d5,'mention':_0xd3b4d},_0x15fbab=await this[_0x387822(0x231)][_0x387822(0x21f)](_0x387822(0x225)+_0x142237+_0x387822(0x232),{'body':_0x35be21});return X(_0x15fbab['body'][_0x387822(0x215)],_0x3a8e1e);}}async['updateComment'](_0x260b35){const _0x5bf4f1=_0x1b503f;var _0x48ba6d,_0x2c4f10;const {text:_0x3e7bb0,unitId:_0x247ca6}=_0x260b35,_0xa1342a=(_0x2c4f10=(_0x48ba6d=_0x3e7bb0[_0x5bf4f1(0x229)])==null?void 0x0:_0x48ba6d['filter'](_0x308644=>_0x308644['rangeType']===_0x1a50f9['COMMENT'])[_0x5bf4f1(0x22f)](_0x20dca1=>_0x20dca1[_0x5bf4f1(0x208)]))!=null?_0x2c4f10:[],_0x45370b=JSON[_0x5bf4f1(0x23a)](_0x3e7bb0),_0x4be793=_0x260b35[_0x5bf4f1(0x20e)],_0x2a397e=_0x260b35['id'],_0x146dfa={'memberId':(await this[_0x5bf4f1(0x227)][_0x5bf4f1(0x1f3)](_0x247ca6))[_0x5bf4f1(0x222)](),'unitId':_0x247ca6,'threadId':_0x4be793,'mention':_0xa1342a,'content':_0x45370b,'replyId':_0x2a397e},_0xc37f2c=await this['_httpService'][_0x5bf4f1(0x21f)](_0x5bf4f1(0x225)+_0x247ca6+_0x5bf4f1(0x1ea),{'body':_0x146dfa});return!_0xc37f2c[_0x5bf4f1(0x1e1)]['error']||_0xc37f2c[_0x5bf4f1(0x1e1)][_0x5bf4f1(0x1e2)][_0x5bf4f1(0x20b)]===0x1;}async[_0x1b503f(0x1f6)](_0x32dd47){const _0x2e6f93=_0x1b503f,{unitId:_0xe790bb}=_0x32dd47,_0x28583f=_0x32dd47['threadId'],_0x4a030b={'memberId':this[_0x2e6f93(0x234)]['getCurrentUser']()[_0x2e6f93(0x233)],'unitId':_0xe790bb,'threadId':_0x28583f,'solved':_0x32dd47[_0x2e6f93(0x1e6)]?I['Solved']:I[_0x2e6f93(0x201)]},_0x16ef5a=await this[_0x2e6f93(0x231)][_0x2e6f93(0x21f)](_0x2e6f93(0x225)+_0xe790bb+_0x2e6f93(0x22a),{'body':_0x4a030b});return!_0x16ef5a[_0x2e6f93(0x1e1)][_0x2e6f93(0x1e2)]||_0x16ef5a[_0x2e6f93(0x1e1)][_0x2e6f93(0x1e2)][_0x2e6f93(0x20b)]===0x1;}async[_0x1b503f(0x1f1)](_0x162970,_0x2917ac,_0x44e83f,_0x49a38c){const _0x18cacb=_0x1b503f,_0x277b2c={'memberId':(await this[_0x18cacb(0x227)]['requireSession'](_0x162970))[_0x18cacb(0x222)](),'threadId':_0x44e83f,'replyId':_0x49a38c,'unitId':_0x162970},_0x54a4a7=await this[_0x18cacb(0x231)][_0x18cacb(0x21f)](_0x18cacb(0x225)+_0x162970+'/delete',{'body':_0x277b2c});return!_0x54a4a7[_0x18cacb(0x1e1)][_0x18cacb(0x1e2)]||_0x54a4a7['body'][_0x18cacb(0x1e2)][_0x18cacb(0x20b)]===0x1;}async['listComments'](_0xc26da1,_0x353bf2,_0x1474c8){const _0x368d91=_0x1b503f,_0x508603={'unitId':_0xc26da1,'threadId':_0x1474c8},_0x2160e7=await this['_httpService'][_0x368d91(0x21f)](_0x368d91(0x225)+_0xc26da1+'/list',{'body':_0x508603}),_0x171654=_0x1474c8[_0x368d91(0x22f)](_0x5d3b17=>ee(_0x2160e7[_0x368d91(0x1e1)][_0x368d91(0x209)][_0x5d3b17],_0xc26da1,_0x353bf2))['filter'](Boolean);return Object[_0x368d91(0x239)](_0x2160e7[_0x368d91(0x1e1)][_0x368d91(0x1ec)])['forEach'](_0x26e897=>{const _0x55d431=_0x368d91;this['_userService'][_0x55d431(0x220)](_0x26e897);}),_0x171654;}['saveCommentToSnapshot'](_0x31fc68){const _0x323f5d=_0x1b503f;return{'id':_0x31fc68['id'],'threadId':_0x31fc68[_0x323f5d(0x20e)],'ref':_0x31fc68[_0x323f5d(0x204)]};}};S=Q([b(0x0,_0xe56929(_0x4b3a69)),b(0x1,_0xe56929(_0x27b619)),b(0x2,_0xe56929(_0x5d29c3))],S);var re=Object[_0x1b503f(0x202)],te=(_0x31308c,_0x519ab1,_0x1537c5,_0x488aae)=>{const _0x23851c=_0x1b503f;for(var _0x9a3f9e=_0x488aae>0x1?void 0x0:_0x488aae?re(_0x519ab1,_0x1537c5):_0x519ab1,_0x5022eb=_0x31308c[_0x23851c(0x1e7)]-0x1,_0x51df2c;_0x5022eb>=0x0;_0x5022eb--)(_0x51df2c=_0x31308c[_0x5022eb])&&(_0x9a3f9e=_0x51df2c(_0x9a3f9e)||_0x9a3f9e);return _0x9a3f9e;},M=(_0x47f1ee,_0x349640)=>(_0x4c5a6a,_0x287107)=>_0x349640(_0x4c5a6a,_0x287107,_0x47f1ee);let f=class extends _0x496c11{constructor(_0x1641f1,_0x3b57a5){const _0x57bb5d=_0x1b503f;super(),this[_0x57bb5d(0x1fc)]=_0x1641f1,this[_0x57bb5d(0x224)]=_0x3b57a5,this[_0x57bb5d(0x20c)]();}[_0x1b503f(0x20c)](){const _0x3ad9e5=_0x1b503f;this[_0x3ad9e5(0x1fc)][_0x3ad9e5(0x1e0)]=this[_0x3ad9e5(0x224)],this[_0x3ad9e5(0x1fc)][_0x3ad9e5(0x203)]=!0x1;}};f=te([M(0x0,_0x51dd11),M(0x1,_0xe56929(S))],f);var se=Object['defineProperty'],oe=Object[_0x1b503f(0x202)],ne=(_0x1d8a02,_0x18bf9c,_0x4def72)=>_0x18bf9c in _0x1d8a02?se(_0x1d8a02,_0x18bf9c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4def72}):_0x1d8a02[_0x18bf9c]=_0x4def72,ie=(_0x5a19ac,_0x2db807,_0x5a85c7,_0x3253ec)=>{const _0x570c8=_0x1b503f;for(var _0x470026=_0x3253ec>0x1?void 0x0:_0x3253ec?oe(_0x2db807,_0x5a85c7):_0x2db807,_0x367189=_0x5a19ac[_0x570c8(0x1e7)]-0x1,_0x4e6bb1;_0x367189>=0x0;_0x367189--)(_0x4e6bb1=_0x5a19ac[_0x367189])&&(_0x470026=_0x4e6bb1(_0x470026)||_0x470026);return _0x470026;},N=(_0x5e90f2,_0x9bac7)=>(_0x5c2926,_0x28cdbd)=>_0x9bac7(_0x5c2926,_0x28cdbd,_0x5e90f2),$=(_0x3800b3,_0x502271,_0x56d1c4)=>ne(_0x3800b3,typeof _0x502271!=_0x1b503f(0x1fd)?_0x502271+'':_0x502271,_0x56d1c4);let g=class extends _0x55d139{constructor(_0x7eeebc=O,_0xf478b9,_0x2abb97){const _0x11c674=_0x1b503f;super(),this[_0x11c674(0x236)]=_0x7eeebc,this[_0x11c674(0x23e)]=_0xf478b9,this[_0x11c674(0x238)]=_0x2abb97;const {..._0x2a40dc}=_0xd65155({},O,this[_0x11c674(0x236)]);this[_0x11c674(0x238)][_0x11c674(0x212)](z,_0x2a40dc);}[_0x1b503f(0x21e)](){[[S],[f],[_]]['forEach'](_0x38d0ce=>{const _0x38b66d=_0x53d2;this[_0x38b66d(0x23e)][_0x38b66d(0x20a)](_0x38d0ce);});}[_0x1b503f(0x1f7)](){const _0x53289e=_0x1b503f;this[_0x53289e(0x23e)][_0x53289e(0x1fa)](f),this[_0x53289e(0x23e)][_0x53289e(0x1fa)](_);}};$(g,'pluginName',W),$(g,_0x1b503f(0x1f9),_0x4ce168['UNIVER_UNKNOWN']),g=ie([_0x422474(_0x181ffd,_0x4ac8a8,_0x54b9da),N(0x1,_0xe56929(_0x323c4c)),N(0x2,_0x3cb82c)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5b4b18=_0x2abc;(function(_0x373411,_0x2c57d6){const _0x48c78d=_0x2abc,_0x398f8b=_0x373411();while(!![]){try{const _0x3d2076=-parseInt(_0x48c78d(0xd6))/0x1+-parseInt(_0x48c78d(0x85))/0x2*(-parseInt(_0x48c78d(0xd8))/0x3)+-parseInt(_0x48c78d(0xd5))/0x4+-parseInt(_0x48c78d(0xe1))/0x5*(-parseInt(_0x48c78d(0x83))/0x6)+-parseInt(_0x48c78d(0x7e))/0x7+-parseInt(_0x48c78d(0xc9))/0x8*(parseInt(_0x48c78d(0xdc))/0x9)+-parseInt(_0x48c78d(0x92))/0xa*(-parseInt(_0x48c78d(0x8a))/0xb);if(_0x3d2076===_0x2c57d6)break;else _0x398f8b['push'](_0x398f8b['shift']());}catch(_0x2d9a18){_0x398f8b['push'](_0x398f8b['shift']());}}}(_0x38e8,0xf202b));import{CommentService as _0x5cceb5,CollaborationSessionService as _0x46094c,UniverCollaborationClientPlugin as _0x28de78}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xd9c1f9}from'@univerjs-pro/license';import{dayjs as _0x3e7be6,UserManagerService as _0x1d9a15,Inject as _0x241ced,Injector as _0x59bd72,Disposable as _0x24aa00,CustomRangeType as _0x204e42,UniverInstanceType as _0x549035,DependentOn as _0x43f6a1,IConfigService as _0x2266a5,Plugin as _0x7c2625,merge as _0x30d2bc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5ef373}from'@univerjs/thread-comment-ui';function _0x2abc(_0x5760a2,_0x361617){_0x5760a2=_0x5760a2-0x7d;const _0x38e8e8=_0x38e8();let _0x2abc01=_0x38e8e8[_0x5760a2];return _0x2abc01;}import{ThreadCommentModel as _0x5caa47,IThreadCommentDataSourceService as _0x2f2070}from'@univerjs/thread-comment';function _0x38e8(){const _0x111dc2=['getOwnPropertyDescriptor','symbol','parse','reply','rangeType','_userService','_threadCommentDataSource','ref','_sessionService','_configService','threadId','OpenOrReOpen','Solve','7137672EOUXij','YYYY/MM/DD\x20HH:mm','addUser','createTimestamp','_commentService','_httpService','updateComment','addComment','pluginName','root','userID','comment','7384648SiFwpR','552084qCRUYn','getUnit','485322caRlfx','parentId','_initDataSource','get','9zGdQbS','_threadCommentModel','replyId','type','/universer-api/comment/unit/','1860vIwiqb','getCurrentUser','values','75684XSHrAN','_initUserSync','saveCommentToSnapshot','/reply','_config','4692SbOIMM','deleteComment','16DRvgHj','commentUpdate$','COMMENT','solved','Edit','4963651dEGnpV','getMemberID','map','getUser','pipe','stringify','customRanges','thread-comment-data-source.config','60LDpXMq','Reply','post','size','/delete','resolved','replies','personId','add','/list','dataSource','UNIVER_UNKNOWN','Unknown','unitId','error','code','_threadCommentDataSourceService','comments','_init','disposeWithMe','setConfig','Delete','user','/add','Add','syncUpdateMutationToColla','forEach','Solved','getComment','users','_injector','content','subscribe','UNRECOGNIZED','userId','/edit','requireSession','length','slice','resolveComment','onReady','body'];_0x38e8=function(){return _0x111dc2;};return _0x38e8();}import{bufferTime as _0x2770a1}from'rxjs';import{HTTPService as _0x35de56}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1041f6=>(_0x1041f6[_0x1041f6[_0x5b4b18(0xc7)]=0x0]=_0x5b4b18(0xc7),_0x1041f6[_0x1041f6[_0x5b4b18(0xad)]=0x1]=_0x5b4b18(0xad),_0x1041f6[_0x1041f6[_0x5b4b18(0xb3)]=-0x1]=_0x5b4b18(0xb3),_0x1041f6))(I||{}),v=(_0x273b9c=>(_0x273b9c[_0x273b9c['Unknown']=0x0]=_0x5b4b18(0x9e),_0x273b9c[_0x273b9c[_0x5b4b18(0xaa)]=0x1]=_0x5b4b18(0xaa),_0x273b9c[_0x273b9c['Reply']=0x2]=_0x5b4b18(0x93),_0x273b9c[_0x273b9c[_0x5b4b18(0x89)]=0x3]=_0x5b4b18(0x89),_0x273b9c[_0x273b9c[_0x5b4b18(0xa7)]=0x4]='Delete',_0x273b9c[_0x273b9c[_0x5b4b18(0xc8)]=0x5]=_0x5b4b18(0xc8),_0x273b9c[_0x273b9c[_0x5b4b18(0xb3)]=-0x1]=_0x5b4b18(0xb3),_0x273b9c))(v||{});const y=_0x476f44=>_0x3e7be6(new Date(+_0x476f44))['format'](_0x5b4b18(0xca)),B=async(_0x1727b9,_0xc465d1)=>{const _0x34a331=_0x5b4b18,_0x3ac4bb=_0x1727b9['get'](_0x1d9a15),_0x4853a9=_0x1727b9[_0x34a331(0xdb)](_0x35de56);_0xc465d1['forEach'](_0x1d34ab=>{const _0x16c18a=_0x34a331;_0x3ac4bb[_0x16c18a(0x8d)](_0x1d34ab)&&_0xc465d1['delete'](_0x1d34ab);}),_0xc465d1[_0x34a331(0x95)]&&(await _0x4853a9['get']('/universer-api/user/list',{'params':{'userIDs':[..._0xc465d1]}}))[_0x34a331(0xbb)][_0x34a331(0xaf)]['forEach'](_0x5e9b92=>{const _0x1cf271=_0x34a331;_0x5e9b92&&_0x3ac4bb[_0x1cf271(0xcb)](_0x5e9b92);});};var K=Object[_0x5b4b18(0xbc)],V=(_0x3ee7f9,_0x437594,_0x5c3260,_0x1ba229)=>{const _0x3d9194=_0x5b4b18;for(var _0x502a93=_0x1ba229>0x1?void 0x0:_0x1ba229?K(_0x437594,_0x5c3260):_0x437594,_0x42c5ff=_0x3ee7f9[_0x3d9194(0xb7)]-0x1,_0x4b5863;_0x42c5ff>=0x0;_0x42c5ff--)(_0x4b5863=_0x3ee7f9[_0x42c5ff])&&(_0x502a93=_0x4b5863(_0x502a93)||_0x502a93);return _0x502a93;},p=(_0x291178,_0x3b8eca)=>(_0x31378c,_0x26679e)=>_0x3b8eca(_0x31378c,_0x26679e,_0x291178);let _=class extends _0x24aa00{constructor(_0x45fa9e,_0x28967b,_0xc9c982,_0x190bbc){const _0x19aef1=_0x5b4b18;super(),this[_0x19aef1(0xcd)]=_0x45fa9e,this[_0x19aef1(0xdd)]=_0x28967b,this[_0x19aef1(0xc1)]=_0xc9c982,this['_injector']=_0x190bbc,this['_init'](),this['_initUserSync']();}[_0x5b4b18(0x7f)](){const _0x3cbf42=_0x5b4b18;this['disposeWithMe'](this[_0x3cbf42(0xdd)]['commentUpdate$'][_0x3cbf42(0x8e)](_0x2770a1(0x10))[_0x3cbf42(0xb2)](_0x47b934=>{const _0x4cd67d=_0x3cbf42,_0x5f1252=new Set();_0x47b934[_0x4cd67d(0xac)](_0x26b950=>{const _0x4e730f=_0x4cd67d;switch(_0x26b950['type']){case _0x4e730f(0x9a):{const _0x346d64=_0x26b950['payload'][_0x4e730f(0x99)];_0x5f1252[_0x4e730f(0x9a)](_0x346d64);break;}}}),B(this[_0x4cd67d(0xb0)],_0x5f1252);}));}[_0x5b4b18(0xa4)](){const _0x3e703f=_0x5b4b18;this[_0x3e703f(0xa5)](this[_0x3e703f(0xcd)][_0x3e703f(0x86)]['subscribe'](async _0x11ca92=>{const _0x4914a7=_0x3e703f;var _0x45f3f7,_0x450f4a,_0x55966f,_0x33b620;const _0x99c1a3=(_0x45f3f7=this['_threadCommentModel'][_0x4914a7(0xd7)](_0x11ca92['unitId'])['find'](_0x4d71a1=>_0x4d71a1['threadId']===_0x11ca92[_0x4914a7(0xc6)]))==null?void 0x0:_0x45f3f7['root'];if(!_0x99c1a3)return;const {unitId:_0x20a3b9,subUnitId:_0x453347}=_0x99c1a3;switch(_0x11ca92[_0x4914a7(0xa8)]&&this[_0x4914a7(0xc1)][_0x4914a7(0xcb)](_0x11ca92[_0x4914a7(0xa8)]),_0x11ca92[_0x4914a7(0xdf)]){case v[_0x4914a7(0xaa)]:break;case v[_0x4914a7(0x93)]:{this[_0x4914a7(0xdd)]['addComment'](_0x20a3b9,_0x453347,{'unitId':_0x20a3b9,'subUnitId':_0x453347,'ref':'','id':_0x11ca92[_0x4914a7(0xde)],'dT':y(+_0x11ca92[_0x4914a7(0xcc)]),'threadId':_0x11ca92[_0x4914a7(0xc6)],'personId':(_0x55966f=(_0x450f4a=_0x11ca92[_0x4914a7(0xa8)])==null?void 0x0:_0x450f4a[_0x4914a7(0xd3)])!=null?_0x55966f:_0x11ca92[_0x4914a7(0xb4)],'text':JSON[_0x4914a7(0xbe)](_0x11ca92[_0x4914a7(0xb1)]),'parentId':_0x99c1a3['id']});break;}case v[_0x4914a7(0xa7)]:{const _0x3e1905=this[_0x4914a7(0xdd)][_0x4914a7(0xae)](_0x20a3b9,_0x453347,_0x11ca92[_0x4914a7(0xde)]);_0x3e1905&&_0x3e1905[_0x4914a7(0xd9)]&&this[_0x4914a7(0xdd)][_0x4914a7(0x84)](_0x20a3b9,_0x453347,_0x11ca92['replyId']);break;}case v[_0x4914a7(0x89)]:{this['_threadCommentModel'][_0x4914a7(0xcf)](_0x20a3b9,_0x453347,{'commentId':_0x11ca92['replyId'],'text':JSON['parse'](_0x11ca92[_0x4914a7(0xb1)])});break;}case v[_0x4914a7(0xc8)]:{const _0x3c60fb=(_0x33b620=this[_0x4914a7(0xdd)][_0x4914a7(0xd7)](_0x11ca92[_0x4914a7(0x9f)])['find'](_0x3d6fd5=>_0x3d6fd5['threadId']===_0x11ca92[_0x4914a7(0xc6)]))==null?void 0x0:_0x33b620[_0x4914a7(0xd2)];_0x3c60fb&&this[_0x4914a7(0xdd)][_0x4914a7(0xb9)](_0x20a3b9,_0x453347,_0x3c60fb['id'],_0x11ca92[_0x4914a7(0x88)]===I[_0x4914a7(0xad)]);break;}}}));}};_=V([p(0x0,_0x241ced(_0x5cceb5)),p(0x1,_0x241ced(_0x5caa47)),p(0x2,_0x241ced(_0x1d9a15)),p(0x3,_0x241ced(_0x59bd72))],_);const z=_0x5b4b18(0x91),O={};var k=Object[_0x5b4b18(0xbc)],Q=(_0x478398,_0x2f5298,_0x3c8166,_0x1c8fad)=>{const _0x3ca97c=_0x5b4b18;for(var _0x425a0e=_0x1c8fad>0x1?void 0x0:_0x1c8fad?k(_0x2f5298,_0x3c8166):_0x2f5298,_0x36b132=_0x478398[_0x3ca97c(0xb7)]-0x1,_0x2a62ed;_0x36b132>=0x0;_0x36b132--)(_0x2a62ed=_0x478398[_0x36b132])&&(_0x425a0e=_0x2a62ed(_0x425a0e)||_0x425a0e);return _0x425a0e;},b=(_0x302927,_0x1ae294)=>(_0x5c6046,_0xa3adf8)=>_0x1ae294(_0x5c6046,_0xa3adf8,_0x302927);function X(_0x378741,_0x1d3db8){const _0x4df98e=_0x5b4b18,_0x1a31c6=_0x378741['replies'][0x0];return{..._0x1d3db8,'id':_0x1a31c6['replyId'],'resolved':_0x378741[_0x4df98e(0x88)]===0x1,'dT':y(_0x1a31c6['createTimestamp']),'personId':_0x1a31c6[_0x4df98e(0xb4)],'threadId':_0x1a31c6[_0x4df98e(0xc6)]};}function ee(_0x22eb22,_0x1f1f32,_0x5ebb9b){const _0x445ec4=_0x5b4b18;var _0x472ae7,_0x2f2b02;if(((_0x2f2b02=(_0x472ae7=_0x22eb22==null?void 0x0:_0x22eb22['replies'])==null?void 0x0:_0x472ae7['length'])!=null?_0x2f2b02:0x0)>0x0){const _0x32961b=(_0x349169,_0x4e524d)=>({'id':_0x349169[_0x445ec4(0xde)],'threadId':_0x349169[_0x445ec4(0xc6)],'dT':y(_0x349169[_0x445ec4(0xcc)]),'personId':_0x349169[_0x445ec4(0xb4)],'resolved':_0x22eb22[_0x445ec4(0x88)]===I['Solved'],'unitId':_0x1f1f32,'subUnitId':_0x5ebb9b,'text':JSON[_0x445ec4(0xbe)](_0x349169['content']),'parentId':_0x4e524d}),_0x491b2c=_0x32961b(_0x22eb22['replies'][0x0]);return{..._0x491b2c,'children':_0x22eb22[_0x445ec4(0x98)][_0x445ec4(0xb8)](0x1)[_0x445ec4(0x8c)](_0x36a0c1=>_0x32961b(_0x36a0c1,_0x491b2c['id']))};}return null;}let S=class{constructor(_0x3add97,_0x1be88b,_0x3e57dd){const _0x319e9d=_0x5b4b18;this[_0x319e9d(0xce)]=_0x3add97,this[_0x319e9d(0xc1)]=_0x1be88b,this[_0x319e9d(0xc4)]=_0x3e57dd;}async[_0x5b4b18(0xd0)](_0x423331){const _0x3ce5df=_0x5b4b18;var _0x4b45ce,_0x21ffc3;const {parentId:_0x4c578f,unitId:_0x32bac3,text:_0x296af0,threadId:_0x2cf274}=_0x423331,_0x382ac4=(_0x21ffc3=(_0x4b45ce=_0x296af0['customRanges'])==null?void 0x0:_0x4b45ce['filter'](_0x3f35e7=>_0x3f35e7['rangeType']===_0x204e42[_0x3ce5df(0x87)])['map'](_0x30f66a=>_0x30f66a['rangeId']))!=null?_0x21ffc3:[],_0x18d7c2=JSON[_0x3ce5df(0x8f)](_0x296af0),_0x467a21=(await this['_sessionService'][_0x3ce5df(0xb6)](_0x32bac3))[_0x3ce5df(0x8b)]();if(_0x4c578f){const _0x2638c5={'memberId':_0x467a21,'unitId':_0x32bac3,'content':_0x18d7c2,'mention':_0x382ac4,'threadId':_0x2cf274},_0x4bd123=(await this['_httpService'][_0x3ce5df(0x94)](_0x3ce5df(0xe0)+_0x32bac3+_0x3ce5df(0x81),{'body':_0x2638c5}))[_0x3ce5df(0xbb)][_0x3ce5df(0xbf)];return{..._0x423331,'id':_0x4bd123[_0x3ce5df(0xde)],'dT':_0x3e7be6(+_0x4bd123[_0x3ce5df(0xcc)])['format'](_0x3ce5df(0xca)),'personId':_0x4bd123[_0x3ce5df(0xb4)]};}else{const _0x1be740={'memberId':_0x467a21,'unitId':_0x32bac3,'content':_0x18d7c2,'mention':_0x382ac4},_0x3ca892=await this[_0x3ce5df(0xce)][_0x3ce5df(0x94)](_0x3ce5df(0xe0)+_0x32bac3+_0x3ce5df(0xa9),{'body':_0x1be740});return X(_0x3ca892[_0x3ce5df(0xbb)][_0x3ce5df(0xd4)],_0x423331);}}async[_0x5b4b18(0xcf)](_0x20702f){const _0x36bc4f=_0x5b4b18;var _0x31fe3e,_0x1ce532;const {text:_0x420f38,unitId:_0x4c9017}=_0x20702f,_0x404357=(_0x1ce532=(_0x31fe3e=_0x420f38[_0x36bc4f(0x90)])==null?void 0x0:_0x31fe3e['filter'](_0x356722=>_0x356722[_0x36bc4f(0xc0)]===_0x204e42[_0x36bc4f(0x87)])[_0x36bc4f(0x8c)](_0x5b12b5=>_0x5b12b5['rangeId']))!=null?_0x1ce532:[],_0x37c967=JSON[_0x36bc4f(0x8f)](_0x420f38),_0x17c345=_0x20702f[_0x36bc4f(0xc6)],_0x5677ce=_0x20702f['id'],_0x3017cb={'memberId':(await this['_sessionService']['requireSession'](_0x4c9017))[_0x36bc4f(0x8b)](),'unitId':_0x4c9017,'threadId':_0x17c345,'mention':_0x404357,'content':_0x37c967,'replyId':_0x5677ce},_0x35e214=await this['_httpService'][_0x36bc4f(0x94)](_0x36bc4f(0xe0)+_0x4c9017+_0x36bc4f(0xb5),{'body':_0x3017cb});return!_0x35e214[_0x36bc4f(0xbb)]['error']||_0x35e214[_0x36bc4f(0xbb)][_0x36bc4f(0xa0)][_0x36bc4f(0xa1)]===0x1;}async[_0x5b4b18(0xb9)](_0x356f5f){const _0x2377c4=_0x5b4b18,{unitId:_0x3d8058}=_0x356f5f,_0xafc633=_0x356f5f[_0x2377c4(0xc6)],_0xed83c={'memberId':this[_0x2377c4(0xc1)][_0x2377c4(0xe2)]()['userID'],'unitId':_0x3d8058,'threadId':_0xafc633,'solved':_0x356f5f[_0x2377c4(0x97)]?I[_0x2377c4(0xad)]:I[_0x2377c4(0xc7)]},_0xc01be7=await this['_httpService'][_0x2377c4(0x94)](_0x2377c4(0xe0)+_0x3d8058+'/solved',{'body':_0xed83c});return!_0xc01be7['body'][_0x2377c4(0xa0)]||_0xc01be7[_0x2377c4(0xbb)]['error'][_0x2377c4(0xa1)]===0x1;}async['deleteComment'](_0x215656,_0x27258b,_0xf95e97,_0x14a193){const _0x3b1925=_0x5b4b18,_0x202106={'memberId':(await this[_0x3b1925(0xc4)][_0x3b1925(0xb6)](_0x215656))[_0x3b1925(0x8b)](),'threadId':_0xf95e97,'replyId':_0x14a193,'unitId':_0x215656},_0x286c0b=await this[_0x3b1925(0xce)][_0x3b1925(0x94)](_0x3b1925(0xe0)+_0x215656+_0x3b1925(0x96),{'body':_0x202106});return!_0x286c0b[_0x3b1925(0xbb)]['error']||_0x286c0b[_0x3b1925(0xbb)]['error'][_0x3b1925(0xa1)]===0x1;}async['listComments'](_0x2d2ec6,_0x1a9f59,_0x2f49a7){const _0x1d5c14=_0x5b4b18,_0x323fa3={'unitId':_0x2d2ec6,'threadId':_0x2f49a7},_0x18be39=await this[_0x1d5c14(0xce)]['post'](_0x1d5c14(0xe0)+_0x2d2ec6+_0x1d5c14(0x9b),{'body':_0x323fa3}),_0x197e4e=_0x2f49a7['map'](_0x322714=>ee(_0x18be39[_0x1d5c14(0xbb)][_0x1d5c14(0xa3)][_0x322714],_0x2d2ec6,_0x1a9f59))['filter'](Boolean);return Object[_0x1d5c14(0x7d)](_0x18be39[_0x1d5c14(0xbb)][_0x1d5c14(0xaf)])[_0x1d5c14(0xac)](_0x565c79=>{const _0xd28464=_0x1d5c14;this[_0xd28464(0xc1)][_0xd28464(0xcb)](_0x565c79);}),_0x197e4e;}[_0x5b4b18(0x80)](_0x5c8cb0){const _0x1bb765=_0x5b4b18;return{'id':_0x5c8cb0['id'],'threadId':_0x5c8cb0[_0x1bb765(0xc6)],'ref':_0x5c8cb0[_0x1bb765(0xc3)]};}};S=Q([b(0x0,_0x241ced(_0x35de56)),b(0x1,_0x241ced(_0x1d9a15)),b(0x2,_0x241ced(_0x46094c))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x2e77f9,_0xfb9c96,_0x311f68,_0x223a76)=>{for(var _0x554744=_0x223a76>0x1?void 0x0:_0x223a76?re(_0xfb9c96,_0x311f68):_0xfb9c96,_0x39e6f8=_0x2e77f9['length']-0x1,_0x9a546b;_0x39e6f8>=0x0;_0x39e6f8--)(_0x9a546b=_0x2e77f9[_0x39e6f8])&&(_0x554744=_0x9a546b(_0x554744)||_0x554744);return _0x554744;},M=(_0x52cf56,_0x1cf09d)=>(_0x37254a,_0x48f554)=>_0x1cf09d(_0x37254a,_0x48f554,_0x52cf56);let f=class extends _0x24aa00{constructor(_0x26d477,_0x43dc53){const _0x5ebbc9=_0x5b4b18;super(),this[_0x5ebbc9(0xa2)]=_0x26d477,this[_0x5ebbc9(0xc2)]=_0x43dc53,this['_initDataSource']();}[_0x5b4b18(0xda)](){const _0x4006ca=_0x5b4b18;this[_0x4006ca(0xa2)][_0x4006ca(0x9c)]=this[_0x4006ca(0xc2)],this[_0x4006ca(0xa2)][_0x4006ca(0xab)]=!0x1;}};f=te([M(0x0,_0x2f2070),M(0x1,_0x241ced(S))],f);var se=Object['defineProperty'],oe=Object[_0x5b4b18(0xbc)],ne=(_0x2de6ab,_0x2b40f9,_0x558233)=>_0x2b40f9 in _0x2de6ab?se(_0x2de6ab,_0x2b40f9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x558233}):_0x2de6ab[_0x2b40f9]=_0x558233,ie=(_0x50ad44,_0x33ad7c,_0x4713f6,_0x313b52)=>{for(var _0x369adc=_0x313b52>0x1?void 0x0:_0x313b52?oe(_0x33ad7c,_0x4713f6):_0x33ad7c,_0x4ed72c=_0x50ad44['length']-0x1,_0x50614c;_0x4ed72c>=0x0;_0x4ed72c--)(_0x50614c=_0x50ad44[_0x4ed72c])&&(_0x369adc=_0x50614c(_0x369adc)||_0x369adc);return _0x369adc;},N=(_0x1c2ebb,_0xca0680)=>(_0x3b91a4,_0x2de7ab)=>_0xca0680(_0x3b91a4,_0x2de7ab,_0x1c2ebb),$=(_0x2b956e,_0x318c3a,_0x186821)=>ne(_0x2b956e,typeof _0x318c3a!=_0x5b4b18(0xbd)?_0x318c3a+'':_0x318c3a,_0x186821);let g=class extends _0x7c2625{constructor(_0x871de8=O,_0x302440,_0x51972f){const _0x38d4e6=_0x5b4b18;super(),this[_0x38d4e6(0x82)]=_0x871de8,this['_injector']=_0x302440,this[_0x38d4e6(0xc5)]=_0x51972f;const {..._0x5c1a3e}=_0x30d2bc({},O,this[_0x38d4e6(0x82)]);this[_0x38d4e6(0xc5)][_0x38d4e6(0xa6)](z,_0x5c1a3e);}['onStarting'](){const _0x516017=_0x5b4b18;[[S],[f],[_]][_0x516017(0xac)](_0x13f963=>{const _0x376943=_0x516017;this[_0x376943(0xb0)][_0x376943(0x9a)](_0x13f963);});}[_0x5b4b18(0xba)](){const _0x794edb=_0x5b4b18;this[_0x794edb(0xb0)][_0x794edb(0xdb)](f),this[_0x794edb(0xb0)]['get'](_);}};$(g,_0x5b4b18(0xd1),W),$(g,'type',_0x549035[_0x5b4b18(0x9d)]),g=ie([_0x43f6a1(_0x5ef373,_0x28de78,_0xd9c1f9),N(0x1,_0x241ced(_0x59bd72)),N(0x2,_0x2266a5)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1b503f=_0x53d2;(function(_0x5ecad4,_0x1ce279){const _0x4e49bf=_0x53d2,_0x29d002=_0x5ecad4();while(!![]){try{const _0x37fd48=-parseInt(_0x4e49bf(0x23b))/0x1+parseInt(_0x4e49bf(0x21b))/0x2+parseInt(_0x4e49bf(0x1ee))/0x3+parseInt(_0x4e49bf(0x226))/0x4*(-parseInt(_0x4e49bf(0x206))/0x5)+-parseInt(_0x4e49bf(0x223))/0x6+parseInt(_0x4e49bf(0x22d))/0x7*(-parseInt(_0x4e49bf(0x1eb))/0x8)+-parseInt(_0x4e49bf(0x1f0))/0x9*(-parseInt(_0x4e49bf(0x228))/0xa);if(_0x37fd48===_0x1ce279)break;else _0x29d002['push'](_0x29d002['shift']());}catch(_0x36ac3f){_0x29d002['push'](_0x29d002['shift']());}}}(_0x5491,0x3fd84));import{CommentService as _0x177479,CollaborationSessionService as _0x5d29c3,UniverCollaborationClientPlugin as _0x4ac8a8}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x54b9da}from'@univerjs-pro/license';import{dayjs as _0x5b328b,UserManagerService as _0x27b619,Inject as _0xe56929,Injector as _0x323c4c,Disposable as _0x496c11,CustomRangeType as _0x1a50f9,UniverInstanceType as _0x4ce168,DependentOn as _0x422474,IConfigService as _0x3cb82c,Plugin as _0x55d139,merge as _0xd65155}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x181ffd}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x34daab,IThreadCommentDataSourceService as _0x51dd11}from'@univerjs/thread-comment';import{bufferTime as _0x487d8e}from'rxjs';function _0x5491(){const _0x3cc461=['solved','35NuGFLm','getComment','map','slice','_httpService','/add','userID','_userService','Unknown','_config','Add','_configService','values','stringify','516782dtHjKf','userId','Solve','_injector','dataSource','body','error','delete','rangeType','replyId','resolved','length','_commentService','_threadCommentModel','/edit','185608fqMmaa','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','119997Jlgsit','size','12303CqawDH','deleteComment','commentUpdate$','requireSession','disposeWithMe','UNRECOGNIZED','resolveComment','onReady','updateComment','type','get','Solved','_threadCommentDataSourceService','symbol','root','find','_initUserSync','OpenOrReOpen','getOwnPropertyDescriptor','syncUpdateMutationToColla','ref','/reply','2311115sPwUbB','_init','rangeId','comments','add','code','_initDataSource','forEach','threadId','content','thread-comment-data-source.config','getUser','setConfig','user','replies','comment','Edit','parentId','Reply','Delete','createTimestamp','919058sOfUAk','addComment','format','onStarting','post','addUser','reply','getMemberID','2182446wvnrOQ','_threadCommentDataSource','/universer-api/comment/unit/','4OqzOCN','_sessionService','8930viHjRA','customRanges','/solved','parse'];_0x5491=function(){return _0x3cc461;};return _0x5491();}import{HTTPService as _0x4b3a69}from'@univerjs/network';const W=_0x1b503f(0x1ed);var I=(_0xf2fff0=>(_0xf2fff0[_0xf2fff0[_0x1b503f(0x201)]=0x0]=_0x1b503f(0x201),_0xf2fff0[_0xf2fff0[_0x1b503f(0x1fb)]=0x1]=_0x1b503f(0x1fb),_0xf2fff0[_0xf2fff0[_0x1b503f(0x1f5)]=-0x1]=_0x1b503f(0x1f5),_0xf2fff0))(I||{}),v=(_0x37b9a2=>(_0x37b9a2[_0x37b9a2[_0x1b503f(0x235)]=0x0]=_0x1b503f(0x235),_0x37b9a2[_0x37b9a2[_0x1b503f(0x237)]=0x1]=_0x1b503f(0x237),_0x37b9a2[_0x37b9a2[_0x1b503f(0x218)]=0x2]=_0x1b503f(0x218),_0x37b9a2[_0x37b9a2[_0x1b503f(0x216)]=0x3]=_0x1b503f(0x216),_0x37b9a2[_0x37b9a2[_0x1b503f(0x219)]=0x4]='Delete',_0x37b9a2[_0x37b9a2[_0x1b503f(0x23d)]=0x5]='Solve',_0x37b9a2[_0x37b9a2[_0x1b503f(0x1f5)]=-0x1]=_0x1b503f(0x1f5),_0x37b9a2))(v||{});const y=_0x1c2e89=>_0x5b328b(new Date(+_0x1c2e89))[_0x1b503f(0x21d)]('YYYY/MM/DD\x20HH:mm'),B=async(_0xc81d1c,_0x561816)=>{const _0x3a5f86=_0x1b503f,_0x2a6bcb=_0xc81d1c['get'](_0x27b619),_0x36d59e=_0xc81d1c['get'](_0x4b3a69);_0x561816[_0x3a5f86(0x20d)](_0xb2e873=>{const _0x3a3acb=_0x3a5f86;_0x2a6bcb[_0x3a3acb(0x211)](_0xb2e873)&&_0x561816[_0x3a3acb(0x1e3)](_0xb2e873);}),_0x561816[_0x3a5f86(0x1ef)]&&(await _0x36d59e[_0x3a5f86(0x1fa)]('/universer-api/user/list',{'params':{'userIDs':[..._0x561816]}}))['body'][_0x3a5f86(0x1ec)][_0x3a5f86(0x20d)](_0x43e85f=>{const _0x415732=_0x3a5f86;_0x43e85f&&_0x2a6bcb[_0x415732(0x220)](_0x43e85f);});};var K=Object[_0x1b503f(0x202)],V=(_0x387c97,_0x5c32d4,_0x428338,_0x5f41b7)=>{for(var _0xf0b265=_0x5f41b7>0x1?void 0x0:_0x5f41b7?K(_0x5c32d4,_0x428338):_0x5c32d4,_0x1395d6=_0x387c97['length']-0x1,_0x1bb40a;_0x1395d6>=0x0;_0x1395d6--)(_0x1bb40a=_0x387c97[_0x1395d6])&&(_0xf0b265=_0x1bb40a(_0xf0b265)||_0xf0b265);return _0xf0b265;},p=(_0x2fc504,_0x5c1669)=>(_0x2e4e18,_0x5f1862)=>_0x5c1669(_0x2e4e18,_0x5f1862,_0x2fc504);let _=class extends _0x496c11{constructor(_0x14c945,_0x1836d1,_0x3ec5a8,_0x27aa08){const _0x4f27a5=_0x1b503f;super(),this[_0x4f27a5(0x1e8)]=_0x14c945,this[_0x4f27a5(0x1e9)]=_0x1836d1,this['_userService']=_0x3ec5a8,this[_0x4f27a5(0x23e)]=_0x27aa08,this[_0x4f27a5(0x207)](),this[_0x4f27a5(0x200)]();}['_initUserSync'](){const _0x4cb21d=_0x1b503f;this[_0x4cb21d(0x1f4)](this[_0x4cb21d(0x1e9)][_0x4cb21d(0x1f2)]['pipe'](_0x487d8e(0x10))['subscribe'](_0x33590f=>{const _0x3e36e9=_0x4cb21d,_0x5b166c=new Set();_0x33590f[_0x3e36e9(0x20d)](_0x37ba4c=>{const _0x1133f2=_0x3e36e9;switch(_0x37ba4c[_0x1133f2(0x1f9)]){case _0x1133f2(0x20a):{const _0x330e8d=_0x37ba4c['payload']['personId'];_0x5b166c[_0x1133f2(0x20a)](_0x330e8d);break;}}}),B(this['_injector'],_0x5b166c);}));}[_0x1b503f(0x207)](){const _0x20b5b2=_0x1b503f;this['disposeWithMe'](this[_0x20b5b2(0x1e8)][_0x20b5b2(0x1f2)]['subscribe'](async _0x16eda5=>{const _0x56ef1b=_0x20b5b2;var _0x458bf3,_0xd96ddd,_0x4f9b16,_0x3ed873;const _0xb15ac0=(_0x458bf3=this[_0x56ef1b(0x1e9)]['getUnit'](_0x16eda5['unitId'])[_0x56ef1b(0x1ff)](_0x2752bb=>_0x2752bb['threadId']===_0x16eda5['threadId']))==null?void 0x0:_0x458bf3['root'];if(!_0xb15ac0)return;const {unitId:_0x23a6ff,subUnitId:_0x153a0a}=_0xb15ac0;switch(_0x16eda5[_0x56ef1b(0x213)]&&this[_0x56ef1b(0x234)][_0x56ef1b(0x220)](_0x16eda5[_0x56ef1b(0x213)]),_0x16eda5[_0x56ef1b(0x1f9)]){case v[_0x56ef1b(0x237)]:break;case v[_0x56ef1b(0x218)]:{this['_threadCommentModel'][_0x56ef1b(0x21c)](_0x23a6ff,_0x153a0a,{'unitId':_0x23a6ff,'subUnitId':_0x153a0a,'ref':'','id':_0x16eda5[_0x56ef1b(0x1e5)],'dT':y(+_0x16eda5[_0x56ef1b(0x21a)]),'threadId':_0x16eda5[_0x56ef1b(0x20e)],'personId':(_0x4f9b16=(_0xd96ddd=_0x16eda5['user'])==null?void 0x0:_0xd96ddd[_0x56ef1b(0x233)])!=null?_0x4f9b16:_0x16eda5[_0x56ef1b(0x23c)],'text':JSON[_0x56ef1b(0x22b)](_0x16eda5[_0x56ef1b(0x20f)]),'parentId':_0xb15ac0['id']});break;}case v[_0x56ef1b(0x219)]:{const _0x5eb921=this[_0x56ef1b(0x1e9)][_0x56ef1b(0x22e)](_0x23a6ff,_0x153a0a,_0x16eda5[_0x56ef1b(0x1e5)]);_0x5eb921&&_0x5eb921[_0x56ef1b(0x217)]&&this[_0x56ef1b(0x1e9)][_0x56ef1b(0x1f1)](_0x23a6ff,_0x153a0a,_0x16eda5[_0x56ef1b(0x1e5)]);break;}case v[_0x56ef1b(0x216)]:{this[_0x56ef1b(0x1e9)][_0x56ef1b(0x1f8)](_0x23a6ff,_0x153a0a,{'commentId':_0x16eda5[_0x56ef1b(0x1e5)],'text':JSON[_0x56ef1b(0x22b)](_0x16eda5[_0x56ef1b(0x20f)])});break;}case v[_0x56ef1b(0x23d)]:{const _0x3a9c54=(_0x3ed873=this[_0x56ef1b(0x1e9)]['getUnit'](_0x16eda5['unitId'])[_0x56ef1b(0x1ff)](_0x55c33d=>_0x55c33d[_0x56ef1b(0x20e)]===_0x16eda5[_0x56ef1b(0x20e)]))==null?void 0x0:_0x3ed873[_0x56ef1b(0x1fe)];_0x3a9c54&&this['_threadCommentModel'][_0x56ef1b(0x1f6)](_0x23a6ff,_0x153a0a,_0x3a9c54['id'],_0x16eda5['solved']===I[_0x56ef1b(0x1fb)]);break;}}}));}};_=V([p(0x0,_0xe56929(_0x177479)),p(0x1,_0xe56929(_0x34daab)),p(0x2,_0xe56929(_0x27b619)),p(0x3,_0xe56929(_0x323c4c))],_);const z=_0x1b503f(0x210),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1f24c0,_0xf3bd,_0x28f0f0,_0x2e75bb)=>{const _0xb8a12a=_0x1b503f;for(var _0x48e1eb=_0x2e75bb>0x1?void 0x0:_0x2e75bb?k(_0xf3bd,_0x28f0f0):_0xf3bd,_0x515e7d=_0x1f24c0[_0xb8a12a(0x1e7)]-0x1,_0x3ddbfb;_0x515e7d>=0x0;_0x515e7d--)(_0x3ddbfb=_0x1f24c0[_0x515e7d])&&(_0x48e1eb=_0x3ddbfb(_0x48e1eb)||_0x48e1eb);return _0x48e1eb;},b=(_0x342fff,_0x44dcd2)=>(_0xd804f3,_0x3c2e2b)=>_0x44dcd2(_0xd804f3,_0x3c2e2b,_0x342fff);function X(_0x480133,_0x29c503){const _0x525730=_0x1b503f,_0x5464c1=_0x480133[_0x525730(0x214)][0x0];return{..._0x29c503,'id':_0x5464c1['replyId'],'resolved':_0x480133[_0x525730(0x22c)]===0x1,'dT':y(_0x5464c1['createTimestamp']),'personId':_0x5464c1[_0x525730(0x23c)],'threadId':_0x5464c1[_0x525730(0x20e)]};}function ee(_0x409c40,_0x206ede,_0x172d6b){const _0x3ddf74=_0x1b503f;var _0x53b8bd,_0x5f5593;if(((_0x5f5593=(_0x53b8bd=_0x409c40==null?void 0x0:_0x409c40[_0x3ddf74(0x214)])==null?void 0x0:_0x53b8bd['length'])!=null?_0x5f5593:0x0)>0x0){const _0x18da36=(_0x12305d,_0x343833)=>({'id':_0x12305d['replyId'],'threadId':_0x12305d[_0x3ddf74(0x20e)],'dT':y(_0x12305d[_0x3ddf74(0x21a)]),'personId':_0x12305d[_0x3ddf74(0x23c)],'resolved':_0x409c40[_0x3ddf74(0x22c)]===I[_0x3ddf74(0x1fb)],'unitId':_0x206ede,'subUnitId':_0x172d6b,'text':JSON[_0x3ddf74(0x22b)](_0x12305d['content']),'parentId':_0x343833}),_0x16582e=_0x18da36(_0x409c40[_0x3ddf74(0x214)][0x0]);return{..._0x16582e,'children':_0x409c40['replies'][_0x3ddf74(0x230)](0x1)[_0x3ddf74(0x22f)](_0x498e08=>_0x18da36(_0x498e08,_0x16582e['id']))};}return null;}function _0x53d2(_0x2f8f1d,_0x3438e8){_0x2f8f1d=_0x2f8f1d-0x1e0;const _0x5491da=_0x5491();let _0x53d231=_0x5491da[_0x2f8f1d];return _0x53d231;}let S=class{constructor(_0x208ca2,_0xb7c40e,_0x2b4bcd){const _0x31a10c=_0x1b503f;this[_0x31a10c(0x231)]=_0x208ca2,this['_userService']=_0xb7c40e,this['_sessionService']=_0x2b4bcd;}async[_0x1b503f(0x21c)](_0x3a8e1e){const _0x387822=_0x1b503f;var _0x9a661d,_0x13e52b;const {parentId:_0x27a3df,unitId:_0x142237,text:_0xc8886c,threadId:_0x269136}=_0x3a8e1e,_0xd3b4d=(_0x13e52b=(_0x9a661d=_0xc8886c[_0x387822(0x229)])==null?void 0x0:_0x9a661d['filter'](_0x2f7eb3=>_0x2f7eb3[_0x387822(0x1e4)]===_0x1a50f9['COMMENT'])[_0x387822(0x22f)](_0x1c1b48=>_0x1c1b48[_0x387822(0x208)]))!=null?_0x13e52b:[],_0x49d2d5=JSON[_0x387822(0x23a)](_0xc8886c),_0x300ebf=(await this[_0x387822(0x227)][_0x387822(0x1f3)](_0x142237))[_0x387822(0x222)]();if(_0x27a3df){const _0x3167b1={'memberId':_0x300ebf,'unitId':_0x142237,'content':_0x49d2d5,'mention':_0xd3b4d,'threadId':_0x269136},_0x1b0851=(await this[_0x387822(0x231)][_0x387822(0x21f)](_0x387822(0x225)+_0x142237+_0x387822(0x205),{'body':_0x3167b1}))[_0x387822(0x1e1)][_0x387822(0x221)];return{..._0x3a8e1e,'id':_0x1b0851['replyId'],'dT':_0x5b328b(+_0x1b0851[_0x387822(0x21a)])[_0x387822(0x21d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1b0851[_0x387822(0x23c)]};}else{const _0x35be21={'memberId':_0x300ebf,'unitId':_0x142237,'content':_0x49d2d5,'mention':_0xd3b4d},_0x15fbab=await this[_0x387822(0x231)][_0x387822(0x21f)](_0x387822(0x225)+_0x142237+_0x387822(0x232),{'body':_0x35be21});return X(_0x15fbab['body'][_0x387822(0x215)],_0x3a8e1e);}}async['updateComment'](_0x260b35){const _0x5bf4f1=_0x1b503f;var _0x48ba6d,_0x2c4f10;const {text:_0x3e7bb0,unitId:_0x247ca6}=_0x260b35,_0xa1342a=(_0x2c4f10=(_0x48ba6d=_0x3e7bb0[_0x5bf4f1(0x229)])==null?void 0x0:_0x48ba6d['filter'](_0x308644=>_0x308644['rangeType']===_0x1a50f9['COMMENT'])[_0x5bf4f1(0x22f)](_0x20dca1=>_0x20dca1[_0x5bf4f1(0x208)]))!=null?_0x2c4f10:[],_0x45370b=JSON[_0x5bf4f1(0x23a)](_0x3e7bb0),_0x4be793=_0x260b35[_0x5bf4f1(0x20e)],_0x2a397e=_0x260b35['id'],_0x146dfa={'memberId':(await this[_0x5bf4f1(0x227)][_0x5bf4f1(0x1f3)](_0x247ca6))[_0x5bf4f1(0x222)](),'unitId':_0x247ca6,'threadId':_0x4be793,'mention':_0xa1342a,'content':_0x45370b,'replyId':_0x2a397e},_0xc37f2c=await this['_httpService'][_0x5bf4f1(0x21f)](_0x5bf4f1(0x225)+_0x247ca6+_0x5bf4f1(0x1ea),{'body':_0x146dfa});return!_0xc37f2c[_0x5bf4f1(0x1e1)]['error']||_0xc37f2c[_0x5bf4f1(0x1e1)][_0x5bf4f1(0x1e2)][_0x5bf4f1(0x20b)]===0x1;}async[_0x1b503f(0x1f6)](_0x32dd47){const _0x2e6f93=_0x1b503f,{unitId:_0xe790bb}=_0x32dd47,_0x28583f=_0x32dd47['threadId'],_0x4a030b={'memberId':this[_0x2e6f93(0x234)]['getCurrentUser']()[_0x2e6f93(0x233)],'unitId':_0xe790bb,'threadId':_0x28583f,'solved':_0x32dd47[_0x2e6f93(0x1e6)]?I['Solved']:I[_0x2e6f93(0x201)]},_0x16ef5a=await this[_0x2e6f93(0x231)][_0x2e6f93(0x21f)](_0x2e6f93(0x225)+_0xe790bb+_0x2e6f93(0x22a),{'body':_0x4a030b});return!_0x16ef5a[_0x2e6f93(0x1e1)][_0x2e6f93(0x1e2)]||_0x16ef5a[_0x2e6f93(0x1e1)][_0x2e6f93(0x1e2)][_0x2e6f93(0x20b)]===0x1;}async[_0x1b503f(0x1f1)](_0x162970,_0x2917ac,_0x44e83f,_0x49a38c){const _0x18cacb=_0x1b503f,_0x277b2c={'memberId':(await this[_0x18cacb(0x227)]['requireSession'](_0x162970))[_0x18cacb(0x222)](),'threadId':_0x44e83f,'replyId':_0x49a38c,'unitId':_0x162970},_0x54a4a7=await this[_0x18cacb(0x231)][_0x18cacb(0x21f)](_0x18cacb(0x225)+_0x162970+'/delete',{'body':_0x277b2c});return!_0x54a4a7[_0x18cacb(0x1e1)][_0x18cacb(0x1e2)]||_0x54a4a7['body'][_0x18cacb(0x1e2)][_0x18cacb(0x20b)]===0x1;}async['listComments'](_0xc26da1,_0x353bf2,_0x1474c8){const _0x368d91=_0x1b503f,_0x508603={'unitId':_0xc26da1,'threadId':_0x1474c8},_0x2160e7=await this['_httpService'][_0x368d91(0x21f)](_0x368d91(0x225)+_0xc26da1+'/list',{'body':_0x508603}),_0x171654=_0x1474c8[_0x368d91(0x22f)](_0x5d3b17=>ee(_0x2160e7[_0x368d91(0x1e1)][_0x368d91(0x209)][_0x5d3b17],_0xc26da1,_0x353bf2))['filter'](Boolean);return Object[_0x368d91(0x239)](_0x2160e7[_0x368d91(0x1e1)][_0x368d91(0x1ec)])['forEach'](_0x26e897=>{const _0x55d431=_0x368d91;this['_userService'][_0x55d431(0x220)](_0x26e897);}),_0x171654;}['saveCommentToSnapshot'](_0x31fc68){const _0x323f5d=_0x1b503f;return{'id':_0x31fc68['id'],'threadId':_0x31fc68[_0x323f5d(0x20e)],'ref':_0x31fc68[_0x323f5d(0x204)]};}};S=Q([b(0x0,_0xe56929(_0x4b3a69)),b(0x1,_0xe56929(_0x27b619)),b(0x2,_0xe56929(_0x5d29c3))],S);var re=Object[_0x1b503f(0x202)],te=(_0x31308c,_0x519ab1,_0x1537c5,_0x488aae)=>{const _0x23851c=_0x1b503f;for(var _0x9a3f9e=_0x488aae>0x1?void 0x0:_0x488aae?re(_0x519ab1,_0x1537c5):_0x519ab1,_0x5022eb=_0x31308c[_0x23851c(0x1e7)]-0x1,_0x51df2c;_0x5022eb>=0x0;_0x5022eb--)(_0x51df2c=_0x31308c[_0x5022eb])&&(_0x9a3f9e=_0x51df2c(_0x9a3f9e)||_0x9a3f9e);return _0x9a3f9e;},M=(_0x47f1ee,_0x349640)=>(_0x4c5a6a,_0x287107)=>_0x349640(_0x4c5a6a,_0x287107,_0x47f1ee);let f=class extends _0x496c11{constructor(_0x1641f1,_0x3b57a5){const _0x57bb5d=_0x1b503f;super(),this[_0x57bb5d(0x1fc)]=_0x1641f1,this[_0x57bb5d(0x224)]=_0x3b57a5,this[_0x57bb5d(0x20c)]();}[_0x1b503f(0x20c)](){const _0x3ad9e5=_0x1b503f;this[_0x3ad9e5(0x1fc)][_0x3ad9e5(0x1e0)]=this[_0x3ad9e5(0x224)],this[_0x3ad9e5(0x1fc)][_0x3ad9e5(0x203)]=!0x1;}};f=te([M(0x0,_0x51dd11),M(0x1,_0xe56929(S))],f);var se=Object['defineProperty'],oe=Object[_0x1b503f(0x202)],ne=(_0x1d8a02,_0x18bf9c,_0x4def72)=>_0x18bf9c in _0x1d8a02?se(_0x1d8a02,_0x18bf9c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4def72}):_0x1d8a02[_0x18bf9c]=_0x4def72,ie=(_0x5a19ac,_0x2db807,_0x5a85c7,_0x3253ec)=>{const _0x570c8=_0x1b503f;for(var _0x470026=_0x3253ec>0x1?void 0x0:_0x3253ec?oe(_0x2db807,_0x5a85c7):_0x2db807,_0x367189=_0x5a19ac[_0x570c8(0x1e7)]-0x1,_0x4e6bb1;_0x367189>=0x0;_0x367189--)(_0x4e6bb1=_0x5a19ac[_0x367189])&&(_0x470026=_0x4e6bb1(_0x470026)||_0x470026);return _0x470026;},N=(_0x5e90f2,_0x9bac7)=>(_0x5c2926,_0x28cdbd)=>_0x9bac7(_0x5c2926,_0x28cdbd,_0x5e90f2),$=(_0x3800b3,_0x502271,_0x56d1c4)=>ne(_0x3800b3,typeof _0x502271!=_0x1b503f(0x1fd)?_0x502271+'':_0x502271,_0x56d1c4);let g=class extends _0x55d139{constructor(_0x7eeebc=O,_0xf478b9,_0x2abb97){const _0x11c674=_0x1b503f;super(),this[_0x11c674(0x236)]=_0x7eeebc,this[_0x11c674(0x23e)]=_0xf478b9,this[_0x11c674(0x238)]=_0x2abb97;const {..._0x2a40dc}=_0xd65155({},O,this[_0x11c674(0x236)]);this[_0x11c674(0x238)][_0x11c674(0x212)](z,_0x2a40dc);}[_0x1b503f(0x21e)](){[[S],[f],[_]]['forEach'](_0x38d0ce=>{const _0x38b66d=_0x53d2;this[_0x38b66d(0x23e)][_0x38b66d(0x20a)](_0x38d0ce);});}[_0x1b503f(0x1f7)](){const _0x53289e=_0x1b503f;this[_0x53289e(0x23e)][_0x53289e(0x1fa)](f),this[_0x53289e(0x23e)][_0x53289e(0x1fa)](_);}};$(g,'pluginName',W),$(g,_0x1b503f(0x1f9),_0x4ce168['UNIVER_UNKNOWN']),g=ie([_0x422474(_0x181ffd,_0x4ac8a8,_0x54b9da),N(0x1,_0xe56929(_0x323c4c)),N(0x2,_0x3cb82c)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x5ac6(_0x26ec4b,_0x38e0de){_0x26ec4b=_0x26ec4b-0x14b;const _0x33f78e=_0x33f7();let _0x5ac645=_0x33f78e[_0x26ec4b];return _0x5ac645;}function _0x33f7(){const _0x2ba396=['post','content','stringify','Edit','UniverCore','subscribe','rxjs','OpenOrReOpen','updateComment','1016NfVljf','forEach','_userService','rangeId','Disposable','threadId','rangeType','_initDataSource','10200627bjKzig','_config','UniverThreadCommentDataSourcePlugin','Add','users','addComment','size','thread-comment-data-source.config','commentUpdate$','156qNxgbJ','merge','Unknown','length','_commentService','_threadCommentDataSourceService','root','UniverThreadCommentUi','/universer-api/comment/unit/','dataSource','2945525mbpejv','CustomRangeType','UniverProLicense','comments','Delete','exports','createTimestamp','resolved','userId','body','IThreadCommentDataSourceService','Reply','type','reply','_threadCommentDataSource','addUser','/universer-api/user/list','58641yDhSfr','UniverProCollaborationClient','parse','COMMENT','@univerjs/core','@univerjs/thread-comment-ui','listComments','function','@univerjs/network','5101068CsLqfq','parentId','_httpService','YYYY/MM/DD\x20HH:mm','replyId','UserManagerService','Solve','/delete','replies','delete','Inject','get','customRanges','_initUserSync','userID','/add','dayjs','_injector','ThreadCommentModel','onReady','defineProperty','Injector','90744SERCBI','@univerjs-pro/collaboration-client','solved','object','UniverLicensePlugin','_sessionService','saveCommentToSnapshot','slice','HTTPService','getUser','ref','getMemberID','getComment','UniverCollaborationClientPlugin','filter','_configService','requireSession','find','@univerjs-pro/license','23261ZxeeYP','_threadCommentModel','add','user','disposeWithMe','10GiccBQ','getUnit','unitId','setConfig','Plugin','format','onStarting','deleteComment','UNIVER_UNKNOWN','syncUpdateMutationToColla','values','UniverThreadCommentUIPlugin','map','resolveComment','@univerjs/thread-comment','bufferTime','228613uhiUyS','_init','error','/solved','UNRECOGNIZED','UniverThreadComment','getOwnPropertyDescriptor','/edit','/list','getCurrentUser','personId','Solved'];_0x33f7=function(){return _0x2ba396;};return _0x33f7();}(function(_0x34123e,_0x16864c){const _0x49e616=_0x5ac6,_0x4b1913=_0x34123e();while(!![]){try{const _0x587ab7=-parseInt(_0x49e616(0x14f))/0x1+-parseInt(_0x49e616(0x1af))/0x2+-parseInt(_0x49e616(0x190))/0x3*(-parseInt(_0x49e616(0x175))/0x4)+-parseInt(_0x49e616(0x17f))/0x5+-parseInt(_0x49e616(0x199))/0x6+-parseInt(_0x49e616(0x1c2))/0x7*(-parseInt(_0x49e616(0x164))/0x8)+-parseInt(_0x49e616(0x16c))/0x9*(-parseInt(_0x49e616(0x1c7))/0xa);if(_0x587ab7===_0x16864c)break;else _0x4b1913['push'](_0x4b1913['shift']());}catch(_0x35ae22){_0x4b1913['push'](_0x4b1913['shift']());}}}(_0x33f7,0x93949),function(_0x17ad91,_0x1d54d1){const _0x4ffa81=_0x5ac6;typeof exports==_0x4ffa81(0x1b2)&&typeof module<'u'?_0x1d54d1(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==_0x4ffa81(0x197)&&define['amd']?define([_0x4ffa81(0x184),_0x4ffa81(0x1b0),_0x4ffa81(0x1c1),_0x4ffa81(0x194),_0x4ffa81(0x195),_0x4ffa81(0x14d),'rxjs',_0x4ffa81(0x198)],_0x1d54d1):(_0x17ad91=typeof globalThis<'u'?globalThis:_0x17ad91||self,_0x1d54d1(_0x17ad91['UniverProThreadCommentDatasource']={},_0x17ad91[_0x4ffa81(0x191)],_0x17ad91[_0x4ffa81(0x181)],_0x17ad91[_0x4ffa81(0x15f)],_0x17ad91[_0x4ffa81(0x17c)],_0x17ad91[_0x4ffa81(0x154)],_0x17ad91[_0x4ffa81(0x161)],_0x17ad91['UniverNetwork']));}(this,function(_0x2c6a2d,_0x121777,_0x2a335b,_0x22c134,_0x441532,_0x4ef387,_0x50a3a0,_0x2151ed){'use strict';const _0x6744c8=_0x5ac6;const _0xcf9255='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x43f423=(_0x16165b=>(_0x16165b[_0x16165b['OpenOrReOpen']=0x0]=_0x6744c8(0x162),_0x16165b[_0x16165b[_0x6744c8(0x15a)]=0x1]='Solved',_0x16165b[_0x16165b[_0x6744c8(0x153)]=-0x1]='UNRECOGNIZED',_0x16165b))(_0x43f423||{}),_0x311cbd=(_0x3802aa=>(_0x3802aa[_0x3802aa[_0x6744c8(0x177)]=0x0]=_0x6744c8(0x177),_0x3802aa[_0x3802aa[_0x6744c8(0x16f)]=0x1]='Add',_0x3802aa[_0x3802aa[_0x6744c8(0x18a)]=0x2]=_0x6744c8(0x18a),_0x3802aa[_0x3802aa[_0x6744c8(0x15e)]=0x3]='Edit',_0x3802aa[_0x3802aa[_0x6744c8(0x183)]=0x4]='Delete',_0x3802aa[_0x3802aa['Solve']=0x5]=_0x6744c8(0x19f),_0x3802aa[_0x3802aa[_0x6744c8(0x153)]=-0x1]=_0x6744c8(0x153),_0x3802aa))(_0x311cbd||{});const _0x181b25=_0xbf57ca=>_0x22c134[_0x6744c8(0x1a9)](new Date(+_0xbf57ca))[_0x6744c8(0x1cc)](_0x6744c8(0x19c)),_0x3da393=async(_0x236fd1,_0xa991eb)=>{const _0x5625ac=_0x6744c8,_0x575559=_0x236fd1[_0x5625ac(0x1a4)](_0x22c134[_0x5625ac(0x19e)]),_0xdb13b9=_0x236fd1[_0x5625ac(0x1a4)](_0x2151ed['HTTPService']);_0xa991eb[_0x5625ac(0x165)](_0x5df111=>{const _0x248098=_0x5625ac;_0x575559[_0x248098(0x1b8)](_0x5df111)&&_0xa991eb[_0x248098(0x1a2)](_0x5df111);}),_0xa991eb[_0x5625ac(0x172)]&&(await _0xdb13b9[_0x5625ac(0x1a4)](_0x5625ac(0x18f),{'params':{'userIDs':[..._0xa991eb]}}))['body'][_0x5625ac(0x170)][_0x5625ac(0x165)](_0x4a2ba9=>{const _0x383a02=_0x5625ac;_0x4a2ba9&&_0x575559[_0x383a02(0x18e)](_0x4a2ba9);});};var _0x1fa79a=Object[_0x6744c8(0x155)],_0x3db626=(_0xac5705,_0xbd5369,_0x4d9c7b,_0x14f367)=>{const _0x3f6a7b=_0x6744c8;for(var _0x24647c=_0x14f367>0x1?void 0x0:_0x14f367?_0x1fa79a(_0xbd5369,_0x4d9c7b):_0xbd5369,_0xb6eee8=_0xac5705[_0x3f6a7b(0x178)]-0x1,_0x383ce7;_0xb6eee8>=0x0;_0xb6eee8--)(_0x383ce7=_0xac5705[_0xb6eee8])&&(_0x24647c=_0x383ce7(_0x24647c)||_0x24647c);return _0x24647c;},_0xe94498=(_0x1b9929,_0x2cf5e6)=>(_0x18f80d,_0x1cb0ca)=>_0x2cf5e6(_0x18f80d,_0x1cb0ca,_0x1b9929);let _0x2f60f1=class extends _0x22c134['Disposable']{constructor(_0x526529,_0x2c581a,_0xfb25c7,_0x1fa0d3){const _0x290896=_0x6744c8;super(),this[_0x290896(0x179)]=_0x526529,this['_threadCommentModel']=_0x2c581a,this[_0x290896(0x166)]=_0xfb25c7,this[_0x290896(0x1aa)]=_0x1fa0d3,this[_0x290896(0x150)](),this[_0x290896(0x1a6)]();}[_0x6744c8(0x1a6)](){const _0x3bcc81=_0x6744c8;this[_0x3bcc81(0x1c6)](this['_threadCommentModel'][_0x3bcc81(0x174)]['pipe'](_0x50a3a0[_0x3bcc81(0x14e)](0x10))[_0x3bcc81(0x160)](_0x190322=>{const _0x1e1259=new Set();_0x190322['forEach'](_0x1ba30d=>{const _0x4c26df=_0x5ac6;switch(_0x1ba30d[_0x4c26df(0x18b)]){case _0x4c26df(0x1c4):{const _0x142b4b=_0x1ba30d['payload'][_0x4c26df(0x159)];_0x1e1259[_0x4c26df(0x1c4)](_0x142b4b);break;}}}),_0x3da393(this['_injector'],_0x1e1259);}));}[_0x6744c8(0x150)](){const _0x4fef43=_0x6744c8;this[_0x4fef43(0x1c6)](this[_0x4fef43(0x179)]['commentUpdate$'][_0x4fef43(0x160)](async _0x24451b=>{const _0x45f46f=_0x4fef43;var _0x1d9123,_0xadb4af,_0x3be798,_0x5837a7;const _0x25ad2e=(_0x1d9123=this[_0x45f46f(0x1c3)][_0x45f46f(0x1c8)](_0x24451b[_0x45f46f(0x1c9)])[_0x45f46f(0x1c0)](_0xde9281=>_0xde9281[_0x45f46f(0x169)]===_0x24451b[_0x45f46f(0x169)]))==null?void 0x0:_0x1d9123[_0x45f46f(0x17b)];if(!_0x25ad2e)return;const {unitId:_0x46b1b5,subUnitId:_0x19270e}=_0x25ad2e;switch(_0x24451b['user']&&this[_0x45f46f(0x166)][_0x45f46f(0x18e)](_0x24451b[_0x45f46f(0x1c5)]),_0x24451b['type']){case _0x311cbd['Add']:break;case _0x311cbd[_0x45f46f(0x18a)]:{this['_threadCommentModel']['addComment'](_0x46b1b5,_0x19270e,{'unitId':_0x46b1b5,'subUnitId':_0x19270e,'ref':'','id':_0x24451b[_0x45f46f(0x19d)],'dT':_0x181b25(+_0x24451b['createTimestamp']),'threadId':_0x24451b[_0x45f46f(0x169)],'personId':(_0x3be798=(_0xadb4af=_0x24451b[_0x45f46f(0x1c5)])==null?void 0x0:_0xadb4af[_0x45f46f(0x1a7)])!=null?_0x3be798:_0x24451b['userId'],'text':JSON[_0x45f46f(0x192)](_0x24451b[_0x45f46f(0x15c)]),'parentId':_0x25ad2e['id']});break;}case _0x311cbd[_0x45f46f(0x183)]:{const _0x5a9aa0=this[_0x45f46f(0x1c3)][_0x45f46f(0x1bb)](_0x46b1b5,_0x19270e,_0x24451b[_0x45f46f(0x19d)]);_0x5a9aa0&&_0x5a9aa0[_0x45f46f(0x19a)]&&this[_0x45f46f(0x1c3)][_0x45f46f(0x1ce)](_0x46b1b5,_0x19270e,_0x24451b[_0x45f46f(0x19d)]);break;}case _0x311cbd[_0x45f46f(0x15e)]:{this[_0x45f46f(0x1c3)][_0x45f46f(0x163)](_0x46b1b5,_0x19270e,{'commentId':_0x24451b[_0x45f46f(0x19d)],'text':JSON['parse'](_0x24451b[_0x45f46f(0x15c)])});break;}case _0x311cbd[_0x45f46f(0x19f)]:{const _0x2e4d08=(_0x5837a7=this[_0x45f46f(0x1c3)]['getUnit'](_0x24451b['unitId'])[_0x45f46f(0x1c0)](_0x4ad89b=>_0x4ad89b[_0x45f46f(0x169)]===_0x24451b[_0x45f46f(0x169)]))==null?void 0x0:_0x5837a7[_0x45f46f(0x17b)];_0x2e4d08&&this['_threadCommentModel'][_0x45f46f(0x14c)](_0x46b1b5,_0x19270e,_0x2e4d08['id'],_0x24451b[_0x45f46f(0x1b1)]===_0x43f423[_0x45f46f(0x15a)]);break;}}}));}};_0x2f60f1=_0x3db626([_0xe94498(0x0,_0x22c134[_0x6744c8(0x1a3)](_0x121777['CommentService'])),_0xe94498(0x1,_0x22c134['Inject'](_0x4ef387[_0x6744c8(0x1ab)])),_0xe94498(0x2,_0x22c134[_0x6744c8(0x1a3)](_0x22c134['UserManagerService'])),_0xe94498(0x3,_0x22c134[_0x6744c8(0x1a3)](_0x22c134[_0x6744c8(0x1ae)]))],_0x2f60f1);const _0x365fc8=_0x6744c8(0x173),_0x598e7c={};var _0x2b10c7=Object[_0x6744c8(0x155)],_0x1ea249=(_0x3e8b3e,_0x3dbf02,_0x4a1e8a,_0x1be458)=>{const _0x3bcdae=_0x6744c8;for(var _0x4e37f2=_0x1be458>0x1?void 0x0:_0x1be458?_0x2b10c7(_0x3dbf02,_0x4a1e8a):_0x3dbf02,_0x3e3e2f=_0x3e8b3e[_0x3bcdae(0x178)]-0x1,_0x50f60c;_0x3e3e2f>=0x0;_0x3e3e2f--)(_0x50f60c=_0x3e8b3e[_0x3e3e2f])&&(_0x4e37f2=_0x50f60c(_0x4e37f2)||_0x4e37f2);return _0x4e37f2;},_0xddb6ee=(_0x11e2ec,_0x707e79)=>(_0x16a54d,_0x5f9eec)=>_0x707e79(_0x16a54d,_0x5f9eec,_0x11e2ec);function _0x39edf3(_0x19a864,_0x3f6c2f){const _0x29986f=_0x6744c8,_0x3dbfe9=_0x19a864[_0x29986f(0x1a1)][0x0];return{..._0x3f6c2f,'id':_0x3dbfe9[_0x29986f(0x19d)],'resolved':_0x19a864['solved']===0x1,'dT':_0x181b25(_0x3dbfe9[_0x29986f(0x185)]),'personId':_0x3dbfe9[_0x29986f(0x187)],'threadId':_0x3dbfe9[_0x29986f(0x169)]};}function _0x21acd8(_0x1ff06d,_0x2ed7af,_0x46d3e7){const _0x1596a3=_0x6744c8;var _0xadc661,_0x41ac42;if(((_0x41ac42=(_0xadc661=_0x1ff06d==null?void 0x0:_0x1ff06d[_0x1596a3(0x1a1)])==null?void 0x0:_0xadc661[_0x1596a3(0x178)])!=null?_0x41ac42:0x0)>0x0){const _0xdfb87=(_0x5ba319,_0x1e4fac)=>({'id':_0x5ba319['replyId'],'threadId':_0x5ba319[_0x1596a3(0x169)],'dT':_0x181b25(_0x5ba319['createTimestamp']),'personId':_0x5ba319[_0x1596a3(0x187)],'resolved':_0x1ff06d[_0x1596a3(0x1b1)]===_0x43f423[_0x1596a3(0x15a)],'unitId':_0x2ed7af,'subUnitId':_0x46d3e7,'text':JSON[_0x1596a3(0x192)](_0x5ba319['content']),'parentId':_0x1e4fac}),_0x50ed57=_0xdfb87(_0x1ff06d[_0x1596a3(0x1a1)][0x0]);return{..._0x50ed57,'children':_0x1ff06d['replies'][_0x1596a3(0x1b6)](0x1)[_0x1596a3(0x14b)](_0x383323=>_0xdfb87(_0x383323,_0x50ed57['id']))};}return null;}let _0x1e84e2=class{constructor(_0x5682dc,_0x588971,_0x2d543d){const _0x321188=_0x6744c8;this['_httpService']=_0x5682dc,this[_0x321188(0x166)]=_0x588971,this[_0x321188(0x1b4)]=_0x2d543d;}async[_0x6744c8(0x171)](_0x1d712f){const _0x5b47c4=_0x6744c8;var _0xdb623,_0x13dcb3;const {parentId:_0x57071d,unitId:_0x504236,text:_0x3e7950,threadId:_0x15ef22}=_0x1d712f,_0x5cb1b2=(_0x13dcb3=(_0xdb623=_0x3e7950[_0x5b47c4(0x1a5)])==null?void 0x0:_0xdb623[_0x5b47c4(0x1bd)](_0x1d2d05=>_0x1d2d05[_0x5b47c4(0x16a)]===_0x22c134['CustomRangeType']['COMMENT'])[_0x5b47c4(0x14b)](_0x53c76d=>_0x53c76d['rangeId']))!=null?_0x13dcb3:[],_0x2936ab=JSON[_0x5b47c4(0x15d)](_0x3e7950),_0x3d3c7d=(await this[_0x5b47c4(0x1b4)][_0x5b47c4(0x1bf)](_0x504236))[_0x5b47c4(0x1ba)]();if(_0x57071d){const _0x4d2292={'memberId':_0x3d3c7d,'unitId':_0x504236,'content':_0x2936ab,'mention':_0x5cb1b2,'threadId':_0x15ef22},_0x2f8d1d=(await this['_httpService'][_0x5b47c4(0x15b)](_0x5b47c4(0x17d)+_0x504236+'/reply',{'body':_0x4d2292}))[_0x5b47c4(0x188)][_0x5b47c4(0x18c)];return{..._0x1d712f,'id':_0x2f8d1d['replyId'],'dT':_0x22c134[_0x5b47c4(0x1a9)](+_0x2f8d1d[_0x5b47c4(0x185)])[_0x5b47c4(0x1cc)](_0x5b47c4(0x19c)),'personId':_0x2f8d1d[_0x5b47c4(0x187)]};}else{const _0x1b5077={'memberId':_0x3d3c7d,'unitId':_0x504236,'content':_0x2936ab,'mention':_0x5cb1b2},_0x318038=await this[_0x5b47c4(0x19b)][_0x5b47c4(0x15b)]('/universer-api/comment/unit/'+_0x504236+_0x5b47c4(0x1a8),{'body':_0x1b5077});return _0x39edf3(_0x318038[_0x5b47c4(0x188)]['comment'],_0x1d712f);}}async['updateComment'](_0x3a7fc7){const _0x2e5aad=_0x6744c8;var _0xee6370,_0x5c4361;const {text:_0xa0e8ba,unitId:_0x1faa46}=_0x3a7fc7,_0x53f20d=(_0x5c4361=(_0xee6370=_0xa0e8ba[_0x2e5aad(0x1a5)])==null?void 0x0:_0xee6370[_0x2e5aad(0x1bd)](_0x1982a9=>_0x1982a9[_0x2e5aad(0x16a)]===_0x22c134[_0x2e5aad(0x180)][_0x2e5aad(0x193)])[_0x2e5aad(0x14b)](_0x2bf5c2=>_0x2bf5c2[_0x2e5aad(0x167)]))!=null?_0x5c4361:[],_0x38cf94=JSON[_0x2e5aad(0x15d)](_0xa0e8ba),_0x4f2dd6=_0x3a7fc7[_0x2e5aad(0x169)],_0x21683d=_0x3a7fc7['id'],_0x71208e={'memberId':(await this['_sessionService'][_0x2e5aad(0x1bf)](_0x1faa46))['getMemberID'](),'unitId':_0x1faa46,'threadId':_0x4f2dd6,'mention':_0x53f20d,'content':_0x38cf94,'replyId':_0x21683d},_0x2b682e=await this[_0x2e5aad(0x19b)][_0x2e5aad(0x15b)](_0x2e5aad(0x17d)+_0x1faa46+_0x2e5aad(0x156),{'body':_0x71208e});return!_0x2b682e[_0x2e5aad(0x188)]['error']||_0x2b682e[_0x2e5aad(0x188)]['error']['code']===0x1;}async[_0x6744c8(0x14c)](_0x13bd19){const _0x2bfc03=_0x6744c8,{unitId:_0x155242}=_0x13bd19,_0x53a1c1=_0x13bd19[_0x2bfc03(0x169)],_0x2eacfc={'memberId':this['_userService'][_0x2bfc03(0x158)]()[_0x2bfc03(0x1a7)],'unitId':_0x155242,'threadId':_0x53a1c1,'solved':_0x13bd19[_0x2bfc03(0x186)]?_0x43f423[_0x2bfc03(0x15a)]:_0x43f423[_0x2bfc03(0x162)]},_0x69f71e=await this['_httpService'][_0x2bfc03(0x15b)](_0x2bfc03(0x17d)+_0x155242+_0x2bfc03(0x152),{'body':_0x2eacfc});return!_0x69f71e[_0x2bfc03(0x188)][_0x2bfc03(0x151)]||_0x69f71e[_0x2bfc03(0x188)][_0x2bfc03(0x151)]['code']===0x1;}async[_0x6744c8(0x1ce)](_0xce9fc,_0x378a8,_0x2b1c8e,_0x54be95){const _0x1c5a04=_0x6744c8,_0x59fb42={'memberId':(await this[_0x1c5a04(0x1b4)][_0x1c5a04(0x1bf)](_0xce9fc))['getMemberID'](),'threadId':_0x2b1c8e,'replyId':_0x54be95,'unitId':_0xce9fc},_0x8f1dd1=await this[_0x1c5a04(0x19b)][_0x1c5a04(0x15b)](_0x1c5a04(0x17d)+_0xce9fc+_0x1c5a04(0x1a0),{'body':_0x59fb42});return!_0x8f1dd1[_0x1c5a04(0x188)]['error']||_0x8f1dd1[_0x1c5a04(0x188)]['error']['code']===0x1;}async[_0x6744c8(0x196)](_0x299c23,_0x45da78,_0x3b85d6){const _0x1d7b1c=_0x6744c8,_0x586f00={'unitId':_0x299c23,'threadId':_0x3b85d6},_0x58f177=await this['_httpService']['post'](_0x1d7b1c(0x17d)+_0x299c23+_0x1d7b1c(0x157),{'body':_0x586f00}),_0x19b071=_0x3b85d6[_0x1d7b1c(0x14b)](_0x55fb7a=>_0x21acd8(_0x58f177[_0x1d7b1c(0x188)][_0x1d7b1c(0x182)][_0x55fb7a],_0x299c23,_0x45da78))[_0x1d7b1c(0x1bd)](Boolean);return Object[_0x1d7b1c(0x1d1)](_0x58f177[_0x1d7b1c(0x188)][_0x1d7b1c(0x170)])['forEach'](_0x204ec9=>{const _0x33c138=_0x1d7b1c;this['_userService'][_0x33c138(0x18e)](_0x204ec9);}),_0x19b071;}[_0x6744c8(0x1b5)](_0xc86189){const _0x501328=_0x6744c8;return{'id':_0xc86189['id'],'threadId':_0xc86189[_0x501328(0x169)],'ref':_0xc86189[_0x501328(0x1b9)]};}};_0x1e84e2=_0x1ea249([_0xddb6ee(0x0,_0x22c134['Inject'](_0x2151ed[_0x6744c8(0x1b7)])),_0xddb6ee(0x1,_0x22c134['Inject'](_0x22c134[_0x6744c8(0x19e)])),_0xddb6ee(0x2,_0x22c134[_0x6744c8(0x1a3)](_0x121777['CollaborationSessionService']))],_0x1e84e2);var _0x2d2f2f=Object[_0x6744c8(0x155)],_0x2addfd=(_0x112b34,_0x1364fb,_0x26f7dc,_0xec5fc5)=>{const _0x14498b=_0x6744c8;for(var _0x2fb5a0=_0xec5fc5>0x1?void 0x0:_0xec5fc5?_0x2d2f2f(_0x1364fb,_0x26f7dc):_0x1364fb,_0x2284b6=_0x112b34[_0x14498b(0x178)]-0x1,_0x3d153c;_0x2284b6>=0x0;_0x2284b6--)(_0x3d153c=_0x112b34[_0x2284b6])&&(_0x2fb5a0=_0x3d153c(_0x2fb5a0)||_0x2fb5a0);return _0x2fb5a0;},_0x59257f=(_0x166814,_0x42ec33)=>(_0x29a399,_0x5432de)=>_0x42ec33(_0x29a399,_0x5432de,_0x166814);let _0x500012=class extends _0x22c134[_0x6744c8(0x168)]{constructor(_0x2408b9,_0x4fd662){const _0x10ef17=_0x6744c8;super(),this[_0x10ef17(0x17a)]=_0x2408b9,this[_0x10ef17(0x18d)]=_0x4fd662,this[_0x10ef17(0x16b)]();}[_0x6744c8(0x16b)](){const _0xa9f401=_0x6744c8;this[_0xa9f401(0x17a)][_0xa9f401(0x17e)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0xa9f401(0x1d0)]=!0x1;}};_0x500012=_0x2addfd([_0x59257f(0x0,_0x4ef387[_0x6744c8(0x189)]),_0x59257f(0x1,_0x22c134[_0x6744c8(0x1a3)](_0x1e84e2))],_0x500012);var _0x320d47=Object[_0x6744c8(0x1ad)],_0x2b2850=Object['getOwnPropertyDescriptor'],_0x4612eb=(_0x197659,_0x3fbea9,_0x5441bc)=>_0x3fbea9 in _0x197659?_0x320d47(_0x197659,_0x3fbea9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5441bc}):_0x197659[_0x3fbea9]=_0x5441bc,_0x1d9def=(_0x1ed6e7,_0x5da6d9,_0x1ab619,_0x55fd7e)=>{const _0x23d705=_0x6744c8;for(var _0x26ac1a=_0x55fd7e>0x1?void 0x0:_0x55fd7e?_0x2b2850(_0x5da6d9,_0x1ab619):_0x5da6d9,_0x47b84b=_0x1ed6e7[_0x23d705(0x178)]-0x1,_0x5cac3;_0x47b84b>=0x0;_0x47b84b--)(_0x5cac3=_0x1ed6e7[_0x47b84b])&&(_0x26ac1a=_0x5cac3(_0x26ac1a)||_0x26ac1a);return _0x26ac1a;},_0x2e47bb=(_0x1cadfe,_0x2838de)=>(_0xf402ba,_0x52a6ca)=>_0x2838de(_0xf402ba,_0x52a6ca,_0x1cadfe),_0xf85511=(_0xc31173,_0x5c0e5f,_0x2626ae)=>_0x4612eb(_0xc31173,typeof _0x5c0e5f!='symbol'?_0x5c0e5f+'':_0x5c0e5f,_0x2626ae);_0x2c6a2d[_0x6744c8(0x16e)]=class extends _0x22c134[_0x6744c8(0x1cb)]{constructor(_0xafdbac=_0x598e7c,_0x35de70,_0x52ec92){const _0x49059a=_0x6744c8;super(),this[_0x49059a(0x16d)]=_0xafdbac,this[_0x49059a(0x1aa)]=_0x35de70,this[_0x49059a(0x1be)]=_0x52ec92;const {..._0x1bc7d2}=_0x22c134[_0x49059a(0x176)]({},_0x598e7c,this[_0x49059a(0x16d)]);this[_0x49059a(0x1be)][_0x49059a(0x1ca)](_0x365fc8,_0x1bc7d2);}[_0x6744c8(0x1cd)](){[[_0x1e84e2],[_0x500012],[_0x2f60f1]]['forEach'](_0x334cf2=>{const _0x22120c=_0x5ac6;this[_0x22120c(0x1aa)]['add'](_0x334cf2);});}[_0x6744c8(0x1ac)](){const _0xf062c=_0x6744c8;this[_0xf062c(0x1aa)]['get'](_0x500012),this[_0xf062c(0x1aa)][_0xf062c(0x1a4)](_0x2f60f1);}},_0xf85511(_0x2c6a2d[_0x6744c8(0x16e)],'pluginName',_0xcf9255),_0xf85511(_0x2c6a2d[_0x6744c8(0x16e)],_0x6744c8(0x18b),_0x22c134['UniverInstanceType'][_0x6744c8(0x1cf)]),_0x2c6a2d['UniverThreadCommentDataSourcePlugin']=_0x1d9def([_0x22c134['DependentOn'](_0x441532[_0x6744c8(0x1d2)],_0x121777[_0x6744c8(0x1bc)],_0x2a335b[_0x6744c8(0x1b3)]),_0x2e47bb(0x1,_0x22c134[_0x6744c8(0x1a3)](_0x22c134['Injector'])),_0x2e47bb(0x2,_0x22c134['IConfigService'])],_0x2c6a2d[_0x6744c8(0x16e)]),Object[_0x6744c8(0x1ad)](_0x2c6a2d,Symbol['toStringTag'],{'value':'Module'});}));
1
+ function _0x34d6(){const _0x1a1aaa=['rangeId','format','104855noEPLY','parentId','resolveComment','_threadCommentDataSource','getComment','replyId','getMemberID','UniverCollaborationClientPlugin','root','UniverThreadCommentUi','reply','UniverProThreadCommentDatasource','thread-comment-data-source.config','userID','stringify','body','CollaborationSessionService','find','@univerjs/network','_threadCommentModel','Solved','toStringTag','/delete','getOwnPropertyDescriptor','IConfigService','users','userId','_injector','Disposable','365853dyCtWG','onReady','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','error','HTTPService','commentUpdate$','96088UDjIVE','@univerjs-pro/collaboration-client','_userService','ThreadCommentModel','dayjs','rxjs','syncUpdateMutationToColla','153bSQpoB','UniverThreadCommentUIPlugin','UniverLicensePlugin','UniverProLicense','71320ZjrQVA','amd','subscribe','delete','@univerjs/core','_initUserSync','@univerjs/thread-comment-ui','content','3404688MRzOdT','COMMENT','user','function','CustomRangeType','rangeType','_threadCommentDataSourceService','addUser','disposeWithMe','Unknown','5bwmlnl','Add','unitId','getCurrentUser','customRanges','Reply','updateComment','_initDataSource','exports','type','personId','Inject','length','deleteComment','get','getUser','pluginName','UniverThreadComment','OpenOrReOpen','map','DependentOn','_commentService','onStarting','_init','ref','UniverInstanceType','add','size','_configService','UNRECOGNIZED','object','addComment','UserManagerService','dataSource','/list','pipe','1190812zcPYBh','getUnit','saveCommentToSnapshot','forEach','createTimestamp','UniverNetwork','2595420aTxPtt','Delete','UniverCore','YYYY/MM/DD\x20HH:mm','parse','10JhHBTt','symbol','/universer-api/comment/unit/','post','replies','filter','/universer-api/user/list','defineProperty','_config','_httpService','solved','/add','_sessionService','@univerjs-pro/license','2354NyFUrL','Injector','Solve','code','/reply','@univerjs/thread-comment','threadId','Edit','setConfig'];_0x34d6=function(){return _0x1a1aaa;};return _0x34d6();}function _0x43bd(_0x3fc643,_0x5192b9){_0x3fc643=_0x3fc643-0xb5;const _0x34d6f7=_0x34d6();let _0x43bdbb=_0x34d6f7[_0x3fc643];return _0x43bdbb;}(function(_0x1a4e67,_0x501141){const _0x7f0ca1=_0x43bd,_0x5286bd=_0x1a4e67();while(!![]){try{const _0x155c4c=parseInt(_0x7f0ca1(0xf0))/0x1+parseInt(_0x7f0ca1(0xd7))/0x2*(parseInt(_0x7f0ca1(0x10d))/0x3)+parseInt(_0x7f0ca1(0xd2))/0x4+-parseInt(_0x7f0ca1(0x132))/0x5*(-parseInt(_0x7f0ca1(0x128))/0x6)+parseInt(_0x7f0ca1(0xcc))/0x7+parseInt(_0x7f0ca1(0x115))/0x8*(-parseInt(_0x7f0ca1(0x11c))/0x9)+-parseInt(_0x7f0ca1(0x120))/0xa*(parseInt(_0x7f0ca1(0xe5))/0xb);if(_0x155c4c===_0x501141)break;else _0x5286bd['push'](_0x5286bd['shift']());}catch(_0x361105){_0x5286bd['push'](_0x5286bd['shift']());}}}(_0x34d6,0x5a7a2),function(_0x21ab4c,_0x9b5cfb){const _0x185dc1=_0x43bd;typeof exports==_0x185dc1(0xc6)&&typeof module<'u'?_0x9b5cfb(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==_0x185dc1(0x12b)&&define[_0x185dc1(0x121)]?define([_0x185dc1(0x13a),_0x185dc1(0x116),_0x185dc1(0xe4),_0x185dc1(0x124),_0x185dc1(0x126),_0x185dc1(0xea),_0x185dc1(0x11a),_0x185dc1(0x102)],_0x9b5cfb):(_0x21ab4c=typeof globalThis<'u'?globalThis:_0x21ab4c||self,_0x9b5cfb(_0x21ab4c[_0x185dc1(0xfb)]={},_0x21ab4c['UniverProCollaborationClient'],_0x21ab4c[_0x185dc1(0x11f)],_0x21ab4c[_0x185dc1(0xd4)],_0x21ab4c[_0x185dc1(0xf9)],_0x21ab4c[_0x185dc1(0xb9)],_0x21ab4c[_0x185dc1(0x11a)],_0x21ab4c[_0x185dc1(0xd1)]));}(this,function(_0x1cca1d,_0x4804be,_0x2bd3ee,_0x5c8b03,_0xb3c150,_0x332e6a,_0x2f63cc,_0x3ebd5e){'use strict';const _0x39b98c=_0x43bd;const _0x4b3b10=_0x39b98c(0x110);var _0x586a83=(_0x590c4b=>(_0x590c4b[_0x590c4b[_0x39b98c(0xba)]=0x0]=_0x39b98c(0xba),_0x590c4b[_0x590c4b[_0x39b98c(0x104)]=0x1]=_0x39b98c(0x104),_0x590c4b[_0x590c4b[_0x39b98c(0xc5)]=-0x1]=_0x39b98c(0xc5),_0x590c4b))(_0x586a83||{}),_0x1cb75e=(_0x5a29e1=>(_0x5a29e1[_0x5a29e1[_0x39b98c(0x131)]=0x0]='Unknown',_0x5a29e1[_0x5a29e1[_0x39b98c(0x133)]=0x1]='Add',_0x5a29e1[_0x5a29e1['Reply']=0x2]=_0x39b98c(0x137),_0x5a29e1[_0x5a29e1['Edit']=0x3]=_0x39b98c(0xec),_0x5a29e1[_0x5a29e1[_0x39b98c(0xd3)]=0x4]='Delete',_0x5a29e1[_0x5a29e1['Solve']=0x5]='Solve',_0x5a29e1[_0x5a29e1[_0x39b98c(0xc5)]=-0x1]='UNRECOGNIZED',_0x5a29e1))(_0x1cb75e||{});const _0x16c55a=_0x472564=>_0x5c8b03[_0x39b98c(0x119)](new Date(+_0x472564))[_0x39b98c(0xef)](_0x39b98c(0xd5)),_0x38a654=async(_0x13c5f2,_0x1ce11e)=>{const _0x5589b0=_0x39b98c,_0x4c626a=_0x13c5f2[_0x5589b0(0xb6)](_0x5c8b03[_0x5589b0(0xc8)]),_0x17b905=_0x13c5f2[_0x5589b0(0xb6)](_0x3ebd5e[_0x5589b0(0x113)]);_0x1ce11e[_0x5589b0(0xcf)](_0x2b7685=>{const _0x2a3947=_0x5589b0;_0x4c626a[_0x2a3947(0xb7)](_0x2b7685)&&_0x1ce11e[_0x2a3947(0x123)](_0x2b7685);}),_0x1ce11e[_0x5589b0(0xc3)]&&(await _0x17b905['get'](_0x5589b0(0xdd),{'params':{'userIDs':[..._0x1ce11e]}}))[_0x5589b0(0xff)][_0x5589b0(0x109)][_0x5589b0(0xcf)](_0x513687=>{const _0x42fcba=_0x5589b0;_0x513687&&_0x4c626a[_0x42fcba(0x12f)](_0x513687);});};var _0x4b12cb=Object['getOwnPropertyDescriptor'],_0x52e908=(_0x950eeb,_0x3dee68,_0x58f39a,_0x2e5b1c)=>{const _0x4cbccf=_0x39b98c;for(var _0x49bb23=_0x2e5b1c>0x1?void 0x0:_0x2e5b1c?_0x4b12cb(_0x3dee68,_0x58f39a):_0x3dee68,_0x30bd03=_0x950eeb[_0x4cbccf(0x13e)]-0x1,_0x129fa2;_0x30bd03>=0x0;_0x30bd03--)(_0x129fa2=_0x950eeb[_0x30bd03])&&(_0x49bb23=_0x129fa2(_0x49bb23)||_0x49bb23);return _0x49bb23;},_0x37510e=(_0xf7881e,_0x5d8825)=>(_0x3bc284,_0x1e6aca)=>_0x5d8825(_0x3bc284,_0x1e6aca,_0xf7881e);let _0x1c1924=class extends _0x5c8b03[_0x39b98c(0x10c)]{constructor(_0x4f8eed,_0xdf87bd,_0x3b2635,_0x2af54e){const _0x4ac3d0=_0x39b98c;super(),this['_commentService']=_0x4f8eed,this[_0x4ac3d0(0x103)]=_0xdf87bd,this['_userService']=_0x3b2635,this[_0x4ac3d0(0x10b)]=_0x2af54e,this[_0x4ac3d0(0xbf)](),this[_0x4ac3d0(0x125)]();}[_0x39b98c(0x125)](){const _0x571ad4=_0x39b98c;this[_0x571ad4(0x130)](this[_0x571ad4(0x103)][_0x571ad4(0x114)][_0x571ad4(0xcb)](_0x2f63cc['bufferTime'](0x10))[_0x571ad4(0x122)](_0x352044=>{const _0x16e39c=_0x571ad4,_0x428df9=new Set();_0x352044[_0x16e39c(0xcf)](_0x32abc9=>{const _0x904dac=_0x16e39c;switch(_0x32abc9[_0x904dac(0x13b)]){case'add':{const _0x128376=_0x32abc9['payload'][_0x904dac(0x13c)];_0x428df9[_0x904dac(0xc2)](_0x128376);break;}}}),_0x38a654(this[_0x16e39c(0x10b)],_0x428df9);}));}['_init'](){const _0x314883=_0x39b98c;this[_0x314883(0x130)](this[_0x314883(0xbd)][_0x314883(0x114)][_0x314883(0x122)](async _0x2f9015=>{const _0x49e2af=_0x314883;var _0x2101ea,_0xe50909,_0x338463,_0x11930b;const _0x39da5f=(_0x2101ea=this[_0x49e2af(0x103)][_0x49e2af(0xcd)](_0x2f9015[_0x49e2af(0x134)])[_0x49e2af(0x101)](_0x18bc57=>_0x18bc57[_0x49e2af(0xeb)]===_0x2f9015['threadId']))==null?void 0x0:_0x2101ea[_0x49e2af(0xf8)];if(!_0x39da5f)return;const {unitId:_0x2cdb83,subUnitId:_0x502351}=_0x39da5f;switch(_0x2f9015[_0x49e2af(0x12a)]&&this[_0x49e2af(0x117)]['addUser'](_0x2f9015[_0x49e2af(0x12a)]),_0x2f9015['type']){case _0x1cb75e[_0x49e2af(0x133)]:break;case _0x1cb75e['Reply']:{this['_threadCommentModel']['addComment'](_0x2cdb83,_0x502351,{'unitId':_0x2cdb83,'subUnitId':_0x502351,'ref':'','id':_0x2f9015[_0x49e2af(0xf5)],'dT':_0x16c55a(+_0x2f9015[_0x49e2af(0xd0)]),'threadId':_0x2f9015['threadId'],'personId':(_0x338463=(_0xe50909=_0x2f9015[_0x49e2af(0x12a)])==null?void 0x0:_0xe50909[_0x49e2af(0xfd)])!=null?_0x338463:_0x2f9015[_0x49e2af(0x10a)],'text':JSON[_0x49e2af(0xd6)](_0x2f9015[_0x49e2af(0x127)]),'parentId':_0x39da5f['id']});break;}case _0x1cb75e[_0x49e2af(0xd3)]:{const _0x539cd6=this[_0x49e2af(0x103)][_0x49e2af(0xf4)](_0x2cdb83,_0x502351,_0x2f9015[_0x49e2af(0xf5)]);_0x539cd6&&_0x539cd6[_0x49e2af(0xf1)]&&this[_0x49e2af(0x103)][_0x49e2af(0xb5)](_0x2cdb83,_0x502351,_0x2f9015[_0x49e2af(0xf5)]);break;}case _0x1cb75e['Edit']:{this[_0x49e2af(0x103)][_0x49e2af(0x138)](_0x2cdb83,_0x502351,{'commentId':_0x2f9015['replyId'],'text':JSON[_0x49e2af(0xd6)](_0x2f9015[_0x49e2af(0x127)])});break;}case _0x1cb75e[_0x49e2af(0xe7)]:{const _0x119090=(_0x11930b=this[_0x49e2af(0x103)]['getUnit'](_0x2f9015[_0x49e2af(0x134)])[_0x49e2af(0x101)](_0x4d8be0=>_0x4d8be0[_0x49e2af(0xeb)]===_0x2f9015[_0x49e2af(0xeb)]))==null?void 0x0:_0x11930b[_0x49e2af(0xf8)];_0x119090&&this[_0x49e2af(0x103)][_0x49e2af(0xf2)](_0x2cdb83,_0x502351,_0x119090['id'],_0x2f9015['solved']===_0x586a83['Solved']);break;}}}));}};_0x1c1924=_0x52e908([_0x37510e(0x0,_0x5c8b03[_0x39b98c(0x13d)](_0x4804be['CommentService'])),_0x37510e(0x1,_0x5c8b03['Inject'](_0x332e6a[_0x39b98c(0x118)])),_0x37510e(0x2,_0x5c8b03[_0x39b98c(0x13d)](_0x5c8b03['UserManagerService'])),_0x37510e(0x3,_0x5c8b03[_0x39b98c(0x13d)](_0x5c8b03[_0x39b98c(0xe6)]))],_0x1c1924);const _0x59b6ad=_0x39b98c(0xfc),_0xde8992={};var _0x20bc11=Object['getOwnPropertyDescriptor'],_0x3f4890=(_0x22a039,_0x459692,_0x2e0617,_0x3c6feb)=>{const _0x51c63a=_0x39b98c;for(var _0x6f956b=_0x3c6feb>0x1?void 0x0:_0x3c6feb?_0x20bc11(_0x459692,_0x2e0617):_0x459692,_0x488ad8=_0x22a039[_0x51c63a(0x13e)]-0x1,_0x38cd44;_0x488ad8>=0x0;_0x488ad8--)(_0x38cd44=_0x22a039[_0x488ad8])&&(_0x6f956b=_0x38cd44(_0x6f956b)||_0x6f956b);return _0x6f956b;},_0x1ae8bc=(_0x3e93d8,_0x50e3c7)=>(_0x465d16,_0x4a4d2c)=>_0x50e3c7(_0x465d16,_0x4a4d2c,_0x3e93d8);function _0x43c20a(_0x430fcf,_0x5d64e6){const _0x213364=_0x39b98c,_0x11a6a9=_0x430fcf[_0x213364(0xdb)][0x0];return{..._0x5d64e6,'id':_0x11a6a9['replyId'],'resolved':_0x430fcf[_0x213364(0xe1)]===0x1,'dT':_0x16c55a(_0x11a6a9[_0x213364(0xd0)]),'personId':_0x11a6a9[_0x213364(0x10a)],'threadId':_0x11a6a9['threadId']};}function _0x1043ed(_0x12f6bb,_0x3a2181,_0x10280c){const _0x1eee2d=_0x39b98c;var _0x1e83e8,_0x3b12ff;if(((_0x3b12ff=(_0x1e83e8=_0x12f6bb==null?void 0x0:_0x12f6bb[_0x1eee2d(0xdb)])==null?void 0x0:_0x1e83e8[_0x1eee2d(0x13e)])!=null?_0x3b12ff:0x0)>0x0){const _0x3e735=(_0x5392ab,_0x1b4a34)=>({'id':_0x5392ab[_0x1eee2d(0xf5)],'threadId':_0x5392ab[_0x1eee2d(0xeb)],'dT':_0x16c55a(_0x5392ab[_0x1eee2d(0xd0)]),'personId':_0x5392ab[_0x1eee2d(0x10a)],'resolved':_0x12f6bb[_0x1eee2d(0xe1)]===_0x586a83[_0x1eee2d(0x104)],'unitId':_0x3a2181,'subUnitId':_0x10280c,'text':JSON[_0x1eee2d(0xd6)](_0x5392ab['content']),'parentId':_0x1b4a34}),_0x3ea749=_0x3e735(_0x12f6bb['replies'][0x0]);return{..._0x3ea749,'children':_0x12f6bb['replies']['slice'](0x1)['map'](_0x344124=>_0x3e735(_0x344124,_0x3ea749['id']))};}return null;}let _0x4468b7=class{constructor(_0x4a2626,_0x2296de,_0x501509){const _0x4f015c=_0x39b98c;this[_0x4f015c(0xe0)]=_0x4a2626,this[_0x4f015c(0x117)]=_0x2296de,this['_sessionService']=_0x501509;}async[_0x39b98c(0xc7)](_0x1afbfc){const _0x3ac9db=_0x39b98c;var _0x37b489,_0x45abc9;const {parentId:_0x3d8861,unitId:_0x6db85c,text:_0x33297d,threadId:_0xdb32a3}=_0x1afbfc,_0x266fe1=(_0x45abc9=(_0x37b489=_0x33297d[_0x3ac9db(0x136)])==null?void 0x0:_0x37b489[_0x3ac9db(0xdc)](_0x56bcf9=>_0x56bcf9[_0x3ac9db(0x12d)]===_0x5c8b03[_0x3ac9db(0x12c)][_0x3ac9db(0x129)])[_0x3ac9db(0xbb)](_0x3d069a=>_0x3d069a[_0x3ac9db(0xee)]))!=null?_0x45abc9:[],_0x48b580=JSON['stringify'](_0x33297d),_0x17ad04=(await this['_sessionService'][_0x3ac9db(0x10f)](_0x6db85c))[_0x3ac9db(0xf6)]();if(_0x3d8861){const _0x3e0433={'memberId':_0x17ad04,'unitId':_0x6db85c,'content':_0x48b580,'mention':_0x266fe1,'threadId':_0xdb32a3},_0x334342=(await this['_httpService'][_0x3ac9db(0xda)]('/universer-api/comment/unit/'+_0x6db85c+_0x3ac9db(0xe9),{'body':_0x3e0433}))['body'][_0x3ac9db(0xfa)];return{..._0x1afbfc,'id':_0x334342[_0x3ac9db(0xf5)],'dT':_0x5c8b03['dayjs'](+_0x334342[_0x3ac9db(0xd0)])[_0x3ac9db(0xef)](_0x3ac9db(0xd5)),'personId':_0x334342[_0x3ac9db(0x10a)]};}else{const _0x1dba6c={'memberId':_0x17ad04,'unitId':_0x6db85c,'content':_0x48b580,'mention':_0x266fe1},_0x2c405b=await this[_0x3ac9db(0xe0)][_0x3ac9db(0xda)](_0x3ac9db(0xd9)+_0x6db85c+_0x3ac9db(0xe2),{'body':_0x1dba6c});return _0x43c20a(_0x2c405b[_0x3ac9db(0xff)]['comment'],_0x1afbfc);}}async[_0x39b98c(0x138)](_0x1ac5d1){const _0x4428ae=_0x39b98c;var _0x432f6b,_0x4230cb;const {text:_0x40cf19,unitId:_0x251e96}=_0x1ac5d1,_0x4275b2=(_0x4230cb=(_0x432f6b=_0x40cf19[_0x4428ae(0x136)])==null?void 0x0:_0x432f6b[_0x4428ae(0xdc)](_0x212642=>_0x212642[_0x4428ae(0x12d)]===_0x5c8b03[_0x4428ae(0x12c)][_0x4428ae(0x129)])[_0x4428ae(0xbb)](_0x2c24d3=>_0x2c24d3['rangeId']))!=null?_0x4230cb:[],_0x448792=JSON[_0x4428ae(0xfe)](_0x40cf19),_0x200d1a=_0x1ac5d1[_0x4428ae(0xeb)],_0x8befe6=_0x1ac5d1['id'],_0x2fc13b={'memberId':(await this[_0x4428ae(0xe3)][_0x4428ae(0x10f)](_0x251e96))['getMemberID'](),'unitId':_0x251e96,'threadId':_0x200d1a,'mention':_0x4275b2,'content':_0x448792,'replyId':_0x8befe6},_0x55cdbc=await this[_0x4428ae(0xe0)][_0x4428ae(0xda)](_0x4428ae(0xd9)+_0x251e96+'/edit',{'body':_0x2fc13b});return!_0x55cdbc[_0x4428ae(0xff)][_0x4428ae(0x112)]||_0x55cdbc[_0x4428ae(0xff)]['error'][_0x4428ae(0xe8)]===0x1;}async[_0x39b98c(0xf2)](_0x7ebaa1){const _0x1b4af5=_0x39b98c,{unitId:_0x2ac13f}=_0x7ebaa1,_0x281b7a=_0x7ebaa1[_0x1b4af5(0xeb)],_0x2a1a8d={'memberId':this[_0x1b4af5(0x117)][_0x1b4af5(0x135)]()['userID'],'unitId':_0x2ac13f,'threadId':_0x281b7a,'solved':_0x7ebaa1[_0x1b4af5(0x111)]?_0x586a83[_0x1b4af5(0x104)]:_0x586a83['OpenOrReOpen']},_0x107227=await this['_httpService'][_0x1b4af5(0xda)](_0x1b4af5(0xd9)+_0x2ac13f+'/solved',{'body':_0x2a1a8d});return!_0x107227[_0x1b4af5(0xff)][_0x1b4af5(0x112)]||_0x107227[_0x1b4af5(0xff)]['error'][_0x1b4af5(0xe8)]===0x1;}async[_0x39b98c(0xb5)](_0x375298,_0x3674d3,_0x1ff20a,_0x2a12a1){const _0x1d0697=_0x39b98c,_0x4e168d={'memberId':(await this[_0x1d0697(0xe3)][_0x1d0697(0x10f)](_0x375298))[_0x1d0697(0xf6)](),'threadId':_0x1ff20a,'replyId':_0x2a12a1,'unitId':_0x375298},_0x315086=await this[_0x1d0697(0xe0)]['post'](_0x1d0697(0xd9)+_0x375298+_0x1d0697(0x106),{'body':_0x4e168d});return!_0x315086[_0x1d0697(0xff)][_0x1d0697(0x112)]||_0x315086[_0x1d0697(0xff)][_0x1d0697(0x112)][_0x1d0697(0xe8)]===0x1;}async['listComments'](_0x29f7f1,_0xbae825,_0x223202){const _0x3fa659=_0x39b98c,_0x3f2529={'unitId':_0x29f7f1,'threadId':_0x223202},_0x403d36=await this['_httpService'][_0x3fa659(0xda)](_0x3fa659(0xd9)+_0x29f7f1+_0x3fa659(0xca),{'body':_0x3f2529}),_0x45be39=_0x223202[_0x3fa659(0xbb)](_0x46fddf=>_0x1043ed(_0x403d36['body']['comments'][_0x46fddf],_0x29f7f1,_0xbae825))[_0x3fa659(0xdc)](Boolean);return Object['values'](_0x403d36[_0x3fa659(0xff)][_0x3fa659(0x109)])['forEach'](_0x455e1c=>{const _0x54ef89=_0x3fa659;this['_userService'][_0x54ef89(0x12f)](_0x455e1c);}),_0x45be39;}[_0x39b98c(0xce)](_0x49754c){const _0x5aec63=_0x39b98c;return{'id':_0x49754c['id'],'threadId':_0x49754c[_0x5aec63(0xeb)],'ref':_0x49754c[_0x5aec63(0xc0)]};}};_0x4468b7=_0x3f4890([_0x1ae8bc(0x0,_0x5c8b03[_0x39b98c(0x13d)](_0x3ebd5e[_0x39b98c(0x113)])),_0x1ae8bc(0x1,_0x5c8b03['Inject'](_0x5c8b03[_0x39b98c(0xc8)])),_0x1ae8bc(0x2,_0x5c8b03[_0x39b98c(0x13d)](_0x4804be[_0x39b98c(0x100)]))],_0x4468b7);var _0x12367d=Object[_0x39b98c(0x107)],_0x3316fb=(_0x38ea25,_0x5827bb,_0x534bcd,_0x593865)=>{const _0x1314b5=_0x39b98c;for(var _0x3b8d0f=_0x593865>0x1?void 0x0:_0x593865?_0x12367d(_0x5827bb,_0x534bcd):_0x5827bb,_0x6ae820=_0x38ea25[_0x1314b5(0x13e)]-0x1,_0x2be5a4;_0x6ae820>=0x0;_0x6ae820--)(_0x2be5a4=_0x38ea25[_0x6ae820])&&(_0x3b8d0f=_0x2be5a4(_0x3b8d0f)||_0x3b8d0f);return _0x3b8d0f;},_0x7b172a=(_0x20fc52,_0x4178a9)=>(_0x42aa35,_0x5681cb)=>_0x4178a9(_0x42aa35,_0x5681cb,_0x20fc52);let _0x172f4f=class extends _0x5c8b03['Disposable']{constructor(_0x28ea53,_0x20a192){const _0x3a47e0=_0x39b98c;super(),this[_0x3a47e0(0x12e)]=_0x28ea53,this[_0x3a47e0(0xf3)]=_0x20a192,this[_0x3a47e0(0x139)]();}[_0x39b98c(0x139)](){const _0x5e8dd7=_0x39b98c;this['_threadCommentDataSourceService'][_0x5e8dd7(0xc9)]=this[_0x5e8dd7(0xf3)],this['_threadCommentDataSourceService'][_0x5e8dd7(0x11b)]=!0x1;}};_0x172f4f=_0x3316fb([_0x7b172a(0x0,_0x332e6a['IThreadCommentDataSourceService']),_0x7b172a(0x1,_0x5c8b03[_0x39b98c(0x13d)](_0x4468b7))],_0x172f4f);var _0x148c1f=Object[_0x39b98c(0xde)],_0x4a004a=Object[_0x39b98c(0x107)],_0x309698=(_0x1971d8,_0x2f4949,_0x3e0fca)=>_0x2f4949 in _0x1971d8?_0x148c1f(_0x1971d8,_0x2f4949,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e0fca}):_0x1971d8[_0x2f4949]=_0x3e0fca,_0x215408=(_0x7a883a,_0x26c37d,_0x4c5d8d,_0x49aaa5)=>{const _0x3d254e=_0x39b98c;for(var _0x46570b=_0x49aaa5>0x1?void 0x0:_0x49aaa5?_0x4a004a(_0x26c37d,_0x4c5d8d):_0x26c37d,_0x5d8317=_0x7a883a[_0x3d254e(0x13e)]-0x1,_0x32b7ec;_0x5d8317>=0x0;_0x5d8317--)(_0x32b7ec=_0x7a883a[_0x5d8317])&&(_0x46570b=_0x32b7ec(_0x46570b)||_0x46570b);return _0x46570b;},_0x1ea36f=(_0x37c14e,_0x2462ef)=>(_0x582504,_0x285073)=>_0x2462ef(_0x582504,_0x285073,_0x37c14e),_0x1d99dc=(_0x49a314,_0x20431e,_0x47e2d7)=>_0x309698(_0x49a314,typeof _0x20431e!=_0x39b98c(0xd8)?_0x20431e+'':_0x20431e,_0x47e2d7);_0x1cca1d['UniverThreadCommentDataSourcePlugin']=class extends _0x5c8b03['Plugin']{constructor(_0x148b01=_0xde8992,_0x467c5e,_0xf4ff8d){const _0x31a4a5=_0x39b98c;super(),this[_0x31a4a5(0xdf)]=_0x148b01,this[_0x31a4a5(0x10b)]=_0x467c5e,this[_0x31a4a5(0xc4)]=_0xf4ff8d;const {..._0x4d1928}=_0x5c8b03['merge']({},_0xde8992,this[_0x31a4a5(0xdf)]);this[_0x31a4a5(0xc4)][_0x31a4a5(0xed)](_0x59b6ad,_0x4d1928);}[_0x39b98c(0xbe)](){const _0x59a4bb=_0x39b98c;[[_0x4468b7],[_0x172f4f],[_0x1c1924]][_0x59a4bb(0xcf)](_0x25f6e8=>{const _0x47c4eb=_0x59a4bb;this[_0x47c4eb(0x10b)][_0x47c4eb(0xc2)](_0x25f6e8);});}[_0x39b98c(0x10e)](){const _0x31a8ac=_0x39b98c;this['_injector'][_0x31a8ac(0xb6)](_0x172f4f),this[_0x31a8ac(0x10b)]['get'](_0x1c1924);}},_0x1d99dc(_0x1cca1d['UniverThreadCommentDataSourcePlugin'],_0x39b98c(0xb8),_0x4b3b10),_0x1d99dc(_0x1cca1d['UniverThreadCommentDataSourcePlugin'],_0x39b98c(0x13b),_0x5c8b03[_0x39b98c(0xc1)]['UNIVER_UNKNOWN']),_0x1cca1d['UniverThreadCommentDataSourcePlugin']=_0x215408([_0x5c8b03[_0x39b98c(0xbc)](_0xb3c150[_0x39b98c(0x11d)],_0x4804be[_0x39b98c(0xf7)],_0x2bd3ee[_0x39b98c(0x11e)]),_0x1ea36f(0x1,_0x5c8b03[_0x39b98c(0x13d)](_0x5c8b03['Injector'])),_0x1ea36f(0x2,_0x5c8b03[_0x39b98c(0x108)])],_0x1cca1d['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x1cca1d,Symbol[_0x39b98c(0x105)],{'value':'Module'});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.12.4-insiders.20251211-c28f914",
3
+ "version": "0.12.4-insiders.20251213-692494c",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,18 +45,18 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.12.4-insiders.20251211-c28f914",
49
- "@univerjs-pro/license": "0.12.4-insiders.20251211-c28f914",
50
- "@univerjs/network": "0.12.4-insiders.20251211-c28f914",
51
- "@univerjs/core": "0.12.4-insiders.20251211-c28f914",
48
+ "@univerjs/core": "0.12.4-insiders.20251213-692494c",
52
49
  "@univerjs/protocol": "0.1.47",
53
- "@univerjs/thread-comment": "0.12.4-insiders.20251211-c28f914",
54
- "@univerjs/thread-comment-ui": "0.12.4-insiders.20251211-c28f914"
50
+ "@univerjs-pro/license": "0.12.4-insiders.20251213-692494c",
51
+ "@univerjs/thread-comment-ui": "0.12.4-insiders.20251213-692494c",
52
+ "@univerjs/thread-comment": "0.12.4-insiders.20251213-692494c",
53
+ "@univerjs/network": "0.12.4-insiders.20251213-692494c",
54
+ "@univerjs-pro/collaboration-client": "0.12.4-insiders.20251213-692494c"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
- "vite": "^7.2.6",
59
+ "vite": "^7.2.7",
60
60
  "vitest": "^4.0.15",
61
61
  "@univerjs-infra/shared": "0.12.4"
62
62
  },