@univerjs-pro/thread-comment-datasource 0.12.3-experimental.20251204-1549a8e → 0.12.3-experimental.20251205-71d07c3

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 _0x34930f=_0x5ef9;(function(_0x265a4c,_0x4e8e8d){const _0x1741eb=_0x5ef9,_0xdc37c3=_0x265a4c();while(!![]){try{const _0x3d38ab=-parseInt(_0x1741eb(0xd3))/0x1+-parseInt(_0x1741eb(0x96))/0x2*(-parseInt(_0x1741eb(0xa4))/0x3)+parseInt(_0x1741eb(0x7e))/0x4*(-parseInt(_0x1741eb(0xc1))/0x5)+-parseInt(_0x1741eb(0xc3))/0x6+-parseInt(_0x1741eb(0xa1))/0x7+-parseInt(_0x1741eb(0x75))/0x8*(parseInt(_0x1741eb(0x6a))/0x9)+-parseInt(_0x1741eb(0xb4))/0xa*(-parseInt(_0x1741eb(0xb5))/0xb);if(_0x3d38ab===_0x4e8e8d)break;else _0xdc37c3['push'](_0xdc37c3['shift']());}catch(_0x6ab431){_0xdc37c3['push'](_0xdc37c3['shift']());}}}(_0x2384,0x2064f));Object[_0x34930f(0xb9)](exports,Symbol[_0x34930f(0x73)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x34930f(0x66);var I=(_0x1d950a=>(_0x1d950a[_0x1d950a[_0x34930f(0x6d)]=0x0]=_0x34930f(0x6d),_0x1d950a[_0x1d950a[_0x34930f(0x69)]=0x1]=_0x34930f(0x69),_0x1d950a[_0x1d950a[_0x34930f(0xdc)]=-0x1]=_0x34930f(0xdc),_0x1d950a))(I||{}),v=(_0xafe83a=>(_0xafe83a[_0xafe83a[_0x34930f(0xaa)]=0x0]=_0x34930f(0xaa),_0xafe83a[_0xafe83a[_0x34930f(0xd4)]=0x1]=_0x34930f(0xd4),_0xafe83a[_0xafe83a[_0x34930f(0x89)]=0x2]='Reply',_0xafe83a[_0xafe83a[_0x34930f(0xba)]=0x3]=_0x34930f(0xba),_0xafe83a[_0xafe83a[_0x34930f(0x71)]=0x4]=_0x34930f(0x71),_0xafe83a[_0xafe83a[_0x34930f(0xdf)]=0x5]='Solve',_0xafe83a[_0xafe83a[_0x34930f(0xdc)]=-0x1]='UNRECOGNIZED',_0xafe83a))(v||{});const f=_0x165fb9=>c[_0x34930f(0xb0)](new Date(+_0x165fb9))[_0x34930f(0x78)](_0x34930f(0xca)),R=async(_0x1e5fa4,_0x2a2dbd)=>{const _0xc4337a=_0x34930f,_0x47c496=_0x1e5fa4[_0xc4337a(0x74)](c[_0xc4337a(0x76)]),_0x3d15b5=_0x1e5fa4[_0xc4337a(0x74)](P[_0xc4337a(0xa5)]);_0x2a2dbd['forEach'](_0x519b8c=>{const _0x345e7e=_0xc4337a;_0x47c496[_0x345e7e(0x7b)](_0x519b8c)&&_0x2a2dbd[_0x345e7e(0x9d)](_0x519b8c);}),_0x2a2dbd[_0xc4337a(0x92)]&&(await _0x3d15b5[_0xc4337a(0x74)](_0xc4337a(0xbc),{'params':{'userIDs':[..._0x2a2dbd]}}))['body'][_0xc4337a(0xd1)][_0xc4337a(0xc9)](_0x2650b8=>{const _0x5882ab=_0xc4337a;_0x2650b8&&_0x47c496[_0x5882ab(0x93)](_0x2650b8);});};var $=Object[_0x34930f(0x9e)],E=(_0x53e257,_0x4f4e62,_0x46f487,_0x2de7f3)=>{for(var _0x3b3a96=_0x2de7f3>0x1?void 0x0:_0x2de7f3?$(_0x4f4e62,_0x46f487):_0x4f4e62,_0x180c11=_0x53e257['length']-0x1,_0x231d31;_0x180c11>=0x0;_0x180c11--)(_0x231d31=_0x53e257[_0x180c11])&&(_0x3b3a96=_0x231d31(_0x3b3a96)||_0x3b3a96);return _0x3b3a96;},S=(_0x936dbf,_0x5357fb)=>(_0x480579,_0x448cf1)=>_0x5357fb(_0x480579,_0x448cf1,_0x936dbf);let _=class extends c[_0x34930f(0xd0)]{constructor(_0x4be9ad,_0x117b2d,_0x3d6e05,_0x1ee03b){const _0x149692=_0x34930f;super(),this[_0x149692(0xde)]=_0x4be9ad,this[_0x149692(0xbe)]=_0x117b2d,this[_0x149692(0x90)]=_0x3d6e05,this[_0x149692(0xd7)]=_0x1ee03b,this['_init'](),this[_0x149692(0x95)]();}[_0x34930f(0x95)](){const _0x4ca4fd=_0x34930f;this[_0x4ca4fd(0xae)](this[_0x4ca4fd(0xbe)][_0x4ca4fd(0xb3)][_0x4ca4fd(0xd9)](j[_0x4ca4fd(0x7f)](0x10))[_0x4ca4fd(0xc7)](_0x4a5239=>{const _0x55cec4=_0x4ca4fd,_0x4ec51b=new Set();_0x4a5239[_0x55cec4(0xc9)](_0x1be55b=>{const _0xc306d7=_0x55cec4;switch(_0x1be55b[_0xc306d7(0xa9)]){case _0xc306d7(0x65):{const _0x3dff76=_0x1be55b[_0xc306d7(0xcb)][_0xc306d7(0x7d)];_0x4ec51b[_0xc306d7(0x65)](_0x3dff76);break;}}}),R(this[_0x55cec4(0xd7)],_0x4ec51b);}));}[_0x34930f(0x77)](){const _0x2358df=_0x34930f;this[_0x2358df(0xae)](this[_0x2358df(0xde)]['commentUpdate$'][_0x2358df(0xc7)](async _0x156c3e=>{const _0x28bf9b=_0x2358df;var _0x257424,_0x34e7cc,_0x2baedf,_0x5b843a;const _0x307df5=(_0x257424=this[_0x28bf9b(0xbe)][_0x28bf9b(0xac)](_0x156c3e[_0x28bf9b(0xb8)])[_0x28bf9b(0xbb)](_0x34277d=>_0x34277d[_0x28bf9b(0x99)]===_0x156c3e[_0x28bf9b(0x99)]))==null?void 0x0:_0x257424[_0x28bf9b(0xb2)];if(!_0x307df5)return;const {unitId:_0x3add95,subUnitId:_0x3e3662}=_0x307df5;switch(_0x156c3e[_0x28bf9b(0xd6)]&&this[_0x28bf9b(0x90)][_0x28bf9b(0x93)](_0x156c3e[_0x28bf9b(0xd6)]),_0x156c3e[_0x28bf9b(0xa9)]){case v['Add']:break;case v[_0x28bf9b(0x89)]:{this['_threadCommentModel']['addComment'](_0x3add95,_0x3e3662,{'unitId':_0x3add95,'subUnitId':_0x3e3662,'ref':'','id':_0x156c3e['replyId'],'dT':f(+_0x156c3e[_0x28bf9b(0x97)]),'threadId':_0x156c3e[_0x28bf9b(0x99)],'personId':(_0x2baedf=(_0x34e7cc=_0x156c3e[_0x28bf9b(0xd6)])==null?void 0x0:_0x34e7cc[_0x28bf9b(0xb1)])!=null?_0x2baedf:_0x156c3e['userId'],'text':JSON[_0x28bf9b(0x82)](_0x156c3e['content']),'parentId':_0x307df5['id']});break;}case v[_0x28bf9b(0x71)]:{const _0x5806e7=this[_0x28bf9b(0xbe)][_0x28bf9b(0x79)](_0x3add95,_0x3e3662,_0x156c3e[_0x28bf9b(0xcd)]);_0x5806e7&&_0x5806e7[_0x28bf9b(0xd2)]&&this[_0x28bf9b(0xbe)][_0x28bf9b(0xcc)](_0x3add95,_0x3e3662,_0x156c3e['replyId']);break;}case v[_0x28bf9b(0xba)]:{this[_0x28bf9b(0xbe)][_0x28bf9b(0x86)](_0x3add95,_0x3e3662,{'commentId':_0x156c3e[_0x28bf9b(0xcd)],'text':JSON[_0x28bf9b(0x82)](_0x156c3e[_0x28bf9b(0x9b)])});break;}case v[_0x28bf9b(0xdf)]:{const _0x4ad4c7=(_0x5b843a=this['_threadCommentModel'][_0x28bf9b(0xac)](_0x156c3e['unitId'])['find'](_0x2fc3bf=>_0x2fc3bf[_0x28bf9b(0x99)]===_0x156c3e[_0x28bf9b(0x99)]))==null?void 0x0:_0x5b843a['root'];_0x4ad4c7&&this[_0x28bf9b(0xbe)][_0x28bf9b(0x8b)](_0x3add95,_0x3e3662,_0x4ad4c7['id'],_0x156c3e[_0x28bf9b(0xa0)]===I[_0x28bf9b(0x69)]);break;}}}));}};function _0x2384(){const _0x5523fa=['requireSession','OpenOrReOpen','onReady','Injector','/list','Delete','ThreadCommentModel','toStringTag','get','909080NzMJBP','UserManagerService','_init','format','getComment','body','getUser','_threadCommentDataSource','personId','316xuqjdJ','bufferTime','CollaborationSessionService','replies','parse','rangeType','_httpService','/delete','updateComment','saveCommentToSnapshot','/universer-api/comment/unit/','Reply','thread-comment-data-source.config','resolveComment','comment','listComments','getCurrentUser','map','_userService','rangeId','size','addUser','_configService','_initUserSync','182KaSIIy','createTimestamp','_sessionService','threadId','_threadCommentDataSourceService','content','resolved','delete','getOwnPropertyDescriptor','syncUpdateMutationToColla','solved','675402eLPuOn','stringify','customRanges','7455kRLUCH','HTTPService','/reply','COMMENT','filter','type','Unknown','symbol','getUnit','length','disposeWithMe','getMemberID','dayjs','userID','root','commentUpdate$','97670owHzZm','594vNJIhz','comments','onStarting','unitId','defineProperty','Edit','find','/universer-api/user/list','_config','_threadCommentModel','addComment','UNIVER_UNKNOWN','5315DpNKoP','code','449244oSHaWq','error','Inject','IConfigService','subscribe','UniverThreadCommentDataSourcePlugin','forEach','YYYY/MM/DD\x20HH:mm','payload','deleteComment','replyId','/add','merge','Disposable','users','parentId','138259cYEsWF','Add','CommentService','user','_injector','CustomRangeType','pipe','UniverThreadCommentUIPlugin','post','UNRECOGNIZED','reply','_commentService','Solve','Plugin','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userId','_initDataSource','Solved','18FTkDTQ','setConfig'];_0x2384=function(){return _0x5523fa;};return _0x2384();}_=E([S(0x0,c['Inject'](b[_0x34930f(0xd5)])),S(0x1,c[_0x34930f(0xc5)](M[_0x34930f(0x72)])),S(0x2,c[_0x34930f(0xc5)](c[_0x34930f(0x76)])),S(0x3,c[_0x34930f(0xc5)](c[_0x34930f(0x6f)]))],_);const q=_0x34930f(0x8a),D={};var A=Object[_0x34930f(0x9e)],x=(_0x104071,_0x196fc3,_0x261e9d,_0x14b53f)=>{const _0x275b10=_0x34930f;for(var _0x45193c=_0x14b53f>0x1?void 0x0:_0x14b53f?A(_0x196fc3,_0x261e9d):_0x196fc3,_0x32266f=_0x104071[_0x275b10(0xad)]-0x1,_0x55224f;_0x32266f>=0x0;_0x32266f--)(_0x55224f=_0x104071[_0x32266f])&&(_0x45193c=_0x55224f(_0x45193c)||_0x45193c);return _0x45193c;},C=(_0x45046e,_0x5cd572)=>(_0x6bcbcb,_0x443ab8)=>_0x5cd572(_0x6bcbcb,_0x443ab8,_0x45046e);function Y(_0x1c6a2c,_0x5285ec){const _0x4e71bf=_0x34930f,_0x2e2d63=_0x1c6a2c[_0x4e71bf(0x81)][0x0];return{..._0x5285ec,'id':_0x2e2d63['replyId'],'resolved':_0x1c6a2c[_0x4e71bf(0xa0)]===0x1,'dT':f(_0x2e2d63[_0x4e71bf(0x97)]),'personId':_0x2e2d63[_0x4e71bf(0x67)],'threadId':_0x2e2d63[_0x4e71bf(0x99)]};}function G(_0x254596,_0x9f09db,_0x19d800){const _0x5d6d7e=_0x34930f;var _0x23499c,_0x204be2;if(((_0x204be2=(_0x23499c=_0x254596==null?void 0x0:_0x254596['replies'])==null?void 0x0:_0x23499c[_0x5d6d7e(0xad)])!=null?_0x204be2:0x0)>0x0){const _0x5c0aaa=(_0x5b28a1,_0xa7ee8)=>({'id':_0x5b28a1[_0x5d6d7e(0xcd)],'threadId':_0x5b28a1[_0x5d6d7e(0x99)],'dT':f(_0x5b28a1[_0x5d6d7e(0x97)]),'personId':_0x5b28a1['userId'],'resolved':_0x254596[_0x5d6d7e(0xa0)]===I[_0x5d6d7e(0x69)],'unitId':_0x9f09db,'subUnitId':_0x19d800,'text':JSON[_0x5d6d7e(0x82)](_0x5b28a1[_0x5d6d7e(0x9b)]),'parentId':_0xa7ee8}),_0x473a26=_0x5c0aaa(_0x254596[_0x5d6d7e(0x81)][0x0]);return{..._0x473a26,'children':_0x254596[_0x5d6d7e(0x81)]['slice'](0x1)[_0x5d6d7e(0x8f)](_0x1ff6f0=>_0x5c0aaa(_0x1ff6f0,_0x473a26['id']))};}return null;}let p=class{constructor(_0x2c4493,_0x172a0f,_0xac1cba){const _0x58a8c8=_0x34930f;this[_0x58a8c8(0x84)]=_0x2c4493,this[_0x58a8c8(0x90)]=_0x172a0f,this[_0x58a8c8(0x98)]=_0xac1cba;}async[_0x34930f(0xbf)](_0x183007){const _0x51dfc0=_0x34930f;var _0xaa8c66,_0x54fb2f;const {parentId:_0x29e38b,unitId:_0x306def,text:_0x447b26,threadId:_0xc655ec}=_0x183007,_0xb9bd8d=(_0x54fb2f=(_0xaa8c66=_0x447b26[_0x51dfc0(0xa3)])==null?void 0x0:_0xaa8c66['filter'](_0x4aa7e0=>_0x4aa7e0[_0x51dfc0(0x83)]===c[_0x51dfc0(0xd8)][_0x51dfc0(0xa7)])[_0x51dfc0(0x8f)](_0xdf0fca=>_0xdf0fca[_0x51dfc0(0x91)]))!=null?_0x54fb2f:[],_0x2249d2=JSON[_0x51dfc0(0xa2)](_0x447b26),_0x14814b=(await this[_0x51dfc0(0x98)]['requireSession'](_0x306def))[_0x51dfc0(0xaf)]();if(_0x29e38b){const _0x26dab7={'memberId':_0x14814b,'unitId':_0x306def,'content':_0x2249d2,'mention':_0xb9bd8d,'threadId':_0xc655ec},_0x22755a=(await this[_0x51dfc0(0x84)]['post'](_0x51dfc0(0x88)+_0x306def+_0x51dfc0(0xa6),{'body':_0x26dab7}))[_0x51dfc0(0x7a)][_0x51dfc0(0xdd)];return{..._0x183007,'id':_0x22755a[_0x51dfc0(0xcd)],'dT':c[_0x51dfc0(0xb0)](+_0x22755a[_0x51dfc0(0x97)])[_0x51dfc0(0x78)](_0x51dfc0(0xca)),'personId':_0x22755a[_0x51dfc0(0x67)]};}else{const _0x203f95={'memberId':_0x14814b,'unitId':_0x306def,'content':_0x2249d2,'mention':_0xb9bd8d},_0x300084=await this[_0x51dfc0(0x84)][_0x51dfc0(0xdb)]('/universer-api/comment/unit/'+_0x306def+_0x51dfc0(0xce),{'body':_0x203f95});return Y(_0x300084[_0x51dfc0(0x7a)][_0x51dfc0(0x8c)],_0x183007);}}async[_0x34930f(0x86)](_0x5eeda0){const _0x485dbc=_0x34930f;var _0x154938,_0x1898ec;const {text:_0x54339c,unitId:_0x46929c}=_0x5eeda0,_0x2dcb7a=(_0x1898ec=(_0x154938=_0x54339c[_0x485dbc(0xa3)])==null?void 0x0:_0x154938[_0x485dbc(0xa8)](_0x19e9ac=>_0x19e9ac[_0x485dbc(0x83)]===c[_0x485dbc(0xd8)][_0x485dbc(0xa7)])[_0x485dbc(0x8f)](_0x27d652=>_0x27d652['rangeId']))!=null?_0x1898ec:[],_0x4c42ae=JSON['stringify'](_0x54339c),_0x5ac114=_0x5eeda0[_0x485dbc(0x99)],_0x6c18b1=_0x5eeda0['id'],_0x4ccf38={'memberId':(await this[_0x485dbc(0x98)][_0x485dbc(0x6c)](_0x46929c))[_0x485dbc(0xaf)](),'unitId':_0x46929c,'threadId':_0x5ac114,'mention':_0x2dcb7a,'content':_0x4c42ae,'replyId':_0x6c18b1},_0x3c6ae3=await this['_httpService'][_0x485dbc(0xdb)]('/universer-api/comment/unit/'+_0x46929c+'/edit',{'body':_0x4ccf38});return!_0x3c6ae3[_0x485dbc(0x7a)][_0x485dbc(0xc4)]||_0x3c6ae3[_0x485dbc(0x7a)][_0x485dbc(0xc4)][_0x485dbc(0xc2)]===0x1;}async[_0x34930f(0x8b)](_0x2439aa){const _0x4bcfbf=_0x34930f,{unitId:_0x1ad332}=_0x2439aa,_0x288c8a=_0x2439aa['threadId'],_0x97f008={'memberId':this['_userService'][_0x4bcfbf(0x8e)]()[_0x4bcfbf(0xb1)],'unitId':_0x1ad332,'threadId':_0x288c8a,'solved':_0x2439aa[_0x4bcfbf(0x9c)]?I[_0x4bcfbf(0x69)]:I[_0x4bcfbf(0x6d)]},_0x3d95fa=await this[_0x4bcfbf(0x84)]['post'](_0x4bcfbf(0x88)+_0x1ad332+'/solved',{'body':_0x97f008});return!_0x3d95fa['body'][_0x4bcfbf(0xc4)]||_0x3d95fa[_0x4bcfbf(0x7a)][_0x4bcfbf(0xc4)][_0x4bcfbf(0xc2)]===0x1;}async[_0x34930f(0xcc)](_0x12dc68,_0x3e4906,_0xa28ae4,_0x521454){const _0x27bd53=_0x34930f,_0x1acd47={'memberId':(await this[_0x27bd53(0x98)][_0x27bd53(0x6c)](_0x12dc68))[_0x27bd53(0xaf)](),'threadId':_0xa28ae4,'replyId':_0x521454,'unitId':_0x12dc68},_0x52c096=await this[_0x27bd53(0x84)][_0x27bd53(0xdb)](_0x27bd53(0x88)+_0x12dc68+_0x27bd53(0x85),{'body':_0x1acd47});return!_0x52c096['body'][_0x27bd53(0xc4)]||_0x52c096[_0x27bd53(0x7a)][_0x27bd53(0xc4)]['code']===0x1;}async[_0x34930f(0x8d)](_0x35a23f,_0x1d7e45,_0x1b9031){const _0x2b995b=_0x34930f,_0x31295b={'unitId':_0x35a23f,'threadId':_0x1b9031},_0x2996e5=await this[_0x2b995b(0x84)]['post'](_0x2b995b(0x88)+_0x35a23f+_0x2b995b(0x70),{'body':_0x31295b}),_0x3ac41b=_0x1b9031[_0x2b995b(0x8f)](_0xaf1911=>G(_0x2996e5[_0x2b995b(0x7a)][_0x2b995b(0xb6)][_0xaf1911],_0x35a23f,_0x1d7e45))['filter'](Boolean);return Object['values'](_0x2996e5[_0x2b995b(0x7a)]['users'])[_0x2b995b(0xc9)](_0x1b76b0=>{const _0x359937=_0x2b995b;this[_0x359937(0x90)][_0x359937(0x93)](_0x1b76b0);}),_0x3ac41b;}[_0x34930f(0x87)](_0x5c444b){return{'id':_0x5c444b['id'],'threadId':_0x5c444b['threadId'],'ref':_0x5c444b['ref']};}};p=x([C(0x0,c[_0x34930f(0xc5)](P['HTTPService'])),C(0x1,c['Inject'](c[_0x34930f(0x76)])),C(0x2,c[_0x34930f(0xc5)](b[_0x34930f(0x80)]))],p);var H=Object[_0x34930f(0x9e)],J=(_0xbf8a55,_0x56ac3b,_0x533b01,_0x5052df)=>{const _0x9e957d=_0x34930f;for(var _0x455b8f=_0x5052df>0x1?void 0x0:_0x5052df?H(_0x56ac3b,_0x533b01):_0x56ac3b,_0x68d6f7=_0xbf8a55[_0x9e957d(0xad)]-0x1,_0x4358a8;_0x68d6f7>=0x0;_0x68d6f7--)(_0x4358a8=_0xbf8a55[_0x68d6f7])&&(_0x455b8f=_0x4358a8(_0x455b8f)||_0x455b8f);return _0x455b8f;},y=(_0x2b385a,_0x2b7a3a)=>(_0x4bd218,_0x56cf90)=>_0x2b7a3a(_0x4bd218,_0x56cf90,_0x2b385a);let g=class extends c['Disposable']{constructor(_0x51d58a,_0x57083f){const _0x5b01ac=_0x34930f;super(),this[_0x5b01ac(0x9a)]=_0x51d58a,this['_threadCommentDataSource']=_0x57083f,this[_0x5b01ac(0x68)]();}[_0x34930f(0x68)](){const _0x115bcb=_0x34930f;this[_0x115bcb(0x9a)]['dataSource']=this[_0x115bcb(0x7c)],this[_0x115bcb(0x9a)][_0x115bcb(0x9f)]=!0x1;}};function _0x5ef9(_0x592789,_0x2f0d59){_0x592789=_0x592789-0x64;const _0x2384c4=_0x2384();let _0x5ef9ce=_0x2384c4[_0x592789];return _0x5ef9ce;}g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](p))],g);var F=Object[_0x34930f(0xb9)],L=Object[_0x34930f(0x9e)],Z=(_0xd6c83a,_0x317376,_0x216683)=>_0x317376 in _0xd6c83a?F(_0xd6c83a,_0x317376,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x216683}):_0xd6c83a[_0x317376]=_0x216683,W=(_0x5b0324,_0x5b5546,_0x15fa06,_0x28a8ff)=>{const _0x2b855f=_0x34930f;for(var _0x45e4a0=_0x28a8ff>0x1?void 0x0:_0x28a8ff?L(_0x5b5546,_0x15fa06):_0x5b5546,_0xf8edda=_0x5b0324[_0x2b855f(0xad)]-0x1,_0x544144;_0xf8edda>=0x0;_0xf8edda--)(_0x544144=_0x5b0324[_0xf8edda])&&(_0x45e4a0=_0x544144(_0x45e4a0)||_0x45e4a0);return _0x45e4a0;},O=(_0x1b28c1,_0x216dea)=>(_0x452a55,_0x5bf13c)=>_0x216dea(_0x452a55,_0x5bf13c,_0x1b28c1),N=(_0xda4847,_0x31c5d6,_0x3e02da)=>Z(_0xda4847,typeof _0x31c5d6!=_0x34930f(0xab)?_0x31c5d6+'':_0x31c5d6,_0x3e02da);exports[_0x34930f(0xc8)]=class extends c[_0x34930f(0x64)]{constructor(_0x5bf190=D,_0x57bb17,_0x4cc3f4){const _0x353652=_0x34930f;super(),this[_0x353652(0xbd)]=_0x5bf190,this[_0x353652(0xd7)]=_0x57bb17,this[_0x353652(0x94)]=_0x4cc3f4;const {..._0x212b2a}=c[_0x353652(0xcf)]({},D,this['_config']);this[_0x353652(0x94)][_0x353652(0x6b)](q,_0x212b2a);}[_0x34930f(0xb7)](){[[p],[g],[_]]['forEach'](_0x447cd3=>{const _0x79ff0a=_0x5ef9;this[_0x79ff0a(0xd7)]['add'](_0x447cd3);});}[_0x34930f(0x6e)](){const _0x10f4d8=_0x34930f;this[_0x10f4d8(0xd7)][_0x10f4d8(0x74)](g),this['_injector'][_0x10f4d8(0x74)](_);}},N(exports[_0x34930f(0xc8)],'pluginName',U),N(exports[_0x34930f(0xc8)],_0x34930f(0xa9),c['UniverInstanceType'][_0x34930f(0xc0)]),exports[_0x34930f(0xc8)]=W([c['DependentOn'](w[_0x34930f(0xda)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x34930f(0xc5)](c[_0x34930f(0x6f)])),O(0x2,c[_0x34930f(0xc6)])],exports[_0x34930f(0xc8)]);
1
+ 'use strict';const _0x1b9c71=_0x751f;(function(_0x35fcf3,_0x4a6d5e){const _0xc09fbd=_0x751f,_0x549e9d=_0x35fcf3();while(!![]){try{const _0x31d1b8=parseInt(_0xc09fbd(0x20f))/0x1*(-parseInt(_0xc09fbd(0x1d6))/0x2)+parseInt(_0xc09fbd(0x236))/0x3*(-parseInt(_0xc09fbd(0x1f6))/0x4)+-parseInt(_0xc09fbd(0x21f))/0x5*(parseInt(_0xc09fbd(0x1ca))/0x6)+-parseInt(_0xc09fbd(0x1cb))/0x7*(parseInt(_0xc09fbd(0x1ea))/0x8)+parseInt(_0xc09fbd(0x211))/0x9*(-parseInt(_0xc09fbd(0x1f5))/0xa)+parseInt(_0xc09fbd(0x1c8))/0xb*(-parseInt(_0xc09fbd(0x231))/0xc)+parseInt(_0xc09fbd(0x1e1))/0xd;if(_0x31d1b8===_0x4a6d5e)break;else _0x549e9d['push'](_0x549e9d['shift']());}catch(_0xc47c7b){_0x549e9d['push'](_0x549e9d['shift']());}}}(_0x2636,0xf2645));Object[_0x1b9c71(0x239)](exports,Symbol['toStringTag'],{'value':_0x1b9c71(0x1f4)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x1b9c71(0x1da);var I=(_0xcf9019=>(_0xcf9019[_0xcf9019[_0x1b9c71(0x1e5)]=0x0]=_0x1b9c71(0x1e5),_0xcf9019[_0xcf9019[_0x1b9c71(0x20c)]=0x1]='Solved',_0xcf9019[_0xcf9019[_0x1b9c71(0x1f7)]=-0x1]=_0x1b9c71(0x1f7),_0xcf9019))(I||{}),v=(_0x49fa09=>(_0x49fa09[_0x49fa09[_0x1b9c71(0x1de)]=0x0]=_0x1b9c71(0x1de),_0x49fa09[_0x49fa09[_0x1b9c71(0x216)]=0x1]=_0x1b9c71(0x216),_0x49fa09[_0x49fa09[_0x1b9c71(0x22f)]=0x2]='Reply',_0x49fa09[_0x49fa09[_0x1b9c71(0x1e0)]=0x3]='Edit',_0x49fa09[_0x49fa09[_0x1b9c71(0x224)]=0x4]=_0x1b9c71(0x224),_0x49fa09[_0x49fa09[_0x1b9c71(0x20a)]=0x5]='Solve',_0x49fa09[_0x49fa09[_0x1b9c71(0x1f7)]=-0x1]=_0x1b9c71(0x1f7),_0x49fa09))(v||{});const f=_0x5b0394=>c[_0x1b9c71(0x1cd)](new Date(+_0x5b0394))['format'](_0x1b9c71(0x23b)),R=async(_0x234427,_0x29c3da)=>{const _0x1ee15b=_0x1b9c71,_0x463756=_0x234427[_0x1ee15b(0x1e4)](c[_0x1ee15b(0x204)]),_0x42352b=_0x234427[_0x1ee15b(0x1e4)](P[_0x1ee15b(0x1f9)]);_0x29c3da[_0x1ee15b(0x1fa)](_0x5e27be=>{const _0x12b7bc=_0x1ee15b;_0x463756[_0x12b7bc(0x22a)](_0x5e27be)&&_0x29c3da[_0x12b7bc(0x1cc)](_0x5e27be);}),_0x29c3da['size']&&(await _0x42352b['get'](_0x1ee15b(0x1c5),{'params':{'userIDs':[..._0x29c3da]}}))[_0x1ee15b(0x228)][_0x1ee15b(0x1dc)][_0x1ee15b(0x1fa)](_0x2cafea=>{const _0x4922a2=_0x1ee15b;_0x2cafea&&_0x463756[_0x4922a2(0x1d7)](_0x2cafea);});};var $=Object[_0x1b9c71(0x23a)],E=(_0x1dfd2a,_0x1aff81,_0x3e1758,_0x40f068)=>{const _0x16adf7=_0x1b9c71;for(var _0x406463=_0x40f068>0x1?void 0x0:_0x40f068?$(_0x1aff81,_0x3e1758):_0x1aff81,_0x16e447=_0x1dfd2a[_0x16adf7(0x227)]-0x1,_0x130812;_0x16e447>=0x0;_0x16e447--)(_0x130812=_0x1dfd2a[_0x16e447])&&(_0x406463=_0x130812(_0x406463)||_0x406463);return _0x406463;},S=(_0x4ed628,_0x40fa69)=>(_0x333d0b,_0x512eb9)=>_0x40fa69(_0x333d0b,_0x512eb9,_0x4ed628);let _=class extends c[_0x1b9c71(0x222)]{constructor(_0x23d907,_0x4aec00,_0x3bd6bf,_0x579002){const _0x1af145=_0x1b9c71;super(),this[_0x1af145(0x207)]=_0x23d907,this[_0x1af145(0x21a)]=_0x4aec00,this['_userService']=_0x3bd6bf,this['_injector']=_0x579002,this[_0x1af145(0x213)](),this[_0x1af145(0x210)]();}[_0x1b9c71(0x210)](){const _0x492d0a=_0x1b9c71;this[_0x492d0a(0x1fe)](this[_0x492d0a(0x21a)][_0x492d0a(0x22e)][_0x492d0a(0x1ed)](j['bufferTime'](0x10))['subscribe'](_0x389b3c=>{const _0xe01526=_0x492d0a,_0x366742=new Set();_0x389b3c[_0xe01526(0x1fa)](_0x2dc20b=>{const _0x10cc9a=_0xe01526;switch(_0x2dc20b[_0x10cc9a(0x200)]){case _0x10cc9a(0x1d8):{const _0x1b02d0=_0x2dc20b[_0x10cc9a(0x225)]['personId'];_0x366742['add'](_0x1b02d0);break;}}}),R(this[_0xe01526(0x21c)],_0x366742);}));}[_0x1b9c71(0x213)](){const _0x4325d0=_0x1b9c71;this[_0x4325d0(0x1fe)](this['_commentService'][_0x4325d0(0x22e)][_0x4325d0(0x22d)](async _0x5e14f5=>{const _0x5e6ed8=_0x4325d0;var _0x5850b9,_0x399cb1,_0xe1b247,_0xee52ac;const _0x289d12=(_0x5850b9=this['_threadCommentModel'][_0x5e6ed8(0x1fd)](_0x5e14f5['unitId'])['find'](_0x225194=>_0x225194['threadId']===_0x5e14f5[_0x5e6ed8(0x1d2)]))==null?void 0x0:_0x5850b9[_0x5e6ed8(0x220)];if(!_0x289d12)return;const {unitId:_0x124c26,subUnitId:_0x4ed85f}=_0x289d12;switch(_0x5e14f5[_0x5e6ed8(0x1c4)]&&this[_0x5e6ed8(0x226)]['addUser'](_0x5e14f5[_0x5e6ed8(0x1c4)]),_0x5e14f5[_0x5e6ed8(0x200)]){case v[_0x5e6ed8(0x216)]:break;case v[_0x5e6ed8(0x22f)]:{this[_0x5e6ed8(0x21a)][_0x5e6ed8(0x1ff)](_0x124c26,_0x4ed85f,{'unitId':_0x124c26,'subUnitId':_0x4ed85f,'ref':'','id':_0x5e14f5[_0x5e6ed8(0x1e7)],'dT':f(+_0x5e14f5['createTimestamp']),'threadId':_0x5e14f5['threadId'],'personId':(_0xe1b247=(_0x399cb1=_0x5e14f5[_0x5e6ed8(0x1c4)])==null?void 0x0:_0x399cb1[_0x5e6ed8(0x219)])!=null?_0xe1b247:_0x5e14f5[_0x5e6ed8(0x209)],'text':JSON[_0x5e6ed8(0x1c2)](_0x5e14f5[_0x5e6ed8(0x203)]),'parentId':_0x289d12['id']});break;}case v[_0x5e6ed8(0x224)]:{const _0x1768a9=this[_0x5e6ed8(0x21a)]['getComment'](_0x124c26,_0x4ed85f,_0x5e14f5[_0x5e6ed8(0x1e7)]);_0x1768a9&&_0x1768a9['parentId']&&this[_0x5e6ed8(0x21a)][_0x5e6ed8(0x1c9)](_0x124c26,_0x4ed85f,_0x5e14f5[_0x5e6ed8(0x1e7)]);break;}case v[_0x5e6ed8(0x1e0)]:{this[_0x5e6ed8(0x21a)][_0x5e6ed8(0x21e)](_0x124c26,_0x4ed85f,{'commentId':_0x5e14f5[_0x5e6ed8(0x1e7)],'text':JSON[_0x5e6ed8(0x1c2)](_0x5e14f5[_0x5e6ed8(0x203)])});break;}case v[_0x5e6ed8(0x20a)]:{const _0x240656=(_0xee52ac=this[_0x5e6ed8(0x21a)][_0x5e6ed8(0x1fd)](_0x5e14f5[_0x5e6ed8(0x1df)])[_0x5e6ed8(0x1e9)](_0x5659b8=>_0x5659b8[_0x5e6ed8(0x1d2)]===_0x5e14f5[_0x5e6ed8(0x1d2)]))==null?void 0x0:_0xee52ac[_0x5e6ed8(0x220)];_0x240656&&this['_threadCommentModel']['resolveComment'](_0x124c26,_0x4ed85f,_0x240656['id'],_0x5e14f5['solved']===I[_0x5e6ed8(0x20c)]);break;}}}));}};_=E([S(0x0,c[_0x1b9c71(0x1ec)](b['CommentService'])),S(0x1,c[_0x1b9c71(0x1ec)](M['ThreadCommentModel'])),S(0x2,c[_0x1b9c71(0x1ec)](c[_0x1b9c71(0x204)])),S(0x3,c[_0x1b9c71(0x1ec)](c[_0x1b9c71(0x230)]))],_);const q=_0x1b9c71(0x238),D={};var A=Object[_0x1b9c71(0x23a)],x=(_0x2a3134,_0x25d1d4,_0x519214,_0x58db82)=>{const _0x451efb=_0x1b9c71;for(var _0x356703=_0x58db82>0x1?void 0x0:_0x58db82?A(_0x25d1d4,_0x519214):_0x25d1d4,_0x3bf0ae=_0x2a3134[_0x451efb(0x227)]-0x1,_0x28b0b7;_0x3bf0ae>=0x0;_0x3bf0ae--)(_0x28b0b7=_0x2a3134[_0x3bf0ae])&&(_0x356703=_0x28b0b7(_0x356703)||_0x356703);return _0x356703;},C=(_0x66a4b2,_0x1162d0)=>(_0x175310,_0x293c87)=>_0x1162d0(_0x175310,_0x293c87,_0x66a4b2);function Y(_0x43318f,_0x15f85e){const _0x306579=_0x1b9c71,_0x3bf3bc=_0x43318f['replies'][0x0];return{..._0x15f85e,'id':_0x3bf3bc[_0x306579(0x1e7)],'resolved':_0x43318f[_0x306579(0x237)]===0x1,'dT':f(_0x3bf3bc[_0x306579(0x1cf)]),'personId':_0x3bf3bc[_0x306579(0x209)],'threadId':_0x3bf3bc['threadId']};}function G(_0x5f1356,_0xe4b9e3,_0x1827f3){const _0x26647f=_0x1b9c71;var _0x4c017b,_0x313912;if(((_0x313912=(_0x4c017b=_0x5f1356==null?void 0x0:_0x5f1356[_0x26647f(0x229)])==null?void 0x0:_0x4c017b[_0x26647f(0x227)])!=null?_0x313912:0x0)>0x0){const _0x5747b8=(_0x35c4ba,_0x17aabe)=>({'id':_0x35c4ba['replyId'],'threadId':_0x35c4ba['threadId'],'dT':f(_0x35c4ba[_0x26647f(0x1cf)]),'personId':_0x35c4ba[_0x26647f(0x209)],'resolved':_0x5f1356[_0x26647f(0x237)]===I[_0x26647f(0x20c)],'unitId':_0xe4b9e3,'subUnitId':_0x1827f3,'text':JSON[_0x26647f(0x1c2)](_0x35c4ba[_0x26647f(0x203)]),'parentId':_0x17aabe}),_0x47892b=_0x5747b8(_0x5f1356[_0x26647f(0x229)][0x0]);return{..._0x47892b,'children':_0x5f1356['replies'][_0x26647f(0x215)](0x1)[_0x26647f(0x1e8)](_0x591d29=>_0x5747b8(_0x591d29,_0x47892b['id']))};}return null;}function _0x751f(_0x54dbf0,_0x2fa032){_0x54dbf0=_0x54dbf0-0x1c2;const _0x263632=_0x2636();let _0x751f98=_0x263632[_0x54dbf0];return _0x751f98;}let p=class{constructor(_0x42e56a,_0x445788,_0x370fec){const _0x5e1113=_0x1b9c71;this[_0x5e1113(0x1ee)]=_0x42e56a,this[_0x5e1113(0x226)]=_0x445788,this[_0x5e1113(0x1f3)]=_0x370fec;}async[_0x1b9c71(0x1ff)](_0x5b1ced){const _0x3e1bf4=_0x1b9c71;var _0x3f6501,_0xf3b253;const {parentId:_0x22ef04,unitId:_0x5b47cf,text:_0x1c9d21,threadId:_0x45f5dc}=_0x5b1ced,_0x40f61a=(_0xf3b253=(_0x3f6501=_0x1c9d21['customRanges'])==null?void 0x0:_0x3f6501[_0x3e1bf4(0x1f1)](_0x25c602=>_0x25c602['rangeType']===c[_0x3e1bf4(0x1ce)]['COMMENT'])[_0x3e1bf4(0x1e8)](_0x5016d5=>_0x5016d5['rangeId']))!=null?_0xf3b253:[],_0x32250=JSON['stringify'](_0x1c9d21),_0x177dee=(await this['_sessionService'][_0x3e1bf4(0x202)](_0x5b47cf))[_0x3e1bf4(0x1d0)]();if(_0x22ef04){const _0x3f31a9={'memberId':_0x177dee,'unitId':_0x5b47cf,'content':_0x32250,'mention':_0x40f61a,'threadId':_0x45f5dc},_0x6e0bb9=(await this[_0x3e1bf4(0x1ee)][_0x3e1bf4(0x1e3)](_0x3e1bf4(0x1eb)+_0x5b47cf+_0x3e1bf4(0x1f8),{'body':_0x3f31a9}))[_0x3e1bf4(0x228)][_0x3e1bf4(0x1d1)];return{..._0x5b1ced,'id':_0x6e0bb9[_0x3e1bf4(0x1e7)],'dT':c[_0x3e1bf4(0x1cd)](+_0x6e0bb9[_0x3e1bf4(0x1cf)])['format'](_0x3e1bf4(0x23b)),'personId':_0x6e0bb9[_0x3e1bf4(0x209)]};}else{const _0x5e1f03={'memberId':_0x177dee,'unitId':_0x5b47cf,'content':_0x32250,'mention':_0x40f61a},_0x3a4ed0=await this[_0x3e1bf4(0x1ee)]['post'](_0x3e1bf4(0x1eb)+_0x5b47cf+_0x3e1bf4(0x221),{'body':_0x5e1f03});return Y(_0x3a4ed0['body'][_0x3e1bf4(0x205)],_0x5b1ced);}}async[_0x1b9c71(0x21e)](_0x55e808){const _0x37c4f4=_0x1b9c71;var _0x284465,_0x2d7c5e;const {text:_0xeea08f,unitId:_0x519032}=_0x55e808,_0x2fcffe=(_0x2d7c5e=(_0x284465=_0xeea08f['customRanges'])==null?void 0x0:_0x284465[_0x37c4f4(0x1f1)](_0x175bd1=>_0x175bd1[_0x37c4f4(0x1d3)]===c['CustomRangeType'][_0x37c4f4(0x1c7)])[_0x37c4f4(0x1e8)](_0xb1685=>_0xb1685['rangeId']))!=null?_0x2d7c5e:[],_0x5df68f=JSON[_0x37c4f4(0x1f2)](_0xeea08f),_0xb8b6fa=_0x55e808[_0x37c4f4(0x1d2)],_0x2c7c15=_0x55e808['id'],_0x4a8e3d={'memberId':(await this[_0x37c4f4(0x1f3)]['requireSession'](_0x519032))['getMemberID'](),'unitId':_0x519032,'threadId':_0xb8b6fa,'mention':_0x2fcffe,'content':_0x5df68f,'replyId':_0x2c7c15},_0x386142=await this[_0x37c4f4(0x1ee)]['post']('/universer-api/comment/unit/'+_0x519032+_0x37c4f4(0x1dd),{'body':_0x4a8e3d});return!_0x386142[_0x37c4f4(0x228)][_0x37c4f4(0x1f0)]||_0x386142[_0x37c4f4(0x228)][_0x37c4f4(0x1f0)][_0x37c4f4(0x218)]===0x1;}async[_0x1b9c71(0x233)](_0x5699da){const _0x545cb7=_0x1b9c71,{unitId:_0xb4ad51}=_0x5699da,_0x1a3e69=_0x5699da[_0x545cb7(0x1d2)],_0x563578={'memberId':this[_0x545cb7(0x226)][_0x545cb7(0x22c)]()[_0x545cb7(0x219)],'unitId':_0xb4ad51,'threadId':_0x1a3e69,'solved':_0x5699da[_0x545cb7(0x1fb)]?I[_0x545cb7(0x20c)]:I['OpenOrReOpen']},_0x4e58f3=await this[_0x545cb7(0x1ee)]['post'](_0x545cb7(0x1eb)+_0xb4ad51+_0x545cb7(0x232),{'body':_0x563578});return!_0x4e58f3[_0x545cb7(0x228)][_0x545cb7(0x1f0)]||_0x4e58f3[_0x545cb7(0x228)][_0x545cb7(0x1f0)][_0x545cb7(0x218)]===0x1;}async[_0x1b9c71(0x1c9)](_0x4c2f9a,_0xcfd99e,_0x32d06d,_0x6a7df2){const _0x4f89c3=_0x1b9c71,_0xe99feb={'memberId':(await this[_0x4f89c3(0x1f3)][_0x4f89c3(0x202)](_0x4c2f9a))[_0x4f89c3(0x1d0)](),'threadId':_0x32d06d,'replyId':_0x6a7df2,'unitId':_0x4c2f9a},_0x28dcb0=await this[_0x4f89c3(0x1ee)][_0x4f89c3(0x1e3)](_0x4f89c3(0x1eb)+_0x4c2f9a+_0x4f89c3(0x217),{'body':_0xe99feb});return!_0x28dcb0[_0x4f89c3(0x228)][_0x4f89c3(0x1f0)]||_0x28dcb0[_0x4f89c3(0x228)]['error']['code']===0x1;}async['listComments'](_0x40dc8b,_0x16461d,_0x561938){const _0x160c5f=_0x1b9c71,_0xf81d89={'unitId':_0x40dc8b,'threadId':_0x561938},_0x1f66b6=await this[_0x160c5f(0x1ee)]['post']('/universer-api/comment/unit/'+_0x40dc8b+_0x160c5f(0x1db),{'body':_0xf81d89}),_0x31961b=_0x561938[_0x160c5f(0x1e8)](_0x5319dd=>G(_0x1f66b6[_0x160c5f(0x228)][_0x160c5f(0x1d4)][_0x5319dd],_0x40dc8b,_0x16461d))[_0x160c5f(0x1f1)](Boolean);return Object[_0x160c5f(0x234)](_0x1f66b6[_0x160c5f(0x228)][_0x160c5f(0x1dc)])[_0x160c5f(0x1fa)](_0x3feffe=>{const _0x38bbb8=_0x160c5f;this['_userService'][_0x38bbb8(0x1d7)](_0x3feffe);}),_0x31961b;}[_0x1b9c71(0x1ef)](_0x4dff92){const _0x461ac1=_0x1b9c71;return{'id':_0x4dff92['id'],'threadId':_0x4dff92[_0x461ac1(0x1d2)],'ref':_0x4dff92[_0x461ac1(0x21d)]};}};p=x([C(0x0,c['Inject'](P[_0x1b9c71(0x1f9)])),C(0x1,c[_0x1b9c71(0x1ec)](c[_0x1b9c71(0x204)])),C(0x2,c[_0x1b9c71(0x1ec)](b['CollaborationSessionService']))],p);var H=Object[_0x1b9c71(0x23a)],J=(_0xebad96,_0x1db593,_0x14b895,_0x288700)=>{const _0x1e1e3a=_0x1b9c71;for(var _0x5cd61d=_0x288700>0x1?void 0x0:_0x288700?H(_0x1db593,_0x14b895):_0x1db593,_0x514ef6=_0xebad96[_0x1e1e3a(0x227)]-0x1,_0x1fc96e;_0x514ef6>=0x0;_0x514ef6--)(_0x1fc96e=_0xebad96[_0x514ef6])&&(_0x5cd61d=_0x1fc96e(_0x5cd61d)||_0x5cd61d);return _0x5cd61d;},y=(_0x1f13b0,_0x447bb4)=>(_0x209ca2,_0x1e8c69)=>_0x447bb4(_0x209ca2,_0x1e8c69,_0x1f13b0);let g=class extends c[_0x1b9c71(0x222)]{constructor(_0x3bf7d0,_0x2eee62){const _0x243962=_0x1b9c71;super(),this[_0x243962(0x1e6)]=_0x3bf7d0,this['_threadCommentDataSource']=_0x2eee62,this[_0x243962(0x20b)]();}[_0x1b9c71(0x20b)](){const _0x5e5c44=_0x1b9c71;this['_threadCommentDataSourceService'][_0x5e5c44(0x1d5)]=this[_0x5e5c44(0x22b)],this[_0x5e5c44(0x1e6)][_0x5e5c44(0x1c3)]=!0x1;}};function _0x2636(){const _0x16e0d9=['IThreadCommentDataSourceService','DependentOn','700376tOWYMJ','_initUserSync','36dDRMeS','UniverLicensePlugin','_init','_configService','slice','Add','/delete','code','userID','_threadCommentModel','UNIVER_UNKNOWN','_injector','ref','updateComment','1285DaDZxf','root','/add','Disposable','UniverCollaborationClientPlugin','Delete','payload','_userService','length','body','replies','getUser','_threadCommentDataSource','getCurrentUser','subscribe','commentUpdate$','Reply','Injector','12zgCDRL','/solved','resolveComment','values','merge','201219ErGWTv','solved','thread-comment-data-source.config','defineProperty','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','parse','syncUpdateMutationToColla','user','/universer-api/user/list','IConfigService','COMMENT','15285644UjtpQW','deleteComment','12312WCXuYO','664531lnnFcB','delete','dayjs','CustomRangeType','createTimestamp','getMemberID','reply','threadId','rangeType','comments','dataSource','2DbDKII','addUser','add','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/list','users','/edit','Unknown','unitId','Edit','67703766knaQzU','onReady','post','get','OpenOrReOpen','_threadCommentDataSourceService','replyId','map','find','16dNlCvK','/universer-api/comment/unit/','Inject','pipe','_httpService','saveCommentToSnapshot','error','filter','stringify','_sessionService','Module','333870nzfWbA','76DpSzhD','UNRECOGNIZED','/reply','HTTPService','forEach','resolved','onStarting','getUnit','disposeWithMe','addComment','type','UniverThreadCommentUIPlugin','requireSession','content','UserManagerService','comment','symbol','_commentService','UniverThreadCommentDataSourcePlugin','userId','Solve','_initDataSource','Solved'];_0x2636=function(){return _0x16e0d9;};return _0x2636();}g=J([y(0x0,M[_0x1b9c71(0x20d)]),y(0x1,c[_0x1b9c71(0x1ec)](p))],g);var F=Object['defineProperty'],L=Object[_0x1b9c71(0x23a)],Z=(_0x169963,_0xee7352,_0x598ffe)=>_0xee7352 in _0x169963?F(_0x169963,_0xee7352,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x598ffe}):_0x169963[_0xee7352]=_0x598ffe,W=(_0x3060fa,_0x484d0d,_0x373d72,_0xdaad08)=>{const _0x2db80c=_0x1b9c71;for(var _0x85b159=_0xdaad08>0x1?void 0x0:_0xdaad08?L(_0x484d0d,_0x373d72):_0x484d0d,_0x394ff2=_0x3060fa[_0x2db80c(0x227)]-0x1,_0x532feb;_0x394ff2>=0x0;_0x394ff2--)(_0x532feb=_0x3060fa[_0x394ff2])&&(_0x85b159=_0x532feb(_0x85b159)||_0x85b159);return _0x85b159;},O=(_0x3568b7,_0x162243)=>(_0x1d4c50,_0x58bd2a)=>_0x162243(_0x1d4c50,_0x58bd2a,_0x3568b7),N=(_0x2baa0b,_0x9f2748,_0x1171b4)=>Z(_0x2baa0b,typeof _0x9f2748!=_0x1b9c71(0x206)?_0x9f2748+'':_0x9f2748,_0x1171b4);exports[_0x1b9c71(0x208)]=class extends c['Plugin']{constructor(_0x339681=D,_0x10403b,_0x7646d9){const _0x25eac4=_0x1b9c71;super(),this[_0x25eac4(0x1d9)]=_0x339681,this[_0x25eac4(0x21c)]=_0x10403b,this[_0x25eac4(0x214)]=_0x7646d9;const {..._0x2ef188}=c[_0x25eac4(0x235)]({},D,this[_0x25eac4(0x1d9)]);this[_0x25eac4(0x214)]['setConfig'](q,_0x2ef188);}[_0x1b9c71(0x1fc)](){const _0x3cb89b=_0x1b9c71;[[p],[g],[_]][_0x3cb89b(0x1fa)](_0x163394=>{const _0x200411=_0x3cb89b;this[_0x200411(0x21c)][_0x200411(0x1d8)](_0x163394);});}[_0x1b9c71(0x1e2)](){const _0x3240bb=_0x1b9c71;this[_0x3240bb(0x21c)][_0x3240bb(0x1e4)](g),this['_injector']['get'](_);}},N(exports[_0x1b9c71(0x208)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c['UniverInstanceType'][_0x1b9c71(0x21b)]),exports[_0x1b9c71(0x208)]=W([c[_0x1b9c71(0x20e)](w[_0x1b9c71(0x201)],b[_0x1b9c71(0x223)],T[_0x1b9c71(0x212)]),O(0x1,c[_0x1b9c71(0x1ec)](c[_0x1b9c71(0x230)])),O(0x2,c[_0x1b9c71(0x1c6)])],exports[_0x1b9c71(0x208)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x22398f=_0x5040;(function(_0x4f4b28,_0x34ad62){const _0x39767b=_0x5040,_0x60b83c=_0x4f4b28();while(!![]){try{const _0x12d028=parseInt(_0x39767b(0x12c))/0x1+parseInt(_0x39767b(0x13a))/0x2+parseInt(_0x39767b(0x109))/0x3*(parseInt(_0x39767b(0x110))/0x4)+-parseInt(_0x39767b(0x11f))/0x5*(parseInt(_0x39767b(0x12f))/0x6)+-parseInt(_0x39767b(0x162))/0x7+parseInt(_0x39767b(0x121))/0x8+parseInt(_0x39767b(0x104))/0x9;if(_0x12d028===_0x34ad62)break;else _0x60b83c['push'](_0x60b83c['shift']());}catch(_0xa72ccb){_0x60b83c['push'](_0x60b83c['shift']());}}}(_0x2ecd,0xe9a5d));import{CommentService as _0x4c6e3d,CollaborationSessionService as _0x369ee5,UniverCollaborationClientPlugin as _0x425f68}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x32b697}from'@univerjs-pro/license';import{dayjs as _0x595bba,UserManagerService as _0x65ef30,Inject as _0x38c346,Injector as _0x52b3d9,Disposable as _0x3b5549,CustomRangeType as _0x54fedc,UniverInstanceType as _0x49c8b7,DependentOn as _0x3ddd01,IConfigService as _0x3b7d40,Plugin as _0x5eca17,merge as _0x492394}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59c59f}from'@univerjs/thread-comment-ui';function _0x2ecd(){const _0x3e5ae1=['Reply','dataSource','getUser','_httpService','28uDRxFR','Add','defineProperty','reply','_injector','type','listComments','code','rangeId','deleteComment','addUser','onReady','_initDataSource','setConfig','replies','5BYdBAV','addComment','1027776GzcVbv','rangeType','YYYY/MM/DD\x20HH:mm','getMemberID','_threadCommentDataSource','threadId','_initUserSync','replyId','solved','find','/list','17270MkHgCn','parse','payload','2339646MtgcLz','updateComment','getCurrentUser','getOwnPropertyDescriptor','thread-comment-data-source.config','users','post','length','comment','_threadCommentModel','ref','2643554pxiFct','format','body','_init','user','comments','getComment','symbol','error','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','map','_configService','subscribe','forEach','_config','UNIVER_UNKNOWN','/delete','add','Solve','commentUpdate$','getUnit','customRanges','UNRECOGNIZED','/universer-api/comment/unit/','_sessionService','syncUpdateMutationToColla','get','resolveComment','disposeWithMe','values','_commentService','filter','/edit','/add','Delete','Edit','root','_threadCommentDataSourceService','7984550gtQcpH','onStarting','_userService','/reply','stringify','createTimestamp','userId','5742171dsGEdG','Unknown','requireSession','content','COMMENT','163746acrWSf','OpenOrReOpen','Solved'];_0x2ecd=function(){return _0x3e5ae1;};return _0x2ecd();}import{ThreadCommentModel as _0x17e0dc,IThreadCommentDataSourceService as _0x68d5e8}from'@univerjs/thread-comment';import{bufferTime as _0x5f4227}from'rxjs';import{HTTPService as _0x17fd7c}from'@univerjs/network';const W=_0x22398f(0x144);var I=(_0x84c901=>(_0x84c901[_0x84c901['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x84c901[_0x84c901['Solved']=0x1]=_0x22398f(0x10b),_0x84c901[_0x84c901['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x84c901))(I||{}),v=(_0x806411=>(_0x806411[_0x806411['Unknown']=0x0]=_0x22398f(0x105),_0x806411[_0x806411[_0x22398f(0x111)]=0x1]=_0x22398f(0x111),_0x806411[_0x806411['Reply']=0x2]=_0x22398f(0x10c),_0x806411[_0x806411['Edit']=0x3]=_0x22398f(0x15f),_0x806411[_0x806411[_0x22398f(0x15e)]=0x4]='Delete',_0x806411[_0x806411[_0x22398f(0x14e)]=0x5]=_0x22398f(0x14e),_0x806411[_0x806411['UNRECOGNIZED']=-0x1]=_0x22398f(0x152),_0x806411))(v||{});const y=_0x30f352=>_0x595bba(new Date(+_0x30f352))[_0x22398f(0x13b)](_0x22398f(0x123)),B=async(_0x2d8c9e,_0x42e202)=>{const _0x1e3161=_0x22398f,_0x2f00b5=_0x2d8c9e[_0x1e3161(0x156)](_0x65ef30),_0x289847=_0x2d8c9e[_0x1e3161(0x156)](_0x17fd7c);_0x42e202[_0x1e3161(0x149)](_0x29423c=>{const _0x148819=_0x1e3161;_0x2f00b5[_0x148819(0x10e)](_0x29423c)&&_0x42e202['delete'](_0x29423c);}),_0x42e202['size']&&(await _0x289847[_0x1e3161(0x156)]('/universer-api/user/list',{'params':{'userIDs':[..._0x42e202]}}))[_0x1e3161(0x13c)][_0x1e3161(0x134)][_0x1e3161(0x149)](_0x3f32ac=>{const _0x5645bf=_0x1e3161;_0x3f32ac&&_0x2f00b5[_0x5645bf(0x11a)](_0x3f32ac);});};var K=Object[_0x22398f(0x132)],V=(_0xd7d72b,_0x25cbb6,_0x26c574,_0x5b1f7b)=>{const _0x4acb0c=_0x22398f;for(var _0xa6e13c=_0x5b1f7b>0x1?void 0x0:_0x5b1f7b?K(_0x25cbb6,_0x26c574):_0x25cbb6,_0x31031a=_0xd7d72b[_0x4acb0c(0x136)]-0x1,_0x18b925;_0x31031a>=0x0;_0x31031a--)(_0x18b925=_0xd7d72b[_0x31031a])&&(_0xa6e13c=_0x18b925(_0xa6e13c)||_0xa6e13c);return _0xa6e13c;},p=(_0x453677,_0x36fd14)=>(_0x5badfb,_0x3e7757)=>_0x36fd14(_0x5badfb,_0x3e7757,_0x453677);let _=class extends _0x3b5549{constructor(_0x2b7def,_0x5904e4,_0x366d8e,_0x26f235){const _0x524003=_0x22398f;super(),this[_0x524003(0x15a)]=_0x2b7def,this['_threadCommentModel']=_0x5904e4,this['_userService']=_0x366d8e,this['_injector']=_0x26f235,this[_0x524003(0x13d)](),this[_0x524003(0x127)]();}['_initUserSync'](){const _0x167044=_0x22398f;this[_0x167044(0x158)](this[_0x167044(0x138)][_0x167044(0x14f)]['pipe'](_0x5f4227(0x10))[_0x167044(0x148)](_0x87f92e=>{const _0x2c57a3=_0x167044,_0xd880b0=new Set();_0x87f92e[_0x2c57a3(0x149)](_0x50d7ab=>{const _0x2e3680=_0x2c57a3;switch(_0x50d7ab['type']){case _0x2e3680(0x14d):{const _0x2bc49e=_0x50d7ab[_0x2e3680(0x12e)]['personId'];_0xd880b0[_0x2e3680(0x14d)](_0x2bc49e);break;}}}),B(this['_injector'],_0xd880b0);}));}[_0x22398f(0x13d)](){const _0x1d2ff5=_0x22398f;this[_0x1d2ff5(0x158)](this[_0x1d2ff5(0x15a)][_0x1d2ff5(0x14f)][_0x1d2ff5(0x148)](async _0x1b7d9a=>{const _0x3dc995=_0x1d2ff5;var _0x57d41e,_0x377d1f,_0x5e01ae,_0x86516;const _0x278759=(_0x57d41e=this['_threadCommentModel'][_0x3dc995(0x150)](_0x1b7d9a[_0x3dc995(0x143)])[_0x3dc995(0x12a)](_0x561be0=>_0x561be0[_0x3dc995(0x126)]===_0x1b7d9a[_0x3dc995(0x126)]))==null?void 0x0:_0x57d41e[_0x3dc995(0x160)];if(!_0x278759)return;const {unitId:_0x4fe0cf,subUnitId:_0x3df732}=_0x278759;switch(_0x1b7d9a[_0x3dc995(0x13e)]&&this[_0x3dc995(0x164)]['addUser'](_0x1b7d9a[_0x3dc995(0x13e)]),_0x1b7d9a[_0x3dc995(0x115)]){case v[_0x3dc995(0x111)]:break;case v['Reply']:{this[_0x3dc995(0x138)][_0x3dc995(0x120)](_0x4fe0cf,_0x3df732,{'unitId':_0x4fe0cf,'subUnitId':_0x3df732,'ref':'','id':_0x1b7d9a[_0x3dc995(0x128)],'dT':y(+_0x1b7d9a['createTimestamp']),'threadId':_0x1b7d9a['threadId'],'personId':(_0x5e01ae=(_0x377d1f=_0x1b7d9a[_0x3dc995(0x13e)])==null?void 0x0:_0x377d1f['userID'])!=null?_0x5e01ae:_0x1b7d9a[_0x3dc995(0x103)],'text':JSON[_0x3dc995(0x12d)](_0x1b7d9a['content']),'parentId':_0x278759['id']});break;}case v[_0x3dc995(0x15e)]:{const _0xc604e5=this[_0x3dc995(0x138)][_0x3dc995(0x140)](_0x4fe0cf,_0x3df732,_0x1b7d9a['replyId']);_0xc604e5&&_0xc604e5['parentId']&&this[_0x3dc995(0x138)]['deleteComment'](_0x4fe0cf,_0x3df732,_0x1b7d9a[_0x3dc995(0x128)]);break;}case v[_0x3dc995(0x15f)]:{this['_threadCommentModel'][_0x3dc995(0x130)](_0x4fe0cf,_0x3df732,{'commentId':_0x1b7d9a['replyId'],'text':JSON[_0x3dc995(0x12d)](_0x1b7d9a['content'])});break;}case v['Solve']:{const _0x3f593e=(_0x86516=this['_threadCommentModel'][_0x3dc995(0x150)](_0x1b7d9a[_0x3dc995(0x143)])['find'](_0x66ac4=>_0x66ac4['threadId']===_0x1b7d9a['threadId']))==null?void 0x0:_0x86516['root'];_0x3f593e&&this[_0x3dc995(0x138)]['resolveComment'](_0x4fe0cf,_0x3df732,_0x3f593e['id'],_0x1b7d9a[_0x3dc995(0x129)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x38c346(_0x4c6e3d)),p(0x1,_0x38c346(_0x17e0dc)),p(0x2,_0x38c346(_0x65ef30)),p(0x3,_0x38c346(_0x52b3d9))],_);const z=_0x22398f(0x133),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x119214,_0x28bfee,_0x46b6d9,_0x3c1f98)=>{const _0x4ec814=_0x22398f;for(var _0x32f81c=_0x3c1f98>0x1?void 0x0:_0x3c1f98?k(_0x28bfee,_0x46b6d9):_0x28bfee,_0x4aad35=_0x119214[_0x4ec814(0x136)]-0x1,_0x4891e6;_0x4aad35>=0x0;_0x4aad35--)(_0x4891e6=_0x119214[_0x4aad35])&&(_0x32f81c=_0x4891e6(_0x32f81c)||_0x32f81c);return _0x32f81c;},b=(_0x25040b,_0x386058)=>(_0xe9e97,_0x48a07a)=>_0x386058(_0xe9e97,_0x48a07a,_0x25040b);function X(_0x957d27,_0x27b115){const _0x297ebb=_0x22398f,_0x19508a=_0x957d27[_0x297ebb(0x11e)][0x0];return{..._0x27b115,'id':_0x19508a[_0x297ebb(0x128)],'resolved':_0x957d27['solved']===0x1,'dT':y(_0x19508a['createTimestamp']),'personId':_0x19508a['userId'],'threadId':_0x19508a[_0x297ebb(0x126)]};}function ee(_0x26415c,_0x3ea2e6,_0x35cfc8){const _0x996f7e=_0x22398f;var _0x25858a,_0x37b8c2;if(((_0x37b8c2=(_0x25858a=_0x26415c==null?void 0x0:_0x26415c[_0x996f7e(0x11e)])==null?void 0x0:_0x25858a['length'])!=null?_0x37b8c2:0x0)>0x0){const _0x1eed74=(_0x2a15af,_0xd67f88)=>({'id':_0x2a15af[_0x996f7e(0x128)],'threadId':_0x2a15af['threadId'],'dT':y(_0x2a15af[_0x996f7e(0x167)]),'personId':_0x2a15af[_0x996f7e(0x103)],'resolved':_0x26415c[_0x996f7e(0x129)]===I[_0x996f7e(0x10b)],'unitId':_0x3ea2e6,'subUnitId':_0x35cfc8,'text':JSON[_0x996f7e(0x12d)](_0x2a15af[_0x996f7e(0x107)]),'parentId':_0xd67f88}),_0x839f48=_0x1eed74(_0x26415c[_0x996f7e(0x11e)][0x0]);return{..._0x839f48,'children':_0x26415c['replies']['slice'](0x1)[_0x996f7e(0x146)](_0x106235=>_0x1eed74(_0x106235,_0x839f48['id']))};}return null;}let S=class{constructor(_0xead164,_0x3140d6,_0x21a18b){const _0x50f2e8=_0x22398f;this[_0x50f2e8(0x10f)]=_0xead164,this['_userService']=_0x3140d6,this['_sessionService']=_0x21a18b;}async[_0x22398f(0x120)](_0xfd4413){const _0x39c1c2=_0x22398f;var _0x58771c,_0x283feb;const {parentId:_0x43d403,unitId:_0x540d64,text:_0x2999aa,threadId:_0x387a0b}=_0xfd4413,_0x18c856=(_0x283feb=(_0x58771c=_0x2999aa[_0x39c1c2(0x151)])==null?void 0x0:_0x58771c['filter'](_0x235baa=>_0x235baa['rangeType']===_0x54fedc[_0x39c1c2(0x108)])['map'](_0x1cf657=>_0x1cf657[_0x39c1c2(0x118)]))!=null?_0x283feb:[],_0x19fc66=JSON[_0x39c1c2(0x166)](_0x2999aa),_0x6a3080=(await this[_0x39c1c2(0x154)][_0x39c1c2(0x106)](_0x540d64))['getMemberID']();if(_0x43d403){const _0x24f808={'memberId':_0x6a3080,'unitId':_0x540d64,'content':_0x19fc66,'mention':_0x18c856,'threadId':_0x387a0b},_0x35fa9d=(await this[_0x39c1c2(0x10f)][_0x39c1c2(0x135)]('/universer-api/comment/unit/'+_0x540d64+_0x39c1c2(0x165),{'body':_0x24f808}))['body'][_0x39c1c2(0x113)];return{..._0xfd4413,'id':_0x35fa9d[_0x39c1c2(0x128)],'dT':_0x595bba(+_0x35fa9d[_0x39c1c2(0x167)])[_0x39c1c2(0x13b)](_0x39c1c2(0x123)),'personId':_0x35fa9d['userId']};}else{const _0x1b6da5={'memberId':_0x6a3080,'unitId':_0x540d64,'content':_0x19fc66,'mention':_0x18c856},_0x8ee2a1=await this[_0x39c1c2(0x10f)][_0x39c1c2(0x135)]('/universer-api/comment/unit/'+_0x540d64+_0x39c1c2(0x15d),{'body':_0x1b6da5});return X(_0x8ee2a1['body'][_0x39c1c2(0x137)],_0xfd4413);}}async[_0x22398f(0x130)](_0x2d7d26){const _0x55e1b8=_0x22398f;var _0x31a5c5,_0x54559f;const {text:_0x2ed0cc,unitId:_0xefaa95}=_0x2d7d26,_0x12ba40=(_0x54559f=(_0x31a5c5=_0x2ed0cc[_0x55e1b8(0x151)])==null?void 0x0:_0x31a5c5[_0x55e1b8(0x15b)](_0x166f18=>_0x166f18[_0x55e1b8(0x122)]===_0x54fedc[_0x55e1b8(0x108)])['map'](_0x54a5e6=>_0x54a5e6['rangeId']))!=null?_0x54559f:[],_0x56af7=JSON[_0x55e1b8(0x166)](_0x2ed0cc),_0x19a079=_0x2d7d26[_0x55e1b8(0x126)],_0x58a80c=_0x2d7d26['id'],_0x4a9d16={'memberId':(await this[_0x55e1b8(0x154)][_0x55e1b8(0x106)](_0xefaa95))[_0x55e1b8(0x124)](),'unitId':_0xefaa95,'threadId':_0x19a079,'mention':_0x12ba40,'content':_0x56af7,'replyId':_0x58a80c},_0x31e128=await this[_0x55e1b8(0x10f)][_0x55e1b8(0x135)](_0x55e1b8(0x153)+_0xefaa95+_0x55e1b8(0x15c),{'body':_0x4a9d16});return!_0x31e128[_0x55e1b8(0x13c)][_0x55e1b8(0x142)]||_0x31e128[_0x55e1b8(0x13c)][_0x55e1b8(0x142)][_0x55e1b8(0x117)]===0x1;}async[_0x22398f(0x157)](_0x14b3ef){const _0x549c35=_0x22398f,{unitId:_0x805ce4}=_0x14b3ef,_0xa0fdbd=_0x14b3ef[_0x549c35(0x126)],_0x28fcca={'memberId':this[_0x549c35(0x164)][_0x549c35(0x131)]()['userID'],'unitId':_0x805ce4,'threadId':_0xa0fdbd,'solved':_0x14b3ef[_0x549c35(0x145)]?I[_0x549c35(0x10b)]:I[_0x549c35(0x10a)]},_0x389a26=await this[_0x549c35(0x10f)][_0x549c35(0x135)](_0x549c35(0x153)+_0x805ce4+'/solved',{'body':_0x28fcca});return!_0x389a26[_0x549c35(0x13c)][_0x549c35(0x142)]||_0x389a26[_0x549c35(0x13c)][_0x549c35(0x142)][_0x549c35(0x117)]===0x1;}async[_0x22398f(0x119)](_0x55f35b,_0x552a0a,_0x5f366a,_0x2a0af3){const _0x28a78c=_0x22398f,_0x58f45e={'memberId':(await this[_0x28a78c(0x154)]['requireSession'](_0x55f35b))['getMemberID'](),'threadId':_0x5f366a,'replyId':_0x2a0af3,'unitId':_0x55f35b},_0x52b6d2=await this[_0x28a78c(0x10f)][_0x28a78c(0x135)](_0x28a78c(0x153)+_0x55f35b+_0x28a78c(0x14c),{'body':_0x58f45e});return!_0x52b6d2['body'][_0x28a78c(0x142)]||_0x52b6d2[_0x28a78c(0x13c)]['error'][_0x28a78c(0x117)]===0x1;}async[_0x22398f(0x116)](_0x5b871d,_0xc2a3f7,_0x33c314){const _0x590f42=_0x22398f,_0x45cdd8={'unitId':_0x5b871d,'threadId':_0x33c314},_0x3f63f5=await this[_0x590f42(0x10f)][_0x590f42(0x135)](_0x590f42(0x153)+_0x5b871d+_0x590f42(0x12b),{'body':_0x45cdd8}),_0x97d513=_0x33c314[_0x590f42(0x146)](_0x272bae=>ee(_0x3f63f5['body'][_0x590f42(0x13f)][_0x272bae],_0x5b871d,_0xc2a3f7))[_0x590f42(0x15b)](Boolean);return Object[_0x590f42(0x159)](_0x3f63f5[_0x590f42(0x13c)][_0x590f42(0x134)])[_0x590f42(0x149)](_0x26bbd1=>{const _0x526b63=_0x590f42;this[_0x526b63(0x164)][_0x526b63(0x11a)](_0x26bbd1);}),_0x97d513;}['saveCommentToSnapshot'](_0x13f30b){const _0x2486e2=_0x22398f;return{'id':_0x13f30b['id'],'threadId':_0x13f30b[_0x2486e2(0x126)],'ref':_0x13f30b[_0x2486e2(0x139)]};}};S=Q([b(0x0,_0x38c346(_0x17fd7c)),b(0x1,_0x38c346(_0x65ef30)),b(0x2,_0x38c346(_0x369ee5))],S);var re=Object[_0x22398f(0x132)],te=(_0x2c0b48,_0x17afed,_0x52a24a,_0x140cfe)=>{for(var _0x403a0e=_0x140cfe>0x1?void 0x0:_0x140cfe?re(_0x17afed,_0x52a24a):_0x17afed,_0x3b2bc4=_0x2c0b48['length']-0x1,_0x5d6194;_0x3b2bc4>=0x0;_0x3b2bc4--)(_0x5d6194=_0x2c0b48[_0x3b2bc4])&&(_0x403a0e=_0x5d6194(_0x403a0e)||_0x403a0e);return _0x403a0e;},M=(_0x27b2a8,_0x526449)=>(_0xbddc3c,_0x45e71e)=>_0x526449(_0xbddc3c,_0x45e71e,_0x27b2a8);let f=class extends _0x3b5549{constructor(_0x1e3131,_0x8608f4){const _0x4b9011=_0x22398f;super(),this[_0x4b9011(0x161)]=_0x1e3131,this[_0x4b9011(0x125)]=_0x8608f4,this['_initDataSource']();}[_0x22398f(0x11c)](){const _0x4e886f=_0x22398f;this[_0x4e886f(0x161)][_0x4e886f(0x10d)]=this[_0x4e886f(0x125)],this['_threadCommentDataSourceService'][_0x4e886f(0x155)]=!0x1;}};f=te([M(0x0,_0x68d5e8),M(0x1,_0x38c346(S))],f);var se=Object[_0x22398f(0x112)],oe=Object[_0x22398f(0x132)],ne=(_0x5e0769,_0xad133f,_0x4db905)=>_0xad133f in _0x5e0769?se(_0x5e0769,_0xad133f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4db905}):_0x5e0769[_0xad133f]=_0x4db905,ie=(_0x5a2d6f,_0x5d6b9d,_0x53b5cb,_0x1cfdf8)=>{for(var _0x14d267=_0x1cfdf8>0x1?void 0x0:_0x1cfdf8?oe(_0x5d6b9d,_0x53b5cb):_0x5d6b9d,_0x4929f0=_0x5a2d6f['length']-0x1,_0x1ae553;_0x4929f0>=0x0;_0x4929f0--)(_0x1ae553=_0x5a2d6f[_0x4929f0])&&(_0x14d267=_0x1ae553(_0x14d267)||_0x14d267);return _0x14d267;},N=(_0x3bf783,_0x157144)=>(_0x2a81b4,_0x3d7cf0)=>_0x157144(_0x2a81b4,_0x3d7cf0,_0x3bf783),$=(_0x416d4f,_0x50b02a,_0x5dcc31)=>ne(_0x416d4f,typeof _0x50b02a!=_0x22398f(0x141)?_0x50b02a+'':_0x50b02a,_0x5dcc31);function _0x5040(_0x5477e3,_0xfd7851){_0x5477e3=_0x5477e3-0x103;const _0x2ecd97=_0x2ecd();let _0x50409d=_0x2ecd97[_0x5477e3];return _0x50409d;}let g=class extends _0x5eca17{constructor(_0x922b90=O,_0x333c94,_0x42460c){const _0x4a7057=_0x22398f;super(),this['_config']=_0x922b90,this[_0x4a7057(0x114)]=_0x333c94,this[_0x4a7057(0x147)]=_0x42460c;const {..._0x307efe}=_0x492394({},O,this[_0x4a7057(0x14a)]);this[_0x4a7057(0x147)][_0x4a7057(0x11d)](z,_0x307efe);}[_0x22398f(0x163)](){const _0x56a152=_0x22398f;[[S],[f],[_]][_0x56a152(0x149)](_0x14cf19=>{const _0x46c469=_0x56a152;this['_injector'][_0x46c469(0x14d)](_0x14cf19);});}[_0x22398f(0x11b)](){const _0x5978a0=_0x22398f;this[_0x5978a0(0x114)]['get'](f),this[_0x5978a0(0x114)][_0x5978a0(0x156)](_);}};$(g,'pluginName',W),$(g,_0x22398f(0x115),_0x49c8b7[_0x22398f(0x14b)]),g=ie([_0x3ddd01(_0x59c59f,_0x425f68,_0x32b697),N(0x1,_0x38c346(_0x52b3d9)),N(0x2,_0x3b7d40)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2fb627=_0x5cb0;(function(_0x545b42,_0x519da9){const _0x4cf8f2=_0x5cb0,_0xfd3b48=_0x545b42();while(!![]){try{const _0x5edaae=-parseInt(_0x4cf8f2(0xb1))/0x1+parseInt(_0x4cf8f2(0xaf))/0x2*(parseInt(_0x4cf8f2(0xd9))/0x3)+-parseInt(_0x4cf8f2(0x9e))/0x4*(parseInt(_0x4cf8f2(0x7f))/0x5)+-parseInt(_0x4cf8f2(0x76))/0x6*(parseInt(_0x4cf8f2(0xcc))/0x7)+parseInt(_0x4cf8f2(0xa3))/0x8*(parseInt(_0x4cf8f2(0xcd))/0x9)+parseInt(_0x4cf8f2(0xba))/0xa*(-parseInt(_0x4cf8f2(0x99))/0xb)+parseInt(_0x4cf8f2(0xcf))/0xc;if(_0x5edaae===_0x519da9)break;else _0xfd3b48['push'](_0xfd3b48['shift']());}catch(_0x23a41c){_0xfd3b48['push'](_0xfd3b48['shift']());}}}(_0x582b,0xeecb5));function _0x582b(){const _0x23932c=['_initDataSource','body','Delete','175AbsMhM','3663rTKSXL','/list','41250252voVfJs','getUser','parse','Edit','subscribe','length','root','pipe','Solve','_sessionService','1821UDBtiq','_configService','map','content','_commentService','178986bFAKzE','ref','solved','requireSession','getOwnPropertyDescriptor','error','syncUpdateMutationToColla','forEach','thread-comment-data-source.config','5470NmtFlt','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Add','COMMENT','addComment','add','Unknown','/add','commentUpdate$','symbol','rangeId','stringify','users','rangeType','_initUserSync','getComment','filter','addUser','dataSource','disposeWithMe','find','slice','_threadCommentDataSource','delete','threadId','_threadCommentDataSourceService','2629BDIgkn','replyId','comment','code','_injector','4076JnzUkr','Solved','unitId','_init','getMemberID','26944bLHBzA','resolveComment','updateComment','userId','deleteComment','format','userID','UNRECOGNIZED','customRanges','_userService','YYYY/MM/DD\x20HH:mm','get','2366FLpeRC','/universer-api/comment/unit/','1392575jQsllM','UNIVER_UNKNOWN','createTimestamp','type','post','_config','getUnit','_threadCommentModel','personId','54190FsoRCw','user','pluginName','OpenOrReOpen','listComments','/solved','setConfig','/universer-api/user/list','saveCommentToSnapshot','/edit','payload','size','_httpService','replies','Reply'];_0x582b=function(){return _0x23932c;};return _0x582b();}import{CommentService as _0x331514,CollaborationSessionService as _0x7f4081,UniverCollaborationClientPlugin as _0x30dfaf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x634f96}from'@univerjs-pro/license';import{dayjs as _0x50be2f,UserManagerService as _0x15993b,Inject as _0x42c03f,Injector as _0x5f5add,Disposable as _0x39d51c,CustomRangeType as _0x34930a,UniverInstanceType as _0x516719,DependentOn as _0x5b97c0,IConfigService as _0x553ed8,Plugin as _0x452db7,merge as _0xe32879}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4c9c4f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x95de07,IThreadCommentDataSourceService as _0x2a0f84}from'@univerjs/thread-comment';import{bufferTime as _0x1b7798}from'rxjs';import{HTTPService as _0x5154de}from'@univerjs/network';const W=_0x2fb627(0x80);var I=(_0x4f9fb0=>(_0x4f9fb0[_0x4f9fb0[_0x2fb627(0xbd)]=0x0]=_0x2fb627(0xbd),_0x4f9fb0[_0x4f9fb0[_0x2fb627(0x9f)]=0x1]='Solved',_0x4f9fb0[_0x4f9fb0[_0x2fb627(0xaa)]=-0x1]=_0x2fb627(0xaa),_0x4f9fb0))(I||{}),v=(_0xb4a9c9=>(_0xb4a9c9[_0xb4a9c9[_0x2fb627(0x85)]=0x0]=_0x2fb627(0x85),_0xb4a9c9[_0xb4a9c9[_0x2fb627(0x81)]=0x1]='Add',_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xc8)]=0x2]='Reply',_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xd2)]=0x3]=_0x2fb627(0xd2),_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xcb)]=0x4]=_0x2fb627(0xcb),_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xd7)]=0x5]=_0x2fb627(0xd7),_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xaa)]=-0x1]=_0x2fb627(0xaa),_0xb4a9c9))(v||{});const y=_0x58a475=>_0x50be2f(new Date(+_0x58a475))[_0x2fb627(0xa8)](_0x2fb627(0xad)),B=async(_0x19c7fd,_0xb7da9)=>{const _0xec88ef=_0x2fb627,_0xab3be1=_0x19c7fd['get'](_0x15993b),_0x40c3e6=_0x19c7fd[_0xec88ef(0xae)](_0x5154de);_0xb7da9[_0xec88ef(0x7d)](_0x565f64=>{const _0x37dec6=_0xec88ef;_0xab3be1[_0x37dec6(0xd0)](_0x565f64)&&_0xb7da9[_0x37dec6(0x96)](_0x565f64);}),_0xb7da9[_0xec88ef(0xc5)]&&(await _0x40c3e6[_0xec88ef(0xae)](_0xec88ef(0xc1),{'params':{'userIDs':[..._0xb7da9]}}))[_0xec88ef(0xca)][_0xec88ef(0x8b)]['forEach'](_0x1a2238=>{_0x1a2238&&_0xab3be1['addUser'](_0x1a2238);});};var K=Object[_0x2fb627(0x7a)],V=(_0x4d7687,_0x546eaf,_0x3bf1ef,_0x1a0dff)=>{const _0x552857=_0x2fb627;for(var _0x2c1a0f=_0x1a0dff>0x1?void 0x0:_0x1a0dff?K(_0x546eaf,_0x3bf1ef):_0x546eaf,_0x37c2d2=_0x4d7687[_0x552857(0xd4)]-0x1,_0x467d42;_0x37c2d2>=0x0;_0x37c2d2--)(_0x467d42=_0x4d7687[_0x37c2d2])&&(_0x2c1a0f=_0x467d42(_0x2c1a0f)||_0x2c1a0f);return _0x2c1a0f;},p=(_0x32981,_0x37b987)=>(_0x517bd5,_0x44c422)=>_0x37b987(_0x517bd5,_0x44c422,_0x32981);let _=class extends _0x39d51c{constructor(_0x46a704,_0x4f5ea8,_0x586d9e,_0x5fcf7d){const _0x19390=_0x2fb627;super(),this[_0x19390(0x75)]=_0x46a704,this[_0x19390(0xb8)]=_0x4f5ea8,this['_userService']=_0x586d9e,this[_0x19390(0x9d)]=_0x5fcf7d,this[_0x19390(0xa1)](),this[_0x19390(0x8d)]();}[_0x2fb627(0x8d)](){const _0x22f95a=_0x2fb627;this[_0x22f95a(0x92)](this['_threadCommentModel'][_0x22f95a(0x87)][_0x22f95a(0xd6)](_0x1b7798(0x10))[_0x22f95a(0xd3)](_0x413f9b=>{const _0x52015d=new Set();_0x413f9b['forEach'](_0x118db1=>{const _0x33472c=_0x5cb0;switch(_0x118db1['type']){case _0x33472c(0x84):{const _0x271f79=_0x118db1[_0x33472c(0xc4)][_0x33472c(0xb9)];_0x52015d['add'](_0x271f79);break;}}}),B(this['_injector'],_0x52015d);}));}['_init'](){const _0x273cf3=_0x2fb627;this['disposeWithMe'](this[_0x273cf3(0x75)][_0x273cf3(0x87)][_0x273cf3(0xd3)](async _0x22934b=>{const _0x3870a8=_0x273cf3;var _0x464534,_0x29301a,_0x1f242d,_0x2f5812;const _0x36e75e=(_0x464534=this['_threadCommentModel'][_0x3870a8(0xb7)](_0x22934b[_0x3870a8(0xa0)])[_0x3870a8(0x93)](_0x269afd=>_0x269afd[_0x3870a8(0x97)]===_0x22934b['threadId']))==null?void 0x0:_0x464534[_0x3870a8(0xd5)];if(!_0x36e75e)return;const {unitId:_0x46afea,subUnitId:_0x55e79c}=_0x36e75e;switch(_0x22934b[_0x3870a8(0xbb)]&&this[_0x3870a8(0xac)]['addUser'](_0x22934b['user']),_0x22934b[_0x3870a8(0xb4)]){case v[_0x3870a8(0x81)]:break;case v[_0x3870a8(0xc8)]:{this['_threadCommentModel'][_0x3870a8(0x83)](_0x46afea,_0x55e79c,{'unitId':_0x46afea,'subUnitId':_0x55e79c,'ref':'','id':_0x22934b[_0x3870a8(0x9a)],'dT':y(+_0x22934b[_0x3870a8(0xb3)]),'threadId':_0x22934b['threadId'],'personId':(_0x1f242d=(_0x29301a=_0x22934b[_0x3870a8(0xbb)])==null?void 0x0:_0x29301a['userID'])!=null?_0x1f242d:_0x22934b['userId'],'text':JSON[_0x3870a8(0xd1)](_0x22934b[_0x3870a8(0x74)]),'parentId':_0x36e75e['id']});break;}case v[_0x3870a8(0xcb)]:{const _0x2a038a=this[_0x3870a8(0xb8)][_0x3870a8(0x8e)](_0x46afea,_0x55e79c,_0x22934b['replyId']);_0x2a038a&&_0x2a038a['parentId']&&this[_0x3870a8(0xb8)]['deleteComment'](_0x46afea,_0x55e79c,_0x22934b['replyId']);break;}case v[_0x3870a8(0xd2)]:{this[_0x3870a8(0xb8)][_0x3870a8(0xa5)](_0x46afea,_0x55e79c,{'commentId':_0x22934b[_0x3870a8(0x9a)],'text':JSON[_0x3870a8(0xd1)](_0x22934b[_0x3870a8(0x74)])});break;}case v[_0x3870a8(0xd7)]:{const _0x1ec12e=(_0x2f5812=this[_0x3870a8(0xb8)][_0x3870a8(0xb7)](_0x22934b[_0x3870a8(0xa0)])['find'](_0x42989d=>_0x42989d[_0x3870a8(0x97)]===_0x22934b[_0x3870a8(0x97)]))==null?void 0x0:_0x2f5812[_0x3870a8(0xd5)];_0x1ec12e&&this['_threadCommentModel'][_0x3870a8(0xa4)](_0x46afea,_0x55e79c,_0x1ec12e['id'],_0x22934b[_0x3870a8(0x78)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x42c03f(_0x331514)),p(0x1,_0x42c03f(_0x95de07)),p(0x2,_0x42c03f(_0x15993b)),p(0x3,_0x42c03f(_0x5f5add))],_);const z=_0x2fb627(0x7e),O={};var k=Object[_0x2fb627(0x7a)],Q=(_0xb82bc5,_0x5c8fcf,_0x3d11e2,_0x2853e0)=>{const _0x4ad437=_0x2fb627;for(var _0xc17ac1=_0x2853e0>0x1?void 0x0:_0x2853e0?k(_0x5c8fcf,_0x3d11e2):_0x5c8fcf,_0x15f89a=_0xb82bc5[_0x4ad437(0xd4)]-0x1,_0x32846f;_0x15f89a>=0x0;_0x15f89a--)(_0x32846f=_0xb82bc5[_0x15f89a])&&(_0xc17ac1=_0x32846f(_0xc17ac1)||_0xc17ac1);return _0xc17ac1;},b=(_0x244d04,_0x318ff1)=>(_0xad5217,_0x24547c)=>_0x318ff1(_0xad5217,_0x24547c,_0x244d04);function X(_0x243440,_0x389fe7){const _0x17f5b8=_0x2fb627,_0x861cfb=_0x243440['replies'][0x0];return{..._0x389fe7,'id':_0x861cfb['replyId'],'resolved':_0x243440['solved']===0x1,'dT':y(_0x861cfb[_0x17f5b8(0xb3)]),'personId':_0x861cfb[_0x17f5b8(0xa6)],'threadId':_0x861cfb['threadId']};}function ee(_0x173c74,_0xc4b487,_0x1be5b4){const _0x3b4c43=_0x2fb627;var _0x101df4,_0xc7011c;if(((_0xc7011c=(_0x101df4=_0x173c74==null?void 0x0:_0x173c74['replies'])==null?void 0x0:_0x101df4[_0x3b4c43(0xd4)])!=null?_0xc7011c:0x0)>0x0){const _0x3c5b43=(_0x2e1708,_0x1c4692)=>({'id':_0x2e1708['replyId'],'threadId':_0x2e1708[_0x3b4c43(0x97)],'dT':y(_0x2e1708[_0x3b4c43(0xb3)]),'personId':_0x2e1708[_0x3b4c43(0xa6)],'resolved':_0x173c74[_0x3b4c43(0x78)]===I[_0x3b4c43(0x9f)],'unitId':_0xc4b487,'subUnitId':_0x1be5b4,'text':JSON[_0x3b4c43(0xd1)](_0x2e1708[_0x3b4c43(0x74)]),'parentId':_0x1c4692}),_0x3eb89e=_0x3c5b43(_0x173c74['replies'][0x0]);return{..._0x3eb89e,'children':_0x173c74[_0x3b4c43(0xc7)][_0x3b4c43(0x94)](0x1)[_0x3b4c43(0x73)](_0x18e67a=>_0x3c5b43(_0x18e67a,_0x3eb89e['id']))};}return null;}let S=class{constructor(_0x28e8f6,_0x9ae3b7,_0x3b5371){const _0x53bfb5=_0x2fb627;this[_0x53bfb5(0xc6)]=_0x28e8f6,this[_0x53bfb5(0xac)]=_0x9ae3b7,this[_0x53bfb5(0xd8)]=_0x3b5371;}async['addComment'](_0x102fcd){const _0x48bd5a=_0x2fb627;var _0xae6801,_0x53387a;const {parentId:_0x50b467,unitId:_0xcdc44b,text:_0x12039c,threadId:_0x5837ff}=_0x102fcd,_0x3d0e82=(_0x53387a=(_0xae6801=_0x12039c[_0x48bd5a(0xab)])==null?void 0x0:_0xae6801[_0x48bd5a(0x8f)](_0x4c0169=>_0x4c0169[_0x48bd5a(0x8c)]===_0x34930a[_0x48bd5a(0x82)])['map'](_0x36843d=>_0x36843d[_0x48bd5a(0x89)]))!=null?_0x53387a:[],_0x2eac4b=JSON['stringify'](_0x12039c),_0x483a83=(await this['_sessionService'][_0x48bd5a(0x79)](_0xcdc44b))[_0x48bd5a(0xa2)]();if(_0x50b467){const _0x299559={'memberId':_0x483a83,'unitId':_0xcdc44b,'content':_0x2eac4b,'mention':_0x3d0e82,'threadId':_0x5837ff},_0x496ad7=(await this[_0x48bd5a(0xc6)][_0x48bd5a(0xb5)](_0x48bd5a(0xb0)+_0xcdc44b+'/reply',{'body':_0x299559}))[_0x48bd5a(0xca)]['reply'];return{..._0x102fcd,'id':_0x496ad7[_0x48bd5a(0x9a)],'dT':_0x50be2f(+_0x496ad7[_0x48bd5a(0xb3)])[_0x48bd5a(0xa8)](_0x48bd5a(0xad)),'personId':_0x496ad7[_0x48bd5a(0xa6)]};}else{const _0x2933c1={'memberId':_0x483a83,'unitId':_0xcdc44b,'content':_0x2eac4b,'mention':_0x3d0e82},_0x25f86c=await this[_0x48bd5a(0xc6)]['post'](_0x48bd5a(0xb0)+_0xcdc44b+_0x48bd5a(0x86),{'body':_0x2933c1});return X(_0x25f86c[_0x48bd5a(0xca)][_0x48bd5a(0x9b)],_0x102fcd);}}async[_0x2fb627(0xa5)](_0x3b397e){const _0x20e7af=_0x2fb627;var _0x355f21,_0x1cf580;const {text:_0x12b115,unitId:_0x2002c6}=_0x3b397e,_0x19bded=(_0x1cf580=(_0x355f21=_0x12b115['customRanges'])==null?void 0x0:_0x355f21[_0x20e7af(0x8f)](_0x171097=>_0x171097[_0x20e7af(0x8c)]===_0x34930a[_0x20e7af(0x82)])['map'](_0x5d2ed0=>_0x5d2ed0['rangeId']))!=null?_0x1cf580:[],_0x1c645c=JSON[_0x20e7af(0x8a)](_0x12b115),_0x1d492b=_0x3b397e['threadId'],_0x2b670f=_0x3b397e['id'],_0x4266d6={'memberId':(await this[_0x20e7af(0xd8)][_0x20e7af(0x79)](_0x2002c6))['getMemberID'](),'unitId':_0x2002c6,'threadId':_0x1d492b,'mention':_0x19bded,'content':_0x1c645c,'replyId':_0x2b670f},_0x9c4dd3=await this[_0x20e7af(0xc6)][_0x20e7af(0xb5)](_0x20e7af(0xb0)+_0x2002c6+_0x20e7af(0xc3),{'body':_0x4266d6});return!_0x9c4dd3[_0x20e7af(0xca)][_0x20e7af(0x7b)]||_0x9c4dd3[_0x20e7af(0xca)][_0x20e7af(0x7b)][_0x20e7af(0x9c)]===0x1;}async['resolveComment'](_0x4a2393){const _0x45fd2d=_0x2fb627,{unitId:_0x358a7e}=_0x4a2393,_0x39f9f1=_0x4a2393[_0x45fd2d(0x97)],_0x48896b={'memberId':this['_userService']['getCurrentUser']()[_0x45fd2d(0xa9)],'unitId':_0x358a7e,'threadId':_0x39f9f1,'solved':_0x4a2393['resolved']?I['Solved']:I[_0x45fd2d(0xbd)]},_0x2a7d86=await this['_httpService'][_0x45fd2d(0xb5)](_0x45fd2d(0xb0)+_0x358a7e+_0x45fd2d(0xbf),{'body':_0x48896b});return!_0x2a7d86[_0x45fd2d(0xca)][_0x45fd2d(0x7b)]||_0x2a7d86[_0x45fd2d(0xca)][_0x45fd2d(0x7b)][_0x45fd2d(0x9c)]===0x1;}async[_0x2fb627(0xa7)](_0x39d236,_0x40ca8f,_0x53ad4e,_0x3a1052){const _0x545b50=_0x2fb627,_0x1523a2={'memberId':(await this[_0x545b50(0xd8)][_0x545b50(0x79)](_0x39d236))[_0x545b50(0xa2)](),'threadId':_0x53ad4e,'replyId':_0x3a1052,'unitId':_0x39d236},_0x3e00a7=await this[_0x545b50(0xc6)][_0x545b50(0xb5)](_0x545b50(0xb0)+_0x39d236+'/delete',{'body':_0x1523a2});return!_0x3e00a7[_0x545b50(0xca)][_0x545b50(0x7b)]||_0x3e00a7[_0x545b50(0xca)]['error'][_0x545b50(0x9c)]===0x1;}async[_0x2fb627(0xbe)](_0x488bd6,_0x39294e,_0x2e94bf){const _0x326b56=_0x2fb627,_0x59d90d={'unitId':_0x488bd6,'threadId':_0x2e94bf},_0x59ba31=await this['_httpService'][_0x326b56(0xb5)](_0x326b56(0xb0)+_0x488bd6+_0x326b56(0xce),{'body':_0x59d90d}),_0x3fae96=_0x2e94bf[_0x326b56(0x73)](_0x6ab117=>ee(_0x59ba31[_0x326b56(0xca)]['comments'][_0x6ab117],_0x488bd6,_0x39294e))[_0x326b56(0x8f)](Boolean);return Object['values'](_0x59ba31[_0x326b56(0xca)]['users'])['forEach'](_0x227182=>{const _0x3116ce=_0x326b56;this['_userService'][_0x3116ce(0x90)](_0x227182);}),_0x3fae96;}[_0x2fb627(0xc2)](_0x3ea70){const _0x16482e=_0x2fb627;return{'id':_0x3ea70['id'],'threadId':_0x3ea70[_0x16482e(0x97)],'ref':_0x3ea70[_0x16482e(0x77)]};}};function _0x5cb0(_0x360dbe,_0x1bda09){_0x360dbe=_0x360dbe-0x73;const _0x582b67=_0x582b();let _0x5cb0ee=_0x582b67[_0x360dbe];return _0x5cb0ee;}S=Q([b(0x0,_0x42c03f(_0x5154de)),b(0x1,_0x42c03f(_0x15993b)),b(0x2,_0x42c03f(_0x7f4081))],S);var re=Object[_0x2fb627(0x7a)],te=(_0x254bc9,_0x50587a,_0x4f7936,_0x27e136)=>{const _0x3fad4a=_0x2fb627;for(var _0x560536=_0x27e136>0x1?void 0x0:_0x27e136?re(_0x50587a,_0x4f7936):_0x50587a,_0x2a33aa=_0x254bc9[_0x3fad4a(0xd4)]-0x1,_0xb4d238;_0x2a33aa>=0x0;_0x2a33aa--)(_0xb4d238=_0x254bc9[_0x2a33aa])&&(_0x560536=_0xb4d238(_0x560536)||_0x560536);return _0x560536;},M=(_0x55bc1a,_0xc8a9aa)=>(_0x14abfd,_0x11b824)=>_0xc8a9aa(_0x14abfd,_0x11b824,_0x55bc1a);let f=class extends _0x39d51c{constructor(_0x522e2b,_0x461d60){const _0x531f63=_0x2fb627;super(),this[_0x531f63(0x98)]=_0x522e2b,this[_0x531f63(0x95)]=_0x461d60,this[_0x531f63(0xc9)]();}[_0x2fb627(0xc9)](){const _0x3c2cc4=_0x2fb627;this[_0x3c2cc4(0x98)][_0x3c2cc4(0x91)]=this['_threadCommentDataSource'],this[_0x3c2cc4(0x98)][_0x3c2cc4(0x7c)]=!0x1;}};f=te([M(0x0,_0x2a0f84),M(0x1,_0x42c03f(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x5c3097,_0x55b527,_0x588ed0)=>_0x55b527 in _0x5c3097?se(_0x5c3097,_0x55b527,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x588ed0}):_0x5c3097[_0x55b527]=_0x588ed0,ie=(_0x988407,_0x22c3a1,_0x2122b6,_0x36597b)=>{for(var _0x51aac6=_0x36597b>0x1?void 0x0:_0x36597b?oe(_0x22c3a1,_0x2122b6):_0x22c3a1,_0x361489=_0x988407['length']-0x1,_0x346972;_0x361489>=0x0;_0x361489--)(_0x346972=_0x988407[_0x361489])&&(_0x51aac6=_0x346972(_0x51aac6)||_0x51aac6);return _0x51aac6;},N=(_0x52180c,_0x2aeec8)=>(_0x493c0e,_0x15214e)=>_0x2aeec8(_0x493c0e,_0x15214e,_0x52180c),$=(_0xf239b2,_0x13169a,_0x365154)=>ne(_0xf239b2,typeof _0x13169a!=_0x2fb627(0x88)?_0x13169a+'':_0x13169a,_0x365154);let g=class extends _0x452db7{constructor(_0x5efb16=O,_0x4a01d,_0x5a9adc){const _0x58db6d=_0x2fb627;super(),this[_0x58db6d(0xb6)]=_0x5efb16,this['_injector']=_0x4a01d,this[_0x58db6d(0xda)]=_0x5a9adc;const {..._0x152886}=_0xe32879({},O,this[_0x58db6d(0xb6)]);this[_0x58db6d(0xda)][_0x58db6d(0xc0)](z,_0x152886);}['onStarting'](){const _0x475251=_0x2fb627;[[S],[f],[_]][_0x475251(0x7d)](_0x225ac8=>{const _0x393a15=_0x475251;this[_0x393a15(0x9d)][_0x393a15(0x84)](_0x225ac8);});}['onReady'](){const _0x2ea09e=_0x2fb627;this[_0x2ea09e(0x9d)]['get'](f),this[_0x2ea09e(0x9d)][_0x2ea09e(0xae)](_);}};$(g,_0x2fb627(0xbc),W),$(g,_0x2fb627(0xb4),_0x516719[_0x2fb627(0xb2)]),g=ie([_0x5b97c0(_0x4c9c4f,_0x30dfaf,_0x634f96),N(0x1,_0x42c03f(_0x5f5add)),N(0x2,_0x553ed8)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x22398f=_0x5040;(function(_0x4f4b28,_0x34ad62){const _0x39767b=_0x5040,_0x60b83c=_0x4f4b28();while(!![]){try{const _0x12d028=parseInt(_0x39767b(0x12c))/0x1+parseInt(_0x39767b(0x13a))/0x2+parseInt(_0x39767b(0x109))/0x3*(parseInt(_0x39767b(0x110))/0x4)+-parseInt(_0x39767b(0x11f))/0x5*(parseInt(_0x39767b(0x12f))/0x6)+-parseInt(_0x39767b(0x162))/0x7+parseInt(_0x39767b(0x121))/0x8+parseInt(_0x39767b(0x104))/0x9;if(_0x12d028===_0x34ad62)break;else _0x60b83c['push'](_0x60b83c['shift']());}catch(_0xa72ccb){_0x60b83c['push'](_0x60b83c['shift']());}}}(_0x2ecd,0xe9a5d));import{CommentService as _0x4c6e3d,CollaborationSessionService as _0x369ee5,UniverCollaborationClientPlugin as _0x425f68}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x32b697}from'@univerjs-pro/license';import{dayjs as _0x595bba,UserManagerService as _0x65ef30,Inject as _0x38c346,Injector as _0x52b3d9,Disposable as _0x3b5549,CustomRangeType as _0x54fedc,UniverInstanceType as _0x49c8b7,DependentOn as _0x3ddd01,IConfigService as _0x3b7d40,Plugin as _0x5eca17,merge as _0x492394}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59c59f}from'@univerjs/thread-comment-ui';function _0x2ecd(){const _0x3e5ae1=['Reply','dataSource','getUser','_httpService','28uDRxFR','Add','defineProperty','reply','_injector','type','listComments','code','rangeId','deleteComment','addUser','onReady','_initDataSource','setConfig','replies','5BYdBAV','addComment','1027776GzcVbv','rangeType','YYYY/MM/DD\x20HH:mm','getMemberID','_threadCommentDataSource','threadId','_initUserSync','replyId','solved','find','/list','17270MkHgCn','parse','payload','2339646MtgcLz','updateComment','getCurrentUser','getOwnPropertyDescriptor','thread-comment-data-source.config','users','post','length','comment','_threadCommentModel','ref','2643554pxiFct','format','body','_init','user','comments','getComment','symbol','error','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','map','_configService','subscribe','forEach','_config','UNIVER_UNKNOWN','/delete','add','Solve','commentUpdate$','getUnit','customRanges','UNRECOGNIZED','/universer-api/comment/unit/','_sessionService','syncUpdateMutationToColla','get','resolveComment','disposeWithMe','values','_commentService','filter','/edit','/add','Delete','Edit','root','_threadCommentDataSourceService','7984550gtQcpH','onStarting','_userService','/reply','stringify','createTimestamp','userId','5742171dsGEdG','Unknown','requireSession','content','COMMENT','163746acrWSf','OpenOrReOpen','Solved'];_0x2ecd=function(){return _0x3e5ae1;};return _0x2ecd();}import{ThreadCommentModel as _0x17e0dc,IThreadCommentDataSourceService as _0x68d5e8}from'@univerjs/thread-comment';import{bufferTime as _0x5f4227}from'rxjs';import{HTTPService as _0x17fd7c}from'@univerjs/network';const W=_0x22398f(0x144);var I=(_0x84c901=>(_0x84c901[_0x84c901['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x84c901[_0x84c901['Solved']=0x1]=_0x22398f(0x10b),_0x84c901[_0x84c901['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x84c901))(I||{}),v=(_0x806411=>(_0x806411[_0x806411['Unknown']=0x0]=_0x22398f(0x105),_0x806411[_0x806411[_0x22398f(0x111)]=0x1]=_0x22398f(0x111),_0x806411[_0x806411['Reply']=0x2]=_0x22398f(0x10c),_0x806411[_0x806411['Edit']=0x3]=_0x22398f(0x15f),_0x806411[_0x806411[_0x22398f(0x15e)]=0x4]='Delete',_0x806411[_0x806411[_0x22398f(0x14e)]=0x5]=_0x22398f(0x14e),_0x806411[_0x806411['UNRECOGNIZED']=-0x1]=_0x22398f(0x152),_0x806411))(v||{});const y=_0x30f352=>_0x595bba(new Date(+_0x30f352))[_0x22398f(0x13b)](_0x22398f(0x123)),B=async(_0x2d8c9e,_0x42e202)=>{const _0x1e3161=_0x22398f,_0x2f00b5=_0x2d8c9e[_0x1e3161(0x156)](_0x65ef30),_0x289847=_0x2d8c9e[_0x1e3161(0x156)](_0x17fd7c);_0x42e202[_0x1e3161(0x149)](_0x29423c=>{const _0x148819=_0x1e3161;_0x2f00b5[_0x148819(0x10e)](_0x29423c)&&_0x42e202['delete'](_0x29423c);}),_0x42e202['size']&&(await _0x289847[_0x1e3161(0x156)]('/universer-api/user/list',{'params':{'userIDs':[..._0x42e202]}}))[_0x1e3161(0x13c)][_0x1e3161(0x134)][_0x1e3161(0x149)](_0x3f32ac=>{const _0x5645bf=_0x1e3161;_0x3f32ac&&_0x2f00b5[_0x5645bf(0x11a)](_0x3f32ac);});};var K=Object[_0x22398f(0x132)],V=(_0xd7d72b,_0x25cbb6,_0x26c574,_0x5b1f7b)=>{const _0x4acb0c=_0x22398f;for(var _0xa6e13c=_0x5b1f7b>0x1?void 0x0:_0x5b1f7b?K(_0x25cbb6,_0x26c574):_0x25cbb6,_0x31031a=_0xd7d72b[_0x4acb0c(0x136)]-0x1,_0x18b925;_0x31031a>=0x0;_0x31031a--)(_0x18b925=_0xd7d72b[_0x31031a])&&(_0xa6e13c=_0x18b925(_0xa6e13c)||_0xa6e13c);return _0xa6e13c;},p=(_0x453677,_0x36fd14)=>(_0x5badfb,_0x3e7757)=>_0x36fd14(_0x5badfb,_0x3e7757,_0x453677);let _=class extends _0x3b5549{constructor(_0x2b7def,_0x5904e4,_0x366d8e,_0x26f235){const _0x524003=_0x22398f;super(),this[_0x524003(0x15a)]=_0x2b7def,this['_threadCommentModel']=_0x5904e4,this['_userService']=_0x366d8e,this['_injector']=_0x26f235,this[_0x524003(0x13d)](),this[_0x524003(0x127)]();}['_initUserSync'](){const _0x167044=_0x22398f;this[_0x167044(0x158)](this[_0x167044(0x138)][_0x167044(0x14f)]['pipe'](_0x5f4227(0x10))[_0x167044(0x148)](_0x87f92e=>{const _0x2c57a3=_0x167044,_0xd880b0=new Set();_0x87f92e[_0x2c57a3(0x149)](_0x50d7ab=>{const _0x2e3680=_0x2c57a3;switch(_0x50d7ab['type']){case _0x2e3680(0x14d):{const _0x2bc49e=_0x50d7ab[_0x2e3680(0x12e)]['personId'];_0xd880b0[_0x2e3680(0x14d)](_0x2bc49e);break;}}}),B(this['_injector'],_0xd880b0);}));}[_0x22398f(0x13d)](){const _0x1d2ff5=_0x22398f;this[_0x1d2ff5(0x158)](this[_0x1d2ff5(0x15a)][_0x1d2ff5(0x14f)][_0x1d2ff5(0x148)](async _0x1b7d9a=>{const _0x3dc995=_0x1d2ff5;var _0x57d41e,_0x377d1f,_0x5e01ae,_0x86516;const _0x278759=(_0x57d41e=this['_threadCommentModel'][_0x3dc995(0x150)](_0x1b7d9a[_0x3dc995(0x143)])[_0x3dc995(0x12a)](_0x561be0=>_0x561be0[_0x3dc995(0x126)]===_0x1b7d9a[_0x3dc995(0x126)]))==null?void 0x0:_0x57d41e[_0x3dc995(0x160)];if(!_0x278759)return;const {unitId:_0x4fe0cf,subUnitId:_0x3df732}=_0x278759;switch(_0x1b7d9a[_0x3dc995(0x13e)]&&this[_0x3dc995(0x164)]['addUser'](_0x1b7d9a[_0x3dc995(0x13e)]),_0x1b7d9a[_0x3dc995(0x115)]){case v[_0x3dc995(0x111)]:break;case v['Reply']:{this[_0x3dc995(0x138)][_0x3dc995(0x120)](_0x4fe0cf,_0x3df732,{'unitId':_0x4fe0cf,'subUnitId':_0x3df732,'ref':'','id':_0x1b7d9a[_0x3dc995(0x128)],'dT':y(+_0x1b7d9a['createTimestamp']),'threadId':_0x1b7d9a['threadId'],'personId':(_0x5e01ae=(_0x377d1f=_0x1b7d9a[_0x3dc995(0x13e)])==null?void 0x0:_0x377d1f['userID'])!=null?_0x5e01ae:_0x1b7d9a[_0x3dc995(0x103)],'text':JSON[_0x3dc995(0x12d)](_0x1b7d9a['content']),'parentId':_0x278759['id']});break;}case v[_0x3dc995(0x15e)]:{const _0xc604e5=this[_0x3dc995(0x138)][_0x3dc995(0x140)](_0x4fe0cf,_0x3df732,_0x1b7d9a['replyId']);_0xc604e5&&_0xc604e5['parentId']&&this[_0x3dc995(0x138)]['deleteComment'](_0x4fe0cf,_0x3df732,_0x1b7d9a[_0x3dc995(0x128)]);break;}case v[_0x3dc995(0x15f)]:{this['_threadCommentModel'][_0x3dc995(0x130)](_0x4fe0cf,_0x3df732,{'commentId':_0x1b7d9a['replyId'],'text':JSON[_0x3dc995(0x12d)](_0x1b7d9a['content'])});break;}case v['Solve']:{const _0x3f593e=(_0x86516=this['_threadCommentModel'][_0x3dc995(0x150)](_0x1b7d9a[_0x3dc995(0x143)])['find'](_0x66ac4=>_0x66ac4['threadId']===_0x1b7d9a['threadId']))==null?void 0x0:_0x86516['root'];_0x3f593e&&this[_0x3dc995(0x138)]['resolveComment'](_0x4fe0cf,_0x3df732,_0x3f593e['id'],_0x1b7d9a[_0x3dc995(0x129)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x38c346(_0x4c6e3d)),p(0x1,_0x38c346(_0x17e0dc)),p(0x2,_0x38c346(_0x65ef30)),p(0x3,_0x38c346(_0x52b3d9))],_);const z=_0x22398f(0x133),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x119214,_0x28bfee,_0x46b6d9,_0x3c1f98)=>{const _0x4ec814=_0x22398f;for(var _0x32f81c=_0x3c1f98>0x1?void 0x0:_0x3c1f98?k(_0x28bfee,_0x46b6d9):_0x28bfee,_0x4aad35=_0x119214[_0x4ec814(0x136)]-0x1,_0x4891e6;_0x4aad35>=0x0;_0x4aad35--)(_0x4891e6=_0x119214[_0x4aad35])&&(_0x32f81c=_0x4891e6(_0x32f81c)||_0x32f81c);return _0x32f81c;},b=(_0x25040b,_0x386058)=>(_0xe9e97,_0x48a07a)=>_0x386058(_0xe9e97,_0x48a07a,_0x25040b);function X(_0x957d27,_0x27b115){const _0x297ebb=_0x22398f,_0x19508a=_0x957d27[_0x297ebb(0x11e)][0x0];return{..._0x27b115,'id':_0x19508a[_0x297ebb(0x128)],'resolved':_0x957d27['solved']===0x1,'dT':y(_0x19508a['createTimestamp']),'personId':_0x19508a['userId'],'threadId':_0x19508a[_0x297ebb(0x126)]};}function ee(_0x26415c,_0x3ea2e6,_0x35cfc8){const _0x996f7e=_0x22398f;var _0x25858a,_0x37b8c2;if(((_0x37b8c2=(_0x25858a=_0x26415c==null?void 0x0:_0x26415c[_0x996f7e(0x11e)])==null?void 0x0:_0x25858a['length'])!=null?_0x37b8c2:0x0)>0x0){const _0x1eed74=(_0x2a15af,_0xd67f88)=>({'id':_0x2a15af[_0x996f7e(0x128)],'threadId':_0x2a15af['threadId'],'dT':y(_0x2a15af[_0x996f7e(0x167)]),'personId':_0x2a15af[_0x996f7e(0x103)],'resolved':_0x26415c[_0x996f7e(0x129)]===I[_0x996f7e(0x10b)],'unitId':_0x3ea2e6,'subUnitId':_0x35cfc8,'text':JSON[_0x996f7e(0x12d)](_0x2a15af[_0x996f7e(0x107)]),'parentId':_0xd67f88}),_0x839f48=_0x1eed74(_0x26415c[_0x996f7e(0x11e)][0x0]);return{..._0x839f48,'children':_0x26415c['replies']['slice'](0x1)[_0x996f7e(0x146)](_0x106235=>_0x1eed74(_0x106235,_0x839f48['id']))};}return null;}let S=class{constructor(_0xead164,_0x3140d6,_0x21a18b){const _0x50f2e8=_0x22398f;this[_0x50f2e8(0x10f)]=_0xead164,this['_userService']=_0x3140d6,this['_sessionService']=_0x21a18b;}async[_0x22398f(0x120)](_0xfd4413){const _0x39c1c2=_0x22398f;var _0x58771c,_0x283feb;const {parentId:_0x43d403,unitId:_0x540d64,text:_0x2999aa,threadId:_0x387a0b}=_0xfd4413,_0x18c856=(_0x283feb=(_0x58771c=_0x2999aa[_0x39c1c2(0x151)])==null?void 0x0:_0x58771c['filter'](_0x235baa=>_0x235baa['rangeType']===_0x54fedc[_0x39c1c2(0x108)])['map'](_0x1cf657=>_0x1cf657[_0x39c1c2(0x118)]))!=null?_0x283feb:[],_0x19fc66=JSON[_0x39c1c2(0x166)](_0x2999aa),_0x6a3080=(await this[_0x39c1c2(0x154)][_0x39c1c2(0x106)](_0x540d64))['getMemberID']();if(_0x43d403){const _0x24f808={'memberId':_0x6a3080,'unitId':_0x540d64,'content':_0x19fc66,'mention':_0x18c856,'threadId':_0x387a0b},_0x35fa9d=(await this[_0x39c1c2(0x10f)][_0x39c1c2(0x135)]('/universer-api/comment/unit/'+_0x540d64+_0x39c1c2(0x165),{'body':_0x24f808}))['body'][_0x39c1c2(0x113)];return{..._0xfd4413,'id':_0x35fa9d[_0x39c1c2(0x128)],'dT':_0x595bba(+_0x35fa9d[_0x39c1c2(0x167)])[_0x39c1c2(0x13b)](_0x39c1c2(0x123)),'personId':_0x35fa9d['userId']};}else{const _0x1b6da5={'memberId':_0x6a3080,'unitId':_0x540d64,'content':_0x19fc66,'mention':_0x18c856},_0x8ee2a1=await this[_0x39c1c2(0x10f)][_0x39c1c2(0x135)]('/universer-api/comment/unit/'+_0x540d64+_0x39c1c2(0x15d),{'body':_0x1b6da5});return X(_0x8ee2a1['body'][_0x39c1c2(0x137)],_0xfd4413);}}async[_0x22398f(0x130)](_0x2d7d26){const _0x55e1b8=_0x22398f;var _0x31a5c5,_0x54559f;const {text:_0x2ed0cc,unitId:_0xefaa95}=_0x2d7d26,_0x12ba40=(_0x54559f=(_0x31a5c5=_0x2ed0cc[_0x55e1b8(0x151)])==null?void 0x0:_0x31a5c5[_0x55e1b8(0x15b)](_0x166f18=>_0x166f18[_0x55e1b8(0x122)]===_0x54fedc[_0x55e1b8(0x108)])['map'](_0x54a5e6=>_0x54a5e6['rangeId']))!=null?_0x54559f:[],_0x56af7=JSON[_0x55e1b8(0x166)](_0x2ed0cc),_0x19a079=_0x2d7d26[_0x55e1b8(0x126)],_0x58a80c=_0x2d7d26['id'],_0x4a9d16={'memberId':(await this[_0x55e1b8(0x154)][_0x55e1b8(0x106)](_0xefaa95))[_0x55e1b8(0x124)](),'unitId':_0xefaa95,'threadId':_0x19a079,'mention':_0x12ba40,'content':_0x56af7,'replyId':_0x58a80c},_0x31e128=await this[_0x55e1b8(0x10f)][_0x55e1b8(0x135)](_0x55e1b8(0x153)+_0xefaa95+_0x55e1b8(0x15c),{'body':_0x4a9d16});return!_0x31e128[_0x55e1b8(0x13c)][_0x55e1b8(0x142)]||_0x31e128[_0x55e1b8(0x13c)][_0x55e1b8(0x142)][_0x55e1b8(0x117)]===0x1;}async[_0x22398f(0x157)](_0x14b3ef){const _0x549c35=_0x22398f,{unitId:_0x805ce4}=_0x14b3ef,_0xa0fdbd=_0x14b3ef[_0x549c35(0x126)],_0x28fcca={'memberId':this[_0x549c35(0x164)][_0x549c35(0x131)]()['userID'],'unitId':_0x805ce4,'threadId':_0xa0fdbd,'solved':_0x14b3ef[_0x549c35(0x145)]?I[_0x549c35(0x10b)]:I[_0x549c35(0x10a)]},_0x389a26=await this[_0x549c35(0x10f)][_0x549c35(0x135)](_0x549c35(0x153)+_0x805ce4+'/solved',{'body':_0x28fcca});return!_0x389a26[_0x549c35(0x13c)][_0x549c35(0x142)]||_0x389a26[_0x549c35(0x13c)][_0x549c35(0x142)][_0x549c35(0x117)]===0x1;}async[_0x22398f(0x119)](_0x55f35b,_0x552a0a,_0x5f366a,_0x2a0af3){const _0x28a78c=_0x22398f,_0x58f45e={'memberId':(await this[_0x28a78c(0x154)]['requireSession'](_0x55f35b))['getMemberID'](),'threadId':_0x5f366a,'replyId':_0x2a0af3,'unitId':_0x55f35b},_0x52b6d2=await this[_0x28a78c(0x10f)][_0x28a78c(0x135)](_0x28a78c(0x153)+_0x55f35b+_0x28a78c(0x14c),{'body':_0x58f45e});return!_0x52b6d2['body'][_0x28a78c(0x142)]||_0x52b6d2[_0x28a78c(0x13c)]['error'][_0x28a78c(0x117)]===0x1;}async[_0x22398f(0x116)](_0x5b871d,_0xc2a3f7,_0x33c314){const _0x590f42=_0x22398f,_0x45cdd8={'unitId':_0x5b871d,'threadId':_0x33c314},_0x3f63f5=await this[_0x590f42(0x10f)][_0x590f42(0x135)](_0x590f42(0x153)+_0x5b871d+_0x590f42(0x12b),{'body':_0x45cdd8}),_0x97d513=_0x33c314[_0x590f42(0x146)](_0x272bae=>ee(_0x3f63f5['body'][_0x590f42(0x13f)][_0x272bae],_0x5b871d,_0xc2a3f7))[_0x590f42(0x15b)](Boolean);return Object[_0x590f42(0x159)](_0x3f63f5[_0x590f42(0x13c)][_0x590f42(0x134)])[_0x590f42(0x149)](_0x26bbd1=>{const _0x526b63=_0x590f42;this[_0x526b63(0x164)][_0x526b63(0x11a)](_0x26bbd1);}),_0x97d513;}['saveCommentToSnapshot'](_0x13f30b){const _0x2486e2=_0x22398f;return{'id':_0x13f30b['id'],'threadId':_0x13f30b[_0x2486e2(0x126)],'ref':_0x13f30b[_0x2486e2(0x139)]};}};S=Q([b(0x0,_0x38c346(_0x17fd7c)),b(0x1,_0x38c346(_0x65ef30)),b(0x2,_0x38c346(_0x369ee5))],S);var re=Object[_0x22398f(0x132)],te=(_0x2c0b48,_0x17afed,_0x52a24a,_0x140cfe)=>{for(var _0x403a0e=_0x140cfe>0x1?void 0x0:_0x140cfe?re(_0x17afed,_0x52a24a):_0x17afed,_0x3b2bc4=_0x2c0b48['length']-0x1,_0x5d6194;_0x3b2bc4>=0x0;_0x3b2bc4--)(_0x5d6194=_0x2c0b48[_0x3b2bc4])&&(_0x403a0e=_0x5d6194(_0x403a0e)||_0x403a0e);return _0x403a0e;},M=(_0x27b2a8,_0x526449)=>(_0xbddc3c,_0x45e71e)=>_0x526449(_0xbddc3c,_0x45e71e,_0x27b2a8);let f=class extends _0x3b5549{constructor(_0x1e3131,_0x8608f4){const _0x4b9011=_0x22398f;super(),this[_0x4b9011(0x161)]=_0x1e3131,this[_0x4b9011(0x125)]=_0x8608f4,this['_initDataSource']();}[_0x22398f(0x11c)](){const _0x4e886f=_0x22398f;this[_0x4e886f(0x161)][_0x4e886f(0x10d)]=this[_0x4e886f(0x125)],this['_threadCommentDataSourceService'][_0x4e886f(0x155)]=!0x1;}};f=te([M(0x0,_0x68d5e8),M(0x1,_0x38c346(S))],f);var se=Object[_0x22398f(0x112)],oe=Object[_0x22398f(0x132)],ne=(_0x5e0769,_0xad133f,_0x4db905)=>_0xad133f in _0x5e0769?se(_0x5e0769,_0xad133f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4db905}):_0x5e0769[_0xad133f]=_0x4db905,ie=(_0x5a2d6f,_0x5d6b9d,_0x53b5cb,_0x1cfdf8)=>{for(var _0x14d267=_0x1cfdf8>0x1?void 0x0:_0x1cfdf8?oe(_0x5d6b9d,_0x53b5cb):_0x5d6b9d,_0x4929f0=_0x5a2d6f['length']-0x1,_0x1ae553;_0x4929f0>=0x0;_0x4929f0--)(_0x1ae553=_0x5a2d6f[_0x4929f0])&&(_0x14d267=_0x1ae553(_0x14d267)||_0x14d267);return _0x14d267;},N=(_0x3bf783,_0x157144)=>(_0x2a81b4,_0x3d7cf0)=>_0x157144(_0x2a81b4,_0x3d7cf0,_0x3bf783),$=(_0x416d4f,_0x50b02a,_0x5dcc31)=>ne(_0x416d4f,typeof _0x50b02a!=_0x22398f(0x141)?_0x50b02a+'':_0x50b02a,_0x5dcc31);function _0x5040(_0x5477e3,_0xfd7851){_0x5477e3=_0x5477e3-0x103;const _0x2ecd97=_0x2ecd();let _0x50409d=_0x2ecd97[_0x5477e3];return _0x50409d;}let g=class extends _0x5eca17{constructor(_0x922b90=O,_0x333c94,_0x42460c){const _0x4a7057=_0x22398f;super(),this['_config']=_0x922b90,this[_0x4a7057(0x114)]=_0x333c94,this[_0x4a7057(0x147)]=_0x42460c;const {..._0x307efe}=_0x492394({},O,this[_0x4a7057(0x14a)]);this[_0x4a7057(0x147)][_0x4a7057(0x11d)](z,_0x307efe);}[_0x22398f(0x163)](){const _0x56a152=_0x22398f;[[S],[f],[_]][_0x56a152(0x149)](_0x14cf19=>{const _0x46c469=_0x56a152;this['_injector'][_0x46c469(0x14d)](_0x14cf19);});}[_0x22398f(0x11b)](){const _0x5978a0=_0x22398f;this[_0x5978a0(0x114)]['get'](f),this[_0x5978a0(0x114)][_0x5978a0(0x156)](_);}};$(g,'pluginName',W),$(g,_0x22398f(0x115),_0x49c8b7[_0x22398f(0x14b)]),g=ie([_0x3ddd01(_0x59c59f,_0x425f68,_0x32b697),N(0x1,_0x38c346(_0x52b3d9)),N(0x2,_0x3b7d40)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2fb627=_0x5cb0;(function(_0x545b42,_0x519da9){const _0x4cf8f2=_0x5cb0,_0xfd3b48=_0x545b42();while(!![]){try{const _0x5edaae=-parseInt(_0x4cf8f2(0xb1))/0x1+parseInt(_0x4cf8f2(0xaf))/0x2*(parseInt(_0x4cf8f2(0xd9))/0x3)+-parseInt(_0x4cf8f2(0x9e))/0x4*(parseInt(_0x4cf8f2(0x7f))/0x5)+-parseInt(_0x4cf8f2(0x76))/0x6*(parseInt(_0x4cf8f2(0xcc))/0x7)+parseInt(_0x4cf8f2(0xa3))/0x8*(parseInt(_0x4cf8f2(0xcd))/0x9)+parseInt(_0x4cf8f2(0xba))/0xa*(-parseInt(_0x4cf8f2(0x99))/0xb)+parseInt(_0x4cf8f2(0xcf))/0xc;if(_0x5edaae===_0x519da9)break;else _0xfd3b48['push'](_0xfd3b48['shift']());}catch(_0x23a41c){_0xfd3b48['push'](_0xfd3b48['shift']());}}}(_0x582b,0xeecb5));function _0x582b(){const _0x23932c=['_initDataSource','body','Delete','175AbsMhM','3663rTKSXL','/list','41250252voVfJs','getUser','parse','Edit','subscribe','length','root','pipe','Solve','_sessionService','1821UDBtiq','_configService','map','content','_commentService','178986bFAKzE','ref','solved','requireSession','getOwnPropertyDescriptor','error','syncUpdateMutationToColla','forEach','thread-comment-data-source.config','5470NmtFlt','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Add','COMMENT','addComment','add','Unknown','/add','commentUpdate$','symbol','rangeId','stringify','users','rangeType','_initUserSync','getComment','filter','addUser','dataSource','disposeWithMe','find','slice','_threadCommentDataSource','delete','threadId','_threadCommentDataSourceService','2629BDIgkn','replyId','comment','code','_injector','4076JnzUkr','Solved','unitId','_init','getMemberID','26944bLHBzA','resolveComment','updateComment','userId','deleteComment','format','userID','UNRECOGNIZED','customRanges','_userService','YYYY/MM/DD\x20HH:mm','get','2366FLpeRC','/universer-api/comment/unit/','1392575jQsllM','UNIVER_UNKNOWN','createTimestamp','type','post','_config','getUnit','_threadCommentModel','personId','54190FsoRCw','user','pluginName','OpenOrReOpen','listComments','/solved','setConfig','/universer-api/user/list','saveCommentToSnapshot','/edit','payload','size','_httpService','replies','Reply'];_0x582b=function(){return _0x23932c;};return _0x582b();}import{CommentService as _0x331514,CollaborationSessionService as _0x7f4081,UniverCollaborationClientPlugin as _0x30dfaf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x634f96}from'@univerjs-pro/license';import{dayjs as _0x50be2f,UserManagerService as _0x15993b,Inject as _0x42c03f,Injector as _0x5f5add,Disposable as _0x39d51c,CustomRangeType as _0x34930a,UniverInstanceType as _0x516719,DependentOn as _0x5b97c0,IConfigService as _0x553ed8,Plugin as _0x452db7,merge as _0xe32879}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4c9c4f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x95de07,IThreadCommentDataSourceService as _0x2a0f84}from'@univerjs/thread-comment';import{bufferTime as _0x1b7798}from'rxjs';import{HTTPService as _0x5154de}from'@univerjs/network';const W=_0x2fb627(0x80);var I=(_0x4f9fb0=>(_0x4f9fb0[_0x4f9fb0[_0x2fb627(0xbd)]=0x0]=_0x2fb627(0xbd),_0x4f9fb0[_0x4f9fb0[_0x2fb627(0x9f)]=0x1]='Solved',_0x4f9fb0[_0x4f9fb0[_0x2fb627(0xaa)]=-0x1]=_0x2fb627(0xaa),_0x4f9fb0))(I||{}),v=(_0xb4a9c9=>(_0xb4a9c9[_0xb4a9c9[_0x2fb627(0x85)]=0x0]=_0x2fb627(0x85),_0xb4a9c9[_0xb4a9c9[_0x2fb627(0x81)]=0x1]='Add',_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xc8)]=0x2]='Reply',_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xd2)]=0x3]=_0x2fb627(0xd2),_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xcb)]=0x4]=_0x2fb627(0xcb),_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xd7)]=0x5]=_0x2fb627(0xd7),_0xb4a9c9[_0xb4a9c9[_0x2fb627(0xaa)]=-0x1]=_0x2fb627(0xaa),_0xb4a9c9))(v||{});const y=_0x58a475=>_0x50be2f(new Date(+_0x58a475))[_0x2fb627(0xa8)](_0x2fb627(0xad)),B=async(_0x19c7fd,_0xb7da9)=>{const _0xec88ef=_0x2fb627,_0xab3be1=_0x19c7fd['get'](_0x15993b),_0x40c3e6=_0x19c7fd[_0xec88ef(0xae)](_0x5154de);_0xb7da9[_0xec88ef(0x7d)](_0x565f64=>{const _0x37dec6=_0xec88ef;_0xab3be1[_0x37dec6(0xd0)](_0x565f64)&&_0xb7da9[_0x37dec6(0x96)](_0x565f64);}),_0xb7da9[_0xec88ef(0xc5)]&&(await _0x40c3e6[_0xec88ef(0xae)](_0xec88ef(0xc1),{'params':{'userIDs':[..._0xb7da9]}}))[_0xec88ef(0xca)][_0xec88ef(0x8b)]['forEach'](_0x1a2238=>{_0x1a2238&&_0xab3be1['addUser'](_0x1a2238);});};var K=Object[_0x2fb627(0x7a)],V=(_0x4d7687,_0x546eaf,_0x3bf1ef,_0x1a0dff)=>{const _0x552857=_0x2fb627;for(var _0x2c1a0f=_0x1a0dff>0x1?void 0x0:_0x1a0dff?K(_0x546eaf,_0x3bf1ef):_0x546eaf,_0x37c2d2=_0x4d7687[_0x552857(0xd4)]-0x1,_0x467d42;_0x37c2d2>=0x0;_0x37c2d2--)(_0x467d42=_0x4d7687[_0x37c2d2])&&(_0x2c1a0f=_0x467d42(_0x2c1a0f)||_0x2c1a0f);return _0x2c1a0f;},p=(_0x32981,_0x37b987)=>(_0x517bd5,_0x44c422)=>_0x37b987(_0x517bd5,_0x44c422,_0x32981);let _=class extends _0x39d51c{constructor(_0x46a704,_0x4f5ea8,_0x586d9e,_0x5fcf7d){const _0x19390=_0x2fb627;super(),this[_0x19390(0x75)]=_0x46a704,this[_0x19390(0xb8)]=_0x4f5ea8,this['_userService']=_0x586d9e,this[_0x19390(0x9d)]=_0x5fcf7d,this[_0x19390(0xa1)](),this[_0x19390(0x8d)]();}[_0x2fb627(0x8d)](){const _0x22f95a=_0x2fb627;this[_0x22f95a(0x92)](this['_threadCommentModel'][_0x22f95a(0x87)][_0x22f95a(0xd6)](_0x1b7798(0x10))[_0x22f95a(0xd3)](_0x413f9b=>{const _0x52015d=new Set();_0x413f9b['forEach'](_0x118db1=>{const _0x33472c=_0x5cb0;switch(_0x118db1['type']){case _0x33472c(0x84):{const _0x271f79=_0x118db1[_0x33472c(0xc4)][_0x33472c(0xb9)];_0x52015d['add'](_0x271f79);break;}}}),B(this['_injector'],_0x52015d);}));}['_init'](){const _0x273cf3=_0x2fb627;this['disposeWithMe'](this[_0x273cf3(0x75)][_0x273cf3(0x87)][_0x273cf3(0xd3)](async _0x22934b=>{const _0x3870a8=_0x273cf3;var _0x464534,_0x29301a,_0x1f242d,_0x2f5812;const _0x36e75e=(_0x464534=this['_threadCommentModel'][_0x3870a8(0xb7)](_0x22934b[_0x3870a8(0xa0)])[_0x3870a8(0x93)](_0x269afd=>_0x269afd[_0x3870a8(0x97)]===_0x22934b['threadId']))==null?void 0x0:_0x464534[_0x3870a8(0xd5)];if(!_0x36e75e)return;const {unitId:_0x46afea,subUnitId:_0x55e79c}=_0x36e75e;switch(_0x22934b[_0x3870a8(0xbb)]&&this[_0x3870a8(0xac)]['addUser'](_0x22934b['user']),_0x22934b[_0x3870a8(0xb4)]){case v[_0x3870a8(0x81)]:break;case v[_0x3870a8(0xc8)]:{this['_threadCommentModel'][_0x3870a8(0x83)](_0x46afea,_0x55e79c,{'unitId':_0x46afea,'subUnitId':_0x55e79c,'ref':'','id':_0x22934b[_0x3870a8(0x9a)],'dT':y(+_0x22934b[_0x3870a8(0xb3)]),'threadId':_0x22934b['threadId'],'personId':(_0x1f242d=(_0x29301a=_0x22934b[_0x3870a8(0xbb)])==null?void 0x0:_0x29301a['userID'])!=null?_0x1f242d:_0x22934b['userId'],'text':JSON[_0x3870a8(0xd1)](_0x22934b[_0x3870a8(0x74)]),'parentId':_0x36e75e['id']});break;}case v[_0x3870a8(0xcb)]:{const _0x2a038a=this[_0x3870a8(0xb8)][_0x3870a8(0x8e)](_0x46afea,_0x55e79c,_0x22934b['replyId']);_0x2a038a&&_0x2a038a['parentId']&&this[_0x3870a8(0xb8)]['deleteComment'](_0x46afea,_0x55e79c,_0x22934b['replyId']);break;}case v[_0x3870a8(0xd2)]:{this[_0x3870a8(0xb8)][_0x3870a8(0xa5)](_0x46afea,_0x55e79c,{'commentId':_0x22934b[_0x3870a8(0x9a)],'text':JSON[_0x3870a8(0xd1)](_0x22934b[_0x3870a8(0x74)])});break;}case v[_0x3870a8(0xd7)]:{const _0x1ec12e=(_0x2f5812=this[_0x3870a8(0xb8)][_0x3870a8(0xb7)](_0x22934b[_0x3870a8(0xa0)])['find'](_0x42989d=>_0x42989d[_0x3870a8(0x97)]===_0x22934b[_0x3870a8(0x97)]))==null?void 0x0:_0x2f5812[_0x3870a8(0xd5)];_0x1ec12e&&this['_threadCommentModel'][_0x3870a8(0xa4)](_0x46afea,_0x55e79c,_0x1ec12e['id'],_0x22934b[_0x3870a8(0x78)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x42c03f(_0x331514)),p(0x1,_0x42c03f(_0x95de07)),p(0x2,_0x42c03f(_0x15993b)),p(0x3,_0x42c03f(_0x5f5add))],_);const z=_0x2fb627(0x7e),O={};var k=Object[_0x2fb627(0x7a)],Q=(_0xb82bc5,_0x5c8fcf,_0x3d11e2,_0x2853e0)=>{const _0x4ad437=_0x2fb627;for(var _0xc17ac1=_0x2853e0>0x1?void 0x0:_0x2853e0?k(_0x5c8fcf,_0x3d11e2):_0x5c8fcf,_0x15f89a=_0xb82bc5[_0x4ad437(0xd4)]-0x1,_0x32846f;_0x15f89a>=0x0;_0x15f89a--)(_0x32846f=_0xb82bc5[_0x15f89a])&&(_0xc17ac1=_0x32846f(_0xc17ac1)||_0xc17ac1);return _0xc17ac1;},b=(_0x244d04,_0x318ff1)=>(_0xad5217,_0x24547c)=>_0x318ff1(_0xad5217,_0x24547c,_0x244d04);function X(_0x243440,_0x389fe7){const _0x17f5b8=_0x2fb627,_0x861cfb=_0x243440['replies'][0x0];return{..._0x389fe7,'id':_0x861cfb['replyId'],'resolved':_0x243440['solved']===0x1,'dT':y(_0x861cfb[_0x17f5b8(0xb3)]),'personId':_0x861cfb[_0x17f5b8(0xa6)],'threadId':_0x861cfb['threadId']};}function ee(_0x173c74,_0xc4b487,_0x1be5b4){const _0x3b4c43=_0x2fb627;var _0x101df4,_0xc7011c;if(((_0xc7011c=(_0x101df4=_0x173c74==null?void 0x0:_0x173c74['replies'])==null?void 0x0:_0x101df4[_0x3b4c43(0xd4)])!=null?_0xc7011c:0x0)>0x0){const _0x3c5b43=(_0x2e1708,_0x1c4692)=>({'id':_0x2e1708['replyId'],'threadId':_0x2e1708[_0x3b4c43(0x97)],'dT':y(_0x2e1708[_0x3b4c43(0xb3)]),'personId':_0x2e1708[_0x3b4c43(0xa6)],'resolved':_0x173c74[_0x3b4c43(0x78)]===I[_0x3b4c43(0x9f)],'unitId':_0xc4b487,'subUnitId':_0x1be5b4,'text':JSON[_0x3b4c43(0xd1)](_0x2e1708[_0x3b4c43(0x74)]),'parentId':_0x1c4692}),_0x3eb89e=_0x3c5b43(_0x173c74['replies'][0x0]);return{..._0x3eb89e,'children':_0x173c74[_0x3b4c43(0xc7)][_0x3b4c43(0x94)](0x1)[_0x3b4c43(0x73)](_0x18e67a=>_0x3c5b43(_0x18e67a,_0x3eb89e['id']))};}return null;}let S=class{constructor(_0x28e8f6,_0x9ae3b7,_0x3b5371){const _0x53bfb5=_0x2fb627;this[_0x53bfb5(0xc6)]=_0x28e8f6,this[_0x53bfb5(0xac)]=_0x9ae3b7,this[_0x53bfb5(0xd8)]=_0x3b5371;}async['addComment'](_0x102fcd){const _0x48bd5a=_0x2fb627;var _0xae6801,_0x53387a;const {parentId:_0x50b467,unitId:_0xcdc44b,text:_0x12039c,threadId:_0x5837ff}=_0x102fcd,_0x3d0e82=(_0x53387a=(_0xae6801=_0x12039c[_0x48bd5a(0xab)])==null?void 0x0:_0xae6801[_0x48bd5a(0x8f)](_0x4c0169=>_0x4c0169[_0x48bd5a(0x8c)]===_0x34930a[_0x48bd5a(0x82)])['map'](_0x36843d=>_0x36843d[_0x48bd5a(0x89)]))!=null?_0x53387a:[],_0x2eac4b=JSON['stringify'](_0x12039c),_0x483a83=(await this['_sessionService'][_0x48bd5a(0x79)](_0xcdc44b))[_0x48bd5a(0xa2)]();if(_0x50b467){const _0x299559={'memberId':_0x483a83,'unitId':_0xcdc44b,'content':_0x2eac4b,'mention':_0x3d0e82,'threadId':_0x5837ff},_0x496ad7=(await this[_0x48bd5a(0xc6)][_0x48bd5a(0xb5)](_0x48bd5a(0xb0)+_0xcdc44b+'/reply',{'body':_0x299559}))[_0x48bd5a(0xca)]['reply'];return{..._0x102fcd,'id':_0x496ad7[_0x48bd5a(0x9a)],'dT':_0x50be2f(+_0x496ad7[_0x48bd5a(0xb3)])[_0x48bd5a(0xa8)](_0x48bd5a(0xad)),'personId':_0x496ad7[_0x48bd5a(0xa6)]};}else{const _0x2933c1={'memberId':_0x483a83,'unitId':_0xcdc44b,'content':_0x2eac4b,'mention':_0x3d0e82},_0x25f86c=await this[_0x48bd5a(0xc6)]['post'](_0x48bd5a(0xb0)+_0xcdc44b+_0x48bd5a(0x86),{'body':_0x2933c1});return X(_0x25f86c[_0x48bd5a(0xca)][_0x48bd5a(0x9b)],_0x102fcd);}}async[_0x2fb627(0xa5)](_0x3b397e){const _0x20e7af=_0x2fb627;var _0x355f21,_0x1cf580;const {text:_0x12b115,unitId:_0x2002c6}=_0x3b397e,_0x19bded=(_0x1cf580=(_0x355f21=_0x12b115['customRanges'])==null?void 0x0:_0x355f21[_0x20e7af(0x8f)](_0x171097=>_0x171097[_0x20e7af(0x8c)]===_0x34930a[_0x20e7af(0x82)])['map'](_0x5d2ed0=>_0x5d2ed0['rangeId']))!=null?_0x1cf580:[],_0x1c645c=JSON[_0x20e7af(0x8a)](_0x12b115),_0x1d492b=_0x3b397e['threadId'],_0x2b670f=_0x3b397e['id'],_0x4266d6={'memberId':(await this[_0x20e7af(0xd8)][_0x20e7af(0x79)](_0x2002c6))['getMemberID'](),'unitId':_0x2002c6,'threadId':_0x1d492b,'mention':_0x19bded,'content':_0x1c645c,'replyId':_0x2b670f},_0x9c4dd3=await this[_0x20e7af(0xc6)][_0x20e7af(0xb5)](_0x20e7af(0xb0)+_0x2002c6+_0x20e7af(0xc3),{'body':_0x4266d6});return!_0x9c4dd3[_0x20e7af(0xca)][_0x20e7af(0x7b)]||_0x9c4dd3[_0x20e7af(0xca)][_0x20e7af(0x7b)][_0x20e7af(0x9c)]===0x1;}async['resolveComment'](_0x4a2393){const _0x45fd2d=_0x2fb627,{unitId:_0x358a7e}=_0x4a2393,_0x39f9f1=_0x4a2393[_0x45fd2d(0x97)],_0x48896b={'memberId':this['_userService']['getCurrentUser']()[_0x45fd2d(0xa9)],'unitId':_0x358a7e,'threadId':_0x39f9f1,'solved':_0x4a2393['resolved']?I['Solved']:I[_0x45fd2d(0xbd)]},_0x2a7d86=await this['_httpService'][_0x45fd2d(0xb5)](_0x45fd2d(0xb0)+_0x358a7e+_0x45fd2d(0xbf),{'body':_0x48896b});return!_0x2a7d86[_0x45fd2d(0xca)][_0x45fd2d(0x7b)]||_0x2a7d86[_0x45fd2d(0xca)][_0x45fd2d(0x7b)][_0x45fd2d(0x9c)]===0x1;}async[_0x2fb627(0xa7)](_0x39d236,_0x40ca8f,_0x53ad4e,_0x3a1052){const _0x545b50=_0x2fb627,_0x1523a2={'memberId':(await this[_0x545b50(0xd8)][_0x545b50(0x79)](_0x39d236))[_0x545b50(0xa2)](),'threadId':_0x53ad4e,'replyId':_0x3a1052,'unitId':_0x39d236},_0x3e00a7=await this[_0x545b50(0xc6)][_0x545b50(0xb5)](_0x545b50(0xb0)+_0x39d236+'/delete',{'body':_0x1523a2});return!_0x3e00a7[_0x545b50(0xca)][_0x545b50(0x7b)]||_0x3e00a7[_0x545b50(0xca)]['error'][_0x545b50(0x9c)]===0x1;}async[_0x2fb627(0xbe)](_0x488bd6,_0x39294e,_0x2e94bf){const _0x326b56=_0x2fb627,_0x59d90d={'unitId':_0x488bd6,'threadId':_0x2e94bf},_0x59ba31=await this['_httpService'][_0x326b56(0xb5)](_0x326b56(0xb0)+_0x488bd6+_0x326b56(0xce),{'body':_0x59d90d}),_0x3fae96=_0x2e94bf[_0x326b56(0x73)](_0x6ab117=>ee(_0x59ba31[_0x326b56(0xca)]['comments'][_0x6ab117],_0x488bd6,_0x39294e))[_0x326b56(0x8f)](Boolean);return Object['values'](_0x59ba31[_0x326b56(0xca)]['users'])['forEach'](_0x227182=>{const _0x3116ce=_0x326b56;this['_userService'][_0x3116ce(0x90)](_0x227182);}),_0x3fae96;}[_0x2fb627(0xc2)](_0x3ea70){const _0x16482e=_0x2fb627;return{'id':_0x3ea70['id'],'threadId':_0x3ea70[_0x16482e(0x97)],'ref':_0x3ea70[_0x16482e(0x77)]};}};function _0x5cb0(_0x360dbe,_0x1bda09){_0x360dbe=_0x360dbe-0x73;const _0x582b67=_0x582b();let _0x5cb0ee=_0x582b67[_0x360dbe];return _0x5cb0ee;}S=Q([b(0x0,_0x42c03f(_0x5154de)),b(0x1,_0x42c03f(_0x15993b)),b(0x2,_0x42c03f(_0x7f4081))],S);var re=Object[_0x2fb627(0x7a)],te=(_0x254bc9,_0x50587a,_0x4f7936,_0x27e136)=>{const _0x3fad4a=_0x2fb627;for(var _0x560536=_0x27e136>0x1?void 0x0:_0x27e136?re(_0x50587a,_0x4f7936):_0x50587a,_0x2a33aa=_0x254bc9[_0x3fad4a(0xd4)]-0x1,_0xb4d238;_0x2a33aa>=0x0;_0x2a33aa--)(_0xb4d238=_0x254bc9[_0x2a33aa])&&(_0x560536=_0xb4d238(_0x560536)||_0x560536);return _0x560536;},M=(_0x55bc1a,_0xc8a9aa)=>(_0x14abfd,_0x11b824)=>_0xc8a9aa(_0x14abfd,_0x11b824,_0x55bc1a);let f=class extends _0x39d51c{constructor(_0x522e2b,_0x461d60){const _0x531f63=_0x2fb627;super(),this[_0x531f63(0x98)]=_0x522e2b,this[_0x531f63(0x95)]=_0x461d60,this[_0x531f63(0xc9)]();}[_0x2fb627(0xc9)](){const _0x3c2cc4=_0x2fb627;this[_0x3c2cc4(0x98)][_0x3c2cc4(0x91)]=this['_threadCommentDataSource'],this[_0x3c2cc4(0x98)][_0x3c2cc4(0x7c)]=!0x1;}};f=te([M(0x0,_0x2a0f84),M(0x1,_0x42c03f(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x5c3097,_0x55b527,_0x588ed0)=>_0x55b527 in _0x5c3097?se(_0x5c3097,_0x55b527,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x588ed0}):_0x5c3097[_0x55b527]=_0x588ed0,ie=(_0x988407,_0x22c3a1,_0x2122b6,_0x36597b)=>{for(var _0x51aac6=_0x36597b>0x1?void 0x0:_0x36597b?oe(_0x22c3a1,_0x2122b6):_0x22c3a1,_0x361489=_0x988407['length']-0x1,_0x346972;_0x361489>=0x0;_0x361489--)(_0x346972=_0x988407[_0x361489])&&(_0x51aac6=_0x346972(_0x51aac6)||_0x51aac6);return _0x51aac6;},N=(_0x52180c,_0x2aeec8)=>(_0x493c0e,_0x15214e)=>_0x2aeec8(_0x493c0e,_0x15214e,_0x52180c),$=(_0xf239b2,_0x13169a,_0x365154)=>ne(_0xf239b2,typeof _0x13169a!=_0x2fb627(0x88)?_0x13169a+'':_0x13169a,_0x365154);let g=class extends _0x452db7{constructor(_0x5efb16=O,_0x4a01d,_0x5a9adc){const _0x58db6d=_0x2fb627;super(),this[_0x58db6d(0xb6)]=_0x5efb16,this['_injector']=_0x4a01d,this[_0x58db6d(0xda)]=_0x5a9adc;const {..._0x152886}=_0xe32879({},O,this[_0x58db6d(0xb6)]);this[_0x58db6d(0xda)][_0x58db6d(0xc0)](z,_0x152886);}['onStarting'](){const _0x475251=_0x2fb627;[[S],[f],[_]][_0x475251(0x7d)](_0x225ac8=>{const _0x393a15=_0x475251;this[_0x393a15(0x9d)][_0x393a15(0x84)](_0x225ac8);});}['onReady'](){const _0x2ea09e=_0x2fb627;this[_0x2ea09e(0x9d)]['get'](f),this[_0x2ea09e(0x9d)][_0x2ea09e(0xae)](_);}};$(g,_0x2fb627(0xbc),W),$(g,_0x2fb627(0xb4),_0x516719[_0x2fb627(0xb2)]),g=ie([_0x5b97c0(_0x4c9c4f,_0x30dfaf,_0x634f96),N(0x1,_0x42c03f(_0x5f5add)),N(0x2,_0x553ed8)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x5cab(){const _0x4b7f70=['_configService','symbol','userId','rxjs','Solved','_userService','subscribe','unitId','saveCommentToSnapshot','Unknown','resolveComment','object','1860972majFuy','9809MdaiYf','forEach','UniverThreadCommentUIPlugin','@univerjs/network','UniverProCollaborationClient','@univerjs/thread-comment','CollaborationSessionService','rangeId','find','customRanges','_initDataSource','code','87390twmqYr','solved','post','slice','exports','@univerjs/core','getUnit','@univerjs-pro/collaboration-client','Edit','_injector','/edit','UniverThreadComment','@univerjs-pro/license','Disposable','_initUserSync','syncUpdateMutationToColla','onStarting','amd','users','deleteComment','body','COMMENT','_threadCommentDataSource','delete','replyId','/universer-api/comment/unit/','263455sRKhMl','parentId','values','disposeWithMe','function','Add','UniverProLicense','error','size','ThreadCommentModel','toStringTag','format','HTTPService','46lNDibv','Solve','requireSession','getComment','updateComment','threadId','Module','replies','addComment','_commentService','_init','/universer-api/user/list','pipe','3301753fEyHJl','dayjs','_threadCommentModel','8FoLKbA','OpenOrReOpen','reply','root','Injector','UserManagerService','/list','filter','add','CustomRangeType','content','payload','userID','defineProperty','UniverCollaborationClientPlugin','/reply','personId','merge','length','Reply','addUser','YYYY/MM/DD\x20HH:mm','6519986sCOCjF','listComments','_threadCommentDataSourceService','UniverNetwork','user','createTimestamp','get','20NYetkd','48eNVyKy','UNIVER_UNKNOWN','stringify','_sessionService','UNRECOGNIZED','Plugin','_httpService','Inject','IThreadCommentDataSourceService','type','4021758WlhrZg','Delete','map','UniverThreadCommentDataSourcePlugin','_config','comments','thread-comment-data-source.config','getOwnPropertyDescriptor','getMemberID','/add','522UnHtTW','parse'];_0x5cab=function(){return _0x4b7f70;};return _0x5cab();}function _0x2623(_0x4cbe41,_0x4e365d){_0x4cbe41=_0x4cbe41-0x113;const _0x5cabd5=_0x5cab();let _0x262313=_0x5cabd5[_0x4cbe41];return _0x262313;}(function(_0x2583a6,_0x525749){const _0x585576=_0x2623,_0x2c235a=_0x2583a6();while(!![]){try{const _0x17401e=parseInt(_0x585576(0x178))/0x1*(parseInt(_0x585576(0x127))/0x2)+parseInt(_0x585576(0x177))/0x3+-parseInt(_0x585576(0x154))/0x4*(-parseInt(_0x585576(0x11a))/0x5)+parseInt(_0x585576(0x15f))/0x6+-parseInt(_0x585576(0x134))/0x7*(-parseInt(_0x585576(0x137))/0x8)+parseInt(_0x585576(0x169))/0x9*(parseInt(_0x585576(0x184))/0xa)+-parseInt(_0x585576(0x14d))/0xb*(parseInt(_0x585576(0x155))/0xc);if(_0x17401e===_0x525749)break;else _0x2c235a['push'](_0x2c235a['shift']());}catch(_0x2b9302){_0x2c235a['push'](_0x2c235a['shift']());}}}(_0x5cab,0x5e8f4),function(_0x3fb062,_0x3b8f62){const _0x15b7f9=_0x2623;typeof exports==_0x15b7f9(0x176)&&typeof module<'u'?_0x3b8f62(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==_0x15b7f9(0x11e)&&define[_0x15b7f9(0x195)]?define([_0x15b7f9(0x188),_0x15b7f9(0x18b),_0x15b7f9(0x190),_0x15b7f9(0x189),'@univerjs/thread-comment-ui',_0x15b7f9(0x17d),_0x15b7f9(0x16e),_0x15b7f9(0x17b)],_0x3b8f62):(_0x3fb062=typeof globalThis<'u'?globalThis:_0x3fb062||self,_0x3b8f62(_0x3fb062['UniverProThreadCommentDatasource']={},_0x3fb062[_0x15b7f9(0x17c)],_0x3fb062[_0x15b7f9(0x120)],_0x3fb062['UniverCore'],_0x3fb062['UniverThreadCommentUi'],_0x3fb062[_0x15b7f9(0x18f)],_0x3fb062['rxjs'],_0x3fb062[_0x15b7f9(0x150)]));}(this,function(_0x5cd3d2,_0x33a76f,_0x2a361b,_0x24455d,_0x20fafc,_0x1a507f,_0x54f966,_0x5cfd00){'use strict';const _0xfde14a=_0x2623;const _0x59f24d='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x365d72=(_0x32e01c=>(_0x32e01c[_0x32e01c[_0xfde14a(0x138)]=0x0]=_0xfde14a(0x138),_0x32e01c[_0x32e01c['Solved']=0x1]=_0xfde14a(0x16f),_0x32e01c[_0x32e01c[_0xfde14a(0x159)]=-0x1]='UNRECOGNIZED',_0x32e01c))(_0x365d72||{}),_0x3210e3=(_0x275c74=>(_0x275c74[_0x275c74[_0xfde14a(0x174)]=0x0]=_0xfde14a(0x174),_0x275c74[_0x275c74[_0xfde14a(0x11f)]=0x1]=_0xfde14a(0x11f),_0x275c74[_0x275c74[_0xfde14a(0x14a)]=0x2]=_0xfde14a(0x14a),_0x275c74[_0x275c74['Edit']=0x3]=_0xfde14a(0x18c),_0x275c74[_0x275c74[_0xfde14a(0x160)]=0x4]=_0xfde14a(0x160),_0x275c74[_0x275c74[_0xfde14a(0x128)]=0x5]='Solve',_0x275c74[_0x275c74[_0xfde14a(0x159)]=-0x1]='UNRECOGNIZED',_0x275c74))(_0x3210e3||{});const _0x184c02=_0x29fc47=>_0x24455d[_0xfde14a(0x135)](new Date(+_0x29fc47))[_0xfde14a(0x125)](_0xfde14a(0x14c)),_0x488455=async(_0x3b139a,_0x1a967e)=>{const _0x1ea951=_0xfde14a,_0x56ecb6=_0x3b139a[_0x1ea951(0x153)](_0x24455d['UserManagerService']),_0x1a5f1a=_0x3b139a[_0x1ea951(0x153)](_0x5cfd00[_0x1ea951(0x126)]);_0x1a967e[_0x1ea951(0x179)](_0x31ae0a=>{const _0x132f62=_0x1ea951;_0x56ecb6['getUser'](_0x31ae0a)&&_0x1a967e[_0x132f62(0x117)](_0x31ae0a);}),_0x1a967e[_0x1ea951(0x122)]&&(await _0x1a5f1a[_0x1ea951(0x153)](_0x1ea951(0x132),{'params':{'userIDs':[..._0x1a967e]}}))[_0x1ea951(0x114)][_0x1ea951(0x196)]['forEach'](_0x51b8a6=>{const _0x33fad6=_0x1ea951;_0x51b8a6&&_0x56ecb6[_0x33fad6(0x14b)](_0x51b8a6);});};var _0x2af71f=Object[_0xfde14a(0x166)],_0x432a65=(_0x383219,_0x258a97,_0x3d9f4e,_0x5753ce)=>{for(var _0x4dec72=_0x5753ce>0x1?void 0x0:_0x5753ce?_0x2af71f(_0x258a97,_0x3d9f4e):_0x258a97,_0x265429=_0x383219['length']-0x1,_0x587fb0;_0x265429>=0x0;_0x265429--)(_0x587fb0=_0x383219[_0x265429])&&(_0x4dec72=_0x587fb0(_0x4dec72)||_0x4dec72);return _0x4dec72;},_0x28293e=(_0x50d842,_0x2156e8)=>(_0x5b3796,_0x383d5d)=>_0x2156e8(_0x5b3796,_0x383d5d,_0x50d842);let _0x216e98=class extends _0x24455d[_0xfde14a(0x191)]{constructor(_0x35b170,_0x59265e,_0x31c3da,_0x4da7c9){const _0x455f1d=_0xfde14a;super(),this[_0x455f1d(0x130)]=_0x35b170,this[_0x455f1d(0x136)]=_0x59265e,this[_0x455f1d(0x170)]=_0x31c3da,this[_0x455f1d(0x18d)]=_0x4da7c9,this[_0x455f1d(0x131)](),this[_0x455f1d(0x192)]();}[_0xfde14a(0x192)](){const _0x40289b=_0xfde14a;this['disposeWithMe'](this[_0x40289b(0x136)]['commentUpdate$'][_0x40289b(0x133)](_0x54f966['bufferTime'](0x10))[_0x40289b(0x171)](_0x30dc52=>{const _0x4629bd=_0x40289b,_0x139157=new Set();_0x30dc52['forEach'](_0x154a97=>{const _0x567760=_0x2623;switch(_0x154a97[_0x567760(0x15e)]){case _0x567760(0x13f):{const _0x3b1a28=_0x154a97[_0x567760(0x142)][_0x567760(0x147)];_0x139157[_0x567760(0x13f)](_0x3b1a28);break;}}}),_0x488455(this[_0x4629bd(0x18d)],_0x139157);}));}[_0xfde14a(0x131)](){const _0xbc3a53=_0xfde14a;this[_0xbc3a53(0x11d)](this[_0xbc3a53(0x130)]['commentUpdate$'][_0xbc3a53(0x171)](async _0x4b540d=>{const _0x583b50=_0xbc3a53;var _0x3a202f,_0x5236cf,_0x498c83,_0x365366;const _0x497bdc=(_0x3a202f=this[_0x583b50(0x136)][_0x583b50(0x18a)](_0x4b540d[_0x583b50(0x172)])[_0x583b50(0x180)](_0xea29e2=>_0xea29e2[_0x583b50(0x12c)]===_0x4b540d[_0x583b50(0x12c)]))==null?void 0x0:_0x3a202f[_0x583b50(0x13a)];if(!_0x497bdc)return;const {unitId:_0x4410cd,subUnitId:_0x439b9c}=_0x497bdc;switch(_0x4b540d[_0x583b50(0x151)]&&this[_0x583b50(0x170)][_0x583b50(0x14b)](_0x4b540d[_0x583b50(0x151)]),_0x4b540d[_0x583b50(0x15e)]){case _0x3210e3[_0x583b50(0x11f)]:break;case _0x3210e3['Reply']:{this[_0x583b50(0x136)][_0x583b50(0x12f)](_0x4410cd,_0x439b9c,{'unitId':_0x4410cd,'subUnitId':_0x439b9c,'ref':'','id':_0x4b540d['replyId'],'dT':_0x184c02(+_0x4b540d['createTimestamp']),'threadId':_0x4b540d['threadId'],'personId':(_0x498c83=(_0x5236cf=_0x4b540d[_0x583b50(0x151)])==null?void 0x0:_0x5236cf[_0x583b50(0x143)])!=null?_0x498c83:_0x4b540d['userId'],'text':JSON[_0x583b50(0x16a)](_0x4b540d['content']),'parentId':_0x497bdc['id']});break;}case _0x3210e3[_0x583b50(0x160)]:{const _0x4e6dd5=this[_0x583b50(0x136)][_0x583b50(0x12a)](_0x4410cd,_0x439b9c,_0x4b540d['replyId']);_0x4e6dd5&&_0x4e6dd5[_0x583b50(0x11b)]&&this[_0x583b50(0x136)][_0x583b50(0x113)](_0x4410cd,_0x439b9c,_0x4b540d[_0x583b50(0x118)]);break;}case _0x3210e3[_0x583b50(0x18c)]:{this[_0x583b50(0x136)][_0x583b50(0x12b)](_0x4410cd,_0x439b9c,{'commentId':_0x4b540d[_0x583b50(0x118)],'text':JSON[_0x583b50(0x16a)](_0x4b540d[_0x583b50(0x141)])});break;}case _0x3210e3[_0x583b50(0x128)]:{const _0x4c0b90=(_0x365366=this[_0x583b50(0x136)][_0x583b50(0x18a)](_0x4b540d[_0x583b50(0x172)])[_0x583b50(0x180)](_0x2677b9=>_0x2677b9[_0x583b50(0x12c)]===_0x4b540d['threadId']))==null?void 0x0:_0x365366[_0x583b50(0x13a)];_0x4c0b90&&this[_0x583b50(0x136)][_0x583b50(0x175)](_0x4410cd,_0x439b9c,_0x4c0b90['id'],_0x4b540d[_0x583b50(0x185)]===_0x365d72[_0x583b50(0x16f)]);break;}}}));}};_0x216e98=_0x432a65([_0x28293e(0x0,_0x24455d[_0xfde14a(0x15c)](_0x33a76f['CommentService'])),_0x28293e(0x1,_0x24455d[_0xfde14a(0x15c)](_0x1a507f[_0xfde14a(0x123)])),_0x28293e(0x2,_0x24455d[_0xfde14a(0x15c)](_0x24455d[_0xfde14a(0x13c)])),_0x28293e(0x3,_0x24455d[_0xfde14a(0x15c)](_0x24455d['Injector']))],_0x216e98);const _0x1d411b=_0xfde14a(0x165),_0x46ba6f={};var _0x1cbc7f=Object[_0xfde14a(0x166)],_0xcf40fe=(_0x10e6b5,_0x130499,_0x5d6478,_0x3b1d24)=>{const _0x180550=_0xfde14a;for(var _0x5b493b=_0x3b1d24>0x1?void 0x0:_0x3b1d24?_0x1cbc7f(_0x130499,_0x5d6478):_0x130499,_0x458f53=_0x10e6b5[_0x180550(0x149)]-0x1,_0x45913c;_0x458f53>=0x0;_0x458f53--)(_0x45913c=_0x10e6b5[_0x458f53])&&(_0x5b493b=_0x45913c(_0x5b493b)||_0x5b493b);return _0x5b493b;},_0x55462e=(_0xcdb9c8,_0x3e50ac)=>(_0x21de54,_0x57b801)=>_0x3e50ac(_0x21de54,_0x57b801,_0xcdb9c8);function _0x3d26ae(_0x490e0e,_0x2da245){const _0x46d1b8=_0xfde14a,_0x26183e=_0x490e0e['replies'][0x0];return{..._0x2da245,'id':_0x26183e['replyId'],'resolved':_0x490e0e[_0x46d1b8(0x185)]===0x1,'dT':_0x184c02(_0x26183e[_0x46d1b8(0x152)]),'personId':_0x26183e[_0x46d1b8(0x16d)],'threadId':_0x26183e['threadId']};}function _0x1a9fe8(_0x1426de,_0x5f0ed8,_0x199377){const _0x200f0d=_0xfde14a;var _0x2dfd59,_0x45577a;if(((_0x45577a=(_0x2dfd59=_0x1426de==null?void 0x0:_0x1426de[_0x200f0d(0x12e)])==null?void 0x0:_0x2dfd59[_0x200f0d(0x149)])!=null?_0x45577a:0x0)>0x0){const _0x22764d=(_0x3697c7,_0x4f2068)=>({'id':_0x3697c7[_0x200f0d(0x118)],'threadId':_0x3697c7[_0x200f0d(0x12c)],'dT':_0x184c02(_0x3697c7[_0x200f0d(0x152)]),'personId':_0x3697c7['userId'],'resolved':_0x1426de[_0x200f0d(0x185)]===_0x365d72['Solved'],'unitId':_0x5f0ed8,'subUnitId':_0x199377,'text':JSON[_0x200f0d(0x16a)](_0x3697c7['content']),'parentId':_0x4f2068}),_0x4db58f=_0x22764d(_0x1426de[_0x200f0d(0x12e)][0x0]);return{..._0x4db58f,'children':_0x1426de[_0x200f0d(0x12e)][_0x200f0d(0x187)](0x1)[_0x200f0d(0x161)](_0xb52f80=>_0x22764d(_0xb52f80,_0x4db58f['id']))};}return null;}let _0x4ffe36=class{constructor(_0x192e4d,_0x17e34d,_0x40ac7a){const _0xd6ce88=_0xfde14a;this[_0xd6ce88(0x15b)]=_0x192e4d,this[_0xd6ce88(0x170)]=_0x17e34d,this[_0xd6ce88(0x158)]=_0x40ac7a;}async[_0xfde14a(0x12f)](_0x568a6b){const _0x21e025=_0xfde14a;var _0x2cc3e1,_0x438d45;const {parentId:_0x468323,unitId:_0x3dbfce,text:_0x499a84,threadId:_0x480018}=_0x568a6b,_0x537278=(_0x438d45=(_0x2cc3e1=_0x499a84['customRanges'])==null?void 0x0:_0x2cc3e1['filter'](_0x2ce091=>_0x2ce091['rangeType']===_0x24455d[_0x21e025(0x140)][_0x21e025(0x115)])[_0x21e025(0x161)](_0xf8eed3=>_0xf8eed3['rangeId']))!=null?_0x438d45:[],_0x3f9297=JSON[_0x21e025(0x157)](_0x499a84),_0x24af6e=(await this['_sessionService'][_0x21e025(0x129)](_0x3dbfce))[_0x21e025(0x167)]();if(_0x468323){const _0x2620be={'memberId':_0x24af6e,'unitId':_0x3dbfce,'content':_0x3f9297,'mention':_0x537278,'threadId':_0x480018},_0x2f7207=(await this[_0x21e025(0x15b)][_0x21e025(0x186)](_0x21e025(0x119)+_0x3dbfce+_0x21e025(0x146),{'body':_0x2620be}))[_0x21e025(0x114)][_0x21e025(0x139)];return{..._0x568a6b,'id':_0x2f7207[_0x21e025(0x118)],'dT':_0x24455d['dayjs'](+_0x2f7207['createTimestamp'])[_0x21e025(0x125)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2f7207[_0x21e025(0x16d)]};}else{const _0x1fe2a9={'memberId':_0x24af6e,'unitId':_0x3dbfce,'content':_0x3f9297,'mention':_0x537278},_0x4f079c=await this['_httpService'][_0x21e025(0x186)]('/universer-api/comment/unit/'+_0x3dbfce+_0x21e025(0x168),{'body':_0x1fe2a9});return _0x3d26ae(_0x4f079c[_0x21e025(0x114)]['comment'],_0x568a6b);}}async[_0xfde14a(0x12b)](_0x161300){const _0x24000b=_0xfde14a;var _0x145bc9,_0x18f329;const {text:_0x2b35dd,unitId:_0x54a253}=_0x161300,_0x27b9ab=(_0x18f329=(_0x145bc9=_0x2b35dd[_0x24000b(0x181)])==null?void 0x0:_0x145bc9[_0x24000b(0x13e)](_0x8e1e91=>_0x8e1e91['rangeType']===_0x24455d[_0x24000b(0x140)][_0x24000b(0x115)])[_0x24000b(0x161)](_0x3cd327=>_0x3cd327[_0x24000b(0x17f)]))!=null?_0x18f329:[],_0xedcad0=JSON[_0x24000b(0x157)](_0x2b35dd),_0x1e50d1=_0x161300['threadId'],_0x414c82=_0x161300['id'],_0x1d1519={'memberId':(await this[_0x24000b(0x158)][_0x24000b(0x129)](_0x54a253))[_0x24000b(0x167)](),'unitId':_0x54a253,'threadId':_0x1e50d1,'mention':_0x27b9ab,'content':_0xedcad0,'replyId':_0x414c82},_0x16c191=await this[_0x24000b(0x15b)]['post'](_0x24000b(0x119)+_0x54a253+_0x24000b(0x18e),{'body':_0x1d1519});return!_0x16c191[_0x24000b(0x114)]['error']||_0x16c191[_0x24000b(0x114)][_0x24000b(0x121)][_0x24000b(0x183)]===0x1;}async['resolveComment'](_0x309a40){const _0x6c5ccf=_0xfde14a,{unitId:_0x5b49f8}=_0x309a40,_0x21d413=_0x309a40[_0x6c5ccf(0x12c)],_0x2eb30d={'memberId':this[_0x6c5ccf(0x170)]['getCurrentUser']()[_0x6c5ccf(0x143)],'unitId':_0x5b49f8,'threadId':_0x21d413,'solved':_0x309a40['resolved']?_0x365d72[_0x6c5ccf(0x16f)]:_0x365d72[_0x6c5ccf(0x138)]},_0x34fb3a=await this[_0x6c5ccf(0x15b)][_0x6c5ccf(0x186)](_0x6c5ccf(0x119)+_0x5b49f8+'/solved',{'body':_0x2eb30d});return!_0x34fb3a[_0x6c5ccf(0x114)][_0x6c5ccf(0x121)]||_0x34fb3a['body'][_0x6c5ccf(0x121)][_0x6c5ccf(0x183)]===0x1;}async[_0xfde14a(0x113)](_0x2d39df,_0x1714de,_0x4ee616,_0x18afb1){const _0x311759=_0xfde14a,_0x332624={'memberId':(await this[_0x311759(0x158)][_0x311759(0x129)](_0x2d39df))[_0x311759(0x167)](),'threadId':_0x4ee616,'replyId':_0x18afb1,'unitId':_0x2d39df},_0x4c3df9=await this[_0x311759(0x15b)][_0x311759(0x186)](_0x311759(0x119)+_0x2d39df+'/delete',{'body':_0x332624});return!_0x4c3df9['body']['error']||_0x4c3df9[_0x311759(0x114)]['error']['code']===0x1;}async[_0xfde14a(0x14e)](_0x44e791,_0x2d42bd,_0x3bcfb1){const _0x373502=_0xfde14a,_0x110273={'unitId':_0x44e791,'threadId':_0x3bcfb1},_0x21a986=await this[_0x373502(0x15b)][_0x373502(0x186)](_0x373502(0x119)+_0x44e791+_0x373502(0x13d),{'body':_0x110273}),_0x33f14e=_0x3bcfb1['map'](_0x136d7e=>_0x1a9fe8(_0x21a986[_0x373502(0x114)][_0x373502(0x164)][_0x136d7e],_0x44e791,_0x2d42bd))[_0x373502(0x13e)](Boolean);return Object[_0x373502(0x11c)](_0x21a986[_0x373502(0x114)][_0x373502(0x196)])['forEach'](_0xed1745=>{const _0xa16908=_0x373502;this[_0xa16908(0x170)]['addUser'](_0xed1745);}),_0x33f14e;}[_0xfde14a(0x173)](_0x57bba8){return{'id':_0x57bba8['id'],'threadId':_0x57bba8['threadId'],'ref':_0x57bba8['ref']};}};_0x4ffe36=_0xcf40fe([_0x55462e(0x0,_0x24455d[_0xfde14a(0x15c)](_0x5cfd00[_0xfde14a(0x126)])),_0x55462e(0x1,_0x24455d[_0xfde14a(0x15c)](_0x24455d[_0xfde14a(0x13c)])),_0x55462e(0x2,_0x24455d[_0xfde14a(0x15c)](_0x33a76f[_0xfde14a(0x17e)]))],_0x4ffe36);var _0x982ec1=Object[_0xfde14a(0x166)],_0x39520f=(_0x4eb2f6,_0x4388be,_0x3f47bf,_0x2f2855)=>{for(var _0x46c174=_0x2f2855>0x1?void 0x0:_0x2f2855?_0x982ec1(_0x4388be,_0x3f47bf):_0x4388be,_0x23e8df=_0x4eb2f6['length']-0x1,_0x1e6057;_0x23e8df>=0x0;_0x23e8df--)(_0x1e6057=_0x4eb2f6[_0x23e8df])&&(_0x46c174=_0x1e6057(_0x46c174)||_0x46c174);return _0x46c174;},_0x58665d=(_0x3d844e,_0x32ee46)=>(_0x1bd801,_0xfcf938)=>_0x32ee46(_0x1bd801,_0xfcf938,_0x3d844e);let _0x32f4ba=class extends _0x24455d['Disposable']{constructor(_0x4fbcee,_0x2d3575){const _0x594e3a=_0xfde14a;super(),this[_0x594e3a(0x14f)]=_0x4fbcee,this[_0x594e3a(0x116)]=_0x2d3575,this[_0x594e3a(0x182)]();}[_0xfde14a(0x182)](){const _0x4b8192=_0xfde14a;this[_0x4b8192(0x14f)]['dataSource']=this[_0x4b8192(0x116)],this['_threadCommentDataSourceService'][_0x4b8192(0x193)]=!0x1;}};_0x32f4ba=_0x39520f([_0x58665d(0x0,_0x1a507f[_0xfde14a(0x15d)]),_0x58665d(0x1,_0x24455d[_0xfde14a(0x15c)](_0x4ffe36))],_0x32f4ba);var _0x484a12=Object[_0xfde14a(0x144)],_0x297f3b=Object[_0xfde14a(0x166)],_0x365d10=(_0x435374,_0x34ec26,_0x543f99)=>_0x34ec26 in _0x435374?_0x484a12(_0x435374,_0x34ec26,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x543f99}):_0x435374[_0x34ec26]=_0x543f99,_0x28cb7b=(_0x3160dc,_0x107454,_0x27c4f3,_0x3d48c9)=>{for(var _0x427029=_0x3d48c9>0x1?void 0x0:_0x3d48c9?_0x297f3b(_0x107454,_0x27c4f3):_0x107454,_0x1a4276=_0x3160dc['length']-0x1,_0x6a6719;_0x1a4276>=0x0;_0x1a4276--)(_0x6a6719=_0x3160dc[_0x1a4276])&&(_0x427029=_0x6a6719(_0x427029)||_0x427029);return _0x427029;},_0x2cd858=(_0x27edb0,_0x4fde45)=>(_0x50e8a8,_0x5e0eda)=>_0x4fde45(_0x50e8a8,_0x5e0eda,_0x27edb0),_0x462cf7=(_0x3b28c6,_0x78a661,_0x287262)=>_0x365d10(_0x3b28c6,typeof _0x78a661!=_0xfde14a(0x16c)?_0x78a661+'':_0x78a661,_0x287262);_0x5cd3d2['UniverThreadCommentDataSourcePlugin']=class extends _0x24455d[_0xfde14a(0x15a)]{constructor(_0x9df939=_0x46ba6f,_0x4162e1,_0x14a110){const _0x4c211a=_0xfde14a;super(),this[_0x4c211a(0x163)]=_0x9df939,this['_injector']=_0x4162e1,this[_0x4c211a(0x16b)]=_0x14a110;const {..._0xca1693}=_0x24455d[_0x4c211a(0x148)]({},_0x46ba6f,this[_0x4c211a(0x163)]);this[_0x4c211a(0x16b)]['setConfig'](_0x1d411b,_0xca1693);}[_0xfde14a(0x194)](){const _0x394921=_0xfde14a;[[_0x4ffe36],[_0x32f4ba],[_0x216e98]][_0x394921(0x179)](_0x1d1476=>{const _0x4fa2c8=_0x394921;this[_0x4fa2c8(0x18d)][_0x4fa2c8(0x13f)](_0x1d1476);});}['onReady'](){const _0x55a900=_0xfde14a;this[_0x55a900(0x18d)][_0x55a900(0x153)](_0x32f4ba),this['_injector'][_0x55a900(0x153)](_0x216e98);}},_0x462cf7(_0x5cd3d2[_0xfde14a(0x162)],'pluginName',_0x59f24d),_0x462cf7(_0x5cd3d2[_0xfde14a(0x162)],'type',_0x24455d['UniverInstanceType'][_0xfde14a(0x156)]),_0x5cd3d2[_0xfde14a(0x162)]=_0x28cb7b([_0x24455d['DependentOn'](_0x20fafc[_0xfde14a(0x17a)],_0x33a76f[_0xfde14a(0x145)],_0x2a361b['UniverLicensePlugin']),_0x2cd858(0x1,_0x24455d[_0xfde14a(0x15c)](_0x24455d[_0xfde14a(0x13b)])),_0x2cd858(0x2,_0x24455d['IConfigService'])],_0x5cd3d2['UniverThreadCommentDataSourcePlugin']),Object[_0xfde14a(0x144)](_0x5cd3d2,Symbol[_0xfde14a(0x124)],{'value':_0xfde14a(0x12d)});}));
1
+ function _0x351e(_0x2af0b1,_0x1a4705){_0x2af0b1=_0x2af0b1-0x13a;const _0x39bfa6=_0x39bf();let _0x351ee2=_0x39bfa6[_0x2af0b1];return _0x351ee2;}(function(_0x3c8e71,_0x149ed4){const _0x59ed6a=_0x351e,_0x2ed71a=_0x3c8e71();while(!![]){try{const _0x54c2d5=-parseInt(_0x59ed6a(0x1b4))/0x1*(-parseInt(_0x59ed6a(0x14e))/0x2)+parseInt(_0x59ed6a(0x1b7))/0x3*(parseInt(_0x59ed6a(0x18d))/0x4)+-parseInt(_0x59ed6a(0x1a2))/0x5*(parseInt(_0x59ed6a(0x1be))/0x6)+-parseInt(_0x59ed6a(0x1bc))/0x7*(parseInt(_0x59ed6a(0x186))/0x8)+parseInt(_0x59ed6a(0x163))/0x9+parseInt(_0x59ed6a(0x18c))/0xa*(parseInt(_0x59ed6a(0x160))/0xb)+parseInt(_0x59ed6a(0x1c1))/0xc*(parseInt(_0x59ed6a(0x19b))/0xd);if(_0x54c2d5===_0x149ed4)break;else _0x2ed71a['push'](_0x2ed71a['shift']());}catch(_0xb14ca7){_0x2ed71a['push'](_0x2ed71a['shift']());}}}(_0x39bf,0x2b98c),function(_0x18b127,_0x58d511){const _0xbb1afe=_0x351e;typeof exports==_0xbb1afe(0x144)&&typeof module<'u'?_0x58d511(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==_0xbb1afe(0x169)&&define[_0xbb1afe(0x195)]?define([_0xbb1afe(0x13b),'@univerjs-pro/collaboration-client',_0xbb1afe(0x199),'@univerjs/core',_0xbb1afe(0x13e),'@univerjs/thread-comment','rxjs',_0xbb1afe(0x15f)],_0x58d511):(_0x18b127=typeof globalThis<'u'?globalThis:_0x18b127||self,_0x58d511(_0x18b127[_0xbb1afe(0x19f)]={},_0x18b127['UniverProCollaborationClient'],_0x18b127[_0xbb1afe(0x188)],_0x18b127[_0xbb1afe(0x1ae)],_0x18b127['UniverThreadCommentUi'],_0x18b127[_0xbb1afe(0x1ad)],_0x18b127[_0xbb1afe(0x1b5)],_0x18b127[_0xbb1afe(0x1bf)]));}(this,function(_0x2591c4,_0x421a26,_0x53a13a,_0x54c47f,_0x13b0fc,_0x4832b6,_0x46d9c0,_0x294088){'use strict';const _0x59f7b6=_0x351e;const _0x41952d=_0x59f7b6(0x177);var _0x287623=(_0xc9dfee=>(_0xc9dfee[_0xc9dfee[_0x59f7b6(0x14f)]=0x0]=_0x59f7b6(0x14f),_0xc9dfee[_0xc9dfee['Solved']=0x1]=_0x59f7b6(0x181),_0xc9dfee[_0xc9dfee[_0x59f7b6(0x1af)]=-0x1]=_0x59f7b6(0x1af),_0xc9dfee))(_0x287623||{}),_0x3f49d9=(_0x1c31fa=>(_0x1c31fa[_0x1c31fa[_0x59f7b6(0x191)]=0x0]='Unknown',_0x1c31fa[_0x1c31fa['Add']=0x1]=_0x59f7b6(0x1ba),_0x1c31fa[_0x1c31fa[_0x59f7b6(0x142)]=0x2]=_0x59f7b6(0x142),_0x1c31fa[_0x1c31fa['Edit']=0x3]='Edit',_0x1c31fa[_0x1c31fa['Delete']=0x4]='Delete',_0x1c31fa[_0x1c31fa[_0x59f7b6(0x17f)]=0x5]=_0x59f7b6(0x17f),_0x1c31fa[_0x1c31fa['UNRECOGNIZED']=-0x1]=_0x59f7b6(0x1af),_0x1c31fa))(_0x3f49d9||{});const _0x337ba9=_0x276d8a=>_0x54c47f[_0x59f7b6(0x178)](new Date(+_0x276d8a))[_0x59f7b6(0x150)](_0x59f7b6(0x1a9)),_0x22e966=async(_0x4b9c99,_0x4b5168)=>{const _0x5cbe03=_0x59f7b6,_0x4ff163=_0x4b9c99['get'](_0x54c47f['UserManagerService']),_0x1d696e=_0x4b9c99[_0x5cbe03(0x14a)](_0x294088['HTTPService']);_0x4b5168[_0x5cbe03(0x196)](_0x36f2f8=>{const _0x8d7332=_0x5cbe03;_0x4ff163['getUser'](_0x36f2f8)&&_0x4b5168[_0x8d7332(0x19c)](_0x36f2f8);}),_0x4b5168[_0x5cbe03(0x13d)]&&(await _0x1d696e['get'](_0x5cbe03(0x156),{'params':{'userIDs':[..._0x4b5168]}}))[_0x5cbe03(0x180)][_0x5cbe03(0x17d)]['forEach'](_0x2c3048=>{const _0x5a1562=_0x5cbe03;_0x2c3048&&_0x4ff163[_0x5a1562(0x145)](_0x2c3048);});};var _0xef4e76=Object[_0x59f7b6(0x176)],_0x395eaf=(_0x1266df,_0x5d0302,_0x1f8815,_0x3378c2)=>{const _0x2e8dd3=_0x59f7b6;for(var _0x420629=_0x3378c2>0x1?void 0x0:_0x3378c2?_0xef4e76(_0x5d0302,_0x1f8815):_0x5d0302,_0x176237=_0x1266df[_0x2e8dd3(0x1ac)]-0x1,_0x349666;_0x176237>=0x0;_0x176237--)(_0x349666=_0x1266df[_0x176237])&&(_0x420629=_0x349666(_0x420629)||_0x420629);return _0x420629;},_0x5b5e82=(_0x247b7d,_0x232c78)=>(_0xd7dab0,_0x55ec1a)=>_0x232c78(_0xd7dab0,_0x55ec1a,_0x247b7d);let _0x70ae3b=class extends _0x54c47f[_0x59f7b6(0x13c)]{constructor(_0x14fc95,_0xe6b96f,_0x5c1f7d,_0x7a3261){const _0xe2cc86=_0x59f7b6;super(),this[_0xe2cc86(0x16a)]=_0x14fc95,this['_threadCommentModel']=_0xe6b96f,this[_0xe2cc86(0x16d)]=_0x5c1f7d,this[_0xe2cc86(0x1a5)]=_0x7a3261,this['_init'](),this[_0xe2cc86(0x164)]();}[_0x59f7b6(0x164)](){const _0x3e1a73=_0x59f7b6;this[_0x3e1a73(0x143)](this[_0x3e1a73(0x155)][_0x3e1a73(0x184)][_0x3e1a73(0x172)](_0x46d9c0['bufferTime'](0x10))[_0x3e1a73(0x165)](_0xa27e6b=>{const _0x1b762b=_0x3e1a73,_0x1201ea=new Set();_0xa27e6b[_0x1b762b(0x196)](_0x3c4c60=>{const _0x1c7360=_0x1b762b;switch(_0x3c4c60[_0x1c7360(0x17b)]){case'add':{const _0x1cb77f=_0x3c4c60[_0x1c7360(0x17e)]['personId'];_0x1201ea[_0x1c7360(0x14d)](_0x1cb77f);break;}}}),_0x22e966(this['_injector'],_0x1201ea);}));}[_0x59f7b6(0x16f)](){const _0x46c6b0=_0x59f7b6;this[_0x46c6b0(0x143)](this[_0x46c6b0(0x16a)][_0x46c6b0(0x184)][_0x46c6b0(0x165)](async _0xb690da=>{const _0x56c00d=_0x46c6b0;var _0x2487a1,_0x307d84,_0x2c6b90,_0x151769;const _0x2b789b=(_0x2487a1=this[_0x56c00d(0x155)][_0x56c00d(0x153)](_0xb690da[_0x56c00d(0x1a4)])[_0x56c00d(0x190)](_0x5e432d=>_0x5e432d[_0x56c00d(0x1b3)]===_0xb690da['threadId']))==null?void 0x0:_0x2487a1['root'];if(!_0x2b789b)return;const {unitId:_0x12a7e7,subUnitId:_0x1a2e12}=_0x2b789b;switch(_0xb690da['user']&&this[_0x56c00d(0x16d)][_0x56c00d(0x145)](_0xb690da['user']),_0xb690da['type']){case _0x3f49d9[_0x56c00d(0x1ba)]:break;case _0x3f49d9[_0x56c00d(0x142)]:{this[_0x56c00d(0x155)]['addComment'](_0x12a7e7,_0x1a2e12,{'unitId':_0x12a7e7,'subUnitId':_0x1a2e12,'ref':'','id':_0xb690da[_0x56c00d(0x147)],'dT':_0x337ba9(+_0xb690da[_0x56c00d(0x1b0)]),'threadId':_0xb690da[_0x56c00d(0x1b3)],'personId':(_0x2c6b90=(_0x307d84=_0xb690da[_0x56c00d(0x1a1)])==null?void 0x0:_0x307d84[_0x56c00d(0x167)])!=null?_0x2c6b90:_0xb690da[_0x56c00d(0x18a)],'text':JSON['parse'](_0xb690da[_0x56c00d(0x1bb)]),'parentId':_0x2b789b['id']});break;}case _0x3f49d9[_0x56c00d(0x1ab)]:{const _0x3eace5=this[_0x56c00d(0x155)]['getComment'](_0x12a7e7,_0x1a2e12,_0xb690da[_0x56c00d(0x147)]);_0x3eace5&&_0x3eace5[_0x56c00d(0x1a7)]&&this[_0x56c00d(0x155)]['deleteComment'](_0x12a7e7,_0x1a2e12,_0xb690da['replyId']);break;}case _0x3f49d9[_0x56c00d(0x161)]:{this['_threadCommentModel'][_0x56c00d(0x1a3)](_0x12a7e7,_0x1a2e12,{'commentId':_0xb690da['replyId'],'text':JSON['parse'](_0xb690da['content'])});break;}case _0x3f49d9[_0x56c00d(0x17f)]:{const _0x1f34c4=(_0x151769=this[_0x56c00d(0x155)][_0x56c00d(0x153)](_0xb690da[_0x56c00d(0x1a4)])[_0x56c00d(0x190)](_0x752638=>_0x752638[_0x56c00d(0x1b3)]===_0xb690da['threadId']))==null?void 0x0:_0x151769['root'];_0x1f34c4&&this[_0x56c00d(0x155)][_0x56c00d(0x1b2)](_0x12a7e7,_0x1a2e12,_0x1f34c4['id'],_0xb690da['solved']===_0x287623['Solved']);break;}}}));}};_0x70ae3b=_0x395eaf([_0x5b5e82(0x0,_0x54c47f[_0x59f7b6(0x151)](_0x421a26[_0x59f7b6(0x1b9)])),_0x5b5e82(0x1,_0x54c47f['Inject'](_0x4832b6[_0x59f7b6(0x183)])),_0x5b5e82(0x2,_0x54c47f[_0x59f7b6(0x151)](_0x54c47f[_0x59f7b6(0x1aa)])),_0x5b5e82(0x3,_0x54c47f[_0x59f7b6(0x151)](_0x54c47f[_0x59f7b6(0x13a)]))],_0x70ae3b);const _0x1f17e0=_0x59f7b6(0x16c),_0x5e34e5={};var _0xe23a73=Object[_0x59f7b6(0x176)],_0x5daf18=(_0x45a6c0,_0x413556,_0x11a965,_0x1002db)=>{const _0x63c903=_0x59f7b6;for(var _0x52b924=_0x1002db>0x1?void 0x0:_0x1002db?_0xe23a73(_0x413556,_0x11a965):_0x413556,_0x10f6ca=_0x45a6c0[_0x63c903(0x1ac)]-0x1,_0x53d782;_0x10f6ca>=0x0;_0x10f6ca--)(_0x53d782=_0x45a6c0[_0x10f6ca])&&(_0x52b924=_0x53d782(_0x52b924)||_0x52b924);return _0x52b924;},_0x56b8c7=(_0x2ea3cc,_0x215373)=>(_0x56de86,_0x416603)=>_0x215373(_0x56de86,_0x416603,_0x2ea3cc);function _0x363860(_0x288452,_0x3af783){const _0x2e9155=_0x59f7b6,_0x4f73c3=_0x288452[_0x2e9155(0x14b)][0x0];return{..._0x3af783,'id':_0x4f73c3['replyId'],'resolved':_0x288452[_0x2e9155(0x13f)]===0x1,'dT':_0x337ba9(_0x4f73c3[_0x2e9155(0x1b0)]),'personId':_0x4f73c3[_0x2e9155(0x18a)],'threadId':_0x4f73c3[_0x2e9155(0x1b3)]};}function _0x536550(_0x37c807,_0x3312bc,_0x503757){const _0x4a445f=_0x59f7b6;var _0xffc00,_0x2dc170;if(((_0x2dc170=(_0xffc00=_0x37c807==null?void 0x0:_0x37c807[_0x4a445f(0x14b)])==null?void 0x0:_0xffc00[_0x4a445f(0x1ac)])!=null?_0x2dc170:0x0)>0x0){const _0x1117c6=(_0x154e34,_0x5d6828)=>({'id':_0x154e34['replyId'],'threadId':_0x154e34[_0x4a445f(0x1b3)],'dT':_0x337ba9(_0x154e34['createTimestamp']),'personId':_0x154e34['userId'],'resolved':_0x37c807[_0x4a445f(0x13f)]===_0x287623[_0x4a445f(0x181)],'unitId':_0x3312bc,'subUnitId':_0x503757,'text':JSON['parse'](_0x154e34[_0x4a445f(0x1bb)]),'parentId':_0x5d6828}),_0x5ed928=_0x1117c6(_0x37c807[_0x4a445f(0x14b)][0x0]);return{..._0x5ed928,'children':_0x37c807[_0x4a445f(0x14b)][_0x4a445f(0x18b)](0x1)[_0x4a445f(0x174)](_0x4f210=>_0x1117c6(_0x4f210,_0x5ed928['id']))};}return null;}let _0x12d4e3=class{constructor(_0x176210,_0x41baaa,_0x572fac){const _0x58f91e=_0x59f7b6;this['_httpService']=_0x176210,this[_0x58f91e(0x16d)]=_0x41baaa,this[_0x58f91e(0x157)]=_0x572fac;}async[_0x59f7b6(0x146)](_0x3d4263){const _0xa7e095=_0x59f7b6;var _0x4e2b06,_0x2f5301;const {parentId:_0x203064,unitId:_0x17d31b,text:_0x29b80a,threadId:_0xf7db2d}=_0x3d4263,_0x3244c2=(_0x2f5301=(_0x4e2b06=_0x29b80a[_0xa7e095(0x1b8)])==null?void 0x0:_0x4e2b06['filter'](_0x250b27=>_0x250b27[_0xa7e095(0x171)]===_0x54c47f['CustomRangeType'][_0xa7e095(0x198)])[_0xa7e095(0x174)](_0x172391=>_0x172391['rangeId']))!=null?_0x2f5301:[],_0x6b81e9=JSON[_0xa7e095(0x1bd)](_0x29b80a),_0x292217=(await this['_sessionService'][_0xa7e095(0x15a)](_0x17d31b))[_0xa7e095(0x19a)]();if(_0x203064){const _0x15583d={'memberId':_0x292217,'unitId':_0x17d31b,'content':_0x6b81e9,'mention':_0x3244c2,'threadId':_0xf7db2d},_0x1be923=(await this[_0xa7e095(0x159)][_0xa7e095(0x16e)](_0xa7e095(0x1a0)+_0x17d31b+_0xa7e095(0x185),{'body':_0x15583d}))['body'][_0xa7e095(0x175)];return{..._0x3d4263,'id':_0x1be923[_0xa7e095(0x147)],'dT':_0x54c47f[_0xa7e095(0x178)](+_0x1be923[_0xa7e095(0x1b0)])[_0xa7e095(0x150)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1be923[_0xa7e095(0x18a)]};}else{const _0x5a1c05={'memberId':_0x292217,'unitId':_0x17d31b,'content':_0x6b81e9,'mention':_0x3244c2},_0x3c680d=await this['_httpService'][_0xa7e095(0x16e)](_0xa7e095(0x1a0)+_0x17d31b+_0xa7e095(0x140),{'body':_0x5a1c05});return _0x363860(_0x3c680d[_0xa7e095(0x180)][_0xa7e095(0x1b1)],_0x3d4263);}}async['updateComment'](_0x37d4ae){const _0x841ecd=_0x59f7b6;var _0x61357c,_0x470b69;const {text:_0xb02e25,unitId:_0x4066aa}=_0x37d4ae,_0x77c2f6=(_0x470b69=(_0x61357c=_0xb02e25[_0x841ecd(0x1b8)])==null?void 0x0:_0x61357c['filter'](_0x1f97e1=>_0x1f97e1[_0x841ecd(0x171)]===_0x54c47f[_0x841ecd(0x158)][_0x841ecd(0x198)])[_0x841ecd(0x174)](_0x2c2319=>_0x2c2319['rangeId']))!=null?_0x470b69:[],_0x2563f1=JSON['stringify'](_0xb02e25),_0x13127c=_0x37d4ae[_0x841ecd(0x1b3)],_0x11b24c=_0x37d4ae['id'],_0x44f216={'memberId':(await this['_sessionService'][_0x841ecd(0x15a)](_0x4066aa))[_0x841ecd(0x19a)](),'unitId':_0x4066aa,'threadId':_0x13127c,'mention':_0x77c2f6,'content':_0x2563f1,'replyId':_0x11b24c},_0x1a65bd=await this[_0x841ecd(0x159)]['post']('/universer-api/comment/unit/'+_0x4066aa+'/edit',{'body':_0x44f216});return!_0x1a65bd[_0x841ecd(0x180)][_0x841ecd(0x197)]||_0x1a65bd[_0x841ecd(0x180)][_0x841ecd(0x197)][_0x841ecd(0x1a6)]===0x1;}async['resolveComment'](_0x194f57){const _0x5c5ffc=_0x59f7b6,{unitId:_0x23352b}=_0x194f57,_0x3bfd6b=_0x194f57[_0x5c5ffc(0x1b3)],_0x3893b0={'memberId':this[_0x5c5ffc(0x16d)][_0x5c5ffc(0x19d)]()['userID'],'unitId':_0x23352b,'threadId':_0x3bfd6b,'solved':_0x194f57[_0x5c5ffc(0x166)]?_0x287623[_0x5c5ffc(0x181)]:_0x287623['OpenOrReOpen']},_0x39f806=await this[_0x5c5ffc(0x159)]['post'](_0x5c5ffc(0x1a0)+_0x23352b+_0x5c5ffc(0x17c),{'body':_0x3893b0});return!_0x39f806['body'][_0x5c5ffc(0x197)]||_0x39f806[_0x5c5ffc(0x180)][_0x5c5ffc(0x197)][_0x5c5ffc(0x1a6)]===0x1;}async[_0x59f7b6(0x18e)](_0x4edf38,_0x1333b4,_0x42c043,_0xa80cd){const _0x1b2a14=_0x59f7b6,_0x7e2e27={'memberId':(await this[_0x1b2a14(0x157)][_0x1b2a14(0x15a)](_0x4edf38))[_0x1b2a14(0x19a)](),'threadId':_0x42c043,'replyId':_0xa80cd,'unitId':_0x4edf38},_0x46e108=await this['_httpService'][_0x1b2a14(0x16e)](_0x1b2a14(0x1a0)+_0x4edf38+_0x1b2a14(0x15b),{'body':_0x7e2e27});return!_0x46e108[_0x1b2a14(0x180)][_0x1b2a14(0x197)]||_0x46e108['body'][_0x1b2a14(0x197)][_0x1b2a14(0x1a6)]===0x1;}async['listComments'](_0x37a133,_0x4a5303,_0x3cc78c){const _0x7d5c55=_0x59f7b6,_0x5bd9a6={'unitId':_0x37a133,'threadId':_0x3cc78c},_0x4c50e9=await this['_httpService'][_0x7d5c55(0x16e)](_0x7d5c55(0x1a0)+_0x37a133+_0x7d5c55(0x193),{'body':_0x5bd9a6}),_0x118f3c=_0x3cc78c[_0x7d5c55(0x174)](_0x4b03f4=>_0x536550(_0x4c50e9[_0x7d5c55(0x180)]['comments'][_0x4b03f4],_0x37a133,_0x4a5303))['filter'](Boolean);return Object[_0x7d5c55(0x194)](_0x4c50e9['body'][_0x7d5c55(0x17d)])[_0x7d5c55(0x196)](_0x417aaf=>{const _0x4e7177=_0x7d5c55;this['_userService'][_0x4e7177(0x145)](_0x417aaf);}),_0x118f3c;}['saveCommentToSnapshot'](_0x58801c){const _0x11a58c=_0x59f7b6;return{'id':_0x58801c['id'],'threadId':_0x58801c[_0x11a58c(0x1b3)],'ref':_0x58801c[_0x11a58c(0x189)]};}};_0x12d4e3=_0x5daf18([_0x56b8c7(0x0,_0x54c47f[_0x59f7b6(0x151)](_0x294088[_0x59f7b6(0x192)])),_0x56b8c7(0x1,_0x54c47f[_0x59f7b6(0x151)](_0x54c47f[_0x59f7b6(0x1aa)])),_0x56b8c7(0x2,_0x54c47f['Inject'](_0x421a26[_0x59f7b6(0x18f)]))],_0x12d4e3);var _0x1afd81=Object['getOwnPropertyDescriptor'],_0x14e917=(_0x2046b4,_0x5094f8,_0x41c154,_0x59b354)=>{for(var _0x1f184a=_0x59b354>0x1?void 0x0:_0x59b354?_0x1afd81(_0x5094f8,_0x41c154):_0x5094f8,_0x4e0f9b=_0x2046b4['length']-0x1,_0x2862aa;_0x4e0f9b>=0x0;_0x4e0f9b--)(_0x2862aa=_0x2046b4[_0x4e0f9b])&&(_0x1f184a=_0x2862aa(_0x1f184a)||_0x1f184a);return _0x1f184a;},_0x2c6cf7=(_0x148ff4,_0x4bbdbf)=>(_0x30e8c0,_0x22e274)=>_0x4bbdbf(_0x30e8c0,_0x22e274,_0x148ff4);let _0x290116=class extends _0x54c47f['Disposable']{constructor(_0x260326,_0x88766){const _0x2b5b4d=_0x59f7b6;super(),this[_0x2b5b4d(0x1b6)]=_0x260326,this[_0x2b5b4d(0x148)]=_0x88766,this[_0x2b5b4d(0x162)]();}[_0x59f7b6(0x162)](){const _0x58328d=_0x59f7b6;this[_0x58328d(0x1b6)][_0x58328d(0x141)]=this[_0x58328d(0x148)],this[_0x58328d(0x1b6)][_0x58328d(0x15d)]=!0x1;}};_0x290116=_0x14e917([_0x2c6cf7(0x0,_0x4832b6[_0x59f7b6(0x154)]),_0x2c6cf7(0x1,_0x54c47f[_0x59f7b6(0x151)](_0x12d4e3))],_0x290116);var _0x4dfa4f=Object[_0x59f7b6(0x173)],_0x203be2=Object[_0x59f7b6(0x176)],_0x280559=(_0x53bd86,_0x325555,_0x2b75db)=>_0x325555 in _0x53bd86?_0x4dfa4f(_0x53bd86,_0x325555,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2b75db}):_0x53bd86[_0x325555]=_0x2b75db,_0x42b4cf=(_0x55822c,_0x124a8a,_0xe1673a,_0x592f81)=>{const _0x419161=_0x59f7b6;for(var _0x52fa23=_0x592f81>0x1?void 0x0:_0x592f81?_0x203be2(_0x124a8a,_0xe1673a):_0x124a8a,_0x763a41=_0x55822c[_0x419161(0x1ac)]-0x1,_0x3efb45;_0x763a41>=0x0;_0x763a41--)(_0x3efb45=_0x55822c[_0x763a41])&&(_0x52fa23=_0x3efb45(_0x52fa23)||_0x52fa23);return _0x52fa23;},_0xc2c5bd=(_0x4a9795,_0x50cae9)=>(_0x265f8e,_0x787814)=>_0x50cae9(_0x265f8e,_0x787814,_0x4a9795),_0x585685=(_0x4781bd,_0xe5ed2d,_0x402dd8)=>_0x280559(_0x4781bd,typeof _0xe5ed2d!='symbol'?_0xe5ed2d+'':_0xe5ed2d,_0x402dd8);_0x2591c4['UniverThreadCommentDataSourcePlugin']=class extends _0x54c47f[_0x59f7b6(0x15c)]{constructor(_0x20dea8=_0x5e34e5,_0x5d2b05,_0x2e110f){const _0x517c6b=_0x59f7b6;super(),this['_config']=_0x20dea8,this[_0x517c6b(0x1a5)]=_0x5d2b05,this[_0x517c6b(0x19e)]=_0x2e110f;const {..._0x2abc3b}=_0x54c47f[_0x517c6b(0x179)]({},_0x5e34e5,this[_0x517c6b(0x15e)]);this[_0x517c6b(0x19e)][_0x517c6b(0x170)](_0x1f17e0,_0x2abc3b);}['onStarting'](){const _0x4c7797=_0x59f7b6;[[_0x12d4e3],[_0x290116],[_0x70ae3b]][_0x4c7797(0x196)](_0x1bb9a0=>{const _0x504d0e=_0x4c7797;this[_0x504d0e(0x1a5)][_0x504d0e(0x14d)](_0x1bb9a0);});}[_0x59f7b6(0x14c)](){const _0x550ef1=_0x59f7b6;this[_0x550ef1(0x1a5)][_0x550ef1(0x14a)](_0x290116),this[_0x550ef1(0x1a5)]['get'](_0x70ae3b);}},_0x585685(_0x2591c4[_0x59f7b6(0x149)],_0x59f7b6(0x16b),_0x41952d),_0x585685(_0x2591c4[_0x59f7b6(0x149)],_0x59f7b6(0x17b),_0x54c47f['UniverInstanceType'][_0x59f7b6(0x17a)]),_0x2591c4['UniverThreadCommentDataSourcePlugin']=_0x42b4cf([_0x54c47f[_0x59f7b6(0x168)](_0x13b0fc[_0x59f7b6(0x187)],_0x421a26[_0x59f7b6(0x152)],_0x53a13a[_0x59f7b6(0x1a8)]),_0xc2c5bd(0x1,_0x54c47f[_0x59f7b6(0x151)](_0x54c47f[_0x59f7b6(0x13a)])),_0xc2c5bd(0x2,_0x54c47f['IConfigService'])],_0x2591c4['UniverThreadCommentDataSourcePlugin']),Object[_0x59f7b6(0x173)](_0x2591c4,Symbol[_0x59f7b6(0x182)],{'value':_0x59f7b6(0x1c0)});}));function _0x39bf(){const _0x1b9592=['size','@univerjs/thread-comment-ui','solved','/add','dataSource','Reply','disposeWithMe','object','addUser','addComment','replyId','_threadCommentDataSource','UniverThreadCommentDataSourcePlugin','get','replies','onReady','add','28QKDjCp','OpenOrReOpen','format','Inject','UniverCollaborationClientPlugin','getUnit','IThreadCommentDataSourceService','_threadCommentModel','/universer-api/user/list','_sessionService','CustomRangeType','_httpService','requireSession','/delete','Plugin','syncUpdateMutationToColla','_config','@univerjs/network','77DOwzbE','Edit','_initDataSource','2090376lCYTYF','_initUserSync','subscribe','resolved','userID','DependentOn','function','_commentService','pluginName','thread-comment-data-source.config','_userService','post','_init','setConfig','rangeType','pipe','defineProperty','map','reply','getOwnPropertyDescriptor','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dayjs','merge','UNIVER_UNKNOWN','type','/solved','users','payload','Solve','body','Solved','toStringTag','ThreadCommentModel','commentUpdate$','/reply','6496MZwHRn','UniverThreadCommentUIPlugin','UniverProLicense','ref','userId','slice','408710piyjFq','52gavCgZ','deleteComment','CollaborationSessionService','find','Unknown','HTTPService','/list','values','amd','forEach','error','COMMENT','@univerjs-pro/license','getMemberID','182ypwjTS','delete','getCurrentUser','_configService','UniverProThreadCommentDatasource','/universer-api/comment/unit/','user','325mBnFyn','updateComment','unitId','_injector','code','parentId','UniverLicensePlugin','YYYY/MM/DD\x20HH:mm','UserManagerService','Delete','length','UniverThreadComment','UniverCore','UNRECOGNIZED','createTimestamp','comment','resolveComment','threadId','4580sZQJEg','rxjs','_threadCommentDataSourceService','26373IgrDGp','customRanges','CommentService','Add','content','2982mrhVqP','stringify','16284EbFGEB','UniverNetwork','Module','3540VwieYW','Injector','exports','Disposable'];_0x39bf=function(){return _0x1b9592;};return _0x39bf();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.12.3-experimental.20251204-1549a8e",
3
+ "version": "0.12.3-experimental.20251205-71d07c3",
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.12.3-experimental.20251204-1549a8e",
49
- "@univerjs-pro/license": "0.12.3-experimental.20251204-1549a8e",
50
- "@univerjs/core": "0.12.3-experimental.20251204-1549a8e",
48
+ "@univerjs-pro/collaboration-client": "0.12.3-experimental.20251205-71d07c3",
49
+ "@univerjs/network": "0.12.3-experimental.20251205-71d07c3",
50
+ "@univerjs/core": "0.12.3-experimental.20251205-71d07c3",
51
+ "@univerjs/thread-comment": "0.12.3-experimental.20251205-71d07c3",
51
52
  "@univerjs/protocol": "0.1.47",
52
- "@univerjs/thread-comment": "0.12.3-experimental.20251204-1549a8e",
53
- "@univerjs/thread-comment-ui": "0.12.3-experimental.20251204-1549a8e",
54
- "@univerjs/network": "0.12.3-experimental.20251204-1549a8e"
53
+ "@univerjs/thread-comment-ui": "0.12.3-experimental.20251205-71d07c3",
54
+ "@univerjs-pro/license": "0.12.3-experimental.20251205-71d07c3"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",