@univerjs-pro/thread-comment-datasource 0.8.3-nightly.202506271607 → 0.8.3-nightly.202507011607
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 _0x4c88de=_0x8573;(function(_0x4d606e,_0x4cf289){const _0x1b45a8=_0x8573,_0xc90cfe=_0x4d606e();while(!![]){try{const _0x1d02f5=-parseInt(_0x1b45a8(0xc9))/0x1+parseInt(_0x1b45a8(0xca))/0x2*(-parseInt(_0x1b45a8(0x10d))/0x3)+-parseInt(_0x1b45a8(0xe3))/0x4*(-parseInt(_0x1b45a8(0x118))/0x5)+-parseInt(_0x1b45a8(0x11c))/0x6+-parseInt(_0x1b45a8(0xf3))/0x7+-parseInt(_0x1b45a8(0xc3))/0x8*(parseInt(_0x1b45a8(0xad))/0x9)+parseInt(_0x1b45a8(0xda))/0xa*(parseInt(_0x1b45a8(0xc6))/0xb);if(_0x1d02f5===_0x4cf289)break;else _0xc90cfe['push'](_0xc90cfe['shift']());}catch(_0x3e54f6){_0xc90cfe['push'](_0xc90cfe['shift']());}}}(_0x530f,0xad2d4));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x4c88de(0xff)});const b=require(_0x4c88de(0xd3)),T=require(_0x4c88de(0xa9)),c=require(_0x4c88de(0x107)),j=require(_0x4c88de(0x101)),M=require(_0x4c88de(0x116)),w=require(_0x4c88de(0xbc)),P=require(_0x4c88de(0xec)),U=_0x4c88de(0x10a);var I=(_0x16b073=>(_0x16b073[_0x16b073['OpenOrReOpen']=0x0]=_0x4c88de(0xb0),_0x16b073[_0x16b073[_0x4c88de(0xc2)]=0x1]='Solved',_0x16b073[_0x16b073[_0x4c88de(0xa6)]=-0x1]=_0x4c88de(0xa6),_0x16b073))(I||{}),v=(_0x52a311=>(_0x52a311[_0x52a311[_0x4c88de(0xbd)]=0x0]=_0x4c88de(0xbd),_0x52a311[_0x52a311[_0x4c88de(0x10f)]=0x1]=_0x4c88de(0x10f),_0x52a311[_0x52a311[_0x4c88de(0x121)]=0x2]='Reply',_0x52a311[_0x52a311[_0x4c88de(0xd7)]=0x3]='Edit',_0x52a311[_0x52a311[_0x4c88de(0x120)]=0x4]=_0x4c88de(0x120),_0x52a311[_0x52a311[_0x4c88de(0xb6)]=0x5]='Solve',_0x52a311[_0x52a311[_0x4c88de(0xa6)]=-0x1]=_0x4c88de(0xa6),_0x52a311))(v||{});const f=_0x5f35dc=>c['dayjs'](new Date(+_0x5f35dc))['format'](_0x4c88de(0xf7)),R=async(_0x1c3af7,_0x2f8461)=>{const _0x5f2b59=_0x4c88de,_0x11dc1e=_0x1c3af7[_0x5f2b59(0x122)](c['UserManagerService']),_0x4c36f7=_0x1c3af7[_0x5f2b59(0x122)](P[_0x5f2b59(0xa7)]);_0x2f8461[_0x5f2b59(0xfc)](_0x3ae7c9=>{const _0x40303e=_0x5f2b59;_0x11dc1e['getUser'](_0x3ae7c9)&&_0x2f8461[_0x40303e(0xb7)](_0x3ae7c9);}),_0x2f8461[_0x5f2b59(0xbe)]&&(await _0x4c36f7[_0x5f2b59(0x122)](_0x5f2b59(0xc5),{'params':{'userIDs':[..._0x2f8461]}}))[_0x5f2b59(0x11b)][_0x5f2b59(0xaf)][_0x5f2b59(0xfc)](_0x283e6b=>{const _0x1c0718=_0x5f2b59;_0x283e6b&&_0x11dc1e[_0x1c0718(0xf1)](_0x283e6b);});};var $=Object[_0x4c88de(0xcf)],E=(_0x369e14,_0x34318b,_0x3679e8,_0x410f57)=>{const _0xfcdf8e=_0x4c88de;for(var _0x2b2279=_0x410f57>0x1?void 0x0:_0x410f57?$(_0x34318b,_0x3679e8):_0x34318b,_0x53ce26=_0x369e14[_0xfcdf8e(0xf2)]-0x1,_0x37fa1a;_0x53ce26>=0x0;_0x53ce26--)(_0x37fa1a=_0x369e14[_0x53ce26])&&(_0x2b2279=_0x37fa1a(_0x2b2279)||_0x2b2279);return _0x2b2279;},S=(_0x405b5b,_0x4071b4)=>(_0x35da1e,_0x4b571f)=>_0x4071b4(_0x35da1e,_0x4b571f,_0x405b5b);let p=class extends c[_0x4c88de(0xce)]{constructor(_0x174f78,_0x1029b9,_0x59d3e0,_0x3ab0b4){const _0x498a15=_0x4c88de;super(),this[_0x498a15(0x10e)]=_0x174f78,this[_0x498a15(0x124)]=_0x1029b9,this[_0x498a15(0x11e)]=_0x59d3e0,this[_0x498a15(0xe0)]=_0x3ab0b4,this['_init'](),this[_0x498a15(0xc0)]();}[_0x4c88de(0xc0)](){const _0x1f3d3c=_0x4c88de;this[_0x1f3d3c(0xc4)](this[_0x1f3d3c(0x124)]['commentUpdate$'][_0x1f3d3c(0xb1)](w[_0x1f3d3c(0x110)](0x10))['subscribe'](_0x346017=>{const _0x1520f6=_0x1f3d3c,_0x4661fa=new Set();_0x346017[_0x1520f6(0xfc)](_0x141be1=>{const _0x522b3a=_0x1520f6;switch(_0x141be1[_0x522b3a(0x111)]){case _0x522b3a(0xd9):{const _0xa76929=_0x141be1['payload'][_0x522b3a(0x100)];_0x4661fa[_0x522b3a(0xd9)](_0xa76929);break;}}}),R(this[_0x1520f6(0xe0)],_0x4661fa);}));}[_0x4c88de(0xbf)](){const _0x5f5cd6=_0x4c88de;this[_0x5f5cd6(0xc4)](this[_0x5f5cd6(0x10e)][_0x5f5cd6(0xc1)][_0x5f5cd6(0xe2)](async _0x215788=>{const _0x9d33f7=_0x5f5cd6;var _0x4956e5,_0x3c4418,_0x22f4e1,_0x1b5454;const _0x4fa5f1=(_0x4956e5=this[_0x9d33f7(0x124)][_0x9d33f7(0xe8)](_0x215788[_0x9d33f7(0x123)])[_0x9d33f7(0xef)](_0x108fd2=>_0x108fd2['threadId']===_0x215788[_0x9d33f7(0xb8)]))==null?void 0x0:_0x4956e5[_0x9d33f7(0xb2)];if(!_0x4fa5f1)return;const {unitId:_0x30df7d,subUnitId:_0x4874bc}=_0x4fa5f1;switch(_0x215788[_0x9d33f7(0xd2)]&&this[_0x9d33f7(0x11e)]['addUser'](_0x215788[_0x9d33f7(0xd2)]),_0x215788['type']){case v[_0x9d33f7(0x10f)]:break;case v['Reply']:{this[_0x9d33f7(0x124)]['addComment'](_0x30df7d,_0x4874bc,{'unitId':_0x30df7d,'subUnitId':_0x4874bc,'ref':'','id':_0x215788[_0x9d33f7(0x102)],'dT':f(+_0x215788['createTimestamp']),'threadId':_0x215788[_0x9d33f7(0xb8)],'personId':(_0x22f4e1=(_0x3c4418=_0x215788[_0x9d33f7(0xd2)])==null?void 0x0:_0x3c4418[_0x9d33f7(0xf0)])!=null?_0x22f4e1:_0x215788[_0x9d33f7(0x114)],'text':JSON[_0x9d33f7(0xea)](_0x215788[_0x9d33f7(0xdf)]),'parentId':_0x4fa5f1['id']});break;}case v[_0x9d33f7(0x120)]:{const _0x399684=this['_threadCommentModel'][_0x9d33f7(0x113)](_0x30df7d,_0x4874bc,_0x215788[_0x9d33f7(0x102)]);_0x399684&&_0x399684[_0x9d33f7(0x10b)]&&this[_0x9d33f7(0x124)][_0x9d33f7(0x103)](_0x30df7d,_0x4874bc,_0x215788[_0x9d33f7(0x102)]);break;}case v[_0x9d33f7(0xd7)]:{this[_0x9d33f7(0x124)]['updateComment'](_0x30df7d,_0x4874bc,{'commentId':_0x215788[_0x9d33f7(0x102)],'text':JSON[_0x9d33f7(0xea)](_0x215788[_0x9d33f7(0xdf)])});break;}case v[_0x9d33f7(0xb6)]:{const _0xc78090=(_0x1b5454=this[_0x9d33f7(0x124)][_0x9d33f7(0xe8)](_0x215788[_0x9d33f7(0x123)])['find'](_0x14de45=>_0x14de45[_0x9d33f7(0xb8)]===_0x215788[_0x9d33f7(0xb8)]))==null?void 0x0:_0x1b5454[_0x9d33f7(0xb2)];_0xc78090&&this[_0x9d33f7(0x124)][_0x9d33f7(0xd6)](_0x30df7d,_0x4874bc,_0xc78090['id'],_0x215788[_0x9d33f7(0xac)]===I[_0x9d33f7(0xc2)]);break;}}}));}};p=E([S(0x0,c[_0x4c88de(0x108)](b[_0x4c88de(0xf8)])),S(0x1,c[_0x4c88de(0x108)](M[_0x4c88de(0xb9)])),S(0x2,c[_0x4c88de(0x108)](c[_0x4c88de(0x104)])),S(0x3,c[_0x4c88de(0x108)](c[_0x4c88de(0xb4)]))],p);const q=_0x4c88de(0xde),D={};var A=Object[_0x4c88de(0xcf)],x=(_0xe35a9c,_0x4dae2c,_0x3d74dd,_0x1d5432)=>{const _0x4c16db=_0x4c88de;for(var _0xb8d9c0=_0x1d5432>0x1?void 0x0:_0x1d5432?A(_0x4dae2c,_0x3d74dd):_0x4dae2c,_0x413c10=_0xe35a9c[_0x4c16db(0xf2)]-0x1,_0x3cb522;_0x413c10>=0x0;_0x413c10--)(_0x3cb522=_0xe35a9c[_0x413c10])&&(_0xb8d9c0=_0x3cb522(_0xb8d9c0)||_0xb8d9c0);return _0xb8d9c0;},_=(_0x38396e,_0x3938ad)=>(_0x1f981c,_0xb4c87a)=>_0x3938ad(_0x1f981c,_0xb4c87a,_0x38396e);function Y(_0x1cec11,_0x2de4fb){const _0x20737c=_0x4c88de,_0x545d99=_0x1cec11['replies'][0x0];return{..._0x2de4fb,'id':_0x545d99[_0x20737c(0x102)],'resolved':_0x1cec11['solved']===0x1,'dT':f(_0x545d99[_0x20737c(0xd5)]),'personId':_0x545d99[_0x20737c(0x114)],'threadId':_0x545d99[_0x20737c(0xb8)]};}function G(_0x5afd5c,_0x1b18e8,_0x1439c9){const _0x172abb=_0x4c88de;var _0xdf9adb,_0x51c4f8;if(((_0x51c4f8=(_0xdf9adb=_0x5afd5c==null?void 0x0:_0x5afd5c[_0x172abb(0xcd)])==null?void 0x0:_0xdf9adb[_0x172abb(0xf2)])!=null?_0x51c4f8:0x0)>0x0){const _0xb7f97c=(_0x3bf557,_0x1b36f0)=>({'id':_0x3bf557[_0x172abb(0x102)],'threadId':_0x3bf557[_0x172abb(0xb8)],'dT':f(_0x3bf557['createTimestamp']),'personId':_0x3bf557[_0x172abb(0x114)],'resolved':_0x5afd5c['solved']===I[_0x172abb(0xc2)],'unitId':_0x1b18e8,'subUnitId':_0x1439c9,'text':JSON['parse'](_0x3bf557['content']),'parentId':_0x1b36f0}),_0x3d7040=_0xb7f97c(_0x5afd5c['replies'][0x0]);return{..._0x3d7040,'children':_0x5afd5c[_0x172abb(0xcd)][_0x172abb(0x115)](0x1)[_0x172abb(0x112)](_0x1faf37=>_0xb7f97c(_0x1faf37,_0x3d7040['id']))};}return null;}let g=class{constructor(_0x3a8dcf,_0x50b2d1,_0x4fa1a3,_0x1f8dd6){const _0x3b42c4=_0x4c88de;this[_0x3b42c4(0x11d)]=_0x3a8dcf,this[_0x3b42c4(0x11e)]=_0x50b2d1,this['_sessionService']=_0x4fa1a3,this[_0x3b42c4(0xe0)]=_0x1f8dd6;}async['addComment'](_0xa0b70d){const _0x124772=_0x4c88de;var _0x55b3ad,_0x164e59;const {parentId:_0x5a2d36,unitId:_0x1ad543,text:_0x13c9f2,threadId:_0x177b9a}=_0xa0b70d,_0x54c55c=(_0x164e59=(_0x55b3ad=_0x13c9f2[_0x124772(0x109)])==null?void 0x0:_0x55b3ad['filter'](_0xe1a6f0=>_0xe1a6f0[_0x124772(0xfd)]===c[_0x124772(0xe6)][_0x124772(0xfa)])[_0x124772(0x112)](_0x47c715=>_0x47c715[_0x124772(0x106)]))!=null?_0x164e59:[],_0x1ce384=JSON[_0x124772(0xf5)](_0x13c9f2),_0x2a7f49=(await this[_0x124772(0xe7)][_0x124772(0xeb)](_0x1ad543))[_0x124772(0xba)]();if(_0x5a2d36){const _0x3dd42b={'memberId':_0x2a7f49,'unitId':_0x1ad543,'content':_0x1ce384,'mention':_0x54c55c,'threadId':_0x177b9a},_0x551c4a=(await this[_0x124772(0x11d)]['post'](_0x124772(0x119)+_0x1ad543+'/reply',{'body':_0x3dd42b}))['body'][_0x124772(0x105)];return{..._0xa0b70d,'id':_0x551c4a[_0x124772(0x102)],'dT':c[_0x124772(0xd0)](+_0x551c4a[_0x124772(0xd5)])[_0x124772(0xf9)](_0x124772(0xf7)),'personId':_0x551c4a['userId']};}else{const _0x20518d={'memberId':_0x2a7f49,'unitId':_0x1ad543,'content':_0x1ce384,'mention':_0x54c55c},_0x14f883=await this[_0x124772(0x11d)][_0x124772(0xc8)](_0x124772(0x119)+_0x1ad543+_0x124772(0xe5),{'body':_0x20518d});return Y(_0x14f883['body']['comment'],_0xa0b70d);}}async['updateComment'](_0x599f4f){const _0xe7e994=_0x4c88de;var _0x184924,_0x16db31;const {text:_0x10a4d4,unitId:_0x5939bb}=_0x599f4f,_0x2010fa=(_0x16db31=(_0x184924=_0x10a4d4[_0xe7e994(0x109)])==null?void 0x0:_0x184924[_0xe7e994(0xaa)](_0x565985=>_0x565985[_0xe7e994(0xfd)]===c[_0xe7e994(0xe6)][_0xe7e994(0xfa)])[_0xe7e994(0x112)](_0x531fce=>_0x531fce['rangeId']))!=null?_0x16db31:[],_0xd20448=JSON[_0xe7e994(0xf5)](_0x10a4d4),_0x35317b=_0x599f4f[_0xe7e994(0xb8)],_0x58390d=_0x599f4f['id'],_0x2efda8={'memberId':(await this['_sessionService']['requireSession'](_0x5939bb))[_0xe7e994(0xba)](),'unitId':_0x5939bb,'threadId':_0x35317b,'mention':_0x2010fa,'content':_0xd20448,'replyId':_0x58390d},_0x5be125=await this[_0xe7e994(0x11d)][_0xe7e994(0xc8)](_0xe7e994(0x119)+_0x5939bb+_0xe7e994(0xc7),{'body':_0x2efda8});return!_0x5be125['body'][_0xe7e994(0xfb)]||_0x5be125['body']['error'][_0xe7e994(0xdc)]===0x1;}async['resolveComment'](_0xf50bc1){const _0x5c3e71=_0x4c88de,{unitId:_0x1951cd}=_0xf50bc1,_0x5bf4e6=_0xf50bc1[_0x5c3e71(0xb8)],_0x21e95e={'memberId':this[_0x5c3e71(0x11e)][_0x5c3e71(0x10c)]()[_0x5c3e71(0xf0)],'unitId':_0x1951cd,'threadId':_0x5bf4e6,'solved':_0xf50bc1[_0x5c3e71(0xd1)]?I[_0x5c3e71(0xc2)]:I[_0x5c3e71(0xb0)]},_0x24b8f5=await this[_0x5c3e71(0x11d)][_0x5c3e71(0xc8)](_0x5c3e71(0x119)+_0x1951cd+_0x5c3e71(0xd4),{'body':_0x21e95e});return!_0x24b8f5[_0x5c3e71(0x11b)]['error']||_0x24b8f5[_0x5c3e71(0x11b)]['error'][_0x5c3e71(0xdc)]===0x1;}async['deleteComment'](_0x468820,_0x1c6a20,_0x20b454,_0x59c383){const _0x3ecfa5=_0x4c88de,_0x386b3d={'memberId':(await this[_0x3ecfa5(0xe7)][_0x3ecfa5(0xeb)](_0x468820))[_0x3ecfa5(0xba)](),'threadId':_0x20b454,'replyId':_0x59c383,'unitId':_0x468820},_0x5b9fcb=await this[_0x3ecfa5(0x11d)][_0x3ecfa5(0xc8)](_0x3ecfa5(0x119)+_0x468820+'/delete',{'body':_0x386b3d});return!_0x5b9fcb[_0x3ecfa5(0x11b)][_0x3ecfa5(0xfb)]||_0x5b9fcb['body'][_0x3ecfa5(0xfb)][_0x3ecfa5(0xdc)]===0x1;}async[_0x4c88de(0x11a)](_0x286659,_0x32448f,_0x2c3aa1){const _0x175ae9=_0x4c88de,_0x4684a3={'unitId':_0x286659,'threadId':_0x2c3aa1},_0x4392e1=await this[_0x175ae9(0x11d)][_0x175ae9(0xc8)](_0x175ae9(0x119)+_0x286659+_0x175ae9(0xee),{'body':_0x4684a3}),_0x52bbce=_0x2c3aa1[_0x175ae9(0x112)](_0x8f4496=>G(_0x4392e1[_0x175ae9(0x11b)][_0x175ae9(0xf4)][_0x8f4496],_0x286659,_0x32448f))[_0x175ae9(0xaa)](Boolean);return Object[_0x175ae9(0xe9)](_0x4392e1[_0x175ae9(0x11b)][_0x175ae9(0xaf)])[_0x175ae9(0xfc)](_0x332e87=>{const _0x9ccad1=_0x175ae9;this[_0x9ccad1(0x11e)][_0x9ccad1(0xf1)](_0x332e87);}),_0x52bbce;}['saveCommentToSnapshot'](_0x359f5b){const _0x5de62f=_0x4c88de;return{'id':_0x359f5b['id'],'threadId':_0x359f5b[_0x5de62f(0xb8)],'ref':_0x359f5b['ref']};}};function _0x530f(){const _0x4cc208=['onStarting','Injector','_configService','Solve','delete','threadId','ThreadCommentModel','getMemberID','setConfig','rxjs','Unknown','size','_init','_initUserSync','commentUpdate$','Solved','8BBuaRb','disposeWithMe','/universer-api/user/list','22kKZKeC','/edit','post','1261955VcGYbc','1007534kSWPAt','_threadCommentDataSource','_initDataSource','replies','Disposable','getOwnPropertyDescriptor','dayjs','resolved','user','@univerjs-pro/collaboration-client','/solved','createTimestamp','resolveComment','Edit','UniverInstanceType','add','17974340srtrqI','UniverThreadCommentDataSourcePlugin','code','IConfigService','thread-comment-data-source.config','content','_injector','dataSource','subscribe','3971676LPsqCc','merge','/add','CustomRangeType','_sessionService','getUnit','values','parse','requireSession','@univerjs/network','_config','/list','find','userID','addUser','length','8808688IVorKZ','comments','stringify','pluginName','YYYY/MM/DD\x20HH:mm','CommentService','format','COMMENT','error','forEach','rangeType','IThreadCommentDataSourceService','Module','personId','@univerjs/thread-comment-ui','replyId','deleteComment','UserManagerService','reply','rangeId','@univerjs/core','Inject','customRanges','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parentId','getCurrentUser','3XNPccL','_commentService','Add','bufferTime','type','map','getComment','userId','slice','@univerjs/thread-comment','_threadCommentDataSourceService','5dsouYy','/universer-api/comment/unit/','listComments','body','760308BvHOdx','_httpService','_userService','Plugin','Delete','Reply','get','unitId','_threadCommentModel','onReady','UNRECOGNIZED','HTTPService','UNIVER_UNKNOWN','@univerjs-pro/license','filter','defineProperty','solved','6548679MkQWGF','symbol','users','OpenOrReOpen','pipe','root'];_0x530f=function(){return _0x4cc208;};return _0x530f();}g=x([_(0x0,c[_0x4c88de(0x108)](P[_0x4c88de(0xa7)])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c[_0x4c88de(0x108)](b['CollaborationSessionService'])),_(0x3,c[_0x4c88de(0x108)](c[_0x4c88de(0xb4)]))],g);var H=Object[_0x4c88de(0xcf)],J=(_0x4ae716,_0x41a2f9,_0x1d4047,_0x4c57f5)=>{for(var _0x19591a=_0x4c57f5>0x1?void 0x0:_0x4c57f5?H(_0x41a2f9,_0x1d4047):_0x41a2f9,_0x9dd3a4=_0x4ae716['length']-0x1,_0x589d09;_0x9dd3a4>=0x0;_0x9dd3a4--)(_0x589d09=_0x4ae716[_0x9dd3a4])&&(_0x19591a=_0x589d09(_0x19591a)||_0x19591a);return _0x19591a;},y=(_0x12ce44,_0x1d3e81)=>(_0x3c98a1,_0x3fd810)=>_0x1d3e81(_0x3c98a1,_0x3fd810,_0x12ce44);let C=class extends c[_0x4c88de(0xce)]{constructor(_0x2232e5,_0x324d31){const _0x4cdc2b=_0x4c88de;super(),this[_0x4cdc2b(0x117)]=_0x2232e5,this[_0x4cdc2b(0xcb)]=_0x324d31,this[_0x4cdc2b(0xcc)]();}[_0x4c88de(0xcc)](){const _0x4d330d=_0x4c88de;this['_threadCommentDataSourceService'][_0x4d330d(0xe1)]=this[_0x4d330d(0xcb)],this[_0x4d330d(0x117)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x4c88de(0xfe)]),y(0x1,c[_0x4c88de(0x108)](g))],C);function _0x8573(_0x31d457,_0x52fb7f){const _0x530f70=_0x530f();return _0x8573=function(_0x8573d8,_0x244932){_0x8573d8=_0x8573d8-0xa6;let _0x5539d8=_0x530f70[_0x8573d8];return _0x5539d8;},_0x8573(_0x31d457,_0x52fb7f);}var F=Object[_0x4c88de(0xab)],L=Object['getOwnPropertyDescriptor'],Z=(_0x338955,_0x172973,_0x2c4d83)=>_0x172973 in _0x338955?F(_0x338955,_0x172973,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c4d83}):_0x338955[_0x172973]=_0x2c4d83,W=(_0x50129c,_0x3b5204,_0x37ee09,_0x612bb2)=>{const _0x5f553a=_0x4c88de;for(var _0x229399=_0x612bb2>0x1?void 0x0:_0x612bb2?L(_0x3b5204,_0x37ee09):_0x3b5204,_0x28ad38=_0x50129c[_0x5f553a(0xf2)]-0x1,_0x803942;_0x28ad38>=0x0;_0x28ad38--)(_0x803942=_0x50129c[_0x28ad38])&&(_0x229399=_0x803942(_0x229399)||_0x229399);return _0x229399;},O=(_0x3a8acf,_0x29fa5a)=>(_0x51b7ba,_0x7deae7)=>_0x29fa5a(_0x51b7ba,_0x7deae7,_0x3a8acf),N=(_0xa77771,_0x2932c4,_0x35f4af)=>Z(_0xa77771,typeof _0x2932c4!=_0x4c88de(0xae)?_0x2932c4+'':_0x2932c4,_0x35f4af);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4c88de(0x11f)]{constructor(_0x581c26=D,_0x13000f,_0x3350b7){const _0x2f6cb8=_0x4c88de;super(),this[_0x2f6cb8(0xed)]=_0x581c26,this[_0x2f6cb8(0xe0)]=_0x13000f,this[_0x2f6cb8(0xb5)]=_0x3350b7;const {..._0x4d380a}=c[_0x2f6cb8(0xe4)]({},D,this[_0x2f6cb8(0xed)]);this[_0x2f6cb8(0xb5)][_0x2f6cb8(0xbb)](q,_0x4d380a);}[_0x4c88de(0xb3)](){[[g],[C],[p]]['forEach'](_0x200305=>{const _0x1eda1b=_0x8573;this['_injector'][_0x1eda1b(0xd9)](_0x200305);});}[_0x4c88de(0x125)](){const _0x1fd12c=_0x4c88de;this[_0x1fd12c(0xe0)][_0x1fd12c(0x122)](C),this['_injector'][_0x1fd12c(0x122)](p);}},N(exports[_0x4c88de(0xdb)],_0x4c88de(0xf6),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x4c88de(0x111),c[_0x4c88de(0xd8)][_0x4c88de(0xa8)]),exports[_0x4c88de(0xdb)]=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x4c88de(0x108)](c[_0x4c88de(0xb4)])),O(0x2,c[_0x4c88de(0xdd)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x4babf3=_0x2d55;(function(_0x6e66b8,_0x2570f7){const _0x1e3540=_0x2d55,_0x3c18db=_0x6e66b8();while(!![]){try{const _0x1382e1=-parseInt(_0x1e3540(0x1f1))/0x1+parseInt(_0x1e3540(0x262))/0x2*(-parseInt(_0x1e3540(0x202))/0x3)+parseInt(_0x1e3540(0x25d))/0x4*(parseInt(_0x1e3540(0x220))/0x5)+-parseInt(_0x1e3540(0x24a))/0x6*(parseInt(_0x1e3540(0x1f5))/0x7)+parseInt(_0x1e3540(0x266))/0x8*(-parseInt(_0x1e3540(0x22b))/0x9)+parseInt(_0x1e3540(0x1f7))/0xa*(parseInt(_0x1e3540(0x245))/0xb)+parseInt(_0x1e3540(0x261))/0xc;if(_0x1382e1===_0x2570f7)break;else _0x3c18db['push'](_0x3c18db['shift']());}catch(_0x1d83bb){_0x3c18db['push'](_0x3c18db['shift']());}}}(_0x5bde,0xb20a4));function _0x5bde(){const _0x3a1b3d=['/reply','Unknown','DependentOn','requireSession','Module','_config','/universer-api/user/list','users','2045960PRrqZy','root','getMemberID','CommentService','43092036nNaeYz','1170xBGAWC','parentId','resolveComment','format','104568CpZbad','getUser','getUnit','payload','syncUpdateMutationToColla','slice','comment','880774PzVBsd','comments','replyId','userId','3095099xbcupB','commentUpdate$','20DPolMa','find','toStringTag','_configService','addComment','_sessionService','/solved','map','forEach','/add','body','6804zfONDf','HTTPService','_initUserSync','personId','UniverInstanceType','rangeId','setConfig','defineProperty','disposeWithMe','Add','pluginName','type','getCurrentUser','error','UNRECOGNIZED','dataSource','resolved','customRanges','size','OpenOrReOpen','reply','Solved','YYYY/MM/DD\x20HH:mm','add','unitId','dayjs','rangeType','UniverThreadCommentDataSourcePlugin','Delete','userID','5YVrDdi','/universer-api/comment/unit/','replies','_commentService','Reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','code','stringify','_userService','UNIVER_UNKNOWN','CustomRangeType','882DZYHRJ','content','UserManagerService','Injector','/list','_httpService','_init','ThreadCommentModel','_threadCommentModel','UniverThreadCommentUIPlugin','_injector','getOwnPropertyDescriptor','delete','Solve','addUser','_initDataSource','user','length','merge','threadId','onStarting','solved','parse','_threadCommentDataSourceService','_threadCommentDataSource','Edit','3065854XWWORc','UniverLicensePlugin','Disposable','subscribe','createTimestamp','6ZDvAFq','filter','saveCommentToSnapshot','updateComment','Plugin','values','getComment','post','symbol','Inject','get'];_0x5bde=function(){return _0x3a1b3d;};return _0x5bde();}Object[_0x4babf3(0x209)](exports,Symbol[_0x4babf3(0x1f9)],{'value':_0x4babf3(0x259)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x4babf3(0x225);var I=(_0x52ed43=>(_0x52ed43[_0x52ed43['OpenOrReOpen']=0x0]=_0x4babf3(0x215),_0x52ed43[_0x52ed43[_0x4babf3(0x217)]=0x1]='Solved',_0x52ed43[_0x52ed43[_0x4babf3(0x210)]=-0x1]=_0x4babf3(0x210),_0x52ed43))(I||{}),v=(_0x2040cf=>(_0x2040cf[_0x2040cf[_0x4babf3(0x256)]=0x0]=_0x4babf3(0x256),_0x2040cf[_0x2040cf[_0x4babf3(0x20b)]=0x1]=_0x4babf3(0x20b),_0x2040cf[_0x2040cf[_0x4babf3(0x224)]=0x2]=_0x4babf3(0x224),_0x2040cf[_0x2040cf[_0x4babf3(0x244)]=0x3]='Edit',_0x2040cf[_0x2040cf[_0x4babf3(0x21e)]=0x4]='Delete',_0x2040cf[_0x2040cf[_0x4babf3(0x238)]=0x5]=_0x4babf3(0x238),_0x2040cf[_0x2040cf[_0x4babf3(0x210)]=-0x1]=_0x4babf3(0x210),_0x2040cf))(v||{});const f=_0x223876=>c[_0x4babf3(0x21b)](new Date(+_0x223876))[_0x4babf3(0x265)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x3ace4d,_0x2c961a)=>{const _0x56c63c=_0x4babf3,_0x186687=_0x3ace4d[_0x56c63c(0x254)](c['UserManagerService']),_0x41574e=_0x3ace4d[_0x56c63c(0x254)](P[_0x56c63c(0x203)]);_0x2c961a[_0x56c63c(0x1ff)](_0x433359=>{const _0x5615fc=_0x56c63c;_0x186687[_0x5615fc(0x267)](_0x433359)&&_0x2c961a[_0x5615fc(0x237)](_0x433359);}),_0x2c961a[_0x56c63c(0x214)]&&(await _0x41574e[_0x56c63c(0x254)](_0x56c63c(0x25b),{'params':{'userIDs':[..._0x2c961a]}}))['body'][_0x56c63c(0x25c)]['forEach'](_0x281dea=>{const _0x593599=_0x56c63c;_0x281dea&&_0x186687[_0x593599(0x239)](_0x281dea);});};var $=Object[_0x4babf3(0x236)],E=(_0x2ab57f,_0x39bce7,_0x5ca327,_0x394400)=>{const _0x505065=_0x4babf3;for(var _0x360e97=_0x394400>0x1?void 0x0:_0x394400?$(_0x39bce7,_0x5ca327):_0x39bce7,_0x1465c0=_0x2ab57f[_0x505065(0x23c)]-0x1,_0xc3bd3a;_0x1465c0>=0x0;_0x1465c0--)(_0xc3bd3a=_0x2ab57f[_0x1465c0])&&(_0x360e97=_0xc3bd3a(_0x360e97)||_0x360e97);return _0x360e97;},S=(_0x1fd4ca,_0x320e7f)=>(_0x51f2fb,_0x3d4424)=>_0x320e7f(_0x51f2fb,_0x3d4424,_0x1fd4ca);function _0x2d55(_0x3177b0,_0x176f4d){const _0x5bdedc=_0x5bde();return _0x2d55=function(_0x2d5525,_0x4d35ad){_0x2d5525=_0x2d5525-0x1f0;let _0x53780b=_0x5bdedc[_0x2d5525];return _0x53780b;},_0x2d55(_0x3177b0,_0x176f4d);}let p=class extends c[_0x4babf3(0x247)]{constructor(_0x5a920b,_0xe15aeb,_0x10a64b,_0x2e9194){const _0x36fa3a=_0x4babf3;super(),this['_commentService']=_0x5a920b,this[_0x36fa3a(0x233)]=_0xe15aeb,this['_userService']=_0x10a64b,this[_0x36fa3a(0x235)]=_0x2e9194,this[_0x36fa3a(0x231)](),this[_0x36fa3a(0x204)]();}[_0x4babf3(0x204)](){const _0x29644e=_0x4babf3;this[_0x29644e(0x20a)](this[_0x29644e(0x233)][_0x29644e(0x1f6)]['pipe'](w['bufferTime'](0x10))[_0x29644e(0x248)](_0x5d04cc=>{const _0x37de9e=_0x29644e,_0x1108c9=new Set();_0x5d04cc[_0x37de9e(0x1ff)](_0x46e08f=>{const _0x4449e0=_0x37de9e;switch(_0x46e08f[_0x4449e0(0x20d)]){case'add':{const _0x2c3a7a=_0x46e08f[_0x4449e0(0x269)][_0x4449e0(0x205)];_0x1108c9[_0x4449e0(0x219)](_0x2c3a7a);break;}}}),R(this[_0x37de9e(0x235)],_0x1108c9);}));}['_init'](){const _0x1e2644=_0x4babf3;this[_0x1e2644(0x20a)](this[_0x1e2644(0x223)][_0x1e2644(0x1f6)][_0x1e2644(0x248)](async _0x2c3ea5=>{const _0x233ebf=_0x1e2644;var _0x520e92,_0x4cfbec,_0x400fd6,_0x2b6909;const _0x2bd558=(_0x520e92=this[_0x233ebf(0x233)][_0x233ebf(0x268)](_0x2c3ea5['unitId'])[_0x233ebf(0x1f8)](_0x12a94d=>_0x12a94d[_0x233ebf(0x23e)]===_0x2c3ea5['threadId']))==null?void 0x0:_0x520e92[_0x233ebf(0x25e)];if(!_0x2bd558)return;const {unitId:_0xb314a0,subUnitId:_0x2ff14e}=_0x2bd558;switch(_0x2c3ea5[_0x233ebf(0x23b)]&&this[_0x233ebf(0x228)][_0x233ebf(0x239)](_0x2c3ea5[_0x233ebf(0x23b)]),_0x2c3ea5[_0x233ebf(0x20d)]){case v[_0x233ebf(0x20b)]:break;case v[_0x233ebf(0x224)]:{this[_0x233ebf(0x233)][_0x233ebf(0x1fb)](_0xb314a0,_0x2ff14e,{'unitId':_0xb314a0,'subUnitId':_0x2ff14e,'ref':'','id':_0x2c3ea5[_0x233ebf(0x1f3)],'dT':f(+_0x2c3ea5['createTimestamp']),'threadId':_0x2c3ea5['threadId'],'personId':(_0x400fd6=(_0x4cfbec=_0x2c3ea5['user'])==null?void 0x0:_0x4cfbec['userID'])!=null?_0x400fd6:_0x2c3ea5['userId'],'text':JSON['parse'](_0x2c3ea5[_0x233ebf(0x22c)]),'parentId':_0x2bd558['id']});break;}case v[_0x233ebf(0x21e)]:{const _0x35b3be=this[_0x233ebf(0x233)][_0x233ebf(0x250)](_0xb314a0,_0x2ff14e,_0x2c3ea5[_0x233ebf(0x1f3)]);_0x35b3be&&_0x35b3be[_0x233ebf(0x263)]&&this[_0x233ebf(0x233)]['deleteComment'](_0xb314a0,_0x2ff14e,_0x2c3ea5[_0x233ebf(0x1f3)]);break;}case v[_0x233ebf(0x244)]:{this[_0x233ebf(0x233)][_0x233ebf(0x24d)](_0xb314a0,_0x2ff14e,{'commentId':_0x2c3ea5['replyId'],'text':JSON['parse'](_0x2c3ea5[_0x233ebf(0x22c)])});break;}case v[_0x233ebf(0x238)]:{const _0x4e603b=(_0x2b6909=this[_0x233ebf(0x233)][_0x233ebf(0x268)](_0x2c3ea5[_0x233ebf(0x21a)])[_0x233ebf(0x1f8)](_0x4ddf0d=>_0x4ddf0d[_0x233ebf(0x23e)]===_0x2c3ea5[_0x233ebf(0x23e)]))==null?void 0x0:_0x2b6909[_0x233ebf(0x25e)];_0x4e603b&&this[_0x233ebf(0x233)][_0x233ebf(0x264)](_0xb314a0,_0x2ff14e,_0x4e603b['id'],_0x2c3ea5[_0x233ebf(0x240)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x4babf3(0x253)](b[_0x4babf3(0x260)])),S(0x1,c['Inject'](M[_0x4babf3(0x232)])),S(0x2,c[_0x4babf3(0x253)](c[_0x4babf3(0x22d)])),S(0x3,c[_0x4babf3(0x253)](c[_0x4babf3(0x22e)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x4babf3(0x236)],x=(_0x58f7df,_0x3cbaaa,_0x3c37d4,_0x490ab3)=>{const _0x4081e0=_0x4babf3;for(var _0x5a4ffb=_0x490ab3>0x1?void 0x0:_0x490ab3?A(_0x3cbaaa,_0x3c37d4):_0x3cbaaa,_0x1355c5=_0x58f7df[_0x4081e0(0x23c)]-0x1,_0x2682fb;_0x1355c5>=0x0;_0x1355c5--)(_0x2682fb=_0x58f7df[_0x1355c5])&&(_0x5a4ffb=_0x2682fb(_0x5a4ffb)||_0x5a4ffb);return _0x5a4ffb;},_=(_0x52eebb,_0x24e95a)=>(_0x5bb277,_0x36be26)=>_0x24e95a(_0x5bb277,_0x36be26,_0x52eebb);function Y(_0x55c67b,_0x507c92){const _0x1f1dd5=_0x4babf3,_0x197d3a=_0x55c67b[_0x1f1dd5(0x222)][0x0];return{..._0x507c92,'id':_0x197d3a[_0x1f1dd5(0x1f3)],'resolved':_0x55c67b[_0x1f1dd5(0x240)]===0x1,'dT':f(_0x197d3a[_0x1f1dd5(0x249)]),'personId':_0x197d3a[_0x1f1dd5(0x1f4)],'threadId':_0x197d3a['threadId']};}function G(_0x27e0d2,_0x469f9d,_0x551d49){const _0x18a139=_0x4babf3;var _0x4a8e37,_0x30d909;if(((_0x30d909=(_0x4a8e37=_0x27e0d2==null?void 0x0:_0x27e0d2[_0x18a139(0x222)])==null?void 0x0:_0x4a8e37[_0x18a139(0x23c)])!=null?_0x30d909:0x0)>0x0){const _0x6c78c7=(_0x5de07f,_0x286117)=>({'id':_0x5de07f[_0x18a139(0x1f3)],'threadId':_0x5de07f[_0x18a139(0x23e)],'dT':f(_0x5de07f['createTimestamp']),'personId':_0x5de07f[_0x18a139(0x1f4)],'resolved':_0x27e0d2[_0x18a139(0x240)]===I['Solved'],'unitId':_0x469f9d,'subUnitId':_0x551d49,'text':JSON[_0x18a139(0x241)](_0x5de07f[_0x18a139(0x22c)]),'parentId':_0x286117}),_0x54fec9=_0x6c78c7(_0x27e0d2[_0x18a139(0x222)][0x0]);return{..._0x54fec9,'children':_0x27e0d2[_0x18a139(0x222)][_0x18a139(0x26b)](0x1)[_0x18a139(0x1fe)](_0x6579e7=>_0x6c78c7(_0x6579e7,_0x54fec9['id']))};}return null;}let g=class{constructor(_0x2e1fba,_0x18a575,_0x50f479,_0x2b6076){const _0x1dbef9=_0x4babf3;this[_0x1dbef9(0x230)]=_0x2e1fba,this[_0x1dbef9(0x228)]=_0x18a575,this[_0x1dbef9(0x1fc)]=_0x50f479,this[_0x1dbef9(0x235)]=_0x2b6076;}async['addComment'](_0x3585e5){const _0x1dd893=_0x4babf3;var _0x38a70f,_0x4e9661;const {parentId:_0x59f47c,unitId:_0x15b7d4,text:_0x59b468,threadId:_0x59daab}=_0x3585e5,_0x3f2537=(_0x4e9661=(_0x38a70f=_0x59b468[_0x1dd893(0x213)])==null?void 0x0:_0x38a70f[_0x1dd893(0x24b)](_0x3fb9d3=>_0x3fb9d3[_0x1dd893(0x21c)]===c[_0x1dd893(0x22a)]['COMMENT'])[_0x1dd893(0x1fe)](_0x5dd6a7=>_0x5dd6a7[_0x1dd893(0x207)]))!=null?_0x4e9661:[],_0x4e536a=JSON[_0x1dd893(0x227)](_0x59b468),_0x99df47=(await this[_0x1dd893(0x1fc)]['requireSession'](_0x15b7d4))['getMemberID']();if(_0x59f47c){const _0x20e1f8={'memberId':_0x99df47,'unitId':_0x15b7d4,'content':_0x4e536a,'mention':_0x3f2537,'threadId':_0x59daab},_0xcc147b=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x15b7d4+_0x1dd893(0x255),{'body':_0x20e1f8}))[_0x1dd893(0x201)][_0x1dd893(0x216)];return{..._0x3585e5,'id':_0xcc147b[_0x1dd893(0x1f3)],'dT':c['dayjs'](+_0xcc147b[_0x1dd893(0x249)])['format'](_0x1dd893(0x218)),'personId':_0xcc147b['userId']};}else{const _0x24b762={'memberId':_0x99df47,'unitId':_0x15b7d4,'content':_0x4e536a,'mention':_0x3f2537},_0x1f21e8=await this[_0x1dd893(0x230)][_0x1dd893(0x251)](_0x1dd893(0x221)+_0x15b7d4+_0x1dd893(0x200),{'body':_0x24b762});return Y(_0x1f21e8[_0x1dd893(0x201)][_0x1dd893(0x1f0)],_0x3585e5);}}async[_0x4babf3(0x24d)](_0x40e15a){const _0x372623=_0x4babf3;var _0x2e2ee6,_0x55d550;const {text:_0xdbbdc4,unitId:_0x135487}=_0x40e15a,_0x82820b=(_0x55d550=(_0x2e2ee6=_0xdbbdc4[_0x372623(0x213)])==null?void 0x0:_0x2e2ee6['filter'](_0x22174a=>_0x22174a['rangeType']===c[_0x372623(0x22a)]['COMMENT'])[_0x372623(0x1fe)](_0x2cdf7b=>_0x2cdf7b['rangeId']))!=null?_0x55d550:[],_0x138322=JSON[_0x372623(0x227)](_0xdbbdc4),_0x515fe4=_0x40e15a[_0x372623(0x23e)],_0x19f336=_0x40e15a['id'],_0x262bdf={'memberId':(await this[_0x372623(0x1fc)]['requireSession'](_0x135487))[_0x372623(0x25f)](),'unitId':_0x135487,'threadId':_0x515fe4,'mention':_0x82820b,'content':_0x138322,'replyId':_0x19f336},_0x141c22=await this[_0x372623(0x230)][_0x372623(0x251)](_0x372623(0x221)+_0x135487+'/edit',{'body':_0x262bdf});return!_0x141c22[_0x372623(0x201)][_0x372623(0x20f)]||_0x141c22['body']['error']['code']===0x1;}async[_0x4babf3(0x264)](_0xe4a107){const _0x1003c6=_0x4babf3,{unitId:_0x397641}=_0xe4a107,_0x35dfcb=_0xe4a107['threadId'],_0x31f399={'memberId':this[_0x1003c6(0x228)][_0x1003c6(0x20e)]()[_0x1003c6(0x21f)],'unitId':_0x397641,'threadId':_0x35dfcb,'solved':_0xe4a107[_0x1003c6(0x212)]?I['Solved']:I[_0x1003c6(0x215)]},_0xc19b28=await this[_0x1003c6(0x230)][_0x1003c6(0x251)]('/universer-api/comment/unit/'+_0x397641+_0x1003c6(0x1fd),{'body':_0x31f399});return!_0xc19b28[_0x1003c6(0x201)]['error']||_0xc19b28[_0x1003c6(0x201)][_0x1003c6(0x20f)][_0x1003c6(0x226)]===0x1;}async['deleteComment'](_0x3c3b27,_0x4c8553,_0x55b5f9,_0x3424c1){const _0x20d82b=_0x4babf3,_0x1a2086={'memberId':(await this[_0x20d82b(0x1fc)][_0x20d82b(0x258)](_0x3c3b27))[_0x20d82b(0x25f)](),'threadId':_0x55b5f9,'replyId':_0x3424c1,'unitId':_0x3c3b27},_0x43d855=await this[_0x20d82b(0x230)][_0x20d82b(0x251)](_0x20d82b(0x221)+_0x3c3b27+'/delete',{'body':_0x1a2086});return!_0x43d855[_0x20d82b(0x201)]['error']||_0x43d855['body']['error'][_0x20d82b(0x226)]===0x1;}async['listComments'](_0x58c790,_0x1c9e1d,_0x432c29){const _0x1bc9a0=_0x4babf3,_0x13cf25={'unitId':_0x58c790,'threadId':_0x432c29},_0x36924e=await this[_0x1bc9a0(0x230)][_0x1bc9a0(0x251)](_0x1bc9a0(0x221)+_0x58c790+_0x1bc9a0(0x22f),{'body':_0x13cf25}),_0xa8e069=_0x432c29[_0x1bc9a0(0x1fe)](_0xc02db5=>G(_0x36924e[_0x1bc9a0(0x201)][_0x1bc9a0(0x1f2)][_0xc02db5],_0x58c790,_0x1c9e1d))[_0x1bc9a0(0x24b)](Boolean);return Object[_0x1bc9a0(0x24f)](_0x36924e[_0x1bc9a0(0x201)][_0x1bc9a0(0x25c)])[_0x1bc9a0(0x1ff)](_0xcebba0=>{const _0x568524=_0x1bc9a0;this[_0x568524(0x228)][_0x568524(0x239)](_0xcebba0);}),_0xa8e069;}[_0x4babf3(0x24c)](_0x3e8ffc){return{'id':_0x3e8ffc['id'],'threadId':_0x3e8ffc['threadId'],'ref':_0x3e8ffc['ref']};}};g=x([_(0x0,c[_0x4babf3(0x253)](P[_0x4babf3(0x203)])),_(0x1,c[_0x4babf3(0x253)](c[_0x4babf3(0x22d)])),_(0x2,c[_0x4babf3(0x253)](b['CollaborationSessionService'])),_(0x3,c[_0x4babf3(0x253)](c[_0x4babf3(0x22e)]))],g);var H=Object[_0x4babf3(0x236)],J=(_0x2b256c,_0x9fb4a7,_0x5d1c49,_0x19e5d8)=>{const _0x48840a=_0x4babf3;for(var _0x4f01fd=_0x19e5d8>0x1?void 0x0:_0x19e5d8?H(_0x9fb4a7,_0x5d1c49):_0x9fb4a7,_0x2eef37=_0x2b256c[_0x48840a(0x23c)]-0x1,_0xb69b6b;_0x2eef37>=0x0;_0x2eef37--)(_0xb69b6b=_0x2b256c[_0x2eef37])&&(_0x4f01fd=_0xb69b6b(_0x4f01fd)||_0x4f01fd);return _0x4f01fd;},y=(_0x31f95b,_0x138a5c)=>(_0x40efe3,_0xea7acf)=>_0x138a5c(_0x40efe3,_0xea7acf,_0x31f95b);let C=class extends c['Disposable']{constructor(_0xbc5627,_0x3ad1d){const _0x5a8f86=_0x4babf3;super(),this[_0x5a8f86(0x242)]=_0xbc5627,this[_0x5a8f86(0x243)]=_0x3ad1d,this[_0x5a8f86(0x23a)]();}[_0x4babf3(0x23a)](){const _0x51a50b=_0x4babf3;this[_0x51a50b(0x242)][_0x51a50b(0x211)]=this['_threadCommentDataSource'],this[_0x51a50b(0x242)][_0x51a50b(0x26a)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x4babf3(0x253)](g))],C);var F=Object[_0x4babf3(0x209)],L=Object[_0x4babf3(0x236)],Z=(_0x3c9017,_0x56af17,_0x6f0fb3)=>_0x56af17 in _0x3c9017?F(_0x3c9017,_0x56af17,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6f0fb3}):_0x3c9017[_0x56af17]=_0x6f0fb3,W=(_0x354374,_0x2df8bd,_0x154e9e,_0x87673a)=>{for(var _0x4c392c=_0x87673a>0x1?void 0x0:_0x87673a?L(_0x2df8bd,_0x154e9e):_0x2df8bd,_0x1d20a8=_0x354374['length']-0x1,_0x42c182;_0x1d20a8>=0x0;_0x1d20a8--)(_0x42c182=_0x354374[_0x1d20a8])&&(_0x4c392c=_0x42c182(_0x4c392c)||_0x4c392c);return _0x4c392c;},O=(_0xf8f73e,_0x16ebe5)=>(_0x19c655,_0x3355c1)=>_0x16ebe5(_0x19c655,_0x3355c1,_0xf8f73e),N=(_0x5b3313,_0x5b6f2b,_0x3a3f95)=>Z(_0x5b3313,typeof _0x5b6f2b!=_0x4babf3(0x252)?_0x5b6f2b+'':_0x5b6f2b,_0x3a3f95);exports[_0x4babf3(0x21d)]=class extends c[_0x4babf3(0x24e)]{constructor(_0x3103c4=D,_0x19ce29,_0x4dcf9f){const _0xd88bc9=_0x4babf3;super(),this[_0xd88bc9(0x25a)]=_0x3103c4,this[_0xd88bc9(0x235)]=_0x19ce29,this[_0xd88bc9(0x1fa)]=_0x4dcf9f;const {..._0x2318e5}=c[_0xd88bc9(0x23d)]({},D,this['_config']);this[_0xd88bc9(0x1fa)][_0xd88bc9(0x208)](q,_0x2318e5);}[_0x4babf3(0x23f)](){const _0x4753ff=_0x4babf3;[[g],[C],[p]][_0x4753ff(0x1ff)](_0x196311=>{const _0x2f66d5=_0x4753ff;this[_0x2f66d5(0x235)][_0x2f66d5(0x219)](_0x196311);});}['onReady'](){const _0x42c438=_0x4babf3;this['_injector'][_0x42c438(0x254)](C),this[_0x42c438(0x235)][_0x42c438(0x254)](p);}},N(exports[_0x4babf3(0x21d)],_0x4babf3(0x20c),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0x4babf3(0x206)][_0x4babf3(0x229)]),exports[_0x4babf3(0x21d)]=W([c[_0x4babf3(0x257)](j[_0x4babf3(0x234)],b['UniverCollaborationClientPlugin'],T[_0x4babf3(0x246)]),O(0x1,c[_0x4babf3(0x253)](c[_0x4babf3(0x22e)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xd3216e=_0x586b;(function(_0x22c8e5,_0x3f9307){const _0x54fb4e=_0x586b,_0x218f47=_0x22c8e5();while(!![]){try{const _0x20c050=parseInt(_0x54fb4e(0x13a))/0x1*(parseInt(_0x54fb4e(0x113))/0x2)+parseInt(_0x54fb4e(0xed))/0x3+parseInt(_0x54fb4e(0x120))/0x4+-parseInt(_0x54fb4e(0x11f))/0x5+parseInt(_0x54fb4e(0x134))/0x6*(-parseInt(_0x54fb4e(0xef))/0x7)+-parseInt(_0x54fb4e(0x145))/0x8+-parseInt(_0x54fb4e(0x114))/0x9*(parseInt(_0x54fb4e(0x10e))/0xa);if(_0x20c050===_0x3f9307)break;else _0x218f47['push'](_0x218f47['shift']());}catch(_0x408bfd){_0x218f47['push'](_0x218f47['shift']());}}}(_0x9c85,0x80583));import{CommentService as _0x67df09,CollaborationSessionService as _0x41d110,UniverCollaborationClientPlugin as _0x4ed5e1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1c7e69}from'@univerjs-pro/license';import{dayjs as _0x20ef59,UserManagerService as _0x40b3f1,Inject as _0x44f5e1,Injector as _0x58e5e7,Disposable as _0x1b4e61,CustomRangeType as _0x4ab199,UniverInstanceType as _0x37bca2,DependentOn as _0x83fc12,IConfigService as _0x20992b,Plugin as _0x323721,merge as _0x67d16f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x49bd5f}from'@univerjs/thread-comment-ui';function _0x586b(_0x5325d1,_0x4b4180){const _0x9c85e1=_0x9c85();return _0x586b=function(_0x586b50,_0x3604e5){_0x586b50=_0x586b50-0xe8;let _0x5c460a=_0x9c85e1[_0x586b50];return _0x5c460a;},_0x586b(_0x5325d1,_0x4b4180);}import{ThreadCommentModel as _0x700cee,IThreadCommentDataSourceService as _0x12b23a}from'@univerjs/thread-comment';import{bufferTime as _0x1a9a9a}from'rxjs';function _0x9c85(){const _0x407200=['users','userID','user','_initDataSource','getCurrentUser','getMemberID','_init','Solve','_sessionService','deleteComment','419658wxUmig','OpenOrReOpen','disposeWithMe','type','userId','requireSession','113gkkshO','Unknown','comments','payload','personId','updateComment','customRanges','rangeType','createTimestamp','body','content','4240896tLZfyP','replyId','Reply','UNRECOGNIZED','reply','getUnit','/universer-api/user/list','_configService','code','solved','getOwnPropertyDescriptor','symbol','YYYY/MM/DD\x20HH:mm','/edit','767598yGlVsz','comment','7ZLHvhe','_commentService','/solved','_threadCommentDataSource','_httpService','/universer-api/comment/unit/','COMMENT','subscribe','/list','size','_threadCommentDataSourceService','post','syncUpdateMutationToColla','filter','delete','get','unitId','forEach','add','addUser','threadId','error','find','_threadCommentModel','Delete','thread-comment-data-source.config','/delete','/add','pipe','_userService','addComment','450BzGMxr','map','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initUserSync','parentId','15534atJLgL','35676HgIESP','rangeId','_injector','length','slice','onReady','Add','format','pluginName','getComment','commentUpdate$','2137165ENxGuP','2392120ciQfvE','getUser','root','replies','stringify','_config','Edit','parse','resolveComment','Solved'];_0x9c85=function(){return _0x407200;};return _0x9c85();}import{HTTPService as _0x38707a}from'@univerjs/network';const W=_0xd3216e(0x110);var I=(_0x34644b=>(_0x34644b[_0x34644b['OpenOrReOpen']=0x0]=_0xd3216e(0x135),_0x34644b[_0x34644b[_0xd3216e(0x129)]=0x1]='Solved',_0x34644b[_0x34644b[_0xd3216e(0x148)]=-0x1]=_0xd3216e(0x148),_0x34644b))(I||{}),v=(_0x5a6ae8=>(_0x5a6ae8[_0x5a6ae8['Unknown']=0x0]=_0xd3216e(0x13b),_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x11a)]=0x1]=_0xd3216e(0x11a),_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x147)]=0x2]='Reply',_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x126)]=0x3]=_0xd3216e(0x126),_0x5a6ae8[_0x5a6ae8['Delete']=0x4]='Delete',_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x131)]=0x5]=_0xd3216e(0x131),_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x148)]=-0x1]=_0xd3216e(0x148),_0x5a6ae8))(v||{});const D=_0x36e24f=>_0x20ef59(new Date(+_0x36e24f))[_0xd3216e(0x11b)](_0xd3216e(0xeb)),B=async(_0x1344df,_0x4b7d37)=>{const _0x396a93=_0xd3216e,_0x3dafdb=_0x1344df['get'](_0x40b3f1),_0x55b8bc=_0x1344df[_0x396a93(0xfe)](_0x38707a);_0x4b7d37['forEach'](_0x4103c3=>{const _0x732a2c=_0x396a93;_0x3dafdb[_0x732a2c(0x121)](_0x4103c3)&&_0x4b7d37[_0x732a2c(0xfd)](_0x4103c3);}),_0x4b7d37[_0x396a93(0xf8)]&&(await _0x55b8bc[_0x396a93(0xfe)](_0x396a93(0x14b),{'params':{'userIDs':[..._0x4b7d37]}}))[_0x396a93(0x143)][_0x396a93(0x12a)][_0x396a93(0x100)](_0x477a09=>{const _0x2fb1ea=_0x396a93;_0x477a09&&_0x3dafdb[_0x2fb1ea(0x102)](_0x477a09);});};var K=Object[_0xd3216e(0xe9)],V=(_0x31706f,_0x5658bc,_0xd74f1b,_0x5ec9b7)=>{const _0x515d23=_0xd3216e;for(var _0x149e06=_0x5ec9b7>0x1?void 0x0:_0x5ec9b7?K(_0x5658bc,_0xd74f1b):_0x5658bc,_0x1b285c=_0x31706f[_0x515d23(0x117)]-0x1,_0x42af4e;_0x1b285c>=0x0;_0x1b285c--)(_0x42af4e=_0x31706f[_0x1b285c])&&(_0x149e06=_0x42af4e(_0x149e06)||_0x149e06);return _0x149e06;},p=(_0x594d18,_0x1f8570)=>(_0x39abcc,_0x55474d)=>_0x1f8570(_0x39abcc,_0x55474d,_0x594d18);let S=class extends _0x1b4e61{constructor(_0x511efc,_0x31069c,_0x1403a0,_0x556254){const _0x366c7f=_0xd3216e;super(),this['_commentService']=_0x511efc,this[_0x366c7f(0x106)]=_0x31069c,this[_0x366c7f(0x10c)]=_0x1403a0,this[_0x366c7f(0x116)]=_0x556254,this['_init'](),this[_0x366c7f(0x111)]();}[_0xd3216e(0x111)](){const _0x7a7bb0=_0xd3216e;this[_0x7a7bb0(0x136)](this[_0x7a7bb0(0x106)][_0x7a7bb0(0x11e)][_0x7a7bb0(0x10b)](_0x1a9a9a(0x10))['subscribe'](_0x374198=>{const _0x20c4f7=_0x7a7bb0,_0x54ab82=new Set();_0x374198['forEach'](_0xe0228c=>{const _0x50419c=_0x586b;switch(_0xe0228c[_0x50419c(0x137)]){case _0x50419c(0x101):{const _0x402882=_0xe0228c[_0x50419c(0x13d)][_0x50419c(0x13e)];_0x54ab82[_0x50419c(0x101)](_0x402882);break;}}}),B(this[_0x20c4f7(0x116)],_0x54ab82);}));}[_0xd3216e(0x130)](){const _0x38ebf5=_0xd3216e;this[_0x38ebf5(0x136)](this[_0x38ebf5(0xf0)][_0x38ebf5(0x11e)][_0x38ebf5(0xf6)](async _0x31c229=>{const _0x4ef882=_0x38ebf5;var _0x312950,_0x1f28a8,_0x323e9b,_0x2a94f0;const _0x59625d=(_0x312950=this[_0x4ef882(0x106)][_0x4ef882(0x14a)](_0x31c229[_0x4ef882(0xff)])[_0x4ef882(0x105)](_0x45a0db=>_0x45a0db[_0x4ef882(0x103)]===_0x31c229[_0x4ef882(0x103)]))==null?void 0x0:_0x312950['root'];if(!_0x59625d)return;const {unitId:_0x386981,subUnitId:_0x5e6a56}=_0x59625d;switch(_0x31c229[_0x4ef882(0x12c)]&&this[_0x4ef882(0x10c)]['addUser'](_0x31c229[_0x4ef882(0x12c)]),_0x31c229['type']){case v[_0x4ef882(0x11a)]:break;case v[_0x4ef882(0x147)]:{this['_threadCommentModel']['addComment'](_0x386981,_0x5e6a56,{'unitId':_0x386981,'subUnitId':_0x5e6a56,'ref':'','id':_0x31c229[_0x4ef882(0x146)],'dT':D(+_0x31c229[_0x4ef882(0x142)]),'threadId':_0x31c229['threadId'],'personId':(_0x323e9b=(_0x1f28a8=_0x31c229[_0x4ef882(0x12c)])==null?void 0x0:_0x1f28a8[_0x4ef882(0x12b)])!=null?_0x323e9b:_0x31c229[_0x4ef882(0x138)],'text':JSON[_0x4ef882(0x127)](_0x31c229['content']),'parentId':_0x59625d['id']});break;}case v[_0x4ef882(0x107)]:{const _0x5a5085=this[_0x4ef882(0x106)][_0x4ef882(0x11d)](_0x386981,_0x5e6a56,_0x31c229['replyId']);_0x5a5085&&_0x5a5085[_0x4ef882(0x112)]&&this[_0x4ef882(0x106)][_0x4ef882(0x133)](_0x386981,_0x5e6a56,_0x31c229['replyId']);break;}case v[_0x4ef882(0x126)]:{this[_0x4ef882(0x106)][_0x4ef882(0x13f)](_0x386981,_0x5e6a56,{'commentId':_0x31c229['replyId'],'text':JSON[_0x4ef882(0x127)](_0x31c229[_0x4ef882(0x144)])});break;}case v[_0x4ef882(0x131)]:{const _0x5bc1b6=(_0x2a94f0=this['_threadCommentModel'][_0x4ef882(0x14a)](_0x31c229[_0x4ef882(0xff)])[_0x4ef882(0x105)](_0x447cf0=>_0x447cf0[_0x4ef882(0x103)]===_0x31c229[_0x4ef882(0x103)]))==null?void 0x0:_0x2a94f0[_0x4ef882(0x122)];_0x5bc1b6&&this['_threadCommentModel']['resolveComment'](_0x386981,_0x5e6a56,_0x5bc1b6['id'],_0x31c229[_0x4ef882(0xe8)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x44f5e1(_0x67df09)),p(0x1,_0x44f5e1(_0x700cee)),p(0x2,_0x44f5e1(_0x40b3f1)),p(0x3,_0x44f5e1(_0x58e5e7))],S);const z=_0xd3216e(0x108),M={};var k=Object[_0xd3216e(0xe9)],Q=(_0x536f2d,_0x1c1e1a,_0x5afd63,_0x13be80)=>{const _0x234cd8=_0xd3216e;for(var _0x230fc4=_0x13be80>0x1?void 0x0:_0x13be80?k(_0x1c1e1a,_0x5afd63):_0x1c1e1a,_0x4b10a9=_0x536f2d[_0x234cd8(0x117)]-0x1,_0x1bf5ad;_0x4b10a9>=0x0;_0x4b10a9--)(_0x1bf5ad=_0x536f2d[_0x4b10a9])&&(_0x230fc4=_0x1bf5ad(_0x230fc4)||_0x230fc4);return _0x230fc4;},_=(_0x5aa1cf,_0x24fe43)=>(_0x3e576f,_0x55cd1a)=>_0x24fe43(_0x3e576f,_0x55cd1a,_0x5aa1cf);function X(_0xbfc9ec,_0x4cfcd9){const _0x2f203c=_0xd3216e,_0x11c5d5=_0xbfc9ec[_0x2f203c(0x123)][0x0];return{..._0x4cfcd9,'id':_0x11c5d5[_0x2f203c(0x146)],'resolved':_0xbfc9ec['solved']===0x1,'dT':D(_0x11c5d5[_0x2f203c(0x142)]),'personId':_0x11c5d5['userId'],'threadId':_0x11c5d5[_0x2f203c(0x103)]};}function ee(_0x53c2f9,_0x19bf08,_0x51d1b7){const _0xe522ac=_0xd3216e;var _0x57f858,_0x528677;if(((_0x528677=(_0x57f858=_0x53c2f9==null?void 0x0:_0x53c2f9[_0xe522ac(0x123)])==null?void 0x0:_0x57f858[_0xe522ac(0x117)])!=null?_0x528677:0x0)>0x0){const _0x3e0b84=(_0x35c3bf,_0x2a9813)=>({'id':_0x35c3bf['replyId'],'threadId':_0x35c3bf[_0xe522ac(0x103)],'dT':D(_0x35c3bf[_0xe522ac(0x142)]),'personId':_0x35c3bf[_0xe522ac(0x138)],'resolved':_0x53c2f9[_0xe522ac(0xe8)]===I[_0xe522ac(0x129)],'unitId':_0x19bf08,'subUnitId':_0x51d1b7,'text':JSON[_0xe522ac(0x127)](_0x35c3bf[_0xe522ac(0x144)]),'parentId':_0x2a9813}),_0x4cd1c4=_0x3e0b84(_0x53c2f9[_0xe522ac(0x123)][0x0]);return{..._0x4cd1c4,'children':_0x53c2f9[_0xe522ac(0x123)][_0xe522ac(0x118)](0x1)['map'](_0x367808=>_0x3e0b84(_0x367808,_0x4cd1c4['id']))};}return null;}let f=class{constructor(_0x2a3828,_0xb64f44,_0x4d2b89,_0x4433ee){const _0x4bbd33=_0xd3216e;this[_0x4bbd33(0xf3)]=_0x2a3828,this[_0x4bbd33(0x10c)]=_0xb64f44,this[_0x4bbd33(0x132)]=_0x4d2b89,this[_0x4bbd33(0x116)]=_0x4433ee;}async[_0xd3216e(0x10d)](_0x2c74c){const _0x2c6fd6=_0xd3216e;var _0x553c3b,_0x48284c;const {parentId:_0x448fde,unitId:_0x273f47,text:_0x59e12e,threadId:_0x412fe4}=_0x2c74c,_0x156609=(_0x48284c=(_0x553c3b=_0x59e12e[_0x2c6fd6(0x140)])==null?void 0x0:_0x553c3b[_0x2c6fd6(0xfc)](_0x4e4263=>_0x4e4263[_0x2c6fd6(0x141)]===_0x4ab199[_0x2c6fd6(0xf5)])[_0x2c6fd6(0x10f)](_0x5d7f2f=>_0x5d7f2f[_0x2c6fd6(0x115)]))!=null?_0x48284c:[],_0x3289cf=JSON[_0x2c6fd6(0x124)](_0x59e12e),_0x3ddbd0=(await this[_0x2c6fd6(0x132)][_0x2c6fd6(0x139)](_0x273f47))[_0x2c6fd6(0x12f)]();if(_0x448fde){const _0x53e926={'memberId':_0x3ddbd0,'unitId':_0x273f47,'content':_0x3289cf,'mention':_0x156609,'threadId':_0x412fe4},_0x176bc7=(await this[_0x2c6fd6(0xf3)][_0x2c6fd6(0xfa)](_0x2c6fd6(0xf4)+_0x273f47+'/reply',{'body':_0x53e926}))[_0x2c6fd6(0x143)][_0x2c6fd6(0x149)];return{..._0x2c74c,'id':_0x176bc7[_0x2c6fd6(0x146)],'dT':_0x20ef59(+_0x176bc7[_0x2c6fd6(0x142)])[_0x2c6fd6(0x11b)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x176bc7['userId']};}else{const _0x3402a7={'memberId':_0x3ddbd0,'unitId':_0x273f47,'content':_0x3289cf,'mention':_0x156609},_0xabd233=await this[_0x2c6fd6(0xf3)]['post']('/universer-api/comment/unit/'+_0x273f47+_0x2c6fd6(0x10a),{'body':_0x3402a7});return X(_0xabd233['body'][_0x2c6fd6(0xee)],_0x2c74c);}}async[_0xd3216e(0x13f)](_0x2807e8){const _0xd92e92=_0xd3216e;var _0x39a968,_0x16f1e7;const {text:_0x4fd718,unitId:_0x2c3675}=_0x2807e8,_0x1dbf83=(_0x16f1e7=(_0x39a968=_0x4fd718[_0xd92e92(0x140)])==null?void 0x0:_0x39a968[_0xd92e92(0xfc)](_0x357215=>_0x357215[_0xd92e92(0x141)]===_0x4ab199[_0xd92e92(0xf5)])[_0xd92e92(0x10f)](_0x45b2da=>_0x45b2da[_0xd92e92(0x115)]))!=null?_0x16f1e7:[],_0x1f9ff2=JSON['stringify'](_0x4fd718),_0x5d4d3a=_0x2807e8[_0xd92e92(0x103)],_0x26831d=_0x2807e8['id'],_0x3a5058={'memberId':(await this[_0xd92e92(0x132)][_0xd92e92(0x139)](_0x2c3675))[_0xd92e92(0x12f)](),'unitId':_0x2c3675,'threadId':_0x5d4d3a,'mention':_0x1dbf83,'content':_0x1f9ff2,'replyId':_0x26831d},_0x34ee16=await this[_0xd92e92(0xf3)][_0xd92e92(0xfa)]('/universer-api/comment/unit/'+_0x2c3675+_0xd92e92(0xec),{'body':_0x3a5058});return!_0x34ee16[_0xd92e92(0x143)][_0xd92e92(0x104)]||_0x34ee16[_0xd92e92(0x143)]['error'][_0xd92e92(0x14d)]===0x1;}async[_0xd3216e(0x128)](_0x591bbd){const _0x30aac6=_0xd3216e,{unitId:_0x56dd20}=_0x591bbd,_0x14de69=_0x591bbd['threadId'],_0x4c94cc={'memberId':this[_0x30aac6(0x10c)][_0x30aac6(0x12e)]()[_0x30aac6(0x12b)],'unitId':_0x56dd20,'threadId':_0x14de69,'solved':_0x591bbd['resolved']?I['Solved']:I['OpenOrReOpen']},_0x19ebb3=await this[_0x30aac6(0xf3)][_0x30aac6(0xfa)](_0x30aac6(0xf4)+_0x56dd20+_0x30aac6(0xf1),{'body':_0x4c94cc});return!_0x19ebb3['body'][_0x30aac6(0x104)]||_0x19ebb3[_0x30aac6(0x143)][_0x30aac6(0x104)][_0x30aac6(0x14d)]===0x1;}async[_0xd3216e(0x133)](_0x5f2d93,_0x9dedba,_0xe6c608,_0xbc7115){const _0x25c46b=_0xd3216e,_0x5308db={'memberId':(await this[_0x25c46b(0x132)][_0x25c46b(0x139)](_0x5f2d93))['getMemberID'](),'threadId':_0xe6c608,'replyId':_0xbc7115,'unitId':_0x5f2d93},_0x1c6d15=await this[_0x25c46b(0xf3)][_0x25c46b(0xfa)](_0x25c46b(0xf4)+_0x5f2d93+_0x25c46b(0x109),{'body':_0x5308db});return!_0x1c6d15[_0x25c46b(0x143)][_0x25c46b(0x104)]||_0x1c6d15[_0x25c46b(0x143)][_0x25c46b(0x104)]['code']===0x1;}async['listComments'](_0x4a9fad,_0x52232a,_0x1c0b25){const _0x2420a2=_0xd3216e,_0x6b7e28={'unitId':_0x4a9fad,'threadId':_0x1c0b25},_0x10be8e=await this[_0x2420a2(0xf3)][_0x2420a2(0xfa)]('/universer-api/comment/unit/'+_0x4a9fad+_0x2420a2(0xf7),{'body':_0x6b7e28}),_0x51c729=_0x1c0b25[_0x2420a2(0x10f)](_0x4d35f0=>ee(_0x10be8e[_0x2420a2(0x143)][_0x2420a2(0x13c)][_0x4d35f0],_0x4a9fad,_0x52232a))[_0x2420a2(0xfc)](Boolean);return Object['values'](_0x10be8e['body']['users'])['forEach'](_0x164820=>{const _0x2b5f4b=_0x2420a2;this[_0x2b5f4b(0x10c)][_0x2b5f4b(0x102)](_0x164820);}),_0x51c729;}['saveCommentToSnapshot'](_0x91b87a){const _0x17161f=_0xd3216e;return{'id':_0x91b87a['id'],'threadId':_0x91b87a[_0x17161f(0x103)],'ref':_0x91b87a['ref']};}};f=Q([_(0x0,_0x44f5e1(_0x38707a)),_(0x1,_0x44f5e1(_0x40b3f1)),_(0x2,_0x44f5e1(_0x41d110)),_(0x3,_0x44f5e1(_0x58e5e7))],f);var re=Object[_0xd3216e(0xe9)],te=(_0x3cf2bf,_0x2e6f79,_0xa9403d,_0xc2372d)=>{for(var _0x2be11d=_0xc2372d>0x1?void 0x0:_0xc2372d?re(_0x2e6f79,_0xa9403d):_0x2e6f79,_0x551c44=_0x3cf2bf['length']-0x1,_0x1aaa47;_0x551c44>=0x0;_0x551c44--)(_0x1aaa47=_0x3cf2bf[_0x551c44])&&(_0x2be11d=_0x1aaa47(_0x2be11d)||_0x2be11d);return _0x2be11d;},N=(_0x5789f1,_0x4b641a)=>(_0x47a6d7,_0x33ce02)=>_0x4b641a(_0x47a6d7,_0x33ce02,_0x5789f1);let g=class extends _0x1b4e61{constructor(_0x2d97e5,_0x38d672){const _0x57cc43=_0xd3216e;super(),this[_0x57cc43(0xf9)]=_0x2d97e5,this[_0x57cc43(0xf2)]=_0x38d672,this[_0x57cc43(0x12d)]();}[_0xd3216e(0x12d)](){const _0x93161a=_0xd3216e;this[_0x93161a(0xf9)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x93161a(0xfb)]=!0x1;}};g=te([N(0x0,_0x12b23a),N(0x1,_0x44f5e1(f))],g);var se=Object['defineProperty'],oe=Object[_0xd3216e(0xe9)],ne=(_0x4491b0,_0x59cfb4,_0x46b6a3)=>_0x59cfb4 in _0x4491b0?se(_0x4491b0,_0x59cfb4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46b6a3}):_0x4491b0[_0x59cfb4]=_0x46b6a3,ie=(_0x4f198b,_0x30244d,_0x162e04,_0x433009)=>{const _0x1c8ac5=_0xd3216e;for(var _0x1ddd54=_0x433009>0x1?void 0x0:_0x433009?oe(_0x30244d,_0x162e04):_0x30244d,_0x2c7c59=_0x4f198b[_0x1c8ac5(0x117)]-0x1,_0x33dba1;_0x2c7c59>=0x0;_0x2c7c59--)(_0x33dba1=_0x4f198b[_0x2c7c59])&&(_0x1ddd54=_0x33dba1(_0x1ddd54)||_0x1ddd54);return _0x1ddd54;},w=(_0x4c6027,_0x2b4b58)=>(_0x3bb3cf,_0x336562)=>_0x2b4b58(_0x3bb3cf,_0x336562,_0x4c6027),$=(_0x66c4b9,_0x29b27e,_0x1df97a)=>ne(_0x66c4b9,typeof _0x29b27e!=_0xd3216e(0xea)?_0x29b27e+'':_0x29b27e,_0x1df97a);let b=class extends _0x323721{constructor(_0x1c0732=M,_0x421891,_0x4f209a){const _0x5e4b68=_0xd3216e;super(),this[_0x5e4b68(0x125)]=_0x1c0732,this[_0x5e4b68(0x116)]=_0x421891,this[_0x5e4b68(0x14c)]=_0x4f209a;const {..._0x38ecbe}=_0x67d16f({},M,this[_0x5e4b68(0x125)]);this[_0x5e4b68(0x14c)]['setConfig'](z,_0x38ecbe);}['onStarting'](){const _0x6a015=_0xd3216e;[[f],[g],[S]][_0x6a015(0x100)](_0x336f50=>{const _0x3ab620=_0x6a015;this['_injector'][_0x3ab620(0x101)](_0x336f50);});}[_0xd3216e(0x119)](){const _0x50184a=_0xd3216e;this[_0x50184a(0x116)]['get'](g),this[_0x50184a(0x116)][_0x50184a(0xfe)](S);}};$(b,_0xd3216e(0x11c),W),$(b,_0xd3216e(0x137),_0x37bca2['UNIVER_UNKNOWN']),b=ie([_0x83fc12(_0x49bd5f,_0x4ed5e1,_0x1c7e69),w(0x1,_0x44f5e1(_0x58e5e7)),w(0x2,_0x20992b)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x142e5a=_0x1064;(function(_0x5d0c7c,_0x4b2018){const _0x44a9e5=_0x1064,_0x8a2d5c=_0x5d0c7c();while(!![]){try{const _0x2ed859=parseInt(_0x44a9e5(0x210))/0x1+parseInt(_0x44a9e5(0x1fa))/0x2*(-parseInt(_0x44a9e5(0x1e7))/0x3)+parseInt(_0x44a9e5(0x1de))/0x4+parseInt(_0x44a9e5(0x1fe))/0x5+-parseInt(_0x44a9e5(0x1d7))/0x6*(-parseInt(_0x44a9e5(0x1bb))/0x7)+parseInt(_0x44a9e5(0x1d5))/0x8*(-parseInt(_0x44a9e5(0x1be))/0x9)+-parseInt(_0x44a9e5(0x21a))/0xa*(parseInt(_0x44a9e5(0x21d))/0xb);if(_0x2ed859===_0x4b2018)break;else _0x8a2d5c['push'](_0x8a2d5c['shift']());}catch(_0x5d8fe3){_0x8a2d5c['push'](_0x8a2d5c['shift']());}}}(_0x2a69,0x1d7af));import{CommentService as _0x34cb78,CollaborationSessionService as _0x3eadcd,UniverCollaborationClientPlugin as _0x2e3deb}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x30e77a}from'@univerjs-pro/license';import{dayjs as _0x547211,UserManagerService as _0x4e69f0,Inject as _0x1e832b,Injector as _0x980829,Disposable as _0x151986,CustomRangeType as _0x3a1ffb,UniverInstanceType as _0x2cb630,DependentOn as _0xdc1d9e,IConfigService as _0x265aa0,Plugin as _0x147f91,merge as _0x35d0e6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x6ce37e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xef7d91,IThreadCommentDataSourceService as _0x40a1e3}from'@univerjs/thread-comment';function _0x1064(_0x5cc6da,_0x4dba66){const _0x2a6902=_0x2a69();return _0x1064=function(_0x1064e6,_0x25d54f){_0x1064e6=_0x1064e6-0x1b4;let _0x56022d=_0x2a6902[_0x1064e6];return _0x56022d;},_0x1064(_0x5cc6da,_0x4dba66);}import{bufferTime as _0x54d44a}from'rxjs';function _0x2a69(){const _0x2b26ce=['_configService','filter','getUser','body','defineProperty','206698eYTXBu','COMMENT','syncUpdateMutationToColla','replies','846065hfcdDB','userID','/solved','dataSource','payload','_initDataSource','onReady','Solved','getComment','Add','pipe','_threadCommentDataSourceService','/delete','OpenOrReOpen','values','/add','root','stringify','1508UGchQA','resolveComment','Unknown','rangeType','personId','/reply','_init','customRanges','code','reply','10EDsLGA','user','requireSession','3202672lfTuCY','map','format','getOwnPropertyDescriptor','parse','_threadCommentModel','createTimestamp','_threadCommentDataSource','error','5103IqPxhJ','disposeWithMe','commentUpdate$','80559fVtShR','/edit','size','find','onStarting','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','addUser','getMemberID','userId','Delete','delete','length','solved','_userService','listComments','updateComment','setConfig','getCurrentUser','Reply','_httpService','comments','comment','32XAXbwD','type','1314iacnbR','symbol','rangeId','thread-comment-data-source.config','threadId','replyId','users','882736HFFIuK','add','content','parentId','deleteComment','get','UNRECOGNIZED','Solve','pluginName','3tJDjTx','subscribe','getUnit','_config','Edit','_commentService','_initUserSync','unitId','_sessionService','_injector','/universer-api/comment/unit/','post','forEach','YYYY/MM/DD\x20HH:mm'];_0x2a69=function(){return _0x2b26ce;};return _0x2a69();}import{HTTPService as _0x177d81}from'@univerjs/network';const W=_0x142e5a(0x1c4);var I=(_0x14755c=>(_0x14755c[_0x14755c['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x14755c[_0x14755c[_0x142e5a(0x205)]=0x1]='Solved',_0x14755c[_0x14755c[_0x142e5a(0x1e4)]=-0x1]=_0x142e5a(0x1e4),_0x14755c))(I||{}),v=(_0x4c2198=>(_0x4c2198[_0x4c2198[_0x142e5a(0x212)]=0x0]=_0x142e5a(0x212),_0x4c2198[_0x4c2198[_0x142e5a(0x207)]=0x1]=_0x142e5a(0x207),_0x4c2198[_0x4c2198[_0x142e5a(0x1d1)]=0x2]=_0x142e5a(0x1d1),_0x4c2198[_0x4c2198['Edit']=0x3]='Edit',_0x4c2198[_0x4c2198[_0x142e5a(0x1c8)]=0x4]='Delete',_0x4c2198[_0x4c2198[_0x142e5a(0x1e5)]=0x5]=_0x142e5a(0x1e5),_0x4c2198[_0x4c2198[_0x142e5a(0x1e4)]=-0x1]=_0x142e5a(0x1e4),_0x4c2198))(v||{});const D=_0xaabda8=>_0x547211(new Date(+_0xaabda8))[_0x142e5a(0x1b4)](_0x142e5a(0x1f4)),B=async(_0x12cd49,_0x516fee)=>{const _0x4ba0b9=_0x142e5a,_0x576a7b=_0x12cd49[_0x4ba0b9(0x1e3)](_0x4e69f0),_0x4fe986=_0x12cd49[_0x4ba0b9(0x1e3)](_0x177d81);_0x516fee['forEach'](_0xbccfdb=>{const _0x1230a8=_0x4ba0b9;_0x576a7b[_0x1230a8(0x1f7)](_0xbccfdb)&&_0x516fee[_0x1230a8(0x1c9)](_0xbccfdb);}),_0x516fee[_0x4ba0b9(0x1c0)]&&(await _0x4fe986[_0x4ba0b9(0x1e3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x516fee]}}))[_0x4ba0b9(0x1f8)][_0x4ba0b9(0x1dd)][_0x4ba0b9(0x1f3)](_0x385ed2=>{const _0x3a2a71=_0x4ba0b9;_0x385ed2&&_0x576a7b[_0x3a2a71(0x1c5)](_0x385ed2);});};var K=Object[_0x142e5a(0x1b5)],V=(_0xd9639d,_0xc51c7b,_0x5d8e70,_0x1d5194)=>{const _0x24e42c=_0x142e5a;for(var _0x1e3c35=_0x1d5194>0x1?void 0x0:_0x1d5194?K(_0xc51c7b,_0x5d8e70):_0xc51c7b,_0x17320d=_0xd9639d[_0x24e42c(0x1ca)]-0x1,_0x2a2331;_0x17320d>=0x0;_0x17320d--)(_0x2a2331=_0xd9639d[_0x17320d])&&(_0x1e3c35=_0x2a2331(_0x1e3c35)||_0x1e3c35);return _0x1e3c35;},p=(_0xc69db8,_0x10227a)=>(_0x3a64f7,_0x161329)=>_0x10227a(_0x3a64f7,_0x161329,_0xc69db8);let S=class extends _0x151986{constructor(_0x34bd5f,_0x3ee7f3,_0x330f47,_0x497047){const _0x1d578b=_0x142e5a;super(),this[_0x1d578b(0x1ec)]=_0x34bd5f,this[_0x1d578b(0x1b7)]=_0x3ee7f3,this['_userService']=_0x330f47,this[_0x1d578b(0x1f0)]=_0x497047,this[_0x1d578b(0x216)](),this[_0x1d578b(0x1ed)]();}['_initUserSync'](){const _0x59876a=_0x142e5a;this['disposeWithMe'](this[_0x59876a(0x1b7)]['commentUpdate$'][_0x59876a(0x208)](_0x54d44a(0x10))['subscribe'](_0xe561a7=>{const _0x47c1f7=_0x59876a,_0x55b9dc=new Set();_0xe561a7['forEach'](_0x40ad84=>{const _0x26bbdd=_0x1064;switch(_0x40ad84[_0x26bbdd(0x1d6)]){case _0x26bbdd(0x1df):{const _0x4a6beb=_0x40ad84[_0x26bbdd(0x202)][_0x26bbdd(0x214)];_0x55b9dc[_0x26bbdd(0x1df)](_0x4a6beb);break;}}}),B(this[_0x47c1f7(0x1f0)],_0x55b9dc);}));}[_0x142e5a(0x216)](){const _0x5b5e14=_0x142e5a;this[_0x5b5e14(0x1bc)](this[_0x5b5e14(0x1ec)][_0x5b5e14(0x1bd)][_0x5b5e14(0x1e8)](async _0x1cde6c=>{const _0x278f9c=_0x5b5e14;var _0x38b1f6,_0x6662f3,_0x2e12dc,_0x42ccd7;const _0x22f858=(_0x38b1f6=this[_0x278f9c(0x1b7)][_0x278f9c(0x1e9)](_0x1cde6c['unitId'])[_0x278f9c(0x1c1)](_0x5bc2f3=>_0x5bc2f3[_0x278f9c(0x1db)]===_0x1cde6c[_0x278f9c(0x1db)]))==null?void 0x0:_0x38b1f6['root'];if(!_0x22f858)return;const {unitId:_0x5dee63,subUnitId:_0x5a717b}=_0x22f858;switch(_0x1cde6c[_0x278f9c(0x21b)]&&this[_0x278f9c(0x1cc)]['addUser'](_0x1cde6c[_0x278f9c(0x21b)]),_0x1cde6c[_0x278f9c(0x1d6)]){case v['Add']:break;case v[_0x278f9c(0x1d1)]:{this[_0x278f9c(0x1b7)]['addComment'](_0x5dee63,_0x5a717b,{'unitId':_0x5dee63,'subUnitId':_0x5a717b,'ref':'','id':_0x1cde6c['replyId'],'dT':D(+_0x1cde6c['createTimestamp']),'threadId':_0x1cde6c[_0x278f9c(0x1db)],'personId':(_0x2e12dc=(_0x6662f3=_0x1cde6c['user'])==null?void 0x0:_0x6662f3[_0x278f9c(0x1ff)])!=null?_0x2e12dc:_0x1cde6c[_0x278f9c(0x1c7)],'text':JSON[_0x278f9c(0x1b6)](_0x1cde6c[_0x278f9c(0x1e0)]),'parentId':_0x22f858['id']});break;}case v['Delete']:{const _0x51d15a=this[_0x278f9c(0x1b7)][_0x278f9c(0x206)](_0x5dee63,_0x5a717b,_0x1cde6c[_0x278f9c(0x1dc)]);_0x51d15a&&_0x51d15a[_0x278f9c(0x1e1)]&&this[_0x278f9c(0x1b7)][_0x278f9c(0x1e2)](_0x5dee63,_0x5a717b,_0x1cde6c[_0x278f9c(0x1dc)]);break;}case v[_0x278f9c(0x1eb)]:{this[_0x278f9c(0x1b7)][_0x278f9c(0x1ce)](_0x5dee63,_0x5a717b,{'commentId':_0x1cde6c[_0x278f9c(0x1dc)],'text':JSON['parse'](_0x1cde6c['content'])});break;}case v['Solve']:{const _0x131da8=(_0x42ccd7=this[_0x278f9c(0x1b7)][_0x278f9c(0x1e9)](_0x1cde6c[_0x278f9c(0x1ee)])[_0x278f9c(0x1c1)](_0x25dcd6=>_0x25dcd6[_0x278f9c(0x1db)]===_0x1cde6c[_0x278f9c(0x1db)]))==null?void 0x0:_0x42ccd7[_0x278f9c(0x20e)];_0x131da8&&this[_0x278f9c(0x1b7)][_0x278f9c(0x211)](_0x5dee63,_0x5a717b,_0x131da8['id'],_0x1cde6c['solved']===I[_0x278f9c(0x205)]);break;}}}));}};S=V([p(0x0,_0x1e832b(_0x34cb78)),p(0x1,_0x1e832b(_0xef7d91)),p(0x2,_0x1e832b(_0x4e69f0)),p(0x3,_0x1e832b(_0x980829))],S);const z=_0x142e5a(0x1da),M={};var k=Object[_0x142e5a(0x1b5)],Q=(_0x17e0db,_0x463011,_0x20149d,_0x326dc1)=>{for(var _0x4423be=_0x326dc1>0x1?void 0x0:_0x326dc1?k(_0x463011,_0x20149d):_0x463011,_0x4fba6a=_0x17e0db['length']-0x1,_0x563e6c;_0x4fba6a>=0x0;_0x4fba6a--)(_0x563e6c=_0x17e0db[_0x4fba6a])&&(_0x4423be=_0x563e6c(_0x4423be)||_0x4423be);return _0x4423be;},_=(_0x28919e,_0x204370)=>(_0x596383,_0x1c9806)=>_0x204370(_0x596383,_0x1c9806,_0x28919e);function X(_0x185554,_0x2eb468){const _0x57d6c8=_0x142e5a,_0x6ac707=_0x185554['replies'][0x0];return{..._0x2eb468,'id':_0x6ac707[_0x57d6c8(0x1dc)],'resolved':_0x185554[_0x57d6c8(0x1cb)]===0x1,'dT':D(_0x6ac707[_0x57d6c8(0x1b8)]),'personId':_0x6ac707[_0x57d6c8(0x1c7)],'threadId':_0x6ac707[_0x57d6c8(0x1db)]};}function ee(_0x534dc0,_0xd16d73,_0x10a196){const _0x219210=_0x142e5a;var _0x1a920e,_0x3eee57;if(((_0x3eee57=(_0x1a920e=_0x534dc0==null?void 0x0:_0x534dc0['replies'])==null?void 0x0:_0x1a920e['length'])!=null?_0x3eee57:0x0)>0x0){const _0x1a7f56=(_0x58e1d9,_0x443b2c)=>({'id':_0x58e1d9[_0x219210(0x1dc)],'threadId':_0x58e1d9[_0x219210(0x1db)],'dT':D(_0x58e1d9[_0x219210(0x1b8)]),'personId':_0x58e1d9[_0x219210(0x1c7)],'resolved':_0x534dc0['solved']===I[_0x219210(0x205)],'unitId':_0xd16d73,'subUnitId':_0x10a196,'text':JSON[_0x219210(0x1b6)](_0x58e1d9['content']),'parentId':_0x443b2c}),_0x19a485=_0x1a7f56(_0x534dc0[_0x219210(0x1fd)][0x0]);return{..._0x19a485,'children':_0x534dc0['replies']['slice'](0x1)[_0x219210(0x21e)](_0x49300c=>_0x1a7f56(_0x49300c,_0x19a485['id']))};}return null;}let f=class{constructor(_0x4c7624,_0x39159a,_0x55907f,_0x476a84){const _0x27a9c2=_0x142e5a;this[_0x27a9c2(0x1d2)]=_0x4c7624,this[_0x27a9c2(0x1cc)]=_0x39159a,this['_sessionService']=_0x55907f,this[_0x27a9c2(0x1f0)]=_0x476a84;}async['addComment'](_0x31a310){const _0x2f0f29=_0x142e5a;var _0x403e0a,_0x12b136;const {parentId:_0x958274,unitId:_0x197c37,text:_0x270f51,threadId:_0x1a9d00}=_0x31a310,_0x3b26ed=(_0x12b136=(_0x403e0a=_0x270f51[_0x2f0f29(0x217)])==null?void 0x0:_0x403e0a[_0x2f0f29(0x1f6)](_0x4973f6=>_0x4973f6[_0x2f0f29(0x213)]===_0x3a1ffb[_0x2f0f29(0x1fb)])[_0x2f0f29(0x21e)](_0x129377=>_0x129377[_0x2f0f29(0x1d9)]))!=null?_0x12b136:[],_0x1b7874=JSON['stringify'](_0x270f51),_0x51bdd8=(await this[_0x2f0f29(0x1ef)][_0x2f0f29(0x21c)](_0x197c37))['getMemberID']();if(_0x958274){const _0x4fb131={'memberId':_0x51bdd8,'unitId':_0x197c37,'content':_0x1b7874,'mention':_0x3b26ed,'threadId':_0x1a9d00},_0x3d7fd0=(await this[_0x2f0f29(0x1d2)][_0x2f0f29(0x1f2)](_0x2f0f29(0x1f1)+_0x197c37+_0x2f0f29(0x215),{'body':_0x4fb131}))['body'][_0x2f0f29(0x219)];return{..._0x31a310,'id':_0x3d7fd0['replyId'],'dT':_0x547211(+_0x3d7fd0[_0x2f0f29(0x1b8)])[_0x2f0f29(0x1b4)](_0x2f0f29(0x1f4)),'personId':_0x3d7fd0[_0x2f0f29(0x1c7)]};}else{const _0x2767e7={'memberId':_0x51bdd8,'unitId':_0x197c37,'content':_0x1b7874,'mention':_0x3b26ed},_0x585b74=await this[_0x2f0f29(0x1d2)][_0x2f0f29(0x1f2)]('/universer-api/comment/unit/'+_0x197c37+_0x2f0f29(0x20d),{'body':_0x2767e7});return X(_0x585b74[_0x2f0f29(0x1f8)][_0x2f0f29(0x1d4)],_0x31a310);}}async[_0x142e5a(0x1ce)](_0x556e84){const _0x5c9682=_0x142e5a;var _0x2d24dd,_0x1f5a92;const {text:_0x52e779,unitId:_0x120c76}=_0x556e84,_0xeb2926=(_0x1f5a92=(_0x2d24dd=_0x52e779[_0x5c9682(0x217)])==null?void 0x0:_0x2d24dd[_0x5c9682(0x1f6)](_0x39ad03=>_0x39ad03[_0x5c9682(0x213)]===_0x3a1ffb['COMMENT'])['map'](_0x36f164=>_0x36f164['rangeId']))!=null?_0x1f5a92:[],_0x4a59e6=JSON[_0x5c9682(0x20f)](_0x52e779),_0x4b9534=_0x556e84[_0x5c9682(0x1db)],_0x34eb0b=_0x556e84['id'],_0x1e4a48={'memberId':(await this[_0x5c9682(0x1ef)][_0x5c9682(0x21c)](_0x120c76))[_0x5c9682(0x1c6)](),'unitId':_0x120c76,'threadId':_0x4b9534,'mention':_0xeb2926,'content':_0x4a59e6,'replyId':_0x34eb0b},_0x2dcb15=await this['_httpService'][_0x5c9682(0x1f2)](_0x5c9682(0x1f1)+_0x120c76+_0x5c9682(0x1bf),{'body':_0x1e4a48});return!_0x2dcb15['body'][_0x5c9682(0x1ba)]||_0x2dcb15[_0x5c9682(0x1f8)][_0x5c9682(0x1ba)][_0x5c9682(0x218)]===0x1;}async[_0x142e5a(0x211)](_0x1eac9e){const _0x41334d=_0x142e5a,{unitId:_0x7efe33}=_0x1eac9e,_0x4fd10e=_0x1eac9e[_0x41334d(0x1db)],_0x256002={'memberId':this[_0x41334d(0x1cc)][_0x41334d(0x1d0)]()[_0x41334d(0x1ff)],'unitId':_0x7efe33,'threadId':_0x4fd10e,'solved':_0x1eac9e['resolved']?I[_0x41334d(0x205)]:I[_0x41334d(0x20b)]},_0x5163d8=await this[_0x41334d(0x1d2)]['post']('/universer-api/comment/unit/'+_0x7efe33+_0x41334d(0x200),{'body':_0x256002});return!_0x5163d8[_0x41334d(0x1f8)][_0x41334d(0x1ba)]||_0x5163d8[_0x41334d(0x1f8)][_0x41334d(0x1ba)][_0x41334d(0x218)]===0x1;}async[_0x142e5a(0x1e2)](_0x4c1dfe,_0x4873c2,_0x29d9a5,_0x40f5b7){const _0x67988=_0x142e5a,_0x1db1b3={'memberId':(await this['_sessionService'][_0x67988(0x21c)](_0x4c1dfe))[_0x67988(0x1c6)](),'threadId':_0x29d9a5,'replyId':_0x40f5b7,'unitId':_0x4c1dfe},_0x4aae5d=await this[_0x67988(0x1d2)]['post'](_0x67988(0x1f1)+_0x4c1dfe+_0x67988(0x20a),{'body':_0x1db1b3});return!_0x4aae5d['body'][_0x67988(0x1ba)]||_0x4aae5d[_0x67988(0x1f8)]['error'][_0x67988(0x218)]===0x1;}async[_0x142e5a(0x1cd)](_0xd6a374,_0x470b89,_0x3660fd){const _0xd99151=_0x142e5a,_0x9ebdba={'unitId':_0xd6a374,'threadId':_0x3660fd},_0xb4375c=await this[_0xd99151(0x1d2)][_0xd99151(0x1f2)]('/universer-api/comment/unit/'+_0xd6a374+'/list',{'body':_0x9ebdba}),_0x11447c=_0x3660fd[_0xd99151(0x21e)](_0x5ad7f1=>ee(_0xb4375c['body'][_0xd99151(0x1d3)][_0x5ad7f1],_0xd6a374,_0x470b89))[_0xd99151(0x1f6)](Boolean);return Object[_0xd99151(0x20c)](_0xb4375c[_0xd99151(0x1f8)][_0xd99151(0x1dd)])[_0xd99151(0x1f3)](_0x14a34d=>{const _0x1105db=_0xd99151;this[_0x1105db(0x1cc)][_0x1105db(0x1c5)](_0x14a34d);}),_0x11447c;}[_0x142e5a(0x1c3)](_0x465a1d){const _0x1d5549=_0x142e5a;return{'id':_0x465a1d['id'],'threadId':_0x465a1d[_0x1d5549(0x1db)],'ref':_0x465a1d['ref']};}};f=Q([_(0x0,_0x1e832b(_0x177d81)),_(0x1,_0x1e832b(_0x4e69f0)),_(0x2,_0x1e832b(_0x3eadcd)),_(0x3,_0x1e832b(_0x980829))],f);var re=Object[_0x142e5a(0x1b5)],te=(_0x2f4364,_0x31d2f,_0x5c24e2,_0x2b68a3)=>{const _0x37ad1b=_0x142e5a;for(var _0x5d213a=_0x2b68a3>0x1?void 0x0:_0x2b68a3?re(_0x31d2f,_0x5c24e2):_0x31d2f,_0x2b8231=_0x2f4364[_0x37ad1b(0x1ca)]-0x1,_0x32b2f3;_0x2b8231>=0x0;_0x2b8231--)(_0x32b2f3=_0x2f4364[_0x2b8231])&&(_0x5d213a=_0x32b2f3(_0x5d213a)||_0x5d213a);return _0x5d213a;},N=(_0x2a3bf2,_0xf5bdde)=>(_0x53238f,_0x47e99e)=>_0xf5bdde(_0x53238f,_0x47e99e,_0x2a3bf2);let g=class extends _0x151986{constructor(_0x2f8896,_0x39b937){const _0x3b420c=_0x142e5a;super(),this[_0x3b420c(0x209)]=_0x2f8896,this[_0x3b420c(0x1b9)]=_0x39b937,this[_0x3b420c(0x203)]();}['_initDataSource'](){const _0x1a8097=_0x142e5a;this[_0x1a8097(0x209)][_0x1a8097(0x201)]=this['_threadCommentDataSource'],this[_0x1a8097(0x209)][_0x1a8097(0x1fc)]=!0x1;}};g=te([N(0x0,_0x40a1e3),N(0x1,_0x1e832b(f))],g);var se=Object[_0x142e5a(0x1f9)],oe=Object[_0x142e5a(0x1b5)],ne=(_0x4c139a,_0x2c9dee,_0xb2413b)=>_0x2c9dee in _0x4c139a?se(_0x4c139a,_0x2c9dee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb2413b}):_0x4c139a[_0x2c9dee]=_0xb2413b,ie=(_0x5491a0,_0x542e4d,_0x2fdd3a,_0x33240e)=>{const _0x1b44fb=_0x142e5a;for(var _0x3ea2ff=_0x33240e>0x1?void 0x0:_0x33240e?oe(_0x542e4d,_0x2fdd3a):_0x542e4d,_0x59d53e=_0x5491a0[_0x1b44fb(0x1ca)]-0x1,_0x57cdf4;_0x59d53e>=0x0;_0x59d53e--)(_0x57cdf4=_0x5491a0[_0x59d53e])&&(_0x3ea2ff=_0x57cdf4(_0x3ea2ff)||_0x3ea2ff);return _0x3ea2ff;},w=(_0x2937cb,_0x91a7ba)=>(_0x3cff63,_0x2eb371)=>_0x91a7ba(_0x3cff63,_0x2eb371,_0x2937cb),$=(_0x319e84,_0x53def7,_0x52e190)=>ne(_0x319e84,typeof _0x53def7!=_0x142e5a(0x1d8)?_0x53def7+'':_0x53def7,_0x52e190);let b=class extends _0x147f91{constructor(_0x19686e=M,_0x5ad295,_0x38c581){const _0x2866c9=_0x142e5a;super(),this[_0x2866c9(0x1ea)]=_0x19686e,this['_injector']=_0x5ad295,this['_configService']=_0x38c581;const {..._0x4aa37f}=_0x35d0e6({},M,this['_config']);this[_0x2866c9(0x1f5)][_0x2866c9(0x1cf)](z,_0x4aa37f);}[_0x142e5a(0x1c2)](){const _0x171f83=_0x142e5a;[[f],[g],[S]][_0x171f83(0x1f3)](_0xc3ec34=>{const _0x14d564=_0x171f83;this['_injector'][_0x14d564(0x1df)](_0xc3ec34);});}[_0x142e5a(0x204)](){const _0x41862e=_0x142e5a;this[_0x41862e(0x1f0)][_0x41862e(0x1e3)](g),this[_0x41862e(0x1f0)]['get'](S);}};$(b,_0x142e5a(0x1e6),W),$(b,_0x142e5a(0x1d6),_0x2cb630['UNIVER_UNKNOWN']),b=ie([_0xdc1d9e(_0x6ce37e,_0x2e3deb,_0x30e77a),w(0x1,_0x1e832b(_0x980829)),w(0x2,_0x265aa0)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xd3216e=_0x586b;(function(_0x22c8e5,_0x3f9307){const _0x54fb4e=_0x586b,_0x218f47=_0x22c8e5();while(!![]){try{const _0x20c050=parseInt(_0x54fb4e(0x13a))/0x1*(parseInt(_0x54fb4e(0x113))/0x2)+parseInt(_0x54fb4e(0xed))/0x3+parseInt(_0x54fb4e(0x120))/0x4+-parseInt(_0x54fb4e(0x11f))/0x5+parseInt(_0x54fb4e(0x134))/0x6*(-parseInt(_0x54fb4e(0xef))/0x7)+-parseInt(_0x54fb4e(0x145))/0x8+-parseInt(_0x54fb4e(0x114))/0x9*(parseInt(_0x54fb4e(0x10e))/0xa);if(_0x20c050===_0x3f9307)break;else _0x218f47['push'](_0x218f47['shift']());}catch(_0x408bfd){_0x218f47['push'](_0x218f47['shift']());}}}(_0x9c85,0x80583));import{CommentService as _0x67df09,CollaborationSessionService as _0x41d110,UniverCollaborationClientPlugin as _0x4ed5e1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1c7e69}from'@univerjs-pro/license';import{dayjs as _0x20ef59,UserManagerService as _0x40b3f1,Inject as _0x44f5e1,Injector as _0x58e5e7,Disposable as _0x1b4e61,CustomRangeType as _0x4ab199,UniverInstanceType as _0x37bca2,DependentOn as _0x83fc12,IConfigService as _0x20992b,Plugin as _0x323721,merge as _0x67d16f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x49bd5f}from'@univerjs/thread-comment-ui';function _0x586b(_0x5325d1,_0x4b4180){const _0x9c85e1=_0x9c85();return _0x586b=function(_0x586b50,_0x3604e5){_0x586b50=_0x586b50-0xe8;let _0x5c460a=_0x9c85e1[_0x586b50];return _0x5c460a;},_0x586b(_0x5325d1,_0x4b4180);}import{ThreadCommentModel as _0x700cee,IThreadCommentDataSourceService as _0x12b23a}from'@univerjs/thread-comment';import{bufferTime as _0x1a9a9a}from'rxjs';function _0x9c85(){const _0x407200=['users','userID','user','_initDataSource','getCurrentUser','getMemberID','_init','Solve','_sessionService','deleteComment','419658wxUmig','OpenOrReOpen','disposeWithMe','type','userId','requireSession','113gkkshO','Unknown','comments','payload','personId','updateComment','customRanges','rangeType','createTimestamp','body','content','4240896tLZfyP','replyId','Reply','UNRECOGNIZED','reply','getUnit','/universer-api/user/list','_configService','code','solved','getOwnPropertyDescriptor','symbol','YYYY/MM/DD\x20HH:mm','/edit','767598yGlVsz','comment','7ZLHvhe','_commentService','/solved','_threadCommentDataSource','_httpService','/universer-api/comment/unit/','COMMENT','subscribe','/list','size','_threadCommentDataSourceService','post','syncUpdateMutationToColla','filter','delete','get','unitId','forEach','add','addUser','threadId','error','find','_threadCommentModel','Delete','thread-comment-data-source.config','/delete','/add','pipe','_userService','addComment','450BzGMxr','map','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initUserSync','parentId','15534atJLgL','35676HgIESP','rangeId','_injector','length','slice','onReady','Add','format','pluginName','getComment','commentUpdate$','2137165ENxGuP','2392120ciQfvE','getUser','root','replies','stringify','_config','Edit','parse','resolveComment','Solved'];_0x9c85=function(){return _0x407200;};return _0x9c85();}import{HTTPService as _0x38707a}from'@univerjs/network';const W=_0xd3216e(0x110);var I=(_0x34644b=>(_0x34644b[_0x34644b['OpenOrReOpen']=0x0]=_0xd3216e(0x135),_0x34644b[_0x34644b[_0xd3216e(0x129)]=0x1]='Solved',_0x34644b[_0x34644b[_0xd3216e(0x148)]=-0x1]=_0xd3216e(0x148),_0x34644b))(I||{}),v=(_0x5a6ae8=>(_0x5a6ae8[_0x5a6ae8['Unknown']=0x0]=_0xd3216e(0x13b),_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x11a)]=0x1]=_0xd3216e(0x11a),_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x147)]=0x2]='Reply',_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x126)]=0x3]=_0xd3216e(0x126),_0x5a6ae8[_0x5a6ae8['Delete']=0x4]='Delete',_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x131)]=0x5]=_0xd3216e(0x131),_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x148)]=-0x1]=_0xd3216e(0x148),_0x5a6ae8))(v||{});const D=_0x36e24f=>_0x20ef59(new Date(+_0x36e24f))[_0xd3216e(0x11b)](_0xd3216e(0xeb)),B=async(_0x1344df,_0x4b7d37)=>{const _0x396a93=_0xd3216e,_0x3dafdb=_0x1344df['get'](_0x40b3f1),_0x55b8bc=_0x1344df[_0x396a93(0xfe)](_0x38707a);_0x4b7d37['forEach'](_0x4103c3=>{const _0x732a2c=_0x396a93;_0x3dafdb[_0x732a2c(0x121)](_0x4103c3)&&_0x4b7d37[_0x732a2c(0xfd)](_0x4103c3);}),_0x4b7d37[_0x396a93(0xf8)]&&(await _0x55b8bc[_0x396a93(0xfe)](_0x396a93(0x14b),{'params':{'userIDs':[..._0x4b7d37]}}))[_0x396a93(0x143)][_0x396a93(0x12a)][_0x396a93(0x100)](_0x477a09=>{const _0x2fb1ea=_0x396a93;_0x477a09&&_0x3dafdb[_0x2fb1ea(0x102)](_0x477a09);});};var K=Object[_0xd3216e(0xe9)],V=(_0x31706f,_0x5658bc,_0xd74f1b,_0x5ec9b7)=>{const _0x515d23=_0xd3216e;for(var _0x149e06=_0x5ec9b7>0x1?void 0x0:_0x5ec9b7?K(_0x5658bc,_0xd74f1b):_0x5658bc,_0x1b285c=_0x31706f[_0x515d23(0x117)]-0x1,_0x42af4e;_0x1b285c>=0x0;_0x1b285c--)(_0x42af4e=_0x31706f[_0x1b285c])&&(_0x149e06=_0x42af4e(_0x149e06)||_0x149e06);return _0x149e06;},p=(_0x594d18,_0x1f8570)=>(_0x39abcc,_0x55474d)=>_0x1f8570(_0x39abcc,_0x55474d,_0x594d18);let S=class extends _0x1b4e61{constructor(_0x511efc,_0x31069c,_0x1403a0,_0x556254){const _0x366c7f=_0xd3216e;super(),this['_commentService']=_0x511efc,this[_0x366c7f(0x106)]=_0x31069c,this[_0x366c7f(0x10c)]=_0x1403a0,this[_0x366c7f(0x116)]=_0x556254,this['_init'](),this[_0x366c7f(0x111)]();}[_0xd3216e(0x111)](){const _0x7a7bb0=_0xd3216e;this[_0x7a7bb0(0x136)](this[_0x7a7bb0(0x106)][_0x7a7bb0(0x11e)][_0x7a7bb0(0x10b)](_0x1a9a9a(0x10))['subscribe'](_0x374198=>{const _0x20c4f7=_0x7a7bb0,_0x54ab82=new Set();_0x374198['forEach'](_0xe0228c=>{const _0x50419c=_0x586b;switch(_0xe0228c[_0x50419c(0x137)]){case _0x50419c(0x101):{const _0x402882=_0xe0228c[_0x50419c(0x13d)][_0x50419c(0x13e)];_0x54ab82[_0x50419c(0x101)](_0x402882);break;}}}),B(this[_0x20c4f7(0x116)],_0x54ab82);}));}[_0xd3216e(0x130)](){const _0x38ebf5=_0xd3216e;this[_0x38ebf5(0x136)](this[_0x38ebf5(0xf0)][_0x38ebf5(0x11e)][_0x38ebf5(0xf6)](async _0x31c229=>{const _0x4ef882=_0x38ebf5;var _0x312950,_0x1f28a8,_0x323e9b,_0x2a94f0;const _0x59625d=(_0x312950=this[_0x4ef882(0x106)][_0x4ef882(0x14a)](_0x31c229[_0x4ef882(0xff)])[_0x4ef882(0x105)](_0x45a0db=>_0x45a0db[_0x4ef882(0x103)]===_0x31c229[_0x4ef882(0x103)]))==null?void 0x0:_0x312950['root'];if(!_0x59625d)return;const {unitId:_0x386981,subUnitId:_0x5e6a56}=_0x59625d;switch(_0x31c229[_0x4ef882(0x12c)]&&this[_0x4ef882(0x10c)]['addUser'](_0x31c229[_0x4ef882(0x12c)]),_0x31c229['type']){case v[_0x4ef882(0x11a)]:break;case v[_0x4ef882(0x147)]:{this['_threadCommentModel']['addComment'](_0x386981,_0x5e6a56,{'unitId':_0x386981,'subUnitId':_0x5e6a56,'ref':'','id':_0x31c229[_0x4ef882(0x146)],'dT':D(+_0x31c229[_0x4ef882(0x142)]),'threadId':_0x31c229['threadId'],'personId':(_0x323e9b=(_0x1f28a8=_0x31c229[_0x4ef882(0x12c)])==null?void 0x0:_0x1f28a8[_0x4ef882(0x12b)])!=null?_0x323e9b:_0x31c229[_0x4ef882(0x138)],'text':JSON[_0x4ef882(0x127)](_0x31c229['content']),'parentId':_0x59625d['id']});break;}case v[_0x4ef882(0x107)]:{const _0x5a5085=this[_0x4ef882(0x106)][_0x4ef882(0x11d)](_0x386981,_0x5e6a56,_0x31c229['replyId']);_0x5a5085&&_0x5a5085[_0x4ef882(0x112)]&&this[_0x4ef882(0x106)][_0x4ef882(0x133)](_0x386981,_0x5e6a56,_0x31c229['replyId']);break;}case v[_0x4ef882(0x126)]:{this[_0x4ef882(0x106)][_0x4ef882(0x13f)](_0x386981,_0x5e6a56,{'commentId':_0x31c229['replyId'],'text':JSON[_0x4ef882(0x127)](_0x31c229[_0x4ef882(0x144)])});break;}case v[_0x4ef882(0x131)]:{const _0x5bc1b6=(_0x2a94f0=this['_threadCommentModel'][_0x4ef882(0x14a)](_0x31c229[_0x4ef882(0xff)])[_0x4ef882(0x105)](_0x447cf0=>_0x447cf0[_0x4ef882(0x103)]===_0x31c229[_0x4ef882(0x103)]))==null?void 0x0:_0x2a94f0[_0x4ef882(0x122)];_0x5bc1b6&&this['_threadCommentModel']['resolveComment'](_0x386981,_0x5e6a56,_0x5bc1b6['id'],_0x31c229[_0x4ef882(0xe8)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x44f5e1(_0x67df09)),p(0x1,_0x44f5e1(_0x700cee)),p(0x2,_0x44f5e1(_0x40b3f1)),p(0x3,_0x44f5e1(_0x58e5e7))],S);const z=_0xd3216e(0x108),M={};var k=Object[_0xd3216e(0xe9)],Q=(_0x536f2d,_0x1c1e1a,_0x5afd63,_0x13be80)=>{const _0x234cd8=_0xd3216e;for(var _0x230fc4=_0x13be80>0x1?void 0x0:_0x13be80?k(_0x1c1e1a,_0x5afd63):_0x1c1e1a,_0x4b10a9=_0x536f2d[_0x234cd8(0x117)]-0x1,_0x1bf5ad;_0x4b10a9>=0x0;_0x4b10a9--)(_0x1bf5ad=_0x536f2d[_0x4b10a9])&&(_0x230fc4=_0x1bf5ad(_0x230fc4)||_0x230fc4);return _0x230fc4;},_=(_0x5aa1cf,_0x24fe43)=>(_0x3e576f,_0x55cd1a)=>_0x24fe43(_0x3e576f,_0x55cd1a,_0x5aa1cf);function X(_0xbfc9ec,_0x4cfcd9){const _0x2f203c=_0xd3216e,_0x11c5d5=_0xbfc9ec[_0x2f203c(0x123)][0x0];return{..._0x4cfcd9,'id':_0x11c5d5[_0x2f203c(0x146)],'resolved':_0xbfc9ec['solved']===0x1,'dT':D(_0x11c5d5[_0x2f203c(0x142)]),'personId':_0x11c5d5['userId'],'threadId':_0x11c5d5[_0x2f203c(0x103)]};}function ee(_0x53c2f9,_0x19bf08,_0x51d1b7){const _0xe522ac=_0xd3216e;var _0x57f858,_0x528677;if(((_0x528677=(_0x57f858=_0x53c2f9==null?void 0x0:_0x53c2f9[_0xe522ac(0x123)])==null?void 0x0:_0x57f858[_0xe522ac(0x117)])!=null?_0x528677:0x0)>0x0){const _0x3e0b84=(_0x35c3bf,_0x2a9813)=>({'id':_0x35c3bf['replyId'],'threadId':_0x35c3bf[_0xe522ac(0x103)],'dT':D(_0x35c3bf[_0xe522ac(0x142)]),'personId':_0x35c3bf[_0xe522ac(0x138)],'resolved':_0x53c2f9[_0xe522ac(0xe8)]===I[_0xe522ac(0x129)],'unitId':_0x19bf08,'subUnitId':_0x51d1b7,'text':JSON[_0xe522ac(0x127)](_0x35c3bf[_0xe522ac(0x144)]),'parentId':_0x2a9813}),_0x4cd1c4=_0x3e0b84(_0x53c2f9[_0xe522ac(0x123)][0x0]);return{..._0x4cd1c4,'children':_0x53c2f9[_0xe522ac(0x123)][_0xe522ac(0x118)](0x1)['map'](_0x367808=>_0x3e0b84(_0x367808,_0x4cd1c4['id']))};}return null;}let f=class{constructor(_0x2a3828,_0xb64f44,_0x4d2b89,_0x4433ee){const _0x4bbd33=_0xd3216e;this[_0x4bbd33(0xf3)]=_0x2a3828,this[_0x4bbd33(0x10c)]=_0xb64f44,this[_0x4bbd33(0x132)]=_0x4d2b89,this[_0x4bbd33(0x116)]=_0x4433ee;}async[_0xd3216e(0x10d)](_0x2c74c){const _0x2c6fd6=_0xd3216e;var _0x553c3b,_0x48284c;const {parentId:_0x448fde,unitId:_0x273f47,text:_0x59e12e,threadId:_0x412fe4}=_0x2c74c,_0x156609=(_0x48284c=(_0x553c3b=_0x59e12e[_0x2c6fd6(0x140)])==null?void 0x0:_0x553c3b[_0x2c6fd6(0xfc)](_0x4e4263=>_0x4e4263[_0x2c6fd6(0x141)]===_0x4ab199[_0x2c6fd6(0xf5)])[_0x2c6fd6(0x10f)](_0x5d7f2f=>_0x5d7f2f[_0x2c6fd6(0x115)]))!=null?_0x48284c:[],_0x3289cf=JSON[_0x2c6fd6(0x124)](_0x59e12e),_0x3ddbd0=(await this[_0x2c6fd6(0x132)][_0x2c6fd6(0x139)](_0x273f47))[_0x2c6fd6(0x12f)]();if(_0x448fde){const _0x53e926={'memberId':_0x3ddbd0,'unitId':_0x273f47,'content':_0x3289cf,'mention':_0x156609,'threadId':_0x412fe4},_0x176bc7=(await this[_0x2c6fd6(0xf3)][_0x2c6fd6(0xfa)](_0x2c6fd6(0xf4)+_0x273f47+'/reply',{'body':_0x53e926}))[_0x2c6fd6(0x143)][_0x2c6fd6(0x149)];return{..._0x2c74c,'id':_0x176bc7[_0x2c6fd6(0x146)],'dT':_0x20ef59(+_0x176bc7[_0x2c6fd6(0x142)])[_0x2c6fd6(0x11b)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x176bc7['userId']};}else{const _0x3402a7={'memberId':_0x3ddbd0,'unitId':_0x273f47,'content':_0x3289cf,'mention':_0x156609},_0xabd233=await this[_0x2c6fd6(0xf3)]['post']('/universer-api/comment/unit/'+_0x273f47+_0x2c6fd6(0x10a),{'body':_0x3402a7});return X(_0xabd233['body'][_0x2c6fd6(0xee)],_0x2c74c);}}async[_0xd3216e(0x13f)](_0x2807e8){const _0xd92e92=_0xd3216e;var _0x39a968,_0x16f1e7;const {text:_0x4fd718,unitId:_0x2c3675}=_0x2807e8,_0x1dbf83=(_0x16f1e7=(_0x39a968=_0x4fd718[_0xd92e92(0x140)])==null?void 0x0:_0x39a968[_0xd92e92(0xfc)](_0x357215=>_0x357215[_0xd92e92(0x141)]===_0x4ab199[_0xd92e92(0xf5)])[_0xd92e92(0x10f)](_0x45b2da=>_0x45b2da[_0xd92e92(0x115)]))!=null?_0x16f1e7:[],_0x1f9ff2=JSON['stringify'](_0x4fd718),_0x5d4d3a=_0x2807e8[_0xd92e92(0x103)],_0x26831d=_0x2807e8['id'],_0x3a5058={'memberId':(await this[_0xd92e92(0x132)][_0xd92e92(0x139)](_0x2c3675))[_0xd92e92(0x12f)](),'unitId':_0x2c3675,'threadId':_0x5d4d3a,'mention':_0x1dbf83,'content':_0x1f9ff2,'replyId':_0x26831d},_0x34ee16=await this[_0xd92e92(0xf3)][_0xd92e92(0xfa)]('/universer-api/comment/unit/'+_0x2c3675+_0xd92e92(0xec),{'body':_0x3a5058});return!_0x34ee16[_0xd92e92(0x143)][_0xd92e92(0x104)]||_0x34ee16[_0xd92e92(0x143)]['error'][_0xd92e92(0x14d)]===0x1;}async[_0xd3216e(0x128)](_0x591bbd){const _0x30aac6=_0xd3216e,{unitId:_0x56dd20}=_0x591bbd,_0x14de69=_0x591bbd['threadId'],_0x4c94cc={'memberId':this[_0x30aac6(0x10c)][_0x30aac6(0x12e)]()[_0x30aac6(0x12b)],'unitId':_0x56dd20,'threadId':_0x14de69,'solved':_0x591bbd['resolved']?I['Solved']:I['OpenOrReOpen']},_0x19ebb3=await this[_0x30aac6(0xf3)][_0x30aac6(0xfa)](_0x30aac6(0xf4)+_0x56dd20+_0x30aac6(0xf1),{'body':_0x4c94cc});return!_0x19ebb3['body'][_0x30aac6(0x104)]||_0x19ebb3[_0x30aac6(0x143)][_0x30aac6(0x104)][_0x30aac6(0x14d)]===0x1;}async[_0xd3216e(0x133)](_0x5f2d93,_0x9dedba,_0xe6c608,_0xbc7115){const _0x25c46b=_0xd3216e,_0x5308db={'memberId':(await this[_0x25c46b(0x132)][_0x25c46b(0x139)](_0x5f2d93))['getMemberID'](),'threadId':_0xe6c608,'replyId':_0xbc7115,'unitId':_0x5f2d93},_0x1c6d15=await this[_0x25c46b(0xf3)][_0x25c46b(0xfa)](_0x25c46b(0xf4)+_0x5f2d93+_0x25c46b(0x109),{'body':_0x5308db});return!_0x1c6d15[_0x25c46b(0x143)][_0x25c46b(0x104)]||_0x1c6d15[_0x25c46b(0x143)][_0x25c46b(0x104)]['code']===0x1;}async['listComments'](_0x4a9fad,_0x52232a,_0x1c0b25){const _0x2420a2=_0xd3216e,_0x6b7e28={'unitId':_0x4a9fad,'threadId':_0x1c0b25},_0x10be8e=await this[_0x2420a2(0xf3)][_0x2420a2(0xfa)]('/universer-api/comment/unit/'+_0x4a9fad+_0x2420a2(0xf7),{'body':_0x6b7e28}),_0x51c729=_0x1c0b25[_0x2420a2(0x10f)](_0x4d35f0=>ee(_0x10be8e[_0x2420a2(0x143)][_0x2420a2(0x13c)][_0x4d35f0],_0x4a9fad,_0x52232a))[_0x2420a2(0xfc)](Boolean);return Object['values'](_0x10be8e['body']['users'])['forEach'](_0x164820=>{const _0x2b5f4b=_0x2420a2;this[_0x2b5f4b(0x10c)][_0x2b5f4b(0x102)](_0x164820);}),_0x51c729;}['saveCommentToSnapshot'](_0x91b87a){const _0x17161f=_0xd3216e;return{'id':_0x91b87a['id'],'threadId':_0x91b87a[_0x17161f(0x103)],'ref':_0x91b87a['ref']};}};f=Q([_(0x0,_0x44f5e1(_0x38707a)),_(0x1,_0x44f5e1(_0x40b3f1)),_(0x2,_0x44f5e1(_0x41d110)),_(0x3,_0x44f5e1(_0x58e5e7))],f);var re=Object[_0xd3216e(0xe9)],te=(_0x3cf2bf,_0x2e6f79,_0xa9403d,_0xc2372d)=>{for(var _0x2be11d=_0xc2372d>0x1?void 0x0:_0xc2372d?re(_0x2e6f79,_0xa9403d):_0x2e6f79,_0x551c44=_0x3cf2bf['length']-0x1,_0x1aaa47;_0x551c44>=0x0;_0x551c44--)(_0x1aaa47=_0x3cf2bf[_0x551c44])&&(_0x2be11d=_0x1aaa47(_0x2be11d)||_0x2be11d);return _0x2be11d;},N=(_0x5789f1,_0x4b641a)=>(_0x47a6d7,_0x33ce02)=>_0x4b641a(_0x47a6d7,_0x33ce02,_0x5789f1);let g=class extends _0x1b4e61{constructor(_0x2d97e5,_0x38d672){const _0x57cc43=_0xd3216e;super(),this[_0x57cc43(0xf9)]=_0x2d97e5,this[_0x57cc43(0xf2)]=_0x38d672,this[_0x57cc43(0x12d)]();}[_0xd3216e(0x12d)](){const _0x93161a=_0xd3216e;this[_0x93161a(0xf9)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x93161a(0xfb)]=!0x1;}};g=te([N(0x0,_0x12b23a),N(0x1,_0x44f5e1(f))],g);var se=Object['defineProperty'],oe=Object[_0xd3216e(0xe9)],ne=(_0x4491b0,_0x59cfb4,_0x46b6a3)=>_0x59cfb4 in _0x4491b0?se(_0x4491b0,_0x59cfb4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46b6a3}):_0x4491b0[_0x59cfb4]=_0x46b6a3,ie=(_0x4f198b,_0x30244d,_0x162e04,_0x433009)=>{const _0x1c8ac5=_0xd3216e;for(var _0x1ddd54=_0x433009>0x1?void 0x0:_0x433009?oe(_0x30244d,_0x162e04):_0x30244d,_0x2c7c59=_0x4f198b[_0x1c8ac5(0x117)]-0x1,_0x33dba1;_0x2c7c59>=0x0;_0x2c7c59--)(_0x33dba1=_0x4f198b[_0x2c7c59])&&(_0x1ddd54=_0x33dba1(_0x1ddd54)||_0x1ddd54);return _0x1ddd54;},w=(_0x4c6027,_0x2b4b58)=>(_0x3bb3cf,_0x336562)=>_0x2b4b58(_0x3bb3cf,_0x336562,_0x4c6027),$=(_0x66c4b9,_0x29b27e,_0x1df97a)=>ne(_0x66c4b9,typeof _0x29b27e!=_0xd3216e(0xea)?_0x29b27e+'':_0x29b27e,_0x1df97a);let b=class extends _0x323721{constructor(_0x1c0732=M,_0x421891,_0x4f209a){const _0x5e4b68=_0xd3216e;super(),this[_0x5e4b68(0x125)]=_0x1c0732,this[_0x5e4b68(0x116)]=_0x421891,this[_0x5e4b68(0x14c)]=_0x4f209a;const {..._0x38ecbe}=_0x67d16f({},M,this[_0x5e4b68(0x125)]);this[_0x5e4b68(0x14c)]['setConfig'](z,_0x38ecbe);}['onStarting'](){const _0x6a015=_0xd3216e;[[f],[g],[S]][_0x6a015(0x100)](_0x336f50=>{const _0x3ab620=_0x6a015;this['_injector'][_0x3ab620(0x101)](_0x336f50);});}[_0xd3216e(0x119)](){const _0x50184a=_0xd3216e;this[_0x50184a(0x116)]['get'](g),this[_0x50184a(0x116)][_0x50184a(0xfe)](S);}};$(b,_0xd3216e(0x11c),W),$(b,_0xd3216e(0x137),_0x37bca2['UNIVER_UNKNOWN']),b=ie([_0x83fc12(_0x49bd5f,_0x4ed5e1,_0x1c7e69),w(0x1,_0x44f5e1(_0x58e5e7)),w(0x2,_0x20992b)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x142e5a=_0x1064;(function(_0x5d0c7c,_0x4b2018){const _0x44a9e5=_0x1064,_0x8a2d5c=_0x5d0c7c();while(!![]){try{const _0x2ed859=parseInt(_0x44a9e5(0x210))/0x1+parseInt(_0x44a9e5(0x1fa))/0x2*(-parseInt(_0x44a9e5(0x1e7))/0x3)+parseInt(_0x44a9e5(0x1de))/0x4+parseInt(_0x44a9e5(0x1fe))/0x5+-parseInt(_0x44a9e5(0x1d7))/0x6*(-parseInt(_0x44a9e5(0x1bb))/0x7)+parseInt(_0x44a9e5(0x1d5))/0x8*(-parseInt(_0x44a9e5(0x1be))/0x9)+-parseInt(_0x44a9e5(0x21a))/0xa*(parseInt(_0x44a9e5(0x21d))/0xb);if(_0x2ed859===_0x4b2018)break;else _0x8a2d5c['push'](_0x8a2d5c['shift']());}catch(_0x5d8fe3){_0x8a2d5c['push'](_0x8a2d5c['shift']());}}}(_0x2a69,0x1d7af));import{CommentService as _0x34cb78,CollaborationSessionService as _0x3eadcd,UniverCollaborationClientPlugin as _0x2e3deb}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x30e77a}from'@univerjs-pro/license';import{dayjs as _0x547211,UserManagerService as _0x4e69f0,Inject as _0x1e832b,Injector as _0x980829,Disposable as _0x151986,CustomRangeType as _0x3a1ffb,UniverInstanceType as _0x2cb630,DependentOn as _0xdc1d9e,IConfigService as _0x265aa0,Plugin as _0x147f91,merge as _0x35d0e6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x6ce37e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xef7d91,IThreadCommentDataSourceService as _0x40a1e3}from'@univerjs/thread-comment';function _0x1064(_0x5cc6da,_0x4dba66){const _0x2a6902=_0x2a69();return _0x1064=function(_0x1064e6,_0x25d54f){_0x1064e6=_0x1064e6-0x1b4;let _0x56022d=_0x2a6902[_0x1064e6];return _0x56022d;},_0x1064(_0x5cc6da,_0x4dba66);}import{bufferTime as _0x54d44a}from'rxjs';function _0x2a69(){const _0x2b26ce=['_configService','filter','getUser','body','defineProperty','206698eYTXBu','COMMENT','syncUpdateMutationToColla','replies','846065hfcdDB','userID','/solved','dataSource','payload','_initDataSource','onReady','Solved','getComment','Add','pipe','_threadCommentDataSourceService','/delete','OpenOrReOpen','values','/add','root','stringify','1508UGchQA','resolveComment','Unknown','rangeType','personId','/reply','_init','customRanges','code','reply','10EDsLGA','user','requireSession','3202672lfTuCY','map','format','getOwnPropertyDescriptor','parse','_threadCommentModel','createTimestamp','_threadCommentDataSource','error','5103IqPxhJ','disposeWithMe','commentUpdate$','80559fVtShR','/edit','size','find','onStarting','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','addUser','getMemberID','userId','Delete','delete','length','solved','_userService','listComments','updateComment','setConfig','getCurrentUser','Reply','_httpService','comments','comment','32XAXbwD','type','1314iacnbR','symbol','rangeId','thread-comment-data-source.config','threadId','replyId','users','882736HFFIuK','add','content','parentId','deleteComment','get','UNRECOGNIZED','Solve','pluginName','3tJDjTx','subscribe','getUnit','_config','Edit','_commentService','_initUserSync','unitId','_sessionService','_injector','/universer-api/comment/unit/','post','forEach','YYYY/MM/DD\x20HH:mm'];_0x2a69=function(){return _0x2b26ce;};return _0x2a69();}import{HTTPService as _0x177d81}from'@univerjs/network';const W=_0x142e5a(0x1c4);var I=(_0x14755c=>(_0x14755c[_0x14755c['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x14755c[_0x14755c[_0x142e5a(0x205)]=0x1]='Solved',_0x14755c[_0x14755c[_0x142e5a(0x1e4)]=-0x1]=_0x142e5a(0x1e4),_0x14755c))(I||{}),v=(_0x4c2198=>(_0x4c2198[_0x4c2198[_0x142e5a(0x212)]=0x0]=_0x142e5a(0x212),_0x4c2198[_0x4c2198[_0x142e5a(0x207)]=0x1]=_0x142e5a(0x207),_0x4c2198[_0x4c2198[_0x142e5a(0x1d1)]=0x2]=_0x142e5a(0x1d1),_0x4c2198[_0x4c2198['Edit']=0x3]='Edit',_0x4c2198[_0x4c2198[_0x142e5a(0x1c8)]=0x4]='Delete',_0x4c2198[_0x4c2198[_0x142e5a(0x1e5)]=0x5]=_0x142e5a(0x1e5),_0x4c2198[_0x4c2198[_0x142e5a(0x1e4)]=-0x1]=_0x142e5a(0x1e4),_0x4c2198))(v||{});const D=_0xaabda8=>_0x547211(new Date(+_0xaabda8))[_0x142e5a(0x1b4)](_0x142e5a(0x1f4)),B=async(_0x12cd49,_0x516fee)=>{const _0x4ba0b9=_0x142e5a,_0x576a7b=_0x12cd49[_0x4ba0b9(0x1e3)](_0x4e69f0),_0x4fe986=_0x12cd49[_0x4ba0b9(0x1e3)](_0x177d81);_0x516fee['forEach'](_0xbccfdb=>{const _0x1230a8=_0x4ba0b9;_0x576a7b[_0x1230a8(0x1f7)](_0xbccfdb)&&_0x516fee[_0x1230a8(0x1c9)](_0xbccfdb);}),_0x516fee[_0x4ba0b9(0x1c0)]&&(await _0x4fe986[_0x4ba0b9(0x1e3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x516fee]}}))[_0x4ba0b9(0x1f8)][_0x4ba0b9(0x1dd)][_0x4ba0b9(0x1f3)](_0x385ed2=>{const _0x3a2a71=_0x4ba0b9;_0x385ed2&&_0x576a7b[_0x3a2a71(0x1c5)](_0x385ed2);});};var K=Object[_0x142e5a(0x1b5)],V=(_0xd9639d,_0xc51c7b,_0x5d8e70,_0x1d5194)=>{const _0x24e42c=_0x142e5a;for(var _0x1e3c35=_0x1d5194>0x1?void 0x0:_0x1d5194?K(_0xc51c7b,_0x5d8e70):_0xc51c7b,_0x17320d=_0xd9639d[_0x24e42c(0x1ca)]-0x1,_0x2a2331;_0x17320d>=0x0;_0x17320d--)(_0x2a2331=_0xd9639d[_0x17320d])&&(_0x1e3c35=_0x2a2331(_0x1e3c35)||_0x1e3c35);return _0x1e3c35;},p=(_0xc69db8,_0x10227a)=>(_0x3a64f7,_0x161329)=>_0x10227a(_0x3a64f7,_0x161329,_0xc69db8);let S=class extends _0x151986{constructor(_0x34bd5f,_0x3ee7f3,_0x330f47,_0x497047){const _0x1d578b=_0x142e5a;super(),this[_0x1d578b(0x1ec)]=_0x34bd5f,this[_0x1d578b(0x1b7)]=_0x3ee7f3,this['_userService']=_0x330f47,this[_0x1d578b(0x1f0)]=_0x497047,this[_0x1d578b(0x216)](),this[_0x1d578b(0x1ed)]();}['_initUserSync'](){const _0x59876a=_0x142e5a;this['disposeWithMe'](this[_0x59876a(0x1b7)]['commentUpdate$'][_0x59876a(0x208)](_0x54d44a(0x10))['subscribe'](_0xe561a7=>{const _0x47c1f7=_0x59876a,_0x55b9dc=new Set();_0xe561a7['forEach'](_0x40ad84=>{const _0x26bbdd=_0x1064;switch(_0x40ad84[_0x26bbdd(0x1d6)]){case _0x26bbdd(0x1df):{const _0x4a6beb=_0x40ad84[_0x26bbdd(0x202)][_0x26bbdd(0x214)];_0x55b9dc[_0x26bbdd(0x1df)](_0x4a6beb);break;}}}),B(this[_0x47c1f7(0x1f0)],_0x55b9dc);}));}[_0x142e5a(0x216)](){const _0x5b5e14=_0x142e5a;this[_0x5b5e14(0x1bc)](this[_0x5b5e14(0x1ec)][_0x5b5e14(0x1bd)][_0x5b5e14(0x1e8)](async _0x1cde6c=>{const _0x278f9c=_0x5b5e14;var _0x38b1f6,_0x6662f3,_0x2e12dc,_0x42ccd7;const _0x22f858=(_0x38b1f6=this[_0x278f9c(0x1b7)][_0x278f9c(0x1e9)](_0x1cde6c['unitId'])[_0x278f9c(0x1c1)](_0x5bc2f3=>_0x5bc2f3[_0x278f9c(0x1db)]===_0x1cde6c[_0x278f9c(0x1db)]))==null?void 0x0:_0x38b1f6['root'];if(!_0x22f858)return;const {unitId:_0x5dee63,subUnitId:_0x5a717b}=_0x22f858;switch(_0x1cde6c[_0x278f9c(0x21b)]&&this[_0x278f9c(0x1cc)]['addUser'](_0x1cde6c[_0x278f9c(0x21b)]),_0x1cde6c[_0x278f9c(0x1d6)]){case v['Add']:break;case v[_0x278f9c(0x1d1)]:{this[_0x278f9c(0x1b7)]['addComment'](_0x5dee63,_0x5a717b,{'unitId':_0x5dee63,'subUnitId':_0x5a717b,'ref':'','id':_0x1cde6c['replyId'],'dT':D(+_0x1cde6c['createTimestamp']),'threadId':_0x1cde6c[_0x278f9c(0x1db)],'personId':(_0x2e12dc=(_0x6662f3=_0x1cde6c['user'])==null?void 0x0:_0x6662f3[_0x278f9c(0x1ff)])!=null?_0x2e12dc:_0x1cde6c[_0x278f9c(0x1c7)],'text':JSON[_0x278f9c(0x1b6)](_0x1cde6c[_0x278f9c(0x1e0)]),'parentId':_0x22f858['id']});break;}case v['Delete']:{const _0x51d15a=this[_0x278f9c(0x1b7)][_0x278f9c(0x206)](_0x5dee63,_0x5a717b,_0x1cde6c[_0x278f9c(0x1dc)]);_0x51d15a&&_0x51d15a[_0x278f9c(0x1e1)]&&this[_0x278f9c(0x1b7)][_0x278f9c(0x1e2)](_0x5dee63,_0x5a717b,_0x1cde6c[_0x278f9c(0x1dc)]);break;}case v[_0x278f9c(0x1eb)]:{this[_0x278f9c(0x1b7)][_0x278f9c(0x1ce)](_0x5dee63,_0x5a717b,{'commentId':_0x1cde6c[_0x278f9c(0x1dc)],'text':JSON['parse'](_0x1cde6c['content'])});break;}case v['Solve']:{const _0x131da8=(_0x42ccd7=this[_0x278f9c(0x1b7)][_0x278f9c(0x1e9)](_0x1cde6c[_0x278f9c(0x1ee)])[_0x278f9c(0x1c1)](_0x25dcd6=>_0x25dcd6[_0x278f9c(0x1db)]===_0x1cde6c[_0x278f9c(0x1db)]))==null?void 0x0:_0x42ccd7[_0x278f9c(0x20e)];_0x131da8&&this[_0x278f9c(0x1b7)][_0x278f9c(0x211)](_0x5dee63,_0x5a717b,_0x131da8['id'],_0x1cde6c['solved']===I[_0x278f9c(0x205)]);break;}}}));}};S=V([p(0x0,_0x1e832b(_0x34cb78)),p(0x1,_0x1e832b(_0xef7d91)),p(0x2,_0x1e832b(_0x4e69f0)),p(0x3,_0x1e832b(_0x980829))],S);const z=_0x142e5a(0x1da),M={};var k=Object[_0x142e5a(0x1b5)],Q=(_0x17e0db,_0x463011,_0x20149d,_0x326dc1)=>{for(var _0x4423be=_0x326dc1>0x1?void 0x0:_0x326dc1?k(_0x463011,_0x20149d):_0x463011,_0x4fba6a=_0x17e0db['length']-0x1,_0x563e6c;_0x4fba6a>=0x0;_0x4fba6a--)(_0x563e6c=_0x17e0db[_0x4fba6a])&&(_0x4423be=_0x563e6c(_0x4423be)||_0x4423be);return _0x4423be;},_=(_0x28919e,_0x204370)=>(_0x596383,_0x1c9806)=>_0x204370(_0x596383,_0x1c9806,_0x28919e);function X(_0x185554,_0x2eb468){const _0x57d6c8=_0x142e5a,_0x6ac707=_0x185554['replies'][0x0];return{..._0x2eb468,'id':_0x6ac707[_0x57d6c8(0x1dc)],'resolved':_0x185554[_0x57d6c8(0x1cb)]===0x1,'dT':D(_0x6ac707[_0x57d6c8(0x1b8)]),'personId':_0x6ac707[_0x57d6c8(0x1c7)],'threadId':_0x6ac707[_0x57d6c8(0x1db)]};}function ee(_0x534dc0,_0xd16d73,_0x10a196){const _0x219210=_0x142e5a;var _0x1a920e,_0x3eee57;if(((_0x3eee57=(_0x1a920e=_0x534dc0==null?void 0x0:_0x534dc0['replies'])==null?void 0x0:_0x1a920e['length'])!=null?_0x3eee57:0x0)>0x0){const _0x1a7f56=(_0x58e1d9,_0x443b2c)=>({'id':_0x58e1d9[_0x219210(0x1dc)],'threadId':_0x58e1d9[_0x219210(0x1db)],'dT':D(_0x58e1d9[_0x219210(0x1b8)]),'personId':_0x58e1d9[_0x219210(0x1c7)],'resolved':_0x534dc0['solved']===I[_0x219210(0x205)],'unitId':_0xd16d73,'subUnitId':_0x10a196,'text':JSON[_0x219210(0x1b6)](_0x58e1d9['content']),'parentId':_0x443b2c}),_0x19a485=_0x1a7f56(_0x534dc0[_0x219210(0x1fd)][0x0]);return{..._0x19a485,'children':_0x534dc0['replies']['slice'](0x1)[_0x219210(0x21e)](_0x49300c=>_0x1a7f56(_0x49300c,_0x19a485['id']))};}return null;}let f=class{constructor(_0x4c7624,_0x39159a,_0x55907f,_0x476a84){const _0x27a9c2=_0x142e5a;this[_0x27a9c2(0x1d2)]=_0x4c7624,this[_0x27a9c2(0x1cc)]=_0x39159a,this['_sessionService']=_0x55907f,this[_0x27a9c2(0x1f0)]=_0x476a84;}async['addComment'](_0x31a310){const _0x2f0f29=_0x142e5a;var _0x403e0a,_0x12b136;const {parentId:_0x958274,unitId:_0x197c37,text:_0x270f51,threadId:_0x1a9d00}=_0x31a310,_0x3b26ed=(_0x12b136=(_0x403e0a=_0x270f51[_0x2f0f29(0x217)])==null?void 0x0:_0x403e0a[_0x2f0f29(0x1f6)](_0x4973f6=>_0x4973f6[_0x2f0f29(0x213)]===_0x3a1ffb[_0x2f0f29(0x1fb)])[_0x2f0f29(0x21e)](_0x129377=>_0x129377[_0x2f0f29(0x1d9)]))!=null?_0x12b136:[],_0x1b7874=JSON['stringify'](_0x270f51),_0x51bdd8=(await this[_0x2f0f29(0x1ef)][_0x2f0f29(0x21c)](_0x197c37))['getMemberID']();if(_0x958274){const _0x4fb131={'memberId':_0x51bdd8,'unitId':_0x197c37,'content':_0x1b7874,'mention':_0x3b26ed,'threadId':_0x1a9d00},_0x3d7fd0=(await this[_0x2f0f29(0x1d2)][_0x2f0f29(0x1f2)](_0x2f0f29(0x1f1)+_0x197c37+_0x2f0f29(0x215),{'body':_0x4fb131}))['body'][_0x2f0f29(0x219)];return{..._0x31a310,'id':_0x3d7fd0['replyId'],'dT':_0x547211(+_0x3d7fd0[_0x2f0f29(0x1b8)])[_0x2f0f29(0x1b4)](_0x2f0f29(0x1f4)),'personId':_0x3d7fd0[_0x2f0f29(0x1c7)]};}else{const _0x2767e7={'memberId':_0x51bdd8,'unitId':_0x197c37,'content':_0x1b7874,'mention':_0x3b26ed},_0x585b74=await this[_0x2f0f29(0x1d2)][_0x2f0f29(0x1f2)]('/universer-api/comment/unit/'+_0x197c37+_0x2f0f29(0x20d),{'body':_0x2767e7});return X(_0x585b74[_0x2f0f29(0x1f8)][_0x2f0f29(0x1d4)],_0x31a310);}}async[_0x142e5a(0x1ce)](_0x556e84){const _0x5c9682=_0x142e5a;var _0x2d24dd,_0x1f5a92;const {text:_0x52e779,unitId:_0x120c76}=_0x556e84,_0xeb2926=(_0x1f5a92=(_0x2d24dd=_0x52e779[_0x5c9682(0x217)])==null?void 0x0:_0x2d24dd[_0x5c9682(0x1f6)](_0x39ad03=>_0x39ad03[_0x5c9682(0x213)]===_0x3a1ffb['COMMENT'])['map'](_0x36f164=>_0x36f164['rangeId']))!=null?_0x1f5a92:[],_0x4a59e6=JSON[_0x5c9682(0x20f)](_0x52e779),_0x4b9534=_0x556e84[_0x5c9682(0x1db)],_0x34eb0b=_0x556e84['id'],_0x1e4a48={'memberId':(await this[_0x5c9682(0x1ef)][_0x5c9682(0x21c)](_0x120c76))[_0x5c9682(0x1c6)](),'unitId':_0x120c76,'threadId':_0x4b9534,'mention':_0xeb2926,'content':_0x4a59e6,'replyId':_0x34eb0b},_0x2dcb15=await this['_httpService'][_0x5c9682(0x1f2)](_0x5c9682(0x1f1)+_0x120c76+_0x5c9682(0x1bf),{'body':_0x1e4a48});return!_0x2dcb15['body'][_0x5c9682(0x1ba)]||_0x2dcb15[_0x5c9682(0x1f8)][_0x5c9682(0x1ba)][_0x5c9682(0x218)]===0x1;}async[_0x142e5a(0x211)](_0x1eac9e){const _0x41334d=_0x142e5a,{unitId:_0x7efe33}=_0x1eac9e,_0x4fd10e=_0x1eac9e[_0x41334d(0x1db)],_0x256002={'memberId':this[_0x41334d(0x1cc)][_0x41334d(0x1d0)]()[_0x41334d(0x1ff)],'unitId':_0x7efe33,'threadId':_0x4fd10e,'solved':_0x1eac9e['resolved']?I[_0x41334d(0x205)]:I[_0x41334d(0x20b)]},_0x5163d8=await this[_0x41334d(0x1d2)]['post']('/universer-api/comment/unit/'+_0x7efe33+_0x41334d(0x200),{'body':_0x256002});return!_0x5163d8[_0x41334d(0x1f8)][_0x41334d(0x1ba)]||_0x5163d8[_0x41334d(0x1f8)][_0x41334d(0x1ba)][_0x41334d(0x218)]===0x1;}async[_0x142e5a(0x1e2)](_0x4c1dfe,_0x4873c2,_0x29d9a5,_0x40f5b7){const _0x67988=_0x142e5a,_0x1db1b3={'memberId':(await this['_sessionService'][_0x67988(0x21c)](_0x4c1dfe))[_0x67988(0x1c6)](),'threadId':_0x29d9a5,'replyId':_0x40f5b7,'unitId':_0x4c1dfe},_0x4aae5d=await this[_0x67988(0x1d2)]['post'](_0x67988(0x1f1)+_0x4c1dfe+_0x67988(0x20a),{'body':_0x1db1b3});return!_0x4aae5d['body'][_0x67988(0x1ba)]||_0x4aae5d[_0x67988(0x1f8)]['error'][_0x67988(0x218)]===0x1;}async[_0x142e5a(0x1cd)](_0xd6a374,_0x470b89,_0x3660fd){const _0xd99151=_0x142e5a,_0x9ebdba={'unitId':_0xd6a374,'threadId':_0x3660fd},_0xb4375c=await this[_0xd99151(0x1d2)][_0xd99151(0x1f2)]('/universer-api/comment/unit/'+_0xd6a374+'/list',{'body':_0x9ebdba}),_0x11447c=_0x3660fd[_0xd99151(0x21e)](_0x5ad7f1=>ee(_0xb4375c['body'][_0xd99151(0x1d3)][_0x5ad7f1],_0xd6a374,_0x470b89))[_0xd99151(0x1f6)](Boolean);return Object[_0xd99151(0x20c)](_0xb4375c[_0xd99151(0x1f8)][_0xd99151(0x1dd)])[_0xd99151(0x1f3)](_0x14a34d=>{const _0x1105db=_0xd99151;this[_0x1105db(0x1cc)][_0x1105db(0x1c5)](_0x14a34d);}),_0x11447c;}[_0x142e5a(0x1c3)](_0x465a1d){const _0x1d5549=_0x142e5a;return{'id':_0x465a1d['id'],'threadId':_0x465a1d[_0x1d5549(0x1db)],'ref':_0x465a1d['ref']};}};f=Q([_(0x0,_0x1e832b(_0x177d81)),_(0x1,_0x1e832b(_0x4e69f0)),_(0x2,_0x1e832b(_0x3eadcd)),_(0x3,_0x1e832b(_0x980829))],f);var re=Object[_0x142e5a(0x1b5)],te=(_0x2f4364,_0x31d2f,_0x5c24e2,_0x2b68a3)=>{const _0x37ad1b=_0x142e5a;for(var _0x5d213a=_0x2b68a3>0x1?void 0x0:_0x2b68a3?re(_0x31d2f,_0x5c24e2):_0x31d2f,_0x2b8231=_0x2f4364[_0x37ad1b(0x1ca)]-0x1,_0x32b2f3;_0x2b8231>=0x0;_0x2b8231--)(_0x32b2f3=_0x2f4364[_0x2b8231])&&(_0x5d213a=_0x32b2f3(_0x5d213a)||_0x5d213a);return _0x5d213a;},N=(_0x2a3bf2,_0xf5bdde)=>(_0x53238f,_0x47e99e)=>_0xf5bdde(_0x53238f,_0x47e99e,_0x2a3bf2);let g=class extends _0x151986{constructor(_0x2f8896,_0x39b937){const _0x3b420c=_0x142e5a;super(),this[_0x3b420c(0x209)]=_0x2f8896,this[_0x3b420c(0x1b9)]=_0x39b937,this[_0x3b420c(0x203)]();}['_initDataSource'](){const _0x1a8097=_0x142e5a;this[_0x1a8097(0x209)][_0x1a8097(0x201)]=this['_threadCommentDataSource'],this[_0x1a8097(0x209)][_0x1a8097(0x1fc)]=!0x1;}};g=te([N(0x0,_0x40a1e3),N(0x1,_0x1e832b(f))],g);var se=Object[_0x142e5a(0x1f9)],oe=Object[_0x142e5a(0x1b5)],ne=(_0x4c139a,_0x2c9dee,_0xb2413b)=>_0x2c9dee in _0x4c139a?se(_0x4c139a,_0x2c9dee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb2413b}):_0x4c139a[_0x2c9dee]=_0xb2413b,ie=(_0x5491a0,_0x542e4d,_0x2fdd3a,_0x33240e)=>{const _0x1b44fb=_0x142e5a;for(var _0x3ea2ff=_0x33240e>0x1?void 0x0:_0x33240e?oe(_0x542e4d,_0x2fdd3a):_0x542e4d,_0x59d53e=_0x5491a0[_0x1b44fb(0x1ca)]-0x1,_0x57cdf4;_0x59d53e>=0x0;_0x59d53e--)(_0x57cdf4=_0x5491a0[_0x59d53e])&&(_0x3ea2ff=_0x57cdf4(_0x3ea2ff)||_0x3ea2ff);return _0x3ea2ff;},w=(_0x2937cb,_0x91a7ba)=>(_0x3cff63,_0x2eb371)=>_0x91a7ba(_0x3cff63,_0x2eb371,_0x2937cb),$=(_0x319e84,_0x53def7,_0x52e190)=>ne(_0x319e84,typeof _0x53def7!=_0x142e5a(0x1d8)?_0x53def7+'':_0x53def7,_0x52e190);let b=class extends _0x147f91{constructor(_0x19686e=M,_0x5ad295,_0x38c581){const _0x2866c9=_0x142e5a;super(),this[_0x2866c9(0x1ea)]=_0x19686e,this['_injector']=_0x5ad295,this['_configService']=_0x38c581;const {..._0x4aa37f}=_0x35d0e6({},M,this['_config']);this[_0x2866c9(0x1f5)][_0x2866c9(0x1cf)](z,_0x4aa37f);}[_0x142e5a(0x1c2)](){const _0x171f83=_0x142e5a;[[f],[g],[S]][_0x171f83(0x1f3)](_0xc3ec34=>{const _0x14d564=_0x171f83;this['_injector'][_0x14d564(0x1df)](_0xc3ec34);});}[_0x142e5a(0x204)](){const _0x41862e=_0x142e5a;this[_0x41862e(0x1f0)][_0x41862e(0x1e3)](g),this[_0x41862e(0x1f0)]['get'](S);}};$(b,_0x142e5a(0x1e6),W),$(b,_0x142e5a(0x1d6),_0x2cb630['UNIVER_UNKNOWN']),b=ie([_0xdc1d9e(_0x6ce37e,_0x2e3deb,_0x30e77a),w(0x1,_0x1e832b(_0x980829)),w(0x2,_0x265aa0)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { CommentService } from '@univerjs-pro/collaboration-client';
|
|
1
2
|
import { Disposable, Injector, UserManagerService } from '@univerjs/core';
|
|
2
3
|
import { ThreadCommentModel } from '@univerjs/thread-comment';
|
|
3
|
-
import { CommentService } from '@univerjs-pro/collaboration-client';
|
|
4
4
|
export declare class ThreadCommentCollaUpdateController extends Disposable {
|
|
5
5
|
private readonly _commentService;
|
|
6
6
|
private readonly _threadCommentModel;
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x24120b,_0xb4849e){const _0x38ef67=_0x3563,_0x3d3ad6=_0x24120b();while(!![]){try{const _0x4d0f64=parseInt(_0x38ef67(0x128))/0x1*(-parseInt(_0x38ef67(0x182))/0x2)+-parseInt(_0x38ef67(0x139))/0x3*(-parseInt(_0x38ef67(0x177))/0x4)+-parseInt(_0x38ef67(0x11c))/0x5+-parseInt(_0x38ef67(0x159))/0x6*(-parseInt(_0x38ef67(0x13d))/0x7)+parseInt(_0x38ef67(0x133))/0x8*(parseInt(_0x38ef67(0x12f))/0x9)+parseInt(_0x38ef67(0x127))/0xa+-parseInt(_0x38ef67(0x152))/0xb*(parseInt(_0x38ef67(0x130))/0xc);if(_0x4d0f64===_0xb4849e)break;else _0x3d3ad6['push'](_0x3d3ad6['shift']());}catch(_0x39900e){_0x3d3ad6['push'](_0x3d3ad6['shift']());}}}(_0x45bc,0x58379),function(_0x42644c,_0x186832){const _0x4196c5=_0x3563;typeof exports==_0x4196c5(0x157)&&typeof module<'u'?_0x186832(exports,require(_0x4196c5(0x13f)),require(_0x4196c5(0x121)),require(_0x4196c5(0x18f)),require('@univerjs/thread-comment-ui'),require(_0x4196c5(0x16c)),require(_0x4196c5(0x16e)),require(_0x4196c5(0x12a))):typeof define=='function'&&define[_0x4196c5(0x123)]?define([_0x4196c5(0x126),'@univerjs-pro/collaboration-client',_0x4196c5(0x121),_0x4196c5(0x18f),_0x4196c5(0x199),_0x4196c5(0x16c),_0x4196c5(0x16e),_0x4196c5(0x12a)],_0x186832):(_0x42644c=typeof globalThis<'u'?globalThis:_0x42644c||self,_0x186832(_0x42644c['UniverProThreadCommentDatasource']={},_0x42644c[_0x4196c5(0x15b)],_0x42644c[_0x4196c5(0x179)],_0x42644c[_0x4196c5(0x172)],_0x42644c[_0x4196c5(0x191)],_0x42644c[_0x4196c5(0x17e)],_0x42644c['rxjs'],_0x42644c['UniverNetwork']));}(this,function(_0x4356d4,_0x57ede3,_0x23dd2c,_0x1a3eec,_0x387b75,_0x1ac41c,_0x47b16d,_0x111a10){'use strict';const _0x54ff9a=_0x3563;const _0x312f13='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x484586=(_0x3ff615=>(_0x3ff615[_0x3ff615[_0x54ff9a(0x184)]=0x0]='OpenOrReOpen',_0x3ff615[_0x3ff615['Solved']=0x1]=_0x54ff9a(0x170),_0x3ff615[_0x3ff615['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3ff615))(_0x484586||{}),_0x5e4060=(_0x1d67bc=>(_0x1d67bc[_0x1d67bc[_0x54ff9a(0x167)]=0x0]=_0x54ff9a(0x167),_0x1d67bc[_0x1d67bc[_0x54ff9a(0x19a)]=0x1]=_0x54ff9a(0x19a),_0x1d67bc[_0x1d67bc[_0x54ff9a(0x146)]=0x2]=_0x54ff9a(0x146),_0x1d67bc[_0x1d67bc[_0x54ff9a(0x175)]=0x3]=_0x54ff9a(0x175),_0x1d67bc[_0x1d67bc['Delete']=0x4]=_0x54ff9a(0x13c),_0x1d67bc[_0x1d67bc[_0x54ff9a(0x188)]=0x5]=_0x54ff9a(0x188),_0x1d67bc[_0x1d67bc[_0x54ff9a(0x18b)]=-0x1]=_0x54ff9a(0x18b),_0x1d67bc))(_0x5e4060||{});const _0x57bc42=_0x479324=>_0x1a3eec['dayjs'](new Date(+_0x479324))[_0x54ff9a(0x11b)]('YYYY/MM/DD\x20HH:mm'),_0x19ef1c=async(_0x1df545,_0x46eb19)=>{const _0x3f6471=_0x54ff9a,_0x4fb019=_0x1df545[_0x3f6471(0x142)](_0x1a3eec['UserManagerService']),_0x553edb=_0x1df545['get'](_0x111a10[_0x3f6471(0x166)]);_0x46eb19[_0x3f6471(0x131)](_0x251d45=>{const _0xb4eda6=_0x3f6471;_0x4fb019[_0xb4eda6(0x15a)](_0x251d45)&&_0x46eb19[_0xb4eda6(0x16a)](_0x251d45);}),_0x46eb19[_0x3f6471(0x124)]&&(await _0x553edb[_0x3f6471(0x142)](_0x3f6471(0x151),{'params':{'userIDs':[..._0x46eb19]}}))['body'][_0x3f6471(0x143)]['forEach'](_0x4dccb0=>{const _0x383c4f=_0x3f6471;_0x4dccb0&&_0x4fb019[_0x383c4f(0x1a1)](_0x4dccb0);});};var _0x1c8fce=Object[_0x54ff9a(0x144)],_0x276a2f=(_0x45606b,_0x5f3886,_0x39838a,_0x119bd1)=>{const _0x4c101a=_0x54ff9a;for(var _0x4cb5fc=_0x119bd1>0x1?void 0x0:_0x119bd1?_0x1c8fce(_0x5f3886,_0x39838a):_0x5f3886,_0x580784=_0x45606b[_0x4c101a(0x192)]-0x1,_0x2ce28a;_0x580784>=0x0;_0x580784--)(_0x2ce28a=_0x45606b[_0x580784])&&(_0x4cb5fc=_0x2ce28a(_0x4cb5fc)||_0x4cb5fc);return _0x4cb5fc;},_0x1b5d06=(_0x187450,_0x5be837)=>(_0x3378f4,_0x3d5d03)=>_0x5be837(_0x3378f4,_0x3d5d03,_0x187450);let _0x415376=class extends _0x1a3eec[_0x54ff9a(0x134)]{constructor(_0x5cb1ea,_0x1f249e,_0x9a1eac,_0x2efc86){const _0xcd84e5=_0x54ff9a;super(),this[_0xcd84e5(0x18c)]=_0x5cb1ea,this['_threadCommentModel']=_0x1f249e,this['_userService']=_0x9a1eac,this[_0xcd84e5(0x137)]=_0x2efc86,this['_init'](),this[_0xcd84e5(0x12e)]();}[_0x54ff9a(0x12e)](){const _0x1438e8=_0x54ff9a;this[_0x1438e8(0x153)](this[_0x1438e8(0x189)][_0x1438e8(0x13b)][_0x1438e8(0x17f)](_0x47b16d[_0x1438e8(0x132)](0x10))['subscribe'](_0x28f7c2=>{const _0x2b77b2=new Set();_0x28f7c2['forEach'](_0x4ac0a7=>{const _0x10902e=_0x3563;switch(_0x4ac0a7[_0x10902e(0x15d)]){case'add':{const _0x1cdbb1=_0x4ac0a7[_0x10902e(0x14c)]['personId'];_0x2b77b2[_0x10902e(0x194)](_0x1cdbb1);break;}}}),_0x19ef1c(this['_injector'],_0x2b77b2);}));}[_0x54ff9a(0x145)](){const _0x29ad7c=_0x54ff9a;this[_0x29ad7c(0x153)](this['_commentService'][_0x29ad7c(0x13b)][_0x29ad7c(0x18e)](async _0x53f64f=>{const _0x483eba=_0x29ad7c;var _0x458827,_0x403b9e,_0x22be36,_0x5df1bb;const _0x1efb05=(_0x458827=this[_0x483eba(0x189)][_0x483eba(0x19d)](_0x53f64f[_0x483eba(0x149)])[_0x483eba(0x185)](_0x407067=>_0x407067[_0x483eba(0x171)]===_0x53f64f[_0x483eba(0x171)]))==null?void 0x0:_0x458827[_0x483eba(0x122)];if(!_0x1efb05)return;const {unitId:_0x334b7e,subUnitId:_0x5edc04}=_0x1efb05;switch(_0x53f64f[_0x483eba(0x161)]&&this[_0x483eba(0x197)][_0x483eba(0x1a1)](_0x53f64f[_0x483eba(0x161)]),_0x53f64f[_0x483eba(0x15d)]){case _0x5e4060[_0x483eba(0x19a)]:break;case _0x5e4060[_0x483eba(0x146)]:{this[_0x483eba(0x189)]['addComment'](_0x334b7e,_0x5edc04,{'unitId':_0x334b7e,'subUnitId':_0x5edc04,'ref':'','id':_0x53f64f['replyId'],'dT':_0x57bc42(+_0x53f64f[_0x483eba(0x19e)]),'threadId':_0x53f64f[_0x483eba(0x171)],'personId':(_0x22be36=(_0x403b9e=_0x53f64f[_0x483eba(0x161)])==null?void 0x0:_0x403b9e[_0x483eba(0x13e)])!=null?_0x22be36:_0x53f64f['userId'],'text':JSON[_0x483eba(0x19b)](_0x53f64f[_0x483eba(0x19c)]),'parentId':_0x1efb05['id']});break;}case _0x5e4060[_0x483eba(0x13c)]:{const _0x3f1d12=this[_0x483eba(0x189)][_0x483eba(0x12b)](_0x334b7e,_0x5edc04,_0x53f64f[_0x483eba(0x15c)]);_0x3f1d12&&_0x3f1d12[_0x483eba(0x195)]&&this['_threadCommentModel']['deleteComment'](_0x334b7e,_0x5edc04,_0x53f64f[_0x483eba(0x15c)]);break;}case _0x5e4060[_0x483eba(0x175)]:{this[_0x483eba(0x189)]['updateComment'](_0x334b7e,_0x5edc04,{'commentId':_0x53f64f[_0x483eba(0x15c)],'text':JSON['parse'](_0x53f64f[_0x483eba(0x19c)])});break;}case _0x5e4060[_0x483eba(0x188)]:{const _0x5de41c=(_0x5df1bb=this[_0x483eba(0x189)][_0x483eba(0x19d)](_0x53f64f[_0x483eba(0x149)])[_0x483eba(0x185)](_0x4622e1=>_0x4622e1['threadId']===_0x53f64f[_0x483eba(0x171)]))==null?void 0x0:_0x5df1bb['root'];_0x5de41c&&this[_0x483eba(0x189)]['resolveComment'](_0x334b7e,_0x5edc04,_0x5de41c['id'],_0x53f64f[_0x483eba(0x11f)]===_0x484586[_0x483eba(0x170)]);break;}}}));}};_0x415376=_0x276a2f([_0x1b5d06(0x0,_0x1a3eec[_0x54ff9a(0x187)](_0x57ede3[_0x54ff9a(0x16d)])),_0x1b5d06(0x1,_0x1a3eec[_0x54ff9a(0x187)](_0x1ac41c['ThreadCommentModel'])),_0x1b5d06(0x2,_0x1a3eec['Inject'](_0x1a3eec[_0x54ff9a(0x16b)])),_0x1b5d06(0x3,_0x1a3eec['Inject'](_0x1a3eec[_0x54ff9a(0x140)]))],_0x415376);const _0x163bb3='thread-comment-data-source.config',_0x3b344e={};var _0x509b79=Object[_0x54ff9a(0x144)],_0x2a7d4b=(_0x2f64dc,_0x2157a7,_0x3cfab6,_0x100865)=>{const _0x568d4f=_0x54ff9a;for(var _0x984a49=_0x100865>0x1?void 0x0:_0x100865?_0x509b79(_0x2157a7,_0x3cfab6):_0x2157a7,_0x2000cf=_0x2f64dc[_0x568d4f(0x192)]-0x1,_0x21cab0;_0x2000cf>=0x0;_0x2000cf--)(_0x21cab0=_0x2f64dc[_0x2000cf])&&(_0x984a49=_0x21cab0(_0x984a49)||_0x984a49);return _0x984a49;},_0x170555=(_0x45228f,_0x257c38)=>(_0x59ffc7,_0x1e0ba0)=>_0x257c38(_0x59ffc7,_0x1e0ba0,_0x45228f);function _0x1d0b8d(_0xd1db15,_0x539d69){const _0x17734c=_0x54ff9a,_0x3073bc=_0xd1db15[_0x17734c(0x136)][0x0];return{..._0x539d69,'id':_0x3073bc[_0x17734c(0x15c)],'resolved':_0xd1db15[_0x17734c(0x11f)]===0x1,'dT':_0x57bc42(_0x3073bc[_0x17734c(0x19e)]),'personId':_0x3073bc['userId'],'threadId':_0x3073bc[_0x17734c(0x171)]};}function _0x49c300(_0x392df8,_0x4b5949,_0x5939e6){const _0x74b241=_0x54ff9a;var _0x2a4697,_0x409883;if(((_0x409883=(_0x2a4697=_0x392df8==null?void 0x0:_0x392df8['replies'])==null?void 0x0:_0x2a4697[_0x74b241(0x192)])!=null?_0x409883:0x0)>0x0){const _0x2b20e1=(_0x5cc7a5,_0x40390d)=>({'id':_0x5cc7a5[_0x74b241(0x15c)],'threadId':_0x5cc7a5[_0x74b241(0x171)],'dT':_0x57bc42(_0x5cc7a5[_0x74b241(0x19e)]),'personId':_0x5cc7a5[_0x74b241(0x17b)],'resolved':_0x392df8['solved']===_0x484586[_0x74b241(0x170)],'unitId':_0x4b5949,'subUnitId':_0x5939e6,'text':JSON[_0x74b241(0x19b)](_0x5cc7a5[_0x74b241(0x19c)]),'parentId':_0x40390d}),_0x865f3d=_0x2b20e1(_0x392df8['replies'][0x0]);return{..._0x865f3d,'children':_0x392df8[_0x74b241(0x136)][_0x74b241(0x193)](0x1)[_0x74b241(0x178)](_0x328f85=>_0x2b20e1(_0x328f85,_0x865f3d['id']))};}return null;}let _0x178f16=class{constructor(_0xbc9869,_0x1f98d3,_0x2f62d2,_0x31b0d9){const _0x23107c=_0x54ff9a;this[_0x23107c(0x154)]=_0xbc9869,this[_0x23107c(0x197)]=_0x1f98d3,this[_0x23107c(0x160)]=_0x2f62d2,this['_injector']=_0x31b0d9;}async[_0x54ff9a(0x119)](_0xf451e1){const _0xbc620=_0x54ff9a;var _0x46ca60,_0x210ce6;const {parentId:_0x265309,unitId:_0x247b85,text:_0x4aac96,threadId:_0x46f97a}=_0xf451e1,_0xea42d1=(_0x210ce6=(_0x46ca60=_0x4aac96[_0xbc620(0x138)])==null?void 0x0:_0x46ca60[_0xbc620(0x135)](_0x262b14=>_0x262b14[_0xbc620(0x150)]===_0x1a3eec[_0xbc620(0x1a0)]['COMMENT'])[_0xbc620(0x178)](_0x1c9498=>_0x1c9498[_0xbc620(0x163)]))!=null?_0x210ce6:[],_0x1f0504=JSON[_0xbc620(0x164)](_0x4aac96),_0x21be1b=(await this[_0xbc620(0x160)]['requireSession'](_0x247b85))[_0xbc620(0x11e)]();if(_0x265309){const _0x4d3106={'memberId':_0x21be1b,'unitId':_0x247b85,'content':_0x1f0504,'mention':_0xea42d1,'threadId':_0x46f97a},_0x4220f7=(await this['_httpService'][_0xbc620(0x12c)](_0xbc620(0x147)+_0x247b85+_0xbc620(0x14e),{'body':_0x4d3106}))[_0xbc620(0x17a)][_0xbc620(0x14f)];return{..._0xf451e1,'id':_0x4220f7['replyId'],'dT':_0x1a3eec[_0xbc620(0x148)](+_0x4220f7[_0xbc620(0x19e)])[_0xbc620(0x11b)](_0xbc620(0x174)),'personId':_0x4220f7[_0xbc620(0x17b)]};}else{const _0x4ebb12={'memberId':_0x21be1b,'unitId':_0x247b85,'content':_0x1f0504,'mention':_0xea42d1},_0x19d80d=await this[_0xbc620(0x154)]['post'](_0xbc620(0x147)+_0x247b85+_0xbc620(0x165),{'body':_0x4ebb12});return _0x1d0b8d(_0x19d80d[_0xbc620(0x17a)]['comment'],_0xf451e1);}}async[_0x54ff9a(0x129)](_0xc43afe){const _0x15361e=_0x54ff9a;var _0x46b271,_0x12de5b;const {text:_0x5c0737,unitId:_0xbfb042}=_0xc43afe,_0x5a3c93=(_0x12de5b=(_0x46b271=_0x5c0737[_0x15361e(0x138)])==null?void 0x0:_0x46b271['filter'](_0x277262=>_0x277262[_0x15361e(0x150)]===_0x1a3eec['CustomRangeType'][_0x15361e(0x14b)])[_0x15361e(0x178)](_0x327df2=>_0x327df2[_0x15361e(0x163)]))!=null?_0x12de5b:[],_0x736795=JSON[_0x15361e(0x164)](_0x5c0737),_0x50ecf0=_0xc43afe[_0x15361e(0x171)],_0x55a228=_0xc43afe['id'],_0x34b35f={'memberId':(await this[_0x15361e(0x160)][_0x15361e(0x196)](_0xbfb042))[_0x15361e(0x11e)](),'unitId':_0xbfb042,'threadId':_0x50ecf0,'mention':_0x5a3c93,'content':_0x736795,'replyId':_0x55a228},_0x366de8=await this[_0x15361e(0x154)][_0x15361e(0x12c)](_0x15361e(0x147)+_0xbfb042+_0x15361e(0x11d),{'body':_0x34b35f});return!_0x366de8[_0x15361e(0x17a)][_0x15361e(0x158)]||_0x366de8[_0x15361e(0x17a)][_0x15361e(0x158)]['code']===0x1;}async[_0x54ff9a(0x198)](_0x43a5b1){const _0x362f68=_0x54ff9a,{unitId:_0x42a82d}=_0x43a5b1,_0x3fbf26=_0x43a5b1[_0x362f68(0x171)],_0x586984={'memberId':this[_0x362f68(0x197)][_0x362f68(0x125)]()[_0x362f68(0x13e)],'unitId':_0x42a82d,'threadId':_0x3fbf26,'solved':_0x43a5b1['resolved']?_0x484586['Solved']:_0x484586['OpenOrReOpen']},_0x21afeb=await this[_0x362f68(0x154)][_0x362f68(0x12c)](_0x362f68(0x147)+_0x42a82d+'/solved',{'body':_0x586984});return!_0x21afeb[_0x362f68(0x17a)][_0x362f68(0x158)]||_0x21afeb['body'][_0x362f68(0x158)][_0x362f68(0x17c)]===0x1;}async[_0x54ff9a(0x13a)](_0x12d1de,_0x4d3d9d,_0x3e716e,_0x9d1428){const _0x94bfb0=_0x54ff9a,_0x47884c={'memberId':(await this[_0x94bfb0(0x160)][_0x94bfb0(0x196)](_0x12d1de))[_0x94bfb0(0x11e)](),'threadId':_0x3e716e,'replyId':_0x9d1428,'unitId':_0x12d1de},_0x526c73=await this['_httpService'][_0x94bfb0(0x12c)](_0x94bfb0(0x147)+_0x12d1de+_0x94bfb0(0x16f),{'body':_0x47884c});return!_0x526c73[_0x94bfb0(0x17a)]['error']||_0x526c73[_0x94bfb0(0x17a)][_0x94bfb0(0x158)][_0x94bfb0(0x17c)]===0x1;}async[_0x54ff9a(0x15f)](_0x2e8aad,_0x52ed14,_0x224fbf){const _0x4b7a34=_0x54ff9a,_0x55a4bc={'unitId':_0x2e8aad,'threadId':_0x224fbf},_0xada793=await this[_0x4b7a34(0x154)]['post'](_0x4b7a34(0x147)+_0x2e8aad+_0x4b7a34(0x180),{'body':_0x55a4bc}),_0x54c04e=_0x224fbf[_0x4b7a34(0x178)](_0x33e924=>_0x49c300(_0xada793[_0x4b7a34(0x17a)][_0x4b7a34(0x155)][_0x33e924],_0x2e8aad,_0x52ed14))[_0x4b7a34(0x135)](Boolean);return Object[_0x4b7a34(0x190)](_0xada793[_0x4b7a34(0x17a)][_0x4b7a34(0x143)])[_0x4b7a34(0x131)](_0x3f811e=>{const _0x4839f9=_0x4b7a34;this[_0x4839f9(0x197)][_0x4839f9(0x1a1)](_0x3f811e);}),_0x54c04e;}[_0x54ff9a(0x18a)](_0x536e28){const _0x21d60e=_0x54ff9a;return{'id':_0x536e28['id'],'threadId':_0x536e28[_0x21d60e(0x171)],'ref':_0x536e28[_0x21d60e(0x181)]};}};_0x178f16=_0x2a7d4b([_0x170555(0x0,_0x1a3eec['Inject'](_0x111a10[_0x54ff9a(0x166)])),_0x170555(0x1,_0x1a3eec[_0x54ff9a(0x187)](_0x1a3eec[_0x54ff9a(0x16b)])),_0x170555(0x2,_0x1a3eec[_0x54ff9a(0x187)](_0x57ede3[_0x54ff9a(0x183)])),_0x170555(0x3,_0x1a3eec[_0x54ff9a(0x187)](_0x1a3eec[_0x54ff9a(0x140)]))],_0x178f16);var _0x2ecc0b=Object[_0x54ff9a(0x144)],_0x34f39d=(_0x16c1f8,_0x1c1e81,_0x40dffa,_0x40b90f)=>{for(var _0x4407f4=_0x40b90f>0x1?void 0x0:_0x40b90f?_0x2ecc0b(_0x1c1e81,_0x40dffa):_0x1c1e81,_0x581811=_0x16c1f8['length']-0x1,_0x5b6295;_0x581811>=0x0;_0x581811--)(_0x5b6295=_0x16c1f8[_0x581811])&&(_0x4407f4=_0x5b6295(_0x4407f4)||_0x4407f4);return _0x4407f4;},_0x8a9c1b=(_0x4822a4,_0x26dae3)=>(_0x5010e6,_0x4d20d0)=>_0x26dae3(_0x5010e6,_0x4d20d0,_0x4822a4);let _0x3f38ed=class extends _0x1a3eec[_0x54ff9a(0x134)]{constructor(_0x18e9e7,_0x571dce){const _0xd97f33=_0x54ff9a;super(),this['_threadCommentDataSourceService']=_0x18e9e7,this[_0xd97f33(0x173)]=_0x571dce,this[_0xd97f33(0x168)]();}[_0x54ff9a(0x168)](){const _0x5dd4c7=_0x54ff9a;this[_0x5dd4c7(0x169)]['dataSource']=this[_0x5dd4c7(0x173)],this[_0x5dd4c7(0x169)][_0x5dd4c7(0x176)]=!0x1;}};_0x3f38ed=_0x34f39d([_0x8a9c1b(0x0,_0x1ac41c[_0x54ff9a(0x12d)]),_0x8a9c1b(0x1,_0x1a3eec[_0x54ff9a(0x187)](_0x178f16))],_0x3f38ed);var _0x335069=Object['defineProperty'],_0x1f0cd4=Object['getOwnPropertyDescriptor'],_0x247c1a=(_0x3b7c04,_0x1b2606,_0x7aba86)=>_0x1b2606 in _0x3b7c04?_0x335069(_0x3b7c04,_0x1b2606,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x7aba86}):_0x3b7c04[_0x1b2606]=_0x7aba86,_0x21cde3=(_0x2c5852,_0x54d285,_0x362d78,_0xf6fb5)=>{const _0x37f9b4=_0x54ff9a;for(var _0x4a05ad=_0xf6fb5>0x1?void 0x0:_0xf6fb5?_0x1f0cd4(_0x54d285,_0x362d78):_0x54d285,_0x5802fa=_0x2c5852[_0x37f9b4(0x192)]-0x1,_0x267d42;_0x5802fa>=0x0;_0x5802fa--)(_0x267d42=_0x2c5852[_0x5802fa])&&(_0x4a05ad=_0x267d42(_0x4a05ad)||_0x4a05ad);return _0x4a05ad;},_0x52a6ef=(_0x1b0364,_0x5c0ddb)=>(_0xcfa587,_0x21bdf2)=>_0x5c0ddb(_0xcfa587,_0x21bdf2,_0x1b0364),_0xb5282f=(_0x53c3c2,_0x55100a,_0x591ea5)=>_0x247c1a(_0x53c3c2,typeof _0x55100a!='symbol'?_0x55100a+'':_0x55100a,_0x591ea5);_0x4356d4[_0x54ff9a(0x141)]=class extends _0x1a3eec[_0x54ff9a(0x19f)]{constructor(_0x4e9b50=_0x3b344e,_0x3c5315,_0x44a5c2){const _0x4d85b0=_0x54ff9a;super(),this[_0x4d85b0(0x120)]=_0x4e9b50,this[_0x4d85b0(0x137)]=_0x3c5315,this[_0x4d85b0(0x14a)]=_0x44a5c2;const {..._0x50ad4a}=_0x1a3eec[_0x4d85b0(0x15e)]({},_0x3b344e,this[_0x4d85b0(0x120)]);this['_configService'][_0x4d85b0(0x14d)](_0x163bb3,_0x50ad4a);}['onStarting'](){const _0x359698=_0x54ff9a;[[_0x178f16],[_0x3f38ed],[_0x415376]][_0x359698(0x131)](_0x25c887=>{const _0x5791d5=_0x359698;this[_0x5791d5(0x137)][_0x5791d5(0x194)](_0x25c887);});}['onReady'](){const _0x3edc80=_0x54ff9a;this['_injector'][_0x3edc80(0x142)](_0x3f38ed),this[_0x3edc80(0x137)][_0x3edc80(0x142)](_0x415376);}},_0xb5282f(_0x4356d4['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x312f13),_0xb5282f(_0x4356d4[_0x54ff9a(0x141)],_0x54ff9a(0x15d),_0x1a3eec[_0x54ff9a(0x11a)]['UNIVER_UNKNOWN']),_0x4356d4[_0x54ff9a(0x141)]=_0x21cde3([_0x1a3eec['DependentOn'](_0x387b75[_0x54ff9a(0x156)],_0x57ede3['UniverCollaborationClientPlugin'],_0x23dd2c['UniverLicensePlugin']),_0x52a6ef(0x1,_0x1a3eec[_0x54ff9a(0x187)](_0x1a3eec[_0x54ff9a(0x140)])),_0x52a6ef(0x2,_0x1a3eec[_0x54ff9a(0x162)])],_0x4356d4['UniverThreadCommentDataSourcePlugin']),Object[_0x54ff9a(0x17d)](_0x4356d4,Symbol[_0x54ff9a(0x186)],{'value':_0x54ff9a(0x18d)});}));function _0x3563(_0x1ec659,_0x4c5a49){const _0x45bc6c=_0x45bc();return _0x3563=function(_0x356306,_0x5f1a7e){_0x356306=_0x356306-0x119;let _0x2379db=_0x45bc6c[_0x356306];return _0x2379db;},_0x3563(_0x1ec659,_0x4c5a49);}function _0x45bc(){const _0x1c2881=['3616VlXgnJ','map','UniverProLicense','body','userId','code','defineProperty','UniverThreadComment','pipe','/list','ref','740046eRuNzT','CollaborationSessionService','OpenOrReOpen','find','toStringTag','Inject','Solve','_threadCommentModel','saveCommentToSnapshot','UNRECOGNIZED','_commentService','Module','subscribe','@univerjs/core','values','UniverThreadCommentUi','length','slice','add','parentId','requireSession','_userService','resolveComment','@univerjs/thread-comment-ui','Add','parse','content','getUnit','createTimestamp','Plugin','CustomRangeType','addUser','addComment','UniverInstanceType','format','1055110vmTlFw','/edit','getMemberID','solved','_config','@univerjs-pro/license','root','amd','size','getCurrentUser','exports','774860LIVNoy','1gYEBgM','updateComment','@univerjs/network','getComment','post','IThreadCommentDataSourceService','_initUserSync','311013dgihtV','12jpMQbC','forEach','bufferTime','136QkuuOd','Disposable','filter','replies','_injector','customRanges','1500KXWArA','deleteComment','commentUpdate$','Delete','2907415LOtOBI','userID','@univerjs-pro/collaboration-client','Injector','UniverThreadCommentDataSourcePlugin','get','users','getOwnPropertyDescriptor','_init','Reply','/universer-api/comment/unit/','dayjs','unitId','_configService','COMMENT','payload','setConfig','/reply','reply','rangeType','/universer-api/user/list','6489098bPhkJo','disposeWithMe','_httpService','comments','UniverThreadCommentUIPlugin','object','error','6ySGsQt','getUser','UniverProCollaborationClient','replyId','type','merge','listComments','_sessionService','user','IConfigService','rangeId','stringify','/add','HTTPService','Unknown','_initDataSource','_threadCommentDataSourceService','delete','UserManagerService','@univerjs/thread-comment','CommentService','rxjs','/delete','Solved','threadId','UniverCore','_threadCommentDataSource','YYYY/MM/DD\x20HH:mm','Edit','syncUpdateMutationToColla'];_0x45bc=function(){return _0x1c2881;};return _0x45bc();}
|
|
1
|
+
function _0x465d(_0x2953ca,_0x3765ac){const _0x3becdd=_0x3bec();return _0x465d=function(_0x465d81,_0xaf54a0){_0x465d81=_0x465d81-0x169;let _0x39e2a8=_0x3becdd[_0x465d81];return _0x39e2a8;},_0x465d(_0x2953ca,_0x3765ac);}(function(_0x5e4b97,_0x519035){const _0x3058ae=_0x465d,_0x3e6826=_0x5e4b97();while(!![]){try{const _0x1ae0d9=parseInt(_0x3058ae(0x197))/0x1*(-parseInt(_0x3058ae(0x1a1))/0x2)+-parseInt(_0x3058ae(0x17c))/0x3*(parseInt(_0x3058ae(0x1a6))/0x4)+parseInt(_0x3058ae(0x193))/0x5+parseInt(_0x3058ae(0x176))/0x6*(-parseInt(_0x3058ae(0x1bf))/0x7)+-parseInt(_0x3058ae(0x17d))/0x8+parseInt(_0x3058ae(0x1be))/0x9+parseInt(_0x3058ae(0x19d))/0xa*(parseInt(_0x3058ae(0x1df))/0xb);if(_0x1ae0d9===_0x519035)break;else _0x3e6826['push'](_0x3e6826['shift']());}catch(_0x471b73){_0x3e6826['push'](_0x3e6826['shift']());}}}(_0x3bec,0x1fb55),function(_0x22b699,_0x5107e7){const _0x2c6260=_0x465d;typeof exports==_0x2c6260(0x1db)&&typeof module<'u'?_0x5107e7(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x2c6260(0x179)&&define[_0x2c6260(0x1d0)]?define([_0x2c6260(0x188),_0x2c6260(0x1d6),_0x2c6260(0x1b4),'@univerjs/core',_0x2c6260(0x1c9),_0x2c6260(0x16e),_0x2c6260(0x1c7),_0x2c6260(0x1e6)],_0x5107e7):(_0x22b699=typeof globalThis<'u'?globalThis:_0x22b699||self,_0x5107e7(_0x22b699[_0x2c6260(0x1ca)]={},_0x22b699['UniverProCollaborationClient'],_0x22b699[_0x2c6260(0x198)],_0x22b699[_0x2c6260(0x1ae)],_0x22b699[_0x2c6260(0x1ba)],_0x22b699[_0x2c6260(0x1b3)],_0x22b699[_0x2c6260(0x1c7)],_0x22b699['UniverNetwork']));}(this,function(_0x12aa20,_0x367d8a,_0x2a0d00,_0x4ae14d,_0x581c88,_0x88cf62,_0x50b15e,_0x32f3a8){'use strict';const _0x3c21f3=_0x465d;const _0x1e9891=_0x3c21f3(0x1e3);var _0x328b5a=(_0x126ff9=>(_0x126ff9[_0x126ff9[_0x3c21f3(0x184)]=0x0]=_0x3c21f3(0x184),_0x126ff9[_0x126ff9[_0x3c21f3(0x1bc)]=0x1]=_0x3c21f3(0x1bc),_0x126ff9[_0x126ff9[_0x3c21f3(0x1ab)]=-0x1]=_0x3c21f3(0x1ab),_0x126ff9))(_0x328b5a||{}),_0x401444=(_0xefbc67=>(_0xefbc67[_0xefbc67[_0x3c21f3(0x1b0)]=0x0]=_0x3c21f3(0x1b0),_0xefbc67[_0xefbc67[_0x3c21f3(0x1ed)]=0x1]='Add',_0xefbc67[_0xefbc67[_0x3c21f3(0x1e5)]=0x2]='Reply',_0xefbc67[_0xefbc67['Edit']=0x3]=_0x3c21f3(0x1b8),_0xefbc67[_0xefbc67[_0x3c21f3(0x1cc)]=0x4]=_0x3c21f3(0x1cc),_0xefbc67[_0xefbc67[_0x3c21f3(0x1cb)]=0x5]=_0x3c21f3(0x1cb),_0xefbc67[_0xefbc67[_0x3c21f3(0x1ab)]=-0x1]=_0x3c21f3(0x1ab),_0xefbc67))(_0x401444||{});const _0x7a1c8c=_0x3c658b=>_0x4ae14d[_0x3c21f3(0x1b1)](new Date(+_0x3c658b))[_0x3c21f3(0x190)](_0x3c21f3(0x199)),_0x85501d=async(_0x4e41a0,_0x413891)=>{const _0x1d0751=_0x3c21f3,_0x34a519=_0x4e41a0[_0x1d0751(0x1e1)](_0x4ae14d[_0x1d0751(0x1d1)]),_0x5072ea=_0x4e41a0[_0x1d0751(0x1e1)](_0x32f3a8[_0x1d0751(0x181)]);_0x413891[_0x1d0751(0x1ac)](_0x503abb=>{const _0x4c6036=_0x1d0751;_0x34a519[_0x4c6036(0x182)](_0x503abb)&&_0x413891[_0x4c6036(0x17f)](_0x503abb);}),_0x413891[_0x1d0751(0x171)]&&(await _0x5072ea['get'](_0x1d0751(0x1e4),{'params':{'userIDs':[..._0x413891]}}))[_0x1d0751(0x174)][_0x1d0751(0x185)][_0x1d0751(0x1ac)](_0x385424=>{_0x385424&&_0x34a519['addUser'](_0x385424);});};var _0x1b2ba8=Object['getOwnPropertyDescriptor'],_0x4abf10=(_0x2b4682,_0x20619b,_0x59802a,_0x101cb5)=>{const _0x407b60=_0x3c21f3;for(var _0x50fc63=_0x101cb5>0x1?void 0x0:_0x101cb5?_0x1b2ba8(_0x20619b,_0x59802a):_0x20619b,_0x2b9c36=_0x2b4682[_0x407b60(0x170)]-0x1,_0x3fc1f8;_0x2b9c36>=0x0;_0x2b9c36--)(_0x3fc1f8=_0x2b4682[_0x2b9c36])&&(_0x50fc63=_0x3fc1f8(_0x50fc63)||_0x50fc63);return _0x50fc63;},_0x127c34=(_0xd0e39a,_0xccd3b5)=>(_0x2e02df,_0x31c00e)=>_0xccd3b5(_0x2e02df,_0x31c00e,_0xd0e39a);let _0x34b68f=class extends _0x4ae14d[_0x3c21f3(0x1b6)]{constructor(_0x473d29,_0x2b4b6a,_0x7e1045,_0x589762){const _0x4c723a=_0x3c21f3;super(),this[_0x4c723a(0x1ef)]=_0x473d29,this[_0x4c723a(0x18b)]=_0x2b4b6a,this[_0x4c723a(0x19a)]=_0x7e1045,this[_0x4c723a(0x1c1)]=_0x589762,this[_0x4c723a(0x195)](),this[_0x4c723a(0x1b9)]();}[_0x3c21f3(0x1b9)](){const _0x16e2dc=_0x3c21f3;this[_0x16e2dc(0x18c)](this[_0x16e2dc(0x18b)]['commentUpdate$']['pipe'](_0x50b15e[_0x16e2dc(0x1d3)](0x10))['subscribe'](_0x5de446=>{const _0x5305b9=_0x16e2dc,_0x5dfe0e=new Set();_0x5de446[_0x5305b9(0x1ac)](_0x2270cd=>{const _0x320f49=_0x5305b9;switch(_0x2270cd[_0x320f49(0x17e)]){case _0x320f49(0x1e7):{const _0x2619a6=_0x2270cd[_0x320f49(0x1eb)][_0x320f49(0x1e2)];_0x5dfe0e['add'](_0x2619a6);break;}}}),_0x85501d(this[_0x5305b9(0x1c1)],_0x5dfe0e);}));}[_0x3c21f3(0x195)](){const _0x54e438=_0x3c21f3;this[_0x54e438(0x18c)](this['_commentService']['commentUpdate$']['subscribe'](async _0x4881b8=>{const _0x5ccb51=_0x54e438;var _0x47d58e,_0x5ba6c9,_0x4b860c,_0x4a67d1;const _0x58ac37=(_0x47d58e=this['_threadCommentModel'][_0x5ccb51(0x194)](_0x4881b8[_0x5ccb51(0x177)])['find'](_0x4b9c7d=>_0x4b9c7d[_0x5ccb51(0x16d)]===_0x4881b8[_0x5ccb51(0x16d)]))==null?void 0x0:_0x47d58e[_0x5ccb51(0x1c3)];if(!_0x58ac37)return;const {unitId:_0x2e263e,subUnitId:_0x24d391}=_0x58ac37;switch(_0x4881b8[_0x5ccb51(0x1c8)]&&this['_userService'][_0x5ccb51(0x16c)](_0x4881b8[_0x5ccb51(0x1c8)]),_0x4881b8[_0x5ccb51(0x17e)]){case _0x401444[_0x5ccb51(0x1ed)]:break;case _0x401444[_0x5ccb51(0x1e5)]:{this['_threadCommentModel'][_0x5ccb51(0x172)](_0x2e263e,_0x24d391,{'unitId':_0x2e263e,'subUnitId':_0x24d391,'ref':'','id':_0x4881b8[_0x5ccb51(0x173)],'dT':_0x7a1c8c(+_0x4881b8[_0x5ccb51(0x1c4)]),'threadId':_0x4881b8['threadId'],'personId':(_0x4b860c=(_0x5ba6c9=_0x4881b8[_0x5ccb51(0x1c8)])==null?void 0x0:_0x5ba6c9['userID'])!=null?_0x4b860c:_0x4881b8[_0x5ccb51(0x19b)],'text':JSON[_0x5ccb51(0x1d8)](_0x4881b8[_0x5ccb51(0x18d)]),'parentId':_0x58ac37['id']});break;}case _0x401444[_0x5ccb51(0x1cc)]:{const _0x209a09=this['_threadCommentModel'][_0x5ccb51(0x1d4)](_0x2e263e,_0x24d391,_0x4881b8[_0x5ccb51(0x173)]);_0x209a09&&_0x209a09[_0x5ccb51(0x1a8)]&&this[_0x5ccb51(0x18b)][_0x5ccb51(0x1a0)](_0x2e263e,_0x24d391,_0x4881b8[_0x5ccb51(0x173)]);break;}case _0x401444['Edit']:{this[_0x5ccb51(0x18b)][_0x5ccb51(0x1cd)](_0x2e263e,_0x24d391,{'commentId':_0x4881b8[_0x5ccb51(0x173)],'text':JSON['parse'](_0x4881b8[_0x5ccb51(0x18d)])});break;}case _0x401444['Solve']:{const _0x367372=(_0x4a67d1=this[_0x5ccb51(0x18b)][_0x5ccb51(0x194)](_0x4881b8[_0x5ccb51(0x177)])['find'](_0x351412=>_0x351412[_0x5ccb51(0x16d)]===_0x4881b8['threadId']))==null?void 0x0:_0x4a67d1[_0x5ccb51(0x1c3)];_0x367372&&this[_0x5ccb51(0x18b)][_0x5ccb51(0x1a2)](_0x2e263e,_0x24d391,_0x367372['id'],_0x4881b8['solved']===_0x328b5a['Solved']);break;}}}));}};_0x34b68f=_0x4abf10([_0x127c34(0x0,_0x4ae14d[_0x3c21f3(0x1e9)](_0x367d8a['CommentService'])),_0x127c34(0x1,_0x4ae14d[_0x3c21f3(0x1e9)](_0x88cf62[_0x3c21f3(0x1da)])),_0x127c34(0x2,_0x4ae14d['Inject'](_0x4ae14d[_0x3c21f3(0x1d1)])),_0x127c34(0x3,_0x4ae14d[_0x3c21f3(0x1e9)](_0x4ae14d[_0x3c21f3(0x1aa)]))],_0x34b68f);const _0x1410af='thread-comment-data-source.config',_0x253f65={};var _0x38624b=Object[_0x3c21f3(0x1dd)],_0x5ed4f5=(_0x2647b9,_0x44e19d,_0x307d65,_0x328c8c)=>{const _0x243d98=_0x3c21f3;for(var _0x2dacff=_0x328c8c>0x1?void 0x0:_0x328c8c?_0x38624b(_0x44e19d,_0x307d65):_0x44e19d,_0x18b4fe=_0x2647b9[_0x243d98(0x170)]-0x1,_0x33b05a;_0x18b4fe>=0x0;_0x18b4fe--)(_0x33b05a=_0x2647b9[_0x18b4fe])&&(_0x2dacff=_0x33b05a(_0x2dacff)||_0x2dacff);return _0x2dacff;},_0x10faf6=(_0x21e575,_0xfb05f6)=>(_0xf631c,_0x425a9e)=>_0xfb05f6(_0xf631c,_0x425a9e,_0x21e575);function _0x3a94b2(_0xc3eb96,_0x45da5b){const _0x55df17=_0x3c21f3,_0x118376=_0xc3eb96['replies'][0x0];return{..._0x45da5b,'id':_0x118376['replyId'],'resolved':_0xc3eb96['solved']===0x1,'dT':_0x7a1c8c(_0x118376[_0x55df17(0x1c4)]),'personId':_0x118376['userId'],'threadId':_0x118376[_0x55df17(0x16d)]};}function _0x188b6b(_0x1f4148,_0x5f787b,_0x200069){const _0x35f2ac=_0x3c21f3;var _0x2fca65,_0x5c680c;if(((_0x5c680c=(_0x2fca65=_0x1f4148==null?void 0x0:_0x1f4148['replies'])==null?void 0x0:_0x2fca65[_0x35f2ac(0x170)])!=null?_0x5c680c:0x0)>0x0){const _0x45dd82=(_0x1cdce1,_0x70126c)=>({'id':_0x1cdce1[_0x35f2ac(0x173)],'threadId':_0x1cdce1[_0x35f2ac(0x16d)],'dT':_0x7a1c8c(_0x1cdce1['createTimestamp']),'personId':_0x1cdce1[_0x35f2ac(0x19b)],'resolved':_0x1f4148[_0x35f2ac(0x187)]===_0x328b5a[_0x35f2ac(0x1bc)],'unitId':_0x5f787b,'subUnitId':_0x200069,'text':JSON[_0x35f2ac(0x1d8)](_0x1cdce1[_0x35f2ac(0x18d)]),'parentId':_0x70126c}),_0x30a365=_0x45dd82(_0x1f4148[_0x35f2ac(0x183)][0x0]);return{..._0x30a365,'children':_0x1f4148[_0x35f2ac(0x183)][_0x35f2ac(0x175)](0x1)[_0x35f2ac(0x1af)](_0x22fdbf=>_0x45dd82(_0x22fdbf,_0x30a365['id']))};}return null;}let _0x3d748f=class{constructor(_0x59ce2a,_0x595e64,_0x393dd6,_0x36f904){const _0x3ef4e5=_0x3c21f3;this['_httpService']=_0x59ce2a,this['_userService']=_0x595e64,this['_sessionService']=_0x393dd6,this[_0x3ef4e5(0x1c1)]=_0x36f904;}async[_0x3c21f3(0x172)](_0x391ef4){const _0x319010=_0x3c21f3;var _0x18f96f,_0x16c73b;const {parentId:_0x5ae994,unitId:_0x483c84,text:_0x448c9c,threadId:_0x5d6e92}=_0x391ef4,_0x33363b=(_0x16c73b=(_0x18f96f=_0x448c9c['customRanges'])==null?void 0x0:_0x18f96f[_0x319010(0x18e)](_0x3f4b31=>_0x3f4b31[_0x319010(0x1ad)]===_0x4ae14d['CustomRangeType'][_0x319010(0x1ec)])[_0x319010(0x1af)](_0x1fc306=>_0x1fc306[_0x319010(0x178)]))!=null?_0x16c73b:[],_0x95f366=JSON[_0x319010(0x1e8)](_0x448c9c),_0x23a083=(await this['_sessionService'][_0x319010(0x1de)](_0x483c84))[_0x319010(0x1a7)]();if(_0x5ae994){const _0x112e61={'memberId':_0x23a083,'unitId':_0x483c84,'content':_0x95f366,'mention':_0x33363b,'threadId':_0x5d6e92},_0x944cb2=(await this[_0x319010(0x1a9)]['post']('/universer-api/comment/unit/'+_0x483c84+'/reply',{'body':_0x112e61}))[_0x319010(0x174)][_0x319010(0x1a3)];return{..._0x391ef4,'id':_0x944cb2['replyId'],'dT':_0x4ae14d[_0x319010(0x1b1)](+_0x944cb2[_0x319010(0x1c4)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x944cb2[_0x319010(0x19b)]};}else{const _0x22855d={'memberId':_0x23a083,'unitId':_0x483c84,'content':_0x95f366,'mention':_0x33363b},_0x2a1e49=await this['_httpService'][_0x319010(0x17b)](_0x319010(0x169)+_0x483c84+_0x319010(0x191),{'body':_0x22855d});return _0x3a94b2(_0x2a1e49[_0x319010(0x174)]['comment'],_0x391ef4);}}async[_0x3c21f3(0x1cd)](_0xfafe8c){const _0x48c10c=_0x3c21f3;var _0x17c0f1,_0x185db8;const {text:_0x75a389,unitId:_0x4feeb3}=_0xfafe8c,_0x50746a=(_0x185db8=(_0x17c0f1=_0x75a389[_0x48c10c(0x1b5)])==null?void 0x0:_0x17c0f1['filter'](_0x316400=>_0x316400['rangeType']===_0x4ae14d[_0x48c10c(0x180)][_0x48c10c(0x1ec)])[_0x48c10c(0x1af)](_0x172878=>_0x172878[_0x48c10c(0x178)]))!=null?_0x185db8:[],_0x2711b3=JSON['stringify'](_0x75a389),_0x3ccc25=_0xfafe8c['threadId'],_0x512370=_0xfafe8c['id'],_0x59f9e2={'memberId':(await this[_0x48c10c(0x16b)][_0x48c10c(0x1de)](_0x4feeb3))[_0x48c10c(0x1a7)](),'unitId':_0x4feeb3,'threadId':_0x3ccc25,'mention':_0x50746a,'content':_0x2711b3,'replyId':_0x512370},_0x43e910=await this[_0x48c10c(0x1a9)][_0x48c10c(0x17b)]('/universer-api/comment/unit/'+_0x4feeb3+'/edit',{'body':_0x59f9e2});return!_0x43e910[_0x48c10c(0x174)][_0x48c10c(0x192)]||_0x43e910[_0x48c10c(0x174)][_0x48c10c(0x192)][_0x48c10c(0x19c)]===0x1;}async[_0x3c21f3(0x1a2)](_0x219791){const _0x4bbe71=_0x3c21f3,{unitId:_0x422cef}=_0x219791,_0x2411c5=_0x219791[_0x4bbe71(0x16d)],_0x4a8e58={'memberId':this[_0x4bbe71(0x19a)][_0x4bbe71(0x1cf)]()[_0x4bbe71(0x1e0)],'unitId':_0x422cef,'threadId':_0x2411c5,'solved':_0x219791[_0x4bbe71(0x19e)]?_0x328b5a[_0x4bbe71(0x1bc)]:_0x328b5a[_0x4bbe71(0x184)]},_0x3256bc=await this[_0x4bbe71(0x1a9)][_0x4bbe71(0x17b)](_0x4bbe71(0x169)+_0x422cef+_0x4bbe71(0x1ce),{'body':_0x4a8e58});return!_0x3256bc['body'][_0x4bbe71(0x192)]||_0x3256bc['body'][_0x4bbe71(0x192)][_0x4bbe71(0x19c)]===0x1;}async[_0x3c21f3(0x1a0)](_0x32d5b5,_0x58ca5d,_0x219ee5,_0x91544b){const _0x4b9a93=_0x3c21f3,_0x443b94={'memberId':(await this[_0x4b9a93(0x16b)]['requireSession'](_0x32d5b5))['getMemberID'](),'threadId':_0x219ee5,'replyId':_0x91544b,'unitId':_0x32d5b5},_0x367146=await this[_0x4b9a93(0x1a9)]['post'](_0x4b9a93(0x169)+_0x32d5b5+_0x4b9a93(0x19f),{'body':_0x443b94});return!_0x367146[_0x4b9a93(0x174)][_0x4b9a93(0x192)]||_0x367146[_0x4b9a93(0x174)][_0x4b9a93(0x192)]['code']===0x1;}async[_0x3c21f3(0x1d5)](_0x105688,_0x294fa1,_0x5f57c9){const _0x2aa183=_0x3c21f3,_0xa5b941={'unitId':_0x105688,'threadId':_0x5f57c9},_0xb52679=await this['_httpService'][_0x2aa183(0x17b)]('/universer-api/comment/unit/'+_0x105688+'/list',{'body':_0xa5b941}),_0x5c9379=_0x5f57c9[_0x2aa183(0x1af)](_0x219d13=>_0x188b6b(_0xb52679['body'][_0x2aa183(0x1b7)][_0x219d13],_0x105688,_0x294fa1))[_0x2aa183(0x18e)](Boolean);return Object[_0x2aa183(0x1b2)](_0xb52679[_0x2aa183(0x174)]['users'])[_0x2aa183(0x1ac)](_0x2dabdd=>{const _0x2dad8d=_0x2aa183;this[_0x2dad8d(0x19a)][_0x2dad8d(0x16c)](_0x2dabdd);}),_0x5c9379;}[_0x3c21f3(0x189)](_0x42e697){const _0x349c09=_0x3c21f3;return{'id':_0x42e697['id'],'threadId':_0x42e697['threadId'],'ref':_0x42e697[_0x349c09(0x1d9)]};}};_0x3d748f=_0x5ed4f5([_0x10faf6(0x0,_0x4ae14d['Inject'](_0x32f3a8['HTTPService'])),_0x10faf6(0x1,_0x4ae14d[_0x3c21f3(0x1e9)](_0x4ae14d[_0x3c21f3(0x1d1)])),_0x10faf6(0x2,_0x4ae14d[_0x3c21f3(0x1e9)](_0x367d8a[_0x3c21f3(0x1c0)])),_0x10faf6(0x3,_0x4ae14d[_0x3c21f3(0x1e9)](_0x4ae14d[_0x3c21f3(0x1aa)]))],_0x3d748f);var _0x5f3532=Object[_0x3c21f3(0x1dd)],_0x272f51=(_0xf120fd,_0x5c57db,_0x1927fe,_0x4e3ca2)=>{const _0x55510e=_0x3c21f3;for(var _0x19d373=_0x4e3ca2>0x1?void 0x0:_0x4e3ca2?_0x5f3532(_0x5c57db,_0x1927fe):_0x5c57db,_0x66643a=_0xf120fd[_0x55510e(0x170)]-0x1,_0x254aad;_0x66643a>=0x0;_0x66643a--)(_0x254aad=_0xf120fd[_0x66643a])&&(_0x19d373=_0x254aad(_0x19d373)||_0x19d373);return _0x19d373;},_0x3d9381=(_0x42826d,_0x29c87a)=>(_0x323e47,_0x4396cb)=>_0x29c87a(_0x323e47,_0x4396cb,_0x42826d);let _0x884f8=class extends _0x4ae14d[_0x3c21f3(0x1b6)]{constructor(_0x1fa325,_0x17651d){const _0x53f78d=_0x3c21f3;super(),this[_0x53f78d(0x16a)]=_0x1fa325,this[_0x53f78d(0x1bb)]=_0x17651d,this['_initDataSource']();}['_initDataSource'](){const _0x2475a6=_0x3c21f3;this[_0x2475a6(0x16a)][_0x2475a6(0x1bd)]=this[_0x2475a6(0x1bb)],this[_0x2475a6(0x16a)][_0x2475a6(0x1a4)]=!0x1;}};_0x884f8=_0x272f51([_0x3d9381(0x0,_0x88cf62['IThreadCommentDataSourceService']),_0x3d9381(0x1,_0x4ae14d['Inject'](_0x3d748f))],_0x884f8);var _0x47309f=Object[_0x3c21f3(0x1c6)],_0x19fffa=Object['getOwnPropertyDescriptor'],_0xef827e=(_0x1841aa,_0x2d070a,_0x9d4e6)=>_0x2d070a in _0x1841aa?_0x47309f(_0x1841aa,_0x2d070a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x9d4e6}):_0x1841aa[_0x2d070a]=_0x9d4e6,_0x20531c=(_0x18b10f,_0x38d744,_0x30fced,_0x474a09)=>{const _0x1f136b=_0x3c21f3;for(var _0x3feda2=_0x474a09>0x1?void 0x0:_0x474a09?_0x19fffa(_0x38d744,_0x30fced):_0x38d744,_0x15215c=_0x18b10f[_0x1f136b(0x170)]-0x1,_0x55a595;_0x15215c>=0x0;_0x15215c--)(_0x55a595=_0x18b10f[_0x15215c])&&(_0x3feda2=_0x55a595(_0x3feda2)||_0x3feda2);return _0x3feda2;},_0x464968=(_0x58fc90,_0x101b8f)=>(_0xb9c705,_0x370b9f)=>_0x101b8f(_0xb9c705,_0x370b9f,_0x58fc90),_0xc8eb08=(_0xa4591d,_0x399a91,_0x10f320)=>_0xef827e(_0xa4591d,typeof _0x399a91!=_0x3c21f3(0x1c2)?_0x399a91+'':_0x399a91,_0x10f320);_0x12aa20[_0x3c21f3(0x1ea)]=class extends _0x4ae14d[_0x3c21f3(0x1d7)]{constructor(_0x1b66f5=_0x253f65,_0xa9e65c,_0x5042e9){const _0x38558c=_0x3c21f3;super(),this['_config']=_0x1b66f5,this[_0x38558c(0x1c1)]=_0xa9e65c,this[_0x38558c(0x18a)]=_0x5042e9;const {..._0x4fae36}=_0x4ae14d[_0x38558c(0x17a)]({},_0x253f65,this[_0x38558c(0x18f)]);this[_0x38558c(0x18a)][_0x38558c(0x1d2)](_0x1410af,_0x4fae36);}[_0x3c21f3(0x196)](){const _0x1caa2b=_0x3c21f3;[[_0x3d748f],[_0x884f8],[_0x34b68f]][_0x1caa2b(0x1ac)](_0x4a8bca=>{const _0x2415e5=_0x1caa2b;this['_injector'][_0x2415e5(0x1e7)](_0x4a8bca);});}[_0x3c21f3(0x1a5)](){const _0x2349e3=_0x3c21f3;this[_0x2349e3(0x1c1)][_0x2349e3(0x1e1)](_0x884f8),this[_0x2349e3(0x1c1)][_0x2349e3(0x1e1)](_0x34b68f);}},_0xc8eb08(_0x12aa20[_0x3c21f3(0x1ea)],'pluginName',_0x1e9891),_0xc8eb08(_0x12aa20[_0x3c21f3(0x1ea)],'type',_0x4ae14d[_0x3c21f3(0x186)]['UNIVER_UNKNOWN']),_0x12aa20[_0x3c21f3(0x1ea)]=_0x20531c([_0x4ae14d[_0x3c21f3(0x1ee)](_0x581c88['UniverThreadCommentUIPlugin'],_0x367d8a[_0x3c21f3(0x1dc)],_0x2a0d00[_0x3c21f3(0x16f)]),_0x464968(0x1,_0x4ae14d[_0x3c21f3(0x1e9)](_0x4ae14d[_0x3c21f3(0x1aa)])),_0x464968(0x2,_0x4ae14d['IConfigService'])],_0x12aa20['UniverThreadCommentDataSourcePlugin']),Object[_0x3c21f3(0x1c6)](_0x12aa20,Symbol[_0x3c21f3(0x1c5)],{'value':'Module'});}));function _0x3bec(){const _0xaea526=['getCurrentUser','amd','UserManagerService','setConfig','bufferTime','getComment','listComments','@univerjs-pro/collaboration-client','Plugin','parse','ref','ThreadCommentModel','object','UniverCollaborationClientPlugin','getOwnPropertyDescriptor','requireSession','374cmOeMq','userID','get','personId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/universer-api/user/list','Reply','@univerjs/network','add','stringify','Inject','UniverThreadCommentDataSourcePlugin','payload','COMMENT','Add','DependentOn','_commentService','/universer-api/comment/unit/','_threadCommentDataSourceService','_sessionService','addUser','threadId','@univerjs/thread-comment','UniverLicensePlugin','length','size','addComment','replyId','body','slice','54slXdiT','unitId','rangeId','function','merge','post','20859JNEurO','1959536asmugJ','type','delete','CustomRangeType','HTTPService','getUser','replies','OpenOrReOpen','users','UniverInstanceType','solved','exports','saveCommentToSnapshot','_configService','_threadCommentModel','disposeWithMe','content','filter','_config','format','/add','error','294270bxizhS','getUnit','_init','onStarting','213987YUFmJf','UniverProLicense','YYYY/MM/DD\x20HH:mm','_userService','userId','code','147790KREcTt','resolved','/delete','deleteComment','2nykKAf','resolveComment','reply','syncUpdateMutationToColla','onReady','12jRyAmd','getMemberID','parentId','_httpService','Injector','UNRECOGNIZED','forEach','rangeType','UniverCore','map','Unknown','dayjs','values','UniverThreadComment','@univerjs-pro/license','customRanges','Disposable','comments','Edit','_initUserSync','UniverThreadCommentUi','_threadCommentDataSource','Solved','dataSource','787194ndgqCr','30443sPkcqM','CollaborationSessionService','_injector','symbol','root','createTimestamp','toStringTag','defineProperty','rxjs','user','@univerjs/thread-comment-ui','UniverProThreadCommentDatasource','Solve','Delete','updateComment','/solved'];_0x3bec=function(){return _0xaea526;};return _0x3bec();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.3-nightly.
|
|
3
|
+
"version": "0.8.3-nightly.202507011607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.8.3-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.8.3-nightly.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.8.3-nightly.202507011607",
|
|
49
|
+
"@univerjs-pro/license": "0.8.3-nightly.202507011607",
|
|
50
|
+
"@univerjs/network": "0.8.3-nightly.202507011607",
|
|
51
|
+
"@univerjs/core": "0.8.3-nightly.202507011607",
|
|
52
|
+
"@univerjs/thread-comment": "0.8.3-nightly.202507011607",
|
|
50
53
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/core": "0.8.3-nightly.202506271607",
|
|
53
|
-
"@univerjs/thread-comment": "0.8.3-nightly.202506271607",
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.8.3-nightly.202506271607"
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.8.3-nightly.202507011607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|