@univerjs-pro/thread-comment-datasource 0.9.4 → 0.10.0-nightly.202507310307

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';function _0x161a(){const _0x396c16=['Module','getUnit','/universer-api/user/list','76QeXvsQ','getMemberID','/solved','_commentService','UniverThreadCommentUIPlugin','_userService','/delete','createTimestamp','syncUpdateMutationToColla','addComment','userId','updateComment','Solved','thread-comment-data-source.config','saveCommentToSnapshot','symbol','IConfigService','86218GrvNys','_config','parse','587322JFLxHr','replies','unitId','getUser','solved','subscribe','UniverInstanceType','Plugin','format','pluginName','payload','UniverCollaborationClientPlugin','defineProperty','toStringTag','post','filter','UniverLicensePlugin','parentId','UserManagerService','threadId','resolved','get','Disposable','bufferTime','/list','UniverThreadCommentDataSourcePlugin','DependentOn','COMMENT','map','values','HTTPService','CustomRangeType','IThreadCommentDataSourceService','_initDataSource','_threadCommentDataSource','546423jIQSHV','code','onReady','deleteComment','requireSession','_initUserSync','45feJDYl','add','forEach','353978NvHrrU','getComment','rangeType','userID','Injector','_threadCommentDataSourceService','UNIVER_UNKNOWN','rangeId','replyId','OpenOrReOpen','/universer-api/comment/unit/','1fOkwle','length','_injector','Add','error','_init','173440JnsrCI','330XzqxHD','content','/add','resolveComment','/reply','Reply','size','_threadCommentModel','body','merge','Edit','find','root','dayjs','Delete','addUser','getOwnPropertyDescriptor','Unknown','UNRECOGNIZED','_httpService','customRanges','user','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','56395IMAMil','commentUpdate$','disposeWithMe','listComments','217665yxKsAE','comment','comments','type','Inject','getCurrentUser','_sessionService','stringify'];_0x161a=function(){return _0x396c16;};return _0x161a();}const _0x45f004=_0x11a1;(function(_0x426e38,_0x5342ed){const _0x4a0224=_0x11a1,_0x4d3b0b=_0x426e38();while(!![]){try{const _0x42a89b=parseInt(_0x4a0224(0xbc))/0x1*(parseInt(_0x4a0224(0xb1))/0x2)+parseInt(_0x4a0224(0xa8))/0x3+-parseInt(_0x4a0224(0xeb))/0x4*(-parseInt(_0x4a0224(0xdc))/0x5)+-parseInt(_0x4a0224(0x85))/0x6+parseInt(_0x4a0224(0xe0))/0x7+-parseInt(_0x4a0224(0xc2))/0x8*(parseInt(_0x4a0224(0xae))/0x9)+-parseInt(_0x4a0224(0xc3))/0xa*(parseInt(_0x4a0224(0x82))/0xb);if(_0x42a89b===_0x5342ed)break;else _0x4d3b0b['push'](_0x4d3b0b['shift']());}catch(_0x245303){_0x4d3b0b['push'](_0x4d3b0b['shift']());}}}(_0x161a,0x22141));function _0x11a1(_0x344031,_0x1ae23e){const _0x161a2f=_0x161a();return _0x11a1=function(_0x11a159,_0x242ace){_0x11a159=_0x11a159-0x7b;let _0x8d27b7=_0x161a2f[_0x11a159];return _0x8d27b7;},_0x11a1(_0x344031,_0x1ae23e);}Object[_0x45f004(0x91)](exports,Symbol[_0x45f004(0x92)],{'value':_0x45f004(0xe8)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x45f004(0xda);var I=(_0x408f74=>(_0x408f74[_0x408f74[_0x45f004(0xba)]=0x0]=_0x45f004(0xba),_0x408f74[_0x408f74[_0x45f004(0x7d)]=0x1]=_0x45f004(0x7d),_0x408f74[_0x408f74[_0x45f004(0xd5)]=-0x1]=_0x45f004(0xd5),_0x408f74))(I||{}),v=(_0x44637e=>(_0x44637e[_0x44637e[_0x45f004(0xd4)]=0x0]=_0x45f004(0xd4),_0x44637e[_0x44637e[_0x45f004(0xbf)]=0x1]=_0x45f004(0xbf),_0x44637e[_0x44637e[_0x45f004(0xc8)]=0x2]=_0x45f004(0xc8),_0x44637e[_0x44637e[_0x45f004(0xcd)]=0x3]=_0x45f004(0xcd),_0x44637e[_0x44637e[_0x45f004(0xd1)]=0x4]='Delete',_0x44637e[_0x44637e['Solve']=0x5]=_0x45f004(0xd9),_0x44637e[_0x44637e[_0x45f004(0xd5)]=-0x1]='UNRECOGNIZED',_0x44637e))(v||{});const f=_0x52dc62=>c[_0x45f004(0xd0)](new Date(+_0x52dc62))[_0x45f004(0x8d)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x3b5a92,_0x30e8ed)=>{const _0x5530e3=_0x45f004,_0x5d4117=_0x3b5a92[_0x5530e3(0x9a)](c[_0x5530e3(0x97)]),_0x1e6e9f=_0x3b5a92[_0x5530e3(0x9a)](P[_0x5530e3(0xa3)]);_0x30e8ed['forEach'](_0x1ca309=>{const _0x27de68=_0x5530e3;_0x5d4117[_0x27de68(0x88)](_0x1ca309)&&_0x30e8ed['delete'](_0x1ca309);}),_0x30e8ed[_0x5530e3(0xc9)]&&(await _0x1e6e9f[_0x5530e3(0x9a)](_0x5530e3(0xea),{'params':{'userIDs':[..._0x30e8ed]}}))[_0x5530e3(0xcb)]['users'][_0x5530e3(0xb0)](_0x34e684=>{_0x34e684&&_0x5d4117['addUser'](_0x34e684);});};var $=Object[_0x45f004(0xd3)],E=(_0x466644,_0x577342,_0x49d696,_0x11ac6f)=>{const _0x52bdcb=_0x45f004;for(var _0x1c652c=_0x11ac6f>0x1?void 0x0:_0x11ac6f?$(_0x577342,_0x49d696):_0x577342,_0xd8bbef=_0x466644[_0x52bdcb(0xbd)]-0x1,_0x134a63;_0xd8bbef>=0x0;_0xd8bbef--)(_0x134a63=_0x466644[_0xd8bbef])&&(_0x1c652c=_0x134a63(_0x1c652c)||_0x1c652c);return _0x1c652c;},S=(_0x2c3a04,_0x57ddfb)=>(_0x14e24a,_0x544d67)=>_0x57ddfb(_0x14e24a,_0x544d67,_0x2c3a04);let p=class extends c[_0x45f004(0x9b)]{constructor(_0x1b6107,_0x143260,_0x43021c,_0x56d6f9){const _0x34feb2=_0x45f004;super(),this[_0x34feb2(0xee)]=_0x1b6107,this[_0x34feb2(0xca)]=_0x143260,this[_0x34feb2(0xf0)]=_0x43021c,this[_0x34feb2(0xbe)]=_0x56d6f9,this[_0x34feb2(0xc1)](),this[_0x34feb2(0xad)]();}[_0x45f004(0xad)](){const _0x4fbb3b=_0x45f004;this[_0x4fbb3b(0xde)](this[_0x4fbb3b(0xca)]['commentUpdate$']['pipe'](w[_0x4fbb3b(0x9c)](0x10))['subscribe'](_0x5cd6d9=>{const _0x2a90ab=_0x4fbb3b,_0x3f6805=new Set();_0x5cd6d9[_0x2a90ab(0xb0)](_0x386b45=>{const _0x1b1107=_0x2a90ab;switch(_0x386b45['type']){case _0x1b1107(0xaf):{const _0x38c2ef=_0x386b45[_0x1b1107(0x8f)]['personId'];_0x3f6805[_0x1b1107(0xaf)](_0x38c2ef);break;}}}),R(this[_0x2a90ab(0xbe)],_0x3f6805);}));}['_init'](){const _0x4874d6=_0x45f004;this[_0x4874d6(0xde)](this[_0x4874d6(0xee)][_0x4874d6(0xdd)][_0x4874d6(0x8a)](async _0x28488=>{const _0x3c5907=_0x4874d6;var _0x2348f9,_0x12466a,_0x10fee9,_0x164b19;const _0x3a8554=(_0x2348f9=this[_0x3c5907(0xca)][_0x3c5907(0xe9)](_0x28488['unitId'])[_0x3c5907(0xce)](_0x45a80d=>_0x45a80d['threadId']===_0x28488[_0x3c5907(0x98)]))==null?void 0x0:_0x2348f9[_0x3c5907(0xcf)];if(!_0x3a8554)return;const {unitId:_0x4386cb,subUnitId:_0x3fe8ad}=_0x3a8554;switch(_0x28488['user']&&this[_0x3c5907(0xf0)][_0x3c5907(0xd2)](_0x28488['user']),_0x28488[_0x3c5907(0xe3)]){case v['Add']:break;case v[_0x3c5907(0xc8)]:{this[_0x3c5907(0xca)][_0x3c5907(0xf4)](_0x4386cb,_0x3fe8ad,{'unitId':_0x4386cb,'subUnitId':_0x3fe8ad,'ref':'','id':_0x28488[_0x3c5907(0xb9)],'dT':f(+_0x28488[_0x3c5907(0xf2)]),'threadId':_0x28488[_0x3c5907(0x98)],'personId':(_0x10fee9=(_0x12466a=_0x28488[_0x3c5907(0xd8)])==null?void 0x0:_0x12466a['userID'])!=null?_0x10fee9:_0x28488[_0x3c5907(0x7b)],'text':JSON[_0x3c5907(0x84)](_0x28488[_0x3c5907(0xc4)]),'parentId':_0x3a8554['id']});break;}case v['Delete']:{const _0x16fb91=this[_0x3c5907(0xca)][_0x3c5907(0xb2)](_0x4386cb,_0x3fe8ad,_0x28488[_0x3c5907(0xb9)]);_0x16fb91&&_0x16fb91[_0x3c5907(0x96)]&&this['_threadCommentModel'][_0x3c5907(0xab)](_0x4386cb,_0x3fe8ad,_0x28488[_0x3c5907(0xb9)]);break;}case v[_0x3c5907(0xcd)]:{this[_0x3c5907(0xca)][_0x3c5907(0x7c)](_0x4386cb,_0x3fe8ad,{'commentId':_0x28488[_0x3c5907(0xb9)],'text':JSON['parse'](_0x28488[_0x3c5907(0xc4)])});break;}case v[_0x3c5907(0xd9)]:{const _0x291e34=(_0x164b19=this['_threadCommentModel'][_0x3c5907(0xe9)](_0x28488[_0x3c5907(0x87)])['find'](_0x2840c7=>_0x2840c7['threadId']===_0x28488['threadId']))==null?void 0x0:_0x164b19['root'];_0x291e34&&this[_0x3c5907(0xca)][_0x3c5907(0xc6)](_0x4386cb,_0x3fe8ad,_0x291e34['id'],_0x28488[_0x3c5907(0x89)]===I[_0x3c5907(0x7d)]);break;}}}));}};p=E([S(0x0,c[_0x45f004(0xe4)](b['CommentService'])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x45f004(0xe4)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x45f004(0xb5)]))],p);const q=_0x45f004(0x7e),D={};var A=Object[_0x45f004(0xd3)],x=(_0x2c2da9,_0x4c4d10,_0x5d78d3,_0x49f4e1)=>{const _0x32e890=_0x45f004;for(var _0x338b86=_0x49f4e1>0x1?void 0x0:_0x49f4e1?A(_0x4c4d10,_0x5d78d3):_0x4c4d10,_0x14909f=_0x2c2da9[_0x32e890(0xbd)]-0x1,_0x21e484;_0x14909f>=0x0;_0x14909f--)(_0x21e484=_0x2c2da9[_0x14909f])&&(_0x338b86=_0x21e484(_0x338b86)||_0x338b86);return _0x338b86;},_=(_0xc3b227,_0xddc7a2)=>(_0x455fdb,_0x10d649)=>_0xddc7a2(_0x455fdb,_0x10d649,_0xc3b227);function Y(_0x5b5fc2,_0x18cf83){const _0x10ddc6=_0x45f004,_0x2e1446=_0x5b5fc2[_0x10ddc6(0x86)][0x0];return{..._0x18cf83,'id':_0x2e1446[_0x10ddc6(0xb9)],'resolved':_0x5b5fc2[_0x10ddc6(0x89)]===0x1,'dT':f(_0x2e1446[_0x10ddc6(0xf2)]),'personId':_0x2e1446[_0x10ddc6(0x7b)],'threadId':_0x2e1446[_0x10ddc6(0x98)]};}function G(_0x25b3de,_0x10bfa2,_0x592d0f){const _0x5b5b12=_0x45f004;var _0xb4e3b1,_0x588c61;if(((_0x588c61=(_0xb4e3b1=_0x25b3de==null?void 0x0:_0x25b3de[_0x5b5b12(0x86)])==null?void 0x0:_0xb4e3b1['length'])!=null?_0x588c61:0x0)>0x0){const _0x42c4ed=(_0x33632b,_0x425921)=>({'id':_0x33632b[_0x5b5b12(0xb9)],'threadId':_0x33632b[_0x5b5b12(0x98)],'dT':f(_0x33632b[_0x5b5b12(0xf2)]),'personId':_0x33632b[_0x5b5b12(0x7b)],'resolved':_0x25b3de['solved']===I['Solved'],'unitId':_0x10bfa2,'subUnitId':_0x592d0f,'text':JSON['parse'](_0x33632b['content']),'parentId':_0x425921}),_0x2ebe19=_0x42c4ed(_0x25b3de[_0x5b5b12(0x86)][0x0]);return{..._0x2ebe19,'children':_0x25b3de['replies']['slice'](0x1)[_0x5b5b12(0xa1)](_0x20b1f6=>_0x42c4ed(_0x20b1f6,_0x2ebe19['id']))};}return null;}let g=class{constructor(_0x319ebb,_0x41dec7,_0x10b267,_0x1fa59b){const _0x1c14a0=_0x45f004;this[_0x1c14a0(0xd6)]=_0x319ebb,this['_userService']=_0x41dec7,this[_0x1c14a0(0xe6)]=_0x10b267,this[_0x1c14a0(0xbe)]=_0x1fa59b;}async[_0x45f004(0xf4)](_0x420e19){const _0x33fe8e=_0x45f004;var _0x147650,_0x39bc88;const {parentId:_0x123431,unitId:_0x404fcb,text:_0x54fda5,threadId:_0x3efc96}=_0x420e19,_0x144c40=(_0x39bc88=(_0x147650=_0x54fda5[_0x33fe8e(0xd7)])==null?void 0x0:_0x147650[_0x33fe8e(0x94)](_0x73ffbc=>_0x73ffbc['rangeType']===c['CustomRangeType'][_0x33fe8e(0xa0)])[_0x33fe8e(0xa1)](_0x3af34f=>_0x3af34f['rangeId']))!=null?_0x39bc88:[],_0x14b138=JSON[_0x33fe8e(0xe7)](_0x54fda5),_0xcff443=(await this[_0x33fe8e(0xe6)]['requireSession'](_0x404fcb))[_0x33fe8e(0xec)]();if(_0x123431){const _0x2c7397={'memberId':_0xcff443,'unitId':_0x404fcb,'content':_0x14b138,'mention':_0x144c40,'threadId':_0x3efc96},_0x2d5409=(await this[_0x33fe8e(0xd6)][_0x33fe8e(0x93)](_0x33fe8e(0xbb)+_0x404fcb+_0x33fe8e(0xc7),{'body':_0x2c7397}))[_0x33fe8e(0xcb)]['reply'];return{..._0x420e19,'id':_0x2d5409['replyId'],'dT':c[_0x33fe8e(0xd0)](+_0x2d5409[_0x33fe8e(0xf2)])[_0x33fe8e(0x8d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2d5409[_0x33fe8e(0x7b)]};}else{const _0x4c0541={'memberId':_0xcff443,'unitId':_0x404fcb,'content':_0x14b138,'mention':_0x144c40},_0x1e9726=await this[_0x33fe8e(0xd6)]['post'](_0x33fe8e(0xbb)+_0x404fcb+_0x33fe8e(0xc5),{'body':_0x4c0541});return Y(_0x1e9726[_0x33fe8e(0xcb)][_0x33fe8e(0xe1)],_0x420e19);}}async[_0x45f004(0x7c)](_0x4ec422){const _0x28498d=_0x45f004;var _0x47252a,_0xe56b3a;const {text:_0x2e2e1e,unitId:_0x21a944}=_0x4ec422,_0x3e433f=(_0xe56b3a=(_0x47252a=_0x2e2e1e['customRanges'])==null?void 0x0:_0x47252a[_0x28498d(0x94)](_0x2feefc=>_0x2feefc[_0x28498d(0xb3)]===c[_0x28498d(0xa4)]['COMMENT'])[_0x28498d(0xa1)](_0x17899f=>_0x17899f[_0x28498d(0xb8)]))!=null?_0xe56b3a:[],_0x187191=JSON['stringify'](_0x2e2e1e),_0x4e9969=_0x4ec422['threadId'],_0xdc7a90=_0x4ec422['id'],_0x9b3369={'memberId':(await this['_sessionService'][_0x28498d(0xac)](_0x21a944))[_0x28498d(0xec)](),'unitId':_0x21a944,'threadId':_0x4e9969,'mention':_0x3e433f,'content':_0x187191,'replyId':_0xdc7a90},_0x5aa58a=await this['_httpService']['post'](_0x28498d(0xbb)+_0x21a944+'/edit',{'body':_0x9b3369});return!_0x5aa58a[_0x28498d(0xcb)][_0x28498d(0xc0)]||_0x5aa58a[_0x28498d(0xcb)][_0x28498d(0xc0)][_0x28498d(0xa9)]===0x1;}async[_0x45f004(0xc6)](_0x29a8ec){const _0x4d3342=_0x45f004,{unitId:_0x36b580}=_0x29a8ec,_0x33932e=_0x29a8ec['threadId'],_0x5bc336={'memberId':this['_userService'][_0x4d3342(0xe5)]()[_0x4d3342(0xb4)],'unitId':_0x36b580,'threadId':_0x33932e,'solved':_0x29a8ec[_0x4d3342(0x99)]?I['Solved']:I[_0x4d3342(0xba)]},_0x27aa3f=await this['_httpService'][_0x4d3342(0x93)](_0x4d3342(0xbb)+_0x36b580+_0x4d3342(0xed),{'body':_0x5bc336});return!_0x27aa3f[_0x4d3342(0xcb)]['error']||_0x27aa3f[_0x4d3342(0xcb)]['error'][_0x4d3342(0xa9)]===0x1;}async[_0x45f004(0xab)](_0x21fae9,_0x2e880c,_0x4d5103,_0x4da26b){const _0xfbcf7f=_0x45f004,_0x3333ea={'memberId':(await this[_0xfbcf7f(0xe6)]['requireSession'](_0x21fae9))[_0xfbcf7f(0xec)](),'threadId':_0x4d5103,'replyId':_0x4da26b,'unitId':_0x21fae9},_0x124be7=await this[_0xfbcf7f(0xd6)][_0xfbcf7f(0x93)](_0xfbcf7f(0xbb)+_0x21fae9+_0xfbcf7f(0xf1),{'body':_0x3333ea});return!_0x124be7['body'][_0xfbcf7f(0xc0)]||_0x124be7[_0xfbcf7f(0xcb)]['error'][_0xfbcf7f(0xa9)]===0x1;}async[_0x45f004(0xdf)](_0x44b512,_0x7d40d9,_0x45a5d0){const _0xbfbd37=_0x45f004,_0x5e9819={'unitId':_0x44b512,'threadId':_0x45a5d0},_0x205e30=await this[_0xbfbd37(0xd6)][_0xbfbd37(0x93)](_0xbfbd37(0xbb)+_0x44b512+_0xbfbd37(0x9d),{'body':_0x5e9819}),_0x45374b=_0x45a5d0['map'](_0x47cd05=>G(_0x205e30[_0xbfbd37(0xcb)][_0xbfbd37(0xe2)][_0x47cd05],_0x44b512,_0x7d40d9))[_0xbfbd37(0x94)](Boolean);return Object[_0xbfbd37(0xa2)](_0x205e30[_0xbfbd37(0xcb)]['users'])[_0xbfbd37(0xb0)](_0x27d128=>{const _0x472d98=_0xbfbd37;this[_0x472d98(0xf0)][_0x472d98(0xd2)](_0x27d128);}),_0x45374b;}[_0x45f004(0x7f)](_0x5ae77){const _0x2aa8dd=_0x45f004;return{'id':_0x5ae77['id'],'threadId':_0x5ae77[_0x2aa8dd(0x98)],'ref':_0x5ae77['ref']};}};g=x([_(0x0,c[_0x45f004(0xe4)](P[_0x45f004(0xa3)])),_(0x1,c[_0x45f004(0xe4)](c[_0x45f004(0x97)])),_(0x2,c[_0x45f004(0xe4)](b['CollaborationSessionService'])),_(0x3,c[_0x45f004(0xe4)](c[_0x45f004(0xb5)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x216b7d,_0x5ed629,_0x8aa81d,_0x20d2b1)=>{const _0x6d5dd1=_0x45f004;for(var _0x167002=_0x20d2b1>0x1?void 0x0:_0x20d2b1?H(_0x5ed629,_0x8aa81d):_0x5ed629,_0x1a64a8=_0x216b7d[_0x6d5dd1(0xbd)]-0x1,_0x5a7c70;_0x1a64a8>=0x0;_0x1a64a8--)(_0x5a7c70=_0x216b7d[_0x1a64a8])&&(_0x167002=_0x5a7c70(_0x167002)||_0x167002);return _0x167002;},y=(_0x9846a8,_0x27ab5f)=>(_0x56c8dd,_0x5bd9c6)=>_0x27ab5f(_0x56c8dd,_0x5bd9c6,_0x9846a8);let C=class extends c[_0x45f004(0x9b)]{constructor(_0x14102a,_0x117b0c){const _0x5e9d47=_0x45f004;super(),this[_0x5e9d47(0xb6)]=_0x14102a,this[_0x5e9d47(0xa7)]=_0x117b0c,this[_0x5e9d47(0xa6)]();}[_0x45f004(0xa6)](){const _0x416390=_0x45f004;this[_0x416390(0xb6)]['dataSource']=this['_threadCommentDataSource'],this[_0x416390(0xb6)][_0x416390(0xf3)]=!0x1;}};C=J([y(0x0,M[_0x45f004(0xa5)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x45f004(0x91)],L=Object[_0x45f004(0xd3)],Z=(_0x11508b,_0x281916,_0x198f3b)=>_0x281916 in _0x11508b?F(_0x11508b,_0x281916,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x198f3b}):_0x11508b[_0x281916]=_0x198f3b,W=(_0x30b714,_0x3bd9a3,_0x584ff2,_0x4acd62)=>{const _0x423d81=_0x45f004;for(var _0x5abfde=_0x4acd62>0x1?void 0x0:_0x4acd62?L(_0x3bd9a3,_0x584ff2):_0x3bd9a3,_0x205bfb=_0x30b714[_0x423d81(0xbd)]-0x1,_0x4a5c8c;_0x205bfb>=0x0;_0x205bfb--)(_0x4a5c8c=_0x30b714[_0x205bfb])&&(_0x5abfde=_0x4a5c8c(_0x5abfde)||_0x5abfde);return _0x5abfde;},O=(_0x71d156,_0x2cdc90)=>(_0xa0b083,_0x45d4c1)=>_0x2cdc90(_0xa0b083,_0x45d4c1,_0x71d156),N=(_0x37eff9,_0x518455,_0x25f0ed)=>Z(_0x37eff9,typeof _0x518455!=_0x45f004(0x80)?_0x518455+'':_0x518455,_0x25f0ed);exports[_0x45f004(0x9e)]=class extends c[_0x45f004(0x8c)]{constructor(_0x1fcd64=D,_0x36f918,_0x515292){const _0x1a87b0=_0x45f004;super(),this[_0x1a87b0(0x83)]=_0x1fcd64,this['_injector']=_0x36f918,this['_configService']=_0x515292;const {..._0x5b32d3}=c[_0x1a87b0(0xcc)]({},D,this['_config']);this['_configService'][_0x1a87b0(0xdb)](q,_0x5b32d3);}['onStarting'](){const _0x230676=_0x45f004;[[g],[C],[p]][_0x230676(0xb0)](_0x5a86a6=>{const _0x99c7d=_0x230676;this[_0x99c7d(0xbe)]['add'](_0x5a86a6);});}[_0x45f004(0xaa)](){const _0x1bcf0e=_0x45f004;this['_injector'][_0x1bcf0e(0x9a)](C),this[_0x1bcf0e(0xbe)][_0x1bcf0e(0x9a)](p);}},N(exports[_0x45f004(0x9e)],_0x45f004(0x8e),U),N(exports[_0x45f004(0x9e)],_0x45f004(0xe3),c[_0x45f004(0x8b)][_0x45f004(0xb7)]),exports[_0x45f004(0x9e)]=W([c[_0x45f004(0x9f)](j[_0x45f004(0xef)],b[_0x45f004(0x90)],T[_0x45f004(0x95)]),O(0x1,c['Inject'](c[_0x45f004(0xb5)])),O(0x2,c[_0x45f004(0x81)])],exports[_0x45f004(0x9e)]);
1
+ 'use strict';const _0x3ef7ad=_0x1810;function _0x356e(){const _0x298e08=['Solved','_threadCommentDataSourceService','disposeWithMe','defineProperty','getUser','CollaborationSessionService','size','COMMENT','getMemberID','rangeId','subscribe','40xaEoRn','dataSource','customRanges','find','Unknown','Injector','Delete','OpenOrReOpen','rangeType','_commentService','IConfigService','HTTPService','reply','parentId','get','userID','personId','_config','dayjs','stringify','CustomRangeType','Reply','getCurrentUser','slice','resolveComment','replyId','users','toStringTag','Add','merge','syncUpdateMutationToColla','forEach','Solve','/reply','_initUserSync','/delete','_userService','UniverThreadCommentUIPlugin','add','map','DependentOn','_initDataSource','replies','5397898qOdkPc','filter','saveCommentToSnapshot','parse','payload','post','UniverThreadCommentDataSourcePlugin','listComments','Inject','/universer-api/user/list','deleteComment','comments','threadId','/solved','addUser','type','symbol','ref','root','onStarting','_init','getComment','/universer-api/comment/unit/','_sessionService','Disposable','/edit','4065xgJLuJ','ThreadCommentModel','441700zScEly','/add','addComment','pluginName','createTimestamp','UniverLicensePlugin','body','144ulwNcV','475208prvEVj','code','UserManagerService','1149224TXmxFS','solved','Edit','_httpService','unitId','getUnit','_configService','IThreadCommentDataSourceService','_injector','9IaVggK','delete','2853132FjBTeK','UNRECOGNIZED','2892aGVOZg','values','_threadCommentModel','getOwnPropertyDescriptor','userId','length','requireSession','error','pipe','updateComment','format','content','71085YQmICL'];_0x356e=function(){return _0x298e08;};return _0x356e();}(function(_0x19ae5a,_0x59f571){const _0x38fbbf=_0x1810,_0x58c749=_0x19ae5a();while(!![]){try{const _0x18ca86=parseInt(_0x38fbbf(0xe1))/0x1+-parseInt(_0x38fbbf(0xe9))/0x2+-parseInt(_0x38fbbf(0x80))/0x3+parseInt(_0x38fbbf(0x82))/0x4*(-parseInt(_0x38fbbf(0xdf))/0x5)+-parseInt(_0x38fbbf(0xe8))/0x6*(-parseInt(_0x38fbbf(0x8e))/0x7)+parseInt(_0x38fbbf(0x75))/0x8*(-parseInt(_0x38fbbf(0x7e))/0x9)+parseInt(_0x38fbbf(0x9a))/0xa*(parseInt(_0x38fbbf(0xc5))/0xb);if(_0x18ca86===_0x59f571)break;else _0x58c749['push'](_0x58c749['shift']());}catch(_0x2c3306){_0x58c749['push'](_0x58c749['shift']());}}}(_0x356e,0xb1c80));Object[_0x3ef7ad(0x92)](exports,Symbol[_0x3ef7ad(0xb5)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1b8fe7=>(_0x1b8fe7[_0x1b8fe7[_0x3ef7ad(0xa1)]=0x0]=_0x3ef7ad(0xa1),_0x1b8fe7[_0x1b8fe7['Solved']=0x1]=_0x3ef7ad(0x8f),_0x1b8fe7[_0x1b8fe7['UNRECOGNIZED']=-0x1]=_0x3ef7ad(0x81),_0x1b8fe7))(I||{}),v=(_0x46c568=>(_0x46c568[_0x46c568[_0x3ef7ad(0x9e)]=0x0]=_0x3ef7ad(0x9e),_0x46c568[_0x46c568[_0x3ef7ad(0xb6)]=0x1]=_0x3ef7ad(0xb6),_0x46c568[_0x46c568['Reply']=0x2]='Reply',_0x46c568[_0x46c568['Edit']=0x3]=_0x3ef7ad(0x77),_0x46c568[_0x46c568['Delete']=0x4]=_0x3ef7ad(0xa0),_0x46c568[_0x46c568[_0x3ef7ad(0xba)]=0x5]=_0x3ef7ad(0xba),_0x46c568[_0x46c568[_0x3ef7ad(0x81)]=-0x1]=_0x3ef7ad(0x81),_0x46c568))(v||{});const f=_0x1bc425=>c[_0x3ef7ad(0xac)](new Date(+_0x1bc425))[_0x3ef7ad(0x8c)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x10e1aa,_0xa7ed71)=>{const _0x33a7ba=_0x3ef7ad,_0x4281a9=_0x10e1aa[_0x33a7ba(0xa8)](c['UserManagerService']),_0x282597=_0x10e1aa[_0x33a7ba(0xa8)](P[_0x33a7ba(0xa5)]);_0xa7ed71[_0x33a7ba(0xb9)](_0x46c5b3=>{const _0x5128d7=_0x33a7ba;_0x4281a9[_0x5128d7(0x93)](_0x46c5b3)&&_0xa7ed71[_0x5128d7(0x7f)](_0x46c5b3);}),_0xa7ed71[_0x33a7ba(0x95)]&&(await _0x282597[_0x33a7ba(0xa8)](_0x33a7ba(0xce),{'params':{'userIDs':[..._0xa7ed71]}}))['body'][_0x33a7ba(0xb4)]['forEach'](_0x71b86b=>{_0x71b86b&&_0x4281a9['addUser'](_0x71b86b);});};var $=Object[_0x3ef7ad(0x85)],E=(_0x303c66,_0x5786dd,_0x39a38b,_0x3d2ccb)=>{const _0x239471=_0x3ef7ad;for(var _0x4f7aff=_0x3d2ccb>0x1?void 0x0:_0x3d2ccb?$(_0x5786dd,_0x39a38b):_0x5786dd,_0x258cae=_0x303c66[_0x239471(0x87)]-0x1,_0x221a5b;_0x258cae>=0x0;_0x258cae--)(_0x221a5b=_0x303c66[_0x258cae])&&(_0x4f7aff=_0x221a5b(_0x4f7aff)||_0x4f7aff);return _0x4f7aff;},S=(_0x49b3dd,_0xda6c42)=>(_0x3c57d0,_0xd07097)=>_0xda6c42(_0x3c57d0,_0xd07097,_0x49b3dd);let _=class extends c[_0x3ef7ad(0xdd)]{constructor(_0x1912e4,_0x555aa8,_0x31ad8c,_0x56359d){const _0x3b4fa0=_0x3ef7ad;super(),this[_0x3b4fa0(0xa3)]=_0x1912e4,this[_0x3b4fa0(0x84)]=_0x555aa8,this[_0x3b4fa0(0xbe)]=_0x31ad8c,this[_0x3b4fa0(0x7d)]=_0x56359d,this[_0x3b4fa0(0xd9)](),this[_0x3b4fa0(0xbc)]();}[_0x3ef7ad(0xbc)](){const _0x5ab135=_0x3ef7ad;this[_0x5ab135(0x91)](this[_0x5ab135(0x84)]['commentUpdate$'][_0x5ab135(0x8a)](j['bufferTime'](0x10))[_0x5ab135(0x99)](_0x24452a=>{const _0x2976e0=_0x5ab135,_0x1f31bd=new Set();_0x24452a[_0x2976e0(0xb9)](_0x37fa2b=>{const _0x232b4c=_0x2976e0;switch(_0x37fa2b[_0x232b4c(0xd4)]){case _0x232b4c(0xc0):{const _0x31166d=_0x37fa2b[_0x232b4c(0xc9)][_0x232b4c(0xaa)];_0x1f31bd[_0x232b4c(0xc0)](_0x31166d);break;}}}),R(this[_0x2976e0(0x7d)],_0x1f31bd);}));}[_0x3ef7ad(0xd9)](){const _0x1ec1f9=_0x3ef7ad;this[_0x1ec1f9(0x91)](this['_commentService']['commentUpdate$'][_0x1ec1f9(0x99)](async _0x561abd=>{const _0x4cc5d6=_0x1ec1f9;var _0x23c562,_0x3dbeb3,_0x83ddf7,_0x3a5eaf;const _0xd0712b=(_0x23c562=this['_threadCommentModel'][_0x4cc5d6(0x7a)](_0x561abd[_0x4cc5d6(0x79)])[_0x4cc5d6(0x9d)](_0x30f0a8=>_0x30f0a8['threadId']===_0x561abd[_0x4cc5d6(0xd1)]))==null?void 0x0:_0x23c562[_0x4cc5d6(0xd7)];if(!_0xd0712b)return;const {unitId:_0x10ecc2,subUnitId:_0x54574e}=_0xd0712b;switch(_0x561abd['user']&&this['_userService'][_0x4cc5d6(0xd3)](_0x561abd['user']),_0x561abd['type']){case v[_0x4cc5d6(0xb6)]:break;case v[_0x4cc5d6(0xaf)]:{this['_threadCommentModel'][_0x4cc5d6(0xe3)](_0x10ecc2,_0x54574e,{'unitId':_0x10ecc2,'subUnitId':_0x54574e,'ref':'','id':_0x561abd[_0x4cc5d6(0xb3)],'dT':f(+_0x561abd['createTimestamp']),'threadId':_0x561abd[_0x4cc5d6(0xd1)],'personId':(_0x83ddf7=(_0x3dbeb3=_0x561abd['user'])==null?void 0x0:_0x3dbeb3[_0x4cc5d6(0xa9)])!=null?_0x83ddf7:_0x561abd['userId'],'text':JSON['parse'](_0x561abd['content']),'parentId':_0xd0712b['id']});break;}case v[_0x4cc5d6(0xa0)]:{const _0x2e28f9=this[_0x4cc5d6(0x84)][_0x4cc5d6(0xda)](_0x10ecc2,_0x54574e,_0x561abd['replyId']);_0x2e28f9&&_0x2e28f9[_0x4cc5d6(0xa7)]&&this[_0x4cc5d6(0x84)][_0x4cc5d6(0xcf)](_0x10ecc2,_0x54574e,_0x561abd[_0x4cc5d6(0xb3)]);break;}case v[_0x4cc5d6(0x77)]:{this[_0x4cc5d6(0x84)]['updateComment'](_0x10ecc2,_0x54574e,{'commentId':_0x561abd[_0x4cc5d6(0xb3)],'text':JSON[_0x4cc5d6(0xc8)](_0x561abd['content'])});break;}case v['Solve']:{const _0x2adfd8=(_0x3a5eaf=this[_0x4cc5d6(0x84)][_0x4cc5d6(0x7a)](_0x561abd[_0x4cc5d6(0x79)])[_0x4cc5d6(0x9d)](_0x30b9d4=>_0x30b9d4[_0x4cc5d6(0xd1)]===_0x561abd[_0x4cc5d6(0xd1)]))==null?void 0x0:_0x3a5eaf[_0x4cc5d6(0xd7)];_0x2adfd8&&this[_0x4cc5d6(0x84)][_0x4cc5d6(0xb2)](_0x10ecc2,_0x54574e,_0x2adfd8['id'],_0x561abd[_0x4cc5d6(0x76)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x3ef7ad(0xcd)](b['CommentService'])),S(0x1,c['Inject'](M[_0x3ef7ad(0xe0)])),S(0x2,c[_0x3ef7ad(0xcd)](c[_0x3ef7ad(0x74)])),S(0x3,c[_0x3ef7ad(0xcd)](c[_0x3ef7ad(0x9f)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x3ef7ad(0x85)],x=(_0x749cbb,_0x17af7b,_0x1f9e3e,_0x3f894b)=>{for(var _0x3def08=_0x3f894b>0x1?void 0x0:_0x3f894b?A(_0x17af7b,_0x1f9e3e):_0x17af7b,_0x112c85=_0x749cbb['length']-0x1,_0x15c1de;_0x112c85>=0x0;_0x112c85--)(_0x15c1de=_0x749cbb[_0x112c85])&&(_0x3def08=_0x15c1de(_0x3def08)||_0x3def08);return _0x3def08;},C=(_0x2c1b9f,_0x3f7cd3)=>(_0x50f944,_0x20c917)=>_0x3f7cd3(_0x50f944,_0x20c917,_0x2c1b9f);function Y(_0x541646,_0x4b1072){const _0x1a8b9b=_0x3ef7ad,_0x25fa24=_0x541646[_0x1a8b9b(0xc4)][0x0];return{..._0x4b1072,'id':_0x25fa24[_0x1a8b9b(0xb3)],'resolved':_0x541646['solved']===0x1,'dT':f(_0x25fa24[_0x1a8b9b(0xe5)]),'personId':_0x25fa24['userId'],'threadId':_0x25fa24['threadId']};}function G(_0x2b4b33,_0x6d47f5,_0x356e82){const _0x53f6e0=_0x3ef7ad;var _0x463e50,_0x252538;if(((_0x252538=(_0x463e50=_0x2b4b33==null?void 0x0:_0x2b4b33['replies'])==null?void 0x0:_0x463e50[_0x53f6e0(0x87)])!=null?_0x252538:0x0)>0x0){const _0x3432a9=(_0x547114,_0x30d137)=>({'id':_0x547114[_0x53f6e0(0xb3)],'threadId':_0x547114[_0x53f6e0(0xd1)],'dT':f(_0x547114[_0x53f6e0(0xe5)]),'personId':_0x547114[_0x53f6e0(0x86)],'resolved':_0x2b4b33[_0x53f6e0(0x76)]===I[_0x53f6e0(0x8f)],'unitId':_0x6d47f5,'subUnitId':_0x356e82,'text':JSON[_0x53f6e0(0xc8)](_0x547114[_0x53f6e0(0x8d)]),'parentId':_0x30d137}),_0x2f9887=_0x3432a9(_0x2b4b33[_0x53f6e0(0xc4)][0x0]);return{..._0x2f9887,'children':_0x2b4b33[_0x53f6e0(0xc4)][_0x53f6e0(0xb1)](0x1)[_0x53f6e0(0xc1)](_0x3f6fb3=>_0x3432a9(_0x3f6fb3,_0x2f9887['id']))};}return null;}let p=class{constructor(_0x30b065,_0x2a6f2c,_0x407050){const _0x43bb17=_0x3ef7ad;this[_0x43bb17(0x78)]=_0x30b065,this[_0x43bb17(0xbe)]=_0x2a6f2c,this[_0x43bb17(0xdc)]=_0x407050;}async[_0x3ef7ad(0xe3)](_0x594a88){const _0x26af6d=_0x3ef7ad;var _0x52fd5a,_0x6baf97;const {parentId:_0x10a72f,unitId:_0x2fa69,text:_0x32e815,threadId:_0x37bb9c}=_0x594a88,_0x586034=(_0x6baf97=(_0x52fd5a=_0x32e815[_0x26af6d(0x9c)])==null?void 0x0:_0x52fd5a[_0x26af6d(0xc6)](_0x191f33=>_0x191f33[_0x26af6d(0xa2)]===c[_0x26af6d(0xae)][_0x26af6d(0x96)])[_0x26af6d(0xc1)](_0x4f5f2f=>_0x4f5f2f[_0x26af6d(0x98)]))!=null?_0x6baf97:[],_0x4e092c=JSON['stringify'](_0x32e815),_0x1253ed=(await this[_0x26af6d(0xdc)][_0x26af6d(0x88)](_0x2fa69))[_0x26af6d(0x97)]();if(_0x10a72f){const _0x6bcd95={'memberId':_0x1253ed,'unitId':_0x2fa69,'content':_0x4e092c,'mention':_0x586034,'threadId':_0x37bb9c},_0x2ea588=(await this['_httpService'][_0x26af6d(0xca)]('/universer-api/comment/unit/'+_0x2fa69+_0x26af6d(0xbb),{'body':_0x6bcd95}))['body'][_0x26af6d(0xa6)];return{..._0x594a88,'id':_0x2ea588[_0x26af6d(0xb3)],'dT':c[_0x26af6d(0xac)](+_0x2ea588[_0x26af6d(0xe5)])[_0x26af6d(0x8c)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2ea588[_0x26af6d(0x86)]};}else{const _0x284764={'memberId':_0x1253ed,'unitId':_0x2fa69,'content':_0x4e092c,'mention':_0x586034},_0x27fd69=await this[_0x26af6d(0x78)][_0x26af6d(0xca)]('/universer-api/comment/unit/'+_0x2fa69+_0x26af6d(0xe2),{'body':_0x284764});return Y(_0x27fd69[_0x26af6d(0xe7)]['comment'],_0x594a88);}}async[_0x3ef7ad(0x8b)](_0x45240b){const _0x3b2364=_0x3ef7ad;var _0x9df5e2,_0x54cb8e;const {text:_0x165d1f,unitId:_0x499815}=_0x45240b,_0x25da36=(_0x54cb8e=(_0x9df5e2=_0x165d1f[_0x3b2364(0x9c)])==null?void 0x0:_0x9df5e2[_0x3b2364(0xc6)](_0x288abe=>_0x288abe['rangeType']===c['CustomRangeType'][_0x3b2364(0x96)])['map'](_0x4105d3=>_0x4105d3[_0x3b2364(0x98)]))!=null?_0x54cb8e:[],_0x20be9c=JSON[_0x3b2364(0xad)](_0x165d1f),_0x17945a=_0x45240b['threadId'],_0x2e722e=_0x45240b['id'],_0x51e836={'memberId':(await this[_0x3b2364(0xdc)][_0x3b2364(0x88)](_0x499815))[_0x3b2364(0x97)](),'unitId':_0x499815,'threadId':_0x17945a,'mention':_0x25da36,'content':_0x20be9c,'replyId':_0x2e722e},_0x25a807=await this[_0x3b2364(0x78)]['post']('/universer-api/comment/unit/'+_0x499815+_0x3b2364(0xde),{'body':_0x51e836});return!_0x25a807[_0x3b2364(0xe7)]['error']||_0x25a807[_0x3b2364(0xe7)]['error']['code']===0x1;}async[_0x3ef7ad(0xb2)](_0x516845){const _0x505a4d=_0x3ef7ad,{unitId:_0xd7c5c9}=_0x516845,_0x8e4c47=_0x516845['threadId'],_0x1f889e={'memberId':this[_0x505a4d(0xbe)][_0x505a4d(0xb0)]()['userID'],'unitId':_0xd7c5c9,'threadId':_0x8e4c47,'solved':_0x516845['resolved']?I['Solved']:I[_0x505a4d(0xa1)]},_0x31253b=await this[_0x505a4d(0x78)][_0x505a4d(0xca)]('/universer-api/comment/unit/'+_0xd7c5c9+_0x505a4d(0xd2),{'body':_0x1f889e});return!_0x31253b[_0x505a4d(0xe7)][_0x505a4d(0x89)]||_0x31253b['body'][_0x505a4d(0x89)][_0x505a4d(0xea)]===0x1;}async['deleteComment'](_0x3199c2,_0xf1fd63,_0x5ee6d4,_0x190432){const _0x5e00ee=_0x3ef7ad,_0x2cc18e={'memberId':(await this[_0x5e00ee(0xdc)]['requireSession'](_0x3199c2))[_0x5e00ee(0x97)](),'threadId':_0x5ee6d4,'replyId':_0x190432,'unitId':_0x3199c2},_0xc6d40e=await this[_0x5e00ee(0x78)][_0x5e00ee(0xca)](_0x5e00ee(0xdb)+_0x3199c2+_0x5e00ee(0xbd),{'body':_0x2cc18e});return!_0xc6d40e[_0x5e00ee(0xe7)][_0x5e00ee(0x89)]||_0xc6d40e['body']['error'][_0x5e00ee(0xea)]===0x1;}async[_0x3ef7ad(0xcc)](_0x53a07b,_0x54d2c7,_0x231863){const _0x17ef7e=_0x3ef7ad,_0x3d64e2={'unitId':_0x53a07b,'threadId':_0x231863},_0x1396fa=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x53a07b+'/list',{'body':_0x3d64e2}),_0x57880a=_0x231863['map'](_0xd195c6=>G(_0x1396fa['body'][_0x17ef7e(0xd0)][_0xd195c6],_0x53a07b,_0x54d2c7))['filter'](Boolean);return Object[_0x17ef7e(0x83)](_0x1396fa[_0x17ef7e(0xe7)][_0x17ef7e(0xb4)])[_0x17ef7e(0xb9)](_0x485004=>{const _0x5b94d5=_0x17ef7e;this[_0x5b94d5(0xbe)][_0x5b94d5(0xd3)](_0x485004);}),_0x57880a;}[_0x3ef7ad(0xc7)](_0x2fae8e){const _0x9efcc6=_0x3ef7ad;return{'id':_0x2fae8e['id'],'threadId':_0x2fae8e[_0x9efcc6(0xd1)],'ref':_0x2fae8e[_0x9efcc6(0xd6)]};}};function _0x1810(_0x4f3283,_0xae002){const _0x356e89=_0x356e();return _0x1810=function(_0x181034,_0xee880c){_0x181034=_0x181034-0x74;let _0x2f7552=_0x356e89[_0x181034];return _0x2f7552;},_0x1810(_0x4f3283,_0xae002);}p=x([C(0x0,c[_0x3ef7ad(0xcd)](P['HTTPService'])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c['Inject'](b[_0x3ef7ad(0x94)]))],p);var H=Object[_0x3ef7ad(0x85)],J=(_0x47d3cf,_0x4e912d,_0x12b446,_0x4f39b8)=>{for(var _0x3b9688=_0x4f39b8>0x1?void 0x0:_0x4f39b8?H(_0x4e912d,_0x12b446):_0x4e912d,_0x5a1c4c=_0x47d3cf['length']-0x1,_0x291296;_0x5a1c4c>=0x0;_0x5a1c4c--)(_0x291296=_0x47d3cf[_0x5a1c4c])&&(_0x3b9688=_0x291296(_0x3b9688)||_0x3b9688);return _0x3b9688;},y=(_0x341554,_0x495648)=>(_0x250d21,_0x25f3e5)=>_0x495648(_0x250d21,_0x25f3e5,_0x341554);let g=class extends c[_0x3ef7ad(0xdd)]{constructor(_0x403dad,_0x537844){const _0x27d553=_0x3ef7ad;super(),this['_threadCommentDataSourceService']=_0x403dad,this['_threadCommentDataSource']=_0x537844,this[_0x27d553(0xc3)]();}[_0x3ef7ad(0xc3)](){const _0x397f81=_0x3ef7ad;this[_0x397f81(0x90)][_0x397f81(0x9b)]=this['_threadCommentDataSource'],this[_0x397f81(0x90)][_0x397f81(0xb8)]=!0x1;}};g=J([y(0x0,M[_0x3ef7ad(0x7c)]),y(0x1,c[_0x3ef7ad(0xcd)](p))],g);var F=Object[_0x3ef7ad(0x92)],L=Object[_0x3ef7ad(0x85)],Z=(_0x996038,_0x481729,_0x33b8c0)=>_0x481729 in _0x996038?F(_0x996038,_0x481729,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x33b8c0}):_0x996038[_0x481729]=_0x33b8c0,W=(_0x343053,_0x509f03,_0x9c6431,_0x4263a3)=>{const _0x41e7b5=_0x3ef7ad;for(var _0x47bca6=_0x4263a3>0x1?void 0x0:_0x4263a3?L(_0x509f03,_0x9c6431):_0x509f03,_0xb5b212=_0x343053[_0x41e7b5(0x87)]-0x1,_0x5a4e8c;_0xb5b212>=0x0;_0xb5b212--)(_0x5a4e8c=_0x343053[_0xb5b212])&&(_0x47bca6=_0x5a4e8c(_0x47bca6)||_0x47bca6);return _0x47bca6;},O=(_0x22dd5d,_0x38b3dc)=>(_0x61a21f,_0x796135)=>_0x38b3dc(_0x61a21f,_0x796135,_0x22dd5d),N=(_0x52511d,_0x2317b7,_0x3ba2f3)=>Z(_0x52511d,typeof _0x2317b7!=_0x3ef7ad(0xd5)?_0x2317b7+'':_0x2317b7,_0x3ba2f3);exports[_0x3ef7ad(0xcb)]=class extends c['Plugin']{constructor(_0x431f48=D,_0x507c22,_0x670c30){const _0x3ec25d=_0x3ef7ad;super(),this[_0x3ec25d(0xab)]=_0x431f48,this[_0x3ec25d(0x7d)]=_0x507c22,this[_0x3ec25d(0x7b)]=_0x670c30;const {..._0x43ab56}=c[_0x3ec25d(0xb7)]({},D,this['_config']);this[_0x3ec25d(0x7b)]['setConfig'](q,_0x43ab56);}[_0x3ef7ad(0xd8)](){const _0x54b030=_0x3ef7ad;[[p],[g],[_]][_0x54b030(0xb9)](_0x5592e7=>{const _0x4b9616=_0x54b030;this['_injector'][_0x4b9616(0xc0)](_0x5592e7);});}['onReady'](){const _0x127db1=_0x3ef7ad;this[_0x127db1(0x7d)]['get'](g),this[_0x127db1(0x7d)][_0x127db1(0xa8)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x3ef7ad(0xe4),U),N(exports[_0x3ef7ad(0xcb)],_0x3ef7ad(0xd4),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3ef7ad(0xc2)](w[_0x3ef7ad(0xbf)],b['UniverCollaborationClientPlugin'],T[_0x3ef7ad(0xe6)]),O(0x1,c[_0x3ef7ad(0xcd)](c[_0x3ef7ad(0x9f)])),O(0x2,c[_0x3ef7ad(0xa4)])],exports[_0x3ef7ad(0xcb)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3d57(_0xe4c055,_0x47fc09){const _0x3533da=_0x3533();return _0x3d57=function(_0x3d5730,_0x3a8d47){_0x3d5730=_0x3d5730-0x7e;let _0x583c03=_0x3533da[_0x3d5730];return _0x583c03;},_0x3d57(_0xe4c055,_0x47fc09);}const _0x39886c=_0x3d57;(function(_0x378dfa,_0x155e36){const _0x4ff5cd=_0x3d57,_0x51cecd=_0x378dfa();while(!![]){try{const _0x88934c=-parseInt(_0x4ff5cd(0xb3))/0x1+parseInt(_0x4ff5cd(0xad))/0x2*(parseInt(_0x4ff5cd(0xd0))/0x3)+-parseInt(_0x4ff5cd(0xc6))/0x4+-parseInt(_0x4ff5cd(0x94))/0x5*(-parseInt(_0x4ff5cd(0xa9))/0x6)+-parseInt(_0x4ff5cd(0x7f))/0x7*(-parseInt(_0x4ff5cd(0xa2))/0x8)+-parseInt(_0x4ff5cd(0x7e))/0x9+parseInt(_0x4ff5cd(0xbf))/0xa;if(_0x88934c===_0x155e36)break;else _0x51cecd['push'](_0x51cecd['shift']());}catch(_0x394202){_0x51cecd['push'](_0x51cecd['shift']());}}}(_0x3533,0x91f21));import{CommentService as _0x5ec5d5,CollaborationSessionService as _0x2f98bf,UniverCollaborationClientPlugin as _0x1627d3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2b2705}from'@univerjs-pro/license';import{dayjs as _0x56943a,UserManagerService as _0x3307ae,Inject as _0x361c7c,Injector as _0x585345,Disposable as _0x41eace,CustomRangeType as _0x86fd2c,UniverInstanceType as _0x235ad1,DependentOn as _0x56b67b,IConfigService as _0x45f6f1,Plugin as _0x5da7bd,merge as _0x22fe1a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x230aaa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x563c28,IThreadCommentDataSourceService as _0x852eb8}from'@univerjs/thread-comment';import{bufferTime as _0x4c3460}from'rxjs';import{HTTPService as _0x5c7a01}from'@univerjs/network';const W=_0x39886c(0xc8);var I=(_0x3162a0=>(_0x3162a0[_0x3162a0[_0x39886c(0x90)]=0x0]=_0x39886c(0x90),_0x3162a0[_0x3162a0[_0x39886c(0x80)]=0x1]=_0x39886c(0x80),_0x3162a0[_0x3162a0[_0x39886c(0xd7)]=-0x1]='UNRECOGNIZED',_0x3162a0))(I||{}),v=(_0x3b9353=>(_0x3b9353[_0x3b9353[_0x39886c(0x81)]=0x0]=_0x39886c(0x81),_0x3b9353[_0x3b9353[_0x39886c(0xc1)]=0x1]=_0x39886c(0xc1),_0x3b9353[_0x3b9353[_0x39886c(0x9a)]=0x2]=_0x39886c(0x9a),_0x3b9353[_0x3b9353[_0x39886c(0x84)]=0x3]=_0x39886c(0x84),_0x3b9353[_0x3b9353[_0x39886c(0x9d)]=0x4]=_0x39886c(0x9d),_0x3b9353[_0x3b9353[_0x39886c(0x89)]=0x5]='Solve',_0x3b9353[_0x3b9353[_0x39886c(0xd7)]=-0x1]='UNRECOGNIZED',_0x3b9353))(v||{});const D=_0x2baa93=>_0x56943a(new Date(+_0x2baa93))[_0x39886c(0x91)](_0x39886c(0xd8)),B=async(_0x59e396,_0x3b1f24)=>{const _0x1f0570=_0x39886c,_0x4ef7bd=_0x59e396['get'](_0x3307ae),_0x1a0c2e=_0x59e396[_0x1f0570(0xd5)](_0x5c7a01);_0x3b1f24[_0x1f0570(0xa3)](_0x24c803=>{const _0xb3dde8=_0x1f0570;_0x4ef7bd[_0xb3dde8(0xcb)](_0x24c803)&&_0x3b1f24[_0xb3dde8(0xb8)](_0x24c803);}),_0x3b1f24[_0x1f0570(0x9b)]&&(await _0x1a0c2e[_0x1f0570(0xd5)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3b1f24]}}))[_0x1f0570(0xb2)][_0x1f0570(0xd2)][_0x1f0570(0xa3)](_0x2c0dbf=>{const _0x16c451=_0x1f0570;_0x2c0dbf&&_0x4ef7bd[_0x16c451(0xd4)](_0x2c0dbf);});};var K=Object[_0x39886c(0xc0)],V=(_0x29a740,_0x44576b,_0x1ce186,_0x2e8a47)=>{const _0x401f71=_0x39886c;for(var _0x17eb9a=_0x2e8a47>0x1?void 0x0:_0x2e8a47?K(_0x44576b,_0x1ce186):_0x44576b,_0x9e4b3a=_0x29a740[_0x401f71(0xa1)]-0x1,_0x3dd2dd;_0x9e4b3a>=0x0;_0x9e4b3a--)(_0x3dd2dd=_0x29a740[_0x9e4b3a])&&(_0x17eb9a=_0x3dd2dd(_0x17eb9a)||_0x17eb9a);return _0x17eb9a;},p=(_0x5f2760,_0x5a91f6)=>(_0x206706,_0x4d0370)=>_0x5a91f6(_0x206706,_0x4d0370,_0x5f2760);let S=class extends _0x41eace{constructor(_0x4d6662,_0x4ae1ff,_0x58133e,_0x2f3ec0){const _0x44b827=_0x39886c;super(),this['_commentService']=_0x4d6662,this[_0x44b827(0x97)]=_0x4ae1ff,this[_0x44b827(0x95)]=_0x58133e,this[_0x44b827(0xbc)]=_0x2f3ec0,this[_0x44b827(0xc4)](),this[_0x44b827(0x88)]();}[_0x39886c(0x88)](){const _0x45bd2f=_0x39886c;this[_0x45bd2f(0xd3)](this[_0x45bd2f(0x97)][_0x45bd2f(0xc5)]['pipe'](_0x4c3460(0x10))['subscribe'](_0x4d0dfa=>{const _0x9bfcac=_0x45bd2f,_0x5c2b06=new Set();_0x4d0dfa['forEach'](_0x474358=>{const _0x144d87=_0x3d57;switch(_0x474358['type']){case _0x144d87(0x92):{const _0x1cb79b=_0x474358['payload'][_0x144d87(0x8f)];_0x5c2b06[_0x144d87(0x92)](_0x1cb79b);break;}}}),B(this[_0x9bfcac(0xbc)],_0x5c2b06);}));}[_0x39886c(0xc4)](){const _0x1ed618=_0x39886c;this[_0x1ed618(0xd3)](this[_0x1ed618(0xa5)][_0x1ed618(0xc5)]['subscribe'](async _0x4155f2=>{const _0x26cd9a=_0x1ed618;var _0x247e86,_0x25f7d6,_0x41d695,_0x5e9f39;const _0x359b5b=(_0x247e86=this[_0x26cd9a(0x97)][_0x26cd9a(0xbd)](_0x4155f2[_0x26cd9a(0xaf)])[_0x26cd9a(0x83)](_0x5ce09e=>_0x5ce09e[_0x26cd9a(0xca)]===_0x4155f2[_0x26cd9a(0xca)]))==null?void 0x0:_0x247e86[_0x26cd9a(0xb4)];if(!_0x359b5b)return;const {unitId:_0x1e85e,subUnitId:_0x11ae3a}=_0x359b5b;switch(_0x4155f2[_0x26cd9a(0x99)]&&this[_0x26cd9a(0x95)][_0x26cd9a(0xd4)](_0x4155f2[_0x26cd9a(0x99)]),_0x4155f2[_0x26cd9a(0xb1)]){case v[_0x26cd9a(0xc1)]:break;case v[_0x26cd9a(0x9a)]:{this[_0x26cd9a(0x97)][_0x26cd9a(0x98)](_0x1e85e,_0x11ae3a,{'unitId':_0x1e85e,'subUnitId':_0x11ae3a,'ref':'','id':_0x4155f2[_0x26cd9a(0xb0)],'dT':D(+_0x4155f2[_0x26cd9a(0x82)]),'threadId':_0x4155f2[_0x26cd9a(0xca)],'personId':(_0x41d695=(_0x25f7d6=_0x4155f2[_0x26cd9a(0x99)])==null?void 0x0:_0x25f7d6['userID'])!=null?_0x41d695:_0x4155f2[_0x26cd9a(0x86)],'text':JSON[_0x26cd9a(0xc9)](_0x4155f2['content']),'parentId':_0x359b5b['id']});break;}case v[_0x26cd9a(0x9d)]:{const _0xa2e8e=this[_0x26cd9a(0x97)]['getComment'](_0x1e85e,_0x11ae3a,_0x4155f2[_0x26cd9a(0xb0)]);_0xa2e8e&&_0xa2e8e['parentId']&&this[_0x26cd9a(0x97)][_0x26cd9a(0xae)](_0x1e85e,_0x11ae3a,_0x4155f2[_0x26cd9a(0xb0)]);break;}case v[_0x26cd9a(0x84)]:{this[_0x26cd9a(0x97)][_0x26cd9a(0xa8)](_0x1e85e,_0x11ae3a,{'commentId':_0x4155f2['replyId'],'text':JSON[_0x26cd9a(0xc9)](_0x4155f2[_0x26cd9a(0xc7)])});break;}case v[_0x26cd9a(0x89)]:{const _0x123507=(_0x5e9f39=this[_0x26cd9a(0x97)]['getUnit'](_0x4155f2['unitId'])[_0x26cd9a(0x83)](_0x371ee0=>_0x371ee0['threadId']===_0x4155f2[_0x26cd9a(0xca)]))==null?void 0x0:_0x5e9f39['root'];_0x123507&&this[_0x26cd9a(0x97)][_0x26cd9a(0xc3)](_0x1e85e,_0x11ae3a,_0x123507['id'],_0x4155f2[_0x26cd9a(0x9e)]===I[_0x26cd9a(0x80)]);break;}}}));}};S=V([p(0x0,_0x361c7c(_0x5ec5d5)),p(0x1,_0x361c7c(_0x563c28)),p(0x2,_0x361c7c(_0x3307ae)),p(0x3,_0x361c7c(_0x585345))],S);const z=_0x39886c(0xbe),M={};function _0x3533(){const _0x4d9ab5=['/reply','customRanges','191355sMMxkj','error','users','disposeWithMe','addUser','get','filter','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','_sessionService','requireSession','_threadCommentDataSource','stringify','syncUpdateMutationToColla','COMMENT','reply','code','/solved','rangeId','5278419GIllrd','14WhDRUU','Solved','Unknown','createTimestamp','find','Edit','_config','userId','symbol','_initUserSync','Solve','setConfig','rangeType','_httpService','/universer-api/comment/unit/','replies','personId','OpenOrReOpen','format','add','pluginName','3456795gkspCh','_userService','onReady','_threadCommentModel','addComment','user','Reply','size','getMemberID','Delete','solved','UNIVER_UNKNOWN','_initDataSource','length','1309896tdsCln','forEach','getCurrentUser','_commentService','post','resolved','updateComment','6MHFJxs','map','ref','_configService','2DZiYsX','deleteComment','unitId','replyId','type','body','639252bIgXBv','root','/list','dataSource','values','delete','defineProperty','userID','/add','_injector','getUnit','thread-comment-data-source.config','9822720SWhxud','getOwnPropertyDescriptor','Add','_threadCommentDataSourceService','resolveComment','_init','commentUpdate$','965416gWcaPo','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parse','threadId','getUser','listComments','slice'];_0x3533=function(){return _0x4d9ab5;};return _0x3533();}var k=Object[_0x39886c(0xc0)],Q=(_0x27caee,_0x2c1173,_0x3df7f4,_0x4ba2d4)=>{for(var _0x43e158=_0x4ba2d4>0x1?void 0x0:_0x4ba2d4?k(_0x2c1173,_0x3df7f4):_0x2c1173,_0x5c3eca=_0x27caee['length']-0x1,_0x157efd;_0x5c3eca>=0x0;_0x5c3eca--)(_0x157efd=_0x27caee[_0x5c3eca])&&(_0x43e158=_0x157efd(_0x43e158)||_0x43e158);return _0x43e158;},_=(_0x5e8b9d,_0x302278)=>(_0xa05181,_0x433fed)=>_0x302278(_0xa05181,_0x433fed,_0x5e8b9d);function X(_0x52db82,_0x1bb424){const _0x16260c=_0x39886c,_0x35e06d=_0x52db82[_0x16260c(0x8e)][0x0];return{..._0x1bb424,'id':_0x35e06d[_0x16260c(0xb0)],'resolved':_0x52db82[_0x16260c(0x9e)]===0x1,'dT':D(_0x35e06d['createTimestamp']),'personId':_0x35e06d[_0x16260c(0x86)],'threadId':_0x35e06d['threadId']};}function ee(_0x1756eb,_0x5bacad,_0x466eef){const _0x1d33dc=_0x39886c;var _0x251756,_0x223ffc;if(((_0x223ffc=(_0x251756=_0x1756eb==null?void 0x0:_0x1756eb['replies'])==null?void 0x0:_0x251756[_0x1d33dc(0xa1)])!=null?_0x223ffc:0x0)>0x0){const _0x59ea43=(_0x1cb48c,_0x49f513)=>({'id':_0x1cb48c[_0x1d33dc(0xb0)],'threadId':_0x1cb48c['threadId'],'dT':D(_0x1cb48c[_0x1d33dc(0x82)]),'personId':_0x1cb48c['userId'],'resolved':_0x1756eb[_0x1d33dc(0x9e)]===I[_0x1d33dc(0x80)],'unitId':_0x5bacad,'subUnitId':_0x466eef,'text':JSON[_0x1d33dc(0xc9)](_0x1cb48c[_0x1d33dc(0xc7)]),'parentId':_0x49f513}),_0x58982e=_0x59ea43(_0x1756eb[_0x1d33dc(0x8e)][0x0]);return{..._0x58982e,'children':_0x1756eb['replies'][_0x1d33dc(0xcd)](0x1)[_0x1d33dc(0xaa)](_0x3eeb2c=>_0x59ea43(_0x3eeb2c,_0x58982e['id']))};}return null;}let f=class{constructor(_0x440ec8,_0x163202,_0x3aeecf,_0x4a520e){const _0x58773b=_0x39886c;this[_0x58773b(0x8c)]=_0x440ec8,this[_0x58773b(0x95)]=_0x163202,this[_0x58773b(0xd9)]=_0x3aeecf,this[_0x58773b(0xbc)]=_0x4a520e;}async[_0x39886c(0x98)](_0x5ef400){const _0x23d365=_0x39886c;var _0x559da1,_0x51fbae;const {parentId:_0x47c123,unitId:_0x49820b,text:_0x1e8667,threadId:_0x4add82}=_0x5ef400,_0x29f8ab=(_0x51fbae=(_0x559da1=_0x1e8667[_0x23d365(0xcf)])==null?void 0x0:_0x559da1['filter'](_0x72771a=>_0x72771a[_0x23d365(0x8b)]===_0x86fd2c[_0x23d365(0xde)])[_0x23d365(0xaa)](_0x560e9d=>_0x560e9d[_0x23d365(0xe2)]))!=null?_0x51fbae:[],_0x136ca0=JSON[_0x23d365(0xdc)](_0x1e8667),_0x1f3f91=(await this[_0x23d365(0xd9)]['requireSession'](_0x49820b))['getMemberID']();if(_0x47c123){const _0x2e711a={'memberId':_0x1f3f91,'unitId':_0x49820b,'content':_0x136ca0,'mention':_0x29f8ab,'threadId':_0x4add82},_0x38aca9=(await this['_httpService']['post'](_0x23d365(0x8d)+_0x49820b+_0x23d365(0xce),{'body':_0x2e711a}))['body'][_0x23d365(0xdf)];return{..._0x5ef400,'id':_0x38aca9[_0x23d365(0xb0)],'dT':_0x56943a(+_0x38aca9[_0x23d365(0x82)])[_0x23d365(0x91)](_0x23d365(0xd8)),'personId':_0x38aca9[_0x23d365(0x86)]};}else{const _0x4a2ea5={'memberId':_0x1f3f91,'unitId':_0x49820b,'content':_0x136ca0,'mention':_0x29f8ab},_0x466e56=await this[_0x23d365(0x8c)][_0x23d365(0xa6)]('/universer-api/comment/unit/'+_0x49820b+_0x23d365(0xbb),{'body':_0x4a2ea5});return X(_0x466e56[_0x23d365(0xb2)]['comment'],_0x5ef400);}}async[_0x39886c(0xa8)](_0x2615cc){const _0x177d9c=_0x39886c;var _0x49dc6f,_0x11e42c;const {text:_0x17e4ea,unitId:_0x31fe31}=_0x2615cc,_0x77a1f3=(_0x11e42c=(_0x49dc6f=_0x17e4ea[_0x177d9c(0xcf)])==null?void 0x0:_0x49dc6f[_0x177d9c(0xd6)](_0x32534a=>_0x32534a[_0x177d9c(0x8b)]===_0x86fd2c[_0x177d9c(0xde)])[_0x177d9c(0xaa)](_0x39cdf8=>_0x39cdf8[_0x177d9c(0xe2)]))!=null?_0x11e42c:[],_0x2d6b90=JSON[_0x177d9c(0xdc)](_0x17e4ea),_0x1d291d=_0x2615cc['threadId'],_0x390d6b=_0x2615cc['id'],_0x2eb635={'memberId':(await this[_0x177d9c(0xd9)][_0x177d9c(0xda)](_0x31fe31))[_0x177d9c(0x9c)](),'unitId':_0x31fe31,'threadId':_0x1d291d,'mention':_0x77a1f3,'content':_0x2d6b90,'replyId':_0x390d6b},_0x45516c=await this[_0x177d9c(0x8c)][_0x177d9c(0xa6)]('/universer-api/comment/unit/'+_0x31fe31+'/edit',{'body':_0x2eb635});return!_0x45516c[_0x177d9c(0xb2)][_0x177d9c(0xd1)]||_0x45516c[_0x177d9c(0xb2)]['error'][_0x177d9c(0xe0)]===0x1;}async[_0x39886c(0xc3)](_0x55755a){const _0x2fb7c5=_0x39886c,{unitId:_0x5316df}=_0x55755a,_0x183734=_0x55755a[_0x2fb7c5(0xca)],_0x27a597={'memberId':this[_0x2fb7c5(0x95)][_0x2fb7c5(0xa4)]()[_0x2fb7c5(0xba)],'unitId':_0x5316df,'threadId':_0x183734,'solved':_0x55755a[_0x2fb7c5(0xa7)]?I['Solved']:I[_0x2fb7c5(0x90)]},_0x104d8e=await this[_0x2fb7c5(0x8c)][_0x2fb7c5(0xa6)](_0x2fb7c5(0x8d)+_0x5316df+_0x2fb7c5(0xe1),{'body':_0x27a597});return!_0x104d8e[_0x2fb7c5(0xb2)][_0x2fb7c5(0xd1)]||_0x104d8e[_0x2fb7c5(0xb2)]['error']['code']===0x1;}async['deleteComment'](_0x2a7bed,_0x42235b,_0x79369b,_0x14d604){const _0x2f8f54=_0x39886c,_0xf2418={'memberId':(await this['_sessionService']['requireSession'](_0x2a7bed))['getMemberID'](),'threadId':_0x79369b,'replyId':_0x14d604,'unitId':_0x2a7bed},_0x57e576=await this[_0x2f8f54(0x8c)][_0x2f8f54(0xa6)]('/universer-api/comment/unit/'+_0x2a7bed+'/delete',{'body':_0xf2418});return!_0x57e576[_0x2f8f54(0xb2)]['error']||_0x57e576[_0x2f8f54(0xb2)][_0x2f8f54(0xd1)][_0x2f8f54(0xe0)]===0x1;}async[_0x39886c(0xcc)](_0x4e66b1,_0x42b289,_0x58a73f){const _0x16acf5=_0x39886c,_0x27869d={'unitId':_0x4e66b1,'threadId':_0x58a73f},_0x1e4cf0=await this[_0x16acf5(0x8c)]['post'](_0x16acf5(0x8d)+_0x4e66b1+_0x16acf5(0xb5),{'body':_0x27869d}),_0x4c367f=_0x58a73f[_0x16acf5(0xaa)](_0x2aae77=>ee(_0x1e4cf0['body']['comments'][_0x2aae77],_0x4e66b1,_0x42b289))[_0x16acf5(0xd6)](Boolean);return Object[_0x16acf5(0xb7)](_0x1e4cf0[_0x16acf5(0xb2)]['users'])[_0x16acf5(0xa3)](_0x1cba00=>{const _0x26bdf0=_0x16acf5;this['_userService'][_0x26bdf0(0xd4)](_0x1cba00);}),_0x4c367f;}['saveCommentToSnapshot'](_0x2d343f){const _0x3ead00=_0x39886c;return{'id':_0x2d343f['id'],'threadId':_0x2d343f[_0x3ead00(0xca)],'ref':_0x2d343f[_0x3ead00(0xab)]};}};f=Q([_(0x0,_0x361c7c(_0x5c7a01)),_(0x1,_0x361c7c(_0x3307ae)),_(0x2,_0x361c7c(_0x2f98bf)),_(0x3,_0x361c7c(_0x585345))],f);var re=Object[_0x39886c(0xc0)],te=(_0x1a593c,_0x302d7c,_0x36c683,_0x610613)=>{const _0x2309f5=_0x39886c;for(var _0xb77bd5=_0x610613>0x1?void 0x0:_0x610613?re(_0x302d7c,_0x36c683):_0x302d7c,_0x23ea12=_0x1a593c[_0x2309f5(0xa1)]-0x1,_0x2cf29e;_0x23ea12>=0x0;_0x23ea12--)(_0x2cf29e=_0x1a593c[_0x23ea12])&&(_0xb77bd5=_0x2cf29e(_0xb77bd5)||_0xb77bd5);return _0xb77bd5;},N=(_0x5598ca,_0x8bd59e)=>(_0x1612a5,_0x334700)=>_0x8bd59e(_0x1612a5,_0x334700,_0x5598ca);let g=class extends _0x41eace{constructor(_0x347896,_0x3ebda7){const _0x360e8a=_0x39886c;super(),this[_0x360e8a(0xc2)]=_0x347896,this['_threadCommentDataSource']=_0x3ebda7,this[_0x360e8a(0xa0)]();}[_0x39886c(0xa0)](){const _0x1e9fd8=_0x39886c;this[_0x1e9fd8(0xc2)][_0x1e9fd8(0xb6)]=this[_0x1e9fd8(0xdb)],this[_0x1e9fd8(0xc2)][_0x1e9fd8(0xdd)]=!0x1;}};g=te([N(0x0,_0x852eb8),N(0x1,_0x361c7c(f))],g);var se=Object[_0x39886c(0xb9)],oe=Object[_0x39886c(0xc0)],ne=(_0x516097,_0xdb44bb,_0x29f9e3)=>_0xdb44bb in _0x516097?se(_0x516097,_0xdb44bb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29f9e3}):_0x516097[_0xdb44bb]=_0x29f9e3,ie=(_0x49640a,_0x5d20d1,_0x19abec,_0x36c7a2)=>{const _0x3e833a=_0x39886c;for(var _0x24987f=_0x36c7a2>0x1?void 0x0:_0x36c7a2?oe(_0x5d20d1,_0x19abec):_0x5d20d1,_0x453cf1=_0x49640a[_0x3e833a(0xa1)]-0x1,_0xc578a3;_0x453cf1>=0x0;_0x453cf1--)(_0xc578a3=_0x49640a[_0x453cf1])&&(_0x24987f=_0xc578a3(_0x24987f)||_0x24987f);return _0x24987f;},w=(_0x329b6a,_0x1dcdcf)=>(_0x19706b,_0x42322c)=>_0x1dcdcf(_0x19706b,_0x42322c,_0x329b6a),$=(_0x2a1c2b,_0xa592,_0x327d14)=>ne(_0x2a1c2b,typeof _0xa592!=_0x39886c(0x87)?_0xa592+'':_0xa592,_0x327d14);let b=class extends _0x5da7bd{constructor(_0x4b5d60=M,_0x5df046,_0x18ceb7){const _0x2f1178=_0x39886c;super(),this[_0x2f1178(0x85)]=_0x4b5d60,this[_0x2f1178(0xbc)]=_0x5df046,this['_configService']=_0x18ceb7;const {..._0x5d8b90}=_0x22fe1a({},M,this[_0x2f1178(0x85)]);this[_0x2f1178(0xac)][_0x2f1178(0x8a)](z,_0x5d8b90);}['onStarting'](){const _0x4f9a77=_0x39886c;[[f],[g],[S]][_0x4f9a77(0xa3)](_0x4bba79=>{this['_injector']['add'](_0x4bba79);});}[_0x39886c(0x96)](){const _0x21854f=_0x39886c;this[_0x21854f(0xbc)]['get'](g),this[_0x21854f(0xbc)][_0x21854f(0xd5)](S);}};$(b,_0x39886c(0x93),W),$(b,_0x39886c(0xb1),_0x235ad1[_0x39886c(0x9f)]),b=ie([_0x56b67b(_0x230aaa,_0x1627d3,_0x2b2705),w(0x1,_0x361c7c(_0x585345)),w(0x2,_0x45f6f1)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2482b5=_0x36f5;(function(_0xf1335b,_0x1e66f9){const _0x3b88e6=_0x36f5,_0x1d9984=_0xf1335b();while(!![]){try{const _0x43c6fe=-parseInt(_0x3b88e6(0x225))/0x1+parseInt(_0x3b88e6(0x1fc))/0x2*(parseInt(_0x3b88e6(0x244))/0x3)+-parseInt(_0x3b88e6(0x21a))/0x4*(-parseInt(_0x3b88e6(0x23e))/0x5)+parseInt(_0x3b88e6(0x229))/0x6+parseInt(_0x3b88e6(0x1f9))/0x7+parseInt(_0x3b88e6(0x240))/0x8+-parseInt(_0x3b88e6(0x208))/0x9;if(_0x43c6fe===_0x1e66f9)break;else _0x1d9984['push'](_0x1d9984['shift']());}catch(_0x2ea407){_0x1d9984['push'](_0x1d9984['shift']());}}}(_0x30b3,0x891ac));function _0x30b3(){const _0x4fa12f=['Delete','UNRECOGNIZED','4776290WrAOWT','/list','8201728AKXjWL','getCurrentUser','/add','userID','15MXOVqQ','get','add','subscribe','threadId','Solved','OpenOrReOpen','Unknown','_threadCommentDataSourceService','_init','format','getUser','ref','rangeType','dataSource','type','saveCommentToSnapshot','unitId','parse','/solved','root','_commentService','addUser','content','_httpService','1070755FtPsgk','onReady','_sessionService','210396nxmMJr','deleteComment','_threadCommentDataSource','disposeWithMe','requireSession','syncUpdateMutationToColla','map','Reply','listComments','replies','forEach','createTimestamp','15225912GAfFzj','setConfig','Add','slice','defineProperty','Edit','replyId','_injector','filter','_initUserSync','_config','_initDataSource','stringify','comments','code','COMMENT','getComment','_threadCommentModel','4wNRoPK','getMemberID','personId','commentUpdate$','userId','/delete','symbol','/universer-api/comment/unit/','user','_userService','values','431867DAfKgI','size','/reply','length','154716OeLVTs','getUnit','customRanges','comment','Solve','/universer-api/user/list','solved','updateComment','error','_configService','find','getOwnPropertyDescriptor','users','body','resolveComment','UNIVER_UNKNOWN','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','post','addComment'];_0x30b3=function(){return _0x4fa12f;};return _0x30b3();}import{CommentService as _0x48a9f5,CollaborationSessionService as _0x385d7c,UniverCollaborationClientPlugin as _0x1aa4b3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x26258d}from'@univerjs-pro/license';import{dayjs as _0x1fe5ef,UserManagerService as _0x3f1b78,Inject as _0x1289ff,Injector as _0x378ce5,Disposable as _0x1663e6,CustomRangeType as _0x261728,UniverInstanceType as _0x5abae1,DependentOn as _0x15259c,IConfigService as _0xa1e2a6,Plugin as _0x1215a8,merge as _0x4f79b5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x43a799}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x49d49f,IThreadCommentDataSourceService as _0x555c27}from'@univerjs/thread-comment';import{bufferTime as _0x292fec}from'rxjs';function _0x36f5(_0x46d50a,_0xed5230){const _0x30b3c7=_0x30b3();return _0x36f5=function(_0x36f55e,_0x2b6a04){_0x36f55e=_0x36f55e-0x1f0;let _0x2887ba=_0x30b3c7[_0x36f55e];return _0x2887ba;},_0x36f5(_0x46d50a,_0xed5230);}import{HTTPService as _0x4193ea}from'@univerjs/network';const W=_0x2482b5(0x239);var I=(_0x3bb1e9=>(_0x3bb1e9[_0x3bb1e9[_0x2482b5(0x24a)]=0x0]=_0x2482b5(0x24a),_0x3bb1e9[_0x3bb1e9[_0x2482b5(0x249)]=0x1]='Solved',_0x3bb1e9[_0x3bb1e9[_0x2482b5(0x23d)]=-0x1]=_0x2482b5(0x23d),_0x3bb1e9))(I||{}),v=(_0x3cb929=>(_0x3cb929[_0x3cb929['Unknown']=0x0]=_0x2482b5(0x24b),_0x3cb929[_0x3cb929['Add']=0x1]=_0x2482b5(0x20a),_0x3cb929[_0x3cb929['Reply']=0x2]=_0x2482b5(0x203),_0x3cb929[_0x3cb929['Edit']=0x3]=_0x2482b5(0x20d),_0x3cb929[_0x3cb929[_0x2482b5(0x23c)]=0x4]=_0x2482b5(0x23c),_0x3cb929[_0x3cb929[_0x2482b5(0x22d)]=0x5]=_0x2482b5(0x22d),_0x3cb929[_0x3cb929[_0x2482b5(0x23d)]=-0x1]=_0x2482b5(0x23d),_0x3cb929))(v||{});const y=_0x32c642=>_0x1fe5ef(new Date(+_0x32c642))[_0x2482b5(0x24e)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x949c69,_0x2111f5)=>{const _0x22bfed=_0x2482b5,_0x51129b=_0x949c69[_0x22bfed(0x245)](_0x3f1b78),_0x2b40db=_0x949c69['get'](_0x4193ea);_0x2111f5[_0x22bfed(0x206)](_0x47794d=>{const _0x17e38b=_0x22bfed;_0x51129b[_0x17e38b(0x24f)](_0x47794d)&&_0x2111f5['delete'](_0x47794d);}),_0x2111f5[_0x22bfed(0x226)]&&(await _0x2b40db[_0x22bfed(0x245)](_0x22bfed(0x22e),{'params':{'userIDs':[..._0x2111f5]}}))[_0x22bfed(0x236)][_0x22bfed(0x235)]['forEach'](_0x5c565c=>{_0x5c565c&&_0x51129b['addUser'](_0x5c565c);});};var K=Object[_0x2482b5(0x234)],V=(_0x5ac750,_0xd338f0,_0x182ff9,_0x466841)=>{const _0x51e246=_0x2482b5;for(var _0x592327=_0x466841>0x1?void 0x0:_0x466841?K(_0xd338f0,_0x182ff9):_0xd338f0,_0x50dd29=_0x5ac750[_0x51e246(0x228)]-0x1,_0x25d153;_0x50dd29>=0x0;_0x50dd29--)(_0x25d153=_0x5ac750[_0x50dd29])&&(_0x592327=_0x25d153(_0x592327)||_0x592327);return _0x592327;},p=(_0x32fadb,_0x1de72e)=>(_0x2af5c7,_0x2798f6)=>_0x1de72e(_0x2af5c7,_0x2798f6,_0x32fadb);let _=class extends _0x1663e6{constructor(_0x40cd04,_0x3d6d90,_0x43e864,_0x16f732){const _0x260579=_0x2482b5;super(),this[_0x260579(0x1f5)]=_0x40cd04,this['_threadCommentModel']=_0x3d6d90,this[_0x260579(0x223)]=_0x43e864,this['_injector']=_0x16f732,this[_0x260579(0x24d)](),this[_0x260579(0x211)]();}[_0x2482b5(0x211)](){const _0x1d08f4=_0x2482b5;this['disposeWithMe'](this[_0x1d08f4(0x219)][_0x1d08f4(0x21d)]['pipe'](_0x292fec(0x10))[_0x1d08f4(0x247)](_0x597c20=>{const _0x4acf03=_0x1d08f4,_0xe03f25=new Set();_0x597c20[_0x4acf03(0x206)](_0xd568bd=>{const _0x5b6480=_0x4acf03;switch(_0xd568bd['type']){case'add':{const _0x162b3e=_0xd568bd['payload'][_0x5b6480(0x21c)];_0xe03f25[_0x5b6480(0x246)](_0x162b3e);break;}}}),B(this[_0x4acf03(0x20f)],_0xe03f25);}));}[_0x2482b5(0x24d)](){const _0x786df1=_0x2482b5;this[_0x786df1(0x1ff)](this[_0x786df1(0x1f5)][_0x786df1(0x21d)][_0x786df1(0x247)](async _0x43234c=>{const _0x369663=_0x786df1;var _0x10b72a,_0x1225b6,_0x1165f2,_0x3bed3d;const _0x33eea7=(_0x10b72a=this[_0x369663(0x219)]['getUnit'](_0x43234c[_0x369663(0x1f1)])[_0x369663(0x233)](_0x5c2d53=>_0x5c2d53['threadId']===_0x43234c[_0x369663(0x248)]))==null?void 0x0:_0x10b72a[_0x369663(0x1f4)];if(!_0x33eea7)return;const {unitId:_0x493a78,subUnitId:_0x5af512}=_0x33eea7;switch(_0x43234c['user']&&this['_userService'][_0x369663(0x1f6)](_0x43234c[_0x369663(0x222)]),_0x43234c[_0x369663(0x253)]){case v[_0x369663(0x20a)]:break;case v[_0x369663(0x203)]:{this[_0x369663(0x219)]['addComment'](_0x493a78,_0x5af512,{'unitId':_0x493a78,'subUnitId':_0x5af512,'ref':'','id':_0x43234c[_0x369663(0x20e)],'dT':y(+_0x43234c['createTimestamp']),'threadId':_0x43234c[_0x369663(0x248)],'personId':(_0x1165f2=(_0x1225b6=_0x43234c[_0x369663(0x222)])==null?void 0x0:_0x1225b6[_0x369663(0x243)])!=null?_0x1165f2:_0x43234c['userId'],'text':JSON[_0x369663(0x1f2)](_0x43234c[_0x369663(0x1f7)]),'parentId':_0x33eea7['id']});break;}case v[_0x369663(0x23c)]:{const _0x24db09=this[_0x369663(0x219)][_0x369663(0x218)](_0x493a78,_0x5af512,_0x43234c[_0x369663(0x20e)]);_0x24db09&&_0x24db09['parentId']&&this[_0x369663(0x219)]['deleteComment'](_0x493a78,_0x5af512,_0x43234c['replyId']);break;}case v['Edit']:{this[_0x369663(0x219)][_0x369663(0x230)](_0x493a78,_0x5af512,{'commentId':_0x43234c[_0x369663(0x20e)],'text':JSON[_0x369663(0x1f2)](_0x43234c['content'])});break;}case v[_0x369663(0x22d)]:{const _0x489c03=(_0x3bed3d=this[_0x369663(0x219)][_0x369663(0x22a)](_0x43234c[_0x369663(0x1f1)])[_0x369663(0x233)](_0x9c06ca=>_0x9c06ca[_0x369663(0x248)]===_0x43234c[_0x369663(0x248)]))==null?void 0x0:_0x3bed3d[_0x369663(0x1f4)];_0x489c03&&this[_0x369663(0x219)][_0x369663(0x237)](_0x493a78,_0x5af512,_0x489c03['id'],_0x43234c[_0x369663(0x22f)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x1289ff(_0x48a9f5)),p(0x1,_0x1289ff(_0x49d49f)),p(0x2,_0x1289ff(_0x3f1b78)),p(0x3,_0x1289ff(_0x378ce5))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x2482b5(0x234)],Q=(_0xa7119c,_0x332659,_0x2815c1,_0x137673)=>{const _0x29e9a6=_0x2482b5;for(var _0x1fba62=_0x137673>0x1?void 0x0:_0x137673?k(_0x332659,_0x2815c1):_0x332659,_0x2f2138=_0xa7119c[_0x29e9a6(0x228)]-0x1,_0x53cb04;_0x2f2138>=0x0;_0x2f2138--)(_0x53cb04=_0xa7119c[_0x2f2138])&&(_0x1fba62=_0x53cb04(_0x1fba62)||_0x1fba62);return _0x1fba62;},b=(_0x185208,_0xbd1c9f)=>(_0x2328c8,_0x57fbd8)=>_0xbd1c9f(_0x2328c8,_0x57fbd8,_0x185208);function X(_0x3b7d98,_0x11b8b2){const _0x1ee499=_0x2482b5,_0x1f49b4=_0x3b7d98[_0x1ee499(0x205)][0x0];return{..._0x11b8b2,'id':_0x1f49b4[_0x1ee499(0x20e)],'resolved':_0x3b7d98[_0x1ee499(0x22f)]===0x1,'dT':y(_0x1f49b4[_0x1ee499(0x207)]),'personId':_0x1f49b4[_0x1ee499(0x21e)],'threadId':_0x1f49b4[_0x1ee499(0x248)]};}function ee(_0x5851ba,_0x8d91de,_0x57b405){const _0x33de5d=_0x2482b5;var _0x32bdfb,_0x5221af;if(((_0x5221af=(_0x32bdfb=_0x5851ba==null?void 0x0:_0x5851ba[_0x33de5d(0x205)])==null?void 0x0:_0x32bdfb[_0x33de5d(0x228)])!=null?_0x5221af:0x0)>0x0){const _0x30f85e=(_0x9a3d55,_0x209e05)=>({'id':_0x9a3d55[_0x33de5d(0x20e)],'threadId':_0x9a3d55[_0x33de5d(0x248)],'dT':y(_0x9a3d55[_0x33de5d(0x207)]),'personId':_0x9a3d55[_0x33de5d(0x21e)],'resolved':_0x5851ba[_0x33de5d(0x22f)]===I[_0x33de5d(0x249)],'unitId':_0x8d91de,'subUnitId':_0x57b405,'text':JSON[_0x33de5d(0x1f2)](_0x9a3d55[_0x33de5d(0x1f7)]),'parentId':_0x209e05}),_0x2e0a10=_0x30f85e(_0x5851ba['replies'][0x0]);return{..._0x2e0a10,'children':_0x5851ba['replies'][_0x33de5d(0x20b)](0x1)['map'](_0x4455e7=>_0x30f85e(_0x4455e7,_0x2e0a10['id']))};}return null;}let S=class{constructor(_0x296e7d,_0x5154a8,_0x172d19){const _0x34ac29=_0x2482b5;this['_httpService']=_0x296e7d,this[_0x34ac29(0x223)]=_0x5154a8,this[_0x34ac29(0x1fb)]=_0x172d19;}async[_0x2482b5(0x23b)](_0x421dab){const _0x247af1=_0x2482b5;var _0x660813,_0x5f107c;const {parentId:_0x5ad9d1,unitId:_0xeeb610,text:_0xc12cb7,threadId:_0x562bcd}=_0x421dab,_0x31995d=(_0x5f107c=(_0x660813=_0xc12cb7[_0x247af1(0x22b)])==null?void 0x0:_0x660813[_0x247af1(0x210)](_0x20ae9e=>_0x20ae9e[_0x247af1(0x251)]===_0x261728[_0x247af1(0x217)])['map'](_0x2a1201=>_0x2a1201['rangeId']))!=null?_0x5f107c:[],_0x4260b5=JSON[_0x247af1(0x214)](_0xc12cb7),_0x54e567=(await this[_0x247af1(0x1fb)][_0x247af1(0x200)](_0xeeb610))[_0x247af1(0x21b)]();if(_0x5ad9d1){const _0x17f1a2={'memberId':_0x54e567,'unitId':_0xeeb610,'content':_0x4260b5,'mention':_0x31995d,'threadId':_0x562bcd},_0x5fb4cd=(await this[_0x247af1(0x1f8)][_0x247af1(0x23a)](_0x247af1(0x221)+_0xeeb610+_0x247af1(0x227),{'body':_0x17f1a2}))['body']['reply'];return{..._0x421dab,'id':_0x5fb4cd[_0x247af1(0x20e)],'dT':_0x1fe5ef(+_0x5fb4cd[_0x247af1(0x207)])[_0x247af1(0x24e)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5fb4cd[_0x247af1(0x21e)]};}else{const _0x42a2a8={'memberId':_0x54e567,'unitId':_0xeeb610,'content':_0x4260b5,'mention':_0x31995d},_0x13b663=await this[_0x247af1(0x1f8)][_0x247af1(0x23a)](_0x247af1(0x221)+_0xeeb610+_0x247af1(0x242),{'body':_0x42a2a8});return X(_0x13b663['body'][_0x247af1(0x22c)],_0x421dab);}}async['updateComment'](_0x31c808){const _0x53ffca=_0x2482b5;var _0x53a46d,_0x4a9e08;const {text:_0x217b9a,unitId:_0xec6bc5}=_0x31c808,_0x378b97=(_0x4a9e08=(_0x53a46d=_0x217b9a['customRanges'])==null?void 0x0:_0x53a46d['filter'](_0x392a59=>_0x392a59[_0x53ffca(0x251)]===_0x261728[_0x53ffca(0x217)])[_0x53ffca(0x202)](_0x7b95a8=>_0x7b95a8['rangeId']))!=null?_0x4a9e08:[],_0x3bb85b=JSON[_0x53ffca(0x214)](_0x217b9a),_0x1cd503=_0x31c808['threadId'],_0x3d6525=_0x31c808['id'],_0x495519={'memberId':(await this[_0x53ffca(0x1fb)][_0x53ffca(0x200)](_0xec6bc5))[_0x53ffca(0x21b)](),'unitId':_0xec6bc5,'threadId':_0x1cd503,'mention':_0x378b97,'content':_0x3bb85b,'replyId':_0x3d6525},_0x1c8f61=await this['_httpService'][_0x53ffca(0x23a)](_0x53ffca(0x221)+_0xec6bc5+'/edit',{'body':_0x495519});return!_0x1c8f61[_0x53ffca(0x236)]['error']||_0x1c8f61[_0x53ffca(0x236)][_0x53ffca(0x231)][_0x53ffca(0x216)]===0x1;}async[_0x2482b5(0x237)](_0x1d68fe){const _0x1d590f=_0x2482b5,{unitId:_0x5790af}=_0x1d68fe,_0x113752=_0x1d68fe[_0x1d590f(0x248)],_0x446d51={'memberId':this[_0x1d590f(0x223)][_0x1d590f(0x241)]()['userID'],'unitId':_0x5790af,'threadId':_0x113752,'solved':_0x1d68fe['resolved']?I[_0x1d590f(0x249)]:I['OpenOrReOpen']},_0x40ce4f=await this[_0x1d590f(0x1f8)]['post'](_0x1d590f(0x221)+_0x5790af+_0x1d590f(0x1f3),{'body':_0x446d51});return!_0x40ce4f[_0x1d590f(0x236)]['error']||_0x40ce4f[_0x1d590f(0x236)][_0x1d590f(0x231)][_0x1d590f(0x216)]===0x1;}async[_0x2482b5(0x1fd)](_0x2618dd,_0x33f536,_0x3b2d3a,_0x1152dc){const _0x3d1dd9=_0x2482b5,_0x2e0cf5={'memberId':(await this[_0x3d1dd9(0x1fb)]['requireSession'](_0x2618dd))[_0x3d1dd9(0x21b)](),'threadId':_0x3b2d3a,'replyId':_0x1152dc,'unitId':_0x2618dd},_0x5251c8=await this[_0x3d1dd9(0x1f8)]['post'](_0x3d1dd9(0x221)+_0x2618dd+_0x3d1dd9(0x21f),{'body':_0x2e0cf5});return!_0x5251c8[_0x3d1dd9(0x236)]['error']||_0x5251c8['body'][_0x3d1dd9(0x231)][_0x3d1dd9(0x216)]===0x1;}async[_0x2482b5(0x204)](_0x1781af,_0x37c90d,_0x47b7f2){const _0x1a247a=_0x2482b5,_0x5be237={'unitId':_0x1781af,'threadId':_0x47b7f2},_0x52acac=await this[_0x1a247a(0x1f8)][_0x1a247a(0x23a)](_0x1a247a(0x221)+_0x1781af+_0x1a247a(0x23f),{'body':_0x5be237}),_0x15e0d4=_0x47b7f2[_0x1a247a(0x202)](_0x53d206=>ee(_0x52acac[_0x1a247a(0x236)][_0x1a247a(0x215)][_0x53d206],_0x1781af,_0x37c90d))[_0x1a247a(0x210)](Boolean);return Object[_0x1a247a(0x224)](_0x52acac[_0x1a247a(0x236)]['users'])[_0x1a247a(0x206)](_0x3fa766=>{const _0x4a9bcf=_0x1a247a;this[_0x4a9bcf(0x223)][_0x4a9bcf(0x1f6)](_0x3fa766);}),_0x15e0d4;}[_0x2482b5(0x1f0)](_0x41145b){const _0x2a8400=_0x2482b5;return{'id':_0x41145b['id'],'threadId':_0x41145b['threadId'],'ref':_0x41145b[_0x2a8400(0x250)]};}};S=Q([b(0x0,_0x1289ff(_0x4193ea)),b(0x1,_0x1289ff(_0x3f1b78)),b(0x2,_0x1289ff(_0x385d7c))],S);var re=Object[_0x2482b5(0x234)],te=(_0x584608,_0x5b4ed9,_0x1f21ad,_0x403030)=>{const _0x42290c=_0x2482b5;for(var _0xa6baee=_0x403030>0x1?void 0x0:_0x403030?re(_0x5b4ed9,_0x1f21ad):_0x5b4ed9,_0x5adadf=_0x584608[_0x42290c(0x228)]-0x1,_0x13ac6b;_0x5adadf>=0x0;_0x5adadf--)(_0x13ac6b=_0x584608[_0x5adadf])&&(_0xa6baee=_0x13ac6b(_0xa6baee)||_0xa6baee);return _0xa6baee;},M=(_0x3edce6,_0x5a1c40)=>(_0x46f74a,_0x892a5d)=>_0x5a1c40(_0x46f74a,_0x892a5d,_0x3edce6);let f=class extends _0x1663e6{constructor(_0x110fd5,_0x51bcf8){const _0x238d49=_0x2482b5;super(),this[_0x238d49(0x24c)]=_0x110fd5,this[_0x238d49(0x1fe)]=_0x51bcf8,this[_0x238d49(0x213)]();}[_0x2482b5(0x213)](){const _0x27311d=_0x2482b5;this[_0x27311d(0x24c)][_0x27311d(0x252)]=this[_0x27311d(0x1fe)],this[_0x27311d(0x24c)][_0x27311d(0x201)]=!0x1;}};f=te([M(0x0,_0x555c27),M(0x1,_0x1289ff(S))],f);var se=Object[_0x2482b5(0x20c)],oe=Object[_0x2482b5(0x234)],ne=(_0x48c421,_0x1e0d2c,_0x484901)=>_0x1e0d2c in _0x48c421?se(_0x48c421,_0x1e0d2c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x484901}):_0x48c421[_0x1e0d2c]=_0x484901,ie=(_0x2627ee,_0x591dff,_0x2b577f,_0xa0fc13)=>{const _0x3b7da2=_0x2482b5;for(var _0x1fd065=_0xa0fc13>0x1?void 0x0:_0xa0fc13?oe(_0x591dff,_0x2b577f):_0x591dff,_0x24a656=_0x2627ee[_0x3b7da2(0x228)]-0x1,_0xb2f445;_0x24a656>=0x0;_0x24a656--)(_0xb2f445=_0x2627ee[_0x24a656])&&(_0x1fd065=_0xb2f445(_0x1fd065)||_0x1fd065);return _0x1fd065;},N=(_0x45a63c,_0x10070b)=>(_0x5dd389,_0x81c684)=>_0x10070b(_0x5dd389,_0x81c684,_0x45a63c),$=(_0x867e6c,_0x5cf70e,_0x440c9f)=>ne(_0x867e6c,typeof _0x5cf70e!=_0x2482b5(0x220)?_0x5cf70e+'':_0x5cf70e,_0x440c9f);let g=class extends _0x1215a8{constructor(_0xca22b9=O,_0x506ba6,_0x37c07c){const _0x3a2bd2=_0x2482b5;super(),this[_0x3a2bd2(0x212)]=_0xca22b9,this[_0x3a2bd2(0x20f)]=_0x506ba6,this[_0x3a2bd2(0x232)]=_0x37c07c;const {..._0x259999}=_0x4f79b5({},O,this['_config']);this['_configService'][_0x3a2bd2(0x209)](z,_0x259999);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x1f323f=>{const _0x1fe196=_0x36f5;this[_0x1fe196(0x20f)][_0x1fe196(0x246)](_0x1f323f);});}[_0x2482b5(0x1fa)](){const _0x3eed37=_0x2482b5;this[_0x3eed37(0x20f)]['get'](f),this[_0x3eed37(0x20f)][_0x3eed37(0x245)](_);}};$(g,'pluginName',W),$(g,_0x2482b5(0x253),_0x5abae1[_0x2482b5(0x238)]),g=ie([_0x15259c(_0x43a799,_0x1aa4b3,_0x26258d),N(0x1,_0x1289ff(_0x378ce5)),N(0x2,_0xa1e2a6)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3d57(_0xe4c055,_0x47fc09){const _0x3533da=_0x3533();return _0x3d57=function(_0x3d5730,_0x3a8d47){_0x3d5730=_0x3d5730-0x7e;let _0x583c03=_0x3533da[_0x3d5730];return _0x583c03;},_0x3d57(_0xe4c055,_0x47fc09);}const _0x39886c=_0x3d57;(function(_0x378dfa,_0x155e36){const _0x4ff5cd=_0x3d57,_0x51cecd=_0x378dfa();while(!![]){try{const _0x88934c=-parseInt(_0x4ff5cd(0xb3))/0x1+parseInt(_0x4ff5cd(0xad))/0x2*(parseInt(_0x4ff5cd(0xd0))/0x3)+-parseInt(_0x4ff5cd(0xc6))/0x4+-parseInt(_0x4ff5cd(0x94))/0x5*(-parseInt(_0x4ff5cd(0xa9))/0x6)+-parseInt(_0x4ff5cd(0x7f))/0x7*(-parseInt(_0x4ff5cd(0xa2))/0x8)+-parseInt(_0x4ff5cd(0x7e))/0x9+parseInt(_0x4ff5cd(0xbf))/0xa;if(_0x88934c===_0x155e36)break;else _0x51cecd['push'](_0x51cecd['shift']());}catch(_0x394202){_0x51cecd['push'](_0x51cecd['shift']());}}}(_0x3533,0x91f21));import{CommentService as _0x5ec5d5,CollaborationSessionService as _0x2f98bf,UniverCollaborationClientPlugin as _0x1627d3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2b2705}from'@univerjs-pro/license';import{dayjs as _0x56943a,UserManagerService as _0x3307ae,Inject as _0x361c7c,Injector as _0x585345,Disposable as _0x41eace,CustomRangeType as _0x86fd2c,UniverInstanceType as _0x235ad1,DependentOn as _0x56b67b,IConfigService as _0x45f6f1,Plugin as _0x5da7bd,merge as _0x22fe1a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x230aaa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x563c28,IThreadCommentDataSourceService as _0x852eb8}from'@univerjs/thread-comment';import{bufferTime as _0x4c3460}from'rxjs';import{HTTPService as _0x5c7a01}from'@univerjs/network';const W=_0x39886c(0xc8);var I=(_0x3162a0=>(_0x3162a0[_0x3162a0[_0x39886c(0x90)]=0x0]=_0x39886c(0x90),_0x3162a0[_0x3162a0[_0x39886c(0x80)]=0x1]=_0x39886c(0x80),_0x3162a0[_0x3162a0[_0x39886c(0xd7)]=-0x1]='UNRECOGNIZED',_0x3162a0))(I||{}),v=(_0x3b9353=>(_0x3b9353[_0x3b9353[_0x39886c(0x81)]=0x0]=_0x39886c(0x81),_0x3b9353[_0x3b9353[_0x39886c(0xc1)]=0x1]=_0x39886c(0xc1),_0x3b9353[_0x3b9353[_0x39886c(0x9a)]=0x2]=_0x39886c(0x9a),_0x3b9353[_0x3b9353[_0x39886c(0x84)]=0x3]=_0x39886c(0x84),_0x3b9353[_0x3b9353[_0x39886c(0x9d)]=0x4]=_0x39886c(0x9d),_0x3b9353[_0x3b9353[_0x39886c(0x89)]=0x5]='Solve',_0x3b9353[_0x3b9353[_0x39886c(0xd7)]=-0x1]='UNRECOGNIZED',_0x3b9353))(v||{});const D=_0x2baa93=>_0x56943a(new Date(+_0x2baa93))[_0x39886c(0x91)](_0x39886c(0xd8)),B=async(_0x59e396,_0x3b1f24)=>{const _0x1f0570=_0x39886c,_0x4ef7bd=_0x59e396['get'](_0x3307ae),_0x1a0c2e=_0x59e396[_0x1f0570(0xd5)](_0x5c7a01);_0x3b1f24[_0x1f0570(0xa3)](_0x24c803=>{const _0xb3dde8=_0x1f0570;_0x4ef7bd[_0xb3dde8(0xcb)](_0x24c803)&&_0x3b1f24[_0xb3dde8(0xb8)](_0x24c803);}),_0x3b1f24[_0x1f0570(0x9b)]&&(await _0x1a0c2e[_0x1f0570(0xd5)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3b1f24]}}))[_0x1f0570(0xb2)][_0x1f0570(0xd2)][_0x1f0570(0xa3)](_0x2c0dbf=>{const _0x16c451=_0x1f0570;_0x2c0dbf&&_0x4ef7bd[_0x16c451(0xd4)](_0x2c0dbf);});};var K=Object[_0x39886c(0xc0)],V=(_0x29a740,_0x44576b,_0x1ce186,_0x2e8a47)=>{const _0x401f71=_0x39886c;for(var _0x17eb9a=_0x2e8a47>0x1?void 0x0:_0x2e8a47?K(_0x44576b,_0x1ce186):_0x44576b,_0x9e4b3a=_0x29a740[_0x401f71(0xa1)]-0x1,_0x3dd2dd;_0x9e4b3a>=0x0;_0x9e4b3a--)(_0x3dd2dd=_0x29a740[_0x9e4b3a])&&(_0x17eb9a=_0x3dd2dd(_0x17eb9a)||_0x17eb9a);return _0x17eb9a;},p=(_0x5f2760,_0x5a91f6)=>(_0x206706,_0x4d0370)=>_0x5a91f6(_0x206706,_0x4d0370,_0x5f2760);let S=class extends _0x41eace{constructor(_0x4d6662,_0x4ae1ff,_0x58133e,_0x2f3ec0){const _0x44b827=_0x39886c;super(),this['_commentService']=_0x4d6662,this[_0x44b827(0x97)]=_0x4ae1ff,this[_0x44b827(0x95)]=_0x58133e,this[_0x44b827(0xbc)]=_0x2f3ec0,this[_0x44b827(0xc4)](),this[_0x44b827(0x88)]();}[_0x39886c(0x88)](){const _0x45bd2f=_0x39886c;this[_0x45bd2f(0xd3)](this[_0x45bd2f(0x97)][_0x45bd2f(0xc5)]['pipe'](_0x4c3460(0x10))['subscribe'](_0x4d0dfa=>{const _0x9bfcac=_0x45bd2f,_0x5c2b06=new Set();_0x4d0dfa['forEach'](_0x474358=>{const _0x144d87=_0x3d57;switch(_0x474358['type']){case _0x144d87(0x92):{const _0x1cb79b=_0x474358['payload'][_0x144d87(0x8f)];_0x5c2b06[_0x144d87(0x92)](_0x1cb79b);break;}}}),B(this[_0x9bfcac(0xbc)],_0x5c2b06);}));}[_0x39886c(0xc4)](){const _0x1ed618=_0x39886c;this[_0x1ed618(0xd3)](this[_0x1ed618(0xa5)][_0x1ed618(0xc5)]['subscribe'](async _0x4155f2=>{const _0x26cd9a=_0x1ed618;var _0x247e86,_0x25f7d6,_0x41d695,_0x5e9f39;const _0x359b5b=(_0x247e86=this[_0x26cd9a(0x97)][_0x26cd9a(0xbd)](_0x4155f2[_0x26cd9a(0xaf)])[_0x26cd9a(0x83)](_0x5ce09e=>_0x5ce09e[_0x26cd9a(0xca)]===_0x4155f2[_0x26cd9a(0xca)]))==null?void 0x0:_0x247e86[_0x26cd9a(0xb4)];if(!_0x359b5b)return;const {unitId:_0x1e85e,subUnitId:_0x11ae3a}=_0x359b5b;switch(_0x4155f2[_0x26cd9a(0x99)]&&this[_0x26cd9a(0x95)][_0x26cd9a(0xd4)](_0x4155f2[_0x26cd9a(0x99)]),_0x4155f2[_0x26cd9a(0xb1)]){case v[_0x26cd9a(0xc1)]:break;case v[_0x26cd9a(0x9a)]:{this[_0x26cd9a(0x97)][_0x26cd9a(0x98)](_0x1e85e,_0x11ae3a,{'unitId':_0x1e85e,'subUnitId':_0x11ae3a,'ref':'','id':_0x4155f2[_0x26cd9a(0xb0)],'dT':D(+_0x4155f2[_0x26cd9a(0x82)]),'threadId':_0x4155f2[_0x26cd9a(0xca)],'personId':(_0x41d695=(_0x25f7d6=_0x4155f2[_0x26cd9a(0x99)])==null?void 0x0:_0x25f7d6['userID'])!=null?_0x41d695:_0x4155f2[_0x26cd9a(0x86)],'text':JSON[_0x26cd9a(0xc9)](_0x4155f2['content']),'parentId':_0x359b5b['id']});break;}case v[_0x26cd9a(0x9d)]:{const _0xa2e8e=this[_0x26cd9a(0x97)]['getComment'](_0x1e85e,_0x11ae3a,_0x4155f2[_0x26cd9a(0xb0)]);_0xa2e8e&&_0xa2e8e['parentId']&&this[_0x26cd9a(0x97)][_0x26cd9a(0xae)](_0x1e85e,_0x11ae3a,_0x4155f2[_0x26cd9a(0xb0)]);break;}case v[_0x26cd9a(0x84)]:{this[_0x26cd9a(0x97)][_0x26cd9a(0xa8)](_0x1e85e,_0x11ae3a,{'commentId':_0x4155f2['replyId'],'text':JSON[_0x26cd9a(0xc9)](_0x4155f2[_0x26cd9a(0xc7)])});break;}case v[_0x26cd9a(0x89)]:{const _0x123507=(_0x5e9f39=this[_0x26cd9a(0x97)]['getUnit'](_0x4155f2['unitId'])[_0x26cd9a(0x83)](_0x371ee0=>_0x371ee0['threadId']===_0x4155f2[_0x26cd9a(0xca)]))==null?void 0x0:_0x5e9f39['root'];_0x123507&&this[_0x26cd9a(0x97)][_0x26cd9a(0xc3)](_0x1e85e,_0x11ae3a,_0x123507['id'],_0x4155f2[_0x26cd9a(0x9e)]===I[_0x26cd9a(0x80)]);break;}}}));}};S=V([p(0x0,_0x361c7c(_0x5ec5d5)),p(0x1,_0x361c7c(_0x563c28)),p(0x2,_0x361c7c(_0x3307ae)),p(0x3,_0x361c7c(_0x585345))],S);const z=_0x39886c(0xbe),M={};function _0x3533(){const _0x4d9ab5=['/reply','customRanges','191355sMMxkj','error','users','disposeWithMe','addUser','get','filter','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','_sessionService','requireSession','_threadCommentDataSource','stringify','syncUpdateMutationToColla','COMMENT','reply','code','/solved','rangeId','5278419GIllrd','14WhDRUU','Solved','Unknown','createTimestamp','find','Edit','_config','userId','symbol','_initUserSync','Solve','setConfig','rangeType','_httpService','/universer-api/comment/unit/','replies','personId','OpenOrReOpen','format','add','pluginName','3456795gkspCh','_userService','onReady','_threadCommentModel','addComment','user','Reply','size','getMemberID','Delete','solved','UNIVER_UNKNOWN','_initDataSource','length','1309896tdsCln','forEach','getCurrentUser','_commentService','post','resolved','updateComment','6MHFJxs','map','ref','_configService','2DZiYsX','deleteComment','unitId','replyId','type','body','639252bIgXBv','root','/list','dataSource','values','delete','defineProperty','userID','/add','_injector','getUnit','thread-comment-data-source.config','9822720SWhxud','getOwnPropertyDescriptor','Add','_threadCommentDataSourceService','resolveComment','_init','commentUpdate$','965416gWcaPo','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parse','threadId','getUser','listComments','slice'];_0x3533=function(){return _0x4d9ab5;};return _0x3533();}var k=Object[_0x39886c(0xc0)],Q=(_0x27caee,_0x2c1173,_0x3df7f4,_0x4ba2d4)=>{for(var _0x43e158=_0x4ba2d4>0x1?void 0x0:_0x4ba2d4?k(_0x2c1173,_0x3df7f4):_0x2c1173,_0x5c3eca=_0x27caee['length']-0x1,_0x157efd;_0x5c3eca>=0x0;_0x5c3eca--)(_0x157efd=_0x27caee[_0x5c3eca])&&(_0x43e158=_0x157efd(_0x43e158)||_0x43e158);return _0x43e158;},_=(_0x5e8b9d,_0x302278)=>(_0xa05181,_0x433fed)=>_0x302278(_0xa05181,_0x433fed,_0x5e8b9d);function X(_0x52db82,_0x1bb424){const _0x16260c=_0x39886c,_0x35e06d=_0x52db82[_0x16260c(0x8e)][0x0];return{..._0x1bb424,'id':_0x35e06d[_0x16260c(0xb0)],'resolved':_0x52db82[_0x16260c(0x9e)]===0x1,'dT':D(_0x35e06d['createTimestamp']),'personId':_0x35e06d[_0x16260c(0x86)],'threadId':_0x35e06d['threadId']};}function ee(_0x1756eb,_0x5bacad,_0x466eef){const _0x1d33dc=_0x39886c;var _0x251756,_0x223ffc;if(((_0x223ffc=(_0x251756=_0x1756eb==null?void 0x0:_0x1756eb['replies'])==null?void 0x0:_0x251756[_0x1d33dc(0xa1)])!=null?_0x223ffc:0x0)>0x0){const _0x59ea43=(_0x1cb48c,_0x49f513)=>({'id':_0x1cb48c[_0x1d33dc(0xb0)],'threadId':_0x1cb48c['threadId'],'dT':D(_0x1cb48c[_0x1d33dc(0x82)]),'personId':_0x1cb48c['userId'],'resolved':_0x1756eb[_0x1d33dc(0x9e)]===I[_0x1d33dc(0x80)],'unitId':_0x5bacad,'subUnitId':_0x466eef,'text':JSON[_0x1d33dc(0xc9)](_0x1cb48c[_0x1d33dc(0xc7)]),'parentId':_0x49f513}),_0x58982e=_0x59ea43(_0x1756eb[_0x1d33dc(0x8e)][0x0]);return{..._0x58982e,'children':_0x1756eb['replies'][_0x1d33dc(0xcd)](0x1)[_0x1d33dc(0xaa)](_0x3eeb2c=>_0x59ea43(_0x3eeb2c,_0x58982e['id']))};}return null;}let f=class{constructor(_0x440ec8,_0x163202,_0x3aeecf,_0x4a520e){const _0x58773b=_0x39886c;this[_0x58773b(0x8c)]=_0x440ec8,this[_0x58773b(0x95)]=_0x163202,this[_0x58773b(0xd9)]=_0x3aeecf,this[_0x58773b(0xbc)]=_0x4a520e;}async[_0x39886c(0x98)](_0x5ef400){const _0x23d365=_0x39886c;var _0x559da1,_0x51fbae;const {parentId:_0x47c123,unitId:_0x49820b,text:_0x1e8667,threadId:_0x4add82}=_0x5ef400,_0x29f8ab=(_0x51fbae=(_0x559da1=_0x1e8667[_0x23d365(0xcf)])==null?void 0x0:_0x559da1['filter'](_0x72771a=>_0x72771a[_0x23d365(0x8b)]===_0x86fd2c[_0x23d365(0xde)])[_0x23d365(0xaa)](_0x560e9d=>_0x560e9d[_0x23d365(0xe2)]))!=null?_0x51fbae:[],_0x136ca0=JSON[_0x23d365(0xdc)](_0x1e8667),_0x1f3f91=(await this[_0x23d365(0xd9)]['requireSession'](_0x49820b))['getMemberID']();if(_0x47c123){const _0x2e711a={'memberId':_0x1f3f91,'unitId':_0x49820b,'content':_0x136ca0,'mention':_0x29f8ab,'threadId':_0x4add82},_0x38aca9=(await this['_httpService']['post'](_0x23d365(0x8d)+_0x49820b+_0x23d365(0xce),{'body':_0x2e711a}))['body'][_0x23d365(0xdf)];return{..._0x5ef400,'id':_0x38aca9[_0x23d365(0xb0)],'dT':_0x56943a(+_0x38aca9[_0x23d365(0x82)])[_0x23d365(0x91)](_0x23d365(0xd8)),'personId':_0x38aca9[_0x23d365(0x86)]};}else{const _0x4a2ea5={'memberId':_0x1f3f91,'unitId':_0x49820b,'content':_0x136ca0,'mention':_0x29f8ab},_0x466e56=await this[_0x23d365(0x8c)][_0x23d365(0xa6)]('/universer-api/comment/unit/'+_0x49820b+_0x23d365(0xbb),{'body':_0x4a2ea5});return X(_0x466e56[_0x23d365(0xb2)]['comment'],_0x5ef400);}}async[_0x39886c(0xa8)](_0x2615cc){const _0x177d9c=_0x39886c;var _0x49dc6f,_0x11e42c;const {text:_0x17e4ea,unitId:_0x31fe31}=_0x2615cc,_0x77a1f3=(_0x11e42c=(_0x49dc6f=_0x17e4ea[_0x177d9c(0xcf)])==null?void 0x0:_0x49dc6f[_0x177d9c(0xd6)](_0x32534a=>_0x32534a[_0x177d9c(0x8b)]===_0x86fd2c[_0x177d9c(0xde)])[_0x177d9c(0xaa)](_0x39cdf8=>_0x39cdf8[_0x177d9c(0xe2)]))!=null?_0x11e42c:[],_0x2d6b90=JSON[_0x177d9c(0xdc)](_0x17e4ea),_0x1d291d=_0x2615cc['threadId'],_0x390d6b=_0x2615cc['id'],_0x2eb635={'memberId':(await this[_0x177d9c(0xd9)][_0x177d9c(0xda)](_0x31fe31))[_0x177d9c(0x9c)](),'unitId':_0x31fe31,'threadId':_0x1d291d,'mention':_0x77a1f3,'content':_0x2d6b90,'replyId':_0x390d6b},_0x45516c=await this[_0x177d9c(0x8c)][_0x177d9c(0xa6)]('/universer-api/comment/unit/'+_0x31fe31+'/edit',{'body':_0x2eb635});return!_0x45516c[_0x177d9c(0xb2)][_0x177d9c(0xd1)]||_0x45516c[_0x177d9c(0xb2)]['error'][_0x177d9c(0xe0)]===0x1;}async[_0x39886c(0xc3)](_0x55755a){const _0x2fb7c5=_0x39886c,{unitId:_0x5316df}=_0x55755a,_0x183734=_0x55755a[_0x2fb7c5(0xca)],_0x27a597={'memberId':this[_0x2fb7c5(0x95)][_0x2fb7c5(0xa4)]()[_0x2fb7c5(0xba)],'unitId':_0x5316df,'threadId':_0x183734,'solved':_0x55755a[_0x2fb7c5(0xa7)]?I['Solved']:I[_0x2fb7c5(0x90)]},_0x104d8e=await this[_0x2fb7c5(0x8c)][_0x2fb7c5(0xa6)](_0x2fb7c5(0x8d)+_0x5316df+_0x2fb7c5(0xe1),{'body':_0x27a597});return!_0x104d8e[_0x2fb7c5(0xb2)][_0x2fb7c5(0xd1)]||_0x104d8e[_0x2fb7c5(0xb2)]['error']['code']===0x1;}async['deleteComment'](_0x2a7bed,_0x42235b,_0x79369b,_0x14d604){const _0x2f8f54=_0x39886c,_0xf2418={'memberId':(await this['_sessionService']['requireSession'](_0x2a7bed))['getMemberID'](),'threadId':_0x79369b,'replyId':_0x14d604,'unitId':_0x2a7bed},_0x57e576=await this[_0x2f8f54(0x8c)][_0x2f8f54(0xa6)]('/universer-api/comment/unit/'+_0x2a7bed+'/delete',{'body':_0xf2418});return!_0x57e576[_0x2f8f54(0xb2)]['error']||_0x57e576[_0x2f8f54(0xb2)][_0x2f8f54(0xd1)][_0x2f8f54(0xe0)]===0x1;}async[_0x39886c(0xcc)](_0x4e66b1,_0x42b289,_0x58a73f){const _0x16acf5=_0x39886c,_0x27869d={'unitId':_0x4e66b1,'threadId':_0x58a73f},_0x1e4cf0=await this[_0x16acf5(0x8c)]['post'](_0x16acf5(0x8d)+_0x4e66b1+_0x16acf5(0xb5),{'body':_0x27869d}),_0x4c367f=_0x58a73f[_0x16acf5(0xaa)](_0x2aae77=>ee(_0x1e4cf0['body']['comments'][_0x2aae77],_0x4e66b1,_0x42b289))[_0x16acf5(0xd6)](Boolean);return Object[_0x16acf5(0xb7)](_0x1e4cf0[_0x16acf5(0xb2)]['users'])[_0x16acf5(0xa3)](_0x1cba00=>{const _0x26bdf0=_0x16acf5;this['_userService'][_0x26bdf0(0xd4)](_0x1cba00);}),_0x4c367f;}['saveCommentToSnapshot'](_0x2d343f){const _0x3ead00=_0x39886c;return{'id':_0x2d343f['id'],'threadId':_0x2d343f[_0x3ead00(0xca)],'ref':_0x2d343f[_0x3ead00(0xab)]};}};f=Q([_(0x0,_0x361c7c(_0x5c7a01)),_(0x1,_0x361c7c(_0x3307ae)),_(0x2,_0x361c7c(_0x2f98bf)),_(0x3,_0x361c7c(_0x585345))],f);var re=Object[_0x39886c(0xc0)],te=(_0x1a593c,_0x302d7c,_0x36c683,_0x610613)=>{const _0x2309f5=_0x39886c;for(var _0xb77bd5=_0x610613>0x1?void 0x0:_0x610613?re(_0x302d7c,_0x36c683):_0x302d7c,_0x23ea12=_0x1a593c[_0x2309f5(0xa1)]-0x1,_0x2cf29e;_0x23ea12>=0x0;_0x23ea12--)(_0x2cf29e=_0x1a593c[_0x23ea12])&&(_0xb77bd5=_0x2cf29e(_0xb77bd5)||_0xb77bd5);return _0xb77bd5;},N=(_0x5598ca,_0x8bd59e)=>(_0x1612a5,_0x334700)=>_0x8bd59e(_0x1612a5,_0x334700,_0x5598ca);let g=class extends _0x41eace{constructor(_0x347896,_0x3ebda7){const _0x360e8a=_0x39886c;super(),this[_0x360e8a(0xc2)]=_0x347896,this['_threadCommentDataSource']=_0x3ebda7,this[_0x360e8a(0xa0)]();}[_0x39886c(0xa0)](){const _0x1e9fd8=_0x39886c;this[_0x1e9fd8(0xc2)][_0x1e9fd8(0xb6)]=this[_0x1e9fd8(0xdb)],this[_0x1e9fd8(0xc2)][_0x1e9fd8(0xdd)]=!0x1;}};g=te([N(0x0,_0x852eb8),N(0x1,_0x361c7c(f))],g);var se=Object[_0x39886c(0xb9)],oe=Object[_0x39886c(0xc0)],ne=(_0x516097,_0xdb44bb,_0x29f9e3)=>_0xdb44bb in _0x516097?se(_0x516097,_0xdb44bb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29f9e3}):_0x516097[_0xdb44bb]=_0x29f9e3,ie=(_0x49640a,_0x5d20d1,_0x19abec,_0x36c7a2)=>{const _0x3e833a=_0x39886c;for(var _0x24987f=_0x36c7a2>0x1?void 0x0:_0x36c7a2?oe(_0x5d20d1,_0x19abec):_0x5d20d1,_0x453cf1=_0x49640a[_0x3e833a(0xa1)]-0x1,_0xc578a3;_0x453cf1>=0x0;_0x453cf1--)(_0xc578a3=_0x49640a[_0x453cf1])&&(_0x24987f=_0xc578a3(_0x24987f)||_0x24987f);return _0x24987f;},w=(_0x329b6a,_0x1dcdcf)=>(_0x19706b,_0x42322c)=>_0x1dcdcf(_0x19706b,_0x42322c,_0x329b6a),$=(_0x2a1c2b,_0xa592,_0x327d14)=>ne(_0x2a1c2b,typeof _0xa592!=_0x39886c(0x87)?_0xa592+'':_0xa592,_0x327d14);let b=class extends _0x5da7bd{constructor(_0x4b5d60=M,_0x5df046,_0x18ceb7){const _0x2f1178=_0x39886c;super(),this[_0x2f1178(0x85)]=_0x4b5d60,this[_0x2f1178(0xbc)]=_0x5df046,this['_configService']=_0x18ceb7;const {..._0x5d8b90}=_0x22fe1a({},M,this[_0x2f1178(0x85)]);this[_0x2f1178(0xac)][_0x2f1178(0x8a)](z,_0x5d8b90);}['onStarting'](){const _0x4f9a77=_0x39886c;[[f],[g],[S]][_0x4f9a77(0xa3)](_0x4bba79=>{this['_injector']['add'](_0x4bba79);});}[_0x39886c(0x96)](){const _0x21854f=_0x39886c;this[_0x21854f(0xbc)]['get'](g),this[_0x21854f(0xbc)][_0x21854f(0xd5)](S);}};$(b,_0x39886c(0x93),W),$(b,_0x39886c(0xb1),_0x235ad1[_0x39886c(0x9f)]),b=ie([_0x56b67b(_0x230aaa,_0x1627d3,_0x2b2705),w(0x1,_0x361c7c(_0x585345)),w(0x2,_0x45f6f1)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2482b5=_0x36f5;(function(_0xf1335b,_0x1e66f9){const _0x3b88e6=_0x36f5,_0x1d9984=_0xf1335b();while(!![]){try{const _0x43c6fe=-parseInt(_0x3b88e6(0x225))/0x1+parseInt(_0x3b88e6(0x1fc))/0x2*(parseInt(_0x3b88e6(0x244))/0x3)+-parseInt(_0x3b88e6(0x21a))/0x4*(-parseInt(_0x3b88e6(0x23e))/0x5)+parseInt(_0x3b88e6(0x229))/0x6+parseInt(_0x3b88e6(0x1f9))/0x7+parseInt(_0x3b88e6(0x240))/0x8+-parseInt(_0x3b88e6(0x208))/0x9;if(_0x43c6fe===_0x1e66f9)break;else _0x1d9984['push'](_0x1d9984['shift']());}catch(_0x2ea407){_0x1d9984['push'](_0x1d9984['shift']());}}}(_0x30b3,0x891ac));function _0x30b3(){const _0x4fa12f=['Delete','UNRECOGNIZED','4776290WrAOWT','/list','8201728AKXjWL','getCurrentUser','/add','userID','15MXOVqQ','get','add','subscribe','threadId','Solved','OpenOrReOpen','Unknown','_threadCommentDataSourceService','_init','format','getUser','ref','rangeType','dataSource','type','saveCommentToSnapshot','unitId','parse','/solved','root','_commentService','addUser','content','_httpService','1070755FtPsgk','onReady','_sessionService','210396nxmMJr','deleteComment','_threadCommentDataSource','disposeWithMe','requireSession','syncUpdateMutationToColla','map','Reply','listComments','replies','forEach','createTimestamp','15225912GAfFzj','setConfig','Add','slice','defineProperty','Edit','replyId','_injector','filter','_initUserSync','_config','_initDataSource','stringify','comments','code','COMMENT','getComment','_threadCommentModel','4wNRoPK','getMemberID','personId','commentUpdate$','userId','/delete','symbol','/universer-api/comment/unit/','user','_userService','values','431867DAfKgI','size','/reply','length','154716OeLVTs','getUnit','customRanges','comment','Solve','/universer-api/user/list','solved','updateComment','error','_configService','find','getOwnPropertyDescriptor','users','body','resolveComment','UNIVER_UNKNOWN','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','post','addComment'];_0x30b3=function(){return _0x4fa12f;};return _0x30b3();}import{CommentService as _0x48a9f5,CollaborationSessionService as _0x385d7c,UniverCollaborationClientPlugin as _0x1aa4b3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x26258d}from'@univerjs-pro/license';import{dayjs as _0x1fe5ef,UserManagerService as _0x3f1b78,Inject as _0x1289ff,Injector as _0x378ce5,Disposable as _0x1663e6,CustomRangeType as _0x261728,UniverInstanceType as _0x5abae1,DependentOn as _0x15259c,IConfigService as _0xa1e2a6,Plugin as _0x1215a8,merge as _0x4f79b5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x43a799}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x49d49f,IThreadCommentDataSourceService as _0x555c27}from'@univerjs/thread-comment';import{bufferTime as _0x292fec}from'rxjs';function _0x36f5(_0x46d50a,_0xed5230){const _0x30b3c7=_0x30b3();return _0x36f5=function(_0x36f55e,_0x2b6a04){_0x36f55e=_0x36f55e-0x1f0;let _0x2887ba=_0x30b3c7[_0x36f55e];return _0x2887ba;},_0x36f5(_0x46d50a,_0xed5230);}import{HTTPService as _0x4193ea}from'@univerjs/network';const W=_0x2482b5(0x239);var I=(_0x3bb1e9=>(_0x3bb1e9[_0x3bb1e9[_0x2482b5(0x24a)]=0x0]=_0x2482b5(0x24a),_0x3bb1e9[_0x3bb1e9[_0x2482b5(0x249)]=0x1]='Solved',_0x3bb1e9[_0x3bb1e9[_0x2482b5(0x23d)]=-0x1]=_0x2482b5(0x23d),_0x3bb1e9))(I||{}),v=(_0x3cb929=>(_0x3cb929[_0x3cb929['Unknown']=0x0]=_0x2482b5(0x24b),_0x3cb929[_0x3cb929['Add']=0x1]=_0x2482b5(0x20a),_0x3cb929[_0x3cb929['Reply']=0x2]=_0x2482b5(0x203),_0x3cb929[_0x3cb929['Edit']=0x3]=_0x2482b5(0x20d),_0x3cb929[_0x3cb929[_0x2482b5(0x23c)]=0x4]=_0x2482b5(0x23c),_0x3cb929[_0x3cb929[_0x2482b5(0x22d)]=0x5]=_0x2482b5(0x22d),_0x3cb929[_0x3cb929[_0x2482b5(0x23d)]=-0x1]=_0x2482b5(0x23d),_0x3cb929))(v||{});const y=_0x32c642=>_0x1fe5ef(new Date(+_0x32c642))[_0x2482b5(0x24e)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x949c69,_0x2111f5)=>{const _0x22bfed=_0x2482b5,_0x51129b=_0x949c69[_0x22bfed(0x245)](_0x3f1b78),_0x2b40db=_0x949c69['get'](_0x4193ea);_0x2111f5[_0x22bfed(0x206)](_0x47794d=>{const _0x17e38b=_0x22bfed;_0x51129b[_0x17e38b(0x24f)](_0x47794d)&&_0x2111f5['delete'](_0x47794d);}),_0x2111f5[_0x22bfed(0x226)]&&(await _0x2b40db[_0x22bfed(0x245)](_0x22bfed(0x22e),{'params':{'userIDs':[..._0x2111f5]}}))[_0x22bfed(0x236)][_0x22bfed(0x235)]['forEach'](_0x5c565c=>{_0x5c565c&&_0x51129b['addUser'](_0x5c565c);});};var K=Object[_0x2482b5(0x234)],V=(_0x5ac750,_0xd338f0,_0x182ff9,_0x466841)=>{const _0x51e246=_0x2482b5;for(var _0x592327=_0x466841>0x1?void 0x0:_0x466841?K(_0xd338f0,_0x182ff9):_0xd338f0,_0x50dd29=_0x5ac750[_0x51e246(0x228)]-0x1,_0x25d153;_0x50dd29>=0x0;_0x50dd29--)(_0x25d153=_0x5ac750[_0x50dd29])&&(_0x592327=_0x25d153(_0x592327)||_0x592327);return _0x592327;},p=(_0x32fadb,_0x1de72e)=>(_0x2af5c7,_0x2798f6)=>_0x1de72e(_0x2af5c7,_0x2798f6,_0x32fadb);let _=class extends _0x1663e6{constructor(_0x40cd04,_0x3d6d90,_0x43e864,_0x16f732){const _0x260579=_0x2482b5;super(),this[_0x260579(0x1f5)]=_0x40cd04,this['_threadCommentModel']=_0x3d6d90,this[_0x260579(0x223)]=_0x43e864,this['_injector']=_0x16f732,this[_0x260579(0x24d)](),this[_0x260579(0x211)]();}[_0x2482b5(0x211)](){const _0x1d08f4=_0x2482b5;this['disposeWithMe'](this[_0x1d08f4(0x219)][_0x1d08f4(0x21d)]['pipe'](_0x292fec(0x10))[_0x1d08f4(0x247)](_0x597c20=>{const _0x4acf03=_0x1d08f4,_0xe03f25=new Set();_0x597c20[_0x4acf03(0x206)](_0xd568bd=>{const _0x5b6480=_0x4acf03;switch(_0xd568bd['type']){case'add':{const _0x162b3e=_0xd568bd['payload'][_0x5b6480(0x21c)];_0xe03f25[_0x5b6480(0x246)](_0x162b3e);break;}}}),B(this[_0x4acf03(0x20f)],_0xe03f25);}));}[_0x2482b5(0x24d)](){const _0x786df1=_0x2482b5;this[_0x786df1(0x1ff)](this[_0x786df1(0x1f5)][_0x786df1(0x21d)][_0x786df1(0x247)](async _0x43234c=>{const _0x369663=_0x786df1;var _0x10b72a,_0x1225b6,_0x1165f2,_0x3bed3d;const _0x33eea7=(_0x10b72a=this[_0x369663(0x219)]['getUnit'](_0x43234c[_0x369663(0x1f1)])[_0x369663(0x233)](_0x5c2d53=>_0x5c2d53['threadId']===_0x43234c[_0x369663(0x248)]))==null?void 0x0:_0x10b72a[_0x369663(0x1f4)];if(!_0x33eea7)return;const {unitId:_0x493a78,subUnitId:_0x5af512}=_0x33eea7;switch(_0x43234c['user']&&this['_userService'][_0x369663(0x1f6)](_0x43234c[_0x369663(0x222)]),_0x43234c[_0x369663(0x253)]){case v[_0x369663(0x20a)]:break;case v[_0x369663(0x203)]:{this[_0x369663(0x219)]['addComment'](_0x493a78,_0x5af512,{'unitId':_0x493a78,'subUnitId':_0x5af512,'ref':'','id':_0x43234c[_0x369663(0x20e)],'dT':y(+_0x43234c['createTimestamp']),'threadId':_0x43234c[_0x369663(0x248)],'personId':(_0x1165f2=(_0x1225b6=_0x43234c[_0x369663(0x222)])==null?void 0x0:_0x1225b6[_0x369663(0x243)])!=null?_0x1165f2:_0x43234c['userId'],'text':JSON[_0x369663(0x1f2)](_0x43234c[_0x369663(0x1f7)]),'parentId':_0x33eea7['id']});break;}case v[_0x369663(0x23c)]:{const _0x24db09=this[_0x369663(0x219)][_0x369663(0x218)](_0x493a78,_0x5af512,_0x43234c[_0x369663(0x20e)]);_0x24db09&&_0x24db09['parentId']&&this[_0x369663(0x219)]['deleteComment'](_0x493a78,_0x5af512,_0x43234c['replyId']);break;}case v['Edit']:{this[_0x369663(0x219)][_0x369663(0x230)](_0x493a78,_0x5af512,{'commentId':_0x43234c[_0x369663(0x20e)],'text':JSON[_0x369663(0x1f2)](_0x43234c['content'])});break;}case v[_0x369663(0x22d)]:{const _0x489c03=(_0x3bed3d=this[_0x369663(0x219)][_0x369663(0x22a)](_0x43234c[_0x369663(0x1f1)])[_0x369663(0x233)](_0x9c06ca=>_0x9c06ca[_0x369663(0x248)]===_0x43234c[_0x369663(0x248)]))==null?void 0x0:_0x3bed3d[_0x369663(0x1f4)];_0x489c03&&this[_0x369663(0x219)][_0x369663(0x237)](_0x493a78,_0x5af512,_0x489c03['id'],_0x43234c[_0x369663(0x22f)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x1289ff(_0x48a9f5)),p(0x1,_0x1289ff(_0x49d49f)),p(0x2,_0x1289ff(_0x3f1b78)),p(0x3,_0x1289ff(_0x378ce5))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x2482b5(0x234)],Q=(_0xa7119c,_0x332659,_0x2815c1,_0x137673)=>{const _0x29e9a6=_0x2482b5;for(var _0x1fba62=_0x137673>0x1?void 0x0:_0x137673?k(_0x332659,_0x2815c1):_0x332659,_0x2f2138=_0xa7119c[_0x29e9a6(0x228)]-0x1,_0x53cb04;_0x2f2138>=0x0;_0x2f2138--)(_0x53cb04=_0xa7119c[_0x2f2138])&&(_0x1fba62=_0x53cb04(_0x1fba62)||_0x1fba62);return _0x1fba62;},b=(_0x185208,_0xbd1c9f)=>(_0x2328c8,_0x57fbd8)=>_0xbd1c9f(_0x2328c8,_0x57fbd8,_0x185208);function X(_0x3b7d98,_0x11b8b2){const _0x1ee499=_0x2482b5,_0x1f49b4=_0x3b7d98[_0x1ee499(0x205)][0x0];return{..._0x11b8b2,'id':_0x1f49b4[_0x1ee499(0x20e)],'resolved':_0x3b7d98[_0x1ee499(0x22f)]===0x1,'dT':y(_0x1f49b4[_0x1ee499(0x207)]),'personId':_0x1f49b4[_0x1ee499(0x21e)],'threadId':_0x1f49b4[_0x1ee499(0x248)]};}function ee(_0x5851ba,_0x8d91de,_0x57b405){const _0x33de5d=_0x2482b5;var _0x32bdfb,_0x5221af;if(((_0x5221af=(_0x32bdfb=_0x5851ba==null?void 0x0:_0x5851ba[_0x33de5d(0x205)])==null?void 0x0:_0x32bdfb[_0x33de5d(0x228)])!=null?_0x5221af:0x0)>0x0){const _0x30f85e=(_0x9a3d55,_0x209e05)=>({'id':_0x9a3d55[_0x33de5d(0x20e)],'threadId':_0x9a3d55[_0x33de5d(0x248)],'dT':y(_0x9a3d55[_0x33de5d(0x207)]),'personId':_0x9a3d55[_0x33de5d(0x21e)],'resolved':_0x5851ba[_0x33de5d(0x22f)]===I[_0x33de5d(0x249)],'unitId':_0x8d91de,'subUnitId':_0x57b405,'text':JSON[_0x33de5d(0x1f2)](_0x9a3d55[_0x33de5d(0x1f7)]),'parentId':_0x209e05}),_0x2e0a10=_0x30f85e(_0x5851ba['replies'][0x0]);return{..._0x2e0a10,'children':_0x5851ba['replies'][_0x33de5d(0x20b)](0x1)['map'](_0x4455e7=>_0x30f85e(_0x4455e7,_0x2e0a10['id']))};}return null;}let S=class{constructor(_0x296e7d,_0x5154a8,_0x172d19){const _0x34ac29=_0x2482b5;this['_httpService']=_0x296e7d,this[_0x34ac29(0x223)]=_0x5154a8,this[_0x34ac29(0x1fb)]=_0x172d19;}async[_0x2482b5(0x23b)](_0x421dab){const _0x247af1=_0x2482b5;var _0x660813,_0x5f107c;const {parentId:_0x5ad9d1,unitId:_0xeeb610,text:_0xc12cb7,threadId:_0x562bcd}=_0x421dab,_0x31995d=(_0x5f107c=(_0x660813=_0xc12cb7[_0x247af1(0x22b)])==null?void 0x0:_0x660813[_0x247af1(0x210)](_0x20ae9e=>_0x20ae9e[_0x247af1(0x251)]===_0x261728[_0x247af1(0x217)])['map'](_0x2a1201=>_0x2a1201['rangeId']))!=null?_0x5f107c:[],_0x4260b5=JSON[_0x247af1(0x214)](_0xc12cb7),_0x54e567=(await this[_0x247af1(0x1fb)][_0x247af1(0x200)](_0xeeb610))[_0x247af1(0x21b)]();if(_0x5ad9d1){const _0x17f1a2={'memberId':_0x54e567,'unitId':_0xeeb610,'content':_0x4260b5,'mention':_0x31995d,'threadId':_0x562bcd},_0x5fb4cd=(await this[_0x247af1(0x1f8)][_0x247af1(0x23a)](_0x247af1(0x221)+_0xeeb610+_0x247af1(0x227),{'body':_0x17f1a2}))['body']['reply'];return{..._0x421dab,'id':_0x5fb4cd[_0x247af1(0x20e)],'dT':_0x1fe5ef(+_0x5fb4cd[_0x247af1(0x207)])[_0x247af1(0x24e)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5fb4cd[_0x247af1(0x21e)]};}else{const _0x42a2a8={'memberId':_0x54e567,'unitId':_0xeeb610,'content':_0x4260b5,'mention':_0x31995d},_0x13b663=await this[_0x247af1(0x1f8)][_0x247af1(0x23a)](_0x247af1(0x221)+_0xeeb610+_0x247af1(0x242),{'body':_0x42a2a8});return X(_0x13b663['body'][_0x247af1(0x22c)],_0x421dab);}}async['updateComment'](_0x31c808){const _0x53ffca=_0x2482b5;var _0x53a46d,_0x4a9e08;const {text:_0x217b9a,unitId:_0xec6bc5}=_0x31c808,_0x378b97=(_0x4a9e08=(_0x53a46d=_0x217b9a['customRanges'])==null?void 0x0:_0x53a46d['filter'](_0x392a59=>_0x392a59[_0x53ffca(0x251)]===_0x261728[_0x53ffca(0x217)])[_0x53ffca(0x202)](_0x7b95a8=>_0x7b95a8['rangeId']))!=null?_0x4a9e08:[],_0x3bb85b=JSON[_0x53ffca(0x214)](_0x217b9a),_0x1cd503=_0x31c808['threadId'],_0x3d6525=_0x31c808['id'],_0x495519={'memberId':(await this[_0x53ffca(0x1fb)][_0x53ffca(0x200)](_0xec6bc5))[_0x53ffca(0x21b)](),'unitId':_0xec6bc5,'threadId':_0x1cd503,'mention':_0x378b97,'content':_0x3bb85b,'replyId':_0x3d6525},_0x1c8f61=await this['_httpService'][_0x53ffca(0x23a)](_0x53ffca(0x221)+_0xec6bc5+'/edit',{'body':_0x495519});return!_0x1c8f61[_0x53ffca(0x236)]['error']||_0x1c8f61[_0x53ffca(0x236)][_0x53ffca(0x231)][_0x53ffca(0x216)]===0x1;}async[_0x2482b5(0x237)](_0x1d68fe){const _0x1d590f=_0x2482b5,{unitId:_0x5790af}=_0x1d68fe,_0x113752=_0x1d68fe[_0x1d590f(0x248)],_0x446d51={'memberId':this[_0x1d590f(0x223)][_0x1d590f(0x241)]()['userID'],'unitId':_0x5790af,'threadId':_0x113752,'solved':_0x1d68fe['resolved']?I[_0x1d590f(0x249)]:I['OpenOrReOpen']},_0x40ce4f=await this[_0x1d590f(0x1f8)]['post'](_0x1d590f(0x221)+_0x5790af+_0x1d590f(0x1f3),{'body':_0x446d51});return!_0x40ce4f[_0x1d590f(0x236)]['error']||_0x40ce4f[_0x1d590f(0x236)][_0x1d590f(0x231)][_0x1d590f(0x216)]===0x1;}async[_0x2482b5(0x1fd)](_0x2618dd,_0x33f536,_0x3b2d3a,_0x1152dc){const _0x3d1dd9=_0x2482b5,_0x2e0cf5={'memberId':(await this[_0x3d1dd9(0x1fb)]['requireSession'](_0x2618dd))[_0x3d1dd9(0x21b)](),'threadId':_0x3b2d3a,'replyId':_0x1152dc,'unitId':_0x2618dd},_0x5251c8=await this[_0x3d1dd9(0x1f8)]['post'](_0x3d1dd9(0x221)+_0x2618dd+_0x3d1dd9(0x21f),{'body':_0x2e0cf5});return!_0x5251c8[_0x3d1dd9(0x236)]['error']||_0x5251c8['body'][_0x3d1dd9(0x231)][_0x3d1dd9(0x216)]===0x1;}async[_0x2482b5(0x204)](_0x1781af,_0x37c90d,_0x47b7f2){const _0x1a247a=_0x2482b5,_0x5be237={'unitId':_0x1781af,'threadId':_0x47b7f2},_0x52acac=await this[_0x1a247a(0x1f8)][_0x1a247a(0x23a)](_0x1a247a(0x221)+_0x1781af+_0x1a247a(0x23f),{'body':_0x5be237}),_0x15e0d4=_0x47b7f2[_0x1a247a(0x202)](_0x53d206=>ee(_0x52acac[_0x1a247a(0x236)][_0x1a247a(0x215)][_0x53d206],_0x1781af,_0x37c90d))[_0x1a247a(0x210)](Boolean);return Object[_0x1a247a(0x224)](_0x52acac[_0x1a247a(0x236)]['users'])[_0x1a247a(0x206)](_0x3fa766=>{const _0x4a9bcf=_0x1a247a;this[_0x4a9bcf(0x223)][_0x4a9bcf(0x1f6)](_0x3fa766);}),_0x15e0d4;}[_0x2482b5(0x1f0)](_0x41145b){const _0x2a8400=_0x2482b5;return{'id':_0x41145b['id'],'threadId':_0x41145b['threadId'],'ref':_0x41145b[_0x2a8400(0x250)]};}};S=Q([b(0x0,_0x1289ff(_0x4193ea)),b(0x1,_0x1289ff(_0x3f1b78)),b(0x2,_0x1289ff(_0x385d7c))],S);var re=Object[_0x2482b5(0x234)],te=(_0x584608,_0x5b4ed9,_0x1f21ad,_0x403030)=>{const _0x42290c=_0x2482b5;for(var _0xa6baee=_0x403030>0x1?void 0x0:_0x403030?re(_0x5b4ed9,_0x1f21ad):_0x5b4ed9,_0x5adadf=_0x584608[_0x42290c(0x228)]-0x1,_0x13ac6b;_0x5adadf>=0x0;_0x5adadf--)(_0x13ac6b=_0x584608[_0x5adadf])&&(_0xa6baee=_0x13ac6b(_0xa6baee)||_0xa6baee);return _0xa6baee;},M=(_0x3edce6,_0x5a1c40)=>(_0x46f74a,_0x892a5d)=>_0x5a1c40(_0x46f74a,_0x892a5d,_0x3edce6);let f=class extends _0x1663e6{constructor(_0x110fd5,_0x51bcf8){const _0x238d49=_0x2482b5;super(),this[_0x238d49(0x24c)]=_0x110fd5,this[_0x238d49(0x1fe)]=_0x51bcf8,this[_0x238d49(0x213)]();}[_0x2482b5(0x213)](){const _0x27311d=_0x2482b5;this[_0x27311d(0x24c)][_0x27311d(0x252)]=this[_0x27311d(0x1fe)],this[_0x27311d(0x24c)][_0x27311d(0x201)]=!0x1;}};f=te([M(0x0,_0x555c27),M(0x1,_0x1289ff(S))],f);var se=Object[_0x2482b5(0x20c)],oe=Object[_0x2482b5(0x234)],ne=(_0x48c421,_0x1e0d2c,_0x484901)=>_0x1e0d2c in _0x48c421?se(_0x48c421,_0x1e0d2c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x484901}):_0x48c421[_0x1e0d2c]=_0x484901,ie=(_0x2627ee,_0x591dff,_0x2b577f,_0xa0fc13)=>{const _0x3b7da2=_0x2482b5;for(var _0x1fd065=_0xa0fc13>0x1?void 0x0:_0xa0fc13?oe(_0x591dff,_0x2b577f):_0x591dff,_0x24a656=_0x2627ee[_0x3b7da2(0x228)]-0x1,_0xb2f445;_0x24a656>=0x0;_0x24a656--)(_0xb2f445=_0x2627ee[_0x24a656])&&(_0x1fd065=_0xb2f445(_0x1fd065)||_0x1fd065);return _0x1fd065;},N=(_0x45a63c,_0x10070b)=>(_0x5dd389,_0x81c684)=>_0x10070b(_0x5dd389,_0x81c684,_0x45a63c),$=(_0x867e6c,_0x5cf70e,_0x440c9f)=>ne(_0x867e6c,typeof _0x5cf70e!=_0x2482b5(0x220)?_0x5cf70e+'':_0x5cf70e,_0x440c9f);let g=class extends _0x1215a8{constructor(_0xca22b9=O,_0x506ba6,_0x37c07c){const _0x3a2bd2=_0x2482b5;super(),this[_0x3a2bd2(0x212)]=_0xca22b9,this[_0x3a2bd2(0x20f)]=_0x506ba6,this[_0x3a2bd2(0x232)]=_0x37c07c;const {..._0x259999}=_0x4f79b5({},O,this['_config']);this['_configService'][_0x3a2bd2(0x209)](z,_0x259999);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x1f323f=>{const _0x1fe196=_0x36f5;this[_0x1fe196(0x20f)][_0x1fe196(0x246)](_0x1f323f);});}[_0x2482b5(0x1fa)](){const _0x3eed37=_0x2482b5;this[_0x3eed37(0x20f)]['get'](f),this[_0x3eed37(0x20f)][_0x3eed37(0x245)](_);}};$(g,'pluginName',W),$(g,_0x2482b5(0x253),_0x5abae1[_0x2482b5(0x238)]),g=ie([_0x15259c(_0x43a799,_0x1aa4b3,_0x26258d),N(0x1,_0x1289ff(_0x378ce5)),N(0x2,_0xa1e2a6)],g);export{g as UniverThreadCommentDataSourcePlugin};
@@ -1,13 +1,12 @@
1
1
  import { IBaseComment, IThreadComment, IThreadCommentDataSource } from '@univerjs/thread-comment';
2
2
  import { CollaborationSessionService } from '@univerjs-pro/collaboration-client';
3
- import { Injector, UserManagerService } from '@univerjs/core';
3
+ import { UserManagerService } from '@univerjs/core';
4
4
  import { HTTPService } from '@univerjs/network';
5
5
  export declare class ThreadCommentServerDataSource implements IThreadCommentDataSource {
6
6
  private readonly _httpService;
7
7
  private readonly _userService;
8
8
  private readonly _sessionService;
9
- private _injector;
10
- constructor(_httpService: HTTPService, _userService: UserManagerService, _sessionService: CollaborationSessionService, _injector: Injector);
9
+ constructor(_httpService: HTTPService, _userService: UserManagerService, _sessionService: CollaborationSessionService);
11
10
  addComment(comment: IThreadComment): Promise<IThreadComment>;
12
11
  updateComment(comment: IThreadComment): Promise<boolean>;
13
12
  resolveComment(comment: IThreadComment): Promise<boolean>;
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x161f(_0x46cc66,_0x2893f4){const _0x3e1c43=_0x3e1c();return _0x161f=function(_0x161ff1,_0x135c09){_0x161ff1=_0x161ff1-0x70;let _0x3044c5=_0x3e1c43[_0x161ff1];return _0x3044c5;},_0x161f(_0x46cc66,_0x2893f4);}function _0x3e1c(){const _0x5c2c97=['UniverThreadCommentDataSourcePlugin','type','length','subscribe','filter','getOwnPropertyDescriptor','Plugin','_config','UniverThreadCommentUIPlugin','rangeId','createTimestamp','values','unitId','/delete','post','stringify','find','_initUserSync','CollaborationSessionService','function','forEach','getMemberID','UniverCollaborationClientPlugin','format','user','_httpService','body','HTTPService','getUser','DependentOn','_initDataSource','comment','Reply','addComment','bufferTime','rangeType','getComment','pluginName','_threadCommentDataSourceService','threadId','/solved','UniverNetwork','UserManagerService','Unknown','rxjs','_threadCommentDataSource','Module','Solve','commentUpdate$','replies','customRanges','getCurrentUser','_userService','UniverCore','setConfig','@univerjs/thread-comment-ui','replyId','Injector','code','addUser','disposeWithMe','_threadCommentModel','129210glUyXt','_injector','dayjs','_sessionService','onReady','UniverProThreadCommentDatasource','UniverLicensePlugin','IThreadCommentDataSourceService','exports','1828314pyUBmw','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','syncUpdateMutationToColla','updateComment','deleteComment','1611kgZDLj','@univerjs-pro/license','map','userID','ref','Add','listComments','UniverProCollaborationClient','resolveComment','requireSession','parentId','root','/universer-api/comment/unit/','amd','Inject','42FbalBH','userId','YYYY/MM/DD\x20HH:mm','toStringTag','3150706TLdBog','payload','users','143032KoYKzF','solved','10618632SRnYqA','size','UniverInstanceType','Disposable','defineProperty','_configService','slice','getUnit','1964410RNPTjQ','@univerjs/network','OpenOrReOpen','personId','Delete','_commentService','@univerjs/thread-comment','object','@univerjs/core','parse','error','resolved','UNRECOGNIZED','Solved','content','add','reply','/universer-api/user/list','COMMENT','Edit','comments','CustomRangeType','1485569Aktfnq','pipe','@univerjs-pro/collaboration-client','UniverProLicense','129BkTHvs','get','onStarting'];_0x3e1c=function(){return _0x5c2c97;};return _0x3e1c();}(function(_0x5e73a6,_0x46c5fe){const _0x11736a=_0x161f,_0x309197=_0x5e73a6();while(!![]){try{const _0x4b1b55=-parseInt(_0x11736a(0x70))/0x1+parseInt(_0x11736a(0xd7))/0x2+-parseInt(_0x11736a(0x74))/0x3*(parseInt(_0x11736a(0xda))/0x4)+-parseInt(_0x11736a(0xe4))/0x5+-parseInt(_0x11736a(0xbe))/0x6*(-parseInt(_0x11736a(0xd3))/0x7)+-parseInt(_0x11736a(0xdc))/0x8+-parseInt(_0x11736a(0xc4))/0x9*(-parseInt(_0x11736a(0xb5))/0xa);if(_0x4b1b55===_0x46c5fe)break;else _0x309197['push'](_0x309197['shift']());}catch(_0x24c12d){_0x309197['push'](_0x309197['shift']());}}}(_0x3e1c,0xed960),function(_0x33beb2,_0x2b2eb5){const _0x4052b6=_0x161f;typeof exports==_0x4052b6(0xeb)&&typeof module<'u'?_0x2b2eb5(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==_0x4052b6(0x8a)&&define[_0x4052b6(0xd1)]?define([_0x4052b6(0xbd),_0x4052b6(0x72),_0x4052b6(0xc5),_0x4052b6(0xec),_0x4052b6(0xae),_0x4052b6(0xea),'rxjs',_0x4052b6(0xe5)],_0x2b2eb5):(_0x33beb2=typeof globalThis<'u'?globalThis:_0x33beb2||self,_0x2b2eb5(_0x33beb2[_0x4052b6(0xba)]={},_0x33beb2[_0x4052b6(0xcb)],_0x33beb2[_0x4052b6(0x73)],_0x33beb2[_0x4052b6(0xac)],_0x33beb2['UniverThreadCommentUi'],_0x33beb2['UniverThreadComment'],_0x33beb2[_0x4052b6(0xa3)],_0x33beb2[_0x4052b6(0xa0)]));}(this,function(_0x5062d6,_0x10cc09,_0x6d9789,_0x155477,_0x13a88a,_0xaa109b,_0x1afae6,_0x29013c){'use strict';const _0x54280a=_0x161f;const _0xfc6d01=_0x54280a(0xc0);var _0x4702e4=(_0xe2c95f=>(_0xe2c95f[_0xe2c95f['OpenOrReOpen']=0x0]=_0x54280a(0xe6),_0xe2c95f[_0xe2c95f[_0x54280a(0xf1)]=0x1]=_0x54280a(0xf1),_0xe2c95f[_0xe2c95f[_0x54280a(0xf0)]=-0x1]=_0x54280a(0xf0),_0xe2c95f))(_0x4702e4||{}),_0xfe74f0=(_0x95d014=>(_0x95d014[_0x95d014[_0x54280a(0xa2)]=0x0]='Unknown',_0x95d014[_0x95d014[_0x54280a(0xc9)]=0x1]='Add',_0x95d014[_0x95d014['Reply']=0x2]='Reply',_0x95d014[_0x95d014[_0x54280a(0xf7)]=0x3]='Edit',_0x95d014[_0x95d014['Delete']=0x4]=_0x54280a(0xe8),_0x95d014[_0x95d014[_0x54280a(0xa6)]=0x5]='Solve',_0x95d014[_0x95d014[_0x54280a(0xf0)]=-0x1]=_0x54280a(0xf0),_0x95d014))(_0xfe74f0||{});const _0x4eb31d=_0x31c2d6=>_0x155477[_0x54280a(0xb7)](new Date(+_0x31c2d6))[_0x54280a(0x8e)](_0x54280a(0xd5)),_0x81cda4=async(_0x22d8a8,_0x181f8f)=>{const _0x5209bd=_0x54280a,_0x17f479=_0x22d8a8[_0x5209bd(0x75)](_0x155477[_0x5209bd(0xa1)]),_0x149832=_0x22d8a8[_0x5209bd(0x75)](_0x29013c[_0x5209bd(0x92)]);_0x181f8f[_0x5209bd(0x8b)](_0x5e61c3=>{const _0x193275=_0x5209bd;_0x17f479[_0x193275(0x93)](_0x5e61c3)&&_0x181f8f['delete'](_0x5e61c3);}),_0x181f8f[_0x5209bd(0xdd)]&&(await _0x149832['get'](_0x5209bd(0xf5),{'params':{'userIDs':[..._0x181f8f]}}))['body'][_0x5209bd(0xd9)][_0x5209bd(0x8b)](_0x26e43b=>{_0x26e43b&&_0x17f479['addUser'](_0x26e43b);});};var _0x53e184=Object[_0x54280a(0x7c)],_0x18f646=(_0x411241,_0x2dabd1,_0x9e114d,_0x2c197b)=>{for(var _0x235ea9=_0x2c197b>0x1?void 0x0:_0x2c197b?_0x53e184(_0x2dabd1,_0x9e114d):_0x2dabd1,_0x12dc86=_0x411241['length']-0x1,_0x22ce09;_0x12dc86>=0x0;_0x12dc86--)(_0x22ce09=_0x411241[_0x12dc86])&&(_0x235ea9=_0x22ce09(_0x235ea9)||_0x235ea9);return _0x235ea9;},_0x54dd7a=(_0x2e552f,_0x154f37)=>(_0x543864,_0x4c1556)=>_0x154f37(_0x543864,_0x4c1556,_0x2e552f);let _0x52bd67=class extends _0x155477[_0x54280a(0xdf)]{constructor(_0x555059,_0x6ddecd,_0x35bc2f,_0x5f4660){const _0x37c0d2=_0x54280a;super(),this['_commentService']=_0x555059,this[_0x37c0d2(0xb4)]=_0x6ddecd,this[_0x37c0d2(0xab)]=_0x35bc2f,this['_injector']=_0x5f4660,this[_0x37c0d2(0xbf)](),this['_initUserSync']();}[_0x54280a(0x88)](){const _0x55b616=_0x54280a;this[_0x55b616(0xb3)](this[_0x55b616(0xb4)][_0x55b616(0xa7)][_0x55b616(0x71)](_0x1afae6[_0x55b616(0x99)](0x10))[_0x55b616(0x7a)](_0x3d1357=>{const _0xd3902d=_0x55b616,_0x5256bd=new Set();_0x3d1357[_0xd3902d(0x8b)](_0x35fd3b=>{const _0x4dd887=_0xd3902d;switch(_0x35fd3b[_0x4dd887(0x78)]){case _0x4dd887(0xf3):{const _0x5c194d=_0x35fd3b[_0x4dd887(0xd8)][_0x4dd887(0xe7)];_0x5256bd[_0x4dd887(0xf3)](_0x5c194d);break;}}}),_0x81cda4(this[_0xd3902d(0xb6)],_0x5256bd);}));}[_0x54280a(0xbf)](){const _0x481194=_0x54280a;this[_0x481194(0xb3)](this[_0x481194(0xe9)][_0x481194(0xa7)][_0x481194(0x7a)](async _0x521ef3=>{const _0x2702b1=_0x481194;var _0x5bbf92,_0x48a5ad,_0x4b8e98,_0x2d50ad;const _0x4dd3cb=(_0x5bbf92=this[_0x2702b1(0xb4)]['getUnit'](_0x521ef3[_0x2702b1(0x83)])['find'](_0x1cf9d6=>_0x1cf9d6['threadId']===_0x521ef3[_0x2702b1(0x9e)]))==null?void 0x0:_0x5bbf92[_0x2702b1(0xcf)];if(!_0x4dd3cb)return;const {unitId:_0x951d91,subUnitId:_0x7dfaa5}=_0x4dd3cb;switch(_0x521ef3['user']&&this[_0x2702b1(0xab)]['addUser'](_0x521ef3[_0x2702b1(0x8f)]),_0x521ef3[_0x2702b1(0x78)]){case _0xfe74f0[_0x2702b1(0xc9)]:break;case _0xfe74f0[_0x2702b1(0x97)]:{this[_0x2702b1(0xb4)][_0x2702b1(0x98)](_0x951d91,_0x7dfaa5,{'unitId':_0x951d91,'subUnitId':_0x7dfaa5,'ref':'','id':_0x521ef3[_0x2702b1(0xaf)],'dT':_0x4eb31d(+_0x521ef3[_0x2702b1(0x81)]),'threadId':_0x521ef3[_0x2702b1(0x9e)],'personId':(_0x4b8e98=(_0x48a5ad=_0x521ef3[_0x2702b1(0x8f)])==null?void 0x0:_0x48a5ad[_0x2702b1(0xc7)])!=null?_0x4b8e98:_0x521ef3[_0x2702b1(0xd4)],'text':JSON[_0x2702b1(0xed)](_0x521ef3[_0x2702b1(0xf2)]),'parentId':_0x4dd3cb['id']});break;}case _0xfe74f0[_0x2702b1(0xe8)]:{const _0x3d6b76=this[_0x2702b1(0xb4)][_0x2702b1(0x9b)](_0x951d91,_0x7dfaa5,_0x521ef3[_0x2702b1(0xaf)]);_0x3d6b76&&_0x3d6b76[_0x2702b1(0xce)]&&this[_0x2702b1(0xb4)][_0x2702b1(0xc3)](_0x951d91,_0x7dfaa5,_0x521ef3[_0x2702b1(0xaf)]);break;}case _0xfe74f0[_0x2702b1(0xf7)]:{this[_0x2702b1(0xb4)][_0x2702b1(0xc2)](_0x951d91,_0x7dfaa5,{'commentId':_0x521ef3[_0x2702b1(0xaf)],'text':JSON[_0x2702b1(0xed)](_0x521ef3[_0x2702b1(0xf2)])});break;}case _0xfe74f0[_0x2702b1(0xa6)]:{const _0x517477=(_0x2d50ad=this[_0x2702b1(0xb4)][_0x2702b1(0xe3)](_0x521ef3[_0x2702b1(0x83)])[_0x2702b1(0x87)](_0x9b4ced=>_0x9b4ced[_0x2702b1(0x9e)]===_0x521ef3[_0x2702b1(0x9e)]))==null?void 0x0:_0x2d50ad[_0x2702b1(0xcf)];_0x517477&&this['_threadCommentModel'][_0x2702b1(0xcc)](_0x951d91,_0x7dfaa5,_0x517477['id'],_0x521ef3['solved']===_0x4702e4['Solved']);break;}}}));}};_0x52bd67=_0x18f646([_0x54dd7a(0x0,_0x155477[_0x54280a(0xd2)](_0x10cc09['CommentService'])),_0x54dd7a(0x1,_0x155477[_0x54280a(0xd2)](_0xaa109b['ThreadCommentModel'])),_0x54dd7a(0x2,_0x155477[_0x54280a(0xd2)](_0x155477['UserManagerService'])),_0x54dd7a(0x3,_0x155477[_0x54280a(0xd2)](_0x155477[_0x54280a(0xb0)]))],_0x52bd67);const _0x1b0463='thread-comment-data-source.config',_0x20e99e={};var _0x1b7d61=Object[_0x54280a(0x7c)],_0x2c02cd=(_0x350ec4,_0x4f975d,_0x488d8e,_0x4440fe)=>{for(var _0x5c8c17=_0x4440fe>0x1?void 0x0:_0x4440fe?_0x1b7d61(_0x4f975d,_0x488d8e):_0x4f975d,_0x17af34=_0x350ec4['length']-0x1,_0x2f6e4e;_0x17af34>=0x0;_0x17af34--)(_0x2f6e4e=_0x350ec4[_0x17af34])&&(_0x5c8c17=_0x2f6e4e(_0x5c8c17)||_0x5c8c17);return _0x5c8c17;},_0x35e91b=(_0x36cf38,_0x3bffeb)=>(_0x512e57,_0x51a03c)=>_0x3bffeb(_0x512e57,_0x51a03c,_0x36cf38);function _0x18874f(_0x2d8733,_0x4d8501){const _0x4aa46a=_0x54280a,_0x25c341=_0x2d8733[_0x4aa46a(0xa8)][0x0];return{..._0x4d8501,'id':_0x25c341[_0x4aa46a(0xaf)],'resolved':_0x2d8733[_0x4aa46a(0xdb)]===0x1,'dT':_0x4eb31d(_0x25c341[_0x4aa46a(0x81)]),'personId':_0x25c341['userId'],'threadId':_0x25c341['threadId']};}function _0x50e719(_0x391164,_0x12889a,_0x5f5698){const _0x2a9657=_0x54280a;var _0x3e72b0,_0x5e5294;if(((_0x5e5294=(_0x3e72b0=_0x391164==null?void 0x0:_0x391164['replies'])==null?void 0x0:_0x3e72b0[_0x2a9657(0x79)])!=null?_0x5e5294:0x0)>0x0){const _0x29e469=(_0x315870,_0x5d6e3c)=>({'id':_0x315870[_0x2a9657(0xaf)],'threadId':_0x315870['threadId'],'dT':_0x4eb31d(_0x315870[_0x2a9657(0x81)]),'personId':_0x315870['userId'],'resolved':_0x391164['solved']===_0x4702e4['Solved'],'unitId':_0x12889a,'subUnitId':_0x5f5698,'text':JSON['parse'](_0x315870['content']),'parentId':_0x5d6e3c}),_0x50b2b5=_0x29e469(_0x391164[_0x2a9657(0xa8)][0x0]);return{..._0x50b2b5,'children':_0x391164[_0x2a9657(0xa8)][_0x2a9657(0xe2)](0x1)[_0x2a9657(0xc6)](_0x39000c=>_0x29e469(_0x39000c,_0x50b2b5['id']))};}return null;}let _0x435ad0=class{constructor(_0x2936d5,_0x4bc1f7,_0x43c247,_0x2f20ef){const _0x5be9f6=_0x54280a;this[_0x5be9f6(0x90)]=_0x2936d5,this[_0x5be9f6(0xab)]=_0x4bc1f7,this[_0x5be9f6(0xb8)]=_0x43c247,this[_0x5be9f6(0xb6)]=_0x2f20ef;}async['addComment'](_0x8321d1){const _0x2c69ed=_0x54280a;var _0x47c9d1,_0x5dc5c8;const {parentId:_0x4fdd4f,unitId:_0x173097,text:_0x540e5c,threadId:_0x3c02aa}=_0x8321d1,_0x20cfb4=(_0x5dc5c8=(_0x47c9d1=_0x540e5c[_0x2c69ed(0xa9)])==null?void 0x0:_0x47c9d1[_0x2c69ed(0x7b)](_0x6ecb6=>_0x6ecb6[_0x2c69ed(0x9a)]===_0x155477[_0x2c69ed(0xf9)][_0x2c69ed(0xf6)])[_0x2c69ed(0xc6)](_0x1185e3=>_0x1185e3[_0x2c69ed(0x80)]))!=null?_0x5dc5c8:[],_0x5f0f82=JSON[_0x2c69ed(0x86)](_0x540e5c),_0x344b03=(await this[_0x2c69ed(0xb8)][_0x2c69ed(0xcd)](_0x173097))[_0x2c69ed(0x8c)]();if(_0x4fdd4f){const _0x133803={'memberId':_0x344b03,'unitId':_0x173097,'content':_0x5f0f82,'mention':_0x20cfb4,'threadId':_0x3c02aa},_0x3e4ada=(await this[_0x2c69ed(0x90)][_0x2c69ed(0x85)](_0x2c69ed(0xd0)+_0x173097+'/reply',{'body':_0x133803}))[_0x2c69ed(0x91)][_0x2c69ed(0xf4)];return{..._0x8321d1,'id':_0x3e4ada['replyId'],'dT':_0x155477['dayjs'](+_0x3e4ada['createTimestamp'])[_0x2c69ed(0x8e)](_0x2c69ed(0xd5)),'personId':_0x3e4ada['userId']};}else{const _0x4f50f1={'memberId':_0x344b03,'unitId':_0x173097,'content':_0x5f0f82,'mention':_0x20cfb4},_0x2bb52f=await this[_0x2c69ed(0x90)][_0x2c69ed(0x85)]('/universer-api/comment/unit/'+_0x173097+'/add',{'body':_0x4f50f1});return _0x18874f(_0x2bb52f['body'][_0x2c69ed(0x96)],_0x8321d1);}}async[_0x54280a(0xc2)](_0x52df13){const _0x6eb2d7=_0x54280a;var _0x45fa9a,_0x563c8f;const {text:_0x438d83,unitId:_0x1693c9}=_0x52df13,_0x7ffdc5=(_0x563c8f=(_0x45fa9a=_0x438d83[_0x6eb2d7(0xa9)])==null?void 0x0:_0x45fa9a[_0x6eb2d7(0x7b)](_0x2585ee=>_0x2585ee['rangeType']===_0x155477[_0x6eb2d7(0xf9)][_0x6eb2d7(0xf6)])[_0x6eb2d7(0xc6)](_0x5ee9c1=>_0x5ee9c1['rangeId']))!=null?_0x563c8f:[],_0x301161=JSON[_0x6eb2d7(0x86)](_0x438d83),_0xb0512=_0x52df13[_0x6eb2d7(0x9e)],_0xbaed01=_0x52df13['id'],_0x3ebcdb={'memberId':(await this['_sessionService'][_0x6eb2d7(0xcd)](_0x1693c9))[_0x6eb2d7(0x8c)](),'unitId':_0x1693c9,'threadId':_0xb0512,'mention':_0x7ffdc5,'content':_0x301161,'replyId':_0xbaed01},_0x5e4477=await this[_0x6eb2d7(0x90)]['post'](_0x6eb2d7(0xd0)+_0x1693c9+'/edit',{'body':_0x3ebcdb});return!_0x5e4477[_0x6eb2d7(0x91)][_0x6eb2d7(0xee)]||_0x5e4477[_0x6eb2d7(0x91)][_0x6eb2d7(0xee)][_0x6eb2d7(0xb1)]===0x1;}async[_0x54280a(0xcc)](_0x260be2){const _0x25c6fd=_0x54280a,{unitId:_0x195731}=_0x260be2,_0x11d939=_0x260be2[_0x25c6fd(0x9e)],_0x7143ee={'memberId':this[_0x25c6fd(0xab)][_0x25c6fd(0xaa)]()[_0x25c6fd(0xc7)],'unitId':_0x195731,'threadId':_0x11d939,'solved':_0x260be2[_0x25c6fd(0xef)]?_0x4702e4[_0x25c6fd(0xf1)]:_0x4702e4[_0x25c6fd(0xe6)]},_0x47f985=await this[_0x25c6fd(0x90)][_0x25c6fd(0x85)](_0x25c6fd(0xd0)+_0x195731+_0x25c6fd(0x9f),{'body':_0x7143ee});return!_0x47f985[_0x25c6fd(0x91)][_0x25c6fd(0xee)]||_0x47f985[_0x25c6fd(0x91)][_0x25c6fd(0xee)][_0x25c6fd(0xb1)]===0x1;}async[_0x54280a(0xc3)](_0x16d2bd,_0x1daad8,_0x3afb71,_0x2ddda7){const _0x31fb01=_0x54280a,_0x3dfd87={'memberId':(await this[_0x31fb01(0xb8)][_0x31fb01(0xcd)](_0x16d2bd))[_0x31fb01(0x8c)](),'threadId':_0x3afb71,'replyId':_0x2ddda7,'unitId':_0x16d2bd},_0x1def29=await this[_0x31fb01(0x90)][_0x31fb01(0x85)]('/universer-api/comment/unit/'+_0x16d2bd+_0x31fb01(0x84),{'body':_0x3dfd87});return!_0x1def29[_0x31fb01(0x91)]['error']||_0x1def29[_0x31fb01(0x91)]['error'][_0x31fb01(0xb1)]===0x1;}async[_0x54280a(0xca)](_0x505f87,_0x30dfdf,_0x4a057c){const _0x7f85e6=_0x54280a,_0x244092={'unitId':_0x505f87,'threadId':_0x4a057c},_0xb732=await this[_0x7f85e6(0x90)][_0x7f85e6(0x85)](_0x7f85e6(0xd0)+_0x505f87+'/list',{'body':_0x244092}),_0x3d2d8b=_0x4a057c['map'](_0xd898c5=>_0x50e719(_0xb732[_0x7f85e6(0x91)][_0x7f85e6(0xf8)][_0xd898c5],_0x505f87,_0x30dfdf))[_0x7f85e6(0x7b)](Boolean);return Object[_0x7f85e6(0x82)](_0xb732[_0x7f85e6(0x91)][_0x7f85e6(0xd9)])[_0x7f85e6(0x8b)](_0x1e714c=>{const _0x519363=_0x7f85e6;this['_userService'][_0x519363(0xb2)](_0x1e714c);}),_0x3d2d8b;}['saveCommentToSnapshot'](_0x332034){const _0x20fbe0=_0x54280a;return{'id':_0x332034['id'],'threadId':_0x332034[_0x20fbe0(0x9e)],'ref':_0x332034[_0x20fbe0(0xc8)]};}};_0x435ad0=_0x2c02cd([_0x35e91b(0x0,_0x155477['Inject'](_0x29013c[_0x54280a(0x92)])),_0x35e91b(0x1,_0x155477['Inject'](_0x155477['UserManagerService'])),_0x35e91b(0x2,_0x155477[_0x54280a(0xd2)](_0x10cc09[_0x54280a(0x89)])),_0x35e91b(0x3,_0x155477[_0x54280a(0xd2)](_0x155477[_0x54280a(0xb0)]))],_0x435ad0);var _0x33969e=Object[_0x54280a(0x7c)],_0xc29a1a=(_0x3fa3a6,_0xd663ae,_0x5eee14,_0x2dea23)=>{const _0x590b99=_0x54280a;for(var _0x5c50a4=_0x2dea23>0x1?void 0x0:_0x2dea23?_0x33969e(_0xd663ae,_0x5eee14):_0xd663ae,_0x8a5c5f=_0x3fa3a6[_0x590b99(0x79)]-0x1,_0x24c2c5;_0x8a5c5f>=0x0;_0x8a5c5f--)(_0x24c2c5=_0x3fa3a6[_0x8a5c5f])&&(_0x5c50a4=_0x24c2c5(_0x5c50a4)||_0x5c50a4);return _0x5c50a4;},_0x3d82fe=(_0x4f5138,_0x37909c)=>(_0x2a06b8,_0x3c1f57)=>_0x37909c(_0x2a06b8,_0x3c1f57,_0x4f5138);let _0x439afd=class extends _0x155477[_0x54280a(0xdf)]{constructor(_0x48a3a7,_0x5eb756){const _0x3dea8f=_0x54280a;super(),this[_0x3dea8f(0x9d)]=_0x48a3a7,this[_0x3dea8f(0xa4)]=_0x5eb756,this[_0x3dea8f(0x95)]();}[_0x54280a(0x95)](){const _0x938d00=_0x54280a;this[_0x938d00(0x9d)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x938d00(0xc1)]=!0x1;}};_0x439afd=_0xc29a1a([_0x3d82fe(0x0,_0xaa109b[_0x54280a(0xbc)]),_0x3d82fe(0x1,_0x155477[_0x54280a(0xd2)](_0x435ad0))],_0x439afd);var _0x68a8b7=Object[_0x54280a(0xe0)],_0x418fc3=Object['getOwnPropertyDescriptor'],_0x49e276=(_0x2d6119,_0xea048c,_0xe8c98d)=>_0xea048c in _0x2d6119?_0x68a8b7(_0x2d6119,_0xea048c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe8c98d}):_0x2d6119[_0xea048c]=_0xe8c98d,_0x4fc447=(_0x51498d,_0x20cb20,_0x296805,_0x45a730)=>{const _0x266480=_0x54280a;for(var _0x46ebb8=_0x45a730>0x1?void 0x0:_0x45a730?_0x418fc3(_0x20cb20,_0x296805):_0x20cb20,_0x6d53b6=_0x51498d[_0x266480(0x79)]-0x1,_0x174a89;_0x6d53b6>=0x0;_0x6d53b6--)(_0x174a89=_0x51498d[_0x6d53b6])&&(_0x46ebb8=_0x174a89(_0x46ebb8)||_0x46ebb8);return _0x46ebb8;},_0x221996=(_0x5064,_0x4ca1e4)=>(_0x5b2568,_0x36addd)=>_0x4ca1e4(_0x5b2568,_0x36addd,_0x5064),_0xd315ca=(_0x3a3317,_0x34b027,_0x3aeebc)=>_0x49e276(_0x3a3317,typeof _0x34b027!='symbol'?_0x34b027+'':_0x34b027,_0x3aeebc);_0x5062d6['UniverThreadCommentDataSourcePlugin']=class extends _0x155477[_0x54280a(0x7d)]{constructor(_0x4c93b3=_0x20e99e,_0x31ba94,_0x334be8){const _0x4dbec8=_0x54280a;super(),this[_0x4dbec8(0x7e)]=_0x4c93b3,this[_0x4dbec8(0xb6)]=_0x31ba94,this[_0x4dbec8(0xe1)]=_0x334be8;const {..._0x1d0e7d}=_0x155477['merge']({},_0x20e99e,this[_0x4dbec8(0x7e)]);this[_0x4dbec8(0xe1)][_0x4dbec8(0xad)](_0x1b0463,_0x1d0e7d);}[_0x54280a(0x76)](){const _0x1f16dd=_0x54280a;[[_0x435ad0],[_0x439afd],[_0x52bd67]][_0x1f16dd(0x8b)](_0xbcf224=>{const _0x425656=_0x1f16dd;this[_0x425656(0xb6)]['add'](_0xbcf224);});}[_0x54280a(0xb9)](){const _0x38be9d=_0x54280a;this['_injector'][_0x38be9d(0x75)](_0x439afd),this[_0x38be9d(0xb6)][_0x38be9d(0x75)](_0x52bd67);}},_0xd315ca(_0x5062d6[_0x54280a(0x77)],_0x54280a(0x9c),_0xfc6d01),_0xd315ca(_0x5062d6[_0x54280a(0x77)],_0x54280a(0x78),_0x155477[_0x54280a(0xde)]['UNIVER_UNKNOWN']),_0x5062d6[_0x54280a(0x77)]=_0x4fc447([_0x155477[_0x54280a(0x94)](_0x13a88a[_0x54280a(0x7f)],_0x10cc09[_0x54280a(0x8d)],_0x6d9789[_0x54280a(0xbb)]),_0x221996(0x1,_0x155477[_0x54280a(0xd2)](_0x155477[_0x54280a(0xb0)])),_0x221996(0x2,_0x155477['IConfigService'])],_0x5062d6[_0x54280a(0x77)]),Object[_0x54280a(0xe0)](_0x5062d6,Symbol[_0x54280a(0xd6)],{'value':_0x54280a(0xa5)});}));
1
+ (function(_0x4bb6f3,_0x56517d){const _0x4f464c=_0x58a9,_0xc00b49=_0x4bb6f3();while(!![]){try{const _0x3eddc3=-parseInt(_0x4f464c(0xe7))/0x1*(parseInt(_0x4f464c(0x96))/0x2)+parseInt(_0x4f464c(0x94))/0x3+parseInt(_0x4f464c(0xa3))/0x4+parseInt(_0x4f464c(0xc0))/0x5+parseInt(_0x4f464c(0xb9))/0x6*(-parseInt(_0x4f464c(0xd2))/0x7)+-parseInt(_0x4f464c(0xeb))/0x8+-parseInt(_0x4f464c(0x108))/0x9*(parseInt(_0x4f464c(0x10d))/0xa);if(_0x3eddc3===_0x56517d)break;else _0xc00b49['push'](_0xc00b49['shift']());}catch(_0x49a6a4){_0xc00b49['push'](_0xc00b49['shift']());}}}(_0x2d01,0xe7372),function(_0x1e4f0c,_0x13f434){const _0x13e87d=_0x58a9;typeof exports==_0x13e87d(0xb1)&&typeof module<'u'?_0x13f434(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==_0x13e87d(0xca)&&define[_0x13e87d(0xc5)]?define([_0x13e87d(0x117),_0x13e87d(0xd4),_0x13e87d(0xb2),_0x13e87d(0xb8),_0x13e87d(0xbe),_0x13e87d(0x10b),_0x13e87d(0xf1),_0x13e87d(0xed)],_0x13f434):(_0x1e4f0c=typeof globalThis<'u'?globalThis:_0x1e4f0c||self,_0x13f434(_0x1e4f0c[_0x13e87d(0xd3)]={},_0x1e4f0c[_0x13e87d(0xaa)],_0x1e4f0c[_0x13e87d(0xba)],_0x1e4f0c[_0x13e87d(0xd5)],_0x1e4f0c['UniverThreadCommentUi'],_0x1e4f0c[_0x13e87d(0xd0)],_0x1e4f0c[_0x13e87d(0xf1)],_0x1e4f0c[_0x13e87d(0x8a)]));}(this,function(_0x2bc380,_0x53b012,_0x4c8cf5,_0x414820,_0x25e18d,_0x10ac41,_0x49ee10,_0x1d4abe){'use strict';const _0x566886=_0x58a9;const _0x2c7336=_0x566886(0xc9);var _0x1b7f69=(_0x1300f4=>(_0x1300f4[_0x1300f4['OpenOrReOpen']=0x0]=_0x566886(0xdf),_0x1300f4[_0x1300f4[_0x566886(0x116)]=0x1]=_0x566886(0x116),_0x1300f4[_0x1300f4[_0x566886(0xe6)]=-0x1]=_0x566886(0xe6),_0x1300f4))(_0x1b7f69||{}),_0x16fa13=(_0x50c303=>(_0x50c303[_0x50c303[_0x566886(0x9a)]=0x0]='Unknown',_0x50c303[_0x50c303['Add']=0x1]=_0x566886(0xde),_0x50c303[_0x50c303[_0x566886(0xec)]=0x2]=_0x566886(0xec),_0x50c303[_0x50c303[_0x566886(0xe1)]=0x3]=_0x566886(0xe1),_0x50c303[_0x50c303[_0x566886(0xd6)]=0x4]=_0x566886(0xd6),_0x50c303[_0x50c303[_0x566886(0xea)]=0x5]=_0x566886(0xea),_0x50c303[_0x50c303[_0x566886(0xe6)]=-0x1]=_0x566886(0xe6),_0x50c303))(_0x16fa13||{});const _0x15adae=_0x4e121c=>_0x414820[_0x566886(0xfc)](new Date(+_0x4e121c))[_0x566886(0x10f)]('YYYY/MM/DD\x20HH:mm'),_0x38aa63=async(_0x4574eb,_0x135a8d)=>{const _0x4c2b9b=_0x566886,_0x59a7b9=_0x4574eb[_0x4c2b9b(0x9d)](_0x414820[_0x4c2b9b(0xbb)]),_0xe699a3=_0x4574eb['get'](_0x1d4abe[_0x4c2b9b(0xa5)]);_0x135a8d[_0x4c2b9b(0x113)](_0x354baf=>{const _0x186147=_0x4c2b9b;_0x59a7b9[_0x186147(0x9b)](_0x354baf)&&_0x135a8d[_0x186147(0xfd)](_0x354baf);}),_0x135a8d[_0x4c2b9b(0x90)]&&(await _0xe699a3[_0x4c2b9b(0x9d)]('/universer-api/user/list',{'params':{'userIDs':[..._0x135a8d]}}))[_0x4c2b9b(0xbd)][_0x4c2b9b(0x95)][_0x4c2b9b(0x113)](_0x3b3090=>{_0x3b3090&&_0x59a7b9['addUser'](_0x3b3090);});};var _0x3d790c=Object['getOwnPropertyDescriptor'],_0x39f729=(_0x4056b4,_0x6ce4c0,_0x2be89a,_0x354722)=>{const _0x37bc0b=_0x566886;for(var _0x1804a9=_0x354722>0x1?void 0x0:_0x354722?_0x3d790c(_0x6ce4c0,_0x2be89a):_0x6ce4c0,_0x249abc=_0x4056b4[_0x37bc0b(0x97)]-0x1,_0x5d7746;_0x249abc>=0x0;_0x249abc--)(_0x5d7746=_0x4056b4[_0x249abc])&&(_0x1804a9=_0x5d7746(_0x1804a9)||_0x1804a9);return _0x1804a9;},_0x2fd080=(_0x2e7d04,_0x1871e3)=>(_0x130eca,_0x43cc63)=>_0x1871e3(_0x130eca,_0x43cc63,_0x2e7d04);let _0x24dc3e=class extends _0x414820[_0x566886(0xd1)]{constructor(_0x25150d,_0x547ae3,_0x31a4dd,_0x12dd60){const _0x8ba5b5=_0x566886;super(),this[_0x8ba5b5(0xe0)]=_0x25150d,this[_0x8ba5b5(0x100)]=_0x547ae3,this[_0x8ba5b5(0x8b)]=_0x31a4dd,this[_0x8ba5b5(0x10c)]=_0x12dd60,this[_0x8ba5b5(0xb6)](),this[_0x8ba5b5(0xf3)]();}[_0x566886(0xf3)](){const _0x105bb7=_0x566886;this['disposeWithMe'](this[_0x105bb7(0x100)]['commentUpdate$']['pipe'](_0x49ee10[_0x105bb7(0xce)](0x10))[_0x105bb7(0xe9)](_0x9397f7=>{const _0xa1650b=_0x105bb7,_0x20b653=new Set();_0x9397f7[_0xa1650b(0x113)](_0x1c4e13=>{const _0x3636d4=_0xa1650b;switch(_0x1c4e13['type']){case'add':{const _0x49668=_0x1c4e13[_0x3636d4(0xd9)][_0x3636d4(0x92)];_0x20b653[_0x3636d4(0xbc)](_0x49668);break;}}}),_0x38aa63(this[_0xa1650b(0x10c)],_0x20b653);}));}[_0x566886(0xb6)](){const _0xe91912=_0x566886;this[_0xe91912(0xc1)](this[_0xe91912(0xe0)][_0xe91912(0xcf)][_0xe91912(0xe9)](async _0x3844ad=>{const _0x35568c=_0xe91912;var _0x1423c4,_0x42003d,_0x4adae1,_0x472626;const _0x37886a=(_0x1423c4=this[_0x35568c(0x100)][_0x35568c(0xa7)](_0x3844ad[_0x35568c(0xdc)])[_0x35568c(0x8e)](_0x1ea1c3=>_0x1ea1c3['threadId']===_0x3844ad[_0x35568c(0xa6)]))==null?void 0x0:_0x1423c4[_0x35568c(0xf8)];if(!_0x37886a)return;const {unitId:_0x17d5c1,subUnitId:_0x3d529c}=_0x37886a;switch(_0x3844ad[_0x35568c(0x8c)]&&this[_0x35568c(0x8b)]['addUser'](_0x3844ad[_0x35568c(0x8c)]),_0x3844ad['type']){case _0x16fa13['Add']:break;case _0x16fa13[_0x35568c(0xec)]:{this['_threadCommentModel'][_0x35568c(0xb0)](_0x17d5c1,_0x3d529c,{'unitId':_0x17d5c1,'subUnitId':_0x3d529c,'ref':'','id':_0x3844ad[_0x35568c(0xa8)],'dT':_0x15adae(+_0x3844ad[_0x35568c(0xc6)]),'threadId':_0x3844ad[_0x35568c(0xa6)],'personId':(_0x4adae1=(_0x42003d=_0x3844ad[_0x35568c(0x8c)])==null?void 0x0:_0x42003d[_0x35568c(0x109)])!=null?_0x4adae1:_0x3844ad[_0x35568c(0x111)],'text':JSON[_0x35568c(0xb4)](_0x3844ad[_0x35568c(0x10e)]),'parentId':_0x37886a['id']});break;}case _0x16fa13[_0x35568c(0xd6)]:{const _0x47f6d2=this[_0x35568c(0x100)][_0x35568c(0x9f)](_0x17d5c1,_0x3d529c,_0x3844ad[_0x35568c(0xa8)]);_0x47f6d2&&_0x47f6d2['parentId']&&this[_0x35568c(0x100)][_0x35568c(0xe3)](_0x17d5c1,_0x3d529c,_0x3844ad[_0x35568c(0xa8)]);break;}case _0x16fa13[_0x35568c(0xe1)]:{this[_0x35568c(0x100)]['updateComment'](_0x17d5c1,_0x3d529c,{'commentId':_0x3844ad[_0x35568c(0xa8)],'text':JSON['parse'](_0x3844ad[_0x35568c(0x10e)])});break;}case _0x16fa13[_0x35568c(0xea)]:{const _0x245fff=(_0x472626=this[_0x35568c(0x100)][_0x35568c(0xa7)](_0x3844ad['unitId'])[_0x35568c(0x8e)](_0x36f10b=>_0x36f10b[_0x35568c(0xa6)]===_0x3844ad[_0x35568c(0xa6)]))==null?void 0x0:_0x472626[_0x35568c(0xf8)];_0x245fff&&this['_threadCommentModel'][_0x35568c(0xe4)](_0x17d5c1,_0x3d529c,_0x245fff['id'],_0x3844ad[_0x35568c(0x106)]===_0x1b7f69[_0x35568c(0x116)]);break;}}}));}};_0x24dc3e=_0x39f729([_0x2fd080(0x0,_0x414820['Inject'](_0x53b012[_0x566886(0xf4)])),_0x2fd080(0x1,_0x414820[_0x566886(0xd8)](_0x10ac41['ThreadCommentModel'])),_0x2fd080(0x2,_0x414820[_0x566886(0xd8)](_0x414820['UserManagerService'])),_0x2fd080(0x3,_0x414820[_0x566886(0xd8)](_0x414820[_0x566886(0x89)]))],_0x24dc3e);const _0x2a6279=_0x566886(0x103),_0x117104={};var _0x11f49f=Object['getOwnPropertyDescriptor'],_0x5ead18=(_0x5839da,_0x41b626,_0x1bccbb,_0x476326)=>{const _0x4e3ddc=_0x566886;for(var _0x138a06=_0x476326>0x1?void 0x0:_0x476326?_0x11f49f(_0x41b626,_0x1bccbb):_0x41b626,_0x1f663e=_0x5839da[_0x4e3ddc(0x97)]-0x1,_0x5ee8e9;_0x1f663e>=0x0;_0x1f663e--)(_0x5ee8e9=_0x5839da[_0x1f663e])&&(_0x138a06=_0x5ee8e9(_0x138a06)||_0x138a06);return _0x138a06;},_0x25e81a=(_0x2d1df5,_0x43bcc8)=>(_0x4723b6,_0x4a6631)=>_0x43bcc8(_0x4723b6,_0x4a6631,_0x2d1df5);function _0x1b2dde(_0x3e8e07,_0x622ee6){const _0x31e5c6=_0x566886,_0x317a27=_0x3e8e07[_0x31e5c6(0xb7)][0x0];return{..._0x622ee6,'id':_0x317a27[_0x31e5c6(0xa8)],'resolved':_0x3e8e07[_0x31e5c6(0x106)]===0x1,'dT':_0x15adae(_0x317a27[_0x31e5c6(0xc6)]),'personId':_0x317a27[_0x31e5c6(0x111)],'threadId':_0x317a27[_0x31e5c6(0xa6)]};}function _0x1810b0(_0x683738,_0x5931d0,_0xb1f1b4){const _0x54b259=_0x566886;var _0x257e62,_0x6ebb6e;if(((_0x6ebb6e=(_0x257e62=_0x683738==null?void 0x0:_0x683738['replies'])==null?void 0x0:_0x257e62['length'])!=null?_0x6ebb6e:0x0)>0x0){const _0x4a393b=(_0x451ff6,_0x29d2e9)=>({'id':_0x451ff6['replyId'],'threadId':_0x451ff6[_0x54b259(0xa6)],'dT':_0x15adae(_0x451ff6[_0x54b259(0xc6)]),'personId':_0x451ff6[_0x54b259(0x111)],'resolved':_0x683738[_0x54b259(0x106)]===_0x1b7f69['Solved'],'unitId':_0x5931d0,'subUnitId':_0xb1f1b4,'text':JSON[_0x54b259(0xb4)](_0x451ff6[_0x54b259(0x10e)]),'parentId':_0x29d2e9}),_0x490f57=_0x4a393b(_0x683738[_0x54b259(0xb7)][0x0]);return{..._0x490f57,'children':_0x683738[_0x54b259(0xb7)][_0x54b259(0xa1)](0x1)['map'](_0x41ca94=>_0x4a393b(_0x41ca94,_0x490f57['id']))};}return null;}let _0x562ee2=class{constructor(_0x5eaf97,_0x164cb8,_0x36c211){const _0x2b9e4b=_0x566886;this[_0x2b9e4b(0xee)]=_0x5eaf97,this['_userService']=_0x164cb8,this[_0x2b9e4b(0x9c)]=_0x36c211;}async[_0x566886(0xb0)](_0x286846){const _0x50f5dc=_0x566886;var _0xfde29a,_0x1d9aa4;const {parentId:_0x4f4988,unitId:_0x5e4493,text:_0x4dea55,threadId:_0x4d65ec}=_0x286846,_0x1a56c9=(_0x1d9aa4=(_0xfde29a=_0x4dea55[_0x50f5dc(0xf5)])==null?void 0x0:_0xfde29a[_0x50f5dc(0xc8)](_0x4315fc=>_0x4315fc[_0x50f5dc(0xf6)]===_0x414820[_0x50f5dc(0xff)][_0x50f5dc(0xf7)])[_0x50f5dc(0x102)](_0x15134b=>_0x15134b[_0x50f5dc(0xcb)]))!=null?_0x1d9aa4:[],_0x54caef=JSON['stringify'](_0x4dea55),_0x59a99c=(await this[_0x50f5dc(0x9c)]['requireSession'](_0x5e4493))[_0x50f5dc(0x118)]();if(_0x4f4988){const _0x41fa8a={'memberId':_0x59a99c,'unitId':_0x5e4493,'content':_0x54caef,'mention':_0x1a56c9,'threadId':_0x4d65ec},_0xd36cab=(await this[_0x50f5dc(0xee)]['post'](_0x50f5dc(0xbf)+_0x5e4493+_0x50f5dc(0xc4),{'body':_0x41fa8a}))['body']['reply'];return{..._0x286846,'id':_0xd36cab['replyId'],'dT':_0x414820['dayjs'](+_0xd36cab[_0x50f5dc(0xc6)])[_0x50f5dc(0x10f)](_0x50f5dc(0xf9)),'personId':_0xd36cab[_0x50f5dc(0x111)]};}else{const _0xaa460c={'memberId':_0x59a99c,'unitId':_0x5e4493,'content':_0x54caef,'mention':_0x1a56c9},_0x2e25ac=await this[_0x50f5dc(0xee)][_0x50f5dc(0xcc)]('/universer-api/comment/unit/'+_0x5e4493+_0x50f5dc(0x115),{'body':_0xaa460c});return _0x1b2dde(_0x2e25ac['body'][_0x50f5dc(0x98)],_0x286846);}}async[_0x566886(0x107)](_0x66d491){const _0x4c4aee=_0x566886;var _0xaf11ef,_0x13ffa3;const {text:_0x438216,unitId:_0x2e6f26}=_0x66d491,_0x1871fa=(_0x13ffa3=(_0xaf11ef=_0x438216[_0x4c4aee(0xf5)])==null?void 0x0:_0xaf11ef[_0x4c4aee(0xc8)](_0x354ff8=>_0x354ff8[_0x4c4aee(0xf6)]===_0x414820[_0x4c4aee(0xff)][_0x4c4aee(0xf7)])[_0x4c4aee(0x102)](_0xe830ac=>_0xe830ac[_0x4c4aee(0xcb)]))!=null?_0x13ffa3:[],_0x7870dd=JSON[_0x4c4aee(0xe8)](_0x438216),_0x5cf523=_0x66d491[_0x4c4aee(0xa6)],_0x4f9391=_0x66d491['id'],_0x2f45b5={'memberId':(await this['_sessionService'][_0x4c4aee(0x99)](_0x2e6f26))[_0x4c4aee(0x118)](),'unitId':_0x2e6f26,'threadId':_0x5cf523,'mention':_0x1871fa,'content':_0x7870dd,'replyId':_0x4f9391},_0x2e2896=await this['_httpService'][_0x4c4aee(0xcc)](_0x4c4aee(0xbf)+_0x2e6f26+_0x4c4aee(0xab),{'body':_0x2f45b5});return!_0x2e2896[_0x4c4aee(0xbd)][_0x4c4aee(0x8d)]||_0x2e2896[_0x4c4aee(0xbd)][_0x4c4aee(0x8d)][_0x4c4aee(0x110)]===0x1;}async[_0x566886(0xe4)](_0x565539){const _0x5b2148=_0x566886,{unitId:_0x1e95af}=_0x565539,_0x319ee1=_0x565539[_0x5b2148(0xa6)],_0x20442c={'memberId':this[_0x5b2148(0x8b)][_0x5b2148(0xc3)]()['userID'],'unitId':_0x1e95af,'threadId':_0x319ee1,'solved':_0x565539[_0x5b2148(0xe2)]?_0x1b7f69['Solved']:_0x1b7f69[_0x5b2148(0xdf)]},_0x36a62f=await this['_httpService'][_0x5b2148(0xcc)](_0x5b2148(0xbf)+_0x1e95af+_0x5b2148(0xcd),{'body':_0x20442c});return!_0x36a62f[_0x5b2148(0xbd)][_0x5b2148(0x8d)]||_0x36a62f[_0x5b2148(0xbd)]['error'][_0x5b2148(0x110)]===0x1;}async['deleteComment'](_0x4893c1,_0x50255b,_0x3ab335,_0x1bfc47){const _0x3966cc=_0x566886,_0x5c798b={'memberId':(await this[_0x3966cc(0x9c)][_0x3966cc(0x99)](_0x4893c1))[_0x3966cc(0x118)](),'threadId':_0x3ab335,'replyId':_0x1bfc47,'unitId':_0x4893c1},_0x3b0377=await this[_0x3966cc(0xee)][_0x3966cc(0xcc)]('/universer-api/comment/unit/'+_0x4893c1+_0x3966cc(0xfb),{'body':_0x5c798b});return!_0x3b0377['body']['error']||_0x3b0377[_0x3966cc(0xbd)][_0x3966cc(0x8d)][_0x3966cc(0x110)]===0x1;}async[_0x566886(0xa9)](_0x223c04,_0x7753f,_0x481dda){const _0x41b97a=_0x566886,_0x2cafb8={'unitId':_0x223c04,'threadId':_0x481dda},_0x54bff7=await this[_0x41b97a(0xee)][_0x41b97a(0xcc)]('/universer-api/comment/unit/'+_0x223c04+_0x41b97a(0xf2),{'body':_0x2cafb8}),_0x168b6f=_0x481dda[_0x41b97a(0x102)](_0x4b433b=>_0x1810b0(_0x54bff7[_0x41b97a(0xbd)][_0x41b97a(0x104)][_0x4b433b],_0x223c04,_0x7753f))[_0x41b97a(0xc8)](Boolean);return Object[_0x41b97a(0xfe)](_0x54bff7[_0x41b97a(0xbd)][_0x41b97a(0x95)])[_0x41b97a(0x113)](_0x18786f=>{const _0x3a79b2=_0x41b97a;this[_0x3a79b2(0x8b)][_0x3a79b2(0xc2)](_0x18786f);}),_0x168b6f;}[_0x566886(0x112)](_0x58de2c){const _0x4a8057=_0x566886;return{'id':_0x58de2c['id'],'threadId':_0x58de2c[_0x4a8057(0xa6)],'ref':_0x58de2c[_0x4a8057(0xa4)]};}};_0x562ee2=_0x5ead18([_0x25e81a(0x0,_0x414820['Inject'](_0x1d4abe[_0x566886(0xa5)])),_0x25e81a(0x1,_0x414820[_0x566886(0xd8)](_0x414820[_0x566886(0xbb)])),_0x25e81a(0x2,_0x414820['Inject'](_0x53b012['CollaborationSessionService']))],_0x562ee2);var _0x51228f=Object[_0x566886(0xf0)],_0x4b2b0c=(_0x4552ef,_0x58ef64,_0x494a91,_0x16c152)=>{const _0x13d891=_0x566886;for(var _0x2c076a=_0x16c152>0x1?void 0x0:_0x16c152?_0x51228f(_0x58ef64,_0x494a91):_0x58ef64,_0x1f2c87=_0x4552ef[_0x13d891(0x97)]-0x1,_0x54cfdd;_0x1f2c87>=0x0;_0x1f2c87--)(_0x54cfdd=_0x4552ef[_0x1f2c87])&&(_0x2c076a=_0x54cfdd(_0x2c076a)||_0x2c076a);return _0x2c076a;},_0x127a96=(_0x145adf,_0x35845f)=>(_0xbfaca5,_0x4ba41f)=>_0x35845f(_0xbfaca5,_0x4ba41f,_0x145adf);let _0x5ad152=class extends _0x414820[_0x566886(0xd1)]{constructor(_0x353e4d,_0xd84170){const _0x16af18=_0x566886;super(),this['_threadCommentDataSourceService']=_0x353e4d,this[_0x16af18(0xdd)]=_0xd84170,this['_initDataSource']();}['_initDataSource'](){const _0x28019e=_0x566886;this[_0x28019e(0xd7)][_0x28019e(0xfa)]=this[_0x28019e(0xdd)],this[_0x28019e(0xd7)][_0x28019e(0x8f)]=!0x1;}};_0x5ad152=_0x4b2b0c([_0x127a96(0x0,_0x10ac41[_0x566886(0xda)]),_0x127a96(0x1,_0x414820[_0x566886(0xd8)](_0x562ee2))],_0x5ad152);var _0x2f4229=Object[_0x566886(0x91)],_0x25bc1d=Object['getOwnPropertyDescriptor'],_0x5b079a=(_0x551cba,_0x2d7a4e,_0x3664bc)=>_0x2d7a4e in _0x551cba?_0x2f4229(_0x551cba,_0x2d7a4e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3664bc}):_0x551cba[_0x2d7a4e]=_0x3664bc,_0x3fcb36=(_0x4f6312,_0x4f2242,_0x57f670,_0x1c3760)=>{for(var _0x37f123=_0x1c3760>0x1?void 0x0:_0x1c3760?_0x25bc1d(_0x4f2242,_0x57f670):_0x4f2242,_0xc33027=_0x4f6312['length']-0x1,_0x57a939;_0xc33027>=0x0;_0xc33027--)(_0x57a939=_0x4f6312[_0xc33027])&&(_0x37f123=_0x57a939(_0x37f123)||_0x37f123);return _0x37f123;},_0x37ce43=(_0x55ba91,_0x5d8b80)=>(_0x1f5a67,_0x2720a3)=>_0x5d8b80(_0x1f5a67,_0x2720a3,_0x55ba91),_0x172062=(_0x18354d,_0x3d0d40,_0x1d73ef)=>_0x5b079a(_0x18354d,typeof _0x3d0d40!=_0x566886(0xad)?_0x3d0d40+'':_0x3d0d40,_0x1d73ef);_0x2bc380[_0x566886(0xa2)]=class extends _0x414820[_0x566886(0xac)]{constructor(_0xa7fee4=_0x117104,_0x5cd79b,_0x208784){const _0x1adae0=_0x566886;super(),this[_0x1adae0(0xae)]=_0xa7fee4,this[_0x1adae0(0x10c)]=_0x5cd79b,this['_configService']=_0x208784;const {..._0xf3fe6c}=_0x414820[_0x1adae0(0xe5)]({},_0x117104,this[_0x1adae0(0xae)]);this[_0x1adae0(0xc7)][_0x1adae0(0xef)](_0x2a6279,_0xf3fe6c);}[_0x566886(0x101)](){const _0x16a83a=_0x566886;[[_0x562ee2],[_0x5ad152],[_0x24dc3e]][_0x16a83a(0x113)](_0x1b0096=>{const _0x5e470b=_0x16a83a;this[_0x5e470b(0x10c)]['add'](_0x1b0096);});}[_0x566886(0x105)](){const _0x14a2b1=_0x566886;this[_0x14a2b1(0x10c)][_0x14a2b1(0x9d)](_0x5ad152),this[_0x14a2b1(0x10c)][_0x14a2b1(0x9d)](_0x24dc3e);}},_0x172062(_0x2bc380[_0x566886(0xa2)],_0x566886(0xb3),_0x2c7336),_0x172062(_0x2bc380[_0x566886(0xa2)],_0x566886(0xa0),_0x414820['UniverInstanceType'][_0x566886(0xdb)]),_0x2bc380[_0x566886(0xa2)]=_0x3fcb36([_0x414820[_0x566886(0x9e)](_0x25e18d[_0x566886(0x10a)],_0x53b012['UniverCollaborationClientPlugin'],_0x4c8cf5[_0x566886(0xaf)]),_0x37ce43(0x1,_0x414820[_0x566886(0xd8)](_0x414820['Injector'])),_0x37ce43(0x2,_0x414820[_0x566886(0xb5)])],_0x2bc380[_0x566886(0xa2)]),Object[_0x566886(0x91)](_0x2bc380,Symbol[_0x566886(0x93)],{'value':_0x566886(0x114)});}));function _0x58a9(_0x1c0fac,_0x432ecf){const _0x2d01c9=_0x2d01();return _0x58a9=function(_0x58a911,_0x56cc3d){_0x58a911=_0x58a911-0x89;let _0x437819=_0x2d01c9[_0x58a911];return _0x437819;},_0x58a9(_0x1c0fac,_0x432ecf);}function _0x2d01(){const _0x55f5b2=['UniverProCollaborationClient','/edit','Plugin','symbol','_config','UniverLicensePlugin','addComment','object','@univerjs-pro/license','pluginName','parse','IConfigService','_init','replies','@univerjs/core','150jjdQTE','UniverProLicense','UserManagerService','add','body','@univerjs/thread-comment-ui','/universer-api/comment/unit/','7464710QxfEDF','disposeWithMe','addUser','getCurrentUser','/reply','amd','createTimestamp','_configService','filter','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','function','rangeId','post','/solved','bufferTime','commentUpdate$','UniverThreadComment','Disposable','281939VBYXuf','UniverProThreadCommentDatasource','@univerjs-pro/collaboration-client','UniverCore','Delete','_threadCommentDataSourceService','Inject','payload','IThreadCommentDataSourceService','UNIVER_UNKNOWN','unitId','_threadCommentDataSource','Add','OpenOrReOpen','_commentService','Edit','resolved','deleteComment','resolveComment','merge','UNRECOGNIZED','1TEjvBD','stringify','subscribe','Solve','9220720UbvTFu','Reply','@univerjs/network','_httpService','setConfig','getOwnPropertyDescriptor','rxjs','/list','_initUserSync','CommentService','customRanges','rangeType','COMMENT','root','YYYY/MM/DD\x20HH:mm','dataSource','/delete','dayjs','delete','values','CustomRangeType','_threadCommentModel','onStarting','map','thread-comment-data-source.config','comments','onReady','solved','updateComment','4381839FXZLtb','userID','UniverThreadCommentUIPlugin','@univerjs/thread-comment','_injector','10HawkNO','content','format','code','userId','saveCommentToSnapshot','forEach','Module','/add','Solved','exports','getMemberID','Injector','UniverNetwork','_userService','user','error','find','syncUpdateMutationToColla','size','defineProperty','personId','toStringTag','5418195VGFSyD','users','300858BGaWZb','length','comment','requireSession','Unknown','getUser','_sessionService','get','DependentOn','getComment','type','slice','UniverThreadCommentDataSourcePlugin','1779464qGcgvH','ref','HTTPService','threadId','getUnit','replyId','listComments'];_0x2d01=function(){return _0x55f5b2;};return _0x2d01();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.4",
3
+ "version": "0.10.0-nightly.202507310307",
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.9.4",
49
- "@univerjs-pro/license": "0.9.4",
50
- "@univerjs/network": "0.9.4",
48
+ "@univerjs-pro/collaboration-client": "0.10.0-nightly.202507310307",
49
+ "@univerjs-pro/license": "0.10.0-nightly.202507310307",
50
+ "@univerjs/core": "0.10.0-nightly.202507310307",
51
+ "@univerjs/network": "0.10.0-nightly.202507310307",
51
52
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/thread-comment-ui": "0.9.4",
53
- "@univerjs/thread-comment": "0.9.4",
54
- "@univerjs/core": "0.9.4"
53
+ "@univerjs/thread-comment": "0.10.0-nightly.202507310307",
54
+ "@univerjs/thread-comment-ui": "0.10.0-nightly.202507310307"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
- "vite": "^7.0.5",
59
+ "vite": "^7.0.6",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.9.4"
61
+ "@univerjs-infra/shared": "0.10.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",