@univerjs-pro/thread-comment-datasource 0.6.4-nightly.202503111607 → 0.6.5

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 _0x15c3(_0x4ec89e,_0x15ccee){const _0x4271fe=_0x4271();return _0x15c3=function(_0x15c38f,_0x3a6179){_0x15c38f=_0x15c38f-0x64;let _0x2411f0=_0x4271fe[_0x15c38f];return _0x2411f0;},_0x15c3(_0x4ec89e,_0x15ccee);}const _0x3d7d1f=_0x15c3;(function(_0x2eb3a6,_0x143c7a){const _0x349f0d=_0x15c3,_0x212362=_0x2eb3a6();while(!![]){try{const _0x12dc98=parseInt(_0x349f0d(0xda))/0x1+-parseInt(_0x349f0d(0x80))/0x2+parseInt(_0x349f0d(0x9a))/0x3+parseInt(_0x349f0d(0xc2))/0x4*(parseInt(_0x349f0d(0x89))/0x5)+-parseInt(_0x349f0d(0xb1))/0x6*(parseInt(_0x349f0d(0x8c))/0x7)+-parseInt(_0x349f0d(0xb9))/0x8+parseInt(_0x349f0d(0x75))/0x9;if(_0x12dc98===_0x143c7a)break;else _0x212362['push'](_0x212362['shift']());}catch(_0x2c9400){_0x212362['push'](_0x212362['shift']());}}}(_0x4271,0x7cfc7));Object[_0x3d7d1f(0xbe)](exports,Symbol['toStringTag'],{'value':_0x3d7d1f(0xc0)});const b=require(_0x3d7d1f(0xab)),T=require(_0x3d7d1f(0xdb)),c=require('@univerjs/core'),j=require(_0x3d7d1f(0x77)),M=require(_0x3d7d1f(0x98)),w=require('rxjs'),P=require(_0x3d7d1f(0xa0)),U=_0x3d7d1f(0x66);var I=(_0x1a1c0e=>(_0x1a1c0e[_0x1a1c0e[_0x3d7d1f(0xbc)]=0x0]=_0x3d7d1f(0xbc),_0x1a1c0e[_0x1a1c0e[_0x3d7d1f(0xa5)]=0x1]='Solved',_0x1a1c0e[_0x1a1c0e[_0x3d7d1f(0x8d)]=-0x1]=_0x3d7d1f(0x8d),_0x1a1c0e))(I||{}),v=(_0x54bec0=>(_0x54bec0[_0x54bec0['Unknown']=0x0]=_0x3d7d1f(0x95),_0x54bec0[_0x54bec0[_0x3d7d1f(0x79)]=0x1]='Add',_0x54bec0[_0x54bec0['Reply']=0x2]=_0x3d7d1f(0xbd),_0x54bec0[_0x54bec0[_0x3d7d1f(0xdf)]=0x3]=_0x3d7d1f(0xdf),_0x54bec0[_0x54bec0[_0x3d7d1f(0x73)]=0x4]=_0x3d7d1f(0x73),_0x54bec0[_0x54bec0[_0x3d7d1f(0x87)]=0x5]=_0x3d7d1f(0x87),_0x54bec0[_0x54bec0[_0x3d7d1f(0x8d)]=-0x1]=_0x3d7d1f(0x8d),_0x54bec0))(v||{});const f=_0x4e532b=>c[_0x3d7d1f(0xad)](new Date(+_0x4e532b))[_0x3d7d1f(0x65)](_0x3d7d1f(0xcd)),R=async(_0x149825,_0x12a5a4)=>{const _0x495571=_0x3d7d1f,_0x43ad26=_0x149825[_0x495571(0x94)](c[_0x495571(0xb8)]),_0x2e524d=_0x149825[_0x495571(0x94)](P[_0x495571(0xb3)]);_0x12a5a4[_0x495571(0xde)](_0x11b206=>{const _0x23b8a5=_0x495571;_0x43ad26[_0x23b8a5(0x9c)](_0x11b206)&&_0x12a5a4[_0x23b8a5(0xd9)](_0x11b206);}),_0x12a5a4[_0x495571(0x76)]&&(await _0x2e524d['get'](_0x495571(0xd3),{'params':{'userIDs':[..._0x12a5a4]}}))['body']['users']['forEach'](_0x59c296=>{const _0xf28b3=_0x495571;_0x59c296&&_0x43ad26[_0xf28b3(0x70)](_0x59c296);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x42679a,_0x4be942,_0x19e68b,_0x28a617)=>{for(var _0x4fe7fc=_0x28a617>0x1?void 0x0:_0x28a617?$(_0x4be942,_0x19e68b):_0x4be942,_0x11ed87=_0x42679a['length']-0x1,_0x4e9af3;_0x11ed87>=0x0;_0x11ed87--)(_0x4e9af3=_0x42679a[_0x11ed87])&&(_0x4fe7fc=_0x4e9af3(_0x4fe7fc)||_0x4fe7fc);return _0x4fe7fc;},S=(_0xe35e32,_0x2e051f)=>(_0x97dff4,_0x4cb7b4)=>_0x2e051f(_0x97dff4,_0x4cb7b4,_0xe35e32);let p=class extends c['Disposable']{constructor(_0x12ee0f,_0x4f0d92,_0xb6ea2f,_0x1a8e9e){const _0x14ecca=_0x3d7d1f;super(),this[_0x14ecca(0x99)]=_0x12ee0f,this[_0x14ecca(0xa6)]=_0x4f0d92,this[_0x14ecca(0xbf)]=_0xb6ea2f,this[_0x14ecca(0xd5)]=_0x1a8e9e,this[_0x14ecca(0xb0)](),this[_0x14ecca(0xa3)]();}[_0x3d7d1f(0xa3)](){const _0x1ffa4a=_0x3d7d1f;this['disposeWithMe'](this[_0x1ffa4a(0xa6)][_0x1ffa4a(0xd1)]['pipe'](w['bufferTime'](0x10))[_0x1ffa4a(0x8e)](_0x29248a=>{const _0x559cfe=_0x1ffa4a,_0x184399=new Set();_0x29248a['forEach'](_0x2e3d1f=>{const _0x2b9de0=_0x15c3;switch(_0x2e3d1f[_0x2b9de0(0x7a)]){case _0x2b9de0(0x7c):{const _0x348dd3=_0x2e3d1f[_0x2b9de0(0xc7)][_0x2b9de0(0x86)];_0x184399[_0x2b9de0(0x7c)](_0x348dd3);break;}}}),R(this[_0x559cfe(0xd5)],_0x184399);}));}['_init'](){const _0x17727f=_0x3d7d1f;this[_0x17727f(0x83)](this[_0x17727f(0x99)][_0x17727f(0xd1)][_0x17727f(0x8e)](async _0x4d0f37=>{const _0x40725c=_0x17727f;var _0x224501,_0x4a3875,_0x2f15a4,_0x7ac742;const _0x3d17c6=(_0x224501=this['_threadCommentModel'][_0x40725c(0x6a)](_0x4d0f37[_0x40725c(0xba)])['find'](_0x1a75ff=>_0x1a75ff[_0x40725c(0xa4)]===_0x4d0f37[_0x40725c(0xa4)]))==null?void 0x0:_0x224501['root'];if(!_0x3d17c6)return;const {unitId:_0x1b4397,subUnitId:_0x3b0df2}=_0x3d17c6;switch(_0x4d0f37['user']&&this[_0x40725c(0xbf)][_0x40725c(0x70)](_0x4d0f37[_0x40725c(0xc1)]),_0x4d0f37[_0x40725c(0x7a)]){case v[_0x40725c(0x79)]:break;case v['Reply']:{this[_0x40725c(0xa6)][_0x40725c(0xc4)](_0x1b4397,_0x3b0df2,{'unitId':_0x1b4397,'subUnitId':_0x3b0df2,'ref':'','id':_0x4d0f37['replyId'],'dT':f(+_0x4d0f37[_0x40725c(0xaf)]),'threadId':_0x4d0f37['threadId'],'personId':(_0x2f15a4=(_0x4a3875=_0x4d0f37['user'])==null?void 0x0:_0x4a3875[_0x40725c(0x71)])!=null?_0x2f15a4:_0x4d0f37[_0x40725c(0xe1)],'text':JSON['parse'](_0x4d0f37[_0x40725c(0xa2)]),'parentId':_0x3d17c6['id']});break;}case v[_0x40725c(0x73)]:{const _0x1ee8c5=this[_0x40725c(0xa6)][_0x40725c(0xd4)](_0x1b4397,_0x3b0df2,_0x4d0f37[_0x40725c(0xdd)]);_0x1ee8c5&&_0x1ee8c5[_0x40725c(0x93)]&&this[_0x40725c(0xa6)][_0x40725c(0xcb)](_0x1b4397,_0x3b0df2,_0x4d0f37[_0x40725c(0xdd)]);break;}case v[_0x40725c(0xdf)]:{this[_0x40725c(0xa6)][_0x40725c(0x92)](_0x1b4397,_0x3b0df2,{'commentId':_0x4d0f37[_0x40725c(0xdd)],'text':JSON[_0x40725c(0xcf)](_0x4d0f37[_0x40725c(0xa2)])});break;}case v[_0x40725c(0x87)]:{const _0x351339=(_0x7ac742=this[_0x40725c(0xa6)][_0x40725c(0x6a)](_0x4d0f37['unitId'])['find'](_0x1ebdb6=>_0x1ebdb6[_0x40725c(0xa4)]===_0x4d0f37['threadId']))==null?void 0x0:_0x7ac742[_0x40725c(0x67)];_0x351339&&this[_0x40725c(0xa6)]['resolveComment'](_0x1b4397,_0x3b0df2,_0x351339['id'],_0x4d0f37[_0x40725c(0xb6)]===I[_0x40725c(0xa5)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x3d7d1f(0xac)])),S(0x1,c[_0x3d7d1f(0xc5)](M[_0x3d7d1f(0x6c)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x3d7d1f(0x74)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x3d7d1f(0x96)],x=(_0x19d50b,_0x3c3015,_0x4f91f9,_0x1696fe)=>{const _0x302ae5=_0x3d7d1f;for(var _0x505385=_0x1696fe>0x1?void 0x0:_0x1696fe?A(_0x3c3015,_0x4f91f9):_0x3c3015,_0x9201f0=_0x19d50b[_0x302ae5(0xc8)]-0x1,_0xf19da0;_0x9201f0>=0x0;_0x9201f0--)(_0xf19da0=_0x19d50b[_0x9201f0])&&(_0x505385=_0xf19da0(_0x505385)||_0x505385);return _0x505385;},_=(_0x111a90,_0x257bd9)=>(_0x42511d,_0x9fcd6)=>_0x257bd9(_0x42511d,_0x9fcd6,_0x111a90);function Y(_0x41b428,_0x473e98){const _0x16f0d4=_0x3d7d1f,_0x7eb43c=_0x41b428[_0x16f0d4(0x85)][0x0];return{..._0x473e98,'id':_0x7eb43c['replyId'],'resolved':_0x41b428['solved']===0x1,'dT':f(_0x7eb43c[_0x16f0d4(0xaf)]),'personId':_0x7eb43c[_0x16f0d4(0xe1)],'threadId':_0x7eb43c['threadId']};}function G(_0x5e0d10,_0x1aa27d,_0x322feb){const _0x11352d=_0x3d7d1f;var _0x578a85,_0x55c921;if(((_0x55c921=(_0x578a85=_0x5e0d10==null?void 0x0:_0x5e0d10[_0x11352d(0x85)])==null?void 0x0:_0x578a85[_0x11352d(0xc8)])!=null?_0x55c921:0x0)>0x0){const _0x2a2c83=(_0x695453,_0x1eaa81)=>({'id':_0x695453['replyId'],'threadId':_0x695453[_0x11352d(0xa4)],'dT':f(_0x695453[_0x11352d(0xaf)]),'personId':_0x695453[_0x11352d(0xe1)],'resolved':_0x5e0d10[_0x11352d(0xb6)]===I['Solved'],'unitId':_0x1aa27d,'subUnitId':_0x322feb,'text':JSON['parse'](_0x695453[_0x11352d(0xa2)]),'parentId':_0x1eaa81}),_0x5b3547=_0x2a2c83(_0x5e0d10['replies'][0x0]);return{..._0x5b3547,'children':_0x5e0d10[_0x11352d(0x85)][_0x11352d(0xa9)](0x1)[_0x11352d(0xe0)](_0x588e27=>_0x2a2c83(_0x588e27,_0x5b3547['id']))};}return null;}let g=class{constructor(_0x75f807,_0x3dbcb4,_0x4ed2b9,_0x3dc520){const _0x26b06b=_0x3d7d1f;this[_0x26b06b(0xc3)]=_0x75f807,this[_0x26b06b(0xbf)]=_0x3dbcb4,this[_0x26b06b(0xbb)]=_0x4ed2b9,this[_0x26b06b(0xd5)]=_0x3dc520;}async[_0x3d7d1f(0xc4)](_0xf89514){const _0x4b41ea=_0x3d7d1f;var _0x485a95,_0x24990e;const {parentId:_0x2ad50c,unitId:_0x260afa,text:_0x203311,threadId:_0x52a366}=_0xf89514,_0x4e197c=(_0x24990e=(_0x485a95=_0x203311[_0x4b41ea(0x8a)])==null?void 0x0:_0x485a95[_0x4b41ea(0x91)](_0x52f886=>_0x52f886['rangeType']===c[_0x4b41ea(0x68)][_0x4b41ea(0x9e)])[_0x4b41ea(0xe0)](_0x28bd40=>_0x28bd40[_0x4b41ea(0xb7)]))!=null?_0x24990e:[],_0x4b0bc4=JSON['stringify'](_0x203311),_0x137535=(await this[_0x4b41ea(0xbb)][_0x4b41ea(0xdc)](_0x260afa))['getMemberID']();if(_0x2ad50c){const _0x5aaf1d={'memberId':_0x137535,'unitId':_0x260afa,'content':_0x4b0bc4,'mention':_0x4e197c,'threadId':_0x52a366},_0x1de8ee=(await this[_0x4b41ea(0xc3)][_0x4b41ea(0x78)]('/universer-api/comment/unit/'+_0x260afa+'/reply',{'body':_0x5aaf1d}))[_0x4b41ea(0xca)]['reply'];return{..._0xf89514,'id':_0x1de8ee['replyId'],'dT':c[_0x4b41ea(0xad)](+_0x1de8ee['createTimestamp'])[_0x4b41ea(0x65)](_0x4b41ea(0xcd)),'personId':_0x1de8ee[_0x4b41ea(0xe1)]};}else{const _0x1cf1cd={'memberId':_0x137535,'unitId':_0x260afa,'content':_0x4b0bc4,'mention':_0x4e197c},_0x5a3d9b=await this[_0x4b41ea(0xc3)][_0x4b41ea(0x78)](_0x4b41ea(0x72)+_0x260afa+_0x4b41ea(0x9d),{'body':_0x1cf1cd});return Y(_0x5a3d9b[_0x4b41ea(0xca)]['comment'],_0xf89514);}}async[_0x3d7d1f(0x92)](_0x144b82){const _0x3381ea=_0x3d7d1f;var _0x11d52e,_0x31f2f4;const {text:_0x101d55,unitId:_0x23b75f}=_0x144b82,_0x3aad85=(_0x31f2f4=(_0x11d52e=_0x101d55[_0x3381ea(0x8a)])==null?void 0x0:_0x11d52e[_0x3381ea(0x91)](_0x63a7ca=>_0x63a7ca[_0x3381ea(0xc9)]===c[_0x3381ea(0x68)]['COMMENT'])[_0x3381ea(0xe0)](_0x27bb76=>_0x27bb76[_0x3381ea(0xb7)]))!=null?_0x31f2f4:[],_0x4a5633=JSON[_0x3381ea(0xcc)](_0x101d55),_0x489ba6=_0x144b82[_0x3381ea(0xa4)],_0x4954a2=_0x144b82['id'],_0x4d01bf={'memberId':(await this[_0x3381ea(0xbb)]['requireSession'](_0x23b75f))[_0x3381ea(0xa8)](),'unitId':_0x23b75f,'threadId':_0x489ba6,'mention':_0x3aad85,'content':_0x4a5633,'replyId':_0x4954a2},_0x59a971=await this[_0x3381ea(0xc3)][_0x3381ea(0x78)](_0x3381ea(0x72)+_0x23b75f+'/edit',{'body':_0x4d01bf});return!_0x59a971['body']['error']||_0x59a971['body'][_0x3381ea(0x69)][_0x3381ea(0xd7)]===0x1;}async[_0x3d7d1f(0xc6)](_0xfe8761){const _0x1f592b=_0x3d7d1f,{unitId:_0x83bfdd}=_0xfe8761,_0x3a9433=_0xfe8761[_0x1f592b(0xa4)],_0x211cdf={'memberId':this[_0x1f592b(0xbf)][_0x1f592b(0xa7)]()[_0x1f592b(0x71)],'unitId':_0x83bfdd,'threadId':_0x3a9433,'solved':_0xfe8761[_0x1f592b(0xae)]?I[_0x1f592b(0xa5)]:I[_0x1f592b(0xbc)]},_0x59f4f2=await this[_0x1f592b(0xc3)]['post'](_0x1f592b(0x72)+_0x83bfdd+_0x1f592b(0x82),{'body':_0x211cdf});return!_0x59f4f2['body'][_0x1f592b(0x69)]||_0x59f4f2[_0x1f592b(0xca)][_0x1f592b(0x69)][_0x1f592b(0xd7)]===0x1;}async[_0x3d7d1f(0xcb)](_0x19f6c7,_0xe11e9d,_0x1acd62,_0x33fbc7){const _0x388f70=_0x3d7d1f,_0x50e865={'memberId':(await this[_0x388f70(0xbb)]['requireSession'](_0x19f6c7))[_0x388f70(0xa8)](),'threadId':_0x1acd62,'replyId':_0x33fbc7,'unitId':_0x19f6c7},_0x551ef8=await this['_httpService'][_0x388f70(0x78)](_0x388f70(0x72)+_0x19f6c7+'/delete',{'body':_0x50e865});return!_0x551ef8[_0x388f70(0xca)][_0x388f70(0x69)]||_0x551ef8['body']['error'][_0x388f70(0xd7)]===0x1;}async[_0x3d7d1f(0xb5)](_0x71e8c0,_0x5b4c25,_0x4a5e1d){const _0x1af281=_0x3d7d1f,_0x4c88e3={'unitId':_0x71e8c0,'threadId':_0x4a5e1d},_0x45ff65=await this[_0x1af281(0xc3)][_0x1af281(0x78)](_0x1af281(0x72)+_0x71e8c0+_0x1af281(0xaa),{'body':_0x4c88e3}),_0x359cfb=_0x4a5e1d[_0x1af281(0xe0)](_0x2b05ad=>G(_0x45ff65[_0x1af281(0xca)][_0x1af281(0x84)][_0x2b05ad],_0x71e8c0,_0x5b4c25))[_0x1af281(0x91)](Boolean);return Object[_0x1af281(0xb2)](_0x45ff65[_0x1af281(0xca)][_0x1af281(0x7f)])[_0x1af281(0xde)](_0x5c4155=>{const _0x820d2c=_0x1af281;this[_0x820d2c(0xbf)]['addUser'](_0x5c4155);}),_0x359cfb;}[_0x3d7d1f(0xb4)](_0x54ac9e){const _0x4d9ee6=_0x3d7d1f;return{'id':_0x54ac9e['id'],'threadId':_0x54ac9e[_0x4d9ee6(0xa4)],'ref':_0x54ac9e[_0x4d9ee6(0x6d)]};}};g=x([_(0x0,c[_0x3d7d1f(0xc5)](P[_0x3d7d1f(0xb3)])),_(0x1,c[_0x3d7d1f(0xc5)](c[_0x3d7d1f(0xb8)])),_(0x2,c[_0x3d7d1f(0xc5)](b[_0x3d7d1f(0x8b)])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x12d741,_0x4740ce,_0x33c74a,_0x27bf08)=>{const _0x3ff541=_0x3d7d1f;for(var _0x194b3b=_0x27bf08>0x1?void 0x0:_0x27bf08?H(_0x4740ce,_0x33c74a):_0x4740ce,_0x14cc48=_0x12d741[_0x3ff541(0xc8)]-0x1,_0x3864c4;_0x14cc48>=0x0;_0x14cc48--)(_0x3864c4=_0x12d741[_0x14cc48])&&(_0x194b3b=_0x3864c4(_0x194b3b)||_0x194b3b);return _0x194b3b;},y=(_0xe7343e,_0x30157a)=>(_0x166ec6,_0x289a95)=>_0x30157a(_0x166ec6,_0x289a95,_0xe7343e);let C=class extends c[_0x3d7d1f(0xd2)]{constructor(_0x315d37,_0x588788){const _0x244e12=_0x3d7d1f;super(),this[_0x244e12(0xd8)]=_0x315d37,this[_0x244e12(0x7d)]=_0x588788,this['_initDataSource']();}['_initDataSource'](){const _0x188550=_0x3d7d1f;this[_0x188550(0xd8)][_0x188550(0x8f)]=this['_threadCommentDataSource'],this[_0x188550(0xd8)][_0x188550(0xd0)]=!0x1;}};C=J([y(0x0,M[_0x3d7d1f(0xa1)]),y(0x1,c[_0x3d7d1f(0xc5)](g))],C);var F=Object[_0x3d7d1f(0xbe)],L=Object[_0x3d7d1f(0x96)],Z=(_0x60e3b4,_0x2beda8,_0x40ecd8)=>_0x2beda8 in _0x60e3b4?F(_0x60e3b4,_0x2beda8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40ecd8}):_0x60e3b4[_0x2beda8]=_0x40ecd8,W=(_0x297b37,_0x4c6b82,_0x5e98e6,_0x2a4cc1)=>{const _0x2a8132=_0x3d7d1f;for(var _0x314052=_0x2a4cc1>0x1?void 0x0:_0x2a4cc1?L(_0x4c6b82,_0x5e98e6):_0x4c6b82,_0x1d1622=_0x297b37[_0x2a8132(0xc8)]-0x1,_0x4258a1;_0x1d1622>=0x0;_0x1d1622--)(_0x4258a1=_0x297b37[_0x1d1622])&&(_0x314052=_0x4258a1(_0x314052)||_0x314052);return _0x314052;},O=(_0x548035,_0x593f52)=>(_0xbafa76,_0x1d9d68)=>_0x593f52(_0xbafa76,_0x1d9d68,_0x548035),N=(_0x4448cc,_0x4359ed,_0x36e506)=>Z(_0x4448cc,typeof _0x4359ed!='symbol'?_0x4359ed+'':_0x4359ed,_0x36e506);function _0x4271(){const _0x2720fc=['personId','Solve','Plugin','30bduWZn','customRanges','CollaborationSessionService','959rcrTLn','UNRECOGNIZED','subscribe','dataSource','UNIVER_UNKNOWN','filter','updateComment','parentId','get','Unknown','getOwnPropertyDescriptor','IConfigService','@univerjs/thread-comment','_commentService','858279yHIcds','UniverThreadCommentDataSourcePlugin','getUser','/add','COMMENT','onStarting','@univerjs/network','IThreadCommentDataSourceService','content','_initUserSync','threadId','Solved','_threadCommentModel','getCurrentUser','getMemberID','slice','/list','@univerjs-pro/collaboration-client','CommentService','dayjs','resolved','createTimestamp','_init','168FAluYw','values','HTTPService','saveCommentToSnapshot','listComments','solved','rangeId','UserManagerService','2019864PvKuCM','unitId','_sessionService','OpenOrReOpen','Reply','defineProperty','_userService','Module','user','242612ToSlhc','_httpService','addComment','Inject','resolveComment','payload','length','rangeType','body','deleteComment','stringify','YYYY/MM/DD\x20HH:mm','UniverLicensePlugin','parse','syncUpdateMutationToColla','commentUpdate$','Disposable','/universer-api/user/list','getComment','_injector','_config','code','_threadCommentDataSourceService','delete','564913KMVfHI','@univerjs-pro/license','requireSession','replyId','forEach','Edit','map','userId','UniverCollaborationClientPlugin','format','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','root','CustomRangeType','error','getUnit','merge','ThreadCommentModel','ref','setConfig','UniverInstanceType','addUser','userID','/universer-api/comment/unit/','Delete','Injector','1277343zTiiwS','size','@univerjs/thread-comment-ui','post','Add','type','_configService','add','_threadCommentDataSource','UniverThreadCommentUIPlugin','users','1177178iUtWcr','onReady','/solved','disposeWithMe','comments','replies'];_0x4271=function(){return _0x2720fc;};return _0x4271();}exports[_0x3d7d1f(0x9b)]=class extends c[_0x3d7d1f(0x88)]{constructor(_0x1cab42=D,_0x152932,_0x26ee37){const _0x4db1ca=_0x3d7d1f;super(),this['_config']=_0x1cab42,this[_0x4db1ca(0xd5)]=_0x152932,this[_0x4db1ca(0x7b)]=_0x26ee37;const {..._0x86bc1d}=c[_0x4db1ca(0x6b)]({},D,this[_0x4db1ca(0xd6)]);this[_0x4db1ca(0x7b)][_0x4db1ca(0x6e)](q,_0x86bc1d);}[_0x3d7d1f(0x9f)](){const _0x2038d0=_0x3d7d1f;[[g],[C],[p]][_0x2038d0(0xde)](_0x1fac6a=>{const _0x2f9c6d=_0x2038d0;this[_0x2f9c6d(0xd5)][_0x2f9c6d(0x7c)](_0x1fac6a);});}[_0x3d7d1f(0x81)](){const _0x31ab67=_0x3d7d1f;this[_0x31ab67(0xd5)][_0x31ab67(0x94)](C),this[_0x31ab67(0xd5)][_0x31ab67(0x94)](p);}},N(exports[_0x3d7d1f(0x9b)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x3d7d1f(0x7a),c[_0x3d7d1f(0x6f)][_0x3d7d1f(0x90)]),exports[_0x3d7d1f(0x9b)]=W([c['DependentOn'](j[_0x3d7d1f(0x7e)],b[_0x3d7d1f(0x64)],T[_0x3d7d1f(0xce)]),O(0x1,c['Inject'](c[_0x3d7d1f(0x74)])),O(0x2,c[_0x3d7d1f(0x97)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x5530ba=_0x6530;(function(_0x41b944,_0x2d2df1){const _0x20bf8f=_0x6530,_0x4ce2d9=_0x41b944();while(!![]){try{const _0x550415=parseInt(_0x20bf8f(0x137))/0x1+parseInt(_0x20bf8f(0x131))/0x2*(parseInt(_0x20bf8f(0xe2))/0x3)+-parseInt(_0x20bf8f(0x11d))/0x4*(-parseInt(_0x20bf8f(0x11b))/0x5)+-parseInt(_0x20bf8f(0xee))/0x6*(parseInt(_0x20bf8f(0x13f))/0x7)+-parseInt(_0x20bf8f(0x12e))/0x8+parseInt(_0x20bf8f(0x112))/0x9+-parseInt(_0x20bf8f(0x156))/0xa;if(_0x550415===_0x2d2df1)break;else _0x4ce2d9['push'](_0x4ce2d9['shift']());}catch(_0x3cf5a1){_0x4ce2d9['push'](_0x4ce2d9['shift']());}}}(_0xef23,0x242a1));function _0x6530(_0x5a3daf,_0x5bee48){const _0xef23c2=_0xef23();return _0x6530=function(_0x65301b,_0x2ede0d){_0x65301b=_0x65301b-0xe0;let _0x27a614=_0xef23c2[_0x65301b];return _0x27a614;},_0x6530(_0x5a3daf,_0x5bee48);}Object[_0x5530ba(0x123)](exports,Symbol[_0x5530ba(0x150)],{'value':_0x5530ba(0x120)});const b=require(_0x5530ba(0xea)),T=require(_0x5530ba(0xf8)),c=require(_0x5530ba(0x11c)),j=require(_0x5530ba(0x12c)),M=require(_0x5530ba(0x149)),w=require('rxjs'),P=require('@univerjs/network'),U=_0x5530ba(0xfd);var I=(_0x4a9ed1=>(_0x4a9ed1[_0x4a9ed1[_0x5530ba(0x102)]=0x0]=_0x5530ba(0x102),_0x4a9ed1[_0x4a9ed1[_0x5530ba(0x100)]=0x1]='Solved',_0x4a9ed1[_0x4a9ed1[_0x5530ba(0x133)]=-0x1]=_0x5530ba(0x133),_0x4a9ed1))(I||{}),v=(_0x3dfaf0=>(_0x3dfaf0[_0x3dfaf0['Unknown']=0x0]=_0x5530ba(0x12b),_0x3dfaf0[_0x3dfaf0[_0x5530ba(0x129)]=0x1]=_0x5530ba(0x129),_0x3dfaf0[_0x3dfaf0[_0x5530ba(0x13a)]=0x2]=_0x5530ba(0x13a),_0x3dfaf0[_0x3dfaf0[_0x5530ba(0x14b)]=0x3]=_0x5530ba(0x14b),_0x3dfaf0[_0x3dfaf0['Delete']=0x4]=_0x5530ba(0x148),_0x3dfaf0[_0x3dfaf0[_0x5530ba(0x126)]=0x5]=_0x5530ba(0x126),_0x3dfaf0[_0x3dfaf0[_0x5530ba(0x133)]=-0x1]=_0x5530ba(0x133),_0x3dfaf0))(v||{});const f=_0x28f82a=>c[_0x5530ba(0x14a)](new Date(+_0x28f82a))['format'](_0x5530ba(0x15a)),R=async(_0x36e175,_0x452b9e)=>{const _0x4e3bb8=_0x5530ba,_0x19a2b9=_0x36e175[_0x4e3bb8(0xe3)](c[_0x4e3bb8(0x130)]),_0x434ac8=_0x36e175[_0x4e3bb8(0xe3)](P[_0x4e3bb8(0xf2)]);_0x452b9e[_0x4e3bb8(0x104)](_0x299419=>{const _0x133292=_0x4e3bb8;_0x19a2b9[_0x133292(0x122)](_0x299419)&&_0x452b9e['delete'](_0x299419);}),_0x452b9e[_0x4e3bb8(0x116)]&&(await _0x434ac8[_0x4e3bb8(0xe3)](_0x4e3bb8(0x160),{'params':{'userIDs':[..._0x452b9e]}}))[_0x4e3bb8(0x143)][_0x4e3bb8(0x138)][_0x4e3bb8(0x104)](_0x420b12=>{const _0x2491fb=_0x4e3bb8;_0x420b12&&_0x19a2b9[_0x2491fb(0x15f)](_0x420b12);});};var $=Object[_0x5530ba(0x115)],E=(_0x5d6598,_0xf33985,_0x42ed61,_0x4fd6e6)=>{const _0x3e08d8=_0x5530ba;for(var _0x1e41b9=_0x4fd6e6>0x1?void 0x0:_0x4fd6e6?$(_0xf33985,_0x42ed61):_0xf33985,_0x33ca9f=_0x5d6598[_0x3e08d8(0xe9)]-0x1,_0x8cc1b6;_0x33ca9f>=0x0;_0x33ca9f--)(_0x8cc1b6=_0x5d6598[_0x33ca9f])&&(_0x1e41b9=_0x8cc1b6(_0x1e41b9)||_0x1e41b9);return _0x1e41b9;},S=(_0xcfef9e,_0x3b3b79)=>(_0x580feb,_0x178a7c)=>_0x3b3b79(_0x580feb,_0x178a7c,_0xcfef9e);let p=class extends c[_0x5530ba(0x128)]{constructor(_0x31088f,_0x26e588,_0x3a7208,_0x33b781){const _0x2c945a=_0x5530ba;super(),this[_0x2c945a(0x158)]=_0x31088f,this[_0x2c945a(0x12f)]=_0x26e588,this[_0x2c945a(0xf0)]=_0x3a7208,this['_injector']=_0x33b781,this[_0x2c945a(0x107)](),this['_initUserSync']();}['_initUserSync'](){const _0x1c49eb=_0x5530ba;this[_0x1c49eb(0xe8)](this[_0x1c49eb(0x12f)][_0x1c49eb(0x134)][_0x1c49eb(0x144)](w[_0x1c49eb(0x10b)](0x10))[_0x1c49eb(0x14f)](_0x449800=>{const _0x586ae8=_0x1c49eb,_0x3346fc=new Set();_0x449800[_0x586ae8(0x104)](_0x4e025d=>{const _0x243663=_0x586ae8;switch(_0x4e025d['type']){case _0x243663(0xe1):{const _0x37fa0c=_0x4e025d[_0x243663(0xf7)][_0x243663(0xe4)];_0x3346fc[_0x243663(0xe1)](_0x37fa0c);break;}}}),R(this['_injector'],_0x3346fc);}));}[_0x5530ba(0x107)](){const _0xd5483c=_0x5530ba;this['disposeWithMe'](this[_0xd5483c(0x158)][_0xd5483c(0x134)][_0xd5483c(0x14f)](async _0x20fadd=>{const _0x511051=_0xd5483c;var _0x21e935,_0x586dbf,_0x2e3137,_0x151dc1;const _0xa59fe1=(_0x21e935=this['_threadCommentModel'][_0x511051(0x154)](_0x20fadd[_0x511051(0x147)])[_0x511051(0x15d)](_0x5976fb=>_0x5976fb[_0x511051(0xfb)]===_0x20fadd['threadId']))==null?void 0x0:_0x21e935[_0x511051(0x10d)];if(!_0xa59fe1)return;const {unitId:_0x38deb8,subUnitId:_0x308509}=_0xa59fe1;switch(_0x20fadd[_0x511051(0x142)]&&this['_userService'][_0x511051(0x15f)](_0x20fadd[_0x511051(0x142)]),_0x20fadd[_0x511051(0x10c)]){case v[_0x511051(0x129)]:break;case v['Reply']:{this[_0x511051(0x12f)][_0x511051(0x152)](_0x38deb8,_0x308509,{'unitId':_0x38deb8,'subUnitId':_0x308509,'ref':'','id':_0x20fadd[_0x511051(0x117)],'dT':f(+_0x20fadd[_0x511051(0x14c)]),'threadId':_0x20fadd[_0x511051(0xfb)],'personId':(_0x2e3137=(_0x586dbf=_0x20fadd[_0x511051(0x142)])==null?void 0x0:_0x586dbf[_0x511051(0x118)])!=null?_0x2e3137:_0x20fadd[_0x511051(0xf1)],'text':JSON[_0x511051(0x10e)](_0x20fadd[_0x511051(0x135)]),'parentId':_0xa59fe1['id']});break;}case v[_0x511051(0x148)]:{const _0x3f18e6=this['_threadCommentModel']['getComment'](_0x38deb8,_0x308509,_0x20fadd[_0x511051(0x117)]);_0x3f18e6&&_0x3f18e6[_0x511051(0x151)]&&this[_0x511051(0x12f)][_0x511051(0xe5)](_0x38deb8,_0x308509,_0x20fadd['replyId']);break;}case v[_0x511051(0x14b)]:{this[_0x511051(0x12f)][_0x511051(0x11a)](_0x38deb8,_0x308509,{'commentId':_0x20fadd[_0x511051(0x117)],'text':JSON[_0x511051(0x10e)](_0x20fadd[_0x511051(0x135)])});break;}case v['Solve']:{const _0x352871=(_0x151dc1=this[_0x511051(0x12f)][_0x511051(0x154)](_0x20fadd[_0x511051(0x147)])[_0x511051(0x15d)](_0x500662=>_0x500662[_0x511051(0xfb)]===_0x20fadd[_0x511051(0xfb)]))==null?void 0x0:_0x151dc1[_0x511051(0x10d)];_0x352871&&this[_0x511051(0x12f)][_0x511051(0x121)](_0x38deb8,_0x308509,_0x352871['id'],_0x20fadd[_0x511051(0xf3)]===I[_0x511051(0x100)]);break;}}}));}};p=E([S(0x0,c[_0x5530ba(0x119)](b[_0x5530ba(0x141)])),S(0x1,c[_0x5530ba(0x119)](M['ThreadCommentModel'])),S(0x2,c[_0x5530ba(0x119)](c[_0x5530ba(0x130)])),S(0x3,c[_0x5530ba(0x119)](c[_0x5530ba(0x132)]))],p);const q=_0x5530ba(0x13d),D={};function _0xef23(){const _0x521fec=['disposeWithMe','length','@univerjs-pro/collaboration-client','COMMENT','getMemberID','_configService','138858auhdvD','_injector','_userService','userId','HTTPService','solved','resolved','code','_initDataSource','payload','@univerjs-pro/license','filter','ref','threadId','DependentOn','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','rangeType','map','Solved','listComments','OpenOrReOpen','reply','forEach','/reply','symbol','_init','CollaborationSessionService','_threadCommentDataSource','values','bufferTime','type','root','parse','stringify','format','UniverLicensePlugin','1104453gdNvFT','requireSession','comments','getOwnPropertyDescriptor','size','replyId','userID','Inject','updateComment','10oKFGIQ','@univerjs/core','536328vbNhyM','/solved','UniverInstanceType','Module','resolveComment','getUser','defineProperty','replies','getCurrentUser','Solve','IConfigService','Disposable','Add','Plugin','Unknown','@univerjs/thread-comment-ui','_threadCommentDataSourceService','1838328MNTcQc','_threadCommentModel','UserManagerService','8210uDwqGJ','Injector','UNRECOGNIZED','commentUpdate$','content','error','40146FjGCVW','users','/list','Reply','_config','post','thread-comment-data-source.config','slice','14jlVLvW','_httpService','CommentService','user','body','pipe','/universer-api/comment/unit/','syncUpdateMutationToColla','unitId','Delete','@univerjs/thread-comment','dayjs','Edit','createTimestamp','setConfig','_sessionService','subscribe','toStringTag','parentId','addComment','pluginName','getUnit','/edit','191360obGiRT','customRanges','_commentService','UniverThreadCommentDataSourcePlugin','YYYY/MM/DD\x20HH:mm','/add','onStarting','find','comment','addUser','/universer-api/user/list','UNIVER_UNKNOWN','add','9PBylUI','get','personId','deleteComment','rangeId','/delete'];_0xef23=function(){return _0x521fec;};return _0xef23();}var A=Object['getOwnPropertyDescriptor'],x=(_0x56d4ae,_0x1357b2,_0x327506,_0x1a5534)=>{const _0x3e4e8b=_0x5530ba;for(var _0x147e30=_0x1a5534>0x1?void 0x0:_0x1a5534?A(_0x1357b2,_0x327506):_0x1357b2,_0x40573f=_0x56d4ae[_0x3e4e8b(0xe9)]-0x1,_0x1dfb32;_0x40573f>=0x0;_0x40573f--)(_0x1dfb32=_0x56d4ae[_0x40573f])&&(_0x147e30=_0x1dfb32(_0x147e30)||_0x147e30);return _0x147e30;},_=(_0x120a03,_0x515f90)=>(_0x13809a,_0x1cacb9)=>_0x515f90(_0x13809a,_0x1cacb9,_0x120a03);function Y(_0x28b4d9,_0x1cf0cb){const _0x3dcc7a=_0x5530ba,_0x256fb3=_0x28b4d9['replies'][0x0];return{..._0x1cf0cb,'id':_0x256fb3['replyId'],'resolved':_0x28b4d9['solved']===0x1,'dT':f(_0x256fb3[_0x3dcc7a(0x14c)]),'personId':_0x256fb3[_0x3dcc7a(0xf1)],'threadId':_0x256fb3['threadId']};}function G(_0x31a1bc,_0x16ce02,_0x503b1f){const _0x57fbb5=_0x5530ba;var _0x260165,_0x405651;if(((_0x405651=(_0x260165=_0x31a1bc==null?void 0x0:_0x31a1bc[_0x57fbb5(0x124)])==null?void 0x0:_0x260165['length'])!=null?_0x405651:0x0)>0x0){const _0x14efc6=(_0x1433f9,_0x17abba)=>({'id':_0x1433f9[_0x57fbb5(0x117)],'threadId':_0x1433f9[_0x57fbb5(0xfb)],'dT':f(_0x1433f9[_0x57fbb5(0x14c)]),'personId':_0x1433f9['userId'],'resolved':_0x31a1bc['solved']===I[_0x57fbb5(0x100)],'unitId':_0x16ce02,'subUnitId':_0x503b1f,'text':JSON[_0x57fbb5(0x10e)](_0x1433f9[_0x57fbb5(0x135)]),'parentId':_0x17abba}),_0xf20424=_0x14efc6(_0x31a1bc[_0x57fbb5(0x124)][0x0]);return{..._0xf20424,'children':_0x31a1bc['replies'][_0x57fbb5(0x13e)](0x1)['map'](_0x26ce3e=>_0x14efc6(_0x26ce3e,_0xf20424['id']))};}return null;}let g=class{constructor(_0x39352a,_0x42a938,_0x150775,_0x3a96dc){const _0x5a3eb2=_0x5530ba;this[_0x5a3eb2(0x140)]=_0x39352a,this['_userService']=_0x42a938,this[_0x5a3eb2(0x14e)]=_0x150775,this['_injector']=_0x3a96dc;}async[_0x5530ba(0x152)](_0x5cf2a4){const _0x426cd6=_0x5530ba;var _0x262c90,_0x2208fc;const {parentId:_0x38b2cf,unitId:_0x53a749,text:_0x45e67d,threadId:_0x4b43cb}=_0x5cf2a4,_0x466dab=(_0x2208fc=(_0x262c90=_0x45e67d['customRanges'])==null?void 0x0:_0x262c90[_0x426cd6(0xf9)](_0x432f6d=>_0x432f6d[_0x426cd6(0xfe)]===c['CustomRangeType'][_0x426cd6(0xeb)])[_0x426cd6(0xff)](_0x502f2a=>_0x502f2a['rangeId']))!=null?_0x2208fc:[],_0x3a4ce4=JSON[_0x426cd6(0x10f)](_0x45e67d),_0x125c6a=(await this['_sessionService'][_0x426cd6(0x113)](_0x53a749))[_0x426cd6(0xec)]();if(_0x38b2cf){const _0x241b7c={'memberId':_0x125c6a,'unitId':_0x53a749,'content':_0x3a4ce4,'mention':_0x466dab,'threadId':_0x4b43cb},_0x54df54=(await this['_httpService'][_0x426cd6(0x13c)]('/universer-api/comment/unit/'+_0x53a749+_0x426cd6(0x105),{'body':_0x241b7c}))[_0x426cd6(0x143)][_0x426cd6(0x103)];return{..._0x5cf2a4,'id':_0x54df54[_0x426cd6(0x117)],'dT':c['dayjs'](+_0x54df54[_0x426cd6(0x14c)])[_0x426cd6(0x110)](_0x426cd6(0x15a)),'personId':_0x54df54[_0x426cd6(0xf1)]};}else{const _0x5bc214={'memberId':_0x125c6a,'unitId':_0x53a749,'content':_0x3a4ce4,'mention':_0x466dab},_0x238dc0=await this[_0x426cd6(0x140)][_0x426cd6(0x13c)]('/universer-api/comment/unit/'+_0x53a749+_0x426cd6(0x15b),{'body':_0x5bc214});return Y(_0x238dc0[_0x426cd6(0x143)][_0x426cd6(0x15e)],_0x5cf2a4);}}async[_0x5530ba(0x11a)](_0x443bac){const _0x224d97=_0x5530ba;var _0x476e54,_0x5e23f3;const {text:_0x39198d,unitId:_0x46a42c}=_0x443bac,_0x5ab1b0=(_0x5e23f3=(_0x476e54=_0x39198d[_0x224d97(0x157)])==null?void 0x0:_0x476e54[_0x224d97(0xf9)](_0x45719=>_0x45719[_0x224d97(0xfe)]===c['CustomRangeType'][_0x224d97(0xeb)])[_0x224d97(0xff)](_0x39da00=>_0x39da00[_0x224d97(0xe6)]))!=null?_0x5e23f3:[],_0x1c2510=JSON[_0x224d97(0x10f)](_0x39198d),_0x4d2fef=_0x443bac[_0x224d97(0xfb)],_0x4b3ffe=_0x443bac['id'],_0x1bee7b={'memberId':(await this['_sessionService'][_0x224d97(0x113)](_0x46a42c))['getMemberID'](),'unitId':_0x46a42c,'threadId':_0x4d2fef,'mention':_0x5ab1b0,'content':_0x1c2510,'replyId':_0x4b3ffe},_0x263aca=await this[_0x224d97(0x140)]['post'](_0x224d97(0x145)+_0x46a42c+_0x224d97(0x155),{'body':_0x1bee7b});return!_0x263aca[_0x224d97(0x143)][_0x224d97(0x136)]||_0x263aca[_0x224d97(0x143)]['error'][_0x224d97(0xf5)]===0x1;}async[_0x5530ba(0x121)](_0x284985){const _0x518a4f=_0x5530ba,{unitId:_0x5afe39}=_0x284985,_0x58351a=_0x284985[_0x518a4f(0xfb)],_0x1ada7d={'memberId':this['_userService'][_0x518a4f(0x125)]()[_0x518a4f(0x118)],'unitId':_0x5afe39,'threadId':_0x58351a,'solved':_0x284985[_0x518a4f(0xf4)]?I[_0x518a4f(0x100)]:I['OpenOrReOpen']},_0x4629e0=await this['_httpService'][_0x518a4f(0x13c)](_0x518a4f(0x145)+_0x5afe39+_0x518a4f(0x11e),{'body':_0x1ada7d});return!_0x4629e0['body'][_0x518a4f(0x136)]||_0x4629e0['body']['error']['code']===0x1;}async[_0x5530ba(0xe5)](_0x2db28c,_0x40a15a,_0x57e809,_0x310081){const _0x4435f0=_0x5530ba,_0x247523={'memberId':(await this[_0x4435f0(0x14e)][_0x4435f0(0x113)](_0x2db28c))['getMemberID'](),'threadId':_0x57e809,'replyId':_0x310081,'unitId':_0x2db28c},_0x5483fb=await this['_httpService'][_0x4435f0(0x13c)](_0x4435f0(0x145)+_0x2db28c+_0x4435f0(0xe7),{'body':_0x247523});return!_0x5483fb[_0x4435f0(0x143)][_0x4435f0(0x136)]||_0x5483fb[_0x4435f0(0x143)][_0x4435f0(0x136)][_0x4435f0(0xf5)]===0x1;}async[_0x5530ba(0x101)](_0x39b2dd,_0xfd43b1,_0x1f45a7){const _0x1684a3=_0x5530ba,_0x402ff3={'unitId':_0x39b2dd,'threadId':_0x1f45a7},_0x5b99b4=await this[_0x1684a3(0x140)][_0x1684a3(0x13c)](_0x1684a3(0x145)+_0x39b2dd+_0x1684a3(0x139),{'body':_0x402ff3}),_0x55d8c4=_0x1f45a7['map'](_0x454132=>G(_0x5b99b4[_0x1684a3(0x143)][_0x1684a3(0x114)][_0x454132],_0x39b2dd,_0xfd43b1))['filter'](Boolean);return Object[_0x1684a3(0x10a)](_0x5b99b4[_0x1684a3(0x143)][_0x1684a3(0x138)])[_0x1684a3(0x104)](_0x292252=>{const _0xd19810=_0x1684a3;this[_0xd19810(0xf0)][_0xd19810(0x15f)](_0x292252);}),_0x55d8c4;}['saveCommentToSnapshot'](_0x55dd2b){const _0x5004fa=_0x5530ba;return{'id':_0x55dd2b['id'],'threadId':_0x55dd2b['threadId'],'ref':_0x55dd2b[_0x5004fa(0xfa)]};}};g=x([_(0x0,c['Inject'](P['HTTPService'])),_(0x1,c[_0x5530ba(0x119)](c[_0x5530ba(0x130)])),_(0x2,c[_0x5530ba(0x119)](b[_0x5530ba(0x108)])),_(0x3,c[_0x5530ba(0x119)](c[_0x5530ba(0x132)]))],g);var H=Object[_0x5530ba(0x115)],J=(_0x3db080,_0x40cf4b,_0xf0ab28,_0x5bc5e0)=>{const _0x1c3706=_0x5530ba;for(var _0x46b931=_0x5bc5e0>0x1?void 0x0:_0x5bc5e0?H(_0x40cf4b,_0xf0ab28):_0x40cf4b,_0x419d60=_0x3db080[_0x1c3706(0xe9)]-0x1,_0x121384;_0x419d60>=0x0;_0x419d60--)(_0x121384=_0x3db080[_0x419d60])&&(_0x46b931=_0x121384(_0x46b931)||_0x46b931);return _0x46b931;},y=(_0x355704,_0x3ad1b8)=>(_0x4b51a2,_0x1fe759)=>_0x3ad1b8(_0x4b51a2,_0x1fe759,_0x355704);let C=class extends c[_0x5530ba(0x128)]{constructor(_0x2ea3f2,_0x5e5fc0){const _0x5485fd=_0x5530ba;super(),this[_0x5485fd(0x12d)]=_0x2ea3f2,this[_0x5485fd(0x109)]=_0x5e5fc0,this['_initDataSource']();}[_0x5530ba(0xf6)](){const _0x506729=_0x5530ba;this[_0x506729(0x12d)]['dataSource']=this['_threadCommentDataSource'],this[_0x506729(0x12d)][_0x506729(0x146)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x5530ba(0x119)](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x34fd8c,_0x1c81fb,_0x167bd6)=>_0x1c81fb in _0x34fd8c?F(_0x34fd8c,_0x1c81fb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x167bd6}):_0x34fd8c[_0x1c81fb]=_0x167bd6,W=(_0x196902,_0x463e6e,_0x4e9239,_0x472d1c)=>{const _0x2746f4=_0x5530ba;for(var _0x3e91e0=_0x472d1c>0x1?void 0x0:_0x472d1c?L(_0x463e6e,_0x4e9239):_0x463e6e,_0x4de1b3=_0x196902[_0x2746f4(0xe9)]-0x1,_0x5f20bd;_0x4de1b3>=0x0;_0x4de1b3--)(_0x5f20bd=_0x196902[_0x4de1b3])&&(_0x3e91e0=_0x5f20bd(_0x3e91e0)||_0x3e91e0);return _0x3e91e0;},O=(_0x1aaa2d,_0x2ddf3b)=>(_0x372322,_0x416655)=>_0x2ddf3b(_0x372322,_0x416655,_0x1aaa2d),N=(_0x4af5f9,_0xd9a19c,_0x5ae9a6)=>Z(_0x4af5f9,typeof _0xd9a19c!=_0x5530ba(0x106)?_0xd9a19c+'':_0xd9a19c,_0x5ae9a6);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x5530ba(0x12a)]{constructor(_0x47e8a0=D,_0x37a808,_0x21a30a){const _0x2d2243=_0x5530ba;super(),this['_config']=_0x47e8a0,this[_0x2d2243(0xef)]=_0x37a808,this[_0x2d2243(0xed)]=_0x21a30a;const {..._0x245514}=c['merge']({},D,this[_0x2d2243(0x13b)]);this[_0x2d2243(0xed)][_0x2d2243(0x14d)](q,_0x245514);}[_0x5530ba(0x15c)](){const _0x59c298=_0x5530ba;[[g],[C],[p]][_0x59c298(0x104)](_0x2cb2dd=>{this['_injector']['add'](_0x2cb2dd);});}['onReady'](){const _0x2ef3c8=_0x5530ba;this['_injector'][_0x2ef3c8(0xe3)](C),this[_0x2ef3c8(0xef)][_0x2ef3c8(0xe3)](p);}},N(exports[_0x5530ba(0x159)],_0x5530ba(0x153),U),N(exports[_0x5530ba(0x159)],_0x5530ba(0x10c),c[_0x5530ba(0x11f)][_0x5530ba(0xe0)]),exports[_0x5530ba(0x159)]=W([c[_0x5530ba(0xfc)](j['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x5530ba(0x111)]),O(0x1,c[_0x5530ba(0x119)](c[_0x5530ba(0x132)])),O(0x2,c[_0x5530ba(0x127)])],exports[_0x5530ba(0x159)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2c0ed5=_0x2a6b;(function(_0x4bb291,_0x21aecc){const _0x200932=_0x2a6b,_0x49be20=_0x4bb291();while(!![]){try{const _0xcdfcbd=parseInt(_0x200932(0xbd))/0x1*(parseInt(_0x200932(0xe2))/0x2)+-parseInt(_0x200932(0x101))/0x3+-parseInt(_0x200932(0x102))/0x4+parseInt(_0x200932(0xfa))/0x5*(parseInt(_0x200932(0xdb))/0x6)+-parseInt(_0x200932(0xc4))/0x7*(parseInt(_0x200932(0xda))/0x8)+-parseInt(_0x200932(0xb5))/0x9*(parseInt(_0x200932(0xe9))/0xa)+parseInt(_0x200932(0x114))/0xb;if(_0xcdfcbd===_0x21aecc)break;else _0x49be20['push'](_0x49be20['shift']());}catch(_0x41b9a9){_0x49be20['push'](_0x49be20['shift']());}}}(_0x2d05,0x6443e));import{CommentService as _0xa4a41e,CollaborationSessionService as _0x468325,UniverCollaborationClientPlugin as _0x2a40dd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x728b6a}from'@univerjs-pro/license';import{dayjs as _0x330c60,UserManagerService as _0x2e72fa,Inject as _0x86efa8,Injector as _0x54c456,Disposable as _0x1334f9,CustomRangeType as _0x2daa8e,UniverInstanceType as _0x3534d4,DependentOn as _0x3dbb65,IConfigService as _0x3b7c7f,Plugin as _0x1b6adf,merge as _0x5a663d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4633d2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x374989,IThreadCommentDataSourceService as _0x1b734d}from'@univerjs/thread-comment';import{bufferTime as _0x395d09}from'rxjs';function _0x2d05(){const _0x2ed4e5=['requireSession','15PKCCmH','resolveComment','resolved','error','getMemberID','/add','threadId','1760769ocaTgz','405912yhHYQC','createTimestamp','code','_threadCommentDataSource','rangeType','defineProperty','_threadCommentDataSourceService','Delete','length','replies','post','filter','rangeId','values','/solved','personId','thread-comment-data-source.config','updateComment','8496576LKaMvt','syncUpdateMutationToColla','pluginName','_threadCommentModel','find','users','map','type','764334ArxYvh','format','replyId','OpenOrReOpen','_sessionService','commentUpdate$','stringify','getOwnPropertyDescriptor','6865UoxsYb','forEach','root','Add','_init','getUnit','subscribe','231YCXkGn','Solve','setConfig','listComments','/edit','userId','_commentService','onStarting','UNRECOGNIZED','size','_configService','solved','_initDataSource','disposeWithMe','Reply','COMMENT','comments','delete','_injector','/universer-api/comment/unit/','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dataSource','115064mPdQmo','1319382VpGeZq','userID','_initUserSync','get','Unknown','Solved','/reply','66Phftlv','parse','_userService','getCurrentUser','getUser','Edit','unitId','10BgSjak','symbol','add','/universer-api/user/list','addComment','addUser','deleteComment','body','customRanges','_httpService','_config','saveCommentToSnapshot','getComment','YYYY/MM/DD\x20HH:mm','user','/delete'];_0x2d05=function(){return _0x2ed4e5;};return _0x2d05();}import{HTTPService as _0x146aae}from'@univerjs/network';const W=_0x2c0ed5(0xd8);var I=(_0x539bb7=>(_0x539bb7[_0x539bb7[_0x2c0ed5(0xb8)]=0x0]=_0x2c0ed5(0xb8),_0x539bb7[_0x539bb7[_0x2c0ed5(0xe0)]=0x1]='Solved',_0x539bb7[_0x539bb7['UNRECOGNIZED']=-0x1]=_0x2c0ed5(0xcc),_0x539bb7))(I||{}),v=(_0xb7672a=>(_0xb7672a[_0xb7672a[_0x2c0ed5(0xdf)]=0x0]=_0x2c0ed5(0xdf),_0xb7672a[_0xb7672a[_0x2c0ed5(0xc0)]=0x1]=_0x2c0ed5(0xc0),_0xb7672a[_0xb7672a[_0x2c0ed5(0xd2)]=0x2]=_0x2c0ed5(0xd2),_0xb7672a[_0xb7672a['Edit']=0x3]=_0x2c0ed5(0xe7),_0xb7672a[_0xb7672a[_0x2c0ed5(0x109)]=0x4]='Delete',_0xb7672a[_0xb7672a[_0x2c0ed5(0xc5)]=0x5]=_0x2c0ed5(0xc5),_0xb7672a[_0xb7672a[_0x2c0ed5(0xcc)]=-0x1]='UNRECOGNIZED',_0xb7672a))(v||{});const D=_0x48b382=>_0x330c60(new Date(+_0x48b382))[_0x2c0ed5(0xb6)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x646c00,_0x331cd3)=>{const _0x1fe836=_0x2c0ed5,_0x19c2d0=_0x646c00[_0x1fe836(0xde)](_0x2e72fa),_0x5642dc=_0x646c00[_0x1fe836(0xde)](_0x146aae);_0x331cd3['forEach'](_0x48e73e=>{const _0x1ac948=_0x1fe836;_0x19c2d0[_0x1ac948(0xe6)](_0x48e73e)&&_0x331cd3[_0x1ac948(0xd5)](_0x48e73e);}),_0x331cd3[_0x1fe836(0xcd)]&&(await _0x5642dc[_0x1fe836(0xde)](_0x1fe836(0xec),{'params':{'userIDs':[..._0x331cd3]}}))['body'][_0x1fe836(0xb2)]['forEach'](_0xbf5afb=>{const _0x463aea=_0x1fe836;_0xbf5afb&&_0x19c2d0[_0x463aea(0xee)](_0xbf5afb);});};var K=Object[_0x2c0ed5(0xbc)],V=(_0x2551f8,_0x1ef201,_0x5f419f,_0x10aa8c)=>{const _0xa5ff09=_0x2c0ed5;for(var _0x47b05c=_0x10aa8c>0x1?void 0x0:_0x10aa8c?K(_0x1ef201,_0x5f419f):_0x1ef201,_0x55446e=_0x2551f8[_0xa5ff09(0x10a)]-0x1,_0x505a13;_0x55446e>=0x0;_0x55446e--)(_0x505a13=_0x2551f8[_0x55446e])&&(_0x47b05c=_0x505a13(_0x47b05c)||_0x47b05c);return _0x47b05c;},p=(_0x2705e5,_0xeae94b)=>(_0x5be559,_0x53166c)=>_0xeae94b(_0x5be559,_0x53166c,_0x2705e5);let S=class extends _0x1334f9{constructor(_0x365576,_0x208427,_0x22b90,_0xc0091f){const _0x1828db=_0x2c0ed5;super(),this[_0x1828db(0xca)]=_0x365576,this[_0x1828db(0x117)]=_0x208427,this['_userService']=_0x22b90,this[_0x1828db(0xd6)]=_0xc0091f,this[_0x1828db(0xc1)](),this[_0x1828db(0xdd)]();}[_0x2c0ed5(0xdd)](){const _0x2ddf4c=_0x2c0ed5;this[_0x2ddf4c(0xd1)](this['_threadCommentModel'][_0x2ddf4c(0xba)]['pipe'](_0x395d09(0x10))[_0x2ddf4c(0xc3)](_0x38a6d9=>{const _0x5cd65a=new Set();_0x38a6d9['forEach'](_0x478a51=>{const _0x3bbce1=_0x2a6b;switch(_0x478a51[_0x3bbce1(0xb4)]){case'add':{const _0x5c3647=_0x478a51['payload'][_0x3bbce1(0x111)];_0x5cd65a['add'](_0x5c3647);break;}}}),B(this['_injector'],_0x5cd65a);}));}[_0x2c0ed5(0xc1)](){this['disposeWithMe'](this['_commentService']['commentUpdate$']['subscribe'](async _0x29676e=>{const _0x526496=_0x2a6b;var _0x1c8636,_0x174bf9,_0x11c7bf,_0x572002;const _0x1cfcd3=(_0x1c8636=this[_0x526496(0x117)][_0x526496(0xc2)](_0x29676e[_0x526496(0xe8)])[_0x526496(0xb1)](_0x1a10a1=>_0x1a10a1[_0x526496(0x100)]===_0x29676e[_0x526496(0x100)]))==null?void 0x0:_0x1c8636[_0x526496(0xbf)];if(!_0x1cfcd3)return;const {unitId:_0x24698a,subUnitId:_0x40800d}=_0x1cfcd3;switch(_0x29676e[_0x526496(0xf7)]&&this['_userService'][_0x526496(0xee)](_0x29676e[_0x526496(0xf7)]),_0x29676e[_0x526496(0xb4)]){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0x526496(0xed)](_0x24698a,_0x40800d,{'unitId':_0x24698a,'subUnitId':_0x40800d,'ref':'','id':_0x29676e[_0x526496(0xb7)],'dT':D(+_0x29676e[_0x526496(0x103)]),'threadId':_0x29676e[_0x526496(0x100)],'personId':(_0x11c7bf=(_0x174bf9=_0x29676e[_0x526496(0xf7)])==null?void 0x0:_0x174bf9[_0x526496(0xdc)])!=null?_0x11c7bf:_0x29676e['userId'],'text':JSON[_0x526496(0xe3)](_0x29676e['content']),'parentId':_0x1cfcd3['id']});break;}case v[_0x526496(0x109)]:{const _0x4e9633=this['_threadCommentModel'][_0x526496(0xf5)](_0x24698a,_0x40800d,_0x29676e[_0x526496(0xb7)]);_0x4e9633&&_0x4e9633['parentId']&&this['_threadCommentModel'][_0x526496(0xef)](_0x24698a,_0x40800d,_0x29676e[_0x526496(0xb7)]);break;}case v[_0x526496(0xe7)]:{this[_0x526496(0x117)][_0x526496(0x113)](_0x24698a,_0x40800d,{'commentId':_0x29676e['replyId'],'text':JSON['parse'](_0x29676e['content'])});break;}case v[_0x526496(0xc5)]:{const _0x293758=(_0x572002=this[_0x526496(0x117)][_0x526496(0xc2)](_0x29676e[_0x526496(0xe8)])['find'](_0x1116cf=>_0x1116cf[_0x526496(0x100)]===_0x29676e[_0x526496(0x100)]))==null?void 0x0:_0x572002['root'];_0x293758&&this['_threadCommentModel'][_0x526496(0xfb)](_0x24698a,_0x40800d,_0x293758['id'],_0x29676e[_0x526496(0xcf)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x86efa8(_0xa4a41e)),p(0x1,_0x86efa8(_0x374989)),p(0x2,_0x86efa8(_0x2e72fa)),p(0x3,_0x86efa8(_0x54c456))],S);function _0x2a6b(_0x4389de,_0x58cdd6){const _0x2d05a9=_0x2d05();return _0x2a6b=function(_0x2a6b60,_0x372639){_0x2a6b60=_0x2a6b60-0xb1;let _0x585a11=_0x2d05a9[_0x2a6b60];return _0x585a11;},_0x2a6b(_0x4389de,_0x58cdd6);}const z=_0x2c0ed5(0x112),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x540ad3,_0x296723,_0x25bcb1,_0x702291)=>{for(var _0x258526=_0x702291>0x1?void 0x0:_0x702291?k(_0x296723,_0x25bcb1):_0x296723,_0xcf5ee4=_0x540ad3['length']-0x1,_0xd03798;_0xcf5ee4>=0x0;_0xcf5ee4--)(_0xd03798=_0x540ad3[_0xcf5ee4])&&(_0x258526=_0xd03798(_0x258526)||_0x258526);return _0x258526;},_=(_0x517eb0,_0xf3a1e9)=>(_0x1f4f4a,_0x9c55bf)=>_0xf3a1e9(_0x1f4f4a,_0x9c55bf,_0x517eb0);function X(_0xf1303c,_0x2993fe){const _0x3634c6=_0x2c0ed5,_0x16d263=_0xf1303c[_0x3634c6(0x10b)][0x0];return{..._0x2993fe,'id':_0x16d263[_0x3634c6(0xb7)],'resolved':_0xf1303c[_0x3634c6(0xcf)]===0x1,'dT':D(_0x16d263[_0x3634c6(0x103)]),'personId':_0x16d263['userId'],'threadId':_0x16d263[_0x3634c6(0x100)]};}function ee(_0x21553a,_0x5ab1b2,_0x316be5){const _0x4580f9=_0x2c0ed5;var _0x9d0bba,_0xc4c47c;if(((_0xc4c47c=(_0x9d0bba=_0x21553a==null?void 0x0:_0x21553a[_0x4580f9(0x10b)])==null?void 0x0:_0x9d0bba[_0x4580f9(0x10a)])!=null?_0xc4c47c:0x0)>0x0){const _0x56562d=(_0x323006,_0x568e81)=>({'id':_0x323006['replyId'],'threadId':_0x323006[_0x4580f9(0x100)],'dT':D(_0x323006[_0x4580f9(0x103)]),'personId':_0x323006['userId'],'resolved':_0x21553a[_0x4580f9(0xcf)]===I[_0x4580f9(0xe0)],'unitId':_0x5ab1b2,'subUnitId':_0x316be5,'text':JSON['parse'](_0x323006['content']),'parentId':_0x568e81}),_0x3fcb2d=_0x56562d(_0x21553a[_0x4580f9(0x10b)][0x0]);return{..._0x3fcb2d,'children':_0x21553a[_0x4580f9(0x10b)]['slice'](0x1)[_0x4580f9(0xb3)](_0x388809=>_0x56562d(_0x388809,_0x3fcb2d['id']))};}return null;}let f=class{constructor(_0x57c2cc,_0x21b5ac,_0x1922ba,_0x516869){const _0xda389=_0x2c0ed5;this[_0xda389(0xf2)]=_0x57c2cc,this['_userService']=_0x21b5ac,this[_0xda389(0xb9)]=_0x1922ba,this[_0xda389(0xd6)]=_0x516869;}async[_0x2c0ed5(0xed)](_0x3e2b15){const _0x37cdca=_0x2c0ed5;var _0x9c6cd7,_0x48d5b5;const {parentId:_0x485a05,unitId:_0x9b83a6,text:_0x2d67b6,threadId:_0x4ed29f}=_0x3e2b15,_0x597a35=(_0x48d5b5=(_0x9c6cd7=_0x2d67b6[_0x37cdca(0xf1)])==null?void 0x0:_0x9c6cd7[_0x37cdca(0x10d)](_0x1ecc03=>_0x1ecc03[_0x37cdca(0x106)]===_0x2daa8e[_0x37cdca(0xd3)])[_0x37cdca(0xb3)](_0x1657e0=>_0x1657e0[_0x37cdca(0x10e)]))!=null?_0x48d5b5:[],_0x30d183=JSON[_0x37cdca(0xbb)](_0x2d67b6),_0x218a8b=(await this['_sessionService'][_0x37cdca(0xf9)](_0x9b83a6))[_0x37cdca(0xfe)]();if(_0x485a05){const _0x538792={'memberId':_0x218a8b,'unitId':_0x9b83a6,'content':_0x30d183,'mention':_0x597a35,'threadId':_0x4ed29f},_0x17d441=(await this['_httpService'][_0x37cdca(0x10c)]('/universer-api/comment/unit/'+_0x9b83a6+_0x37cdca(0xe1),{'body':_0x538792}))[_0x37cdca(0xf0)]['reply'];return{..._0x3e2b15,'id':_0x17d441['replyId'],'dT':_0x330c60(+_0x17d441[_0x37cdca(0x103)])[_0x37cdca(0xb6)](_0x37cdca(0xf6)),'personId':_0x17d441[_0x37cdca(0xc9)]};}else{const _0x2f39a9={'memberId':_0x218a8b,'unitId':_0x9b83a6,'content':_0x30d183,'mention':_0x597a35},_0x7f83c2=await this[_0x37cdca(0xf2)][_0x37cdca(0x10c)](_0x37cdca(0xd7)+_0x9b83a6+_0x37cdca(0xff),{'body':_0x2f39a9});return X(_0x7f83c2[_0x37cdca(0xf0)]['comment'],_0x3e2b15);}}async['updateComment'](_0x1713e2){const _0xed4ec6=_0x2c0ed5;var _0x4d4eec,_0x335e6d;const {text:_0x420ad2,unitId:_0x523c9d}=_0x1713e2,_0x53a8ef=(_0x335e6d=(_0x4d4eec=_0x420ad2['customRanges'])==null?void 0x0:_0x4d4eec[_0xed4ec6(0x10d)](_0x539f2b=>_0x539f2b[_0xed4ec6(0x106)]===_0x2daa8e[_0xed4ec6(0xd3)])[_0xed4ec6(0xb3)](_0x34a23a=>_0x34a23a[_0xed4ec6(0x10e)]))!=null?_0x335e6d:[],_0x3b1c88=JSON[_0xed4ec6(0xbb)](_0x420ad2),_0x1b79ff=_0x1713e2['threadId'],_0x45c4a2=_0x1713e2['id'],_0x225fbc={'memberId':(await this[_0xed4ec6(0xb9)][_0xed4ec6(0xf9)](_0x523c9d))[_0xed4ec6(0xfe)](),'unitId':_0x523c9d,'threadId':_0x1b79ff,'mention':_0x53a8ef,'content':_0x3b1c88,'replyId':_0x45c4a2},_0x5dddcd=await this['_httpService'][_0xed4ec6(0x10c)](_0xed4ec6(0xd7)+_0x523c9d+_0xed4ec6(0xc8),{'body':_0x225fbc});return!_0x5dddcd[_0xed4ec6(0xf0)][_0xed4ec6(0xfd)]||_0x5dddcd['body']['error'][_0xed4ec6(0x104)]===0x1;}async['resolveComment'](_0x3ce1d0){const _0x149f18=_0x2c0ed5,{unitId:_0x41ec9b}=_0x3ce1d0,_0x387aa7=_0x3ce1d0['threadId'],_0x36ca3e={'memberId':this[_0x149f18(0xe4)][_0x149f18(0xe5)]()[_0x149f18(0xdc)],'unitId':_0x41ec9b,'threadId':_0x387aa7,'solved':_0x3ce1d0[_0x149f18(0xfc)]?I[_0x149f18(0xe0)]:I[_0x149f18(0xb8)]},_0x185490=await this[_0x149f18(0xf2)][_0x149f18(0x10c)](_0x149f18(0xd7)+_0x41ec9b+_0x149f18(0x110),{'body':_0x36ca3e});return!_0x185490[_0x149f18(0xf0)]['error']||_0x185490[_0x149f18(0xf0)][_0x149f18(0xfd)][_0x149f18(0x104)]===0x1;}async[_0x2c0ed5(0xef)](_0x2c4ccb,_0x5bd857,_0x35d2cb,_0x306a61){const _0x1c5cb1=_0x2c0ed5,_0x1351c1={'memberId':(await this['_sessionService']['requireSession'](_0x2c4ccb))[_0x1c5cb1(0xfe)](),'threadId':_0x35d2cb,'replyId':_0x306a61,'unitId':_0x2c4ccb},_0x433d1f=await this[_0x1c5cb1(0xf2)]['post'](_0x1c5cb1(0xd7)+_0x2c4ccb+_0x1c5cb1(0xf8),{'body':_0x1351c1});return!_0x433d1f[_0x1c5cb1(0xf0)][_0x1c5cb1(0xfd)]||_0x433d1f[_0x1c5cb1(0xf0)][_0x1c5cb1(0xfd)][_0x1c5cb1(0x104)]===0x1;}async[_0x2c0ed5(0xc7)](_0x393a48,_0x30b1c4,_0x214d91){const _0x23353e=_0x2c0ed5,_0x2b457d={'unitId':_0x393a48,'threadId':_0x214d91},_0x27a610=await this[_0x23353e(0xf2)]['post']('/universer-api/comment/unit/'+_0x393a48+'/list',{'body':_0x2b457d}),_0x28ae3f=_0x214d91[_0x23353e(0xb3)](_0x54621f=>ee(_0x27a610['body'][_0x23353e(0xd4)][_0x54621f],_0x393a48,_0x30b1c4))['filter'](Boolean);return Object[_0x23353e(0x10f)](_0x27a610[_0x23353e(0xf0)][_0x23353e(0xb2)])[_0x23353e(0xbe)](_0x1a4239=>{const _0x5e4c09=_0x23353e;this[_0x5e4c09(0xe4)]['addUser'](_0x1a4239);}),_0x28ae3f;}[_0x2c0ed5(0xf4)](_0x3a2d7d){const _0x32f571=_0x2c0ed5;return{'id':_0x3a2d7d['id'],'threadId':_0x3a2d7d[_0x32f571(0x100)],'ref':_0x3a2d7d['ref']};}};f=Q([_(0x0,_0x86efa8(_0x146aae)),_(0x1,_0x86efa8(_0x2e72fa)),_(0x2,_0x86efa8(_0x468325)),_(0x3,_0x86efa8(_0x54c456))],f);var re=Object[_0x2c0ed5(0xbc)],te=(_0x5e6827,_0x298c55,_0x71acf9,_0x36928d)=>{for(var _0x52579d=_0x36928d>0x1?void 0x0:_0x36928d?re(_0x298c55,_0x71acf9):_0x298c55,_0x404ceb=_0x5e6827['length']-0x1,_0x4a3612;_0x404ceb>=0x0;_0x404ceb--)(_0x4a3612=_0x5e6827[_0x404ceb])&&(_0x52579d=_0x4a3612(_0x52579d)||_0x52579d);return _0x52579d;},N=(_0x21bdc7,_0x423ca0)=>(_0x5b8bf8,_0x118665)=>_0x423ca0(_0x5b8bf8,_0x118665,_0x21bdc7);let g=class extends _0x1334f9{constructor(_0x5a009e,_0x1c811a){const _0xddeae=_0x2c0ed5;super(),this[_0xddeae(0x108)]=_0x5a009e,this[_0xddeae(0x105)]=_0x1c811a,this[_0xddeae(0xd0)]();}['_initDataSource'](){const _0x3a95bd=_0x2c0ed5;this[_0x3a95bd(0x108)][_0x3a95bd(0xd9)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x3a95bd(0x115)]=!0x1;}};g=te([N(0x0,_0x1b734d),N(0x1,_0x86efa8(f))],g);var se=Object[_0x2c0ed5(0x107)],oe=Object[_0x2c0ed5(0xbc)],ne=(_0x19e745,_0x2b9596,_0x359737)=>_0x2b9596 in _0x19e745?se(_0x19e745,_0x2b9596,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x359737}):_0x19e745[_0x2b9596]=_0x359737,ie=(_0x559424,_0x381d7f,_0x3b1694,_0x491bc5)=>{const _0x17b51c=_0x2c0ed5;for(var _0xed89e2=_0x491bc5>0x1?void 0x0:_0x491bc5?oe(_0x381d7f,_0x3b1694):_0x381d7f,_0x230088=_0x559424[_0x17b51c(0x10a)]-0x1,_0xca7be3;_0x230088>=0x0;_0x230088--)(_0xca7be3=_0x559424[_0x230088])&&(_0xed89e2=_0xca7be3(_0xed89e2)||_0xed89e2);return _0xed89e2;},w=(_0x2073a0,_0x323777)=>(_0x259d8b,_0x4419f1)=>_0x323777(_0x259d8b,_0x4419f1,_0x2073a0),$=(_0x1026ae,_0x395fa0,_0x133f1d)=>ne(_0x1026ae,typeof _0x395fa0!=_0x2c0ed5(0xea)?_0x395fa0+'':_0x395fa0,_0x133f1d);let b=class extends _0x1b6adf{constructor(_0x2073bc=M,_0x57c670,_0x5c6875){const _0x1e7dac=_0x2c0ed5;super(),this[_0x1e7dac(0xf3)]=_0x2073bc,this['_injector']=_0x57c670,this['_configService']=_0x5c6875;const {..._0x46d0dd}=_0x5a663d({},M,this['_config']);this[_0x1e7dac(0xce)][_0x1e7dac(0xc6)](z,_0x46d0dd);}[_0x2c0ed5(0xcb)](){const _0x223f0f=_0x2c0ed5;[[f],[g],[S]][_0x223f0f(0xbe)](_0x31e763=>{const _0x2e8b0f=_0x223f0f;this['_injector'][_0x2e8b0f(0xeb)](_0x31e763);});}['onReady'](){const _0x464881=_0x2c0ed5;this[_0x464881(0xd6)][_0x464881(0xde)](g),this[_0x464881(0xd6)]['get'](S);}};$(b,_0x2c0ed5(0x116),W),$(b,_0x2c0ed5(0xb4),_0x3534d4['UNIVER_UNKNOWN']),b=ie([_0x3dbb65(_0x4633d2,_0x2a40dd,_0x728b6a),w(0x1,_0x86efa8(_0x54c456)),w(0x2,_0x3b7c7f)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x30ca78=_0x994c;(function(_0x543fde,_0x395628){const _0x14a7fd=_0x994c,_0x4065f7=_0x543fde();while(!![]){try{const _0x1e4be6=-parseInt(_0x14a7fd(0x243))/0x1*(parseInt(_0x14a7fd(0x1fc))/0x2)+-parseInt(_0x14a7fd(0x246))/0x3+-parseInt(_0x14a7fd(0x224))/0x4+-parseInt(_0x14a7fd(0x1e9))/0x5+parseInt(_0x14a7fd(0x20b))/0x6*(parseInt(_0x14a7fd(0x1f6))/0x7)+-parseInt(_0x14a7fd(0x218))/0x8+-parseInt(_0x14a7fd(0x241))/0x9*(-parseInt(_0x14a7fd(0x238))/0xa);if(_0x1e4be6===_0x395628)break;else _0x4065f7['push'](_0x4065f7['shift']());}catch(_0x632ecb){_0x4065f7['push'](_0x4065f7['shift']());}}}(_0x3361,0xaa513));import{CommentService as _0xdb2916,CollaborationSessionService as _0x208670,UniverCollaborationClientPlugin as _0x4e5df2}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x6e3915}from'@univerjs-pro/license';import{dayjs as _0x300099,UserManagerService as _0x37422e,Inject as _0x352b53,Injector as _0x5b310b,Disposable as _0x351a69,CustomRangeType as _0x69d053,UniverInstanceType as _0x36f1da,DependentOn as _0x1e16fa,IConfigService as _0x2b2f90,Plugin as _0xcec0a2,merge as _0x4df787}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4ef1d6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x327d81,IThreadCommentDataSourceService as _0x5949bb}from'@univerjs/thread-comment';import{bufferTime as _0x66e708}from'rxjs';function _0x994c(_0x29496f,_0x300868){const _0x336196=_0x3361();return _0x994c=function(_0x994ccc,_0x396c45){_0x994ccc=_0x994ccc-0x1e4;let _0x19c8ae=_0x336196[_0x994ccc];return _0x19c8ae;},_0x994c(_0x29496f,_0x300868);}import{HTTPService as _0xfebc63}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x314ece=>(_0x314ece[_0x314ece[_0x30ca78(0x1e5)]=0x0]='OpenOrReOpen',_0x314ece[_0x314ece['Solved']=0x1]='Solved',_0x314ece[_0x314ece[_0x30ca78(0x21f)]=-0x1]=_0x30ca78(0x21f),_0x314ece))(I||{}),v=(_0x4eebff=>(_0x4eebff[_0x4eebff['Unknown']=0x0]=_0x30ca78(0x1e4),_0x4eebff[_0x4eebff['Add']=0x1]=_0x30ca78(0x202),_0x4eebff[_0x4eebff[_0x30ca78(0x21d)]=0x2]=_0x30ca78(0x21d),_0x4eebff[_0x4eebff[_0x30ca78(0x210)]=0x3]='Edit',_0x4eebff[_0x4eebff[_0x30ca78(0x233)]=0x4]=_0x30ca78(0x233),_0x4eebff[_0x4eebff[_0x30ca78(0x245)]=0x5]=_0x30ca78(0x245),_0x4eebff[_0x4eebff[_0x30ca78(0x21f)]=-0x1]=_0x30ca78(0x21f),_0x4eebff))(v||{});const D=_0x2d129d=>_0x300099(new Date(+_0x2d129d))[_0x30ca78(0x237)](_0x30ca78(0x1e6)),B=async(_0x16a063,_0x1622cb)=>{const _0x1e31e5=_0x30ca78,_0x49c189=_0x16a063[_0x1e31e5(0x216)](_0x37422e),_0x413b31=_0x16a063[_0x1e31e5(0x216)](_0xfebc63);_0x1622cb['forEach'](_0x1da042=>{const _0x5c549a=_0x1e31e5;_0x49c189[_0x5c549a(0x21e)](_0x1da042)&&_0x1622cb[_0x5c549a(0x1f4)](_0x1da042);}),_0x1622cb[_0x1e31e5(0x1ea)]&&(await _0x413b31[_0x1e31e5(0x216)]('/universer-api/user/list',{'params':{'userIDs':[..._0x1622cb]}}))['body'][_0x1e31e5(0x1ed)]['forEach'](_0x576b3f=>{const _0x4e348d=_0x1e31e5;_0x576b3f&&_0x49c189[_0x4e348d(0x1e7)](_0x576b3f);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x486637,_0x1fac66,_0x447e77,_0x4ecc03)=>{const _0x3ec821=_0x30ca78;for(var _0x286b46=_0x4ecc03>0x1?void 0x0:_0x4ecc03?K(_0x1fac66,_0x447e77):_0x1fac66,_0x30463d=_0x486637[_0x3ec821(0x236)]-0x1,_0x42aeab;_0x30463d>=0x0;_0x30463d--)(_0x42aeab=_0x486637[_0x30463d])&&(_0x286b46=_0x42aeab(_0x286b46)||_0x286b46);return _0x286b46;},p=(_0x17451c,_0x10764d)=>(_0x4e73f0,_0x360391)=>_0x10764d(_0x4e73f0,_0x360391,_0x17451c);let S=class extends _0x351a69{constructor(_0x616f9c,_0x1ca49f,_0x3c3295,_0x29d0b7){const _0x24b294=_0x30ca78;super(),this[_0x24b294(0x1ef)]=_0x616f9c,this[_0x24b294(0x1f5)]=_0x1ca49f,this[_0x24b294(0x231)]=_0x3c3295,this[_0x24b294(0x23c)]=_0x29d0b7,this[_0x24b294(0x225)](),this[_0x24b294(0x205)]();}[_0x30ca78(0x205)](){const _0x174269=_0x30ca78;this[_0x174269(0x22c)](this[_0x174269(0x1f5)]['commentUpdate$'][_0x174269(0x1eb)](_0x66e708(0x10))[_0x174269(0x235)](_0x2dcc43=>{const _0x4283f7=_0x174269,_0x417650=new Set();_0x2dcc43['forEach'](_0x3137e3=>{const _0x2d2cae=_0x994c;switch(_0x3137e3[_0x2d2cae(0x201)]){case _0x2d2cae(0x1f3):{const _0x17dd30=_0x3137e3['payload']['personId'];_0x417650[_0x2d2cae(0x1f3)](_0x17dd30);break;}}}),B(this[_0x4283f7(0x23c)],_0x417650);}));}[_0x30ca78(0x225)](){const _0x22f0c8=_0x30ca78;this[_0x22f0c8(0x22c)](this[_0x22f0c8(0x1ef)][_0x22f0c8(0x229)]['subscribe'](async _0x19304b=>{const _0x57cfdc=_0x22f0c8;var _0x56ac86,_0x13709c,_0x1b1da3,_0x513d21;const _0x238751=(_0x56ac86=this[_0x57cfdc(0x1f5)][_0x57cfdc(0x21c)](_0x19304b[_0x57cfdc(0x223)])[_0x57cfdc(0x242)](_0x2eae88=>_0x2eae88[_0x57cfdc(0x1fb)]===_0x19304b[_0x57cfdc(0x1fb)]))==null?void 0x0:_0x56ac86[_0x57cfdc(0x209)];if(!_0x238751)return;const {unitId:_0x1c0783,subUnitId:_0x5235ea}=_0x238751;switch(_0x19304b[_0x57cfdc(0x247)]&&this['_userService']['addUser'](_0x19304b['user']),_0x19304b['type']){case v[_0x57cfdc(0x202)]:break;case v[_0x57cfdc(0x21d)]:{this['_threadCommentModel'][_0x57cfdc(0x1f8)](_0x1c0783,_0x5235ea,{'unitId':_0x1c0783,'subUnitId':_0x5235ea,'ref':'','id':_0x19304b[_0x57cfdc(0x1fa)],'dT':D(+_0x19304b['createTimestamp']),'threadId':_0x19304b[_0x57cfdc(0x1fb)],'personId':(_0x1b1da3=(_0x13709c=_0x19304b['user'])==null?void 0x0:_0x13709c[_0x57cfdc(0x23a)])!=null?_0x1b1da3:_0x19304b[_0x57cfdc(0x234)],'text':JSON[_0x57cfdc(0x22d)](_0x19304b[_0x57cfdc(0x206)]),'parentId':_0x238751['id']});break;}case v['Delete']:{const _0x164c92=this[_0x57cfdc(0x1f5)][_0x57cfdc(0x21a)](_0x1c0783,_0x5235ea,_0x19304b['replyId']);_0x164c92&&_0x164c92[_0x57cfdc(0x21b)]&&this[_0x57cfdc(0x1f5)][_0x57cfdc(0x222)](_0x1c0783,_0x5235ea,_0x19304b[_0x57cfdc(0x1fa)]);break;}case v['Edit']:{this[_0x57cfdc(0x1f5)]['updateComment'](_0x1c0783,_0x5235ea,{'commentId':_0x19304b[_0x57cfdc(0x1fa)],'text':JSON[_0x57cfdc(0x22d)](_0x19304b['content'])});break;}case v[_0x57cfdc(0x245)]:{const _0x16a2b7=(_0x513d21=this['_threadCommentModel']['getUnit'](_0x19304b['unitId'])['find'](_0x28c8b6=>_0x28c8b6[_0x57cfdc(0x1fb)]===_0x19304b[_0x57cfdc(0x1fb)]))==null?void 0x0:_0x513d21[_0x57cfdc(0x209)];_0x16a2b7&&this[_0x57cfdc(0x1f5)][_0x57cfdc(0x207)](_0x1c0783,_0x5235ea,_0x16a2b7['id'],_0x19304b[_0x57cfdc(0x22b)]===I[_0x57cfdc(0x22f)]);break;}}}));}};S=V([p(0x0,_0x352b53(_0xdb2916)),p(0x1,_0x352b53(_0x327d81)),p(0x2,_0x352b53(_0x37422e)),p(0x3,_0x352b53(_0x5b310b))],S);function _0x3361(){const _0x2febe6=['_userService','pluginName','Delete','userId','subscribe','length','format','530GKFVLt','getOwnPropertyDescriptor','userID','code','_injector','comment','symbol','_sessionService','listComments','580311ApTtTX','find','2TfAQzA','post','Solve','3305457kBFUIZ','user','Unknown','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','addUser','requireSession','4167385WQggtB','size','pipe','setConfig','users','filter','_commentService','_configService','getMemberID','_initDataSource','add','delete','_threadCommentModel','7MgYdmU','customRanges','addComment','ref','replyId','threadId','599350AmOcRz','syncUpdateMutationToColla','/delete','_config','/solved','type','Add','comments','forEach','_initUserSync','content','resolveComment','/add','root','/reply','3038502frSRYE','body','onReady','/universer-api/comment/unit/','error','Edit','_threadCommentDataSourceService','rangeId','values','slice','replies','get','createTimestamp','2888576UZaLMr','resolved','getComment','parentId','getUnit','Reply','getUser','UNRECOGNIZED','reply','stringify','deleteComment','unitId','1321868GeFRvJ','_init','COMMENT','map','_threadCommentDataSource','commentUpdate$','_httpService','solved','disposeWithMe','parse','rangeType','Solved','dataSource'];_0x3361=function(){return _0x2febe6;};return _0x3361();}const z='thread-comment-data-source.config',M={};var k=Object[_0x30ca78(0x239)],Q=(_0x48113,_0x2d55f7,_0x569620,_0x17a119)=>{for(var _0x2b38b7=_0x17a119>0x1?void 0x0:_0x17a119?k(_0x2d55f7,_0x569620):_0x2d55f7,_0x1e1e71=_0x48113['length']-0x1,_0x4d1906;_0x1e1e71>=0x0;_0x1e1e71--)(_0x4d1906=_0x48113[_0x1e1e71])&&(_0x2b38b7=_0x4d1906(_0x2b38b7)||_0x2b38b7);return _0x2b38b7;},_=(_0x45722e,_0x5085da)=>(_0x4a22fe,_0xd1f261)=>_0x5085da(_0x4a22fe,_0xd1f261,_0x45722e);function X(_0xcd4ff1,_0x1f4336){const _0x2d4f54=_0x30ca78,_0x4e5431=_0xcd4ff1[_0x2d4f54(0x215)][0x0];return{..._0x1f4336,'id':_0x4e5431[_0x2d4f54(0x1fa)],'resolved':_0xcd4ff1['solved']===0x1,'dT':D(_0x4e5431[_0x2d4f54(0x217)]),'personId':_0x4e5431['userId'],'threadId':_0x4e5431[_0x2d4f54(0x1fb)]};}function ee(_0x1aea44,_0x3d5dcd,_0x3d7d76){const _0x2743f6=_0x30ca78;var _0x2d0d0f,_0xdbd4bb;if(((_0xdbd4bb=(_0x2d0d0f=_0x1aea44==null?void 0x0:_0x1aea44[_0x2743f6(0x215)])==null?void 0x0:_0x2d0d0f['length'])!=null?_0xdbd4bb:0x0)>0x0){const _0x49e25c=(_0x3ae6f5,_0x53792e)=>({'id':_0x3ae6f5[_0x2743f6(0x1fa)],'threadId':_0x3ae6f5[_0x2743f6(0x1fb)],'dT':D(_0x3ae6f5[_0x2743f6(0x217)]),'personId':_0x3ae6f5[_0x2743f6(0x234)],'resolved':_0x1aea44[_0x2743f6(0x22b)]===I['Solved'],'unitId':_0x3d5dcd,'subUnitId':_0x3d7d76,'text':JSON[_0x2743f6(0x22d)](_0x3ae6f5[_0x2743f6(0x206)]),'parentId':_0x53792e}),_0x5015b9=_0x49e25c(_0x1aea44[_0x2743f6(0x215)][0x0]);return{..._0x5015b9,'children':_0x1aea44[_0x2743f6(0x215)][_0x2743f6(0x214)](0x1)['map'](_0x37dce6=>_0x49e25c(_0x37dce6,_0x5015b9['id']))};}return null;}let f=class{constructor(_0x140e22,_0x528c1a,_0x34eba7,_0x2bafda){const _0x1f8998=_0x30ca78;this[_0x1f8998(0x22a)]=_0x140e22,this[_0x1f8998(0x231)]=_0x528c1a,this[_0x1f8998(0x23f)]=_0x34eba7,this[_0x1f8998(0x23c)]=_0x2bafda;}async[_0x30ca78(0x1f8)](_0x188e7b){const _0x41a016=_0x30ca78;var _0x4adc4e,_0xe97026;const {parentId:_0x4b1e44,unitId:_0x4baf4,text:_0x57740d,threadId:_0x2518e5}=_0x188e7b,_0xd70a8f=(_0xe97026=(_0x4adc4e=_0x57740d[_0x41a016(0x1f7)])==null?void 0x0:_0x4adc4e[_0x41a016(0x1ee)](_0x146e9b=>_0x146e9b[_0x41a016(0x22e)]===_0x69d053[_0x41a016(0x226)])[_0x41a016(0x227)](_0x550f8b=>_0x550f8b[_0x41a016(0x212)]))!=null?_0xe97026:[],_0x400144=JSON[_0x41a016(0x221)](_0x57740d),_0x409ae1=(await this[_0x41a016(0x23f)][_0x41a016(0x1e8)](_0x4baf4))[_0x41a016(0x1f1)]();if(_0x4b1e44){const _0x2f48e5={'memberId':_0x409ae1,'unitId':_0x4baf4,'content':_0x400144,'mention':_0xd70a8f,'threadId':_0x2518e5},_0x6efe7d=(await this[_0x41a016(0x22a)]['post']('/universer-api/comment/unit/'+_0x4baf4+_0x41a016(0x20a),{'body':_0x2f48e5}))[_0x41a016(0x20c)][_0x41a016(0x220)];return{..._0x188e7b,'id':_0x6efe7d[_0x41a016(0x1fa)],'dT':_0x300099(+_0x6efe7d[_0x41a016(0x217)])[_0x41a016(0x237)](_0x41a016(0x1e6)),'personId':_0x6efe7d['userId']};}else{const _0x3554a3={'memberId':_0x409ae1,'unitId':_0x4baf4,'content':_0x400144,'mention':_0xd70a8f},_0x10fd55=await this[_0x41a016(0x22a)][_0x41a016(0x244)](_0x41a016(0x20e)+_0x4baf4+_0x41a016(0x208),{'body':_0x3554a3});return X(_0x10fd55['body'][_0x41a016(0x23d)],_0x188e7b);}}async['updateComment'](_0x38d09f){const _0x3eb677=_0x30ca78;var _0x5952a9,_0x1f84a4;const {text:_0x44a756,unitId:_0x16286c}=_0x38d09f,_0x283216=(_0x1f84a4=(_0x5952a9=_0x44a756[_0x3eb677(0x1f7)])==null?void 0x0:_0x5952a9[_0x3eb677(0x1ee)](_0x5eed88=>_0x5eed88[_0x3eb677(0x22e)]===_0x69d053[_0x3eb677(0x226)])[_0x3eb677(0x227)](_0x4d9888=>_0x4d9888[_0x3eb677(0x212)]))!=null?_0x1f84a4:[],_0x32c298=JSON['stringify'](_0x44a756),_0x26b4ba=_0x38d09f[_0x3eb677(0x1fb)],_0x586433=_0x38d09f['id'],_0x9daa54={'memberId':(await this[_0x3eb677(0x23f)][_0x3eb677(0x1e8)](_0x16286c))['getMemberID'](),'unitId':_0x16286c,'threadId':_0x26b4ba,'mention':_0x283216,'content':_0x32c298,'replyId':_0x586433},_0x575f2a=await this['_httpService']['post'](_0x3eb677(0x20e)+_0x16286c+'/edit',{'body':_0x9daa54});return!_0x575f2a[_0x3eb677(0x20c)][_0x3eb677(0x20f)]||_0x575f2a[_0x3eb677(0x20c)][_0x3eb677(0x20f)]['code']===0x1;}async[_0x30ca78(0x207)](_0x5afda0){const _0x9a4780=_0x30ca78,{unitId:_0x393ec6}=_0x5afda0,_0x1be5f1=_0x5afda0[_0x9a4780(0x1fb)],_0x1855c9={'memberId':this[_0x9a4780(0x231)]['getCurrentUser']()['userID'],'unitId':_0x393ec6,'threadId':_0x1be5f1,'solved':_0x5afda0[_0x9a4780(0x219)]?I[_0x9a4780(0x22f)]:I['OpenOrReOpen']},_0x1558ac=await this[_0x9a4780(0x22a)][_0x9a4780(0x244)](_0x9a4780(0x20e)+_0x393ec6+_0x9a4780(0x200),{'body':_0x1855c9});return!_0x1558ac[_0x9a4780(0x20c)]['error']||_0x1558ac[_0x9a4780(0x20c)][_0x9a4780(0x20f)]['code']===0x1;}async['deleteComment'](_0x49c3a5,_0x3f7df2,_0x457a8e,_0x3e0302){const _0x2b39a8=_0x30ca78,_0x3a301f={'memberId':(await this[_0x2b39a8(0x23f)][_0x2b39a8(0x1e8)](_0x49c3a5))['getMemberID'](),'threadId':_0x457a8e,'replyId':_0x3e0302,'unitId':_0x49c3a5},_0x5157f0=await this[_0x2b39a8(0x22a)][_0x2b39a8(0x244)](_0x2b39a8(0x20e)+_0x49c3a5+_0x2b39a8(0x1fe),{'body':_0x3a301f});return!_0x5157f0[_0x2b39a8(0x20c)]['error']||_0x5157f0['body'][_0x2b39a8(0x20f)][_0x2b39a8(0x23b)]===0x1;}async[_0x30ca78(0x240)](_0x4d6f99,_0x548c2f,_0x3c3e1a){const _0x802a08=_0x30ca78,_0x2d6269={'unitId':_0x4d6f99,'threadId':_0x3c3e1a},_0x2444a3=await this[_0x802a08(0x22a)]['post'](_0x802a08(0x20e)+_0x4d6f99+'/list',{'body':_0x2d6269}),_0x5601a0=_0x3c3e1a['map'](_0x55dfcc=>ee(_0x2444a3['body'][_0x802a08(0x203)][_0x55dfcc],_0x4d6f99,_0x548c2f))[_0x802a08(0x1ee)](Boolean);return Object[_0x802a08(0x213)](_0x2444a3[_0x802a08(0x20c)][_0x802a08(0x1ed)])[_0x802a08(0x204)](_0x2adcea=>{const _0x294282=_0x802a08;this[_0x294282(0x231)][_0x294282(0x1e7)](_0x2adcea);}),_0x5601a0;}['saveCommentToSnapshot'](_0x54f96c){const _0x4cef56=_0x30ca78;return{'id':_0x54f96c['id'],'threadId':_0x54f96c[_0x4cef56(0x1fb)],'ref':_0x54f96c[_0x4cef56(0x1f9)]};}};f=Q([_(0x0,_0x352b53(_0xfebc63)),_(0x1,_0x352b53(_0x37422e)),_(0x2,_0x352b53(_0x208670)),_(0x3,_0x352b53(_0x5b310b))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x4d9e51,_0x3a7114,_0x4f4773,_0x498a1a)=>{const _0xb4909c=_0x30ca78;for(var _0x2ff64e=_0x498a1a>0x1?void 0x0:_0x498a1a?re(_0x3a7114,_0x4f4773):_0x3a7114,_0x1bf461=_0x4d9e51[_0xb4909c(0x236)]-0x1,_0x1f9152;_0x1bf461>=0x0;_0x1bf461--)(_0x1f9152=_0x4d9e51[_0x1bf461])&&(_0x2ff64e=_0x1f9152(_0x2ff64e)||_0x2ff64e);return _0x2ff64e;},N=(_0x3913e8,_0x11c9a7)=>(_0xaae9e0,_0x5933ca)=>_0x11c9a7(_0xaae9e0,_0x5933ca,_0x3913e8);let g=class extends _0x351a69{constructor(_0x5944b1,_0x6e3272){const _0x5350bb=_0x30ca78;super(),this['_threadCommentDataSourceService']=_0x5944b1,this[_0x5350bb(0x228)]=_0x6e3272,this[_0x5350bb(0x1f2)]();}[_0x30ca78(0x1f2)](){const _0x1cbe32=_0x30ca78;this[_0x1cbe32(0x211)][_0x1cbe32(0x230)]=this[_0x1cbe32(0x228)],this['_threadCommentDataSourceService'][_0x1cbe32(0x1fd)]=!0x1;}};g=te([N(0x0,_0x5949bb),N(0x1,_0x352b53(f))],g);var se=Object['defineProperty'],oe=Object[_0x30ca78(0x239)],ne=(_0x454360,_0x4a51a0,_0x1f867a)=>_0x4a51a0 in _0x454360?se(_0x454360,_0x4a51a0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1f867a}):_0x454360[_0x4a51a0]=_0x1f867a,ie=(_0x328ad0,_0x3d7e40,_0x42282d,_0x4c874a)=>{const _0x522317=_0x30ca78;for(var _0x5e0fea=_0x4c874a>0x1?void 0x0:_0x4c874a?oe(_0x3d7e40,_0x42282d):_0x3d7e40,_0x209ce1=_0x328ad0[_0x522317(0x236)]-0x1,_0x3fe20c;_0x209ce1>=0x0;_0x209ce1--)(_0x3fe20c=_0x328ad0[_0x209ce1])&&(_0x5e0fea=_0x3fe20c(_0x5e0fea)||_0x5e0fea);return _0x5e0fea;},w=(_0x32d5e2,_0x44e450)=>(_0x3b24f0,_0x1a148e)=>_0x44e450(_0x3b24f0,_0x1a148e,_0x32d5e2),$=(_0x2de354,_0x371c61,_0x474789)=>ne(_0x2de354,typeof _0x371c61!=_0x30ca78(0x23e)?_0x371c61+'':_0x371c61,_0x474789);let b=class extends _0xcec0a2{constructor(_0x4329e9=M,_0x4ff904,_0x5ec6af){const _0x100410=_0x30ca78;super(),this['_config']=_0x4329e9,this[_0x100410(0x23c)]=_0x4ff904,this['_configService']=_0x5ec6af;const {..._0x568046}=_0x4df787({},M,this[_0x100410(0x1ff)]);this[_0x100410(0x1f0)][_0x100410(0x1ec)](z,_0x568046);}['onStarting'](){const _0x13ede0=_0x30ca78;[[f],[g],[S]][_0x13ede0(0x204)](_0x21cea3=>{const _0x26798d=_0x13ede0;this[_0x26798d(0x23c)][_0x26798d(0x1f3)](_0x21cea3);});}[_0x30ca78(0x20d)](){const _0x178698=_0x30ca78;this[_0x178698(0x23c)][_0x178698(0x216)](g),this[_0x178698(0x23c)]['get'](S);}};$(b,_0x30ca78(0x232),W),$(b,_0x30ca78(0x201),_0x36f1da['UNIVER_UNKNOWN']),b=ie([_0x1e16fa(_0x4ef1d6,_0x4e5df2,_0x6e3915),w(0x1,_0x352b53(_0x5b310b)),w(0x2,_0x2b2f90)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x4d74(_0x5a041e,_0x314406){const _0x29c37a=_0x29c3();return _0x4d74=function(_0x4d74c5,_0x465e18){_0x4d74c5=_0x4d74c5-0x18a;let _0x59f2e4=_0x29c37a[_0x4d74c5];return _0x59f2e4;},_0x4d74(_0x5a041e,_0x314406);}function _0x29c3(){const _0x548f78=['CollaborationSessionService','@univerjs/network','@univerjs/thread-comment-ui','rangeType','CommentService','format','Solve','_initUserSync','resolved','getComment','filter','add','userId','user','onStarting','bufferTime','symbol','_sessionService','_threadCommentDataSourceService','reply','Reply','saveCommentToSnapshot','/delete','users','commentUpdate$','comments','rxjs','threadId','updateComment','COMMENT','_threadCommentDataSource','_configService','solved','@univerjs/core','YYYY/MM/DD\x20HH:mm','unitId','UNIVER_UNKNOWN','dataSource','delete','UniverProCollaborationClient','Module','root','52350ReoCjw','25dfESjT','payload','_injector','stringify','body','userID','UniverLicensePlugin','pipe','parse','syncUpdateMutationToColla','defineProperty','length','replyId','code','requireSession','content','_httpService','onReady','7pFokvB','get','UniverThreadCommentDataSourcePlugin','UniverCollaborationClientPlugin','@univerjs-pro/license','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','/list','479151xnhyuo','UniverProThreadCommentDatasource','UniverThreadCommentUi','UniverCore','CustomRangeType','getMemberID','Edit','map','merge','ThreadCommentModel','getOwnPropertyDescriptor','UNRECOGNIZED','UniverThreadComment','_threadCommentModel','Injector','30tAqDTq','/universer-api/user/list','_commentService','deleteComment','IThreadCommentDataSourceService','Solved','Add','UniverNetwork','slice','@univerjs/thread-comment','/add','resolveComment','Disposable','_initDataSource','personId','715066Wevjlp','Inject','getUnit','addComment','_config','Delete','type','post','pluginName','exports','HTTPService','createTimestamp','toStringTag','customRanges','replies','Plugin','size','thread-comment-data-source.config','disposeWithMe','UniverThreadCommentUIPlugin','/solved','277566rOvSuJ','subscribe','getCurrentUser','50748JTqGAC','1542304RtcNCD','@univerjs-pro/collaboration-client','/universer-api/comment/unit/','5779776KNmRXB','addUser','33XuPSze','DependentOn','error','dayjs','forEach','1hKzhSQ','amd','Unknown','OpenOrReOpen'];_0x29c3=function(){return _0x548f78;};return _0x29c3();}(function(_0x2d241a,_0x29880e){const _0x35b5e8=_0x4d74,_0xfec02c=_0x2d241a();while(!![]){try{const _0x56ad5a=parseInt(_0x35b5e8(0x1ac))/0x1*(parseInt(_0x35b5e8(0x1da))/0x2)+parseInt(_0x35b5e8(0x1a7))/0x3*(-parseInt(_0x35b5e8(0x1a1))/0x4)+parseInt(_0x35b5e8(0x1db))/0x5*(-parseInt(_0x35b5e8(0x19e))/0x6)+-parseInt(_0x35b5e8(0x1ed))/0x7*(parseInt(_0x35b5e8(0x1a2))/0x8)+parseInt(_0x35b5e8(0x1f5))/0x9*(parseInt(_0x35b5e8(0x204))/0xa)+parseInt(_0x35b5e8(0x213))/0xb+parseInt(_0x35b5e8(0x1a5))/0xc;if(_0x56ad5a===_0x29880e)break;else _0xfec02c['push'](_0xfec02c['shift']());}catch(_0x2d6900){_0xfec02c['push'](_0xfec02c['shift']());}}}(_0x29c3,0x293c0),function(_0x71854,_0x3ab7c8){const _0x1ba938=_0x4d74;typeof exports=='object'&&typeof module<'u'?_0x3ab7c8(exports,require(_0x1ba938(0x1a3)),require(_0x1ba938(0x1f1)),require('@univerjs/core'),require(_0x1ba938(0x1b2)),require(_0x1ba938(0x20d)),require(_0x1ba938(0x1ca)),require('@univerjs/network')):typeof define=='function'&&define[_0x1ba938(0x1ad)]?define([_0x1ba938(0x192),_0x1ba938(0x1a3),_0x1ba938(0x1f1),_0x1ba938(0x1d1),_0x1ba938(0x1b2),_0x1ba938(0x20d),_0x1ba938(0x1ca),_0x1ba938(0x1b1)],_0x3ab7c8):(_0x71854=typeof globalThis<'u'?globalThis:_0x71854||self,_0x3ab7c8(_0x71854[_0x1ba938(0x1f6)]={},_0x71854[_0x1ba938(0x1d7)],_0x71854['UniverProLicense'],_0x71854[_0x1ba938(0x1f8)],_0x71854[_0x1ba938(0x1f7)],_0x71854[_0x1ba938(0x201)],_0x71854[_0x1ba938(0x1ca)],_0x71854[_0x1ba938(0x20b)]));}(this,function(_0x550553,_0x584e52,_0x443f0b,_0x154891,_0x3d9c35,_0x25efd9,_0x441bf2,_0x148baa){'use strict';const _0x34ee23=_0x4d74;const _0x45a915=_0x34ee23(0x1f2);var _0x5e3bdc=(_0x3d4312=>(_0x3d4312[_0x3d4312[_0x34ee23(0x1af)]=0x0]='OpenOrReOpen',_0x3d4312[_0x3d4312[_0x34ee23(0x209)]=0x1]=_0x34ee23(0x209),_0x3d4312[_0x3d4312[_0x34ee23(0x200)]=-0x1]=_0x34ee23(0x200),_0x3d4312))(_0x5e3bdc||{}),_0x3d2fb0=(_0x2eca03=>(_0x2eca03[_0x2eca03[_0x34ee23(0x1ae)]=0x0]=_0x34ee23(0x1ae),_0x2eca03[_0x2eca03['Add']=0x1]=_0x34ee23(0x20a),_0x2eca03[_0x2eca03['Reply']=0x2]=_0x34ee23(0x1c4),_0x2eca03[_0x2eca03[_0x34ee23(0x1fb)]=0x3]='Edit',_0x2eca03[_0x2eca03[_0x34ee23(0x18e)]=0x4]=_0x34ee23(0x18e),_0x2eca03[_0x2eca03[_0x34ee23(0x1b6)]=0x5]=_0x34ee23(0x1b6),_0x2eca03[_0x2eca03[_0x34ee23(0x200)]=-0x1]=_0x34ee23(0x200),_0x2eca03))(_0x3d2fb0||{});const _0x18ee1b=_0xcd19b5=>_0x154891[_0x34ee23(0x1aa)](new Date(+_0xcd19b5))['format']('YYYY/MM/DD\x20HH:mm'),_0x1f8b5b=async(_0x679908,_0x5bb183)=>{const _0x8c10b5=_0x34ee23,_0x489f8c=_0x679908[_0x8c10b5(0x1ee)](_0x154891['UserManagerService']),_0x4d17ec=_0x679908[_0x8c10b5(0x1ee)](_0x148baa[_0x8c10b5(0x193)]);_0x5bb183[_0x8c10b5(0x1ab)](_0x97090b=>{const _0x2aadba=_0x8c10b5;_0x489f8c['getUser'](_0x97090b)&&_0x5bb183[_0x2aadba(0x1d6)](_0x97090b);}),_0x5bb183[_0x8c10b5(0x199)]&&(await _0x4d17ec[_0x8c10b5(0x1ee)](_0x8c10b5(0x205),{'params':{'userIDs':[..._0x5bb183]}}))[_0x8c10b5(0x1df)][_0x8c10b5(0x1c7)][_0x8c10b5(0x1ab)](_0x283904=>{const _0x1ea097=_0x8c10b5;_0x283904&&_0x489f8c[_0x1ea097(0x1a6)](_0x283904);});};var _0x201fcf=Object['getOwnPropertyDescriptor'],_0x51e459=(_0x1b4c9b,_0x189886,_0x525c18,_0x44e44e)=>{const _0x58621f=_0x34ee23;for(var _0x537494=_0x44e44e>0x1?void 0x0:_0x44e44e?_0x201fcf(_0x189886,_0x525c18):_0x189886,_0x5c34d6=_0x1b4c9b[_0x58621f(0x1e6)]-0x1,_0xc8cd8f;_0x5c34d6>=0x0;_0x5c34d6--)(_0xc8cd8f=_0x1b4c9b[_0x5c34d6])&&(_0x537494=_0xc8cd8f(_0x537494)||_0x537494);return _0x537494;},_0x53a130=(_0x4146c2,_0x17b7b1)=>(_0x121c42,_0x6232de)=>_0x17b7b1(_0x121c42,_0x6232de,_0x4146c2);let _0x57f015=class extends _0x154891[_0x34ee23(0x210)]{constructor(_0x4b65f7,_0x57bd86,_0x14fd9a,_0x2c8331){const _0x3b7e4f=_0x34ee23;super(),this[_0x3b7e4f(0x206)]=_0x4b65f7,this[_0x3b7e4f(0x202)]=_0x57bd86,this['_userService']=_0x14fd9a,this['_injector']=_0x2c8331,this['_init'](),this[_0x3b7e4f(0x1b7)]();}[_0x34ee23(0x1b7)](){const _0x3b45b7=_0x34ee23;this[_0x3b45b7(0x19b)](this[_0x3b45b7(0x202)][_0x3b45b7(0x1c8)][_0x3b45b7(0x1e2)](_0x441bf2[_0x3b45b7(0x1bf)](0x10))[_0x3b45b7(0x19f)](_0x228a86=>{const _0x33741c=_0x3b45b7,_0xdf11c1=new Set();_0x228a86['forEach'](_0x1ef053=>{const _0x255313=_0x4d74;switch(_0x1ef053['type']){case'add':{const _0x5746ee=_0x1ef053[_0x255313(0x1dc)][_0x255313(0x212)];_0xdf11c1[_0x255313(0x1bb)](_0x5746ee);break;}}}),_0x1f8b5b(this[_0x33741c(0x1dd)],_0xdf11c1);}));}['_init'](){const _0x50e8bb=_0x34ee23;this[_0x50e8bb(0x19b)](this[_0x50e8bb(0x206)][_0x50e8bb(0x1c8)][_0x50e8bb(0x19f)](async _0x272c9c=>{const _0x775b29=_0x50e8bb;var _0x3fa76c,_0x4198a5,_0x5eaf35,_0x3c26ff;const _0x2aeca1=(_0x3fa76c=this[_0x775b29(0x202)][_0x775b29(0x18b)](_0x272c9c[_0x775b29(0x1d3)])['find'](_0x4eb62c=>_0x4eb62c['threadId']===_0x272c9c[_0x775b29(0x1cb)]))==null?void 0x0:_0x3fa76c[_0x775b29(0x1d9)];if(!_0x2aeca1)return;const {unitId:_0x4420db,subUnitId:_0x1bf9b5}=_0x2aeca1;switch(_0x272c9c[_0x775b29(0x1bd)]&&this[_0x775b29(0x1f3)][_0x775b29(0x1a6)](_0x272c9c['user']),_0x272c9c[_0x775b29(0x18f)]){case _0x3d2fb0[_0x775b29(0x20a)]:break;case _0x3d2fb0[_0x775b29(0x1c4)]:{this[_0x775b29(0x202)][_0x775b29(0x18c)](_0x4420db,_0x1bf9b5,{'unitId':_0x4420db,'subUnitId':_0x1bf9b5,'ref':'','id':_0x272c9c[_0x775b29(0x1e7)],'dT':_0x18ee1b(+_0x272c9c[_0x775b29(0x194)]),'threadId':_0x272c9c[_0x775b29(0x1cb)],'personId':(_0x5eaf35=(_0x4198a5=_0x272c9c['user'])==null?void 0x0:_0x4198a5['userID'])!=null?_0x5eaf35:_0x272c9c[_0x775b29(0x1bc)],'text':JSON[_0x775b29(0x1e3)](_0x272c9c['content']),'parentId':_0x2aeca1['id']});break;}case _0x3d2fb0[_0x775b29(0x18e)]:{const _0x1e64eb=this['_threadCommentModel'][_0x775b29(0x1b9)](_0x4420db,_0x1bf9b5,_0x272c9c['replyId']);_0x1e64eb&&_0x1e64eb['parentId']&&this[_0x775b29(0x202)][_0x775b29(0x207)](_0x4420db,_0x1bf9b5,_0x272c9c[_0x775b29(0x1e7)]);break;}case _0x3d2fb0[_0x775b29(0x1fb)]:{this['_threadCommentModel'][_0x775b29(0x1cc)](_0x4420db,_0x1bf9b5,{'commentId':_0x272c9c[_0x775b29(0x1e7)],'text':JSON[_0x775b29(0x1e3)](_0x272c9c[_0x775b29(0x1ea)])});break;}case _0x3d2fb0['Solve']:{const _0x3b2e77=(_0x3c26ff=this[_0x775b29(0x202)][_0x775b29(0x18b)](_0x272c9c[_0x775b29(0x1d3)])['find'](_0x585745=>_0x585745[_0x775b29(0x1cb)]===_0x272c9c['threadId']))==null?void 0x0:_0x3c26ff[_0x775b29(0x1d9)];_0x3b2e77&&this[_0x775b29(0x202)][_0x775b29(0x20f)](_0x4420db,_0x1bf9b5,_0x3b2e77['id'],_0x272c9c['solved']===_0x5e3bdc[_0x775b29(0x209)]);break;}}}));}};_0x57f015=_0x51e459([_0x53a130(0x0,_0x154891[_0x34ee23(0x18a)](_0x584e52[_0x34ee23(0x1b4)])),_0x53a130(0x1,_0x154891[_0x34ee23(0x18a)](_0x25efd9[_0x34ee23(0x1fe)])),_0x53a130(0x2,_0x154891[_0x34ee23(0x18a)](_0x154891['UserManagerService'])),_0x53a130(0x3,_0x154891['Inject'](_0x154891[_0x34ee23(0x203)]))],_0x57f015);const _0x3b2572=_0x34ee23(0x19a),_0x1a05a0={};var _0x250cd4=Object['getOwnPropertyDescriptor'],_0x15fe39=(_0x27f125,_0x13a88b,_0x525852,_0x4105be)=>{const _0xb27e2f=_0x34ee23;for(var _0x5a444f=_0x4105be>0x1?void 0x0:_0x4105be?_0x250cd4(_0x13a88b,_0x525852):_0x13a88b,_0x1cec3b=_0x27f125[_0xb27e2f(0x1e6)]-0x1,_0x286e74;_0x1cec3b>=0x0;_0x1cec3b--)(_0x286e74=_0x27f125[_0x1cec3b])&&(_0x5a444f=_0x286e74(_0x5a444f)||_0x5a444f);return _0x5a444f;},_0xba6fd9=(_0x1bf84f,_0xfcf690)=>(_0x1563cb,_0x1b41ea)=>_0xfcf690(_0x1563cb,_0x1b41ea,_0x1bf84f);function _0x1a3e32(_0x363301,_0x20010d){const _0x218a99=_0x34ee23,_0x200101=_0x363301['replies'][0x0];return{..._0x20010d,'id':_0x200101[_0x218a99(0x1e7)],'resolved':_0x363301['solved']===0x1,'dT':_0x18ee1b(_0x200101[_0x218a99(0x194)]),'personId':_0x200101[_0x218a99(0x1bc)],'threadId':_0x200101['threadId']};}function _0x76dc9c(_0x1e190,_0x1a6df1,_0x52c5bd){const _0x3c2e8d=_0x34ee23;var _0x9a056b,_0x43b333;if(((_0x43b333=(_0x9a056b=_0x1e190==null?void 0x0:_0x1e190[_0x3c2e8d(0x197)])==null?void 0x0:_0x9a056b[_0x3c2e8d(0x1e6)])!=null?_0x43b333:0x0)>0x0){const _0x3c0a90=(_0x40de9e,_0x51c41b)=>({'id':_0x40de9e[_0x3c2e8d(0x1e7)],'threadId':_0x40de9e[_0x3c2e8d(0x1cb)],'dT':_0x18ee1b(_0x40de9e[_0x3c2e8d(0x194)]),'personId':_0x40de9e[_0x3c2e8d(0x1bc)],'resolved':_0x1e190[_0x3c2e8d(0x1d0)]===_0x5e3bdc['Solved'],'unitId':_0x1a6df1,'subUnitId':_0x52c5bd,'text':JSON['parse'](_0x40de9e[_0x3c2e8d(0x1ea)]),'parentId':_0x51c41b}),_0x3b6212=_0x3c0a90(_0x1e190[_0x3c2e8d(0x197)][0x0]);return{..._0x3b6212,'children':_0x1e190[_0x3c2e8d(0x197)][_0x3c2e8d(0x20c)](0x1)[_0x3c2e8d(0x1fc)](_0x1da918=>_0x3c0a90(_0x1da918,_0x3b6212['id']))};}return null;}let _0x65e788=class{constructor(_0x3b216c,_0x4b6b1c,_0x572f64,_0x6867b5){const _0xc810de=_0x34ee23;this[_0xc810de(0x1eb)]=_0x3b216c,this[_0xc810de(0x1f3)]=_0x4b6b1c,this[_0xc810de(0x1c1)]=_0x572f64,this[_0xc810de(0x1dd)]=_0x6867b5;}async[_0x34ee23(0x18c)](_0x2486fd){const _0x545511=_0x34ee23;var _0xb3d85b,_0x69602e;const {parentId:_0x2320d4,unitId:_0x26087d,text:_0x121be1,threadId:_0x19e24b}=_0x2486fd,_0x51571e=(_0x69602e=(_0xb3d85b=_0x121be1[_0x545511(0x196)])==null?void 0x0:_0xb3d85b[_0x545511(0x1ba)](_0x1752fe=>_0x1752fe['rangeType']===_0x154891[_0x545511(0x1f9)][_0x545511(0x1cd)])[_0x545511(0x1fc)](_0x5cc28e=>_0x5cc28e['rangeId']))!=null?_0x69602e:[],_0x310738=JSON[_0x545511(0x1de)](_0x121be1),_0x494354=(await this[_0x545511(0x1c1)][_0x545511(0x1e9)](_0x26087d))[_0x545511(0x1fa)]();if(_0x2320d4){const _0x582a0d={'memberId':_0x494354,'unitId':_0x26087d,'content':_0x310738,'mention':_0x51571e,'threadId':_0x19e24b},_0x28678a=(await this[_0x545511(0x1eb)][_0x545511(0x190)](_0x545511(0x1a4)+_0x26087d+'/reply',{'body':_0x582a0d}))[_0x545511(0x1df)][_0x545511(0x1c3)];return{..._0x2486fd,'id':_0x28678a[_0x545511(0x1e7)],'dT':_0x154891[_0x545511(0x1aa)](+_0x28678a[_0x545511(0x194)])[_0x545511(0x1b5)](_0x545511(0x1d2)),'personId':_0x28678a[_0x545511(0x1bc)]};}else{const _0x3af056={'memberId':_0x494354,'unitId':_0x26087d,'content':_0x310738,'mention':_0x51571e},_0x4dc7f9=await this[_0x545511(0x1eb)][_0x545511(0x190)]('/universer-api/comment/unit/'+_0x26087d+_0x545511(0x20e),{'body':_0x3af056});return _0x1a3e32(_0x4dc7f9[_0x545511(0x1df)]['comment'],_0x2486fd);}}async[_0x34ee23(0x1cc)](_0x13b2bd){const _0x12278b=_0x34ee23;var _0x23a118,_0x30381f;const {text:_0x1be19e,unitId:_0x5ad79a}=_0x13b2bd,_0xc28fef=(_0x30381f=(_0x23a118=_0x1be19e[_0x12278b(0x196)])==null?void 0x0:_0x23a118[_0x12278b(0x1ba)](_0x52285c=>_0x52285c[_0x12278b(0x1b3)]===_0x154891['CustomRangeType']['COMMENT'])[_0x12278b(0x1fc)](_0xe70441=>_0xe70441['rangeId']))!=null?_0x30381f:[],_0x1fd656=JSON['stringify'](_0x1be19e),_0x48acd1=_0x13b2bd[_0x12278b(0x1cb)],_0x5a3077=_0x13b2bd['id'],_0x4ce962={'memberId':(await this[_0x12278b(0x1c1)][_0x12278b(0x1e9)](_0x5ad79a))[_0x12278b(0x1fa)](),'unitId':_0x5ad79a,'threadId':_0x48acd1,'mention':_0xc28fef,'content':_0x1fd656,'replyId':_0x5a3077},_0x134bad=await this[_0x12278b(0x1eb)][_0x12278b(0x190)]('/universer-api/comment/unit/'+_0x5ad79a+'/edit',{'body':_0x4ce962});return!_0x134bad['body'][_0x12278b(0x1a9)]||_0x134bad['body'][_0x12278b(0x1a9)][_0x12278b(0x1e8)]===0x1;}async['resolveComment'](_0x388ad4){const _0x29fddb=_0x34ee23,{unitId:_0x2b56ef}=_0x388ad4,_0x5066ee=_0x388ad4[_0x29fddb(0x1cb)],_0x3d9ddc={'memberId':this[_0x29fddb(0x1f3)][_0x29fddb(0x1a0)]()[_0x29fddb(0x1e0)],'unitId':_0x2b56ef,'threadId':_0x5066ee,'solved':_0x388ad4[_0x29fddb(0x1b8)]?_0x5e3bdc[_0x29fddb(0x209)]:_0x5e3bdc[_0x29fddb(0x1af)]},_0x3189a9=await this[_0x29fddb(0x1eb)]['post']('/universer-api/comment/unit/'+_0x2b56ef+_0x29fddb(0x19d),{'body':_0x3d9ddc});return!_0x3189a9['body'][_0x29fddb(0x1a9)]||_0x3189a9[_0x29fddb(0x1df)]['error'][_0x29fddb(0x1e8)]===0x1;}async[_0x34ee23(0x207)](_0x58c549,_0x26d99e,_0xaf3adf,_0x5d1bdb){const _0x501d3e=_0x34ee23,_0x11964d={'memberId':(await this[_0x501d3e(0x1c1)][_0x501d3e(0x1e9)](_0x58c549))[_0x501d3e(0x1fa)](),'threadId':_0xaf3adf,'replyId':_0x5d1bdb,'unitId':_0x58c549},_0xb27494=await this[_0x501d3e(0x1eb)]['post']('/universer-api/comment/unit/'+_0x58c549+_0x501d3e(0x1c6),{'body':_0x11964d});return!_0xb27494[_0x501d3e(0x1df)][_0x501d3e(0x1a9)]||_0xb27494[_0x501d3e(0x1df)][_0x501d3e(0x1a9)][_0x501d3e(0x1e8)]===0x1;}async['listComments'](_0x52c010,_0x51f92b,_0x5ad938){const _0x56ff01=_0x34ee23,_0x4b4e5a={'unitId':_0x52c010,'threadId':_0x5ad938},_0x5f9f96=await this[_0x56ff01(0x1eb)]['post'](_0x56ff01(0x1a4)+_0x52c010+_0x56ff01(0x1f4),{'body':_0x4b4e5a}),_0xc4e2d6=_0x5ad938['map'](_0x1b13ab=>_0x76dc9c(_0x5f9f96[_0x56ff01(0x1df)][_0x56ff01(0x1c9)][_0x1b13ab],_0x52c010,_0x51f92b))[_0x56ff01(0x1ba)](Boolean);return Object['values'](_0x5f9f96[_0x56ff01(0x1df)][_0x56ff01(0x1c7)])[_0x56ff01(0x1ab)](_0x4f385f=>{const _0x2e21f2=_0x56ff01;this[_0x2e21f2(0x1f3)][_0x2e21f2(0x1a6)](_0x4f385f);}),_0xc4e2d6;}[_0x34ee23(0x1c5)](_0x57ecd3){const _0x189d52=_0x34ee23;return{'id':_0x57ecd3['id'],'threadId':_0x57ecd3[_0x189d52(0x1cb)],'ref':_0x57ecd3['ref']};}};_0x65e788=_0x15fe39([_0xba6fd9(0x0,_0x154891[_0x34ee23(0x18a)](_0x148baa[_0x34ee23(0x193)])),_0xba6fd9(0x1,_0x154891[_0x34ee23(0x18a)](_0x154891['UserManagerService'])),_0xba6fd9(0x2,_0x154891[_0x34ee23(0x18a)](_0x584e52[_0x34ee23(0x1b0)])),_0xba6fd9(0x3,_0x154891[_0x34ee23(0x18a)](_0x154891[_0x34ee23(0x203)]))],_0x65e788);var _0x220c59=Object[_0x34ee23(0x1ff)],_0x220ab1=(_0x320d6d,_0x115696,_0x3ce60f,_0x20795d)=>{for(var _0x3701a0=_0x20795d>0x1?void 0x0:_0x20795d?_0x220c59(_0x115696,_0x3ce60f):_0x115696,_0x280a4e=_0x320d6d['length']-0x1,_0x4cf85f;_0x280a4e>=0x0;_0x280a4e--)(_0x4cf85f=_0x320d6d[_0x280a4e])&&(_0x3701a0=_0x4cf85f(_0x3701a0)||_0x3701a0);return _0x3701a0;},_0x5693c6=(_0x223aa7,_0x57c114)=>(_0x5eb658,_0x38cf5c)=>_0x57c114(_0x5eb658,_0x38cf5c,_0x223aa7);let _0x219258=class extends _0x154891[_0x34ee23(0x210)]{constructor(_0x4e75be,_0x46d599){const _0x5d0137=_0x34ee23;super(),this[_0x5d0137(0x1c2)]=_0x4e75be,this[_0x5d0137(0x1ce)]=_0x46d599,this[_0x5d0137(0x211)]();}['_initDataSource'](){const _0x17c749=_0x34ee23;this[_0x17c749(0x1c2)][_0x17c749(0x1d5)]=this['_threadCommentDataSource'],this[_0x17c749(0x1c2)][_0x17c749(0x1e4)]=!0x1;}};_0x219258=_0x220ab1([_0x5693c6(0x0,_0x25efd9[_0x34ee23(0x208)]),_0x5693c6(0x1,_0x154891['Inject'](_0x65e788))],_0x219258);var _0x1792bb=Object[_0x34ee23(0x1e5)],_0x2d26f3=Object[_0x34ee23(0x1ff)],_0x473179=(_0x1f6bef,_0x2e9dd7,_0xec0f3c)=>_0x2e9dd7 in _0x1f6bef?_0x1792bb(_0x1f6bef,_0x2e9dd7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xec0f3c}):_0x1f6bef[_0x2e9dd7]=_0xec0f3c,_0x55cbf1=(_0x49eeb6,_0x23c307,_0x2da102,_0x41188f)=>{const _0x45ce3d=_0x34ee23;for(var _0x374ca7=_0x41188f>0x1?void 0x0:_0x41188f?_0x2d26f3(_0x23c307,_0x2da102):_0x23c307,_0x4a5551=_0x49eeb6[_0x45ce3d(0x1e6)]-0x1,_0x32a50b;_0x4a5551>=0x0;_0x4a5551--)(_0x32a50b=_0x49eeb6[_0x4a5551])&&(_0x374ca7=_0x32a50b(_0x374ca7)||_0x374ca7);return _0x374ca7;},_0x34b9c3=(_0x5bec56,_0x196f55)=>(_0x5c4445,_0x582d9d)=>_0x196f55(_0x5c4445,_0x582d9d,_0x5bec56),_0x112d11=(_0x1eeb31,_0x4b94e1,_0x2bd40d)=>_0x473179(_0x1eeb31,typeof _0x4b94e1!=_0x34ee23(0x1c0)?_0x4b94e1+'':_0x4b94e1,_0x2bd40d);_0x550553[_0x34ee23(0x1ef)]=class extends _0x154891[_0x34ee23(0x198)]{constructor(_0xd6309c=_0x1a05a0,_0x5e9c01,_0xe1fe3b){const _0x2fe1d7=_0x34ee23;super(),this['_config']=_0xd6309c,this[_0x2fe1d7(0x1dd)]=_0x5e9c01,this[_0x2fe1d7(0x1cf)]=_0xe1fe3b;const {..._0x5628fb}=_0x154891[_0x2fe1d7(0x1fd)]({},_0x1a05a0,this[_0x2fe1d7(0x18d)]);this[_0x2fe1d7(0x1cf)]['setConfig'](_0x3b2572,_0x5628fb);}[_0x34ee23(0x1be)](){const _0x1dfa24=_0x34ee23;[[_0x65e788],[_0x219258],[_0x57f015]][_0x1dfa24(0x1ab)](_0x110e82=>{const _0x49725d=_0x1dfa24;this[_0x49725d(0x1dd)][_0x49725d(0x1bb)](_0x110e82);});}[_0x34ee23(0x1ec)](){const _0x348dbd=_0x34ee23;this['_injector'][_0x348dbd(0x1ee)](_0x219258),this[_0x348dbd(0x1dd)]['get'](_0x57f015);}},_0x112d11(_0x550553[_0x34ee23(0x1ef)],_0x34ee23(0x191),_0x45a915),_0x112d11(_0x550553[_0x34ee23(0x1ef)],_0x34ee23(0x18f),_0x154891['UniverInstanceType'][_0x34ee23(0x1d4)]),_0x550553[_0x34ee23(0x1ef)]=_0x55cbf1([_0x154891[_0x34ee23(0x1a8)](_0x3d9c35[_0x34ee23(0x19c)],_0x584e52[_0x34ee23(0x1f0)],_0x443f0b[_0x34ee23(0x1e1)]),_0x34b9c3(0x1,_0x154891[_0x34ee23(0x18a)](_0x154891[_0x34ee23(0x203)])),_0x34b9c3(0x2,_0x154891['IConfigService'])],_0x550553[_0x34ee23(0x1ef)]),Object[_0x34ee23(0x1e5)](_0x550553,Symbol[_0x34ee23(0x195)],{'value':_0x34ee23(0x1d8)});}));
1
+ (function(_0x35a160,_0x115755){const _0x3e32ee=_0x1c96,_0x44d53e=_0x35a160();while(!![]){try{const _0x39e18c=-parseInt(_0x3e32ee(0x99))/0x1*(-parseInt(_0x3e32ee(0x116))/0x2)+parseInt(_0x3e32ee(0xee))/0x3*(parseInt(_0x3e32ee(0x9c))/0x4)+parseInt(_0x3e32ee(0xfe))/0x5+parseInt(_0x3e32ee(0x109))/0x6+-parseInt(_0x3e32ee(0xea))/0x7*(parseInt(_0x3e32ee(0xe6))/0x8)+-parseInt(_0x3e32ee(0x100))/0x9+-parseInt(_0x3e32ee(0xf0))/0xa*(parseInt(_0x3e32ee(0x102))/0xb);if(_0x39e18c===_0x115755)break;else _0x44d53e['push'](_0x44d53e['shift']());}catch(_0x340621){_0x44d53e['push'](_0x44d53e['shift']());}}}(_0x4ea8,0xb95dc),function(_0x586b82,_0x2d82e1){const _0x1a8c85=_0x1c96;typeof exports==_0x1a8c85(0xf8)&&typeof module<'u'?_0x2d82e1(exports,require('@univerjs-pro/collaboration-client'),require(_0x1a8c85(0xc4)),require('@univerjs/core'),require(_0x1a8c85(0xb6)),require(_0x1a8c85(0xa4)),require(_0x1a8c85(0x95)),require(_0x1a8c85(0xc5))):typeof define==_0x1a8c85(0xf5)&&define[_0x1a8c85(0xf9)]?define(['exports',_0x1a8c85(0xa8),_0x1a8c85(0xc4),_0x1a8c85(0xd2),_0x1a8c85(0xb6),_0x1a8c85(0xa4),_0x1a8c85(0x95),_0x1a8c85(0xc5)],_0x2d82e1):(_0x586b82=typeof globalThis<'u'?globalThis:_0x586b82||self,_0x2d82e1(_0x586b82['UniverProThreadCommentDatasource']={},_0x586b82['UniverProCollaborationClient'],_0x586b82['UniverProLicense'],_0x586b82[_0x1a8c85(0x10c)],_0x586b82[_0x1a8c85(0xc1)],_0x586b82[_0x1a8c85(0x9a)],_0x586b82['rxjs'],_0x586b82[_0x1a8c85(0x112)]));}(this,function(_0x2ecba5,_0x2fa46c,_0x113315,_0x38a45d,_0x5a322f,_0x52aa6c,_0x507e8e,_0x33aa8b){'use strict';const _0xdb8239=_0x1c96;const _0x513258=_0xdb8239(0xa5);var _0x46c943=(_0x46c21e=>(_0x46c21e[_0x46c21e['OpenOrReOpen']=0x0]=_0xdb8239(0xe2),_0x46c21e[_0x46c21e['Solved']=0x1]=_0xdb8239(0xb1),_0x46c21e[_0x46c21e[_0xdb8239(0x9b)]=-0x1]=_0xdb8239(0x9b),_0x46c21e))(_0x46c943||{}),_0xda8a42=(_0x165afd=>(_0x165afd[_0x165afd[_0xdb8239(0xb0)]=0x0]=_0xdb8239(0xb0),_0x165afd[_0x165afd[_0xdb8239(0xdc)]=0x1]=_0xdb8239(0xdc),_0x165afd[_0x165afd[_0xdb8239(0xa2)]=0x2]=_0xdb8239(0xa2),_0x165afd[_0x165afd[_0xdb8239(0xf3)]=0x3]=_0xdb8239(0xf3),_0x165afd[_0x165afd[_0xdb8239(0xb8)]=0x4]=_0xdb8239(0xb8),_0x165afd[_0x165afd[_0xdb8239(0xdb)]=0x5]=_0xdb8239(0xdb),_0x165afd[_0x165afd[_0xdb8239(0x9b)]=-0x1]='UNRECOGNIZED',_0x165afd))(_0xda8a42||{});const _0x2f3c41=_0xbb2e15=>_0x38a45d[_0xdb8239(0xfd)](new Date(+_0xbb2e15))[_0xdb8239(0xa0)](_0xdb8239(0xde)),_0x397e9e=async(_0x212ad6,_0xc3292d)=>{const _0xba6454=_0xdb8239,_0xd9bfb2=_0x212ad6[_0xba6454(0xe3)](_0x38a45d['UserManagerService']),_0x1feea5=_0x212ad6[_0xba6454(0xe3)](_0x33aa8b[_0xba6454(0xbb)]);_0xc3292d[_0xba6454(0x9f)](_0x227705=>{const _0xc9930c=_0xba6454;_0xd9bfb2['getUser'](_0x227705)&&_0xc3292d[_0xc9930c(0xd5)](_0x227705);}),_0xc3292d[_0xba6454(0xdf)]&&(await _0x1feea5[_0xba6454(0xe3)](_0xba6454(0xd1),{'params':{'userIDs':[..._0xc3292d]}}))['body'][_0xba6454(0x106)][_0xba6454(0x9f)](_0x29dd67=>{_0x29dd67&&_0xd9bfb2['addUser'](_0x29dd67);});};var _0x34e591=Object['getOwnPropertyDescriptor'],_0x82c333=(_0x4a17af,_0x5a2007,_0xa1e225,_0x247d8a)=>{const _0x25e615=_0xdb8239;for(var _0x3b5a42=_0x247d8a>0x1?void 0x0:_0x247d8a?_0x34e591(_0x5a2007,_0xa1e225):_0x5a2007,_0x121a34=_0x4a17af[_0x25e615(0x111)]-0x1,_0x1904fb;_0x121a34>=0x0;_0x121a34--)(_0x1904fb=_0x4a17af[_0x121a34])&&(_0x3b5a42=_0x1904fb(_0x3b5a42)||_0x3b5a42);return _0x3b5a42;},_0x415f0b=(_0x2a51f3,_0x4b6f8e)=>(_0x5a6d3c,_0x277167)=>_0x4b6f8e(_0x5a6d3c,_0x277167,_0x2a51f3);let _0x52ad31=class extends _0x38a45d[_0xdb8239(0xcf)]{constructor(_0x211eac,_0x4abfc5,_0x54e515,_0x3b020d){const _0x2c9d35=_0xdb8239;super(),this[_0x2c9d35(0x107)]=_0x211eac,this[_0x2c9d35(0xbe)]=_0x4abfc5,this['_userService']=_0x54e515,this[_0x2c9d35(0x118)]=_0x3b020d,this[_0x2c9d35(0xa1)](),this[_0x2c9d35(0xa3)]();}['_initUserSync'](){const _0x26f97a=_0xdb8239;this['disposeWithMe'](this[_0x26f97a(0xbe)][_0x26f97a(0xfa)][_0x26f97a(0xf2)](_0x507e8e['bufferTime'](0x10))[_0x26f97a(0xf1)](_0x3ac8ab=>{const _0x73ffe=_0x26f97a,_0x1a3193=new Set();_0x3ac8ab[_0x73ffe(0x9f)](_0x491f31=>{const _0x524e79=_0x73ffe;switch(_0x491f31['type']){case _0x524e79(0xb5):{const _0xca12de=_0x491f31[_0x524e79(0xe8)][_0x524e79(0xeb)];_0x1a3193[_0x524e79(0xb5)](_0xca12de);break;}}}),_0x397e9e(this[_0x73ffe(0x118)],_0x1a3193);}));}[_0xdb8239(0xa1)](){const _0x426516=_0xdb8239;this[_0x426516(0xcc)](this['_commentService'][_0x426516(0xfa)][_0x426516(0xf1)](async _0x3a7221=>{const _0x4dc7d8=_0x426516;var _0x3b0edc,_0x2574c3,_0x187c6a,_0x5dc75d;const _0x3c90e3=(_0x3b0edc=this[_0x4dc7d8(0xbe)][_0x4dc7d8(0xe7)](_0x3a7221[_0x4dc7d8(0x96)])['find'](_0x5d2091=>_0x5d2091[_0x4dc7d8(0xb4)]===_0x3a7221[_0x4dc7d8(0xb4)]))==null?void 0x0:_0x3b0edc[_0x4dc7d8(0xe0)];if(!_0x3c90e3)return;const {unitId:_0x32541e,subUnitId:_0x23c78a}=_0x3c90e3;switch(_0x3a7221['user']&&this['_userService'][_0x4dc7d8(0xb9)](_0x3a7221['user']),_0x3a7221['type']){case _0xda8a42[_0x4dc7d8(0xdc)]:break;case _0xda8a42['Reply']:{this[_0x4dc7d8(0xbe)][_0x4dc7d8(0x9e)](_0x32541e,_0x23c78a,{'unitId':_0x32541e,'subUnitId':_0x23c78a,'ref':'','id':_0x3a7221[_0x4dc7d8(0x10b)],'dT':_0x2f3c41(+_0x3a7221[_0x4dc7d8(0xab)]),'threadId':_0x3a7221[_0x4dc7d8(0xb4)],'personId':(_0x187c6a=(_0x2574c3=_0x3a7221['user'])==null?void 0x0:_0x2574c3[_0x4dc7d8(0xac)])!=null?_0x187c6a:_0x3a7221[_0x4dc7d8(0xbc)],'text':JSON['parse'](_0x3a7221[_0x4dc7d8(0xad)]),'parentId':_0x3c90e3['id']});break;}case _0xda8a42[_0x4dc7d8(0xb8)]:{const _0x2c69cc=this[_0x4dc7d8(0xbe)]['getComment'](_0x32541e,_0x23c78a,_0x3a7221[_0x4dc7d8(0x10b)]);_0x2c69cc&&_0x2c69cc['parentId']&&this['_threadCommentModel'][_0x4dc7d8(0xca)](_0x32541e,_0x23c78a,_0x3a7221['replyId']);break;}case _0xda8a42[_0x4dc7d8(0xf3)]:{this['_threadCommentModel'][_0x4dc7d8(0x115)](_0x32541e,_0x23c78a,{'commentId':_0x3a7221['replyId'],'text':JSON[_0x4dc7d8(0x10e)](_0x3a7221[_0x4dc7d8(0xad)])});break;}case _0xda8a42['Solve']:{const _0xb44b0b=(_0x5dc75d=this[_0x4dc7d8(0xbe)]['getUnit'](_0x3a7221[_0x4dc7d8(0x96)])[_0x4dc7d8(0xb7)](_0x100e83=>_0x100e83['threadId']===_0x3a7221['threadId']))==null?void 0x0:_0x5dc75d[_0x4dc7d8(0xe0)];_0xb44b0b&&this[_0x4dc7d8(0xbe)]['resolveComment'](_0x32541e,_0x23c78a,_0xb44b0b['id'],_0x3a7221[_0x4dc7d8(0xe1)]===_0x46c943[_0x4dc7d8(0xb1)]);break;}}}));}};_0x52ad31=_0x82c333([_0x415f0b(0x0,_0x38a45d['Inject'](_0x2fa46c[_0xdb8239(0xcb)])),_0x415f0b(0x1,_0x38a45d[_0xdb8239(0xd9)](_0x52aa6c['ThreadCommentModel'])),_0x415f0b(0x2,_0x38a45d['Inject'](_0x38a45d['UserManagerService'])),_0x415f0b(0x3,_0x38a45d[_0xdb8239(0xd9)](_0x38a45d['Injector']))],_0x52ad31);const _0xf4809c=_0xdb8239(0xa9),_0x466500={};var _0x167acb=Object[_0xdb8239(0xf7)],_0x5092bc=(_0x255f4b,_0x251ed1,_0x4322f4,_0x370e2b)=>{const _0x128a94=_0xdb8239;for(var _0x3cd826=_0x370e2b>0x1?void 0x0:_0x370e2b?_0x167acb(_0x251ed1,_0x4322f4):_0x251ed1,_0x1397ec=_0x255f4b[_0x128a94(0x111)]-0x1,_0x3a256c;_0x1397ec>=0x0;_0x1397ec--)(_0x3a256c=_0x255f4b[_0x1397ec])&&(_0x3cd826=_0x3a256c(_0x3cd826)||_0x3cd826);return _0x3cd826;},_0x48caf0=(_0x22f7fb,_0x4798bf)=>(_0x437c70,_0x2dde2a)=>_0x4798bf(_0x437c70,_0x2dde2a,_0x22f7fb);function _0x5718d0(_0x2fbaff,_0x8a8c68){const _0x27ea0e=_0xdb8239,_0x439e94=_0x2fbaff[_0x27ea0e(0xae)][0x0];return{..._0x8a8c68,'id':_0x439e94[_0x27ea0e(0x10b)],'resolved':_0x2fbaff[_0x27ea0e(0xe1)]===0x1,'dT':_0x2f3c41(_0x439e94[_0x27ea0e(0xab)]),'personId':_0x439e94[_0x27ea0e(0xbc)],'threadId':_0x439e94[_0x27ea0e(0xb4)]};}function _0x20c5f4(_0x370129,_0x22a324,_0x291119){const _0x4a03fc=_0xdb8239;var _0xc5a143,_0x402f07;if(((_0x402f07=(_0xc5a143=_0x370129==null?void 0x0:_0x370129[_0x4a03fc(0xae)])==null?void 0x0:_0xc5a143['length'])!=null?_0x402f07:0x0)>0x0){const _0x49fdd7=(_0x4345bc,_0x37824b)=>({'id':_0x4345bc['replyId'],'threadId':_0x4345bc[_0x4a03fc(0xb4)],'dT':_0x2f3c41(_0x4345bc[_0x4a03fc(0xab)]),'personId':_0x4345bc['userId'],'resolved':_0x370129[_0x4a03fc(0xe1)]===_0x46c943[_0x4a03fc(0xb1)],'unitId':_0x22a324,'subUnitId':_0x291119,'text':JSON[_0x4a03fc(0x10e)](_0x4345bc['content']),'parentId':_0x37824b}),_0x3555db=_0x49fdd7(_0x370129[_0x4a03fc(0xae)][0x0]);return{..._0x3555db,'children':_0x370129['replies']['slice'](0x1)['map'](_0x1fd47a=>_0x49fdd7(_0x1fd47a,_0x3555db['id']))};}return null;}let _0x29ab1d=class{constructor(_0x33d87a,_0x505386,_0x335210,_0x5c9a6c){const _0x11000b=_0xdb8239;this[_0x11000b(0xd4)]=_0x33d87a,this[_0x11000b(0xc6)]=_0x505386,this[_0x11000b(0xb3)]=_0x335210,this[_0x11000b(0x118)]=_0x5c9a6c;}async['addComment'](_0x1b8fd1){const _0x268185=_0xdb8239;var _0x2f2fef,_0x13f18f;const {parentId:_0x51ee8e,unitId:_0x11ca3e,text:_0x40a1e2,threadId:_0x53ceda}=_0x1b8fd1,_0x1e8adb=(_0x13f18f=(_0x2f2fef=_0x40a1e2[_0x268185(0xf6)])==null?void 0x0:_0x2f2fef[_0x268185(0x98)](_0x502d43=>_0x502d43[_0x268185(0x10f)]===_0x38a45d['CustomRangeType'][_0x268185(0xaf)])[_0x268185(0xce)](_0xb068ad=>_0xb068ad['rangeId']))!=null?_0x13f18f:[],_0x87e83b=JSON[_0x268185(0x114)](_0x40a1e2),_0x18ac29=(await this[_0x268185(0xb3)][_0x268185(0xff)](_0x11ca3e))[_0x268185(0xc9)]();if(_0x51ee8e){const _0x5e727d={'memberId':_0x18ac29,'unitId':_0x11ca3e,'content':_0x87e83b,'mention':_0x1e8adb,'threadId':_0x53ceda},_0x4aa4b4=(await this['_httpService'][_0x268185(0xec)](_0x268185(0x101)+_0x11ca3e+_0x268185(0x113),{'body':_0x5e727d}))[_0x268185(0xbd)][_0x268185(0xd7)];return{..._0x1b8fd1,'id':_0x4aa4b4[_0x268185(0x10b)],'dT':_0x38a45d[_0x268185(0xfd)](+_0x4aa4b4[_0x268185(0xab)])[_0x268185(0xa0)](_0x268185(0xde)),'personId':_0x4aa4b4[_0x268185(0xbc)]};}else{const _0x2daf07={'memberId':_0x18ac29,'unitId':_0x11ca3e,'content':_0x87e83b,'mention':_0x1e8adb},_0x901b4f=await this[_0x268185(0xd4)][_0x268185(0xec)](_0x268185(0x101)+_0x11ca3e+_0x268185(0xfb),{'body':_0x2daf07});return _0x5718d0(_0x901b4f['body'][_0x268185(0x9d)],_0x1b8fd1);}}async[_0xdb8239(0x115)](_0x4e61ea){const _0x1ae7d1=_0xdb8239;var _0x3d7b7d,_0x5f23c7;const {text:_0x5e568c,unitId:_0x29434b}=_0x4e61ea,_0x29585c=(_0x5f23c7=(_0x3d7b7d=_0x5e568c[_0x1ae7d1(0xf6)])==null?void 0x0:_0x3d7b7d['filter'](_0x253a30=>_0x253a30['rangeType']===_0x38a45d[_0x1ae7d1(0xdd)]['COMMENT'])[_0x1ae7d1(0xce)](_0x473b69=>_0x473b69[_0x1ae7d1(0xed)]))!=null?_0x5f23c7:[],_0x4f6769=JSON[_0x1ae7d1(0x114)](_0x5e568c),_0x2de86a=_0x4e61ea[_0x1ae7d1(0xb4)],_0x176f0d=_0x4e61ea['id'],_0x33f86b={'memberId':(await this[_0x1ae7d1(0xb3)][_0x1ae7d1(0xff)](_0x29434b))['getMemberID'](),'unitId':_0x29434b,'threadId':_0x2de86a,'mention':_0x29585c,'content':_0x4f6769,'replyId':_0x176f0d},_0x3956ff=await this[_0x1ae7d1(0xd4)]['post']('/universer-api/comment/unit/'+_0x29434b+_0x1ae7d1(0xef),{'body':_0x33f86b});return!_0x3956ff[_0x1ae7d1(0xbd)][_0x1ae7d1(0xe4)]||_0x3956ff[_0x1ae7d1(0xbd)][_0x1ae7d1(0xe4)][_0x1ae7d1(0x110)]===0x1;}async['resolveComment'](_0x166be0){const _0x4f8574=_0xdb8239,{unitId:_0x2572ae}=_0x166be0,_0x49578f=_0x166be0[_0x4f8574(0xb4)],_0x9b1183={'memberId':this[_0x4f8574(0xc6)]['getCurrentUser']()[_0x4f8574(0xac)],'unitId':_0x2572ae,'threadId':_0x49578f,'solved':_0x166be0[_0x4f8574(0x117)]?_0x46c943[_0x4f8574(0xb1)]:_0x46c943[_0x4f8574(0xe2)]},_0x575abf=await this[_0x4f8574(0xd4)][_0x4f8574(0xec)](_0x4f8574(0x101)+_0x2572ae+_0x4f8574(0xa6),{'body':_0x9b1183});return!_0x575abf['body'][_0x4f8574(0xe4)]||_0x575abf[_0x4f8574(0xbd)][_0x4f8574(0xe4)]['code']===0x1;}async[_0xdb8239(0xca)](_0x2df949,_0x1a254b,_0x231d35,_0x3d2aa9){const _0x18623b=_0xdb8239,_0x3221b1={'memberId':(await this[_0x18623b(0xb3)]['requireSession'](_0x2df949))[_0x18623b(0xc9)](),'threadId':_0x231d35,'replyId':_0x3d2aa9,'unitId':_0x2df949},_0x37580a=await this[_0x18623b(0xd4)]['post'](_0x18623b(0x101)+_0x2df949+_0x18623b(0xc2),{'body':_0x3221b1});return!_0x37580a[_0x18623b(0xbd)]['error']||_0x37580a[_0x18623b(0xbd)]['error'][_0x18623b(0x110)]===0x1;}async[_0xdb8239(0x104)](_0x2fabd0,_0x14b59d,_0x458720){const _0x2d13a6=_0xdb8239,_0x4f551a={'unitId':_0x2fabd0,'threadId':_0x458720},_0x13a8a5=await this[_0x2d13a6(0xd4)][_0x2d13a6(0xec)](_0x2d13a6(0x101)+_0x2fabd0+_0x2d13a6(0xaa),{'body':_0x4f551a}),_0x576a33=_0x458720[_0x2d13a6(0xce)](_0x1d4d48=>_0x20c5f4(_0x13a8a5[_0x2d13a6(0xbd)]['comments'][_0x1d4d48],_0x2fabd0,_0x14b59d))['filter'](Boolean);return Object['values'](_0x13a8a5[_0x2d13a6(0xbd)][_0x2d13a6(0x106)])[_0x2d13a6(0x9f)](_0x3deb2e=>{const _0x5e03ab=_0x2d13a6;this[_0x5e03ab(0xc6)]['addUser'](_0x3deb2e);}),_0x576a33;}[_0xdb8239(0xa7)](_0x3bdc84){return{'id':_0x3bdc84['id'],'threadId':_0x3bdc84['threadId'],'ref':_0x3bdc84['ref']};}};_0x29ab1d=_0x5092bc([_0x48caf0(0x0,_0x38a45d['Inject'](_0x33aa8b[_0xdb8239(0xbb)])),_0x48caf0(0x1,_0x38a45d[_0xdb8239(0xd9)](_0x38a45d[_0xdb8239(0x94)])),_0x48caf0(0x2,_0x38a45d['Inject'](_0x2fa46c[_0xdb8239(0x10a)])),_0x48caf0(0x3,_0x38a45d[_0xdb8239(0xd9)](_0x38a45d[_0xdb8239(0x108)]))],_0x29ab1d);var _0x2ad026=Object['getOwnPropertyDescriptor'],_0x132165=(_0x58d09f,_0xd8344e,_0x6524a9,_0x10e52f)=>{const _0x48496d=_0xdb8239;for(var _0x1570c8=_0x10e52f>0x1?void 0x0:_0x10e52f?_0x2ad026(_0xd8344e,_0x6524a9):_0xd8344e,_0x1ddf37=_0x58d09f[_0x48496d(0x111)]-0x1,_0x1e5ba8;_0x1ddf37>=0x0;_0x1ddf37--)(_0x1e5ba8=_0x58d09f[_0x1ddf37])&&(_0x1570c8=_0x1e5ba8(_0x1570c8)||_0x1570c8);return _0x1570c8;},_0x37ae7c=(_0x59218f,_0x1c288f)=>(_0x527209,_0x15d363)=>_0x1c288f(_0x527209,_0x15d363,_0x59218f);let _0x34568d=class extends _0x38a45d['Disposable']{constructor(_0x4b57db,_0x48b1){const _0x44a3af=_0xdb8239;super(),this['_threadCommentDataSourceService']=_0x4b57db,this[_0x44a3af(0xe9)]=_0x48b1,this[_0x44a3af(0xd3)]();}[_0xdb8239(0xd3)](){const _0x3dee64=_0xdb8239;this[_0x3dee64(0xbf)][_0x3dee64(0xd0)]=this[_0x3dee64(0xe9)],this[_0x3dee64(0xbf)][_0x3dee64(0x103)]=!0x1;}};_0x34568d=_0x132165([_0x37ae7c(0x0,_0x52aa6c['IThreadCommentDataSourceService']),_0x37ae7c(0x1,_0x38a45d[_0xdb8239(0xd9)](_0x29ab1d))],_0x34568d);var _0x55c8e7=Object[_0xdb8239(0x97)],_0x2e013c=Object[_0xdb8239(0xf7)],_0x3ebff0=(_0x38acf0,_0x362d3f,_0x1fb471)=>_0x362d3f in _0x38acf0?_0x55c8e7(_0x38acf0,_0x362d3f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fb471}):_0x38acf0[_0x362d3f]=_0x1fb471,_0x4dd0fc=(_0x2ae9d0,_0x289c51,_0xfbab82,_0x1a86be)=>{const _0x5bf1cd=_0xdb8239;for(var _0x2fa084=_0x1a86be>0x1?void 0x0:_0x1a86be?_0x2e013c(_0x289c51,_0xfbab82):_0x289c51,_0x4354b7=_0x2ae9d0[_0x5bf1cd(0x111)]-0x1,_0x293e7b;_0x4354b7>=0x0;_0x4354b7--)(_0x293e7b=_0x2ae9d0[_0x4354b7])&&(_0x2fa084=_0x293e7b(_0x2fa084)||_0x2fa084);return _0x2fa084;},_0x159178=(_0x188b62,_0x2ba55f)=>(_0x3d05b8,_0x3bd03c)=>_0x2ba55f(_0x3d05b8,_0x3bd03c,_0x188b62),_0x51a708=(_0x21d232,_0x205a57,_0x3c3065)=>_0x3ebff0(_0x21d232,typeof _0x205a57!=_0xdb8239(0xe5)?_0x205a57+'':_0x205a57,_0x3c3065);_0x2ecba5[_0xdb8239(0xc3)]=class extends _0x38a45d[_0xdb8239(0xc8)]{constructor(_0x4e9d27=_0x466500,_0xb765ee,_0x3b2f85){const _0x4a4f55=_0xdb8239;super(),this[_0x4a4f55(0xc7)]=_0x4e9d27,this[_0x4a4f55(0x118)]=_0xb765ee,this[_0x4a4f55(0x10d)]=_0x3b2f85;const {..._0x4b18d5}=_0x38a45d['merge']({},_0x466500,this[_0x4a4f55(0xc7)]);this[_0x4a4f55(0x10d)]['setConfig'](_0xf4809c,_0x4b18d5);}[_0xdb8239(0xda)](){const _0x359ef3=_0xdb8239;[[_0x29ab1d],[_0x34568d],[_0x52ad31]][_0x359ef3(0x9f)](_0x476828=>{const _0x32f29c=_0x359ef3;this['_injector'][_0x32f29c(0xb5)](_0x476828);});}[_0xdb8239(0xcd)](){const _0x4860f4=_0xdb8239;this[_0x4860f4(0x118)][_0x4860f4(0xe3)](_0x34568d),this[_0x4860f4(0x118)][_0x4860f4(0xe3)](_0x52ad31);}},_0x51a708(_0x2ecba5[_0xdb8239(0xc3)],_0xdb8239(0xfc),_0x513258),_0x51a708(_0x2ecba5[_0xdb8239(0xc3)],_0xdb8239(0xba),_0x38a45d[_0xdb8239(0xd6)][_0xdb8239(0xb2)]),_0x2ecba5['UniverThreadCommentDataSourcePlugin']=_0x4dd0fc([_0x38a45d[_0xdb8239(0xf4)](_0x5a322f[_0xdb8239(0x105)],_0x2fa46c[_0xdb8239(0xc0)],_0x113315['UniverLicensePlugin']),_0x159178(0x1,_0x38a45d['Inject'](_0x38a45d['Injector'])),_0x159178(0x2,_0x38a45d['IConfigService'])],_0x2ecba5['UniverThreadCommentDataSourcePlugin']),Object[_0xdb8239(0x97)](_0x2ecba5,Symbol['toStringTag'],{'value':_0xdb8239(0xd8)});}));function _0x1c96(_0x182f1f,_0x50c549){const _0x4ea8e9=_0x4ea8();return _0x1c96=function(_0x1c96eb,_0x2c7aa4){_0x1c96eb=_0x1c96eb-0x94;let _0x398e7b=_0x4ea8e9[_0x1c96eb];return _0x398e7b;},_0x1c96(_0x182f1f,_0x50c549);}function _0x4ea8(){const _0x426570=['dayjs','7100840MJwMBc','requireSession','6035733lyHTDy','/universer-api/comment/unit/','18656MSmAid','syncUpdateMutationToColla','listComments','UniverThreadCommentUIPlugin','users','_commentService','Injector','5451672mCtJhG','CollaborationSessionService','replyId','UniverCore','_configService','parse','rangeType','code','length','UniverNetwork','/reply','stringify','updateComment','2284396nwHHAk','resolved','_injector','UserManagerService','rxjs','unitId','defineProperty','filter','1VaBQSO','UniverThreadComment','UNRECOGNIZED','1552076PPwOvJ','comment','addComment','forEach','format','_init','Reply','_initUserSync','@univerjs/thread-comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/solved','saveCommentToSnapshot','@univerjs-pro/collaboration-client','thread-comment-data-source.config','/list','createTimestamp','userID','content','replies','COMMENT','Unknown','Solved','UNIVER_UNKNOWN','_sessionService','threadId','add','@univerjs/thread-comment-ui','find','Delete','addUser','type','HTTPService','userId','body','_threadCommentModel','_threadCommentDataSourceService','UniverCollaborationClientPlugin','UniverThreadCommentUi','/delete','UniverThreadCommentDataSourcePlugin','@univerjs-pro/license','@univerjs/network','_userService','_config','Plugin','getMemberID','deleteComment','CommentService','disposeWithMe','onReady','map','Disposable','dataSource','/universer-api/user/list','@univerjs/core','_initDataSource','_httpService','delete','UniverInstanceType','reply','Module','Inject','onStarting','Solve','Add','CustomRangeType','YYYY/MM/DD\x20HH:mm','size','root','solved','OpenOrReOpen','get','error','symbol','352UFteWe','getUnit','payload','_threadCommentDataSource','31367qPETLV','personId','post','rangeId','3tUPdZY','/edit','13160UUDrFS','subscribe','pipe','Edit','DependentOn','function','customRanges','getOwnPropertyDescriptor','object','amd','commentUpdate$','/add','pluginName'];_0x4ea8=function(){return _0x426570;};return _0x4ea8();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.4-nightly.202503111607",
3
+ "version": "0.6.5",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.6.4-nightly.202503111607",
49
- "@univerjs/core": "0.6.4-nightly.202503111607",
50
- "@univerjs/network": "0.6.4-nightly.202503111607",
51
- "@univerjs-pro/license": "0.6.4-nightly.202503111607",
48
+ "@univerjs-pro/collaboration-client": "0.6.5",
49
+ "@univerjs/core": "0.6.5",
52
50
  "@univerjs/protocol": "0.1.44-alpha.3",
53
- "@univerjs/thread-comment": "0.6.4-nightly.202503111607",
54
- "@univerjs/thread-comment-ui": "0.6.4-nightly.202503111607"
51
+ "@univerjs/network": "0.6.5",
52
+ "@univerjs/thread-comment-ui": "0.6.5",
53
+ "@univerjs-pro/license": "0.6.5",
54
+ "@univerjs/thread-comment": "0.6.5"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.2",
59
59
  "vite": "^6.2.0",
60
- "vitest": "^3.0.7",
61
- "@univerjs-infra/shared": "0.6.4"
60
+ "vitest": "^3.0.8",
61
+ "@univerjs-infra/shared": "0.6.5"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",