@univerjs-pro/thread-comment-datasource 0.10.6-nightly.202509060832 → 0.10.7-nightly.202509080357

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 _0x570388=_0x24a2;(function(_0x260439,_0x2522d5){const _0x46572d=_0x24a2,_0x355940=_0x260439();while(!![]){try{const _0x128269=-parseInt(_0x46572d(0xac))/0x1+parseInt(_0x46572d(0xe9))/0x2+parseInt(_0x46572d(0xfe))/0x3*(-parseInt(_0x46572d(0xa2))/0x4)+parseInt(_0x46572d(0xbf))/0x5*(parseInt(_0x46572d(0xa1))/0x6)+parseInt(_0x46572d(0xc1))/0x7+-parseInt(_0x46572d(0xfc))/0x8+-parseInt(_0x46572d(0xf3))/0x9*(-parseInt(_0x46572d(0x96))/0xa);if(_0x128269===_0x2522d5)break;else _0x355940['push'](_0x355940['shift']());}catch(_0x4047b9){_0x355940['push'](_0x355940['shift']());}}}(_0x41f5,0x4cd06));Object[_0x570388(0x98)](exports,Symbol[_0x570388(0xdf)],{'value':_0x570388(0x97)});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=_0x570388(0xa9);function _0x24a2(_0x4abfef,_0x5bf3a8){const _0x41f5f8=_0x41f5();return _0x24a2=function(_0x24a205,_0x1f6f9d){_0x24a205=_0x24a205-0x94;let _0x2850b3=_0x41f5f8[_0x24a205];return _0x2850b3;},_0x24a2(_0x4abfef,_0x5bf3a8);}var I=(_0x1e08bc=>(_0x1e08bc[_0x1e08bc['OpenOrReOpen']=0x0]=_0x570388(0xd7),_0x1e08bc[_0x1e08bc[_0x570388(0xdc)]=0x1]=_0x570388(0xdc),_0x1e08bc[_0x1e08bc[_0x570388(0xf7)]=-0x1]=_0x570388(0xf7),_0x1e08bc))(I||{}),v=(_0xce858f=>(_0xce858f[_0xce858f[_0x570388(0xa4)]=0x0]=_0x570388(0xa4),_0xce858f[_0xce858f[_0x570388(0xdd)]=0x1]=_0x570388(0xdd),_0xce858f[_0xce858f['Reply']=0x2]=_0x570388(0x102),_0xce858f[_0xce858f[_0x570388(0x10f)]=0x3]=_0x570388(0x10f),_0xce858f[_0xce858f[_0x570388(0xae)]=0x4]=_0x570388(0xae),_0xce858f[_0xce858f[_0x570388(0x110)]=0x5]=_0x570388(0x110),_0xce858f[_0xce858f[_0x570388(0xf7)]=-0x1]=_0x570388(0xf7),_0xce858f))(v||{});const f=_0xeeee4c=>c[_0x570388(0xdb)](new Date(+_0xeeee4c))[_0x570388(0xc5)](_0x570388(0x108)),R=async(_0x53b8a9,_0x1cb4b4)=>{const _0x4ec091=_0x570388,_0x2e6fb4=_0x53b8a9[_0x4ec091(0x104)](c['UserManagerService']),_0x46ea82=_0x53b8a9[_0x4ec091(0x104)](P[_0x4ec091(0xf2)]);_0x1cb4b4[_0x4ec091(0x9d)](_0x198cbd=>{const _0x2e9204=_0x4ec091;_0x2e6fb4[_0x2e9204(0xda)](_0x198cbd)&&_0x1cb4b4[_0x2e9204(0x9f)](_0x198cbd);}),_0x1cb4b4[_0x4ec091(0xaa)]&&(await _0x46ea82['get'](_0x4ec091(0xaf),{'params':{'userIDs':[..._0x1cb4b4]}}))[_0x4ec091(0xe2)]['users'][_0x4ec091(0x9d)](_0x42bbf2=>{_0x42bbf2&&_0x2e6fb4['addUser'](_0x42bbf2);});};var $=Object[_0x570388(0xc7)],E=(_0x42397a,_0x436ff9,_0x3495e1,_0x4a5af6)=>{const _0xcd27b2=_0x570388;for(var _0x18ac51=_0x4a5af6>0x1?void 0x0:_0x4a5af6?$(_0x436ff9,_0x3495e1):_0x436ff9,_0x56fdd9=_0x42397a[_0xcd27b2(0xba)]-0x1,_0x2ce21d;_0x56fdd9>=0x0;_0x56fdd9--)(_0x2ce21d=_0x42397a[_0x56fdd9])&&(_0x18ac51=_0x2ce21d(_0x18ac51)||_0x18ac51);return _0x18ac51;},S=(_0x3a541f,_0x3a5a5a)=>(_0x5b185a,_0x47b7c5)=>_0x3a5a5a(_0x5b185a,_0x47b7c5,_0x3a541f);let _=class extends c[_0x570388(0x107)]{constructor(_0x1c996d,_0x52515c,_0x2470e1,_0x470777){const _0x1707a3=_0x570388;super(),this[_0x1707a3(0xc0)]=_0x1c996d,this['_threadCommentModel']=_0x52515c,this['_userService']=_0x2470e1,this[_0x1707a3(0xc6)]=_0x470777,this[_0x1707a3(0xb8)](),this[_0x1707a3(0x10a)]();}[_0x570388(0x10a)](){const _0x154435=_0x570388;this[_0x154435(0x113)](this[_0x154435(0xb6)][_0x154435(0x95)][_0x154435(0xfa)](j[_0x154435(0xe0)](0x10))[_0x154435(0xe8)](_0x36b362=>{const _0x1596da=_0x154435,_0x2d9d0d=new Set();_0x36b362[_0x1596da(0x9d)](_0x84759f=>{const _0xf089d6=_0x1596da;switch(_0x84759f[_0xf089d6(0xcd)]){case _0xf089d6(0xc9):{const _0x55b9ec=_0x84759f[_0xf089d6(0x9c)]['personId'];_0x2d9d0d[_0xf089d6(0xc9)](_0x55b9ec);break;}}}),R(this[_0x1596da(0xc6)],_0x2d9d0d);}));}[_0x570388(0xb8)](){const _0x139e6c=_0x570388;this[_0x139e6c(0x113)](this[_0x139e6c(0xc0)][_0x139e6c(0x95)][_0x139e6c(0xe8)](async _0x3280a4=>{const _0x3fd12e=_0x139e6c;var _0xd5c2b5,_0x20c297,_0x41f6d8,_0x393fd4;const _0x1630fa=(_0xd5c2b5=this['_threadCommentModel'][_0x3fd12e(0xbd)](_0x3280a4[_0x3fd12e(0xc3)])[_0x3fd12e(0x101)](_0x1a9c95=>_0x1a9c95[_0x3fd12e(0x10b)]===_0x3280a4[_0x3fd12e(0x10b)]))==null?void 0x0:_0xd5c2b5['root'];if(!_0x1630fa)return;const {unitId:_0x5ae795,subUnitId:_0x397441}=_0x1630fa;switch(_0x3280a4[_0x3fd12e(0xa5)]&&this[_0x3fd12e(0xa0)]['addUser'](_0x3280a4[_0x3fd12e(0xa5)]),_0x3280a4[_0x3fd12e(0xcd)]){case v[_0x3fd12e(0xdd)]:break;case v[_0x3fd12e(0x102)]:{this[_0x3fd12e(0xb6)][_0x3fd12e(0xd6)](_0x5ae795,_0x397441,{'unitId':_0x5ae795,'subUnitId':_0x397441,'ref':'','id':_0x3280a4[_0x3fd12e(0x9b)],'dT':f(+_0x3280a4[_0x3fd12e(0xbc)]),'threadId':_0x3280a4[_0x3fd12e(0x10b)],'personId':(_0x41f6d8=(_0x20c297=_0x3280a4['user'])==null?void 0x0:_0x20c297[_0x3fd12e(0xec)])!=null?_0x41f6d8:_0x3280a4[_0x3fd12e(0x112)],'text':JSON[_0x3fd12e(0xce)](_0x3280a4[_0x3fd12e(0x106)]),'parentId':_0x1630fa['id']});break;}case v[_0x3fd12e(0xae)]:{const _0x30f94e=this[_0x3fd12e(0xb6)][_0x3fd12e(0x10d)](_0x5ae795,_0x397441,_0x3280a4[_0x3fd12e(0x9b)]);_0x30f94e&&_0x30f94e[_0x3fd12e(0xe6)]&&this[_0x3fd12e(0xb6)][_0x3fd12e(0xb4)](_0x5ae795,_0x397441,_0x3280a4[_0x3fd12e(0x9b)]);break;}case v[_0x3fd12e(0x10f)]:{this[_0x3fd12e(0xb6)][_0x3fd12e(0xb0)](_0x5ae795,_0x397441,{'commentId':_0x3280a4['replyId'],'text':JSON[_0x3fd12e(0xce)](_0x3280a4[_0x3fd12e(0x106)])});break;}case v[_0x3fd12e(0x110)]:{const _0x30a62e=(_0x393fd4=this[_0x3fd12e(0xb6)][_0x3fd12e(0xbd)](_0x3280a4[_0x3fd12e(0xc3)])[_0x3fd12e(0x101)](_0x1bf325=>_0x1bf325[_0x3fd12e(0x10b)]===_0x3280a4[_0x3fd12e(0x10b)]))==null?void 0x0:_0x393fd4[_0x3fd12e(0x103)];_0x30a62e&&this[_0x3fd12e(0xb6)][_0x3fd12e(0xb9)](_0x5ae795,_0x397441,_0x30a62e['id'],_0x3280a4[_0x3fd12e(0xd2)]===I[_0x3fd12e(0xdc)]);break;}}}));}};_=E([S(0x0,c[_0x570388(0xf5)](b[_0x570388(0xcf)])),S(0x1,c[_0x570388(0xf5)](M[_0x570388(0xee)])),S(0x2,c[_0x570388(0xf5)](c[_0x570388(0xfd)])),S(0x3,c[_0x570388(0xf5)](c[_0x570388(0x105)]))],_);const q=_0x570388(0xf4),D={};var A=Object[_0x570388(0xc7)],x=(_0x13b5d9,_0x1e48e8,_0x5a6fcc,_0xbfa912)=>{for(var _0x1ac175=_0xbfa912>0x1?void 0x0:_0xbfa912?A(_0x1e48e8,_0x5a6fcc):_0x1e48e8,_0x3d8ee1=_0x13b5d9['length']-0x1,_0x32a170;_0x3d8ee1>=0x0;_0x3d8ee1--)(_0x32a170=_0x13b5d9[_0x3d8ee1])&&(_0x1ac175=_0x32a170(_0x1ac175)||_0x1ac175);return _0x1ac175;},C=(_0x38fd7c,_0x8b7afb)=>(_0x4038da,_0x35f570)=>_0x8b7afb(_0x4038da,_0x35f570,_0x38fd7c);function Y(_0x354bda,_0x476ca0){const _0x574ea0=_0x570388,_0x1883a6=_0x354bda['replies'][0x0];return{..._0x476ca0,'id':_0x1883a6[_0x574ea0(0x9b)],'resolved':_0x354bda['solved']===0x1,'dT':f(_0x1883a6['createTimestamp']),'personId':_0x1883a6[_0x574ea0(0x112)],'threadId':_0x1883a6['threadId']};}function _0x41f5(){const _0x27c3b0=['deleteComment','COMMENT','_threadCommentModel','IConfigService','_init','resolveComment','length','/universer-api/comment/unit/','createTimestamp','getUnit','_configService','625iJuwGC','_commentService','3457797uGLieO','CustomRangeType','unitId','/edit','format','_injector','getOwnPropertyDescriptor','/list','add','UniverCollaborationClientPlugin','_threadCommentDataSourceService','map','type','parse','CommentService','_threadCommentDataSource','UniverThreadCommentDataSourcePlugin','solved','getMemberID','onReady','_initDataSource','addComment','OpenOrReOpen','rangeType','rangeId','getUser','dayjs','Solved','Add','comments','toStringTag','bufferTime','slice','body','code','/solved','filter','parentId','requireSession','subscribe','910142RPXXSj','/delete','comment','userID','getCurrentUser','ThreadCommentModel','stringify','_config','pluginName','HTTPService','2127429NbLNib','thread-comment-data-source.config','Inject','addUser','UNRECOGNIZED','UniverInstanceType','_sessionService','pipe','dataSource','4807248PuiLnW','UserManagerService','39rpaGrX','CollaborationSessionService','replies','find','Reply','root','get','Injector','content','Disposable','YYYY/MM/DD\x20HH:mm','users','_initUserSync','threadId','UniverLicensePlugin','getComment','symbol','Edit','Solve','ref','userId','disposeWithMe','setConfig','commentUpdate$','30CviGvZ','Module','defineProperty','syncUpdateMutationToColla','_httpService','replyId','payload','forEach','resolved','delete','_userService','3726QOyZkf','61592rwHaqa','error','Unknown','user','/add','post','values','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','size','UNIVER_UNKNOWN','620100RUidER','saveCommentToSnapshot','Delete','/universer-api/user/list','updateComment','merge','customRanges','DependentOn'];_0x41f5=function(){return _0x27c3b0;};return _0x41f5();}function G(_0x4dbd94,_0x6e46,_0x545057){const _0x5b40a9=_0x570388;var _0x2ab8c3,_0x2ecc36;if(((_0x2ecc36=(_0x2ab8c3=_0x4dbd94==null?void 0x0:_0x4dbd94[_0x5b40a9(0x100)])==null?void 0x0:_0x2ab8c3['length'])!=null?_0x2ecc36:0x0)>0x0){const _0xab2e=(_0x17278c,_0x41d3e3)=>({'id':_0x17278c[_0x5b40a9(0x9b)],'threadId':_0x17278c[_0x5b40a9(0x10b)],'dT':f(_0x17278c[_0x5b40a9(0xbc)]),'personId':_0x17278c['userId'],'resolved':_0x4dbd94['solved']===I['Solved'],'unitId':_0x6e46,'subUnitId':_0x545057,'text':JSON[_0x5b40a9(0xce)](_0x17278c[_0x5b40a9(0x106)]),'parentId':_0x41d3e3}),_0x3e948d=_0xab2e(_0x4dbd94['replies'][0x0]);return{..._0x3e948d,'children':_0x4dbd94[_0x5b40a9(0x100)][_0x5b40a9(0xe1)](0x1)[_0x5b40a9(0xcc)](_0x4d7993=>_0xab2e(_0x4d7993,_0x3e948d['id']))};}return null;}let p=class{constructor(_0x590aa7,_0x2a83e6,_0x3b1604){const _0x4250e4=_0x570388;this[_0x4250e4(0x9a)]=_0x590aa7,this[_0x4250e4(0xa0)]=_0x2a83e6,this[_0x4250e4(0xf9)]=_0x3b1604;}async[_0x570388(0xd6)](_0xf4d42e){const _0xe07f29=_0x570388;var _0x814272,_0x3e24fe;const {parentId:_0x2ddf8b,unitId:_0x547552,text:_0x512a17,threadId:_0x59440b}=_0xf4d42e,_0xfbae8f=(_0x3e24fe=(_0x814272=_0x512a17['customRanges'])==null?void 0x0:_0x814272[_0xe07f29(0xe5)](_0x5f2ab0=>_0x5f2ab0[_0xe07f29(0xd8)]===c[_0xe07f29(0xc2)]['COMMENT'])[_0xe07f29(0xcc)](_0x4194d5=>_0x4194d5[_0xe07f29(0xd9)]))!=null?_0x3e24fe:[],_0x348408=JSON[_0xe07f29(0xef)](_0x512a17),_0x12d779=(await this[_0xe07f29(0xf9)][_0xe07f29(0xe7)](_0x547552))[_0xe07f29(0xd3)]();if(_0x2ddf8b){const _0x58b8f1={'memberId':_0x12d779,'unitId':_0x547552,'content':_0x348408,'mention':_0xfbae8f,'threadId':_0x59440b},_0x192037=(await this[_0xe07f29(0x9a)]['post'](_0xe07f29(0xbb)+_0x547552+'/reply',{'body':_0x58b8f1}))[_0xe07f29(0xe2)]['reply'];return{..._0xf4d42e,'id':_0x192037[_0xe07f29(0x9b)],'dT':c[_0xe07f29(0xdb)](+_0x192037[_0xe07f29(0xbc)])[_0xe07f29(0xc5)](_0xe07f29(0x108)),'personId':_0x192037[_0xe07f29(0x112)]};}else{const _0x32c742={'memberId':_0x12d779,'unitId':_0x547552,'content':_0x348408,'mention':_0xfbae8f},_0x452ba6=await this[_0xe07f29(0x9a)][_0xe07f29(0xa7)]('/universer-api/comment/unit/'+_0x547552+_0xe07f29(0xa6),{'body':_0x32c742});return Y(_0x452ba6[_0xe07f29(0xe2)][_0xe07f29(0xeb)],_0xf4d42e);}}async[_0x570388(0xb0)](_0x308c52){const _0x6ccecc=_0x570388;var _0x308888,_0x2538f9;const {text:_0x176954,unitId:_0x14d24f}=_0x308c52,_0x49ccfa=(_0x2538f9=(_0x308888=_0x176954[_0x6ccecc(0xb2)])==null?void 0x0:_0x308888[_0x6ccecc(0xe5)](_0xa5e419=>_0xa5e419[_0x6ccecc(0xd8)]===c[_0x6ccecc(0xc2)][_0x6ccecc(0xb5)])[_0x6ccecc(0xcc)](_0x4bc6fb=>_0x4bc6fb[_0x6ccecc(0xd9)]))!=null?_0x2538f9:[],_0x2c271c=JSON[_0x6ccecc(0xef)](_0x176954),_0x2cb8c3=_0x308c52['threadId'],_0x517225=_0x308c52['id'],_0x4eaead={'memberId':(await this[_0x6ccecc(0xf9)]['requireSession'](_0x14d24f))[_0x6ccecc(0xd3)](),'unitId':_0x14d24f,'threadId':_0x2cb8c3,'mention':_0x49ccfa,'content':_0x2c271c,'replyId':_0x517225},_0x5a26ac=await this[_0x6ccecc(0x9a)][_0x6ccecc(0xa7)](_0x6ccecc(0xbb)+_0x14d24f+_0x6ccecc(0xc4),{'body':_0x4eaead});return!_0x5a26ac['body'][_0x6ccecc(0xa3)]||_0x5a26ac[_0x6ccecc(0xe2)][_0x6ccecc(0xa3)][_0x6ccecc(0xe3)]===0x1;}async[_0x570388(0xb9)](_0x3f2cfc){const _0x24743e=_0x570388,{unitId:_0x40d77e}=_0x3f2cfc,_0x130122=_0x3f2cfc[_0x24743e(0x10b)],_0x2f608c={'memberId':this['_userService'][_0x24743e(0xed)]()[_0x24743e(0xec)],'unitId':_0x40d77e,'threadId':_0x130122,'solved':_0x3f2cfc[_0x24743e(0x9e)]?I['Solved']:I[_0x24743e(0xd7)]},_0x2095e0=await this[_0x24743e(0x9a)][_0x24743e(0xa7)]('/universer-api/comment/unit/'+_0x40d77e+_0x24743e(0xe4),{'body':_0x2f608c});return!_0x2095e0['body'][_0x24743e(0xa3)]||_0x2095e0['body'][_0x24743e(0xa3)][_0x24743e(0xe3)]===0x1;}async[_0x570388(0xb4)](_0x129b76,_0x4ffee3,_0x2db611,_0x40d899){const _0x31defb=_0x570388,_0x371ba9={'memberId':(await this[_0x31defb(0xf9)][_0x31defb(0xe7)](_0x129b76))[_0x31defb(0xd3)](),'threadId':_0x2db611,'replyId':_0x40d899,'unitId':_0x129b76},_0x8f9f7c=await this[_0x31defb(0x9a)][_0x31defb(0xa7)](_0x31defb(0xbb)+_0x129b76+_0x31defb(0xea),{'body':_0x371ba9});return!_0x8f9f7c['body'][_0x31defb(0xa3)]||_0x8f9f7c['body'][_0x31defb(0xa3)][_0x31defb(0xe3)]===0x1;}async['listComments'](_0x34490d,_0x48389b,_0xb7af50){const _0x206a81=_0x570388,_0x46d878={'unitId':_0x34490d,'threadId':_0xb7af50},_0x13f1f0=await this[_0x206a81(0x9a)]['post']('/universer-api/comment/unit/'+_0x34490d+_0x206a81(0xc8),{'body':_0x46d878}),_0x1fbb18=_0xb7af50[_0x206a81(0xcc)](_0x42ed2e=>G(_0x13f1f0[_0x206a81(0xe2)][_0x206a81(0xde)][_0x42ed2e],_0x34490d,_0x48389b))['filter'](Boolean);return Object[_0x206a81(0xa8)](_0x13f1f0[_0x206a81(0xe2)][_0x206a81(0x109)])[_0x206a81(0x9d)](_0x2fe6a5=>{const _0x5d4fef=_0x206a81;this[_0x5d4fef(0xa0)][_0x5d4fef(0xf6)](_0x2fe6a5);}),_0x1fbb18;}[_0x570388(0xad)](_0x56c9b7){const _0x13bced=_0x570388;return{'id':_0x56c9b7['id'],'threadId':_0x56c9b7['threadId'],'ref':_0x56c9b7[_0x13bced(0x111)]};}};p=x([C(0x0,c[_0x570388(0xf5)](P[_0x570388(0xf2)])),C(0x1,c['Inject'](c[_0x570388(0xfd)])),C(0x2,c[_0x570388(0xf5)](b[_0x570388(0xff)]))],p);var H=Object[_0x570388(0xc7)],J=(_0x5a9159,_0x28f027,_0x2bce42,_0x3e3e91)=>{const _0x34bd03=_0x570388;for(var _0x4cfb62=_0x3e3e91>0x1?void 0x0:_0x3e3e91?H(_0x28f027,_0x2bce42):_0x28f027,_0x345e35=_0x5a9159[_0x34bd03(0xba)]-0x1,_0x337597;_0x345e35>=0x0;_0x345e35--)(_0x337597=_0x5a9159[_0x345e35])&&(_0x4cfb62=_0x337597(_0x4cfb62)||_0x4cfb62);return _0x4cfb62;},y=(_0x3dd2cd,_0x36b059)=>(_0x3e946a,_0x3d22c1)=>_0x36b059(_0x3e946a,_0x3d22c1,_0x3dd2cd);let g=class extends c[_0x570388(0x107)]{constructor(_0x9cecbd,_0x195d7f){const _0xdadb6e=_0x570388;super(),this['_threadCommentDataSourceService']=_0x9cecbd,this[_0xdadb6e(0xd0)]=_0x195d7f,this[_0xdadb6e(0xd5)]();}[_0x570388(0xd5)](){const _0x4cdba7=_0x570388;this[_0x4cdba7(0xcb)][_0x4cdba7(0xfb)]=this[_0x4cdba7(0xd0)],this[_0x4cdba7(0xcb)][_0x4cdba7(0x99)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x570388(0xf5)](p))],g);var F=Object[_0x570388(0x98)],L=Object['getOwnPropertyDescriptor'],Z=(_0x5b6ff5,_0x5c00f6,_0x2a0ada)=>_0x5c00f6 in _0x5b6ff5?F(_0x5b6ff5,_0x5c00f6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2a0ada}):_0x5b6ff5[_0x5c00f6]=_0x2a0ada,W=(_0x2cbd83,_0x1d7650,_0x551676,_0xdde6ed)=>{const _0x46cc65=_0x570388;for(var _0x5e0974=_0xdde6ed>0x1?void 0x0:_0xdde6ed?L(_0x1d7650,_0x551676):_0x1d7650,_0xd478b2=_0x2cbd83[_0x46cc65(0xba)]-0x1,_0x6beb59;_0xd478b2>=0x0;_0xd478b2--)(_0x6beb59=_0x2cbd83[_0xd478b2])&&(_0x5e0974=_0x6beb59(_0x5e0974)||_0x5e0974);return _0x5e0974;},O=(_0x50559a,_0x547d1e)=>(_0x105111,_0xb0ff6b)=>_0x547d1e(_0x105111,_0xb0ff6b,_0x50559a),N=(_0x32731b,_0x119ffd,_0x583d1d)=>Z(_0x32731b,typeof _0x119ffd!=_0x570388(0x10e)?_0x119ffd+'':_0x119ffd,_0x583d1d);exports[_0x570388(0xd1)]=class extends c['Plugin']{constructor(_0x551c14=D,_0xa6bc0c,_0x40f86c){const _0x3177fe=_0x570388;super(),this[_0x3177fe(0xf0)]=_0x551c14,this[_0x3177fe(0xc6)]=_0xa6bc0c,this[_0x3177fe(0xbe)]=_0x40f86c;const {..._0x103a89}=c[_0x3177fe(0xb1)]({},D,this[_0x3177fe(0xf0)]);this['_configService'][_0x3177fe(0x94)](q,_0x103a89);}['onStarting'](){const _0x2c7646=_0x570388;[[p],[g],[_]][_0x2c7646(0x9d)](_0x1a0cb0=>{const _0x4e19df=_0x2c7646;this[_0x4e19df(0xc6)]['add'](_0x1a0cb0);});}[_0x570388(0xd4)](){const _0x33ce4c=_0x570388;this['_injector'][_0x33ce4c(0x104)](g),this[_0x33ce4c(0xc6)]['get'](_);}},N(exports[_0x570388(0xd1)],_0x570388(0xf1),U),N(exports[_0x570388(0xd1)],_0x570388(0xcd),c[_0x570388(0xf8)][_0x570388(0xab)]),exports[_0x570388(0xd1)]=W([c[_0x570388(0xb3)](w['UniverThreadCommentUIPlugin'],b[_0x570388(0xca)],T[_0x570388(0x10c)]),O(0x1,c[_0x570388(0xf5)](c['Injector'])),O(0x2,c[_0x570388(0xb7)])],exports[_0x570388(0xd1)]);
1
+ 'use strict';function _0x3afe(){const _0x3600b2=['_initUserSync','COMMENT','length','commentUpdate$','requireSession','reply','Add','CollaborationSessionService','user','userID','15273LgjXSu','size','threadId','_httpService','onStarting','add','_threadCommentModel','comments','UniverInstanceType','2856476ZfJZXy','userId','356894BCrNAy','UniverThreadCommentDataSourcePlugin','getUnit','post','map','UniverCollaborationClientPlugin','users','stringify','YYYY/MM/DD\x20HH:mm','get','subscribe','content','3703592eiZEus','Solve','_configService','rangeType','type','comment','payload','CustomRangeType','_init','Reply','OpenOrReOpen','defineProperty','error','Injector','1028615woyXin','Delete','disposeWithMe','/list','code','_config','_injector','pluginName','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','DependentOn','Edit','toStringTag','ThreadCommentModel','slice','pipe','Solved','2BlxJKB','_commentService','getCurrentUser','saveCommentToSnapshot','Module','parse','resolveComment','values','Unknown','format','addComment','_userService','root','createTimestamp','4iVZujz','Plugin','_initDataSource','30267dJlJKq','_threadCommentDataSource','delete','HTTPService','getComment','Disposable','body','merge','Inject','solved','getOwnPropertyDescriptor','parentId','getMemberID','/solved','replies','updateComment','_threadCommentDataSourceService','UserManagerService','deleteComment','/edit','personId','find','UniverThreadCommentUIPlugin','IThreadCommentDataSourceService','UNRECOGNIZED','forEach','replyId','/add','/universer-api/user/list','/reply','_sessionService','/universer-api/comment/unit/','IConfigService','customRanges','rangeId','dataSource','onReady','addUser','2369412ulreiO','unitId'];_0x3afe=function(){return _0x3600b2;};return _0x3afe();}const _0x300e0a=_0x348a;(function(_0x52214c,_0x28b1ae){const _0x31d062=_0x348a,_0x4fafb6=_0x52214c();while(!![]){try{const _0x4775ce=-parseInt(_0x31d062(0x1d6))/0x1*(-parseInt(_0x31d062(0x200))/0x2)+-parseInt(_0x31d062(0x211))/0x3*(-parseInt(_0x31d062(0x20e))/0x4)+parseInt(_0x31d062(0x1f0))/0x5+-parseInt(_0x31d062(0x1bf))/0x6+-parseInt(_0x31d062(0x1d4))/0x7+parseInt(_0x31d062(0x1e2))/0x8+parseInt(_0x31d062(0x1cb))/0x9;if(_0x4775ce===_0x28b1ae)break;else _0x4fafb6['push'](_0x4fafb6['shift']());}catch(_0x269886){_0x4fafb6['push'](_0x4fafb6['shift']());}}}(_0x3afe,0x3938e));Object['defineProperty'](exports,Symbol[_0x300e0a(0x1fb)],{'value':_0x300e0a(0x204)});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=_0x300e0a(0x1f8);var I=(_0x5390ea=>(_0x5390ea[_0x5390ea[_0x300e0a(0x1ec)]=0x0]=_0x300e0a(0x1ec),_0x5390ea[_0x5390ea['Solved']=0x1]='Solved',_0x5390ea[_0x5390ea[_0x300e0a(0x229)]=-0x1]=_0x300e0a(0x229),_0x5390ea))(I||{}),v=(_0x17686a=>(_0x17686a[_0x17686a[_0x300e0a(0x208)]=0x0]=_0x300e0a(0x208),_0x17686a[_0x17686a[_0x300e0a(0x1c7)]=0x1]=_0x300e0a(0x1c7),_0x17686a[_0x17686a['Reply']=0x2]='Reply',_0x17686a[_0x17686a[_0x300e0a(0x1fa)]=0x3]='Edit',_0x17686a[_0x17686a[_0x300e0a(0x1f1)]=0x4]=_0x300e0a(0x1f1),_0x17686a[_0x17686a[_0x300e0a(0x1e3)]=0x5]='Solve',_0x17686a[_0x17686a[_0x300e0a(0x229)]=-0x1]='UNRECOGNIZED',_0x17686a))(v||{});const f=_0x18e788=>c['dayjs'](new Date(+_0x18e788))[_0x300e0a(0x209)](_0x300e0a(0x1de)),R=async(_0x38591b,_0x5c9a7d)=>{const _0x45f0ef=_0x300e0a,_0x340b4d=_0x38591b[_0x45f0ef(0x1df)](c['UserManagerService']),_0x2e6123=_0x38591b[_0x45f0ef(0x1df)](P[_0x45f0ef(0x214)]);_0x5c9a7d[_0x45f0ef(0x22a)](_0x3ce15b=>{const _0x3f5ef5=_0x45f0ef;_0x340b4d['getUser'](_0x3ce15b)&&_0x5c9a7d[_0x3f5ef5(0x213)](_0x3ce15b);}),_0x5c9a7d[_0x45f0ef(0x1cc)]&&(await _0x2e6123[_0x45f0ef(0x1df)](_0x45f0ef(0x22d),{'params':{'userIDs':[..._0x5c9a7d]}}))[_0x45f0ef(0x217)][_0x45f0ef(0x1dc)][_0x45f0ef(0x22a)](_0x11ec0d=>{_0x11ec0d&&_0x340b4d['addUser'](_0x11ec0d);});};function _0x348a(_0x123476,_0x146e36){const _0x3afe9a=_0x3afe();return _0x348a=function(_0x348a40,_0x214faf){_0x348a40=_0x348a40-0x1b8;let _0x511e96=_0x3afe9a[_0x348a40];return _0x511e96;},_0x348a(_0x123476,_0x146e36);}var $=Object['getOwnPropertyDescriptor'],E=(_0x1f1c8b,_0xdbc63d,_0x141966,_0xac9ace)=>{for(var _0x154264=_0xac9ace>0x1?void 0x0:_0xac9ace?$(_0xdbc63d,_0x141966):_0xdbc63d,_0x329369=_0x1f1c8b['length']-0x1,_0x456013;_0x329369>=0x0;_0x329369--)(_0x456013=_0x1f1c8b[_0x329369])&&(_0x154264=_0x456013(_0x154264)||_0x154264);return _0x154264;},S=(_0x40c6aa,_0x2e0bd1)=>(_0x31e944,_0x3ce9e2)=>_0x2e0bd1(_0x31e944,_0x3ce9e2,_0x40c6aa);let _=class extends c[_0x300e0a(0x216)]{constructor(_0x95c8b4,_0x49aa3f,_0x57a532,_0xd4f2cd){const _0x3829c2=_0x300e0a;super(),this[_0x3829c2(0x201)]=_0x95c8b4,this[_0x3829c2(0x1d1)]=_0x49aa3f,this[_0x3829c2(0x20b)]=_0x57a532,this[_0x3829c2(0x1f6)]=_0xd4f2cd,this[_0x3829c2(0x1ea)](),this[_0x3829c2(0x1c1)]();}[_0x300e0a(0x1c1)](){const _0x4d3005=_0x300e0a;this[_0x4d3005(0x1f2)](this[_0x4d3005(0x1d1)]['commentUpdate$'][_0x4d3005(0x1fe)](j['bufferTime'](0x10))[_0x4d3005(0x1e0)](_0x4403b6=>{const _0x22d446=_0x4d3005,_0x4688ae=new Set();_0x4403b6[_0x22d446(0x22a)](_0x31e765=>{const _0x152666=_0x22d446;switch(_0x31e765['type']){case _0x152666(0x1d0):{const _0x1752ad=_0x31e765[_0x152666(0x1e8)][_0x152666(0x225)];_0x4688ae[_0x152666(0x1d0)](_0x1752ad);break;}}}),R(this[_0x22d446(0x1f6)],_0x4688ae);}));}[_0x300e0a(0x1ea)](){const _0x292eb2=_0x300e0a;this[_0x292eb2(0x1f2)](this['_commentService'][_0x292eb2(0x1c4)][_0x292eb2(0x1e0)](async _0x271a17=>{const _0x1d33a9=_0x292eb2;var _0x1b56b4,_0x2b3028,_0x3cc175,_0xa791c6;const _0x48477a=(_0x1b56b4=this[_0x1d33a9(0x1d1)][_0x1d33a9(0x1d8)](_0x271a17[_0x1d33a9(0x1c0)])[_0x1d33a9(0x226)](_0x3a43fb=>_0x3a43fb['threadId']===_0x271a17['threadId']))==null?void 0x0:_0x1b56b4[_0x1d33a9(0x20c)];if(!_0x48477a)return;const {unitId:_0x278814,subUnitId:_0x5d6866}=_0x48477a;switch(_0x271a17[_0x1d33a9(0x1c9)]&&this[_0x1d33a9(0x20b)][_0x1d33a9(0x1be)](_0x271a17['user']),_0x271a17[_0x1d33a9(0x1e6)]){case v[_0x1d33a9(0x1c7)]:break;case v[_0x1d33a9(0x1eb)]:{this[_0x1d33a9(0x1d1)]['addComment'](_0x278814,_0x5d6866,{'unitId':_0x278814,'subUnitId':_0x5d6866,'ref':'','id':_0x271a17[_0x1d33a9(0x22b)],'dT':f(+_0x271a17[_0x1d33a9(0x20d)]),'threadId':_0x271a17[_0x1d33a9(0x1cd)],'personId':(_0x3cc175=(_0x2b3028=_0x271a17['user'])==null?void 0x0:_0x2b3028[_0x1d33a9(0x1ca)])!=null?_0x3cc175:_0x271a17[_0x1d33a9(0x1d5)],'text':JSON['parse'](_0x271a17['content']),'parentId':_0x48477a['id']});break;}case v['Delete']:{const _0x25c4e1=this[_0x1d33a9(0x1d1)][_0x1d33a9(0x215)](_0x278814,_0x5d6866,_0x271a17[_0x1d33a9(0x22b)]);_0x25c4e1&&_0x25c4e1[_0x1d33a9(0x21c)]&&this[_0x1d33a9(0x1d1)][_0x1d33a9(0x223)](_0x278814,_0x5d6866,_0x271a17['replyId']);break;}case v['Edit']:{this[_0x1d33a9(0x1d1)][_0x1d33a9(0x220)](_0x278814,_0x5d6866,{'commentId':_0x271a17[_0x1d33a9(0x22b)],'text':JSON[_0x1d33a9(0x205)](_0x271a17['content'])});break;}case v[_0x1d33a9(0x1e3)]:{const _0x33385c=(_0xa791c6=this[_0x1d33a9(0x1d1)]['getUnit'](_0x271a17[_0x1d33a9(0x1c0)])[_0x1d33a9(0x226)](_0x6e0a86=>_0x6e0a86[_0x1d33a9(0x1cd)]===_0x271a17['threadId']))==null?void 0x0:_0xa791c6[_0x1d33a9(0x20c)];_0x33385c&&this[_0x1d33a9(0x1d1)][_0x1d33a9(0x206)](_0x278814,_0x5d6866,_0x33385c['id'],_0x271a17[_0x1d33a9(0x21a)]===I[_0x1d33a9(0x1ff)]);break;}}}));}};_=E([S(0x0,c[_0x300e0a(0x219)](b['CommentService'])),S(0x1,c[_0x300e0a(0x219)](M[_0x300e0a(0x1fc)])),S(0x2,c[_0x300e0a(0x219)](c[_0x300e0a(0x222)])),S(0x3,c['Inject'](c[_0x300e0a(0x1ef)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x300e0a(0x21b)],x=(_0x114a06,_0x323332,_0x3daec0,_0x7bdbaf)=>{const _0x34f03b=_0x300e0a;for(var _0x912969=_0x7bdbaf>0x1?void 0x0:_0x7bdbaf?A(_0x323332,_0x3daec0):_0x323332,_0x14ac2a=_0x114a06[_0x34f03b(0x1c3)]-0x1,_0x1778bd;_0x14ac2a>=0x0;_0x14ac2a--)(_0x1778bd=_0x114a06[_0x14ac2a])&&(_0x912969=_0x1778bd(_0x912969)||_0x912969);return _0x912969;},C=(_0x31e250,_0x5e1b81)=>(_0x300849,_0x3e692f)=>_0x5e1b81(_0x300849,_0x3e692f,_0x31e250);function Y(_0x1ef541,_0x12e108){const _0x37856b=_0x300e0a,_0x4e91e8=_0x1ef541[_0x37856b(0x21f)][0x0];return{..._0x12e108,'id':_0x4e91e8[_0x37856b(0x22b)],'resolved':_0x1ef541['solved']===0x1,'dT':f(_0x4e91e8[_0x37856b(0x20d)]),'personId':_0x4e91e8[_0x37856b(0x1d5)],'threadId':_0x4e91e8[_0x37856b(0x1cd)]};}function G(_0x72275,_0x48ac56,_0x2891d4){const _0x112563=_0x300e0a;var _0x136c6f,_0x106fb2;if(((_0x106fb2=(_0x136c6f=_0x72275==null?void 0x0:_0x72275[_0x112563(0x21f)])==null?void 0x0:_0x136c6f[_0x112563(0x1c3)])!=null?_0x106fb2:0x0)>0x0){const _0x29c282=(_0x46a0c7,_0x1f603)=>({'id':_0x46a0c7[_0x112563(0x22b)],'threadId':_0x46a0c7['threadId'],'dT':f(_0x46a0c7[_0x112563(0x20d)]),'personId':_0x46a0c7[_0x112563(0x1d5)],'resolved':_0x72275[_0x112563(0x21a)]===I[_0x112563(0x1ff)],'unitId':_0x48ac56,'subUnitId':_0x2891d4,'text':JSON[_0x112563(0x205)](_0x46a0c7[_0x112563(0x1e1)]),'parentId':_0x1f603}),_0x472acf=_0x29c282(_0x72275[_0x112563(0x21f)][0x0]);return{..._0x472acf,'children':_0x72275[_0x112563(0x21f)][_0x112563(0x1fd)](0x1)[_0x112563(0x1da)](_0x56c207=>_0x29c282(_0x56c207,_0x472acf['id']))};}return null;}let p=class{constructor(_0x16b74f,_0x12c5f3,_0x31990f){const _0x148329=_0x300e0a;this[_0x148329(0x1ce)]=_0x16b74f,this[_0x148329(0x20b)]=_0x12c5f3,this[_0x148329(0x22f)]=_0x31990f;}async[_0x300e0a(0x20a)](_0x71d3ee){const _0x5f47ba=_0x300e0a;var _0x248ec7,_0x4d9e8e;const {parentId:_0x1d6c6e,unitId:_0x127510,text:_0x4d8666,threadId:_0x3d23f1}=_0x71d3ee,_0xa43f2e=(_0x4d9e8e=(_0x248ec7=_0x4d8666['customRanges'])==null?void 0x0:_0x248ec7['filter'](_0x4c0d27=>_0x4c0d27['rangeType']===c[_0x5f47ba(0x1e9)][_0x5f47ba(0x1c2)])[_0x5f47ba(0x1da)](_0x4f4b2d=>_0x4f4b2d[_0x5f47ba(0x1bb)]))!=null?_0x4d9e8e:[],_0x5abb95=JSON[_0x5f47ba(0x1dd)](_0x4d8666),_0x5e9bdd=(await this[_0x5f47ba(0x22f)][_0x5f47ba(0x1c5)](_0x127510))[_0x5f47ba(0x21d)]();if(_0x1d6c6e){const _0x4e51b3={'memberId':_0x5e9bdd,'unitId':_0x127510,'content':_0x5abb95,'mention':_0xa43f2e,'threadId':_0x3d23f1},_0x1272f2=(await this[_0x5f47ba(0x1ce)][_0x5f47ba(0x1d9)](_0x5f47ba(0x1b8)+_0x127510+_0x5f47ba(0x22e),{'body':_0x4e51b3}))['body'][_0x5f47ba(0x1c6)];return{..._0x71d3ee,'id':_0x1272f2[_0x5f47ba(0x22b)],'dT':c['dayjs'](+_0x1272f2[_0x5f47ba(0x20d)])[_0x5f47ba(0x209)](_0x5f47ba(0x1de)),'personId':_0x1272f2[_0x5f47ba(0x1d5)]};}else{const _0x443170={'memberId':_0x5e9bdd,'unitId':_0x127510,'content':_0x5abb95,'mention':_0xa43f2e},_0x326888=await this['_httpService'][_0x5f47ba(0x1d9)](_0x5f47ba(0x1b8)+_0x127510+_0x5f47ba(0x22c),{'body':_0x443170});return Y(_0x326888[_0x5f47ba(0x217)][_0x5f47ba(0x1e7)],_0x71d3ee);}}async[_0x300e0a(0x220)](_0x7abe64){const _0x3c9877=_0x300e0a;var _0x228ca2,_0xf03c63;const {text:_0x2fffff,unitId:_0x1f6703}=_0x7abe64,_0x2db836=(_0xf03c63=(_0x228ca2=_0x2fffff[_0x3c9877(0x1ba)])==null?void 0x0:_0x228ca2['filter'](_0x29244a=>_0x29244a[_0x3c9877(0x1e5)]===c[_0x3c9877(0x1e9)][_0x3c9877(0x1c2)])[_0x3c9877(0x1da)](_0x3fabaf=>_0x3fabaf[_0x3c9877(0x1bb)]))!=null?_0xf03c63:[],_0x993550=JSON[_0x3c9877(0x1dd)](_0x2fffff),_0x17e14a=_0x7abe64[_0x3c9877(0x1cd)],_0x87eb26=_0x7abe64['id'],_0x54c5dc={'memberId':(await this[_0x3c9877(0x22f)][_0x3c9877(0x1c5)](_0x1f6703))['getMemberID'](),'unitId':_0x1f6703,'threadId':_0x17e14a,'mention':_0x2db836,'content':_0x993550,'replyId':_0x87eb26},_0x122717=await this['_httpService']['post'](_0x3c9877(0x1b8)+_0x1f6703+_0x3c9877(0x224),{'body':_0x54c5dc});return!_0x122717[_0x3c9877(0x217)]['error']||_0x122717[_0x3c9877(0x217)][_0x3c9877(0x1ee)][_0x3c9877(0x1f4)]===0x1;}async[_0x300e0a(0x206)](_0x43fb38){const _0x1e44f6=_0x300e0a,{unitId:_0x57766b}=_0x43fb38,_0x361add=_0x43fb38[_0x1e44f6(0x1cd)],_0x343c90={'memberId':this['_userService'][_0x1e44f6(0x202)]()[_0x1e44f6(0x1ca)],'unitId':_0x57766b,'threadId':_0x361add,'solved':_0x43fb38['resolved']?I[_0x1e44f6(0x1ff)]:I[_0x1e44f6(0x1ec)]},_0x2cd0d8=await this[_0x1e44f6(0x1ce)][_0x1e44f6(0x1d9)](_0x1e44f6(0x1b8)+_0x57766b+_0x1e44f6(0x21e),{'body':_0x343c90});return!_0x2cd0d8['body'][_0x1e44f6(0x1ee)]||_0x2cd0d8[_0x1e44f6(0x217)]['error'][_0x1e44f6(0x1f4)]===0x1;}async[_0x300e0a(0x223)](_0xc21a5d,_0x11c264,_0x522375,_0x3bb0f4){const _0x1928f0=_0x300e0a,_0x3acf89={'memberId':(await this['_sessionService'][_0x1928f0(0x1c5)](_0xc21a5d))[_0x1928f0(0x21d)](),'threadId':_0x522375,'replyId':_0x3bb0f4,'unitId':_0xc21a5d},_0x53fc98=await this[_0x1928f0(0x1ce)]['post']('/universer-api/comment/unit/'+_0xc21a5d+'/delete',{'body':_0x3acf89});return!_0x53fc98['body']['error']||_0x53fc98['body'][_0x1928f0(0x1ee)][_0x1928f0(0x1f4)]===0x1;}async['listComments'](_0x338cfb,_0x4f5630,_0x26a182){const _0x416e25=_0x300e0a,_0x3584e7={'unitId':_0x338cfb,'threadId':_0x26a182},_0x3394f2=await this['_httpService'][_0x416e25(0x1d9)]('/universer-api/comment/unit/'+_0x338cfb+_0x416e25(0x1f3),{'body':_0x3584e7}),_0x3f669e=_0x26a182[_0x416e25(0x1da)](_0x172b7a=>G(_0x3394f2[_0x416e25(0x217)][_0x416e25(0x1d2)][_0x172b7a],_0x338cfb,_0x4f5630))['filter'](Boolean);return Object[_0x416e25(0x207)](_0x3394f2[_0x416e25(0x217)][_0x416e25(0x1dc)])[_0x416e25(0x22a)](_0x16ae48=>{const _0x40b230=_0x416e25;this[_0x40b230(0x20b)][_0x40b230(0x1be)](_0x16ae48);}),_0x3f669e;}[_0x300e0a(0x203)](_0x2d638d){const _0x5a054b=_0x300e0a;return{'id':_0x2d638d['id'],'threadId':_0x2d638d[_0x5a054b(0x1cd)],'ref':_0x2d638d['ref']};}};p=x([C(0x0,c[_0x300e0a(0x219)](P[_0x300e0a(0x214)])),C(0x1,c['Inject'](c[_0x300e0a(0x222)])),C(0x2,c[_0x300e0a(0x219)](b[_0x300e0a(0x1c8)]))],p);var H=Object[_0x300e0a(0x21b)],J=(_0x4df243,_0x2c336e,_0x3232de,_0x16199c)=>{for(var _0x2c8d4b=_0x16199c>0x1?void 0x0:_0x16199c?H(_0x2c336e,_0x3232de):_0x2c336e,_0x4846b5=_0x4df243['length']-0x1,_0x498dea;_0x4846b5>=0x0;_0x4846b5--)(_0x498dea=_0x4df243[_0x4846b5])&&(_0x2c8d4b=_0x498dea(_0x2c8d4b)||_0x2c8d4b);return _0x2c8d4b;},y=(_0x557a78,_0x35ba0d)=>(_0x52e5dd,_0x2cc517)=>_0x35ba0d(_0x52e5dd,_0x2cc517,_0x557a78);let g=class extends c[_0x300e0a(0x216)]{constructor(_0x1cbed1,_0x2fa0ab){const _0x106779=_0x300e0a;super(),this[_0x106779(0x221)]=_0x1cbed1,this[_0x106779(0x212)]=_0x2fa0ab,this[_0x106779(0x210)]();}['_initDataSource'](){const _0x178a98=_0x300e0a;this['_threadCommentDataSourceService'][_0x178a98(0x1bc)]=this['_threadCommentDataSource'],this[_0x178a98(0x221)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x300e0a(0x228)]),y(0x1,c[_0x300e0a(0x219)](p))],g);var F=Object[_0x300e0a(0x1ed)],L=Object[_0x300e0a(0x21b)],Z=(_0x4f9909,_0x76e972,_0x5efbf0)=>_0x76e972 in _0x4f9909?F(_0x4f9909,_0x76e972,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5efbf0}):_0x4f9909[_0x76e972]=_0x5efbf0,W=(_0x14f27f,_0x23d8c8,_0x2474c0,_0x26b405)=>{const _0x469156=_0x300e0a;for(var _0xe89b11=_0x26b405>0x1?void 0x0:_0x26b405?L(_0x23d8c8,_0x2474c0):_0x23d8c8,_0xa39baf=_0x14f27f[_0x469156(0x1c3)]-0x1,_0x4f503c;_0xa39baf>=0x0;_0xa39baf--)(_0x4f503c=_0x14f27f[_0xa39baf])&&(_0xe89b11=_0x4f503c(_0xe89b11)||_0xe89b11);return _0xe89b11;},O=(_0x24ba6f,_0x524d81)=>(_0x5aa416,_0x176a55)=>_0x524d81(_0x5aa416,_0x176a55,_0x24ba6f),N=(_0x3787f2,_0x12288e,_0x407093)=>Z(_0x3787f2,typeof _0x12288e!='symbol'?_0x12288e+'':_0x12288e,_0x407093);exports[_0x300e0a(0x1d7)]=class extends c[_0x300e0a(0x20f)]{constructor(_0x46466c=D,_0xb4517f,_0x5d1930){const _0x220c72=_0x300e0a;super(),this[_0x220c72(0x1f5)]=_0x46466c,this[_0x220c72(0x1f6)]=_0xb4517f,this[_0x220c72(0x1e4)]=_0x5d1930;const {..._0x4ba59c}=c[_0x220c72(0x218)]({},D,this[_0x220c72(0x1f5)]);this[_0x220c72(0x1e4)]['setConfig'](q,_0x4ba59c);}[_0x300e0a(0x1cf)](){const _0x2a5cda=_0x300e0a;[[p],[g],[_]][_0x2a5cda(0x22a)](_0x10b2ca=>{const _0x20efd=_0x2a5cda;this['_injector'][_0x20efd(0x1d0)](_0x10b2ca);});}[_0x300e0a(0x1bd)](){const _0x2944d1=_0x300e0a;this[_0x2944d1(0x1f6)]['get'](g),this[_0x2944d1(0x1f6)][_0x2944d1(0x1df)](_);}},N(exports[_0x300e0a(0x1d7)],_0x300e0a(0x1f7),U),N(exports[_0x300e0a(0x1d7)],'type',c[_0x300e0a(0x1d3)]['UNIVER_UNKNOWN']),exports[_0x300e0a(0x1d7)]=W([c[_0x300e0a(0x1f9)](w[_0x300e0a(0x227)],b[_0x300e0a(0x1db)],T['UniverLicensePlugin']),O(0x1,c[_0x300e0a(0x219)](c[_0x300e0a(0x1ef)])),O(0x2,c[_0x300e0a(0x1b9)])],exports[_0x300e0a(0x1d7)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x59ea57=_0x264e;function _0x264e(_0x359968,_0x411b3){const _0x7619d4=_0x7619();return _0x264e=function(_0x264ef0,_0x15444f){_0x264ef0=_0x264ef0-0x16e;let _0x2aaf03=_0x7619d4[_0x264ef0];return _0x2aaf03;},_0x264e(_0x359968,_0x411b3);}(function(_0x1f465c,_0x3b303){const _0xdc7ff7=_0x264e,_0x1dc9f3=_0x1f465c();while(!![]){try{const _0x538dba=parseInt(_0xdc7ff7(0x1b4))/0x1+parseInt(_0xdc7ff7(0x1ca))/0x2+parseInt(_0xdc7ff7(0x1b3))/0x3+parseInt(_0xdc7ff7(0x1bd))/0x4+-parseInt(_0xdc7ff7(0x1c4))/0x5+-parseInt(_0xdc7ff7(0x1b8))/0x6*(parseInt(_0xdc7ff7(0x1a1))/0x7)+-parseInt(_0xdc7ff7(0x174))/0x8*(-parseInt(_0xdc7ff7(0x172))/0x9);if(_0x538dba===_0x3b303)break;else _0x1dc9f3['push'](_0x1dc9f3['shift']());}catch(_0x483c7d){_0x1dc9f3['push'](_0x1dc9f3['shift']());}}}(_0x7619,0x4e0d8));import{CommentService as _0x3cd1f3,CollaborationSessionService as _0x250336,UniverCollaborationClientPlugin as _0x3f0de4}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x53e585}from'@univerjs-pro/license';import{dayjs as _0x30ebdb,UserManagerService as _0x11e1a7,Inject as _0x305425,Injector as _0x55b98c,Disposable as _0x3b5b07,CustomRangeType as _0x52cc13,UniverInstanceType as _0x1acf5a,DependentOn as _0x5f16f5,IConfigService as _0x1dbb73,Plugin as _0x465844,merge as _0x148cba}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x260dd3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43c617,IThreadCommentDataSourceService as _0x4e5a4c}from'@univerjs/thread-comment';import{bufferTime as _0x5376a3}from'rxjs';import{HTTPService as _0x4fcb94}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xf85ada=>(_0xf85ada[_0xf85ada[_0x59ea57(0x182)]=0x0]=_0x59ea57(0x182),_0xf85ada[_0xf85ada[_0x59ea57(0x1b2)]=0x1]=_0x59ea57(0x1b2),_0xf85ada[_0xf85ada[_0x59ea57(0x1d0)]=-0x1]=_0x59ea57(0x1d0),_0xf85ada))(I||{}),v=(_0x4ea0ac=>(_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1ba)]=0x0]=_0x59ea57(0x1ba),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1cc)]=0x1]=_0x59ea57(0x1cc),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1d1)]=0x2]=_0x59ea57(0x1d1),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1a5)]=0x3]=_0x59ea57(0x1a5),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x19e)]=0x4]=_0x59ea57(0x19e),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1a3)]=0x5]=_0x59ea57(0x1a3),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1d0)]=-0x1]='UNRECOGNIZED',_0x4ea0ac))(v||{});const y=_0x52eb61=>_0x30ebdb(new Date(+_0x52eb61))[_0x59ea57(0x176)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x463959,_0xc06963)=>{const _0x27d60f=_0x59ea57,_0x36c378=_0x463959[_0x27d60f(0x1cf)](_0x11e1a7),_0x344afa=_0x463959['get'](_0x4fcb94);_0xc06963[_0x27d60f(0x185)](_0xc43dd4=>{const _0x3aeff7=_0x27d60f;_0x36c378[_0x3aeff7(0x18b)](_0xc43dd4)&&_0xc06963[_0x3aeff7(0x195)](_0xc43dd4);}),_0xc06963[_0x27d60f(0x183)]&&(await _0x344afa[_0x27d60f(0x1cf)](_0x27d60f(0x1ab),{'params':{'userIDs':[..._0xc06963]}}))[_0x27d60f(0x19c)][_0x27d60f(0x197)]['forEach'](_0x58ee22=>{const _0x25ef9c=_0x27d60f;_0x58ee22&&_0x36c378[_0x25ef9c(0x1c1)](_0x58ee22);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2e5a42,_0x505724,_0x3a9326,_0x4cbdb0)=>{const _0x1ec23e=_0x59ea57;for(var _0x4c9b72=_0x4cbdb0>0x1?void 0x0:_0x4cbdb0?K(_0x505724,_0x3a9326):_0x505724,_0x5e4417=_0x2e5a42[_0x1ec23e(0x1b1)]-0x1,_0x19900f;_0x5e4417>=0x0;_0x5e4417--)(_0x19900f=_0x2e5a42[_0x5e4417])&&(_0x4c9b72=_0x19900f(_0x4c9b72)||_0x4c9b72);return _0x4c9b72;},p=(_0x266256,_0x149c7c)=>(_0x1a89f9,_0x2c6fe7)=>_0x149c7c(_0x1a89f9,_0x2c6fe7,_0x266256);let _=class extends _0x3b5b07{constructor(_0x180cbb,_0x4b7acb,_0x31e234,_0x519c8a){const _0xbe32b5=_0x59ea57;super(),this['_commentService']=_0x180cbb,this['_threadCommentModel']=_0x4b7acb,this[_0xbe32b5(0x1c5)]=_0x31e234,this[_0xbe32b5(0x1b0)]=_0x519c8a,this[_0xbe32b5(0x193)](),this[_0xbe32b5(0x17e)]();}[_0x59ea57(0x17e)](){const _0x1c963e=_0x59ea57;this['disposeWithMe'](this[_0x1c963e(0x1c6)][_0x1c963e(0x1c2)][_0x1c963e(0x171)](_0x5376a3(0x10))[_0x1c963e(0x1a4)](_0x2ab37e=>{const _0x351837=_0x1c963e,_0x279584=new Set();_0x2ab37e['forEach'](_0x267458=>{const _0x2dc0a6=_0x264e;switch(_0x267458['type']){case'add':{const _0x515725=_0x267458['payload'][_0x2dc0a6(0x17a)];_0x279584[_0x2dc0a6(0x17c)](_0x515725);break;}}}),B(this[_0x351837(0x1b0)],_0x279584);}));}[_0x59ea57(0x193)](){const _0x5538fc=_0x59ea57;this[_0x5538fc(0x1cd)](this[_0x5538fc(0x190)]['commentUpdate$'][_0x5538fc(0x1a4)](async _0x44f446=>{const _0xb80720=_0x5538fc;var _0xff2834,_0x4bd814,_0x465202,_0x37673f;const _0x58025a=(_0xff2834=this[_0xb80720(0x1c6)][_0xb80720(0x191)](_0x44f446[_0xb80720(0x1ce)])['find'](_0x43a2b0=>_0x43a2b0['threadId']===_0x44f446[_0xb80720(0x1aa)]))==null?void 0x0:_0xff2834[_0xb80720(0x199)];if(!_0x58025a)return;const {unitId:_0x1251e5,subUnitId:_0xdcb03c}=_0x58025a;switch(_0x44f446[_0xb80720(0x1a9)]&&this[_0xb80720(0x1c5)]['addUser'](_0x44f446[_0xb80720(0x1a9)]),_0x44f446['type']){case v[_0xb80720(0x1cc)]:break;case v[_0xb80720(0x1d1)]:{this[_0xb80720(0x1c6)][_0xb80720(0x1c8)](_0x1251e5,_0xdcb03c,{'unitId':_0x1251e5,'subUnitId':_0xdcb03c,'ref':'','id':_0x44f446[_0xb80720(0x1d3)],'dT':y(+_0x44f446['createTimestamp']),'threadId':_0x44f446[_0xb80720(0x1aa)],'personId':(_0x465202=(_0x4bd814=_0x44f446[_0xb80720(0x1a9)])==null?void 0x0:_0x4bd814['userID'])!=null?_0x465202:_0x44f446[_0xb80720(0x1bc)],'text':JSON['parse'](_0x44f446['content']),'parentId':_0x58025a['id']});break;}case v[_0xb80720(0x19e)]:{const _0x3a966d=this[_0xb80720(0x1c6)]['getComment'](_0x1251e5,_0xdcb03c,_0x44f446[_0xb80720(0x1d3)]);_0x3a966d&&_0x3a966d[_0xb80720(0x1af)]&&this[_0xb80720(0x1c6)][_0xb80720(0x192)](_0x1251e5,_0xdcb03c,_0x44f446[_0xb80720(0x1d3)]);break;}case v['Edit']:{this[_0xb80720(0x1c6)][_0xb80720(0x181)](_0x1251e5,_0xdcb03c,{'commentId':_0x44f446['replyId'],'text':JSON[_0xb80720(0x1c0)](_0x44f446[_0xb80720(0x1bb)])});break;}case v[_0xb80720(0x1a3)]:{const _0x4313cc=(_0x37673f=this[_0xb80720(0x1c6)][_0xb80720(0x191)](_0x44f446[_0xb80720(0x1ce)])[_0xb80720(0x1a6)](_0xb94a3c=>_0xb94a3c[_0xb80720(0x1aa)]===_0x44f446[_0xb80720(0x1aa)]))==null?void 0x0:_0x37673f[_0xb80720(0x199)];_0x4313cc&&this[_0xb80720(0x1c6)][_0xb80720(0x19f)](_0x1251e5,_0xdcb03c,_0x4313cc['id'],_0x44f446['solved']===I[_0xb80720(0x1b2)]);break;}}}));}};_=V([p(0x0,_0x305425(_0x3cd1f3)),p(0x1,_0x305425(_0x43c617)),p(0x2,_0x305425(_0x11e1a7)),p(0x3,_0x305425(_0x55b98c))],_);const z=_0x59ea57(0x18a),O={};var k=Object[_0x59ea57(0x1b7)],Q=(_0x4414ef,_0x418a93,_0x433852,_0x4d2d5b)=>{for(var _0x5043d0=_0x4d2d5b>0x1?void 0x0:_0x4d2d5b?k(_0x418a93,_0x433852):_0x418a93,_0x32e476=_0x4414ef['length']-0x1,_0x4f3393;_0x32e476>=0x0;_0x32e476--)(_0x4f3393=_0x4414ef[_0x32e476])&&(_0x5043d0=_0x4f3393(_0x5043d0)||_0x5043d0);return _0x5043d0;},b=(_0x2d3e20,_0x10368b)=>(_0x41b6cd,_0x11d852)=>_0x10368b(_0x41b6cd,_0x11d852,_0x2d3e20);function X(_0x3bd5bf,_0x1aae86){const _0x55de61=_0x59ea57,_0x8c3315=_0x3bd5bf[_0x55de61(0x1ae)][0x0];return{..._0x1aae86,'id':_0x8c3315['replyId'],'resolved':_0x3bd5bf[_0x55de61(0x18f)]===0x1,'dT':y(_0x8c3315[_0x55de61(0x1b9)]),'personId':_0x8c3315[_0x55de61(0x1bc)],'threadId':_0x8c3315[_0x55de61(0x1aa)]};}function ee(_0x2e6878,_0x25c9de,_0x2c3112){const _0x537dea=_0x59ea57;var _0x4a6bed,_0x1f3183;if(((_0x1f3183=(_0x4a6bed=_0x2e6878==null?void 0x0:_0x2e6878['replies'])==null?void 0x0:_0x4a6bed['length'])!=null?_0x1f3183:0x0)>0x0){const _0x13edb9=(_0x1547cd,_0x54a702)=>({'id':_0x1547cd['replyId'],'threadId':_0x1547cd[_0x537dea(0x1aa)],'dT':y(_0x1547cd[_0x537dea(0x1b9)]),'personId':_0x1547cd[_0x537dea(0x1bc)],'resolved':_0x2e6878[_0x537dea(0x18f)]===I[_0x537dea(0x1b2)],'unitId':_0x25c9de,'subUnitId':_0x2c3112,'text':JSON[_0x537dea(0x1c0)](_0x1547cd[_0x537dea(0x1bb)]),'parentId':_0x54a702}),_0x337bc1=_0x13edb9(_0x2e6878[_0x537dea(0x1ae)][0x0]);return{..._0x337bc1,'children':_0x2e6878[_0x537dea(0x1ae)][_0x537dea(0x1ad)](0x1)[_0x537dea(0x1ac)](_0x482275=>_0x13edb9(_0x482275,_0x337bc1['id']))};}return null;}let S=class{constructor(_0xd4a196,_0x2e6c75,_0x32deab){const _0x5ceab4=_0x59ea57;this[_0x5ceab4(0x16f)]=_0xd4a196,this[_0x5ceab4(0x1c5)]=_0x2e6c75,this['_sessionService']=_0x32deab;}async[_0x59ea57(0x1c8)](_0x509388){const _0x4ce1db=_0x59ea57;var _0x190b80,_0x5d7e9b;const {parentId:_0x40412d,unitId:_0x39f96b,text:_0x5450a4,threadId:_0x2c5143}=_0x509388,_0xb94365=(_0x5d7e9b=(_0x190b80=_0x5450a4['customRanges'])==null?void 0x0:_0x190b80[_0x4ce1db(0x17b)](_0x87eb07=>_0x87eb07['rangeType']===_0x52cc13[_0x4ce1db(0x186)])['map'](_0x7a4d19=>_0x7a4d19[_0x4ce1db(0x189)]))!=null?_0x5d7e9b:[],_0x2917ca=JSON[_0x4ce1db(0x1c3)](_0x5450a4),_0x37b411=(await this[_0x4ce1db(0x1be)][_0x4ce1db(0x196)](_0x39f96b))[_0x4ce1db(0x1b5)]();if(_0x40412d){const _0x3cb96d={'memberId':_0x37b411,'unitId':_0x39f96b,'content':_0x2917ca,'mention':_0xb94365,'threadId':_0x2c5143},_0x1550cb=(await this['_httpService'][_0x4ce1db(0x184)](_0x4ce1db(0x1cb)+_0x39f96b+_0x4ce1db(0x1b6),{'body':_0x3cb96d}))[_0x4ce1db(0x19c)][_0x4ce1db(0x178)];return{..._0x509388,'id':_0x1550cb[_0x4ce1db(0x1d3)],'dT':_0x30ebdb(+_0x1550cb[_0x4ce1db(0x1b9)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x1550cb[_0x4ce1db(0x1bc)]};}else{const _0x39a8fe={'memberId':_0x37b411,'unitId':_0x39f96b,'content':_0x2917ca,'mention':_0xb94365},_0x296fab=await this['_httpService'][_0x4ce1db(0x184)](_0x4ce1db(0x1cb)+_0x39f96b+_0x4ce1db(0x1c9),{'body':_0x39a8fe});return X(_0x296fab[_0x4ce1db(0x19c)][_0x4ce1db(0x17d)],_0x509388);}}async[_0x59ea57(0x181)](_0x5a2659){const _0x4f3961=_0x59ea57;var _0x26b8c6,_0x2fc754;const {text:_0x54fae8,unitId:_0x33630b}=_0x5a2659,_0x635e11=(_0x2fc754=(_0x26b8c6=_0x54fae8[_0x4f3961(0x175)])==null?void 0x0:_0x26b8c6[_0x4f3961(0x17b)](_0x358c60=>_0x358c60[_0x4f3961(0x1a2)]===_0x52cc13[_0x4f3961(0x186)])[_0x4f3961(0x1ac)](_0x276776=>_0x276776[_0x4f3961(0x189)]))!=null?_0x2fc754:[],_0x339f28=JSON[_0x4f3961(0x1c3)](_0x54fae8),_0x11e090=_0x5a2659[_0x4f3961(0x1aa)],_0x17c5e7=_0x5a2659['id'],_0x4f4296={'memberId':(await this['_sessionService'][_0x4f3961(0x196)](_0x33630b))['getMemberID'](),'unitId':_0x33630b,'threadId':_0x11e090,'mention':_0x635e11,'content':_0x339f28,'replyId':_0x17c5e7},_0x296ed3=await this['_httpService'][_0x4f3961(0x184)](_0x4f3961(0x1cb)+_0x33630b+_0x4f3961(0x180),{'body':_0x4f4296});return!_0x296ed3['body']['error']||_0x296ed3['body']['error'][_0x4f3961(0x1c7)]===0x1;}async['resolveComment'](_0xd27023){const _0x3f427d=_0x59ea57,{unitId:_0x59457b}=_0xd27023,_0x46e734=_0xd27023[_0x3f427d(0x1aa)],_0x50a8f7={'memberId':this[_0x3f427d(0x1c5)][_0x3f427d(0x19d)]()[_0x3f427d(0x173)],'unitId':_0x59457b,'threadId':_0x46e734,'solved':_0xd27023['resolved']?I[_0x3f427d(0x1b2)]:I[_0x3f427d(0x182)]},_0x4e4ec7=await this[_0x3f427d(0x16f)]['post'](_0x3f427d(0x1cb)+_0x59457b+'/solved',{'body':_0x50a8f7});return!_0x4e4ec7[_0x3f427d(0x19c)]['error']||_0x4e4ec7[_0x3f427d(0x19c)]['error'][_0x3f427d(0x1c7)]===0x1;}async[_0x59ea57(0x192)](_0x1e31d1,_0x1c21ed,_0x258733,_0x1e8ee2){const _0xeafe29=_0x59ea57,_0x267288={'memberId':(await this['_sessionService']['requireSession'](_0x1e31d1))[_0xeafe29(0x1b5)](),'threadId':_0x258733,'replyId':_0x1e8ee2,'unitId':_0x1e31d1},_0x282b85=await this['_httpService'][_0xeafe29(0x184)](_0xeafe29(0x1cb)+_0x1e31d1+_0xeafe29(0x18c),{'body':_0x267288});return!_0x282b85[_0xeafe29(0x19c)][_0xeafe29(0x179)]||_0x282b85[_0xeafe29(0x19c)][_0xeafe29(0x179)]['code']===0x1;}async[_0x59ea57(0x170)](_0xecbe23,_0x139476,_0xc2f44e){const _0x31b2f8=_0x59ea57,_0x5445ae={'unitId':_0xecbe23,'threadId':_0xc2f44e},_0xc88335=await this['_httpService'][_0x31b2f8(0x184)]('/universer-api/comment/unit/'+_0xecbe23+_0x31b2f8(0x187),{'body':_0x5445ae}),_0x44e8a0=_0xc2f44e[_0x31b2f8(0x1ac)](_0x45a7c1=>ee(_0xc88335[_0x31b2f8(0x19c)][_0x31b2f8(0x18d)][_0x45a7c1],_0xecbe23,_0x139476))['filter'](Boolean);return Object['values'](_0xc88335['body'][_0x31b2f8(0x197)])[_0x31b2f8(0x185)](_0x33241c=>{const _0x334e38=_0x31b2f8;this['_userService'][_0x334e38(0x1c1)](_0x33241c);}),_0x44e8a0;}[_0x59ea57(0x19b)](_0x2accbb){const _0x5c4543=_0x59ea57;return{'id':_0x2accbb['id'],'threadId':_0x2accbb[_0x5c4543(0x1aa)],'ref':_0x2accbb[_0x5c4543(0x17f)]};}};function _0x7619(){const _0xb92e9c=['user','threadId','/universer-api/user/list','map','slice','replies','parentId','_injector','length','Solved','648744pchXYX','241366sZmiDl','getMemberID','/reply','getOwnPropertyDescriptor','192150lcNakw','createTimestamp','Unknown','content','userId','1897176okHVAa','_sessionService','type','parse','addUser','commentUpdate$','stringify','2814485mmSRJs','_userService','_threadCommentModel','code','addComment','/add','465450ZLrGIX','/universer-api/comment/unit/','Add','disposeWithMe','unitId','get','UNRECOGNIZED','Reply','onStarting','replyId','defineProperty','_httpService','listComments','pipe','632187rayOhg','userID','8SZaTuj','customRanges','format','_configService','reply','error','personId','filter','add','comment','_initUserSync','ref','/edit','updateComment','OpenOrReOpen','size','post','forEach','COMMENT','/list','symbol','rangeId','thread-comment-data-source.config','getUser','/delete','comments','pluginName','solved','_commentService','getUnit','deleteComment','_init','_threadCommentDataSourceService','delete','requireSession','users','_threadCommentDataSource','root','syncUpdateMutationToColla','saveCommentToSnapshot','body','getCurrentUser','Delete','resolveComment','_initDataSource','77XeUbbE','rangeType','Solve','subscribe','Edit','find','_config','UNIVER_UNKNOWN'];_0x7619=function(){return _0xb92e9c;};return _0x7619();}S=Q([b(0x0,_0x305425(_0x4fcb94)),b(0x1,_0x305425(_0x11e1a7)),b(0x2,_0x305425(_0x250336))],S);var re=Object[_0x59ea57(0x1b7)],te=(_0x316dfd,_0x570ad9,_0x291029,_0x10a655)=>{const _0x56e817=_0x59ea57;for(var _0xa60318=_0x10a655>0x1?void 0x0:_0x10a655?re(_0x570ad9,_0x291029):_0x570ad9,_0x210d36=_0x316dfd[_0x56e817(0x1b1)]-0x1,_0x5b6d7c;_0x210d36>=0x0;_0x210d36--)(_0x5b6d7c=_0x316dfd[_0x210d36])&&(_0xa60318=_0x5b6d7c(_0xa60318)||_0xa60318);return _0xa60318;},M=(_0x5a8ffe,_0x7b1d7c)=>(_0x730be2,_0x33f244)=>_0x7b1d7c(_0x730be2,_0x33f244,_0x5a8ffe);let f=class extends _0x3b5b07{constructor(_0x35e734,_0x207612){const _0x1c32a9=_0x59ea57;super(),this[_0x1c32a9(0x194)]=_0x35e734,this[_0x1c32a9(0x198)]=_0x207612,this[_0x1c32a9(0x1a0)]();}[_0x59ea57(0x1a0)](){const _0x2399f4=_0x59ea57;this[_0x2399f4(0x194)]['dataSource']=this[_0x2399f4(0x198)],this['_threadCommentDataSourceService'][_0x2399f4(0x19a)]=!0x1;}};f=te([M(0x0,_0x4e5a4c),M(0x1,_0x305425(S))],f);var se=Object[_0x59ea57(0x16e)],oe=Object[_0x59ea57(0x1b7)],ne=(_0x585d99,_0xb0bfd6,_0x4e5e26)=>_0xb0bfd6 in _0x585d99?se(_0x585d99,_0xb0bfd6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e5e26}):_0x585d99[_0xb0bfd6]=_0x4e5e26,ie=(_0x57f88b,_0x40ff86,_0x580d67,_0xabce1)=>{const _0x51fd5b=_0x59ea57;for(var _0x95fdfd=_0xabce1>0x1?void 0x0:_0xabce1?oe(_0x40ff86,_0x580d67):_0x40ff86,_0x13fe48=_0x57f88b[_0x51fd5b(0x1b1)]-0x1,_0x82b9e0;_0x13fe48>=0x0;_0x13fe48--)(_0x82b9e0=_0x57f88b[_0x13fe48])&&(_0x95fdfd=_0x82b9e0(_0x95fdfd)||_0x95fdfd);return _0x95fdfd;},N=(_0x4b1065,_0x55c98b)=>(_0x563a7e,_0x53df8c)=>_0x55c98b(_0x563a7e,_0x53df8c,_0x4b1065),$=(_0x3f0ec9,_0x4d5904,_0x3f5e43)=>ne(_0x3f0ec9,typeof _0x4d5904!=_0x59ea57(0x188)?_0x4d5904+'':_0x4d5904,_0x3f5e43);let g=class extends _0x465844{constructor(_0x414b94=O,_0x4ba7ed,_0x6b66d6){const _0x128580=_0x59ea57;super(),this[_0x128580(0x1a7)]=_0x414b94,this[_0x128580(0x1b0)]=_0x4ba7ed,this[_0x128580(0x177)]=_0x6b66d6;const {..._0x3b932c}=_0x148cba({},O,this[_0x128580(0x1a7)]);this['_configService']['setConfig'](z,_0x3b932c);}[_0x59ea57(0x1d2)](){[[S],[f],[_]]['forEach'](_0x147e24=>{const _0x4e12ee=_0x264e;this['_injector'][_0x4e12ee(0x17c)](_0x147e24);});}['onReady'](){const _0x4ee148=_0x59ea57;this[_0x4ee148(0x1b0)][_0x4ee148(0x1cf)](f),this[_0x4ee148(0x1b0)][_0x4ee148(0x1cf)](_);}};$(g,_0x59ea57(0x18e),W),$(g,_0x59ea57(0x1bf),_0x1acf5a[_0x59ea57(0x1a8)]),g=ie([_0x5f16f5(_0x260dd3,_0x3f0de4,_0x53e585),N(0x1,_0x305425(_0x55b98c)),N(0x2,_0x1dbb73)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1ebeec=_0x5475;(function(_0x5ac0e8,_0x1dd9f3){const _0x38ec79=_0x5475,_0x443fd8=_0x5ac0e8();while(!![]){try{const _0x49e857=-parseInt(_0x38ec79(0x21d))/0x1+parseInt(_0x38ec79(0x1e8))/0x2*(parseInt(_0x38ec79(0x1fb))/0x3)+parseInt(_0x38ec79(0x1e7))/0x4+-parseInt(_0x38ec79(0x207))/0x5+parseInt(_0x38ec79(0x1e1))/0x6+-parseInt(_0x38ec79(0x1df))/0x7+parseInt(_0x38ec79(0x1f2))/0x8;if(_0x49e857===_0x1dd9f3)break;else _0x443fd8['push'](_0x443fd8['shift']());}catch(_0x44a183){_0x443fd8['push'](_0x443fd8['shift']());}}}(_0x5c5a,0xa90bb));import{CommentService as _0x1f6c58,CollaborationSessionService as _0x504872,UniverCollaborationClientPlugin as _0x34845c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5499db}from'@univerjs-pro/license';import{dayjs as _0x4976ce,UserManagerService as _0x27743c,Inject as _0x5b1114,Injector as _0x304f84,Disposable as _0x235f20,CustomRangeType as _0x355712,UniverInstanceType as _0x26b6b5,DependentOn as _0x3e5e37,IConfigService as _0x3f1145,Plugin as _0x1bdb37,merge as _0x4ebb47}from'@univerjs/core';function _0x5c5a(){const _0x599780=['user','values','/universer-api/comment/unit/','Delete','subscribe','Reply','forEach','createTimestamp','36903uMlpUe','getUnit','requireSession','resolveComment','add','userID','/reply','pluginName','/list','map','thread-comment-data-source.config','comment','118980VqCiPM','_httpService','format','getCurrentUser','Solve','/solved','replyId','root','getUser','solved','saveCommentToSnapshot','_initUserSync','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','replies','_configService','_init','users','_sessionService','YYYY/MM/DD\x20HH:mm','customRanges','getComment','950893MlWCRP','post','syncUpdateMutationToColla','_userService','type','_injector','onReady','_threadCommentModel','setConfig','length','Solved','size','get','_config','filter','UNIVER_UNKNOWN','body','getOwnPropertyDescriptor','parse','personId','updateComment','dataSource','deleteComment','/universer-api/user/list','addComment','COMMENT','content','stringify','userId','error','getMemberID','_threadCommentDataSource','9657298qFnhmA','Edit','6398526SBnUlG','disposeWithMe','addUser','find','Unknown','_commentService','5006576GPjDNK','14hmNIUf','parentId','code','OpenOrReOpen','UNRECOGNIZED','threadId','_initDataSource','reply','listComments','commentUpdate$','5140336edVlmL'];_0x5c5a=function(){return _0x599780;};return _0x5c5a();}import{UniverThreadCommentUIPlugin as _0x305dda}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1ae424,IThreadCommentDataSourceService as _0x5b1ce4}from'@univerjs/thread-comment';import{bufferTime as _0x4f4405}from'rxjs';import{HTTPService as _0x44202b}from'@univerjs/network';const W=_0x1ebeec(0x213);var I=(_0x464222=>(_0x464222[_0x464222['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x464222[_0x464222['Solved']=0x1]=_0x1ebeec(0x1c9),_0x464222[_0x464222[_0x1ebeec(0x1ec)]=-0x1]='UNRECOGNIZED',_0x464222))(I||{}),v=(_0xb1ae7a=>(_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x1e5)]=0x0]='Unknown',_0xb1ae7a[_0xb1ae7a['Add']=0x1]='Add',_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x1f8)]=0x2]=_0x1ebeec(0x1f8),_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x1e0)]=0x3]=_0x1ebeec(0x1e0),_0xb1ae7a[_0xb1ae7a['Delete']=0x4]=_0x1ebeec(0x1f6),_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x20b)]=0x5]=_0x1ebeec(0x20b),_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x1ec)]=-0x1]=_0x1ebeec(0x1ec),_0xb1ae7a))(v||{});function _0x5475(_0x23ca5e,_0x3823d6){const _0x5c5a75=_0x5c5a();return _0x5475=function(_0x5475d8,_0x1ed63f){_0x5475d8=_0x5475d8-0x1c6;let _0x56ff3d=_0x5c5a75[_0x5475d8];return _0x56ff3d;},_0x5475(_0x23ca5e,_0x3823d6);}const y=_0x93684b=>_0x4976ce(new Date(+_0x93684b))[_0x1ebeec(0x209)](_0x1ebeec(0x21a)),B=async(_0x2236a4,_0x26b189)=>{const _0x5a0aa3=_0x1ebeec,_0xfd806d=_0x2236a4[_0x5a0aa3(0x1cb)](_0x27743c),_0x27e736=_0x2236a4[_0x5a0aa3(0x1cb)](_0x44202b);_0x26b189[_0x5a0aa3(0x1f9)](_0x5730cf=>{const _0x555ef4=_0x5a0aa3;_0xfd806d[_0x555ef4(0x20f)](_0x5730cf)&&_0x26b189['delete'](_0x5730cf);}),_0x26b189[_0x5a0aa3(0x1ca)]&&(await _0x27e736[_0x5a0aa3(0x1cb)](_0x5a0aa3(0x1d6),{'params':{'userIDs':[..._0x26b189]}}))[_0x5a0aa3(0x1cf)]['users'][_0x5a0aa3(0x1f9)](_0x2ad441=>{const _0x2a6bbc=_0x5a0aa3;_0x2ad441&&_0xfd806d[_0x2a6bbc(0x1e3)](_0x2ad441);});};var K=Object[_0x1ebeec(0x1d0)],V=(_0x3c9e85,_0x32ed69,_0x1a4663,_0x135aa1)=>{const _0x327a45=_0x1ebeec;for(var _0x2e23a8=_0x135aa1>0x1?void 0x0:_0x135aa1?K(_0x32ed69,_0x1a4663):_0x32ed69,_0x5be39b=_0x3c9e85[_0x327a45(0x1c8)]-0x1,_0x3aca5f;_0x5be39b>=0x0;_0x5be39b--)(_0x3aca5f=_0x3c9e85[_0x5be39b])&&(_0x2e23a8=_0x3aca5f(_0x2e23a8)||_0x2e23a8);return _0x2e23a8;},p=(_0x4565cc,_0x25d65c)=>(_0x49a79c,_0x3008ee)=>_0x25d65c(_0x49a79c,_0x3008ee,_0x4565cc);let _=class extends _0x235f20{constructor(_0x13960,_0x515205,_0x11c552,_0x1f7cd8){const _0x5a938f=_0x1ebeec;super(),this[_0x5a938f(0x1e6)]=_0x13960,this[_0x5a938f(0x1c6)]=_0x515205,this[_0x5a938f(0x220)]=_0x11c552,this[_0x5a938f(0x222)]=_0x1f7cd8,this['_init'](),this[_0x5a938f(0x212)]();}[_0x1ebeec(0x212)](){const _0x593313=_0x1ebeec;this[_0x593313(0x1e2)](this[_0x593313(0x1c6)][_0x593313(0x1f1)]['pipe'](_0x4f4405(0x10))[_0x593313(0x1f7)](_0xfae94d=>{const _0x3fa5ea=_0x593313,_0x8fdcf8=new Set();_0xfae94d[_0x3fa5ea(0x1f9)](_0x3dae33=>{const _0x25abab=_0x3fa5ea;switch(_0x3dae33['type']){case _0x25abab(0x1ff):{const _0x249728=_0x3dae33['payload'][_0x25abab(0x1d2)];_0x8fdcf8['add'](_0x249728);break;}}}),B(this[_0x3fa5ea(0x222)],_0x8fdcf8);}));}[_0x1ebeec(0x217)](){const _0x27cddb=_0x1ebeec;this[_0x27cddb(0x1e2)](this[_0x27cddb(0x1e6)]['commentUpdate$'][_0x27cddb(0x1f7)](async _0x3a4d5a=>{const _0xeaeb04=_0x27cddb;var _0x3464bc,_0x30309a,_0x2c1aca,_0x1b9c7b;const _0x1f273f=(_0x3464bc=this[_0xeaeb04(0x1c6)][_0xeaeb04(0x1fc)](_0x3a4d5a['unitId'])[_0xeaeb04(0x1e4)](_0x2a487f=>_0x2a487f[_0xeaeb04(0x1ed)]===_0x3a4d5a[_0xeaeb04(0x1ed)]))==null?void 0x0:_0x3464bc[_0xeaeb04(0x20e)];if(!_0x1f273f)return;const {unitId:_0x2064b3,subUnitId:_0x2d39a0}=_0x1f273f;switch(_0x3a4d5a[_0xeaeb04(0x1f3)]&&this['_userService'][_0xeaeb04(0x1e3)](_0x3a4d5a['user']),_0x3a4d5a[_0xeaeb04(0x221)]){case v['Add']:break;case v[_0xeaeb04(0x1f8)]:{this[_0xeaeb04(0x1c6)][_0xeaeb04(0x1d7)](_0x2064b3,_0x2d39a0,{'unitId':_0x2064b3,'subUnitId':_0x2d39a0,'ref':'','id':_0x3a4d5a[_0xeaeb04(0x20d)],'dT':y(+_0x3a4d5a[_0xeaeb04(0x1fa)]),'threadId':_0x3a4d5a[_0xeaeb04(0x1ed)],'personId':(_0x2c1aca=(_0x30309a=_0x3a4d5a[_0xeaeb04(0x1f3)])==null?void 0x0:_0x30309a[_0xeaeb04(0x200)])!=null?_0x2c1aca:_0x3a4d5a[_0xeaeb04(0x1db)],'text':JSON[_0xeaeb04(0x1d1)](_0x3a4d5a[_0xeaeb04(0x1d9)]),'parentId':_0x1f273f['id']});break;}case v[_0xeaeb04(0x1f6)]:{const _0x1affaa=this['_threadCommentModel'][_0xeaeb04(0x21c)](_0x2064b3,_0x2d39a0,_0x3a4d5a[_0xeaeb04(0x20d)]);_0x1affaa&&_0x1affaa[_0xeaeb04(0x1e9)]&&this[_0xeaeb04(0x1c6)]['deleteComment'](_0x2064b3,_0x2d39a0,_0x3a4d5a[_0xeaeb04(0x20d)]);break;}case v['Edit']:{this[_0xeaeb04(0x1c6)][_0xeaeb04(0x1d3)](_0x2064b3,_0x2d39a0,{'commentId':_0x3a4d5a[_0xeaeb04(0x20d)],'text':JSON[_0xeaeb04(0x1d1)](_0x3a4d5a[_0xeaeb04(0x1d9)])});break;}case v[_0xeaeb04(0x20b)]:{const _0x48e008=(_0x1b9c7b=this[_0xeaeb04(0x1c6)]['getUnit'](_0x3a4d5a['unitId'])[_0xeaeb04(0x1e4)](_0x13d12f=>_0x13d12f[_0xeaeb04(0x1ed)]===_0x3a4d5a[_0xeaeb04(0x1ed)]))==null?void 0x0:_0x1b9c7b[_0xeaeb04(0x20e)];_0x48e008&&this['_threadCommentModel'][_0xeaeb04(0x1fe)](_0x2064b3,_0x2d39a0,_0x48e008['id'],_0x3a4d5a[_0xeaeb04(0x210)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x5b1114(_0x1f6c58)),p(0x1,_0x5b1114(_0x1ae424)),p(0x2,_0x5b1114(_0x27743c)),p(0x3,_0x5b1114(_0x304f84))],_);const z=_0x1ebeec(0x205),O={};var k=Object[_0x1ebeec(0x1d0)],Q=(_0x4d3120,_0x56219d,_0x52e629,_0x12f9f7)=>{const _0x498c32=_0x1ebeec;for(var _0x1e2d99=_0x12f9f7>0x1?void 0x0:_0x12f9f7?k(_0x56219d,_0x52e629):_0x56219d,_0x39c0c3=_0x4d3120[_0x498c32(0x1c8)]-0x1,_0x3e1e6f;_0x39c0c3>=0x0;_0x39c0c3--)(_0x3e1e6f=_0x4d3120[_0x39c0c3])&&(_0x1e2d99=_0x3e1e6f(_0x1e2d99)||_0x1e2d99);return _0x1e2d99;},b=(_0x17d262,_0x144e4a)=>(_0xbba05b,_0x1a2d83)=>_0x144e4a(_0xbba05b,_0x1a2d83,_0x17d262);function X(_0xfe1494,_0x4d17d3){const _0x1e0dfa=_0x1ebeec,_0x2f06ea=_0xfe1494['replies'][0x0];return{..._0x4d17d3,'id':_0x2f06ea[_0x1e0dfa(0x20d)],'resolved':_0xfe1494['solved']===0x1,'dT':y(_0x2f06ea[_0x1e0dfa(0x1fa)]),'personId':_0x2f06ea['userId'],'threadId':_0x2f06ea[_0x1e0dfa(0x1ed)]};}function ee(_0x2c12ff,_0x14feb3,_0x4caa87){const _0x3dae58=_0x1ebeec;var _0x392c76,_0x2bb3e3;if(((_0x2bb3e3=(_0x392c76=_0x2c12ff==null?void 0x0:_0x2c12ff[_0x3dae58(0x215)])==null?void 0x0:_0x392c76['length'])!=null?_0x2bb3e3:0x0)>0x0){const _0x409538=(_0x5b1863,_0x558c71)=>({'id':_0x5b1863[_0x3dae58(0x20d)],'threadId':_0x5b1863[_0x3dae58(0x1ed)],'dT':y(_0x5b1863[_0x3dae58(0x1fa)]),'personId':_0x5b1863[_0x3dae58(0x1db)],'resolved':_0x2c12ff['solved']===I[_0x3dae58(0x1c9)],'unitId':_0x14feb3,'subUnitId':_0x4caa87,'text':JSON['parse'](_0x5b1863[_0x3dae58(0x1d9)]),'parentId':_0x558c71}),_0x59e06b=_0x409538(_0x2c12ff['replies'][0x0]);return{..._0x59e06b,'children':_0x2c12ff['replies']['slice'](0x1)[_0x3dae58(0x204)](_0x40a8a7=>_0x409538(_0x40a8a7,_0x59e06b['id']))};}return null;}let S=class{constructor(_0x44135f,_0x5eed35,_0x3b60be){const _0x2609b1=_0x1ebeec;this['_httpService']=_0x44135f,this['_userService']=_0x5eed35,this[_0x2609b1(0x219)]=_0x3b60be;}async[_0x1ebeec(0x1d7)](_0x8bc38b){const _0xfad78e=_0x1ebeec;var _0x37436e,_0x9a8707;const {parentId:_0x3f2ae5,unitId:_0x134922,text:_0x48d726,threadId:_0x18da6b}=_0x8bc38b,_0x40f900=(_0x9a8707=(_0x37436e=_0x48d726[_0xfad78e(0x21b)])==null?void 0x0:_0x37436e[_0xfad78e(0x1cd)](_0x3076d8=>_0x3076d8['rangeType']===_0x355712[_0xfad78e(0x1d8)])['map'](_0x279ed5=>_0x279ed5['rangeId']))!=null?_0x9a8707:[],_0x262413=JSON[_0xfad78e(0x1da)](_0x48d726),_0xd0663d=(await this['_sessionService'][_0xfad78e(0x1fd)](_0x134922))[_0xfad78e(0x1dd)]();if(_0x3f2ae5){const _0x5afc3e={'memberId':_0xd0663d,'unitId':_0x134922,'content':_0x262413,'mention':_0x40f900,'threadId':_0x18da6b},_0x51aae4=(await this[_0xfad78e(0x208)][_0xfad78e(0x21e)](_0xfad78e(0x1f5)+_0x134922+_0xfad78e(0x201),{'body':_0x5afc3e}))[_0xfad78e(0x1cf)][_0xfad78e(0x1ef)];return{..._0x8bc38b,'id':_0x51aae4['replyId'],'dT':_0x4976ce(+_0x51aae4['createTimestamp'])[_0xfad78e(0x209)](_0xfad78e(0x21a)),'personId':_0x51aae4[_0xfad78e(0x1db)]};}else{const _0x30f488={'memberId':_0xd0663d,'unitId':_0x134922,'content':_0x262413,'mention':_0x40f900},_0x17647a=await this[_0xfad78e(0x208)][_0xfad78e(0x21e)](_0xfad78e(0x1f5)+_0x134922+'/add',{'body':_0x30f488});return X(_0x17647a[_0xfad78e(0x1cf)][_0xfad78e(0x206)],_0x8bc38b);}}async[_0x1ebeec(0x1d3)](_0x551d08){const _0x56ee19=_0x1ebeec;var _0x37dbe7,_0x1af5ec;const {text:_0x1e1223,unitId:_0x54376f}=_0x551d08,_0x360311=(_0x1af5ec=(_0x37dbe7=_0x1e1223[_0x56ee19(0x21b)])==null?void 0x0:_0x37dbe7[_0x56ee19(0x1cd)](_0xbd864a=>_0xbd864a['rangeType']===_0x355712[_0x56ee19(0x1d8)])[_0x56ee19(0x204)](_0x24bb7d=>_0x24bb7d['rangeId']))!=null?_0x1af5ec:[],_0x46cd63=JSON[_0x56ee19(0x1da)](_0x1e1223),_0x8202a6=_0x551d08[_0x56ee19(0x1ed)],_0x3cf6ee=_0x551d08['id'],_0x337145={'memberId':(await this[_0x56ee19(0x219)]['requireSession'](_0x54376f))[_0x56ee19(0x1dd)](),'unitId':_0x54376f,'threadId':_0x8202a6,'mention':_0x360311,'content':_0x46cd63,'replyId':_0x3cf6ee},_0x23aff4=await this[_0x56ee19(0x208)][_0x56ee19(0x21e)](_0x56ee19(0x1f5)+_0x54376f+'/edit',{'body':_0x337145});return!_0x23aff4['body'][_0x56ee19(0x1dc)]||_0x23aff4[_0x56ee19(0x1cf)][_0x56ee19(0x1dc)][_0x56ee19(0x1ea)]===0x1;}async['resolveComment'](_0x17d2a4){const _0x7c84c4=_0x1ebeec,{unitId:_0x522862}=_0x17d2a4,_0x11876a=_0x17d2a4[_0x7c84c4(0x1ed)],_0xdb98cc={'memberId':this[_0x7c84c4(0x220)][_0x7c84c4(0x20a)]()[_0x7c84c4(0x200)],'unitId':_0x522862,'threadId':_0x11876a,'solved':_0x17d2a4['resolved']?I[_0x7c84c4(0x1c9)]:I[_0x7c84c4(0x1eb)]},_0x4b8528=await this[_0x7c84c4(0x208)][_0x7c84c4(0x21e)](_0x7c84c4(0x1f5)+_0x522862+_0x7c84c4(0x20c),{'body':_0xdb98cc});return!_0x4b8528[_0x7c84c4(0x1cf)]['error']||_0x4b8528[_0x7c84c4(0x1cf)][_0x7c84c4(0x1dc)]['code']===0x1;}async[_0x1ebeec(0x1d5)](_0xe0a60a,_0x5b64f3,_0x5d787e,_0x6849d){const _0x2ea290=_0x1ebeec,_0x413ea={'memberId':(await this[_0x2ea290(0x219)]['requireSession'](_0xe0a60a))['getMemberID'](),'threadId':_0x5d787e,'replyId':_0x6849d,'unitId':_0xe0a60a},_0xb6ef78=await this['_httpService'][_0x2ea290(0x21e)](_0x2ea290(0x1f5)+_0xe0a60a+'/delete',{'body':_0x413ea});return!_0xb6ef78[_0x2ea290(0x1cf)]['error']||_0xb6ef78[_0x2ea290(0x1cf)][_0x2ea290(0x1dc)]['code']===0x1;}async[_0x1ebeec(0x1f0)](_0x5c81c2,_0x57d614,_0x124094){const _0x35b33b=_0x1ebeec,_0x3e297d={'unitId':_0x5c81c2,'threadId':_0x124094},_0x1f540b=await this['_httpService'][_0x35b33b(0x21e)](_0x35b33b(0x1f5)+_0x5c81c2+_0x35b33b(0x203),{'body':_0x3e297d}),_0x232b4a=_0x124094[_0x35b33b(0x204)](_0xd1ca3=>ee(_0x1f540b[_0x35b33b(0x1cf)]['comments'][_0xd1ca3],_0x5c81c2,_0x57d614))['filter'](Boolean);return Object[_0x35b33b(0x1f4)](_0x1f540b['body'][_0x35b33b(0x218)])[_0x35b33b(0x1f9)](_0x4a4490=>{const _0x369498=_0x35b33b;this[_0x369498(0x220)][_0x369498(0x1e3)](_0x4a4490);}),_0x232b4a;}[_0x1ebeec(0x211)](_0x33f25b){return{'id':_0x33f25b['id'],'threadId':_0x33f25b['threadId'],'ref':_0x33f25b['ref']};}};S=Q([b(0x0,_0x5b1114(_0x44202b)),b(0x1,_0x5b1114(_0x27743c)),b(0x2,_0x5b1114(_0x504872))],S);var re=Object[_0x1ebeec(0x1d0)],te=(_0xf894b3,_0x4c4e9c,_0x6ea4a3,_0x4e5227)=>{const _0x19260b=_0x1ebeec;for(var _0x5af636=_0x4e5227>0x1?void 0x0:_0x4e5227?re(_0x4c4e9c,_0x6ea4a3):_0x4c4e9c,_0x2a4ea2=_0xf894b3[_0x19260b(0x1c8)]-0x1,_0x1581c7;_0x2a4ea2>=0x0;_0x2a4ea2--)(_0x1581c7=_0xf894b3[_0x2a4ea2])&&(_0x5af636=_0x1581c7(_0x5af636)||_0x5af636);return _0x5af636;},M=(_0x731712,_0x404def)=>(_0x2dd236,_0x18d032)=>_0x404def(_0x2dd236,_0x18d032,_0x731712);let f=class extends _0x235f20{constructor(_0x1566db,_0x5aaf05){const _0x4a990d=_0x1ebeec;super(),this['_threadCommentDataSourceService']=_0x1566db,this[_0x4a990d(0x1de)]=_0x5aaf05,this['_initDataSource']();}[_0x1ebeec(0x1ee)](){const _0x5423a6=_0x1ebeec;this[_0x5423a6(0x214)][_0x5423a6(0x1d4)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x5423a6(0x21f)]=!0x1;}};f=te([M(0x0,_0x5b1ce4),M(0x1,_0x5b1114(S))],f);var se=Object['defineProperty'],oe=Object[_0x1ebeec(0x1d0)],ne=(_0x3cc3f5,_0x35adc4,_0x43690c)=>_0x35adc4 in _0x3cc3f5?se(_0x3cc3f5,_0x35adc4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x43690c}):_0x3cc3f5[_0x35adc4]=_0x43690c,ie=(_0x959023,_0xd5c245,_0x2cf4bc,_0x492d6e)=>{const _0x1d530f=_0x1ebeec;for(var _0x4ab28d=_0x492d6e>0x1?void 0x0:_0x492d6e?oe(_0xd5c245,_0x2cf4bc):_0xd5c245,_0x419ee1=_0x959023[_0x1d530f(0x1c8)]-0x1,_0x763aac;_0x419ee1>=0x0;_0x419ee1--)(_0x763aac=_0x959023[_0x419ee1])&&(_0x4ab28d=_0x763aac(_0x4ab28d)||_0x4ab28d);return _0x4ab28d;},N=(_0x34f2a1,_0x156dcc)=>(_0x41c232,_0x400982)=>_0x156dcc(_0x41c232,_0x400982,_0x34f2a1),$=(_0x5494fe,_0x51502f,_0x42d85e)=>ne(_0x5494fe,typeof _0x51502f!='symbol'?_0x51502f+'':_0x51502f,_0x42d85e);let g=class extends _0x1bdb37{constructor(_0x4e6ccf=O,_0x2b80db,_0x412cfb){const _0x28f2c0=_0x1ebeec;super(),this['_config']=_0x4e6ccf,this[_0x28f2c0(0x222)]=_0x2b80db,this[_0x28f2c0(0x216)]=_0x412cfb;const {..._0x225fe3}=_0x4ebb47({},O,this[_0x28f2c0(0x1cc)]);this[_0x28f2c0(0x216)][_0x28f2c0(0x1c7)](z,_0x225fe3);}['onStarting'](){const _0x576f12=_0x1ebeec;[[S],[f],[_]][_0x576f12(0x1f9)](_0x5ab9c2=>{const _0x3dac2e=_0x576f12;this[_0x3dac2e(0x222)]['add'](_0x5ab9c2);});}[_0x1ebeec(0x223)](){const _0x1414f1=_0x1ebeec;this['_injector']['get'](f),this[_0x1414f1(0x222)]['get'](_);}};$(g,_0x1ebeec(0x202),W),$(g,'type',_0x26b6b5[_0x1ebeec(0x1ce)]),g=ie([_0x3e5e37(_0x305dda,_0x34845c,_0x5499db),N(0x1,_0x5b1114(_0x304f84)),N(0x2,_0x3f1145)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x59ea57=_0x264e;function _0x264e(_0x359968,_0x411b3){const _0x7619d4=_0x7619();return _0x264e=function(_0x264ef0,_0x15444f){_0x264ef0=_0x264ef0-0x16e;let _0x2aaf03=_0x7619d4[_0x264ef0];return _0x2aaf03;},_0x264e(_0x359968,_0x411b3);}(function(_0x1f465c,_0x3b303){const _0xdc7ff7=_0x264e,_0x1dc9f3=_0x1f465c();while(!![]){try{const _0x538dba=parseInt(_0xdc7ff7(0x1b4))/0x1+parseInt(_0xdc7ff7(0x1ca))/0x2+parseInt(_0xdc7ff7(0x1b3))/0x3+parseInt(_0xdc7ff7(0x1bd))/0x4+-parseInt(_0xdc7ff7(0x1c4))/0x5+-parseInt(_0xdc7ff7(0x1b8))/0x6*(parseInt(_0xdc7ff7(0x1a1))/0x7)+-parseInt(_0xdc7ff7(0x174))/0x8*(-parseInt(_0xdc7ff7(0x172))/0x9);if(_0x538dba===_0x3b303)break;else _0x1dc9f3['push'](_0x1dc9f3['shift']());}catch(_0x483c7d){_0x1dc9f3['push'](_0x1dc9f3['shift']());}}}(_0x7619,0x4e0d8));import{CommentService as _0x3cd1f3,CollaborationSessionService as _0x250336,UniverCollaborationClientPlugin as _0x3f0de4}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x53e585}from'@univerjs-pro/license';import{dayjs as _0x30ebdb,UserManagerService as _0x11e1a7,Inject as _0x305425,Injector as _0x55b98c,Disposable as _0x3b5b07,CustomRangeType as _0x52cc13,UniverInstanceType as _0x1acf5a,DependentOn as _0x5f16f5,IConfigService as _0x1dbb73,Plugin as _0x465844,merge as _0x148cba}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x260dd3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43c617,IThreadCommentDataSourceService as _0x4e5a4c}from'@univerjs/thread-comment';import{bufferTime as _0x5376a3}from'rxjs';import{HTTPService as _0x4fcb94}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xf85ada=>(_0xf85ada[_0xf85ada[_0x59ea57(0x182)]=0x0]=_0x59ea57(0x182),_0xf85ada[_0xf85ada[_0x59ea57(0x1b2)]=0x1]=_0x59ea57(0x1b2),_0xf85ada[_0xf85ada[_0x59ea57(0x1d0)]=-0x1]=_0x59ea57(0x1d0),_0xf85ada))(I||{}),v=(_0x4ea0ac=>(_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1ba)]=0x0]=_0x59ea57(0x1ba),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1cc)]=0x1]=_0x59ea57(0x1cc),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1d1)]=0x2]=_0x59ea57(0x1d1),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1a5)]=0x3]=_0x59ea57(0x1a5),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x19e)]=0x4]=_0x59ea57(0x19e),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1a3)]=0x5]=_0x59ea57(0x1a3),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1d0)]=-0x1]='UNRECOGNIZED',_0x4ea0ac))(v||{});const y=_0x52eb61=>_0x30ebdb(new Date(+_0x52eb61))[_0x59ea57(0x176)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x463959,_0xc06963)=>{const _0x27d60f=_0x59ea57,_0x36c378=_0x463959[_0x27d60f(0x1cf)](_0x11e1a7),_0x344afa=_0x463959['get'](_0x4fcb94);_0xc06963[_0x27d60f(0x185)](_0xc43dd4=>{const _0x3aeff7=_0x27d60f;_0x36c378[_0x3aeff7(0x18b)](_0xc43dd4)&&_0xc06963[_0x3aeff7(0x195)](_0xc43dd4);}),_0xc06963[_0x27d60f(0x183)]&&(await _0x344afa[_0x27d60f(0x1cf)](_0x27d60f(0x1ab),{'params':{'userIDs':[..._0xc06963]}}))[_0x27d60f(0x19c)][_0x27d60f(0x197)]['forEach'](_0x58ee22=>{const _0x25ef9c=_0x27d60f;_0x58ee22&&_0x36c378[_0x25ef9c(0x1c1)](_0x58ee22);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2e5a42,_0x505724,_0x3a9326,_0x4cbdb0)=>{const _0x1ec23e=_0x59ea57;for(var _0x4c9b72=_0x4cbdb0>0x1?void 0x0:_0x4cbdb0?K(_0x505724,_0x3a9326):_0x505724,_0x5e4417=_0x2e5a42[_0x1ec23e(0x1b1)]-0x1,_0x19900f;_0x5e4417>=0x0;_0x5e4417--)(_0x19900f=_0x2e5a42[_0x5e4417])&&(_0x4c9b72=_0x19900f(_0x4c9b72)||_0x4c9b72);return _0x4c9b72;},p=(_0x266256,_0x149c7c)=>(_0x1a89f9,_0x2c6fe7)=>_0x149c7c(_0x1a89f9,_0x2c6fe7,_0x266256);let _=class extends _0x3b5b07{constructor(_0x180cbb,_0x4b7acb,_0x31e234,_0x519c8a){const _0xbe32b5=_0x59ea57;super(),this['_commentService']=_0x180cbb,this['_threadCommentModel']=_0x4b7acb,this[_0xbe32b5(0x1c5)]=_0x31e234,this[_0xbe32b5(0x1b0)]=_0x519c8a,this[_0xbe32b5(0x193)](),this[_0xbe32b5(0x17e)]();}[_0x59ea57(0x17e)](){const _0x1c963e=_0x59ea57;this['disposeWithMe'](this[_0x1c963e(0x1c6)][_0x1c963e(0x1c2)][_0x1c963e(0x171)](_0x5376a3(0x10))[_0x1c963e(0x1a4)](_0x2ab37e=>{const _0x351837=_0x1c963e,_0x279584=new Set();_0x2ab37e['forEach'](_0x267458=>{const _0x2dc0a6=_0x264e;switch(_0x267458['type']){case'add':{const _0x515725=_0x267458['payload'][_0x2dc0a6(0x17a)];_0x279584[_0x2dc0a6(0x17c)](_0x515725);break;}}}),B(this[_0x351837(0x1b0)],_0x279584);}));}[_0x59ea57(0x193)](){const _0x5538fc=_0x59ea57;this[_0x5538fc(0x1cd)](this[_0x5538fc(0x190)]['commentUpdate$'][_0x5538fc(0x1a4)](async _0x44f446=>{const _0xb80720=_0x5538fc;var _0xff2834,_0x4bd814,_0x465202,_0x37673f;const _0x58025a=(_0xff2834=this[_0xb80720(0x1c6)][_0xb80720(0x191)](_0x44f446[_0xb80720(0x1ce)])['find'](_0x43a2b0=>_0x43a2b0['threadId']===_0x44f446[_0xb80720(0x1aa)]))==null?void 0x0:_0xff2834[_0xb80720(0x199)];if(!_0x58025a)return;const {unitId:_0x1251e5,subUnitId:_0xdcb03c}=_0x58025a;switch(_0x44f446[_0xb80720(0x1a9)]&&this[_0xb80720(0x1c5)]['addUser'](_0x44f446[_0xb80720(0x1a9)]),_0x44f446['type']){case v[_0xb80720(0x1cc)]:break;case v[_0xb80720(0x1d1)]:{this[_0xb80720(0x1c6)][_0xb80720(0x1c8)](_0x1251e5,_0xdcb03c,{'unitId':_0x1251e5,'subUnitId':_0xdcb03c,'ref':'','id':_0x44f446[_0xb80720(0x1d3)],'dT':y(+_0x44f446['createTimestamp']),'threadId':_0x44f446[_0xb80720(0x1aa)],'personId':(_0x465202=(_0x4bd814=_0x44f446[_0xb80720(0x1a9)])==null?void 0x0:_0x4bd814['userID'])!=null?_0x465202:_0x44f446[_0xb80720(0x1bc)],'text':JSON['parse'](_0x44f446['content']),'parentId':_0x58025a['id']});break;}case v[_0xb80720(0x19e)]:{const _0x3a966d=this[_0xb80720(0x1c6)]['getComment'](_0x1251e5,_0xdcb03c,_0x44f446[_0xb80720(0x1d3)]);_0x3a966d&&_0x3a966d[_0xb80720(0x1af)]&&this[_0xb80720(0x1c6)][_0xb80720(0x192)](_0x1251e5,_0xdcb03c,_0x44f446[_0xb80720(0x1d3)]);break;}case v['Edit']:{this[_0xb80720(0x1c6)][_0xb80720(0x181)](_0x1251e5,_0xdcb03c,{'commentId':_0x44f446['replyId'],'text':JSON[_0xb80720(0x1c0)](_0x44f446[_0xb80720(0x1bb)])});break;}case v[_0xb80720(0x1a3)]:{const _0x4313cc=(_0x37673f=this[_0xb80720(0x1c6)][_0xb80720(0x191)](_0x44f446[_0xb80720(0x1ce)])[_0xb80720(0x1a6)](_0xb94a3c=>_0xb94a3c[_0xb80720(0x1aa)]===_0x44f446[_0xb80720(0x1aa)]))==null?void 0x0:_0x37673f[_0xb80720(0x199)];_0x4313cc&&this[_0xb80720(0x1c6)][_0xb80720(0x19f)](_0x1251e5,_0xdcb03c,_0x4313cc['id'],_0x44f446['solved']===I[_0xb80720(0x1b2)]);break;}}}));}};_=V([p(0x0,_0x305425(_0x3cd1f3)),p(0x1,_0x305425(_0x43c617)),p(0x2,_0x305425(_0x11e1a7)),p(0x3,_0x305425(_0x55b98c))],_);const z=_0x59ea57(0x18a),O={};var k=Object[_0x59ea57(0x1b7)],Q=(_0x4414ef,_0x418a93,_0x433852,_0x4d2d5b)=>{for(var _0x5043d0=_0x4d2d5b>0x1?void 0x0:_0x4d2d5b?k(_0x418a93,_0x433852):_0x418a93,_0x32e476=_0x4414ef['length']-0x1,_0x4f3393;_0x32e476>=0x0;_0x32e476--)(_0x4f3393=_0x4414ef[_0x32e476])&&(_0x5043d0=_0x4f3393(_0x5043d0)||_0x5043d0);return _0x5043d0;},b=(_0x2d3e20,_0x10368b)=>(_0x41b6cd,_0x11d852)=>_0x10368b(_0x41b6cd,_0x11d852,_0x2d3e20);function X(_0x3bd5bf,_0x1aae86){const _0x55de61=_0x59ea57,_0x8c3315=_0x3bd5bf[_0x55de61(0x1ae)][0x0];return{..._0x1aae86,'id':_0x8c3315['replyId'],'resolved':_0x3bd5bf[_0x55de61(0x18f)]===0x1,'dT':y(_0x8c3315[_0x55de61(0x1b9)]),'personId':_0x8c3315[_0x55de61(0x1bc)],'threadId':_0x8c3315[_0x55de61(0x1aa)]};}function ee(_0x2e6878,_0x25c9de,_0x2c3112){const _0x537dea=_0x59ea57;var _0x4a6bed,_0x1f3183;if(((_0x1f3183=(_0x4a6bed=_0x2e6878==null?void 0x0:_0x2e6878['replies'])==null?void 0x0:_0x4a6bed['length'])!=null?_0x1f3183:0x0)>0x0){const _0x13edb9=(_0x1547cd,_0x54a702)=>({'id':_0x1547cd['replyId'],'threadId':_0x1547cd[_0x537dea(0x1aa)],'dT':y(_0x1547cd[_0x537dea(0x1b9)]),'personId':_0x1547cd[_0x537dea(0x1bc)],'resolved':_0x2e6878[_0x537dea(0x18f)]===I[_0x537dea(0x1b2)],'unitId':_0x25c9de,'subUnitId':_0x2c3112,'text':JSON[_0x537dea(0x1c0)](_0x1547cd[_0x537dea(0x1bb)]),'parentId':_0x54a702}),_0x337bc1=_0x13edb9(_0x2e6878[_0x537dea(0x1ae)][0x0]);return{..._0x337bc1,'children':_0x2e6878[_0x537dea(0x1ae)][_0x537dea(0x1ad)](0x1)[_0x537dea(0x1ac)](_0x482275=>_0x13edb9(_0x482275,_0x337bc1['id']))};}return null;}let S=class{constructor(_0xd4a196,_0x2e6c75,_0x32deab){const _0x5ceab4=_0x59ea57;this[_0x5ceab4(0x16f)]=_0xd4a196,this[_0x5ceab4(0x1c5)]=_0x2e6c75,this['_sessionService']=_0x32deab;}async[_0x59ea57(0x1c8)](_0x509388){const _0x4ce1db=_0x59ea57;var _0x190b80,_0x5d7e9b;const {parentId:_0x40412d,unitId:_0x39f96b,text:_0x5450a4,threadId:_0x2c5143}=_0x509388,_0xb94365=(_0x5d7e9b=(_0x190b80=_0x5450a4['customRanges'])==null?void 0x0:_0x190b80[_0x4ce1db(0x17b)](_0x87eb07=>_0x87eb07['rangeType']===_0x52cc13[_0x4ce1db(0x186)])['map'](_0x7a4d19=>_0x7a4d19[_0x4ce1db(0x189)]))!=null?_0x5d7e9b:[],_0x2917ca=JSON[_0x4ce1db(0x1c3)](_0x5450a4),_0x37b411=(await this[_0x4ce1db(0x1be)][_0x4ce1db(0x196)](_0x39f96b))[_0x4ce1db(0x1b5)]();if(_0x40412d){const _0x3cb96d={'memberId':_0x37b411,'unitId':_0x39f96b,'content':_0x2917ca,'mention':_0xb94365,'threadId':_0x2c5143},_0x1550cb=(await this['_httpService'][_0x4ce1db(0x184)](_0x4ce1db(0x1cb)+_0x39f96b+_0x4ce1db(0x1b6),{'body':_0x3cb96d}))[_0x4ce1db(0x19c)][_0x4ce1db(0x178)];return{..._0x509388,'id':_0x1550cb[_0x4ce1db(0x1d3)],'dT':_0x30ebdb(+_0x1550cb[_0x4ce1db(0x1b9)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x1550cb[_0x4ce1db(0x1bc)]};}else{const _0x39a8fe={'memberId':_0x37b411,'unitId':_0x39f96b,'content':_0x2917ca,'mention':_0xb94365},_0x296fab=await this['_httpService'][_0x4ce1db(0x184)](_0x4ce1db(0x1cb)+_0x39f96b+_0x4ce1db(0x1c9),{'body':_0x39a8fe});return X(_0x296fab[_0x4ce1db(0x19c)][_0x4ce1db(0x17d)],_0x509388);}}async[_0x59ea57(0x181)](_0x5a2659){const _0x4f3961=_0x59ea57;var _0x26b8c6,_0x2fc754;const {text:_0x54fae8,unitId:_0x33630b}=_0x5a2659,_0x635e11=(_0x2fc754=(_0x26b8c6=_0x54fae8[_0x4f3961(0x175)])==null?void 0x0:_0x26b8c6[_0x4f3961(0x17b)](_0x358c60=>_0x358c60[_0x4f3961(0x1a2)]===_0x52cc13[_0x4f3961(0x186)])[_0x4f3961(0x1ac)](_0x276776=>_0x276776[_0x4f3961(0x189)]))!=null?_0x2fc754:[],_0x339f28=JSON[_0x4f3961(0x1c3)](_0x54fae8),_0x11e090=_0x5a2659[_0x4f3961(0x1aa)],_0x17c5e7=_0x5a2659['id'],_0x4f4296={'memberId':(await this['_sessionService'][_0x4f3961(0x196)](_0x33630b))['getMemberID'](),'unitId':_0x33630b,'threadId':_0x11e090,'mention':_0x635e11,'content':_0x339f28,'replyId':_0x17c5e7},_0x296ed3=await this['_httpService'][_0x4f3961(0x184)](_0x4f3961(0x1cb)+_0x33630b+_0x4f3961(0x180),{'body':_0x4f4296});return!_0x296ed3['body']['error']||_0x296ed3['body']['error'][_0x4f3961(0x1c7)]===0x1;}async['resolveComment'](_0xd27023){const _0x3f427d=_0x59ea57,{unitId:_0x59457b}=_0xd27023,_0x46e734=_0xd27023[_0x3f427d(0x1aa)],_0x50a8f7={'memberId':this[_0x3f427d(0x1c5)][_0x3f427d(0x19d)]()[_0x3f427d(0x173)],'unitId':_0x59457b,'threadId':_0x46e734,'solved':_0xd27023['resolved']?I[_0x3f427d(0x1b2)]:I[_0x3f427d(0x182)]},_0x4e4ec7=await this[_0x3f427d(0x16f)]['post'](_0x3f427d(0x1cb)+_0x59457b+'/solved',{'body':_0x50a8f7});return!_0x4e4ec7[_0x3f427d(0x19c)]['error']||_0x4e4ec7[_0x3f427d(0x19c)]['error'][_0x3f427d(0x1c7)]===0x1;}async[_0x59ea57(0x192)](_0x1e31d1,_0x1c21ed,_0x258733,_0x1e8ee2){const _0xeafe29=_0x59ea57,_0x267288={'memberId':(await this['_sessionService']['requireSession'](_0x1e31d1))[_0xeafe29(0x1b5)](),'threadId':_0x258733,'replyId':_0x1e8ee2,'unitId':_0x1e31d1},_0x282b85=await this['_httpService'][_0xeafe29(0x184)](_0xeafe29(0x1cb)+_0x1e31d1+_0xeafe29(0x18c),{'body':_0x267288});return!_0x282b85[_0xeafe29(0x19c)][_0xeafe29(0x179)]||_0x282b85[_0xeafe29(0x19c)][_0xeafe29(0x179)]['code']===0x1;}async[_0x59ea57(0x170)](_0xecbe23,_0x139476,_0xc2f44e){const _0x31b2f8=_0x59ea57,_0x5445ae={'unitId':_0xecbe23,'threadId':_0xc2f44e},_0xc88335=await this['_httpService'][_0x31b2f8(0x184)]('/universer-api/comment/unit/'+_0xecbe23+_0x31b2f8(0x187),{'body':_0x5445ae}),_0x44e8a0=_0xc2f44e[_0x31b2f8(0x1ac)](_0x45a7c1=>ee(_0xc88335[_0x31b2f8(0x19c)][_0x31b2f8(0x18d)][_0x45a7c1],_0xecbe23,_0x139476))['filter'](Boolean);return Object['values'](_0xc88335['body'][_0x31b2f8(0x197)])[_0x31b2f8(0x185)](_0x33241c=>{const _0x334e38=_0x31b2f8;this['_userService'][_0x334e38(0x1c1)](_0x33241c);}),_0x44e8a0;}[_0x59ea57(0x19b)](_0x2accbb){const _0x5c4543=_0x59ea57;return{'id':_0x2accbb['id'],'threadId':_0x2accbb[_0x5c4543(0x1aa)],'ref':_0x2accbb[_0x5c4543(0x17f)]};}};function _0x7619(){const _0xb92e9c=['user','threadId','/universer-api/user/list','map','slice','replies','parentId','_injector','length','Solved','648744pchXYX','241366sZmiDl','getMemberID','/reply','getOwnPropertyDescriptor','192150lcNakw','createTimestamp','Unknown','content','userId','1897176okHVAa','_sessionService','type','parse','addUser','commentUpdate$','stringify','2814485mmSRJs','_userService','_threadCommentModel','code','addComment','/add','465450ZLrGIX','/universer-api/comment/unit/','Add','disposeWithMe','unitId','get','UNRECOGNIZED','Reply','onStarting','replyId','defineProperty','_httpService','listComments','pipe','632187rayOhg','userID','8SZaTuj','customRanges','format','_configService','reply','error','personId','filter','add','comment','_initUserSync','ref','/edit','updateComment','OpenOrReOpen','size','post','forEach','COMMENT','/list','symbol','rangeId','thread-comment-data-source.config','getUser','/delete','comments','pluginName','solved','_commentService','getUnit','deleteComment','_init','_threadCommentDataSourceService','delete','requireSession','users','_threadCommentDataSource','root','syncUpdateMutationToColla','saveCommentToSnapshot','body','getCurrentUser','Delete','resolveComment','_initDataSource','77XeUbbE','rangeType','Solve','subscribe','Edit','find','_config','UNIVER_UNKNOWN'];_0x7619=function(){return _0xb92e9c;};return _0x7619();}S=Q([b(0x0,_0x305425(_0x4fcb94)),b(0x1,_0x305425(_0x11e1a7)),b(0x2,_0x305425(_0x250336))],S);var re=Object[_0x59ea57(0x1b7)],te=(_0x316dfd,_0x570ad9,_0x291029,_0x10a655)=>{const _0x56e817=_0x59ea57;for(var _0xa60318=_0x10a655>0x1?void 0x0:_0x10a655?re(_0x570ad9,_0x291029):_0x570ad9,_0x210d36=_0x316dfd[_0x56e817(0x1b1)]-0x1,_0x5b6d7c;_0x210d36>=0x0;_0x210d36--)(_0x5b6d7c=_0x316dfd[_0x210d36])&&(_0xa60318=_0x5b6d7c(_0xa60318)||_0xa60318);return _0xa60318;},M=(_0x5a8ffe,_0x7b1d7c)=>(_0x730be2,_0x33f244)=>_0x7b1d7c(_0x730be2,_0x33f244,_0x5a8ffe);let f=class extends _0x3b5b07{constructor(_0x35e734,_0x207612){const _0x1c32a9=_0x59ea57;super(),this[_0x1c32a9(0x194)]=_0x35e734,this[_0x1c32a9(0x198)]=_0x207612,this[_0x1c32a9(0x1a0)]();}[_0x59ea57(0x1a0)](){const _0x2399f4=_0x59ea57;this[_0x2399f4(0x194)]['dataSource']=this[_0x2399f4(0x198)],this['_threadCommentDataSourceService'][_0x2399f4(0x19a)]=!0x1;}};f=te([M(0x0,_0x4e5a4c),M(0x1,_0x305425(S))],f);var se=Object[_0x59ea57(0x16e)],oe=Object[_0x59ea57(0x1b7)],ne=(_0x585d99,_0xb0bfd6,_0x4e5e26)=>_0xb0bfd6 in _0x585d99?se(_0x585d99,_0xb0bfd6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e5e26}):_0x585d99[_0xb0bfd6]=_0x4e5e26,ie=(_0x57f88b,_0x40ff86,_0x580d67,_0xabce1)=>{const _0x51fd5b=_0x59ea57;for(var _0x95fdfd=_0xabce1>0x1?void 0x0:_0xabce1?oe(_0x40ff86,_0x580d67):_0x40ff86,_0x13fe48=_0x57f88b[_0x51fd5b(0x1b1)]-0x1,_0x82b9e0;_0x13fe48>=0x0;_0x13fe48--)(_0x82b9e0=_0x57f88b[_0x13fe48])&&(_0x95fdfd=_0x82b9e0(_0x95fdfd)||_0x95fdfd);return _0x95fdfd;},N=(_0x4b1065,_0x55c98b)=>(_0x563a7e,_0x53df8c)=>_0x55c98b(_0x563a7e,_0x53df8c,_0x4b1065),$=(_0x3f0ec9,_0x4d5904,_0x3f5e43)=>ne(_0x3f0ec9,typeof _0x4d5904!=_0x59ea57(0x188)?_0x4d5904+'':_0x4d5904,_0x3f5e43);let g=class extends _0x465844{constructor(_0x414b94=O,_0x4ba7ed,_0x6b66d6){const _0x128580=_0x59ea57;super(),this[_0x128580(0x1a7)]=_0x414b94,this[_0x128580(0x1b0)]=_0x4ba7ed,this[_0x128580(0x177)]=_0x6b66d6;const {..._0x3b932c}=_0x148cba({},O,this[_0x128580(0x1a7)]);this['_configService']['setConfig'](z,_0x3b932c);}[_0x59ea57(0x1d2)](){[[S],[f],[_]]['forEach'](_0x147e24=>{const _0x4e12ee=_0x264e;this['_injector'][_0x4e12ee(0x17c)](_0x147e24);});}['onReady'](){const _0x4ee148=_0x59ea57;this[_0x4ee148(0x1b0)][_0x4ee148(0x1cf)](f),this[_0x4ee148(0x1b0)][_0x4ee148(0x1cf)](_);}};$(g,_0x59ea57(0x18e),W),$(g,_0x59ea57(0x1bf),_0x1acf5a[_0x59ea57(0x1a8)]),g=ie([_0x5f16f5(_0x260dd3,_0x3f0de4,_0x53e585),N(0x1,_0x305425(_0x55b98c)),N(0x2,_0x1dbb73)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1ebeec=_0x5475;(function(_0x5ac0e8,_0x1dd9f3){const _0x38ec79=_0x5475,_0x443fd8=_0x5ac0e8();while(!![]){try{const _0x49e857=-parseInt(_0x38ec79(0x21d))/0x1+parseInt(_0x38ec79(0x1e8))/0x2*(parseInt(_0x38ec79(0x1fb))/0x3)+parseInt(_0x38ec79(0x1e7))/0x4+-parseInt(_0x38ec79(0x207))/0x5+parseInt(_0x38ec79(0x1e1))/0x6+-parseInt(_0x38ec79(0x1df))/0x7+parseInt(_0x38ec79(0x1f2))/0x8;if(_0x49e857===_0x1dd9f3)break;else _0x443fd8['push'](_0x443fd8['shift']());}catch(_0x44a183){_0x443fd8['push'](_0x443fd8['shift']());}}}(_0x5c5a,0xa90bb));import{CommentService as _0x1f6c58,CollaborationSessionService as _0x504872,UniverCollaborationClientPlugin as _0x34845c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5499db}from'@univerjs-pro/license';import{dayjs as _0x4976ce,UserManagerService as _0x27743c,Inject as _0x5b1114,Injector as _0x304f84,Disposable as _0x235f20,CustomRangeType as _0x355712,UniverInstanceType as _0x26b6b5,DependentOn as _0x3e5e37,IConfigService as _0x3f1145,Plugin as _0x1bdb37,merge as _0x4ebb47}from'@univerjs/core';function _0x5c5a(){const _0x599780=['user','values','/universer-api/comment/unit/','Delete','subscribe','Reply','forEach','createTimestamp','36903uMlpUe','getUnit','requireSession','resolveComment','add','userID','/reply','pluginName','/list','map','thread-comment-data-source.config','comment','118980VqCiPM','_httpService','format','getCurrentUser','Solve','/solved','replyId','root','getUser','solved','saveCommentToSnapshot','_initUserSync','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','replies','_configService','_init','users','_sessionService','YYYY/MM/DD\x20HH:mm','customRanges','getComment','950893MlWCRP','post','syncUpdateMutationToColla','_userService','type','_injector','onReady','_threadCommentModel','setConfig','length','Solved','size','get','_config','filter','UNIVER_UNKNOWN','body','getOwnPropertyDescriptor','parse','personId','updateComment','dataSource','deleteComment','/universer-api/user/list','addComment','COMMENT','content','stringify','userId','error','getMemberID','_threadCommentDataSource','9657298qFnhmA','Edit','6398526SBnUlG','disposeWithMe','addUser','find','Unknown','_commentService','5006576GPjDNK','14hmNIUf','parentId','code','OpenOrReOpen','UNRECOGNIZED','threadId','_initDataSource','reply','listComments','commentUpdate$','5140336edVlmL'];_0x5c5a=function(){return _0x599780;};return _0x5c5a();}import{UniverThreadCommentUIPlugin as _0x305dda}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1ae424,IThreadCommentDataSourceService as _0x5b1ce4}from'@univerjs/thread-comment';import{bufferTime as _0x4f4405}from'rxjs';import{HTTPService as _0x44202b}from'@univerjs/network';const W=_0x1ebeec(0x213);var I=(_0x464222=>(_0x464222[_0x464222['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x464222[_0x464222['Solved']=0x1]=_0x1ebeec(0x1c9),_0x464222[_0x464222[_0x1ebeec(0x1ec)]=-0x1]='UNRECOGNIZED',_0x464222))(I||{}),v=(_0xb1ae7a=>(_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x1e5)]=0x0]='Unknown',_0xb1ae7a[_0xb1ae7a['Add']=0x1]='Add',_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x1f8)]=0x2]=_0x1ebeec(0x1f8),_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x1e0)]=0x3]=_0x1ebeec(0x1e0),_0xb1ae7a[_0xb1ae7a['Delete']=0x4]=_0x1ebeec(0x1f6),_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x20b)]=0x5]=_0x1ebeec(0x20b),_0xb1ae7a[_0xb1ae7a[_0x1ebeec(0x1ec)]=-0x1]=_0x1ebeec(0x1ec),_0xb1ae7a))(v||{});function _0x5475(_0x23ca5e,_0x3823d6){const _0x5c5a75=_0x5c5a();return _0x5475=function(_0x5475d8,_0x1ed63f){_0x5475d8=_0x5475d8-0x1c6;let _0x56ff3d=_0x5c5a75[_0x5475d8];return _0x56ff3d;},_0x5475(_0x23ca5e,_0x3823d6);}const y=_0x93684b=>_0x4976ce(new Date(+_0x93684b))[_0x1ebeec(0x209)](_0x1ebeec(0x21a)),B=async(_0x2236a4,_0x26b189)=>{const _0x5a0aa3=_0x1ebeec,_0xfd806d=_0x2236a4[_0x5a0aa3(0x1cb)](_0x27743c),_0x27e736=_0x2236a4[_0x5a0aa3(0x1cb)](_0x44202b);_0x26b189[_0x5a0aa3(0x1f9)](_0x5730cf=>{const _0x555ef4=_0x5a0aa3;_0xfd806d[_0x555ef4(0x20f)](_0x5730cf)&&_0x26b189['delete'](_0x5730cf);}),_0x26b189[_0x5a0aa3(0x1ca)]&&(await _0x27e736[_0x5a0aa3(0x1cb)](_0x5a0aa3(0x1d6),{'params':{'userIDs':[..._0x26b189]}}))[_0x5a0aa3(0x1cf)]['users'][_0x5a0aa3(0x1f9)](_0x2ad441=>{const _0x2a6bbc=_0x5a0aa3;_0x2ad441&&_0xfd806d[_0x2a6bbc(0x1e3)](_0x2ad441);});};var K=Object[_0x1ebeec(0x1d0)],V=(_0x3c9e85,_0x32ed69,_0x1a4663,_0x135aa1)=>{const _0x327a45=_0x1ebeec;for(var _0x2e23a8=_0x135aa1>0x1?void 0x0:_0x135aa1?K(_0x32ed69,_0x1a4663):_0x32ed69,_0x5be39b=_0x3c9e85[_0x327a45(0x1c8)]-0x1,_0x3aca5f;_0x5be39b>=0x0;_0x5be39b--)(_0x3aca5f=_0x3c9e85[_0x5be39b])&&(_0x2e23a8=_0x3aca5f(_0x2e23a8)||_0x2e23a8);return _0x2e23a8;},p=(_0x4565cc,_0x25d65c)=>(_0x49a79c,_0x3008ee)=>_0x25d65c(_0x49a79c,_0x3008ee,_0x4565cc);let _=class extends _0x235f20{constructor(_0x13960,_0x515205,_0x11c552,_0x1f7cd8){const _0x5a938f=_0x1ebeec;super(),this[_0x5a938f(0x1e6)]=_0x13960,this[_0x5a938f(0x1c6)]=_0x515205,this[_0x5a938f(0x220)]=_0x11c552,this[_0x5a938f(0x222)]=_0x1f7cd8,this['_init'](),this[_0x5a938f(0x212)]();}[_0x1ebeec(0x212)](){const _0x593313=_0x1ebeec;this[_0x593313(0x1e2)](this[_0x593313(0x1c6)][_0x593313(0x1f1)]['pipe'](_0x4f4405(0x10))[_0x593313(0x1f7)](_0xfae94d=>{const _0x3fa5ea=_0x593313,_0x8fdcf8=new Set();_0xfae94d[_0x3fa5ea(0x1f9)](_0x3dae33=>{const _0x25abab=_0x3fa5ea;switch(_0x3dae33['type']){case _0x25abab(0x1ff):{const _0x249728=_0x3dae33['payload'][_0x25abab(0x1d2)];_0x8fdcf8['add'](_0x249728);break;}}}),B(this[_0x3fa5ea(0x222)],_0x8fdcf8);}));}[_0x1ebeec(0x217)](){const _0x27cddb=_0x1ebeec;this[_0x27cddb(0x1e2)](this[_0x27cddb(0x1e6)]['commentUpdate$'][_0x27cddb(0x1f7)](async _0x3a4d5a=>{const _0xeaeb04=_0x27cddb;var _0x3464bc,_0x30309a,_0x2c1aca,_0x1b9c7b;const _0x1f273f=(_0x3464bc=this[_0xeaeb04(0x1c6)][_0xeaeb04(0x1fc)](_0x3a4d5a['unitId'])[_0xeaeb04(0x1e4)](_0x2a487f=>_0x2a487f[_0xeaeb04(0x1ed)]===_0x3a4d5a[_0xeaeb04(0x1ed)]))==null?void 0x0:_0x3464bc[_0xeaeb04(0x20e)];if(!_0x1f273f)return;const {unitId:_0x2064b3,subUnitId:_0x2d39a0}=_0x1f273f;switch(_0x3a4d5a[_0xeaeb04(0x1f3)]&&this['_userService'][_0xeaeb04(0x1e3)](_0x3a4d5a['user']),_0x3a4d5a[_0xeaeb04(0x221)]){case v['Add']:break;case v[_0xeaeb04(0x1f8)]:{this[_0xeaeb04(0x1c6)][_0xeaeb04(0x1d7)](_0x2064b3,_0x2d39a0,{'unitId':_0x2064b3,'subUnitId':_0x2d39a0,'ref':'','id':_0x3a4d5a[_0xeaeb04(0x20d)],'dT':y(+_0x3a4d5a[_0xeaeb04(0x1fa)]),'threadId':_0x3a4d5a[_0xeaeb04(0x1ed)],'personId':(_0x2c1aca=(_0x30309a=_0x3a4d5a[_0xeaeb04(0x1f3)])==null?void 0x0:_0x30309a[_0xeaeb04(0x200)])!=null?_0x2c1aca:_0x3a4d5a[_0xeaeb04(0x1db)],'text':JSON[_0xeaeb04(0x1d1)](_0x3a4d5a[_0xeaeb04(0x1d9)]),'parentId':_0x1f273f['id']});break;}case v[_0xeaeb04(0x1f6)]:{const _0x1affaa=this['_threadCommentModel'][_0xeaeb04(0x21c)](_0x2064b3,_0x2d39a0,_0x3a4d5a[_0xeaeb04(0x20d)]);_0x1affaa&&_0x1affaa[_0xeaeb04(0x1e9)]&&this[_0xeaeb04(0x1c6)]['deleteComment'](_0x2064b3,_0x2d39a0,_0x3a4d5a[_0xeaeb04(0x20d)]);break;}case v['Edit']:{this[_0xeaeb04(0x1c6)][_0xeaeb04(0x1d3)](_0x2064b3,_0x2d39a0,{'commentId':_0x3a4d5a[_0xeaeb04(0x20d)],'text':JSON[_0xeaeb04(0x1d1)](_0x3a4d5a[_0xeaeb04(0x1d9)])});break;}case v[_0xeaeb04(0x20b)]:{const _0x48e008=(_0x1b9c7b=this[_0xeaeb04(0x1c6)]['getUnit'](_0x3a4d5a['unitId'])[_0xeaeb04(0x1e4)](_0x13d12f=>_0x13d12f[_0xeaeb04(0x1ed)]===_0x3a4d5a[_0xeaeb04(0x1ed)]))==null?void 0x0:_0x1b9c7b[_0xeaeb04(0x20e)];_0x48e008&&this['_threadCommentModel'][_0xeaeb04(0x1fe)](_0x2064b3,_0x2d39a0,_0x48e008['id'],_0x3a4d5a[_0xeaeb04(0x210)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x5b1114(_0x1f6c58)),p(0x1,_0x5b1114(_0x1ae424)),p(0x2,_0x5b1114(_0x27743c)),p(0x3,_0x5b1114(_0x304f84))],_);const z=_0x1ebeec(0x205),O={};var k=Object[_0x1ebeec(0x1d0)],Q=(_0x4d3120,_0x56219d,_0x52e629,_0x12f9f7)=>{const _0x498c32=_0x1ebeec;for(var _0x1e2d99=_0x12f9f7>0x1?void 0x0:_0x12f9f7?k(_0x56219d,_0x52e629):_0x56219d,_0x39c0c3=_0x4d3120[_0x498c32(0x1c8)]-0x1,_0x3e1e6f;_0x39c0c3>=0x0;_0x39c0c3--)(_0x3e1e6f=_0x4d3120[_0x39c0c3])&&(_0x1e2d99=_0x3e1e6f(_0x1e2d99)||_0x1e2d99);return _0x1e2d99;},b=(_0x17d262,_0x144e4a)=>(_0xbba05b,_0x1a2d83)=>_0x144e4a(_0xbba05b,_0x1a2d83,_0x17d262);function X(_0xfe1494,_0x4d17d3){const _0x1e0dfa=_0x1ebeec,_0x2f06ea=_0xfe1494['replies'][0x0];return{..._0x4d17d3,'id':_0x2f06ea[_0x1e0dfa(0x20d)],'resolved':_0xfe1494['solved']===0x1,'dT':y(_0x2f06ea[_0x1e0dfa(0x1fa)]),'personId':_0x2f06ea['userId'],'threadId':_0x2f06ea[_0x1e0dfa(0x1ed)]};}function ee(_0x2c12ff,_0x14feb3,_0x4caa87){const _0x3dae58=_0x1ebeec;var _0x392c76,_0x2bb3e3;if(((_0x2bb3e3=(_0x392c76=_0x2c12ff==null?void 0x0:_0x2c12ff[_0x3dae58(0x215)])==null?void 0x0:_0x392c76['length'])!=null?_0x2bb3e3:0x0)>0x0){const _0x409538=(_0x5b1863,_0x558c71)=>({'id':_0x5b1863[_0x3dae58(0x20d)],'threadId':_0x5b1863[_0x3dae58(0x1ed)],'dT':y(_0x5b1863[_0x3dae58(0x1fa)]),'personId':_0x5b1863[_0x3dae58(0x1db)],'resolved':_0x2c12ff['solved']===I[_0x3dae58(0x1c9)],'unitId':_0x14feb3,'subUnitId':_0x4caa87,'text':JSON['parse'](_0x5b1863[_0x3dae58(0x1d9)]),'parentId':_0x558c71}),_0x59e06b=_0x409538(_0x2c12ff['replies'][0x0]);return{..._0x59e06b,'children':_0x2c12ff['replies']['slice'](0x1)[_0x3dae58(0x204)](_0x40a8a7=>_0x409538(_0x40a8a7,_0x59e06b['id']))};}return null;}let S=class{constructor(_0x44135f,_0x5eed35,_0x3b60be){const _0x2609b1=_0x1ebeec;this['_httpService']=_0x44135f,this['_userService']=_0x5eed35,this[_0x2609b1(0x219)]=_0x3b60be;}async[_0x1ebeec(0x1d7)](_0x8bc38b){const _0xfad78e=_0x1ebeec;var _0x37436e,_0x9a8707;const {parentId:_0x3f2ae5,unitId:_0x134922,text:_0x48d726,threadId:_0x18da6b}=_0x8bc38b,_0x40f900=(_0x9a8707=(_0x37436e=_0x48d726[_0xfad78e(0x21b)])==null?void 0x0:_0x37436e[_0xfad78e(0x1cd)](_0x3076d8=>_0x3076d8['rangeType']===_0x355712[_0xfad78e(0x1d8)])['map'](_0x279ed5=>_0x279ed5['rangeId']))!=null?_0x9a8707:[],_0x262413=JSON[_0xfad78e(0x1da)](_0x48d726),_0xd0663d=(await this['_sessionService'][_0xfad78e(0x1fd)](_0x134922))[_0xfad78e(0x1dd)]();if(_0x3f2ae5){const _0x5afc3e={'memberId':_0xd0663d,'unitId':_0x134922,'content':_0x262413,'mention':_0x40f900,'threadId':_0x18da6b},_0x51aae4=(await this[_0xfad78e(0x208)][_0xfad78e(0x21e)](_0xfad78e(0x1f5)+_0x134922+_0xfad78e(0x201),{'body':_0x5afc3e}))[_0xfad78e(0x1cf)][_0xfad78e(0x1ef)];return{..._0x8bc38b,'id':_0x51aae4['replyId'],'dT':_0x4976ce(+_0x51aae4['createTimestamp'])[_0xfad78e(0x209)](_0xfad78e(0x21a)),'personId':_0x51aae4[_0xfad78e(0x1db)]};}else{const _0x30f488={'memberId':_0xd0663d,'unitId':_0x134922,'content':_0x262413,'mention':_0x40f900},_0x17647a=await this[_0xfad78e(0x208)][_0xfad78e(0x21e)](_0xfad78e(0x1f5)+_0x134922+'/add',{'body':_0x30f488});return X(_0x17647a[_0xfad78e(0x1cf)][_0xfad78e(0x206)],_0x8bc38b);}}async[_0x1ebeec(0x1d3)](_0x551d08){const _0x56ee19=_0x1ebeec;var _0x37dbe7,_0x1af5ec;const {text:_0x1e1223,unitId:_0x54376f}=_0x551d08,_0x360311=(_0x1af5ec=(_0x37dbe7=_0x1e1223[_0x56ee19(0x21b)])==null?void 0x0:_0x37dbe7[_0x56ee19(0x1cd)](_0xbd864a=>_0xbd864a['rangeType']===_0x355712[_0x56ee19(0x1d8)])[_0x56ee19(0x204)](_0x24bb7d=>_0x24bb7d['rangeId']))!=null?_0x1af5ec:[],_0x46cd63=JSON[_0x56ee19(0x1da)](_0x1e1223),_0x8202a6=_0x551d08[_0x56ee19(0x1ed)],_0x3cf6ee=_0x551d08['id'],_0x337145={'memberId':(await this[_0x56ee19(0x219)]['requireSession'](_0x54376f))[_0x56ee19(0x1dd)](),'unitId':_0x54376f,'threadId':_0x8202a6,'mention':_0x360311,'content':_0x46cd63,'replyId':_0x3cf6ee},_0x23aff4=await this[_0x56ee19(0x208)][_0x56ee19(0x21e)](_0x56ee19(0x1f5)+_0x54376f+'/edit',{'body':_0x337145});return!_0x23aff4['body'][_0x56ee19(0x1dc)]||_0x23aff4[_0x56ee19(0x1cf)][_0x56ee19(0x1dc)][_0x56ee19(0x1ea)]===0x1;}async['resolveComment'](_0x17d2a4){const _0x7c84c4=_0x1ebeec,{unitId:_0x522862}=_0x17d2a4,_0x11876a=_0x17d2a4[_0x7c84c4(0x1ed)],_0xdb98cc={'memberId':this[_0x7c84c4(0x220)][_0x7c84c4(0x20a)]()[_0x7c84c4(0x200)],'unitId':_0x522862,'threadId':_0x11876a,'solved':_0x17d2a4['resolved']?I[_0x7c84c4(0x1c9)]:I[_0x7c84c4(0x1eb)]},_0x4b8528=await this[_0x7c84c4(0x208)][_0x7c84c4(0x21e)](_0x7c84c4(0x1f5)+_0x522862+_0x7c84c4(0x20c),{'body':_0xdb98cc});return!_0x4b8528[_0x7c84c4(0x1cf)]['error']||_0x4b8528[_0x7c84c4(0x1cf)][_0x7c84c4(0x1dc)]['code']===0x1;}async[_0x1ebeec(0x1d5)](_0xe0a60a,_0x5b64f3,_0x5d787e,_0x6849d){const _0x2ea290=_0x1ebeec,_0x413ea={'memberId':(await this[_0x2ea290(0x219)]['requireSession'](_0xe0a60a))['getMemberID'](),'threadId':_0x5d787e,'replyId':_0x6849d,'unitId':_0xe0a60a},_0xb6ef78=await this['_httpService'][_0x2ea290(0x21e)](_0x2ea290(0x1f5)+_0xe0a60a+'/delete',{'body':_0x413ea});return!_0xb6ef78[_0x2ea290(0x1cf)]['error']||_0xb6ef78[_0x2ea290(0x1cf)][_0x2ea290(0x1dc)]['code']===0x1;}async[_0x1ebeec(0x1f0)](_0x5c81c2,_0x57d614,_0x124094){const _0x35b33b=_0x1ebeec,_0x3e297d={'unitId':_0x5c81c2,'threadId':_0x124094},_0x1f540b=await this['_httpService'][_0x35b33b(0x21e)](_0x35b33b(0x1f5)+_0x5c81c2+_0x35b33b(0x203),{'body':_0x3e297d}),_0x232b4a=_0x124094[_0x35b33b(0x204)](_0xd1ca3=>ee(_0x1f540b[_0x35b33b(0x1cf)]['comments'][_0xd1ca3],_0x5c81c2,_0x57d614))['filter'](Boolean);return Object[_0x35b33b(0x1f4)](_0x1f540b['body'][_0x35b33b(0x218)])[_0x35b33b(0x1f9)](_0x4a4490=>{const _0x369498=_0x35b33b;this[_0x369498(0x220)][_0x369498(0x1e3)](_0x4a4490);}),_0x232b4a;}[_0x1ebeec(0x211)](_0x33f25b){return{'id':_0x33f25b['id'],'threadId':_0x33f25b['threadId'],'ref':_0x33f25b['ref']};}};S=Q([b(0x0,_0x5b1114(_0x44202b)),b(0x1,_0x5b1114(_0x27743c)),b(0x2,_0x5b1114(_0x504872))],S);var re=Object[_0x1ebeec(0x1d0)],te=(_0xf894b3,_0x4c4e9c,_0x6ea4a3,_0x4e5227)=>{const _0x19260b=_0x1ebeec;for(var _0x5af636=_0x4e5227>0x1?void 0x0:_0x4e5227?re(_0x4c4e9c,_0x6ea4a3):_0x4c4e9c,_0x2a4ea2=_0xf894b3[_0x19260b(0x1c8)]-0x1,_0x1581c7;_0x2a4ea2>=0x0;_0x2a4ea2--)(_0x1581c7=_0xf894b3[_0x2a4ea2])&&(_0x5af636=_0x1581c7(_0x5af636)||_0x5af636);return _0x5af636;},M=(_0x731712,_0x404def)=>(_0x2dd236,_0x18d032)=>_0x404def(_0x2dd236,_0x18d032,_0x731712);let f=class extends _0x235f20{constructor(_0x1566db,_0x5aaf05){const _0x4a990d=_0x1ebeec;super(),this['_threadCommentDataSourceService']=_0x1566db,this[_0x4a990d(0x1de)]=_0x5aaf05,this['_initDataSource']();}[_0x1ebeec(0x1ee)](){const _0x5423a6=_0x1ebeec;this[_0x5423a6(0x214)][_0x5423a6(0x1d4)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x5423a6(0x21f)]=!0x1;}};f=te([M(0x0,_0x5b1ce4),M(0x1,_0x5b1114(S))],f);var se=Object['defineProperty'],oe=Object[_0x1ebeec(0x1d0)],ne=(_0x3cc3f5,_0x35adc4,_0x43690c)=>_0x35adc4 in _0x3cc3f5?se(_0x3cc3f5,_0x35adc4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x43690c}):_0x3cc3f5[_0x35adc4]=_0x43690c,ie=(_0x959023,_0xd5c245,_0x2cf4bc,_0x492d6e)=>{const _0x1d530f=_0x1ebeec;for(var _0x4ab28d=_0x492d6e>0x1?void 0x0:_0x492d6e?oe(_0xd5c245,_0x2cf4bc):_0xd5c245,_0x419ee1=_0x959023[_0x1d530f(0x1c8)]-0x1,_0x763aac;_0x419ee1>=0x0;_0x419ee1--)(_0x763aac=_0x959023[_0x419ee1])&&(_0x4ab28d=_0x763aac(_0x4ab28d)||_0x4ab28d);return _0x4ab28d;},N=(_0x34f2a1,_0x156dcc)=>(_0x41c232,_0x400982)=>_0x156dcc(_0x41c232,_0x400982,_0x34f2a1),$=(_0x5494fe,_0x51502f,_0x42d85e)=>ne(_0x5494fe,typeof _0x51502f!='symbol'?_0x51502f+'':_0x51502f,_0x42d85e);let g=class extends _0x1bdb37{constructor(_0x4e6ccf=O,_0x2b80db,_0x412cfb){const _0x28f2c0=_0x1ebeec;super(),this['_config']=_0x4e6ccf,this[_0x28f2c0(0x222)]=_0x2b80db,this[_0x28f2c0(0x216)]=_0x412cfb;const {..._0x225fe3}=_0x4ebb47({},O,this[_0x28f2c0(0x1cc)]);this[_0x28f2c0(0x216)][_0x28f2c0(0x1c7)](z,_0x225fe3);}['onStarting'](){const _0x576f12=_0x1ebeec;[[S],[f],[_]][_0x576f12(0x1f9)](_0x5ab9c2=>{const _0x3dac2e=_0x576f12;this[_0x3dac2e(0x222)]['add'](_0x5ab9c2);});}[_0x1ebeec(0x223)](){const _0x1414f1=_0x1ebeec;this['_injector']['get'](f),this[_0x1414f1(0x222)]['get'](_);}};$(g,_0x1ebeec(0x202),W),$(g,'type',_0x26b6b5[_0x1ebeec(0x1ce)]),g=ie([_0x3e5e37(_0x305dda,_0x34845c,_0x5499db),N(0x1,_0x5b1114(_0x304f84)),N(0x2,_0x3f1145)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x56ab(_0x471bc9,_0x5686ed){const _0x25a912=_0x25a9();return _0x56ab=function(_0x56abbc,_0x5d50a5){_0x56abbc=_0x56abbc-0xee;let _0x109938=_0x25a912[_0x56abbc];return _0x109938;},_0x56ab(_0x471bc9,_0x5686ed);}(function(_0x366883,_0x1f1f41){const _0x1b7e39=_0x56ab,_0x2a860e=_0x366883();while(!![]){try{const _0x5ce1cb=-parseInt(_0x1b7e39(0x16e))/0x1+-parseInt(_0x1b7e39(0x116))/0x2*(parseInt(_0x1b7e39(0x143))/0x3)+-parseInt(_0x1b7e39(0x126))/0x4*(parseInt(_0x1b7e39(0x176))/0x5)+parseInt(_0x1b7e39(0xf7))/0x6*(parseInt(_0x1b7e39(0x13f))/0x7)+parseInt(_0x1b7e39(0x12b))/0x8*(-parseInt(_0x1b7e39(0x135))/0x9)+-parseInt(_0x1b7e39(0x13c))/0xa+parseInt(_0x1b7e39(0x118))/0xb;if(_0x5ce1cb===_0x1f1f41)break;else _0x2a860e['push'](_0x2a860e['shift']());}catch(_0xf2602f){_0x2a860e['push'](_0x2a860e['shift']());}}}(_0x25a9,0x3e2a6),function(_0x4d673b,_0x5468fa){const _0x1b983b=_0x56ab;typeof exports==_0x1b983b(0x119)&&typeof module<'u'?_0x5468fa(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==_0x1b983b(0x130)&&define['amd']?define(['exports',_0x1b983b(0x160),_0x1b983b(0xfb),_0x1b983b(0x16c),_0x1b983b(0xf5),_0x1b983b(0x123),_0x1b983b(0x14c),_0x1b983b(0x109)],_0x5468fa):(_0x4d673b=typeof globalThis<'u'?globalThis:_0x4d673b||self,_0x5468fa(_0x4d673b[_0x1b983b(0x132)]={},_0x4d673b[_0x1b983b(0x13d)],_0x4d673b[_0x1b983b(0x122)],_0x4d673b[_0x1b983b(0x11a)],_0x4d673b['UniverThreadCommentUi'],_0x4d673b[_0x1b983b(0x103)],_0x4d673b[_0x1b983b(0x14c)],_0x4d673b[_0x1b983b(0x10a)]));}(this,function(_0x6df14e,_0x5ee949,_0x4b12ee,_0x1abb0c,_0x1b3bd0,_0x2333db,_0x19affa,_0x2d1d10){'use strict';const _0x4640e0=_0x56ab;const _0x302e71=_0x4640e0(0x152);var _0x4f964b=(_0x300cca=>(_0x300cca[_0x300cca[_0x4640e0(0x145)]=0x0]=_0x4640e0(0x145),_0x300cca[_0x300cca[_0x4640e0(0x10f)]=0x1]=_0x4640e0(0x10f),_0x300cca[_0x300cca[_0x4640e0(0x10b)]=-0x1]=_0x4640e0(0x10b),_0x300cca))(_0x4f964b||{}),_0x46c1be=(_0x31e787=>(_0x31e787[_0x31e787[_0x4640e0(0x178)]=0x0]='Unknown',_0x31e787[_0x31e787[_0x4640e0(0x173)]=0x1]='Add',_0x31e787[_0x31e787[_0x4640e0(0x11d)]=0x2]=_0x4640e0(0x11d),_0x31e787[_0x31e787['Edit']=0x3]=_0x4640e0(0x129),_0x31e787[_0x31e787[_0x4640e0(0x164)]=0x4]=_0x4640e0(0x164),_0x31e787[_0x31e787[_0x4640e0(0x11b)]=0x5]=_0x4640e0(0x11b),_0x31e787[_0x31e787[_0x4640e0(0x10b)]=-0x1]=_0x4640e0(0x10b),_0x31e787))(_0x46c1be||{});const _0x3bd3f6=_0xd5f750=>_0x1abb0c[_0x4640e0(0x10c)](new Date(+_0xd5f750))[_0x4640e0(0x153)](_0x4640e0(0x10d)),_0x386473=async(_0x56a14a,_0x46ac76)=>{const _0x5901cf=_0x4640e0,_0x47e425=_0x56a14a[_0x5901cf(0x15d)](_0x1abb0c[_0x5901cf(0x140)]),_0x30e17b=_0x56a14a['get'](_0x2d1d10[_0x5901cf(0x14b)]);_0x46ac76[_0x5901cf(0x170)](_0x233c82=>{const _0x483f01=_0x5901cf;_0x47e425[_0x483f01(0x101)](_0x233c82)&&_0x46ac76[_0x483f01(0x169)](_0x233c82);}),_0x46ac76[_0x5901cf(0x12d)]&&(await _0x30e17b[_0x5901cf(0x15d)](_0x5901cf(0x16d),{'params':{'userIDs':[..._0x46ac76]}}))['body'][_0x5901cf(0x162)]['forEach'](_0x13a28e=>{const _0xd3f2d6=_0x5901cf;_0x13a28e&&_0x47e425[_0xd3f2d6(0xef)](_0x13a28e);});};var _0x169ba6=Object['getOwnPropertyDescriptor'],_0x3726c6=(_0x4fd7e0,_0x48459a,_0x27bda6,_0x6297fc)=>{const _0x1c2807=_0x4640e0;for(var _0x2a37df=_0x6297fc>0x1?void 0x0:_0x6297fc?_0x169ba6(_0x48459a,_0x27bda6):_0x48459a,_0x55f433=_0x4fd7e0[_0x1c2807(0x157)]-0x1,_0x59f9c7;_0x55f433>=0x0;_0x55f433--)(_0x59f9c7=_0x4fd7e0[_0x55f433])&&(_0x2a37df=_0x59f9c7(_0x2a37df)||_0x2a37df);return _0x2a37df;},_0x38d4f1=(_0x23f6cf,_0x37232b)=>(_0x12ea3a,_0x265653)=>_0x37232b(_0x12ea3a,_0x265653,_0x23f6cf);let _0x15487d=class extends _0x1abb0c['Disposable']{constructor(_0x5e70c6,_0x3d4905,_0x57362a,_0x562689){const _0x45705b=_0x4640e0;super(),this[_0x45705b(0x106)]=_0x5e70c6,this[_0x45705b(0x147)]=_0x3d4905,this[_0x45705b(0x112)]=_0x57362a,this['_injector']=_0x562689,this[_0x45705b(0xee)](),this['_initUserSync']();}[_0x4640e0(0x14a)](){const _0x15affc=_0x4640e0;this[_0x15affc(0x11f)](this[_0x15affc(0x147)][_0x15affc(0x12c)][_0x15affc(0x12f)](_0x19affa[_0x15affc(0x175)](0x10))[_0x15affc(0x15f)](_0x4403bc=>{const _0x5b4de7=_0x15affc,_0x35c780=new Set();_0x4403bc[_0x5b4de7(0x170)](_0x1a93de=>{const _0x3a34d2=_0x5b4de7;switch(_0x1a93de[_0x3a34d2(0x100)]){case _0x3a34d2(0x12a):{const _0x233d37=_0x1a93de['payload']['personId'];_0x35c780[_0x3a34d2(0x12a)](_0x233d37);break;}}}),_0x386473(this[_0x5b4de7(0x144)],_0x35c780);}));}[_0x4640e0(0xee)](){const _0x1bdac9=_0x4640e0;this[_0x1bdac9(0x11f)](this[_0x1bdac9(0x106)][_0x1bdac9(0x12c)]['subscribe'](async _0x3dac1b=>{const _0x11b8c9=_0x1bdac9;var _0x28ceb1,_0x4dcb2c,_0x3cbb86,_0x5268bb;const _0x5d63d3=(_0x28ceb1=this[_0x11b8c9(0x147)][_0x11b8c9(0x108)](_0x3dac1b['unitId'])[_0x11b8c9(0x15e)](_0x3c16f8=>_0x3c16f8[_0x11b8c9(0x179)]===_0x3dac1b[_0x11b8c9(0x179)]))==null?void 0x0:_0x28ceb1[_0x11b8c9(0x120)];if(!_0x5d63d3)return;const {unitId:_0x327ce1,subUnitId:_0x187e41}=_0x5d63d3;switch(_0x3dac1b['user']&&this[_0x11b8c9(0x112)]['addUser'](_0x3dac1b[_0x11b8c9(0xfa)]),_0x3dac1b[_0x11b8c9(0x100)]){case _0x46c1be[_0x11b8c9(0x173)]:break;case _0x46c1be['Reply']:{this[_0x11b8c9(0x147)][_0x11b8c9(0x165)](_0x327ce1,_0x187e41,{'unitId':_0x327ce1,'subUnitId':_0x187e41,'ref':'','id':_0x3dac1b[_0x11b8c9(0x117)],'dT':_0x3bd3f6(+_0x3dac1b[_0x11b8c9(0x141)]),'threadId':_0x3dac1b['threadId'],'personId':(_0x3cbb86=(_0x4dcb2c=_0x3dac1b[_0x11b8c9(0xfa)])==null?void 0x0:_0x4dcb2c[_0x11b8c9(0x125)])!=null?_0x3cbb86:_0x3dac1b[_0x11b8c9(0xff)],'text':JSON[_0x11b8c9(0x115)](_0x3dac1b[_0x11b8c9(0x148)]),'parentId':_0x5d63d3['id']});break;}case _0x46c1be['Delete']:{const _0x2030a0=this[_0x11b8c9(0x147)][_0x11b8c9(0x149)](_0x327ce1,_0x187e41,_0x3dac1b[_0x11b8c9(0x117)]);_0x2030a0&&_0x2030a0[_0x11b8c9(0x121)]&&this['_threadCommentModel'][_0x11b8c9(0x14f)](_0x327ce1,_0x187e41,_0x3dac1b[_0x11b8c9(0x117)]);break;}case _0x46c1be[_0x11b8c9(0x129)]:{this[_0x11b8c9(0x147)][_0x11b8c9(0x172)](_0x327ce1,_0x187e41,{'commentId':_0x3dac1b['replyId'],'text':JSON['parse'](_0x3dac1b[_0x11b8c9(0x148)])});break;}case _0x46c1be[_0x11b8c9(0x11b)]:{const _0x4f0f5d=(_0x5268bb=this[_0x11b8c9(0x147)][_0x11b8c9(0x108)](_0x3dac1b[_0x11b8c9(0x16b)])[_0x11b8c9(0x15e)](_0x8e5e85=>_0x8e5e85[_0x11b8c9(0x179)]===_0x3dac1b[_0x11b8c9(0x179)]))==null?void 0x0:_0x5268bb[_0x11b8c9(0x120)];_0x4f0f5d&&this[_0x11b8c9(0x147)][_0x11b8c9(0x151)](_0x327ce1,_0x187e41,_0x4f0f5d['id'],_0x3dac1b['solved']===_0x4f964b[_0x11b8c9(0x10f)]);break;}}}));}};_0x15487d=_0x3726c6([_0x38d4f1(0x0,_0x1abb0c[_0x4640e0(0x171)](_0x5ee949[_0x4640e0(0x136)])),_0x38d4f1(0x1,_0x1abb0c[_0x4640e0(0x171)](_0x2333db[_0x4640e0(0x13a)])),_0x38d4f1(0x2,_0x1abb0c[_0x4640e0(0x171)](_0x1abb0c[_0x4640e0(0x140)])),_0x38d4f1(0x3,_0x1abb0c[_0x4640e0(0x171)](_0x1abb0c[_0x4640e0(0x15c)]))],_0x15487d);const _0x1239a3=_0x4640e0(0x16a),_0x4d25c5={};var _0x8dc64a=Object[_0x4640e0(0x14d)],_0x2fddeb=(_0x2475f5,_0x4006a4,_0x813567,_0x114c19)=>{for(var _0x20ed2a=_0x114c19>0x1?void 0x0:_0x114c19?_0x8dc64a(_0x4006a4,_0x813567):_0x4006a4,_0x39aa5d=_0x2475f5['length']-0x1,_0x5c79cd;_0x39aa5d>=0x0;_0x39aa5d--)(_0x5c79cd=_0x2475f5[_0x39aa5d])&&(_0x20ed2a=_0x5c79cd(_0x20ed2a)||_0x20ed2a);return _0x20ed2a;},_0x51112c=(_0x3214e0,_0x11034d)=>(_0x50363b,_0xce8d7d)=>_0x11034d(_0x50363b,_0xce8d7d,_0x3214e0);function _0x1ceabd(_0x22b122,_0x8fe12){const _0x5991f9=_0x4640e0,_0x1217e0=_0x22b122[_0x5991f9(0x111)][0x0];return{..._0x8fe12,'id':_0x1217e0[_0x5991f9(0x117)],'resolved':_0x22b122[_0x5991f9(0x161)]===0x1,'dT':_0x3bd3f6(_0x1217e0[_0x5991f9(0x141)]),'personId':_0x1217e0[_0x5991f9(0xff)],'threadId':_0x1217e0[_0x5991f9(0x179)]};}function _0x20c343(_0x496656,_0x457ea7,_0x2110ee){const _0xe4c489=_0x4640e0;var _0x484f1b,_0x17ea3b;if(((_0x17ea3b=(_0x484f1b=_0x496656==null?void 0x0:_0x496656[_0xe4c489(0x111)])==null?void 0x0:_0x484f1b[_0xe4c489(0x157)])!=null?_0x17ea3b:0x0)>0x0){const _0x225965=(_0x13bbc8,_0x4b1b06)=>({'id':_0x13bbc8[_0xe4c489(0x117)],'threadId':_0x13bbc8[_0xe4c489(0x179)],'dT':_0x3bd3f6(_0x13bbc8[_0xe4c489(0x141)]),'personId':_0x13bbc8[_0xe4c489(0xff)],'resolved':_0x496656[_0xe4c489(0x161)]===_0x4f964b[_0xe4c489(0x10f)],'unitId':_0x457ea7,'subUnitId':_0x2110ee,'text':JSON[_0xe4c489(0x115)](_0x13bbc8[_0xe4c489(0x148)]),'parentId':_0x4b1b06}),_0x5c1ed1=_0x225965(_0x496656[_0xe4c489(0x111)][0x0]);return{..._0x5c1ed1,'children':_0x496656[_0xe4c489(0x111)]['slice'](0x1)[_0xe4c489(0x156)](_0xbb3b3d=>_0x225965(_0xbb3b3d,_0x5c1ed1['id']))};}return null;}let _0x3d829a=class{constructor(_0x4d2307,_0x4fad93,_0x9ccafe){const _0x257f94=_0x4640e0;this[_0x257f94(0x14e)]=_0x4d2307,this[_0x257f94(0x112)]=_0x4fad93,this['_sessionService']=_0x9ccafe;}async[_0x4640e0(0x165)](_0x1eadaa){const _0x43d41a=_0x4640e0;var _0x10ead3,_0xb49a04;const {parentId:_0xc1ec2d,unitId:_0x76ab4d,text:_0x5c3c02,threadId:_0x2d206f}=_0x1eadaa,_0x536abe=(_0xb49a04=(_0x10ead3=_0x5c3c02[_0x43d41a(0x102)])==null?void 0x0:_0x10ead3[_0x43d41a(0xf4)](_0x1b3f10=>_0x1b3f10['rangeType']===_0x1abb0c[_0x43d41a(0x128)][_0x43d41a(0x134)])[_0x43d41a(0x156)](_0x5a1624=>_0x5a1624[_0x43d41a(0x105)]))!=null?_0xb49a04:[],_0x48ea40=JSON[_0x43d41a(0x11c)](_0x5c3c02),_0x43105b=(await this[_0x43d41a(0x13b)][_0x43d41a(0x177)](_0x76ab4d))[_0x43d41a(0x11e)]();if(_0xc1ec2d){const _0x47292b={'memberId':_0x43105b,'unitId':_0x76ab4d,'content':_0x48ea40,'mention':_0x536abe,'threadId':_0x2d206f},_0xa242e3=(await this['_httpService'][_0x43d41a(0x113)](_0x43d41a(0x168)+_0x76ab4d+_0x43d41a(0x142),{'body':_0x47292b}))[_0x43d41a(0x13e)][_0x43d41a(0xfe)];return{..._0x1eadaa,'id':_0xa242e3[_0x43d41a(0x117)],'dT':_0x1abb0c[_0x43d41a(0x10c)](+_0xa242e3['createTimestamp'])['format'](_0x43d41a(0x10d)),'personId':_0xa242e3[_0x43d41a(0xff)]};}else{const _0x1c0bc6={'memberId':_0x43105b,'unitId':_0x76ab4d,'content':_0x48ea40,'mention':_0x536abe},_0x5d295e=await this[_0x43d41a(0x14e)]['post'](_0x43d41a(0x168)+_0x76ab4d+'/add',{'body':_0x1c0bc6});return _0x1ceabd(_0x5d295e[_0x43d41a(0x13e)][_0x43d41a(0x155)],_0x1eadaa);}}async[_0x4640e0(0x172)](_0x569f83){const _0x1033f9=_0x4640e0;var _0x40beb4,_0x2792a3;const {text:_0x2a5940,unitId:_0x1f223c}=_0x569f83,_0x46bd1d=(_0x2792a3=(_0x40beb4=_0x2a5940[_0x1033f9(0x102)])==null?void 0x0:_0x40beb4[_0x1033f9(0xf4)](_0x3a5e29=>_0x3a5e29['rangeType']===_0x1abb0c['CustomRangeType'][_0x1033f9(0x134)])[_0x1033f9(0x156)](_0x37c91b=>_0x37c91b[_0x1033f9(0x105)]))!=null?_0x2792a3:[],_0x5cd58e=JSON['stringify'](_0x2a5940),_0x397f0d=_0x569f83[_0x1033f9(0x179)],_0x354c60=_0x569f83['id'],_0x34265c={'memberId':(await this['_sessionService'][_0x1033f9(0x177)](_0x1f223c))[_0x1033f9(0x11e)](),'unitId':_0x1f223c,'threadId':_0x397f0d,'mention':_0x46bd1d,'content':_0x5cd58e,'replyId':_0x354c60},_0x561978=await this[_0x1033f9(0x14e)][_0x1033f9(0x113)](_0x1033f9(0x168)+_0x1f223c+_0x1033f9(0xfc),{'body':_0x34265c});return!_0x561978[_0x1033f9(0x13e)]['error']||_0x561978[_0x1033f9(0x13e)][_0x1033f9(0x150)]['code']===0x1;}async[_0x4640e0(0x151)](_0x8f3c9c){const _0x3eef28=_0x4640e0,{unitId:_0x5952f2}=_0x8f3c9c,_0x50e50c=_0x8f3c9c[_0x3eef28(0x179)],_0x4dd4cd={'memberId':this[_0x3eef28(0x112)][_0x3eef28(0x107)]()[_0x3eef28(0x125)],'unitId':_0x5952f2,'threadId':_0x50e50c,'solved':_0x8f3c9c[_0x3eef28(0xf0)]?_0x4f964b[_0x3eef28(0x10f)]:_0x4f964b[_0x3eef28(0x145)]},_0x28d2c3=await this[_0x3eef28(0x14e)]['post'](_0x3eef28(0x168)+_0x5952f2+_0x3eef28(0x139),{'body':_0x4dd4cd});return!_0x28d2c3[_0x3eef28(0x13e)][_0x3eef28(0x150)]||_0x28d2c3[_0x3eef28(0x13e)][_0x3eef28(0x150)][_0x3eef28(0xfd)]===0x1;}async[_0x4640e0(0x14f)](_0x279cb2,_0x1a3da3,_0x2babee,_0x2c5ed7){const _0x3abd22=_0x4640e0,_0x3b6d3c={'memberId':(await this[_0x3abd22(0x13b)]['requireSession'](_0x279cb2))[_0x3abd22(0x11e)](),'threadId':_0x2babee,'replyId':_0x2c5ed7,'unitId':_0x279cb2},_0x46789c=await this[_0x3abd22(0x14e)][_0x3abd22(0x113)](_0x3abd22(0x168)+_0x279cb2+'/delete',{'body':_0x3b6d3c});return!_0x46789c['body'][_0x3abd22(0x150)]||_0x46789c[_0x3abd22(0x13e)]['error'][_0x3abd22(0xfd)]===0x1;}async[_0x4640e0(0x137)](_0x15969e,_0xafc77b,_0x3ae58b){const _0x6f0b4a=_0x4640e0,_0x3d6269={'unitId':_0x15969e,'threadId':_0x3ae58b},_0x25a845=await this[_0x6f0b4a(0x14e)]['post']('/universer-api/comment/unit/'+_0x15969e+_0x6f0b4a(0x104),{'body':_0x3d6269}),_0x352f3a=_0x3ae58b['map'](_0x3a5745=>_0x20c343(_0x25a845[_0x6f0b4a(0x13e)][_0x6f0b4a(0x167)][_0x3a5745],_0x15969e,_0xafc77b))['filter'](Boolean);return Object[_0x6f0b4a(0x110)](_0x25a845[_0x6f0b4a(0x13e)]['users'])[_0x6f0b4a(0x170)](_0x5387d7=>{const _0x531b10=_0x6f0b4a;this[_0x531b10(0x112)][_0x531b10(0xef)](_0x5387d7);}),_0x352f3a;}[_0x4640e0(0x15b)](_0x22299b){const _0x64ab2c=_0x4640e0;return{'id':_0x22299b['id'],'threadId':_0x22299b['threadId'],'ref':_0x22299b[_0x64ab2c(0x146)]};}};_0x3d829a=_0x2fddeb([_0x51112c(0x0,_0x1abb0c[_0x4640e0(0x171)](_0x2d1d10[_0x4640e0(0x14b)])),_0x51112c(0x1,_0x1abb0c[_0x4640e0(0x171)](_0x1abb0c[_0x4640e0(0x140)])),_0x51112c(0x2,_0x1abb0c[_0x4640e0(0x171)](_0x5ee949[_0x4640e0(0xf3)]))],_0x3d829a);var _0x5d4d29=Object[_0x4640e0(0x14d)],_0xadb1b8=(_0x3c96a1,_0x3dcfed,_0xc42e68,_0x312d72)=>{const _0x3a084a=_0x4640e0;for(var _0x29251a=_0x312d72>0x1?void 0x0:_0x312d72?_0x5d4d29(_0x3dcfed,_0xc42e68):_0x3dcfed,_0x4e5ff3=_0x3c96a1[_0x3a084a(0x157)]-0x1,_0x154c37;_0x4e5ff3>=0x0;_0x4e5ff3--)(_0x154c37=_0x3c96a1[_0x4e5ff3])&&(_0x29251a=_0x154c37(_0x29251a)||_0x29251a);return _0x29251a;},_0x143330=(_0x2be7bc,_0x5e1f9e)=>(_0x1dcdb1,_0x3985b1)=>_0x5e1f9e(_0x1dcdb1,_0x3985b1,_0x2be7bc);let _0x1eb9e7=class extends _0x1abb0c[_0x4640e0(0xf8)]{constructor(_0x4f4c9e,_0x2f14fa){const _0x2e46c9=_0x4640e0;super(),this['_threadCommentDataSourceService']=_0x4f4c9e,this['_threadCommentDataSource']=_0x2f14fa,this[_0x2e46c9(0x163)]();}[_0x4640e0(0x163)](){const _0x2f1854=_0x4640e0;this[_0x2f1854(0x158)][_0x2f1854(0x154)]=this[_0x2f1854(0x12e)],this[_0x2f1854(0x158)]['syncUpdateMutationToColla']=!0x1;}};_0x1eb9e7=_0xadb1b8([_0x143330(0x0,_0x2333db['IThreadCommentDataSourceService']),_0x143330(0x1,_0x1abb0c[_0x4640e0(0x171)](_0x3d829a))],_0x1eb9e7);var _0x226f9e=Object[_0x4640e0(0xf1)],_0x33295a=Object['getOwnPropertyDescriptor'],_0xe79c23=(_0x445898,_0x451bfb,_0x34da65)=>_0x451bfb in _0x445898?_0x226f9e(_0x445898,_0x451bfb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x34da65}):_0x445898[_0x451bfb]=_0x34da65,_0x1c44a7=(_0xef34a7,_0x5b1cca,_0x5c29cb,_0x378b8b)=>{for(var _0x37debc=_0x378b8b>0x1?void 0x0:_0x378b8b?_0x33295a(_0x5b1cca,_0x5c29cb):_0x5b1cca,_0x276e7e=_0xef34a7['length']-0x1,_0x3a2b0a;_0x276e7e>=0x0;_0x276e7e--)(_0x3a2b0a=_0xef34a7[_0x276e7e])&&(_0x37debc=_0x3a2b0a(_0x37debc)||_0x37debc);return _0x37debc;},_0x4a93b9=(_0x482487,_0x421919)=>(_0x555208,_0x5ca049)=>_0x421919(_0x555208,_0x5ca049,_0x482487),_0x440ed7=(_0x2c600f,_0x42da6d,_0x72a460)=>_0xe79c23(_0x2c600f,typeof _0x42da6d!=_0x4640e0(0xf9)?_0x42da6d+'':_0x42da6d,_0x72a460);_0x6df14e[_0x4640e0(0x10e)]=class extends _0x1abb0c[_0x4640e0(0xf2)]{constructor(_0x4666d2=_0x4d25c5,_0xff3b8c,_0x423d7e){const _0x25fc55=_0x4640e0;super(),this[_0x25fc55(0x15a)]=_0x4666d2,this[_0x25fc55(0x144)]=_0xff3b8c,this[_0x25fc55(0x127)]=_0x423d7e;const {..._0x3eecc6}=_0x1abb0c[_0x25fc55(0x114)]({},_0x4d25c5,this[_0x25fc55(0x15a)]);this['_configService']['setConfig'](_0x1239a3,_0x3eecc6);}[_0x4640e0(0x166)](){const _0x39bf92=_0x4640e0;[[_0x3d829a],[_0x1eb9e7],[_0x15487d]][_0x39bf92(0x170)](_0x43af92=>{const _0x4b1fda=_0x39bf92;this[_0x4b1fda(0x144)][_0x4b1fda(0x12a)](_0x43af92);});}[_0x4640e0(0x138)](){const _0x1c91a0=_0x4640e0;this[_0x1c91a0(0x144)][_0x1c91a0(0x15d)](_0x1eb9e7),this[_0x1c91a0(0x144)][_0x1c91a0(0x15d)](_0x15487d);}},_0x440ed7(_0x6df14e[_0x4640e0(0x10e)],_0x4640e0(0x124),_0x302e71),_0x440ed7(_0x6df14e[_0x4640e0(0x10e)],_0x4640e0(0x100),_0x1abb0c[_0x4640e0(0x133)]['UNIVER_UNKNOWN']),_0x6df14e['UniverThreadCommentDataSourcePlugin']=_0x1c44a7([_0x1abb0c[_0x4640e0(0x131)](_0x1b3bd0[_0x4640e0(0x16f)],_0x5ee949['UniverCollaborationClientPlugin'],_0x4b12ee['UniverLicensePlugin']),_0x4a93b9(0x1,_0x1abb0c[_0x4640e0(0x171)](_0x1abb0c[_0x4640e0(0x15c)])),_0x4a93b9(0x2,_0x1abb0c[_0x4640e0(0x174)])],_0x6df14e[_0x4640e0(0x10e)]),Object['defineProperty'](_0x6df14e,Symbol[_0x4640e0(0x159)],{'value':_0x4640e0(0xf6)});}));function _0x25a9(){const _0x289ed6=['/reply','18cXkQeH','_injector','OpenOrReOpen','ref','_threadCommentModel','content','getComment','_initUserSync','HTTPService','rxjs','getOwnPropertyDescriptor','_httpService','deleteComment','error','resolveComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','dataSource','comment','map','length','_threadCommentDataSourceService','toStringTag','_config','saveCommentToSnapshot','Injector','get','find','subscribe','@univerjs-pro/collaboration-client','solved','users','_initDataSource','Delete','addComment','onStarting','comments','/universer-api/comment/unit/','delete','thread-comment-data-source.config','unitId','@univerjs/core','/universer-api/user/list','401740fFlrTh','UniverThreadCommentUIPlugin','forEach','Inject','updateComment','Add','IConfigService','bufferTime','30EZFMgt','requireSession','Unknown','threadId','_init','addUser','resolved','defineProperty','Plugin','CollaborationSessionService','filter','@univerjs/thread-comment-ui','Module','2326794KBKjfr','Disposable','symbol','user','@univerjs-pro/license','/edit','code','reply','userId','type','getUser','customRanges','UniverThreadComment','/list','rangeId','_commentService','getCurrentUser','getUnit','@univerjs/network','UniverNetwork','UNRECOGNIZED','dayjs','YYYY/MM/DD\x20HH:mm','UniverThreadCommentDataSourcePlugin','Solved','values','replies','_userService','post','merge','parse','13180UYddaC','replyId','14826966Eutema','object','UniverCore','Solve','stringify','Reply','getMemberID','disposeWithMe','root','parentId','UniverProLicense','@univerjs/thread-comment','pluginName','userID','132476yCkGCH','_configService','CustomRangeType','Edit','add','1205416OUKQLQ','commentUpdate$','size','_threadCommentDataSource','pipe','function','DependentOn','UniverProThreadCommentDatasource','UniverInstanceType','COMMENT','27HfAMyA','CommentService','listComments','onReady','/solved','ThreadCommentModel','_sessionService','3890500SFJDwH','UniverProCollaborationClient','body','7dmmyWN','UserManagerService','createTimestamp'];_0x25a9=function(){return _0x289ed6;};return _0x25a9();}
1
+ function _0x1797(_0x5d10fa,_0x3955cc){const _0x4b3ddd=_0x4b3d();return _0x1797=function(_0x1797c1,_0x26d2b5){_0x1797c1=_0x1797c1-0x7b;let _0x320585=_0x4b3ddd[_0x1797c1];return _0x320585;},_0x1797(_0x5d10fa,_0x3955cc);}(function(_0x5715ea,_0x4a0bd9){const _0xa7c0b2=_0x1797,_0x2f9f17=_0x5715ea();while(!![]){try{const _0x5cd247=-parseInt(_0xa7c0b2(0xd1))/0x1*(-parseInt(_0xa7c0b2(0xe5))/0x2)+-parseInt(_0xa7c0b2(0xc8))/0x3+parseInt(_0xa7c0b2(0xff))/0x4*(-parseInt(_0xa7c0b2(0x91))/0x5)+parseInt(_0xa7c0b2(0x100))/0x6+parseInt(_0xa7c0b2(0xbc))/0x7+-parseInt(_0xa7c0b2(0xee))/0x8*(-parseInt(_0xa7c0b2(0x7b))/0x9)+-parseInt(_0xa7c0b2(0xf3))/0xa;if(_0x5cd247===_0x4a0bd9)break;else _0x2f9f17['push'](_0x2f9f17['shift']());}catch(_0x419f3e){_0x2f9f17['push'](_0x2f9f17['shift']());}}}(_0x4b3d,0x4112d),function(_0x1320a6,_0x354e40){const _0x3b7550=_0x1797;typeof exports==_0x3b7550(0x96)&&typeof module<'u'?_0x354e40(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==_0x3b7550(0xb6)&&define[_0x3b7550(0xb3)]?define([_0x3b7550(0xd8),'@univerjs-pro/collaboration-client',_0x3b7550(0x9f),_0x3b7550(0x85),_0x3b7550(0x9e),'@univerjs/thread-comment',_0x3b7550(0xc9),'@univerjs/network'],_0x354e40):(_0x1320a6=typeof globalThis<'u'?globalThis:_0x1320a6||self,_0x354e40(_0x1320a6[_0x3b7550(0xef)]={},_0x1320a6[_0x3b7550(0xc0)],_0x1320a6['UniverProLicense'],_0x1320a6[_0x3b7550(0xf2)],_0x1320a6[_0x3b7550(0xa1)],_0x1320a6[_0x3b7550(0xec)],_0x1320a6['rxjs'],_0x1320a6['UniverNetwork']));}(this,function(_0x4886da,_0x205b1b,_0x241fc0,_0x326302,_0x2650af,_0x1afa27,_0x212acc,_0x160ae3){'use strict';const _0x441350=_0x1797;const _0x2140d3=_0x441350(0xb5);var _0x298f21=(_0x51bc7f=>(_0x51bc7f[_0x51bc7f[_0x441350(0x101)]=0x0]='OpenOrReOpen',_0x51bc7f[_0x51bc7f[_0x441350(0x80)]=0x1]=_0x441350(0x80),_0x51bc7f[_0x51bc7f['UNRECOGNIZED']=-0x1]=_0x441350(0xa6),_0x51bc7f))(_0x298f21||{}),_0x4bdaff=(_0x55c09e=>(_0x55c09e[_0x55c09e[_0x441350(0xf1)]=0x0]=_0x441350(0xf1),_0x55c09e[_0x55c09e[_0x441350(0xcf)]=0x1]=_0x441350(0xcf),_0x55c09e[_0x55c09e[_0x441350(0x87)]=0x2]=_0x441350(0x87),_0x55c09e[_0x55c09e[_0x441350(0xba)]=0x3]=_0x441350(0xba),_0x55c09e[_0x55c09e[_0x441350(0xe7)]=0x4]=_0x441350(0xe7),_0x55c09e[_0x55c09e[_0x441350(0xf0)]=0x5]=_0x441350(0xf0),_0x55c09e[_0x55c09e[_0x441350(0xa6)]=-0x1]='UNRECOGNIZED',_0x55c09e))(_0x4bdaff||{});const _0x12aa1d=_0xf83225=>_0x326302[_0x441350(0xd3)](new Date(+_0xf83225))[_0x441350(0xa4)]('YYYY/MM/DD\x20HH:mm'),_0x44883e=async(_0x401639,_0x4996e6)=>{const _0x258022=_0x441350,_0x50f8ed=_0x401639['get'](_0x326302[_0x258022(0x94)]),_0x550484=_0x401639[_0x258022(0xaa)](_0x160ae3[_0x258022(0x9b)]);_0x4996e6[_0x258022(0xfc)](_0x4e329b=>{const _0x1f0045=_0x258022;_0x50f8ed[_0x1f0045(0x7c)](_0x4e329b)&&_0x4996e6['delete'](_0x4e329b);}),_0x4996e6['size']&&(await _0x550484['get'](_0x258022(0xa2),{'params':{'userIDs':[..._0x4996e6]}}))[_0x258022(0x89)][_0x258022(0x8d)][_0x258022(0xfc)](_0x4635a5=>{const _0x5583d6=_0x258022;_0x4635a5&&_0x50f8ed[_0x5583d6(0xc3)](_0x4635a5);});};var _0x2a06c5=Object[_0x441350(0xfe)],_0x24f560=(_0x4682d9,_0x52ac04,_0x300525,_0x3ef1c5)=>{for(var _0x64bf2=_0x3ef1c5>0x1?void 0x0:_0x3ef1c5?_0x2a06c5(_0x52ac04,_0x300525):_0x52ac04,_0x2af4db=_0x4682d9['length']-0x1,_0x4cd148;_0x2af4db>=0x0;_0x2af4db--)(_0x4cd148=_0x4682d9[_0x2af4db])&&(_0x64bf2=_0x4cd148(_0x64bf2)||_0x64bf2);return _0x64bf2;},_0x234abc=(_0xc3daaf,_0x567eba)=>(_0x513cb8,_0x1b3138)=>_0x567eba(_0x513cb8,_0x1b3138,_0xc3daaf);let _0x42818c=class extends _0x326302['Disposable']{constructor(_0x2851b4,_0x3c8c47,_0xe1c92a,_0x24f8b9){const _0x1ce608=_0x441350;super(),this[_0x1ce608(0x93)]=_0x2851b4,this[_0x1ce608(0xdd)]=_0x3c8c47,this[_0x1ce608(0xe8)]=_0xe1c92a,this[_0x1ce608(0xc5)]=_0x24f8b9,this[_0x1ce608(0xea)](),this[_0x1ce608(0xe3)]();}[_0x441350(0xe3)](){const _0x529cca=_0x441350;this[_0x529cca(0xa0)](this[_0x529cca(0xdd)][_0x529cca(0xcd)][_0x529cca(0xcc)](_0x212acc[_0x529cca(0x82)](0x10))['subscribe'](_0xc3e228=>{const _0x5e2de7=_0x529cca,_0x518c33=new Set();_0xc3e228['forEach'](_0x49a8fa=>{const _0x311d3e=_0x1797;switch(_0x49a8fa['type']){case _0x311d3e(0xde):{const _0x2f1433=_0x49a8fa[_0x311d3e(0x9c)][_0x311d3e(0xf6)];_0x518c33[_0x311d3e(0xde)](_0x2f1433);break;}}}),_0x44883e(this[_0x5e2de7(0xc5)],_0x518c33);}));}[_0x441350(0xea)](){const _0x44c446=_0x441350;this[_0x44c446(0xa0)](this[_0x44c446(0x93)][_0x44c446(0xcd)][_0x44c446(0xc2)](async _0x256839=>{const _0x3973be=_0x44c446;var _0x5f8773,_0x4aa248,_0x473dcf,_0x560483;const _0x241493=(_0x5f8773=this[_0x3973be(0xdd)][_0x3973be(0xf8)](_0x256839['unitId'])[_0x3973be(0xf4)](_0x346bde=>_0x346bde[_0x3973be(0x95)]===_0x256839[_0x3973be(0x95)]))==null?void 0x0:_0x5f8773['root'];if(!_0x241493)return;const {unitId:_0x1c2e2f,subUnitId:_0x10ab9d}=_0x241493;switch(_0x256839[_0x3973be(0xdc)]&&this[_0x3973be(0xe8)]['addUser'](_0x256839['user']),_0x256839[_0x3973be(0xac)]){case _0x4bdaff['Add']:break;case _0x4bdaff[_0x3973be(0x87)]:{this[_0x3973be(0xdd)][_0x3973be(0x8f)](_0x1c2e2f,_0x10ab9d,{'unitId':_0x1c2e2f,'subUnitId':_0x10ab9d,'ref':'','id':_0x256839['replyId'],'dT':_0x12aa1d(+_0x256839[_0x3973be(0xbe)]),'threadId':_0x256839[_0x3973be(0x95)],'personId':(_0x473dcf=(_0x4aa248=_0x256839[_0x3973be(0xdc)])==null?void 0x0:_0x4aa248['userID'])!=null?_0x473dcf:_0x256839[_0x3973be(0xcb)],'text':JSON[_0x3973be(0x7e)](_0x256839[_0x3973be(0xed)]),'parentId':_0x241493['id']});break;}case _0x4bdaff[_0x3973be(0xe7)]:{const _0x55725a=this[_0x3973be(0xdd)][_0x3973be(0xc7)](_0x1c2e2f,_0x10ab9d,_0x256839[_0x3973be(0xa7)]);_0x55725a&&_0x55725a[_0x3973be(0xda)]&&this[_0x3973be(0xdd)][_0x3973be(0x99)](_0x1c2e2f,_0x10ab9d,_0x256839[_0x3973be(0xa7)]);break;}case _0x4bdaff['Edit']:{this[_0x3973be(0xdd)][_0x3973be(0xdf)](_0x1c2e2f,_0x10ab9d,{'commentId':_0x256839[_0x3973be(0xa7)],'text':JSON['parse'](_0x256839['content'])});break;}case _0x4bdaff[_0x3973be(0xf0)]:{const _0x5d7ba7=(_0x560483=this['_threadCommentModel'][_0x3973be(0xf8)](_0x256839[_0x3973be(0xe2)])['find'](_0x55fb33=>_0x55fb33[_0x3973be(0x95)]===_0x256839[_0x3973be(0x95)]))==null?void 0x0:_0x560483[_0x3973be(0xfb)];_0x5d7ba7&&this[_0x3973be(0xdd)][_0x3973be(0xb0)](_0x1c2e2f,_0x10ab9d,_0x5d7ba7['id'],_0x256839[_0x3973be(0xb8)]===_0x298f21['Solved']);break;}}}));}};_0x42818c=_0x24f560([_0x234abc(0x0,_0x326302[_0x441350(0xd4)](_0x205b1b[_0x441350(0x8a)])),_0x234abc(0x1,_0x326302[_0x441350(0xd4)](_0x1afa27[_0x441350(0xd7)])),_0x234abc(0x2,_0x326302[_0x441350(0xd4)](_0x326302[_0x441350(0x94)])),_0x234abc(0x3,_0x326302[_0x441350(0xd4)](_0x326302[_0x441350(0xd2)]))],_0x42818c);const _0x5bb60d=_0x441350(0xf7),_0x25957c={};var _0x1684d5=Object[_0x441350(0xfe)],_0x320ae0=(_0x462cca,_0x59817b,_0x272810,_0x407ea2)=>{const _0x613ab4=_0x441350;for(var _0x3b9ef5=_0x407ea2>0x1?void 0x0:_0x407ea2?_0x1684d5(_0x59817b,_0x272810):_0x59817b,_0x40de9a=_0x462cca[_0x613ab4(0x90)]-0x1,_0x1b8829;_0x40de9a>=0x0;_0x40de9a--)(_0x1b8829=_0x462cca[_0x40de9a])&&(_0x3b9ef5=_0x1b8829(_0x3b9ef5)||_0x3b9ef5);return _0x3b9ef5;},_0x1e8f6c=(_0x18bfcf,_0x55c7df)=>(_0x472eba,_0xb5ed9d)=>_0x55c7df(_0x472eba,_0xb5ed9d,_0x18bfcf);function _0x11a06b(_0x28a055,_0x2b84bd){const _0x43defc=_0x441350,_0x35da7e=_0x28a055[_0x43defc(0xd9)][0x0];return{..._0x2b84bd,'id':_0x35da7e[_0x43defc(0xa7)],'resolved':_0x28a055['solved']===0x1,'dT':_0x12aa1d(_0x35da7e['createTimestamp']),'personId':_0x35da7e[_0x43defc(0xcb)],'threadId':_0x35da7e['threadId']};}function _0x2fe6b4(_0x506f77,_0x4e9f25,_0x23464a){const _0x531aa1=_0x441350;var _0x5a9f85,_0x2ceaf0;if(((_0x2ceaf0=(_0x5a9f85=_0x506f77==null?void 0x0:_0x506f77[_0x531aa1(0xd9)])==null?void 0x0:_0x5a9f85[_0x531aa1(0x90)])!=null?_0x2ceaf0:0x0)>0x0){const _0x4d1c99=(_0x2d6bd6,_0x19f1d2)=>({'id':_0x2d6bd6[_0x531aa1(0xa7)],'threadId':_0x2d6bd6[_0x531aa1(0x95)],'dT':_0x12aa1d(_0x2d6bd6['createTimestamp']),'personId':_0x2d6bd6[_0x531aa1(0xcb)],'resolved':_0x506f77['solved']===_0x298f21[_0x531aa1(0x80)],'unitId':_0x4e9f25,'subUnitId':_0x23464a,'text':JSON[_0x531aa1(0x7e)](_0x2d6bd6[_0x531aa1(0xed)]),'parentId':_0x19f1d2}),_0xf883d0=_0x4d1c99(_0x506f77['replies'][0x0]);return{..._0xf883d0,'children':_0x506f77[_0x531aa1(0xd9)][_0x531aa1(0xa9)](0x1)[_0x531aa1(0xc4)](_0x494851=>_0x4d1c99(_0x494851,_0xf883d0['id']))};}return null;}let _0x4f7999=class{constructor(_0x381866,_0x51a8fa,_0x5bfa3f){const _0x4adfae=_0x441350;this[_0x4adfae(0xb7)]=_0x381866,this['_userService']=_0x51a8fa,this[_0x4adfae(0xae)]=_0x5bfa3f;}async[_0x441350(0x8f)](_0x1123d8){const _0xf7e7dd=_0x441350;var _0x3f5417,_0x4bffc8;const {parentId:_0x312dda,unitId:_0x30fae7,text:_0x3c2581,threadId:_0x38e3e7}=_0x1123d8,_0x19a0ad=(_0x4bffc8=(_0x3f5417=_0x3c2581[_0xf7e7dd(0x102)])==null?void 0x0:_0x3f5417['filter'](_0x993427=>_0x993427[_0xf7e7dd(0xf5)]===_0x326302[_0xf7e7dd(0xe0)][_0xf7e7dd(0x92)])[_0xf7e7dd(0xc4)](_0x2fd8a0=>_0x2fd8a0[_0xf7e7dd(0xdb)]))!=null?_0x4bffc8:[],_0x5d013e=JSON[_0xf7e7dd(0x83)](_0x3c2581),_0x6830c7=(await this[_0xf7e7dd(0xae)][_0xf7e7dd(0xb4)](_0x30fae7))[_0xf7e7dd(0x98)]();if(_0x312dda){const _0x4d7f2e={'memberId':_0x6830c7,'unitId':_0x30fae7,'content':_0x5d013e,'mention':_0x19a0ad,'threadId':_0x38e3e7},_0x59a206=(await this[_0xf7e7dd(0xb7)]['post'](_0xf7e7dd(0x97)+_0x30fae7+'/reply',{'body':_0x4d7f2e}))[_0xf7e7dd(0x89)][_0xf7e7dd(0x81)];return{..._0x1123d8,'id':_0x59a206[_0xf7e7dd(0xa7)],'dT':_0x326302[_0xf7e7dd(0xd3)](+_0x59a206[_0xf7e7dd(0xbe)])[_0xf7e7dd(0xa4)](_0xf7e7dd(0xe9)),'personId':_0x59a206[_0xf7e7dd(0xcb)]};}else{const _0x40b627={'memberId':_0x6830c7,'unitId':_0x30fae7,'content':_0x5d013e,'mention':_0x19a0ad},_0x53538b=await this[_0xf7e7dd(0xb7)][_0xf7e7dd(0xb9)](_0xf7e7dd(0x97)+_0x30fae7+_0xf7e7dd(0x103),{'body':_0x40b627});return _0x11a06b(_0x53538b[_0xf7e7dd(0x89)][_0xf7e7dd(0xeb)],_0x1123d8);}}async[_0x441350(0xdf)](_0x16f701){const _0x23d335=_0x441350;var _0x3ee163,_0x415e6c;const {text:_0x5ca392,unitId:_0x12af4f}=_0x16f701,_0x1916b1=(_0x415e6c=(_0x3ee163=_0x5ca392[_0x23d335(0x102)])==null?void 0x0:_0x3ee163[_0x23d335(0xaf)](_0x40c41f=>_0x40c41f['rangeType']===_0x326302[_0x23d335(0xe0)]['COMMENT'])[_0x23d335(0xc4)](_0x8cfc19=>_0x8cfc19['rangeId']))!=null?_0x415e6c:[],_0x482b67=JSON[_0x23d335(0x83)](_0x5ca392),_0xb75c6d=_0x16f701[_0x23d335(0x95)],_0x361934=_0x16f701['id'],_0x7fd17d={'memberId':(await this[_0x23d335(0xae)][_0x23d335(0xb4)](_0x12af4f))[_0x23d335(0x98)](),'unitId':_0x12af4f,'threadId':_0xb75c6d,'mention':_0x1916b1,'content':_0x482b67,'replyId':_0x361934},_0x44773a=await this[_0x23d335(0xb7)]['post'](_0x23d335(0x97)+_0x12af4f+_0x23d335(0xa5),{'body':_0x7fd17d});return!_0x44773a[_0x23d335(0x89)][_0x23d335(0xbd)]||_0x44773a[_0x23d335(0x89)][_0x23d335(0xbd)]['code']===0x1;}async[_0x441350(0xb0)](_0x40acc6){const _0x56a2bf=_0x441350,{unitId:_0x173ec5}=_0x40acc6,_0x281cfe=_0x40acc6[_0x56a2bf(0x95)],_0x2833d6={'memberId':this[_0x56a2bf(0xe8)]['getCurrentUser']()[_0x56a2bf(0x104)],'unitId':_0x173ec5,'threadId':_0x281cfe,'solved':_0x40acc6['resolved']?_0x298f21['Solved']:_0x298f21[_0x56a2bf(0x101)]},_0x9563a9=await this['_httpService'][_0x56a2bf(0xb9)](_0x56a2bf(0x97)+_0x173ec5+_0x56a2bf(0xad),{'body':_0x2833d6});return!_0x9563a9['body'][_0x56a2bf(0xbd)]||_0x9563a9[_0x56a2bf(0x89)]['error'][_0x56a2bf(0xd0)]===0x1;}async[_0x441350(0x99)](_0x51dd34,_0x4416bb,_0x3f8437,_0x1452c9){const _0x3a1f0f=_0x441350,_0x323513={'memberId':(await this[_0x3a1f0f(0xae)][_0x3a1f0f(0xb4)](_0x51dd34))['getMemberID'](),'threadId':_0x3f8437,'replyId':_0x1452c9,'unitId':_0x51dd34},_0x149c24=await this[_0x3a1f0f(0xb7)]['post'](_0x3a1f0f(0x97)+_0x51dd34+_0x3a1f0f(0xab),{'body':_0x323513});return!_0x149c24['body'][_0x3a1f0f(0xbd)]||_0x149c24['body'][_0x3a1f0f(0xbd)][_0x3a1f0f(0xd0)]===0x1;}async[_0x441350(0x88)](_0x6d6ece,_0x38ffef,_0x417635){const _0x55ae7e=_0x441350,_0x59b81b={'unitId':_0x6d6ece,'threadId':_0x417635},_0x4c2fc4=await this[_0x55ae7e(0xb7)]['post'](_0x55ae7e(0x97)+_0x6d6ece+_0x55ae7e(0x9a),{'body':_0x59b81b}),_0x3984c9=_0x417635[_0x55ae7e(0xc4)](_0x341892=>_0x2fe6b4(_0x4c2fc4[_0x55ae7e(0x89)][_0x55ae7e(0xfd)][_0x341892],_0x6d6ece,_0x38ffef))['filter'](Boolean);return Object[_0x55ae7e(0xbb)](_0x4c2fc4[_0x55ae7e(0x89)][_0x55ae7e(0x8d)])['forEach'](_0x40fc1f=>{const _0x2bb49d=_0x55ae7e;this[_0x2bb49d(0xe8)]['addUser'](_0x40fc1f);}),_0x3984c9;}[_0x441350(0x7f)](_0x34965c){const _0x540bdc=_0x441350;return{'id':_0x34965c['id'],'threadId':_0x34965c[_0x540bdc(0x95)],'ref':_0x34965c[_0x540bdc(0xbf)]};}};_0x4f7999=_0x320ae0([_0x1e8f6c(0x0,_0x326302[_0x441350(0xd4)](_0x160ae3[_0x441350(0x9b)])),_0x1e8f6c(0x1,_0x326302[_0x441350(0xd4)](_0x326302[_0x441350(0x94)])),_0x1e8f6c(0x2,_0x326302[_0x441350(0xd4)](_0x205b1b[_0x441350(0xa8)]))],_0x4f7999);var _0x2d7ee3=Object[_0x441350(0xfe)],_0x3d7e92=(_0x31fff1,_0x268b4d,_0x4b7960,_0x14cb63)=>{const _0x3bc65b=_0x441350;for(var _0x4d6852=_0x14cb63>0x1?void 0x0:_0x14cb63?_0x2d7ee3(_0x268b4d,_0x4b7960):_0x268b4d,_0x270c0e=_0x31fff1[_0x3bc65b(0x90)]-0x1,_0x5055e6;_0x270c0e>=0x0;_0x270c0e--)(_0x5055e6=_0x31fff1[_0x270c0e])&&(_0x4d6852=_0x5055e6(_0x4d6852)||_0x4d6852);return _0x4d6852;},_0x628af6=(_0x2bea67,_0x53035d)=>(_0x38bd5e,_0x9852d)=>_0x53035d(_0x38bd5e,_0x9852d,_0x2bea67);let _0x270d22=class extends _0x326302[_0x441350(0xf9)]{constructor(_0x70d4e4,_0xa95d6a){const _0x48c58e=_0x441350;super(),this['_threadCommentDataSourceService']=_0x70d4e4,this[_0x48c58e(0xd5)]=_0xa95d6a,this[_0x48c58e(0x8b)]();}[_0x441350(0x8b)](){const _0x1e86b9=_0x441350;this[_0x1e86b9(0x9d)]['dataSource']=this[_0x1e86b9(0xd5)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x270d22=_0x3d7e92([_0x628af6(0x0,_0x1afa27['IThreadCommentDataSourceService']),_0x628af6(0x1,_0x326302['Inject'](_0x4f7999))],_0x270d22);var _0x2beaf7=Object[_0x441350(0xa3)],_0x3cb341=Object[_0x441350(0xfe)],_0x3f6a47=(_0x150b5d,_0x40640d,_0x4c6d6a)=>_0x40640d in _0x150b5d?_0x2beaf7(_0x150b5d,_0x40640d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c6d6a}):_0x150b5d[_0x40640d]=_0x4c6d6a,_0x4eb8f1=(_0x56a05b,_0x5e03ef,_0x4f97c1,_0x3a8f94)=>{const _0x422b9a=_0x441350;for(var _0x21448b=_0x3a8f94>0x1?void 0x0:_0x3a8f94?_0x3cb341(_0x5e03ef,_0x4f97c1):_0x5e03ef,_0xb66109=_0x56a05b[_0x422b9a(0x90)]-0x1,_0x472069;_0xb66109>=0x0;_0xb66109--)(_0x472069=_0x56a05b[_0xb66109])&&(_0x21448b=_0x472069(_0x21448b)||_0x21448b);return _0x21448b;},_0x48e5d5=(_0x321bfa,_0x167d61)=>(_0x535700,_0x23b4c3)=>_0x167d61(_0x535700,_0x23b4c3,_0x321bfa),_0x4c18c1=(_0x1a15e4,_0x4e3f38,_0x1e62cf)=>_0x3f6a47(_0x1a15e4,typeof _0x4e3f38!='symbol'?_0x4e3f38+'':_0x4e3f38,_0x1e62cf);_0x4886da[_0x441350(0xe4)]=class extends _0x326302[_0x441350(0x84)]{constructor(_0x404a8d=_0x25957c,_0x4a3309,_0x556318){const _0x39209e=_0x441350;super(),this[_0x39209e(0x7d)]=_0x404a8d,this[_0x39209e(0xc5)]=_0x4a3309,this[_0x39209e(0xd6)]=_0x556318;const {..._0xd3c02}=_0x326302[_0x39209e(0xb1)]({},_0x25957c,this[_0x39209e(0x7d)]);this[_0x39209e(0xd6)][_0x39209e(0xe1)](_0x5bb60d,_0xd3c02);}[_0x441350(0xe6)](){[[_0x4f7999],[_0x270d22],[_0x42818c]]['forEach'](_0x31f2c0=>{const _0x1913b5=_0x1797;this[_0x1913b5(0xc5)][_0x1913b5(0xde)](_0x31f2c0);});}[_0x441350(0xc1)](){const _0x46b590=_0x441350;this[_0x46b590(0xc5)][_0x46b590(0xaa)](_0x270d22),this[_0x46b590(0xc5)][_0x46b590(0xaa)](_0x42818c);}},_0x4c18c1(_0x4886da['UniverThreadCommentDataSourcePlugin'],_0x441350(0x8c),_0x2140d3),_0x4c18c1(_0x4886da[_0x441350(0xe4)],_0x441350(0xac),_0x326302[_0x441350(0xfa)]['UNIVER_UNKNOWN']),_0x4886da[_0x441350(0xe4)]=_0x4eb8f1([_0x326302[_0x441350(0xc6)](_0x2650af[_0x441350(0x86)],_0x205b1b['UniverCollaborationClientPlugin'],_0x241fc0[_0x441350(0xb2)]),_0x48e5d5(0x1,_0x326302[_0x441350(0xd4)](_0x326302['Injector'])),_0x48e5d5(0x2,_0x326302[_0x441350(0x8e)])],_0x4886da[_0x441350(0xe4)]),Object['defineProperty'](_0x4886da,Symbol[_0x441350(0xce)],{'value':_0x441350(0xca)});}));function _0x4b3d(){const _0x3e2e7f=['pluginName','users','IConfigService','addComment','length','25cjckdP','COMMENT','_commentService','UserManagerService','threadId','object','/universer-api/comment/unit/','getMemberID','deleteComment','/list','HTTPService','payload','_threadCommentDataSourceService','@univerjs/thread-comment-ui','@univerjs-pro/license','disposeWithMe','UniverThreadCommentUi','/universer-api/user/list','defineProperty','format','/edit','UNRECOGNIZED','replyId','CollaborationSessionService','slice','get','/delete','type','/solved','_sessionService','filter','resolveComment','merge','UniverLicensePlugin','amd','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','function','_httpService','solved','post','Edit','values','113057tOdlVp','error','createTimestamp','ref','UniverProCollaborationClient','onReady','subscribe','addUser','map','_injector','DependentOn','getComment','775929gDCVUG','rxjs','Module','userId','pipe','commentUpdate$','toStringTag','Add','code','43ZaovyD','Injector','dayjs','Inject','_threadCommentDataSource','_configService','ThreadCommentModel','exports','replies','parentId','rangeId','user','_threadCommentModel','add','updateComment','CustomRangeType','setConfig','unitId','_initUserSync','UniverThreadCommentDataSourcePlugin','194JpqIbE','onStarting','Delete','_userService','YYYY/MM/DD\x20HH:mm','_init','comment','UniverThreadComment','content','8qqVWsy','UniverProThreadCommentDatasource','Solve','Unknown','UniverCore','522540mvgsLs','find','rangeType','personId','thread-comment-data-source.config','getUnit','Disposable','UniverInstanceType','root','forEach','comments','getOwnPropertyDescriptor','84944tUfbds','1538754PLyGkq','OpenOrReOpen','customRanges','/add','userID','3661533peQuxk','getUser','_config','parse','saveCommentToSnapshot','Solved','reply','bufferTime','stringify','Plugin','@univerjs/core','UniverThreadCommentUIPlugin','Reply','listComments','body','CommentService','_initDataSource'];_0x4b3d=function(){return _0x3e2e7f;};return _0x4b3d();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.6-nightly.202509060832",
3
+ "version": "0.10.7-nightly.202509080357",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.10.6-nightly.202509060832",
49
- "@univerjs-pro/license": "0.10.6-nightly.202509060832",
50
- "@univerjs/core": "0.10.6-nightly.202509060832",
48
+ "@univerjs-pro/collaboration-client": "0.10.7-nightly.202509080357",
49
+ "@univerjs-pro/license": "0.10.7-nightly.202509080357",
51
50
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/network": "0.10.6-nightly.202509060832",
53
- "@univerjs/thread-comment": "0.10.6-nightly.202509060832",
54
- "@univerjs/thread-comment-ui": "0.10.6-nightly.202509060832"
51
+ "@univerjs/core": "0.10.7-nightly.202509080357",
52
+ "@univerjs/network": "0.10.7-nightly.202509080357",
53
+ "@univerjs/thread-comment": "0.10.7-nightly.202509080357",
54
+ "@univerjs/thread-comment-ui": "0.10.7-nightly.202509080357"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.2",
59
59
  "vite": "^7.1.3",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.10.6"
61
+ "@univerjs-infra/shared": "0.10.7"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",