@univerjs-pro/thread-comment-datasource 0.9.2-nightly.202507171607 → 0.9.2-nightly.202507181608

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x1ee313=_0x8821;(function(_0xd6125e,_0x2e894d){const _0x52bbd9=_0x8821,_0x4f9197=_0xd6125e();while(!![]){try{const _0x418bf8=-parseInt(_0x52bbd9(0x16a))/0x1*(-parseInt(_0x52bbd9(0x13c))/0x2)+-parseInt(_0x52bbd9(0x156))/0x3+-parseInt(_0x52bbd9(0x175))/0x4+-parseInt(_0x52bbd9(0x11b))/0x5*(-parseInt(_0x52bbd9(0x10f))/0x6)+parseInt(_0x52bbd9(0x14c))/0x7+-parseInt(_0x52bbd9(0x158))/0x8*(parseInt(_0x52bbd9(0x17a))/0x9)+parseInt(_0x52bbd9(0x138))/0xa*(-parseInt(_0x52bbd9(0x15e))/0xb);if(_0x418bf8===_0x2e894d)break;else _0x4f9197['push'](_0x4f9197['shift']());}catch(_0x6c81ff){_0x4f9197['push'](_0x4f9197['shift']());}}}(_0x285e,0x5f575));Object[_0x1ee313(0x14b)](exports,Symbol[_0x1ee313(0x143)],{'value':_0x1ee313(0x125)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x1ee313(0x146);var I=(_0x40ff79=>(_0x40ff79[_0x40ff79[_0x1ee313(0x119)]=0x0]='OpenOrReOpen',_0x40ff79[_0x40ff79[_0x1ee313(0x115)]=0x1]=_0x1ee313(0x115),_0x40ff79[_0x40ff79[_0x1ee313(0x159)]=-0x1]='UNRECOGNIZED',_0x40ff79))(I||{}),v=(_0xdea46e=>(_0xdea46e[_0xdea46e[_0x1ee313(0x11c)]=0x0]=_0x1ee313(0x11c),_0xdea46e[_0xdea46e[_0x1ee313(0x150)]=0x1]='Add',_0xdea46e[_0xdea46e[_0x1ee313(0x11f)]=0x2]=_0x1ee313(0x11f),_0xdea46e[_0xdea46e['Edit']=0x3]=_0x1ee313(0x165),_0xdea46e[_0xdea46e[_0x1ee313(0x121)]=0x4]=_0x1ee313(0x121),_0xdea46e[_0xdea46e[_0x1ee313(0x177)]=0x5]='Solve',_0xdea46e[_0xdea46e['UNRECOGNIZED']=-0x1]=_0x1ee313(0x159),_0xdea46e))(v||{});const f=_0x4eb6d1=>c[_0x1ee313(0x116)](new Date(+_0x4eb6d1))['format'](_0x1ee313(0x149)),R=async(_0x539232,_0xe057)=>{const _0x20e06c=_0x1ee313,_0x341d8b=_0x539232[_0x20e06c(0x169)](c['UserManagerService']),_0x4aa305=_0x539232[_0x20e06c(0x169)](P[_0x20e06c(0x15d)]);_0xe057[_0x20e06c(0x12a)](_0x2d07a6=>{const _0x47e970=_0x20e06c;_0x341d8b['getUser'](_0x2d07a6)&&_0xe057[_0x47e970(0x133)](_0x2d07a6);}),_0xe057[_0x20e06c(0xfe)]&&(await _0x4aa305[_0x20e06c(0x169)](_0x20e06c(0x132),{'params':{'userIDs':[..._0xe057]}}))[_0x20e06c(0xfd)]['users']['forEach'](_0x5b7221=>{_0x5b7221&&_0x341d8b['addUser'](_0x5b7221);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x59e2b5,_0xc24bb3,_0x1d8274,_0x4db8b2)=>{const _0x4c633c=_0x1ee313;for(var _0x5c0e9e=_0x4db8b2>0x1?void 0x0:_0x4db8b2?$(_0xc24bb3,_0x1d8274):_0xc24bb3,_0x39ae1b=_0x59e2b5[_0x4c633c(0x154)]-0x1,_0x3af85d;_0x39ae1b>=0x0;_0x39ae1b--)(_0x3af85d=_0x59e2b5[_0x39ae1b])&&(_0x5c0e9e=_0x3af85d(_0x5c0e9e)||_0x5c0e9e);return _0x5c0e9e;},S=(_0x1039d4,_0x5d0c9a)=>(_0x546ff8,_0x5bb6ce)=>_0x5d0c9a(_0x546ff8,_0x5bb6ce,_0x1039d4);let p=class extends c[_0x1ee313(0x120)]{constructor(_0x74f46c,_0x1f5821,_0x1d3d13,_0x196ab0){const _0x2331bf=_0x1ee313;super(),this[_0x2331bf(0x144)]=_0x74f46c,this[_0x2331bf(0x112)]=_0x1f5821,this[_0x2331bf(0x172)]=_0x1d3d13,this['_injector']=_0x196ab0,this[_0x2331bf(0x107)](),this[_0x2331bf(0x111)]();}[_0x1ee313(0x111)](){const _0x75501f=_0x1ee313;this[_0x75501f(0x179)](this[_0x75501f(0x112)][_0x75501f(0x12b)][_0x75501f(0x12e)](w[_0x75501f(0x103)](0x10))['subscribe'](_0x303f12=>{const _0x521f6a=_0x75501f,_0x4d77e1=new Set();_0x303f12['forEach'](_0x3df2d5=>{const _0x5bd2f2=_0x8821;switch(_0x3df2d5[_0x5bd2f2(0x14f)]){case _0x5bd2f2(0x13a):{const _0x4de8e6=_0x3df2d5[_0x5bd2f2(0x137)]['personId'];_0x4d77e1[_0x5bd2f2(0x13a)](_0x4de8e6);break;}}}),R(this[_0x521f6a(0x106)],_0x4d77e1);}));}[_0x1ee313(0x107)](){const _0x3cfd66=_0x1ee313;this[_0x3cfd66(0x179)](this['_commentService'][_0x3cfd66(0x12b)][_0x3cfd66(0x155)](async _0x554f39=>{const _0x12c074=_0x3cfd66;var _0x44b1e7,_0x4d3117,_0x457ffb,_0x471487;const _0x3f1be2=(_0x44b1e7=this[_0x12c074(0x112)][_0x12c074(0x162)](_0x554f39[_0x12c074(0x147)])[_0x12c074(0x16f)](_0x2fb9c1=>_0x2fb9c1[_0x12c074(0x136)]===_0x554f39[_0x12c074(0x136)]))==null?void 0x0:_0x44b1e7[_0x12c074(0x16b)];if(!_0x3f1be2)return;const {unitId:_0x56f8bf,subUnitId:_0x2d138d}=_0x3f1be2;switch(_0x554f39[_0x12c074(0x166)]&&this[_0x12c074(0x172)]['addUser'](_0x554f39[_0x12c074(0x166)]),_0x554f39[_0x12c074(0x14f)]){case v[_0x12c074(0x150)]:break;case v[_0x12c074(0x11f)]:{this[_0x12c074(0x112)][_0x12c074(0x105)](_0x56f8bf,_0x2d138d,{'unitId':_0x56f8bf,'subUnitId':_0x2d138d,'ref':'','id':_0x554f39[_0x12c074(0x15b)],'dT':f(+_0x554f39[_0x12c074(0x170)]),'threadId':_0x554f39[_0x12c074(0x136)],'personId':(_0x457ffb=(_0x4d3117=_0x554f39[_0x12c074(0x166)])==null?void 0x0:_0x4d3117[_0x12c074(0x140)])!=null?_0x457ffb:_0x554f39[_0x12c074(0x118)],'text':JSON[_0x12c074(0x13b)](_0x554f39[_0x12c074(0x13d)]),'parentId':_0x3f1be2['id']});break;}case v['Delete']:{const _0x5f171b=this[_0x12c074(0x112)][_0x12c074(0x163)](_0x56f8bf,_0x2d138d,_0x554f39[_0x12c074(0x15b)]);_0x5f171b&&_0x5f171b[_0x12c074(0x12c)]&&this[_0x12c074(0x112)][_0x12c074(0x174)](_0x56f8bf,_0x2d138d,_0x554f39[_0x12c074(0x15b)]);break;}case v[_0x12c074(0x165)]:{this[_0x12c074(0x112)]['updateComment'](_0x56f8bf,_0x2d138d,{'commentId':_0x554f39[_0x12c074(0x15b)],'text':JSON['parse'](_0x554f39[_0x12c074(0x13d)])});break;}case v[_0x12c074(0x177)]:{const _0x5bdbc8=(_0x471487=this[_0x12c074(0x112)][_0x12c074(0x162)](_0x554f39[_0x12c074(0x147)])[_0x12c074(0x16f)](_0x1e5e55=>_0x1e5e55[_0x12c074(0x136)]===_0x554f39[_0x12c074(0x136)]))==null?void 0x0:_0x471487[_0x12c074(0x16b)];_0x5bdbc8&&this[_0x12c074(0x112)][_0x12c074(0x168)](_0x56f8bf,_0x2d138d,_0x5bdbc8['id'],_0x554f39[_0x12c074(0x142)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x1ee313(0x122)](b[_0x1ee313(0x14e)])),S(0x1,c[_0x1ee313(0x122)](M[_0x1ee313(0x167)])),S(0x2,c[_0x1ee313(0x122)](c[_0x1ee313(0x100)])),S(0x3,c[_0x1ee313(0x122)](c[_0x1ee313(0x10c)]))],p);function _0x8821(_0x124200,_0x1b3e5e){const _0x285e0c=_0x285e();return _0x8821=function(_0x882193,_0x41ff5f){_0x882193=_0x882193-0xfd;let _0xfe0b0c=_0x285e0c[_0x882193];return _0xfe0b0c;},_0x8821(_0x124200,_0x1b3e5e);}const q=_0x1ee313(0x126),D={};var A=Object[_0x1ee313(0x130)],x=(_0x5f0cf4,_0x3506f0,_0x51460,_0xc5d3e8)=>{const _0x174994=_0x1ee313;for(var _0x54bcfb=_0xc5d3e8>0x1?void 0x0:_0xc5d3e8?A(_0x3506f0,_0x51460):_0x3506f0,_0x53dc55=_0x5f0cf4[_0x174994(0x154)]-0x1,_0x39b2af;_0x53dc55>=0x0;_0x53dc55--)(_0x39b2af=_0x5f0cf4[_0x53dc55])&&(_0x54bcfb=_0x39b2af(_0x54bcfb)||_0x54bcfb);return _0x54bcfb;},_=(_0x1f20db,_0x262c5a)=>(_0x113cac,_0x38f838)=>_0x262c5a(_0x113cac,_0x38f838,_0x1f20db);function Y(_0x171864,_0x42feff){const _0x2e9a3f=_0x1ee313,_0x4e87df=_0x171864[_0x2e9a3f(0x11d)][0x0];return{..._0x42feff,'id':_0x4e87df[_0x2e9a3f(0x15b)],'resolved':_0x171864[_0x2e9a3f(0x142)]===0x1,'dT':f(_0x4e87df['createTimestamp']),'personId':_0x4e87df[_0x2e9a3f(0x118)],'threadId':_0x4e87df[_0x2e9a3f(0x136)]};}function G(_0x40b8b0,_0x520e26,_0x5cd030){const _0x1c16ae=_0x1ee313;var _0x2c35b6,_0x56fdce;if(((_0x56fdce=(_0x2c35b6=_0x40b8b0==null?void 0x0:_0x40b8b0[_0x1c16ae(0x11d)])==null?void 0x0:_0x2c35b6[_0x1c16ae(0x154)])!=null?_0x56fdce:0x0)>0x0){const _0x375027=(_0x4f1d46,_0x2bdc2b)=>({'id':_0x4f1d46['replyId'],'threadId':_0x4f1d46[_0x1c16ae(0x136)],'dT':f(_0x4f1d46['createTimestamp']),'personId':_0x4f1d46[_0x1c16ae(0x118)],'resolved':_0x40b8b0[_0x1c16ae(0x142)]===I[_0x1c16ae(0x115)],'unitId':_0x520e26,'subUnitId':_0x5cd030,'text':JSON[_0x1c16ae(0x13b)](_0x4f1d46[_0x1c16ae(0x13d)]),'parentId':_0x2bdc2b}),_0xf2e19c=_0x375027(_0x40b8b0[_0x1c16ae(0x11d)][0x0]);return{..._0xf2e19c,'children':_0x40b8b0[_0x1c16ae(0x11d)][_0x1c16ae(0x114)](0x1)[_0x1c16ae(0x151)](_0xf5aada=>_0x375027(_0xf5aada,_0xf2e19c['id']))};}return null;}let g=class{constructor(_0x61d8ae,_0x33f10b,_0x368f37,_0x536d5c){const _0x77204c=_0x1ee313;this[_0x77204c(0x104)]=_0x61d8ae,this[_0x77204c(0x172)]=_0x33f10b,this[_0x77204c(0x128)]=_0x368f37,this[_0x77204c(0x106)]=_0x536d5c;}async[_0x1ee313(0x105)](_0x5ef236){const _0x557e2a=_0x1ee313;var _0x22dbca,_0x4b6e78;const {parentId:_0x4aad23,unitId:_0x511126,text:_0x2450a7,threadId:_0x591ab9}=_0x5ef236,_0x445569=(_0x4b6e78=(_0x22dbca=_0x2450a7[_0x557e2a(0x10e)])==null?void 0x0:_0x22dbca['filter'](_0x5d13a1=>_0x5d13a1[_0x557e2a(0x135)]===c[_0x557e2a(0x15f)][_0x557e2a(0x127)])[_0x557e2a(0x151)](_0x42e654=>_0x42e654[_0x557e2a(0x13e)]))!=null?_0x4b6e78:[],_0x53e5db=JSON[_0x557e2a(0x139)](_0x2450a7),_0x123a9c=(await this[_0x557e2a(0x128)][_0x557e2a(0x14a)](_0x511126))['getMemberID']();if(_0x4aad23){const _0x11e868={'memberId':_0x123a9c,'unitId':_0x511126,'content':_0x53e5db,'mention':_0x445569,'threadId':_0x591ab9},_0x2b4278=(await this[_0x557e2a(0x104)][_0x557e2a(0x102)](_0x557e2a(0x110)+_0x511126+_0x557e2a(0x109),{'body':_0x11e868}))[_0x557e2a(0xfd)][_0x557e2a(0x161)];return{..._0x5ef236,'id':_0x2b4278[_0x557e2a(0x15b)],'dT':c['dayjs'](+_0x2b4278[_0x557e2a(0x170)])[_0x557e2a(0x157)](_0x557e2a(0x149)),'personId':_0x2b4278[_0x557e2a(0x118)]};}else{const _0x3582dd={'memberId':_0x123a9c,'unitId':_0x511126,'content':_0x53e5db,'mention':_0x445569},_0x40c654=await this[_0x557e2a(0x104)]['post'](_0x557e2a(0x110)+_0x511126+_0x557e2a(0x17b),{'body':_0x3582dd});return Y(_0x40c654['body'][_0x557e2a(0x12f)],_0x5ef236);}}async[_0x1ee313(0x11e)](_0x41f330){const _0x4578ca=_0x1ee313;var _0x2dd795,_0x5de8e9;const {text:_0x3ea936,unitId:_0x574ccd}=_0x41f330,_0x5b3e23=(_0x5de8e9=(_0x2dd795=_0x3ea936[_0x4578ca(0x10e)])==null?void 0x0:_0x2dd795[_0x4578ca(0x141)](_0x424670=>_0x424670[_0x4578ca(0x135)]===c[_0x4578ca(0x15f)][_0x4578ca(0x127)])[_0x4578ca(0x151)](_0x5d71f7=>_0x5d71f7[_0x4578ca(0x13e)]))!=null?_0x5de8e9:[],_0x101959=JSON['stringify'](_0x3ea936),_0x272672=_0x41f330[_0x4578ca(0x136)],_0x34fdb1=_0x41f330['id'],_0xbcc5f6={'memberId':(await this[_0x4578ca(0x128)][_0x4578ca(0x14a)](_0x574ccd))['getMemberID'](),'unitId':_0x574ccd,'threadId':_0x272672,'mention':_0x5b3e23,'content':_0x101959,'replyId':_0x34fdb1},_0x352a86=await this[_0x4578ca(0x104)]['post'](_0x4578ca(0x110)+_0x574ccd+_0x4578ca(0x164),{'body':_0xbcc5f6});return!_0x352a86[_0x4578ca(0xfd)]['error']||_0x352a86[_0x4578ca(0xfd)]['error'][_0x4578ca(0x13f)]===0x1;}async[_0x1ee313(0x168)](_0x5594bb){const _0x3d2212=_0x1ee313,{unitId:_0x373f3c}=_0x5594bb,_0x14d44b=_0x5594bb[_0x3d2212(0x136)],_0x15d3bc={'memberId':this[_0x3d2212(0x172)]['getCurrentUser']()['userID'],'unitId':_0x373f3c,'threadId':_0x14d44b,'solved':_0x5594bb[_0x3d2212(0x129)]?I[_0x3d2212(0x115)]:I[_0x3d2212(0x119)]},_0x59aca0=await this[_0x3d2212(0x104)][_0x3d2212(0x102)]('/universer-api/comment/unit/'+_0x373f3c+_0x3d2212(0x16e),{'body':_0x15d3bc});return!_0x59aca0['body'][_0x3d2212(0x14d)]||_0x59aca0[_0x3d2212(0xfd)][_0x3d2212(0x14d)]['code']===0x1;}async[_0x1ee313(0x174)](_0x22e5ab,_0x32a87d,_0x2281ad,_0x39190d){const _0x1a07ed=_0x1ee313,_0x4ceb28={'memberId':(await this[_0x1a07ed(0x128)][_0x1a07ed(0x14a)](_0x22e5ab))[_0x1a07ed(0x153)](),'threadId':_0x2281ad,'replyId':_0x39190d,'unitId':_0x22e5ab},_0x4ad1ab=await this[_0x1a07ed(0x104)][_0x1a07ed(0x102)]('/universer-api/comment/unit/'+_0x22e5ab+_0x1a07ed(0x117),{'body':_0x4ceb28});return!_0x4ad1ab[_0x1a07ed(0xfd)][_0x1a07ed(0x14d)]||_0x4ad1ab['body']['error'][_0x1a07ed(0x13f)]===0x1;}async['listComments'](_0x595262,_0x5cbf30,_0x4b5078){const _0x5d0e80=_0x1ee313,_0x342db0={'unitId':_0x595262,'threadId':_0x4b5078},_0x2c26ea=await this[_0x5d0e80(0x104)][_0x5d0e80(0x102)](_0x5d0e80(0x110)+_0x595262+_0x5d0e80(0x15c),{'body':_0x342db0}),_0x4bdaba=_0x4b5078[_0x5d0e80(0x151)](_0x184b6f=>G(_0x2c26ea[_0x5d0e80(0xfd)][_0x5d0e80(0x152)][_0x184b6f],_0x595262,_0x5cbf30))[_0x5d0e80(0x141)](Boolean);return Object[_0x5d0e80(0x145)](_0x2c26ea[_0x5d0e80(0xfd)]['users'])[_0x5d0e80(0x12a)](_0x50fabc=>{const _0x16150a=_0x5d0e80;this[_0x16150a(0x172)][_0x16150a(0x16c)](_0x50fabc);}),_0x4bdaba;}['saveCommentToSnapshot'](_0x3c70be){const _0x4bd35d=_0x1ee313;return{'id':_0x3c70be['id'],'threadId':_0x3c70be[_0x4bd35d(0x136)],'ref':_0x3c70be[_0x4bd35d(0x11a)]};}};g=x([_(0x0,c[_0x1ee313(0x122)](P[_0x1ee313(0x15d)])),_(0x1,c[_0x1ee313(0x122)](c[_0x1ee313(0x100)])),_(0x2,c[_0x1ee313(0x122)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c[_0x1ee313(0x10c)]))],g);var H=Object[_0x1ee313(0x130)],J=(_0x505bbd,_0x345574,_0x2dbf18,_0x196ce3)=>{for(var _0x119194=_0x196ce3>0x1?void 0x0:_0x196ce3?H(_0x345574,_0x2dbf18):_0x345574,_0x1c7256=_0x505bbd['length']-0x1,_0x493458;_0x1c7256>=0x0;_0x1c7256--)(_0x493458=_0x505bbd[_0x1c7256])&&(_0x119194=_0x493458(_0x119194)||_0x119194);return _0x119194;},y=(_0x22d24b,_0x30510e)=>(_0x5d233a,_0x31622b)=>_0x30510e(_0x5d233a,_0x31622b,_0x22d24b);let C=class extends c[_0x1ee313(0x120)]{constructor(_0x30b563,_0x1fa986){const _0x25df2d=_0x1ee313;super(),this[_0x25df2d(0x123)]=_0x30b563,this[_0x25df2d(0x160)]=_0x1fa986,this[_0x25df2d(0x12d)]();}[_0x1ee313(0x12d)](){const _0x22b58c=_0x1ee313;this[_0x22b58c(0x123)]['dataSource']=this[_0x22b58c(0x160)],this[_0x22b58c(0x123)][_0x22b58c(0x124)]=!0x1;}};C=J([y(0x0,M[_0x1ee313(0x10b)]),y(0x1,c[_0x1ee313(0x122)](g))],C);var F=Object['defineProperty'],L=Object[_0x1ee313(0x130)],Z=(_0xa9cc32,_0x518f0a,_0x5df569)=>_0x518f0a in _0xa9cc32?F(_0xa9cc32,_0x518f0a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5df569}):_0xa9cc32[_0x518f0a]=_0x5df569,W=(_0x34b1cf,_0xf7a7df,_0xd6c18a,_0x18d284)=>{for(var _0x35b102=_0x18d284>0x1?void 0x0:_0x18d284?L(_0xf7a7df,_0xd6c18a):_0xf7a7df,_0x1f2f2d=_0x34b1cf['length']-0x1,_0x19b835;_0x1f2f2d>=0x0;_0x1f2f2d--)(_0x19b835=_0x34b1cf[_0x1f2f2d])&&(_0x35b102=_0x19b835(_0x35b102)||_0x35b102);return _0x35b102;},O=(_0x44f149,_0xf0b2b)=>(_0x2df297,_0x6ba8eb)=>_0xf0b2b(_0x2df297,_0x6ba8eb,_0x44f149),N=(_0xcb12ae,_0x4fa359,_0x40d2af)=>Z(_0xcb12ae,typeof _0x4fa359!='symbol'?_0x4fa359+'':_0x4fa359,_0x40d2af);function _0x285e(){const _0x38b8a4=['/solved','find','createTimestamp','_configService','_userService','setConfig','deleteComment','1043140wivEkF','UniverLicensePlugin','Solve','UNIVER_UNKNOWN','disposeWithMe','27gKEula','/add','body','size','merge','UserManagerService','onStarting','post','bufferTime','_httpService','addComment','_injector','_init','DependentOn','/reply','UniverInstanceType','IThreadCommentDataSourceService','Injector','IConfigService','customRanges','42ftgftb','/universer-api/comment/unit/','_initUserSync','_threadCommentModel','Plugin','slice','Solved','dayjs','/delete','userId','OpenOrReOpen','ref','549205HGHRyf','Unknown','replies','updateComment','Reply','Disposable','Delete','Inject','_threadCommentDataSourceService','syncUpdateMutationToColla','Module','thread-comment-data-source.config','COMMENT','_sessionService','resolved','forEach','commentUpdate$','parentId','_initDataSource','pipe','comment','getOwnPropertyDescriptor','pluginName','/universer-api/user/list','delete','_config','rangeType','threadId','payload','2526070OujRHZ','stringify','add','parse','2SnAHrM','content','rangeId','code','userID','filter','solved','toStringTag','_commentService','values','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','UniverCollaborationClientPlugin','YYYY/MM/DD\x20HH:mm','requireSession','defineProperty','4746791pYIeXJ','error','CommentService','type','Add','map','comments','getMemberID','length','subscribe','586437IsXDWy','format','1334584NddCjx','UNRECOGNIZED','onReady','replyId','/list','HTTPService','22YqfgeR','CustomRangeType','_threadCommentDataSource','reply','getUnit','getComment','/edit','Edit','user','ThreadCommentModel','resolveComment','get','405464xUiwrx','root','addUser','UniverThreadCommentDataSourcePlugin'];_0x285e=function(){return _0x38b8a4;};return _0x285e();}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1ee313(0x113)]{constructor(_0x21a91f=D,_0x595c06,_0x270881){const _0x1c2804=_0x1ee313;super(),this[_0x1c2804(0x134)]=_0x21a91f,this[_0x1c2804(0x106)]=_0x595c06,this[_0x1c2804(0x171)]=_0x270881;const {..._0x450b60}=c[_0x1c2804(0xff)]({},D,this[_0x1c2804(0x134)]);this['_configService'][_0x1c2804(0x173)](q,_0x450b60);}[_0x1ee313(0x101)](){[[g],[C],[p]]['forEach'](_0x1e13bc=>{const _0x532581=_0x8821;this[_0x532581(0x106)][_0x532581(0x13a)](_0x1e13bc);});}[_0x1ee313(0x15a)](){const _0x1ae853=_0x1ee313;this[_0x1ae853(0x106)][_0x1ae853(0x169)](C),this[_0x1ae853(0x106)][_0x1ae853(0x169)](p);}},N(exports[_0x1ee313(0x16d)],_0x1ee313(0x131),U),N(exports[_0x1ee313(0x16d)],'type',c[_0x1ee313(0x10a)][_0x1ee313(0x178)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x1ee313(0x108)](j['UniverThreadCommentUIPlugin'],b[_0x1ee313(0x148)],T[_0x1ee313(0x176)]),O(0x1,c[_0x1ee313(0x122)](c[_0x1ee313(0x10c)])),O(0x2,c[_0x1ee313(0x10d)])],exports[_0x1ee313(0x16d)]);
1
+ 'use strict';function _0x3058(_0x5a995d,_0x18da63){const _0x1f59f6=_0x1f59();return _0x3058=function(_0x30581d,_0x32695d){_0x30581d=_0x30581d-0xc6;let _0x29a09e=_0x1f59f6[_0x30581d];return _0x29a09e;},_0x3058(_0x5a995d,_0x18da63);}const _0x5a3e92=_0x3058;(function(_0x326ad9,_0x38f49f){const _0xeee72a=_0x3058,_0x58989f=_0x326ad9();while(!![]){try{const _0x29ca3d=-parseInt(_0xeee72a(0xe4))/0x1+parseInt(_0xeee72a(0xd5))/0x2*(-parseInt(_0xeee72a(0xed))/0x3)+-parseInt(_0xeee72a(0x118))/0x4+parseInt(_0xeee72a(0xe7))/0x5+-parseInt(_0xeee72a(0x132))/0x6*(-parseInt(_0xeee72a(0x104))/0x7)+parseInt(_0xeee72a(0xeb))/0x8*(-parseInt(_0xeee72a(0xcc))/0x9)+-parseInt(_0xeee72a(0xf4))/0xa*(-parseInt(_0xeee72a(0x103))/0xb);if(_0x29ca3d===_0x38f49f)break;else _0x58989f['push'](_0x58989f['shift']());}catch(_0xbbd06f){_0x58989f['push'](_0x58989f['shift']());}}}(_0x1f59,0x81bcc));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'});function _0x1f59(){const _0x513bd6=['filter','/add','UniverThreadCommentUIPlugin','1850gvwGgI','Solve','YYYY/MM/DD\x20HH:mm','parentId','Inject','userID','UNRECOGNIZED','getUnit','_init','ThreadCommentModel','saveCommentToSnapshot','map','commentUpdate$','payload','Unknown','54153wXrmkm','616LGHVfB','stringify','CustomRangeType','createTimestamp','/universer-api/comment/unit/','getOwnPropertyDescriptor','personId','unitId','addComment','thread-comment-data-source.config','rangeId','/universer-api/user/list','get','_userService','replies','_threadCommentDataSource','/delete','content','_threadCommentDataSourceService','UniverThreadCommentDataSourcePlugin','1628076MWdFaq','addUser','rangeType','parse','Disposable','_config','getMemberID','Solved','length','IConfigService','/list','OpenOrReOpen','comment','symbol','HTTPService','user','solved','/edit','root','forEach','_threadCommentModel','_httpService','threadId','getComment','post','error','51420PidXTU','format','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','body','/reply','Delete','users','CollaborationSessionService','code','onStarting','type','merge','Reply','1233evkPhA','_initUserSync','resolved','updateComment','UNIVER_UNKNOWN','IThreadCommentDataSourceService','Add','dayjs','_initDataSource','1528MWidjC','add','values','reply','bufferTime','Injector','UniverCollaborationClientPlugin','resolveComment','syncUpdateMutationToColla','userId','_configService','UserManagerService','disposeWithMe','onReady','defineProperty','12202uWrAOU','_injector','_commentService','2144120qlUqJB','replyId','_sessionService','Edit','32176jNmrId','CommentService','2325zsqTGj','/solved','customRanges','listComments'];_0x1f59=function(){return _0x513bd6;};return _0x1f59();}const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x5a3e92(0x134);var I=(_0x5b946e=>(_0x5b946e[_0x5b946e[_0x5a3e92(0x123)]=0x0]=_0x5a3e92(0x123),_0x5b946e[_0x5b946e[_0x5a3e92(0x11f)]=0x1]=_0x5a3e92(0x11f),_0x5b946e[_0x5b946e['UNRECOGNIZED']=-0x1]=_0x5a3e92(0xfa),_0x5b946e))(I||{}),v=(_0x3920b3=>(_0x3920b3[_0x3920b3['Unknown']=0x0]=_0x5a3e92(0x102),_0x3920b3[_0x3920b3[_0x5a3e92(0xd2)]=0x1]='Add',_0x3920b3[_0x3920b3['Reply']=0x2]='Reply',_0x3920b3[_0x3920b3[_0x5a3e92(0xea)]=0x3]=_0x5a3e92(0xea),_0x3920b3[_0x3920b3[_0x5a3e92(0x138)]=0x4]=_0x5a3e92(0x138),_0x3920b3[_0x3920b3[_0x5a3e92(0xf5)]=0x5]=_0x5a3e92(0xf5),_0x3920b3[_0x3920b3[_0x5a3e92(0xfa)]=-0x1]=_0x5a3e92(0xfa),_0x3920b3))(v||{});const f=_0x2dafeb=>c[_0x5a3e92(0xd3)](new Date(+_0x2dafeb))[_0x5a3e92(0x133)](_0x5a3e92(0xf6)),R=async(_0x5d2e9a,_0x5629c4)=>{const _0x34ef34=_0x5a3e92,_0x41d649=_0x5d2e9a['get'](c[_0x34ef34(0xe0)]),_0x4b8fd2=_0x5d2e9a[_0x34ef34(0x110)](P['HTTPService']);_0x5629c4[_0x34ef34(0x12b)](_0x278db5=>{_0x41d649['getUser'](_0x278db5)&&_0x5629c4['delete'](_0x278db5);}),_0x5629c4['size']&&(await _0x4b8fd2[_0x34ef34(0x110)](_0x34ef34(0x10f),{'params':{'userIDs':[..._0x5629c4]}}))[_0x34ef34(0x136)][_0x34ef34(0x139)]['forEach'](_0x3459f9=>{const _0x102be8=_0x34ef34;_0x3459f9&&_0x41d649[_0x102be8(0x119)](_0x3459f9);});};var $=Object[_0x5a3e92(0x109)],E=(_0x39b66f,_0x3b2649,_0x59b0ca,_0x201171)=>{for(var _0x117d3c=_0x201171>0x1?void 0x0:_0x201171?$(_0x3b2649,_0x59b0ca):_0x3b2649,_0x5296ae=_0x39b66f['length']-0x1,_0x259c7c;_0x5296ae>=0x0;_0x5296ae--)(_0x259c7c=_0x39b66f[_0x5296ae])&&(_0x117d3c=_0x259c7c(_0x117d3c)||_0x117d3c);return _0x117d3c;},S=(_0x20858f,_0x54bc45)=>(_0x1e2b65,_0x5208cf)=>_0x54bc45(_0x1e2b65,_0x5208cf,_0x20858f);let p=class extends c['Disposable']{constructor(_0x2b1deb,_0x50e5ce,_0x209ee3,_0xea51a9){const _0x336489=_0x5a3e92;super(),this['_commentService']=_0x2b1deb,this[_0x336489(0x12c)]=_0x50e5ce,this[_0x336489(0x111)]=_0x209ee3,this[_0x336489(0xe5)]=_0xea51a9,this['_init'](),this[_0x336489(0xcd)]();}['_initUserSync'](){const _0x2e6aaa=_0x5a3e92;this[_0x2e6aaa(0xe1)](this[_0x2e6aaa(0x12c)][_0x2e6aaa(0x100)]['pipe'](w[_0x2e6aaa(0xd9)](0x10))['subscribe'](_0x44b3a0=>{const _0x4df286=_0x2e6aaa,_0x3f4f1b=new Set();_0x44b3a0[_0x4df286(0x12b)](_0x549151=>{const _0x537985=_0x4df286;switch(_0x549151[_0x537985(0xc9)]){case _0x537985(0xd6):{const _0x22ef90=_0x549151[_0x537985(0x101)][_0x537985(0x10a)];_0x3f4f1b[_0x537985(0xd6)](_0x22ef90);break;}}}),R(this['_injector'],_0x3f4f1b);}));}[_0x5a3e92(0xfc)](){const _0x1502ad=_0x5a3e92;this[_0x1502ad(0xe1)](this[_0x1502ad(0xe6)]['commentUpdate$']['subscribe'](async _0x179117=>{const _0x35db77=_0x1502ad;var _0x433505,_0x915f66,_0xb4a0a3,_0x53b2a5;const _0x575051=(_0x433505=this['_threadCommentModel']['getUnit'](_0x179117['unitId'])['find'](_0x4b0cef=>_0x4b0cef[_0x35db77(0x12e)]===_0x179117[_0x35db77(0x12e)]))==null?void 0x0:_0x433505[_0x35db77(0x12a)];if(!_0x575051)return;const {unitId:_0xd99e2a,subUnitId:_0x402d47}=_0x575051;switch(_0x179117[_0x35db77(0x127)]&&this[_0x35db77(0x111)][_0x35db77(0x119)](_0x179117[_0x35db77(0x127)]),_0x179117[_0x35db77(0xc9)]){case v['Add']:break;case v[_0x35db77(0xcb)]:{this['_threadCommentModel']['addComment'](_0xd99e2a,_0x402d47,{'unitId':_0xd99e2a,'subUnitId':_0x402d47,'ref':'','id':_0x179117['replyId'],'dT':f(+_0x179117['createTimestamp']),'threadId':_0x179117[_0x35db77(0x12e)],'personId':(_0xb4a0a3=(_0x915f66=_0x179117[_0x35db77(0x127)])==null?void 0x0:_0x915f66[_0x35db77(0xf9)])!=null?_0xb4a0a3:_0x179117[_0x35db77(0xde)],'text':JSON[_0x35db77(0x11b)](_0x179117[_0x35db77(0x115)]),'parentId':_0x575051['id']});break;}case v[_0x35db77(0x138)]:{const _0x11532e=this[_0x35db77(0x12c)][_0x35db77(0x12f)](_0xd99e2a,_0x402d47,_0x179117[_0x35db77(0xe8)]);_0x11532e&&_0x11532e[_0x35db77(0xf7)]&&this[_0x35db77(0x12c)]['deleteComment'](_0xd99e2a,_0x402d47,_0x179117['replyId']);break;}case v['Edit']:{this[_0x35db77(0x12c)][_0x35db77(0xcf)](_0xd99e2a,_0x402d47,{'commentId':_0x179117[_0x35db77(0xe8)],'text':JSON[_0x35db77(0x11b)](_0x179117[_0x35db77(0x115)])});break;}case v[_0x35db77(0xf5)]:{const _0x524986=(_0x53b2a5=this[_0x35db77(0x12c)][_0x35db77(0xfb)](_0x179117[_0x35db77(0x10b)])['find'](_0x5e6ac1=>_0x5e6ac1[_0x35db77(0x12e)]===_0x179117[_0x35db77(0x12e)]))==null?void 0x0:_0x53b2a5[_0x35db77(0x12a)];_0x524986&&this[_0x35db77(0x12c)][_0x35db77(0xdc)](_0xd99e2a,_0x402d47,_0x524986['id'],_0x179117[_0x35db77(0x128)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x5a3e92(0xf8)](b[_0x5a3e92(0xec)])),S(0x1,c[_0x5a3e92(0xf8)](M[_0x5a3e92(0xfd)])),S(0x2,c[_0x5a3e92(0xf8)](c['UserManagerService'])),S(0x3,c[_0x5a3e92(0xf8)](c[_0x5a3e92(0xda)]))],p);const q=_0x5a3e92(0x10d),D={};var A=Object[_0x5a3e92(0x109)],x=(_0x304227,_0xb04feb,_0x2e7e1a,_0x19301d)=>{const _0x26e057=_0x5a3e92;for(var _0x47adf1=_0x19301d>0x1?void 0x0:_0x19301d?A(_0xb04feb,_0x2e7e1a):_0xb04feb,_0x198127=_0x304227[_0x26e057(0x120)]-0x1,_0x30ca00;_0x198127>=0x0;_0x198127--)(_0x30ca00=_0x304227[_0x198127])&&(_0x47adf1=_0x30ca00(_0x47adf1)||_0x47adf1);return _0x47adf1;},_=(_0x6a0445,_0x1631c4)=>(_0x2be810,_0xaefe6a)=>_0x1631c4(_0x2be810,_0xaefe6a,_0x6a0445);function Y(_0x420919,_0x596ee6){const _0x2aac8a=_0x5a3e92,_0x3427c9=_0x420919['replies'][0x0];return{..._0x596ee6,'id':_0x3427c9[_0x2aac8a(0xe8)],'resolved':_0x420919[_0x2aac8a(0x128)]===0x1,'dT':f(_0x3427c9[_0x2aac8a(0x107)]),'personId':_0x3427c9[_0x2aac8a(0xde)],'threadId':_0x3427c9[_0x2aac8a(0x12e)]};}function G(_0x5f0c71,_0x1ca32d,_0x541d6a){const _0x2708df=_0x5a3e92;var _0x16eff2,_0x33676e;if(((_0x33676e=(_0x16eff2=_0x5f0c71==null?void 0x0:_0x5f0c71[_0x2708df(0x112)])==null?void 0x0:_0x16eff2[_0x2708df(0x120)])!=null?_0x33676e:0x0)>0x0){const _0x31f0cc=(_0x4062fe,_0x1f90c4)=>({'id':_0x4062fe[_0x2708df(0xe8)],'threadId':_0x4062fe[_0x2708df(0x12e)],'dT':f(_0x4062fe[_0x2708df(0x107)]),'personId':_0x4062fe[_0x2708df(0xde)],'resolved':_0x5f0c71[_0x2708df(0x128)]===I['Solved'],'unitId':_0x1ca32d,'subUnitId':_0x541d6a,'text':JSON['parse'](_0x4062fe['content']),'parentId':_0x1f90c4}),_0x340274=_0x31f0cc(_0x5f0c71[_0x2708df(0x112)][0x0]);return{..._0x340274,'children':_0x5f0c71[_0x2708df(0x112)]['slice'](0x1)['map'](_0x43a705=>_0x31f0cc(_0x43a705,_0x340274['id']))};}return null;}let g=class{constructor(_0x220f9b,_0x33f8c2,_0x1a294c,_0x6d34d0){const _0x41b863=_0x5a3e92;this['_httpService']=_0x220f9b,this[_0x41b863(0x111)]=_0x33f8c2,this['_sessionService']=_0x1a294c,this[_0x41b863(0xe5)]=_0x6d34d0;}async[_0x5a3e92(0x10c)](_0x484d36){const _0x3b914f=_0x5a3e92;var _0x36836d,_0x41cee6;const {parentId:_0x304bd7,unitId:_0x447d54,text:_0x8942ed,threadId:_0x4ca339}=_0x484d36,_0x2be604=(_0x41cee6=(_0x36836d=_0x8942ed[_0x3b914f(0xef)])==null?void 0x0:_0x36836d[_0x3b914f(0xf1)](_0x1dac63=>_0x1dac63['rangeType']===c[_0x3b914f(0x106)]['COMMENT'])['map'](_0x3e9c3c=>_0x3e9c3c[_0x3b914f(0x10e)]))!=null?_0x41cee6:[],_0x430a50=JSON[_0x3b914f(0x105)](_0x8942ed),_0x58d899=(await this[_0x3b914f(0xe9)][_0x3b914f(0x135)](_0x447d54))[_0x3b914f(0x11e)]();if(_0x304bd7){const _0x4d1007={'memberId':_0x58d899,'unitId':_0x447d54,'content':_0x430a50,'mention':_0x2be604,'threadId':_0x4ca339},_0x590108=(await this[_0x3b914f(0x12d)][_0x3b914f(0x130)](_0x3b914f(0x108)+_0x447d54+_0x3b914f(0x137),{'body':_0x4d1007}))['body'][_0x3b914f(0xd8)];return{..._0x484d36,'id':_0x590108[_0x3b914f(0xe8)],'dT':c[_0x3b914f(0xd3)](+_0x590108['createTimestamp'])[_0x3b914f(0x133)](_0x3b914f(0xf6)),'personId':_0x590108[_0x3b914f(0xde)]};}else{const _0x117b1f={'memberId':_0x58d899,'unitId':_0x447d54,'content':_0x430a50,'mention':_0x2be604},_0xd3701c=await this[_0x3b914f(0x12d)]['post'](_0x3b914f(0x108)+_0x447d54+_0x3b914f(0xf2),{'body':_0x117b1f});return Y(_0xd3701c[_0x3b914f(0x136)][_0x3b914f(0x124)],_0x484d36);}}async[_0x5a3e92(0xcf)](_0x1695df){const _0x5e4a60=_0x5a3e92;var _0x4898d3,_0x4302f6;const {text:_0xeaaaf3,unitId:_0x239578}=_0x1695df,_0x263e13=(_0x4302f6=(_0x4898d3=_0xeaaaf3[_0x5e4a60(0xef)])==null?void 0x0:_0x4898d3['filter'](_0x33db7c=>_0x33db7c[_0x5e4a60(0x11a)]===c[_0x5e4a60(0x106)]['COMMENT'])[_0x5e4a60(0xff)](_0x3c783f=>_0x3c783f[_0x5e4a60(0x10e)]))!=null?_0x4302f6:[],_0x5f21cb=JSON['stringify'](_0xeaaaf3),_0x249f39=_0x1695df[_0x5e4a60(0x12e)],_0x459172=_0x1695df['id'],_0x2610b9={'memberId':(await this[_0x5e4a60(0xe9)][_0x5e4a60(0x135)](_0x239578))['getMemberID'](),'unitId':_0x239578,'threadId':_0x249f39,'mention':_0x263e13,'content':_0x5f21cb,'replyId':_0x459172},_0x52a463=await this[_0x5e4a60(0x12d)][_0x5e4a60(0x130)]('/universer-api/comment/unit/'+_0x239578+_0x5e4a60(0x129),{'body':_0x2610b9});return!_0x52a463[_0x5e4a60(0x136)][_0x5e4a60(0x131)]||_0x52a463['body']['error'][_0x5e4a60(0xc7)]===0x1;}async[_0x5a3e92(0xdc)](_0x77e6ef){const _0x24fbe6=_0x5a3e92,{unitId:_0x3c096b}=_0x77e6ef,_0xc07df6=_0x77e6ef[_0x24fbe6(0x12e)],_0x2a792d={'memberId':this['_userService']['getCurrentUser']()[_0x24fbe6(0xf9)],'unitId':_0x3c096b,'threadId':_0xc07df6,'solved':_0x77e6ef[_0x24fbe6(0xce)]?I[_0x24fbe6(0x11f)]:I[_0x24fbe6(0x123)]},_0x2cd2e4=await this[_0x24fbe6(0x12d)]['post'](_0x24fbe6(0x108)+_0x3c096b+_0x24fbe6(0xee),{'body':_0x2a792d});return!_0x2cd2e4[_0x24fbe6(0x136)][_0x24fbe6(0x131)]||_0x2cd2e4['body'][_0x24fbe6(0x131)][_0x24fbe6(0xc7)]===0x1;}async['deleteComment'](_0x25d9e5,_0x509fa4,_0x121d97,_0x4ee619){const _0x5b8865=_0x5a3e92,_0xbde299={'memberId':(await this[_0x5b8865(0xe9)][_0x5b8865(0x135)](_0x25d9e5))[_0x5b8865(0x11e)](),'threadId':_0x121d97,'replyId':_0x4ee619,'unitId':_0x25d9e5},_0x129d63=await this['_httpService']['post'](_0x5b8865(0x108)+_0x25d9e5+_0x5b8865(0x114),{'body':_0xbde299});return!_0x129d63['body'][_0x5b8865(0x131)]||_0x129d63[_0x5b8865(0x136)][_0x5b8865(0x131)][_0x5b8865(0xc7)]===0x1;}async[_0x5a3e92(0xf0)](_0xcf4615,_0x76f88d,_0x11e8d1){const _0x15f16c=_0x5a3e92,_0x3026e0={'unitId':_0xcf4615,'threadId':_0x11e8d1},_0x3b766a=await this['_httpService'][_0x15f16c(0x130)]('/universer-api/comment/unit/'+_0xcf4615+_0x15f16c(0x122),{'body':_0x3026e0}),_0x53af8a=_0x11e8d1[_0x15f16c(0xff)](_0x8b07d2=>G(_0x3b766a['body']['comments'][_0x8b07d2],_0xcf4615,_0x76f88d))[_0x15f16c(0xf1)](Boolean);return Object[_0x15f16c(0xd7)](_0x3b766a['body']['users'])['forEach'](_0x1e4415=>{const _0x37eaf9=_0x15f16c;this['_userService'][_0x37eaf9(0x119)](_0x1e4415);}),_0x53af8a;}[_0x5a3e92(0xfe)](_0x4ecd9f){const _0x54c3bf=_0x5a3e92;return{'id':_0x4ecd9f['id'],'threadId':_0x4ecd9f[_0x54c3bf(0x12e)],'ref':_0x4ecd9f['ref']};}};g=x([_(0x0,c[_0x5a3e92(0xf8)](P[_0x5a3e92(0x126)])),_(0x1,c['Inject'](c[_0x5a3e92(0xe0)])),_(0x2,c['Inject'](b[_0x5a3e92(0xc6)])),_(0x3,c['Inject'](c[_0x5a3e92(0xda)]))],g);var H=Object[_0x5a3e92(0x109)],J=(_0x1bfdc1,_0x2b0f58,_0x555418,_0x4d5771)=>{for(var _0x574640=_0x4d5771>0x1?void 0x0:_0x4d5771?H(_0x2b0f58,_0x555418):_0x2b0f58,_0x12be26=_0x1bfdc1['length']-0x1,_0x226fe6;_0x12be26>=0x0;_0x12be26--)(_0x226fe6=_0x1bfdc1[_0x12be26])&&(_0x574640=_0x226fe6(_0x574640)||_0x574640);return _0x574640;},y=(_0x1fc21b,_0x541afb)=>(_0x2a7283,_0x2f5684)=>_0x541afb(_0x2a7283,_0x2f5684,_0x1fc21b);let C=class extends c[_0x5a3e92(0x11c)]{constructor(_0x33ee6e,_0x19a30d){const _0x11b581=_0x5a3e92;super(),this[_0x11b581(0x116)]=_0x33ee6e,this[_0x11b581(0x113)]=_0x19a30d,this['_initDataSource']();}[_0x5a3e92(0xd4)](){const _0x1f6318=_0x5a3e92;this['_threadCommentDataSourceService']['dataSource']=this[_0x1f6318(0x113)],this[_0x1f6318(0x116)][_0x1f6318(0xdd)]=!0x1;}};C=J([y(0x0,M[_0x5a3e92(0xd1)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x5a3e92(0xe3)],L=Object['getOwnPropertyDescriptor'],Z=(_0x2d5723,_0x4953ea,_0x6682db)=>_0x4953ea in _0x2d5723?F(_0x2d5723,_0x4953ea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6682db}):_0x2d5723[_0x4953ea]=_0x6682db,W=(_0x842501,_0x64103c,_0x212d41,_0x56bf75)=>{const _0x128d8f=_0x5a3e92;for(var _0x45b4d5=_0x56bf75>0x1?void 0x0:_0x56bf75?L(_0x64103c,_0x212d41):_0x64103c,_0x58004a=_0x842501[_0x128d8f(0x120)]-0x1,_0x2ffbb1;_0x58004a>=0x0;_0x58004a--)(_0x2ffbb1=_0x842501[_0x58004a])&&(_0x45b4d5=_0x2ffbb1(_0x45b4d5)||_0x45b4d5);return _0x45b4d5;},O=(_0x68917a,_0x149967)=>(_0x513f45,_0x4ffab2)=>_0x149967(_0x513f45,_0x4ffab2,_0x68917a),N=(_0x3ad275,_0x4875fa,_0x1757ff)=>Z(_0x3ad275,typeof _0x4875fa!=_0x5a3e92(0x125)?_0x4875fa+'':_0x4875fa,_0x1757ff);exports[_0x5a3e92(0x117)]=class extends c['Plugin']{constructor(_0x48bbf8=D,_0x1f16ba,_0x928626){const _0xb13038=_0x5a3e92;super(),this[_0xb13038(0x11d)]=_0x48bbf8,this['_injector']=_0x1f16ba,this[_0xb13038(0xdf)]=_0x928626;const {..._0x4bccdb}=c[_0xb13038(0xca)]({},D,this['_config']);this[_0xb13038(0xdf)]['setConfig'](q,_0x4bccdb);}[_0x5a3e92(0xc8)](){const _0xbb7f6=_0x5a3e92;[[g],[C],[p]][_0xbb7f6(0x12b)](_0x357316=>{const _0x598499=_0xbb7f6;this[_0x598499(0xe5)][_0x598499(0xd6)](_0x357316);});}[_0x5a3e92(0xe2)](){const _0x1802a3=_0x5a3e92;this[_0x1802a3(0xe5)][_0x1802a3(0x110)](C),this['_injector'][_0x1802a3(0x110)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x5a3e92(0x117)],_0x5a3e92(0xc9),c['UniverInstanceType'][_0x5a3e92(0xd0)]),exports[_0x5a3e92(0x117)]=W([c['DependentOn'](j[_0x5a3e92(0xf3)],b[_0x5a3e92(0xdb)],T['UniverLicensePlugin']),O(0x1,c[_0x5a3e92(0xf8)](c['Injector'])),O(0x2,c[_0x5a3e92(0x121)])],exports[_0x5a3e92(0x117)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1b47a9=_0x124b;(function(_0x1408a1,_0x2c6ce2){const _0x3d0917=_0x124b,_0x165aa9=_0x1408a1();while(!![]){try{const _0x4d02f0=parseInt(_0x3d0917(0x16b))/0x1+-parseInt(_0x3d0917(0x166))/0x2*(-parseInt(_0x3d0917(0x179))/0x3)+parseInt(_0x3d0917(0x156))/0x4+parseInt(_0x3d0917(0x12a))/0x5+-parseInt(_0x3d0917(0x146))/0x6*(parseInt(_0x3d0917(0x170))/0x7)+-parseInt(_0x3d0917(0x159))/0x8*(-parseInt(_0x3d0917(0x162))/0x9)+parseInt(_0x3d0917(0x16c))/0xa*(-parseInt(_0x3d0917(0x147))/0xb);if(_0x4d02f0===_0x2c6ce2)break;else _0x165aa9['push'](_0x165aa9['shift']());}catch(_0xfe2161){_0x165aa9['push'](_0x165aa9['shift']());}}}(_0x1078,0x76658));import{CommentService as _0x3c4083,CollaborationSessionService as _0x2ae918,UniverCollaborationClientPlugin as _0x3a519b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4ef8f5}from'@univerjs-pro/license';import{dayjs as _0x4bf675,UserManagerService as _0x571c24,Inject as _0x113128,Injector as _0x59dbaa,Disposable as _0x434d24,CustomRangeType as _0x59c86f,UniverInstanceType as _0x1ce2d1,DependentOn as _0x8a9abb,IConfigService as _0x575a65,Plugin as _0x5b100b,merge as _0x4ebc5a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x18e6d7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x656ab3,IThreadCommentDataSourceService as _0x5e6fac}from'@univerjs/thread-comment';import{bufferTime as _0x4c390f}from'rxjs';import{HTTPService as _0x4b42b5}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x17bfe8=>(_0x17bfe8[_0x17bfe8[_0x1b47a9(0x17b)]=0x0]=_0x1b47a9(0x17b),_0x17bfe8[_0x17bfe8[_0x1b47a9(0x142)]=0x1]=_0x1b47a9(0x142),_0x17bfe8[_0x17bfe8[_0x1b47a9(0x14b)]=-0x1]=_0x1b47a9(0x14b),_0x17bfe8))(I||{}),v=(_0x5d2623=>(_0x5d2623[_0x5d2623['Unknown']=0x0]='Unknown',_0x5d2623[_0x5d2623[_0x1b47a9(0x136)]=0x1]='Add',_0x5d2623[_0x5d2623[_0x1b47a9(0x149)]=0x2]=_0x1b47a9(0x149),_0x5d2623[_0x5d2623[_0x1b47a9(0x133)]=0x3]=_0x1b47a9(0x133),_0x5d2623[_0x5d2623[_0x1b47a9(0x13a)]=0x4]=_0x1b47a9(0x13a),_0x5d2623[_0x5d2623['Solve']=0x5]=_0x1b47a9(0x17f),_0x5d2623[_0x5d2623[_0x1b47a9(0x14b)]=-0x1]=_0x1b47a9(0x14b),_0x5d2623))(v||{});const D=_0x24b4b9=>_0x4bf675(new Date(+_0x24b4b9))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x41edec,_0x2df88d)=>{const _0x43f763=_0x1b47a9,_0x425b3f=_0x41edec[_0x43f763(0x180)](_0x571c24),_0x4351ff=_0x41edec[_0x43f763(0x180)](_0x4b42b5);_0x2df88d[_0x43f763(0x132)](_0x50b0e2=>{const _0x2a286b=_0x43f763;_0x425b3f[_0x2a286b(0x183)](_0x50b0e2)&&_0x2df88d['delete'](_0x50b0e2);}),_0x2df88d['size']&&(await _0x4351ff['get'](_0x43f763(0x169),{'params':{'userIDs':[..._0x2df88d]}}))[_0x43f763(0x174)][_0x43f763(0x140)][_0x43f763(0x132)](_0x260e2b=>{const _0x3598f1=_0x43f763;_0x260e2b&&_0x425b3f[_0x3598f1(0x165)](_0x260e2b);});};var K=Object[_0x1b47a9(0x14c)],V=(_0x331caf,_0x4fb274,_0x4949c4,_0x285b94)=>{const _0x1158e8=_0x1b47a9;for(var _0x8e58dc=_0x285b94>0x1?void 0x0:_0x285b94?K(_0x4fb274,_0x4949c4):_0x4fb274,_0x5d1558=_0x331caf[_0x1158e8(0x137)]-0x1,_0x285046;_0x5d1558>=0x0;_0x5d1558--)(_0x285046=_0x331caf[_0x5d1558])&&(_0x8e58dc=_0x285046(_0x8e58dc)||_0x8e58dc);return _0x8e58dc;},p=(_0x4b234c,_0x307f76)=>(_0x24f8b8,_0x4be3c7)=>_0x307f76(_0x24f8b8,_0x4be3c7,_0x4b234c);let S=class extends _0x434d24{constructor(_0x46160f,_0x2384e2,_0x104f20,_0x58c874){const _0x12eee3=_0x1b47a9;super(),this[_0x12eee3(0x167)]=_0x46160f,this[_0x12eee3(0x16e)]=_0x2384e2,this['_userService']=_0x104f20,this[_0x12eee3(0x151)]=_0x58c874,this[_0x12eee3(0x13d)](),this[_0x12eee3(0x18a)]();}[_0x1b47a9(0x18a)](){const _0x645c7d=_0x1b47a9;this[_0x645c7d(0x143)](this[_0x645c7d(0x16e)]['commentUpdate$'][_0x645c7d(0x14f)](_0x4c390f(0x10))[_0x645c7d(0x139)](_0x2d3b68=>{const _0x4fe041=_0x645c7d,_0x53cb17=new Set();_0x2d3b68[_0x4fe041(0x132)](_0x5f57db=>{const _0x27aa12=_0x4fe041;switch(_0x5f57db['type']){case'add':{const _0x5c6029=_0x5f57db['payload'][_0x27aa12(0x12e)];_0x53cb17[_0x27aa12(0x164)](_0x5c6029);break;}}}),B(this[_0x4fe041(0x151)],_0x53cb17);}));}['_init'](){const _0x5eb9af=_0x1b47a9;this[_0x5eb9af(0x143)](this[_0x5eb9af(0x167)][_0x5eb9af(0x15e)]['subscribe'](async _0x2645b9=>{const _0x5e46c5=_0x5eb9af;var _0x35ad58,_0x430761,_0x5d9380,_0xa36b2d;const _0x18888d=(_0x35ad58=this['_threadCommentModel'][_0x5e46c5(0x153)](_0x2645b9[_0x5e46c5(0x187)])[_0x5e46c5(0x17a)](_0xdac173=>_0xdac173[_0x5e46c5(0x13c)]===_0x2645b9[_0x5e46c5(0x13c)]))==null?void 0x0:_0x35ad58['root'];if(!_0x18888d)return;const {unitId:_0x53990f,subUnitId:_0x5cf4c3}=_0x18888d;switch(_0x2645b9[_0x5e46c5(0x188)]&&this[_0x5e46c5(0x157)][_0x5e46c5(0x165)](_0x2645b9[_0x5e46c5(0x188)]),_0x2645b9[_0x5e46c5(0x168)]){case v[_0x5e46c5(0x136)]:break;case v['Reply']:{this['_threadCommentModel'][_0x5e46c5(0x171)](_0x53990f,_0x5cf4c3,{'unitId':_0x53990f,'subUnitId':_0x5cf4c3,'ref':'','id':_0x2645b9[_0x5e46c5(0x185)],'dT':D(+_0x2645b9[_0x5e46c5(0x12f)]),'threadId':_0x2645b9[_0x5e46c5(0x13c)],'personId':(_0x5d9380=(_0x430761=_0x2645b9[_0x5e46c5(0x188)])==null?void 0x0:_0x430761[_0x5e46c5(0x14a)])!=null?_0x5d9380:_0x2645b9[_0x5e46c5(0x13b)],'text':JSON[_0x5e46c5(0x18b)](_0x2645b9[_0x5e46c5(0x150)]),'parentId':_0x18888d['id']});break;}case v[_0x5e46c5(0x13a)]:{const _0x1a85bd=this[_0x5e46c5(0x16e)][_0x5e46c5(0x161)](_0x53990f,_0x5cf4c3,_0x2645b9[_0x5e46c5(0x185)]);_0x1a85bd&&_0x1a85bd[_0x5e46c5(0x15f)]&&this[_0x5e46c5(0x16e)][_0x5e46c5(0x145)](_0x53990f,_0x5cf4c3,_0x2645b9[_0x5e46c5(0x185)]);break;}case v['Edit']:{this[_0x5e46c5(0x16e)][_0x5e46c5(0x12c)](_0x53990f,_0x5cf4c3,{'commentId':_0x2645b9['replyId'],'text':JSON[_0x5e46c5(0x18b)](_0x2645b9['content'])});break;}case v['Solve']:{const _0x5991eb=(_0xa36b2d=this[_0x5e46c5(0x16e)]['getUnit'](_0x2645b9[_0x5e46c5(0x187)])[_0x5e46c5(0x17a)](_0xa100fb=>_0xa100fb[_0x5e46c5(0x13c)]===_0x2645b9[_0x5e46c5(0x13c)]))==null?void 0x0:_0xa36b2d['root'];_0x5991eb&&this[_0x5e46c5(0x16e)]['resolveComment'](_0x53990f,_0x5cf4c3,_0x5991eb['id'],_0x2645b9[_0x5e46c5(0x181)]===I[_0x5e46c5(0x142)]);break;}}}));}};S=V([p(0x0,_0x113128(_0x3c4083)),p(0x1,_0x113128(_0x656ab3)),p(0x2,_0x113128(_0x571c24)),p(0x3,_0x113128(_0x59dbaa))],S);const z=_0x1b47a9(0x15b),M={};var k=Object[_0x1b47a9(0x14c)],Q=(_0xb999c0,_0x2ee177,_0x5f3de2,_0x588de5)=>{for(var _0x48e4c1=_0x588de5>0x1?void 0x0:_0x588de5?k(_0x2ee177,_0x5f3de2):_0x2ee177,_0xd1d785=_0xb999c0['length']-0x1,_0x483119;_0xd1d785>=0x0;_0xd1d785--)(_0x483119=_0xb999c0[_0xd1d785])&&(_0x48e4c1=_0x483119(_0x48e4c1)||_0x48e4c1);return _0x48e4c1;},_=(_0x52cda2,_0x8d120e)=>(_0x3604f2,_0x49eb53)=>_0x8d120e(_0x3604f2,_0x49eb53,_0x52cda2);function _0x1078(){const _0x21f48d=['length','comment','subscribe','Delete','userId','threadId','_init','ref','/reply','users','saveCommentToSnapshot','Solved','disposeWithMe','getMemberID','deleteComment','16266qGfYTQ','264kTZotR','symbol','Reply','userID','UNRECOGNIZED','getOwnPropertyDescriptor','listComments','values','pipe','content','_injector','error','getUnit','requireSession','reply','3139272lxGjsh','_userService','_sessionService','3166168fNLdNd','code','thread-comment-data-source.config','format','post','commentUpdate$','parentId','/universer-api/comment/unit/','getComment','18YvJMwz','_config','add','addUser','26Ujyzeo','_commentService','type','/universer-api/user/list','rangeId','388256zjzrzm','1014080uqDzpX','onStarting','_threadCommentModel','COMMENT','133uHGCTn','addComment','filter','customRanges','body','/list','rangeType','replies','_threadCommentDataSourceService','40530lKjasH','find','OpenOrReOpen','/delete','resolveComment','map','Solve','get','solved','UNIVER_UNKNOWN','getUser','onReady','replyId','_threadCommentDataSource','unitId','user','pluginName','_initUserSync','parse','defineProperty','/edit','4150035pzosFe','YYYY/MM/DD\x20HH:mm','updateComment','_configService','personId','createTimestamp','resolved','_httpService','forEach','Edit','stringify','comments','Add'];_0x1078=function(){return _0x21f48d;};return _0x1078();}function X(_0x3384a0,_0x1e30ec){const _0x1527a6=_0x1b47a9,_0x25d1ed=_0x3384a0[_0x1527a6(0x177)][0x0];return{..._0x1e30ec,'id':_0x25d1ed[_0x1527a6(0x185)],'resolved':_0x3384a0['solved']===0x1,'dT':D(_0x25d1ed['createTimestamp']),'personId':_0x25d1ed[_0x1527a6(0x13b)],'threadId':_0x25d1ed[_0x1527a6(0x13c)]};}function ee(_0x1d7063,_0x13bfb3,_0x515b2f){const _0x34571b=_0x1b47a9;var _0x532f15,_0xfe0932;if(((_0xfe0932=(_0x532f15=_0x1d7063==null?void 0x0:_0x1d7063[_0x34571b(0x177)])==null?void 0x0:_0x532f15[_0x34571b(0x137)])!=null?_0xfe0932:0x0)>0x0){const _0x46c30b=(_0x578d94,_0x4949b1)=>({'id':_0x578d94[_0x34571b(0x185)],'threadId':_0x578d94[_0x34571b(0x13c)],'dT':D(_0x578d94['createTimestamp']),'personId':_0x578d94[_0x34571b(0x13b)],'resolved':_0x1d7063[_0x34571b(0x181)]===I[_0x34571b(0x142)],'unitId':_0x13bfb3,'subUnitId':_0x515b2f,'text':JSON[_0x34571b(0x18b)](_0x578d94['content']),'parentId':_0x4949b1}),_0x55554b=_0x46c30b(_0x1d7063[_0x34571b(0x177)][0x0]);return{..._0x55554b,'children':_0x1d7063[_0x34571b(0x177)]['slice'](0x1)[_0x34571b(0x17e)](_0x3797ad=>_0x46c30b(_0x3797ad,_0x55554b['id']))};}return null;}let f=class{constructor(_0xd7d389,_0x5170f1,_0xba759f,_0x2f555d){const _0xac69f6=_0x1b47a9;this[_0xac69f6(0x131)]=_0xd7d389,this['_userService']=_0x5170f1,this['_sessionService']=_0xba759f,this[_0xac69f6(0x151)]=_0x2f555d;}async[_0x1b47a9(0x171)](_0x437b36){const _0x492901=_0x1b47a9;var _0x14a6a0,_0x2d42e8;const {parentId:_0x59a8aa,unitId:_0x43e6a2,text:_0x53a797,threadId:_0x200249}=_0x437b36,_0x330226=(_0x2d42e8=(_0x14a6a0=_0x53a797[_0x492901(0x173)])==null?void 0x0:_0x14a6a0[_0x492901(0x172)](_0x4dd281=>_0x4dd281[_0x492901(0x176)]===_0x59c86f[_0x492901(0x16f)])[_0x492901(0x17e)](_0x3c51c3=>_0x3c51c3[_0x492901(0x16a)]))!=null?_0x2d42e8:[],_0x2b7661=JSON[_0x492901(0x134)](_0x53a797),_0x1d9c91=(await this[_0x492901(0x158)]['requireSession'](_0x43e6a2))[_0x492901(0x144)]();if(_0x59a8aa){const _0x206c38={'memberId':_0x1d9c91,'unitId':_0x43e6a2,'content':_0x2b7661,'mention':_0x330226,'threadId':_0x200249},_0x2c03f1=(await this[_0x492901(0x131)]['post'](_0x492901(0x160)+_0x43e6a2+_0x492901(0x13f),{'body':_0x206c38}))[_0x492901(0x174)][_0x492901(0x155)];return{..._0x437b36,'id':_0x2c03f1['replyId'],'dT':_0x4bf675(+_0x2c03f1[_0x492901(0x12f)])[_0x492901(0x15c)](_0x492901(0x12b)),'personId':_0x2c03f1[_0x492901(0x13b)]};}else{const _0x3d1b2d={'memberId':_0x1d9c91,'unitId':_0x43e6a2,'content':_0x2b7661,'mention':_0x330226},_0xed89b4=await this[_0x492901(0x131)][_0x492901(0x15d)]('/universer-api/comment/unit/'+_0x43e6a2+'/add',{'body':_0x3d1b2d});return X(_0xed89b4[_0x492901(0x174)][_0x492901(0x138)],_0x437b36);}}async[_0x1b47a9(0x12c)](_0xafc3d6){const _0x2f89cc=_0x1b47a9;var _0x394edb,_0x487bfa;const {text:_0x2f57e6,unitId:_0x356a2d}=_0xafc3d6,_0x3d0c33=(_0x487bfa=(_0x394edb=_0x2f57e6[_0x2f89cc(0x173)])==null?void 0x0:_0x394edb[_0x2f89cc(0x172)](_0x4f9172=>_0x4f9172[_0x2f89cc(0x176)]===_0x59c86f[_0x2f89cc(0x16f)])[_0x2f89cc(0x17e)](_0x4751a8=>_0x4751a8['rangeId']))!=null?_0x487bfa:[],_0x527833=JSON[_0x2f89cc(0x134)](_0x2f57e6),_0x8e5aa5=_0xafc3d6[_0x2f89cc(0x13c)],_0x14177e=_0xafc3d6['id'],_0x8ef920={'memberId':(await this[_0x2f89cc(0x158)][_0x2f89cc(0x154)](_0x356a2d))[_0x2f89cc(0x144)](),'unitId':_0x356a2d,'threadId':_0x8e5aa5,'mention':_0x3d0c33,'content':_0x527833,'replyId':_0x14177e},_0x388dc4=await this[_0x2f89cc(0x131)]['post'](_0x2f89cc(0x160)+_0x356a2d+_0x2f89cc(0x129),{'body':_0x8ef920});return!_0x388dc4[_0x2f89cc(0x174)][_0x2f89cc(0x152)]||_0x388dc4[_0x2f89cc(0x174)][_0x2f89cc(0x152)][_0x2f89cc(0x15a)]===0x1;}async[_0x1b47a9(0x17d)](_0xe3bac4){const _0x199eb9=_0x1b47a9,{unitId:_0x294724}=_0xe3bac4,_0x2645e3=_0xe3bac4['threadId'],_0x21caae={'memberId':this[_0x199eb9(0x157)]['getCurrentUser']()['userID'],'unitId':_0x294724,'threadId':_0x2645e3,'solved':_0xe3bac4[_0x199eb9(0x130)]?I[_0x199eb9(0x142)]:I[_0x199eb9(0x17b)]},_0xbfbc0=await this[_0x199eb9(0x131)][_0x199eb9(0x15d)](_0x199eb9(0x160)+_0x294724+'/solved',{'body':_0x21caae});return!_0xbfbc0[_0x199eb9(0x174)]['error']||_0xbfbc0[_0x199eb9(0x174)][_0x199eb9(0x152)][_0x199eb9(0x15a)]===0x1;}async['deleteComment'](_0x253e02,_0x45ee23,_0x4195ec,_0x3d1092){const _0x407fdd=_0x1b47a9,_0x24adc9={'memberId':(await this[_0x407fdd(0x158)][_0x407fdd(0x154)](_0x253e02))[_0x407fdd(0x144)](),'threadId':_0x4195ec,'replyId':_0x3d1092,'unitId':_0x253e02},_0x2c57eb=await this[_0x407fdd(0x131)]['post'](_0x407fdd(0x160)+_0x253e02+_0x407fdd(0x17c),{'body':_0x24adc9});return!_0x2c57eb['body']['error']||_0x2c57eb['body'][_0x407fdd(0x152)][_0x407fdd(0x15a)]===0x1;}async[_0x1b47a9(0x14d)](_0x11c094,_0x25eeea,_0x2b5a89){const _0x10647d=_0x1b47a9,_0x397229={'unitId':_0x11c094,'threadId':_0x2b5a89},_0x31ad5f=await this['_httpService']['post'](_0x10647d(0x160)+_0x11c094+_0x10647d(0x175),{'body':_0x397229}),_0xc95385=_0x2b5a89[_0x10647d(0x17e)](_0x4dd222=>ee(_0x31ad5f[_0x10647d(0x174)][_0x10647d(0x135)][_0x4dd222],_0x11c094,_0x25eeea))[_0x10647d(0x172)](Boolean);return Object[_0x10647d(0x14e)](_0x31ad5f['body'][_0x10647d(0x140)])[_0x10647d(0x132)](_0x1ef004=>{const _0x32d1a7=_0x10647d;this['_userService'][_0x32d1a7(0x165)](_0x1ef004);}),_0xc95385;}[_0x1b47a9(0x141)](_0x29293e){const _0x3bd35d=_0x1b47a9;return{'id':_0x29293e['id'],'threadId':_0x29293e['threadId'],'ref':_0x29293e[_0x3bd35d(0x13e)]};}};f=Q([_(0x0,_0x113128(_0x4b42b5)),_(0x1,_0x113128(_0x571c24)),_(0x2,_0x113128(_0x2ae918)),_(0x3,_0x113128(_0x59dbaa))],f);var re=Object[_0x1b47a9(0x14c)],te=(_0x49d31e,_0x2a2084,_0x42b57d,_0x3ea695)=>{const _0x1be6f3=_0x1b47a9;for(var _0x13e953=_0x3ea695>0x1?void 0x0:_0x3ea695?re(_0x2a2084,_0x42b57d):_0x2a2084,_0x45ee68=_0x49d31e[_0x1be6f3(0x137)]-0x1,_0x5b2cc4;_0x45ee68>=0x0;_0x45ee68--)(_0x5b2cc4=_0x49d31e[_0x45ee68])&&(_0x13e953=_0x5b2cc4(_0x13e953)||_0x13e953);return _0x13e953;},N=(_0x4cad79,_0x5b61c3)=>(_0x313213,_0x2dec8f)=>_0x5b61c3(_0x313213,_0x2dec8f,_0x4cad79);let g=class extends _0x434d24{constructor(_0x3ff894,_0x2f0269){const _0x6bfc3d=_0x1b47a9;super(),this[_0x6bfc3d(0x178)]=_0x3ff894,this[_0x6bfc3d(0x186)]=_0x2f0269,this['_initDataSource']();}['_initDataSource'](){const _0x3acc06=_0x1b47a9;this['_threadCommentDataSourceService']['dataSource']=this[_0x3acc06(0x186)],this[_0x3acc06(0x178)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x5e6fac),N(0x1,_0x113128(f))],g);function _0x124b(_0x420d37,_0x4a2db5){const _0x107845=_0x1078();return _0x124b=function(_0x124bf7,_0x11fe76){_0x124bf7=_0x124bf7-0x128;let _0x248c88=_0x107845[_0x124bf7];return _0x248c88;},_0x124b(_0x420d37,_0x4a2db5);}var se=Object[_0x1b47a9(0x128)],oe=Object[_0x1b47a9(0x14c)],ne=(_0x421412,_0x15296a,_0x23e0d5)=>_0x15296a in _0x421412?se(_0x421412,_0x15296a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x23e0d5}):_0x421412[_0x15296a]=_0x23e0d5,ie=(_0x291359,_0x335706,_0x22d712,_0x50b4e6)=>{const _0x13cf79=_0x1b47a9;for(var _0x2b9f2a=_0x50b4e6>0x1?void 0x0:_0x50b4e6?oe(_0x335706,_0x22d712):_0x335706,_0x1a94be=_0x291359[_0x13cf79(0x137)]-0x1,_0x118a7b;_0x1a94be>=0x0;_0x1a94be--)(_0x118a7b=_0x291359[_0x1a94be])&&(_0x2b9f2a=_0x118a7b(_0x2b9f2a)||_0x2b9f2a);return _0x2b9f2a;},w=(_0x4c3a1d,_0x5fa085)=>(_0x38419c,_0x439a2c)=>_0x5fa085(_0x38419c,_0x439a2c,_0x4c3a1d),$=(_0x4d61aa,_0x5eccb4,_0x727677)=>ne(_0x4d61aa,typeof _0x5eccb4!=_0x1b47a9(0x148)?_0x5eccb4+'':_0x5eccb4,_0x727677);let b=class extends _0x5b100b{constructor(_0x292d01=M,_0x421f76,_0x5698bc){const _0x56cdb9=_0x1b47a9;super(),this[_0x56cdb9(0x163)]=_0x292d01,this[_0x56cdb9(0x151)]=_0x421f76,this[_0x56cdb9(0x12d)]=_0x5698bc;const {..._0x1ce176}=_0x4ebc5a({},M,this[_0x56cdb9(0x163)]);this[_0x56cdb9(0x12d)]['setConfig'](z,_0x1ce176);}[_0x1b47a9(0x16d)](){const _0x442a09=_0x1b47a9;[[f],[g],[S]][_0x442a09(0x132)](_0x3f89f3=>{const _0x3b4375=_0x442a09;this[_0x3b4375(0x151)][_0x3b4375(0x164)](_0x3f89f3);});}[_0x1b47a9(0x184)](){const _0x24dae9=_0x1b47a9;this[_0x24dae9(0x151)][_0x24dae9(0x180)](g),this[_0x24dae9(0x151)][_0x24dae9(0x180)](S);}};$(b,_0x1b47a9(0x189),W),$(b,_0x1b47a9(0x168),_0x1ce2d1[_0x1b47a9(0x182)]),b=ie([_0x8a9abb(_0x18e6d7,_0x3a519b,_0x4ef8f5),w(0x1,_0x113128(_0x59dbaa)),w(0x2,_0x575a65)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x419f(){const _0x30bc73=['resolved','code','19704uLdKPw','/delete','userID','get','/universer-api/comment/unit/','saveCommentToSnapshot','getUser','requireSession','post','749AjOMpB','addUser','Unknown','281369TSzLxx','_threadCommentDataSource','solved','updateComment','ref','_init','87939rULiBR','unitId','rangeId','Solved','COMMENT','format','resolveComment','Delete','defineProperty','Edit','setConfig','createTimestamp','replies','OpenOrReOpen','map','onReady','470xWsXvm','/edit','_threadCommentDataSourceService','payload','_configService','_initDataSource','getMemberID','delete','_sessionService','filter','stringify','_config','syncUpdateMutationToColla','content','root','error','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','disposeWithMe','180dtNRcc','deleteComment','parse','find','rangeType','getCurrentUser','getOwnPropertyDescriptor','pipe','thread-comment-data-source.config','parentId','1867026ThHWxN','/solved','symbol','_injector','_userService','_httpService','customRanges','comment','getUnit','personId','commentUpdate$','forEach','_initUserSync','replyId','_commentService','933237lKPEDM','add','Reply','/universer-api/user/list','type','260dbMaXs','5225LQZAbh','length','onStarting','values','_threadCommentModel','threadId','user','Solve','dataSource','userId','size','UNRECOGNIZED','1372MsMMsw','4169GwPPtG','body'];_0x419f=function(){return _0x30bc73;};return _0x419f();}const _0x2dab71=_0x38c7;(function(_0x2587d5,_0xbaf0ec){const _0x346bcd=_0x38c7,_0x1ee716=_0x2587d5();while(!![]){try{const _0x47db9b=parseInt(_0x346bcd(0x151))/0x1*(-parseInt(_0x346bcd(0x143))/0x2)+-parseInt(_0x346bcd(0x13e))/0x3+parseInt(_0x346bcd(0x150))/0x4*(parseInt(_0x346bcd(0x144))/0x5)+parseInt(_0x346bcd(0x12f))/0x6+parseInt(_0x346bcd(0x15e))/0x7*(-parseInt(_0x346bcd(0x155))/0x8)+parseInt(_0x346bcd(0x167))/0x9*(parseInt(_0x346bcd(0x112))/0xa)+parseInt(_0x346bcd(0x161))/0xb*(parseInt(_0x346bcd(0x125))/0xc);if(_0x47db9b===_0xbaf0ec)break;else _0x1ee716['push'](_0x1ee716['shift']());}catch(_0x3b93fc){_0x1ee716['push'](_0x1ee716['shift']());}}}(_0x419f,0x60aa2));import{CommentService as _0x21192d,CollaborationSessionService as _0x1eaae2,UniverCollaborationClientPlugin as _0x56bd3f}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x121e1a}from'@univerjs-pro/license';import{dayjs as _0x35c504,UserManagerService as _0x1b2ae9,Inject as _0x223669,Injector as _0x380632,Disposable as _0x541d21,CustomRangeType as _0x2f110e,UniverInstanceType as _0x48e5bc,DependentOn as _0x246354,IConfigService as _0x238b6a,Plugin as _0x3558e5,merge as _0x56cf94}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4fa7aa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x95a713,IThreadCommentDataSourceService as _0x465bec}from'@univerjs/thread-comment';import{bufferTime as _0x4ecd2a}from'rxjs';import{HTTPService as _0x17be68}from'@univerjs/network';const W=_0x2dab71(0x123);var I=(_0x3d75c3=>(_0x3d75c3[_0x3d75c3['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x3d75c3[_0x3d75c3['Solved']=0x1]=_0x2dab71(0x16a),_0x3d75c3[_0x3d75c3[_0x2dab71(0x14f)]=-0x1]=_0x2dab71(0x14f),_0x3d75c3))(I||{}),v=(_0x2a742f=>(_0x2a742f[_0x2a742f[_0x2dab71(0x160)]=0x0]=_0x2dab71(0x160),_0x2a742f[_0x2a742f[_0x2dab71(0x122)]=0x1]=_0x2dab71(0x122),_0x2a742f[_0x2a742f[_0x2dab71(0x140)]=0x2]='Reply',_0x2a742f[_0x2a742f[_0x2dab71(0x170)]=0x3]=_0x2dab71(0x170),_0x2a742f[_0x2a742f[_0x2dab71(0x16e)]=0x4]=_0x2dab71(0x16e),_0x2a742f[_0x2a742f[_0x2dab71(0x14b)]=0x5]=_0x2dab71(0x14b),_0x2a742f[_0x2a742f[_0x2dab71(0x14f)]=-0x1]=_0x2dab71(0x14f),_0x2a742f))(v||{});const D=_0x56c464=>_0x35c504(new Date(+_0x56c464))[_0x2dab71(0x16c)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x61d5a7,_0x5e31af)=>{const _0x316404=_0x2dab71,_0x3b1799=_0x61d5a7['get'](_0x1b2ae9),_0x4e6421=_0x61d5a7[_0x316404(0x158)](_0x17be68);_0x5e31af[_0x316404(0x13a)](_0x4ba52e=>{const _0x121e62=_0x316404;_0x3b1799[_0x121e62(0x15b)](_0x4ba52e)&&_0x5e31af[_0x121e62(0x119)](_0x4ba52e);}),_0x5e31af[_0x316404(0x14e)]&&(await _0x4e6421['get'](_0x316404(0x141),{'params':{'userIDs':[..._0x5e31af]}}))['body']['users'][_0x316404(0x13a)](_0x534ac6=>{const _0x3d9c25=_0x316404;_0x534ac6&&_0x3b1799[_0x3d9c25(0x15f)](_0x534ac6);});};var K=Object[_0x2dab71(0x12b)],V=(_0x38f6bb,_0x3cbe2a,_0x1869c4,_0x2cacce)=>{const _0x4e3b11=_0x2dab71;for(var _0x3eaf=_0x2cacce>0x1?void 0x0:_0x2cacce?K(_0x3cbe2a,_0x1869c4):_0x3cbe2a,_0x28d4ca=_0x38f6bb[_0x4e3b11(0x145)]-0x1,_0x5d38ca;_0x28d4ca>=0x0;_0x28d4ca--)(_0x5d38ca=_0x38f6bb[_0x28d4ca])&&(_0x3eaf=_0x5d38ca(_0x3eaf)||_0x3eaf);return _0x3eaf;},p=(_0x254917,_0x421797)=>(_0x5550e9,_0x240796)=>_0x421797(_0x5550e9,_0x240796,_0x254917);let S=class extends _0x541d21{constructor(_0xd4ee91,_0x3058b0,_0xbe2a48,_0x542412){const _0x43c9df=_0x2dab71;super(),this[_0x43c9df(0x13d)]=_0xd4ee91,this[_0x43c9df(0x148)]=_0x3058b0,this['_userService']=_0xbe2a48,this[_0x43c9df(0x132)]=_0x542412,this[_0x43c9df(0x166)](),this[_0x43c9df(0x13b)]();}[_0x2dab71(0x13b)](){const _0x5f59f4=_0x2dab71;this[_0x5f59f4(0x124)](this[_0x5f59f4(0x148)]['commentUpdate$'][_0x5f59f4(0x12c)](_0x4ecd2a(0x10))['subscribe'](_0x332ce9=>{const _0x3221aa=_0x5f59f4,_0x225c83=new Set();_0x332ce9[_0x3221aa(0x13a)](_0x7cae1c=>{const _0x25d589=_0x3221aa;switch(_0x7cae1c['type']){case _0x25d589(0x13f):{const _0x4c4d9d=_0x7cae1c[_0x25d589(0x115)][_0x25d589(0x138)];_0x225c83[_0x25d589(0x13f)](_0x4c4d9d);break;}}}),B(this['_injector'],_0x225c83);}));}[_0x2dab71(0x166)](){const _0x5cdfac=_0x2dab71;this[_0x5cdfac(0x124)](this[_0x5cdfac(0x13d)][_0x5cdfac(0x139)]['subscribe'](async _0x65234=>{const _0x5e1a3e=_0x5cdfac;var _0x4c4453,_0x2d383c,_0x3b70cf,_0x495fa6;const _0x4442f8=(_0x4c4453=this['_threadCommentModel'][_0x5e1a3e(0x137)](_0x65234[_0x5e1a3e(0x168)])[_0x5e1a3e(0x128)](_0x5ad3b1=>_0x5ad3b1[_0x5e1a3e(0x149)]===_0x65234['threadId']))==null?void 0x0:_0x4c4453[_0x5e1a3e(0x120)];if(!_0x4442f8)return;const {unitId:_0x521e3c,subUnitId:_0x36ca47}=_0x4442f8;switch(_0x65234[_0x5e1a3e(0x14a)]&&this[_0x5e1a3e(0x133)][_0x5e1a3e(0x15f)](_0x65234[_0x5e1a3e(0x14a)]),_0x65234[_0x5e1a3e(0x142)]){case v['Add']:break;case v[_0x5e1a3e(0x140)]:{this['_threadCommentModel']['addComment'](_0x521e3c,_0x36ca47,{'unitId':_0x521e3c,'subUnitId':_0x36ca47,'ref':'','id':_0x65234[_0x5e1a3e(0x13c)],'dT':D(+_0x65234[_0x5e1a3e(0x172)]),'threadId':_0x65234[_0x5e1a3e(0x149)],'personId':(_0x3b70cf=(_0x2d383c=_0x65234[_0x5e1a3e(0x14a)])==null?void 0x0:_0x2d383c['userID'])!=null?_0x3b70cf:_0x65234[_0x5e1a3e(0x14d)],'text':JSON[_0x5e1a3e(0x127)](_0x65234[_0x5e1a3e(0x11f)]),'parentId':_0x4442f8['id']});break;}case v[_0x5e1a3e(0x16e)]:{const _0x5eabec=this[_0x5e1a3e(0x148)]['getComment'](_0x521e3c,_0x36ca47,_0x65234[_0x5e1a3e(0x13c)]);_0x5eabec&&_0x5eabec[_0x5e1a3e(0x12e)]&&this[_0x5e1a3e(0x148)][_0x5e1a3e(0x126)](_0x521e3c,_0x36ca47,_0x65234['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0x5e1a3e(0x164)](_0x521e3c,_0x36ca47,{'commentId':_0x65234[_0x5e1a3e(0x13c)],'text':JSON['parse'](_0x65234[_0x5e1a3e(0x11f)])});break;}case v['Solve']:{const _0x141931=(_0x495fa6=this[_0x5e1a3e(0x148)][_0x5e1a3e(0x137)](_0x65234['unitId'])[_0x5e1a3e(0x128)](_0x45e0f8=>_0x45e0f8[_0x5e1a3e(0x149)]===_0x65234['threadId']))==null?void 0x0:_0x495fa6['root'];_0x141931&&this[_0x5e1a3e(0x148)][_0x5e1a3e(0x16d)](_0x521e3c,_0x36ca47,_0x141931['id'],_0x65234['solved']===I[_0x5e1a3e(0x16a)]);break;}}}));}};S=V([p(0x0,_0x223669(_0x21192d)),p(0x1,_0x223669(_0x95a713)),p(0x2,_0x223669(_0x1b2ae9)),p(0x3,_0x223669(_0x380632))],S);const z=_0x2dab71(0x12d),M={};function _0x38c7(_0x2203cb,_0x3b0a3b){const _0x419f16=_0x419f();return _0x38c7=function(_0x38c7dc,_0x570d9d){_0x38c7dc=_0x38c7dc-0x10e;let _0x4d7d87=_0x419f16[_0x38c7dc];return _0x4d7d87;},_0x38c7(_0x2203cb,_0x3b0a3b);}var k=Object[_0x2dab71(0x12b)],Q=(_0x493e1b,_0x4bd118,_0x1ded35,_0x4f7287)=>{const _0x219850=_0x2dab71;for(var _0x2121f7=_0x4f7287>0x1?void 0x0:_0x4f7287?k(_0x4bd118,_0x1ded35):_0x4bd118,_0x5e0c3b=_0x493e1b[_0x219850(0x145)]-0x1,_0x5a7dd3;_0x5e0c3b>=0x0;_0x5e0c3b--)(_0x5a7dd3=_0x493e1b[_0x5e0c3b])&&(_0x2121f7=_0x5a7dd3(_0x2121f7)||_0x2121f7);return _0x2121f7;},_=(_0x4476f4,_0x1a41f9)=>(_0x42f00a,_0x35d00c)=>_0x1a41f9(_0x42f00a,_0x35d00c,_0x4476f4);function X(_0x2eb556,_0x4d81c9){const _0x30fdac=_0x2dab71,_0x2d7da3=_0x2eb556['replies'][0x0];return{..._0x4d81c9,'id':_0x2d7da3[_0x30fdac(0x13c)],'resolved':_0x2eb556[_0x30fdac(0x163)]===0x1,'dT':D(_0x2d7da3['createTimestamp']),'personId':_0x2d7da3['userId'],'threadId':_0x2d7da3[_0x30fdac(0x149)]};}function ee(_0x55871e,_0x185f70,_0x213432){const _0x45dfdd=_0x2dab71;var _0x120486,_0x5df19b;if(((_0x5df19b=(_0x120486=_0x55871e==null?void 0x0:_0x55871e[_0x45dfdd(0x10e)])==null?void 0x0:_0x120486[_0x45dfdd(0x145)])!=null?_0x5df19b:0x0)>0x0){const _0x49655d=(_0x132acc,_0x638aa7)=>({'id':_0x132acc[_0x45dfdd(0x13c)],'threadId':_0x132acc[_0x45dfdd(0x149)],'dT':D(_0x132acc['createTimestamp']),'personId':_0x132acc[_0x45dfdd(0x14d)],'resolved':_0x55871e[_0x45dfdd(0x163)]===I[_0x45dfdd(0x16a)],'unitId':_0x185f70,'subUnitId':_0x213432,'text':JSON[_0x45dfdd(0x127)](_0x132acc[_0x45dfdd(0x11f)]),'parentId':_0x638aa7}),_0x6e06c8=_0x49655d(_0x55871e[_0x45dfdd(0x10e)][0x0]);return{..._0x6e06c8,'children':_0x55871e[_0x45dfdd(0x10e)]['slice'](0x1)['map'](_0x545793=>_0x49655d(_0x545793,_0x6e06c8['id']))};}return null;}let f=class{constructor(_0x5b71a4,_0x24f6c3,_0x3b4dd0,_0x22a26f){const _0x1dc3cf=_0x2dab71;this['_httpService']=_0x5b71a4,this[_0x1dc3cf(0x133)]=_0x24f6c3,this[_0x1dc3cf(0x11a)]=_0x3b4dd0,this[_0x1dc3cf(0x132)]=_0x22a26f;}async['addComment'](_0x5d72fe){const _0x575537=_0x2dab71;var _0x46e0ab,_0x32890d;const {parentId:_0x5e5630,unitId:_0x3f50ad,text:_0x42215a,threadId:_0x4876d9}=_0x5d72fe,_0x27919c=(_0x32890d=(_0x46e0ab=_0x42215a[_0x575537(0x135)])==null?void 0x0:_0x46e0ab['filter'](_0x11df90=>_0x11df90[_0x575537(0x129)]===_0x2f110e[_0x575537(0x16b)])['map'](_0x4f1f34=>_0x4f1f34[_0x575537(0x169)]))!=null?_0x32890d:[],_0x1d7626=JSON[_0x575537(0x11c)](_0x42215a),_0x93fcf9=(await this[_0x575537(0x11a)][_0x575537(0x15c)](_0x3f50ad))[_0x575537(0x118)]();if(_0x5e5630){const _0x55b205={'memberId':_0x93fcf9,'unitId':_0x3f50ad,'content':_0x1d7626,'mention':_0x27919c,'threadId':_0x4876d9},_0x8a9d54=(await this['_httpService'][_0x575537(0x15d)]('/universer-api/comment/unit/'+_0x3f50ad+'/reply',{'body':_0x55b205}))['body']['reply'];return{..._0x5d72fe,'id':_0x8a9d54[_0x575537(0x13c)],'dT':_0x35c504(+_0x8a9d54[_0x575537(0x172)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x8a9d54[_0x575537(0x14d)]};}else{const _0x1480eb={'memberId':_0x93fcf9,'unitId':_0x3f50ad,'content':_0x1d7626,'mention':_0x27919c},_0xf2b71e=await this[_0x575537(0x134)][_0x575537(0x15d)]('/universer-api/comment/unit/'+_0x3f50ad+'/add',{'body':_0x1480eb});return X(_0xf2b71e[_0x575537(0x152)][_0x575537(0x136)],_0x5d72fe);}}async[_0x2dab71(0x164)](_0x53c822){const _0x103caf=_0x2dab71;var _0x10d3b0,_0x220e2d;const {text:_0x5379a4,unitId:_0x1f9b82}=_0x53c822,_0x1e1cba=(_0x220e2d=(_0x10d3b0=_0x5379a4['customRanges'])==null?void 0x0:_0x10d3b0[_0x103caf(0x11b)](_0x5b9e8a=>_0x5b9e8a[_0x103caf(0x129)]===_0x2f110e['COMMENT'])[_0x103caf(0x110)](_0x4e93c0=>_0x4e93c0[_0x103caf(0x169)]))!=null?_0x220e2d:[],_0x28988f=JSON[_0x103caf(0x11c)](_0x5379a4),_0x137495=_0x53c822[_0x103caf(0x149)],_0x2ad3cf=_0x53c822['id'],_0x4fe263={'memberId':(await this['_sessionService'][_0x103caf(0x15c)](_0x1f9b82))[_0x103caf(0x118)](),'unitId':_0x1f9b82,'threadId':_0x137495,'mention':_0x1e1cba,'content':_0x28988f,'replyId':_0x2ad3cf},_0x4d8350=await this['_httpService'][_0x103caf(0x15d)](_0x103caf(0x159)+_0x1f9b82+_0x103caf(0x113),{'body':_0x4fe263});return!_0x4d8350[_0x103caf(0x152)][_0x103caf(0x121)]||_0x4d8350[_0x103caf(0x152)][_0x103caf(0x121)][_0x103caf(0x154)]===0x1;}async[_0x2dab71(0x16d)](_0x25e7f3){const _0x4ab678=_0x2dab71,{unitId:_0x4419ff}=_0x25e7f3,_0x534bae=_0x25e7f3['threadId'],_0x3697a9={'memberId':this[_0x4ab678(0x133)][_0x4ab678(0x12a)]()[_0x4ab678(0x157)],'unitId':_0x4419ff,'threadId':_0x534bae,'solved':_0x25e7f3[_0x4ab678(0x153)]?I[_0x4ab678(0x16a)]:I[_0x4ab678(0x10f)]},_0xdfc102=await this['_httpService'][_0x4ab678(0x15d)]('/universer-api/comment/unit/'+_0x4419ff+_0x4ab678(0x130),{'body':_0x3697a9});return!_0xdfc102[_0x4ab678(0x152)][_0x4ab678(0x121)]||_0xdfc102[_0x4ab678(0x152)][_0x4ab678(0x121)][_0x4ab678(0x154)]===0x1;}async[_0x2dab71(0x126)](_0x184195,_0xb3fd6d,_0x1fe053,_0x4020b4){const _0x481ec3=_0x2dab71,_0x5530bf={'memberId':(await this[_0x481ec3(0x11a)][_0x481ec3(0x15c)](_0x184195))['getMemberID'](),'threadId':_0x1fe053,'replyId':_0x4020b4,'unitId':_0x184195},_0xf0e1a6=await this['_httpService']['post'](_0x481ec3(0x159)+_0x184195+_0x481ec3(0x156),{'body':_0x5530bf});return!_0xf0e1a6[_0x481ec3(0x152)][_0x481ec3(0x121)]||_0xf0e1a6[_0x481ec3(0x152)][_0x481ec3(0x121)][_0x481ec3(0x154)]===0x1;}async['listComments'](_0x278f17,_0x3770a4,_0x3ed97f){const _0x54049d=_0x2dab71,_0x52fbff={'unitId':_0x278f17,'threadId':_0x3ed97f},_0x1bb0d6=await this[_0x54049d(0x134)][_0x54049d(0x15d)]('/universer-api/comment/unit/'+_0x278f17+'/list',{'body':_0x52fbff}),_0xe8543e=_0x3ed97f[_0x54049d(0x110)](_0x45e801=>ee(_0x1bb0d6[_0x54049d(0x152)]['comments'][_0x45e801],_0x278f17,_0x3770a4))[_0x54049d(0x11b)](Boolean);return Object[_0x54049d(0x147)](_0x1bb0d6[_0x54049d(0x152)]['users'])[_0x54049d(0x13a)](_0x23c9ae=>{const _0x4384ac=_0x54049d;this['_userService'][_0x4384ac(0x15f)](_0x23c9ae);}),_0xe8543e;}[_0x2dab71(0x15a)](_0x1f214d){const _0x538c9b=_0x2dab71;return{'id':_0x1f214d['id'],'threadId':_0x1f214d[_0x538c9b(0x149)],'ref':_0x1f214d[_0x538c9b(0x165)]};}};f=Q([_(0x0,_0x223669(_0x17be68)),_(0x1,_0x223669(_0x1b2ae9)),_(0x2,_0x223669(_0x1eaae2)),_(0x3,_0x223669(_0x380632))],f);var re=Object[_0x2dab71(0x12b)],te=(_0x52a40b,_0x2c4275,_0x2608ce,_0x470da9)=>{const _0x4e452c=_0x2dab71;for(var _0x44b3f3=_0x470da9>0x1?void 0x0:_0x470da9?re(_0x2c4275,_0x2608ce):_0x2c4275,_0x17e63a=_0x52a40b[_0x4e452c(0x145)]-0x1,_0x17b65a;_0x17e63a>=0x0;_0x17e63a--)(_0x17b65a=_0x52a40b[_0x17e63a])&&(_0x44b3f3=_0x17b65a(_0x44b3f3)||_0x44b3f3);return _0x44b3f3;},N=(_0x4d0e0f,_0x26668d)=>(_0x30a1a5,_0x4041da)=>_0x26668d(_0x30a1a5,_0x4041da,_0x4d0e0f);let g=class extends _0x541d21{constructor(_0x43825a,_0x55a0fe){const _0x1dd62c=_0x2dab71;super(),this[_0x1dd62c(0x114)]=_0x43825a,this['_threadCommentDataSource']=_0x55a0fe,this['_initDataSource']();}[_0x2dab71(0x117)](){const _0x5ce768=_0x2dab71;this[_0x5ce768(0x114)][_0x5ce768(0x14c)]=this[_0x5ce768(0x162)],this[_0x5ce768(0x114)][_0x5ce768(0x11e)]=!0x1;}};g=te([N(0x0,_0x465bec),N(0x1,_0x223669(f))],g);var se=Object[_0x2dab71(0x16f)],oe=Object[_0x2dab71(0x12b)],ne=(_0x4bb03f,_0x337468,_0xdf20a0)=>_0x337468 in _0x4bb03f?se(_0x4bb03f,_0x337468,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xdf20a0}):_0x4bb03f[_0x337468]=_0xdf20a0,ie=(_0x50868b,_0x2ba92e,_0x28817e,_0x51c966)=>{const _0x22f298=_0x2dab71;for(var _0xfc2f95=_0x51c966>0x1?void 0x0:_0x51c966?oe(_0x2ba92e,_0x28817e):_0x2ba92e,_0x1889bc=_0x50868b[_0x22f298(0x145)]-0x1,_0x1dfb5e;_0x1889bc>=0x0;_0x1889bc--)(_0x1dfb5e=_0x50868b[_0x1889bc])&&(_0xfc2f95=_0x1dfb5e(_0xfc2f95)||_0xfc2f95);return _0xfc2f95;},w=(_0x258025,_0x98a9d5)=>(_0x3d6163,_0x2e1fee)=>_0x98a9d5(_0x3d6163,_0x2e1fee,_0x258025),$=(_0x4493c5,_0x3b5e04,_0x32f60c)=>ne(_0x4493c5,typeof _0x3b5e04!=_0x2dab71(0x131)?_0x3b5e04+'':_0x3b5e04,_0x32f60c);let b=class extends _0x3558e5{constructor(_0x1e064b=M,_0x332c25,_0x28184f){const _0x19ed23=_0x2dab71;super(),this['_config']=_0x1e064b,this[_0x19ed23(0x132)]=_0x332c25,this['_configService']=_0x28184f;const {..._0x28e2bc}=_0x56cf94({},M,this[_0x19ed23(0x11d)]);this[_0x19ed23(0x116)][_0x19ed23(0x171)](z,_0x28e2bc);}[_0x2dab71(0x146)](){const _0xe6fe4f=_0x2dab71;[[f],[g],[S]][_0xe6fe4f(0x13a)](_0x3ed366=>{const _0x64cde2=_0xe6fe4f;this[_0x64cde2(0x132)][_0x64cde2(0x13f)](_0x3ed366);});}[_0x2dab71(0x111)](){const _0x446906=_0x2dab71;this[_0x446906(0x132)][_0x446906(0x158)](g),this[_0x446906(0x132)]['get'](S);}};$(b,'pluginName',W),$(b,_0x2dab71(0x142),_0x48e5bc['UNIVER_UNKNOWN']),b=ie([_0x246354(_0x4fa7aa,_0x56bd3f,_0x121e1a),w(0x1,_0x223669(_0x380632)),w(0x2,_0x238b6a)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1b47a9=_0x124b;(function(_0x1408a1,_0x2c6ce2){const _0x3d0917=_0x124b,_0x165aa9=_0x1408a1();while(!![]){try{const _0x4d02f0=parseInt(_0x3d0917(0x16b))/0x1+-parseInt(_0x3d0917(0x166))/0x2*(-parseInt(_0x3d0917(0x179))/0x3)+parseInt(_0x3d0917(0x156))/0x4+parseInt(_0x3d0917(0x12a))/0x5+-parseInt(_0x3d0917(0x146))/0x6*(parseInt(_0x3d0917(0x170))/0x7)+-parseInt(_0x3d0917(0x159))/0x8*(-parseInt(_0x3d0917(0x162))/0x9)+parseInt(_0x3d0917(0x16c))/0xa*(-parseInt(_0x3d0917(0x147))/0xb);if(_0x4d02f0===_0x2c6ce2)break;else _0x165aa9['push'](_0x165aa9['shift']());}catch(_0xfe2161){_0x165aa9['push'](_0x165aa9['shift']());}}}(_0x1078,0x76658));import{CommentService as _0x3c4083,CollaborationSessionService as _0x2ae918,UniverCollaborationClientPlugin as _0x3a519b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4ef8f5}from'@univerjs-pro/license';import{dayjs as _0x4bf675,UserManagerService as _0x571c24,Inject as _0x113128,Injector as _0x59dbaa,Disposable as _0x434d24,CustomRangeType as _0x59c86f,UniverInstanceType as _0x1ce2d1,DependentOn as _0x8a9abb,IConfigService as _0x575a65,Plugin as _0x5b100b,merge as _0x4ebc5a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x18e6d7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x656ab3,IThreadCommentDataSourceService as _0x5e6fac}from'@univerjs/thread-comment';import{bufferTime as _0x4c390f}from'rxjs';import{HTTPService as _0x4b42b5}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x17bfe8=>(_0x17bfe8[_0x17bfe8[_0x1b47a9(0x17b)]=0x0]=_0x1b47a9(0x17b),_0x17bfe8[_0x17bfe8[_0x1b47a9(0x142)]=0x1]=_0x1b47a9(0x142),_0x17bfe8[_0x17bfe8[_0x1b47a9(0x14b)]=-0x1]=_0x1b47a9(0x14b),_0x17bfe8))(I||{}),v=(_0x5d2623=>(_0x5d2623[_0x5d2623['Unknown']=0x0]='Unknown',_0x5d2623[_0x5d2623[_0x1b47a9(0x136)]=0x1]='Add',_0x5d2623[_0x5d2623[_0x1b47a9(0x149)]=0x2]=_0x1b47a9(0x149),_0x5d2623[_0x5d2623[_0x1b47a9(0x133)]=0x3]=_0x1b47a9(0x133),_0x5d2623[_0x5d2623[_0x1b47a9(0x13a)]=0x4]=_0x1b47a9(0x13a),_0x5d2623[_0x5d2623['Solve']=0x5]=_0x1b47a9(0x17f),_0x5d2623[_0x5d2623[_0x1b47a9(0x14b)]=-0x1]=_0x1b47a9(0x14b),_0x5d2623))(v||{});const D=_0x24b4b9=>_0x4bf675(new Date(+_0x24b4b9))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x41edec,_0x2df88d)=>{const _0x43f763=_0x1b47a9,_0x425b3f=_0x41edec[_0x43f763(0x180)](_0x571c24),_0x4351ff=_0x41edec[_0x43f763(0x180)](_0x4b42b5);_0x2df88d[_0x43f763(0x132)](_0x50b0e2=>{const _0x2a286b=_0x43f763;_0x425b3f[_0x2a286b(0x183)](_0x50b0e2)&&_0x2df88d['delete'](_0x50b0e2);}),_0x2df88d['size']&&(await _0x4351ff['get'](_0x43f763(0x169),{'params':{'userIDs':[..._0x2df88d]}}))[_0x43f763(0x174)][_0x43f763(0x140)][_0x43f763(0x132)](_0x260e2b=>{const _0x3598f1=_0x43f763;_0x260e2b&&_0x425b3f[_0x3598f1(0x165)](_0x260e2b);});};var K=Object[_0x1b47a9(0x14c)],V=(_0x331caf,_0x4fb274,_0x4949c4,_0x285b94)=>{const _0x1158e8=_0x1b47a9;for(var _0x8e58dc=_0x285b94>0x1?void 0x0:_0x285b94?K(_0x4fb274,_0x4949c4):_0x4fb274,_0x5d1558=_0x331caf[_0x1158e8(0x137)]-0x1,_0x285046;_0x5d1558>=0x0;_0x5d1558--)(_0x285046=_0x331caf[_0x5d1558])&&(_0x8e58dc=_0x285046(_0x8e58dc)||_0x8e58dc);return _0x8e58dc;},p=(_0x4b234c,_0x307f76)=>(_0x24f8b8,_0x4be3c7)=>_0x307f76(_0x24f8b8,_0x4be3c7,_0x4b234c);let S=class extends _0x434d24{constructor(_0x46160f,_0x2384e2,_0x104f20,_0x58c874){const _0x12eee3=_0x1b47a9;super(),this[_0x12eee3(0x167)]=_0x46160f,this[_0x12eee3(0x16e)]=_0x2384e2,this['_userService']=_0x104f20,this[_0x12eee3(0x151)]=_0x58c874,this[_0x12eee3(0x13d)](),this[_0x12eee3(0x18a)]();}[_0x1b47a9(0x18a)](){const _0x645c7d=_0x1b47a9;this[_0x645c7d(0x143)](this[_0x645c7d(0x16e)]['commentUpdate$'][_0x645c7d(0x14f)](_0x4c390f(0x10))[_0x645c7d(0x139)](_0x2d3b68=>{const _0x4fe041=_0x645c7d,_0x53cb17=new Set();_0x2d3b68[_0x4fe041(0x132)](_0x5f57db=>{const _0x27aa12=_0x4fe041;switch(_0x5f57db['type']){case'add':{const _0x5c6029=_0x5f57db['payload'][_0x27aa12(0x12e)];_0x53cb17[_0x27aa12(0x164)](_0x5c6029);break;}}}),B(this[_0x4fe041(0x151)],_0x53cb17);}));}['_init'](){const _0x5eb9af=_0x1b47a9;this[_0x5eb9af(0x143)](this[_0x5eb9af(0x167)][_0x5eb9af(0x15e)]['subscribe'](async _0x2645b9=>{const _0x5e46c5=_0x5eb9af;var _0x35ad58,_0x430761,_0x5d9380,_0xa36b2d;const _0x18888d=(_0x35ad58=this['_threadCommentModel'][_0x5e46c5(0x153)](_0x2645b9[_0x5e46c5(0x187)])[_0x5e46c5(0x17a)](_0xdac173=>_0xdac173[_0x5e46c5(0x13c)]===_0x2645b9[_0x5e46c5(0x13c)]))==null?void 0x0:_0x35ad58['root'];if(!_0x18888d)return;const {unitId:_0x53990f,subUnitId:_0x5cf4c3}=_0x18888d;switch(_0x2645b9[_0x5e46c5(0x188)]&&this[_0x5e46c5(0x157)][_0x5e46c5(0x165)](_0x2645b9[_0x5e46c5(0x188)]),_0x2645b9[_0x5e46c5(0x168)]){case v[_0x5e46c5(0x136)]:break;case v['Reply']:{this['_threadCommentModel'][_0x5e46c5(0x171)](_0x53990f,_0x5cf4c3,{'unitId':_0x53990f,'subUnitId':_0x5cf4c3,'ref':'','id':_0x2645b9[_0x5e46c5(0x185)],'dT':D(+_0x2645b9[_0x5e46c5(0x12f)]),'threadId':_0x2645b9[_0x5e46c5(0x13c)],'personId':(_0x5d9380=(_0x430761=_0x2645b9[_0x5e46c5(0x188)])==null?void 0x0:_0x430761[_0x5e46c5(0x14a)])!=null?_0x5d9380:_0x2645b9[_0x5e46c5(0x13b)],'text':JSON[_0x5e46c5(0x18b)](_0x2645b9[_0x5e46c5(0x150)]),'parentId':_0x18888d['id']});break;}case v[_0x5e46c5(0x13a)]:{const _0x1a85bd=this[_0x5e46c5(0x16e)][_0x5e46c5(0x161)](_0x53990f,_0x5cf4c3,_0x2645b9[_0x5e46c5(0x185)]);_0x1a85bd&&_0x1a85bd[_0x5e46c5(0x15f)]&&this[_0x5e46c5(0x16e)][_0x5e46c5(0x145)](_0x53990f,_0x5cf4c3,_0x2645b9[_0x5e46c5(0x185)]);break;}case v['Edit']:{this[_0x5e46c5(0x16e)][_0x5e46c5(0x12c)](_0x53990f,_0x5cf4c3,{'commentId':_0x2645b9['replyId'],'text':JSON[_0x5e46c5(0x18b)](_0x2645b9['content'])});break;}case v['Solve']:{const _0x5991eb=(_0xa36b2d=this[_0x5e46c5(0x16e)]['getUnit'](_0x2645b9[_0x5e46c5(0x187)])[_0x5e46c5(0x17a)](_0xa100fb=>_0xa100fb[_0x5e46c5(0x13c)]===_0x2645b9[_0x5e46c5(0x13c)]))==null?void 0x0:_0xa36b2d['root'];_0x5991eb&&this[_0x5e46c5(0x16e)]['resolveComment'](_0x53990f,_0x5cf4c3,_0x5991eb['id'],_0x2645b9[_0x5e46c5(0x181)]===I[_0x5e46c5(0x142)]);break;}}}));}};S=V([p(0x0,_0x113128(_0x3c4083)),p(0x1,_0x113128(_0x656ab3)),p(0x2,_0x113128(_0x571c24)),p(0x3,_0x113128(_0x59dbaa))],S);const z=_0x1b47a9(0x15b),M={};var k=Object[_0x1b47a9(0x14c)],Q=(_0xb999c0,_0x2ee177,_0x5f3de2,_0x588de5)=>{for(var _0x48e4c1=_0x588de5>0x1?void 0x0:_0x588de5?k(_0x2ee177,_0x5f3de2):_0x2ee177,_0xd1d785=_0xb999c0['length']-0x1,_0x483119;_0xd1d785>=0x0;_0xd1d785--)(_0x483119=_0xb999c0[_0xd1d785])&&(_0x48e4c1=_0x483119(_0x48e4c1)||_0x48e4c1);return _0x48e4c1;},_=(_0x52cda2,_0x8d120e)=>(_0x3604f2,_0x49eb53)=>_0x8d120e(_0x3604f2,_0x49eb53,_0x52cda2);function _0x1078(){const _0x21f48d=['length','comment','subscribe','Delete','userId','threadId','_init','ref','/reply','users','saveCommentToSnapshot','Solved','disposeWithMe','getMemberID','deleteComment','16266qGfYTQ','264kTZotR','symbol','Reply','userID','UNRECOGNIZED','getOwnPropertyDescriptor','listComments','values','pipe','content','_injector','error','getUnit','requireSession','reply','3139272lxGjsh','_userService','_sessionService','3166168fNLdNd','code','thread-comment-data-source.config','format','post','commentUpdate$','parentId','/universer-api/comment/unit/','getComment','18YvJMwz','_config','add','addUser','26Ujyzeo','_commentService','type','/universer-api/user/list','rangeId','388256zjzrzm','1014080uqDzpX','onStarting','_threadCommentModel','COMMENT','133uHGCTn','addComment','filter','customRanges','body','/list','rangeType','replies','_threadCommentDataSourceService','40530lKjasH','find','OpenOrReOpen','/delete','resolveComment','map','Solve','get','solved','UNIVER_UNKNOWN','getUser','onReady','replyId','_threadCommentDataSource','unitId','user','pluginName','_initUserSync','parse','defineProperty','/edit','4150035pzosFe','YYYY/MM/DD\x20HH:mm','updateComment','_configService','personId','createTimestamp','resolved','_httpService','forEach','Edit','stringify','comments','Add'];_0x1078=function(){return _0x21f48d;};return _0x1078();}function X(_0x3384a0,_0x1e30ec){const _0x1527a6=_0x1b47a9,_0x25d1ed=_0x3384a0[_0x1527a6(0x177)][0x0];return{..._0x1e30ec,'id':_0x25d1ed[_0x1527a6(0x185)],'resolved':_0x3384a0['solved']===0x1,'dT':D(_0x25d1ed['createTimestamp']),'personId':_0x25d1ed[_0x1527a6(0x13b)],'threadId':_0x25d1ed[_0x1527a6(0x13c)]};}function ee(_0x1d7063,_0x13bfb3,_0x515b2f){const _0x34571b=_0x1b47a9;var _0x532f15,_0xfe0932;if(((_0xfe0932=(_0x532f15=_0x1d7063==null?void 0x0:_0x1d7063[_0x34571b(0x177)])==null?void 0x0:_0x532f15[_0x34571b(0x137)])!=null?_0xfe0932:0x0)>0x0){const _0x46c30b=(_0x578d94,_0x4949b1)=>({'id':_0x578d94[_0x34571b(0x185)],'threadId':_0x578d94[_0x34571b(0x13c)],'dT':D(_0x578d94['createTimestamp']),'personId':_0x578d94[_0x34571b(0x13b)],'resolved':_0x1d7063[_0x34571b(0x181)]===I[_0x34571b(0x142)],'unitId':_0x13bfb3,'subUnitId':_0x515b2f,'text':JSON[_0x34571b(0x18b)](_0x578d94['content']),'parentId':_0x4949b1}),_0x55554b=_0x46c30b(_0x1d7063[_0x34571b(0x177)][0x0]);return{..._0x55554b,'children':_0x1d7063[_0x34571b(0x177)]['slice'](0x1)[_0x34571b(0x17e)](_0x3797ad=>_0x46c30b(_0x3797ad,_0x55554b['id']))};}return null;}let f=class{constructor(_0xd7d389,_0x5170f1,_0xba759f,_0x2f555d){const _0xac69f6=_0x1b47a9;this[_0xac69f6(0x131)]=_0xd7d389,this['_userService']=_0x5170f1,this['_sessionService']=_0xba759f,this[_0xac69f6(0x151)]=_0x2f555d;}async[_0x1b47a9(0x171)](_0x437b36){const _0x492901=_0x1b47a9;var _0x14a6a0,_0x2d42e8;const {parentId:_0x59a8aa,unitId:_0x43e6a2,text:_0x53a797,threadId:_0x200249}=_0x437b36,_0x330226=(_0x2d42e8=(_0x14a6a0=_0x53a797[_0x492901(0x173)])==null?void 0x0:_0x14a6a0[_0x492901(0x172)](_0x4dd281=>_0x4dd281[_0x492901(0x176)]===_0x59c86f[_0x492901(0x16f)])[_0x492901(0x17e)](_0x3c51c3=>_0x3c51c3[_0x492901(0x16a)]))!=null?_0x2d42e8:[],_0x2b7661=JSON[_0x492901(0x134)](_0x53a797),_0x1d9c91=(await this[_0x492901(0x158)]['requireSession'](_0x43e6a2))[_0x492901(0x144)]();if(_0x59a8aa){const _0x206c38={'memberId':_0x1d9c91,'unitId':_0x43e6a2,'content':_0x2b7661,'mention':_0x330226,'threadId':_0x200249},_0x2c03f1=(await this[_0x492901(0x131)]['post'](_0x492901(0x160)+_0x43e6a2+_0x492901(0x13f),{'body':_0x206c38}))[_0x492901(0x174)][_0x492901(0x155)];return{..._0x437b36,'id':_0x2c03f1['replyId'],'dT':_0x4bf675(+_0x2c03f1[_0x492901(0x12f)])[_0x492901(0x15c)](_0x492901(0x12b)),'personId':_0x2c03f1[_0x492901(0x13b)]};}else{const _0x3d1b2d={'memberId':_0x1d9c91,'unitId':_0x43e6a2,'content':_0x2b7661,'mention':_0x330226},_0xed89b4=await this[_0x492901(0x131)][_0x492901(0x15d)]('/universer-api/comment/unit/'+_0x43e6a2+'/add',{'body':_0x3d1b2d});return X(_0xed89b4[_0x492901(0x174)][_0x492901(0x138)],_0x437b36);}}async[_0x1b47a9(0x12c)](_0xafc3d6){const _0x2f89cc=_0x1b47a9;var _0x394edb,_0x487bfa;const {text:_0x2f57e6,unitId:_0x356a2d}=_0xafc3d6,_0x3d0c33=(_0x487bfa=(_0x394edb=_0x2f57e6[_0x2f89cc(0x173)])==null?void 0x0:_0x394edb[_0x2f89cc(0x172)](_0x4f9172=>_0x4f9172[_0x2f89cc(0x176)]===_0x59c86f[_0x2f89cc(0x16f)])[_0x2f89cc(0x17e)](_0x4751a8=>_0x4751a8['rangeId']))!=null?_0x487bfa:[],_0x527833=JSON[_0x2f89cc(0x134)](_0x2f57e6),_0x8e5aa5=_0xafc3d6[_0x2f89cc(0x13c)],_0x14177e=_0xafc3d6['id'],_0x8ef920={'memberId':(await this[_0x2f89cc(0x158)][_0x2f89cc(0x154)](_0x356a2d))[_0x2f89cc(0x144)](),'unitId':_0x356a2d,'threadId':_0x8e5aa5,'mention':_0x3d0c33,'content':_0x527833,'replyId':_0x14177e},_0x388dc4=await this[_0x2f89cc(0x131)]['post'](_0x2f89cc(0x160)+_0x356a2d+_0x2f89cc(0x129),{'body':_0x8ef920});return!_0x388dc4[_0x2f89cc(0x174)][_0x2f89cc(0x152)]||_0x388dc4[_0x2f89cc(0x174)][_0x2f89cc(0x152)][_0x2f89cc(0x15a)]===0x1;}async[_0x1b47a9(0x17d)](_0xe3bac4){const _0x199eb9=_0x1b47a9,{unitId:_0x294724}=_0xe3bac4,_0x2645e3=_0xe3bac4['threadId'],_0x21caae={'memberId':this[_0x199eb9(0x157)]['getCurrentUser']()['userID'],'unitId':_0x294724,'threadId':_0x2645e3,'solved':_0xe3bac4[_0x199eb9(0x130)]?I[_0x199eb9(0x142)]:I[_0x199eb9(0x17b)]},_0xbfbc0=await this[_0x199eb9(0x131)][_0x199eb9(0x15d)](_0x199eb9(0x160)+_0x294724+'/solved',{'body':_0x21caae});return!_0xbfbc0[_0x199eb9(0x174)]['error']||_0xbfbc0[_0x199eb9(0x174)][_0x199eb9(0x152)][_0x199eb9(0x15a)]===0x1;}async['deleteComment'](_0x253e02,_0x45ee23,_0x4195ec,_0x3d1092){const _0x407fdd=_0x1b47a9,_0x24adc9={'memberId':(await this[_0x407fdd(0x158)][_0x407fdd(0x154)](_0x253e02))[_0x407fdd(0x144)](),'threadId':_0x4195ec,'replyId':_0x3d1092,'unitId':_0x253e02},_0x2c57eb=await this[_0x407fdd(0x131)]['post'](_0x407fdd(0x160)+_0x253e02+_0x407fdd(0x17c),{'body':_0x24adc9});return!_0x2c57eb['body']['error']||_0x2c57eb['body'][_0x407fdd(0x152)][_0x407fdd(0x15a)]===0x1;}async[_0x1b47a9(0x14d)](_0x11c094,_0x25eeea,_0x2b5a89){const _0x10647d=_0x1b47a9,_0x397229={'unitId':_0x11c094,'threadId':_0x2b5a89},_0x31ad5f=await this['_httpService']['post'](_0x10647d(0x160)+_0x11c094+_0x10647d(0x175),{'body':_0x397229}),_0xc95385=_0x2b5a89[_0x10647d(0x17e)](_0x4dd222=>ee(_0x31ad5f[_0x10647d(0x174)][_0x10647d(0x135)][_0x4dd222],_0x11c094,_0x25eeea))[_0x10647d(0x172)](Boolean);return Object[_0x10647d(0x14e)](_0x31ad5f['body'][_0x10647d(0x140)])[_0x10647d(0x132)](_0x1ef004=>{const _0x32d1a7=_0x10647d;this['_userService'][_0x32d1a7(0x165)](_0x1ef004);}),_0xc95385;}[_0x1b47a9(0x141)](_0x29293e){const _0x3bd35d=_0x1b47a9;return{'id':_0x29293e['id'],'threadId':_0x29293e['threadId'],'ref':_0x29293e[_0x3bd35d(0x13e)]};}};f=Q([_(0x0,_0x113128(_0x4b42b5)),_(0x1,_0x113128(_0x571c24)),_(0x2,_0x113128(_0x2ae918)),_(0x3,_0x113128(_0x59dbaa))],f);var re=Object[_0x1b47a9(0x14c)],te=(_0x49d31e,_0x2a2084,_0x42b57d,_0x3ea695)=>{const _0x1be6f3=_0x1b47a9;for(var _0x13e953=_0x3ea695>0x1?void 0x0:_0x3ea695?re(_0x2a2084,_0x42b57d):_0x2a2084,_0x45ee68=_0x49d31e[_0x1be6f3(0x137)]-0x1,_0x5b2cc4;_0x45ee68>=0x0;_0x45ee68--)(_0x5b2cc4=_0x49d31e[_0x45ee68])&&(_0x13e953=_0x5b2cc4(_0x13e953)||_0x13e953);return _0x13e953;},N=(_0x4cad79,_0x5b61c3)=>(_0x313213,_0x2dec8f)=>_0x5b61c3(_0x313213,_0x2dec8f,_0x4cad79);let g=class extends _0x434d24{constructor(_0x3ff894,_0x2f0269){const _0x6bfc3d=_0x1b47a9;super(),this[_0x6bfc3d(0x178)]=_0x3ff894,this[_0x6bfc3d(0x186)]=_0x2f0269,this['_initDataSource']();}['_initDataSource'](){const _0x3acc06=_0x1b47a9;this['_threadCommentDataSourceService']['dataSource']=this[_0x3acc06(0x186)],this[_0x3acc06(0x178)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x5e6fac),N(0x1,_0x113128(f))],g);function _0x124b(_0x420d37,_0x4a2db5){const _0x107845=_0x1078();return _0x124b=function(_0x124bf7,_0x11fe76){_0x124bf7=_0x124bf7-0x128;let _0x248c88=_0x107845[_0x124bf7];return _0x248c88;},_0x124b(_0x420d37,_0x4a2db5);}var se=Object[_0x1b47a9(0x128)],oe=Object[_0x1b47a9(0x14c)],ne=(_0x421412,_0x15296a,_0x23e0d5)=>_0x15296a in _0x421412?se(_0x421412,_0x15296a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x23e0d5}):_0x421412[_0x15296a]=_0x23e0d5,ie=(_0x291359,_0x335706,_0x22d712,_0x50b4e6)=>{const _0x13cf79=_0x1b47a9;for(var _0x2b9f2a=_0x50b4e6>0x1?void 0x0:_0x50b4e6?oe(_0x335706,_0x22d712):_0x335706,_0x1a94be=_0x291359[_0x13cf79(0x137)]-0x1,_0x118a7b;_0x1a94be>=0x0;_0x1a94be--)(_0x118a7b=_0x291359[_0x1a94be])&&(_0x2b9f2a=_0x118a7b(_0x2b9f2a)||_0x2b9f2a);return _0x2b9f2a;},w=(_0x4c3a1d,_0x5fa085)=>(_0x38419c,_0x439a2c)=>_0x5fa085(_0x38419c,_0x439a2c,_0x4c3a1d),$=(_0x4d61aa,_0x5eccb4,_0x727677)=>ne(_0x4d61aa,typeof _0x5eccb4!=_0x1b47a9(0x148)?_0x5eccb4+'':_0x5eccb4,_0x727677);let b=class extends _0x5b100b{constructor(_0x292d01=M,_0x421f76,_0x5698bc){const _0x56cdb9=_0x1b47a9;super(),this[_0x56cdb9(0x163)]=_0x292d01,this[_0x56cdb9(0x151)]=_0x421f76,this[_0x56cdb9(0x12d)]=_0x5698bc;const {..._0x1ce176}=_0x4ebc5a({},M,this[_0x56cdb9(0x163)]);this[_0x56cdb9(0x12d)]['setConfig'](z,_0x1ce176);}[_0x1b47a9(0x16d)](){const _0x442a09=_0x1b47a9;[[f],[g],[S]][_0x442a09(0x132)](_0x3f89f3=>{const _0x3b4375=_0x442a09;this[_0x3b4375(0x151)][_0x3b4375(0x164)](_0x3f89f3);});}[_0x1b47a9(0x184)](){const _0x24dae9=_0x1b47a9;this[_0x24dae9(0x151)][_0x24dae9(0x180)](g),this[_0x24dae9(0x151)][_0x24dae9(0x180)](S);}};$(b,_0x1b47a9(0x189),W),$(b,_0x1b47a9(0x168),_0x1ce2d1[_0x1b47a9(0x182)]),b=ie([_0x8a9abb(_0x18e6d7,_0x3a519b,_0x4ef8f5),w(0x1,_0x113128(_0x59dbaa)),w(0x2,_0x575a65)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x419f(){const _0x30bc73=['resolved','code','19704uLdKPw','/delete','userID','get','/universer-api/comment/unit/','saveCommentToSnapshot','getUser','requireSession','post','749AjOMpB','addUser','Unknown','281369TSzLxx','_threadCommentDataSource','solved','updateComment','ref','_init','87939rULiBR','unitId','rangeId','Solved','COMMENT','format','resolveComment','Delete','defineProperty','Edit','setConfig','createTimestamp','replies','OpenOrReOpen','map','onReady','470xWsXvm','/edit','_threadCommentDataSourceService','payload','_configService','_initDataSource','getMemberID','delete','_sessionService','filter','stringify','_config','syncUpdateMutationToColla','content','root','error','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','disposeWithMe','180dtNRcc','deleteComment','parse','find','rangeType','getCurrentUser','getOwnPropertyDescriptor','pipe','thread-comment-data-source.config','parentId','1867026ThHWxN','/solved','symbol','_injector','_userService','_httpService','customRanges','comment','getUnit','personId','commentUpdate$','forEach','_initUserSync','replyId','_commentService','933237lKPEDM','add','Reply','/universer-api/user/list','type','260dbMaXs','5225LQZAbh','length','onStarting','values','_threadCommentModel','threadId','user','Solve','dataSource','userId','size','UNRECOGNIZED','1372MsMMsw','4169GwPPtG','body'];_0x419f=function(){return _0x30bc73;};return _0x419f();}const _0x2dab71=_0x38c7;(function(_0x2587d5,_0xbaf0ec){const _0x346bcd=_0x38c7,_0x1ee716=_0x2587d5();while(!![]){try{const _0x47db9b=parseInt(_0x346bcd(0x151))/0x1*(-parseInt(_0x346bcd(0x143))/0x2)+-parseInt(_0x346bcd(0x13e))/0x3+parseInt(_0x346bcd(0x150))/0x4*(parseInt(_0x346bcd(0x144))/0x5)+parseInt(_0x346bcd(0x12f))/0x6+parseInt(_0x346bcd(0x15e))/0x7*(-parseInt(_0x346bcd(0x155))/0x8)+parseInt(_0x346bcd(0x167))/0x9*(parseInt(_0x346bcd(0x112))/0xa)+parseInt(_0x346bcd(0x161))/0xb*(parseInt(_0x346bcd(0x125))/0xc);if(_0x47db9b===_0xbaf0ec)break;else _0x1ee716['push'](_0x1ee716['shift']());}catch(_0x3b93fc){_0x1ee716['push'](_0x1ee716['shift']());}}}(_0x419f,0x60aa2));import{CommentService as _0x21192d,CollaborationSessionService as _0x1eaae2,UniverCollaborationClientPlugin as _0x56bd3f}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x121e1a}from'@univerjs-pro/license';import{dayjs as _0x35c504,UserManagerService as _0x1b2ae9,Inject as _0x223669,Injector as _0x380632,Disposable as _0x541d21,CustomRangeType as _0x2f110e,UniverInstanceType as _0x48e5bc,DependentOn as _0x246354,IConfigService as _0x238b6a,Plugin as _0x3558e5,merge as _0x56cf94}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4fa7aa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x95a713,IThreadCommentDataSourceService as _0x465bec}from'@univerjs/thread-comment';import{bufferTime as _0x4ecd2a}from'rxjs';import{HTTPService as _0x17be68}from'@univerjs/network';const W=_0x2dab71(0x123);var I=(_0x3d75c3=>(_0x3d75c3[_0x3d75c3['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x3d75c3[_0x3d75c3['Solved']=0x1]=_0x2dab71(0x16a),_0x3d75c3[_0x3d75c3[_0x2dab71(0x14f)]=-0x1]=_0x2dab71(0x14f),_0x3d75c3))(I||{}),v=(_0x2a742f=>(_0x2a742f[_0x2a742f[_0x2dab71(0x160)]=0x0]=_0x2dab71(0x160),_0x2a742f[_0x2a742f[_0x2dab71(0x122)]=0x1]=_0x2dab71(0x122),_0x2a742f[_0x2a742f[_0x2dab71(0x140)]=0x2]='Reply',_0x2a742f[_0x2a742f[_0x2dab71(0x170)]=0x3]=_0x2dab71(0x170),_0x2a742f[_0x2a742f[_0x2dab71(0x16e)]=0x4]=_0x2dab71(0x16e),_0x2a742f[_0x2a742f[_0x2dab71(0x14b)]=0x5]=_0x2dab71(0x14b),_0x2a742f[_0x2a742f[_0x2dab71(0x14f)]=-0x1]=_0x2dab71(0x14f),_0x2a742f))(v||{});const D=_0x56c464=>_0x35c504(new Date(+_0x56c464))[_0x2dab71(0x16c)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x61d5a7,_0x5e31af)=>{const _0x316404=_0x2dab71,_0x3b1799=_0x61d5a7['get'](_0x1b2ae9),_0x4e6421=_0x61d5a7[_0x316404(0x158)](_0x17be68);_0x5e31af[_0x316404(0x13a)](_0x4ba52e=>{const _0x121e62=_0x316404;_0x3b1799[_0x121e62(0x15b)](_0x4ba52e)&&_0x5e31af[_0x121e62(0x119)](_0x4ba52e);}),_0x5e31af[_0x316404(0x14e)]&&(await _0x4e6421['get'](_0x316404(0x141),{'params':{'userIDs':[..._0x5e31af]}}))['body']['users'][_0x316404(0x13a)](_0x534ac6=>{const _0x3d9c25=_0x316404;_0x534ac6&&_0x3b1799[_0x3d9c25(0x15f)](_0x534ac6);});};var K=Object[_0x2dab71(0x12b)],V=(_0x38f6bb,_0x3cbe2a,_0x1869c4,_0x2cacce)=>{const _0x4e3b11=_0x2dab71;for(var _0x3eaf=_0x2cacce>0x1?void 0x0:_0x2cacce?K(_0x3cbe2a,_0x1869c4):_0x3cbe2a,_0x28d4ca=_0x38f6bb[_0x4e3b11(0x145)]-0x1,_0x5d38ca;_0x28d4ca>=0x0;_0x28d4ca--)(_0x5d38ca=_0x38f6bb[_0x28d4ca])&&(_0x3eaf=_0x5d38ca(_0x3eaf)||_0x3eaf);return _0x3eaf;},p=(_0x254917,_0x421797)=>(_0x5550e9,_0x240796)=>_0x421797(_0x5550e9,_0x240796,_0x254917);let S=class extends _0x541d21{constructor(_0xd4ee91,_0x3058b0,_0xbe2a48,_0x542412){const _0x43c9df=_0x2dab71;super(),this[_0x43c9df(0x13d)]=_0xd4ee91,this[_0x43c9df(0x148)]=_0x3058b0,this['_userService']=_0xbe2a48,this[_0x43c9df(0x132)]=_0x542412,this[_0x43c9df(0x166)](),this[_0x43c9df(0x13b)]();}[_0x2dab71(0x13b)](){const _0x5f59f4=_0x2dab71;this[_0x5f59f4(0x124)](this[_0x5f59f4(0x148)]['commentUpdate$'][_0x5f59f4(0x12c)](_0x4ecd2a(0x10))['subscribe'](_0x332ce9=>{const _0x3221aa=_0x5f59f4,_0x225c83=new Set();_0x332ce9[_0x3221aa(0x13a)](_0x7cae1c=>{const _0x25d589=_0x3221aa;switch(_0x7cae1c['type']){case _0x25d589(0x13f):{const _0x4c4d9d=_0x7cae1c[_0x25d589(0x115)][_0x25d589(0x138)];_0x225c83[_0x25d589(0x13f)](_0x4c4d9d);break;}}}),B(this['_injector'],_0x225c83);}));}[_0x2dab71(0x166)](){const _0x5cdfac=_0x2dab71;this[_0x5cdfac(0x124)](this[_0x5cdfac(0x13d)][_0x5cdfac(0x139)]['subscribe'](async _0x65234=>{const _0x5e1a3e=_0x5cdfac;var _0x4c4453,_0x2d383c,_0x3b70cf,_0x495fa6;const _0x4442f8=(_0x4c4453=this['_threadCommentModel'][_0x5e1a3e(0x137)](_0x65234[_0x5e1a3e(0x168)])[_0x5e1a3e(0x128)](_0x5ad3b1=>_0x5ad3b1[_0x5e1a3e(0x149)]===_0x65234['threadId']))==null?void 0x0:_0x4c4453[_0x5e1a3e(0x120)];if(!_0x4442f8)return;const {unitId:_0x521e3c,subUnitId:_0x36ca47}=_0x4442f8;switch(_0x65234[_0x5e1a3e(0x14a)]&&this[_0x5e1a3e(0x133)][_0x5e1a3e(0x15f)](_0x65234[_0x5e1a3e(0x14a)]),_0x65234[_0x5e1a3e(0x142)]){case v['Add']:break;case v[_0x5e1a3e(0x140)]:{this['_threadCommentModel']['addComment'](_0x521e3c,_0x36ca47,{'unitId':_0x521e3c,'subUnitId':_0x36ca47,'ref':'','id':_0x65234[_0x5e1a3e(0x13c)],'dT':D(+_0x65234[_0x5e1a3e(0x172)]),'threadId':_0x65234[_0x5e1a3e(0x149)],'personId':(_0x3b70cf=(_0x2d383c=_0x65234[_0x5e1a3e(0x14a)])==null?void 0x0:_0x2d383c['userID'])!=null?_0x3b70cf:_0x65234[_0x5e1a3e(0x14d)],'text':JSON[_0x5e1a3e(0x127)](_0x65234[_0x5e1a3e(0x11f)]),'parentId':_0x4442f8['id']});break;}case v[_0x5e1a3e(0x16e)]:{const _0x5eabec=this[_0x5e1a3e(0x148)]['getComment'](_0x521e3c,_0x36ca47,_0x65234[_0x5e1a3e(0x13c)]);_0x5eabec&&_0x5eabec[_0x5e1a3e(0x12e)]&&this[_0x5e1a3e(0x148)][_0x5e1a3e(0x126)](_0x521e3c,_0x36ca47,_0x65234['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0x5e1a3e(0x164)](_0x521e3c,_0x36ca47,{'commentId':_0x65234[_0x5e1a3e(0x13c)],'text':JSON['parse'](_0x65234[_0x5e1a3e(0x11f)])});break;}case v['Solve']:{const _0x141931=(_0x495fa6=this[_0x5e1a3e(0x148)][_0x5e1a3e(0x137)](_0x65234['unitId'])[_0x5e1a3e(0x128)](_0x45e0f8=>_0x45e0f8[_0x5e1a3e(0x149)]===_0x65234['threadId']))==null?void 0x0:_0x495fa6['root'];_0x141931&&this[_0x5e1a3e(0x148)][_0x5e1a3e(0x16d)](_0x521e3c,_0x36ca47,_0x141931['id'],_0x65234['solved']===I[_0x5e1a3e(0x16a)]);break;}}}));}};S=V([p(0x0,_0x223669(_0x21192d)),p(0x1,_0x223669(_0x95a713)),p(0x2,_0x223669(_0x1b2ae9)),p(0x3,_0x223669(_0x380632))],S);const z=_0x2dab71(0x12d),M={};function _0x38c7(_0x2203cb,_0x3b0a3b){const _0x419f16=_0x419f();return _0x38c7=function(_0x38c7dc,_0x570d9d){_0x38c7dc=_0x38c7dc-0x10e;let _0x4d7d87=_0x419f16[_0x38c7dc];return _0x4d7d87;},_0x38c7(_0x2203cb,_0x3b0a3b);}var k=Object[_0x2dab71(0x12b)],Q=(_0x493e1b,_0x4bd118,_0x1ded35,_0x4f7287)=>{const _0x219850=_0x2dab71;for(var _0x2121f7=_0x4f7287>0x1?void 0x0:_0x4f7287?k(_0x4bd118,_0x1ded35):_0x4bd118,_0x5e0c3b=_0x493e1b[_0x219850(0x145)]-0x1,_0x5a7dd3;_0x5e0c3b>=0x0;_0x5e0c3b--)(_0x5a7dd3=_0x493e1b[_0x5e0c3b])&&(_0x2121f7=_0x5a7dd3(_0x2121f7)||_0x2121f7);return _0x2121f7;},_=(_0x4476f4,_0x1a41f9)=>(_0x42f00a,_0x35d00c)=>_0x1a41f9(_0x42f00a,_0x35d00c,_0x4476f4);function X(_0x2eb556,_0x4d81c9){const _0x30fdac=_0x2dab71,_0x2d7da3=_0x2eb556['replies'][0x0];return{..._0x4d81c9,'id':_0x2d7da3[_0x30fdac(0x13c)],'resolved':_0x2eb556[_0x30fdac(0x163)]===0x1,'dT':D(_0x2d7da3['createTimestamp']),'personId':_0x2d7da3['userId'],'threadId':_0x2d7da3[_0x30fdac(0x149)]};}function ee(_0x55871e,_0x185f70,_0x213432){const _0x45dfdd=_0x2dab71;var _0x120486,_0x5df19b;if(((_0x5df19b=(_0x120486=_0x55871e==null?void 0x0:_0x55871e[_0x45dfdd(0x10e)])==null?void 0x0:_0x120486[_0x45dfdd(0x145)])!=null?_0x5df19b:0x0)>0x0){const _0x49655d=(_0x132acc,_0x638aa7)=>({'id':_0x132acc[_0x45dfdd(0x13c)],'threadId':_0x132acc[_0x45dfdd(0x149)],'dT':D(_0x132acc['createTimestamp']),'personId':_0x132acc[_0x45dfdd(0x14d)],'resolved':_0x55871e[_0x45dfdd(0x163)]===I[_0x45dfdd(0x16a)],'unitId':_0x185f70,'subUnitId':_0x213432,'text':JSON[_0x45dfdd(0x127)](_0x132acc[_0x45dfdd(0x11f)]),'parentId':_0x638aa7}),_0x6e06c8=_0x49655d(_0x55871e[_0x45dfdd(0x10e)][0x0]);return{..._0x6e06c8,'children':_0x55871e[_0x45dfdd(0x10e)]['slice'](0x1)['map'](_0x545793=>_0x49655d(_0x545793,_0x6e06c8['id']))};}return null;}let f=class{constructor(_0x5b71a4,_0x24f6c3,_0x3b4dd0,_0x22a26f){const _0x1dc3cf=_0x2dab71;this['_httpService']=_0x5b71a4,this[_0x1dc3cf(0x133)]=_0x24f6c3,this[_0x1dc3cf(0x11a)]=_0x3b4dd0,this[_0x1dc3cf(0x132)]=_0x22a26f;}async['addComment'](_0x5d72fe){const _0x575537=_0x2dab71;var _0x46e0ab,_0x32890d;const {parentId:_0x5e5630,unitId:_0x3f50ad,text:_0x42215a,threadId:_0x4876d9}=_0x5d72fe,_0x27919c=(_0x32890d=(_0x46e0ab=_0x42215a[_0x575537(0x135)])==null?void 0x0:_0x46e0ab['filter'](_0x11df90=>_0x11df90[_0x575537(0x129)]===_0x2f110e[_0x575537(0x16b)])['map'](_0x4f1f34=>_0x4f1f34[_0x575537(0x169)]))!=null?_0x32890d:[],_0x1d7626=JSON[_0x575537(0x11c)](_0x42215a),_0x93fcf9=(await this[_0x575537(0x11a)][_0x575537(0x15c)](_0x3f50ad))[_0x575537(0x118)]();if(_0x5e5630){const _0x55b205={'memberId':_0x93fcf9,'unitId':_0x3f50ad,'content':_0x1d7626,'mention':_0x27919c,'threadId':_0x4876d9},_0x8a9d54=(await this['_httpService'][_0x575537(0x15d)]('/universer-api/comment/unit/'+_0x3f50ad+'/reply',{'body':_0x55b205}))['body']['reply'];return{..._0x5d72fe,'id':_0x8a9d54[_0x575537(0x13c)],'dT':_0x35c504(+_0x8a9d54[_0x575537(0x172)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x8a9d54[_0x575537(0x14d)]};}else{const _0x1480eb={'memberId':_0x93fcf9,'unitId':_0x3f50ad,'content':_0x1d7626,'mention':_0x27919c},_0xf2b71e=await this[_0x575537(0x134)][_0x575537(0x15d)]('/universer-api/comment/unit/'+_0x3f50ad+'/add',{'body':_0x1480eb});return X(_0xf2b71e[_0x575537(0x152)][_0x575537(0x136)],_0x5d72fe);}}async[_0x2dab71(0x164)](_0x53c822){const _0x103caf=_0x2dab71;var _0x10d3b0,_0x220e2d;const {text:_0x5379a4,unitId:_0x1f9b82}=_0x53c822,_0x1e1cba=(_0x220e2d=(_0x10d3b0=_0x5379a4['customRanges'])==null?void 0x0:_0x10d3b0[_0x103caf(0x11b)](_0x5b9e8a=>_0x5b9e8a[_0x103caf(0x129)]===_0x2f110e['COMMENT'])[_0x103caf(0x110)](_0x4e93c0=>_0x4e93c0[_0x103caf(0x169)]))!=null?_0x220e2d:[],_0x28988f=JSON[_0x103caf(0x11c)](_0x5379a4),_0x137495=_0x53c822[_0x103caf(0x149)],_0x2ad3cf=_0x53c822['id'],_0x4fe263={'memberId':(await this['_sessionService'][_0x103caf(0x15c)](_0x1f9b82))[_0x103caf(0x118)](),'unitId':_0x1f9b82,'threadId':_0x137495,'mention':_0x1e1cba,'content':_0x28988f,'replyId':_0x2ad3cf},_0x4d8350=await this['_httpService'][_0x103caf(0x15d)](_0x103caf(0x159)+_0x1f9b82+_0x103caf(0x113),{'body':_0x4fe263});return!_0x4d8350[_0x103caf(0x152)][_0x103caf(0x121)]||_0x4d8350[_0x103caf(0x152)][_0x103caf(0x121)][_0x103caf(0x154)]===0x1;}async[_0x2dab71(0x16d)](_0x25e7f3){const _0x4ab678=_0x2dab71,{unitId:_0x4419ff}=_0x25e7f3,_0x534bae=_0x25e7f3['threadId'],_0x3697a9={'memberId':this[_0x4ab678(0x133)][_0x4ab678(0x12a)]()[_0x4ab678(0x157)],'unitId':_0x4419ff,'threadId':_0x534bae,'solved':_0x25e7f3[_0x4ab678(0x153)]?I[_0x4ab678(0x16a)]:I[_0x4ab678(0x10f)]},_0xdfc102=await this['_httpService'][_0x4ab678(0x15d)]('/universer-api/comment/unit/'+_0x4419ff+_0x4ab678(0x130),{'body':_0x3697a9});return!_0xdfc102[_0x4ab678(0x152)][_0x4ab678(0x121)]||_0xdfc102[_0x4ab678(0x152)][_0x4ab678(0x121)][_0x4ab678(0x154)]===0x1;}async[_0x2dab71(0x126)](_0x184195,_0xb3fd6d,_0x1fe053,_0x4020b4){const _0x481ec3=_0x2dab71,_0x5530bf={'memberId':(await this[_0x481ec3(0x11a)][_0x481ec3(0x15c)](_0x184195))['getMemberID'](),'threadId':_0x1fe053,'replyId':_0x4020b4,'unitId':_0x184195},_0xf0e1a6=await this['_httpService']['post'](_0x481ec3(0x159)+_0x184195+_0x481ec3(0x156),{'body':_0x5530bf});return!_0xf0e1a6[_0x481ec3(0x152)][_0x481ec3(0x121)]||_0xf0e1a6[_0x481ec3(0x152)][_0x481ec3(0x121)][_0x481ec3(0x154)]===0x1;}async['listComments'](_0x278f17,_0x3770a4,_0x3ed97f){const _0x54049d=_0x2dab71,_0x52fbff={'unitId':_0x278f17,'threadId':_0x3ed97f},_0x1bb0d6=await this[_0x54049d(0x134)][_0x54049d(0x15d)]('/universer-api/comment/unit/'+_0x278f17+'/list',{'body':_0x52fbff}),_0xe8543e=_0x3ed97f[_0x54049d(0x110)](_0x45e801=>ee(_0x1bb0d6[_0x54049d(0x152)]['comments'][_0x45e801],_0x278f17,_0x3770a4))[_0x54049d(0x11b)](Boolean);return Object[_0x54049d(0x147)](_0x1bb0d6[_0x54049d(0x152)]['users'])[_0x54049d(0x13a)](_0x23c9ae=>{const _0x4384ac=_0x54049d;this['_userService'][_0x4384ac(0x15f)](_0x23c9ae);}),_0xe8543e;}[_0x2dab71(0x15a)](_0x1f214d){const _0x538c9b=_0x2dab71;return{'id':_0x1f214d['id'],'threadId':_0x1f214d[_0x538c9b(0x149)],'ref':_0x1f214d[_0x538c9b(0x165)]};}};f=Q([_(0x0,_0x223669(_0x17be68)),_(0x1,_0x223669(_0x1b2ae9)),_(0x2,_0x223669(_0x1eaae2)),_(0x3,_0x223669(_0x380632))],f);var re=Object[_0x2dab71(0x12b)],te=(_0x52a40b,_0x2c4275,_0x2608ce,_0x470da9)=>{const _0x4e452c=_0x2dab71;for(var _0x44b3f3=_0x470da9>0x1?void 0x0:_0x470da9?re(_0x2c4275,_0x2608ce):_0x2c4275,_0x17e63a=_0x52a40b[_0x4e452c(0x145)]-0x1,_0x17b65a;_0x17e63a>=0x0;_0x17e63a--)(_0x17b65a=_0x52a40b[_0x17e63a])&&(_0x44b3f3=_0x17b65a(_0x44b3f3)||_0x44b3f3);return _0x44b3f3;},N=(_0x4d0e0f,_0x26668d)=>(_0x30a1a5,_0x4041da)=>_0x26668d(_0x30a1a5,_0x4041da,_0x4d0e0f);let g=class extends _0x541d21{constructor(_0x43825a,_0x55a0fe){const _0x1dd62c=_0x2dab71;super(),this[_0x1dd62c(0x114)]=_0x43825a,this['_threadCommentDataSource']=_0x55a0fe,this['_initDataSource']();}[_0x2dab71(0x117)](){const _0x5ce768=_0x2dab71;this[_0x5ce768(0x114)][_0x5ce768(0x14c)]=this[_0x5ce768(0x162)],this[_0x5ce768(0x114)][_0x5ce768(0x11e)]=!0x1;}};g=te([N(0x0,_0x465bec),N(0x1,_0x223669(f))],g);var se=Object[_0x2dab71(0x16f)],oe=Object[_0x2dab71(0x12b)],ne=(_0x4bb03f,_0x337468,_0xdf20a0)=>_0x337468 in _0x4bb03f?se(_0x4bb03f,_0x337468,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xdf20a0}):_0x4bb03f[_0x337468]=_0xdf20a0,ie=(_0x50868b,_0x2ba92e,_0x28817e,_0x51c966)=>{const _0x22f298=_0x2dab71;for(var _0xfc2f95=_0x51c966>0x1?void 0x0:_0x51c966?oe(_0x2ba92e,_0x28817e):_0x2ba92e,_0x1889bc=_0x50868b[_0x22f298(0x145)]-0x1,_0x1dfb5e;_0x1889bc>=0x0;_0x1889bc--)(_0x1dfb5e=_0x50868b[_0x1889bc])&&(_0xfc2f95=_0x1dfb5e(_0xfc2f95)||_0xfc2f95);return _0xfc2f95;},w=(_0x258025,_0x98a9d5)=>(_0x3d6163,_0x2e1fee)=>_0x98a9d5(_0x3d6163,_0x2e1fee,_0x258025),$=(_0x4493c5,_0x3b5e04,_0x32f60c)=>ne(_0x4493c5,typeof _0x3b5e04!=_0x2dab71(0x131)?_0x3b5e04+'':_0x3b5e04,_0x32f60c);let b=class extends _0x3558e5{constructor(_0x1e064b=M,_0x332c25,_0x28184f){const _0x19ed23=_0x2dab71;super(),this['_config']=_0x1e064b,this[_0x19ed23(0x132)]=_0x332c25,this['_configService']=_0x28184f;const {..._0x28e2bc}=_0x56cf94({},M,this[_0x19ed23(0x11d)]);this[_0x19ed23(0x116)][_0x19ed23(0x171)](z,_0x28e2bc);}[_0x2dab71(0x146)](){const _0xe6fe4f=_0x2dab71;[[f],[g],[S]][_0xe6fe4f(0x13a)](_0x3ed366=>{const _0x64cde2=_0xe6fe4f;this[_0x64cde2(0x132)][_0x64cde2(0x13f)](_0x3ed366);});}[_0x2dab71(0x111)](){const _0x446906=_0x2dab71;this[_0x446906(0x132)][_0x446906(0x158)](g),this[_0x446906(0x132)]['get'](S);}};$(b,'pluginName',W),$(b,_0x2dab71(0x142),_0x48e5bc['UNIVER_UNKNOWN']),b=ie([_0x246354(_0x4fa7aa,_0x56bd3f,_0x121e1a),w(0x1,_0x223669(_0x380632)),w(0x2,_0x238b6a)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x48388f,_0x4f3d0c){const _0x5ae752=_0x1bc3,_0x511721=_0x48388f();while(!![]){try{const _0x3974e4=parseInt(_0x5ae752(0x18c))/0x1*(parseInt(_0x5ae752(0x19a))/0x2)+-parseInt(_0x5ae752(0x1e8))/0x3+-parseInt(_0x5ae752(0x1e6))/0x4+-parseInt(_0x5ae752(0x175))/0x5+parseInt(_0x5ae752(0x1a2))/0x6+parseInt(_0x5ae752(0x1c6))/0x7+-parseInt(_0x5ae752(0x193))/0x8*(-parseInt(_0x5ae752(0x1b3))/0x9);if(_0x3974e4===_0x4f3d0c)break;else _0x511721['push'](_0x511721['shift']());}catch(_0x455c26){_0x511721['push'](_0x511721['shift']());}}}(_0x3990,0x46a64),function(_0x1f7b8e,_0x3557a3){const _0x531889=_0x1bc3;typeof exports==_0x531889(0x184)&&typeof module<'u'?_0x3557a3(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x531889(0x196)&&define[_0x531889(0x1b1)]?define(['exports',_0x531889(0x1d5),_0x531889(0x1bf),'@univerjs/core',_0x531889(0x1d6),'@univerjs/thread-comment',_0x531889(0x194),_0x531889(0x1de)],_0x3557a3):(_0x1f7b8e=typeof globalThis<'u'?globalThis:_0x1f7b8e||self,_0x3557a3(_0x1f7b8e[_0x531889(0x1f4)]={},_0x1f7b8e[_0x531889(0x1a0)],_0x1f7b8e['UniverProLicense'],_0x1f7b8e[_0x531889(0x1c0)],_0x1f7b8e[_0x531889(0x1ac)],_0x1f7b8e[_0x531889(0x1cb)],_0x1f7b8e[_0x531889(0x194)],_0x1f7b8e['UniverNetwork']));}(this,function(_0x5742a6,_0x2a4d49,_0x46234c,_0x42b4da,_0x22a6ec,_0x2f850a,_0x282e99,_0x2bc6d0){'use strict';const _0x122b3b=_0x1bc3;const _0xafa4fc=_0x122b3b(0x176);var _0x57db8b=(_0x44f346=>(_0x44f346[_0x44f346[_0x122b3b(0x182)]=0x0]=_0x122b3b(0x182),_0x44f346[_0x44f346[_0x122b3b(0x1ae)]=0x1]=_0x122b3b(0x1ae),_0x44f346[_0x44f346[_0x122b3b(0x1ec)]=-0x1]='UNRECOGNIZED',_0x44f346))(_0x57db8b||{}),_0x46ba33=(_0x1f9a5b=>(_0x1f9a5b[_0x1f9a5b[_0x122b3b(0x180)]=0x0]=_0x122b3b(0x180),_0x1f9a5b[_0x1f9a5b[_0x122b3b(0x17a)]=0x1]=_0x122b3b(0x17a),_0x1f9a5b[_0x1f9a5b[_0x122b3b(0x170)]=0x2]=_0x122b3b(0x170),_0x1f9a5b[_0x1f9a5b[_0x122b3b(0x1d2)]=0x3]='Edit',_0x1f9a5b[_0x1f9a5b[_0x122b3b(0x18b)]=0x4]=_0x122b3b(0x18b),_0x1f9a5b[_0x1f9a5b[_0x122b3b(0x1bd)]=0x5]=_0x122b3b(0x1bd),_0x1f9a5b[_0x1f9a5b['UNRECOGNIZED']=-0x1]=_0x122b3b(0x1ec),_0x1f9a5b))(_0x46ba33||{});const _0x34f9fe=_0x2eb2c5=>_0x42b4da[_0x122b3b(0x1f0)](new Date(+_0x2eb2c5))[_0x122b3b(0x173)](_0x122b3b(0x16f)),_0x1cf215=async(_0x4466be,_0x5ae8db)=>{const _0x559242=_0x122b3b,_0x4153ee=_0x4466be[_0x559242(0x1d0)](_0x42b4da['UserManagerService']),_0xacdfb9=_0x4466be[_0x559242(0x1d0)](_0x2bc6d0['HTTPService']);_0x5ae8db[_0x559242(0x1b0)](_0xbb231b=>{const _0x53629a=_0x559242;_0x4153ee[_0x53629a(0x198)](_0xbb231b)&&_0x5ae8db[_0x53629a(0x1a5)](_0xbb231b);}),_0x5ae8db[_0x559242(0x1bb)]&&(await _0xacdfb9[_0x559242(0x1d0)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5ae8db]}}))[_0x559242(0x1b2)]['users'][_0x559242(0x1b0)](_0x542166=>{const _0x338b36=_0x559242;_0x542166&&_0x4153ee[_0x338b36(0x1d4)](_0x542166);});};var _0x47ab2f=Object[_0x122b3b(0x183)],_0x4d4340=(_0x1b8664,_0x2ffc17,_0x246eec,_0x27e73f)=>{const _0x35e67f=_0x122b3b;for(var _0x329962=_0x27e73f>0x1?void 0x0:_0x27e73f?_0x47ab2f(_0x2ffc17,_0x246eec):_0x2ffc17,_0x3729ef=_0x1b8664[_0x35e67f(0x1d8)]-0x1,_0x161966;_0x3729ef>=0x0;_0x3729ef--)(_0x161966=_0x1b8664[_0x3729ef])&&(_0x329962=_0x161966(_0x329962)||_0x329962);return _0x329962;},_0x400e87=(_0x269321,_0x415ed7)=>(_0xa38473,_0x5b645b)=>_0x415ed7(_0xa38473,_0x5b645b,_0x269321);let _0xdbacdc=class extends _0x42b4da['Disposable']{constructor(_0x1e91d4,_0x26e949,_0x7baf7,_0x10e369){const _0x50e4cc=_0x122b3b;super(),this[_0x50e4cc(0x1da)]=_0x1e91d4,this[_0x50e4cc(0x1c1)]=_0x26e949,this[_0x50e4cc(0x18a)]=_0x7baf7,this[_0x50e4cc(0x1d9)]=_0x10e369,this[_0x50e4cc(0x1b9)](),this[_0x50e4cc(0x1ee)]();}['_initUserSync'](){const _0x5db026=_0x122b3b;this[_0x5db026(0x1af)](this[_0x5db026(0x1c1)][_0x5db026(0x18f)][_0x5db026(0x1c9)](_0x282e99[_0x5db026(0x17f)](0x10))['subscribe'](_0x39de58=>{const _0x28707c=_0x5db026,_0x44abf7=new Set();_0x39de58[_0x28707c(0x1b0)](_0x554c61=>{const _0x52ebd2=_0x28707c;switch(_0x554c61[_0x52ebd2(0x19d)]){case'add':{const _0x23cfc6=_0x554c61[_0x52ebd2(0x1e7)][_0x52ebd2(0x1ba)];_0x44abf7[_0x52ebd2(0x179)](_0x23cfc6);break;}}}),_0x1cf215(this[_0x28707c(0x1d9)],_0x44abf7);}));}['_init'](){const _0x5c959e=_0x122b3b;this[_0x5c959e(0x1af)](this[_0x5c959e(0x1da)][_0x5c959e(0x18f)][_0x5c959e(0x1c3)](async _0x3b0bf8=>{const _0x30364c=_0x5c959e;var _0x3ac4c6,_0x562951,_0x171449,_0x39187c;const _0x55aa5f=(_0x3ac4c6=this['_threadCommentModel'][_0x30364c(0x1eb)](_0x3b0bf8['unitId'])[_0x30364c(0x1c4)](_0x18d7c3=>_0x18d7c3[_0x30364c(0x17d)]===_0x3b0bf8['threadId']))==null?void 0x0:_0x3ac4c6['root'];if(!_0x55aa5f)return;const {unitId:_0x2b6fb2,subUnitId:_0x343696}=_0x55aa5f;switch(_0x3b0bf8['user']&&this[_0x30364c(0x18a)][_0x30364c(0x1d4)](_0x3b0bf8['user']),_0x3b0bf8[_0x30364c(0x19d)]){case _0x46ba33[_0x30364c(0x17a)]:break;case _0x46ba33['Reply']:{this[_0x30364c(0x1c1)][_0x30364c(0x1ef)](_0x2b6fb2,_0x343696,{'unitId':_0x2b6fb2,'subUnitId':_0x343696,'ref':'','id':_0x3b0bf8[_0x30364c(0x1ad)],'dT':_0x34f9fe(+_0x3b0bf8[_0x30364c(0x1e1)]),'threadId':_0x3b0bf8['threadId'],'personId':(_0x171449=(_0x562951=_0x3b0bf8[_0x30364c(0x1d7)])==null?void 0x0:_0x562951[_0x30364c(0x177)])!=null?_0x171449:_0x3b0bf8[_0x30364c(0x1e0)],'text':JSON[_0x30364c(0x1d3)](_0x3b0bf8[_0x30364c(0x1b7)]),'parentId':_0x55aa5f['id']});break;}case _0x46ba33[_0x30364c(0x18b)]:{const _0x340d4e=this[_0x30364c(0x1c1)][_0x30364c(0x1e9)](_0x2b6fb2,_0x343696,_0x3b0bf8[_0x30364c(0x1ad)]);_0x340d4e&&_0x340d4e[_0x30364c(0x186)]&&this[_0x30364c(0x1c1)]['deleteComment'](_0x2b6fb2,_0x343696,_0x3b0bf8[_0x30364c(0x1ad)]);break;}case _0x46ba33['Edit']:{this['_threadCommentModel'][_0x30364c(0x181)](_0x2b6fb2,_0x343696,{'commentId':_0x3b0bf8[_0x30364c(0x1ad)],'text':JSON[_0x30364c(0x1d3)](_0x3b0bf8['content'])});break;}case _0x46ba33[_0x30364c(0x1bd)]:{const _0x4bf5e4=(_0x39187c=this['_threadCommentModel']['getUnit'](_0x3b0bf8[_0x30364c(0x1e2)])['find'](_0x2cf4b2=>_0x2cf4b2[_0x30364c(0x17d)]===_0x3b0bf8[_0x30364c(0x17d)]))==null?void 0x0:_0x39187c[_0x30364c(0x187)];_0x4bf5e4&&this[_0x30364c(0x1c1)][_0x30364c(0x191)](_0x2b6fb2,_0x343696,_0x4bf5e4['id'],_0x3b0bf8[_0x30364c(0x178)]===_0x57db8b[_0x30364c(0x1ae)]);break;}}}));}};_0xdbacdc=_0x4d4340([_0x400e87(0x0,_0x42b4da[_0x122b3b(0x1b5)](_0x2a4d49[_0x122b3b(0x18d)])),_0x400e87(0x1,_0x42b4da['Inject'](_0x2f850a[_0x122b3b(0x17b)])),_0x400e87(0x2,_0x42b4da[_0x122b3b(0x1b5)](_0x42b4da[_0x122b3b(0x1a3)])),_0x400e87(0x3,_0x42b4da[_0x122b3b(0x1b5)](_0x42b4da[_0x122b3b(0x1f1)]))],_0xdbacdc);const _0x5ec5d5='thread-comment-data-source.config',_0x9982d4={};var _0x9ebb9c=Object[_0x122b3b(0x183)],_0x22df30=(_0xa93d51,_0x20a638,_0x56d5de,_0x2a9543)=>{const _0x3609a9=_0x122b3b;for(var _0x3c0297=_0x2a9543>0x1?void 0x0:_0x2a9543?_0x9ebb9c(_0x20a638,_0x56d5de):_0x20a638,_0x3820aa=_0xa93d51[_0x3609a9(0x1d8)]-0x1,_0x48f868;_0x3820aa>=0x0;_0x3820aa--)(_0x48f868=_0xa93d51[_0x3820aa])&&(_0x3c0297=_0x48f868(_0x3c0297)||_0x3c0297);return _0x3c0297;},_0x10ea5c=(_0x12fa5a,_0x18a2de)=>(_0x37d452,_0x451165)=>_0x18a2de(_0x37d452,_0x451165,_0x12fa5a);function _0x2b078e(_0x352814,_0x22b4de){const _0x18c8eb=_0x122b3b,_0x25ec76=_0x352814['replies'][0x0];return{..._0x22b4de,'id':_0x25ec76[_0x18c8eb(0x1ad)],'resolved':_0x352814[_0x18c8eb(0x178)]===0x1,'dT':_0x34f9fe(_0x25ec76['createTimestamp']),'personId':_0x25ec76[_0x18c8eb(0x1e0)],'threadId':_0x25ec76['threadId']};}function _0x4cf10f(_0x1b23dc,_0x335cfe,_0x251efe){const _0x1db216=_0x122b3b;var _0x2bab98,_0x380bc2;if(((_0x380bc2=(_0x2bab98=_0x1b23dc==null?void 0x0:_0x1b23dc['replies'])==null?void 0x0:_0x2bab98[_0x1db216(0x1d8)])!=null?_0x380bc2:0x0)>0x0){const _0x597942=(_0x44c6fb,_0x285f3d)=>({'id':_0x44c6fb['replyId'],'threadId':_0x44c6fb[_0x1db216(0x17d)],'dT':_0x34f9fe(_0x44c6fb[_0x1db216(0x1e1)]),'personId':_0x44c6fb[_0x1db216(0x1e0)],'resolved':_0x1b23dc[_0x1db216(0x178)]===_0x57db8b[_0x1db216(0x1ae)],'unitId':_0x335cfe,'subUnitId':_0x251efe,'text':JSON[_0x1db216(0x1d3)](_0x44c6fb[_0x1db216(0x1b7)]),'parentId':_0x285f3d}),_0xff1e6c=_0x597942(_0x1b23dc[_0x1db216(0x174)][0x0]);return{..._0xff1e6c,'children':_0x1b23dc['replies'][_0x1db216(0x1dc)](0x1)[_0x1db216(0x1b6)](_0x1d444e=>_0x597942(_0x1d444e,_0xff1e6c['id']))};}return null;}let _0x3a7176=class{constructor(_0x134048,_0x2549da,_0x38ca75,_0x3e6007){const _0x3bb81b=_0x122b3b;this[_0x3bb81b(0x1e3)]=_0x134048,this[_0x3bb81b(0x18a)]=_0x2549da,this[_0x3bb81b(0x1a4)]=_0x38ca75,this[_0x3bb81b(0x1d9)]=_0x3e6007;}async[_0x122b3b(0x1ef)](_0x26f332){const _0xa4e361=_0x122b3b;var _0x7b2361,_0x527f7f;const {parentId:_0x868d75,unitId:_0x302691,text:_0x58d2ff,threadId:_0x38ce47}=_0x26f332,_0x5970fd=(_0x527f7f=(_0x7b2361=_0x58d2ff[_0xa4e361(0x17e)])==null?void 0x0:_0x7b2361[_0xa4e361(0x19c)](_0x2e6542=>_0x2e6542['rangeType']===_0x42b4da['CustomRangeType'][_0xa4e361(0x1ed)])[_0xa4e361(0x1b6)](_0x423c5e=>_0x423c5e[_0xa4e361(0x1aa)]))!=null?_0x527f7f:[],_0x3f2a94=JSON['stringify'](_0x58d2ff),_0xc8a71f=(await this['_sessionService'][_0xa4e361(0x1f2)](_0x302691))[_0xa4e361(0x1db)]();if(_0x868d75){const _0x2b1a5e={'memberId':_0xc8a71f,'unitId':_0x302691,'content':_0x3f2a94,'mention':_0x5970fd,'threadId':_0x38ce47},_0x1ddee4=(await this[_0xa4e361(0x1e3)][_0xa4e361(0x1a9)](_0xa4e361(0x1a8)+_0x302691+_0xa4e361(0x1ca),{'body':_0x2b1a5e}))[_0xa4e361(0x1b2)][_0xa4e361(0x1be)];return{..._0x26f332,'id':_0x1ddee4[_0xa4e361(0x1ad)],'dT':_0x42b4da[_0xa4e361(0x1f0)](+_0x1ddee4[_0xa4e361(0x1e1)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x1ddee4[_0xa4e361(0x1e0)]};}else{const _0x11730a={'memberId':_0xc8a71f,'unitId':_0x302691,'content':_0x3f2a94,'mention':_0x5970fd},_0x301ec6=await this['_httpService'][_0xa4e361(0x1a9)](_0xa4e361(0x1a8)+_0x302691+'/add',{'body':_0x11730a});return _0x2b078e(_0x301ec6[_0xa4e361(0x1b2)]['comment'],_0x26f332);}}async[_0x122b3b(0x181)](_0x538633){const _0x2581c9=_0x122b3b;var _0x1ad2fe,_0x4e9c10;const {text:_0x3b078f,unitId:_0x1d08c5}=_0x538633,_0x15083f=(_0x4e9c10=(_0x1ad2fe=_0x3b078f[_0x2581c9(0x17e)])==null?void 0x0:_0x1ad2fe[_0x2581c9(0x19c)](_0x56fb66=>_0x56fb66[_0x2581c9(0x1e5)]===_0x42b4da[_0x2581c9(0x1cc)]['COMMENT'])['map'](_0x364b10=>_0x364b10[_0x2581c9(0x1aa)]))!=null?_0x4e9c10:[],_0x304e6b=JSON['stringify'](_0x3b078f),_0x1e1dbf=_0x538633[_0x2581c9(0x17d)],_0x527701=_0x538633['id'],_0x55d75f={'memberId':(await this['_sessionService'][_0x2581c9(0x1f2)](_0x1d08c5))[_0x2581c9(0x1db)](),'unitId':_0x1d08c5,'threadId':_0x1e1dbf,'mention':_0x15083f,'content':_0x304e6b,'replyId':_0x527701},_0x2106f7=await this['_httpService'][_0x2581c9(0x1a9)](_0x2581c9(0x1a8)+_0x1d08c5+'/edit',{'body':_0x55d75f});return!_0x2106f7['body']['error']||_0x2106f7[_0x2581c9(0x1b2)][_0x2581c9(0x1e4)][_0x2581c9(0x172)]===0x1;}async['resolveComment'](_0x322a8c){const _0x3816da=_0x122b3b,{unitId:_0x4d191f}=_0x322a8c,_0x57a606=_0x322a8c[_0x3816da(0x17d)],_0x42197d={'memberId':this[_0x3816da(0x18a)][_0x3816da(0x1df)]()[_0x3816da(0x177)],'unitId':_0x4d191f,'threadId':_0x57a606,'solved':_0x322a8c[_0x3816da(0x1cd)]?_0x57db8b[_0x3816da(0x1ae)]:_0x57db8b[_0x3816da(0x182)]},_0x28235d=await this[_0x3816da(0x1e3)][_0x3816da(0x1a9)](_0x3816da(0x1a8)+_0x4d191f+'/solved',{'body':_0x42197d});return!_0x28235d[_0x3816da(0x1b2)]['error']||_0x28235d[_0x3816da(0x1b2)][_0x3816da(0x1e4)][_0x3816da(0x172)]===0x1;}async[_0x122b3b(0x1ce)](_0x301bd6,_0x534bfe,_0x4af9b3,_0x3f1edc){const _0xacc608=_0x122b3b,_0x4b5031={'memberId':(await this[_0xacc608(0x1a4)][_0xacc608(0x1f2)](_0x301bd6))[_0xacc608(0x1db)](),'threadId':_0x4af9b3,'replyId':_0x3f1edc,'unitId':_0x301bd6},_0x5bf123=await this[_0xacc608(0x1e3)][_0xacc608(0x1a9)](_0xacc608(0x1a8)+_0x301bd6+_0xacc608(0x1d1),{'body':_0x4b5031});return!_0x5bf123[_0xacc608(0x1b2)][_0xacc608(0x1e4)]||_0x5bf123[_0xacc608(0x1b2)]['error']['code']===0x1;}async['listComments'](_0x272624,_0x59846e,_0x421c0c){const _0x589349=_0x122b3b,_0x47c1d1={'unitId':_0x272624,'threadId':_0x421c0c},_0x4f2ea1=await this[_0x589349(0x1e3)]['post'](_0x589349(0x1a8)+_0x272624+_0x589349(0x1ab),{'body':_0x47c1d1}),_0x54f01d=_0x421c0c[_0x589349(0x1b6)](_0x4844cf=>_0x4cf10f(_0x4f2ea1[_0x589349(0x1b2)]['comments'][_0x4844cf],_0x272624,_0x59846e))[_0x589349(0x19c)](Boolean);return Object[_0x589349(0x1bc)](_0x4f2ea1[_0x589349(0x1b2)][_0x589349(0x188)])[_0x589349(0x1b0)](_0x277732=>{const _0x48d72e=_0x589349;this[_0x48d72e(0x18a)][_0x48d72e(0x1d4)](_0x277732);}),_0x54f01d;}[_0x122b3b(0x197)](_0x2ba70d){const _0x4120d9=_0x122b3b;return{'id':_0x2ba70d['id'],'threadId':_0x2ba70d['threadId'],'ref':_0x2ba70d[_0x4120d9(0x1f3)]};}};_0x3a7176=_0x22df30([_0x10ea5c(0x0,_0x42b4da[_0x122b3b(0x1b5)](_0x2bc6d0[_0x122b3b(0x1c2)])),_0x10ea5c(0x1,_0x42b4da[_0x122b3b(0x1b5)](_0x42b4da[_0x122b3b(0x1a3)])),_0x10ea5c(0x2,_0x42b4da[_0x122b3b(0x1b5)](_0x2a4d49['CollaborationSessionService'])),_0x10ea5c(0x3,_0x42b4da['Inject'](_0x42b4da[_0x122b3b(0x1f1)]))],_0x3a7176);var _0x337f26=Object[_0x122b3b(0x183)],_0x11098e=(_0x483488,_0xcfa3ee,_0x5002b7,_0x5a5396)=>{for(var _0xb90790=_0x5a5396>0x1?void 0x0:_0x5a5396?_0x337f26(_0xcfa3ee,_0x5002b7):_0xcfa3ee,_0x21437e=_0x483488['length']-0x1,_0xe7d30d;_0x21437e>=0x0;_0x21437e--)(_0xe7d30d=_0x483488[_0x21437e])&&(_0xb90790=_0xe7d30d(_0xb90790)||_0xb90790);return _0xb90790;},_0x110b96=(_0x36198d,_0x3dda8a)=>(_0x1c02cd,_0x28d07e)=>_0x3dda8a(_0x1c02cd,_0x28d07e,_0x36198d);let _0x1de9d9=class extends _0x42b4da[_0x122b3b(0x1a7)]{constructor(_0x3c68a6,_0x5f5b81){const _0x2011e0=_0x122b3b;super(),this['_threadCommentDataSourceService']=_0x3c68a6,this[_0x2011e0(0x19e)]=_0x5f5b81,this['_initDataSource']();}[_0x122b3b(0x17c)](){const _0x44e0ca=_0x122b3b;this[_0x44e0ca(0x1a1)][_0x44e0ca(0x189)]=this[_0x44e0ca(0x19e)],this[_0x44e0ca(0x1a1)][_0x44e0ca(0x1c8)]=!0x1;}};_0x1de9d9=_0x11098e([_0x110b96(0x0,_0x2f850a[_0x122b3b(0x1c5)]),_0x110b96(0x1,_0x42b4da[_0x122b3b(0x1b5)](_0x3a7176))],_0x1de9d9);var _0x3731c1=Object[_0x122b3b(0x1dd)],_0x2e46be=Object[_0x122b3b(0x183)],_0x2319a4=(_0x31b083,_0x36db80,_0x361987)=>_0x36db80 in _0x31b083?_0x3731c1(_0x31b083,_0x36db80,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x361987}):_0x31b083[_0x36db80]=_0x361987,_0x34b03a=(_0x2816af,_0x5e717a,_0x26f231,_0x45867c)=>{const _0x57ad69=_0x122b3b;for(var _0x20f0bd=_0x45867c>0x1?void 0x0:_0x45867c?_0x2e46be(_0x5e717a,_0x26f231):_0x5e717a,_0x22f5fa=_0x2816af[_0x57ad69(0x1d8)]-0x1,_0x1fe57b;_0x22f5fa>=0x0;_0x22f5fa--)(_0x1fe57b=_0x2816af[_0x22f5fa])&&(_0x20f0bd=_0x1fe57b(_0x20f0bd)||_0x20f0bd);return _0x20f0bd;},_0x496077=(_0x5875a3,_0x5c2eab)=>(_0x866b76,_0x38f397)=>_0x5c2eab(_0x866b76,_0x38f397,_0x5875a3),_0x5ceb2f=(_0x4dd71c,_0x2acd9f,_0x69cfcc)=>_0x2319a4(_0x4dd71c,typeof _0x2acd9f!=_0x122b3b(0x185)?_0x2acd9f+'':_0x2acd9f,_0x69cfcc);_0x5742a6[_0x122b3b(0x19b)]=class extends _0x42b4da[_0x122b3b(0x195)]{constructor(_0x6ebdd7=_0x9982d4,_0x31fa37,_0x475da8){const _0x2ac580=_0x122b3b;super(),this[_0x2ac580(0x190)]=_0x6ebdd7,this['_injector']=_0x31fa37,this[_0x2ac580(0x171)]=_0x475da8;const {..._0x3defac}=_0x42b4da['merge']({},_0x9982d4,this['_config']);this[_0x2ac580(0x171)][_0x2ac580(0x18e)](_0x5ec5d5,_0x3defac);}[_0x122b3b(0x192)](){const _0x37a8c6=_0x122b3b;[[_0x3a7176],[_0x1de9d9],[_0xdbacdc]][_0x37a8c6(0x1b0)](_0x16e48b=>{const _0x34da19=_0x37a8c6;this[_0x34da19(0x1d9)][_0x34da19(0x179)](_0x16e48b);});}[_0x122b3b(0x1c7)](){const _0x40f144=_0x122b3b;this[_0x40f144(0x1d9)]['get'](_0x1de9d9),this['_injector'][_0x40f144(0x1d0)](_0xdbacdc);}},_0x5ceb2f(_0x5742a6[_0x122b3b(0x19b)],_0x122b3b(0x1b4),_0xafa4fc),_0x5ceb2f(_0x5742a6[_0x122b3b(0x19b)],'type',_0x42b4da[_0x122b3b(0x1ea)]['UNIVER_UNKNOWN']),_0x5742a6[_0x122b3b(0x19b)]=_0x34b03a([_0x42b4da['DependentOn'](_0x22a6ec[_0x122b3b(0x1cf)],_0x2a4d49['UniverCollaborationClientPlugin'],_0x46234c[_0x122b3b(0x1a6)]),_0x496077(0x1,_0x42b4da[_0x122b3b(0x1b5)](_0x42b4da[_0x122b3b(0x1f1)])),_0x496077(0x2,_0x42b4da[_0x122b3b(0x19f)])],_0x5742a6['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x5742a6,Symbol[_0x122b3b(0x199)],{'value':_0x122b3b(0x1b8)});}));function _0x1bc3(_0x5e24ec,_0x2e8aef){const _0x399028=_0x3990();return _0x1bc3=function(_0x1bc330,_0x4c463e){_0x1bc330=_0x1bc330-0x16f;let _0x4fd966=_0x399028[_0x1bc330];return _0x4fd966;},_0x1bc3(_0x5e24ec,_0x2e8aef);}function _0x3990(){const _0x446cd8=['body','9AmELoI','pluginName','Inject','map','content','Module','_init','personId','size','values','Solve','reply','@univerjs-pro/license','UniverCore','_threadCommentModel','HTTPService','subscribe','find','IThreadCommentDataSourceService','1117557HOsraH','onReady','syncUpdateMutationToColla','pipe','/reply','UniverThreadComment','CustomRangeType','resolved','deleteComment','UniverThreadCommentUIPlugin','get','/delete','Edit','parse','addUser','@univerjs-pro/collaboration-client','@univerjs/thread-comment-ui','user','length','_injector','_commentService','getMemberID','slice','defineProperty','@univerjs/network','getCurrentUser','userId','createTimestamp','unitId','_httpService','error','rangeType','1734368pyhdlf','payload','877011WOVKAf','getComment','UniverInstanceType','getUnit','UNRECOGNIZED','COMMENT','_initUserSync','addComment','dayjs','Injector','requireSession','ref','UniverProThreadCommentDatasource','YYYY/MM/DD\x20HH:mm','Reply','_configService','code','format','replies','1978420dSykST','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userID','solved','add','Add','ThreadCommentModel','_initDataSource','threadId','customRanges','bufferTime','Unknown','updateComment','OpenOrReOpen','getOwnPropertyDescriptor','object','symbol','parentId','root','users','dataSource','_userService','Delete','11uJEaQW','CommentService','setConfig','commentUpdate$','_config','resolveComment','onStarting','6524104vHIAWj','rxjs','Plugin','function','saveCommentToSnapshot','getUser','toStringTag','9968edBpkS','UniverThreadCommentDataSourcePlugin','filter','type','_threadCommentDataSource','IConfigService','UniverProCollaborationClient','_threadCommentDataSourceService','2286030GHIuDh','UserManagerService','_sessionService','delete','UniverLicensePlugin','Disposable','/universer-api/comment/unit/','post','rangeId','/list','UniverThreadCommentUi','replyId','Solved','disposeWithMe','forEach','amd'];_0x3990=function(){return _0x446cd8;};return _0x3990();}
1
+ (function(_0x3e5126,_0x26d3cb){const _0x53768c=_0x2a9b,_0x290b0f=_0x3e5126();while(!![]){try{const _0x25b4bd=parseInt(_0x53768c(0xb7))/0x1+-parseInt(_0x53768c(0xec))/0x2*(-parseInt(_0x53768c(0xb2))/0x3)+parseInt(_0x53768c(0x98))/0x4*(-parseInt(_0x53768c(0xb4))/0x5)+parseInt(_0x53768c(0x115))/0x6*(parseInt(_0x53768c(0xee))/0x7)+parseInt(_0x53768c(0xea))/0x8*(-parseInt(_0x53768c(0xbd))/0x9)+-parseInt(_0x53768c(0xe2))/0xa*(-parseInt(_0x53768c(0xa2))/0xb)+-parseInt(_0x53768c(0x10a))/0xc;if(_0x25b4bd===_0x26d3cb)break;else _0x290b0f['push'](_0x290b0f['shift']());}catch(_0x100d9b){_0x290b0f['push'](_0x290b0f['shift']());}}}(_0x1e90,0x5427e),function(_0x96fabc,_0x16eb9c){const _0x46fcd8=_0x2a9b;typeof exports==_0x46fcd8(0xa7)&&typeof module<'u'?_0x16eb9c(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x46fcd8(0x102)]?define([_0x46fcd8(0xa9),'@univerjs-pro/collaboration-client',_0x46fcd8(0xad),_0x46fcd8(0xe5),_0x46fcd8(0x9c),'@univerjs/thread-comment',_0x46fcd8(0xdc),'@univerjs/network'],_0x16eb9c):(_0x96fabc=typeof globalThis<'u'?globalThis:_0x96fabc||self,_0x16eb9c(_0x96fabc[_0x46fcd8(0xfc)]={},_0x96fabc[_0x46fcd8(0xab)],_0x96fabc[_0x46fcd8(0xc9)],_0x96fabc['UniverCore'],_0x96fabc['UniverThreadCommentUi'],_0x96fabc['UniverThreadComment'],_0x96fabc[_0x46fcd8(0xdc)],_0x96fabc[_0x46fcd8(0xc8)]));}(this,function(_0x545edf,_0x56cc7c,_0x336a84,_0x3064f5,_0x5cf2d3,_0x5efcbf,_0x40e41f,_0x60811d){'use strict';const _0x1ce235=_0x2a9b;const _0x62f104=_0x1ce235(0x9a);var _0x1860ff=(_0x2b39b5=>(_0x2b39b5[_0x2b39b5[_0x1ce235(0xed)]=0x0]='OpenOrReOpen',_0x2b39b5[_0x2b39b5[_0x1ce235(0xd4)]=0x1]=_0x1ce235(0xd4),_0x2b39b5[_0x2b39b5[_0x1ce235(0xce)]=-0x1]='UNRECOGNIZED',_0x2b39b5))(_0x1860ff||{}),_0xe356de=(_0xbd5b40=>(_0xbd5b40[_0xbd5b40[_0x1ce235(0xe3)]=0x0]='Unknown',_0xbd5b40[_0xbd5b40[_0x1ce235(0xd2)]=0x1]=_0x1ce235(0xd2),_0xbd5b40[_0xbd5b40[_0x1ce235(0xf9)]=0x2]=_0x1ce235(0xf9),_0xbd5b40[_0xbd5b40[_0x1ce235(0xb5)]=0x3]=_0x1ce235(0xb5),_0xbd5b40[_0xbd5b40[_0x1ce235(0xac)]=0x4]=_0x1ce235(0xac),_0xbd5b40[_0xbd5b40[_0x1ce235(0xf0)]=0x5]=_0x1ce235(0xf0),_0xbd5b40[_0xbd5b40[_0x1ce235(0xce)]=-0x1]='UNRECOGNIZED',_0xbd5b40))(_0xe356de||{});const _0xd800f7=_0x28dfe4=>_0x3064f5['dayjs'](new Date(+_0x28dfe4))[_0x1ce235(0xa8)](_0x1ce235(0xc6)),_0x309088=async(_0x310daf,_0x186707)=>{const _0x2811d2=_0x1ce235,_0x16f15e=_0x310daf[_0x2811d2(0xc2)](_0x3064f5[_0x2811d2(0xc7)]),_0xa61ac6=_0x310daf[_0x2811d2(0xc2)](_0x60811d['HTTPService']);_0x186707[_0x2811d2(0xaf)](_0xd3287d=>{const _0x2075b5=_0x2811d2;_0x16f15e['getUser'](_0xd3287d)&&_0x186707[_0x2075b5(0xef)](_0xd3287d);}),_0x186707[_0x2811d2(0xe7)]&&(await _0xa61ac6[_0x2811d2(0xc2)](_0x2811d2(0x9e),{'params':{'userIDs':[..._0x186707]}}))[_0x2811d2(0x103)][_0x2811d2(0xeb)][_0x2811d2(0xaf)](_0x65adc9=>{const _0x33af6a=_0x2811d2;_0x65adc9&&_0x16f15e[_0x33af6a(0x104)](_0x65adc9);});};var _0x2ad1a6=Object['getOwnPropertyDescriptor'],_0x13696c=(_0x48ff8d,_0x44510f,_0x57871a,_0x44db76)=>{for(var _0x350e9e=_0x44db76>0x1?void 0x0:_0x44db76?_0x2ad1a6(_0x44510f,_0x57871a):_0x44510f,_0x5a9b9e=_0x48ff8d['length']-0x1,_0x59ff19;_0x5a9b9e>=0x0;_0x5a9b9e--)(_0x59ff19=_0x48ff8d[_0x5a9b9e])&&(_0x350e9e=_0x59ff19(_0x350e9e)||_0x350e9e);return _0x350e9e;},_0x56da1b=(_0x1a5184,_0x581ec9)=>(_0x183e9d,_0x189e88)=>_0x581ec9(_0x183e9d,_0x189e88,_0x1a5184);let _0x52b79c=class extends _0x3064f5[_0x1ce235(0xb8)]{constructor(_0x42bdac,_0x5ea751,_0xdb3c92,_0x2a17f2){const _0x5bd2a3=_0x1ce235;super(),this['_commentService']=_0x42bdac,this[_0x5bd2a3(0xd0)]=_0x5ea751,this[_0x5bd2a3(0xe8)]=_0xdb3c92,this[_0x5bd2a3(0xe9)]=_0x2a17f2,this[_0x5bd2a3(0xb9)](),this[_0x5bd2a3(0xe4)]();}[_0x1ce235(0xe4)](){const _0x1bd5a5=_0x1ce235;this['disposeWithMe'](this['_threadCommentModel'][_0x1bd5a5(0xf5)][_0x1bd5a5(0xfe)](_0x40e41f['bufferTime'](0x10))[_0x1bd5a5(0xe6)](_0x33a52f=>{const _0x5b38e3=_0x1bd5a5,_0x432995=new Set();_0x33a52f[_0x5b38e3(0xaf)](_0x4b7661=>{const _0x458366=_0x5b38e3;switch(_0x4b7661[_0x458366(0xae)]){case _0x458366(0xf1):{const _0x15a077=_0x4b7661[_0x458366(0xa1)][_0x458366(0x114)];_0x432995[_0x458366(0xf1)](_0x15a077);break;}}}),_0x309088(this['_injector'],_0x432995);}));}[_0x1ce235(0xb9)](){const _0x1f4518=_0x1ce235;this['disposeWithMe'](this[_0x1f4518(0xcc)][_0x1f4518(0xf5)][_0x1f4518(0xe6)](async _0x4ae032=>{const _0x18f63d=_0x1f4518;var _0x1668ad,_0x42b25b,_0x4567be,_0xef84ac;const _0x1f7919=(_0x1668ad=this[_0x18f63d(0xd0)][_0x18f63d(0x108)](_0x4ae032[_0x18f63d(0x10d)])['find'](_0x5d22b9=>_0x5d22b9[_0x18f63d(0x10c)]===_0x4ae032[_0x18f63d(0x10c)]))==null?void 0x0:_0x1668ad[_0x18f63d(0x105)];if(!_0x1f7919)return;const {unitId:_0x53c38b,subUnitId:_0x411c31}=_0x1f7919;switch(_0x4ae032['user']&&this[_0x18f63d(0xe8)][_0x18f63d(0x104)](_0x4ae032[_0x18f63d(0xbb)]),_0x4ae032[_0x18f63d(0xae)]){case _0xe356de[_0x18f63d(0xd2)]:break;case _0xe356de[_0x18f63d(0xf9)]:{this[_0x18f63d(0xd0)][_0x18f63d(0x113)](_0x53c38b,_0x411c31,{'unitId':_0x53c38b,'subUnitId':_0x411c31,'ref':'','id':_0x4ae032[_0x18f63d(0xcd)],'dT':_0xd800f7(+_0x4ae032[_0x18f63d(0x107)]),'threadId':_0x4ae032['threadId'],'personId':(_0x4567be=(_0x42b25b=_0x4ae032['user'])==null?void 0x0:_0x42b25b[_0x18f63d(0x119)])!=null?_0x4567be:_0x4ae032[_0x18f63d(0xfd)],'text':JSON[_0x18f63d(0x110)](_0x4ae032[_0x18f63d(0xb1)]),'parentId':_0x1f7919['id']});break;}case _0xe356de[_0x18f63d(0xac)]:{const _0x2a2e27=this[_0x18f63d(0xd0)][_0x18f63d(0xa3)](_0x53c38b,_0x411c31,_0x4ae032[_0x18f63d(0xcd)]);_0x2a2e27&&_0x2a2e27[_0x18f63d(0xb0)]&&this[_0x18f63d(0xd0)][_0x18f63d(0xda)](_0x53c38b,_0x411c31,_0x4ae032[_0x18f63d(0xcd)]);break;}case _0xe356de[_0x18f63d(0xb5)]:{this[_0x18f63d(0xd0)][_0x18f63d(0xc0)](_0x53c38b,_0x411c31,{'commentId':_0x4ae032[_0x18f63d(0xcd)],'text':JSON['parse'](_0x4ae032[_0x18f63d(0xb1)])});break;}case _0xe356de[_0x18f63d(0xf0)]:{const _0x1ec080=(_0xef84ac=this[_0x18f63d(0xd0)]['getUnit'](_0x4ae032[_0x18f63d(0x10d)])[_0x18f63d(0xfb)](_0x4f508=>_0x4f508[_0x18f63d(0x10c)]===_0x4ae032[_0x18f63d(0x10c)]))==null?void 0x0:_0xef84ac[_0x18f63d(0x105)];_0x1ec080&&this['_threadCommentModel']['resolveComment'](_0x53c38b,_0x411c31,_0x1ec080['id'],_0x4ae032['solved']===_0x1860ff[_0x18f63d(0xd4)]);break;}}}));}};_0x52b79c=_0x13696c([_0x56da1b(0x0,_0x3064f5[_0x1ce235(0x106)](_0x56cc7c[_0x1ce235(0xf4)])),_0x56da1b(0x1,_0x3064f5[_0x1ce235(0x106)](_0x5efcbf['ThreadCommentModel'])),_0x56da1b(0x2,_0x3064f5[_0x1ce235(0x106)](_0x3064f5['UserManagerService'])),_0x56da1b(0x3,_0x3064f5[_0x1ce235(0x106)](_0x3064f5[_0x1ce235(0x101)]))],_0x52b79c);const _0x3061b0='thread-comment-data-source.config',_0x3fda5b={};var _0x14b761=Object['getOwnPropertyDescriptor'],_0x39a6fa=(_0x541633,_0x44030d,_0x52b18d,_0x22aa2d)=>{const _0x2aca3=_0x1ce235;for(var _0x57da34=_0x22aa2d>0x1?void 0x0:_0x22aa2d?_0x14b761(_0x44030d,_0x52b18d):_0x44030d,_0x1f429b=_0x541633[_0x2aca3(0xe0)]-0x1,_0x16fa47;_0x1f429b>=0x0;_0x1f429b--)(_0x16fa47=_0x541633[_0x1f429b])&&(_0x57da34=_0x16fa47(_0x57da34)||_0x57da34);return _0x57da34;},_0x32903c=(_0x3a9a23,_0x30a704)=>(_0x70d076,_0x56f57c)=>_0x30a704(_0x70d076,_0x56f57c,_0x3a9a23);function _0x8d3d13(_0x50d5bf,_0x4be0d9){const _0x23697f=_0x1ce235,_0x4f61b0=_0x50d5bf['replies'][0x0];return{..._0x4be0d9,'id':_0x4f61b0[_0x23697f(0xcd)],'resolved':_0x50d5bf[_0x23697f(0x116)]===0x1,'dT':_0xd800f7(_0x4f61b0[_0x23697f(0x107)]),'personId':_0x4f61b0[_0x23697f(0xfd)],'threadId':_0x4f61b0[_0x23697f(0x10c)]};}function _0x1552cd(_0x2097a3,_0x3f507c,_0x154396){const _0x2243a9=_0x1ce235;var _0x18ec45,_0x1d21d9;if(((_0x1d21d9=(_0x18ec45=_0x2097a3==null?void 0x0:_0x2097a3['replies'])==null?void 0x0:_0x18ec45[_0x2243a9(0xe0)])!=null?_0x1d21d9:0x0)>0x0){const _0x31c71c=(_0x2ae71c,_0x21ef60)=>({'id':_0x2ae71c[_0x2243a9(0xcd)],'threadId':_0x2ae71c[_0x2243a9(0x10c)],'dT':_0xd800f7(_0x2ae71c[_0x2243a9(0x107)]),'personId':_0x2ae71c[_0x2243a9(0xfd)],'resolved':_0x2097a3[_0x2243a9(0x116)]===_0x1860ff[_0x2243a9(0xd4)],'unitId':_0x3f507c,'subUnitId':_0x154396,'text':JSON[_0x2243a9(0x110)](_0x2ae71c[_0x2243a9(0xb1)]),'parentId':_0x21ef60}),_0x3b9050=_0x31c71c(_0x2097a3['replies'][0x0]);return{..._0x3b9050,'children':_0x2097a3[_0x2243a9(0x10b)][_0x2243a9(0xbe)](0x1)[_0x2243a9(0xa6)](_0x192f55=>_0x31c71c(_0x192f55,_0x3b9050['id']))};}return null;}let _0x52bed4=class{constructor(_0x57b09e,_0x4f3477,_0x226a05,_0x525842){const _0xed05ea=_0x1ce235;this[_0xed05ea(0xf7)]=_0x57b09e,this['_userService']=_0x4f3477,this[_0xed05ea(0xbc)]=_0x226a05,this[_0xed05ea(0xe9)]=_0x525842;}async['addComment'](_0x32248e){const _0x13bfa9=_0x1ce235;var _0xf631fd,_0x5d2ea3;const {parentId:_0x237ebd,unitId:_0x1ffe39,text:_0x138e5d,threadId:_0x4447b5}=_0x32248e,_0x101e5f=(_0x5d2ea3=(_0xf631fd=_0x138e5d[_0x13bfa9(0xdb)])==null?void 0x0:_0xf631fd[_0x13bfa9(0x9f)](_0x3102e3=>_0x3102e3['rangeType']===_0x3064f5[_0x13bfa9(0xaa)]['COMMENT'])[_0x13bfa9(0xa6)](_0xcd961f=>_0xcd961f[_0x13bfa9(0xcb)]))!=null?_0x5d2ea3:[],_0x37b213=JSON['stringify'](_0x138e5d),_0x1a1688=(await this[_0x13bfa9(0xbc)][_0x13bfa9(0x9d)](_0x1ffe39))[_0x13bfa9(0xd5)]();if(_0x237ebd){const _0x1e7b7c={'memberId':_0x1a1688,'unitId':_0x1ffe39,'content':_0x37b213,'mention':_0x101e5f,'threadId':_0x4447b5},_0x4b9852=(await this[_0x13bfa9(0xf7)]['post'](_0x13bfa9(0xbf)+_0x1ffe39+'/reply',{'body':_0x1e7b7c}))['body']['reply'];return{..._0x32248e,'id':_0x4b9852[_0x13bfa9(0xcd)],'dT':_0x3064f5['dayjs'](+_0x4b9852[_0x13bfa9(0x107)])[_0x13bfa9(0xa8)](_0x13bfa9(0xc6)),'personId':_0x4b9852[_0x13bfa9(0xfd)]};}else{const _0x2ac222={'memberId':_0x1a1688,'unitId':_0x1ffe39,'content':_0x37b213,'mention':_0x101e5f},_0x4f3150=await this[_0x13bfa9(0xf7)][_0x13bfa9(0x118)]('/universer-api/comment/unit/'+_0x1ffe39+_0x13bfa9(0x111),{'body':_0x2ac222});return _0x8d3d13(_0x4f3150[_0x13bfa9(0x103)][_0x13bfa9(0x9b)],_0x32248e);}}async[_0x1ce235(0xc0)](_0x1040c5){const _0x5e654d=_0x1ce235;var _0x205422,_0x87b5eb;const {text:_0x8eea5b,unitId:_0x13af5a}=_0x1040c5,_0x5aa54b=(_0x87b5eb=(_0x205422=_0x8eea5b['customRanges'])==null?void 0x0:_0x205422[_0x5e654d(0x9f)](_0x159354=>_0x159354['rangeType']===_0x3064f5[_0x5e654d(0xaa)]['COMMENT'])[_0x5e654d(0xa6)](_0x2f2261=>_0x2f2261[_0x5e654d(0xcb)]))!=null?_0x87b5eb:[],_0x8da19d=JSON[_0x5e654d(0xd6)](_0x8eea5b),_0xf086d1=_0x1040c5['threadId'],_0x444736=_0x1040c5['id'],_0x3ac2cf={'memberId':(await this[_0x5e654d(0xbc)][_0x5e654d(0x9d)](_0x13af5a))[_0x5e654d(0xd5)](),'unitId':_0x13af5a,'threadId':_0xf086d1,'mention':_0x5aa54b,'content':_0x8da19d,'replyId':_0x444736},_0x5b2031=await this[_0x5e654d(0xf7)]['post'](_0x5e654d(0xbf)+_0x13af5a+_0x5e654d(0xca),{'body':_0x3ac2cf});return!_0x5b2031[_0x5e654d(0x103)]['error']||_0x5b2031['body']['error'][_0x5e654d(0xd8)]===0x1;}async['resolveComment'](_0x33e791){const _0x5dd20a=_0x1ce235,{unitId:_0x22a35e}=_0x33e791,_0x2f81b6=_0x33e791[_0x5dd20a(0x10c)],_0x2b3de1={'memberId':this[_0x5dd20a(0xe8)][_0x5dd20a(0xb6)]()[_0x5dd20a(0x119)],'unitId':_0x22a35e,'threadId':_0x2f81b6,'solved':_0x33e791['resolved']?_0x1860ff[_0x5dd20a(0xd4)]:_0x1860ff[_0x5dd20a(0xed)]},_0x308327=await this['_httpService'][_0x5dd20a(0x118)]('/universer-api/comment/unit/'+_0x22a35e+_0x5dd20a(0x100),{'body':_0x2b3de1});return!_0x308327[_0x5dd20a(0x103)][_0x5dd20a(0xd9)]||_0x308327[_0x5dd20a(0x103)][_0x5dd20a(0xd9)]['code']===0x1;}async[_0x1ce235(0xda)](_0x237e2d,_0x35232c,_0x58262f,_0x3b802f){const _0x4338eb=_0x1ce235,_0x3083cf={'memberId':(await this['_sessionService'][_0x4338eb(0x9d)](_0x237e2d))[_0x4338eb(0xd5)](),'threadId':_0x58262f,'replyId':_0x3b802f,'unitId':_0x237e2d},_0x5b1f81=await this[_0x4338eb(0xf7)][_0x4338eb(0x118)](_0x4338eb(0xbf)+_0x237e2d+_0x4338eb(0xf6),{'body':_0x3083cf});return!_0x5b1f81['body'][_0x4338eb(0xd9)]||_0x5b1f81[_0x4338eb(0x103)][_0x4338eb(0xd9)][_0x4338eb(0xd8)]===0x1;}async[_0x1ce235(0xd3)](_0x4c88ef,_0x4a9045,_0x33dbfc){const _0xba3a17=_0x1ce235,_0x5725bc={'unitId':_0x4c88ef,'threadId':_0x33dbfc},_0x362034=await this[_0xba3a17(0xf7)]['post'](_0xba3a17(0xbf)+_0x4c88ef+_0xba3a17(0xc4),{'body':_0x5725bc}),_0x1f389f=_0x33dbfc['map'](_0x3d01cb=>_0x1552cd(_0x362034[_0xba3a17(0x103)][_0xba3a17(0x99)][_0x3d01cb],_0x4c88ef,_0x4a9045))[_0xba3a17(0x9f)](Boolean);return Object[_0xba3a17(0xba)](_0x362034['body'][_0xba3a17(0xeb)])[_0xba3a17(0xaf)](_0x2568d6=>{const _0x4bde95=_0xba3a17;this[_0x4bde95(0xe8)][_0x4bde95(0x104)](_0x2568d6);}),_0x1f389f;}[_0x1ce235(0xc5)](_0x563423){const _0x379407=_0x1ce235;return{'id':_0x563423['id'],'threadId':_0x563423[_0x379407(0x10c)],'ref':_0x563423[_0x379407(0x10f)]};}};_0x52bed4=_0x39a6fa([_0x32903c(0x0,_0x3064f5[_0x1ce235(0x106)](_0x60811d[_0x1ce235(0xd7)])),_0x32903c(0x1,_0x3064f5[_0x1ce235(0x106)](_0x3064f5[_0x1ce235(0xc7)])),_0x32903c(0x2,_0x3064f5[_0x1ce235(0x106)](_0x56cc7c['CollaborationSessionService'])),_0x32903c(0x3,_0x3064f5[_0x1ce235(0x106)](_0x3064f5[_0x1ce235(0x101)]))],_0x52bed4);var _0xb9a9ce=Object[_0x1ce235(0xf8)],_0x2847d1=(_0x33a684,_0x313559,_0x4d6b35,_0x3d7a2b)=>{const _0x22c79a=_0x1ce235;for(var _0x4438de=_0x3d7a2b>0x1?void 0x0:_0x3d7a2b?_0xb9a9ce(_0x313559,_0x4d6b35):_0x313559,_0x14a090=_0x33a684[_0x22c79a(0xe0)]-0x1,_0x30d402;_0x14a090>=0x0;_0x14a090--)(_0x30d402=_0x33a684[_0x14a090])&&(_0x4438de=_0x30d402(_0x4438de)||_0x4438de);return _0x4438de;},_0x2b1209=(_0x242c51,_0x1308da)=>(_0x10c207,_0x5dcf64)=>_0x1308da(_0x10c207,_0x5dcf64,_0x242c51);let _0x39bb2f=class extends _0x3064f5[_0x1ce235(0xb8)]{constructor(_0xbc76e1,_0x13d6bb){const _0x2c6d3d=_0x1ce235;super(),this[_0x2c6d3d(0xf3)]=_0xbc76e1,this['_threadCommentDataSource']=_0x13d6bb,this['_initDataSource']();}[_0x1ce235(0xf2)](){const _0x1a07da=_0x1ce235;this[_0x1a07da(0xf3)][_0x1a07da(0xb3)]=this[_0x1a07da(0xc3)],this[_0x1a07da(0xf3)][_0x1a07da(0xde)]=!0x1;}};_0x39bb2f=_0x2847d1([_0x2b1209(0x0,_0x5efcbf[_0x1ce235(0xfa)]),_0x2b1209(0x1,_0x3064f5[_0x1ce235(0x106)](_0x52bed4))],_0x39bb2f);var _0x32e35b=Object[_0x1ce235(0xdf)],_0x45c325=Object[_0x1ce235(0xf8)],_0x290cd8=(_0x1feb7f,_0x114c41,_0x1c56eb)=>_0x114c41 in _0x1feb7f?_0x32e35b(_0x1feb7f,_0x114c41,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1c56eb}):_0x1feb7f[_0x114c41]=_0x1c56eb,_0x22f307=(_0x1cf3ed,_0x3d5622,_0x70c47e,_0x1982b5)=>{for(var _0xa1ef8d=_0x1982b5>0x1?void 0x0:_0x1982b5?_0x45c325(_0x3d5622,_0x70c47e):_0x3d5622,_0x4c80fa=_0x1cf3ed['length']-0x1,_0x59b884;_0x4c80fa>=0x0;_0x4c80fa--)(_0x59b884=_0x1cf3ed[_0x4c80fa])&&(_0xa1ef8d=_0x59b884(_0xa1ef8d)||_0xa1ef8d);return _0xa1ef8d;},_0x242ff4=(_0x42731e,_0x526763)=>(_0x268967,_0x5bdb9d)=>_0x526763(_0x268967,_0x5bdb9d,_0x42731e),_0x39b7c4=(_0x5bd678,_0x183a53,_0x2a2690)=>_0x290cd8(_0x5bd678,typeof _0x183a53!=_0x1ce235(0xcf)?_0x183a53+'':_0x183a53,_0x2a2690);_0x545edf['UniverThreadCommentDataSourcePlugin']=class extends _0x3064f5['Plugin']{constructor(_0x5efa4b=_0x3fda5b,_0x316a84,_0x537687){const _0x5f1d5f=_0x1ce235;super(),this['_config']=_0x5efa4b,this[_0x5f1d5f(0xe9)]=_0x316a84,this[_0x5f1d5f(0xd1)]=_0x537687;const {..._0x282142}=_0x3064f5[_0x5f1d5f(0xff)]({},_0x3fda5b,this[_0x5f1d5f(0xdd)]);this['_configService'][_0x5f1d5f(0x112)](_0x3061b0,_0x282142);}['onStarting'](){[[_0x52bed4],[_0x39bb2f],[_0x52b79c]]['forEach'](_0x287cce=>{const _0x495a8f=_0x2a9b;this[_0x495a8f(0xe9)][_0x495a8f(0xf1)](_0x287cce);});}['onReady'](){const _0x14316a=_0x1ce235;this[_0x14316a(0xe9)][_0x14316a(0xc2)](_0x39bb2f),this[_0x14316a(0xe9)][_0x14316a(0xc2)](_0x52b79c);}},_0x39b7c4(_0x545edf[_0x1ce235(0x117)],_0x1ce235(0xa5),_0x62f104),_0x39b7c4(_0x545edf[_0x1ce235(0x117)],'type',_0x3064f5[_0x1ce235(0xa4)]['UNIVER_UNKNOWN']),_0x545edf[_0x1ce235(0x117)]=_0x22f307([_0x3064f5[_0x1ce235(0x10e)](_0x5cf2d3[_0x1ce235(0x109)],_0x56cc7c['UniverCollaborationClientPlugin'],_0x336a84[_0x1ce235(0xa0)]),_0x242ff4(0x1,_0x3064f5['Inject'](_0x3064f5['Injector'])),_0x242ff4(0x2,_0x3064f5[_0x1ce235(0xc1)])],_0x545edf['UniverThreadCommentDataSourcePlugin']),Object[_0x1ce235(0xdf)](_0x545edf,Symbol['toStringTag'],{'value':_0x1ce235(0xe1)});}));function _0x2a9b(_0x34d043,_0x501a18){const _0x1e90fb=_0x1e90();return _0x2a9b=function(_0x2a9bee,_0x5ec0c0){_0x2a9bee=_0x2a9bee-0x98;let _0x2f754b=_0x1e90fb[_0x2a9bee];return _0x2f754b;},_0x2a9b(_0x34d043,_0x501a18);}function _0x1e90(){const _0x35ce4b=['pluginName','map','object','format','exports','CustomRangeType','UniverProCollaborationClient','Delete','@univerjs-pro/license','type','forEach','parentId','content','3CMlhbm','dataSource','99305vXSODl','Edit','getCurrentUser','528635RAoFMh','Disposable','_init','values','user','_sessionService','987111ATcNzh','slice','/universer-api/comment/unit/','updateComment','IConfigService','get','_threadCommentDataSource','/list','saveCommentToSnapshot','YYYY/MM/DD\x20HH:mm','UserManagerService','UniverNetwork','UniverProLicense','/edit','rangeId','_commentService','replyId','UNRECOGNIZED','symbol','_threadCommentModel','_configService','Add','listComments','Solved','getMemberID','stringify','HTTPService','code','error','deleteComment','customRanges','rxjs','_config','syncUpdateMutationToColla','defineProperty','length','Module','680EtgQoh','Unknown','_initUserSync','@univerjs/core','subscribe','size','_userService','_injector','32QngJqW','users','1345286ZoBJGQ','OpenOrReOpen','539JgZonf','delete','Solve','add','_initDataSource','_threadCommentDataSourceService','CommentService','commentUpdate$','/delete','_httpService','getOwnPropertyDescriptor','Reply','IThreadCommentDataSourceService','find','UniverProThreadCommentDatasource','userId','pipe','merge','/solved','Injector','amd','body','addUser','root','Inject','createTimestamp','getUnit','UniverThreadCommentUIPlugin','11704044NIECvv','replies','threadId','unitId','DependentOn','ref','parse','/add','setConfig','addComment','personId','46572lAmrAo','solved','UniverThreadCommentDataSourcePlugin','post','userID','116Qoekma','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comment','@univerjs/thread-comment-ui','requireSession','/universer-api/user/list','filter','UniverLicensePlugin','payload','86669jlFObI','getComment','UniverInstanceType'];_0x1e90=function(){return _0x35ce4b;};return _0x1e90();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.2-nightly.202507171607",
3
+ "version": "0.9.2-nightly.202507181608",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.9.2-nightly.202507171607",
49
- "@univerjs-pro/license": "0.9.2-nightly.202507171607",
50
- "@univerjs/core": "0.9.2-nightly.202507171607",
48
+ "@univerjs-pro/collaboration-client": "0.9.2-nightly.202507181608",
49
+ "@univerjs-pro/license": "0.9.2-nightly.202507181608",
50
+ "@univerjs/core": "0.9.2-nightly.202507181608",
51
+ "@univerjs/network": "0.9.2-nightly.202507181608",
52
+ "@univerjs/thread-comment": "0.9.2-nightly.202507181608",
51
53
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/thread-comment": "0.9.2-nightly.202507171607",
53
- "@univerjs/network": "0.9.2-nightly.202507171607",
54
- "@univerjs/thread-comment-ui": "0.9.2-nightly.202507171607"
54
+ "@univerjs/thread-comment-ui": "0.9.2-nightly.202507181608"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",