@univerjs-pro/thread-comment-datasource 0.12.2-experimental.20251202-45172c6 → 0.12.2-experimental.20251202-7f1a98f

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 _0x4e2e0d=_0x3193;function _0x3193(_0x29b691,_0x4988e9){const _0x2bec4e=_0x2bec();return _0x3193=function(_0x31933c,_0x2d41f8){_0x31933c=_0x31933c-0x65;let _0x4e2287=_0x2bec4e[_0x31933c];return _0x4e2287;},_0x3193(_0x29b691,_0x4988e9);}(function(_0x8f4ccc,_0xb7a4){const _0x1e0885=_0x3193,_0x33dc1e=_0x8f4ccc();while(!![]){try{const _0x981bca=parseInt(_0x1e0885(0x70))/0x1+-parseInt(_0x1e0885(0xdf))/0x2+parseInt(_0x1e0885(0xc0))/0x3*(parseInt(_0x1e0885(0xaa))/0x4)+-parseInt(_0x1e0885(0x8b))/0x5*(parseInt(_0x1e0885(0x65))/0x6)+parseInt(_0x1e0885(0xd2))/0x7+parseInt(_0x1e0885(0x71))/0x8*(-parseInt(_0x1e0885(0xbb))/0x9)+-parseInt(_0x1e0885(0x7e))/0xa*(parseInt(_0x1e0885(0xd7))/0xb);if(_0x981bca===_0xb7a4)break;else _0x33dc1e['push'](_0x33dc1e['shift']());}catch(_0x1d7329){_0x33dc1e['push'](_0x33dc1e['shift']());}}}(_0x2bec,0x2feb3));function _0x2bec(){const _0x43f6e4=['resolveComment','listComments','Module','YYYY/MM/DD\x20HH:mm','331068rVkNTY','2648WNIGne','rangeId','comment','requireSession','_threadCommentDataSource','_httpService','onReady','UniverThreadCommentDataSourcePlugin','getComment','CommentService','UserManagerService','UniverThreadCommentUIPlugin','type','218130WNZclQ','/add','solved','/edit','map','add','threadId','setConfig','/universer-api/user/list','_userService','parse','replies','CustomRangeType','15FooPWI','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/list','_configService','getUnit','users','saveCommentToSnapshot','Delete','Unknown','deleteComment','_injector','OpenOrReOpen','userID','_sessionService','length','ref','addUser','getUser','customRanges','commentUpdate$','Disposable','updateComment','IThreadCommentDataSourceService','Edit','user','getOwnPropertyDescriptor','getMemberID','createTimestamp','filter','_config','UniverCollaborationClientPlugin','116612sDBbSO','_init','get','Solved','COMMENT','getCurrentUser','Add','/solved','Plugin','Inject','ThreadCommentModel','addComment','rangeType','dayjs','Solve','HTTPService','forEach','2853kCEhpU','resolved','merge','disposeWithMe','defineProperty','33GOSpnH','/reply','_initUserSync','IConfigService','UNIVER_UNKNOWN','DependentOn','Injector','dataSource','body','syncUpdateMutationToColla','error','_threadCommentModel','root','UniverLicensePlugin','CollaborationSessionService','_initDataSource','delete','/delete','2052939WAUmXm','Reply','find','replyId','onStarting','55BFLCLl','code','content','_threadCommentDataSourceService','/universer-api/comment/unit/','userId','stringify','UniverInstanceType','344092mhvlZR','values','subscribe','_commentService','725430yjnUKr','post','UNRECOGNIZED','bufferTime','format','symbol','unitId'];_0x2bec=function(){return _0x43f6e4;};return _0x2bec();}Object[_0x4e2e0d(0xbf)](exports,Symbol['toStringTag'],{'value':_0x4e2e0d(0x6e)});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=_0x4e2e0d(0x8c);var I=(_0x507fa5=>(_0x507fa5[_0x507fa5[_0x4e2e0d(0x96)]=0x0]=_0x4e2e0d(0x96),_0x507fa5[_0x507fa5['Solved']=0x1]=_0x4e2e0d(0xad),_0x507fa5[_0x507fa5['UNRECOGNIZED']=-0x1]=_0x4e2e0d(0x67),_0x507fa5))(I||{}),v=(_0x756f33=>(_0x756f33[_0x756f33[_0x4e2e0d(0x93)]=0x0]=_0x4e2e0d(0x93),_0x756f33[_0x756f33['Add']=0x1]='Add',_0x756f33[_0x756f33[_0x4e2e0d(0xd3)]=0x2]=_0x4e2e0d(0xd3),_0x756f33[_0x756f33[_0x4e2e0d(0xa2)]=0x3]=_0x4e2e0d(0xa2),_0x756f33[_0x756f33['Delete']=0x4]='Delete',_0x756f33[_0x756f33[_0x4e2e0d(0xb8)]=0x5]=_0x4e2e0d(0xb8),_0x756f33[_0x756f33['UNRECOGNIZED']=-0x1]=_0x4e2e0d(0x67),_0x756f33))(v||{});const f=_0x3e1958=>c[_0x4e2e0d(0xb7)](new Date(+_0x3e1958))['format'](_0x4e2e0d(0x6f)),R=async(_0x1adde0,_0x18c078)=>{const _0x2ca6c3=_0x4e2e0d,_0xf35ba4=_0x1adde0['get'](c['UserManagerService']),_0x494199=_0x1adde0[_0x2ca6c3(0xac)](P[_0x2ca6c3(0xb9)]);_0x18c078[_0x2ca6c3(0xba)](_0x3bf489=>{const _0x166ddc=_0x2ca6c3;_0xf35ba4[_0x166ddc(0x9c)](_0x3bf489)&&_0x18c078[_0x166ddc(0xd0)](_0x3bf489);}),_0x18c078['size']&&(await _0x494199[_0x2ca6c3(0xac)](_0x2ca6c3(0x86),{'params':{'userIDs':[..._0x18c078]}}))[_0x2ca6c3(0xc8)][_0x2ca6c3(0x90)]['forEach'](_0x37ddc4=>{_0x37ddc4&&_0xf35ba4['addUser'](_0x37ddc4);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x503f9b,_0x37f575,_0x2dcb6a,_0x39e33b)=>{const _0x207716=_0x4e2e0d;for(var _0x1a3c0c=_0x39e33b>0x1?void 0x0:_0x39e33b?$(_0x37f575,_0x2dcb6a):_0x37f575,_0x1df820=_0x503f9b[_0x207716(0x99)]-0x1,_0x2c6cc1;_0x1df820>=0x0;_0x1df820--)(_0x2c6cc1=_0x503f9b[_0x1df820])&&(_0x1a3c0c=_0x2c6cc1(_0x1a3c0c)||_0x1a3c0c);return _0x1a3c0c;},S=(_0x2266cc,_0x1592f6)=>(_0x4fec9e,_0x32bc04)=>_0x1592f6(_0x4fec9e,_0x32bc04,_0x2266cc);let _=class extends c[_0x4e2e0d(0x9f)]{constructor(_0x2a9b35,_0x1419fe,_0xaab04e,_0x1e1a15){const _0x330082=_0x4e2e0d;super(),this[_0x330082(0xe2)]=_0x2a9b35,this['_threadCommentModel']=_0x1419fe,this[_0x330082(0x87)]=_0xaab04e,this[_0x330082(0x95)]=_0x1e1a15,this[_0x330082(0xab)](),this[_0x330082(0xc2)]();}['_initUserSync'](){const _0x407299=_0x4e2e0d;this[_0x407299(0xbe)](this[_0x407299(0xcb)][_0x407299(0x9e)]['pipe'](j[_0x407299(0x68)](0x10))[_0x407299(0xe1)](_0x29df9f=>{const _0x4a47d2=_0x407299,_0x2348a1=new Set();_0x29df9f[_0x4a47d2(0xba)](_0x6fae5c=>{const _0x4d534c=_0x4a47d2;switch(_0x6fae5c['type']){case _0x4d534c(0x83):{const _0x539960=_0x6fae5c['payload']['personId'];_0x2348a1[_0x4d534c(0x83)](_0x539960);break;}}}),R(this['_injector'],_0x2348a1);}));}[_0x4e2e0d(0xab)](){const _0x37299d=_0x4e2e0d;this[_0x37299d(0xbe)](this['_commentService']['commentUpdate$']['subscribe'](async _0x4adb79=>{const _0x57c8d4=_0x37299d;var _0x57f0ce,_0x35e031,_0x2e73d6,_0x9907b0;const _0x2bb2fb=(_0x57f0ce=this[_0x57c8d4(0xcb)]['getUnit'](_0x4adb79[_0x57c8d4(0x6b)])[_0x57c8d4(0xd4)](_0x4ee8b6=>_0x4ee8b6[_0x57c8d4(0x84)]===_0x4adb79['threadId']))==null?void 0x0:_0x57f0ce[_0x57c8d4(0xcc)];if(!_0x2bb2fb)return;const {unitId:_0x32d8e4,subUnitId:_0x471d2e}=_0x2bb2fb;switch(_0x4adb79[_0x57c8d4(0xa3)]&&this[_0x57c8d4(0x87)][_0x57c8d4(0x9b)](_0x4adb79['user']),_0x4adb79[_0x57c8d4(0x7d)]){case v[_0x57c8d4(0xb0)]:break;case v[_0x57c8d4(0xd3)]:{this[_0x57c8d4(0xcb)][_0x57c8d4(0xb5)](_0x32d8e4,_0x471d2e,{'unitId':_0x32d8e4,'subUnitId':_0x471d2e,'ref':'','id':_0x4adb79[_0x57c8d4(0xd5)],'dT':f(+_0x4adb79['createTimestamp']),'threadId':_0x4adb79['threadId'],'personId':(_0x2e73d6=(_0x35e031=_0x4adb79[_0x57c8d4(0xa3)])==null?void 0x0:_0x35e031[_0x57c8d4(0x97)])!=null?_0x2e73d6:_0x4adb79[_0x57c8d4(0xdc)],'text':JSON[_0x57c8d4(0x88)](_0x4adb79[_0x57c8d4(0xd9)]),'parentId':_0x2bb2fb['id']});break;}case v[_0x57c8d4(0x92)]:{const _0x2accf2=this[_0x57c8d4(0xcb)][_0x57c8d4(0x79)](_0x32d8e4,_0x471d2e,_0x4adb79[_0x57c8d4(0xd5)]);_0x2accf2&&_0x2accf2['parentId']&&this[_0x57c8d4(0xcb)][_0x57c8d4(0x94)](_0x32d8e4,_0x471d2e,_0x4adb79['replyId']);break;}case v[_0x57c8d4(0xa2)]:{this[_0x57c8d4(0xcb)][_0x57c8d4(0xa0)](_0x32d8e4,_0x471d2e,{'commentId':_0x4adb79[_0x57c8d4(0xd5)],'text':JSON[_0x57c8d4(0x88)](_0x4adb79[_0x57c8d4(0xd9)])});break;}case v['Solve']:{const _0x5b6eef=(_0x9907b0=this[_0x57c8d4(0xcb)][_0x57c8d4(0x8f)](_0x4adb79['unitId'])['find'](_0x3d752a=>_0x3d752a[_0x57c8d4(0x84)]===_0x4adb79[_0x57c8d4(0x84)]))==null?void 0x0:_0x9907b0[_0x57c8d4(0xcc)];_0x5b6eef&&this[_0x57c8d4(0xcb)][_0x57c8d4(0x6c)](_0x32d8e4,_0x471d2e,_0x5b6eef['id'],_0x4adb79[_0x57c8d4(0x80)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x4e2e0d(0xb3)](b[_0x4e2e0d(0x7a)])),S(0x1,c[_0x4e2e0d(0xb3)](M[_0x4e2e0d(0xb4)])),S(0x2,c['Inject'](c[_0x4e2e0d(0x7b)])),S(0x3,c[_0x4e2e0d(0xb3)](c[_0x4e2e0d(0xc6)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x4e2e0d(0xa4)],x=(_0x249a33,_0x367be3,_0x338568,_0x3c2862)=>{const _0x1d056b=_0x4e2e0d;for(var _0x1d87b1=_0x3c2862>0x1?void 0x0:_0x3c2862?A(_0x367be3,_0x338568):_0x367be3,_0x5a7e96=_0x249a33[_0x1d056b(0x99)]-0x1,_0x36bb18;_0x5a7e96>=0x0;_0x5a7e96--)(_0x36bb18=_0x249a33[_0x5a7e96])&&(_0x1d87b1=_0x36bb18(_0x1d87b1)||_0x1d87b1);return _0x1d87b1;},C=(_0x40efc9,_0x26d6e1)=>(_0x27e70c,_0x15a8da)=>_0x26d6e1(_0x27e70c,_0x15a8da,_0x40efc9);function Y(_0x3f71db,_0x34f66e){const _0x3a4220=_0x4e2e0d,_0x543f05=_0x3f71db[_0x3a4220(0x89)][0x0];return{..._0x34f66e,'id':_0x543f05[_0x3a4220(0xd5)],'resolved':_0x3f71db[_0x3a4220(0x80)]===0x1,'dT':f(_0x543f05[_0x3a4220(0xa6)]),'personId':_0x543f05['userId'],'threadId':_0x543f05[_0x3a4220(0x84)]};}function G(_0x23f022,_0x4ff2d3,_0x4a266b){const _0x258329=_0x4e2e0d;var _0x2a4233,_0x8dd373;if(((_0x8dd373=(_0x2a4233=_0x23f022==null?void 0x0:_0x23f022[_0x258329(0x89)])==null?void 0x0:_0x2a4233['length'])!=null?_0x8dd373:0x0)>0x0){const _0x244147=(_0x38d184,_0x41f539)=>({'id':_0x38d184[_0x258329(0xd5)],'threadId':_0x38d184[_0x258329(0x84)],'dT':f(_0x38d184[_0x258329(0xa6)]),'personId':_0x38d184[_0x258329(0xdc)],'resolved':_0x23f022[_0x258329(0x80)]===I[_0x258329(0xad)],'unitId':_0x4ff2d3,'subUnitId':_0x4a266b,'text':JSON[_0x258329(0x88)](_0x38d184[_0x258329(0xd9)]),'parentId':_0x41f539}),_0x3b2edd=_0x244147(_0x23f022[_0x258329(0x89)][0x0]);return{..._0x3b2edd,'children':_0x23f022[_0x258329(0x89)]['slice'](0x1)[_0x258329(0x82)](_0x451352=>_0x244147(_0x451352,_0x3b2edd['id']))};}return null;}let p=class{constructor(_0x4a9cbf,_0x4dd4fc,_0x30030c){const _0x2477da=_0x4e2e0d;this['_httpService']=_0x4a9cbf,this['_userService']=_0x4dd4fc,this[_0x2477da(0x98)]=_0x30030c;}async[_0x4e2e0d(0xb5)](_0xfea832){const _0x186f0a=_0x4e2e0d;var _0x485c19,_0x267299;const {parentId:_0x508ec8,unitId:_0x22913a,text:_0x452216,threadId:_0x2f3de1}=_0xfea832,_0x285380=(_0x267299=(_0x485c19=_0x452216[_0x186f0a(0x9d)])==null?void 0x0:_0x485c19[_0x186f0a(0xa7)](_0x4fde3f=>_0x4fde3f[_0x186f0a(0xb6)]===c[_0x186f0a(0x8a)][_0x186f0a(0xae)])[_0x186f0a(0x82)](_0x3b833d=>_0x3b833d[_0x186f0a(0x72)]))!=null?_0x267299:[],_0x5b67fb=JSON[_0x186f0a(0xdd)](_0x452216),_0x45eade=(await this[_0x186f0a(0x98)]['requireSession'](_0x22913a))[_0x186f0a(0xa5)]();if(_0x508ec8){const _0x551da0={'memberId':_0x45eade,'unitId':_0x22913a,'content':_0x5b67fb,'mention':_0x285380,'threadId':_0x2f3de1},_0x5f832f=(await this['_httpService'][_0x186f0a(0x66)](_0x186f0a(0xdb)+_0x22913a+_0x186f0a(0xc1),{'body':_0x551da0}))['body']['reply'];return{..._0xfea832,'id':_0x5f832f['replyId'],'dT':c[_0x186f0a(0xb7)](+_0x5f832f[_0x186f0a(0xa6)])[_0x186f0a(0x69)](_0x186f0a(0x6f)),'personId':_0x5f832f[_0x186f0a(0xdc)]};}else{const _0x4b6dd5={'memberId':_0x45eade,'unitId':_0x22913a,'content':_0x5b67fb,'mention':_0x285380},_0x7bd316=await this['_httpService'][_0x186f0a(0x66)](_0x186f0a(0xdb)+_0x22913a+_0x186f0a(0x7f),{'body':_0x4b6dd5});return Y(_0x7bd316['body'][_0x186f0a(0x73)],_0xfea832);}}async[_0x4e2e0d(0xa0)](_0x235b33){const _0x333204=_0x4e2e0d;var _0x3c7b30,_0x192111;const {text:_0x584b2a,unitId:_0x8d8920}=_0x235b33,_0x1781d8=(_0x192111=(_0x3c7b30=_0x584b2a[_0x333204(0x9d)])==null?void 0x0:_0x3c7b30[_0x333204(0xa7)](_0x469472=>_0x469472[_0x333204(0xb6)]===c[_0x333204(0x8a)][_0x333204(0xae)])[_0x333204(0x82)](_0x10f38f=>_0x10f38f[_0x333204(0x72)]))!=null?_0x192111:[],_0x8445fa=JSON['stringify'](_0x584b2a),_0x286027=_0x235b33[_0x333204(0x84)],_0x20c5c7=_0x235b33['id'],_0x380baa={'memberId':(await this[_0x333204(0x98)]['requireSession'](_0x8d8920))[_0x333204(0xa5)](),'unitId':_0x8d8920,'threadId':_0x286027,'mention':_0x1781d8,'content':_0x8445fa,'replyId':_0x20c5c7},_0x24099c=await this[_0x333204(0x76)][_0x333204(0x66)](_0x333204(0xdb)+_0x8d8920+_0x333204(0x81),{'body':_0x380baa});return!_0x24099c[_0x333204(0xc8)][_0x333204(0xca)]||_0x24099c[_0x333204(0xc8)][_0x333204(0xca)][_0x333204(0xd8)]===0x1;}async['resolveComment'](_0x472201){const _0x67183=_0x4e2e0d,{unitId:_0x534e8d}=_0x472201,_0x498ac5=_0x472201['threadId'],_0x3bde8e={'memberId':this[_0x67183(0x87)][_0x67183(0xaf)]()[_0x67183(0x97)],'unitId':_0x534e8d,'threadId':_0x498ac5,'solved':_0x472201[_0x67183(0xbc)]?I['Solved']:I[_0x67183(0x96)]},_0x593930=await this[_0x67183(0x76)]['post'](_0x67183(0xdb)+_0x534e8d+_0x67183(0xb1),{'body':_0x3bde8e});return!_0x593930[_0x67183(0xc8)]['error']||_0x593930[_0x67183(0xc8)][_0x67183(0xca)]['code']===0x1;}async[_0x4e2e0d(0x94)](_0x17b029,_0x31897c,_0x2a6270,_0x599b9e){const _0x1c403b=_0x4e2e0d,_0x27fbc1={'memberId':(await this[_0x1c403b(0x98)][_0x1c403b(0x74)](_0x17b029))['getMemberID'](),'threadId':_0x2a6270,'replyId':_0x599b9e,'unitId':_0x17b029},_0x43a4a4=await this[_0x1c403b(0x76)][_0x1c403b(0x66)]('/universer-api/comment/unit/'+_0x17b029+_0x1c403b(0xd1),{'body':_0x27fbc1});return!_0x43a4a4[_0x1c403b(0xc8)]['error']||_0x43a4a4[_0x1c403b(0xc8)][_0x1c403b(0xca)]['code']===0x1;}async[_0x4e2e0d(0x6d)](_0x308f26,_0x2072b2,_0x49e953){const _0x7a079b=_0x4e2e0d,_0x4903f8={'unitId':_0x308f26,'threadId':_0x49e953},_0x33b163=await this[_0x7a079b(0x76)][_0x7a079b(0x66)](_0x7a079b(0xdb)+_0x308f26+_0x7a079b(0x8d),{'body':_0x4903f8}),_0x3ebdf2=_0x49e953[_0x7a079b(0x82)](_0x1c8ec4=>G(_0x33b163[_0x7a079b(0xc8)]['comments'][_0x1c8ec4],_0x308f26,_0x2072b2))[_0x7a079b(0xa7)](Boolean);return Object[_0x7a079b(0xe0)](_0x33b163[_0x7a079b(0xc8)]['users'])[_0x7a079b(0xba)](_0x7626b3=>{const _0x3cec63=_0x7a079b;this[_0x3cec63(0x87)]['addUser'](_0x7626b3);}),_0x3ebdf2;}[_0x4e2e0d(0x91)](_0x1bf3cb){const _0x4ee629=_0x4e2e0d;return{'id':_0x1bf3cb['id'],'threadId':_0x1bf3cb['threadId'],'ref':_0x1bf3cb[_0x4ee629(0x9a)]};}};p=x([C(0x0,c[_0x4e2e0d(0xb3)](P[_0x4e2e0d(0xb9)])),C(0x1,c['Inject'](c[_0x4e2e0d(0x7b)])),C(0x2,c['Inject'](b[_0x4e2e0d(0xce)]))],p);var H=Object[_0x4e2e0d(0xa4)],J=(_0x3cdf19,_0x17adf6,_0x161ed7,_0x39f555)=>{const _0x1e774f=_0x4e2e0d;for(var _0x413a79=_0x39f555>0x1?void 0x0:_0x39f555?H(_0x17adf6,_0x161ed7):_0x17adf6,_0x8c368f=_0x3cdf19[_0x1e774f(0x99)]-0x1,_0x560d67;_0x8c368f>=0x0;_0x8c368f--)(_0x560d67=_0x3cdf19[_0x8c368f])&&(_0x413a79=_0x560d67(_0x413a79)||_0x413a79);return _0x413a79;},y=(_0x4f5392,_0x44deaf)=>(_0x478088,_0x4071f0)=>_0x44deaf(_0x478088,_0x4071f0,_0x4f5392);let g=class extends c['Disposable']{constructor(_0x2388b6,_0x3d45a1){const _0x5c1854=_0x4e2e0d;super(),this['_threadCommentDataSourceService']=_0x2388b6,this['_threadCommentDataSource']=_0x3d45a1,this[_0x5c1854(0xcf)]();}[_0x4e2e0d(0xcf)](){const _0xb43b78=_0x4e2e0d;this[_0xb43b78(0xda)][_0xb43b78(0xc7)]=this[_0xb43b78(0x75)],this[_0xb43b78(0xda)][_0xb43b78(0xc9)]=!0x1;}};g=J([y(0x0,M[_0x4e2e0d(0xa1)]),y(0x1,c[_0x4e2e0d(0xb3)](p))],g);var F=Object[_0x4e2e0d(0xbf)],L=Object[_0x4e2e0d(0xa4)],Z=(_0x4d2418,_0x48cd65,_0x3d3b17)=>_0x48cd65 in _0x4d2418?F(_0x4d2418,_0x48cd65,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d3b17}):_0x4d2418[_0x48cd65]=_0x3d3b17,W=(_0x3be615,_0x54cba2,_0x3becb2,_0x4b481f)=>{const _0x5eca7a=_0x4e2e0d;for(var _0x574605=_0x4b481f>0x1?void 0x0:_0x4b481f?L(_0x54cba2,_0x3becb2):_0x54cba2,_0x3b85fe=_0x3be615[_0x5eca7a(0x99)]-0x1,_0x1b064f;_0x3b85fe>=0x0;_0x3b85fe--)(_0x1b064f=_0x3be615[_0x3b85fe])&&(_0x574605=_0x1b064f(_0x574605)||_0x574605);return _0x574605;},O=(_0x3c70ab,_0x2e74ae)=>(_0x182ff3,_0x5bb4e8)=>_0x2e74ae(_0x182ff3,_0x5bb4e8,_0x3c70ab),N=(_0x102e49,_0x35ca61,_0xc18c06)=>Z(_0x102e49,typeof _0x35ca61!=_0x4e2e0d(0x6a)?_0x35ca61+'':_0x35ca61,_0xc18c06);exports[_0x4e2e0d(0x78)]=class extends c[_0x4e2e0d(0xb2)]{constructor(_0x1493dc=D,_0x30f83f,_0x568e97){const _0x4560b6=_0x4e2e0d;super(),this[_0x4560b6(0xa8)]=_0x1493dc,this[_0x4560b6(0x95)]=_0x30f83f,this[_0x4560b6(0x8e)]=_0x568e97;const {..._0xa19e3e}=c[_0x4560b6(0xbd)]({},D,this['_config']);this['_configService'][_0x4560b6(0x85)](q,_0xa19e3e);}[_0x4e2e0d(0xd6)](){[[p],[g],[_]]['forEach'](_0x3646ec=>{const _0x11f95d=_0x3193;this[_0x11f95d(0x95)][_0x11f95d(0x83)](_0x3646ec);});}[_0x4e2e0d(0x77)](){const _0x44e163=_0x4e2e0d;this[_0x44e163(0x95)]['get'](g),this[_0x44e163(0x95)]['get'](_);}},N(exports[_0x4e2e0d(0x78)],'pluginName',U),N(exports[_0x4e2e0d(0x78)],'type',c[_0x4e2e0d(0xde)][_0x4e2e0d(0xc4)]),exports[_0x4e2e0d(0x78)]=W([c[_0x4e2e0d(0xc5)](w[_0x4e2e0d(0x7c)],b[_0x4e2e0d(0xa9)],T[_0x4e2e0d(0xcd)]),O(0x1,c[_0x4e2e0d(0xb3)](c[_0x4e2e0d(0xc6)])),O(0x2,c[_0x4e2e0d(0xc3)])],exports[_0x4e2e0d(0x78)]);
1
+ 'use strict';const _0x16506a=_0x3f84;(function(_0x5b9007,_0x2f4040){const _0xd28f7f=_0x3f84,_0x5b88fd=_0x5b9007();while(!![]){try{const _0x34460c=parseInt(_0xd28f7f(0x11a))/0x1*(parseInt(_0xd28f7f(0xb5))/0x2)+parseInt(_0xd28f7f(0xc6))/0x3*(-parseInt(_0xd28f7f(0xff))/0x4)+-parseInt(_0xd28f7f(0xba))/0x5+parseInt(_0xd28f7f(0xb9))/0x6*(parseInt(_0xd28f7f(0xdd))/0x7)+-parseInt(_0xd28f7f(0xc1))/0x8*(-parseInt(_0xd28f7f(0xcf))/0x9)+-parseInt(_0xd28f7f(0x119))/0xa+-parseInt(_0xd28f7f(0x10f))/0xb*(-parseInt(_0xd28f7f(0x112))/0xc);if(_0x34460c===_0x2f4040)break;else _0x5b88fd['push'](_0x5b88fd['shift']());}catch(_0x2c2891){_0x5b88fd['push'](_0x5b88fd['shift']());}}}(_0x1717,0x7bae3));Object[_0x16506a(0xf6)](exports,Symbol[_0x16506a(0x11c)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xeafbb7=>(_0xeafbb7[_0xeafbb7['OpenOrReOpen']=0x0]=_0x16506a(0x11f),_0xeafbb7[_0xeafbb7[_0x16506a(0xe7)]=0x1]=_0x16506a(0xe7),_0xeafbb7[_0xeafbb7['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xeafbb7))(I||{}),v=(_0x1c8635=>(_0x1c8635[_0x1c8635['Unknown']=0x0]='Unknown',_0x1c8635[_0x1c8635[_0x16506a(0xf5)]=0x1]=_0x16506a(0xf5),_0x1c8635[_0x1c8635[_0x16506a(0x10b)]=0x2]=_0x16506a(0x10b),_0x1c8635[_0x1c8635[_0x16506a(0xf2)]=0x3]='Edit',_0x1c8635[_0x1c8635[_0x16506a(0xed)]=0x4]=_0x16506a(0xed),_0x1c8635[_0x1c8635[_0x16506a(0xf1)]=0x5]=_0x16506a(0xf1),_0x1c8635[_0x1c8635[_0x16506a(0x11d)]=-0x1]='UNRECOGNIZED',_0x1c8635))(v||{});function _0x3f84(_0x15efed,_0x1b44ef){const _0x1717c7=_0x1717();return _0x3f84=function(_0x3f8444,_0x40c3ef){_0x3f8444=_0x3f8444-0xa9;let _0x38f383=_0x1717c7[_0x3f8444];return _0x38f383;},_0x3f84(_0x15efed,_0x1b44ef);}const f=_0x5ce5be=>c[_0x16506a(0xb2)](new Date(+_0x5ce5be))[_0x16506a(0x106)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x43d70b,_0x3a2f1b)=>{const _0x29f4e6=_0x16506a,_0x398efa=_0x43d70b['get'](c['UserManagerService']),_0x36fee2=_0x43d70b['get'](P[_0x29f4e6(0xb8)]);_0x3a2f1b[_0x29f4e6(0x108)](_0x3689e6=>{const _0x57a216=_0x29f4e6;_0x398efa[_0x57a216(0x104)](_0x3689e6)&&_0x3a2f1b[_0x57a216(0xf0)](_0x3689e6);}),_0x3a2f1b[_0x29f4e6(0xbc)]&&(await _0x36fee2[_0x29f4e6(0xdf)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3a2f1b]}}))['body'][_0x29f4e6(0xde)][_0x29f4e6(0x108)](_0x372717=>{const _0x51e6c5=_0x29f4e6;_0x372717&&_0x398efa[_0x51e6c5(0x113)](_0x372717);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x1a3ef4,_0x35beaa,_0x241b1b,_0x44e478)=>{const _0x8d1adf=_0x16506a;for(var _0x53fdb3=_0x44e478>0x1?void 0x0:_0x44e478?$(_0x35beaa,_0x241b1b):_0x35beaa,_0x11ae8b=_0x1a3ef4[_0x8d1adf(0xca)]-0x1,_0x2d01d5;_0x11ae8b>=0x0;_0x11ae8b--)(_0x2d01d5=_0x1a3ef4[_0x11ae8b])&&(_0x53fdb3=_0x2d01d5(_0x53fdb3)||_0x53fdb3);return _0x53fdb3;},S=(_0x5273e6,_0x178989)=>(_0x1b632f,_0x11b184)=>_0x178989(_0x1b632f,_0x11b184,_0x5273e6);let _=class extends c[_0x16506a(0xef)]{constructor(_0x39e26d,_0x58548c,_0x5bc2c7,_0x3509c8){const _0x4e812e=_0x16506a;super(),this[_0x4e812e(0xd0)]=_0x39e26d,this['_threadCommentModel']=_0x58548c,this[_0x4e812e(0xb7)]=_0x5bc2c7,this[_0x4e812e(0xd7)]=_0x3509c8,this[_0x4e812e(0x117)](),this[_0x4e812e(0xae)]();}[_0x16506a(0xae)](){const _0x5c9e19=_0x16506a;this[_0x5c9e19(0xcc)](this['_threadCommentModel']['commentUpdate$'][_0x5c9e19(0xda)](j[_0x5c9e19(0xc9)](0x10))[_0x5c9e19(0x11e)](_0x42228c=>{const _0x2c3841=_0x5c9e19,_0x527f6f=new Set();_0x42228c[_0x2c3841(0x108)](_0x205908=>{const _0x54e14e=_0x2c3841;switch(_0x205908['type']){case _0x54e14e(0x107):{const _0x3bad8d=_0x205908['payload'][_0x54e14e(0x103)];_0x527f6f['add'](_0x3bad8d);break;}}}),R(this['_injector'],_0x527f6f);}));}[_0x16506a(0x117)](){const _0x3b0bd0=_0x16506a;this[_0x3b0bd0(0xcc)](this['_commentService'][_0x3b0bd0(0xfa)][_0x3b0bd0(0x11e)](async _0x262adc=>{const _0x2291a8=_0x3b0bd0;var _0x1c735a,_0x216672,_0x4fe499,_0x93935a;const _0x4f3c20=(_0x1c735a=this[_0x2291a8(0xf9)][_0x2291a8(0xcd)](_0x262adc['unitId'])[_0x2291a8(0xd1)](_0x1078da=>_0x1078da['threadId']===_0x262adc['threadId']))==null?void 0x0:_0x1c735a[_0x2291a8(0xe6)];if(!_0x4f3c20)return;const {unitId:_0x728dad,subUnitId:_0x26c42f}=_0x4f3c20;switch(_0x262adc[_0x2291a8(0xbd)]&&this['_userService'][_0x2291a8(0x113)](_0x262adc[_0x2291a8(0xbd)]),_0x262adc[_0x2291a8(0xc8)]){case v['Add']:break;case v['Reply']:{this[_0x2291a8(0xf9)][_0x2291a8(0xe9)](_0x728dad,_0x26c42f,{'unitId':_0x728dad,'subUnitId':_0x26c42f,'ref':'','id':_0x262adc[_0x2291a8(0xb1)],'dT':f(+_0x262adc[_0x2291a8(0xc4)]),'threadId':_0x262adc[_0x2291a8(0xea)],'personId':(_0x4fe499=(_0x216672=_0x262adc[_0x2291a8(0xbd)])==null?void 0x0:_0x216672[_0x2291a8(0xce)])!=null?_0x4fe499:_0x262adc[_0x2291a8(0xb4)],'text':JSON[_0x2291a8(0xe4)](_0x262adc[_0x2291a8(0xf3)]),'parentId':_0x4f3c20['id']});break;}case v[_0x2291a8(0xed)]:{const _0x52b35b=this[_0x2291a8(0xf9)][_0x2291a8(0xdc)](_0x728dad,_0x26c42f,_0x262adc['replyId']);_0x52b35b&&_0x52b35b['parentId']&&this[_0x2291a8(0xf9)][_0x2291a8(0x102)](_0x728dad,_0x26c42f,_0x262adc['replyId']);break;}case v[_0x2291a8(0xf2)]:{this[_0x2291a8(0xf9)][_0x2291a8(0xac)](_0x728dad,_0x26c42f,{'commentId':_0x262adc[_0x2291a8(0xb1)],'text':JSON[_0x2291a8(0xe4)](_0x262adc[_0x2291a8(0xf3)])});break;}case v['Solve']:{const _0x185ac4=(_0x93935a=this[_0x2291a8(0xf9)]['getUnit'](_0x262adc[_0x2291a8(0x120)])[_0x2291a8(0xd1)](_0x265e2b=>_0x265e2b['threadId']===_0x262adc[_0x2291a8(0xea)]))==null?void 0x0:_0x93935a[_0x2291a8(0xe6)];_0x185ac4&&this[_0x2291a8(0xf9)][_0x2291a8(0xab)](_0x728dad,_0x26c42f,_0x185ac4['id'],_0x262adc[_0x2291a8(0xaf)]===I[_0x2291a8(0xe7)]);break;}}}));}};_=E([S(0x0,c[_0x16506a(0xc2)](b['CommentService'])),S(0x1,c[_0x16506a(0xc2)](M['ThreadCommentModel'])),S(0x2,c[_0x16506a(0xc2)](c[_0x16506a(0xb3)])),S(0x3,c[_0x16506a(0xc2)](c[_0x16506a(0xc0)]))],_);const q=_0x16506a(0xcb),D={};var A=Object[_0x16506a(0xd2)],x=(_0x2bb8fd,_0x160e79,_0x575af,_0x5cfc81)=>{const _0x3611af=_0x16506a;for(var _0x3c6e80=_0x5cfc81>0x1?void 0x0:_0x5cfc81?A(_0x160e79,_0x575af):_0x160e79,_0x2af9b2=_0x2bb8fd[_0x3611af(0xca)]-0x1,_0x457b84;_0x2af9b2>=0x0;_0x2af9b2--)(_0x457b84=_0x2bb8fd[_0x2af9b2])&&(_0x3c6e80=_0x457b84(_0x3c6e80)||_0x3c6e80);return _0x3c6e80;},C=(_0x43bbae,_0x2651b3)=>(_0x459381,_0x51f892)=>_0x2651b3(_0x459381,_0x51f892,_0x43bbae);function Y(_0x5ecda6,_0x32def1){const _0x4af659=_0x16506a,_0x46e579=_0x5ecda6['replies'][0x0];return{..._0x32def1,'id':_0x46e579['replyId'],'resolved':_0x5ecda6[_0x4af659(0xaf)]===0x1,'dT':f(_0x46e579[_0x4af659(0xc4)]),'personId':_0x46e579['userId'],'threadId':_0x46e579['threadId']};}function G(_0x49d44a,_0x1d203a,_0x511886){const _0x4b5813=_0x16506a;var _0x31f66a,_0x3ce721;if(((_0x3ce721=(_0x31f66a=_0x49d44a==null?void 0x0:_0x49d44a['replies'])==null?void 0x0:_0x31f66a[_0x4b5813(0xca)])!=null?_0x3ce721:0x0)>0x0){const _0x354d0b=(_0x4f93a0,_0x23cbb0)=>({'id':_0x4f93a0[_0x4b5813(0xb1)],'threadId':_0x4f93a0[_0x4b5813(0xea)],'dT':f(_0x4f93a0['createTimestamp']),'personId':_0x4f93a0[_0x4b5813(0xb4)],'resolved':_0x49d44a[_0x4b5813(0xaf)]===I[_0x4b5813(0xe7)],'unitId':_0x1d203a,'subUnitId':_0x511886,'text':JSON['parse'](_0x4f93a0['content']),'parentId':_0x23cbb0}),_0x424f48=_0x354d0b(_0x49d44a[_0x4b5813(0x116)][0x0]);return{..._0x424f48,'children':_0x49d44a[_0x4b5813(0x116)]['slice'](0x1)[_0x4b5813(0xc3)](_0x5b0dfd=>_0x354d0b(_0x5b0dfd,_0x424f48['id']))};}return null;}let p=class{constructor(_0xb665f1,_0x841b8,_0x1ae271){const _0x234f75=_0x16506a;this[_0x234f75(0xad)]=_0xb665f1,this[_0x234f75(0xb7)]=_0x841b8,this[_0x234f75(0x10a)]=_0x1ae271;}async[_0x16506a(0xe9)](_0x3be5cf){const _0xbe3e3f=_0x16506a;var _0x2e4aea,_0x30f12c;const {parentId:_0x3b8207,unitId:_0x171975,text:_0x3ef879,threadId:_0x19cf1c}=_0x3be5cf,_0x281ac8=(_0x30f12c=(_0x2e4aea=_0x3ef879[_0xbe3e3f(0xf7)])==null?void 0x0:_0x2e4aea[_0xbe3e3f(0xc5)](_0x12c07e=>_0x12c07e[_0xbe3e3f(0x105)]===c[_0xbe3e3f(0xe8)][_0xbe3e3f(0xdb)])[_0xbe3e3f(0xc3)](_0x31e392=>_0x31e392['rangeId']))!=null?_0x30f12c:[],_0x429e7c=JSON[_0xbe3e3f(0xb6)](_0x3ef879),_0x51e246=(await this[_0xbe3e3f(0x10a)][_0xbe3e3f(0x10c)](_0x171975))['getMemberID']();if(_0x3b8207){const _0x585e93={'memberId':_0x51e246,'unitId':_0x171975,'content':_0x429e7c,'mention':_0x281ac8,'threadId':_0x19cf1c},_0x4fcce4=(await this[_0xbe3e3f(0xad)][_0xbe3e3f(0xd9)](_0xbe3e3f(0x109)+_0x171975+'/reply',{'body':_0x585e93}))[_0xbe3e3f(0x118)][_0xbe3e3f(0x115)];return{..._0x3be5cf,'id':_0x4fcce4['replyId'],'dT':c[_0xbe3e3f(0xb2)](+_0x4fcce4[_0xbe3e3f(0xc4)])[_0xbe3e3f(0x106)](_0xbe3e3f(0xc7)),'personId':_0x4fcce4[_0xbe3e3f(0xb4)]};}else{const _0x4add4c={'memberId':_0x51e246,'unitId':_0x171975,'content':_0x429e7c,'mention':_0x281ac8},_0x4e4981=await this['_httpService'][_0xbe3e3f(0xd9)](_0xbe3e3f(0x109)+_0x171975+_0xbe3e3f(0xe3),{'body':_0x4add4c});return Y(_0x4e4981['body'][_0xbe3e3f(0xf4)],_0x3be5cf);}}async[_0x16506a(0xac)](_0x131288){const _0x115667=_0x16506a;var _0x2c4333,_0x4e2127;const {text:_0x336762,unitId:_0x569364}=_0x131288,_0x9080f6=(_0x4e2127=(_0x2c4333=_0x336762[_0x115667(0xf7)])==null?void 0x0:_0x2c4333[_0x115667(0xc5)](_0x18916c=>_0x18916c['rangeType']===c[_0x115667(0xe8)]['COMMENT'])[_0x115667(0xc3)](_0x347706=>_0x347706[_0x115667(0xa9)]))!=null?_0x4e2127:[],_0x157eac=JSON[_0x115667(0xb6)](_0x336762),_0x57aee0=_0x131288[_0x115667(0xea)],_0x48f281=_0x131288['id'],_0x3cbd8c={'memberId':(await this[_0x115667(0x10a)]['requireSession'](_0x569364))['getMemberID'](),'unitId':_0x569364,'threadId':_0x57aee0,'mention':_0x9080f6,'content':_0x157eac,'replyId':_0x48f281},_0x509813=await this[_0x115667(0xad)][_0x115667(0xd9)]('/universer-api/comment/unit/'+_0x569364+_0x115667(0xec),{'body':_0x3cbd8c});return!_0x509813['body'][_0x115667(0xfb)]||_0x509813['body'][_0x115667(0xfb)][_0x115667(0x10e)]===0x1;}async[_0x16506a(0xab)](_0x439abd){const _0x4eb534=_0x16506a,{unitId:_0x1726ff}=_0x439abd,_0x1094d7=_0x439abd['threadId'],_0x578093={'memberId':this[_0x4eb534(0xb7)][_0x4eb534(0xfc)]()[_0x4eb534(0xce)],'unitId':_0x1726ff,'threadId':_0x1094d7,'solved':_0x439abd[_0x4eb534(0xd4)]?I[_0x4eb534(0xe7)]:I['OpenOrReOpen']},_0x552d02=await this[_0x4eb534(0xad)][_0x4eb534(0xd9)](_0x4eb534(0x109)+_0x1726ff+_0x4eb534(0xb0),{'body':_0x578093});return!_0x552d02[_0x4eb534(0x118)][_0x4eb534(0xfb)]||_0x552d02[_0x4eb534(0x118)][_0x4eb534(0xfb)][_0x4eb534(0x10e)]===0x1;}async[_0x16506a(0x102)](_0x49f43c,_0x1ad550,_0x4b4ed3,_0xff46ef){const _0x13c3af=_0x16506a,_0x52bd6d={'memberId':(await this['_sessionService'][_0x13c3af(0x10c)](_0x49f43c))['getMemberID'](),'threadId':_0x4b4ed3,'replyId':_0xff46ef,'unitId':_0x49f43c},_0x37aad8=await this['_httpService'][_0x13c3af(0xd9)]('/universer-api/comment/unit/'+_0x49f43c+_0x13c3af(0xf8),{'body':_0x52bd6d});return!_0x37aad8[_0x13c3af(0x118)][_0x13c3af(0xfb)]||_0x37aad8[_0x13c3af(0x118)][_0x13c3af(0xfb)][_0x13c3af(0x10e)]===0x1;}async[_0x16506a(0xee)](_0x27218a,_0x8f70c0,_0x3d098d){const _0x14aebe=_0x16506a,_0x1e541e={'unitId':_0x27218a,'threadId':_0x3d098d},_0x22d98a=await this[_0x14aebe(0xad)][_0x14aebe(0xd9)](_0x14aebe(0x109)+_0x27218a+_0x14aebe(0xbf),{'body':_0x1e541e}),_0x508cf4=_0x3d098d[_0x14aebe(0xc3)](_0x51f7d1=>G(_0x22d98a['body'][_0x14aebe(0xe2)][_0x51f7d1],_0x27218a,_0x8f70c0))[_0x14aebe(0xc5)](Boolean);return Object['values'](_0x22d98a[_0x14aebe(0x118)]['users'])[_0x14aebe(0x108)](_0xfc1696=>{const _0x3ee5bd=_0x14aebe;this[_0x3ee5bd(0xb7)][_0x3ee5bd(0x113)](_0xfc1696);}),_0x508cf4;}[_0x16506a(0xe0)](_0x8c917d){const _0x2bd7c0=_0x16506a;return{'id':_0x8c917d['id'],'threadId':_0x8c917d['threadId'],'ref':_0x8c917d[_0x2bd7c0(0xd5)]};}};p=x([C(0x0,c[_0x16506a(0xc2)](P[_0x16506a(0xb8)])),C(0x1,c[_0x16506a(0xc2)](c[_0x16506a(0xb3)])),C(0x2,c[_0x16506a(0xc2)](b['CollaborationSessionService']))],p);var H=Object[_0x16506a(0xd2)],J=(_0x28f505,_0x898d76,_0x34e2ce,_0x21db85)=>{for(var _0x5e2d2c=_0x21db85>0x1?void 0x0:_0x21db85?H(_0x898d76,_0x34e2ce):_0x898d76,_0x12eea9=_0x28f505['length']-0x1,_0x272f36;_0x12eea9>=0x0;_0x12eea9--)(_0x272f36=_0x28f505[_0x12eea9])&&(_0x5e2d2c=_0x272f36(_0x5e2d2c)||_0x5e2d2c);return _0x5e2d2c;},y=(_0x232698,_0x461326)=>(_0x402912,_0x22a379)=>_0x461326(_0x402912,_0x22a379,_0x232698);let g=class extends c[_0x16506a(0xef)]{constructor(_0x3ac881,_0x3c8710){const _0x4c9240=_0x16506a;super(),this[_0x4c9240(0xd8)]=_0x3ac881,this[_0x4c9240(0x100)]=_0x3c8710,this[_0x4c9240(0xfd)]();}[_0x16506a(0xfd)](){const _0x3c1624=_0x16506a;this['_threadCommentDataSourceService'][_0x3c1624(0x114)]=this[_0x3c1624(0x100)],this[_0x3c1624(0xd8)][_0x3c1624(0xe5)]=!0x1;}};g=J([y(0x0,M[_0x16506a(0xd3)]),y(0x1,c[_0x16506a(0xc2)](p))],g);var F=Object['defineProperty'],L=Object[_0x16506a(0xd2)],Z=(_0x1661e5,_0x151e15,_0x233e04)=>_0x151e15 in _0x1661e5?F(_0x1661e5,_0x151e15,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x233e04}):_0x1661e5[_0x151e15]=_0x233e04,W=(_0x24bc81,_0xe203bf,_0x233436,_0x19f428)=>{const _0x2b8a51=_0x16506a;for(var _0x20aaf9=_0x19f428>0x1?void 0x0:_0x19f428?L(_0xe203bf,_0x233436):_0xe203bf,_0x23b279=_0x24bc81[_0x2b8a51(0xca)]-0x1,_0x3e764a;_0x23b279>=0x0;_0x23b279--)(_0x3e764a=_0x24bc81[_0x23b279])&&(_0x20aaf9=_0x3e764a(_0x20aaf9)||_0x20aaf9);return _0x20aaf9;},O=(_0x12b7ca,_0x2933c9)=>(_0x360ab8,_0x4a803c)=>_0x2933c9(_0x360ab8,_0x4a803c,_0x12b7ca),N=(_0x1b9303,_0x298931,_0x5d8cbc)=>Z(_0x1b9303,typeof _0x298931!=_0x16506a(0x110)?_0x298931+'':_0x298931,_0x5d8cbc);function _0x1717(){const _0x464083=['rangeId','IConfigService','resolveComment','updateComment','_httpService','_initUserSync','solved','/solved','replyId','dayjs','UserManagerService','userId','288570ExikyN','stringify','_userService','HTTPService','6fPYXFg','3738290AMVWuv','merge','size','user','UniverInstanceType','/list','Injector','8BJMOsT','Inject','map','createTimestamp','filter','865905bdPmGr','YYYY/MM/DD\x20HH:mm','type','bufferTime','length','thread-comment-data-source.config','disposeWithMe','getUnit','userID','4221045mrujvq','_commentService','find','getOwnPropertyDescriptor','IThreadCommentDataSourceService','resolved','ref','Plugin','_injector','_threadCommentDataSourceService','post','pipe','COMMENT','getComment','4844623vopqAO','users','get','saveCommentToSnapshot','setConfig','comments','/add','parse','syncUpdateMutationToColla','root','Solved','CustomRangeType','addComment','threadId','DependentOn','/edit','Delete','listComments','Disposable','delete','Solve','Edit','content','comment','Add','defineProperty','customRanges','/delete','_threadCommentModel','commentUpdate$','error','getCurrentUser','_initDataSource','UNIVER_UNKNOWN','12dDQzfk','_threadCommentDataSource','UniverLicensePlugin','deleteComment','personId','getUser','rangeType','format','add','forEach','/universer-api/comment/unit/','_sessionService','Reply','requireSession','_configService','code','5179174hZkdaw','symbol','_config','24RcVpWy','addUser','dataSource','reply','replies','_init','body','9925990gDAWvu','7BUKjIr','UniverThreadCommentDataSourcePlugin','toStringTag','UNRECOGNIZED','subscribe','OpenOrReOpen','unitId'];_0x1717=function(){return _0x464083;};return _0x1717();}exports[_0x16506a(0x11b)]=class extends c[_0x16506a(0xd6)]{constructor(_0x191c0f=D,_0x4392f2,_0x1407e6){const _0x2a31e5=_0x16506a;super(),this[_0x2a31e5(0x111)]=_0x191c0f,this['_injector']=_0x4392f2,this['_configService']=_0x1407e6;const {..._0x1cb9c1}=c[_0x2a31e5(0xbb)]({},D,this['_config']);this[_0x2a31e5(0x10d)][_0x2a31e5(0xe1)](q,_0x1cb9c1);}['onStarting'](){const _0x2f8ccb=_0x16506a;[[p],[g],[_]][_0x2f8ccb(0x108)](_0x2b3273=>{const _0x5b8914=_0x2f8ccb;this[_0x5b8914(0xd7)][_0x5b8914(0x107)](_0x2b3273);});}['onReady'](){const _0x545edd=_0x16506a;this['_injector'][_0x545edd(0xdf)](g),this['_injector'][_0x545edd(0xdf)](_);}},N(exports[_0x16506a(0x11b)],'pluginName',U),N(exports[_0x16506a(0x11b)],_0x16506a(0xc8),c[_0x16506a(0xbe)][_0x16506a(0xfe)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x16506a(0xeb)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x16506a(0x101)]),O(0x1,c[_0x16506a(0xc2)](c['Injector'])),O(0x2,c[_0x16506a(0xaa)])],exports[_0x16506a(0x11b)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x12894f=_0x3fe7;(function(_0x4241c7,_0x228c1d){const _0x48a928=_0x3fe7,_0x1f7ad7=_0x4241c7();while(!![]){try{const _0x391be9=parseInt(_0x48a928(0x1d8))/0x1+parseInt(_0x48a928(0x214))/0x2+parseInt(_0x48a928(0x1c1))/0x3+parseInt(_0x48a928(0x1ec))/0x4*(-parseInt(_0x48a928(0x1c3))/0x5)+-parseInt(_0x48a928(0x1c6))/0x6+-parseInt(_0x48a928(0x1e0))/0x7*(-parseInt(_0x48a928(0x204))/0x8)+parseInt(_0x48a928(0x1cc))/0x9*(-parseInt(_0x48a928(0x1bc))/0xa);if(_0x391be9===_0x228c1d)break;else _0x1f7ad7['push'](_0x1f7ad7['shift']());}catch(_0x37f110){_0x1f7ad7['push'](_0x1f7ad7['shift']());}}}(_0x38d5,0x4eb92));import{CommentService as _0x445f16,CollaborationSessionService as _0xd9eaa,UniverCollaborationClientPlugin as _0x2e9440}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xcc64cb}from'@univerjs-pro/license';import{dayjs as _0x296554,UserManagerService as _0x432413,Inject as _0x5eb5e8,Injector as _0x20ead0,Disposable as _0x38820b,CustomRangeType as _0x5ae08f,UniverInstanceType as _0x5951dd,DependentOn as _0x367889,IConfigService as _0x3c3855,Plugin as _0x53658c,merge as _0x44dca6}from'@univerjs/core';function _0x3fe7(_0x228d40,_0x5ee896){const _0x38d5a2=_0x38d5();return _0x3fe7=function(_0x3fe7e1,_0x1c39ef){_0x3fe7e1=_0x3fe7e1-0x1b9;let _0x234770=_0x38d5a2[_0x3fe7e1];return _0x234770;},_0x3fe7(_0x228d40,_0x5ee896);}import{UniverThreadCommentUIPlugin as _0x31077f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x146ac8,IThreadCommentDataSourceService as _0xe4ca}from'@univerjs/thread-comment';import{bufferTime as _0x10be62}from'rxjs';import{HTTPService as _0xc7007}from'@univerjs/network';function _0x38d5(){const _0x28c87d=['/solved','Edit','Unknown','userId','commentUpdate$','_configService','addUser','_config','type','onReady','556366uWqXwI','replyId','forEach','_threadCommentModel','getUser','UNRECOGNIZED','_init','body','217wFFqtx','parse','_injector','_threadCommentDataSource','find','rangeType','map','customRanges','content','Solve','ref','comment','20ZkrPWY','/edit','OpenOrReOpen','filter','saveCommentToSnapshot','payload','add','length','_sessionService','_threadCommentDataSourceService','unitId','getCurrentUser','subscribe','getOwnPropertyDescriptor','Reply','error','/universer-api/comment/unit/','delete','resolveComment','slice','updateComment','size','userID','solved','48440upNfrj','pipe','reply','_userService','stringify','_httpService','_initUserSync','resolved','createTimestamp','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','getMemberID','user','post','Delete','981750CtZqlM','Solved','threadId','_initDataSource','getUnit','6258640qgZJGf','code','requireSession','/reply','setConfig','784614vdIMSc','users','296260hyDQnx','disposeWithMe','root','1511460uqbRGv','pluginName','COMMENT','replies','Add','/delete','9GDqplP','addComment'];_0x38d5=function(){return _0x28c87d;};return _0x38d5();}const W=_0x12894f(0x20e);var I=(_0x5e6cdb=>(_0x5e6cdb[_0x5e6cdb[_0x12894f(0x1ee)]=0x0]=_0x12894f(0x1ee),_0x5e6cdb[_0x5e6cdb[_0x12894f(0x215)]=0x1]=_0x12894f(0x215),_0x5e6cdb[_0x5e6cdb[_0x12894f(0x1dd)]=-0x1]='UNRECOGNIZED',_0x5e6cdb))(I||{}),v=(_0x54f5d3=>(_0x54f5d3[_0x54f5d3[_0x12894f(0x1d0)]=0x0]=_0x12894f(0x1d0),_0x54f5d3[_0x54f5d3[_0x12894f(0x1ca)]=0x1]=_0x12894f(0x1ca),_0x54f5d3[_0x54f5d3[_0x12894f(0x1fa)]=0x2]=_0x12894f(0x1fa),_0x54f5d3[_0x54f5d3[_0x12894f(0x1cf)]=0x3]=_0x12894f(0x1cf),_0x54f5d3[_0x54f5d3[_0x12894f(0x213)]=0x4]='Delete',_0x54f5d3[_0x54f5d3[_0x12894f(0x1e9)]=0x5]='Solve',_0x54f5d3[_0x54f5d3[_0x12894f(0x1dd)]=-0x1]=_0x12894f(0x1dd),_0x54f5d3))(v||{});const y=_0x4b5003=>_0x296554(new Date(+_0x4b5003))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x27e634,_0x4f92e7)=>{const _0x4d4a6f=_0x12894f,_0x5545db=_0x27e634[_0x4d4a6f(0x20f)](_0x432413),_0x3a66b4=_0x27e634[_0x4d4a6f(0x20f)](_0xc7007);_0x4f92e7['forEach'](_0x282d3e=>{const _0x2099c8=_0x4d4a6f;_0x5545db[_0x2099c8(0x1dc)](_0x282d3e)&&_0x4f92e7[_0x2099c8(0x1fd)](_0x282d3e);}),_0x4f92e7[_0x4d4a6f(0x201)]&&(await _0x3a66b4[_0x4d4a6f(0x20f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x4f92e7]}}))[_0x4d4a6f(0x1df)]['users'][_0x4d4a6f(0x1da)](_0x591069=>{const _0x14076=_0x4d4a6f;_0x591069&&_0x5545db[_0x14076(0x1d4)](_0x591069);});};var K=Object[_0x12894f(0x1f9)],V=(_0x388a8c,_0x485b84,_0x4034a1,_0x59e21f)=>{for(var _0x2c347b=_0x59e21f>0x1?void 0x0:_0x59e21f?K(_0x485b84,_0x4034a1):_0x485b84,_0x40f523=_0x388a8c['length']-0x1,_0x210191;_0x40f523>=0x0;_0x40f523--)(_0x210191=_0x388a8c[_0x40f523])&&(_0x2c347b=_0x210191(_0x2c347b)||_0x2c347b);return _0x2c347b;},p=(_0x38683e,_0x4bb3a9)=>(_0x12710e,_0x526ee8)=>_0x4bb3a9(_0x12710e,_0x526ee8,_0x38683e);let _=class extends _0x38820b{constructor(_0x511fb8,_0x19c0b6,_0x49f806,_0x590578){const _0x54c3ff=_0x12894f;super(),this[_0x54c3ff(0x20d)]=_0x511fb8,this[_0x54c3ff(0x1db)]=_0x19c0b6,this[_0x54c3ff(0x207)]=_0x49f806,this[_0x54c3ff(0x1e2)]=_0x590578,this['_init'](),this[_0x54c3ff(0x20a)]();}[_0x12894f(0x20a)](){const _0x3a9cab=_0x12894f;this[_0x3a9cab(0x1c4)](this['_threadCommentModel']['commentUpdate$'][_0x3a9cab(0x205)](_0x10be62(0x10))[_0x3a9cab(0x1f8)](_0x4e7117=>{const _0x5a3a1d=_0x3a9cab,_0x28e2f0=new Set();_0x4e7117[_0x5a3a1d(0x1da)](_0x24e4d6=>{const _0x537130=_0x5a3a1d;switch(_0x24e4d6[_0x537130(0x1d6)]){case _0x537130(0x1f2):{const _0x236fd8=_0x24e4d6[_0x537130(0x1f1)]['personId'];_0x28e2f0[_0x537130(0x1f2)](_0x236fd8);break;}}}),B(this['_injector'],_0x28e2f0);}));}[_0x12894f(0x1de)](){const _0x2c0a8e=_0x12894f;this['disposeWithMe'](this[_0x2c0a8e(0x20d)][_0x2c0a8e(0x1d2)]['subscribe'](async _0x235e4a=>{const _0x46425a=_0x2c0a8e;var _0x5a9228,_0x402783,_0x38f22c,_0x5dfb17;const _0x356023=(_0x5a9228=this['_threadCommentModel'][_0x46425a(0x1bb)](_0x235e4a[_0x46425a(0x1f6)])[_0x46425a(0x1e4)](_0x781d6a=>_0x781d6a[_0x46425a(0x1b9)]===_0x235e4a[_0x46425a(0x1b9)]))==null?void 0x0:_0x5a9228[_0x46425a(0x1c5)];if(!_0x356023)return;const {unitId:_0x5757bd,subUnitId:_0x3c2137}=_0x356023;switch(_0x235e4a[_0x46425a(0x211)]&&this[_0x46425a(0x207)][_0x46425a(0x1d4)](_0x235e4a[_0x46425a(0x211)]),_0x235e4a[_0x46425a(0x1d6)]){case v[_0x46425a(0x1ca)]:break;case v[_0x46425a(0x1fa)]:{this[_0x46425a(0x1db)]['addComment'](_0x5757bd,_0x3c2137,{'unitId':_0x5757bd,'subUnitId':_0x3c2137,'ref':'','id':_0x235e4a[_0x46425a(0x1d9)],'dT':y(+_0x235e4a[_0x46425a(0x20c)]),'threadId':_0x235e4a['threadId'],'personId':(_0x38f22c=(_0x402783=_0x235e4a[_0x46425a(0x211)])==null?void 0x0:_0x402783['userID'])!=null?_0x38f22c:_0x235e4a[_0x46425a(0x1d1)],'text':JSON[_0x46425a(0x1e1)](_0x235e4a['content']),'parentId':_0x356023['id']});break;}case v[_0x46425a(0x213)]:{const _0x58afaa=this['_threadCommentModel']['getComment'](_0x5757bd,_0x3c2137,_0x235e4a[_0x46425a(0x1d9)]);_0x58afaa&&_0x58afaa['parentId']&&this[_0x46425a(0x1db)]['deleteComment'](_0x5757bd,_0x3c2137,_0x235e4a[_0x46425a(0x1d9)]);break;}case v['Edit']:{this[_0x46425a(0x1db)][_0x46425a(0x200)](_0x5757bd,_0x3c2137,{'commentId':_0x235e4a[_0x46425a(0x1d9)],'text':JSON[_0x46425a(0x1e1)](_0x235e4a['content'])});break;}case v[_0x46425a(0x1e9)]:{const _0x333175=(_0x5dfb17=this[_0x46425a(0x1db)][_0x46425a(0x1bb)](_0x235e4a[_0x46425a(0x1f6)])[_0x46425a(0x1e4)](_0x329a1c=>_0x329a1c['threadId']===_0x235e4a[_0x46425a(0x1b9)]))==null?void 0x0:_0x5dfb17['root'];_0x333175&&this[_0x46425a(0x1db)][_0x46425a(0x1fe)](_0x5757bd,_0x3c2137,_0x333175['id'],_0x235e4a['solved']===I[_0x46425a(0x215)]);break;}}}));}};_=V([p(0x0,_0x5eb5e8(_0x445f16)),p(0x1,_0x5eb5e8(_0x146ac8)),p(0x2,_0x5eb5e8(_0x432413)),p(0x3,_0x5eb5e8(_0x20ead0))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x12894f(0x1f9)],Q=(_0x2a5267,_0x3a5e11,_0x7a59c5,_0x1b7578)=>{for(var _0x5e1dc1=_0x1b7578>0x1?void 0x0:_0x1b7578?k(_0x3a5e11,_0x7a59c5):_0x3a5e11,_0x1d1259=_0x2a5267['length']-0x1,_0x4e53d3;_0x1d1259>=0x0;_0x1d1259--)(_0x4e53d3=_0x2a5267[_0x1d1259])&&(_0x5e1dc1=_0x4e53d3(_0x5e1dc1)||_0x5e1dc1);return _0x5e1dc1;},b=(_0x1951c9,_0x141460)=>(_0x38b238,_0x398b22)=>_0x141460(_0x38b238,_0x398b22,_0x1951c9);function X(_0x5269c2,_0x2a93ab){const _0x37c64f=_0x12894f,_0x58a858=_0x5269c2[_0x37c64f(0x1c9)][0x0];return{..._0x2a93ab,'id':_0x58a858['replyId'],'resolved':_0x5269c2[_0x37c64f(0x203)]===0x1,'dT':y(_0x58a858['createTimestamp']),'personId':_0x58a858[_0x37c64f(0x1d1)],'threadId':_0x58a858[_0x37c64f(0x1b9)]};}function ee(_0x27c05f,_0x3544af,_0x55c3ed){const _0x519424=_0x12894f;var _0x7526f8,_0x28e8c5;if(((_0x28e8c5=(_0x7526f8=_0x27c05f==null?void 0x0:_0x27c05f['replies'])==null?void 0x0:_0x7526f8[_0x519424(0x1f3)])!=null?_0x28e8c5:0x0)>0x0){const _0x1cca96=(_0x129c8a,_0x4b98b4)=>({'id':_0x129c8a[_0x519424(0x1d9)],'threadId':_0x129c8a[_0x519424(0x1b9)],'dT':y(_0x129c8a[_0x519424(0x20c)]),'personId':_0x129c8a['userId'],'resolved':_0x27c05f[_0x519424(0x203)]===I['Solved'],'unitId':_0x3544af,'subUnitId':_0x55c3ed,'text':JSON[_0x519424(0x1e1)](_0x129c8a[_0x519424(0x1e8)]),'parentId':_0x4b98b4}),_0x437622=_0x1cca96(_0x27c05f[_0x519424(0x1c9)][0x0]);return{..._0x437622,'children':_0x27c05f[_0x519424(0x1c9)][_0x519424(0x1ff)](0x1)['map'](_0xc3711b=>_0x1cca96(_0xc3711b,_0x437622['id']))};}return null;}let S=class{constructor(_0x15299a,_0x112297,_0x4adbfc){const _0x38f9a8=_0x12894f;this[_0x38f9a8(0x209)]=_0x15299a,this[_0x38f9a8(0x207)]=_0x112297,this[_0x38f9a8(0x1f4)]=_0x4adbfc;}async[_0x12894f(0x1cd)](_0x35699a){const _0x36cd44=_0x12894f;var _0x47a13e,_0x1d6034;const {parentId:_0x2194a0,unitId:_0xdc88c,text:_0x4d468d,threadId:_0x553009}=_0x35699a,_0x43e624=(_0x1d6034=(_0x47a13e=_0x4d468d[_0x36cd44(0x1e7)])==null?void 0x0:_0x47a13e[_0x36cd44(0x1ef)](_0x215166=>_0x215166[_0x36cd44(0x1e5)]===_0x5ae08f['COMMENT'])[_0x36cd44(0x1e6)](_0x3301e7=>_0x3301e7['rangeId']))!=null?_0x1d6034:[],_0x5cdeb7=JSON[_0x36cd44(0x208)](_0x4d468d),_0x19497b=(await this[_0x36cd44(0x1f4)]['requireSession'](_0xdc88c))['getMemberID']();if(_0x2194a0){const _0x253002={'memberId':_0x19497b,'unitId':_0xdc88c,'content':_0x5cdeb7,'mention':_0x43e624,'threadId':_0x553009},_0x110531=(await this[_0x36cd44(0x209)]['post'](_0x36cd44(0x1fc)+_0xdc88c+_0x36cd44(0x1bf),{'body':_0x253002}))[_0x36cd44(0x1df)][_0x36cd44(0x206)];return{..._0x35699a,'id':_0x110531['replyId'],'dT':_0x296554(+_0x110531[_0x36cd44(0x20c)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x110531[_0x36cd44(0x1d1)]};}else{const _0x495067={'memberId':_0x19497b,'unitId':_0xdc88c,'content':_0x5cdeb7,'mention':_0x43e624},_0x4d1b4e=await this[_0x36cd44(0x209)][_0x36cd44(0x212)]('/universer-api/comment/unit/'+_0xdc88c+'/add',{'body':_0x495067});return X(_0x4d1b4e[_0x36cd44(0x1df)][_0x36cd44(0x1eb)],_0x35699a);}}async[_0x12894f(0x200)](_0x4f3cc3){const _0x32795d=_0x12894f;var _0x1484a8,_0x48a30a;const {text:_0x137877,unitId:_0x58d298}=_0x4f3cc3,_0x4449a5=(_0x48a30a=(_0x1484a8=_0x137877[_0x32795d(0x1e7)])==null?void 0x0:_0x1484a8[_0x32795d(0x1ef)](_0x438e94=>_0x438e94[_0x32795d(0x1e5)]===_0x5ae08f[_0x32795d(0x1c8)])['map'](_0x55f744=>_0x55f744['rangeId']))!=null?_0x48a30a:[],_0x4d0dff=JSON[_0x32795d(0x208)](_0x137877),_0x4299a3=_0x4f3cc3['threadId'],_0x44a512=_0x4f3cc3['id'],_0x1f83ac={'memberId':(await this[_0x32795d(0x1f4)][_0x32795d(0x1be)](_0x58d298))[_0x32795d(0x210)](),'unitId':_0x58d298,'threadId':_0x4299a3,'mention':_0x4449a5,'content':_0x4d0dff,'replyId':_0x44a512},_0x240281=await this[_0x32795d(0x209)][_0x32795d(0x212)]('/universer-api/comment/unit/'+_0x58d298+_0x32795d(0x1ed),{'body':_0x1f83ac});return!_0x240281[_0x32795d(0x1df)][_0x32795d(0x1fb)]||_0x240281[_0x32795d(0x1df)][_0x32795d(0x1fb)][_0x32795d(0x1bd)]===0x1;}async['resolveComment'](_0x528a35){const _0x44eadd=_0x12894f,{unitId:_0x57b647}=_0x528a35,_0x55ba20=_0x528a35[_0x44eadd(0x1b9)],_0x5da35f={'memberId':this['_userService'][_0x44eadd(0x1f7)]()[_0x44eadd(0x202)],'unitId':_0x57b647,'threadId':_0x55ba20,'solved':_0x528a35[_0x44eadd(0x20b)]?I[_0x44eadd(0x215)]:I[_0x44eadd(0x1ee)]},_0x10c4d7=await this[_0x44eadd(0x209)]['post'](_0x44eadd(0x1fc)+_0x57b647+_0x44eadd(0x1ce),{'body':_0x5da35f});return!_0x10c4d7[_0x44eadd(0x1df)]['error']||_0x10c4d7[_0x44eadd(0x1df)][_0x44eadd(0x1fb)]['code']===0x1;}async['deleteComment'](_0x347be6,_0x135e48,_0xc659fc,_0x4bf134){const _0x30323f=_0x12894f,_0x3ba632={'memberId':(await this[_0x30323f(0x1f4)][_0x30323f(0x1be)](_0x347be6))[_0x30323f(0x210)](),'threadId':_0xc659fc,'replyId':_0x4bf134,'unitId':_0x347be6},_0x43f126=await this[_0x30323f(0x209)][_0x30323f(0x212)](_0x30323f(0x1fc)+_0x347be6+_0x30323f(0x1cb),{'body':_0x3ba632});return!_0x43f126['body'][_0x30323f(0x1fb)]||_0x43f126['body'][_0x30323f(0x1fb)]['code']===0x1;}async['listComments'](_0x5e4f1e,_0x459721,_0xd07ffc){const _0x5c431f=_0x12894f,_0x317050={'unitId':_0x5e4f1e,'threadId':_0xd07ffc},_0x4389a7=await this['_httpService'][_0x5c431f(0x212)](_0x5c431f(0x1fc)+_0x5e4f1e+'/list',{'body':_0x317050}),_0x1d9c9a=_0xd07ffc['map'](_0x12df22=>ee(_0x4389a7['body']['comments'][_0x12df22],_0x5e4f1e,_0x459721))[_0x5c431f(0x1ef)](Boolean);return Object['values'](_0x4389a7[_0x5c431f(0x1df)][_0x5c431f(0x1c2)])[_0x5c431f(0x1da)](_0x4350f8=>{this['_userService']['addUser'](_0x4350f8);}),_0x1d9c9a;}[_0x12894f(0x1f0)](_0x3a0aa2){const _0x3b5c0a=_0x12894f;return{'id':_0x3a0aa2['id'],'threadId':_0x3a0aa2['threadId'],'ref':_0x3a0aa2[_0x3b5c0a(0x1ea)]};}};S=Q([b(0x0,_0x5eb5e8(_0xc7007)),b(0x1,_0x5eb5e8(_0x432413)),b(0x2,_0x5eb5e8(_0xd9eaa))],S);var re=Object[_0x12894f(0x1f9)],te=(_0x1f6361,_0x4daec7,_0x154f16,_0x4fd746)=>{const _0x166ce0=_0x12894f;for(var _0x365aa8=_0x4fd746>0x1?void 0x0:_0x4fd746?re(_0x4daec7,_0x154f16):_0x4daec7,_0x43051c=_0x1f6361[_0x166ce0(0x1f3)]-0x1,_0x39e747;_0x43051c>=0x0;_0x43051c--)(_0x39e747=_0x1f6361[_0x43051c])&&(_0x365aa8=_0x39e747(_0x365aa8)||_0x365aa8);return _0x365aa8;},M=(_0x4d337f,_0x180353)=>(_0x4b374b,_0x523fa0)=>_0x180353(_0x4b374b,_0x523fa0,_0x4d337f);let f=class extends _0x38820b{constructor(_0x6cc9e0,_0x5bfc5f){const _0x8805fb=_0x12894f;super(),this[_0x8805fb(0x1f5)]=_0x6cc9e0,this[_0x8805fb(0x1e3)]=_0x5bfc5f,this[_0x8805fb(0x1ba)]();}[_0x12894f(0x1ba)](){const _0x11aea7=_0x12894f;this[_0x11aea7(0x1f5)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0xe4ca),M(0x1,_0x5eb5e8(S))],f);var se=Object['defineProperty'],oe=Object[_0x12894f(0x1f9)],ne=(_0x3fbdd6,_0x3e2ce9,_0x12fa4e)=>_0x3e2ce9 in _0x3fbdd6?se(_0x3fbdd6,_0x3e2ce9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x12fa4e}):_0x3fbdd6[_0x3e2ce9]=_0x12fa4e,ie=(_0x597d24,_0x145763,_0x4c7200,_0x185b46)=>{const _0x38acbb=_0x12894f;for(var _0x425dbe=_0x185b46>0x1?void 0x0:_0x185b46?oe(_0x145763,_0x4c7200):_0x145763,_0x17198f=_0x597d24[_0x38acbb(0x1f3)]-0x1,_0x20b13d;_0x17198f>=0x0;_0x17198f--)(_0x20b13d=_0x597d24[_0x17198f])&&(_0x425dbe=_0x20b13d(_0x425dbe)||_0x425dbe);return _0x425dbe;},N=(_0x5b67d6,_0x1167a8)=>(_0x180c89,_0x507609)=>_0x1167a8(_0x180c89,_0x507609,_0x5b67d6),$=(_0x434cd2,_0x243d71,_0x350a1b)=>ne(_0x434cd2,typeof _0x243d71!='symbol'?_0x243d71+'':_0x243d71,_0x350a1b);let g=class extends _0x53658c{constructor(_0x56acba=O,_0x32391f,_0x5993b8){const _0x2070d1=_0x12894f;super(),this[_0x2070d1(0x1d5)]=_0x56acba,this[_0x2070d1(0x1e2)]=_0x32391f,this['_configService']=_0x5993b8;const {..._0x5ccaad}=_0x44dca6({},O,this[_0x2070d1(0x1d5)]);this[_0x2070d1(0x1d3)][_0x2070d1(0x1c0)](z,_0x5ccaad);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x450499=>{const _0x2f2707=_0x3fe7;this['_injector'][_0x2f2707(0x1f2)](_0x450499);});}[_0x12894f(0x1d7)](){const _0x47d22e=_0x12894f;this[_0x47d22e(0x1e2)][_0x47d22e(0x20f)](f),this[_0x47d22e(0x1e2)][_0x47d22e(0x20f)](_);}};$(g,_0x12894f(0x1c7),W),$(g,_0x12894f(0x1d6),_0x5951dd['UNIVER_UNKNOWN']),g=ie([_0x367889(_0x31077f,_0x2e9440,_0xcc64cb),N(0x1,_0x5eb5e8(_0x20ead0)),N(0x2,_0x3c3855)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3389ee=_0x2ec0;(function(_0x319c66,_0x2e6133){const _0x1268d9=_0x2ec0,_0x5644cc=_0x319c66();while(!![]){try{const _0x4cbb48=parseInt(_0x1268d9(0x17c))/0x1+parseInt(_0x1268d9(0x179))/0x2*(-parseInt(_0x1268d9(0x163))/0x3)+-parseInt(_0x1268d9(0x153))/0x4+-parseInt(_0x1268d9(0x181))/0x5+parseInt(_0x1268d9(0x162))/0x6+parseInt(_0x1268d9(0x19a))/0x7*(parseInt(_0x1268d9(0x15d))/0x8)+parseInt(_0x1268d9(0x17b))/0x9;if(_0x4cbb48===_0x2e6133)break;else _0x5644cc['push'](_0x5644cc['shift']());}catch(_0x8cc092){_0x5644cc['push'](_0x5644cc['shift']());}}}(_0x29b7,0xd7743));import{CommentService as _0x43d37e,CollaborationSessionService as _0x28a0e2,UniverCollaborationClientPlugin as _0x4df037}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d0ee8}from'@univerjs-pro/license';import{dayjs as _0x536171,UserManagerService as _0x263cf9,Inject as _0x37a0af,Injector as _0x35741c,Disposable as _0x422b10,CustomRangeType as _0x29a17a,UniverInstanceType as _0x19b055,DependentOn as _0x37e8aa,IConfigService as _0x3f04d9,Plugin as _0x1678df,merge as _0x3184fc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x6aa952}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x19040a,IThreadCommentDataSourceService as _0x35f50a}from'@univerjs/thread-comment';import{bufferTime as _0x239bc1}from'rxjs';import{HTTPService as _0x523c25}from'@univerjs/network';const W=_0x3389ee(0x16f);var I=(_0x2f9989=>(_0x2f9989[_0x2f9989[_0x3389ee(0x182)]=0x0]=_0x3389ee(0x182),_0x2f9989[_0x2f9989[_0x3389ee(0x171)]=0x1]=_0x3389ee(0x171),_0x2f9989[_0x2f9989['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2f9989))(I||{}),v=(_0xdedbe4=>(_0xdedbe4[_0xdedbe4[_0x3389ee(0x16d)]=0x0]=_0x3389ee(0x16d),_0xdedbe4[_0xdedbe4['Add']=0x1]='Add',_0xdedbe4[_0xdedbe4[_0x3389ee(0x1aa)]=0x2]=_0x3389ee(0x1aa),_0xdedbe4[_0xdedbe4[_0x3389ee(0x17f)]=0x3]=_0x3389ee(0x17f),_0xdedbe4[_0xdedbe4[_0x3389ee(0x15c)]=0x4]='Delete',_0xdedbe4[_0xdedbe4[_0x3389ee(0x159)]=0x5]=_0x3389ee(0x159),_0xdedbe4[_0xdedbe4[_0x3389ee(0x151)]=-0x1]=_0x3389ee(0x151),_0xdedbe4))(v||{});const y=_0x142eb7=>_0x536171(new Date(+_0x142eb7))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x34cae1,_0x42ec47)=>{const _0x403cd1=_0x3389ee,_0x3c93fe=_0x34cae1[_0x403cd1(0x192)](_0x263cf9),_0x46e673=_0x34cae1[_0x403cd1(0x192)](_0x523c25);_0x42ec47[_0x403cd1(0x157)](_0x9fdf5a=>{const _0xae69aa=_0x403cd1;_0x3c93fe['getUser'](_0x9fdf5a)&&_0x42ec47[_0xae69aa(0x18d)](_0x9fdf5a);}),_0x42ec47[_0x403cd1(0x1a8)]&&(await _0x46e673['get'](_0x403cd1(0x167),{'params':{'userIDs':[..._0x42ec47]}}))['body'][_0x403cd1(0x172)][_0x403cd1(0x157)](_0x20189e=>{const _0x4053ec=_0x403cd1;_0x20189e&&_0x3c93fe[_0x4053ec(0x176)](_0x20189e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x4ffc0b,_0x5db76f,_0x2b23d7,_0x2640a5)=>{const _0x5b7509=_0x3389ee;for(var _0x58a2b0=_0x2640a5>0x1?void 0x0:_0x2640a5?K(_0x5db76f,_0x2b23d7):_0x5db76f,_0x22c540=_0x4ffc0b[_0x5b7509(0x189)]-0x1,_0x3e2c1b;_0x22c540>=0x0;_0x22c540--)(_0x3e2c1b=_0x4ffc0b[_0x22c540])&&(_0x58a2b0=_0x3e2c1b(_0x58a2b0)||_0x58a2b0);return _0x58a2b0;},p=(_0x2033b6,_0x3bcfe9)=>(_0x11f11d,_0x347009)=>_0x3bcfe9(_0x11f11d,_0x347009,_0x2033b6);let _=class extends _0x422b10{constructor(_0x24329f,_0x6ecb9c,_0x3dbda8,_0x32b935){const _0x5af99f=_0x3389ee;super(),this[_0x5af99f(0x1a6)]=_0x24329f,this[_0x5af99f(0x1a3)]=_0x6ecb9c,this['_userService']=_0x3dbda8,this[_0x5af99f(0x177)]=_0x32b935,this[_0x5af99f(0x173)](),this[_0x5af99f(0x14a)]();}['_initUserSync'](){const _0x91b5a4=_0x3389ee;this[_0x91b5a4(0x17d)](this[_0x91b5a4(0x1a3)][_0x91b5a4(0x199)][_0x91b5a4(0x16c)](_0x239bc1(0x10))[_0x91b5a4(0x14f)](_0x104340=>{const _0x87d5bc=_0x91b5a4,_0x4c8bf2=new Set();_0x104340['forEach'](_0x3908e8=>{const _0x35e6f2=_0x2ec0;switch(_0x3908e8[_0x35e6f2(0x19d)]){case _0x35e6f2(0x15a):{const _0x544262=_0x3908e8[_0x35e6f2(0x178)][_0x35e6f2(0x18b)];_0x4c8bf2['add'](_0x544262);break;}}}),B(this[_0x87d5bc(0x177)],_0x4c8bf2);}));}[_0x3389ee(0x173)](){const _0x320816=_0x3389ee;this[_0x320816(0x17d)](this[_0x320816(0x1a6)][_0x320816(0x199)][_0x320816(0x14f)](async _0x16e5eb=>{const _0x2465c2=_0x320816;var _0x50472c,_0x127331,_0x17f1fa,_0x39512e;const _0xaf36f5=(_0x50472c=this[_0x2465c2(0x1a3)]['getUnit'](_0x16e5eb[_0x2465c2(0x15b)])['find'](_0x127c4a=>_0x127c4a[_0x2465c2(0x180)]===_0x16e5eb['threadId']))==null?void 0x0:_0x50472c[_0x2465c2(0x1a0)];if(!_0xaf36f5)return;const {unitId:_0x294dca,subUnitId:_0x9d03ff}=_0xaf36f5;switch(_0x16e5eb[_0x2465c2(0x160)]&&this[_0x2465c2(0x168)][_0x2465c2(0x176)](_0x16e5eb[_0x2465c2(0x160)]),_0x16e5eb[_0x2465c2(0x19d)]){case v[_0x2465c2(0x188)]:break;case v[_0x2465c2(0x1aa)]:{this['_threadCommentModel'][_0x2465c2(0x1a4)](_0x294dca,_0x9d03ff,{'unitId':_0x294dca,'subUnitId':_0x9d03ff,'ref':'','id':_0x16e5eb[_0x2465c2(0x1a5)],'dT':y(+_0x16e5eb[_0x2465c2(0x196)]),'threadId':_0x16e5eb[_0x2465c2(0x180)],'personId':(_0x17f1fa=(_0x127331=_0x16e5eb['user'])==null?void 0x0:_0x127331['userID'])!=null?_0x17f1fa:_0x16e5eb[_0x2465c2(0x16a)],'text':JSON[_0x2465c2(0x1a2)](_0x16e5eb[_0x2465c2(0x183)]),'parentId':_0xaf36f5['id']});break;}case v['Delete']:{const _0x9b7ec7=this[_0x2465c2(0x1a3)][_0x2465c2(0x165)](_0x294dca,_0x9d03ff,_0x16e5eb['replyId']);_0x9b7ec7&&_0x9b7ec7[_0x2465c2(0x16e)]&&this[_0x2465c2(0x1a3)][_0x2465c2(0x1a7)](_0x294dca,_0x9d03ff,_0x16e5eb[_0x2465c2(0x1a5)]);break;}case v[_0x2465c2(0x17f)]:{this[_0x2465c2(0x1a3)][_0x2465c2(0x15e)](_0x294dca,_0x9d03ff,{'commentId':_0x16e5eb[_0x2465c2(0x1a5)],'text':JSON['parse'](_0x16e5eb[_0x2465c2(0x183)])});break;}case v['Solve']:{const _0x48d793=(_0x39512e=this[_0x2465c2(0x1a3)][_0x2465c2(0x1ae)](_0x16e5eb[_0x2465c2(0x15b)])[_0x2465c2(0x184)](_0x2cb4ef=>_0x2cb4ef[_0x2465c2(0x180)]===_0x16e5eb[_0x2465c2(0x180)]))==null?void 0x0:_0x39512e[_0x2465c2(0x1a0)];_0x48d793&&this[_0x2465c2(0x1a3)][_0x2465c2(0x156)](_0x294dca,_0x9d03ff,_0x48d793['id'],_0x16e5eb[_0x2465c2(0x195)]===I[_0x2465c2(0x171)]);break;}}}));}};_=V([p(0x0,_0x37a0af(_0x43d37e)),p(0x1,_0x37a0af(_0x19040a)),p(0x2,_0x37a0af(_0x263cf9)),p(0x3,_0x37a0af(_0x35741c))],_);const z=_0x3389ee(0x169),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x58a91f,_0x129c41,_0x370e58,_0x447083)=>{const _0x493960=_0x3389ee;for(var _0xf719a4=_0x447083>0x1?void 0x0:_0x447083?k(_0x129c41,_0x370e58):_0x129c41,_0x1ca164=_0x58a91f[_0x493960(0x189)]-0x1,_0x3abf0f;_0x1ca164>=0x0;_0x1ca164--)(_0x3abf0f=_0x58a91f[_0x1ca164])&&(_0xf719a4=_0x3abf0f(_0xf719a4)||_0xf719a4);return _0xf719a4;},b=(_0x2f5cc3,_0x4567be)=>(_0x348a12,_0x5e3f21)=>_0x4567be(_0x348a12,_0x5e3f21,_0x2f5cc3);function X(_0x309ddc,_0xc37460){const _0x1853ed=_0x3389ee,_0x536185=_0x309ddc[_0x1853ed(0x1af)][0x0];return{..._0xc37460,'id':_0x536185['replyId'],'resolved':_0x309ddc[_0x1853ed(0x195)]===0x1,'dT':y(_0x536185['createTimestamp']),'personId':_0x536185[_0x1853ed(0x16a)],'threadId':_0x536185[_0x1853ed(0x180)]};}function ee(_0x57a3b8,_0x1c2c29,_0x47cfea){const _0x5b5fe7=_0x3389ee;var _0x14ee9e,_0x2ae217;if(((_0x2ae217=(_0x14ee9e=_0x57a3b8==null?void 0x0:_0x57a3b8['replies'])==null?void 0x0:_0x14ee9e[_0x5b5fe7(0x189)])!=null?_0x2ae217:0x0)>0x0){const _0x3a7903=(_0x2a6abf,_0x5193a9)=>({'id':_0x2a6abf[_0x5b5fe7(0x1a5)],'threadId':_0x2a6abf[_0x5b5fe7(0x180)],'dT':y(_0x2a6abf[_0x5b5fe7(0x196)]),'personId':_0x2a6abf[_0x5b5fe7(0x16a)],'resolved':_0x57a3b8[_0x5b5fe7(0x195)]===I[_0x5b5fe7(0x171)],'unitId':_0x1c2c29,'subUnitId':_0x47cfea,'text':JSON['parse'](_0x2a6abf[_0x5b5fe7(0x183)]),'parentId':_0x5193a9}),_0xd1c571=_0x3a7903(_0x57a3b8['replies'][0x0]);return{..._0xd1c571,'children':_0x57a3b8[_0x5b5fe7(0x1af)]['slice'](0x1)['map'](_0x19ef5e=>_0x3a7903(_0x19ef5e,_0xd1c571['id']))};}return null;}let S=class{constructor(_0x3c76bb,_0x463803,_0x2856d0){const _0x4c7153=_0x3389ee;this['_httpService']=_0x3c76bb,this[_0x4c7153(0x168)]=_0x463803,this['_sessionService']=_0x2856d0;}async[_0x3389ee(0x1a4)](_0x5be2e6){const _0x271e42=_0x3389ee;var _0x22f1d7,_0x5c5ae6;const {parentId:_0x23ac84,unitId:_0x1cfffa,text:_0x387b41,threadId:_0x4970aa}=_0x5be2e6,_0x3d6a72=(_0x5c5ae6=(_0x22f1d7=_0x387b41[_0x271e42(0x170)])==null?void 0x0:_0x22f1d7[_0x271e42(0x19f)](_0xcc8340=>_0xcc8340[_0x271e42(0x155)]===_0x29a17a[_0x271e42(0x17e)])[_0x271e42(0x158)](_0x5764e8=>_0x5764e8[_0x271e42(0x18a)]))!=null?_0x5c5ae6:[],_0x5e6bd7=JSON[_0x271e42(0x154)](_0x387b41),_0x2635d9=(await this[_0x271e42(0x198)]['requireSession'](_0x1cfffa))[_0x271e42(0x19b)]();if(_0x23ac84){const _0x4eaea4={'memberId':_0x2635d9,'unitId':_0x1cfffa,'content':_0x5e6bd7,'mention':_0x3d6a72,'threadId':_0x4970aa},_0x4fedbe=(await this[_0x271e42(0x1b0)][_0x271e42(0x186)](_0x271e42(0x15f)+_0x1cfffa+_0x271e42(0x1ab),{'body':_0x4eaea4}))[_0x271e42(0x191)][_0x271e42(0x1ac)];return{..._0x5be2e6,'id':_0x4fedbe[_0x271e42(0x1a5)],'dT':_0x536171(+_0x4fedbe[_0x271e42(0x196)])[_0x271e42(0x187)](_0x271e42(0x17a)),'personId':_0x4fedbe[_0x271e42(0x16a)]};}else{const _0x3b642c={'memberId':_0x2635d9,'unitId':_0x1cfffa,'content':_0x5e6bd7,'mention':_0x3d6a72},_0x40cc18=await this['_httpService'][_0x271e42(0x186)](_0x271e42(0x15f)+_0x1cfffa+_0x271e42(0x185),{'body':_0x3b642c});return X(_0x40cc18[_0x271e42(0x191)]['comment'],_0x5be2e6);}}async[_0x3389ee(0x15e)](_0x34ac78){const _0x41a0ee=_0x3389ee;var _0x2849f7,_0xf28cef;const {text:_0x3df360,unitId:_0x5dfaa0}=_0x34ac78,_0x198710=(_0xf28cef=(_0x2849f7=_0x3df360[_0x41a0ee(0x170)])==null?void 0x0:_0x2849f7[_0x41a0ee(0x19f)](_0x3a573c=>_0x3a573c[_0x41a0ee(0x155)]===_0x29a17a[_0x41a0ee(0x17e)])['map'](_0x5a9b0e=>_0x5a9b0e[_0x41a0ee(0x18a)]))!=null?_0xf28cef:[],_0x5c3cf5=JSON[_0x41a0ee(0x154)](_0x3df360),_0x4ac989=_0x34ac78[_0x41a0ee(0x180)],_0x2d4c79=_0x34ac78['id'],_0x4e5db6={'memberId':(await this['_sessionService']['requireSession'](_0x5dfaa0))[_0x41a0ee(0x19b)](),'unitId':_0x5dfaa0,'threadId':_0x4ac989,'mention':_0x198710,'content':_0x5c3cf5,'replyId':_0x2d4c79},_0x26d990=await this['_httpService'][_0x41a0ee(0x186)]('/universer-api/comment/unit/'+_0x5dfaa0+'/edit',{'body':_0x4e5db6});return!_0x26d990[_0x41a0ee(0x191)][_0x41a0ee(0x175)]||_0x26d990['body']['error'][_0x41a0ee(0x193)]===0x1;}async['resolveComment'](_0x11c828){const _0x46e8ea=_0x3389ee,{unitId:_0x3d88f4}=_0x11c828,_0x5d65a4=_0x11c828[_0x46e8ea(0x180)],_0x30b199={'memberId':this[_0x46e8ea(0x168)][_0x46e8ea(0x18f)]()[_0x46e8ea(0x14d)],'unitId':_0x3d88f4,'threadId':_0x5d65a4,'solved':_0x11c828[_0x46e8ea(0x190)]?I[_0x46e8ea(0x171)]:I[_0x46e8ea(0x182)]},_0x4db9b3=await this[_0x46e8ea(0x1b0)]['post'](_0x46e8ea(0x15f)+_0x3d88f4+_0x46e8ea(0x148),{'body':_0x30b199});return!_0x4db9b3['body'][_0x46e8ea(0x175)]||_0x4db9b3['body'][_0x46e8ea(0x175)][_0x46e8ea(0x193)]===0x1;}async[_0x3389ee(0x1a7)](_0x398a30,_0x5e32bb,_0xfcb79b,_0x6541c2){const _0x2ff071=_0x3389ee,_0x20da1f={'memberId':(await this['_sessionService']['requireSession'](_0x398a30))['getMemberID'](),'threadId':_0xfcb79b,'replyId':_0x6541c2,'unitId':_0x398a30},_0x3cdfea=await this[_0x2ff071(0x1b0)][_0x2ff071(0x186)](_0x2ff071(0x15f)+_0x398a30+'/delete',{'body':_0x20da1f});return!_0x3cdfea[_0x2ff071(0x191)]['error']||_0x3cdfea[_0x2ff071(0x191)][_0x2ff071(0x175)][_0x2ff071(0x193)]===0x1;}async['listComments'](_0x53243d,_0x2994b1,_0x477b7e){const _0x3652ff=_0x3389ee,_0x3b951d={'unitId':_0x53243d,'threadId':_0x477b7e},_0x4db5aa=await this[_0x3652ff(0x1b0)]['post'](_0x3652ff(0x15f)+_0x53243d+_0x3652ff(0x150),{'body':_0x3b951d}),_0x427c5c=_0x477b7e[_0x3652ff(0x158)](_0x3e3e73=>ee(_0x4db5aa[_0x3652ff(0x191)][_0x3652ff(0x16b)][_0x3e3e73],_0x53243d,_0x2994b1))[_0x3652ff(0x19f)](Boolean);return Object[_0x3652ff(0x166)](_0x4db5aa[_0x3652ff(0x191)][_0x3652ff(0x172)])[_0x3652ff(0x157)](_0x1d391e=>{const _0x449514=_0x3652ff;this[_0x449514(0x168)][_0x449514(0x176)](_0x1d391e);}),_0x427c5c;}[_0x3389ee(0x19c)](_0x13100c){const _0x4c16d8=_0x3389ee;return{'id':_0x13100c['id'],'threadId':_0x13100c['threadId'],'ref':_0x13100c[_0x4c16d8(0x161)]};}};S=Q([b(0x0,_0x37a0af(_0x523c25)),b(0x1,_0x37a0af(_0x263cf9)),b(0x2,_0x37a0af(_0x28a0e2))],S);function _0x2ec0(_0x4eca6f,_0x35a271){const _0x29b7fa=_0x29b7();return _0x2ec0=function(_0x2ec04a,_0x68d996){_0x2ec04a=_0x2ec04a-0x148;let _0x3700d0=_0x29b7fa[_0x2ec04a];return _0x3700d0;},_0x2ec0(_0x4eca6f,_0x35a271);}var re=Object[_0x3389ee(0x1ad)],te=(_0x3914fc,_0x562fb2,_0xa4887c,_0x1ae63c)=>{const _0x547442=_0x3389ee;for(var _0x57bb16=_0x1ae63c>0x1?void 0x0:_0x1ae63c?re(_0x562fb2,_0xa4887c):_0x562fb2,_0x116da8=_0x3914fc[_0x547442(0x189)]-0x1,_0x2bb25c;_0x116da8>=0x0;_0x116da8--)(_0x2bb25c=_0x3914fc[_0x116da8])&&(_0x57bb16=_0x2bb25c(_0x57bb16)||_0x57bb16);return _0x57bb16;},M=(_0x5e0ffb,_0x939cd7)=>(_0x471d0c,_0x2776f4)=>_0x939cd7(_0x471d0c,_0x2776f4,_0x5e0ffb);let f=class extends _0x422b10{constructor(_0x2ce5ed,_0x431672){const _0x244701=_0x3389ee;super(),this[_0x244701(0x152)]=_0x2ce5ed,this[_0x244701(0x1a9)]=_0x431672,this[_0x244701(0x194)]();}[_0x3389ee(0x194)](){const _0x24e49f=_0x3389ee;this[_0x24e49f(0x152)][_0x24e49f(0x174)]=this[_0x24e49f(0x1a9)],this['_threadCommentDataSourceService'][_0x24e49f(0x14b)]=!0x1;}};f=te([M(0x0,_0x35f50a),M(0x1,_0x37a0af(S))],f);var se=Object[_0x3389ee(0x14c)],oe=Object[_0x3389ee(0x1ad)],ne=(_0x246403,_0x4bd446,_0x5cd9e3)=>_0x4bd446 in _0x246403?se(_0x246403,_0x4bd446,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5cd9e3}):_0x246403[_0x4bd446]=_0x5cd9e3,ie=(_0x5b8141,_0x385d20,_0x510017,_0x12d7af)=>{const _0x5087f9=_0x3389ee;for(var _0x5c9b43=_0x12d7af>0x1?void 0x0:_0x12d7af?oe(_0x385d20,_0x510017):_0x385d20,_0x47d758=_0x5b8141[_0x5087f9(0x189)]-0x1,_0x531e9a;_0x47d758>=0x0;_0x47d758--)(_0x531e9a=_0x5b8141[_0x47d758])&&(_0x5c9b43=_0x531e9a(_0x5c9b43)||_0x5c9b43);return _0x5c9b43;},N=(_0x331a09,_0x4f7a08)=>(_0x5d8fa9,_0x2e8b66)=>_0x4f7a08(_0x5d8fa9,_0x2e8b66,_0x331a09),$=(_0xb9e446,_0x3431a1,_0x4d6172)=>ne(_0xb9e446,typeof _0x3431a1!=_0x3389ee(0x19e)?_0x3431a1+'':_0x3431a1,_0x4d6172);let g=class extends _0x1678df{constructor(_0x3b7c1c=O,_0x839da3,_0x77679e){const _0x68ff23=_0x3389ee;super(),this[_0x68ff23(0x18e)]=_0x3b7c1c,this['_injector']=_0x839da3,this['_configService']=_0x77679e;const {..._0x14abdc}=_0x3184fc({},O,this[_0x68ff23(0x18e)]);this[_0x68ff23(0x18c)][_0x68ff23(0x164)](z,_0x14abdc);}[_0x3389ee(0x1a1)](){const _0x4488fe=_0x3389ee;[[S],[f],[_]][_0x4488fe(0x157)](_0x35fe68=>{const _0x441bf5=_0x4488fe;this[_0x441bf5(0x177)][_0x441bf5(0x15a)](_0x35fe68);});}[_0x3389ee(0x149)](){const _0x1b5834=_0x3389ee;this[_0x1b5834(0x177)][_0x1b5834(0x192)](f),this[_0x1b5834(0x177)][_0x1b5834(0x192)](_);}};$(g,_0x3389ee(0x14e),W),$(g,_0x3389ee(0x19d),_0x19b055[_0x3389ee(0x197)]),g=ie([_0x37e8aa(_0x6aa952,_0x4df037,_0x5d0ee8),N(0x1,_0x37a0af(_0x35741c)),N(0x2,_0x3f04d9)],g);function _0x29b7(){const _0x1375d9=['getMemberID','saveCommentToSnapshot','type','symbol','filter','root','onStarting','parse','_threadCommentModel','addComment','replyId','_commentService','deleteComment','size','_threadCommentDataSource','Reply','/reply','reply','getOwnPropertyDescriptor','getUnit','replies','_httpService','/solved','onReady','_initUserSync','syncUpdateMutationToColla','defineProperty','userID','pluginName','subscribe','/list','UNRECOGNIZED','_threadCommentDataSourceService','1867628pLAXgY','stringify','rangeType','resolveComment','forEach','map','Solve','add','unitId','Delete','1288fKbpWg','updateComment','/universer-api/comment/unit/','user','ref','2540388naIGfC','1567293IjnYlx','setConfig','getComment','values','/universer-api/user/list','_userService','thread-comment-data-source.config','userId','comments','pipe','Unknown','parentId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','Solved','users','_init','dataSource','error','addUser','_injector','payload','6DmikqU','YYYY/MM/DD\x20HH:mm','20095749RHKBxh','179542yVINXa','disposeWithMe','COMMENT','Edit','threadId','133250TKNHyY','OpenOrReOpen','content','find','/add','post','format','Add','length','rangeId','personId','_configService','delete','_config','getCurrentUser','resolved','body','get','code','_initDataSource','solved','createTimestamp','UNIVER_UNKNOWN','_sessionService','commentUpdate$','4676aDitIH'];_0x29b7=function(){return _0x1375d9;};return _0x29b7();}export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x12894f=_0x3fe7;(function(_0x4241c7,_0x228c1d){const _0x48a928=_0x3fe7,_0x1f7ad7=_0x4241c7();while(!![]){try{const _0x391be9=parseInt(_0x48a928(0x1d8))/0x1+parseInt(_0x48a928(0x214))/0x2+parseInt(_0x48a928(0x1c1))/0x3+parseInt(_0x48a928(0x1ec))/0x4*(-parseInt(_0x48a928(0x1c3))/0x5)+-parseInt(_0x48a928(0x1c6))/0x6+-parseInt(_0x48a928(0x1e0))/0x7*(-parseInt(_0x48a928(0x204))/0x8)+parseInt(_0x48a928(0x1cc))/0x9*(-parseInt(_0x48a928(0x1bc))/0xa);if(_0x391be9===_0x228c1d)break;else _0x1f7ad7['push'](_0x1f7ad7['shift']());}catch(_0x37f110){_0x1f7ad7['push'](_0x1f7ad7['shift']());}}}(_0x38d5,0x4eb92));import{CommentService as _0x445f16,CollaborationSessionService as _0xd9eaa,UniverCollaborationClientPlugin as _0x2e9440}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xcc64cb}from'@univerjs-pro/license';import{dayjs as _0x296554,UserManagerService as _0x432413,Inject as _0x5eb5e8,Injector as _0x20ead0,Disposable as _0x38820b,CustomRangeType as _0x5ae08f,UniverInstanceType as _0x5951dd,DependentOn as _0x367889,IConfigService as _0x3c3855,Plugin as _0x53658c,merge as _0x44dca6}from'@univerjs/core';function _0x3fe7(_0x228d40,_0x5ee896){const _0x38d5a2=_0x38d5();return _0x3fe7=function(_0x3fe7e1,_0x1c39ef){_0x3fe7e1=_0x3fe7e1-0x1b9;let _0x234770=_0x38d5a2[_0x3fe7e1];return _0x234770;},_0x3fe7(_0x228d40,_0x5ee896);}import{UniverThreadCommentUIPlugin as _0x31077f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x146ac8,IThreadCommentDataSourceService as _0xe4ca}from'@univerjs/thread-comment';import{bufferTime as _0x10be62}from'rxjs';import{HTTPService as _0xc7007}from'@univerjs/network';function _0x38d5(){const _0x28c87d=['/solved','Edit','Unknown','userId','commentUpdate$','_configService','addUser','_config','type','onReady','556366uWqXwI','replyId','forEach','_threadCommentModel','getUser','UNRECOGNIZED','_init','body','217wFFqtx','parse','_injector','_threadCommentDataSource','find','rangeType','map','customRanges','content','Solve','ref','comment','20ZkrPWY','/edit','OpenOrReOpen','filter','saveCommentToSnapshot','payload','add','length','_sessionService','_threadCommentDataSourceService','unitId','getCurrentUser','subscribe','getOwnPropertyDescriptor','Reply','error','/universer-api/comment/unit/','delete','resolveComment','slice','updateComment','size','userID','solved','48440upNfrj','pipe','reply','_userService','stringify','_httpService','_initUserSync','resolved','createTimestamp','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','getMemberID','user','post','Delete','981750CtZqlM','Solved','threadId','_initDataSource','getUnit','6258640qgZJGf','code','requireSession','/reply','setConfig','784614vdIMSc','users','296260hyDQnx','disposeWithMe','root','1511460uqbRGv','pluginName','COMMENT','replies','Add','/delete','9GDqplP','addComment'];_0x38d5=function(){return _0x28c87d;};return _0x38d5();}const W=_0x12894f(0x20e);var I=(_0x5e6cdb=>(_0x5e6cdb[_0x5e6cdb[_0x12894f(0x1ee)]=0x0]=_0x12894f(0x1ee),_0x5e6cdb[_0x5e6cdb[_0x12894f(0x215)]=0x1]=_0x12894f(0x215),_0x5e6cdb[_0x5e6cdb[_0x12894f(0x1dd)]=-0x1]='UNRECOGNIZED',_0x5e6cdb))(I||{}),v=(_0x54f5d3=>(_0x54f5d3[_0x54f5d3[_0x12894f(0x1d0)]=0x0]=_0x12894f(0x1d0),_0x54f5d3[_0x54f5d3[_0x12894f(0x1ca)]=0x1]=_0x12894f(0x1ca),_0x54f5d3[_0x54f5d3[_0x12894f(0x1fa)]=0x2]=_0x12894f(0x1fa),_0x54f5d3[_0x54f5d3[_0x12894f(0x1cf)]=0x3]=_0x12894f(0x1cf),_0x54f5d3[_0x54f5d3[_0x12894f(0x213)]=0x4]='Delete',_0x54f5d3[_0x54f5d3[_0x12894f(0x1e9)]=0x5]='Solve',_0x54f5d3[_0x54f5d3[_0x12894f(0x1dd)]=-0x1]=_0x12894f(0x1dd),_0x54f5d3))(v||{});const y=_0x4b5003=>_0x296554(new Date(+_0x4b5003))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x27e634,_0x4f92e7)=>{const _0x4d4a6f=_0x12894f,_0x5545db=_0x27e634[_0x4d4a6f(0x20f)](_0x432413),_0x3a66b4=_0x27e634[_0x4d4a6f(0x20f)](_0xc7007);_0x4f92e7['forEach'](_0x282d3e=>{const _0x2099c8=_0x4d4a6f;_0x5545db[_0x2099c8(0x1dc)](_0x282d3e)&&_0x4f92e7[_0x2099c8(0x1fd)](_0x282d3e);}),_0x4f92e7[_0x4d4a6f(0x201)]&&(await _0x3a66b4[_0x4d4a6f(0x20f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x4f92e7]}}))[_0x4d4a6f(0x1df)]['users'][_0x4d4a6f(0x1da)](_0x591069=>{const _0x14076=_0x4d4a6f;_0x591069&&_0x5545db[_0x14076(0x1d4)](_0x591069);});};var K=Object[_0x12894f(0x1f9)],V=(_0x388a8c,_0x485b84,_0x4034a1,_0x59e21f)=>{for(var _0x2c347b=_0x59e21f>0x1?void 0x0:_0x59e21f?K(_0x485b84,_0x4034a1):_0x485b84,_0x40f523=_0x388a8c['length']-0x1,_0x210191;_0x40f523>=0x0;_0x40f523--)(_0x210191=_0x388a8c[_0x40f523])&&(_0x2c347b=_0x210191(_0x2c347b)||_0x2c347b);return _0x2c347b;},p=(_0x38683e,_0x4bb3a9)=>(_0x12710e,_0x526ee8)=>_0x4bb3a9(_0x12710e,_0x526ee8,_0x38683e);let _=class extends _0x38820b{constructor(_0x511fb8,_0x19c0b6,_0x49f806,_0x590578){const _0x54c3ff=_0x12894f;super(),this[_0x54c3ff(0x20d)]=_0x511fb8,this[_0x54c3ff(0x1db)]=_0x19c0b6,this[_0x54c3ff(0x207)]=_0x49f806,this[_0x54c3ff(0x1e2)]=_0x590578,this['_init'](),this[_0x54c3ff(0x20a)]();}[_0x12894f(0x20a)](){const _0x3a9cab=_0x12894f;this[_0x3a9cab(0x1c4)](this['_threadCommentModel']['commentUpdate$'][_0x3a9cab(0x205)](_0x10be62(0x10))[_0x3a9cab(0x1f8)](_0x4e7117=>{const _0x5a3a1d=_0x3a9cab,_0x28e2f0=new Set();_0x4e7117[_0x5a3a1d(0x1da)](_0x24e4d6=>{const _0x537130=_0x5a3a1d;switch(_0x24e4d6[_0x537130(0x1d6)]){case _0x537130(0x1f2):{const _0x236fd8=_0x24e4d6[_0x537130(0x1f1)]['personId'];_0x28e2f0[_0x537130(0x1f2)](_0x236fd8);break;}}}),B(this['_injector'],_0x28e2f0);}));}[_0x12894f(0x1de)](){const _0x2c0a8e=_0x12894f;this['disposeWithMe'](this[_0x2c0a8e(0x20d)][_0x2c0a8e(0x1d2)]['subscribe'](async _0x235e4a=>{const _0x46425a=_0x2c0a8e;var _0x5a9228,_0x402783,_0x38f22c,_0x5dfb17;const _0x356023=(_0x5a9228=this['_threadCommentModel'][_0x46425a(0x1bb)](_0x235e4a[_0x46425a(0x1f6)])[_0x46425a(0x1e4)](_0x781d6a=>_0x781d6a[_0x46425a(0x1b9)]===_0x235e4a[_0x46425a(0x1b9)]))==null?void 0x0:_0x5a9228[_0x46425a(0x1c5)];if(!_0x356023)return;const {unitId:_0x5757bd,subUnitId:_0x3c2137}=_0x356023;switch(_0x235e4a[_0x46425a(0x211)]&&this[_0x46425a(0x207)][_0x46425a(0x1d4)](_0x235e4a[_0x46425a(0x211)]),_0x235e4a[_0x46425a(0x1d6)]){case v[_0x46425a(0x1ca)]:break;case v[_0x46425a(0x1fa)]:{this[_0x46425a(0x1db)]['addComment'](_0x5757bd,_0x3c2137,{'unitId':_0x5757bd,'subUnitId':_0x3c2137,'ref':'','id':_0x235e4a[_0x46425a(0x1d9)],'dT':y(+_0x235e4a[_0x46425a(0x20c)]),'threadId':_0x235e4a['threadId'],'personId':(_0x38f22c=(_0x402783=_0x235e4a[_0x46425a(0x211)])==null?void 0x0:_0x402783['userID'])!=null?_0x38f22c:_0x235e4a[_0x46425a(0x1d1)],'text':JSON[_0x46425a(0x1e1)](_0x235e4a['content']),'parentId':_0x356023['id']});break;}case v[_0x46425a(0x213)]:{const _0x58afaa=this['_threadCommentModel']['getComment'](_0x5757bd,_0x3c2137,_0x235e4a[_0x46425a(0x1d9)]);_0x58afaa&&_0x58afaa['parentId']&&this[_0x46425a(0x1db)]['deleteComment'](_0x5757bd,_0x3c2137,_0x235e4a[_0x46425a(0x1d9)]);break;}case v['Edit']:{this[_0x46425a(0x1db)][_0x46425a(0x200)](_0x5757bd,_0x3c2137,{'commentId':_0x235e4a[_0x46425a(0x1d9)],'text':JSON[_0x46425a(0x1e1)](_0x235e4a['content'])});break;}case v[_0x46425a(0x1e9)]:{const _0x333175=(_0x5dfb17=this[_0x46425a(0x1db)][_0x46425a(0x1bb)](_0x235e4a[_0x46425a(0x1f6)])[_0x46425a(0x1e4)](_0x329a1c=>_0x329a1c['threadId']===_0x235e4a[_0x46425a(0x1b9)]))==null?void 0x0:_0x5dfb17['root'];_0x333175&&this[_0x46425a(0x1db)][_0x46425a(0x1fe)](_0x5757bd,_0x3c2137,_0x333175['id'],_0x235e4a['solved']===I[_0x46425a(0x215)]);break;}}}));}};_=V([p(0x0,_0x5eb5e8(_0x445f16)),p(0x1,_0x5eb5e8(_0x146ac8)),p(0x2,_0x5eb5e8(_0x432413)),p(0x3,_0x5eb5e8(_0x20ead0))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x12894f(0x1f9)],Q=(_0x2a5267,_0x3a5e11,_0x7a59c5,_0x1b7578)=>{for(var _0x5e1dc1=_0x1b7578>0x1?void 0x0:_0x1b7578?k(_0x3a5e11,_0x7a59c5):_0x3a5e11,_0x1d1259=_0x2a5267['length']-0x1,_0x4e53d3;_0x1d1259>=0x0;_0x1d1259--)(_0x4e53d3=_0x2a5267[_0x1d1259])&&(_0x5e1dc1=_0x4e53d3(_0x5e1dc1)||_0x5e1dc1);return _0x5e1dc1;},b=(_0x1951c9,_0x141460)=>(_0x38b238,_0x398b22)=>_0x141460(_0x38b238,_0x398b22,_0x1951c9);function X(_0x5269c2,_0x2a93ab){const _0x37c64f=_0x12894f,_0x58a858=_0x5269c2[_0x37c64f(0x1c9)][0x0];return{..._0x2a93ab,'id':_0x58a858['replyId'],'resolved':_0x5269c2[_0x37c64f(0x203)]===0x1,'dT':y(_0x58a858['createTimestamp']),'personId':_0x58a858[_0x37c64f(0x1d1)],'threadId':_0x58a858[_0x37c64f(0x1b9)]};}function ee(_0x27c05f,_0x3544af,_0x55c3ed){const _0x519424=_0x12894f;var _0x7526f8,_0x28e8c5;if(((_0x28e8c5=(_0x7526f8=_0x27c05f==null?void 0x0:_0x27c05f['replies'])==null?void 0x0:_0x7526f8[_0x519424(0x1f3)])!=null?_0x28e8c5:0x0)>0x0){const _0x1cca96=(_0x129c8a,_0x4b98b4)=>({'id':_0x129c8a[_0x519424(0x1d9)],'threadId':_0x129c8a[_0x519424(0x1b9)],'dT':y(_0x129c8a[_0x519424(0x20c)]),'personId':_0x129c8a['userId'],'resolved':_0x27c05f[_0x519424(0x203)]===I['Solved'],'unitId':_0x3544af,'subUnitId':_0x55c3ed,'text':JSON[_0x519424(0x1e1)](_0x129c8a[_0x519424(0x1e8)]),'parentId':_0x4b98b4}),_0x437622=_0x1cca96(_0x27c05f[_0x519424(0x1c9)][0x0]);return{..._0x437622,'children':_0x27c05f[_0x519424(0x1c9)][_0x519424(0x1ff)](0x1)['map'](_0xc3711b=>_0x1cca96(_0xc3711b,_0x437622['id']))};}return null;}let S=class{constructor(_0x15299a,_0x112297,_0x4adbfc){const _0x38f9a8=_0x12894f;this[_0x38f9a8(0x209)]=_0x15299a,this[_0x38f9a8(0x207)]=_0x112297,this[_0x38f9a8(0x1f4)]=_0x4adbfc;}async[_0x12894f(0x1cd)](_0x35699a){const _0x36cd44=_0x12894f;var _0x47a13e,_0x1d6034;const {parentId:_0x2194a0,unitId:_0xdc88c,text:_0x4d468d,threadId:_0x553009}=_0x35699a,_0x43e624=(_0x1d6034=(_0x47a13e=_0x4d468d[_0x36cd44(0x1e7)])==null?void 0x0:_0x47a13e[_0x36cd44(0x1ef)](_0x215166=>_0x215166[_0x36cd44(0x1e5)]===_0x5ae08f['COMMENT'])[_0x36cd44(0x1e6)](_0x3301e7=>_0x3301e7['rangeId']))!=null?_0x1d6034:[],_0x5cdeb7=JSON[_0x36cd44(0x208)](_0x4d468d),_0x19497b=(await this[_0x36cd44(0x1f4)]['requireSession'](_0xdc88c))['getMemberID']();if(_0x2194a0){const _0x253002={'memberId':_0x19497b,'unitId':_0xdc88c,'content':_0x5cdeb7,'mention':_0x43e624,'threadId':_0x553009},_0x110531=(await this[_0x36cd44(0x209)]['post'](_0x36cd44(0x1fc)+_0xdc88c+_0x36cd44(0x1bf),{'body':_0x253002}))[_0x36cd44(0x1df)][_0x36cd44(0x206)];return{..._0x35699a,'id':_0x110531['replyId'],'dT':_0x296554(+_0x110531[_0x36cd44(0x20c)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x110531[_0x36cd44(0x1d1)]};}else{const _0x495067={'memberId':_0x19497b,'unitId':_0xdc88c,'content':_0x5cdeb7,'mention':_0x43e624},_0x4d1b4e=await this[_0x36cd44(0x209)][_0x36cd44(0x212)]('/universer-api/comment/unit/'+_0xdc88c+'/add',{'body':_0x495067});return X(_0x4d1b4e[_0x36cd44(0x1df)][_0x36cd44(0x1eb)],_0x35699a);}}async[_0x12894f(0x200)](_0x4f3cc3){const _0x32795d=_0x12894f;var _0x1484a8,_0x48a30a;const {text:_0x137877,unitId:_0x58d298}=_0x4f3cc3,_0x4449a5=(_0x48a30a=(_0x1484a8=_0x137877[_0x32795d(0x1e7)])==null?void 0x0:_0x1484a8[_0x32795d(0x1ef)](_0x438e94=>_0x438e94[_0x32795d(0x1e5)]===_0x5ae08f[_0x32795d(0x1c8)])['map'](_0x55f744=>_0x55f744['rangeId']))!=null?_0x48a30a:[],_0x4d0dff=JSON[_0x32795d(0x208)](_0x137877),_0x4299a3=_0x4f3cc3['threadId'],_0x44a512=_0x4f3cc3['id'],_0x1f83ac={'memberId':(await this[_0x32795d(0x1f4)][_0x32795d(0x1be)](_0x58d298))[_0x32795d(0x210)](),'unitId':_0x58d298,'threadId':_0x4299a3,'mention':_0x4449a5,'content':_0x4d0dff,'replyId':_0x44a512},_0x240281=await this[_0x32795d(0x209)][_0x32795d(0x212)]('/universer-api/comment/unit/'+_0x58d298+_0x32795d(0x1ed),{'body':_0x1f83ac});return!_0x240281[_0x32795d(0x1df)][_0x32795d(0x1fb)]||_0x240281[_0x32795d(0x1df)][_0x32795d(0x1fb)][_0x32795d(0x1bd)]===0x1;}async['resolveComment'](_0x528a35){const _0x44eadd=_0x12894f,{unitId:_0x57b647}=_0x528a35,_0x55ba20=_0x528a35[_0x44eadd(0x1b9)],_0x5da35f={'memberId':this['_userService'][_0x44eadd(0x1f7)]()[_0x44eadd(0x202)],'unitId':_0x57b647,'threadId':_0x55ba20,'solved':_0x528a35[_0x44eadd(0x20b)]?I[_0x44eadd(0x215)]:I[_0x44eadd(0x1ee)]},_0x10c4d7=await this[_0x44eadd(0x209)]['post'](_0x44eadd(0x1fc)+_0x57b647+_0x44eadd(0x1ce),{'body':_0x5da35f});return!_0x10c4d7[_0x44eadd(0x1df)]['error']||_0x10c4d7[_0x44eadd(0x1df)][_0x44eadd(0x1fb)]['code']===0x1;}async['deleteComment'](_0x347be6,_0x135e48,_0xc659fc,_0x4bf134){const _0x30323f=_0x12894f,_0x3ba632={'memberId':(await this[_0x30323f(0x1f4)][_0x30323f(0x1be)](_0x347be6))[_0x30323f(0x210)](),'threadId':_0xc659fc,'replyId':_0x4bf134,'unitId':_0x347be6},_0x43f126=await this[_0x30323f(0x209)][_0x30323f(0x212)](_0x30323f(0x1fc)+_0x347be6+_0x30323f(0x1cb),{'body':_0x3ba632});return!_0x43f126['body'][_0x30323f(0x1fb)]||_0x43f126['body'][_0x30323f(0x1fb)]['code']===0x1;}async['listComments'](_0x5e4f1e,_0x459721,_0xd07ffc){const _0x5c431f=_0x12894f,_0x317050={'unitId':_0x5e4f1e,'threadId':_0xd07ffc},_0x4389a7=await this['_httpService'][_0x5c431f(0x212)](_0x5c431f(0x1fc)+_0x5e4f1e+'/list',{'body':_0x317050}),_0x1d9c9a=_0xd07ffc['map'](_0x12df22=>ee(_0x4389a7['body']['comments'][_0x12df22],_0x5e4f1e,_0x459721))[_0x5c431f(0x1ef)](Boolean);return Object['values'](_0x4389a7[_0x5c431f(0x1df)][_0x5c431f(0x1c2)])[_0x5c431f(0x1da)](_0x4350f8=>{this['_userService']['addUser'](_0x4350f8);}),_0x1d9c9a;}[_0x12894f(0x1f0)](_0x3a0aa2){const _0x3b5c0a=_0x12894f;return{'id':_0x3a0aa2['id'],'threadId':_0x3a0aa2['threadId'],'ref':_0x3a0aa2[_0x3b5c0a(0x1ea)]};}};S=Q([b(0x0,_0x5eb5e8(_0xc7007)),b(0x1,_0x5eb5e8(_0x432413)),b(0x2,_0x5eb5e8(_0xd9eaa))],S);var re=Object[_0x12894f(0x1f9)],te=(_0x1f6361,_0x4daec7,_0x154f16,_0x4fd746)=>{const _0x166ce0=_0x12894f;for(var _0x365aa8=_0x4fd746>0x1?void 0x0:_0x4fd746?re(_0x4daec7,_0x154f16):_0x4daec7,_0x43051c=_0x1f6361[_0x166ce0(0x1f3)]-0x1,_0x39e747;_0x43051c>=0x0;_0x43051c--)(_0x39e747=_0x1f6361[_0x43051c])&&(_0x365aa8=_0x39e747(_0x365aa8)||_0x365aa8);return _0x365aa8;},M=(_0x4d337f,_0x180353)=>(_0x4b374b,_0x523fa0)=>_0x180353(_0x4b374b,_0x523fa0,_0x4d337f);let f=class extends _0x38820b{constructor(_0x6cc9e0,_0x5bfc5f){const _0x8805fb=_0x12894f;super(),this[_0x8805fb(0x1f5)]=_0x6cc9e0,this[_0x8805fb(0x1e3)]=_0x5bfc5f,this[_0x8805fb(0x1ba)]();}[_0x12894f(0x1ba)](){const _0x11aea7=_0x12894f;this[_0x11aea7(0x1f5)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0xe4ca),M(0x1,_0x5eb5e8(S))],f);var se=Object['defineProperty'],oe=Object[_0x12894f(0x1f9)],ne=(_0x3fbdd6,_0x3e2ce9,_0x12fa4e)=>_0x3e2ce9 in _0x3fbdd6?se(_0x3fbdd6,_0x3e2ce9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x12fa4e}):_0x3fbdd6[_0x3e2ce9]=_0x12fa4e,ie=(_0x597d24,_0x145763,_0x4c7200,_0x185b46)=>{const _0x38acbb=_0x12894f;for(var _0x425dbe=_0x185b46>0x1?void 0x0:_0x185b46?oe(_0x145763,_0x4c7200):_0x145763,_0x17198f=_0x597d24[_0x38acbb(0x1f3)]-0x1,_0x20b13d;_0x17198f>=0x0;_0x17198f--)(_0x20b13d=_0x597d24[_0x17198f])&&(_0x425dbe=_0x20b13d(_0x425dbe)||_0x425dbe);return _0x425dbe;},N=(_0x5b67d6,_0x1167a8)=>(_0x180c89,_0x507609)=>_0x1167a8(_0x180c89,_0x507609,_0x5b67d6),$=(_0x434cd2,_0x243d71,_0x350a1b)=>ne(_0x434cd2,typeof _0x243d71!='symbol'?_0x243d71+'':_0x243d71,_0x350a1b);let g=class extends _0x53658c{constructor(_0x56acba=O,_0x32391f,_0x5993b8){const _0x2070d1=_0x12894f;super(),this[_0x2070d1(0x1d5)]=_0x56acba,this[_0x2070d1(0x1e2)]=_0x32391f,this['_configService']=_0x5993b8;const {..._0x5ccaad}=_0x44dca6({},O,this[_0x2070d1(0x1d5)]);this[_0x2070d1(0x1d3)][_0x2070d1(0x1c0)](z,_0x5ccaad);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x450499=>{const _0x2f2707=_0x3fe7;this['_injector'][_0x2f2707(0x1f2)](_0x450499);});}[_0x12894f(0x1d7)](){const _0x47d22e=_0x12894f;this[_0x47d22e(0x1e2)][_0x47d22e(0x20f)](f),this[_0x47d22e(0x1e2)][_0x47d22e(0x20f)](_);}};$(g,_0x12894f(0x1c7),W),$(g,_0x12894f(0x1d6),_0x5951dd['UNIVER_UNKNOWN']),g=ie([_0x367889(_0x31077f,_0x2e9440,_0xcc64cb),N(0x1,_0x5eb5e8(_0x20ead0)),N(0x2,_0x3c3855)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3389ee=_0x2ec0;(function(_0x319c66,_0x2e6133){const _0x1268d9=_0x2ec0,_0x5644cc=_0x319c66();while(!![]){try{const _0x4cbb48=parseInt(_0x1268d9(0x17c))/0x1+parseInt(_0x1268d9(0x179))/0x2*(-parseInt(_0x1268d9(0x163))/0x3)+-parseInt(_0x1268d9(0x153))/0x4+-parseInt(_0x1268d9(0x181))/0x5+parseInt(_0x1268d9(0x162))/0x6+parseInt(_0x1268d9(0x19a))/0x7*(parseInt(_0x1268d9(0x15d))/0x8)+parseInt(_0x1268d9(0x17b))/0x9;if(_0x4cbb48===_0x2e6133)break;else _0x5644cc['push'](_0x5644cc['shift']());}catch(_0x8cc092){_0x5644cc['push'](_0x5644cc['shift']());}}}(_0x29b7,0xd7743));import{CommentService as _0x43d37e,CollaborationSessionService as _0x28a0e2,UniverCollaborationClientPlugin as _0x4df037}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d0ee8}from'@univerjs-pro/license';import{dayjs as _0x536171,UserManagerService as _0x263cf9,Inject as _0x37a0af,Injector as _0x35741c,Disposable as _0x422b10,CustomRangeType as _0x29a17a,UniverInstanceType as _0x19b055,DependentOn as _0x37e8aa,IConfigService as _0x3f04d9,Plugin as _0x1678df,merge as _0x3184fc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x6aa952}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x19040a,IThreadCommentDataSourceService as _0x35f50a}from'@univerjs/thread-comment';import{bufferTime as _0x239bc1}from'rxjs';import{HTTPService as _0x523c25}from'@univerjs/network';const W=_0x3389ee(0x16f);var I=(_0x2f9989=>(_0x2f9989[_0x2f9989[_0x3389ee(0x182)]=0x0]=_0x3389ee(0x182),_0x2f9989[_0x2f9989[_0x3389ee(0x171)]=0x1]=_0x3389ee(0x171),_0x2f9989[_0x2f9989['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2f9989))(I||{}),v=(_0xdedbe4=>(_0xdedbe4[_0xdedbe4[_0x3389ee(0x16d)]=0x0]=_0x3389ee(0x16d),_0xdedbe4[_0xdedbe4['Add']=0x1]='Add',_0xdedbe4[_0xdedbe4[_0x3389ee(0x1aa)]=0x2]=_0x3389ee(0x1aa),_0xdedbe4[_0xdedbe4[_0x3389ee(0x17f)]=0x3]=_0x3389ee(0x17f),_0xdedbe4[_0xdedbe4[_0x3389ee(0x15c)]=0x4]='Delete',_0xdedbe4[_0xdedbe4[_0x3389ee(0x159)]=0x5]=_0x3389ee(0x159),_0xdedbe4[_0xdedbe4[_0x3389ee(0x151)]=-0x1]=_0x3389ee(0x151),_0xdedbe4))(v||{});const y=_0x142eb7=>_0x536171(new Date(+_0x142eb7))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x34cae1,_0x42ec47)=>{const _0x403cd1=_0x3389ee,_0x3c93fe=_0x34cae1[_0x403cd1(0x192)](_0x263cf9),_0x46e673=_0x34cae1[_0x403cd1(0x192)](_0x523c25);_0x42ec47[_0x403cd1(0x157)](_0x9fdf5a=>{const _0xae69aa=_0x403cd1;_0x3c93fe['getUser'](_0x9fdf5a)&&_0x42ec47[_0xae69aa(0x18d)](_0x9fdf5a);}),_0x42ec47[_0x403cd1(0x1a8)]&&(await _0x46e673['get'](_0x403cd1(0x167),{'params':{'userIDs':[..._0x42ec47]}}))['body'][_0x403cd1(0x172)][_0x403cd1(0x157)](_0x20189e=>{const _0x4053ec=_0x403cd1;_0x20189e&&_0x3c93fe[_0x4053ec(0x176)](_0x20189e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x4ffc0b,_0x5db76f,_0x2b23d7,_0x2640a5)=>{const _0x5b7509=_0x3389ee;for(var _0x58a2b0=_0x2640a5>0x1?void 0x0:_0x2640a5?K(_0x5db76f,_0x2b23d7):_0x5db76f,_0x22c540=_0x4ffc0b[_0x5b7509(0x189)]-0x1,_0x3e2c1b;_0x22c540>=0x0;_0x22c540--)(_0x3e2c1b=_0x4ffc0b[_0x22c540])&&(_0x58a2b0=_0x3e2c1b(_0x58a2b0)||_0x58a2b0);return _0x58a2b0;},p=(_0x2033b6,_0x3bcfe9)=>(_0x11f11d,_0x347009)=>_0x3bcfe9(_0x11f11d,_0x347009,_0x2033b6);let _=class extends _0x422b10{constructor(_0x24329f,_0x6ecb9c,_0x3dbda8,_0x32b935){const _0x5af99f=_0x3389ee;super(),this[_0x5af99f(0x1a6)]=_0x24329f,this[_0x5af99f(0x1a3)]=_0x6ecb9c,this['_userService']=_0x3dbda8,this[_0x5af99f(0x177)]=_0x32b935,this[_0x5af99f(0x173)](),this[_0x5af99f(0x14a)]();}['_initUserSync'](){const _0x91b5a4=_0x3389ee;this[_0x91b5a4(0x17d)](this[_0x91b5a4(0x1a3)][_0x91b5a4(0x199)][_0x91b5a4(0x16c)](_0x239bc1(0x10))[_0x91b5a4(0x14f)](_0x104340=>{const _0x87d5bc=_0x91b5a4,_0x4c8bf2=new Set();_0x104340['forEach'](_0x3908e8=>{const _0x35e6f2=_0x2ec0;switch(_0x3908e8[_0x35e6f2(0x19d)]){case _0x35e6f2(0x15a):{const _0x544262=_0x3908e8[_0x35e6f2(0x178)][_0x35e6f2(0x18b)];_0x4c8bf2['add'](_0x544262);break;}}}),B(this[_0x87d5bc(0x177)],_0x4c8bf2);}));}[_0x3389ee(0x173)](){const _0x320816=_0x3389ee;this[_0x320816(0x17d)](this[_0x320816(0x1a6)][_0x320816(0x199)][_0x320816(0x14f)](async _0x16e5eb=>{const _0x2465c2=_0x320816;var _0x50472c,_0x127331,_0x17f1fa,_0x39512e;const _0xaf36f5=(_0x50472c=this[_0x2465c2(0x1a3)]['getUnit'](_0x16e5eb[_0x2465c2(0x15b)])['find'](_0x127c4a=>_0x127c4a[_0x2465c2(0x180)]===_0x16e5eb['threadId']))==null?void 0x0:_0x50472c[_0x2465c2(0x1a0)];if(!_0xaf36f5)return;const {unitId:_0x294dca,subUnitId:_0x9d03ff}=_0xaf36f5;switch(_0x16e5eb[_0x2465c2(0x160)]&&this[_0x2465c2(0x168)][_0x2465c2(0x176)](_0x16e5eb[_0x2465c2(0x160)]),_0x16e5eb[_0x2465c2(0x19d)]){case v[_0x2465c2(0x188)]:break;case v[_0x2465c2(0x1aa)]:{this['_threadCommentModel'][_0x2465c2(0x1a4)](_0x294dca,_0x9d03ff,{'unitId':_0x294dca,'subUnitId':_0x9d03ff,'ref':'','id':_0x16e5eb[_0x2465c2(0x1a5)],'dT':y(+_0x16e5eb[_0x2465c2(0x196)]),'threadId':_0x16e5eb[_0x2465c2(0x180)],'personId':(_0x17f1fa=(_0x127331=_0x16e5eb['user'])==null?void 0x0:_0x127331['userID'])!=null?_0x17f1fa:_0x16e5eb[_0x2465c2(0x16a)],'text':JSON[_0x2465c2(0x1a2)](_0x16e5eb[_0x2465c2(0x183)]),'parentId':_0xaf36f5['id']});break;}case v['Delete']:{const _0x9b7ec7=this[_0x2465c2(0x1a3)][_0x2465c2(0x165)](_0x294dca,_0x9d03ff,_0x16e5eb['replyId']);_0x9b7ec7&&_0x9b7ec7[_0x2465c2(0x16e)]&&this[_0x2465c2(0x1a3)][_0x2465c2(0x1a7)](_0x294dca,_0x9d03ff,_0x16e5eb[_0x2465c2(0x1a5)]);break;}case v[_0x2465c2(0x17f)]:{this[_0x2465c2(0x1a3)][_0x2465c2(0x15e)](_0x294dca,_0x9d03ff,{'commentId':_0x16e5eb[_0x2465c2(0x1a5)],'text':JSON['parse'](_0x16e5eb[_0x2465c2(0x183)])});break;}case v['Solve']:{const _0x48d793=(_0x39512e=this[_0x2465c2(0x1a3)][_0x2465c2(0x1ae)](_0x16e5eb[_0x2465c2(0x15b)])[_0x2465c2(0x184)](_0x2cb4ef=>_0x2cb4ef[_0x2465c2(0x180)]===_0x16e5eb[_0x2465c2(0x180)]))==null?void 0x0:_0x39512e[_0x2465c2(0x1a0)];_0x48d793&&this[_0x2465c2(0x1a3)][_0x2465c2(0x156)](_0x294dca,_0x9d03ff,_0x48d793['id'],_0x16e5eb[_0x2465c2(0x195)]===I[_0x2465c2(0x171)]);break;}}}));}};_=V([p(0x0,_0x37a0af(_0x43d37e)),p(0x1,_0x37a0af(_0x19040a)),p(0x2,_0x37a0af(_0x263cf9)),p(0x3,_0x37a0af(_0x35741c))],_);const z=_0x3389ee(0x169),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x58a91f,_0x129c41,_0x370e58,_0x447083)=>{const _0x493960=_0x3389ee;for(var _0xf719a4=_0x447083>0x1?void 0x0:_0x447083?k(_0x129c41,_0x370e58):_0x129c41,_0x1ca164=_0x58a91f[_0x493960(0x189)]-0x1,_0x3abf0f;_0x1ca164>=0x0;_0x1ca164--)(_0x3abf0f=_0x58a91f[_0x1ca164])&&(_0xf719a4=_0x3abf0f(_0xf719a4)||_0xf719a4);return _0xf719a4;},b=(_0x2f5cc3,_0x4567be)=>(_0x348a12,_0x5e3f21)=>_0x4567be(_0x348a12,_0x5e3f21,_0x2f5cc3);function X(_0x309ddc,_0xc37460){const _0x1853ed=_0x3389ee,_0x536185=_0x309ddc[_0x1853ed(0x1af)][0x0];return{..._0xc37460,'id':_0x536185['replyId'],'resolved':_0x309ddc[_0x1853ed(0x195)]===0x1,'dT':y(_0x536185['createTimestamp']),'personId':_0x536185[_0x1853ed(0x16a)],'threadId':_0x536185[_0x1853ed(0x180)]};}function ee(_0x57a3b8,_0x1c2c29,_0x47cfea){const _0x5b5fe7=_0x3389ee;var _0x14ee9e,_0x2ae217;if(((_0x2ae217=(_0x14ee9e=_0x57a3b8==null?void 0x0:_0x57a3b8['replies'])==null?void 0x0:_0x14ee9e[_0x5b5fe7(0x189)])!=null?_0x2ae217:0x0)>0x0){const _0x3a7903=(_0x2a6abf,_0x5193a9)=>({'id':_0x2a6abf[_0x5b5fe7(0x1a5)],'threadId':_0x2a6abf[_0x5b5fe7(0x180)],'dT':y(_0x2a6abf[_0x5b5fe7(0x196)]),'personId':_0x2a6abf[_0x5b5fe7(0x16a)],'resolved':_0x57a3b8[_0x5b5fe7(0x195)]===I[_0x5b5fe7(0x171)],'unitId':_0x1c2c29,'subUnitId':_0x47cfea,'text':JSON['parse'](_0x2a6abf[_0x5b5fe7(0x183)]),'parentId':_0x5193a9}),_0xd1c571=_0x3a7903(_0x57a3b8['replies'][0x0]);return{..._0xd1c571,'children':_0x57a3b8[_0x5b5fe7(0x1af)]['slice'](0x1)['map'](_0x19ef5e=>_0x3a7903(_0x19ef5e,_0xd1c571['id']))};}return null;}let S=class{constructor(_0x3c76bb,_0x463803,_0x2856d0){const _0x4c7153=_0x3389ee;this['_httpService']=_0x3c76bb,this[_0x4c7153(0x168)]=_0x463803,this['_sessionService']=_0x2856d0;}async[_0x3389ee(0x1a4)](_0x5be2e6){const _0x271e42=_0x3389ee;var _0x22f1d7,_0x5c5ae6;const {parentId:_0x23ac84,unitId:_0x1cfffa,text:_0x387b41,threadId:_0x4970aa}=_0x5be2e6,_0x3d6a72=(_0x5c5ae6=(_0x22f1d7=_0x387b41[_0x271e42(0x170)])==null?void 0x0:_0x22f1d7[_0x271e42(0x19f)](_0xcc8340=>_0xcc8340[_0x271e42(0x155)]===_0x29a17a[_0x271e42(0x17e)])[_0x271e42(0x158)](_0x5764e8=>_0x5764e8[_0x271e42(0x18a)]))!=null?_0x5c5ae6:[],_0x5e6bd7=JSON[_0x271e42(0x154)](_0x387b41),_0x2635d9=(await this[_0x271e42(0x198)]['requireSession'](_0x1cfffa))[_0x271e42(0x19b)]();if(_0x23ac84){const _0x4eaea4={'memberId':_0x2635d9,'unitId':_0x1cfffa,'content':_0x5e6bd7,'mention':_0x3d6a72,'threadId':_0x4970aa},_0x4fedbe=(await this[_0x271e42(0x1b0)][_0x271e42(0x186)](_0x271e42(0x15f)+_0x1cfffa+_0x271e42(0x1ab),{'body':_0x4eaea4}))[_0x271e42(0x191)][_0x271e42(0x1ac)];return{..._0x5be2e6,'id':_0x4fedbe[_0x271e42(0x1a5)],'dT':_0x536171(+_0x4fedbe[_0x271e42(0x196)])[_0x271e42(0x187)](_0x271e42(0x17a)),'personId':_0x4fedbe[_0x271e42(0x16a)]};}else{const _0x3b642c={'memberId':_0x2635d9,'unitId':_0x1cfffa,'content':_0x5e6bd7,'mention':_0x3d6a72},_0x40cc18=await this['_httpService'][_0x271e42(0x186)](_0x271e42(0x15f)+_0x1cfffa+_0x271e42(0x185),{'body':_0x3b642c});return X(_0x40cc18[_0x271e42(0x191)]['comment'],_0x5be2e6);}}async[_0x3389ee(0x15e)](_0x34ac78){const _0x41a0ee=_0x3389ee;var _0x2849f7,_0xf28cef;const {text:_0x3df360,unitId:_0x5dfaa0}=_0x34ac78,_0x198710=(_0xf28cef=(_0x2849f7=_0x3df360[_0x41a0ee(0x170)])==null?void 0x0:_0x2849f7[_0x41a0ee(0x19f)](_0x3a573c=>_0x3a573c[_0x41a0ee(0x155)]===_0x29a17a[_0x41a0ee(0x17e)])['map'](_0x5a9b0e=>_0x5a9b0e[_0x41a0ee(0x18a)]))!=null?_0xf28cef:[],_0x5c3cf5=JSON[_0x41a0ee(0x154)](_0x3df360),_0x4ac989=_0x34ac78[_0x41a0ee(0x180)],_0x2d4c79=_0x34ac78['id'],_0x4e5db6={'memberId':(await this['_sessionService']['requireSession'](_0x5dfaa0))[_0x41a0ee(0x19b)](),'unitId':_0x5dfaa0,'threadId':_0x4ac989,'mention':_0x198710,'content':_0x5c3cf5,'replyId':_0x2d4c79},_0x26d990=await this['_httpService'][_0x41a0ee(0x186)]('/universer-api/comment/unit/'+_0x5dfaa0+'/edit',{'body':_0x4e5db6});return!_0x26d990[_0x41a0ee(0x191)][_0x41a0ee(0x175)]||_0x26d990['body']['error'][_0x41a0ee(0x193)]===0x1;}async['resolveComment'](_0x11c828){const _0x46e8ea=_0x3389ee,{unitId:_0x3d88f4}=_0x11c828,_0x5d65a4=_0x11c828[_0x46e8ea(0x180)],_0x30b199={'memberId':this[_0x46e8ea(0x168)][_0x46e8ea(0x18f)]()[_0x46e8ea(0x14d)],'unitId':_0x3d88f4,'threadId':_0x5d65a4,'solved':_0x11c828[_0x46e8ea(0x190)]?I[_0x46e8ea(0x171)]:I[_0x46e8ea(0x182)]},_0x4db9b3=await this[_0x46e8ea(0x1b0)]['post'](_0x46e8ea(0x15f)+_0x3d88f4+_0x46e8ea(0x148),{'body':_0x30b199});return!_0x4db9b3['body'][_0x46e8ea(0x175)]||_0x4db9b3['body'][_0x46e8ea(0x175)][_0x46e8ea(0x193)]===0x1;}async[_0x3389ee(0x1a7)](_0x398a30,_0x5e32bb,_0xfcb79b,_0x6541c2){const _0x2ff071=_0x3389ee,_0x20da1f={'memberId':(await this['_sessionService']['requireSession'](_0x398a30))['getMemberID'](),'threadId':_0xfcb79b,'replyId':_0x6541c2,'unitId':_0x398a30},_0x3cdfea=await this[_0x2ff071(0x1b0)][_0x2ff071(0x186)](_0x2ff071(0x15f)+_0x398a30+'/delete',{'body':_0x20da1f});return!_0x3cdfea[_0x2ff071(0x191)]['error']||_0x3cdfea[_0x2ff071(0x191)][_0x2ff071(0x175)][_0x2ff071(0x193)]===0x1;}async['listComments'](_0x53243d,_0x2994b1,_0x477b7e){const _0x3652ff=_0x3389ee,_0x3b951d={'unitId':_0x53243d,'threadId':_0x477b7e},_0x4db5aa=await this[_0x3652ff(0x1b0)]['post'](_0x3652ff(0x15f)+_0x53243d+_0x3652ff(0x150),{'body':_0x3b951d}),_0x427c5c=_0x477b7e[_0x3652ff(0x158)](_0x3e3e73=>ee(_0x4db5aa[_0x3652ff(0x191)][_0x3652ff(0x16b)][_0x3e3e73],_0x53243d,_0x2994b1))[_0x3652ff(0x19f)](Boolean);return Object[_0x3652ff(0x166)](_0x4db5aa[_0x3652ff(0x191)][_0x3652ff(0x172)])[_0x3652ff(0x157)](_0x1d391e=>{const _0x449514=_0x3652ff;this[_0x449514(0x168)][_0x449514(0x176)](_0x1d391e);}),_0x427c5c;}[_0x3389ee(0x19c)](_0x13100c){const _0x4c16d8=_0x3389ee;return{'id':_0x13100c['id'],'threadId':_0x13100c['threadId'],'ref':_0x13100c[_0x4c16d8(0x161)]};}};S=Q([b(0x0,_0x37a0af(_0x523c25)),b(0x1,_0x37a0af(_0x263cf9)),b(0x2,_0x37a0af(_0x28a0e2))],S);function _0x2ec0(_0x4eca6f,_0x35a271){const _0x29b7fa=_0x29b7();return _0x2ec0=function(_0x2ec04a,_0x68d996){_0x2ec04a=_0x2ec04a-0x148;let _0x3700d0=_0x29b7fa[_0x2ec04a];return _0x3700d0;},_0x2ec0(_0x4eca6f,_0x35a271);}var re=Object[_0x3389ee(0x1ad)],te=(_0x3914fc,_0x562fb2,_0xa4887c,_0x1ae63c)=>{const _0x547442=_0x3389ee;for(var _0x57bb16=_0x1ae63c>0x1?void 0x0:_0x1ae63c?re(_0x562fb2,_0xa4887c):_0x562fb2,_0x116da8=_0x3914fc[_0x547442(0x189)]-0x1,_0x2bb25c;_0x116da8>=0x0;_0x116da8--)(_0x2bb25c=_0x3914fc[_0x116da8])&&(_0x57bb16=_0x2bb25c(_0x57bb16)||_0x57bb16);return _0x57bb16;},M=(_0x5e0ffb,_0x939cd7)=>(_0x471d0c,_0x2776f4)=>_0x939cd7(_0x471d0c,_0x2776f4,_0x5e0ffb);let f=class extends _0x422b10{constructor(_0x2ce5ed,_0x431672){const _0x244701=_0x3389ee;super(),this[_0x244701(0x152)]=_0x2ce5ed,this[_0x244701(0x1a9)]=_0x431672,this[_0x244701(0x194)]();}[_0x3389ee(0x194)](){const _0x24e49f=_0x3389ee;this[_0x24e49f(0x152)][_0x24e49f(0x174)]=this[_0x24e49f(0x1a9)],this['_threadCommentDataSourceService'][_0x24e49f(0x14b)]=!0x1;}};f=te([M(0x0,_0x35f50a),M(0x1,_0x37a0af(S))],f);var se=Object[_0x3389ee(0x14c)],oe=Object[_0x3389ee(0x1ad)],ne=(_0x246403,_0x4bd446,_0x5cd9e3)=>_0x4bd446 in _0x246403?se(_0x246403,_0x4bd446,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5cd9e3}):_0x246403[_0x4bd446]=_0x5cd9e3,ie=(_0x5b8141,_0x385d20,_0x510017,_0x12d7af)=>{const _0x5087f9=_0x3389ee;for(var _0x5c9b43=_0x12d7af>0x1?void 0x0:_0x12d7af?oe(_0x385d20,_0x510017):_0x385d20,_0x47d758=_0x5b8141[_0x5087f9(0x189)]-0x1,_0x531e9a;_0x47d758>=0x0;_0x47d758--)(_0x531e9a=_0x5b8141[_0x47d758])&&(_0x5c9b43=_0x531e9a(_0x5c9b43)||_0x5c9b43);return _0x5c9b43;},N=(_0x331a09,_0x4f7a08)=>(_0x5d8fa9,_0x2e8b66)=>_0x4f7a08(_0x5d8fa9,_0x2e8b66,_0x331a09),$=(_0xb9e446,_0x3431a1,_0x4d6172)=>ne(_0xb9e446,typeof _0x3431a1!=_0x3389ee(0x19e)?_0x3431a1+'':_0x3431a1,_0x4d6172);let g=class extends _0x1678df{constructor(_0x3b7c1c=O,_0x839da3,_0x77679e){const _0x68ff23=_0x3389ee;super(),this[_0x68ff23(0x18e)]=_0x3b7c1c,this['_injector']=_0x839da3,this['_configService']=_0x77679e;const {..._0x14abdc}=_0x3184fc({},O,this[_0x68ff23(0x18e)]);this[_0x68ff23(0x18c)][_0x68ff23(0x164)](z,_0x14abdc);}[_0x3389ee(0x1a1)](){const _0x4488fe=_0x3389ee;[[S],[f],[_]][_0x4488fe(0x157)](_0x35fe68=>{const _0x441bf5=_0x4488fe;this[_0x441bf5(0x177)][_0x441bf5(0x15a)](_0x35fe68);});}[_0x3389ee(0x149)](){const _0x1b5834=_0x3389ee;this[_0x1b5834(0x177)][_0x1b5834(0x192)](f),this[_0x1b5834(0x177)][_0x1b5834(0x192)](_);}};$(g,_0x3389ee(0x14e),W),$(g,_0x3389ee(0x19d),_0x19b055[_0x3389ee(0x197)]),g=ie([_0x37e8aa(_0x6aa952,_0x4df037,_0x5d0ee8),N(0x1,_0x37a0af(_0x35741c)),N(0x2,_0x3f04d9)],g);function _0x29b7(){const _0x1375d9=['getMemberID','saveCommentToSnapshot','type','symbol','filter','root','onStarting','parse','_threadCommentModel','addComment','replyId','_commentService','deleteComment','size','_threadCommentDataSource','Reply','/reply','reply','getOwnPropertyDescriptor','getUnit','replies','_httpService','/solved','onReady','_initUserSync','syncUpdateMutationToColla','defineProperty','userID','pluginName','subscribe','/list','UNRECOGNIZED','_threadCommentDataSourceService','1867628pLAXgY','stringify','rangeType','resolveComment','forEach','map','Solve','add','unitId','Delete','1288fKbpWg','updateComment','/universer-api/comment/unit/','user','ref','2540388naIGfC','1567293IjnYlx','setConfig','getComment','values','/universer-api/user/list','_userService','thread-comment-data-source.config','userId','comments','pipe','Unknown','parentId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','Solved','users','_init','dataSource','error','addUser','_injector','payload','6DmikqU','YYYY/MM/DD\x20HH:mm','20095749RHKBxh','179542yVINXa','disposeWithMe','COMMENT','Edit','threadId','133250TKNHyY','OpenOrReOpen','content','find','/add','post','format','Add','length','rangeId','personId','_configService','delete','_config','getCurrentUser','resolved','body','get','code','_initDataSource','solved','createTimestamp','UNIVER_UNKNOWN','_sessionService','commentUpdate$','4676aDitIH'];_0x29b7=function(){return _0x1375d9;};return _0x29b7();}export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0xebfc(){const _0x5b8e7c=['replyId','onReady','_initUserSync','resolved','UniverProThreadCommentDatasource','Edit','DependentOn','98166ZPjHjD','threadId','/delete','ThreadCommentModel','@univerjs/thread-comment-ui','OpenOrReOpen','users','_initDataSource','_sessionService','30wLBJQG','syncUpdateMutationToColla','_threadCommentDataSource','function','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','values','IThreadCommentDataSourceService','amd','userID','user','YYYY/MM/DD\x20HH:mm','resolveComment','pluginName','comments','COMMENT','setConfig','161541zaMyYw','dataSource','Solved','1600448aiJMBT','error','code','forEach','Module','get','slice','rangeId','_commentService','add','merge','Solve','/edit','personId','reply','content','@univerjs/network','updateComment','parse','Reply','CommentService','createTimestamp','CollaborationSessionService','@univerjs/thread-comment','Inject','delete','body','@univerjs-pro/license','_init','/universer-api/comment/unit/','defineProperty','Plugin','map','@univerjs/core','_threadCommentModel','UniverProLicense','UniverThreadComment','ref','UniverThreadCommentUIPlugin','UniverLicensePlugin','CustomRangeType','getCurrentUser','UserManagerService','rangeType','toStringTag','format','getMemberID','/reply','solved','296935KUOtMu','size','replies','parentId','stringify','dayjs','_userService','_configService','HTTPService','_httpService','unitId','Injector','rxjs','object','customRanges','UniverProCollaborationClient','130298FQZCKD','/add','@univerjs-pro/collaboration-client','getUser','thread-comment-data-source.config','IConfigService','pipe','comment','filter','_injector','userId','requireSession','Delete','find','Unknown','Disposable','getOwnPropertyDescriptor','_threadCommentDataSourceService','_config','UniverCollaborationClientPlugin','2037116kfOtVt','90tqNyYe','disposeWithMe','UniverThreadCommentDataSourcePlugin','onStarting','type','6rQGCqc','length','getUnit','/universer-api/user/list','UNRECOGNIZED','commentUpdate$','deleteComment','post','symbol','UniverNetwork','addComment','addUser','4449672yujJah'];_0xebfc=function(){return _0x5b8e7c;};return _0xebfc();}function _0x496a(_0x3a3347,_0xc008cc){const _0xebfc61=_0xebfc();return _0x496a=function(_0x496a30,_0x34fab1){_0x496a30=_0x496a30-0x1f4;let _0x4aef6c=_0xebfc61[_0x496a30];return _0x4aef6c;},_0x496a(_0x3a3347,_0xc008cc);}(function(_0x3708f5,_0x5bccda){const _0x52a883=_0x496a,_0x21df1f=_0x3708f5();while(!![]){try{const _0x46949b=-parseInt(_0x52a883(0x1fb))/0x1+parseInt(_0x52a883(0x26c))/0x2+parseInt(_0x52a883(0x272))/0x3*(-parseInt(_0x52a883(0x217))/0x4)+-parseInt(_0x52a883(0x248))/0x5*(parseInt(_0x52a883(0x204))/0x6)+parseInt(_0x52a883(0x258))/0x7+parseInt(_0x52a883(0x27e))/0x8+-parseInt(_0x52a883(0x214))/0x9*(-parseInt(_0x52a883(0x26d))/0xa);if(_0x46949b===_0x5bccda)break;else _0x21df1f['push'](_0x21df1f['shift']());}catch(_0x580356){_0x21df1f['push'](_0x21df1f['shift']());}}}(_0xebfc,0x889ed),function(_0x5ae38d,_0xd9c6ff){const _0xf71f6e=_0x496a;typeof exports==_0xf71f6e(0x255)&&typeof module<'u'?_0xd9c6ff(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==_0xf71f6e(0x207)&&define[_0xf71f6e(0x20b)]?define(['exports',_0xf71f6e(0x25a),_0xf71f6e(0x232),_0xf71f6e(0x238),_0xf71f6e(0x1ff),_0xf71f6e(0x22e),_0xf71f6e(0x254),_0xf71f6e(0x227)],_0xd9c6ff):(_0x5ae38d=typeof globalThis<'u'?globalThis:_0x5ae38d||self,_0xd9c6ff(_0x5ae38d[_0xf71f6e(0x1f8)]={},_0x5ae38d[_0xf71f6e(0x257)],_0x5ae38d[_0xf71f6e(0x23a)],_0x5ae38d['UniverCore'],_0x5ae38d['UniverThreadCommentUi'],_0x5ae38d[_0xf71f6e(0x23b)],_0x5ae38d['rxjs'],_0x5ae38d[_0xf71f6e(0x27b)]));}(this,function(_0x53a955,_0x3f1856,_0x22e19a,_0x240e31,_0x120f26,_0x42d5cb,_0x36f6af,_0x4adf4d){'use strict';const _0x371856=_0x496a;const _0x50a5ea=_0x371856(0x208);var _0x4c8ba8=(_0x193ccd=>(_0x193ccd[_0x193ccd[_0x371856(0x200)]=0x0]=_0x371856(0x200),_0x193ccd[_0x193ccd[_0x371856(0x216)]=0x1]=_0x371856(0x216),_0x193ccd[_0x193ccd[_0x371856(0x276)]=-0x1]=_0x371856(0x276),_0x193ccd))(_0x4c8ba8||{}),_0x4a1df8=(_0x252e12=>(_0x252e12[_0x252e12[_0x371856(0x266)]=0x0]=_0x371856(0x266),_0x252e12[_0x252e12['Add']=0x1]='Add',_0x252e12[_0x252e12[_0x371856(0x22a)]=0x2]=_0x371856(0x22a),_0x252e12[_0x252e12[_0x371856(0x1f9)]=0x3]=_0x371856(0x1f9),_0x252e12[_0x252e12[_0x371856(0x264)]=0x4]=_0x371856(0x264),_0x252e12[_0x252e12['Solve']=0x5]='Solve',_0x252e12[_0x252e12[_0x371856(0x276)]=-0x1]='UNRECOGNIZED',_0x252e12))(_0x4a1df8||{});const _0x3ea797=_0x596ef5=>_0x240e31[_0x371856(0x24d)](new Date(+_0x596ef5))[_0x371856(0x244)](_0x371856(0x20e)),_0x26d7b0=async(_0x35a04b,_0x5aa5a6)=>{const _0x311aef=_0x371856,_0x171a4a=_0x35a04b[_0x311aef(0x21c)](_0x240e31[_0x311aef(0x241)]),_0x2fe50f=_0x35a04b['get'](_0x4adf4d[_0x311aef(0x250)]);_0x5aa5a6[_0x311aef(0x21a)](_0x1e467b=>{const _0x35cd88=_0x311aef;_0x171a4a[_0x35cd88(0x25b)](_0x1e467b)&&_0x5aa5a6[_0x35cd88(0x230)](_0x1e467b);}),_0x5aa5a6[_0x311aef(0x249)]&&(await _0x2fe50f[_0x311aef(0x21c)](_0x311aef(0x275),{'params':{'userIDs':[..._0x5aa5a6]}}))['body'][_0x311aef(0x201)][_0x311aef(0x21a)](_0x16521a=>{_0x16521a&&_0x171a4a['addUser'](_0x16521a);});};var _0x3b2885=Object[_0x371856(0x268)],_0xe1cba1=(_0x400360,_0xf8ebe1,_0x51bdb1,_0x5e55d0)=>{const _0x38c506=_0x371856;for(var _0x128be9=_0x5e55d0>0x1?void 0x0:_0x5e55d0?_0x3b2885(_0xf8ebe1,_0x51bdb1):_0xf8ebe1,_0x357a70=_0x400360[_0x38c506(0x273)]-0x1,_0x3c0941;_0x357a70>=0x0;_0x357a70--)(_0x3c0941=_0x400360[_0x357a70])&&(_0x128be9=_0x3c0941(_0x128be9)||_0x128be9);return _0x128be9;},_0x2559b8=(_0x26fc54,_0x1ca2e3)=>(_0x5595a7,_0x40a3a3)=>_0x1ca2e3(_0x5595a7,_0x40a3a3,_0x26fc54);let _0x4a6f75=class extends _0x240e31[_0x371856(0x267)]{constructor(_0x5c30e2,_0x5e25cf,_0x46ca46,_0x1b11a0){const _0x3aba64=_0x371856;super(),this[_0x3aba64(0x21f)]=_0x5c30e2,this['_threadCommentModel']=_0x5e25cf,this['_userService']=_0x46ca46,this[_0x3aba64(0x261)]=_0x1b11a0,this[_0x3aba64(0x233)](),this['_initUserSync']();}[_0x371856(0x1f6)](){const _0x2da5f9=_0x371856;this[_0x2da5f9(0x26e)](this[_0x2da5f9(0x239)][_0x2da5f9(0x277)][_0x2da5f9(0x25e)](_0x36f6af['bufferTime'](0x10))['subscribe'](_0x579087=>{const _0x1e57a6=_0x2da5f9,_0x3ecd05=new Set();_0x579087[_0x1e57a6(0x21a)](_0x40ae21=>{const _0x4c2bc6=_0x1e57a6;switch(_0x40ae21[_0x4c2bc6(0x271)]){case'add':{const _0x5efc9c=_0x40ae21['payload'][_0x4c2bc6(0x224)];_0x3ecd05[_0x4c2bc6(0x220)](_0x5efc9c);break;}}}),_0x26d7b0(this['_injector'],_0x3ecd05);}));}[_0x371856(0x233)](){const _0x1d8b0a=_0x371856;this[_0x1d8b0a(0x26e)](this[_0x1d8b0a(0x21f)]['commentUpdate$']['subscribe'](async _0x18650b=>{const _0x3bcb63=_0x1d8b0a;var _0x3501fb,_0x5b287d,_0x358f21,_0x4bd757;const _0x555271=(_0x3501fb=this[_0x3bcb63(0x239)][_0x3bcb63(0x274)](_0x18650b[_0x3bcb63(0x252)])[_0x3bcb63(0x265)](_0x409c81=>_0x409c81[_0x3bcb63(0x1fc)]===_0x18650b[_0x3bcb63(0x1fc)]))==null?void 0x0:_0x3501fb['root'];if(!_0x555271)return;const {unitId:_0x36423d,subUnitId:_0x433a90}=_0x555271;switch(_0x18650b[_0x3bcb63(0x20d)]&&this[_0x3bcb63(0x24e)]['addUser'](_0x18650b[_0x3bcb63(0x20d)]),_0x18650b[_0x3bcb63(0x271)]){case _0x4a1df8['Add']:break;case _0x4a1df8[_0x3bcb63(0x22a)]:{this[_0x3bcb63(0x239)]['addComment'](_0x36423d,_0x433a90,{'unitId':_0x36423d,'subUnitId':_0x433a90,'ref':'','id':_0x18650b[_0x3bcb63(0x1f4)],'dT':_0x3ea797(+_0x18650b[_0x3bcb63(0x22c)]),'threadId':_0x18650b[_0x3bcb63(0x1fc)],'personId':(_0x358f21=(_0x5b287d=_0x18650b['user'])==null?void 0x0:_0x5b287d[_0x3bcb63(0x20c)])!=null?_0x358f21:_0x18650b['userId'],'text':JSON[_0x3bcb63(0x229)](_0x18650b[_0x3bcb63(0x226)]),'parentId':_0x555271['id']});break;}case _0x4a1df8['Delete']:{const _0x4552da=this[_0x3bcb63(0x239)]['getComment'](_0x36423d,_0x433a90,_0x18650b[_0x3bcb63(0x1f4)]);_0x4552da&&_0x4552da[_0x3bcb63(0x24b)]&&this[_0x3bcb63(0x239)][_0x3bcb63(0x278)](_0x36423d,_0x433a90,_0x18650b[_0x3bcb63(0x1f4)]);break;}case _0x4a1df8[_0x3bcb63(0x1f9)]:{this['_threadCommentModel'][_0x3bcb63(0x228)](_0x36423d,_0x433a90,{'commentId':_0x18650b[_0x3bcb63(0x1f4)],'text':JSON[_0x3bcb63(0x229)](_0x18650b[_0x3bcb63(0x226)])});break;}case _0x4a1df8[_0x3bcb63(0x222)]:{const _0x34f653=(_0x4bd757=this[_0x3bcb63(0x239)]['getUnit'](_0x18650b[_0x3bcb63(0x252)])[_0x3bcb63(0x265)](_0x73c5c5=>_0x73c5c5['threadId']===_0x18650b['threadId']))==null?void 0x0:_0x4bd757['root'];_0x34f653&&this['_threadCommentModel'][_0x3bcb63(0x20f)](_0x36423d,_0x433a90,_0x34f653['id'],_0x18650b[_0x3bcb63(0x247)]===_0x4c8ba8[_0x3bcb63(0x216)]);break;}}}));}};_0x4a6f75=_0xe1cba1([_0x2559b8(0x0,_0x240e31[_0x371856(0x22f)](_0x3f1856[_0x371856(0x22b)])),_0x2559b8(0x1,_0x240e31[_0x371856(0x22f)](_0x42d5cb[_0x371856(0x1fe)])),_0x2559b8(0x2,_0x240e31[_0x371856(0x22f)](_0x240e31['UserManagerService'])),_0x2559b8(0x3,_0x240e31[_0x371856(0x22f)](_0x240e31[_0x371856(0x253)]))],_0x4a6f75);const _0x328925=_0x371856(0x25c),_0x493836={};var _0x1933a6=Object[_0x371856(0x268)],_0x1fe353=(_0x2a502e,_0xffd8c4,_0x51c06d,_0x4a33e6)=>{const _0x319e9e=_0x371856;for(var _0x499444=_0x4a33e6>0x1?void 0x0:_0x4a33e6?_0x1933a6(_0xffd8c4,_0x51c06d):_0xffd8c4,_0xe9237e=_0x2a502e[_0x319e9e(0x273)]-0x1,_0x15da6a;_0xe9237e>=0x0;_0xe9237e--)(_0x15da6a=_0x2a502e[_0xe9237e])&&(_0x499444=_0x15da6a(_0x499444)||_0x499444);return _0x499444;},_0x4ee0c9=(_0x1225e8,_0x201026)=>(_0x360ace,_0x3864aa)=>_0x201026(_0x360ace,_0x3864aa,_0x1225e8);function _0x359072(_0x5db519,_0x2b2654){const _0x532cfe=_0x371856,_0x146d6f=_0x5db519['replies'][0x0];return{..._0x2b2654,'id':_0x146d6f[_0x532cfe(0x1f4)],'resolved':_0x5db519[_0x532cfe(0x247)]===0x1,'dT':_0x3ea797(_0x146d6f[_0x532cfe(0x22c)]),'personId':_0x146d6f[_0x532cfe(0x262)],'threadId':_0x146d6f[_0x532cfe(0x1fc)]};}function _0x128e6c(_0x40e901,_0x4bb4cc,_0xff1fca){const _0xaca5a7=_0x371856;var _0xbdb0b3,_0x20181b;if(((_0x20181b=(_0xbdb0b3=_0x40e901==null?void 0x0:_0x40e901[_0xaca5a7(0x24a)])==null?void 0x0:_0xbdb0b3[_0xaca5a7(0x273)])!=null?_0x20181b:0x0)>0x0){const _0x58b6c1=(_0xbd352,_0x208177)=>({'id':_0xbd352[_0xaca5a7(0x1f4)],'threadId':_0xbd352['threadId'],'dT':_0x3ea797(_0xbd352[_0xaca5a7(0x22c)]),'personId':_0xbd352[_0xaca5a7(0x262)],'resolved':_0x40e901['solved']===_0x4c8ba8[_0xaca5a7(0x216)],'unitId':_0x4bb4cc,'subUnitId':_0xff1fca,'text':JSON[_0xaca5a7(0x229)](_0xbd352[_0xaca5a7(0x226)]),'parentId':_0x208177}),_0x317f2d=_0x58b6c1(_0x40e901[_0xaca5a7(0x24a)][0x0]);return{..._0x317f2d,'children':_0x40e901[_0xaca5a7(0x24a)][_0xaca5a7(0x21d)](0x1)[_0xaca5a7(0x237)](_0x500c3c=>_0x58b6c1(_0x500c3c,_0x317f2d['id']))};}return null;}let _0x93fb38=class{constructor(_0x111fca,_0x44fb23,_0x5419d0){const _0x329960=_0x371856;this[_0x329960(0x251)]=_0x111fca,this[_0x329960(0x24e)]=_0x44fb23,this[_0x329960(0x203)]=_0x5419d0;}async[_0x371856(0x27c)](_0x18a15d){const _0x1b8fc3=_0x371856;var _0x10bdb2,_0x17341e;const {parentId:_0x51419e,unitId:_0x36a0aa,text:_0x32e09d,threadId:_0x73a2f1}=_0x18a15d,_0x5b7d84=(_0x17341e=(_0x10bdb2=_0x32e09d[_0x1b8fc3(0x256)])==null?void 0x0:_0x10bdb2[_0x1b8fc3(0x260)](_0x3a4a5c=>_0x3a4a5c[_0x1b8fc3(0x242)]===_0x240e31[_0x1b8fc3(0x23f)][_0x1b8fc3(0x212)])[_0x1b8fc3(0x237)](_0xec682f=>_0xec682f[_0x1b8fc3(0x21e)]))!=null?_0x17341e:[],_0x8a1aa8=JSON[_0x1b8fc3(0x24c)](_0x32e09d),_0x14db45=(await this['_sessionService'][_0x1b8fc3(0x263)](_0x36a0aa))[_0x1b8fc3(0x245)]();if(_0x51419e){const _0xb645ae={'memberId':_0x14db45,'unitId':_0x36a0aa,'content':_0x8a1aa8,'mention':_0x5b7d84,'threadId':_0x73a2f1},_0x5552ae=(await this[_0x1b8fc3(0x251)][_0x1b8fc3(0x279)](_0x1b8fc3(0x234)+_0x36a0aa+_0x1b8fc3(0x246),{'body':_0xb645ae}))[_0x1b8fc3(0x231)][_0x1b8fc3(0x225)];return{..._0x18a15d,'id':_0x5552ae[_0x1b8fc3(0x1f4)],'dT':_0x240e31['dayjs'](+_0x5552ae['createTimestamp'])[_0x1b8fc3(0x244)](_0x1b8fc3(0x20e)),'personId':_0x5552ae[_0x1b8fc3(0x262)]};}else{const _0x141ee0={'memberId':_0x14db45,'unitId':_0x36a0aa,'content':_0x8a1aa8,'mention':_0x5b7d84},_0x4aac1c=await this[_0x1b8fc3(0x251)][_0x1b8fc3(0x279)](_0x1b8fc3(0x234)+_0x36a0aa+_0x1b8fc3(0x259),{'body':_0x141ee0});return _0x359072(_0x4aac1c[_0x1b8fc3(0x231)][_0x1b8fc3(0x25f)],_0x18a15d);}}async[_0x371856(0x228)](_0xbf2fb4){const _0x481f8f=_0x371856;var _0x87d461,_0x53a495;const {text:_0x471a69,unitId:_0x4469b5}=_0xbf2fb4,_0x414a52=(_0x53a495=(_0x87d461=_0x471a69['customRanges'])==null?void 0x0:_0x87d461['filter'](_0x1907c9=>_0x1907c9[_0x481f8f(0x242)]===_0x240e31[_0x481f8f(0x23f)]['COMMENT'])[_0x481f8f(0x237)](_0x21eaa2=>_0x21eaa2[_0x481f8f(0x21e)]))!=null?_0x53a495:[],_0x454fd9=JSON[_0x481f8f(0x24c)](_0x471a69),_0x3a5e43=_0xbf2fb4[_0x481f8f(0x1fc)],_0x17970e=_0xbf2fb4['id'],_0x443c3a={'memberId':(await this[_0x481f8f(0x203)][_0x481f8f(0x263)](_0x4469b5))['getMemberID'](),'unitId':_0x4469b5,'threadId':_0x3a5e43,'mention':_0x414a52,'content':_0x454fd9,'replyId':_0x17970e},_0x190624=await this[_0x481f8f(0x251)][_0x481f8f(0x279)](_0x481f8f(0x234)+_0x4469b5+_0x481f8f(0x223),{'body':_0x443c3a});return!_0x190624[_0x481f8f(0x231)]['error']||_0x190624[_0x481f8f(0x231)][_0x481f8f(0x218)][_0x481f8f(0x219)]===0x1;}async[_0x371856(0x20f)](_0x1dd4f1){const _0x5f485e=_0x371856,{unitId:_0x21105c}=_0x1dd4f1,_0x261704=_0x1dd4f1[_0x5f485e(0x1fc)],_0x11e216={'memberId':this[_0x5f485e(0x24e)][_0x5f485e(0x240)]()[_0x5f485e(0x20c)],'unitId':_0x21105c,'threadId':_0x261704,'solved':_0x1dd4f1[_0x5f485e(0x1f7)]?_0x4c8ba8[_0x5f485e(0x216)]:_0x4c8ba8['OpenOrReOpen']},_0x22d660=await this['_httpService'][_0x5f485e(0x279)](_0x5f485e(0x234)+_0x21105c+'/solved',{'body':_0x11e216});return!_0x22d660[_0x5f485e(0x231)][_0x5f485e(0x218)]||_0x22d660['body'][_0x5f485e(0x218)][_0x5f485e(0x219)]===0x1;}async[_0x371856(0x278)](_0x4c5eb0,_0x52b854,_0x1f9e7d,_0x1e64ea){const _0x13ef34=_0x371856,_0x2e41b3={'memberId':(await this[_0x13ef34(0x203)]['requireSession'](_0x4c5eb0))[_0x13ef34(0x245)](),'threadId':_0x1f9e7d,'replyId':_0x1e64ea,'unitId':_0x4c5eb0},_0x1dd8d2=await this[_0x13ef34(0x251)][_0x13ef34(0x279)](_0x13ef34(0x234)+_0x4c5eb0+_0x13ef34(0x1fd),{'body':_0x2e41b3});return!_0x1dd8d2[_0x13ef34(0x231)]['error']||_0x1dd8d2[_0x13ef34(0x231)][_0x13ef34(0x218)][_0x13ef34(0x219)]===0x1;}async['listComments'](_0x4b27ab,_0x311038,_0xf3304f){const _0x570188=_0x371856,_0x5aeb9d={'unitId':_0x4b27ab,'threadId':_0xf3304f},_0x32d1f2=await this[_0x570188(0x251)]['post'](_0x570188(0x234)+_0x4b27ab+'/list',{'body':_0x5aeb9d}),_0x3993d9=_0xf3304f[_0x570188(0x237)](_0x160f02=>_0x128e6c(_0x32d1f2['body'][_0x570188(0x211)][_0x160f02],_0x4b27ab,_0x311038))[_0x570188(0x260)](Boolean);return Object[_0x570188(0x209)](_0x32d1f2[_0x570188(0x231)][_0x570188(0x201)])[_0x570188(0x21a)](_0x527938=>{const _0x3dc3ca=_0x570188;this[_0x3dc3ca(0x24e)][_0x3dc3ca(0x27d)](_0x527938);}),_0x3993d9;}['saveCommentToSnapshot'](_0x36da84){const _0x307fd9=_0x371856;return{'id':_0x36da84['id'],'threadId':_0x36da84['threadId'],'ref':_0x36da84[_0x307fd9(0x23c)]};}};_0x93fb38=_0x1fe353([_0x4ee0c9(0x0,_0x240e31[_0x371856(0x22f)](_0x4adf4d['HTTPService'])),_0x4ee0c9(0x1,_0x240e31[_0x371856(0x22f)](_0x240e31[_0x371856(0x241)])),_0x4ee0c9(0x2,_0x240e31[_0x371856(0x22f)](_0x3f1856[_0x371856(0x22d)]))],_0x93fb38);var _0xce737a=Object[_0x371856(0x268)],_0x2a4654=(_0x3c5d28,_0x15e574,_0x1fb832,_0x50c4d4)=>{for(var _0x14ea86=_0x50c4d4>0x1?void 0x0:_0x50c4d4?_0xce737a(_0x15e574,_0x1fb832):_0x15e574,_0x19a94e=_0x3c5d28['length']-0x1,_0x1dd077;_0x19a94e>=0x0;_0x19a94e--)(_0x1dd077=_0x3c5d28[_0x19a94e])&&(_0x14ea86=_0x1dd077(_0x14ea86)||_0x14ea86);return _0x14ea86;},_0x552a90=(_0x2ee940,_0x71e6de)=>(_0x51a751,_0x5e556f)=>_0x71e6de(_0x51a751,_0x5e556f,_0x2ee940);let _0x2ca56a=class extends _0x240e31[_0x371856(0x267)]{constructor(_0x2ea374,_0xd9ddcb){const _0x2a2889=_0x371856;super(),this[_0x2a2889(0x269)]=_0x2ea374,this['_threadCommentDataSource']=_0xd9ddcb,this['_initDataSource']();}[_0x371856(0x202)](){const _0x2ee10c=_0x371856;this['_threadCommentDataSourceService'][_0x2ee10c(0x215)]=this[_0x2ee10c(0x206)],this[_0x2ee10c(0x269)][_0x2ee10c(0x205)]=!0x1;}};_0x2ca56a=_0x2a4654([_0x552a90(0x0,_0x42d5cb[_0x371856(0x20a)]),_0x552a90(0x1,_0x240e31[_0x371856(0x22f)](_0x93fb38))],_0x2ca56a);var _0x504c0f=Object['defineProperty'],_0x46ff6e=Object[_0x371856(0x268)],_0x3c1328=(_0x54e746,_0x1ed308,_0x5dfcad)=>_0x1ed308 in _0x54e746?_0x504c0f(_0x54e746,_0x1ed308,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5dfcad}):_0x54e746[_0x1ed308]=_0x5dfcad,_0x11cb95=(_0x296433,_0x2d64d8,_0x18d8ed,_0x5b44da)=>{const _0x5a9f5a=_0x371856;for(var _0x300292=_0x5b44da>0x1?void 0x0:_0x5b44da?_0x46ff6e(_0x2d64d8,_0x18d8ed):_0x2d64d8,_0x1a08eb=_0x296433[_0x5a9f5a(0x273)]-0x1,_0x1c3524;_0x1a08eb>=0x0;_0x1a08eb--)(_0x1c3524=_0x296433[_0x1a08eb])&&(_0x300292=_0x1c3524(_0x300292)||_0x300292);return _0x300292;},_0x1eef18=(_0x19fba4,_0x27aa46)=>(_0x7acfd1,_0x4eeea6)=>_0x27aa46(_0x7acfd1,_0x4eeea6,_0x19fba4),_0xe9a4a9=(_0x3126aa,_0x4e0129,_0xd38648)=>_0x3c1328(_0x3126aa,typeof _0x4e0129!=_0x371856(0x27a)?_0x4e0129+'':_0x4e0129,_0xd38648);_0x53a955[_0x371856(0x26f)]=class extends _0x240e31[_0x371856(0x236)]{constructor(_0x326227=_0x493836,_0x320b63,_0x53cba3){const _0x484fa3=_0x371856;super(),this['_config']=_0x326227,this[_0x484fa3(0x261)]=_0x320b63,this[_0x484fa3(0x24f)]=_0x53cba3;const {..._0x5bfa21}=_0x240e31[_0x484fa3(0x221)]({},_0x493836,this[_0x484fa3(0x26a)]);this[_0x484fa3(0x24f)][_0x484fa3(0x213)](_0x328925,_0x5bfa21);}[_0x371856(0x270)](){const _0x12884a=_0x371856;[[_0x93fb38],[_0x2ca56a],[_0x4a6f75]][_0x12884a(0x21a)](_0x3846b0=>{const _0x591fb8=_0x12884a;this[_0x591fb8(0x261)]['add'](_0x3846b0);});}[_0x371856(0x1f5)](){const _0x51ebb9=_0x371856;this[_0x51ebb9(0x261)][_0x51ebb9(0x21c)](_0x2ca56a),this[_0x51ebb9(0x261)]['get'](_0x4a6f75);}},_0xe9a4a9(_0x53a955[_0x371856(0x26f)],_0x371856(0x210),_0x50a5ea),_0xe9a4a9(_0x53a955[_0x371856(0x26f)],_0x371856(0x271),_0x240e31['UniverInstanceType']['UNIVER_UNKNOWN']),_0x53a955[_0x371856(0x26f)]=_0x11cb95([_0x240e31[_0x371856(0x1fa)](_0x120f26[_0x371856(0x23d)],_0x3f1856[_0x371856(0x26b)],_0x22e19a[_0x371856(0x23e)]),_0x1eef18(0x1,_0x240e31[_0x371856(0x22f)](_0x240e31['Injector'])),_0x1eef18(0x2,_0x240e31[_0x371856(0x25d)])],_0x53a955[_0x371856(0x26f)]),Object[_0x371856(0x235)](_0x53a955,Symbol[_0x371856(0x243)],{'value':_0x371856(0x21b)});}));
1
+ (function(_0x1457aa,_0x1d4bdc){const _0x27193e=_0x32e3,_0x1556a0=_0x1457aa();while(!![]){try{const _0x31ca68=-parseInt(_0x27193e(0xcc))/0x1*(parseInt(_0x27193e(0xf9))/0x2)+parseInt(_0x27193e(0xe7))/0x3+-parseInt(_0x27193e(0xd2))/0x4*(-parseInt(_0x27193e(0xe6))/0x5)+parseInt(_0x27193e(0xee))/0x6*(-parseInt(_0x27193e(0x110))/0x7)+parseInt(_0x27193e(0xd5))/0x8+-parseInt(_0x27193e(0x12c))/0x9+-parseInt(_0x27193e(0x121))/0xa*(-parseInt(_0x27193e(0x119))/0xb);if(_0x31ca68===_0x1d4bdc)break;else _0x1556a0['push'](_0x1556a0['shift']());}catch(_0x4a8745){_0x1556a0['push'](_0x1556a0['shift']());}}}(_0x52fc,0xde8f9),function(_0x441851,_0x3281c3){const _0x464c88=_0x32e3;typeof exports==_0x464c88(0xd9)&&typeof module<'u'?_0x3281c3(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==_0x464c88(0x141)&&define['amd']?define(['exports',_0x464c88(0x132),_0x464c88(0xd1),_0x464c88(0xfe),_0x464c88(0xca),_0x464c88(0xc7),_0x464c88(0x13d),'@univerjs/network'],_0x3281c3):(_0x441851=typeof globalThis<'u'?globalThis:_0x441851||self,_0x3281c3(_0x441851[_0x464c88(0xe0)]={},_0x441851[_0x464c88(0x107)],_0x441851['UniverProLicense'],_0x441851[_0x464c88(0x113)],_0x441851['UniverThreadCommentUi'],_0x441851['UniverThreadComment'],_0x441851[_0x464c88(0x13d)],_0x441851['UniverNetwork']));}(this,function(_0x28ecf5,_0xce7260,_0x2c9960,_0x5da8cd,_0x56da18,_0x287040,_0x2cc827,_0x4728f5){'use strict';const _0x5e1f11=_0x32e3;const _0x26048c=_0x5e1f11(0x13c);var _0x22628e=(_0x5ab85e=>(_0x5ab85e[_0x5ab85e[_0x5e1f11(0xe1)]=0x0]=_0x5e1f11(0xe1),_0x5ab85e[_0x5ab85e[_0x5e1f11(0xd6)]=0x1]=_0x5e1f11(0xd6),_0x5ab85e[_0x5ab85e['UNRECOGNIZED']=-0x1]=_0x5e1f11(0xc8),_0x5ab85e))(_0x22628e||{}),_0x81c14d=(_0x2cbf65=>(_0x2cbf65[_0x2cbf65[_0x5e1f11(0xcb)]=0x0]=_0x5e1f11(0xcb),_0x2cbf65[_0x2cbf65[_0x5e1f11(0x134)]=0x1]='Add',_0x2cbf65[_0x2cbf65[_0x5e1f11(0xe3)]=0x2]=_0x5e1f11(0xe3),_0x2cbf65[_0x2cbf65['Edit']=0x3]=_0x5e1f11(0x122),_0x2cbf65[_0x2cbf65[_0x5e1f11(0xef)]=0x4]=_0x5e1f11(0xef),_0x2cbf65[_0x2cbf65[_0x5e1f11(0x135)]=0x5]='Solve',_0x2cbf65[_0x2cbf65[_0x5e1f11(0xc8)]=-0x1]=_0x5e1f11(0xc8),_0x2cbf65))(_0x81c14d||{});const _0x30bb69=_0x466fd5=>_0x5da8cd[_0x5e1f11(0x118)](new Date(+_0x466fd5))[_0x5e1f11(0x145)](_0x5e1f11(0x128)),_0x584e3b=async(_0x11be40,_0x5acb9b)=>{const _0x5ad06f=_0x5e1f11,_0x27e6a1=_0x11be40[_0x5ad06f(0xf7)](_0x5da8cd[_0x5ad06f(0xf0)]),_0x4f37d6=_0x11be40['get'](_0x4728f5['HTTPService']);_0x5acb9b[_0x5ad06f(0x11d)](_0x2c998b=>{const _0x7bb853=_0x5ad06f;_0x27e6a1[_0x7bb853(0x137)](_0x2c998b)&&_0x5acb9b[_0x7bb853(0x147)](_0x2c998b);}),_0x5acb9b[_0x5ad06f(0x10e)]&&(await _0x4f37d6[_0x5ad06f(0xf7)](_0x5ad06f(0x103),{'params':{'userIDs':[..._0x5acb9b]}}))[_0x5ad06f(0xe5)][_0x5ad06f(0x120)][_0x5ad06f(0x11d)](_0xbfa2d1=>{const _0x34d024=_0x5ad06f;_0xbfa2d1&&_0x27e6a1[_0x34d024(0x109)](_0xbfa2d1);});};var _0x2f50de=Object[_0x5e1f11(0xf8)],_0x56f40c=(_0x34a6f2,_0x36ec7d,_0x1d3e4,_0x5e233a)=>{for(var _0x33058e=_0x5e233a>0x1?void 0x0:_0x5e233a?_0x2f50de(_0x36ec7d,_0x1d3e4):_0x36ec7d,_0x58d428=_0x34a6f2['length']-0x1,_0x53f025;_0x58d428>=0x0;_0x58d428--)(_0x53f025=_0x34a6f2[_0x58d428])&&(_0x33058e=_0x53f025(_0x33058e)||_0x33058e);return _0x33058e;},_0x2df764=(_0x409a4a,_0x101a22)=>(_0x1ccdcf,_0x2c11f3)=>_0x101a22(_0x1ccdcf,_0x2c11f3,_0x409a4a);let _0x320483=class extends _0x5da8cd['Disposable']{constructor(_0x267f61,_0x5ea142,_0x2b3c18,_0x3a6218){const _0x18702f=_0x5e1f11;super(),this['_commentService']=_0x267f61,this[_0x18702f(0xdc)]=_0x5ea142,this[_0x18702f(0x116)]=_0x2b3c18,this[_0x18702f(0x114)]=_0x3a6218,this[_0x18702f(0x13e)](),this[_0x18702f(0x126)]();}[_0x5e1f11(0x126)](){const _0x398b3b=_0x5e1f11;this[_0x398b3b(0x143)](this[_0x398b3b(0xdc)]['commentUpdate$']['pipe'](_0x2cc827['bufferTime'](0x10))[_0x398b3b(0xda)](_0x1df18a=>{const _0x226b02=_0x398b3b,_0x1b960c=new Set();_0x1df18a[_0x226b02(0x11d)](_0x432afd=>{const _0x28cada=_0x226b02;switch(_0x432afd[_0x28cada(0xe9)]){case _0x28cada(0x133):{const _0x2111ae=_0x432afd[_0x28cada(0xf4)][_0x28cada(0xed)];_0x1b960c[_0x28cada(0x133)](_0x2111ae);break;}}}),_0x584e3b(this[_0x226b02(0x114)],_0x1b960c);}));}[_0x5e1f11(0x13e)](){const _0x1cc72c=_0x5e1f11;this[_0x1cc72c(0x143)](this[_0x1cc72c(0xe8)][_0x1cc72c(0x10a)][_0x1cc72c(0xda)](async _0xaf8e07=>{const _0x6ea127=_0x1cc72c;var _0x4ca7f8,_0x1b4c51,_0x3ef746,_0x268f32;const _0x26bc08=(_0x4ca7f8=this[_0x6ea127(0xdc)][_0x6ea127(0xfb)](_0xaf8e07['unitId'])[_0x6ea127(0xf2)](_0x1382c6=>_0x1382c6['threadId']===_0xaf8e07[_0x6ea127(0x11c)]))==null?void 0x0:_0x4ca7f8[_0x6ea127(0xde)];if(!_0x26bc08)return;const {unitId:_0x491ffe,subUnitId:_0x466ed9}=_0x26bc08;switch(_0xaf8e07['user']&&this[_0x6ea127(0x116)][_0x6ea127(0x109)](_0xaf8e07[_0x6ea127(0xcd)]),_0xaf8e07[_0x6ea127(0xe9)]){case _0x81c14d[_0x6ea127(0x134)]:break;case _0x81c14d[_0x6ea127(0xe3)]:{this[_0x6ea127(0xdc)][_0x6ea127(0xd8)](_0x491ffe,_0x466ed9,{'unitId':_0x491ffe,'subUnitId':_0x466ed9,'ref':'','id':_0xaf8e07[_0x6ea127(0xc9)],'dT':_0x30bb69(+_0xaf8e07[_0x6ea127(0x146)]),'threadId':_0xaf8e07[_0x6ea127(0x11c)],'personId':(_0x3ef746=(_0x1b4c51=_0xaf8e07[_0x6ea127(0xcd)])==null?void 0x0:_0x1b4c51['userID'])!=null?_0x3ef746:_0xaf8e07[_0x6ea127(0x130)],'text':JSON['parse'](_0xaf8e07[_0x6ea127(0x10f)]),'parentId':_0x26bc08['id']});break;}case _0x81c14d[_0x6ea127(0xef)]:{const _0x41e311=this[_0x6ea127(0xdc)][_0x6ea127(0x127)](_0x491ffe,_0x466ed9,_0xaf8e07[_0x6ea127(0xc9)]);_0x41e311&&_0x41e311['parentId']&&this['_threadCommentModel'][_0x6ea127(0x11f)](_0x491ffe,_0x466ed9,_0xaf8e07[_0x6ea127(0xc9)]);break;}case _0x81c14d['Edit']:{this[_0x6ea127(0xdc)]['updateComment'](_0x491ffe,_0x466ed9,{'commentId':_0xaf8e07[_0x6ea127(0xc9)],'text':JSON[_0x6ea127(0xdf)](_0xaf8e07[_0x6ea127(0x10f)])});break;}case _0x81c14d['Solve']:{const _0x22a716=(_0x268f32=this[_0x6ea127(0xdc)]['getUnit'](_0xaf8e07[_0x6ea127(0x102)])[_0x6ea127(0xf2)](_0x19d044=>_0x19d044[_0x6ea127(0x11c)]===_0xaf8e07[_0x6ea127(0x11c)]))==null?void 0x0:_0x268f32['root'];_0x22a716&&this[_0x6ea127(0xdc)]['resolveComment'](_0x491ffe,_0x466ed9,_0x22a716['id'],_0xaf8e07[_0x6ea127(0x148)]===_0x22628e[_0x6ea127(0xd6)]);break;}}}));}};_0x320483=_0x56f40c([_0x2df764(0x0,_0x5da8cd[_0x5e1f11(0x111)](_0xce7260[_0x5e1f11(0x117)])),_0x2df764(0x1,_0x5da8cd[_0x5e1f11(0x111)](_0x287040[_0x5e1f11(0xe4)])),_0x2df764(0x2,_0x5da8cd[_0x5e1f11(0x111)](_0x5da8cd[_0x5e1f11(0xf0)])),_0x2df764(0x3,_0x5da8cd[_0x5e1f11(0x111)](_0x5da8cd[_0x5e1f11(0xdd)]))],_0x320483);const _0x2b597f=_0x5e1f11(0xe2),_0x1402f2={};var _0x4129d7=Object[_0x5e1f11(0xf8)],_0x4919d2=(_0x51ea8f,_0x3a06f2,_0x3db7db,_0xb32866)=>{for(var _0x5467d9=_0xb32866>0x1?void 0x0:_0xb32866?_0x4129d7(_0x3a06f2,_0x3db7db):_0x3a06f2,_0x4baad2=_0x51ea8f['length']-0x1,_0x5d407a;_0x4baad2>=0x0;_0x4baad2--)(_0x5d407a=_0x51ea8f[_0x4baad2])&&(_0x5467d9=_0x5d407a(_0x5467d9)||_0x5467d9);return _0x5467d9;},_0x13c8f6=(_0x5d0358,_0x435870)=>(_0x31b9c6,_0x4c2fad)=>_0x435870(_0x31b9c6,_0x4c2fad,_0x5d0358);function _0xc1c50c(_0x37836d,_0x3f6661){const _0x33361d=_0x5e1f11,_0x4e9c09=_0x37836d[_0x33361d(0x10d)][0x0];return{..._0x3f6661,'id':_0x4e9c09[_0x33361d(0xc9)],'resolved':_0x37836d[_0x33361d(0x148)]===0x1,'dT':_0x30bb69(_0x4e9c09[_0x33361d(0x146)]),'personId':_0x4e9c09[_0x33361d(0x130)],'threadId':_0x4e9c09[_0x33361d(0x11c)]};}function _0x2de602(_0x50a1bb,_0x58b8bd,_0x3af674){const _0x4784d1=_0x5e1f11;var _0x53beb1,_0x306506;if(((_0x306506=(_0x53beb1=_0x50a1bb==null?void 0x0:_0x50a1bb[_0x4784d1(0x10d)])==null?void 0x0:_0x53beb1[_0x4784d1(0x10c)])!=null?_0x306506:0x0)>0x0){const _0x14bede=(_0x526f32,_0x5a1a59)=>({'id':_0x526f32['replyId'],'threadId':_0x526f32[_0x4784d1(0x11c)],'dT':_0x30bb69(_0x526f32[_0x4784d1(0x146)]),'personId':_0x526f32['userId'],'resolved':_0x50a1bb[_0x4784d1(0x148)]===_0x22628e[_0x4784d1(0xd6)],'unitId':_0x58b8bd,'subUnitId':_0x3af674,'text':JSON[_0x4784d1(0xdf)](_0x526f32['content']),'parentId':_0x5a1a59}),_0x277d17=_0x14bede(_0x50a1bb[_0x4784d1(0x10d)][0x0]);return{..._0x277d17,'children':_0x50a1bb['replies'][_0x4784d1(0x149)](0x1)['map'](_0x40b8da=>_0x14bede(_0x40b8da,_0x277d17['id']))};}return null;}let _0x91faa2=class{constructor(_0x5f3080,_0x29da7f,_0x3b3a1b){const _0x35bb3c=_0x5e1f11;this[_0x35bb3c(0xdb)]=_0x5f3080,this[_0x35bb3c(0x116)]=_0x29da7f,this[_0x35bb3c(0xce)]=_0x3b3a1b;}async['addComment'](_0x5e2e13){const _0x1fd690=_0x5e1f11;var _0x478f09,_0x2db63c;const {parentId:_0x42e10e,unitId:_0x5e6d7d,text:_0x40797d,threadId:_0x5edf04}=_0x5e2e13,_0x79df63=(_0x2db63c=(_0x478f09=_0x40797d[_0x1fd690(0x105)])==null?void 0x0:_0x478f09[_0x1fd690(0x11a)](_0x44db98=>_0x44db98[_0x1fd690(0x13f)]===_0x5da8cd['CustomRangeType'][_0x1fd690(0x101)])['map'](_0x19a63f=>_0x19a63f[_0x1fd690(0xd0)]))!=null?_0x2db63c:[],_0x431113=JSON['stringify'](_0x40797d),_0x327bf4=(await this[_0x1fd690(0xce)][_0x1fd690(0x12b)](_0x5e6d7d))['getMemberID']();if(_0x42e10e){const _0x127ff5={'memberId':_0x327bf4,'unitId':_0x5e6d7d,'content':_0x431113,'mention':_0x79df63,'threadId':_0x5edf04},_0x4cd452=(await this[_0x1fd690(0xdb)][_0x1fd690(0xd4)](_0x1fd690(0xff)+_0x5e6d7d+_0x1fd690(0x138),{'body':_0x127ff5}))[_0x1fd690(0xe5)][_0x1fd690(0x12f)];return{..._0x5e2e13,'id':_0x4cd452[_0x1fd690(0xc9)],'dT':_0x5da8cd[_0x1fd690(0x118)](+_0x4cd452['createTimestamp'])[_0x1fd690(0x145)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4cd452[_0x1fd690(0x130)]};}else{const _0x29788b={'memberId':_0x327bf4,'unitId':_0x5e6d7d,'content':_0x431113,'mention':_0x79df63},_0xeecae2=await this[_0x1fd690(0xdb)][_0x1fd690(0xd4)](_0x1fd690(0xff)+_0x5e6d7d+_0x1fd690(0x12e),{'body':_0x29788b});return _0xc1c50c(_0xeecae2[_0x1fd690(0xe5)][_0x1fd690(0xeb)],_0x5e2e13);}}async[_0x5e1f11(0x12a)](_0x551d92){const _0x1a99ce=_0x5e1f11;var _0x10ff8f,_0x484811;const {text:_0x424314,unitId:_0xdf5458}=_0x551d92,_0x2dae8f=(_0x484811=(_0x10ff8f=_0x424314[_0x1a99ce(0x105)])==null?void 0x0:_0x10ff8f[_0x1a99ce(0x11a)](_0x2946bd=>_0x2946bd[_0x1a99ce(0x13f)]===_0x5da8cd[_0x1a99ce(0x115)]['COMMENT'])[_0x1a99ce(0x140)](_0x1daf3f=>_0x1daf3f['rangeId']))!=null?_0x484811:[],_0x5e3694=JSON[_0x1a99ce(0xf3)](_0x424314),_0x5a20ea=_0x551d92['threadId'],_0x3496d9=_0x551d92['id'],_0x2ad014={'memberId':(await this[_0x1a99ce(0xce)][_0x1a99ce(0x12b)](_0xdf5458))[_0x1a99ce(0x13b)](),'unitId':_0xdf5458,'threadId':_0x5a20ea,'mention':_0x2dae8f,'content':_0x5e3694,'replyId':_0x3496d9},_0x2cd18a=await this['_httpService'][_0x1a99ce(0xd4)](_0x1a99ce(0xff)+_0xdf5458+'/edit',{'body':_0x2ad014});return!_0x2cd18a['body'][_0x1a99ce(0xfd)]||_0x2cd18a['body'][_0x1a99ce(0xfd)][_0x1a99ce(0xfc)]===0x1;}async[_0x5e1f11(0xea)](_0x420d79){const _0x25bda6=_0x5e1f11,{unitId:_0x27f666}=_0x420d79,_0x5c7510=_0x420d79[_0x25bda6(0x11c)],_0x3526e5={'memberId':this[_0x25bda6(0x116)]['getCurrentUser']()[_0x25bda6(0x11e)],'unitId':_0x27f666,'threadId':_0x5c7510,'solved':_0x420d79[_0x25bda6(0xd7)]?_0x22628e[_0x25bda6(0xd6)]:_0x22628e['OpenOrReOpen']},_0xfe0475=await this[_0x25bda6(0xdb)][_0x25bda6(0xd4)](_0x25bda6(0xff)+_0x27f666+'/solved',{'body':_0x3526e5});return!_0xfe0475[_0x25bda6(0xe5)][_0x25bda6(0xfd)]||_0xfe0475['body']['error'][_0x25bda6(0xfc)]===0x1;}async[_0x5e1f11(0x11f)](_0x1482f5,_0x2a839a,_0x4f69a0,_0x17f1d3){const _0x3d830d=_0x5e1f11,_0x31b1de={'memberId':(await this[_0x3d830d(0xce)][_0x3d830d(0x12b)](_0x1482f5))[_0x3d830d(0x13b)](),'threadId':_0x4f69a0,'replyId':_0x17f1d3,'unitId':_0x1482f5},_0x467b46=await this[_0x3d830d(0xdb)][_0x3d830d(0xd4)](_0x3d830d(0xff)+_0x1482f5+'/delete',{'body':_0x31b1de});return!_0x467b46[_0x3d830d(0xe5)]['error']||_0x467b46[_0x3d830d(0xe5)][_0x3d830d(0xfd)][_0x3d830d(0xfc)]===0x1;}async[_0x5e1f11(0xfa)](_0x461066,_0x2dbcef,_0xee6630){const _0x387cda=_0x5e1f11,_0x4a5b5e={'unitId':_0x461066,'threadId':_0xee6630},_0x10bec3=await this[_0x387cda(0xdb)][_0x387cda(0xd4)](_0x387cda(0xff)+_0x461066+_0x387cda(0x131),{'body':_0x4a5b5e}),_0x30cdf9=_0xee6630['map'](_0x3f9c01=>_0x2de602(_0x10bec3[_0x387cda(0xe5)][_0x387cda(0x100)][_0x3f9c01],_0x461066,_0x2dbcef))['filter'](Boolean);return Object[_0x387cda(0x112)](_0x10bec3[_0x387cda(0xe5)]['users'])[_0x387cda(0x11d)](_0x3c4323=>{const _0x28864f=_0x387cda;this[_0x28864f(0x116)][_0x28864f(0x109)](_0x3c4323);}),_0x30cdf9;}[_0x5e1f11(0x139)](_0x561725){const _0x2d7a55=_0x5e1f11;return{'id':_0x561725['id'],'threadId':_0x561725[_0x2d7a55(0x11c)],'ref':_0x561725['ref']};}};_0x91faa2=_0x4919d2([_0x13c8f6(0x0,_0x5da8cd['Inject'](_0x4728f5[_0x5e1f11(0xec)])),_0x13c8f6(0x1,_0x5da8cd[_0x5e1f11(0x111)](_0x5da8cd['UserManagerService'])),_0x13c8f6(0x2,_0x5da8cd[_0x5e1f11(0x111)](_0xce7260[_0x5e1f11(0x142)]))],_0x91faa2);var _0x145d3d=Object[_0x5e1f11(0xf8)],_0x2de72f=(_0x4dbdce,_0x1695e3,_0x8e870f,_0x26254e)=>{for(var _0x33ff49=_0x26254e>0x1?void 0x0:_0x26254e?_0x145d3d(_0x1695e3,_0x8e870f):_0x1695e3,_0x256942=_0x4dbdce['length']-0x1,_0x47552f;_0x256942>=0x0;_0x256942--)(_0x47552f=_0x4dbdce[_0x256942])&&(_0x33ff49=_0x47552f(_0x33ff49)||_0x33ff49);return _0x33ff49;},_0x508f1c=(_0x43bb32,_0x1c920b)=>(_0x24123e,_0xec6504)=>_0x1c920b(_0x24123e,_0xec6504,_0x43bb32);let _0x13acb6=class extends _0x5da8cd[_0x5e1f11(0x12d)]{constructor(_0x89a478,_0x4a47d1){const _0xc5c5b=_0x5e1f11;super(),this['_threadCommentDataSourceService']=_0x89a478,this[_0xc5c5b(0x13a)]=_0x4a47d1,this[_0xc5c5b(0x10b)]();}[_0x5e1f11(0x10b)](){const _0x122b08=_0x5e1f11;this[_0x122b08(0x108)]['dataSource']=this[_0x122b08(0x13a)],this[_0x122b08(0x108)][_0x122b08(0x136)]=!0x1;}};_0x13acb6=_0x2de72f([_0x508f1c(0x0,_0x287040['IThreadCommentDataSourceService']),_0x508f1c(0x1,_0x5da8cd[_0x5e1f11(0x111)](_0x91faa2))],_0x13acb6);var _0x24e7b3=Object['defineProperty'],_0xc3aad4=Object[_0x5e1f11(0xf8)],_0x221b82=(_0x2a5a32,_0x11cccb,_0x450808)=>_0x11cccb in _0x2a5a32?_0x24e7b3(_0x2a5a32,_0x11cccb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x450808}):_0x2a5a32[_0x11cccb]=_0x450808,_0x520e90=(_0x1c8b4a,_0x2fb98e,_0x5c208f,_0x400dfc)=>{const _0x4870c2=_0x5e1f11;for(var _0x267189=_0x400dfc>0x1?void 0x0:_0x400dfc?_0xc3aad4(_0x2fb98e,_0x5c208f):_0x2fb98e,_0x1fcc32=_0x1c8b4a[_0x4870c2(0x10c)]-0x1,_0x38d35e;_0x1fcc32>=0x0;_0x1fcc32--)(_0x38d35e=_0x1c8b4a[_0x1fcc32])&&(_0x267189=_0x38d35e(_0x267189)||_0x267189);return _0x267189;},_0xcccfaf=(_0x2c2917,_0x44c7aa)=>(_0x442b5c,_0xff8c6d)=>_0x44c7aa(_0x442b5c,_0xff8c6d,_0x2c2917),_0x1ecf5d=(_0x25fb2e,_0x2dca92,_0x61694c)=>_0x221b82(_0x25fb2e,typeof _0x2dca92!=_0x5e1f11(0x104)?_0x2dca92+'':_0x2dca92,_0x61694c);_0x28ecf5[_0x5e1f11(0xf5)]=class extends _0x5da8cd[_0x5e1f11(0xf1)]{constructor(_0x103bd1=_0x1402f2,_0x2ffc48,_0x46d2b4){const _0x2f3597=_0x5e1f11;super(),this[_0x2f3597(0x125)]=_0x103bd1,this['_injector']=_0x2ffc48,this[_0x2f3597(0xd3)]=_0x46d2b4;const {..._0xbda155}=_0x5da8cd['merge']({},_0x1402f2,this[_0x2f3597(0x125)]);this[_0x2f3597(0xd3)]['setConfig'](_0x2b597f,_0xbda155);}[_0x5e1f11(0x129)](){const _0x236071=_0x5e1f11;[[_0x91faa2],[_0x13acb6],[_0x320483]][_0x236071(0x11d)](_0x3263d2=>{const _0x43d48f=_0x236071;this[_0x43d48f(0x114)][_0x43d48f(0x133)](_0x3263d2);});}['onReady'](){const _0x57db23=_0x5e1f11;this[_0x57db23(0x114)][_0x57db23(0xf7)](_0x13acb6),this['_injector']['get'](_0x320483);}},_0x1ecf5d(_0x28ecf5['UniverThreadCommentDataSourcePlugin'],_0x5e1f11(0xc6),_0x26048c),_0x1ecf5d(_0x28ecf5[_0x5e1f11(0xf5)],_0x5e1f11(0xe9),_0x5da8cd['UniverInstanceType'][_0x5e1f11(0x124)]),_0x28ecf5[_0x5e1f11(0xf5)]=_0x520e90([_0x5da8cd[_0x5e1f11(0x144)](_0x56da18[_0x5e1f11(0xcf)],_0xce7260[_0x5e1f11(0x106)],_0x2c9960[_0x5e1f11(0x11b)]),_0xcccfaf(0x1,_0x5da8cd[_0x5e1f11(0x111)](_0x5da8cd[_0x5e1f11(0xdd)])),_0xcccfaf(0x2,_0x5da8cd['IConfigService'])],_0x28ecf5['UniverThreadCommentDataSourcePlugin']),Object[_0x5e1f11(0xf6)](_0x28ecf5,Symbol[_0x5e1f11(0x14a)],{'value':_0x5e1f11(0x123)});}));function _0x32e3(_0x10f41f,_0x5a2bdb){const _0x52fc6b=_0x52fc();return _0x32e3=function(_0x32e326,_0x21ca14){_0x32e326=_0x32e326-0xc6;let _0x19513c=_0x52fc6b[_0x32e326];return _0x19513c;},_0x32e3(_0x10f41f,_0x5a2bdb);}function _0x52fc(){const _0x5a25ea=['UserManagerService','Plugin','find','stringify','payload','UniverThreadCommentDataSourcePlugin','defineProperty','get','getOwnPropertyDescriptor','849222vnigOq','listComments','getUnit','code','error','@univerjs/core','/universer-api/comment/unit/','comments','COMMENT','unitId','/universer-api/user/list','symbol','customRanges','UniverCollaborationClientPlugin','UniverProCollaborationClient','_threadCommentDataSourceService','addUser','commentUpdate$','_initDataSource','length','replies','size','content','15512brQGWq','Inject','values','UniverCore','_injector','CustomRangeType','_userService','CommentService','dayjs','16313OQjEZy','filter','UniverLicensePlugin','threadId','forEach','userID','deleteComment','users','15570XZIcIW','Edit','Module','UNIVER_UNKNOWN','_config','_initUserSync','getComment','YYYY/MM/DD\x20HH:mm','onStarting','updateComment','requireSession','14834619DbXzKy','Disposable','/add','reply','userId','/list','@univerjs-pro/collaboration-client','add','Add','Solve','syncUpdateMutationToColla','getUser','/reply','saveCommentToSnapshot','_threadCommentDataSource','getMemberID','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','rxjs','_init','rangeType','map','function','CollaborationSessionService','disposeWithMe','DependentOn','format','createTimestamp','delete','solved','slice','toStringTag','pluginName','@univerjs/thread-comment','UNRECOGNIZED','replyId','@univerjs/thread-comment-ui','Unknown','1eJDmVb','user','_sessionService','UniverThreadCommentUIPlugin','rangeId','@univerjs-pro/license','1076voFCFG','_configService','post','113960HrNWGw','Solved','resolved','addComment','object','subscribe','_httpService','_threadCommentModel','Injector','root','parse','UniverProThreadCommentDatasource','OpenOrReOpen','thread-comment-data-source.config','Reply','ThreadCommentModel','body','11935VIEsJI','1087836axNDdQ','_commentService','type','resolveComment','comment','HTTPService','personId','930HaZdFc','Delete'];_0x52fc=function(){return _0x5a25ea;};return _0x52fc();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.12.2-experimental.20251202-45172c6",
3
+ "version": "0.12.2-experimental.20251202-7f1a98f",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,12 +45,12 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.12.2-experimental.20251202-45172c6",
49
- "@univerjs-pro/license": "0.12.2-experimental.20251202-45172c6",
50
- "@univerjs/core": "0.12.2-experimental.20251202-45172c6",
51
- "@univerjs/network": "0.12.2-experimental.20251202-45172c6",
52
- "@univerjs/thread-comment": "0.12.2-experimental.20251202-45172c6",
53
- "@univerjs/thread-comment-ui": "0.12.2-experimental.20251202-45172c6",
48
+ "@univerjs-pro/collaboration-client": "0.12.2-experimental.20251202-7f1a98f",
49
+ "@univerjs-pro/license": "0.12.2-experimental.20251202-7f1a98f",
50
+ "@univerjs/network": "0.12.2-experimental.20251202-7f1a98f",
51
+ "@univerjs/thread-comment": "0.12.2-experimental.20251202-7f1a98f",
52
+ "@univerjs/thread-comment-ui": "0.12.2-experimental.20251202-7f1a98f",
53
+ "@univerjs/core": "0.12.2-experimental.20251202-7f1a98f",
54
54
  "@univerjs/protocol": "0.1.47"
55
55
  },
56
56
  "devDependencies": {