@univerjs-pro/thread-comment-datasource 0.15.3 → 0.15.4-insiders.20260211-f06b0a7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +9 -9
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x4c278f=_0x5471;(function(_0x36a55f,_0x1768e3){const _0x27b043=_0x5471,_0x12776e=_0x36a55f();while(!![]){try{const _0x62b040=parseInt(_0x27b043(0x11b))/0x1+-parseInt(_0x27b043(0x133))/0x2+parseInt(_0x27b043(0x129))/0x3+-parseInt(_0x27b043(0x12c))/0x4*(parseInt(_0x27b043(0x11e))/0x5)+parseInt(_0x27b043(0x130))/0x6*(parseInt(_0x27b043(0x127))/0x7)+parseInt(_0x27b043(0x109))/0x8+parseInt(_0x27b043(0x124))/0x9*(parseInt(_0x27b043(0xf7))/0xa);if(_0x62b040===_0x1768e3)break;else _0x12776e['push'](_0x12776e['shift']());}catch(_0x3aa4ef){_0x12776e['push'](_0x12776e['shift']());}}}(_0x33b0,0xc9dcc));Object['defineProperty'](exports,Symbol[_0x4c278f(0xf5)],{'value':_0x4c278f(0x105)});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=_0x4c278f(0xfd);var I=(_0x4fbdc8=>(_0x4fbdc8[_0x4fbdc8[_0x4c278f(0x12e)]=0x0]=_0x4c278f(0x12e),_0x4fbdc8[_0x4fbdc8[_0x4c278f(0xf4)]=0x1]=_0x4c278f(0xf4),_0x4fbdc8[_0x4fbdc8[_0x4c278f(0xf0)]=-0x1]=_0x4c278f(0xf0),_0x4fbdc8))(I||{}),v=(_0xd7d5b7=>(_0xd7d5b7[_0xd7d5b7[_0x4c278f(0xd4)]=0x0]=_0x4c278f(0xd4),_0xd7d5b7[_0xd7d5b7[_0x4c278f(0x149)]=0x1]=_0x4c278f(0x149),_0xd7d5b7[_0xd7d5b7[_0x4c278f(0x146)]=0x2]=_0x4c278f(0x146),_0xd7d5b7[_0xd7d5b7[_0x4c278f(0x10b)]=0x3]=_0x4c278f(0x10b),_0xd7d5b7[_0xd7d5b7[_0x4c278f(0x113)]=0x4]=_0x4c278f(0x113),_0xd7d5b7[_0xd7d5b7[_0x4c278f(0x138)]=0x5]='Solve',_0xd7d5b7[_0xd7d5b7[_0x4c278f(0xf0)]=-0x1]=_0x4c278f(0xf0),_0xd7d5b7))(v||{});const f=_0x8b3e9b=>c[_0x4c278f(0xf9)](new Date(+_0x8b3e9b))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x5dcc31,_0x2d84d4)=>{const _0x22476d=_0x4c278f,_0x22127f=_0x5dcc31[_0x22476d(0x140)](c[_0x22476d(0x119)]),_0x216c75=_0x5dcc31[_0x22476d(0x140)](P[_0x22476d(0x14e)]);_0x2d84d4[_0x22476d(0xda)](_0x147f82=>{const _0x439b2a=_0x22476d;_0x22127f[_0x439b2a(0xf6)](_0x147f82)&&_0x2d84d4[_0x439b2a(0x111)](_0x147f82);}),_0x2d84d4[_0x22476d(0x135)]&&(await _0x216c75[_0x22476d(0x140)](_0x22476d(0x147),{'params':{'userIDs':[..._0x2d84d4]}}))[_0x22476d(0x13a)][_0x22476d(0x132)]['forEach'](_0x25ea8d=>{const _0xc0defd=_0x22476d;_0x25ea8d&&_0x22127f[_0xc0defd(0x120)](_0x25ea8d);});};var $=Object[_0x4c278f(0xea)],E=(_0xd4aba5,_0x503933,_0xeacf17,_0x3272a4)=>{const _0x11843e=_0x4c278f;for(var _0x22054d=_0x3272a4>0x1?void 0x0:_0x3272a4?$(_0x503933,_0xeacf17):_0x503933,_0x536d87=_0xd4aba5[_0x11843e(0x100)]-0x1,_0x4ba9ba;_0x536d87>=0x0;_0x536d87--)(_0x4ba9ba=_0xd4aba5[_0x536d87])&&(_0x22054d=_0x4ba9ba(_0x22054d)||_0x22054d);return _0x22054d;},S=(_0x244474,_0x3d416a)=>(_0x429413,_0x1f0bef)=>_0x3d416a(_0x429413,_0x1f0bef,_0x244474);let _=class extends c['Disposable']{constructor(_0xbe4b65,_0x4a3e6c,_0x36b9b3,_0x4ea56c){const _0x1f66ec=_0x4c278f;super(),this[_0x1f66ec(0xd6)]=_0xbe4b65,this[_0x1f66ec(0x14b)]=_0x4a3e6c,this[_0x1f66ec(0xf8)]=_0x36b9b3,this[_0x1f66ec(0x139)]=_0x4ea56c,this[_0x1f66ec(0x110)](),this[_0x1f66ec(0x12a)]();}[_0x4c278f(0x12a)](){const _0x2d64ce=_0x4c278f;this[_0x2d64ce(0xec)](this[_0x2d64ce(0x14b)]['commentUpdate$'][_0x2d64ce(0xd9)](j[_0x2d64ce(0x112)](0x10))[_0x2d64ce(0x13b)](_0x4db203=>{const _0x8c4965=_0x2d64ce,_0x2b5fe6=new Set();_0x4db203['forEach'](_0x3f6268=>{const _0x9f8598=_0x5471;if(_0x3f6268['type']===_0x9f8598(0x11c)){const _0x27b089=_0x3f6268[_0x9f8598(0xe5)]['personId'];_0x2b5fe6[_0x9f8598(0x11c)](_0x27b089);}}),R(this[_0x8c4965(0x139)],_0x2b5fe6);}));}[_0x4c278f(0x110)](){const _0x43589c=_0x4c278f;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0x43589c(0x13b)](async _0x528c9d=>{const _0x3e8ed8=_0x43589c;var _0x4413a1,_0x4e031b,_0x5c1054,_0x375ac7;const _0x2e4dcd=(_0x4413a1=this[_0x3e8ed8(0x14b)][_0x3e8ed8(0x145)](_0x528c9d['unitId'])[_0x3e8ed8(0xff)](_0x23df8f=>_0x23df8f[_0x3e8ed8(0xe2)]===_0x528c9d['threadId']))==null?void 0x0:_0x4413a1[_0x3e8ed8(0x12f)];if(!_0x2e4dcd)return;const {unitId:_0x447c94,subUnitId:_0x3ca42f}=_0x2e4dcd;switch(_0x528c9d['user']&&this[_0x3e8ed8(0xf8)]['addUser'](_0x528c9d[_0x3e8ed8(0x114)]),_0x528c9d[_0x3e8ed8(0xe8)]){case v[_0x3e8ed8(0x149)]:break;case v[_0x3e8ed8(0x146)]:{this[_0x3e8ed8(0x14b)][_0x3e8ed8(0xe3)](_0x447c94,_0x3ca42f,{'unitId':_0x447c94,'subUnitId':_0x3ca42f,'ref':'','id':_0x528c9d[_0x3e8ed8(0x13e)],'dT':f(+_0x528c9d['createTimestamp']),'threadId':_0x528c9d[_0x3e8ed8(0xe2)],'personId':(_0x5c1054=(_0x4e031b=_0x528c9d[_0x3e8ed8(0x114)])==null?void 0x0:_0x4e031b[_0x3e8ed8(0x141)])!=null?_0x5c1054:_0x528c9d[_0x3e8ed8(0x14d)],'text':JSON[_0x3e8ed8(0x134)](_0x528c9d[_0x3e8ed8(0xde)]),'parentId':_0x2e4dcd['id']});break;}case v[_0x3e8ed8(0x113)]:{const _0x5960a1=this[_0x3e8ed8(0x14b)][_0x3e8ed8(0xf1)](_0x447c94,_0x3ca42f,_0x528c9d[_0x3e8ed8(0x13e)]);_0x5960a1&&_0x5960a1[_0x3e8ed8(0x104)]&&this['_threadCommentModel'][_0x3e8ed8(0x125)](_0x447c94,_0x3ca42f,_0x528c9d[_0x3e8ed8(0x13e)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x3e8ed8(0xdc)](_0x447c94,_0x3ca42f,{'commentId':_0x528c9d[_0x3e8ed8(0x13e)],'text':JSON[_0x3e8ed8(0x134)](_0x528c9d['content'])});break;}case v[_0x3e8ed8(0x138)]:{const _0x5077cf=(_0x375ac7=this[_0x3e8ed8(0x14b)][_0x3e8ed8(0x145)](_0x528c9d[_0x3e8ed8(0xfc)])[_0x3e8ed8(0xff)](_0x41d019=>_0x41d019[_0x3e8ed8(0xe2)]===_0x528c9d[_0x3e8ed8(0xe2)]))==null?void 0x0:_0x375ac7[_0x3e8ed8(0x12f)];_0x5077cf&&this[_0x3e8ed8(0x14b)]['resolveComment'](_0x447c94,_0x3ca42f,_0x5077cf['id'],_0x528c9d['solved']===I[_0x3e8ed8(0xf4)]);break;}}}));}};function _0x5471(_0x5d808b,_0xce3ba7){_0x5d808b=_0x5d808b-0xd3;const _0x33b0e5=_0x33b0();let _0x5471df=_0x33b0e5[_0x5d808b];return _0x5471df;}_=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0x4c278f(0x115)](M[_0x4c278f(0x117)])),S(0x2,c[_0x4c278f(0x115)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x4c278f(0x10f)]))],_);function _0x33b0(){const _0x44eded=['length','/list','Plugin','UniverThreadCommentUIPlugin','parentId','Module','map','values','onReady','4875352VGYBLT','UniverCollaborationClientPlugin','Edit','_sessionService','rangeId','listComments','Injector','_init','delete','bufferTime','Delete','user','Inject','_configService','ThreadCommentModel','_initDataSource','UserManagerService','comment','1618452muMaHr','add','Disposable','415gTHEVn','/solved','addUser','CustomRangeType','YYYY/MM/DD\x20HH:mm','stringify','4491JHQpBb','deleteComment','CollaborationSessionService','492709LbdSPT','format','2244393gWZzbv','_initUserSync','DependentOn','76748srsOue','ref','OpenOrReOpen','root','30dkCiZU','syncUpdateMutationToColla','users','3293218glWnZt','parse','size','/edit','filter','Solve','_injector','body','subscribe','reply','_config','replyId','solved','get','userID','dataSource','post','/delete','getUnit','Reply','/universer-api/user/list','/reply','Add','UniverInstanceType','_threadCommentModel','UniverLicensePlugin','userId','HTTPService','merge','Unknown','code','_commentService','UNIVER_UNKNOWN','slice','pipe','forEach','rangeType','updateComment','_httpService','content','_threadCommentDataSource','getMemberID','createTimestamp','threadId','addComment','_threadCommentDataSourceService','payload','thread-comment-data-source.config','saveCommentToSnapshot','type','getCurrentUser','getOwnPropertyDescriptor','onStarting','disposeWithMe','symbol','requireSession','replies','UNRECOGNIZED','getComment','customRanges','defineProperty','Solved','toStringTag','getUser','14790WuMJYf','_userService','dayjs','error','/universer-api/comment/unit/','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentDataSourcePlugin','find'];_0x33b0=function(){return _0x44eded;};return _0x33b0();}const q=_0x4c278f(0xe6),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x5e71f7,_0x428554,_0x464c1d,_0x56c3e1)=>{const _0x6e29a9=_0x4c278f;for(var _0x1dc3fe=_0x56c3e1>0x1?void 0x0:_0x56c3e1?A(_0x428554,_0x464c1d):_0x428554,_0x4ee37e=_0x5e71f7[_0x6e29a9(0x100)]-0x1,_0x8fc2a6;_0x4ee37e>=0x0;_0x4ee37e--)(_0x8fc2a6=_0x5e71f7[_0x4ee37e])&&(_0x1dc3fe=_0x8fc2a6(_0x1dc3fe)||_0x1dc3fe);return _0x1dc3fe;},C=(_0x37bfa6,_0x41ce29)=>(_0x39ddd7,_0x21c4cc)=>_0x41ce29(_0x39ddd7,_0x21c4cc,_0x37bfa6);function Y(_0x38b05c,_0x9d5000){const _0x1e0fef=_0x4c278f,_0x54bfba=_0x38b05c['replies'][0x0];return{..._0x9d5000,'id':_0x54bfba['replyId'],'resolved':_0x38b05c[_0x1e0fef(0x13f)]===0x1,'dT':f(_0x54bfba[_0x1e0fef(0xe1)]),'personId':_0x54bfba[_0x1e0fef(0x14d)],'threadId':_0x54bfba['threadId']};}function G(_0x388a43,_0xcccd87,_0x14f0b3){const _0x18672c=_0x4c278f;var _0x44cb6f,_0x35ffd9;if(((_0x35ffd9=(_0x44cb6f=_0x388a43==null?void 0x0:_0x388a43['replies'])==null?void 0x0:_0x44cb6f[_0x18672c(0x100)])!=null?_0x35ffd9:0x0)>0x0){const _0x410351=(_0x2bb3fb,_0x44cdc4)=>({'id':_0x2bb3fb[_0x18672c(0x13e)],'threadId':_0x2bb3fb['threadId'],'dT':f(_0x2bb3fb[_0x18672c(0xe1)]),'personId':_0x2bb3fb['userId'],'resolved':_0x388a43[_0x18672c(0x13f)]===I[_0x18672c(0xf4)],'unitId':_0xcccd87,'subUnitId':_0x14f0b3,'text':JSON['parse'](_0x2bb3fb['content']),'parentId':_0x44cdc4}),_0x388da4=_0x410351(_0x388a43[_0x18672c(0xef)][0x0]);return{..._0x388da4,'children':_0x388a43[_0x18672c(0xef)][_0x18672c(0xd8)](0x1)[_0x18672c(0x106)](_0x591475=>_0x410351(_0x591475,_0x388da4['id']))};}return null;}let p=class{constructor(_0x5bd950,_0x2c9c22,_0x595bc2){const _0x4bd526=_0x4c278f;this[_0x4bd526(0xdd)]=_0x5bd950,this[_0x4bd526(0xf8)]=_0x2c9c22,this[_0x4bd526(0x10c)]=_0x595bc2;}async[_0x4c278f(0xe3)](_0x1cc0cd){const _0x3fa7af=_0x4c278f;var _0x2cdf20,_0x3d96fb;const {parentId:_0x450d2e,unitId:_0x37152e,text:_0x3a6ea8,threadId:_0x127e73}=_0x1cc0cd,_0x40c7fa=(_0x3d96fb=(_0x2cdf20=_0x3a6ea8[_0x3fa7af(0xf2)])==null?void 0x0:_0x2cdf20[_0x3fa7af(0x137)](_0x576049=>_0x576049[_0x3fa7af(0xdb)]===c[_0x3fa7af(0x121)]['COMMENT'])[_0x3fa7af(0x106)](_0x571cad=>_0x571cad[_0x3fa7af(0x10d)]))!=null?_0x3d96fb:[],_0xe3a833=JSON[_0x3fa7af(0x123)](_0x3a6ea8),_0x294a02=(await this[_0x3fa7af(0x10c)]['requireSession'](_0x37152e))[_0x3fa7af(0xe0)]();if(_0x450d2e){const _0x460249={'memberId':_0x294a02,'unitId':_0x37152e,'content':_0xe3a833,'mention':_0x40c7fa,'threadId':_0x127e73},_0x472aca=(await this['_httpService'][_0x3fa7af(0x143)](_0x3fa7af(0xfb)+_0x37152e+_0x3fa7af(0x148),{'body':_0x460249}))[_0x3fa7af(0x13a)][_0x3fa7af(0x13c)];return{..._0x1cc0cd,'id':_0x472aca[_0x3fa7af(0x13e)],'dT':c[_0x3fa7af(0xf9)](+_0x472aca[_0x3fa7af(0xe1)])[_0x3fa7af(0x128)](_0x3fa7af(0x122)),'personId':_0x472aca['userId']};}else{const _0x3998a4={'memberId':_0x294a02,'unitId':_0x37152e,'content':_0xe3a833,'mention':_0x40c7fa},_0x2e4164=await this[_0x3fa7af(0xdd)][_0x3fa7af(0x143)](_0x3fa7af(0xfb)+_0x37152e+'/add',{'body':_0x3998a4});return Y(_0x2e4164[_0x3fa7af(0x13a)][_0x3fa7af(0x11a)],_0x1cc0cd);}}async['updateComment'](_0x451a97){const _0x480617=_0x4c278f;var _0x191366,_0x5e5821;const {text:_0x463481,unitId:_0x590b06}=_0x451a97,_0x4ab46b=(_0x5e5821=(_0x191366=_0x463481[_0x480617(0xf2)])==null?void 0x0:_0x191366['filter'](_0x5995a4=>_0x5995a4[_0x480617(0xdb)]===c[_0x480617(0x121)]['COMMENT'])[_0x480617(0x106)](_0x55395a=>_0x55395a['rangeId']))!=null?_0x5e5821:[],_0xa7ecb4=JSON[_0x480617(0x123)](_0x463481),_0x12a3fd=_0x451a97[_0x480617(0xe2)],_0x6fc735=_0x451a97['id'],_0x387624={'memberId':(await this['_sessionService'][_0x480617(0xee)](_0x590b06))[_0x480617(0xe0)](),'unitId':_0x590b06,'threadId':_0x12a3fd,'mention':_0x4ab46b,'content':_0xa7ecb4,'replyId':_0x6fc735},_0x4e219e=await this[_0x480617(0xdd)][_0x480617(0x143)](_0x480617(0xfb)+_0x590b06+_0x480617(0x136),{'body':_0x387624});return!_0x4e219e[_0x480617(0x13a)][_0x480617(0xfa)]||_0x4e219e[_0x480617(0x13a)][_0x480617(0xfa)][_0x480617(0xd5)]===0x1;}async['resolveComment'](_0x546194){const _0x3b97d6=_0x4c278f,{unitId:_0x137fc0}=_0x546194,_0x51747f=_0x546194[_0x3b97d6(0xe2)],_0x434877={'memberId':this[_0x3b97d6(0xf8)][_0x3b97d6(0xe9)]()[_0x3b97d6(0x141)],'unitId':_0x137fc0,'threadId':_0x51747f,'solved':_0x546194['resolved']?I[_0x3b97d6(0xf4)]:I[_0x3b97d6(0x12e)]},_0xe3d56f=await this[_0x3b97d6(0xdd)]['post']('/universer-api/comment/unit/'+_0x137fc0+_0x3b97d6(0x11f),{'body':_0x434877});return!_0xe3d56f[_0x3b97d6(0x13a)][_0x3b97d6(0xfa)]||_0xe3d56f[_0x3b97d6(0x13a)][_0x3b97d6(0xfa)][_0x3b97d6(0xd5)]===0x1;}async[_0x4c278f(0x125)](_0x37bf83,_0x26f216,_0x416c61,_0x50c643){const _0x1cd7e9=_0x4c278f,_0x5f0469={'memberId':(await this[_0x1cd7e9(0x10c)][_0x1cd7e9(0xee)](_0x37bf83))[_0x1cd7e9(0xe0)](),'threadId':_0x416c61,'replyId':_0x50c643,'unitId':_0x37bf83},_0x1af403=await this['_httpService'][_0x1cd7e9(0x143)]('/universer-api/comment/unit/'+_0x37bf83+_0x1cd7e9(0x144),{'body':_0x5f0469});return!_0x1af403[_0x1cd7e9(0x13a)][_0x1cd7e9(0xfa)]||_0x1af403[_0x1cd7e9(0x13a)][_0x1cd7e9(0xfa)][_0x1cd7e9(0xd5)]===0x1;}async[_0x4c278f(0x10e)](_0x798907,_0x2a9558,_0x50f2eb){const _0xfdf931=_0x4c278f,_0x5a27be={'unitId':_0x798907,'threadId':_0x50f2eb},_0x385e6e=await this['_httpService']['post'](_0xfdf931(0xfb)+_0x798907+_0xfdf931(0x101),{'body':_0x5a27be}),_0x9d4849=_0x50f2eb['map'](_0x45a85f=>G(_0x385e6e[_0xfdf931(0x13a)]['comments'][_0x45a85f],_0x798907,_0x2a9558))[_0xfdf931(0x137)](Boolean);return Object[_0xfdf931(0x107)](_0x385e6e[_0xfdf931(0x13a)][_0xfdf931(0x132)])['forEach'](_0x16c329=>{const _0x4f0f89=_0xfdf931;this['_userService'][_0x4f0f89(0x120)](_0x16c329);}),_0x9d4849;}[_0x4c278f(0xe7)](_0x397a71){const _0x469e54=_0x4c278f;return{'id':_0x397a71['id'],'threadId':_0x397a71['threadId'],'ref':_0x397a71[_0x469e54(0x12d)]};}};p=x([C(0x0,c[_0x4c278f(0x115)](P[_0x4c278f(0x14e)])),C(0x1,c[_0x4c278f(0x115)](c['UserManagerService'])),C(0x2,c['Inject'](b[_0x4c278f(0x126)]))],p);var H=Object[_0x4c278f(0xea)],J=(_0x1555f5,_0x43d73b,_0x3c49c9,_0x575eca)=>{for(var _0x125123=_0x575eca>0x1?void 0x0:_0x575eca?H(_0x43d73b,_0x3c49c9):_0x43d73b,_0x57cc75=_0x1555f5['length']-0x1,_0x4dc913;_0x57cc75>=0x0;_0x57cc75--)(_0x4dc913=_0x1555f5[_0x57cc75])&&(_0x125123=_0x4dc913(_0x125123)||_0x125123);return _0x125123;},y=(_0x2856ec,_0x31586d)=>(_0x585b2e,_0x6a8972)=>_0x31586d(_0x585b2e,_0x6a8972,_0x2856ec);let g=class extends c[_0x4c278f(0x11d)]{constructor(_0x40c1d8,_0x5167d7){const _0x29d8e3=_0x4c278f;super(),this['_threadCommentDataSourceService']=_0x40c1d8,this[_0x29d8e3(0xdf)]=_0x5167d7,this[_0x29d8e3(0x118)]();}[_0x4c278f(0x118)](){const _0x199bf9=_0x4c278f;this[_0x199bf9(0xe4)][_0x199bf9(0x142)]=this[_0x199bf9(0xdf)],this[_0x199bf9(0xe4)][_0x199bf9(0x131)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x4c278f(0x115)](p))],g);var F=Object[_0x4c278f(0xf3)],L=Object['getOwnPropertyDescriptor'],Z=(_0x3b9453,_0x1d2cdb,_0x4330e9)=>_0x1d2cdb in _0x3b9453?F(_0x3b9453,_0x1d2cdb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4330e9}):_0x3b9453[_0x1d2cdb]=_0x4330e9,W=(_0x164923,_0x46373d,_0xa7aef9,_0x5358d1)=>{for(var _0x48e4f0=_0x5358d1>0x1?void 0x0:_0x5358d1?L(_0x46373d,_0xa7aef9):_0x46373d,_0x245923=_0x164923['length']-0x1,_0x429e09;_0x245923>=0x0;_0x245923--)(_0x429e09=_0x164923[_0x245923])&&(_0x48e4f0=_0x429e09(_0x48e4f0)||_0x48e4f0);return _0x48e4f0;},O=(_0x39cd3a,_0x2d276e)=>(_0x4dfd55,_0x13ef59)=>_0x2d276e(_0x4dfd55,_0x13ef59,_0x39cd3a),N=(_0x3710d0,_0x18d59c,_0x535f9b)=>Z(_0x3710d0,typeof _0x18d59c!=_0x4c278f(0xed)?_0x18d59c+'':_0x18d59c,_0x535f9b);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4c278f(0x102)]{constructor(_0x493370=D,_0x3e2a7b,_0xd272a3){const _0x1585d7=_0x4c278f;super(),this[_0x1585d7(0x13d)]=_0x493370,this[_0x1585d7(0x139)]=_0x3e2a7b,this['_configService']=_0xd272a3;const {..._0x585be5}=c[_0x1585d7(0xd3)]({},D,this[_0x1585d7(0x13d)]);this[_0x1585d7(0x116)]['setConfig'](q,_0x585be5);}[_0x4c278f(0xeb)](){const _0x355c98=_0x4c278f;[[p],[g],[_]][_0x355c98(0xda)](_0x46b2e7=>{const _0x3e28e2=_0x355c98;this[_0x3e28e2(0x139)]['add'](_0x46b2e7);});}[_0x4c278f(0x108)](){const _0x25e3af=_0x4c278f;this[_0x25e3af(0x139)][_0x25e3af(0x140)](g),this[_0x25e3af(0x139)][_0x25e3af(0x140)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x4c278f(0xfe)],_0x4c278f(0xe8),c[_0x4c278f(0x14a)][_0x4c278f(0xd7)]),exports[_0x4c278f(0xfe)]=W([c[_0x4c278f(0x12b)](w[_0x4c278f(0x103)],b[_0x4c278f(0x10a)],T[_0x4c278f(0x14c)]),O(0x1,c[_0x4c278f(0x115)](c[_0x4c278f(0x10f)])),O(0x2,c['IConfigService'])],exports[_0x4c278f(0xfe)]);
|
|
1
|
+
'use strict';const _0x453e95=_0x10a4;function _0x28c4(){const _0x56052d=['YYYY/MM/DD\x20HH:mm','type','UniverInstanceType','threadId','createTimestamp','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','_config','delete','Solve','36QcVpjJ','stringify','IThreadCommentDataSourceService','length','UNIVER_UNKNOWN','UserManagerService','Add','toStringTag','updateComment','_configService','UNRECOGNIZED','find','Injector','COMMENT','8MInnxA','getUnit','getOwnPropertyDescriptor','UniverThreadCommentDataSourcePlugin','_threadCommentModel','onStarting','unitId','_httpService','map','/list','values','_userService','10jOfVCF','bufferTime','Disposable','914574zVwULW','subscribe','1420678JlvSRt','_threadCommentDataSourceService','/reply','3262231oiZuRd','syncUpdateMutationToColla','rangeType','HTTPService','48ffcSBa','117pBSnkZ','pluginName','merge','Unknown','Solved','Plugin','CollaborationSessionService','Inject','symbol','listComments','CustomRangeType','add','user','CommentService','/add','_initDataSource','pipe','_initUserSync','rangeId','resolved','payload','disposeWithMe','post','addUser','comment','DependentOn','/universer-api/comment/unit/','/universer-api/user/list','requireSession','resolveComment','5379361YrpxdI','162717djLJuD','code','ThreadCommentModel','_injector','1lYoXPF','getMemberID','comments','forEach','/delete','commentUpdate$','UniverCollaborationClientPlugin','userID','defineProperty','replyId','userId','content','UniverThreadCommentUIPlugin','parentId','_init','Reply','format','UniverLicensePlugin','body','194470GjjGTn','filter','onReady','OpenOrReOpen','deleteComment','error','root','Edit','addComment','replies','users','getUser','parse','solved','get','_sessionService','/solved','Delete','1903825RbzwdH'];_0x28c4=function(){return _0x56052d;};return _0x28c4();}(function(_0x5342d1,_0x5b9f55){const _0x14541c=_0x10a4,_0x2a0da6=_0x5342d1();while(!![]){try{const _0x5ca33a=parseInt(_0x14541c(0x145))/0x1*(parseInt(_0x14541c(0x11a))/0x2)+parseInt(_0x14541c(0x141))/0x3*(parseInt(_0x14541c(0xfb))/0x4)+-parseInt(_0x14541c(0x115))/0x5*(parseInt(_0x14541c(0x118))/0x6)+-parseInt(_0x14541c(0x11d))/0x7*(parseInt(_0x14541c(0x109))/0x8)+-parseInt(_0x14541c(0x122))/0x9*(-parseInt(_0x14541c(0x158))/0xa)+parseInt(_0x14541c(0x16a))/0xb*(-parseInt(_0x14541c(0x121))/0xc)+parseInt(_0x14541c(0x140))/0xd;if(_0x5ca33a===_0x5b9f55)break;else _0x2a0da6['push'](_0x2a0da6['shift']());}catch(_0x244fd9){_0x2a0da6['push'](_0x2a0da6['shift']());}}}(_0x28c4,0x621f3));Object[_0x453e95(0x14d)](exports,Symbol[_0x453e95(0x102)],{'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=_0x453e95(0x171);var I=(_0x31b136=>(_0x31b136[_0x31b136[_0x453e95(0x15b)]=0x0]=_0x453e95(0x15b),_0x31b136[_0x31b136[_0x453e95(0x126)]=0x1]=_0x453e95(0x126),_0x31b136[_0x31b136[_0x453e95(0x105)]=-0x1]=_0x453e95(0x105),_0x31b136))(I||{}),v=(_0x3f1eb0=>(_0x3f1eb0[_0x3f1eb0[_0x453e95(0x125)]=0x0]=_0x453e95(0x125),_0x3f1eb0[_0x3f1eb0['Add']=0x1]=_0x453e95(0x101),_0x3f1eb0[_0x3f1eb0[_0x453e95(0x154)]=0x2]=_0x453e95(0x154),_0x3f1eb0[_0x3f1eb0[_0x453e95(0x15f)]=0x3]=_0x453e95(0x15f),_0x3f1eb0[_0x3f1eb0[_0x453e95(0x169)]=0x4]='Delete',_0x3f1eb0[_0x3f1eb0['Solve']=0x5]='Solve',_0x3f1eb0[_0x3f1eb0[_0x453e95(0x105)]=-0x1]=_0x453e95(0x105),_0x3f1eb0))(v||{});const f=_0x2e2539=>c['dayjs'](new Date(+_0x2e2539))[_0x453e95(0x155)](_0x453e95(0x16b)),R=async(_0x64eecb,_0x19ca35)=>{const _0x3716a6=_0x453e95,_0x5d3f2d=_0x64eecb[_0x3716a6(0x166)](c['UserManagerService']),_0x26703f=_0x64eecb[_0x3716a6(0x166)](P['HTTPService']);_0x19ca35[_0x3716a6(0x148)](_0x24ea65=>{const _0x283b38=_0x3716a6;_0x5d3f2d[_0x283b38(0x163)](_0x24ea65)&&_0x19ca35[_0x283b38(0xf9)](_0x24ea65);}),_0x19ca35['size']&&(await _0x26703f[_0x3716a6(0x166)](_0x3716a6(0x13d),{'params':{'userIDs':[..._0x19ca35]}}))[_0x3716a6(0x157)]['users']['forEach'](_0x2ef43c=>{const _0x40f369=_0x3716a6;_0x2ef43c&&_0x5d3f2d[_0x40f369(0x139)](_0x2ef43c);});};var $=Object[_0x453e95(0x10b)],E=(_0x1a8e90,_0x4cbca2,_0x3699e1,_0x102be1)=>{const _0x3236e8=_0x453e95;for(var _0x5dda65=_0x102be1>0x1?void 0x0:_0x102be1?$(_0x4cbca2,_0x3699e1):_0x4cbca2,_0x18f2cd=_0x1a8e90[_0x3236e8(0xfe)]-0x1,_0x395415;_0x18f2cd>=0x0;_0x18f2cd--)(_0x395415=_0x1a8e90[_0x18f2cd])&&(_0x5dda65=_0x395415(_0x5dda65)||_0x5dda65);return _0x5dda65;},S=(_0xb9b8ac,_0xa5355f)=>(_0x5b66e5,_0x9512be)=>_0xa5355f(_0x5b66e5,_0x9512be,_0xb9b8ac);let _=class extends c[_0x453e95(0x117)]{constructor(_0x342b18,_0xb9b14b,_0xff9f96,_0x2ea612){const _0x50f6de=_0x453e95;super(),this[_0x50f6de(0x170)]=_0x342b18,this['_threadCommentModel']=_0xb9b14b,this[_0x50f6de(0x114)]=_0xff9f96,this['_injector']=_0x2ea612,this[_0x50f6de(0x153)](),this[_0x50f6de(0x133)]();}[_0x453e95(0x133)](){const _0x287309=_0x453e95;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x287309(0x132)](j[_0x287309(0x116)](0x10))['subscribe'](_0x39bb34=>{const _0x5905fd=_0x287309,_0xa8b94b=new Set();_0x39bb34[_0x5905fd(0x148)](_0x5a464e=>{const _0x24599c=_0x5905fd;if(_0x5a464e[_0x24599c(0x16c)]===_0x24599c(0x12d)){const _0x10b912=_0x5a464e[_0x24599c(0x136)]['personId'];_0xa8b94b[_0x24599c(0x12d)](_0x10b912);}}),R(this[_0x5905fd(0x144)],_0xa8b94b);}));}['_init'](){const _0x3d7f38=_0x453e95;this[_0x3d7f38(0x137)](this[_0x3d7f38(0x170)][_0x3d7f38(0x14a)][_0x3d7f38(0x119)](async _0x4a4ce9=>{const _0x5626f3=_0x3d7f38;var _0x32e375,_0x56ee9d,_0x58f009,_0x41c927;const _0x5bee93=(_0x32e375=this[_0x5626f3(0x10d)]['getUnit'](_0x4a4ce9['unitId'])[_0x5626f3(0x106)](_0x3cd9c3=>_0x3cd9c3[_0x5626f3(0x16e)]===_0x4a4ce9[_0x5626f3(0x16e)]))==null?void 0x0:_0x32e375['root'];if(!_0x5bee93)return;const {unitId:_0x74d454,subUnitId:_0x3e25dc}=_0x5bee93;switch(_0x4a4ce9[_0x5626f3(0x12e)]&&this['_userService'][_0x5626f3(0x139)](_0x4a4ce9[_0x5626f3(0x12e)]),_0x4a4ce9[_0x5626f3(0x16c)]){case v[_0x5626f3(0x101)]:break;case v[_0x5626f3(0x154)]:{this['_threadCommentModel']['addComment'](_0x74d454,_0x3e25dc,{'unitId':_0x74d454,'subUnitId':_0x3e25dc,'ref':'','id':_0x4a4ce9[_0x5626f3(0x14e)],'dT':f(+_0x4a4ce9[_0x5626f3(0x16f)]),'threadId':_0x4a4ce9[_0x5626f3(0x16e)],'personId':(_0x58f009=(_0x56ee9d=_0x4a4ce9[_0x5626f3(0x12e)])==null?void 0x0:_0x56ee9d['userID'])!=null?_0x58f009:_0x4a4ce9[_0x5626f3(0x14f)],'text':JSON[_0x5626f3(0x164)](_0x4a4ce9[_0x5626f3(0x150)]),'parentId':_0x5bee93['id']});break;}case v['Delete']:{const _0x3532fe=this[_0x5626f3(0x10d)]['getComment'](_0x74d454,_0x3e25dc,_0x4a4ce9[_0x5626f3(0x14e)]);_0x3532fe&&_0x3532fe[_0x5626f3(0x152)]&&this['_threadCommentModel'][_0x5626f3(0x15c)](_0x74d454,_0x3e25dc,_0x4a4ce9[_0x5626f3(0x14e)]);break;}case v[_0x5626f3(0x15f)]:{this[_0x5626f3(0x10d)][_0x5626f3(0x103)](_0x74d454,_0x3e25dc,{'commentId':_0x4a4ce9['replyId'],'text':JSON[_0x5626f3(0x164)](_0x4a4ce9['content'])});break;}case v[_0x5626f3(0xfa)]:{const _0x1fa689=(_0x41c927=this[_0x5626f3(0x10d)][_0x5626f3(0x10a)](_0x4a4ce9[_0x5626f3(0x10f)])['find'](_0x471bb6=>_0x471bb6[_0x5626f3(0x16e)]===_0x4a4ce9[_0x5626f3(0x16e)]))==null?void 0x0:_0x41c927[_0x5626f3(0x15e)];_0x1fa689&&this['_threadCommentModel'][_0x5626f3(0x13f)](_0x74d454,_0x3e25dc,_0x1fa689['id'],_0x4a4ce9[_0x5626f3(0x165)]===I[_0x5626f3(0x126)]);break;}}}));}};_=E([S(0x0,c[_0x453e95(0x129)](b[_0x453e95(0x12f)])),S(0x1,c[_0x453e95(0x129)](M[_0x453e95(0x143)])),S(0x2,c[_0x453e95(0x129)](c[_0x453e95(0x100)])),S(0x3,c['Inject'](c[_0x453e95(0x107)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x453e95(0x10b)],x=(_0x41a15d,_0x5799b6,_0x52d1b7,_0x3f2f6c)=>{for(var _0x41e7a5=_0x3f2f6c>0x1?void 0x0:_0x3f2f6c?A(_0x5799b6,_0x52d1b7):_0x5799b6,_0x4b8a51=_0x41a15d['length']-0x1,_0x105e08;_0x4b8a51>=0x0;_0x4b8a51--)(_0x105e08=_0x41a15d[_0x4b8a51])&&(_0x41e7a5=_0x105e08(_0x41e7a5)||_0x41e7a5);return _0x41e7a5;},C=(_0x17a2fb,_0x2d35a6)=>(_0x251074,_0x21041e)=>_0x2d35a6(_0x251074,_0x21041e,_0x17a2fb);function Y(_0x50dd17,_0x1bf7cd){const _0x319a24=_0x453e95,_0x5241fe=_0x50dd17[_0x319a24(0x161)][0x0];return{..._0x1bf7cd,'id':_0x5241fe[_0x319a24(0x14e)],'resolved':_0x50dd17[_0x319a24(0x165)]===0x1,'dT':f(_0x5241fe[_0x319a24(0x16f)]),'personId':_0x5241fe[_0x319a24(0x14f)],'threadId':_0x5241fe['threadId']};}function G(_0x35e836,_0x5eef5a,_0x3931b2){const _0x530153=_0x453e95;var _0x57ec99,_0x4c9c5e;if(((_0x4c9c5e=(_0x57ec99=_0x35e836==null?void 0x0:_0x35e836[_0x530153(0x161)])==null?void 0x0:_0x57ec99[_0x530153(0xfe)])!=null?_0x4c9c5e:0x0)>0x0){const _0x537257=(_0x15493b,_0x1e91bc)=>({'id':_0x15493b[_0x530153(0x14e)],'threadId':_0x15493b[_0x530153(0x16e)],'dT':f(_0x15493b[_0x530153(0x16f)]),'personId':_0x15493b[_0x530153(0x14f)],'resolved':_0x35e836['solved']===I[_0x530153(0x126)],'unitId':_0x5eef5a,'subUnitId':_0x3931b2,'text':JSON['parse'](_0x15493b['content']),'parentId':_0x1e91bc}),_0x442b54=_0x537257(_0x35e836['replies'][0x0]);return{..._0x442b54,'children':_0x35e836[_0x530153(0x161)]['slice'](0x1)[_0x530153(0x111)](_0x32ea36=>_0x537257(_0x32ea36,_0x442b54['id']))};}return null;}let p=class{constructor(_0x48a62c,_0x5dfb74,_0x2b0441){const _0x508db8=_0x453e95;this[_0x508db8(0x110)]=_0x48a62c,this[_0x508db8(0x114)]=_0x5dfb74,this[_0x508db8(0x167)]=_0x2b0441;}async[_0x453e95(0x160)](_0x1a7ae0){const _0x165cf0=_0x453e95;var _0x4e05f4,_0x3aeda5;const {parentId:_0x53f16d,unitId:_0x3cbd66,text:_0x159add,threadId:_0x2913c9}=_0x1a7ae0,_0x21390e=(_0x3aeda5=(_0x4e05f4=_0x159add[_0x165cf0(0x172)])==null?void 0x0:_0x4e05f4[_0x165cf0(0x159)](_0x3e6884=>_0x3e6884[_0x165cf0(0x11f)]===c[_0x165cf0(0x12c)][_0x165cf0(0x108)])[_0x165cf0(0x111)](_0x5e1694=>_0x5e1694[_0x165cf0(0x134)]))!=null?_0x3aeda5:[],_0x47b85a=JSON['stringify'](_0x159add),_0x1059d8=(await this[_0x165cf0(0x167)][_0x165cf0(0x13e)](_0x3cbd66))[_0x165cf0(0x146)]();if(_0x53f16d){const _0x221de5={'memberId':_0x1059d8,'unitId':_0x3cbd66,'content':_0x47b85a,'mention':_0x21390e,'threadId':_0x2913c9},_0x7ed29d=(await this['_httpService'][_0x165cf0(0x138)](_0x165cf0(0x13c)+_0x3cbd66+_0x165cf0(0x11c),{'body':_0x221de5}))[_0x165cf0(0x157)]['reply'];return{..._0x1a7ae0,'id':_0x7ed29d[_0x165cf0(0x14e)],'dT':c['dayjs'](+_0x7ed29d[_0x165cf0(0x16f)])[_0x165cf0(0x155)](_0x165cf0(0x16b)),'personId':_0x7ed29d[_0x165cf0(0x14f)]};}else{const _0x5c5ba8={'memberId':_0x1059d8,'unitId':_0x3cbd66,'content':_0x47b85a,'mention':_0x21390e},_0x219c83=await this[_0x165cf0(0x110)][_0x165cf0(0x138)]('/universer-api/comment/unit/'+_0x3cbd66+_0x165cf0(0x130),{'body':_0x5c5ba8});return Y(_0x219c83['body'][_0x165cf0(0x13a)],_0x1a7ae0);}}async[_0x453e95(0x103)](_0x586152){const _0x48acad=_0x453e95;var _0x12f76c,_0x4cb685;const {text:_0x51b985,unitId:_0x5bb092}=_0x586152,_0x2785c7=(_0x4cb685=(_0x12f76c=_0x51b985[_0x48acad(0x172)])==null?void 0x0:_0x12f76c['filter'](_0x1f0a6d=>_0x1f0a6d[_0x48acad(0x11f)]===c[_0x48acad(0x12c)]['COMMENT'])[_0x48acad(0x111)](_0x1c2278=>_0x1c2278['rangeId']))!=null?_0x4cb685:[],_0x5d81c4=JSON[_0x48acad(0xfc)](_0x51b985),_0x5c6085=_0x586152['threadId'],_0x5248c8=_0x586152['id'],_0x503d51={'memberId':(await this[_0x48acad(0x167)][_0x48acad(0x13e)](_0x5bb092))[_0x48acad(0x146)](),'unitId':_0x5bb092,'threadId':_0x5c6085,'mention':_0x2785c7,'content':_0x5d81c4,'replyId':_0x5248c8},_0x23968e=await this[_0x48acad(0x110)]['post'](_0x48acad(0x13c)+_0x5bb092+'/edit',{'body':_0x503d51});return!_0x23968e[_0x48acad(0x157)][_0x48acad(0x15d)]||_0x23968e[_0x48acad(0x157)][_0x48acad(0x15d)]['code']===0x1;}async[_0x453e95(0x13f)](_0x4b3371){const _0x40ce79=_0x453e95,{unitId:_0x2b4653}=_0x4b3371,_0x562cd0=_0x4b3371[_0x40ce79(0x16e)],_0x381120={'memberId':this['_userService']['getCurrentUser']()[_0x40ce79(0x14c)],'unitId':_0x2b4653,'threadId':_0x562cd0,'solved':_0x4b3371[_0x40ce79(0x135)]?I[_0x40ce79(0x126)]:I[_0x40ce79(0x15b)]},_0x5c37c5=await this[_0x40ce79(0x110)][_0x40ce79(0x138)]('/universer-api/comment/unit/'+_0x2b4653+_0x40ce79(0x168),{'body':_0x381120});return!_0x5c37c5[_0x40ce79(0x157)][_0x40ce79(0x15d)]||_0x5c37c5[_0x40ce79(0x157)][_0x40ce79(0x15d)]['code']===0x1;}async[_0x453e95(0x15c)](_0x2a71b3,_0x57d59b,_0x31a4c8,_0x1f6071){const _0x4a641f=_0x453e95,_0x1b27bc={'memberId':(await this[_0x4a641f(0x167)]['requireSession'](_0x2a71b3))[_0x4a641f(0x146)](),'threadId':_0x31a4c8,'replyId':_0x1f6071,'unitId':_0x2a71b3},_0x536b2a=await this['_httpService'][_0x4a641f(0x138)](_0x4a641f(0x13c)+_0x2a71b3+_0x4a641f(0x149),{'body':_0x1b27bc});return!_0x536b2a['body'][_0x4a641f(0x15d)]||_0x536b2a[_0x4a641f(0x157)][_0x4a641f(0x15d)][_0x4a641f(0x142)]===0x1;}async[_0x453e95(0x12b)](_0x410465,_0x3ca969,_0x20db7e){const _0x3fb251=_0x453e95,_0x18ef59={'unitId':_0x410465,'threadId':_0x20db7e},_0x5a784e=await this['_httpService']['post'](_0x3fb251(0x13c)+_0x410465+_0x3fb251(0x112),{'body':_0x18ef59}),_0x24d062=_0x20db7e['map'](_0x4d68c8=>G(_0x5a784e['body'][_0x3fb251(0x147)][_0x4d68c8],_0x410465,_0x3ca969))[_0x3fb251(0x159)](Boolean);return Object[_0x3fb251(0x113)](_0x5a784e[_0x3fb251(0x157)][_0x3fb251(0x162)])[_0x3fb251(0x148)](_0x17c4a1=>{const _0xb3bf9c=_0x3fb251;this[_0xb3bf9c(0x114)]['addUser'](_0x17c4a1);}),_0x24d062;}['saveCommentToSnapshot'](_0x2f048f){return{'id':_0x2f048f['id'],'threadId':_0x2f048f['threadId'],'ref':_0x2f048f['ref']};}};p=x([C(0x0,c[_0x453e95(0x129)](P[_0x453e95(0x120)])),C(0x1,c[_0x453e95(0x129)](c['UserManagerService'])),C(0x2,c[_0x453e95(0x129)](b[_0x453e95(0x128)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x382094,_0x224d6a,_0x54a1df,_0x2034e1)=>{const _0x972ddd=_0x453e95;for(var _0x16be95=_0x2034e1>0x1?void 0x0:_0x2034e1?H(_0x224d6a,_0x54a1df):_0x224d6a,_0x53b1b9=_0x382094[_0x972ddd(0xfe)]-0x1,_0x590172;_0x53b1b9>=0x0;_0x53b1b9--)(_0x590172=_0x382094[_0x53b1b9])&&(_0x16be95=_0x590172(_0x16be95)||_0x16be95);return _0x16be95;},y=(_0x53d2b9,_0x4360df)=>(_0xeef4ce,_0x4b6413)=>_0x4360df(_0xeef4ce,_0x4b6413,_0x53d2b9);let g=class extends c[_0x453e95(0x117)]{constructor(_0x3668b9,_0x459666){const _0x3d3639=_0x453e95;super(),this[_0x3d3639(0x11b)]=_0x3668b9,this['_threadCommentDataSource']=_0x459666,this[_0x3d3639(0x131)]();}[_0x453e95(0x131)](){const _0x119918=_0x453e95;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x119918(0x11b)][_0x119918(0x11e)]=!0x1;}};g=J([y(0x0,M[_0x453e95(0xfd)]),y(0x1,c[_0x453e95(0x129)](p))],g);function _0x10a4(_0x3909b5,_0x133ee2){_0x3909b5=_0x3909b5-0xf8;const _0x28c4d7=_0x28c4();let _0x10a47c=_0x28c4d7[_0x3909b5];return _0x10a47c;}var F=Object[_0x453e95(0x14d)],L=Object[_0x453e95(0x10b)],Z=(_0x3c8d1f,_0x205eca,_0x336d5f)=>_0x205eca in _0x3c8d1f?F(_0x3c8d1f,_0x205eca,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x336d5f}):_0x3c8d1f[_0x205eca]=_0x336d5f,W=(_0x33c42a,_0x309a1f,_0x2a17e5,_0x30f3a4)=>{const _0x3bc101=_0x453e95;for(var _0x436ede=_0x30f3a4>0x1?void 0x0:_0x30f3a4?L(_0x309a1f,_0x2a17e5):_0x309a1f,_0x3925b5=_0x33c42a[_0x3bc101(0xfe)]-0x1,_0x52a326;_0x3925b5>=0x0;_0x3925b5--)(_0x52a326=_0x33c42a[_0x3925b5])&&(_0x436ede=_0x52a326(_0x436ede)||_0x436ede);return _0x436ede;},O=(_0x2076f0,_0x546ac6)=>(_0x68fd6a,_0x18b656)=>_0x546ac6(_0x68fd6a,_0x18b656,_0x2076f0),N=(_0x2370de,_0xe966f9,_0xf02f83)=>Z(_0x2370de,typeof _0xe966f9!=_0x453e95(0x12a)?_0xe966f9+'':_0xe966f9,_0xf02f83);exports[_0x453e95(0x10c)]=class extends c[_0x453e95(0x127)]{constructor(_0x2c46f0=D,_0x2f219e,_0x558aec){const _0xacd4aa=_0x453e95;super(),this[_0xacd4aa(0xf8)]=_0x2c46f0,this['_injector']=_0x2f219e,this[_0xacd4aa(0x104)]=_0x558aec;const {..._0x214e07}=c[_0xacd4aa(0x124)]({},D,this['_config']);this['_configService']['setConfig'](q,_0x214e07);}[_0x453e95(0x10e)](){const _0x379e8d=_0x453e95;[[p],[g],[_]][_0x379e8d(0x148)](_0x1270a7=>{const _0x181581=_0x379e8d;this[_0x181581(0x144)][_0x181581(0x12d)](_0x1270a7);});}[_0x453e95(0x15a)](){const _0x53aa22=_0x453e95;this[_0x53aa22(0x144)][_0x53aa22(0x166)](g),this['_injector'][_0x53aa22(0x166)](_);}},N(exports[_0x453e95(0x10c)],_0x453e95(0x123),U),N(exports[_0x453e95(0x10c)],_0x453e95(0x16c),c[_0x453e95(0x16d)][_0x453e95(0xff)]),exports[_0x453e95(0x10c)]=W([c[_0x453e95(0x13b)](w[_0x453e95(0x151)],b[_0x453e95(0x14b)],T[_0x453e95(0x156)]),O(0x1,c[_0x453e95(0x129)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x453e95(0x10c)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1b5406=_0x18e2;(function(_0x233beb,_0x488ddc){const _0x34cc8d=_0x18e2,_0x34d4e3=_0x233beb();while(!![]){try{const _0x4ea703=-parseInt(_0x34cc8d(0x110))/0x1+parseInt(_0x34cc8d(0x12b))/0x2*(parseInt(_0x34cc8d(0xda))/0x3)+-parseInt(_0x34cc8d(0x12c))/0x4*(parseInt(_0x34cc8d(0x10a))/0x5)+parseInt(_0x34cc8d(0x10b))/0x6+-parseInt(_0x34cc8d(0x11f))/0x7*(-parseInt(_0x34cc8d(0xe3))/0x8)+parseInt(_0x34cc8d(0x126))/0x9*(-parseInt(_0x34cc8d(0xd7))/0xa)+parseInt(_0x34cc8d(0x138))/0xb;if(_0x4ea703===_0x488ddc)break;else _0x34d4e3['push'](_0x34d4e3['shift']());}catch(_0x4642c8){_0x34d4e3['push'](_0x34d4e3['shift']());}}}(_0x3e4e,0x90a8e));import{CommentService as _0x15fc73,CollaborationSessionService as _0x5d3e79,UniverCollaborationClientPlugin as _0x5bad45}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x49b678}from'@univerjs-pro/license';import{dayjs as _0x406bfa,UserManagerService as _0x1f4e32,Inject as _0x586d83,Injector as _0x1ecf46,Disposable as _0x5cea14,CustomRangeType as _0x3fcf68,UniverInstanceType as _0x5e18d6,DependentOn as _0xb7ae4b,IConfigService as _0x14eba5,Plugin as _0x1aeb3f,merge as _0x57c5e8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2f63eb}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4ad7f8,IThreadCommentDataSourceService as _0x313212}from'@univerjs/thread-comment';import{bufferTime as _0x2f4625}from'rxjs';import{HTTPService as _0x470d01}from'@univerjs/network';const W=_0x1b5406(0xd4);var I=(_0x3725ee=>(_0x3725ee[_0x3725ee[_0x1b5406(0x136)]=0x0]=_0x1b5406(0x136),_0x3725ee[_0x3725ee[_0x1b5406(0xf9)]=0x1]=_0x1b5406(0xf9),_0x3725ee[_0x3725ee[_0x1b5406(0xf0)]=-0x1]=_0x1b5406(0xf0),_0x3725ee))(I||{}),v=(_0x391de2=>(_0x391de2[_0x391de2['Unknown']=0x0]=_0x1b5406(0x106),_0x391de2[_0x391de2[_0x1b5406(0x123)]=0x1]=_0x1b5406(0x123),_0x391de2[_0x391de2[_0x1b5406(0xef)]=0x2]=_0x1b5406(0xef),_0x391de2[_0x391de2[_0x1b5406(0x131)]=0x3]='Edit',_0x391de2[_0x391de2[_0x1b5406(0x133)]=0x4]=_0x1b5406(0x133),_0x391de2[_0x391de2[_0x1b5406(0x122)]=0x5]=_0x1b5406(0x122),_0x391de2[_0x391de2[_0x1b5406(0xf0)]=-0x1]=_0x1b5406(0xf0),_0x391de2))(v||{});const y=_0x3e7f11=>_0x406bfa(new Date(+_0x3e7f11))['format'](_0x1b5406(0x101)),B=async(_0xc8bb5c,_0x39e530)=>{const _0x4fea06=_0x1b5406,_0x1d498b=_0xc8bb5c[_0x4fea06(0xfc)](_0x1f4e32),_0x4fc949=_0xc8bb5c[_0x4fea06(0xfc)](_0x470d01);_0x39e530[_0x4fea06(0xe6)](_0x22296c=>{const _0x8d2bcb=_0x4fea06;_0x1d498b[_0x8d2bcb(0xea)](_0x22296c)&&_0x39e530[_0x8d2bcb(0x109)](_0x22296c);}),_0x39e530[_0x4fea06(0xe0)]&&(await _0x4fc949[_0x4fea06(0xfc)](_0x4fea06(0x129),{'params':{'userIDs':[..._0x39e530]}}))[_0x4fea06(0x113)][_0x4fea06(0x11c)][_0x4fea06(0xe6)](_0x438b0a=>{_0x438b0a&&_0x1d498b['addUser'](_0x438b0a);});};var K=Object[_0x1b5406(0x11a)],V=(_0x363717,_0x29a8c7,_0x35840d,_0x1daeff)=>{const _0x557f45=_0x1b5406;for(var _0x2164d2=_0x1daeff>0x1?void 0x0:_0x1daeff?K(_0x29a8c7,_0x35840d):_0x29a8c7,_0x5b508d=_0x363717[_0x557f45(0x112)]-0x1,_0x2662bb;_0x5b508d>=0x0;_0x5b508d--)(_0x2662bb=_0x363717[_0x5b508d])&&(_0x2164d2=_0x2662bb(_0x2164d2)||_0x2164d2);return _0x2164d2;},p=(_0xe75e1e,_0x5f3f37)=>(_0x49c402,_0xd8dfaa)=>_0x5f3f37(_0x49c402,_0xd8dfaa,_0xe75e1e);let _=class extends _0x5cea14{constructor(_0x66d8fe,_0x15e4c9,_0x3a7103,_0x1190ae){const _0x5b0c8a=_0x1b5406;super(),this[_0x5b0c8a(0x127)]=_0x66d8fe,this[_0x5b0c8a(0xec)]=_0x15e4c9,this[_0x5b0c8a(0x102)]=_0x3a7103,this['_injector']=_0x1190ae,this[_0x5b0c8a(0xdc)](),this[_0x5b0c8a(0x139)]();}[_0x1b5406(0x139)](){const _0x3321e5=_0x1b5406;this[_0x3321e5(0xee)](this[_0x3321e5(0xec)][_0x3321e5(0x111)]['pipe'](_0x2f4625(0x10))[_0x3321e5(0x124)](_0x510577=>{const _0x9c4923=_0x3321e5,_0xebdc79=new Set();_0x510577[_0x9c4923(0xe6)](_0x1fcbd9=>{const _0x37f1fa=_0x9c4923;if(_0x1fcbd9['type']===_0x37f1fa(0x108)){const _0x300fa5=_0x1fcbd9[_0x37f1fa(0x103)][_0x37f1fa(0x128)];_0xebdc79['add'](_0x300fa5);}}),B(this[_0x9c4923(0x119)],_0xebdc79);}));}['_init'](){const _0x243838=_0x1b5406;this[_0x243838(0xee)](this[_0x243838(0x127)][_0x243838(0x111)][_0x243838(0x124)](async _0x38c17c=>{const _0x316e9c=_0x243838;var _0x4b9974,_0x225332,_0x3efdca,_0x42fe40;const _0xf9de9e=(_0x4b9974=this[_0x316e9c(0xec)]['getUnit'](_0x38c17c[_0x316e9c(0x118)])[_0x316e9c(0x117)](_0x5cf53e=>_0x5cf53e[_0x316e9c(0x10d)]===_0x38c17c[_0x316e9c(0x10d)]))==null?void 0x0:_0x4b9974[_0x316e9c(0x120)];if(!_0xf9de9e)return;const {unitId:_0x1add03,subUnitId:_0x19a264}=_0xf9de9e;switch(_0x38c17c[_0x316e9c(0x11d)]&&this[_0x316e9c(0x102)][_0x316e9c(0x132)](_0x38c17c[_0x316e9c(0x11d)]),_0x38c17c[_0x316e9c(0xd6)]){case v[_0x316e9c(0x123)]:break;case v['Reply']:{this[_0x316e9c(0xec)][_0x316e9c(0xd9)](_0x1add03,_0x19a264,{'unitId':_0x1add03,'subUnitId':_0x19a264,'ref':'','id':_0x38c17c[_0x316e9c(0xf6)],'dT':y(+_0x38c17c[_0x316e9c(0xf3)]),'threadId':_0x38c17c['threadId'],'personId':(_0x3efdca=(_0x225332=_0x38c17c[_0x316e9c(0x11d)])==null?void 0x0:_0x225332[_0x316e9c(0xe7)])!=null?_0x3efdca:_0x38c17c['userId'],'text':JSON[_0x316e9c(0xfa)](_0x38c17c[_0x316e9c(0x125)]),'parentId':_0xf9de9e['id']});break;}case v[_0x316e9c(0x133)]:{const _0x347434=this[_0x316e9c(0xec)]['getComment'](_0x1add03,_0x19a264,_0x38c17c[_0x316e9c(0xf6)]);_0x347434&&_0x347434[_0x316e9c(0xd8)]&&this[_0x316e9c(0xec)][_0x316e9c(0xf8)](_0x1add03,_0x19a264,_0x38c17c[_0x316e9c(0xf6)]);break;}case v[_0x316e9c(0x131)]:{this[_0x316e9c(0xec)]['updateComment'](_0x1add03,_0x19a264,{'commentId':_0x38c17c[_0x316e9c(0xf6)],'text':JSON[_0x316e9c(0xfa)](_0x38c17c[_0x316e9c(0x125)])});break;}case v[_0x316e9c(0x122)]:{const _0xe32ed8=(_0x42fe40=this['_threadCommentModel'][_0x316e9c(0xeb)](_0x38c17c[_0x316e9c(0x118)])[_0x316e9c(0x117)](_0x5e790b=>_0x5e790b['threadId']===_0x38c17c[_0x316e9c(0x10d)]))==null?void 0x0:_0x42fe40[_0x316e9c(0x120)];_0xe32ed8&&this[_0x316e9c(0xec)][_0x316e9c(0x100)](_0x1add03,_0x19a264,_0xe32ed8['id'],_0x38c17c[_0x316e9c(0x12f)]===I[_0x316e9c(0xf9)]);break;}}}));}};_=V([p(0x0,_0x586d83(_0x15fc73)),p(0x1,_0x586d83(_0x4ad7f8)),p(0x2,_0x586d83(_0x1f4e32)),p(0x3,_0x586d83(_0x1ecf46))],_);const z=_0x1b5406(0xde),O={};var k=Object[_0x1b5406(0x11a)],Q=(_0x2919d5,_0x24ec4c,_0x182952,_0x4e05af)=>{const _0x1fbb41=_0x1b5406;for(var _0x69bb8c=_0x4e05af>0x1?void 0x0:_0x4e05af?k(_0x24ec4c,_0x182952):_0x24ec4c,_0x13a448=_0x2919d5[_0x1fbb41(0x112)]-0x1,_0x2746c0;_0x13a448>=0x0;_0x13a448--)(_0x2746c0=_0x2919d5[_0x13a448])&&(_0x69bb8c=_0x2746c0(_0x69bb8c)||_0x69bb8c);return _0x69bb8c;},b=(_0x3e66b5,_0xce4029)=>(_0x3fea9c,_0x52fd53)=>_0xce4029(_0x3fea9c,_0x52fd53,_0x3e66b5);function X(_0x270f1a,_0x5212d8){const _0x2ee303=_0x1b5406,_0x590ed6=_0x270f1a[_0x2ee303(0x116)][0x0];return{..._0x5212d8,'id':_0x590ed6[_0x2ee303(0xf6)],'resolved':_0x270f1a['solved']===0x1,'dT':y(_0x590ed6['createTimestamp']),'personId':_0x590ed6[_0x2ee303(0xf7)],'threadId':_0x590ed6[_0x2ee303(0x10d)]};}function ee(_0x558d7c,_0x45e9e2,_0x8b898b){const _0x3c3f07=_0x1b5406;var _0x511cb6,_0xc79b;if(((_0xc79b=(_0x511cb6=_0x558d7c==null?void 0x0:_0x558d7c[_0x3c3f07(0x116)])==null?void 0x0:_0x511cb6[_0x3c3f07(0x112)])!=null?_0xc79b:0x0)>0x0){const _0x445141=(_0xfd3c6c,_0x5473b0)=>({'id':_0xfd3c6c[_0x3c3f07(0xf6)],'threadId':_0xfd3c6c[_0x3c3f07(0x10d)],'dT':y(_0xfd3c6c[_0x3c3f07(0xf3)]),'personId':_0xfd3c6c[_0x3c3f07(0xf7)],'resolved':_0x558d7c[_0x3c3f07(0x12f)]===I['Solved'],'unitId':_0x45e9e2,'subUnitId':_0x8b898b,'text':JSON[_0x3c3f07(0xfa)](_0xfd3c6c[_0x3c3f07(0x125)]),'parentId':_0x5473b0}),_0x5339b7=_0x445141(_0x558d7c[_0x3c3f07(0x116)][0x0]);return{..._0x5339b7,'children':_0x558d7c['replies'][_0x3c3f07(0xfb)](0x1)['map'](_0x1fc8a0=>_0x445141(_0x1fc8a0,_0x5339b7['id']))};}return null;}let S=class{constructor(_0x4a88c4,_0x24c375,_0x360582){const _0x5ebc5b=_0x1b5406;this[_0x5ebc5b(0x11b)]=_0x4a88c4,this[_0x5ebc5b(0x102)]=_0x24c375,this[_0x5ebc5b(0xf1)]=_0x360582;}async[_0x1b5406(0xd9)](_0x1fb0e7){const _0x14596f=_0x1b5406;var _0x1edfdb,_0x1698ba;const {parentId:_0x58288b,unitId:_0x1210f3,text:_0x18f7be,threadId:_0x478c44}=_0x1fb0e7,_0xa35879=(_0x1698ba=(_0x1edfdb=_0x18f7be['customRanges'])==null?void 0x0:_0x1edfdb['filter'](_0x4d3bae=>_0x4d3bae[_0x14596f(0xe4)]===_0x3fcf68[_0x14596f(0x135)])[_0x14596f(0xfd)](_0x4c2791=>_0x4c2791[_0x14596f(0x10f)]))!=null?_0x1698ba:[],_0x3c4c20=JSON['stringify'](_0x18f7be),_0x6faecb=(await this[_0x14596f(0xf1)][_0x14596f(0x10e)](_0x1210f3))[_0x14596f(0x107)]();if(_0x58288b){const _0x22c659={'memberId':_0x6faecb,'unitId':_0x1210f3,'content':_0x3c4c20,'mention':_0xa35879,'threadId':_0x478c44},_0x43acbd=(await this['_httpService']['post'](_0x14596f(0x130)+_0x1210f3+_0x14596f(0x105),{'body':_0x22c659}))[_0x14596f(0x113)]['reply'];return{..._0x1fb0e7,'id':_0x43acbd[_0x14596f(0xf6)],'dT':_0x406bfa(+_0x43acbd[_0x14596f(0xf3)])[_0x14596f(0x115)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x43acbd[_0x14596f(0xf7)]};}else{const _0x3c1eb0={'memberId':_0x6faecb,'unitId':_0x1210f3,'content':_0x3c4c20,'mention':_0xa35879},_0x183bc3=await this[_0x14596f(0x11b)][_0x14596f(0xf2)](_0x14596f(0x130)+_0x1210f3+_0x14596f(0xf4),{'body':_0x3c1eb0});return X(_0x183bc3[_0x14596f(0x113)][_0x14596f(0xdd)],_0x1fb0e7);}}async[_0x1b5406(0x12e)](_0x4dd125){const _0x304818=_0x1b5406;var _0xe1b8b7,_0x33740a;const {text:_0x18c549,unitId:_0xcfb341}=_0x4dd125,_0x5efbc3=(_0x33740a=(_0xe1b8b7=_0x18c549[_0x304818(0xe5)])==null?void 0x0:_0xe1b8b7[_0x304818(0xe1)](_0x27d4b0=>_0x27d4b0[_0x304818(0xe4)]===_0x3fcf68['COMMENT'])['map'](_0x3ba5b0=>_0x3ba5b0[_0x304818(0x10f)]))!=null?_0x33740a:[],_0x552f43=JSON['stringify'](_0x18c549),_0xd665e3=_0x4dd125[_0x304818(0x10d)],_0x3b0970=_0x4dd125['id'],_0x11b202={'memberId':(await this[_0x304818(0xf1)][_0x304818(0x10e)](_0xcfb341))[_0x304818(0x107)](),'unitId':_0xcfb341,'threadId':_0xd665e3,'mention':_0x5efbc3,'content':_0x552f43,'replyId':_0x3b0970},_0xf9a3b0=await this[_0x304818(0x11b)][_0x304818(0xf2)]('/universer-api/comment/unit/'+_0xcfb341+_0x304818(0xed),{'body':_0x11b202});return!_0xf9a3b0[_0x304818(0x113)][_0x304818(0xe2)]||_0xf9a3b0['body']['error'][_0x304818(0xff)]===0x1;}async['resolveComment'](_0x1275e3){const _0x354d53=_0x1b5406,{unitId:_0x136af7}=_0x1275e3,_0x464ab2=_0x1275e3['threadId'],_0x11e476={'memberId':this[_0x354d53(0x102)]['getCurrentUser']()[_0x354d53(0xe7)],'unitId':_0x136af7,'threadId':_0x464ab2,'solved':_0x1275e3[_0x354d53(0x12d)]?I[_0x354d53(0xf9)]:I['OpenOrReOpen']},_0x2b4554=await this[_0x354d53(0x11b)][_0x354d53(0xf2)](_0x354d53(0x130)+_0x136af7+_0x354d53(0xf5),{'body':_0x11e476});return!_0x2b4554[_0x354d53(0x113)][_0x354d53(0xe2)]||_0x2b4554[_0x354d53(0x113)]['error'][_0x354d53(0xff)]===0x1;}async[_0x1b5406(0xf8)](_0xfda7ad,_0x522ac5,_0x239cff,_0x2e480a){const _0x276ac7=_0x1b5406,_0x4e75e1={'memberId':(await this['_sessionService']['requireSession'](_0xfda7ad))[_0x276ac7(0x107)](),'threadId':_0x239cff,'replyId':_0x2e480a,'unitId':_0xfda7ad},_0x5c7e5d=await this['_httpService'][_0x276ac7(0xf2)](_0x276ac7(0x130)+_0xfda7ad+_0x276ac7(0x11e),{'body':_0x4e75e1});return!_0x5c7e5d[_0x276ac7(0x113)]['error']||_0x5c7e5d['body'][_0x276ac7(0xe2)][_0x276ac7(0xff)]===0x1;}async[_0x1b5406(0x10c)](_0xda3720,_0x2125b4,_0x431ae3){const _0x1aea5f=_0x1b5406,_0x29a89c={'unitId':_0xda3720,'threadId':_0x431ae3},_0x533cc3=await this[_0x1aea5f(0x11b)]['post'](_0x1aea5f(0x130)+_0xda3720+_0x1aea5f(0xe8),{'body':_0x29a89c}),_0x46589f=_0x431ae3[_0x1aea5f(0xfd)](_0x50301b=>ee(_0x533cc3[_0x1aea5f(0x113)][_0x1aea5f(0x12a)][_0x50301b],_0xda3720,_0x2125b4))[_0x1aea5f(0xe1)](Boolean);return Object[_0x1aea5f(0xfe)](_0x533cc3[_0x1aea5f(0x113)][_0x1aea5f(0x11c)])[_0x1aea5f(0xe6)](_0x44614a=>{const _0x1cc9cd=_0x1aea5f;this[_0x1cc9cd(0x102)]['addUser'](_0x44614a);}),_0x46589f;}['saveCommentToSnapshot'](_0x57f1eb){const _0xb53a2=_0x1b5406;return{'id':_0x57f1eb['id'],'threadId':_0x57f1eb[_0xb53a2(0x10d)],'ref':_0x57f1eb['ref']};}};S=Q([b(0x0,_0x586d83(_0x470d01)),b(0x1,_0x586d83(_0x1f4e32)),b(0x2,_0x586d83(_0x5d3e79))],S);function _0x18e2(_0x4de6a,_0x55e864){_0x4de6a=_0x4de6a-0xd4;const _0x3e4eec=_0x3e4e();let _0x18e2ac=_0x3e4eec[_0x4de6a];return _0x18e2ac;}var re=Object[_0x1b5406(0x11a)],te=(_0x45c44a,_0x2b99f5,_0x579b52,_0x1e3d45)=>{const _0x277717=_0x1b5406;for(var _0x4a1cc3=_0x1e3d45>0x1?void 0x0:_0x1e3d45?re(_0x2b99f5,_0x579b52):_0x2b99f5,_0x5d89f2=_0x45c44a[_0x277717(0x112)]-0x1,_0x3bad21;_0x5d89f2>=0x0;_0x5d89f2--)(_0x3bad21=_0x45c44a[_0x5d89f2])&&(_0x4a1cc3=_0x3bad21(_0x4a1cc3)||_0x4a1cc3);return _0x4a1cc3;},M=(_0x2a5e7f,_0x3aae73)=>(_0x4e732e,_0x4ede68)=>_0x3aae73(_0x4e732e,_0x4ede68,_0x2a5e7f);function _0x3e4e(){const _0x13e357=['/reply','Unknown','getMemberID','add','delete','320EuPzmk','4036248oXdEKR','listComments','threadId','requireSession','rangeId','1089589KqsCCr','commentUpdate$','length','body','symbol','format','replies','find','unitId','_injector','getOwnPropertyDescriptor','_httpService','users','user','/delete','525edRnwi','root','_threadCommentDataSourceService','Solve','Add','subscribe','content','5121YsUYKL','_commentService','personId','/universer-api/user/list','comments','258pUqroZ','7244ppUTyL','resolved','updateComment','solved','/universer-api/comment/unit/','Edit','addUser','Delete','UNIVER_UNKNOWN','COMMENT','OpenOrReOpen','setConfig','3099580IzMCyH','_initUserSync','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','type','7530LfaHSp','parentId','addComment','11691avSzPw','_threadCommentDataSource','_init','comment','thread-comment-data-source.config','_initDataSource','size','filter','error','82056hWMTZb','rangeType','customRanges','forEach','userID','/list','_configService','getUser','getUnit','_threadCommentModel','/edit','disposeWithMe','Reply','UNRECOGNIZED','_sessionService','post','createTimestamp','/add','/solved','replyId','userId','deleteComment','Solved','parse','slice','get','map','values','code','resolveComment','YYYY/MM/DD\x20HH:mm','_userService','payload','_config'];_0x3e4e=function(){return _0x13e357;};return _0x3e4e();}let f=class extends _0x5cea14{constructor(_0x197beb,_0x4bec77){const _0xd2a1b4=_0x1b5406;super(),this[_0xd2a1b4(0x121)]=_0x197beb,this[_0xd2a1b4(0xdb)]=_0x4bec77,this[_0xd2a1b4(0xdf)]();}[_0x1b5406(0xdf)](){const _0x30188d=_0x1b5406;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x30188d(0x121)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x313212),M(0x1,_0x586d83(S))],f);var se=Object[_0x1b5406(0xd5)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x35bb38,_0x3b17a0,_0x3dc517)=>_0x3b17a0 in _0x35bb38?se(_0x35bb38,_0x3b17a0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3dc517}):_0x35bb38[_0x3b17a0]=_0x3dc517,ie=(_0x554245,_0x15d35b,_0x14aabb,_0xa51bd1)=>{const _0x1fcd48=_0x1b5406;for(var _0x582c76=_0xa51bd1>0x1?void 0x0:_0xa51bd1?oe(_0x15d35b,_0x14aabb):_0x15d35b,_0x5c9007=_0x554245[_0x1fcd48(0x112)]-0x1,_0x1217e5;_0x5c9007>=0x0;_0x5c9007--)(_0x1217e5=_0x554245[_0x5c9007])&&(_0x582c76=_0x1217e5(_0x582c76)||_0x582c76);return _0x582c76;},N=(_0x397e4f,_0x167e4a)=>(_0x2bd8e8,_0x255d06)=>_0x167e4a(_0x2bd8e8,_0x255d06,_0x397e4f),$=(_0x234f8f,_0x5bc48a,_0xa57e39)=>ne(_0x234f8f,typeof _0x5bc48a!=_0x1b5406(0x114)?_0x5bc48a+'':_0x5bc48a,_0xa57e39);let g=class extends _0x1aeb3f{constructor(_0x4572fa=O,_0x209452,_0x580de0){const _0x124164=_0x1b5406;super(),this[_0x124164(0x104)]=_0x4572fa,this['_injector']=_0x209452,this[_0x124164(0xe9)]=_0x580de0;const {..._0x374e2f}=_0x57c5e8({},O,this[_0x124164(0x104)]);this[_0x124164(0xe9)][_0x124164(0x137)](z,_0x374e2f);}['onStarting'](){const _0x1b5a8b=_0x1b5406;[[S],[f],[_]][_0x1b5a8b(0xe6)](_0x394cc2=>{const _0x478beb=_0x1b5a8b;this[_0x478beb(0x119)][_0x478beb(0x108)](_0x394cc2);});}['onReady'](){const _0x1ab5a8=_0x1b5406;this['_injector'][_0x1ab5a8(0xfc)](f),this[_0x1ab5a8(0x119)][_0x1ab5a8(0xfc)](_);}};$(g,'pluginName',W),$(g,_0x1b5406(0xd6),_0x5e18d6[_0x1b5406(0x134)]),g=ie([_0xb7ae4b(_0x2f63eb,_0x5bad45,_0x49b678),N(0x1,_0x586d83(_0x1ecf46)),N(0x2,_0x14eba5)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3b7018=_0x57ef;(function(_0x3c658f,_0x2c32fc){const _0x3f905a=_0x57ef,_0x5193d1=_0x3c658f();while(!![]){try{const _0x1363c2=parseInt(_0x3f905a(0x1ab))/0x1+-parseInt(_0x3f905a(0x183))/0x2+parseInt(_0x3f905a(0x1c6))/0x3*(-parseInt(_0x3f905a(0x166))/0x4)+parseInt(_0x3f905a(0x175))/0x5*(-parseInt(_0x3f905a(0x1bd))/0x6)+-parseInt(_0x3f905a(0x190))/0x7+-parseInt(_0x3f905a(0x1ad))/0x8*(-parseInt(_0x3f905a(0x170))/0x9)+parseInt(_0x3f905a(0x17f))/0xa;if(_0x1363c2===_0x2c32fc)break;else _0x5193d1['push'](_0x5193d1['shift']());}catch(_0x78123b){_0x5193d1['push'](_0x5193d1['shift']());}}}(_0x1e99,0x2c2e4));import{CommentService as _0x4ccc47,CollaborationSessionService as _0x2d6b1a,UniverCollaborationClientPlugin as _0x4be6b4}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2ee970}from'@univerjs-pro/license';import{dayjs as _0xd36bf1,UserManagerService as _0x198632,Inject as _0x1e2688,Injector as _0x343e65,Disposable as _0x521bde,CustomRangeType as _0x52a6bd,UniverInstanceType as _0x436a4f,DependentOn as _0x3b1e4a,Plugin as _0x1b255f,merge as _0x5440b3,IConfigService as _0x3c3e28}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3fa00c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xabae3d,IThreadCommentDataSourceService as _0x157173}from'@univerjs/thread-comment';import{bufferTime as _0x266770}from'rxjs';import{HTTPService as _0x49f23c}from'@univerjs/network';const W=_0x3b7018(0x1c7);var I=(_0x4d3302=>(_0x4d3302[_0x4d3302[_0x3b7018(0x1b5)]=0x0]=_0x3b7018(0x1b5),_0x4d3302[_0x4d3302[_0x3b7018(0x1a9)]=0x1]=_0x3b7018(0x1a9),_0x4d3302[_0x4d3302['UNRECOGNIZED']=-0x1]=_0x3b7018(0x18f),_0x4d3302))(I||{}),v=(_0x4c6901=>(_0x4c6901[_0x4c6901[_0x3b7018(0x1bc)]=0x0]=_0x3b7018(0x1bc),_0x4c6901[_0x4c6901[_0x3b7018(0x1a6)]=0x1]=_0x3b7018(0x1a6),_0x4c6901[_0x4c6901['Reply']=0x2]=_0x3b7018(0x1c0),_0x4c6901[_0x4c6901['Edit']=0x3]=_0x3b7018(0x179),_0x4c6901[_0x4c6901[_0x3b7018(0x1bf)]=0x4]=_0x3b7018(0x1bf),_0x4c6901[_0x4c6901['Solve']=0x5]=_0x3b7018(0x1ae),_0x4c6901[_0x4c6901[_0x3b7018(0x18f)]=-0x1]='UNRECOGNIZED',_0x4c6901))(v||{});const y=_0x1850d6=>_0xd36bf1(new Date(+_0x1850d6))[_0x3b7018(0x176)](_0x3b7018(0x180)),B=async(_0xaf1706,_0x56292e)=>{const _0x1a98b3=_0x3b7018,_0x296c98=_0xaf1706['get'](_0x198632),_0x40606d=_0xaf1706['get'](_0x49f23c);_0x56292e[_0x1a98b3(0x193)](_0x3b6bcf=>{const _0x35e101=_0x1a98b3;_0x296c98[_0x35e101(0x17b)](_0x3b6bcf)&&_0x56292e['delete'](_0x3b6bcf);}),_0x56292e['size']&&(await _0x40606d[_0x1a98b3(0x1b7)](_0x1a98b3(0x167),{'params':{'userIDs':[..._0x56292e]}}))['body']['users'][_0x1a98b3(0x193)](_0x478897=>{const _0x59026d=_0x1a98b3;_0x478897&&_0x296c98[_0x59026d(0x1a8)](_0x478897);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2652bd,_0x17c455,_0x42e366,_0x42a593)=>{const _0x1b037e=_0x3b7018;for(var _0x21d63b=_0x42a593>0x1?void 0x0:_0x42a593?K(_0x17c455,_0x42e366):_0x17c455,_0x14e9e8=_0x2652bd[_0x1b037e(0x18a)]-0x1,_0x3f15fe;_0x14e9e8>=0x0;_0x14e9e8--)(_0x3f15fe=_0x2652bd[_0x14e9e8])&&(_0x21d63b=_0x3f15fe(_0x21d63b)||_0x21d63b);return _0x21d63b;},p=(_0x5164be,_0x59dfa9)=>(_0x28b860,_0x590a19)=>_0x59dfa9(_0x28b860,_0x590a19,_0x5164be);let _=class extends _0x521bde{constructor(_0x4fc488,_0x483e10,_0x3e6ae3,_0x40f443){const _0x4a898b=_0x3b7018;super(),this[_0x4a898b(0x1af)]=_0x4fc488,this[_0x4a898b(0x185)]=_0x483e10,this[_0x4a898b(0x19a)]=_0x3e6ae3,this['_injector']=_0x40f443,this['_init'](),this[_0x4a898b(0x184)]();}[_0x3b7018(0x184)](){const _0x448bc9=_0x3b7018;this[_0x448bc9(0x1c4)](this['_threadCommentModel'][_0x448bc9(0x168)]['pipe'](_0x266770(0x10))[_0x448bc9(0x189)](_0x205e73=>{const _0x1b0920=_0x448bc9,_0x2ac0bf=new Set();_0x205e73['forEach'](_0x2bc743=>{const _0x5d8ac8=_0x57ef;if(_0x2bc743['type']===_0x5d8ac8(0x1a1)){const _0x2e1197=_0x2bc743[_0x5d8ac8(0x17e)][_0x5d8ac8(0x18c)];_0x2ac0bf['add'](_0x2e1197);}}),B(this[_0x1b0920(0x1ca)],_0x2ac0bf);}));}[_0x3b7018(0x1a4)](){const _0x570be0=_0x3b7018;this['disposeWithMe'](this[_0x570be0(0x1af)]['commentUpdate$']['subscribe'](async _0x47253f=>{const _0x1060e0=_0x570be0;var _0x304254,_0x1b9307,_0x4bf8ce,_0x366b8c;const _0x27cd59=(_0x304254=this['_threadCommentModel'][_0x1060e0(0x188)](_0x47253f['unitId'])['find'](_0xc49e73=>_0xc49e73[_0x1060e0(0x1c3)]===_0x47253f[_0x1060e0(0x1c3)]))==null?void 0x0:_0x304254['root'];if(!_0x27cd59)return;const {unitId:_0x3d7ab1,subUnitId:_0x51fe0d}=_0x27cd59;switch(_0x47253f[_0x1060e0(0x1b3)]&&this[_0x1060e0(0x19a)][_0x1060e0(0x1a8)](_0x47253f[_0x1060e0(0x1b3)]),_0x47253f[_0x1060e0(0x198)]){case v[_0x1060e0(0x1a6)]:break;case v[_0x1060e0(0x1c0)]:{this[_0x1060e0(0x185)][_0x1060e0(0x1ba)](_0x3d7ab1,_0x51fe0d,{'unitId':_0x3d7ab1,'subUnitId':_0x51fe0d,'ref':'','id':_0x47253f[_0x1060e0(0x186)],'dT':y(+_0x47253f[_0x1060e0(0x19f)]),'threadId':_0x47253f[_0x1060e0(0x1c3)],'personId':(_0x4bf8ce=(_0x1b9307=_0x47253f[_0x1060e0(0x1b3)])==null?void 0x0:_0x1b9307['userID'])!=null?_0x4bf8ce:_0x47253f[_0x1060e0(0x197)],'text':JSON[_0x1060e0(0x181)](_0x47253f[_0x1060e0(0x19d)]),'parentId':_0x27cd59['id']});break;}case v[_0x1060e0(0x1bf)]:{const _0x436c3b=this['_threadCommentModel'][_0x1060e0(0x16a)](_0x3d7ab1,_0x51fe0d,_0x47253f[_0x1060e0(0x186)]);_0x436c3b&&_0x436c3b[_0x1060e0(0x174)]&&this[_0x1060e0(0x185)][_0x1060e0(0x187)](_0x3d7ab1,_0x51fe0d,_0x47253f[_0x1060e0(0x186)]);break;}case v[_0x1060e0(0x179)]:{this[_0x1060e0(0x185)][_0x1060e0(0x182)](_0x3d7ab1,_0x51fe0d,{'commentId':_0x47253f['replyId'],'text':JSON[_0x1060e0(0x181)](_0x47253f[_0x1060e0(0x19d)])});break;}case v['Solve']:{const _0xd6bbd6=(_0x366b8c=this[_0x1060e0(0x185)][_0x1060e0(0x188)](_0x47253f[_0x1060e0(0x19e)])[_0x1060e0(0x191)](_0x1fd070=>_0x1fd070[_0x1060e0(0x1c3)]===_0x47253f[_0x1060e0(0x1c3)]))==null?void 0x0:_0x366b8c['root'];_0xd6bbd6&&this['_threadCommentModel']['resolveComment'](_0x3d7ab1,_0x51fe0d,_0xd6bbd6['id'],_0x47253f[_0x1060e0(0x196)]===I[_0x1060e0(0x1a9)]);break;}}}));}};_=V([p(0x0,_0x1e2688(_0x4ccc47)),p(0x1,_0x1e2688(_0xabae3d)),p(0x2,_0x1e2688(_0x198632)),p(0x3,_0x1e2688(_0x343e65))],_);const z=_0x3b7018(0x16f),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x29c617,_0x4a43c4,_0x1e5ada,_0x267b9a)=>{for(var _0x2e612d=_0x267b9a>0x1?void 0x0:_0x267b9a?k(_0x4a43c4,_0x1e5ada):_0x4a43c4,_0x25f844=_0x29c617['length']-0x1,_0x3dd673;_0x25f844>=0x0;_0x25f844--)(_0x3dd673=_0x29c617[_0x25f844])&&(_0x2e612d=_0x3dd673(_0x2e612d)||_0x2e612d);return _0x2e612d;},b=(_0x3e6107,_0x44bd5e)=>(_0x165728,_0xfa3833)=>_0x44bd5e(_0x165728,_0xfa3833,_0x3e6107);function X(_0x329b44,_0x20fc08){const _0x5ddf7e=_0x3b7018,_0x383f59=_0x329b44[_0x5ddf7e(0x194)][0x0];return{..._0x20fc08,'id':_0x383f59[_0x5ddf7e(0x186)],'resolved':_0x329b44['solved']===0x1,'dT':y(_0x383f59[_0x5ddf7e(0x19f)]),'personId':_0x383f59[_0x5ddf7e(0x197)],'threadId':_0x383f59[_0x5ddf7e(0x1c3)]};}function ee(_0x27013a,_0x377687,_0x42ceb9){const _0x193df6=_0x3b7018;var _0x35c8b4,_0x46e8b5;if(((_0x46e8b5=(_0x35c8b4=_0x27013a==null?void 0x0:_0x27013a[_0x193df6(0x194)])==null?void 0x0:_0x35c8b4[_0x193df6(0x18a)])!=null?_0x46e8b5:0x0)>0x0){const _0x14120a=(_0x33b0a8,_0x1e2838)=>({'id':_0x33b0a8[_0x193df6(0x186)],'threadId':_0x33b0a8[_0x193df6(0x1c3)],'dT':y(_0x33b0a8[_0x193df6(0x19f)]),'personId':_0x33b0a8[_0x193df6(0x197)],'resolved':_0x27013a[_0x193df6(0x196)]===I[_0x193df6(0x1a9)],'unitId':_0x377687,'subUnitId':_0x42ceb9,'text':JSON['parse'](_0x33b0a8['content']),'parentId':_0x1e2838}),_0x374ebb=_0x14120a(_0x27013a['replies'][0x0]);return{..._0x374ebb,'children':_0x27013a[_0x193df6(0x194)][_0x193df6(0x19b)](0x1)[_0x193df6(0x18e)](_0x2b1444=>_0x14120a(_0x2b1444,_0x374ebb['id']))};}return null;}function _0x57ef(_0x3428bd,_0x5bd175){_0x3428bd=_0x3428bd-0x166;const _0x1e99b9=_0x1e99();let _0x57ef28=_0x1e99b9[_0x3428bd];return _0x57ef28;}let S=class{constructor(_0x47ff70,_0x3a6a9a,_0x4d6bc7){const _0x4d79d3=_0x3b7018;this[_0x4d79d3(0x1b1)]=_0x47ff70,this[_0x4d79d3(0x19a)]=_0x3a6a9a,this['_sessionService']=_0x4d6bc7;}async[_0x3b7018(0x1ba)](_0x360035){const _0x4994b8=_0x3b7018;var _0x48dd8d,_0x15835f;const {parentId:_0x11996b,unitId:_0x112aa1,text:_0x1cb8b6,threadId:_0x1cca1d}=_0x360035,_0x2d0429=(_0x15835f=(_0x48dd8d=_0x1cb8b6['customRanges'])==null?void 0x0:_0x48dd8d[_0x4994b8(0x1be)](_0x2cf149=>_0x2cf149[_0x4994b8(0x17d)]===_0x52a6bd[_0x4994b8(0x1a7)])[_0x4994b8(0x18e)](_0x30e60b=>_0x30e60b[_0x4994b8(0x171)]))!=null?_0x15835f:[],_0x40dc8f=JSON[_0x4994b8(0x1b6)](_0x1cb8b6),_0x40a905=(await this[_0x4994b8(0x1b4)][_0x4994b8(0x1a0)](_0x112aa1))[_0x4994b8(0x1a5)]();if(_0x11996b){const _0x141eb1={'memberId':_0x40a905,'unitId':_0x112aa1,'content':_0x40dc8f,'mention':_0x2d0429,'threadId':_0x1cca1d},_0x171266=(await this[_0x4994b8(0x1b1)][_0x4994b8(0x1bb)](_0x4994b8(0x18b)+_0x112aa1+_0x4994b8(0x1c1),{'body':_0x141eb1}))['body'][_0x4994b8(0x1c8)];return{..._0x360035,'id':_0x171266[_0x4994b8(0x186)],'dT':_0xd36bf1(+_0x171266[_0x4994b8(0x19f)])[_0x4994b8(0x176)](_0x4994b8(0x180)),'personId':_0x171266['userId']};}else{const _0x5a9589={'memberId':_0x40a905,'unitId':_0x112aa1,'content':_0x40dc8f,'mention':_0x2d0429},_0x236e37=await this['_httpService'][_0x4994b8(0x1bb)]('/universer-api/comment/unit/'+_0x112aa1+'/add',{'body':_0x5a9589});return X(_0x236e37[_0x4994b8(0x1b2)]['comment'],_0x360035);}}async['updateComment'](_0x1b8594){const _0x83971b=_0x3b7018;var _0x4e91d8,_0x17a3bf;const {text:_0x26d550,unitId:_0x2bb8cd}=_0x1b8594,_0x5f2821=(_0x17a3bf=(_0x4e91d8=_0x26d550[_0x83971b(0x1b0)])==null?void 0x0:_0x4e91d8[_0x83971b(0x1be)](_0x240f55=>_0x240f55[_0x83971b(0x17d)]===_0x52a6bd['COMMENT'])['map'](_0x3e9018=>_0x3e9018[_0x83971b(0x171)]))!=null?_0x17a3bf:[],_0x3f1637=JSON[_0x83971b(0x1b6)](_0x26d550),_0x57102e=_0x1b8594[_0x83971b(0x1c3)],_0xf670dc=_0x1b8594['id'],_0x54a39e={'memberId':(await this[_0x83971b(0x1b4)][_0x83971b(0x1a0)](_0x2bb8cd))[_0x83971b(0x1a5)](),'unitId':_0x2bb8cd,'threadId':_0x57102e,'mention':_0x5f2821,'content':_0x3f1637,'replyId':_0xf670dc},_0x1286b0=await this['_httpService'][_0x83971b(0x1bb)](_0x83971b(0x18b)+_0x2bb8cd+_0x83971b(0x16c),{'body':_0x54a39e});return!_0x1286b0[_0x83971b(0x1b2)][_0x83971b(0x1c5)]||_0x1286b0['body'][_0x83971b(0x1c5)][_0x83971b(0x195)]===0x1;}async[_0x3b7018(0x1c2)](_0x3e6789){const _0x2c7750=_0x3b7018,{unitId:_0x28ac41}=_0x3e6789,_0x10aeea=_0x3e6789[_0x2c7750(0x1c3)],_0x3efd36={'memberId':this['_userService'][_0x2c7750(0x173)]()[_0x2c7750(0x1c9)],'unitId':_0x28ac41,'threadId':_0x10aeea,'solved':_0x3e6789['resolved']?I[_0x2c7750(0x1a9)]:I[_0x2c7750(0x1b5)]},_0x22ec8b=await this['_httpService'][_0x2c7750(0x1bb)](_0x2c7750(0x18b)+_0x28ac41+_0x2c7750(0x192),{'body':_0x3efd36});return!_0x22ec8b[_0x2c7750(0x1b2)][_0x2c7750(0x1c5)]||_0x22ec8b[_0x2c7750(0x1b2)][_0x2c7750(0x1c5)][_0x2c7750(0x195)]===0x1;}async['deleteComment'](_0x48218c,_0x4009a6,_0x43452f,_0x3a2d55){const _0x4ef835=_0x3b7018,_0x36cceb={'memberId':(await this[_0x4ef835(0x1b4)]['requireSession'](_0x48218c))[_0x4ef835(0x1a5)](),'threadId':_0x43452f,'replyId':_0x3a2d55,'unitId':_0x48218c},_0x2ce473=await this[_0x4ef835(0x1b1)][_0x4ef835(0x1bb)](_0x4ef835(0x18b)+_0x48218c+_0x4ef835(0x18d),{'body':_0x36cceb});return!_0x2ce473[_0x4ef835(0x1b2)]['error']||_0x2ce473[_0x4ef835(0x1b2)][_0x4ef835(0x1c5)][_0x4ef835(0x195)]===0x1;}async[_0x3b7018(0x17c)](_0x121446,_0x1fc548,_0x20db72){const _0x43ea20=_0x3b7018,_0x58698d={'unitId':_0x121446,'threadId':_0x20db72},_0xb75efe=await this[_0x43ea20(0x1b1)]['post'](_0x43ea20(0x18b)+_0x121446+_0x43ea20(0x1b8),{'body':_0x58698d}),_0x395771=_0x20db72['map'](_0x4449dc=>ee(_0xb75efe['body'][_0x43ea20(0x199)][_0x4449dc],_0x121446,_0x1fc548))[_0x43ea20(0x1be)](Boolean);return Object[_0x43ea20(0x16d)](_0xb75efe[_0x43ea20(0x1b2)][_0x43ea20(0x1b9)])[_0x43ea20(0x193)](_0x3cee92=>{const _0x33cb9e=_0x43ea20;this[_0x33cb9e(0x19a)][_0x33cb9e(0x1a8)](_0x3cee92);}),_0x395771;}[_0x3b7018(0x17a)](_0x2284d1){const _0x367d93=_0x3b7018;return{'id':_0x2284d1['id'],'threadId':_0x2284d1[_0x367d93(0x1c3)],'ref':_0x2284d1['ref']};}};S=Q([b(0x0,_0x1e2688(_0x49f23c)),b(0x1,_0x1e2688(_0x198632)),b(0x2,_0x1e2688(_0x2d6b1a))],S);var re=Object[_0x3b7018(0x16e)],te=(_0x339c49,_0x4b7f3b,_0x1a85f2,_0x286a3e)=>{const _0x33f195=_0x3b7018;for(var _0x32c2de=_0x286a3e>0x1?void 0x0:_0x286a3e?re(_0x4b7f3b,_0x1a85f2):_0x4b7f3b,_0x13c2d3=_0x339c49[_0x33f195(0x18a)]-0x1,_0x2e5528;_0x13c2d3>=0x0;_0x13c2d3--)(_0x2e5528=_0x339c49[_0x13c2d3])&&(_0x32c2de=_0x2e5528(_0x32c2de)||_0x32c2de);return _0x32c2de;},M=(_0x59d803,_0x5e893a)=>(_0x3bccd9,_0x446823)=>_0x5e893a(_0x3bccd9,_0x446823,_0x59d803);let f=class extends _0x521bde{constructor(_0x56d02e,_0x340f06){const _0x3d775f=_0x3b7018;super(),this[_0x3d775f(0x16b)]=_0x56d02e,this[_0x3d775f(0x19c)]=_0x340f06,this[_0x3d775f(0x178)]();}[_0x3b7018(0x178)](){const _0xdaf4e2=_0x3b7018;this[_0xdaf4e2(0x16b)][_0xdaf4e2(0x1a2)]=this[_0xdaf4e2(0x19c)],this[_0xdaf4e2(0x16b)][_0xdaf4e2(0x1aa)]=!0x1;}};f=te([M(0x0,_0x157173),M(0x1,_0x1e2688(S))],f);var se=Object[_0x3b7018(0x172)],oe=Object[_0x3b7018(0x16e)],ne=(_0x5c7771,_0x17c8e0,_0x71860b)=>_0x17c8e0 in _0x5c7771?se(_0x5c7771,_0x17c8e0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x71860b}):_0x5c7771[_0x17c8e0]=_0x71860b,ie=(_0xa176c9,_0x133c85,_0x13261e,_0xc9b9cb)=>{for(var _0x2f450a=_0xc9b9cb>0x1?void 0x0:_0xc9b9cb?oe(_0x133c85,_0x13261e):_0x133c85,_0xdc9b1d=_0xa176c9['length']-0x1,_0x335093;_0xdc9b1d>=0x0;_0xdc9b1d--)(_0x335093=_0xa176c9[_0xdc9b1d])&&(_0x2f450a=_0x335093(_0x2f450a)||_0x2f450a);return _0x2f450a;},N=(_0x34c085,_0x4d792f)=>(_0x3947c4,_0x289198)=>_0x4d792f(_0x3947c4,_0x289198,_0x34c085),$=(_0x508609,_0x3a3df8,_0x41f5d9)=>ne(_0x508609,typeof _0x3a3df8!=_0x3b7018(0x177)?_0x3a3df8+'':_0x3a3df8,_0x41f5d9);let g=class extends _0x1b255f{constructor(_0x1e95fb=O,_0x59cabc,_0xcc4387){const _0xe5afbe=_0x3b7018;super(),this['_config']=_0x1e95fb,this[_0xe5afbe(0x1ca)]=_0x59cabc,this[_0xe5afbe(0x1a3)]=_0xcc4387;const {..._0x57afd3}=_0x5440b3({},O,this[_0xe5afbe(0x1ac)]);this[_0xe5afbe(0x1a3)]['setConfig'](z,_0x57afd3);}[_0x3b7018(0x169)](){[[S],[f],[_]]['forEach'](_0x537ca9=>{const _0x408f56=_0x57ef;this[_0x408f56(0x1ca)][_0x408f56(0x1a1)](_0x537ca9);});}['onReady'](){const _0x714313=_0x3b7018;this[_0x714313(0x1ca)][_0x714313(0x1b7)](f),this[_0x714313(0x1ca)][_0x714313(0x1b7)](_);}};$(g,'pluginName',W),$(g,_0x3b7018(0x198),_0x436a4f['UNIVER_UNKNOWN']),g=ie([_0x3b1e4a(_0x3fa00c,_0x4be6b4,_0x2ee970),N(0x1,_0x1e2688(_0x343e65)),N(0x2,_0x3c3e28)],g);function _0x1e99(){const _0x3b6872=['/edit','values','getOwnPropertyDescriptor','thread-comment-data-source.config','9WvBtxi','rangeId','defineProperty','getCurrentUser','parentId','2405nVblYD','format','symbol','_initDataSource','Edit','saveCommentToSnapshot','getUser','listComments','rangeType','payload','3316080HDJYQc','YYYY/MM/DD\x20HH:mm','parse','updateComment','186642bKIKYD','_initUserSync','_threadCommentModel','replyId','deleteComment','getUnit','subscribe','length','/universer-api/comment/unit/','personId','/delete','map','UNRECOGNIZED','1630622aJmqBx','find','/solved','forEach','replies','code','solved','userId','type','comments','_userService','slice','_threadCommentDataSource','content','unitId','createTimestamp','requireSession','add','dataSource','_configService','_init','getMemberID','Add','COMMENT','addUser','Solved','syncUpdateMutationToColla','77547cDfQWA','_config','1607720mHgSAy','Solve','_commentService','customRanges','_httpService','body','user','_sessionService','OpenOrReOpen','stringify','get','/list','users','addComment','post','Unknown','1206wUzjEw','filter','Delete','Reply','/reply','resolveComment','threadId','disposeWithMe','error','6fhxVFL','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','reply','userID','_injector','12416rlUIxW','/universer-api/user/list','commentUpdate$','onStarting','getComment','_threadCommentDataSourceService'];_0x1e99=function(){return _0x3b6872;};return _0x1e99();}export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1b5406=_0x18e2;(function(_0x233beb,_0x488ddc){const _0x34cc8d=_0x18e2,_0x34d4e3=_0x233beb();while(!![]){try{const _0x4ea703=-parseInt(_0x34cc8d(0x110))/0x1+parseInt(_0x34cc8d(0x12b))/0x2*(parseInt(_0x34cc8d(0xda))/0x3)+-parseInt(_0x34cc8d(0x12c))/0x4*(parseInt(_0x34cc8d(0x10a))/0x5)+parseInt(_0x34cc8d(0x10b))/0x6+-parseInt(_0x34cc8d(0x11f))/0x7*(-parseInt(_0x34cc8d(0xe3))/0x8)+parseInt(_0x34cc8d(0x126))/0x9*(-parseInt(_0x34cc8d(0xd7))/0xa)+parseInt(_0x34cc8d(0x138))/0xb;if(_0x4ea703===_0x488ddc)break;else _0x34d4e3['push'](_0x34d4e3['shift']());}catch(_0x4642c8){_0x34d4e3['push'](_0x34d4e3['shift']());}}}(_0x3e4e,0x90a8e));import{CommentService as _0x15fc73,CollaborationSessionService as _0x5d3e79,UniverCollaborationClientPlugin as _0x5bad45}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x49b678}from'@univerjs-pro/license';import{dayjs as _0x406bfa,UserManagerService as _0x1f4e32,Inject as _0x586d83,Injector as _0x1ecf46,Disposable as _0x5cea14,CustomRangeType as _0x3fcf68,UniverInstanceType as _0x5e18d6,DependentOn as _0xb7ae4b,IConfigService as _0x14eba5,Plugin as _0x1aeb3f,merge as _0x57c5e8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2f63eb}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4ad7f8,IThreadCommentDataSourceService as _0x313212}from'@univerjs/thread-comment';import{bufferTime as _0x2f4625}from'rxjs';import{HTTPService as _0x470d01}from'@univerjs/network';const W=_0x1b5406(0xd4);var I=(_0x3725ee=>(_0x3725ee[_0x3725ee[_0x1b5406(0x136)]=0x0]=_0x1b5406(0x136),_0x3725ee[_0x3725ee[_0x1b5406(0xf9)]=0x1]=_0x1b5406(0xf9),_0x3725ee[_0x3725ee[_0x1b5406(0xf0)]=-0x1]=_0x1b5406(0xf0),_0x3725ee))(I||{}),v=(_0x391de2=>(_0x391de2[_0x391de2['Unknown']=0x0]=_0x1b5406(0x106),_0x391de2[_0x391de2[_0x1b5406(0x123)]=0x1]=_0x1b5406(0x123),_0x391de2[_0x391de2[_0x1b5406(0xef)]=0x2]=_0x1b5406(0xef),_0x391de2[_0x391de2[_0x1b5406(0x131)]=0x3]='Edit',_0x391de2[_0x391de2[_0x1b5406(0x133)]=0x4]=_0x1b5406(0x133),_0x391de2[_0x391de2[_0x1b5406(0x122)]=0x5]=_0x1b5406(0x122),_0x391de2[_0x391de2[_0x1b5406(0xf0)]=-0x1]=_0x1b5406(0xf0),_0x391de2))(v||{});const y=_0x3e7f11=>_0x406bfa(new Date(+_0x3e7f11))['format'](_0x1b5406(0x101)),B=async(_0xc8bb5c,_0x39e530)=>{const _0x4fea06=_0x1b5406,_0x1d498b=_0xc8bb5c[_0x4fea06(0xfc)](_0x1f4e32),_0x4fc949=_0xc8bb5c[_0x4fea06(0xfc)](_0x470d01);_0x39e530[_0x4fea06(0xe6)](_0x22296c=>{const _0x8d2bcb=_0x4fea06;_0x1d498b[_0x8d2bcb(0xea)](_0x22296c)&&_0x39e530[_0x8d2bcb(0x109)](_0x22296c);}),_0x39e530[_0x4fea06(0xe0)]&&(await _0x4fc949[_0x4fea06(0xfc)](_0x4fea06(0x129),{'params':{'userIDs':[..._0x39e530]}}))[_0x4fea06(0x113)][_0x4fea06(0x11c)][_0x4fea06(0xe6)](_0x438b0a=>{_0x438b0a&&_0x1d498b['addUser'](_0x438b0a);});};var K=Object[_0x1b5406(0x11a)],V=(_0x363717,_0x29a8c7,_0x35840d,_0x1daeff)=>{const _0x557f45=_0x1b5406;for(var _0x2164d2=_0x1daeff>0x1?void 0x0:_0x1daeff?K(_0x29a8c7,_0x35840d):_0x29a8c7,_0x5b508d=_0x363717[_0x557f45(0x112)]-0x1,_0x2662bb;_0x5b508d>=0x0;_0x5b508d--)(_0x2662bb=_0x363717[_0x5b508d])&&(_0x2164d2=_0x2662bb(_0x2164d2)||_0x2164d2);return _0x2164d2;},p=(_0xe75e1e,_0x5f3f37)=>(_0x49c402,_0xd8dfaa)=>_0x5f3f37(_0x49c402,_0xd8dfaa,_0xe75e1e);let _=class extends _0x5cea14{constructor(_0x66d8fe,_0x15e4c9,_0x3a7103,_0x1190ae){const _0x5b0c8a=_0x1b5406;super(),this[_0x5b0c8a(0x127)]=_0x66d8fe,this[_0x5b0c8a(0xec)]=_0x15e4c9,this[_0x5b0c8a(0x102)]=_0x3a7103,this['_injector']=_0x1190ae,this[_0x5b0c8a(0xdc)](),this[_0x5b0c8a(0x139)]();}[_0x1b5406(0x139)](){const _0x3321e5=_0x1b5406;this[_0x3321e5(0xee)](this[_0x3321e5(0xec)][_0x3321e5(0x111)]['pipe'](_0x2f4625(0x10))[_0x3321e5(0x124)](_0x510577=>{const _0x9c4923=_0x3321e5,_0xebdc79=new Set();_0x510577[_0x9c4923(0xe6)](_0x1fcbd9=>{const _0x37f1fa=_0x9c4923;if(_0x1fcbd9['type']===_0x37f1fa(0x108)){const _0x300fa5=_0x1fcbd9[_0x37f1fa(0x103)][_0x37f1fa(0x128)];_0xebdc79['add'](_0x300fa5);}}),B(this[_0x9c4923(0x119)],_0xebdc79);}));}['_init'](){const _0x243838=_0x1b5406;this[_0x243838(0xee)](this[_0x243838(0x127)][_0x243838(0x111)][_0x243838(0x124)](async _0x38c17c=>{const _0x316e9c=_0x243838;var _0x4b9974,_0x225332,_0x3efdca,_0x42fe40;const _0xf9de9e=(_0x4b9974=this[_0x316e9c(0xec)]['getUnit'](_0x38c17c[_0x316e9c(0x118)])[_0x316e9c(0x117)](_0x5cf53e=>_0x5cf53e[_0x316e9c(0x10d)]===_0x38c17c[_0x316e9c(0x10d)]))==null?void 0x0:_0x4b9974[_0x316e9c(0x120)];if(!_0xf9de9e)return;const {unitId:_0x1add03,subUnitId:_0x19a264}=_0xf9de9e;switch(_0x38c17c[_0x316e9c(0x11d)]&&this[_0x316e9c(0x102)][_0x316e9c(0x132)](_0x38c17c[_0x316e9c(0x11d)]),_0x38c17c[_0x316e9c(0xd6)]){case v[_0x316e9c(0x123)]:break;case v['Reply']:{this[_0x316e9c(0xec)][_0x316e9c(0xd9)](_0x1add03,_0x19a264,{'unitId':_0x1add03,'subUnitId':_0x19a264,'ref':'','id':_0x38c17c[_0x316e9c(0xf6)],'dT':y(+_0x38c17c[_0x316e9c(0xf3)]),'threadId':_0x38c17c['threadId'],'personId':(_0x3efdca=(_0x225332=_0x38c17c[_0x316e9c(0x11d)])==null?void 0x0:_0x225332[_0x316e9c(0xe7)])!=null?_0x3efdca:_0x38c17c['userId'],'text':JSON[_0x316e9c(0xfa)](_0x38c17c[_0x316e9c(0x125)]),'parentId':_0xf9de9e['id']});break;}case v[_0x316e9c(0x133)]:{const _0x347434=this[_0x316e9c(0xec)]['getComment'](_0x1add03,_0x19a264,_0x38c17c[_0x316e9c(0xf6)]);_0x347434&&_0x347434[_0x316e9c(0xd8)]&&this[_0x316e9c(0xec)][_0x316e9c(0xf8)](_0x1add03,_0x19a264,_0x38c17c[_0x316e9c(0xf6)]);break;}case v[_0x316e9c(0x131)]:{this[_0x316e9c(0xec)]['updateComment'](_0x1add03,_0x19a264,{'commentId':_0x38c17c[_0x316e9c(0xf6)],'text':JSON[_0x316e9c(0xfa)](_0x38c17c[_0x316e9c(0x125)])});break;}case v[_0x316e9c(0x122)]:{const _0xe32ed8=(_0x42fe40=this['_threadCommentModel'][_0x316e9c(0xeb)](_0x38c17c[_0x316e9c(0x118)])[_0x316e9c(0x117)](_0x5e790b=>_0x5e790b['threadId']===_0x38c17c[_0x316e9c(0x10d)]))==null?void 0x0:_0x42fe40[_0x316e9c(0x120)];_0xe32ed8&&this[_0x316e9c(0xec)][_0x316e9c(0x100)](_0x1add03,_0x19a264,_0xe32ed8['id'],_0x38c17c[_0x316e9c(0x12f)]===I[_0x316e9c(0xf9)]);break;}}}));}};_=V([p(0x0,_0x586d83(_0x15fc73)),p(0x1,_0x586d83(_0x4ad7f8)),p(0x2,_0x586d83(_0x1f4e32)),p(0x3,_0x586d83(_0x1ecf46))],_);const z=_0x1b5406(0xde),O={};var k=Object[_0x1b5406(0x11a)],Q=(_0x2919d5,_0x24ec4c,_0x182952,_0x4e05af)=>{const _0x1fbb41=_0x1b5406;for(var _0x69bb8c=_0x4e05af>0x1?void 0x0:_0x4e05af?k(_0x24ec4c,_0x182952):_0x24ec4c,_0x13a448=_0x2919d5[_0x1fbb41(0x112)]-0x1,_0x2746c0;_0x13a448>=0x0;_0x13a448--)(_0x2746c0=_0x2919d5[_0x13a448])&&(_0x69bb8c=_0x2746c0(_0x69bb8c)||_0x69bb8c);return _0x69bb8c;},b=(_0x3e66b5,_0xce4029)=>(_0x3fea9c,_0x52fd53)=>_0xce4029(_0x3fea9c,_0x52fd53,_0x3e66b5);function X(_0x270f1a,_0x5212d8){const _0x2ee303=_0x1b5406,_0x590ed6=_0x270f1a[_0x2ee303(0x116)][0x0];return{..._0x5212d8,'id':_0x590ed6[_0x2ee303(0xf6)],'resolved':_0x270f1a['solved']===0x1,'dT':y(_0x590ed6['createTimestamp']),'personId':_0x590ed6[_0x2ee303(0xf7)],'threadId':_0x590ed6[_0x2ee303(0x10d)]};}function ee(_0x558d7c,_0x45e9e2,_0x8b898b){const _0x3c3f07=_0x1b5406;var _0x511cb6,_0xc79b;if(((_0xc79b=(_0x511cb6=_0x558d7c==null?void 0x0:_0x558d7c[_0x3c3f07(0x116)])==null?void 0x0:_0x511cb6[_0x3c3f07(0x112)])!=null?_0xc79b:0x0)>0x0){const _0x445141=(_0xfd3c6c,_0x5473b0)=>({'id':_0xfd3c6c[_0x3c3f07(0xf6)],'threadId':_0xfd3c6c[_0x3c3f07(0x10d)],'dT':y(_0xfd3c6c[_0x3c3f07(0xf3)]),'personId':_0xfd3c6c[_0x3c3f07(0xf7)],'resolved':_0x558d7c[_0x3c3f07(0x12f)]===I['Solved'],'unitId':_0x45e9e2,'subUnitId':_0x8b898b,'text':JSON[_0x3c3f07(0xfa)](_0xfd3c6c[_0x3c3f07(0x125)]),'parentId':_0x5473b0}),_0x5339b7=_0x445141(_0x558d7c[_0x3c3f07(0x116)][0x0]);return{..._0x5339b7,'children':_0x558d7c['replies'][_0x3c3f07(0xfb)](0x1)['map'](_0x1fc8a0=>_0x445141(_0x1fc8a0,_0x5339b7['id']))};}return null;}let S=class{constructor(_0x4a88c4,_0x24c375,_0x360582){const _0x5ebc5b=_0x1b5406;this[_0x5ebc5b(0x11b)]=_0x4a88c4,this[_0x5ebc5b(0x102)]=_0x24c375,this[_0x5ebc5b(0xf1)]=_0x360582;}async[_0x1b5406(0xd9)](_0x1fb0e7){const _0x14596f=_0x1b5406;var _0x1edfdb,_0x1698ba;const {parentId:_0x58288b,unitId:_0x1210f3,text:_0x18f7be,threadId:_0x478c44}=_0x1fb0e7,_0xa35879=(_0x1698ba=(_0x1edfdb=_0x18f7be['customRanges'])==null?void 0x0:_0x1edfdb['filter'](_0x4d3bae=>_0x4d3bae[_0x14596f(0xe4)]===_0x3fcf68[_0x14596f(0x135)])[_0x14596f(0xfd)](_0x4c2791=>_0x4c2791[_0x14596f(0x10f)]))!=null?_0x1698ba:[],_0x3c4c20=JSON['stringify'](_0x18f7be),_0x6faecb=(await this[_0x14596f(0xf1)][_0x14596f(0x10e)](_0x1210f3))[_0x14596f(0x107)]();if(_0x58288b){const _0x22c659={'memberId':_0x6faecb,'unitId':_0x1210f3,'content':_0x3c4c20,'mention':_0xa35879,'threadId':_0x478c44},_0x43acbd=(await this['_httpService']['post'](_0x14596f(0x130)+_0x1210f3+_0x14596f(0x105),{'body':_0x22c659}))[_0x14596f(0x113)]['reply'];return{..._0x1fb0e7,'id':_0x43acbd[_0x14596f(0xf6)],'dT':_0x406bfa(+_0x43acbd[_0x14596f(0xf3)])[_0x14596f(0x115)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x43acbd[_0x14596f(0xf7)]};}else{const _0x3c1eb0={'memberId':_0x6faecb,'unitId':_0x1210f3,'content':_0x3c4c20,'mention':_0xa35879},_0x183bc3=await this[_0x14596f(0x11b)][_0x14596f(0xf2)](_0x14596f(0x130)+_0x1210f3+_0x14596f(0xf4),{'body':_0x3c1eb0});return X(_0x183bc3[_0x14596f(0x113)][_0x14596f(0xdd)],_0x1fb0e7);}}async[_0x1b5406(0x12e)](_0x4dd125){const _0x304818=_0x1b5406;var _0xe1b8b7,_0x33740a;const {text:_0x18c549,unitId:_0xcfb341}=_0x4dd125,_0x5efbc3=(_0x33740a=(_0xe1b8b7=_0x18c549[_0x304818(0xe5)])==null?void 0x0:_0xe1b8b7[_0x304818(0xe1)](_0x27d4b0=>_0x27d4b0[_0x304818(0xe4)]===_0x3fcf68['COMMENT'])['map'](_0x3ba5b0=>_0x3ba5b0[_0x304818(0x10f)]))!=null?_0x33740a:[],_0x552f43=JSON['stringify'](_0x18c549),_0xd665e3=_0x4dd125[_0x304818(0x10d)],_0x3b0970=_0x4dd125['id'],_0x11b202={'memberId':(await this[_0x304818(0xf1)][_0x304818(0x10e)](_0xcfb341))[_0x304818(0x107)](),'unitId':_0xcfb341,'threadId':_0xd665e3,'mention':_0x5efbc3,'content':_0x552f43,'replyId':_0x3b0970},_0xf9a3b0=await this[_0x304818(0x11b)][_0x304818(0xf2)]('/universer-api/comment/unit/'+_0xcfb341+_0x304818(0xed),{'body':_0x11b202});return!_0xf9a3b0[_0x304818(0x113)][_0x304818(0xe2)]||_0xf9a3b0['body']['error'][_0x304818(0xff)]===0x1;}async['resolveComment'](_0x1275e3){const _0x354d53=_0x1b5406,{unitId:_0x136af7}=_0x1275e3,_0x464ab2=_0x1275e3['threadId'],_0x11e476={'memberId':this[_0x354d53(0x102)]['getCurrentUser']()[_0x354d53(0xe7)],'unitId':_0x136af7,'threadId':_0x464ab2,'solved':_0x1275e3[_0x354d53(0x12d)]?I[_0x354d53(0xf9)]:I['OpenOrReOpen']},_0x2b4554=await this[_0x354d53(0x11b)][_0x354d53(0xf2)](_0x354d53(0x130)+_0x136af7+_0x354d53(0xf5),{'body':_0x11e476});return!_0x2b4554[_0x354d53(0x113)][_0x354d53(0xe2)]||_0x2b4554[_0x354d53(0x113)]['error'][_0x354d53(0xff)]===0x1;}async[_0x1b5406(0xf8)](_0xfda7ad,_0x522ac5,_0x239cff,_0x2e480a){const _0x276ac7=_0x1b5406,_0x4e75e1={'memberId':(await this['_sessionService']['requireSession'](_0xfda7ad))[_0x276ac7(0x107)](),'threadId':_0x239cff,'replyId':_0x2e480a,'unitId':_0xfda7ad},_0x5c7e5d=await this['_httpService'][_0x276ac7(0xf2)](_0x276ac7(0x130)+_0xfda7ad+_0x276ac7(0x11e),{'body':_0x4e75e1});return!_0x5c7e5d[_0x276ac7(0x113)]['error']||_0x5c7e5d['body'][_0x276ac7(0xe2)][_0x276ac7(0xff)]===0x1;}async[_0x1b5406(0x10c)](_0xda3720,_0x2125b4,_0x431ae3){const _0x1aea5f=_0x1b5406,_0x29a89c={'unitId':_0xda3720,'threadId':_0x431ae3},_0x533cc3=await this[_0x1aea5f(0x11b)]['post'](_0x1aea5f(0x130)+_0xda3720+_0x1aea5f(0xe8),{'body':_0x29a89c}),_0x46589f=_0x431ae3[_0x1aea5f(0xfd)](_0x50301b=>ee(_0x533cc3[_0x1aea5f(0x113)][_0x1aea5f(0x12a)][_0x50301b],_0xda3720,_0x2125b4))[_0x1aea5f(0xe1)](Boolean);return Object[_0x1aea5f(0xfe)](_0x533cc3[_0x1aea5f(0x113)][_0x1aea5f(0x11c)])[_0x1aea5f(0xe6)](_0x44614a=>{const _0x1cc9cd=_0x1aea5f;this[_0x1cc9cd(0x102)]['addUser'](_0x44614a);}),_0x46589f;}['saveCommentToSnapshot'](_0x57f1eb){const _0xb53a2=_0x1b5406;return{'id':_0x57f1eb['id'],'threadId':_0x57f1eb[_0xb53a2(0x10d)],'ref':_0x57f1eb['ref']};}};S=Q([b(0x0,_0x586d83(_0x470d01)),b(0x1,_0x586d83(_0x1f4e32)),b(0x2,_0x586d83(_0x5d3e79))],S);function _0x18e2(_0x4de6a,_0x55e864){_0x4de6a=_0x4de6a-0xd4;const _0x3e4eec=_0x3e4e();let _0x18e2ac=_0x3e4eec[_0x4de6a];return _0x18e2ac;}var re=Object[_0x1b5406(0x11a)],te=(_0x45c44a,_0x2b99f5,_0x579b52,_0x1e3d45)=>{const _0x277717=_0x1b5406;for(var _0x4a1cc3=_0x1e3d45>0x1?void 0x0:_0x1e3d45?re(_0x2b99f5,_0x579b52):_0x2b99f5,_0x5d89f2=_0x45c44a[_0x277717(0x112)]-0x1,_0x3bad21;_0x5d89f2>=0x0;_0x5d89f2--)(_0x3bad21=_0x45c44a[_0x5d89f2])&&(_0x4a1cc3=_0x3bad21(_0x4a1cc3)||_0x4a1cc3);return _0x4a1cc3;},M=(_0x2a5e7f,_0x3aae73)=>(_0x4e732e,_0x4ede68)=>_0x3aae73(_0x4e732e,_0x4ede68,_0x2a5e7f);function _0x3e4e(){const _0x13e357=['/reply','Unknown','getMemberID','add','delete','320EuPzmk','4036248oXdEKR','listComments','threadId','requireSession','rangeId','1089589KqsCCr','commentUpdate$','length','body','symbol','format','replies','find','unitId','_injector','getOwnPropertyDescriptor','_httpService','users','user','/delete','525edRnwi','root','_threadCommentDataSourceService','Solve','Add','subscribe','content','5121YsUYKL','_commentService','personId','/universer-api/user/list','comments','258pUqroZ','7244ppUTyL','resolved','updateComment','solved','/universer-api/comment/unit/','Edit','addUser','Delete','UNIVER_UNKNOWN','COMMENT','OpenOrReOpen','setConfig','3099580IzMCyH','_initUserSync','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','type','7530LfaHSp','parentId','addComment','11691avSzPw','_threadCommentDataSource','_init','comment','thread-comment-data-source.config','_initDataSource','size','filter','error','82056hWMTZb','rangeType','customRanges','forEach','userID','/list','_configService','getUser','getUnit','_threadCommentModel','/edit','disposeWithMe','Reply','UNRECOGNIZED','_sessionService','post','createTimestamp','/add','/solved','replyId','userId','deleteComment','Solved','parse','slice','get','map','values','code','resolveComment','YYYY/MM/DD\x20HH:mm','_userService','payload','_config'];_0x3e4e=function(){return _0x13e357;};return _0x3e4e();}let f=class extends _0x5cea14{constructor(_0x197beb,_0x4bec77){const _0xd2a1b4=_0x1b5406;super(),this[_0xd2a1b4(0x121)]=_0x197beb,this[_0xd2a1b4(0xdb)]=_0x4bec77,this[_0xd2a1b4(0xdf)]();}[_0x1b5406(0xdf)](){const _0x30188d=_0x1b5406;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x30188d(0x121)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x313212),M(0x1,_0x586d83(S))],f);var se=Object[_0x1b5406(0xd5)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x35bb38,_0x3b17a0,_0x3dc517)=>_0x3b17a0 in _0x35bb38?se(_0x35bb38,_0x3b17a0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3dc517}):_0x35bb38[_0x3b17a0]=_0x3dc517,ie=(_0x554245,_0x15d35b,_0x14aabb,_0xa51bd1)=>{const _0x1fcd48=_0x1b5406;for(var _0x582c76=_0xa51bd1>0x1?void 0x0:_0xa51bd1?oe(_0x15d35b,_0x14aabb):_0x15d35b,_0x5c9007=_0x554245[_0x1fcd48(0x112)]-0x1,_0x1217e5;_0x5c9007>=0x0;_0x5c9007--)(_0x1217e5=_0x554245[_0x5c9007])&&(_0x582c76=_0x1217e5(_0x582c76)||_0x582c76);return _0x582c76;},N=(_0x397e4f,_0x167e4a)=>(_0x2bd8e8,_0x255d06)=>_0x167e4a(_0x2bd8e8,_0x255d06,_0x397e4f),$=(_0x234f8f,_0x5bc48a,_0xa57e39)=>ne(_0x234f8f,typeof _0x5bc48a!=_0x1b5406(0x114)?_0x5bc48a+'':_0x5bc48a,_0xa57e39);let g=class extends _0x1aeb3f{constructor(_0x4572fa=O,_0x209452,_0x580de0){const _0x124164=_0x1b5406;super(),this[_0x124164(0x104)]=_0x4572fa,this['_injector']=_0x209452,this[_0x124164(0xe9)]=_0x580de0;const {..._0x374e2f}=_0x57c5e8({},O,this[_0x124164(0x104)]);this[_0x124164(0xe9)][_0x124164(0x137)](z,_0x374e2f);}['onStarting'](){const _0x1b5a8b=_0x1b5406;[[S],[f],[_]][_0x1b5a8b(0xe6)](_0x394cc2=>{const _0x478beb=_0x1b5a8b;this[_0x478beb(0x119)][_0x478beb(0x108)](_0x394cc2);});}['onReady'](){const _0x1ab5a8=_0x1b5406;this['_injector'][_0x1ab5a8(0xfc)](f),this[_0x1ab5a8(0x119)][_0x1ab5a8(0xfc)](_);}};$(g,'pluginName',W),$(g,_0x1b5406(0xd6),_0x5e18d6[_0x1b5406(0x134)]),g=ie([_0xb7ae4b(_0x2f63eb,_0x5bad45,_0x49b678),N(0x1,_0x586d83(_0x1ecf46)),N(0x2,_0x14eba5)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3b7018=_0x57ef;(function(_0x3c658f,_0x2c32fc){const _0x3f905a=_0x57ef,_0x5193d1=_0x3c658f();while(!![]){try{const _0x1363c2=parseInt(_0x3f905a(0x1ab))/0x1+-parseInt(_0x3f905a(0x183))/0x2+parseInt(_0x3f905a(0x1c6))/0x3*(-parseInt(_0x3f905a(0x166))/0x4)+parseInt(_0x3f905a(0x175))/0x5*(-parseInt(_0x3f905a(0x1bd))/0x6)+-parseInt(_0x3f905a(0x190))/0x7+-parseInt(_0x3f905a(0x1ad))/0x8*(-parseInt(_0x3f905a(0x170))/0x9)+parseInt(_0x3f905a(0x17f))/0xa;if(_0x1363c2===_0x2c32fc)break;else _0x5193d1['push'](_0x5193d1['shift']());}catch(_0x78123b){_0x5193d1['push'](_0x5193d1['shift']());}}}(_0x1e99,0x2c2e4));import{CommentService as _0x4ccc47,CollaborationSessionService as _0x2d6b1a,UniverCollaborationClientPlugin as _0x4be6b4}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2ee970}from'@univerjs-pro/license';import{dayjs as _0xd36bf1,UserManagerService as _0x198632,Inject as _0x1e2688,Injector as _0x343e65,Disposable as _0x521bde,CustomRangeType as _0x52a6bd,UniverInstanceType as _0x436a4f,DependentOn as _0x3b1e4a,Plugin as _0x1b255f,merge as _0x5440b3,IConfigService as _0x3c3e28}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3fa00c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xabae3d,IThreadCommentDataSourceService as _0x157173}from'@univerjs/thread-comment';import{bufferTime as _0x266770}from'rxjs';import{HTTPService as _0x49f23c}from'@univerjs/network';const W=_0x3b7018(0x1c7);var I=(_0x4d3302=>(_0x4d3302[_0x4d3302[_0x3b7018(0x1b5)]=0x0]=_0x3b7018(0x1b5),_0x4d3302[_0x4d3302[_0x3b7018(0x1a9)]=0x1]=_0x3b7018(0x1a9),_0x4d3302[_0x4d3302['UNRECOGNIZED']=-0x1]=_0x3b7018(0x18f),_0x4d3302))(I||{}),v=(_0x4c6901=>(_0x4c6901[_0x4c6901[_0x3b7018(0x1bc)]=0x0]=_0x3b7018(0x1bc),_0x4c6901[_0x4c6901[_0x3b7018(0x1a6)]=0x1]=_0x3b7018(0x1a6),_0x4c6901[_0x4c6901['Reply']=0x2]=_0x3b7018(0x1c0),_0x4c6901[_0x4c6901['Edit']=0x3]=_0x3b7018(0x179),_0x4c6901[_0x4c6901[_0x3b7018(0x1bf)]=0x4]=_0x3b7018(0x1bf),_0x4c6901[_0x4c6901['Solve']=0x5]=_0x3b7018(0x1ae),_0x4c6901[_0x4c6901[_0x3b7018(0x18f)]=-0x1]='UNRECOGNIZED',_0x4c6901))(v||{});const y=_0x1850d6=>_0xd36bf1(new Date(+_0x1850d6))[_0x3b7018(0x176)](_0x3b7018(0x180)),B=async(_0xaf1706,_0x56292e)=>{const _0x1a98b3=_0x3b7018,_0x296c98=_0xaf1706['get'](_0x198632),_0x40606d=_0xaf1706['get'](_0x49f23c);_0x56292e[_0x1a98b3(0x193)](_0x3b6bcf=>{const _0x35e101=_0x1a98b3;_0x296c98[_0x35e101(0x17b)](_0x3b6bcf)&&_0x56292e['delete'](_0x3b6bcf);}),_0x56292e['size']&&(await _0x40606d[_0x1a98b3(0x1b7)](_0x1a98b3(0x167),{'params':{'userIDs':[..._0x56292e]}}))['body']['users'][_0x1a98b3(0x193)](_0x478897=>{const _0x59026d=_0x1a98b3;_0x478897&&_0x296c98[_0x59026d(0x1a8)](_0x478897);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2652bd,_0x17c455,_0x42e366,_0x42a593)=>{const _0x1b037e=_0x3b7018;for(var _0x21d63b=_0x42a593>0x1?void 0x0:_0x42a593?K(_0x17c455,_0x42e366):_0x17c455,_0x14e9e8=_0x2652bd[_0x1b037e(0x18a)]-0x1,_0x3f15fe;_0x14e9e8>=0x0;_0x14e9e8--)(_0x3f15fe=_0x2652bd[_0x14e9e8])&&(_0x21d63b=_0x3f15fe(_0x21d63b)||_0x21d63b);return _0x21d63b;},p=(_0x5164be,_0x59dfa9)=>(_0x28b860,_0x590a19)=>_0x59dfa9(_0x28b860,_0x590a19,_0x5164be);let _=class extends _0x521bde{constructor(_0x4fc488,_0x483e10,_0x3e6ae3,_0x40f443){const _0x4a898b=_0x3b7018;super(),this[_0x4a898b(0x1af)]=_0x4fc488,this[_0x4a898b(0x185)]=_0x483e10,this[_0x4a898b(0x19a)]=_0x3e6ae3,this['_injector']=_0x40f443,this['_init'](),this[_0x4a898b(0x184)]();}[_0x3b7018(0x184)](){const _0x448bc9=_0x3b7018;this[_0x448bc9(0x1c4)](this['_threadCommentModel'][_0x448bc9(0x168)]['pipe'](_0x266770(0x10))[_0x448bc9(0x189)](_0x205e73=>{const _0x1b0920=_0x448bc9,_0x2ac0bf=new Set();_0x205e73['forEach'](_0x2bc743=>{const _0x5d8ac8=_0x57ef;if(_0x2bc743['type']===_0x5d8ac8(0x1a1)){const _0x2e1197=_0x2bc743[_0x5d8ac8(0x17e)][_0x5d8ac8(0x18c)];_0x2ac0bf['add'](_0x2e1197);}}),B(this[_0x1b0920(0x1ca)],_0x2ac0bf);}));}[_0x3b7018(0x1a4)](){const _0x570be0=_0x3b7018;this['disposeWithMe'](this[_0x570be0(0x1af)]['commentUpdate$']['subscribe'](async _0x47253f=>{const _0x1060e0=_0x570be0;var _0x304254,_0x1b9307,_0x4bf8ce,_0x366b8c;const _0x27cd59=(_0x304254=this['_threadCommentModel'][_0x1060e0(0x188)](_0x47253f['unitId'])['find'](_0xc49e73=>_0xc49e73[_0x1060e0(0x1c3)]===_0x47253f[_0x1060e0(0x1c3)]))==null?void 0x0:_0x304254['root'];if(!_0x27cd59)return;const {unitId:_0x3d7ab1,subUnitId:_0x51fe0d}=_0x27cd59;switch(_0x47253f[_0x1060e0(0x1b3)]&&this[_0x1060e0(0x19a)][_0x1060e0(0x1a8)](_0x47253f[_0x1060e0(0x1b3)]),_0x47253f[_0x1060e0(0x198)]){case v[_0x1060e0(0x1a6)]:break;case v[_0x1060e0(0x1c0)]:{this[_0x1060e0(0x185)][_0x1060e0(0x1ba)](_0x3d7ab1,_0x51fe0d,{'unitId':_0x3d7ab1,'subUnitId':_0x51fe0d,'ref':'','id':_0x47253f[_0x1060e0(0x186)],'dT':y(+_0x47253f[_0x1060e0(0x19f)]),'threadId':_0x47253f[_0x1060e0(0x1c3)],'personId':(_0x4bf8ce=(_0x1b9307=_0x47253f[_0x1060e0(0x1b3)])==null?void 0x0:_0x1b9307['userID'])!=null?_0x4bf8ce:_0x47253f[_0x1060e0(0x197)],'text':JSON[_0x1060e0(0x181)](_0x47253f[_0x1060e0(0x19d)]),'parentId':_0x27cd59['id']});break;}case v[_0x1060e0(0x1bf)]:{const _0x436c3b=this['_threadCommentModel'][_0x1060e0(0x16a)](_0x3d7ab1,_0x51fe0d,_0x47253f[_0x1060e0(0x186)]);_0x436c3b&&_0x436c3b[_0x1060e0(0x174)]&&this[_0x1060e0(0x185)][_0x1060e0(0x187)](_0x3d7ab1,_0x51fe0d,_0x47253f[_0x1060e0(0x186)]);break;}case v[_0x1060e0(0x179)]:{this[_0x1060e0(0x185)][_0x1060e0(0x182)](_0x3d7ab1,_0x51fe0d,{'commentId':_0x47253f['replyId'],'text':JSON[_0x1060e0(0x181)](_0x47253f[_0x1060e0(0x19d)])});break;}case v['Solve']:{const _0xd6bbd6=(_0x366b8c=this[_0x1060e0(0x185)][_0x1060e0(0x188)](_0x47253f[_0x1060e0(0x19e)])[_0x1060e0(0x191)](_0x1fd070=>_0x1fd070[_0x1060e0(0x1c3)]===_0x47253f[_0x1060e0(0x1c3)]))==null?void 0x0:_0x366b8c['root'];_0xd6bbd6&&this['_threadCommentModel']['resolveComment'](_0x3d7ab1,_0x51fe0d,_0xd6bbd6['id'],_0x47253f[_0x1060e0(0x196)]===I[_0x1060e0(0x1a9)]);break;}}}));}};_=V([p(0x0,_0x1e2688(_0x4ccc47)),p(0x1,_0x1e2688(_0xabae3d)),p(0x2,_0x1e2688(_0x198632)),p(0x3,_0x1e2688(_0x343e65))],_);const z=_0x3b7018(0x16f),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x29c617,_0x4a43c4,_0x1e5ada,_0x267b9a)=>{for(var _0x2e612d=_0x267b9a>0x1?void 0x0:_0x267b9a?k(_0x4a43c4,_0x1e5ada):_0x4a43c4,_0x25f844=_0x29c617['length']-0x1,_0x3dd673;_0x25f844>=0x0;_0x25f844--)(_0x3dd673=_0x29c617[_0x25f844])&&(_0x2e612d=_0x3dd673(_0x2e612d)||_0x2e612d);return _0x2e612d;},b=(_0x3e6107,_0x44bd5e)=>(_0x165728,_0xfa3833)=>_0x44bd5e(_0x165728,_0xfa3833,_0x3e6107);function X(_0x329b44,_0x20fc08){const _0x5ddf7e=_0x3b7018,_0x383f59=_0x329b44[_0x5ddf7e(0x194)][0x0];return{..._0x20fc08,'id':_0x383f59[_0x5ddf7e(0x186)],'resolved':_0x329b44['solved']===0x1,'dT':y(_0x383f59[_0x5ddf7e(0x19f)]),'personId':_0x383f59[_0x5ddf7e(0x197)],'threadId':_0x383f59[_0x5ddf7e(0x1c3)]};}function ee(_0x27013a,_0x377687,_0x42ceb9){const _0x193df6=_0x3b7018;var _0x35c8b4,_0x46e8b5;if(((_0x46e8b5=(_0x35c8b4=_0x27013a==null?void 0x0:_0x27013a[_0x193df6(0x194)])==null?void 0x0:_0x35c8b4[_0x193df6(0x18a)])!=null?_0x46e8b5:0x0)>0x0){const _0x14120a=(_0x33b0a8,_0x1e2838)=>({'id':_0x33b0a8[_0x193df6(0x186)],'threadId':_0x33b0a8[_0x193df6(0x1c3)],'dT':y(_0x33b0a8[_0x193df6(0x19f)]),'personId':_0x33b0a8[_0x193df6(0x197)],'resolved':_0x27013a[_0x193df6(0x196)]===I[_0x193df6(0x1a9)],'unitId':_0x377687,'subUnitId':_0x42ceb9,'text':JSON['parse'](_0x33b0a8['content']),'parentId':_0x1e2838}),_0x374ebb=_0x14120a(_0x27013a['replies'][0x0]);return{..._0x374ebb,'children':_0x27013a[_0x193df6(0x194)][_0x193df6(0x19b)](0x1)[_0x193df6(0x18e)](_0x2b1444=>_0x14120a(_0x2b1444,_0x374ebb['id']))};}return null;}function _0x57ef(_0x3428bd,_0x5bd175){_0x3428bd=_0x3428bd-0x166;const _0x1e99b9=_0x1e99();let _0x57ef28=_0x1e99b9[_0x3428bd];return _0x57ef28;}let S=class{constructor(_0x47ff70,_0x3a6a9a,_0x4d6bc7){const _0x4d79d3=_0x3b7018;this[_0x4d79d3(0x1b1)]=_0x47ff70,this[_0x4d79d3(0x19a)]=_0x3a6a9a,this['_sessionService']=_0x4d6bc7;}async[_0x3b7018(0x1ba)](_0x360035){const _0x4994b8=_0x3b7018;var _0x48dd8d,_0x15835f;const {parentId:_0x11996b,unitId:_0x112aa1,text:_0x1cb8b6,threadId:_0x1cca1d}=_0x360035,_0x2d0429=(_0x15835f=(_0x48dd8d=_0x1cb8b6['customRanges'])==null?void 0x0:_0x48dd8d[_0x4994b8(0x1be)](_0x2cf149=>_0x2cf149[_0x4994b8(0x17d)]===_0x52a6bd[_0x4994b8(0x1a7)])[_0x4994b8(0x18e)](_0x30e60b=>_0x30e60b[_0x4994b8(0x171)]))!=null?_0x15835f:[],_0x40dc8f=JSON[_0x4994b8(0x1b6)](_0x1cb8b6),_0x40a905=(await this[_0x4994b8(0x1b4)][_0x4994b8(0x1a0)](_0x112aa1))[_0x4994b8(0x1a5)]();if(_0x11996b){const _0x141eb1={'memberId':_0x40a905,'unitId':_0x112aa1,'content':_0x40dc8f,'mention':_0x2d0429,'threadId':_0x1cca1d},_0x171266=(await this[_0x4994b8(0x1b1)][_0x4994b8(0x1bb)](_0x4994b8(0x18b)+_0x112aa1+_0x4994b8(0x1c1),{'body':_0x141eb1}))['body'][_0x4994b8(0x1c8)];return{..._0x360035,'id':_0x171266[_0x4994b8(0x186)],'dT':_0xd36bf1(+_0x171266[_0x4994b8(0x19f)])[_0x4994b8(0x176)](_0x4994b8(0x180)),'personId':_0x171266['userId']};}else{const _0x5a9589={'memberId':_0x40a905,'unitId':_0x112aa1,'content':_0x40dc8f,'mention':_0x2d0429},_0x236e37=await this['_httpService'][_0x4994b8(0x1bb)]('/universer-api/comment/unit/'+_0x112aa1+'/add',{'body':_0x5a9589});return X(_0x236e37[_0x4994b8(0x1b2)]['comment'],_0x360035);}}async['updateComment'](_0x1b8594){const _0x83971b=_0x3b7018;var _0x4e91d8,_0x17a3bf;const {text:_0x26d550,unitId:_0x2bb8cd}=_0x1b8594,_0x5f2821=(_0x17a3bf=(_0x4e91d8=_0x26d550[_0x83971b(0x1b0)])==null?void 0x0:_0x4e91d8[_0x83971b(0x1be)](_0x240f55=>_0x240f55[_0x83971b(0x17d)]===_0x52a6bd['COMMENT'])['map'](_0x3e9018=>_0x3e9018[_0x83971b(0x171)]))!=null?_0x17a3bf:[],_0x3f1637=JSON[_0x83971b(0x1b6)](_0x26d550),_0x57102e=_0x1b8594[_0x83971b(0x1c3)],_0xf670dc=_0x1b8594['id'],_0x54a39e={'memberId':(await this[_0x83971b(0x1b4)][_0x83971b(0x1a0)](_0x2bb8cd))[_0x83971b(0x1a5)](),'unitId':_0x2bb8cd,'threadId':_0x57102e,'mention':_0x5f2821,'content':_0x3f1637,'replyId':_0xf670dc},_0x1286b0=await this['_httpService'][_0x83971b(0x1bb)](_0x83971b(0x18b)+_0x2bb8cd+_0x83971b(0x16c),{'body':_0x54a39e});return!_0x1286b0[_0x83971b(0x1b2)][_0x83971b(0x1c5)]||_0x1286b0['body'][_0x83971b(0x1c5)][_0x83971b(0x195)]===0x1;}async[_0x3b7018(0x1c2)](_0x3e6789){const _0x2c7750=_0x3b7018,{unitId:_0x28ac41}=_0x3e6789,_0x10aeea=_0x3e6789[_0x2c7750(0x1c3)],_0x3efd36={'memberId':this['_userService'][_0x2c7750(0x173)]()[_0x2c7750(0x1c9)],'unitId':_0x28ac41,'threadId':_0x10aeea,'solved':_0x3e6789['resolved']?I[_0x2c7750(0x1a9)]:I[_0x2c7750(0x1b5)]},_0x22ec8b=await this['_httpService'][_0x2c7750(0x1bb)](_0x2c7750(0x18b)+_0x28ac41+_0x2c7750(0x192),{'body':_0x3efd36});return!_0x22ec8b[_0x2c7750(0x1b2)][_0x2c7750(0x1c5)]||_0x22ec8b[_0x2c7750(0x1b2)][_0x2c7750(0x1c5)][_0x2c7750(0x195)]===0x1;}async['deleteComment'](_0x48218c,_0x4009a6,_0x43452f,_0x3a2d55){const _0x4ef835=_0x3b7018,_0x36cceb={'memberId':(await this[_0x4ef835(0x1b4)]['requireSession'](_0x48218c))[_0x4ef835(0x1a5)](),'threadId':_0x43452f,'replyId':_0x3a2d55,'unitId':_0x48218c},_0x2ce473=await this[_0x4ef835(0x1b1)][_0x4ef835(0x1bb)](_0x4ef835(0x18b)+_0x48218c+_0x4ef835(0x18d),{'body':_0x36cceb});return!_0x2ce473[_0x4ef835(0x1b2)]['error']||_0x2ce473[_0x4ef835(0x1b2)][_0x4ef835(0x1c5)][_0x4ef835(0x195)]===0x1;}async[_0x3b7018(0x17c)](_0x121446,_0x1fc548,_0x20db72){const _0x43ea20=_0x3b7018,_0x58698d={'unitId':_0x121446,'threadId':_0x20db72},_0xb75efe=await this[_0x43ea20(0x1b1)]['post'](_0x43ea20(0x18b)+_0x121446+_0x43ea20(0x1b8),{'body':_0x58698d}),_0x395771=_0x20db72['map'](_0x4449dc=>ee(_0xb75efe['body'][_0x43ea20(0x199)][_0x4449dc],_0x121446,_0x1fc548))[_0x43ea20(0x1be)](Boolean);return Object[_0x43ea20(0x16d)](_0xb75efe[_0x43ea20(0x1b2)][_0x43ea20(0x1b9)])[_0x43ea20(0x193)](_0x3cee92=>{const _0x33cb9e=_0x43ea20;this[_0x33cb9e(0x19a)][_0x33cb9e(0x1a8)](_0x3cee92);}),_0x395771;}[_0x3b7018(0x17a)](_0x2284d1){const _0x367d93=_0x3b7018;return{'id':_0x2284d1['id'],'threadId':_0x2284d1[_0x367d93(0x1c3)],'ref':_0x2284d1['ref']};}};S=Q([b(0x0,_0x1e2688(_0x49f23c)),b(0x1,_0x1e2688(_0x198632)),b(0x2,_0x1e2688(_0x2d6b1a))],S);var re=Object[_0x3b7018(0x16e)],te=(_0x339c49,_0x4b7f3b,_0x1a85f2,_0x286a3e)=>{const _0x33f195=_0x3b7018;for(var _0x32c2de=_0x286a3e>0x1?void 0x0:_0x286a3e?re(_0x4b7f3b,_0x1a85f2):_0x4b7f3b,_0x13c2d3=_0x339c49[_0x33f195(0x18a)]-0x1,_0x2e5528;_0x13c2d3>=0x0;_0x13c2d3--)(_0x2e5528=_0x339c49[_0x13c2d3])&&(_0x32c2de=_0x2e5528(_0x32c2de)||_0x32c2de);return _0x32c2de;},M=(_0x59d803,_0x5e893a)=>(_0x3bccd9,_0x446823)=>_0x5e893a(_0x3bccd9,_0x446823,_0x59d803);let f=class extends _0x521bde{constructor(_0x56d02e,_0x340f06){const _0x3d775f=_0x3b7018;super(),this[_0x3d775f(0x16b)]=_0x56d02e,this[_0x3d775f(0x19c)]=_0x340f06,this[_0x3d775f(0x178)]();}[_0x3b7018(0x178)](){const _0xdaf4e2=_0x3b7018;this[_0xdaf4e2(0x16b)][_0xdaf4e2(0x1a2)]=this[_0xdaf4e2(0x19c)],this[_0xdaf4e2(0x16b)][_0xdaf4e2(0x1aa)]=!0x1;}};f=te([M(0x0,_0x157173),M(0x1,_0x1e2688(S))],f);var se=Object[_0x3b7018(0x172)],oe=Object[_0x3b7018(0x16e)],ne=(_0x5c7771,_0x17c8e0,_0x71860b)=>_0x17c8e0 in _0x5c7771?se(_0x5c7771,_0x17c8e0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x71860b}):_0x5c7771[_0x17c8e0]=_0x71860b,ie=(_0xa176c9,_0x133c85,_0x13261e,_0xc9b9cb)=>{for(var _0x2f450a=_0xc9b9cb>0x1?void 0x0:_0xc9b9cb?oe(_0x133c85,_0x13261e):_0x133c85,_0xdc9b1d=_0xa176c9['length']-0x1,_0x335093;_0xdc9b1d>=0x0;_0xdc9b1d--)(_0x335093=_0xa176c9[_0xdc9b1d])&&(_0x2f450a=_0x335093(_0x2f450a)||_0x2f450a);return _0x2f450a;},N=(_0x34c085,_0x4d792f)=>(_0x3947c4,_0x289198)=>_0x4d792f(_0x3947c4,_0x289198,_0x34c085),$=(_0x508609,_0x3a3df8,_0x41f5d9)=>ne(_0x508609,typeof _0x3a3df8!=_0x3b7018(0x177)?_0x3a3df8+'':_0x3a3df8,_0x41f5d9);let g=class extends _0x1b255f{constructor(_0x1e95fb=O,_0x59cabc,_0xcc4387){const _0xe5afbe=_0x3b7018;super(),this['_config']=_0x1e95fb,this[_0xe5afbe(0x1ca)]=_0x59cabc,this[_0xe5afbe(0x1a3)]=_0xcc4387;const {..._0x57afd3}=_0x5440b3({},O,this[_0xe5afbe(0x1ac)]);this[_0xe5afbe(0x1a3)]['setConfig'](z,_0x57afd3);}[_0x3b7018(0x169)](){[[S],[f],[_]]['forEach'](_0x537ca9=>{const _0x408f56=_0x57ef;this[_0x408f56(0x1ca)][_0x408f56(0x1a1)](_0x537ca9);});}['onReady'](){const _0x714313=_0x3b7018;this[_0x714313(0x1ca)][_0x714313(0x1b7)](f),this[_0x714313(0x1ca)][_0x714313(0x1b7)](_);}};$(g,'pluginName',W),$(g,_0x3b7018(0x198),_0x436a4f['UNIVER_UNKNOWN']),g=ie([_0x3b1e4a(_0x3fa00c,_0x4be6b4,_0x2ee970),N(0x1,_0x1e2688(_0x343e65)),N(0x2,_0x3c3e28)],g);function _0x1e99(){const _0x3b6872=['/edit','values','getOwnPropertyDescriptor','thread-comment-data-source.config','9WvBtxi','rangeId','defineProperty','getCurrentUser','parentId','2405nVblYD','format','symbol','_initDataSource','Edit','saveCommentToSnapshot','getUser','listComments','rangeType','payload','3316080HDJYQc','YYYY/MM/DD\x20HH:mm','parse','updateComment','186642bKIKYD','_initUserSync','_threadCommentModel','replyId','deleteComment','getUnit','subscribe','length','/universer-api/comment/unit/','personId','/delete','map','UNRECOGNIZED','1630622aJmqBx','find','/solved','forEach','replies','code','solved','userId','type','comments','_userService','slice','_threadCommentDataSource','content','unitId','createTimestamp','requireSession','add','dataSource','_configService','_init','getMemberID','Add','COMMENT','addUser','Solved','syncUpdateMutationToColla','77547cDfQWA','_config','1607720mHgSAy','Solve','_commentService','customRanges','_httpService','body','user','_sessionService','OpenOrReOpen','stringify','get','/list','users','addComment','post','Unknown','1206wUzjEw','filter','Delete','Reply','/reply','resolveComment','threadId','disposeWithMe','error','6fhxVFL','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','reply','userID','_injector','12416rlUIxW','/universer-api/user/list','commentUpdate$','onStarting','getComment','_threadCommentDataSourceService'];_0x1e99=function(){return _0x3b6872;};return _0x1e99();}export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x37cc8a,_0x1b65ef){const _0x221d55=_0x2753,_0x1be6a4=_0x37cc8a();while(!![]){try{const _0xc2a873=parseInt(_0x221d55(0xbc))/0x1+parseInt(_0x221d55(0x106))/0x2*(parseInt(_0x221d55(0xff))/0x3)+parseInt(_0x221d55(0xd1))/0x4*(-parseInt(_0x221d55(0xd9))/0x5)+-parseInt(_0x221d55(0x100))/0x6*(parseInt(_0x221d55(0xd4))/0x7)+parseInt(_0x221d55(0xfd))/0x8+parseInt(_0x221d55(0xea))/0x9+-parseInt(_0x221d55(0x11a))/0xa*(-parseInt(_0x221d55(0xcf))/0xb);if(_0xc2a873===_0x1b65ef)break;else _0x1be6a4['push'](_0x1be6a4['shift']());}catch(_0x2ad85c){_0x1be6a4['push'](_0x1be6a4['shift']());}}}(_0x28b2,0x45600),function(_0x249af6,_0x14708d){const _0x30ef8f=_0x2753;typeof exports=='object'&&typeof module<'u'?_0x14708d(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==_0x30ef8f(0x105)&&define[_0x30ef8f(0x126)]?define(['exports',_0x30ef8f(0xdd),'@univerjs-pro/license','@univerjs/core','@univerjs/thread-comment-ui',_0x30ef8f(0x11f),'rxjs','@univerjs/network'],_0x14708d):(_0x249af6=typeof globalThis<'u'?globalThis:_0x249af6||self,_0x14708d(_0x249af6[_0x30ef8f(0x104)]={},_0x249af6[_0x30ef8f(0xe6)],_0x249af6[_0x30ef8f(0x103)],_0x249af6['UniverCore'],_0x249af6[_0x30ef8f(0xe7)],_0x249af6[_0x30ef8f(0x122)],_0x249af6[_0x30ef8f(0x127)],_0x249af6[_0x30ef8f(0xce)]));}(this,function(_0x2a173f,_0x4e96c1,_0x41ea6f,_0x701864,_0x41d610,_0x232bab,_0x3cdf42,_0x23cd16){'use strict';const _0x31ac0b=_0x2753;const _0x4b06f5=_0x31ac0b(0xf4);var _0x4e8a3d=(_0x15d683=>(_0x15d683[_0x15d683['OpenOrReOpen']=0x0]=_0x31ac0b(0xef),_0x15d683[_0x15d683[_0x31ac0b(0x121)]=0x1]='Solved',_0x15d683[_0x15d683[_0x31ac0b(0xc5)]=-0x1]=_0x31ac0b(0xc5),_0x15d683))(_0x4e8a3d||{}),_0x2b85cf=(_0xbef567=>(_0xbef567[_0xbef567['Unknown']=0x0]='Unknown',_0xbef567[_0xbef567['Add']=0x1]=_0x31ac0b(0x12b),_0xbef567[_0xbef567['Reply']=0x2]=_0x31ac0b(0x129),_0xbef567[_0xbef567[_0x31ac0b(0xc7)]=0x3]=_0x31ac0b(0xc7),_0xbef567[_0xbef567['Delete']=0x4]='Delete',_0xbef567[_0xbef567[_0x31ac0b(0x109)]=0x5]=_0x31ac0b(0x109),_0xbef567[_0xbef567['UNRECOGNIZED']=-0x1]=_0x31ac0b(0xc5),_0xbef567))(_0x2b85cf||{});const _0x2591e5=_0x393598=>_0x701864['dayjs'](new Date(+_0x393598))[_0x31ac0b(0x114)](_0x31ac0b(0xd8)),_0x2d0687=async(_0x135450,_0x29ae36)=>{const _0x370392=_0x31ac0b,_0x21234c=_0x135450[_0x370392(0xfc)](_0x701864['UserManagerService']),_0x2434f1=_0x135450['get'](_0x23cd16[_0x370392(0xb9)]);_0x29ae36['forEach'](_0x2e709a=>{_0x21234c['getUser'](_0x2e709a)&&_0x29ae36['delete'](_0x2e709a);}),_0x29ae36[_0x370392(0xbb)]&&(await _0x2434f1[_0x370392(0xfc)]('/universer-api/user/list',{'params':{'userIDs':[..._0x29ae36]}}))[_0x370392(0xdc)][_0x370392(0x110)][_0x370392(0xc3)](_0x4afe2e=>{const _0x35d69a=_0x370392;_0x4afe2e&&_0x21234c[_0x35d69a(0xcb)](_0x4afe2e);});};var _0x36d332=Object[_0x31ac0b(0x107)],_0x315d58=(_0x265abc,_0x5c4709,_0x48002f,_0x42b6f7)=>{const _0x32fbff=_0x31ac0b;for(var _0x2da0ab=_0x42b6f7>0x1?void 0x0:_0x42b6f7?_0x36d332(_0x5c4709,_0x48002f):_0x5c4709,_0x3562e7=_0x265abc[_0x32fbff(0x10b)]-0x1,_0x1c9849;_0x3562e7>=0x0;_0x3562e7--)(_0x1c9849=_0x265abc[_0x3562e7])&&(_0x2da0ab=_0x1c9849(_0x2da0ab)||_0x2da0ab);return _0x2da0ab;},_0x55c261=(_0x5b3636,_0x46e825)=>(_0x4d719a,_0x4c561a)=>_0x46e825(_0x4d719a,_0x4c561a,_0x5b3636);let _0x2b3e43=class extends _0x701864[_0x31ac0b(0x101)]{constructor(_0x479c56,_0xdf596b,_0x510f5d,_0x58a06e){const _0x23b40a=_0x31ac0b;super(),this['_commentService']=_0x479c56,this[_0x23b40a(0xe4)]=_0xdf596b,this[_0x23b40a(0x124)]=_0x510f5d,this[_0x23b40a(0x11e)]=_0x58a06e,this[_0x23b40a(0xf6)](),this['_initUserSync']();}[_0x31ac0b(0xbe)](){const _0xbc9bc3=_0x31ac0b;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0xbc9bc3(0x123)](_0x3cdf42[_0xbc9bc3(0x11b)](0x10))[_0xbc9bc3(0x12a)](_0x1b3f85=>{const _0x4f881d=_0xbc9bc3,_0x38de33=new Set();_0x1b3f85['forEach'](_0x5d1dde=>{const _0x91f7ff=_0x2753;if(_0x5d1dde[_0x91f7ff(0xd3)]===_0x91f7ff(0xf8)){const _0x599f81=_0x5d1dde[_0x91f7ff(0xf1)][_0x91f7ff(0x112)];_0x38de33[_0x91f7ff(0xf8)](_0x599f81);}}),_0x2d0687(this[_0x4f881d(0x11e)],_0x38de33);}));}[_0x31ac0b(0xf6)](){const _0x34d7ed=_0x31ac0b;this[_0x34d7ed(0xc6)](this['_commentService']['commentUpdate$']['subscribe'](async _0x3144c5=>{const _0x4e1791=_0x34d7ed;var _0x2088bd,_0x277f28,_0x4676cc,_0x15c347;const _0xaa6f74=(_0x2088bd=this[_0x4e1791(0xe4)][_0x4e1791(0xba)](_0x3144c5['unitId'])[_0x4e1791(0xb3)](_0x5312c5=>_0x5312c5[_0x4e1791(0x10d)]===_0x3144c5['threadId']))==null?void 0x0:_0x2088bd['root'];if(!_0xaa6f74)return;const {unitId:_0x41354e,subUnitId:_0x1c7ee6}=_0xaa6f74;switch(_0x3144c5['user']&&this['_userService'][_0x4e1791(0xcb)](_0x3144c5[_0x4e1791(0xc2)]),_0x3144c5[_0x4e1791(0xd3)]){case _0x2b85cf[_0x4e1791(0x12b)]:break;case _0x2b85cf[_0x4e1791(0x129)]:{this['_threadCommentModel'][_0x4e1791(0x11c)](_0x41354e,_0x1c7ee6,{'unitId':_0x41354e,'subUnitId':_0x1c7ee6,'ref':'','id':_0x3144c5[_0x4e1791(0xc8)],'dT':_0x2591e5(+_0x3144c5[_0x4e1791(0x120)]),'threadId':_0x3144c5[_0x4e1791(0x10d)],'personId':(_0x4676cc=(_0x277f28=_0x3144c5[_0x4e1791(0xc2)])==null?void 0x0:_0x277f28[_0x4e1791(0x12c)])!=null?_0x4676cc:_0x3144c5[_0x4e1791(0x12f)],'text':JSON[_0x4e1791(0x102)](_0x3144c5[_0x4e1791(0xf9)]),'parentId':_0xaa6f74['id']});break;}case _0x2b85cf[_0x4e1791(0xc1)]:{const _0x42abc7=this[_0x4e1791(0xe4)]['getComment'](_0x41354e,_0x1c7ee6,_0x3144c5[_0x4e1791(0xc8)]);_0x42abc7&&_0x42abc7[_0x4e1791(0xf3)]&&this[_0x4e1791(0xe4)][_0x4e1791(0xf7)](_0x41354e,_0x1c7ee6,_0x3144c5[_0x4e1791(0xc8)]);break;}case _0x2b85cf[_0x4e1791(0xc7)]:{this['_threadCommentModel'][_0x4e1791(0xd2)](_0x41354e,_0x1c7ee6,{'commentId':_0x3144c5[_0x4e1791(0xc8)],'text':JSON[_0x4e1791(0x102)](_0x3144c5[_0x4e1791(0xf9)])});break;}case _0x2b85cf[_0x4e1791(0x109)]:{const _0x14d91a=(_0x15c347=this[_0x4e1791(0xe4)][_0x4e1791(0xba)](_0x3144c5[_0x4e1791(0xf5)])['find'](_0xe199a2=>_0xe199a2[_0x4e1791(0x10d)]===_0x3144c5[_0x4e1791(0x10d)]))==null?void 0x0:_0x15c347[_0x4e1791(0xfe)];_0x14d91a&&this[_0x4e1791(0xe4)][_0x4e1791(0xee)](_0x41354e,_0x1c7ee6,_0x14d91a['id'],_0x3144c5[_0x4e1791(0x118)]===_0x4e8a3d[_0x4e1791(0x121)]);break;}}}));}};_0x2b3e43=_0x315d58([_0x55c261(0x0,_0x701864[_0x31ac0b(0xe8)](_0x4e96c1['CommentService'])),_0x55c261(0x1,_0x701864[_0x31ac0b(0xe8)](_0x232bab['ThreadCommentModel'])),_0x55c261(0x2,_0x701864[_0x31ac0b(0xe8)](_0x701864['UserManagerService'])),_0x55c261(0x3,_0x701864[_0x31ac0b(0xe8)](_0x701864[_0x31ac0b(0xca)]))],_0x2b3e43);const _0x32b32a=_0x31ac0b(0xec),_0x3b126d={};var _0x4b87a8=Object[_0x31ac0b(0x107)],_0x422342=(_0x42c5e9,_0x4afe69,_0x4d5f3b,_0xb64c8e)=>{for(var _0x2742fe=_0xb64c8e>0x1?void 0x0:_0xb64c8e?_0x4b87a8(_0x4afe69,_0x4d5f3b):_0x4afe69,_0xc48573=_0x42c5e9['length']-0x1,_0x369f02;_0xc48573>=0x0;_0xc48573--)(_0x369f02=_0x42c5e9[_0xc48573])&&(_0x2742fe=_0x369f02(_0x2742fe)||_0x2742fe);return _0x2742fe;},_0x422c76=(_0xced758,_0x45526b)=>(_0x40d639,_0x273e15)=>_0x45526b(_0x40d639,_0x273e15,_0xced758);function _0x4d4293(_0xe5797b,_0x4254da){const _0x3a326e=_0x31ac0b,_0x5da552=_0xe5797b[_0x3a326e(0x128)][0x0];return{..._0x4254da,'id':_0x5da552[_0x3a326e(0xc8)],'resolved':_0xe5797b[_0x3a326e(0x118)]===0x1,'dT':_0x2591e5(_0x5da552[_0x3a326e(0x120)]),'personId':_0x5da552[_0x3a326e(0x12f)],'threadId':_0x5da552[_0x3a326e(0x10d)]};}function _0x15f7e0(_0x3fe78d,_0x4a30e1,_0x19ed9a){const _0x3fc5b8=_0x31ac0b;var _0x429380,_0x4c7b22;if(((_0x4c7b22=(_0x429380=_0x3fe78d==null?void 0x0:_0x3fe78d[_0x3fc5b8(0x128)])==null?void 0x0:_0x429380['length'])!=null?_0x4c7b22:0x0)>0x0){const _0x286fe2=(_0x292b51,_0x3f4625)=>({'id':_0x292b51['replyId'],'threadId':_0x292b51[_0x3fc5b8(0x10d)],'dT':_0x2591e5(_0x292b51['createTimestamp']),'personId':_0x292b51[_0x3fc5b8(0x12f)],'resolved':_0x3fe78d['solved']===_0x4e8a3d[_0x3fc5b8(0x121)],'unitId':_0x4a30e1,'subUnitId':_0x19ed9a,'text':JSON[_0x3fc5b8(0x102)](_0x292b51['content']),'parentId':_0x3f4625}),_0x6d0a25=_0x286fe2(_0x3fe78d[_0x3fc5b8(0x128)][0x0]);return{..._0x6d0a25,'children':_0x3fe78d['replies'][_0x3fc5b8(0x117)](0x1)['map'](_0x4aad15=>_0x286fe2(_0x4aad15,_0x6d0a25['id']))};}return null;}let _0x26d1e9=class{constructor(_0x46214a,_0x5e271c,_0x2446ac){const _0x17177b=_0x31ac0b;this[_0x17177b(0xd5)]=_0x46214a,this[_0x17177b(0x124)]=_0x5e271c,this[_0x17177b(0xb8)]=_0x2446ac;}async['addComment'](_0xc7efde){const _0x2d1853=_0x31ac0b;var _0x2c5b4c,_0x483e6f;const {parentId:_0x849c18,unitId:_0x97f01c,text:_0x5ccfa5,threadId:_0x17991f}=_0xc7efde,_0x1840ba=(_0x483e6f=(_0x2c5b4c=_0x5ccfa5['customRanges'])==null?void 0x0:_0x2c5b4c[_0x2d1853(0x10e)](_0xfb8d50=>_0xfb8d50[_0x2d1853(0x111)]===_0x701864[_0x2d1853(0x125)][_0x2d1853(0x12d)])[_0x2d1853(0xf2)](_0x4a00c3=>_0x4a00c3[_0x2d1853(0xde)]))!=null?_0x483e6f:[],_0x1e9ef5=JSON[_0x2d1853(0xed)](_0x5ccfa5),_0x55eb86=(await this['_sessionService'][_0x2d1853(0x115)](_0x97f01c))['getMemberID']();if(_0x849c18){const _0x14ea24={'memberId':_0x55eb86,'unitId':_0x97f01c,'content':_0x1e9ef5,'mention':_0x1840ba,'threadId':_0x17991f},_0x2e2c24=(await this[_0x2d1853(0xd5)][_0x2d1853(0x130)](_0x2d1853(0xcc)+_0x97f01c+_0x2d1853(0xb5),{'body':_0x14ea24}))[_0x2d1853(0xdc)][_0x2d1853(0xb6)];return{..._0xc7efde,'id':_0x2e2c24[_0x2d1853(0xc8)],'dT':_0x701864[_0x2d1853(0xfb)](+_0x2e2c24[_0x2d1853(0x120)])[_0x2d1853(0x114)](_0x2d1853(0xd8)),'personId':_0x2e2c24[_0x2d1853(0x12f)]};}else{const _0x3ca3c8={'memberId':_0x55eb86,'unitId':_0x97f01c,'content':_0x1e9ef5,'mention':_0x1840ba},_0x43c563=await this[_0x2d1853(0xd5)][_0x2d1853(0x130)](_0x2d1853(0xcc)+_0x97f01c+'/add',{'body':_0x3ca3c8});return _0x4d4293(_0x43c563[_0x2d1853(0xdc)]['comment'],_0xc7efde);}}async['updateComment'](_0x382e76){const _0x233c73=_0x31ac0b;var _0x5abf05,_0x8b7337;const {text:_0x282102,unitId:_0x2772b1}=_0x382e76,_0x6dfcc1=(_0x8b7337=(_0x5abf05=_0x282102['customRanges'])==null?void 0x0:_0x5abf05['filter'](_0x519c2b=>_0x519c2b[_0x233c73(0x111)]===_0x701864['CustomRangeType']['COMMENT'])[_0x233c73(0xf2)](_0x23e2bb=>_0x23e2bb[_0x233c73(0xde)]))!=null?_0x8b7337:[],_0x3f1f0d=JSON[_0x233c73(0xed)](_0x282102),_0x1cb79c=_0x382e76[_0x233c73(0x10d)],_0x451804=_0x382e76['id'],_0x50289f={'memberId':(await this[_0x233c73(0xb8)]['requireSession'](_0x2772b1))['getMemberID'](),'unitId':_0x2772b1,'threadId':_0x1cb79c,'mention':_0x6dfcc1,'content':_0x3f1f0d,'replyId':_0x451804},_0x40dc72=await this[_0x233c73(0xd5)][_0x233c73(0x130)](_0x233c73(0xcc)+_0x2772b1+'/edit',{'body':_0x50289f});return!_0x40dc72['body'][_0x233c73(0x10f)]||_0x40dc72[_0x233c73(0xdc)][_0x233c73(0x10f)]['code']===0x1;}async['resolveComment'](_0xe30df7){const _0x2e6f43=_0x31ac0b,{unitId:_0x11b55a}=_0xe30df7,_0x1cd960=_0xe30df7[_0x2e6f43(0x10d)],_0x3c9c21={'memberId':this['_userService'][_0x2e6f43(0xd6)]()['userID'],'unitId':_0x11b55a,'threadId':_0x1cd960,'solved':_0xe30df7[_0x2e6f43(0xe3)]?_0x4e8a3d[_0x2e6f43(0x121)]:_0x4e8a3d[_0x2e6f43(0xef)]},_0x3de757=await this[_0x2e6f43(0xd5)]['post'](_0x2e6f43(0xcc)+_0x11b55a+_0x2e6f43(0xb7),{'body':_0x3c9c21});return!_0x3de757[_0x2e6f43(0xdc)][_0x2e6f43(0x10f)]||_0x3de757[_0x2e6f43(0xdc)]['error'][_0x2e6f43(0x134)]===0x1;}async[_0x31ac0b(0xf7)](_0x4d2a85,_0x57c281,_0x7a1648,_0x25f70d){const _0x1080a5=_0x31ac0b,_0x37a241={'memberId':(await this[_0x1080a5(0xb8)][_0x1080a5(0x115)](_0x4d2a85))[_0x1080a5(0xd7)](),'threadId':_0x7a1648,'replyId':_0x25f70d,'unitId':_0x4d2a85},_0x56afbf=await this[_0x1080a5(0xd5)]['post'](_0x1080a5(0xcc)+_0x4d2a85+_0x1080a5(0xc0),{'body':_0x37a241});return!_0x56afbf[_0x1080a5(0xdc)][_0x1080a5(0x10f)]||_0x56afbf['body']['error'][_0x1080a5(0x134)]===0x1;}async['listComments'](_0x3540c6,_0x57adf4,_0x1f3eab){const _0x5b69bc=_0x31ac0b,_0x2efeb2={'unitId':_0x3540c6,'threadId':_0x1f3eab},_0x285252=await this[_0x5b69bc(0xd5)]['post'](_0x5b69bc(0xcc)+_0x3540c6+_0x5b69bc(0x108),{'body':_0x2efeb2}),_0x17fcb8=_0x1f3eab[_0x5b69bc(0xf2)](_0x4564f0=>_0x15f7e0(_0x285252['body'][_0x5b69bc(0x119)][_0x4564f0],_0x3540c6,_0x57adf4))['filter'](Boolean);return Object[_0x5b69bc(0xeb)](_0x285252[_0x5b69bc(0xdc)][_0x5b69bc(0x110)])[_0x5b69bc(0xc3)](_0x5eb8f8=>{const _0x4fe953=_0x5b69bc;this[_0x4fe953(0x124)]['addUser'](_0x5eb8f8);}),_0x17fcb8;}[_0x31ac0b(0xbf)](_0x2126e8){const _0x1790b3=_0x31ac0b;return{'id':_0x2126e8['id'],'threadId':_0x2126e8[_0x1790b3(0x10d)],'ref':_0x2126e8[_0x1790b3(0xda)]};}};_0x26d1e9=_0x422342([_0x422c76(0x0,_0x701864[_0x31ac0b(0xe8)](_0x23cd16[_0x31ac0b(0xb9)])),_0x422c76(0x1,_0x701864[_0x31ac0b(0xe8)](_0x701864[_0x31ac0b(0x10a)])),_0x422c76(0x2,_0x701864[_0x31ac0b(0xe8)](_0x4e96c1[_0x31ac0b(0x113)]))],_0x26d1e9);var _0x2912b7=Object[_0x31ac0b(0x107)],_0x4c61c3=(_0x41fa46,_0x4e2ef7,_0x27fe23,_0x15513d)=>{const _0x5706fa=_0x31ac0b;for(var _0x4cbd8c=_0x15513d>0x1?void 0x0:_0x15513d?_0x2912b7(_0x4e2ef7,_0x27fe23):_0x4e2ef7,_0xd6f053=_0x41fa46[_0x5706fa(0x10b)]-0x1,_0x11c6a5;_0xd6f053>=0x0;_0xd6f053--)(_0x11c6a5=_0x41fa46[_0xd6f053])&&(_0x4cbd8c=_0x11c6a5(_0x4cbd8c)||_0x4cbd8c);return _0x4cbd8c;},_0x4ae0c7=(_0x137205,_0x56f2bf)=>(_0x212996,_0x170f97)=>_0x56f2bf(_0x212996,_0x170f97,_0x137205);let _0x5892da=class extends _0x701864[_0x31ac0b(0x101)]{constructor(_0x4ca598,_0x20bcf4){const _0x4fedb8=_0x31ac0b;super(),this['_threadCommentDataSourceService']=_0x4ca598,this[_0x4fedb8(0x131)]=_0x20bcf4,this[_0x4fedb8(0x11d)]();}[_0x31ac0b(0x11d)](){const _0x46b567=_0x31ac0b;this[_0x46b567(0x116)]['dataSource']=this[_0x46b567(0x131)],this[_0x46b567(0x116)][_0x46b567(0x132)]=!0x1;}};_0x5892da=_0x4c61c3([_0x4ae0c7(0x0,_0x232bab[_0x31ac0b(0x133)]),_0x4ae0c7(0x1,_0x701864[_0x31ac0b(0xe8)](_0x26d1e9))],_0x5892da);var _0x1cb282=Object[_0x31ac0b(0xf0)],_0x34e6bd=Object[_0x31ac0b(0x107)],_0x36f5c4=(_0x4bd9a4,_0x46bccb,_0x1b518f)=>_0x46bccb in _0x4bd9a4?_0x1cb282(_0x4bd9a4,_0x46bccb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1b518f}):_0x4bd9a4[_0x46bccb]=_0x1b518f,_0x1d45ee=(_0x3ff03d,_0x1d50cf,_0x297d3b,_0x292401)=>{const _0x529e5d=_0x31ac0b;for(var _0x5c8a86=_0x292401>0x1?void 0x0:_0x292401?_0x34e6bd(_0x1d50cf,_0x297d3b):_0x1d50cf,_0xc3721=_0x3ff03d[_0x529e5d(0x10b)]-0x1,_0x295b32;_0xc3721>=0x0;_0xc3721--)(_0x295b32=_0x3ff03d[_0xc3721])&&(_0x5c8a86=_0x295b32(_0x5c8a86)||_0x5c8a86);return _0x5c8a86;},_0x455bf7=(_0x4a0be0,_0x272705)=>(_0x28d1a8,_0x203d29)=>_0x272705(_0x28d1a8,_0x203d29,_0x4a0be0),_0x4c075c=(_0x4812a0,_0x10f184,_0x22619e)=>_0x36f5c4(_0x4812a0,typeof _0x10f184!='symbol'?_0x10f184+'':_0x10f184,_0x22619e);_0x2a173f[_0x31ac0b(0xfa)]=class extends _0x701864[_0x31ac0b(0xdb)]{constructor(_0x263496=_0x3b126d,_0x1374fb,_0x35542c){const _0x4f3183=_0x31ac0b;super(),this[_0x4f3183(0xc4)]=_0x263496,this[_0x4f3183(0x11e)]=_0x1374fb,this[_0x4f3183(0x10c)]=_0x35542c;const {..._0x346384}=_0x701864[_0x4f3183(0xe2)]({},_0x3b126d,this[_0x4f3183(0xc4)]);this[_0x4f3183(0x10c)][_0x4f3183(0xe0)](_0x32b32a,_0x346384);}['onStarting'](){[[_0x26d1e9],[_0x5892da],[_0x2b3e43]]['forEach'](_0x236ecd=>{const _0x521d30=_0x2753;this[_0x521d30(0x11e)][_0x521d30(0xf8)](_0x236ecd);});}[_0x31ac0b(0xe9)](){const _0x44ee27=_0x31ac0b;this['_injector']['get'](_0x5892da),this[_0x44ee27(0x11e)]['get'](_0x2b3e43);}},_0x4c075c(_0x2a173f[_0x31ac0b(0xfa)],_0x31ac0b(0xe5),_0x4b06f5),_0x4c075c(_0x2a173f[_0x31ac0b(0xfa)],'type',_0x701864[_0x31ac0b(0xcd)][_0x31ac0b(0xb4)]),_0x2a173f[_0x31ac0b(0xfa)]=_0x1d45ee([_0x701864[_0x31ac0b(0xdf)](_0x41d610['UniverThreadCommentUIPlugin'],_0x4e96c1[_0x31ac0b(0xd0)],_0x41ea6f[_0x31ac0b(0xe1)]),_0x455bf7(0x1,_0x701864['Inject'](_0x701864[_0x31ac0b(0xca)])),_0x455bf7(0x2,_0x701864[_0x31ac0b(0xbd)])],_0x2a173f[_0x31ac0b(0xfa)]),Object[_0x31ac0b(0xf0)](_0x2a173f,Symbol[_0x31ac0b(0x12e)],{'value':_0x31ac0b(0xc9)});}));function _0x2753(_0x34805a,_0xe2a37d){_0x34805a=_0x34805a-0xb3;const _0x28b215=_0x28b2();let _0x275318=_0x28b215[_0x34805a];return _0x275318;}function _0x28b2(){const _0x47ed50=['_userService','CustomRangeType','amd','rxjs','replies','Reply','subscribe','Add','userID','COMMENT','toStringTag','userId','post','_threadCommentDataSource','syncUpdateMutationToColla','IThreadCommentDataSourceService','code','find','UNIVER_UNKNOWN','/reply','reply','/solved','_sessionService','HTTPService','getUnit','size','271782tzfgOl','IConfigService','_initUserSync','saveCommentToSnapshot','/delete','Delete','user','forEach','_config','UNRECOGNIZED','disposeWithMe','Edit','replyId','Module','Injector','addUser','/universer-api/comment/unit/','UniverInstanceType','UniverNetwork','1705aFjmBA','UniverCollaborationClientPlugin','48folUnR','updateComment','type','206227lVFcbQ','_httpService','getCurrentUser','getMemberID','YYYY/MM/DD\x20HH:mm','103360FiThTt','ref','Plugin','body','@univerjs-pro/collaboration-client','rangeId','DependentOn','setConfig','UniverLicensePlugin','merge','resolved','_threadCommentModel','pluginName','UniverProCollaborationClient','UniverThreadCommentUi','Inject','onReady','1281240ucTilx','values','thread-comment-data-source.config','stringify','resolveComment','OpenOrReOpen','defineProperty','payload','map','parentId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','_init','deleteComment','add','content','UniverThreadCommentDataSourcePlugin','dayjs','get','1778336EGChzj','root','758892wRkYBy','114Igrbvo','Disposable','parse','UniverProLicense','UniverProThreadCommentDatasource','function','2yDMxaF','getOwnPropertyDescriptor','/list','Solve','UserManagerService','length','_configService','threadId','filter','error','users','rangeType','personId','CollaborationSessionService','format','requireSession','_threadCommentDataSourceService','slice','solved','comments','13070hgmWrV','bufferTime','addComment','_initDataSource','_injector','@univerjs/thread-comment','createTimestamp','Solved','UniverThreadComment','pipe'];_0x28b2=function(){return _0x47ed50;};return _0x28b2();}
|
|
1
|
+
function _0x19d1(_0x1c9157,_0x5ad39a){_0x1c9157=_0x1c9157-0x94;const _0x415bd3=_0x415b();let _0x19d19e=_0x415bd3[_0x1c9157];return _0x19d19e;}function _0x415b(){const _0x34cccb=['Delete','userId','_config','/add','98izylya','error','body','object','symbol','/edit','CommentService','dayjs','UniverProCollaborationClient','bufferTime','12030khCxSS','Reply','format','disposeWithMe','/solved','onStarting','Unknown','OpenOrReOpen','COMMENT','threadId','UNIVER_UNKNOWN','solved','requireSession','saveCommentToSnapshot','6cpObRN','length','replies','type','/list','pluginName','ThreadCommentModel','exports','4136555iYuaTX','stringify','code','/universer-api/comment/unit/','comments','addComment','CollaborationSessionService','user','deleteComment','users','listComments','_injector','userID','getCurrentUser','Injector','_threadCommentModel','updateComment','personId','parse','setConfig','UniverThreadCommentDataSourcePlugin','content','ref','createTimestamp','replyId','_commentService','thread-comment-data-source.config','getUser','function','customRanges','Solve','reply','@univerjs/core','rangeType','Add','get','1386UuVQtp','Solved','parentId','amd','UniverThreadComment','find','_userService','_sessionService','getUnit','UniverProThreadCommentDatasource','UniverNetwork','Disposable','forEach','14985553eprQlG','UserManagerService','toStringTag','Edit','UniverInstanceType','addUser','defineProperty','DependentOn','unitId','16KsmVcj','@univerjs-pro/license','UniverCollaborationClientPlugin','_httpService','getOwnPropertyDescriptor','@univerjs/thread-comment-ui','3299836CbVtbj','_init','CustomRangeType','resolveComment','rangeId','Inject','merge','commentUpdate$','_initDataSource','rxjs','Plugin','getComment','subscribe','UniverLicensePlugin','root','/universer-api/user/list','@univerjs-pro/collaboration-client','size','UNRECOGNIZED','/reply','_initUserSync','HTTPService','onReady','_configService','filter','comment','add','_threadCommentDataSourceService','374118vqDLNN','post','getMemberID','_threadCommentDataSource','6970gdxeCZ','@univerjs/thread-comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','363293vmSdXV','pipe','YYYY/MM/DD\x20HH:mm'];_0x415b=function(){return _0x34cccb;};return _0x415b();}(function(_0x8c8d5c,_0x3a05bc){const _0x579203=_0x19d1,_0x54f1bd=_0x8c8d5c();while(!![]){try{const _0x4ba793=parseInt(_0x579203(0xfc))/0x1*(-parseInt(_0x579203(0xf2))/0x2)+-parseInt(_0x579203(0xe3))/0x3+parseInt(_0x579203(0xc7))/0x4+parseInt(_0x579203(0x112))/0x5*(-parseInt(_0x579203(0x10a))/0x6)+parseInt(_0x579203(0xeb))/0x7*(-parseInt(_0x579203(0xc1))/0x8)+parseInt(_0x579203(0xab))/0x9*(-parseInt(_0x579203(0xe7))/0xa)+parseInt(_0x579203(0xb8))/0xb;if(_0x4ba793===_0x3a05bc)break;else _0x54f1bd['push'](_0x54f1bd['shift']());}catch(_0x492413){_0x54f1bd['push'](_0x54f1bd['shift']());}}}(_0x415b,0x6a1e3),function(_0x65ea5e,_0x25da2c){const _0x4f25ea=_0x19d1;typeof exports==_0x4f25ea(0xf5)&&typeof module<'u'?_0x25da2c(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==_0x4f25ea(0xa3)&&define[_0x4f25ea(0xae)]?define([_0x4f25ea(0x111),_0x4f25ea(0xd7),_0x4f25ea(0xc2),_0x4f25ea(0xa7),_0x4f25ea(0xc6),_0x4f25ea(0xe8),_0x4f25ea(0xd0),'@univerjs/network'],_0x25da2c):(_0x65ea5e=typeof globalThis<'u'?globalThis:_0x65ea5e||self,_0x25da2c(_0x65ea5e[_0x4f25ea(0xb4)]={},_0x65ea5e[_0x4f25ea(0xfa)],_0x65ea5e['UniverProLicense'],_0x65ea5e['UniverCore'],_0x65ea5e['UniverThreadCommentUi'],_0x65ea5e[_0x4f25ea(0xaf)],_0x65ea5e['rxjs'],_0x65ea5e[_0x4f25ea(0xb5)]));}(this,function(_0xe3f860,_0x47bbdb,_0x33f61f,_0x5f23ee,_0x28bfad,_0x432669,_0xc52aaa,_0x10c5d9){'use strict';const _0x24328d=_0x19d1;const _0x477cb7=_0x24328d(0xe9);var _0x524dff=(_0x56ad17=>(_0x56ad17[_0x56ad17['OpenOrReOpen']=0x0]=_0x24328d(0x103),_0x56ad17[_0x56ad17[_0x24328d(0xac)]=0x1]=_0x24328d(0xac),_0x56ad17[_0x56ad17[_0x24328d(0xd9)]=-0x1]=_0x24328d(0xd9),_0x56ad17))(_0x524dff||{}),_0x377416=(_0x5ea37f=>(_0x5ea37f[_0x5ea37f['Unknown']=0x0]=_0x24328d(0x102),_0x5ea37f[_0x5ea37f[_0x24328d(0xa9)]=0x1]=_0x24328d(0xa9),_0x5ea37f[_0x5ea37f[_0x24328d(0xfd)]=0x2]=_0x24328d(0xfd),_0x5ea37f[_0x5ea37f[_0x24328d(0xbb)]=0x3]=_0x24328d(0xbb),_0x5ea37f[_0x5ea37f[_0x24328d(0xee)]=0x4]='Delete',_0x5ea37f[_0x5ea37f['Solve']=0x5]='Solve',_0x5ea37f[_0x5ea37f[_0x24328d(0xd9)]=-0x1]='UNRECOGNIZED',_0x5ea37f))(_0x377416||{});const _0x2db87d=_0x20f47c=>_0x5f23ee[_0x24328d(0xf9)](new Date(+_0x20f47c))['format'](_0x24328d(0xed)),_0x3b4c06=async(_0x592757,_0x5d9120)=>{const _0x551a30=_0x24328d,_0x2d0e52=_0x592757[_0x551a30(0xaa)](_0x5f23ee[_0x551a30(0xb9)]),_0x38542c=_0x592757['get'](_0x10c5d9[_0x551a30(0xdc)]);_0x5d9120[_0x551a30(0xb7)](_0x4b9194=>{const _0x54d99d=_0x551a30;_0x2d0e52[_0x54d99d(0xa2)](_0x4b9194)&&_0x5d9120['delete'](_0x4b9194);}),_0x5d9120[_0x551a30(0xd8)]&&(await _0x38542c[_0x551a30(0xaa)](_0x551a30(0xd6),{'params':{'userIDs':[..._0x5d9120]}}))[_0x551a30(0xf4)][_0x551a30(0x11b)][_0x551a30(0xb7)](_0x484f22=>{const _0x168755=_0x551a30;_0x484f22&&_0x2d0e52[_0x168755(0xbd)](_0x484f22);});};var _0x2042b9=Object[_0x24328d(0xc5)],_0x506c8a=(_0x4b81bb,_0x4ab774,_0x202afb,_0x2d3cc2)=>{for(var _0x49d1d1=_0x2d3cc2>0x1?void 0x0:_0x2d3cc2?_0x2042b9(_0x4ab774,_0x202afb):_0x4ab774,_0x5a8e2b=_0x4b81bb['length']-0x1,_0x3d3ae0;_0x5a8e2b>=0x0;_0x5a8e2b--)(_0x3d3ae0=_0x4b81bb[_0x5a8e2b])&&(_0x49d1d1=_0x3d3ae0(_0x49d1d1)||_0x49d1d1);return _0x49d1d1;},_0x40e85c=(_0x1de1bf,_0x54583c)=>(_0x3030d5,_0x79fd6)=>_0x54583c(_0x3030d5,_0x79fd6,_0x1de1bf);let _0x14696a=class extends _0x5f23ee[_0x24328d(0xb6)]{constructor(_0x582789,_0x386354,_0x1107f0,_0x2b89a1){const _0x4602e9=_0x24328d;super(),this['_commentService']=_0x582789,this[_0x4602e9(0x96)]=_0x386354,this[_0x4602e9(0xb1)]=_0x1107f0,this[_0x4602e9(0x11d)]=_0x2b89a1,this[_0x4602e9(0xc8)](),this['_initUserSync']();}[_0x24328d(0xdb)](){const _0x4e57b9=_0x24328d;this[_0x4e57b9(0xff)](this[_0x4e57b9(0x96)][_0x4e57b9(0xce)][_0x4e57b9(0xec)](_0xc52aaa[_0x4e57b9(0xfb)](0x10))[_0x4e57b9(0xd3)](_0x2c8d1e=>{const _0x5b4ff3=_0x4e57b9,_0x47cf54=new Set();_0x2c8d1e[_0x5b4ff3(0xb7)](_0x1ca676=>{const _0x4661e4=_0x5b4ff3;if(_0x1ca676[_0x4661e4(0x10d)]==='add'){const _0x15acfa=_0x1ca676['payload'][_0x4661e4(0x98)];_0x47cf54[_0x4661e4(0xe1)](_0x15acfa);}}),_0x3b4c06(this['_injector'],_0x47cf54);}));}['_init'](){const _0x16f2fa=_0x24328d;this[_0x16f2fa(0xff)](this[_0x16f2fa(0xa0)][_0x16f2fa(0xce)]['subscribe'](async _0x2f3f54=>{const _0x408ece=_0x16f2fa;var _0x1df2ef,_0x278585,_0x16ac01,_0x2a85c4;const _0x17e0d8=(_0x1df2ef=this[_0x408ece(0x96)]['getUnit'](_0x2f3f54[_0x408ece(0xc0)])[_0x408ece(0xb0)](_0x42a149=>_0x42a149[_0x408ece(0x105)]===_0x2f3f54[_0x408ece(0x105)]))==null?void 0x0:_0x1df2ef[_0x408ece(0xd5)];if(!_0x17e0d8)return;const {unitId:_0x2e9571,subUnitId:_0x3c52f1}=_0x17e0d8;switch(_0x2f3f54[_0x408ece(0x119)]&&this[_0x408ece(0xb1)][_0x408ece(0xbd)](_0x2f3f54['user']),_0x2f3f54[_0x408ece(0x10d)]){case _0x377416['Add']:break;case _0x377416[_0x408ece(0xfd)]:{this['_threadCommentModel'][_0x408ece(0x117)](_0x2e9571,_0x3c52f1,{'unitId':_0x2e9571,'subUnitId':_0x3c52f1,'ref':'','id':_0x2f3f54['replyId'],'dT':_0x2db87d(+_0x2f3f54[_0x408ece(0x9e)]),'threadId':_0x2f3f54['threadId'],'personId':(_0x16ac01=(_0x278585=_0x2f3f54[_0x408ece(0x119)])==null?void 0x0:_0x278585[_0x408ece(0x11e)])!=null?_0x16ac01:_0x2f3f54[_0x408ece(0xef)],'text':JSON[_0x408ece(0x99)](_0x2f3f54[_0x408ece(0x9c)]),'parentId':_0x17e0d8['id']});break;}case _0x377416['Delete']:{const _0x203835=this[_0x408ece(0x96)][_0x408ece(0xd2)](_0x2e9571,_0x3c52f1,_0x2f3f54[_0x408ece(0x9f)]);_0x203835&&_0x203835[_0x408ece(0xad)]&&this[_0x408ece(0x96)][_0x408ece(0x11a)](_0x2e9571,_0x3c52f1,_0x2f3f54[_0x408ece(0x9f)]);break;}case _0x377416[_0x408ece(0xbb)]:{this[_0x408ece(0x96)]['updateComment'](_0x2e9571,_0x3c52f1,{'commentId':_0x2f3f54[_0x408ece(0x9f)],'text':JSON[_0x408ece(0x99)](_0x2f3f54[_0x408ece(0x9c)])});break;}case _0x377416[_0x408ece(0xa5)]:{const _0x5ed378=(_0x2a85c4=this['_threadCommentModel'][_0x408ece(0xb3)](_0x2f3f54['unitId'])['find'](_0xbc6ea9=>_0xbc6ea9['threadId']===_0x2f3f54[_0x408ece(0x105)]))==null?void 0x0:_0x2a85c4[_0x408ece(0xd5)];_0x5ed378&&this['_threadCommentModel'][_0x408ece(0xca)](_0x2e9571,_0x3c52f1,_0x5ed378['id'],_0x2f3f54[_0x408ece(0x107)]===_0x524dff[_0x408ece(0xac)]);break;}}}));}};_0x14696a=_0x506c8a([_0x40e85c(0x0,_0x5f23ee[_0x24328d(0xcc)](_0x47bbdb[_0x24328d(0xf8)])),_0x40e85c(0x1,_0x5f23ee[_0x24328d(0xcc)](_0x432669[_0x24328d(0x110)])),_0x40e85c(0x2,_0x5f23ee[_0x24328d(0xcc)](_0x5f23ee[_0x24328d(0xb9)])),_0x40e85c(0x3,_0x5f23ee['Inject'](_0x5f23ee['Injector']))],_0x14696a);const _0x26ec19=_0x24328d(0xa1),_0x1b83d3={};var _0x14e280=Object[_0x24328d(0xc5)],_0x390f19=(_0x57238b,_0x4ed036,_0x4b5e91,_0x9a57c5)=>{const _0x1bddd2=_0x24328d;for(var _0x109805=_0x9a57c5>0x1?void 0x0:_0x9a57c5?_0x14e280(_0x4ed036,_0x4b5e91):_0x4ed036,_0x19c985=_0x57238b[_0x1bddd2(0x10b)]-0x1,_0xb229cc;_0x19c985>=0x0;_0x19c985--)(_0xb229cc=_0x57238b[_0x19c985])&&(_0x109805=_0xb229cc(_0x109805)||_0x109805);return _0x109805;},_0x178d10=(_0x3b7d79,_0x19e795)=>(_0x4ca7ab,_0x1600c7)=>_0x19e795(_0x4ca7ab,_0x1600c7,_0x3b7d79);function _0x1bc358(_0x51d43b,_0x46f5d4){const _0x4d39b9=_0x24328d,_0x48801b=_0x51d43b[_0x4d39b9(0x10c)][0x0];return{..._0x46f5d4,'id':_0x48801b[_0x4d39b9(0x9f)],'resolved':_0x51d43b[_0x4d39b9(0x107)]===0x1,'dT':_0x2db87d(_0x48801b[_0x4d39b9(0x9e)]),'personId':_0x48801b['userId'],'threadId':_0x48801b[_0x4d39b9(0x105)]};}function _0x5374ed(_0x4d2891,_0x396ec5,_0x2f5b84){const _0x27271d=_0x24328d;var _0x2d81d7,_0x4b9766;if(((_0x4b9766=(_0x2d81d7=_0x4d2891==null?void 0x0:_0x4d2891[_0x27271d(0x10c)])==null?void 0x0:_0x2d81d7[_0x27271d(0x10b)])!=null?_0x4b9766:0x0)>0x0){const _0x5a3a3f=(_0x105af2,_0x182561)=>({'id':_0x105af2['replyId'],'threadId':_0x105af2[_0x27271d(0x105)],'dT':_0x2db87d(_0x105af2[_0x27271d(0x9e)]),'personId':_0x105af2[_0x27271d(0xef)],'resolved':_0x4d2891[_0x27271d(0x107)]===_0x524dff[_0x27271d(0xac)],'unitId':_0x396ec5,'subUnitId':_0x2f5b84,'text':JSON[_0x27271d(0x99)](_0x105af2['content']),'parentId':_0x182561}),_0x5690a0=_0x5a3a3f(_0x4d2891[_0x27271d(0x10c)][0x0]);return{..._0x5690a0,'children':_0x4d2891['replies']['slice'](0x1)['map'](_0x2be0d0=>_0x5a3a3f(_0x2be0d0,_0x5690a0['id']))};}return null;}let _0x4b5181=class{constructor(_0x5ab4ef,_0x474b3e,_0x15d179){const _0xcacfe6=_0x24328d;this['_httpService']=_0x5ab4ef,this[_0xcacfe6(0xb1)]=_0x474b3e,this[_0xcacfe6(0xb2)]=_0x15d179;}async['addComment'](_0x4554e4){const _0x4f8eb3=_0x24328d;var _0x324b56,_0x4d34a7;const {parentId:_0xd7bd7,unitId:_0xb205d8,text:_0x4cd325,threadId:_0x458226}=_0x4554e4,_0x13342f=(_0x4d34a7=(_0x324b56=_0x4cd325[_0x4f8eb3(0xa4)])==null?void 0x0:_0x324b56[_0x4f8eb3(0xdf)](_0x9d1ab2=>_0x9d1ab2[_0x4f8eb3(0xa8)]===_0x5f23ee[_0x4f8eb3(0xc9)][_0x4f8eb3(0x104)])['map'](_0x5ba70e=>_0x5ba70e[_0x4f8eb3(0xcb)]))!=null?_0x4d34a7:[],_0x44a367=JSON[_0x4f8eb3(0x113)](_0x4cd325),_0x2b35e4=(await this[_0x4f8eb3(0xb2)][_0x4f8eb3(0x108)](_0xb205d8))[_0x4f8eb3(0xe5)]();if(_0xd7bd7){const _0x5cf9a8={'memberId':_0x2b35e4,'unitId':_0xb205d8,'content':_0x44a367,'mention':_0x13342f,'threadId':_0x458226},_0x3f0152=(await this[_0x4f8eb3(0xc4)]['post'](_0x4f8eb3(0x115)+_0xb205d8+_0x4f8eb3(0xda),{'body':_0x5cf9a8}))[_0x4f8eb3(0xf4)][_0x4f8eb3(0xa6)];return{..._0x4554e4,'id':_0x3f0152[_0x4f8eb3(0x9f)],'dT':_0x5f23ee[_0x4f8eb3(0xf9)](+_0x3f0152[_0x4f8eb3(0x9e)])[_0x4f8eb3(0xfe)](_0x4f8eb3(0xed)),'personId':_0x3f0152[_0x4f8eb3(0xef)]};}else{const _0x1a91d6={'memberId':_0x2b35e4,'unitId':_0xb205d8,'content':_0x44a367,'mention':_0x13342f},_0x3eb0d8=await this[_0x4f8eb3(0xc4)][_0x4f8eb3(0xe4)](_0x4f8eb3(0x115)+_0xb205d8+_0x4f8eb3(0xf1),{'body':_0x1a91d6});return _0x1bc358(_0x3eb0d8['body'][_0x4f8eb3(0xe0)],_0x4554e4);}}async[_0x24328d(0x97)](_0x4515c0){const _0x44447c=_0x24328d;var _0x4ca125,_0x793e73;const {text:_0xe4f8d7,unitId:_0x35bf99}=_0x4515c0,_0x1ab7e4=(_0x793e73=(_0x4ca125=_0xe4f8d7['customRanges'])==null?void 0x0:_0x4ca125[_0x44447c(0xdf)](_0x1bf68c=>_0x1bf68c['rangeType']===_0x5f23ee[_0x44447c(0xc9)][_0x44447c(0x104)])[_0x44447c(0xea)](_0x5d0c6a=>_0x5d0c6a[_0x44447c(0xcb)]))!=null?_0x793e73:[],_0x30fdd9=JSON['stringify'](_0xe4f8d7),_0x3e7bde=_0x4515c0['threadId'],_0x5a30dc=_0x4515c0['id'],_0x38e929={'memberId':(await this[_0x44447c(0xb2)][_0x44447c(0x108)](_0x35bf99))['getMemberID'](),'unitId':_0x35bf99,'threadId':_0x3e7bde,'mention':_0x1ab7e4,'content':_0x30fdd9,'replyId':_0x5a30dc},_0x2749cc=await this[_0x44447c(0xc4)]['post']('/universer-api/comment/unit/'+_0x35bf99+_0x44447c(0xf7),{'body':_0x38e929});return!_0x2749cc[_0x44447c(0xf4)]['error']||_0x2749cc[_0x44447c(0xf4)]['error'][_0x44447c(0x114)]===0x1;}async['resolveComment'](_0x118869){const _0x437c4c=_0x24328d,{unitId:_0x4c4ced}=_0x118869,_0x256176=_0x118869[_0x437c4c(0x105)],_0x2f36cc={'memberId':this[_0x437c4c(0xb1)][_0x437c4c(0x94)]()['userID'],'unitId':_0x4c4ced,'threadId':_0x256176,'solved':_0x118869['resolved']?_0x524dff['Solved']:_0x524dff['OpenOrReOpen']},_0x4d0f7e=await this[_0x437c4c(0xc4)][_0x437c4c(0xe4)]('/universer-api/comment/unit/'+_0x4c4ced+_0x437c4c(0x100),{'body':_0x2f36cc});return!_0x4d0f7e['body'][_0x437c4c(0xf3)]||_0x4d0f7e[_0x437c4c(0xf4)][_0x437c4c(0xf3)][_0x437c4c(0x114)]===0x1;}async[_0x24328d(0x11a)](_0xe30be0,_0x2a5cc0,_0x807434,_0x24b31a){const _0x12fa31=_0x24328d,_0x2232dc={'memberId':(await this['_sessionService'][_0x12fa31(0x108)](_0xe30be0))[_0x12fa31(0xe5)](),'threadId':_0x807434,'replyId':_0x24b31a,'unitId':_0xe30be0},_0x5ac639=await this['_httpService'][_0x12fa31(0xe4)](_0x12fa31(0x115)+_0xe30be0+'/delete',{'body':_0x2232dc});return!_0x5ac639[_0x12fa31(0xf4)][_0x12fa31(0xf3)]||_0x5ac639['body'][_0x12fa31(0xf3)][_0x12fa31(0x114)]===0x1;}async[_0x24328d(0x11c)](_0x415c17,_0x539bb3,_0x4ca7c9){const _0x4566d2=_0x24328d,_0x3eb453={'unitId':_0x415c17,'threadId':_0x4ca7c9},_0xa72922=await this[_0x4566d2(0xc4)][_0x4566d2(0xe4)]('/universer-api/comment/unit/'+_0x415c17+_0x4566d2(0x10e),{'body':_0x3eb453}),_0xf7dec0=_0x4ca7c9[_0x4566d2(0xea)](_0x531ad3=>_0x5374ed(_0xa72922[_0x4566d2(0xf4)][_0x4566d2(0x116)][_0x531ad3],_0x415c17,_0x539bb3))[_0x4566d2(0xdf)](Boolean);return Object['values'](_0xa72922[_0x4566d2(0xf4)][_0x4566d2(0x11b)])[_0x4566d2(0xb7)](_0x151b7b=>{const _0x196566=_0x4566d2;this['_userService'][_0x196566(0xbd)](_0x151b7b);}),_0xf7dec0;}[_0x24328d(0x109)](_0x5a2e89){const _0x5dc020=_0x24328d;return{'id':_0x5a2e89['id'],'threadId':_0x5a2e89[_0x5dc020(0x105)],'ref':_0x5a2e89[_0x5dc020(0x9d)]};}};_0x4b5181=_0x390f19([_0x178d10(0x0,_0x5f23ee[_0x24328d(0xcc)](_0x10c5d9[_0x24328d(0xdc)])),_0x178d10(0x1,_0x5f23ee[_0x24328d(0xcc)](_0x5f23ee['UserManagerService'])),_0x178d10(0x2,_0x5f23ee[_0x24328d(0xcc)](_0x47bbdb[_0x24328d(0x118)]))],_0x4b5181);var _0x122cfa=Object[_0x24328d(0xc5)],_0x4e2c29=(_0x5530a8,_0x2c0fbb,_0x48af15,_0xb12973)=>{const _0x1a5af4=_0x24328d;for(var _0x1f1f10=_0xb12973>0x1?void 0x0:_0xb12973?_0x122cfa(_0x2c0fbb,_0x48af15):_0x2c0fbb,_0x22d4a9=_0x5530a8[_0x1a5af4(0x10b)]-0x1,_0x396760;_0x22d4a9>=0x0;_0x22d4a9--)(_0x396760=_0x5530a8[_0x22d4a9])&&(_0x1f1f10=_0x396760(_0x1f1f10)||_0x1f1f10);return _0x1f1f10;},_0x7b4a5=(_0x3d31ef,_0x5438e9)=>(_0x4e73b3,_0x137d64)=>_0x5438e9(_0x4e73b3,_0x137d64,_0x3d31ef);let _0x3ad0f0=class extends _0x5f23ee[_0x24328d(0xb6)]{constructor(_0x51b357,_0x9ab36d){const _0x5dbb2c=_0x24328d;super(),this['_threadCommentDataSourceService']=_0x51b357,this[_0x5dbb2c(0xe6)]=_0x9ab36d,this['_initDataSource']();}[_0x24328d(0xcf)](){const _0x24e81a=_0x24328d;this[_0x24e81a(0xe2)]['dataSource']=this['_threadCommentDataSource'],this[_0x24e81a(0xe2)]['syncUpdateMutationToColla']=!0x1;}};_0x3ad0f0=_0x4e2c29([_0x7b4a5(0x0,_0x432669['IThreadCommentDataSourceService']),_0x7b4a5(0x1,_0x5f23ee[_0x24328d(0xcc)](_0x4b5181))],_0x3ad0f0);var _0x3be9ca=Object['defineProperty'],_0x1efe8a=Object[_0x24328d(0xc5)],_0x3a8978=(_0x16a25a,_0x14fb8a,_0x4fa26c)=>_0x14fb8a in _0x16a25a?_0x3be9ca(_0x16a25a,_0x14fb8a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4fa26c}):_0x16a25a[_0x14fb8a]=_0x4fa26c,_0x574f26=(_0x33bada,_0x31fbd1,_0x369f50,_0x1a5ac4)=>{const _0x502028=_0x24328d;for(var _0x1023b3=_0x1a5ac4>0x1?void 0x0:_0x1a5ac4?_0x1efe8a(_0x31fbd1,_0x369f50):_0x31fbd1,_0x4268ef=_0x33bada[_0x502028(0x10b)]-0x1,_0x200e32;_0x4268ef>=0x0;_0x4268ef--)(_0x200e32=_0x33bada[_0x4268ef])&&(_0x1023b3=_0x200e32(_0x1023b3)||_0x1023b3);return _0x1023b3;},_0x2b7aa2=(_0x1d5e6e,_0x45e9e7)=>(_0x1eb747,_0x19d480)=>_0x45e9e7(_0x1eb747,_0x19d480,_0x1d5e6e),_0x36ca11=(_0x361896,_0x138f8e,_0xcd1a87)=>_0x3a8978(_0x361896,typeof _0x138f8e!=_0x24328d(0xf6)?_0x138f8e+'':_0x138f8e,_0xcd1a87);_0xe3f860[_0x24328d(0x9b)]=class extends _0x5f23ee[_0x24328d(0xd1)]{constructor(_0x37fc02=_0x1b83d3,_0x4e1b52,_0x1c293a){const _0x1438b5=_0x24328d;super(),this[_0x1438b5(0xf0)]=_0x37fc02,this[_0x1438b5(0x11d)]=_0x4e1b52,this[_0x1438b5(0xde)]=_0x1c293a;const {..._0x532004}=_0x5f23ee[_0x1438b5(0xcd)]({},_0x1b83d3,this['_config']);this[_0x1438b5(0xde)][_0x1438b5(0x9a)](_0x26ec19,_0x532004);}[_0x24328d(0x101)](){const _0x668dbd=_0x24328d;[[_0x4b5181],[_0x3ad0f0],[_0x14696a]][_0x668dbd(0xb7)](_0x5cb8ab=>{const _0x97891b=_0x668dbd;this[_0x97891b(0x11d)][_0x97891b(0xe1)](_0x5cb8ab);});}[_0x24328d(0xdd)](){const _0x4de8be=_0x24328d;this[_0x4de8be(0x11d)][_0x4de8be(0xaa)](_0x3ad0f0),this[_0x4de8be(0x11d)][_0x4de8be(0xaa)](_0x14696a);}},_0x36ca11(_0xe3f860[_0x24328d(0x9b)],_0x24328d(0x10f),_0x477cb7),_0x36ca11(_0xe3f860['UniverThreadCommentDataSourcePlugin'],_0x24328d(0x10d),_0x5f23ee[_0x24328d(0xbc)][_0x24328d(0x106)]),_0xe3f860[_0x24328d(0x9b)]=_0x574f26([_0x5f23ee[_0x24328d(0xbf)](_0x28bfad['UniverThreadCommentUIPlugin'],_0x47bbdb[_0x24328d(0xc3)],_0x33f61f[_0x24328d(0xd4)]),_0x2b7aa2(0x1,_0x5f23ee['Inject'](_0x5f23ee[_0x24328d(0x95)])),_0x2b7aa2(0x2,_0x5f23ee['IConfigService'])],_0xe3f860[_0x24328d(0x9b)]),Object[_0x24328d(0xbe)](_0xe3f860,Symbol[_0x24328d(0xba)],{'value':'Module'});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.4-insiders.20260211-f06b0a7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.15.
|
|
49
|
-
"@univerjs/core": "0.15.
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.15.4-insiders.20260211-f06b0a7",
|
|
49
|
+
"@univerjs/core": "0.15.4-insiders.20260211-f06b0a7",
|
|
50
|
+
"@univerjs-pro/license": "0.15.4-insiders.20260211-f06b0a7",
|
|
51
|
+
"@univerjs/network": "0.15.4-insiders.20260211-f06b0a7",
|
|
52
|
+
"@univerjs/thread-comment-ui": "0.15.4-insiders.20260211-f06b0a7",
|
|
52
53
|
"@univerjs/protocol": "0.1.48",
|
|
53
|
-
"@univerjs/thread-comment
|
|
54
|
-
"@univerjs/thread-comment": "0.15.3"
|
|
54
|
+
"@univerjs/thread-comment": "0.15.4-insiders.20260211-f06b0a7"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
59
|
"vite": "^7.3.1",
|
|
60
|
-
"vitest": "^4.0.
|
|
61
|
-
"@univerjs-infra/shared": "0.15.
|
|
60
|
+
"vitest": "^4.0.18",
|
|
61
|
+
"@univerjs-infra/shared": "0.15.4"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|