@univerjs-pro/thread-comment-datasource 0.6.9 → 0.6.10-alpha.0

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 _0x24ddea=_0x4779;(function(_0x27e2f2,_0x9e0fa3){const _0x320a03=_0x4779,_0x401b8b=_0x27e2f2();while(!![]){try{const _0x2d5556=-parseInt(_0x320a03(0xd0))/0x1+parseInt(_0x320a03(0xca))/0x2*(-parseInt(_0x320a03(0x97))/0x3)+-parseInt(_0x320a03(0xba))/0x4*(parseInt(_0x320a03(0xf1))/0x5)+parseInt(_0x320a03(0x80))/0x6*(-parseInt(_0x320a03(0xa7))/0x7)+-parseInt(_0x320a03(0xb0))/0x8*(parseInt(_0x320a03(0x8e))/0x9)+-parseInt(_0x320a03(0xe2))/0xa*(parseInt(_0x320a03(0x8a))/0xb)+parseInt(_0x320a03(0xef))/0xc;if(_0x2d5556===_0x9e0fa3)break;else _0x401b8b['push'](_0x401b8b['shift']());}catch(_0xbc85b1){_0x401b8b['push'](_0x401b8b['shift']());}}}(_0x225e,0xe31f2));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x24ddea(0x84)});const b=require(_0x24ddea(0xa1)),T=require(_0x24ddea(0xd9)),c=require(_0x24ddea(0x8b)),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require(_0x24ddea(0x77)),P=require('@univerjs/network'),U=_0x24ddea(0xb3);var I=(_0x1b0785=>(_0x1b0785[_0x1b0785[_0x24ddea(0x93)]=0x0]='OpenOrReOpen',_0x1b0785[_0x1b0785['Solved']=0x1]=_0x24ddea(0x89),_0x1b0785[_0x1b0785[_0x24ddea(0xee)]=-0x1]='UNRECOGNIZED',_0x1b0785))(I||{}),v=(_0x27064a=>(_0x27064a[_0x27064a[_0x24ddea(0xec)]=0x0]=_0x24ddea(0xec),_0x27064a[_0x27064a[_0x24ddea(0x98)]=0x1]=_0x24ddea(0x98),_0x27064a[_0x27064a['Reply']=0x2]=_0x24ddea(0xab),_0x27064a[_0x27064a[_0x24ddea(0x7c)]=0x3]='Edit',_0x27064a[_0x27064a['Delete']=0x4]=_0x24ddea(0x7a),_0x27064a[_0x27064a[_0x24ddea(0xad)]=0x5]=_0x24ddea(0xad),_0x27064a[_0x27064a[_0x24ddea(0xee)]=-0x1]=_0x24ddea(0xee),_0x27064a))(v||{});const f=_0x4e1b1f=>c[_0x24ddea(0xbb)](new Date(+_0x4e1b1f))['format'](_0x24ddea(0xc7)),R=async(_0x4c1c1c,_0x5e97ad)=>{const _0x195404=_0x24ddea,_0x2b251b=_0x4c1c1c['get'](c[_0x195404(0xb6)]),_0x2f40bc=_0x4c1c1c['get'](P[_0x195404(0x82)]);_0x5e97ad[_0x195404(0xd5)](_0x4144d1=>{const _0x2af893=_0x195404;_0x2b251b[_0x2af893(0x7b)](_0x4144d1)&&_0x5e97ad[_0x2af893(0xc9)](_0x4144d1);}),_0x5e97ad['size']&&(await _0x2f40bc['get'](_0x195404(0x90),{'params':{'userIDs':[..._0x5e97ad]}}))[_0x195404(0xe3)][_0x195404(0xac)][_0x195404(0xd5)](_0x5ea363=>{_0x5ea363&&_0x2b251b['addUser'](_0x5ea363);});};var $=Object[_0x24ddea(0x79)],E=(_0x493e15,_0x2bad7f,_0x9c5919,_0x289fba)=>{for(var _0x1a5a53=_0x289fba>0x1?void 0x0:_0x289fba?$(_0x2bad7f,_0x9c5919):_0x2bad7f,_0x5e4588=_0x493e15['length']-0x1,_0xd2b976;_0x5e4588>=0x0;_0x5e4588--)(_0xd2b976=_0x493e15[_0x5e4588])&&(_0x1a5a53=_0xd2b976(_0x1a5a53)||_0x1a5a53);return _0x1a5a53;},S=(_0x8547d3,_0x1956eb)=>(_0x509fdc,_0x2f8d6e)=>_0x1956eb(_0x509fdc,_0x2f8d6e,_0x8547d3);let p=class extends c[_0x24ddea(0xdd)]{constructor(_0x18c770,_0x25b8a0,_0x1de6cc,_0x34c784){const _0x2f3fc1=_0x24ddea;super(),this[_0x2f3fc1(0xd1)]=_0x18c770,this[_0x2f3fc1(0x88)]=_0x25b8a0,this[_0x2f3fc1(0x8c)]=_0x1de6cc,this[_0x2f3fc1(0xcf)]=_0x34c784,this[_0x2f3fc1(0xda)](),this[_0x2f3fc1(0xa9)]();}['_initUserSync'](){const _0x29a2f0=_0x24ddea;this['disposeWithMe'](this[_0x29a2f0(0x88)][_0x29a2f0(0x8f)]['pipe'](w['bufferTime'](0x10))['subscribe'](_0x59ef59=>{const _0x451e5e=_0x29a2f0,_0x2689fe=new Set();_0x59ef59['forEach'](_0x35fde3=>{const _0x55992b=_0x4779;switch(_0x35fde3[_0x55992b(0x85)]){case _0x55992b(0x7e):{const _0x1b3822=_0x35fde3[_0x55992b(0xf2)]['personId'];_0x2689fe['add'](_0x1b3822);break;}}}),R(this[_0x451e5e(0xcf)],_0x2689fe);}));}[_0x24ddea(0xda)](){const _0x3cb995=_0x24ddea;this[_0x3cb995(0xb1)](this[_0x3cb995(0xd1)][_0x3cb995(0x8f)][_0x3cb995(0xc0)](async _0x1420cc=>{const _0x5ed338=_0x3cb995;var _0x3761e0,_0x287c32,_0x57cec6,_0x208271;const _0x577e88=(_0x3761e0=this[_0x5ed338(0x88)][_0x5ed338(0x9d)](_0x1420cc[_0x5ed338(0xc1)])[_0x5ed338(0xce)](_0x15fd82=>_0x15fd82['threadId']===_0x1420cc[_0x5ed338(0xd8)]))==null?void 0x0:_0x3761e0[_0x5ed338(0xf3)];if(!_0x577e88)return;const {unitId:_0x5e8087,subUnitId:_0x476669}=_0x577e88;switch(_0x1420cc[_0x5ed338(0xcb)]&&this['_userService'][_0x5ed338(0xde)](_0x1420cc[_0x5ed338(0xcb)]),_0x1420cc[_0x5ed338(0x85)]){case v[_0x5ed338(0x98)]:break;case v[_0x5ed338(0xab)]:{this['_threadCommentModel'][_0x5ed338(0xd3)](_0x5e8087,_0x476669,{'unitId':_0x5e8087,'subUnitId':_0x476669,'ref':'','id':_0x1420cc[_0x5ed338(0xa3)],'dT':f(+_0x1420cc[_0x5ed338(0xc8)]),'threadId':_0x1420cc[_0x5ed338(0xd8)],'personId':(_0x57cec6=(_0x287c32=_0x1420cc[_0x5ed338(0xcb)])==null?void 0x0:_0x287c32[_0x5ed338(0x9b)])!=null?_0x57cec6:_0x1420cc['userId'],'text':JSON[_0x5ed338(0x81)](_0x1420cc[_0x5ed338(0x8d)]),'parentId':_0x577e88['id']});break;}case v[_0x5ed338(0x7a)]:{const _0x55854d=this[_0x5ed338(0x88)][_0x5ed338(0xc6)](_0x5e8087,_0x476669,_0x1420cc[_0x5ed338(0xa3)]);_0x55854d&&_0x55854d[_0x5ed338(0xdb)]&&this[_0x5ed338(0x88)]['deleteComment'](_0x5e8087,_0x476669,_0x1420cc['replyId']);break;}case v[_0x5ed338(0x7c)]:{this[_0x5ed338(0x88)]['updateComment'](_0x5e8087,_0x476669,{'commentId':_0x1420cc[_0x5ed338(0xa3)],'text':JSON[_0x5ed338(0x81)](_0x1420cc[_0x5ed338(0x8d)])});break;}case v[_0x5ed338(0xad)]:{const _0x56354b=(_0x208271=this[_0x5ed338(0x88)]['getUnit'](_0x1420cc[_0x5ed338(0xc1)])[_0x5ed338(0xce)](_0x12b6f8=>_0x12b6f8[_0x5ed338(0xd8)]===_0x1420cc[_0x5ed338(0xd8)]))==null?void 0x0:_0x208271[_0x5ed338(0xf3)];_0x56354b&&this['_threadCommentModel']['resolveComment'](_0x5e8087,_0x476669,_0x56354b['id'],_0x1420cc[_0x5ed338(0x74)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x24ddea(0x91)](b[_0x24ddea(0xcd)])),S(0x1,c[_0x24ddea(0x91)](M[_0x24ddea(0xb9)])),S(0x2,c[_0x24ddea(0x91)](c[_0x24ddea(0xb6)])),S(0x3,c[_0x24ddea(0x91)](c[_0x24ddea(0xa0)]))],p);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x3ea938,_0x4217d6,_0x30fcb5,_0x10eab3)=>{for(var _0x989668=_0x10eab3>0x1?void 0x0:_0x10eab3?A(_0x4217d6,_0x30fcb5):_0x4217d6,_0x4a3eaa=_0x3ea938['length']-0x1,_0x1cf881;_0x4a3eaa>=0x0;_0x4a3eaa--)(_0x1cf881=_0x3ea938[_0x4a3eaa])&&(_0x989668=_0x1cf881(_0x989668)||_0x989668);return _0x989668;},_=(_0x5ad083,_0x225241)=>(_0x4f977c,_0x1a67e9)=>_0x225241(_0x4f977c,_0x1a67e9,_0x5ad083);function Y(_0x98ef9f,_0x303756){const _0x25847d=_0x24ddea,_0x34ae3e=_0x98ef9f['replies'][0x0];return{..._0x303756,'id':_0x34ae3e['replyId'],'resolved':_0x98ef9f[_0x25847d(0x74)]===0x1,'dT':f(_0x34ae3e[_0x25847d(0xc8)]),'personId':_0x34ae3e['userId'],'threadId':_0x34ae3e[_0x25847d(0xd8)]};}function G(_0x1b4057,_0x579bfa,_0x2f1151){const _0x1e93e6=_0x24ddea;var _0x56aa91,_0x28a954;if(((_0x28a954=(_0x56aa91=_0x1b4057==null?void 0x0:_0x1b4057[_0x1e93e6(0xb8)])==null?void 0x0:_0x56aa91[_0x1e93e6(0xdf)])!=null?_0x28a954:0x0)>0x0){const _0x488f52=(_0x26524c,_0x44ee8f)=>({'id':_0x26524c['replyId'],'threadId':_0x26524c[_0x1e93e6(0xd8)],'dT':f(_0x26524c['createTimestamp']),'personId':_0x26524c[_0x1e93e6(0xbe)],'resolved':_0x1b4057[_0x1e93e6(0x74)]===I[_0x1e93e6(0x89)],'unitId':_0x579bfa,'subUnitId':_0x2f1151,'text':JSON[_0x1e93e6(0x81)](_0x26524c[_0x1e93e6(0x8d)]),'parentId':_0x44ee8f}),_0x1d5229=_0x488f52(_0x1b4057[_0x1e93e6(0xb8)][0x0]);return{..._0x1d5229,'children':_0x1b4057['replies'][_0x1e93e6(0xc3)](0x1)['map'](_0x4e1a0a=>_0x488f52(_0x4e1a0a,_0x1d5229['id']))};}return null;}function _0x4779(_0x4639dc,_0x2298f9){const _0x225e6f=_0x225e();return _0x4779=function(_0x477965,_0x116306){_0x477965=_0x477965-0x74;let _0x131c3f=_0x225e6f[_0x477965];return _0x131c3f;},_0x4779(_0x4639dc,_0x2298f9);}let g=class{constructor(_0x4d8e5c,_0x27bd20,_0x4ba226,_0xa2fe8f){const _0x2bb43f=_0x24ddea;this['_httpService']=_0x4d8e5c,this[_0x2bb43f(0x8c)]=_0x27bd20,this[_0x2bb43f(0xdc)]=_0x4ba226,this[_0x2bb43f(0xcf)]=_0xa2fe8f;}async[_0x24ddea(0xd3)](_0x48730c){const _0x3fff31=_0x24ddea;var _0x13c916,_0x175e5f;const {parentId:_0x5208fc,unitId:_0x1ee425,text:_0x47fd3a,threadId:_0x31080f}=_0x48730c,_0x15f24a=(_0x175e5f=(_0x13c916=_0x47fd3a[_0x3fff31(0xae)])==null?void 0x0:_0x13c916[_0x3fff31(0x95)](_0x4a983d=>_0x4a983d[_0x3fff31(0xe8)]===c['CustomRangeType'][_0x3fff31(0x7f)])[_0x3fff31(0xd7)](_0x3f1a02=>_0x3f1a02[_0x3fff31(0x78)]))!=null?_0x175e5f:[],_0x10c53c=JSON[_0x3fff31(0xe1)](_0x47fd3a),_0x596620=(await this[_0x3fff31(0xdc)][_0x3fff31(0x75)](_0x1ee425))['getMemberID']();if(_0x5208fc){const _0x29c89f={'memberId':_0x596620,'unitId':_0x1ee425,'content':_0x10c53c,'mention':_0x15f24a,'threadId':_0x31080f},_0x35eddb=(await this[_0x3fff31(0xb4)][_0x3fff31(0xbc)](_0x3fff31(0xd2)+_0x1ee425+'/reply',{'body':_0x29c89f}))['body'][_0x3fff31(0xa6)];return{..._0x48730c,'id':_0x35eddb[_0x3fff31(0xa3)],'dT':c[_0x3fff31(0xbb)](+_0x35eddb['createTimestamp'])[_0x3fff31(0xe5)](_0x3fff31(0xc7)),'personId':_0x35eddb[_0x3fff31(0xbe)]};}else{const _0x2101c2={'memberId':_0x596620,'unitId':_0x1ee425,'content':_0x10c53c,'mention':_0x15f24a},_0x2d0744=await this['_httpService'][_0x3fff31(0xbc)](_0x3fff31(0xd2)+_0x1ee425+_0x3fff31(0xc5),{'body':_0x2101c2});return Y(_0x2d0744[_0x3fff31(0xe3)][_0x3fff31(0x86)],_0x48730c);}}async[_0x24ddea(0xe9)](_0x4bbcef){const _0xf15da9=_0x24ddea;var _0x18ac65,_0x12189b;const {text:_0x17aad2,unitId:_0x2712fc}=_0x4bbcef,_0x5ec04b=(_0x12189b=(_0x18ac65=_0x17aad2[_0xf15da9(0xae)])==null?void 0x0:_0x18ac65[_0xf15da9(0x95)](_0x3d0345=>_0x3d0345[_0xf15da9(0xe8)]===c['CustomRangeType'][_0xf15da9(0x7f)])[_0xf15da9(0xd7)](_0x2d9847=>_0x2d9847[_0xf15da9(0x78)]))!=null?_0x12189b:[],_0x181fc8=JSON['stringify'](_0x17aad2),_0x424324=_0x4bbcef[_0xf15da9(0xd8)],_0x1282ed=_0x4bbcef['id'],_0x1946e3={'memberId':(await this['_sessionService']['requireSession'](_0x2712fc))['getMemberID'](),'unitId':_0x2712fc,'threadId':_0x424324,'mention':_0x5ec04b,'content':_0x181fc8,'replyId':_0x1282ed},_0x113652=await this['_httpService'][_0xf15da9(0xbc)](_0xf15da9(0xd2)+_0x2712fc+_0xf15da9(0xd4),{'body':_0x1946e3});return!_0x113652['body'][_0xf15da9(0xe0)]||_0x113652[_0xf15da9(0xe3)]['error'][_0xf15da9(0xc2)]===0x1;}async[_0x24ddea(0x99)](_0x51b357){const _0x1ed4a2=_0x24ddea,{unitId:_0x3c2878}=_0x51b357,_0xf90e35=_0x51b357['threadId'],_0x4e906f={'memberId':this[_0x1ed4a2(0x8c)]['getCurrentUser']()[_0x1ed4a2(0x9b)],'unitId':_0x3c2878,'threadId':_0xf90e35,'solved':_0x51b357[_0x1ed4a2(0xed)]?I[_0x1ed4a2(0x89)]:I[_0x1ed4a2(0x93)]},_0x3e4bb0=await this[_0x1ed4a2(0xb4)]['post'](_0x1ed4a2(0xd2)+_0x3c2878+'/solved',{'body':_0x4e906f});return!_0x3e4bb0[_0x1ed4a2(0xe3)][_0x1ed4a2(0xe0)]||_0x3e4bb0[_0x1ed4a2(0xe3)]['error'][_0x1ed4a2(0xc2)]===0x1;}async[_0x24ddea(0x9e)](_0x2220fe,_0x23b3fb,_0x3a9319,_0x58ac35){const _0x5a1418=_0x24ddea,_0x1447fd={'memberId':(await this['_sessionService'][_0x5a1418(0x75)](_0x2220fe))[_0x5a1418(0xd6)](),'threadId':_0x3a9319,'replyId':_0x58ac35,'unitId':_0x2220fe},_0x2d0b33=await this[_0x5a1418(0xb4)][_0x5a1418(0xbc)](_0x5a1418(0xd2)+_0x2220fe+_0x5a1418(0xe6),{'body':_0x1447fd});return!_0x2d0b33[_0x5a1418(0xe3)]['error']||_0x2d0b33['body'][_0x5a1418(0xe0)]['code']===0x1;}async[_0x24ddea(0x9a)](_0x280c3b,_0x47136e,_0x5516bd){const _0x598aeb=_0x24ddea,_0x2aae12={'unitId':_0x280c3b,'threadId':_0x5516bd},_0xf3ccb9=await this[_0x598aeb(0xb4)]['post'](_0x598aeb(0xd2)+_0x280c3b+_0x598aeb(0x76),{'body':_0x2aae12}),_0x1f8727=_0x5516bd[_0x598aeb(0xd7)](_0x432cc1=>G(_0xf3ccb9[_0x598aeb(0xe3)][_0x598aeb(0xe7)][_0x432cc1],_0x280c3b,_0x47136e))['filter'](Boolean);return Object[_0x598aeb(0xbf)](_0xf3ccb9[_0x598aeb(0xe3)][_0x598aeb(0xac)])[_0x598aeb(0xd5)](_0xd45459=>{this['_userService']['addUser'](_0xd45459);}),_0x1f8727;}['saveCommentToSnapshot'](_0x20bf5c){const _0x580168=_0x24ddea;return{'id':_0x20bf5c['id'],'threadId':_0x20bf5c[_0x580168(0xd8)],'ref':_0x20bf5c[_0x580168(0xbd)]};}};function _0x225e(){const _0x5d3d15=['add','COMMENT','12xGysNv','parse','HTTPService','CollaborationSessionService','Module','type','comment','UniverThreadCommentDataSourcePlugin','_threadCommentModel','Solved','11uzsjuu','@univerjs/core','_userService','content','9LvdUIk','commentUpdate$','/universer-api/user/list','Inject','UniverInstanceType','OpenOrReOpen','_initDataSource','filter','dataSource','30pWYNGC','Add','resolveComment','listComments','userID','merge','getUnit','deleteComment','UNIVER_UNKNOWN','Injector','@univerjs-pro/collaboration-client','DependentOn','replyId','_configService','UniverLicensePlugin','reply','405629ARPBlJ','_threadCommentDataSourceService','_initUserSync','get','Reply','users','Solve','customRanges','syncUpdateMutationToColla','4926488AKDVqh','disposeWithMe','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_httpService','IThreadCommentDataSourceService','UserManagerService','Plugin','replies','ThreadCommentModel','356ggtenQ','dayjs','post','ref','userId','values','subscribe','unitId','code','slice','_threadCommentDataSource','/add','getComment','YYYY/MM/DD\x20HH:mm','createTimestamp','delete','240766ywHTBY','user','_config','CommentService','find','_injector','1570768VPxMtb','_commentService','/universer-api/comment/unit/','addComment','/edit','forEach','getMemberID','map','threadId','@univerjs-pro/license','_init','parentId','_sessionService','Disposable','addUser','length','error','stringify','11542460yVyzcP','body','IConfigService','format','/delete','comments','rangeType','updateComment','onStarting','UniverThreadCommentUIPlugin','Unknown','resolved','UNRECOGNIZED','87309444lJVbnM','onReady','94660MulhwM','payload','root','solved','requireSession','/list','rxjs','rangeId','getOwnPropertyDescriptor','Delete','getUser','Edit','setConfig'];_0x225e=function(){return _0x5d3d15;};return _0x225e();}g=x([_(0x0,c[_0x24ddea(0x91)](P['HTTPService'])),_(0x1,c[_0x24ddea(0x91)](c[_0x24ddea(0xb6)])),_(0x2,c[_0x24ddea(0x91)](b[_0x24ddea(0x83)])),_(0x3,c[_0x24ddea(0x91)](c[_0x24ddea(0xa0)]))],g);var H=Object[_0x24ddea(0x79)],J=(_0x1ac2e1,_0x238708,_0x40a37b,_0x18bf20)=>{for(var _0x17f0f1=_0x18bf20>0x1?void 0x0:_0x18bf20?H(_0x238708,_0x40a37b):_0x238708,_0x13185a=_0x1ac2e1['length']-0x1,_0x5a00d5;_0x13185a>=0x0;_0x13185a--)(_0x5a00d5=_0x1ac2e1[_0x13185a])&&(_0x17f0f1=_0x5a00d5(_0x17f0f1)||_0x17f0f1);return _0x17f0f1;},y=(_0x10037a,_0xa89fa)=>(_0x347da0,_0x5560a5)=>_0xa89fa(_0x347da0,_0x5560a5,_0x10037a);let C=class extends c[_0x24ddea(0xdd)]{constructor(_0x5084ee,_0x3e4c74){const _0xf31e9e=_0x24ddea;super(),this[_0xf31e9e(0xa8)]=_0x5084ee,this[_0xf31e9e(0xc4)]=_0x3e4c74,this[_0xf31e9e(0x94)]();}[_0x24ddea(0x94)](){const _0x5b6c04=_0x24ddea;this['_threadCommentDataSourceService'][_0x5b6c04(0x96)]=this[_0x5b6c04(0xc4)],this['_threadCommentDataSourceService'][_0x5b6c04(0xaf)]=!0x1;}};C=J([y(0x0,M[_0x24ddea(0xb5)]),y(0x1,c[_0x24ddea(0x91)](g))],C);var F=Object[_0x24ddea(0xb2)],L=Object[_0x24ddea(0x79)],Z=(_0x5d285d,_0x277e88,_0x53c705)=>_0x277e88 in _0x5d285d?F(_0x5d285d,_0x277e88,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x53c705}):_0x5d285d[_0x277e88]=_0x53c705,W=(_0x290b4c,_0x18cc11,_0x229627,_0x78b9bc)=>{const _0x3bf288=_0x24ddea;for(var _0x361519=_0x78b9bc>0x1?void 0x0:_0x78b9bc?L(_0x18cc11,_0x229627):_0x18cc11,_0xa42ca1=_0x290b4c[_0x3bf288(0xdf)]-0x1,_0x4ae1ef;_0xa42ca1>=0x0;_0xa42ca1--)(_0x4ae1ef=_0x290b4c[_0xa42ca1])&&(_0x361519=_0x4ae1ef(_0x361519)||_0x361519);return _0x361519;},O=(_0x5dc3fe,_0x1cdbe8)=>(_0x2f76a7,_0x9477e3)=>_0x1cdbe8(_0x2f76a7,_0x9477e3,_0x5dc3fe),N=(_0x1dd854,_0x416377,_0x32ca8f)=>Z(_0x1dd854,typeof _0x416377!='symbol'?_0x416377+'':_0x416377,_0x32ca8f);exports[_0x24ddea(0x87)]=class extends c[_0x24ddea(0xb7)]{constructor(_0x40667c=D,_0x5d9eae,_0x145f14){const _0x1a42f8=_0x24ddea;super(),this[_0x1a42f8(0xcc)]=_0x40667c,this[_0x1a42f8(0xcf)]=_0x5d9eae,this[_0x1a42f8(0xa4)]=_0x145f14;const {..._0x4da845}=c[_0x1a42f8(0x9c)]({},D,this['_config']);this[_0x1a42f8(0xa4)][_0x1a42f8(0x7d)](q,_0x4da845);}[_0x24ddea(0xea)](){const _0xa67942=_0x24ddea;[[g],[C],[p]][_0xa67942(0xd5)](_0x1fdf7e=>{const _0x32be77=_0xa67942;this['_injector'][_0x32be77(0x7e)](_0x1fdf7e);});}[_0x24ddea(0xf0)](){const _0x21743a=_0x24ddea;this[_0x21743a(0xcf)][_0x21743a(0xaa)](C),this['_injector'][_0x21743a(0xaa)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x24ddea(0x85),c[_0x24ddea(0x92)][_0x24ddea(0x9f)]),exports[_0x24ddea(0x87)]=W([c[_0x24ddea(0xa2)](j[_0x24ddea(0xeb)],b['UniverCollaborationClientPlugin'],T[_0x24ddea(0xa5)]),O(0x1,c[_0x24ddea(0x91)](c[_0x24ddea(0xa0)])),O(0x2,c[_0x24ddea(0xe4)])],exports[_0x24ddea(0x87)]);
1
+ 'use strict';const _0x2c8270=_0x25f8;(function(_0x31aecb,_0x5df052){const _0x389b71=_0x25f8,_0x363393=_0x31aecb();while(!![]){try{const _0x185ddd=parseInt(_0x389b71(0x216))/0x1*(-parseInt(_0x389b71(0x203))/0x2)+parseInt(_0x389b71(0x1e1))/0x3*(-parseInt(_0x389b71(0x1da))/0x4)+-parseInt(_0x389b71(0x1d9))/0x5*(-parseInt(_0x389b71(0x1c8))/0x6)+-parseInt(_0x389b71(0x1cf))/0x7+parseInt(_0x389b71(0x1f7))/0x8+-parseInt(_0x389b71(0x1bb))/0x9*(parseInt(_0x389b71(0x1d7))/0xa)+-parseInt(_0x389b71(0x201))/0xb*(-parseInt(_0x389b71(0x205))/0xc);if(_0x185ddd===_0x5df052)break;else _0x363393['push'](_0x363393['shift']());}catch(_0x2be829){_0x363393['push'](_0x363393['shift']());}}}(_0x3437,0x8011f));Object[_0x2c8270(0x1fe)](exports,Symbol[_0x2c8270(0x1f2)],{'value':'Module'});const b=require(_0x2c8270(0x209)),T=require(_0x2c8270(0x1df)),c=require(_0x2c8270(0x211)),j=require(_0x2c8270(0x1c3)),M=require(_0x2c8270(0x214)),w=require('rxjs'),P=require(_0x2c8270(0x22d)),U=_0x2c8270(0x1d8);var I=(_0x1b2028=>(_0x1b2028[_0x1b2028['OpenOrReOpen']=0x0]=_0x2c8270(0x215),_0x1b2028[_0x1b2028[_0x2c8270(0x1de)]=0x1]=_0x2c8270(0x1de),_0x1b2028[_0x1b2028['UNRECOGNIZED']=-0x1]=_0x2c8270(0x224),_0x1b2028))(I||{}),v=(_0x480111=>(_0x480111[_0x480111['Unknown']=0x0]=_0x2c8270(0x1e2),_0x480111[_0x480111[_0x2c8270(0x1bf)]=0x1]='Add',_0x480111[_0x480111['Reply']=0x2]=_0x2c8270(0x1e7),_0x480111[_0x480111[_0x2c8270(0x218)]=0x3]=_0x2c8270(0x218),_0x480111[_0x480111[_0x2c8270(0x1e4)]=0x4]='Delete',_0x480111[_0x480111['Solve']=0x5]=_0x2c8270(0x213),_0x480111[_0x480111[_0x2c8270(0x224)]=-0x1]=_0x2c8270(0x224),_0x480111))(v||{});const f=_0x2d5bb7=>c[_0x2c8270(0x229)](new Date(+_0x2d5bb7))[_0x2c8270(0x21f)](_0x2c8270(0x227)),R=async(_0x594855,_0x12214a)=>{const _0x3b11fb=_0x2c8270,_0x1350aa=_0x594855[_0x3b11fb(0x1ed)](c['UserManagerService']),_0x26e21d=_0x594855['get'](P[_0x3b11fb(0x1ee)]);_0x12214a[_0x3b11fb(0x225)](_0x1c0ef1=>{const _0x151c2b=_0x3b11fb;_0x1350aa[_0x151c2b(0x223)](_0x1c0ef1)&&_0x12214a[_0x151c2b(0x226)](_0x1c0ef1);}),_0x12214a[_0x3b11fb(0x1ff)]&&(await _0x26e21d[_0x3b11fb(0x1ed)]('/universer-api/user/list',{'params':{'userIDs':[..._0x12214a]}}))['body'][_0x3b11fb(0x200)][_0x3b11fb(0x225)](_0x437dd2=>{const _0x2a8080=_0x3b11fb;_0x437dd2&&_0x1350aa[_0x2a8080(0x20d)](_0x437dd2);});};var $=Object[_0x2c8270(0x1b2)],E=(_0x2269c2,_0x477ae1,_0x298d74,_0x326dcb)=>{const _0x3e1b65=_0x2c8270;for(var _0xdab29c=_0x326dcb>0x1?void 0x0:_0x326dcb?$(_0x477ae1,_0x298d74):_0x477ae1,_0x560bf7=_0x2269c2[_0x3e1b65(0x1b9)]-0x1,_0x3c5dbd;_0x560bf7>=0x0;_0x560bf7--)(_0x3c5dbd=_0x2269c2[_0x560bf7])&&(_0xdab29c=_0x3c5dbd(_0xdab29c)||_0xdab29c);return _0xdab29c;},S=(_0x597199,_0x4cebcb)=>(_0x5e1603,_0x3c8fde)=>_0x4cebcb(_0x5e1603,_0x3c8fde,_0x597199);let p=class extends c[_0x2c8270(0x1db)]{constructor(_0x42c749,_0x1dd7f5,_0x4fdf13,_0x2f1401){const _0x2d8a49=_0x2c8270;super(),this[_0x2d8a49(0x217)]=_0x42c749,this[_0x2d8a49(0x1d3)]=_0x1dd7f5,this[_0x2d8a49(0x220)]=_0x4fdf13,this['_injector']=_0x2f1401,this[_0x2d8a49(0x1dd)](),this['_initUserSync']();}[_0x2c8270(0x1cd)](){const _0x31728a=_0x2c8270;this[_0x31728a(0x1eb)](this[_0x31728a(0x1d3)]['commentUpdate$'][_0x31728a(0x1c7)](w[_0x31728a(0x1e6)](0x10))[_0x31728a(0x1b1)](_0x2b49ae=>{const _0x53345b=_0x31728a,_0xb4006f=new Set();_0x2b49ae[_0x53345b(0x225)](_0x55d451=>{const _0x5eed8c=_0x53345b;switch(_0x55d451[_0x5eed8c(0x208)]){case'add':{const _0x38b34b=_0x55d451[_0x5eed8c(0x1b5)][_0x5eed8c(0x1cb)];_0xb4006f[_0x5eed8c(0x1f1)](_0x38b34b);break;}}}),R(this['_injector'],_0xb4006f);}));}[_0x2c8270(0x1dd)](){const _0x3879ed=_0x2c8270;this['disposeWithMe'](this[_0x3879ed(0x217)]['commentUpdate$']['subscribe'](async _0x596551=>{const _0x59bb07=_0x3879ed;var _0x200cfd,_0x176d1a,_0x590891,_0x1e1c98;const _0x59f296=(_0x200cfd=this[_0x59bb07(0x1d3)][_0x59bb07(0x21e)](_0x596551[_0x59bb07(0x202)])['find'](_0x3c0054=>_0x3c0054['threadId']===_0x596551[_0x59bb07(0x1f3)]))==null?void 0x0:_0x200cfd[_0x59bb07(0x1b8)];if(!_0x59f296)return;const {unitId:_0x391b13,subUnitId:_0x804a7d}=_0x59f296;switch(_0x596551[_0x59bb07(0x1dc)]&&this[_0x59bb07(0x220)][_0x59bb07(0x20d)](_0x596551[_0x59bb07(0x1dc)]),_0x596551[_0x59bb07(0x208)]){case v[_0x59bb07(0x1bf)]:break;case v['Reply']:{this['_threadCommentModel'][_0x59bb07(0x1c0)](_0x391b13,_0x804a7d,{'unitId':_0x391b13,'subUnitId':_0x804a7d,'ref':'','id':_0x596551[_0x59bb07(0x1f8)],'dT':f(+_0x596551[_0x59bb07(0x22e)]),'threadId':_0x596551['threadId'],'personId':(_0x590891=(_0x176d1a=_0x596551[_0x59bb07(0x1dc)])==null?void 0x0:_0x176d1a[_0x59bb07(0x1d1)])!=null?_0x590891:_0x596551[_0x59bb07(0x20b)],'text':JSON[_0x59bb07(0x219)](_0x596551[_0x59bb07(0x1fb)]),'parentId':_0x59f296['id']});break;}case v[_0x59bb07(0x1e4)]:{const _0x2b01f1=this[_0x59bb07(0x1d3)]['getComment'](_0x391b13,_0x804a7d,_0x596551[_0x59bb07(0x1f8)]);_0x2b01f1&&_0x2b01f1[_0x59bb07(0x1e8)]&&this['_threadCommentModel']['deleteComment'](_0x391b13,_0x804a7d,_0x596551[_0x59bb07(0x1f8)]);break;}case v['Edit']:{this[_0x59bb07(0x1d3)][_0x59bb07(0x1be)](_0x391b13,_0x804a7d,{'commentId':_0x596551['replyId'],'text':JSON[_0x59bb07(0x219)](_0x596551[_0x59bb07(0x1fb)])});break;}case v[_0x59bb07(0x213)]:{const _0x5f222d=(_0x1e1c98=this['_threadCommentModel'][_0x59bb07(0x21e)](_0x596551[_0x59bb07(0x202)])[_0x59bb07(0x1f0)](_0x181467=>_0x181467['threadId']===_0x596551[_0x59bb07(0x1f3)]))==null?void 0x0:_0x1e1c98[_0x59bb07(0x1b8)];_0x5f222d&&this[_0x59bb07(0x1d3)][_0x59bb07(0x1f5)](_0x391b13,_0x804a7d,_0x5f222d['id'],_0x596551[_0x59bb07(0x20a)]===I[_0x59bb07(0x1de)]);break;}}}));}};function _0x25f8(_0x26471c,_0x4507a0){const _0x3437e6=_0x3437();return _0x25f8=function(_0x25f85c,_0x1385b1){_0x25f85c=_0x25f85c-0x1b0;let _0x1d9aba=_0x3437e6[_0x25f85c];return _0x1d9aba;},_0x25f8(_0x26471c,_0x4507a0);}p=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0x2c8270(0x20c)](M[_0x2c8270(0x21b)])),S(0x2,c['Inject'](c[_0x2c8270(0x1c4)])),S(0x3,c[_0x2c8270(0x20c)](c['Injector']))],p);const q=_0x2c8270(0x1fc),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x4d8ba2,_0x42d9d5,_0x7748bf,_0x2aaeca)=>{const _0x169471=_0x2c8270;for(var _0x59f568=_0x2aaeca>0x1?void 0x0:_0x2aaeca?A(_0x42d9d5,_0x7748bf):_0x42d9d5,_0x33e88a=_0x4d8ba2[_0x169471(0x1b9)]-0x1,_0x3d4708;_0x33e88a>=0x0;_0x33e88a--)(_0x3d4708=_0x4d8ba2[_0x33e88a])&&(_0x59f568=_0x3d4708(_0x59f568)||_0x59f568);return _0x59f568;},_=(_0x11885c,_0x3fa214)=>(_0x22e18b,_0x25bf48)=>_0x3fa214(_0x22e18b,_0x25bf48,_0x11885c);function Y(_0x13c9f7,_0x50ce81){const _0x1dacc3=_0x2c8270,_0x44a1c3=_0x13c9f7[_0x1dacc3(0x1e5)][0x0];return{..._0x50ce81,'id':_0x44a1c3[_0x1dacc3(0x1f8)],'resolved':_0x13c9f7[_0x1dacc3(0x20a)]===0x1,'dT':f(_0x44a1c3[_0x1dacc3(0x22e)]),'personId':_0x44a1c3['userId'],'threadId':_0x44a1c3[_0x1dacc3(0x1f3)]};}function G(_0x17c02f,_0x9898ae,_0x4e2e5d){const _0x23d7bb=_0x2c8270;var _0x915e74,_0x4b651d;if(((_0x4b651d=(_0x915e74=_0x17c02f==null?void 0x0:_0x17c02f['replies'])==null?void 0x0:_0x915e74[_0x23d7bb(0x1b9)])!=null?_0x4b651d:0x0)>0x0){const _0x2f8694=(_0x45b3ab,_0x10b6ce)=>({'id':_0x45b3ab['replyId'],'threadId':_0x45b3ab[_0x23d7bb(0x1f3)],'dT':f(_0x45b3ab[_0x23d7bb(0x22e)]),'personId':_0x45b3ab[_0x23d7bb(0x20b)],'resolved':_0x17c02f[_0x23d7bb(0x20a)]===I['Solved'],'unitId':_0x9898ae,'subUnitId':_0x4e2e5d,'text':JSON[_0x23d7bb(0x219)](_0x45b3ab[_0x23d7bb(0x1fb)]),'parentId':_0x10b6ce}),_0x1f0aad=_0x2f8694(_0x17c02f['replies'][0x0]);return{..._0x1f0aad,'children':_0x17c02f[_0x23d7bb(0x1e5)][_0x23d7bb(0x1cc)](0x1)[_0x23d7bb(0x228)](_0x4cb3da=>_0x2f8694(_0x4cb3da,_0x1f0aad['id']))};}return null;}function _0x3437(){const _0x38107b=['Delete','replies','bufferTime','Reply','parentId','COMMENT','UniverLicensePlugin','disposeWithMe','_sessionService','get','HTTPService','getCurrentUser','find','add','toStringTag','threadId','onStarting','resolveComment','/edit','2331224qULARv','replyId','resolved','pluginName','content','thread-comment-data-source.config','CustomRangeType','defineProperty','size','users','4095245bFUyvq','unitId','381704HASMOO','body','36EOMSau','rangeType','CollaborationSessionService','type','@univerjs-pro/collaboration-client','solved','userId','Inject','addUser','_threadCommentDataSource','_config','_httpService','@univerjs/core','Plugin','Solve','@univerjs/thread-comment','OpenOrReOpen','1NCZCvD','_commentService','Edit','parse','/reply','ThreadCommentModel','rangeId','post','getUnit','format','_userService','comment','ref','getUser','UNRECOGNIZED','forEach','delete','YYYY/MM/DD\x20HH:mm','map','dayjs','code','deleteComment','values','@univerjs/network','createTimestamp','UNIVER_UNKNOWN','subscribe','getOwnPropertyDescriptor','_injector','getMemberID','payload','UniverThreadCommentUIPlugin','Injector','root','length','UniverCollaborationClientPlugin','126TOLbVt','/add','_initDataSource','updateComment','Add','addComment','onReady','/delete','@univerjs/thread-comment-ui','UserManagerService','reply','/universer-api/comment/unit/','pipe','60DFoiKu','DependentOn','merge','personId','slice','_initUserSync','UniverThreadCommentDataSourcePlugin','3183257BKfnmR','error','userID','filter','_threadCommentModel','/list','customRanges','stringify','518270hJVoKG','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','336485SntqBT','123668vasTXJ','Disposable','user','_init','Solved','@univerjs-pro/license','requireSession','18KtBJFw','Unknown','_threadCommentDataSourceService'];_0x3437=function(){return _0x38107b;};return _0x3437();}let g=class{constructor(_0x1dbf79,_0x34f1da,_0xe4ffd4,_0x3ab3ab){const _0x17c342=_0x2c8270;this[_0x17c342(0x210)]=_0x1dbf79,this[_0x17c342(0x220)]=_0x34f1da,this[_0x17c342(0x1ec)]=_0xe4ffd4,this[_0x17c342(0x1b3)]=_0x3ab3ab;}async[_0x2c8270(0x1c0)](_0x1b576a){const _0x2ce34b=_0x2c8270;var _0x3cb8d7,_0x103278;const {parentId:_0x1ac7ea,unitId:_0x26dd25,text:_0x45d5f1,threadId:_0xf5885a}=_0x1b576a,_0x1b5b29=(_0x103278=(_0x3cb8d7=_0x45d5f1[_0x2ce34b(0x1d5)])==null?void 0x0:_0x3cb8d7['filter'](_0x1b6b0a=>_0x1b6b0a['rangeType']===c['CustomRangeType'][_0x2ce34b(0x1e9)])[_0x2ce34b(0x228)](_0x1413e4=>_0x1413e4['rangeId']))!=null?_0x103278:[],_0xf7d7bc=JSON[_0x2ce34b(0x1d6)](_0x45d5f1),_0x510351=(await this[_0x2ce34b(0x1ec)][_0x2ce34b(0x1e0)](_0x26dd25))[_0x2ce34b(0x1b4)]();if(_0x1ac7ea){const _0x36775d={'memberId':_0x510351,'unitId':_0x26dd25,'content':_0xf7d7bc,'mention':_0x1b5b29,'threadId':_0xf5885a},_0x46948b=(await this[_0x2ce34b(0x210)]['post'](_0x2ce34b(0x1c6)+_0x26dd25+_0x2ce34b(0x21a),{'body':_0x36775d}))['body'][_0x2ce34b(0x1c5)];return{..._0x1b576a,'id':_0x46948b['replyId'],'dT':c['dayjs'](+_0x46948b[_0x2ce34b(0x22e)])[_0x2ce34b(0x21f)](_0x2ce34b(0x227)),'personId':_0x46948b[_0x2ce34b(0x20b)]};}else{const _0x4739fe={'memberId':_0x510351,'unitId':_0x26dd25,'content':_0xf7d7bc,'mention':_0x1b5b29},_0x5443e1=await this[_0x2ce34b(0x210)]['post'](_0x2ce34b(0x1c6)+_0x26dd25+_0x2ce34b(0x1bc),{'body':_0x4739fe});return Y(_0x5443e1[_0x2ce34b(0x204)][_0x2ce34b(0x221)],_0x1b576a);}}async[_0x2c8270(0x1be)](_0x3f1ba5){const _0x3b5df5=_0x2c8270;var _0xcc0291,_0x389985;const {text:_0xa455df,unitId:_0x2bb6f3}=_0x3f1ba5,_0x2b70e8=(_0x389985=(_0xcc0291=_0xa455df[_0x3b5df5(0x1d5)])==null?void 0x0:_0xcc0291[_0x3b5df5(0x1d2)](_0x52a15e=>_0x52a15e[_0x3b5df5(0x206)]===c[_0x3b5df5(0x1fd)]['COMMENT'])[_0x3b5df5(0x228)](_0x4d8387=>_0x4d8387[_0x3b5df5(0x21c)]))!=null?_0x389985:[],_0x151d31=JSON[_0x3b5df5(0x1d6)](_0xa455df),_0x31c457=_0x3f1ba5[_0x3b5df5(0x1f3)],_0x47e2c1=_0x3f1ba5['id'],_0x2c20bf={'memberId':(await this[_0x3b5df5(0x1ec)][_0x3b5df5(0x1e0)](_0x2bb6f3))['getMemberID'](),'unitId':_0x2bb6f3,'threadId':_0x31c457,'mention':_0x2b70e8,'content':_0x151d31,'replyId':_0x47e2c1},_0x2054cd=await this[_0x3b5df5(0x210)]['post'](_0x3b5df5(0x1c6)+_0x2bb6f3+_0x3b5df5(0x1f6),{'body':_0x2c20bf});return!_0x2054cd[_0x3b5df5(0x204)][_0x3b5df5(0x1d0)]||_0x2054cd[_0x3b5df5(0x204)]['error'][_0x3b5df5(0x22a)]===0x1;}async[_0x2c8270(0x1f5)](_0x1c534f){const _0x196225=_0x2c8270,{unitId:_0x30d8d6}=_0x1c534f,_0x4ee4d1=_0x1c534f['threadId'],_0x531b74={'memberId':this[_0x196225(0x220)][_0x196225(0x1ef)]()[_0x196225(0x1d1)],'unitId':_0x30d8d6,'threadId':_0x4ee4d1,'solved':_0x1c534f[_0x196225(0x1f9)]?I[_0x196225(0x1de)]:I[_0x196225(0x215)]},_0x571e79=await this[_0x196225(0x210)][_0x196225(0x21d)](_0x196225(0x1c6)+_0x30d8d6+'/solved',{'body':_0x531b74});return!_0x571e79['body']['error']||_0x571e79['body']['error'][_0x196225(0x22a)]===0x1;}async[_0x2c8270(0x22b)](_0x1df84d,_0x11cfcf,_0x479bc9,_0x1e156c){const _0x16e779=_0x2c8270,_0x43f335={'memberId':(await this['_sessionService']['requireSession'](_0x1df84d))['getMemberID'](),'threadId':_0x479bc9,'replyId':_0x1e156c,'unitId':_0x1df84d},_0xd6ff58=await this[_0x16e779(0x210)][_0x16e779(0x21d)]('/universer-api/comment/unit/'+_0x1df84d+_0x16e779(0x1c2),{'body':_0x43f335});return!_0xd6ff58[_0x16e779(0x204)][_0x16e779(0x1d0)]||_0xd6ff58[_0x16e779(0x204)][_0x16e779(0x1d0)]['code']===0x1;}async['listComments'](_0x309ec7,_0x2a6d74,_0xbee809){const _0xb8992e=_0x2c8270,_0xd59d0={'unitId':_0x309ec7,'threadId':_0xbee809},_0x556cc4=await this['_httpService']['post'](_0xb8992e(0x1c6)+_0x309ec7+_0xb8992e(0x1d4),{'body':_0xd59d0}),_0x24bb23=_0xbee809[_0xb8992e(0x228)](_0x388e92=>G(_0x556cc4['body']['comments'][_0x388e92],_0x309ec7,_0x2a6d74))[_0xb8992e(0x1d2)](Boolean);return Object[_0xb8992e(0x22c)](_0x556cc4[_0xb8992e(0x204)][_0xb8992e(0x200)])[_0xb8992e(0x225)](_0x2523ac=>{const _0x3ad14f=_0xb8992e;this['_userService'][_0x3ad14f(0x20d)](_0x2523ac);}),_0x24bb23;}['saveCommentToSnapshot'](_0x23b9c7){const _0x5da570=_0x2c8270;return{'id':_0x23b9c7['id'],'threadId':_0x23b9c7[_0x5da570(0x1f3)],'ref':_0x23b9c7[_0x5da570(0x222)]};}};g=x([_(0x0,c[_0x2c8270(0x20c)](P[_0x2c8270(0x1ee)])),_(0x1,c[_0x2c8270(0x20c)](c[_0x2c8270(0x1c4)])),_(0x2,c[_0x2c8270(0x20c)](b[_0x2c8270(0x207)])),_(0x3,c['Inject'](c[_0x2c8270(0x1b7)]))],g);var H=Object[_0x2c8270(0x1b2)],J=(_0x5e60bf,_0x48f300,_0x4e3fa0,_0x3e522f)=>{const _0x2f16a5=_0x2c8270;for(var _0x4727bd=_0x3e522f>0x1?void 0x0:_0x3e522f?H(_0x48f300,_0x4e3fa0):_0x48f300,_0x5134f1=_0x5e60bf[_0x2f16a5(0x1b9)]-0x1,_0x2aa726;_0x5134f1>=0x0;_0x5134f1--)(_0x2aa726=_0x5e60bf[_0x5134f1])&&(_0x4727bd=_0x2aa726(_0x4727bd)||_0x4727bd);return _0x4727bd;},y=(_0x31805c,_0x1ffa5f)=>(_0x2af3f0,_0x586d7c)=>_0x1ffa5f(_0x2af3f0,_0x586d7c,_0x31805c);let C=class extends c['Disposable']{constructor(_0x4e2d30,_0x5d3ece){const _0x2db353=_0x2c8270;super(),this['_threadCommentDataSourceService']=_0x4e2d30,this[_0x2db353(0x20e)]=_0x5d3ece,this[_0x2db353(0x1bd)]();}[_0x2c8270(0x1bd)](){const _0x32ff99=_0x2c8270;this[_0x32ff99(0x1e3)]['dataSource']=this[_0x32ff99(0x20e)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object[_0x2c8270(0x1fe)],L=Object['getOwnPropertyDescriptor'],Z=(_0x2bc437,_0x58f40f,_0x11140d)=>_0x58f40f in _0x2bc437?F(_0x2bc437,_0x58f40f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x11140d}):_0x2bc437[_0x58f40f]=_0x11140d,W=(_0x412185,_0x16591d,_0x2ca9dc,_0x4faf95)=>{const _0x23cb0b=_0x2c8270;for(var _0x2ac1e4=_0x4faf95>0x1?void 0x0:_0x4faf95?L(_0x16591d,_0x2ca9dc):_0x16591d,_0x1ddd8e=_0x412185[_0x23cb0b(0x1b9)]-0x1,_0x2e1ea0;_0x1ddd8e>=0x0;_0x1ddd8e--)(_0x2e1ea0=_0x412185[_0x1ddd8e])&&(_0x2ac1e4=_0x2e1ea0(_0x2ac1e4)||_0x2ac1e4);return _0x2ac1e4;},O=(_0x151174,_0xcb9186)=>(_0x3bef74,_0x22e250)=>_0xcb9186(_0x3bef74,_0x22e250,_0x151174),N=(_0x54be47,_0x47b9db,_0x1a6bf8)=>Z(_0x54be47,typeof _0x47b9db!='symbol'?_0x47b9db+'':_0x47b9db,_0x1a6bf8);exports[_0x2c8270(0x1ce)]=class extends c[_0x2c8270(0x212)]{constructor(_0xe80307=D,_0x1387b1,_0x486353){const _0x26ab11=_0x2c8270;super(),this[_0x26ab11(0x20f)]=_0xe80307,this[_0x26ab11(0x1b3)]=_0x1387b1,this['_configService']=_0x486353;const {..._0xc6173}=c[_0x26ab11(0x1ca)]({},D,this[_0x26ab11(0x20f)]);this['_configService']['setConfig'](q,_0xc6173);}[_0x2c8270(0x1f4)](){const _0x51cb87=_0x2c8270;[[g],[C],[p]][_0x51cb87(0x225)](_0x58c002=>{const _0x4cd4e6=_0x51cb87;this[_0x4cd4e6(0x1b3)][_0x4cd4e6(0x1f1)](_0x58c002);});}[_0x2c8270(0x1c1)](){const _0x5850b3=_0x2c8270;this[_0x5850b3(0x1b3)][_0x5850b3(0x1ed)](C),this[_0x5850b3(0x1b3)]['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x2c8270(0x1fa),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c['UniverInstanceType'][_0x2c8270(0x1b0)]),exports[_0x2c8270(0x1ce)]=W([c[_0x2c8270(0x1c9)](j[_0x2c8270(0x1b6)],b[_0x2c8270(0x1ba)],T[_0x2c8270(0x1ea)]),O(0x1,c[_0x2c8270(0x20c)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x2c8270(0x1ce)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5af817=_0x52b1;(function(_0x18099e,_0x4eb9f0){const _0x4d06d5=_0x52b1,_0x2e5aed=_0x18099e();while(!![]){try{const _0x511d4=-parseInt(_0x4d06d5(0x1be))/0x1*(parseInt(_0x4d06d5(0x1e7))/0x2)+-parseInt(_0x4d06d5(0x20f))/0x3+parseInt(_0x4d06d5(0x1c0))/0x4+-parseInt(_0x4d06d5(0x1e6))/0x5+parseInt(_0x4d06d5(0x1cf))/0x6+-parseInt(_0x4d06d5(0x1d2))/0x7*(-parseInt(_0x4d06d5(0x1ce))/0x8)+-parseInt(_0x4d06d5(0x1ed))/0x9;if(_0x511d4===_0x4eb9f0)break;else _0x2e5aed['push'](_0x2e5aed['shift']());}catch(_0x34f9a9){_0x2e5aed['push'](_0x2e5aed['shift']());}}}(_0x4617,0xa3da2));import{CommentService as _0x498a04,CollaborationSessionService as _0x339043,UniverCollaborationClientPlugin as _0x2a0745}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x40a7c8}from'@univerjs-pro/license';import{dayjs as _0x146095,UserManagerService as _0x253cfc,Inject as _0x1024f5,Injector as _0x500c18,Disposable as _0x1a58c4,CustomRangeType as _0x1b28c6,UniverInstanceType as _0x175b10,DependentOn as _0x17566a,IConfigService as _0x51ffa0,Plugin as _0x4977e9,merge as _0x1a1e5e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x513b47}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x532a04,IThreadCommentDataSourceService as _0x31e088}from'@univerjs/thread-comment';import{bufferTime as _0x58b843}from'rxjs';import{HTTPService as _0x375401}from'@univerjs/network';const W=_0x5af817(0x1b2);function _0x4617(){const _0x295def=['_threadCommentDataSourceService','addUser','code','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','_sessionService','/delete','2326395nqrXDu','2MYDwgB','deleteComment','Edit','requireSession','rangeId','content','2871621akjyaW','userID','users','Add','resolveComment','onStarting','length','post','rangeType','commentUpdate$','/universer-api/user/list','pluginName','thread-comment-data-source.config','map','saveCommentToSnapshot','pipe','/list','createTimestamp','find','onReady','_config','UNRECOGNIZED','defineProperty','_initDataSource','getUser','unitId','getOwnPropertyDescriptor','forEach','/universer-api/comment/unit/','replyId','error','Reply','format','userId','474558EnrPEW','getCurrentUser','add','symbol','comments','syncUpdateMutationToColla','OpenOrReOpen','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','root','Delete','resolved','disposeWithMe','_injector','user','_commentService','getMemberID','Solve','/reply','1299806ZdSTAs','reply','1368984BsnSMN','threadId','getUnit','filter','Unknown','get','replies','_httpService','_configService','COMMENT','addComment','listComments','slice','body','10174552MwuSby','7796478BGxbrT','_userService','stringify','7mLRzZi','values','parentId','subscribe','setConfig','type','comment','solved','Solved','parse','delete','dataSource','getComment'];_0x4617=function(){return _0x295def;};return _0x4617();}var I=(_0x40a8c3=>(_0x40a8c3[_0x40a8c3['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x40a8c3[_0x40a8c3[_0x5af817(0x1da)]=0x1]=_0x5af817(0x1da),_0x40a8c3[_0x40a8c3[_0x5af817(0x202)]=-0x1]=_0x5af817(0x202),_0x40a8c3))(I||{}),v=(_0x31ed0c=>(_0x31ed0c[_0x31ed0c['Unknown']=0x0]=_0x5af817(0x1c4),_0x31ed0c[_0x31ed0c[_0x5af817(0x1f0)]=0x1]=_0x5af817(0x1f0),_0x31ed0c[_0x31ed0c[_0x5af817(0x20c)]=0x2]=_0x5af817(0x20c),_0x31ed0c[_0x31ed0c['Edit']=0x3]=_0x5af817(0x1e9),_0x31ed0c[_0x31ed0c[_0x5af817(0x1b5)]=0x4]='Delete',_0x31ed0c[_0x31ed0c['Solve']=0x5]=_0x5af817(0x1bc),_0x31ed0c[_0x31ed0c[_0x5af817(0x202)]=-0x1]='UNRECOGNIZED',_0x31ed0c))(v||{});const D=_0xdda57d=>_0x146095(new Date(+_0xdda57d))[_0x5af817(0x20d)](_0x5af817(0x1e2)),B=async(_0xa1b7d4,_0x1a05fb)=>{const _0x530eae=_0x5af817,_0x4e4670=_0xa1b7d4[_0x530eae(0x1c5)](_0x253cfc),_0x338d95=_0xa1b7d4[_0x530eae(0x1c5)](_0x375401);_0x1a05fb[_0x530eae(0x208)](_0x26c221=>{const _0x431492=_0x530eae;_0x4e4670[_0x431492(0x205)](_0x26c221)&&_0x1a05fb[_0x431492(0x1dc)](_0x26c221);}),_0x1a05fb['size']&&(await _0x338d95[_0x530eae(0x1c5)](_0x530eae(0x1f7),{'params':{'userIDs':[..._0x1a05fb]}}))[_0x530eae(0x1cd)][_0x530eae(0x1ef)][_0x530eae(0x208)](_0x4da052=>{const _0x3dbbc9=_0x530eae;_0x4da052&&_0x4e4670[_0x3dbbc9(0x1e0)](_0x4da052);});};var K=Object[_0x5af817(0x207)],V=(_0x20b6e8,_0x57a2bd,_0x298383,_0x55291f)=>{const _0x1b2834=_0x5af817;for(var _0xdbec4d=_0x55291f>0x1?void 0x0:_0x55291f?K(_0x57a2bd,_0x298383):_0x57a2bd,_0x597d86=_0x20b6e8[_0x1b2834(0x1f3)]-0x1,_0x41f298;_0x597d86>=0x0;_0x597d86--)(_0x41f298=_0x20b6e8[_0x597d86])&&(_0xdbec4d=_0x41f298(_0xdbec4d)||_0xdbec4d);return _0xdbec4d;},p=(_0x5749c8,_0x1bcf80)=>(_0x5d3b03,_0x9ae975)=>_0x1bcf80(_0x5d3b03,_0x9ae975,_0x5749c8);let S=class extends _0x1a58c4{constructor(_0x44d963,_0x2b937d,_0x59e383,_0x18c454){const _0x136d5a=_0x5af817;super(),this[_0x136d5a(0x1ba)]=_0x44d963,this[_0x136d5a(0x1b3)]=_0x2b937d,this[_0x136d5a(0x1d0)]=_0x59e383,this[_0x136d5a(0x1b8)]=_0x18c454,this[_0x136d5a(0x1b1)](),this['_initUserSync']();}['_initUserSync'](){const _0x114fcb=_0x5af817;this[_0x114fcb(0x1b7)](this['_threadCommentModel'][_0x114fcb(0x1f6)][_0x114fcb(0x1fc)](_0x58b843(0x10))[_0x114fcb(0x1d5)](_0x429217=>{const _0x423583=_0x114fcb,_0x31f1de=new Set();_0x429217['forEach'](_0x3898d9=>{const _0x12717f=_0x52b1;switch(_0x3898d9['type']){case _0x12717f(0x211):{const _0xbf14cd=_0x3898d9['payload']['personId'];_0x31f1de[_0x12717f(0x211)](_0xbf14cd);break;}}}),B(this[_0x423583(0x1b8)],_0x31f1de);}));}[_0x5af817(0x1b1)](){const _0x5ce26e=_0x5af817;this[_0x5ce26e(0x1b7)](this[_0x5ce26e(0x1ba)][_0x5ce26e(0x1f6)][_0x5ce26e(0x1d5)](async _0x1224dd=>{const _0x100fe0=_0x5ce26e;var _0x2dcbcc,_0xcf9636,_0x2783ae,_0x4da040;const _0x2ce041=(_0x2dcbcc=this[_0x100fe0(0x1b3)]['getUnit'](_0x1224dd[_0x100fe0(0x206)])[_0x100fe0(0x1ff)](_0x5df0ed=>_0x5df0ed['threadId']===_0x1224dd[_0x100fe0(0x1c1)]))==null?void 0x0:_0x2dcbcc[_0x100fe0(0x1b4)];if(!_0x2ce041)return;const {unitId:_0x44d994,subUnitId:_0x584b37}=_0x2ce041;switch(_0x1224dd[_0x100fe0(0x1b9)]&&this['_userService'][_0x100fe0(0x1e0)](_0x1224dd[_0x100fe0(0x1b9)]),_0x1224dd['type']){case v[_0x100fe0(0x1f0)]:break;case v[_0x100fe0(0x20c)]:{this[_0x100fe0(0x1b3)][_0x100fe0(0x1ca)](_0x44d994,_0x584b37,{'unitId':_0x44d994,'subUnitId':_0x584b37,'ref':'','id':_0x1224dd[_0x100fe0(0x20a)],'dT':D(+_0x1224dd[_0x100fe0(0x1fe)]),'threadId':_0x1224dd[_0x100fe0(0x1c1)],'personId':(_0x2783ae=(_0xcf9636=_0x1224dd[_0x100fe0(0x1b9)])==null?void 0x0:_0xcf9636[_0x100fe0(0x1ee)])!=null?_0x2783ae:_0x1224dd[_0x100fe0(0x20e)],'text':JSON['parse'](_0x1224dd[_0x100fe0(0x1ec)]),'parentId':_0x2ce041['id']});break;}case v[_0x100fe0(0x1b5)]:{const _0x4c3ae0=this[_0x100fe0(0x1b3)][_0x100fe0(0x1de)](_0x44d994,_0x584b37,_0x1224dd[_0x100fe0(0x20a)]);_0x4c3ae0&&_0x4c3ae0[_0x100fe0(0x1d4)]&&this[_0x100fe0(0x1b3)][_0x100fe0(0x1e8)](_0x44d994,_0x584b37,_0x1224dd[_0x100fe0(0x20a)]);break;}case v[_0x100fe0(0x1e9)]:{this[_0x100fe0(0x1b3)]['updateComment'](_0x44d994,_0x584b37,{'commentId':_0x1224dd[_0x100fe0(0x20a)],'text':JSON[_0x100fe0(0x1db)](_0x1224dd['content'])});break;}case v[_0x100fe0(0x1bc)]:{const _0x14f0ba=(_0x4da040=this['_threadCommentModel'][_0x100fe0(0x1c2)](_0x1224dd['unitId'])['find'](_0x294c9a=>_0x294c9a['threadId']===_0x1224dd[_0x100fe0(0x1c1)]))==null?void 0x0:_0x4da040[_0x100fe0(0x1b4)];_0x14f0ba&&this[_0x100fe0(0x1b3)][_0x100fe0(0x1f1)](_0x44d994,_0x584b37,_0x14f0ba['id'],_0x1224dd[_0x100fe0(0x1d9)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x1024f5(_0x498a04)),p(0x1,_0x1024f5(_0x532a04)),p(0x2,_0x1024f5(_0x253cfc)),p(0x3,_0x1024f5(_0x500c18))],S);const z=_0x5af817(0x1f9),M={};var k=Object[_0x5af817(0x207)],Q=(_0x2787e9,_0x2a84de,_0x40082e,_0x3cea38)=>{for(var _0x294357=_0x3cea38>0x1?void 0x0:_0x3cea38?k(_0x2a84de,_0x40082e):_0x2a84de,_0x43f81f=_0x2787e9['length']-0x1,_0x8d983a;_0x43f81f>=0x0;_0x43f81f--)(_0x8d983a=_0x2787e9[_0x43f81f])&&(_0x294357=_0x8d983a(_0x294357)||_0x294357);return _0x294357;},_=(_0x53befe,_0x10ebfb)=>(_0x260bbb,_0x7ddaff)=>_0x10ebfb(_0x260bbb,_0x7ddaff,_0x53befe);function X(_0xf02a6a,_0x19896b){const _0x6eb1a3=_0x5af817,_0x25efa7=_0xf02a6a['replies'][0x0];return{..._0x19896b,'id':_0x25efa7[_0x6eb1a3(0x20a)],'resolved':_0xf02a6a[_0x6eb1a3(0x1d9)]===0x1,'dT':D(_0x25efa7['createTimestamp']),'personId':_0x25efa7[_0x6eb1a3(0x20e)],'threadId':_0x25efa7[_0x6eb1a3(0x1c1)]};}function ee(_0x53718d,_0x47e15a,_0x2ec43d){const _0x1e4213=_0x5af817;var _0x5d485c,_0x9f0f78;if(((_0x9f0f78=(_0x5d485c=_0x53718d==null?void 0x0:_0x53718d['replies'])==null?void 0x0:_0x5d485c[_0x1e4213(0x1f3)])!=null?_0x9f0f78:0x0)>0x0){const _0x231253=(_0x779f3e,_0x41a5aa)=>({'id':_0x779f3e[_0x1e4213(0x20a)],'threadId':_0x779f3e[_0x1e4213(0x1c1)],'dT':D(_0x779f3e[_0x1e4213(0x1fe)]),'personId':_0x779f3e[_0x1e4213(0x20e)],'resolved':_0x53718d[_0x1e4213(0x1d9)]===I[_0x1e4213(0x1da)],'unitId':_0x47e15a,'subUnitId':_0x2ec43d,'text':JSON[_0x1e4213(0x1db)](_0x779f3e[_0x1e4213(0x1ec)]),'parentId':_0x41a5aa}),_0x236f50=_0x231253(_0x53718d[_0x1e4213(0x1c6)][0x0]);return{..._0x236f50,'children':_0x53718d[_0x1e4213(0x1c6)][_0x1e4213(0x1cc)](0x1)[_0x1e4213(0x1fa)](_0x6e3739=>_0x231253(_0x6e3739,_0x236f50['id']))};}return null;}let f=class{constructor(_0x59d1dc,_0x58580d,_0x47d25f,_0x1162ca){const _0x2c1b46=_0x5af817;this['_httpService']=_0x59d1dc,this['_userService']=_0x58580d,this[_0x2c1b46(0x1e4)]=_0x47d25f,this[_0x2c1b46(0x1b8)]=_0x1162ca;}async['addComment'](_0x4b49eb){const _0x17e06f=_0x5af817;var _0x21d4ab,_0x2d710b;const {parentId:_0x385a6e,unitId:_0x2b81ff,text:_0x2f9e47,threadId:_0x3312cf}=_0x4b49eb,_0x317f95=(_0x2d710b=(_0x21d4ab=_0x2f9e47['customRanges'])==null?void 0x0:_0x21d4ab[_0x17e06f(0x1c3)](_0x224cd9=>_0x224cd9[_0x17e06f(0x1f5)]===_0x1b28c6[_0x17e06f(0x1c9)])['map'](_0x22641d=>_0x22641d[_0x17e06f(0x1eb)]))!=null?_0x2d710b:[],_0x1555a1=JSON['stringify'](_0x2f9e47),_0x2ec2d7=(await this[_0x17e06f(0x1e4)][_0x17e06f(0x1ea)](_0x2b81ff))[_0x17e06f(0x1bb)]();if(_0x385a6e){const _0x39bb5e={'memberId':_0x2ec2d7,'unitId':_0x2b81ff,'content':_0x1555a1,'mention':_0x317f95,'threadId':_0x3312cf},_0x323498=(await this[_0x17e06f(0x1c7)][_0x17e06f(0x1f4)]('/universer-api/comment/unit/'+_0x2b81ff+_0x17e06f(0x1bd),{'body':_0x39bb5e}))[_0x17e06f(0x1cd)][_0x17e06f(0x1bf)];return{..._0x4b49eb,'id':_0x323498['replyId'],'dT':_0x146095(+_0x323498[_0x17e06f(0x1fe)])['format'](_0x17e06f(0x1e2)),'personId':_0x323498[_0x17e06f(0x20e)]};}else{const _0x50c778={'memberId':_0x2ec2d7,'unitId':_0x2b81ff,'content':_0x1555a1,'mention':_0x317f95},_0x2a7732=await this[_0x17e06f(0x1c7)][_0x17e06f(0x1f4)](_0x17e06f(0x209)+_0x2b81ff+'/add',{'body':_0x50c778});return X(_0x2a7732[_0x17e06f(0x1cd)][_0x17e06f(0x1d8)],_0x4b49eb);}}async['updateComment'](_0x4945ee){const _0x2de3fd=_0x5af817;var _0x48ebc6,_0x1c88ec;const {text:_0x485f86,unitId:_0x5a5ef4}=_0x4945ee,_0x254042=(_0x1c88ec=(_0x48ebc6=_0x485f86['customRanges'])==null?void 0x0:_0x48ebc6[_0x2de3fd(0x1c3)](_0x43c832=>_0x43c832[_0x2de3fd(0x1f5)]===_0x1b28c6['COMMENT'])[_0x2de3fd(0x1fa)](_0x12552d=>_0x12552d[_0x2de3fd(0x1eb)]))!=null?_0x1c88ec:[],_0x19e35f=JSON[_0x2de3fd(0x1d1)](_0x485f86),_0x1151a4=_0x4945ee[_0x2de3fd(0x1c1)],_0x33b77e=_0x4945ee['id'],_0x49cdaf={'memberId':(await this['_sessionService'][_0x2de3fd(0x1ea)](_0x5a5ef4))[_0x2de3fd(0x1bb)](),'unitId':_0x5a5ef4,'threadId':_0x1151a4,'mention':_0x254042,'content':_0x19e35f,'replyId':_0x33b77e},_0x2e1826=await this[_0x2de3fd(0x1c7)][_0x2de3fd(0x1f4)]('/universer-api/comment/unit/'+_0x5a5ef4+'/edit',{'body':_0x49cdaf});return!_0x2e1826[_0x2de3fd(0x1cd)][_0x2de3fd(0x20b)]||_0x2e1826[_0x2de3fd(0x1cd)][_0x2de3fd(0x20b)][_0x2de3fd(0x1e1)]===0x1;}async[_0x5af817(0x1f1)](_0x49d58a){const _0x3de162=_0x5af817,{unitId:_0x354fdb}=_0x49d58a,_0x33a349=_0x49d58a[_0x3de162(0x1c1)],_0x4d20b9={'memberId':this[_0x3de162(0x1d0)][_0x3de162(0x210)]()[_0x3de162(0x1ee)],'unitId':_0x354fdb,'threadId':_0x33a349,'solved':_0x49d58a[_0x3de162(0x1b6)]?I[_0x3de162(0x1da)]:I[_0x3de162(0x215)]},_0x35ffa2=await this[_0x3de162(0x1c7)][_0x3de162(0x1f4)]('/universer-api/comment/unit/'+_0x354fdb+'/solved',{'body':_0x4d20b9});return!_0x35ffa2['body'][_0x3de162(0x20b)]||_0x35ffa2['body']['error'][_0x3de162(0x1e1)]===0x1;}async[_0x5af817(0x1e8)](_0x23f4ec,_0x52bdba,_0x44a5eb,_0x3466f5){const _0x6ebf77=_0x5af817,_0x3cf0a8={'memberId':(await this[_0x6ebf77(0x1e4)]['requireSession'](_0x23f4ec))['getMemberID'](),'threadId':_0x44a5eb,'replyId':_0x3466f5,'unitId':_0x23f4ec},_0x3d309f=await this[_0x6ebf77(0x1c7)][_0x6ebf77(0x1f4)](_0x6ebf77(0x209)+_0x23f4ec+_0x6ebf77(0x1e5),{'body':_0x3cf0a8});return!_0x3d309f['body'][_0x6ebf77(0x20b)]||_0x3d309f[_0x6ebf77(0x1cd)]['error'][_0x6ebf77(0x1e1)]===0x1;}async[_0x5af817(0x1cb)](_0x4cd549,_0x2044f3,_0x182bf6){const _0xba06cb=_0x5af817,_0x726cb1={'unitId':_0x4cd549,'threadId':_0x182bf6},_0x2c2fd0=await this[_0xba06cb(0x1c7)][_0xba06cb(0x1f4)](_0xba06cb(0x209)+_0x4cd549+_0xba06cb(0x1fd),{'body':_0x726cb1}),_0x12e1d4=_0x182bf6['map'](_0x4dbb08=>ee(_0x2c2fd0['body'][_0xba06cb(0x213)][_0x4dbb08],_0x4cd549,_0x2044f3))[_0xba06cb(0x1c3)](Boolean);return Object[_0xba06cb(0x1d3)](_0x2c2fd0[_0xba06cb(0x1cd)][_0xba06cb(0x1ef)])['forEach'](_0x4b10db=>{const _0x4e4f29=_0xba06cb;this[_0x4e4f29(0x1d0)][_0x4e4f29(0x1e0)](_0x4b10db);}),_0x12e1d4;}[_0x5af817(0x1fb)](_0x4598dd){return{'id':_0x4598dd['id'],'threadId':_0x4598dd['threadId'],'ref':_0x4598dd['ref']};}};f=Q([_(0x0,_0x1024f5(_0x375401)),_(0x1,_0x1024f5(_0x253cfc)),_(0x2,_0x1024f5(_0x339043)),_(0x3,_0x1024f5(_0x500c18))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x54645e,_0x2f4f82,_0x119bd0,_0x4a8e0a)=>{const _0x753257=_0x5af817;for(var _0x3e084c=_0x4a8e0a>0x1?void 0x0:_0x4a8e0a?re(_0x2f4f82,_0x119bd0):_0x2f4f82,_0x5cb717=_0x54645e[_0x753257(0x1f3)]-0x1,_0x520c50;_0x5cb717>=0x0;_0x5cb717--)(_0x520c50=_0x54645e[_0x5cb717])&&(_0x3e084c=_0x520c50(_0x3e084c)||_0x3e084c);return _0x3e084c;},N=(_0x349013,_0x563dfd)=>(_0x518fd4,_0x2d68db)=>_0x563dfd(_0x518fd4,_0x2d68db,_0x349013);function _0x52b1(_0xa09449,_0x1cd1a7){const _0x461703=_0x4617();return _0x52b1=function(_0x52b153,_0x57cb9f){_0x52b153=_0x52b153-0x1b1;let _0x188f23=_0x461703[_0x52b153];return _0x188f23;},_0x52b1(_0xa09449,_0x1cd1a7);}let g=class extends _0x1a58c4{constructor(_0x101963,_0x458e6c){const _0x155773=_0x5af817;super(),this[_0x155773(0x1df)]=_0x101963,this[_0x155773(0x1e3)]=_0x458e6c,this['_initDataSource']();}[_0x5af817(0x204)](){const _0x25041d=_0x5af817;this['_threadCommentDataSourceService'][_0x25041d(0x1dd)]=this[_0x25041d(0x1e3)],this[_0x25041d(0x1df)][_0x25041d(0x214)]=!0x1;}};g=te([N(0x0,_0x31e088),N(0x1,_0x1024f5(f))],g);var se=Object[_0x5af817(0x203)],oe=Object[_0x5af817(0x207)],ne=(_0x4a1aae,_0x9989d2,_0x451eba)=>_0x9989d2 in _0x4a1aae?se(_0x4a1aae,_0x9989d2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x451eba}):_0x4a1aae[_0x9989d2]=_0x451eba,ie=(_0x32358a,_0x5c1f3e,_0x35a4b7,_0x1125f0)=>{const _0x37a8cd=_0x5af817;for(var _0x512706=_0x1125f0>0x1?void 0x0:_0x1125f0?oe(_0x5c1f3e,_0x35a4b7):_0x5c1f3e,_0x567da2=_0x32358a[_0x37a8cd(0x1f3)]-0x1,_0x5be124;_0x567da2>=0x0;_0x567da2--)(_0x5be124=_0x32358a[_0x567da2])&&(_0x512706=_0x5be124(_0x512706)||_0x512706);return _0x512706;},w=(_0x18562c,_0x2c2433)=>(_0x4da58c,_0xcc80e)=>_0x2c2433(_0x4da58c,_0xcc80e,_0x18562c),$=(_0x1e39da,_0x2cf86d,_0x597d82)=>ne(_0x1e39da,typeof _0x2cf86d!=_0x5af817(0x212)?_0x2cf86d+'':_0x2cf86d,_0x597d82);let b=class extends _0x4977e9{constructor(_0xe46c66=M,_0x27c311,_0xed5db9){const _0x157754=_0x5af817;super(),this[_0x157754(0x201)]=_0xe46c66,this[_0x157754(0x1b8)]=_0x27c311,this[_0x157754(0x1c8)]=_0xed5db9;const {..._0x41be85}=_0x1a1e5e({},M,this[_0x157754(0x201)]);this['_configService'][_0x157754(0x1d6)](z,_0x41be85);}[_0x5af817(0x1f2)](){const _0x4636ac=_0x5af817;[[f],[g],[S]][_0x4636ac(0x208)](_0x3a33ad=>{this['_injector']['add'](_0x3a33ad);});}[_0x5af817(0x200)](){const _0xc29a83=_0x5af817;this[_0xc29a83(0x1b8)]['get'](g),this[_0xc29a83(0x1b8)][_0xc29a83(0x1c5)](S);}};$(b,_0x5af817(0x1f8),W),$(b,_0x5af817(0x1d7),_0x175b10['UNIVER_UNKNOWN']),b=ie([_0x17566a(_0x513b47,_0x2a0745,_0x40a7c8),w(0x1,_0x1024f5(_0x500c18)),w(0x2,_0x51ffa0)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x118477=_0xe34e;(function(_0x356792,_0x421ed7){const _0x2d36a1=_0xe34e,_0x9bf74=_0x356792();while(!![]){try{const _0x171318=-parseInt(_0x2d36a1(0xf2))/0x1+parseInt(_0x2d36a1(0x123))/0x2*(-parseInt(_0x2d36a1(0x134))/0x3)+parseInt(_0x2d36a1(0x13d))/0x4*(parseInt(_0x2d36a1(0x12f))/0x5)+parseInt(_0x2d36a1(0x10d))/0x6+parseInt(_0x2d36a1(0x14b))/0x7+-parseInt(_0x2d36a1(0x12d))/0x8*(parseInt(_0x2d36a1(0x130))/0x9)+parseInt(_0x2d36a1(0x102))/0xa;if(_0x171318===_0x421ed7)break;else _0x9bf74['push'](_0x9bf74['shift']());}catch(_0x4edaba){_0x9bf74['push'](_0x9bf74['shift']());}}}(_0x36d7,0xd0d28));import{CommentService as _0x1448e6,CollaborationSessionService as _0x2a8abb,UniverCollaborationClientPlugin as _0x243904}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4f60b2}from'@univerjs-pro/license';import{dayjs as _0x296005,UserManagerService as _0xca3c4f,Inject as _0x1ab595,Injector as _0x3a9059,Disposable as _0x4abb9d,CustomRangeType as _0x10593c,UniverInstanceType as _0x7eb5b0,DependentOn as _0x652ecb,IConfigService as _0x49fb74,Plugin as _0x5214e1,merge as _0x5d8e9c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x255d00}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1fe52e,IThreadCommentDataSourceService as _0x37829d}from'@univerjs/thread-comment';import{bufferTime as _0x1403eb}from'rxjs';import{HTTPService as _0x1b49ae}from'@univerjs/network';const W=_0x118477(0x10c);var I=(_0x13c7fe=>(_0x13c7fe[_0x13c7fe['OpenOrReOpen']=0x0]=_0x118477(0x13c),_0x13c7fe[_0x13c7fe[_0x118477(0x10b)]=0x1]=_0x118477(0x10b),_0x13c7fe[_0x13c7fe[_0x118477(0xf8)]=-0x1]=_0x118477(0xf8),_0x13c7fe))(I||{}),v=(_0x5f4174=>(_0x5f4174[_0x5f4174[_0x118477(0x101)]=0x0]=_0x118477(0x101),_0x5f4174[_0x5f4174[_0x118477(0xef)]=0x1]=_0x118477(0xef),_0x5f4174[_0x5f4174[_0x118477(0x138)]=0x2]=_0x118477(0x138),_0x5f4174[_0x5f4174[_0x118477(0xfa)]=0x3]='Edit',_0x5f4174[_0x5f4174['Delete']=0x4]=_0x118477(0x127),_0x5f4174[_0x5f4174[_0x118477(0x122)]=0x5]='Solve',_0x5f4174[_0x5f4174[_0x118477(0xf8)]=-0x1]=_0x118477(0xf8),_0x5f4174))(v||{});const D=_0x1dc453=>_0x296005(new Date(+_0x1dc453))[_0x118477(0x108)](_0x118477(0x13b)),B=async(_0xc92a9f,_0x376fea)=>{const _0x4e178a=_0x118477,_0x322ed4=_0xc92a9f[_0x4e178a(0x126)](_0xca3c4f),_0x398372=_0xc92a9f[_0x4e178a(0x126)](_0x1b49ae);_0x376fea[_0x4e178a(0x14e)](_0x42be50=>{_0x322ed4['getUser'](_0x42be50)&&_0x376fea['delete'](_0x42be50);}),_0x376fea[_0x4e178a(0xfb)]&&(await _0x398372[_0x4e178a(0x126)](_0x4e178a(0x124),{'params':{'userIDs':[..._0x376fea]}}))['body'][_0x4e178a(0x13a)][_0x4e178a(0x14e)](_0x6f3e97=>{const _0x2fe8b9=_0x4e178a;_0x6f3e97&&_0x322ed4[_0x2fe8b9(0xfe)](_0x6f3e97);});};var K=Object[_0x118477(0x11b)],V=(_0x3d39c3,_0x5f4370,_0x1ed8f7,_0x48dc82)=>{const _0x4e890e=_0x118477;for(var _0x58e24f=_0x48dc82>0x1?void 0x0:_0x48dc82?K(_0x5f4370,_0x1ed8f7):_0x5f4370,_0x29d8a7=_0x3d39c3[_0x4e890e(0x141)]-0x1,_0x468cbe;_0x29d8a7>=0x0;_0x29d8a7--)(_0x468cbe=_0x3d39c3[_0x29d8a7])&&(_0x58e24f=_0x468cbe(_0x58e24f)||_0x58e24f);return _0x58e24f;},p=(_0x5dd42c,_0x580dc0)=>(_0x4dec05,_0x2409d8)=>_0x580dc0(_0x4dec05,_0x2409d8,_0x5dd42c);function _0x36d7(){const _0x294c58=['onStarting','onReady','Solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','2180784XrkWAa','content','replies','user','resolved','threadId','updateComment','subscribe','_init','_config','/reply','disposeWithMe','_commentService','add','getOwnPropertyDescriptor','symbol','_threadCommentDataSource','body','_threadCommentModel','reply','saveCommentToSnapshot','Solve','58UmgRaM','/universer-api/user/list','createTimestamp','get','Delete','userID','_httpService','find','map','customRanges','16XjotCw','parentId','28990nQXqNv','6921549SSRdRC','post','getMemberID','_initDataSource','154731ZzSdml','replyId','rangeId','setConfig','Reply','type','users','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','92BDjrTF','requireSession','solved','pluginName','length','rangeType','COMMENT','deleteComment','userId','UNIVER_UNKNOWN','_configService','unitId','code','thread-comment-data-source.config','2792944shbMQL','_injector','getCurrentUser','forEach','stringify','Add','getUnit','addComment','1183907CTygxX','slice','commentUpdate$','payload','_initUserSync','_sessionService','UNRECOGNIZED','/universer-api/comment/unit/','Edit','size','error','filter','addUser','_threadCommentDataSourceService','root','Unknown','41772880dDYuKy','ref','resolveComment','values','/delete','_userService','format'];_0x36d7=function(){return _0x294c58;};return _0x36d7();}let S=class extends _0x4abb9d{constructor(_0x32cc53,_0x2eedc6,_0x32ddad,_0x2e2d90){const _0x37de2a=_0x118477;super(),this[_0x37de2a(0x119)]=_0x32cc53,this[_0x37de2a(0x11f)]=_0x2eedc6,this['_userService']=_0x32ddad,this[_0x37de2a(0x14c)]=_0x2e2d90,this[_0x37de2a(0x115)](),this[_0x37de2a(0xf6)]();}[_0x118477(0xf6)](){const _0xd3df71=_0x118477;this[_0xd3df71(0x118)](this[_0xd3df71(0x11f)][_0xd3df71(0xf4)]['pipe'](_0x1403eb(0x10))[_0xd3df71(0x114)](_0x1becab=>{const _0x54b6a2=_0xd3df71,_0x1b030b=new Set();_0x1becab[_0x54b6a2(0x14e)](_0x355b96=>{const _0x381ec4=_0x54b6a2;switch(_0x355b96['type']){case _0x381ec4(0x11a):{const _0x5838f2=_0x355b96[_0x381ec4(0xf5)]['personId'];_0x1b030b[_0x381ec4(0x11a)](_0x5838f2);break;}}}),B(this[_0x54b6a2(0x14c)],_0x1b030b);}));}['_init'](){const _0x3b8eac=_0x118477;this[_0x3b8eac(0x118)](this[_0x3b8eac(0x119)][_0x3b8eac(0xf4)]['subscribe'](async _0x5deda8=>{const _0x1f6b8b=_0x3b8eac;var _0x3852ed,_0x21f3d0,_0x534d04,_0x4d992c;const _0x4f73e3=(_0x3852ed=this[_0x1f6b8b(0x11f)][_0x1f6b8b(0xf0)](_0x5deda8[_0x1f6b8b(0x148)])[_0x1f6b8b(0x12a)](_0x16eb4c=>_0x16eb4c[_0x1f6b8b(0x112)]===_0x5deda8[_0x1f6b8b(0x112)]))==null?void 0x0:_0x3852ed[_0x1f6b8b(0x100)];if(!_0x4f73e3)return;const {unitId:_0x3717ab,subUnitId:_0x4ca158}=_0x4f73e3;switch(_0x5deda8[_0x1f6b8b(0x110)]&&this[_0x1f6b8b(0x107)][_0x1f6b8b(0xfe)](_0x5deda8[_0x1f6b8b(0x110)]),_0x5deda8[_0x1f6b8b(0x139)]){case v['Add']:break;case v[_0x1f6b8b(0x138)]:{this[_0x1f6b8b(0x11f)][_0x1f6b8b(0xf1)](_0x3717ab,_0x4ca158,{'unitId':_0x3717ab,'subUnitId':_0x4ca158,'ref':'','id':_0x5deda8[_0x1f6b8b(0x135)],'dT':D(+_0x5deda8[_0x1f6b8b(0x125)]),'threadId':_0x5deda8['threadId'],'personId':(_0x534d04=(_0x21f3d0=_0x5deda8['user'])==null?void 0x0:_0x21f3d0[_0x1f6b8b(0x128)])!=null?_0x534d04:_0x5deda8['userId'],'text':JSON['parse'](_0x5deda8[_0x1f6b8b(0x10e)]),'parentId':_0x4f73e3['id']});break;}case v[_0x1f6b8b(0x127)]:{const _0x325985=this[_0x1f6b8b(0x11f)]['getComment'](_0x3717ab,_0x4ca158,_0x5deda8[_0x1f6b8b(0x135)]);_0x325985&&_0x325985[_0x1f6b8b(0x12e)]&&this[_0x1f6b8b(0x11f)][_0x1f6b8b(0x144)](_0x3717ab,_0x4ca158,_0x5deda8[_0x1f6b8b(0x135)]);break;}case v[_0x1f6b8b(0xfa)]:{this[_0x1f6b8b(0x11f)][_0x1f6b8b(0x113)](_0x3717ab,_0x4ca158,{'commentId':_0x5deda8['replyId'],'text':JSON['parse'](_0x5deda8[_0x1f6b8b(0x10e)])});break;}case v[_0x1f6b8b(0x122)]:{const _0x4ce40f=(_0x4d992c=this[_0x1f6b8b(0x11f)][_0x1f6b8b(0xf0)](_0x5deda8['unitId'])[_0x1f6b8b(0x12a)](_0xffd30a=>_0xffd30a[_0x1f6b8b(0x112)]===_0x5deda8[_0x1f6b8b(0x112)]))==null?void 0x0:_0x4d992c[_0x1f6b8b(0x100)];_0x4ce40f&&this[_0x1f6b8b(0x11f)][_0x1f6b8b(0x104)](_0x3717ab,_0x4ca158,_0x4ce40f['id'],_0x5deda8[_0x1f6b8b(0x13f)]===I[_0x1f6b8b(0x10b)]);break;}}}));}};S=V([p(0x0,_0x1ab595(_0x1448e6)),p(0x1,_0x1ab595(_0x1fe52e)),p(0x2,_0x1ab595(_0xca3c4f)),p(0x3,_0x1ab595(_0x3a9059))],S);const z=_0x118477(0x14a),M={};var k=Object[_0x118477(0x11b)],Q=(_0x1e4742,_0x4d3e9a,_0x273d1d,_0x4f2df3)=>{const _0x27aca1=_0x118477;for(var _0x3be03b=_0x4f2df3>0x1?void 0x0:_0x4f2df3?k(_0x4d3e9a,_0x273d1d):_0x4d3e9a,_0xbf39fa=_0x1e4742[_0x27aca1(0x141)]-0x1,_0x300423;_0xbf39fa>=0x0;_0xbf39fa--)(_0x300423=_0x1e4742[_0xbf39fa])&&(_0x3be03b=_0x300423(_0x3be03b)||_0x3be03b);return _0x3be03b;},_=(_0x45c4c3,_0x447a68)=>(_0x5e19d6,_0x29c6d5)=>_0x447a68(_0x5e19d6,_0x29c6d5,_0x45c4c3);function X(_0x54f60b,_0xbb5053){const _0x56a932=_0x118477,_0x25e1bc=_0x54f60b[_0x56a932(0x10f)][0x0];return{..._0xbb5053,'id':_0x25e1bc['replyId'],'resolved':_0x54f60b['solved']===0x1,'dT':D(_0x25e1bc['createTimestamp']),'personId':_0x25e1bc['userId'],'threadId':_0x25e1bc[_0x56a932(0x112)]};}function ee(_0x8ad35d,_0x1fa37d,_0x2f5dca){const _0x123d9f=_0x118477;var _0x20fce6,_0x378fcc;if(((_0x378fcc=(_0x20fce6=_0x8ad35d==null?void 0x0:_0x8ad35d[_0x123d9f(0x10f)])==null?void 0x0:_0x20fce6[_0x123d9f(0x141)])!=null?_0x378fcc:0x0)>0x0){const _0x424112=(_0x34cc90,_0x201ad9)=>({'id':_0x34cc90[_0x123d9f(0x135)],'threadId':_0x34cc90[_0x123d9f(0x112)],'dT':D(_0x34cc90[_0x123d9f(0x125)]),'personId':_0x34cc90[_0x123d9f(0x145)],'resolved':_0x8ad35d['solved']===I['Solved'],'unitId':_0x1fa37d,'subUnitId':_0x2f5dca,'text':JSON['parse'](_0x34cc90[_0x123d9f(0x10e)]),'parentId':_0x201ad9}),_0x5a2f81=_0x424112(_0x8ad35d[_0x123d9f(0x10f)][0x0]);return{..._0x5a2f81,'children':_0x8ad35d[_0x123d9f(0x10f)][_0x123d9f(0xf3)](0x1)[_0x123d9f(0x12b)](_0x3af4cb=>_0x424112(_0x3af4cb,_0x5a2f81['id']))};}return null;}let f=class{constructor(_0x2e4232,_0x571946,_0x2b2350,_0x5aa143){const _0x555bb2=_0x118477;this[_0x555bb2(0x129)]=_0x2e4232,this[_0x555bb2(0x107)]=_0x571946,this['_sessionService']=_0x2b2350,this[_0x555bb2(0x14c)]=_0x5aa143;}async[_0x118477(0xf1)](_0x3278bc){const _0x3288cb=_0x118477;var _0x9670c2,_0x8a2778;const {parentId:_0x84bda0,unitId:_0x1c265d,text:_0x1a4439,threadId:_0x957720}=_0x3278bc,_0xf022dd=(_0x8a2778=(_0x9670c2=_0x1a4439[_0x3288cb(0x12c)])==null?void 0x0:_0x9670c2[_0x3288cb(0xfd)](_0x3e8fe1=>_0x3e8fe1[_0x3288cb(0x142)]===_0x10593c['COMMENT'])[_0x3288cb(0x12b)](_0x117e9c=>_0x117e9c[_0x3288cb(0x136)]))!=null?_0x8a2778:[],_0x4b994c=JSON[_0x3288cb(0x14f)](_0x1a4439),_0x329119=(await this[_0x3288cb(0xf7)]['requireSession'](_0x1c265d))['getMemberID']();if(_0x84bda0){const _0x2dc62a={'memberId':_0x329119,'unitId':_0x1c265d,'content':_0x4b994c,'mention':_0xf022dd,'threadId':_0x957720},_0x1c52c3=(await this['_httpService'][_0x3288cb(0x131)]('/universer-api/comment/unit/'+_0x1c265d+_0x3288cb(0x117),{'body':_0x2dc62a}))[_0x3288cb(0x11e)][_0x3288cb(0x120)];return{..._0x3278bc,'id':_0x1c52c3[_0x3288cb(0x135)],'dT':_0x296005(+_0x1c52c3[_0x3288cb(0x125)])['format'](_0x3288cb(0x13b)),'personId':_0x1c52c3[_0x3288cb(0x145)]};}else{const _0x2b64c6={'memberId':_0x329119,'unitId':_0x1c265d,'content':_0x4b994c,'mention':_0xf022dd},_0x24c3c7=await this['_httpService'][_0x3288cb(0x131)](_0x3288cb(0xf9)+_0x1c265d+'/add',{'body':_0x2b64c6});return X(_0x24c3c7[_0x3288cb(0x11e)]['comment'],_0x3278bc);}}async[_0x118477(0x113)](_0xe00c8f){const _0x57a494=_0x118477;var _0x47ef0b,_0x53da94;const {text:_0x86bad4,unitId:_0x212f2f}=_0xe00c8f,_0x50b099=(_0x53da94=(_0x47ef0b=_0x86bad4[_0x57a494(0x12c)])==null?void 0x0:_0x47ef0b[_0x57a494(0xfd)](_0x1be0d1=>_0x1be0d1['rangeType']===_0x10593c[_0x57a494(0x143)])['map'](_0x3e5b82=>_0x3e5b82[_0x57a494(0x136)]))!=null?_0x53da94:[],_0x2af862=JSON[_0x57a494(0x14f)](_0x86bad4),_0x3ccbb9=_0xe00c8f['threadId'],_0x3d1289=_0xe00c8f['id'],_0x2bedaf={'memberId':(await this[_0x57a494(0xf7)][_0x57a494(0x13e)](_0x212f2f))['getMemberID'](),'unitId':_0x212f2f,'threadId':_0x3ccbb9,'mention':_0x50b099,'content':_0x2af862,'replyId':_0x3d1289},_0x14cadf=await this[_0x57a494(0x129)][_0x57a494(0x131)]('/universer-api/comment/unit/'+_0x212f2f+'/edit',{'body':_0x2bedaf});return!_0x14cadf[_0x57a494(0x11e)]['error']||_0x14cadf[_0x57a494(0x11e)]['error']['code']===0x1;}async[_0x118477(0x104)](_0x4f3a82){const _0x2ccdf9=_0x118477,{unitId:_0xcabc6a}=_0x4f3a82,_0x53252e=_0x4f3a82['threadId'],_0x176400={'memberId':this[_0x2ccdf9(0x107)][_0x2ccdf9(0x14d)]()[_0x2ccdf9(0x128)],'unitId':_0xcabc6a,'threadId':_0x53252e,'solved':_0x4f3a82[_0x2ccdf9(0x111)]?I['Solved']:I[_0x2ccdf9(0x13c)]},_0x1ad112=await this[_0x2ccdf9(0x129)][_0x2ccdf9(0x131)](_0x2ccdf9(0xf9)+_0xcabc6a+'/solved',{'body':_0x176400});return!_0x1ad112[_0x2ccdf9(0x11e)][_0x2ccdf9(0xfc)]||_0x1ad112[_0x2ccdf9(0x11e)][_0x2ccdf9(0xfc)][_0x2ccdf9(0x149)]===0x1;}async[_0x118477(0x144)](_0x2e6380,_0xe4d9ce,_0x3542f0,_0x442b72){const _0x4ad93c=_0x118477,_0x64f8d0={'memberId':(await this[_0x4ad93c(0xf7)][_0x4ad93c(0x13e)](_0x2e6380))[_0x4ad93c(0x132)](),'threadId':_0x3542f0,'replyId':_0x442b72,'unitId':_0x2e6380},_0x412f4d=await this['_httpService']['post'](_0x4ad93c(0xf9)+_0x2e6380+_0x4ad93c(0x106),{'body':_0x64f8d0});return!_0x412f4d['body'][_0x4ad93c(0xfc)]||_0x412f4d[_0x4ad93c(0x11e)]['error'][_0x4ad93c(0x149)]===0x1;}async['listComments'](_0x5183f0,_0x50a108,_0x379701){const _0x4d7f97=_0x118477,_0x12cd3d={'unitId':_0x5183f0,'threadId':_0x379701},_0x545f1e=await this['_httpService'][_0x4d7f97(0x131)](_0x4d7f97(0xf9)+_0x5183f0+'/list',{'body':_0x12cd3d}),_0x51b7d4=_0x379701[_0x4d7f97(0x12b)](_0x1aeba1=>ee(_0x545f1e['body']['comments'][_0x1aeba1],_0x5183f0,_0x50a108))[_0x4d7f97(0xfd)](Boolean);return Object[_0x4d7f97(0x105)](_0x545f1e[_0x4d7f97(0x11e)][_0x4d7f97(0x13a)])[_0x4d7f97(0x14e)](_0x568663=>{const _0x333980=_0x4d7f97;this[_0x333980(0x107)]['addUser'](_0x568663);}),_0x51b7d4;}[_0x118477(0x121)](_0x3ca7a7){const _0x49e717=_0x118477;return{'id':_0x3ca7a7['id'],'threadId':_0x3ca7a7[_0x49e717(0x112)],'ref':_0x3ca7a7[_0x49e717(0x103)]};}};f=Q([_(0x0,_0x1ab595(_0x1b49ae)),_(0x1,_0x1ab595(_0xca3c4f)),_(0x2,_0x1ab595(_0x2a8abb)),_(0x3,_0x1ab595(_0x3a9059))],f);var re=Object[_0x118477(0x11b)],te=(_0xfc5abf,_0x28b52f,_0x5dc7aa,_0x1a91d6)=>{const _0x484aba=_0x118477;for(var _0x225b02=_0x1a91d6>0x1?void 0x0:_0x1a91d6?re(_0x28b52f,_0x5dc7aa):_0x28b52f,_0x36eee3=_0xfc5abf[_0x484aba(0x141)]-0x1,_0x286e57;_0x36eee3>=0x0;_0x36eee3--)(_0x286e57=_0xfc5abf[_0x36eee3])&&(_0x225b02=_0x286e57(_0x225b02)||_0x225b02);return _0x225b02;},N=(_0x424c8f,_0xe6aaae)=>(_0x1c2d12,_0x4153e2)=>_0xe6aaae(_0x1c2d12,_0x4153e2,_0x424c8f);let g=class extends _0x4abb9d{constructor(_0x478d19,_0x417653){const _0x429921=_0x118477;super(),this['_threadCommentDataSourceService']=_0x478d19,this[_0x429921(0x11d)]=_0x417653,this[_0x429921(0x133)]();}[_0x118477(0x133)](){const _0x2adad2=_0x118477;this[_0x2adad2(0xff)]['dataSource']=this['_threadCommentDataSource'],this[_0x2adad2(0xff)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x37829d),N(0x1,_0x1ab595(f))],g);function _0xe34e(_0xd14904,_0x4ca8cc){const _0x36d711=_0x36d7();return _0xe34e=function(_0xe34e5e,_0x6fb233){_0xe34e5e=_0xe34e5e-0xef;let _0x470e37=_0x36d711[_0xe34e5e];return _0x470e37;},_0xe34e(_0xd14904,_0x4ca8cc);}var se=Object['defineProperty'],oe=Object[_0x118477(0x11b)],ne=(_0x41765d,_0x4be810,_0x3d8bb5)=>_0x4be810 in _0x41765d?se(_0x41765d,_0x4be810,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d8bb5}):_0x41765d[_0x4be810]=_0x3d8bb5,ie=(_0x4f0d42,_0x3a1394,_0x5f2734,_0x337f79)=>{const _0x1ce97a=_0x118477;for(var _0x464754=_0x337f79>0x1?void 0x0:_0x337f79?oe(_0x3a1394,_0x5f2734):_0x3a1394,_0xbb9e3f=_0x4f0d42[_0x1ce97a(0x141)]-0x1,_0x251a7e;_0xbb9e3f>=0x0;_0xbb9e3f--)(_0x251a7e=_0x4f0d42[_0xbb9e3f])&&(_0x464754=_0x251a7e(_0x464754)||_0x464754);return _0x464754;},w=(_0x35d8af,_0x4e94d9)=>(_0x1600c3,_0x4a321b)=>_0x4e94d9(_0x1600c3,_0x4a321b,_0x35d8af),$=(_0x2b6dc6,_0x2ac1cc,_0x5cacfc)=>ne(_0x2b6dc6,typeof _0x2ac1cc!=_0x118477(0x11c)?_0x2ac1cc+'':_0x2ac1cc,_0x5cacfc);let b=class extends _0x5214e1{constructor(_0x5b3517=M,_0x38e68f,_0x29e4d4){const _0x3353e9=_0x118477;super(),this[_0x3353e9(0x116)]=_0x5b3517,this[_0x3353e9(0x14c)]=_0x38e68f,this[_0x3353e9(0x147)]=_0x29e4d4;const {..._0x39ea6a}=_0x5d8e9c({},M,this['_config']);this[_0x3353e9(0x147)][_0x3353e9(0x137)](z,_0x39ea6a);}[_0x118477(0x109)](){const _0x542123=_0x118477;[[f],[g],[S]][_0x542123(0x14e)](_0xdd5c79=>{const _0x3fe582=_0x542123;this[_0x3fe582(0x14c)][_0x3fe582(0x11a)](_0xdd5c79);});}[_0x118477(0x10a)](){const _0x3fe665=_0x118477;this[_0x3fe665(0x14c)][_0x3fe665(0x126)](g),this['_injector'][_0x3fe665(0x126)](S);}};$(b,_0x118477(0x140),W),$(b,'type',_0x7eb5b0[_0x118477(0x146)]),b=ie([_0x652ecb(_0x255d00,_0x243904,_0x4f60b2),w(0x1,_0x1ab595(_0x3a9059)),w(0x2,_0x49fb74)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5af817=_0x52b1;(function(_0x18099e,_0x4eb9f0){const _0x4d06d5=_0x52b1,_0x2e5aed=_0x18099e();while(!![]){try{const _0x511d4=-parseInt(_0x4d06d5(0x1be))/0x1*(parseInt(_0x4d06d5(0x1e7))/0x2)+-parseInt(_0x4d06d5(0x20f))/0x3+parseInt(_0x4d06d5(0x1c0))/0x4+-parseInt(_0x4d06d5(0x1e6))/0x5+parseInt(_0x4d06d5(0x1cf))/0x6+-parseInt(_0x4d06d5(0x1d2))/0x7*(-parseInt(_0x4d06d5(0x1ce))/0x8)+-parseInt(_0x4d06d5(0x1ed))/0x9;if(_0x511d4===_0x4eb9f0)break;else _0x2e5aed['push'](_0x2e5aed['shift']());}catch(_0x34f9a9){_0x2e5aed['push'](_0x2e5aed['shift']());}}}(_0x4617,0xa3da2));import{CommentService as _0x498a04,CollaborationSessionService as _0x339043,UniverCollaborationClientPlugin as _0x2a0745}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x40a7c8}from'@univerjs-pro/license';import{dayjs as _0x146095,UserManagerService as _0x253cfc,Inject as _0x1024f5,Injector as _0x500c18,Disposable as _0x1a58c4,CustomRangeType as _0x1b28c6,UniverInstanceType as _0x175b10,DependentOn as _0x17566a,IConfigService as _0x51ffa0,Plugin as _0x4977e9,merge as _0x1a1e5e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x513b47}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x532a04,IThreadCommentDataSourceService as _0x31e088}from'@univerjs/thread-comment';import{bufferTime as _0x58b843}from'rxjs';import{HTTPService as _0x375401}from'@univerjs/network';const W=_0x5af817(0x1b2);function _0x4617(){const _0x295def=['_threadCommentDataSourceService','addUser','code','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','_sessionService','/delete','2326395nqrXDu','2MYDwgB','deleteComment','Edit','requireSession','rangeId','content','2871621akjyaW','userID','users','Add','resolveComment','onStarting','length','post','rangeType','commentUpdate$','/universer-api/user/list','pluginName','thread-comment-data-source.config','map','saveCommentToSnapshot','pipe','/list','createTimestamp','find','onReady','_config','UNRECOGNIZED','defineProperty','_initDataSource','getUser','unitId','getOwnPropertyDescriptor','forEach','/universer-api/comment/unit/','replyId','error','Reply','format','userId','474558EnrPEW','getCurrentUser','add','symbol','comments','syncUpdateMutationToColla','OpenOrReOpen','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','root','Delete','resolved','disposeWithMe','_injector','user','_commentService','getMemberID','Solve','/reply','1299806ZdSTAs','reply','1368984BsnSMN','threadId','getUnit','filter','Unknown','get','replies','_httpService','_configService','COMMENT','addComment','listComments','slice','body','10174552MwuSby','7796478BGxbrT','_userService','stringify','7mLRzZi','values','parentId','subscribe','setConfig','type','comment','solved','Solved','parse','delete','dataSource','getComment'];_0x4617=function(){return _0x295def;};return _0x4617();}var I=(_0x40a8c3=>(_0x40a8c3[_0x40a8c3['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x40a8c3[_0x40a8c3[_0x5af817(0x1da)]=0x1]=_0x5af817(0x1da),_0x40a8c3[_0x40a8c3[_0x5af817(0x202)]=-0x1]=_0x5af817(0x202),_0x40a8c3))(I||{}),v=(_0x31ed0c=>(_0x31ed0c[_0x31ed0c['Unknown']=0x0]=_0x5af817(0x1c4),_0x31ed0c[_0x31ed0c[_0x5af817(0x1f0)]=0x1]=_0x5af817(0x1f0),_0x31ed0c[_0x31ed0c[_0x5af817(0x20c)]=0x2]=_0x5af817(0x20c),_0x31ed0c[_0x31ed0c['Edit']=0x3]=_0x5af817(0x1e9),_0x31ed0c[_0x31ed0c[_0x5af817(0x1b5)]=0x4]='Delete',_0x31ed0c[_0x31ed0c['Solve']=0x5]=_0x5af817(0x1bc),_0x31ed0c[_0x31ed0c[_0x5af817(0x202)]=-0x1]='UNRECOGNIZED',_0x31ed0c))(v||{});const D=_0xdda57d=>_0x146095(new Date(+_0xdda57d))[_0x5af817(0x20d)](_0x5af817(0x1e2)),B=async(_0xa1b7d4,_0x1a05fb)=>{const _0x530eae=_0x5af817,_0x4e4670=_0xa1b7d4[_0x530eae(0x1c5)](_0x253cfc),_0x338d95=_0xa1b7d4[_0x530eae(0x1c5)](_0x375401);_0x1a05fb[_0x530eae(0x208)](_0x26c221=>{const _0x431492=_0x530eae;_0x4e4670[_0x431492(0x205)](_0x26c221)&&_0x1a05fb[_0x431492(0x1dc)](_0x26c221);}),_0x1a05fb['size']&&(await _0x338d95[_0x530eae(0x1c5)](_0x530eae(0x1f7),{'params':{'userIDs':[..._0x1a05fb]}}))[_0x530eae(0x1cd)][_0x530eae(0x1ef)][_0x530eae(0x208)](_0x4da052=>{const _0x3dbbc9=_0x530eae;_0x4da052&&_0x4e4670[_0x3dbbc9(0x1e0)](_0x4da052);});};var K=Object[_0x5af817(0x207)],V=(_0x20b6e8,_0x57a2bd,_0x298383,_0x55291f)=>{const _0x1b2834=_0x5af817;for(var _0xdbec4d=_0x55291f>0x1?void 0x0:_0x55291f?K(_0x57a2bd,_0x298383):_0x57a2bd,_0x597d86=_0x20b6e8[_0x1b2834(0x1f3)]-0x1,_0x41f298;_0x597d86>=0x0;_0x597d86--)(_0x41f298=_0x20b6e8[_0x597d86])&&(_0xdbec4d=_0x41f298(_0xdbec4d)||_0xdbec4d);return _0xdbec4d;},p=(_0x5749c8,_0x1bcf80)=>(_0x5d3b03,_0x9ae975)=>_0x1bcf80(_0x5d3b03,_0x9ae975,_0x5749c8);let S=class extends _0x1a58c4{constructor(_0x44d963,_0x2b937d,_0x59e383,_0x18c454){const _0x136d5a=_0x5af817;super(),this[_0x136d5a(0x1ba)]=_0x44d963,this[_0x136d5a(0x1b3)]=_0x2b937d,this[_0x136d5a(0x1d0)]=_0x59e383,this[_0x136d5a(0x1b8)]=_0x18c454,this[_0x136d5a(0x1b1)](),this['_initUserSync']();}['_initUserSync'](){const _0x114fcb=_0x5af817;this[_0x114fcb(0x1b7)](this['_threadCommentModel'][_0x114fcb(0x1f6)][_0x114fcb(0x1fc)](_0x58b843(0x10))[_0x114fcb(0x1d5)](_0x429217=>{const _0x423583=_0x114fcb,_0x31f1de=new Set();_0x429217['forEach'](_0x3898d9=>{const _0x12717f=_0x52b1;switch(_0x3898d9['type']){case _0x12717f(0x211):{const _0xbf14cd=_0x3898d9['payload']['personId'];_0x31f1de[_0x12717f(0x211)](_0xbf14cd);break;}}}),B(this[_0x423583(0x1b8)],_0x31f1de);}));}[_0x5af817(0x1b1)](){const _0x5ce26e=_0x5af817;this[_0x5ce26e(0x1b7)](this[_0x5ce26e(0x1ba)][_0x5ce26e(0x1f6)][_0x5ce26e(0x1d5)](async _0x1224dd=>{const _0x100fe0=_0x5ce26e;var _0x2dcbcc,_0xcf9636,_0x2783ae,_0x4da040;const _0x2ce041=(_0x2dcbcc=this[_0x100fe0(0x1b3)]['getUnit'](_0x1224dd[_0x100fe0(0x206)])[_0x100fe0(0x1ff)](_0x5df0ed=>_0x5df0ed['threadId']===_0x1224dd[_0x100fe0(0x1c1)]))==null?void 0x0:_0x2dcbcc[_0x100fe0(0x1b4)];if(!_0x2ce041)return;const {unitId:_0x44d994,subUnitId:_0x584b37}=_0x2ce041;switch(_0x1224dd[_0x100fe0(0x1b9)]&&this['_userService'][_0x100fe0(0x1e0)](_0x1224dd[_0x100fe0(0x1b9)]),_0x1224dd['type']){case v[_0x100fe0(0x1f0)]:break;case v[_0x100fe0(0x20c)]:{this[_0x100fe0(0x1b3)][_0x100fe0(0x1ca)](_0x44d994,_0x584b37,{'unitId':_0x44d994,'subUnitId':_0x584b37,'ref':'','id':_0x1224dd[_0x100fe0(0x20a)],'dT':D(+_0x1224dd[_0x100fe0(0x1fe)]),'threadId':_0x1224dd[_0x100fe0(0x1c1)],'personId':(_0x2783ae=(_0xcf9636=_0x1224dd[_0x100fe0(0x1b9)])==null?void 0x0:_0xcf9636[_0x100fe0(0x1ee)])!=null?_0x2783ae:_0x1224dd[_0x100fe0(0x20e)],'text':JSON['parse'](_0x1224dd[_0x100fe0(0x1ec)]),'parentId':_0x2ce041['id']});break;}case v[_0x100fe0(0x1b5)]:{const _0x4c3ae0=this[_0x100fe0(0x1b3)][_0x100fe0(0x1de)](_0x44d994,_0x584b37,_0x1224dd[_0x100fe0(0x20a)]);_0x4c3ae0&&_0x4c3ae0[_0x100fe0(0x1d4)]&&this[_0x100fe0(0x1b3)][_0x100fe0(0x1e8)](_0x44d994,_0x584b37,_0x1224dd[_0x100fe0(0x20a)]);break;}case v[_0x100fe0(0x1e9)]:{this[_0x100fe0(0x1b3)]['updateComment'](_0x44d994,_0x584b37,{'commentId':_0x1224dd[_0x100fe0(0x20a)],'text':JSON[_0x100fe0(0x1db)](_0x1224dd['content'])});break;}case v[_0x100fe0(0x1bc)]:{const _0x14f0ba=(_0x4da040=this['_threadCommentModel'][_0x100fe0(0x1c2)](_0x1224dd['unitId'])['find'](_0x294c9a=>_0x294c9a['threadId']===_0x1224dd[_0x100fe0(0x1c1)]))==null?void 0x0:_0x4da040[_0x100fe0(0x1b4)];_0x14f0ba&&this[_0x100fe0(0x1b3)][_0x100fe0(0x1f1)](_0x44d994,_0x584b37,_0x14f0ba['id'],_0x1224dd[_0x100fe0(0x1d9)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x1024f5(_0x498a04)),p(0x1,_0x1024f5(_0x532a04)),p(0x2,_0x1024f5(_0x253cfc)),p(0x3,_0x1024f5(_0x500c18))],S);const z=_0x5af817(0x1f9),M={};var k=Object[_0x5af817(0x207)],Q=(_0x2787e9,_0x2a84de,_0x40082e,_0x3cea38)=>{for(var _0x294357=_0x3cea38>0x1?void 0x0:_0x3cea38?k(_0x2a84de,_0x40082e):_0x2a84de,_0x43f81f=_0x2787e9['length']-0x1,_0x8d983a;_0x43f81f>=0x0;_0x43f81f--)(_0x8d983a=_0x2787e9[_0x43f81f])&&(_0x294357=_0x8d983a(_0x294357)||_0x294357);return _0x294357;},_=(_0x53befe,_0x10ebfb)=>(_0x260bbb,_0x7ddaff)=>_0x10ebfb(_0x260bbb,_0x7ddaff,_0x53befe);function X(_0xf02a6a,_0x19896b){const _0x6eb1a3=_0x5af817,_0x25efa7=_0xf02a6a['replies'][0x0];return{..._0x19896b,'id':_0x25efa7[_0x6eb1a3(0x20a)],'resolved':_0xf02a6a[_0x6eb1a3(0x1d9)]===0x1,'dT':D(_0x25efa7['createTimestamp']),'personId':_0x25efa7[_0x6eb1a3(0x20e)],'threadId':_0x25efa7[_0x6eb1a3(0x1c1)]};}function ee(_0x53718d,_0x47e15a,_0x2ec43d){const _0x1e4213=_0x5af817;var _0x5d485c,_0x9f0f78;if(((_0x9f0f78=(_0x5d485c=_0x53718d==null?void 0x0:_0x53718d['replies'])==null?void 0x0:_0x5d485c[_0x1e4213(0x1f3)])!=null?_0x9f0f78:0x0)>0x0){const _0x231253=(_0x779f3e,_0x41a5aa)=>({'id':_0x779f3e[_0x1e4213(0x20a)],'threadId':_0x779f3e[_0x1e4213(0x1c1)],'dT':D(_0x779f3e[_0x1e4213(0x1fe)]),'personId':_0x779f3e[_0x1e4213(0x20e)],'resolved':_0x53718d[_0x1e4213(0x1d9)]===I[_0x1e4213(0x1da)],'unitId':_0x47e15a,'subUnitId':_0x2ec43d,'text':JSON[_0x1e4213(0x1db)](_0x779f3e[_0x1e4213(0x1ec)]),'parentId':_0x41a5aa}),_0x236f50=_0x231253(_0x53718d[_0x1e4213(0x1c6)][0x0]);return{..._0x236f50,'children':_0x53718d[_0x1e4213(0x1c6)][_0x1e4213(0x1cc)](0x1)[_0x1e4213(0x1fa)](_0x6e3739=>_0x231253(_0x6e3739,_0x236f50['id']))};}return null;}let f=class{constructor(_0x59d1dc,_0x58580d,_0x47d25f,_0x1162ca){const _0x2c1b46=_0x5af817;this['_httpService']=_0x59d1dc,this['_userService']=_0x58580d,this[_0x2c1b46(0x1e4)]=_0x47d25f,this[_0x2c1b46(0x1b8)]=_0x1162ca;}async['addComment'](_0x4b49eb){const _0x17e06f=_0x5af817;var _0x21d4ab,_0x2d710b;const {parentId:_0x385a6e,unitId:_0x2b81ff,text:_0x2f9e47,threadId:_0x3312cf}=_0x4b49eb,_0x317f95=(_0x2d710b=(_0x21d4ab=_0x2f9e47['customRanges'])==null?void 0x0:_0x21d4ab[_0x17e06f(0x1c3)](_0x224cd9=>_0x224cd9[_0x17e06f(0x1f5)]===_0x1b28c6[_0x17e06f(0x1c9)])['map'](_0x22641d=>_0x22641d[_0x17e06f(0x1eb)]))!=null?_0x2d710b:[],_0x1555a1=JSON['stringify'](_0x2f9e47),_0x2ec2d7=(await this[_0x17e06f(0x1e4)][_0x17e06f(0x1ea)](_0x2b81ff))[_0x17e06f(0x1bb)]();if(_0x385a6e){const _0x39bb5e={'memberId':_0x2ec2d7,'unitId':_0x2b81ff,'content':_0x1555a1,'mention':_0x317f95,'threadId':_0x3312cf},_0x323498=(await this[_0x17e06f(0x1c7)][_0x17e06f(0x1f4)]('/universer-api/comment/unit/'+_0x2b81ff+_0x17e06f(0x1bd),{'body':_0x39bb5e}))[_0x17e06f(0x1cd)][_0x17e06f(0x1bf)];return{..._0x4b49eb,'id':_0x323498['replyId'],'dT':_0x146095(+_0x323498[_0x17e06f(0x1fe)])['format'](_0x17e06f(0x1e2)),'personId':_0x323498[_0x17e06f(0x20e)]};}else{const _0x50c778={'memberId':_0x2ec2d7,'unitId':_0x2b81ff,'content':_0x1555a1,'mention':_0x317f95},_0x2a7732=await this[_0x17e06f(0x1c7)][_0x17e06f(0x1f4)](_0x17e06f(0x209)+_0x2b81ff+'/add',{'body':_0x50c778});return X(_0x2a7732[_0x17e06f(0x1cd)][_0x17e06f(0x1d8)],_0x4b49eb);}}async['updateComment'](_0x4945ee){const _0x2de3fd=_0x5af817;var _0x48ebc6,_0x1c88ec;const {text:_0x485f86,unitId:_0x5a5ef4}=_0x4945ee,_0x254042=(_0x1c88ec=(_0x48ebc6=_0x485f86['customRanges'])==null?void 0x0:_0x48ebc6[_0x2de3fd(0x1c3)](_0x43c832=>_0x43c832[_0x2de3fd(0x1f5)]===_0x1b28c6['COMMENT'])[_0x2de3fd(0x1fa)](_0x12552d=>_0x12552d[_0x2de3fd(0x1eb)]))!=null?_0x1c88ec:[],_0x19e35f=JSON[_0x2de3fd(0x1d1)](_0x485f86),_0x1151a4=_0x4945ee[_0x2de3fd(0x1c1)],_0x33b77e=_0x4945ee['id'],_0x49cdaf={'memberId':(await this['_sessionService'][_0x2de3fd(0x1ea)](_0x5a5ef4))[_0x2de3fd(0x1bb)](),'unitId':_0x5a5ef4,'threadId':_0x1151a4,'mention':_0x254042,'content':_0x19e35f,'replyId':_0x33b77e},_0x2e1826=await this[_0x2de3fd(0x1c7)][_0x2de3fd(0x1f4)]('/universer-api/comment/unit/'+_0x5a5ef4+'/edit',{'body':_0x49cdaf});return!_0x2e1826[_0x2de3fd(0x1cd)][_0x2de3fd(0x20b)]||_0x2e1826[_0x2de3fd(0x1cd)][_0x2de3fd(0x20b)][_0x2de3fd(0x1e1)]===0x1;}async[_0x5af817(0x1f1)](_0x49d58a){const _0x3de162=_0x5af817,{unitId:_0x354fdb}=_0x49d58a,_0x33a349=_0x49d58a[_0x3de162(0x1c1)],_0x4d20b9={'memberId':this[_0x3de162(0x1d0)][_0x3de162(0x210)]()[_0x3de162(0x1ee)],'unitId':_0x354fdb,'threadId':_0x33a349,'solved':_0x49d58a[_0x3de162(0x1b6)]?I[_0x3de162(0x1da)]:I[_0x3de162(0x215)]},_0x35ffa2=await this[_0x3de162(0x1c7)][_0x3de162(0x1f4)]('/universer-api/comment/unit/'+_0x354fdb+'/solved',{'body':_0x4d20b9});return!_0x35ffa2['body'][_0x3de162(0x20b)]||_0x35ffa2['body']['error'][_0x3de162(0x1e1)]===0x1;}async[_0x5af817(0x1e8)](_0x23f4ec,_0x52bdba,_0x44a5eb,_0x3466f5){const _0x6ebf77=_0x5af817,_0x3cf0a8={'memberId':(await this[_0x6ebf77(0x1e4)]['requireSession'](_0x23f4ec))['getMemberID'](),'threadId':_0x44a5eb,'replyId':_0x3466f5,'unitId':_0x23f4ec},_0x3d309f=await this[_0x6ebf77(0x1c7)][_0x6ebf77(0x1f4)](_0x6ebf77(0x209)+_0x23f4ec+_0x6ebf77(0x1e5),{'body':_0x3cf0a8});return!_0x3d309f['body'][_0x6ebf77(0x20b)]||_0x3d309f[_0x6ebf77(0x1cd)]['error'][_0x6ebf77(0x1e1)]===0x1;}async[_0x5af817(0x1cb)](_0x4cd549,_0x2044f3,_0x182bf6){const _0xba06cb=_0x5af817,_0x726cb1={'unitId':_0x4cd549,'threadId':_0x182bf6},_0x2c2fd0=await this[_0xba06cb(0x1c7)][_0xba06cb(0x1f4)](_0xba06cb(0x209)+_0x4cd549+_0xba06cb(0x1fd),{'body':_0x726cb1}),_0x12e1d4=_0x182bf6['map'](_0x4dbb08=>ee(_0x2c2fd0['body'][_0xba06cb(0x213)][_0x4dbb08],_0x4cd549,_0x2044f3))[_0xba06cb(0x1c3)](Boolean);return Object[_0xba06cb(0x1d3)](_0x2c2fd0[_0xba06cb(0x1cd)][_0xba06cb(0x1ef)])['forEach'](_0x4b10db=>{const _0x4e4f29=_0xba06cb;this[_0x4e4f29(0x1d0)][_0x4e4f29(0x1e0)](_0x4b10db);}),_0x12e1d4;}[_0x5af817(0x1fb)](_0x4598dd){return{'id':_0x4598dd['id'],'threadId':_0x4598dd['threadId'],'ref':_0x4598dd['ref']};}};f=Q([_(0x0,_0x1024f5(_0x375401)),_(0x1,_0x1024f5(_0x253cfc)),_(0x2,_0x1024f5(_0x339043)),_(0x3,_0x1024f5(_0x500c18))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x54645e,_0x2f4f82,_0x119bd0,_0x4a8e0a)=>{const _0x753257=_0x5af817;for(var _0x3e084c=_0x4a8e0a>0x1?void 0x0:_0x4a8e0a?re(_0x2f4f82,_0x119bd0):_0x2f4f82,_0x5cb717=_0x54645e[_0x753257(0x1f3)]-0x1,_0x520c50;_0x5cb717>=0x0;_0x5cb717--)(_0x520c50=_0x54645e[_0x5cb717])&&(_0x3e084c=_0x520c50(_0x3e084c)||_0x3e084c);return _0x3e084c;},N=(_0x349013,_0x563dfd)=>(_0x518fd4,_0x2d68db)=>_0x563dfd(_0x518fd4,_0x2d68db,_0x349013);function _0x52b1(_0xa09449,_0x1cd1a7){const _0x461703=_0x4617();return _0x52b1=function(_0x52b153,_0x57cb9f){_0x52b153=_0x52b153-0x1b1;let _0x188f23=_0x461703[_0x52b153];return _0x188f23;},_0x52b1(_0xa09449,_0x1cd1a7);}let g=class extends _0x1a58c4{constructor(_0x101963,_0x458e6c){const _0x155773=_0x5af817;super(),this[_0x155773(0x1df)]=_0x101963,this[_0x155773(0x1e3)]=_0x458e6c,this['_initDataSource']();}[_0x5af817(0x204)](){const _0x25041d=_0x5af817;this['_threadCommentDataSourceService'][_0x25041d(0x1dd)]=this[_0x25041d(0x1e3)],this[_0x25041d(0x1df)][_0x25041d(0x214)]=!0x1;}};g=te([N(0x0,_0x31e088),N(0x1,_0x1024f5(f))],g);var se=Object[_0x5af817(0x203)],oe=Object[_0x5af817(0x207)],ne=(_0x4a1aae,_0x9989d2,_0x451eba)=>_0x9989d2 in _0x4a1aae?se(_0x4a1aae,_0x9989d2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x451eba}):_0x4a1aae[_0x9989d2]=_0x451eba,ie=(_0x32358a,_0x5c1f3e,_0x35a4b7,_0x1125f0)=>{const _0x37a8cd=_0x5af817;for(var _0x512706=_0x1125f0>0x1?void 0x0:_0x1125f0?oe(_0x5c1f3e,_0x35a4b7):_0x5c1f3e,_0x567da2=_0x32358a[_0x37a8cd(0x1f3)]-0x1,_0x5be124;_0x567da2>=0x0;_0x567da2--)(_0x5be124=_0x32358a[_0x567da2])&&(_0x512706=_0x5be124(_0x512706)||_0x512706);return _0x512706;},w=(_0x18562c,_0x2c2433)=>(_0x4da58c,_0xcc80e)=>_0x2c2433(_0x4da58c,_0xcc80e,_0x18562c),$=(_0x1e39da,_0x2cf86d,_0x597d82)=>ne(_0x1e39da,typeof _0x2cf86d!=_0x5af817(0x212)?_0x2cf86d+'':_0x2cf86d,_0x597d82);let b=class extends _0x4977e9{constructor(_0xe46c66=M,_0x27c311,_0xed5db9){const _0x157754=_0x5af817;super(),this[_0x157754(0x201)]=_0xe46c66,this[_0x157754(0x1b8)]=_0x27c311,this[_0x157754(0x1c8)]=_0xed5db9;const {..._0x41be85}=_0x1a1e5e({},M,this[_0x157754(0x201)]);this['_configService'][_0x157754(0x1d6)](z,_0x41be85);}[_0x5af817(0x1f2)](){const _0x4636ac=_0x5af817;[[f],[g],[S]][_0x4636ac(0x208)](_0x3a33ad=>{this['_injector']['add'](_0x3a33ad);});}[_0x5af817(0x200)](){const _0xc29a83=_0x5af817;this[_0xc29a83(0x1b8)]['get'](g),this[_0xc29a83(0x1b8)][_0xc29a83(0x1c5)](S);}};$(b,_0x5af817(0x1f8),W),$(b,_0x5af817(0x1d7),_0x175b10['UNIVER_UNKNOWN']),b=ie([_0x17566a(_0x513b47,_0x2a0745,_0x40a7c8),w(0x1,_0x1024f5(_0x500c18)),w(0x2,_0x51ffa0)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x118477=_0xe34e;(function(_0x356792,_0x421ed7){const _0x2d36a1=_0xe34e,_0x9bf74=_0x356792();while(!![]){try{const _0x171318=-parseInt(_0x2d36a1(0xf2))/0x1+parseInt(_0x2d36a1(0x123))/0x2*(-parseInt(_0x2d36a1(0x134))/0x3)+parseInt(_0x2d36a1(0x13d))/0x4*(parseInt(_0x2d36a1(0x12f))/0x5)+parseInt(_0x2d36a1(0x10d))/0x6+parseInt(_0x2d36a1(0x14b))/0x7+-parseInt(_0x2d36a1(0x12d))/0x8*(parseInt(_0x2d36a1(0x130))/0x9)+parseInt(_0x2d36a1(0x102))/0xa;if(_0x171318===_0x421ed7)break;else _0x9bf74['push'](_0x9bf74['shift']());}catch(_0x4edaba){_0x9bf74['push'](_0x9bf74['shift']());}}}(_0x36d7,0xd0d28));import{CommentService as _0x1448e6,CollaborationSessionService as _0x2a8abb,UniverCollaborationClientPlugin as _0x243904}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4f60b2}from'@univerjs-pro/license';import{dayjs as _0x296005,UserManagerService as _0xca3c4f,Inject as _0x1ab595,Injector as _0x3a9059,Disposable as _0x4abb9d,CustomRangeType as _0x10593c,UniverInstanceType as _0x7eb5b0,DependentOn as _0x652ecb,IConfigService as _0x49fb74,Plugin as _0x5214e1,merge as _0x5d8e9c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x255d00}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1fe52e,IThreadCommentDataSourceService as _0x37829d}from'@univerjs/thread-comment';import{bufferTime as _0x1403eb}from'rxjs';import{HTTPService as _0x1b49ae}from'@univerjs/network';const W=_0x118477(0x10c);var I=(_0x13c7fe=>(_0x13c7fe[_0x13c7fe['OpenOrReOpen']=0x0]=_0x118477(0x13c),_0x13c7fe[_0x13c7fe[_0x118477(0x10b)]=0x1]=_0x118477(0x10b),_0x13c7fe[_0x13c7fe[_0x118477(0xf8)]=-0x1]=_0x118477(0xf8),_0x13c7fe))(I||{}),v=(_0x5f4174=>(_0x5f4174[_0x5f4174[_0x118477(0x101)]=0x0]=_0x118477(0x101),_0x5f4174[_0x5f4174[_0x118477(0xef)]=0x1]=_0x118477(0xef),_0x5f4174[_0x5f4174[_0x118477(0x138)]=0x2]=_0x118477(0x138),_0x5f4174[_0x5f4174[_0x118477(0xfa)]=0x3]='Edit',_0x5f4174[_0x5f4174['Delete']=0x4]=_0x118477(0x127),_0x5f4174[_0x5f4174[_0x118477(0x122)]=0x5]='Solve',_0x5f4174[_0x5f4174[_0x118477(0xf8)]=-0x1]=_0x118477(0xf8),_0x5f4174))(v||{});const D=_0x1dc453=>_0x296005(new Date(+_0x1dc453))[_0x118477(0x108)](_0x118477(0x13b)),B=async(_0xc92a9f,_0x376fea)=>{const _0x4e178a=_0x118477,_0x322ed4=_0xc92a9f[_0x4e178a(0x126)](_0xca3c4f),_0x398372=_0xc92a9f[_0x4e178a(0x126)](_0x1b49ae);_0x376fea[_0x4e178a(0x14e)](_0x42be50=>{_0x322ed4['getUser'](_0x42be50)&&_0x376fea['delete'](_0x42be50);}),_0x376fea[_0x4e178a(0xfb)]&&(await _0x398372[_0x4e178a(0x126)](_0x4e178a(0x124),{'params':{'userIDs':[..._0x376fea]}}))['body'][_0x4e178a(0x13a)][_0x4e178a(0x14e)](_0x6f3e97=>{const _0x2fe8b9=_0x4e178a;_0x6f3e97&&_0x322ed4[_0x2fe8b9(0xfe)](_0x6f3e97);});};var K=Object[_0x118477(0x11b)],V=(_0x3d39c3,_0x5f4370,_0x1ed8f7,_0x48dc82)=>{const _0x4e890e=_0x118477;for(var _0x58e24f=_0x48dc82>0x1?void 0x0:_0x48dc82?K(_0x5f4370,_0x1ed8f7):_0x5f4370,_0x29d8a7=_0x3d39c3[_0x4e890e(0x141)]-0x1,_0x468cbe;_0x29d8a7>=0x0;_0x29d8a7--)(_0x468cbe=_0x3d39c3[_0x29d8a7])&&(_0x58e24f=_0x468cbe(_0x58e24f)||_0x58e24f);return _0x58e24f;},p=(_0x5dd42c,_0x580dc0)=>(_0x4dec05,_0x2409d8)=>_0x580dc0(_0x4dec05,_0x2409d8,_0x5dd42c);function _0x36d7(){const _0x294c58=['onStarting','onReady','Solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','2180784XrkWAa','content','replies','user','resolved','threadId','updateComment','subscribe','_init','_config','/reply','disposeWithMe','_commentService','add','getOwnPropertyDescriptor','symbol','_threadCommentDataSource','body','_threadCommentModel','reply','saveCommentToSnapshot','Solve','58UmgRaM','/universer-api/user/list','createTimestamp','get','Delete','userID','_httpService','find','map','customRanges','16XjotCw','parentId','28990nQXqNv','6921549SSRdRC','post','getMemberID','_initDataSource','154731ZzSdml','replyId','rangeId','setConfig','Reply','type','users','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','92BDjrTF','requireSession','solved','pluginName','length','rangeType','COMMENT','deleteComment','userId','UNIVER_UNKNOWN','_configService','unitId','code','thread-comment-data-source.config','2792944shbMQL','_injector','getCurrentUser','forEach','stringify','Add','getUnit','addComment','1183907CTygxX','slice','commentUpdate$','payload','_initUserSync','_sessionService','UNRECOGNIZED','/universer-api/comment/unit/','Edit','size','error','filter','addUser','_threadCommentDataSourceService','root','Unknown','41772880dDYuKy','ref','resolveComment','values','/delete','_userService','format'];_0x36d7=function(){return _0x294c58;};return _0x36d7();}let S=class extends _0x4abb9d{constructor(_0x32cc53,_0x2eedc6,_0x32ddad,_0x2e2d90){const _0x37de2a=_0x118477;super(),this[_0x37de2a(0x119)]=_0x32cc53,this[_0x37de2a(0x11f)]=_0x2eedc6,this['_userService']=_0x32ddad,this[_0x37de2a(0x14c)]=_0x2e2d90,this[_0x37de2a(0x115)](),this[_0x37de2a(0xf6)]();}[_0x118477(0xf6)](){const _0xd3df71=_0x118477;this[_0xd3df71(0x118)](this[_0xd3df71(0x11f)][_0xd3df71(0xf4)]['pipe'](_0x1403eb(0x10))[_0xd3df71(0x114)](_0x1becab=>{const _0x54b6a2=_0xd3df71,_0x1b030b=new Set();_0x1becab[_0x54b6a2(0x14e)](_0x355b96=>{const _0x381ec4=_0x54b6a2;switch(_0x355b96['type']){case _0x381ec4(0x11a):{const _0x5838f2=_0x355b96[_0x381ec4(0xf5)]['personId'];_0x1b030b[_0x381ec4(0x11a)](_0x5838f2);break;}}}),B(this[_0x54b6a2(0x14c)],_0x1b030b);}));}['_init'](){const _0x3b8eac=_0x118477;this[_0x3b8eac(0x118)](this[_0x3b8eac(0x119)][_0x3b8eac(0xf4)]['subscribe'](async _0x5deda8=>{const _0x1f6b8b=_0x3b8eac;var _0x3852ed,_0x21f3d0,_0x534d04,_0x4d992c;const _0x4f73e3=(_0x3852ed=this[_0x1f6b8b(0x11f)][_0x1f6b8b(0xf0)](_0x5deda8[_0x1f6b8b(0x148)])[_0x1f6b8b(0x12a)](_0x16eb4c=>_0x16eb4c[_0x1f6b8b(0x112)]===_0x5deda8[_0x1f6b8b(0x112)]))==null?void 0x0:_0x3852ed[_0x1f6b8b(0x100)];if(!_0x4f73e3)return;const {unitId:_0x3717ab,subUnitId:_0x4ca158}=_0x4f73e3;switch(_0x5deda8[_0x1f6b8b(0x110)]&&this[_0x1f6b8b(0x107)][_0x1f6b8b(0xfe)](_0x5deda8[_0x1f6b8b(0x110)]),_0x5deda8[_0x1f6b8b(0x139)]){case v['Add']:break;case v[_0x1f6b8b(0x138)]:{this[_0x1f6b8b(0x11f)][_0x1f6b8b(0xf1)](_0x3717ab,_0x4ca158,{'unitId':_0x3717ab,'subUnitId':_0x4ca158,'ref':'','id':_0x5deda8[_0x1f6b8b(0x135)],'dT':D(+_0x5deda8[_0x1f6b8b(0x125)]),'threadId':_0x5deda8['threadId'],'personId':(_0x534d04=(_0x21f3d0=_0x5deda8['user'])==null?void 0x0:_0x21f3d0[_0x1f6b8b(0x128)])!=null?_0x534d04:_0x5deda8['userId'],'text':JSON['parse'](_0x5deda8[_0x1f6b8b(0x10e)]),'parentId':_0x4f73e3['id']});break;}case v[_0x1f6b8b(0x127)]:{const _0x325985=this[_0x1f6b8b(0x11f)]['getComment'](_0x3717ab,_0x4ca158,_0x5deda8[_0x1f6b8b(0x135)]);_0x325985&&_0x325985[_0x1f6b8b(0x12e)]&&this[_0x1f6b8b(0x11f)][_0x1f6b8b(0x144)](_0x3717ab,_0x4ca158,_0x5deda8[_0x1f6b8b(0x135)]);break;}case v[_0x1f6b8b(0xfa)]:{this[_0x1f6b8b(0x11f)][_0x1f6b8b(0x113)](_0x3717ab,_0x4ca158,{'commentId':_0x5deda8['replyId'],'text':JSON['parse'](_0x5deda8[_0x1f6b8b(0x10e)])});break;}case v[_0x1f6b8b(0x122)]:{const _0x4ce40f=(_0x4d992c=this[_0x1f6b8b(0x11f)][_0x1f6b8b(0xf0)](_0x5deda8['unitId'])[_0x1f6b8b(0x12a)](_0xffd30a=>_0xffd30a[_0x1f6b8b(0x112)]===_0x5deda8[_0x1f6b8b(0x112)]))==null?void 0x0:_0x4d992c[_0x1f6b8b(0x100)];_0x4ce40f&&this[_0x1f6b8b(0x11f)][_0x1f6b8b(0x104)](_0x3717ab,_0x4ca158,_0x4ce40f['id'],_0x5deda8[_0x1f6b8b(0x13f)]===I[_0x1f6b8b(0x10b)]);break;}}}));}};S=V([p(0x0,_0x1ab595(_0x1448e6)),p(0x1,_0x1ab595(_0x1fe52e)),p(0x2,_0x1ab595(_0xca3c4f)),p(0x3,_0x1ab595(_0x3a9059))],S);const z=_0x118477(0x14a),M={};var k=Object[_0x118477(0x11b)],Q=(_0x1e4742,_0x4d3e9a,_0x273d1d,_0x4f2df3)=>{const _0x27aca1=_0x118477;for(var _0x3be03b=_0x4f2df3>0x1?void 0x0:_0x4f2df3?k(_0x4d3e9a,_0x273d1d):_0x4d3e9a,_0xbf39fa=_0x1e4742[_0x27aca1(0x141)]-0x1,_0x300423;_0xbf39fa>=0x0;_0xbf39fa--)(_0x300423=_0x1e4742[_0xbf39fa])&&(_0x3be03b=_0x300423(_0x3be03b)||_0x3be03b);return _0x3be03b;},_=(_0x45c4c3,_0x447a68)=>(_0x5e19d6,_0x29c6d5)=>_0x447a68(_0x5e19d6,_0x29c6d5,_0x45c4c3);function X(_0x54f60b,_0xbb5053){const _0x56a932=_0x118477,_0x25e1bc=_0x54f60b[_0x56a932(0x10f)][0x0];return{..._0xbb5053,'id':_0x25e1bc['replyId'],'resolved':_0x54f60b['solved']===0x1,'dT':D(_0x25e1bc['createTimestamp']),'personId':_0x25e1bc['userId'],'threadId':_0x25e1bc[_0x56a932(0x112)]};}function ee(_0x8ad35d,_0x1fa37d,_0x2f5dca){const _0x123d9f=_0x118477;var _0x20fce6,_0x378fcc;if(((_0x378fcc=(_0x20fce6=_0x8ad35d==null?void 0x0:_0x8ad35d[_0x123d9f(0x10f)])==null?void 0x0:_0x20fce6[_0x123d9f(0x141)])!=null?_0x378fcc:0x0)>0x0){const _0x424112=(_0x34cc90,_0x201ad9)=>({'id':_0x34cc90[_0x123d9f(0x135)],'threadId':_0x34cc90[_0x123d9f(0x112)],'dT':D(_0x34cc90[_0x123d9f(0x125)]),'personId':_0x34cc90[_0x123d9f(0x145)],'resolved':_0x8ad35d['solved']===I['Solved'],'unitId':_0x1fa37d,'subUnitId':_0x2f5dca,'text':JSON['parse'](_0x34cc90[_0x123d9f(0x10e)]),'parentId':_0x201ad9}),_0x5a2f81=_0x424112(_0x8ad35d[_0x123d9f(0x10f)][0x0]);return{..._0x5a2f81,'children':_0x8ad35d[_0x123d9f(0x10f)][_0x123d9f(0xf3)](0x1)[_0x123d9f(0x12b)](_0x3af4cb=>_0x424112(_0x3af4cb,_0x5a2f81['id']))};}return null;}let f=class{constructor(_0x2e4232,_0x571946,_0x2b2350,_0x5aa143){const _0x555bb2=_0x118477;this[_0x555bb2(0x129)]=_0x2e4232,this[_0x555bb2(0x107)]=_0x571946,this['_sessionService']=_0x2b2350,this[_0x555bb2(0x14c)]=_0x5aa143;}async[_0x118477(0xf1)](_0x3278bc){const _0x3288cb=_0x118477;var _0x9670c2,_0x8a2778;const {parentId:_0x84bda0,unitId:_0x1c265d,text:_0x1a4439,threadId:_0x957720}=_0x3278bc,_0xf022dd=(_0x8a2778=(_0x9670c2=_0x1a4439[_0x3288cb(0x12c)])==null?void 0x0:_0x9670c2[_0x3288cb(0xfd)](_0x3e8fe1=>_0x3e8fe1[_0x3288cb(0x142)]===_0x10593c['COMMENT'])[_0x3288cb(0x12b)](_0x117e9c=>_0x117e9c[_0x3288cb(0x136)]))!=null?_0x8a2778:[],_0x4b994c=JSON[_0x3288cb(0x14f)](_0x1a4439),_0x329119=(await this[_0x3288cb(0xf7)]['requireSession'](_0x1c265d))['getMemberID']();if(_0x84bda0){const _0x2dc62a={'memberId':_0x329119,'unitId':_0x1c265d,'content':_0x4b994c,'mention':_0xf022dd,'threadId':_0x957720},_0x1c52c3=(await this['_httpService'][_0x3288cb(0x131)]('/universer-api/comment/unit/'+_0x1c265d+_0x3288cb(0x117),{'body':_0x2dc62a}))[_0x3288cb(0x11e)][_0x3288cb(0x120)];return{..._0x3278bc,'id':_0x1c52c3[_0x3288cb(0x135)],'dT':_0x296005(+_0x1c52c3[_0x3288cb(0x125)])['format'](_0x3288cb(0x13b)),'personId':_0x1c52c3[_0x3288cb(0x145)]};}else{const _0x2b64c6={'memberId':_0x329119,'unitId':_0x1c265d,'content':_0x4b994c,'mention':_0xf022dd},_0x24c3c7=await this['_httpService'][_0x3288cb(0x131)](_0x3288cb(0xf9)+_0x1c265d+'/add',{'body':_0x2b64c6});return X(_0x24c3c7[_0x3288cb(0x11e)]['comment'],_0x3278bc);}}async[_0x118477(0x113)](_0xe00c8f){const _0x57a494=_0x118477;var _0x47ef0b,_0x53da94;const {text:_0x86bad4,unitId:_0x212f2f}=_0xe00c8f,_0x50b099=(_0x53da94=(_0x47ef0b=_0x86bad4[_0x57a494(0x12c)])==null?void 0x0:_0x47ef0b[_0x57a494(0xfd)](_0x1be0d1=>_0x1be0d1['rangeType']===_0x10593c[_0x57a494(0x143)])['map'](_0x3e5b82=>_0x3e5b82[_0x57a494(0x136)]))!=null?_0x53da94:[],_0x2af862=JSON[_0x57a494(0x14f)](_0x86bad4),_0x3ccbb9=_0xe00c8f['threadId'],_0x3d1289=_0xe00c8f['id'],_0x2bedaf={'memberId':(await this[_0x57a494(0xf7)][_0x57a494(0x13e)](_0x212f2f))['getMemberID'](),'unitId':_0x212f2f,'threadId':_0x3ccbb9,'mention':_0x50b099,'content':_0x2af862,'replyId':_0x3d1289},_0x14cadf=await this[_0x57a494(0x129)][_0x57a494(0x131)]('/universer-api/comment/unit/'+_0x212f2f+'/edit',{'body':_0x2bedaf});return!_0x14cadf[_0x57a494(0x11e)]['error']||_0x14cadf[_0x57a494(0x11e)]['error']['code']===0x1;}async[_0x118477(0x104)](_0x4f3a82){const _0x2ccdf9=_0x118477,{unitId:_0xcabc6a}=_0x4f3a82,_0x53252e=_0x4f3a82['threadId'],_0x176400={'memberId':this[_0x2ccdf9(0x107)][_0x2ccdf9(0x14d)]()[_0x2ccdf9(0x128)],'unitId':_0xcabc6a,'threadId':_0x53252e,'solved':_0x4f3a82[_0x2ccdf9(0x111)]?I['Solved']:I[_0x2ccdf9(0x13c)]},_0x1ad112=await this[_0x2ccdf9(0x129)][_0x2ccdf9(0x131)](_0x2ccdf9(0xf9)+_0xcabc6a+'/solved',{'body':_0x176400});return!_0x1ad112[_0x2ccdf9(0x11e)][_0x2ccdf9(0xfc)]||_0x1ad112[_0x2ccdf9(0x11e)][_0x2ccdf9(0xfc)][_0x2ccdf9(0x149)]===0x1;}async[_0x118477(0x144)](_0x2e6380,_0xe4d9ce,_0x3542f0,_0x442b72){const _0x4ad93c=_0x118477,_0x64f8d0={'memberId':(await this[_0x4ad93c(0xf7)][_0x4ad93c(0x13e)](_0x2e6380))[_0x4ad93c(0x132)](),'threadId':_0x3542f0,'replyId':_0x442b72,'unitId':_0x2e6380},_0x412f4d=await this['_httpService']['post'](_0x4ad93c(0xf9)+_0x2e6380+_0x4ad93c(0x106),{'body':_0x64f8d0});return!_0x412f4d['body'][_0x4ad93c(0xfc)]||_0x412f4d[_0x4ad93c(0x11e)]['error'][_0x4ad93c(0x149)]===0x1;}async['listComments'](_0x5183f0,_0x50a108,_0x379701){const _0x4d7f97=_0x118477,_0x12cd3d={'unitId':_0x5183f0,'threadId':_0x379701},_0x545f1e=await this['_httpService'][_0x4d7f97(0x131)](_0x4d7f97(0xf9)+_0x5183f0+'/list',{'body':_0x12cd3d}),_0x51b7d4=_0x379701[_0x4d7f97(0x12b)](_0x1aeba1=>ee(_0x545f1e['body']['comments'][_0x1aeba1],_0x5183f0,_0x50a108))[_0x4d7f97(0xfd)](Boolean);return Object[_0x4d7f97(0x105)](_0x545f1e[_0x4d7f97(0x11e)][_0x4d7f97(0x13a)])[_0x4d7f97(0x14e)](_0x568663=>{const _0x333980=_0x4d7f97;this[_0x333980(0x107)]['addUser'](_0x568663);}),_0x51b7d4;}[_0x118477(0x121)](_0x3ca7a7){const _0x49e717=_0x118477;return{'id':_0x3ca7a7['id'],'threadId':_0x3ca7a7[_0x49e717(0x112)],'ref':_0x3ca7a7[_0x49e717(0x103)]};}};f=Q([_(0x0,_0x1ab595(_0x1b49ae)),_(0x1,_0x1ab595(_0xca3c4f)),_(0x2,_0x1ab595(_0x2a8abb)),_(0x3,_0x1ab595(_0x3a9059))],f);var re=Object[_0x118477(0x11b)],te=(_0xfc5abf,_0x28b52f,_0x5dc7aa,_0x1a91d6)=>{const _0x484aba=_0x118477;for(var _0x225b02=_0x1a91d6>0x1?void 0x0:_0x1a91d6?re(_0x28b52f,_0x5dc7aa):_0x28b52f,_0x36eee3=_0xfc5abf[_0x484aba(0x141)]-0x1,_0x286e57;_0x36eee3>=0x0;_0x36eee3--)(_0x286e57=_0xfc5abf[_0x36eee3])&&(_0x225b02=_0x286e57(_0x225b02)||_0x225b02);return _0x225b02;},N=(_0x424c8f,_0xe6aaae)=>(_0x1c2d12,_0x4153e2)=>_0xe6aaae(_0x1c2d12,_0x4153e2,_0x424c8f);let g=class extends _0x4abb9d{constructor(_0x478d19,_0x417653){const _0x429921=_0x118477;super(),this['_threadCommentDataSourceService']=_0x478d19,this[_0x429921(0x11d)]=_0x417653,this[_0x429921(0x133)]();}[_0x118477(0x133)](){const _0x2adad2=_0x118477;this[_0x2adad2(0xff)]['dataSource']=this['_threadCommentDataSource'],this[_0x2adad2(0xff)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x37829d),N(0x1,_0x1ab595(f))],g);function _0xe34e(_0xd14904,_0x4ca8cc){const _0x36d711=_0x36d7();return _0xe34e=function(_0xe34e5e,_0x6fb233){_0xe34e5e=_0xe34e5e-0xef;let _0x470e37=_0x36d711[_0xe34e5e];return _0x470e37;},_0xe34e(_0xd14904,_0x4ca8cc);}var se=Object['defineProperty'],oe=Object[_0x118477(0x11b)],ne=(_0x41765d,_0x4be810,_0x3d8bb5)=>_0x4be810 in _0x41765d?se(_0x41765d,_0x4be810,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d8bb5}):_0x41765d[_0x4be810]=_0x3d8bb5,ie=(_0x4f0d42,_0x3a1394,_0x5f2734,_0x337f79)=>{const _0x1ce97a=_0x118477;for(var _0x464754=_0x337f79>0x1?void 0x0:_0x337f79?oe(_0x3a1394,_0x5f2734):_0x3a1394,_0xbb9e3f=_0x4f0d42[_0x1ce97a(0x141)]-0x1,_0x251a7e;_0xbb9e3f>=0x0;_0xbb9e3f--)(_0x251a7e=_0x4f0d42[_0xbb9e3f])&&(_0x464754=_0x251a7e(_0x464754)||_0x464754);return _0x464754;},w=(_0x35d8af,_0x4e94d9)=>(_0x1600c3,_0x4a321b)=>_0x4e94d9(_0x1600c3,_0x4a321b,_0x35d8af),$=(_0x2b6dc6,_0x2ac1cc,_0x5cacfc)=>ne(_0x2b6dc6,typeof _0x2ac1cc!=_0x118477(0x11c)?_0x2ac1cc+'':_0x2ac1cc,_0x5cacfc);let b=class extends _0x5214e1{constructor(_0x5b3517=M,_0x38e68f,_0x29e4d4){const _0x3353e9=_0x118477;super(),this[_0x3353e9(0x116)]=_0x5b3517,this[_0x3353e9(0x14c)]=_0x38e68f,this[_0x3353e9(0x147)]=_0x29e4d4;const {..._0x39ea6a}=_0x5d8e9c({},M,this['_config']);this[_0x3353e9(0x147)][_0x3353e9(0x137)](z,_0x39ea6a);}[_0x118477(0x109)](){const _0x542123=_0x118477;[[f],[g],[S]][_0x542123(0x14e)](_0xdd5c79=>{const _0x3fe582=_0x542123;this[_0x3fe582(0x14c)][_0x3fe582(0x11a)](_0xdd5c79);});}[_0x118477(0x10a)](){const _0x3fe665=_0x118477;this[_0x3fe665(0x14c)][_0x3fe665(0x126)](g),this['_injector'][_0x3fe665(0x126)](S);}};$(b,_0x118477(0x140),W),$(b,'type',_0x7eb5b0[_0x118477(0x146)]),b=ie([_0x652ecb(_0x255d00,_0x243904,_0x4f60b2),w(0x1,_0x1ab595(_0x3a9059)),w(0x2,_0x49fb74)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3487(){const _0x3163c0=['Disposable','disposeWithMe','Inject','COMMENT','UniverInstanceType','userID','UniverProThreadCommentDatasource','3322066cBVOte','pipe','createTimestamp','/list','content','delete','replies','Unknown','parse','@univerjs-pro/collaboration-client','type','get','_injector','function','users','getUser','unitId','_init','addComment','Add','UniverProCollaborationClient','UNRECOGNIZED','@univerjs-pro/license','UniverNetwork','deleteComment','add','UniverProLicense','552lnOzGs','syncUpdateMutationToColla','_threadCommentDataSource','UniverCore','_threadCommentDataSourceService','OpenOrReOpen','63265MeawpW','ThreadCommentModel','@univerjs/network','replyId','CollaborationSessionService','UserManagerService','filter','885768cSrkmF','Solve','solved','bufferTime','UniverThreadCommentDataSourcePlugin','resolveComment','ref','userId','format','Reply','_sessionService','map','rxjs','customRanges','commentUpdate$','35lQEKLq','HTTPService','object','/edit','63NVTcui','DependentOn','1618932NotOwv','CommentService','/solved','1781454GRKHZt','_initUserSync','requireSession','onStarting','/universer-api/user/list','Injector','@univerjs/thread-comment','IThreadCommentDataSourceService','rangeId','Edit','subscribe','_config','UniverThreadCommentUi','setConfig','toStringTag','Plugin','user','_threadCommentModel','threadId','UNIVER_UNKNOWN','_configService','UniverLicensePlugin','Solved','Module','_httpService','error','dayjs','getOwnPropertyDescriptor','/universer-api/comment/unit/','Delete','length','personId','_userService','stringify','CustomRangeType','code','getUnit','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','dataSource','exports','@univerjs/thread-comment-ui','/delete','rangeType','getMemberID','addUser','find','resolved','comment','YYYY/MM/DD\x20HH:mm','payload','_commentService','1121032XrEGoc','comments','updateComment','_initDataSource','post','body','18827260JMkbij','/add','@univerjs/core','IConfigService','saveCommentToSnapshot'];_0x3487=function(){return _0x3163c0;};return _0x3487();}function _0x1c40(_0xb18155,_0x2426f1){const _0x34878=_0x3487();return _0x1c40=function(_0x1c4017,_0x47ba14){_0x1c4017=_0x1c4017-0x1e6;let _0x283407=_0x34878[_0x1c4017];return _0x283407;},_0x1c40(_0xb18155,_0x2426f1);}(function(_0x328de8,_0x4c849d){const _0x5348e9=_0x1c40,_0x4517c6=_0x328de8();while(!![]){try{const _0x1bb978=parseInt(_0x5348e9(0x211))/0x1+-parseInt(_0x5348e9(0x1e9))/0x2+parseInt(_0x5348e9(0x226))/0x3+parseInt(_0x5348e9(0x204))/0x4*(parseInt(_0x5348e9(0x20a))/0x5)+-parseInt(_0x5348e9(0x229))/0x6*(parseInt(_0x5348e9(0x220))/0x7)+parseInt(_0x5348e9(0x25e))/0x8*(-parseInt(_0x5348e9(0x224))/0x9)+parseInt(_0x5348e9(0x264))/0xa;if(_0x1bb978===_0x4c849d)break;else _0x4517c6['push'](_0x4517c6['shift']());}catch(_0x399d1c){_0x4517c6['push'](_0x4517c6['shift']());}}}(_0x3487,0xe281b),function(_0xb5a40b,_0x2dd89a){const _0x25e210=_0x1c40;typeof exports==_0x25e210(0x222)&&typeof module<'u'?_0x2dd89a(exports,require(_0x25e210(0x1f2)),require(_0x25e210(0x1ff)),require('@univerjs/core'),require(_0x25e210(0x253)),require(_0x25e210(0x22f)),require(_0x25e210(0x21d)),require(_0x25e210(0x20c))):typeof define==_0x25e210(0x1f6)&&define['amd']?define([_0x25e210(0x252),_0x25e210(0x1f2),_0x25e210(0x1ff),_0x25e210(0x266),_0x25e210(0x253),'@univerjs/thread-comment',_0x25e210(0x21d),_0x25e210(0x20c)],_0x2dd89a):(_0xb5a40b=typeof globalThis<'u'?globalThis:_0xb5a40b||self,_0x2dd89a(_0xb5a40b[_0x25e210(0x1e8)]={},_0xb5a40b[_0x25e210(0x1fd)],_0xb5a40b[_0x25e210(0x203)],_0xb5a40b[_0x25e210(0x207)],_0xb5a40b[_0x25e210(0x235)],_0xb5a40b['UniverThreadComment'],_0xb5a40b[_0x25e210(0x21d)],_0xb5a40b[_0x25e210(0x200)]));}(this,function(_0x21899b,_0x83ca68,_0x4f112c,_0x4b52b9,_0x573dab,_0x2c735f,_0xe71d3e,_0x1aa170){'use strict';const _0x4f1928=_0x1c40;const _0x2b103d=_0x4f1928(0x24f);var _0x45bf40=(_0x158283=>(_0x158283[_0x158283[_0x4f1928(0x209)]=0x0]='OpenOrReOpen',_0x158283[_0x158283[_0x4f1928(0x23f)]=0x1]=_0x4f1928(0x23f),_0x158283[_0x158283[_0x4f1928(0x1fe)]=-0x1]=_0x4f1928(0x1fe),_0x158283))(_0x45bf40||{}),_0x519e78=(_0x17ba78=>(_0x17ba78[_0x17ba78[_0x4f1928(0x1f0)]=0x0]=_0x4f1928(0x1f0),_0x17ba78[_0x17ba78['Add']=0x1]=_0x4f1928(0x1fc),_0x17ba78[_0x17ba78[_0x4f1928(0x21a)]=0x2]='Reply',_0x17ba78[_0x17ba78[_0x4f1928(0x232)]=0x3]=_0x4f1928(0x232),_0x17ba78[_0x17ba78[_0x4f1928(0x246)]=0x4]='Delete',_0x17ba78[_0x17ba78[_0x4f1928(0x212)]=0x5]='Solve',_0x17ba78[_0x17ba78[_0x4f1928(0x1fe)]=-0x1]='UNRECOGNIZED',_0x17ba78))(_0x519e78||{});const _0x2a7f10=_0x36d0f3=>_0x4b52b9[_0x4f1928(0x243)](new Date(+_0x36d0f3))[_0x4f1928(0x219)]('YYYY/MM/DD\x20HH:mm'),_0x53230c=async(_0x343527,_0xc3c108)=>{const _0x313b0a=_0x4f1928,_0xbfac9f=_0x343527[_0x313b0a(0x1f4)](_0x4b52b9[_0x313b0a(0x20f)]),_0x34c43b=_0x343527['get'](_0x1aa170[_0x313b0a(0x221)]);_0xc3c108[_0x313b0a(0x24e)](_0xd07989=>{const _0x1a71d5=_0x313b0a;_0xbfac9f[_0x1a71d5(0x1f8)](_0xd07989)&&_0xc3c108[_0x1a71d5(0x1ee)](_0xd07989);}),_0xc3c108['size']&&(await _0x34c43b['get'](_0x313b0a(0x22d),{'params':{'userIDs':[..._0xc3c108]}}))[_0x313b0a(0x263)][_0x313b0a(0x1f7)][_0x313b0a(0x24e)](_0x23f885=>{const _0x17b2fa=_0x313b0a;_0x23f885&&_0xbfac9f[_0x17b2fa(0x257)](_0x23f885);});};var _0x5a952a=Object[_0x4f1928(0x244)],_0x1f898b=(_0x53818f,_0x4a0e4b,_0x26006b,_0x58baf7)=>{const _0x53766c=_0x4f1928;for(var _0x447679=_0x58baf7>0x1?void 0x0:_0x58baf7?_0x5a952a(_0x4a0e4b,_0x26006b):_0x4a0e4b,_0x2281de=_0x53818f[_0x53766c(0x247)]-0x1,_0x168812;_0x2281de>=0x0;_0x2281de--)(_0x168812=_0x53818f[_0x2281de])&&(_0x447679=_0x168812(_0x447679)||_0x447679);return _0x447679;},_0x55953f=(_0x1d8d2f,_0x4335a5)=>(_0x4e2867,_0x4c72e3)=>_0x4335a5(_0x4e2867,_0x4c72e3,_0x1d8d2f);let _0x3ba491=class extends _0x4b52b9[_0x4f1928(0x269)]{constructor(_0x561d26,_0x5775ed,_0xa5e5a1,_0x481091){const _0x4593ed=_0x4f1928;super(),this['_commentService']=_0x561d26,this[_0x4593ed(0x23a)]=_0x5775ed,this['_userService']=_0xa5e5a1,this[_0x4593ed(0x1f5)]=_0x481091,this['_init'](),this[_0x4593ed(0x22a)]();}[_0x4f1928(0x22a)](){const _0x5dc787=_0x4f1928;this[_0x5dc787(0x26a)](this[_0x5dc787(0x23a)]['commentUpdate$'][_0x5dc787(0x1ea)](_0xe71d3e[_0x5dc787(0x214)](0x10))[_0x5dc787(0x233)](_0x3af76e=>{const _0x5c46aa=_0x5dc787,_0x32b327=new Set();_0x3af76e['forEach'](_0x275330=>{const _0x774056=_0x1c40;switch(_0x275330['type']){case'add':{const _0xe6e794=_0x275330[_0x774056(0x25c)][_0x774056(0x248)];_0x32b327['add'](_0xe6e794);break;}}}),_0x53230c(this[_0x5c46aa(0x1f5)],_0x32b327);}));}[_0x4f1928(0x1fa)](){const _0x594ccc=_0x4f1928;this[_0x594ccc(0x26a)](this[_0x594ccc(0x25d)][_0x594ccc(0x21f)][_0x594ccc(0x233)](async _0x394bf0=>{const _0x29cd07=_0x594ccc;var _0x202136,_0xc741c9,_0x1611aa,_0x24be9a;const _0x3d5eca=(_0x202136=this[_0x29cd07(0x23a)][_0x29cd07(0x24d)](_0x394bf0[_0x29cd07(0x1f9)])[_0x29cd07(0x258)](_0x1a6163=>_0x1a6163[_0x29cd07(0x23b)]===_0x394bf0[_0x29cd07(0x23b)]))==null?void 0x0:_0x202136['root'];if(!_0x3d5eca)return;const {unitId:_0x461af1,subUnitId:_0xab02a9}=_0x3d5eca;switch(_0x394bf0[_0x29cd07(0x239)]&&this[_0x29cd07(0x249)][_0x29cd07(0x257)](_0x394bf0[_0x29cd07(0x239)]),_0x394bf0['type']){case _0x519e78[_0x29cd07(0x1fc)]:break;case _0x519e78[_0x29cd07(0x21a)]:{this['_threadCommentModel']['addComment'](_0x461af1,_0xab02a9,{'unitId':_0x461af1,'subUnitId':_0xab02a9,'ref':'','id':_0x394bf0[_0x29cd07(0x20d)],'dT':_0x2a7f10(+_0x394bf0[_0x29cd07(0x1eb)]),'threadId':_0x394bf0['threadId'],'personId':(_0x1611aa=(_0xc741c9=_0x394bf0[_0x29cd07(0x239)])==null?void 0x0:_0xc741c9[_0x29cd07(0x1e7)])!=null?_0x1611aa:_0x394bf0[_0x29cd07(0x218)],'text':JSON[_0x29cd07(0x1f1)](_0x394bf0['content']),'parentId':_0x3d5eca['id']});break;}case _0x519e78[_0x29cd07(0x246)]:{const _0x4c1501=this[_0x29cd07(0x23a)]['getComment'](_0x461af1,_0xab02a9,_0x394bf0[_0x29cd07(0x20d)]);_0x4c1501&&_0x4c1501['parentId']&&this[_0x29cd07(0x23a)][_0x29cd07(0x201)](_0x461af1,_0xab02a9,_0x394bf0[_0x29cd07(0x20d)]);break;}case _0x519e78[_0x29cd07(0x232)]:{this[_0x29cd07(0x23a)][_0x29cd07(0x260)](_0x461af1,_0xab02a9,{'commentId':_0x394bf0[_0x29cd07(0x20d)],'text':JSON[_0x29cd07(0x1f1)](_0x394bf0[_0x29cd07(0x1ed)])});break;}case _0x519e78[_0x29cd07(0x212)]:{const _0x1deec4=(_0x24be9a=this['_threadCommentModel']['getUnit'](_0x394bf0[_0x29cd07(0x1f9)])['find'](_0x109925=>_0x109925[_0x29cd07(0x23b)]===_0x394bf0[_0x29cd07(0x23b)]))==null?void 0x0:_0x24be9a['root'];_0x1deec4&&this[_0x29cd07(0x23a)][_0x29cd07(0x216)](_0x461af1,_0xab02a9,_0x1deec4['id'],_0x394bf0[_0x29cd07(0x213)]===_0x45bf40[_0x29cd07(0x23f)]);break;}}}));}};_0x3ba491=_0x1f898b([_0x55953f(0x0,_0x4b52b9[_0x4f1928(0x26b)](_0x83ca68[_0x4f1928(0x227)])),_0x55953f(0x1,_0x4b52b9[_0x4f1928(0x26b)](_0x2c735f[_0x4f1928(0x20b)])),_0x55953f(0x2,_0x4b52b9[_0x4f1928(0x26b)](_0x4b52b9[_0x4f1928(0x20f)])),_0x55953f(0x3,_0x4b52b9['Inject'](_0x4b52b9[_0x4f1928(0x22e)]))],_0x3ba491);const _0x3a0c95='thread-comment-data-source.config',_0x579913={};var _0x8b7eb5=Object[_0x4f1928(0x244)],_0x4f7e4d=(_0x443d3f,_0x100040,_0x659cc0,_0x38f699)=>{const _0x4bfad7=_0x4f1928;for(var _0x2dba2b=_0x38f699>0x1?void 0x0:_0x38f699?_0x8b7eb5(_0x100040,_0x659cc0):_0x100040,_0x4df26d=_0x443d3f[_0x4bfad7(0x247)]-0x1,_0x2d83eb;_0x4df26d>=0x0;_0x4df26d--)(_0x2d83eb=_0x443d3f[_0x4df26d])&&(_0x2dba2b=_0x2d83eb(_0x2dba2b)||_0x2dba2b);return _0x2dba2b;},_0x364744=(_0x2444d5,_0x366597)=>(_0x1fb914,_0x537a73)=>_0x366597(_0x1fb914,_0x537a73,_0x2444d5);function _0x4af0b4(_0x2fcd28,_0x1b107b){const _0x5709cd=_0x4f1928,_0x3c52c5=_0x2fcd28['replies'][0x0];return{..._0x1b107b,'id':_0x3c52c5[_0x5709cd(0x20d)],'resolved':_0x2fcd28[_0x5709cd(0x213)]===0x1,'dT':_0x2a7f10(_0x3c52c5[_0x5709cd(0x1eb)]),'personId':_0x3c52c5[_0x5709cd(0x218)],'threadId':_0x3c52c5[_0x5709cd(0x23b)]};}function _0x368d2f(_0x374488,_0x4e2c40,_0x41ccde){const _0x1a3881=_0x4f1928;var _0x3586c7,_0x46f883;if(((_0x46f883=(_0x3586c7=_0x374488==null?void 0x0:_0x374488[_0x1a3881(0x1ef)])==null?void 0x0:_0x3586c7['length'])!=null?_0x46f883:0x0)>0x0){const _0x364c1=(_0x5d155c,_0x1b4aa8)=>({'id':_0x5d155c[_0x1a3881(0x20d)],'threadId':_0x5d155c[_0x1a3881(0x23b)],'dT':_0x2a7f10(_0x5d155c[_0x1a3881(0x1eb)]),'personId':_0x5d155c[_0x1a3881(0x218)],'resolved':_0x374488['solved']===_0x45bf40['Solved'],'unitId':_0x4e2c40,'subUnitId':_0x41ccde,'text':JSON[_0x1a3881(0x1f1)](_0x5d155c[_0x1a3881(0x1ed)]),'parentId':_0x1b4aa8}),_0x30a47b=_0x364c1(_0x374488[_0x1a3881(0x1ef)][0x0]);return{..._0x30a47b,'children':_0x374488[_0x1a3881(0x1ef)]['slice'](0x1)[_0x1a3881(0x21c)](_0x4bb9f3=>_0x364c1(_0x4bb9f3,_0x30a47b['id']))};}return null;}let _0x2ffaf1=class{constructor(_0x5838cf,_0x414a58,_0xda22a1,_0x28d5d6){const _0x7add01=_0x4f1928;this[_0x7add01(0x241)]=_0x5838cf,this['_userService']=_0x414a58,this[_0x7add01(0x21b)]=_0xda22a1,this[_0x7add01(0x1f5)]=_0x28d5d6;}async[_0x4f1928(0x1fb)](_0x516b41){const _0x32b555=_0x4f1928;var _0x1a0463,_0x4d4921;const {parentId:_0x1ac395,unitId:_0x181067,text:_0x357cca,threadId:_0x2fa1a8}=_0x516b41,_0x12dea8=(_0x4d4921=(_0x1a0463=_0x357cca[_0x32b555(0x21e)])==null?void 0x0:_0x1a0463[_0x32b555(0x210)](_0x556e3c=>_0x556e3c[_0x32b555(0x255)]===_0x4b52b9['CustomRangeType'][_0x32b555(0x26c)])[_0x32b555(0x21c)](_0x317392=>_0x317392[_0x32b555(0x231)]))!=null?_0x4d4921:[],_0x4fa72c=JSON[_0x32b555(0x24a)](_0x357cca),_0x16d0b0=(await this['_sessionService'][_0x32b555(0x22b)](_0x181067))[_0x32b555(0x256)]();if(_0x1ac395){const _0x4c782f={'memberId':_0x16d0b0,'unitId':_0x181067,'content':_0x4fa72c,'mention':_0x12dea8,'threadId':_0x2fa1a8},_0x15aabb=(await this[_0x32b555(0x241)][_0x32b555(0x262)](_0x32b555(0x245)+_0x181067+'/reply',{'body':_0x4c782f}))[_0x32b555(0x263)]['reply'];return{..._0x516b41,'id':_0x15aabb['replyId'],'dT':_0x4b52b9[_0x32b555(0x243)](+_0x15aabb[_0x32b555(0x1eb)])[_0x32b555(0x219)](_0x32b555(0x25b)),'personId':_0x15aabb['userId']};}else{const _0x4c16b5={'memberId':_0x16d0b0,'unitId':_0x181067,'content':_0x4fa72c,'mention':_0x12dea8},_0x226818=await this[_0x32b555(0x241)]['post']('/universer-api/comment/unit/'+_0x181067+_0x32b555(0x265),{'body':_0x4c16b5});return _0x4af0b4(_0x226818[_0x32b555(0x263)][_0x32b555(0x25a)],_0x516b41);}}async[_0x4f1928(0x260)](_0x4c9ba0){const _0x168b1a=_0x4f1928;var _0x13f2af,_0x679827;const {text:_0x3e96db,unitId:_0x4d5599}=_0x4c9ba0,_0x24fb22=(_0x679827=(_0x13f2af=_0x3e96db['customRanges'])==null?void 0x0:_0x13f2af[_0x168b1a(0x210)](_0x188c9d=>_0x188c9d[_0x168b1a(0x255)]===_0x4b52b9[_0x168b1a(0x24b)][_0x168b1a(0x26c)])[_0x168b1a(0x21c)](_0x1d8eb=>_0x1d8eb[_0x168b1a(0x231)]))!=null?_0x679827:[],_0x3bb01a=JSON[_0x168b1a(0x24a)](_0x3e96db),_0x2891c8=_0x4c9ba0[_0x168b1a(0x23b)],_0x32a917=_0x4c9ba0['id'],_0x1513c3={'memberId':(await this[_0x168b1a(0x21b)][_0x168b1a(0x22b)](_0x4d5599))[_0x168b1a(0x256)](),'unitId':_0x4d5599,'threadId':_0x2891c8,'mention':_0x24fb22,'content':_0x3bb01a,'replyId':_0x32a917},_0x4518b0=await this[_0x168b1a(0x241)][_0x168b1a(0x262)](_0x168b1a(0x245)+_0x4d5599+_0x168b1a(0x223),{'body':_0x1513c3});return!_0x4518b0[_0x168b1a(0x263)][_0x168b1a(0x242)]||_0x4518b0['body']['error'][_0x168b1a(0x24c)]===0x1;}async[_0x4f1928(0x216)](_0x2dfc20){const _0x5ba600=_0x4f1928,{unitId:_0x165a20}=_0x2dfc20,_0x3fa8b5=_0x2dfc20['threadId'],_0x3a0268={'memberId':this[_0x5ba600(0x249)]['getCurrentUser']()['userID'],'unitId':_0x165a20,'threadId':_0x3fa8b5,'solved':_0x2dfc20[_0x5ba600(0x259)]?_0x45bf40[_0x5ba600(0x23f)]:_0x45bf40[_0x5ba600(0x209)]},_0x2d890=await this['_httpService'][_0x5ba600(0x262)](_0x5ba600(0x245)+_0x165a20+_0x5ba600(0x228),{'body':_0x3a0268});return!_0x2d890[_0x5ba600(0x263)]['error']||_0x2d890[_0x5ba600(0x263)][_0x5ba600(0x242)][_0x5ba600(0x24c)]===0x1;}async[_0x4f1928(0x201)](_0x4cb890,_0x4f288b,_0x23a3c4,_0x41bf13){const _0x4a8570=_0x4f1928,_0x1dee95={'memberId':(await this['_sessionService']['requireSession'](_0x4cb890))[_0x4a8570(0x256)](),'threadId':_0x23a3c4,'replyId':_0x41bf13,'unitId':_0x4cb890},_0x535fc2=await this[_0x4a8570(0x241)][_0x4a8570(0x262)](_0x4a8570(0x245)+_0x4cb890+_0x4a8570(0x254),{'body':_0x1dee95});return!_0x535fc2[_0x4a8570(0x263)][_0x4a8570(0x242)]||_0x535fc2[_0x4a8570(0x263)]['error'][_0x4a8570(0x24c)]===0x1;}async['listComments'](_0x2b962a,_0x6ef4ef,_0x3aeca1){const _0x28981d=_0x4f1928,_0x463a16={'unitId':_0x2b962a,'threadId':_0x3aeca1},_0x1baee2=await this[_0x28981d(0x241)][_0x28981d(0x262)]('/universer-api/comment/unit/'+_0x2b962a+_0x28981d(0x1ec),{'body':_0x463a16}),_0x233572=_0x3aeca1[_0x28981d(0x21c)](_0x3bceb5=>_0x368d2f(_0x1baee2['body'][_0x28981d(0x25f)][_0x3bceb5],_0x2b962a,_0x6ef4ef))[_0x28981d(0x210)](Boolean);return Object['values'](_0x1baee2['body'][_0x28981d(0x1f7)])['forEach'](_0x5bfcb6=>{const _0x5a5533=_0x28981d;this[_0x5a5533(0x249)]['addUser'](_0x5bfcb6);}),_0x233572;}[_0x4f1928(0x268)](_0x32fc64){const _0x3b738b=_0x4f1928;return{'id':_0x32fc64['id'],'threadId':_0x32fc64['threadId'],'ref':_0x32fc64[_0x3b738b(0x217)]};}};_0x2ffaf1=_0x4f7e4d([_0x364744(0x0,_0x4b52b9[_0x4f1928(0x26b)](_0x1aa170[_0x4f1928(0x221)])),_0x364744(0x1,_0x4b52b9[_0x4f1928(0x26b)](_0x4b52b9[_0x4f1928(0x20f)])),_0x364744(0x2,_0x4b52b9['Inject'](_0x83ca68[_0x4f1928(0x20e)])),_0x364744(0x3,_0x4b52b9[_0x4f1928(0x26b)](_0x4b52b9[_0x4f1928(0x22e)]))],_0x2ffaf1);var _0x3060a5=Object[_0x4f1928(0x244)],_0x33f9fe=(_0x41e35f,_0x5bf352,_0x383b5b,_0x1ef93d)=>{const _0x42d8bf=_0x4f1928;for(var _0x277e38=_0x1ef93d>0x1?void 0x0:_0x1ef93d?_0x3060a5(_0x5bf352,_0x383b5b):_0x5bf352,_0x520994=_0x41e35f[_0x42d8bf(0x247)]-0x1,_0x5c92fe;_0x520994>=0x0;_0x520994--)(_0x5c92fe=_0x41e35f[_0x520994])&&(_0x277e38=_0x5c92fe(_0x277e38)||_0x277e38);return _0x277e38;},_0x4123e1=(_0x58bf51,_0x332ef6)=>(_0x595241,_0x253983)=>_0x332ef6(_0x595241,_0x253983,_0x58bf51);let _0x2e91ed=class extends _0x4b52b9[_0x4f1928(0x269)]{constructor(_0x39cf27,_0x2f067f){const _0x300524=_0x4f1928;super(),this['_threadCommentDataSourceService']=_0x39cf27,this[_0x300524(0x206)]=_0x2f067f,this[_0x300524(0x261)]();}[_0x4f1928(0x261)](){const _0x193773=_0x4f1928;this[_0x193773(0x208)][_0x193773(0x251)]=this['_threadCommentDataSource'],this[_0x193773(0x208)][_0x193773(0x205)]=!0x1;}};_0x2e91ed=_0x33f9fe([_0x4123e1(0x0,_0x2c735f[_0x4f1928(0x230)]),_0x4123e1(0x1,_0x4b52b9[_0x4f1928(0x26b)](_0x2ffaf1))],_0x2e91ed);var _0x2b67d5=Object['defineProperty'],_0x518bd9=Object['getOwnPropertyDescriptor'],_0x516d46=(_0x45829b,_0x52e461,_0x48f3cb)=>_0x52e461 in _0x45829b?_0x2b67d5(_0x45829b,_0x52e461,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x48f3cb}):_0x45829b[_0x52e461]=_0x48f3cb,_0x25a3b2=(_0xda98de,_0x52bbdf,_0x2485df,_0x1e2b0e)=>{const _0x23a33c=_0x4f1928;for(var _0x98c622=_0x1e2b0e>0x1?void 0x0:_0x1e2b0e?_0x518bd9(_0x52bbdf,_0x2485df):_0x52bbdf,_0x379ff8=_0xda98de[_0x23a33c(0x247)]-0x1,_0x3f3baa;_0x379ff8>=0x0;_0x379ff8--)(_0x3f3baa=_0xda98de[_0x379ff8])&&(_0x98c622=_0x3f3baa(_0x98c622)||_0x98c622);return _0x98c622;},_0x19f10e=(_0x4a8cc1,_0x5e6f9d)=>(_0x342257,_0x21fe12)=>_0x5e6f9d(_0x342257,_0x21fe12,_0x4a8cc1),_0x2db56a=(_0xb1d47f,_0x2a40ff,_0x468f99)=>_0x516d46(_0xb1d47f,typeof _0x2a40ff!='symbol'?_0x2a40ff+'':_0x2a40ff,_0x468f99);_0x21899b[_0x4f1928(0x215)]=class extends _0x4b52b9[_0x4f1928(0x238)]{constructor(_0xa69be9=_0x579913,_0x109f99,_0x2af70d){const _0x116912=_0x4f1928;super(),this[_0x116912(0x234)]=_0xa69be9,this[_0x116912(0x1f5)]=_0x109f99,this[_0x116912(0x23d)]=_0x2af70d;const {..._0x3ecf7b}=_0x4b52b9['merge']({},_0x579913,this[_0x116912(0x234)]);this['_configService'][_0x116912(0x236)](_0x3a0c95,_0x3ecf7b);}[_0x4f1928(0x22c)](){[[_0x2ffaf1],[_0x2e91ed],[_0x3ba491]]['forEach'](_0x145de4=>{const _0x3341fd=_0x1c40;this[_0x3341fd(0x1f5)][_0x3341fd(0x202)](_0x145de4);});}['onReady'](){const _0x13d1bc=_0x4f1928;this[_0x13d1bc(0x1f5)][_0x13d1bc(0x1f4)](_0x2e91ed),this['_injector'][_0x13d1bc(0x1f4)](_0x3ba491);}},_0x2db56a(_0x21899b['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x2b103d),_0x2db56a(_0x21899b[_0x4f1928(0x215)],_0x4f1928(0x1f3),_0x4b52b9[_0x4f1928(0x1e6)][_0x4f1928(0x23c)]),_0x21899b[_0x4f1928(0x215)]=_0x25a3b2([_0x4b52b9[_0x4f1928(0x225)](_0x573dab['UniverThreadCommentUIPlugin'],_0x83ca68['UniverCollaborationClientPlugin'],_0x4f112c[_0x4f1928(0x23e)]),_0x19f10e(0x1,_0x4b52b9['Inject'](_0x4b52b9[_0x4f1928(0x22e)])),_0x19f10e(0x2,_0x4b52b9[_0x4f1928(0x267)])],_0x21899b[_0x4f1928(0x215)]),Object[_0x4f1928(0x250)](_0x21899b,Symbol[_0x4f1928(0x237)],{'value':_0x4f1928(0x240)});}));
1
+ function _0x57fc(){const _0x4fa579=['saveCommentToSnapshot','solved','Inject','UniverInstanceType','dataSource','_initUserSync','format','dayjs','_threadCommentModel','_sessionService','get','/universer-api/comment/unit/','@univerjs/core','personId','ThreadCommentModel','UniverProCollaborationClient','toStringTag','setConfig','body','CollaborationSessionService','requireSession','/reply','stringify','defineProperty','userId','/list','CustomRangeType','onReady','_injector','replyId','userID','getUnit','@univerjs/thread-comment','rangeId','addUser','getUser','@univerjs/thread-comment-ui','add','_threadCommentDataSourceService','addComment','getOwnPropertyDescriptor','_httpService','UserManagerService','_init','filter','YYYY/MM/DD\x20HH:mm','exports','_initDataSource','resolved','deleteComment','Edit','CommentService','onStarting','error','/delete','UniverThreadComment','resolveComment','UniverCore','size','Solved','UNRECOGNIZED','replies','UniverLicensePlugin','unitId','_commentService','getMemberID','COMMENT','bufferTime','updateComment','user','rxjs','UNIVER_UNKNOWN','10915968fLZzOu','subscribe','getComment','merge','Delete','customRanges','commentUpdate$','thread-comment-data-source.config','@univerjs-pro/license','OpenOrReOpen','forEach','ref','@univerjs-pro/collaboration-client','users','createTimestamp','Injector','type','DependentOn','_userService','UniverProThreadCommentDatasource','parentId','object','rangeType','Solve','245845LxVpjX','post','getCurrentUser','code','Disposable','parse','length','UniverCollaborationClientPlugin','1071376otJoUi','reply','_configService','root','1702269JmdxPZ','_config','/edit','syncUpdateMutationToColla','threadId','HTTPService','/universer-api/user/list','comments','151645UJHRtU','disposeWithMe','_threadCommentDataSource','Add','UniverThreadCommentDataSourcePlugin','Reply','comment','content','find','5745901PBztIG','delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','@univerjs/network','slice','40FSTGOa','4739046FRkobQ'];_0x57fc=function(){return _0x4fa579;};return _0x57fc();}function _0x4724(_0x13665b,_0x4caee6){const _0x57fc86=_0x57fc();return _0x4724=function(_0x47241b,_0x3b38a9){_0x47241b=_0x47241b-0x11e;let _0xbfaa9b=_0x57fc86[_0x47241b];return _0xbfaa9b;},_0x4724(_0x13665b,_0x4caee6);}(function(_0xc6cfa9,_0x4769b4){const _0x535a2b=_0x4724,_0x5bd43a=_0xc6cfa9();while(!![]){try{const _0x3111ad=parseInt(_0x535a2b(0x17b))/0x1+parseInt(_0x535a2b(0x183))/0x2+-parseInt(_0x535a2b(0x187))/0x3+parseInt(_0x535a2b(0x19e))/0x4*(parseInt(_0x535a2b(0x18f))/0x5)+parseInt(_0x535a2b(0x19f))/0x6+parseInt(_0x535a2b(0x198))/0x7+-parseInt(_0x535a2b(0x163))/0x8;if(_0x3111ad===_0x4769b4)break;else _0x5bd43a['push'](_0x5bd43a['shift']());}catch(_0x212ea7){_0x5bd43a['push'](_0x5bd43a['shift']());}}}(_0x57fc,0xba6c4),function(_0x43ab63,_0x587279){const _0x1782e6=_0x4724;typeof exports==_0x1782e6(0x178)&&typeof module<'u'?_0x587279(exports,require(_0x1782e6(0x16f)),require(_0x1782e6(0x16b)),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require(_0x1782e6(0x13b)),require(_0x1782e6(0x161)),require(_0x1782e6(0x19c))):typeof define=='function'&&define['amd']?define([_0x1782e6(0x149),_0x1782e6(0x16f),'@univerjs-pro/license',_0x1782e6(0x127),_0x1782e6(0x13f),_0x1782e6(0x13b),_0x1782e6(0x161),_0x1782e6(0x19c)],_0x587279):(_0x43ab63=typeof globalThis<'u'?globalThis:_0x43ab63||self,_0x587279(_0x43ab63[_0x1782e6(0x176)]={},_0x43ab63[_0x1782e6(0x12a)],_0x43ab63['UniverProLicense'],_0x43ab63[_0x1782e6(0x154)],_0x43ab63['UniverThreadCommentUi'],_0x43ab63[_0x1782e6(0x152)],_0x43ab63[_0x1782e6(0x161)],_0x43ab63['UniverNetwork']));}(this,function(_0x2fd12b,_0x5f4e77,_0x33036e,_0x14da9b,_0x4dbacd,_0x565617,_0x176efb,_0x321d5e){'use strict';const _0x47c346=_0x4724;const _0x34747b=_0x47c346(0x19a);var _0x314a6f=(_0x13cbee=>(_0x13cbee[_0x13cbee[_0x47c346(0x16c)]=0x0]=_0x47c346(0x16c),_0x13cbee[_0x13cbee[_0x47c346(0x156)]=0x1]=_0x47c346(0x156),_0x13cbee[_0x13cbee[_0x47c346(0x157)]=-0x1]=_0x47c346(0x157),_0x13cbee))(_0x314a6f||{}),_0x250803=(_0x191b92=>(_0x191b92[_0x191b92['Unknown']=0x0]='Unknown',_0x191b92[_0x191b92['Add']=0x1]=_0x47c346(0x192),_0x191b92[_0x191b92[_0x47c346(0x194)]=0x2]='Reply',_0x191b92[_0x191b92['Edit']=0x3]=_0x47c346(0x14d),_0x191b92[_0x191b92['Delete']=0x4]=_0x47c346(0x167),_0x191b92[_0x191b92[_0x47c346(0x17a)]=0x5]='Solve',_0x191b92[_0x191b92[_0x47c346(0x157)]=-0x1]='UNRECOGNIZED',_0x191b92))(_0x250803||{});const _0x480270=_0x4c9d6d=>_0x14da9b[_0x47c346(0x122)](new Date(+_0x4c9d6d))[_0x47c346(0x121)](_0x47c346(0x148)),_0x487bce=async(_0x39ed40,_0x3e5ed5)=>{const _0x4475ca=_0x47c346,_0x2f9652=_0x39ed40[_0x4475ca(0x125)](_0x14da9b[_0x4475ca(0x145)]),_0x2a4d1a=_0x39ed40['get'](_0x321d5e[_0x4475ca(0x18c)]);_0x3e5ed5[_0x4475ca(0x16d)](_0x3e8352=>{const _0x47647b=_0x4475ca;_0x2f9652[_0x47647b(0x13e)](_0x3e8352)&&_0x3e5ed5[_0x47647b(0x199)](_0x3e8352);}),_0x3e5ed5[_0x4475ca(0x155)]&&(await _0x2a4d1a['get'](_0x4475ca(0x18d),{'params':{'userIDs':[..._0x3e5ed5]}}))[_0x4475ca(0x12d)][_0x4475ca(0x170)]['forEach'](_0x23f48c=>{const _0x1622af=_0x4475ca;_0x23f48c&&_0x2f9652[_0x1622af(0x13d)](_0x23f48c);});};var _0x28c777=Object['getOwnPropertyDescriptor'],_0x5c2ad0=(_0x32fb2b,_0x4afd8f,_0x3efe72,_0x2e4422)=>{for(var _0x20ed43=_0x2e4422>0x1?void 0x0:_0x2e4422?_0x28c777(_0x4afd8f,_0x3efe72):_0x4afd8f,_0x513c40=_0x32fb2b['length']-0x1,_0x30b958;_0x513c40>=0x0;_0x513c40--)(_0x30b958=_0x32fb2b[_0x513c40])&&(_0x20ed43=_0x30b958(_0x20ed43)||_0x20ed43);return _0x20ed43;},_0x3ac03e=(_0xdc7b27,_0x3a550f)=>(_0x5c9f90,_0x15b7eb)=>_0x3a550f(_0x5c9f90,_0x15b7eb,_0xdc7b27);let _0x1311dc=class extends _0x14da9b[_0x47c346(0x17f)]{constructor(_0x49621c,_0x2edd77,_0x27de5b,_0x46ca2c){const _0x4ac366=_0x47c346;super(),this['_commentService']=_0x49621c,this['_threadCommentModel']=_0x2edd77,this['_userService']=_0x27de5b,this[_0x4ac366(0x137)]=_0x46ca2c,this[_0x4ac366(0x146)](),this[_0x4ac366(0x120)]();}[_0x47c346(0x120)](){const _0x3f1396=_0x47c346;this[_0x3f1396(0x190)](this[_0x3f1396(0x123)][_0x3f1396(0x169)]['pipe'](_0x176efb[_0x3f1396(0x15e)](0x10))[_0x3f1396(0x164)](_0x31f174=>{const _0x2e4a06=_0x3f1396,_0x5244d0=new Set();_0x31f174[_0x2e4a06(0x16d)](_0x1806eb=>{const _0x5696e6=_0x2e4a06;switch(_0x1806eb[_0x5696e6(0x173)]){case _0x5696e6(0x140):{const _0x493b32=_0x1806eb['payload'][_0x5696e6(0x128)];_0x5244d0[_0x5696e6(0x140)](_0x493b32);break;}}}),_0x487bce(this['_injector'],_0x5244d0);}));}['_init'](){const _0x2a3110=_0x47c346;this[_0x2a3110(0x190)](this[_0x2a3110(0x15b)][_0x2a3110(0x169)]['subscribe'](async _0x2aad0c=>{const _0x53afd5=_0x2a3110;var _0x28ffbb,_0x13a530,_0xd4018,_0x2e0b0a;const _0x3fb413=(_0x28ffbb=this[_0x53afd5(0x123)][_0x53afd5(0x13a)](_0x2aad0c[_0x53afd5(0x15a)])[_0x53afd5(0x197)](_0x7ea0f=>_0x7ea0f['threadId']===_0x2aad0c[_0x53afd5(0x18b)]))==null?void 0x0:_0x28ffbb['root'];if(!_0x3fb413)return;const {unitId:_0x318920,subUnitId:_0x253323}=_0x3fb413;switch(_0x2aad0c[_0x53afd5(0x160)]&&this[_0x53afd5(0x175)][_0x53afd5(0x13d)](_0x2aad0c['user']),_0x2aad0c[_0x53afd5(0x173)]){case _0x250803[_0x53afd5(0x192)]:break;case _0x250803['Reply']:{this[_0x53afd5(0x123)][_0x53afd5(0x142)](_0x318920,_0x253323,{'unitId':_0x318920,'subUnitId':_0x253323,'ref':'','id':_0x2aad0c['replyId'],'dT':_0x480270(+_0x2aad0c[_0x53afd5(0x171)]),'threadId':_0x2aad0c[_0x53afd5(0x18b)],'personId':(_0xd4018=(_0x13a530=_0x2aad0c[_0x53afd5(0x160)])==null?void 0x0:_0x13a530[_0x53afd5(0x139)])!=null?_0xd4018:_0x2aad0c[_0x53afd5(0x133)],'text':JSON[_0x53afd5(0x180)](_0x2aad0c[_0x53afd5(0x196)]),'parentId':_0x3fb413['id']});break;}case _0x250803[_0x53afd5(0x167)]:{const _0x1fb606=this['_threadCommentModel'][_0x53afd5(0x165)](_0x318920,_0x253323,_0x2aad0c[_0x53afd5(0x138)]);_0x1fb606&&_0x1fb606[_0x53afd5(0x177)]&&this[_0x53afd5(0x123)][_0x53afd5(0x14c)](_0x318920,_0x253323,_0x2aad0c[_0x53afd5(0x138)]);break;}case _0x250803['Edit']:{this[_0x53afd5(0x123)][_0x53afd5(0x15f)](_0x318920,_0x253323,{'commentId':_0x2aad0c['replyId'],'text':JSON[_0x53afd5(0x180)](_0x2aad0c[_0x53afd5(0x196)])});break;}case _0x250803[_0x53afd5(0x17a)]:{const _0x1847a4=(_0x2e0b0a=this['_threadCommentModel'][_0x53afd5(0x13a)](_0x2aad0c[_0x53afd5(0x15a)])['find'](_0x2b6f40=>_0x2b6f40['threadId']===_0x2aad0c['threadId']))==null?void 0x0:_0x2e0b0a[_0x53afd5(0x186)];_0x1847a4&&this[_0x53afd5(0x123)][_0x53afd5(0x153)](_0x318920,_0x253323,_0x1847a4['id'],_0x2aad0c[_0x53afd5(0x1a1)]===_0x314a6f[_0x53afd5(0x156)]);break;}}}));}};_0x1311dc=_0x5c2ad0([_0x3ac03e(0x0,_0x14da9b[_0x47c346(0x1a2)](_0x5f4e77[_0x47c346(0x14e)])),_0x3ac03e(0x1,_0x14da9b[_0x47c346(0x1a2)](_0x565617[_0x47c346(0x129)])),_0x3ac03e(0x2,_0x14da9b['Inject'](_0x14da9b[_0x47c346(0x145)])),_0x3ac03e(0x3,_0x14da9b[_0x47c346(0x1a2)](_0x14da9b[_0x47c346(0x172)]))],_0x1311dc);const _0x17f210=_0x47c346(0x16a),_0x157de8={};var _0xdcd3a7=Object['getOwnPropertyDescriptor'],_0x34c7b4=(_0x225f17,_0x247b40,_0x1bfea3,_0x1564ed)=>{const _0x3e636c=_0x47c346;for(var _0x101ca8=_0x1564ed>0x1?void 0x0:_0x1564ed?_0xdcd3a7(_0x247b40,_0x1bfea3):_0x247b40,_0x15749b=_0x225f17[_0x3e636c(0x181)]-0x1,_0x275f87;_0x15749b>=0x0;_0x15749b--)(_0x275f87=_0x225f17[_0x15749b])&&(_0x101ca8=_0x275f87(_0x101ca8)||_0x101ca8);return _0x101ca8;},_0x487847=(_0x27af3c,_0x28c9b6)=>(_0x178612,_0x420fbd)=>_0x28c9b6(_0x178612,_0x420fbd,_0x27af3c);function _0x3ae681(_0x29b014,_0x37a62e){const _0x12be14=_0x47c346,_0x2ef74a=_0x29b014['replies'][0x0];return{..._0x37a62e,'id':_0x2ef74a[_0x12be14(0x138)],'resolved':_0x29b014[_0x12be14(0x1a1)]===0x1,'dT':_0x480270(_0x2ef74a[_0x12be14(0x171)]),'personId':_0x2ef74a[_0x12be14(0x133)],'threadId':_0x2ef74a[_0x12be14(0x18b)]};}function _0x1ad3d4(_0x3ac632,_0x418031,_0x5ca85b){const _0x5b9f8b=_0x47c346;var _0x15035c,_0x3451d4;if(((_0x3451d4=(_0x15035c=_0x3ac632==null?void 0x0:_0x3ac632[_0x5b9f8b(0x158)])==null?void 0x0:_0x15035c['length'])!=null?_0x3451d4:0x0)>0x0){const _0xd271e8=(_0x404330,_0x575bcd)=>({'id':_0x404330[_0x5b9f8b(0x138)],'threadId':_0x404330[_0x5b9f8b(0x18b)],'dT':_0x480270(_0x404330[_0x5b9f8b(0x171)]),'personId':_0x404330[_0x5b9f8b(0x133)],'resolved':_0x3ac632[_0x5b9f8b(0x1a1)]===_0x314a6f[_0x5b9f8b(0x156)],'unitId':_0x418031,'subUnitId':_0x5ca85b,'text':JSON['parse'](_0x404330[_0x5b9f8b(0x196)]),'parentId':_0x575bcd}),_0x27dfb9=_0xd271e8(_0x3ac632[_0x5b9f8b(0x158)][0x0]);return{..._0x27dfb9,'children':_0x3ac632['replies'][_0x5b9f8b(0x19d)](0x1)[_0x5b9f8b(0x19b)](_0x2ce00d=>_0xd271e8(_0x2ce00d,_0x27dfb9['id']))};}return null;}let _0x40eb98=class{constructor(_0x421d49,_0x597853,_0x247e02,_0x571955){const _0x100781=_0x47c346;this[_0x100781(0x144)]=_0x421d49,this[_0x100781(0x175)]=_0x597853,this[_0x100781(0x124)]=_0x247e02,this['_injector']=_0x571955;}async['addComment'](_0xb721){const _0x31a520=_0x47c346;var _0x186682,_0x2e8e3f;const {parentId:_0x328996,unitId:_0xbf8718,text:_0x4d307d,threadId:_0x2efb2c}=_0xb721,_0x4c240b=(_0x2e8e3f=(_0x186682=_0x4d307d[_0x31a520(0x168)])==null?void 0x0:_0x186682[_0x31a520(0x147)](_0x38adf0=>_0x38adf0[_0x31a520(0x179)]===_0x14da9b[_0x31a520(0x135)]['COMMENT'])[_0x31a520(0x19b)](_0x10961c=>_0x10961c[_0x31a520(0x13c)]))!=null?_0x2e8e3f:[],_0x207f6d=JSON[_0x31a520(0x131)](_0x4d307d),_0x26f6ef=(await this[_0x31a520(0x124)]['requireSession'](_0xbf8718))[_0x31a520(0x15c)]();if(_0x328996){const _0x57869a={'memberId':_0x26f6ef,'unitId':_0xbf8718,'content':_0x207f6d,'mention':_0x4c240b,'threadId':_0x2efb2c},_0x2332ca=(await this[_0x31a520(0x144)][_0x31a520(0x17c)]('/universer-api/comment/unit/'+_0xbf8718+_0x31a520(0x130),{'body':_0x57869a}))[_0x31a520(0x12d)][_0x31a520(0x184)];return{..._0xb721,'id':_0x2332ca[_0x31a520(0x138)],'dT':_0x14da9b[_0x31a520(0x122)](+_0x2332ca[_0x31a520(0x171)])[_0x31a520(0x121)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2332ca[_0x31a520(0x133)]};}else{const _0x60d63c={'memberId':_0x26f6ef,'unitId':_0xbf8718,'content':_0x207f6d,'mention':_0x4c240b},_0x36cd60=await this[_0x31a520(0x144)][_0x31a520(0x17c)](_0x31a520(0x126)+_0xbf8718+'/add',{'body':_0x60d63c});return _0x3ae681(_0x36cd60[_0x31a520(0x12d)][_0x31a520(0x195)],_0xb721);}}async['updateComment'](_0x1ceff5){const _0x479557=_0x47c346;var _0x4fd7bd,_0x4af6a7;const {text:_0x2c8ad4,unitId:_0x58793d}=_0x1ceff5,_0x5cefb7=(_0x4af6a7=(_0x4fd7bd=_0x2c8ad4[_0x479557(0x168)])==null?void 0x0:_0x4fd7bd[_0x479557(0x147)](_0x54f38d=>_0x54f38d['rangeType']===_0x14da9b[_0x479557(0x135)][_0x479557(0x15d)])[_0x479557(0x19b)](_0x4b9c13=>_0x4b9c13[_0x479557(0x13c)]))!=null?_0x4af6a7:[],_0x63d4b0=JSON['stringify'](_0x2c8ad4),_0x16032b=_0x1ceff5[_0x479557(0x18b)],_0x33e476=_0x1ceff5['id'],_0x536c8a={'memberId':(await this[_0x479557(0x124)][_0x479557(0x12f)](_0x58793d))[_0x479557(0x15c)](),'unitId':_0x58793d,'threadId':_0x16032b,'mention':_0x5cefb7,'content':_0x63d4b0,'replyId':_0x33e476},_0x4522ed=await this['_httpService']['post'](_0x479557(0x126)+_0x58793d+_0x479557(0x189),{'body':_0x536c8a});return!_0x4522ed[_0x479557(0x12d)][_0x479557(0x150)]||_0x4522ed[_0x479557(0x12d)][_0x479557(0x150)]['code']===0x1;}async[_0x47c346(0x153)](_0x2a20d3){const _0x4d0537=_0x47c346,{unitId:_0x47471e}=_0x2a20d3,_0x24785c=_0x2a20d3['threadId'],_0xbfc099={'memberId':this[_0x4d0537(0x175)][_0x4d0537(0x17d)]()[_0x4d0537(0x139)],'unitId':_0x47471e,'threadId':_0x24785c,'solved':_0x2a20d3[_0x4d0537(0x14b)]?_0x314a6f[_0x4d0537(0x156)]:_0x314a6f[_0x4d0537(0x16c)]},_0x281d1d=await this[_0x4d0537(0x144)]['post']('/universer-api/comment/unit/'+_0x47471e+'/solved',{'body':_0xbfc099});return!_0x281d1d[_0x4d0537(0x12d)]['error']||_0x281d1d[_0x4d0537(0x12d)]['error']['code']===0x1;}async[_0x47c346(0x14c)](_0x3b01c2,_0x3010ea,_0x245fc0,_0x25747a){const _0x16b619=_0x47c346,_0x2b85c7={'memberId':(await this[_0x16b619(0x124)]['requireSession'](_0x3b01c2))[_0x16b619(0x15c)](),'threadId':_0x245fc0,'replyId':_0x25747a,'unitId':_0x3b01c2},_0xe405bf=await this['_httpService'][_0x16b619(0x17c)]('/universer-api/comment/unit/'+_0x3b01c2+_0x16b619(0x151),{'body':_0x2b85c7});return!_0xe405bf[_0x16b619(0x12d)][_0x16b619(0x150)]||_0xe405bf[_0x16b619(0x12d)]['error'][_0x16b619(0x17e)]===0x1;}async['listComments'](_0x151354,_0x4f32bb,_0x5e24c6){const _0xab8cce=_0x47c346,_0x5489f9={'unitId':_0x151354,'threadId':_0x5e24c6},_0x333dcd=await this[_0xab8cce(0x144)][_0xab8cce(0x17c)](_0xab8cce(0x126)+_0x151354+_0xab8cce(0x134),{'body':_0x5489f9}),_0x4ada1e=_0x5e24c6[_0xab8cce(0x19b)](_0x55486b=>_0x1ad3d4(_0x333dcd[_0xab8cce(0x12d)][_0xab8cce(0x18e)][_0x55486b],_0x151354,_0x4f32bb))['filter'](Boolean);return Object['values'](_0x333dcd[_0xab8cce(0x12d)][_0xab8cce(0x170)])[_0xab8cce(0x16d)](_0x3ef8e5=>{const _0x2b9076=_0xab8cce;this[_0x2b9076(0x175)]['addUser'](_0x3ef8e5);}),_0x4ada1e;}[_0x47c346(0x1a0)](_0x2ee603){const _0x5a4445=_0x47c346;return{'id':_0x2ee603['id'],'threadId':_0x2ee603[_0x5a4445(0x18b)],'ref':_0x2ee603[_0x5a4445(0x16e)]};}};_0x40eb98=_0x34c7b4([_0x487847(0x0,_0x14da9b[_0x47c346(0x1a2)](_0x321d5e['HTTPService'])),_0x487847(0x1,_0x14da9b[_0x47c346(0x1a2)](_0x14da9b[_0x47c346(0x145)])),_0x487847(0x2,_0x14da9b[_0x47c346(0x1a2)](_0x5f4e77[_0x47c346(0x12e)])),_0x487847(0x3,_0x14da9b[_0x47c346(0x1a2)](_0x14da9b['Injector']))],_0x40eb98);var _0x2a40d7=Object[_0x47c346(0x143)],_0x3699e7=(_0x5c3dc5,_0x2d17c8,_0x5b1a6e,_0x3daedf)=>{const _0x5eac97=_0x47c346;for(var _0x142dda=_0x3daedf>0x1?void 0x0:_0x3daedf?_0x2a40d7(_0x2d17c8,_0x5b1a6e):_0x2d17c8,_0x5d21=_0x5c3dc5[_0x5eac97(0x181)]-0x1,_0x37e26d;_0x5d21>=0x0;_0x5d21--)(_0x37e26d=_0x5c3dc5[_0x5d21])&&(_0x142dda=_0x37e26d(_0x142dda)||_0x142dda);return _0x142dda;},_0x473284=(_0x562417,_0x54811c)=>(_0xcfdbb1,_0x4efb2c)=>_0x54811c(_0xcfdbb1,_0x4efb2c,_0x562417);let _0x3860c6=class extends _0x14da9b[_0x47c346(0x17f)]{constructor(_0x49f74a,_0xcc9f1c){const _0x263ea1=_0x47c346;super(),this[_0x263ea1(0x141)]=_0x49f74a,this['_threadCommentDataSource']=_0xcc9f1c,this[_0x263ea1(0x14a)]();}[_0x47c346(0x14a)](){const _0x29f08f=_0x47c346;this[_0x29f08f(0x141)][_0x29f08f(0x11f)]=this[_0x29f08f(0x191)],this['_threadCommentDataSourceService'][_0x29f08f(0x18a)]=!0x1;}};_0x3860c6=_0x3699e7([_0x473284(0x0,_0x565617['IThreadCommentDataSourceService']),_0x473284(0x1,_0x14da9b['Inject'](_0x40eb98))],_0x3860c6);var _0x416996=Object[_0x47c346(0x132)],_0x260ead=Object[_0x47c346(0x143)],_0x5308f8=(_0x2997d0,_0x4833bf,_0x213226)=>_0x4833bf in _0x2997d0?_0x416996(_0x2997d0,_0x4833bf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x213226}):_0x2997d0[_0x4833bf]=_0x213226,_0x5ceca4=(_0x4207bf,_0x2aa405,_0x2b9207,_0x478b46)=>{for(var _0x19f5e4=_0x478b46>0x1?void 0x0:_0x478b46?_0x260ead(_0x2aa405,_0x2b9207):_0x2aa405,_0x40931a=_0x4207bf['length']-0x1,_0x4caa70;_0x40931a>=0x0;_0x40931a--)(_0x4caa70=_0x4207bf[_0x40931a])&&(_0x19f5e4=_0x4caa70(_0x19f5e4)||_0x19f5e4);return _0x19f5e4;},_0x52b6a7=(_0x54baa6,_0x8a967f)=>(_0x22fca5,_0x57a211)=>_0x8a967f(_0x22fca5,_0x57a211,_0x54baa6),_0x13e52a=(_0x4a360e,_0xf27441,_0x2ea689)=>_0x5308f8(_0x4a360e,typeof _0xf27441!='symbol'?_0xf27441+'':_0xf27441,_0x2ea689);_0x2fd12b[_0x47c346(0x193)]=class extends _0x14da9b['Plugin']{constructor(_0x56f9a1=_0x157de8,_0xad8a78,_0x11015b){const _0x322217=_0x47c346;super(),this[_0x322217(0x188)]=_0x56f9a1,this[_0x322217(0x137)]=_0xad8a78,this[_0x322217(0x185)]=_0x11015b;const {..._0x1708a1}=_0x14da9b[_0x322217(0x166)]({},_0x157de8,this[_0x322217(0x188)]);this['_configService'][_0x322217(0x12c)](_0x17f210,_0x1708a1);}[_0x47c346(0x14f)](){const _0x5920fe=_0x47c346;[[_0x40eb98],[_0x3860c6],[_0x1311dc]][_0x5920fe(0x16d)](_0x55fe7c=>{const _0x4ac28c=_0x5920fe;this[_0x4ac28c(0x137)][_0x4ac28c(0x140)](_0x55fe7c);});}[_0x47c346(0x136)](){const _0x5ca0a0=_0x47c346;this['_injector'][_0x5ca0a0(0x125)](_0x3860c6),this[_0x5ca0a0(0x137)]['get'](_0x1311dc);}},_0x13e52a(_0x2fd12b[_0x47c346(0x193)],'pluginName',_0x34747b),_0x13e52a(_0x2fd12b[_0x47c346(0x193)],'type',_0x14da9b[_0x47c346(0x11e)][_0x47c346(0x162)]),_0x2fd12b[_0x47c346(0x193)]=_0x5ceca4([_0x14da9b[_0x47c346(0x174)](_0x4dbacd['UniverThreadCommentUIPlugin'],_0x5f4e77[_0x47c346(0x182)],_0x33036e[_0x47c346(0x159)]),_0x52b6a7(0x1,_0x14da9b[_0x47c346(0x1a2)](_0x14da9b[_0x47c346(0x172)])),_0x52b6a7(0x2,_0x14da9b['IConfigService'])],_0x2fd12b[_0x47c346(0x193)]),Object[_0x47c346(0x132)](_0x2fd12b,Symbol[_0x47c346(0x12b)],{'value':'Module'});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.9",
3
+ "version": "0.6.10-alpha.0",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.6.9",
49
- "@univerjs-pro/license": "0.6.9",
50
- "@univerjs/core": "0.6.9",
51
- "@univerjs/network": "0.6.9",
52
- "@univerjs/thread-comment": "0.6.9",
53
- "@univerjs/protocol": "0.1.45",
54
- "@univerjs/thread-comment-ui": "0.6.9"
48
+ "@univerjs-pro/collaboration-client": "0.6.10-alpha.0",
49
+ "@univerjs-pro/license": "0.6.10-alpha.0",
50
+ "@univerjs/core": "0.6.10-alpha.0",
51
+ "@univerjs/network": "0.6.10-alpha.0",
52
+ "@univerjs/thread-comment-ui": "0.6.10-alpha.0",
53
+ "@univerjs/thread-comment": "0.6.10-alpha.0",
54
+ "@univerjs/protocol": "0.1.46-alpha.3"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
- "typescript": "^5.8.2",
59
- "vite": "^6.2.2",
60
- "vitest": "^3.0.9",
61
- "@univerjs-infra/shared": "0.6.9"
58
+ "typescript": "^5.8.3",
59
+ "vite": "^6.2.6",
60
+ "vitest": "^3.1.1",
61
+ "@univerjs-infra/shared": "0.6.10-alpha.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",