@univerjs-pro/thread-comment-datasource 0.15.0 → 0.15.1
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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +9 -9
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x52a573=_0x5428;(function(_0x25a06b,_0x13d33f){const _0x41bad5=_0x5428,_0x2386f2=_0x25a06b();while(!![]){try{const _0x3973fb=-parseInt(_0x41bad5(0x1fe))/0x1+parseInt(_0x41bad5(0x208))/0x2+-parseInt(_0x41bad5(0x1f9))/0x3*(parseInt(_0x41bad5(0x1eb))/0x4)+parseInt(_0x41bad5(0x201))/0x5+parseInt(_0x41bad5(0x23f))/0x6+-parseInt(_0x41bad5(0x1fb))/0x7+-parseInt(_0x41bad5(0x1e8))/0x8;if(_0x3973fb===_0x13d33f)break;else _0x2386f2['push'](_0x2386f2['shift']());}catch(_0x17e512){_0x2386f2['push'](_0x2386f2['shift']());}}}(_0x5888,0x46940));function _0x5428(_0x37e14b,_0x337c81){_0x37e14b=_0x37e14b-0x1cc;const _0x588886=_0x5888();let _0x5428f1=_0x588886[_0x37e14b];return _0x5428f1;}Object[_0x52a573(0x205)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x52a573(0x225);var I=(_0x2cf7e1=>(_0x2cf7e1[_0x2cf7e1[_0x52a573(0x23e)]=0x0]=_0x52a573(0x23e),_0x2cf7e1[_0x2cf7e1[_0x52a573(0x1f8)]=0x1]=_0x52a573(0x1f8),_0x2cf7e1[_0x2cf7e1[_0x52a573(0x1e2)]=-0x1]='UNRECOGNIZED',_0x2cf7e1))(I||{}),v=(_0x79f5b6=>(_0x79f5b6[_0x79f5b6[_0x52a573(0x207)]=0x0]=_0x52a573(0x207),_0x79f5b6[_0x79f5b6[_0x52a573(0x1f4)]=0x1]='Add',_0x79f5b6[_0x79f5b6[_0x52a573(0x22d)]=0x2]=_0x52a573(0x22d),_0x79f5b6[_0x79f5b6[_0x52a573(0x211)]=0x3]='Edit',_0x79f5b6[_0x79f5b6['Delete']=0x4]='Delete',_0x79f5b6[_0x79f5b6[_0x52a573(0x1e9)]=0x5]=_0x52a573(0x1e9),_0x79f5b6[_0x79f5b6['UNRECOGNIZED']=-0x1]=_0x52a573(0x1e2),_0x79f5b6))(v||{});const f=_0x1198c2=>c[_0x52a573(0x20f)](new Date(+_0x1198c2))[_0x52a573(0x233)](_0x52a573(0x21d)),R=async(_0x51ad37,_0xf15889)=>{const _0x58788f=_0x52a573,_0x5a6b59=_0x51ad37[_0x58788f(0x1d7)](c['UserManagerService']),_0x234ed4=_0x51ad37['get'](P['HTTPService']);_0xf15889['forEach'](_0x506aeb=>{const _0xa4918e=_0x58788f;_0x5a6b59[_0xa4918e(0x1f3)](_0x506aeb)&&_0xf15889[_0xa4918e(0x1d3)](_0x506aeb);}),_0xf15889[_0x58788f(0x222)]&&(await _0x234ed4[_0x58788f(0x1d7)](_0x58788f(0x204),{'params':{'userIDs':[..._0xf15889]}}))[_0x58788f(0x232)][_0x58788f(0x206)][_0x58788f(0x1e5)](_0xf9ca=>{const _0x446a12=_0x58788f;_0xf9ca&&_0x5a6b59[_0x446a12(0x23c)](_0xf9ca);});};var $=Object[_0x52a573(0x21f)],E=(_0x5bf21f,_0x30803b,_0x46fa19,_0x3d3738)=>{const _0x5bdcff=_0x52a573;for(var _0x16a938=_0x3d3738>0x1?void 0x0:_0x3d3738?$(_0x30803b,_0x46fa19):_0x30803b,_0x722050=_0x5bf21f[_0x5bdcff(0x1e3)]-0x1,_0x353a3b;_0x722050>=0x0;_0x722050--)(_0x353a3b=_0x5bf21f[_0x722050])&&(_0x16a938=_0x353a3b(_0x16a938)||_0x16a938);return _0x16a938;},S=(_0x3356fd,_0x2d6c00)=>(_0x25a008,_0x134064)=>_0x2d6c00(_0x25a008,_0x134064,_0x3356fd);let _=class extends c[_0x52a573(0x23b)]{constructor(_0x981e09,_0x221f99,_0x4dc5de,_0x49b8ce){const _0x13045d=_0x52a573;super(),this[_0x13045d(0x1d6)]=_0x981e09,this['_threadCommentModel']=_0x221f99,this['_userService']=_0x4dc5de,this[_0x13045d(0x1cd)]=_0x49b8ce,this[_0x13045d(0x1e0)](),this[_0x13045d(0x1db)]();}[_0x52a573(0x1db)](){const _0x33283b=_0x52a573;this[_0x33283b(0x1d2)](this['_threadCommentModel'][_0x33283b(0x228)]['pipe'](j['bufferTime'](0x10))['subscribe'](_0x820741=>{const _0x437f32=_0x33283b,_0x4d9e04=new Set();_0x820741[_0x437f32(0x1e5)](_0x306e57=>{const _0x34daea=_0x437f32;if(_0x306e57[_0x34daea(0x20e)]===_0x34daea(0x236)){const _0x2486e9=_0x306e57['payload'][_0x34daea(0x1d9)];_0x4d9e04['add'](_0x2486e9);}}),R(this[_0x437f32(0x1cd)],_0x4d9e04);}));}['_init'](){const _0x4347c1=_0x52a573;this[_0x4347c1(0x1d2)](this[_0x4347c1(0x1d6)][_0x4347c1(0x228)][_0x4347c1(0x223)](async _0x32556b=>{const _0x44cb02=_0x4347c1;var _0x1fcf69,_0x5c3ab2,_0x111334,_0x4ec98c;const _0x138744=(_0x1fcf69=this[_0x44cb02(0x220)]['getUnit'](_0x32556b['unitId'])[_0x44cb02(0x1fa)](_0x324120=>_0x324120[_0x44cb02(0x1ee)]===_0x32556b[_0x44cb02(0x1ee)]))==null?void 0x0:_0x1fcf69[_0x44cb02(0x1ec)];if(!_0x138744)return;const {unitId:_0x1b831e,subUnitId:_0x3f0e17}=_0x138744;switch(_0x32556b[_0x44cb02(0x1ea)]&&this[_0x44cb02(0x1fc)][_0x44cb02(0x23c)](_0x32556b[_0x44cb02(0x1ea)]),_0x32556b['type']){case v[_0x44cb02(0x1f4)]:break;case v[_0x44cb02(0x22d)]:{this[_0x44cb02(0x220)][_0x44cb02(0x23a)](_0x1b831e,_0x3f0e17,{'unitId':_0x1b831e,'subUnitId':_0x3f0e17,'ref':'','id':_0x32556b[_0x44cb02(0x202)],'dT':f(+_0x32556b[_0x44cb02(0x1e1)]),'threadId':_0x32556b[_0x44cb02(0x1ee)],'personId':(_0x111334=(_0x5c3ab2=_0x32556b[_0x44cb02(0x1ea)])==null?void 0x0:_0x5c3ab2[_0x44cb02(0x210)])!=null?_0x111334:_0x32556b['userId'],'text':JSON['parse'](_0x32556b['content']),'parentId':_0x138744['id']});break;}case v[_0x44cb02(0x1e6)]:{const _0x3ba2f3=this[_0x44cb02(0x220)][_0x44cb02(0x218)](_0x1b831e,_0x3f0e17,_0x32556b[_0x44cb02(0x202)]);_0x3ba2f3&&_0x3ba2f3['parentId']&&this[_0x44cb02(0x220)]['deleteComment'](_0x1b831e,_0x3f0e17,_0x32556b[_0x44cb02(0x202)]);break;}case v['Edit']:{this[_0x44cb02(0x220)]['updateComment'](_0x1b831e,_0x3f0e17,{'commentId':_0x32556b[_0x44cb02(0x202)],'text':JSON[_0x44cb02(0x235)](_0x32556b['content'])});break;}case v[_0x44cb02(0x1e9)]:{const _0x45243c=(_0x4ec98c=this['_threadCommentModel'][_0x44cb02(0x1d8)](_0x32556b[_0x44cb02(0x229)])[_0x44cb02(0x1fa)](_0x1ccc9a=>_0x1ccc9a[_0x44cb02(0x1ee)]===_0x32556b['threadId']))==null?void 0x0:_0x4ec98c[_0x44cb02(0x1ec)];_0x45243c&&this[_0x44cb02(0x220)][_0x44cb02(0x1f6)](_0x1b831e,_0x3f0e17,_0x45243c['id'],_0x32556b[_0x44cb02(0x230)]===I[_0x44cb02(0x1f8)]);break;}}}));}};_=E([S(0x0,c[_0x52a573(0x1d1)](b[_0x52a573(0x1e4)])),S(0x1,c[_0x52a573(0x1d1)](M[_0x52a573(0x238)])),S(0x2,c[_0x52a573(0x1d1)](c[_0x52a573(0x1f2)])),S(0x3,c[_0x52a573(0x1d1)](c[_0x52a573(0x1de)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x52a573(0x21f)],x=(_0x42ad20,_0x56f843,_0x4d43b2,_0x43fc74)=>{const _0x46d6cb=_0x52a573;for(var _0x47d702=_0x43fc74>0x1?void 0x0:_0x43fc74?A(_0x56f843,_0x4d43b2):_0x56f843,_0x23ce9f=_0x42ad20[_0x46d6cb(0x1e3)]-0x1,_0x23a1ac;_0x23ce9f>=0x0;_0x23ce9f--)(_0x23a1ac=_0x42ad20[_0x23ce9f])&&(_0x47d702=_0x23a1ac(_0x47d702)||_0x47d702);return _0x47d702;},C=(_0x31c4e6,_0xf0b25e)=>(_0x22b64d,_0x3130ce)=>_0xf0b25e(_0x22b64d,_0x3130ce,_0x31c4e6);function Y(_0x2bcb0a,_0x1623e0){const _0x722a3d=_0x52a573,_0x5ea73a=_0x2bcb0a['replies'][0x0];return{..._0x1623e0,'id':_0x5ea73a[_0x722a3d(0x202)],'resolved':_0x2bcb0a[_0x722a3d(0x230)]===0x1,'dT':f(_0x5ea73a[_0x722a3d(0x1e1)]),'personId':_0x5ea73a['userId'],'threadId':_0x5ea73a[_0x722a3d(0x1ee)]};}function G(_0x34cb52,_0x44b60c,_0x230551){const _0x47b125=_0x52a573;var _0x13e58,_0x4100ac;if(((_0x4100ac=(_0x13e58=_0x34cb52==null?void 0x0:_0x34cb52[_0x47b125(0x22f)])==null?void 0x0:_0x13e58[_0x47b125(0x1e3)])!=null?_0x4100ac:0x0)>0x0){const _0x524228=(_0x2406e8,_0x1ab767)=>({'id':_0x2406e8[_0x47b125(0x202)],'threadId':_0x2406e8['threadId'],'dT':f(_0x2406e8[_0x47b125(0x1e1)]),'personId':_0x2406e8['userId'],'resolved':_0x34cb52[_0x47b125(0x230)]===I[_0x47b125(0x1f8)],'unitId':_0x44b60c,'subUnitId':_0x230551,'text':JSON[_0x47b125(0x235)](_0x2406e8[_0x47b125(0x1dc)]),'parentId':_0x1ab767}),_0x2d72cd=_0x524228(_0x34cb52[_0x47b125(0x22f)][0x0]);return{..._0x2d72cd,'children':_0x34cb52[_0x47b125(0x22f)][_0x47b125(0x22b)](0x1)[_0x47b125(0x227)](_0x440461=>_0x524228(_0x440461,_0x2d72cd['id']))};}return null;}function _0x5888(){const _0x127bed=['_threadCommentModel','saveCommentToSnapshot','size','subscribe','code','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','merge','map','commentUpdate$','unitId','_configService','slice','dataSource','Reply','_threadCommentDataSourceService','replies','solved','getCurrentUser','body','format','comments','parse','add','/list','ThreadCommentModel','UniverInstanceType','addComment','Disposable','addUser','HTTPService','OpenOrReOpen','705078giEuRB','rangeId','_injector','/universer-api/comment/unit/','UniverThreadCommentDataSourcePlugin','rangeType','Inject','disposeWithMe','delete','Plugin','_httpService','_commentService','get','getUnit','personId','post','_initUserSync','content','COMMENT','Injector','updateComment','_init','createTimestamp','UNRECOGNIZED','length','CommentService','forEach','Delete','values','610824xUZmsn','Solve','user','12ImFSbS','root','stringify','threadId','requireSession','CustomRangeType','ref','UserManagerService','getUser','Add','getMemberID','resolveComment','/reply','Solved','4395tebknm','find','2517417iVVhBM','_userService','/edit','98672PspuAq','customRanges','_config','2580605iHoYca','replyId','UniverCollaborationClientPlugin','/universer-api/user/list','defineProperty','users','Unknown','389010qVYESq','setConfig','_sessionService','comment','UniverLicensePlugin','_initDataSource','type','dayjs','userID','Edit','reply','error','filter','syncUpdateMutationToColla','resolved','listComments','getComment','UNIVER_UNKNOWN','DependentOn','onReady','/delete','YYYY/MM/DD\x20HH:mm','symbol','getOwnPropertyDescriptor'];_0x5888=function(){return _0x127bed;};return _0x5888();}let p=class{constructor(_0x26136d,_0x438b76,_0x582a3b){const _0x101747=_0x52a573;this[_0x101747(0x1d5)]=_0x26136d,this[_0x101747(0x1fc)]=_0x438b76,this[_0x101747(0x20a)]=_0x582a3b;}async['addComment'](_0x105cf1){const _0x472bc6=_0x52a573;var _0x2e4846,_0xb11f14;const {parentId:_0x23aaed,unitId:_0x3d2494,text:_0x594aeb,threadId:_0x17d0c7}=_0x105cf1,_0xa886a6=(_0xb11f14=(_0x2e4846=_0x594aeb['customRanges'])==null?void 0x0:_0x2e4846[_0x472bc6(0x214)](_0x2d67b0=>_0x2d67b0[_0x472bc6(0x1d0)]===c[_0x472bc6(0x1f0)][_0x472bc6(0x1dd)])[_0x472bc6(0x227)](_0x428501=>_0x428501[_0x472bc6(0x1cc)]))!=null?_0xb11f14:[],_0x1bbf4d=JSON['stringify'](_0x594aeb),_0x460384=(await this[_0x472bc6(0x20a)][_0x472bc6(0x1ef)](_0x3d2494))['getMemberID']();if(_0x23aaed){const _0x11587f={'memberId':_0x460384,'unitId':_0x3d2494,'content':_0x1bbf4d,'mention':_0xa886a6,'threadId':_0x17d0c7},_0x2f2a35=(await this['_httpService']['post'](_0x472bc6(0x1ce)+_0x3d2494+_0x472bc6(0x1f7),{'body':_0x11587f}))[_0x472bc6(0x232)][_0x472bc6(0x212)];return{..._0x105cf1,'id':_0x2f2a35[_0x472bc6(0x202)],'dT':c['dayjs'](+_0x2f2a35[_0x472bc6(0x1e1)])['format'](_0x472bc6(0x21d)),'personId':_0x2f2a35['userId']};}else{const _0x3947e7={'memberId':_0x460384,'unitId':_0x3d2494,'content':_0x1bbf4d,'mention':_0xa886a6},_0x486fd6=await this['_httpService']['post'](_0x472bc6(0x1ce)+_0x3d2494+'/add',{'body':_0x3947e7});return Y(_0x486fd6[_0x472bc6(0x232)][_0x472bc6(0x20b)],_0x105cf1);}}async[_0x52a573(0x1df)](_0x30d069){const _0x186477=_0x52a573;var _0x3562dd,_0x4029da;const {text:_0x3d3c1e,unitId:_0x2f9937}=_0x30d069,_0x348035=(_0x4029da=(_0x3562dd=_0x3d3c1e[_0x186477(0x1ff)])==null?void 0x0:_0x3562dd[_0x186477(0x214)](_0x3f34ba=>_0x3f34ba[_0x186477(0x1d0)]===c[_0x186477(0x1f0)][_0x186477(0x1dd)])['map'](_0x56e793=>_0x56e793[_0x186477(0x1cc)]))!=null?_0x4029da:[],_0x4736b2=JSON[_0x186477(0x1ed)](_0x3d3c1e),_0x2d0d28=_0x30d069[_0x186477(0x1ee)],_0xf64ed=_0x30d069['id'],_0xb6e203={'memberId':(await this['_sessionService'][_0x186477(0x1ef)](_0x2f9937))[_0x186477(0x1f5)](),'unitId':_0x2f9937,'threadId':_0x2d0d28,'mention':_0x348035,'content':_0x4736b2,'replyId':_0xf64ed},_0x4d767b=await this[_0x186477(0x1d5)][_0x186477(0x1da)]('/universer-api/comment/unit/'+_0x2f9937+_0x186477(0x1fd),{'body':_0xb6e203});return!_0x4d767b['body']['error']||_0x4d767b[_0x186477(0x232)][_0x186477(0x213)]['code']===0x1;}async[_0x52a573(0x1f6)](_0x41a580){const _0x51dd9c=_0x52a573,{unitId:_0x4d3f7f}=_0x41a580,_0x53acc2=_0x41a580['threadId'],_0x31bbfc={'memberId':this[_0x51dd9c(0x1fc)][_0x51dd9c(0x231)]()[_0x51dd9c(0x210)],'unitId':_0x4d3f7f,'threadId':_0x53acc2,'solved':_0x41a580[_0x51dd9c(0x216)]?I[_0x51dd9c(0x1f8)]:I['OpenOrReOpen']},_0x55edcc=await this[_0x51dd9c(0x1d5)][_0x51dd9c(0x1da)](_0x51dd9c(0x1ce)+_0x4d3f7f+'/solved',{'body':_0x31bbfc});return!_0x55edcc[_0x51dd9c(0x232)][_0x51dd9c(0x213)]||_0x55edcc['body'][_0x51dd9c(0x213)][_0x51dd9c(0x224)]===0x1;}async['deleteComment'](_0x51e6b5,_0x1443db,_0x436f5b,_0x4a8a9f){const _0x3c7521=_0x52a573,_0x511647={'memberId':(await this[_0x3c7521(0x20a)][_0x3c7521(0x1ef)](_0x51e6b5))['getMemberID'](),'threadId':_0x436f5b,'replyId':_0x4a8a9f,'unitId':_0x51e6b5},_0x475002=await this[_0x3c7521(0x1d5)][_0x3c7521(0x1da)](_0x3c7521(0x1ce)+_0x51e6b5+_0x3c7521(0x21c),{'body':_0x511647});return!_0x475002[_0x3c7521(0x232)][_0x3c7521(0x213)]||_0x475002[_0x3c7521(0x232)][_0x3c7521(0x213)][_0x3c7521(0x224)]===0x1;}async[_0x52a573(0x217)](_0x5bb6e7,_0x16c25c,_0x3ca593){const _0x2af8bf=_0x52a573,_0x3b3610={'unitId':_0x5bb6e7,'threadId':_0x3ca593},_0x51610c=await this[_0x2af8bf(0x1d5)][_0x2af8bf(0x1da)](_0x2af8bf(0x1ce)+_0x5bb6e7+_0x2af8bf(0x237),{'body':_0x3b3610}),_0x19ac79=_0x3ca593['map'](_0x2744af=>G(_0x51610c[_0x2af8bf(0x232)][_0x2af8bf(0x234)][_0x2744af],_0x5bb6e7,_0x16c25c))[_0x2af8bf(0x214)](Boolean);return Object[_0x2af8bf(0x1e7)](_0x51610c[_0x2af8bf(0x232)]['users'])[_0x2af8bf(0x1e5)](_0x18f533=>{const _0x5ea897=_0x2af8bf;this[_0x5ea897(0x1fc)][_0x5ea897(0x23c)](_0x18f533);}),_0x19ac79;}[_0x52a573(0x221)](_0x1491af){const _0x44578c=_0x52a573;return{'id':_0x1491af['id'],'threadId':_0x1491af['threadId'],'ref':_0x1491af[_0x44578c(0x1f1)]};}};p=x([C(0x0,c['Inject'](P[_0x52a573(0x23d)])),C(0x1,c[_0x52a573(0x1d1)](c[_0x52a573(0x1f2)])),C(0x2,c[_0x52a573(0x1d1)](b['CollaborationSessionService']))],p);var H=Object[_0x52a573(0x21f)],J=(_0x323704,_0x1cb5c0,_0x39308b,_0x4f0c81)=>{for(var _0x4af674=_0x4f0c81>0x1?void 0x0:_0x4f0c81?H(_0x1cb5c0,_0x39308b):_0x1cb5c0,_0x5edf44=_0x323704['length']-0x1,_0x4521ed;_0x5edf44>=0x0;_0x5edf44--)(_0x4521ed=_0x323704[_0x5edf44])&&(_0x4af674=_0x4521ed(_0x4af674)||_0x4af674);return _0x4af674;},y=(_0x58271a,_0x54c69d)=>(_0x26a1ce,_0x4c996d)=>_0x54c69d(_0x26a1ce,_0x4c996d,_0x58271a);let g=class extends c[_0x52a573(0x23b)]{constructor(_0x346dce,_0x4639b6){const _0x6d0ce1=_0x52a573;super(),this[_0x6d0ce1(0x22e)]=_0x346dce,this['_threadCommentDataSource']=_0x4639b6,this['_initDataSource']();}[_0x52a573(0x20d)](){const _0x264420=_0x52a573;this[_0x264420(0x22e)][_0x264420(0x22c)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x264420(0x215)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x52a573(0x1d1)](p))],g);var F=Object[_0x52a573(0x205)],L=Object[_0x52a573(0x21f)],Z=(_0x42d6b0,_0x286072,_0x4afd03)=>_0x286072 in _0x42d6b0?F(_0x42d6b0,_0x286072,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4afd03}):_0x42d6b0[_0x286072]=_0x4afd03,W=(_0x39fa73,_0x25f1b7,_0x1b3539,_0x963310)=>{const _0xda9d37=_0x52a573;for(var _0x217003=_0x963310>0x1?void 0x0:_0x963310?L(_0x25f1b7,_0x1b3539):_0x25f1b7,_0x2659bb=_0x39fa73[_0xda9d37(0x1e3)]-0x1,_0x1c8b92;_0x2659bb>=0x0;_0x2659bb--)(_0x1c8b92=_0x39fa73[_0x2659bb])&&(_0x217003=_0x1c8b92(_0x217003)||_0x217003);return _0x217003;},O=(_0x1c150a,_0x4b1ab3)=>(_0x149359,_0x15fcd5)=>_0x4b1ab3(_0x149359,_0x15fcd5,_0x1c150a),N=(_0x555bfd,_0x3a581c,_0x370540)=>Z(_0x555bfd,typeof _0x3a581c!=_0x52a573(0x21e)?_0x3a581c+'':_0x3a581c,_0x370540);exports[_0x52a573(0x1cf)]=class extends c[_0x52a573(0x1d4)]{constructor(_0x1369a7=D,_0x3c19dd,_0xa14201){const _0x1d493c=_0x52a573;super(),this[_0x1d493c(0x200)]=_0x1369a7,this[_0x1d493c(0x1cd)]=_0x3c19dd,this[_0x1d493c(0x22a)]=_0xa14201;const {..._0x1b53e1}=c[_0x1d493c(0x226)]({},D,this['_config']);this['_configService'][_0x1d493c(0x209)](q,_0x1b53e1);}['onStarting'](){const _0x2479a0=_0x52a573;[[p],[g],[_]][_0x2479a0(0x1e5)](_0x33fabb=>{const _0x4b67e2=_0x2479a0;this[_0x4b67e2(0x1cd)][_0x4b67e2(0x236)](_0x33fabb);});}[_0x52a573(0x21b)](){const _0x138fbb=_0x52a573;this[_0x138fbb(0x1cd)][_0x138fbb(0x1d7)](g),this[_0x138fbb(0x1cd)]['get'](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x52a573(0x1cf)],_0x52a573(0x20e),c[_0x52a573(0x239)][_0x52a573(0x219)]),exports[_0x52a573(0x1cf)]=W([c[_0x52a573(0x21a)](w['UniverThreadCommentUIPlugin'],b[_0x52a573(0x203)],T[_0x52a573(0x20c)]),O(0x1,c[_0x52a573(0x1d1)](c[_0x52a573(0x1de)])),O(0x2,c['IConfigService'])],exports[_0x52a573(0x1cf)]);
|
|
1
|
+
'use strict';const _0x4f5d82=_0xe2d6;(function(_0xc6f405,_0x2eacc0){const _0x46993d=_0xe2d6,_0x16adde=_0xc6f405();while(!![]){try{const _0x1dbda4=parseInt(_0x46993d(0xa2))/0x1*(parseInt(_0x46993d(0x86))/0x2)+-parseInt(_0x46993d(0xe0))/0x3*(parseInt(_0x46993d(0x6e))/0x4)+-parseInt(_0x46993d(0xa5))/0x5*(parseInt(_0x46993d(0x7d))/0x6)+parseInt(_0x46993d(0xa3))/0x7*(parseInt(_0x46993d(0xcc))/0x8)+parseInt(_0x46993d(0xb1))/0x9+parseInt(_0x46993d(0xde))/0xa*(-parseInt(_0x46993d(0x8d))/0xb)+parseInt(_0x46993d(0xa9))/0xc*(parseInt(_0x46993d(0xd7))/0xd);if(_0x1dbda4===_0x2eacc0)break;else _0x16adde['push'](_0x16adde['shift']());}catch(_0x2f44a8){_0x16adde['push'](_0x16adde['shift']());}}}(_0xf535,0xb42be));Object[_0x4f5d82(0xc2)](exports,Symbol['toStringTag'],{'value':_0x4f5d82(0xc9)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4f5d82(0xa4);var I=(_0x46704d=>(_0x46704d[_0x46704d['OpenOrReOpen']=0x0]=_0x4f5d82(0xa6),_0x46704d[_0x46704d[_0x4f5d82(0xbc)]=0x1]='Solved',_0x46704d[_0x46704d[_0x4f5d82(0x8e)]=-0x1]=_0x4f5d82(0x8e),_0x46704d))(I||{}),v=(_0x419383=>(_0x419383[_0x419383[_0x4f5d82(0xab)]=0x0]=_0x4f5d82(0xab),_0x419383[_0x419383[_0x4f5d82(0xbe)]=0x1]=_0x4f5d82(0xbe),_0x419383[_0x419383[_0x4f5d82(0x82)]=0x2]=_0x4f5d82(0x82),_0x419383[_0x419383[_0x4f5d82(0x72)]=0x3]='Edit',_0x419383[_0x419383[_0x4f5d82(0xce)]=0x4]=_0x4f5d82(0xce),_0x419383[_0x419383[_0x4f5d82(0xd6)]=0x5]='Solve',_0x419383[_0x419383[_0x4f5d82(0x8e)]=-0x1]='UNRECOGNIZED',_0x419383))(v||{});const f=_0x5a4df7=>c[_0x4f5d82(0x70)](new Date(+_0x5a4df7))[_0x4f5d82(0xa7)](_0x4f5d82(0xae)),R=async(_0x4257e5,_0x282d28)=>{const _0x5a03e3=_0x4f5d82,_0x12904d=_0x4257e5[_0x5a03e3(0x87)](c[_0x5a03e3(0x74)]),_0x27903a=_0x4257e5[_0x5a03e3(0x87)](P[_0x5a03e3(0xc3)]);_0x282d28[_0x5a03e3(0xe1)](_0x292278=>{const _0x2ae769=_0x5a03e3;_0x12904d['getUser'](_0x292278)&&_0x282d28[_0x2ae769(0xdd)](_0x292278);}),_0x282d28[_0x5a03e3(0x75)]&&(await _0x27903a[_0x5a03e3(0x87)](_0x5a03e3(0x90),{'params':{'userIDs':[..._0x282d28]}}))[_0x5a03e3(0xc8)]['users'][_0x5a03e3(0xe1)](_0x2d5380=>{const _0x55e795=_0x5a03e3;_0x2d5380&&_0x12904d[_0x55e795(0xac)](_0x2d5380);});};var $=Object[_0x4f5d82(0x8b)],E=(_0x30ed37,_0x51c580,_0x2fbeca,_0x578e65)=>{for(var _0x474877=_0x578e65>0x1?void 0x0:_0x578e65?$(_0x51c580,_0x2fbeca):_0x51c580,_0x18906b=_0x30ed37['length']-0x1,_0x2958ba;_0x18906b>=0x0;_0x18906b--)(_0x2958ba=_0x30ed37[_0x18906b])&&(_0x474877=_0x2958ba(_0x474877)||_0x474877);return _0x474877;},S=(_0xadaaa7,_0x537e57)=>(_0x30c35b,_0x30c876)=>_0x537e57(_0x30c35b,_0x30c876,_0xadaaa7);let _=class extends c[_0x4f5d82(0xc7)]{constructor(_0x5c20db,_0x468a13,_0x309b53,_0x55c153){const _0x1ddf9f=_0x4f5d82;super(),this['_commentService']=_0x5c20db,this[_0x1ddf9f(0x94)]=_0x468a13,this[_0x1ddf9f(0x88)]=_0x309b53,this['_injector']=_0x55c153,this[_0x1ddf9f(0xa1)](),this[_0x1ddf9f(0xd5)]();}[_0x4f5d82(0xd5)](){const _0x1e6b9d=_0x4f5d82;this[_0x1e6b9d(0xc5)](this[_0x1e6b9d(0x94)][_0x1e6b9d(0x78)][_0x1e6b9d(0xd2)](j[_0x1e6b9d(0x93)](0x10))['subscribe'](_0x5b0c8b=>{const _0x4c5089=_0x1e6b9d,_0x30672b=new Set();_0x5b0c8b[_0x4c5089(0xe1)](_0x2d0fac=>{const _0x487e14=_0x4c5089;if(_0x2d0fac['type']===_0x487e14(0x79)){const _0x4fec1f=_0x2d0fac['payload'][_0x487e14(0x9e)];_0x30672b['add'](_0x4fec1f);}}),R(this[_0x4c5089(0xdf)],_0x30672b);}));}[_0x4f5d82(0xa1)](){const _0x4cfaab=_0x4f5d82;this['disposeWithMe'](this['_commentService'][_0x4cfaab(0x78)][_0x4cfaab(0x9a)](async _0x1dd632=>{const _0x13d0c5=_0x4cfaab;var _0x4c94d1,_0x25123f,_0x3a5e9a,_0x170465;const _0x364758=(_0x4c94d1=this[_0x13d0c5(0x94)][_0x13d0c5(0xc4)](_0x1dd632[_0x13d0c5(0xcd)])['find'](_0x2dc282=>_0x2dc282[_0x13d0c5(0xbf)]===_0x1dd632['threadId']))==null?void 0x0:_0x4c94d1[_0x13d0c5(0xa0)];if(!_0x364758)return;const {unitId:_0x3995eb,subUnitId:_0x20148d}=_0x364758;switch(_0x1dd632['user']&&this[_0x13d0c5(0x88)][_0x13d0c5(0xac)](_0x1dd632[_0x13d0c5(0xb7)]),_0x1dd632[_0x13d0c5(0x7a)]){case v[_0x13d0c5(0xbe)]:break;case v[_0x13d0c5(0x82)]:{this[_0x13d0c5(0x94)]['addComment'](_0x3995eb,_0x20148d,{'unitId':_0x3995eb,'subUnitId':_0x20148d,'ref':'','id':_0x1dd632['replyId'],'dT':f(+_0x1dd632[_0x13d0c5(0x85)]),'threadId':_0x1dd632[_0x13d0c5(0xbf)],'personId':(_0x3a5e9a=(_0x25123f=_0x1dd632[_0x13d0c5(0xb7)])==null?void 0x0:_0x25123f[_0x13d0c5(0xda)])!=null?_0x3a5e9a:_0x1dd632[_0x13d0c5(0xdc)],'text':JSON[_0x13d0c5(0x6d)](_0x1dd632[_0x13d0c5(0xd9)]),'parentId':_0x364758['id']});break;}case v[_0x13d0c5(0xce)]:{const _0x6a0636=this[_0x13d0c5(0x94)][_0x13d0c5(0xb9)](_0x3995eb,_0x20148d,_0x1dd632[_0x13d0c5(0xbd)]);_0x6a0636&&_0x6a0636[_0x13d0c5(0x71)]&&this[_0x13d0c5(0x94)][_0x13d0c5(0x6b)](_0x3995eb,_0x20148d,_0x1dd632['replyId']);break;}case v[_0x13d0c5(0x72)]:{this[_0x13d0c5(0x94)][_0x13d0c5(0x9f)](_0x3995eb,_0x20148d,{'commentId':_0x1dd632[_0x13d0c5(0xbd)],'text':JSON[_0x13d0c5(0x6d)](_0x1dd632[_0x13d0c5(0xd9)])});break;}case v['Solve']:{const _0x15e160=(_0x170465=this[_0x13d0c5(0x94)][_0x13d0c5(0xc4)](_0x1dd632[_0x13d0c5(0xcd)])['find'](_0x48bfa0=>_0x48bfa0['threadId']===_0x1dd632['threadId']))==null?void 0x0:_0x170465[_0x13d0c5(0xa0)];_0x15e160&&this[_0x13d0c5(0x94)][_0x13d0c5(0xd4)](_0x3995eb,_0x20148d,_0x15e160['id'],_0x1dd632[_0x13d0c5(0x73)]===I[_0x13d0c5(0xbc)]);break;}}}));}};_=E([S(0x0,c[_0x4f5d82(0xd8)](b['CommentService'])),S(0x1,c[_0x4f5d82(0xd8)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x4f5d82(0x74)])),S(0x3,c[_0x4f5d82(0xd8)](c[_0x4f5d82(0xcb)]))],_);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x20880d,_0x310abc,_0x55d938,_0x20e15b)=>{const _0x297285=_0x4f5d82;for(var _0x42341a=_0x20e15b>0x1?void 0x0:_0x20e15b?A(_0x310abc,_0x55d938):_0x310abc,_0x4f65a5=_0x20880d[_0x297285(0x77)]-0x1,_0x49943a;_0x4f65a5>=0x0;_0x4f65a5--)(_0x49943a=_0x20880d[_0x4f65a5])&&(_0x42341a=_0x49943a(_0x42341a)||_0x42341a);return _0x42341a;},C=(_0x57d1ef,_0x5884a6)=>(_0x13e13d,_0x4859bb)=>_0x5884a6(_0x13e13d,_0x4859bb,_0x57d1ef);function _0xf535(){const _0x5a6ebe=['bufferTime','_threadCommentModel','rangeType','CustomRangeType','getMemberID','UniverThreadCommentDataSourcePlugin','symbol','subscribe','getCurrentUser','_sessionService','UniverInstanceType','personId','updateComment','root','_init','1076975JgjLJz','357uDZMjK','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','6797685AmUmRg','OpenOrReOpen','format','_config','5352fhaDJO','customRanges','Unknown','addUser','onStarting','YYYY/MM/DD\x20HH:mm','values','map','7997886gtvgFj','_httpService','_threadCommentDataSource','merge','DependentOn','COMMENT','user','onReady','getComment','/universer-api/comment/unit/','code','Solved','replyId','Add','threadId','IThreadCommentDataSourceService','UniverLicensePlugin','defineProperty','HTTPService','getUnit','disposeWithMe','ref','Disposable','body','Module','requireSession','Injector','227208wyzrte','unitId','Delete','pluginName','comments','users','pipe','_threadCommentDataSourceService','resolveComment','_initUserSync','Solve','3809pYAOAO','Inject','content','userID','/edit','userId','delete','423730WcfhDI','_injector','66VODRQT','forEach','_initDataSource','deleteComment','filter','parse','162980lglJGd','stringify','dayjs','parentId','Edit','solved','UserManagerService','size','listComments','length','commentUpdate$','add','type','replies','_configService','6fPILeA','rangeId','error','/delete','CollaborationSessionService','Reply','resolved','slice','createTimestamp','2pojOmY','get','_userService','UniverThreadCommentUIPlugin','dataSource','getOwnPropertyDescriptor','saveCommentToSnapshot','143Xzvcvw','UNRECOGNIZED','UNIVER_UNKNOWN','/universer-api/user/list','post','/list'];_0xf535=function(){return _0x5a6ebe;};return _0xf535();}function _0xe2d6(_0x139a0c,_0x387bd4){_0x139a0c=_0x139a0c-0x6a;const _0xf535a1=_0xf535();let _0xe2d6c5=_0xf535a1[_0x139a0c];return _0xe2d6c5;}function Y(_0x3bac91,_0x2badd0){const _0x559d08=_0x4f5d82,_0x489f95=_0x3bac91[_0x559d08(0x7b)][0x0];return{..._0x2badd0,'id':_0x489f95[_0x559d08(0xbd)],'resolved':_0x3bac91[_0x559d08(0x73)]===0x1,'dT':f(_0x489f95[_0x559d08(0x85)]),'personId':_0x489f95[_0x559d08(0xdc)],'threadId':_0x489f95[_0x559d08(0xbf)]};}function G(_0x14adf5,_0x1b9034,_0x248c66){const _0x52bc6c=_0x4f5d82;var _0x1eeb7d,_0x5584b8;if(((_0x5584b8=(_0x1eeb7d=_0x14adf5==null?void 0x0:_0x14adf5[_0x52bc6c(0x7b)])==null?void 0x0:_0x1eeb7d[_0x52bc6c(0x77)])!=null?_0x5584b8:0x0)>0x0){const _0x29c9ba=(_0x594ebe,_0x1644ce)=>({'id':_0x594ebe[_0x52bc6c(0xbd)],'threadId':_0x594ebe[_0x52bc6c(0xbf)],'dT':f(_0x594ebe[_0x52bc6c(0x85)]),'personId':_0x594ebe[_0x52bc6c(0xdc)],'resolved':_0x14adf5[_0x52bc6c(0x73)]===I[_0x52bc6c(0xbc)],'unitId':_0x1b9034,'subUnitId':_0x248c66,'text':JSON[_0x52bc6c(0x6d)](_0x594ebe[_0x52bc6c(0xd9)]),'parentId':_0x1644ce}),_0x5afacd=_0x29c9ba(_0x14adf5[_0x52bc6c(0x7b)][0x0]);return{..._0x5afacd,'children':_0x14adf5[_0x52bc6c(0x7b)][_0x52bc6c(0x84)](0x1)['map'](_0x213ae9=>_0x29c9ba(_0x213ae9,_0x5afacd['id']))};}return null;}let p=class{constructor(_0x12eed7,_0x160e5d,_0x528b68){const _0x439388=_0x4f5d82;this[_0x439388(0xb2)]=_0x12eed7,this[_0x439388(0x88)]=_0x160e5d,this[_0x439388(0x9c)]=_0x528b68;}async['addComment'](_0x1eebf2){const _0x42f851=_0x4f5d82;var _0x38cce8,_0x377ddc;const {parentId:_0x31a327,unitId:_0x259262,text:_0x34336b,threadId:_0x40e57f}=_0x1eebf2,_0x556538=(_0x377ddc=(_0x38cce8=_0x34336b['customRanges'])==null?void 0x0:_0x38cce8[_0x42f851(0x6c)](_0x6b9fd4=>_0x6b9fd4['rangeType']===c[_0x42f851(0x96)][_0x42f851(0xb6)])[_0x42f851(0xb0)](_0x114b92=>_0x114b92[_0x42f851(0x7e)]))!=null?_0x377ddc:[],_0xf7e789=JSON[_0x42f851(0x6f)](_0x34336b),_0x120d12=(await this['_sessionService'][_0x42f851(0xca)](_0x259262))[_0x42f851(0x97)]();if(_0x31a327){const _0x2b1f09={'memberId':_0x120d12,'unitId':_0x259262,'content':_0xf7e789,'mention':_0x556538,'threadId':_0x40e57f},_0xdaa8d8=(await this[_0x42f851(0xb2)][_0x42f851(0x91)](_0x42f851(0xba)+_0x259262+'/reply',{'body':_0x2b1f09}))[_0x42f851(0xc8)]['reply'];return{..._0x1eebf2,'id':_0xdaa8d8[_0x42f851(0xbd)],'dT':c['dayjs'](+_0xdaa8d8[_0x42f851(0x85)])[_0x42f851(0xa7)](_0x42f851(0xae)),'personId':_0xdaa8d8['userId']};}else{const _0xd406e6={'memberId':_0x120d12,'unitId':_0x259262,'content':_0xf7e789,'mention':_0x556538},_0x4fdfca=await this['_httpService'][_0x42f851(0x91)]('/universer-api/comment/unit/'+_0x259262+'/add',{'body':_0xd406e6});return Y(_0x4fdfca[_0x42f851(0xc8)]['comment'],_0x1eebf2);}}async['updateComment'](_0x366375){const _0x242645=_0x4f5d82;var _0x4d0700,_0x2f9ddf;const {text:_0x18e31f,unitId:_0xed1719}=_0x366375,_0x353b16=(_0x2f9ddf=(_0x4d0700=_0x18e31f[_0x242645(0xaa)])==null?void 0x0:_0x4d0700['filter'](_0x1e3869=>_0x1e3869[_0x242645(0x95)]===c[_0x242645(0x96)]['COMMENT'])[_0x242645(0xb0)](_0x133419=>_0x133419[_0x242645(0x7e)]))!=null?_0x2f9ddf:[],_0x1eaa33=JSON[_0x242645(0x6f)](_0x18e31f),_0x2ccdb8=_0x366375[_0x242645(0xbf)],_0x22a956=_0x366375['id'],_0x71658a={'memberId':(await this[_0x242645(0x9c)][_0x242645(0xca)](_0xed1719))['getMemberID'](),'unitId':_0xed1719,'threadId':_0x2ccdb8,'mention':_0x353b16,'content':_0x1eaa33,'replyId':_0x22a956},_0x42b189=await this[_0x242645(0xb2)][_0x242645(0x91)](_0x242645(0xba)+_0xed1719+_0x242645(0xdb),{'body':_0x71658a});return!_0x42b189[_0x242645(0xc8)]['error']||_0x42b189[_0x242645(0xc8)][_0x242645(0x7f)][_0x242645(0xbb)]===0x1;}async[_0x4f5d82(0xd4)](_0x5f547c){const _0x5a2b89=_0x4f5d82,{unitId:_0x1053ce}=_0x5f547c,_0x26ef72=_0x5f547c[_0x5a2b89(0xbf)],_0x36ae0e={'memberId':this[_0x5a2b89(0x88)][_0x5a2b89(0x9b)]()[_0x5a2b89(0xda)],'unitId':_0x1053ce,'threadId':_0x26ef72,'solved':_0x5f547c[_0x5a2b89(0x83)]?I['Solved']:I[_0x5a2b89(0xa6)]},_0x51417f=await this[_0x5a2b89(0xb2)]['post']('/universer-api/comment/unit/'+_0x1053ce+'/solved',{'body':_0x36ae0e});return!_0x51417f[_0x5a2b89(0xc8)][_0x5a2b89(0x7f)]||_0x51417f[_0x5a2b89(0xc8)][_0x5a2b89(0x7f)][_0x5a2b89(0xbb)]===0x1;}async[_0x4f5d82(0x6b)](_0x464b6b,_0x4094b1,_0x2d560e,_0xf954d2){const _0x995937=_0x4f5d82,_0x5f42c7={'memberId':(await this[_0x995937(0x9c)][_0x995937(0xca)](_0x464b6b))['getMemberID'](),'threadId':_0x2d560e,'replyId':_0xf954d2,'unitId':_0x464b6b},_0x5e2e46=await this[_0x995937(0xb2)]['post'](_0x995937(0xba)+_0x464b6b+_0x995937(0x80),{'body':_0x5f42c7});return!_0x5e2e46[_0x995937(0xc8)]['error']||_0x5e2e46['body'][_0x995937(0x7f)]['code']===0x1;}async[_0x4f5d82(0x76)](_0x1f4017,_0x31ea29,_0x5efbd9){const _0x5795c9=_0x4f5d82,_0x32ed2f={'unitId':_0x1f4017,'threadId':_0x5efbd9},_0x23ecd4=await this[_0x5795c9(0xb2)][_0x5795c9(0x91)](_0x5795c9(0xba)+_0x1f4017+_0x5795c9(0x92),{'body':_0x32ed2f}),_0x2b2763=_0x5efbd9['map'](_0x2b475d=>G(_0x23ecd4[_0x5795c9(0xc8)][_0x5795c9(0xd0)][_0x2b475d],_0x1f4017,_0x31ea29))[_0x5795c9(0x6c)](Boolean);return Object[_0x5795c9(0xaf)](_0x23ecd4[_0x5795c9(0xc8)][_0x5795c9(0xd1)])[_0x5795c9(0xe1)](_0xa87dec=>{const _0x2ce8c8=_0x5795c9;this['_userService'][_0x2ce8c8(0xac)](_0xa87dec);}),_0x2b2763;}[_0x4f5d82(0x8c)](_0x5a57d2){const _0x3c519a=_0x4f5d82;return{'id':_0x5a57d2['id'],'threadId':_0x5a57d2[_0x3c519a(0xbf)],'ref':_0x5a57d2[_0x3c519a(0xc6)]};}};p=x([C(0x0,c['Inject'](P[_0x4f5d82(0xc3)])),C(0x1,c[_0x4f5d82(0xd8)](c[_0x4f5d82(0x74)])),C(0x2,c['Inject'](b[_0x4f5d82(0x81)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x1adfee,_0x4ab667,_0x2e8c43,_0x3bbb9b)=>{const _0x2bbfbd=_0x4f5d82;for(var _0x36a4d0=_0x3bbb9b>0x1?void 0x0:_0x3bbb9b?H(_0x4ab667,_0x2e8c43):_0x4ab667,_0x34b92a=_0x1adfee[_0x2bbfbd(0x77)]-0x1,_0x3e9723;_0x34b92a>=0x0;_0x34b92a--)(_0x3e9723=_0x1adfee[_0x34b92a])&&(_0x36a4d0=_0x3e9723(_0x36a4d0)||_0x36a4d0);return _0x36a4d0;},y=(_0x360761,_0x5728aa)=>(_0x52970b,_0x4df13b)=>_0x5728aa(_0x52970b,_0x4df13b,_0x360761);let g=class extends c[_0x4f5d82(0xc7)]{constructor(_0x9c5950,_0x13f590){const _0x23ff3a=_0x4f5d82;super(),this[_0x23ff3a(0xd3)]=_0x9c5950,this[_0x23ff3a(0xb3)]=_0x13f590,this[_0x23ff3a(0x6a)]();}[_0x4f5d82(0x6a)](){const _0x34010f=_0x4f5d82;this[_0x34010f(0xd3)][_0x34010f(0x8a)]=this[_0x34010f(0xb3)],this[_0x34010f(0xd3)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4f5d82(0xc0)]),y(0x1,c[_0x4f5d82(0xd8)](p))],g);var F=Object[_0x4f5d82(0xc2)],L=Object[_0x4f5d82(0x8b)],Z=(_0x1f1ef8,_0x490309,_0x388e38)=>_0x490309 in _0x1f1ef8?F(_0x1f1ef8,_0x490309,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x388e38}):_0x1f1ef8[_0x490309]=_0x388e38,W=(_0xcac7fb,_0x56a5dc,_0x411aa5,_0x2e0460)=>{const _0x27bb44=_0x4f5d82;for(var _0x2846ef=_0x2e0460>0x1?void 0x0:_0x2e0460?L(_0x56a5dc,_0x411aa5):_0x56a5dc,_0x142ab7=_0xcac7fb[_0x27bb44(0x77)]-0x1,_0x49d41a;_0x142ab7>=0x0;_0x142ab7--)(_0x49d41a=_0xcac7fb[_0x142ab7])&&(_0x2846ef=_0x49d41a(_0x2846ef)||_0x2846ef);return _0x2846ef;},O=(_0x5a867a,_0x1c0c5b)=>(_0xc8e5f4,_0x3b8719)=>_0x1c0c5b(_0xc8e5f4,_0x3b8719,_0x5a867a),N=(_0x4d06d0,_0x3f074f,_0x13dd63)=>Z(_0x4d06d0,typeof _0x3f074f!=_0x4f5d82(0x99)?_0x3f074f+'':_0x3f074f,_0x13dd63);exports[_0x4f5d82(0x98)]=class extends c['Plugin']{constructor(_0x341d2a=D,_0x45436f,_0x143fb8){const _0x114186=_0x4f5d82;super(),this[_0x114186(0xa8)]=_0x341d2a,this[_0x114186(0xdf)]=_0x45436f,this[_0x114186(0x7c)]=_0x143fb8;const {..._0x3e3563}=c[_0x114186(0xb4)]({},D,this[_0x114186(0xa8)]);this[_0x114186(0x7c)]['setConfig'](q,_0x3e3563);}[_0x4f5d82(0xad)](){const _0x26c372=_0x4f5d82;[[p],[g],[_]][_0x26c372(0xe1)](_0x2b8fe7=>{const _0x1b8393=_0x26c372;this[_0x1b8393(0xdf)][_0x1b8393(0x79)](_0x2b8fe7);});}[_0x4f5d82(0xb8)](){const _0x3825d8=_0x4f5d82;this[_0x3825d8(0xdf)][_0x3825d8(0x87)](g),this[_0x3825d8(0xdf)][_0x3825d8(0x87)](_);}},N(exports[_0x4f5d82(0x98)],_0x4f5d82(0xcf),U),N(exports[_0x4f5d82(0x98)],_0x4f5d82(0x7a),c[_0x4f5d82(0x9d)][_0x4f5d82(0x8f)]),exports[_0x4f5d82(0x98)]=W([c[_0x4f5d82(0xb5)](w[_0x4f5d82(0x89)],b['UniverCollaborationClientPlugin'],T[_0x4f5d82(0xc1)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x4f5d82(0x98)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4218c7=_0x716a;function _0x143e(){const _0x2e092c=['/reply','resolved','requireSession','UNIVER_UNKNOWN','Add','UNRECOGNIZED','getOwnPropertyDescriptor','stringify','length','YYYY/MM/DD\x20HH:mm','format','comment','getUnit','/universer-api/comment/unit/','reply','resolveComment','saveCommentToSnapshot','customRanges','643811mmZbrK','size','type','_injector','getMemberID','addComment','Reply','map','Edit','find','body','dataSource','user','_init','threadId','COMMENT','862816yktXXt','userID','_userService','subscribe','listComments','get','481182oAhgvD','_initDataSource','178518mcZgEn','_httpService','552290xJhAoJ','commentUpdate$','values','userId','addUser','109122pfBiZs','_configService','OpenOrReOpen','/solved','_threadCommentDataSourceService','onReady','deleteComment','replyId','unitId','_sessionService','createTimestamp','_threadCommentModel','pluginName','_config','_initUserSync','onStarting','/add','symbol','Solve','parentId','forEach','delete','getUser','_commentService','parse','filter','root','rangeType','ref','updateComment','solved','pipe','users','post','replies','Unknown','personId','defineProperty','error','Solved','_threadCommentDataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getCurrentUser','code','44072ZpYhXo','12ASDTuc','syncUpdateMutationToColla','Delete','setConfig','rangeId'];_0x143e=function(){return _0x2e092c;};return _0x143e();}(function(_0x66fd32,_0x1c308a){const _0x2f80e8=_0x716a,_0x51c83c=_0x66fd32();while(!![]){try{const _0x1fd395=-parseInt(_0x2f80e8(0x21e))/0x1+parseInt(_0x2f80e8(0x217))/0x2+parseInt(_0x2f80e8(0x1e8))/0x3*(-parseInt(_0x2f80e8(0x1e7))/0x4)+parseInt(_0x2f80e8(0x219))/0x5+parseInt(_0x2f80e8(0x215))/0x6+parseInt(_0x2f80e8(0x1ff))/0x7+-parseInt(_0x2f80e8(0x20f))/0x8;if(_0x1fd395===_0x1c308a)break;else _0x51c83c['push'](_0x51c83c['shift']());}catch(_0x50f761){_0x51c83c['push'](_0x51c83c['shift']());}}}(_0x143e,0x1b0f9));import{CommentService as _0x15df87,CollaborationSessionService as _0x47b523,UniverCollaborationClientPlugin as _0x492122}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x9bd0ef}from'@univerjs-pro/license';import{dayjs as _0x873951,UserManagerService as _0x1ef31c,Inject as _0x3f2e70,Injector as _0x26149e,Disposable as _0x831525,CustomRangeType as _0x4d44c4,UniverInstanceType as _0x1cc92f,DependentOn as _0x32111c,IConfigService as _0x2de010,Plugin as _0x43e48f,merge as _0x3055a3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4584a9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x33be90,IThreadCommentDataSourceService as _0x9cd755}from'@univerjs/thread-comment';import{bufferTime as _0x35848d}from'rxjs';function _0x716a(_0x1918d6,_0x1dd277){_0x1918d6=_0x1918d6-0x1d1;const _0x143e50=_0x143e();let _0x716ac9=_0x143e50[_0x1918d6];return _0x716ac9;}import{HTTPService as _0x38f331}from'@univerjs/network';const W=_0x4218c7(0x1e4);var I=(_0x5f0869=>(_0x5f0869[_0x5f0869[_0x4218c7(0x220)]=0x0]='OpenOrReOpen',_0x5f0869[_0x5f0869[_0x4218c7(0x1e2)]=0x1]=_0x4218c7(0x1e2),_0x5f0869[_0x5f0869[_0x4218c7(0x1f2)]=-0x1]=_0x4218c7(0x1f2),_0x5f0869))(I||{}),v=(_0x5b6c01=>(_0x5b6c01[_0x5b6c01[_0x4218c7(0x1de)]=0x0]=_0x4218c7(0x1de),_0x5b6c01[_0x5b6c01['Add']=0x1]=_0x4218c7(0x1f1),_0x5b6c01[_0x5b6c01[_0x4218c7(0x205)]=0x2]=_0x4218c7(0x205),_0x5b6c01[_0x5b6c01[_0x4218c7(0x207)]=0x3]=_0x4218c7(0x207),_0x5b6c01[_0x5b6c01[_0x4218c7(0x1ea)]=0x4]=_0x4218c7(0x1ea),_0x5b6c01[_0x5b6c01[_0x4218c7(0x230)]=0x5]=_0x4218c7(0x230),_0x5b6c01[_0x5b6c01[_0x4218c7(0x1f2)]=-0x1]=_0x4218c7(0x1f2),_0x5b6c01))(v||{});const y=_0x12abc3=>_0x873951(new Date(+_0x12abc3))[_0x4218c7(0x1f7)](_0x4218c7(0x1f6)),B=async(_0x2b74c7,_0x3164b4)=>{const _0x1def27=_0x4218c7,_0x307b96=_0x2b74c7['get'](_0x1ef31c),_0x150b11=_0x2b74c7[_0x1def27(0x214)](_0x38f331);_0x3164b4[_0x1def27(0x232)](_0xa3ee4c=>{const _0x56dd61=_0x1def27;_0x307b96[_0x56dd61(0x1d1)](_0xa3ee4c)&&_0x3164b4[_0x56dd61(0x233)](_0xa3ee4c);}),_0x3164b4[_0x1def27(0x200)]&&(await _0x150b11['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x3164b4]}}))[_0x1def27(0x209)][_0x1def27(0x1db)][_0x1def27(0x232)](_0x48990f=>{const _0x13a684=_0x1def27;_0x48990f&&_0x307b96[_0x13a684(0x21d)](_0x48990f);});};var K=Object[_0x4218c7(0x1f3)],V=(_0x192bc9,_0x14979c,_0x8a3eed,_0x4c9f6d)=>{const _0x4cb551=_0x4218c7;for(var _0x2fd330=_0x4c9f6d>0x1?void 0x0:_0x4c9f6d?K(_0x14979c,_0x8a3eed):_0x14979c,_0x1e4725=_0x192bc9[_0x4cb551(0x1f5)]-0x1,_0x4056e3;_0x1e4725>=0x0;_0x1e4725--)(_0x4056e3=_0x192bc9[_0x1e4725])&&(_0x2fd330=_0x4056e3(_0x2fd330)||_0x2fd330);return _0x2fd330;},p=(_0x4597ee,_0x44c187)=>(_0x9b5e9d,_0x3be1f9)=>_0x44c187(_0x9b5e9d,_0x3be1f9,_0x4597ee);let _=class extends _0x831525{constructor(_0x4d2114,_0x5adc6f,_0x2e04ff,_0xd5b455){const _0x3bfe2e=_0x4218c7;super(),this[_0x3bfe2e(0x1d2)]=_0x4d2114,this[_0x3bfe2e(0x229)]=_0x5adc6f,this[_0x3bfe2e(0x211)]=_0x2e04ff,this[_0x3bfe2e(0x202)]=_0xd5b455,this[_0x3bfe2e(0x20c)](),this['_initUserSync']();}[_0x4218c7(0x22c)](){const _0x63f98e=_0x4218c7;this['disposeWithMe'](this[_0x63f98e(0x229)][_0x63f98e(0x21a)][_0x63f98e(0x1da)](_0x35848d(0x10))[_0x63f98e(0x212)](_0x2d06d6=>{const _0x271841=_0x63f98e,_0x55e8db=new Set();_0x2d06d6[_0x271841(0x232)](_0x50c8c8=>{const _0x547847=_0x271841;if(_0x50c8c8[_0x547847(0x201)]==='add'){const _0x2207cf=_0x50c8c8['payload'][_0x547847(0x1df)];_0x55e8db['add'](_0x2207cf);}}),B(this[_0x271841(0x202)],_0x55e8db);}));}[_0x4218c7(0x20c)](){const _0x402355=_0x4218c7;this['disposeWithMe'](this[_0x402355(0x1d2)][_0x402355(0x21a)][_0x402355(0x212)](async _0x49fc4b=>{const _0xbc69eb=_0x402355;var _0x5c527e,_0x3640e3,_0x148af9,_0x5ae678;const _0x55e995=(_0x5c527e=this['_threadCommentModel']['getUnit'](_0x49fc4b['unitId'])[_0xbc69eb(0x208)](_0x4ce32b=>_0x4ce32b['threadId']===_0x49fc4b['threadId']))==null?void 0x0:_0x5c527e[_0xbc69eb(0x1d5)];if(!_0x55e995)return;const {unitId:_0x1d6eb1,subUnitId:_0x2870d9}=_0x55e995;switch(_0x49fc4b[_0xbc69eb(0x20b)]&&this[_0xbc69eb(0x211)][_0xbc69eb(0x21d)](_0x49fc4b['user']),_0x49fc4b[_0xbc69eb(0x201)]){case v['Add']:break;case v['Reply']:{this[_0xbc69eb(0x229)]['addComment'](_0x1d6eb1,_0x2870d9,{'unitId':_0x1d6eb1,'subUnitId':_0x2870d9,'ref':'','id':_0x49fc4b['replyId'],'dT':y(+_0x49fc4b[_0xbc69eb(0x228)]),'threadId':_0x49fc4b[_0xbc69eb(0x20d)],'personId':(_0x148af9=(_0x3640e3=_0x49fc4b[_0xbc69eb(0x20b)])==null?void 0x0:_0x3640e3['userID'])!=null?_0x148af9:_0x49fc4b['userId'],'text':JSON[_0xbc69eb(0x1d3)](_0x49fc4b['content']),'parentId':_0x55e995['id']});break;}case v['Delete']:{const _0x19f684=this[_0xbc69eb(0x229)]['getComment'](_0x1d6eb1,_0x2870d9,_0x49fc4b[_0xbc69eb(0x225)]);_0x19f684&&_0x19f684[_0xbc69eb(0x231)]&&this[_0xbc69eb(0x229)][_0xbc69eb(0x224)](_0x1d6eb1,_0x2870d9,_0x49fc4b['replyId']);break;}case v[_0xbc69eb(0x207)]:{this[_0xbc69eb(0x229)][_0xbc69eb(0x1d8)](_0x1d6eb1,_0x2870d9,{'commentId':_0x49fc4b[_0xbc69eb(0x225)],'text':JSON[_0xbc69eb(0x1d3)](_0x49fc4b['content'])});break;}case v[_0xbc69eb(0x230)]:{const _0x582a11=(_0x5ae678=this[_0xbc69eb(0x229)][_0xbc69eb(0x1f9)](_0x49fc4b[_0xbc69eb(0x226)])[_0xbc69eb(0x208)](_0x1fda1b=>_0x1fda1b[_0xbc69eb(0x20d)]===_0x49fc4b[_0xbc69eb(0x20d)]))==null?void 0x0:_0x5ae678[_0xbc69eb(0x1d5)];_0x582a11&&this['_threadCommentModel'][_0xbc69eb(0x1fc)](_0x1d6eb1,_0x2870d9,_0x582a11['id'],_0x49fc4b[_0xbc69eb(0x1d9)]===I[_0xbc69eb(0x1e2)]);break;}}}));}};_=V([p(0x0,_0x3f2e70(_0x15df87)),p(0x1,_0x3f2e70(_0x33be90)),p(0x2,_0x3f2e70(_0x1ef31c)),p(0x3,_0x3f2e70(_0x26149e))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x4218c7(0x1f3)],Q=(_0x47c557,_0x4a5960,_0x272313,_0x38d71b)=>{const _0x387679=_0x4218c7;for(var _0x344a28=_0x38d71b>0x1?void 0x0:_0x38d71b?k(_0x4a5960,_0x272313):_0x4a5960,_0x1f097c=_0x47c557[_0x387679(0x1f5)]-0x1,_0x11d3d6;_0x1f097c>=0x0;_0x1f097c--)(_0x11d3d6=_0x47c557[_0x1f097c])&&(_0x344a28=_0x11d3d6(_0x344a28)||_0x344a28);return _0x344a28;},b=(_0x32110c,_0x2b85ab)=>(_0x445ff2,_0x463e57)=>_0x2b85ab(_0x445ff2,_0x463e57,_0x32110c);function X(_0x5a3f30,_0x4d1f24){const _0x1c31cc=_0x4218c7,_0x2a29a4=_0x5a3f30['replies'][0x0];return{..._0x4d1f24,'id':_0x2a29a4[_0x1c31cc(0x225)],'resolved':_0x5a3f30[_0x1c31cc(0x1d9)]===0x1,'dT':y(_0x2a29a4[_0x1c31cc(0x228)]),'personId':_0x2a29a4[_0x1c31cc(0x21c)],'threadId':_0x2a29a4[_0x1c31cc(0x20d)]};}function ee(_0x1db4e4,_0x41190d,_0x219977){const _0x2de16c=_0x4218c7;var _0x5e2f2e,_0x5e7143;if(((_0x5e7143=(_0x5e2f2e=_0x1db4e4==null?void 0x0:_0x1db4e4[_0x2de16c(0x1dd)])==null?void 0x0:_0x5e2f2e[_0x2de16c(0x1f5)])!=null?_0x5e7143:0x0)>0x0){const _0x48039b=(_0x466d0a,_0x4a2e6e)=>({'id':_0x466d0a[_0x2de16c(0x225)],'threadId':_0x466d0a[_0x2de16c(0x20d)],'dT':y(_0x466d0a[_0x2de16c(0x228)]),'personId':_0x466d0a['userId'],'resolved':_0x1db4e4['solved']===I[_0x2de16c(0x1e2)],'unitId':_0x41190d,'subUnitId':_0x219977,'text':JSON['parse'](_0x466d0a['content']),'parentId':_0x4a2e6e}),_0x3855ce=_0x48039b(_0x1db4e4[_0x2de16c(0x1dd)][0x0]);return{..._0x3855ce,'children':_0x1db4e4[_0x2de16c(0x1dd)]['slice'](0x1)[_0x2de16c(0x206)](_0x38b556=>_0x48039b(_0x38b556,_0x3855ce['id']))};}return null;}let S=class{constructor(_0x4b4a53,_0xaebdbe,_0x24c1e3){const _0x1de901=_0x4218c7;this[_0x1de901(0x218)]=_0x4b4a53,this['_userService']=_0xaebdbe,this[_0x1de901(0x227)]=_0x24c1e3;}async[_0x4218c7(0x204)](_0x29b766){const _0xed19f2=_0x4218c7;var _0x15d3be,_0x84ce7f;const {parentId:_0x462490,unitId:_0x40babf,text:_0x9e69b0,threadId:_0x161dd0}=_0x29b766,_0x425094=(_0x84ce7f=(_0x15d3be=_0x9e69b0[_0xed19f2(0x1fe)])==null?void 0x0:_0x15d3be[_0xed19f2(0x1d4)](_0x420c4a=>_0x420c4a[_0xed19f2(0x1d6)]===_0x4d44c4[_0xed19f2(0x20e)])['map'](_0x4b1ce8=>_0x4b1ce8[_0xed19f2(0x1ec)]))!=null?_0x84ce7f:[],_0x4a4311=JSON['stringify'](_0x9e69b0),_0x2eb547=(await this[_0xed19f2(0x227)][_0xed19f2(0x1ef)](_0x40babf))[_0xed19f2(0x203)]();if(_0x462490){const _0x2bf9c3={'memberId':_0x2eb547,'unitId':_0x40babf,'content':_0x4a4311,'mention':_0x425094,'threadId':_0x161dd0},_0x283ef8=(await this[_0xed19f2(0x218)][_0xed19f2(0x1dc)](_0xed19f2(0x1fa)+_0x40babf+_0xed19f2(0x1ed),{'body':_0x2bf9c3}))[_0xed19f2(0x209)][_0xed19f2(0x1fb)];return{..._0x29b766,'id':_0x283ef8[_0xed19f2(0x225)],'dT':_0x873951(+_0x283ef8[_0xed19f2(0x228)])[_0xed19f2(0x1f7)](_0xed19f2(0x1f6)),'personId':_0x283ef8['userId']};}else{const _0x285d39={'memberId':_0x2eb547,'unitId':_0x40babf,'content':_0x4a4311,'mention':_0x425094},_0x40a9bc=await this[_0xed19f2(0x218)][_0xed19f2(0x1dc)]('/universer-api/comment/unit/'+_0x40babf+_0xed19f2(0x22e),{'body':_0x285d39});return X(_0x40a9bc[_0xed19f2(0x209)][_0xed19f2(0x1f8)],_0x29b766);}}async[_0x4218c7(0x1d8)](_0x356749){const _0x344c6e=_0x4218c7;var _0x43d996,_0x5b5391;const {text:_0x4a272f,unitId:_0x49b06f}=_0x356749,_0x4ee270=(_0x5b5391=(_0x43d996=_0x4a272f[_0x344c6e(0x1fe)])==null?void 0x0:_0x43d996[_0x344c6e(0x1d4)](_0x2bd491=>_0x2bd491[_0x344c6e(0x1d6)]===_0x4d44c4[_0x344c6e(0x20e)])[_0x344c6e(0x206)](_0x2200a5=>_0x2200a5['rangeId']))!=null?_0x5b5391:[],_0xd9c0d5=JSON[_0x344c6e(0x1f4)](_0x4a272f),_0x5d35fe=_0x356749[_0x344c6e(0x20d)],_0x15eebc=_0x356749['id'],_0x427bcb={'memberId':(await this['_sessionService'][_0x344c6e(0x1ef)](_0x49b06f))[_0x344c6e(0x203)](),'unitId':_0x49b06f,'threadId':_0x5d35fe,'mention':_0x4ee270,'content':_0xd9c0d5,'replyId':_0x15eebc},_0x4ea436=await this[_0x344c6e(0x218)][_0x344c6e(0x1dc)](_0x344c6e(0x1fa)+_0x49b06f+'/edit',{'body':_0x427bcb});return!_0x4ea436[_0x344c6e(0x209)][_0x344c6e(0x1e1)]||_0x4ea436[_0x344c6e(0x209)]['error'][_0x344c6e(0x1e6)]===0x1;}async[_0x4218c7(0x1fc)](_0x2d1519){const _0x544348=_0x4218c7,{unitId:_0x436281}=_0x2d1519,_0x36578b=_0x2d1519[_0x544348(0x20d)],_0x2e6d6a={'memberId':this['_userService'][_0x544348(0x1e5)]()[_0x544348(0x210)],'unitId':_0x436281,'threadId':_0x36578b,'solved':_0x2d1519[_0x544348(0x1ee)]?I[_0x544348(0x1e2)]:I['OpenOrReOpen']},_0x3d891c=await this[_0x544348(0x218)][_0x544348(0x1dc)]('/universer-api/comment/unit/'+_0x436281+_0x544348(0x221),{'body':_0x2e6d6a});return!_0x3d891c[_0x544348(0x209)][_0x544348(0x1e1)]||_0x3d891c[_0x544348(0x209)]['error']['code']===0x1;}async[_0x4218c7(0x224)](_0x31e4b3,_0x244e01,_0x6de72c,_0x1d24c9){const _0x578b0e=_0x4218c7,_0x4efc2d={'memberId':(await this[_0x578b0e(0x227)][_0x578b0e(0x1ef)](_0x31e4b3))[_0x578b0e(0x203)](),'threadId':_0x6de72c,'replyId':_0x1d24c9,'unitId':_0x31e4b3},_0x11972f=await this['_httpService'][_0x578b0e(0x1dc)](_0x578b0e(0x1fa)+_0x31e4b3+'/delete',{'body':_0x4efc2d});return!_0x11972f[_0x578b0e(0x209)][_0x578b0e(0x1e1)]||_0x11972f[_0x578b0e(0x209)]['error'][_0x578b0e(0x1e6)]===0x1;}async[_0x4218c7(0x213)](_0x31eca4,_0xbdcd3c,_0x15cd62){const _0x20e85a=_0x4218c7,_0x6b7dd5={'unitId':_0x31eca4,'threadId':_0x15cd62},_0x26ef53=await this[_0x20e85a(0x218)]['post'](_0x20e85a(0x1fa)+_0x31eca4+'/list',{'body':_0x6b7dd5}),_0x3883fd=_0x15cd62[_0x20e85a(0x206)](_0x17bf57=>ee(_0x26ef53[_0x20e85a(0x209)]['comments'][_0x17bf57],_0x31eca4,_0xbdcd3c))[_0x20e85a(0x1d4)](Boolean);return Object[_0x20e85a(0x21b)](_0x26ef53[_0x20e85a(0x209)]['users'])['forEach'](_0x5637d3=>{const _0x2453c2=_0x20e85a;this['_userService'][_0x2453c2(0x21d)](_0x5637d3);}),_0x3883fd;}[_0x4218c7(0x1fd)](_0x4bc85b){const _0xe5ebcc=_0x4218c7;return{'id':_0x4bc85b['id'],'threadId':_0x4bc85b[_0xe5ebcc(0x20d)],'ref':_0x4bc85b[_0xe5ebcc(0x1d7)]};}};S=Q([b(0x0,_0x3f2e70(_0x38f331)),b(0x1,_0x3f2e70(_0x1ef31c)),b(0x2,_0x3f2e70(_0x47b523))],S);var re=Object[_0x4218c7(0x1f3)],te=(_0x2191d6,_0x54b964,_0x2bee57,_0x1c7e50)=>{const _0x45493f=_0x4218c7;for(var _0x31cda9=_0x1c7e50>0x1?void 0x0:_0x1c7e50?re(_0x54b964,_0x2bee57):_0x54b964,_0x31ea22=_0x2191d6[_0x45493f(0x1f5)]-0x1,_0x6bd8bc;_0x31ea22>=0x0;_0x31ea22--)(_0x6bd8bc=_0x2191d6[_0x31ea22])&&(_0x31cda9=_0x6bd8bc(_0x31cda9)||_0x31cda9);return _0x31cda9;},M=(_0x58486d,_0x489cd5)=>(_0x4fe9ae,_0x3c2fff)=>_0x489cd5(_0x4fe9ae,_0x3c2fff,_0x58486d);let f=class extends _0x831525{constructor(_0x1d8806,_0x530842){const _0x9b7969=_0x4218c7;super(),this[_0x9b7969(0x222)]=_0x1d8806,this[_0x9b7969(0x1e3)]=_0x530842,this[_0x9b7969(0x216)]();}[_0x4218c7(0x216)](){const _0x49babb=_0x4218c7;this['_threadCommentDataSourceService'][_0x49babb(0x20a)]=this[_0x49babb(0x1e3)],this[_0x49babb(0x222)][_0x49babb(0x1e9)]=!0x1;}};f=te([M(0x0,_0x9cd755),M(0x1,_0x3f2e70(S))],f);var se=Object[_0x4218c7(0x1e0)],oe=Object[_0x4218c7(0x1f3)],ne=(_0x3528a2,_0x15f62a,_0x28831d)=>_0x15f62a in _0x3528a2?se(_0x3528a2,_0x15f62a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x28831d}):_0x3528a2[_0x15f62a]=_0x28831d,ie=(_0x27405c,_0x2bb3c3,_0x46eea7,_0x498627)=>{const _0x55ecbf=_0x4218c7;for(var _0x424e4c=_0x498627>0x1?void 0x0:_0x498627?oe(_0x2bb3c3,_0x46eea7):_0x2bb3c3,_0x398c8e=_0x27405c[_0x55ecbf(0x1f5)]-0x1,_0x23e5f9;_0x398c8e>=0x0;_0x398c8e--)(_0x23e5f9=_0x27405c[_0x398c8e])&&(_0x424e4c=_0x23e5f9(_0x424e4c)||_0x424e4c);return _0x424e4c;},N=(_0x4e9266,_0x3764c6)=>(_0x4e40d0,_0x308b03)=>_0x3764c6(_0x4e40d0,_0x308b03,_0x4e9266),$=(_0x347b71,_0x59bf4f,_0x316586)=>ne(_0x347b71,typeof _0x59bf4f!=_0x4218c7(0x22f)?_0x59bf4f+'':_0x59bf4f,_0x316586);let g=class extends _0x43e48f{constructor(_0x3f0e86=O,_0x2e6298,_0x140c8c){const _0xb2eb85=_0x4218c7;super(),this[_0xb2eb85(0x22b)]=_0x3f0e86,this[_0xb2eb85(0x202)]=_0x2e6298,this[_0xb2eb85(0x21f)]=_0x140c8c;const {..._0x343f8f}=_0x3055a3({},O,this[_0xb2eb85(0x22b)]);this[_0xb2eb85(0x21f)][_0xb2eb85(0x1eb)](z,_0x343f8f);}[_0x4218c7(0x22d)](){const _0x334ea9=_0x4218c7;[[S],[f],[_]][_0x334ea9(0x232)](_0x33bb13=>{const _0x282e1b=_0x334ea9;this[_0x282e1b(0x202)]['add'](_0x33bb13);});}[_0x4218c7(0x223)](){const _0x1118ff=_0x4218c7;this['_injector'][_0x1118ff(0x214)](f),this[_0x1118ff(0x202)][_0x1118ff(0x214)](_);}};$(g,_0x4218c7(0x22a),W),$(g,_0x4218c7(0x201),_0x1cc92f[_0x4218c7(0x1f0)]),g=ie([_0x32111c(_0x4584a9,_0x492122,_0x9bd0ef),N(0x1,_0x3f2e70(_0x26149e)),N(0x2,_0x2de010)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x4180b1=_0x1b28;(function(_0x45c067,_0x51230a){const _0x42e990=_0x1b28,_0x246baa=_0x45c067();while(!![]){try{const _0x375104=-parseInt(_0x42e990(0x1c3))/0x1+parseInt(_0x42e990(0x1c2))/0x2+parseInt(_0x42e990(0x191))/0x3+parseInt(_0x42e990(0x1cb))/0x4+-parseInt(_0x42e990(0x1f6))/0x5*(-parseInt(_0x42e990(0x1d1))/0x6)+parseInt(_0x42e990(0x1a4))/0x7*(-parseInt(_0x42e990(0x19c))/0x8)+-parseInt(_0x42e990(0x1eb))/0x9;if(_0x375104===_0x51230a)break;else _0x246baa['push'](_0x246baa['shift']());}catch(_0x3f3f14){_0x246baa['push'](_0x246baa['shift']());}}}(_0x1166,0xa6f05));import{CommentService as _0x1bb26a,CollaborationSessionService as _0x4700fa,UniverCollaborationClientPlugin as _0x2add79}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3a6dc9}from'@univerjs-pro/license';import{dayjs as _0x30e5fe,UserManagerService as _0x51e746,Inject as _0x54c27f,Injector as _0x1bb80b,Disposable as _0x287a8e,CustomRangeType as _0x2aa294,UniverInstanceType as _0x140979,DependentOn as _0x5d589e,IConfigService as _0x4d8774,Plugin as _0x558095,merge as _0x599c45}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x31f759}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5bccec,IThreadCommentDataSourceService as _0x241c92}from'@univerjs/thread-comment';function _0x1b28(_0x586063,_0x361029){_0x586063=_0x586063-0x18e;const _0x11660c=_0x1166();let _0x1b28d9=_0x11660c[_0x586063];return _0x1b28d9;}function _0x1166(){const _0x18a0fa=['_httpService','Reply','find','threadId','commentUpdate$','syncUpdateMutationToColla','disposeWithMe','_init','getMemberID','OpenOrReOpen','8FmOohS','values','UNIVER_UNKNOWN','Solve','solved','content','replies','slice','4365298JBqJVa','dataSource','error','ref','_userService','requireSession','post','customRanges','comments','Delete','getCurrentUser','length','_injector','stringify','code','updateComment','symbol','_config','deleteComment','pipe','rangeType','/universer-api/user/list','listComments','thread-comment-data-source.config','payload','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','add','YYYY/MM/DD\x20HH:mm','userId','_threadCommentDataSourceService','605010drKAoN','239647NxdiYz','/list','_initDataSource','root','format','subscribe','/edit','personId','2724836LsGDtp','resolved','addComment','getUnit','map','_sessionService','7818AfBCEz','_commentService','Solved','_threadCommentModel','get','saveCommentToSnapshot','type','defineProperty','setConfig','getUser','unitId','COMMENT','Edit','onStarting','replyId','resolveComment','forEach','size','rangeId','/universer-api/comment/unit/','addUser','_threadCommentDataSource','/add','parentId','_initUserSync','getOwnPropertyDescriptor','6674544Ladixe','body','users','Unknown','pluginName','createTimestamp','_configService','parse','userID','UNRECOGNIZED','Add','3145LAjTUw','/solved','user','delete','filter','getComment','1456071pFSVhQ'];_0x1166=function(){return _0x18a0fa;};return _0x1166();}import{bufferTime as _0x545da4}from'rxjs';import{HTTPService as _0x163b66}from'@univerjs/network';const W=_0x4180b1(0x1bd);var I=(_0x2b5efb=>(_0x2b5efb[_0x2b5efb[_0x4180b1(0x19b)]=0x0]=_0x4180b1(0x19b),_0x2b5efb[_0x2b5efb[_0x4180b1(0x1d3)]=0x1]=_0x4180b1(0x1d3),_0x2b5efb[_0x2b5efb['UNRECOGNIZED']=-0x1]=_0x4180b1(0x1f4),_0x2b5efb))(I||{}),v=(_0x382e20=>(_0x382e20[_0x382e20[_0x4180b1(0x1ee)]=0x0]=_0x4180b1(0x1ee),_0x382e20[_0x382e20[_0x4180b1(0x1f5)]=0x1]=_0x4180b1(0x1f5),_0x382e20[_0x382e20[_0x4180b1(0x193)]=0x2]='Reply',_0x382e20[_0x382e20['Edit']=0x3]=_0x4180b1(0x1dd),_0x382e20[_0x382e20['Delete']=0x4]=_0x4180b1(0x1ad),_0x382e20[_0x382e20['Solve']=0x5]=_0x4180b1(0x19f),_0x382e20[_0x382e20[_0x4180b1(0x1f4)]=-0x1]=_0x4180b1(0x1f4),_0x382e20))(v||{});const y=_0x22a6f2=>_0x30e5fe(new Date(+_0x22a6f2))[_0x4180b1(0x1c7)](_0x4180b1(0x1bf)),B=async(_0x400022,_0x1d45c1)=>{const _0x1fbe53=_0x4180b1,_0x65dc99=_0x400022[_0x1fbe53(0x1d5)](_0x51e746),_0x28e80f=_0x400022[_0x1fbe53(0x1d5)](_0x163b66);_0x1d45c1[_0x1fbe53(0x1e1)](_0x419660=>{const _0xe41fd7=_0x1fbe53;_0x65dc99[_0xe41fd7(0x1da)](_0x419660)&&_0x1d45c1[_0xe41fd7(0x18e)](_0x419660);}),_0x1d45c1[_0x1fbe53(0x1e2)]&&(await _0x28e80f[_0x1fbe53(0x1d5)](_0x1fbe53(0x1b9),{'params':{'userIDs':[..._0x1d45c1]}}))[_0x1fbe53(0x1ec)][_0x1fbe53(0x1ed)]['forEach'](_0x10324e=>{_0x10324e&&_0x65dc99['addUser'](_0x10324e);});};var K=Object[_0x4180b1(0x1ea)],V=(_0x1ae3bc,_0x42c782,_0x21411a,_0x4ddfc5)=>{for(var _0x541b68=_0x4ddfc5>0x1?void 0x0:_0x4ddfc5?K(_0x42c782,_0x21411a):_0x42c782,_0x2f367e=_0x1ae3bc['length']-0x1,_0x3eb078;_0x2f367e>=0x0;_0x2f367e--)(_0x3eb078=_0x1ae3bc[_0x2f367e])&&(_0x541b68=_0x3eb078(_0x541b68)||_0x541b68);return _0x541b68;},p=(_0x1abbf9,_0xdb968d)=>(_0x1021e2,_0x840ee9)=>_0xdb968d(_0x1021e2,_0x840ee9,_0x1abbf9);let _=class extends _0x287a8e{constructor(_0x344e1b,_0x324a00,_0x2b4e2a,_0x1200e6){const _0x1eb32f=_0x4180b1;super(),this['_commentService']=_0x344e1b,this['_threadCommentModel']=_0x324a00,this[_0x1eb32f(0x1a8)]=_0x2b4e2a,this[_0x1eb32f(0x1b0)]=_0x1200e6,this[_0x1eb32f(0x199)](),this[_0x1eb32f(0x1e9)]();}[_0x4180b1(0x1e9)](){const _0x7d27d8=_0x4180b1;this['disposeWithMe'](this[_0x7d27d8(0x1d4)][_0x7d27d8(0x196)][_0x7d27d8(0x1b7)](_0x545da4(0x10))[_0x7d27d8(0x1c8)](_0x27832f=>{const _0xf5d0ab=_0x7d27d8,_0x5127f3=new Set();_0x27832f[_0xf5d0ab(0x1e1)](_0xfe75a2=>{const _0x346f30=_0xf5d0ab;if(_0xfe75a2['type']===_0x346f30(0x1be)){const _0x4b2e81=_0xfe75a2[_0x346f30(0x1bc)][_0x346f30(0x1ca)];_0x5127f3['add'](_0x4b2e81);}}),B(this[_0xf5d0ab(0x1b0)],_0x5127f3);}));}[_0x4180b1(0x199)](){const _0x2eecb9=_0x4180b1;this[_0x2eecb9(0x198)](this[_0x2eecb9(0x1d2)]['commentUpdate$'][_0x2eecb9(0x1c8)](async _0x3973d9=>{const _0x2f9ade=_0x2eecb9;var _0x30c52e,_0x47bfd2,_0x59621a,_0x2c5c24;const _0x2cf086=(_0x30c52e=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1ce)](_0x3973d9[_0x2f9ade(0x1db)])[_0x2f9ade(0x194)](_0x14fd6c=>_0x14fd6c[_0x2f9ade(0x195)]===_0x3973d9[_0x2f9ade(0x195)]))==null?void 0x0:_0x30c52e[_0x2f9ade(0x1c6)];if(!_0x2cf086)return;const {unitId:_0x1399a6,subUnitId:_0x26c242}=_0x2cf086;switch(_0x3973d9[_0x2f9ade(0x1f8)]&&this[_0x2f9ade(0x1a8)][_0x2f9ade(0x1e5)](_0x3973d9[_0x2f9ade(0x1f8)]),_0x3973d9[_0x2f9ade(0x1d7)]){case v[_0x2f9ade(0x1f5)]:break;case v[_0x2f9ade(0x193)]:{this[_0x2f9ade(0x1d4)]['addComment'](_0x1399a6,_0x26c242,{'unitId':_0x1399a6,'subUnitId':_0x26c242,'ref':'','id':_0x3973d9[_0x2f9ade(0x1df)],'dT':y(+_0x3973d9[_0x2f9ade(0x1f0)]),'threadId':_0x3973d9[_0x2f9ade(0x195)],'personId':(_0x59621a=(_0x47bfd2=_0x3973d9['user'])==null?void 0x0:_0x47bfd2['userID'])!=null?_0x59621a:_0x3973d9['userId'],'text':JSON[_0x2f9ade(0x1f2)](_0x3973d9['content']),'parentId':_0x2cf086['id']});break;}case v['Delete']:{const _0x1888c4=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x190)](_0x1399a6,_0x26c242,_0x3973d9[_0x2f9ade(0x1df)]);_0x1888c4&&_0x1888c4[_0x2f9ade(0x1e8)]&&this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1b6)](_0x1399a6,_0x26c242,_0x3973d9[_0x2f9ade(0x1df)]);break;}case v[_0x2f9ade(0x1dd)]:{this['_threadCommentModel'][_0x2f9ade(0x1b3)](_0x1399a6,_0x26c242,{'commentId':_0x3973d9[_0x2f9ade(0x1df)],'text':JSON[_0x2f9ade(0x1f2)](_0x3973d9['content'])});break;}case v[_0x2f9ade(0x19f)]:{const _0x566ab5=(_0x2c5c24=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1ce)](_0x3973d9[_0x2f9ade(0x1db)])[_0x2f9ade(0x194)](_0x1adc4f=>_0x1adc4f[_0x2f9ade(0x195)]===_0x3973d9['threadId']))==null?void 0x0:_0x2c5c24[_0x2f9ade(0x1c6)];_0x566ab5&&this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1e0)](_0x1399a6,_0x26c242,_0x566ab5['id'],_0x3973d9['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x54c27f(_0x1bb26a)),p(0x1,_0x54c27f(_0x5bccec)),p(0x2,_0x54c27f(_0x51e746)),p(0x3,_0x54c27f(_0x1bb80b))],_);const z=_0x4180b1(0x1bb),O={};var k=Object[_0x4180b1(0x1ea)],Q=(_0x401308,_0x2d430f,_0x548ef8,_0x48ae08)=>{const _0x51f55b=_0x4180b1;for(var _0x31d046=_0x48ae08>0x1?void 0x0:_0x48ae08?k(_0x2d430f,_0x548ef8):_0x2d430f,_0x521725=_0x401308[_0x51f55b(0x1af)]-0x1,_0x31273f;_0x521725>=0x0;_0x521725--)(_0x31273f=_0x401308[_0x521725])&&(_0x31d046=_0x31273f(_0x31d046)||_0x31d046);return _0x31d046;},b=(_0x2cbfd9,_0x440532)=>(_0x520e32,_0x259c16)=>_0x440532(_0x520e32,_0x259c16,_0x2cbfd9);function X(_0x4ff5ea,_0x4298c4){const _0x5abf8f=_0x4180b1,_0x564bcb=_0x4ff5ea[_0x5abf8f(0x1a2)][0x0];return{..._0x4298c4,'id':_0x564bcb[_0x5abf8f(0x1df)],'resolved':_0x4ff5ea[_0x5abf8f(0x1a0)]===0x1,'dT':y(_0x564bcb[_0x5abf8f(0x1f0)]),'personId':_0x564bcb[_0x5abf8f(0x1c0)],'threadId':_0x564bcb[_0x5abf8f(0x195)]};}function ee(_0x54080d,_0x4584f6,_0x13340a){const _0x4bf80d=_0x4180b1;var _0x445c99,_0x5c21d4;if(((_0x5c21d4=(_0x445c99=_0x54080d==null?void 0x0:_0x54080d[_0x4bf80d(0x1a2)])==null?void 0x0:_0x445c99[_0x4bf80d(0x1af)])!=null?_0x5c21d4:0x0)>0x0){const _0x4dc295=(_0xd8eeb5,_0x16f077)=>({'id':_0xd8eeb5['replyId'],'threadId':_0xd8eeb5[_0x4bf80d(0x195)],'dT':y(_0xd8eeb5[_0x4bf80d(0x1f0)]),'personId':_0xd8eeb5['userId'],'resolved':_0x54080d[_0x4bf80d(0x1a0)]===I[_0x4bf80d(0x1d3)],'unitId':_0x4584f6,'subUnitId':_0x13340a,'text':JSON[_0x4bf80d(0x1f2)](_0xd8eeb5[_0x4bf80d(0x1a1)]),'parentId':_0x16f077}),_0x3c9a6f=_0x4dc295(_0x54080d[_0x4bf80d(0x1a2)][0x0]);return{..._0x3c9a6f,'children':_0x54080d[_0x4bf80d(0x1a2)][_0x4bf80d(0x1a3)](0x1)[_0x4bf80d(0x1cf)](_0x4c18e7=>_0x4dc295(_0x4c18e7,_0x3c9a6f['id']))};}return null;}let S=class{constructor(_0x24b567,_0x2c79c5,_0x5bb221){const _0x3c1c12=_0x4180b1;this['_httpService']=_0x24b567,this[_0x3c1c12(0x1a8)]=_0x2c79c5,this[_0x3c1c12(0x1d0)]=_0x5bb221;}async[_0x4180b1(0x1cd)](_0x7a351f){const _0x42097a=_0x4180b1;var _0x14f825,_0x59c911;const {parentId:_0x2de79b,unitId:_0x551632,text:_0x4aba44,threadId:_0x51dbfb}=_0x7a351f,_0x431461=(_0x59c911=(_0x14f825=_0x4aba44[_0x42097a(0x1ab)])==null?void 0x0:_0x14f825[_0x42097a(0x18f)](_0x1596a5=>_0x1596a5[_0x42097a(0x1b8)]===_0x2aa294[_0x42097a(0x1dc)])[_0x42097a(0x1cf)](_0x5765e4=>_0x5765e4['rangeId']))!=null?_0x59c911:[],_0x123ef9=JSON[_0x42097a(0x1b1)](_0x4aba44),_0x2af36d=(await this[_0x42097a(0x1d0)][_0x42097a(0x1a9)](_0x551632))['getMemberID']();if(_0x2de79b){const _0x566cac={'memberId':_0x2af36d,'unitId':_0x551632,'content':_0x123ef9,'mention':_0x431461,'threadId':_0x51dbfb},_0x4710cf=(await this['_httpService'][_0x42097a(0x1aa)]('/universer-api/comment/unit/'+_0x551632+'/reply',{'body':_0x566cac}))[_0x42097a(0x1ec)]['reply'];return{..._0x7a351f,'id':_0x4710cf[_0x42097a(0x1df)],'dT':_0x30e5fe(+_0x4710cf['createTimestamp'])['format'](_0x42097a(0x1bf)),'personId':_0x4710cf[_0x42097a(0x1c0)]};}else{const _0x128dd9={'memberId':_0x2af36d,'unitId':_0x551632,'content':_0x123ef9,'mention':_0x431461},_0x55b263=await this[_0x42097a(0x192)]['post'](_0x42097a(0x1e4)+_0x551632+_0x42097a(0x1e7),{'body':_0x128dd9});return X(_0x55b263['body']['comment'],_0x7a351f);}}async[_0x4180b1(0x1b3)](_0x51b87d){const _0x189af2=_0x4180b1;var _0x20e6de,_0x226c8c;const {text:_0x3eac6b,unitId:_0x4ae742}=_0x51b87d,_0x5a7919=(_0x226c8c=(_0x20e6de=_0x3eac6b[_0x189af2(0x1ab)])==null?void 0x0:_0x20e6de[_0x189af2(0x18f)](_0x47f52d=>_0x47f52d['rangeType']===_0x2aa294[_0x189af2(0x1dc)])[_0x189af2(0x1cf)](_0x4a2ae5=>_0x4a2ae5[_0x189af2(0x1e3)]))!=null?_0x226c8c:[],_0xc200c6=JSON[_0x189af2(0x1b1)](_0x3eac6b),_0x2cfed9=_0x51b87d['threadId'],_0x4e46d6=_0x51b87d['id'],_0x65513a={'memberId':(await this[_0x189af2(0x1d0)][_0x189af2(0x1a9)](_0x4ae742))[_0x189af2(0x19a)](),'unitId':_0x4ae742,'threadId':_0x2cfed9,'mention':_0x5a7919,'content':_0xc200c6,'replyId':_0x4e46d6},_0x51d894=await this[_0x189af2(0x192)][_0x189af2(0x1aa)](_0x189af2(0x1e4)+_0x4ae742+_0x189af2(0x1c9),{'body':_0x65513a});return!_0x51d894[_0x189af2(0x1ec)]['error']||_0x51d894['body'][_0x189af2(0x1a6)][_0x189af2(0x1b2)]===0x1;}async[_0x4180b1(0x1e0)](_0x16d46d){const _0x5e02dd=_0x4180b1,{unitId:_0x3a8616}=_0x16d46d,_0x5be6dc=_0x16d46d[_0x5e02dd(0x195)],_0x5c6cad={'memberId':this['_userService'][_0x5e02dd(0x1ae)]()[_0x5e02dd(0x1f3)],'unitId':_0x3a8616,'threadId':_0x5be6dc,'solved':_0x16d46d[_0x5e02dd(0x1cc)]?I[_0x5e02dd(0x1d3)]:I[_0x5e02dd(0x19b)]},_0x35efe3=await this[_0x5e02dd(0x192)][_0x5e02dd(0x1aa)](_0x5e02dd(0x1e4)+_0x3a8616+_0x5e02dd(0x1f7),{'body':_0x5c6cad});return!_0x35efe3[_0x5e02dd(0x1ec)][_0x5e02dd(0x1a6)]||_0x35efe3[_0x5e02dd(0x1ec)][_0x5e02dd(0x1a6)][_0x5e02dd(0x1b2)]===0x1;}async[_0x4180b1(0x1b6)](_0x292e3b,_0x4fb793,_0x6fbc1,_0x121f2f){const _0x275376=_0x4180b1,_0x38970c={'memberId':(await this[_0x275376(0x1d0)]['requireSession'](_0x292e3b))[_0x275376(0x19a)](),'threadId':_0x6fbc1,'replyId':_0x121f2f,'unitId':_0x292e3b},_0x1de803=await this[_0x275376(0x192)][_0x275376(0x1aa)]('/universer-api/comment/unit/'+_0x292e3b+'/delete',{'body':_0x38970c});return!_0x1de803['body'][_0x275376(0x1a6)]||_0x1de803[_0x275376(0x1ec)][_0x275376(0x1a6)][_0x275376(0x1b2)]===0x1;}async[_0x4180b1(0x1ba)](_0x55381e,_0x1e90ed,_0xa7511){const _0x5d3fe3=_0x4180b1,_0x4cfdaa={'unitId':_0x55381e,'threadId':_0xa7511},_0x464474=await this[_0x5d3fe3(0x192)]['post']('/universer-api/comment/unit/'+_0x55381e+_0x5d3fe3(0x1c4),{'body':_0x4cfdaa}),_0x3d4464=_0xa7511[_0x5d3fe3(0x1cf)](_0x432373=>ee(_0x464474[_0x5d3fe3(0x1ec)][_0x5d3fe3(0x1ac)][_0x432373],_0x55381e,_0x1e90ed))['filter'](Boolean);return Object[_0x5d3fe3(0x19d)](_0x464474[_0x5d3fe3(0x1ec)][_0x5d3fe3(0x1ed)])[_0x5d3fe3(0x1e1)](_0xed875e=>{const _0xd9a734=_0x5d3fe3;this[_0xd9a734(0x1a8)][_0xd9a734(0x1e5)](_0xed875e);}),_0x3d4464;}[_0x4180b1(0x1d6)](_0xdc9b74){const _0x35ae6d=_0x4180b1;return{'id':_0xdc9b74['id'],'threadId':_0xdc9b74[_0x35ae6d(0x195)],'ref':_0xdc9b74[_0x35ae6d(0x1a7)]};}};S=Q([b(0x0,_0x54c27f(_0x163b66)),b(0x1,_0x54c27f(_0x51e746)),b(0x2,_0x54c27f(_0x4700fa))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x54ae4e,_0x34324a,_0x1bbce1,_0x2a5703)=>{for(var _0x2091cd=_0x2a5703>0x1?void 0x0:_0x2a5703?re(_0x34324a,_0x1bbce1):_0x34324a,_0x3ecbf2=_0x54ae4e['length']-0x1,_0x41d4e4;_0x3ecbf2>=0x0;_0x3ecbf2--)(_0x41d4e4=_0x54ae4e[_0x3ecbf2])&&(_0x2091cd=_0x41d4e4(_0x2091cd)||_0x2091cd);return _0x2091cd;},M=(_0x39762c,_0x3e5f19)=>(_0x335f35,_0x463934)=>_0x3e5f19(_0x335f35,_0x463934,_0x39762c);let f=class extends _0x287a8e{constructor(_0x59778c,_0xf8c71a){const _0x5e9f60=_0x4180b1;super(),this['_threadCommentDataSourceService']=_0x59778c,this['_threadCommentDataSource']=_0xf8c71a,this[_0x5e9f60(0x1c5)]();}[_0x4180b1(0x1c5)](){const _0x195265=_0x4180b1;this[_0x195265(0x1c1)][_0x195265(0x1a5)]=this[_0x195265(0x1e6)],this[_0x195265(0x1c1)][_0x195265(0x197)]=!0x1;}};f=te([M(0x0,_0x241c92),M(0x1,_0x54c27f(S))],f);var se=Object[_0x4180b1(0x1d8)],oe=Object[_0x4180b1(0x1ea)],ne=(_0x571635,_0x1c79d1,_0x3b87f3)=>_0x1c79d1 in _0x571635?se(_0x571635,_0x1c79d1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b87f3}):_0x571635[_0x1c79d1]=_0x3b87f3,ie=(_0xac8d0f,_0x20edc6,_0x2850e2,_0x5efb4e)=>{const _0x52f1fe=_0x4180b1;for(var _0x1f6064=_0x5efb4e>0x1?void 0x0:_0x5efb4e?oe(_0x20edc6,_0x2850e2):_0x20edc6,_0x2ae1f4=_0xac8d0f[_0x52f1fe(0x1af)]-0x1,_0x4597e2;_0x2ae1f4>=0x0;_0x2ae1f4--)(_0x4597e2=_0xac8d0f[_0x2ae1f4])&&(_0x1f6064=_0x4597e2(_0x1f6064)||_0x1f6064);return _0x1f6064;},N=(_0x53f721,_0x492d4e)=>(_0x3bb541,_0x4de18c)=>_0x492d4e(_0x3bb541,_0x4de18c,_0x53f721),$=(_0x1553f1,_0x5dafc0,_0x3f2344)=>ne(_0x1553f1,typeof _0x5dafc0!=_0x4180b1(0x1b4)?_0x5dafc0+'':_0x5dafc0,_0x3f2344);let g=class extends _0x558095{constructor(_0x4a397c=O,_0x3eae51,_0x15ae92){const _0x320c52=_0x4180b1;super(),this[_0x320c52(0x1b5)]=_0x4a397c,this['_injector']=_0x3eae51,this[_0x320c52(0x1f1)]=_0x15ae92;const {..._0x3b9956}=_0x599c45({},O,this[_0x320c52(0x1b5)]);this[_0x320c52(0x1f1)][_0x320c52(0x1d9)](z,_0x3b9956);}[_0x4180b1(0x1de)](){[[S],[f],[_]]['forEach'](_0x10f72e=>{const _0x666667=_0x1b28;this[_0x666667(0x1b0)][_0x666667(0x1be)](_0x10f72e);});}['onReady'](){const _0x4996bd=_0x4180b1;this['_injector'][_0x4996bd(0x1d5)](f),this[_0x4996bd(0x1b0)]['get'](_);}};$(g,_0x4180b1(0x1ef),W),$(g,_0x4180b1(0x1d7),_0x140979[_0x4180b1(0x19e)]),g=ie([_0x5d589e(_0x31f759,_0x2add79,_0x3a6dc9),N(0x1,_0x54c27f(_0x1bb80b)),N(0x2,_0x4d8774)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4218c7=_0x716a;function _0x143e(){const _0x2e092c=['/reply','resolved','requireSession','UNIVER_UNKNOWN','Add','UNRECOGNIZED','getOwnPropertyDescriptor','stringify','length','YYYY/MM/DD\x20HH:mm','format','comment','getUnit','/universer-api/comment/unit/','reply','resolveComment','saveCommentToSnapshot','customRanges','643811mmZbrK','size','type','_injector','getMemberID','addComment','Reply','map','Edit','find','body','dataSource','user','_init','threadId','COMMENT','862816yktXXt','userID','_userService','subscribe','listComments','get','481182oAhgvD','_initDataSource','178518mcZgEn','_httpService','552290xJhAoJ','commentUpdate$','values','userId','addUser','109122pfBiZs','_configService','OpenOrReOpen','/solved','_threadCommentDataSourceService','onReady','deleteComment','replyId','unitId','_sessionService','createTimestamp','_threadCommentModel','pluginName','_config','_initUserSync','onStarting','/add','symbol','Solve','parentId','forEach','delete','getUser','_commentService','parse','filter','root','rangeType','ref','updateComment','solved','pipe','users','post','replies','Unknown','personId','defineProperty','error','Solved','_threadCommentDataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getCurrentUser','code','44072ZpYhXo','12ASDTuc','syncUpdateMutationToColla','Delete','setConfig','rangeId'];_0x143e=function(){return _0x2e092c;};return _0x143e();}(function(_0x66fd32,_0x1c308a){const _0x2f80e8=_0x716a,_0x51c83c=_0x66fd32();while(!![]){try{const _0x1fd395=-parseInt(_0x2f80e8(0x21e))/0x1+parseInt(_0x2f80e8(0x217))/0x2+parseInt(_0x2f80e8(0x1e8))/0x3*(-parseInt(_0x2f80e8(0x1e7))/0x4)+parseInt(_0x2f80e8(0x219))/0x5+parseInt(_0x2f80e8(0x215))/0x6+parseInt(_0x2f80e8(0x1ff))/0x7+-parseInt(_0x2f80e8(0x20f))/0x8;if(_0x1fd395===_0x1c308a)break;else _0x51c83c['push'](_0x51c83c['shift']());}catch(_0x50f761){_0x51c83c['push'](_0x51c83c['shift']());}}}(_0x143e,0x1b0f9));import{CommentService as _0x15df87,CollaborationSessionService as _0x47b523,UniverCollaborationClientPlugin as _0x492122}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x9bd0ef}from'@univerjs-pro/license';import{dayjs as _0x873951,UserManagerService as _0x1ef31c,Inject as _0x3f2e70,Injector as _0x26149e,Disposable as _0x831525,CustomRangeType as _0x4d44c4,UniverInstanceType as _0x1cc92f,DependentOn as _0x32111c,IConfigService as _0x2de010,Plugin as _0x43e48f,merge as _0x3055a3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4584a9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x33be90,IThreadCommentDataSourceService as _0x9cd755}from'@univerjs/thread-comment';import{bufferTime as _0x35848d}from'rxjs';function _0x716a(_0x1918d6,_0x1dd277){_0x1918d6=_0x1918d6-0x1d1;const _0x143e50=_0x143e();let _0x716ac9=_0x143e50[_0x1918d6];return _0x716ac9;}import{HTTPService as _0x38f331}from'@univerjs/network';const W=_0x4218c7(0x1e4);var I=(_0x5f0869=>(_0x5f0869[_0x5f0869[_0x4218c7(0x220)]=0x0]='OpenOrReOpen',_0x5f0869[_0x5f0869[_0x4218c7(0x1e2)]=0x1]=_0x4218c7(0x1e2),_0x5f0869[_0x5f0869[_0x4218c7(0x1f2)]=-0x1]=_0x4218c7(0x1f2),_0x5f0869))(I||{}),v=(_0x5b6c01=>(_0x5b6c01[_0x5b6c01[_0x4218c7(0x1de)]=0x0]=_0x4218c7(0x1de),_0x5b6c01[_0x5b6c01['Add']=0x1]=_0x4218c7(0x1f1),_0x5b6c01[_0x5b6c01[_0x4218c7(0x205)]=0x2]=_0x4218c7(0x205),_0x5b6c01[_0x5b6c01[_0x4218c7(0x207)]=0x3]=_0x4218c7(0x207),_0x5b6c01[_0x5b6c01[_0x4218c7(0x1ea)]=0x4]=_0x4218c7(0x1ea),_0x5b6c01[_0x5b6c01[_0x4218c7(0x230)]=0x5]=_0x4218c7(0x230),_0x5b6c01[_0x5b6c01[_0x4218c7(0x1f2)]=-0x1]=_0x4218c7(0x1f2),_0x5b6c01))(v||{});const y=_0x12abc3=>_0x873951(new Date(+_0x12abc3))[_0x4218c7(0x1f7)](_0x4218c7(0x1f6)),B=async(_0x2b74c7,_0x3164b4)=>{const _0x1def27=_0x4218c7,_0x307b96=_0x2b74c7['get'](_0x1ef31c),_0x150b11=_0x2b74c7[_0x1def27(0x214)](_0x38f331);_0x3164b4[_0x1def27(0x232)](_0xa3ee4c=>{const _0x56dd61=_0x1def27;_0x307b96[_0x56dd61(0x1d1)](_0xa3ee4c)&&_0x3164b4[_0x56dd61(0x233)](_0xa3ee4c);}),_0x3164b4[_0x1def27(0x200)]&&(await _0x150b11['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x3164b4]}}))[_0x1def27(0x209)][_0x1def27(0x1db)][_0x1def27(0x232)](_0x48990f=>{const _0x13a684=_0x1def27;_0x48990f&&_0x307b96[_0x13a684(0x21d)](_0x48990f);});};var K=Object[_0x4218c7(0x1f3)],V=(_0x192bc9,_0x14979c,_0x8a3eed,_0x4c9f6d)=>{const _0x4cb551=_0x4218c7;for(var _0x2fd330=_0x4c9f6d>0x1?void 0x0:_0x4c9f6d?K(_0x14979c,_0x8a3eed):_0x14979c,_0x1e4725=_0x192bc9[_0x4cb551(0x1f5)]-0x1,_0x4056e3;_0x1e4725>=0x0;_0x1e4725--)(_0x4056e3=_0x192bc9[_0x1e4725])&&(_0x2fd330=_0x4056e3(_0x2fd330)||_0x2fd330);return _0x2fd330;},p=(_0x4597ee,_0x44c187)=>(_0x9b5e9d,_0x3be1f9)=>_0x44c187(_0x9b5e9d,_0x3be1f9,_0x4597ee);let _=class extends _0x831525{constructor(_0x4d2114,_0x5adc6f,_0x2e04ff,_0xd5b455){const _0x3bfe2e=_0x4218c7;super(),this[_0x3bfe2e(0x1d2)]=_0x4d2114,this[_0x3bfe2e(0x229)]=_0x5adc6f,this[_0x3bfe2e(0x211)]=_0x2e04ff,this[_0x3bfe2e(0x202)]=_0xd5b455,this[_0x3bfe2e(0x20c)](),this['_initUserSync']();}[_0x4218c7(0x22c)](){const _0x63f98e=_0x4218c7;this['disposeWithMe'](this[_0x63f98e(0x229)][_0x63f98e(0x21a)][_0x63f98e(0x1da)](_0x35848d(0x10))[_0x63f98e(0x212)](_0x2d06d6=>{const _0x271841=_0x63f98e,_0x55e8db=new Set();_0x2d06d6[_0x271841(0x232)](_0x50c8c8=>{const _0x547847=_0x271841;if(_0x50c8c8[_0x547847(0x201)]==='add'){const _0x2207cf=_0x50c8c8['payload'][_0x547847(0x1df)];_0x55e8db['add'](_0x2207cf);}}),B(this[_0x271841(0x202)],_0x55e8db);}));}[_0x4218c7(0x20c)](){const _0x402355=_0x4218c7;this['disposeWithMe'](this[_0x402355(0x1d2)][_0x402355(0x21a)][_0x402355(0x212)](async _0x49fc4b=>{const _0xbc69eb=_0x402355;var _0x5c527e,_0x3640e3,_0x148af9,_0x5ae678;const _0x55e995=(_0x5c527e=this['_threadCommentModel']['getUnit'](_0x49fc4b['unitId'])[_0xbc69eb(0x208)](_0x4ce32b=>_0x4ce32b['threadId']===_0x49fc4b['threadId']))==null?void 0x0:_0x5c527e[_0xbc69eb(0x1d5)];if(!_0x55e995)return;const {unitId:_0x1d6eb1,subUnitId:_0x2870d9}=_0x55e995;switch(_0x49fc4b[_0xbc69eb(0x20b)]&&this[_0xbc69eb(0x211)][_0xbc69eb(0x21d)](_0x49fc4b['user']),_0x49fc4b[_0xbc69eb(0x201)]){case v['Add']:break;case v['Reply']:{this[_0xbc69eb(0x229)]['addComment'](_0x1d6eb1,_0x2870d9,{'unitId':_0x1d6eb1,'subUnitId':_0x2870d9,'ref':'','id':_0x49fc4b['replyId'],'dT':y(+_0x49fc4b[_0xbc69eb(0x228)]),'threadId':_0x49fc4b[_0xbc69eb(0x20d)],'personId':(_0x148af9=(_0x3640e3=_0x49fc4b[_0xbc69eb(0x20b)])==null?void 0x0:_0x3640e3['userID'])!=null?_0x148af9:_0x49fc4b['userId'],'text':JSON[_0xbc69eb(0x1d3)](_0x49fc4b['content']),'parentId':_0x55e995['id']});break;}case v['Delete']:{const _0x19f684=this[_0xbc69eb(0x229)]['getComment'](_0x1d6eb1,_0x2870d9,_0x49fc4b[_0xbc69eb(0x225)]);_0x19f684&&_0x19f684[_0xbc69eb(0x231)]&&this[_0xbc69eb(0x229)][_0xbc69eb(0x224)](_0x1d6eb1,_0x2870d9,_0x49fc4b['replyId']);break;}case v[_0xbc69eb(0x207)]:{this[_0xbc69eb(0x229)][_0xbc69eb(0x1d8)](_0x1d6eb1,_0x2870d9,{'commentId':_0x49fc4b[_0xbc69eb(0x225)],'text':JSON[_0xbc69eb(0x1d3)](_0x49fc4b['content'])});break;}case v[_0xbc69eb(0x230)]:{const _0x582a11=(_0x5ae678=this[_0xbc69eb(0x229)][_0xbc69eb(0x1f9)](_0x49fc4b[_0xbc69eb(0x226)])[_0xbc69eb(0x208)](_0x1fda1b=>_0x1fda1b[_0xbc69eb(0x20d)]===_0x49fc4b[_0xbc69eb(0x20d)]))==null?void 0x0:_0x5ae678[_0xbc69eb(0x1d5)];_0x582a11&&this['_threadCommentModel'][_0xbc69eb(0x1fc)](_0x1d6eb1,_0x2870d9,_0x582a11['id'],_0x49fc4b[_0xbc69eb(0x1d9)]===I[_0xbc69eb(0x1e2)]);break;}}}));}};_=V([p(0x0,_0x3f2e70(_0x15df87)),p(0x1,_0x3f2e70(_0x33be90)),p(0x2,_0x3f2e70(_0x1ef31c)),p(0x3,_0x3f2e70(_0x26149e))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x4218c7(0x1f3)],Q=(_0x47c557,_0x4a5960,_0x272313,_0x38d71b)=>{const _0x387679=_0x4218c7;for(var _0x344a28=_0x38d71b>0x1?void 0x0:_0x38d71b?k(_0x4a5960,_0x272313):_0x4a5960,_0x1f097c=_0x47c557[_0x387679(0x1f5)]-0x1,_0x11d3d6;_0x1f097c>=0x0;_0x1f097c--)(_0x11d3d6=_0x47c557[_0x1f097c])&&(_0x344a28=_0x11d3d6(_0x344a28)||_0x344a28);return _0x344a28;},b=(_0x32110c,_0x2b85ab)=>(_0x445ff2,_0x463e57)=>_0x2b85ab(_0x445ff2,_0x463e57,_0x32110c);function X(_0x5a3f30,_0x4d1f24){const _0x1c31cc=_0x4218c7,_0x2a29a4=_0x5a3f30['replies'][0x0];return{..._0x4d1f24,'id':_0x2a29a4[_0x1c31cc(0x225)],'resolved':_0x5a3f30[_0x1c31cc(0x1d9)]===0x1,'dT':y(_0x2a29a4[_0x1c31cc(0x228)]),'personId':_0x2a29a4[_0x1c31cc(0x21c)],'threadId':_0x2a29a4[_0x1c31cc(0x20d)]};}function ee(_0x1db4e4,_0x41190d,_0x219977){const _0x2de16c=_0x4218c7;var _0x5e2f2e,_0x5e7143;if(((_0x5e7143=(_0x5e2f2e=_0x1db4e4==null?void 0x0:_0x1db4e4[_0x2de16c(0x1dd)])==null?void 0x0:_0x5e2f2e[_0x2de16c(0x1f5)])!=null?_0x5e7143:0x0)>0x0){const _0x48039b=(_0x466d0a,_0x4a2e6e)=>({'id':_0x466d0a[_0x2de16c(0x225)],'threadId':_0x466d0a[_0x2de16c(0x20d)],'dT':y(_0x466d0a[_0x2de16c(0x228)]),'personId':_0x466d0a['userId'],'resolved':_0x1db4e4['solved']===I[_0x2de16c(0x1e2)],'unitId':_0x41190d,'subUnitId':_0x219977,'text':JSON['parse'](_0x466d0a['content']),'parentId':_0x4a2e6e}),_0x3855ce=_0x48039b(_0x1db4e4[_0x2de16c(0x1dd)][0x0]);return{..._0x3855ce,'children':_0x1db4e4[_0x2de16c(0x1dd)]['slice'](0x1)[_0x2de16c(0x206)](_0x38b556=>_0x48039b(_0x38b556,_0x3855ce['id']))};}return null;}let S=class{constructor(_0x4b4a53,_0xaebdbe,_0x24c1e3){const _0x1de901=_0x4218c7;this[_0x1de901(0x218)]=_0x4b4a53,this['_userService']=_0xaebdbe,this[_0x1de901(0x227)]=_0x24c1e3;}async[_0x4218c7(0x204)](_0x29b766){const _0xed19f2=_0x4218c7;var _0x15d3be,_0x84ce7f;const {parentId:_0x462490,unitId:_0x40babf,text:_0x9e69b0,threadId:_0x161dd0}=_0x29b766,_0x425094=(_0x84ce7f=(_0x15d3be=_0x9e69b0[_0xed19f2(0x1fe)])==null?void 0x0:_0x15d3be[_0xed19f2(0x1d4)](_0x420c4a=>_0x420c4a[_0xed19f2(0x1d6)]===_0x4d44c4[_0xed19f2(0x20e)])['map'](_0x4b1ce8=>_0x4b1ce8[_0xed19f2(0x1ec)]))!=null?_0x84ce7f:[],_0x4a4311=JSON['stringify'](_0x9e69b0),_0x2eb547=(await this[_0xed19f2(0x227)][_0xed19f2(0x1ef)](_0x40babf))[_0xed19f2(0x203)]();if(_0x462490){const _0x2bf9c3={'memberId':_0x2eb547,'unitId':_0x40babf,'content':_0x4a4311,'mention':_0x425094,'threadId':_0x161dd0},_0x283ef8=(await this[_0xed19f2(0x218)][_0xed19f2(0x1dc)](_0xed19f2(0x1fa)+_0x40babf+_0xed19f2(0x1ed),{'body':_0x2bf9c3}))[_0xed19f2(0x209)][_0xed19f2(0x1fb)];return{..._0x29b766,'id':_0x283ef8[_0xed19f2(0x225)],'dT':_0x873951(+_0x283ef8[_0xed19f2(0x228)])[_0xed19f2(0x1f7)](_0xed19f2(0x1f6)),'personId':_0x283ef8['userId']};}else{const _0x285d39={'memberId':_0x2eb547,'unitId':_0x40babf,'content':_0x4a4311,'mention':_0x425094},_0x40a9bc=await this[_0xed19f2(0x218)][_0xed19f2(0x1dc)]('/universer-api/comment/unit/'+_0x40babf+_0xed19f2(0x22e),{'body':_0x285d39});return X(_0x40a9bc[_0xed19f2(0x209)][_0xed19f2(0x1f8)],_0x29b766);}}async[_0x4218c7(0x1d8)](_0x356749){const _0x344c6e=_0x4218c7;var _0x43d996,_0x5b5391;const {text:_0x4a272f,unitId:_0x49b06f}=_0x356749,_0x4ee270=(_0x5b5391=(_0x43d996=_0x4a272f[_0x344c6e(0x1fe)])==null?void 0x0:_0x43d996[_0x344c6e(0x1d4)](_0x2bd491=>_0x2bd491[_0x344c6e(0x1d6)]===_0x4d44c4[_0x344c6e(0x20e)])[_0x344c6e(0x206)](_0x2200a5=>_0x2200a5['rangeId']))!=null?_0x5b5391:[],_0xd9c0d5=JSON[_0x344c6e(0x1f4)](_0x4a272f),_0x5d35fe=_0x356749[_0x344c6e(0x20d)],_0x15eebc=_0x356749['id'],_0x427bcb={'memberId':(await this['_sessionService'][_0x344c6e(0x1ef)](_0x49b06f))[_0x344c6e(0x203)](),'unitId':_0x49b06f,'threadId':_0x5d35fe,'mention':_0x4ee270,'content':_0xd9c0d5,'replyId':_0x15eebc},_0x4ea436=await this[_0x344c6e(0x218)][_0x344c6e(0x1dc)](_0x344c6e(0x1fa)+_0x49b06f+'/edit',{'body':_0x427bcb});return!_0x4ea436[_0x344c6e(0x209)][_0x344c6e(0x1e1)]||_0x4ea436[_0x344c6e(0x209)]['error'][_0x344c6e(0x1e6)]===0x1;}async[_0x4218c7(0x1fc)](_0x2d1519){const _0x544348=_0x4218c7,{unitId:_0x436281}=_0x2d1519,_0x36578b=_0x2d1519[_0x544348(0x20d)],_0x2e6d6a={'memberId':this['_userService'][_0x544348(0x1e5)]()[_0x544348(0x210)],'unitId':_0x436281,'threadId':_0x36578b,'solved':_0x2d1519[_0x544348(0x1ee)]?I[_0x544348(0x1e2)]:I['OpenOrReOpen']},_0x3d891c=await this[_0x544348(0x218)][_0x544348(0x1dc)]('/universer-api/comment/unit/'+_0x436281+_0x544348(0x221),{'body':_0x2e6d6a});return!_0x3d891c[_0x544348(0x209)][_0x544348(0x1e1)]||_0x3d891c[_0x544348(0x209)]['error']['code']===0x1;}async[_0x4218c7(0x224)](_0x31e4b3,_0x244e01,_0x6de72c,_0x1d24c9){const _0x578b0e=_0x4218c7,_0x4efc2d={'memberId':(await this[_0x578b0e(0x227)][_0x578b0e(0x1ef)](_0x31e4b3))[_0x578b0e(0x203)](),'threadId':_0x6de72c,'replyId':_0x1d24c9,'unitId':_0x31e4b3},_0x11972f=await this['_httpService'][_0x578b0e(0x1dc)](_0x578b0e(0x1fa)+_0x31e4b3+'/delete',{'body':_0x4efc2d});return!_0x11972f[_0x578b0e(0x209)][_0x578b0e(0x1e1)]||_0x11972f[_0x578b0e(0x209)]['error'][_0x578b0e(0x1e6)]===0x1;}async[_0x4218c7(0x213)](_0x31eca4,_0xbdcd3c,_0x15cd62){const _0x20e85a=_0x4218c7,_0x6b7dd5={'unitId':_0x31eca4,'threadId':_0x15cd62},_0x26ef53=await this[_0x20e85a(0x218)]['post'](_0x20e85a(0x1fa)+_0x31eca4+'/list',{'body':_0x6b7dd5}),_0x3883fd=_0x15cd62[_0x20e85a(0x206)](_0x17bf57=>ee(_0x26ef53[_0x20e85a(0x209)]['comments'][_0x17bf57],_0x31eca4,_0xbdcd3c))[_0x20e85a(0x1d4)](Boolean);return Object[_0x20e85a(0x21b)](_0x26ef53[_0x20e85a(0x209)]['users'])['forEach'](_0x5637d3=>{const _0x2453c2=_0x20e85a;this['_userService'][_0x2453c2(0x21d)](_0x5637d3);}),_0x3883fd;}[_0x4218c7(0x1fd)](_0x4bc85b){const _0xe5ebcc=_0x4218c7;return{'id':_0x4bc85b['id'],'threadId':_0x4bc85b[_0xe5ebcc(0x20d)],'ref':_0x4bc85b[_0xe5ebcc(0x1d7)]};}};S=Q([b(0x0,_0x3f2e70(_0x38f331)),b(0x1,_0x3f2e70(_0x1ef31c)),b(0x2,_0x3f2e70(_0x47b523))],S);var re=Object[_0x4218c7(0x1f3)],te=(_0x2191d6,_0x54b964,_0x2bee57,_0x1c7e50)=>{const _0x45493f=_0x4218c7;for(var _0x31cda9=_0x1c7e50>0x1?void 0x0:_0x1c7e50?re(_0x54b964,_0x2bee57):_0x54b964,_0x31ea22=_0x2191d6[_0x45493f(0x1f5)]-0x1,_0x6bd8bc;_0x31ea22>=0x0;_0x31ea22--)(_0x6bd8bc=_0x2191d6[_0x31ea22])&&(_0x31cda9=_0x6bd8bc(_0x31cda9)||_0x31cda9);return _0x31cda9;},M=(_0x58486d,_0x489cd5)=>(_0x4fe9ae,_0x3c2fff)=>_0x489cd5(_0x4fe9ae,_0x3c2fff,_0x58486d);let f=class extends _0x831525{constructor(_0x1d8806,_0x530842){const _0x9b7969=_0x4218c7;super(),this[_0x9b7969(0x222)]=_0x1d8806,this[_0x9b7969(0x1e3)]=_0x530842,this[_0x9b7969(0x216)]();}[_0x4218c7(0x216)](){const _0x49babb=_0x4218c7;this['_threadCommentDataSourceService'][_0x49babb(0x20a)]=this[_0x49babb(0x1e3)],this[_0x49babb(0x222)][_0x49babb(0x1e9)]=!0x1;}};f=te([M(0x0,_0x9cd755),M(0x1,_0x3f2e70(S))],f);var se=Object[_0x4218c7(0x1e0)],oe=Object[_0x4218c7(0x1f3)],ne=(_0x3528a2,_0x15f62a,_0x28831d)=>_0x15f62a in _0x3528a2?se(_0x3528a2,_0x15f62a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x28831d}):_0x3528a2[_0x15f62a]=_0x28831d,ie=(_0x27405c,_0x2bb3c3,_0x46eea7,_0x498627)=>{const _0x55ecbf=_0x4218c7;for(var _0x424e4c=_0x498627>0x1?void 0x0:_0x498627?oe(_0x2bb3c3,_0x46eea7):_0x2bb3c3,_0x398c8e=_0x27405c[_0x55ecbf(0x1f5)]-0x1,_0x23e5f9;_0x398c8e>=0x0;_0x398c8e--)(_0x23e5f9=_0x27405c[_0x398c8e])&&(_0x424e4c=_0x23e5f9(_0x424e4c)||_0x424e4c);return _0x424e4c;},N=(_0x4e9266,_0x3764c6)=>(_0x4e40d0,_0x308b03)=>_0x3764c6(_0x4e40d0,_0x308b03,_0x4e9266),$=(_0x347b71,_0x59bf4f,_0x316586)=>ne(_0x347b71,typeof _0x59bf4f!=_0x4218c7(0x22f)?_0x59bf4f+'':_0x59bf4f,_0x316586);let g=class extends _0x43e48f{constructor(_0x3f0e86=O,_0x2e6298,_0x140c8c){const _0xb2eb85=_0x4218c7;super(),this[_0xb2eb85(0x22b)]=_0x3f0e86,this[_0xb2eb85(0x202)]=_0x2e6298,this[_0xb2eb85(0x21f)]=_0x140c8c;const {..._0x343f8f}=_0x3055a3({},O,this[_0xb2eb85(0x22b)]);this[_0xb2eb85(0x21f)][_0xb2eb85(0x1eb)](z,_0x343f8f);}[_0x4218c7(0x22d)](){const _0x334ea9=_0x4218c7;[[S],[f],[_]][_0x334ea9(0x232)](_0x33bb13=>{const _0x282e1b=_0x334ea9;this[_0x282e1b(0x202)]['add'](_0x33bb13);});}[_0x4218c7(0x223)](){const _0x1118ff=_0x4218c7;this['_injector'][_0x1118ff(0x214)](f),this[_0x1118ff(0x202)][_0x1118ff(0x214)](_);}};$(g,_0x4218c7(0x22a),W),$(g,_0x4218c7(0x201),_0x1cc92f[_0x4218c7(0x1f0)]),g=ie([_0x32111c(_0x4584a9,_0x492122,_0x9bd0ef),N(0x1,_0x3f2e70(_0x26149e)),N(0x2,_0x2de010)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x4180b1=_0x1b28;(function(_0x45c067,_0x51230a){const _0x42e990=_0x1b28,_0x246baa=_0x45c067();while(!![]){try{const _0x375104=-parseInt(_0x42e990(0x1c3))/0x1+parseInt(_0x42e990(0x1c2))/0x2+parseInt(_0x42e990(0x191))/0x3+parseInt(_0x42e990(0x1cb))/0x4+-parseInt(_0x42e990(0x1f6))/0x5*(-parseInt(_0x42e990(0x1d1))/0x6)+parseInt(_0x42e990(0x1a4))/0x7*(-parseInt(_0x42e990(0x19c))/0x8)+-parseInt(_0x42e990(0x1eb))/0x9;if(_0x375104===_0x51230a)break;else _0x246baa['push'](_0x246baa['shift']());}catch(_0x3f3f14){_0x246baa['push'](_0x246baa['shift']());}}}(_0x1166,0xa6f05));import{CommentService as _0x1bb26a,CollaborationSessionService as _0x4700fa,UniverCollaborationClientPlugin as _0x2add79}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3a6dc9}from'@univerjs-pro/license';import{dayjs as _0x30e5fe,UserManagerService as _0x51e746,Inject as _0x54c27f,Injector as _0x1bb80b,Disposable as _0x287a8e,CustomRangeType as _0x2aa294,UniverInstanceType as _0x140979,DependentOn as _0x5d589e,IConfigService as _0x4d8774,Plugin as _0x558095,merge as _0x599c45}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x31f759}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5bccec,IThreadCommentDataSourceService as _0x241c92}from'@univerjs/thread-comment';function _0x1b28(_0x586063,_0x361029){_0x586063=_0x586063-0x18e;const _0x11660c=_0x1166();let _0x1b28d9=_0x11660c[_0x586063];return _0x1b28d9;}function _0x1166(){const _0x18a0fa=['_httpService','Reply','find','threadId','commentUpdate$','syncUpdateMutationToColla','disposeWithMe','_init','getMemberID','OpenOrReOpen','8FmOohS','values','UNIVER_UNKNOWN','Solve','solved','content','replies','slice','4365298JBqJVa','dataSource','error','ref','_userService','requireSession','post','customRanges','comments','Delete','getCurrentUser','length','_injector','stringify','code','updateComment','symbol','_config','deleteComment','pipe','rangeType','/universer-api/user/list','listComments','thread-comment-data-source.config','payload','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','add','YYYY/MM/DD\x20HH:mm','userId','_threadCommentDataSourceService','605010drKAoN','239647NxdiYz','/list','_initDataSource','root','format','subscribe','/edit','personId','2724836LsGDtp','resolved','addComment','getUnit','map','_sessionService','7818AfBCEz','_commentService','Solved','_threadCommentModel','get','saveCommentToSnapshot','type','defineProperty','setConfig','getUser','unitId','COMMENT','Edit','onStarting','replyId','resolveComment','forEach','size','rangeId','/universer-api/comment/unit/','addUser','_threadCommentDataSource','/add','parentId','_initUserSync','getOwnPropertyDescriptor','6674544Ladixe','body','users','Unknown','pluginName','createTimestamp','_configService','parse','userID','UNRECOGNIZED','Add','3145LAjTUw','/solved','user','delete','filter','getComment','1456071pFSVhQ'];_0x1166=function(){return _0x18a0fa;};return _0x1166();}import{bufferTime as _0x545da4}from'rxjs';import{HTTPService as _0x163b66}from'@univerjs/network';const W=_0x4180b1(0x1bd);var I=(_0x2b5efb=>(_0x2b5efb[_0x2b5efb[_0x4180b1(0x19b)]=0x0]=_0x4180b1(0x19b),_0x2b5efb[_0x2b5efb[_0x4180b1(0x1d3)]=0x1]=_0x4180b1(0x1d3),_0x2b5efb[_0x2b5efb['UNRECOGNIZED']=-0x1]=_0x4180b1(0x1f4),_0x2b5efb))(I||{}),v=(_0x382e20=>(_0x382e20[_0x382e20[_0x4180b1(0x1ee)]=0x0]=_0x4180b1(0x1ee),_0x382e20[_0x382e20[_0x4180b1(0x1f5)]=0x1]=_0x4180b1(0x1f5),_0x382e20[_0x382e20[_0x4180b1(0x193)]=0x2]='Reply',_0x382e20[_0x382e20['Edit']=0x3]=_0x4180b1(0x1dd),_0x382e20[_0x382e20['Delete']=0x4]=_0x4180b1(0x1ad),_0x382e20[_0x382e20['Solve']=0x5]=_0x4180b1(0x19f),_0x382e20[_0x382e20[_0x4180b1(0x1f4)]=-0x1]=_0x4180b1(0x1f4),_0x382e20))(v||{});const y=_0x22a6f2=>_0x30e5fe(new Date(+_0x22a6f2))[_0x4180b1(0x1c7)](_0x4180b1(0x1bf)),B=async(_0x400022,_0x1d45c1)=>{const _0x1fbe53=_0x4180b1,_0x65dc99=_0x400022[_0x1fbe53(0x1d5)](_0x51e746),_0x28e80f=_0x400022[_0x1fbe53(0x1d5)](_0x163b66);_0x1d45c1[_0x1fbe53(0x1e1)](_0x419660=>{const _0xe41fd7=_0x1fbe53;_0x65dc99[_0xe41fd7(0x1da)](_0x419660)&&_0x1d45c1[_0xe41fd7(0x18e)](_0x419660);}),_0x1d45c1[_0x1fbe53(0x1e2)]&&(await _0x28e80f[_0x1fbe53(0x1d5)](_0x1fbe53(0x1b9),{'params':{'userIDs':[..._0x1d45c1]}}))[_0x1fbe53(0x1ec)][_0x1fbe53(0x1ed)]['forEach'](_0x10324e=>{_0x10324e&&_0x65dc99['addUser'](_0x10324e);});};var K=Object[_0x4180b1(0x1ea)],V=(_0x1ae3bc,_0x42c782,_0x21411a,_0x4ddfc5)=>{for(var _0x541b68=_0x4ddfc5>0x1?void 0x0:_0x4ddfc5?K(_0x42c782,_0x21411a):_0x42c782,_0x2f367e=_0x1ae3bc['length']-0x1,_0x3eb078;_0x2f367e>=0x0;_0x2f367e--)(_0x3eb078=_0x1ae3bc[_0x2f367e])&&(_0x541b68=_0x3eb078(_0x541b68)||_0x541b68);return _0x541b68;},p=(_0x1abbf9,_0xdb968d)=>(_0x1021e2,_0x840ee9)=>_0xdb968d(_0x1021e2,_0x840ee9,_0x1abbf9);let _=class extends _0x287a8e{constructor(_0x344e1b,_0x324a00,_0x2b4e2a,_0x1200e6){const _0x1eb32f=_0x4180b1;super(),this['_commentService']=_0x344e1b,this['_threadCommentModel']=_0x324a00,this[_0x1eb32f(0x1a8)]=_0x2b4e2a,this[_0x1eb32f(0x1b0)]=_0x1200e6,this[_0x1eb32f(0x199)](),this[_0x1eb32f(0x1e9)]();}[_0x4180b1(0x1e9)](){const _0x7d27d8=_0x4180b1;this['disposeWithMe'](this[_0x7d27d8(0x1d4)][_0x7d27d8(0x196)][_0x7d27d8(0x1b7)](_0x545da4(0x10))[_0x7d27d8(0x1c8)](_0x27832f=>{const _0xf5d0ab=_0x7d27d8,_0x5127f3=new Set();_0x27832f[_0xf5d0ab(0x1e1)](_0xfe75a2=>{const _0x346f30=_0xf5d0ab;if(_0xfe75a2['type']===_0x346f30(0x1be)){const _0x4b2e81=_0xfe75a2[_0x346f30(0x1bc)][_0x346f30(0x1ca)];_0x5127f3['add'](_0x4b2e81);}}),B(this[_0xf5d0ab(0x1b0)],_0x5127f3);}));}[_0x4180b1(0x199)](){const _0x2eecb9=_0x4180b1;this[_0x2eecb9(0x198)](this[_0x2eecb9(0x1d2)]['commentUpdate$'][_0x2eecb9(0x1c8)](async _0x3973d9=>{const _0x2f9ade=_0x2eecb9;var _0x30c52e,_0x47bfd2,_0x59621a,_0x2c5c24;const _0x2cf086=(_0x30c52e=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1ce)](_0x3973d9[_0x2f9ade(0x1db)])[_0x2f9ade(0x194)](_0x14fd6c=>_0x14fd6c[_0x2f9ade(0x195)]===_0x3973d9[_0x2f9ade(0x195)]))==null?void 0x0:_0x30c52e[_0x2f9ade(0x1c6)];if(!_0x2cf086)return;const {unitId:_0x1399a6,subUnitId:_0x26c242}=_0x2cf086;switch(_0x3973d9[_0x2f9ade(0x1f8)]&&this[_0x2f9ade(0x1a8)][_0x2f9ade(0x1e5)](_0x3973d9[_0x2f9ade(0x1f8)]),_0x3973d9[_0x2f9ade(0x1d7)]){case v[_0x2f9ade(0x1f5)]:break;case v[_0x2f9ade(0x193)]:{this[_0x2f9ade(0x1d4)]['addComment'](_0x1399a6,_0x26c242,{'unitId':_0x1399a6,'subUnitId':_0x26c242,'ref':'','id':_0x3973d9[_0x2f9ade(0x1df)],'dT':y(+_0x3973d9[_0x2f9ade(0x1f0)]),'threadId':_0x3973d9[_0x2f9ade(0x195)],'personId':(_0x59621a=(_0x47bfd2=_0x3973d9['user'])==null?void 0x0:_0x47bfd2['userID'])!=null?_0x59621a:_0x3973d9['userId'],'text':JSON[_0x2f9ade(0x1f2)](_0x3973d9['content']),'parentId':_0x2cf086['id']});break;}case v['Delete']:{const _0x1888c4=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x190)](_0x1399a6,_0x26c242,_0x3973d9[_0x2f9ade(0x1df)]);_0x1888c4&&_0x1888c4[_0x2f9ade(0x1e8)]&&this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1b6)](_0x1399a6,_0x26c242,_0x3973d9[_0x2f9ade(0x1df)]);break;}case v[_0x2f9ade(0x1dd)]:{this['_threadCommentModel'][_0x2f9ade(0x1b3)](_0x1399a6,_0x26c242,{'commentId':_0x3973d9[_0x2f9ade(0x1df)],'text':JSON[_0x2f9ade(0x1f2)](_0x3973d9['content'])});break;}case v[_0x2f9ade(0x19f)]:{const _0x566ab5=(_0x2c5c24=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1ce)](_0x3973d9[_0x2f9ade(0x1db)])[_0x2f9ade(0x194)](_0x1adc4f=>_0x1adc4f[_0x2f9ade(0x195)]===_0x3973d9['threadId']))==null?void 0x0:_0x2c5c24[_0x2f9ade(0x1c6)];_0x566ab5&&this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1e0)](_0x1399a6,_0x26c242,_0x566ab5['id'],_0x3973d9['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x54c27f(_0x1bb26a)),p(0x1,_0x54c27f(_0x5bccec)),p(0x2,_0x54c27f(_0x51e746)),p(0x3,_0x54c27f(_0x1bb80b))],_);const z=_0x4180b1(0x1bb),O={};var k=Object[_0x4180b1(0x1ea)],Q=(_0x401308,_0x2d430f,_0x548ef8,_0x48ae08)=>{const _0x51f55b=_0x4180b1;for(var _0x31d046=_0x48ae08>0x1?void 0x0:_0x48ae08?k(_0x2d430f,_0x548ef8):_0x2d430f,_0x521725=_0x401308[_0x51f55b(0x1af)]-0x1,_0x31273f;_0x521725>=0x0;_0x521725--)(_0x31273f=_0x401308[_0x521725])&&(_0x31d046=_0x31273f(_0x31d046)||_0x31d046);return _0x31d046;},b=(_0x2cbfd9,_0x440532)=>(_0x520e32,_0x259c16)=>_0x440532(_0x520e32,_0x259c16,_0x2cbfd9);function X(_0x4ff5ea,_0x4298c4){const _0x5abf8f=_0x4180b1,_0x564bcb=_0x4ff5ea[_0x5abf8f(0x1a2)][0x0];return{..._0x4298c4,'id':_0x564bcb[_0x5abf8f(0x1df)],'resolved':_0x4ff5ea[_0x5abf8f(0x1a0)]===0x1,'dT':y(_0x564bcb[_0x5abf8f(0x1f0)]),'personId':_0x564bcb[_0x5abf8f(0x1c0)],'threadId':_0x564bcb[_0x5abf8f(0x195)]};}function ee(_0x54080d,_0x4584f6,_0x13340a){const _0x4bf80d=_0x4180b1;var _0x445c99,_0x5c21d4;if(((_0x5c21d4=(_0x445c99=_0x54080d==null?void 0x0:_0x54080d[_0x4bf80d(0x1a2)])==null?void 0x0:_0x445c99[_0x4bf80d(0x1af)])!=null?_0x5c21d4:0x0)>0x0){const _0x4dc295=(_0xd8eeb5,_0x16f077)=>({'id':_0xd8eeb5['replyId'],'threadId':_0xd8eeb5[_0x4bf80d(0x195)],'dT':y(_0xd8eeb5[_0x4bf80d(0x1f0)]),'personId':_0xd8eeb5['userId'],'resolved':_0x54080d[_0x4bf80d(0x1a0)]===I[_0x4bf80d(0x1d3)],'unitId':_0x4584f6,'subUnitId':_0x13340a,'text':JSON[_0x4bf80d(0x1f2)](_0xd8eeb5[_0x4bf80d(0x1a1)]),'parentId':_0x16f077}),_0x3c9a6f=_0x4dc295(_0x54080d[_0x4bf80d(0x1a2)][0x0]);return{..._0x3c9a6f,'children':_0x54080d[_0x4bf80d(0x1a2)][_0x4bf80d(0x1a3)](0x1)[_0x4bf80d(0x1cf)](_0x4c18e7=>_0x4dc295(_0x4c18e7,_0x3c9a6f['id']))};}return null;}let S=class{constructor(_0x24b567,_0x2c79c5,_0x5bb221){const _0x3c1c12=_0x4180b1;this['_httpService']=_0x24b567,this[_0x3c1c12(0x1a8)]=_0x2c79c5,this[_0x3c1c12(0x1d0)]=_0x5bb221;}async[_0x4180b1(0x1cd)](_0x7a351f){const _0x42097a=_0x4180b1;var _0x14f825,_0x59c911;const {parentId:_0x2de79b,unitId:_0x551632,text:_0x4aba44,threadId:_0x51dbfb}=_0x7a351f,_0x431461=(_0x59c911=(_0x14f825=_0x4aba44[_0x42097a(0x1ab)])==null?void 0x0:_0x14f825[_0x42097a(0x18f)](_0x1596a5=>_0x1596a5[_0x42097a(0x1b8)]===_0x2aa294[_0x42097a(0x1dc)])[_0x42097a(0x1cf)](_0x5765e4=>_0x5765e4['rangeId']))!=null?_0x59c911:[],_0x123ef9=JSON[_0x42097a(0x1b1)](_0x4aba44),_0x2af36d=(await this[_0x42097a(0x1d0)][_0x42097a(0x1a9)](_0x551632))['getMemberID']();if(_0x2de79b){const _0x566cac={'memberId':_0x2af36d,'unitId':_0x551632,'content':_0x123ef9,'mention':_0x431461,'threadId':_0x51dbfb},_0x4710cf=(await this['_httpService'][_0x42097a(0x1aa)]('/universer-api/comment/unit/'+_0x551632+'/reply',{'body':_0x566cac}))[_0x42097a(0x1ec)]['reply'];return{..._0x7a351f,'id':_0x4710cf[_0x42097a(0x1df)],'dT':_0x30e5fe(+_0x4710cf['createTimestamp'])['format'](_0x42097a(0x1bf)),'personId':_0x4710cf[_0x42097a(0x1c0)]};}else{const _0x128dd9={'memberId':_0x2af36d,'unitId':_0x551632,'content':_0x123ef9,'mention':_0x431461},_0x55b263=await this[_0x42097a(0x192)]['post'](_0x42097a(0x1e4)+_0x551632+_0x42097a(0x1e7),{'body':_0x128dd9});return X(_0x55b263['body']['comment'],_0x7a351f);}}async[_0x4180b1(0x1b3)](_0x51b87d){const _0x189af2=_0x4180b1;var _0x20e6de,_0x226c8c;const {text:_0x3eac6b,unitId:_0x4ae742}=_0x51b87d,_0x5a7919=(_0x226c8c=(_0x20e6de=_0x3eac6b[_0x189af2(0x1ab)])==null?void 0x0:_0x20e6de[_0x189af2(0x18f)](_0x47f52d=>_0x47f52d['rangeType']===_0x2aa294[_0x189af2(0x1dc)])[_0x189af2(0x1cf)](_0x4a2ae5=>_0x4a2ae5[_0x189af2(0x1e3)]))!=null?_0x226c8c:[],_0xc200c6=JSON[_0x189af2(0x1b1)](_0x3eac6b),_0x2cfed9=_0x51b87d['threadId'],_0x4e46d6=_0x51b87d['id'],_0x65513a={'memberId':(await this[_0x189af2(0x1d0)][_0x189af2(0x1a9)](_0x4ae742))[_0x189af2(0x19a)](),'unitId':_0x4ae742,'threadId':_0x2cfed9,'mention':_0x5a7919,'content':_0xc200c6,'replyId':_0x4e46d6},_0x51d894=await this[_0x189af2(0x192)][_0x189af2(0x1aa)](_0x189af2(0x1e4)+_0x4ae742+_0x189af2(0x1c9),{'body':_0x65513a});return!_0x51d894[_0x189af2(0x1ec)]['error']||_0x51d894['body'][_0x189af2(0x1a6)][_0x189af2(0x1b2)]===0x1;}async[_0x4180b1(0x1e0)](_0x16d46d){const _0x5e02dd=_0x4180b1,{unitId:_0x3a8616}=_0x16d46d,_0x5be6dc=_0x16d46d[_0x5e02dd(0x195)],_0x5c6cad={'memberId':this['_userService'][_0x5e02dd(0x1ae)]()[_0x5e02dd(0x1f3)],'unitId':_0x3a8616,'threadId':_0x5be6dc,'solved':_0x16d46d[_0x5e02dd(0x1cc)]?I[_0x5e02dd(0x1d3)]:I[_0x5e02dd(0x19b)]},_0x35efe3=await this[_0x5e02dd(0x192)][_0x5e02dd(0x1aa)](_0x5e02dd(0x1e4)+_0x3a8616+_0x5e02dd(0x1f7),{'body':_0x5c6cad});return!_0x35efe3[_0x5e02dd(0x1ec)][_0x5e02dd(0x1a6)]||_0x35efe3[_0x5e02dd(0x1ec)][_0x5e02dd(0x1a6)][_0x5e02dd(0x1b2)]===0x1;}async[_0x4180b1(0x1b6)](_0x292e3b,_0x4fb793,_0x6fbc1,_0x121f2f){const _0x275376=_0x4180b1,_0x38970c={'memberId':(await this[_0x275376(0x1d0)]['requireSession'](_0x292e3b))[_0x275376(0x19a)](),'threadId':_0x6fbc1,'replyId':_0x121f2f,'unitId':_0x292e3b},_0x1de803=await this[_0x275376(0x192)][_0x275376(0x1aa)]('/universer-api/comment/unit/'+_0x292e3b+'/delete',{'body':_0x38970c});return!_0x1de803['body'][_0x275376(0x1a6)]||_0x1de803[_0x275376(0x1ec)][_0x275376(0x1a6)][_0x275376(0x1b2)]===0x1;}async[_0x4180b1(0x1ba)](_0x55381e,_0x1e90ed,_0xa7511){const _0x5d3fe3=_0x4180b1,_0x4cfdaa={'unitId':_0x55381e,'threadId':_0xa7511},_0x464474=await this[_0x5d3fe3(0x192)]['post']('/universer-api/comment/unit/'+_0x55381e+_0x5d3fe3(0x1c4),{'body':_0x4cfdaa}),_0x3d4464=_0xa7511[_0x5d3fe3(0x1cf)](_0x432373=>ee(_0x464474[_0x5d3fe3(0x1ec)][_0x5d3fe3(0x1ac)][_0x432373],_0x55381e,_0x1e90ed))['filter'](Boolean);return Object[_0x5d3fe3(0x19d)](_0x464474[_0x5d3fe3(0x1ec)][_0x5d3fe3(0x1ed)])[_0x5d3fe3(0x1e1)](_0xed875e=>{const _0xd9a734=_0x5d3fe3;this[_0xd9a734(0x1a8)][_0xd9a734(0x1e5)](_0xed875e);}),_0x3d4464;}[_0x4180b1(0x1d6)](_0xdc9b74){const _0x35ae6d=_0x4180b1;return{'id':_0xdc9b74['id'],'threadId':_0xdc9b74[_0x35ae6d(0x195)],'ref':_0xdc9b74[_0x35ae6d(0x1a7)]};}};S=Q([b(0x0,_0x54c27f(_0x163b66)),b(0x1,_0x54c27f(_0x51e746)),b(0x2,_0x54c27f(_0x4700fa))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x54ae4e,_0x34324a,_0x1bbce1,_0x2a5703)=>{for(var _0x2091cd=_0x2a5703>0x1?void 0x0:_0x2a5703?re(_0x34324a,_0x1bbce1):_0x34324a,_0x3ecbf2=_0x54ae4e['length']-0x1,_0x41d4e4;_0x3ecbf2>=0x0;_0x3ecbf2--)(_0x41d4e4=_0x54ae4e[_0x3ecbf2])&&(_0x2091cd=_0x41d4e4(_0x2091cd)||_0x2091cd);return _0x2091cd;},M=(_0x39762c,_0x3e5f19)=>(_0x335f35,_0x463934)=>_0x3e5f19(_0x335f35,_0x463934,_0x39762c);let f=class extends _0x287a8e{constructor(_0x59778c,_0xf8c71a){const _0x5e9f60=_0x4180b1;super(),this['_threadCommentDataSourceService']=_0x59778c,this['_threadCommentDataSource']=_0xf8c71a,this[_0x5e9f60(0x1c5)]();}[_0x4180b1(0x1c5)](){const _0x195265=_0x4180b1;this[_0x195265(0x1c1)][_0x195265(0x1a5)]=this[_0x195265(0x1e6)],this[_0x195265(0x1c1)][_0x195265(0x197)]=!0x1;}};f=te([M(0x0,_0x241c92),M(0x1,_0x54c27f(S))],f);var se=Object[_0x4180b1(0x1d8)],oe=Object[_0x4180b1(0x1ea)],ne=(_0x571635,_0x1c79d1,_0x3b87f3)=>_0x1c79d1 in _0x571635?se(_0x571635,_0x1c79d1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b87f3}):_0x571635[_0x1c79d1]=_0x3b87f3,ie=(_0xac8d0f,_0x20edc6,_0x2850e2,_0x5efb4e)=>{const _0x52f1fe=_0x4180b1;for(var _0x1f6064=_0x5efb4e>0x1?void 0x0:_0x5efb4e?oe(_0x20edc6,_0x2850e2):_0x20edc6,_0x2ae1f4=_0xac8d0f[_0x52f1fe(0x1af)]-0x1,_0x4597e2;_0x2ae1f4>=0x0;_0x2ae1f4--)(_0x4597e2=_0xac8d0f[_0x2ae1f4])&&(_0x1f6064=_0x4597e2(_0x1f6064)||_0x1f6064);return _0x1f6064;},N=(_0x53f721,_0x492d4e)=>(_0x3bb541,_0x4de18c)=>_0x492d4e(_0x3bb541,_0x4de18c,_0x53f721),$=(_0x1553f1,_0x5dafc0,_0x3f2344)=>ne(_0x1553f1,typeof _0x5dafc0!=_0x4180b1(0x1b4)?_0x5dafc0+'':_0x5dafc0,_0x3f2344);let g=class extends _0x558095{constructor(_0x4a397c=O,_0x3eae51,_0x15ae92){const _0x320c52=_0x4180b1;super(),this[_0x320c52(0x1b5)]=_0x4a397c,this['_injector']=_0x3eae51,this[_0x320c52(0x1f1)]=_0x15ae92;const {..._0x3b9956}=_0x599c45({},O,this[_0x320c52(0x1b5)]);this[_0x320c52(0x1f1)][_0x320c52(0x1d9)](z,_0x3b9956);}[_0x4180b1(0x1de)](){[[S],[f],[_]]['forEach'](_0x10f72e=>{const _0x666667=_0x1b28;this[_0x666667(0x1b0)][_0x666667(0x1be)](_0x10f72e);});}['onReady'](){const _0x4996bd=_0x4180b1;this['_injector'][_0x4996bd(0x1d5)](f),this[_0x4996bd(0x1b0)]['get'](_);}};$(g,_0x4180b1(0x1ef),W),$(g,_0x4180b1(0x1d7),_0x140979[_0x4180b1(0x19e)]),g=ie([_0x5d589e(_0x31f759,_0x2add79,_0x3a6dc9),N(0x1,_0x54c27f(_0x1bb80b)),N(0x2,_0x4d8774)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4b2ae6,_0xdd97ce){const _0x43fd06=_0x2056,_0x377582=_0x4b2ae6();while(!![]){try{const _0x90c2ff=-parseInt(_0x43fd06(0x25a))/0x1+-parseInt(_0x43fd06(0x1f6))/0x2*(-parseInt(_0x43fd06(0x1de))/0x3)+-parseInt(_0x43fd06(0x1e4))/0x4*(parseInt(_0x43fd06(0x258))/0x5)+parseInt(_0x43fd06(0x21f))/0x6+-parseInt(_0x43fd06(0x202))/0x7*(-parseInt(_0x43fd06(0x1ef))/0x8)+-parseInt(_0x43fd06(0x246))/0x9+parseInt(_0x43fd06(0x24f))/0xa;if(_0x90c2ff===_0xdd97ce)break;else _0x377582['push'](_0x377582['shift']());}catch(_0x5f50cf){_0x377582['push'](_0x377582['shift']());}}}(_0x5a93,0xdee89),function(_0x191a33,_0x569835){const _0x43f65b=_0x2056;typeof exports==_0x43f65b(0x20b)&&typeof module<'u'?_0x569835(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==_0x43f65b(0x1df)&&define[_0x43f65b(0x1f9)]?define([_0x43f65b(0x228),_0x43f65b(0x1e0),'@univerjs-pro/license',_0x43f65b(0x217),_0x43f65b(0x20e),_0x43f65b(0x1dd),_0x43f65b(0x24c),_0x43f65b(0x255)],_0x569835):(_0x191a33=typeof globalThis<'u'?globalThis:_0x191a33||self,_0x569835(_0x191a33[_0x43f65b(0x216)]={},_0x191a33[_0x43f65b(0x203)],_0x191a33['UniverProLicense'],_0x191a33[_0x43f65b(0x242)],_0x191a33['UniverThreadCommentUi'],_0x191a33['UniverThreadComment'],_0x191a33[_0x43f65b(0x24c)],_0x191a33[_0x43f65b(0x1e3)]));}(this,function(_0x4fcfbd,_0x48730e,_0x10a353,_0x51f1ce,_0x39556f,_0x3116cc,_0x3a72c3,_0x1d31a5){'use strict';const _0x1a2c97=_0x2056;const _0x23c63d='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x13f869=(_0x37b28f=>(_0x37b28f[_0x37b28f[_0x1a2c97(0x1fe)]=0x0]='OpenOrReOpen',_0x37b28f[_0x37b28f[_0x1a2c97(0x245)]=0x1]=_0x1a2c97(0x245),_0x37b28f[_0x37b28f[_0x1a2c97(0x222)]=-0x1]=_0x1a2c97(0x222),_0x37b28f))(_0x13f869||{}),_0x443956=(_0x5a991d=>(_0x5a991d[_0x5a991d[_0x1a2c97(0x23b)]=0x0]=_0x1a2c97(0x23b),_0x5a991d[_0x5a991d[_0x1a2c97(0x1ff)]=0x1]=_0x1a2c97(0x1ff),_0x5a991d[_0x5a991d[_0x1a2c97(0x1e8)]=0x2]='Reply',_0x5a991d[_0x5a991d['Edit']=0x3]=_0x1a2c97(0x1f7),_0x5a991d[_0x5a991d['Delete']=0x4]=_0x1a2c97(0x23d),_0x5a991d[_0x5a991d['Solve']=0x5]='Solve',_0x5a991d[_0x5a991d['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x5a991d))(_0x443956||{});const _0x13c44b=_0x249005=>_0x51f1ce[_0x1a2c97(0x206)](new Date(+_0x249005))[_0x1a2c97(0x200)](_0x1a2c97(0x24d)),_0xa96a43=async(_0x49818f,_0x3e6a39)=>{const _0x6b62fb=_0x1a2c97,_0x3fdeb0=_0x49818f['get'](_0x51f1ce['UserManagerService']),_0x1f8db2=_0x49818f[_0x6b62fb(0x1f1)](_0x1d31a5['HTTPService']);_0x3e6a39[_0x6b62fb(0x1f2)](_0x23c4b9=>{const _0x43c18f=_0x6b62fb;_0x3fdeb0[_0x43c18f(0x263)](_0x23c4b9)&&_0x3e6a39[_0x43c18f(0x20d)](_0x23c4b9);}),_0x3e6a39[_0x6b62fb(0x225)]&&(await _0x1f8db2[_0x6b62fb(0x1f1)](_0x6b62fb(0x22c),{'params':{'userIDs':[..._0x3e6a39]}}))[_0x6b62fb(0x23a)][_0x6b62fb(0x241)][_0x6b62fb(0x1f2)](_0x9f08ff=>{const _0x301f8b=_0x6b62fb;_0x9f08ff&&_0x3fdeb0[_0x301f8b(0x235)](_0x9f08ff);});};var _0x158a71=Object[_0x1a2c97(0x226)],_0x4769a7=(_0x23ca5b,_0xb12b02,_0x4bc54f,_0x48156f)=>{for(var _0x39c1ea=_0x48156f>0x1?void 0x0:_0x48156f?_0x158a71(_0xb12b02,_0x4bc54f):_0xb12b02,_0x42e934=_0x23ca5b['length']-0x1,_0x404263;_0x42e934>=0x0;_0x42e934--)(_0x404263=_0x23ca5b[_0x42e934])&&(_0x39c1ea=_0x404263(_0x39c1ea)||_0x39c1ea);return _0x39c1ea;},_0x55f2a7=(_0x1419c9,_0x4a7923)=>(_0x4915cc,_0x62efbe)=>_0x4a7923(_0x4915cc,_0x62efbe,_0x1419c9);let _0x2288d2=class extends _0x51f1ce[_0x1a2c97(0x243)]{constructor(_0xfe694d,_0x1e89f8,_0x3e1199,_0x54ca24){const _0x1439ed=_0x1a2c97;super(),this['_commentService']=_0xfe694d,this['_threadCommentModel']=_0x1e89f8,this[_0x1439ed(0x261)]=_0x3e1199,this[_0x1439ed(0x1ec)]=_0x54ca24,this[_0x1439ed(0x209)](),this[_0x1439ed(0x215)]();}[_0x1a2c97(0x215)](){const _0x5cdbb3=_0x1a2c97;this['disposeWithMe'](this[_0x5cdbb3(0x221)][_0x5cdbb3(0x23c)][_0x5cdbb3(0x204)](_0x3a72c3['bufferTime'](0x10))[_0x5cdbb3(0x22a)](_0x20e5dd=>{const _0x4601a3=_0x5cdbb3,_0x3cd452=new Set();_0x20e5dd[_0x4601a3(0x1f2)](_0x1e3846=>{const _0x328778=_0x4601a3;if(_0x1e3846[_0x328778(0x240)]===_0x328778(0x239)){const _0x595f8b=_0x1e3846['payload'][_0x328778(0x1fd)];_0x3cd452[_0x328778(0x239)](_0x595f8b);}}),_0xa96a43(this[_0x4601a3(0x1ec)],_0x3cd452);}));}[_0x1a2c97(0x209)](){const _0x549c0b=_0x1a2c97;this[_0x549c0b(0x20f)](this[_0x549c0b(0x252)][_0x549c0b(0x23c)]['subscribe'](async _0x3ae143=>{const _0x35d58b=_0x549c0b;var _0x4009a9,_0x5b9e35,_0x202787,_0x402341;const _0x5c37da=(_0x4009a9=this['_threadCommentModel'][_0x35d58b(0x1fb)](_0x3ae143[_0x35d58b(0x23e)])[_0x35d58b(0x21a)](_0x384678=>_0x384678[_0x35d58b(0x1e5)]===_0x3ae143[_0x35d58b(0x1e5)]))==null?void 0x0:_0x4009a9[_0x35d58b(0x24e)];if(!_0x5c37da)return;const {unitId:_0x9777d0,subUnitId:_0x162641}=_0x5c37da;switch(_0x3ae143[_0x35d58b(0x22d)]&&this[_0x35d58b(0x261)]['addUser'](_0x3ae143[_0x35d58b(0x22d)]),_0x3ae143[_0x35d58b(0x240)]){case _0x443956[_0x35d58b(0x1ff)]:break;case _0x443956[_0x35d58b(0x1e8)]:{this[_0x35d58b(0x221)][_0x35d58b(0x247)](_0x9777d0,_0x162641,{'unitId':_0x9777d0,'subUnitId':_0x162641,'ref':'','id':_0x3ae143['replyId'],'dT':_0x13c44b(+_0x3ae143[_0x35d58b(0x211)]),'threadId':_0x3ae143[_0x35d58b(0x1e5)],'personId':(_0x202787=(_0x5b9e35=_0x3ae143[_0x35d58b(0x22d)])==null?void 0x0:_0x5b9e35[_0x35d58b(0x248)])!=null?_0x202787:_0x3ae143[_0x35d58b(0x234)],'text':JSON['parse'](_0x3ae143['content']),'parentId':_0x5c37da['id']});break;}case _0x443956['Delete']:{const _0x127344=this[_0x35d58b(0x221)][_0x35d58b(0x236)](_0x9777d0,_0x162641,_0x3ae143[_0x35d58b(0x249)]);_0x127344&&_0x127344[_0x35d58b(0x257)]&&this[_0x35d58b(0x221)]['deleteComment'](_0x9777d0,_0x162641,_0x3ae143[_0x35d58b(0x249)]);break;}case _0x443956[_0x35d58b(0x1f7)]:{this[_0x35d58b(0x221)][_0x35d58b(0x254)](_0x9777d0,_0x162641,{'commentId':_0x3ae143[_0x35d58b(0x249)],'text':JSON[_0x35d58b(0x1f8)](_0x3ae143[_0x35d58b(0x1fc)])});break;}case _0x443956[_0x35d58b(0x259)]:{const _0xb9a688=(_0x402341=this[_0x35d58b(0x221)][_0x35d58b(0x1fb)](_0x3ae143[_0x35d58b(0x23e)])[_0x35d58b(0x21a)](_0x339989=>_0x339989[_0x35d58b(0x1e5)]===_0x3ae143[_0x35d58b(0x1e5)]))==null?void 0x0:_0x402341[_0x35d58b(0x24e)];_0xb9a688&&this['_threadCommentModel'][_0x35d58b(0x218)](_0x9777d0,_0x162641,_0xb9a688['id'],_0x3ae143[_0x35d58b(0x1f3)]===_0x13f869[_0x35d58b(0x245)]);break;}}}));}};_0x2288d2=_0x4769a7([_0x55f2a7(0x0,_0x51f1ce[_0x1a2c97(0x24b)](_0x48730e[_0x1a2c97(0x21c)])),_0x55f2a7(0x1,_0x51f1ce[_0x1a2c97(0x24b)](_0x3116cc[_0x1a2c97(0x231)])),_0x55f2a7(0x2,_0x51f1ce[_0x1a2c97(0x24b)](_0x51f1ce[_0x1a2c97(0x238)])),_0x55f2a7(0x3,_0x51f1ce[_0x1a2c97(0x24b)](_0x51f1ce[_0x1a2c97(0x205)]))],_0x2288d2);const _0x1b11ea=_0x1a2c97(0x20a),_0x17d85b={};var _0x3f2b2e=Object[_0x1a2c97(0x226)],_0x3b5b49=(_0x5c01d2,_0x51cd31,_0x477161,_0x4525ec)=>{for(var _0x431eae=_0x4525ec>0x1?void 0x0:_0x4525ec?_0x3f2b2e(_0x51cd31,_0x477161):_0x51cd31,_0x3ec7c5=_0x5c01d2['length']-0x1,_0x37f91b;_0x3ec7c5>=0x0;_0x3ec7c5--)(_0x37f91b=_0x5c01d2[_0x3ec7c5])&&(_0x431eae=_0x37f91b(_0x431eae)||_0x431eae);return _0x431eae;},_0x3ee83a=(_0x45bc21,_0x5e5d50)=>(_0x2f6303,_0x344025)=>_0x5e5d50(_0x2f6303,_0x344025,_0x45bc21);function _0x13a7e1(_0x2b089f,_0x100003){const _0x372554=_0x1a2c97,_0x19682b=_0x2b089f['replies'][0x0];return{..._0x100003,'id':_0x19682b[_0x372554(0x249)],'resolved':_0x2b089f['solved']===0x1,'dT':_0x13c44b(_0x19682b[_0x372554(0x211)]),'personId':_0x19682b['userId'],'threadId':_0x19682b['threadId']};}function _0x30f5e3(_0x3ec4ec,_0x4d2775,_0x53e33b){const _0x22d8e0=_0x1a2c97;var _0xb7cc72,_0x45b8ee;if(((_0x45b8ee=(_0xb7cc72=_0x3ec4ec==null?void 0x0:_0x3ec4ec[_0x22d8e0(0x1dc)])==null?void 0x0:_0xb7cc72[_0x22d8e0(0x1eb)])!=null?_0x45b8ee:0x0)>0x0){const _0x3e03c6=(_0x626dcd,_0x5f4749)=>({'id':_0x626dcd[_0x22d8e0(0x249)],'threadId':_0x626dcd['threadId'],'dT':_0x13c44b(_0x626dcd['createTimestamp']),'personId':_0x626dcd[_0x22d8e0(0x234)],'resolved':_0x3ec4ec[_0x22d8e0(0x1f3)]===_0x13f869['Solved'],'unitId':_0x4d2775,'subUnitId':_0x53e33b,'text':JSON['parse'](_0x626dcd[_0x22d8e0(0x1fc)]),'parentId':_0x5f4749}),_0xf39ba9=_0x3e03c6(_0x3ec4ec[_0x22d8e0(0x1dc)][0x0]);return{..._0xf39ba9,'children':_0x3ec4ec[_0x22d8e0(0x1dc)]['slice'](0x1)[_0x22d8e0(0x201)](_0x446fce=>_0x3e03c6(_0x446fce,_0xf39ba9['id']))};}return null;}let _0x1926c=class{constructor(_0x2b868d,_0x1f5994,_0x14c208){const _0x28bba1=_0x1a2c97;this[_0x28bba1(0x230)]=_0x2b868d,this[_0x28bba1(0x261)]=_0x1f5994,this[_0x28bba1(0x1e9)]=_0x14c208;}async[_0x1a2c97(0x247)](_0x4c2c67){const _0x2961c8=_0x1a2c97;var _0x11fb08,_0x308efc;const {parentId:_0x56e590,unitId:_0x29cc89,text:_0x193c83,threadId:_0x104575}=_0x4c2c67,_0x468b30=(_0x308efc=(_0x11fb08=_0x193c83['customRanges'])==null?void 0x0:_0x11fb08[_0x2961c8(0x253)](_0x37ae8e=>_0x37ae8e[_0x2961c8(0x214)]===_0x51f1ce[_0x2961c8(0x219)][_0x2961c8(0x1ea)])['map'](_0x56149f=>_0x56149f[_0x2961c8(0x207)]))!=null?_0x308efc:[],_0x2990fc=JSON[_0x2961c8(0x220)](_0x193c83),_0x5db062=(await this[_0x2961c8(0x1e9)][_0x2961c8(0x25b)](_0x29cc89))[_0x2961c8(0x1f0)]();if(_0x56e590){const _0x2abe2e={'memberId':_0x5db062,'unitId':_0x29cc89,'content':_0x2990fc,'mention':_0x468b30,'threadId':_0x104575},_0x46185c=(await this[_0x2961c8(0x230)][_0x2961c8(0x1e1)](_0x2961c8(0x251)+_0x29cc89+'/reply',{'body':_0x2abe2e}))[_0x2961c8(0x23a)][_0x2961c8(0x208)];return{..._0x4c2c67,'id':_0x46185c[_0x2961c8(0x249)],'dT':_0x51f1ce[_0x2961c8(0x206)](+_0x46185c[_0x2961c8(0x211)])[_0x2961c8(0x200)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x46185c[_0x2961c8(0x234)]};}else{const _0x40440a={'memberId':_0x5db062,'unitId':_0x29cc89,'content':_0x2990fc,'mention':_0x468b30},_0x6c384a=await this[_0x2961c8(0x230)][_0x2961c8(0x1e1)]('/universer-api/comment/unit/'+_0x29cc89+_0x2961c8(0x250),{'body':_0x40440a});return _0x13a7e1(_0x6c384a[_0x2961c8(0x23a)][_0x2961c8(0x1e7)],_0x4c2c67);}}async['updateComment'](_0x579cc7){const _0x317ba0=_0x1a2c97;var _0x838240,_0x51e1ab;const {text:_0x36e6a2,unitId:_0x2f9c34}=_0x579cc7,_0x57e97a=(_0x51e1ab=(_0x838240=_0x36e6a2['customRanges'])==null?void 0x0:_0x838240[_0x317ba0(0x253)](_0x69ffa3=>_0x69ffa3[_0x317ba0(0x214)]===_0x51f1ce[_0x317ba0(0x219)][_0x317ba0(0x1ea)])[_0x317ba0(0x201)](_0x36fe79=>_0x36fe79['rangeId']))!=null?_0x51e1ab:[],_0x56bfe0=JSON[_0x317ba0(0x220)](_0x36e6a2),_0x3191a2=_0x579cc7['threadId'],_0x1025be=_0x579cc7['id'],_0x16996d={'memberId':(await this[_0x317ba0(0x1e9)][_0x317ba0(0x25b)](_0x2f9c34))[_0x317ba0(0x1f0)](),'unitId':_0x2f9c34,'threadId':_0x3191a2,'mention':_0x57e97a,'content':_0x56bfe0,'replyId':_0x1025be},_0x4b6aa5=await this[_0x317ba0(0x230)][_0x317ba0(0x1e1)](_0x317ba0(0x251)+_0x2f9c34+'/edit',{'body':_0x16996d});return!_0x4b6aa5[_0x317ba0(0x23a)][_0x317ba0(0x22e)]||_0x4b6aa5[_0x317ba0(0x23a)][_0x317ba0(0x22e)][_0x317ba0(0x25d)]===0x1;}async[_0x1a2c97(0x218)](_0x23fad0){const _0x246358=_0x1a2c97,{unitId:_0x5a2a25}=_0x23fad0,_0x527c49=_0x23fad0[_0x246358(0x1e5)],_0x11c201={'memberId':this[_0x246358(0x261)][_0x246358(0x1fa)]()[_0x246358(0x248)],'unitId':_0x5a2a25,'threadId':_0x527c49,'solved':_0x23fad0[_0x246358(0x244)]?_0x13f869[_0x246358(0x245)]:_0x13f869['OpenOrReOpen']},_0x728b6d=await this[_0x246358(0x230)][_0x246358(0x1e1)](_0x246358(0x251)+_0x5a2a25+_0x246358(0x23f),{'body':_0x11c201});return!_0x728b6d[_0x246358(0x23a)][_0x246358(0x22e)]||_0x728b6d[_0x246358(0x23a)][_0x246358(0x22e)][_0x246358(0x25d)]===0x1;}async['deleteComment'](_0x2193e1,_0x82303a,_0x12a3f4,_0x570ae4){const _0x36ac16=_0x1a2c97,_0x36f1d9={'memberId':(await this[_0x36ac16(0x1e9)]['requireSession'](_0x2193e1))['getMemberID'](),'threadId':_0x12a3f4,'replyId':_0x570ae4,'unitId':_0x2193e1},_0x917da8=await this[_0x36ac16(0x230)][_0x36ac16(0x1e1)](_0x36ac16(0x251)+_0x2193e1+_0x36ac16(0x25c),{'body':_0x36f1d9});return!_0x917da8['body']['error']||_0x917da8[_0x36ac16(0x23a)]['error'][_0x36ac16(0x25d)]===0x1;}async[_0x1a2c97(0x1e2)](_0x139ac5,_0x31255e,_0x423c2e){const _0x3211a0=_0x1a2c97,_0x2cebc1={'unitId':_0x139ac5,'threadId':_0x423c2e},_0x36059f=await this['_httpService'][_0x3211a0(0x1e1)](_0x3211a0(0x251)+_0x139ac5+_0x3211a0(0x20c),{'body':_0x2cebc1}),_0x39d4e7=_0x423c2e[_0x3211a0(0x201)](_0x2dfa3e=>_0x30f5e3(_0x36059f[_0x3211a0(0x23a)]['comments'][_0x2dfa3e],_0x139ac5,_0x31255e))['filter'](Boolean);return Object[_0x3211a0(0x224)](_0x36059f[_0x3211a0(0x23a)][_0x3211a0(0x241)])[_0x3211a0(0x1f2)](_0x4d4fe0=>{this['_userService']['addUser'](_0x4d4fe0);}),_0x39d4e7;}[_0x1a2c97(0x212)](_0x210f96){const _0x477a3d=_0x1a2c97;return{'id':_0x210f96['id'],'threadId':_0x210f96[_0x477a3d(0x1e5)],'ref':_0x210f96[_0x477a3d(0x260)]};}};_0x1926c=_0x3b5b49([_0x3ee83a(0x0,_0x51f1ce[_0x1a2c97(0x24b)](_0x1d31a5['HTTPService'])),_0x3ee83a(0x1,_0x51f1ce[_0x1a2c97(0x24b)](_0x51f1ce[_0x1a2c97(0x238)])),_0x3ee83a(0x2,_0x51f1ce[_0x1a2c97(0x24b)](_0x48730e[_0x1a2c97(0x21e)]))],_0x1926c);var _0x3ce6d5=Object[_0x1a2c97(0x226)],_0x12f4fe=(_0x12b346,_0xcd7d65,_0x5e65d4,_0x167f8c)=>{const _0x4acf42=_0x1a2c97;for(var _0x3dac18=_0x167f8c>0x1?void 0x0:_0x167f8c?_0x3ce6d5(_0xcd7d65,_0x5e65d4):_0xcd7d65,_0x9d3732=_0x12b346[_0x4acf42(0x1eb)]-0x1,_0x4b138a;_0x9d3732>=0x0;_0x9d3732--)(_0x4b138a=_0x12b346[_0x9d3732])&&(_0x3dac18=_0x4b138a(_0x3dac18)||_0x3dac18);return _0x3dac18;},_0x5dabd6=(_0x1d05cd,_0xbea482)=>(_0x10cae9,_0x48c9d0)=>_0xbea482(_0x10cae9,_0x48c9d0,_0x1d05cd);let _0x356c68=class extends _0x51f1ce['Disposable']{constructor(_0x1ae278,_0x418ab2){const _0x462bc9=_0x1a2c97;super(),this[_0x462bc9(0x237)]=_0x1ae278,this[_0x462bc9(0x22f)]=_0x418ab2,this[_0x462bc9(0x1f5)]();}[_0x1a2c97(0x1f5)](){const _0x364006=_0x1a2c97;this[_0x364006(0x237)][_0x364006(0x21d)]=this[_0x364006(0x22f)],this[_0x364006(0x237)][_0x364006(0x25e)]=!0x1;}};_0x356c68=_0x12f4fe([_0x5dabd6(0x0,_0x3116cc[_0x1a2c97(0x22b)]),_0x5dabd6(0x1,_0x51f1ce['Inject'](_0x1926c))],_0x356c68);var _0x195e25=Object[_0x1a2c97(0x1e6)],_0x1abf75=Object['getOwnPropertyDescriptor'],_0x4af672=(_0x1674c1,_0x9ca87a,_0x35f8f5)=>_0x9ca87a in _0x1674c1?_0x195e25(_0x1674c1,_0x9ca87a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x35f8f5}):_0x1674c1[_0x9ca87a]=_0x35f8f5,_0x393f43=(_0x2f4a92,_0x51cd25,_0x46a989,_0x38091c)=>{const _0x1e22e7=_0x1a2c97;for(var _0x532d57=_0x38091c>0x1?void 0x0:_0x38091c?_0x1abf75(_0x51cd25,_0x46a989):_0x51cd25,_0x5af336=_0x2f4a92[_0x1e22e7(0x1eb)]-0x1,_0x4e6ca9;_0x5af336>=0x0;_0x5af336--)(_0x4e6ca9=_0x2f4a92[_0x5af336])&&(_0x532d57=_0x4e6ca9(_0x532d57)||_0x532d57);return _0x532d57;},_0x4705d0=(_0x4de153,_0x37fc4f)=>(_0x5cc98b,_0x4e83d7)=>_0x37fc4f(_0x5cc98b,_0x4e83d7,_0x4de153),_0x41b3b2=(_0x8a94e2,_0x4ba0b8,_0xc17b0c)=>_0x4af672(_0x8a94e2,typeof _0x4ba0b8!=_0x1a2c97(0x1ed)?_0x4ba0b8+'':_0x4ba0b8,_0xc17b0c);_0x4fcfbd[_0x1a2c97(0x229)]=class extends _0x51f1ce[_0x1a2c97(0x227)]{constructor(_0x27bec4=_0x17d85b,_0x525f32,_0x1f9038){const _0xd74acd=_0x1a2c97;super(),this[_0xd74acd(0x210)]=_0x27bec4,this[_0xd74acd(0x1ec)]=_0x525f32,this[_0xd74acd(0x232)]=_0x1f9038;const {..._0x29d66a}=_0x51f1ce[_0xd74acd(0x213)]({},_0x17d85b,this[_0xd74acd(0x210)]);this[_0xd74acd(0x232)]['setConfig'](_0x1b11ea,_0x29d66a);}[_0x1a2c97(0x233)](){const _0x550641=_0x1a2c97;[[_0x1926c],[_0x356c68],[_0x2288d2]][_0x550641(0x1f2)](_0x2441ae=>{const _0x476e8e=_0x550641;this[_0x476e8e(0x1ec)][_0x476e8e(0x239)](_0x2441ae);});}['onReady'](){const _0x27adba=_0x1a2c97;this['_injector'][_0x27adba(0x1f1)](_0x356c68),this[_0x27adba(0x1ec)][_0x27adba(0x1f1)](_0x2288d2);}},_0x41b3b2(_0x4fcfbd['UniverThreadCommentDataSourcePlugin'],_0x1a2c97(0x24a),_0x23c63d),_0x41b3b2(_0x4fcfbd[_0x1a2c97(0x229)],'type',_0x51f1ce['UniverInstanceType'][_0x1a2c97(0x223)]),_0x4fcfbd['UniverThreadCommentDataSourcePlugin']=_0x393f43([_0x51f1ce[_0x1a2c97(0x1ee)](_0x39556f[_0x1a2c97(0x21b)],_0x48730e[_0x1a2c97(0x256)],_0x10a353['UniverLicensePlugin']),_0x4705d0(0x1,_0x51f1ce[_0x1a2c97(0x24b)](_0x51f1ce[_0x1a2c97(0x205)])),_0x4705d0(0x2,_0x51f1ce[_0x1a2c97(0x262)])],_0x4fcfbd[_0x1a2c97(0x229)]),Object[_0x1a2c97(0x1e6)](_0x4fcfbd,Symbol[_0x1a2c97(0x25f)],{'value':_0x1a2c97(0x1f4)});}));function _0x2056(_0x50def5,_0x2cb167){_0x50def5=_0x50def5-0x1dc;const _0x5a9383=_0x5a93();let _0x20566a=_0x5a9383[_0x50def5];return _0x20566a;}function _0x5a93(){const _0x482587=['getMemberID','get','forEach','solved','Module','_initDataSource','888078CEikrH','Edit','parse','amd','getCurrentUser','getUnit','content','personId','OpenOrReOpen','Add','format','map','14riVSlJ','UniverProCollaborationClient','pipe','Injector','dayjs','rangeId','reply','_init','thread-comment-data-source.config','object','/list','delete','@univerjs/thread-comment-ui','disposeWithMe','_config','createTimestamp','saveCommentToSnapshot','merge','rangeType','_initUserSync','UniverProThreadCommentDatasource','@univerjs/core','resolveComment','CustomRangeType','find','UniverThreadCommentUIPlugin','CommentService','dataSource','CollaborationSessionService','5102628OGhSUk','stringify','_threadCommentModel','UNRECOGNIZED','UNIVER_UNKNOWN','values','size','getOwnPropertyDescriptor','Plugin','exports','UniverThreadCommentDataSourcePlugin','subscribe','IThreadCommentDataSourceService','/universer-api/user/list','user','error','_threadCommentDataSource','_httpService','ThreadCommentModel','_configService','onStarting','userId','addUser','getComment','_threadCommentDataSourceService','UserManagerService','add','body','Unknown','commentUpdate$','Delete','unitId','/solved','type','users','UniverCore','Disposable','resolved','Solved','7021242BUjXrC','addComment','userID','replyId','pluginName','Inject','rxjs','YYYY/MM/DD\x20HH:mm','root','2108220HQXZhu','/add','/universer-api/comment/unit/','_commentService','filter','updateComment','@univerjs/network','UniverCollaborationClientPlugin','parentId','105035FyfRSI','Solve','1459976cGfnKk','requireSession','/delete','code','syncUpdateMutationToColla','toStringTag','ref','_userService','IConfigService','getUser','replies','@univerjs/thread-comment','9ADkClC','function','@univerjs-pro/collaboration-client','post','listComments','UniverNetwork','16flYhee','threadId','defineProperty','comment','Reply','_sessionService','COMMENT','length','_injector','symbol','DependentOn','3375192MpjEat'];_0x5a93=function(){return _0x482587;};return _0x5a93();}
|
|
1
|
+
function _0x45d5(_0x3630a8,_0x2d7338){_0x3630a8=_0x3630a8-0x1c2;const _0x5ce55d=_0x5ce5();let _0x45d544=_0x5ce55d[_0x3630a8];return _0x45d544;}(function(_0x14ec76,_0x5922ec){const _0x412d04=_0x45d5,_0x39b1c6=_0x14ec76();while(!![]){try{const _0x18ccbe=-parseInt(_0x412d04(0x1c8))/0x1+parseInt(_0x412d04(0x1d7))/0x2+-parseInt(_0x412d04(0x1e5))/0x3*(parseInt(_0x412d04(0x23d))/0x4)+-parseInt(_0x412d04(0x1ef))/0x5*(-parseInt(_0x412d04(0x1e7))/0x6)+parseInt(_0x412d04(0x22c))/0x7+parseInt(_0x412d04(0x24a))/0x8*(parseInt(_0x412d04(0x1dd))/0x9)+-parseInt(_0x412d04(0x22b))/0xa*(parseInt(_0x412d04(0x235))/0xb);if(_0x18ccbe===_0x5922ec)break;else _0x39b1c6['push'](_0x39b1c6['shift']());}catch(_0x4bb29c){_0x39b1c6['push'](_0x39b1c6['shift']());}}}(_0x5ce5,0x87a8f),function(_0x37caab,_0x99bb35){const _0x240389=_0x45d5;typeof exports==_0x240389(0x1e9)&&typeof module<'u'?_0x99bb35(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define['amd']?define([_0x240389(0x21d),_0x240389(0x209),_0x240389(0x1f7),_0x240389(0x202),_0x240389(0x1c6),_0x240389(0x210),'rxjs','@univerjs/network'],_0x99bb35):(_0x37caab=typeof globalThis<'u'?globalThis:_0x37caab||self,_0x99bb35(_0x37caab[_0x240389(0x1d2)]={},_0x37caab[_0x240389(0x1ec)],_0x37caab['UniverProLicense'],_0x37caab[_0x240389(0x243)],_0x37caab[_0x240389(0x228)],_0x37caab[_0x240389(0x203)],_0x37caab[_0x240389(0x1df)],_0x37caab['UniverNetwork']));}(this,function(_0x347b73,_0x4ebd7c,_0x240775,_0x3e06ff,_0x2663f5,_0x33dd0d,_0x1813bc,_0x1af0b5){'use strict';const _0x4a5f86=_0x45d5;const _0x36598d=_0x4a5f86(0x247);var _0x137c8d=(_0x23488f=>(_0x23488f[_0x23488f['OpenOrReOpen']=0x0]=_0x4a5f86(0x1d9),_0x23488f[_0x23488f[_0x4a5f86(0x1d8)]=0x1]=_0x4a5f86(0x1d8),_0x23488f[_0x23488f[_0x4a5f86(0x1d6)]=-0x1]=_0x4a5f86(0x1d6),_0x23488f))(_0x137c8d||{}),_0x3b65af=(_0x21e30c=>(_0x21e30c[_0x21e30c[_0x4a5f86(0x214)]=0x0]='Unknown',_0x21e30c[_0x21e30c['Add']=0x1]=_0x4a5f86(0x21e),_0x21e30c[_0x21e30c[_0x4a5f86(0x1f8)]=0x2]=_0x4a5f86(0x1f8),_0x21e30c[_0x21e30c['Edit']=0x3]='Edit',_0x21e30c[_0x21e30c['Delete']=0x4]='Delete',_0x21e30c[_0x21e30c[_0x4a5f86(0x220)]=0x5]='Solve',_0x21e30c[_0x21e30c['UNRECOGNIZED']=-0x1]=_0x4a5f86(0x1d6),_0x21e30c))(_0x3b65af||{});const _0x28e987=_0x2034d3=>_0x3e06ff[_0x4a5f86(0x1fd)](new Date(+_0x2034d3))[_0x4a5f86(0x244)](_0x4a5f86(0x227)),_0xdf3fa5=async(_0x119280,_0x584eb6)=>{const _0x394dc7=_0x4a5f86,_0x1a1b1d=_0x119280['get'](_0x3e06ff[_0x394dc7(0x23b)]),_0x188394=_0x119280['get'](_0x1af0b5['HTTPService']);_0x584eb6[_0x394dc7(0x23c)](_0x3b9dd6=>{const _0x273f20=_0x394dc7;_0x1a1b1d[_0x273f20(0x1c4)](_0x3b9dd6)&&_0x584eb6[_0x273f20(0x1c2)](_0x3b9dd6);}),_0x584eb6['size']&&(await _0x188394[_0x394dc7(0x1e2)](_0x394dc7(0x1cd),{'params':{'userIDs':[..._0x584eb6]}}))[_0x394dc7(0x200)][_0x394dc7(0x1e6)][_0x394dc7(0x23c)](_0x3b2a15=>{const _0x5f061c=_0x394dc7;_0x3b2a15&&_0x1a1b1d[_0x5f061c(0x233)](_0x3b2a15);});};var _0x2e2a50=Object['getOwnPropertyDescriptor'],_0x21ed80=(_0x2cfe27,_0x29a8d3,_0x1850f3,_0x21145a)=>{for(var _0x14baaa=_0x21145a>0x1?void 0x0:_0x21145a?_0x2e2a50(_0x29a8d3,_0x1850f3):_0x29a8d3,_0x50750c=_0x2cfe27['length']-0x1,_0x1c54d0;_0x50750c>=0x0;_0x50750c--)(_0x1c54d0=_0x2cfe27[_0x50750c])&&(_0x14baaa=_0x1c54d0(_0x14baaa)||_0x14baaa);return _0x14baaa;},_0x5b0d5f=(_0x32ca39,_0x2b8071)=>(_0x32c551,_0x3cbfc3)=>_0x2b8071(_0x32c551,_0x3cbfc3,_0x32ca39);let _0x5d5359=class extends _0x3e06ff['Disposable']{constructor(_0x321524,_0x53719b,_0x136be0,_0x2031b0){const _0x100ae5=_0x4a5f86;super(),this['_commentService']=_0x321524,this[_0x100ae5(0x1ca)]=_0x53719b,this[_0x100ae5(0x1f5)]=_0x136be0,this['_injector']=_0x2031b0,this['_init'](),this[_0x100ae5(0x229)]();}['_initUserSync'](){const _0x44a4a6=_0x4a5f86;this[_0x44a4a6(0x241)](this[_0x44a4a6(0x1ca)][_0x44a4a6(0x245)]['pipe'](_0x1813bc[_0x44a4a6(0x1de)](0x10))[_0x44a4a6(0x236)](_0x45c9d3=>{const _0x38ab73=_0x44a4a6,_0x34146b=new Set();_0x45c9d3['forEach'](_0xd935b7=>{const _0x3cbd3f=_0x45d5;if(_0xd935b7['type']==='add'){const _0x1db274=_0xd935b7['payload'][_0x3cbd3f(0x21a)];_0x34146b['add'](_0x1db274);}}),_0xdf3fa5(this[_0x38ab73(0x21c)],_0x34146b);}));}[_0x4a5f86(0x1c3)](){const _0x5e7c08=_0x4a5f86;this[_0x5e7c08(0x241)](this['_commentService']['commentUpdate$'][_0x5e7c08(0x236)](async _0x5ea791=>{const _0x504006=_0x5e7c08;var _0x6f6c5e,_0x2f0d80,_0x442cdc,_0x5037ab;const _0x37e1f6=(_0x6f6c5e=this[_0x504006(0x1ca)][_0x504006(0x1ea)](_0x5ea791['unitId'])[_0x504006(0x206)](_0x5e74dc=>_0x5e74dc[_0x504006(0x23e)]===_0x5ea791[_0x504006(0x23e)]))==null?void 0x0:_0x6f6c5e[_0x504006(0x1fe)];if(!_0x37e1f6)return;const {unitId:_0x5670c8,subUnitId:_0x4a78f9}=_0x37e1f6;switch(_0x5ea791['user']&&this['_userService'][_0x504006(0x233)](_0x5ea791['user']),_0x5ea791['type']){case _0x3b65af[_0x504006(0x21e)]:break;case _0x3b65af[_0x504006(0x1f8)]:{this[_0x504006(0x1ca)][_0x504006(0x24b)](_0x5670c8,_0x4a78f9,{'unitId':_0x5670c8,'subUnitId':_0x4a78f9,'ref':'','id':_0x5ea791['replyId'],'dT':_0x28e987(+_0x5ea791[_0x504006(0x1ff)]),'threadId':_0x5ea791['threadId'],'personId':(_0x442cdc=(_0x2f0d80=_0x5ea791[_0x504006(0x22a)])==null?void 0x0:_0x2f0d80['userID'])!=null?_0x442cdc:_0x5ea791['userId'],'text':JSON['parse'](_0x5ea791[_0x504006(0x216)]),'parentId':_0x37e1f6['id']});break;}case _0x3b65af[_0x504006(0x1f0)]:{const _0xf4c518=this['_threadCommentModel'][_0x504006(0x208)](_0x5670c8,_0x4a78f9,_0x5ea791[_0x504006(0x21f)]);_0xf4c518&&_0xf4c518[_0x504006(0x1db)]&&this['_threadCommentModel'][_0x504006(0x222)](_0x5670c8,_0x4a78f9,_0x5ea791[_0x504006(0x21f)]);break;}case _0x3b65af[_0x504006(0x1d4)]:{this[_0x504006(0x1ca)][_0x504006(0x223)](_0x5670c8,_0x4a78f9,{'commentId':_0x5ea791[_0x504006(0x21f)],'text':JSON[_0x504006(0x20f)](_0x5ea791['content'])});break;}case _0x3b65af[_0x504006(0x220)]:{const _0x50d3ae=(_0x5037ab=this['_threadCommentModel']['getUnit'](_0x5ea791['unitId'])[_0x504006(0x206)](_0x4adc1d=>_0x4adc1d['threadId']===_0x5ea791[_0x504006(0x23e)]))==null?void 0x0:_0x5037ab[_0x504006(0x1fe)];_0x50d3ae&&this[_0x504006(0x1ca)][_0x504006(0x1fb)](_0x5670c8,_0x4a78f9,_0x50d3ae['id'],_0x5ea791[_0x504006(0x23f)]===_0x137c8d[_0x504006(0x1d8)]);break;}}}));}};_0x5d5359=_0x21ed80([_0x5b0d5f(0x0,_0x3e06ff['Inject'](_0x4ebd7c[_0x4a5f86(0x1ce)])),_0x5b0d5f(0x1,_0x3e06ff[_0x4a5f86(0x234)](_0x33dd0d[_0x4a5f86(0x237)])),_0x5b0d5f(0x2,_0x3e06ff[_0x4a5f86(0x234)](_0x3e06ff[_0x4a5f86(0x23b)])),_0x5b0d5f(0x3,_0x3e06ff[_0x4a5f86(0x234)](_0x3e06ff[_0x4a5f86(0x207)]))],_0x5d5359);const _0x3b08bc=_0x4a5f86(0x1cb),_0x2833f6={};var _0x5535cd=Object['getOwnPropertyDescriptor'],_0x3bc456=(_0x386f89,_0x3704c2,_0x9f4572,_0x347c7f)=>{for(var _0x145ad8=_0x347c7f>0x1?void 0x0:_0x347c7f?_0x5535cd(_0x3704c2,_0x9f4572):_0x3704c2,_0x1713e9=_0x386f89['length']-0x1,_0x144881;_0x1713e9>=0x0;_0x1713e9--)(_0x144881=_0x386f89[_0x1713e9])&&(_0x145ad8=_0x144881(_0x145ad8)||_0x145ad8);return _0x145ad8;},_0x39995f=(_0x2cf4e5,_0x54847e)=>(_0x452b5f,_0x23464e)=>_0x54847e(_0x452b5f,_0x23464e,_0x2cf4e5);function _0x491fe1(_0x3adb6e,_0x487ec8){const _0x2d7e6c=_0x4a5f86,_0x3d4618=_0x3adb6e[_0x2d7e6c(0x249)][0x0];return{..._0x487ec8,'id':_0x3d4618['replyId'],'resolved':_0x3adb6e[_0x2d7e6c(0x23f)]===0x1,'dT':_0x28e987(_0x3d4618[_0x2d7e6c(0x1ff)]),'personId':_0x3d4618[_0x2d7e6c(0x1d5)],'threadId':_0x3d4618['threadId']};}function _0x1453e8(_0x39100f,_0x115db7,_0x370dd0){const _0x4c854f=_0x4a5f86;var _0x14679c,_0x9da0c5;if(((_0x9da0c5=(_0x14679c=_0x39100f==null?void 0x0:_0x39100f['replies'])==null?void 0x0:_0x14679c[_0x4c854f(0x1ee)])!=null?_0x9da0c5:0x0)>0x0){const _0x2d7006=(_0x4d85f8,_0x2fd07d)=>({'id':_0x4d85f8['replyId'],'threadId':_0x4d85f8[_0x4c854f(0x23e)],'dT':_0x28e987(_0x4d85f8['createTimestamp']),'personId':_0x4d85f8[_0x4c854f(0x1d5)],'resolved':_0x39100f[_0x4c854f(0x23f)]===_0x137c8d['Solved'],'unitId':_0x115db7,'subUnitId':_0x370dd0,'text':JSON[_0x4c854f(0x20f)](_0x4d85f8[_0x4c854f(0x216)]),'parentId':_0x2fd07d}),_0x487d6a=_0x2d7006(_0x39100f[_0x4c854f(0x249)][0x0]);return{..._0x487d6a,'children':_0x39100f[_0x4c854f(0x249)][_0x4c854f(0x231)](0x1)['map'](_0x4961b2=>_0x2d7006(_0x4961b2,_0x487d6a['id']))};}return null;}let _0x1f4fd0=class{constructor(_0x4a72e4,_0x38cbed,_0x32520e){const _0x476394=_0x4a5f86;this[_0x476394(0x1c5)]=_0x4a72e4,this[_0x476394(0x1f5)]=_0x38cbed,this[_0x476394(0x230)]=_0x32520e;}async[_0x4a5f86(0x24b)](_0x5a0c6a){const _0x4e0529=_0x4a5f86;var _0x511ce3,_0x5cfd87;const {parentId:_0x6364bd,unitId:_0x43319c,text:_0xcc0cd4,threadId:_0x1764f9}=_0x5a0c6a,_0x39cb58=(_0x5cfd87=(_0x511ce3=_0xcc0cd4[_0x4e0529(0x1ed)])==null?void 0x0:_0x511ce3[_0x4e0529(0x1d1)](_0x1c54a7=>_0x1c54a7[_0x4e0529(0x1d0)]===_0x3e06ff[_0x4e0529(0x1f3)][_0x4e0529(0x23a)])[_0x4e0529(0x215)](_0x435299=>_0x435299[_0x4e0529(0x20e)]))!=null?_0x5cfd87:[],_0xa00eb8=JSON[_0x4e0529(0x1f1)](_0xcc0cd4),_0x232f21=(await this[_0x4e0529(0x230)][_0x4e0529(0x1eb)](_0x43319c))[_0x4e0529(0x22f)]();if(_0x6364bd){const _0x44a4a4={'memberId':_0x232f21,'unitId':_0x43319c,'content':_0xa00eb8,'mention':_0x39cb58,'threadId':_0x1764f9},_0x507f29=(await this[_0x4e0529(0x1c5)][_0x4e0529(0x1c7)](_0x4e0529(0x1cc)+_0x43319c+_0x4e0529(0x1e0),{'body':_0x44a4a4}))[_0x4e0529(0x200)][_0x4e0529(0x1d3)];return{..._0x5a0c6a,'id':_0x507f29['replyId'],'dT':_0x3e06ff[_0x4e0529(0x1fd)](+_0x507f29[_0x4e0529(0x1ff)])[_0x4e0529(0x244)](_0x4e0529(0x227)),'personId':_0x507f29[_0x4e0529(0x1d5)]};}else{const _0x5ad1df={'memberId':_0x232f21,'unitId':_0x43319c,'content':_0xa00eb8,'mention':_0x39cb58},_0x3238d8=await this[_0x4e0529(0x1c5)]['post'](_0x4e0529(0x1cc)+_0x43319c+_0x4e0529(0x22d),{'body':_0x5ad1df});return _0x491fe1(_0x3238d8['body'][_0x4e0529(0x1da)],_0x5a0c6a);}}async[_0x4a5f86(0x223)](_0x2f44de){const _0x62a97c=_0x4a5f86;var _0x42c715,_0xa675e6;const {text:_0x5b96e4,unitId:_0x5ec067}=_0x2f44de,_0x5b2085=(_0xa675e6=(_0x42c715=_0x5b96e4['customRanges'])==null?void 0x0:_0x42c715[_0x62a97c(0x1d1)](_0x199fb5=>_0x199fb5['rangeType']===_0x3e06ff[_0x62a97c(0x1f3)][_0x62a97c(0x23a)])[_0x62a97c(0x215)](_0x522ffd=>_0x522ffd['rangeId']))!=null?_0xa675e6:[],_0x1aa76c=JSON[_0x62a97c(0x1f1)](_0x5b96e4),_0x1ea54e=_0x2f44de['threadId'],_0x13ce46=_0x2f44de['id'],_0xc67b3a={'memberId':(await this[_0x62a97c(0x230)][_0x62a97c(0x1eb)](_0x5ec067))[_0x62a97c(0x22f)](),'unitId':_0x5ec067,'threadId':_0x1ea54e,'mention':_0x5b2085,'content':_0x1aa76c,'replyId':_0x13ce46},_0x2e54f4=await this[_0x62a97c(0x1c5)]['post']('/universer-api/comment/unit/'+_0x5ec067+_0x62a97c(0x1e3),{'body':_0xc67b3a});return!_0x2e54f4[_0x62a97c(0x200)]['error']||_0x2e54f4['body'][_0x62a97c(0x1fc)][_0x62a97c(0x21b)]===0x1;}async[_0x4a5f86(0x1fb)](_0x3d21ca){const _0x557dad=_0x4a5f86,{unitId:_0x4e4d8c}=_0x3d21ca,_0x56efe9=_0x3d21ca[_0x557dad(0x23e)],_0xbaceb0={'memberId':this[_0x557dad(0x1f5)][_0x557dad(0x232)]()[_0x557dad(0x1f6)],'unitId':_0x4e4d8c,'threadId':_0x56efe9,'solved':_0x3d21ca[_0x557dad(0x1dc)]?_0x137c8d[_0x557dad(0x1d8)]:_0x137c8d['OpenOrReOpen']},_0x8679=await this['_httpService'][_0x557dad(0x1c7)](_0x557dad(0x1cc)+_0x4e4d8c+_0x557dad(0x1e1),{'body':_0xbaceb0});return!_0x8679[_0x557dad(0x200)][_0x557dad(0x1fc)]||_0x8679[_0x557dad(0x200)][_0x557dad(0x1fc)][_0x557dad(0x21b)]===0x1;}async[_0x4a5f86(0x222)](_0xe374d9,_0x32ada2,_0x4d56e9,_0x4cfccc){const _0xb98d56=_0x4a5f86,_0xeb324a={'memberId':(await this[_0xb98d56(0x230)]['requireSession'](_0xe374d9))['getMemberID'](),'threadId':_0x4d56e9,'replyId':_0x4cfccc,'unitId':_0xe374d9},_0x34cbe9=await this[_0xb98d56(0x1c5)][_0xb98d56(0x1c7)](_0xb98d56(0x1cc)+_0xe374d9+'/delete',{'body':_0xeb324a});return!_0x34cbe9['body']['error']||_0x34cbe9[_0xb98d56(0x200)][_0xb98d56(0x1fc)]['code']===0x1;}async[_0x4a5f86(0x226)](_0x2630cc,_0x476e15,_0x561546){const _0x36b49e=_0x4a5f86,_0x5137da={'unitId':_0x2630cc,'threadId':_0x561546},_0x2dfa12=await this[_0x36b49e(0x1c5)][_0x36b49e(0x1c7)]('/universer-api/comment/unit/'+_0x2630cc+_0x36b49e(0x211),{'body':_0x5137da}),_0x2e16f5=_0x561546[_0x36b49e(0x215)](_0x5e954c=>_0x1453e8(_0x2dfa12[_0x36b49e(0x200)][_0x36b49e(0x1fa)][_0x5e954c],_0x2630cc,_0x476e15))[_0x36b49e(0x1d1)](Boolean);return Object['values'](_0x2dfa12['body']['users'])['forEach'](_0x556976=>{const _0x61f727=_0x36b49e;this[_0x61f727(0x1f5)][_0x61f727(0x233)](_0x556976);}),_0x2e16f5;}[_0x4a5f86(0x1e8)](_0x103d13){const _0x48b8f4=_0x4a5f86;return{'id':_0x103d13['id'],'threadId':_0x103d13[_0x48b8f4(0x23e)],'ref':_0x103d13[_0x48b8f4(0x205)]};}};_0x1f4fd0=_0x3bc456([_0x39995f(0x0,_0x3e06ff[_0x4a5f86(0x234)](_0x1af0b5[_0x4a5f86(0x22e)])),_0x39995f(0x1,_0x3e06ff[_0x4a5f86(0x234)](_0x3e06ff[_0x4a5f86(0x23b)])),_0x39995f(0x2,_0x3e06ff['Inject'](_0x4ebd7c[_0x4a5f86(0x212)]))],_0x1f4fd0);var _0xbe8f6a=Object[_0x4a5f86(0x219)],_0x47fb0d=(_0x503f06,_0x433883,_0x1f461b,_0x2134c6)=>{const _0x41b0c6=_0x4a5f86;for(var _0x253a7f=_0x2134c6>0x1?void 0x0:_0x2134c6?_0xbe8f6a(_0x433883,_0x1f461b):_0x433883,_0x4be89c=_0x503f06[_0x41b0c6(0x1ee)]-0x1,_0x5cc202;_0x4be89c>=0x0;_0x4be89c--)(_0x5cc202=_0x503f06[_0x4be89c])&&(_0x253a7f=_0x5cc202(_0x253a7f)||_0x253a7f);return _0x253a7f;},_0x17dccf=(_0x427610,_0x48251c)=>(_0x2697bd,_0x29619d)=>_0x48251c(_0x2697bd,_0x29619d,_0x427610);let _0x15f3b5=class extends _0x3e06ff[_0x4a5f86(0x20d)]{constructor(_0x18b085,_0x124d80){const _0x55edde=_0x4a5f86;super(),this[_0x55edde(0x218)]=_0x18b085,this[_0x55edde(0x240)]=_0x124d80,this[_0x55edde(0x221)]();}[_0x4a5f86(0x221)](){const _0x57632e=_0x4a5f86;this[_0x57632e(0x218)][_0x57632e(0x217)]=this[_0x57632e(0x240)],this[_0x57632e(0x218)][_0x57632e(0x1f9)]=!0x1;}};_0x15f3b5=_0x47fb0d([_0x17dccf(0x0,_0x33dd0d['IThreadCommentDataSourceService']),_0x17dccf(0x1,_0x3e06ff['Inject'](_0x1f4fd0))],_0x15f3b5);var _0xbe078d=Object[_0x4a5f86(0x242)],_0x551b2d=Object['getOwnPropertyDescriptor'],_0x208660=(_0x222905,_0x20f503,_0x40ff55)=>_0x20f503 in _0x222905?_0xbe078d(_0x222905,_0x20f503,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40ff55}):_0x222905[_0x20f503]=_0x40ff55,_0x523ee5=(_0x51444d,_0x3df040,_0x4a7c20,_0x3b6212)=>{const _0x40805c=_0x4a5f86;for(var _0x388a5d=_0x3b6212>0x1?void 0x0:_0x3b6212?_0x551b2d(_0x3df040,_0x4a7c20):_0x3df040,_0x87a1ef=_0x51444d[_0x40805c(0x1ee)]-0x1,_0x282b63;_0x87a1ef>=0x0;_0x87a1ef--)(_0x282b63=_0x51444d[_0x87a1ef])&&(_0x388a5d=_0x282b63(_0x388a5d)||_0x388a5d);return _0x388a5d;},_0x35fc04=(_0x5bab6a,_0x1c0590)=>(_0x57ed95,_0x104d7b)=>_0x1c0590(_0x57ed95,_0x104d7b,_0x5bab6a),_0x4a2b1a=(_0x5e6134,_0x4426af,_0x4a29e0)=>_0x208660(_0x5e6134,typeof _0x4426af!=_0x4a5f86(0x239)?_0x4426af+'':_0x4426af,_0x4a29e0);_0x347b73[_0x4a5f86(0x225)]=class extends _0x3e06ff[_0x4a5f86(0x20b)]{constructor(_0x8c6c71=_0x2833f6,_0x2a11e6,_0x18fa5f){const _0x29e345=_0x4a5f86;super(),this[_0x29e345(0x1cf)]=_0x8c6c71,this[_0x29e345(0x21c)]=_0x2a11e6,this[_0x29e345(0x201)]=_0x18fa5f;const {..._0x4ec4ba}=_0x3e06ff[_0x29e345(0x238)]({},_0x2833f6,this[_0x29e345(0x1cf)]);this['_configService'][_0x29e345(0x20a)](_0x3b08bc,_0x4ec4ba);}['onStarting'](){const _0xc452ad=_0x4a5f86;[[_0x1f4fd0],[_0x15f3b5],[_0x5d5359]][_0xc452ad(0x23c)](_0x341205=>{const _0x5c69eb=_0xc452ad;this[_0x5c69eb(0x21c)][_0x5c69eb(0x1c9)](_0x341205);});}['onReady'](){const _0x229cfc=_0x4a5f86;this[_0x229cfc(0x21c)][_0x229cfc(0x1e2)](_0x15f3b5),this[_0x229cfc(0x21c)][_0x229cfc(0x1e2)](_0x5d5359);}},_0x4a2b1a(_0x347b73[_0x4a5f86(0x225)],_0x4a5f86(0x1f2),_0x36598d),_0x4a2b1a(_0x347b73[_0x4a5f86(0x225)],_0x4a5f86(0x20c),_0x3e06ff[_0x4a5f86(0x248)][_0x4a5f86(0x1f4)]),_0x347b73[_0x4a5f86(0x225)]=_0x523ee5([_0x3e06ff[_0x4a5f86(0x224)](_0x2663f5['UniverThreadCommentUIPlugin'],_0x4ebd7c['UniverCollaborationClientPlugin'],_0x240775[_0x4a5f86(0x204)]),_0x35fc04(0x1,_0x3e06ff['Inject'](_0x3e06ff[_0x4a5f86(0x207)])),_0x35fc04(0x2,_0x3e06ff[_0x4a5f86(0x213)])],_0x347b73[_0x4a5f86(0x225)]),Object[_0x4a5f86(0x242)](_0x347b73,Symbol[_0x4a5f86(0x246)],{'value':_0x4a5f86(0x1e4)});}));function _0x5ce5(){const _0x1f6733=['subscribe','ThreadCommentModel','merge','symbol','COMMENT','UserManagerService','forEach','3112gDADfb','threadId','solved','_threadCommentDataSource','disposeWithMe','defineProperty','UniverCore','format','commentUpdate$','toStringTag','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverInstanceType','replies','121512kJOafl','addComment','delete','_init','getUser','_httpService','@univerjs/thread-comment-ui','post','526050VjgGsV','add','_threadCommentModel','thread-comment-data-source.config','/universer-api/comment/unit/','/universer-api/user/list','CommentService','_config','rangeType','filter','UniverProThreadCommentDatasource','reply','Edit','userId','UNRECOGNIZED','963400RDVEDs','Solved','OpenOrReOpen','comment','parentId','resolved','153cmAsNs','bufferTime','rxjs','/reply','/solved','get','/edit','Module','222rxCXPr','users','6JlqmAk','saveCommentToSnapshot','object','getUnit','requireSession','UniverProCollaborationClient','customRanges','length','1408580xmhyuh','Delete','stringify','pluginName','CustomRangeType','UNIVER_UNKNOWN','_userService','userID','@univerjs-pro/license','Reply','syncUpdateMutationToColla','comments','resolveComment','error','dayjs','root','createTimestamp','body','_configService','@univerjs/core','UniverThreadComment','UniverLicensePlugin','ref','find','Injector','getComment','@univerjs-pro/collaboration-client','setConfig','Plugin','type','Disposable','rangeId','parse','@univerjs/thread-comment','/list','CollaborationSessionService','IConfigService','Unknown','map','content','dataSource','_threadCommentDataSourceService','getOwnPropertyDescriptor','personId','code','_injector','exports','Add','replyId','Solve','_initDataSource','deleteComment','updateComment','DependentOn','UniverThreadCommentDataSourcePlugin','listComments','YYYY/MM/DD\x20HH:mm','UniverThreadCommentUi','_initUserSync','user','90pFSppk','5622428iZyKNu','/add','HTTPService','getMemberID','_sessionService','slice','getCurrentUser','addUser','Inject','837892RGWzDU'];_0x5ce5=function(){return _0x1f6733;};return _0x5ce5();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.15.
|
|
49
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.15.1",
|
|
49
|
+
"@univerjs-pro/license": "0.15.1",
|
|
50
|
+
"@univerjs/core": "0.15.1",
|
|
50
51
|
"@univerjs/protocol": "0.1.48",
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/thread-comment": "0.15.
|
|
53
|
-
"@univerjs-
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.15.0"
|
|
52
|
+
"@univerjs/network": "0.15.1",
|
|
53
|
+
"@univerjs/thread-comment": "0.15.1",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.15.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
|
-
"vite": "^7.3.
|
|
59
|
+
"vite": "^7.3.1",
|
|
60
60
|
"vitest": "^4.0.16",
|
|
61
|
-
"@univerjs-infra/shared": "0.15.
|
|
61
|
+
"@univerjs-infra/shared": "0.15.1"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|