@univerjs-pro/thread-comment-datasource 0.6.5 → 0.6.6-experimental.20250319-2bbe26f

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 _0x5530ba=_0x6530;(function(_0x41b944,_0x2d2df1){const _0x20bf8f=_0x6530,_0x4ce2d9=_0x41b944();while(!![]){try{const _0x550415=parseInt(_0x20bf8f(0x137))/0x1+parseInt(_0x20bf8f(0x131))/0x2*(parseInt(_0x20bf8f(0xe2))/0x3)+-parseInt(_0x20bf8f(0x11d))/0x4*(-parseInt(_0x20bf8f(0x11b))/0x5)+-parseInt(_0x20bf8f(0xee))/0x6*(parseInt(_0x20bf8f(0x13f))/0x7)+-parseInt(_0x20bf8f(0x12e))/0x8+parseInt(_0x20bf8f(0x112))/0x9+-parseInt(_0x20bf8f(0x156))/0xa;if(_0x550415===_0x2d2df1)break;else _0x4ce2d9['push'](_0x4ce2d9['shift']());}catch(_0x3cf5a1){_0x4ce2d9['push'](_0x4ce2d9['shift']());}}}(_0xef23,0x242a1));function _0x6530(_0x5a3daf,_0x5bee48){const _0xef23c2=_0xef23();return _0x6530=function(_0x65301b,_0x2ede0d){_0x65301b=_0x65301b-0xe0;let _0x27a614=_0xef23c2[_0x65301b];return _0x27a614;},_0x6530(_0x5a3daf,_0x5bee48);}Object[_0x5530ba(0x123)](exports,Symbol[_0x5530ba(0x150)],{'value':_0x5530ba(0x120)});const b=require(_0x5530ba(0xea)),T=require(_0x5530ba(0xf8)),c=require(_0x5530ba(0x11c)),j=require(_0x5530ba(0x12c)),M=require(_0x5530ba(0x149)),w=require('rxjs'),P=require('@univerjs/network'),U=_0x5530ba(0xfd);var I=(_0x4a9ed1=>(_0x4a9ed1[_0x4a9ed1[_0x5530ba(0x102)]=0x0]=_0x5530ba(0x102),_0x4a9ed1[_0x4a9ed1[_0x5530ba(0x100)]=0x1]='Solved',_0x4a9ed1[_0x4a9ed1[_0x5530ba(0x133)]=-0x1]=_0x5530ba(0x133),_0x4a9ed1))(I||{}),v=(_0x3dfaf0=>(_0x3dfaf0[_0x3dfaf0['Unknown']=0x0]=_0x5530ba(0x12b),_0x3dfaf0[_0x3dfaf0[_0x5530ba(0x129)]=0x1]=_0x5530ba(0x129),_0x3dfaf0[_0x3dfaf0[_0x5530ba(0x13a)]=0x2]=_0x5530ba(0x13a),_0x3dfaf0[_0x3dfaf0[_0x5530ba(0x14b)]=0x3]=_0x5530ba(0x14b),_0x3dfaf0[_0x3dfaf0['Delete']=0x4]=_0x5530ba(0x148),_0x3dfaf0[_0x3dfaf0[_0x5530ba(0x126)]=0x5]=_0x5530ba(0x126),_0x3dfaf0[_0x3dfaf0[_0x5530ba(0x133)]=-0x1]=_0x5530ba(0x133),_0x3dfaf0))(v||{});const f=_0x28f82a=>c[_0x5530ba(0x14a)](new Date(+_0x28f82a))['format'](_0x5530ba(0x15a)),R=async(_0x36e175,_0x452b9e)=>{const _0x4e3bb8=_0x5530ba,_0x19a2b9=_0x36e175[_0x4e3bb8(0xe3)](c[_0x4e3bb8(0x130)]),_0x434ac8=_0x36e175[_0x4e3bb8(0xe3)](P[_0x4e3bb8(0xf2)]);_0x452b9e[_0x4e3bb8(0x104)](_0x299419=>{const _0x133292=_0x4e3bb8;_0x19a2b9[_0x133292(0x122)](_0x299419)&&_0x452b9e['delete'](_0x299419);}),_0x452b9e[_0x4e3bb8(0x116)]&&(await _0x434ac8[_0x4e3bb8(0xe3)](_0x4e3bb8(0x160),{'params':{'userIDs':[..._0x452b9e]}}))[_0x4e3bb8(0x143)][_0x4e3bb8(0x138)][_0x4e3bb8(0x104)](_0x420b12=>{const _0x2491fb=_0x4e3bb8;_0x420b12&&_0x19a2b9[_0x2491fb(0x15f)](_0x420b12);});};var $=Object[_0x5530ba(0x115)],E=(_0x5d6598,_0xf33985,_0x42ed61,_0x4fd6e6)=>{const _0x3e08d8=_0x5530ba;for(var _0x1e41b9=_0x4fd6e6>0x1?void 0x0:_0x4fd6e6?$(_0xf33985,_0x42ed61):_0xf33985,_0x33ca9f=_0x5d6598[_0x3e08d8(0xe9)]-0x1,_0x8cc1b6;_0x33ca9f>=0x0;_0x33ca9f--)(_0x8cc1b6=_0x5d6598[_0x33ca9f])&&(_0x1e41b9=_0x8cc1b6(_0x1e41b9)||_0x1e41b9);return _0x1e41b9;},S=(_0xcfef9e,_0x3b3b79)=>(_0x580feb,_0x178a7c)=>_0x3b3b79(_0x580feb,_0x178a7c,_0xcfef9e);let p=class extends c[_0x5530ba(0x128)]{constructor(_0x31088f,_0x26e588,_0x3a7208,_0x33b781){const _0x2c945a=_0x5530ba;super(),this[_0x2c945a(0x158)]=_0x31088f,this[_0x2c945a(0x12f)]=_0x26e588,this[_0x2c945a(0xf0)]=_0x3a7208,this['_injector']=_0x33b781,this[_0x2c945a(0x107)](),this['_initUserSync']();}['_initUserSync'](){const _0x1c49eb=_0x5530ba;this[_0x1c49eb(0xe8)](this[_0x1c49eb(0x12f)][_0x1c49eb(0x134)][_0x1c49eb(0x144)](w[_0x1c49eb(0x10b)](0x10))[_0x1c49eb(0x14f)](_0x449800=>{const _0x586ae8=_0x1c49eb,_0x3346fc=new Set();_0x449800[_0x586ae8(0x104)](_0x4e025d=>{const _0x243663=_0x586ae8;switch(_0x4e025d['type']){case _0x243663(0xe1):{const _0x37fa0c=_0x4e025d[_0x243663(0xf7)][_0x243663(0xe4)];_0x3346fc[_0x243663(0xe1)](_0x37fa0c);break;}}}),R(this['_injector'],_0x3346fc);}));}[_0x5530ba(0x107)](){const _0xd5483c=_0x5530ba;this['disposeWithMe'](this[_0xd5483c(0x158)][_0xd5483c(0x134)][_0xd5483c(0x14f)](async _0x20fadd=>{const _0x511051=_0xd5483c;var _0x21e935,_0x586dbf,_0x2e3137,_0x151dc1;const _0xa59fe1=(_0x21e935=this['_threadCommentModel'][_0x511051(0x154)](_0x20fadd[_0x511051(0x147)])[_0x511051(0x15d)](_0x5976fb=>_0x5976fb[_0x511051(0xfb)]===_0x20fadd['threadId']))==null?void 0x0:_0x21e935[_0x511051(0x10d)];if(!_0xa59fe1)return;const {unitId:_0x38deb8,subUnitId:_0x308509}=_0xa59fe1;switch(_0x20fadd[_0x511051(0x142)]&&this['_userService'][_0x511051(0x15f)](_0x20fadd[_0x511051(0x142)]),_0x20fadd[_0x511051(0x10c)]){case v[_0x511051(0x129)]:break;case v['Reply']:{this[_0x511051(0x12f)][_0x511051(0x152)](_0x38deb8,_0x308509,{'unitId':_0x38deb8,'subUnitId':_0x308509,'ref':'','id':_0x20fadd[_0x511051(0x117)],'dT':f(+_0x20fadd[_0x511051(0x14c)]),'threadId':_0x20fadd[_0x511051(0xfb)],'personId':(_0x2e3137=(_0x586dbf=_0x20fadd[_0x511051(0x142)])==null?void 0x0:_0x586dbf[_0x511051(0x118)])!=null?_0x2e3137:_0x20fadd[_0x511051(0xf1)],'text':JSON[_0x511051(0x10e)](_0x20fadd[_0x511051(0x135)]),'parentId':_0xa59fe1['id']});break;}case v[_0x511051(0x148)]:{const _0x3f18e6=this['_threadCommentModel']['getComment'](_0x38deb8,_0x308509,_0x20fadd[_0x511051(0x117)]);_0x3f18e6&&_0x3f18e6[_0x511051(0x151)]&&this[_0x511051(0x12f)][_0x511051(0xe5)](_0x38deb8,_0x308509,_0x20fadd['replyId']);break;}case v[_0x511051(0x14b)]:{this[_0x511051(0x12f)][_0x511051(0x11a)](_0x38deb8,_0x308509,{'commentId':_0x20fadd[_0x511051(0x117)],'text':JSON[_0x511051(0x10e)](_0x20fadd[_0x511051(0x135)])});break;}case v['Solve']:{const _0x352871=(_0x151dc1=this[_0x511051(0x12f)][_0x511051(0x154)](_0x20fadd[_0x511051(0x147)])[_0x511051(0x15d)](_0x500662=>_0x500662[_0x511051(0xfb)]===_0x20fadd[_0x511051(0xfb)]))==null?void 0x0:_0x151dc1[_0x511051(0x10d)];_0x352871&&this[_0x511051(0x12f)][_0x511051(0x121)](_0x38deb8,_0x308509,_0x352871['id'],_0x20fadd[_0x511051(0xf3)]===I[_0x511051(0x100)]);break;}}}));}};p=E([S(0x0,c[_0x5530ba(0x119)](b[_0x5530ba(0x141)])),S(0x1,c[_0x5530ba(0x119)](M['ThreadCommentModel'])),S(0x2,c[_0x5530ba(0x119)](c[_0x5530ba(0x130)])),S(0x3,c[_0x5530ba(0x119)](c[_0x5530ba(0x132)]))],p);const q=_0x5530ba(0x13d),D={};function _0xef23(){const _0x521fec=['disposeWithMe','length','@univerjs-pro/collaboration-client','COMMENT','getMemberID','_configService','138858auhdvD','_injector','_userService','userId','HTTPService','solved','resolved','code','_initDataSource','payload','@univerjs-pro/license','filter','ref','threadId','DependentOn','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','rangeType','map','Solved','listComments','OpenOrReOpen','reply','forEach','/reply','symbol','_init','CollaborationSessionService','_threadCommentDataSource','values','bufferTime','type','root','parse','stringify','format','UniverLicensePlugin','1104453gdNvFT','requireSession','comments','getOwnPropertyDescriptor','size','replyId','userID','Inject','updateComment','10oKFGIQ','@univerjs/core','536328vbNhyM','/solved','UniverInstanceType','Module','resolveComment','getUser','defineProperty','replies','getCurrentUser','Solve','IConfigService','Disposable','Add','Plugin','Unknown','@univerjs/thread-comment-ui','_threadCommentDataSourceService','1838328MNTcQc','_threadCommentModel','UserManagerService','8210uDwqGJ','Injector','UNRECOGNIZED','commentUpdate$','content','error','40146FjGCVW','users','/list','Reply','_config','post','thread-comment-data-source.config','slice','14jlVLvW','_httpService','CommentService','user','body','pipe','/universer-api/comment/unit/','syncUpdateMutationToColla','unitId','Delete','@univerjs/thread-comment','dayjs','Edit','createTimestamp','setConfig','_sessionService','subscribe','toStringTag','parentId','addComment','pluginName','getUnit','/edit','191360obGiRT','customRanges','_commentService','UniverThreadCommentDataSourcePlugin','YYYY/MM/DD\x20HH:mm','/add','onStarting','find','comment','addUser','/universer-api/user/list','UNIVER_UNKNOWN','add','9PBylUI','get','personId','deleteComment','rangeId','/delete'];_0xef23=function(){return _0x521fec;};return _0xef23();}var A=Object['getOwnPropertyDescriptor'],x=(_0x56d4ae,_0x1357b2,_0x327506,_0x1a5534)=>{const _0x3e4e8b=_0x5530ba;for(var _0x147e30=_0x1a5534>0x1?void 0x0:_0x1a5534?A(_0x1357b2,_0x327506):_0x1357b2,_0x40573f=_0x56d4ae[_0x3e4e8b(0xe9)]-0x1,_0x1dfb32;_0x40573f>=0x0;_0x40573f--)(_0x1dfb32=_0x56d4ae[_0x40573f])&&(_0x147e30=_0x1dfb32(_0x147e30)||_0x147e30);return _0x147e30;},_=(_0x120a03,_0x515f90)=>(_0x13809a,_0x1cacb9)=>_0x515f90(_0x13809a,_0x1cacb9,_0x120a03);function Y(_0x28b4d9,_0x1cf0cb){const _0x3dcc7a=_0x5530ba,_0x256fb3=_0x28b4d9['replies'][0x0];return{..._0x1cf0cb,'id':_0x256fb3['replyId'],'resolved':_0x28b4d9['solved']===0x1,'dT':f(_0x256fb3[_0x3dcc7a(0x14c)]),'personId':_0x256fb3[_0x3dcc7a(0xf1)],'threadId':_0x256fb3['threadId']};}function G(_0x31a1bc,_0x16ce02,_0x503b1f){const _0x57fbb5=_0x5530ba;var _0x260165,_0x405651;if(((_0x405651=(_0x260165=_0x31a1bc==null?void 0x0:_0x31a1bc[_0x57fbb5(0x124)])==null?void 0x0:_0x260165['length'])!=null?_0x405651:0x0)>0x0){const _0x14efc6=(_0x1433f9,_0x17abba)=>({'id':_0x1433f9[_0x57fbb5(0x117)],'threadId':_0x1433f9[_0x57fbb5(0xfb)],'dT':f(_0x1433f9[_0x57fbb5(0x14c)]),'personId':_0x1433f9['userId'],'resolved':_0x31a1bc['solved']===I[_0x57fbb5(0x100)],'unitId':_0x16ce02,'subUnitId':_0x503b1f,'text':JSON[_0x57fbb5(0x10e)](_0x1433f9[_0x57fbb5(0x135)]),'parentId':_0x17abba}),_0xf20424=_0x14efc6(_0x31a1bc[_0x57fbb5(0x124)][0x0]);return{..._0xf20424,'children':_0x31a1bc['replies'][_0x57fbb5(0x13e)](0x1)['map'](_0x26ce3e=>_0x14efc6(_0x26ce3e,_0xf20424['id']))};}return null;}let g=class{constructor(_0x39352a,_0x42a938,_0x150775,_0x3a96dc){const _0x5a3eb2=_0x5530ba;this[_0x5a3eb2(0x140)]=_0x39352a,this['_userService']=_0x42a938,this[_0x5a3eb2(0x14e)]=_0x150775,this['_injector']=_0x3a96dc;}async[_0x5530ba(0x152)](_0x5cf2a4){const _0x426cd6=_0x5530ba;var _0x262c90,_0x2208fc;const {parentId:_0x38b2cf,unitId:_0x53a749,text:_0x45e67d,threadId:_0x4b43cb}=_0x5cf2a4,_0x466dab=(_0x2208fc=(_0x262c90=_0x45e67d['customRanges'])==null?void 0x0:_0x262c90[_0x426cd6(0xf9)](_0x432f6d=>_0x432f6d[_0x426cd6(0xfe)]===c['CustomRangeType'][_0x426cd6(0xeb)])[_0x426cd6(0xff)](_0x502f2a=>_0x502f2a['rangeId']))!=null?_0x2208fc:[],_0x3a4ce4=JSON[_0x426cd6(0x10f)](_0x45e67d),_0x125c6a=(await this['_sessionService'][_0x426cd6(0x113)](_0x53a749))[_0x426cd6(0xec)]();if(_0x38b2cf){const _0x241b7c={'memberId':_0x125c6a,'unitId':_0x53a749,'content':_0x3a4ce4,'mention':_0x466dab,'threadId':_0x4b43cb},_0x54df54=(await this['_httpService'][_0x426cd6(0x13c)]('/universer-api/comment/unit/'+_0x53a749+_0x426cd6(0x105),{'body':_0x241b7c}))[_0x426cd6(0x143)][_0x426cd6(0x103)];return{..._0x5cf2a4,'id':_0x54df54[_0x426cd6(0x117)],'dT':c['dayjs'](+_0x54df54[_0x426cd6(0x14c)])[_0x426cd6(0x110)](_0x426cd6(0x15a)),'personId':_0x54df54[_0x426cd6(0xf1)]};}else{const _0x5bc214={'memberId':_0x125c6a,'unitId':_0x53a749,'content':_0x3a4ce4,'mention':_0x466dab},_0x238dc0=await this[_0x426cd6(0x140)][_0x426cd6(0x13c)]('/universer-api/comment/unit/'+_0x53a749+_0x426cd6(0x15b),{'body':_0x5bc214});return Y(_0x238dc0[_0x426cd6(0x143)][_0x426cd6(0x15e)],_0x5cf2a4);}}async[_0x5530ba(0x11a)](_0x443bac){const _0x224d97=_0x5530ba;var _0x476e54,_0x5e23f3;const {text:_0x39198d,unitId:_0x46a42c}=_0x443bac,_0x5ab1b0=(_0x5e23f3=(_0x476e54=_0x39198d[_0x224d97(0x157)])==null?void 0x0:_0x476e54[_0x224d97(0xf9)](_0x45719=>_0x45719[_0x224d97(0xfe)]===c['CustomRangeType'][_0x224d97(0xeb)])[_0x224d97(0xff)](_0x39da00=>_0x39da00[_0x224d97(0xe6)]))!=null?_0x5e23f3:[],_0x1c2510=JSON[_0x224d97(0x10f)](_0x39198d),_0x4d2fef=_0x443bac[_0x224d97(0xfb)],_0x4b3ffe=_0x443bac['id'],_0x1bee7b={'memberId':(await this['_sessionService'][_0x224d97(0x113)](_0x46a42c))['getMemberID'](),'unitId':_0x46a42c,'threadId':_0x4d2fef,'mention':_0x5ab1b0,'content':_0x1c2510,'replyId':_0x4b3ffe},_0x263aca=await this[_0x224d97(0x140)]['post'](_0x224d97(0x145)+_0x46a42c+_0x224d97(0x155),{'body':_0x1bee7b});return!_0x263aca[_0x224d97(0x143)][_0x224d97(0x136)]||_0x263aca[_0x224d97(0x143)]['error'][_0x224d97(0xf5)]===0x1;}async[_0x5530ba(0x121)](_0x284985){const _0x518a4f=_0x5530ba,{unitId:_0x5afe39}=_0x284985,_0x58351a=_0x284985[_0x518a4f(0xfb)],_0x1ada7d={'memberId':this['_userService'][_0x518a4f(0x125)]()[_0x518a4f(0x118)],'unitId':_0x5afe39,'threadId':_0x58351a,'solved':_0x284985[_0x518a4f(0xf4)]?I[_0x518a4f(0x100)]:I['OpenOrReOpen']},_0x4629e0=await this['_httpService'][_0x518a4f(0x13c)](_0x518a4f(0x145)+_0x5afe39+_0x518a4f(0x11e),{'body':_0x1ada7d});return!_0x4629e0['body'][_0x518a4f(0x136)]||_0x4629e0['body']['error']['code']===0x1;}async[_0x5530ba(0xe5)](_0x2db28c,_0x40a15a,_0x57e809,_0x310081){const _0x4435f0=_0x5530ba,_0x247523={'memberId':(await this[_0x4435f0(0x14e)][_0x4435f0(0x113)](_0x2db28c))['getMemberID'](),'threadId':_0x57e809,'replyId':_0x310081,'unitId':_0x2db28c},_0x5483fb=await this['_httpService'][_0x4435f0(0x13c)](_0x4435f0(0x145)+_0x2db28c+_0x4435f0(0xe7),{'body':_0x247523});return!_0x5483fb[_0x4435f0(0x143)][_0x4435f0(0x136)]||_0x5483fb[_0x4435f0(0x143)][_0x4435f0(0x136)][_0x4435f0(0xf5)]===0x1;}async[_0x5530ba(0x101)](_0x39b2dd,_0xfd43b1,_0x1f45a7){const _0x1684a3=_0x5530ba,_0x402ff3={'unitId':_0x39b2dd,'threadId':_0x1f45a7},_0x5b99b4=await this[_0x1684a3(0x140)][_0x1684a3(0x13c)](_0x1684a3(0x145)+_0x39b2dd+_0x1684a3(0x139),{'body':_0x402ff3}),_0x55d8c4=_0x1f45a7['map'](_0x454132=>G(_0x5b99b4[_0x1684a3(0x143)][_0x1684a3(0x114)][_0x454132],_0x39b2dd,_0xfd43b1))['filter'](Boolean);return Object[_0x1684a3(0x10a)](_0x5b99b4[_0x1684a3(0x143)][_0x1684a3(0x138)])[_0x1684a3(0x104)](_0x292252=>{const _0xd19810=_0x1684a3;this[_0xd19810(0xf0)][_0xd19810(0x15f)](_0x292252);}),_0x55d8c4;}['saveCommentToSnapshot'](_0x55dd2b){const _0x5004fa=_0x5530ba;return{'id':_0x55dd2b['id'],'threadId':_0x55dd2b['threadId'],'ref':_0x55dd2b[_0x5004fa(0xfa)]};}};g=x([_(0x0,c['Inject'](P['HTTPService'])),_(0x1,c[_0x5530ba(0x119)](c[_0x5530ba(0x130)])),_(0x2,c[_0x5530ba(0x119)](b[_0x5530ba(0x108)])),_(0x3,c[_0x5530ba(0x119)](c[_0x5530ba(0x132)]))],g);var H=Object[_0x5530ba(0x115)],J=(_0x3db080,_0x40cf4b,_0xf0ab28,_0x5bc5e0)=>{const _0x1c3706=_0x5530ba;for(var _0x46b931=_0x5bc5e0>0x1?void 0x0:_0x5bc5e0?H(_0x40cf4b,_0xf0ab28):_0x40cf4b,_0x419d60=_0x3db080[_0x1c3706(0xe9)]-0x1,_0x121384;_0x419d60>=0x0;_0x419d60--)(_0x121384=_0x3db080[_0x419d60])&&(_0x46b931=_0x121384(_0x46b931)||_0x46b931);return _0x46b931;},y=(_0x355704,_0x3ad1b8)=>(_0x4b51a2,_0x1fe759)=>_0x3ad1b8(_0x4b51a2,_0x1fe759,_0x355704);let C=class extends c[_0x5530ba(0x128)]{constructor(_0x2ea3f2,_0x5e5fc0){const _0x5485fd=_0x5530ba;super(),this[_0x5485fd(0x12d)]=_0x2ea3f2,this[_0x5485fd(0x109)]=_0x5e5fc0,this['_initDataSource']();}[_0x5530ba(0xf6)](){const _0x506729=_0x5530ba;this[_0x506729(0x12d)]['dataSource']=this['_threadCommentDataSource'],this[_0x506729(0x12d)][_0x506729(0x146)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x5530ba(0x119)](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x34fd8c,_0x1c81fb,_0x167bd6)=>_0x1c81fb in _0x34fd8c?F(_0x34fd8c,_0x1c81fb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x167bd6}):_0x34fd8c[_0x1c81fb]=_0x167bd6,W=(_0x196902,_0x463e6e,_0x4e9239,_0x472d1c)=>{const _0x2746f4=_0x5530ba;for(var _0x3e91e0=_0x472d1c>0x1?void 0x0:_0x472d1c?L(_0x463e6e,_0x4e9239):_0x463e6e,_0x4de1b3=_0x196902[_0x2746f4(0xe9)]-0x1,_0x5f20bd;_0x4de1b3>=0x0;_0x4de1b3--)(_0x5f20bd=_0x196902[_0x4de1b3])&&(_0x3e91e0=_0x5f20bd(_0x3e91e0)||_0x3e91e0);return _0x3e91e0;},O=(_0x1aaa2d,_0x2ddf3b)=>(_0x372322,_0x416655)=>_0x2ddf3b(_0x372322,_0x416655,_0x1aaa2d),N=(_0x4af5f9,_0xd9a19c,_0x5ae9a6)=>Z(_0x4af5f9,typeof _0xd9a19c!=_0x5530ba(0x106)?_0xd9a19c+'':_0xd9a19c,_0x5ae9a6);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x5530ba(0x12a)]{constructor(_0x47e8a0=D,_0x37a808,_0x21a30a){const _0x2d2243=_0x5530ba;super(),this['_config']=_0x47e8a0,this[_0x2d2243(0xef)]=_0x37a808,this[_0x2d2243(0xed)]=_0x21a30a;const {..._0x245514}=c['merge']({},D,this[_0x2d2243(0x13b)]);this[_0x2d2243(0xed)][_0x2d2243(0x14d)](q,_0x245514);}[_0x5530ba(0x15c)](){const _0x59c298=_0x5530ba;[[g],[C],[p]][_0x59c298(0x104)](_0x2cb2dd=>{this['_injector']['add'](_0x2cb2dd);});}['onReady'](){const _0x2ef3c8=_0x5530ba;this['_injector'][_0x2ef3c8(0xe3)](C),this[_0x2ef3c8(0xef)][_0x2ef3c8(0xe3)](p);}},N(exports[_0x5530ba(0x159)],_0x5530ba(0x153),U),N(exports[_0x5530ba(0x159)],_0x5530ba(0x10c),c[_0x5530ba(0x11f)][_0x5530ba(0xe0)]),exports[_0x5530ba(0x159)]=W([c[_0x5530ba(0xfc)](j['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x5530ba(0x111)]),O(0x1,c[_0x5530ba(0x119)](c[_0x5530ba(0x132)])),O(0x2,c[_0x5530ba(0x127)])],exports[_0x5530ba(0x159)]);
1
+ 'use strict';const _0x400671=_0xb989;(function(_0x17de55,_0x37913d){const _0x552a69=_0xb989,_0x2fe7e0=_0x17de55();while(!![]){try{const _0x2950ec=-parseInt(_0x552a69(0x214))/0x1+-parseInt(_0x552a69(0x255))/0x2*(parseInt(_0x552a69(0x21c))/0x3)+parseInt(_0x552a69(0x230))/0x4*(-parseInt(_0x552a69(0x234))/0x5)+parseInt(_0x552a69(0x1f8))/0x6+parseInt(_0x552a69(0x222))/0x7*(-parseInt(_0x552a69(0x252))/0x8)+parseInt(_0x552a69(0x218))/0x9*(-parseInt(_0x552a69(0x1ff))/0xa)+parseInt(_0x552a69(0x1e7))/0xb*(parseInt(_0x552a69(0x221))/0xc);if(_0x2950ec===_0x37913d)break;else _0x2fe7e0['push'](_0x2fe7e0['shift']());}catch(_0x4df479){_0x2fe7e0['push'](_0x2fe7e0['shift']());}}}(_0x4f48,0x660da));Object['defineProperty'](exports,Symbol[_0x400671(0x22c)],{'value':_0x400671(0x235)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x400671(0x258)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require(_0x400671(0x246)),w=require(_0x400671(0x1fe)),P=require(_0x400671(0x210)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2816a3=>(_0x2816a3[_0x2816a3['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2816a3[_0x2816a3[_0x400671(0x229)]=0x1]=_0x400671(0x229),_0x2816a3[_0x2816a3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2816a3))(I||{}),v=(_0x58bc61=>(_0x58bc61[_0x58bc61[_0x400671(0x1fc)]=0x0]=_0x400671(0x1fc),_0x58bc61[_0x58bc61['Add']=0x1]=_0x400671(0x22f),_0x58bc61[_0x58bc61[_0x400671(0x220)]=0x2]='Reply',_0x58bc61[_0x58bc61[_0x400671(0x243)]=0x3]=_0x400671(0x243),_0x58bc61[_0x58bc61[_0x400671(0x23f)]=0x4]=_0x400671(0x23f),_0x58bc61[_0x58bc61[_0x400671(0x224)]=0x5]='Solve',_0x58bc61[_0x58bc61[_0x400671(0x201)]=-0x1]=_0x400671(0x201),_0x58bc61))(v||{});function _0xb989(_0x36285d,_0xf3716){const _0x4f48e5=_0x4f48();return _0xb989=function(_0xb9894f,_0x21b298){_0xb9894f=_0xb9894f-0x1e6;let _0x54cff1=_0x4f48e5[_0xb9894f];return _0x54cff1;},_0xb989(_0x36285d,_0xf3716);}const f=_0x413bdd=>c[_0x400671(0x226)](new Date(+_0x413bdd))['format'](_0x400671(0x1ed)),R=async(_0x582f9b,_0x25bb13)=>{const _0xa8deca=_0x400671,_0x22aa41=_0x582f9b[_0xa8deca(0x1f6)](c[_0xa8deca(0x24b)]),_0x254d48=_0x582f9b[_0xa8deca(0x1f6)](P['HTTPService']);_0x25bb13[_0xa8deca(0x1ea)](_0x114041=>{const _0x140d0a=_0xa8deca;_0x22aa41[_0x140d0a(0x21d)](_0x114041)&&_0x25bb13[_0x140d0a(0x204)](_0x114041);}),_0x25bb13[_0xa8deca(0x251)]&&(await _0x254d48['get'](_0xa8deca(0x1ec),{'params':{'userIDs':[..._0x25bb13]}}))[_0xa8deca(0x1e6)][_0xa8deca(0x23e)][_0xa8deca(0x1ea)](_0x13ea80=>{const _0x3e3919=_0xa8deca;_0x13ea80&&_0x22aa41[_0x3e3919(0x24f)](_0x13ea80);});};var $=Object[_0x400671(0x23a)],E=(_0xaccd22,_0x1d95e4,_0x562629,_0x563dbf)=>{const _0x4cc106=_0x400671;for(var _0x5ab2ae=_0x563dbf>0x1?void 0x0:_0x563dbf?$(_0x1d95e4,_0x562629):_0x1d95e4,_0x3dab54=_0xaccd22[_0x4cc106(0x20e)]-0x1,_0x3a801a;_0x3dab54>=0x0;_0x3dab54--)(_0x3a801a=_0xaccd22[_0x3dab54])&&(_0x5ab2ae=_0x3a801a(_0x5ab2ae)||_0x5ab2ae);return _0x5ab2ae;},S=(_0x65bc5c,_0x2afdfc)=>(_0x2ec5ca,_0x2d7b32)=>_0x2afdfc(_0x2ec5ca,_0x2d7b32,_0x65bc5c);let p=class extends c['Disposable']{constructor(_0x37e9c8,_0x420def,_0x1716b,_0x5cbcd2){const _0x237b4e=_0x400671;super(),this[_0x237b4e(0x1f5)]=_0x37e9c8,this[_0x237b4e(0x21e)]=_0x420def,this[_0x237b4e(0x211)]=_0x1716b,this[_0x237b4e(0x260)]=_0x5cbcd2,this[_0x237b4e(0x236)](),this[_0x237b4e(0x1eb)]();}[_0x400671(0x1eb)](){const _0x46f05f=_0x400671;this[_0x46f05f(0x200)](this[_0x46f05f(0x21e)]['commentUpdate$'][_0x46f05f(0x261)](w[_0x46f05f(0x21a)](0x10))[_0x46f05f(0x20d)](_0x4c599b=>{const _0x43631f=_0x46f05f,_0x36d10a=new Set();_0x4c599b[_0x43631f(0x1ea)](_0x330011=>{const _0x31dfd9=_0x43631f;switch(_0x330011[_0x31dfd9(0x25d)]){case _0x31dfd9(0x1ef):{const _0x5bf7df=_0x330011[_0x31dfd9(0x24d)]['personId'];_0x36d10a[_0x31dfd9(0x1ef)](_0x5bf7df);break;}}}),R(this['_injector'],_0x36d10a);}));}[_0x400671(0x236)](){const _0x2268b2=_0x400671;this[_0x2268b2(0x200)](this[_0x2268b2(0x1f5)]['commentUpdate$'][_0x2268b2(0x20d)](async _0x5a0c92=>{const _0x306ac2=_0x2268b2;var _0x225d99,_0x2d82b0,_0x3181ba,_0x36a3c4;const _0x933a83=(_0x225d99=this[_0x306ac2(0x21e)][_0x306ac2(0x209)](_0x5a0c92[_0x306ac2(0x25f)])[_0x306ac2(0x1f3)](_0x141007=>_0x141007[_0x306ac2(0x208)]===_0x5a0c92[_0x306ac2(0x208)]))==null?void 0x0:_0x225d99[_0x306ac2(0x20b)];if(!_0x933a83)return;const {unitId:_0x12bb71,subUnitId:_0xcbf57c}=_0x933a83;switch(_0x5a0c92[_0x306ac2(0x1f9)]&&this['_userService'][_0x306ac2(0x24f)](_0x5a0c92[_0x306ac2(0x1f9)]),_0x5a0c92['type']){case v[_0x306ac2(0x22f)]:break;case v[_0x306ac2(0x220)]:{this[_0x306ac2(0x21e)][_0x306ac2(0x1fa)](_0x12bb71,_0xcbf57c,{'unitId':_0x12bb71,'subUnitId':_0xcbf57c,'ref':'','id':_0x5a0c92[_0x306ac2(0x223)],'dT':f(+_0x5a0c92[_0x306ac2(0x247)]),'threadId':_0x5a0c92[_0x306ac2(0x208)],'personId':(_0x3181ba=(_0x2d82b0=_0x5a0c92[_0x306ac2(0x1f9)])==null?void 0x0:_0x2d82b0[_0x306ac2(0x20a)])!=null?_0x3181ba:_0x5a0c92[_0x306ac2(0x227)],'text':JSON[_0x306ac2(0x242)](_0x5a0c92['content']),'parentId':_0x933a83['id']});break;}case v[_0x306ac2(0x23f)]:{const _0x5c6dcb=this[_0x306ac2(0x21e)]['getComment'](_0x12bb71,_0xcbf57c,_0x5a0c92['replyId']);_0x5c6dcb&&_0x5c6dcb[_0x306ac2(0x244)]&&this['_threadCommentModel'][_0x306ac2(0x1fd)](_0x12bb71,_0xcbf57c,_0x5a0c92[_0x306ac2(0x223)]);break;}case v[_0x306ac2(0x243)]:{this['_threadCommentModel']['updateComment'](_0x12bb71,_0xcbf57c,{'commentId':_0x5a0c92['replyId'],'text':JSON['parse'](_0x5a0c92[_0x306ac2(0x250)])});break;}case v[_0x306ac2(0x224)]:{const _0x1e02a9=(_0x36a3c4=this[_0x306ac2(0x21e)]['getUnit'](_0x5a0c92[_0x306ac2(0x25f)])['find'](_0x47a4fa=>_0x47a4fa[_0x306ac2(0x208)]===_0x5a0c92[_0x306ac2(0x208)]))==null?void 0x0:_0x36a3c4[_0x306ac2(0x20b)];_0x1e02a9&&this['_threadCommentModel']['resolveComment'](_0x12bb71,_0xcbf57c,_0x1e02a9['id'],_0x5a0c92['solved']===I[_0x306ac2(0x229)]);break;}}}));}};p=E([S(0x0,c[_0x400671(0x20c)](b[_0x400671(0x1f2)])),S(0x1,c[_0x400671(0x20c)](M[_0x400671(0x205)])),S(0x2,c[_0x400671(0x20c)](c['UserManagerService'])),S(0x3,c['Inject'](c['Injector']))],p);const q=_0x400671(0x25a),D={};var A=Object[_0x400671(0x23a)],x=(_0x3f2e64,_0x334b12,_0x36d681,_0x477e34)=>{for(var _0x50c561=_0x477e34>0x1?void 0x0:_0x477e34?A(_0x334b12,_0x36d681):_0x334b12,_0x256afd=_0x3f2e64['length']-0x1,_0x1af36c;_0x256afd>=0x0;_0x256afd--)(_0x1af36c=_0x3f2e64[_0x256afd])&&(_0x50c561=_0x1af36c(_0x50c561)||_0x50c561);return _0x50c561;},_=(_0x3f5f90,_0x1ddd37)=>(_0x2d1871,_0x51b843)=>_0x1ddd37(_0x2d1871,_0x51b843,_0x3f5f90);function Y(_0x5d095b,_0x4b7d5a){const _0x486397=_0x400671,_0x394031=_0x5d095b[_0x486397(0x240)][0x0];return{..._0x4b7d5a,'id':_0x394031[_0x486397(0x223)],'resolved':_0x5d095b[_0x486397(0x1f7)]===0x1,'dT':f(_0x394031[_0x486397(0x247)]),'personId':_0x394031['userId'],'threadId':_0x394031[_0x486397(0x208)]};}function G(_0x43520f,_0x5a1ee1,_0x4c8af6){const _0x5a7b45=_0x400671;var _0x524f9c,_0x1e905a;if(((_0x1e905a=(_0x524f9c=_0x43520f==null?void 0x0:_0x43520f[_0x5a7b45(0x240)])==null?void 0x0:_0x524f9c[_0x5a7b45(0x20e)])!=null?_0x1e905a:0x0)>0x0){const _0x37a120=(_0x3e73e6,_0x58648f)=>({'id':_0x3e73e6[_0x5a7b45(0x223)],'threadId':_0x3e73e6[_0x5a7b45(0x208)],'dT':f(_0x3e73e6[_0x5a7b45(0x247)]),'personId':_0x3e73e6[_0x5a7b45(0x227)],'resolved':_0x43520f['solved']===I[_0x5a7b45(0x229)],'unitId':_0x5a1ee1,'subUnitId':_0x4c8af6,'text':JSON[_0x5a7b45(0x242)](_0x3e73e6[_0x5a7b45(0x250)]),'parentId':_0x58648f}),_0x462199=_0x37a120(_0x43520f[_0x5a7b45(0x240)][0x0]);return{..._0x462199,'children':_0x43520f[_0x5a7b45(0x240)][_0x5a7b45(0x25c)](0x1)[_0x5a7b45(0x1f1)](_0x4195e7=>_0x37a120(_0x4195e7,_0x462199['id']))};}return null;}let g=class{constructor(_0x3c461a,_0x10a566,_0x163cdd,_0x4a2f09){const _0x24f0c2=_0x400671;this[_0x24f0c2(0x241)]=_0x3c461a,this[_0x24f0c2(0x211)]=_0x10a566,this[_0x24f0c2(0x22a)]=_0x163cdd,this[_0x24f0c2(0x260)]=_0x4a2f09;}async[_0x400671(0x1fa)](_0x22cbe5){const _0x4630a6=_0x400671;var _0x7e4b48,_0x3000e7;const {parentId:_0x1ea06c,unitId:_0x47bcfa,text:_0x365987,threadId:_0x59efa1}=_0x22cbe5,_0x52bfde=(_0x3000e7=(_0x7e4b48=_0x365987[_0x4630a6(0x215)])==null?void 0x0:_0x7e4b48[_0x4630a6(0x245)](_0x13f776=>_0x13f776[_0x4630a6(0x225)]===c[_0x4630a6(0x23c)]['COMMENT'])['map'](_0x5210fb=>_0x5210fb['rangeId']))!=null?_0x3000e7:[],_0x676400=JSON['stringify'](_0x365987),_0x4a53e3=(await this['_sessionService'][_0x4630a6(0x249)](_0x47bcfa))[_0x4630a6(0x25e)]();if(_0x1ea06c){const _0x4ff5c8={'memberId':_0x4a53e3,'unitId':_0x47bcfa,'content':_0x676400,'mention':_0x52bfde,'threadId':_0x59efa1},_0x5644fd=(await this[_0x4630a6(0x241)][_0x4630a6(0x254)](_0x4630a6(0x228)+_0x47bcfa+_0x4630a6(0x207),{'body':_0x4ff5c8}))[_0x4630a6(0x1e6)][_0x4630a6(0x24e)];return{..._0x22cbe5,'id':_0x5644fd[_0x4630a6(0x223)],'dT':c[_0x4630a6(0x226)](+_0x5644fd[_0x4630a6(0x247)])['format'](_0x4630a6(0x1ed)),'personId':_0x5644fd[_0x4630a6(0x227)]};}else{const _0x5cc776={'memberId':_0x4a53e3,'unitId':_0x47bcfa,'content':_0x676400,'mention':_0x52bfde},_0x21724d=await this[_0x4630a6(0x241)][_0x4630a6(0x254)](_0x4630a6(0x228)+_0x47bcfa+_0x4630a6(0x24c),{'body':_0x5cc776});return Y(_0x21724d[_0x4630a6(0x1e6)][_0x4630a6(0x213)],_0x22cbe5);}}async[_0x400671(0x1e8)](_0x80b400){const _0x5e7e51=_0x400671;var _0x2e2fae,_0x5b42b5;const {text:_0x3e6b8c,unitId:_0x441664}=_0x80b400,_0x4bec1a=(_0x5b42b5=(_0x2e2fae=_0x3e6b8c[_0x5e7e51(0x215)])==null?void 0x0:_0x2e2fae[_0x5e7e51(0x245)](_0x14c940=>_0x14c940[_0x5e7e51(0x225)]===c['CustomRangeType'][_0x5e7e51(0x216)])[_0x5e7e51(0x1f1)](_0x5aa463=>_0x5aa463[_0x5e7e51(0x23d)]))!=null?_0x5b42b5:[],_0x25f592=JSON['stringify'](_0x3e6b8c),_0x156cc4=_0x80b400[_0x5e7e51(0x208)],_0x2330b6=_0x80b400['id'],_0x4e0b9={'memberId':(await this[_0x5e7e51(0x22a)][_0x5e7e51(0x249)](_0x441664))[_0x5e7e51(0x25e)](),'unitId':_0x441664,'threadId':_0x156cc4,'mention':_0x4bec1a,'content':_0x25f592,'replyId':_0x2330b6},_0x2d9dac=await this[_0x5e7e51(0x241)]['post']('/universer-api/comment/unit/'+_0x441664+_0x5e7e51(0x1e9),{'body':_0x4e0b9});return!_0x2d9dac['body'][_0x5e7e51(0x21f)]||_0x2d9dac[_0x5e7e51(0x1e6)]['error'][_0x5e7e51(0x217)]===0x1;}async[_0x400671(0x24a)](_0x1dc592){const _0x3481fe=_0x400671,{unitId:_0x153ecd}=_0x1dc592,_0x5c3ae8=_0x1dc592['threadId'],_0x266b3e={'memberId':this['_userService'][_0x3481fe(0x233)]()[_0x3481fe(0x20a)],'unitId':_0x153ecd,'threadId':_0x5c3ae8,'solved':_0x1dc592['resolved']?I[_0x3481fe(0x229)]:I['OpenOrReOpen']},_0x4044bc=await this[_0x3481fe(0x241)][_0x3481fe(0x254)]('/universer-api/comment/unit/'+_0x153ecd+'/solved',{'body':_0x266b3e});return!_0x4044bc[_0x3481fe(0x1e6)]['error']||_0x4044bc[_0x3481fe(0x1e6)]['error'][_0x3481fe(0x217)]===0x1;}async[_0x400671(0x1fd)](_0x1dd716,_0x30c16a,_0x5b39e5,_0x2a622b){const _0x5c9837=_0x400671,_0xa22f5d={'memberId':(await this[_0x5c9837(0x22a)][_0x5c9837(0x249)](_0x1dd716))[_0x5c9837(0x25e)](),'threadId':_0x5b39e5,'replyId':_0x2a622b,'unitId':_0x1dd716},_0x91d0e9=await this[_0x5c9837(0x241)]['post'](_0x5c9837(0x228)+_0x1dd716+_0x5c9837(0x231),{'body':_0xa22f5d});return!_0x91d0e9[_0x5c9837(0x1e6)]['error']||_0x91d0e9['body']['error'][_0x5c9837(0x217)]===0x1;}async[_0x400671(0x212)](_0x2777a5,_0x5c7199,_0x516e28){const _0x47b45a=_0x400671,_0xc72ff0={'unitId':_0x2777a5,'threadId':_0x516e28},_0x76d234=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2777a5+'/list',{'body':_0xc72ff0}),_0x5984ef=_0x516e28[_0x47b45a(0x1f1)](_0x1648f9=>G(_0x76d234['body'][_0x47b45a(0x219)][_0x1648f9],_0x2777a5,_0x5c7199))['filter'](Boolean);return Object[_0x47b45a(0x232)](_0x76d234[_0x47b45a(0x1e6)][_0x47b45a(0x23e)])[_0x47b45a(0x1ea)](_0x47e8f5=>{const _0xfa8323=_0x47b45a;this[_0xfa8323(0x211)][_0xfa8323(0x24f)](_0x47e8f5);}),_0x5984ef;}[_0x400671(0x237)](_0x10bd86){const _0x4b8c96=_0x400671;return{'id':_0x10bd86['id'],'threadId':_0x10bd86[_0x4b8c96(0x208)],'ref':_0x10bd86[_0x4b8c96(0x256)]};}};g=x([_(0x0,c[_0x400671(0x20c)](P[_0x400671(0x202)])),_(0x1,c['Inject'](c[_0x400671(0x24b)])),_(0x2,c[_0x400671(0x20c)](b[_0x400671(0x23b)])),_(0x3,c['Inject'](c[_0x400671(0x21b)]))],g);var H=Object[_0x400671(0x23a)],J=(_0x486776,_0x2e06df,_0x31cd2b,_0x358146)=>{const _0xba3de6=_0x400671;for(var _0x435fd6=_0x358146>0x1?void 0x0:_0x358146?H(_0x2e06df,_0x31cd2b):_0x2e06df,_0x36ecab=_0x486776[_0xba3de6(0x20e)]-0x1,_0x549243;_0x36ecab>=0x0;_0x36ecab--)(_0x549243=_0x486776[_0x36ecab])&&(_0x435fd6=_0x549243(_0x435fd6)||_0x435fd6);return _0x435fd6;},y=(_0x3c7abe,_0xe406d1)=>(_0x328a81,_0x4b49e5)=>_0xe406d1(_0x328a81,_0x4b49e5,_0x3c7abe);let C=class extends c[_0x400671(0x25b)]{constructor(_0x23afb0,_0x18a5b7){const _0x5e6074=_0x400671;super(),this['_threadCommentDataSourceService']=_0x23afb0,this[_0x5e6074(0x1f0)]=_0x18a5b7,this[_0x5e6074(0x206)]();}[_0x400671(0x206)](){const _0x500958=_0x400671;this['_threadCommentDataSourceService']['dataSource']=this[_0x500958(0x1f0)],this[_0x500958(0x259)][_0x500958(0x203)]=!0x1;}};C=J([y(0x0,M[_0x400671(0x253)]),y(0x1,c[_0x400671(0x20c)](g))],C);var F=Object[_0x400671(0x22b)],L=Object[_0x400671(0x23a)],Z=(_0x5f07a5,_0x4c483a,_0x1c5482)=>_0x4c483a in _0x5f07a5?F(_0x5f07a5,_0x4c483a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1c5482}):_0x5f07a5[_0x4c483a]=_0x1c5482,W=(_0x291e67,_0x43600e,_0x2dc7af,_0x581378)=>{const _0x24a9d8=_0x400671;for(var _0x2ec9ad=_0x581378>0x1?void 0x0:_0x581378?L(_0x43600e,_0x2dc7af):_0x43600e,_0x4d17ba=_0x291e67[_0x24a9d8(0x20e)]-0x1,_0x566828;_0x4d17ba>=0x0;_0x4d17ba--)(_0x566828=_0x291e67[_0x4d17ba])&&(_0x2ec9ad=_0x566828(_0x2ec9ad)||_0x2ec9ad);return _0x2ec9ad;},O=(_0x3d945c,_0x1daf43)=>(_0x23716a,_0x3be25a)=>_0x1daf43(_0x23716a,_0x3be25a,_0x3d945c),N=(_0xab6f17,_0x1bf356,_0x77fa52)=>Z(_0xab6f17,typeof _0x1bf356!='symbol'?_0x1bf356+'':_0x1bf356,_0x77fa52);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x400671(0x1fb)]{constructor(_0x19dbd7=D,_0x41a21c,_0x23e500){const _0x2a9db1=_0x400671;super(),this['_config']=_0x19dbd7,this['_injector']=_0x41a21c,this['_configService']=_0x23e500;const {..._0x38101b}=c['merge']({},D,this['_config']);this[_0x2a9db1(0x20f)][_0x2a9db1(0x22d)](q,_0x38101b);}[_0x400671(0x22e)](){const _0x360a15=_0x400671;[[g],[C],[p]][_0x360a15(0x1ea)](_0x581d3b=>{const _0x14c9ef=_0x360a15;this[_0x14c9ef(0x260)]['add'](_0x581d3b);});}[_0x400671(0x238)](){const _0xe08152=_0x400671;this['_injector']['get'](C),this['_injector'][_0xe08152(0x1f6)](p);}},N(exports[_0x400671(0x1ee)],_0x400671(0x257),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x400671(0x1ee)]=W([c[_0x400671(0x248)](j[_0x400671(0x239)],b[_0x400671(0x1f4)],T['UniverLicensePlugin']),O(0x1,c[_0x400671(0x20c)](c[_0x400671(0x21b)])),O(0x2,c[_0x400671(0x262)])],exports['UniverThreadCommentDataSourcePlugin']);function _0x4f48(){const _0x323eee=['payload','reply','addUser','content','size','5432ehVOiy','IThreadCommentDataSourceService','post','202UmXCne','ref','pluginName','@univerjs-pro/license','_threadCommentDataSourceService','thread-comment-data-source.config','Disposable','slice','type','getMemberID','unitId','_injector','pipe','IConfigService','body','1062974lDhXxw','updateComment','/edit','forEach','_initUserSync','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','UniverThreadCommentDataSourcePlugin','add','_threadCommentDataSource','map','CommentService','find','UniverCollaborationClientPlugin','_commentService','get','solved','580242xAZrAs','user','addComment','Plugin','Unknown','deleteComment','rxjs','2010NYnKlX','disposeWithMe','UNRECOGNIZED','HTTPService','syncUpdateMutationToColla','delete','ThreadCommentModel','_initDataSource','/reply','threadId','getUnit','userID','root','Inject','subscribe','length','_configService','@univerjs/network','_userService','listComments','comment','688358dAeKww','customRanges','COMMENT','code','3069eBSSwQ','comments','bufferTime','Injector','11031gdqcGG','getUser','_threadCommentModel','error','Reply','252UYfcGv','5726ibTAmh','replyId','Solve','rangeType','dayjs','userId','/universer-api/comment/unit/','Solved','_sessionService','defineProperty','toStringTag','setConfig','onStarting','Add','4IcDpkb','/delete','values','getCurrentUser','121565MBGVfy','Module','_init','saveCommentToSnapshot','onReady','UniverThreadCommentUIPlugin','getOwnPropertyDescriptor','CollaborationSessionService','CustomRangeType','rangeId','users','Delete','replies','_httpService','parse','Edit','parentId','filter','@univerjs/thread-comment','createTimestamp','DependentOn','requireSession','resolveComment','UserManagerService','/add'];_0x4f48=function(){return _0x323eee;};return _0x4f48();}
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x30ca78=_0x994c;(function(_0x543fde,_0x395628){const _0x14a7fd=_0x994c,_0x4065f7=_0x543fde();while(!![]){try{const _0x1e4be6=-parseInt(_0x14a7fd(0x243))/0x1*(parseInt(_0x14a7fd(0x1fc))/0x2)+-parseInt(_0x14a7fd(0x246))/0x3+-parseInt(_0x14a7fd(0x224))/0x4+-parseInt(_0x14a7fd(0x1e9))/0x5+parseInt(_0x14a7fd(0x20b))/0x6*(parseInt(_0x14a7fd(0x1f6))/0x7)+-parseInt(_0x14a7fd(0x218))/0x8+-parseInt(_0x14a7fd(0x241))/0x9*(-parseInt(_0x14a7fd(0x238))/0xa);if(_0x1e4be6===_0x395628)break;else _0x4065f7['push'](_0x4065f7['shift']());}catch(_0x632ecb){_0x4065f7['push'](_0x4065f7['shift']());}}}(_0x3361,0xaa513));import{CommentService as _0xdb2916,CollaborationSessionService as _0x208670,UniverCollaborationClientPlugin as _0x4e5df2}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x6e3915}from'@univerjs-pro/license';import{dayjs as _0x300099,UserManagerService as _0x37422e,Inject as _0x352b53,Injector as _0x5b310b,Disposable as _0x351a69,CustomRangeType as _0x69d053,UniverInstanceType as _0x36f1da,DependentOn as _0x1e16fa,IConfigService as _0x2b2f90,Plugin as _0xcec0a2,merge as _0x4df787}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4ef1d6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x327d81,IThreadCommentDataSourceService as _0x5949bb}from'@univerjs/thread-comment';import{bufferTime as _0x66e708}from'rxjs';function _0x994c(_0x29496f,_0x300868){const _0x336196=_0x3361();return _0x994c=function(_0x994ccc,_0x396c45){_0x994ccc=_0x994ccc-0x1e4;let _0x19c8ae=_0x336196[_0x994ccc];return _0x19c8ae;},_0x994c(_0x29496f,_0x300868);}import{HTTPService as _0xfebc63}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x314ece=>(_0x314ece[_0x314ece[_0x30ca78(0x1e5)]=0x0]='OpenOrReOpen',_0x314ece[_0x314ece['Solved']=0x1]='Solved',_0x314ece[_0x314ece[_0x30ca78(0x21f)]=-0x1]=_0x30ca78(0x21f),_0x314ece))(I||{}),v=(_0x4eebff=>(_0x4eebff[_0x4eebff['Unknown']=0x0]=_0x30ca78(0x1e4),_0x4eebff[_0x4eebff['Add']=0x1]=_0x30ca78(0x202),_0x4eebff[_0x4eebff[_0x30ca78(0x21d)]=0x2]=_0x30ca78(0x21d),_0x4eebff[_0x4eebff[_0x30ca78(0x210)]=0x3]='Edit',_0x4eebff[_0x4eebff[_0x30ca78(0x233)]=0x4]=_0x30ca78(0x233),_0x4eebff[_0x4eebff[_0x30ca78(0x245)]=0x5]=_0x30ca78(0x245),_0x4eebff[_0x4eebff[_0x30ca78(0x21f)]=-0x1]=_0x30ca78(0x21f),_0x4eebff))(v||{});const D=_0x2d129d=>_0x300099(new Date(+_0x2d129d))[_0x30ca78(0x237)](_0x30ca78(0x1e6)),B=async(_0x16a063,_0x1622cb)=>{const _0x1e31e5=_0x30ca78,_0x49c189=_0x16a063[_0x1e31e5(0x216)](_0x37422e),_0x413b31=_0x16a063[_0x1e31e5(0x216)](_0xfebc63);_0x1622cb['forEach'](_0x1da042=>{const _0x5c549a=_0x1e31e5;_0x49c189[_0x5c549a(0x21e)](_0x1da042)&&_0x1622cb[_0x5c549a(0x1f4)](_0x1da042);}),_0x1622cb[_0x1e31e5(0x1ea)]&&(await _0x413b31[_0x1e31e5(0x216)]('/universer-api/user/list',{'params':{'userIDs':[..._0x1622cb]}}))['body'][_0x1e31e5(0x1ed)]['forEach'](_0x576b3f=>{const _0x4e348d=_0x1e31e5;_0x576b3f&&_0x49c189[_0x4e348d(0x1e7)](_0x576b3f);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x486637,_0x1fac66,_0x447e77,_0x4ecc03)=>{const _0x3ec821=_0x30ca78;for(var _0x286b46=_0x4ecc03>0x1?void 0x0:_0x4ecc03?K(_0x1fac66,_0x447e77):_0x1fac66,_0x30463d=_0x486637[_0x3ec821(0x236)]-0x1,_0x42aeab;_0x30463d>=0x0;_0x30463d--)(_0x42aeab=_0x486637[_0x30463d])&&(_0x286b46=_0x42aeab(_0x286b46)||_0x286b46);return _0x286b46;},p=(_0x17451c,_0x10764d)=>(_0x4e73f0,_0x360391)=>_0x10764d(_0x4e73f0,_0x360391,_0x17451c);let S=class extends _0x351a69{constructor(_0x616f9c,_0x1ca49f,_0x3c3295,_0x29d0b7){const _0x24b294=_0x30ca78;super(),this[_0x24b294(0x1ef)]=_0x616f9c,this[_0x24b294(0x1f5)]=_0x1ca49f,this[_0x24b294(0x231)]=_0x3c3295,this[_0x24b294(0x23c)]=_0x29d0b7,this[_0x24b294(0x225)](),this[_0x24b294(0x205)]();}[_0x30ca78(0x205)](){const _0x174269=_0x30ca78;this[_0x174269(0x22c)](this[_0x174269(0x1f5)]['commentUpdate$'][_0x174269(0x1eb)](_0x66e708(0x10))[_0x174269(0x235)](_0x2dcc43=>{const _0x4283f7=_0x174269,_0x417650=new Set();_0x2dcc43['forEach'](_0x3137e3=>{const _0x2d2cae=_0x994c;switch(_0x3137e3[_0x2d2cae(0x201)]){case _0x2d2cae(0x1f3):{const _0x17dd30=_0x3137e3['payload']['personId'];_0x417650[_0x2d2cae(0x1f3)](_0x17dd30);break;}}}),B(this[_0x4283f7(0x23c)],_0x417650);}));}[_0x30ca78(0x225)](){const _0x22f0c8=_0x30ca78;this[_0x22f0c8(0x22c)](this[_0x22f0c8(0x1ef)][_0x22f0c8(0x229)]['subscribe'](async _0x19304b=>{const _0x57cfdc=_0x22f0c8;var _0x56ac86,_0x13709c,_0x1b1da3,_0x513d21;const _0x238751=(_0x56ac86=this[_0x57cfdc(0x1f5)][_0x57cfdc(0x21c)](_0x19304b[_0x57cfdc(0x223)])[_0x57cfdc(0x242)](_0x2eae88=>_0x2eae88[_0x57cfdc(0x1fb)]===_0x19304b[_0x57cfdc(0x1fb)]))==null?void 0x0:_0x56ac86[_0x57cfdc(0x209)];if(!_0x238751)return;const {unitId:_0x1c0783,subUnitId:_0x5235ea}=_0x238751;switch(_0x19304b[_0x57cfdc(0x247)]&&this['_userService']['addUser'](_0x19304b['user']),_0x19304b['type']){case v[_0x57cfdc(0x202)]:break;case v[_0x57cfdc(0x21d)]:{this['_threadCommentModel'][_0x57cfdc(0x1f8)](_0x1c0783,_0x5235ea,{'unitId':_0x1c0783,'subUnitId':_0x5235ea,'ref':'','id':_0x19304b[_0x57cfdc(0x1fa)],'dT':D(+_0x19304b['createTimestamp']),'threadId':_0x19304b[_0x57cfdc(0x1fb)],'personId':(_0x1b1da3=(_0x13709c=_0x19304b['user'])==null?void 0x0:_0x13709c[_0x57cfdc(0x23a)])!=null?_0x1b1da3:_0x19304b[_0x57cfdc(0x234)],'text':JSON[_0x57cfdc(0x22d)](_0x19304b[_0x57cfdc(0x206)]),'parentId':_0x238751['id']});break;}case v['Delete']:{const _0x164c92=this[_0x57cfdc(0x1f5)][_0x57cfdc(0x21a)](_0x1c0783,_0x5235ea,_0x19304b['replyId']);_0x164c92&&_0x164c92[_0x57cfdc(0x21b)]&&this[_0x57cfdc(0x1f5)][_0x57cfdc(0x222)](_0x1c0783,_0x5235ea,_0x19304b[_0x57cfdc(0x1fa)]);break;}case v['Edit']:{this[_0x57cfdc(0x1f5)]['updateComment'](_0x1c0783,_0x5235ea,{'commentId':_0x19304b[_0x57cfdc(0x1fa)],'text':JSON[_0x57cfdc(0x22d)](_0x19304b['content'])});break;}case v[_0x57cfdc(0x245)]:{const _0x16a2b7=(_0x513d21=this['_threadCommentModel']['getUnit'](_0x19304b['unitId'])['find'](_0x28c8b6=>_0x28c8b6[_0x57cfdc(0x1fb)]===_0x19304b[_0x57cfdc(0x1fb)]))==null?void 0x0:_0x513d21[_0x57cfdc(0x209)];_0x16a2b7&&this[_0x57cfdc(0x1f5)][_0x57cfdc(0x207)](_0x1c0783,_0x5235ea,_0x16a2b7['id'],_0x19304b[_0x57cfdc(0x22b)]===I[_0x57cfdc(0x22f)]);break;}}}));}};S=V([p(0x0,_0x352b53(_0xdb2916)),p(0x1,_0x352b53(_0x327d81)),p(0x2,_0x352b53(_0x37422e)),p(0x3,_0x352b53(_0x5b310b))],S);function _0x3361(){const _0x2febe6=['_userService','pluginName','Delete','userId','subscribe','length','format','530GKFVLt','getOwnPropertyDescriptor','userID','code','_injector','comment','symbol','_sessionService','listComments','580311ApTtTX','find','2TfAQzA','post','Solve','3305457kBFUIZ','user','Unknown','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','addUser','requireSession','4167385WQggtB','size','pipe','setConfig','users','filter','_commentService','_configService','getMemberID','_initDataSource','add','delete','_threadCommentModel','7MgYdmU','customRanges','addComment','ref','replyId','threadId','599350AmOcRz','syncUpdateMutationToColla','/delete','_config','/solved','type','Add','comments','forEach','_initUserSync','content','resolveComment','/add','root','/reply','3038502frSRYE','body','onReady','/universer-api/comment/unit/','error','Edit','_threadCommentDataSourceService','rangeId','values','slice','replies','get','createTimestamp','2888576UZaLMr','resolved','getComment','parentId','getUnit','Reply','getUser','UNRECOGNIZED','reply','stringify','deleteComment','unitId','1321868GeFRvJ','_init','COMMENT','map','_threadCommentDataSource','commentUpdate$','_httpService','solved','disposeWithMe','parse','rangeType','Solved','dataSource'];_0x3361=function(){return _0x2febe6;};return _0x3361();}const z='thread-comment-data-source.config',M={};var k=Object[_0x30ca78(0x239)],Q=(_0x48113,_0x2d55f7,_0x569620,_0x17a119)=>{for(var _0x2b38b7=_0x17a119>0x1?void 0x0:_0x17a119?k(_0x2d55f7,_0x569620):_0x2d55f7,_0x1e1e71=_0x48113['length']-0x1,_0x4d1906;_0x1e1e71>=0x0;_0x1e1e71--)(_0x4d1906=_0x48113[_0x1e1e71])&&(_0x2b38b7=_0x4d1906(_0x2b38b7)||_0x2b38b7);return _0x2b38b7;},_=(_0x45722e,_0x5085da)=>(_0x4a22fe,_0xd1f261)=>_0x5085da(_0x4a22fe,_0xd1f261,_0x45722e);function X(_0xcd4ff1,_0x1f4336){const _0x2d4f54=_0x30ca78,_0x4e5431=_0xcd4ff1[_0x2d4f54(0x215)][0x0];return{..._0x1f4336,'id':_0x4e5431[_0x2d4f54(0x1fa)],'resolved':_0xcd4ff1['solved']===0x1,'dT':D(_0x4e5431[_0x2d4f54(0x217)]),'personId':_0x4e5431['userId'],'threadId':_0x4e5431[_0x2d4f54(0x1fb)]};}function ee(_0x1aea44,_0x3d5dcd,_0x3d7d76){const _0x2743f6=_0x30ca78;var _0x2d0d0f,_0xdbd4bb;if(((_0xdbd4bb=(_0x2d0d0f=_0x1aea44==null?void 0x0:_0x1aea44[_0x2743f6(0x215)])==null?void 0x0:_0x2d0d0f['length'])!=null?_0xdbd4bb:0x0)>0x0){const _0x49e25c=(_0x3ae6f5,_0x53792e)=>({'id':_0x3ae6f5[_0x2743f6(0x1fa)],'threadId':_0x3ae6f5[_0x2743f6(0x1fb)],'dT':D(_0x3ae6f5[_0x2743f6(0x217)]),'personId':_0x3ae6f5[_0x2743f6(0x234)],'resolved':_0x1aea44[_0x2743f6(0x22b)]===I['Solved'],'unitId':_0x3d5dcd,'subUnitId':_0x3d7d76,'text':JSON[_0x2743f6(0x22d)](_0x3ae6f5[_0x2743f6(0x206)]),'parentId':_0x53792e}),_0x5015b9=_0x49e25c(_0x1aea44[_0x2743f6(0x215)][0x0]);return{..._0x5015b9,'children':_0x1aea44[_0x2743f6(0x215)][_0x2743f6(0x214)](0x1)['map'](_0x37dce6=>_0x49e25c(_0x37dce6,_0x5015b9['id']))};}return null;}let f=class{constructor(_0x140e22,_0x528c1a,_0x34eba7,_0x2bafda){const _0x1f8998=_0x30ca78;this[_0x1f8998(0x22a)]=_0x140e22,this[_0x1f8998(0x231)]=_0x528c1a,this[_0x1f8998(0x23f)]=_0x34eba7,this[_0x1f8998(0x23c)]=_0x2bafda;}async[_0x30ca78(0x1f8)](_0x188e7b){const _0x41a016=_0x30ca78;var _0x4adc4e,_0xe97026;const {parentId:_0x4b1e44,unitId:_0x4baf4,text:_0x57740d,threadId:_0x2518e5}=_0x188e7b,_0xd70a8f=(_0xe97026=(_0x4adc4e=_0x57740d[_0x41a016(0x1f7)])==null?void 0x0:_0x4adc4e[_0x41a016(0x1ee)](_0x146e9b=>_0x146e9b[_0x41a016(0x22e)]===_0x69d053[_0x41a016(0x226)])[_0x41a016(0x227)](_0x550f8b=>_0x550f8b[_0x41a016(0x212)]))!=null?_0xe97026:[],_0x400144=JSON[_0x41a016(0x221)](_0x57740d),_0x409ae1=(await this[_0x41a016(0x23f)][_0x41a016(0x1e8)](_0x4baf4))[_0x41a016(0x1f1)]();if(_0x4b1e44){const _0x2f48e5={'memberId':_0x409ae1,'unitId':_0x4baf4,'content':_0x400144,'mention':_0xd70a8f,'threadId':_0x2518e5},_0x6efe7d=(await this[_0x41a016(0x22a)]['post']('/universer-api/comment/unit/'+_0x4baf4+_0x41a016(0x20a),{'body':_0x2f48e5}))[_0x41a016(0x20c)][_0x41a016(0x220)];return{..._0x188e7b,'id':_0x6efe7d[_0x41a016(0x1fa)],'dT':_0x300099(+_0x6efe7d[_0x41a016(0x217)])[_0x41a016(0x237)](_0x41a016(0x1e6)),'personId':_0x6efe7d['userId']};}else{const _0x3554a3={'memberId':_0x409ae1,'unitId':_0x4baf4,'content':_0x400144,'mention':_0xd70a8f},_0x10fd55=await this[_0x41a016(0x22a)][_0x41a016(0x244)](_0x41a016(0x20e)+_0x4baf4+_0x41a016(0x208),{'body':_0x3554a3});return X(_0x10fd55['body'][_0x41a016(0x23d)],_0x188e7b);}}async['updateComment'](_0x38d09f){const _0x3eb677=_0x30ca78;var _0x5952a9,_0x1f84a4;const {text:_0x44a756,unitId:_0x16286c}=_0x38d09f,_0x283216=(_0x1f84a4=(_0x5952a9=_0x44a756[_0x3eb677(0x1f7)])==null?void 0x0:_0x5952a9[_0x3eb677(0x1ee)](_0x5eed88=>_0x5eed88[_0x3eb677(0x22e)]===_0x69d053[_0x3eb677(0x226)])[_0x3eb677(0x227)](_0x4d9888=>_0x4d9888[_0x3eb677(0x212)]))!=null?_0x1f84a4:[],_0x32c298=JSON['stringify'](_0x44a756),_0x26b4ba=_0x38d09f[_0x3eb677(0x1fb)],_0x586433=_0x38d09f['id'],_0x9daa54={'memberId':(await this[_0x3eb677(0x23f)][_0x3eb677(0x1e8)](_0x16286c))['getMemberID'](),'unitId':_0x16286c,'threadId':_0x26b4ba,'mention':_0x283216,'content':_0x32c298,'replyId':_0x586433},_0x575f2a=await this['_httpService']['post'](_0x3eb677(0x20e)+_0x16286c+'/edit',{'body':_0x9daa54});return!_0x575f2a[_0x3eb677(0x20c)][_0x3eb677(0x20f)]||_0x575f2a[_0x3eb677(0x20c)][_0x3eb677(0x20f)]['code']===0x1;}async[_0x30ca78(0x207)](_0x5afda0){const _0x9a4780=_0x30ca78,{unitId:_0x393ec6}=_0x5afda0,_0x1be5f1=_0x5afda0[_0x9a4780(0x1fb)],_0x1855c9={'memberId':this[_0x9a4780(0x231)]['getCurrentUser']()['userID'],'unitId':_0x393ec6,'threadId':_0x1be5f1,'solved':_0x5afda0[_0x9a4780(0x219)]?I[_0x9a4780(0x22f)]:I['OpenOrReOpen']},_0x1558ac=await this[_0x9a4780(0x22a)][_0x9a4780(0x244)](_0x9a4780(0x20e)+_0x393ec6+_0x9a4780(0x200),{'body':_0x1855c9});return!_0x1558ac[_0x9a4780(0x20c)]['error']||_0x1558ac[_0x9a4780(0x20c)][_0x9a4780(0x20f)]['code']===0x1;}async['deleteComment'](_0x49c3a5,_0x3f7df2,_0x457a8e,_0x3e0302){const _0x2b39a8=_0x30ca78,_0x3a301f={'memberId':(await this[_0x2b39a8(0x23f)][_0x2b39a8(0x1e8)](_0x49c3a5))['getMemberID'](),'threadId':_0x457a8e,'replyId':_0x3e0302,'unitId':_0x49c3a5},_0x5157f0=await this[_0x2b39a8(0x22a)][_0x2b39a8(0x244)](_0x2b39a8(0x20e)+_0x49c3a5+_0x2b39a8(0x1fe),{'body':_0x3a301f});return!_0x5157f0[_0x2b39a8(0x20c)]['error']||_0x5157f0['body'][_0x2b39a8(0x20f)][_0x2b39a8(0x23b)]===0x1;}async[_0x30ca78(0x240)](_0x4d6f99,_0x548c2f,_0x3c3e1a){const _0x802a08=_0x30ca78,_0x2d6269={'unitId':_0x4d6f99,'threadId':_0x3c3e1a},_0x2444a3=await this[_0x802a08(0x22a)]['post'](_0x802a08(0x20e)+_0x4d6f99+'/list',{'body':_0x2d6269}),_0x5601a0=_0x3c3e1a['map'](_0x55dfcc=>ee(_0x2444a3['body'][_0x802a08(0x203)][_0x55dfcc],_0x4d6f99,_0x548c2f))[_0x802a08(0x1ee)](Boolean);return Object[_0x802a08(0x213)](_0x2444a3[_0x802a08(0x20c)][_0x802a08(0x1ed)])[_0x802a08(0x204)](_0x2adcea=>{const _0x294282=_0x802a08;this[_0x294282(0x231)][_0x294282(0x1e7)](_0x2adcea);}),_0x5601a0;}['saveCommentToSnapshot'](_0x54f96c){const _0x4cef56=_0x30ca78;return{'id':_0x54f96c['id'],'threadId':_0x54f96c[_0x4cef56(0x1fb)],'ref':_0x54f96c[_0x4cef56(0x1f9)]};}};f=Q([_(0x0,_0x352b53(_0xfebc63)),_(0x1,_0x352b53(_0x37422e)),_(0x2,_0x352b53(_0x208670)),_(0x3,_0x352b53(_0x5b310b))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x4d9e51,_0x3a7114,_0x4f4773,_0x498a1a)=>{const _0xb4909c=_0x30ca78;for(var _0x2ff64e=_0x498a1a>0x1?void 0x0:_0x498a1a?re(_0x3a7114,_0x4f4773):_0x3a7114,_0x1bf461=_0x4d9e51[_0xb4909c(0x236)]-0x1,_0x1f9152;_0x1bf461>=0x0;_0x1bf461--)(_0x1f9152=_0x4d9e51[_0x1bf461])&&(_0x2ff64e=_0x1f9152(_0x2ff64e)||_0x2ff64e);return _0x2ff64e;},N=(_0x3913e8,_0x11c9a7)=>(_0xaae9e0,_0x5933ca)=>_0x11c9a7(_0xaae9e0,_0x5933ca,_0x3913e8);let g=class extends _0x351a69{constructor(_0x5944b1,_0x6e3272){const _0x5350bb=_0x30ca78;super(),this['_threadCommentDataSourceService']=_0x5944b1,this[_0x5350bb(0x228)]=_0x6e3272,this[_0x5350bb(0x1f2)]();}[_0x30ca78(0x1f2)](){const _0x1cbe32=_0x30ca78;this[_0x1cbe32(0x211)][_0x1cbe32(0x230)]=this[_0x1cbe32(0x228)],this['_threadCommentDataSourceService'][_0x1cbe32(0x1fd)]=!0x1;}};g=te([N(0x0,_0x5949bb),N(0x1,_0x352b53(f))],g);var se=Object['defineProperty'],oe=Object[_0x30ca78(0x239)],ne=(_0x454360,_0x4a51a0,_0x1f867a)=>_0x4a51a0 in _0x454360?se(_0x454360,_0x4a51a0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1f867a}):_0x454360[_0x4a51a0]=_0x1f867a,ie=(_0x328ad0,_0x3d7e40,_0x42282d,_0x4c874a)=>{const _0x522317=_0x30ca78;for(var _0x5e0fea=_0x4c874a>0x1?void 0x0:_0x4c874a?oe(_0x3d7e40,_0x42282d):_0x3d7e40,_0x209ce1=_0x328ad0[_0x522317(0x236)]-0x1,_0x3fe20c;_0x209ce1>=0x0;_0x209ce1--)(_0x3fe20c=_0x328ad0[_0x209ce1])&&(_0x5e0fea=_0x3fe20c(_0x5e0fea)||_0x5e0fea);return _0x5e0fea;},w=(_0x32d5e2,_0x44e450)=>(_0x3b24f0,_0x1a148e)=>_0x44e450(_0x3b24f0,_0x1a148e,_0x32d5e2),$=(_0x2de354,_0x371c61,_0x474789)=>ne(_0x2de354,typeof _0x371c61!=_0x30ca78(0x23e)?_0x371c61+'':_0x371c61,_0x474789);let b=class extends _0xcec0a2{constructor(_0x4329e9=M,_0x4ff904,_0x5ec6af){const _0x100410=_0x30ca78;super(),this['_config']=_0x4329e9,this[_0x100410(0x23c)]=_0x4ff904,this['_configService']=_0x5ec6af;const {..._0x568046}=_0x4df787({},M,this[_0x100410(0x1ff)]);this[_0x100410(0x1f0)][_0x100410(0x1ec)](z,_0x568046);}['onStarting'](){const _0x13ede0=_0x30ca78;[[f],[g],[S]][_0x13ede0(0x204)](_0x21cea3=>{const _0x26798d=_0x13ede0;this[_0x26798d(0x23c)][_0x26798d(0x1f3)](_0x21cea3);});}[_0x30ca78(0x20d)](){const _0x178698=_0x30ca78;this[_0x178698(0x23c)][_0x178698(0x216)](g),this[_0x178698(0x23c)]['get'](S);}};$(b,_0x30ca78(0x232),W),$(b,_0x30ca78(0x201),_0x36f1da['UNIVER_UNKNOWN']),b=ie([_0x1e16fa(_0x4ef1d6,_0x4e5df2,_0x6e3915),w(0x1,_0x352b53(_0x5b310b)),w(0x2,_0x2b2f90)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x30aedd=_0x476d;(function(_0x1531e6,_0x2a88d5){const _0x45a5a4=_0x476d,_0x58b9ed=_0x1531e6();while(!![]){try{const _0x3f5bfa=parseInt(_0x45a5a4(0x199))/0x1*(-parseInt(_0x45a5a4(0x1c7))/0x2)+-parseInt(_0x45a5a4(0x1f1))/0x3*(-parseInt(_0x45a5a4(0x1a1))/0x4)+parseInt(_0x45a5a4(0x197))/0x5+-parseInt(_0x45a5a4(0x1dd))/0x6*(parseInt(_0x45a5a4(0x1e9))/0x7)+-parseInt(_0x45a5a4(0x1f6))/0x8*(parseInt(_0x45a5a4(0x1db))/0x9)+parseInt(_0x45a5a4(0x1fa))/0xa+-parseInt(_0x45a5a4(0x1c6))/0xb*(-parseInt(_0x45a5a4(0x1eb))/0xc);if(_0x3f5bfa===_0x2a88d5)break;else _0x58b9ed['push'](_0x58b9ed['shift']());}catch(_0x4231ef){_0x58b9ed['push'](_0x58b9ed['shift']());}}}(_0x4461,0xc0633));import{CommentService as _0x4f549b,CollaborationSessionService as _0x22d288,UniverCollaborationClientPlugin as _0x5ef93b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3e6d81}from'@univerjs-pro/license';import{dayjs as _0x2f89ef,UserManagerService as _0x45b324,Inject as _0x739388,Injector as _0x177c75,Disposable as _0x5396b2,CustomRangeType as _0xc93c90,UniverInstanceType as _0x312767,DependentOn as _0x2e5342,IConfigService as _0x11d66d,Plugin as _0x1d1e6a,merge as _0x3efa70}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4789b7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x26ad0c,IThreadCommentDataSourceService as _0x358cfe}from'@univerjs/thread-comment';import{bufferTime as _0xea12d4}from'rxjs';import{HTTPService as _0x3005e1}from'@univerjs/network';const W=_0x30aedd(0x1b1);function _0x476d(_0x37efd1,_0x55b27d){const _0x446193=_0x4461();return _0x476d=function(_0x476d77,_0x129ddc){_0x476d77=_0x476d77-0x197;let _0x2be35e=_0x446193[_0x476d77];return _0x2be35e;},_0x476d(_0x37efd1,_0x55b27d);}var I=(_0x260e59=>(_0x260e59[_0x260e59[_0x30aedd(0x1b6)]=0x0]=_0x30aedd(0x1b6),_0x260e59[_0x260e59[_0x30aedd(0x1dc)]=0x1]=_0x30aedd(0x1dc),_0x260e59[_0x260e59[_0x30aedd(0x1be)]=-0x1]=_0x30aedd(0x1be),_0x260e59))(I||{}),v=(_0xd51a42=>(_0xd51a42[_0xd51a42[_0x30aedd(0x1d2)]=0x0]=_0x30aedd(0x1d2),_0xd51a42[_0xd51a42['Add']=0x1]=_0x30aedd(0x198),_0xd51a42[_0xd51a42[_0x30aedd(0x1bb)]=0x2]=_0x30aedd(0x1bb),_0xd51a42[_0xd51a42[_0x30aedd(0x1ab)]=0x3]=_0x30aedd(0x1ab),_0xd51a42[_0xd51a42[_0x30aedd(0x1d0)]=0x4]=_0x30aedd(0x1d0),_0xd51a42[_0xd51a42[_0x30aedd(0x1a6)]=0x5]='Solve',_0xd51a42[_0xd51a42['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xd51a42))(v||{});const D=_0x22fa8f=>_0x2f89ef(new Date(+_0x22fa8f))[_0x30aedd(0x1d4)](_0x30aedd(0x1e0)),B=async(_0x1e8a4c,_0x9c1c1d)=>{const _0x22dcdb=_0x30aedd,_0x40c8f7=_0x1e8a4c[_0x22dcdb(0x1a2)](_0x45b324),_0x1e605e=_0x1e8a4c['get'](_0x3005e1);_0x9c1c1d[_0x22dcdb(0x1a7)](_0x20e9ba=>{const _0x372efa=_0x22dcdb;_0x40c8f7[_0x372efa(0x1aa)](_0x20e9ba)&&_0x9c1c1d[_0x372efa(0x1df)](_0x20e9ba);}),_0x9c1c1d['size']&&(await _0x1e605e['get'](_0x22dcdb(0x1b4),{'params':{'userIDs':[..._0x9c1c1d]}}))[_0x22dcdb(0x1e4)][_0x22dcdb(0x1bd)][_0x22dcdb(0x1a7)](_0x8557a1=>{const _0x51cb44=_0x22dcdb;_0x8557a1&&_0x40c8f7[_0x51cb44(0x1d9)](_0x8557a1);});};var K=Object[_0x30aedd(0x19d)],V=(_0x40b997,_0x46ea49,_0x42f385,_0x1985e1)=>{const _0x389cb8=_0x30aedd;for(var _0x38c934=_0x1985e1>0x1?void 0x0:_0x1985e1?K(_0x46ea49,_0x42f385):_0x46ea49,_0x53c38e=_0x40b997[_0x389cb8(0x1e1)]-0x1,_0x45ec0b;_0x53c38e>=0x0;_0x53c38e--)(_0x45ec0b=_0x40b997[_0x53c38e])&&(_0x38c934=_0x45ec0b(_0x38c934)||_0x38c934);return _0x38c934;},p=(_0x12a0ac,_0x2492de)=>(_0x478f48,_0x26ca08)=>_0x2492de(_0x478f48,_0x26ca08,_0x12a0ac);let S=class extends _0x5396b2{constructor(_0xc0a575,_0x9ec2a5,_0x5cc0de,_0x59a68b){const _0x17a0a0=_0x30aedd;super(),this[_0x17a0a0(0x19a)]=_0xc0a575,this['_threadCommentModel']=_0x9ec2a5,this[_0x17a0a0(0x1e2)]=_0x5cc0de,this[_0x17a0a0(0x1f5)]=_0x59a68b,this[_0x17a0a0(0x1ba)](),this[_0x17a0a0(0x1ad)]();}[_0x30aedd(0x1ad)](){const _0x441580=_0x30aedd;this[_0x441580(0x1c5)](this[_0x441580(0x1d8)][_0x441580(0x1b8)][_0x441580(0x1cf)](_0xea12d4(0x10))[_0x441580(0x1d5)](_0x17d709=>{const _0x121b79=_0x441580,_0x52c9a2=new Set();_0x17d709[_0x121b79(0x1a7)](_0x427839=>{const _0x5bd84a=_0x121b79;switch(_0x427839[_0x5bd84a(0x1ed)]){case'add':{const _0x102601=_0x427839[_0x5bd84a(0x1ce)]['personId'];_0x52c9a2[_0x5bd84a(0x1da)](_0x102601);break;}}}),B(this[_0x121b79(0x1f5)],_0x52c9a2);}));}[_0x30aedd(0x1ba)](){const _0x4034b8=_0x30aedd;this[_0x4034b8(0x1c5)](this[_0x4034b8(0x19a)][_0x4034b8(0x1b8)][_0x4034b8(0x1d5)](async _0x2d3f52=>{const _0x3e6190=_0x4034b8;var _0x3af4f0,_0x4f76e3,_0x1f679e,_0x1ddd77;const _0xbef572=(_0x3af4f0=this[_0x3e6190(0x1d8)][_0x3e6190(0x1b5)](_0x2d3f52['unitId'])[_0x3e6190(0x1f9)](_0x3cff91=>_0x3cff91[_0x3e6190(0x1a3)]===_0x2d3f52[_0x3e6190(0x1a3)]))==null?void 0x0:_0x3af4f0['root'];if(!_0xbef572)return;const {unitId:_0x1c0a70,subUnitId:_0xb489c}=_0xbef572;switch(_0x2d3f52['user']&&this[_0x3e6190(0x1e2)][_0x3e6190(0x1d9)](_0x2d3f52[_0x3e6190(0x1f3)]),_0x2d3f52[_0x3e6190(0x1ed)]){case v[_0x3e6190(0x198)]:break;case v[_0x3e6190(0x1bb)]:{this[_0x3e6190(0x1d8)][_0x3e6190(0x1fd)](_0x1c0a70,_0xb489c,{'unitId':_0x1c0a70,'subUnitId':_0xb489c,'ref':'','id':_0x2d3f52['replyId'],'dT':D(+_0x2d3f52['createTimestamp']),'threadId':_0x2d3f52['threadId'],'personId':(_0x1f679e=(_0x4f76e3=_0x2d3f52[_0x3e6190(0x1f3)])==null?void 0x0:_0x4f76e3['userID'])!=null?_0x1f679e:_0x2d3f52[_0x3e6190(0x1af)],'text':JSON['parse'](_0x2d3f52[_0x3e6190(0x1ef)]),'parentId':_0xbef572['id']});break;}case v[_0x3e6190(0x1d0)]:{const _0x50108e=this[_0x3e6190(0x1d8)][_0x3e6190(0x1f4)](_0x1c0a70,_0xb489c,_0x2d3f52[_0x3e6190(0x1ac)]);_0x50108e&&_0x50108e[_0x3e6190(0x1ec)]&&this[_0x3e6190(0x1d8)][_0x3e6190(0x1f0)](_0x1c0a70,_0xb489c,_0x2d3f52[_0x3e6190(0x1ac)]);break;}case v['Edit']:{this[_0x3e6190(0x1d8)][_0x3e6190(0x1a4)](_0x1c0a70,_0xb489c,{'commentId':_0x2d3f52[_0x3e6190(0x1ac)],'text':JSON[_0x3e6190(0x1bf)](_0x2d3f52[_0x3e6190(0x1ef)])});break;}case v['Solve']:{const _0x348bfb=(_0x1ddd77=this[_0x3e6190(0x1d8)]['getUnit'](_0x2d3f52[_0x3e6190(0x1a9)])[_0x3e6190(0x1f9)](_0x28c286=>_0x28c286[_0x3e6190(0x1a3)]===_0x2d3f52[_0x3e6190(0x1a3)]))==null?void 0x0:_0x1ddd77[_0x3e6190(0x1d1)];_0x348bfb&&this[_0x3e6190(0x1d8)][_0x3e6190(0x1e5)](_0x1c0a70,_0xb489c,_0x348bfb['id'],_0x2d3f52[_0x3e6190(0x1c3)]===I[_0x3e6190(0x1dc)]);break;}}}));}};S=V([p(0x0,_0x739388(_0x4f549b)),p(0x1,_0x739388(_0x26ad0c)),p(0x2,_0x739388(_0x45b324)),p(0x3,_0x739388(_0x177c75))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x298189,_0x43acea,_0x4498cf,_0x1d96b5)=>{const _0x134d6e=_0x30aedd;for(var _0x45c1a2=_0x1d96b5>0x1?void 0x0:_0x1d96b5?k(_0x43acea,_0x4498cf):_0x43acea,_0x26f340=_0x298189[_0x134d6e(0x1e1)]-0x1,_0x570c85;_0x26f340>=0x0;_0x26f340--)(_0x570c85=_0x298189[_0x26f340])&&(_0x45c1a2=_0x570c85(_0x45c1a2)||_0x45c1a2);return _0x45c1a2;},_=(_0x3429a5,_0x462897)=>(_0x45b60d,_0x48df12)=>_0x462897(_0x45b60d,_0x48df12,_0x3429a5);function _0x4461(){const _0x477cf8=['userID','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_config','_sessionService','/universer-api/user/list','getUnit','OpenOrReOpen','pluginName','commentUpdate$','onReady','_init','Reply','rangeId','users','UNRECOGNIZED','parse','rangeType','error','_threadCommentDataSource','solved','dataSource','disposeWithMe','702955wzoQJe','2xOCFws','createTimestamp','customRanges','resolved','_httpService','map','/add','payload','pipe','Delete','root','Unknown','listComments','format','subscribe','requireSession','UNIVER_UNKNOWN','_threadCommentModel','addUser','add','5936472DLQRWR','Solved','4207842xmZDek','ref','delete','YYYY/MM/DD\x20HH:mm','length','_userService','values','body','resolveComment','stringify','slice','/universer-api/comment/unit/','14aOyuVs','replies','384uskKKy','parentId','type','setConfig','content','deleteComment','3MxXUlM','_threadCommentDataSourceService','user','getComment','_injector','16UrghJm','getMemberID','/reply','find','6951150EZwOZX','COMMENT','/delete','addComment','7602340aoSrZS','Add','762099aSwBEN','_commentService','_initDataSource','syncUpdateMutationToColla','getOwnPropertyDescriptor','comments','_configService','onStarting','45620DErjtG','get','threadId','updateComment','code','Solve','forEach','filter','unitId','getUser','Edit','replyId','_initUserSync','post','userId'];_0x4461=function(){return _0x477cf8;};return _0x4461();}function X(_0x37a3b3,_0x2600db){const _0x298d35=_0x30aedd,_0x18f141=_0x37a3b3[_0x298d35(0x1ea)][0x0];return{..._0x2600db,'id':_0x18f141[_0x298d35(0x1ac)],'resolved':_0x37a3b3[_0x298d35(0x1c3)]===0x1,'dT':D(_0x18f141[_0x298d35(0x1c8)]),'personId':_0x18f141['userId'],'threadId':_0x18f141['threadId']};}function ee(_0x12835d,_0x3db295,_0x3bf1b7){const _0x1c15ee=_0x30aedd;var _0x4f4e9c,_0x1b4a3e;if(((_0x1b4a3e=(_0x4f4e9c=_0x12835d==null?void 0x0:_0x12835d[_0x1c15ee(0x1ea)])==null?void 0x0:_0x4f4e9c['length'])!=null?_0x1b4a3e:0x0)>0x0){const _0x5c8976=(_0x279b73,_0x4848a8)=>({'id':_0x279b73[_0x1c15ee(0x1ac)],'threadId':_0x279b73[_0x1c15ee(0x1a3)],'dT':D(_0x279b73[_0x1c15ee(0x1c8)]),'personId':_0x279b73[_0x1c15ee(0x1af)],'resolved':_0x12835d[_0x1c15ee(0x1c3)]===I['Solved'],'unitId':_0x3db295,'subUnitId':_0x3bf1b7,'text':JSON[_0x1c15ee(0x1bf)](_0x279b73[_0x1c15ee(0x1ef)]),'parentId':_0x4848a8}),_0x187511=_0x5c8976(_0x12835d['replies'][0x0]);return{..._0x187511,'children':_0x12835d[_0x1c15ee(0x1ea)][_0x1c15ee(0x1e7)](0x1)[_0x1c15ee(0x1cc)](_0x4454fd=>_0x5c8976(_0x4454fd,_0x187511['id']))};}return null;}let f=class{constructor(_0x15b56e,_0x48aee5,_0x458741,_0x57a980){const _0xebf1f4=_0x30aedd;this['_httpService']=_0x15b56e,this[_0xebf1f4(0x1e2)]=_0x48aee5,this[_0xebf1f4(0x1b3)]=_0x458741,this[_0xebf1f4(0x1f5)]=_0x57a980;}async[_0x30aedd(0x1fd)](_0x565153){const _0x1c192c=_0x30aedd;var _0x33a9cc,_0x246dfe;const {parentId:_0x209fbd,unitId:_0x30717f,text:_0x60fe3b,threadId:_0x4610ba}=_0x565153,_0x214add=(_0x246dfe=(_0x33a9cc=_0x60fe3b[_0x1c192c(0x1c9)])==null?void 0x0:_0x33a9cc[_0x1c192c(0x1a8)](_0x1bf5a1=>_0x1bf5a1[_0x1c192c(0x1c0)]===_0xc93c90['COMMENT'])['map'](_0x5f2697=>_0x5f2697[_0x1c192c(0x1bc)]))!=null?_0x246dfe:[],_0x1bdc94=JSON[_0x1c192c(0x1e6)](_0x60fe3b),_0x2c2140=(await this[_0x1c192c(0x1b3)][_0x1c192c(0x1d6)](_0x30717f))[_0x1c192c(0x1f7)]();if(_0x209fbd){const _0xb4b55b={'memberId':_0x2c2140,'unitId':_0x30717f,'content':_0x1bdc94,'mention':_0x214add,'threadId':_0x4610ba},_0x4f6161=(await this['_httpService'][_0x1c192c(0x1ae)](_0x1c192c(0x1e8)+_0x30717f+_0x1c192c(0x1f8),{'body':_0xb4b55b}))[_0x1c192c(0x1e4)]['reply'];return{..._0x565153,'id':_0x4f6161[_0x1c192c(0x1ac)],'dT':_0x2f89ef(+_0x4f6161[_0x1c192c(0x1c8)])[_0x1c192c(0x1d4)](_0x1c192c(0x1e0)),'personId':_0x4f6161[_0x1c192c(0x1af)]};}else{const _0x2b5b94={'memberId':_0x2c2140,'unitId':_0x30717f,'content':_0x1bdc94,'mention':_0x214add},_0x37ad21=await this[_0x1c192c(0x1cb)][_0x1c192c(0x1ae)](_0x1c192c(0x1e8)+_0x30717f+_0x1c192c(0x1cd),{'body':_0x2b5b94});return X(_0x37ad21[_0x1c192c(0x1e4)]['comment'],_0x565153);}}async[_0x30aedd(0x1a4)](_0x279514){const _0x900398=_0x30aedd;var _0xe2d71c,_0xa98d0c;const {text:_0x3cc452,unitId:_0x169709}=_0x279514,_0xa1ae28=(_0xa98d0c=(_0xe2d71c=_0x3cc452[_0x900398(0x1c9)])==null?void 0x0:_0xe2d71c[_0x900398(0x1a8)](_0x29c307=>_0x29c307[_0x900398(0x1c0)]===_0xc93c90[_0x900398(0x1fb)])[_0x900398(0x1cc)](_0x415872=>_0x415872[_0x900398(0x1bc)]))!=null?_0xa98d0c:[],_0x2ce3fd=JSON['stringify'](_0x3cc452),_0x47b93d=_0x279514['threadId'],_0x2107ca=_0x279514['id'],_0x27d562={'memberId':(await this[_0x900398(0x1b3)][_0x900398(0x1d6)](_0x169709))[_0x900398(0x1f7)](),'unitId':_0x169709,'threadId':_0x47b93d,'mention':_0xa1ae28,'content':_0x2ce3fd,'replyId':_0x2107ca},_0x48204b=await this['_httpService']['post'](_0x900398(0x1e8)+_0x169709+'/edit',{'body':_0x27d562});return!_0x48204b[_0x900398(0x1e4)][_0x900398(0x1c1)]||_0x48204b[_0x900398(0x1e4)][_0x900398(0x1c1)]['code']===0x1;}async[_0x30aedd(0x1e5)](_0x36fd9b){const _0x199094=_0x30aedd,{unitId:_0x33dce2}=_0x36fd9b,_0x327309=_0x36fd9b[_0x199094(0x1a3)],_0x47ad44={'memberId':this['_userService']['getCurrentUser']()[_0x199094(0x1b0)],'unitId':_0x33dce2,'threadId':_0x327309,'solved':_0x36fd9b[_0x199094(0x1ca)]?I[_0x199094(0x1dc)]:I[_0x199094(0x1b6)]},_0x10874d=await this[_0x199094(0x1cb)][_0x199094(0x1ae)](_0x199094(0x1e8)+_0x33dce2+'/solved',{'body':_0x47ad44});return!_0x10874d[_0x199094(0x1e4)]['error']||_0x10874d[_0x199094(0x1e4)][_0x199094(0x1c1)][_0x199094(0x1a5)]===0x1;}async[_0x30aedd(0x1f0)](_0x3d9e9e,_0x91139b,_0x4e13b0,_0x42dd2b){const _0x1944ef=_0x30aedd,_0x5292a3={'memberId':(await this[_0x1944ef(0x1b3)][_0x1944ef(0x1d6)](_0x3d9e9e))[_0x1944ef(0x1f7)](),'threadId':_0x4e13b0,'replyId':_0x42dd2b,'unitId':_0x3d9e9e},_0x55331c=await this[_0x1944ef(0x1cb)][_0x1944ef(0x1ae)](_0x1944ef(0x1e8)+_0x3d9e9e+_0x1944ef(0x1fc),{'body':_0x5292a3});return!_0x55331c[_0x1944ef(0x1e4)][_0x1944ef(0x1c1)]||_0x55331c[_0x1944ef(0x1e4)][_0x1944ef(0x1c1)][_0x1944ef(0x1a5)]===0x1;}async[_0x30aedd(0x1d3)](_0x124c34,_0xc1c2a9,_0x39d162){const _0x264e3e=_0x30aedd,_0x438298={'unitId':_0x124c34,'threadId':_0x39d162},_0x1fecc5=await this[_0x264e3e(0x1cb)][_0x264e3e(0x1ae)]('/universer-api/comment/unit/'+_0x124c34+'/list',{'body':_0x438298}),_0x41a39f=_0x39d162[_0x264e3e(0x1cc)](_0x22d1a7=>ee(_0x1fecc5[_0x264e3e(0x1e4)][_0x264e3e(0x19e)][_0x22d1a7],_0x124c34,_0xc1c2a9))[_0x264e3e(0x1a8)](Boolean);return Object[_0x264e3e(0x1e3)](_0x1fecc5[_0x264e3e(0x1e4)][_0x264e3e(0x1bd)])[_0x264e3e(0x1a7)](_0x594c73=>{const _0x1d936a=_0x264e3e;this[_0x1d936a(0x1e2)][_0x1d936a(0x1d9)](_0x594c73);}),_0x41a39f;}['saveCommentToSnapshot'](_0x23d894){const _0x2c3f8e=_0x30aedd;return{'id':_0x23d894['id'],'threadId':_0x23d894[_0x2c3f8e(0x1a3)],'ref':_0x23d894[_0x2c3f8e(0x1de)]};}};f=Q([_(0x0,_0x739388(_0x3005e1)),_(0x1,_0x739388(_0x45b324)),_(0x2,_0x739388(_0x22d288)),_(0x3,_0x739388(_0x177c75))],f);var re=Object[_0x30aedd(0x19d)],te=(_0x13988b,_0xce8c74,_0x4cdbe5,_0x3b6912)=>{for(var _0x785eb6=_0x3b6912>0x1?void 0x0:_0x3b6912?re(_0xce8c74,_0x4cdbe5):_0xce8c74,_0x3b6e45=_0x13988b['length']-0x1,_0x247d7a;_0x3b6e45>=0x0;_0x3b6e45--)(_0x247d7a=_0x13988b[_0x3b6e45])&&(_0x785eb6=_0x247d7a(_0x785eb6)||_0x785eb6);return _0x785eb6;},N=(_0x591f4c,_0xe00a90)=>(_0x22a1ec,_0x11b078)=>_0xe00a90(_0x22a1ec,_0x11b078,_0x591f4c);let g=class extends _0x5396b2{constructor(_0xb166fe,_0x2aa53a){const _0x21d5d3=_0x30aedd;super(),this[_0x21d5d3(0x1f2)]=_0xb166fe,this[_0x21d5d3(0x1c2)]=_0x2aa53a,this[_0x21d5d3(0x19b)]();}[_0x30aedd(0x19b)](){const _0x5d2da3=_0x30aedd;this['_threadCommentDataSourceService'][_0x5d2da3(0x1c4)]=this[_0x5d2da3(0x1c2)],this[_0x5d2da3(0x1f2)][_0x5d2da3(0x19c)]=!0x1;}};g=te([N(0x0,_0x358cfe),N(0x1,_0x739388(f))],g);var se=Object['defineProperty'],oe=Object[_0x30aedd(0x19d)],ne=(_0x4dacaa,_0x1c1b79,_0x4bac6b)=>_0x1c1b79 in _0x4dacaa?se(_0x4dacaa,_0x1c1b79,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4bac6b}):_0x4dacaa[_0x1c1b79]=_0x4bac6b,ie=(_0x57d215,_0x36a1fc,_0x1d7c49,_0x1e24eb)=>{const _0x41bfd6=_0x30aedd;for(var _0x4d5fe7=_0x1e24eb>0x1?void 0x0:_0x1e24eb?oe(_0x36a1fc,_0x1d7c49):_0x36a1fc,_0x4cfd38=_0x57d215[_0x41bfd6(0x1e1)]-0x1,_0xf176db;_0x4cfd38>=0x0;_0x4cfd38--)(_0xf176db=_0x57d215[_0x4cfd38])&&(_0x4d5fe7=_0xf176db(_0x4d5fe7)||_0x4d5fe7);return _0x4d5fe7;},w=(_0x55f842,_0x5eec86)=>(_0xe6e6ee,_0x360ae7)=>_0x5eec86(_0xe6e6ee,_0x360ae7,_0x55f842),$=(_0x35e694,_0xa3f8fd,_0x4c8930)=>ne(_0x35e694,typeof _0xa3f8fd!='symbol'?_0xa3f8fd+'':_0xa3f8fd,_0x4c8930);let b=class extends _0x1d1e6a{constructor(_0xbf9c23=M,_0x2b112e,_0x25f37e){const _0x29ec3c=_0x30aedd;super(),this[_0x29ec3c(0x1b2)]=_0xbf9c23,this['_injector']=_0x2b112e,this[_0x29ec3c(0x19f)]=_0x25f37e;const {..._0x3c1d8b}=_0x3efa70({},M,this[_0x29ec3c(0x1b2)]);this[_0x29ec3c(0x19f)][_0x29ec3c(0x1ee)](z,_0x3c1d8b);}[_0x30aedd(0x1a0)](){const _0x24c16c=_0x30aedd;[[f],[g],[S]][_0x24c16c(0x1a7)](_0x9b734b=>{const _0x45591e=_0x24c16c;this[_0x45591e(0x1f5)][_0x45591e(0x1da)](_0x9b734b);});}[_0x30aedd(0x1b9)](){const _0x1abca4=_0x30aedd;this['_injector'][_0x1abca4(0x1a2)](g),this[_0x1abca4(0x1f5)]['get'](S);}};$(b,_0x30aedd(0x1b7),W),$(b,_0x30aedd(0x1ed),_0x312767[_0x30aedd(0x1d7)]),b=ie([_0x2e5342(_0x4789b7,_0x5ef93b,_0x3e6d81),w(0x1,_0x739388(_0x177c75)),w(0x2,_0x11d66d)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x35a160,_0x115755){const _0x3e32ee=_0x1c96,_0x44d53e=_0x35a160();while(!![]){try{const _0x39e18c=-parseInt(_0x3e32ee(0x99))/0x1*(-parseInt(_0x3e32ee(0x116))/0x2)+parseInt(_0x3e32ee(0xee))/0x3*(parseInt(_0x3e32ee(0x9c))/0x4)+parseInt(_0x3e32ee(0xfe))/0x5+parseInt(_0x3e32ee(0x109))/0x6+-parseInt(_0x3e32ee(0xea))/0x7*(parseInt(_0x3e32ee(0xe6))/0x8)+-parseInt(_0x3e32ee(0x100))/0x9+-parseInt(_0x3e32ee(0xf0))/0xa*(parseInt(_0x3e32ee(0x102))/0xb);if(_0x39e18c===_0x115755)break;else _0x44d53e['push'](_0x44d53e['shift']());}catch(_0x340621){_0x44d53e['push'](_0x44d53e['shift']());}}}(_0x4ea8,0xb95dc),function(_0x586b82,_0x2d82e1){const _0x1a8c85=_0x1c96;typeof exports==_0x1a8c85(0xf8)&&typeof module<'u'?_0x2d82e1(exports,require('@univerjs-pro/collaboration-client'),require(_0x1a8c85(0xc4)),require('@univerjs/core'),require(_0x1a8c85(0xb6)),require(_0x1a8c85(0xa4)),require(_0x1a8c85(0x95)),require(_0x1a8c85(0xc5))):typeof define==_0x1a8c85(0xf5)&&define[_0x1a8c85(0xf9)]?define(['exports',_0x1a8c85(0xa8),_0x1a8c85(0xc4),_0x1a8c85(0xd2),_0x1a8c85(0xb6),_0x1a8c85(0xa4),_0x1a8c85(0x95),_0x1a8c85(0xc5)],_0x2d82e1):(_0x586b82=typeof globalThis<'u'?globalThis:_0x586b82||self,_0x2d82e1(_0x586b82['UniverProThreadCommentDatasource']={},_0x586b82['UniverProCollaborationClient'],_0x586b82['UniverProLicense'],_0x586b82[_0x1a8c85(0x10c)],_0x586b82[_0x1a8c85(0xc1)],_0x586b82[_0x1a8c85(0x9a)],_0x586b82['rxjs'],_0x586b82[_0x1a8c85(0x112)]));}(this,function(_0x2ecba5,_0x2fa46c,_0x113315,_0x38a45d,_0x5a322f,_0x52aa6c,_0x507e8e,_0x33aa8b){'use strict';const _0xdb8239=_0x1c96;const _0x513258=_0xdb8239(0xa5);var _0x46c943=(_0x46c21e=>(_0x46c21e[_0x46c21e['OpenOrReOpen']=0x0]=_0xdb8239(0xe2),_0x46c21e[_0x46c21e['Solved']=0x1]=_0xdb8239(0xb1),_0x46c21e[_0x46c21e[_0xdb8239(0x9b)]=-0x1]=_0xdb8239(0x9b),_0x46c21e))(_0x46c943||{}),_0xda8a42=(_0x165afd=>(_0x165afd[_0x165afd[_0xdb8239(0xb0)]=0x0]=_0xdb8239(0xb0),_0x165afd[_0x165afd[_0xdb8239(0xdc)]=0x1]=_0xdb8239(0xdc),_0x165afd[_0x165afd[_0xdb8239(0xa2)]=0x2]=_0xdb8239(0xa2),_0x165afd[_0x165afd[_0xdb8239(0xf3)]=0x3]=_0xdb8239(0xf3),_0x165afd[_0x165afd[_0xdb8239(0xb8)]=0x4]=_0xdb8239(0xb8),_0x165afd[_0x165afd[_0xdb8239(0xdb)]=0x5]=_0xdb8239(0xdb),_0x165afd[_0x165afd[_0xdb8239(0x9b)]=-0x1]='UNRECOGNIZED',_0x165afd))(_0xda8a42||{});const _0x2f3c41=_0xbb2e15=>_0x38a45d[_0xdb8239(0xfd)](new Date(+_0xbb2e15))[_0xdb8239(0xa0)](_0xdb8239(0xde)),_0x397e9e=async(_0x212ad6,_0xc3292d)=>{const _0xba6454=_0xdb8239,_0xd9bfb2=_0x212ad6[_0xba6454(0xe3)](_0x38a45d['UserManagerService']),_0x1feea5=_0x212ad6[_0xba6454(0xe3)](_0x33aa8b[_0xba6454(0xbb)]);_0xc3292d[_0xba6454(0x9f)](_0x227705=>{const _0xc9930c=_0xba6454;_0xd9bfb2['getUser'](_0x227705)&&_0xc3292d[_0xc9930c(0xd5)](_0x227705);}),_0xc3292d[_0xba6454(0xdf)]&&(await _0x1feea5[_0xba6454(0xe3)](_0xba6454(0xd1),{'params':{'userIDs':[..._0xc3292d]}}))['body'][_0xba6454(0x106)][_0xba6454(0x9f)](_0x29dd67=>{_0x29dd67&&_0xd9bfb2['addUser'](_0x29dd67);});};var _0x34e591=Object['getOwnPropertyDescriptor'],_0x82c333=(_0x4a17af,_0x5a2007,_0xa1e225,_0x247d8a)=>{const _0x25e615=_0xdb8239;for(var _0x3b5a42=_0x247d8a>0x1?void 0x0:_0x247d8a?_0x34e591(_0x5a2007,_0xa1e225):_0x5a2007,_0x121a34=_0x4a17af[_0x25e615(0x111)]-0x1,_0x1904fb;_0x121a34>=0x0;_0x121a34--)(_0x1904fb=_0x4a17af[_0x121a34])&&(_0x3b5a42=_0x1904fb(_0x3b5a42)||_0x3b5a42);return _0x3b5a42;},_0x415f0b=(_0x2a51f3,_0x4b6f8e)=>(_0x5a6d3c,_0x277167)=>_0x4b6f8e(_0x5a6d3c,_0x277167,_0x2a51f3);let _0x52ad31=class extends _0x38a45d[_0xdb8239(0xcf)]{constructor(_0x211eac,_0x4abfc5,_0x54e515,_0x3b020d){const _0x2c9d35=_0xdb8239;super(),this[_0x2c9d35(0x107)]=_0x211eac,this[_0x2c9d35(0xbe)]=_0x4abfc5,this['_userService']=_0x54e515,this[_0x2c9d35(0x118)]=_0x3b020d,this[_0x2c9d35(0xa1)](),this[_0x2c9d35(0xa3)]();}['_initUserSync'](){const _0x26f97a=_0xdb8239;this['disposeWithMe'](this[_0x26f97a(0xbe)][_0x26f97a(0xfa)][_0x26f97a(0xf2)](_0x507e8e['bufferTime'](0x10))[_0x26f97a(0xf1)](_0x3ac8ab=>{const _0x73ffe=_0x26f97a,_0x1a3193=new Set();_0x3ac8ab[_0x73ffe(0x9f)](_0x491f31=>{const _0x524e79=_0x73ffe;switch(_0x491f31['type']){case _0x524e79(0xb5):{const _0xca12de=_0x491f31[_0x524e79(0xe8)][_0x524e79(0xeb)];_0x1a3193[_0x524e79(0xb5)](_0xca12de);break;}}}),_0x397e9e(this[_0x73ffe(0x118)],_0x1a3193);}));}[_0xdb8239(0xa1)](){const _0x426516=_0xdb8239;this[_0x426516(0xcc)](this['_commentService'][_0x426516(0xfa)][_0x426516(0xf1)](async _0x3a7221=>{const _0x4dc7d8=_0x426516;var _0x3b0edc,_0x2574c3,_0x187c6a,_0x5dc75d;const _0x3c90e3=(_0x3b0edc=this[_0x4dc7d8(0xbe)][_0x4dc7d8(0xe7)](_0x3a7221[_0x4dc7d8(0x96)])['find'](_0x5d2091=>_0x5d2091[_0x4dc7d8(0xb4)]===_0x3a7221[_0x4dc7d8(0xb4)]))==null?void 0x0:_0x3b0edc[_0x4dc7d8(0xe0)];if(!_0x3c90e3)return;const {unitId:_0x32541e,subUnitId:_0x23c78a}=_0x3c90e3;switch(_0x3a7221['user']&&this['_userService'][_0x4dc7d8(0xb9)](_0x3a7221['user']),_0x3a7221['type']){case _0xda8a42[_0x4dc7d8(0xdc)]:break;case _0xda8a42['Reply']:{this[_0x4dc7d8(0xbe)][_0x4dc7d8(0x9e)](_0x32541e,_0x23c78a,{'unitId':_0x32541e,'subUnitId':_0x23c78a,'ref':'','id':_0x3a7221[_0x4dc7d8(0x10b)],'dT':_0x2f3c41(+_0x3a7221[_0x4dc7d8(0xab)]),'threadId':_0x3a7221[_0x4dc7d8(0xb4)],'personId':(_0x187c6a=(_0x2574c3=_0x3a7221['user'])==null?void 0x0:_0x2574c3[_0x4dc7d8(0xac)])!=null?_0x187c6a:_0x3a7221[_0x4dc7d8(0xbc)],'text':JSON['parse'](_0x3a7221[_0x4dc7d8(0xad)]),'parentId':_0x3c90e3['id']});break;}case _0xda8a42[_0x4dc7d8(0xb8)]:{const _0x2c69cc=this[_0x4dc7d8(0xbe)]['getComment'](_0x32541e,_0x23c78a,_0x3a7221[_0x4dc7d8(0x10b)]);_0x2c69cc&&_0x2c69cc['parentId']&&this['_threadCommentModel'][_0x4dc7d8(0xca)](_0x32541e,_0x23c78a,_0x3a7221['replyId']);break;}case _0xda8a42[_0x4dc7d8(0xf3)]:{this['_threadCommentModel'][_0x4dc7d8(0x115)](_0x32541e,_0x23c78a,{'commentId':_0x3a7221['replyId'],'text':JSON[_0x4dc7d8(0x10e)](_0x3a7221[_0x4dc7d8(0xad)])});break;}case _0xda8a42['Solve']:{const _0xb44b0b=(_0x5dc75d=this[_0x4dc7d8(0xbe)]['getUnit'](_0x3a7221[_0x4dc7d8(0x96)])[_0x4dc7d8(0xb7)](_0x100e83=>_0x100e83['threadId']===_0x3a7221['threadId']))==null?void 0x0:_0x5dc75d[_0x4dc7d8(0xe0)];_0xb44b0b&&this[_0x4dc7d8(0xbe)]['resolveComment'](_0x32541e,_0x23c78a,_0xb44b0b['id'],_0x3a7221[_0x4dc7d8(0xe1)]===_0x46c943[_0x4dc7d8(0xb1)]);break;}}}));}};_0x52ad31=_0x82c333([_0x415f0b(0x0,_0x38a45d['Inject'](_0x2fa46c[_0xdb8239(0xcb)])),_0x415f0b(0x1,_0x38a45d[_0xdb8239(0xd9)](_0x52aa6c['ThreadCommentModel'])),_0x415f0b(0x2,_0x38a45d['Inject'](_0x38a45d['UserManagerService'])),_0x415f0b(0x3,_0x38a45d[_0xdb8239(0xd9)](_0x38a45d['Injector']))],_0x52ad31);const _0xf4809c=_0xdb8239(0xa9),_0x466500={};var _0x167acb=Object[_0xdb8239(0xf7)],_0x5092bc=(_0x255f4b,_0x251ed1,_0x4322f4,_0x370e2b)=>{const _0x128a94=_0xdb8239;for(var _0x3cd826=_0x370e2b>0x1?void 0x0:_0x370e2b?_0x167acb(_0x251ed1,_0x4322f4):_0x251ed1,_0x1397ec=_0x255f4b[_0x128a94(0x111)]-0x1,_0x3a256c;_0x1397ec>=0x0;_0x1397ec--)(_0x3a256c=_0x255f4b[_0x1397ec])&&(_0x3cd826=_0x3a256c(_0x3cd826)||_0x3cd826);return _0x3cd826;},_0x48caf0=(_0x22f7fb,_0x4798bf)=>(_0x437c70,_0x2dde2a)=>_0x4798bf(_0x437c70,_0x2dde2a,_0x22f7fb);function _0x5718d0(_0x2fbaff,_0x8a8c68){const _0x27ea0e=_0xdb8239,_0x439e94=_0x2fbaff[_0x27ea0e(0xae)][0x0];return{..._0x8a8c68,'id':_0x439e94[_0x27ea0e(0x10b)],'resolved':_0x2fbaff[_0x27ea0e(0xe1)]===0x1,'dT':_0x2f3c41(_0x439e94[_0x27ea0e(0xab)]),'personId':_0x439e94[_0x27ea0e(0xbc)],'threadId':_0x439e94[_0x27ea0e(0xb4)]};}function _0x20c5f4(_0x370129,_0x22a324,_0x291119){const _0x4a03fc=_0xdb8239;var _0xc5a143,_0x402f07;if(((_0x402f07=(_0xc5a143=_0x370129==null?void 0x0:_0x370129[_0x4a03fc(0xae)])==null?void 0x0:_0xc5a143['length'])!=null?_0x402f07:0x0)>0x0){const _0x49fdd7=(_0x4345bc,_0x37824b)=>({'id':_0x4345bc['replyId'],'threadId':_0x4345bc[_0x4a03fc(0xb4)],'dT':_0x2f3c41(_0x4345bc[_0x4a03fc(0xab)]),'personId':_0x4345bc['userId'],'resolved':_0x370129[_0x4a03fc(0xe1)]===_0x46c943[_0x4a03fc(0xb1)],'unitId':_0x22a324,'subUnitId':_0x291119,'text':JSON[_0x4a03fc(0x10e)](_0x4345bc['content']),'parentId':_0x37824b}),_0x3555db=_0x49fdd7(_0x370129[_0x4a03fc(0xae)][0x0]);return{..._0x3555db,'children':_0x370129['replies']['slice'](0x1)['map'](_0x1fd47a=>_0x49fdd7(_0x1fd47a,_0x3555db['id']))};}return null;}let _0x29ab1d=class{constructor(_0x33d87a,_0x505386,_0x335210,_0x5c9a6c){const _0x11000b=_0xdb8239;this[_0x11000b(0xd4)]=_0x33d87a,this[_0x11000b(0xc6)]=_0x505386,this[_0x11000b(0xb3)]=_0x335210,this[_0x11000b(0x118)]=_0x5c9a6c;}async['addComment'](_0x1b8fd1){const _0x268185=_0xdb8239;var _0x2f2fef,_0x13f18f;const {parentId:_0x51ee8e,unitId:_0x11ca3e,text:_0x40a1e2,threadId:_0x53ceda}=_0x1b8fd1,_0x1e8adb=(_0x13f18f=(_0x2f2fef=_0x40a1e2[_0x268185(0xf6)])==null?void 0x0:_0x2f2fef[_0x268185(0x98)](_0x502d43=>_0x502d43[_0x268185(0x10f)]===_0x38a45d['CustomRangeType'][_0x268185(0xaf)])[_0x268185(0xce)](_0xb068ad=>_0xb068ad['rangeId']))!=null?_0x13f18f:[],_0x87e83b=JSON[_0x268185(0x114)](_0x40a1e2),_0x18ac29=(await this[_0x268185(0xb3)][_0x268185(0xff)](_0x11ca3e))[_0x268185(0xc9)]();if(_0x51ee8e){const _0x5e727d={'memberId':_0x18ac29,'unitId':_0x11ca3e,'content':_0x87e83b,'mention':_0x1e8adb,'threadId':_0x53ceda},_0x4aa4b4=(await this['_httpService'][_0x268185(0xec)](_0x268185(0x101)+_0x11ca3e+_0x268185(0x113),{'body':_0x5e727d}))[_0x268185(0xbd)][_0x268185(0xd7)];return{..._0x1b8fd1,'id':_0x4aa4b4[_0x268185(0x10b)],'dT':_0x38a45d[_0x268185(0xfd)](+_0x4aa4b4[_0x268185(0xab)])[_0x268185(0xa0)](_0x268185(0xde)),'personId':_0x4aa4b4[_0x268185(0xbc)]};}else{const _0x2daf07={'memberId':_0x18ac29,'unitId':_0x11ca3e,'content':_0x87e83b,'mention':_0x1e8adb},_0x901b4f=await this[_0x268185(0xd4)][_0x268185(0xec)](_0x268185(0x101)+_0x11ca3e+_0x268185(0xfb),{'body':_0x2daf07});return _0x5718d0(_0x901b4f['body'][_0x268185(0x9d)],_0x1b8fd1);}}async[_0xdb8239(0x115)](_0x4e61ea){const _0x1ae7d1=_0xdb8239;var _0x3d7b7d,_0x5f23c7;const {text:_0x5e568c,unitId:_0x29434b}=_0x4e61ea,_0x29585c=(_0x5f23c7=(_0x3d7b7d=_0x5e568c[_0x1ae7d1(0xf6)])==null?void 0x0:_0x3d7b7d['filter'](_0x253a30=>_0x253a30['rangeType']===_0x38a45d[_0x1ae7d1(0xdd)]['COMMENT'])[_0x1ae7d1(0xce)](_0x473b69=>_0x473b69[_0x1ae7d1(0xed)]))!=null?_0x5f23c7:[],_0x4f6769=JSON[_0x1ae7d1(0x114)](_0x5e568c),_0x2de86a=_0x4e61ea[_0x1ae7d1(0xb4)],_0x176f0d=_0x4e61ea['id'],_0x33f86b={'memberId':(await this[_0x1ae7d1(0xb3)][_0x1ae7d1(0xff)](_0x29434b))['getMemberID'](),'unitId':_0x29434b,'threadId':_0x2de86a,'mention':_0x29585c,'content':_0x4f6769,'replyId':_0x176f0d},_0x3956ff=await this[_0x1ae7d1(0xd4)]['post']('/universer-api/comment/unit/'+_0x29434b+_0x1ae7d1(0xef),{'body':_0x33f86b});return!_0x3956ff[_0x1ae7d1(0xbd)][_0x1ae7d1(0xe4)]||_0x3956ff[_0x1ae7d1(0xbd)][_0x1ae7d1(0xe4)][_0x1ae7d1(0x110)]===0x1;}async['resolveComment'](_0x166be0){const _0x4f8574=_0xdb8239,{unitId:_0x2572ae}=_0x166be0,_0x49578f=_0x166be0[_0x4f8574(0xb4)],_0x9b1183={'memberId':this[_0x4f8574(0xc6)]['getCurrentUser']()[_0x4f8574(0xac)],'unitId':_0x2572ae,'threadId':_0x49578f,'solved':_0x166be0[_0x4f8574(0x117)]?_0x46c943[_0x4f8574(0xb1)]:_0x46c943[_0x4f8574(0xe2)]},_0x575abf=await this[_0x4f8574(0xd4)][_0x4f8574(0xec)](_0x4f8574(0x101)+_0x2572ae+_0x4f8574(0xa6),{'body':_0x9b1183});return!_0x575abf['body'][_0x4f8574(0xe4)]||_0x575abf[_0x4f8574(0xbd)][_0x4f8574(0xe4)]['code']===0x1;}async[_0xdb8239(0xca)](_0x2df949,_0x1a254b,_0x231d35,_0x3d2aa9){const _0x18623b=_0xdb8239,_0x3221b1={'memberId':(await this[_0x18623b(0xb3)]['requireSession'](_0x2df949))[_0x18623b(0xc9)](),'threadId':_0x231d35,'replyId':_0x3d2aa9,'unitId':_0x2df949},_0x37580a=await this[_0x18623b(0xd4)]['post'](_0x18623b(0x101)+_0x2df949+_0x18623b(0xc2),{'body':_0x3221b1});return!_0x37580a[_0x18623b(0xbd)]['error']||_0x37580a[_0x18623b(0xbd)]['error'][_0x18623b(0x110)]===0x1;}async[_0xdb8239(0x104)](_0x2fabd0,_0x14b59d,_0x458720){const _0x2d13a6=_0xdb8239,_0x4f551a={'unitId':_0x2fabd0,'threadId':_0x458720},_0x13a8a5=await this[_0x2d13a6(0xd4)][_0x2d13a6(0xec)](_0x2d13a6(0x101)+_0x2fabd0+_0x2d13a6(0xaa),{'body':_0x4f551a}),_0x576a33=_0x458720[_0x2d13a6(0xce)](_0x1d4d48=>_0x20c5f4(_0x13a8a5[_0x2d13a6(0xbd)]['comments'][_0x1d4d48],_0x2fabd0,_0x14b59d))['filter'](Boolean);return Object['values'](_0x13a8a5[_0x2d13a6(0xbd)][_0x2d13a6(0x106)])[_0x2d13a6(0x9f)](_0x3deb2e=>{const _0x5e03ab=_0x2d13a6;this[_0x5e03ab(0xc6)]['addUser'](_0x3deb2e);}),_0x576a33;}[_0xdb8239(0xa7)](_0x3bdc84){return{'id':_0x3bdc84['id'],'threadId':_0x3bdc84['threadId'],'ref':_0x3bdc84['ref']};}};_0x29ab1d=_0x5092bc([_0x48caf0(0x0,_0x38a45d['Inject'](_0x33aa8b[_0xdb8239(0xbb)])),_0x48caf0(0x1,_0x38a45d[_0xdb8239(0xd9)](_0x38a45d[_0xdb8239(0x94)])),_0x48caf0(0x2,_0x38a45d['Inject'](_0x2fa46c[_0xdb8239(0x10a)])),_0x48caf0(0x3,_0x38a45d[_0xdb8239(0xd9)](_0x38a45d[_0xdb8239(0x108)]))],_0x29ab1d);var _0x2ad026=Object['getOwnPropertyDescriptor'],_0x132165=(_0x58d09f,_0xd8344e,_0x6524a9,_0x10e52f)=>{const _0x48496d=_0xdb8239;for(var _0x1570c8=_0x10e52f>0x1?void 0x0:_0x10e52f?_0x2ad026(_0xd8344e,_0x6524a9):_0xd8344e,_0x1ddf37=_0x58d09f[_0x48496d(0x111)]-0x1,_0x1e5ba8;_0x1ddf37>=0x0;_0x1ddf37--)(_0x1e5ba8=_0x58d09f[_0x1ddf37])&&(_0x1570c8=_0x1e5ba8(_0x1570c8)||_0x1570c8);return _0x1570c8;},_0x37ae7c=(_0x59218f,_0x1c288f)=>(_0x527209,_0x15d363)=>_0x1c288f(_0x527209,_0x15d363,_0x59218f);let _0x34568d=class extends _0x38a45d['Disposable']{constructor(_0x4b57db,_0x48b1){const _0x44a3af=_0xdb8239;super(),this['_threadCommentDataSourceService']=_0x4b57db,this[_0x44a3af(0xe9)]=_0x48b1,this[_0x44a3af(0xd3)]();}[_0xdb8239(0xd3)](){const _0x3dee64=_0xdb8239;this[_0x3dee64(0xbf)][_0x3dee64(0xd0)]=this[_0x3dee64(0xe9)],this[_0x3dee64(0xbf)][_0x3dee64(0x103)]=!0x1;}};_0x34568d=_0x132165([_0x37ae7c(0x0,_0x52aa6c['IThreadCommentDataSourceService']),_0x37ae7c(0x1,_0x38a45d[_0xdb8239(0xd9)](_0x29ab1d))],_0x34568d);var _0x55c8e7=Object[_0xdb8239(0x97)],_0x2e013c=Object[_0xdb8239(0xf7)],_0x3ebff0=(_0x38acf0,_0x362d3f,_0x1fb471)=>_0x362d3f in _0x38acf0?_0x55c8e7(_0x38acf0,_0x362d3f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fb471}):_0x38acf0[_0x362d3f]=_0x1fb471,_0x4dd0fc=(_0x2ae9d0,_0x289c51,_0xfbab82,_0x1a86be)=>{const _0x5bf1cd=_0xdb8239;for(var _0x2fa084=_0x1a86be>0x1?void 0x0:_0x1a86be?_0x2e013c(_0x289c51,_0xfbab82):_0x289c51,_0x4354b7=_0x2ae9d0[_0x5bf1cd(0x111)]-0x1,_0x293e7b;_0x4354b7>=0x0;_0x4354b7--)(_0x293e7b=_0x2ae9d0[_0x4354b7])&&(_0x2fa084=_0x293e7b(_0x2fa084)||_0x2fa084);return _0x2fa084;},_0x159178=(_0x188b62,_0x2ba55f)=>(_0x3d05b8,_0x3bd03c)=>_0x2ba55f(_0x3d05b8,_0x3bd03c,_0x188b62),_0x51a708=(_0x21d232,_0x205a57,_0x3c3065)=>_0x3ebff0(_0x21d232,typeof _0x205a57!=_0xdb8239(0xe5)?_0x205a57+'':_0x205a57,_0x3c3065);_0x2ecba5[_0xdb8239(0xc3)]=class extends _0x38a45d[_0xdb8239(0xc8)]{constructor(_0x4e9d27=_0x466500,_0xb765ee,_0x3b2f85){const _0x4a4f55=_0xdb8239;super(),this[_0x4a4f55(0xc7)]=_0x4e9d27,this[_0x4a4f55(0x118)]=_0xb765ee,this[_0x4a4f55(0x10d)]=_0x3b2f85;const {..._0x4b18d5}=_0x38a45d['merge']({},_0x466500,this[_0x4a4f55(0xc7)]);this[_0x4a4f55(0x10d)]['setConfig'](_0xf4809c,_0x4b18d5);}[_0xdb8239(0xda)](){const _0x359ef3=_0xdb8239;[[_0x29ab1d],[_0x34568d],[_0x52ad31]][_0x359ef3(0x9f)](_0x476828=>{const _0x32f29c=_0x359ef3;this['_injector'][_0x32f29c(0xb5)](_0x476828);});}[_0xdb8239(0xcd)](){const _0x4860f4=_0xdb8239;this[_0x4860f4(0x118)][_0x4860f4(0xe3)](_0x34568d),this[_0x4860f4(0x118)][_0x4860f4(0xe3)](_0x52ad31);}},_0x51a708(_0x2ecba5[_0xdb8239(0xc3)],_0xdb8239(0xfc),_0x513258),_0x51a708(_0x2ecba5[_0xdb8239(0xc3)],_0xdb8239(0xba),_0x38a45d[_0xdb8239(0xd6)][_0xdb8239(0xb2)]),_0x2ecba5['UniverThreadCommentDataSourcePlugin']=_0x4dd0fc([_0x38a45d[_0xdb8239(0xf4)](_0x5a322f[_0xdb8239(0x105)],_0x2fa46c[_0xdb8239(0xc0)],_0x113315['UniverLicensePlugin']),_0x159178(0x1,_0x38a45d['Inject'](_0x38a45d['Injector'])),_0x159178(0x2,_0x38a45d['IConfigService'])],_0x2ecba5['UniverThreadCommentDataSourcePlugin']),Object[_0xdb8239(0x97)](_0x2ecba5,Symbol['toStringTag'],{'value':_0xdb8239(0xd8)});}));function _0x1c96(_0x182f1f,_0x50c549){const _0x4ea8e9=_0x4ea8();return _0x1c96=function(_0x1c96eb,_0x2c7aa4){_0x1c96eb=_0x1c96eb-0x94;let _0x398e7b=_0x4ea8e9[_0x1c96eb];return _0x398e7b;},_0x1c96(_0x182f1f,_0x50c549);}function _0x4ea8(){const _0x426570=['dayjs','7100840MJwMBc','requireSession','6035733lyHTDy','/universer-api/comment/unit/','18656MSmAid','syncUpdateMutationToColla','listComments','UniverThreadCommentUIPlugin','users','_commentService','Injector','5451672mCtJhG','CollaborationSessionService','replyId','UniverCore','_configService','parse','rangeType','code','length','UniverNetwork','/reply','stringify','updateComment','2284396nwHHAk','resolved','_injector','UserManagerService','rxjs','unitId','defineProperty','filter','1VaBQSO','UniverThreadComment','UNRECOGNIZED','1552076PPwOvJ','comment','addComment','forEach','format','_init','Reply','_initUserSync','@univerjs/thread-comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/solved','saveCommentToSnapshot','@univerjs-pro/collaboration-client','thread-comment-data-source.config','/list','createTimestamp','userID','content','replies','COMMENT','Unknown','Solved','UNIVER_UNKNOWN','_sessionService','threadId','add','@univerjs/thread-comment-ui','find','Delete','addUser','type','HTTPService','userId','body','_threadCommentModel','_threadCommentDataSourceService','UniverCollaborationClientPlugin','UniverThreadCommentUi','/delete','UniverThreadCommentDataSourcePlugin','@univerjs-pro/license','@univerjs/network','_userService','_config','Plugin','getMemberID','deleteComment','CommentService','disposeWithMe','onReady','map','Disposable','dataSource','/universer-api/user/list','@univerjs/core','_initDataSource','_httpService','delete','UniverInstanceType','reply','Module','Inject','onStarting','Solve','Add','CustomRangeType','YYYY/MM/DD\x20HH:mm','size','root','solved','OpenOrReOpen','get','error','symbol','352UFteWe','getUnit','payload','_threadCommentDataSource','31367qPETLV','personId','post','rangeId','3tUPdZY','/edit','13160UUDrFS','subscribe','pipe','Edit','DependentOn','function','customRanges','getOwnPropertyDescriptor','object','amd','commentUpdate$','/add','pluginName'];_0x4ea8=function(){return _0x426570;};return _0x4ea8();}
1
+ function _0x4db6(_0x316f8e,_0x15850f){const _0x2e0158=_0x2e01();return _0x4db6=function(_0x4db619,_0x31cf50){_0x4db619=_0x4db619-0x89;let _0x2da222=_0x2e0158[_0x4db619];return _0x2da222;},_0x4db6(_0x316f8e,_0x15850f);}(function(_0x5a65ea,_0x33d0f7){const _0x5f3432=_0x4db6,_0x82ccb9=_0x5a65ea();while(!![]){try{const _0x5f5b24=parseInt(_0x5f3432(0xe0))/0x1+-parseInt(_0x5f3432(0x90))/0x2*(parseInt(_0x5f3432(0xd8))/0x3)+-parseInt(_0x5f3432(0xc1))/0x4*(parseInt(_0x5f3432(0xa6))/0x5)+parseInt(_0x5f3432(0x93))/0x6*(parseInt(_0x5f3432(0xcb))/0x7)+parseInt(_0x5f3432(0x92))/0x8*(parseInt(_0x5f3432(0xbe))/0x9)+parseInt(_0x5f3432(0xe9))/0xa*(parseInt(_0x5f3432(0xd1))/0xb)+-parseInt(_0x5f3432(0xda))/0xc;if(_0x5f5b24===_0x33d0f7)break;else _0x82ccb9['push'](_0x82ccb9['shift']());}catch(_0x4b9432){_0x82ccb9['push'](_0x82ccb9['shift']());}}}(_0x2e01,0x7d1ee),function(_0x4dd952,_0x443e93){const _0xf74120=_0x4db6;typeof exports==_0xf74120(0xfd)&&typeof module<'u'?_0x443e93(exports,require(_0xf74120(0xf4)),require('@univerjs-pro/license'),require(_0xf74120(0xa5)),require(_0xf74120(0x102)),require(_0xf74120(0x96)),require(_0xf74120(0xfa)),require(_0xf74120(0xa4))):typeof define==_0xf74120(0xe4)&&define[_0xf74120(0x91)]?define([_0xf74120(0xfb),'@univerjs-pro/collaboration-client',_0xf74120(0x105),_0xf74120(0xa5),_0xf74120(0x102),'@univerjs/thread-comment','rxjs',_0xf74120(0xa4)],_0x443e93):(_0x4dd952=typeof globalThis<'u'?globalThis:_0x4dd952||self,_0x443e93(_0x4dd952[_0xf74120(0xc4)]={},_0x4dd952[_0xf74120(0x10d)],_0x4dd952[_0xf74120(0xf0)],_0x4dd952[_0xf74120(0xec)],_0x4dd952[_0xf74120(0xf6)],_0x4dd952['UniverThreadComment'],_0x4dd952[_0xf74120(0xfa)],_0x4dd952['UniverNetwork']));}(this,function(_0x31a95e,_0x2f3643,_0x593c5a,_0x4e574c,_0x1a9b5f,_0x32bbc1,_0x14cf1a,_0xaa46df){'use strict';const _0x3c16d5=_0x4db6;const _0x2228d2=_0x3c16d5(0x9f);var _0x3d634e=(_0x193f43=>(_0x193f43[_0x193f43[_0x3c16d5(0xef)]=0x0]='OpenOrReOpen',_0x193f43[_0x193f43[_0x3c16d5(0xdf)]=0x1]=_0x3c16d5(0xdf),_0x193f43[_0x193f43[_0x3c16d5(0x101)]=-0x1]=_0x3c16d5(0x101),_0x193f43))(_0x3d634e||{}),_0x253978=(_0x99459d=>(_0x99459d[_0x99459d['Unknown']=0x0]=_0x3c16d5(0xe6),_0x99459d[_0x99459d[_0x3c16d5(0xf8)]=0x1]='Add',_0x99459d[_0x99459d[_0x3c16d5(0x8d)]=0x2]=_0x3c16d5(0x8d),_0x99459d[_0x99459d[_0x3c16d5(0xfe)]=0x3]='Edit',_0x99459d[_0x99459d[_0x3c16d5(0xca)]=0x4]='Delete',_0x99459d[_0x99459d[_0x3c16d5(0xa8)]=0x5]=_0x3c16d5(0xa8),_0x99459d[_0x99459d['UNRECOGNIZED']=-0x1]=_0x3c16d5(0x101),_0x99459d))(_0x253978||{});const _0x7b33b0=_0x39dd30=>_0x4e574c['dayjs'](new Date(+_0x39dd30))[_0x3c16d5(0xd6)](_0x3c16d5(0xae)),_0x3965fc=async(_0x478cb2,_0x558c69)=>{const _0x90a1bc=_0x3c16d5,_0x3ac8ba=_0x478cb2['get'](_0x4e574c[_0x90a1bc(0xa3)]),_0x417ff6=_0x478cb2[_0x90a1bc(0x10b)](_0xaa46df[_0x90a1bc(0xb8)]);_0x558c69[_0x90a1bc(0xd0)](_0x4fcab8=>{const _0x16959c=_0x90a1bc;_0x3ac8ba[_0x16959c(0xc8)](_0x4fcab8)&&_0x558c69[_0x16959c(0xff)](_0x4fcab8);}),_0x558c69[_0x90a1bc(0x8f)]&&(await _0x417ff6[_0x90a1bc(0x10b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x558c69]}}))[_0x90a1bc(0x106)][_0x90a1bc(0xbb)][_0x90a1bc(0xd0)](_0x544455=>{_0x544455&&_0x3ac8ba['addUser'](_0x544455);});};var _0x465aae=Object[_0x3c16d5(0xb1)],_0x2900c4=(_0xc307ee,_0x42479d,_0x287ddb,_0x335da7)=>{for(var _0x5ae5fc=_0x335da7>0x1?void 0x0:_0x335da7?_0x465aae(_0x42479d,_0x287ddb):_0x42479d,_0x54fcc6=_0xc307ee['length']-0x1,_0x241d50;_0x54fcc6>=0x0;_0x54fcc6--)(_0x241d50=_0xc307ee[_0x54fcc6])&&(_0x5ae5fc=_0x241d50(_0x5ae5fc)||_0x5ae5fc);return _0x5ae5fc;},_0x2b4b57=(_0x1c33e9,_0x5a822)=>(_0x1ca267,_0x371fdb)=>_0x5a822(_0x1ca267,_0x371fdb,_0x1c33e9);let _0xafdf9=class extends _0x4e574c['Disposable']{constructor(_0x23dea9,_0x1675d1,_0x5e0f23,_0x3656fb){const _0x1393d1=_0x3c16d5;super(),this[_0x1393d1(0xd5)]=_0x23dea9,this[_0x1393d1(0x8c)]=_0x1675d1,this[_0x1393d1(0x99)]=_0x5e0f23,this[_0x1393d1(0xe1)]=_0x3656fb,this[_0x1393d1(0xb9)](),this[_0x1393d1(0xb2)]();}['_initUserSync'](){const _0x2a5e05=_0x3c16d5;this[_0x2a5e05(0xb4)](this['_threadCommentModel']['commentUpdate$']['pipe'](_0x14cf1a[_0x2a5e05(0xe2)](0x10))['subscribe'](_0x2b6754=>{const _0x4ca034=_0x2a5e05,_0x50319a=new Set();_0x2b6754['forEach'](_0x402d40=>{const _0x2a52dd=_0x4db6;switch(_0x402d40[_0x2a52dd(0x9e)]){case'add':{const _0x2c878e=_0x402d40['payload']['personId'];_0x50319a[_0x2a52dd(0xad)](_0x2c878e);break;}}}),_0x3965fc(this[_0x4ca034(0xe1)],_0x50319a);}));}[_0x3c16d5(0xb9)](){const _0x565b42=_0x3c16d5;this[_0x565b42(0xb4)](this[_0x565b42(0xd5)][_0x565b42(0xf2)][_0x565b42(0x8a)](async _0xad924b=>{const _0x2007f1=_0x565b42;var _0x3a0601,_0x996750,_0xe1155e,_0x28fb9f;const _0x4de561=(_0x3a0601=this[_0x2007f1(0x8c)]['getUnit'](_0xad924b[_0x2007f1(0x108)])['find'](_0x231e93=>_0x231e93[_0x2007f1(0x107)]===_0xad924b[_0x2007f1(0x107)]))==null?void 0x0:_0x3a0601['root'];if(!_0x4de561)return;const {unitId:_0x3d2c9e,subUnitId:_0x3fec49}=_0x4de561;switch(_0xad924b[_0x2007f1(0xa9)]&&this[_0x2007f1(0x99)][_0x2007f1(0xb3)](_0xad924b[_0x2007f1(0xa9)]),_0xad924b[_0x2007f1(0x9e)]){case _0x253978[_0x2007f1(0xf8)]:break;case _0x253978['Reply']:{this[_0x2007f1(0x8c)]['addComment'](_0x3d2c9e,_0x3fec49,{'unitId':_0x3d2c9e,'subUnitId':_0x3fec49,'ref':'','id':_0xad924b[_0x2007f1(0xcd)],'dT':_0x7b33b0(+_0xad924b[_0x2007f1(0x10e)]),'threadId':_0xad924b[_0x2007f1(0x107)],'personId':(_0xe1155e=(_0x996750=_0xad924b[_0x2007f1(0xa9)])==null?void 0x0:_0x996750['userID'])!=null?_0xe1155e:_0xad924b[_0x2007f1(0x10c)],'text':JSON[_0x2007f1(0xc7)](_0xad924b[_0x2007f1(0x104)]),'parentId':_0x4de561['id']});break;}case _0x253978[_0x2007f1(0xca)]:{const _0x506bf9=this['_threadCommentModel'][_0x2007f1(0xbd)](_0x3d2c9e,_0x3fec49,_0xad924b['replyId']);_0x506bf9&&_0x506bf9[_0x2007f1(0xc3)]&&this[_0x2007f1(0x8c)][_0x2007f1(0xe8)](_0x3d2c9e,_0x3fec49,_0xad924b['replyId']);break;}case _0x253978[_0x2007f1(0xfe)]:{this[_0x2007f1(0x8c)][_0x2007f1(0xea)](_0x3d2c9e,_0x3fec49,{'commentId':_0xad924b['replyId'],'text':JSON[_0x2007f1(0xc7)](_0xad924b[_0x2007f1(0x104)])});break;}case _0x253978[_0x2007f1(0xa8)]:{const _0x1e7b64=(_0x28fb9f=this[_0x2007f1(0x8c)][_0x2007f1(0xcc)](_0xad924b[_0x2007f1(0x108)])['find'](_0x5b5c21=>_0x5b5c21[_0x2007f1(0x107)]===_0xad924b['threadId']))==null?void 0x0:_0x28fb9f[_0x2007f1(0xe7)];_0x1e7b64&&this[_0x2007f1(0x8c)][_0x2007f1(0x109)](_0x3d2c9e,_0x3fec49,_0x1e7b64['id'],_0xad924b[_0x2007f1(0xdb)]===_0x3d634e['Solved']);break;}}}));}};_0xafdf9=_0x2900c4([_0x2b4b57(0x0,_0x4e574c[_0x3c16d5(0x9d)](_0x2f3643[_0x3c16d5(0xb6)])),_0x2b4b57(0x1,_0x4e574c[_0x3c16d5(0x9d)](_0x32bbc1[_0x3c16d5(0xc0)])),_0x2b4b57(0x2,_0x4e574c['Inject'](_0x4e574c[_0x3c16d5(0xa3)])),_0x2b4b57(0x3,_0x4e574c[_0x3c16d5(0x9d)](_0x4e574c[_0x3c16d5(0xb5)]))],_0xafdf9);const _0x5f214c='thread-comment-data-source.config',_0x4666ff={};var _0x1b30b3=Object[_0x3c16d5(0xb1)],_0x3668a8=(_0x516b31,_0x56a00d,_0x56d37b,_0x383a5e)=>{const _0x365625=_0x3c16d5;for(var _0x251968=_0x383a5e>0x1?void 0x0:_0x383a5e?_0x1b30b3(_0x56a00d,_0x56d37b):_0x56a00d,_0x19c563=_0x516b31[_0x365625(0xde)]-0x1,_0x5c3252;_0x19c563>=0x0;_0x19c563--)(_0x5c3252=_0x516b31[_0x19c563])&&(_0x251968=_0x5c3252(_0x251968)||_0x251968);return _0x251968;},_0x45d619=(_0x38f3a0,_0x39e9bb)=>(_0xb9888b,_0x3c24d0)=>_0x39e9bb(_0xb9888b,_0x3c24d0,_0x38f3a0);function _0x309e0a(_0x20299d,_0x38eb91){const _0x1047e0=_0x3c16d5,_0x379bdd=_0x20299d[_0x1047e0(0xab)][0x0];return{..._0x38eb91,'id':_0x379bdd[_0x1047e0(0xcd)],'resolved':_0x20299d[_0x1047e0(0xdb)]===0x1,'dT':_0x7b33b0(_0x379bdd[_0x1047e0(0x10e)]),'personId':_0x379bdd[_0x1047e0(0x10c)],'threadId':_0x379bdd[_0x1047e0(0x107)]};}function _0x51e11e(_0x17bf10,_0x3e77fc,_0xef1219){const _0x5d32c5=_0x3c16d5;var _0x51bb54,_0x1e5cbd;if(((_0x1e5cbd=(_0x51bb54=_0x17bf10==null?void 0x0:_0x17bf10[_0x5d32c5(0xab)])==null?void 0x0:_0x51bb54[_0x5d32c5(0xde)])!=null?_0x1e5cbd:0x0)>0x0){const _0x58a59f=(_0x23f39a,_0x11863f)=>({'id':_0x23f39a[_0x5d32c5(0xcd)],'threadId':_0x23f39a[_0x5d32c5(0x107)],'dT':_0x7b33b0(_0x23f39a[_0x5d32c5(0x10e)]),'personId':_0x23f39a[_0x5d32c5(0x10c)],'resolved':_0x17bf10[_0x5d32c5(0xdb)]===_0x3d634e[_0x5d32c5(0xdf)],'unitId':_0x3e77fc,'subUnitId':_0xef1219,'text':JSON[_0x5d32c5(0xc7)](_0x23f39a[_0x5d32c5(0x104)]),'parentId':_0x11863f}),_0x12d977=_0x58a59f(_0x17bf10[_0x5d32c5(0xab)][0x0]);return{..._0x12d977,'children':_0x17bf10[_0x5d32c5(0xab)][_0x5d32c5(0xed)](0x1)['map'](_0x567fdb=>_0x58a59f(_0x567fdb,_0x12d977['id']))};}return null;}let _0x169cd4=class{constructor(_0x10f9a2,_0x459120,_0x5d32a5,_0x2c1fc7){const _0x108c2a=_0x3c16d5;this[_0x108c2a(0xf1)]=_0x10f9a2,this['_userService']=_0x459120,this[_0x108c2a(0xb7)]=_0x5d32a5,this[_0x108c2a(0xe1)]=_0x2c1fc7;}async[_0x3c16d5(0xfc)](_0x514dd7){const _0x54fb31=_0x3c16d5;var _0xa212a5,_0x1dfd7b;const {parentId:_0x604f34,unitId:_0x4aadef,text:_0x25d8c7,threadId:_0x57f52b}=_0x514dd7,_0x3591a5=(_0x1dfd7b=(_0xa212a5=_0x25d8c7['customRanges'])==null?void 0x0:_0xa212a5[_0x54fb31(0xd4)](_0x58282f=>_0x58282f[_0x54fb31(0xc6)]===_0x4e574c[_0x54fb31(0x8e)][_0x54fb31(0x10a)])[_0x54fb31(0x8b)](_0x57610d=>_0x57610d[_0x54fb31(0xeb)]))!=null?_0x1dfd7b:[],_0x1052a8=JSON['stringify'](_0x25d8c7),_0xd03508=(await this[_0x54fb31(0xb7)][_0x54fb31(0xf5)](_0x4aadef))['getMemberID']();if(_0x604f34){const _0x18aa20={'memberId':_0xd03508,'unitId':_0x4aadef,'content':_0x1052a8,'mention':_0x3591a5,'threadId':_0x57f52b},_0x333c35=(await this[_0x54fb31(0xf1)]['post'](_0x54fb31(0xf7)+_0x4aadef+_0x54fb31(0xf3),{'body':_0x18aa20}))[_0x54fb31(0x106)][_0x54fb31(0xdc)];return{..._0x514dd7,'id':_0x333c35[_0x54fb31(0xcd)],'dT':_0x4e574c['dayjs'](+_0x333c35[_0x54fb31(0x10e)])[_0x54fb31(0xd6)](_0x54fb31(0xae)),'personId':_0x333c35['userId']};}else{const _0x1400c3={'memberId':_0xd03508,'unitId':_0x4aadef,'content':_0x1052a8,'mention':_0x3591a5},_0xcf55b2=await this['_httpService']['post'](_0x54fb31(0xf7)+_0x4aadef+_0x54fb31(0x9c),{'body':_0x1400c3});return _0x309e0a(_0xcf55b2[_0x54fb31(0x106)]['comment'],_0x514dd7);}}async[_0x3c16d5(0xea)](_0x31d7ed){const _0x15fd4c=_0x3c16d5;var _0x3c7990,_0x1fdb12;const {text:_0x588304,unitId:_0x57a969}=_0x31d7ed,_0x44a973=(_0x1fdb12=(_0x3c7990=_0x588304['customRanges'])==null?void 0x0:_0x3c7990[_0x15fd4c(0xd4)](_0x173c2d=>_0x173c2d[_0x15fd4c(0xc6)]===_0x4e574c[_0x15fd4c(0x8e)][_0x15fd4c(0x10a)])['map'](_0x20891c=>_0x20891c[_0x15fd4c(0xeb)]))!=null?_0x1fdb12:[],_0x5145be=JSON[_0x15fd4c(0xd7)](_0x588304),_0x30d76d=_0x31d7ed[_0x15fd4c(0x107)],_0xdffbf9=_0x31d7ed['id'],_0x4466e1={'memberId':(await this[_0x15fd4c(0xb7)][_0x15fd4c(0xf5)](_0x57a969))['getMemberID'](),'unitId':_0x57a969,'threadId':_0x30d76d,'mention':_0x44a973,'content':_0x5145be,'replyId':_0xdffbf9},_0x2bf9eb=await this['_httpService'][_0x15fd4c(0xf9)](_0x15fd4c(0xf7)+_0x57a969+_0x15fd4c(0xd9),{'body':_0x4466e1});return!_0x2bf9eb[_0x15fd4c(0x106)][_0x15fd4c(0xd3)]||_0x2bf9eb[_0x15fd4c(0x106)]['error'][_0x15fd4c(0xb0)]===0x1;}async[_0x3c16d5(0x109)](_0x2ca8fb){const _0x40e1bb=_0x3c16d5,{unitId:_0x12f24c}=_0x2ca8fb,_0x3c11b6=_0x2ca8fb[_0x40e1bb(0x107)],_0x3d0388={'memberId':this[_0x40e1bb(0x99)]['getCurrentUser']()[_0x40e1bb(0xa0)],'unitId':_0x12f24c,'threadId':_0x3c11b6,'solved':_0x2ca8fb[_0x40e1bb(0xba)]?_0x3d634e[_0x40e1bb(0xdf)]:_0x3d634e[_0x40e1bb(0xef)]},_0x24d411=await this[_0x40e1bb(0xf1)][_0x40e1bb(0xf9)](_0x40e1bb(0xf7)+_0x12f24c+'/solved',{'body':_0x3d0388});return!_0x24d411[_0x40e1bb(0x106)][_0x40e1bb(0xd3)]||_0x24d411[_0x40e1bb(0x106)][_0x40e1bb(0xd3)][_0x40e1bb(0xb0)]===0x1;}async[_0x3c16d5(0xe8)](_0x1120e6,_0x1ae752,_0x33c9a1,_0x4116c3){const _0x4857ef=_0x3c16d5,_0x2ba1a8={'memberId':(await this[_0x4857ef(0xb7)][_0x4857ef(0xf5)](_0x1120e6))[_0x4857ef(0xa1)](),'threadId':_0x33c9a1,'replyId':_0x4116c3,'unitId':_0x1120e6},_0x471c70=await this['_httpService']['post'](_0x4857ef(0xf7)+_0x1120e6+'/delete',{'body':_0x2ba1a8});return!_0x471c70['body'][_0x4857ef(0xd3)]||_0x471c70[_0x4857ef(0x106)][_0x4857ef(0xd3)][_0x4857ef(0xb0)]===0x1;}async[_0x3c16d5(0x9a)](_0x1efcdd,_0x2eb165,_0xef89fe){const _0x2b2b48=_0x3c16d5,_0x4c2645={'unitId':_0x1efcdd,'threadId':_0xef89fe},_0x9bf671=await this[_0x2b2b48(0xf1)][_0x2b2b48(0xf9)](_0x2b2b48(0xf7)+_0x1efcdd+_0x2b2b48(0x98),{'body':_0x4c2645}),_0x5812bf=_0xef89fe['map'](_0x45b239=>_0x51e11e(_0x9bf671[_0x2b2b48(0x106)][_0x2b2b48(0xbc)][_0x45b239],_0x1efcdd,_0x2eb165))[_0x2b2b48(0xd4)](Boolean);return Object[_0x2b2b48(0xc5)](_0x9bf671['body'][_0x2b2b48(0xbb)])[_0x2b2b48(0xd0)](_0x22d295=>{const _0x5a3d1c=_0x2b2b48;this['_userService'][_0x5a3d1c(0xb3)](_0x22d295);}),_0x5812bf;}[_0x3c16d5(0xcf)](_0x52804e){const _0x344354=_0x3c16d5;return{'id':_0x52804e['id'],'threadId':_0x52804e[_0x344354(0x107)],'ref':_0x52804e[_0x344354(0xa2)]};}};_0x169cd4=_0x3668a8([_0x45d619(0x0,_0x4e574c[_0x3c16d5(0x9d)](_0xaa46df[_0x3c16d5(0xb8)])),_0x45d619(0x1,_0x4e574c[_0x3c16d5(0x9d)](_0x4e574c[_0x3c16d5(0xa3)])),_0x45d619(0x2,_0x4e574c['Inject'](_0x2f3643[_0x3c16d5(0x94)])),_0x45d619(0x3,_0x4e574c[_0x3c16d5(0x9d)](_0x4e574c[_0x3c16d5(0xb5)]))],_0x169cd4);var _0x3b869d=Object[_0x3c16d5(0xb1)],_0x451518=(_0x2bb05f,_0x1ff6bf,_0x2019a3,_0x36ba8e)=>{const _0x5427a5=_0x3c16d5;for(var _0x2c1b7f=_0x36ba8e>0x1?void 0x0:_0x36ba8e?_0x3b869d(_0x1ff6bf,_0x2019a3):_0x1ff6bf,_0x964349=_0x2bb05f[_0x5427a5(0xde)]-0x1,_0x2cd5bf;_0x964349>=0x0;_0x964349--)(_0x2cd5bf=_0x2bb05f[_0x964349])&&(_0x2c1b7f=_0x2cd5bf(_0x2c1b7f)||_0x2c1b7f);return _0x2c1b7f;},_0x61c240=(_0x1fa32a,_0x408018)=>(_0x3695ba,_0x3b8b6c)=>_0x408018(_0x3695ba,_0x3b8b6c,_0x1fa32a);let _0x10ace3=class extends _0x4e574c[_0x3c16d5(0x89)]{constructor(_0x426fea,_0x1b003f){const _0x2bfa1c=_0x3c16d5;super(),this[_0x2bfa1c(0xac)]=_0x426fea,this['_threadCommentDataSource']=_0x1b003f,this[_0x2bfa1c(0xa7)]();}['_initDataSource'](){const _0x111dc8=_0x3c16d5;this[_0x111dc8(0xac)][_0x111dc8(0xce)]=this[_0x111dc8(0xaf)],this[_0x111dc8(0xac)][_0x111dc8(0xbf)]=!0x1;}};_0x10ace3=_0x451518([_0x61c240(0x0,_0x32bbc1['IThreadCommentDataSourceService']),_0x61c240(0x1,_0x4e574c[_0x3c16d5(0x9d)](_0x169cd4))],_0x10ace3);var _0x2c2284=Object[_0x3c16d5(0xdd)],_0x39d30f=Object['getOwnPropertyDescriptor'],_0x101343=(_0x184a37,_0x4050eb,_0x2ee1db)=>_0x4050eb in _0x184a37?_0x2c2284(_0x184a37,_0x4050eb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2ee1db}):_0x184a37[_0x4050eb]=_0x2ee1db,_0x28b52a=(_0x3f2f17,_0x366aa3,_0x170f23,_0x474c22)=>{const _0x3757ae=_0x3c16d5;for(var _0x4dd3c4=_0x474c22>0x1?void 0x0:_0x474c22?_0x39d30f(_0x366aa3,_0x170f23):_0x366aa3,_0x2d58a9=_0x3f2f17[_0x3757ae(0xde)]-0x1,_0x46f745;_0x2d58a9>=0x0;_0x2d58a9--)(_0x46f745=_0x3f2f17[_0x2d58a9])&&(_0x4dd3c4=_0x46f745(_0x4dd3c4)||_0x4dd3c4);return _0x4dd3c4;},_0x4a0522=(_0x280a5d,_0xc8754a)=>(_0x2f9939,_0x412298)=>_0xc8754a(_0x2f9939,_0x412298,_0x280a5d),_0x16b592=(_0x211724,_0x33aa43,_0x26a27c)=>_0x101343(_0x211724,typeof _0x33aa43!='symbol'?_0x33aa43+'':_0x33aa43,_0x26a27c);_0x31a95e[_0x3c16d5(0x97)]=class extends _0x4e574c['Plugin']{constructor(_0x41a221=_0x4666ff,_0x300ebe,_0x990b20){const _0x4a0703=_0x3c16d5;super(),this['_config']=_0x41a221,this['_injector']=_0x300ebe,this[_0x4a0703(0x9b)]=_0x990b20;const {..._0x117525}=_0x4e574c[_0x4a0703(0xc2)]({},_0x4666ff,this[_0x4a0703(0xd2)]);this[_0x4a0703(0x9b)][_0x4a0703(0xe3)](_0x5f214c,_0x117525);}['onStarting'](){const _0x3df95d=_0x3c16d5;[[_0x169cd4],[_0x10ace3],[_0xafdf9]][_0x3df95d(0xd0)](_0x48717c=>{const _0x169800=_0x3df95d;this[_0x169800(0xe1)]['add'](_0x48717c);});}['onReady'](){const _0x3336c9=_0x3c16d5;this['_injector'][_0x3336c9(0x10b)](_0x10ace3),this[_0x3336c9(0xe1)][_0x3336c9(0x10b)](_0xafdf9);}},_0x16b592(_0x31a95e[_0x3c16d5(0x97)],'pluginName',_0x2228d2),_0x16b592(_0x31a95e['UniverThreadCommentDataSourcePlugin'],_0x3c16d5(0x9e),_0x4e574c['UniverInstanceType'][_0x3c16d5(0x100)]),_0x31a95e[_0x3c16d5(0x97)]=_0x28b52a([_0x4e574c[_0x3c16d5(0xe5)](_0x1a9b5f[_0x3c16d5(0xc9)],_0x2f3643[_0x3c16d5(0x95)],_0x593c5a['UniverLicensePlugin']),_0x4a0522(0x1,_0x4e574c[_0x3c16d5(0x9d)](_0x4e574c[_0x3c16d5(0xb5)])),_0x4a0522(0x2,_0x4e574c[_0x3c16d5(0xaa)])],_0x31a95e['UniverThreadCommentDataSourcePlugin']),Object[_0x3c16d5(0xdd)](_0x31a95e,Symbol[_0x3c16d5(0xee)],{'value':_0x3c16d5(0x103)});}));function _0x2e01(){const _0x2a885d=['addUser','disposeWithMe','Injector','CommentService','_sessionService','HTTPService','_init','resolved','users','comments','getComment','18kvmNYM','syncUpdateMutationToColla','ThreadCommentModel','839512lTxefV','merge','parentId','UniverProThreadCommentDatasource','values','rangeType','parse','getUser','UniverThreadCommentUIPlugin','Delete','6831643ElQSsN','getUnit','replyId','dataSource','saveCommentToSnapshot','forEach','5022226Yrdwbc','_config','error','filter','_commentService','format','stringify','174891IjIgOR','/edit','24826032YeBkdr','solved','reply','defineProperty','length','Solved','412724OQuilf','_injector','bufferTime','setConfig','function','DependentOn','Unknown','root','deleteComment','20yDOJEy','updateComment','rangeId','UniverCore','slice','toStringTag','OpenOrReOpen','UniverProLicense','_httpService','commentUpdate$','/reply','@univerjs-pro/collaboration-client','requireSession','UniverThreadCommentUi','/universer-api/comment/unit/','Add','post','rxjs','exports','addComment','object','Edit','delete','UNIVER_UNKNOWN','UNRECOGNIZED','@univerjs/thread-comment-ui','Module','content','@univerjs-pro/license','body','threadId','unitId','resolveComment','COMMENT','get','userId','UniverProCollaborationClient','createTimestamp','Disposable','subscribe','map','_threadCommentModel','Reply','CustomRangeType','size','10DsSiTc','amd','3963064OzplAR','6ficgWx','CollaborationSessionService','UniverCollaborationClientPlugin','@univerjs/thread-comment','UniverThreadCommentDataSourcePlugin','/list','_userService','listComments','_configService','/add','Inject','type','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userID','getMemberID','ref','UserManagerService','@univerjs/network','@univerjs/core','10MCjUYB','_initDataSource','Solve','user','IConfigService','replies','_threadCommentDataSourceService','add','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','code','getOwnPropertyDescriptor','_initUserSync'];_0x2e01=function(){return _0x2a885d;};return _0x2e01();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.5",
3
+ "version": "0.6.6-experimental.20250319-2bbe26f",
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.6.5",
49
- "@univerjs/core": "0.6.5",
48
+ "@univerjs-pro/collaboration-client": "0.6.6-experimental.20250319-2bbe26f",
49
+ "@univerjs/core": "0.6.6-experimental.20250319-2bbe26f",
50
+ "@univerjs/network": "0.6.6-experimental.20250319-2bbe26f",
50
51
  "@univerjs/protocol": "0.1.44-alpha.3",
51
- "@univerjs/network": "0.6.5",
52
- "@univerjs/thread-comment-ui": "0.6.5",
53
- "@univerjs-pro/license": "0.6.5",
54
- "@univerjs/thread-comment": "0.6.5"
52
+ "@univerjs-pro/license": "0.6.6-experimental.20250319-2bbe26f",
53
+ "@univerjs/thread-comment": "0.6.6-experimental.20250319-2bbe26f",
54
+ "@univerjs/thread-comment-ui": "0.6.6-experimental.20250319-2bbe26f"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.2",
59
- "vite": "^6.2.0",
59
+ "vite": "^6.2.1",
60
60
  "vitest": "^3.0.8",
61
- "@univerjs-infra/shared": "0.6.5"
61
+ "@univerjs-infra/shared": "0.6.6"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",