@univerjs-pro/thread-comment-datasource 0.12.2-nightly.202511290905 → 0.12.3-experimental.20251204-1549a8e
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 +10 -10
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x3ffd5f=_0x229f;(function(_0x63500a,_0x5585b7){const _0x4178f2=_0x229f,_0x358dd6=_0x63500a();while(!![]){try{const _0x1d6136=parseInt(_0x4178f2(0x21a))/0x1+parseInt(_0x4178f2(0x22e))/0x2*(-parseInt(_0x4178f2(0x1f8))/0x3)+-parseInt(_0x4178f2(0x1fa))/0x4+parseInt(_0x4178f2(0x1f2))/0x5+-parseInt(_0x4178f2(0x1fc))/0x6+-parseInt(_0x4178f2(0x20b))/0x7*(parseInt(_0x4178f2(0x219))/0x8)+-parseInt(_0x4178f2(0x1c7))/0x9*(-parseInt(_0x4178f2(0x1f0))/0xa);if(_0x1d6136===_0x5585b7)break;else _0x358dd6['push'](_0x358dd6['shift']());}catch(_0x32ea84){_0x358dd6['push'](_0x358dd6['shift']());}}}(_0x22ab,0x4739b));Object[_0x3ffd5f(0x237)](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=_0x3ffd5f(0x1c4);var I=(_0x21c68f=>(_0x21c68f[_0x21c68f[_0x3ffd5f(0x1cd)]=0x0]=_0x3ffd5f(0x1cd),_0x21c68f[_0x21c68f[_0x3ffd5f(0x210)]=0x1]=_0x3ffd5f(0x210),_0x21c68f[_0x21c68f['UNRECOGNIZED']=-0x1]=_0x3ffd5f(0x1ce),_0x21c68f))(I||{}),v=(_0x26a073=>(_0x26a073[_0x26a073[_0x3ffd5f(0x204)]=0x0]=_0x3ffd5f(0x204),_0x26a073[_0x26a073[_0x3ffd5f(0x20d)]=0x1]='Add',_0x26a073[_0x26a073[_0x3ffd5f(0x1c9)]=0x2]=_0x3ffd5f(0x1c9),_0x26a073[_0x26a073[_0x3ffd5f(0x22b)]=0x3]=_0x3ffd5f(0x22b),_0x26a073[_0x26a073[_0x3ffd5f(0x224)]=0x4]=_0x3ffd5f(0x224),_0x26a073[_0x26a073[_0x3ffd5f(0x203)]=0x5]=_0x3ffd5f(0x203),_0x26a073[_0x26a073['UNRECOGNIZED']=-0x1]=_0x3ffd5f(0x1ce),_0x26a073))(v||{});function _0x22ab(){const _0x119461=['COMMENT','createTimestamp','_initDataSource','post','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replyId','length','108162UJiRgq','find','Reply','rangeId','subscribe','_threadCommentDataSourceService','OpenOrReOpen','UNRECOGNIZED','ThreadCommentModel','setConfig','_configService','userId','content','Injector','HTTPService','values','add','comments','map','_init','Inject','rangeType','CustomRangeType','getUnit','dataSource','code','/universer-api/comment/unit/','parse','UNIVER_UNKNOWN','CollaborationSessionService','_httpService','filter','getCurrentUser','Plugin','/solved','resolveComment','_threadCommentDataSource','format','user','UniverThreadCommentDataSourcePlugin','requireSession','520Vvirho','/add','1024125oPjfGJ','addUser','delete','_threadCommentModel','resolved','IThreadCommentDataSourceService','1047GGmfJw','Disposable','333044unegLG','getUser','695916vAEtit','IConfigService','forEach','error','body','/delete','ref','Solve','Unknown','userID','UserManagerService','reply','/reply','onReady','syncUpdateMutationToColla','13363bCvnnw','customRanges','Add','_config','replies','Solved','UniverThreadCommentUIPlugin','deleteComment','getOwnPropertyDescriptor','threadId','personId','size','stringify','YYYY/MM/DD\x20HH:mm','1296JwheKH','527836yUrxLf','/edit','parentId','pluginName','_injector','DependentOn','getMemberID','getComment','UniverLicensePlugin','CommentService','Delete','commentUpdate$','root','_sessionService','solved','get','_initUserSync','Edit','_userService','addComment','3194YQgZNt','unitId','type','onStarting','pipe'];_0x22ab=function(){return _0x119461;};return _0x22ab();}const f=_0x41de1a=>c['dayjs'](new Date(+_0x41de1a))[_0x3ffd5f(0x1ec)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x36fa58,_0x18b8d1)=>{const _0x310eb7=_0x3ffd5f,_0x4f242b=_0x36fa58[_0x310eb7(0x229)](c[_0x310eb7(0x206)]),_0x644afe=_0x36fa58[_0x310eb7(0x229)](P[_0x310eb7(0x1d5)]);_0x18b8d1[_0x310eb7(0x1fe)](_0x4a9b21=>{const _0x4f576d=_0x310eb7;_0x4f242b[_0x4f576d(0x1fb)](_0x4a9b21)&&_0x18b8d1[_0x4f576d(0x1f4)](_0x4a9b21);}),_0x18b8d1[_0x310eb7(0x216)]&&(await _0x644afe[_0x310eb7(0x229)]('/universer-api/user/list',{'params':{'userIDs':[..._0x18b8d1]}}))['body']['users'][_0x310eb7(0x1fe)](_0x54f8eb=>{const _0x3f7b73=_0x310eb7;_0x54f8eb&&_0x4f242b[_0x3f7b73(0x1f3)](_0x54f8eb);});};var $=Object[_0x3ffd5f(0x213)],E=(_0xed126a,_0x1bb2d1,_0x290a40,_0x2518fb)=>{const _0x1408c6=_0x3ffd5f;for(var _0x382868=_0x2518fb>0x1?void 0x0:_0x2518fb?$(_0x1bb2d1,_0x290a40):_0x1bb2d1,_0x34b5bf=_0xed126a[_0x1408c6(0x1c6)]-0x1,_0x512159;_0x34b5bf>=0x0;_0x34b5bf--)(_0x512159=_0xed126a[_0x34b5bf])&&(_0x382868=_0x512159(_0x382868)||_0x382868);return _0x382868;},S=(_0x18eef2,_0x2e23ce)=>(_0x498d59,_0x1263d4)=>_0x2e23ce(_0x498d59,_0x1263d4,_0x18eef2);let _=class extends c[_0x3ffd5f(0x1f9)]{constructor(_0x1af81b,_0x59f9ea,_0x5ad5bd,_0x15fc93){const _0x5348a9=_0x3ffd5f;super(),this['_commentService']=_0x1af81b,this[_0x5348a9(0x1f5)]=_0x59f9ea,this['_userService']=_0x5ad5bd,this['_injector']=_0x15fc93,this['_init'](),this[_0x5348a9(0x22a)]();}[_0x3ffd5f(0x22a)](){const _0x2459fb=_0x3ffd5f;this['disposeWithMe'](this['_threadCommentModel'][_0x2459fb(0x225)][_0x2459fb(0x232)](j['bufferTime'](0x10))[_0x2459fb(0x1cb)](_0x4546f1=>{const _0x334fb3=_0x2459fb,_0x533be0=new Set();_0x4546f1[_0x334fb3(0x1fe)](_0x1406d5=>{const _0x489eb8=_0x334fb3;switch(_0x1406d5['type']){case'add':{const _0x3d0592=_0x1406d5['payload'][_0x489eb8(0x215)];_0x533be0['add'](_0x3d0592);break;}}}),R(this[_0x334fb3(0x21e)],_0x533be0);}));}[_0x3ffd5f(0x1da)](){const _0x8e2619=_0x3ffd5f;this['disposeWithMe'](this['_commentService'][_0x8e2619(0x225)][_0x8e2619(0x1cb)](async _0x1950a0=>{const _0x3b5b70=_0x8e2619;var _0x15dc49,_0xfda9de,_0x343034,_0x1f7145;const _0x1ae6c2=(_0x15dc49=this[_0x3b5b70(0x1f5)]['getUnit'](_0x1950a0[_0x3b5b70(0x22f)])[_0x3b5b70(0x1c8)](_0xe50dca=>_0xe50dca['threadId']===_0x1950a0[_0x3b5b70(0x214)]))==null?void 0x0:_0x15dc49[_0x3b5b70(0x226)];if(!_0x1ae6c2)return;const {unitId:_0x5c822a,subUnitId:_0x56a978}=_0x1ae6c2;switch(_0x1950a0[_0x3b5b70(0x1ed)]&&this[_0x3b5b70(0x22c)][_0x3b5b70(0x1f3)](_0x1950a0[_0x3b5b70(0x1ed)]),_0x1950a0[_0x3b5b70(0x230)]){case v[_0x3b5b70(0x20d)]:break;case v[_0x3b5b70(0x1c9)]:{this[_0x3b5b70(0x1f5)]['addComment'](_0x5c822a,_0x56a978,{'unitId':_0x5c822a,'subUnitId':_0x56a978,'ref':'','id':_0x1950a0['replyId'],'dT':f(+_0x1950a0['createTimestamp']),'threadId':_0x1950a0['threadId'],'personId':(_0x343034=(_0xfda9de=_0x1950a0['user'])==null?void 0x0:_0xfda9de[_0x3b5b70(0x205)])!=null?_0x343034:_0x1950a0[_0x3b5b70(0x1d2)],'text':JSON[_0x3b5b70(0x1e2)](_0x1950a0[_0x3b5b70(0x1d3)]),'parentId':_0x1ae6c2['id']});break;}case v[_0x3b5b70(0x224)]:{const _0x4c4484=this[_0x3b5b70(0x1f5)][_0x3b5b70(0x221)](_0x5c822a,_0x56a978,_0x1950a0[_0x3b5b70(0x1c5)]);_0x4c4484&&_0x4c4484[_0x3b5b70(0x21c)]&&this[_0x3b5b70(0x1f5)][_0x3b5b70(0x212)](_0x5c822a,_0x56a978,_0x1950a0[_0x3b5b70(0x1c5)]);break;}case v[_0x3b5b70(0x22b)]:{this[_0x3b5b70(0x1f5)]['updateComment'](_0x5c822a,_0x56a978,{'commentId':_0x1950a0[_0x3b5b70(0x1c5)],'text':JSON['parse'](_0x1950a0[_0x3b5b70(0x1d3)])});break;}case v[_0x3b5b70(0x203)]:{const _0x22ce85=(_0x1f7145=this[_0x3b5b70(0x1f5)][_0x3b5b70(0x1de)](_0x1950a0[_0x3b5b70(0x22f)])['find'](_0x49c8f1=>_0x49c8f1['threadId']===_0x1950a0[_0x3b5b70(0x214)]))==null?void 0x0:_0x1f7145[_0x3b5b70(0x226)];_0x22ce85&&this[_0x3b5b70(0x1f5)]['resolveComment'](_0x5c822a,_0x56a978,_0x22ce85['id'],_0x1950a0[_0x3b5b70(0x228)]===I[_0x3b5b70(0x210)]);break;}}}));}};_=E([S(0x0,c[_0x3ffd5f(0x1db)](b[_0x3ffd5f(0x223)])),S(0x1,c[_0x3ffd5f(0x1db)](M[_0x3ffd5f(0x1cf)])),S(0x2,c[_0x3ffd5f(0x1db)](c['UserManagerService'])),S(0x3,c[_0x3ffd5f(0x1db)](c['Injector']))],_);function _0x229f(_0x12ac3e,_0xba2b9d){const _0x22abf3=_0x22ab();return _0x229f=function(_0x229fa7,_0x4ea40a){_0x229fa7=_0x229fa7-0x1c4;let _0x4389ff=_0x22abf3[_0x229fa7];return _0x4389ff;},_0x229f(_0x12ac3e,_0xba2b9d);}const q='thread-comment-data-source.config',D={};var A=Object[_0x3ffd5f(0x213)],x=(_0x4f241e,_0x1d3347,_0x4aa095,_0x52eb81)=>{const _0x4bd634=_0x3ffd5f;for(var _0x2b9aca=_0x52eb81>0x1?void 0x0:_0x52eb81?A(_0x1d3347,_0x4aa095):_0x1d3347,_0x391863=_0x4f241e[_0x4bd634(0x1c6)]-0x1,_0x522c2b;_0x391863>=0x0;_0x391863--)(_0x522c2b=_0x4f241e[_0x391863])&&(_0x2b9aca=_0x522c2b(_0x2b9aca)||_0x2b9aca);return _0x2b9aca;},C=(_0x478c92,_0x17adda)=>(_0x1f8dc2,_0xb12cfb)=>_0x17adda(_0x1f8dc2,_0xb12cfb,_0x478c92);function Y(_0x3970f8,_0x416e1c){const _0x10199a=_0x3ffd5f,_0x2549ff=_0x3970f8[_0x10199a(0x20f)][0x0];return{..._0x416e1c,'id':_0x2549ff[_0x10199a(0x1c5)],'resolved':_0x3970f8['solved']===0x1,'dT':f(_0x2549ff[_0x10199a(0x234)]),'personId':_0x2549ff[_0x10199a(0x1d2)],'threadId':_0x2549ff[_0x10199a(0x214)]};}function G(_0x2c3740,_0x29d71c,_0x4a877a){const _0x1a8500=_0x3ffd5f;var _0x570c22,_0x11d440;if(((_0x11d440=(_0x570c22=_0x2c3740==null?void 0x0:_0x2c3740['replies'])==null?void 0x0:_0x570c22[_0x1a8500(0x1c6)])!=null?_0x11d440:0x0)>0x0){const _0x519bc6=(_0x44f989,_0x175b6d)=>({'id':_0x44f989[_0x1a8500(0x1c5)],'threadId':_0x44f989['threadId'],'dT':f(_0x44f989[_0x1a8500(0x234)]),'personId':_0x44f989[_0x1a8500(0x1d2)],'resolved':_0x2c3740[_0x1a8500(0x228)]===I['Solved'],'unitId':_0x29d71c,'subUnitId':_0x4a877a,'text':JSON['parse'](_0x44f989[_0x1a8500(0x1d3)]),'parentId':_0x175b6d}),_0x4f16fc=_0x519bc6(_0x2c3740[_0x1a8500(0x20f)][0x0]);return{..._0x4f16fc,'children':_0x2c3740['replies']['slice'](0x1)[_0x1a8500(0x1d9)](_0x3d4c2f=>_0x519bc6(_0x3d4c2f,_0x4f16fc['id']))};}return null;}let p=class{constructor(_0x4b3588,_0x475ebc,_0x184ab5){const _0x300971=_0x3ffd5f;this[_0x300971(0x1e5)]=_0x4b3588,this[_0x300971(0x22c)]=_0x475ebc,this[_0x300971(0x227)]=_0x184ab5;}async[_0x3ffd5f(0x22d)](_0x16997c){const _0x5786b9=_0x3ffd5f;var _0x233420,_0xa37ddf;const {parentId:_0x1e3ab8,unitId:_0x21ceca,text:_0x7ebd01,threadId:_0x4a1835}=_0x16997c,_0x1fa95d=(_0xa37ddf=(_0x233420=_0x7ebd01[_0x5786b9(0x20c)])==null?void 0x0:_0x233420[_0x5786b9(0x1e6)](_0x5286a0=>_0x5286a0[_0x5786b9(0x1dc)]===c[_0x5786b9(0x1dd)][_0x5786b9(0x233)])[_0x5786b9(0x1d9)](_0x117a45=>_0x117a45[_0x5786b9(0x1ca)]))!=null?_0xa37ddf:[],_0x1f2278=JSON[_0x5786b9(0x217)](_0x7ebd01),_0x4a8a3b=(await this['_sessionService'][_0x5786b9(0x1ef)](_0x21ceca))['getMemberID']();if(_0x1e3ab8){const _0x1becaf={'memberId':_0x4a8a3b,'unitId':_0x21ceca,'content':_0x1f2278,'mention':_0x1fa95d,'threadId':_0x4a1835},_0x3e73f8=(await this[_0x5786b9(0x1e5)][_0x5786b9(0x236)](_0x5786b9(0x1e1)+_0x21ceca+_0x5786b9(0x208),{'body':_0x1becaf}))['body'][_0x5786b9(0x207)];return{..._0x16997c,'id':_0x3e73f8['replyId'],'dT':c['dayjs'](+_0x3e73f8['createTimestamp'])[_0x5786b9(0x1ec)](_0x5786b9(0x218)),'personId':_0x3e73f8[_0x5786b9(0x1d2)]};}else{const _0x5aad8f={'memberId':_0x4a8a3b,'unitId':_0x21ceca,'content':_0x1f2278,'mention':_0x1fa95d},_0x210ddb=await this['_httpService'][_0x5786b9(0x236)](_0x5786b9(0x1e1)+_0x21ceca+_0x5786b9(0x1f1),{'body':_0x5aad8f});return Y(_0x210ddb[_0x5786b9(0x200)]['comment'],_0x16997c);}}async['updateComment'](_0x267565){const _0x2dea94=_0x3ffd5f;var _0x5655bc,_0x2ea535;const {text:_0x1b5581,unitId:_0x38e69a}=_0x267565,_0x233912=(_0x2ea535=(_0x5655bc=_0x1b5581['customRanges'])==null?void 0x0:_0x5655bc[_0x2dea94(0x1e6)](_0x4e646a=>_0x4e646a[_0x2dea94(0x1dc)]===c[_0x2dea94(0x1dd)][_0x2dea94(0x233)])[_0x2dea94(0x1d9)](_0x555174=>_0x555174[_0x2dea94(0x1ca)]))!=null?_0x2ea535:[],_0x360454=JSON[_0x2dea94(0x217)](_0x1b5581),_0x17e2c2=_0x267565[_0x2dea94(0x214)],_0x6840e8=_0x267565['id'],_0x4ee7bd={'memberId':(await this[_0x2dea94(0x227)]['requireSession'](_0x38e69a))[_0x2dea94(0x220)](),'unitId':_0x38e69a,'threadId':_0x17e2c2,'mention':_0x233912,'content':_0x360454,'replyId':_0x6840e8},_0x92f2c6=await this[_0x2dea94(0x1e5)][_0x2dea94(0x236)](_0x2dea94(0x1e1)+_0x38e69a+_0x2dea94(0x21b),{'body':_0x4ee7bd});return!_0x92f2c6[_0x2dea94(0x200)][_0x2dea94(0x1ff)]||_0x92f2c6[_0x2dea94(0x200)][_0x2dea94(0x1ff)][_0x2dea94(0x1e0)]===0x1;}async[_0x3ffd5f(0x1ea)](_0x16efe9){const _0xa2691d=_0x3ffd5f,{unitId:_0x19d2b1}=_0x16efe9,_0x12fe14=_0x16efe9[_0xa2691d(0x214)],_0x326bff={'memberId':this[_0xa2691d(0x22c)][_0xa2691d(0x1e7)]()[_0xa2691d(0x205)],'unitId':_0x19d2b1,'threadId':_0x12fe14,'solved':_0x16efe9[_0xa2691d(0x1f6)]?I[_0xa2691d(0x210)]:I[_0xa2691d(0x1cd)]},_0x473049=await this[_0xa2691d(0x1e5)][_0xa2691d(0x236)]('/universer-api/comment/unit/'+_0x19d2b1+_0xa2691d(0x1e9),{'body':_0x326bff});return!_0x473049[_0xa2691d(0x200)][_0xa2691d(0x1ff)]||_0x473049[_0xa2691d(0x200)][_0xa2691d(0x1ff)]['code']===0x1;}async[_0x3ffd5f(0x212)](_0xe1562f,_0xbcc5eb,_0x4f778e,_0x1ac52f){const _0x50f5d3=_0x3ffd5f,_0x403956={'memberId':(await this[_0x50f5d3(0x227)]['requireSession'](_0xe1562f))[_0x50f5d3(0x220)](),'threadId':_0x4f778e,'replyId':_0x1ac52f,'unitId':_0xe1562f},_0x40a7e0=await this[_0x50f5d3(0x1e5)]['post'](_0x50f5d3(0x1e1)+_0xe1562f+_0x50f5d3(0x201),{'body':_0x403956});return!_0x40a7e0[_0x50f5d3(0x200)][_0x50f5d3(0x1ff)]||_0x40a7e0[_0x50f5d3(0x200)]['error']['code']===0x1;}async['listComments'](_0x44444b,_0xf93f30,_0x1be376){const _0x540237=_0x3ffd5f,_0x254c51={'unitId':_0x44444b,'threadId':_0x1be376},_0x3386a5=await this[_0x540237(0x1e5)][_0x540237(0x236)](_0x540237(0x1e1)+_0x44444b+'/list',{'body':_0x254c51}),_0x3272cf=_0x1be376[_0x540237(0x1d9)](_0x2955e4=>G(_0x3386a5[_0x540237(0x200)][_0x540237(0x1d8)][_0x2955e4],_0x44444b,_0xf93f30))[_0x540237(0x1e6)](Boolean);return Object[_0x540237(0x1d6)](_0x3386a5[_0x540237(0x200)]['users'])['forEach'](_0x466297=>{const _0x27180f=_0x540237;this[_0x27180f(0x22c)][_0x27180f(0x1f3)](_0x466297);}),_0x3272cf;}['saveCommentToSnapshot'](_0x5cd854){const _0x47f089=_0x3ffd5f;return{'id':_0x5cd854['id'],'threadId':_0x5cd854[_0x47f089(0x214)],'ref':_0x5cd854[_0x47f089(0x202)]};}};p=x([C(0x0,c[_0x3ffd5f(0x1db)](P[_0x3ffd5f(0x1d5)])),C(0x1,c[_0x3ffd5f(0x1db)](c[_0x3ffd5f(0x206)])),C(0x2,c[_0x3ffd5f(0x1db)](b[_0x3ffd5f(0x1e4)]))],p);var H=Object[_0x3ffd5f(0x213)],J=(_0x2888fd,_0x450663,_0x372345,_0xeb4300)=>{const _0x2062d8=_0x3ffd5f;for(var _0x1fc94f=_0xeb4300>0x1?void 0x0:_0xeb4300?H(_0x450663,_0x372345):_0x450663,_0x107f8f=_0x2888fd[_0x2062d8(0x1c6)]-0x1,_0x5776c0;_0x107f8f>=0x0;_0x107f8f--)(_0x5776c0=_0x2888fd[_0x107f8f])&&(_0x1fc94f=_0x5776c0(_0x1fc94f)||_0x1fc94f);return _0x1fc94f;},y=(_0x1f2c4c,_0x30978b)=>(_0x4b3150,_0x39608c)=>_0x30978b(_0x4b3150,_0x39608c,_0x1f2c4c);let g=class extends c['Disposable']{constructor(_0x4d13f3,_0x2465f9){const _0x4f18e1=_0x3ffd5f;super(),this[_0x4f18e1(0x1cc)]=_0x4d13f3,this[_0x4f18e1(0x1eb)]=_0x2465f9,this[_0x4f18e1(0x235)]();}[_0x3ffd5f(0x235)](){const _0x1e266f=_0x3ffd5f;this[_0x1e266f(0x1cc)][_0x1e266f(0x1df)]=this[_0x1e266f(0x1eb)],this[_0x1e266f(0x1cc)][_0x1e266f(0x20a)]=!0x1;}};g=J([y(0x0,M[_0x3ffd5f(0x1f7)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x3ffd5f(0x237)],L=Object[_0x3ffd5f(0x213)],Z=(_0x24b30f,_0x59548a,_0x272c3e)=>_0x59548a in _0x24b30f?F(_0x24b30f,_0x59548a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x272c3e}):_0x24b30f[_0x59548a]=_0x272c3e,W=(_0x50864b,_0x251bb4,_0xd412c2,_0x43adb2)=>{for(var _0x4161b3=_0x43adb2>0x1?void 0x0:_0x43adb2?L(_0x251bb4,_0xd412c2):_0x251bb4,_0x308d98=_0x50864b['length']-0x1,_0x3d7e53;_0x308d98>=0x0;_0x308d98--)(_0x3d7e53=_0x50864b[_0x308d98])&&(_0x4161b3=_0x3d7e53(_0x4161b3)||_0x4161b3);return _0x4161b3;},O=(_0x12c949,_0x3f9d41)=>(_0x2767fa,_0x4caae2)=>_0x3f9d41(_0x2767fa,_0x4caae2,_0x12c949),N=(_0x4f663d,_0x2b424d,_0x3d0b72)=>Z(_0x4f663d,typeof _0x2b424d!='symbol'?_0x2b424d+'':_0x2b424d,_0x3d0b72);exports[_0x3ffd5f(0x1ee)]=class extends c[_0x3ffd5f(0x1e8)]{constructor(_0x391396=D,_0x451456,_0x2abc03){const _0x3a2302=_0x3ffd5f;super(),this[_0x3a2302(0x20e)]=_0x391396,this[_0x3a2302(0x21e)]=_0x451456,this['_configService']=_0x2abc03;const {..._0x1a2b5a}=c['merge']({},D,this['_config']);this[_0x3a2302(0x1d1)][_0x3a2302(0x1d0)](q,_0x1a2b5a);}[_0x3ffd5f(0x231)](){[[p],[g],[_]]['forEach'](_0x341e9e=>{const _0x20617d=_0x229f;this[_0x20617d(0x21e)][_0x20617d(0x1d7)](_0x341e9e);});}[_0x3ffd5f(0x209)](){const _0xa0da08=_0x3ffd5f;this[_0xa0da08(0x21e)][_0xa0da08(0x229)](g),this[_0xa0da08(0x21e)][_0xa0da08(0x229)](_);}},N(exports[_0x3ffd5f(0x1ee)],_0x3ffd5f(0x21d),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x3ffd5f(0x230),c['UniverInstanceType'][_0x3ffd5f(0x1e3)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3ffd5f(0x21f)](w[_0x3ffd5f(0x211)],b['UniverCollaborationClientPlugin'],T[_0x3ffd5f(0x222)]),O(0x1,c[_0x3ffd5f(0x1db)](c[_0x3ffd5f(0x1d4)])),O(0x2,c[_0x3ffd5f(0x1fd)])],exports[_0x3ffd5f(0x1ee)]);
|
|
1
|
+
'use strict';const _0x34930f=_0x5ef9;(function(_0x265a4c,_0x4e8e8d){const _0x1741eb=_0x5ef9,_0xdc37c3=_0x265a4c();while(!![]){try{const _0x3d38ab=-parseInt(_0x1741eb(0xd3))/0x1+-parseInt(_0x1741eb(0x96))/0x2*(-parseInt(_0x1741eb(0xa4))/0x3)+parseInt(_0x1741eb(0x7e))/0x4*(-parseInt(_0x1741eb(0xc1))/0x5)+-parseInt(_0x1741eb(0xc3))/0x6+-parseInt(_0x1741eb(0xa1))/0x7+-parseInt(_0x1741eb(0x75))/0x8*(parseInt(_0x1741eb(0x6a))/0x9)+-parseInt(_0x1741eb(0xb4))/0xa*(-parseInt(_0x1741eb(0xb5))/0xb);if(_0x3d38ab===_0x4e8e8d)break;else _0xdc37c3['push'](_0xdc37c3['shift']());}catch(_0x6ab431){_0xdc37c3['push'](_0xdc37c3['shift']());}}}(_0x2384,0x2064f));Object[_0x34930f(0xb9)](exports,Symbol[_0x34930f(0x73)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x34930f(0x66);var I=(_0x1d950a=>(_0x1d950a[_0x1d950a[_0x34930f(0x6d)]=0x0]=_0x34930f(0x6d),_0x1d950a[_0x1d950a[_0x34930f(0x69)]=0x1]=_0x34930f(0x69),_0x1d950a[_0x1d950a[_0x34930f(0xdc)]=-0x1]=_0x34930f(0xdc),_0x1d950a))(I||{}),v=(_0xafe83a=>(_0xafe83a[_0xafe83a[_0x34930f(0xaa)]=0x0]=_0x34930f(0xaa),_0xafe83a[_0xafe83a[_0x34930f(0xd4)]=0x1]=_0x34930f(0xd4),_0xafe83a[_0xafe83a[_0x34930f(0x89)]=0x2]='Reply',_0xafe83a[_0xafe83a[_0x34930f(0xba)]=0x3]=_0x34930f(0xba),_0xafe83a[_0xafe83a[_0x34930f(0x71)]=0x4]=_0x34930f(0x71),_0xafe83a[_0xafe83a[_0x34930f(0xdf)]=0x5]='Solve',_0xafe83a[_0xafe83a[_0x34930f(0xdc)]=-0x1]='UNRECOGNIZED',_0xafe83a))(v||{});const f=_0x165fb9=>c[_0x34930f(0xb0)](new Date(+_0x165fb9))[_0x34930f(0x78)](_0x34930f(0xca)),R=async(_0x1e5fa4,_0x2a2dbd)=>{const _0xc4337a=_0x34930f,_0x47c496=_0x1e5fa4[_0xc4337a(0x74)](c[_0xc4337a(0x76)]),_0x3d15b5=_0x1e5fa4[_0xc4337a(0x74)](P[_0xc4337a(0xa5)]);_0x2a2dbd['forEach'](_0x519b8c=>{const _0x345e7e=_0xc4337a;_0x47c496[_0x345e7e(0x7b)](_0x519b8c)&&_0x2a2dbd[_0x345e7e(0x9d)](_0x519b8c);}),_0x2a2dbd[_0xc4337a(0x92)]&&(await _0x3d15b5[_0xc4337a(0x74)](_0xc4337a(0xbc),{'params':{'userIDs':[..._0x2a2dbd]}}))['body'][_0xc4337a(0xd1)][_0xc4337a(0xc9)](_0x2650b8=>{const _0x5882ab=_0xc4337a;_0x2650b8&&_0x47c496[_0x5882ab(0x93)](_0x2650b8);});};var $=Object[_0x34930f(0x9e)],E=(_0x53e257,_0x4f4e62,_0x46f487,_0x2de7f3)=>{for(var _0x3b3a96=_0x2de7f3>0x1?void 0x0:_0x2de7f3?$(_0x4f4e62,_0x46f487):_0x4f4e62,_0x180c11=_0x53e257['length']-0x1,_0x231d31;_0x180c11>=0x0;_0x180c11--)(_0x231d31=_0x53e257[_0x180c11])&&(_0x3b3a96=_0x231d31(_0x3b3a96)||_0x3b3a96);return _0x3b3a96;},S=(_0x936dbf,_0x5357fb)=>(_0x480579,_0x448cf1)=>_0x5357fb(_0x480579,_0x448cf1,_0x936dbf);let _=class extends c[_0x34930f(0xd0)]{constructor(_0x4be9ad,_0x117b2d,_0x3d6e05,_0x1ee03b){const _0x149692=_0x34930f;super(),this[_0x149692(0xde)]=_0x4be9ad,this[_0x149692(0xbe)]=_0x117b2d,this[_0x149692(0x90)]=_0x3d6e05,this[_0x149692(0xd7)]=_0x1ee03b,this['_init'](),this[_0x149692(0x95)]();}[_0x34930f(0x95)](){const _0x4ca4fd=_0x34930f;this[_0x4ca4fd(0xae)](this[_0x4ca4fd(0xbe)][_0x4ca4fd(0xb3)][_0x4ca4fd(0xd9)](j[_0x4ca4fd(0x7f)](0x10))[_0x4ca4fd(0xc7)](_0x4a5239=>{const _0x55cec4=_0x4ca4fd,_0x4ec51b=new Set();_0x4a5239[_0x55cec4(0xc9)](_0x1be55b=>{const _0xc306d7=_0x55cec4;switch(_0x1be55b[_0xc306d7(0xa9)]){case _0xc306d7(0x65):{const _0x3dff76=_0x1be55b[_0xc306d7(0xcb)][_0xc306d7(0x7d)];_0x4ec51b[_0xc306d7(0x65)](_0x3dff76);break;}}}),R(this[_0x55cec4(0xd7)],_0x4ec51b);}));}[_0x34930f(0x77)](){const _0x2358df=_0x34930f;this[_0x2358df(0xae)](this[_0x2358df(0xde)]['commentUpdate$'][_0x2358df(0xc7)](async _0x156c3e=>{const _0x28bf9b=_0x2358df;var _0x257424,_0x34e7cc,_0x2baedf,_0x5b843a;const _0x307df5=(_0x257424=this[_0x28bf9b(0xbe)][_0x28bf9b(0xac)](_0x156c3e[_0x28bf9b(0xb8)])[_0x28bf9b(0xbb)](_0x34277d=>_0x34277d[_0x28bf9b(0x99)]===_0x156c3e[_0x28bf9b(0x99)]))==null?void 0x0:_0x257424[_0x28bf9b(0xb2)];if(!_0x307df5)return;const {unitId:_0x3add95,subUnitId:_0x3e3662}=_0x307df5;switch(_0x156c3e[_0x28bf9b(0xd6)]&&this[_0x28bf9b(0x90)][_0x28bf9b(0x93)](_0x156c3e[_0x28bf9b(0xd6)]),_0x156c3e[_0x28bf9b(0xa9)]){case v['Add']:break;case v[_0x28bf9b(0x89)]:{this['_threadCommentModel']['addComment'](_0x3add95,_0x3e3662,{'unitId':_0x3add95,'subUnitId':_0x3e3662,'ref':'','id':_0x156c3e['replyId'],'dT':f(+_0x156c3e[_0x28bf9b(0x97)]),'threadId':_0x156c3e[_0x28bf9b(0x99)],'personId':(_0x2baedf=(_0x34e7cc=_0x156c3e[_0x28bf9b(0xd6)])==null?void 0x0:_0x34e7cc[_0x28bf9b(0xb1)])!=null?_0x2baedf:_0x156c3e['userId'],'text':JSON[_0x28bf9b(0x82)](_0x156c3e['content']),'parentId':_0x307df5['id']});break;}case v[_0x28bf9b(0x71)]:{const _0x5806e7=this[_0x28bf9b(0xbe)][_0x28bf9b(0x79)](_0x3add95,_0x3e3662,_0x156c3e[_0x28bf9b(0xcd)]);_0x5806e7&&_0x5806e7[_0x28bf9b(0xd2)]&&this[_0x28bf9b(0xbe)][_0x28bf9b(0xcc)](_0x3add95,_0x3e3662,_0x156c3e['replyId']);break;}case v[_0x28bf9b(0xba)]:{this[_0x28bf9b(0xbe)][_0x28bf9b(0x86)](_0x3add95,_0x3e3662,{'commentId':_0x156c3e[_0x28bf9b(0xcd)],'text':JSON[_0x28bf9b(0x82)](_0x156c3e[_0x28bf9b(0x9b)])});break;}case v[_0x28bf9b(0xdf)]:{const _0x4ad4c7=(_0x5b843a=this['_threadCommentModel'][_0x28bf9b(0xac)](_0x156c3e['unitId'])['find'](_0x2fc3bf=>_0x2fc3bf[_0x28bf9b(0x99)]===_0x156c3e[_0x28bf9b(0x99)]))==null?void 0x0:_0x5b843a['root'];_0x4ad4c7&&this[_0x28bf9b(0xbe)][_0x28bf9b(0x8b)](_0x3add95,_0x3e3662,_0x4ad4c7['id'],_0x156c3e[_0x28bf9b(0xa0)]===I[_0x28bf9b(0x69)]);break;}}}));}};function _0x2384(){const _0x5523fa=['requireSession','OpenOrReOpen','onReady','Injector','/list','Delete','ThreadCommentModel','toStringTag','get','909080NzMJBP','UserManagerService','_init','format','getComment','body','getUser','_threadCommentDataSource','personId','316xuqjdJ','bufferTime','CollaborationSessionService','replies','parse','rangeType','_httpService','/delete','updateComment','saveCommentToSnapshot','/universer-api/comment/unit/','Reply','thread-comment-data-source.config','resolveComment','comment','listComments','getCurrentUser','map','_userService','rangeId','size','addUser','_configService','_initUserSync','182KaSIIy','createTimestamp','_sessionService','threadId','_threadCommentDataSourceService','content','resolved','delete','getOwnPropertyDescriptor','syncUpdateMutationToColla','solved','675402eLPuOn','stringify','customRanges','7455kRLUCH','HTTPService','/reply','COMMENT','filter','type','Unknown','symbol','getUnit','length','disposeWithMe','getMemberID','dayjs','userID','root','commentUpdate$','97670owHzZm','594vNJIhz','comments','onStarting','unitId','defineProperty','Edit','find','/universer-api/user/list','_config','_threadCommentModel','addComment','UNIVER_UNKNOWN','5315DpNKoP','code','449244oSHaWq','error','Inject','IConfigService','subscribe','UniverThreadCommentDataSourcePlugin','forEach','YYYY/MM/DD\x20HH:mm','payload','deleteComment','replyId','/add','merge','Disposable','users','parentId','138259cYEsWF','Add','CommentService','user','_injector','CustomRangeType','pipe','UniverThreadCommentUIPlugin','post','UNRECOGNIZED','reply','_commentService','Solve','Plugin','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userId','_initDataSource','Solved','18FTkDTQ','setConfig'];_0x2384=function(){return _0x5523fa;};return _0x2384();}_=E([S(0x0,c['Inject'](b[_0x34930f(0xd5)])),S(0x1,c[_0x34930f(0xc5)](M[_0x34930f(0x72)])),S(0x2,c[_0x34930f(0xc5)](c[_0x34930f(0x76)])),S(0x3,c[_0x34930f(0xc5)](c[_0x34930f(0x6f)]))],_);const q=_0x34930f(0x8a),D={};var A=Object[_0x34930f(0x9e)],x=(_0x104071,_0x196fc3,_0x261e9d,_0x14b53f)=>{const _0x275b10=_0x34930f;for(var _0x45193c=_0x14b53f>0x1?void 0x0:_0x14b53f?A(_0x196fc3,_0x261e9d):_0x196fc3,_0x32266f=_0x104071[_0x275b10(0xad)]-0x1,_0x55224f;_0x32266f>=0x0;_0x32266f--)(_0x55224f=_0x104071[_0x32266f])&&(_0x45193c=_0x55224f(_0x45193c)||_0x45193c);return _0x45193c;},C=(_0x45046e,_0x5cd572)=>(_0x6bcbcb,_0x443ab8)=>_0x5cd572(_0x6bcbcb,_0x443ab8,_0x45046e);function Y(_0x1c6a2c,_0x5285ec){const _0x4e71bf=_0x34930f,_0x2e2d63=_0x1c6a2c[_0x4e71bf(0x81)][0x0];return{..._0x5285ec,'id':_0x2e2d63['replyId'],'resolved':_0x1c6a2c[_0x4e71bf(0xa0)]===0x1,'dT':f(_0x2e2d63[_0x4e71bf(0x97)]),'personId':_0x2e2d63[_0x4e71bf(0x67)],'threadId':_0x2e2d63[_0x4e71bf(0x99)]};}function G(_0x254596,_0x9f09db,_0x19d800){const _0x5d6d7e=_0x34930f;var _0x23499c,_0x204be2;if(((_0x204be2=(_0x23499c=_0x254596==null?void 0x0:_0x254596['replies'])==null?void 0x0:_0x23499c[_0x5d6d7e(0xad)])!=null?_0x204be2:0x0)>0x0){const _0x5c0aaa=(_0x5b28a1,_0xa7ee8)=>({'id':_0x5b28a1[_0x5d6d7e(0xcd)],'threadId':_0x5b28a1[_0x5d6d7e(0x99)],'dT':f(_0x5b28a1[_0x5d6d7e(0x97)]),'personId':_0x5b28a1['userId'],'resolved':_0x254596[_0x5d6d7e(0xa0)]===I[_0x5d6d7e(0x69)],'unitId':_0x9f09db,'subUnitId':_0x19d800,'text':JSON[_0x5d6d7e(0x82)](_0x5b28a1[_0x5d6d7e(0x9b)]),'parentId':_0xa7ee8}),_0x473a26=_0x5c0aaa(_0x254596[_0x5d6d7e(0x81)][0x0]);return{..._0x473a26,'children':_0x254596[_0x5d6d7e(0x81)]['slice'](0x1)[_0x5d6d7e(0x8f)](_0x1ff6f0=>_0x5c0aaa(_0x1ff6f0,_0x473a26['id']))};}return null;}let p=class{constructor(_0x2c4493,_0x172a0f,_0xac1cba){const _0x58a8c8=_0x34930f;this[_0x58a8c8(0x84)]=_0x2c4493,this[_0x58a8c8(0x90)]=_0x172a0f,this[_0x58a8c8(0x98)]=_0xac1cba;}async[_0x34930f(0xbf)](_0x183007){const _0x51dfc0=_0x34930f;var _0xaa8c66,_0x54fb2f;const {parentId:_0x29e38b,unitId:_0x306def,text:_0x447b26,threadId:_0xc655ec}=_0x183007,_0xb9bd8d=(_0x54fb2f=(_0xaa8c66=_0x447b26[_0x51dfc0(0xa3)])==null?void 0x0:_0xaa8c66['filter'](_0x4aa7e0=>_0x4aa7e0[_0x51dfc0(0x83)]===c[_0x51dfc0(0xd8)][_0x51dfc0(0xa7)])[_0x51dfc0(0x8f)](_0xdf0fca=>_0xdf0fca[_0x51dfc0(0x91)]))!=null?_0x54fb2f:[],_0x2249d2=JSON[_0x51dfc0(0xa2)](_0x447b26),_0x14814b=(await this[_0x51dfc0(0x98)]['requireSession'](_0x306def))[_0x51dfc0(0xaf)]();if(_0x29e38b){const _0x26dab7={'memberId':_0x14814b,'unitId':_0x306def,'content':_0x2249d2,'mention':_0xb9bd8d,'threadId':_0xc655ec},_0x22755a=(await this[_0x51dfc0(0x84)]['post'](_0x51dfc0(0x88)+_0x306def+_0x51dfc0(0xa6),{'body':_0x26dab7}))[_0x51dfc0(0x7a)][_0x51dfc0(0xdd)];return{..._0x183007,'id':_0x22755a[_0x51dfc0(0xcd)],'dT':c[_0x51dfc0(0xb0)](+_0x22755a[_0x51dfc0(0x97)])[_0x51dfc0(0x78)](_0x51dfc0(0xca)),'personId':_0x22755a[_0x51dfc0(0x67)]};}else{const _0x203f95={'memberId':_0x14814b,'unitId':_0x306def,'content':_0x2249d2,'mention':_0xb9bd8d},_0x300084=await this[_0x51dfc0(0x84)][_0x51dfc0(0xdb)]('/universer-api/comment/unit/'+_0x306def+_0x51dfc0(0xce),{'body':_0x203f95});return Y(_0x300084[_0x51dfc0(0x7a)][_0x51dfc0(0x8c)],_0x183007);}}async[_0x34930f(0x86)](_0x5eeda0){const _0x485dbc=_0x34930f;var _0x154938,_0x1898ec;const {text:_0x54339c,unitId:_0x46929c}=_0x5eeda0,_0x2dcb7a=(_0x1898ec=(_0x154938=_0x54339c[_0x485dbc(0xa3)])==null?void 0x0:_0x154938[_0x485dbc(0xa8)](_0x19e9ac=>_0x19e9ac[_0x485dbc(0x83)]===c[_0x485dbc(0xd8)][_0x485dbc(0xa7)])[_0x485dbc(0x8f)](_0x27d652=>_0x27d652['rangeId']))!=null?_0x1898ec:[],_0x4c42ae=JSON['stringify'](_0x54339c),_0x5ac114=_0x5eeda0[_0x485dbc(0x99)],_0x6c18b1=_0x5eeda0['id'],_0x4ccf38={'memberId':(await this[_0x485dbc(0x98)][_0x485dbc(0x6c)](_0x46929c))[_0x485dbc(0xaf)](),'unitId':_0x46929c,'threadId':_0x5ac114,'mention':_0x2dcb7a,'content':_0x4c42ae,'replyId':_0x6c18b1},_0x3c6ae3=await this['_httpService'][_0x485dbc(0xdb)]('/universer-api/comment/unit/'+_0x46929c+'/edit',{'body':_0x4ccf38});return!_0x3c6ae3[_0x485dbc(0x7a)][_0x485dbc(0xc4)]||_0x3c6ae3[_0x485dbc(0x7a)][_0x485dbc(0xc4)][_0x485dbc(0xc2)]===0x1;}async[_0x34930f(0x8b)](_0x2439aa){const _0x4bcfbf=_0x34930f,{unitId:_0x1ad332}=_0x2439aa,_0x288c8a=_0x2439aa['threadId'],_0x97f008={'memberId':this['_userService'][_0x4bcfbf(0x8e)]()[_0x4bcfbf(0xb1)],'unitId':_0x1ad332,'threadId':_0x288c8a,'solved':_0x2439aa[_0x4bcfbf(0x9c)]?I[_0x4bcfbf(0x69)]:I[_0x4bcfbf(0x6d)]},_0x3d95fa=await this[_0x4bcfbf(0x84)]['post'](_0x4bcfbf(0x88)+_0x1ad332+'/solved',{'body':_0x97f008});return!_0x3d95fa['body'][_0x4bcfbf(0xc4)]||_0x3d95fa[_0x4bcfbf(0x7a)][_0x4bcfbf(0xc4)][_0x4bcfbf(0xc2)]===0x1;}async[_0x34930f(0xcc)](_0x12dc68,_0x3e4906,_0xa28ae4,_0x521454){const _0x27bd53=_0x34930f,_0x1acd47={'memberId':(await this[_0x27bd53(0x98)][_0x27bd53(0x6c)](_0x12dc68))[_0x27bd53(0xaf)](),'threadId':_0xa28ae4,'replyId':_0x521454,'unitId':_0x12dc68},_0x52c096=await this[_0x27bd53(0x84)][_0x27bd53(0xdb)](_0x27bd53(0x88)+_0x12dc68+_0x27bd53(0x85),{'body':_0x1acd47});return!_0x52c096['body'][_0x27bd53(0xc4)]||_0x52c096[_0x27bd53(0x7a)][_0x27bd53(0xc4)]['code']===0x1;}async[_0x34930f(0x8d)](_0x35a23f,_0x1d7e45,_0x1b9031){const _0x2b995b=_0x34930f,_0x31295b={'unitId':_0x35a23f,'threadId':_0x1b9031},_0x2996e5=await this[_0x2b995b(0x84)]['post'](_0x2b995b(0x88)+_0x35a23f+_0x2b995b(0x70),{'body':_0x31295b}),_0x3ac41b=_0x1b9031[_0x2b995b(0x8f)](_0xaf1911=>G(_0x2996e5[_0x2b995b(0x7a)][_0x2b995b(0xb6)][_0xaf1911],_0x35a23f,_0x1d7e45))['filter'](Boolean);return Object['values'](_0x2996e5[_0x2b995b(0x7a)]['users'])[_0x2b995b(0xc9)](_0x1b76b0=>{const _0x359937=_0x2b995b;this[_0x359937(0x90)][_0x359937(0x93)](_0x1b76b0);}),_0x3ac41b;}[_0x34930f(0x87)](_0x5c444b){return{'id':_0x5c444b['id'],'threadId':_0x5c444b['threadId'],'ref':_0x5c444b['ref']};}};p=x([C(0x0,c[_0x34930f(0xc5)](P['HTTPService'])),C(0x1,c['Inject'](c[_0x34930f(0x76)])),C(0x2,c[_0x34930f(0xc5)](b[_0x34930f(0x80)]))],p);var H=Object[_0x34930f(0x9e)],J=(_0xbf8a55,_0x56ac3b,_0x533b01,_0x5052df)=>{const _0x9e957d=_0x34930f;for(var _0x455b8f=_0x5052df>0x1?void 0x0:_0x5052df?H(_0x56ac3b,_0x533b01):_0x56ac3b,_0x68d6f7=_0xbf8a55[_0x9e957d(0xad)]-0x1,_0x4358a8;_0x68d6f7>=0x0;_0x68d6f7--)(_0x4358a8=_0xbf8a55[_0x68d6f7])&&(_0x455b8f=_0x4358a8(_0x455b8f)||_0x455b8f);return _0x455b8f;},y=(_0x2b385a,_0x2b7a3a)=>(_0x4bd218,_0x56cf90)=>_0x2b7a3a(_0x4bd218,_0x56cf90,_0x2b385a);let g=class extends c['Disposable']{constructor(_0x51d58a,_0x57083f){const _0x5b01ac=_0x34930f;super(),this[_0x5b01ac(0x9a)]=_0x51d58a,this['_threadCommentDataSource']=_0x57083f,this[_0x5b01ac(0x68)]();}[_0x34930f(0x68)](){const _0x115bcb=_0x34930f;this[_0x115bcb(0x9a)]['dataSource']=this[_0x115bcb(0x7c)],this[_0x115bcb(0x9a)][_0x115bcb(0x9f)]=!0x1;}};function _0x5ef9(_0x592789,_0x2f0d59){_0x592789=_0x592789-0x64;const _0x2384c4=_0x2384();let _0x5ef9ce=_0x2384c4[_0x592789];return _0x5ef9ce;}g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](p))],g);var F=Object[_0x34930f(0xb9)],L=Object[_0x34930f(0x9e)],Z=(_0xd6c83a,_0x317376,_0x216683)=>_0x317376 in _0xd6c83a?F(_0xd6c83a,_0x317376,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x216683}):_0xd6c83a[_0x317376]=_0x216683,W=(_0x5b0324,_0x5b5546,_0x15fa06,_0x28a8ff)=>{const _0x2b855f=_0x34930f;for(var _0x45e4a0=_0x28a8ff>0x1?void 0x0:_0x28a8ff?L(_0x5b5546,_0x15fa06):_0x5b5546,_0xf8edda=_0x5b0324[_0x2b855f(0xad)]-0x1,_0x544144;_0xf8edda>=0x0;_0xf8edda--)(_0x544144=_0x5b0324[_0xf8edda])&&(_0x45e4a0=_0x544144(_0x45e4a0)||_0x45e4a0);return _0x45e4a0;},O=(_0x1b28c1,_0x216dea)=>(_0x452a55,_0x5bf13c)=>_0x216dea(_0x452a55,_0x5bf13c,_0x1b28c1),N=(_0xda4847,_0x31c5d6,_0x3e02da)=>Z(_0xda4847,typeof _0x31c5d6!=_0x34930f(0xab)?_0x31c5d6+'':_0x31c5d6,_0x3e02da);exports[_0x34930f(0xc8)]=class extends c[_0x34930f(0x64)]{constructor(_0x5bf190=D,_0x57bb17,_0x4cc3f4){const _0x353652=_0x34930f;super(),this[_0x353652(0xbd)]=_0x5bf190,this[_0x353652(0xd7)]=_0x57bb17,this[_0x353652(0x94)]=_0x4cc3f4;const {..._0x212b2a}=c[_0x353652(0xcf)]({},D,this['_config']);this[_0x353652(0x94)][_0x353652(0x6b)](q,_0x212b2a);}[_0x34930f(0xb7)](){[[p],[g],[_]]['forEach'](_0x447cd3=>{const _0x79ff0a=_0x5ef9;this[_0x79ff0a(0xd7)]['add'](_0x447cd3);});}[_0x34930f(0x6e)](){const _0x10f4d8=_0x34930f;this[_0x10f4d8(0xd7)][_0x10f4d8(0x74)](g),this['_injector'][_0x10f4d8(0x74)](_);}},N(exports[_0x34930f(0xc8)],'pluginName',U),N(exports[_0x34930f(0xc8)],_0x34930f(0xa9),c['UniverInstanceType'][_0x34930f(0xc0)]),exports[_0x34930f(0xc8)]=W([c['DependentOn'](w[_0x34930f(0xda)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x34930f(0xc5)](c[_0x34930f(0x6f)])),O(0x2,c[_0x34930f(0xc6)])],exports[_0x34930f(0xc8)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x279dbd=_0x11ba;(function(_0x4ec271,_0xc962bd){const _0x1750c8=_0x11ba,_0x4fb235=_0x4ec271();while(!![]){try{const _0x3035e2=-parseInt(_0x1750c8(0x130))/0x1+parseInt(_0x1750c8(0x163))/0x2+parseInt(_0x1750c8(0x115))/0x3+-parseInt(_0x1750c8(0x13c))/0x4+parseInt(_0x1750c8(0x114))/0x5*(-parseInt(_0x1750c8(0x153))/0x6)+parseInt(_0x1750c8(0x10f))/0x7+parseInt(_0x1750c8(0x156))/0x8*(parseInt(_0x1750c8(0x137))/0x9);if(_0x3035e2===_0xc962bd)break;else _0x4fb235['push'](_0x4fb235['shift']());}catch(_0x104627){_0x4fb235['push'](_0x4fb235['shift']());}}}(_0x2754,0x4158a));import{CommentService as _0x2713c2,CollaborationSessionService as _0x2c38a9,UniverCollaborationClientPlugin as _0x2fd675}from'@univerjs-pro/collaboration-client';function _0x11ba(_0x11b859,_0x359564){const _0x2754de=_0x2754();return _0x11ba=function(_0x11ba48,_0x2ded62){_0x11ba48=_0x11ba48-0x10f;let _0x55ea83=_0x2754de[_0x11ba48];return _0x55ea83;},_0x11ba(_0x11b859,_0x359564);}import{UniverLicensePlugin as _0x371615}from'@univerjs-pro/license';import{dayjs as _0xed2476,UserManagerService as _0x2720dd,Inject as _0x56f7ca,Injector as _0x4ff8bf,Disposable as _0x5712ea,CustomRangeType as _0x564ae0,UniverInstanceType as _0x212c6a,DependentOn as _0x45d7c3,IConfigService as _0x53169f,Plugin as _0xdcb168,merge as _0x9d0703}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x56212e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3f5141,IThreadCommentDataSourceService as _0x8c64a2}from'@univerjs/thread-comment';import{bufferTime as _0x2efd64}from'rxjs';import{HTTPService as _0x4b07b8}from'@univerjs/network';const W=_0x279dbd(0x11b);var I=(_0x18e080=>(_0x18e080[_0x18e080[_0x279dbd(0x150)]=0x0]='OpenOrReOpen',_0x18e080[_0x18e080['Solved']=0x1]=_0x279dbd(0x155),_0x18e080[_0x18e080[_0x279dbd(0x110)]=-0x1]=_0x279dbd(0x110),_0x18e080))(I||{}),v=(_0x3d862e=>(_0x3d862e[_0x3d862e[_0x279dbd(0x165)]=0x0]=_0x279dbd(0x165),_0x3d862e[_0x3d862e['Add']=0x1]=_0x279dbd(0x14f),_0x3d862e[_0x3d862e[_0x279dbd(0x16c)]=0x2]='Reply',_0x3d862e[_0x3d862e[_0x279dbd(0x12b)]=0x3]='Edit',_0x3d862e[_0x3d862e['Delete']=0x4]=_0x279dbd(0x169),_0x3d862e[_0x3d862e['Solve']=0x5]='Solve',_0x3d862e[_0x3d862e[_0x279dbd(0x110)]=-0x1]=_0x279dbd(0x110),_0x3d862e))(v||{});const y=_0x44e497=>_0xed2476(new Date(+_0x44e497))[_0x279dbd(0x159)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3cafd5,_0x9a3244)=>{const _0x390d46=_0x279dbd,_0x4042a0=_0x3cafd5[_0x390d46(0x119)](_0x2720dd),_0x116237=_0x3cafd5[_0x390d46(0x119)](_0x4b07b8);_0x9a3244['forEach'](_0x398278=>{const _0x360a7c=_0x390d46;_0x4042a0[_0x360a7c(0x11f)](_0x398278)&&_0x9a3244[_0x360a7c(0x16a)](_0x398278);}),_0x9a3244[_0x390d46(0x120)]&&(await _0x116237[_0x390d46(0x119)](_0x390d46(0x128),{'params':{'userIDs':[..._0x9a3244]}}))[_0x390d46(0x15f)][_0x390d46(0x118)][_0x390d46(0x15d)](_0x397400=>{const _0x5e8d70=_0x390d46;_0x397400&&_0x4042a0[_0x5e8d70(0x154)](_0x397400);});};var K=Object[_0x279dbd(0x175)],V=(_0x3b643e,_0x3f2760,_0x8dc72d,_0x541965)=>{const _0x234849=_0x279dbd;for(var _0x182d0e=_0x541965>0x1?void 0x0:_0x541965?K(_0x3f2760,_0x8dc72d):_0x3f2760,_0x18062b=_0x3b643e[_0x234849(0x167)]-0x1,_0x584111;_0x18062b>=0x0;_0x18062b--)(_0x584111=_0x3b643e[_0x18062b])&&(_0x182d0e=_0x584111(_0x182d0e)||_0x182d0e);return _0x182d0e;},p=(_0x44181c,_0x46c00a)=>(_0x553610,_0x853085)=>_0x46c00a(_0x553610,_0x853085,_0x44181c);let _=class extends _0x5712ea{constructor(_0xca9673,_0x196fd0,_0x23e979,_0x1230f8){const _0x176912=_0x279dbd;super(),this['_commentService']=_0xca9673,this[_0x176912(0x176)]=_0x196fd0,this[_0x176912(0x134)]=_0x23e979,this[_0x176912(0x12e)]=_0x1230f8,this[_0x176912(0x162)](),this[_0x176912(0x126)]();}['_initUserSync'](){const _0x43311b=_0x279dbd;this[_0x43311b(0x112)](this['_threadCommentModel']['commentUpdate$'][_0x43311b(0x173)](_0x2efd64(0x10))[_0x43311b(0x151)](_0x1924d0=>{const _0xa06c09=_0x43311b,_0x321685=new Set();_0x1924d0[_0xa06c09(0x15d)](_0x2a502a=>{const _0x5222af=_0xa06c09;switch(_0x2a502a['type']){case'add':{const _0x59ca4c=_0x2a502a[_0x5222af(0x143)][_0x5222af(0x111)];_0x321685[_0x5222af(0x125)](_0x59ca4c);break;}}}),B(this[_0xa06c09(0x12e)],_0x321685);}));}[_0x279dbd(0x162)](){const _0x4db2d0=_0x279dbd;this[_0x4db2d0(0x112)](this[_0x4db2d0(0x174)][_0x4db2d0(0x16d)][_0x4db2d0(0x151)](async _0x5a8a0b=>{const _0xbca07b=_0x4db2d0;var _0x2cbbc9,_0x302c64,_0x1e2197,_0x52313e;const _0x5af076=(_0x2cbbc9=this[_0xbca07b(0x176)]['getUnit'](_0x5a8a0b['unitId'])[_0xbca07b(0x172)](_0x103a49=>_0x103a49[_0xbca07b(0x16b)]===_0x5a8a0b['threadId']))==null?void 0x0:_0x2cbbc9[_0xbca07b(0x113)];if(!_0x5af076)return;const {unitId:_0x521d36,subUnitId:_0x563a10}=_0x5af076;switch(_0x5a8a0b[_0xbca07b(0x157)]&&this[_0xbca07b(0x134)]['addUser'](_0x5a8a0b[_0xbca07b(0x157)]),_0x5a8a0b['type']){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0xbca07b(0x11d)](_0x521d36,_0x563a10,{'unitId':_0x521d36,'subUnitId':_0x563a10,'ref':'','id':_0x5a8a0b[_0xbca07b(0x146)],'dT':y(+_0x5a8a0b['createTimestamp']),'threadId':_0x5a8a0b[_0xbca07b(0x16b)],'personId':(_0x1e2197=(_0x302c64=_0x5a8a0b['user'])==null?void 0x0:_0x302c64[_0xbca07b(0x141)])!=null?_0x1e2197:_0x5a8a0b[_0xbca07b(0x13e)],'text':JSON[_0xbca07b(0x12c)](_0x5a8a0b['content']),'parentId':_0x5af076['id']});break;}case v[_0xbca07b(0x169)]:{const _0x52e7e4=this[_0xbca07b(0x176)][_0xbca07b(0x13d)](_0x521d36,_0x563a10,_0x5a8a0b[_0xbca07b(0x146)]);_0x52e7e4&&_0x52e7e4['parentId']&&this[_0xbca07b(0x176)]['deleteComment'](_0x521d36,_0x563a10,_0x5a8a0b[_0xbca07b(0x146)]);break;}case v[_0xbca07b(0x12b)]:{this[_0xbca07b(0x176)][_0xbca07b(0x13a)](_0x521d36,_0x563a10,{'commentId':_0x5a8a0b['replyId'],'text':JSON[_0xbca07b(0x12c)](_0x5a8a0b[_0xbca07b(0x14d)])});break;}case v[_0xbca07b(0x16f)]:{const _0x1996d7=(_0x52313e=this['_threadCommentModel']['getUnit'](_0x5a8a0b[_0xbca07b(0x15e)])[_0xbca07b(0x172)](_0x4f323e=>_0x4f323e[_0xbca07b(0x16b)]===_0x5a8a0b[_0xbca07b(0x16b)]))==null?void 0x0:_0x52313e['root'];_0x1996d7&&this[_0xbca07b(0x176)][_0xbca07b(0x122)](_0x521d36,_0x563a10,_0x1996d7['id'],_0x5a8a0b[_0xbca07b(0x15b)]===I[_0xbca07b(0x155)]);break;}}}));}};_=V([p(0x0,_0x56f7ca(_0x2713c2)),p(0x1,_0x56f7ca(_0x3f5141)),p(0x2,_0x56f7ca(_0x2720dd)),p(0x3,_0x56f7ca(_0x4ff8bf))],_);const z=_0x279dbd(0x11a),O={};var k=Object[_0x279dbd(0x175)],Q=(_0x31a53b,_0x22d4fe,_0x2cf927,_0x262faa)=>{const _0x23d41a=_0x279dbd;for(var _0x30a21d=_0x262faa>0x1?void 0x0:_0x262faa?k(_0x22d4fe,_0x2cf927):_0x22d4fe,_0x41a90e=_0x31a53b[_0x23d41a(0x167)]-0x1,_0x3755c7;_0x41a90e>=0x0;_0x41a90e--)(_0x3755c7=_0x31a53b[_0x41a90e])&&(_0x30a21d=_0x3755c7(_0x30a21d)||_0x30a21d);return _0x30a21d;},b=(_0x5f2683,_0x1330df)=>(_0x56da45,_0x2e9629)=>_0x1330df(_0x56da45,_0x2e9629,_0x5f2683);function X(_0xf34072,_0x29df18){const _0xcaf43e=_0x279dbd,_0x1e223e=_0xf34072[_0xcaf43e(0x145)][0x0];return{..._0x29df18,'id':_0x1e223e['replyId'],'resolved':_0xf34072[_0xcaf43e(0x15b)]===0x1,'dT':y(_0x1e223e['createTimestamp']),'personId':_0x1e223e[_0xcaf43e(0x13e)],'threadId':_0x1e223e['threadId']};}function _0x2754(){const _0x8df50c=['ref','defineProperty','find','pipe','_commentService','getOwnPropertyDescriptor','_threadCommentModel','907508GoWyKU','UNRECOGNIZED','personId','disposeWithMe','root','20lvGvoD','365439wQyCQI','_threadCommentDataSourceService','rangeType','users','get','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getMemberID','addComment','post','getUser','size','/add','resolveComment','_initDataSource','rangeId','add','_initUserSync','customRanges','/universer-api/user/list','map','reply','Edit','parse','/universer-api/comment/unit/','_injector','requireSession','173499uZIayC','/reply','stringify','values','_userService','resolved','_threadCommentDataSource','2357082FpAPnw','dataSource','_sessionService','updateComment','getCurrentUser','1875460EmMROh','getComment','userId','type','/edit','userID','listComments','payload','YYYY/MM/DD\x20HH:mm','replies','replyId','comments','/delete','_configService','code','UNIVER_UNKNOWN','_config','content','/list','Add','OpenOrReOpen','subscribe','/solved','55686WnknmW','addUser','Solved','16BqFzdS','user','filter','format','onStarting','solved','_httpService','forEach','unitId','body','error','syncUpdateMutationToColla','_init','343786vwJdWE','deleteComment','Unknown','setConfig','length','COMMENT','Delete','delete','threadId','Reply','commentUpdate$','onReady','Solve'];_0x2754=function(){return _0x8df50c;};return _0x2754();}function ee(_0x57473b,_0x16edfb,_0x568c08){const _0x411717=_0x279dbd;var _0x17922e,_0x414b55;if(((_0x414b55=(_0x17922e=_0x57473b==null?void 0x0:_0x57473b[_0x411717(0x145)])==null?void 0x0:_0x17922e[_0x411717(0x167)])!=null?_0x414b55:0x0)>0x0){const _0x529d72=(_0x3919e7,_0x162b2a)=>({'id':_0x3919e7[_0x411717(0x146)],'threadId':_0x3919e7[_0x411717(0x16b)],'dT':y(_0x3919e7['createTimestamp']),'personId':_0x3919e7[_0x411717(0x13e)],'resolved':_0x57473b[_0x411717(0x15b)]===I[_0x411717(0x155)],'unitId':_0x16edfb,'subUnitId':_0x568c08,'text':JSON['parse'](_0x3919e7[_0x411717(0x14d)]),'parentId':_0x162b2a}),_0x36ac2c=_0x529d72(_0x57473b['replies'][0x0]);return{..._0x36ac2c,'children':_0x57473b[_0x411717(0x145)]['slice'](0x1)[_0x411717(0x129)](_0x159d48=>_0x529d72(_0x159d48,_0x36ac2c['id']))};}return null;}let S=class{constructor(_0x29fb5b,_0x260a0c,_0x4cfe37){const _0x540fed=_0x279dbd;this[_0x540fed(0x15c)]=_0x29fb5b,this[_0x540fed(0x134)]=_0x260a0c,this[_0x540fed(0x139)]=_0x4cfe37;}async['addComment'](_0x3b1360){const _0x13db88=_0x279dbd;var _0x40e26c,_0x52d4b5;const {parentId:_0x46aa54,unitId:_0x56a8f7,text:_0x1caeec,threadId:_0x4af618}=_0x3b1360,_0x5b6551=(_0x52d4b5=(_0x40e26c=_0x1caeec[_0x13db88(0x127)])==null?void 0x0:_0x40e26c[_0x13db88(0x158)](_0x171876=>_0x171876[_0x13db88(0x117)]===_0x564ae0[_0x13db88(0x168)])['map'](_0x48e9f7=>_0x48e9f7[_0x13db88(0x124)]))!=null?_0x52d4b5:[],_0x3efd79=JSON[_0x13db88(0x132)](_0x1caeec),_0x3edc8c=(await this[_0x13db88(0x139)][_0x13db88(0x12f)](_0x56a8f7))[_0x13db88(0x11c)]();if(_0x46aa54){const _0x129ef3={'memberId':_0x3edc8c,'unitId':_0x56a8f7,'content':_0x3efd79,'mention':_0x5b6551,'threadId':_0x4af618},_0x1b9a1b=(await this['_httpService'][_0x13db88(0x11e)](_0x13db88(0x12d)+_0x56a8f7+_0x13db88(0x131),{'body':_0x129ef3}))['body'][_0x13db88(0x12a)];return{..._0x3b1360,'id':_0x1b9a1b[_0x13db88(0x146)],'dT':_0xed2476(+_0x1b9a1b['createTimestamp'])[_0x13db88(0x159)](_0x13db88(0x144)),'personId':_0x1b9a1b['userId']};}else{const _0x2a7be7={'memberId':_0x3edc8c,'unitId':_0x56a8f7,'content':_0x3efd79,'mention':_0x5b6551},_0x276484=await this['_httpService'][_0x13db88(0x11e)](_0x13db88(0x12d)+_0x56a8f7+_0x13db88(0x121),{'body':_0x2a7be7});return X(_0x276484[_0x13db88(0x15f)]['comment'],_0x3b1360);}}async[_0x279dbd(0x13a)](_0x104173){const _0x281b6f=_0x279dbd;var _0x50193e,_0x20b060;const {text:_0x568cc8,unitId:_0x4ae29a}=_0x104173,_0x2581c9=(_0x20b060=(_0x50193e=_0x568cc8[_0x281b6f(0x127)])==null?void 0x0:_0x50193e['filter'](_0x1c4f2c=>_0x1c4f2c[_0x281b6f(0x117)]===_0x564ae0[_0x281b6f(0x168)])[_0x281b6f(0x129)](_0x2d9889=>_0x2d9889[_0x281b6f(0x124)]))!=null?_0x20b060:[],_0x2d29a0=JSON[_0x281b6f(0x132)](_0x568cc8),_0x4ffc5f=_0x104173[_0x281b6f(0x16b)],_0x14f53f=_0x104173['id'],_0x3d5b62={'memberId':(await this[_0x281b6f(0x139)]['requireSession'](_0x4ae29a))[_0x281b6f(0x11c)](),'unitId':_0x4ae29a,'threadId':_0x4ffc5f,'mention':_0x2581c9,'content':_0x2d29a0,'replyId':_0x14f53f},_0x10d55f=await this[_0x281b6f(0x15c)][_0x281b6f(0x11e)]('/universer-api/comment/unit/'+_0x4ae29a+_0x281b6f(0x140),{'body':_0x3d5b62});return!_0x10d55f['body'][_0x281b6f(0x160)]||_0x10d55f[_0x281b6f(0x15f)][_0x281b6f(0x160)][_0x281b6f(0x14a)]===0x1;}async[_0x279dbd(0x122)](_0x3277bc){const _0x5bf195=_0x279dbd,{unitId:_0x36673c}=_0x3277bc,_0x358bb8=_0x3277bc['threadId'],_0x34d0e5={'memberId':this[_0x5bf195(0x134)][_0x5bf195(0x13b)]()[_0x5bf195(0x141)],'unitId':_0x36673c,'threadId':_0x358bb8,'solved':_0x3277bc[_0x5bf195(0x135)]?I[_0x5bf195(0x155)]:I[_0x5bf195(0x150)]},_0xeab644=await this[_0x5bf195(0x15c)][_0x5bf195(0x11e)]('/universer-api/comment/unit/'+_0x36673c+_0x5bf195(0x152),{'body':_0x34d0e5});return!_0xeab644[_0x5bf195(0x15f)][_0x5bf195(0x160)]||_0xeab644[_0x5bf195(0x15f)]['error']['code']===0x1;}async[_0x279dbd(0x164)](_0x3db06d,_0xa64fd9,_0x1c3ac3,_0x5ac7f3){const _0x39bb88=_0x279dbd,_0x54bf3f={'memberId':(await this['_sessionService'][_0x39bb88(0x12f)](_0x3db06d))[_0x39bb88(0x11c)](),'threadId':_0x1c3ac3,'replyId':_0x5ac7f3,'unitId':_0x3db06d},_0xb22dc5=await this['_httpService'][_0x39bb88(0x11e)](_0x39bb88(0x12d)+_0x3db06d+_0x39bb88(0x148),{'body':_0x54bf3f});return!_0xb22dc5[_0x39bb88(0x15f)]['error']||_0xb22dc5[_0x39bb88(0x15f)][_0x39bb88(0x160)][_0x39bb88(0x14a)]===0x1;}async[_0x279dbd(0x142)](_0x5c0c63,_0x41fd3e,_0x91518e){const _0xcd9a94=_0x279dbd,_0x54bb88={'unitId':_0x5c0c63,'threadId':_0x91518e},_0x549b3c=await this[_0xcd9a94(0x15c)][_0xcd9a94(0x11e)](_0xcd9a94(0x12d)+_0x5c0c63+_0xcd9a94(0x14e),{'body':_0x54bb88}),_0x477fd9=_0x91518e[_0xcd9a94(0x129)](_0x16dd0f=>ee(_0x549b3c[_0xcd9a94(0x15f)][_0xcd9a94(0x147)][_0x16dd0f],_0x5c0c63,_0x41fd3e))[_0xcd9a94(0x158)](Boolean);return Object[_0xcd9a94(0x133)](_0x549b3c[_0xcd9a94(0x15f)][_0xcd9a94(0x118)])['forEach'](_0x15ca57=>{const _0x4613a9=_0xcd9a94;this[_0x4613a9(0x134)][_0x4613a9(0x154)](_0x15ca57);}),_0x477fd9;}['saveCommentToSnapshot'](_0x2b7013){const _0x128c77=_0x279dbd;return{'id':_0x2b7013['id'],'threadId':_0x2b7013[_0x128c77(0x16b)],'ref':_0x2b7013[_0x128c77(0x170)]};}};S=Q([b(0x0,_0x56f7ca(_0x4b07b8)),b(0x1,_0x56f7ca(_0x2720dd)),b(0x2,_0x56f7ca(_0x2c38a9))],S);var re=Object[_0x279dbd(0x175)],te=(_0x35ed5a,_0x11f5ad,_0x2a7eff,_0x4a6002)=>{for(var _0x9aae90=_0x4a6002>0x1?void 0x0:_0x4a6002?re(_0x11f5ad,_0x2a7eff):_0x11f5ad,_0x5cb9a4=_0x35ed5a['length']-0x1,_0xe0932;_0x5cb9a4>=0x0;_0x5cb9a4--)(_0xe0932=_0x35ed5a[_0x5cb9a4])&&(_0x9aae90=_0xe0932(_0x9aae90)||_0x9aae90);return _0x9aae90;},M=(_0x480c9d,_0xa5de8)=>(_0x3e8ba2,_0xfba8c0)=>_0xa5de8(_0x3e8ba2,_0xfba8c0,_0x480c9d);let f=class extends _0x5712ea{constructor(_0x190124,_0x3037f2){const _0x5c098d=_0x279dbd;super(),this['_threadCommentDataSourceService']=_0x190124,this[_0x5c098d(0x136)]=_0x3037f2,this['_initDataSource']();}[_0x279dbd(0x123)](){const _0x42f139=_0x279dbd;this[_0x42f139(0x116)][_0x42f139(0x138)]=this[_0x42f139(0x136)],this['_threadCommentDataSourceService'][_0x42f139(0x161)]=!0x1;}};f=te([M(0x0,_0x8c64a2),M(0x1,_0x56f7ca(S))],f);var se=Object[_0x279dbd(0x171)],oe=Object[_0x279dbd(0x175)],ne=(_0xdf4174,_0x158b8b,_0x2c10c2)=>_0x158b8b in _0xdf4174?se(_0xdf4174,_0x158b8b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c10c2}):_0xdf4174[_0x158b8b]=_0x2c10c2,ie=(_0x468ee8,_0x61da49,_0x4d8225,_0x3a6200)=>{for(var _0x127cc5=_0x3a6200>0x1?void 0x0:_0x3a6200?oe(_0x61da49,_0x4d8225):_0x61da49,_0x2c683f=_0x468ee8['length']-0x1,_0x20521b;_0x2c683f>=0x0;_0x2c683f--)(_0x20521b=_0x468ee8[_0x2c683f])&&(_0x127cc5=_0x20521b(_0x127cc5)||_0x127cc5);return _0x127cc5;},N=(_0x3bf9af,_0x49ecff)=>(_0x61ea99,_0x4a02b8)=>_0x49ecff(_0x61ea99,_0x4a02b8,_0x3bf9af),$=(_0x3c3d4f,_0x27aa91,_0x45cc07)=>ne(_0x3c3d4f,typeof _0x27aa91!='symbol'?_0x27aa91+'':_0x27aa91,_0x45cc07);let g=class extends _0xdcb168{constructor(_0x525e24=O,_0x360e16,_0x2ee3d9){const _0x529f84=_0x279dbd;super(),this[_0x529f84(0x14c)]=_0x525e24,this['_injector']=_0x360e16,this[_0x529f84(0x149)]=_0x2ee3d9;const {..._0x2b43eb}=_0x9d0703({},O,this[_0x529f84(0x14c)]);this[_0x529f84(0x149)][_0x529f84(0x166)](z,_0x2b43eb);}[_0x279dbd(0x15a)](){const _0x21854b=_0x279dbd;[[S],[f],[_]][_0x21854b(0x15d)](_0x56e1f2=>{const _0xb667ab=_0x21854b;this[_0xb667ab(0x12e)][_0xb667ab(0x125)](_0x56e1f2);});}[_0x279dbd(0x16e)](){const _0x40f0a0=_0x279dbd;this[_0x40f0a0(0x12e)][_0x40f0a0(0x119)](f),this[_0x40f0a0(0x12e)][_0x40f0a0(0x119)](_);}};$(g,'pluginName',W),$(g,_0x279dbd(0x13f),_0x212c6a[_0x279dbd(0x14b)]),g=ie([_0x45d7c3(_0x56212e,_0x2fd675,_0x371615),N(0x1,_0x56f7ca(_0x4ff8bf)),N(0x2,_0x53169f)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x22398f=_0x5040;(function(_0x4f4b28,_0x34ad62){const _0x39767b=_0x5040,_0x60b83c=_0x4f4b28();while(!![]){try{const _0x12d028=parseInt(_0x39767b(0x12c))/0x1+parseInt(_0x39767b(0x13a))/0x2+parseInt(_0x39767b(0x109))/0x3*(parseInt(_0x39767b(0x110))/0x4)+-parseInt(_0x39767b(0x11f))/0x5*(parseInt(_0x39767b(0x12f))/0x6)+-parseInt(_0x39767b(0x162))/0x7+parseInt(_0x39767b(0x121))/0x8+parseInt(_0x39767b(0x104))/0x9;if(_0x12d028===_0x34ad62)break;else _0x60b83c['push'](_0x60b83c['shift']());}catch(_0xa72ccb){_0x60b83c['push'](_0x60b83c['shift']());}}}(_0x2ecd,0xe9a5d));import{CommentService as _0x4c6e3d,CollaborationSessionService as _0x369ee5,UniverCollaborationClientPlugin as _0x425f68}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x32b697}from'@univerjs-pro/license';import{dayjs as _0x595bba,UserManagerService as _0x65ef30,Inject as _0x38c346,Injector as _0x52b3d9,Disposable as _0x3b5549,CustomRangeType as _0x54fedc,UniverInstanceType as _0x49c8b7,DependentOn as _0x3ddd01,IConfigService as _0x3b7d40,Plugin as _0x5eca17,merge as _0x492394}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59c59f}from'@univerjs/thread-comment-ui';function _0x2ecd(){const _0x3e5ae1=['Reply','dataSource','getUser','_httpService','28uDRxFR','Add','defineProperty','reply','_injector','type','listComments','code','rangeId','deleteComment','addUser','onReady','_initDataSource','setConfig','replies','5BYdBAV','addComment','1027776GzcVbv','rangeType','YYYY/MM/DD\x20HH:mm','getMemberID','_threadCommentDataSource','threadId','_initUserSync','replyId','solved','find','/list','17270MkHgCn','parse','payload','2339646MtgcLz','updateComment','getCurrentUser','getOwnPropertyDescriptor','thread-comment-data-source.config','users','post','length','comment','_threadCommentModel','ref','2643554pxiFct','format','body','_init','user','comments','getComment','symbol','error','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','map','_configService','subscribe','forEach','_config','UNIVER_UNKNOWN','/delete','add','Solve','commentUpdate$','getUnit','customRanges','UNRECOGNIZED','/universer-api/comment/unit/','_sessionService','syncUpdateMutationToColla','get','resolveComment','disposeWithMe','values','_commentService','filter','/edit','/add','Delete','Edit','root','_threadCommentDataSourceService','7984550gtQcpH','onStarting','_userService','/reply','stringify','createTimestamp','userId','5742171dsGEdG','Unknown','requireSession','content','COMMENT','163746acrWSf','OpenOrReOpen','Solved'];_0x2ecd=function(){return _0x3e5ae1;};return _0x2ecd();}import{ThreadCommentModel as _0x17e0dc,IThreadCommentDataSourceService as _0x68d5e8}from'@univerjs/thread-comment';import{bufferTime as _0x5f4227}from'rxjs';import{HTTPService as _0x17fd7c}from'@univerjs/network';const W=_0x22398f(0x144);var I=(_0x84c901=>(_0x84c901[_0x84c901['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x84c901[_0x84c901['Solved']=0x1]=_0x22398f(0x10b),_0x84c901[_0x84c901['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x84c901))(I||{}),v=(_0x806411=>(_0x806411[_0x806411['Unknown']=0x0]=_0x22398f(0x105),_0x806411[_0x806411[_0x22398f(0x111)]=0x1]=_0x22398f(0x111),_0x806411[_0x806411['Reply']=0x2]=_0x22398f(0x10c),_0x806411[_0x806411['Edit']=0x3]=_0x22398f(0x15f),_0x806411[_0x806411[_0x22398f(0x15e)]=0x4]='Delete',_0x806411[_0x806411[_0x22398f(0x14e)]=0x5]=_0x22398f(0x14e),_0x806411[_0x806411['UNRECOGNIZED']=-0x1]=_0x22398f(0x152),_0x806411))(v||{});const y=_0x30f352=>_0x595bba(new Date(+_0x30f352))[_0x22398f(0x13b)](_0x22398f(0x123)),B=async(_0x2d8c9e,_0x42e202)=>{const _0x1e3161=_0x22398f,_0x2f00b5=_0x2d8c9e[_0x1e3161(0x156)](_0x65ef30),_0x289847=_0x2d8c9e[_0x1e3161(0x156)](_0x17fd7c);_0x42e202[_0x1e3161(0x149)](_0x29423c=>{const _0x148819=_0x1e3161;_0x2f00b5[_0x148819(0x10e)](_0x29423c)&&_0x42e202['delete'](_0x29423c);}),_0x42e202['size']&&(await _0x289847[_0x1e3161(0x156)]('/universer-api/user/list',{'params':{'userIDs':[..._0x42e202]}}))[_0x1e3161(0x13c)][_0x1e3161(0x134)][_0x1e3161(0x149)](_0x3f32ac=>{const _0x5645bf=_0x1e3161;_0x3f32ac&&_0x2f00b5[_0x5645bf(0x11a)](_0x3f32ac);});};var K=Object[_0x22398f(0x132)],V=(_0xd7d72b,_0x25cbb6,_0x26c574,_0x5b1f7b)=>{const _0x4acb0c=_0x22398f;for(var _0xa6e13c=_0x5b1f7b>0x1?void 0x0:_0x5b1f7b?K(_0x25cbb6,_0x26c574):_0x25cbb6,_0x31031a=_0xd7d72b[_0x4acb0c(0x136)]-0x1,_0x18b925;_0x31031a>=0x0;_0x31031a--)(_0x18b925=_0xd7d72b[_0x31031a])&&(_0xa6e13c=_0x18b925(_0xa6e13c)||_0xa6e13c);return _0xa6e13c;},p=(_0x453677,_0x36fd14)=>(_0x5badfb,_0x3e7757)=>_0x36fd14(_0x5badfb,_0x3e7757,_0x453677);let _=class extends _0x3b5549{constructor(_0x2b7def,_0x5904e4,_0x366d8e,_0x26f235){const _0x524003=_0x22398f;super(),this[_0x524003(0x15a)]=_0x2b7def,this['_threadCommentModel']=_0x5904e4,this['_userService']=_0x366d8e,this['_injector']=_0x26f235,this[_0x524003(0x13d)](),this[_0x524003(0x127)]();}['_initUserSync'](){const _0x167044=_0x22398f;this[_0x167044(0x158)](this[_0x167044(0x138)][_0x167044(0x14f)]['pipe'](_0x5f4227(0x10))[_0x167044(0x148)](_0x87f92e=>{const _0x2c57a3=_0x167044,_0xd880b0=new Set();_0x87f92e[_0x2c57a3(0x149)](_0x50d7ab=>{const _0x2e3680=_0x2c57a3;switch(_0x50d7ab['type']){case _0x2e3680(0x14d):{const _0x2bc49e=_0x50d7ab[_0x2e3680(0x12e)]['personId'];_0xd880b0[_0x2e3680(0x14d)](_0x2bc49e);break;}}}),B(this['_injector'],_0xd880b0);}));}[_0x22398f(0x13d)](){const _0x1d2ff5=_0x22398f;this[_0x1d2ff5(0x158)](this[_0x1d2ff5(0x15a)][_0x1d2ff5(0x14f)][_0x1d2ff5(0x148)](async _0x1b7d9a=>{const _0x3dc995=_0x1d2ff5;var _0x57d41e,_0x377d1f,_0x5e01ae,_0x86516;const _0x278759=(_0x57d41e=this['_threadCommentModel'][_0x3dc995(0x150)](_0x1b7d9a[_0x3dc995(0x143)])[_0x3dc995(0x12a)](_0x561be0=>_0x561be0[_0x3dc995(0x126)]===_0x1b7d9a[_0x3dc995(0x126)]))==null?void 0x0:_0x57d41e[_0x3dc995(0x160)];if(!_0x278759)return;const {unitId:_0x4fe0cf,subUnitId:_0x3df732}=_0x278759;switch(_0x1b7d9a[_0x3dc995(0x13e)]&&this[_0x3dc995(0x164)]['addUser'](_0x1b7d9a[_0x3dc995(0x13e)]),_0x1b7d9a[_0x3dc995(0x115)]){case v[_0x3dc995(0x111)]:break;case v['Reply']:{this[_0x3dc995(0x138)][_0x3dc995(0x120)](_0x4fe0cf,_0x3df732,{'unitId':_0x4fe0cf,'subUnitId':_0x3df732,'ref':'','id':_0x1b7d9a[_0x3dc995(0x128)],'dT':y(+_0x1b7d9a['createTimestamp']),'threadId':_0x1b7d9a['threadId'],'personId':(_0x5e01ae=(_0x377d1f=_0x1b7d9a[_0x3dc995(0x13e)])==null?void 0x0:_0x377d1f['userID'])!=null?_0x5e01ae:_0x1b7d9a[_0x3dc995(0x103)],'text':JSON[_0x3dc995(0x12d)](_0x1b7d9a['content']),'parentId':_0x278759['id']});break;}case v[_0x3dc995(0x15e)]:{const _0xc604e5=this[_0x3dc995(0x138)][_0x3dc995(0x140)](_0x4fe0cf,_0x3df732,_0x1b7d9a['replyId']);_0xc604e5&&_0xc604e5['parentId']&&this[_0x3dc995(0x138)]['deleteComment'](_0x4fe0cf,_0x3df732,_0x1b7d9a[_0x3dc995(0x128)]);break;}case v[_0x3dc995(0x15f)]:{this['_threadCommentModel'][_0x3dc995(0x130)](_0x4fe0cf,_0x3df732,{'commentId':_0x1b7d9a['replyId'],'text':JSON[_0x3dc995(0x12d)](_0x1b7d9a['content'])});break;}case v['Solve']:{const _0x3f593e=(_0x86516=this['_threadCommentModel'][_0x3dc995(0x150)](_0x1b7d9a[_0x3dc995(0x143)])['find'](_0x66ac4=>_0x66ac4['threadId']===_0x1b7d9a['threadId']))==null?void 0x0:_0x86516['root'];_0x3f593e&&this[_0x3dc995(0x138)]['resolveComment'](_0x4fe0cf,_0x3df732,_0x3f593e['id'],_0x1b7d9a[_0x3dc995(0x129)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x38c346(_0x4c6e3d)),p(0x1,_0x38c346(_0x17e0dc)),p(0x2,_0x38c346(_0x65ef30)),p(0x3,_0x38c346(_0x52b3d9))],_);const z=_0x22398f(0x133),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x119214,_0x28bfee,_0x46b6d9,_0x3c1f98)=>{const _0x4ec814=_0x22398f;for(var _0x32f81c=_0x3c1f98>0x1?void 0x0:_0x3c1f98?k(_0x28bfee,_0x46b6d9):_0x28bfee,_0x4aad35=_0x119214[_0x4ec814(0x136)]-0x1,_0x4891e6;_0x4aad35>=0x0;_0x4aad35--)(_0x4891e6=_0x119214[_0x4aad35])&&(_0x32f81c=_0x4891e6(_0x32f81c)||_0x32f81c);return _0x32f81c;},b=(_0x25040b,_0x386058)=>(_0xe9e97,_0x48a07a)=>_0x386058(_0xe9e97,_0x48a07a,_0x25040b);function X(_0x957d27,_0x27b115){const _0x297ebb=_0x22398f,_0x19508a=_0x957d27[_0x297ebb(0x11e)][0x0];return{..._0x27b115,'id':_0x19508a[_0x297ebb(0x128)],'resolved':_0x957d27['solved']===0x1,'dT':y(_0x19508a['createTimestamp']),'personId':_0x19508a['userId'],'threadId':_0x19508a[_0x297ebb(0x126)]};}function ee(_0x26415c,_0x3ea2e6,_0x35cfc8){const _0x996f7e=_0x22398f;var _0x25858a,_0x37b8c2;if(((_0x37b8c2=(_0x25858a=_0x26415c==null?void 0x0:_0x26415c[_0x996f7e(0x11e)])==null?void 0x0:_0x25858a['length'])!=null?_0x37b8c2:0x0)>0x0){const _0x1eed74=(_0x2a15af,_0xd67f88)=>({'id':_0x2a15af[_0x996f7e(0x128)],'threadId':_0x2a15af['threadId'],'dT':y(_0x2a15af[_0x996f7e(0x167)]),'personId':_0x2a15af[_0x996f7e(0x103)],'resolved':_0x26415c[_0x996f7e(0x129)]===I[_0x996f7e(0x10b)],'unitId':_0x3ea2e6,'subUnitId':_0x35cfc8,'text':JSON[_0x996f7e(0x12d)](_0x2a15af[_0x996f7e(0x107)]),'parentId':_0xd67f88}),_0x839f48=_0x1eed74(_0x26415c[_0x996f7e(0x11e)][0x0]);return{..._0x839f48,'children':_0x26415c['replies']['slice'](0x1)[_0x996f7e(0x146)](_0x106235=>_0x1eed74(_0x106235,_0x839f48['id']))};}return null;}let S=class{constructor(_0xead164,_0x3140d6,_0x21a18b){const _0x50f2e8=_0x22398f;this[_0x50f2e8(0x10f)]=_0xead164,this['_userService']=_0x3140d6,this['_sessionService']=_0x21a18b;}async[_0x22398f(0x120)](_0xfd4413){const _0x39c1c2=_0x22398f;var _0x58771c,_0x283feb;const {parentId:_0x43d403,unitId:_0x540d64,text:_0x2999aa,threadId:_0x387a0b}=_0xfd4413,_0x18c856=(_0x283feb=(_0x58771c=_0x2999aa[_0x39c1c2(0x151)])==null?void 0x0:_0x58771c['filter'](_0x235baa=>_0x235baa['rangeType']===_0x54fedc[_0x39c1c2(0x108)])['map'](_0x1cf657=>_0x1cf657[_0x39c1c2(0x118)]))!=null?_0x283feb:[],_0x19fc66=JSON[_0x39c1c2(0x166)](_0x2999aa),_0x6a3080=(await this[_0x39c1c2(0x154)][_0x39c1c2(0x106)](_0x540d64))['getMemberID']();if(_0x43d403){const _0x24f808={'memberId':_0x6a3080,'unitId':_0x540d64,'content':_0x19fc66,'mention':_0x18c856,'threadId':_0x387a0b},_0x35fa9d=(await this[_0x39c1c2(0x10f)][_0x39c1c2(0x135)]('/universer-api/comment/unit/'+_0x540d64+_0x39c1c2(0x165),{'body':_0x24f808}))['body'][_0x39c1c2(0x113)];return{..._0xfd4413,'id':_0x35fa9d[_0x39c1c2(0x128)],'dT':_0x595bba(+_0x35fa9d[_0x39c1c2(0x167)])[_0x39c1c2(0x13b)](_0x39c1c2(0x123)),'personId':_0x35fa9d['userId']};}else{const _0x1b6da5={'memberId':_0x6a3080,'unitId':_0x540d64,'content':_0x19fc66,'mention':_0x18c856},_0x8ee2a1=await this[_0x39c1c2(0x10f)][_0x39c1c2(0x135)]('/universer-api/comment/unit/'+_0x540d64+_0x39c1c2(0x15d),{'body':_0x1b6da5});return X(_0x8ee2a1['body'][_0x39c1c2(0x137)],_0xfd4413);}}async[_0x22398f(0x130)](_0x2d7d26){const _0x55e1b8=_0x22398f;var _0x31a5c5,_0x54559f;const {text:_0x2ed0cc,unitId:_0xefaa95}=_0x2d7d26,_0x12ba40=(_0x54559f=(_0x31a5c5=_0x2ed0cc[_0x55e1b8(0x151)])==null?void 0x0:_0x31a5c5[_0x55e1b8(0x15b)](_0x166f18=>_0x166f18[_0x55e1b8(0x122)]===_0x54fedc[_0x55e1b8(0x108)])['map'](_0x54a5e6=>_0x54a5e6['rangeId']))!=null?_0x54559f:[],_0x56af7=JSON[_0x55e1b8(0x166)](_0x2ed0cc),_0x19a079=_0x2d7d26[_0x55e1b8(0x126)],_0x58a80c=_0x2d7d26['id'],_0x4a9d16={'memberId':(await this[_0x55e1b8(0x154)][_0x55e1b8(0x106)](_0xefaa95))[_0x55e1b8(0x124)](),'unitId':_0xefaa95,'threadId':_0x19a079,'mention':_0x12ba40,'content':_0x56af7,'replyId':_0x58a80c},_0x31e128=await this[_0x55e1b8(0x10f)][_0x55e1b8(0x135)](_0x55e1b8(0x153)+_0xefaa95+_0x55e1b8(0x15c),{'body':_0x4a9d16});return!_0x31e128[_0x55e1b8(0x13c)][_0x55e1b8(0x142)]||_0x31e128[_0x55e1b8(0x13c)][_0x55e1b8(0x142)][_0x55e1b8(0x117)]===0x1;}async[_0x22398f(0x157)](_0x14b3ef){const _0x549c35=_0x22398f,{unitId:_0x805ce4}=_0x14b3ef,_0xa0fdbd=_0x14b3ef[_0x549c35(0x126)],_0x28fcca={'memberId':this[_0x549c35(0x164)][_0x549c35(0x131)]()['userID'],'unitId':_0x805ce4,'threadId':_0xa0fdbd,'solved':_0x14b3ef[_0x549c35(0x145)]?I[_0x549c35(0x10b)]:I[_0x549c35(0x10a)]},_0x389a26=await this[_0x549c35(0x10f)][_0x549c35(0x135)](_0x549c35(0x153)+_0x805ce4+'/solved',{'body':_0x28fcca});return!_0x389a26[_0x549c35(0x13c)][_0x549c35(0x142)]||_0x389a26[_0x549c35(0x13c)][_0x549c35(0x142)][_0x549c35(0x117)]===0x1;}async[_0x22398f(0x119)](_0x55f35b,_0x552a0a,_0x5f366a,_0x2a0af3){const _0x28a78c=_0x22398f,_0x58f45e={'memberId':(await this[_0x28a78c(0x154)]['requireSession'](_0x55f35b))['getMemberID'](),'threadId':_0x5f366a,'replyId':_0x2a0af3,'unitId':_0x55f35b},_0x52b6d2=await this[_0x28a78c(0x10f)][_0x28a78c(0x135)](_0x28a78c(0x153)+_0x55f35b+_0x28a78c(0x14c),{'body':_0x58f45e});return!_0x52b6d2['body'][_0x28a78c(0x142)]||_0x52b6d2[_0x28a78c(0x13c)]['error'][_0x28a78c(0x117)]===0x1;}async[_0x22398f(0x116)](_0x5b871d,_0xc2a3f7,_0x33c314){const _0x590f42=_0x22398f,_0x45cdd8={'unitId':_0x5b871d,'threadId':_0x33c314},_0x3f63f5=await this[_0x590f42(0x10f)][_0x590f42(0x135)](_0x590f42(0x153)+_0x5b871d+_0x590f42(0x12b),{'body':_0x45cdd8}),_0x97d513=_0x33c314[_0x590f42(0x146)](_0x272bae=>ee(_0x3f63f5['body'][_0x590f42(0x13f)][_0x272bae],_0x5b871d,_0xc2a3f7))[_0x590f42(0x15b)](Boolean);return Object[_0x590f42(0x159)](_0x3f63f5[_0x590f42(0x13c)][_0x590f42(0x134)])[_0x590f42(0x149)](_0x26bbd1=>{const _0x526b63=_0x590f42;this[_0x526b63(0x164)][_0x526b63(0x11a)](_0x26bbd1);}),_0x97d513;}['saveCommentToSnapshot'](_0x13f30b){const _0x2486e2=_0x22398f;return{'id':_0x13f30b['id'],'threadId':_0x13f30b[_0x2486e2(0x126)],'ref':_0x13f30b[_0x2486e2(0x139)]};}};S=Q([b(0x0,_0x38c346(_0x17fd7c)),b(0x1,_0x38c346(_0x65ef30)),b(0x2,_0x38c346(_0x369ee5))],S);var re=Object[_0x22398f(0x132)],te=(_0x2c0b48,_0x17afed,_0x52a24a,_0x140cfe)=>{for(var _0x403a0e=_0x140cfe>0x1?void 0x0:_0x140cfe?re(_0x17afed,_0x52a24a):_0x17afed,_0x3b2bc4=_0x2c0b48['length']-0x1,_0x5d6194;_0x3b2bc4>=0x0;_0x3b2bc4--)(_0x5d6194=_0x2c0b48[_0x3b2bc4])&&(_0x403a0e=_0x5d6194(_0x403a0e)||_0x403a0e);return _0x403a0e;},M=(_0x27b2a8,_0x526449)=>(_0xbddc3c,_0x45e71e)=>_0x526449(_0xbddc3c,_0x45e71e,_0x27b2a8);let f=class extends _0x3b5549{constructor(_0x1e3131,_0x8608f4){const _0x4b9011=_0x22398f;super(),this[_0x4b9011(0x161)]=_0x1e3131,this[_0x4b9011(0x125)]=_0x8608f4,this['_initDataSource']();}[_0x22398f(0x11c)](){const _0x4e886f=_0x22398f;this[_0x4e886f(0x161)][_0x4e886f(0x10d)]=this[_0x4e886f(0x125)],this['_threadCommentDataSourceService'][_0x4e886f(0x155)]=!0x1;}};f=te([M(0x0,_0x68d5e8),M(0x1,_0x38c346(S))],f);var se=Object[_0x22398f(0x112)],oe=Object[_0x22398f(0x132)],ne=(_0x5e0769,_0xad133f,_0x4db905)=>_0xad133f in _0x5e0769?se(_0x5e0769,_0xad133f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4db905}):_0x5e0769[_0xad133f]=_0x4db905,ie=(_0x5a2d6f,_0x5d6b9d,_0x53b5cb,_0x1cfdf8)=>{for(var _0x14d267=_0x1cfdf8>0x1?void 0x0:_0x1cfdf8?oe(_0x5d6b9d,_0x53b5cb):_0x5d6b9d,_0x4929f0=_0x5a2d6f['length']-0x1,_0x1ae553;_0x4929f0>=0x0;_0x4929f0--)(_0x1ae553=_0x5a2d6f[_0x4929f0])&&(_0x14d267=_0x1ae553(_0x14d267)||_0x14d267);return _0x14d267;},N=(_0x3bf783,_0x157144)=>(_0x2a81b4,_0x3d7cf0)=>_0x157144(_0x2a81b4,_0x3d7cf0,_0x3bf783),$=(_0x416d4f,_0x50b02a,_0x5dcc31)=>ne(_0x416d4f,typeof _0x50b02a!=_0x22398f(0x141)?_0x50b02a+'':_0x50b02a,_0x5dcc31);function _0x5040(_0x5477e3,_0xfd7851){_0x5477e3=_0x5477e3-0x103;const _0x2ecd97=_0x2ecd();let _0x50409d=_0x2ecd97[_0x5477e3];return _0x50409d;}let g=class extends _0x5eca17{constructor(_0x922b90=O,_0x333c94,_0x42460c){const _0x4a7057=_0x22398f;super(),this['_config']=_0x922b90,this[_0x4a7057(0x114)]=_0x333c94,this[_0x4a7057(0x147)]=_0x42460c;const {..._0x307efe}=_0x492394({},O,this[_0x4a7057(0x14a)]);this[_0x4a7057(0x147)][_0x4a7057(0x11d)](z,_0x307efe);}[_0x22398f(0x163)](){const _0x56a152=_0x22398f;[[S],[f],[_]][_0x56a152(0x149)](_0x14cf19=>{const _0x46c469=_0x56a152;this['_injector'][_0x46c469(0x14d)](_0x14cf19);});}[_0x22398f(0x11b)](){const _0x5978a0=_0x22398f;this[_0x5978a0(0x114)]['get'](f),this[_0x5978a0(0x114)][_0x5978a0(0x156)](_);}};$(g,'pluginName',W),$(g,_0x22398f(0x115),_0x49c8b7[_0x22398f(0x14b)]),g=ie([_0x3ddd01(_0x59c59f,_0x425f68,_0x32b697),N(0x1,_0x38c346(_0x52b3d9)),N(0x2,_0x3b7d40)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x279dbd=_0x11ba;(function(_0x4ec271,_0xc962bd){const _0x1750c8=_0x11ba,_0x4fb235=_0x4ec271();while(!![]){try{const _0x3035e2=-parseInt(_0x1750c8(0x130))/0x1+parseInt(_0x1750c8(0x163))/0x2+parseInt(_0x1750c8(0x115))/0x3+-parseInt(_0x1750c8(0x13c))/0x4+parseInt(_0x1750c8(0x114))/0x5*(-parseInt(_0x1750c8(0x153))/0x6)+parseInt(_0x1750c8(0x10f))/0x7+parseInt(_0x1750c8(0x156))/0x8*(parseInt(_0x1750c8(0x137))/0x9);if(_0x3035e2===_0xc962bd)break;else _0x4fb235['push'](_0x4fb235['shift']());}catch(_0x104627){_0x4fb235['push'](_0x4fb235['shift']());}}}(_0x2754,0x4158a));import{CommentService as _0x2713c2,CollaborationSessionService as _0x2c38a9,UniverCollaborationClientPlugin as _0x2fd675}from'@univerjs-pro/collaboration-client';function _0x11ba(_0x11b859,_0x359564){const _0x2754de=_0x2754();return _0x11ba=function(_0x11ba48,_0x2ded62){_0x11ba48=_0x11ba48-0x10f;let _0x55ea83=_0x2754de[_0x11ba48];return _0x55ea83;},_0x11ba(_0x11b859,_0x359564);}import{UniverLicensePlugin as _0x371615}from'@univerjs-pro/license';import{dayjs as _0xed2476,UserManagerService as _0x2720dd,Inject as _0x56f7ca,Injector as _0x4ff8bf,Disposable as _0x5712ea,CustomRangeType as _0x564ae0,UniverInstanceType as _0x212c6a,DependentOn as _0x45d7c3,IConfigService as _0x53169f,Plugin as _0xdcb168,merge as _0x9d0703}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x56212e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3f5141,IThreadCommentDataSourceService as _0x8c64a2}from'@univerjs/thread-comment';import{bufferTime as _0x2efd64}from'rxjs';import{HTTPService as _0x4b07b8}from'@univerjs/network';const W=_0x279dbd(0x11b);var I=(_0x18e080=>(_0x18e080[_0x18e080[_0x279dbd(0x150)]=0x0]='OpenOrReOpen',_0x18e080[_0x18e080['Solved']=0x1]=_0x279dbd(0x155),_0x18e080[_0x18e080[_0x279dbd(0x110)]=-0x1]=_0x279dbd(0x110),_0x18e080))(I||{}),v=(_0x3d862e=>(_0x3d862e[_0x3d862e[_0x279dbd(0x165)]=0x0]=_0x279dbd(0x165),_0x3d862e[_0x3d862e['Add']=0x1]=_0x279dbd(0x14f),_0x3d862e[_0x3d862e[_0x279dbd(0x16c)]=0x2]='Reply',_0x3d862e[_0x3d862e[_0x279dbd(0x12b)]=0x3]='Edit',_0x3d862e[_0x3d862e['Delete']=0x4]=_0x279dbd(0x169),_0x3d862e[_0x3d862e['Solve']=0x5]='Solve',_0x3d862e[_0x3d862e[_0x279dbd(0x110)]=-0x1]=_0x279dbd(0x110),_0x3d862e))(v||{});const y=_0x44e497=>_0xed2476(new Date(+_0x44e497))[_0x279dbd(0x159)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3cafd5,_0x9a3244)=>{const _0x390d46=_0x279dbd,_0x4042a0=_0x3cafd5[_0x390d46(0x119)](_0x2720dd),_0x116237=_0x3cafd5[_0x390d46(0x119)](_0x4b07b8);_0x9a3244['forEach'](_0x398278=>{const _0x360a7c=_0x390d46;_0x4042a0[_0x360a7c(0x11f)](_0x398278)&&_0x9a3244[_0x360a7c(0x16a)](_0x398278);}),_0x9a3244[_0x390d46(0x120)]&&(await _0x116237[_0x390d46(0x119)](_0x390d46(0x128),{'params':{'userIDs':[..._0x9a3244]}}))[_0x390d46(0x15f)][_0x390d46(0x118)][_0x390d46(0x15d)](_0x397400=>{const _0x5e8d70=_0x390d46;_0x397400&&_0x4042a0[_0x5e8d70(0x154)](_0x397400);});};var K=Object[_0x279dbd(0x175)],V=(_0x3b643e,_0x3f2760,_0x8dc72d,_0x541965)=>{const _0x234849=_0x279dbd;for(var _0x182d0e=_0x541965>0x1?void 0x0:_0x541965?K(_0x3f2760,_0x8dc72d):_0x3f2760,_0x18062b=_0x3b643e[_0x234849(0x167)]-0x1,_0x584111;_0x18062b>=0x0;_0x18062b--)(_0x584111=_0x3b643e[_0x18062b])&&(_0x182d0e=_0x584111(_0x182d0e)||_0x182d0e);return _0x182d0e;},p=(_0x44181c,_0x46c00a)=>(_0x553610,_0x853085)=>_0x46c00a(_0x553610,_0x853085,_0x44181c);let _=class extends _0x5712ea{constructor(_0xca9673,_0x196fd0,_0x23e979,_0x1230f8){const _0x176912=_0x279dbd;super(),this['_commentService']=_0xca9673,this[_0x176912(0x176)]=_0x196fd0,this[_0x176912(0x134)]=_0x23e979,this[_0x176912(0x12e)]=_0x1230f8,this[_0x176912(0x162)](),this[_0x176912(0x126)]();}['_initUserSync'](){const _0x43311b=_0x279dbd;this[_0x43311b(0x112)](this['_threadCommentModel']['commentUpdate$'][_0x43311b(0x173)](_0x2efd64(0x10))[_0x43311b(0x151)](_0x1924d0=>{const _0xa06c09=_0x43311b,_0x321685=new Set();_0x1924d0[_0xa06c09(0x15d)](_0x2a502a=>{const _0x5222af=_0xa06c09;switch(_0x2a502a['type']){case'add':{const _0x59ca4c=_0x2a502a[_0x5222af(0x143)][_0x5222af(0x111)];_0x321685[_0x5222af(0x125)](_0x59ca4c);break;}}}),B(this[_0xa06c09(0x12e)],_0x321685);}));}[_0x279dbd(0x162)](){const _0x4db2d0=_0x279dbd;this[_0x4db2d0(0x112)](this[_0x4db2d0(0x174)][_0x4db2d0(0x16d)][_0x4db2d0(0x151)](async _0x5a8a0b=>{const _0xbca07b=_0x4db2d0;var _0x2cbbc9,_0x302c64,_0x1e2197,_0x52313e;const _0x5af076=(_0x2cbbc9=this[_0xbca07b(0x176)]['getUnit'](_0x5a8a0b['unitId'])[_0xbca07b(0x172)](_0x103a49=>_0x103a49[_0xbca07b(0x16b)]===_0x5a8a0b['threadId']))==null?void 0x0:_0x2cbbc9[_0xbca07b(0x113)];if(!_0x5af076)return;const {unitId:_0x521d36,subUnitId:_0x563a10}=_0x5af076;switch(_0x5a8a0b[_0xbca07b(0x157)]&&this[_0xbca07b(0x134)]['addUser'](_0x5a8a0b[_0xbca07b(0x157)]),_0x5a8a0b['type']){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0xbca07b(0x11d)](_0x521d36,_0x563a10,{'unitId':_0x521d36,'subUnitId':_0x563a10,'ref':'','id':_0x5a8a0b[_0xbca07b(0x146)],'dT':y(+_0x5a8a0b['createTimestamp']),'threadId':_0x5a8a0b[_0xbca07b(0x16b)],'personId':(_0x1e2197=(_0x302c64=_0x5a8a0b['user'])==null?void 0x0:_0x302c64[_0xbca07b(0x141)])!=null?_0x1e2197:_0x5a8a0b[_0xbca07b(0x13e)],'text':JSON[_0xbca07b(0x12c)](_0x5a8a0b['content']),'parentId':_0x5af076['id']});break;}case v[_0xbca07b(0x169)]:{const _0x52e7e4=this[_0xbca07b(0x176)][_0xbca07b(0x13d)](_0x521d36,_0x563a10,_0x5a8a0b[_0xbca07b(0x146)]);_0x52e7e4&&_0x52e7e4['parentId']&&this[_0xbca07b(0x176)]['deleteComment'](_0x521d36,_0x563a10,_0x5a8a0b[_0xbca07b(0x146)]);break;}case v[_0xbca07b(0x12b)]:{this[_0xbca07b(0x176)][_0xbca07b(0x13a)](_0x521d36,_0x563a10,{'commentId':_0x5a8a0b['replyId'],'text':JSON[_0xbca07b(0x12c)](_0x5a8a0b[_0xbca07b(0x14d)])});break;}case v[_0xbca07b(0x16f)]:{const _0x1996d7=(_0x52313e=this['_threadCommentModel']['getUnit'](_0x5a8a0b[_0xbca07b(0x15e)])[_0xbca07b(0x172)](_0x4f323e=>_0x4f323e[_0xbca07b(0x16b)]===_0x5a8a0b[_0xbca07b(0x16b)]))==null?void 0x0:_0x52313e['root'];_0x1996d7&&this[_0xbca07b(0x176)][_0xbca07b(0x122)](_0x521d36,_0x563a10,_0x1996d7['id'],_0x5a8a0b[_0xbca07b(0x15b)]===I[_0xbca07b(0x155)]);break;}}}));}};_=V([p(0x0,_0x56f7ca(_0x2713c2)),p(0x1,_0x56f7ca(_0x3f5141)),p(0x2,_0x56f7ca(_0x2720dd)),p(0x3,_0x56f7ca(_0x4ff8bf))],_);const z=_0x279dbd(0x11a),O={};var k=Object[_0x279dbd(0x175)],Q=(_0x31a53b,_0x22d4fe,_0x2cf927,_0x262faa)=>{const _0x23d41a=_0x279dbd;for(var _0x30a21d=_0x262faa>0x1?void 0x0:_0x262faa?k(_0x22d4fe,_0x2cf927):_0x22d4fe,_0x41a90e=_0x31a53b[_0x23d41a(0x167)]-0x1,_0x3755c7;_0x41a90e>=0x0;_0x41a90e--)(_0x3755c7=_0x31a53b[_0x41a90e])&&(_0x30a21d=_0x3755c7(_0x30a21d)||_0x30a21d);return _0x30a21d;},b=(_0x5f2683,_0x1330df)=>(_0x56da45,_0x2e9629)=>_0x1330df(_0x56da45,_0x2e9629,_0x5f2683);function X(_0xf34072,_0x29df18){const _0xcaf43e=_0x279dbd,_0x1e223e=_0xf34072[_0xcaf43e(0x145)][0x0];return{..._0x29df18,'id':_0x1e223e['replyId'],'resolved':_0xf34072[_0xcaf43e(0x15b)]===0x1,'dT':y(_0x1e223e['createTimestamp']),'personId':_0x1e223e[_0xcaf43e(0x13e)],'threadId':_0x1e223e['threadId']};}function _0x2754(){const _0x8df50c=['ref','defineProperty','find','pipe','_commentService','getOwnPropertyDescriptor','_threadCommentModel','907508GoWyKU','UNRECOGNIZED','personId','disposeWithMe','root','20lvGvoD','365439wQyCQI','_threadCommentDataSourceService','rangeType','users','get','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getMemberID','addComment','post','getUser','size','/add','resolveComment','_initDataSource','rangeId','add','_initUserSync','customRanges','/universer-api/user/list','map','reply','Edit','parse','/universer-api/comment/unit/','_injector','requireSession','173499uZIayC','/reply','stringify','values','_userService','resolved','_threadCommentDataSource','2357082FpAPnw','dataSource','_sessionService','updateComment','getCurrentUser','1875460EmMROh','getComment','userId','type','/edit','userID','listComments','payload','YYYY/MM/DD\x20HH:mm','replies','replyId','comments','/delete','_configService','code','UNIVER_UNKNOWN','_config','content','/list','Add','OpenOrReOpen','subscribe','/solved','55686WnknmW','addUser','Solved','16BqFzdS','user','filter','format','onStarting','solved','_httpService','forEach','unitId','body','error','syncUpdateMutationToColla','_init','343786vwJdWE','deleteComment','Unknown','setConfig','length','COMMENT','Delete','delete','threadId','Reply','commentUpdate$','onReady','Solve'];_0x2754=function(){return _0x8df50c;};return _0x2754();}function ee(_0x57473b,_0x16edfb,_0x568c08){const _0x411717=_0x279dbd;var _0x17922e,_0x414b55;if(((_0x414b55=(_0x17922e=_0x57473b==null?void 0x0:_0x57473b[_0x411717(0x145)])==null?void 0x0:_0x17922e[_0x411717(0x167)])!=null?_0x414b55:0x0)>0x0){const _0x529d72=(_0x3919e7,_0x162b2a)=>({'id':_0x3919e7[_0x411717(0x146)],'threadId':_0x3919e7[_0x411717(0x16b)],'dT':y(_0x3919e7['createTimestamp']),'personId':_0x3919e7[_0x411717(0x13e)],'resolved':_0x57473b[_0x411717(0x15b)]===I[_0x411717(0x155)],'unitId':_0x16edfb,'subUnitId':_0x568c08,'text':JSON['parse'](_0x3919e7[_0x411717(0x14d)]),'parentId':_0x162b2a}),_0x36ac2c=_0x529d72(_0x57473b['replies'][0x0]);return{..._0x36ac2c,'children':_0x57473b[_0x411717(0x145)]['slice'](0x1)[_0x411717(0x129)](_0x159d48=>_0x529d72(_0x159d48,_0x36ac2c['id']))};}return null;}let S=class{constructor(_0x29fb5b,_0x260a0c,_0x4cfe37){const _0x540fed=_0x279dbd;this[_0x540fed(0x15c)]=_0x29fb5b,this[_0x540fed(0x134)]=_0x260a0c,this[_0x540fed(0x139)]=_0x4cfe37;}async['addComment'](_0x3b1360){const _0x13db88=_0x279dbd;var _0x40e26c,_0x52d4b5;const {parentId:_0x46aa54,unitId:_0x56a8f7,text:_0x1caeec,threadId:_0x4af618}=_0x3b1360,_0x5b6551=(_0x52d4b5=(_0x40e26c=_0x1caeec[_0x13db88(0x127)])==null?void 0x0:_0x40e26c[_0x13db88(0x158)](_0x171876=>_0x171876[_0x13db88(0x117)]===_0x564ae0[_0x13db88(0x168)])['map'](_0x48e9f7=>_0x48e9f7[_0x13db88(0x124)]))!=null?_0x52d4b5:[],_0x3efd79=JSON[_0x13db88(0x132)](_0x1caeec),_0x3edc8c=(await this[_0x13db88(0x139)][_0x13db88(0x12f)](_0x56a8f7))[_0x13db88(0x11c)]();if(_0x46aa54){const _0x129ef3={'memberId':_0x3edc8c,'unitId':_0x56a8f7,'content':_0x3efd79,'mention':_0x5b6551,'threadId':_0x4af618},_0x1b9a1b=(await this['_httpService'][_0x13db88(0x11e)](_0x13db88(0x12d)+_0x56a8f7+_0x13db88(0x131),{'body':_0x129ef3}))['body'][_0x13db88(0x12a)];return{..._0x3b1360,'id':_0x1b9a1b[_0x13db88(0x146)],'dT':_0xed2476(+_0x1b9a1b['createTimestamp'])[_0x13db88(0x159)](_0x13db88(0x144)),'personId':_0x1b9a1b['userId']};}else{const _0x2a7be7={'memberId':_0x3edc8c,'unitId':_0x56a8f7,'content':_0x3efd79,'mention':_0x5b6551},_0x276484=await this['_httpService'][_0x13db88(0x11e)](_0x13db88(0x12d)+_0x56a8f7+_0x13db88(0x121),{'body':_0x2a7be7});return X(_0x276484[_0x13db88(0x15f)]['comment'],_0x3b1360);}}async[_0x279dbd(0x13a)](_0x104173){const _0x281b6f=_0x279dbd;var _0x50193e,_0x20b060;const {text:_0x568cc8,unitId:_0x4ae29a}=_0x104173,_0x2581c9=(_0x20b060=(_0x50193e=_0x568cc8[_0x281b6f(0x127)])==null?void 0x0:_0x50193e['filter'](_0x1c4f2c=>_0x1c4f2c[_0x281b6f(0x117)]===_0x564ae0[_0x281b6f(0x168)])[_0x281b6f(0x129)](_0x2d9889=>_0x2d9889[_0x281b6f(0x124)]))!=null?_0x20b060:[],_0x2d29a0=JSON[_0x281b6f(0x132)](_0x568cc8),_0x4ffc5f=_0x104173[_0x281b6f(0x16b)],_0x14f53f=_0x104173['id'],_0x3d5b62={'memberId':(await this[_0x281b6f(0x139)]['requireSession'](_0x4ae29a))[_0x281b6f(0x11c)](),'unitId':_0x4ae29a,'threadId':_0x4ffc5f,'mention':_0x2581c9,'content':_0x2d29a0,'replyId':_0x14f53f},_0x10d55f=await this[_0x281b6f(0x15c)][_0x281b6f(0x11e)]('/universer-api/comment/unit/'+_0x4ae29a+_0x281b6f(0x140),{'body':_0x3d5b62});return!_0x10d55f['body'][_0x281b6f(0x160)]||_0x10d55f[_0x281b6f(0x15f)][_0x281b6f(0x160)][_0x281b6f(0x14a)]===0x1;}async[_0x279dbd(0x122)](_0x3277bc){const _0x5bf195=_0x279dbd,{unitId:_0x36673c}=_0x3277bc,_0x358bb8=_0x3277bc['threadId'],_0x34d0e5={'memberId':this[_0x5bf195(0x134)][_0x5bf195(0x13b)]()[_0x5bf195(0x141)],'unitId':_0x36673c,'threadId':_0x358bb8,'solved':_0x3277bc[_0x5bf195(0x135)]?I[_0x5bf195(0x155)]:I[_0x5bf195(0x150)]},_0xeab644=await this[_0x5bf195(0x15c)][_0x5bf195(0x11e)]('/universer-api/comment/unit/'+_0x36673c+_0x5bf195(0x152),{'body':_0x34d0e5});return!_0xeab644[_0x5bf195(0x15f)][_0x5bf195(0x160)]||_0xeab644[_0x5bf195(0x15f)]['error']['code']===0x1;}async[_0x279dbd(0x164)](_0x3db06d,_0xa64fd9,_0x1c3ac3,_0x5ac7f3){const _0x39bb88=_0x279dbd,_0x54bf3f={'memberId':(await this['_sessionService'][_0x39bb88(0x12f)](_0x3db06d))[_0x39bb88(0x11c)](),'threadId':_0x1c3ac3,'replyId':_0x5ac7f3,'unitId':_0x3db06d},_0xb22dc5=await this['_httpService'][_0x39bb88(0x11e)](_0x39bb88(0x12d)+_0x3db06d+_0x39bb88(0x148),{'body':_0x54bf3f});return!_0xb22dc5[_0x39bb88(0x15f)]['error']||_0xb22dc5[_0x39bb88(0x15f)][_0x39bb88(0x160)][_0x39bb88(0x14a)]===0x1;}async[_0x279dbd(0x142)](_0x5c0c63,_0x41fd3e,_0x91518e){const _0xcd9a94=_0x279dbd,_0x54bb88={'unitId':_0x5c0c63,'threadId':_0x91518e},_0x549b3c=await this[_0xcd9a94(0x15c)][_0xcd9a94(0x11e)](_0xcd9a94(0x12d)+_0x5c0c63+_0xcd9a94(0x14e),{'body':_0x54bb88}),_0x477fd9=_0x91518e[_0xcd9a94(0x129)](_0x16dd0f=>ee(_0x549b3c[_0xcd9a94(0x15f)][_0xcd9a94(0x147)][_0x16dd0f],_0x5c0c63,_0x41fd3e))[_0xcd9a94(0x158)](Boolean);return Object[_0xcd9a94(0x133)](_0x549b3c[_0xcd9a94(0x15f)][_0xcd9a94(0x118)])['forEach'](_0x15ca57=>{const _0x4613a9=_0xcd9a94;this[_0x4613a9(0x134)][_0x4613a9(0x154)](_0x15ca57);}),_0x477fd9;}['saveCommentToSnapshot'](_0x2b7013){const _0x128c77=_0x279dbd;return{'id':_0x2b7013['id'],'threadId':_0x2b7013[_0x128c77(0x16b)],'ref':_0x2b7013[_0x128c77(0x170)]};}};S=Q([b(0x0,_0x56f7ca(_0x4b07b8)),b(0x1,_0x56f7ca(_0x2720dd)),b(0x2,_0x56f7ca(_0x2c38a9))],S);var re=Object[_0x279dbd(0x175)],te=(_0x35ed5a,_0x11f5ad,_0x2a7eff,_0x4a6002)=>{for(var _0x9aae90=_0x4a6002>0x1?void 0x0:_0x4a6002?re(_0x11f5ad,_0x2a7eff):_0x11f5ad,_0x5cb9a4=_0x35ed5a['length']-0x1,_0xe0932;_0x5cb9a4>=0x0;_0x5cb9a4--)(_0xe0932=_0x35ed5a[_0x5cb9a4])&&(_0x9aae90=_0xe0932(_0x9aae90)||_0x9aae90);return _0x9aae90;},M=(_0x480c9d,_0xa5de8)=>(_0x3e8ba2,_0xfba8c0)=>_0xa5de8(_0x3e8ba2,_0xfba8c0,_0x480c9d);let f=class extends _0x5712ea{constructor(_0x190124,_0x3037f2){const _0x5c098d=_0x279dbd;super(),this['_threadCommentDataSourceService']=_0x190124,this[_0x5c098d(0x136)]=_0x3037f2,this['_initDataSource']();}[_0x279dbd(0x123)](){const _0x42f139=_0x279dbd;this[_0x42f139(0x116)][_0x42f139(0x138)]=this[_0x42f139(0x136)],this['_threadCommentDataSourceService'][_0x42f139(0x161)]=!0x1;}};f=te([M(0x0,_0x8c64a2),M(0x1,_0x56f7ca(S))],f);var se=Object[_0x279dbd(0x171)],oe=Object[_0x279dbd(0x175)],ne=(_0xdf4174,_0x158b8b,_0x2c10c2)=>_0x158b8b in _0xdf4174?se(_0xdf4174,_0x158b8b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c10c2}):_0xdf4174[_0x158b8b]=_0x2c10c2,ie=(_0x468ee8,_0x61da49,_0x4d8225,_0x3a6200)=>{for(var _0x127cc5=_0x3a6200>0x1?void 0x0:_0x3a6200?oe(_0x61da49,_0x4d8225):_0x61da49,_0x2c683f=_0x468ee8['length']-0x1,_0x20521b;_0x2c683f>=0x0;_0x2c683f--)(_0x20521b=_0x468ee8[_0x2c683f])&&(_0x127cc5=_0x20521b(_0x127cc5)||_0x127cc5);return _0x127cc5;},N=(_0x3bf9af,_0x49ecff)=>(_0x61ea99,_0x4a02b8)=>_0x49ecff(_0x61ea99,_0x4a02b8,_0x3bf9af),$=(_0x3c3d4f,_0x27aa91,_0x45cc07)=>ne(_0x3c3d4f,typeof _0x27aa91!='symbol'?_0x27aa91+'':_0x27aa91,_0x45cc07);let g=class extends _0xdcb168{constructor(_0x525e24=O,_0x360e16,_0x2ee3d9){const _0x529f84=_0x279dbd;super(),this[_0x529f84(0x14c)]=_0x525e24,this['_injector']=_0x360e16,this[_0x529f84(0x149)]=_0x2ee3d9;const {..._0x2b43eb}=_0x9d0703({},O,this[_0x529f84(0x14c)]);this[_0x529f84(0x149)][_0x529f84(0x166)](z,_0x2b43eb);}[_0x279dbd(0x15a)](){const _0x21854b=_0x279dbd;[[S],[f],[_]][_0x21854b(0x15d)](_0x56e1f2=>{const _0xb667ab=_0x21854b;this[_0xb667ab(0x12e)][_0xb667ab(0x125)](_0x56e1f2);});}[_0x279dbd(0x16e)](){const _0x40f0a0=_0x279dbd;this[_0x40f0a0(0x12e)][_0x40f0a0(0x119)](f),this[_0x40f0a0(0x12e)][_0x40f0a0(0x119)](_);}};$(g,'pluginName',W),$(g,_0x279dbd(0x13f),_0x212c6a[_0x279dbd(0x14b)]),g=ie([_0x45d7c3(_0x56212e,_0x2fd675,_0x371615),N(0x1,_0x56f7ca(_0x4ff8bf)),N(0x2,_0x53169f)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x22398f=_0x5040;(function(_0x4f4b28,_0x34ad62){const _0x39767b=_0x5040,_0x60b83c=_0x4f4b28();while(!![]){try{const _0x12d028=parseInt(_0x39767b(0x12c))/0x1+parseInt(_0x39767b(0x13a))/0x2+parseInt(_0x39767b(0x109))/0x3*(parseInt(_0x39767b(0x110))/0x4)+-parseInt(_0x39767b(0x11f))/0x5*(parseInt(_0x39767b(0x12f))/0x6)+-parseInt(_0x39767b(0x162))/0x7+parseInt(_0x39767b(0x121))/0x8+parseInt(_0x39767b(0x104))/0x9;if(_0x12d028===_0x34ad62)break;else _0x60b83c['push'](_0x60b83c['shift']());}catch(_0xa72ccb){_0x60b83c['push'](_0x60b83c['shift']());}}}(_0x2ecd,0xe9a5d));import{CommentService as _0x4c6e3d,CollaborationSessionService as _0x369ee5,UniverCollaborationClientPlugin as _0x425f68}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x32b697}from'@univerjs-pro/license';import{dayjs as _0x595bba,UserManagerService as _0x65ef30,Inject as _0x38c346,Injector as _0x52b3d9,Disposable as _0x3b5549,CustomRangeType as _0x54fedc,UniverInstanceType as _0x49c8b7,DependentOn as _0x3ddd01,IConfigService as _0x3b7d40,Plugin as _0x5eca17,merge as _0x492394}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59c59f}from'@univerjs/thread-comment-ui';function _0x2ecd(){const _0x3e5ae1=['Reply','dataSource','getUser','_httpService','28uDRxFR','Add','defineProperty','reply','_injector','type','listComments','code','rangeId','deleteComment','addUser','onReady','_initDataSource','setConfig','replies','5BYdBAV','addComment','1027776GzcVbv','rangeType','YYYY/MM/DD\x20HH:mm','getMemberID','_threadCommentDataSource','threadId','_initUserSync','replyId','solved','find','/list','17270MkHgCn','parse','payload','2339646MtgcLz','updateComment','getCurrentUser','getOwnPropertyDescriptor','thread-comment-data-source.config','users','post','length','comment','_threadCommentModel','ref','2643554pxiFct','format','body','_init','user','comments','getComment','symbol','error','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','map','_configService','subscribe','forEach','_config','UNIVER_UNKNOWN','/delete','add','Solve','commentUpdate$','getUnit','customRanges','UNRECOGNIZED','/universer-api/comment/unit/','_sessionService','syncUpdateMutationToColla','get','resolveComment','disposeWithMe','values','_commentService','filter','/edit','/add','Delete','Edit','root','_threadCommentDataSourceService','7984550gtQcpH','onStarting','_userService','/reply','stringify','createTimestamp','userId','5742171dsGEdG','Unknown','requireSession','content','COMMENT','163746acrWSf','OpenOrReOpen','Solved'];_0x2ecd=function(){return _0x3e5ae1;};return _0x2ecd();}import{ThreadCommentModel as _0x17e0dc,IThreadCommentDataSourceService as _0x68d5e8}from'@univerjs/thread-comment';import{bufferTime as _0x5f4227}from'rxjs';import{HTTPService as _0x17fd7c}from'@univerjs/network';const W=_0x22398f(0x144);var I=(_0x84c901=>(_0x84c901[_0x84c901['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x84c901[_0x84c901['Solved']=0x1]=_0x22398f(0x10b),_0x84c901[_0x84c901['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x84c901))(I||{}),v=(_0x806411=>(_0x806411[_0x806411['Unknown']=0x0]=_0x22398f(0x105),_0x806411[_0x806411[_0x22398f(0x111)]=0x1]=_0x22398f(0x111),_0x806411[_0x806411['Reply']=0x2]=_0x22398f(0x10c),_0x806411[_0x806411['Edit']=0x3]=_0x22398f(0x15f),_0x806411[_0x806411[_0x22398f(0x15e)]=0x4]='Delete',_0x806411[_0x806411[_0x22398f(0x14e)]=0x5]=_0x22398f(0x14e),_0x806411[_0x806411['UNRECOGNIZED']=-0x1]=_0x22398f(0x152),_0x806411))(v||{});const y=_0x30f352=>_0x595bba(new Date(+_0x30f352))[_0x22398f(0x13b)](_0x22398f(0x123)),B=async(_0x2d8c9e,_0x42e202)=>{const _0x1e3161=_0x22398f,_0x2f00b5=_0x2d8c9e[_0x1e3161(0x156)](_0x65ef30),_0x289847=_0x2d8c9e[_0x1e3161(0x156)](_0x17fd7c);_0x42e202[_0x1e3161(0x149)](_0x29423c=>{const _0x148819=_0x1e3161;_0x2f00b5[_0x148819(0x10e)](_0x29423c)&&_0x42e202['delete'](_0x29423c);}),_0x42e202['size']&&(await _0x289847[_0x1e3161(0x156)]('/universer-api/user/list',{'params':{'userIDs':[..._0x42e202]}}))[_0x1e3161(0x13c)][_0x1e3161(0x134)][_0x1e3161(0x149)](_0x3f32ac=>{const _0x5645bf=_0x1e3161;_0x3f32ac&&_0x2f00b5[_0x5645bf(0x11a)](_0x3f32ac);});};var K=Object[_0x22398f(0x132)],V=(_0xd7d72b,_0x25cbb6,_0x26c574,_0x5b1f7b)=>{const _0x4acb0c=_0x22398f;for(var _0xa6e13c=_0x5b1f7b>0x1?void 0x0:_0x5b1f7b?K(_0x25cbb6,_0x26c574):_0x25cbb6,_0x31031a=_0xd7d72b[_0x4acb0c(0x136)]-0x1,_0x18b925;_0x31031a>=0x0;_0x31031a--)(_0x18b925=_0xd7d72b[_0x31031a])&&(_0xa6e13c=_0x18b925(_0xa6e13c)||_0xa6e13c);return _0xa6e13c;},p=(_0x453677,_0x36fd14)=>(_0x5badfb,_0x3e7757)=>_0x36fd14(_0x5badfb,_0x3e7757,_0x453677);let _=class extends _0x3b5549{constructor(_0x2b7def,_0x5904e4,_0x366d8e,_0x26f235){const _0x524003=_0x22398f;super(),this[_0x524003(0x15a)]=_0x2b7def,this['_threadCommentModel']=_0x5904e4,this['_userService']=_0x366d8e,this['_injector']=_0x26f235,this[_0x524003(0x13d)](),this[_0x524003(0x127)]();}['_initUserSync'](){const _0x167044=_0x22398f;this[_0x167044(0x158)](this[_0x167044(0x138)][_0x167044(0x14f)]['pipe'](_0x5f4227(0x10))[_0x167044(0x148)](_0x87f92e=>{const _0x2c57a3=_0x167044,_0xd880b0=new Set();_0x87f92e[_0x2c57a3(0x149)](_0x50d7ab=>{const _0x2e3680=_0x2c57a3;switch(_0x50d7ab['type']){case _0x2e3680(0x14d):{const _0x2bc49e=_0x50d7ab[_0x2e3680(0x12e)]['personId'];_0xd880b0[_0x2e3680(0x14d)](_0x2bc49e);break;}}}),B(this['_injector'],_0xd880b0);}));}[_0x22398f(0x13d)](){const _0x1d2ff5=_0x22398f;this[_0x1d2ff5(0x158)](this[_0x1d2ff5(0x15a)][_0x1d2ff5(0x14f)][_0x1d2ff5(0x148)](async _0x1b7d9a=>{const _0x3dc995=_0x1d2ff5;var _0x57d41e,_0x377d1f,_0x5e01ae,_0x86516;const _0x278759=(_0x57d41e=this['_threadCommentModel'][_0x3dc995(0x150)](_0x1b7d9a[_0x3dc995(0x143)])[_0x3dc995(0x12a)](_0x561be0=>_0x561be0[_0x3dc995(0x126)]===_0x1b7d9a[_0x3dc995(0x126)]))==null?void 0x0:_0x57d41e[_0x3dc995(0x160)];if(!_0x278759)return;const {unitId:_0x4fe0cf,subUnitId:_0x3df732}=_0x278759;switch(_0x1b7d9a[_0x3dc995(0x13e)]&&this[_0x3dc995(0x164)]['addUser'](_0x1b7d9a[_0x3dc995(0x13e)]),_0x1b7d9a[_0x3dc995(0x115)]){case v[_0x3dc995(0x111)]:break;case v['Reply']:{this[_0x3dc995(0x138)][_0x3dc995(0x120)](_0x4fe0cf,_0x3df732,{'unitId':_0x4fe0cf,'subUnitId':_0x3df732,'ref':'','id':_0x1b7d9a[_0x3dc995(0x128)],'dT':y(+_0x1b7d9a['createTimestamp']),'threadId':_0x1b7d9a['threadId'],'personId':(_0x5e01ae=(_0x377d1f=_0x1b7d9a[_0x3dc995(0x13e)])==null?void 0x0:_0x377d1f['userID'])!=null?_0x5e01ae:_0x1b7d9a[_0x3dc995(0x103)],'text':JSON[_0x3dc995(0x12d)](_0x1b7d9a['content']),'parentId':_0x278759['id']});break;}case v[_0x3dc995(0x15e)]:{const _0xc604e5=this[_0x3dc995(0x138)][_0x3dc995(0x140)](_0x4fe0cf,_0x3df732,_0x1b7d9a['replyId']);_0xc604e5&&_0xc604e5['parentId']&&this[_0x3dc995(0x138)]['deleteComment'](_0x4fe0cf,_0x3df732,_0x1b7d9a[_0x3dc995(0x128)]);break;}case v[_0x3dc995(0x15f)]:{this['_threadCommentModel'][_0x3dc995(0x130)](_0x4fe0cf,_0x3df732,{'commentId':_0x1b7d9a['replyId'],'text':JSON[_0x3dc995(0x12d)](_0x1b7d9a['content'])});break;}case v['Solve']:{const _0x3f593e=(_0x86516=this['_threadCommentModel'][_0x3dc995(0x150)](_0x1b7d9a[_0x3dc995(0x143)])['find'](_0x66ac4=>_0x66ac4['threadId']===_0x1b7d9a['threadId']))==null?void 0x0:_0x86516['root'];_0x3f593e&&this[_0x3dc995(0x138)]['resolveComment'](_0x4fe0cf,_0x3df732,_0x3f593e['id'],_0x1b7d9a[_0x3dc995(0x129)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x38c346(_0x4c6e3d)),p(0x1,_0x38c346(_0x17e0dc)),p(0x2,_0x38c346(_0x65ef30)),p(0x3,_0x38c346(_0x52b3d9))],_);const z=_0x22398f(0x133),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x119214,_0x28bfee,_0x46b6d9,_0x3c1f98)=>{const _0x4ec814=_0x22398f;for(var _0x32f81c=_0x3c1f98>0x1?void 0x0:_0x3c1f98?k(_0x28bfee,_0x46b6d9):_0x28bfee,_0x4aad35=_0x119214[_0x4ec814(0x136)]-0x1,_0x4891e6;_0x4aad35>=0x0;_0x4aad35--)(_0x4891e6=_0x119214[_0x4aad35])&&(_0x32f81c=_0x4891e6(_0x32f81c)||_0x32f81c);return _0x32f81c;},b=(_0x25040b,_0x386058)=>(_0xe9e97,_0x48a07a)=>_0x386058(_0xe9e97,_0x48a07a,_0x25040b);function X(_0x957d27,_0x27b115){const _0x297ebb=_0x22398f,_0x19508a=_0x957d27[_0x297ebb(0x11e)][0x0];return{..._0x27b115,'id':_0x19508a[_0x297ebb(0x128)],'resolved':_0x957d27['solved']===0x1,'dT':y(_0x19508a['createTimestamp']),'personId':_0x19508a['userId'],'threadId':_0x19508a[_0x297ebb(0x126)]};}function ee(_0x26415c,_0x3ea2e6,_0x35cfc8){const _0x996f7e=_0x22398f;var _0x25858a,_0x37b8c2;if(((_0x37b8c2=(_0x25858a=_0x26415c==null?void 0x0:_0x26415c[_0x996f7e(0x11e)])==null?void 0x0:_0x25858a['length'])!=null?_0x37b8c2:0x0)>0x0){const _0x1eed74=(_0x2a15af,_0xd67f88)=>({'id':_0x2a15af[_0x996f7e(0x128)],'threadId':_0x2a15af['threadId'],'dT':y(_0x2a15af[_0x996f7e(0x167)]),'personId':_0x2a15af[_0x996f7e(0x103)],'resolved':_0x26415c[_0x996f7e(0x129)]===I[_0x996f7e(0x10b)],'unitId':_0x3ea2e6,'subUnitId':_0x35cfc8,'text':JSON[_0x996f7e(0x12d)](_0x2a15af[_0x996f7e(0x107)]),'parentId':_0xd67f88}),_0x839f48=_0x1eed74(_0x26415c[_0x996f7e(0x11e)][0x0]);return{..._0x839f48,'children':_0x26415c['replies']['slice'](0x1)[_0x996f7e(0x146)](_0x106235=>_0x1eed74(_0x106235,_0x839f48['id']))};}return null;}let S=class{constructor(_0xead164,_0x3140d6,_0x21a18b){const _0x50f2e8=_0x22398f;this[_0x50f2e8(0x10f)]=_0xead164,this['_userService']=_0x3140d6,this['_sessionService']=_0x21a18b;}async[_0x22398f(0x120)](_0xfd4413){const _0x39c1c2=_0x22398f;var _0x58771c,_0x283feb;const {parentId:_0x43d403,unitId:_0x540d64,text:_0x2999aa,threadId:_0x387a0b}=_0xfd4413,_0x18c856=(_0x283feb=(_0x58771c=_0x2999aa[_0x39c1c2(0x151)])==null?void 0x0:_0x58771c['filter'](_0x235baa=>_0x235baa['rangeType']===_0x54fedc[_0x39c1c2(0x108)])['map'](_0x1cf657=>_0x1cf657[_0x39c1c2(0x118)]))!=null?_0x283feb:[],_0x19fc66=JSON[_0x39c1c2(0x166)](_0x2999aa),_0x6a3080=(await this[_0x39c1c2(0x154)][_0x39c1c2(0x106)](_0x540d64))['getMemberID']();if(_0x43d403){const _0x24f808={'memberId':_0x6a3080,'unitId':_0x540d64,'content':_0x19fc66,'mention':_0x18c856,'threadId':_0x387a0b},_0x35fa9d=(await this[_0x39c1c2(0x10f)][_0x39c1c2(0x135)]('/universer-api/comment/unit/'+_0x540d64+_0x39c1c2(0x165),{'body':_0x24f808}))['body'][_0x39c1c2(0x113)];return{..._0xfd4413,'id':_0x35fa9d[_0x39c1c2(0x128)],'dT':_0x595bba(+_0x35fa9d[_0x39c1c2(0x167)])[_0x39c1c2(0x13b)](_0x39c1c2(0x123)),'personId':_0x35fa9d['userId']};}else{const _0x1b6da5={'memberId':_0x6a3080,'unitId':_0x540d64,'content':_0x19fc66,'mention':_0x18c856},_0x8ee2a1=await this[_0x39c1c2(0x10f)][_0x39c1c2(0x135)]('/universer-api/comment/unit/'+_0x540d64+_0x39c1c2(0x15d),{'body':_0x1b6da5});return X(_0x8ee2a1['body'][_0x39c1c2(0x137)],_0xfd4413);}}async[_0x22398f(0x130)](_0x2d7d26){const _0x55e1b8=_0x22398f;var _0x31a5c5,_0x54559f;const {text:_0x2ed0cc,unitId:_0xefaa95}=_0x2d7d26,_0x12ba40=(_0x54559f=(_0x31a5c5=_0x2ed0cc[_0x55e1b8(0x151)])==null?void 0x0:_0x31a5c5[_0x55e1b8(0x15b)](_0x166f18=>_0x166f18[_0x55e1b8(0x122)]===_0x54fedc[_0x55e1b8(0x108)])['map'](_0x54a5e6=>_0x54a5e6['rangeId']))!=null?_0x54559f:[],_0x56af7=JSON[_0x55e1b8(0x166)](_0x2ed0cc),_0x19a079=_0x2d7d26[_0x55e1b8(0x126)],_0x58a80c=_0x2d7d26['id'],_0x4a9d16={'memberId':(await this[_0x55e1b8(0x154)][_0x55e1b8(0x106)](_0xefaa95))[_0x55e1b8(0x124)](),'unitId':_0xefaa95,'threadId':_0x19a079,'mention':_0x12ba40,'content':_0x56af7,'replyId':_0x58a80c},_0x31e128=await this[_0x55e1b8(0x10f)][_0x55e1b8(0x135)](_0x55e1b8(0x153)+_0xefaa95+_0x55e1b8(0x15c),{'body':_0x4a9d16});return!_0x31e128[_0x55e1b8(0x13c)][_0x55e1b8(0x142)]||_0x31e128[_0x55e1b8(0x13c)][_0x55e1b8(0x142)][_0x55e1b8(0x117)]===0x1;}async[_0x22398f(0x157)](_0x14b3ef){const _0x549c35=_0x22398f,{unitId:_0x805ce4}=_0x14b3ef,_0xa0fdbd=_0x14b3ef[_0x549c35(0x126)],_0x28fcca={'memberId':this[_0x549c35(0x164)][_0x549c35(0x131)]()['userID'],'unitId':_0x805ce4,'threadId':_0xa0fdbd,'solved':_0x14b3ef[_0x549c35(0x145)]?I[_0x549c35(0x10b)]:I[_0x549c35(0x10a)]},_0x389a26=await this[_0x549c35(0x10f)][_0x549c35(0x135)](_0x549c35(0x153)+_0x805ce4+'/solved',{'body':_0x28fcca});return!_0x389a26[_0x549c35(0x13c)][_0x549c35(0x142)]||_0x389a26[_0x549c35(0x13c)][_0x549c35(0x142)][_0x549c35(0x117)]===0x1;}async[_0x22398f(0x119)](_0x55f35b,_0x552a0a,_0x5f366a,_0x2a0af3){const _0x28a78c=_0x22398f,_0x58f45e={'memberId':(await this[_0x28a78c(0x154)]['requireSession'](_0x55f35b))['getMemberID'](),'threadId':_0x5f366a,'replyId':_0x2a0af3,'unitId':_0x55f35b},_0x52b6d2=await this[_0x28a78c(0x10f)][_0x28a78c(0x135)](_0x28a78c(0x153)+_0x55f35b+_0x28a78c(0x14c),{'body':_0x58f45e});return!_0x52b6d2['body'][_0x28a78c(0x142)]||_0x52b6d2[_0x28a78c(0x13c)]['error'][_0x28a78c(0x117)]===0x1;}async[_0x22398f(0x116)](_0x5b871d,_0xc2a3f7,_0x33c314){const _0x590f42=_0x22398f,_0x45cdd8={'unitId':_0x5b871d,'threadId':_0x33c314},_0x3f63f5=await this[_0x590f42(0x10f)][_0x590f42(0x135)](_0x590f42(0x153)+_0x5b871d+_0x590f42(0x12b),{'body':_0x45cdd8}),_0x97d513=_0x33c314[_0x590f42(0x146)](_0x272bae=>ee(_0x3f63f5['body'][_0x590f42(0x13f)][_0x272bae],_0x5b871d,_0xc2a3f7))[_0x590f42(0x15b)](Boolean);return Object[_0x590f42(0x159)](_0x3f63f5[_0x590f42(0x13c)][_0x590f42(0x134)])[_0x590f42(0x149)](_0x26bbd1=>{const _0x526b63=_0x590f42;this[_0x526b63(0x164)][_0x526b63(0x11a)](_0x26bbd1);}),_0x97d513;}['saveCommentToSnapshot'](_0x13f30b){const _0x2486e2=_0x22398f;return{'id':_0x13f30b['id'],'threadId':_0x13f30b[_0x2486e2(0x126)],'ref':_0x13f30b[_0x2486e2(0x139)]};}};S=Q([b(0x0,_0x38c346(_0x17fd7c)),b(0x1,_0x38c346(_0x65ef30)),b(0x2,_0x38c346(_0x369ee5))],S);var re=Object[_0x22398f(0x132)],te=(_0x2c0b48,_0x17afed,_0x52a24a,_0x140cfe)=>{for(var _0x403a0e=_0x140cfe>0x1?void 0x0:_0x140cfe?re(_0x17afed,_0x52a24a):_0x17afed,_0x3b2bc4=_0x2c0b48['length']-0x1,_0x5d6194;_0x3b2bc4>=0x0;_0x3b2bc4--)(_0x5d6194=_0x2c0b48[_0x3b2bc4])&&(_0x403a0e=_0x5d6194(_0x403a0e)||_0x403a0e);return _0x403a0e;},M=(_0x27b2a8,_0x526449)=>(_0xbddc3c,_0x45e71e)=>_0x526449(_0xbddc3c,_0x45e71e,_0x27b2a8);let f=class extends _0x3b5549{constructor(_0x1e3131,_0x8608f4){const _0x4b9011=_0x22398f;super(),this[_0x4b9011(0x161)]=_0x1e3131,this[_0x4b9011(0x125)]=_0x8608f4,this['_initDataSource']();}[_0x22398f(0x11c)](){const _0x4e886f=_0x22398f;this[_0x4e886f(0x161)][_0x4e886f(0x10d)]=this[_0x4e886f(0x125)],this['_threadCommentDataSourceService'][_0x4e886f(0x155)]=!0x1;}};f=te([M(0x0,_0x68d5e8),M(0x1,_0x38c346(S))],f);var se=Object[_0x22398f(0x112)],oe=Object[_0x22398f(0x132)],ne=(_0x5e0769,_0xad133f,_0x4db905)=>_0xad133f in _0x5e0769?se(_0x5e0769,_0xad133f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4db905}):_0x5e0769[_0xad133f]=_0x4db905,ie=(_0x5a2d6f,_0x5d6b9d,_0x53b5cb,_0x1cfdf8)=>{for(var _0x14d267=_0x1cfdf8>0x1?void 0x0:_0x1cfdf8?oe(_0x5d6b9d,_0x53b5cb):_0x5d6b9d,_0x4929f0=_0x5a2d6f['length']-0x1,_0x1ae553;_0x4929f0>=0x0;_0x4929f0--)(_0x1ae553=_0x5a2d6f[_0x4929f0])&&(_0x14d267=_0x1ae553(_0x14d267)||_0x14d267);return _0x14d267;},N=(_0x3bf783,_0x157144)=>(_0x2a81b4,_0x3d7cf0)=>_0x157144(_0x2a81b4,_0x3d7cf0,_0x3bf783),$=(_0x416d4f,_0x50b02a,_0x5dcc31)=>ne(_0x416d4f,typeof _0x50b02a!=_0x22398f(0x141)?_0x50b02a+'':_0x50b02a,_0x5dcc31);function _0x5040(_0x5477e3,_0xfd7851){_0x5477e3=_0x5477e3-0x103;const _0x2ecd97=_0x2ecd();let _0x50409d=_0x2ecd97[_0x5477e3];return _0x50409d;}let g=class extends _0x5eca17{constructor(_0x922b90=O,_0x333c94,_0x42460c){const _0x4a7057=_0x22398f;super(),this['_config']=_0x922b90,this[_0x4a7057(0x114)]=_0x333c94,this[_0x4a7057(0x147)]=_0x42460c;const {..._0x307efe}=_0x492394({},O,this[_0x4a7057(0x14a)]);this[_0x4a7057(0x147)][_0x4a7057(0x11d)](z,_0x307efe);}[_0x22398f(0x163)](){const _0x56a152=_0x22398f;[[S],[f],[_]][_0x56a152(0x149)](_0x14cf19=>{const _0x46c469=_0x56a152;this['_injector'][_0x46c469(0x14d)](_0x14cf19);});}[_0x22398f(0x11b)](){const _0x5978a0=_0x22398f;this[_0x5978a0(0x114)]['get'](f),this[_0x5978a0(0x114)][_0x5978a0(0x156)](_);}};$(g,'pluginName',W),$(g,_0x22398f(0x115),_0x49c8b7[_0x22398f(0x14b)]),g=ie([_0x3ddd01(_0x59c59f,_0x425f68,_0x32b697),N(0x1,_0x38c346(_0x52b3d9)),N(0x2,_0x3b7d40)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1a21(_0x252253,_0x2a5995){const _0x3a48f8=_0x3a48();return _0x1a21=function(_0x1a21e4,_0xeac5af){_0x1a21e4=_0x1a21e4-0xfd;let _0x39ed08=_0x3a48f8[_0x1a21e4];return _0x39ed08;},_0x1a21(_0x252253,_0x2a5995);}(function(_0x43fd05,_0x49358d){const _0x25d442=_0x1a21,_0x37f649=_0x43fd05();while(!![]){try{const _0x3ebcc8=-parseInt(_0x25d442(0x13a))/0x1+parseInt(_0x25d442(0x170))/0x2*(-parseInt(_0x25d442(0x118))/0x3)+-parseInt(_0x25d442(0x179))/0x4+-parseInt(_0x25d442(0x171))/0x5+-parseInt(_0x25d442(0x165))/0x6+parseInt(_0x25d442(0x125))/0x7*(-parseInt(_0x25d442(0x184))/0x8)+parseInt(_0x25d442(0x14c))/0x9;if(_0x3ebcc8===_0x49358d)break;else _0x37f649['push'](_0x37f649['shift']());}catch(_0x6687e3){_0x37f649['push'](_0x37f649['shift']());}}}(_0x3a48,0x80244),function(_0xd0fa61,_0x5290a3){const _0x463cc4=_0x1a21;typeof exports==_0x463cc4(0x16b)&&typeof module<'u'?_0x5290a3(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==_0x463cc4(0x167)&&define[_0x463cc4(0x100)]?define(['exports',_0x463cc4(0x15c),_0x463cc4(0x17c),_0x463cc4(0x130),'@univerjs/thread-comment-ui',_0x463cc4(0x101),_0x463cc4(0x180),'@univerjs/network'],_0x5290a3):(_0xd0fa61=typeof globalThis<'u'?globalThis:_0xd0fa61||self,_0x5290a3(_0xd0fa61[_0x463cc4(0x177)]={},_0xd0fa61[_0x463cc4(0x178)],_0xd0fa61[_0x463cc4(0x14a)],_0xd0fa61[_0x463cc4(0x10a)],_0xd0fa61[_0x463cc4(0x121)],_0xd0fa61[_0x463cc4(0x14f)],_0xd0fa61[_0x463cc4(0x180)],_0xd0fa61['UniverNetwork']));}(this,function(_0x3c5049,_0x3ce776,_0x65deb6,_0x2fb964,_0xe629ef,_0x291580,_0x563a84,_0x32e73c){'use strict';const _0x21c422=_0x1a21;const _0x41262c='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x216bd1=(_0x65fdb7=>(_0x65fdb7[_0x65fdb7[_0x21c422(0x13e)]=0x0]=_0x21c422(0x13e),_0x65fdb7[_0x65fdb7[_0x21c422(0x139)]=0x1]=_0x21c422(0x139),_0x65fdb7[_0x65fdb7[_0x21c422(0x124)]=-0x1]='UNRECOGNIZED',_0x65fdb7))(_0x216bd1||{}),_0x43887e=(_0x5a5c58=>(_0x5a5c58[_0x5a5c58[_0x21c422(0x134)]=0x0]=_0x21c422(0x134),_0x5a5c58[_0x5a5c58['Add']=0x1]=_0x21c422(0x10b),_0x5a5c58[_0x5a5c58[_0x21c422(0x11c)]=0x2]=_0x21c422(0x11c),_0x5a5c58[_0x5a5c58['Edit']=0x3]=_0x21c422(0x116),_0x5a5c58[_0x5a5c58['Delete']=0x4]=_0x21c422(0x153),_0x5a5c58[_0x5a5c58['Solve']=0x5]=_0x21c422(0x112),_0x5a5c58[_0x5a5c58[_0x21c422(0x124)]=-0x1]=_0x21c422(0x124),_0x5a5c58))(_0x43887e||{});const _0x3537cd=_0x3bccc2=>_0x2fb964[_0x21c422(0x166)](new Date(+_0x3bccc2))[_0x21c422(0x129)]('YYYY/MM/DD\x20HH:mm'),_0x195333=async(_0x44dbeb,_0x269de2)=>{const _0x380c0c=_0x21c422,_0x20fc65=_0x44dbeb[_0x380c0c(0x12f)](_0x2fb964['UserManagerService']),_0x228a08=_0x44dbeb[_0x380c0c(0x12f)](_0x32e73c[_0x380c0c(0x151)]);_0x269de2[_0x380c0c(0x15b)](_0x5b2f0e=>{const _0x17a212=_0x380c0c;_0x20fc65[_0x17a212(0x140)](_0x5b2f0e)&&_0x269de2[_0x17a212(0x16e)](_0x5b2f0e);}),_0x269de2['size']&&(await _0x228a08[_0x380c0c(0x12f)](_0x380c0c(0x172),{'params':{'userIDs':[..._0x269de2]}}))[_0x380c0c(0x17d)][_0x380c0c(0x114)][_0x380c0c(0x15b)](_0x1a8a4e=>{const _0x2f53b4=_0x380c0c;_0x1a8a4e&&_0x20fc65[_0x2f53b4(0x175)](_0x1a8a4e);});};var _0x1aaab7=Object['getOwnPropertyDescriptor'],_0x2f3236=(_0x173054,_0xf79da,_0x1698be,_0x5260dc)=>{const _0x279171=_0x21c422;for(var _0x509a9b=_0x5260dc>0x1?void 0x0:_0x5260dc?_0x1aaab7(_0xf79da,_0x1698be):_0xf79da,_0x39a7c9=_0x173054[_0x279171(0x117)]-0x1,_0x6654e6;_0x39a7c9>=0x0;_0x39a7c9--)(_0x6654e6=_0x173054[_0x39a7c9])&&(_0x509a9b=_0x6654e6(_0x509a9b)||_0x509a9b);return _0x509a9b;},_0x74c786=(_0x551ae7,_0x41901c)=>(_0x275c2a,_0x580f4f)=>_0x41901c(_0x275c2a,_0x580f4f,_0x551ae7);let _0x589642=class extends _0x2fb964[_0x21c422(0xff)]{constructor(_0x27c8dd,_0x5c7cfb,_0x48d6db,_0x48421b){const _0x50217b=_0x21c422;super(),this['_commentService']=_0x27c8dd,this[_0x50217b(0x105)]=_0x5c7cfb,this[_0x50217b(0x15d)]=_0x48d6db,this['_injector']=_0x48421b,this[_0x50217b(0x142)](),this['_initUserSync']();}[_0x21c422(0x15f)](){const _0x2c6e9d=_0x21c422;this[_0x2c6e9d(0x17b)](this[_0x2c6e9d(0x105)]['commentUpdate$'][_0x2c6e9d(0x137)](_0x563a84['bufferTime'](0x10))[_0x2c6e9d(0x183)](_0x384628=>{const _0x58e3b3=_0x2c6e9d,_0x29a21b=new Set();_0x384628[_0x58e3b3(0x15b)](_0x5c5677=>{const _0x118218=_0x58e3b3;switch(_0x5c5677[_0x118218(0x131)]){case _0x118218(0x163):{const _0x2395b7=_0x5c5677[_0x118218(0x147)][_0x118218(0x10e)];_0x29a21b[_0x118218(0x163)](_0x2395b7);break;}}}),_0x195333(this[_0x58e3b3(0x13b)],_0x29a21b);}));}[_0x21c422(0x142)](){const _0x5bfade=_0x21c422;this[_0x5bfade(0x17b)](this[_0x5bfade(0x11f)][_0x5bfade(0x126)][_0x5bfade(0x183)](async _0x153171=>{const _0x598d34=_0x5bfade;var _0x14ab58,_0x5dd7f4,_0x11080c,_0xf00cc4;const _0x5577a1=(_0x14ab58=this[_0x598d34(0x105)][_0x598d34(0x176)](_0x153171['unitId'])['find'](_0x25b6eb=>_0x25b6eb[_0x598d34(0x11e)]===_0x153171['threadId']))==null?void 0x0:_0x14ab58[_0x598d34(0x16a)];if(!_0x5577a1)return;const {unitId:_0x354fa3,subUnitId:_0x2eef52}=_0x5577a1;switch(_0x153171[_0x598d34(0x110)]&&this['_userService']['addUser'](_0x153171['user']),_0x153171[_0x598d34(0x131)]){case _0x43887e[_0x598d34(0x10b)]:break;case _0x43887e[_0x598d34(0x11c)]:{this[_0x598d34(0x105)][_0x598d34(0x103)](_0x354fa3,_0x2eef52,{'unitId':_0x354fa3,'subUnitId':_0x2eef52,'ref':'','id':_0x153171[_0x598d34(0x127)],'dT':_0x3537cd(+_0x153171[_0x598d34(0x182)]),'threadId':_0x153171[_0x598d34(0x11e)],'personId':(_0x11080c=(_0x5dd7f4=_0x153171[_0x598d34(0x110)])==null?void 0x0:_0x5dd7f4[_0x598d34(0x161)])!=null?_0x11080c:_0x153171[_0x598d34(0x12e)],'text':JSON[_0x598d34(0x146)](_0x153171[_0x598d34(0x106)]),'parentId':_0x5577a1['id']});break;}case _0x43887e[_0x598d34(0x153)]:{const _0x548558=this['_threadCommentModel'][_0x598d34(0x16d)](_0x354fa3,_0x2eef52,_0x153171[_0x598d34(0x127)]);_0x548558&&_0x548558[_0x598d34(0x12c)]&&this[_0x598d34(0x105)]['deleteComment'](_0x354fa3,_0x2eef52,_0x153171[_0x598d34(0x127)]);break;}case _0x43887e[_0x598d34(0x116)]:{this[_0x598d34(0x105)][_0x598d34(0x17f)](_0x354fa3,_0x2eef52,{'commentId':_0x153171[_0x598d34(0x127)],'text':JSON['parse'](_0x153171['content'])});break;}case _0x43887e['Solve']:{const _0x324e22=(_0xf00cc4=this[_0x598d34(0x105)][_0x598d34(0x176)](_0x153171['unitId'])[_0x598d34(0x113)](_0x648d84=>_0x648d84[_0x598d34(0x11e)]===_0x153171[_0x598d34(0x11e)]))==null?void 0x0:_0xf00cc4[_0x598d34(0x16a)];_0x324e22&&this[_0x598d34(0x105)][_0x598d34(0x169)](_0x354fa3,_0x2eef52,_0x324e22['id'],_0x153171['solved']===_0x216bd1['Solved']);break;}}}));}};_0x589642=_0x2f3236([_0x74c786(0x0,_0x2fb964['Inject'](_0x3ce776[_0x21c422(0x104)])),_0x74c786(0x1,_0x2fb964[_0x21c422(0x164)](_0x291580['ThreadCommentModel'])),_0x74c786(0x2,_0x2fb964[_0x21c422(0x164)](_0x2fb964[_0x21c422(0xfd)])),_0x74c786(0x3,_0x2fb964[_0x21c422(0x164)](_0x2fb964[_0x21c422(0x155)]))],_0x589642);const _0x3548cd='thread-comment-data-source.config',_0x19c22a={};var _0x783ff6=Object[_0x21c422(0x119)],_0xa93b71=(_0x3e5bc2,_0x453568,_0x31798a,_0x12e986)=>{const _0xb39ba8=_0x21c422;for(var _0x39541d=_0x12e986>0x1?void 0x0:_0x12e986?_0x783ff6(_0x453568,_0x31798a):_0x453568,_0x54d032=_0x3e5bc2[_0xb39ba8(0x117)]-0x1,_0x9b6cbd;_0x54d032>=0x0;_0x54d032--)(_0x9b6cbd=_0x3e5bc2[_0x54d032])&&(_0x39541d=_0x9b6cbd(_0x39541d)||_0x39541d);return _0x39541d;},_0x58dd94=(_0x2ccab1,_0x162233)=>(_0x2e6a52,_0x363fb8)=>_0x162233(_0x2e6a52,_0x363fb8,_0x2ccab1);function _0x1eeb0e(_0x19c6e0,_0x2958d7){const _0x25d03f=_0x21c422,_0x464909=_0x19c6e0['replies'][0x0];return{..._0x2958d7,'id':_0x464909[_0x25d03f(0x127)],'resolved':_0x19c6e0[_0x25d03f(0x13f)]===0x1,'dT':_0x3537cd(_0x464909[_0x25d03f(0x182)]),'personId':_0x464909[_0x25d03f(0x12e)],'threadId':_0x464909[_0x25d03f(0x11e)]};}function _0x1ffb48(_0x565829,_0x57d5a8,_0x2e179f){const _0x507cce=_0x21c422;var _0x5d02b6,_0x1ffa45;if(((_0x1ffa45=(_0x5d02b6=_0x565829==null?void 0x0:_0x565829[_0x507cce(0x12b)])==null?void 0x0:_0x5d02b6[_0x507cce(0x117)])!=null?_0x1ffa45:0x0)>0x0){const _0x98f63b=(_0x31d6d1,_0x111387)=>({'id':_0x31d6d1['replyId'],'threadId':_0x31d6d1[_0x507cce(0x11e)],'dT':_0x3537cd(_0x31d6d1[_0x507cce(0x182)]),'personId':_0x31d6d1[_0x507cce(0x12e)],'resolved':_0x565829[_0x507cce(0x13f)]===_0x216bd1['Solved'],'unitId':_0x57d5a8,'subUnitId':_0x2e179f,'text':JSON[_0x507cce(0x146)](_0x31d6d1[_0x507cce(0x106)]),'parentId':_0x111387}),_0x2c51f0=_0x98f63b(_0x565829[_0x507cce(0x12b)][0x0]);return{..._0x2c51f0,'children':_0x565829[_0x507cce(0x12b)][_0x507cce(0x173)](0x1)[_0x507cce(0x17e)](_0x2c8737=>_0x98f63b(_0x2c8737,_0x2c51f0['id']))};}return null;}let _0x29eb7b=class{constructor(_0x4719ce,_0x373590,_0x48df67){const _0x2f5e00=_0x21c422;this[_0x2f5e00(0x136)]=_0x4719ce,this[_0x2f5e00(0x15d)]=_0x373590,this[_0x2f5e00(0x149)]=_0x48df67;}async['addComment'](_0x3a804b){const _0x28e9de=_0x21c422;var _0x466b4a,_0x64e4a5;const {parentId:_0x4f50ed,unitId:_0x51f369,text:_0x4dfd6a,threadId:_0x6d384f}=_0x3a804b,_0xb42679=(_0x64e4a5=(_0x466b4a=_0x4dfd6a[_0x28e9de(0x102)])==null?void 0x0:_0x466b4a[_0x28e9de(0x154)](_0x449676=>_0x449676['rangeType']===_0x2fb964[_0x28e9de(0x120)][_0x28e9de(0x122)])['map'](_0x31e340=>_0x31e340['rangeId']))!=null?_0x64e4a5:[],_0x3e7f64=JSON[_0x28e9de(0x156)](_0x4dfd6a),_0x4f986f=(await this[_0x28e9de(0x149)]['requireSession'](_0x51f369))[_0x28e9de(0x16c)]();if(_0x4f50ed){const _0x18da47={'memberId':_0x4f986f,'unitId':_0x51f369,'content':_0x3e7f64,'mention':_0xb42679,'threadId':_0x6d384f},_0x4565e7=(await this[_0x28e9de(0x136)]['post']('/universer-api/comment/unit/'+_0x51f369+'/reply',{'body':_0x18da47}))['body'][_0x28e9de(0x157)];return{..._0x3a804b,'id':_0x4565e7[_0x28e9de(0x127)],'dT':_0x2fb964['dayjs'](+_0x4565e7[_0x28e9de(0x182)])['format'](_0x28e9de(0x145)),'personId':_0x4565e7[_0x28e9de(0x12e)]};}else{const _0x2cec3b={'memberId':_0x4f986f,'unitId':_0x51f369,'content':_0x3e7f64,'mention':_0xb42679},_0xd9bc4c=await this[_0x28e9de(0x136)][_0x28e9de(0x14d)](_0x28e9de(0x150)+_0x51f369+_0x28e9de(0x14e),{'body':_0x2cec3b});return _0x1eeb0e(_0xd9bc4c[_0x28e9de(0x17d)][_0x28e9de(0x12a)],_0x3a804b);}}async[_0x21c422(0x17f)](_0x1d6f9d){const _0x33c2fe=_0x21c422;var _0x543c8d,_0x16a22c;const {text:_0xb39a5a,unitId:_0x2ec553}=_0x1d6f9d,_0x3167ce=(_0x16a22c=(_0x543c8d=_0xb39a5a['customRanges'])==null?void 0x0:_0x543c8d['filter'](_0x420805=>_0x420805[_0x33c2fe(0x13d)]===_0x2fb964[_0x33c2fe(0x120)][_0x33c2fe(0x122)])[_0x33c2fe(0x17e)](_0x2d17f6=>_0x2d17f6[_0x33c2fe(0x174)]))!=null?_0x16a22c:[],_0x434a1c=JSON[_0x33c2fe(0x156)](_0xb39a5a),_0x28f87b=_0x1d6f9d[_0x33c2fe(0x11e)],_0x449cd4=_0x1d6f9d['id'],_0x7a78={'memberId':(await this[_0x33c2fe(0x149)]['requireSession'](_0x2ec553))[_0x33c2fe(0x16c)](),'unitId':_0x2ec553,'threadId':_0x28f87b,'mention':_0x3167ce,'content':_0x434a1c,'replyId':_0x449cd4},_0xdf3529=await this['_httpService'][_0x33c2fe(0x14d)](_0x33c2fe(0x150)+_0x2ec553+_0x33c2fe(0x11d),{'body':_0x7a78});return!_0xdf3529[_0x33c2fe(0x17d)][_0x33c2fe(0x158)]||_0xdf3529[_0x33c2fe(0x17d)][_0x33c2fe(0x158)][_0x33c2fe(0x115)]===0x1;}async[_0x21c422(0x169)](_0x49590a){const _0x369ee5=_0x21c422,{unitId:_0xe1dc3e}=_0x49590a,_0xb8616=_0x49590a[_0x369ee5(0x11e)],_0x161e0a={'memberId':this[_0x369ee5(0x15d)][_0x369ee5(0x11a)]()[_0x369ee5(0x161)],'unitId':_0xe1dc3e,'threadId':_0xb8616,'solved':_0x49590a[_0x369ee5(0x148)]?_0x216bd1[_0x369ee5(0x139)]:_0x216bd1[_0x369ee5(0x13e)]},_0x489c12=await this['_httpService'][_0x369ee5(0x14d)](_0x369ee5(0x150)+_0xe1dc3e+'/solved',{'body':_0x161e0a});return!_0x489c12['body'][_0x369ee5(0x158)]||_0x489c12[_0x369ee5(0x17d)][_0x369ee5(0x158)]['code']===0x1;}async[_0x21c422(0x13c)](_0x10935e,_0x5b8849,_0x345cee,_0x3186c0){const _0x306589=_0x21c422,_0x5d5fff={'memberId':(await this[_0x306589(0x149)]['requireSession'](_0x10935e))[_0x306589(0x16c)](),'threadId':_0x345cee,'replyId':_0x3186c0,'unitId':_0x10935e},_0x5de61b=await this['_httpService'][_0x306589(0x14d)](_0x306589(0x150)+_0x10935e+_0x306589(0x12d),{'body':_0x5d5fff});return!_0x5de61b[_0x306589(0x17d)]['error']||_0x5de61b['body'][_0x306589(0x158)][_0x306589(0x115)]===0x1;}async[_0x21c422(0x10c)](_0x5b43c6,_0x190bc5,_0x3f15d9){const _0x43fd72=_0x21c422,_0x525165={'unitId':_0x5b43c6,'threadId':_0x3f15d9},_0x14f19a=await this[_0x43fd72(0x136)][_0x43fd72(0x14d)](_0x43fd72(0x150)+_0x5b43c6+_0x43fd72(0x152),{'body':_0x525165}),_0x3f1965=_0x3f15d9[_0x43fd72(0x17e)](_0x2125c7=>_0x1ffb48(_0x14f19a[_0x43fd72(0x17d)][_0x43fd72(0x138)][_0x2125c7],_0x5b43c6,_0x190bc5))[_0x43fd72(0x154)](Boolean);return Object[_0x43fd72(0x144)](_0x14f19a[_0x43fd72(0x17d)][_0x43fd72(0x114)])[_0x43fd72(0x15b)](_0xba2835=>{const _0x2e29c0=_0x43fd72;this['_userService'][_0x2e29c0(0x175)](_0xba2835);}),_0x3f1965;}[_0x21c422(0xfe)](_0x331582){const _0x2887ff=_0x21c422;return{'id':_0x331582['id'],'threadId':_0x331582[_0x2887ff(0x11e)],'ref':_0x331582[_0x2887ff(0x159)]};}};_0x29eb7b=_0xa93b71([_0x58dd94(0x0,_0x2fb964[_0x21c422(0x164)](_0x32e73c[_0x21c422(0x151)])),_0x58dd94(0x1,_0x2fb964['Inject'](_0x2fb964[_0x21c422(0xfd)])),_0x58dd94(0x2,_0x2fb964[_0x21c422(0x164)](_0x3ce776[_0x21c422(0x107)]))],_0x29eb7b);var _0x4707bc=Object[_0x21c422(0x119)],_0x487619=(_0xe11fc,_0x400cbf,_0xb7f64,_0x3fd7c8)=>{const _0x2bd990=_0x21c422;for(var _0x2128fe=_0x3fd7c8>0x1?void 0x0:_0x3fd7c8?_0x4707bc(_0x400cbf,_0xb7f64):_0x400cbf,_0x388424=_0xe11fc[_0x2bd990(0x117)]-0x1,_0x5dc500;_0x388424>=0x0;_0x388424--)(_0x5dc500=_0xe11fc[_0x388424])&&(_0x2128fe=_0x5dc500(_0x2128fe)||_0x2128fe);return _0x2128fe;},_0x2c4087=(_0x2deccf,_0x3a5513)=>(_0x330fd6,_0x3a806f)=>_0x3a5513(_0x330fd6,_0x3a806f,_0x2deccf);let _0xfa3262=class extends _0x2fb964[_0x21c422(0xff)]{constructor(_0x12ebf3,_0x50628d){const _0x5c3a5b=_0x21c422;super(),this[_0x5c3a5b(0x14b)]=_0x12ebf3,this[_0x5c3a5b(0x160)]=_0x50628d,this[_0x5c3a5b(0x10f)]();}[_0x21c422(0x10f)](){const _0x59a5ea=_0x21c422;this[_0x59a5ea(0x14b)][_0x59a5ea(0x16f)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x59a5ea(0x17a)]=!0x1;}};_0xfa3262=_0x487619([_0x2c4087(0x0,_0x291580[_0x21c422(0x11b)]),_0x2c4087(0x1,_0x2fb964['Inject'](_0x29eb7b))],_0xfa3262);var _0x4b7994=Object[_0x21c422(0x168)],_0x4f5d9b=Object[_0x21c422(0x119)],_0x408fc0=(_0x329f3d,_0x1cb95b,_0x5cd9f7)=>_0x1cb95b in _0x329f3d?_0x4b7994(_0x329f3d,_0x1cb95b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5cd9f7}):_0x329f3d[_0x1cb95b]=_0x5cd9f7,_0x4690c6=(_0x53fec3,_0x689497,_0x1ac43a,_0x2ceceb)=>{const _0x18be65=_0x21c422;for(var _0x25f403=_0x2ceceb>0x1?void 0x0:_0x2ceceb?_0x4f5d9b(_0x689497,_0x1ac43a):_0x689497,_0x32cbd3=_0x53fec3[_0x18be65(0x117)]-0x1,_0x25f921;_0x32cbd3>=0x0;_0x32cbd3--)(_0x25f921=_0x53fec3[_0x32cbd3])&&(_0x25f403=_0x25f921(_0x25f403)||_0x25f403);return _0x25f403;},_0xb66feb=(_0x32a750,_0x24106f)=>(_0x214e55,_0x214a5a)=>_0x24106f(_0x214e55,_0x214a5a,_0x32a750),_0x2baffa=(_0xb4cd26,_0x45dc09,_0x363eac)=>_0x408fc0(_0xb4cd26,typeof _0x45dc09!=_0x21c422(0x123)?_0x45dc09+'':_0x45dc09,_0x363eac);_0x3c5049[_0x21c422(0x109)]=class extends _0x2fb964[_0x21c422(0x111)]{constructor(_0x2853d1=_0x19c22a,_0x34fd4a,_0xe9842f){const _0x1343c2=_0x21c422;super(),this['_config']=_0x2853d1,this[_0x1343c2(0x13b)]=_0x34fd4a,this['_configService']=_0xe9842f;const {..._0x242b31}=_0x2fb964[_0x1343c2(0x143)]({},_0x19c22a,this[_0x1343c2(0x162)]);this['_configService'][_0x1343c2(0x15e)](_0x3548cd,_0x242b31);}[_0x21c422(0x10d)](){const _0x101155=_0x21c422;[[_0x29eb7b],[_0xfa3262],[_0x589642]][_0x101155(0x15b)](_0x3225af=>{const _0x1aa173=_0x101155;this[_0x1aa173(0x13b)]['add'](_0x3225af);});}[_0x21c422(0x181)](){const _0x4fa990=_0x21c422;this[_0x4fa990(0x13b)][_0x4fa990(0x12f)](_0xfa3262),this[_0x4fa990(0x13b)][_0x4fa990(0x12f)](_0x589642);}},_0x2baffa(_0x3c5049['UniverThreadCommentDataSourcePlugin'],_0x21c422(0x128),_0x41262c),_0x2baffa(_0x3c5049[_0x21c422(0x109)],_0x21c422(0x131),_0x2fb964[_0x21c422(0x141)][_0x21c422(0x132)]),_0x3c5049[_0x21c422(0x109)]=_0x4690c6([_0x2fb964[_0x21c422(0x133)](_0xe629ef[_0x21c422(0x135)],_0x3ce776['UniverCollaborationClientPlugin'],_0x65deb6[_0x21c422(0x108)]),_0xb66feb(0x1,_0x2fb964[_0x21c422(0x164)](_0x2fb964['Injector'])),_0xb66feb(0x2,_0x2fb964['IConfigService'])],_0x3c5049['UniverThreadCommentDataSourcePlugin']),Object[_0x21c422(0x168)](_0x3c5049,Symbol[_0x21c422(0x15a)],{'value':'Module'});}));function _0x3a48(){const _0x6f8c4=['replies','parentId','/delete','userId','get','@univerjs/core','type','UNIVER_UNKNOWN','DependentOn','Unknown','UniverThreadCommentUIPlugin','_httpService','pipe','comments','Solved','328556tUeWTM','_injector','deleteComment','rangeType','OpenOrReOpen','solved','getUser','UniverInstanceType','_init','merge','values','YYYY/MM/DD\x20HH:mm','parse','payload','resolved','_sessionService','UniverProLicense','_threadCommentDataSourceService','31065084aiblYO','post','/add','UniverThreadComment','/universer-api/comment/unit/','HTTPService','/list','Delete','filter','Injector','stringify','reply','error','ref','toStringTag','forEach','@univerjs-pro/collaboration-client','_userService','setConfig','_initUserSync','_threadCommentDataSource','userID','_config','add','Inject','4097388tDQtIl','dayjs','function','defineProperty','resolveComment','root','object','getMemberID','getComment','delete','dataSource','379850FbkQdr','2800730wqQwaH','/universer-api/user/list','slice','rangeId','addUser','getUnit','UniverProThreadCommentDatasource','UniverProCollaborationClient','2712036UjMjGW','syncUpdateMutationToColla','disposeWithMe','@univerjs-pro/license','body','map','updateComment','rxjs','onReady','createTimestamp','subscribe','8TgpROg','UserManagerService','saveCommentToSnapshot','Disposable','amd','@univerjs/thread-comment','customRanges','addComment','CommentService','_threadCommentModel','content','CollaborationSessionService','UniverLicensePlugin','UniverThreadCommentDataSourcePlugin','UniverCore','Add','listComments','onStarting','personId','_initDataSource','user','Plugin','Solve','find','users','code','Edit','length','9FZHkFG','getOwnPropertyDescriptor','getCurrentUser','IThreadCommentDataSourceService','Reply','/edit','threadId','_commentService','CustomRangeType','UniverThreadCommentUi','COMMENT','symbol','UNRECOGNIZED','751968bnwRnN','commentUpdate$','replyId','pluginName','format','comment'];_0x3a48=function(){return _0x6f8c4;};return _0x3a48();}
|
|
1
|
+
function _0x5cab(){const _0x4b7f70=['_configService','symbol','userId','rxjs','Solved','_userService','subscribe','unitId','saveCommentToSnapshot','Unknown','resolveComment','object','1860972majFuy','9809MdaiYf','forEach','UniverThreadCommentUIPlugin','@univerjs/network','UniverProCollaborationClient','@univerjs/thread-comment','CollaborationSessionService','rangeId','find','customRanges','_initDataSource','code','87390twmqYr','solved','post','slice','exports','@univerjs/core','getUnit','@univerjs-pro/collaboration-client','Edit','_injector','/edit','UniverThreadComment','@univerjs-pro/license','Disposable','_initUserSync','syncUpdateMutationToColla','onStarting','amd','users','deleteComment','body','COMMENT','_threadCommentDataSource','delete','replyId','/universer-api/comment/unit/','263455sRKhMl','parentId','values','disposeWithMe','function','Add','UniverProLicense','error','size','ThreadCommentModel','toStringTag','format','HTTPService','46lNDibv','Solve','requireSession','getComment','updateComment','threadId','Module','replies','addComment','_commentService','_init','/universer-api/user/list','pipe','3301753fEyHJl','dayjs','_threadCommentModel','8FoLKbA','OpenOrReOpen','reply','root','Injector','UserManagerService','/list','filter','add','CustomRangeType','content','payload','userID','defineProperty','UniverCollaborationClientPlugin','/reply','personId','merge','length','Reply','addUser','YYYY/MM/DD\x20HH:mm','6519986sCOCjF','listComments','_threadCommentDataSourceService','UniverNetwork','user','createTimestamp','get','20NYetkd','48eNVyKy','UNIVER_UNKNOWN','stringify','_sessionService','UNRECOGNIZED','Plugin','_httpService','Inject','IThreadCommentDataSourceService','type','4021758WlhrZg','Delete','map','UniverThreadCommentDataSourcePlugin','_config','comments','thread-comment-data-source.config','getOwnPropertyDescriptor','getMemberID','/add','522UnHtTW','parse'];_0x5cab=function(){return _0x4b7f70;};return _0x5cab();}function _0x2623(_0x4cbe41,_0x4e365d){_0x4cbe41=_0x4cbe41-0x113;const _0x5cabd5=_0x5cab();let _0x262313=_0x5cabd5[_0x4cbe41];return _0x262313;}(function(_0x2583a6,_0x525749){const _0x585576=_0x2623,_0x2c235a=_0x2583a6();while(!![]){try{const _0x17401e=parseInt(_0x585576(0x178))/0x1*(parseInt(_0x585576(0x127))/0x2)+parseInt(_0x585576(0x177))/0x3+-parseInt(_0x585576(0x154))/0x4*(-parseInt(_0x585576(0x11a))/0x5)+parseInt(_0x585576(0x15f))/0x6+-parseInt(_0x585576(0x134))/0x7*(-parseInt(_0x585576(0x137))/0x8)+parseInt(_0x585576(0x169))/0x9*(parseInt(_0x585576(0x184))/0xa)+-parseInt(_0x585576(0x14d))/0xb*(parseInt(_0x585576(0x155))/0xc);if(_0x17401e===_0x525749)break;else _0x2c235a['push'](_0x2c235a['shift']());}catch(_0x2b9302){_0x2c235a['push'](_0x2c235a['shift']());}}}(_0x5cab,0x5e8f4),function(_0x3fb062,_0x3b8f62){const _0x15b7f9=_0x2623;typeof exports==_0x15b7f9(0x176)&&typeof module<'u'?_0x3b8f62(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x15b7f9(0x11e)&&define[_0x15b7f9(0x195)]?define([_0x15b7f9(0x188),_0x15b7f9(0x18b),_0x15b7f9(0x190),_0x15b7f9(0x189),'@univerjs/thread-comment-ui',_0x15b7f9(0x17d),_0x15b7f9(0x16e),_0x15b7f9(0x17b)],_0x3b8f62):(_0x3fb062=typeof globalThis<'u'?globalThis:_0x3fb062||self,_0x3b8f62(_0x3fb062['UniverProThreadCommentDatasource']={},_0x3fb062[_0x15b7f9(0x17c)],_0x3fb062[_0x15b7f9(0x120)],_0x3fb062['UniverCore'],_0x3fb062['UniverThreadCommentUi'],_0x3fb062[_0x15b7f9(0x18f)],_0x3fb062['rxjs'],_0x3fb062[_0x15b7f9(0x150)]));}(this,function(_0x5cd3d2,_0x33a76f,_0x2a361b,_0x24455d,_0x20fafc,_0x1a507f,_0x54f966,_0x5cfd00){'use strict';const _0xfde14a=_0x2623;const _0x59f24d='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x365d72=(_0x32e01c=>(_0x32e01c[_0x32e01c[_0xfde14a(0x138)]=0x0]=_0xfde14a(0x138),_0x32e01c[_0x32e01c['Solved']=0x1]=_0xfde14a(0x16f),_0x32e01c[_0x32e01c[_0xfde14a(0x159)]=-0x1]='UNRECOGNIZED',_0x32e01c))(_0x365d72||{}),_0x3210e3=(_0x275c74=>(_0x275c74[_0x275c74[_0xfde14a(0x174)]=0x0]=_0xfde14a(0x174),_0x275c74[_0x275c74[_0xfde14a(0x11f)]=0x1]=_0xfde14a(0x11f),_0x275c74[_0x275c74[_0xfde14a(0x14a)]=0x2]=_0xfde14a(0x14a),_0x275c74[_0x275c74['Edit']=0x3]=_0xfde14a(0x18c),_0x275c74[_0x275c74[_0xfde14a(0x160)]=0x4]=_0xfde14a(0x160),_0x275c74[_0x275c74[_0xfde14a(0x128)]=0x5]='Solve',_0x275c74[_0x275c74[_0xfde14a(0x159)]=-0x1]='UNRECOGNIZED',_0x275c74))(_0x3210e3||{});const _0x184c02=_0x29fc47=>_0x24455d[_0xfde14a(0x135)](new Date(+_0x29fc47))[_0xfde14a(0x125)](_0xfde14a(0x14c)),_0x488455=async(_0x3b139a,_0x1a967e)=>{const _0x1ea951=_0xfde14a,_0x56ecb6=_0x3b139a[_0x1ea951(0x153)](_0x24455d['UserManagerService']),_0x1a5f1a=_0x3b139a[_0x1ea951(0x153)](_0x5cfd00[_0x1ea951(0x126)]);_0x1a967e[_0x1ea951(0x179)](_0x31ae0a=>{const _0x132f62=_0x1ea951;_0x56ecb6['getUser'](_0x31ae0a)&&_0x1a967e[_0x132f62(0x117)](_0x31ae0a);}),_0x1a967e[_0x1ea951(0x122)]&&(await _0x1a5f1a[_0x1ea951(0x153)](_0x1ea951(0x132),{'params':{'userIDs':[..._0x1a967e]}}))[_0x1ea951(0x114)][_0x1ea951(0x196)]['forEach'](_0x51b8a6=>{const _0x33fad6=_0x1ea951;_0x51b8a6&&_0x56ecb6[_0x33fad6(0x14b)](_0x51b8a6);});};var _0x2af71f=Object[_0xfde14a(0x166)],_0x432a65=(_0x383219,_0x258a97,_0x3d9f4e,_0x5753ce)=>{for(var _0x4dec72=_0x5753ce>0x1?void 0x0:_0x5753ce?_0x2af71f(_0x258a97,_0x3d9f4e):_0x258a97,_0x265429=_0x383219['length']-0x1,_0x587fb0;_0x265429>=0x0;_0x265429--)(_0x587fb0=_0x383219[_0x265429])&&(_0x4dec72=_0x587fb0(_0x4dec72)||_0x4dec72);return _0x4dec72;},_0x28293e=(_0x50d842,_0x2156e8)=>(_0x5b3796,_0x383d5d)=>_0x2156e8(_0x5b3796,_0x383d5d,_0x50d842);let _0x216e98=class extends _0x24455d[_0xfde14a(0x191)]{constructor(_0x35b170,_0x59265e,_0x31c3da,_0x4da7c9){const _0x455f1d=_0xfde14a;super(),this[_0x455f1d(0x130)]=_0x35b170,this[_0x455f1d(0x136)]=_0x59265e,this[_0x455f1d(0x170)]=_0x31c3da,this[_0x455f1d(0x18d)]=_0x4da7c9,this[_0x455f1d(0x131)](),this[_0x455f1d(0x192)]();}[_0xfde14a(0x192)](){const _0x40289b=_0xfde14a;this['disposeWithMe'](this[_0x40289b(0x136)]['commentUpdate$'][_0x40289b(0x133)](_0x54f966['bufferTime'](0x10))[_0x40289b(0x171)](_0x30dc52=>{const _0x4629bd=_0x40289b,_0x139157=new Set();_0x30dc52['forEach'](_0x154a97=>{const _0x567760=_0x2623;switch(_0x154a97[_0x567760(0x15e)]){case _0x567760(0x13f):{const _0x3b1a28=_0x154a97[_0x567760(0x142)][_0x567760(0x147)];_0x139157[_0x567760(0x13f)](_0x3b1a28);break;}}}),_0x488455(this[_0x4629bd(0x18d)],_0x139157);}));}[_0xfde14a(0x131)](){const _0xbc3a53=_0xfde14a;this[_0xbc3a53(0x11d)](this[_0xbc3a53(0x130)]['commentUpdate$'][_0xbc3a53(0x171)](async _0x4b540d=>{const _0x583b50=_0xbc3a53;var _0x3a202f,_0x5236cf,_0x498c83,_0x365366;const _0x497bdc=(_0x3a202f=this[_0x583b50(0x136)][_0x583b50(0x18a)](_0x4b540d[_0x583b50(0x172)])[_0x583b50(0x180)](_0xea29e2=>_0xea29e2[_0x583b50(0x12c)]===_0x4b540d[_0x583b50(0x12c)]))==null?void 0x0:_0x3a202f[_0x583b50(0x13a)];if(!_0x497bdc)return;const {unitId:_0x4410cd,subUnitId:_0x439b9c}=_0x497bdc;switch(_0x4b540d[_0x583b50(0x151)]&&this[_0x583b50(0x170)][_0x583b50(0x14b)](_0x4b540d[_0x583b50(0x151)]),_0x4b540d[_0x583b50(0x15e)]){case _0x3210e3[_0x583b50(0x11f)]:break;case _0x3210e3['Reply']:{this[_0x583b50(0x136)][_0x583b50(0x12f)](_0x4410cd,_0x439b9c,{'unitId':_0x4410cd,'subUnitId':_0x439b9c,'ref':'','id':_0x4b540d['replyId'],'dT':_0x184c02(+_0x4b540d['createTimestamp']),'threadId':_0x4b540d['threadId'],'personId':(_0x498c83=(_0x5236cf=_0x4b540d[_0x583b50(0x151)])==null?void 0x0:_0x5236cf[_0x583b50(0x143)])!=null?_0x498c83:_0x4b540d['userId'],'text':JSON[_0x583b50(0x16a)](_0x4b540d['content']),'parentId':_0x497bdc['id']});break;}case _0x3210e3[_0x583b50(0x160)]:{const _0x4e6dd5=this[_0x583b50(0x136)][_0x583b50(0x12a)](_0x4410cd,_0x439b9c,_0x4b540d['replyId']);_0x4e6dd5&&_0x4e6dd5[_0x583b50(0x11b)]&&this[_0x583b50(0x136)][_0x583b50(0x113)](_0x4410cd,_0x439b9c,_0x4b540d[_0x583b50(0x118)]);break;}case _0x3210e3[_0x583b50(0x18c)]:{this[_0x583b50(0x136)][_0x583b50(0x12b)](_0x4410cd,_0x439b9c,{'commentId':_0x4b540d[_0x583b50(0x118)],'text':JSON[_0x583b50(0x16a)](_0x4b540d[_0x583b50(0x141)])});break;}case _0x3210e3[_0x583b50(0x128)]:{const _0x4c0b90=(_0x365366=this[_0x583b50(0x136)][_0x583b50(0x18a)](_0x4b540d[_0x583b50(0x172)])[_0x583b50(0x180)](_0x2677b9=>_0x2677b9[_0x583b50(0x12c)]===_0x4b540d['threadId']))==null?void 0x0:_0x365366[_0x583b50(0x13a)];_0x4c0b90&&this[_0x583b50(0x136)][_0x583b50(0x175)](_0x4410cd,_0x439b9c,_0x4c0b90['id'],_0x4b540d[_0x583b50(0x185)]===_0x365d72[_0x583b50(0x16f)]);break;}}}));}};_0x216e98=_0x432a65([_0x28293e(0x0,_0x24455d[_0xfde14a(0x15c)](_0x33a76f['CommentService'])),_0x28293e(0x1,_0x24455d[_0xfde14a(0x15c)](_0x1a507f[_0xfde14a(0x123)])),_0x28293e(0x2,_0x24455d[_0xfde14a(0x15c)](_0x24455d[_0xfde14a(0x13c)])),_0x28293e(0x3,_0x24455d[_0xfde14a(0x15c)](_0x24455d['Injector']))],_0x216e98);const _0x1d411b=_0xfde14a(0x165),_0x46ba6f={};var _0x1cbc7f=Object[_0xfde14a(0x166)],_0xcf40fe=(_0x10e6b5,_0x130499,_0x5d6478,_0x3b1d24)=>{const _0x180550=_0xfde14a;for(var _0x5b493b=_0x3b1d24>0x1?void 0x0:_0x3b1d24?_0x1cbc7f(_0x130499,_0x5d6478):_0x130499,_0x458f53=_0x10e6b5[_0x180550(0x149)]-0x1,_0x45913c;_0x458f53>=0x0;_0x458f53--)(_0x45913c=_0x10e6b5[_0x458f53])&&(_0x5b493b=_0x45913c(_0x5b493b)||_0x5b493b);return _0x5b493b;},_0x55462e=(_0xcdb9c8,_0x3e50ac)=>(_0x21de54,_0x57b801)=>_0x3e50ac(_0x21de54,_0x57b801,_0xcdb9c8);function _0x3d26ae(_0x490e0e,_0x2da245){const _0x46d1b8=_0xfde14a,_0x26183e=_0x490e0e['replies'][0x0];return{..._0x2da245,'id':_0x26183e['replyId'],'resolved':_0x490e0e[_0x46d1b8(0x185)]===0x1,'dT':_0x184c02(_0x26183e[_0x46d1b8(0x152)]),'personId':_0x26183e[_0x46d1b8(0x16d)],'threadId':_0x26183e['threadId']};}function _0x1a9fe8(_0x1426de,_0x5f0ed8,_0x199377){const _0x200f0d=_0xfde14a;var _0x2dfd59,_0x45577a;if(((_0x45577a=(_0x2dfd59=_0x1426de==null?void 0x0:_0x1426de[_0x200f0d(0x12e)])==null?void 0x0:_0x2dfd59[_0x200f0d(0x149)])!=null?_0x45577a:0x0)>0x0){const _0x22764d=(_0x3697c7,_0x4f2068)=>({'id':_0x3697c7[_0x200f0d(0x118)],'threadId':_0x3697c7[_0x200f0d(0x12c)],'dT':_0x184c02(_0x3697c7[_0x200f0d(0x152)]),'personId':_0x3697c7['userId'],'resolved':_0x1426de[_0x200f0d(0x185)]===_0x365d72['Solved'],'unitId':_0x5f0ed8,'subUnitId':_0x199377,'text':JSON[_0x200f0d(0x16a)](_0x3697c7['content']),'parentId':_0x4f2068}),_0x4db58f=_0x22764d(_0x1426de[_0x200f0d(0x12e)][0x0]);return{..._0x4db58f,'children':_0x1426de[_0x200f0d(0x12e)][_0x200f0d(0x187)](0x1)[_0x200f0d(0x161)](_0xb52f80=>_0x22764d(_0xb52f80,_0x4db58f['id']))};}return null;}let _0x4ffe36=class{constructor(_0x192e4d,_0x17e34d,_0x40ac7a){const _0xd6ce88=_0xfde14a;this[_0xd6ce88(0x15b)]=_0x192e4d,this[_0xd6ce88(0x170)]=_0x17e34d,this[_0xd6ce88(0x158)]=_0x40ac7a;}async[_0xfde14a(0x12f)](_0x568a6b){const _0x21e025=_0xfde14a;var _0x2cc3e1,_0x438d45;const {parentId:_0x468323,unitId:_0x3dbfce,text:_0x499a84,threadId:_0x480018}=_0x568a6b,_0x537278=(_0x438d45=(_0x2cc3e1=_0x499a84['customRanges'])==null?void 0x0:_0x2cc3e1['filter'](_0x2ce091=>_0x2ce091['rangeType']===_0x24455d[_0x21e025(0x140)][_0x21e025(0x115)])[_0x21e025(0x161)](_0xf8eed3=>_0xf8eed3['rangeId']))!=null?_0x438d45:[],_0x3f9297=JSON[_0x21e025(0x157)](_0x499a84),_0x24af6e=(await this['_sessionService'][_0x21e025(0x129)](_0x3dbfce))[_0x21e025(0x167)]();if(_0x468323){const _0x2620be={'memberId':_0x24af6e,'unitId':_0x3dbfce,'content':_0x3f9297,'mention':_0x537278,'threadId':_0x480018},_0x2f7207=(await this[_0x21e025(0x15b)][_0x21e025(0x186)](_0x21e025(0x119)+_0x3dbfce+_0x21e025(0x146),{'body':_0x2620be}))[_0x21e025(0x114)][_0x21e025(0x139)];return{..._0x568a6b,'id':_0x2f7207[_0x21e025(0x118)],'dT':_0x24455d['dayjs'](+_0x2f7207['createTimestamp'])[_0x21e025(0x125)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2f7207[_0x21e025(0x16d)]};}else{const _0x1fe2a9={'memberId':_0x24af6e,'unitId':_0x3dbfce,'content':_0x3f9297,'mention':_0x537278},_0x4f079c=await this['_httpService'][_0x21e025(0x186)]('/universer-api/comment/unit/'+_0x3dbfce+_0x21e025(0x168),{'body':_0x1fe2a9});return _0x3d26ae(_0x4f079c[_0x21e025(0x114)]['comment'],_0x568a6b);}}async[_0xfde14a(0x12b)](_0x161300){const _0x24000b=_0xfde14a;var _0x145bc9,_0x18f329;const {text:_0x2b35dd,unitId:_0x54a253}=_0x161300,_0x27b9ab=(_0x18f329=(_0x145bc9=_0x2b35dd[_0x24000b(0x181)])==null?void 0x0:_0x145bc9[_0x24000b(0x13e)](_0x8e1e91=>_0x8e1e91['rangeType']===_0x24455d[_0x24000b(0x140)][_0x24000b(0x115)])[_0x24000b(0x161)](_0x3cd327=>_0x3cd327[_0x24000b(0x17f)]))!=null?_0x18f329:[],_0xedcad0=JSON[_0x24000b(0x157)](_0x2b35dd),_0x1e50d1=_0x161300['threadId'],_0x414c82=_0x161300['id'],_0x1d1519={'memberId':(await this[_0x24000b(0x158)][_0x24000b(0x129)](_0x54a253))[_0x24000b(0x167)](),'unitId':_0x54a253,'threadId':_0x1e50d1,'mention':_0x27b9ab,'content':_0xedcad0,'replyId':_0x414c82},_0x16c191=await this[_0x24000b(0x15b)]['post'](_0x24000b(0x119)+_0x54a253+_0x24000b(0x18e),{'body':_0x1d1519});return!_0x16c191[_0x24000b(0x114)]['error']||_0x16c191[_0x24000b(0x114)][_0x24000b(0x121)][_0x24000b(0x183)]===0x1;}async['resolveComment'](_0x309a40){const _0x6c5ccf=_0xfde14a,{unitId:_0x5b49f8}=_0x309a40,_0x21d413=_0x309a40[_0x6c5ccf(0x12c)],_0x2eb30d={'memberId':this[_0x6c5ccf(0x170)]['getCurrentUser']()[_0x6c5ccf(0x143)],'unitId':_0x5b49f8,'threadId':_0x21d413,'solved':_0x309a40['resolved']?_0x365d72[_0x6c5ccf(0x16f)]:_0x365d72[_0x6c5ccf(0x138)]},_0x34fb3a=await this[_0x6c5ccf(0x15b)][_0x6c5ccf(0x186)](_0x6c5ccf(0x119)+_0x5b49f8+'/solved',{'body':_0x2eb30d});return!_0x34fb3a[_0x6c5ccf(0x114)][_0x6c5ccf(0x121)]||_0x34fb3a['body'][_0x6c5ccf(0x121)][_0x6c5ccf(0x183)]===0x1;}async[_0xfde14a(0x113)](_0x2d39df,_0x1714de,_0x4ee616,_0x18afb1){const _0x311759=_0xfde14a,_0x332624={'memberId':(await this[_0x311759(0x158)][_0x311759(0x129)](_0x2d39df))[_0x311759(0x167)](),'threadId':_0x4ee616,'replyId':_0x18afb1,'unitId':_0x2d39df},_0x4c3df9=await this[_0x311759(0x15b)][_0x311759(0x186)](_0x311759(0x119)+_0x2d39df+'/delete',{'body':_0x332624});return!_0x4c3df9['body']['error']||_0x4c3df9[_0x311759(0x114)]['error']['code']===0x1;}async[_0xfde14a(0x14e)](_0x44e791,_0x2d42bd,_0x3bcfb1){const _0x373502=_0xfde14a,_0x110273={'unitId':_0x44e791,'threadId':_0x3bcfb1},_0x21a986=await this[_0x373502(0x15b)][_0x373502(0x186)](_0x373502(0x119)+_0x44e791+_0x373502(0x13d),{'body':_0x110273}),_0x33f14e=_0x3bcfb1['map'](_0x136d7e=>_0x1a9fe8(_0x21a986[_0x373502(0x114)][_0x373502(0x164)][_0x136d7e],_0x44e791,_0x2d42bd))[_0x373502(0x13e)](Boolean);return Object[_0x373502(0x11c)](_0x21a986[_0x373502(0x114)][_0x373502(0x196)])['forEach'](_0xed1745=>{const _0xa16908=_0x373502;this[_0xa16908(0x170)]['addUser'](_0xed1745);}),_0x33f14e;}[_0xfde14a(0x173)](_0x57bba8){return{'id':_0x57bba8['id'],'threadId':_0x57bba8['threadId'],'ref':_0x57bba8['ref']};}};_0x4ffe36=_0xcf40fe([_0x55462e(0x0,_0x24455d[_0xfde14a(0x15c)](_0x5cfd00[_0xfde14a(0x126)])),_0x55462e(0x1,_0x24455d[_0xfde14a(0x15c)](_0x24455d[_0xfde14a(0x13c)])),_0x55462e(0x2,_0x24455d[_0xfde14a(0x15c)](_0x33a76f[_0xfde14a(0x17e)]))],_0x4ffe36);var _0x982ec1=Object[_0xfde14a(0x166)],_0x39520f=(_0x4eb2f6,_0x4388be,_0x3f47bf,_0x2f2855)=>{for(var _0x46c174=_0x2f2855>0x1?void 0x0:_0x2f2855?_0x982ec1(_0x4388be,_0x3f47bf):_0x4388be,_0x23e8df=_0x4eb2f6['length']-0x1,_0x1e6057;_0x23e8df>=0x0;_0x23e8df--)(_0x1e6057=_0x4eb2f6[_0x23e8df])&&(_0x46c174=_0x1e6057(_0x46c174)||_0x46c174);return _0x46c174;},_0x58665d=(_0x3d844e,_0x32ee46)=>(_0x1bd801,_0xfcf938)=>_0x32ee46(_0x1bd801,_0xfcf938,_0x3d844e);let _0x32f4ba=class extends _0x24455d['Disposable']{constructor(_0x4fbcee,_0x2d3575){const _0x594e3a=_0xfde14a;super(),this[_0x594e3a(0x14f)]=_0x4fbcee,this[_0x594e3a(0x116)]=_0x2d3575,this[_0x594e3a(0x182)]();}[_0xfde14a(0x182)](){const _0x4b8192=_0xfde14a;this[_0x4b8192(0x14f)]['dataSource']=this[_0x4b8192(0x116)],this['_threadCommentDataSourceService'][_0x4b8192(0x193)]=!0x1;}};_0x32f4ba=_0x39520f([_0x58665d(0x0,_0x1a507f[_0xfde14a(0x15d)]),_0x58665d(0x1,_0x24455d[_0xfde14a(0x15c)](_0x4ffe36))],_0x32f4ba);var _0x484a12=Object[_0xfde14a(0x144)],_0x297f3b=Object[_0xfde14a(0x166)],_0x365d10=(_0x435374,_0x34ec26,_0x543f99)=>_0x34ec26 in _0x435374?_0x484a12(_0x435374,_0x34ec26,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x543f99}):_0x435374[_0x34ec26]=_0x543f99,_0x28cb7b=(_0x3160dc,_0x107454,_0x27c4f3,_0x3d48c9)=>{for(var _0x427029=_0x3d48c9>0x1?void 0x0:_0x3d48c9?_0x297f3b(_0x107454,_0x27c4f3):_0x107454,_0x1a4276=_0x3160dc['length']-0x1,_0x6a6719;_0x1a4276>=0x0;_0x1a4276--)(_0x6a6719=_0x3160dc[_0x1a4276])&&(_0x427029=_0x6a6719(_0x427029)||_0x427029);return _0x427029;},_0x2cd858=(_0x27edb0,_0x4fde45)=>(_0x50e8a8,_0x5e0eda)=>_0x4fde45(_0x50e8a8,_0x5e0eda,_0x27edb0),_0x462cf7=(_0x3b28c6,_0x78a661,_0x287262)=>_0x365d10(_0x3b28c6,typeof _0x78a661!=_0xfde14a(0x16c)?_0x78a661+'':_0x78a661,_0x287262);_0x5cd3d2['UniverThreadCommentDataSourcePlugin']=class extends _0x24455d[_0xfde14a(0x15a)]{constructor(_0x9df939=_0x46ba6f,_0x4162e1,_0x14a110){const _0x4c211a=_0xfde14a;super(),this[_0x4c211a(0x163)]=_0x9df939,this['_injector']=_0x4162e1,this[_0x4c211a(0x16b)]=_0x14a110;const {..._0xca1693}=_0x24455d[_0x4c211a(0x148)]({},_0x46ba6f,this[_0x4c211a(0x163)]);this[_0x4c211a(0x16b)]['setConfig'](_0x1d411b,_0xca1693);}[_0xfde14a(0x194)](){const _0x394921=_0xfde14a;[[_0x4ffe36],[_0x32f4ba],[_0x216e98]][_0x394921(0x179)](_0x1d1476=>{const _0x4fa2c8=_0x394921;this[_0x4fa2c8(0x18d)][_0x4fa2c8(0x13f)](_0x1d1476);});}['onReady'](){const _0x55a900=_0xfde14a;this[_0x55a900(0x18d)][_0x55a900(0x153)](_0x32f4ba),this['_injector'][_0x55a900(0x153)](_0x216e98);}},_0x462cf7(_0x5cd3d2[_0xfde14a(0x162)],'pluginName',_0x59f24d),_0x462cf7(_0x5cd3d2[_0xfde14a(0x162)],'type',_0x24455d['UniverInstanceType'][_0xfde14a(0x156)]),_0x5cd3d2[_0xfde14a(0x162)]=_0x28cb7b([_0x24455d['DependentOn'](_0x20fafc[_0xfde14a(0x17a)],_0x33a76f[_0xfde14a(0x145)],_0x2a361b['UniverLicensePlugin']),_0x2cd858(0x1,_0x24455d[_0xfde14a(0x15c)](_0x24455d[_0xfde14a(0x13b)])),_0x2cd858(0x2,_0x24455d['IConfigService'])],_0x5cd3d2['UniverThreadCommentDataSourcePlugin']),Object[_0xfde14a(0x144)](_0x5cd3d2,Symbol[_0xfde14a(0x124)],{'value':_0xfde14a(0x12d)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3-experimental.20251204-1549a8e",
|
|
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/
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/thread-comment": "0.12.2-nightly.202511290905",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.12.3-experimental.20251204-1549a8e",
|
|
49
|
+
"@univerjs-pro/license": "0.12.3-experimental.20251204-1549a8e",
|
|
50
|
+
"@univerjs/core": "0.12.3-experimental.20251204-1549a8e",
|
|
52
51
|
"@univerjs/protocol": "0.1.47",
|
|
53
|
-
"@univerjs
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.12.
|
|
52
|
+
"@univerjs/thread-comment": "0.12.3-experimental.20251204-1549a8e",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.12.3-experimental.20251204-1549a8e",
|
|
54
|
+
"@univerjs/network": "0.12.3-experimental.20251204-1549a8e"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
|
-
"vite": "^7.2.
|
|
60
|
-
"vitest": "^4.0.
|
|
61
|
-
"@univerjs-infra/shared": "0.12.
|
|
59
|
+
"vite": "^7.2.6",
|
|
60
|
+
"vitest": "^4.0.15",
|
|
61
|
+
"@univerjs-infra/shared": "0.12.3"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|