@univerjs-pro/thread-comment-datasource 0.10.0 → 0.10.1-nightly.202508020912

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x44fd51=_0x3844;(function(_0x4bfa38,_0x5834bd){const _0x597fea=_0x3844,_0xe4744c=_0x4bfa38();while(!![]){try{const _0x4587d4=parseInt(_0x597fea(0x10f))/0x1*(parseInt(_0x597fea(0x16c))/0x2)+-parseInt(_0x597fea(0x140))/0x3*(-parseInt(_0x597fea(0x135))/0x4)+parseInt(_0x597fea(0x160))/0x5+-parseInt(_0x597fea(0x139))/0x6*(parseInt(_0x597fea(0x159))/0x7)+-parseInt(_0x597fea(0x112))/0x8+parseInt(_0x597fea(0x100))/0x9*(-parseInt(_0x597fea(0x14e))/0xa)+parseInt(_0x597fea(0x137))/0xb;if(_0x4587d4===_0x5834bd)break;else _0xe4744c['push'](_0xe4744c['shift']());}catch(_0x17e7c1){_0xe4744c['push'](_0xe4744c['shift']());}}}(_0x5cc8,0x3b251));Object[_0x44fd51(0x15f)](exports,Symbol[_0x44fd51(0x11c)],{'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=_0x44fd51(0xf7);function _0x3844(_0x384446,_0x8a56f){const _0x5cc8f3=_0x5cc8();return _0x3844=function(_0x38449a,_0x33f0d0){_0x38449a=_0x38449a-0xf5;let _0x38376e=_0x5cc8f3[_0x38449a];return _0x38376e;},_0x3844(_0x384446,_0x8a56f);}function _0x5cc8(){const _0x38a626=['type','size','merge','_threadCommentDataSource','Solve','subscribe','user','UniverInstanceType','Solved','_threadCommentModel','length','40hHdxPf','thread-comment-data-source.config','saveCommentToSnapshot','listComments','onReady','content','delete','map','_threadCommentDataSourceService','filter','threadId','63PPxvzG','payload','_configService','parentId','_init','CustomRangeType','defineProperty','1036615GRAVRT','solved','Injector','Add','comment','_config','Delete','YYYY/MM/DD\x20HH:mm','Edit','onStarting','add','stringify','2XixLxI','resolveComment','post','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','createTimestamp','_commentService','users','UniverThreadCommentUIPlugin','addComment','resolved','pluginName','UNRECOGNIZED','695790sMWlyO','CommentService','addUser','Reply','userID','find','UNIVER_UNKNOWN','error','comments','deleteComment','_httpService','code','dayjs','rangeId','symbol','230273SQPZaF','customRanges','requireSession','3365760ndTVCD','/add','UniverThreadCommentDataSourcePlugin','/delete','getComment','replyId','root','userId','HTTPService','rangeType','toStringTag','syncUpdateMutationToColla','Inject','parse','getMemberID','_sessionService','UserManagerService','_initUserSync','disposeWithMe','/universer-api/user/list','format','pipe','values','body','getUnit','updateComment','IConfigService','forEach','/universer-api/comment/unit/','/list','slice','bufferTime','commentUpdate$','/reply','IThreadCommentDataSourceService','88IFuAsc','replies','6313879WjSZXw','_userService','280404RiCLtx','_injector','getOwnPropertyDescriptor','OpenOrReOpen','get','unitId','Unknown','51987GzMTLb','_initDataSource','personId'];_0x5cc8=function(){return _0x38a626;};return _0x5cc8();}var I=(_0x208777=>(_0x208777[_0x208777['OpenOrReOpen']=0x0]=_0x44fd51(0x13c),_0x208777[_0x208777['Solved']=0x1]='Solved',_0x208777[_0x208777[_0x44fd51(0xff)]=-0x1]='UNRECOGNIZED',_0x208777))(I||{}),v=(_0x322731=>(_0x322731[_0x322731[_0x44fd51(0x13f)]=0x0]=_0x44fd51(0x13f),_0x322731[_0x322731['Add']=0x1]=_0x44fd51(0x163),_0x322731[_0x322731[_0x44fd51(0x103)]=0x2]=_0x44fd51(0x103),_0x322731[_0x322731[_0x44fd51(0x168)]=0x3]=_0x44fd51(0x168),_0x322731[_0x322731['Delete']=0x4]=_0x44fd51(0x166),_0x322731[_0x322731[_0x44fd51(0x147)]=0x5]=_0x44fd51(0x147),_0x322731[_0x322731[_0x44fd51(0xff)]=-0x1]=_0x44fd51(0xff),_0x322731))(v||{});const f=_0x3a6fb5=>c[_0x44fd51(0x10c)](new Date(+_0x3a6fb5))[_0x44fd51(0x126)](_0x44fd51(0x167)),R=async(_0x2ba362,_0x2c5c6e)=>{const _0x303ace=_0x44fd51,_0x211540=_0x2ba362[_0x303ace(0x13d)](c[_0x303ace(0x122)]),_0x1e1890=_0x2ba362['get'](P['HTTPService']);_0x2c5c6e[_0x303ace(0x12d)](_0x4d48cc=>{const _0x10caa4=_0x303ace;_0x211540['getUser'](_0x4d48cc)&&_0x2c5c6e[_0x10caa4(0x154)](_0x4d48cc);}),_0x2c5c6e[_0x303ace(0x144)]&&(await _0x1e1890['get'](_0x303ace(0x125),{'params':{'userIDs':[..._0x2c5c6e]}}))[_0x303ace(0x129)]['users'][_0x303ace(0x12d)](_0x36c2f4=>{_0x36c2f4&&_0x211540['addUser'](_0x36c2f4);});};var $=Object[_0x44fd51(0x13b)],E=(_0x2c76e8,_0x1e439d,_0x18c783,_0x58cbf7)=>{for(var _0x4b6800=_0x58cbf7>0x1?void 0x0:_0x58cbf7?$(_0x1e439d,_0x18c783):_0x1e439d,_0x6260bb=_0x2c76e8['length']-0x1,_0x41ef3f;_0x6260bb>=0x0;_0x6260bb--)(_0x41ef3f=_0x2c76e8[_0x6260bb])&&(_0x4b6800=_0x41ef3f(_0x4b6800)||_0x4b6800);return _0x4b6800;},S=(_0x33ff2f,_0x376d44)=>(_0x4c5490,_0x5eca7b)=>_0x376d44(_0x4c5490,_0x5eca7b,_0x33ff2f);let _=class extends c['Disposable']{constructor(_0x2d2016,_0x30a552,_0x58c5d2,_0x679766){const _0x37728c=_0x44fd51;super(),this[_0x37728c(0xf9)]=_0x2d2016,this[_0x37728c(0x14c)]=_0x30a552,this[_0x37728c(0x138)]=_0x58c5d2,this[_0x37728c(0x13a)]=_0x679766,this['_init'](),this['_initUserSync']();}[_0x44fd51(0x123)](){const _0x48fa4f=_0x44fd51;this[_0x48fa4f(0x124)](this[_0x48fa4f(0x14c)]['commentUpdate$'][_0x48fa4f(0x127)](j[_0x48fa4f(0x131)](0x10))[_0x48fa4f(0x148)](_0x4a88f9=>{const _0x244a81=_0x48fa4f,_0x49c320=new Set();_0x4a88f9[_0x244a81(0x12d)](_0x586e3e=>{const _0x2e7f6c=_0x244a81;switch(_0x586e3e['type']){case _0x2e7f6c(0x16a):{const _0x2b138e=_0x586e3e[_0x2e7f6c(0x15a)][_0x2e7f6c(0x142)];_0x49c320[_0x2e7f6c(0x16a)](_0x2b138e);break;}}}),R(this[_0x244a81(0x13a)],_0x49c320);}));}[_0x44fd51(0x15d)](){const _0x5d2ea1=_0x44fd51;this['disposeWithMe'](this[_0x5d2ea1(0xf9)][_0x5d2ea1(0x132)]['subscribe'](async _0x5635b4=>{const _0x2d644d=_0x5d2ea1;var _0x193a4b,_0x2d5ef8,_0x39ad4f,_0x3d27be;const _0x1d1e1a=(_0x193a4b=this[_0x2d644d(0x14c)]['getUnit'](_0x5635b4['unitId'])['find'](_0x1b8e01=>_0x1b8e01[_0x2d644d(0x158)]===_0x5635b4['threadId']))==null?void 0x0:_0x193a4b['root'];if(!_0x1d1e1a)return;const {unitId:_0x3cb841,subUnitId:_0x842c23}=_0x1d1e1a;switch(_0x5635b4[_0x2d644d(0x149)]&&this['_userService'][_0x2d644d(0x102)](_0x5635b4[_0x2d644d(0x149)]),_0x5635b4[_0x2d644d(0x143)]){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0x2d644d(0xfc)](_0x3cb841,_0x842c23,{'unitId':_0x3cb841,'subUnitId':_0x842c23,'ref':'','id':_0x5635b4['replyId'],'dT':f(+_0x5635b4[_0x2d644d(0xf8)]),'threadId':_0x5635b4['threadId'],'personId':(_0x39ad4f=(_0x2d5ef8=_0x5635b4['user'])==null?void 0x0:_0x2d5ef8['userID'])!=null?_0x39ad4f:_0x5635b4['userId'],'text':JSON['parse'](_0x5635b4[_0x2d644d(0x153)]),'parentId':_0x1d1e1a['id']});break;}case v['Delete']:{const _0x64be2d=this['_threadCommentModel'][_0x2d644d(0x116)](_0x3cb841,_0x842c23,_0x5635b4[_0x2d644d(0x117)]);_0x64be2d&&_0x64be2d[_0x2d644d(0x15c)]&&this[_0x2d644d(0x14c)][_0x2d644d(0x109)](_0x3cb841,_0x842c23,_0x5635b4[_0x2d644d(0x117)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x2d644d(0x12b)](_0x3cb841,_0x842c23,{'commentId':_0x5635b4[_0x2d644d(0x117)],'text':JSON[_0x2d644d(0x11f)](_0x5635b4['content'])});break;}case v[_0x2d644d(0x147)]:{const _0x463568=(_0x3d27be=this['_threadCommentModel'][_0x2d644d(0x12a)](_0x5635b4[_0x2d644d(0x13e)])[_0x2d644d(0x105)](_0x2623c2=>_0x2623c2['threadId']===_0x5635b4[_0x2d644d(0x158)]))==null?void 0x0:_0x3d27be[_0x2d644d(0x118)];_0x463568&&this[_0x2d644d(0x14c)][_0x2d644d(0xf5)](_0x3cb841,_0x842c23,_0x463568['id'],_0x5635b4[_0x2d644d(0x161)]===I[_0x2d644d(0x14b)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x44fd51(0x101)])),S(0x1,c[_0x44fd51(0x11e)](M['ThreadCommentModel'])),S(0x2,c[_0x44fd51(0x11e)](c[_0x44fd51(0x122)])),S(0x3,c[_0x44fd51(0x11e)](c[_0x44fd51(0x162)]))],_);const q=_0x44fd51(0x14f),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x47e790,_0x2edf2d,_0x5bd3f6,_0x15ac12)=>{for(var _0x137419=_0x15ac12>0x1?void 0x0:_0x15ac12?A(_0x2edf2d,_0x5bd3f6):_0x2edf2d,_0x26a2c0=_0x47e790['length']-0x1,_0x51ecc2;_0x26a2c0>=0x0;_0x26a2c0--)(_0x51ecc2=_0x47e790[_0x26a2c0])&&(_0x137419=_0x51ecc2(_0x137419)||_0x137419);return _0x137419;},C=(_0x1195a6,_0x20d0d5)=>(_0x21845e,_0x5f1053)=>_0x20d0d5(_0x21845e,_0x5f1053,_0x1195a6);function Y(_0x484784,_0x56bcb8){const _0x462f21=_0x44fd51,_0x3a13f7=_0x484784[_0x462f21(0x136)][0x0];return{..._0x56bcb8,'id':_0x3a13f7[_0x462f21(0x117)],'resolved':_0x484784[_0x462f21(0x161)]===0x1,'dT':f(_0x3a13f7[_0x462f21(0xf8)]),'personId':_0x3a13f7[_0x462f21(0x119)],'threadId':_0x3a13f7[_0x462f21(0x158)]};}function G(_0x5db0f2,_0x363f87,_0x4fdd49){const _0xf08581=_0x44fd51;var _0x8dea75,_0x4ac46f;if(((_0x4ac46f=(_0x8dea75=_0x5db0f2==null?void 0x0:_0x5db0f2[_0xf08581(0x136)])==null?void 0x0:_0x8dea75['length'])!=null?_0x4ac46f:0x0)>0x0){const _0x415deb=(_0x326a6b,_0x2e0992)=>({'id':_0x326a6b[_0xf08581(0x117)],'threadId':_0x326a6b[_0xf08581(0x158)],'dT':f(_0x326a6b[_0xf08581(0xf8)]),'personId':_0x326a6b[_0xf08581(0x119)],'resolved':_0x5db0f2[_0xf08581(0x161)]===I[_0xf08581(0x14b)],'unitId':_0x363f87,'subUnitId':_0x4fdd49,'text':JSON[_0xf08581(0x11f)](_0x326a6b[_0xf08581(0x153)]),'parentId':_0x2e0992}),_0xc80241=_0x415deb(_0x5db0f2[_0xf08581(0x136)][0x0]);return{..._0xc80241,'children':_0x5db0f2[_0xf08581(0x136)][_0xf08581(0x130)](0x1)[_0xf08581(0x155)](_0x358942=>_0x415deb(_0x358942,_0xc80241['id']))};}return null;}let p=class{constructor(_0x175ed3,_0x3c9a7c,_0x983409){const _0x158f44=_0x44fd51;this[_0x158f44(0x10a)]=_0x175ed3,this[_0x158f44(0x138)]=_0x3c9a7c,this['_sessionService']=_0x983409;}async[_0x44fd51(0xfc)](_0x39049f){const _0x5006db=_0x44fd51;var _0x52f87b,_0xd8d841;const {parentId:_0x1879c9,unitId:_0x3851aa,text:_0x503c70,threadId:_0x41b741}=_0x39049f,_0x27a1e1=(_0xd8d841=(_0x52f87b=_0x503c70[_0x5006db(0x110)])==null?void 0x0:_0x52f87b['filter'](_0x387ef1=>_0x387ef1['rangeType']===c[_0x5006db(0x15e)]['COMMENT'])[_0x5006db(0x155)](_0x49ea40=>_0x49ea40[_0x5006db(0x10d)]))!=null?_0xd8d841:[],_0x1ba041=JSON['stringify'](_0x503c70),_0x79f599=(await this['_sessionService'][_0x5006db(0x111)](_0x3851aa))[_0x5006db(0x120)]();if(_0x1879c9){const _0x4c2093={'memberId':_0x79f599,'unitId':_0x3851aa,'content':_0x1ba041,'mention':_0x27a1e1,'threadId':_0x41b741},_0x104506=(await this[_0x5006db(0x10a)][_0x5006db(0xf6)](_0x5006db(0x12e)+_0x3851aa+_0x5006db(0x133),{'body':_0x4c2093}))[_0x5006db(0x129)]['reply'];return{..._0x39049f,'id':_0x104506[_0x5006db(0x117)],'dT':c[_0x5006db(0x10c)](+_0x104506[_0x5006db(0xf8)])[_0x5006db(0x126)](_0x5006db(0x167)),'personId':_0x104506['userId']};}else{const _0x3cbd1f={'memberId':_0x79f599,'unitId':_0x3851aa,'content':_0x1ba041,'mention':_0x27a1e1},_0x6c9111=await this[_0x5006db(0x10a)][_0x5006db(0xf6)](_0x5006db(0x12e)+_0x3851aa+_0x5006db(0x113),{'body':_0x3cbd1f});return Y(_0x6c9111[_0x5006db(0x129)][_0x5006db(0x164)],_0x39049f);}}async['updateComment'](_0x486c46){const _0x155b1c=_0x44fd51;var _0x397fd8,_0xbc2cea;const {text:_0x1e7092,unitId:_0x17c97b}=_0x486c46,_0x5c88c4=(_0xbc2cea=(_0x397fd8=_0x1e7092[_0x155b1c(0x110)])==null?void 0x0:_0x397fd8['filter'](_0x1782dc=>_0x1782dc[_0x155b1c(0x11b)]===c[_0x155b1c(0x15e)]['COMMENT'])['map'](_0x11d0b1=>_0x11d0b1['rangeId']))!=null?_0xbc2cea:[],_0x32f061=JSON[_0x155b1c(0x16b)](_0x1e7092),_0x138575=_0x486c46['threadId'],_0xa39524=_0x486c46['id'],_0x4dfe3c={'memberId':(await this[_0x155b1c(0x121)][_0x155b1c(0x111)](_0x17c97b))[_0x155b1c(0x120)](),'unitId':_0x17c97b,'threadId':_0x138575,'mention':_0x5c88c4,'content':_0x32f061,'replyId':_0xa39524},_0xdaaccd=await this[_0x155b1c(0x10a)]['post']('/universer-api/comment/unit/'+_0x17c97b+'/edit',{'body':_0x4dfe3c});return!_0xdaaccd[_0x155b1c(0x129)][_0x155b1c(0x107)]||_0xdaaccd[_0x155b1c(0x129)]['error'][_0x155b1c(0x10b)]===0x1;}async[_0x44fd51(0xf5)](_0x417a8d){const _0x37da45=_0x44fd51,{unitId:_0x1de615}=_0x417a8d,_0x324849=_0x417a8d['threadId'],_0x1ef0d6={'memberId':this[_0x37da45(0x138)]['getCurrentUser']()[_0x37da45(0x104)],'unitId':_0x1de615,'threadId':_0x324849,'solved':_0x417a8d[_0x37da45(0xfd)]?I[_0x37da45(0x14b)]:I[_0x37da45(0x13c)]},_0x1941da=await this[_0x37da45(0x10a)][_0x37da45(0xf6)](_0x37da45(0x12e)+_0x1de615+'/solved',{'body':_0x1ef0d6});return!_0x1941da[_0x37da45(0x129)][_0x37da45(0x107)]||_0x1941da[_0x37da45(0x129)][_0x37da45(0x107)][_0x37da45(0x10b)]===0x1;}async[_0x44fd51(0x109)](_0x5eaad4,_0x18f97b,_0x335327,_0x498435){const _0x14e1ea=_0x44fd51,_0x536acc={'memberId':(await this[_0x14e1ea(0x121)][_0x14e1ea(0x111)](_0x5eaad4))[_0x14e1ea(0x120)](),'threadId':_0x335327,'replyId':_0x498435,'unitId':_0x5eaad4},_0x52cf6d=await this['_httpService'][_0x14e1ea(0xf6)](_0x14e1ea(0x12e)+_0x5eaad4+_0x14e1ea(0x115),{'body':_0x536acc});return!_0x52cf6d['body']['error']||_0x52cf6d[_0x14e1ea(0x129)][_0x14e1ea(0x107)][_0x14e1ea(0x10b)]===0x1;}async[_0x44fd51(0x151)](_0xb23bb7,_0x507b49,_0x1ee5bb){const _0x261b43=_0x44fd51,_0x1495e6={'unitId':_0xb23bb7,'threadId':_0x1ee5bb},_0x2b1290=await this[_0x261b43(0x10a)][_0x261b43(0xf6)](_0x261b43(0x12e)+_0xb23bb7+_0x261b43(0x12f),{'body':_0x1495e6}),_0x1c20b8=_0x1ee5bb[_0x261b43(0x155)](_0x3ce63c=>G(_0x2b1290[_0x261b43(0x129)][_0x261b43(0x108)][_0x3ce63c],_0xb23bb7,_0x507b49))[_0x261b43(0x157)](Boolean);return Object[_0x261b43(0x128)](_0x2b1290['body'][_0x261b43(0xfa)])['forEach'](_0x51fd00=>{const _0x198db8=_0x261b43;this[_0x198db8(0x138)]['addUser'](_0x51fd00);}),_0x1c20b8;}[_0x44fd51(0x150)](_0x2b4b29){return{'id':_0x2b4b29['id'],'threadId':_0x2b4b29['threadId'],'ref':_0x2b4b29['ref']};}};p=x([C(0x0,c[_0x44fd51(0x11e)](P[_0x44fd51(0x11a)])),C(0x1,c['Inject'](c[_0x44fd51(0x122)])),C(0x2,c['Inject'](b['CollaborationSessionService']))],p);var H=Object[_0x44fd51(0x13b)],J=(_0x379db1,_0x4610f6,_0x4a2f9d,_0x5bdcd1)=>{const _0x2f5cb7=_0x44fd51;for(var _0x56e50d=_0x5bdcd1>0x1?void 0x0:_0x5bdcd1?H(_0x4610f6,_0x4a2f9d):_0x4610f6,_0x30b9cb=_0x379db1[_0x2f5cb7(0x14d)]-0x1,_0x272a7f;_0x30b9cb>=0x0;_0x30b9cb--)(_0x272a7f=_0x379db1[_0x30b9cb])&&(_0x56e50d=_0x272a7f(_0x56e50d)||_0x56e50d);return _0x56e50d;},y=(_0x3e2d13,_0x35fa32)=>(_0x54706d,_0x5536d8)=>_0x35fa32(_0x54706d,_0x5536d8,_0x3e2d13);let g=class extends c['Disposable']{constructor(_0x230be9,_0x21c6e1){const _0x4b41f3=_0x44fd51;super(),this[_0x4b41f3(0x156)]=_0x230be9,this[_0x4b41f3(0x146)]=_0x21c6e1,this[_0x4b41f3(0x141)]();}[_0x44fd51(0x141)](){const _0x166dea=_0x44fd51;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x166dea(0x156)][_0x166dea(0x11d)]=!0x1;}};g=J([y(0x0,M[_0x44fd51(0x134)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x44fd51(0x15f)],L=Object['getOwnPropertyDescriptor'],Z=(_0x3599ec,_0x4bddbd,_0x4273d3)=>_0x4bddbd in _0x3599ec?F(_0x3599ec,_0x4bddbd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4273d3}):_0x3599ec[_0x4bddbd]=_0x4273d3,W=(_0x41898d,_0x3a897e,_0x303e9e,_0x3a3424)=>{for(var _0x3ecfd4=_0x3a3424>0x1?void 0x0:_0x3a3424?L(_0x3a897e,_0x303e9e):_0x3a897e,_0x2cea53=_0x41898d['length']-0x1,_0x364c90;_0x2cea53>=0x0;_0x2cea53--)(_0x364c90=_0x41898d[_0x2cea53])&&(_0x3ecfd4=_0x364c90(_0x3ecfd4)||_0x3ecfd4);return _0x3ecfd4;},O=(_0xef4f44,_0x1213e2)=>(_0x4df72b,_0x28bfcb)=>_0x1213e2(_0x4df72b,_0x28bfcb,_0xef4f44),N=(_0x4563fb,_0x3c76ac,_0x522a16)=>Z(_0x4563fb,typeof _0x3c76ac!=_0x44fd51(0x10e)?_0x3c76ac+'':_0x3c76ac,_0x522a16);exports[_0x44fd51(0x114)]=class extends c['Plugin']{constructor(_0x17f3df=D,_0x4a91f0,_0x1775e2){const _0x132d93=_0x44fd51;super(),this[_0x132d93(0x165)]=_0x17f3df,this[_0x132d93(0x13a)]=_0x4a91f0,this['_configService']=_0x1775e2;const {..._0x5b2d03}=c[_0x132d93(0x145)]({},D,this[_0x132d93(0x165)]);this[_0x132d93(0x15b)]['setConfig'](q,_0x5b2d03);}[_0x44fd51(0x169)](){[[p],[g],[_]]['forEach'](_0xfbdb81=>{const _0x5dcfc5=_0x3844;this[_0x5dcfc5(0x13a)][_0x5dcfc5(0x16a)](_0xfbdb81);});}[_0x44fd51(0x152)](){const _0x589810=_0x44fd51;this[_0x589810(0x13a)][_0x589810(0x13d)](g),this[_0x589810(0x13a)][_0x589810(0x13d)](_);}},N(exports[_0x44fd51(0x114)],_0x44fd51(0xfe),U),N(exports[_0x44fd51(0x114)],_0x44fd51(0x143),c[_0x44fd51(0x14a)][_0x44fd51(0x106)]),exports[_0x44fd51(0x114)]=W([c['DependentOn'](w[_0x44fd51(0xfb)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x44fd51(0x11e)](c['Injector'])),O(0x2,c[_0x44fd51(0x12c)])],exports[_0x44fd51(0x114)]);
1
+ 'use strict';const _0x40d73c=_0x4459;(function(_0x9a07c7,_0x3c6f09){const _0x5888f6=_0x4459,_0xb07a69=_0x9a07c7();while(!![]){try{const _0x4c6176=parseInt(_0x5888f6(0x1b5))/0x1*(-parseInt(_0x5888f6(0x178))/0x2)+parseInt(_0x5888f6(0x1ad))/0x3*(parseInt(_0x5888f6(0x1a8))/0x4)+-parseInt(_0x5888f6(0x17d))/0x5+-parseInt(_0x5888f6(0x175))/0x6+parseInt(_0x5888f6(0x195))/0x7*(-parseInt(_0x5888f6(0x19a))/0x8)+-parseInt(_0x5888f6(0x16c))/0x9+parseInt(_0x5888f6(0x172))/0xa*(parseInt(_0x5888f6(0x196))/0xb);if(_0x4c6176===_0x3c6f09)break;else _0xb07a69['push'](_0xb07a69['shift']());}catch(_0x561050){_0xb07a69['push'](_0xb07a69['shift']());}}}(_0x52e3,0x894a3));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x40d73c(0x1b7)});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=_0x40d73c(0x1bb);var I=(_0x157ff5=>(_0x157ff5[_0x157ff5[_0x40d73c(0x162)]=0x0]=_0x40d73c(0x162),_0x157ff5[_0x157ff5[_0x40d73c(0x171)]=0x1]='Solved',_0x157ff5[_0x157ff5['UNRECOGNIZED']=-0x1]=_0x40d73c(0x1a1),_0x157ff5))(I||{}),v=(_0x25850e=>(_0x25850e[_0x25850e[_0x40d73c(0x188)]=0x0]=_0x40d73c(0x188),_0x25850e[_0x25850e[_0x40d73c(0x18f)]=0x1]=_0x40d73c(0x18f),_0x25850e[_0x25850e[_0x40d73c(0x187)]=0x2]='Reply',_0x25850e[_0x25850e['Edit']=0x3]=_0x40d73c(0x183),_0x25850e[_0x25850e[_0x40d73c(0x176)]=0x4]=_0x40d73c(0x176),_0x25850e[_0x25850e[_0x40d73c(0x191)]=0x5]=_0x40d73c(0x191),_0x25850e[_0x25850e['UNRECOGNIZED']=-0x1]=_0x40d73c(0x1a1),_0x25850e))(v||{});const f=_0x4f64b3=>c[_0x40d73c(0x180)](new Date(+_0x4f64b3))[_0x40d73c(0x18d)](_0x40d73c(0x18a)),R=async(_0x503cae,_0x2969c2)=>{const _0x50fc49=_0x40d73c,_0x2249e6=_0x503cae[_0x50fc49(0x16d)](c[_0x50fc49(0x1c5)]),_0x306fd2=_0x503cae['get'](P['HTTPService']);_0x2969c2['forEach'](_0x2c69e8=>{const _0x28af90=_0x50fc49;_0x2249e6['getUser'](_0x2c69e8)&&_0x2969c2[_0x28af90(0x1a3)](_0x2c69e8);}),_0x2969c2[_0x50fc49(0x1c0)]&&(await _0x306fd2[_0x50fc49(0x16d)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2969c2]}}))[_0x50fc49(0x165)][_0x50fc49(0x163)][_0x50fc49(0x170)](_0x1b90ef=>{const _0x2f380a=_0x50fc49;_0x1b90ef&&_0x2249e6[_0x2f380a(0x166)](_0x1b90ef);});};var $=Object[_0x40d73c(0x1af)],E=(_0x54ff0e,_0x34cf81,_0x4ef00e,_0x31d125)=>{const _0x11a611=_0x40d73c;for(var _0xc645a2=_0x31d125>0x1?void 0x0:_0x31d125?$(_0x34cf81,_0x4ef00e):_0x34cf81,_0x2a7ff0=_0x54ff0e[_0x11a611(0x160)]-0x1,_0x2afcd8;_0x2a7ff0>=0x0;_0x2a7ff0--)(_0x2afcd8=_0x54ff0e[_0x2a7ff0])&&(_0xc645a2=_0x2afcd8(_0xc645a2)||_0xc645a2);return _0xc645a2;},S=(_0x482d23,_0x1a034a)=>(_0x159433,_0x16276e)=>_0x1a034a(_0x159433,_0x16276e,_0x482d23);let _=class extends c[_0x40d73c(0x1b8)]{constructor(_0xa73dd9,_0x3aa852,_0x4dba0e,_0x5257cb){const _0x5891eb=_0x40d73c;super(),this[_0x5891eb(0x18e)]=_0xa73dd9,this['_threadCommentModel']=_0x3aa852,this[_0x5891eb(0x161)]=_0x4dba0e,this[_0x5891eb(0x167)]=_0x5257cb,this[_0x5891eb(0x19c)](),this[_0x5891eb(0x15e)]();}['_initUserSync'](){const _0x8bfb91=_0x40d73c;this[_0x8bfb91(0x1b2)](this[_0x8bfb91(0x199)][_0x8bfb91(0x193)][_0x8bfb91(0x156)](j[_0x8bfb91(0x189)](0x10))[_0x8bfb91(0x17b)](_0x3aae10=>{const _0xc0ec4=_0x8bfb91,_0x50a836=new Set();_0x3aae10[_0xc0ec4(0x170)](_0x4e0e06=>{const _0x1b34f0=_0xc0ec4;switch(_0x4e0e06[_0x1b34f0(0x1aa)]){case _0x1b34f0(0x1a2):{const _0x51c07b=_0x4e0e06[_0x1b34f0(0x1bc)]['personId'];_0x50a836[_0x1b34f0(0x1a2)](_0x51c07b);break;}}}),R(this[_0xc0ec4(0x167)],_0x50a836);}));}[_0x40d73c(0x19c)](){const _0x13628a=_0x40d73c;this['disposeWithMe'](this[_0x13628a(0x18e)][_0x13628a(0x193)][_0x13628a(0x17b)](async _0x4b40d9=>{const _0x3150c3=_0x13628a;var _0x20c38d,_0x3bc3e0,_0x2aa845,_0x4ce09d;const _0x2eab6a=(_0x20c38d=this[_0x3150c3(0x199)]['getUnit'](_0x4b40d9[_0x3150c3(0x1b4)])[_0x3150c3(0x17e)](_0xff039c=>_0xff039c['threadId']===_0x4b40d9['threadId']))==null?void 0x0:_0x20c38d['root'];if(!_0x2eab6a)return;const {unitId:_0xa60026,subUnitId:_0x7f8a73}=_0x2eab6a;switch(_0x4b40d9[_0x3150c3(0x19d)]&&this[_0x3150c3(0x161)][_0x3150c3(0x166)](_0x4b40d9[_0x3150c3(0x19d)]),_0x4b40d9['type']){case v[_0x3150c3(0x18f)]:break;case v[_0x3150c3(0x187)]:{this[_0x3150c3(0x199)][_0x3150c3(0x1c4)](_0xa60026,_0x7f8a73,{'unitId':_0xa60026,'subUnitId':_0x7f8a73,'ref':'','id':_0x4b40d9[_0x3150c3(0x186)],'dT':f(+_0x4b40d9['createTimestamp']),'threadId':_0x4b40d9[_0x3150c3(0x1a7)],'personId':(_0x2aa845=(_0x3bc3e0=_0x4b40d9[_0x3150c3(0x19d)])==null?void 0x0:_0x3bc3e0['userID'])!=null?_0x2aa845:_0x4b40d9['userId'],'text':JSON[_0x3150c3(0x1a0)](_0x4b40d9[_0x3150c3(0x179)]),'parentId':_0x2eab6a['id']});break;}case v['Delete']:{const _0x55bdf0=this['_threadCommentModel']['getComment'](_0xa60026,_0x7f8a73,_0x4b40d9[_0x3150c3(0x186)]);_0x55bdf0&&_0x55bdf0['parentId']&&this[_0x3150c3(0x199)]['deleteComment'](_0xa60026,_0x7f8a73,_0x4b40d9[_0x3150c3(0x186)]);break;}case v[_0x3150c3(0x183)]:{this[_0x3150c3(0x199)][_0x3150c3(0x19b)](_0xa60026,_0x7f8a73,{'commentId':_0x4b40d9[_0x3150c3(0x186)],'text':JSON[_0x3150c3(0x1a0)](_0x4b40d9[_0x3150c3(0x179)])});break;}case v['Solve']:{const _0x316d80=(_0x4ce09d=this[_0x3150c3(0x199)]['getUnit'](_0x4b40d9['unitId'])[_0x3150c3(0x17e)](_0x157cdb=>_0x157cdb[_0x3150c3(0x1a7)]===_0x4b40d9[_0x3150c3(0x1a7)]))==null?void 0x0:_0x4ce09d[_0x3150c3(0x173)];_0x316d80&&this[_0x3150c3(0x199)][_0x3150c3(0x15d)](_0xa60026,_0x7f8a73,_0x316d80['id'],_0x4b40d9[_0x3150c3(0x184)]===I[_0x3150c3(0x171)]);break;}}}));}};_=E([S(0x0,c[_0x40d73c(0x19e)](b['CommentService'])),S(0x1,c[_0x40d73c(0x19e)](M[_0x40d73c(0x198)])),S(0x2,c[_0x40d73c(0x19e)](c[_0x40d73c(0x1c5)])),S(0x3,c[_0x40d73c(0x19e)](c['Injector']))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x40d73c(0x1af)],x=(_0x137a71,_0x3a335d,_0x395905,_0x22ed38)=>{const _0x437aeb=_0x40d73c;for(var _0x1fb4f5=_0x22ed38>0x1?void 0x0:_0x22ed38?A(_0x3a335d,_0x395905):_0x3a335d,_0x1e4c52=_0x137a71[_0x437aeb(0x160)]-0x1,_0x4ed7c3;_0x1e4c52>=0x0;_0x1e4c52--)(_0x4ed7c3=_0x137a71[_0x1e4c52])&&(_0x1fb4f5=_0x4ed7c3(_0x1fb4f5)||_0x1fb4f5);return _0x1fb4f5;},C=(_0x937819,_0x32dfae)=>(_0x425f50,_0x646150)=>_0x32dfae(_0x425f50,_0x646150,_0x937819);function Y(_0x3b45bf,_0x420db8){const _0x8fa5be=_0x40d73c,_0x175f58=_0x3b45bf['replies'][0x0];return{..._0x420db8,'id':_0x175f58[_0x8fa5be(0x186)],'resolved':_0x3b45bf[_0x8fa5be(0x184)]===0x1,'dT':f(_0x175f58[_0x8fa5be(0x159)]),'personId':_0x175f58[_0x8fa5be(0x19f)],'threadId':_0x175f58[_0x8fa5be(0x1a7)]};}function G(_0x512437,_0x7c2ef5,_0x328e5b){const _0x19744b=_0x40d73c;var _0xb63a78,_0x20e4aa;if(((_0x20e4aa=(_0xb63a78=_0x512437==null?void 0x0:_0x512437['replies'])==null?void 0x0:_0xb63a78[_0x19744b(0x160)])!=null?_0x20e4aa:0x0)>0x0){const _0x2332ae=(_0x1761eb,_0x415ecd)=>({'id':_0x1761eb[_0x19744b(0x186)],'threadId':_0x1761eb[_0x19744b(0x1a7)],'dT':f(_0x1761eb[_0x19744b(0x159)]),'personId':_0x1761eb[_0x19744b(0x19f)],'resolved':_0x512437[_0x19744b(0x184)]===I[_0x19744b(0x171)],'unitId':_0x7c2ef5,'subUnitId':_0x328e5b,'text':JSON[_0x19744b(0x1a0)](_0x1761eb['content']),'parentId':_0x415ecd}),_0x31f7c6=_0x2332ae(_0x512437[_0x19744b(0x1a5)][0x0]);return{..._0x31f7c6,'children':_0x512437[_0x19744b(0x1a5)][_0x19744b(0x182)](0x1)[_0x19744b(0x1c6)](_0xd700e9=>_0x2332ae(_0xd700e9,_0x31f7c6['id']))};}return null;}let p=class{constructor(_0x220570,_0x5ea29a,_0x7fa594){const _0x2ffd68=_0x40d73c;this[_0x2ffd68(0x1bf)]=_0x220570,this[_0x2ffd68(0x161)]=_0x5ea29a,this['_sessionService']=_0x7fa594;}async['addComment'](_0x28c7b1){const _0x522bef=_0x40d73c;var _0x4b2a88,_0x1dc8e7;const {parentId:_0x1e556a,unitId:_0x26fe0b,text:_0x2a6ac0,threadId:_0x5913bb}=_0x28c7b1,_0x2f65fc=(_0x1dc8e7=(_0x4b2a88=_0x2a6ac0[_0x522bef(0x16b)])==null?void 0x0:_0x4b2a88[_0x522bef(0x1b1)](_0x4245ea=>_0x4245ea[_0x522bef(0x190)]===c[_0x522bef(0x174)]['COMMENT'])[_0x522bef(0x1c6)](_0xa1bf5c=>_0xa1bf5c['rangeId']))!=null?_0x1dc8e7:[],_0x5bf137=JSON[_0x522bef(0x1a9)](_0x2a6ac0),_0x219f1d=(await this['_sessionService'][_0x522bef(0x18b)](_0x26fe0b))[_0x522bef(0x15f)]();if(_0x1e556a){const _0x13a42d={'memberId':_0x219f1d,'unitId':_0x26fe0b,'content':_0x5bf137,'mention':_0x2f65fc,'threadId':_0x5913bb},_0xb63640=(await this['_httpService'][_0x522bef(0x1b3)](_0x522bef(0x168)+_0x26fe0b+_0x522bef(0x1a6),{'body':_0x13a42d}))[_0x522bef(0x165)]['reply'];return{..._0x28c7b1,'id':_0xb63640[_0x522bef(0x186)],'dT':c[_0x522bef(0x180)](+_0xb63640[_0x522bef(0x159)])[_0x522bef(0x18d)](_0x522bef(0x18a)),'personId':_0xb63640[_0x522bef(0x19f)]};}else{const _0x539014={'memberId':_0x219f1d,'unitId':_0x26fe0b,'content':_0x5bf137,'mention':_0x2f65fc},_0x22ef51=await this[_0x522bef(0x1bf)]['post']('/universer-api/comment/unit/'+_0x26fe0b+_0x522bef(0x1c2),{'body':_0x539014});return Y(_0x22ef51[_0x522bef(0x165)][_0x522bef(0x1be)],_0x28c7b1);}}async[_0x40d73c(0x19b)](_0x1612fb){const _0x695713=_0x40d73c;var _0x53f67d,_0x37f866;const {text:_0x34dc87,unitId:_0x5da15d}=_0x1612fb,_0x338549=(_0x37f866=(_0x53f67d=_0x34dc87[_0x695713(0x16b)])==null?void 0x0:_0x53f67d[_0x695713(0x1b1)](_0x18b04a=>_0x18b04a[_0x695713(0x190)]===c[_0x695713(0x174)]['COMMENT'])[_0x695713(0x1c6)](_0x45accb=>_0x45accb['rangeId']))!=null?_0x37f866:[],_0x9a285c=JSON['stringify'](_0x34dc87),_0x5d5151=_0x1612fb['threadId'],_0x311b88=_0x1612fb['id'],_0x4dde97={'memberId':(await this[_0x695713(0x16f)]['requireSession'](_0x5da15d))[_0x695713(0x15f)](),'unitId':_0x5da15d,'threadId':_0x5d5151,'mention':_0x338549,'content':_0x9a285c,'replyId':_0x311b88},_0x24b58d=await this[_0x695713(0x1bf)][_0x695713(0x1b3)](_0x695713(0x168)+_0x5da15d+'/edit',{'body':_0x4dde97});return!_0x24b58d['body'][_0x695713(0x157)]||_0x24b58d[_0x695713(0x165)][_0x695713(0x157)][_0x695713(0x1b9)]===0x1;}async['resolveComment'](_0x5c3e42){const _0x4f8c4c=_0x40d73c,{unitId:_0x3409c7}=_0x5c3e42,_0x1760a8=_0x5c3e42['threadId'],_0x37caa7={'memberId':this['_userService'][_0x4f8c4c(0x15b)]()[_0x4f8c4c(0x194)],'unitId':_0x3409c7,'threadId':_0x1760a8,'solved':_0x5c3e42[_0x4f8c4c(0x1ae)]?I[_0x4f8c4c(0x171)]:I[_0x4f8c4c(0x162)]},_0x571b8d=await this[_0x4f8c4c(0x1bf)][_0x4f8c4c(0x1b3)](_0x4f8c4c(0x168)+_0x3409c7+_0x4f8c4c(0x1ba),{'body':_0x37caa7});return!_0x571b8d[_0x4f8c4c(0x165)][_0x4f8c4c(0x157)]||_0x571b8d[_0x4f8c4c(0x165)][_0x4f8c4c(0x157)][_0x4f8c4c(0x1b9)]===0x1;}async[_0x40d73c(0x1c8)](_0x3b36d2,_0x2f2303,_0x553c70,_0x5a424c){const _0x2721ac=_0x40d73c,_0x52688c={'memberId':(await this[_0x2721ac(0x16f)][_0x2721ac(0x18b)](_0x3b36d2))[_0x2721ac(0x15f)](),'threadId':_0x553c70,'replyId':_0x5a424c,'unitId':_0x3b36d2},_0x293bab=await this[_0x2721ac(0x1bf)][_0x2721ac(0x1b3)]('/universer-api/comment/unit/'+_0x3b36d2+'/delete',{'body':_0x52688c});return!_0x293bab[_0x2721ac(0x165)][_0x2721ac(0x157)]||_0x293bab[_0x2721ac(0x165)][_0x2721ac(0x157)]['code']===0x1;}async[_0x40d73c(0x164)](_0x43add8,_0x57bd48,_0xedf0c5){const _0xadde1f=_0x40d73c,_0x1b7050={'unitId':_0x43add8,'threadId':_0xedf0c5},_0x237345=await this[_0xadde1f(0x1bf)][_0xadde1f(0x1b3)]('/universer-api/comment/unit/'+_0x43add8+_0xadde1f(0x1ab),{'body':_0x1b7050}),_0x1fe52c=_0xedf0c5['map'](_0x29bd83=>G(_0x237345[_0xadde1f(0x165)][_0xadde1f(0x155)][_0x29bd83],_0x43add8,_0x57bd48))[_0xadde1f(0x1b1)](Boolean);return Object['values'](_0x237345[_0xadde1f(0x165)][_0xadde1f(0x163)])['forEach'](_0x2cfa1b=>{const _0x4e20f6=_0xadde1f;this[_0x4e20f6(0x161)][_0x4e20f6(0x166)](_0x2cfa1b);}),_0x1fe52c;}['saveCommentToSnapshot'](_0x32a219){const _0x1e6a41=_0x40d73c;return{'id':_0x32a219['id'],'threadId':_0x32a219[_0x1e6a41(0x1a7)],'ref':_0x32a219[_0x1e6a41(0x177)]};}};p=x([C(0x0,c['Inject'](P[_0x40d73c(0x158)])),C(0x1,c[_0x40d73c(0x19e)](c[_0x40d73c(0x1c5)])),C(0x2,c[_0x40d73c(0x19e)](b[_0x40d73c(0x17a)]))],p);var H=Object[_0x40d73c(0x1af)],J=(_0x2b4923,_0x527b00,_0x314a7c,_0x1be7fe)=>{const _0x44af0a=_0x40d73c;for(var _0x3e183d=_0x1be7fe>0x1?void 0x0:_0x1be7fe?H(_0x527b00,_0x314a7c):_0x527b00,_0xb2e436=_0x2b4923[_0x44af0a(0x160)]-0x1,_0x371697;_0xb2e436>=0x0;_0xb2e436--)(_0x371697=_0x2b4923[_0xb2e436])&&(_0x3e183d=_0x371697(_0x3e183d)||_0x3e183d);return _0x3e183d;},y=(_0x5a0c5b,_0x2eee8d)=>(_0x3c954c,_0x50b502)=>_0x2eee8d(_0x3c954c,_0x50b502,_0x5a0c5b);function _0x52e3(){const _0x434eb8=['UniverThreadCommentDataSourcePlugin','filter','disposeWithMe','post','unitId','119265zkPoaR','IConfigService','Module','Disposable','code','/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','payload','_config','comment','_httpService','size','_threadCommentDataSource','/add','_configService','addComment','UserManagerService','map','dataSource','deleteComment','comments','pipe','error','HTTPService','createTimestamp','UniverThreadCommentUIPlugin','getCurrentUser','_threadCommentDataSourceService','resolveComment','_initUserSync','getMemberID','length','_userService','OpenOrReOpen','users','listComments','body','addUser','_injector','/universer-api/comment/unit/','defineProperty','symbol','customRanges','5948037UFJffZ','get','UniverInstanceType','_sessionService','forEach','Solved','30YOdFbE','root','CustomRangeType','3598614wyLWbH','Delete','ref','2SEVRzV','content','CollaborationSessionService','subscribe','onStarting','4766545lFbmvW','find','UNIVER_UNKNOWN','dayjs','IThreadCommentDataSourceService','slice','Edit','solved','onReady','replyId','Reply','Unknown','bufferTime','YYYY/MM/DD\x20HH:mm','requireSession','_initDataSource','format','_commentService','Add','rangeType','Solve','setConfig','commentUpdate$','userID','434fjwMmZ','9052890xITRtR','Injector','ThreadCommentModel','_threadCommentModel','20112RNoAeb','updateComment','_init','user','Inject','userId','parse','UNRECOGNIZED','add','delete','merge','replies','/reply','threadId','4DmcCUL','stringify','type','/list','syncUpdateMutationToColla','1747419QRfdxc','resolved','getOwnPropertyDescriptor'];_0x52e3=function(){return _0x434eb8;};return _0x52e3();}let g=class extends c['Disposable']{constructor(_0x26f35e,_0x455d40){const _0x4da7a1=_0x40d73c;super(),this[_0x4da7a1(0x15c)]=_0x26f35e,this[_0x4da7a1(0x1c1)]=_0x455d40,this[_0x4da7a1(0x18c)]();}['_initDataSource'](){const _0x35f63f=_0x40d73c;this[_0x35f63f(0x15c)][_0x35f63f(0x1c7)]=this['_threadCommentDataSource'],this[_0x35f63f(0x15c)][_0x35f63f(0x1ac)]=!0x1;}};g=J([y(0x0,M[_0x40d73c(0x181)]),y(0x1,c[_0x40d73c(0x19e)](p))],g);function _0x4459(_0x552427,_0x284c08){const _0x52e3ec=_0x52e3();return _0x4459=function(_0x445926,_0x2a50f9){_0x445926=_0x445926-0x155;let _0x4c2ca3=_0x52e3ec[_0x445926];return _0x4c2ca3;},_0x4459(_0x552427,_0x284c08);}var F=Object[_0x40d73c(0x169)],L=Object['getOwnPropertyDescriptor'],Z=(_0x11ec7b,_0x3de5db,_0x325f8d)=>_0x3de5db in _0x11ec7b?F(_0x11ec7b,_0x3de5db,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x325f8d}):_0x11ec7b[_0x3de5db]=_0x325f8d,W=(_0x5825ec,_0x3a094a,_0x1cd651,_0x4496cf)=>{const _0x1b986d=_0x40d73c;for(var _0x3ad23e=_0x4496cf>0x1?void 0x0:_0x4496cf?L(_0x3a094a,_0x1cd651):_0x3a094a,_0x1c4087=_0x5825ec[_0x1b986d(0x160)]-0x1,_0x438760;_0x1c4087>=0x0;_0x1c4087--)(_0x438760=_0x5825ec[_0x1c4087])&&(_0x3ad23e=_0x438760(_0x3ad23e)||_0x3ad23e);return _0x3ad23e;},O=(_0x4069ba,_0x390d1f)=>(_0x24171b,_0x560811)=>_0x390d1f(_0x24171b,_0x560811,_0x4069ba),N=(_0x284cd2,_0x1f78e4,_0x82b172)=>Z(_0x284cd2,typeof _0x1f78e4!=_0x40d73c(0x16a)?_0x1f78e4+'':_0x1f78e4,_0x82b172);exports[_0x40d73c(0x1b0)]=class extends c['Plugin']{constructor(_0x37b45a=D,_0x4c952b,_0x27b0ec){const _0x30ce3e=_0x40d73c;super(),this[_0x30ce3e(0x1bd)]=_0x37b45a,this[_0x30ce3e(0x167)]=_0x4c952b,this[_0x30ce3e(0x1c3)]=_0x27b0ec;const {..._0x1ffe7a}=c[_0x30ce3e(0x1a4)]({},D,this[_0x30ce3e(0x1bd)]);this['_configService'][_0x30ce3e(0x192)](q,_0x1ffe7a);}[_0x40d73c(0x17c)](){const _0x506de2=_0x40d73c;[[p],[g],[_]][_0x506de2(0x170)](_0x37b92d=>{const _0x28b483=_0x506de2;this['_injector'][_0x28b483(0x1a2)](_0x37b92d);});}[_0x40d73c(0x185)](){const _0x596cb0=_0x40d73c;this[_0x596cb0(0x167)][_0x596cb0(0x16d)](g),this['_injector'][_0x596cb0(0x16d)](_);}},N(exports[_0x40d73c(0x1b0)],'pluginName',U),N(exports[_0x40d73c(0x1b0)],_0x40d73c(0x1aa),c[_0x40d73c(0x16e)][_0x40d73c(0x17f)]),exports[_0x40d73c(0x1b0)]=W([c['DependentOn'](w[_0x40d73c(0x15a)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x40d73c(0x197)])),O(0x2,c[_0x40d73c(0x1b6)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4216a6=_0xb571;(function(_0x2d8b2f,_0x59151c){const _0xa1f72=_0xb571,_0x559c02=_0x2d8b2f();while(!![]){try{const _0x527ec2=-parseInt(_0xa1f72(0xcf))/0x1+parseInt(_0xa1f72(0xdb))/0x2+-parseInt(_0xa1f72(0xeb))/0x3*(-parseInt(_0xa1f72(0xb2))/0x4)+parseInt(_0xa1f72(0xe4))/0x5+parseInt(_0xa1f72(0xf0))/0x6+parseInt(_0xa1f72(0xde))/0x7*(parseInt(_0xa1f72(0x9d))/0x8)+parseInt(_0xa1f72(0xa0))/0x9*(-parseInt(_0xa1f72(0xf5))/0xa);if(_0x527ec2===_0x59151c)break;else _0x559c02['push'](_0x559c02['shift']());}catch(_0x54dd11){_0x559c02['push'](_0x559c02['shift']());}}}(_0x5c5c,0xc48b6));import{CommentService as _0x1584c3,CollaborationSessionService as _0x12ee47,UniverCollaborationClientPlugin as _0x5719a3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x187f4d}from'@univerjs-pro/license';import{dayjs as _0x5b50d4,UserManagerService as _0x598b93,Inject as _0x49b372,Injector as _0x43ed79,Disposable as _0xef71e6,CustomRangeType as _0x5edfc0,UniverInstanceType as _0x347d61,DependentOn as _0x526950,IConfigService as _0x349588,Plugin as _0x2e9e01,merge as _0x41cc18}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x54f46d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x35b968,IThreadCommentDataSourceService as _0x23173b}from'@univerjs/thread-comment';import{bufferTime as _0x4b2858}from'rxjs';import{HTTPService as _0x38b897}from'@univerjs/network';const W=_0x4216a6(0xd9);var I=(_0x20269e=>(_0x20269e[_0x20269e['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x20269e[_0x20269e[_0x4216a6(0xcc)]=0x1]=_0x4216a6(0xcc),_0x20269e[_0x20269e[_0x4216a6(0xe8)]=-0x1]=_0x4216a6(0xe8),_0x20269e))(I||{}),v=(_0x5f1b7b=>(_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xcb)]=0x0]=_0x4216a6(0xcb),_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xfd)]=0x1]=_0x4216a6(0xfd),_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xab)]=0x2]=_0x4216a6(0xab),_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xd2)]=0x3]='Edit',_0x5f1b7b[_0x5f1b7b['Delete']=0x4]='Delete',_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xff)]=0x5]=_0x4216a6(0xff),_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xe8)]=-0x1]=_0x4216a6(0xe8),_0x5f1b7b))(v||{});const y=_0x2a8d2c=>_0x5b50d4(new Date(+_0x2a8d2c))[_0x4216a6(0xc8)](_0x4216a6(0xa1)),B=async(_0x53a0c8,_0x2de9bf)=>{const _0x431f59=_0x4216a6,_0x4090dc=_0x53a0c8[_0x431f59(0xa4)](_0x598b93),_0x2c2bdc=_0x53a0c8[_0x431f59(0xa4)](_0x38b897);_0x2de9bf[_0x431f59(0xec)](_0x3569be=>{const _0x566d9d=_0x431f59;_0x4090dc[_0x566d9d(0xad)](_0x3569be)&&_0x2de9bf['delete'](_0x3569be);}),_0x2de9bf[_0x431f59(0xea)]&&(await _0x2c2bdc[_0x431f59(0xa4)](_0x431f59(0x9f),{'params':{'userIDs':[..._0x2de9bf]}}))[_0x431f59(0xbe)][_0x431f59(0xf3)][_0x431f59(0xec)](_0x22f4b6=>{const _0x546d23=_0x431f59;_0x22f4b6&&_0x4090dc[_0x546d23(0xe0)](_0x22f4b6);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x4d6cf8,_0x3bb8fe,_0x599119,_0x46b88d)=>{for(var _0xfbae88=_0x46b88d>0x1?void 0x0:_0x46b88d?K(_0x3bb8fe,_0x599119):_0x3bb8fe,_0x524dec=_0x4d6cf8['length']-0x1,_0x1d27d6;_0x524dec>=0x0;_0x524dec--)(_0x1d27d6=_0x4d6cf8[_0x524dec])&&(_0xfbae88=_0x1d27d6(_0xfbae88)||_0xfbae88);return _0xfbae88;},p=(_0x469302,_0x3c61f1)=>(_0x3ec9ac,_0x36e9fb)=>_0x3c61f1(_0x3ec9ac,_0x36e9fb,_0x469302);let _=class extends _0xef71e6{constructor(_0x29bb3d,_0xf8d8af,_0x1559d2,_0x2fa1a8){const _0x3d6071=_0x4216a6;super(),this['_commentService']=_0x29bb3d,this['_threadCommentModel']=_0xf8d8af,this[_0x3d6071(0xf8)]=_0x1559d2,this[_0x3d6071(0xc0)]=_0x2fa1a8,this[_0x3d6071(0xac)](),this['_initUserSync']();}['_initUserSync'](){const _0x13cca5=_0x4216a6;this['disposeWithMe'](this[_0x13cca5(0xc5)][_0x13cca5(0xc2)]['pipe'](_0x4b2858(0x10))[_0x13cca5(0xfc)](_0x1de64d=>{const _0x17c26b=_0x13cca5,_0x3efb5e=new Set();_0x1de64d['forEach'](_0xf06023=>{const _0x2dbedc=_0xb571;switch(_0xf06023[_0x2dbedc(0xdf)]){case'add':{const _0x19f1d0=_0xf06023['payload']['personId'];_0x3efb5e['add'](_0x19f1d0);break;}}}),B(this[_0x17c26b(0xc0)],_0x3efb5e);}));}['_init'](){const _0x25c521=_0x4216a6;this['disposeWithMe'](this[_0x25c521(0xf6)][_0x25c521(0xc2)][_0x25c521(0xfc)](async _0x27952f=>{const _0x2232f3=_0x25c521;var _0x5ef136,_0x2d05b3,_0x9d3245,_0x1843b4;const _0x91a08a=(_0x5ef136=this[_0x2232f3(0xc5)]['getUnit'](_0x27952f[_0x2232f3(0x9e)])[_0x2232f3(0xd1)](_0xc242fc=>_0xc242fc['threadId']===_0x27952f['threadId']))==null?void 0x0:_0x5ef136['root'];if(!_0x91a08a)return;const {unitId:_0x110ed3,subUnitId:_0x46d10a}=_0x91a08a;switch(_0x27952f['user']&&this['_userService']['addUser'](_0x27952f['user']),_0x27952f[_0x2232f3(0xdf)]){case v[_0x2232f3(0xfd)]:break;case v['Reply']:{this[_0x2232f3(0xc5)]['addComment'](_0x110ed3,_0x46d10a,{'unitId':_0x110ed3,'subUnitId':_0x46d10a,'ref':'','id':_0x27952f[_0x2232f3(0xba)],'dT':y(+_0x27952f['createTimestamp']),'threadId':_0x27952f[_0x2232f3(0xae)],'personId':(_0x9d3245=(_0x2d05b3=_0x27952f[_0x2232f3(0xe6)])==null?void 0x0:_0x2d05b3[_0x2232f3(0xaf)])!=null?_0x9d3245:_0x27952f['userId'],'text':JSON['parse'](_0x27952f['content']),'parentId':_0x91a08a['id']});break;}case v[_0x2232f3(0xaa)]:{const _0x1f8839=this[_0x2232f3(0xc5)]['getComment'](_0x110ed3,_0x46d10a,_0x27952f[_0x2232f3(0xba)]);_0x1f8839&&_0x1f8839['parentId']&&this[_0x2232f3(0xc5)][_0x2232f3(0xb7)](_0x110ed3,_0x46d10a,_0x27952f[_0x2232f3(0xba)]);break;}case v[_0x2232f3(0xd2)]:{this[_0x2232f3(0xc5)][_0x2232f3(0xed)](_0x110ed3,_0x46d10a,{'commentId':_0x27952f[_0x2232f3(0xba)],'text':JSON[_0x2232f3(0xd5)](_0x27952f[_0x2232f3(0xc1)])});break;}case v[_0x2232f3(0xff)]:{const _0x48098a=(_0x1843b4=this[_0x2232f3(0xc5)][_0x2232f3(0xc7)](_0x27952f['unitId'])[_0x2232f3(0xd1)](_0x211a44=>_0x211a44['threadId']===_0x27952f['threadId']))==null?void 0x0:_0x1843b4[_0x2232f3(0xbf)];_0x48098a&&this[_0x2232f3(0xc5)][_0x2232f3(0xbc)](_0x110ed3,_0x46d10a,_0x48098a['id'],_0x27952f[_0x2232f3(0xa9)]===I[_0x2232f3(0xcc)]);break;}}}));}};_=V([p(0x0,_0x49b372(_0x1584c3)),p(0x1,_0x49b372(_0x35b968)),p(0x2,_0x49b372(_0x598b93)),p(0x3,_0x49b372(_0x43ed79))],_);const z=_0x4216a6(0xd6),O={};function _0xb571(_0x3d7de3,_0x8b813a){const _0x5c5cb7=_0x5c5c();return _0xb571=function(_0xb5711a,_0x53b26d){_0xb5711a=_0xb5711a-0x9d;let _0x5dfa3b=_0x5c5cb7[_0xb5711a];return _0x5dfa3b;},_0xb571(_0x3d7de3,_0x8b813a);}var k=Object['getOwnPropertyDescriptor'],Q=(_0x3fa53d,_0x3e42e8,_0x4b9dc8,_0x396df9)=>{for(var _0x1d9696=_0x396df9>0x1?void 0x0:_0x396df9?k(_0x3e42e8,_0x4b9dc8):_0x3e42e8,_0x554496=_0x3fa53d['length']-0x1,_0x560d1b;_0x554496>=0x0;_0x554496--)(_0x560d1b=_0x3fa53d[_0x554496])&&(_0x1d9696=_0x560d1b(_0x1d9696)||_0x1d9696);return _0x1d9696;},b=(_0x23497d,_0x526561)=>(_0x54d12d,_0x9bceb)=>_0x526561(_0x54d12d,_0x9bceb,_0x23497d);function X(_0x2ec03e,_0x2288c3){const _0x31fa5d=_0x4216a6,_0x3e668f=_0x2ec03e[_0x31fa5d(0xc3)][0x0];return{..._0x2288c3,'id':_0x3e668f[_0x31fa5d(0xba)],'resolved':_0x2ec03e[_0x31fa5d(0xa9)]===0x1,'dT':y(_0x3e668f[_0x31fa5d(0xe2)]),'personId':_0x3e668f['userId'],'threadId':_0x3e668f[_0x31fa5d(0xae)]};}function ee(_0x25a34a,_0x191128,_0x183b51){const _0x2afda8=_0x4216a6;var _0x5557ca,_0x6fc11b;if(((_0x6fc11b=(_0x5557ca=_0x25a34a==null?void 0x0:_0x25a34a[_0x2afda8(0xc3)])==null?void 0x0:_0x5557ca['length'])!=null?_0x6fc11b:0x0)>0x0){const _0x4f3d99=(_0x325783,_0x360fa1)=>({'id':_0x325783[_0x2afda8(0xba)],'threadId':_0x325783[_0x2afda8(0xae)],'dT':y(_0x325783[_0x2afda8(0xe2)]),'personId':_0x325783['userId'],'resolved':_0x25a34a['solved']===I['Solved'],'unitId':_0x191128,'subUnitId':_0x183b51,'text':JSON[_0x2afda8(0xd5)](_0x325783[_0x2afda8(0xc1)]),'parentId':_0x360fa1}),_0xbe6269=_0x4f3d99(_0x25a34a['replies'][0x0]);return{..._0xbe6269,'children':_0x25a34a['replies'][_0x2afda8(0xf7)](0x1)['map'](_0x2d4475=>_0x4f3d99(_0x2d4475,_0xbe6269['id']))};}return null;}let S=class{constructor(_0x206409,_0x559f8e,_0xf1f047){const _0xf5386a=_0x4216a6;this[_0xf5386a(0xb0)]=_0x206409,this['_userService']=_0x559f8e,this[_0xf5386a(0xb6)]=_0xf1f047;}async[_0x4216a6(0xca)](_0x54a245){const _0xa64d51=_0x4216a6;var _0x59cfeb,_0x3388ad;const {parentId:_0x57cee4,unitId:_0x33e0b3,text:_0x3eddd2,threadId:_0x2d4399}=_0x54a245,_0x271ad8=(_0x3388ad=(_0x59cfeb=_0x3eddd2[_0xa64d51(0xfa)])==null?void 0x0:_0x59cfeb[_0xa64d51(0xe5)](_0x21818a=>_0x21818a[_0xa64d51(0xa3)]===_0x5edfc0[_0xa64d51(0xbd)])['map'](_0x558601=>_0x558601['rangeId']))!=null?_0x3388ad:[],_0x304aeb=JSON[_0xa64d51(0xa2)](_0x3eddd2),_0x2c8c9f=(await this[_0xa64d51(0xb6)][_0xa64d51(0xd4)](_0x33e0b3))[_0xa64d51(0xfe)]();if(_0x57cee4){const _0xda28d1={'memberId':_0x2c8c9f,'unitId':_0x33e0b3,'content':_0x304aeb,'mention':_0x271ad8,'threadId':_0x2d4399},_0x5d50c5=(await this[_0xa64d51(0xb0)][_0xa64d51(0xbb)]('/universer-api/comment/unit/'+_0x33e0b3+_0xa64d51(0xef),{'body':_0xda28d1}))['body'][_0xa64d51(0xb8)];return{..._0x54a245,'id':_0x5d50c5[_0xa64d51(0xba)],'dT':_0x5b50d4(+_0x5d50c5[_0xa64d51(0xe2)])['format'](_0xa64d51(0xa1)),'personId':_0x5d50c5[_0xa64d51(0xf9)]};}else{const _0x3a3bcb={'memberId':_0x2c8c9f,'unitId':_0x33e0b3,'content':_0x304aeb,'mention':_0x271ad8},_0x4f1c8f=await this[_0xa64d51(0xb0)][_0xa64d51(0xbb)]('/universer-api/comment/unit/'+_0x33e0b3+_0xa64d51(0xf1),{'body':_0x3a3bcb});return X(_0x4f1c8f['body'][_0xa64d51(0xd3)],_0x54a245);}}async['updateComment'](_0xb1d840){const _0x119173=_0x4216a6;var _0x43ec39,_0x507f0a;const {text:_0x2ff724,unitId:_0x411044}=_0xb1d840,_0x260608=(_0x507f0a=(_0x43ec39=_0x2ff724[_0x119173(0xfa)])==null?void 0x0:_0x43ec39[_0x119173(0xe5)](_0x11c5bc=>_0x11c5bc[_0x119173(0xa3)]===_0x5edfc0[_0x119173(0xbd)])[_0x119173(0xc4)](_0x5e4b41=>_0x5e4b41[_0x119173(0xcd)]))!=null?_0x507f0a:[],_0x488b94=JSON['stringify'](_0x2ff724),_0x40d891=_0xb1d840[_0x119173(0xae)],_0x229020=_0xb1d840['id'],_0x588261={'memberId':(await this[_0x119173(0xb6)][_0x119173(0xd4)](_0x411044))[_0x119173(0xfe)](),'unitId':_0x411044,'threadId':_0x40d891,'mention':_0x260608,'content':_0x488b94,'replyId':_0x229020},_0x12cf44=await this[_0x119173(0xb0)][_0x119173(0xbb)](_0x119173(0xa5)+_0x411044+'/edit',{'body':_0x588261});return!_0x12cf44['body'][_0x119173(0xfb)]||_0x12cf44['body'][_0x119173(0xfb)][_0x119173(0xb5)]===0x1;}async[_0x4216a6(0xbc)](_0x384578){const _0x44ae4e=_0x4216a6,{unitId:_0x1f43b3}=_0x384578,_0x3b1657=_0x384578[_0x44ae4e(0xae)],_0x9f6883={'memberId':this[_0x44ae4e(0xf8)]['getCurrentUser']()['userID'],'unitId':_0x1f43b3,'threadId':_0x3b1657,'solved':_0x384578[_0x44ae4e(0xf2)]?I[_0x44ae4e(0xcc)]:I[_0x44ae4e(0xa7)]},_0x1584ca=await this[_0x44ae4e(0xb0)][_0x44ae4e(0xbb)](_0x44ae4e(0xa5)+_0x1f43b3+_0x44ae4e(0xd8),{'body':_0x9f6883});return!_0x1584ca['body'][_0x44ae4e(0xfb)]||_0x1584ca[_0x44ae4e(0xbe)]['error']['code']===0x1;}async[_0x4216a6(0xb7)](_0x8f098,_0xd47587,_0x121e87,_0x1d296a){const _0x1f4169=_0x4216a6,_0xd622c0={'memberId':(await this[_0x1f4169(0xb6)][_0x1f4169(0xd4)](_0x8f098))[_0x1f4169(0xfe)](),'threadId':_0x121e87,'replyId':_0x1d296a,'unitId':_0x8f098},_0x2911d8=await this[_0x1f4169(0xb0)][_0x1f4169(0xbb)]('/universer-api/comment/unit/'+_0x8f098+_0x1f4169(0xda),{'body':_0xd622c0});return!_0x2911d8['body']['error']||_0x2911d8[_0x1f4169(0xbe)][_0x1f4169(0xfb)][_0x1f4169(0xb5)]===0x1;}async['listComments'](_0x23b489,_0x222ba0,_0x20e8b9){const _0x3c2907=_0x4216a6,_0x33c943={'unitId':_0x23b489,'threadId':_0x20e8b9},_0x1eb491=await this[_0x3c2907(0xb0)][_0x3c2907(0xbb)](_0x3c2907(0xa5)+_0x23b489+_0x3c2907(0xe9),{'body':_0x33c943}),_0x3d55df=_0x20e8b9[_0x3c2907(0xc4)](_0x509889=>ee(_0x1eb491[_0x3c2907(0xbe)][_0x3c2907(0x100)][_0x509889],_0x23b489,_0x222ba0))[_0x3c2907(0xe5)](Boolean);return Object[_0x3c2907(0xd0)](_0x1eb491[_0x3c2907(0xbe)][_0x3c2907(0xf3)])[_0x3c2907(0xec)](_0x479309=>{const _0x1d5a5e=_0x3c2907;this[_0x1d5a5e(0xf8)][_0x1d5a5e(0xe0)](_0x479309);}),_0x3d55df;}[_0x4216a6(0xa8)](_0x434240){const _0x5e7bb6=_0x4216a6;return{'id':_0x434240['id'],'threadId':_0x434240[_0x5e7bb6(0xae)],'ref':_0x434240[_0x5e7bb6(0xd7)]};}};S=Q([b(0x0,_0x49b372(_0x38b897)),b(0x1,_0x49b372(_0x598b93)),b(0x2,_0x49b372(_0x12ee47))],S);var re=Object[_0x4216a6(0xe1)],te=(_0x347f9d,_0x45d7d4,_0x63250c,_0x3defd5)=>{const _0x2415d1=_0x4216a6;for(var _0x2251de=_0x3defd5>0x1?void 0x0:_0x3defd5?re(_0x45d7d4,_0x63250c):_0x45d7d4,_0x3564a4=_0x347f9d[_0x2415d1(0xe3)]-0x1,_0x2918e9;_0x3564a4>=0x0;_0x3564a4--)(_0x2918e9=_0x347f9d[_0x3564a4])&&(_0x2251de=_0x2918e9(_0x2251de)||_0x2251de);return _0x2251de;},M=(_0x3d6542,_0x2b609d)=>(_0x49e1bf,_0x2ae6d8)=>_0x2b609d(_0x49e1bf,_0x2ae6d8,_0x3d6542);let f=class extends _0xef71e6{constructor(_0x50d149,_0x9bb59e){const _0x3e6000=_0x4216a6;super(),this[_0x3e6000(0xf4)]=_0x50d149,this['_threadCommentDataSource']=_0x9bb59e,this[_0x3e6000(0xb3)]();}[_0x4216a6(0xb3)](){const _0x2d4ab3=_0x4216a6;this['_threadCommentDataSourceService'][_0x2d4ab3(0xdd)]=this['_threadCommentDataSource'],this[_0x2d4ab3(0xf4)][_0x2d4ab3(0xb1)]=!0x1;}};f=te([M(0x0,_0x23173b),M(0x1,_0x49b372(S))],f);function _0x5c5c(){const _0xb48658=['reply','_config','replyId','post','resolveComment','COMMENT','body','root','_injector','content','commentUpdate$','replies','map','_threadCommentModel','setConfig','getUnit','format','defineProperty','addComment','Unknown','Solved','rangeId','UNIVER_UNKNOWN','1423865lLpQkd','values','find','Edit','comment','requireSession','parse','thread-comment-data-source.config','ref','/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/delete','1718768wEfgwp','onReady','dataSource','707KkHKJh','type','addUser','getOwnPropertyDescriptor','createTimestamp','length','4544560GuSjYK','filter','user','onStarting','UNRECOGNIZED','/list','size','1751991ssMERF','forEach','updateComment','add','/reply','7920756JbXfiK','/add','resolved','users','_threadCommentDataSourceService','145600IUrZQv','_commentService','slice','_userService','userId','customRanges','error','subscribe','Add','getMemberID','Solve','comments','3296nDEwci','unitId','/universer-api/user/list','918xCawYy','YYYY/MM/DD\x20HH:mm','stringify','rangeType','get','/universer-api/comment/unit/','pluginName','OpenOrReOpen','saveCommentToSnapshot','solved','Delete','Reply','_init','getUser','threadId','userID','_httpService','syncUpdateMutationToColla','4LWHoFh','_initDataSource','_configService','code','_sessionService','deleteComment'];_0x5c5c=function(){return _0xb48658;};return _0x5c5c();}var se=Object[_0x4216a6(0xc9)],oe=Object[_0x4216a6(0xe1)],ne=(_0x441d6e,_0xd6a5ed,_0x11cfb0)=>_0xd6a5ed in _0x441d6e?se(_0x441d6e,_0xd6a5ed,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x11cfb0}):_0x441d6e[_0xd6a5ed]=_0x11cfb0,ie=(_0x541027,_0x39134b,_0x58a663,_0x547a9d)=>{const _0x2f5176=_0x4216a6;for(var _0xd75e81=_0x547a9d>0x1?void 0x0:_0x547a9d?oe(_0x39134b,_0x58a663):_0x39134b,_0x3a899c=_0x541027[_0x2f5176(0xe3)]-0x1,_0x56bff0;_0x3a899c>=0x0;_0x3a899c--)(_0x56bff0=_0x541027[_0x3a899c])&&(_0xd75e81=_0x56bff0(_0xd75e81)||_0xd75e81);return _0xd75e81;},N=(_0x3e2aef,_0x1e4ee2)=>(_0x1d7003,_0x30b021)=>_0x1e4ee2(_0x1d7003,_0x30b021,_0x3e2aef),$=(_0x4e1eb8,_0x1f8670,_0x5255f4)=>ne(_0x4e1eb8,typeof _0x1f8670!='symbol'?_0x1f8670+'':_0x1f8670,_0x5255f4);let g=class extends _0x2e9e01{constructor(_0x2b1a19=O,_0x169ad5,_0x366b34){const _0x212939=_0x4216a6;super(),this[_0x212939(0xb9)]=_0x2b1a19,this['_injector']=_0x169ad5,this['_configService']=_0x366b34;const {..._0x1c14c0}=_0x41cc18({},O,this[_0x212939(0xb9)]);this[_0x212939(0xb4)][_0x212939(0xc6)](z,_0x1c14c0);}[_0x4216a6(0xe7)](){const _0x745e4f=_0x4216a6;[[S],[f],[_]][_0x745e4f(0xec)](_0x171f41=>{const _0x22f5d5=_0x745e4f;this[_0x22f5d5(0xc0)][_0x22f5d5(0xee)](_0x171f41);});}[_0x4216a6(0xdc)](){const _0x466b3e=_0x4216a6;this['_injector']['get'](f),this['_injector'][_0x466b3e(0xa4)](_);}};$(g,_0x4216a6(0xa6),W),$(g,'type',_0x347d61[_0x4216a6(0xce)]),g=ie([_0x526950(_0x54f46d,_0x5719a3,_0x187f4d),N(0x1,_0x49b372(_0x43ed79)),N(0x2,_0x349588)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x275575=_0x4c29;(function(_0x1e2582,_0x3be747){const _0x21b665=_0x4c29,_0xac331a=_0x1e2582();while(!![]){try{const _0x217653=parseInt(_0x21b665(0x1d8))/0x1*(parseInt(_0x21b665(0x225))/0x2)+parseInt(_0x21b665(0x1ee))/0x3+-parseInt(_0x21b665(0x1ce))/0x4+parseInt(_0x21b665(0x1e6))/0x5*(-parseInt(_0x21b665(0x206))/0x6)+parseInt(_0x21b665(0x212))/0x7*(parseInt(_0x21b665(0x1f3))/0x8)+-parseInt(_0x21b665(0x1f8))/0x9*(-parseInt(_0x21b665(0x220))/0xa)+-parseInt(_0x21b665(0x1c5))/0xb;if(_0x217653===_0x3be747)break;else _0xac331a['push'](_0xac331a['shift']());}catch(_0x3bccdc){_0xac331a['push'](_0xac331a['shift']());}}}(_0x5de8,0xcc65c));import{CommentService as _0x3d5a29,CollaborationSessionService as _0x37a6c6,UniverCollaborationClientPlugin as _0x1f1be7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x396281}from'@univerjs-pro/license';import{dayjs as _0x36129d,UserManagerService as _0x188360,Inject as _0xde8013,Injector as _0x4c4116,Disposable as _0x2dddad,CustomRangeType as _0x6c1323,UniverInstanceType as _0x3cabaf,DependentOn as _0x3ab8d0,IConfigService as _0x5ce03d,Plugin as _0x391839,merge as _0x2439a0}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59d9b0}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x596e63,IThreadCommentDataSourceService as _0x47f5fc}from'@univerjs/thread-comment';import{bufferTime as _0x565e7e}from'rxjs';function _0x5de8(){const _0x58406f=['Add','ref','YYYY/MM/DD\x20HH:mm','symbol','_initDataSource','onReady','filter','3409ZZiTye','_configService','COMMENT','post','rangeType','Solve','pipe','Delete','_sessionService','_injector','size','Unknown','getUnit','customRanges','1553420JKCBFo','user','body','saveCommentToSnapshot','code','18ZTiBxp','UNIVER_UNKNOWN','resolveComment','users','getOwnPropertyDescriptor','32934495oiRTMK','root','subscribe','comment','getMemberID','replies','/reply','OpenOrReOpen','error','4675080wHREKM','/add','threadId','commentUpdate$','disposeWithMe','_initUserSync','slice','_threadCommentDataSource','_httpService','addComment','173697VtAEZU','delete','/edit','/universer-api/user/list','length','Solved','getCurrentUser','addUser','getUser','createTimestamp','onStarting','find','UNRECOGNIZED','deleteComment','20DVzpiz','content','_init','resolved','_threadCommentModel','getComment','get','solved','3667197psvXAu','/solved','rangeId','comments','unitId','16424VWeZEf','stringify','pluginName','parse','type','72UJEJyw','thread-comment-data-source.config','/universer-api/comment/unit/','_threadCommentDataSourceService','requireSession','updateComment','Edit','_userService','syncUpdateMutationToColla','forEach','personId','reply','/delete','replyId','42288lXhcvO','map','_commentService','userId','Reply'];_0x5de8=function(){return _0x58406f;};return _0x5de8();}import{HTTPService as _0x10249e}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x387d39=>(_0x387d39[_0x387d39[_0x275575(0x1cc)]=0x0]=_0x275575(0x1cc),_0x387d39[_0x387d39[_0x275575(0x1dd)]=0x1]=_0x275575(0x1dd),_0x387d39[_0x387d39['UNRECOGNIZED']=-0x1]=_0x275575(0x1e4),_0x387d39))(I||{}),v=(_0x1a5a50=>(_0x1a5a50[_0x1a5a50[_0x275575(0x21d)]=0x0]=_0x275575(0x21d),_0x1a5a50[_0x1a5a50[_0x275575(0x20b)]=0x1]=_0x275575(0x20b),_0x1a5a50[_0x1a5a50['Reply']=0x2]=_0x275575(0x20a),_0x1a5a50[_0x1a5a50[_0x275575(0x1fe)]=0x3]=_0x275575(0x1fe),_0x1a5a50[_0x1a5a50[_0x275575(0x219)]=0x4]=_0x275575(0x219),_0x1a5a50[_0x1a5a50['Solve']=0x5]='Solve',_0x1a5a50[_0x1a5a50[_0x275575(0x1e4)]=-0x1]=_0x275575(0x1e4),_0x1a5a50))(v||{});const y=_0x20c9f5=>_0x36129d(new Date(+_0x20c9f5))['format'](_0x275575(0x20d)),B=async(_0x4c1fb2,_0x28881c)=>{const _0x416236=_0x275575,_0x1380cb=_0x4c1fb2[_0x416236(0x1ec)](_0x188360),_0x34b17b=_0x4c1fb2[_0x416236(0x1ec)](_0x10249e);_0x28881c[_0x416236(0x201)](_0xaabef4=>{const _0xb0dbbf=_0x416236;_0x1380cb[_0xb0dbbf(0x1e0)](_0xaabef4)&&_0x28881c[_0xb0dbbf(0x1d9)](_0xaabef4);}),_0x28881c[_0x416236(0x21c)]&&(await _0x34b17b['get'](_0x416236(0x1db),{'params':{'userIDs':[..._0x28881c]}}))[_0x416236(0x222)]['users'][_0x416236(0x201)](_0x43caf8=>{_0x43caf8&&_0x1380cb['addUser'](_0x43caf8);});};var K=Object[_0x275575(0x229)],V=(_0x47ef92,_0x633b6a,_0xb44b57,_0x34ea59)=>{for(var _0x4b2227=_0x34ea59>0x1?void 0x0:_0x34ea59?K(_0x633b6a,_0xb44b57):_0x633b6a,_0x40b543=_0x47ef92['length']-0x1,_0x41cf0d;_0x40b543>=0x0;_0x40b543--)(_0x41cf0d=_0x47ef92[_0x40b543])&&(_0x4b2227=_0x41cf0d(_0x4b2227)||_0x4b2227);return _0x4b2227;},p=(_0xc1b8da,_0x3979a2)=>(_0x138342,_0x2e844f)=>_0x3979a2(_0x138342,_0x2e844f,_0xc1b8da);let _=class extends _0x2dddad{constructor(_0x2c5638,_0x4e0bb2,_0x591380,_0x24d732){const _0x413b61=_0x275575;super(),this[_0x413b61(0x208)]=_0x2c5638,this[_0x413b61(0x1ea)]=_0x4e0bb2,this[_0x413b61(0x1ff)]=_0x591380,this['_injector']=_0x24d732,this[_0x413b61(0x1e8)](),this[_0x413b61(0x1d3)]();}[_0x275575(0x1d3)](){const _0x5948f1=_0x275575;this[_0x5948f1(0x1d2)](this[_0x5948f1(0x1ea)][_0x5948f1(0x1d1)][_0x5948f1(0x218)](_0x565e7e(0x10))[_0x5948f1(0x1c7)](_0x3c245b=>{const _0x493ee8=_0x5948f1,_0x411db1=new Set();_0x3c245b[_0x493ee8(0x201)](_0x2eb238=>{const _0x4a35cd=_0x493ee8;switch(_0x2eb238[_0x4a35cd(0x1f7)]){case'add':{const _0xf19bf5=_0x2eb238['payload'][_0x4a35cd(0x202)];_0x411db1['add'](_0xf19bf5);break;}}}),B(this[_0x493ee8(0x21b)],_0x411db1);}));}[_0x275575(0x1e8)](){const _0x577c1c=_0x275575;this[_0x577c1c(0x1d2)](this[_0x577c1c(0x208)][_0x577c1c(0x1d1)][_0x577c1c(0x1c7)](async _0x5101e5=>{const _0x1a47c1=_0x577c1c;var _0x3b748a,_0x34e7fd,_0x14618c,_0x2c4e45;const _0x1cf729=(_0x3b748a=this[_0x1a47c1(0x1ea)][_0x1a47c1(0x21e)](_0x5101e5[_0x1a47c1(0x1f2)])[_0x1a47c1(0x1e3)](_0x5ec179=>_0x5ec179[_0x1a47c1(0x1d0)]===_0x5101e5[_0x1a47c1(0x1d0)]))==null?void 0x0:_0x3b748a[_0x1a47c1(0x1c6)];if(!_0x1cf729)return;const {unitId:_0x41cbc3,subUnitId:_0x23600b}=_0x1cf729;switch(_0x5101e5[_0x1a47c1(0x221)]&&this['_userService']['addUser'](_0x5101e5[_0x1a47c1(0x221)]),_0x5101e5[_0x1a47c1(0x1f7)]){case v[_0x1a47c1(0x20b)]:break;case v['Reply']:{this[_0x1a47c1(0x1ea)][_0x1a47c1(0x1d7)](_0x41cbc3,_0x23600b,{'unitId':_0x41cbc3,'subUnitId':_0x23600b,'ref':'','id':_0x5101e5['replyId'],'dT':y(+_0x5101e5['createTimestamp']),'threadId':_0x5101e5['threadId'],'personId':(_0x14618c=(_0x34e7fd=_0x5101e5[_0x1a47c1(0x221)])==null?void 0x0:_0x34e7fd['userID'])!=null?_0x14618c:_0x5101e5[_0x1a47c1(0x209)],'text':JSON[_0x1a47c1(0x1f6)](_0x5101e5['content']),'parentId':_0x1cf729['id']});break;}case v[_0x1a47c1(0x219)]:{const _0x8fb82a=this[_0x1a47c1(0x1ea)][_0x1a47c1(0x1eb)](_0x41cbc3,_0x23600b,_0x5101e5[_0x1a47c1(0x205)]);_0x8fb82a&&_0x8fb82a['parentId']&&this[_0x1a47c1(0x1ea)]['deleteComment'](_0x41cbc3,_0x23600b,_0x5101e5[_0x1a47c1(0x205)]);break;}case v['Edit']:{this[_0x1a47c1(0x1ea)]['updateComment'](_0x41cbc3,_0x23600b,{'commentId':_0x5101e5[_0x1a47c1(0x205)],'text':JSON['parse'](_0x5101e5[_0x1a47c1(0x1e7)])});break;}case v[_0x1a47c1(0x217)]:{const _0x3cc215=(_0x2c4e45=this[_0x1a47c1(0x1ea)][_0x1a47c1(0x21e)](_0x5101e5[_0x1a47c1(0x1f2)])[_0x1a47c1(0x1e3)](_0x4679cd=>_0x4679cd['threadId']===_0x5101e5['threadId']))==null?void 0x0:_0x2c4e45['root'];_0x3cc215&&this[_0x1a47c1(0x1ea)][_0x1a47c1(0x227)](_0x41cbc3,_0x23600b,_0x3cc215['id'],_0x5101e5[_0x1a47c1(0x1ed)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0xde8013(_0x3d5a29)),p(0x1,_0xde8013(_0x596e63)),p(0x2,_0xde8013(_0x188360)),p(0x3,_0xde8013(_0x4c4116))],_);const z=_0x275575(0x1f9),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5bc3c9,_0x2c111c,_0x11da80,_0x57b0b8)=>{const _0x332d53=_0x275575;for(var _0x44e2e=_0x57b0b8>0x1?void 0x0:_0x57b0b8?k(_0x2c111c,_0x11da80):_0x2c111c,_0x5c5896=_0x5bc3c9[_0x332d53(0x1dc)]-0x1,_0x52617b;_0x5c5896>=0x0;_0x5c5896--)(_0x52617b=_0x5bc3c9[_0x5c5896])&&(_0x44e2e=_0x52617b(_0x44e2e)||_0x44e2e);return _0x44e2e;},b=(_0xb163e3,_0x566f3d)=>(_0x30b126,_0x1de9c3)=>_0x566f3d(_0x30b126,_0x1de9c3,_0xb163e3);function X(_0x4f19d3,_0x2c4e0b){const _0x266dd7=_0x275575,_0x4c7241=_0x4f19d3[_0x266dd7(0x1ca)][0x0];return{..._0x2c4e0b,'id':_0x4c7241['replyId'],'resolved':_0x4f19d3[_0x266dd7(0x1ed)]===0x1,'dT':y(_0x4c7241[_0x266dd7(0x1e1)]),'personId':_0x4c7241[_0x266dd7(0x209)],'threadId':_0x4c7241[_0x266dd7(0x1d0)]};}function ee(_0x3aa93d,_0x5097fc,_0x5f5b33){const _0x1a336e=_0x275575;var _0x29d977,_0x368188;if(((_0x368188=(_0x29d977=_0x3aa93d==null?void 0x0:_0x3aa93d[_0x1a336e(0x1ca)])==null?void 0x0:_0x29d977[_0x1a336e(0x1dc)])!=null?_0x368188:0x0)>0x0){const _0x3eb303=(_0x38f1d6,_0x410ac3)=>({'id':_0x38f1d6['replyId'],'threadId':_0x38f1d6[_0x1a336e(0x1d0)],'dT':y(_0x38f1d6['createTimestamp']),'personId':_0x38f1d6['userId'],'resolved':_0x3aa93d[_0x1a336e(0x1ed)]===I[_0x1a336e(0x1dd)],'unitId':_0x5097fc,'subUnitId':_0x5f5b33,'text':JSON['parse'](_0x38f1d6['content']),'parentId':_0x410ac3}),_0xd6cb9f=_0x3eb303(_0x3aa93d[_0x1a336e(0x1ca)][0x0]);return{..._0xd6cb9f,'children':_0x3aa93d[_0x1a336e(0x1ca)][_0x1a336e(0x1d4)](0x1)[_0x1a336e(0x207)](_0x2f7d6d=>_0x3eb303(_0x2f7d6d,_0xd6cb9f['id']))};}return null;}let S=class{constructor(_0x2cb0b8,_0x2f3533,_0x5725a4){const _0x5897a4=_0x275575;this[_0x5897a4(0x1d6)]=_0x2cb0b8,this[_0x5897a4(0x1ff)]=_0x2f3533,this[_0x5897a4(0x21a)]=_0x5725a4;}async['addComment'](_0xdfc00f){const _0x410707=_0x275575;var _0x2ad7e7,_0x5c2555;const {parentId:_0x2a6264,unitId:_0x48b951,text:_0x54db91,threadId:_0x373f58}=_0xdfc00f,_0x5369d3=(_0x5c2555=(_0x2ad7e7=_0x54db91[_0x410707(0x21f)])==null?void 0x0:_0x2ad7e7[_0x410707(0x211)](_0x2f68af=>_0x2f68af['rangeType']===_0x6c1323[_0x410707(0x214)])[_0x410707(0x207)](_0x20c0f0=>_0x20c0f0['rangeId']))!=null?_0x5c2555:[],_0x47642d=JSON[_0x410707(0x1f4)](_0x54db91),_0x248741=(await this[_0x410707(0x21a)]['requireSession'](_0x48b951))[_0x410707(0x1c9)]();if(_0x2a6264){const _0x6dac91={'memberId':_0x248741,'unitId':_0x48b951,'content':_0x47642d,'mention':_0x5369d3,'threadId':_0x373f58},_0x36c323=(await this['_httpService'][_0x410707(0x215)](_0x410707(0x1fa)+_0x48b951+_0x410707(0x1cb),{'body':_0x6dac91}))['body'][_0x410707(0x203)];return{..._0xdfc00f,'id':_0x36c323[_0x410707(0x205)],'dT':_0x36129d(+_0x36c323[_0x410707(0x1e1)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x36c323[_0x410707(0x209)]};}else{const _0x1f8658={'memberId':_0x248741,'unitId':_0x48b951,'content':_0x47642d,'mention':_0x5369d3},_0x5925da=await this[_0x410707(0x1d6)][_0x410707(0x215)](_0x410707(0x1fa)+_0x48b951+_0x410707(0x1cf),{'body':_0x1f8658});return X(_0x5925da['body'][_0x410707(0x1c8)],_0xdfc00f);}}async[_0x275575(0x1fd)](_0x50eb69){const _0x288707=_0x275575;var _0x5d66bf,_0x57b7da;const {text:_0x56e5b3,unitId:_0x44024a}=_0x50eb69,_0x380fc0=(_0x57b7da=(_0x5d66bf=_0x56e5b3['customRanges'])==null?void 0x0:_0x5d66bf['filter'](_0x11f48d=>_0x11f48d[_0x288707(0x216)]===_0x6c1323['COMMENT'])[_0x288707(0x207)](_0x3f658a=>_0x3f658a[_0x288707(0x1f0)]))!=null?_0x57b7da:[],_0x49bd1d=JSON['stringify'](_0x56e5b3),_0x13fb6d=_0x50eb69[_0x288707(0x1d0)],_0x5ed13e=_0x50eb69['id'],_0x4c88c5={'memberId':(await this['_sessionService'][_0x288707(0x1fc)](_0x44024a))[_0x288707(0x1c9)](),'unitId':_0x44024a,'threadId':_0x13fb6d,'mention':_0x380fc0,'content':_0x49bd1d,'replyId':_0x5ed13e},_0x3f2c05=await this[_0x288707(0x1d6)]['post']('/universer-api/comment/unit/'+_0x44024a+_0x288707(0x1da),{'body':_0x4c88c5});return!_0x3f2c05[_0x288707(0x222)]['error']||_0x3f2c05['body'][_0x288707(0x1cd)][_0x288707(0x224)]===0x1;}async[_0x275575(0x227)](_0x3b6d35){const _0x34b095=_0x275575,{unitId:_0xbe3ad}=_0x3b6d35,_0x563eb8=_0x3b6d35['threadId'],_0x1d2f03={'memberId':this[_0x34b095(0x1ff)][_0x34b095(0x1de)]()['userID'],'unitId':_0xbe3ad,'threadId':_0x563eb8,'solved':_0x3b6d35[_0x34b095(0x1e9)]?I['Solved']:I['OpenOrReOpen']},_0x2a0c51=await this[_0x34b095(0x1d6)][_0x34b095(0x215)](_0x34b095(0x1fa)+_0xbe3ad+_0x34b095(0x1ef),{'body':_0x1d2f03});return!_0x2a0c51[_0x34b095(0x222)][_0x34b095(0x1cd)]||_0x2a0c51[_0x34b095(0x222)][_0x34b095(0x1cd)]['code']===0x1;}async[_0x275575(0x1e5)](_0x19e5ee,_0x3832c3,_0x44b363,_0x3206a0){const _0x1041ff=_0x275575,_0x390182={'memberId':(await this[_0x1041ff(0x21a)][_0x1041ff(0x1fc)](_0x19e5ee))['getMemberID'](),'threadId':_0x44b363,'replyId':_0x3206a0,'unitId':_0x19e5ee},_0x1d3204=await this[_0x1041ff(0x1d6)][_0x1041ff(0x215)](_0x1041ff(0x1fa)+_0x19e5ee+_0x1041ff(0x204),{'body':_0x390182});return!_0x1d3204[_0x1041ff(0x222)][_0x1041ff(0x1cd)]||_0x1d3204[_0x1041ff(0x222)][_0x1041ff(0x1cd)]['code']===0x1;}async['listComments'](_0x291554,_0x17984f,_0x248e92){const _0x4248f7=_0x275575,_0x55225d={'unitId':_0x291554,'threadId':_0x248e92},_0x14420c=await this[_0x4248f7(0x1d6)]['post'](_0x4248f7(0x1fa)+_0x291554+'/list',{'body':_0x55225d}),_0x4b8410=_0x248e92['map'](_0x23cb8b=>ee(_0x14420c[_0x4248f7(0x222)][_0x4248f7(0x1f1)][_0x23cb8b],_0x291554,_0x17984f))[_0x4248f7(0x211)](Boolean);return Object['values'](_0x14420c[_0x4248f7(0x222)][_0x4248f7(0x228)])['forEach'](_0x350653=>{const _0x218ea1=_0x4248f7;this[_0x218ea1(0x1ff)][_0x218ea1(0x1df)](_0x350653);}),_0x4b8410;}[_0x275575(0x223)](_0x2f9928){const _0xabe566=_0x275575;return{'id':_0x2f9928['id'],'threadId':_0x2f9928[_0xabe566(0x1d0)],'ref':_0x2f9928[_0xabe566(0x20c)]};}};S=Q([b(0x0,_0xde8013(_0x10249e)),b(0x1,_0xde8013(_0x188360)),b(0x2,_0xde8013(_0x37a6c6))],S);var re=Object[_0x275575(0x229)],te=(_0x49a27e,_0x3d24f0,_0x109bab,_0x274aa1)=>{const _0x2c8bc8=_0x275575;for(var _0x59bd97=_0x274aa1>0x1?void 0x0:_0x274aa1?re(_0x3d24f0,_0x109bab):_0x3d24f0,_0x5000b3=_0x49a27e[_0x2c8bc8(0x1dc)]-0x1,_0x5980ff;_0x5000b3>=0x0;_0x5000b3--)(_0x5980ff=_0x49a27e[_0x5000b3])&&(_0x59bd97=_0x5980ff(_0x59bd97)||_0x59bd97);return _0x59bd97;},M=(_0x214254,_0x51f7c9)=>(_0x3aa63e,_0x436ab5)=>_0x51f7c9(_0x3aa63e,_0x436ab5,_0x214254);function _0x4c29(_0x5d472e,_0x1b7a3c){const _0x5de8c2=_0x5de8();return _0x4c29=function(_0x4c29e7,_0x48ee8f){_0x4c29e7=_0x4c29e7-0x1c5;let _0x29eb8e=_0x5de8c2[_0x4c29e7];return _0x29eb8e;},_0x4c29(_0x5d472e,_0x1b7a3c);}let f=class extends _0x2dddad{constructor(_0x57b457,_0x79423a){const _0x3d8b91=_0x275575;super(),this['_threadCommentDataSourceService']=_0x57b457,this[_0x3d8b91(0x1d5)]=_0x79423a,this['_initDataSource']();}[_0x275575(0x20f)](){const _0x501b84=_0x275575;this[_0x501b84(0x1fb)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x501b84(0x200)]=!0x1;}};f=te([M(0x0,_0x47f5fc),M(0x1,_0xde8013(S))],f);var se=Object['defineProperty'],oe=Object[_0x275575(0x229)],ne=(_0x4a1390,_0x75ec14,_0xe21405)=>_0x75ec14 in _0x4a1390?se(_0x4a1390,_0x75ec14,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe21405}):_0x4a1390[_0x75ec14]=_0xe21405,ie=(_0x34db19,_0xd950c9,_0x5f2766,_0x366b07)=>{const _0x39ba20=_0x275575;for(var _0x46e546=_0x366b07>0x1?void 0x0:_0x366b07?oe(_0xd950c9,_0x5f2766):_0xd950c9,_0x28644c=_0x34db19[_0x39ba20(0x1dc)]-0x1,_0x403644;_0x28644c>=0x0;_0x28644c--)(_0x403644=_0x34db19[_0x28644c])&&(_0x46e546=_0x403644(_0x46e546)||_0x46e546);return _0x46e546;},N=(_0x28fea1,_0x27eb1d)=>(_0x208cdd,_0x38ccb5)=>_0x27eb1d(_0x208cdd,_0x38ccb5,_0x28fea1),$=(_0x138a30,_0x537051,_0x1259a5)=>ne(_0x138a30,typeof _0x537051!=_0x275575(0x20e)?_0x537051+'':_0x537051,_0x1259a5);let g=class extends _0x391839{constructor(_0x2b6b03=O,_0x549b60,_0x4587af){const _0x5d8373=_0x275575;super(),this['_config']=_0x2b6b03,this[_0x5d8373(0x21b)]=_0x549b60,this[_0x5d8373(0x213)]=_0x4587af;const {..._0x507169}=_0x2439a0({},O,this['_config']);this['_configService']['setConfig'](z,_0x507169);}[_0x275575(0x1e2)](){const _0x4e4652=_0x275575;[[S],[f],[_]][_0x4e4652(0x201)](_0x1ea360=>{const _0x1c23ec=_0x4e4652;this[_0x1c23ec(0x21b)]['add'](_0x1ea360);});}[_0x275575(0x210)](){const _0xc80849=_0x275575;this[_0xc80849(0x21b)][_0xc80849(0x1ec)](f),this[_0xc80849(0x21b)][_0xc80849(0x1ec)](_);}};$(g,_0x275575(0x1f5),W),$(g,_0x275575(0x1f7),_0x3cabaf[_0x275575(0x226)]),g=ie([_0x3ab8d0(_0x59d9b0,_0x1f1be7,_0x396281),N(0x1,_0xde8013(_0x4c4116)),N(0x2,_0x5ce03d)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4216a6=_0xb571;(function(_0x2d8b2f,_0x59151c){const _0xa1f72=_0xb571,_0x559c02=_0x2d8b2f();while(!![]){try{const _0x527ec2=-parseInt(_0xa1f72(0xcf))/0x1+parseInt(_0xa1f72(0xdb))/0x2+-parseInt(_0xa1f72(0xeb))/0x3*(-parseInt(_0xa1f72(0xb2))/0x4)+parseInt(_0xa1f72(0xe4))/0x5+parseInt(_0xa1f72(0xf0))/0x6+parseInt(_0xa1f72(0xde))/0x7*(parseInt(_0xa1f72(0x9d))/0x8)+parseInt(_0xa1f72(0xa0))/0x9*(-parseInt(_0xa1f72(0xf5))/0xa);if(_0x527ec2===_0x59151c)break;else _0x559c02['push'](_0x559c02['shift']());}catch(_0x54dd11){_0x559c02['push'](_0x559c02['shift']());}}}(_0x5c5c,0xc48b6));import{CommentService as _0x1584c3,CollaborationSessionService as _0x12ee47,UniverCollaborationClientPlugin as _0x5719a3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x187f4d}from'@univerjs-pro/license';import{dayjs as _0x5b50d4,UserManagerService as _0x598b93,Inject as _0x49b372,Injector as _0x43ed79,Disposable as _0xef71e6,CustomRangeType as _0x5edfc0,UniverInstanceType as _0x347d61,DependentOn as _0x526950,IConfigService as _0x349588,Plugin as _0x2e9e01,merge as _0x41cc18}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x54f46d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x35b968,IThreadCommentDataSourceService as _0x23173b}from'@univerjs/thread-comment';import{bufferTime as _0x4b2858}from'rxjs';import{HTTPService as _0x38b897}from'@univerjs/network';const W=_0x4216a6(0xd9);var I=(_0x20269e=>(_0x20269e[_0x20269e['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x20269e[_0x20269e[_0x4216a6(0xcc)]=0x1]=_0x4216a6(0xcc),_0x20269e[_0x20269e[_0x4216a6(0xe8)]=-0x1]=_0x4216a6(0xe8),_0x20269e))(I||{}),v=(_0x5f1b7b=>(_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xcb)]=0x0]=_0x4216a6(0xcb),_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xfd)]=0x1]=_0x4216a6(0xfd),_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xab)]=0x2]=_0x4216a6(0xab),_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xd2)]=0x3]='Edit',_0x5f1b7b[_0x5f1b7b['Delete']=0x4]='Delete',_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xff)]=0x5]=_0x4216a6(0xff),_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xe8)]=-0x1]=_0x4216a6(0xe8),_0x5f1b7b))(v||{});const y=_0x2a8d2c=>_0x5b50d4(new Date(+_0x2a8d2c))[_0x4216a6(0xc8)](_0x4216a6(0xa1)),B=async(_0x53a0c8,_0x2de9bf)=>{const _0x431f59=_0x4216a6,_0x4090dc=_0x53a0c8[_0x431f59(0xa4)](_0x598b93),_0x2c2bdc=_0x53a0c8[_0x431f59(0xa4)](_0x38b897);_0x2de9bf[_0x431f59(0xec)](_0x3569be=>{const _0x566d9d=_0x431f59;_0x4090dc[_0x566d9d(0xad)](_0x3569be)&&_0x2de9bf['delete'](_0x3569be);}),_0x2de9bf[_0x431f59(0xea)]&&(await _0x2c2bdc[_0x431f59(0xa4)](_0x431f59(0x9f),{'params':{'userIDs':[..._0x2de9bf]}}))[_0x431f59(0xbe)][_0x431f59(0xf3)][_0x431f59(0xec)](_0x22f4b6=>{const _0x546d23=_0x431f59;_0x22f4b6&&_0x4090dc[_0x546d23(0xe0)](_0x22f4b6);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x4d6cf8,_0x3bb8fe,_0x599119,_0x46b88d)=>{for(var _0xfbae88=_0x46b88d>0x1?void 0x0:_0x46b88d?K(_0x3bb8fe,_0x599119):_0x3bb8fe,_0x524dec=_0x4d6cf8['length']-0x1,_0x1d27d6;_0x524dec>=0x0;_0x524dec--)(_0x1d27d6=_0x4d6cf8[_0x524dec])&&(_0xfbae88=_0x1d27d6(_0xfbae88)||_0xfbae88);return _0xfbae88;},p=(_0x469302,_0x3c61f1)=>(_0x3ec9ac,_0x36e9fb)=>_0x3c61f1(_0x3ec9ac,_0x36e9fb,_0x469302);let _=class extends _0xef71e6{constructor(_0x29bb3d,_0xf8d8af,_0x1559d2,_0x2fa1a8){const _0x3d6071=_0x4216a6;super(),this['_commentService']=_0x29bb3d,this['_threadCommentModel']=_0xf8d8af,this[_0x3d6071(0xf8)]=_0x1559d2,this[_0x3d6071(0xc0)]=_0x2fa1a8,this[_0x3d6071(0xac)](),this['_initUserSync']();}['_initUserSync'](){const _0x13cca5=_0x4216a6;this['disposeWithMe'](this[_0x13cca5(0xc5)][_0x13cca5(0xc2)]['pipe'](_0x4b2858(0x10))[_0x13cca5(0xfc)](_0x1de64d=>{const _0x17c26b=_0x13cca5,_0x3efb5e=new Set();_0x1de64d['forEach'](_0xf06023=>{const _0x2dbedc=_0xb571;switch(_0xf06023[_0x2dbedc(0xdf)]){case'add':{const _0x19f1d0=_0xf06023['payload']['personId'];_0x3efb5e['add'](_0x19f1d0);break;}}}),B(this[_0x17c26b(0xc0)],_0x3efb5e);}));}['_init'](){const _0x25c521=_0x4216a6;this['disposeWithMe'](this[_0x25c521(0xf6)][_0x25c521(0xc2)][_0x25c521(0xfc)](async _0x27952f=>{const _0x2232f3=_0x25c521;var _0x5ef136,_0x2d05b3,_0x9d3245,_0x1843b4;const _0x91a08a=(_0x5ef136=this[_0x2232f3(0xc5)]['getUnit'](_0x27952f[_0x2232f3(0x9e)])[_0x2232f3(0xd1)](_0xc242fc=>_0xc242fc['threadId']===_0x27952f['threadId']))==null?void 0x0:_0x5ef136['root'];if(!_0x91a08a)return;const {unitId:_0x110ed3,subUnitId:_0x46d10a}=_0x91a08a;switch(_0x27952f['user']&&this['_userService']['addUser'](_0x27952f['user']),_0x27952f[_0x2232f3(0xdf)]){case v[_0x2232f3(0xfd)]:break;case v['Reply']:{this[_0x2232f3(0xc5)]['addComment'](_0x110ed3,_0x46d10a,{'unitId':_0x110ed3,'subUnitId':_0x46d10a,'ref':'','id':_0x27952f[_0x2232f3(0xba)],'dT':y(+_0x27952f['createTimestamp']),'threadId':_0x27952f[_0x2232f3(0xae)],'personId':(_0x9d3245=(_0x2d05b3=_0x27952f[_0x2232f3(0xe6)])==null?void 0x0:_0x2d05b3[_0x2232f3(0xaf)])!=null?_0x9d3245:_0x27952f['userId'],'text':JSON['parse'](_0x27952f['content']),'parentId':_0x91a08a['id']});break;}case v[_0x2232f3(0xaa)]:{const _0x1f8839=this[_0x2232f3(0xc5)]['getComment'](_0x110ed3,_0x46d10a,_0x27952f[_0x2232f3(0xba)]);_0x1f8839&&_0x1f8839['parentId']&&this[_0x2232f3(0xc5)][_0x2232f3(0xb7)](_0x110ed3,_0x46d10a,_0x27952f[_0x2232f3(0xba)]);break;}case v[_0x2232f3(0xd2)]:{this[_0x2232f3(0xc5)][_0x2232f3(0xed)](_0x110ed3,_0x46d10a,{'commentId':_0x27952f[_0x2232f3(0xba)],'text':JSON[_0x2232f3(0xd5)](_0x27952f[_0x2232f3(0xc1)])});break;}case v[_0x2232f3(0xff)]:{const _0x48098a=(_0x1843b4=this[_0x2232f3(0xc5)][_0x2232f3(0xc7)](_0x27952f['unitId'])[_0x2232f3(0xd1)](_0x211a44=>_0x211a44['threadId']===_0x27952f['threadId']))==null?void 0x0:_0x1843b4[_0x2232f3(0xbf)];_0x48098a&&this[_0x2232f3(0xc5)][_0x2232f3(0xbc)](_0x110ed3,_0x46d10a,_0x48098a['id'],_0x27952f[_0x2232f3(0xa9)]===I[_0x2232f3(0xcc)]);break;}}}));}};_=V([p(0x0,_0x49b372(_0x1584c3)),p(0x1,_0x49b372(_0x35b968)),p(0x2,_0x49b372(_0x598b93)),p(0x3,_0x49b372(_0x43ed79))],_);const z=_0x4216a6(0xd6),O={};function _0xb571(_0x3d7de3,_0x8b813a){const _0x5c5cb7=_0x5c5c();return _0xb571=function(_0xb5711a,_0x53b26d){_0xb5711a=_0xb5711a-0x9d;let _0x5dfa3b=_0x5c5cb7[_0xb5711a];return _0x5dfa3b;},_0xb571(_0x3d7de3,_0x8b813a);}var k=Object['getOwnPropertyDescriptor'],Q=(_0x3fa53d,_0x3e42e8,_0x4b9dc8,_0x396df9)=>{for(var _0x1d9696=_0x396df9>0x1?void 0x0:_0x396df9?k(_0x3e42e8,_0x4b9dc8):_0x3e42e8,_0x554496=_0x3fa53d['length']-0x1,_0x560d1b;_0x554496>=0x0;_0x554496--)(_0x560d1b=_0x3fa53d[_0x554496])&&(_0x1d9696=_0x560d1b(_0x1d9696)||_0x1d9696);return _0x1d9696;},b=(_0x23497d,_0x526561)=>(_0x54d12d,_0x9bceb)=>_0x526561(_0x54d12d,_0x9bceb,_0x23497d);function X(_0x2ec03e,_0x2288c3){const _0x31fa5d=_0x4216a6,_0x3e668f=_0x2ec03e[_0x31fa5d(0xc3)][0x0];return{..._0x2288c3,'id':_0x3e668f[_0x31fa5d(0xba)],'resolved':_0x2ec03e[_0x31fa5d(0xa9)]===0x1,'dT':y(_0x3e668f[_0x31fa5d(0xe2)]),'personId':_0x3e668f['userId'],'threadId':_0x3e668f[_0x31fa5d(0xae)]};}function ee(_0x25a34a,_0x191128,_0x183b51){const _0x2afda8=_0x4216a6;var _0x5557ca,_0x6fc11b;if(((_0x6fc11b=(_0x5557ca=_0x25a34a==null?void 0x0:_0x25a34a[_0x2afda8(0xc3)])==null?void 0x0:_0x5557ca['length'])!=null?_0x6fc11b:0x0)>0x0){const _0x4f3d99=(_0x325783,_0x360fa1)=>({'id':_0x325783[_0x2afda8(0xba)],'threadId':_0x325783[_0x2afda8(0xae)],'dT':y(_0x325783[_0x2afda8(0xe2)]),'personId':_0x325783['userId'],'resolved':_0x25a34a['solved']===I['Solved'],'unitId':_0x191128,'subUnitId':_0x183b51,'text':JSON[_0x2afda8(0xd5)](_0x325783[_0x2afda8(0xc1)]),'parentId':_0x360fa1}),_0xbe6269=_0x4f3d99(_0x25a34a['replies'][0x0]);return{..._0xbe6269,'children':_0x25a34a['replies'][_0x2afda8(0xf7)](0x1)['map'](_0x2d4475=>_0x4f3d99(_0x2d4475,_0xbe6269['id']))};}return null;}let S=class{constructor(_0x206409,_0x559f8e,_0xf1f047){const _0xf5386a=_0x4216a6;this[_0xf5386a(0xb0)]=_0x206409,this['_userService']=_0x559f8e,this[_0xf5386a(0xb6)]=_0xf1f047;}async[_0x4216a6(0xca)](_0x54a245){const _0xa64d51=_0x4216a6;var _0x59cfeb,_0x3388ad;const {parentId:_0x57cee4,unitId:_0x33e0b3,text:_0x3eddd2,threadId:_0x2d4399}=_0x54a245,_0x271ad8=(_0x3388ad=(_0x59cfeb=_0x3eddd2[_0xa64d51(0xfa)])==null?void 0x0:_0x59cfeb[_0xa64d51(0xe5)](_0x21818a=>_0x21818a[_0xa64d51(0xa3)]===_0x5edfc0[_0xa64d51(0xbd)])['map'](_0x558601=>_0x558601['rangeId']))!=null?_0x3388ad:[],_0x304aeb=JSON[_0xa64d51(0xa2)](_0x3eddd2),_0x2c8c9f=(await this[_0xa64d51(0xb6)][_0xa64d51(0xd4)](_0x33e0b3))[_0xa64d51(0xfe)]();if(_0x57cee4){const _0xda28d1={'memberId':_0x2c8c9f,'unitId':_0x33e0b3,'content':_0x304aeb,'mention':_0x271ad8,'threadId':_0x2d4399},_0x5d50c5=(await this[_0xa64d51(0xb0)][_0xa64d51(0xbb)]('/universer-api/comment/unit/'+_0x33e0b3+_0xa64d51(0xef),{'body':_0xda28d1}))['body'][_0xa64d51(0xb8)];return{..._0x54a245,'id':_0x5d50c5[_0xa64d51(0xba)],'dT':_0x5b50d4(+_0x5d50c5[_0xa64d51(0xe2)])['format'](_0xa64d51(0xa1)),'personId':_0x5d50c5[_0xa64d51(0xf9)]};}else{const _0x3a3bcb={'memberId':_0x2c8c9f,'unitId':_0x33e0b3,'content':_0x304aeb,'mention':_0x271ad8},_0x4f1c8f=await this[_0xa64d51(0xb0)][_0xa64d51(0xbb)]('/universer-api/comment/unit/'+_0x33e0b3+_0xa64d51(0xf1),{'body':_0x3a3bcb});return X(_0x4f1c8f['body'][_0xa64d51(0xd3)],_0x54a245);}}async['updateComment'](_0xb1d840){const _0x119173=_0x4216a6;var _0x43ec39,_0x507f0a;const {text:_0x2ff724,unitId:_0x411044}=_0xb1d840,_0x260608=(_0x507f0a=(_0x43ec39=_0x2ff724[_0x119173(0xfa)])==null?void 0x0:_0x43ec39[_0x119173(0xe5)](_0x11c5bc=>_0x11c5bc[_0x119173(0xa3)]===_0x5edfc0[_0x119173(0xbd)])[_0x119173(0xc4)](_0x5e4b41=>_0x5e4b41[_0x119173(0xcd)]))!=null?_0x507f0a:[],_0x488b94=JSON['stringify'](_0x2ff724),_0x40d891=_0xb1d840[_0x119173(0xae)],_0x229020=_0xb1d840['id'],_0x588261={'memberId':(await this[_0x119173(0xb6)][_0x119173(0xd4)](_0x411044))[_0x119173(0xfe)](),'unitId':_0x411044,'threadId':_0x40d891,'mention':_0x260608,'content':_0x488b94,'replyId':_0x229020},_0x12cf44=await this[_0x119173(0xb0)][_0x119173(0xbb)](_0x119173(0xa5)+_0x411044+'/edit',{'body':_0x588261});return!_0x12cf44['body'][_0x119173(0xfb)]||_0x12cf44['body'][_0x119173(0xfb)][_0x119173(0xb5)]===0x1;}async[_0x4216a6(0xbc)](_0x384578){const _0x44ae4e=_0x4216a6,{unitId:_0x1f43b3}=_0x384578,_0x3b1657=_0x384578[_0x44ae4e(0xae)],_0x9f6883={'memberId':this[_0x44ae4e(0xf8)]['getCurrentUser']()['userID'],'unitId':_0x1f43b3,'threadId':_0x3b1657,'solved':_0x384578[_0x44ae4e(0xf2)]?I[_0x44ae4e(0xcc)]:I[_0x44ae4e(0xa7)]},_0x1584ca=await this[_0x44ae4e(0xb0)][_0x44ae4e(0xbb)](_0x44ae4e(0xa5)+_0x1f43b3+_0x44ae4e(0xd8),{'body':_0x9f6883});return!_0x1584ca['body'][_0x44ae4e(0xfb)]||_0x1584ca[_0x44ae4e(0xbe)]['error']['code']===0x1;}async[_0x4216a6(0xb7)](_0x8f098,_0xd47587,_0x121e87,_0x1d296a){const _0x1f4169=_0x4216a6,_0xd622c0={'memberId':(await this[_0x1f4169(0xb6)][_0x1f4169(0xd4)](_0x8f098))[_0x1f4169(0xfe)](),'threadId':_0x121e87,'replyId':_0x1d296a,'unitId':_0x8f098},_0x2911d8=await this[_0x1f4169(0xb0)][_0x1f4169(0xbb)]('/universer-api/comment/unit/'+_0x8f098+_0x1f4169(0xda),{'body':_0xd622c0});return!_0x2911d8['body']['error']||_0x2911d8[_0x1f4169(0xbe)][_0x1f4169(0xfb)][_0x1f4169(0xb5)]===0x1;}async['listComments'](_0x23b489,_0x222ba0,_0x20e8b9){const _0x3c2907=_0x4216a6,_0x33c943={'unitId':_0x23b489,'threadId':_0x20e8b9},_0x1eb491=await this[_0x3c2907(0xb0)][_0x3c2907(0xbb)](_0x3c2907(0xa5)+_0x23b489+_0x3c2907(0xe9),{'body':_0x33c943}),_0x3d55df=_0x20e8b9[_0x3c2907(0xc4)](_0x509889=>ee(_0x1eb491[_0x3c2907(0xbe)][_0x3c2907(0x100)][_0x509889],_0x23b489,_0x222ba0))[_0x3c2907(0xe5)](Boolean);return Object[_0x3c2907(0xd0)](_0x1eb491[_0x3c2907(0xbe)][_0x3c2907(0xf3)])[_0x3c2907(0xec)](_0x479309=>{const _0x1d5a5e=_0x3c2907;this[_0x1d5a5e(0xf8)][_0x1d5a5e(0xe0)](_0x479309);}),_0x3d55df;}[_0x4216a6(0xa8)](_0x434240){const _0x5e7bb6=_0x4216a6;return{'id':_0x434240['id'],'threadId':_0x434240[_0x5e7bb6(0xae)],'ref':_0x434240[_0x5e7bb6(0xd7)]};}};S=Q([b(0x0,_0x49b372(_0x38b897)),b(0x1,_0x49b372(_0x598b93)),b(0x2,_0x49b372(_0x12ee47))],S);var re=Object[_0x4216a6(0xe1)],te=(_0x347f9d,_0x45d7d4,_0x63250c,_0x3defd5)=>{const _0x2415d1=_0x4216a6;for(var _0x2251de=_0x3defd5>0x1?void 0x0:_0x3defd5?re(_0x45d7d4,_0x63250c):_0x45d7d4,_0x3564a4=_0x347f9d[_0x2415d1(0xe3)]-0x1,_0x2918e9;_0x3564a4>=0x0;_0x3564a4--)(_0x2918e9=_0x347f9d[_0x3564a4])&&(_0x2251de=_0x2918e9(_0x2251de)||_0x2251de);return _0x2251de;},M=(_0x3d6542,_0x2b609d)=>(_0x49e1bf,_0x2ae6d8)=>_0x2b609d(_0x49e1bf,_0x2ae6d8,_0x3d6542);let f=class extends _0xef71e6{constructor(_0x50d149,_0x9bb59e){const _0x3e6000=_0x4216a6;super(),this[_0x3e6000(0xf4)]=_0x50d149,this['_threadCommentDataSource']=_0x9bb59e,this[_0x3e6000(0xb3)]();}[_0x4216a6(0xb3)](){const _0x2d4ab3=_0x4216a6;this['_threadCommentDataSourceService'][_0x2d4ab3(0xdd)]=this['_threadCommentDataSource'],this[_0x2d4ab3(0xf4)][_0x2d4ab3(0xb1)]=!0x1;}};f=te([M(0x0,_0x23173b),M(0x1,_0x49b372(S))],f);function _0x5c5c(){const _0xb48658=['reply','_config','replyId','post','resolveComment','COMMENT','body','root','_injector','content','commentUpdate$','replies','map','_threadCommentModel','setConfig','getUnit','format','defineProperty','addComment','Unknown','Solved','rangeId','UNIVER_UNKNOWN','1423865lLpQkd','values','find','Edit','comment','requireSession','parse','thread-comment-data-source.config','ref','/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/delete','1718768wEfgwp','onReady','dataSource','707KkHKJh','type','addUser','getOwnPropertyDescriptor','createTimestamp','length','4544560GuSjYK','filter','user','onStarting','UNRECOGNIZED','/list','size','1751991ssMERF','forEach','updateComment','add','/reply','7920756JbXfiK','/add','resolved','users','_threadCommentDataSourceService','145600IUrZQv','_commentService','slice','_userService','userId','customRanges','error','subscribe','Add','getMemberID','Solve','comments','3296nDEwci','unitId','/universer-api/user/list','918xCawYy','YYYY/MM/DD\x20HH:mm','stringify','rangeType','get','/universer-api/comment/unit/','pluginName','OpenOrReOpen','saveCommentToSnapshot','solved','Delete','Reply','_init','getUser','threadId','userID','_httpService','syncUpdateMutationToColla','4LWHoFh','_initDataSource','_configService','code','_sessionService','deleteComment'];_0x5c5c=function(){return _0xb48658;};return _0x5c5c();}var se=Object[_0x4216a6(0xc9)],oe=Object[_0x4216a6(0xe1)],ne=(_0x441d6e,_0xd6a5ed,_0x11cfb0)=>_0xd6a5ed in _0x441d6e?se(_0x441d6e,_0xd6a5ed,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x11cfb0}):_0x441d6e[_0xd6a5ed]=_0x11cfb0,ie=(_0x541027,_0x39134b,_0x58a663,_0x547a9d)=>{const _0x2f5176=_0x4216a6;for(var _0xd75e81=_0x547a9d>0x1?void 0x0:_0x547a9d?oe(_0x39134b,_0x58a663):_0x39134b,_0x3a899c=_0x541027[_0x2f5176(0xe3)]-0x1,_0x56bff0;_0x3a899c>=0x0;_0x3a899c--)(_0x56bff0=_0x541027[_0x3a899c])&&(_0xd75e81=_0x56bff0(_0xd75e81)||_0xd75e81);return _0xd75e81;},N=(_0x3e2aef,_0x1e4ee2)=>(_0x1d7003,_0x30b021)=>_0x1e4ee2(_0x1d7003,_0x30b021,_0x3e2aef),$=(_0x4e1eb8,_0x1f8670,_0x5255f4)=>ne(_0x4e1eb8,typeof _0x1f8670!='symbol'?_0x1f8670+'':_0x1f8670,_0x5255f4);let g=class extends _0x2e9e01{constructor(_0x2b1a19=O,_0x169ad5,_0x366b34){const _0x212939=_0x4216a6;super(),this[_0x212939(0xb9)]=_0x2b1a19,this['_injector']=_0x169ad5,this['_configService']=_0x366b34;const {..._0x1c14c0}=_0x41cc18({},O,this[_0x212939(0xb9)]);this[_0x212939(0xb4)][_0x212939(0xc6)](z,_0x1c14c0);}[_0x4216a6(0xe7)](){const _0x745e4f=_0x4216a6;[[S],[f],[_]][_0x745e4f(0xec)](_0x171f41=>{const _0x22f5d5=_0x745e4f;this[_0x22f5d5(0xc0)][_0x22f5d5(0xee)](_0x171f41);});}[_0x4216a6(0xdc)](){const _0x466b3e=_0x4216a6;this['_injector']['get'](f),this['_injector'][_0x466b3e(0xa4)](_);}};$(g,_0x4216a6(0xa6),W),$(g,'type',_0x347d61[_0x4216a6(0xce)]),g=ie([_0x526950(_0x54f46d,_0x5719a3,_0x187f4d),N(0x1,_0x49b372(_0x43ed79)),N(0x2,_0x349588)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x275575=_0x4c29;(function(_0x1e2582,_0x3be747){const _0x21b665=_0x4c29,_0xac331a=_0x1e2582();while(!![]){try{const _0x217653=parseInt(_0x21b665(0x1d8))/0x1*(parseInt(_0x21b665(0x225))/0x2)+parseInt(_0x21b665(0x1ee))/0x3+-parseInt(_0x21b665(0x1ce))/0x4+parseInt(_0x21b665(0x1e6))/0x5*(-parseInt(_0x21b665(0x206))/0x6)+parseInt(_0x21b665(0x212))/0x7*(parseInt(_0x21b665(0x1f3))/0x8)+-parseInt(_0x21b665(0x1f8))/0x9*(-parseInt(_0x21b665(0x220))/0xa)+-parseInt(_0x21b665(0x1c5))/0xb;if(_0x217653===_0x3be747)break;else _0xac331a['push'](_0xac331a['shift']());}catch(_0x3bccdc){_0xac331a['push'](_0xac331a['shift']());}}}(_0x5de8,0xcc65c));import{CommentService as _0x3d5a29,CollaborationSessionService as _0x37a6c6,UniverCollaborationClientPlugin as _0x1f1be7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x396281}from'@univerjs-pro/license';import{dayjs as _0x36129d,UserManagerService as _0x188360,Inject as _0xde8013,Injector as _0x4c4116,Disposable as _0x2dddad,CustomRangeType as _0x6c1323,UniverInstanceType as _0x3cabaf,DependentOn as _0x3ab8d0,IConfigService as _0x5ce03d,Plugin as _0x391839,merge as _0x2439a0}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59d9b0}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x596e63,IThreadCommentDataSourceService as _0x47f5fc}from'@univerjs/thread-comment';import{bufferTime as _0x565e7e}from'rxjs';function _0x5de8(){const _0x58406f=['Add','ref','YYYY/MM/DD\x20HH:mm','symbol','_initDataSource','onReady','filter','3409ZZiTye','_configService','COMMENT','post','rangeType','Solve','pipe','Delete','_sessionService','_injector','size','Unknown','getUnit','customRanges','1553420JKCBFo','user','body','saveCommentToSnapshot','code','18ZTiBxp','UNIVER_UNKNOWN','resolveComment','users','getOwnPropertyDescriptor','32934495oiRTMK','root','subscribe','comment','getMemberID','replies','/reply','OpenOrReOpen','error','4675080wHREKM','/add','threadId','commentUpdate$','disposeWithMe','_initUserSync','slice','_threadCommentDataSource','_httpService','addComment','173697VtAEZU','delete','/edit','/universer-api/user/list','length','Solved','getCurrentUser','addUser','getUser','createTimestamp','onStarting','find','UNRECOGNIZED','deleteComment','20DVzpiz','content','_init','resolved','_threadCommentModel','getComment','get','solved','3667197psvXAu','/solved','rangeId','comments','unitId','16424VWeZEf','stringify','pluginName','parse','type','72UJEJyw','thread-comment-data-source.config','/universer-api/comment/unit/','_threadCommentDataSourceService','requireSession','updateComment','Edit','_userService','syncUpdateMutationToColla','forEach','personId','reply','/delete','replyId','42288lXhcvO','map','_commentService','userId','Reply'];_0x5de8=function(){return _0x58406f;};return _0x5de8();}import{HTTPService as _0x10249e}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x387d39=>(_0x387d39[_0x387d39[_0x275575(0x1cc)]=0x0]=_0x275575(0x1cc),_0x387d39[_0x387d39[_0x275575(0x1dd)]=0x1]=_0x275575(0x1dd),_0x387d39[_0x387d39['UNRECOGNIZED']=-0x1]=_0x275575(0x1e4),_0x387d39))(I||{}),v=(_0x1a5a50=>(_0x1a5a50[_0x1a5a50[_0x275575(0x21d)]=0x0]=_0x275575(0x21d),_0x1a5a50[_0x1a5a50[_0x275575(0x20b)]=0x1]=_0x275575(0x20b),_0x1a5a50[_0x1a5a50['Reply']=0x2]=_0x275575(0x20a),_0x1a5a50[_0x1a5a50[_0x275575(0x1fe)]=0x3]=_0x275575(0x1fe),_0x1a5a50[_0x1a5a50[_0x275575(0x219)]=0x4]=_0x275575(0x219),_0x1a5a50[_0x1a5a50['Solve']=0x5]='Solve',_0x1a5a50[_0x1a5a50[_0x275575(0x1e4)]=-0x1]=_0x275575(0x1e4),_0x1a5a50))(v||{});const y=_0x20c9f5=>_0x36129d(new Date(+_0x20c9f5))['format'](_0x275575(0x20d)),B=async(_0x4c1fb2,_0x28881c)=>{const _0x416236=_0x275575,_0x1380cb=_0x4c1fb2[_0x416236(0x1ec)](_0x188360),_0x34b17b=_0x4c1fb2[_0x416236(0x1ec)](_0x10249e);_0x28881c[_0x416236(0x201)](_0xaabef4=>{const _0xb0dbbf=_0x416236;_0x1380cb[_0xb0dbbf(0x1e0)](_0xaabef4)&&_0x28881c[_0xb0dbbf(0x1d9)](_0xaabef4);}),_0x28881c[_0x416236(0x21c)]&&(await _0x34b17b['get'](_0x416236(0x1db),{'params':{'userIDs':[..._0x28881c]}}))[_0x416236(0x222)]['users'][_0x416236(0x201)](_0x43caf8=>{_0x43caf8&&_0x1380cb['addUser'](_0x43caf8);});};var K=Object[_0x275575(0x229)],V=(_0x47ef92,_0x633b6a,_0xb44b57,_0x34ea59)=>{for(var _0x4b2227=_0x34ea59>0x1?void 0x0:_0x34ea59?K(_0x633b6a,_0xb44b57):_0x633b6a,_0x40b543=_0x47ef92['length']-0x1,_0x41cf0d;_0x40b543>=0x0;_0x40b543--)(_0x41cf0d=_0x47ef92[_0x40b543])&&(_0x4b2227=_0x41cf0d(_0x4b2227)||_0x4b2227);return _0x4b2227;},p=(_0xc1b8da,_0x3979a2)=>(_0x138342,_0x2e844f)=>_0x3979a2(_0x138342,_0x2e844f,_0xc1b8da);let _=class extends _0x2dddad{constructor(_0x2c5638,_0x4e0bb2,_0x591380,_0x24d732){const _0x413b61=_0x275575;super(),this[_0x413b61(0x208)]=_0x2c5638,this[_0x413b61(0x1ea)]=_0x4e0bb2,this[_0x413b61(0x1ff)]=_0x591380,this['_injector']=_0x24d732,this[_0x413b61(0x1e8)](),this[_0x413b61(0x1d3)]();}[_0x275575(0x1d3)](){const _0x5948f1=_0x275575;this[_0x5948f1(0x1d2)](this[_0x5948f1(0x1ea)][_0x5948f1(0x1d1)][_0x5948f1(0x218)](_0x565e7e(0x10))[_0x5948f1(0x1c7)](_0x3c245b=>{const _0x493ee8=_0x5948f1,_0x411db1=new Set();_0x3c245b[_0x493ee8(0x201)](_0x2eb238=>{const _0x4a35cd=_0x493ee8;switch(_0x2eb238[_0x4a35cd(0x1f7)]){case'add':{const _0xf19bf5=_0x2eb238['payload'][_0x4a35cd(0x202)];_0x411db1['add'](_0xf19bf5);break;}}}),B(this[_0x493ee8(0x21b)],_0x411db1);}));}[_0x275575(0x1e8)](){const _0x577c1c=_0x275575;this[_0x577c1c(0x1d2)](this[_0x577c1c(0x208)][_0x577c1c(0x1d1)][_0x577c1c(0x1c7)](async _0x5101e5=>{const _0x1a47c1=_0x577c1c;var _0x3b748a,_0x34e7fd,_0x14618c,_0x2c4e45;const _0x1cf729=(_0x3b748a=this[_0x1a47c1(0x1ea)][_0x1a47c1(0x21e)](_0x5101e5[_0x1a47c1(0x1f2)])[_0x1a47c1(0x1e3)](_0x5ec179=>_0x5ec179[_0x1a47c1(0x1d0)]===_0x5101e5[_0x1a47c1(0x1d0)]))==null?void 0x0:_0x3b748a[_0x1a47c1(0x1c6)];if(!_0x1cf729)return;const {unitId:_0x41cbc3,subUnitId:_0x23600b}=_0x1cf729;switch(_0x5101e5[_0x1a47c1(0x221)]&&this['_userService']['addUser'](_0x5101e5[_0x1a47c1(0x221)]),_0x5101e5[_0x1a47c1(0x1f7)]){case v[_0x1a47c1(0x20b)]:break;case v['Reply']:{this[_0x1a47c1(0x1ea)][_0x1a47c1(0x1d7)](_0x41cbc3,_0x23600b,{'unitId':_0x41cbc3,'subUnitId':_0x23600b,'ref':'','id':_0x5101e5['replyId'],'dT':y(+_0x5101e5['createTimestamp']),'threadId':_0x5101e5['threadId'],'personId':(_0x14618c=(_0x34e7fd=_0x5101e5[_0x1a47c1(0x221)])==null?void 0x0:_0x34e7fd['userID'])!=null?_0x14618c:_0x5101e5[_0x1a47c1(0x209)],'text':JSON[_0x1a47c1(0x1f6)](_0x5101e5['content']),'parentId':_0x1cf729['id']});break;}case v[_0x1a47c1(0x219)]:{const _0x8fb82a=this[_0x1a47c1(0x1ea)][_0x1a47c1(0x1eb)](_0x41cbc3,_0x23600b,_0x5101e5[_0x1a47c1(0x205)]);_0x8fb82a&&_0x8fb82a['parentId']&&this[_0x1a47c1(0x1ea)]['deleteComment'](_0x41cbc3,_0x23600b,_0x5101e5[_0x1a47c1(0x205)]);break;}case v['Edit']:{this[_0x1a47c1(0x1ea)]['updateComment'](_0x41cbc3,_0x23600b,{'commentId':_0x5101e5[_0x1a47c1(0x205)],'text':JSON['parse'](_0x5101e5[_0x1a47c1(0x1e7)])});break;}case v[_0x1a47c1(0x217)]:{const _0x3cc215=(_0x2c4e45=this[_0x1a47c1(0x1ea)][_0x1a47c1(0x21e)](_0x5101e5[_0x1a47c1(0x1f2)])[_0x1a47c1(0x1e3)](_0x4679cd=>_0x4679cd['threadId']===_0x5101e5['threadId']))==null?void 0x0:_0x2c4e45['root'];_0x3cc215&&this[_0x1a47c1(0x1ea)][_0x1a47c1(0x227)](_0x41cbc3,_0x23600b,_0x3cc215['id'],_0x5101e5[_0x1a47c1(0x1ed)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0xde8013(_0x3d5a29)),p(0x1,_0xde8013(_0x596e63)),p(0x2,_0xde8013(_0x188360)),p(0x3,_0xde8013(_0x4c4116))],_);const z=_0x275575(0x1f9),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5bc3c9,_0x2c111c,_0x11da80,_0x57b0b8)=>{const _0x332d53=_0x275575;for(var _0x44e2e=_0x57b0b8>0x1?void 0x0:_0x57b0b8?k(_0x2c111c,_0x11da80):_0x2c111c,_0x5c5896=_0x5bc3c9[_0x332d53(0x1dc)]-0x1,_0x52617b;_0x5c5896>=0x0;_0x5c5896--)(_0x52617b=_0x5bc3c9[_0x5c5896])&&(_0x44e2e=_0x52617b(_0x44e2e)||_0x44e2e);return _0x44e2e;},b=(_0xb163e3,_0x566f3d)=>(_0x30b126,_0x1de9c3)=>_0x566f3d(_0x30b126,_0x1de9c3,_0xb163e3);function X(_0x4f19d3,_0x2c4e0b){const _0x266dd7=_0x275575,_0x4c7241=_0x4f19d3[_0x266dd7(0x1ca)][0x0];return{..._0x2c4e0b,'id':_0x4c7241['replyId'],'resolved':_0x4f19d3[_0x266dd7(0x1ed)]===0x1,'dT':y(_0x4c7241[_0x266dd7(0x1e1)]),'personId':_0x4c7241[_0x266dd7(0x209)],'threadId':_0x4c7241[_0x266dd7(0x1d0)]};}function ee(_0x3aa93d,_0x5097fc,_0x5f5b33){const _0x1a336e=_0x275575;var _0x29d977,_0x368188;if(((_0x368188=(_0x29d977=_0x3aa93d==null?void 0x0:_0x3aa93d[_0x1a336e(0x1ca)])==null?void 0x0:_0x29d977[_0x1a336e(0x1dc)])!=null?_0x368188:0x0)>0x0){const _0x3eb303=(_0x38f1d6,_0x410ac3)=>({'id':_0x38f1d6['replyId'],'threadId':_0x38f1d6[_0x1a336e(0x1d0)],'dT':y(_0x38f1d6['createTimestamp']),'personId':_0x38f1d6['userId'],'resolved':_0x3aa93d[_0x1a336e(0x1ed)]===I[_0x1a336e(0x1dd)],'unitId':_0x5097fc,'subUnitId':_0x5f5b33,'text':JSON['parse'](_0x38f1d6['content']),'parentId':_0x410ac3}),_0xd6cb9f=_0x3eb303(_0x3aa93d[_0x1a336e(0x1ca)][0x0]);return{..._0xd6cb9f,'children':_0x3aa93d[_0x1a336e(0x1ca)][_0x1a336e(0x1d4)](0x1)[_0x1a336e(0x207)](_0x2f7d6d=>_0x3eb303(_0x2f7d6d,_0xd6cb9f['id']))};}return null;}let S=class{constructor(_0x2cb0b8,_0x2f3533,_0x5725a4){const _0x5897a4=_0x275575;this[_0x5897a4(0x1d6)]=_0x2cb0b8,this[_0x5897a4(0x1ff)]=_0x2f3533,this[_0x5897a4(0x21a)]=_0x5725a4;}async['addComment'](_0xdfc00f){const _0x410707=_0x275575;var _0x2ad7e7,_0x5c2555;const {parentId:_0x2a6264,unitId:_0x48b951,text:_0x54db91,threadId:_0x373f58}=_0xdfc00f,_0x5369d3=(_0x5c2555=(_0x2ad7e7=_0x54db91[_0x410707(0x21f)])==null?void 0x0:_0x2ad7e7[_0x410707(0x211)](_0x2f68af=>_0x2f68af['rangeType']===_0x6c1323[_0x410707(0x214)])[_0x410707(0x207)](_0x20c0f0=>_0x20c0f0['rangeId']))!=null?_0x5c2555:[],_0x47642d=JSON[_0x410707(0x1f4)](_0x54db91),_0x248741=(await this[_0x410707(0x21a)]['requireSession'](_0x48b951))[_0x410707(0x1c9)]();if(_0x2a6264){const _0x6dac91={'memberId':_0x248741,'unitId':_0x48b951,'content':_0x47642d,'mention':_0x5369d3,'threadId':_0x373f58},_0x36c323=(await this['_httpService'][_0x410707(0x215)](_0x410707(0x1fa)+_0x48b951+_0x410707(0x1cb),{'body':_0x6dac91}))['body'][_0x410707(0x203)];return{..._0xdfc00f,'id':_0x36c323[_0x410707(0x205)],'dT':_0x36129d(+_0x36c323[_0x410707(0x1e1)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x36c323[_0x410707(0x209)]};}else{const _0x1f8658={'memberId':_0x248741,'unitId':_0x48b951,'content':_0x47642d,'mention':_0x5369d3},_0x5925da=await this[_0x410707(0x1d6)][_0x410707(0x215)](_0x410707(0x1fa)+_0x48b951+_0x410707(0x1cf),{'body':_0x1f8658});return X(_0x5925da['body'][_0x410707(0x1c8)],_0xdfc00f);}}async[_0x275575(0x1fd)](_0x50eb69){const _0x288707=_0x275575;var _0x5d66bf,_0x57b7da;const {text:_0x56e5b3,unitId:_0x44024a}=_0x50eb69,_0x380fc0=(_0x57b7da=(_0x5d66bf=_0x56e5b3['customRanges'])==null?void 0x0:_0x5d66bf['filter'](_0x11f48d=>_0x11f48d[_0x288707(0x216)]===_0x6c1323['COMMENT'])[_0x288707(0x207)](_0x3f658a=>_0x3f658a[_0x288707(0x1f0)]))!=null?_0x57b7da:[],_0x49bd1d=JSON['stringify'](_0x56e5b3),_0x13fb6d=_0x50eb69[_0x288707(0x1d0)],_0x5ed13e=_0x50eb69['id'],_0x4c88c5={'memberId':(await this['_sessionService'][_0x288707(0x1fc)](_0x44024a))[_0x288707(0x1c9)](),'unitId':_0x44024a,'threadId':_0x13fb6d,'mention':_0x380fc0,'content':_0x49bd1d,'replyId':_0x5ed13e},_0x3f2c05=await this[_0x288707(0x1d6)]['post']('/universer-api/comment/unit/'+_0x44024a+_0x288707(0x1da),{'body':_0x4c88c5});return!_0x3f2c05[_0x288707(0x222)]['error']||_0x3f2c05['body'][_0x288707(0x1cd)][_0x288707(0x224)]===0x1;}async[_0x275575(0x227)](_0x3b6d35){const _0x34b095=_0x275575,{unitId:_0xbe3ad}=_0x3b6d35,_0x563eb8=_0x3b6d35['threadId'],_0x1d2f03={'memberId':this[_0x34b095(0x1ff)][_0x34b095(0x1de)]()['userID'],'unitId':_0xbe3ad,'threadId':_0x563eb8,'solved':_0x3b6d35[_0x34b095(0x1e9)]?I['Solved']:I['OpenOrReOpen']},_0x2a0c51=await this[_0x34b095(0x1d6)][_0x34b095(0x215)](_0x34b095(0x1fa)+_0xbe3ad+_0x34b095(0x1ef),{'body':_0x1d2f03});return!_0x2a0c51[_0x34b095(0x222)][_0x34b095(0x1cd)]||_0x2a0c51[_0x34b095(0x222)][_0x34b095(0x1cd)]['code']===0x1;}async[_0x275575(0x1e5)](_0x19e5ee,_0x3832c3,_0x44b363,_0x3206a0){const _0x1041ff=_0x275575,_0x390182={'memberId':(await this[_0x1041ff(0x21a)][_0x1041ff(0x1fc)](_0x19e5ee))['getMemberID'](),'threadId':_0x44b363,'replyId':_0x3206a0,'unitId':_0x19e5ee},_0x1d3204=await this[_0x1041ff(0x1d6)][_0x1041ff(0x215)](_0x1041ff(0x1fa)+_0x19e5ee+_0x1041ff(0x204),{'body':_0x390182});return!_0x1d3204[_0x1041ff(0x222)][_0x1041ff(0x1cd)]||_0x1d3204[_0x1041ff(0x222)][_0x1041ff(0x1cd)]['code']===0x1;}async['listComments'](_0x291554,_0x17984f,_0x248e92){const _0x4248f7=_0x275575,_0x55225d={'unitId':_0x291554,'threadId':_0x248e92},_0x14420c=await this[_0x4248f7(0x1d6)]['post'](_0x4248f7(0x1fa)+_0x291554+'/list',{'body':_0x55225d}),_0x4b8410=_0x248e92['map'](_0x23cb8b=>ee(_0x14420c[_0x4248f7(0x222)][_0x4248f7(0x1f1)][_0x23cb8b],_0x291554,_0x17984f))[_0x4248f7(0x211)](Boolean);return Object['values'](_0x14420c[_0x4248f7(0x222)][_0x4248f7(0x228)])['forEach'](_0x350653=>{const _0x218ea1=_0x4248f7;this[_0x218ea1(0x1ff)][_0x218ea1(0x1df)](_0x350653);}),_0x4b8410;}[_0x275575(0x223)](_0x2f9928){const _0xabe566=_0x275575;return{'id':_0x2f9928['id'],'threadId':_0x2f9928[_0xabe566(0x1d0)],'ref':_0x2f9928[_0xabe566(0x20c)]};}};S=Q([b(0x0,_0xde8013(_0x10249e)),b(0x1,_0xde8013(_0x188360)),b(0x2,_0xde8013(_0x37a6c6))],S);var re=Object[_0x275575(0x229)],te=(_0x49a27e,_0x3d24f0,_0x109bab,_0x274aa1)=>{const _0x2c8bc8=_0x275575;for(var _0x59bd97=_0x274aa1>0x1?void 0x0:_0x274aa1?re(_0x3d24f0,_0x109bab):_0x3d24f0,_0x5000b3=_0x49a27e[_0x2c8bc8(0x1dc)]-0x1,_0x5980ff;_0x5000b3>=0x0;_0x5000b3--)(_0x5980ff=_0x49a27e[_0x5000b3])&&(_0x59bd97=_0x5980ff(_0x59bd97)||_0x59bd97);return _0x59bd97;},M=(_0x214254,_0x51f7c9)=>(_0x3aa63e,_0x436ab5)=>_0x51f7c9(_0x3aa63e,_0x436ab5,_0x214254);function _0x4c29(_0x5d472e,_0x1b7a3c){const _0x5de8c2=_0x5de8();return _0x4c29=function(_0x4c29e7,_0x48ee8f){_0x4c29e7=_0x4c29e7-0x1c5;let _0x29eb8e=_0x5de8c2[_0x4c29e7];return _0x29eb8e;},_0x4c29(_0x5d472e,_0x1b7a3c);}let f=class extends _0x2dddad{constructor(_0x57b457,_0x79423a){const _0x3d8b91=_0x275575;super(),this['_threadCommentDataSourceService']=_0x57b457,this[_0x3d8b91(0x1d5)]=_0x79423a,this['_initDataSource']();}[_0x275575(0x20f)](){const _0x501b84=_0x275575;this[_0x501b84(0x1fb)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x501b84(0x200)]=!0x1;}};f=te([M(0x0,_0x47f5fc),M(0x1,_0xde8013(S))],f);var se=Object['defineProperty'],oe=Object[_0x275575(0x229)],ne=(_0x4a1390,_0x75ec14,_0xe21405)=>_0x75ec14 in _0x4a1390?se(_0x4a1390,_0x75ec14,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe21405}):_0x4a1390[_0x75ec14]=_0xe21405,ie=(_0x34db19,_0xd950c9,_0x5f2766,_0x366b07)=>{const _0x39ba20=_0x275575;for(var _0x46e546=_0x366b07>0x1?void 0x0:_0x366b07?oe(_0xd950c9,_0x5f2766):_0xd950c9,_0x28644c=_0x34db19[_0x39ba20(0x1dc)]-0x1,_0x403644;_0x28644c>=0x0;_0x28644c--)(_0x403644=_0x34db19[_0x28644c])&&(_0x46e546=_0x403644(_0x46e546)||_0x46e546);return _0x46e546;},N=(_0x28fea1,_0x27eb1d)=>(_0x208cdd,_0x38ccb5)=>_0x27eb1d(_0x208cdd,_0x38ccb5,_0x28fea1),$=(_0x138a30,_0x537051,_0x1259a5)=>ne(_0x138a30,typeof _0x537051!=_0x275575(0x20e)?_0x537051+'':_0x537051,_0x1259a5);let g=class extends _0x391839{constructor(_0x2b6b03=O,_0x549b60,_0x4587af){const _0x5d8373=_0x275575;super(),this['_config']=_0x2b6b03,this[_0x5d8373(0x21b)]=_0x549b60,this[_0x5d8373(0x213)]=_0x4587af;const {..._0x507169}=_0x2439a0({},O,this['_config']);this['_configService']['setConfig'](z,_0x507169);}[_0x275575(0x1e2)](){const _0x4e4652=_0x275575;[[S],[f],[_]][_0x4e4652(0x201)](_0x1ea360=>{const _0x1c23ec=_0x4e4652;this[_0x1c23ec(0x21b)]['add'](_0x1ea360);});}[_0x275575(0x210)](){const _0xc80849=_0x275575;this[_0xc80849(0x21b)][_0xc80849(0x1ec)](f),this[_0xc80849(0x21b)][_0xc80849(0x1ec)](_);}};$(g,_0x275575(0x1f5),W),$(g,_0x275575(0x1f7),_0x3cabaf[_0x275575(0x226)]),g=ie([_0x3ab8d0(_0x59d9b0,_0x1f1be7,_0x396281),N(0x1,_0xde8013(_0x4c4116)),N(0x2,_0x5ce03d)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3476(){const _0x26782b=['deleteComment','subscribe','map','getComment','/reply','/delete','dataSource','Solved','/universer-api/user/list','delete','solved','body','payload','7009008UqrcSI','length','addComment','UNRECOGNIZED','Reply','error','@univerjs-pro/license','replyId','defineProperty','dayjs','rxjs','parse','onReady','amd','getUser','exports','UniverThreadCommentUIPlugin','6381783FBFHSQ','resolveComment','users','comment','UniverProLicense','Edit','_threadCommentModel','IConfigService','updateComment','root','CommentService','@univerjs/thread-comment-ui','thread-comment-data-source.config','resolved','size','10125820WlLEbK','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','commentUpdate$','find','553760qMvsps','Solve','IThreadCommentDataSourceService','slice','/list','addUser','requireSession','function','YYYY/MM/DD\x20HH:mm','Delete','_initDataSource','/universer-api/comment/unit/','filter','threadId','bufferTime','content','HTTPService','disposeWithMe','Inject','createTimestamp','UniverThreadCommentDataSourcePlugin','DependentOn','@univerjs/network','_commentService','format','object','/edit','unitId','code','getUnit','reply','forEach','rangeId','Unknown','UniverThreadCommentUi','15YTFVdU','user','pipe','UniverProThreadCommentDatasource','Disposable','CollaborationSessionService','_userService','_configService','Module','type','add','post','7SWcueH','UniverProCollaborationClient','42457aPiTNZ','_init','symbol','merge','OpenOrReOpen','personId','_sessionService','CustomRangeType','UniverCollaborationClientPlugin','COMMENT','UniverLicensePlugin','parentId','_httpService','UserManagerService','Add','replies','rangeType','ref','listComments','@univerjs-pro/collaboration-client','comments','/add','5321904Uulert','2JETqrf','_initUserSync','stringify','userId','getMemberID','UNIVER_UNKNOWN','get','_threadCommentDataSourceService','264276aOaAsz','_config','Injector','_injector','UniverCore'];_0x3476=function(){return _0x26782b;};return _0x3476();}function _0x56bf(_0x51d974,_0x31755a){const _0x3476a1=_0x3476();return _0x56bf=function(_0x56bf87,_0x5404af){_0x56bf87=_0x56bf87-0x9d;let _0x58ee15=_0x3476a1[_0x56bf87];return _0x58ee15;},_0x56bf(_0x51d974,_0x31755a);}(function(_0x2ef7d0,_0x257934){const _0x129bee=_0x56bf,_0x161fac=_0x2ef7d0();while(!![]){try{const _0x177eb0=parseInt(_0x129bee(0xc1))/0x1+-parseInt(_0x129bee(0xd8))/0x2*(-parseInt(_0x129bee(0xe0))/0x3)+parseInt(_0x129bee(0x117))/0x4*(parseInt(_0x129bee(0xb3))/0x5)+-parseInt(_0x129bee(0xd7))/0x6+-parseInt(_0x129bee(0xbf))/0x7*(parseInt(_0x129bee(0xf2))/0x8)+parseInt(_0x129bee(0x103))/0x9+parseInt(_0x129bee(0x112))/0xa;if(_0x177eb0===_0x257934)break;else _0x161fac['push'](_0x161fac['shift']());}catch(_0x53a153){_0x161fac['push'](_0x161fac['shift']());}}}(_0x3476,0x7b26c),function(_0x2770f2,_0x2ebdf5){const _0x434414=_0x56bf;typeof exports==_0x434414(0xa9)&&typeof module<'u'?_0x2ebdf5(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==_0x434414(0x11e)&&define[_0x434414(0xff)]?define([_0x434414(0x101),_0x434414(0xd4),_0x434414(0xf8),'@univerjs/core',_0x434414(0x10e),'@univerjs/thread-comment',_0x434414(0xfc),_0x434414(0xa6)],_0x2ebdf5):(_0x2770f2=typeof globalThis<'u'?globalThis:_0x2770f2||self,_0x2ebdf5(_0x2770f2[_0x434414(0xb6)]={},_0x2770f2[_0x434414(0xc0)],_0x2770f2[_0x434414(0x107)],_0x2770f2[_0x434414(0xe4)],_0x2770f2[_0x434414(0xb2)],_0x2770f2['UniverThreadComment'],_0x2770f2[_0x434414(0xfc)],_0x2770f2['UniverNetwork']));}(this,function(_0x4c7e66,_0x4a6ab9,_0x6d5476,_0x1b130c,_0xe14e60,_0x4b0c43,_0x51337c,_0x191bb6){'use strict';const _0x15cc7d=_0x56bf;const _0x150976=_0x15cc7d(0x113);var _0x54607c=(_0x4642da=>(_0x4642da[_0x4642da[_0x15cc7d(0xc5)]=0x0]=_0x15cc7d(0xc5),_0x4642da[_0x4642da[_0x15cc7d(0xec)]=0x1]='Solved',_0x4642da[_0x4642da[_0x15cc7d(0xf5)]=-0x1]=_0x15cc7d(0xf5),_0x4642da))(_0x54607c||{}),_0x52978e=(_0x56c0cb=>(_0x56c0cb[_0x56c0cb[_0x15cc7d(0xb1)]=0x0]='Unknown',_0x56c0cb[_0x56c0cb[_0x15cc7d(0xcf)]=0x1]=_0x15cc7d(0xcf),_0x56c0cb[_0x56c0cb[_0x15cc7d(0xf6)]=0x2]=_0x15cc7d(0xf6),_0x56c0cb[_0x56c0cb[_0x15cc7d(0x108)]=0x3]=_0x15cc7d(0x108),_0x56c0cb[_0x56c0cb[_0x15cc7d(0x120)]=0x4]=_0x15cc7d(0x120),_0x56c0cb[_0x56c0cb[_0x15cc7d(0x118)]=0x5]=_0x15cc7d(0x118),_0x56c0cb[_0x56c0cb[_0x15cc7d(0xf5)]=-0x1]=_0x15cc7d(0xf5),_0x56c0cb))(_0x52978e||{});const _0x28e31f=_0x43a8f8=>_0x1b130c[_0x15cc7d(0xfb)](new Date(+_0x43a8f8))['format'](_0x15cc7d(0x11f)),_0x44f95c=async(_0x130bf4,_0x444115)=>{const _0x347d93=_0x15cc7d,_0x36fa6e=_0x130bf4[_0x347d93(0xde)](_0x1b130c['UserManagerService']),_0x2d87c6=_0x130bf4['get'](_0x191bb6[_0x347d93(0xa0)]);_0x444115[_0x347d93(0xaf)](_0x2ece2c=>{const _0x1898fb=_0x347d93;_0x36fa6e[_0x1898fb(0x100)](_0x2ece2c)&&_0x444115[_0x1898fb(0xee)](_0x2ece2c);}),_0x444115[_0x347d93(0x111)]&&(await _0x2d87c6[_0x347d93(0xde)](_0x347d93(0xed),{'params':{'userIDs':[..._0x444115]}}))['body'][_0x347d93(0x105)][_0x347d93(0xaf)](_0x3915a5=>{const _0x3b7d3a=_0x347d93;_0x3915a5&&_0x36fa6e[_0x3b7d3a(0x11c)](_0x3915a5);});};var _0x18c602=Object[_0x15cc7d(0x114)],_0x134add=(_0x4b614a,_0x8d2798,_0xbcfe1c,_0x44d4f3)=>{const _0x20c953=_0x15cc7d;for(var _0x1fb92c=_0x44d4f3>0x1?void 0x0:_0x44d4f3?_0x18c602(_0x8d2798,_0xbcfe1c):_0x8d2798,_0x54abb1=_0x4b614a[_0x20c953(0xf3)]-0x1,_0x2f2f2e;_0x54abb1>=0x0;_0x54abb1--)(_0x2f2f2e=_0x4b614a[_0x54abb1])&&(_0x1fb92c=_0x2f2f2e(_0x1fb92c)||_0x1fb92c);return _0x1fb92c;},_0x4c896d=(_0x128294,_0xe0a984)=>(_0x156d5d,_0x17577d)=>_0xe0a984(_0x156d5d,_0x17577d,_0x128294);let _0x4cebda=class extends _0x1b130c['Disposable']{constructor(_0x5b0b27,_0x1e5b23,_0x2a385d,_0x389a2a){const _0x3d0255=_0x15cc7d;super(),this[_0x3d0255(0xa7)]=_0x5b0b27,this[_0x3d0255(0x109)]=_0x1e5b23,this['_userService']=_0x2a385d,this[_0x3d0255(0xe3)]=_0x389a2a,this[_0x3d0255(0xc2)](),this[_0x3d0255(0xd9)]();}[_0x15cc7d(0xd9)](){const _0x21f4e9=_0x15cc7d;this['disposeWithMe'](this[_0x21f4e9(0x109)]['commentUpdate$'][_0x21f4e9(0xb5)](_0x51337c[_0x21f4e9(0x9e)](0x10))[_0x21f4e9(0xe6)](_0x5862e0=>{const _0x56e262=_0x21f4e9,_0x5e402a=new Set();_0x5862e0[_0x56e262(0xaf)](_0x4cdaae=>{const _0x1c7e87=_0x56e262;switch(_0x4cdaae['type']){case _0x1c7e87(0xbd):{const _0xd8ccac=_0x4cdaae[_0x1c7e87(0xf1)][_0x1c7e87(0xc6)];_0x5e402a[_0x1c7e87(0xbd)](_0xd8ccac);break;}}}),_0x44f95c(this[_0x56e262(0xe3)],_0x5e402a);}));}['_init'](){const _0x13c4b5=_0x15cc7d;this[_0x13c4b5(0xa1)](this[_0x13c4b5(0xa7)][_0x13c4b5(0x115)]['subscribe'](async _0xaf2103=>{const _0x299ee3=_0x13c4b5;var _0x1725ae,_0x4afec1,_0x44f56a,_0x3a7019;const _0x8726bf=(_0x1725ae=this[_0x299ee3(0x109)][_0x299ee3(0xad)](_0xaf2103['unitId'])[_0x299ee3(0x116)](_0x245b8b=>_0x245b8b['threadId']===_0xaf2103[_0x299ee3(0x9d)]))==null?void 0x0:_0x1725ae[_0x299ee3(0x10c)];if(!_0x8726bf)return;const {unitId:_0x302dec,subUnitId:_0x4a6d22}=_0x8726bf;switch(_0xaf2103[_0x299ee3(0xb4)]&&this[_0x299ee3(0xb9)][_0x299ee3(0x11c)](_0xaf2103['user']),_0xaf2103[_0x299ee3(0xbc)]){case _0x52978e[_0x299ee3(0xcf)]:break;case _0x52978e[_0x299ee3(0xf6)]:{this[_0x299ee3(0x109)][_0x299ee3(0xf4)](_0x302dec,_0x4a6d22,{'unitId':_0x302dec,'subUnitId':_0x4a6d22,'ref':'','id':_0xaf2103[_0x299ee3(0xf9)],'dT':_0x28e31f(+_0xaf2103['createTimestamp']),'threadId':_0xaf2103[_0x299ee3(0x9d)],'personId':(_0x44f56a=(_0x4afec1=_0xaf2103[_0x299ee3(0xb4)])==null?void 0x0:_0x4afec1['userID'])!=null?_0x44f56a:_0xaf2103[_0x299ee3(0xdb)],'text':JSON[_0x299ee3(0xfd)](_0xaf2103[_0x299ee3(0x9f)]),'parentId':_0x8726bf['id']});break;}case _0x52978e[_0x299ee3(0x120)]:{const _0x5a3c01=this['_threadCommentModel'][_0x299ee3(0xe8)](_0x302dec,_0x4a6d22,_0xaf2103['replyId']);_0x5a3c01&&_0x5a3c01[_0x299ee3(0xcc)]&&this[_0x299ee3(0x109)][_0x299ee3(0xe5)](_0x302dec,_0x4a6d22,_0xaf2103['replyId']);break;}case _0x52978e[_0x299ee3(0x108)]:{this['_threadCommentModel'][_0x299ee3(0x10b)](_0x302dec,_0x4a6d22,{'commentId':_0xaf2103[_0x299ee3(0xf9)],'text':JSON[_0x299ee3(0xfd)](_0xaf2103[_0x299ee3(0x9f)])});break;}case _0x52978e[_0x299ee3(0x118)]:{const _0x2f1124=(_0x3a7019=this['_threadCommentModel'][_0x299ee3(0xad)](_0xaf2103[_0x299ee3(0xab)])[_0x299ee3(0x116)](_0x17389e=>_0x17389e[_0x299ee3(0x9d)]===_0xaf2103[_0x299ee3(0x9d)]))==null?void 0x0:_0x3a7019[_0x299ee3(0x10c)];_0x2f1124&&this['_threadCommentModel'][_0x299ee3(0x104)](_0x302dec,_0x4a6d22,_0x2f1124['id'],_0xaf2103[_0x299ee3(0xef)]===_0x54607c[_0x299ee3(0xec)]);break;}}}));}};_0x4cebda=_0x134add([_0x4c896d(0x0,_0x1b130c['Inject'](_0x4a6ab9[_0x15cc7d(0x10d)])),_0x4c896d(0x1,_0x1b130c[_0x15cc7d(0xa2)](_0x4b0c43['ThreadCommentModel'])),_0x4c896d(0x2,_0x1b130c[_0x15cc7d(0xa2)](_0x1b130c[_0x15cc7d(0xce)])),_0x4c896d(0x3,_0x1b130c[_0x15cc7d(0xa2)](_0x1b130c[_0x15cc7d(0xe2)]))],_0x4cebda);const _0x4dd06f=_0x15cc7d(0x10f),_0x1119be={};var _0x9544a3=Object[_0x15cc7d(0x114)],_0x47f319=(_0x46961d,_0x3da9f5,_0x4aff04,_0x207b37)=>{for(var _0x1e9615=_0x207b37>0x1?void 0x0:_0x207b37?_0x9544a3(_0x3da9f5,_0x4aff04):_0x3da9f5,_0x2c8930=_0x46961d['length']-0x1,_0x332bd9;_0x2c8930>=0x0;_0x2c8930--)(_0x332bd9=_0x46961d[_0x2c8930])&&(_0x1e9615=_0x332bd9(_0x1e9615)||_0x1e9615);return _0x1e9615;},_0x591c07=(_0x4c6493,_0x5df39b)=>(_0x2f2a81,_0x4ccc7e)=>_0x5df39b(_0x2f2a81,_0x4ccc7e,_0x4c6493);function _0x5dbd0b(_0x25f90c,_0x363af3){const _0x5f5196=_0x15cc7d,_0x6c2093=_0x25f90c['replies'][0x0];return{..._0x363af3,'id':_0x6c2093[_0x5f5196(0xf9)],'resolved':_0x25f90c[_0x5f5196(0xef)]===0x1,'dT':_0x28e31f(_0x6c2093['createTimestamp']),'personId':_0x6c2093[_0x5f5196(0xdb)],'threadId':_0x6c2093[_0x5f5196(0x9d)]};}function _0x24c125(_0x1f33ee,_0x1617cf,_0x33a297){const _0x26ea62=_0x15cc7d;var _0xf95655,_0x2d5c7a;if(((_0x2d5c7a=(_0xf95655=_0x1f33ee==null?void 0x0:_0x1f33ee[_0x26ea62(0xd0)])==null?void 0x0:_0xf95655['length'])!=null?_0x2d5c7a:0x0)>0x0){const _0x53958a=(_0x4e6023,_0x49cfd9)=>({'id':_0x4e6023[_0x26ea62(0xf9)],'threadId':_0x4e6023[_0x26ea62(0x9d)],'dT':_0x28e31f(_0x4e6023[_0x26ea62(0xa3)]),'personId':_0x4e6023[_0x26ea62(0xdb)],'resolved':_0x1f33ee[_0x26ea62(0xef)]===_0x54607c[_0x26ea62(0xec)],'unitId':_0x1617cf,'subUnitId':_0x33a297,'text':JSON['parse'](_0x4e6023[_0x26ea62(0x9f)]),'parentId':_0x49cfd9}),_0xfebcc8=_0x53958a(_0x1f33ee[_0x26ea62(0xd0)][0x0]);return{..._0xfebcc8,'children':_0x1f33ee[_0x26ea62(0xd0)][_0x26ea62(0x11a)](0x1)[_0x26ea62(0xe7)](_0x2a930b=>_0x53958a(_0x2a930b,_0xfebcc8['id']))};}return null;}let _0x1e7eeb=class{constructor(_0x270131,_0x4b99ec,_0x560b5c){const _0x17b8d3=_0x15cc7d;this[_0x17b8d3(0xcd)]=_0x270131,this[_0x17b8d3(0xb9)]=_0x4b99ec,this[_0x17b8d3(0xc7)]=_0x560b5c;}async[_0x15cc7d(0xf4)](_0x3c73a7){const _0x168fb4=_0x15cc7d;var _0x46c51d,_0x5f35a5;const {parentId:_0x463e49,unitId:_0x5d8d67,text:_0x2b4e94,threadId:_0x22d7e8}=_0x3c73a7,_0x340f7b=(_0x5f35a5=(_0x46c51d=_0x2b4e94['customRanges'])==null?void 0x0:_0x46c51d[_0x168fb4(0x123)](_0x544b41=>_0x544b41['rangeType']===_0x1b130c[_0x168fb4(0xc8)][_0x168fb4(0xca)])[_0x168fb4(0xe7)](_0x4ad65d=>_0x4ad65d[_0x168fb4(0xb0)]))!=null?_0x5f35a5:[],_0x58f396=JSON[_0x168fb4(0xda)](_0x2b4e94),_0x1011d5=(await this['_sessionService']['requireSession'](_0x5d8d67))[_0x168fb4(0xdc)]();if(_0x463e49){const _0x23ca6f={'memberId':_0x1011d5,'unitId':_0x5d8d67,'content':_0x58f396,'mention':_0x340f7b,'threadId':_0x22d7e8},_0x2d477f=(await this['_httpService'][_0x168fb4(0xbe)]('/universer-api/comment/unit/'+_0x5d8d67+_0x168fb4(0xe9),{'body':_0x23ca6f}))[_0x168fb4(0xf0)][_0x168fb4(0xae)];return{..._0x3c73a7,'id':_0x2d477f[_0x168fb4(0xf9)],'dT':_0x1b130c[_0x168fb4(0xfb)](+_0x2d477f[_0x168fb4(0xa3)])[_0x168fb4(0xa8)](_0x168fb4(0x11f)),'personId':_0x2d477f[_0x168fb4(0xdb)]};}else{const _0x485d52={'memberId':_0x1011d5,'unitId':_0x5d8d67,'content':_0x58f396,'mention':_0x340f7b},_0x3dfb74=await this[_0x168fb4(0xcd)][_0x168fb4(0xbe)]('/universer-api/comment/unit/'+_0x5d8d67+_0x168fb4(0xd6),{'body':_0x485d52});return _0x5dbd0b(_0x3dfb74[_0x168fb4(0xf0)][_0x168fb4(0x106)],_0x3c73a7);}}async[_0x15cc7d(0x10b)](_0x2f35bc){const _0x77cc7=_0x15cc7d;var _0x540a40,_0x2b1161;const {text:_0x54d4ed,unitId:_0x3488a6}=_0x2f35bc,_0x53fec1=(_0x2b1161=(_0x540a40=_0x54d4ed['customRanges'])==null?void 0x0:_0x540a40[_0x77cc7(0x123)](_0x575075=>_0x575075[_0x77cc7(0xd1)]===_0x1b130c['CustomRangeType']['COMMENT'])[_0x77cc7(0xe7)](_0x4c171b=>_0x4c171b['rangeId']))!=null?_0x2b1161:[],_0x122e8=JSON['stringify'](_0x54d4ed),_0xac1a7a=_0x2f35bc[_0x77cc7(0x9d)],_0xee7870=_0x2f35bc['id'],_0x178666={'memberId':(await this['_sessionService'][_0x77cc7(0x11d)](_0x3488a6))[_0x77cc7(0xdc)](),'unitId':_0x3488a6,'threadId':_0xac1a7a,'mention':_0x53fec1,'content':_0x122e8,'replyId':_0xee7870},_0x2ea23b=await this['_httpService'][_0x77cc7(0xbe)](_0x77cc7(0x122)+_0x3488a6+_0x77cc7(0xaa),{'body':_0x178666});return!_0x2ea23b[_0x77cc7(0xf0)][_0x77cc7(0xf7)]||_0x2ea23b[_0x77cc7(0xf0)]['error'][_0x77cc7(0xac)]===0x1;}async[_0x15cc7d(0x104)](_0x50121d){const _0x1f6dae=_0x15cc7d,{unitId:_0x2230eb}=_0x50121d,_0x432a4e=_0x50121d[_0x1f6dae(0x9d)],_0x16edfb={'memberId':this[_0x1f6dae(0xb9)]['getCurrentUser']()['userID'],'unitId':_0x2230eb,'threadId':_0x432a4e,'solved':_0x50121d[_0x1f6dae(0x110)]?_0x54607c['Solved']:_0x54607c[_0x1f6dae(0xc5)]},_0x4e4532=await this[_0x1f6dae(0xcd)]['post']('/universer-api/comment/unit/'+_0x2230eb+'/solved',{'body':_0x16edfb});return!_0x4e4532['body'][_0x1f6dae(0xf7)]||_0x4e4532['body']['error'][_0x1f6dae(0xac)]===0x1;}async[_0x15cc7d(0xe5)](_0x247c66,_0x112647,_0x534117,_0x5a6ffa){const _0x437eec=_0x15cc7d,_0xf35e75={'memberId':(await this[_0x437eec(0xc7)][_0x437eec(0x11d)](_0x247c66))[_0x437eec(0xdc)](),'threadId':_0x534117,'replyId':_0x5a6ffa,'unitId':_0x247c66},_0x3b0e66=await this[_0x437eec(0xcd)][_0x437eec(0xbe)](_0x437eec(0x122)+_0x247c66+_0x437eec(0xea),{'body':_0xf35e75});return!_0x3b0e66[_0x437eec(0xf0)][_0x437eec(0xf7)]||_0x3b0e66[_0x437eec(0xf0)]['error']['code']===0x1;}async[_0x15cc7d(0xd3)](_0xa5a6b2,_0x2c9495,_0x277747){const _0x47fbde=_0x15cc7d,_0x992260={'unitId':_0xa5a6b2,'threadId':_0x277747},_0xcc30eb=await this['_httpService'][_0x47fbde(0xbe)]('/universer-api/comment/unit/'+_0xa5a6b2+_0x47fbde(0x11b),{'body':_0x992260}),_0x1d41d7=_0x277747['map'](_0x227e3d=>_0x24c125(_0xcc30eb[_0x47fbde(0xf0)][_0x47fbde(0xd5)][_0x227e3d],_0xa5a6b2,_0x2c9495))['filter'](Boolean);return Object['values'](_0xcc30eb['body'][_0x47fbde(0x105)])['forEach'](_0x203ead=>{const _0x58c0f3=_0x47fbde;this['_userService'][_0x58c0f3(0x11c)](_0x203ead);}),_0x1d41d7;}['saveCommentToSnapshot'](_0x3567a3){const _0x43c826=_0x15cc7d;return{'id':_0x3567a3['id'],'threadId':_0x3567a3[_0x43c826(0x9d)],'ref':_0x3567a3[_0x43c826(0xd2)]};}};_0x1e7eeb=_0x47f319([_0x591c07(0x0,_0x1b130c[_0x15cc7d(0xa2)](_0x191bb6[_0x15cc7d(0xa0)])),_0x591c07(0x1,_0x1b130c[_0x15cc7d(0xa2)](_0x1b130c[_0x15cc7d(0xce)])),_0x591c07(0x2,_0x1b130c['Inject'](_0x4a6ab9[_0x15cc7d(0xb8)]))],_0x1e7eeb);var _0x5d751f=Object[_0x15cc7d(0x114)],_0x3baff4=(_0x160958,_0x451d66,_0x5ceef7,_0x2b0a61)=>{for(var _0x8accc9=_0x2b0a61>0x1?void 0x0:_0x2b0a61?_0x5d751f(_0x451d66,_0x5ceef7):_0x451d66,_0x1478af=_0x160958['length']-0x1,_0x58469b;_0x1478af>=0x0;_0x1478af--)(_0x58469b=_0x160958[_0x1478af])&&(_0x8accc9=_0x58469b(_0x8accc9)||_0x8accc9);return _0x8accc9;},_0x1df553=(_0x3dc7d5,_0x79ffb8)=>(_0xe77aec,_0x506137)=>_0x79ffb8(_0xe77aec,_0x506137,_0x3dc7d5);let _0x45f58a=class extends _0x1b130c[_0x15cc7d(0xb7)]{constructor(_0xd4b162,_0x369b6e){const _0x3af3e=_0x15cc7d;super(),this[_0x3af3e(0xdf)]=_0xd4b162,this['_threadCommentDataSource']=_0x369b6e,this[_0x3af3e(0x121)]();}[_0x15cc7d(0x121)](){const _0x2d221e=_0x15cc7d;this[_0x2d221e(0xdf)][_0x2d221e(0xeb)]=this['_threadCommentDataSource'],this[_0x2d221e(0xdf)]['syncUpdateMutationToColla']=!0x1;}};_0x45f58a=_0x3baff4([_0x1df553(0x0,_0x4b0c43[_0x15cc7d(0x119)]),_0x1df553(0x1,_0x1b130c[_0x15cc7d(0xa2)](_0x1e7eeb))],_0x45f58a);var _0x42da57=Object[_0x15cc7d(0xfa)],_0x5427c5=Object[_0x15cc7d(0x114)],_0x3dac11=(_0x4b7cc6,_0xa6f953,_0x39e5f0)=>_0xa6f953 in _0x4b7cc6?_0x42da57(_0x4b7cc6,_0xa6f953,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39e5f0}):_0x4b7cc6[_0xa6f953]=_0x39e5f0,_0x2f0cb7=(_0x322b85,_0x7d513,_0x12c3a9,_0x4f1fd5)=>{for(var _0x5a4416=_0x4f1fd5>0x1?void 0x0:_0x4f1fd5?_0x5427c5(_0x7d513,_0x12c3a9):_0x7d513,_0x2ce79c=_0x322b85['length']-0x1,_0x313512;_0x2ce79c>=0x0;_0x2ce79c--)(_0x313512=_0x322b85[_0x2ce79c])&&(_0x5a4416=_0x313512(_0x5a4416)||_0x5a4416);return _0x5a4416;},_0x5af9c8=(_0x211f41,_0x2e2448)=>(_0x33dcbf,_0x2b0100)=>_0x2e2448(_0x33dcbf,_0x2b0100,_0x211f41),_0x1786be=(_0x562fea,_0x281d30,_0x33a989)=>_0x3dac11(_0x562fea,typeof _0x281d30!=_0x15cc7d(0xc3)?_0x281d30+'':_0x281d30,_0x33a989);_0x4c7e66['UniverThreadCommentDataSourcePlugin']=class extends _0x1b130c['Plugin']{constructor(_0x28f362=_0x1119be,_0x93b1a7,_0x2a871b){const _0x53ceac=_0x15cc7d;super(),this[_0x53ceac(0xe1)]=_0x28f362,this[_0x53ceac(0xe3)]=_0x93b1a7,this['_configService']=_0x2a871b;const {..._0x5c6976}=_0x1b130c[_0x53ceac(0xc4)]({},_0x1119be,this['_config']);this[_0x53ceac(0xba)]['setConfig'](_0x4dd06f,_0x5c6976);}['onStarting'](){const _0x5704d9=_0x15cc7d;[[_0x1e7eeb],[_0x45f58a],[_0x4cebda]][_0x5704d9(0xaf)](_0x4137c9=>{const _0x4d52c8=_0x5704d9;this[_0x4d52c8(0xe3)][_0x4d52c8(0xbd)](_0x4137c9);});}[_0x15cc7d(0xfe)](){const _0x13e0fb=_0x15cc7d;this['_injector'][_0x13e0fb(0xde)](_0x45f58a),this[_0x13e0fb(0xe3)]['get'](_0x4cebda);}},_0x1786be(_0x4c7e66['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x150976),_0x1786be(_0x4c7e66[_0x15cc7d(0xa4)],_0x15cc7d(0xbc),_0x1b130c['UniverInstanceType'][_0x15cc7d(0xdd)]),_0x4c7e66[_0x15cc7d(0xa4)]=_0x2f0cb7([_0x1b130c[_0x15cc7d(0xa5)](_0xe14e60[_0x15cc7d(0x102)],_0x4a6ab9[_0x15cc7d(0xc9)],_0x6d5476[_0x15cc7d(0xcb)]),_0x5af9c8(0x1,_0x1b130c[_0x15cc7d(0xa2)](_0x1b130c['Injector'])),_0x5af9c8(0x2,_0x1b130c[_0x15cc7d(0x10a)])],_0x4c7e66['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x4c7e66,Symbol['toStringTag'],{'value':_0x15cc7d(0xbb)});}));
1
+ function _0x16cc(_0xbc2c55,_0x21c98c){const _0x12bd18=_0x12bd();return _0x16cc=function(_0x16cca9,_0x34c505){_0x16cca9=_0x16cca9-0x1c3;let _0x26e94a=_0x12bd18[_0x16cca9];return _0x26e94a;},_0x16cc(_0xbc2c55,_0x21c98c);}function _0x12bd(){const _0x475af3=['saveCommentToSnapshot','content','Unknown','@univerjs/thread-comment','UniverLicensePlugin','bufferTime','stringify','solved','amd','slice','replyId','dayjs','length','user','filter','object','rxjs','toStringTag','userId','parse','threadId','COMMENT','910dUywjy','_initDataSource','_userService','_init','/reply','_configService','Delete','getCurrentUser','/universer-api/comment/unit/','UniverProCollaborationClient','symbol','UniverNetwork','_threadCommentDataSourceService','commentUpdate$','rangeType','/edit','resolved','_commentService','_threadCommentModel','YYYY/MM/DD\x20HH:mm','parentId','@univerjs-pro/collaboration-client','getOwnPropertyDescriptor','/solved','UNRECOGNIZED','@univerjs/network','code','map','payload','CustomRangeType','syncUpdateMutationToColla','/add','pluginName','onReady','setConfig','ThreadCommentModel','Inject','UniverThreadCommentUi','root','Module','OpenOrReOpen','ref','/universer-api/user/list','createTimestamp','resolveComment','Disposable','delete','125360GQPSOU','error','_httpService','Solved','merge','UniverThreadCommentDataSourcePlugin','updateComment','IThreadCommentDataSourceService','format','UniverProLicense','replies','find','_injector','get','907UxdukZ','addUser','function','thread-comment-data-source.config','comments','168uocrFZ','pipe','/list','deleteComment','IConfigService','@univerjs/core','UserManagerService','1218384xdZzRD','addComment','defineProperty','@univerjs/thread-comment-ui','940821jvwjcF','UNIVER_UNKNOWN','UniverInstanceType','Solve','users','UniverProThreadCommentDatasource','DependentOn','getComment','personId','rangeId','_sessionService','dataSource','Add','getMemberID','body','unitId','_config','152664yRIwRB','CommentService','Injector','exports','requireSession','910962jDKllX','forEach','6858KziFOH','post','3Llnwmt','type','userID','Reply','Plugin','_initUserSync','HTTPService','size','subscribe','Edit','add','UniverThreadCommentUIPlugin','_threadCommentDataSource'];_0x12bd=function(){return _0x475af3;};return _0x12bd();}(function(_0x1d0699,_0x240901){const _0x1d5a83=_0x16cc,_0x3e868b=_0x1d0699();while(!![]){try{const _0x1cd37b=-parseInt(_0x1d5a83(0x210))/0x1*(parseInt(_0x1d5a83(0x215))/0x2)+-parseInt(_0x1d5a83(0x23a))/0x3*(parseInt(_0x1d5a83(0x231))/0x4)+parseInt(_0x1d5a83(0x202))/0x5+parseInt(_0x1d5a83(0x236))/0x6+parseInt(_0x1d5a83(0x220))/0x7+-parseInt(_0x1d5a83(0x21c))/0x8+parseInt(_0x1d5a83(0x238))/0x9*(parseInt(_0x1d5a83(0x1d3))/0xa);if(_0x1cd37b===_0x240901)break;else _0x3e868b['push'](_0x3e868b['shift']());}catch(_0xe0d405){_0x3e868b['push'](_0x3e868b['shift']());}}}(_0x12bd,0x1bd48),function(_0x48650b,_0x3507ab){const _0x1c3ff7=_0x16cc;typeof exports==_0x1c3ff7(0x1cc)&&typeof module<'u'?_0x3507ab(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==_0x1c3ff7(0x212)&&define[_0x1c3ff7(0x1c5)]?define([_0x1c3ff7(0x234),_0x1c3ff7(0x1e8),'@univerjs-pro/license',_0x1c3ff7(0x21a),_0x1c3ff7(0x21f),_0x1c3ff7(0x24a),_0x1c3ff7(0x1cd),_0x1c3ff7(0x1ec)],_0x3507ab):(_0x48650b=typeof globalThis<'u'?globalThis:_0x48650b||self,_0x3507ab(_0x48650b[_0x1c3ff7(0x225)]={},_0x48650b[_0x1c3ff7(0x1dc)],_0x48650b[_0x1c3ff7(0x20b)],_0x48650b['UniverCore'],_0x48650b[_0x1c3ff7(0x1f8)],_0x48650b['UniverThreadComment'],_0x48650b[_0x1c3ff7(0x1cd)],_0x48650b[_0x1c3ff7(0x1de)]));}(this,function(_0x503cf8,_0x1ae5ad,_0x5ea93e,_0x2a910e,_0x667203,_0x488a10,_0x2f22b7,_0x4c58d5){'use strict';const _0x1efa24=_0x16cc;const _0x59d600='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x4f488b=(_0x8bde02=>(_0x8bde02[_0x8bde02[_0x1efa24(0x1fb)]=0x0]=_0x1efa24(0x1fb),_0x8bde02[_0x8bde02[_0x1efa24(0x205)]=0x1]=_0x1efa24(0x205),_0x8bde02[_0x8bde02[_0x1efa24(0x1eb)]=-0x1]='UNRECOGNIZED',_0x8bde02))(_0x4f488b||{}),_0x213e43=(_0x466852=>(_0x466852[_0x466852[_0x1efa24(0x249)]=0x0]=_0x1efa24(0x249),_0x466852[_0x466852[_0x1efa24(0x22c)]=0x1]=_0x1efa24(0x22c),_0x466852[_0x466852['Reply']=0x2]=_0x1efa24(0x23d),_0x466852[_0x466852['Edit']=0x3]=_0x1efa24(0x243),_0x466852[_0x466852[_0x1efa24(0x1d9)]=0x4]=_0x1efa24(0x1d9),_0x466852[_0x466852[_0x1efa24(0x223)]=0x5]=_0x1efa24(0x223),_0x466852[_0x466852[_0x1efa24(0x1eb)]=-0x1]=_0x1efa24(0x1eb),_0x466852))(_0x213e43||{});const _0xc4c178=_0x4dd7b8=>_0x2a910e[_0x1efa24(0x1c8)](new Date(+_0x4dd7b8))[_0x1efa24(0x20a)]('YYYY/MM/DD\x20HH:mm'),_0x2532f9=async(_0x2e2bbd,_0x5a7249)=>{const _0x3ecef9=_0x1efa24,_0xeb5c00=_0x2e2bbd[_0x3ecef9(0x20f)](_0x2a910e[_0x3ecef9(0x21b)]),_0x317ead=_0x2e2bbd[_0x3ecef9(0x20f)](_0x4c58d5['HTTPService']);_0x5a7249['forEach'](_0x48f1f7=>{const _0x12bbb7=_0x3ecef9;_0xeb5c00['getUser'](_0x48f1f7)&&_0x5a7249[_0x12bbb7(0x201)](_0x48f1f7);}),_0x5a7249[_0x3ecef9(0x241)]&&(await _0x317ead[_0x3ecef9(0x20f)](_0x3ecef9(0x1fd),{'params':{'userIDs':[..._0x5a7249]}}))[_0x3ecef9(0x22e)][_0x3ecef9(0x224)]['forEach'](_0x43af8c=>{const _0x12d1e0=_0x3ecef9;_0x43af8c&&_0xeb5c00[_0x12d1e0(0x211)](_0x43af8c);});};var _0x4f68b4=Object['getOwnPropertyDescriptor'],_0x5e6d71=(_0x5d912d,_0x5e1adb,_0x3930cd,_0x452b3f)=>{const _0xd8d312=_0x1efa24;for(var _0x2852fc=_0x452b3f>0x1?void 0x0:_0x452b3f?_0x4f68b4(_0x5e1adb,_0x3930cd):_0x5e1adb,_0x20e63e=_0x5d912d[_0xd8d312(0x1c9)]-0x1,_0x561f78;_0x20e63e>=0x0;_0x20e63e--)(_0x561f78=_0x5d912d[_0x20e63e])&&(_0x2852fc=_0x561f78(_0x2852fc)||_0x2852fc);return _0x2852fc;},_0x2d5716=(_0x20bb06,_0xf26b5)=>(_0x2d027c,_0x1d3602)=>_0xf26b5(_0x2d027c,_0x1d3602,_0x20bb06);let _0x2fd4e8=class extends _0x2a910e[_0x1efa24(0x200)]{constructor(_0x5199e5,_0x13019a,_0x48ee39,_0x4e0f87){const _0x178e2d=_0x1efa24;super(),this[_0x178e2d(0x1e4)]=_0x5199e5,this[_0x178e2d(0x1e5)]=_0x13019a,this[_0x178e2d(0x1d5)]=_0x48ee39,this['_injector']=_0x4e0f87,this['_init'](),this[_0x178e2d(0x23f)]();}['_initUserSync'](){const _0x21a431=_0x1efa24;this['disposeWithMe'](this[_0x21a431(0x1e5)][_0x21a431(0x1e0)][_0x21a431(0x216)](_0x2f22b7[_0x21a431(0x24c)](0x10))[_0x21a431(0x242)](_0x595e55=>{const _0x12d52d=_0x21a431,_0x3023c6=new Set();_0x595e55[_0x12d52d(0x237)](_0x194879=>{const _0x4b5e79=_0x12d52d;switch(_0x194879[_0x4b5e79(0x23b)]){case _0x4b5e79(0x244):{const _0x31f947=_0x194879[_0x4b5e79(0x1ef)][_0x4b5e79(0x228)];_0x3023c6[_0x4b5e79(0x244)](_0x31f947);break;}}}),_0x2532f9(this['_injector'],_0x3023c6);}));}[_0x1efa24(0x1d6)](){const _0x10d945=_0x1efa24;this['disposeWithMe'](this[_0x10d945(0x1e4)][_0x10d945(0x1e0)][_0x10d945(0x242)](async _0x23c7d8=>{const _0x3ed171=_0x10d945;var _0x49923e,_0x115e8c,_0x332b1b,_0x406588;const _0x20637b=(_0x49923e=this['_threadCommentModel']['getUnit'](_0x23c7d8[_0x3ed171(0x22f)])[_0x3ed171(0x20d)](_0x5b4573=>_0x5b4573[_0x3ed171(0x1d1)]===_0x23c7d8[_0x3ed171(0x1d1)]))==null?void 0x0:_0x49923e[_0x3ed171(0x1f9)];if(!_0x20637b)return;const {unitId:_0x5cc5b0,subUnitId:_0x22d1b6}=_0x20637b;switch(_0x23c7d8[_0x3ed171(0x1ca)]&&this[_0x3ed171(0x1d5)][_0x3ed171(0x211)](_0x23c7d8[_0x3ed171(0x1ca)]),_0x23c7d8[_0x3ed171(0x23b)]){case _0x213e43['Add']:break;case _0x213e43[_0x3ed171(0x23d)]:{this[_0x3ed171(0x1e5)][_0x3ed171(0x21d)](_0x5cc5b0,_0x22d1b6,{'unitId':_0x5cc5b0,'subUnitId':_0x22d1b6,'ref':'','id':_0x23c7d8[_0x3ed171(0x1c7)],'dT':_0xc4c178(+_0x23c7d8[_0x3ed171(0x1fe)]),'threadId':_0x23c7d8[_0x3ed171(0x1d1)],'personId':(_0x332b1b=(_0x115e8c=_0x23c7d8[_0x3ed171(0x1ca)])==null?void 0x0:_0x115e8c[_0x3ed171(0x23c)])!=null?_0x332b1b:_0x23c7d8[_0x3ed171(0x1cf)],'text':JSON['parse'](_0x23c7d8['content']),'parentId':_0x20637b['id']});break;}case _0x213e43[_0x3ed171(0x1d9)]:{const _0x200c69=this[_0x3ed171(0x1e5)][_0x3ed171(0x227)](_0x5cc5b0,_0x22d1b6,_0x23c7d8[_0x3ed171(0x1c7)]);_0x200c69&&_0x200c69[_0x3ed171(0x1e7)]&&this['_threadCommentModel']['deleteComment'](_0x5cc5b0,_0x22d1b6,_0x23c7d8[_0x3ed171(0x1c7)]);break;}case _0x213e43[_0x3ed171(0x243)]:{this[_0x3ed171(0x1e5)][_0x3ed171(0x208)](_0x5cc5b0,_0x22d1b6,{'commentId':_0x23c7d8['replyId'],'text':JSON[_0x3ed171(0x1d0)](_0x23c7d8['content'])});break;}case _0x213e43[_0x3ed171(0x223)]:{const _0x2ff8ee=(_0x406588=this[_0x3ed171(0x1e5)]['getUnit'](_0x23c7d8[_0x3ed171(0x22f)])[_0x3ed171(0x20d)](_0x4856e3=>_0x4856e3['threadId']===_0x23c7d8[_0x3ed171(0x1d1)]))==null?void 0x0:_0x406588[_0x3ed171(0x1f9)];_0x2ff8ee&&this['_threadCommentModel'][_0x3ed171(0x1ff)](_0x5cc5b0,_0x22d1b6,_0x2ff8ee['id'],_0x23c7d8['solved']===_0x4f488b[_0x3ed171(0x205)]);break;}}}));}};_0x2fd4e8=_0x5e6d71([_0x2d5716(0x0,_0x2a910e[_0x1efa24(0x1f7)](_0x1ae5ad[_0x1efa24(0x232)])),_0x2d5716(0x1,_0x2a910e[_0x1efa24(0x1f7)](_0x488a10[_0x1efa24(0x1f6)])),_0x2d5716(0x2,_0x2a910e[_0x1efa24(0x1f7)](_0x2a910e[_0x1efa24(0x21b)])),_0x2d5716(0x3,_0x2a910e['Inject'](_0x2a910e[_0x1efa24(0x233)]))],_0x2fd4e8);const _0xc9cefb=_0x1efa24(0x213),_0x569cf3={};var _0x4238cf=Object[_0x1efa24(0x1e9)],_0x45a030=(_0x560935,_0x13d908,_0x3c4d97,_0x162832)=>{for(var _0x2524c6=_0x162832>0x1?void 0x0:_0x162832?_0x4238cf(_0x13d908,_0x3c4d97):_0x13d908,_0x28bc6d=_0x560935['length']-0x1,_0x202965;_0x28bc6d>=0x0;_0x28bc6d--)(_0x202965=_0x560935[_0x28bc6d])&&(_0x2524c6=_0x202965(_0x2524c6)||_0x2524c6);return _0x2524c6;},_0x3311db=(_0x1b6c87,_0x1e5824)=>(_0x51001d,_0x141997)=>_0x1e5824(_0x51001d,_0x141997,_0x1b6c87);function _0x3bac95(_0x1f437e,_0x542a63){const _0x4c9965=_0x1efa24,_0x39ce39=_0x1f437e[_0x4c9965(0x20c)][0x0];return{..._0x542a63,'id':_0x39ce39[_0x4c9965(0x1c7)],'resolved':_0x1f437e['solved']===0x1,'dT':_0xc4c178(_0x39ce39[_0x4c9965(0x1fe)]),'personId':_0x39ce39['userId'],'threadId':_0x39ce39[_0x4c9965(0x1d1)]};}function _0x38434f(_0xac0d64,_0x1b23e0,_0x401aa8){const _0x544aad=_0x1efa24;var _0x3df828,_0xc8b27b;if(((_0xc8b27b=(_0x3df828=_0xac0d64==null?void 0x0:_0xac0d64[_0x544aad(0x20c)])==null?void 0x0:_0x3df828[_0x544aad(0x1c9)])!=null?_0xc8b27b:0x0)>0x0){const _0x3d3547=(_0xec8d2f,_0x470096)=>({'id':_0xec8d2f[_0x544aad(0x1c7)],'threadId':_0xec8d2f[_0x544aad(0x1d1)],'dT':_0xc4c178(_0xec8d2f[_0x544aad(0x1fe)]),'personId':_0xec8d2f[_0x544aad(0x1cf)],'resolved':_0xac0d64[_0x544aad(0x1c4)]===_0x4f488b[_0x544aad(0x205)],'unitId':_0x1b23e0,'subUnitId':_0x401aa8,'text':JSON[_0x544aad(0x1d0)](_0xec8d2f[_0x544aad(0x248)]),'parentId':_0x470096}),_0x3b3ce2=_0x3d3547(_0xac0d64[_0x544aad(0x20c)][0x0]);return{..._0x3b3ce2,'children':_0xac0d64[_0x544aad(0x20c)][_0x544aad(0x1c6)](0x1)['map'](_0x311bed=>_0x3d3547(_0x311bed,_0x3b3ce2['id']))};}return null;}let _0x1261f8=class{constructor(_0x32761f,_0x5d6741,_0x125b11){const _0x52f5bb=_0x1efa24;this[_0x52f5bb(0x204)]=_0x32761f,this[_0x52f5bb(0x1d5)]=_0x5d6741,this[_0x52f5bb(0x22a)]=_0x125b11;}async[_0x1efa24(0x21d)](_0xcd8a4){const _0x26a2a4=_0x1efa24;var _0x32157b,_0x5350cb;const {parentId:_0x5d9ae9,unitId:_0x52ce4f,text:_0x223531,threadId:_0x39e770}=_0xcd8a4,_0x3d110a=(_0x5350cb=(_0x32157b=_0x223531['customRanges'])==null?void 0x0:_0x32157b[_0x26a2a4(0x1cb)](_0x1dc432=>_0x1dc432['rangeType']===_0x2a910e['CustomRangeType'][_0x26a2a4(0x1d2)])[_0x26a2a4(0x1ee)](_0x17cd39=>_0x17cd39['rangeId']))!=null?_0x5350cb:[],_0xa79af6=JSON[_0x26a2a4(0x1c3)](_0x223531),_0x409cca=(await this[_0x26a2a4(0x22a)][_0x26a2a4(0x235)](_0x52ce4f))[_0x26a2a4(0x22d)]();if(_0x5d9ae9){const _0x41a674={'memberId':_0x409cca,'unitId':_0x52ce4f,'content':_0xa79af6,'mention':_0x3d110a,'threadId':_0x39e770},_0x3634b7=(await this['_httpService'][_0x26a2a4(0x239)](_0x26a2a4(0x1db)+_0x52ce4f+_0x26a2a4(0x1d7),{'body':_0x41a674}))[_0x26a2a4(0x22e)]['reply'];return{..._0xcd8a4,'id':_0x3634b7['replyId'],'dT':_0x2a910e[_0x26a2a4(0x1c8)](+_0x3634b7[_0x26a2a4(0x1fe)])[_0x26a2a4(0x20a)](_0x26a2a4(0x1e6)),'personId':_0x3634b7[_0x26a2a4(0x1cf)]};}else{const _0x31ae9b={'memberId':_0x409cca,'unitId':_0x52ce4f,'content':_0xa79af6,'mention':_0x3d110a},_0x131fce=await this[_0x26a2a4(0x204)]['post']('/universer-api/comment/unit/'+_0x52ce4f+_0x26a2a4(0x1f2),{'body':_0x31ae9b});return _0x3bac95(_0x131fce[_0x26a2a4(0x22e)]['comment'],_0xcd8a4);}}async[_0x1efa24(0x208)](_0x21b39d){const _0x2f23ed=_0x1efa24;var _0x2a15ad,_0x6bef2c;const {text:_0x4705e7,unitId:_0x30447f}=_0x21b39d,_0x494135=(_0x6bef2c=(_0x2a15ad=_0x4705e7['customRanges'])==null?void 0x0:_0x2a15ad['filter'](_0x364c27=>_0x364c27[_0x2f23ed(0x1e1)]===_0x2a910e[_0x2f23ed(0x1f0)][_0x2f23ed(0x1d2)])[_0x2f23ed(0x1ee)](_0x1958de=>_0x1958de[_0x2f23ed(0x229)]))!=null?_0x6bef2c:[],_0x4e1b14=JSON[_0x2f23ed(0x1c3)](_0x4705e7),_0x161721=_0x21b39d[_0x2f23ed(0x1d1)],_0x70b9dd=_0x21b39d['id'],_0x451922={'memberId':(await this[_0x2f23ed(0x22a)][_0x2f23ed(0x235)](_0x30447f))[_0x2f23ed(0x22d)](),'unitId':_0x30447f,'threadId':_0x161721,'mention':_0x494135,'content':_0x4e1b14,'replyId':_0x70b9dd},_0x57b880=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x30447f+_0x2f23ed(0x1e2),{'body':_0x451922});return!_0x57b880[_0x2f23ed(0x22e)][_0x2f23ed(0x203)]||_0x57b880[_0x2f23ed(0x22e)][_0x2f23ed(0x203)][_0x2f23ed(0x1ed)]===0x1;}async[_0x1efa24(0x1ff)](_0x5f3a34){const _0x21a49b=_0x1efa24,{unitId:_0x5d0219}=_0x5f3a34,_0x538307=_0x5f3a34['threadId'],_0x47df83={'memberId':this['_userService'][_0x21a49b(0x1da)]()[_0x21a49b(0x23c)],'unitId':_0x5d0219,'threadId':_0x538307,'solved':_0x5f3a34[_0x21a49b(0x1e3)]?_0x4f488b[_0x21a49b(0x205)]:_0x4f488b[_0x21a49b(0x1fb)]},_0x486588=await this[_0x21a49b(0x204)]['post']('/universer-api/comment/unit/'+_0x5d0219+_0x21a49b(0x1ea),{'body':_0x47df83});return!_0x486588[_0x21a49b(0x22e)][_0x21a49b(0x203)]||_0x486588[_0x21a49b(0x22e)]['error'][_0x21a49b(0x1ed)]===0x1;}async[_0x1efa24(0x218)](_0x2b882f,_0x436afe,_0x49d26b,_0x10a0a4){const _0x227fdb=_0x1efa24,_0x5f27dc={'memberId':(await this['_sessionService']['requireSession'](_0x2b882f))[_0x227fdb(0x22d)](),'threadId':_0x49d26b,'replyId':_0x10a0a4,'unitId':_0x2b882f},_0x2954e6=await this[_0x227fdb(0x204)][_0x227fdb(0x239)](_0x227fdb(0x1db)+_0x2b882f+'/delete',{'body':_0x5f27dc});return!_0x2954e6[_0x227fdb(0x22e)][_0x227fdb(0x203)]||_0x2954e6[_0x227fdb(0x22e)][_0x227fdb(0x203)][_0x227fdb(0x1ed)]===0x1;}async['listComments'](_0x3bea91,_0x1a5811,_0x3a8905){const _0x28de90=_0x1efa24,_0x78f67b={'unitId':_0x3bea91,'threadId':_0x3a8905},_0x1f424e=await this[_0x28de90(0x204)][_0x28de90(0x239)](_0x28de90(0x1db)+_0x3bea91+_0x28de90(0x217),{'body':_0x78f67b}),_0x1a2507=_0x3a8905[_0x28de90(0x1ee)](_0x4e1f96=>_0x38434f(_0x1f424e[_0x28de90(0x22e)][_0x28de90(0x214)][_0x4e1f96],_0x3bea91,_0x1a5811))[_0x28de90(0x1cb)](Boolean);return Object['values'](_0x1f424e[_0x28de90(0x22e)]['users'])[_0x28de90(0x237)](_0x3e0549=>{const _0x50a0df=_0x28de90;this[_0x50a0df(0x1d5)][_0x50a0df(0x211)](_0x3e0549);}),_0x1a2507;}[_0x1efa24(0x247)](_0x42c897){const _0x45d022=_0x1efa24;return{'id':_0x42c897['id'],'threadId':_0x42c897[_0x45d022(0x1d1)],'ref':_0x42c897[_0x45d022(0x1fc)]};}};_0x1261f8=_0x45a030([_0x3311db(0x0,_0x2a910e['Inject'](_0x4c58d5[_0x1efa24(0x240)])),_0x3311db(0x1,_0x2a910e[_0x1efa24(0x1f7)](_0x2a910e[_0x1efa24(0x21b)])),_0x3311db(0x2,_0x2a910e[_0x1efa24(0x1f7)](_0x1ae5ad['CollaborationSessionService']))],_0x1261f8);var _0x15f539=Object[_0x1efa24(0x1e9)],_0x361bc3=(_0x35cec9,_0xeaeedd,_0x34fa23,_0x532807)=>{const _0x4bc8e9=_0x1efa24;for(var _0xbe2b91=_0x532807>0x1?void 0x0:_0x532807?_0x15f539(_0xeaeedd,_0x34fa23):_0xeaeedd,_0x3bbabd=_0x35cec9[_0x4bc8e9(0x1c9)]-0x1,_0x3a2c96;_0x3bbabd>=0x0;_0x3bbabd--)(_0x3a2c96=_0x35cec9[_0x3bbabd])&&(_0xbe2b91=_0x3a2c96(_0xbe2b91)||_0xbe2b91);return _0xbe2b91;},_0x33cfb8=(_0x41a323,_0x4a197e)=>(_0x5e25e8,_0x18894b)=>_0x4a197e(_0x5e25e8,_0x18894b,_0x41a323);let _0xd48725=class extends _0x2a910e[_0x1efa24(0x200)]{constructor(_0x4920ad,_0x1ba8b6){const _0x18e681=_0x1efa24;super(),this[_0x18e681(0x1df)]=_0x4920ad,this[_0x18e681(0x246)]=_0x1ba8b6,this[_0x18e681(0x1d4)]();}[_0x1efa24(0x1d4)](){const _0x4dd695=_0x1efa24;this[_0x4dd695(0x1df)][_0x4dd695(0x22b)]=this[_0x4dd695(0x246)],this[_0x4dd695(0x1df)][_0x4dd695(0x1f1)]=!0x1;}};_0xd48725=_0x361bc3([_0x33cfb8(0x0,_0x488a10[_0x1efa24(0x209)]),_0x33cfb8(0x1,_0x2a910e[_0x1efa24(0x1f7)](_0x1261f8))],_0xd48725);var _0x338b76=Object[_0x1efa24(0x21e)],_0x24746f=Object[_0x1efa24(0x1e9)],_0x38782a=(_0x33d642,_0x224512,_0x49213e)=>_0x224512 in _0x33d642?_0x338b76(_0x33d642,_0x224512,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x49213e}):_0x33d642[_0x224512]=_0x49213e,_0x34dccf=(_0x362e73,_0x1f2cca,_0x29ce00,_0x5bfe67)=>{const _0x2e0851=_0x1efa24;for(var _0x38f525=_0x5bfe67>0x1?void 0x0:_0x5bfe67?_0x24746f(_0x1f2cca,_0x29ce00):_0x1f2cca,_0x2bc75e=_0x362e73[_0x2e0851(0x1c9)]-0x1,_0x160d6e;_0x2bc75e>=0x0;_0x2bc75e--)(_0x160d6e=_0x362e73[_0x2bc75e])&&(_0x38f525=_0x160d6e(_0x38f525)||_0x38f525);return _0x38f525;},_0x452eb8=(_0x5585c1,_0x32cd51)=>(_0x486815,_0x3ea586)=>_0x32cd51(_0x486815,_0x3ea586,_0x5585c1),_0x32194d=(_0x73d2a9,_0x108232,_0xda6962)=>_0x38782a(_0x73d2a9,typeof _0x108232!=_0x1efa24(0x1dd)?_0x108232+'':_0x108232,_0xda6962);_0x503cf8['UniverThreadCommentDataSourcePlugin']=class extends _0x2a910e[_0x1efa24(0x23e)]{constructor(_0x42738b=_0x569cf3,_0x57f007,_0x4ff830){const _0x3e627a=_0x1efa24;super(),this[_0x3e627a(0x230)]=_0x42738b,this['_injector']=_0x57f007,this[_0x3e627a(0x1d8)]=_0x4ff830;const {..._0xe0463d}=_0x2a910e[_0x3e627a(0x206)]({},_0x569cf3,this[_0x3e627a(0x230)]);this[_0x3e627a(0x1d8)][_0x3e627a(0x1f5)](_0xc9cefb,_0xe0463d);}['onStarting'](){const _0x58513c=_0x1efa24;[[_0x1261f8],[_0xd48725],[_0x2fd4e8]][_0x58513c(0x237)](_0x2d224d=>{this['_injector']['add'](_0x2d224d);});}[_0x1efa24(0x1f4)](){const _0x293cf2=_0x1efa24;this[_0x293cf2(0x20e)][_0x293cf2(0x20f)](_0xd48725),this[_0x293cf2(0x20e)][_0x293cf2(0x20f)](_0x2fd4e8);}},_0x32194d(_0x503cf8[_0x1efa24(0x207)],_0x1efa24(0x1f3),_0x59d600),_0x32194d(_0x503cf8[_0x1efa24(0x207)],_0x1efa24(0x23b),_0x2a910e[_0x1efa24(0x222)][_0x1efa24(0x221)]),_0x503cf8[_0x1efa24(0x207)]=_0x34dccf([_0x2a910e[_0x1efa24(0x226)](_0x667203[_0x1efa24(0x245)],_0x1ae5ad['UniverCollaborationClientPlugin'],_0x5ea93e[_0x1efa24(0x24b)]),_0x452eb8(0x1,_0x2a910e[_0x1efa24(0x1f7)](_0x2a910e['Injector'])),_0x452eb8(0x2,_0x2a910e[_0x1efa24(0x219)])],_0x503cf8[_0x1efa24(0x207)]),Object[_0x1efa24(0x21e)](_0x503cf8,Symbol[_0x1efa24(0x1ce)],{'value':_0x1efa24(0x1fa)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.0",
3
+ "version": "0.10.1-nightly.202508020912",
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.10.0",
49
- "@univerjs/core": "0.10.0",
50
- "@univerjs-pro/license": "0.10.0",
51
- "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/network": "0.10.0",
53
- "@univerjs/thread-comment": "0.10.0",
54
- "@univerjs/thread-comment-ui": "0.10.0"
48
+ "@univerjs-pro/collaboration-client": "0.10.1-nightly.202508020912",
49
+ "@univerjs-pro/license": "0.10.1-nightly.202508020912",
50
+ "@univerjs/core": "0.10.1-nightly.202508020912",
51
+ "@univerjs/network": "0.10.1-nightly.202508020912",
52
+ "@univerjs/thread-comment": "0.10.1-nightly.202508020912",
53
+ "@univerjs/thread-comment-ui": "0.10.1-nightly.202508020912",
54
+ "@univerjs/protocol": "0.1.47-alpha.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^7.0.6",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.10.0"
61
+ "@univerjs-infra/shared": "0.10.1"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",