@univerjs-pro/thread-comment-datasource 0.12.0 → 0.12.1-nightly.202511221011

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 _0x195db3=_0x258e;(function(_0x2e4ebd,_0x3036ff){const _0x45239d=_0x258e,_0x419b52=_0x2e4ebd();while(!![]){try{const _0x2e468d=parseInt(_0x45239d(0x189))/0x1*(parseInt(_0x45239d(0x14e))/0x2)+parseInt(_0x45239d(0x186))/0x3+-parseInt(_0x45239d(0x179))/0x4*(-parseInt(_0x45239d(0x19b))/0x5)+-parseInt(_0x45239d(0x185))/0x6+parseInt(_0x45239d(0x15a))/0x7*(parseInt(_0x45239d(0x1ac))/0x8)+-parseInt(_0x45239d(0x19a))/0x9*(parseInt(_0x45239d(0x178))/0xa)+-parseInt(_0x45239d(0x14d))/0xb;if(_0x2e468d===_0x3036ff)break;else _0x419b52['push'](_0x419b52['shift']());}catch(_0x6d2cd0){_0x419b52['push'](_0x419b52['shift']());}}}(_0x542b,0x9223d));function _0x258e(_0x456c8e,_0x532c97){const _0x542b55=_0x542b();return _0x258e=function(_0x258e82,_0x2c7676){_0x258e82=_0x258e82-0x135;let _0x57b794=_0x542b55[_0x258e82];return _0x57b794;},_0x258e(_0x456c8e,_0x532c97);}Object[_0x195db3(0x16f)](exports,Symbol[_0x195db3(0x147)],{'value':_0x195db3(0x144)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x195db3(0x148);var I=(_0x24fdd8=>(_0x24fdd8[_0x24fdd8['OpenOrReOpen']=0x0]=_0x195db3(0x192),_0x24fdd8[_0x24fdd8['Solved']=0x1]=_0x195db3(0x18b),_0x24fdd8[_0x24fdd8[_0x195db3(0x1aa)]=-0x1]=_0x195db3(0x1aa),_0x24fdd8))(I||{}),v=(_0x20ac03=>(_0x20ac03[_0x20ac03[_0x195db3(0x193)]=0x0]=_0x195db3(0x193),_0x20ac03[_0x20ac03[_0x195db3(0x15b)]=0x1]='Add',_0x20ac03[_0x20ac03[_0x195db3(0x199)]=0x2]=_0x195db3(0x199),_0x20ac03[_0x20ac03[_0x195db3(0x136)]=0x3]=_0x195db3(0x136),_0x20ac03[_0x20ac03[_0x195db3(0x160)]=0x4]=_0x195db3(0x160),_0x20ac03[_0x20ac03[_0x195db3(0x14b)]=0x5]=_0x195db3(0x14b),_0x20ac03[_0x20ac03['UNRECOGNIZED']=-0x1]=_0x195db3(0x1aa),_0x20ac03))(v||{});const f=_0x3fcec2=>c[_0x195db3(0x16b)](new Date(+_0x3fcec2))[_0x195db3(0x19c)](_0x195db3(0x17e)),R=async(_0x42a7de,_0x26304c)=>{const _0x1f130f=_0x195db3,_0x2aa132=_0x42a7de['get'](c[_0x1f130f(0x159)]),_0x1801da=_0x42a7de['get'](P[_0x1f130f(0x18d)]);_0x26304c[_0x1f130f(0x13c)](_0x5baac6=>{const _0x4bcbe5=_0x1f130f;_0x2aa132[_0x4bcbe5(0x139)](_0x5baac6)&&_0x26304c[_0x4bcbe5(0x151)](_0x5baac6);}),_0x26304c[_0x1f130f(0x1a1)]&&(await _0x1801da[_0x1f130f(0x17a)](_0x1f130f(0x17d),{'params':{'userIDs':[..._0x26304c]}}))[_0x1f130f(0x182)]['users']['forEach'](_0x3bccdf=>{const _0x50bf63=_0x1f130f;_0x3bccdf&&_0x2aa132[_0x50bf63(0x154)](_0x3bccdf);});};var $=Object[_0x195db3(0x1a4)],E=(_0xc00abc,_0x43ea9e,_0x4c9946,_0x1d084c)=>{for(var _0x356bdb=_0x1d084c>0x1?void 0x0:_0x1d084c?$(_0x43ea9e,_0x4c9946):_0x43ea9e,_0x1c155a=_0xc00abc['length']-0x1,_0x20f7c2;_0x1c155a>=0x0;_0x1c155a--)(_0x20f7c2=_0xc00abc[_0x1c155a])&&(_0x356bdb=_0x20f7c2(_0x356bdb)||_0x356bdb);return _0x356bdb;},S=(_0x2c93b0,_0x22ff17)=>(_0x34a120,_0x159b84)=>_0x22ff17(_0x34a120,_0x159b84,_0x2c93b0);let _=class extends c[_0x195db3(0x172)]{constructor(_0x576af9,_0x1c8f41,_0x5c80a9,_0x4283cc){const _0x4db075=_0x195db3;super(),this[_0x4db075(0x15d)]=_0x576af9,this[_0x4db075(0x16a)]=_0x1c8f41,this['_userService']=_0x5c80a9,this[_0x4db075(0x162)]=_0x4283cc,this['_init'](),this['_initUserSync']();}['_initUserSync'](){const _0xbeb649=_0x195db3;this[_0xbeb649(0x1ae)](this['_threadCommentModel'][_0xbeb649(0x168)][_0xbeb649(0x167)](j[_0xbeb649(0x1a7)](0x10))[_0xbeb649(0x16c)](_0x1367f5=>{const _0x379813=_0xbeb649,_0x3febad=new Set();_0x1367f5[_0x379813(0x13c)](_0x38376d=>{const _0x2275d8=_0x379813;switch(_0x38376d[_0x2275d8(0x145)]){case'add':{const _0x5238c3=_0x38376d[_0x2275d8(0x150)][_0x2275d8(0x141)];_0x3febad['add'](_0x5238c3);break;}}}),R(this['_injector'],_0x3febad);}));}[_0x195db3(0x177)](){const _0x37f1a3=_0x195db3;this['disposeWithMe'](this['_commentService'][_0x37f1a3(0x168)][_0x37f1a3(0x16c)](async _0x53722f=>{const _0x21fe98=_0x37f1a3;var _0x2a0162,_0x3986d9,_0xe8d305,_0x66369b;const _0x23eb41=(_0x2a0162=this['_threadCommentModel'][_0x21fe98(0x18a)](_0x53722f[_0x21fe98(0x163)])['find'](_0x502ddd=>_0x502ddd['threadId']===_0x53722f[_0x21fe98(0x169)]))==null?void 0x0:_0x2a0162[_0x21fe98(0x190)];if(!_0x23eb41)return;const {unitId:_0x6fb230,subUnitId:_0x32e0d3}=_0x23eb41;switch(_0x53722f['user']&&this[_0x21fe98(0x1a3)][_0x21fe98(0x154)](_0x53722f[_0x21fe98(0x195)]),_0x53722f[_0x21fe98(0x145)]){case v[_0x21fe98(0x15b)]:break;case v[_0x21fe98(0x199)]:{this[_0x21fe98(0x16a)][_0x21fe98(0x196)](_0x6fb230,_0x32e0d3,{'unitId':_0x6fb230,'subUnitId':_0x32e0d3,'ref':'','id':_0x53722f[_0x21fe98(0x171)],'dT':f(+_0x53722f[_0x21fe98(0x149)]),'threadId':_0x53722f[_0x21fe98(0x169)],'personId':(_0xe8d305=(_0x3986d9=_0x53722f[_0x21fe98(0x195)])==null?void 0x0:_0x3986d9[_0x21fe98(0x146)])!=null?_0xe8d305:_0x53722f[_0x21fe98(0x13d)],'text':JSON[_0x21fe98(0x15c)](_0x53722f[_0x21fe98(0x176)]),'parentId':_0x23eb41['id']});break;}case v['Delete']:{const _0x1fd165=this[_0x21fe98(0x16a)]['getComment'](_0x6fb230,_0x32e0d3,_0x53722f['replyId']);_0x1fd165&&_0x1fd165['parentId']&&this[_0x21fe98(0x16a)][_0x21fe98(0x13f)](_0x6fb230,_0x32e0d3,_0x53722f[_0x21fe98(0x171)]);break;}case v[_0x21fe98(0x136)]:{this['_threadCommentModel'][_0x21fe98(0x143)](_0x6fb230,_0x32e0d3,{'commentId':_0x53722f['replyId'],'text':JSON[_0x21fe98(0x15c)](_0x53722f['content'])});break;}case v[_0x21fe98(0x14b)]:{const _0x56b272=(_0x66369b=this[_0x21fe98(0x16a)]['getUnit'](_0x53722f[_0x21fe98(0x163)])[_0x21fe98(0x161)](_0x4368ae=>_0x4368ae['threadId']===_0x53722f[_0x21fe98(0x169)]))==null?void 0x0:_0x66369b[_0x21fe98(0x190)];_0x56b272&&this[_0x21fe98(0x16a)][_0x21fe98(0x19e)](_0x6fb230,_0x32e0d3,_0x56b272['id'],_0x53722f['solved']===I[_0x21fe98(0x18b)]);break;}}}));}};_=E([S(0x0,c[_0x195db3(0x135)](b[_0x195db3(0x13b)])),S(0x1,c[_0x195db3(0x135)](M[_0x195db3(0x1a9)])),S(0x2,c[_0x195db3(0x135)](c[_0x195db3(0x159)])),S(0x3,c[_0x195db3(0x135)](c['Injector']))],_);const q=_0x195db3(0x16e),D={};function _0x542b(){const _0x2d24bb=['subscribe','customRanges','thread-comment-data-source.config','defineProperty','CollaborationSessionService','replyId','Disposable','listComments','COMMENT','comment','content','_init','4850jTKrgN','3644uZGjjR','get','error','dataSource','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','ref','syncUpdateMutationToColla','reply','body','saveCommentToSnapshot','replies','5834784YUodIV','2832624DBQdHp','_initDataSource','users','775805JbSnnE','getUnit','Solved','/add','HTTPService','rangeId','map','root','onStarting','OpenOrReOpen','Unknown','stringify','user','addComment','slice','_threadCommentDataSourceService','Reply','8793YdaqYX','1175mLAJso','format','_threadCommentDataSource','resolveComment','_httpService','filter','size','code','_userService','getOwnPropertyDescriptor','_configService','IThreadCommentDataSourceService','bufferTime','_sessionService','ThreadCommentModel','UNRECOGNIZED','/edit','208lrZiVf','requireSession','disposeWithMe','onReady','rangeType','Inject','Edit','solved','/reply','getUser','resolved','CommentService','forEach','userId','merge','deleteComment','pluginName','personId','length','updateComment','Module','type','userID','toStringTag','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','createTimestamp','Injector','Solve','/universer-api/comment/unit/','6475172frenTZ','2zfPPco','_config','payload','delete','getMemberID','setConfig','addUser','Plugin','UniverLicensePlugin','/list','post','UserManagerService','188314gYbJqQ','Add','parse','_commentService','UniverThreadCommentDataSourcePlugin','values','Delete','find','_injector','unitId','CustomRangeType','DependentOn','add','pipe','commentUpdate$','threadId','_threadCommentModel','dayjs'];_0x542b=function(){return _0x2d24bb;};return _0x542b();}var A=Object[_0x195db3(0x1a4)],x=(_0x2b5ce1,_0x552725,_0x59c638,_0x1a68e4)=>{const _0x5b1e91=_0x195db3;for(var _0x1bbb13=_0x1a68e4>0x1?void 0x0:_0x1a68e4?A(_0x552725,_0x59c638):_0x552725,_0x54db8d=_0x2b5ce1[_0x5b1e91(0x142)]-0x1,_0x5a02d8;_0x54db8d>=0x0;_0x54db8d--)(_0x5a02d8=_0x2b5ce1[_0x54db8d])&&(_0x1bbb13=_0x5a02d8(_0x1bbb13)||_0x1bbb13);return _0x1bbb13;},C=(_0x2aa6ff,_0x35fc84)=>(_0x3347fe,_0xcca97b)=>_0x35fc84(_0x3347fe,_0xcca97b,_0x2aa6ff);function Y(_0x21be45,_0x2905f5){const _0x5913f8=_0x195db3,_0x5cf8ce=_0x21be45[_0x5913f8(0x184)][0x0];return{..._0x2905f5,'id':_0x5cf8ce['replyId'],'resolved':_0x21be45[_0x5913f8(0x137)]===0x1,'dT':f(_0x5cf8ce[_0x5913f8(0x149)]),'personId':_0x5cf8ce['userId'],'threadId':_0x5cf8ce['threadId']};}function G(_0x2cb4bb,_0xe75564,_0x4d262c){const _0x5601d2=_0x195db3;var _0xb9406d,_0x4f6325;if(((_0x4f6325=(_0xb9406d=_0x2cb4bb==null?void 0x0:_0x2cb4bb[_0x5601d2(0x184)])==null?void 0x0:_0xb9406d[_0x5601d2(0x142)])!=null?_0x4f6325:0x0)>0x0){const _0x2899a5=(_0x175f0a,_0x4fa2f7)=>({'id':_0x175f0a[_0x5601d2(0x171)],'threadId':_0x175f0a[_0x5601d2(0x169)],'dT':f(_0x175f0a['createTimestamp']),'personId':_0x175f0a[_0x5601d2(0x13d)],'resolved':_0x2cb4bb[_0x5601d2(0x137)]===I[_0x5601d2(0x18b)],'unitId':_0xe75564,'subUnitId':_0x4d262c,'text':JSON[_0x5601d2(0x15c)](_0x175f0a['content']),'parentId':_0x4fa2f7}),_0x1f5141=_0x2899a5(_0x2cb4bb[_0x5601d2(0x184)][0x0]);return{..._0x1f5141,'children':_0x2cb4bb[_0x5601d2(0x184)][_0x5601d2(0x197)](0x1)['map'](_0x373122=>_0x2899a5(_0x373122,_0x1f5141['id']))};}return null;}let p=class{constructor(_0x5584d6,_0x3cec69,_0x5c5b4d){const _0x557221=_0x195db3;this[_0x557221(0x19f)]=_0x5584d6,this[_0x557221(0x1a3)]=_0x3cec69,this['_sessionService']=_0x5c5b4d;}async[_0x195db3(0x196)](_0x35bf60){const _0x44be90=_0x195db3;var _0x373af9,_0x29f677;const {parentId:_0x40e44d,unitId:_0x401325,text:_0x4c484d,threadId:_0x263dca}=_0x35bf60,_0x4b9268=(_0x29f677=(_0x373af9=_0x4c484d[_0x44be90(0x16d)])==null?void 0x0:_0x373af9[_0x44be90(0x1a0)](_0x198e77=>_0x198e77[_0x44be90(0x1b0)]===c[_0x44be90(0x164)][_0x44be90(0x174)])[_0x44be90(0x18f)](_0x169ca0=>_0x169ca0[_0x44be90(0x18e)]))!=null?_0x29f677:[],_0x1da5c1=JSON[_0x44be90(0x194)](_0x4c484d),_0x441f9d=(await this[_0x44be90(0x1a8)][_0x44be90(0x1ad)](_0x401325))[_0x44be90(0x152)]();if(_0x40e44d){const _0xda83d2={'memberId':_0x441f9d,'unitId':_0x401325,'content':_0x1da5c1,'mention':_0x4b9268,'threadId':_0x263dca},_0x493ac9=(await this[_0x44be90(0x19f)][_0x44be90(0x158)](_0x44be90(0x14c)+_0x401325+_0x44be90(0x138),{'body':_0xda83d2}))[_0x44be90(0x182)][_0x44be90(0x181)];return{..._0x35bf60,'id':_0x493ac9[_0x44be90(0x171)],'dT':c['dayjs'](+_0x493ac9[_0x44be90(0x149)])[_0x44be90(0x19c)](_0x44be90(0x17e)),'personId':_0x493ac9[_0x44be90(0x13d)]};}else{const _0x564395={'memberId':_0x441f9d,'unitId':_0x401325,'content':_0x1da5c1,'mention':_0x4b9268},_0x2a819a=await this[_0x44be90(0x19f)][_0x44be90(0x158)](_0x44be90(0x14c)+_0x401325+_0x44be90(0x18c),{'body':_0x564395});return Y(_0x2a819a[_0x44be90(0x182)][_0x44be90(0x175)],_0x35bf60);}}async[_0x195db3(0x143)](_0x1a6277){const _0xf31879=_0x195db3;var _0x1e0c15,_0x404a33;const {text:_0x27a8ad,unitId:_0x6050b5}=_0x1a6277,_0x7d6f7b=(_0x404a33=(_0x1e0c15=_0x27a8ad[_0xf31879(0x16d)])==null?void 0x0:_0x1e0c15[_0xf31879(0x1a0)](_0x34d9e4=>_0x34d9e4[_0xf31879(0x1b0)]===c[_0xf31879(0x164)][_0xf31879(0x174)])['map'](_0x38b5e3=>_0x38b5e3[_0xf31879(0x18e)]))!=null?_0x404a33:[],_0x182f70=JSON[_0xf31879(0x194)](_0x27a8ad),_0x1228ce=_0x1a6277[_0xf31879(0x169)],_0x4e565b=_0x1a6277['id'],_0x22c37d={'memberId':(await this[_0xf31879(0x1a8)][_0xf31879(0x1ad)](_0x6050b5))[_0xf31879(0x152)](),'unitId':_0x6050b5,'threadId':_0x1228ce,'mention':_0x7d6f7b,'content':_0x182f70,'replyId':_0x4e565b},_0x4f8fc6=await this[_0xf31879(0x19f)]['post'](_0xf31879(0x14c)+_0x6050b5+_0xf31879(0x1ab),{'body':_0x22c37d});return!_0x4f8fc6[_0xf31879(0x182)][_0xf31879(0x17b)]||_0x4f8fc6['body']['error'][_0xf31879(0x1a2)]===0x1;}async[_0x195db3(0x19e)](_0x59ff42){const _0x516013=_0x195db3,{unitId:_0x160e1f}=_0x59ff42,_0x1ceb84=_0x59ff42[_0x516013(0x169)],_0x26103e={'memberId':this[_0x516013(0x1a3)]['getCurrentUser']()['userID'],'unitId':_0x160e1f,'threadId':_0x1ceb84,'solved':_0x59ff42[_0x516013(0x13a)]?I[_0x516013(0x18b)]:I[_0x516013(0x192)]},_0x58d704=await this[_0x516013(0x19f)][_0x516013(0x158)](_0x516013(0x14c)+_0x160e1f+'/solved',{'body':_0x26103e});return!_0x58d704[_0x516013(0x182)][_0x516013(0x17b)]||_0x58d704[_0x516013(0x182)][_0x516013(0x17b)][_0x516013(0x1a2)]===0x1;}async[_0x195db3(0x13f)](_0xdf98aa,_0x1378cf,_0x4d3b8e,_0xb1038c){const _0x54a7b4=_0x195db3,_0x2647aa={'memberId':(await this['_sessionService'][_0x54a7b4(0x1ad)](_0xdf98aa))['getMemberID'](),'threadId':_0x4d3b8e,'replyId':_0xb1038c,'unitId':_0xdf98aa},_0x5ee1a2=await this['_httpService'][_0x54a7b4(0x158)](_0x54a7b4(0x14c)+_0xdf98aa+'/delete',{'body':_0x2647aa});return!_0x5ee1a2[_0x54a7b4(0x182)][_0x54a7b4(0x17b)]||_0x5ee1a2[_0x54a7b4(0x182)][_0x54a7b4(0x17b)][_0x54a7b4(0x1a2)]===0x1;}async[_0x195db3(0x173)](_0x46ab83,_0x5ab91c,_0x55c6d8){const _0x101912=_0x195db3,_0x31ccec={'unitId':_0x46ab83,'threadId':_0x55c6d8},_0x20e19d=await this['_httpService'][_0x101912(0x158)](_0x101912(0x14c)+_0x46ab83+_0x101912(0x157),{'body':_0x31ccec}),_0x10977e=_0x55c6d8['map'](_0x57cb40=>G(_0x20e19d[_0x101912(0x182)]['comments'][_0x57cb40],_0x46ab83,_0x5ab91c))['filter'](Boolean);return Object[_0x101912(0x15f)](_0x20e19d['body'][_0x101912(0x188)])[_0x101912(0x13c)](_0x89551c=>{const _0x59183d=_0x101912;this['_userService'][_0x59183d(0x154)](_0x89551c);}),_0x10977e;}[_0x195db3(0x183)](_0x563b0d){const _0x3e14dc=_0x195db3;return{'id':_0x563b0d['id'],'threadId':_0x563b0d[_0x3e14dc(0x169)],'ref':_0x563b0d[_0x3e14dc(0x17f)]};}};p=x([C(0x0,c[_0x195db3(0x135)](P[_0x195db3(0x18d)])),C(0x1,c[_0x195db3(0x135)](c['UserManagerService'])),C(0x2,c[_0x195db3(0x135)](b[_0x195db3(0x170)]))],p);var H=Object[_0x195db3(0x1a4)],J=(_0x475c1c,_0x5f0b88,_0x483961,_0x4a9959)=>{const _0x10680b=_0x195db3;for(var _0x1c9ce6=_0x4a9959>0x1?void 0x0:_0x4a9959?H(_0x5f0b88,_0x483961):_0x5f0b88,_0x4de202=_0x475c1c[_0x10680b(0x142)]-0x1,_0x70ee70;_0x4de202>=0x0;_0x4de202--)(_0x70ee70=_0x475c1c[_0x4de202])&&(_0x1c9ce6=_0x70ee70(_0x1c9ce6)||_0x1c9ce6);return _0x1c9ce6;},y=(_0x13b6a7,_0x4d6b97)=>(_0x13b1f1,_0x25a6f4)=>_0x4d6b97(_0x13b1f1,_0x25a6f4,_0x13b6a7);let g=class extends c[_0x195db3(0x172)]{constructor(_0x388939,_0x408779){const _0x5d3a98=_0x195db3;super(),this['_threadCommentDataSourceService']=_0x388939,this[_0x5d3a98(0x19d)]=_0x408779,this['_initDataSource']();}[_0x195db3(0x187)](){const _0x223aa7=_0x195db3;this[_0x223aa7(0x198)][_0x223aa7(0x17c)]=this[_0x223aa7(0x19d)],this[_0x223aa7(0x198)][_0x223aa7(0x180)]=!0x1;}};g=J([y(0x0,M[_0x195db3(0x1a6)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x195db3(0x16f)],L=Object[_0x195db3(0x1a4)],Z=(_0x19ef7e,_0x2c74c6,_0x398add)=>_0x2c74c6 in _0x19ef7e?F(_0x19ef7e,_0x2c74c6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x398add}):_0x19ef7e[_0x2c74c6]=_0x398add,W=(_0x3be2e7,_0x3c5cf3,_0x548ffb,_0x576e0b)=>{const _0x28e9da=_0x195db3;for(var _0x47cfe5=_0x576e0b>0x1?void 0x0:_0x576e0b?L(_0x3c5cf3,_0x548ffb):_0x3c5cf3,_0x44d2a4=_0x3be2e7[_0x28e9da(0x142)]-0x1,_0x5d2488;_0x44d2a4>=0x0;_0x44d2a4--)(_0x5d2488=_0x3be2e7[_0x44d2a4])&&(_0x47cfe5=_0x5d2488(_0x47cfe5)||_0x47cfe5);return _0x47cfe5;},O=(_0x4a2c23,_0x3e467a)=>(_0x433fac,_0x2177fc)=>_0x3e467a(_0x433fac,_0x2177fc,_0x4a2c23),N=(_0xee95f7,_0xb7021c,_0x3ea5bb)=>Z(_0xee95f7,typeof _0xb7021c!='symbol'?_0xb7021c+'':_0xb7021c,_0x3ea5bb);exports[_0x195db3(0x15e)]=class extends c[_0x195db3(0x155)]{constructor(_0x283a8b=D,_0x112f56,_0x37581f){const _0x18c80e=_0x195db3;super(),this[_0x18c80e(0x14f)]=_0x283a8b,this[_0x18c80e(0x162)]=_0x112f56,this[_0x18c80e(0x1a5)]=_0x37581f;const {..._0x57546a}=c[_0x18c80e(0x13e)]({},D,this[_0x18c80e(0x14f)]);this[_0x18c80e(0x1a5)][_0x18c80e(0x153)](q,_0x57546a);}[_0x195db3(0x191)](){[[p],[g],[_]]['forEach'](_0xbabd8e=>{const _0x51124a=_0x258e;this[_0x51124a(0x162)][_0x51124a(0x166)](_0xbabd8e);});}[_0x195db3(0x1af)](){const _0x42b9aa=_0x195db3;this['_injector'][_0x42b9aa(0x17a)](g),this[_0x42b9aa(0x162)][_0x42b9aa(0x17a)](_);}},N(exports[_0x195db3(0x15e)],_0x195db3(0x140),U),N(exports[_0x195db3(0x15e)],'type',c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x195db3(0x15e)]=W([c[_0x195db3(0x165)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x195db3(0x156)]),O(0x1,c['Inject'](c[_0x195db3(0x14a)])),O(0x2,c['IConfigService'])],exports[_0x195db3(0x15e)]);
1
+ 'use strict';const _0x4e54ff=_0x1cb8;(function(_0x52bac1,_0x4f24fb){const _0x22dd45=_0x1cb8,_0x459b48=_0x52bac1();while(!![]){try{const _0x456d=parseInt(_0x22dd45(0x1b4))/0x1+-parseInt(_0x22dd45(0x15f))/0x2+parseInt(_0x22dd45(0x19f))/0x3*(-parseInt(_0x22dd45(0x19a))/0x4)+parseInt(_0x22dd45(0x19c))/0x5+parseInt(_0x22dd45(0x173))/0x6+-parseInt(_0x22dd45(0x16a))/0x7+parseInt(_0x22dd45(0x1a3))/0x8;if(_0x456d===_0x4f24fb)break;else _0x459b48['push'](_0x459b48['shift']());}catch(_0x1c90ec){_0x459b48['push'](_0x459b48['shift']());}}}(_0xbd57,0xa71f8));Object[_0x4e54ff(0x168)](exports,Symbol[_0x4e54ff(0x1aa)],{'value':_0x4e54ff(0x1a4)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4e54ff(0x152);var I=(_0x2b5367=>(_0x2b5367[_0x2b5367[_0x4e54ff(0x14c)]=0x0]=_0x4e54ff(0x14c),_0x2b5367[_0x2b5367['Solved']=0x1]=_0x4e54ff(0x18e),_0x2b5367[_0x2b5367[_0x4e54ff(0x1b2)]=-0x1]='UNRECOGNIZED',_0x2b5367))(I||{}),v=(_0x2b3815=>(_0x2b3815[_0x2b3815[_0x4e54ff(0x175)]=0x0]=_0x4e54ff(0x175),_0x2b3815[_0x2b3815[_0x4e54ff(0x164)]=0x1]='Add',_0x2b3815[_0x2b3815[_0x4e54ff(0x181)]=0x2]=_0x4e54ff(0x181),_0x2b3815[_0x2b3815[_0x4e54ff(0x1a8)]=0x3]=_0x4e54ff(0x1a8),_0x2b3815[_0x2b3815[_0x4e54ff(0x17e)]=0x4]=_0x4e54ff(0x17e),_0x2b3815[_0x2b3815[_0x4e54ff(0x179)]=0x5]=_0x4e54ff(0x179),_0x2b3815[_0x2b3815[_0x4e54ff(0x1b2)]=-0x1]=_0x4e54ff(0x1b2),_0x2b3815))(v||{});const f=_0x2374ac=>c['dayjs'](new Date(+_0x2374ac))[_0x4e54ff(0x150)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x2e4ab4,_0x4cdfed)=>{const _0x9e3580=_0x4e54ff,_0x1effb6=_0x2e4ab4[_0x9e3580(0x196)](c[_0x9e3580(0x15b)]),_0x2db1f9=_0x2e4ab4[_0x9e3580(0x196)](P['HTTPService']);_0x4cdfed[_0x9e3580(0x191)](_0x32ae48=>{const _0x1a5fc4=_0x9e3580;_0x1effb6[_0x1a5fc4(0x162)](_0x32ae48)&&_0x4cdfed[_0x1a5fc4(0x15c)](_0x32ae48);}),_0x4cdfed['size']&&(await _0x2db1f9[_0x9e3580(0x196)](_0x9e3580(0x165),{'params':{'userIDs':[..._0x4cdfed]}}))[_0x9e3580(0x16f)][_0x9e3580(0x160)][_0x9e3580(0x191)](_0x310f87=>{const _0x577efb=_0x9e3580;_0x310f87&&_0x1effb6[_0x577efb(0x180)](_0x310f87);});};var $=Object[_0x4e54ff(0x18f)],E=(_0xb66bec,_0x540309,_0x128157,_0x49a46e)=>{const _0x2080e4=_0x4e54ff;for(var _0xfe0fb=_0x49a46e>0x1?void 0x0:_0x49a46e?$(_0x540309,_0x128157):_0x540309,_0x2e9330=_0xb66bec[_0x2080e4(0x1a9)]-0x1,_0x340629;_0x2e9330>=0x0;_0x2e9330--)(_0x340629=_0xb66bec[_0x2e9330])&&(_0xfe0fb=_0x340629(_0xfe0fb)||_0xfe0fb);return _0xfe0fb;},S=(_0x1b84f7,_0x47808e)=>(_0x2eb786,_0x42b586)=>_0x47808e(_0x2eb786,_0x42b586,_0x1b84f7);let _=class extends c[_0x4e54ff(0x177)]{constructor(_0x1c3c5c,_0x1691b2,_0x3253dc,_0x20be70){const _0x14e40f=_0x4e54ff;super(),this['_commentService']=_0x1c3c5c,this[_0x14e40f(0x15a)]=_0x1691b2,this['_userService']=_0x3253dc,this['_injector']=_0x20be70,this[_0x14e40f(0x148)](),this[_0x14e40f(0x184)]();}[_0x4e54ff(0x184)](){const _0x1f7c87=_0x4e54ff;this[_0x1f7c87(0x144)](this[_0x1f7c87(0x15a)][_0x1f7c87(0x176)][_0x1f7c87(0x1ad)](j[_0x1f7c87(0x14a)](0x10))[_0x1f7c87(0x170)](_0x4dfdf3=>{const _0x13570d=_0x1f7c87,_0x372b74=new Set();_0x4dfdf3['forEach'](_0x414801=>{const _0x4e455d=_0x1cb8;switch(_0x414801[_0x4e455d(0x16c)]){case _0x4e455d(0x185):{const _0x167a9a=_0x414801[_0x4e455d(0x1a0)][_0x4e455d(0x19e)];_0x372b74[_0x4e455d(0x185)](_0x167a9a);break;}}}),R(this[_0x13570d(0x1b1)],_0x372b74);}));}[_0x4e54ff(0x148)](){const _0x3acb1a=_0x4e54ff;this[_0x3acb1a(0x144)](this['_commentService'][_0x3acb1a(0x176)]['subscribe'](async _0x472c2c=>{const _0x258fc0=_0x3acb1a;var _0x49f19a,_0x46351c,_0x2ecc43,_0x756b29;const _0xbceed0=(_0x49f19a=this[_0x258fc0(0x15a)][_0x258fc0(0x167)](_0x472c2c['unitId'])[_0x258fc0(0x14d)](_0x1da577=>_0x1da577[_0x258fc0(0x195)]===_0x472c2c[_0x258fc0(0x195)]))==null?void 0x0:_0x49f19a['root'];if(!_0xbceed0)return;const {unitId:_0x3d45a3,subUnitId:_0x5a7e86}=_0xbceed0;switch(_0x472c2c[_0x258fc0(0x1b5)]&&this[_0x258fc0(0x15e)][_0x258fc0(0x180)](_0x472c2c[_0x258fc0(0x1b5)]),_0x472c2c[_0x258fc0(0x16c)]){case v[_0x258fc0(0x164)]:break;case v[_0x258fc0(0x181)]:{this[_0x258fc0(0x15a)][_0x258fc0(0x194)](_0x3d45a3,_0x5a7e86,{'unitId':_0x3d45a3,'subUnitId':_0x5a7e86,'ref':'','id':_0x472c2c[_0x258fc0(0x17c)],'dT':f(+_0x472c2c[_0x258fc0(0x154)]),'threadId':_0x472c2c[_0x258fc0(0x195)],'personId':(_0x2ecc43=(_0x46351c=_0x472c2c[_0x258fc0(0x1b5)])==null?void 0x0:_0x46351c[_0x258fc0(0x188)])!=null?_0x2ecc43:_0x472c2c['userId'],'text':JSON[_0x258fc0(0x1a2)](_0x472c2c[_0x258fc0(0x18a)]),'parentId':_0xbceed0['id']});break;}case v[_0x258fc0(0x17e)]:{const _0x52e86d=this['_threadCommentModel'][_0x258fc0(0x17f)](_0x3d45a3,_0x5a7e86,_0x472c2c[_0x258fc0(0x17c)]);_0x52e86d&&_0x52e86d[_0x258fc0(0x156)]&&this[_0x258fc0(0x15a)][_0x258fc0(0x147)](_0x3d45a3,_0x5a7e86,_0x472c2c['replyId']);break;}case v['Edit']:{this[_0x258fc0(0x15a)][_0x258fc0(0x14b)](_0x3d45a3,_0x5a7e86,{'commentId':_0x472c2c[_0x258fc0(0x17c)],'text':JSON[_0x258fc0(0x1a2)](_0x472c2c['content'])});break;}case v[_0x258fc0(0x179)]:{const _0x36d713=(_0x756b29=this['_threadCommentModel'][_0x258fc0(0x167)](_0x472c2c[_0x258fc0(0x190)])[_0x258fc0(0x14d)](_0x3c869d=>_0x3c869d[_0x258fc0(0x195)]===_0x472c2c[_0x258fc0(0x195)]))==null?void 0x0:_0x756b29[_0x258fc0(0x149)];_0x36d713&&this['_threadCommentModel'][_0x258fc0(0x174)](_0x3d45a3,_0x5a7e86,_0x36d713['id'],_0x472c2c[_0x258fc0(0x18d)]===I[_0x258fc0(0x18e)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x4e54ff(0x1ac)])),S(0x1,c[_0x4e54ff(0x1ae)](M[_0x4e54ff(0x14e)])),S(0x2,c[_0x4e54ff(0x1ae)](c[_0x4e54ff(0x15b)])),S(0x3,c[_0x4e54ff(0x1ae)](c[_0x4e54ff(0x13f)]))],_);const q=_0x4e54ff(0x1a5),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x23e8a2,_0x40a77d,_0xf58c63,_0x127c7f)=>{const _0x37b954=_0x4e54ff;for(var _0x5304ea=_0x127c7f>0x1?void 0x0:_0x127c7f?A(_0x40a77d,_0xf58c63):_0x40a77d,_0x328dd4=_0x23e8a2[_0x37b954(0x1a9)]-0x1,_0x44e6d2;_0x328dd4>=0x0;_0x328dd4--)(_0x44e6d2=_0x23e8a2[_0x328dd4])&&(_0x5304ea=_0x44e6d2(_0x5304ea)||_0x5304ea);return _0x5304ea;},C=(_0x3918c2,_0x511327)=>(_0x31383a,_0x18d330)=>_0x511327(_0x31383a,_0x18d330,_0x3918c2);function _0x1cb8(_0x55ac0b,_0x32ac73){const _0xbd57b9=_0xbd57();return _0x1cb8=function(_0x1cb85b,_0x3e1f4d){_0x1cb85b=_0x1cb85b-0x13c;let _0x6b4040=_0xbd57b9[_0x1cb85b];return _0x6b4040;},_0x1cb8(_0x55ac0b,_0x32ac73);}function Y(_0x26bdc2,_0x16855e){const _0x4cb573=_0x4e54ff,_0x361d5c=_0x26bdc2[_0x4cb573(0x13c)][0x0];return{..._0x16855e,'id':_0x361d5c['replyId'],'resolved':_0x26bdc2['solved']===0x1,'dT':f(_0x361d5c[_0x4cb573(0x154)]),'personId':_0x361d5c[_0x4cb573(0x1af)],'threadId':_0x361d5c[_0x4cb573(0x195)]};}function G(_0x3a8271,_0x4ff7e2,_0x5246ef){const _0x424a43=_0x4e54ff;var _0x2c6718,_0x54036e;if(((_0x54036e=(_0x2c6718=_0x3a8271==null?void 0x0:_0x3a8271[_0x424a43(0x13c)])==null?void 0x0:_0x2c6718[_0x424a43(0x1a9)])!=null?_0x54036e:0x0)>0x0){const _0x20255a=(_0xeac31a,_0x35d0b4)=>({'id':_0xeac31a[_0x424a43(0x17c)],'threadId':_0xeac31a['threadId'],'dT':f(_0xeac31a[_0x424a43(0x154)]),'personId':_0xeac31a[_0x424a43(0x1af)],'resolved':_0x3a8271['solved']===I['Solved'],'unitId':_0x4ff7e2,'subUnitId':_0x5246ef,'text':JSON[_0x424a43(0x1a2)](_0xeac31a[_0x424a43(0x18a)]),'parentId':_0x35d0b4}),_0x46ee90=_0x20255a(_0x3a8271['replies'][0x0]);return{..._0x46ee90,'children':_0x3a8271[_0x424a43(0x13c)][_0x424a43(0x16b)](0x1)[_0x424a43(0x186)](_0x19b6e6=>_0x20255a(_0x19b6e6,_0x46ee90['id']))};}return null;}function _0xbd57(){const _0x140152=['body','subscribe','saveCommentToSnapshot','CollaborationSessionService','423102EZRkaJ','resolveComment','Unknown','commentUpdate$','Disposable','values','Solve','/universer-api/comment/unit/','UniverCollaborationClientPlugin','replyId','getCurrentUser','Delete','getComment','addUser','Reply','onStarting','setConfig','_initUserSync','add','map','IThreadCommentDataSourceService','userID','_initDataSource','content','dayjs','syncUpdateMutationToColla','solved','Solved','getOwnPropertyDescriptor','unitId','forEach','customRanges','UniverThreadCommentDataSourcePlugin','addComment','threadId','get','YYYY/MM/DD\x20HH:mm','stringify','listComments','112EryYRw','DependentOn','2073995HTyGGy','code','personId','8142TerIUb','payload','rangeId','parse','12630584MSlfio','Module','thread-comment-data-source.config','post','_config','Edit','length','toStringTag','UniverThreadCommentUIPlugin','CommentService','pipe','Inject','userId','ref','_injector','UNRECOGNIZED','UniverLicensePlugin','18487GfIozu','user','replies','_threadCommentDataSource','filter','Injector','requireSession','merge','dataSource','UniverInstanceType','disposeWithMe','/list','CustomRangeType','deleteComment','_init','root','bufferTime','updateComment','OpenOrReOpen','find','ThreadCommentModel','/edit','format','comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','COMMENT','createTimestamp','/add','parentId','/reply','_configService','_threadCommentDataSourceService','_threadCommentModel','UserManagerService','delete','_sessionService','_userService','626568praPRV','users','getMemberID','getUser','_httpService','Add','/universer-api/user/list','comments','getUnit','defineProperty','error','7061698Vtrcda','slice','type','/delete','pluginName'];_0xbd57=function(){return _0x140152;};return _0xbd57();}let p=class{constructor(_0x17296e,_0x527398,_0xb5969f){const _0x5cf7a4=_0x4e54ff;this[_0x5cf7a4(0x163)]=_0x17296e,this[_0x5cf7a4(0x15e)]=_0x527398,this[_0x5cf7a4(0x15d)]=_0xb5969f;}async[_0x4e54ff(0x194)](_0x444728){const _0x396126=_0x4e54ff;var _0x25949e,_0x2da73b;const {parentId:_0x2a8069,unitId:_0x50d2bb,text:_0x25210b,threadId:_0x41da55}=_0x444728,_0x276570=(_0x2da73b=(_0x25949e=_0x25210b['customRanges'])==null?void 0x0:_0x25949e[_0x396126(0x13e)](_0x15c0a2=>_0x15c0a2['rangeType']===c['CustomRangeType'][_0x396126(0x153)])[_0x396126(0x186)](_0x1a4ae6=>_0x1a4ae6[_0x396126(0x1a1)]))!=null?_0x2da73b:[],_0x426546=JSON[_0x396126(0x198)](_0x25210b),_0x51cd4b=(await this[_0x396126(0x15d)][_0x396126(0x140)](_0x50d2bb))[_0x396126(0x161)]();if(_0x2a8069){const _0x404e38={'memberId':_0x51cd4b,'unitId':_0x50d2bb,'content':_0x426546,'mention':_0x276570,'threadId':_0x41da55},_0x33c508=(await this[_0x396126(0x163)][_0x396126(0x1a6)]('/universer-api/comment/unit/'+_0x50d2bb+_0x396126(0x157),{'body':_0x404e38}))['body']['reply'];return{..._0x444728,'id':_0x33c508['replyId'],'dT':c[_0x396126(0x18b)](+_0x33c508[_0x396126(0x154)])[_0x396126(0x150)](_0x396126(0x197)),'personId':_0x33c508[_0x396126(0x1af)]};}else{const _0x7cf946={'memberId':_0x51cd4b,'unitId':_0x50d2bb,'content':_0x426546,'mention':_0x276570},_0x28fead=await this['_httpService'][_0x396126(0x1a6)](_0x396126(0x17a)+_0x50d2bb+_0x396126(0x155),{'body':_0x7cf946});return Y(_0x28fead['body'][_0x396126(0x151)],_0x444728);}}async[_0x4e54ff(0x14b)](_0x5a2458){const _0x4c0419=_0x4e54ff;var _0x3057d7,_0x5870d2;const {text:_0x29b576,unitId:_0xcc168f}=_0x5a2458,_0x2f4d54=(_0x5870d2=(_0x3057d7=_0x29b576[_0x4c0419(0x192)])==null?void 0x0:_0x3057d7[_0x4c0419(0x13e)](_0x232cdc=>_0x232cdc['rangeType']===c[_0x4c0419(0x146)]['COMMENT'])['map'](_0x197c9d=>_0x197c9d[_0x4c0419(0x1a1)]))!=null?_0x5870d2:[],_0x52ac1b=JSON[_0x4c0419(0x198)](_0x29b576),_0x746288=_0x5a2458[_0x4c0419(0x195)],_0x485a9f=_0x5a2458['id'],_0x40f209={'memberId':(await this[_0x4c0419(0x15d)][_0x4c0419(0x140)](_0xcc168f))[_0x4c0419(0x161)](),'unitId':_0xcc168f,'threadId':_0x746288,'mention':_0x2f4d54,'content':_0x52ac1b,'replyId':_0x485a9f},_0x528d08=await this[_0x4c0419(0x163)][_0x4c0419(0x1a6)](_0x4c0419(0x17a)+_0xcc168f+_0x4c0419(0x14f),{'body':_0x40f209});return!_0x528d08['body'][_0x4c0419(0x169)]||_0x528d08[_0x4c0419(0x16f)][_0x4c0419(0x169)][_0x4c0419(0x19d)]===0x1;}async['resolveComment'](_0x4d752a){const _0x1789f0=_0x4e54ff,{unitId:_0x4f2ec1}=_0x4d752a,_0x272e9e=_0x4d752a[_0x1789f0(0x195)],_0x1ba4c3={'memberId':this[_0x1789f0(0x15e)][_0x1789f0(0x17d)]()[_0x1789f0(0x188)],'unitId':_0x4f2ec1,'threadId':_0x272e9e,'solved':_0x4d752a['resolved']?I['Solved']:I['OpenOrReOpen']},_0x3a79f1=await this[_0x1789f0(0x163)][_0x1789f0(0x1a6)](_0x1789f0(0x17a)+_0x4f2ec1+'/solved',{'body':_0x1ba4c3});return!_0x3a79f1[_0x1789f0(0x16f)][_0x1789f0(0x169)]||_0x3a79f1[_0x1789f0(0x16f)][_0x1789f0(0x169)]['code']===0x1;}async[_0x4e54ff(0x147)](_0x461080,_0x55ee4e,_0x282edf,_0x151da1){const _0x38ecb8=_0x4e54ff,_0x38c708={'memberId':(await this[_0x38ecb8(0x15d)][_0x38ecb8(0x140)](_0x461080))[_0x38ecb8(0x161)](),'threadId':_0x282edf,'replyId':_0x151da1,'unitId':_0x461080},_0x3669e1=await this['_httpService'][_0x38ecb8(0x1a6)](_0x38ecb8(0x17a)+_0x461080+_0x38ecb8(0x16d),{'body':_0x38c708});return!_0x3669e1[_0x38ecb8(0x16f)][_0x38ecb8(0x169)]||_0x3669e1[_0x38ecb8(0x16f)][_0x38ecb8(0x169)][_0x38ecb8(0x19d)]===0x1;}async[_0x4e54ff(0x199)](_0x3ddd62,_0x2ed544,_0x3dfb07){const _0x3a292f=_0x4e54ff,_0x3b6979={'unitId':_0x3ddd62,'threadId':_0x3dfb07},_0x335d6e=await this[_0x3a292f(0x163)][_0x3a292f(0x1a6)]('/universer-api/comment/unit/'+_0x3ddd62+_0x3a292f(0x145),{'body':_0x3b6979}),_0x4dbde8=_0x3dfb07[_0x3a292f(0x186)](_0xf9ed7b=>G(_0x335d6e[_0x3a292f(0x16f)][_0x3a292f(0x166)][_0xf9ed7b],_0x3ddd62,_0x2ed544))[_0x3a292f(0x13e)](Boolean);return Object[_0x3a292f(0x178)](_0x335d6e[_0x3a292f(0x16f)][_0x3a292f(0x160)])[_0x3a292f(0x191)](_0x574e9b=>{const _0x4217ed=_0x3a292f;this['_userService'][_0x4217ed(0x180)](_0x574e9b);}),_0x4dbde8;}[_0x4e54ff(0x171)](_0x350d3e){const _0x490e42=_0x4e54ff;return{'id':_0x350d3e['id'],'threadId':_0x350d3e[_0x490e42(0x195)],'ref':_0x350d3e[_0x490e42(0x1b0)]};}};p=x([C(0x0,c[_0x4e54ff(0x1ae)](P['HTTPService'])),C(0x1,c[_0x4e54ff(0x1ae)](c[_0x4e54ff(0x15b)])),C(0x2,c['Inject'](b[_0x4e54ff(0x172)]))],p);var H=Object[_0x4e54ff(0x18f)],J=(_0x180cad,_0x3bf74d,_0x12cecf,_0x11683c)=>{const _0x2a644b=_0x4e54ff;for(var _0x4f2529=_0x11683c>0x1?void 0x0:_0x11683c?H(_0x3bf74d,_0x12cecf):_0x3bf74d,_0x193855=_0x180cad[_0x2a644b(0x1a9)]-0x1,_0x45ac9c;_0x193855>=0x0;_0x193855--)(_0x45ac9c=_0x180cad[_0x193855])&&(_0x4f2529=_0x45ac9c(_0x4f2529)||_0x4f2529);return _0x4f2529;},y=(_0x42648f,_0x3edba9)=>(_0x3253ef,_0x5715bd)=>_0x3edba9(_0x3253ef,_0x5715bd,_0x42648f);let g=class extends c[_0x4e54ff(0x177)]{constructor(_0x1591e4,_0x105306){const _0x1258b7=_0x4e54ff;super(),this[_0x1258b7(0x159)]=_0x1591e4,this['_threadCommentDataSource']=_0x105306,this[_0x1258b7(0x189)]();}[_0x4e54ff(0x189)](){const _0x45d4d1=_0x4e54ff;this[_0x45d4d1(0x159)][_0x45d4d1(0x142)]=this[_0x45d4d1(0x13d)],this[_0x45d4d1(0x159)][_0x45d4d1(0x18c)]=!0x1;}};g=J([y(0x0,M[_0x4e54ff(0x187)]),y(0x1,c[_0x4e54ff(0x1ae)](p))],g);var F=Object[_0x4e54ff(0x168)],L=Object['getOwnPropertyDescriptor'],Z=(_0x137594,_0xf1dcd9,_0x45e549)=>_0xf1dcd9 in _0x137594?F(_0x137594,_0xf1dcd9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x45e549}):_0x137594[_0xf1dcd9]=_0x45e549,W=(_0x1e0da3,_0x52957a,_0x2b186f,_0x2b2834)=>{const _0x40e015=_0x4e54ff;for(var _0x57e9cd=_0x2b2834>0x1?void 0x0:_0x2b2834?L(_0x52957a,_0x2b186f):_0x52957a,_0x1e53f8=_0x1e0da3[_0x40e015(0x1a9)]-0x1,_0x35c2db;_0x1e53f8>=0x0;_0x1e53f8--)(_0x35c2db=_0x1e0da3[_0x1e53f8])&&(_0x57e9cd=_0x35c2db(_0x57e9cd)||_0x57e9cd);return _0x57e9cd;},O=(_0x26bf63,_0x2197e2)=>(_0x5b1175,_0x4ade1b)=>_0x2197e2(_0x5b1175,_0x4ade1b,_0x26bf63),N=(_0x518dbf,_0x3875a9,_0x215cba)=>Z(_0x518dbf,typeof _0x3875a9!='symbol'?_0x3875a9+'':_0x3875a9,_0x215cba);exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x266e6c=D,_0x1a2a69,_0x83087f){const _0x52ce3e=_0x4e54ff;super(),this['_config']=_0x266e6c,this[_0x52ce3e(0x1b1)]=_0x1a2a69,this[_0x52ce3e(0x158)]=_0x83087f;const {..._0x34c0ac}=c[_0x52ce3e(0x141)]({},D,this[_0x52ce3e(0x1a7)]);this[_0x52ce3e(0x158)][_0x52ce3e(0x183)](q,_0x34c0ac);}[_0x4e54ff(0x182)](){const _0x2e5b54=_0x4e54ff;[[p],[g],[_]][_0x2e5b54(0x191)](_0x717d01=>{this['_injector']['add'](_0x717d01);});}['onReady'](){const _0x4a76d6=_0x4e54ff;this[_0x4a76d6(0x1b1)]['get'](g),this[_0x4a76d6(0x1b1)][_0x4a76d6(0x196)](_);}},N(exports[_0x4e54ff(0x193)],_0x4e54ff(0x16e),U),N(exports[_0x4e54ff(0x193)],'type',c[_0x4e54ff(0x143)]['UNIVER_UNKNOWN']),exports[_0x4e54ff(0x193)]=W([c[_0x4e54ff(0x19b)](w[_0x4e54ff(0x1ab)],b[_0x4e54ff(0x17b)],T[_0x4e54ff(0x1b3)]),O(0x1,c[_0x4e54ff(0x1ae)](c[_0x4e54ff(0x13f)])),O(0x2,c['IConfigService'])],exports[_0x4e54ff(0x193)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x30354b=_0x6b72;(function(_0x19d239,_0x4952ed){const _0x4ca1fb=_0x6b72,_0x19fe23=_0x19d239();while(!![]){try{const _0x3084f5=-parseInt(_0x4ca1fb(0x1f4))/0x1+parseInt(_0x4ca1fb(0x208))/0x2*(parseInt(_0x4ca1fb(0x1da))/0x3)+-parseInt(_0x4ca1fb(0x1db))/0x4*(parseInt(_0x4ca1fb(0x1ed))/0x5)+parseInt(_0x4ca1fb(0x200))/0x6*(parseInt(_0x4ca1fb(0x205))/0x7)+parseInt(_0x4ca1fb(0x1dd))/0x8*(parseInt(_0x4ca1fb(0x222))/0x9)+parseInt(_0x4ca1fb(0x1e1))/0xa*(-parseInt(_0x4ca1fb(0x20d))/0xb)+-parseInt(_0x4ca1fb(0x21e))/0xc*(-parseInt(_0x4ca1fb(0x1d6))/0xd);if(_0x3084f5===_0x4952ed)break;else _0x19fe23['push'](_0x19fe23['shift']());}catch(_0x39d700){_0x19fe23['push'](_0x19fe23['shift']());}}}(_0x403e,0x81e18));import{CommentService as _0x3237e5,CollaborationSessionService as _0x4c60bb,UniverCollaborationClientPlugin as _0x516653}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2125bb}from'@univerjs-pro/license';import{dayjs as _0x4a080f,UserManagerService as _0x3579fd,Inject as _0x5d6dec,Injector as _0x5eef6b,Disposable as _0x5da71c,CustomRangeType as _0x300af4,UniverInstanceType as _0x3bb98c,DependentOn as _0x413398,IConfigService as _0x195d4b,Plugin as _0x3bc542,merge as _0x3f3339}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x32a910}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59f117,IThreadCommentDataSourceService as _0x5a2639}from'@univerjs/thread-comment';import{bufferTime as _0x298b90}from'rxjs';import{HTTPService as _0x365edd}from'@univerjs/network';const W=_0x30354b(0x213);var I=(_0x42d073=>(_0x42d073[_0x42d073['OpenOrReOpen']=0x0]=_0x30354b(0x20c),_0x42d073[_0x42d073[_0x30354b(0x1c9)]=0x1]=_0x30354b(0x1c9),_0x42d073[_0x42d073[_0x30354b(0x228)]=-0x1]=_0x30354b(0x228),_0x42d073))(I||{}),v=(_0xdac16d=>(_0xdac16d[_0xdac16d[_0x30354b(0x227)]=0x0]=_0x30354b(0x227),_0xdac16d[_0xdac16d[_0x30354b(0x1eb)]=0x1]=_0x30354b(0x1eb),_0xdac16d[_0xdac16d['Reply']=0x2]=_0x30354b(0x206),_0xdac16d[_0xdac16d[_0x30354b(0x1e6)]=0x3]=_0x30354b(0x1e6),_0xdac16d[_0xdac16d[_0x30354b(0x21c)]=0x4]=_0x30354b(0x21c),_0xdac16d[_0xdac16d[_0x30354b(0x1f9)]=0x5]=_0x30354b(0x1f9),_0xdac16d[_0xdac16d[_0x30354b(0x228)]=-0x1]='UNRECOGNIZED',_0xdac16d))(v||{});function _0x6b72(_0x14a30b,_0x560ebb){const _0x403ee1=_0x403e();return _0x6b72=function(_0x6b7255,_0x530bbb){_0x6b7255=_0x6b7255-0x1bf;let _0x1ed82a=_0x403ee1[_0x6b7255];return _0x1ed82a;},_0x6b72(_0x14a30b,_0x560ebb);}const y=_0x20d043=>_0x4a080f(new Date(+_0x20d043))[_0x30354b(0x1dc)](_0x30354b(0x1ea)),B=async(_0x8aafcb,_0x268328)=>{const _0x272da7=_0x30354b,_0x5a6e33=_0x8aafcb[_0x272da7(0x1f2)](_0x3579fd),_0x4580be=_0x8aafcb['get'](_0x365edd);_0x268328[_0x272da7(0x1f8)](_0x5b728e=>{const _0x20658e=_0x272da7;_0x5a6e33['getUser'](_0x5b728e)&&_0x268328[_0x20658e(0x1cd)](_0x5b728e);}),_0x268328[_0x272da7(0x20e)]&&(await _0x4580be[_0x272da7(0x1f2)]('/universer-api/user/list',{'params':{'userIDs':[..._0x268328]}}))['body'][_0x272da7(0x1c0)][_0x272da7(0x1f8)](_0x3d3b14=>{_0x3d3b14&&_0x5a6e33['addUser'](_0x3d3b14);});};var K=Object[_0x30354b(0x1cf)],V=(_0x21890e,_0x355929,_0x52281e,_0x33a0bb)=>{for(var _0x2d5ee7=_0x33a0bb>0x1?void 0x0:_0x33a0bb?K(_0x355929,_0x52281e):_0x355929,_0x64e2f4=_0x21890e['length']-0x1,_0x187cda;_0x64e2f4>=0x0;_0x64e2f4--)(_0x187cda=_0x21890e[_0x64e2f4])&&(_0x2d5ee7=_0x187cda(_0x2d5ee7)||_0x2d5ee7);return _0x2d5ee7;},p=(_0x32e8d0,_0x11768a)=>(_0xb1bcde,_0x41d10e)=>_0x11768a(_0xb1bcde,_0x41d10e,_0x32e8d0);function _0x403e(){const _0x9332c1=['383411wVdAmB','Reply','_threadCommentModel','973118bKoQQJ','unitId','parentId','post','OpenOrReOpen','8591EPYukU','size','map','deleteComment','/edit','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','listComments','add','code','requireSession','length','find','_userService','_injector','Delete','thread-comment-data-source.config','12RTfxpP','disposeWithMe','customRanges','content','3332061xALvhp','type','COMMENT','subscribe','resolveComment','Unknown','UNRECOGNIZED','userID','rangeType','users','commentUpdate$','updateComment','userId','pluginName','UNIVER_UNKNOWN','/reply','parse','setConfig','Solved','user','symbol','syncUpdateMutationToColla','delete','getMemberID','getOwnPropertyDescriptor','dataSource','_httpService','/universer-api/comment/unit/','rangeId','error','replies','8514857XxTsix','_config','personId','replyId','3enWGLm','2360572tLMfeG','format','16yJVYPp','_threadCommentDataSourceService','root','stringify','12940bAyFEK','getComment','resolved','addComment','solved','Edit','_threadCommentDataSource','ref','getUnit','YYYY/MM/DD\x20HH:mm','Add','defineProperty','5tfTzCe','slice','comment','addUser','_commentService','get','_initUserSync','789944uVQuGT','pipe','_sessionService','threadId','forEach','Solve','values','_init','filter','comments','body','_configService','114URdPkj','/list','onReady','onStarting','createTimestamp'];_0x403e=function(){return _0x9332c1;};return _0x403e();}let _=class extends _0x5da71c{constructor(_0x5774e9,_0xcf3eec,_0x1b0940,_0x585d2e){const _0xaf08c6=_0x30354b;super(),this[_0xaf08c6(0x1f1)]=_0x5774e9,this[_0xaf08c6(0x207)]=_0xcf3eec,this[_0xaf08c6(0x21a)]=_0x1b0940,this['_injector']=_0x585d2e,this[_0xaf08c6(0x1fb)](),this[_0xaf08c6(0x1f3)]();}[_0x30354b(0x1f3)](){const _0x5d96f1=_0x30354b;this[_0x5d96f1(0x21f)](this[_0x5d96f1(0x207)]['commentUpdate$'][_0x5d96f1(0x1f5)](_0x298b90(0x10))[_0x5d96f1(0x225)](_0x3cef68=>{const _0x39e980=_0x5d96f1,_0x2e0b23=new Set();_0x3cef68[_0x39e980(0x1f8)](_0x20cf2e=>{const _0x253361=_0x39e980;switch(_0x20cf2e['type']){case _0x253361(0x215):{const _0x5c43f4=_0x20cf2e['payload'][_0x253361(0x1d8)];_0x2e0b23[_0x253361(0x215)](_0x5c43f4);break;}}}),B(this['_injector'],_0x2e0b23);}));}[_0x30354b(0x1fb)](){const _0x223fc0=_0x30354b;this[_0x223fc0(0x21f)](this[_0x223fc0(0x1f1)][_0x223fc0(0x1c1)][_0x223fc0(0x225)](async _0x306253=>{const _0x189772=_0x223fc0;var _0xb394a0,_0x2503e5,_0x5a8b8e,_0xa435aa;const _0x2b3317=(_0xb394a0=this['_threadCommentModel']['getUnit'](_0x306253['unitId'])[_0x189772(0x219)](_0x5c3c51=>_0x5c3c51[_0x189772(0x1f7)]===_0x306253[_0x189772(0x1f7)]))==null?void 0x0:_0xb394a0[_0x189772(0x1df)];if(!_0x2b3317)return;const {unitId:_0x4f9c5f,subUnitId:_0x5e762c}=_0x2b3317;switch(_0x306253['user']&&this[_0x189772(0x21a)]['addUser'](_0x306253[_0x189772(0x1ca)]),_0x306253[_0x189772(0x223)]){case v[_0x189772(0x1eb)]:break;case v[_0x189772(0x206)]:{this['_threadCommentModel'][_0x189772(0x1e4)](_0x4f9c5f,_0x5e762c,{'unitId':_0x4f9c5f,'subUnitId':_0x5e762c,'ref':'','id':_0x306253[_0x189772(0x1d9)],'dT':y(+_0x306253['createTimestamp']),'threadId':_0x306253['threadId'],'personId':(_0x5a8b8e=(_0x2503e5=_0x306253[_0x189772(0x1ca)])==null?void 0x0:_0x2503e5['userID'])!=null?_0x5a8b8e:_0x306253[_0x189772(0x1c3)],'text':JSON[_0x189772(0x1c7)](_0x306253[_0x189772(0x221)]),'parentId':_0x2b3317['id']});break;}case v[_0x189772(0x21c)]:{const _0x54e3ac=this['_threadCommentModel'][_0x189772(0x1e2)](_0x4f9c5f,_0x5e762c,_0x306253[_0x189772(0x1d9)]);_0x54e3ac&&_0x54e3ac[_0x189772(0x20a)]&&this[_0x189772(0x207)][_0x189772(0x210)](_0x4f9c5f,_0x5e762c,_0x306253[_0x189772(0x1d9)]);break;}case v[_0x189772(0x1e6)]:{this[_0x189772(0x207)][_0x189772(0x1c2)](_0x4f9c5f,_0x5e762c,{'commentId':_0x306253[_0x189772(0x1d9)],'text':JSON[_0x189772(0x1c7)](_0x306253[_0x189772(0x221)])});break;}case v[_0x189772(0x1f9)]:{const _0x1dfc6d=(_0xa435aa=this['_threadCommentModel'][_0x189772(0x1e9)](_0x306253[_0x189772(0x209)])[_0x189772(0x219)](_0xc6f364=>_0xc6f364[_0x189772(0x1f7)]===_0x306253[_0x189772(0x1f7)]))==null?void 0x0:_0xa435aa[_0x189772(0x1df)];_0x1dfc6d&&this[_0x189772(0x207)][_0x189772(0x226)](_0x4f9c5f,_0x5e762c,_0x1dfc6d['id'],_0x306253[_0x189772(0x1e5)]===I[_0x189772(0x1c9)]);break;}}}));}};_=V([p(0x0,_0x5d6dec(_0x3237e5)),p(0x1,_0x5d6dec(_0x59f117)),p(0x2,_0x5d6dec(_0x3579fd)),p(0x3,_0x5d6dec(_0x5eef6b))],_);const z=_0x30354b(0x21d),O={};var k=Object[_0x30354b(0x1cf)],Q=(_0x19cddd,_0x41e075,_0x110441,_0x40c97a)=>{for(var _0x5f18a9=_0x40c97a>0x1?void 0x0:_0x40c97a?k(_0x41e075,_0x110441):_0x41e075,_0xb79e8d=_0x19cddd['length']-0x1,_0x339154;_0xb79e8d>=0x0;_0xb79e8d--)(_0x339154=_0x19cddd[_0xb79e8d])&&(_0x5f18a9=_0x339154(_0x5f18a9)||_0x5f18a9);return _0x5f18a9;},b=(_0x5a3fb1,_0xa9a51c)=>(_0x4b0db5,_0xefe791)=>_0xa9a51c(_0x4b0db5,_0xefe791,_0x5a3fb1);function X(_0x36f817,_0x281e45){const _0x55f41a=_0x30354b,_0x1c0013=_0x36f817[_0x55f41a(0x1d5)][0x0];return{..._0x281e45,'id':_0x1c0013[_0x55f41a(0x1d9)],'resolved':_0x36f817[_0x55f41a(0x1e5)]===0x1,'dT':y(_0x1c0013[_0x55f41a(0x204)]),'personId':_0x1c0013[_0x55f41a(0x1c3)],'threadId':_0x1c0013[_0x55f41a(0x1f7)]};}function ee(_0x3eaaa7,_0x343457,_0x2dea6a){const _0x1e3ae5=_0x30354b;var _0x32a9d1,_0x13361f;if(((_0x13361f=(_0x32a9d1=_0x3eaaa7==null?void 0x0:_0x3eaaa7[_0x1e3ae5(0x1d5)])==null?void 0x0:_0x32a9d1[_0x1e3ae5(0x218)])!=null?_0x13361f:0x0)>0x0){const _0x55c69a=(_0x12250c,_0x17f27b)=>({'id':_0x12250c['replyId'],'threadId':_0x12250c[_0x1e3ae5(0x1f7)],'dT':y(_0x12250c['createTimestamp']),'personId':_0x12250c[_0x1e3ae5(0x1c3)],'resolved':_0x3eaaa7[_0x1e3ae5(0x1e5)]===I[_0x1e3ae5(0x1c9)],'unitId':_0x343457,'subUnitId':_0x2dea6a,'text':JSON[_0x1e3ae5(0x1c7)](_0x12250c[_0x1e3ae5(0x221)]),'parentId':_0x17f27b}),_0x3beb10=_0x55c69a(_0x3eaaa7[_0x1e3ae5(0x1d5)][0x0]);return{..._0x3beb10,'children':_0x3eaaa7[_0x1e3ae5(0x1d5)][_0x1e3ae5(0x1ee)](0x1)[_0x1e3ae5(0x20f)](_0x16f8d6=>_0x55c69a(_0x16f8d6,_0x3beb10['id']))};}return null;}let S=class{constructor(_0x9ec1cb,_0x27ca8d,_0x27c967){const _0x232620=_0x30354b;this[_0x232620(0x1d1)]=_0x9ec1cb,this[_0x232620(0x21a)]=_0x27ca8d,this[_0x232620(0x1f6)]=_0x27c967;}async['addComment'](_0x4b86a9){const _0x4ef882=_0x30354b;var _0x1a9947,_0x4e5133;const {parentId:_0x9ad8ae,unitId:_0x3c85c6,text:_0x10e433,threadId:_0xf825cc}=_0x4b86a9,_0x10154d=(_0x4e5133=(_0x1a9947=_0x10e433['customRanges'])==null?void 0x0:_0x1a9947[_0x4ef882(0x1fc)](_0x527b20=>_0x527b20[_0x4ef882(0x1bf)]===_0x300af4[_0x4ef882(0x224)])[_0x4ef882(0x20f)](_0x3f9ab0=>_0x3f9ab0[_0x4ef882(0x1d3)]))!=null?_0x4e5133:[],_0x159a50=JSON[_0x4ef882(0x1e0)](_0x10e433),_0x350a15=(await this[_0x4ef882(0x1f6)]['requireSession'](_0x3c85c6))[_0x4ef882(0x1ce)]();if(_0x9ad8ae){const _0xba2370={'memberId':_0x350a15,'unitId':_0x3c85c6,'content':_0x159a50,'mention':_0x10154d,'threadId':_0xf825cc},_0x558d6a=(await this[_0x4ef882(0x1d1)]['post'](_0x4ef882(0x1d2)+_0x3c85c6+_0x4ef882(0x1c6),{'body':_0xba2370}))[_0x4ef882(0x1fe)]['reply'];return{..._0x4b86a9,'id':_0x558d6a['replyId'],'dT':_0x4a080f(+_0x558d6a['createTimestamp'])[_0x4ef882(0x1dc)](_0x4ef882(0x1ea)),'personId':_0x558d6a[_0x4ef882(0x1c3)]};}else{const _0xa33ed1={'memberId':_0x350a15,'unitId':_0x3c85c6,'content':_0x159a50,'mention':_0x10154d},_0xab587f=await this[_0x4ef882(0x1d1)]['post']('/universer-api/comment/unit/'+_0x3c85c6+'/add',{'body':_0xa33ed1});return X(_0xab587f['body'][_0x4ef882(0x1ef)],_0x4b86a9);}}async[_0x30354b(0x1c2)](_0x570878){const _0x49df70=_0x30354b;var _0x22914d,_0x1f5466;const {text:_0x22ac6f,unitId:_0x2adb4a}=_0x570878,_0x10cf20=(_0x1f5466=(_0x22914d=_0x22ac6f[_0x49df70(0x220)])==null?void 0x0:_0x22914d[_0x49df70(0x1fc)](_0x5b765f=>_0x5b765f[_0x49df70(0x1bf)]===_0x300af4['COMMENT'])['map'](_0xd3e42c=>_0xd3e42c[_0x49df70(0x1d3)]))!=null?_0x1f5466:[],_0x432927=JSON['stringify'](_0x22ac6f),_0x483e67=_0x570878[_0x49df70(0x1f7)],_0x6e2278=_0x570878['id'],_0x1ff66b={'memberId':(await this[_0x49df70(0x1f6)][_0x49df70(0x217)](_0x2adb4a))[_0x49df70(0x1ce)](),'unitId':_0x2adb4a,'threadId':_0x483e67,'mention':_0x10cf20,'content':_0x432927,'replyId':_0x6e2278},_0x381ad0=await this[_0x49df70(0x1d1)][_0x49df70(0x20b)](_0x49df70(0x1d2)+_0x2adb4a+_0x49df70(0x211),{'body':_0x1ff66b});return!_0x381ad0[_0x49df70(0x1fe)]['error']||_0x381ad0[_0x49df70(0x1fe)]['error']['code']===0x1;}async[_0x30354b(0x226)](_0x176f6d){const _0x505721=_0x30354b,{unitId:_0x31bafc}=_0x176f6d,_0x2b72da=_0x176f6d[_0x505721(0x1f7)],_0xbe1d01={'memberId':this['_userService']['getCurrentUser']()[_0x505721(0x229)],'unitId':_0x31bafc,'threadId':_0x2b72da,'solved':_0x176f6d[_0x505721(0x1e3)]?I[_0x505721(0x1c9)]:I['OpenOrReOpen']},_0x201375=await this[_0x505721(0x1d1)][_0x505721(0x20b)](_0x505721(0x1d2)+_0x31bafc+'/solved',{'body':_0xbe1d01});return!_0x201375[_0x505721(0x1fe)][_0x505721(0x1d4)]||_0x201375[_0x505721(0x1fe)][_0x505721(0x1d4)]['code']===0x1;}async[_0x30354b(0x210)](_0x219348,_0x1d741d,_0x11aeff,_0x1a4e81){const _0x2e3dc2=_0x30354b,_0x972fec={'memberId':(await this[_0x2e3dc2(0x1f6)][_0x2e3dc2(0x217)](_0x219348))[_0x2e3dc2(0x1ce)](),'threadId':_0x11aeff,'replyId':_0x1a4e81,'unitId':_0x219348},_0x1ec068=await this[_0x2e3dc2(0x1d1)][_0x2e3dc2(0x20b)]('/universer-api/comment/unit/'+_0x219348+'/delete',{'body':_0x972fec});return!_0x1ec068[_0x2e3dc2(0x1fe)]['error']||_0x1ec068[_0x2e3dc2(0x1fe)][_0x2e3dc2(0x1d4)][_0x2e3dc2(0x216)]===0x1;}async[_0x30354b(0x214)](_0x3f44f7,_0x5dbb05,_0x103c7f){const _0x10726b=_0x30354b,_0x59a161={'unitId':_0x3f44f7,'threadId':_0x103c7f},_0x4fb4b0=await this[_0x10726b(0x1d1)][_0x10726b(0x20b)]('/universer-api/comment/unit/'+_0x3f44f7+_0x10726b(0x201),{'body':_0x59a161}),_0x18b87d=_0x103c7f[_0x10726b(0x20f)](_0x2805f5=>ee(_0x4fb4b0['body'][_0x10726b(0x1fd)][_0x2805f5],_0x3f44f7,_0x5dbb05))[_0x10726b(0x1fc)](Boolean);return Object[_0x10726b(0x1fa)](_0x4fb4b0[_0x10726b(0x1fe)][_0x10726b(0x1c0)])[_0x10726b(0x1f8)](_0x185d84=>{const _0x2dd430=_0x10726b;this['_userService'][_0x2dd430(0x1f0)](_0x185d84);}),_0x18b87d;}[_0x30354b(0x212)](_0x1321ad){const _0x524d75=_0x30354b;return{'id':_0x1321ad['id'],'threadId':_0x1321ad['threadId'],'ref':_0x1321ad[_0x524d75(0x1e8)]};}};S=Q([b(0x0,_0x5d6dec(_0x365edd)),b(0x1,_0x5d6dec(_0x3579fd)),b(0x2,_0x5d6dec(_0x4c60bb))],S);var re=Object[_0x30354b(0x1cf)],te=(_0x598a40,_0x24d176,_0x30431d,_0x536549)=>{const _0x4d4601=_0x30354b;for(var _0x186ba7=_0x536549>0x1?void 0x0:_0x536549?re(_0x24d176,_0x30431d):_0x24d176,_0x39725a=_0x598a40[_0x4d4601(0x218)]-0x1,_0x502def;_0x39725a>=0x0;_0x39725a--)(_0x502def=_0x598a40[_0x39725a])&&(_0x186ba7=_0x502def(_0x186ba7)||_0x186ba7);return _0x186ba7;},M=(_0x5405cc,_0x46c260)=>(_0x570dc2,_0x2de495)=>_0x46c260(_0x570dc2,_0x2de495,_0x5405cc);let f=class extends _0x5da71c{constructor(_0xf831b5,_0x275fe9){const _0xe016af=_0x30354b;super(),this['_threadCommentDataSourceService']=_0xf831b5,this[_0xe016af(0x1e7)]=_0x275fe9,this['_initDataSource']();}['_initDataSource'](){const _0x57b166=_0x30354b;this[_0x57b166(0x1de)][_0x57b166(0x1d0)]=this[_0x57b166(0x1e7)],this[_0x57b166(0x1de)][_0x57b166(0x1cc)]=!0x1;}};f=te([M(0x0,_0x5a2639),M(0x1,_0x5d6dec(S))],f);var se=Object[_0x30354b(0x1ec)],oe=Object[_0x30354b(0x1cf)],ne=(_0x31307d,_0x3a4205,_0x29fd13)=>_0x3a4205 in _0x31307d?se(_0x31307d,_0x3a4205,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29fd13}):_0x31307d[_0x3a4205]=_0x29fd13,ie=(_0x3daa40,_0x3a5048,_0xc3a9e1,_0x321717)=>{const _0x2932ce=_0x30354b;for(var _0x1d8deb=_0x321717>0x1?void 0x0:_0x321717?oe(_0x3a5048,_0xc3a9e1):_0x3a5048,_0x631672=_0x3daa40[_0x2932ce(0x218)]-0x1,_0x3ed4cb;_0x631672>=0x0;_0x631672--)(_0x3ed4cb=_0x3daa40[_0x631672])&&(_0x1d8deb=_0x3ed4cb(_0x1d8deb)||_0x1d8deb);return _0x1d8deb;},N=(_0x1b11cc,_0x397cea)=>(_0x325806,_0xdd6ee)=>_0x397cea(_0x325806,_0xdd6ee,_0x1b11cc),$=(_0x2078fb,_0x4ab36d,_0x41b772)=>ne(_0x2078fb,typeof _0x4ab36d!=_0x30354b(0x1cb)?_0x4ab36d+'':_0x4ab36d,_0x41b772);let g=class extends _0x3bc542{constructor(_0x28d035=O,_0x2c859d,_0x303f96){const _0x555333=_0x30354b;super(),this['_config']=_0x28d035,this[_0x555333(0x21b)]=_0x2c859d,this[_0x555333(0x1ff)]=_0x303f96;const {..._0x46bfd8}=_0x3f3339({},O,this[_0x555333(0x1d7)]);this[_0x555333(0x1ff)][_0x555333(0x1c8)](z,_0x46bfd8);}[_0x30354b(0x203)](){const _0x33a6c4=_0x30354b;[[S],[f],[_]][_0x33a6c4(0x1f8)](_0x44dd8f=>{const _0x31a5bf=_0x33a6c4;this['_injector'][_0x31a5bf(0x215)](_0x44dd8f);});}[_0x30354b(0x202)](){const _0xfc040=_0x30354b;this[_0xfc040(0x21b)][_0xfc040(0x1f2)](f),this[_0xfc040(0x21b)][_0xfc040(0x1f2)](_);}};$(g,_0x30354b(0x1c4),W),$(g,'type',_0x3bb98c[_0x30354b(0x1c5)]),g=ie([_0x413398(_0x32a910,_0x516653,_0x2125bb),N(0x1,_0x5d6dec(_0x5eef6b)),N(0x2,_0x195d4b)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x450650=_0x1924;(function(_0x38d6eb,_0x19fe4c){const _0x5de90c=_0x1924,_0x5b6db2=_0x38d6eb();while(!![]){try{const _0x328a8b=-parseInt(_0x5de90c(0x140))/0x1+parseInt(_0x5de90c(0x13d))/0x2+parseInt(_0x5de90c(0x115))/0x3+-parseInt(_0x5de90c(0x109))/0x4+-parseInt(_0x5de90c(0x108))/0x5*(parseInt(_0x5de90c(0x10f))/0x6)+parseInt(_0x5de90c(0x13e))/0x7+parseInt(_0x5de90c(0x12a))/0x8*(parseInt(_0x5de90c(0xff))/0x9);if(_0x328a8b===_0x19fe4c)break;else _0x5b6db2['push'](_0x5b6db2['shift']());}catch(_0x504658){_0x5b6db2['push'](_0x5b6db2['shift']());}}}(_0x1a8e,0xb5cb2));import{CommentService as _0x4899ac,CollaborationSessionService as _0x4b7890,UniverCollaborationClientPlugin as _0x46de07}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x41bba8}from'@univerjs-pro/license';import{dayjs as _0x37a29a,UserManagerService as _0x50853d,Inject as _0x4de773,Injector as _0x202eaa,Disposable as _0x4222cc,CustomRangeType as _0x569be7,UniverInstanceType as _0xb46a4b,DependentOn as _0x542ceb,IConfigService as _0x5c022a,Plugin as _0x533345,merge as _0x326730}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4e15a3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4cd4a3,IThreadCommentDataSourceService as _0x2c32f7}from'@univerjs/thread-comment';import{bufferTime as _0x11b7ff}from'rxjs';import{HTTPService as _0x328679}from'@univerjs/network';const W=_0x450650(0x156);var I=(_0x44c82c=>(_0x44c82c[_0x44c82c[_0x450650(0x11b)]=0x0]='OpenOrReOpen',_0x44c82c[_0x44c82c['Solved']=0x1]='Solved',_0x44c82c[_0x44c82c[_0x450650(0x14b)]=-0x1]=_0x450650(0x14b),_0x44c82c))(I||{}),v=(_0x590116=>(_0x590116[_0x590116['Unknown']=0x0]=_0x450650(0x152),_0x590116[_0x590116[_0x450650(0x107)]=0x1]=_0x450650(0x107),_0x590116[_0x590116[_0x450650(0x138)]=0x2]='Reply',_0x590116[_0x590116[_0x450650(0x126)]=0x3]='Edit',_0x590116[_0x590116[_0x450650(0x12c)]=0x4]=_0x450650(0x12c),_0x590116[_0x590116[_0x450650(0x134)]=0x5]=_0x450650(0x134),_0x590116[_0x590116[_0x450650(0x14b)]=-0x1]='UNRECOGNIZED',_0x590116))(v||{});const y=_0x37f553=>_0x37a29a(new Date(+_0x37f553))[_0x450650(0x154)](_0x450650(0x12d)),B=async(_0x2b0a42,_0x105b1c)=>{const _0x343fb0=_0x450650,_0x3f89cf=_0x2b0a42[_0x343fb0(0x15d)](_0x50853d),_0x56af5f=_0x2b0a42['get'](_0x328679);_0x105b1c[_0x343fb0(0x10d)](_0x5e2cff=>{const _0x1af291=_0x343fb0;_0x3f89cf[_0x1af291(0x10b)](_0x5e2cff)&&_0x105b1c['delete'](_0x5e2cff);}),_0x105b1c[_0x343fb0(0x11d)]&&(await _0x56af5f['get'](_0x343fb0(0x147),{'params':{'userIDs':[..._0x105b1c]}}))['body'][_0x343fb0(0x159)][_0x343fb0(0x10d)](_0x2c2f86=>{const _0x412c84=_0x343fb0;_0x2c2f86&&_0x3f89cf[_0x412c84(0x114)](_0x2c2f86);});};var K=Object[_0x450650(0x12f)],V=(_0x33efb4,_0x2cf513,_0x332bf3,_0x3eef2a)=>{const _0x18a9b4=_0x450650;for(var _0x29a0fa=_0x3eef2a>0x1?void 0x0:_0x3eef2a?K(_0x2cf513,_0x332bf3):_0x2cf513,_0x3a6492=_0x33efb4[_0x18a9b4(0x130)]-0x1,_0xf52b28;_0x3a6492>=0x0;_0x3a6492--)(_0xf52b28=_0x33efb4[_0x3a6492])&&(_0x29a0fa=_0xf52b28(_0x29a0fa)||_0x29a0fa);return _0x29a0fa;},p=(_0x521a2c,_0x36d664)=>(_0x1a7769,_0x2f2d6f)=>_0x36d664(_0x1a7769,_0x2f2d6f,_0x521a2c);let _=class extends _0x4222cc{constructor(_0x324abf,_0x401363,_0x1cdd56,_0x1bf407){const _0x232274=_0x450650;super(),this[_0x232274(0x129)]=_0x324abf,this[_0x232274(0x112)]=_0x401363,this['_userService']=_0x1cdd56,this[_0x232274(0x145)]=_0x1bf407,this[_0x232274(0x10e)](),this[_0x232274(0x13c)]();}[_0x450650(0x13c)](){const _0x117061=_0x450650;this[_0x117061(0x15b)](this[_0x117061(0x112)]['commentUpdate$'][_0x117061(0x142)](_0x11b7ff(0x10))[_0x117061(0x150)](_0x52703e=>{const _0xd28a4f=_0x117061,_0x3e0999=new Set();_0x52703e[_0xd28a4f(0x10d)](_0x384e79=>{const _0x473079=_0xd28a4f;switch(_0x384e79[_0x473079(0x12b)]){case _0x473079(0x13b):{const _0x45583c=_0x384e79['payload']['personId'];_0x3e0999['add'](_0x45583c);break;}}}),B(this['_injector'],_0x3e0999);}));}[_0x450650(0x10e)](){const _0x2c900d=_0x450650;this[_0x2c900d(0x15b)](this[_0x2c900d(0x129)][_0x2c900d(0x118)][_0x2c900d(0x150)](async _0x2d4ab2=>{const _0x3f6f2a=_0x2c900d;var _0x5433ce,_0x39f5d9,_0x34d0e3,_0xa26bd8;const _0x237772=(_0x5433ce=this[_0x3f6f2a(0x112)][_0x3f6f2a(0x11e)](_0x2d4ab2[_0x3f6f2a(0x146)])[_0x3f6f2a(0x111)](_0x2cf1ad=>_0x2cf1ad[_0x3f6f2a(0x102)]===_0x2d4ab2[_0x3f6f2a(0x102)]))==null?void 0x0:_0x5433ce[_0x3f6f2a(0x132)];if(!_0x237772)return;const {unitId:_0x2b0aa3,subUnitId:_0x1e8ca8}=_0x237772;switch(_0x2d4ab2[_0x3f6f2a(0x14e)]&&this['_userService'][_0x3f6f2a(0x114)](_0x2d4ab2[_0x3f6f2a(0x14e)]),_0x2d4ab2[_0x3f6f2a(0x12b)]){case v[_0x3f6f2a(0x107)]:break;case v['Reply']:{this['_threadCommentModel'][_0x3f6f2a(0x131)](_0x2b0aa3,_0x1e8ca8,{'unitId':_0x2b0aa3,'subUnitId':_0x1e8ca8,'ref':'','id':_0x2d4ab2[_0x3f6f2a(0x121)],'dT':y(+_0x2d4ab2['createTimestamp']),'threadId':_0x2d4ab2[_0x3f6f2a(0x102)],'personId':(_0x34d0e3=(_0x39f5d9=_0x2d4ab2[_0x3f6f2a(0x14e)])==null?void 0x0:_0x39f5d9[_0x3f6f2a(0x15e)])!=null?_0x34d0e3:_0x2d4ab2[_0x3f6f2a(0x155)],'text':JSON[_0x3f6f2a(0x162)](_0x2d4ab2['content']),'parentId':_0x237772['id']});break;}case v['Delete']:{const _0x38ab8a=this[_0x3f6f2a(0x112)][_0x3f6f2a(0x135)](_0x2b0aa3,_0x1e8ca8,_0x2d4ab2[_0x3f6f2a(0x121)]);_0x38ab8a&&_0x38ab8a['parentId']&&this[_0x3f6f2a(0x112)][_0x3f6f2a(0x128)](_0x2b0aa3,_0x1e8ca8,_0x2d4ab2[_0x3f6f2a(0x121)]);break;}case v[_0x3f6f2a(0x126)]:{this['_threadCommentModel']['updateComment'](_0x2b0aa3,_0x1e8ca8,{'commentId':_0x2d4ab2[_0x3f6f2a(0x121)],'text':JSON[_0x3f6f2a(0x162)](_0x2d4ab2[_0x3f6f2a(0x10c)])});break;}case v[_0x3f6f2a(0x134)]:{const _0x3c4d5b=(_0xa26bd8=this[_0x3f6f2a(0x112)]['getUnit'](_0x2d4ab2[_0x3f6f2a(0x146)])[_0x3f6f2a(0x111)](_0x3d6d1c=>_0x3d6d1c[_0x3f6f2a(0x102)]===_0x2d4ab2[_0x3f6f2a(0x102)]))==null?void 0x0:_0xa26bd8['root'];_0x3c4d5b&&this[_0x3f6f2a(0x112)]['resolveComment'](_0x2b0aa3,_0x1e8ca8,_0x3c4d5b['id'],_0x2d4ab2[_0x3f6f2a(0x157)]===I[_0x3f6f2a(0x110)]);break;}}}));}};_=V([p(0x0,_0x4de773(_0x4899ac)),p(0x1,_0x4de773(_0x4cd4a3)),p(0x2,_0x4de773(_0x50853d)),p(0x3,_0x4de773(_0x202eaa))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x450650(0x12f)],Q=(_0x4ddc77,_0x6098fb,_0x108dc2,_0x172c81)=>{const _0x133127=_0x450650;for(var _0x28a051=_0x172c81>0x1?void 0x0:_0x172c81?k(_0x6098fb,_0x108dc2):_0x6098fb,_0x1a2f8c=_0x4ddc77[_0x133127(0x130)]-0x1,_0x1b7ed2;_0x1a2f8c>=0x0;_0x1a2f8c--)(_0x1b7ed2=_0x4ddc77[_0x1a2f8c])&&(_0x28a051=_0x1b7ed2(_0x28a051)||_0x28a051);return _0x28a051;},b=(_0x2ee30c,_0x5c5d1c)=>(_0x3ad1d1,_0x1e6fc5)=>_0x5c5d1c(_0x3ad1d1,_0x1e6fc5,_0x2ee30c);function X(_0x4bf659,_0x311a27){const _0xc0a75b=_0x450650,_0x269da6=_0x4bf659['replies'][0x0];return{..._0x311a27,'id':_0x269da6[_0xc0a75b(0x121)],'resolved':_0x4bf659[_0xc0a75b(0x157)]===0x1,'dT':y(_0x269da6[_0xc0a75b(0x14d)]),'personId':_0x269da6[_0xc0a75b(0x155)],'threadId':_0x269da6[_0xc0a75b(0x102)]};}function ee(_0x2cba06,_0x5bc8bb,_0x2e0927){const _0x2a95ef=_0x450650;var _0x59c3fd,_0x3899ae;if(((_0x3899ae=(_0x59c3fd=_0x2cba06==null?void 0x0:_0x2cba06[_0x2a95ef(0x14c)])==null?void 0x0:_0x59c3fd['length'])!=null?_0x3899ae:0x0)>0x0){const _0x27e5d6=(_0x5a56c1,_0x51317f)=>({'id':_0x5a56c1[_0x2a95ef(0x121)],'threadId':_0x5a56c1[_0x2a95ef(0x102)],'dT':y(_0x5a56c1[_0x2a95ef(0x14d)]),'personId':_0x5a56c1[_0x2a95ef(0x155)],'resolved':_0x2cba06[_0x2a95ef(0x157)]===I['Solved'],'unitId':_0x5bc8bb,'subUnitId':_0x2e0927,'text':JSON[_0x2a95ef(0x162)](_0x5a56c1[_0x2a95ef(0x10c)]),'parentId':_0x51317f}),_0x5377a8=_0x27e5d6(_0x2cba06[_0x2a95ef(0x14c)][0x0]);return{..._0x5377a8,'children':_0x2cba06[_0x2a95ef(0x14c)][_0x2a95ef(0x143)](0x1)['map'](_0x5c3cd6=>_0x27e5d6(_0x5c3cd6,_0x5377a8['id']))};}return null;}function _0x1a8e(){const _0x3fd8dc=['code','Reply','comments','getMemberID','add','_initUserSync','1747996QwjSau','3650745YxwvFK','_userService','858119KAoNwk','dataSource','pipe','slice','filter','_injector','unitId','/universer-api/user/list','body','_threadCommentDataSourceService','_config','UNRECOGNIZED','replies','createTimestamp','user','_threadCommentDataSource','subscribe','setConfig','Unknown','error','format','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','COMMENT','users','syncUpdateMutationToColla','disposeWithMe','saveCommentToSnapshot','get','userID','_httpService','defineProperty','/reply','parse','5422104fqQprz','post','stringify','threadId','_sessionService','listComments','comment','/delete','Add','85epRCQh','2813356FJhUba','onReady','getUser','content','forEach','_init','295494AmpJjn','Solved','find','_threadCommentModel','/universer-api/comment/unit/','addUser','1628616yHAmUA','_configService','symbol','commentUpdate$','/list','values','OpenOrReOpen','/solved','size','getUnit','rangeId','ref','replyId','_initDataSource','customRanges','rangeType','resolveComment','Edit','requireSession','deleteComment','_commentService','16wXlDWw','type','Delete','YYYY/MM/DD\x20HH:mm','resolved','getOwnPropertyDescriptor','length','addComment','root','map','Solve','getComment','onStarting'];_0x1a8e=function(){return _0x3fd8dc;};return _0x1a8e();}let S=class{constructor(_0x238068,_0x177cfc,_0x148a5e){const _0x47d2bc=_0x450650;this['_httpService']=_0x238068,this['_userService']=_0x177cfc,this[_0x47d2bc(0x103)]=_0x148a5e;}async[_0x450650(0x131)](_0x3ba58f){const _0x574128=_0x450650;var _0x5aca7f,_0x7f726e;const {parentId:_0x4b6b8f,unitId:_0x4283ce,text:_0x48d656,threadId:_0x40c46c}=_0x3ba58f,_0x4cd983=(_0x7f726e=(_0x5aca7f=_0x48d656[_0x574128(0x123)])==null?void 0x0:_0x5aca7f[_0x574128(0x144)](_0x43d1b2=>_0x43d1b2[_0x574128(0x124)]===_0x569be7[_0x574128(0x158)])[_0x574128(0x133)](_0x20c471=>_0x20c471[_0x574128(0x11f)]))!=null?_0x7f726e:[],_0x51d695=JSON[_0x574128(0x101)](_0x48d656),_0x396279=(await this[_0x574128(0x103)][_0x574128(0x127)](_0x4283ce))['getMemberID']();if(_0x4b6b8f){const _0x5e4e5d={'memberId':_0x396279,'unitId':_0x4283ce,'content':_0x51d695,'mention':_0x4cd983,'threadId':_0x40c46c},_0x2d4faf=(await this['_httpService'][_0x574128(0x100)]('/universer-api/comment/unit/'+_0x4283ce+_0x574128(0x161),{'body':_0x5e4e5d}))[_0x574128(0x148)]['reply'];return{..._0x3ba58f,'id':_0x2d4faf['replyId'],'dT':_0x37a29a(+_0x2d4faf[_0x574128(0x14d)])['format'](_0x574128(0x12d)),'personId':_0x2d4faf['userId']};}else{const _0x581101={'memberId':_0x396279,'unitId':_0x4283ce,'content':_0x51d695,'mention':_0x4cd983},_0x184f58=await this[_0x574128(0x15f)][_0x574128(0x100)](_0x574128(0x113)+_0x4283ce+'/add',{'body':_0x581101});return X(_0x184f58['body'][_0x574128(0x105)],_0x3ba58f);}}async['updateComment'](_0x459dbb){const _0x276da0=_0x450650;var _0x573eac,_0x3193d7;const {text:_0x116c6c,unitId:_0x1e4eeb}=_0x459dbb,_0x3d4331=(_0x3193d7=(_0x573eac=_0x116c6c[_0x276da0(0x123)])==null?void 0x0:_0x573eac[_0x276da0(0x144)](_0x13cea7=>_0x13cea7['rangeType']===_0x569be7['COMMENT'])[_0x276da0(0x133)](_0x46874e=>_0x46874e[_0x276da0(0x11f)]))!=null?_0x3193d7:[],_0x4ee99e=JSON[_0x276da0(0x101)](_0x116c6c),_0x3b0949=_0x459dbb[_0x276da0(0x102)],_0x276211=_0x459dbb['id'],_0x28cd66={'memberId':(await this[_0x276da0(0x103)][_0x276da0(0x127)](_0x1e4eeb))[_0x276da0(0x13a)](),'unitId':_0x1e4eeb,'threadId':_0x3b0949,'mention':_0x3d4331,'content':_0x4ee99e,'replyId':_0x276211},_0x307bb4=await this[_0x276da0(0x15f)][_0x276da0(0x100)](_0x276da0(0x113)+_0x1e4eeb+'/edit',{'body':_0x28cd66});return!_0x307bb4[_0x276da0(0x148)][_0x276da0(0x153)]||_0x307bb4[_0x276da0(0x148)][_0x276da0(0x153)][_0x276da0(0x137)]===0x1;}async[_0x450650(0x125)](_0x5dc3ce){const _0xea7d8=_0x450650,{unitId:_0x27781b}=_0x5dc3ce,_0x57664f=_0x5dc3ce[_0xea7d8(0x102)],_0x419d92={'memberId':this[_0xea7d8(0x13f)]['getCurrentUser']()[_0xea7d8(0x15e)],'unitId':_0x27781b,'threadId':_0x57664f,'solved':_0x5dc3ce[_0xea7d8(0x12e)]?I[_0xea7d8(0x110)]:I[_0xea7d8(0x11b)]},_0x2798d7=await this[_0xea7d8(0x15f)]['post']('/universer-api/comment/unit/'+_0x27781b+_0xea7d8(0x11c),{'body':_0x419d92});return!_0x2798d7[_0xea7d8(0x148)][_0xea7d8(0x153)]||_0x2798d7['body']['error'][_0xea7d8(0x137)]===0x1;}async['deleteComment'](_0x2597bf,_0x25a58f,_0x5db11d,_0x258215){const _0x347b35=_0x450650,_0x4b0ca0={'memberId':(await this[_0x347b35(0x103)]['requireSession'](_0x2597bf))[_0x347b35(0x13a)](),'threadId':_0x5db11d,'replyId':_0x258215,'unitId':_0x2597bf},_0x4e0269=await this[_0x347b35(0x15f)]['post'](_0x347b35(0x113)+_0x2597bf+_0x347b35(0x106),{'body':_0x4b0ca0});return!_0x4e0269[_0x347b35(0x148)][_0x347b35(0x153)]||_0x4e0269['body'][_0x347b35(0x153)][_0x347b35(0x137)]===0x1;}async[_0x450650(0x104)](_0x2f338d,_0x352087,_0x44fe4a){const _0x2c3b8b=_0x450650,_0x500f19={'unitId':_0x2f338d,'threadId':_0x44fe4a},_0xdf1f69=await this['_httpService'][_0x2c3b8b(0x100)](_0x2c3b8b(0x113)+_0x2f338d+_0x2c3b8b(0x119),{'body':_0x500f19}),_0x5eaadf=_0x44fe4a[_0x2c3b8b(0x133)](_0x20845b=>ee(_0xdf1f69[_0x2c3b8b(0x148)][_0x2c3b8b(0x139)][_0x20845b],_0x2f338d,_0x352087))[_0x2c3b8b(0x144)](Boolean);return Object[_0x2c3b8b(0x11a)](_0xdf1f69[_0x2c3b8b(0x148)][_0x2c3b8b(0x159)])[_0x2c3b8b(0x10d)](_0x15c1ef=>{const _0x54250a=_0x2c3b8b;this[_0x54250a(0x13f)][_0x54250a(0x114)](_0x15c1ef);}),_0x5eaadf;}[_0x450650(0x15c)](_0x24330d){const _0x2d459d=_0x450650;return{'id':_0x24330d['id'],'threadId':_0x24330d[_0x2d459d(0x102)],'ref':_0x24330d[_0x2d459d(0x120)]};}};S=Q([b(0x0,_0x4de773(_0x328679)),b(0x1,_0x4de773(_0x50853d)),b(0x2,_0x4de773(_0x4b7890))],S);var re=Object[_0x450650(0x12f)],te=(_0x57c3ab,_0x5f06a2,_0x524422,_0x10cf71)=>{const _0x13a432=_0x450650;for(var _0xb5c623=_0x10cf71>0x1?void 0x0:_0x10cf71?re(_0x5f06a2,_0x524422):_0x5f06a2,_0x2af6fe=_0x57c3ab[_0x13a432(0x130)]-0x1,_0x7dee2e;_0x2af6fe>=0x0;_0x2af6fe--)(_0x7dee2e=_0x57c3ab[_0x2af6fe])&&(_0xb5c623=_0x7dee2e(_0xb5c623)||_0xb5c623);return _0xb5c623;},M=(_0x3d7186,_0x2a9bc4)=>(_0x3f3dbb,_0x4ea6fc)=>_0x2a9bc4(_0x3f3dbb,_0x4ea6fc,_0x3d7186);let f=class extends _0x4222cc{constructor(_0x6b2eb6,_0x580aae){const _0x2fb173=_0x450650;super(),this['_threadCommentDataSourceService']=_0x6b2eb6,this[_0x2fb173(0x14f)]=_0x580aae,this[_0x2fb173(0x122)]();}[_0x450650(0x122)](){const _0x2c6eeb=_0x450650;this[_0x2c6eeb(0x149)][_0x2c6eeb(0x141)]=this[_0x2c6eeb(0x14f)],this['_threadCommentDataSourceService'][_0x2c6eeb(0x15a)]=!0x1;}};f=te([M(0x0,_0x2c32f7),M(0x1,_0x4de773(S))],f);function _0x1924(_0xc3c12b,_0x218da0){const _0x1a8ed4=_0x1a8e();return _0x1924=function(_0x1924ea,_0x1a3cec){_0x1924ea=_0x1924ea-0xff;let _0x238a45=_0x1a8ed4[_0x1924ea];return _0x238a45;},_0x1924(_0xc3c12b,_0x218da0);}var se=Object[_0x450650(0x160)],oe=Object[_0x450650(0x12f)],ne=(_0x1be323,_0xd3ead9,_0x194ad1)=>_0xd3ead9 in _0x1be323?se(_0x1be323,_0xd3ead9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x194ad1}):_0x1be323[_0xd3ead9]=_0x194ad1,ie=(_0x1e250a,_0x16ac86,_0x2006c7,_0x4e1784)=>{const _0x219979=_0x450650;for(var _0x3471cb=_0x4e1784>0x1?void 0x0:_0x4e1784?oe(_0x16ac86,_0x2006c7):_0x16ac86,_0x4956a5=_0x1e250a[_0x219979(0x130)]-0x1,_0x38ee77;_0x4956a5>=0x0;_0x4956a5--)(_0x38ee77=_0x1e250a[_0x4956a5])&&(_0x3471cb=_0x38ee77(_0x3471cb)||_0x3471cb);return _0x3471cb;},N=(_0x462216,_0xa44542)=>(_0x1fc42f,_0x2da45a)=>_0xa44542(_0x1fc42f,_0x2da45a,_0x462216),$=(_0x345592,_0x232bcc,_0xfb10dc)=>ne(_0x345592,typeof _0x232bcc!=_0x450650(0x117)?_0x232bcc+'':_0x232bcc,_0xfb10dc);let g=class extends _0x533345{constructor(_0x23c501=O,_0x394f2e,_0x5cff35){const _0x93059f=_0x450650;super(),this[_0x93059f(0x14a)]=_0x23c501,this[_0x93059f(0x145)]=_0x394f2e,this[_0x93059f(0x116)]=_0x5cff35;const {..._0x5aa076}=_0x326730({},O,this['_config']);this[_0x93059f(0x116)][_0x93059f(0x151)](z,_0x5aa076);}[_0x450650(0x136)](){const _0x50800c=_0x450650;[[S],[f],[_]][_0x50800c(0x10d)](_0x3d78b9=>{const _0x3c158c=_0x50800c;this[_0x3c158c(0x145)][_0x3c158c(0x13b)](_0x3d78b9);});}[_0x450650(0x10a)](){const _0x140853=_0x450650;this[_0x140853(0x145)][_0x140853(0x15d)](f),this[_0x140853(0x145)]['get'](_);}};$(g,'pluginName',W),$(g,_0x450650(0x12b),_0xb46a4b['UNIVER_UNKNOWN']),g=ie([_0x542ceb(_0x4e15a3,_0x46de07,_0x41bba8),N(0x1,_0x4de773(_0x202eaa)),N(0x2,_0x5c022a)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x30354b=_0x6b72;(function(_0x19d239,_0x4952ed){const _0x4ca1fb=_0x6b72,_0x19fe23=_0x19d239();while(!![]){try{const _0x3084f5=-parseInt(_0x4ca1fb(0x1f4))/0x1+parseInt(_0x4ca1fb(0x208))/0x2*(parseInt(_0x4ca1fb(0x1da))/0x3)+-parseInt(_0x4ca1fb(0x1db))/0x4*(parseInt(_0x4ca1fb(0x1ed))/0x5)+parseInt(_0x4ca1fb(0x200))/0x6*(parseInt(_0x4ca1fb(0x205))/0x7)+parseInt(_0x4ca1fb(0x1dd))/0x8*(parseInt(_0x4ca1fb(0x222))/0x9)+parseInt(_0x4ca1fb(0x1e1))/0xa*(-parseInt(_0x4ca1fb(0x20d))/0xb)+-parseInt(_0x4ca1fb(0x21e))/0xc*(-parseInt(_0x4ca1fb(0x1d6))/0xd);if(_0x3084f5===_0x4952ed)break;else _0x19fe23['push'](_0x19fe23['shift']());}catch(_0x39d700){_0x19fe23['push'](_0x19fe23['shift']());}}}(_0x403e,0x81e18));import{CommentService as _0x3237e5,CollaborationSessionService as _0x4c60bb,UniverCollaborationClientPlugin as _0x516653}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2125bb}from'@univerjs-pro/license';import{dayjs as _0x4a080f,UserManagerService as _0x3579fd,Inject as _0x5d6dec,Injector as _0x5eef6b,Disposable as _0x5da71c,CustomRangeType as _0x300af4,UniverInstanceType as _0x3bb98c,DependentOn as _0x413398,IConfigService as _0x195d4b,Plugin as _0x3bc542,merge as _0x3f3339}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x32a910}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59f117,IThreadCommentDataSourceService as _0x5a2639}from'@univerjs/thread-comment';import{bufferTime as _0x298b90}from'rxjs';import{HTTPService as _0x365edd}from'@univerjs/network';const W=_0x30354b(0x213);var I=(_0x42d073=>(_0x42d073[_0x42d073['OpenOrReOpen']=0x0]=_0x30354b(0x20c),_0x42d073[_0x42d073[_0x30354b(0x1c9)]=0x1]=_0x30354b(0x1c9),_0x42d073[_0x42d073[_0x30354b(0x228)]=-0x1]=_0x30354b(0x228),_0x42d073))(I||{}),v=(_0xdac16d=>(_0xdac16d[_0xdac16d[_0x30354b(0x227)]=0x0]=_0x30354b(0x227),_0xdac16d[_0xdac16d[_0x30354b(0x1eb)]=0x1]=_0x30354b(0x1eb),_0xdac16d[_0xdac16d['Reply']=0x2]=_0x30354b(0x206),_0xdac16d[_0xdac16d[_0x30354b(0x1e6)]=0x3]=_0x30354b(0x1e6),_0xdac16d[_0xdac16d[_0x30354b(0x21c)]=0x4]=_0x30354b(0x21c),_0xdac16d[_0xdac16d[_0x30354b(0x1f9)]=0x5]=_0x30354b(0x1f9),_0xdac16d[_0xdac16d[_0x30354b(0x228)]=-0x1]='UNRECOGNIZED',_0xdac16d))(v||{});function _0x6b72(_0x14a30b,_0x560ebb){const _0x403ee1=_0x403e();return _0x6b72=function(_0x6b7255,_0x530bbb){_0x6b7255=_0x6b7255-0x1bf;let _0x1ed82a=_0x403ee1[_0x6b7255];return _0x1ed82a;},_0x6b72(_0x14a30b,_0x560ebb);}const y=_0x20d043=>_0x4a080f(new Date(+_0x20d043))[_0x30354b(0x1dc)](_0x30354b(0x1ea)),B=async(_0x8aafcb,_0x268328)=>{const _0x272da7=_0x30354b,_0x5a6e33=_0x8aafcb[_0x272da7(0x1f2)](_0x3579fd),_0x4580be=_0x8aafcb['get'](_0x365edd);_0x268328[_0x272da7(0x1f8)](_0x5b728e=>{const _0x20658e=_0x272da7;_0x5a6e33['getUser'](_0x5b728e)&&_0x268328[_0x20658e(0x1cd)](_0x5b728e);}),_0x268328[_0x272da7(0x20e)]&&(await _0x4580be[_0x272da7(0x1f2)]('/universer-api/user/list',{'params':{'userIDs':[..._0x268328]}}))['body'][_0x272da7(0x1c0)][_0x272da7(0x1f8)](_0x3d3b14=>{_0x3d3b14&&_0x5a6e33['addUser'](_0x3d3b14);});};var K=Object[_0x30354b(0x1cf)],V=(_0x21890e,_0x355929,_0x52281e,_0x33a0bb)=>{for(var _0x2d5ee7=_0x33a0bb>0x1?void 0x0:_0x33a0bb?K(_0x355929,_0x52281e):_0x355929,_0x64e2f4=_0x21890e['length']-0x1,_0x187cda;_0x64e2f4>=0x0;_0x64e2f4--)(_0x187cda=_0x21890e[_0x64e2f4])&&(_0x2d5ee7=_0x187cda(_0x2d5ee7)||_0x2d5ee7);return _0x2d5ee7;},p=(_0x32e8d0,_0x11768a)=>(_0xb1bcde,_0x41d10e)=>_0x11768a(_0xb1bcde,_0x41d10e,_0x32e8d0);function _0x403e(){const _0x9332c1=['383411wVdAmB','Reply','_threadCommentModel','973118bKoQQJ','unitId','parentId','post','OpenOrReOpen','8591EPYukU','size','map','deleteComment','/edit','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','listComments','add','code','requireSession','length','find','_userService','_injector','Delete','thread-comment-data-source.config','12RTfxpP','disposeWithMe','customRanges','content','3332061xALvhp','type','COMMENT','subscribe','resolveComment','Unknown','UNRECOGNIZED','userID','rangeType','users','commentUpdate$','updateComment','userId','pluginName','UNIVER_UNKNOWN','/reply','parse','setConfig','Solved','user','symbol','syncUpdateMutationToColla','delete','getMemberID','getOwnPropertyDescriptor','dataSource','_httpService','/universer-api/comment/unit/','rangeId','error','replies','8514857XxTsix','_config','personId','replyId','3enWGLm','2360572tLMfeG','format','16yJVYPp','_threadCommentDataSourceService','root','stringify','12940bAyFEK','getComment','resolved','addComment','solved','Edit','_threadCommentDataSource','ref','getUnit','YYYY/MM/DD\x20HH:mm','Add','defineProperty','5tfTzCe','slice','comment','addUser','_commentService','get','_initUserSync','789944uVQuGT','pipe','_sessionService','threadId','forEach','Solve','values','_init','filter','comments','body','_configService','114URdPkj','/list','onReady','onStarting','createTimestamp'];_0x403e=function(){return _0x9332c1;};return _0x403e();}let _=class extends _0x5da71c{constructor(_0x5774e9,_0xcf3eec,_0x1b0940,_0x585d2e){const _0xaf08c6=_0x30354b;super(),this[_0xaf08c6(0x1f1)]=_0x5774e9,this[_0xaf08c6(0x207)]=_0xcf3eec,this[_0xaf08c6(0x21a)]=_0x1b0940,this['_injector']=_0x585d2e,this[_0xaf08c6(0x1fb)](),this[_0xaf08c6(0x1f3)]();}[_0x30354b(0x1f3)](){const _0x5d96f1=_0x30354b;this[_0x5d96f1(0x21f)](this[_0x5d96f1(0x207)]['commentUpdate$'][_0x5d96f1(0x1f5)](_0x298b90(0x10))[_0x5d96f1(0x225)](_0x3cef68=>{const _0x39e980=_0x5d96f1,_0x2e0b23=new Set();_0x3cef68[_0x39e980(0x1f8)](_0x20cf2e=>{const _0x253361=_0x39e980;switch(_0x20cf2e['type']){case _0x253361(0x215):{const _0x5c43f4=_0x20cf2e['payload'][_0x253361(0x1d8)];_0x2e0b23[_0x253361(0x215)](_0x5c43f4);break;}}}),B(this['_injector'],_0x2e0b23);}));}[_0x30354b(0x1fb)](){const _0x223fc0=_0x30354b;this[_0x223fc0(0x21f)](this[_0x223fc0(0x1f1)][_0x223fc0(0x1c1)][_0x223fc0(0x225)](async _0x306253=>{const _0x189772=_0x223fc0;var _0xb394a0,_0x2503e5,_0x5a8b8e,_0xa435aa;const _0x2b3317=(_0xb394a0=this['_threadCommentModel']['getUnit'](_0x306253['unitId'])[_0x189772(0x219)](_0x5c3c51=>_0x5c3c51[_0x189772(0x1f7)]===_0x306253[_0x189772(0x1f7)]))==null?void 0x0:_0xb394a0[_0x189772(0x1df)];if(!_0x2b3317)return;const {unitId:_0x4f9c5f,subUnitId:_0x5e762c}=_0x2b3317;switch(_0x306253['user']&&this[_0x189772(0x21a)]['addUser'](_0x306253[_0x189772(0x1ca)]),_0x306253[_0x189772(0x223)]){case v[_0x189772(0x1eb)]:break;case v[_0x189772(0x206)]:{this['_threadCommentModel'][_0x189772(0x1e4)](_0x4f9c5f,_0x5e762c,{'unitId':_0x4f9c5f,'subUnitId':_0x5e762c,'ref':'','id':_0x306253[_0x189772(0x1d9)],'dT':y(+_0x306253['createTimestamp']),'threadId':_0x306253['threadId'],'personId':(_0x5a8b8e=(_0x2503e5=_0x306253[_0x189772(0x1ca)])==null?void 0x0:_0x2503e5['userID'])!=null?_0x5a8b8e:_0x306253[_0x189772(0x1c3)],'text':JSON[_0x189772(0x1c7)](_0x306253[_0x189772(0x221)]),'parentId':_0x2b3317['id']});break;}case v[_0x189772(0x21c)]:{const _0x54e3ac=this['_threadCommentModel'][_0x189772(0x1e2)](_0x4f9c5f,_0x5e762c,_0x306253[_0x189772(0x1d9)]);_0x54e3ac&&_0x54e3ac[_0x189772(0x20a)]&&this[_0x189772(0x207)][_0x189772(0x210)](_0x4f9c5f,_0x5e762c,_0x306253[_0x189772(0x1d9)]);break;}case v[_0x189772(0x1e6)]:{this[_0x189772(0x207)][_0x189772(0x1c2)](_0x4f9c5f,_0x5e762c,{'commentId':_0x306253[_0x189772(0x1d9)],'text':JSON[_0x189772(0x1c7)](_0x306253[_0x189772(0x221)])});break;}case v[_0x189772(0x1f9)]:{const _0x1dfc6d=(_0xa435aa=this['_threadCommentModel'][_0x189772(0x1e9)](_0x306253[_0x189772(0x209)])[_0x189772(0x219)](_0xc6f364=>_0xc6f364[_0x189772(0x1f7)]===_0x306253[_0x189772(0x1f7)]))==null?void 0x0:_0xa435aa[_0x189772(0x1df)];_0x1dfc6d&&this[_0x189772(0x207)][_0x189772(0x226)](_0x4f9c5f,_0x5e762c,_0x1dfc6d['id'],_0x306253[_0x189772(0x1e5)]===I[_0x189772(0x1c9)]);break;}}}));}};_=V([p(0x0,_0x5d6dec(_0x3237e5)),p(0x1,_0x5d6dec(_0x59f117)),p(0x2,_0x5d6dec(_0x3579fd)),p(0x3,_0x5d6dec(_0x5eef6b))],_);const z=_0x30354b(0x21d),O={};var k=Object[_0x30354b(0x1cf)],Q=(_0x19cddd,_0x41e075,_0x110441,_0x40c97a)=>{for(var _0x5f18a9=_0x40c97a>0x1?void 0x0:_0x40c97a?k(_0x41e075,_0x110441):_0x41e075,_0xb79e8d=_0x19cddd['length']-0x1,_0x339154;_0xb79e8d>=0x0;_0xb79e8d--)(_0x339154=_0x19cddd[_0xb79e8d])&&(_0x5f18a9=_0x339154(_0x5f18a9)||_0x5f18a9);return _0x5f18a9;},b=(_0x5a3fb1,_0xa9a51c)=>(_0x4b0db5,_0xefe791)=>_0xa9a51c(_0x4b0db5,_0xefe791,_0x5a3fb1);function X(_0x36f817,_0x281e45){const _0x55f41a=_0x30354b,_0x1c0013=_0x36f817[_0x55f41a(0x1d5)][0x0];return{..._0x281e45,'id':_0x1c0013[_0x55f41a(0x1d9)],'resolved':_0x36f817[_0x55f41a(0x1e5)]===0x1,'dT':y(_0x1c0013[_0x55f41a(0x204)]),'personId':_0x1c0013[_0x55f41a(0x1c3)],'threadId':_0x1c0013[_0x55f41a(0x1f7)]};}function ee(_0x3eaaa7,_0x343457,_0x2dea6a){const _0x1e3ae5=_0x30354b;var _0x32a9d1,_0x13361f;if(((_0x13361f=(_0x32a9d1=_0x3eaaa7==null?void 0x0:_0x3eaaa7[_0x1e3ae5(0x1d5)])==null?void 0x0:_0x32a9d1[_0x1e3ae5(0x218)])!=null?_0x13361f:0x0)>0x0){const _0x55c69a=(_0x12250c,_0x17f27b)=>({'id':_0x12250c['replyId'],'threadId':_0x12250c[_0x1e3ae5(0x1f7)],'dT':y(_0x12250c['createTimestamp']),'personId':_0x12250c[_0x1e3ae5(0x1c3)],'resolved':_0x3eaaa7[_0x1e3ae5(0x1e5)]===I[_0x1e3ae5(0x1c9)],'unitId':_0x343457,'subUnitId':_0x2dea6a,'text':JSON[_0x1e3ae5(0x1c7)](_0x12250c[_0x1e3ae5(0x221)]),'parentId':_0x17f27b}),_0x3beb10=_0x55c69a(_0x3eaaa7[_0x1e3ae5(0x1d5)][0x0]);return{..._0x3beb10,'children':_0x3eaaa7[_0x1e3ae5(0x1d5)][_0x1e3ae5(0x1ee)](0x1)[_0x1e3ae5(0x20f)](_0x16f8d6=>_0x55c69a(_0x16f8d6,_0x3beb10['id']))};}return null;}let S=class{constructor(_0x9ec1cb,_0x27ca8d,_0x27c967){const _0x232620=_0x30354b;this[_0x232620(0x1d1)]=_0x9ec1cb,this[_0x232620(0x21a)]=_0x27ca8d,this[_0x232620(0x1f6)]=_0x27c967;}async['addComment'](_0x4b86a9){const _0x4ef882=_0x30354b;var _0x1a9947,_0x4e5133;const {parentId:_0x9ad8ae,unitId:_0x3c85c6,text:_0x10e433,threadId:_0xf825cc}=_0x4b86a9,_0x10154d=(_0x4e5133=(_0x1a9947=_0x10e433['customRanges'])==null?void 0x0:_0x1a9947[_0x4ef882(0x1fc)](_0x527b20=>_0x527b20[_0x4ef882(0x1bf)]===_0x300af4[_0x4ef882(0x224)])[_0x4ef882(0x20f)](_0x3f9ab0=>_0x3f9ab0[_0x4ef882(0x1d3)]))!=null?_0x4e5133:[],_0x159a50=JSON[_0x4ef882(0x1e0)](_0x10e433),_0x350a15=(await this[_0x4ef882(0x1f6)]['requireSession'](_0x3c85c6))[_0x4ef882(0x1ce)]();if(_0x9ad8ae){const _0xba2370={'memberId':_0x350a15,'unitId':_0x3c85c6,'content':_0x159a50,'mention':_0x10154d,'threadId':_0xf825cc},_0x558d6a=(await this[_0x4ef882(0x1d1)]['post'](_0x4ef882(0x1d2)+_0x3c85c6+_0x4ef882(0x1c6),{'body':_0xba2370}))[_0x4ef882(0x1fe)]['reply'];return{..._0x4b86a9,'id':_0x558d6a['replyId'],'dT':_0x4a080f(+_0x558d6a['createTimestamp'])[_0x4ef882(0x1dc)](_0x4ef882(0x1ea)),'personId':_0x558d6a[_0x4ef882(0x1c3)]};}else{const _0xa33ed1={'memberId':_0x350a15,'unitId':_0x3c85c6,'content':_0x159a50,'mention':_0x10154d},_0xab587f=await this[_0x4ef882(0x1d1)]['post']('/universer-api/comment/unit/'+_0x3c85c6+'/add',{'body':_0xa33ed1});return X(_0xab587f['body'][_0x4ef882(0x1ef)],_0x4b86a9);}}async[_0x30354b(0x1c2)](_0x570878){const _0x49df70=_0x30354b;var _0x22914d,_0x1f5466;const {text:_0x22ac6f,unitId:_0x2adb4a}=_0x570878,_0x10cf20=(_0x1f5466=(_0x22914d=_0x22ac6f[_0x49df70(0x220)])==null?void 0x0:_0x22914d[_0x49df70(0x1fc)](_0x5b765f=>_0x5b765f[_0x49df70(0x1bf)]===_0x300af4['COMMENT'])['map'](_0xd3e42c=>_0xd3e42c[_0x49df70(0x1d3)]))!=null?_0x1f5466:[],_0x432927=JSON['stringify'](_0x22ac6f),_0x483e67=_0x570878[_0x49df70(0x1f7)],_0x6e2278=_0x570878['id'],_0x1ff66b={'memberId':(await this[_0x49df70(0x1f6)][_0x49df70(0x217)](_0x2adb4a))[_0x49df70(0x1ce)](),'unitId':_0x2adb4a,'threadId':_0x483e67,'mention':_0x10cf20,'content':_0x432927,'replyId':_0x6e2278},_0x381ad0=await this[_0x49df70(0x1d1)][_0x49df70(0x20b)](_0x49df70(0x1d2)+_0x2adb4a+_0x49df70(0x211),{'body':_0x1ff66b});return!_0x381ad0[_0x49df70(0x1fe)]['error']||_0x381ad0[_0x49df70(0x1fe)]['error']['code']===0x1;}async[_0x30354b(0x226)](_0x176f6d){const _0x505721=_0x30354b,{unitId:_0x31bafc}=_0x176f6d,_0x2b72da=_0x176f6d[_0x505721(0x1f7)],_0xbe1d01={'memberId':this['_userService']['getCurrentUser']()[_0x505721(0x229)],'unitId':_0x31bafc,'threadId':_0x2b72da,'solved':_0x176f6d[_0x505721(0x1e3)]?I[_0x505721(0x1c9)]:I['OpenOrReOpen']},_0x201375=await this[_0x505721(0x1d1)][_0x505721(0x20b)](_0x505721(0x1d2)+_0x31bafc+'/solved',{'body':_0xbe1d01});return!_0x201375[_0x505721(0x1fe)][_0x505721(0x1d4)]||_0x201375[_0x505721(0x1fe)][_0x505721(0x1d4)]['code']===0x1;}async[_0x30354b(0x210)](_0x219348,_0x1d741d,_0x11aeff,_0x1a4e81){const _0x2e3dc2=_0x30354b,_0x972fec={'memberId':(await this[_0x2e3dc2(0x1f6)][_0x2e3dc2(0x217)](_0x219348))[_0x2e3dc2(0x1ce)](),'threadId':_0x11aeff,'replyId':_0x1a4e81,'unitId':_0x219348},_0x1ec068=await this[_0x2e3dc2(0x1d1)][_0x2e3dc2(0x20b)]('/universer-api/comment/unit/'+_0x219348+'/delete',{'body':_0x972fec});return!_0x1ec068[_0x2e3dc2(0x1fe)]['error']||_0x1ec068[_0x2e3dc2(0x1fe)][_0x2e3dc2(0x1d4)][_0x2e3dc2(0x216)]===0x1;}async[_0x30354b(0x214)](_0x3f44f7,_0x5dbb05,_0x103c7f){const _0x10726b=_0x30354b,_0x59a161={'unitId':_0x3f44f7,'threadId':_0x103c7f},_0x4fb4b0=await this[_0x10726b(0x1d1)][_0x10726b(0x20b)]('/universer-api/comment/unit/'+_0x3f44f7+_0x10726b(0x201),{'body':_0x59a161}),_0x18b87d=_0x103c7f[_0x10726b(0x20f)](_0x2805f5=>ee(_0x4fb4b0['body'][_0x10726b(0x1fd)][_0x2805f5],_0x3f44f7,_0x5dbb05))[_0x10726b(0x1fc)](Boolean);return Object[_0x10726b(0x1fa)](_0x4fb4b0[_0x10726b(0x1fe)][_0x10726b(0x1c0)])[_0x10726b(0x1f8)](_0x185d84=>{const _0x2dd430=_0x10726b;this['_userService'][_0x2dd430(0x1f0)](_0x185d84);}),_0x18b87d;}[_0x30354b(0x212)](_0x1321ad){const _0x524d75=_0x30354b;return{'id':_0x1321ad['id'],'threadId':_0x1321ad['threadId'],'ref':_0x1321ad[_0x524d75(0x1e8)]};}};S=Q([b(0x0,_0x5d6dec(_0x365edd)),b(0x1,_0x5d6dec(_0x3579fd)),b(0x2,_0x5d6dec(_0x4c60bb))],S);var re=Object[_0x30354b(0x1cf)],te=(_0x598a40,_0x24d176,_0x30431d,_0x536549)=>{const _0x4d4601=_0x30354b;for(var _0x186ba7=_0x536549>0x1?void 0x0:_0x536549?re(_0x24d176,_0x30431d):_0x24d176,_0x39725a=_0x598a40[_0x4d4601(0x218)]-0x1,_0x502def;_0x39725a>=0x0;_0x39725a--)(_0x502def=_0x598a40[_0x39725a])&&(_0x186ba7=_0x502def(_0x186ba7)||_0x186ba7);return _0x186ba7;},M=(_0x5405cc,_0x46c260)=>(_0x570dc2,_0x2de495)=>_0x46c260(_0x570dc2,_0x2de495,_0x5405cc);let f=class extends _0x5da71c{constructor(_0xf831b5,_0x275fe9){const _0xe016af=_0x30354b;super(),this['_threadCommentDataSourceService']=_0xf831b5,this[_0xe016af(0x1e7)]=_0x275fe9,this['_initDataSource']();}['_initDataSource'](){const _0x57b166=_0x30354b;this[_0x57b166(0x1de)][_0x57b166(0x1d0)]=this[_0x57b166(0x1e7)],this[_0x57b166(0x1de)][_0x57b166(0x1cc)]=!0x1;}};f=te([M(0x0,_0x5a2639),M(0x1,_0x5d6dec(S))],f);var se=Object[_0x30354b(0x1ec)],oe=Object[_0x30354b(0x1cf)],ne=(_0x31307d,_0x3a4205,_0x29fd13)=>_0x3a4205 in _0x31307d?se(_0x31307d,_0x3a4205,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29fd13}):_0x31307d[_0x3a4205]=_0x29fd13,ie=(_0x3daa40,_0x3a5048,_0xc3a9e1,_0x321717)=>{const _0x2932ce=_0x30354b;for(var _0x1d8deb=_0x321717>0x1?void 0x0:_0x321717?oe(_0x3a5048,_0xc3a9e1):_0x3a5048,_0x631672=_0x3daa40[_0x2932ce(0x218)]-0x1,_0x3ed4cb;_0x631672>=0x0;_0x631672--)(_0x3ed4cb=_0x3daa40[_0x631672])&&(_0x1d8deb=_0x3ed4cb(_0x1d8deb)||_0x1d8deb);return _0x1d8deb;},N=(_0x1b11cc,_0x397cea)=>(_0x325806,_0xdd6ee)=>_0x397cea(_0x325806,_0xdd6ee,_0x1b11cc),$=(_0x2078fb,_0x4ab36d,_0x41b772)=>ne(_0x2078fb,typeof _0x4ab36d!=_0x30354b(0x1cb)?_0x4ab36d+'':_0x4ab36d,_0x41b772);let g=class extends _0x3bc542{constructor(_0x28d035=O,_0x2c859d,_0x303f96){const _0x555333=_0x30354b;super(),this['_config']=_0x28d035,this[_0x555333(0x21b)]=_0x2c859d,this[_0x555333(0x1ff)]=_0x303f96;const {..._0x46bfd8}=_0x3f3339({},O,this[_0x555333(0x1d7)]);this[_0x555333(0x1ff)][_0x555333(0x1c8)](z,_0x46bfd8);}[_0x30354b(0x203)](){const _0x33a6c4=_0x30354b;[[S],[f],[_]][_0x33a6c4(0x1f8)](_0x44dd8f=>{const _0x31a5bf=_0x33a6c4;this['_injector'][_0x31a5bf(0x215)](_0x44dd8f);});}[_0x30354b(0x202)](){const _0xfc040=_0x30354b;this[_0xfc040(0x21b)][_0xfc040(0x1f2)](f),this[_0xfc040(0x21b)][_0xfc040(0x1f2)](_);}};$(g,_0x30354b(0x1c4),W),$(g,'type',_0x3bb98c[_0x30354b(0x1c5)]),g=ie([_0x413398(_0x32a910,_0x516653,_0x2125bb),N(0x1,_0x5d6dec(_0x5eef6b)),N(0x2,_0x195d4b)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x450650=_0x1924;(function(_0x38d6eb,_0x19fe4c){const _0x5de90c=_0x1924,_0x5b6db2=_0x38d6eb();while(!![]){try{const _0x328a8b=-parseInt(_0x5de90c(0x140))/0x1+parseInt(_0x5de90c(0x13d))/0x2+parseInt(_0x5de90c(0x115))/0x3+-parseInt(_0x5de90c(0x109))/0x4+-parseInt(_0x5de90c(0x108))/0x5*(parseInt(_0x5de90c(0x10f))/0x6)+parseInt(_0x5de90c(0x13e))/0x7+parseInt(_0x5de90c(0x12a))/0x8*(parseInt(_0x5de90c(0xff))/0x9);if(_0x328a8b===_0x19fe4c)break;else _0x5b6db2['push'](_0x5b6db2['shift']());}catch(_0x504658){_0x5b6db2['push'](_0x5b6db2['shift']());}}}(_0x1a8e,0xb5cb2));import{CommentService as _0x4899ac,CollaborationSessionService as _0x4b7890,UniverCollaborationClientPlugin as _0x46de07}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x41bba8}from'@univerjs-pro/license';import{dayjs as _0x37a29a,UserManagerService as _0x50853d,Inject as _0x4de773,Injector as _0x202eaa,Disposable as _0x4222cc,CustomRangeType as _0x569be7,UniverInstanceType as _0xb46a4b,DependentOn as _0x542ceb,IConfigService as _0x5c022a,Plugin as _0x533345,merge as _0x326730}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4e15a3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4cd4a3,IThreadCommentDataSourceService as _0x2c32f7}from'@univerjs/thread-comment';import{bufferTime as _0x11b7ff}from'rxjs';import{HTTPService as _0x328679}from'@univerjs/network';const W=_0x450650(0x156);var I=(_0x44c82c=>(_0x44c82c[_0x44c82c[_0x450650(0x11b)]=0x0]='OpenOrReOpen',_0x44c82c[_0x44c82c['Solved']=0x1]='Solved',_0x44c82c[_0x44c82c[_0x450650(0x14b)]=-0x1]=_0x450650(0x14b),_0x44c82c))(I||{}),v=(_0x590116=>(_0x590116[_0x590116['Unknown']=0x0]=_0x450650(0x152),_0x590116[_0x590116[_0x450650(0x107)]=0x1]=_0x450650(0x107),_0x590116[_0x590116[_0x450650(0x138)]=0x2]='Reply',_0x590116[_0x590116[_0x450650(0x126)]=0x3]='Edit',_0x590116[_0x590116[_0x450650(0x12c)]=0x4]=_0x450650(0x12c),_0x590116[_0x590116[_0x450650(0x134)]=0x5]=_0x450650(0x134),_0x590116[_0x590116[_0x450650(0x14b)]=-0x1]='UNRECOGNIZED',_0x590116))(v||{});const y=_0x37f553=>_0x37a29a(new Date(+_0x37f553))[_0x450650(0x154)](_0x450650(0x12d)),B=async(_0x2b0a42,_0x105b1c)=>{const _0x343fb0=_0x450650,_0x3f89cf=_0x2b0a42[_0x343fb0(0x15d)](_0x50853d),_0x56af5f=_0x2b0a42['get'](_0x328679);_0x105b1c[_0x343fb0(0x10d)](_0x5e2cff=>{const _0x1af291=_0x343fb0;_0x3f89cf[_0x1af291(0x10b)](_0x5e2cff)&&_0x105b1c['delete'](_0x5e2cff);}),_0x105b1c[_0x343fb0(0x11d)]&&(await _0x56af5f['get'](_0x343fb0(0x147),{'params':{'userIDs':[..._0x105b1c]}}))['body'][_0x343fb0(0x159)][_0x343fb0(0x10d)](_0x2c2f86=>{const _0x412c84=_0x343fb0;_0x2c2f86&&_0x3f89cf[_0x412c84(0x114)](_0x2c2f86);});};var K=Object[_0x450650(0x12f)],V=(_0x33efb4,_0x2cf513,_0x332bf3,_0x3eef2a)=>{const _0x18a9b4=_0x450650;for(var _0x29a0fa=_0x3eef2a>0x1?void 0x0:_0x3eef2a?K(_0x2cf513,_0x332bf3):_0x2cf513,_0x3a6492=_0x33efb4[_0x18a9b4(0x130)]-0x1,_0xf52b28;_0x3a6492>=0x0;_0x3a6492--)(_0xf52b28=_0x33efb4[_0x3a6492])&&(_0x29a0fa=_0xf52b28(_0x29a0fa)||_0x29a0fa);return _0x29a0fa;},p=(_0x521a2c,_0x36d664)=>(_0x1a7769,_0x2f2d6f)=>_0x36d664(_0x1a7769,_0x2f2d6f,_0x521a2c);let _=class extends _0x4222cc{constructor(_0x324abf,_0x401363,_0x1cdd56,_0x1bf407){const _0x232274=_0x450650;super(),this[_0x232274(0x129)]=_0x324abf,this[_0x232274(0x112)]=_0x401363,this['_userService']=_0x1cdd56,this[_0x232274(0x145)]=_0x1bf407,this[_0x232274(0x10e)](),this[_0x232274(0x13c)]();}[_0x450650(0x13c)](){const _0x117061=_0x450650;this[_0x117061(0x15b)](this[_0x117061(0x112)]['commentUpdate$'][_0x117061(0x142)](_0x11b7ff(0x10))[_0x117061(0x150)](_0x52703e=>{const _0xd28a4f=_0x117061,_0x3e0999=new Set();_0x52703e[_0xd28a4f(0x10d)](_0x384e79=>{const _0x473079=_0xd28a4f;switch(_0x384e79[_0x473079(0x12b)]){case _0x473079(0x13b):{const _0x45583c=_0x384e79['payload']['personId'];_0x3e0999['add'](_0x45583c);break;}}}),B(this['_injector'],_0x3e0999);}));}[_0x450650(0x10e)](){const _0x2c900d=_0x450650;this[_0x2c900d(0x15b)](this[_0x2c900d(0x129)][_0x2c900d(0x118)][_0x2c900d(0x150)](async _0x2d4ab2=>{const _0x3f6f2a=_0x2c900d;var _0x5433ce,_0x39f5d9,_0x34d0e3,_0xa26bd8;const _0x237772=(_0x5433ce=this[_0x3f6f2a(0x112)][_0x3f6f2a(0x11e)](_0x2d4ab2[_0x3f6f2a(0x146)])[_0x3f6f2a(0x111)](_0x2cf1ad=>_0x2cf1ad[_0x3f6f2a(0x102)]===_0x2d4ab2[_0x3f6f2a(0x102)]))==null?void 0x0:_0x5433ce[_0x3f6f2a(0x132)];if(!_0x237772)return;const {unitId:_0x2b0aa3,subUnitId:_0x1e8ca8}=_0x237772;switch(_0x2d4ab2[_0x3f6f2a(0x14e)]&&this['_userService'][_0x3f6f2a(0x114)](_0x2d4ab2[_0x3f6f2a(0x14e)]),_0x2d4ab2[_0x3f6f2a(0x12b)]){case v[_0x3f6f2a(0x107)]:break;case v['Reply']:{this['_threadCommentModel'][_0x3f6f2a(0x131)](_0x2b0aa3,_0x1e8ca8,{'unitId':_0x2b0aa3,'subUnitId':_0x1e8ca8,'ref':'','id':_0x2d4ab2[_0x3f6f2a(0x121)],'dT':y(+_0x2d4ab2['createTimestamp']),'threadId':_0x2d4ab2[_0x3f6f2a(0x102)],'personId':(_0x34d0e3=(_0x39f5d9=_0x2d4ab2[_0x3f6f2a(0x14e)])==null?void 0x0:_0x39f5d9[_0x3f6f2a(0x15e)])!=null?_0x34d0e3:_0x2d4ab2[_0x3f6f2a(0x155)],'text':JSON[_0x3f6f2a(0x162)](_0x2d4ab2['content']),'parentId':_0x237772['id']});break;}case v['Delete']:{const _0x38ab8a=this[_0x3f6f2a(0x112)][_0x3f6f2a(0x135)](_0x2b0aa3,_0x1e8ca8,_0x2d4ab2[_0x3f6f2a(0x121)]);_0x38ab8a&&_0x38ab8a['parentId']&&this[_0x3f6f2a(0x112)][_0x3f6f2a(0x128)](_0x2b0aa3,_0x1e8ca8,_0x2d4ab2[_0x3f6f2a(0x121)]);break;}case v[_0x3f6f2a(0x126)]:{this['_threadCommentModel']['updateComment'](_0x2b0aa3,_0x1e8ca8,{'commentId':_0x2d4ab2[_0x3f6f2a(0x121)],'text':JSON[_0x3f6f2a(0x162)](_0x2d4ab2[_0x3f6f2a(0x10c)])});break;}case v[_0x3f6f2a(0x134)]:{const _0x3c4d5b=(_0xa26bd8=this[_0x3f6f2a(0x112)]['getUnit'](_0x2d4ab2[_0x3f6f2a(0x146)])[_0x3f6f2a(0x111)](_0x3d6d1c=>_0x3d6d1c[_0x3f6f2a(0x102)]===_0x2d4ab2[_0x3f6f2a(0x102)]))==null?void 0x0:_0xa26bd8['root'];_0x3c4d5b&&this[_0x3f6f2a(0x112)]['resolveComment'](_0x2b0aa3,_0x1e8ca8,_0x3c4d5b['id'],_0x2d4ab2[_0x3f6f2a(0x157)]===I[_0x3f6f2a(0x110)]);break;}}}));}};_=V([p(0x0,_0x4de773(_0x4899ac)),p(0x1,_0x4de773(_0x4cd4a3)),p(0x2,_0x4de773(_0x50853d)),p(0x3,_0x4de773(_0x202eaa))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x450650(0x12f)],Q=(_0x4ddc77,_0x6098fb,_0x108dc2,_0x172c81)=>{const _0x133127=_0x450650;for(var _0x28a051=_0x172c81>0x1?void 0x0:_0x172c81?k(_0x6098fb,_0x108dc2):_0x6098fb,_0x1a2f8c=_0x4ddc77[_0x133127(0x130)]-0x1,_0x1b7ed2;_0x1a2f8c>=0x0;_0x1a2f8c--)(_0x1b7ed2=_0x4ddc77[_0x1a2f8c])&&(_0x28a051=_0x1b7ed2(_0x28a051)||_0x28a051);return _0x28a051;},b=(_0x2ee30c,_0x5c5d1c)=>(_0x3ad1d1,_0x1e6fc5)=>_0x5c5d1c(_0x3ad1d1,_0x1e6fc5,_0x2ee30c);function X(_0x4bf659,_0x311a27){const _0xc0a75b=_0x450650,_0x269da6=_0x4bf659['replies'][0x0];return{..._0x311a27,'id':_0x269da6[_0xc0a75b(0x121)],'resolved':_0x4bf659[_0xc0a75b(0x157)]===0x1,'dT':y(_0x269da6[_0xc0a75b(0x14d)]),'personId':_0x269da6[_0xc0a75b(0x155)],'threadId':_0x269da6[_0xc0a75b(0x102)]};}function ee(_0x2cba06,_0x5bc8bb,_0x2e0927){const _0x2a95ef=_0x450650;var _0x59c3fd,_0x3899ae;if(((_0x3899ae=(_0x59c3fd=_0x2cba06==null?void 0x0:_0x2cba06[_0x2a95ef(0x14c)])==null?void 0x0:_0x59c3fd['length'])!=null?_0x3899ae:0x0)>0x0){const _0x27e5d6=(_0x5a56c1,_0x51317f)=>({'id':_0x5a56c1[_0x2a95ef(0x121)],'threadId':_0x5a56c1[_0x2a95ef(0x102)],'dT':y(_0x5a56c1[_0x2a95ef(0x14d)]),'personId':_0x5a56c1[_0x2a95ef(0x155)],'resolved':_0x2cba06[_0x2a95ef(0x157)]===I['Solved'],'unitId':_0x5bc8bb,'subUnitId':_0x2e0927,'text':JSON[_0x2a95ef(0x162)](_0x5a56c1[_0x2a95ef(0x10c)]),'parentId':_0x51317f}),_0x5377a8=_0x27e5d6(_0x2cba06[_0x2a95ef(0x14c)][0x0]);return{..._0x5377a8,'children':_0x2cba06[_0x2a95ef(0x14c)][_0x2a95ef(0x143)](0x1)['map'](_0x5c3cd6=>_0x27e5d6(_0x5c3cd6,_0x5377a8['id']))};}return null;}function _0x1a8e(){const _0x3fd8dc=['code','Reply','comments','getMemberID','add','_initUserSync','1747996QwjSau','3650745YxwvFK','_userService','858119KAoNwk','dataSource','pipe','slice','filter','_injector','unitId','/universer-api/user/list','body','_threadCommentDataSourceService','_config','UNRECOGNIZED','replies','createTimestamp','user','_threadCommentDataSource','subscribe','setConfig','Unknown','error','format','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','COMMENT','users','syncUpdateMutationToColla','disposeWithMe','saveCommentToSnapshot','get','userID','_httpService','defineProperty','/reply','parse','5422104fqQprz','post','stringify','threadId','_sessionService','listComments','comment','/delete','Add','85epRCQh','2813356FJhUba','onReady','getUser','content','forEach','_init','295494AmpJjn','Solved','find','_threadCommentModel','/universer-api/comment/unit/','addUser','1628616yHAmUA','_configService','symbol','commentUpdate$','/list','values','OpenOrReOpen','/solved','size','getUnit','rangeId','ref','replyId','_initDataSource','customRanges','rangeType','resolveComment','Edit','requireSession','deleteComment','_commentService','16wXlDWw','type','Delete','YYYY/MM/DD\x20HH:mm','resolved','getOwnPropertyDescriptor','length','addComment','root','map','Solve','getComment','onStarting'];_0x1a8e=function(){return _0x3fd8dc;};return _0x1a8e();}let S=class{constructor(_0x238068,_0x177cfc,_0x148a5e){const _0x47d2bc=_0x450650;this['_httpService']=_0x238068,this['_userService']=_0x177cfc,this[_0x47d2bc(0x103)]=_0x148a5e;}async[_0x450650(0x131)](_0x3ba58f){const _0x574128=_0x450650;var _0x5aca7f,_0x7f726e;const {parentId:_0x4b6b8f,unitId:_0x4283ce,text:_0x48d656,threadId:_0x40c46c}=_0x3ba58f,_0x4cd983=(_0x7f726e=(_0x5aca7f=_0x48d656[_0x574128(0x123)])==null?void 0x0:_0x5aca7f[_0x574128(0x144)](_0x43d1b2=>_0x43d1b2[_0x574128(0x124)]===_0x569be7[_0x574128(0x158)])[_0x574128(0x133)](_0x20c471=>_0x20c471[_0x574128(0x11f)]))!=null?_0x7f726e:[],_0x51d695=JSON[_0x574128(0x101)](_0x48d656),_0x396279=(await this[_0x574128(0x103)][_0x574128(0x127)](_0x4283ce))['getMemberID']();if(_0x4b6b8f){const _0x5e4e5d={'memberId':_0x396279,'unitId':_0x4283ce,'content':_0x51d695,'mention':_0x4cd983,'threadId':_0x40c46c},_0x2d4faf=(await this['_httpService'][_0x574128(0x100)]('/universer-api/comment/unit/'+_0x4283ce+_0x574128(0x161),{'body':_0x5e4e5d}))[_0x574128(0x148)]['reply'];return{..._0x3ba58f,'id':_0x2d4faf['replyId'],'dT':_0x37a29a(+_0x2d4faf[_0x574128(0x14d)])['format'](_0x574128(0x12d)),'personId':_0x2d4faf['userId']};}else{const _0x581101={'memberId':_0x396279,'unitId':_0x4283ce,'content':_0x51d695,'mention':_0x4cd983},_0x184f58=await this[_0x574128(0x15f)][_0x574128(0x100)](_0x574128(0x113)+_0x4283ce+'/add',{'body':_0x581101});return X(_0x184f58['body'][_0x574128(0x105)],_0x3ba58f);}}async['updateComment'](_0x459dbb){const _0x276da0=_0x450650;var _0x573eac,_0x3193d7;const {text:_0x116c6c,unitId:_0x1e4eeb}=_0x459dbb,_0x3d4331=(_0x3193d7=(_0x573eac=_0x116c6c[_0x276da0(0x123)])==null?void 0x0:_0x573eac[_0x276da0(0x144)](_0x13cea7=>_0x13cea7['rangeType']===_0x569be7['COMMENT'])[_0x276da0(0x133)](_0x46874e=>_0x46874e[_0x276da0(0x11f)]))!=null?_0x3193d7:[],_0x4ee99e=JSON[_0x276da0(0x101)](_0x116c6c),_0x3b0949=_0x459dbb[_0x276da0(0x102)],_0x276211=_0x459dbb['id'],_0x28cd66={'memberId':(await this[_0x276da0(0x103)][_0x276da0(0x127)](_0x1e4eeb))[_0x276da0(0x13a)](),'unitId':_0x1e4eeb,'threadId':_0x3b0949,'mention':_0x3d4331,'content':_0x4ee99e,'replyId':_0x276211},_0x307bb4=await this[_0x276da0(0x15f)][_0x276da0(0x100)](_0x276da0(0x113)+_0x1e4eeb+'/edit',{'body':_0x28cd66});return!_0x307bb4[_0x276da0(0x148)][_0x276da0(0x153)]||_0x307bb4[_0x276da0(0x148)][_0x276da0(0x153)][_0x276da0(0x137)]===0x1;}async[_0x450650(0x125)](_0x5dc3ce){const _0xea7d8=_0x450650,{unitId:_0x27781b}=_0x5dc3ce,_0x57664f=_0x5dc3ce[_0xea7d8(0x102)],_0x419d92={'memberId':this[_0xea7d8(0x13f)]['getCurrentUser']()[_0xea7d8(0x15e)],'unitId':_0x27781b,'threadId':_0x57664f,'solved':_0x5dc3ce[_0xea7d8(0x12e)]?I[_0xea7d8(0x110)]:I[_0xea7d8(0x11b)]},_0x2798d7=await this[_0xea7d8(0x15f)]['post']('/universer-api/comment/unit/'+_0x27781b+_0xea7d8(0x11c),{'body':_0x419d92});return!_0x2798d7[_0xea7d8(0x148)][_0xea7d8(0x153)]||_0x2798d7['body']['error'][_0xea7d8(0x137)]===0x1;}async['deleteComment'](_0x2597bf,_0x25a58f,_0x5db11d,_0x258215){const _0x347b35=_0x450650,_0x4b0ca0={'memberId':(await this[_0x347b35(0x103)]['requireSession'](_0x2597bf))[_0x347b35(0x13a)](),'threadId':_0x5db11d,'replyId':_0x258215,'unitId':_0x2597bf},_0x4e0269=await this[_0x347b35(0x15f)]['post'](_0x347b35(0x113)+_0x2597bf+_0x347b35(0x106),{'body':_0x4b0ca0});return!_0x4e0269[_0x347b35(0x148)][_0x347b35(0x153)]||_0x4e0269['body'][_0x347b35(0x153)][_0x347b35(0x137)]===0x1;}async[_0x450650(0x104)](_0x2f338d,_0x352087,_0x44fe4a){const _0x2c3b8b=_0x450650,_0x500f19={'unitId':_0x2f338d,'threadId':_0x44fe4a},_0xdf1f69=await this['_httpService'][_0x2c3b8b(0x100)](_0x2c3b8b(0x113)+_0x2f338d+_0x2c3b8b(0x119),{'body':_0x500f19}),_0x5eaadf=_0x44fe4a[_0x2c3b8b(0x133)](_0x20845b=>ee(_0xdf1f69[_0x2c3b8b(0x148)][_0x2c3b8b(0x139)][_0x20845b],_0x2f338d,_0x352087))[_0x2c3b8b(0x144)](Boolean);return Object[_0x2c3b8b(0x11a)](_0xdf1f69[_0x2c3b8b(0x148)][_0x2c3b8b(0x159)])[_0x2c3b8b(0x10d)](_0x15c1ef=>{const _0x54250a=_0x2c3b8b;this[_0x54250a(0x13f)][_0x54250a(0x114)](_0x15c1ef);}),_0x5eaadf;}[_0x450650(0x15c)](_0x24330d){const _0x2d459d=_0x450650;return{'id':_0x24330d['id'],'threadId':_0x24330d[_0x2d459d(0x102)],'ref':_0x24330d[_0x2d459d(0x120)]};}};S=Q([b(0x0,_0x4de773(_0x328679)),b(0x1,_0x4de773(_0x50853d)),b(0x2,_0x4de773(_0x4b7890))],S);var re=Object[_0x450650(0x12f)],te=(_0x57c3ab,_0x5f06a2,_0x524422,_0x10cf71)=>{const _0x13a432=_0x450650;for(var _0xb5c623=_0x10cf71>0x1?void 0x0:_0x10cf71?re(_0x5f06a2,_0x524422):_0x5f06a2,_0x2af6fe=_0x57c3ab[_0x13a432(0x130)]-0x1,_0x7dee2e;_0x2af6fe>=0x0;_0x2af6fe--)(_0x7dee2e=_0x57c3ab[_0x2af6fe])&&(_0xb5c623=_0x7dee2e(_0xb5c623)||_0xb5c623);return _0xb5c623;},M=(_0x3d7186,_0x2a9bc4)=>(_0x3f3dbb,_0x4ea6fc)=>_0x2a9bc4(_0x3f3dbb,_0x4ea6fc,_0x3d7186);let f=class extends _0x4222cc{constructor(_0x6b2eb6,_0x580aae){const _0x2fb173=_0x450650;super(),this['_threadCommentDataSourceService']=_0x6b2eb6,this[_0x2fb173(0x14f)]=_0x580aae,this[_0x2fb173(0x122)]();}[_0x450650(0x122)](){const _0x2c6eeb=_0x450650;this[_0x2c6eeb(0x149)][_0x2c6eeb(0x141)]=this[_0x2c6eeb(0x14f)],this['_threadCommentDataSourceService'][_0x2c6eeb(0x15a)]=!0x1;}};f=te([M(0x0,_0x2c32f7),M(0x1,_0x4de773(S))],f);function _0x1924(_0xc3c12b,_0x218da0){const _0x1a8ed4=_0x1a8e();return _0x1924=function(_0x1924ea,_0x1a3cec){_0x1924ea=_0x1924ea-0xff;let _0x238a45=_0x1a8ed4[_0x1924ea];return _0x238a45;},_0x1924(_0xc3c12b,_0x218da0);}var se=Object[_0x450650(0x160)],oe=Object[_0x450650(0x12f)],ne=(_0x1be323,_0xd3ead9,_0x194ad1)=>_0xd3ead9 in _0x1be323?se(_0x1be323,_0xd3ead9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x194ad1}):_0x1be323[_0xd3ead9]=_0x194ad1,ie=(_0x1e250a,_0x16ac86,_0x2006c7,_0x4e1784)=>{const _0x219979=_0x450650;for(var _0x3471cb=_0x4e1784>0x1?void 0x0:_0x4e1784?oe(_0x16ac86,_0x2006c7):_0x16ac86,_0x4956a5=_0x1e250a[_0x219979(0x130)]-0x1,_0x38ee77;_0x4956a5>=0x0;_0x4956a5--)(_0x38ee77=_0x1e250a[_0x4956a5])&&(_0x3471cb=_0x38ee77(_0x3471cb)||_0x3471cb);return _0x3471cb;},N=(_0x462216,_0xa44542)=>(_0x1fc42f,_0x2da45a)=>_0xa44542(_0x1fc42f,_0x2da45a,_0x462216),$=(_0x345592,_0x232bcc,_0xfb10dc)=>ne(_0x345592,typeof _0x232bcc!=_0x450650(0x117)?_0x232bcc+'':_0x232bcc,_0xfb10dc);let g=class extends _0x533345{constructor(_0x23c501=O,_0x394f2e,_0x5cff35){const _0x93059f=_0x450650;super(),this[_0x93059f(0x14a)]=_0x23c501,this[_0x93059f(0x145)]=_0x394f2e,this[_0x93059f(0x116)]=_0x5cff35;const {..._0x5aa076}=_0x326730({},O,this['_config']);this[_0x93059f(0x116)][_0x93059f(0x151)](z,_0x5aa076);}[_0x450650(0x136)](){const _0x50800c=_0x450650;[[S],[f],[_]][_0x50800c(0x10d)](_0x3d78b9=>{const _0x3c158c=_0x50800c;this[_0x3c158c(0x145)][_0x3c158c(0x13b)](_0x3d78b9);});}[_0x450650(0x10a)](){const _0x140853=_0x450650;this[_0x140853(0x145)][_0x140853(0x15d)](f),this[_0x140853(0x145)]['get'](_);}};$(g,'pluginName',W),$(g,_0x450650(0x12b),_0xb46a4b['UNIVER_UNKNOWN']),g=ie([_0x542ceb(_0x4e15a3,_0x46de07,_0x41bba8),N(0x1,_0x4de773(_0x202eaa)),N(0x2,_0x5c022a)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x36a560,_0x1448b8){const _0x3f406e=_0x2a56,_0x43d4c2=_0x36a560();while(!![]){try{const _0x3c0763=-parseInt(_0x3f406e(0x1ab))/0x1+parseInt(_0x3f406e(0x1a2))/0x2*(-parseInt(_0x3f406e(0x17e))/0x3)+-parseInt(_0x3f406e(0x1c8))/0x4*(parseInt(_0x3f406e(0x189))/0x5)+parseInt(_0x3f406e(0x1aa))/0x6*(-parseInt(_0x3f406e(0x1de))/0x7)+-parseInt(_0x3f406e(0x1c7))/0x8*(-parseInt(_0x3f406e(0x1cd))/0x9)+parseInt(_0x3f406e(0x188))/0xa+parseInt(_0x3f406e(0x182))/0xb*(parseInt(_0x3f406e(0x1e7))/0xc);if(_0x3c0763===_0x1448b8)break;else _0x43d4c2['push'](_0x43d4c2['shift']());}catch(_0xf6a4e8){_0x43d4c2['push'](_0x43d4c2['shift']());}}}(_0x3f33,0xa1205),function(_0x2304d8,_0x234b4c){const _0x21e0e5=_0x2a56;typeof exports==_0x21e0e5(0x187)&&typeof module<'u'?_0x234b4c(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define['amd']?define([_0x21e0e5(0x1bc),_0x21e0e5(0x190),_0x21e0e5(0x1f2),_0x21e0e5(0x19d),_0x21e0e5(0x1eb),_0x21e0e5(0x1c3),_0x21e0e5(0x1ba),_0x21e0e5(0x201)],_0x234b4c):(_0x2304d8=typeof globalThis<'u'?globalThis:_0x2304d8||self,_0x234b4c(_0x2304d8['UniverProThreadCommentDatasource']={},_0x2304d8['UniverProCollaborationClient'],_0x2304d8[_0x21e0e5(0x1d4)],_0x2304d8[_0x21e0e5(0x1db)],_0x2304d8[_0x21e0e5(0x1b9)],_0x2304d8[_0x21e0e5(0x1bb)],_0x2304d8['rxjs'],_0x2304d8[_0x21e0e5(0x1a4)]));}(this,function(_0x535030,_0x504b97,_0x51a395,_0x20d5f0,_0x4da799,_0x4f9e71,_0x4cfb65,_0x20277a){'use strict';const _0x14ef60=_0x2a56;const _0x3e569=_0x14ef60(0x1a9);var _0x56e0b5=(_0x4134ca=>(_0x4134ca[_0x4134ca[_0x14ef60(0x19f)]=0x0]='OpenOrReOpen',_0x4134ca[_0x4134ca[_0x14ef60(0x1c1)]=0x1]=_0x14ef60(0x1c1),_0x4134ca[_0x4134ca[_0x14ef60(0x186)]=-0x1]=_0x14ef60(0x186),_0x4134ca))(_0x56e0b5||{}),_0x4ceb98=(_0x5c9de0=>(_0x5c9de0[_0x5c9de0[_0x14ef60(0x1a0)]=0x0]=_0x14ef60(0x1a0),_0x5c9de0[_0x5c9de0[_0x14ef60(0x1ad)]=0x1]=_0x14ef60(0x1ad),_0x5c9de0[_0x5c9de0[_0x14ef60(0x19c)]=0x2]=_0x14ef60(0x19c),_0x5c9de0[_0x5c9de0['Edit']=0x3]=_0x14ef60(0x1bf),_0x5c9de0[_0x5c9de0[_0x14ef60(0x1d3)]=0x4]=_0x14ef60(0x1d3),_0x5c9de0[_0x5c9de0[_0x14ef60(0x18c)]=0x5]=_0x14ef60(0x18c),_0x5c9de0[_0x5c9de0[_0x14ef60(0x186)]=-0x1]=_0x14ef60(0x186),_0x5c9de0))(_0x4ceb98||{});const _0x3be4ab=_0x59d21e=>_0x20d5f0[_0x14ef60(0x1f3)](new Date(+_0x59d21e))[_0x14ef60(0x199)]('YYYY/MM/DD\x20HH:mm'),_0x261b7d=async(_0x61ba65,_0x24ed99)=>{const _0x41c7bd=_0x14ef60,_0x23a40d=_0x61ba65[_0x41c7bd(0x1e6)](_0x20d5f0[_0x41c7bd(0x1b2)]),_0x3c3ef9=_0x61ba65['get'](_0x20277a[_0x41c7bd(0x1fb)]);_0x24ed99[_0x41c7bd(0x1ff)](_0x906125=>{const _0x428a7f=_0x41c7bd;_0x23a40d[_0x428a7f(0x19b)](_0x906125)&&_0x24ed99[_0x428a7f(0x1fc)](_0x906125);}),_0x24ed99[_0x41c7bd(0x183)]&&(await _0x3c3ef9[_0x41c7bd(0x1e6)](_0x41c7bd(0x1e8),{'params':{'userIDs':[..._0x24ed99]}}))[_0x41c7bd(0x1b7)][_0x41c7bd(0x1f4)][_0x41c7bd(0x1ff)](_0x900540=>{const _0x525866=_0x41c7bd;_0x900540&&_0x23a40d[_0x525866(0x1dc)](_0x900540);});};var _0xdb31d2=Object[_0x14ef60(0x1ea)],_0x5c6129=(_0x1fd339,_0x5039c0,_0x32ff59,_0x51153e)=>{const _0x3377f5=_0x14ef60;for(var _0x4ce63e=_0x51153e>0x1?void 0x0:_0x51153e?_0xdb31d2(_0x5039c0,_0x32ff59):_0x5039c0,_0x8628b4=_0x1fd339[_0x3377f5(0x1cb)]-0x1,_0x30be70;_0x8628b4>=0x0;_0x8628b4--)(_0x30be70=_0x1fd339[_0x8628b4])&&(_0x4ce63e=_0x30be70(_0x4ce63e)||_0x4ce63e);return _0x4ce63e;},_0xf68539=(_0x4719b8,_0x3570c6)=>(_0x27b974,_0x41b0f9)=>_0x3570c6(_0x27b974,_0x41b0f9,_0x4719b8);let _0x45c70f=class extends _0x20d5f0[_0x14ef60(0x1f0)]{constructor(_0x37f313,_0xd75420,_0x5ad218,_0x253f6c){const _0x575b2c=_0x14ef60;super(),this[_0x575b2c(0x1ee)]=_0x37f313,this[_0x575b2c(0x1be)]=_0xd75420,this[_0x575b2c(0x18a)]=_0x5ad218,this[_0x575b2c(0x1d9)]=_0x253f6c,this[_0x575b2c(0x1f9)](),this[_0x575b2c(0x1da)]();}[_0x14ef60(0x1da)](){const _0x112538=_0x14ef60;this[_0x112538(0x1c5)](this[_0x112538(0x1be)][_0x112538(0x1df)]['pipe'](_0x4cfb65[_0x112538(0x1d7)](0x10))['subscribe'](_0x353421=>{const _0x2f24a8=_0x112538,_0x4e92a7=new Set();_0x353421[_0x2f24a8(0x1ff)](_0x436c6e=>{const _0x34b3f6=_0x2f24a8;switch(_0x436c6e[_0x34b3f6(0x1dd)]){case'add':{const _0x18b007=_0x436c6e['payload']['personId'];_0x4e92a7[_0x34b3f6(0x1d2)](_0x18b007);break;}}}),_0x261b7d(this[_0x2f24a8(0x1d9)],_0x4e92a7);}));}['_init'](){const _0x25daed=_0x14ef60;this['disposeWithMe'](this['_commentService'][_0x25daed(0x1df)][_0x25daed(0x184)](async _0x16102b=>{const _0x22d827=_0x25daed;var _0x4574f2,_0x340084,_0x32951e,_0x3a5dd5;const _0x52ef4f=(_0x4574f2=this[_0x22d827(0x1be)][_0x22d827(0x1cf)](_0x16102b[_0x22d827(0x181)])['find'](_0x1938a2=>_0x1938a2[_0x22d827(0x1ef)]===_0x16102b[_0x22d827(0x1ef)]))==null?void 0x0:_0x4574f2['root'];if(!_0x52ef4f)return;const {unitId:_0x397485,subUnitId:_0x3b2163}=_0x52ef4f;switch(_0x16102b['user']&&this[_0x22d827(0x18a)][_0x22d827(0x1dc)](_0x16102b['user']),_0x16102b[_0x22d827(0x1dd)]){case _0x4ceb98[_0x22d827(0x1ad)]:break;case _0x4ceb98[_0x22d827(0x19c)]:{this['_threadCommentModel'][_0x22d827(0x1ae)](_0x397485,_0x3b2163,{'unitId':_0x397485,'subUnitId':_0x3b2163,'ref':'','id':_0x16102b['replyId'],'dT':_0x3be4ab(+_0x16102b['createTimestamp']),'threadId':_0x16102b[_0x22d827(0x1ef)],'personId':(_0x32951e=(_0x340084=_0x16102b['user'])==null?void 0x0:_0x340084[_0x22d827(0x1e4)])!=null?_0x32951e:_0x16102b[_0x22d827(0x1e5)],'text':JSON[_0x22d827(0x1d0)](_0x16102b['content']),'parentId':_0x52ef4f['id']});break;}case _0x4ceb98[_0x22d827(0x1d3)]:{const _0x2a1318=this[_0x22d827(0x1be)][_0x22d827(0x17c)](_0x397485,_0x3b2163,_0x16102b[_0x22d827(0x1c2)]);_0x2a1318&&_0x2a1318[_0x22d827(0x1e9)]&&this[_0x22d827(0x1be)][_0x22d827(0x1a7)](_0x397485,_0x3b2163,_0x16102b[_0x22d827(0x1c2)]);break;}case _0x4ceb98['Edit']:{this[_0x22d827(0x1be)]['updateComment'](_0x397485,_0x3b2163,{'commentId':_0x16102b[_0x22d827(0x1c2)],'text':JSON[_0x22d827(0x1d0)](_0x16102b['content'])});break;}case _0x4ceb98[_0x22d827(0x18c)]:{const _0x81a0b3=(_0x3a5dd5=this[_0x22d827(0x1be)][_0x22d827(0x1cf)](_0x16102b[_0x22d827(0x181)])['find'](_0x3f9f17=>_0x3f9f17['threadId']===_0x16102b[_0x22d827(0x1ef)]))==null?void 0x0:_0x3a5dd5[_0x22d827(0x1d5)];_0x81a0b3&&this[_0x22d827(0x1be)]['resolveComment'](_0x397485,_0x3b2163,_0x81a0b3['id'],_0x16102b[_0x22d827(0x19a)]===_0x56e0b5[_0x22d827(0x1c1)]);break;}}}));}};_0x45c70f=_0x5c6129([_0xf68539(0x0,_0x20d5f0[_0x14ef60(0x185)](_0x504b97[_0x14ef60(0x1b3)])),_0xf68539(0x1,_0x20d5f0[_0x14ef60(0x185)](_0x4f9e71['ThreadCommentModel'])),_0xf68539(0x2,_0x20d5f0[_0x14ef60(0x185)](_0x20d5f0[_0x14ef60(0x1b2)])),_0xf68539(0x3,_0x20d5f0[_0x14ef60(0x185)](_0x20d5f0[_0x14ef60(0x1b1)]))],_0x45c70f);const _0xb8d4e6=_0x14ef60(0x1e1),_0xd9a410={};var _0x1fa2c5=Object['getOwnPropertyDescriptor'],_0x57837b=(_0x3e3de0,_0x4acd88,_0x26c302,_0x49ade4)=>{for(var _0x1afa03=_0x49ade4>0x1?void 0x0:_0x49ade4?_0x1fa2c5(_0x4acd88,_0x26c302):_0x4acd88,_0x1e9ce7=_0x3e3de0['length']-0x1,_0x116748;_0x1e9ce7>=0x0;_0x1e9ce7--)(_0x116748=_0x3e3de0[_0x1e9ce7])&&(_0x1afa03=_0x116748(_0x1afa03)||_0x1afa03);return _0x1afa03;},_0xdf1a53=(_0x4f6751,_0x333761)=>(_0x40d651,_0x49ab7c)=>_0x333761(_0x40d651,_0x49ab7c,_0x4f6751);function _0x4210ec(_0x398b33,_0x53635f){const _0x24b6ab=_0x14ef60,_0x598325=_0x398b33[_0x24b6ab(0x1d6)][0x0];return{..._0x53635f,'id':_0x598325[_0x24b6ab(0x1c2)],'resolved':_0x398b33[_0x24b6ab(0x19a)]===0x1,'dT':_0x3be4ab(_0x598325[_0x24b6ab(0x19e)]),'personId':_0x598325[_0x24b6ab(0x1e5)],'threadId':_0x598325[_0x24b6ab(0x1ef)]};}function _0x20e294(_0x493e61,_0x8f3454,_0x4f2644){const _0x42f3db=_0x14ef60;var _0xa17888,_0x29f452;if(((_0x29f452=(_0xa17888=_0x493e61==null?void 0x0:_0x493e61[_0x42f3db(0x1d6)])==null?void 0x0:_0xa17888[_0x42f3db(0x1cb)])!=null?_0x29f452:0x0)>0x0){const _0xc9bf8f=(_0x3207e0,_0x3ec936)=>({'id':_0x3207e0[_0x42f3db(0x1c2)],'threadId':_0x3207e0[_0x42f3db(0x1ef)],'dT':_0x3be4ab(_0x3207e0[_0x42f3db(0x19e)]),'personId':_0x3207e0[_0x42f3db(0x1e5)],'resolved':_0x493e61[_0x42f3db(0x19a)]===_0x56e0b5[_0x42f3db(0x1c1)],'unitId':_0x8f3454,'subUnitId':_0x4f2644,'text':JSON[_0x42f3db(0x1d0)](_0x3207e0['content']),'parentId':_0x3ec936}),_0x45ceb1=_0xc9bf8f(_0x493e61[_0x42f3db(0x1d6)][0x0]);return{..._0x45ceb1,'children':_0x493e61[_0x42f3db(0x1d6)]['slice'](0x1)['map'](_0x809842=>_0xc9bf8f(_0x809842,_0x45ceb1['id']))};}return null;}let _0x1c2270=class{constructor(_0x192204,_0x17a22d,_0x1bf634){const _0x40e04e=_0x14ef60;this['_httpService']=_0x192204,this['_userService']=_0x17a22d,this[_0x40e04e(0x200)]=_0x1bf634;}async['addComment'](_0x5ec81c){const _0x3d6334=_0x14ef60;var _0xebeacb,_0x150096;const {parentId:_0x24d073,unitId:_0x4cd849,text:_0x4be7c3,threadId:_0x17c73f}=_0x5ec81c,_0x52a81f=(_0x150096=(_0xebeacb=_0x4be7c3['customRanges'])==null?void 0x0:_0xebeacb[_0x3d6334(0x1d8)](_0x2a0c5e=>_0x2a0c5e[_0x3d6334(0x180)]===_0x20d5f0['CustomRangeType'][_0x3d6334(0x1c9)])[_0x3d6334(0x1a3)](_0x4729c9=>_0x4729c9['rangeId']))!=null?_0x150096:[],_0x58276d=JSON[_0x3d6334(0x202)](_0x4be7c3),_0xdef7e0=(await this[_0x3d6334(0x200)]['requireSession'](_0x4cd849))[_0x3d6334(0x1e2)]();if(_0x24d073){const _0x291bb7={'memberId':_0xdef7e0,'unitId':_0x4cd849,'content':_0x58276d,'mention':_0x52a81f,'threadId':_0x17c73f},_0x17967c=(await this[_0x3d6334(0x18f)][_0x3d6334(0x1bd)](_0x3d6334(0x1cc)+_0x4cd849+_0x3d6334(0x191),{'body':_0x291bb7}))[_0x3d6334(0x1b7)]['reply'];return{..._0x5ec81c,'id':_0x17967c['replyId'],'dT':_0x20d5f0['dayjs'](+_0x17967c['createTimestamp'])[_0x3d6334(0x199)](_0x3d6334(0x1b5)),'personId':_0x17967c[_0x3d6334(0x1e5)]};}else{const _0x1afb4b={'memberId':_0xdef7e0,'unitId':_0x4cd849,'content':_0x58276d,'mention':_0x52a81f},_0x22aeb7=await this['_httpService'][_0x3d6334(0x1bd)](_0x3d6334(0x1cc)+_0x4cd849+_0x3d6334(0x1fe),{'body':_0x1afb4b});return _0x4210ec(_0x22aeb7[_0x3d6334(0x1b7)][_0x3d6334(0x1b8)],_0x5ec81c);}}async[_0x14ef60(0x1ac)](_0xac5a65){const _0x12fd20=_0x14ef60;var _0x99d20c,_0x963293;const {text:_0xb718dd,unitId:_0x2008d6}=_0xac5a65,_0x193854=(_0x963293=(_0x99d20c=_0xb718dd['customRanges'])==null?void 0x0:_0x99d20c[_0x12fd20(0x1d8)](_0x12bbae=>_0x12bbae['rangeType']===_0x20d5f0[_0x12fd20(0x193)][_0x12fd20(0x1c9)])[_0x12fd20(0x1a3)](_0x5227e8=>_0x5227e8[_0x12fd20(0x17d)]))!=null?_0x963293:[],_0x226b12=JSON['stringify'](_0xb718dd),_0x1b0ef5=_0xac5a65[_0x12fd20(0x1ef)],_0x4ca824=_0xac5a65['id'],_0x3d9eb3={'memberId':(await this[_0x12fd20(0x200)][_0x12fd20(0x1ca)](_0x2008d6))[_0x12fd20(0x1e2)](),'unitId':_0x2008d6,'threadId':_0x1b0ef5,'mention':_0x193854,'content':_0x226b12,'replyId':_0x4ca824},_0x4c7957=await this[_0x12fd20(0x18f)][_0x12fd20(0x1bd)](_0x12fd20(0x1cc)+_0x2008d6+'/edit',{'body':_0x3d9eb3});return!_0x4c7957[_0x12fd20(0x1b7)][_0x12fd20(0x1ec)]||_0x4c7957[_0x12fd20(0x1b7)][_0x12fd20(0x1ec)]['code']===0x1;}async[_0x14ef60(0x1a8)](_0x1ca494){const _0x146be8=_0x14ef60,{unitId:_0x2b046e}=_0x1ca494,_0x479e8d=_0x1ca494[_0x146be8(0x1ef)],_0xd9d473={'memberId':this['_userService'][_0x146be8(0x195)]()[_0x146be8(0x1e4)],'unitId':_0x2b046e,'threadId':_0x479e8d,'solved':_0x1ca494[_0x146be8(0x1a5)]?_0x56e0b5['Solved']:_0x56e0b5[_0x146be8(0x19f)]},_0x550662=await this[_0x146be8(0x18f)][_0x146be8(0x1bd)](_0x146be8(0x1cc)+_0x2b046e+_0x146be8(0x1af),{'body':_0xd9d473});return!_0x550662[_0x146be8(0x1b7)][_0x146be8(0x1ec)]||_0x550662[_0x146be8(0x1b7)]['error'][_0x146be8(0x1b6)]===0x1;}async[_0x14ef60(0x1a7)](_0xcfd029,_0x1c9d32,_0x65c5c0,_0x3ef9ed){const _0x3899af=_0x14ef60,_0xb7e7c1={'memberId':(await this[_0x3899af(0x200)][_0x3899af(0x1ca)](_0xcfd029))[_0x3899af(0x1e2)](),'threadId':_0x65c5c0,'replyId':_0x3ef9ed,'unitId':_0xcfd029},_0x2228dc=await this[_0x3899af(0x18f)][_0x3899af(0x1bd)](_0x3899af(0x1cc)+_0xcfd029+_0x3899af(0x18b),{'body':_0xb7e7c1});return!_0x2228dc['body']['error']||_0x2228dc['body'][_0x3899af(0x1ec)][_0x3899af(0x1b6)]===0x1;}async[_0x14ef60(0x197)](_0x44713f,_0x589de8,_0x5c32e3){const _0x3a92c0=_0x14ef60,_0x9fb50={'unitId':_0x44713f,'threadId':_0x5c32e3},_0x46b595=await this[_0x3a92c0(0x18f)][_0x3a92c0(0x1bd)](_0x3a92c0(0x1cc)+_0x44713f+_0x3a92c0(0x1c0),{'body':_0x9fb50}),_0x5e10a9=_0x5c32e3[_0x3a92c0(0x1a3)](_0x596548=>_0x20e294(_0x46b595[_0x3a92c0(0x1b7)]['comments'][_0x596548],_0x44713f,_0x589de8))[_0x3a92c0(0x1d8)](Boolean);return Object[_0x3a92c0(0x192)](_0x46b595['body'][_0x3a92c0(0x1f4)])[_0x3a92c0(0x1ff)](_0x284fee=>{const _0x1cda60=_0x3a92c0;this[_0x1cda60(0x18a)][_0x1cda60(0x1dc)](_0x284fee);}),_0x5e10a9;}[_0x14ef60(0x1b0)](_0x58caa0){const _0xe572da=_0x14ef60;return{'id':_0x58caa0['id'],'threadId':_0x58caa0[_0xe572da(0x1ef)],'ref':_0x58caa0[_0xe572da(0x1f1)]};}};_0x1c2270=_0x57837b([_0xdf1a53(0x0,_0x20d5f0['Inject'](_0x20277a[_0x14ef60(0x1fb)])),_0xdf1a53(0x1,_0x20d5f0[_0x14ef60(0x185)](_0x20d5f0[_0x14ef60(0x1b2)])),_0xdf1a53(0x2,_0x20d5f0[_0x14ef60(0x185)](_0x504b97['CollaborationSessionService']))],_0x1c2270);var _0x37b86e=Object[_0x14ef60(0x1ea)],_0x2607f7=(_0x3d7bd0,_0x4d1fde,_0x1fb7a4,_0x5cc5e2)=>{const _0x2d5dea=_0x14ef60;for(var _0x44059d=_0x5cc5e2>0x1?void 0x0:_0x5cc5e2?_0x37b86e(_0x4d1fde,_0x1fb7a4):_0x4d1fde,_0x11d0e8=_0x3d7bd0[_0x2d5dea(0x1cb)]-0x1,_0x476ccd;_0x11d0e8>=0x0;_0x11d0e8--)(_0x476ccd=_0x3d7bd0[_0x11d0e8])&&(_0x44059d=_0x476ccd(_0x44059d)||_0x44059d);return _0x44059d;},_0x2b9720=(_0x424f39,_0x5cedb9)=>(_0x198c30,_0x17fc00)=>_0x5cedb9(_0x198c30,_0x17fc00,_0x424f39);let _0x3f708a=class extends _0x20d5f0[_0x14ef60(0x1f0)]{constructor(_0x343b7b,_0x2e581d){const _0x3894fd=_0x14ef60;super(),this[_0x3894fd(0x1f8)]=_0x343b7b,this[_0x3894fd(0x1e0)]=_0x2e581d,this[_0x3894fd(0x1c6)]();}['_initDataSource'](){const _0x161ddb=_0x14ef60;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x161ddb(0x1f8)][_0x161ddb(0x1a1)]=!0x1;}};_0x3f708a=_0x2607f7([_0x2b9720(0x0,_0x4f9e71['IThreadCommentDataSourceService']),_0x2b9720(0x1,_0x20d5f0[_0x14ef60(0x185)](_0x1c2270))],_0x3f708a);var _0x1e0353=Object[_0x14ef60(0x194)],_0x1bdad6=Object['getOwnPropertyDescriptor'],_0x38c663=(_0x382086,_0x92551d,_0x2776fe)=>_0x92551d in _0x382086?_0x1e0353(_0x382086,_0x92551d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2776fe}):_0x382086[_0x92551d]=_0x2776fe,_0x123923=(_0x4fd3d5,_0x2d3419,_0x1b9ac2,_0x52565f)=>{const _0x4b2c95=_0x14ef60;for(var _0x1d9973=_0x52565f>0x1?void 0x0:_0x52565f?_0x1bdad6(_0x2d3419,_0x1b9ac2):_0x2d3419,_0x2fe876=_0x4fd3d5[_0x4b2c95(0x1cb)]-0x1,_0x3fe16e;_0x2fe876>=0x0;_0x2fe876--)(_0x3fe16e=_0x4fd3d5[_0x2fe876])&&(_0x1d9973=_0x3fe16e(_0x1d9973)||_0x1d9973);return _0x1d9973;},_0x32ff6e=(_0x452a8b,_0x778e76)=>(_0x20e0aa,_0x5a638a)=>_0x778e76(_0x20e0aa,_0x5a638a,_0x452a8b),_0x35e4b7=(_0x205621,_0x49ee7b,_0x97dac5)=>_0x38c663(_0x205621,typeof _0x49ee7b!=_0x14ef60(0x1c4)?_0x49ee7b+'':_0x49ee7b,_0x97dac5);_0x535030[_0x14ef60(0x1d1)]=class extends _0x20d5f0[_0x14ef60(0x1f5)]{constructor(_0x3cfbfc=_0xd9a410,_0x1f125a,_0x12feac){const _0x1ac444=_0x14ef60;super(),this[_0x1ac444(0x1f6)]=_0x3cfbfc,this[_0x1ac444(0x1d9)]=_0x1f125a,this[_0x1ac444(0x18d)]=_0x12feac;const {..._0x2ae3ed}=_0x20d5f0[_0x1ac444(0x1fd)]({},_0xd9a410,this['_config']);this[_0x1ac444(0x18d)][_0x1ac444(0x1e3)](_0xb8d4e6,_0x2ae3ed);}[_0x14ef60(0x1f7)](){const _0x57ea92=_0x14ef60;[[_0x1c2270],[_0x3f708a],[_0x45c70f]][_0x57ea92(0x1ff)](_0x4219cf=>{const _0x4f756b=_0x57ea92;this[_0x4f756b(0x1d9)][_0x4f756b(0x1d2)](_0x4219cf);});}[_0x14ef60(0x18e)](){const _0x205d8b=_0x14ef60;this[_0x205d8b(0x1d9)][_0x205d8b(0x1e6)](_0x3f708a),this[_0x205d8b(0x1d9)][_0x205d8b(0x1e6)](_0x45c70f);}},_0x35e4b7(_0x535030['UniverThreadCommentDataSourcePlugin'],_0x14ef60(0x1fa),_0x3e569),_0x35e4b7(_0x535030[_0x14ef60(0x1d1)],_0x14ef60(0x1dd),_0x20d5f0[_0x14ef60(0x17f)][_0x14ef60(0x198)]),_0x535030['UniverThreadCommentDataSourcePlugin']=_0x123923([_0x20d5f0['DependentOn'](_0x4da799[_0x14ef60(0x1ed)],_0x504b97[_0x14ef60(0x1ce)],_0x51a395[_0x14ef60(0x1a6)]),_0x32ff6e(0x1,_0x20d5f0[_0x14ef60(0x185)](_0x20d5f0[_0x14ef60(0x1b1)])),_0x32ff6e(0x2,_0x20d5f0[_0x14ef60(0x1b4)])],_0x535030[_0x14ef60(0x1d1)]),Object[_0x14ef60(0x194)](_0x535030,Symbol[_0x14ef60(0x196)],{'value':'Module'});}));function _0x2a56(_0x3d97ff,_0x101063){const _0x3f33df=_0x3f33();return _0x2a56=function(_0x2a5600,_0x212b50){_0x2a5600=_0x2a5600-0x17c;let _0x1edeb0=_0x3f33df[_0x2a5600];return _0x1edeb0;},_0x2a56(_0x3d97ff,_0x101063);}function _0x3f33(){const _0x392c89=['/add','forEach','_sessionService','@univerjs/network','stringify','getComment','rangeId','2459433gpupJK','UniverInstanceType','rangeType','unitId','11BoFAcc','size','subscribe','Inject','UNRECOGNIZED','object','4524270aoXvpF','241550dxmafn','_userService','/delete','Solve','_configService','onReady','_httpService','@univerjs-pro/collaboration-client','/reply','values','CustomRangeType','defineProperty','getCurrentUser','toStringTag','listComments','UNIVER_UNKNOWN','format','solved','getUser','Reply','@univerjs/core','createTimestamp','OpenOrReOpen','Unknown','syncUpdateMutationToColla','2HoERio','map','UniverNetwork','resolved','UniverLicensePlugin','deleteComment','resolveComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','529422tqVsAm','802238uQbZEX','updateComment','Add','addComment','/solved','saveCommentToSnapshot','Injector','UserManagerService','CommentService','IConfigService','YYYY/MM/DD\x20HH:mm','code','body','comment','UniverThreadCommentUi','rxjs','UniverThreadComment','exports','post','_threadCommentModel','Edit','/list','Solved','replyId','@univerjs/thread-comment','symbol','disposeWithMe','_initDataSource','9272504PMaINo','28VBXvEb','COMMENT','requireSession','length','/universer-api/comment/unit/','9FEGuPY','UniverCollaborationClientPlugin','getUnit','parse','UniverThreadCommentDataSourcePlugin','add','Delete','UniverProLicense','root','replies','bufferTime','filter','_injector','_initUserSync','UniverCore','addUser','type','77zfuByI','commentUpdate$','_threadCommentDataSource','thread-comment-data-source.config','getMemberID','setConfig','userID','userId','get','23751708dhRdsE','/universer-api/user/list','parentId','getOwnPropertyDescriptor','@univerjs/thread-comment-ui','error','UniverThreadCommentUIPlugin','_commentService','threadId','Disposable','ref','@univerjs-pro/license','dayjs','users','Plugin','_config','onStarting','_threadCommentDataSourceService','_init','pluginName','HTTPService','delete','merge'];_0x3f33=function(){return _0x392c89;};return _0x3f33();}
1
+ (function(_0x3d29c9,_0x3aceba){const _0xdf231e=_0x779c,_0xff5e0c=_0x3d29c9();while(!![]){try{const _0x5434f1=parseInt(_0xdf231e(0x105))/0x1*(-parseInt(_0xdf231e(0xf6))/0x2)+parseInt(_0xdf231e(0xe6))/0x3*(-parseInt(_0xdf231e(0x120))/0x4)+parseInt(_0xdf231e(0xba))/0x5+parseInt(_0xdf231e(0xb9))/0x6*(-parseInt(_0xdf231e(0xab))/0x7)+-parseInt(_0xdf231e(0xb8))/0x8*(parseInt(_0xdf231e(0xcd))/0x9)+parseInt(_0xdf231e(0xc1))/0xa*(-parseInt(_0xdf231e(0xd3))/0xb)+parseInt(_0xdf231e(0x129))/0xc*(parseInt(_0xdf231e(0xff))/0xd);if(_0x5434f1===_0x3aceba)break;else _0xff5e0c['push'](_0xff5e0c['shift']());}catch(_0x2adf6d){_0xff5e0c['push'](_0xff5e0c['shift']());}}}(_0x1f48,0xd5149),function(_0x2f4a66,_0x19bcec){const _0x3e3d37=_0x779c;typeof exports=='object'&&typeof module<'u'?_0x19bcec(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x3e3d37(0xd6)&&define[_0x3e3d37(0xed)]?define(['exports',_0x3e3d37(0xe7),'@univerjs-pro/license',_0x3e3d37(0xdb),'@univerjs/thread-comment-ui','@univerjs/thread-comment','rxjs',_0x3e3d37(0xef)],_0x19bcec):(_0x2f4a66=typeof globalThis<'u'?globalThis:_0x2f4a66||self,_0x19bcec(_0x2f4a66[_0x3e3d37(0xd4)]={},_0x2f4a66[_0x3e3d37(0x108)],_0x2f4a66['UniverProLicense'],_0x2f4a66['UniverCore'],_0x2f4a66[_0x3e3d37(0xdc)],_0x2f4a66[_0x3e3d37(0x12a)],_0x2f4a66['rxjs'],_0x2f4a66[_0x3e3d37(0x124)]));}(this,function(_0x5243dd,_0x57866e,_0x5473a2,_0x534eba,_0x1a8000,_0x9f1156,_0x50231b,_0x3c27fd){'use strict';const _0x29560f=_0x779c;const _0x1bd9ca=_0x29560f(0x104);var _0x29d1d7=(_0x290b74=>(_0x290b74[_0x290b74['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x290b74[_0x290b74[_0x29560f(0x103)]=0x1]=_0x29560f(0x103),_0x290b74[_0x290b74[_0x29560f(0xaa)]=-0x1]=_0x29560f(0xaa),_0x290b74))(_0x29d1d7||{}),_0x774206=(_0x237ce5=>(_0x237ce5[_0x237ce5[_0x29560f(0x11b)]=0x0]=_0x29560f(0x11b),_0x237ce5[_0x237ce5['Add']=0x1]=_0x29560f(0x101),_0x237ce5[_0x237ce5['Reply']=0x2]='Reply',_0x237ce5[_0x237ce5['Edit']=0x3]=_0x29560f(0x121),_0x237ce5[_0x237ce5['Delete']=0x4]=_0x29560f(0xc0),_0x237ce5[_0x237ce5[_0x29560f(0xc5)]=0x5]=_0x29560f(0xc5),_0x237ce5[_0x237ce5[_0x29560f(0xaa)]=-0x1]='UNRECOGNIZED',_0x237ce5))(_0x774206||{});const _0x352bd5=_0x3f52a2=>_0x534eba[_0x29560f(0xb5)](new Date(+_0x3f52a2))[_0x29560f(0x11c)](_0x29560f(0xfd)),_0x1a3729=async(_0x1436c0,_0x42ce29)=>{const _0x487c45=_0x29560f,_0x304125=_0x1436c0[_0x487c45(0xf7)](_0x534eba[_0x487c45(0x107)]),_0x1246f9=_0x1436c0[_0x487c45(0xf7)](_0x3c27fd[_0x487c45(0x10e)]);_0x42ce29[_0x487c45(0xe2)](_0x55dab2=>{const _0x28e00b=_0x487c45;_0x304125['getUser'](_0x55dab2)&&_0x42ce29[_0x28e00b(0x10f)](_0x55dab2);}),_0x42ce29[_0x487c45(0x11f)]&&(await _0x1246f9[_0x487c45(0xf7)](_0x487c45(0xdd),{'params':{'userIDs':[..._0x42ce29]}}))['body'][_0x487c45(0xb2)][_0x487c45(0xe2)](_0x248c59=>{const _0x26a841=_0x487c45;_0x248c59&&_0x304125[_0x26a841(0xeb)](_0x248c59);});};var _0x436e63=Object[_0x29560f(0x110)],_0x54343d=(_0x5e9b8d,_0x2eca3a,_0x4204ab,_0x48afcb)=>{for(var _0x4d89b2=_0x48afcb>0x1?void 0x0:_0x48afcb?_0x436e63(_0x2eca3a,_0x4204ab):_0x2eca3a,_0x334472=_0x5e9b8d['length']-0x1,_0x33001a;_0x334472>=0x0;_0x334472--)(_0x33001a=_0x5e9b8d[_0x334472])&&(_0x4d89b2=_0x33001a(_0x4d89b2)||_0x4d89b2);return _0x4d89b2;},_0x5f3768=(_0x171269,_0x10491b)=>(_0x112199,_0x557828)=>_0x10491b(_0x112199,_0x557828,_0x171269);let _0x2e2e16=class extends _0x534eba[_0x29560f(0x11e)]{constructor(_0x422e79,_0x23e177,_0x223366,_0x4c4122){const _0x2b0e71=_0x29560f;super(),this[_0x2b0e71(0xe4)]=_0x422e79,this[_0x2b0e71(0x11a)]=_0x23e177,this['_userService']=_0x223366,this[_0x2b0e71(0xb1)]=_0x4c4122,this[_0x2b0e71(0x127)](),this[_0x2b0e71(0xcc)]();}[_0x29560f(0xcc)](){const _0x384d20=_0x29560f;this[_0x384d20(0xc9)](this[_0x384d20(0x11a)][_0x384d20(0xee)][_0x384d20(0x10a)](_0x50231b[_0x384d20(0xe1)](0x10))[_0x384d20(0xa9)](_0x32cd6b=>{const _0x160715=_0x384d20,_0xd2e16e=new Set();_0x32cd6b[_0x160715(0xe2)](_0x21cec5=>{const _0x568abd=_0x160715;switch(_0x21cec5[_0x568abd(0xd9)]){case'add':{const _0x4d168a=_0x21cec5[_0x568abd(0x118)][_0x568abd(0xd5)];_0xd2e16e['add'](_0x4d168a);break;}}}),_0x1a3729(this[_0x160715(0xb1)],_0xd2e16e);}));}[_0x29560f(0x127)](){const _0x352369=_0x29560f;this[_0x352369(0xc9)](this[_0x352369(0xe4)][_0x352369(0xee)][_0x352369(0xa9)](async _0x5d4577=>{const _0x2e7090=_0x352369;var _0x3163cf,_0x2c82e3,_0x58adc3,_0xf0256;const _0x53d98f=(_0x3163cf=this[_0x2e7090(0x11a)][_0x2e7090(0xd7)](_0x5d4577[_0x2e7090(0xe3)])[_0x2e7090(0xfa)](_0x21e020=>_0x21e020['threadId']===_0x5d4577[_0x2e7090(0xbe)]))==null?void 0x0:_0x3163cf[_0x2e7090(0x100)];if(!_0x53d98f)return;const {unitId:_0x33f4d6,subUnitId:_0x362716}=_0x53d98f;switch(_0x5d4577[_0x2e7090(0xe0)]&&this[_0x2e7090(0x111)][_0x2e7090(0xeb)](_0x5d4577[_0x2e7090(0xe0)]),_0x5d4577[_0x2e7090(0xd9)]){case _0x774206[_0x2e7090(0x101)]:break;case _0x774206[_0x2e7090(0xec)]:{this[_0x2e7090(0x11a)][_0x2e7090(0xe5)](_0x33f4d6,_0x362716,{'unitId':_0x33f4d6,'subUnitId':_0x362716,'ref':'','id':_0x5d4577[_0x2e7090(0xf0)],'dT':_0x352bd5(+_0x5d4577[_0x2e7090(0x116)]),'threadId':_0x5d4577[_0x2e7090(0xbe)],'personId':(_0x58adc3=(_0x2c82e3=_0x5d4577[_0x2e7090(0xe0)])==null?void 0x0:_0x2c82e3['userID'])!=null?_0x58adc3:_0x5d4577[_0x2e7090(0xe9)],'text':JSON['parse'](_0x5d4577['content']),'parentId':_0x53d98f['id']});break;}case _0x774206[_0x2e7090(0xc0)]:{const _0x11663a=this['_threadCommentModel']['getComment'](_0x33f4d6,_0x362716,_0x5d4577['replyId']);_0x11663a&&_0x11663a[_0x2e7090(0xbc)]&&this[_0x2e7090(0x11a)][_0x2e7090(0x122)](_0x33f4d6,_0x362716,_0x5d4577[_0x2e7090(0xf0)]);break;}case _0x774206[_0x2e7090(0x121)]:{this['_threadCommentModel'][_0x2e7090(0x119)](_0x33f4d6,_0x362716,{'commentId':_0x5d4577[_0x2e7090(0xf0)],'text':JSON[_0x2e7090(0xd1)](_0x5d4577[_0x2e7090(0xf5)])});break;}case _0x774206[_0x2e7090(0xc5)]:{const _0x57d724=(_0xf0256=this[_0x2e7090(0x11a)]['getUnit'](_0x5d4577[_0x2e7090(0xe3)])[_0x2e7090(0xfa)](_0x5f18c7=>_0x5f18c7[_0x2e7090(0xbe)]===_0x5d4577[_0x2e7090(0xbe)]))==null?void 0x0:_0xf0256[_0x2e7090(0x100)];_0x57d724&&this[_0x2e7090(0x11a)]['resolveComment'](_0x33f4d6,_0x362716,_0x57d724['id'],_0x5d4577['solved']===_0x29d1d7['Solved']);break;}}}));}};_0x2e2e16=_0x54343d([_0x5f3768(0x0,_0x534eba[_0x29560f(0xce)](_0x57866e[_0x29560f(0xae)])),_0x5f3768(0x1,_0x534eba[_0x29560f(0xce)](_0x9f1156['ThreadCommentModel'])),_0x5f3768(0x2,_0x534eba[_0x29560f(0xce)](_0x534eba[_0x29560f(0x107)])),_0x5f3768(0x3,_0x534eba[_0x29560f(0xce)](_0x534eba[_0x29560f(0xb7)]))],_0x2e2e16);const _0x2fb9b9='thread-comment-data-source.config',_0x4db5f3={};var _0x1944d9=Object[_0x29560f(0x110)],_0x22b0c0=(_0x2c27b1,_0x756492,_0x2e794a,_0x14cd2e)=>{const _0xc5b92b=_0x29560f;for(var _0x1e2eec=_0x14cd2e>0x1?void 0x0:_0x14cd2e?_0x1944d9(_0x756492,_0x2e794a):_0x756492,_0x28f474=_0x2c27b1[_0xc5b92b(0x102)]-0x1,_0x3ed690;_0x28f474>=0x0;_0x28f474--)(_0x3ed690=_0x2c27b1[_0x28f474])&&(_0x1e2eec=_0x3ed690(_0x1e2eec)||_0x1e2eec);return _0x1e2eec;},_0x1db0d7=(_0x387fa5,_0x77e376)=>(_0x172587,_0x246576)=>_0x77e376(_0x172587,_0x246576,_0x387fa5);function _0x2aa250(_0x5e7852,_0x55d587){const _0x338cae=_0x29560f,_0x55d388=_0x5e7852[_0x338cae(0xf1)][0x0];return{..._0x55d587,'id':_0x55d388[_0x338cae(0xf0)],'resolved':_0x5e7852['solved']===0x1,'dT':_0x352bd5(_0x55d388[_0x338cae(0x116)]),'personId':_0x55d388[_0x338cae(0xe9)],'threadId':_0x55d388[_0x338cae(0xbe)]};}function _0x20b6bf(_0x1c09a5,_0x231a01,_0x1848ff){const _0x436ec4=_0x29560f;var _0x2b6687,_0x4413b3;if(((_0x4413b3=(_0x2b6687=_0x1c09a5==null?void 0x0:_0x1c09a5[_0x436ec4(0xf1)])==null?void 0x0:_0x2b6687['length'])!=null?_0x4413b3:0x0)>0x0){const _0x4a5687=(_0x5c0821,_0x1dfa57)=>({'id':_0x5c0821[_0x436ec4(0xf0)],'threadId':_0x5c0821['threadId'],'dT':_0x352bd5(_0x5c0821['createTimestamp']),'personId':_0x5c0821['userId'],'resolved':_0x1c09a5[_0x436ec4(0x123)]===_0x29d1d7[_0x436ec4(0x103)],'unitId':_0x231a01,'subUnitId':_0x1848ff,'text':JSON[_0x436ec4(0xd1)](_0x5c0821[_0x436ec4(0xf5)]),'parentId':_0x1dfa57}),_0x192d30=_0x4a5687(_0x1c09a5[_0x436ec4(0xf1)][0x0]);return{..._0x192d30,'children':_0x1c09a5[_0x436ec4(0xf1)]['slice'](0x1)[_0x436ec4(0x114)](_0x5c46b7=>_0x4a5687(_0x5c46b7,_0x192d30['id']))};}return null;}let _0xa0207a=class{constructor(_0x2b1d5b,_0x4aa0ee,_0x12da8c){const _0x583a00=_0x29560f;this[_0x583a00(0xc8)]=_0x2b1d5b,this[_0x583a00(0x111)]=_0x4aa0ee,this[_0x583a00(0xc4)]=_0x12da8c;}async[_0x29560f(0xe5)](_0x15480f){const _0x188ac5=_0x29560f;var _0x1e2fc0,_0x25cc1e;const {parentId:_0x2b6142,unitId:_0x1a9fb7,text:_0x4abeee,threadId:_0x105a58}=_0x15480f,_0x2cdf86=(_0x25cc1e=(_0x1e2fc0=_0x4abeee['customRanges'])==null?void 0x0:_0x1e2fc0[_0x188ac5(0xf2)](_0x258e93=>_0x258e93[_0x188ac5(0xa7)]===_0x534eba['CustomRangeType'][_0x188ac5(0xde)])[_0x188ac5(0x114)](_0x45817a=>_0x45817a[_0x188ac5(0xf8)]))!=null?_0x25cc1e:[],_0x381c08=JSON[_0x188ac5(0x115)](_0x4abeee),_0x13aa25=(await this[_0x188ac5(0xc4)][_0x188ac5(0x109)](_0x1a9fb7))['getMemberID']();if(_0x2b6142){const _0x21e631={'memberId':_0x13aa25,'unitId':_0x1a9fb7,'content':_0x381c08,'mention':_0x2cdf86,'threadId':_0x105a58},_0x29ff43=(await this[_0x188ac5(0xc8)][_0x188ac5(0x10b)](_0x188ac5(0xc2)+_0x1a9fb7+'/reply',{'body':_0x21e631}))['body'][_0x188ac5(0x113)];return{..._0x15480f,'id':_0x29ff43['replyId'],'dT':_0x534eba['dayjs'](+_0x29ff43[_0x188ac5(0x116)])['format'](_0x188ac5(0xfd)),'personId':_0x29ff43[_0x188ac5(0xe9)]};}else{const _0x3c2d0a={'memberId':_0x13aa25,'unitId':_0x1a9fb7,'content':_0x381c08,'mention':_0x2cdf86},_0x18c05c=await this[_0x188ac5(0xc8)][_0x188ac5(0x10b)]('/universer-api/comment/unit/'+_0x1a9fb7+_0x188ac5(0xdf),{'body':_0x3c2d0a});return _0x2aa250(_0x18c05c[_0x188ac5(0xca)]['comment'],_0x15480f);}}async[_0x29560f(0x119)](_0x3bc4f2){const _0x33be60=_0x29560f;var _0x5a16f8,_0x47d31c;const {text:_0x169518,unitId:_0xde18d6}=_0x3bc4f2,_0x181922=(_0x47d31c=(_0x5a16f8=_0x169518[_0x33be60(0xb3)])==null?void 0x0:_0x5a16f8['filter'](_0x5846ef=>_0x5846ef[_0x33be60(0xa7)]===_0x534eba[_0x33be60(0x12b)][_0x33be60(0xde)])[_0x33be60(0x114)](_0x517a22=>_0x517a22['rangeId']))!=null?_0x47d31c:[],_0x311394=JSON[_0x33be60(0x115)](_0x169518),_0x182e8e=_0x3bc4f2['threadId'],_0x14c612=_0x3bc4f2['id'],_0x281a9a={'memberId':(await this[_0x33be60(0xc4)][_0x33be60(0x109)](_0xde18d6))[_0x33be60(0x117)](),'unitId':_0xde18d6,'threadId':_0x182e8e,'mention':_0x181922,'content':_0x311394,'replyId':_0x14c612},_0x3d3780=await this[_0x33be60(0xc8)]['post'](_0x33be60(0xc2)+_0xde18d6+_0x33be60(0xd0),{'body':_0x281a9a});return!_0x3d3780['body'][_0x33be60(0xbb)]||_0x3d3780[_0x33be60(0xca)][_0x33be60(0xbb)][_0x33be60(0xf3)]===0x1;}async[_0x29560f(0x126)](_0x46b17a){const _0x45ba2b=_0x29560f,{unitId:_0x3597e1}=_0x46b17a,_0x4370a2=_0x46b17a[_0x45ba2b(0xbe)],_0x4e1962={'memberId':this[_0x45ba2b(0x111)][_0x45ba2b(0xad)]()['userID'],'unitId':_0x3597e1,'threadId':_0x4370a2,'solved':_0x46b17a[_0x45ba2b(0xac)]?_0x29d1d7[_0x45ba2b(0x103)]:_0x29d1d7[_0x45ba2b(0xaf)]},_0x50eea0=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x3597e1+_0x45ba2b(0x112),{'body':_0x4e1962});return!_0x50eea0[_0x45ba2b(0xca)][_0x45ba2b(0xbb)]||_0x50eea0[_0x45ba2b(0xca)][_0x45ba2b(0xbb)][_0x45ba2b(0xf3)]===0x1;}async[_0x29560f(0x122)](_0x449b79,_0x228f0c,_0x5df298,_0x10fee4){const _0x3ae717=_0x29560f,_0x123211={'memberId':(await this['_sessionService']['requireSession'](_0x449b79))[_0x3ae717(0x117)](),'threadId':_0x5df298,'replyId':_0x10fee4,'unitId':_0x449b79},_0x4e93df=await this[_0x3ae717(0xc8)][_0x3ae717(0x10b)](_0x3ae717(0xc2)+_0x449b79+_0x3ae717(0xc7),{'body':_0x123211});return!_0x4e93df[_0x3ae717(0xca)][_0x3ae717(0xbb)]||_0x4e93df[_0x3ae717(0xca)][_0x3ae717(0xbb)][_0x3ae717(0xf3)]===0x1;}async['listComments'](_0x1aed1e,_0x351868,_0x3fd4c9){const _0x3d2725=_0x29560f,_0x5892e6={'unitId':_0x1aed1e,'threadId':_0x3fd4c9},_0x5d2259=await this[_0x3d2725(0xc8)]['post'](_0x3d2725(0xc2)+_0x1aed1e+'/list',{'body':_0x5892e6}),_0x4fef8d=_0x3fd4c9[_0x3d2725(0x114)](_0x5358e3=>_0x20b6bf(_0x5d2259['body'][_0x3d2725(0xfe)][_0x5358e3],_0x1aed1e,_0x351868))[_0x3d2725(0xf2)](Boolean);return Object[_0x3d2725(0x10c)](_0x5d2259['body'][_0x3d2725(0xb2)])[_0x3d2725(0xe2)](_0x4b5e90=>{const _0xfc4701=_0x3d2725;this[_0xfc4701(0x111)][_0xfc4701(0xeb)](_0x4b5e90);}),_0x4fef8d;}[_0x29560f(0xb0)](_0x3a4379){const _0xba88f1=_0x29560f;return{'id':_0x3a4379['id'],'threadId':_0x3a4379[_0xba88f1(0xbe)],'ref':_0x3a4379[_0xba88f1(0xfc)]};}};_0xa0207a=_0x22b0c0([_0x1db0d7(0x0,_0x534eba['Inject'](_0x3c27fd['HTTPService'])),_0x1db0d7(0x1,_0x534eba[_0x29560f(0xce)](_0x534eba[_0x29560f(0x107)])),_0x1db0d7(0x2,_0x534eba[_0x29560f(0xce)](_0x57866e[_0x29560f(0xf9)]))],_0xa0207a);var _0x22f630=Object['getOwnPropertyDescriptor'],_0xe04ed3=(_0x24edb3,_0x1912b7,_0x47a740,_0x5bac6b)=>{const _0x2ba8d4=_0x29560f;for(var _0x3e4644=_0x5bac6b>0x1?void 0x0:_0x5bac6b?_0x22f630(_0x1912b7,_0x47a740):_0x1912b7,_0x7171cb=_0x24edb3[_0x2ba8d4(0x102)]-0x1,_0x4b9500;_0x7171cb>=0x0;_0x7171cb--)(_0x4b9500=_0x24edb3[_0x7171cb])&&(_0x3e4644=_0x4b9500(_0x3e4644)||_0x3e4644);return _0x3e4644;},_0x4a30b9=(_0x2aa738,_0x5a2057)=>(_0x32eecb,_0x8eccc8)=>_0x5a2057(_0x32eecb,_0x8eccc8,_0x2aa738);let _0x9824f7=class extends _0x534eba[_0x29560f(0x11e)]{constructor(_0x5a2d99,_0x3f794b){const _0xb8ffb5=_0x29560f;super(),this['_threadCommentDataSourceService']=_0x5a2d99,this['_threadCommentDataSource']=_0x3f794b,this[_0xb8ffb5(0x125)]();}['_initDataSource'](){const _0x3061da=_0x29560f;this[_0x3061da(0xb4)]['dataSource']=this[_0x3061da(0x128)],this[_0x3061da(0xb4)]['syncUpdateMutationToColla']=!0x1;}};_0x9824f7=_0xe04ed3([_0x4a30b9(0x0,_0x9f1156['IThreadCommentDataSourceService']),_0x4a30b9(0x1,_0x534eba[_0x29560f(0xce)](_0xa0207a))],_0x9824f7);var _0xfd49c6=Object[_0x29560f(0xf4)],_0x55adcd=Object[_0x29560f(0x110)],_0x251c4a=(_0x1a7464,_0x4372b6,_0x3fd7eb)=>_0x4372b6 in _0x1a7464?_0xfd49c6(_0x1a7464,_0x4372b6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3fd7eb}):_0x1a7464[_0x4372b6]=_0x3fd7eb,_0x252366=(_0x1c4550,_0x292abb,_0xae7eca,_0xe17483)=>{const _0x45240a=_0x29560f;for(var _0x133c78=_0xe17483>0x1?void 0x0:_0xe17483?_0x55adcd(_0x292abb,_0xae7eca):_0x292abb,_0x43547b=_0x1c4550[_0x45240a(0x102)]-0x1,_0x36c8fa;_0x43547b>=0x0;_0x43547b--)(_0x36c8fa=_0x1c4550[_0x43547b])&&(_0x133c78=_0x36c8fa(_0x133c78)||_0x133c78);return _0x133c78;},_0x1e760b=(_0x228d18,_0x4072c5)=>(_0x1fc217,_0x2e6209)=>_0x4072c5(_0x1fc217,_0x2e6209,_0x228d18),_0xa6e0b2=(_0x297776,_0x287dcc,_0x1953c4)=>_0x251c4a(_0x297776,typeof _0x287dcc!=_0x29560f(0xd8)?_0x287dcc+'':_0x287dcc,_0x1953c4);_0x5243dd['UniverThreadCommentDataSourcePlugin']=class extends _0x534eba[_0x29560f(0xbf)]{constructor(_0xaf51d7=_0x4db5f3,_0x5c2758,_0x22fa21){const _0x255a95=_0x29560f;super(),this[_0x255a95(0xcb)]=_0xaf51d7,this[_0x255a95(0xb1)]=_0x5c2758,this[_0x255a95(0xc6)]=_0x22fa21;const {..._0x512692}=_0x534eba[_0x255a95(0xc3)]({},_0x4db5f3,this[_0x255a95(0xcb)]);this[_0x255a95(0xc6)]['setConfig'](_0x2fb9b9,_0x512692);}[_0x29560f(0xda)](){const _0x2dd43d=_0x29560f;[[_0xa0207a],[_0x9824f7],[_0x2e2e16]][_0x2dd43d(0xe2)](_0x3302aa=>{const _0x4810cb=_0x2dd43d;this[_0x4810cb(0xb1)][_0x4810cb(0xea)](_0x3302aa);});}[_0x29560f(0xfb)](){const _0x3b14b8=_0x29560f;this[_0x3b14b8(0xb1)][_0x3b14b8(0xf7)](_0x9824f7),this[_0x3b14b8(0xb1)]['get'](_0x2e2e16);}},_0xa6e0b2(_0x5243dd[_0x29560f(0xcf)],'pluginName',_0x1bd9ca),_0xa6e0b2(_0x5243dd['UniverThreadCommentDataSourcePlugin'],_0x29560f(0xd9),_0x534eba['UniverInstanceType'][_0x29560f(0xd2)]),_0x5243dd['UniverThreadCommentDataSourcePlugin']=_0x252366([_0x534eba[_0x29560f(0xa8)](_0x1a8000[_0x29560f(0x10d)],_0x57866e[_0x29560f(0x106)],_0x5473a2[_0x29560f(0xbd)]),_0x1e760b(0x1,_0x534eba['Inject'](_0x534eba[_0x29560f(0xb7)])),_0x1e760b(0x2,_0x534eba[_0x29560f(0xb6)])],_0x5243dd[_0x29560f(0xcf)]),Object[_0x29560f(0xf4)](_0x5243dd,Symbol[_0x29560f(0x11d)],{'value':_0x29560f(0xe8)});}));function _0x779c(_0x2a1b1c,_0xc7b3ef){const _0x1f480c=_0x1f48();return _0x779c=function(_0x779cc,_0x207d57){_0x779cc=_0x779cc-0xa7;let _0xadf0ca=_0x1f480c[_0x779cc];return _0xadf0ca;},_0x779c(_0x2a1b1c,_0xc7b3ef);}function _0x1f48(){const _0x305964=['user','bufferTime','forEach','unitId','_commentService','addComment','100452YSFwqp','@univerjs-pro/collaboration-client','Module','userId','add','addUser','Reply','amd','commentUpdate$','@univerjs/network','replyId','replies','filter','code','defineProperty','content','2CyVEqY','get','rangeId','CollaborationSessionService','find','onReady','ref','YYYY/MM/DD\x20HH:mm','comments','54055898TPGQNU','root','Add','length','Solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','1235499HVRFDi','UniverCollaborationClientPlugin','UserManagerService','UniverProCollaborationClient','requireSession','pipe','post','values','UniverThreadCommentUIPlugin','HTTPService','delete','getOwnPropertyDescriptor','_userService','/solved','reply','map','stringify','createTimestamp','getMemberID','payload','updateComment','_threadCommentModel','Unknown','format','toStringTag','Disposable','size','132vLZbRW','Edit','deleteComment','solved','UniverNetwork','_initDataSource','resolveComment','_init','_threadCommentDataSource','12BzWcsw','UniverThreadComment','CustomRangeType','rangeType','DependentOn','subscribe','UNRECOGNIZED','4998fyDmMx','resolved','getCurrentUser','CommentService','OpenOrReOpen','saveCommentToSnapshot','_injector','users','customRanges','_threadCommentDataSourceService','dayjs','IConfigService','Injector','2456392DRMDdQ','8328zfWqFK','4505905IjNlWw','error','parentId','UniverLicensePlugin','threadId','Plugin','Delete','230frarrg','/universer-api/comment/unit/','merge','_sessionService','Solve','_configService','/delete','_httpService','disposeWithMe','body','_config','_initUserSync','9PDvMpU','Inject','UniverThreadCommentDataSourcePlugin','/edit','parse','UNIVER_UNKNOWN','262086YefIct','UniverProThreadCommentDatasource','personId','function','getUnit','symbol','type','onStarting','@univerjs/core','UniverThreadCommentUi','/universer-api/user/list','COMMENT','/add'];_0x1f48=function(){return _0x305964;};return _0x1f48();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.12.0",
3
+ "version": "0.12.1-nightly.202511221011",
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.12.0",
49
- "@univerjs-pro/license": "0.12.0",
50
- "@univerjs/core": "0.12.0",
48
+ "@univerjs-pro/collaboration-client": "0.12.1-nightly.202511221011",
49
+ "@univerjs-pro/license": "0.12.1-nightly.202511221011",
50
+ "@univerjs/core": "0.12.1-nightly.202511221011",
51
+ "@univerjs/thread-comment": "0.12.1-nightly.202511221011",
52
+ "@univerjs/thread-comment-ui": "0.12.1-nightly.202511221011",
51
53
  "@univerjs/protocol": "0.1.47",
52
- "@univerjs/network": "0.12.0",
53
- "@univerjs/thread-comment": "0.12.0",
54
- "@univerjs/thread-comment-ui": "0.12.0"
54
+ "@univerjs/network": "0.12.1-nightly.202511221011"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
59
  "vite": "^7.2.2",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.12.0"
61
+ "@univerjs-infra/shared": "0.12.1"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",