@univerjs-pro/thread-comment-datasource 0.12.4-insiders.20251212-6c41730 → 0.12.4-insiders.20251213-692494c

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';function _0x45e5(_0x4acd84,_0x739073){_0x4acd84=_0x4acd84-0xbf;const _0x2c7562=_0x2c75();let _0x45e56c=_0x2c7562[_0x4acd84];return _0x45e56c;}const _0x2b5224=_0x45e5;(function(_0x40ccdd,_0x7ef933){const _0x54c9ca=_0x45e5,_0x52c26a=_0x40ccdd();while(!![]){try{const _0x57719a=parseInt(_0x54c9ca(0x109))/0x1*(parseInt(_0x54c9ca(0x118))/0x2)+-parseInt(_0x54c9ca(0xe7))/0x3*(parseInt(_0x54c9ca(0x115))/0x4)+parseInt(_0x54c9ca(0xd3))/0x5*(-parseInt(_0x54c9ca(0xef))/0x6)+-parseInt(_0x54c9ca(0xcf))/0x7*(-parseInt(_0x54c9ca(0xfb))/0x8)+parseInt(_0x54c9ca(0xf2))/0x9+-parseInt(_0x54c9ca(0x134))/0xa*(-parseInt(_0x54c9ca(0x125))/0xb)+-parseInt(_0x54c9ca(0x138))/0xc*(parseInt(_0x54c9ca(0x10d))/0xd);if(_0x57719a===_0x7ef933)break;else _0x52c26a['push'](_0x52c26a['shift']());}catch(_0x5ad8a3){_0x52c26a['push'](_0x52c26a['shift']());}}}(_0x2c75,0x48dd8));Object[_0x2b5224(0xcc)](exports,Symbol['toStringTag'],{'value':_0x2b5224(0xf4)});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=_0x2b5224(0x113);function _0x2c75(){const _0x51c362=['code','values','7dTifdM','_initUserSync','deleteComment','listComments','2027075XTOveH','Disposable','UniverInstanceType','personId','CommentService','content','Edit','IThreadCommentDataSourceService','dayjs','thread-comment-data-source.config','UniverLicensePlugin','Solve','Solved','stringify','post','root','/universer-api/comment/unit/','_threadCommentDataSourceService','_userService','forEach','195771zUxAsS','COMMENT','getMemberID','Add','OpenOrReOpen','_threadCommentModel','parse','threadId','6PVZoRt','saveCommentToSnapshot','UniverThreadCommentDataSourcePlugin','3637359qVwUsY','dataSource','Module','commentUpdate$','Injector','onReady','CollaborationSessionService','map','add','9416kkobQa','get','error','_initDataSource','/solved','symbol','pluginName','length','filter','Inject','rangeId','type','HTTPService','getComment','94ADeRav','addUser','getCurrentUser','setConfig','1203787HqhIKO','rangeType','/add','disposeWithMe','Plugin','replyId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CustomRangeType','12lnGZXN','getUser','/universer-api/user/list','6922yoDKgb','reply','resolved','_httpService','unitId','format','body','customRanges','getOwnPropertyDescriptor','/list','payload','subscribe','_configService','561oVkxgg','UNRECOGNIZED','updateComment','slice','_sessionService','users','UserManagerService','/delete','delete','merge','addComment','ref','_init','onStarting','comments','51290uAFyeE','comment','userID','userId','12uwlmTe','user','ThreadCommentModel','UniverThreadCommentUIPlugin','solved','getUnit','replies','_injector','Reply','find','_threadCommentDataSource','/edit','Delete','createTimestamp','_commentService','DependentOn','defineProperty'];_0x2c75=function(){return _0x51c362;};return _0x2c75();}var I=(_0x482096=>(_0x482096[_0x482096[_0x2b5224(0xeb)]=0x0]=_0x2b5224(0xeb),_0x482096[_0x482096[_0x2b5224(0xdf)]=0x1]=_0x2b5224(0xdf),_0x482096[_0x482096[_0x2b5224(0x126)]=-0x1]=_0x2b5224(0x126),_0x482096))(I||{}),v=(_0x249cbb=>(_0x249cbb[_0x249cbb['Unknown']=0x0]='Unknown',_0x249cbb[_0x249cbb[_0x2b5224(0xea)]=0x1]=_0x2b5224(0xea),_0x249cbb[_0x249cbb[_0x2b5224(0xc4)]=0x2]=_0x2b5224(0xc4),_0x249cbb[_0x249cbb['Edit']=0x3]=_0x2b5224(0xd9),_0x249cbb[_0x249cbb[_0x2b5224(0xc8)]=0x4]=_0x2b5224(0xc8),_0x249cbb[_0x249cbb[_0x2b5224(0xde)]=0x5]=_0x2b5224(0xde),_0x249cbb[_0x249cbb[_0x2b5224(0x126)]=-0x1]='UNRECOGNIZED',_0x249cbb))(v||{});const f=_0x285538=>c[_0x2b5224(0xdb)](new Date(+_0x285538))[_0x2b5224(0x11d)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x3d8b17,_0x369b6c)=>{const _0x448d5e=_0x2b5224,_0x108d69=_0x3d8b17['get'](c['UserManagerService']),_0x3c9c0f=_0x3d8b17[_0x448d5e(0xfc)](P['HTTPService']);_0x369b6c[_0x448d5e(0xe6)](_0x3e45f8=>{const _0x1912af=_0x448d5e;_0x108d69[_0x1912af(0x116)](_0x3e45f8)&&_0x369b6c[_0x1912af(0x12d)](_0x3e45f8);}),_0x369b6c['size']&&(await _0x3c9c0f['get'](_0x448d5e(0x117),{'params':{'userIDs':[..._0x369b6c]}}))['body'][_0x448d5e(0x12a)]['forEach'](_0x45746f=>{const _0x56d09f=_0x448d5e;_0x45746f&&_0x108d69[_0x56d09f(0x10a)](_0x45746f);});};var $=Object[_0x2b5224(0x120)],E=(_0xe1e844,_0x3a65ab,_0x1e03da,_0x5c3a43)=>{const _0x2ea336=_0x2b5224;for(var _0x345478=_0x5c3a43>0x1?void 0x0:_0x5c3a43?$(_0x3a65ab,_0x1e03da):_0x3a65ab,_0x44b876=_0xe1e844[_0x2ea336(0x102)]-0x1,_0x16367e;_0x44b876>=0x0;_0x44b876--)(_0x16367e=_0xe1e844[_0x44b876])&&(_0x345478=_0x16367e(_0x345478)||_0x345478);return _0x345478;},S=(_0x57e16d,_0xa8156e)=>(_0x596e14,_0x4e3f01)=>_0xa8156e(_0x596e14,_0x4e3f01,_0x57e16d);let _=class extends c['Disposable']{constructor(_0x31521d,_0x515524,_0x10cfcb,_0x108053){const _0x11b7c0=_0x2b5224;super(),this['_commentService']=_0x31521d,this[_0x11b7c0(0xec)]=_0x515524,this['_userService']=_0x10cfcb,this['_injector']=_0x108053,this['_init'](),this[_0x11b7c0(0xd0)]();}['_initUserSync'](){const _0x309c3d=_0x2b5224;this[_0x309c3d(0x110)](this[_0x309c3d(0xec)]['commentUpdate$']['pipe'](j['bufferTime'](0x10))['subscribe'](_0x3e4b6c=>{const _0x21d974=new Set();_0x3e4b6c['forEach'](_0x362fee=>{const _0x43aaac=_0x45e5;switch(_0x362fee[_0x43aaac(0x106)]){case _0x43aaac(0xfa):{const _0x596125=_0x362fee[_0x43aaac(0x122)][_0x43aaac(0xd6)];_0x21d974[_0x43aaac(0xfa)](_0x596125);break;}}}),R(this['_injector'],_0x21d974);}));}[_0x2b5224(0x131)](){const _0x323fcb=_0x2b5224;this['disposeWithMe'](this[_0x323fcb(0xca)][_0x323fcb(0xf5)][_0x323fcb(0x123)](async _0x4e3407=>{const _0x4ec8c9=_0x323fcb;var _0x162682,_0x5d317f,_0x46a036,_0x1c8e87;const _0x3f408c=(_0x162682=this['_threadCommentModel'][_0x4ec8c9(0xc1)](_0x4e3407['unitId'])[_0x4ec8c9(0xc5)](_0x58a757=>_0x58a757[_0x4ec8c9(0xee)]===_0x4e3407[_0x4ec8c9(0xee)]))==null?void 0x0:_0x162682[_0x4ec8c9(0xe2)];if(!_0x3f408c)return;const {unitId:_0x48ebc3,subUnitId:_0x5a7716}=_0x3f408c;switch(_0x4e3407['user']&&this[_0x4ec8c9(0xe5)][_0x4ec8c9(0x10a)](_0x4e3407[_0x4ec8c9(0x139)]),_0x4e3407[_0x4ec8c9(0x106)]){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0x4ec8c9(0x12f)](_0x48ebc3,_0x5a7716,{'unitId':_0x48ebc3,'subUnitId':_0x5a7716,'ref':'','id':_0x4e3407[_0x4ec8c9(0x112)],'dT':f(+_0x4e3407[_0x4ec8c9(0xc9)]),'threadId':_0x4e3407[_0x4ec8c9(0xee)],'personId':(_0x46a036=(_0x5d317f=_0x4e3407[_0x4ec8c9(0x139)])==null?void 0x0:_0x5d317f['userID'])!=null?_0x46a036:_0x4e3407[_0x4ec8c9(0x137)],'text':JSON[_0x4ec8c9(0xed)](_0x4e3407[_0x4ec8c9(0xd8)]),'parentId':_0x3f408c['id']});break;}case v['Delete']:{const _0x4f9dca=this[_0x4ec8c9(0xec)][_0x4ec8c9(0x108)](_0x48ebc3,_0x5a7716,_0x4e3407['replyId']);_0x4f9dca&&_0x4f9dca['parentId']&&this['_threadCommentModel'][_0x4ec8c9(0xd1)](_0x48ebc3,_0x5a7716,_0x4e3407[_0x4ec8c9(0x112)]);break;}case v[_0x4ec8c9(0xd9)]:{this[_0x4ec8c9(0xec)][_0x4ec8c9(0x127)](_0x48ebc3,_0x5a7716,{'commentId':_0x4e3407[_0x4ec8c9(0x112)],'text':JSON[_0x4ec8c9(0xed)](_0x4e3407['content'])});break;}case v[_0x4ec8c9(0xde)]:{const _0x589a7b=(_0x1c8e87=this[_0x4ec8c9(0xec)][_0x4ec8c9(0xc1)](_0x4e3407[_0x4ec8c9(0x11c)])[_0x4ec8c9(0xc5)](_0x4ad0fa=>_0x4ad0fa[_0x4ec8c9(0xee)]===_0x4e3407[_0x4ec8c9(0xee)]))==null?void 0x0:_0x1c8e87['root'];_0x589a7b&&this[_0x4ec8c9(0xec)]['resolveComment'](_0x48ebc3,_0x5a7716,_0x589a7b['id'],_0x4e3407[_0x4ec8c9(0xc0)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x2b5224(0x104)](b[_0x2b5224(0xd7)])),S(0x1,c[_0x2b5224(0x104)](M[_0x2b5224(0x13a)])),S(0x2,c[_0x2b5224(0x104)](c[_0x2b5224(0x12b)])),S(0x3,c[_0x2b5224(0x104)](c['Injector']))],_);const q=_0x2b5224(0xdc),D={};var A=Object[_0x2b5224(0x120)],x=(_0x177429,_0x4994e3,_0xe5681d,_0x513614)=>{for(var _0x3058fd=_0x513614>0x1?void 0x0:_0x513614?A(_0x4994e3,_0xe5681d):_0x4994e3,_0x4d2d54=_0x177429['length']-0x1,_0x18bfb0;_0x4d2d54>=0x0;_0x4d2d54--)(_0x18bfb0=_0x177429[_0x4d2d54])&&(_0x3058fd=_0x18bfb0(_0x3058fd)||_0x3058fd);return _0x3058fd;},C=(_0x33bd57,_0x47a9f8)=>(_0x2a6c9b,_0x1cb2c8)=>_0x47a9f8(_0x2a6c9b,_0x1cb2c8,_0x33bd57);function Y(_0x43508e,_0x1e1a39){const _0x23a3cc=_0x2b5224,_0x2db4aa=_0x43508e['replies'][0x0];return{..._0x1e1a39,'id':_0x2db4aa[_0x23a3cc(0x112)],'resolved':_0x43508e[_0x23a3cc(0xc0)]===0x1,'dT':f(_0x2db4aa[_0x23a3cc(0xc9)]),'personId':_0x2db4aa[_0x23a3cc(0x137)],'threadId':_0x2db4aa['threadId']};}function G(_0x4cbeeb,_0x5578b2,_0x55cba3){const _0x2c37c2=_0x2b5224;var _0x455271,_0x28e3f7;if(((_0x28e3f7=(_0x455271=_0x4cbeeb==null?void 0x0:_0x4cbeeb[_0x2c37c2(0xc2)])==null?void 0x0:_0x455271[_0x2c37c2(0x102)])!=null?_0x28e3f7:0x0)>0x0){const _0x4f1e22=(_0x4a885b,_0x47ed31)=>({'id':_0x4a885b[_0x2c37c2(0x112)],'threadId':_0x4a885b[_0x2c37c2(0xee)],'dT':f(_0x4a885b[_0x2c37c2(0xc9)]),'personId':_0x4a885b[_0x2c37c2(0x137)],'resolved':_0x4cbeeb['solved']===I[_0x2c37c2(0xdf)],'unitId':_0x5578b2,'subUnitId':_0x55cba3,'text':JSON[_0x2c37c2(0xed)](_0x4a885b[_0x2c37c2(0xd8)]),'parentId':_0x47ed31}),_0x5e63ea=_0x4f1e22(_0x4cbeeb['replies'][0x0]);return{..._0x5e63ea,'children':_0x4cbeeb[_0x2c37c2(0xc2)][_0x2c37c2(0x128)](0x1)[_0x2c37c2(0xf9)](_0x5392de=>_0x4f1e22(_0x5392de,_0x5e63ea['id']))};}return null;}let p=class{constructor(_0x4edce8,_0x3adc9c,_0x51c8c7){const _0x1e0db8=_0x2b5224;this[_0x1e0db8(0x11b)]=_0x4edce8,this[_0x1e0db8(0xe5)]=_0x3adc9c,this[_0x1e0db8(0x129)]=_0x51c8c7;}async[_0x2b5224(0x12f)](_0x1faa22){const _0x3872e2=_0x2b5224;var _0x2b15a5,_0x2dc909;const {parentId:_0x18552e,unitId:_0x572924,text:_0x30c048,threadId:_0x1f2b10}=_0x1faa22,_0x348dcb=(_0x2dc909=(_0x2b15a5=_0x30c048[_0x3872e2(0x11f)])==null?void 0x0:_0x2b15a5[_0x3872e2(0x103)](_0x44a64d=>_0x44a64d[_0x3872e2(0x10e)]===c[_0x3872e2(0x114)][_0x3872e2(0xe8)])[_0x3872e2(0xf9)](_0x3c82b7=>_0x3c82b7[_0x3872e2(0x105)]))!=null?_0x2dc909:[],_0x3c82aa=JSON[_0x3872e2(0xe0)](_0x30c048),_0x1e3fbe=(await this[_0x3872e2(0x129)]['requireSession'](_0x572924))[_0x3872e2(0xe9)]();if(_0x18552e){const _0x4476a7={'memberId':_0x1e3fbe,'unitId':_0x572924,'content':_0x3c82aa,'mention':_0x348dcb,'threadId':_0x1f2b10},_0x35c9a5=(await this[_0x3872e2(0x11b)][_0x3872e2(0xe1)](_0x3872e2(0xe3)+_0x572924+'/reply',{'body':_0x4476a7}))[_0x3872e2(0x11e)][_0x3872e2(0x119)];return{..._0x1faa22,'id':_0x35c9a5['replyId'],'dT':c[_0x3872e2(0xdb)](+_0x35c9a5[_0x3872e2(0xc9)])[_0x3872e2(0x11d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x35c9a5[_0x3872e2(0x137)]};}else{const _0x5e6586={'memberId':_0x1e3fbe,'unitId':_0x572924,'content':_0x3c82aa,'mention':_0x348dcb},_0x5c46a0=await this[_0x3872e2(0x11b)][_0x3872e2(0xe1)]('/universer-api/comment/unit/'+_0x572924+_0x3872e2(0x10f),{'body':_0x5e6586});return Y(_0x5c46a0[_0x3872e2(0x11e)][_0x3872e2(0x135)],_0x1faa22);}}async['updateComment'](_0x338fc7){const _0x4e7c09=_0x2b5224;var _0x8c49cf,_0x115de1;const {text:_0x4c5c7f,unitId:_0x1f26dd}=_0x338fc7,_0x4e393c=(_0x115de1=(_0x8c49cf=_0x4c5c7f[_0x4e7c09(0x11f)])==null?void 0x0:_0x8c49cf['filter'](_0x27a532=>_0x27a532[_0x4e7c09(0x10e)]===c['CustomRangeType'][_0x4e7c09(0xe8)])[_0x4e7c09(0xf9)](_0x57ba11=>_0x57ba11[_0x4e7c09(0x105)]))!=null?_0x115de1:[],_0x43c669=JSON[_0x4e7c09(0xe0)](_0x4c5c7f),_0x493c3b=_0x338fc7[_0x4e7c09(0xee)],_0x329369=_0x338fc7['id'],_0xd087bc={'memberId':(await this['_sessionService']['requireSession'](_0x1f26dd))[_0x4e7c09(0xe9)](),'unitId':_0x1f26dd,'threadId':_0x493c3b,'mention':_0x4e393c,'content':_0x43c669,'replyId':_0x329369},_0x4c4e1e=await this[_0x4e7c09(0x11b)][_0x4e7c09(0xe1)](_0x4e7c09(0xe3)+_0x1f26dd+_0x4e7c09(0xc7),{'body':_0xd087bc});return!_0x4c4e1e[_0x4e7c09(0x11e)][_0x4e7c09(0xfd)]||_0x4c4e1e[_0x4e7c09(0x11e)][_0x4e7c09(0xfd)]['code']===0x1;}async['resolveComment'](_0x2c75e5){const _0x3bffcf=_0x2b5224,{unitId:_0x16be65}=_0x2c75e5,_0x4fa1b7=_0x2c75e5[_0x3bffcf(0xee)],_0xd5ed10={'memberId':this[_0x3bffcf(0xe5)][_0x3bffcf(0x10b)]()[_0x3bffcf(0x136)],'unitId':_0x16be65,'threadId':_0x4fa1b7,'solved':_0x2c75e5[_0x3bffcf(0x11a)]?I[_0x3bffcf(0xdf)]:I[_0x3bffcf(0xeb)]},_0x42c520=await this[_0x3bffcf(0x11b)][_0x3bffcf(0xe1)]('/universer-api/comment/unit/'+_0x16be65+_0x3bffcf(0xff),{'body':_0xd5ed10});return!_0x42c520[_0x3bffcf(0x11e)][_0x3bffcf(0xfd)]||_0x42c520['body'][_0x3bffcf(0xfd)][_0x3bffcf(0xcd)]===0x1;}async[_0x2b5224(0xd1)](_0x3943ec,_0x58159b,_0x2f69be,_0xa2b5af){const _0x30a393=_0x2b5224,_0x48aee1={'memberId':(await this['_sessionService']['requireSession'](_0x3943ec))[_0x30a393(0xe9)](),'threadId':_0x2f69be,'replyId':_0xa2b5af,'unitId':_0x3943ec},_0x1d628a=await this[_0x30a393(0x11b)][_0x30a393(0xe1)](_0x30a393(0xe3)+_0x3943ec+_0x30a393(0x12c),{'body':_0x48aee1});return!_0x1d628a[_0x30a393(0x11e)][_0x30a393(0xfd)]||_0x1d628a[_0x30a393(0x11e)]['error'][_0x30a393(0xcd)]===0x1;}async[_0x2b5224(0xd2)](_0x173b69,_0x493fde,_0x3cfe30){const _0x248d51=_0x2b5224,_0x3489b0={'unitId':_0x173b69,'threadId':_0x3cfe30},_0x53cee7=await this['_httpService']['post'](_0x248d51(0xe3)+_0x173b69+_0x248d51(0x121),{'body':_0x3489b0}),_0x3b28cb=_0x3cfe30[_0x248d51(0xf9)](_0x30a095=>G(_0x53cee7[_0x248d51(0x11e)][_0x248d51(0x133)][_0x30a095],_0x173b69,_0x493fde))[_0x248d51(0x103)](Boolean);return Object[_0x248d51(0xce)](_0x53cee7[_0x248d51(0x11e)][_0x248d51(0x12a)])[_0x248d51(0xe6)](_0x144f85=>{this['_userService']['addUser'](_0x144f85);}),_0x3b28cb;}[_0x2b5224(0xf0)](_0x2aa27b){const _0x1ea659=_0x2b5224;return{'id':_0x2aa27b['id'],'threadId':_0x2aa27b[_0x1ea659(0xee)],'ref':_0x2aa27b[_0x1ea659(0x130)]};}};p=x([C(0x0,c[_0x2b5224(0x104)](P[_0x2b5224(0x107)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c['Inject'](b[_0x2b5224(0xf8)]))],p);var H=Object[_0x2b5224(0x120)],J=(_0x50dca9,_0x5d342b,_0x5eea56,_0x238d81)=>{const _0x1ba1fa=_0x2b5224;for(var _0x2d4d61=_0x238d81>0x1?void 0x0:_0x238d81?H(_0x5d342b,_0x5eea56):_0x5d342b,_0x1f7462=_0x50dca9[_0x1ba1fa(0x102)]-0x1,_0x2c9cc9;_0x1f7462>=0x0;_0x1f7462--)(_0x2c9cc9=_0x50dca9[_0x1f7462])&&(_0x2d4d61=_0x2c9cc9(_0x2d4d61)||_0x2d4d61);return _0x2d4d61;},y=(_0x5635fd,_0x4a66d7)=>(_0x31b0cf,_0x479829)=>_0x4a66d7(_0x31b0cf,_0x479829,_0x5635fd);let g=class extends c[_0x2b5224(0xd4)]{constructor(_0x497ae6,_0x1c7677){const _0x4e94c1=_0x2b5224;super(),this[_0x4e94c1(0xe4)]=_0x497ae6,this['_threadCommentDataSource']=_0x1c7677,this[_0x4e94c1(0xfe)]();}[_0x2b5224(0xfe)](){const _0x3683ed=_0x2b5224;this[_0x3683ed(0xe4)][_0x3683ed(0xf3)]=this[_0x3683ed(0xc6)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x2b5224(0xda)]),y(0x1,c[_0x2b5224(0x104)](p))],g);var F=Object[_0x2b5224(0xcc)],L=Object['getOwnPropertyDescriptor'],Z=(_0xf8895d,_0x28c880,_0x4895ce)=>_0x28c880 in _0xf8895d?F(_0xf8895d,_0x28c880,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4895ce}):_0xf8895d[_0x28c880]=_0x4895ce,W=(_0x3a5b8f,_0x3f25cc,_0xd20ff7,_0x33fb03)=>{const _0x46ae78=_0x2b5224;for(var _0x541bd0=_0x33fb03>0x1?void 0x0:_0x33fb03?L(_0x3f25cc,_0xd20ff7):_0x3f25cc,_0x1d6364=_0x3a5b8f[_0x46ae78(0x102)]-0x1,_0x28d26d;_0x1d6364>=0x0;_0x1d6364--)(_0x28d26d=_0x3a5b8f[_0x1d6364])&&(_0x541bd0=_0x28d26d(_0x541bd0)||_0x541bd0);return _0x541bd0;},O=(_0x17992a,_0x52fd85)=>(_0x4fb55e,_0x122f17)=>_0x52fd85(_0x4fb55e,_0x122f17,_0x17992a),N=(_0x544121,_0xd81957,_0x2f9f1d)=>Z(_0x544121,typeof _0xd81957!=_0x2b5224(0x100)?_0xd81957+'':_0xd81957,_0x2f9f1d);exports[_0x2b5224(0xf1)]=class extends c[_0x2b5224(0x111)]{constructor(_0x58ee0f=D,_0x4f0567,_0x2a7731){const _0x253df0=_0x2b5224;super(),this['_config']=_0x58ee0f,this[_0x253df0(0xc3)]=_0x4f0567,this[_0x253df0(0x124)]=_0x2a7731;const {..._0x5640c1}=c[_0x253df0(0x12e)]({},D,this['_config']);this[_0x253df0(0x124)][_0x253df0(0x10c)](q,_0x5640c1);}[_0x2b5224(0x132)](){const _0x36443d=_0x2b5224;[[p],[g],[_]][_0x36443d(0xe6)](_0x2d98e7=>{const _0x16be7a=_0x36443d;this[_0x16be7a(0xc3)][_0x16be7a(0xfa)](_0x2d98e7);});}[_0x2b5224(0xf7)](){const _0x6aa00c=_0x2b5224;this[_0x6aa00c(0xc3)][_0x6aa00c(0xfc)](g),this[_0x6aa00c(0xc3)][_0x6aa00c(0xfc)](_);}},N(exports[_0x2b5224(0xf1)],_0x2b5224(0x101),U),N(exports[_0x2b5224(0xf1)],'type',c[_0x2b5224(0xd5)]['UNIVER_UNKNOWN']),exports[_0x2b5224(0xf1)]=W([c[_0x2b5224(0xcb)](w[_0x2b5224(0xbf)],b['UniverCollaborationClientPlugin'],T[_0x2b5224(0xdd)]),O(0x1,c['Inject'](c[_0x2b5224(0xf6)])),O(0x2,c['IConfigService'])],exports[_0x2b5224(0xf1)]);
1
+ 'use strict';const _0x39cd9e=_0x38c6;(function(_0x52ef9f,_0x13bb64){const _0x3e7288=_0x38c6,_0x17cb15=_0x52ef9f();while(!![]){try{const _0x4afee9=-parseInt(_0x3e7288(0x1cf))/0x1*(-parseInt(_0x3e7288(0x1f9))/0x2)+parseInt(_0x3e7288(0x1ba))/0x3*(parseInt(_0x3e7288(0x1d9))/0x4)+parseInt(_0x3e7288(0x1c0))/0x5*(parseInt(_0x3e7288(0x1b6))/0x6)+parseInt(_0x3e7288(0x206))/0x7+parseInt(_0x3e7288(0x1a9))/0x8+-parseInt(_0x3e7288(0x1be))/0x9*(parseInt(_0x3e7288(0x1d4))/0xa)+-parseInt(_0x3e7288(0x205))/0xb;if(_0x4afee9===_0x13bb64)break;else _0x17cb15['push'](_0x17cb15['shift']());}catch(_0x3477e2){_0x17cb15['push'](_0x17cb15['shift']());}}}(_0x15fe,0xb258b));Object[_0x39cd9e(0x1fb)](exports,Symbol[_0x39cd9e(0x1af)],{'value':_0x39cd9e(0x20a)});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=_0x39cd9e(0x1f8);var I=(_0x59d66b=>(_0x59d66b[_0x59d66b[_0x39cd9e(0x1bd)]=0x0]=_0x39cd9e(0x1bd),_0x59d66b[_0x59d66b['Solved']=0x1]=_0x39cd9e(0x1b9),_0x59d66b[_0x59d66b['UNRECOGNIZED']=-0x1]=_0x39cd9e(0x20c),_0x59d66b))(I||{}),v=(_0x29ce6f=>(_0x29ce6f[_0x29ce6f['Unknown']=0x0]=_0x39cd9e(0x1ac),_0x29ce6f[_0x29ce6f[_0x39cd9e(0x1b1)]=0x1]=_0x39cd9e(0x1b1),_0x29ce6f[_0x29ce6f['Reply']=0x2]='Reply',_0x29ce6f[_0x29ce6f[_0x39cd9e(0x213)]=0x3]='Edit',_0x29ce6f[_0x29ce6f[_0x39cd9e(0x1ee)]=0x4]=_0x39cd9e(0x1ee),_0x29ce6f[_0x29ce6f['Solve']=0x5]='Solve',_0x29ce6f[_0x29ce6f[_0x39cd9e(0x20c)]=-0x1]=_0x39cd9e(0x20c),_0x29ce6f))(v||{});const f=_0x335a82=>c[_0x39cd9e(0x1ce)](new Date(+_0x335a82))[_0x39cd9e(0x1f0)](_0x39cd9e(0x1c4)),R=async(_0x2ad364,_0x59fd93)=>{const _0x5446c1=_0x39cd9e,_0x519026=_0x2ad364[_0x5446c1(0x21f)](c[_0x5446c1(0x1ca)]),_0xfa0908=_0x2ad364[_0x5446c1(0x21f)](P['HTTPService']);_0x59fd93[_0x5446c1(0x21b)](_0x249f31=>{const _0x5a3723=_0x5446c1;_0x519026[_0x5a3723(0x1c8)](_0x249f31)&&_0x59fd93['delete'](_0x249f31);}),_0x59fd93[_0x5446c1(0x1bb)]&&(await _0xfa0908[_0x5446c1(0x21f)](_0x5446c1(0x1f1),{'params':{'userIDs':[..._0x59fd93]}}))[_0x5446c1(0x1a7)][_0x5446c1(0x208)][_0x5446c1(0x21b)](_0x14c117=>{const _0x46ef22=_0x5446c1;_0x14c117&&_0x519026[_0x46ef22(0x1c7)](_0x14c117);});};var $=Object[_0x39cd9e(0x20e)],E=(_0x55efa9,_0x4a4c41,_0x3c96a7,_0x140e3c)=>{const _0x52b430=_0x39cd9e;for(var _0x18d823=_0x140e3c>0x1?void 0x0:_0x140e3c?$(_0x4a4c41,_0x3c96a7):_0x4a4c41,_0x369789=_0x55efa9[_0x52b430(0x20b)]-0x1,_0x3ea411;_0x369789>=0x0;_0x369789--)(_0x3ea411=_0x55efa9[_0x369789])&&(_0x18d823=_0x3ea411(_0x18d823)||_0x18d823);return _0x18d823;},S=(_0x59ec5f,_0x13d378)=>(_0x6c8f45,_0x156d51)=>_0x13d378(_0x6c8f45,_0x156d51,_0x59ec5f);function _0x15fe(){const _0x55fc3d=['Reply','rangeId','Solved','249bpBMwi','size','UniverInstanceType','OpenOrReOpen','9mpCPEZ','threadId','2012295AaQOXl','_httpService','setConfig','comment','YYYY/MM/DD\x20HH:mm','type','personId','addUser','getUser','rangeType','UserManagerService','payload','replyId','userID','dayjs','430937zpSXBk','_commentService','map','addComment','unitId','11820310oPKDHC','getUnit','CustomRangeType','parse','dataSource','46388JCUfMB','content','onReady','_injector','UniverThreadCommentDataSourcePlugin','/reply','reply','_initDataSource','HTTPService','stringify','solved','_config','_sessionService','/add','customRanges','disposeWithMe','COMMENT','commentUpdate$','slice','_threadCommentModel','UniverCollaborationClientPlugin','Delete','find','format','/universer-api/user/list','/delete','error','deleteComment','resolved','resolveComment','Disposable','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','2zHyYMB','/universer-api/comment/unit/','defineProperty','add','CommentService','pipe','comments','replies','userId','IConfigService','post','Inject','24135452tCqUtX','7303142zEebVN','bufferTime','users','ThreadCommentModel','Module','length','UNRECOGNIZED','IThreadCommentDataSourceService','getOwnPropertyDescriptor','DependentOn','syncUpdateMutationToColla','ref','_userService','Edit','getCurrentUser','requireSession','_init','root','/list','/edit','UniverLicensePlugin','forEach','getMemberID','code','pluginName','get','createTimestamp','Injector','updateComment','_threadCommentDataSource','user','body','onStarting','10139336DlFlpy','subscribe','_threadCommentDataSourceService','Unknown','filter','merge','toStringTag','CollaborationSessionService','Add','Solve','Plugin','_configService','getComment','6xjHuOO'];_0x15fe=function(){return _0x55fc3d;};return _0x15fe();}function _0x38c6(_0xf01d7b,_0x214f47){_0xf01d7b=_0xf01d7b-0x1a4;const _0x15fe84=_0x15fe();let _0x38c69f=_0x15fe84[_0xf01d7b];return _0x38c69f;}let _=class extends c[_0x39cd9e(0x1f7)]{constructor(_0x2da5db,_0x21a9ed,_0x56f7c6,_0x11f535){const _0x571320=_0x39cd9e;super(),this[_0x571320(0x1d0)]=_0x2da5db,this['_threadCommentModel']=_0x21a9ed,this[_0x571320(0x212)]=_0x56f7c6,this['_injector']=_0x11f535,this[_0x571320(0x216)](),this['_initUserSync']();}['_initUserSync'](){const _0x5c112e=_0x39cd9e;this[_0x5c112e(0x1e8)](this[_0x5c112e(0x1ec)][_0x5c112e(0x1ea)][_0x5c112e(0x1fe)](j[_0x5c112e(0x207)](0x10))[_0x5c112e(0x1aa)](_0x5df37b=>{const _0x2bd787=_0x5c112e,_0x3e94ca=new Set();_0x5df37b[_0x2bd787(0x21b)](_0x17d075=>{const _0x1a7ddb=_0x2bd787;switch(_0x17d075[_0x1a7ddb(0x1c5)]){case _0x1a7ddb(0x1fc):{const _0x23e0e1=_0x17d075[_0x1a7ddb(0x1cb)][_0x1a7ddb(0x1c6)];_0x3e94ca[_0x1a7ddb(0x1fc)](_0x23e0e1);break;}}}),R(this[_0x2bd787(0x1dc)],_0x3e94ca);}));}[_0x39cd9e(0x216)](){const _0x5a95ab=_0x39cd9e;this[_0x5a95ab(0x1e8)](this[_0x5a95ab(0x1d0)][_0x5a95ab(0x1ea)][_0x5a95ab(0x1aa)](async _0xac9c68=>{const _0x2cce43=_0x5a95ab;var _0x397191,_0xc2c8f0,_0x5e34e6,_0x482301;const _0x381474=(_0x397191=this['_threadCommentModel'][_0x2cce43(0x1d5)](_0xac9c68[_0x2cce43(0x1d3)])['find'](_0x5ae257=>_0x5ae257[_0x2cce43(0x1bf)]===_0xac9c68['threadId']))==null?void 0x0:_0x397191['root'];if(!_0x381474)return;const {unitId:_0x49a13d,subUnitId:_0x516f78}=_0x381474;switch(_0xac9c68['user']&&this[_0x2cce43(0x212)][_0x2cce43(0x1c7)](_0xac9c68[_0x2cce43(0x1a6)]),_0xac9c68[_0x2cce43(0x1c5)]){case v['Add']:break;case v[_0x2cce43(0x1b7)]:{this[_0x2cce43(0x1ec)]['addComment'](_0x49a13d,_0x516f78,{'unitId':_0x49a13d,'subUnitId':_0x516f78,'ref':'','id':_0xac9c68[_0x2cce43(0x1cc)],'dT':f(+_0xac9c68[_0x2cce43(0x220)]),'threadId':_0xac9c68[_0x2cce43(0x1bf)],'personId':(_0x5e34e6=(_0xc2c8f0=_0xac9c68['user'])==null?void 0x0:_0xc2c8f0['userID'])!=null?_0x5e34e6:_0xac9c68[_0x2cce43(0x201)],'text':JSON[_0x2cce43(0x1d7)](_0xac9c68[_0x2cce43(0x1da)]),'parentId':_0x381474['id']});break;}case v[_0x2cce43(0x1ee)]:{const _0x10bc16=this[_0x2cce43(0x1ec)][_0x2cce43(0x1b5)](_0x49a13d,_0x516f78,_0xac9c68[_0x2cce43(0x1cc)]);_0x10bc16&&_0x10bc16['parentId']&&this[_0x2cce43(0x1ec)][_0x2cce43(0x1f4)](_0x49a13d,_0x516f78,_0xac9c68[_0x2cce43(0x1cc)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x2cce43(0x1a4)](_0x49a13d,_0x516f78,{'commentId':_0xac9c68[_0x2cce43(0x1cc)],'text':JSON[_0x2cce43(0x1d7)](_0xac9c68[_0x2cce43(0x1da)])});break;}case v[_0x2cce43(0x1b2)]:{const _0x3ed754=(_0x482301=this['_threadCommentModel']['getUnit'](_0xac9c68[_0x2cce43(0x1d3)])[_0x2cce43(0x1ef)](_0x4f38e5=>_0x4f38e5[_0x2cce43(0x1bf)]===_0xac9c68['threadId']))==null?void 0x0:_0x482301[_0x2cce43(0x217)];_0x3ed754&&this['_threadCommentModel'][_0x2cce43(0x1f6)](_0x49a13d,_0x516f78,_0x3ed754['id'],_0xac9c68[_0x2cce43(0x1e3)]===I[_0x2cce43(0x1b9)]);break;}}}));}};_=E([S(0x0,c[_0x39cd9e(0x204)](b[_0x39cd9e(0x1fd)])),S(0x1,c[_0x39cd9e(0x204)](M[_0x39cd9e(0x209)])),S(0x2,c[_0x39cd9e(0x204)](c[_0x39cd9e(0x1ca)])),S(0x3,c['Inject'](c[_0x39cd9e(0x221)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x39cd9e(0x20e)],x=(_0x375ea7,_0x8ffa94,_0xc4ccfc,_0x1df547)=>{for(var _0x3fd3ac=_0x1df547>0x1?void 0x0:_0x1df547?A(_0x8ffa94,_0xc4ccfc):_0x8ffa94,_0x15b061=_0x375ea7['length']-0x1,_0x3f151d;_0x15b061>=0x0;_0x15b061--)(_0x3f151d=_0x375ea7[_0x15b061])&&(_0x3fd3ac=_0x3f151d(_0x3fd3ac)||_0x3fd3ac);return _0x3fd3ac;},C=(_0x29e769,_0x33046a)=>(_0x4aa702,_0x1d5cd5)=>_0x33046a(_0x4aa702,_0x1d5cd5,_0x29e769);function Y(_0x127912,_0x235d92){const _0x2f9503=_0x39cd9e,_0x254c3c=_0x127912[_0x2f9503(0x200)][0x0];return{..._0x235d92,'id':_0x254c3c['replyId'],'resolved':_0x127912['solved']===0x1,'dT':f(_0x254c3c['createTimestamp']),'personId':_0x254c3c[_0x2f9503(0x201)],'threadId':_0x254c3c[_0x2f9503(0x1bf)]};}function G(_0x50de8f,_0x4c0c8c,_0x58e622){const _0x282034=_0x39cd9e;var _0x254d2e,_0x3cb45b;if(((_0x3cb45b=(_0x254d2e=_0x50de8f==null?void 0x0:_0x50de8f['replies'])==null?void 0x0:_0x254d2e[_0x282034(0x20b)])!=null?_0x3cb45b:0x0)>0x0){const _0x42299d=(_0x9741de,_0x4c6aa0)=>({'id':_0x9741de[_0x282034(0x1cc)],'threadId':_0x9741de[_0x282034(0x1bf)],'dT':f(_0x9741de[_0x282034(0x220)]),'personId':_0x9741de[_0x282034(0x201)],'resolved':_0x50de8f[_0x282034(0x1e3)]===I[_0x282034(0x1b9)],'unitId':_0x4c0c8c,'subUnitId':_0x58e622,'text':JSON[_0x282034(0x1d7)](_0x9741de['content']),'parentId':_0x4c6aa0}),_0x3f9946=_0x42299d(_0x50de8f[_0x282034(0x200)][0x0]);return{..._0x3f9946,'children':_0x50de8f['replies'][_0x282034(0x1eb)](0x1)[_0x282034(0x1d1)](_0x37bd25=>_0x42299d(_0x37bd25,_0x3f9946['id']))};}return null;}let p=class{constructor(_0x32b253,_0x105f27,_0xb282d3){const _0x4fb193=_0x39cd9e;this['_httpService']=_0x32b253,this[_0x4fb193(0x212)]=_0x105f27,this[_0x4fb193(0x1e5)]=_0xb282d3;}async[_0x39cd9e(0x1d2)](_0x27e7c3){const _0x214823=_0x39cd9e;var _0x266017,_0x213b88;const {parentId:_0x4b4bcb,unitId:_0x20c0ea,text:_0x23dfb8,threadId:_0x53ce3d}=_0x27e7c3,_0x5e65b0=(_0x213b88=(_0x266017=_0x23dfb8[_0x214823(0x1e7)])==null?void 0x0:_0x266017[_0x214823(0x1ad)](_0x54803e=>_0x54803e['rangeType']===c[_0x214823(0x1d6)][_0x214823(0x1e9)])[_0x214823(0x1d1)](_0x16195c=>_0x16195c[_0x214823(0x1b8)]))!=null?_0x213b88:[],_0x4249d1=JSON[_0x214823(0x1e2)](_0x23dfb8),_0x295c8c=(await this[_0x214823(0x1e5)]['requireSession'](_0x20c0ea))['getMemberID']();if(_0x4b4bcb){const _0x3cc9dd={'memberId':_0x295c8c,'unitId':_0x20c0ea,'content':_0x4249d1,'mention':_0x5e65b0,'threadId':_0x53ce3d},_0x45d314=(await this[_0x214823(0x1c1)][_0x214823(0x203)](_0x214823(0x1fa)+_0x20c0ea+_0x214823(0x1de),{'body':_0x3cc9dd}))[_0x214823(0x1a7)][_0x214823(0x1df)];return{..._0x27e7c3,'id':_0x45d314['replyId'],'dT':c['dayjs'](+_0x45d314[_0x214823(0x220)])[_0x214823(0x1f0)](_0x214823(0x1c4)),'personId':_0x45d314[_0x214823(0x201)]};}else{const _0x5cc501={'memberId':_0x295c8c,'unitId':_0x20c0ea,'content':_0x4249d1,'mention':_0x5e65b0},_0x41a5bd=await this[_0x214823(0x1c1)][_0x214823(0x203)](_0x214823(0x1fa)+_0x20c0ea+_0x214823(0x1e6),{'body':_0x5cc501});return Y(_0x41a5bd[_0x214823(0x1a7)][_0x214823(0x1c3)],_0x27e7c3);}}async[_0x39cd9e(0x1a4)](_0x5894b3){const _0xb64223=_0x39cd9e;var _0x2fa005,_0x1f0e42;const {text:_0x2faa29,unitId:_0x31585a}=_0x5894b3,_0x28ece3=(_0x1f0e42=(_0x2fa005=_0x2faa29[_0xb64223(0x1e7)])==null?void 0x0:_0x2fa005[_0xb64223(0x1ad)](_0x66e9d3=>_0x66e9d3[_0xb64223(0x1c9)]===c[_0xb64223(0x1d6)][_0xb64223(0x1e9)])[_0xb64223(0x1d1)](_0x205240=>_0x205240[_0xb64223(0x1b8)]))!=null?_0x1f0e42:[],_0x5dd23a=JSON[_0xb64223(0x1e2)](_0x2faa29),_0x22ef47=_0x5894b3[_0xb64223(0x1bf)],_0x5c8c7f=_0x5894b3['id'],_0x2fb54b={'memberId':(await this[_0xb64223(0x1e5)][_0xb64223(0x215)](_0x31585a))['getMemberID'](),'unitId':_0x31585a,'threadId':_0x22ef47,'mention':_0x28ece3,'content':_0x5dd23a,'replyId':_0x5c8c7f},_0x46105c=await this[_0xb64223(0x1c1)][_0xb64223(0x203)](_0xb64223(0x1fa)+_0x31585a+_0xb64223(0x219),{'body':_0x2fb54b});return!_0x46105c[_0xb64223(0x1a7)]['error']||_0x46105c[_0xb64223(0x1a7)]['error'][_0xb64223(0x21d)]===0x1;}async[_0x39cd9e(0x1f6)](_0x543e6f){const _0x315d61=_0x39cd9e,{unitId:_0x5c4233}=_0x543e6f,_0x44d0b4=_0x543e6f[_0x315d61(0x1bf)],_0x3aad58={'memberId':this[_0x315d61(0x212)][_0x315d61(0x214)]()[_0x315d61(0x1cd)],'unitId':_0x5c4233,'threadId':_0x44d0b4,'solved':_0x543e6f[_0x315d61(0x1f5)]?I[_0x315d61(0x1b9)]:I[_0x315d61(0x1bd)]},_0xe01942=await this[_0x315d61(0x1c1)][_0x315d61(0x203)](_0x315d61(0x1fa)+_0x5c4233+'/solved',{'body':_0x3aad58});return!_0xe01942[_0x315d61(0x1a7)][_0x315d61(0x1f3)]||_0xe01942['body']['error'][_0x315d61(0x21d)]===0x1;}async[_0x39cd9e(0x1f4)](_0x5706db,_0x3fff49,_0x1e0ab0,_0x416d69){const _0x20d756=_0x39cd9e,_0x3f07e1={'memberId':(await this[_0x20d756(0x1e5)][_0x20d756(0x215)](_0x5706db))[_0x20d756(0x21c)](),'threadId':_0x1e0ab0,'replyId':_0x416d69,'unitId':_0x5706db},_0x1e850b=await this['_httpService'][_0x20d756(0x203)]('/universer-api/comment/unit/'+_0x5706db+_0x20d756(0x1f2),{'body':_0x3f07e1});return!_0x1e850b[_0x20d756(0x1a7)]['error']||_0x1e850b[_0x20d756(0x1a7)][_0x20d756(0x1f3)][_0x20d756(0x21d)]===0x1;}async['listComments'](_0x1e23ac,_0x1df984,_0x68596e){const _0x5f1175=_0x39cd9e,_0x3d62ff={'unitId':_0x1e23ac,'threadId':_0x68596e},_0xf1439a=await this[_0x5f1175(0x1c1)][_0x5f1175(0x203)]('/universer-api/comment/unit/'+_0x1e23ac+_0x5f1175(0x218),{'body':_0x3d62ff}),_0x525acb=_0x68596e[_0x5f1175(0x1d1)](_0x2de6da=>G(_0xf1439a[_0x5f1175(0x1a7)][_0x5f1175(0x1ff)][_0x2de6da],_0x1e23ac,_0x1df984))[_0x5f1175(0x1ad)](Boolean);return Object['values'](_0xf1439a['body'][_0x5f1175(0x208)])[_0x5f1175(0x21b)](_0x44cc48=>{const _0x172627=_0x5f1175;this[_0x172627(0x212)][_0x172627(0x1c7)](_0x44cc48);}),_0x525acb;}['saveCommentToSnapshot'](_0x1b0559){const _0xfe797e=_0x39cd9e;return{'id':_0x1b0559['id'],'threadId':_0x1b0559['threadId'],'ref':_0x1b0559[_0xfe797e(0x211)]};}};p=x([C(0x0,c[_0x39cd9e(0x204)](P[_0x39cd9e(0x1e1)])),C(0x1,c[_0x39cd9e(0x204)](c[_0x39cd9e(0x1ca)])),C(0x2,c[_0x39cd9e(0x204)](b[_0x39cd9e(0x1b0)]))],p);var H=Object[_0x39cd9e(0x20e)],J=(_0x193889,_0x2279e4,_0x1ab2f3,_0x51fe45)=>{const _0x254668=_0x39cd9e;for(var _0x4c7c9f=_0x51fe45>0x1?void 0x0:_0x51fe45?H(_0x2279e4,_0x1ab2f3):_0x2279e4,_0x12d0df=_0x193889[_0x254668(0x20b)]-0x1,_0x212f0d;_0x12d0df>=0x0;_0x12d0df--)(_0x212f0d=_0x193889[_0x12d0df])&&(_0x4c7c9f=_0x212f0d(_0x4c7c9f)||_0x4c7c9f);return _0x4c7c9f;},y=(_0x4b7578,_0x563989)=>(_0x3c2530,_0x2a8fa)=>_0x563989(_0x3c2530,_0x2a8fa,_0x4b7578);let g=class extends c[_0x39cd9e(0x1f7)]{constructor(_0x45dd60,_0x90bb8f){const _0xff20d7=_0x39cd9e;super(),this['_threadCommentDataSourceService']=_0x45dd60,this[_0xff20d7(0x1a5)]=_0x90bb8f,this['_initDataSource']();}[_0x39cd9e(0x1e0)](){const _0x28ec03=_0x39cd9e;this['_threadCommentDataSourceService'][_0x28ec03(0x1d8)]=this[_0x28ec03(0x1a5)],this[_0x28ec03(0x1ab)][_0x28ec03(0x210)]=!0x1;}};g=J([y(0x0,M[_0x39cd9e(0x20d)]),y(0x1,c[_0x39cd9e(0x204)](p))],g);var F=Object['defineProperty'],L=Object[_0x39cd9e(0x20e)],Z=(_0x392561,_0x405ef9,_0x3ebddf)=>_0x405ef9 in _0x392561?F(_0x392561,_0x405ef9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3ebddf}):_0x392561[_0x405ef9]=_0x3ebddf,W=(_0x34959f,_0x26d0c0,_0x26c090,_0x935f06)=>{const _0x2f4759=_0x39cd9e;for(var _0x25cbb5=_0x935f06>0x1?void 0x0:_0x935f06?L(_0x26d0c0,_0x26c090):_0x26d0c0,_0x295489=_0x34959f[_0x2f4759(0x20b)]-0x1,_0x1d6f1a;_0x295489>=0x0;_0x295489--)(_0x1d6f1a=_0x34959f[_0x295489])&&(_0x25cbb5=_0x1d6f1a(_0x25cbb5)||_0x25cbb5);return _0x25cbb5;},O=(_0x8d4afb,_0x26c5a7)=>(_0x478488,_0x25ac6a)=>_0x26c5a7(_0x478488,_0x25ac6a,_0x8d4afb),N=(_0x5f34f9,_0x1de444,_0x52e4d8)=>Z(_0x5f34f9,typeof _0x1de444!='symbol'?_0x1de444+'':_0x1de444,_0x52e4d8);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x39cd9e(0x1b3)]{constructor(_0x4016de=D,_0x1a246a,_0x1029b6){const _0x130b86=_0x39cd9e;super(),this[_0x130b86(0x1e4)]=_0x4016de,this['_injector']=_0x1a246a,this['_configService']=_0x1029b6;const {..._0x2495d8}=c[_0x130b86(0x1ae)]({},D,this[_0x130b86(0x1e4)]);this[_0x130b86(0x1b4)][_0x130b86(0x1c2)](q,_0x2495d8);}[_0x39cd9e(0x1a8)](){const _0x50a008=_0x39cd9e;[[p],[g],[_]][_0x50a008(0x21b)](_0x1083e8=>{const _0x522b5c=_0x50a008;this[_0x522b5c(0x1dc)][_0x522b5c(0x1fc)](_0x1083e8);});}[_0x39cd9e(0x1db)](){const _0x2eb2a9=_0x39cd9e;this[_0x2eb2a9(0x1dc)][_0x2eb2a9(0x21f)](g),this[_0x2eb2a9(0x1dc)][_0x2eb2a9(0x21f)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x39cd9e(0x21e),U),N(exports[_0x39cd9e(0x1dd)],'type',c[_0x39cd9e(0x1bc)]['UNIVER_UNKNOWN']),exports[_0x39cd9e(0x1dd)]=W([c[_0x39cd9e(0x20f)](w['UniverThreadCommentUIPlugin'],b[_0x39cd9e(0x1ed)],T[_0x39cd9e(0x21a)]),O(0x1,c['Inject'](c[_0x39cd9e(0x221)])),O(0x2,c[_0x39cd9e(0x202)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5b9be5=_0x3c81;(function(_0xf7d31a,_0x25c980){const _0x22744f=_0x3c81,_0x3cda87=_0xf7d31a();while(!![]){try{const _0x155bc3=parseInt(_0x22744f(0x1fd))/0x1*(parseInt(_0x22744f(0x208))/0x2)+-parseInt(_0x22744f(0x1ee))/0x3+-parseInt(_0x22744f(0x1dd))/0x4+-parseInt(_0x22744f(0x1cf))/0x5*(parseInt(_0x22744f(0x1e3))/0x6)+-parseInt(_0x22744f(0x1ed))/0x7*(-parseInt(_0x22744f(0x1eb))/0x8)+-parseInt(_0x22744f(0x1e7))/0x9+parseInt(_0x22744f(0x1b8))/0xa*(parseInt(_0x22744f(0x1e8))/0xb);if(_0x155bc3===_0x25c980)break;else _0x3cda87['push'](_0x3cda87['shift']());}catch(_0x5c13b7){_0x3cda87['push'](_0x3cda87['shift']());}}}(_0xfaa5,0xee006));import{CommentService as _0xf448c6,CollaborationSessionService as _0x55b756,UniverCollaborationClientPlugin as _0x78b621}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2f2b47}from'@univerjs-pro/license';import{dayjs as _0x701736,UserManagerService as _0x57ff03,Inject as _0x5621ab,Injector as _0x4dc61e,Disposable as _0x22ac0d,CustomRangeType as _0x3596e0,UniverInstanceType as _0x801f8b,DependentOn as _0x1dd896,IConfigService as _0x47c18a,Plugin as _0x2bb13,merge as _0x108311}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x39a911}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b7bdb,IThreadCommentDataSourceService as _0x16527e}from'@univerjs/thread-comment';import{bufferTime as _0x49bcc3}from'rxjs';function _0x3c81(_0x380fdf,_0x53ac72){_0x380fdf=_0x380fdf-0x1ab;const _0xfaa592=_0xfaa5();let _0x3c8117=_0xfaa592[_0x380fdf];return _0x3c8117;}import{HTTPService as _0x3797c5}from'@univerjs/network';const W=_0x5b9be5(0x20e);var I=(_0x1290ef=>(_0x1290ef[_0x1290ef[_0x5b9be5(0x20c)]=0x0]=_0x5b9be5(0x20c),_0x1290ef[_0x1290ef[_0x5b9be5(0x1ad)]=0x1]=_0x5b9be5(0x1ad),_0x1290ef[_0x1290ef['UNRECOGNIZED']=-0x1]=_0x5b9be5(0x1f3),_0x1290ef))(I||{}),v=(_0x550a5a=>(_0x550a5a[_0x550a5a['Unknown']=0x0]=_0x5b9be5(0x20f),_0x550a5a[_0x550a5a[_0x5b9be5(0x1c2)]=0x1]='Add',_0x550a5a[_0x550a5a[_0x5b9be5(0x1bc)]=0x2]='Reply',_0x550a5a[_0x550a5a[_0x5b9be5(0x1bb)]=0x3]='Edit',_0x550a5a[_0x550a5a[_0x5b9be5(0x1f6)]=0x4]=_0x5b9be5(0x1f6),_0x550a5a[_0x550a5a[_0x5b9be5(0x1ec)]=0x5]='Solve',_0x550a5a[_0x550a5a[_0x5b9be5(0x1f3)]=-0x1]=_0x5b9be5(0x1f3),_0x550a5a))(v||{});const y=_0x585a19=>_0x701736(new Date(+_0x585a19))[_0x5b9be5(0x20d)](_0x5b9be5(0x203)),B=async(_0xd2cd18,_0x47f3ac)=>{const _0x4989f5=_0x5b9be5,_0x595bd4=_0xd2cd18[_0x4989f5(0x1ab)](_0x57ff03),_0x3f4258=_0xd2cd18[_0x4989f5(0x1ab)](_0x3797c5);_0x47f3ac[_0x4989f5(0x1d4)](_0x1ed6cb=>{const _0x1a8bef=_0x4989f5;_0x595bd4[_0x1a8bef(0x1ae)](_0x1ed6cb)&&_0x47f3ac[_0x1a8bef(0x1f7)](_0x1ed6cb);}),_0x47f3ac[_0x4989f5(0x202)]&&(await _0x3f4258[_0x4989f5(0x1ab)](_0x4989f5(0x1bf),{'params':{'userIDs':[..._0x47f3ac]}}))[_0x4989f5(0x1f9)][_0x4989f5(0x1fc)][_0x4989f5(0x1d4)](_0x298a90=>{const _0x1aa94a=_0x4989f5;_0x298a90&&_0x595bd4[_0x1aa94a(0x1e5)](_0x298a90);});};var K=Object[_0x5b9be5(0x1f8)],V=(_0x2e2b0e,_0x1fbe14,_0x103960,_0x7200b3)=>{const _0x145314=_0x5b9be5;for(var _0x2587ce=_0x7200b3>0x1?void 0x0:_0x7200b3?K(_0x1fbe14,_0x103960):_0x1fbe14,_0x1482a4=_0x2e2b0e[_0x145314(0x1ce)]-0x1,_0x242cb4;_0x1482a4>=0x0;_0x1482a4--)(_0x242cb4=_0x2e2b0e[_0x1482a4])&&(_0x2587ce=_0x242cb4(_0x2587ce)||_0x2587ce);return _0x2587ce;},p=(_0x4077f3,_0x4b45b1)=>(_0x51b0ee,_0x2a7e87)=>_0x4b45b1(_0x51b0ee,_0x2a7e87,_0x4077f3);function _0xfaa5(){const _0x2b54a9=['unitId','3398202wIafnX','16437157obqItR','createTimestamp','_httpService','13157032sTKawS','Solve','7tXDYco','5502702lKHlYS','pluginName','solved','type','/add','UNRECOGNIZED','saveCommentToSnapshot','customRanges','Delete','delete','getOwnPropertyDescriptor','body','onStarting','/universer-api/comment/unit/','users','63101IOKQjk','updateComment','threadId','rangeId','UNIVER_UNKNOWN','size','YYYY/MM/DD\x20HH:mm','replies','user','setConfig','error','50Rmhqlm','pipe','slice','find','OpenOrReOpen','format','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Unknown','/edit','_config','dataSource','reply','get','disposeWithMe','Solved','getUser','comment','_initDataSource','stringify','add','ref','content','subscribe','_commentService','requireSession','10GxvSiq','_initUserSync','resolved','Edit','Reply','_userService','defineProperty','/universer-api/user/list','_threadCommentModel','code','Add','/reply','payload','_sessionService','filter','/solved','_init','replyId','commentUpdate$','COMMENT','symbol','post','length','359895rlmEeq','rangeType','onReady','_configService','_injector','forEach','userId','_threadCommentDataSource','resolveComment','deleteComment','parse','parentId','getCurrentUser','getMemberID','5831184PMRFNj','getComment','root','addComment','map','getUnit','6XOUaRZ','_threadCommentDataSourceService','addUser'];_0xfaa5=function(){return _0x2b54a9;};return _0xfaa5();}let _=class extends _0x22ac0d{constructor(_0x235bdb,_0x484a42,_0xfeb682,_0x4009f0){const _0x463d60=_0x5b9be5;super(),this['_commentService']=_0x235bdb,this['_threadCommentModel']=_0x484a42,this[_0x463d60(0x1bd)]=_0xfeb682,this[_0x463d60(0x1d3)]=_0x4009f0,this[_0x463d60(0x1c8)](),this[_0x463d60(0x1b9)]();}[_0x5b9be5(0x1b9)](){const _0x4eb4c6=_0x5b9be5;this[_0x4eb4c6(0x1ac)](this[_0x4eb4c6(0x1c0)][_0x4eb4c6(0x1ca)][_0x4eb4c6(0x209)](_0x49bcc3(0x10))[_0x4eb4c6(0x1b5)](_0x330e68=>{const _0xf1c853=_0x4eb4c6,_0x5d1b89=new Set();_0x330e68[_0xf1c853(0x1d4)](_0x20194f=>{const _0x362f94=_0xf1c853;switch(_0x20194f[_0x362f94(0x1f1)]){case _0x362f94(0x1b2):{const _0x2ddff6=_0x20194f[_0x362f94(0x1c4)]['personId'];_0x5d1b89['add'](_0x2ddff6);break;}}}),B(this['_injector'],_0x5d1b89);}));}[_0x5b9be5(0x1c8)](){const _0x388773=_0x5b9be5;this['disposeWithMe'](this[_0x388773(0x1b6)][_0x388773(0x1ca)]['subscribe'](async _0x1aa870=>{const _0x57905f=_0x388773;var _0x4f6f8e,_0x472e79,_0x374eeb,_0x4fe717;const _0x45d476=(_0x4f6f8e=this['_threadCommentModel']['getUnit'](_0x1aa870['unitId'])[_0x57905f(0x20b)](_0x1104f0=>_0x1104f0[_0x57905f(0x1ff)]===_0x1aa870[_0x57905f(0x1ff)]))==null?void 0x0:_0x4f6f8e[_0x57905f(0x1df)];if(!_0x45d476)return;const {unitId:_0x4fca5b,subUnitId:_0x24b5b2}=_0x45d476;switch(_0x1aa870[_0x57905f(0x205)]&&this[_0x57905f(0x1bd)][_0x57905f(0x1e5)](_0x1aa870[_0x57905f(0x205)]),_0x1aa870[_0x57905f(0x1f1)]){case v[_0x57905f(0x1c2)]:break;case v[_0x57905f(0x1bc)]:{this[_0x57905f(0x1c0)]['addComment'](_0x4fca5b,_0x24b5b2,{'unitId':_0x4fca5b,'subUnitId':_0x24b5b2,'ref':'','id':_0x1aa870[_0x57905f(0x1c9)],'dT':y(+_0x1aa870[_0x57905f(0x1e9)]),'threadId':_0x1aa870['threadId'],'personId':(_0x374eeb=(_0x472e79=_0x1aa870[_0x57905f(0x205)])==null?void 0x0:_0x472e79['userID'])!=null?_0x374eeb:_0x1aa870['userId'],'text':JSON[_0x57905f(0x1d9)](_0x1aa870[_0x57905f(0x1b4)]),'parentId':_0x45d476['id']});break;}case v[_0x57905f(0x1f6)]:{const _0x4f38d3=this[_0x57905f(0x1c0)][_0x57905f(0x1de)](_0x4fca5b,_0x24b5b2,_0x1aa870[_0x57905f(0x1c9)]);_0x4f38d3&&_0x4f38d3[_0x57905f(0x1da)]&&this[_0x57905f(0x1c0)][_0x57905f(0x1d8)](_0x4fca5b,_0x24b5b2,_0x1aa870[_0x57905f(0x1c9)]);break;}case v[_0x57905f(0x1bb)]:{this[_0x57905f(0x1c0)][_0x57905f(0x1fe)](_0x4fca5b,_0x24b5b2,{'commentId':_0x1aa870['replyId'],'text':JSON['parse'](_0x1aa870[_0x57905f(0x1b4)])});break;}case v[_0x57905f(0x1ec)]:{const _0x586eaa=(_0x4fe717=this['_threadCommentModel'][_0x57905f(0x1e2)](_0x1aa870[_0x57905f(0x1e6)])[_0x57905f(0x20b)](_0x267414=>_0x267414[_0x57905f(0x1ff)]===_0x1aa870[_0x57905f(0x1ff)]))==null?void 0x0:_0x4fe717[_0x57905f(0x1df)];_0x586eaa&&this[_0x57905f(0x1c0)][_0x57905f(0x1d7)](_0x4fca5b,_0x24b5b2,_0x586eaa['id'],_0x1aa870['solved']===I[_0x57905f(0x1ad)]);break;}}}));}};_=V([p(0x0,_0x5621ab(_0xf448c6)),p(0x1,_0x5621ab(_0x4b7bdb)),p(0x2,_0x5621ab(_0x57ff03)),p(0x3,_0x5621ab(_0x4dc61e))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x5b9be5(0x1f8)],Q=(_0xb92955,_0x42ba66,_0x20fffe,_0x364768)=>{const _0x290b6e=_0x5b9be5;for(var _0x3950a9=_0x364768>0x1?void 0x0:_0x364768?k(_0x42ba66,_0x20fffe):_0x42ba66,_0x18efc2=_0xb92955[_0x290b6e(0x1ce)]-0x1,_0x4a61c2;_0x18efc2>=0x0;_0x18efc2--)(_0x4a61c2=_0xb92955[_0x18efc2])&&(_0x3950a9=_0x4a61c2(_0x3950a9)||_0x3950a9);return _0x3950a9;},b=(_0x4730f6,_0x2ac09d)=>(_0x563512,_0x6730e)=>_0x2ac09d(_0x563512,_0x6730e,_0x4730f6);function X(_0x3d8796,_0x53f87f){const _0x205b9b=_0x5b9be5,_0x3206fa=_0x3d8796[_0x205b9b(0x204)][0x0];return{..._0x53f87f,'id':_0x3206fa[_0x205b9b(0x1c9)],'resolved':_0x3d8796[_0x205b9b(0x1f0)]===0x1,'dT':y(_0x3206fa[_0x205b9b(0x1e9)]),'personId':_0x3206fa[_0x205b9b(0x1d5)],'threadId':_0x3206fa['threadId']};}function ee(_0x7e4471,_0x1ac04d,_0x603050){const _0x263cbd=_0x5b9be5;var _0x2e4cae,_0x752089;if(((_0x752089=(_0x2e4cae=_0x7e4471==null?void 0x0:_0x7e4471[_0x263cbd(0x204)])==null?void 0x0:_0x2e4cae['length'])!=null?_0x752089:0x0)>0x0){const _0x2520c3=(_0x12308e,_0x4600b5)=>({'id':_0x12308e[_0x263cbd(0x1c9)],'threadId':_0x12308e[_0x263cbd(0x1ff)],'dT':y(_0x12308e['createTimestamp']),'personId':_0x12308e[_0x263cbd(0x1d5)],'resolved':_0x7e4471[_0x263cbd(0x1f0)]===I[_0x263cbd(0x1ad)],'unitId':_0x1ac04d,'subUnitId':_0x603050,'text':JSON[_0x263cbd(0x1d9)](_0x12308e['content']),'parentId':_0x4600b5}),_0x2b28d1=_0x2520c3(_0x7e4471[_0x263cbd(0x204)][0x0]);return{..._0x2b28d1,'children':_0x7e4471[_0x263cbd(0x204)][_0x263cbd(0x20a)](0x1)['map'](_0x21a525=>_0x2520c3(_0x21a525,_0x2b28d1['id']))};}return null;}let S=class{constructor(_0x5dd677,_0x94e7cb,_0x3e7ee5){const _0x3e898e=_0x5b9be5;this[_0x3e898e(0x1ea)]=_0x5dd677,this[_0x3e898e(0x1bd)]=_0x94e7cb,this[_0x3e898e(0x1c5)]=_0x3e7ee5;}async[_0x5b9be5(0x1e0)](_0x29121d){const _0x272739=_0x5b9be5;var _0x450768,_0x1343e2;const {parentId:_0x2872c1,unitId:_0x2393ce,text:_0x3cee84,threadId:_0x163a6f}=_0x29121d,_0x591fb1=(_0x1343e2=(_0x450768=_0x3cee84[_0x272739(0x1f5)])==null?void 0x0:_0x450768[_0x272739(0x1c6)](_0x3a7014=>_0x3a7014[_0x272739(0x1d0)]===_0x3596e0[_0x272739(0x1cb)])[_0x272739(0x1e1)](_0xfd0ce4=>_0xfd0ce4[_0x272739(0x200)]))!=null?_0x1343e2:[],_0x53664e=JSON[_0x272739(0x1b1)](_0x3cee84),_0x195d1d=(await this[_0x272739(0x1c5)]['requireSession'](_0x2393ce))['getMemberID']();if(_0x2872c1){const _0x17b23b={'memberId':_0x195d1d,'unitId':_0x2393ce,'content':_0x53664e,'mention':_0x591fb1,'threadId':_0x163a6f},_0x4ba29a=(await this['_httpService'][_0x272739(0x1cd)](_0x272739(0x1fb)+_0x2393ce+_0x272739(0x1c3),{'body':_0x17b23b}))[_0x272739(0x1f9)][_0x272739(0x213)];return{..._0x29121d,'id':_0x4ba29a[_0x272739(0x1c9)],'dT':_0x701736(+_0x4ba29a[_0x272739(0x1e9)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x4ba29a[_0x272739(0x1d5)]};}else{const _0x2fff27={'memberId':_0x195d1d,'unitId':_0x2393ce,'content':_0x53664e,'mention':_0x591fb1},_0x23d9c4=await this[_0x272739(0x1ea)][_0x272739(0x1cd)]('/universer-api/comment/unit/'+_0x2393ce+_0x272739(0x1f2),{'body':_0x2fff27});return X(_0x23d9c4[_0x272739(0x1f9)][_0x272739(0x1af)],_0x29121d);}}async[_0x5b9be5(0x1fe)](_0x483b04){const _0x59c5c5=_0x5b9be5;var _0x5bc3ed,_0x45f9e2;const {text:_0x261790,unitId:_0x25e695}=_0x483b04,_0x52c656=(_0x45f9e2=(_0x5bc3ed=_0x261790['customRanges'])==null?void 0x0:_0x5bc3ed['filter'](_0x503ba4=>_0x503ba4[_0x59c5c5(0x1d0)]===_0x3596e0[_0x59c5c5(0x1cb)])[_0x59c5c5(0x1e1)](_0x157e43=>_0x157e43['rangeId']))!=null?_0x45f9e2:[],_0x2919be=JSON[_0x59c5c5(0x1b1)](_0x261790),_0x219e9b=_0x483b04[_0x59c5c5(0x1ff)],_0x1d0b99=_0x483b04['id'],_0x5ae826={'memberId':(await this[_0x59c5c5(0x1c5)][_0x59c5c5(0x1b7)](_0x25e695))[_0x59c5c5(0x1dc)](),'unitId':_0x25e695,'threadId':_0x219e9b,'mention':_0x52c656,'content':_0x2919be,'replyId':_0x1d0b99},_0x3b5744=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x25e695+_0x59c5c5(0x210),{'body':_0x5ae826});return!_0x3b5744[_0x59c5c5(0x1f9)][_0x59c5c5(0x207)]||_0x3b5744[_0x59c5c5(0x1f9)][_0x59c5c5(0x207)]['code']===0x1;}async[_0x5b9be5(0x1d7)](_0x5eb6b5){const _0x2bc741=_0x5b9be5,{unitId:_0x1ea889}=_0x5eb6b5,_0x4950f8=_0x5eb6b5[_0x2bc741(0x1ff)],_0xaee18a={'memberId':this['_userService'][_0x2bc741(0x1db)]()['userID'],'unitId':_0x1ea889,'threadId':_0x4950f8,'solved':_0x5eb6b5[_0x2bc741(0x1ba)]?I[_0x2bc741(0x1ad)]:I[_0x2bc741(0x20c)]},_0x429c66=await this[_0x2bc741(0x1ea)][_0x2bc741(0x1cd)]('/universer-api/comment/unit/'+_0x1ea889+_0x2bc741(0x1c7),{'body':_0xaee18a});return!_0x429c66[_0x2bc741(0x1f9)][_0x2bc741(0x207)]||_0x429c66['body'][_0x2bc741(0x207)][_0x2bc741(0x1c1)]===0x1;}async[_0x5b9be5(0x1d8)](_0x24a94c,_0x252bbf,_0x18625a,_0x10bc28){const _0x2b477e=_0x5b9be5,_0x38a878={'memberId':(await this[_0x2b477e(0x1c5)][_0x2b477e(0x1b7)](_0x24a94c))[_0x2b477e(0x1dc)](),'threadId':_0x18625a,'replyId':_0x10bc28,'unitId':_0x24a94c},_0x3ec56d=await this[_0x2b477e(0x1ea)]['post'](_0x2b477e(0x1fb)+_0x24a94c+'/delete',{'body':_0x38a878});return!_0x3ec56d['body'][_0x2b477e(0x207)]||_0x3ec56d[_0x2b477e(0x1f9)][_0x2b477e(0x207)][_0x2b477e(0x1c1)]===0x1;}async['listComments'](_0x12bf9f,_0x307613,_0x4391f7){const _0x485123=_0x5b9be5,_0x1e7a51={'unitId':_0x12bf9f,'threadId':_0x4391f7},_0x12877d=await this[_0x485123(0x1ea)][_0x485123(0x1cd)]('/universer-api/comment/unit/'+_0x12bf9f+'/list',{'body':_0x1e7a51}),_0xc7ac3a=_0x4391f7['map'](_0x1dedcc=>ee(_0x12877d[_0x485123(0x1f9)]['comments'][_0x1dedcc],_0x12bf9f,_0x307613))[_0x485123(0x1c6)](Boolean);return Object['values'](_0x12877d[_0x485123(0x1f9)][_0x485123(0x1fc)])['forEach'](_0x3d5b6b=>{const _0x461333=_0x485123;this[_0x461333(0x1bd)]['addUser'](_0x3d5b6b);}),_0xc7ac3a;}[_0x5b9be5(0x1f4)](_0x4f3a4d){const _0x2b41cc=_0x5b9be5;return{'id':_0x4f3a4d['id'],'threadId':_0x4f3a4d[_0x2b41cc(0x1ff)],'ref':_0x4f3a4d[_0x2b41cc(0x1b3)]};}};S=Q([b(0x0,_0x5621ab(_0x3797c5)),b(0x1,_0x5621ab(_0x57ff03)),b(0x2,_0x5621ab(_0x55b756))],S);var re=Object[_0x5b9be5(0x1f8)],te=(_0x10641a,_0x98c72c,_0x1b8ce5,_0x50777d)=>{const _0x2b7e29=_0x5b9be5;for(var _0x40f628=_0x50777d>0x1?void 0x0:_0x50777d?re(_0x98c72c,_0x1b8ce5):_0x98c72c,_0x4c022c=_0x10641a[_0x2b7e29(0x1ce)]-0x1,_0x359994;_0x4c022c>=0x0;_0x4c022c--)(_0x359994=_0x10641a[_0x4c022c])&&(_0x40f628=_0x359994(_0x40f628)||_0x40f628);return _0x40f628;},M=(_0x4ca192,_0xd23b88)=>(_0x371337,_0x40ab45)=>_0xd23b88(_0x371337,_0x40ab45,_0x4ca192);let f=class extends _0x22ac0d{constructor(_0x115e53,_0x5b6386){const _0x661df2=_0x5b9be5;super(),this[_0x661df2(0x1e4)]=_0x115e53,this['_threadCommentDataSource']=_0x5b6386,this[_0x661df2(0x1b0)]();}[_0x5b9be5(0x1b0)](){const _0x488f69=_0x5b9be5;this[_0x488f69(0x1e4)][_0x488f69(0x212)]=this[_0x488f69(0x1d6)],this[_0x488f69(0x1e4)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x16527e),M(0x1,_0x5621ab(S))],f);var se=Object[_0x5b9be5(0x1be)],oe=Object[_0x5b9be5(0x1f8)],ne=(_0x13bd55,_0x457f99,_0x3cd859)=>_0x457f99 in _0x13bd55?se(_0x13bd55,_0x457f99,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3cd859}):_0x13bd55[_0x457f99]=_0x3cd859,ie=(_0x48bc2a,_0x27af71,_0x134ceb,_0x8f50ca)=>{const _0x5e3fe4=_0x5b9be5;for(var _0x2ca741=_0x8f50ca>0x1?void 0x0:_0x8f50ca?oe(_0x27af71,_0x134ceb):_0x27af71,_0x5b4d1d=_0x48bc2a[_0x5e3fe4(0x1ce)]-0x1,_0x23bb3d;_0x5b4d1d>=0x0;_0x5b4d1d--)(_0x23bb3d=_0x48bc2a[_0x5b4d1d])&&(_0x2ca741=_0x23bb3d(_0x2ca741)||_0x2ca741);return _0x2ca741;},N=(_0x137568,_0x55c42e)=>(_0x5db424,_0x465f5b)=>_0x55c42e(_0x5db424,_0x465f5b,_0x137568),$=(_0x291e9c,_0x22928c,_0x26ec7e)=>ne(_0x291e9c,typeof _0x22928c!=_0x5b9be5(0x1cc)?_0x22928c+'':_0x22928c,_0x26ec7e);let g=class extends _0x2bb13{constructor(_0x2b38c4=O,_0xb9eeb3,_0x38ca57){const _0x1a20ec=_0x5b9be5;super(),this['_config']=_0x2b38c4,this['_injector']=_0xb9eeb3,this[_0x1a20ec(0x1d2)]=_0x38ca57;const {..._0x599ef4}=_0x108311({},O,this[_0x1a20ec(0x211)]);this[_0x1a20ec(0x1d2)][_0x1a20ec(0x206)](z,_0x599ef4);}[_0x5b9be5(0x1fa)](){const _0x279704=_0x5b9be5;[[S],[f],[_]][_0x279704(0x1d4)](_0x51a9b0=>{const _0x2b2494=_0x279704;this['_injector'][_0x2b2494(0x1b2)](_0x51a9b0);});}[_0x5b9be5(0x1d1)](){const _0x1cf036=_0x5b9be5;this[_0x1cf036(0x1d3)][_0x1cf036(0x1ab)](f),this[_0x1cf036(0x1d3)][_0x1cf036(0x1ab)](_);}};$(g,_0x5b9be5(0x1ef),W),$(g,_0x5b9be5(0x1f1),_0x801f8b[_0x5b9be5(0x201)]),g=ie([_0x1dd896(_0x39a911,_0x78b621,_0x2f2b47),N(0x1,_0x5621ab(_0x4dc61e)),N(0x2,_0x47c18a)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1b503f=_0x53d2;(function(_0x5ecad4,_0x1ce279){const _0x4e49bf=_0x53d2,_0x29d002=_0x5ecad4();while(!![]){try{const _0x37fd48=-parseInt(_0x4e49bf(0x23b))/0x1+parseInt(_0x4e49bf(0x21b))/0x2+parseInt(_0x4e49bf(0x1ee))/0x3+parseInt(_0x4e49bf(0x226))/0x4*(-parseInt(_0x4e49bf(0x206))/0x5)+-parseInt(_0x4e49bf(0x223))/0x6+parseInt(_0x4e49bf(0x22d))/0x7*(-parseInt(_0x4e49bf(0x1eb))/0x8)+-parseInt(_0x4e49bf(0x1f0))/0x9*(-parseInt(_0x4e49bf(0x228))/0xa);if(_0x37fd48===_0x1ce279)break;else _0x29d002['push'](_0x29d002['shift']());}catch(_0x36ac3f){_0x29d002['push'](_0x29d002['shift']());}}}(_0x5491,0x3fd84));import{CommentService as _0x177479,CollaborationSessionService as _0x5d29c3,UniverCollaborationClientPlugin as _0x4ac8a8}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x54b9da}from'@univerjs-pro/license';import{dayjs as _0x5b328b,UserManagerService as _0x27b619,Inject as _0xe56929,Injector as _0x323c4c,Disposable as _0x496c11,CustomRangeType as _0x1a50f9,UniverInstanceType as _0x4ce168,DependentOn as _0x422474,IConfigService as _0x3cb82c,Plugin as _0x55d139,merge as _0xd65155}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x181ffd}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x34daab,IThreadCommentDataSourceService as _0x51dd11}from'@univerjs/thread-comment';import{bufferTime as _0x487d8e}from'rxjs';function _0x5491(){const _0x3cc461=['solved','35NuGFLm','getComment','map','slice','_httpService','/add','userID','_userService','Unknown','_config','Add','_configService','values','stringify','516782dtHjKf','userId','Solve','_injector','dataSource','body','error','delete','rangeType','replyId','resolved','length','_commentService','_threadCommentModel','/edit','185608fqMmaa','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','119997Jlgsit','size','12303CqawDH','deleteComment','commentUpdate$','requireSession','disposeWithMe','UNRECOGNIZED','resolveComment','onReady','updateComment','type','get','Solved','_threadCommentDataSourceService','symbol','root','find','_initUserSync','OpenOrReOpen','getOwnPropertyDescriptor','syncUpdateMutationToColla','ref','/reply','2311115sPwUbB','_init','rangeId','comments','add','code','_initDataSource','forEach','threadId','content','thread-comment-data-source.config','getUser','setConfig','user','replies','comment','Edit','parentId','Reply','Delete','createTimestamp','919058sOfUAk','addComment','format','onStarting','post','addUser','reply','getMemberID','2182446wvnrOQ','_threadCommentDataSource','/universer-api/comment/unit/','4OqzOCN','_sessionService','8930viHjRA','customRanges','/solved','parse'];_0x5491=function(){return _0x3cc461;};return _0x5491();}import{HTTPService as _0x4b3a69}from'@univerjs/network';const W=_0x1b503f(0x1ed);var I=(_0xf2fff0=>(_0xf2fff0[_0xf2fff0[_0x1b503f(0x201)]=0x0]=_0x1b503f(0x201),_0xf2fff0[_0xf2fff0[_0x1b503f(0x1fb)]=0x1]=_0x1b503f(0x1fb),_0xf2fff0[_0xf2fff0[_0x1b503f(0x1f5)]=-0x1]=_0x1b503f(0x1f5),_0xf2fff0))(I||{}),v=(_0x37b9a2=>(_0x37b9a2[_0x37b9a2[_0x1b503f(0x235)]=0x0]=_0x1b503f(0x235),_0x37b9a2[_0x37b9a2[_0x1b503f(0x237)]=0x1]=_0x1b503f(0x237),_0x37b9a2[_0x37b9a2[_0x1b503f(0x218)]=0x2]=_0x1b503f(0x218),_0x37b9a2[_0x37b9a2[_0x1b503f(0x216)]=0x3]=_0x1b503f(0x216),_0x37b9a2[_0x37b9a2[_0x1b503f(0x219)]=0x4]='Delete',_0x37b9a2[_0x37b9a2[_0x1b503f(0x23d)]=0x5]='Solve',_0x37b9a2[_0x37b9a2[_0x1b503f(0x1f5)]=-0x1]=_0x1b503f(0x1f5),_0x37b9a2))(v||{});const y=_0x1c2e89=>_0x5b328b(new Date(+_0x1c2e89))[_0x1b503f(0x21d)]('YYYY/MM/DD\x20HH:mm'),B=async(_0xc81d1c,_0x561816)=>{const _0x3a5f86=_0x1b503f,_0x2a6bcb=_0xc81d1c['get'](_0x27b619),_0x36d59e=_0xc81d1c['get'](_0x4b3a69);_0x561816[_0x3a5f86(0x20d)](_0xb2e873=>{const _0x3a3acb=_0x3a5f86;_0x2a6bcb[_0x3a3acb(0x211)](_0xb2e873)&&_0x561816[_0x3a3acb(0x1e3)](_0xb2e873);}),_0x561816[_0x3a5f86(0x1ef)]&&(await _0x36d59e[_0x3a5f86(0x1fa)]('/universer-api/user/list',{'params':{'userIDs':[..._0x561816]}}))['body'][_0x3a5f86(0x1ec)][_0x3a5f86(0x20d)](_0x43e85f=>{const _0x415732=_0x3a5f86;_0x43e85f&&_0x2a6bcb[_0x415732(0x220)](_0x43e85f);});};var K=Object[_0x1b503f(0x202)],V=(_0x387c97,_0x5c32d4,_0x428338,_0x5f41b7)=>{for(var _0xf0b265=_0x5f41b7>0x1?void 0x0:_0x5f41b7?K(_0x5c32d4,_0x428338):_0x5c32d4,_0x1395d6=_0x387c97['length']-0x1,_0x1bb40a;_0x1395d6>=0x0;_0x1395d6--)(_0x1bb40a=_0x387c97[_0x1395d6])&&(_0xf0b265=_0x1bb40a(_0xf0b265)||_0xf0b265);return _0xf0b265;},p=(_0x2fc504,_0x5c1669)=>(_0x2e4e18,_0x5f1862)=>_0x5c1669(_0x2e4e18,_0x5f1862,_0x2fc504);let _=class extends _0x496c11{constructor(_0x14c945,_0x1836d1,_0x3ec5a8,_0x27aa08){const _0x4f27a5=_0x1b503f;super(),this[_0x4f27a5(0x1e8)]=_0x14c945,this[_0x4f27a5(0x1e9)]=_0x1836d1,this['_userService']=_0x3ec5a8,this[_0x4f27a5(0x23e)]=_0x27aa08,this[_0x4f27a5(0x207)](),this[_0x4f27a5(0x200)]();}['_initUserSync'](){const _0x4cb21d=_0x1b503f;this[_0x4cb21d(0x1f4)](this[_0x4cb21d(0x1e9)][_0x4cb21d(0x1f2)]['pipe'](_0x487d8e(0x10))['subscribe'](_0x33590f=>{const _0x3e36e9=_0x4cb21d,_0x5b166c=new Set();_0x33590f[_0x3e36e9(0x20d)](_0x37ba4c=>{const _0x1133f2=_0x3e36e9;switch(_0x37ba4c[_0x1133f2(0x1f9)]){case _0x1133f2(0x20a):{const _0x330e8d=_0x37ba4c['payload']['personId'];_0x5b166c[_0x1133f2(0x20a)](_0x330e8d);break;}}}),B(this['_injector'],_0x5b166c);}));}[_0x1b503f(0x207)](){const _0x20b5b2=_0x1b503f;this['disposeWithMe'](this[_0x20b5b2(0x1e8)][_0x20b5b2(0x1f2)]['subscribe'](async _0x16eda5=>{const _0x56ef1b=_0x20b5b2;var _0x458bf3,_0xd96ddd,_0x4f9b16,_0x3ed873;const _0xb15ac0=(_0x458bf3=this[_0x56ef1b(0x1e9)]['getUnit'](_0x16eda5['unitId'])[_0x56ef1b(0x1ff)](_0x2752bb=>_0x2752bb['threadId']===_0x16eda5['threadId']))==null?void 0x0:_0x458bf3['root'];if(!_0xb15ac0)return;const {unitId:_0x23a6ff,subUnitId:_0x153a0a}=_0xb15ac0;switch(_0x16eda5[_0x56ef1b(0x213)]&&this[_0x56ef1b(0x234)][_0x56ef1b(0x220)](_0x16eda5[_0x56ef1b(0x213)]),_0x16eda5[_0x56ef1b(0x1f9)]){case v[_0x56ef1b(0x237)]:break;case v[_0x56ef1b(0x218)]:{this['_threadCommentModel'][_0x56ef1b(0x21c)](_0x23a6ff,_0x153a0a,{'unitId':_0x23a6ff,'subUnitId':_0x153a0a,'ref':'','id':_0x16eda5[_0x56ef1b(0x1e5)],'dT':y(+_0x16eda5[_0x56ef1b(0x21a)]),'threadId':_0x16eda5[_0x56ef1b(0x20e)],'personId':(_0x4f9b16=(_0xd96ddd=_0x16eda5['user'])==null?void 0x0:_0xd96ddd[_0x56ef1b(0x233)])!=null?_0x4f9b16:_0x16eda5[_0x56ef1b(0x23c)],'text':JSON[_0x56ef1b(0x22b)](_0x16eda5[_0x56ef1b(0x20f)]),'parentId':_0xb15ac0['id']});break;}case v[_0x56ef1b(0x219)]:{const _0x5eb921=this[_0x56ef1b(0x1e9)][_0x56ef1b(0x22e)](_0x23a6ff,_0x153a0a,_0x16eda5[_0x56ef1b(0x1e5)]);_0x5eb921&&_0x5eb921[_0x56ef1b(0x217)]&&this[_0x56ef1b(0x1e9)][_0x56ef1b(0x1f1)](_0x23a6ff,_0x153a0a,_0x16eda5[_0x56ef1b(0x1e5)]);break;}case v[_0x56ef1b(0x216)]:{this[_0x56ef1b(0x1e9)][_0x56ef1b(0x1f8)](_0x23a6ff,_0x153a0a,{'commentId':_0x16eda5[_0x56ef1b(0x1e5)],'text':JSON[_0x56ef1b(0x22b)](_0x16eda5[_0x56ef1b(0x20f)])});break;}case v[_0x56ef1b(0x23d)]:{const _0x3a9c54=(_0x3ed873=this[_0x56ef1b(0x1e9)]['getUnit'](_0x16eda5['unitId'])[_0x56ef1b(0x1ff)](_0x55c33d=>_0x55c33d[_0x56ef1b(0x20e)]===_0x16eda5[_0x56ef1b(0x20e)]))==null?void 0x0:_0x3ed873[_0x56ef1b(0x1fe)];_0x3a9c54&&this['_threadCommentModel'][_0x56ef1b(0x1f6)](_0x23a6ff,_0x153a0a,_0x3a9c54['id'],_0x16eda5['solved']===I[_0x56ef1b(0x1fb)]);break;}}}));}};_=V([p(0x0,_0xe56929(_0x177479)),p(0x1,_0xe56929(_0x34daab)),p(0x2,_0xe56929(_0x27b619)),p(0x3,_0xe56929(_0x323c4c))],_);const z=_0x1b503f(0x210),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1f24c0,_0xf3bd,_0x28f0f0,_0x2e75bb)=>{const _0xb8a12a=_0x1b503f;for(var _0x48e1eb=_0x2e75bb>0x1?void 0x0:_0x2e75bb?k(_0xf3bd,_0x28f0f0):_0xf3bd,_0x515e7d=_0x1f24c0[_0xb8a12a(0x1e7)]-0x1,_0x3ddbfb;_0x515e7d>=0x0;_0x515e7d--)(_0x3ddbfb=_0x1f24c0[_0x515e7d])&&(_0x48e1eb=_0x3ddbfb(_0x48e1eb)||_0x48e1eb);return _0x48e1eb;},b=(_0x342fff,_0x44dcd2)=>(_0xd804f3,_0x3c2e2b)=>_0x44dcd2(_0xd804f3,_0x3c2e2b,_0x342fff);function X(_0x480133,_0x29c503){const _0x525730=_0x1b503f,_0x5464c1=_0x480133[_0x525730(0x214)][0x0];return{..._0x29c503,'id':_0x5464c1['replyId'],'resolved':_0x480133[_0x525730(0x22c)]===0x1,'dT':y(_0x5464c1['createTimestamp']),'personId':_0x5464c1[_0x525730(0x23c)],'threadId':_0x5464c1[_0x525730(0x20e)]};}function ee(_0x409c40,_0x206ede,_0x172d6b){const _0x3ddf74=_0x1b503f;var _0x53b8bd,_0x5f5593;if(((_0x5f5593=(_0x53b8bd=_0x409c40==null?void 0x0:_0x409c40[_0x3ddf74(0x214)])==null?void 0x0:_0x53b8bd['length'])!=null?_0x5f5593:0x0)>0x0){const _0x18da36=(_0x12305d,_0x343833)=>({'id':_0x12305d['replyId'],'threadId':_0x12305d[_0x3ddf74(0x20e)],'dT':y(_0x12305d[_0x3ddf74(0x21a)]),'personId':_0x12305d[_0x3ddf74(0x23c)],'resolved':_0x409c40[_0x3ddf74(0x22c)]===I[_0x3ddf74(0x1fb)],'unitId':_0x206ede,'subUnitId':_0x172d6b,'text':JSON[_0x3ddf74(0x22b)](_0x12305d['content']),'parentId':_0x343833}),_0x16582e=_0x18da36(_0x409c40[_0x3ddf74(0x214)][0x0]);return{..._0x16582e,'children':_0x409c40['replies'][_0x3ddf74(0x230)](0x1)[_0x3ddf74(0x22f)](_0x498e08=>_0x18da36(_0x498e08,_0x16582e['id']))};}return null;}function _0x53d2(_0x2f8f1d,_0x3438e8){_0x2f8f1d=_0x2f8f1d-0x1e0;const _0x5491da=_0x5491();let _0x53d231=_0x5491da[_0x2f8f1d];return _0x53d231;}let S=class{constructor(_0x208ca2,_0xb7c40e,_0x2b4bcd){const _0x31a10c=_0x1b503f;this[_0x31a10c(0x231)]=_0x208ca2,this['_userService']=_0xb7c40e,this['_sessionService']=_0x2b4bcd;}async[_0x1b503f(0x21c)](_0x3a8e1e){const _0x387822=_0x1b503f;var _0x9a661d,_0x13e52b;const {parentId:_0x27a3df,unitId:_0x142237,text:_0xc8886c,threadId:_0x269136}=_0x3a8e1e,_0xd3b4d=(_0x13e52b=(_0x9a661d=_0xc8886c[_0x387822(0x229)])==null?void 0x0:_0x9a661d['filter'](_0x2f7eb3=>_0x2f7eb3[_0x387822(0x1e4)]===_0x1a50f9['COMMENT'])[_0x387822(0x22f)](_0x1c1b48=>_0x1c1b48[_0x387822(0x208)]))!=null?_0x13e52b:[],_0x49d2d5=JSON[_0x387822(0x23a)](_0xc8886c),_0x300ebf=(await this[_0x387822(0x227)][_0x387822(0x1f3)](_0x142237))[_0x387822(0x222)]();if(_0x27a3df){const _0x3167b1={'memberId':_0x300ebf,'unitId':_0x142237,'content':_0x49d2d5,'mention':_0xd3b4d,'threadId':_0x269136},_0x1b0851=(await this[_0x387822(0x231)][_0x387822(0x21f)](_0x387822(0x225)+_0x142237+_0x387822(0x205),{'body':_0x3167b1}))[_0x387822(0x1e1)][_0x387822(0x221)];return{..._0x3a8e1e,'id':_0x1b0851['replyId'],'dT':_0x5b328b(+_0x1b0851[_0x387822(0x21a)])[_0x387822(0x21d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1b0851[_0x387822(0x23c)]};}else{const _0x35be21={'memberId':_0x300ebf,'unitId':_0x142237,'content':_0x49d2d5,'mention':_0xd3b4d},_0x15fbab=await this[_0x387822(0x231)][_0x387822(0x21f)](_0x387822(0x225)+_0x142237+_0x387822(0x232),{'body':_0x35be21});return X(_0x15fbab['body'][_0x387822(0x215)],_0x3a8e1e);}}async['updateComment'](_0x260b35){const _0x5bf4f1=_0x1b503f;var _0x48ba6d,_0x2c4f10;const {text:_0x3e7bb0,unitId:_0x247ca6}=_0x260b35,_0xa1342a=(_0x2c4f10=(_0x48ba6d=_0x3e7bb0[_0x5bf4f1(0x229)])==null?void 0x0:_0x48ba6d['filter'](_0x308644=>_0x308644['rangeType']===_0x1a50f9['COMMENT'])[_0x5bf4f1(0x22f)](_0x20dca1=>_0x20dca1[_0x5bf4f1(0x208)]))!=null?_0x2c4f10:[],_0x45370b=JSON[_0x5bf4f1(0x23a)](_0x3e7bb0),_0x4be793=_0x260b35[_0x5bf4f1(0x20e)],_0x2a397e=_0x260b35['id'],_0x146dfa={'memberId':(await this[_0x5bf4f1(0x227)][_0x5bf4f1(0x1f3)](_0x247ca6))[_0x5bf4f1(0x222)](),'unitId':_0x247ca6,'threadId':_0x4be793,'mention':_0xa1342a,'content':_0x45370b,'replyId':_0x2a397e},_0xc37f2c=await this['_httpService'][_0x5bf4f1(0x21f)](_0x5bf4f1(0x225)+_0x247ca6+_0x5bf4f1(0x1ea),{'body':_0x146dfa});return!_0xc37f2c[_0x5bf4f1(0x1e1)]['error']||_0xc37f2c[_0x5bf4f1(0x1e1)][_0x5bf4f1(0x1e2)][_0x5bf4f1(0x20b)]===0x1;}async[_0x1b503f(0x1f6)](_0x32dd47){const _0x2e6f93=_0x1b503f,{unitId:_0xe790bb}=_0x32dd47,_0x28583f=_0x32dd47['threadId'],_0x4a030b={'memberId':this[_0x2e6f93(0x234)]['getCurrentUser']()[_0x2e6f93(0x233)],'unitId':_0xe790bb,'threadId':_0x28583f,'solved':_0x32dd47[_0x2e6f93(0x1e6)]?I['Solved']:I[_0x2e6f93(0x201)]},_0x16ef5a=await this[_0x2e6f93(0x231)][_0x2e6f93(0x21f)](_0x2e6f93(0x225)+_0xe790bb+_0x2e6f93(0x22a),{'body':_0x4a030b});return!_0x16ef5a[_0x2e6f93(0x1e1)][_0x2e6f93(0x1e2)]||_0x16ef5a[_0x2e6f93(0x1e1)][_0x2e6f93(0x1e2)][_0x2e6f93(0x20b)]===0x1;}async[_0x1b503f(0x1f1)](_0x162970,_0x2917ac,_0x44e83f,_0x49a38c){const _0x18cacb=_0x1b503f,_0x277b2c={'memberId':(await this[_0x18cacb(0x227)]['requireSession'](_0x162970))[_0x18cacb(0x222)](),'threadId':_0x44e83f,'replyId':_0x49a38c,'unitId':_0x162970},_0x54a4a7=await this[_0x18cacb(0x231)][_0x18cacb(0x21f)](_0x18cacb(0x225)+_0x162970+'/delete',{'body':_0x277b2c});return!_0x54a4a7[_0x18cacb(0x1e1)][_0x18cacb(0x1e2)]||_0x54a4a7['body'][_0x18cacb(0x1e2)][_0x18cacb(0x20b)]===0x1;}async['listComments'](_0xc26da1,_0x353bf2,_0x1474c8){const _0x368d91=_0x1b503f,_0x508603={'unitId':_0xc26da1,'threadId':_0x1474c8},_0x2160e7=await this['_httpService'][_0x368d91(0x21f)](_0x368d91(0x225)+_0xc26da1+'/list',{'body':_0x508603}),_0x171654=_0x1474c8[_0x368d91(0x22f)](_0x5d3b17=>ee(_0x2160e7[_0x368d91(0x1e1)][_0x368d91(0x209)][_0x5d3b17],_0xc26da1,_0x353bf2))['filter'](Boolean);return Object[_0x368d91(0x239)](_0x2160e7[_0x368d91(0x1e1)][_0x368d91(0x1ec)])['forEach'](_0x26e897=>{const _0x55d431=_0x368d91;this['_userService'][_0x55d431(0x220)](_0x26e897);}),_0x171654;}['saveCommentToSnapshot'](_0x31fc68){const _0x323f5d=_0x1b503f;return{'id':_0x31fc68['id'],'threadId':_0x31fc68[_0x323f5d(0x20e)],'ref':_0x31fc68[_0x323f5d(0x204)]};}};S=Q([b(0x0,_0xe56929(_0x4b3a69)),b(0x1,_0xe56929(_0x27b619)),b(0x2,_0xe56929(_0x5d29c3))],S);var re=Object[_0x1b503f(0x202)],te=(_0x31308c,_0x519ab1,_0x1537c5,_0x488aae)=>{const _0x23851c=_0x1b503f;for(var _0x9a3f9e=_0x488aae>0x1?void 0x0:_0x488aae?re(_0x519ab1,_0x1537c5):_0x519ab1,_0x5022eb=_0x31308c[_0x23851c(0x1e7)]-0x1,_0x51df2c;_0x5022eb>=0x0;_0x5022eb--)(_0x51df2c=_0x31308c[_0x5022eb])&&(_0x9a3f9e=_0x51df2c(_0x9a3f9e)||_0x9a3f9e);return _0x9a3f9e;},M=(_0x47f1ee,_0x349640)=>(_0x4c5a6a,_0x287107)=>_0x349640(_0x4c5a6a,_0x287107,_0x47f1ee);let f=class extends _0x496c11{constructor(_0x1641f1,_0x3b57a5){const _0x57bb5d=_0x1b503f;super(),this[_0x57bb5d(0x1fc)]=_0x1641f1,this[_0x57bb5d(0x224)]=_0x3b57a5,this[_0x57bb5d(0x20c)]();}[_0x1b503f(0x20c)](){const _0x3ad9e5=_0x1b503f;this[_0x3ad9e5(0x1fc)][_0x3ad9e5(0x1e0)]=this[_0x3ad9e5(0x224)],this[_0x3ad9e5(0x1fc)][_0x3ad9e5(0x203)]=!0x1;}};f=te([M(0x0,_0x51dd11),M(0x1,_0xe56929(S))],f);var se=Object['defineProperty'],oe=Object[_0x1b503f(0x202)],ne=(_0x1d8a02,_0x18bf9c,_0x4def72)=>_0x18bf9c in _0x1d8a02?se(_0x1d8a02,_0x18bf9c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4def72}):_0x1d8a02[_0x18bf9c]=_0x4def72,ie=(_0x5a19ac,_0x2db807,_0x5a85c7,_0x3253ec)=>{const _0x570c8=_0x1b503f;for(var _0x470026=_0x3253ec>0x1?void 0x0:_0x3253ec?oe(_0x2db807,_0x5a85c7):_0x2db807,_0x367189=_0x5a19ac[_0x570c8(0x1e7)]-0x1,_0x4e6bb1;_0x367189>=0x0;_0x367189--)(_0x4e6bb1=_0x5a19ac[_0x367189])&&(_0x470026=_0x4e6bb1(_0x470026)||_0x470026);return _0x470026;},N=(_0x5e90f2,_0x9bac7)=>(_0x5c2926,_0x28cdbd)=>_0x9bac7(_0x5c2926,_0x28cdbd,_0x5e90f2),$=(_0x3800b3,_0x502271,_0x56d1c4)=>ne(_0x3800b3,typeof _0x502271!=_0x1b503f(0x1fd)?_0x502271+'':_0x502271,_0x56d1c4);let g=class extends _0x55d139{constructor(_0x7eeebc=O,_0xf478b9,_0x2abb97){const _0x11c674=_0x1b503f;super(),this[_0x11c674(0x236)]=_0x7eeebc,this[_0x11c674(0x23e)]=_0xf478b9,this[_0x11c674(0x238)]=_0x2abb97;const {..._0x2a40dc}=_0xd65155({},O,this[_0x11c674(0x236)]);this[_0x11c674(0x238)][_0x11c674(0x212)](z,_0x2a40dc);}[_0x1b503f(0x21e)](){[[S],[f],[_]]['forEach'](_0x38d0ce=>{const _0x38b66d=_0x53d2;this[_0x38b66d(0x23e)][_0x38b66d(0x20a)](_0x38d0ce);});}[_0x1b503f(0x1f7)](){const _0x53289e=_0x1b503f;this[_0x53289e(0x23e)][_0x53289e(0x1fa)](f),this[_0x53289e(0x23e)][_0x53289e(0x1fa)](_);}};$(g,'pluginName',W),$(g,_0x1b503f(0x1f9),_0x4ce168['UNIVER_UNKNOWN']),g=ie([_0x422474(_0x181ffd,_0x4ac8a8,_0x54b9da),N(0x1,_0xe56929(_0x323c4c)),N(0x2,_0x3cb82c)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5b9be5=_0x3c81;(function(_0xf7d31a,_0x25c980){const _0x22744f=_0x3c81,_0x3cda87=_0xf7d31a();while(!![]){try{const _0x155bc3=parseInt(_0x22744f(0x1fd))/0x1*(parseInt(_0x22744f(0x208))/0x2)+-parseInt(_0x22744f(0x1ee))/0x3+-parseInt(_0x22744f(0x1dd))/0x4+-parseInt(_0x22744f(0x1cf))/0x5*(parseInt(_0x22744f(0x1e3))/0x6)+-parseInt(_0x22744f(0x1ed))/0x7*(-parseInt(_0x22744f(0x1eb))/0x8)+-parseInt(_0x22744f(0x1e7))/0x9+parseInt(_0x22744f(0x1b8))/0xa*(parseInt(_0x22744f(0x1e8))/0xb);if(_0x155bc3===_0x25c980)break;else _0x3cda87['push'](_0x3cda87['shift']());}catch(_0x5c13b7){_0x3cda87['push'](_0x3cda87['shift']());}}}(_0xfaa5,0xee006));import{CommentService as _0xf448c6,CollaborationSessionService as _0x55b756,UniverCollaborationClientPlugin as _0x78b621}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2f2b47}from'@univerjs-pro/license';import{dayjs as _0x701736,UserManagerService as _0x57ff03,Inject as _0x5621ab,Injector as _0x4dc61e,Disposable as _0x22ac0d,CustomRangeType as _0x3596e0,UniverInstanceType as _0x801f8b,DependentOn as _0x1dd896,IConfigService as _0x47c18a,Plugin as _0x2bb13,merge as _0x108311}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x39a911}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b7bdb,IThreadCommentDataSourceService as _0x16527e}from'@univerjs/thread-comment';import{bufferTime as _0x49bcc3}from'rxjs';function _0x3c81(_0x380fdf,_0x53ac72){_0x380fdf=_0x380fdf-0x1ab;const _0xfaa592=_0xfaa5();let _0x3c8117=_0xfaa592[_0x380fdf];return _0x3c8117;}import{HTTPService as _0x3797c5}from'@univerjs/network';const W=_0x5b9be5(0x20e);var I=(_0x1290ef=>(_0x1290ef[_0x1290ef[_0x5b9be5(0x20c)]=0x0]=_0x5b9be5(0x20c),_0x1290ef[_0x1290ef[_0x5b9be5(0x1ad)]=0x1]=_0x5b9be5(0x1ad),_0x1290ef[_0x1290ef['UNRECOGNIZED']=-0x1]=_0x5b9be5(0x1f3),_0x1290ef))(I||{}),v=(_0x550a5a=>(_0x550a5a[_0x550a5a['Unknown']=0x0]=_0x5b9be5(0x20f),_0x550a5a[_0x550a5a[_0x5b9be5(0x1c2)]=0x1]='Add',_0x550a5a[_0x550a5a[_0x5b9be5(0x1bc)]=0x2]='Reply',_0x550a5a[_0x550a5a[_0x5b9be5(0x1bb)]=0x3]='Edit',_0x550a5a[_0x550a5a[_0x5b9be5(0x1f6)]=0x4]=_0x5b9be5(0x1f6),_0x550a5a[_0x550a5a[_0x5b9be5(0x1ec)]=0x5]='Solve',_0x550a5a[_0x550a5a[_0x5b9be5(0x1f3)]=-0x1]=_0x5b9be5(0x1f3),_0x550a5a))(v||{});const y=_0x585a19=>_0x701736(new Date(+_0x585a19))[_0x5b9be5(0x20d)](_0x5b9be5(0x203)),B=async(_0xd2cd18,_0x47f3ac)=>{const _0x4989f5=_0x5b9be5,_0x595bd4=_0xd2cd18[_0x4989f5(0x1ab)](_0x57ff03),_0x3f4258=_0xd2cd18[_0x4989f5(0x1ab)](_0x3797c5);_0x47f3ac[_0x4989f5(0x1d4)](_0x1ed6cb=>{const _0x1a8bef=_0x4989f5;_0x595bd4[_0x1a8bef(0x1ae)](_0x1ed6cb)&&_0x47f3ac[_0x1a8bef(0x1f7)](_0x1ed6cb);}),_0x47f3ac[_0x4989f5(0x202)]&&(await _0x3f4258[_0x4989f5(0x1ab)](_0x4989f5(0x1bf),{'params':{'userIDs':[..._0x47f3ac]}}))[_0x4989f5(0x1f9)][_0x4989f5(0x1fc)][_0x4989f5(0x1d4)](_0x298a90=>{const _0x1aa94a=_0x4989f5;_0x298a90&&_0x595bd4[_0x1aa94a(0x1e5)](_0x298a90);});};var K=Object[_0x5b9be5(0x1f8)],V=(_0x2e2b0e,_0x1fbe14,_0x103960,_0x7200b3)=>{const _0x145314=_0x5b9be5;for(var _0x2587ce=_0x7200b3>0x1?void 0x0:_0x7200b3?K(_0x1fbe14,_0x103960):_0x1fbe14,_0x1482a4=_0x2e2b0e[_0x145314(0x1ce)]-0x1,_0x242cb4;_0x1482a4>=0x0;_0x1482a4--)(_0x242cb4=_0x2e2b0e[_0x1482a4])&&(_0x2587ce=_0x242cb4(_0x2587ce)||_0x2587ce);return _0x2587ce;},p=(_0x4077f3,_0x4b45b1)=>(_0x51b0ee,_0x2a7e87)=>_0x4b45b1(_0x51b0ee,_0x2a7e87,_0x4077f3);function _0xfaa5(){const _0x2b54a9=['unitId','3398202wIafnX','16437157obqItR','createTimestamp','_httpService','13157032sTKawS','Solve','7tXDYco','5502702lKHlYS','pluginName','solved','type','/add','UNRECOGNIZED','saveCommentToSnapshot','customRanges','Delete','delete','getOwnPropertyDescriptor','body','onStarting','/universer-api/comment/unit/','users','63101IOKQjk','updateComment','threadId','rangeId','UNIVER_UNKNOWN','size','YYYY/MM/DD\x20HH:mm','replies','user','setConfig','error','50Rmhqlm','pipe','slice','find','OpenOrReOpen','format','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Unknown','/edit','_config','dataSource','reply','get','disposeWithMe','Solved','getUser','comment','_initDataSource','stringify','add','ref','content','subscribe','_commentService','requireSession','10GxvSiq','_initUserSync','resolved','Edit','Reply','_userService','defineProperty','/universer-api/user/list','_threadCommentModel','code','Add','/reply','payload','_sessionService','filter','/solved','_init','replyId','commentUpdate$','COMMENT','symbol','post','length','359895rlmEeq','rangeType','onReady','_configService','_injector','forEach','userId','_threadCommentDataSource','resolveComment','deleteComment','parse','parentId','getCurrentUser','getMemberID','5831184PMRFNj','getComment','root','addComment','map','getUnit','6XOUaRZ','_threadCommentDataSourceService','addUser'];_0xfaa5=function(){return _0x2b54a9;};return _0xfaa5();}let _=class extends _0x22ac0d{constructor(_0x235bdb,_0x484a42,_0xfeb682,_0x4009f0){const _0x463d60=_0x5b9be5;super(),this['_commentService']=_0x235bdb,this['_threadCommentModel']=_0x484a42,this[_0x463d60(0x1bd)]=_0xfeb682,this[_0x463d60(0x1d3)]=_0x4009f0,this[_0x463d60(0x1c8)](),this[_0x463d60(0x1b9)]();}[_0x5b9be5(0x1b9)](){const _0x4eb4c6=_0x5b9be5;this[_0x4eb4c6(0x1ac)](this[_0x4eb4c6(0x1c0)][_0x4eb4c6(0x1ca)][_0x4eb4c6(0x209)](_0x49bcc3(0x10))[_0x4eb4c6(0x1b5)](_0x330e68=>{const _0xf1c853=_0x4eb4c6,_0x5d1b89=new Set();_0x330e68[_0xf1c853(0x1d4)](_0x20194f=>{const _0x362f94=_0xf1c853;switch(_0x20194f[_0x362f94(0x1f1)]){case _0x362f94(0x1b2):{const _0x2ddff6=_0x20194f[_0x362f94(0x1c4)]['personId'];_0x5d1b89['add'](_0x2ddff6);break;}}}),B(this['_injector'],_0x5d1b89);}));}[_0x5b9be5(0x1c8)](){const _0x388773=_0x5b9be5;this['disposeWithMe'](this[_0x388773(0x1b6)][_0x388773(0x1ca)]['subscribe'](async _0x1aa870=>{const _0x57905f=_0x388773;var _0x4f6f8e,_0x472e79,_0x374eeb,_0x4fe717;const _0x45d476=(_0x4f6f8e=this['_threadCommentModel']['getUnit'](_0x1aa870['unitId'])[_0x57905f(0x20b)](_0x1104f0=>_0x1104f0[_0x57905f(0x1ff)]===_0x1aa870[_0x57905f(0x1ff)]))==null?void 0x0:_0x4f6f8e[_0x57905f(0x1df)];if(!_0x45d476)return;const {unitId:_0x4fca5b,subUnitId:_0x24b5b2}=_0x45d476;switch(_0x1aa870[_0x57905f(0x205)]&&this[_0x57905f(0x1bd)][_0x57905f(0x1e5)](_0x1aa870[_0x57905f(0x205)]),_0x1aa870[_0x57905f(0x1f1)]){case v[_0x57905f(0x1c2)]:break;case v[_0x57905f(0x1bc)]:{this[_0x57905f(0x1c0)]['addComment'](_0x4fca5b,_0x24b5b2,{'unitId':_0x4fca5b,'subUnitId':_0x24b5b2,'ref':'','id':_0x1aa870[_0x57905f(0x1c9)],'dT':y(+_0x1aa870[_0x57905f(0x1e9)]),'threadId':_0x1aa870['threadId'],'personId':(_0x374eeb=(_0x472e79=_0x1aa870[_0x57905f(0x205)])==null?void 0x0:_0x472e79['userID'])!=null?_0x374eeb:_0x1aa870['userId'],'text':JSON[_0x57905f(0x1d9)](_0x1aa870[_0x57905f(0x1b4)]),'parentId':_0x45d476['id']});break;}case v[_0x57905f(0x1f6)]:{const _0x4f38d3=this[_0x57905f(0x1c0)][_0x57905f(0x1de)](_0x4fca5b,_0x24b5b2,_0x1aa870[_0x57905f(0x1c9)]);_0x4f38d3&&_0x4f38d3[_0x57905f(0x1da)]&&this[_0x57905f(0x1c0)][_0x57905f(0x1d8)](_0x4fca5b,_0x24b5b2,_0x1aa870[_0x57905f(0x1c9)]);break;}case v[_0x57905f(0x1bb)]:{this[_0x57905f(0x1c0)][_0x57905f(0x1fe)](_0x4fca5b,_0x24b5b2,{'commentId':_0x1aa870['replyId'],'text':JSON['parse'](_0x1aa870[_0x57905f(0x1b4)])});break;}case v[_0x57905f(0x1ec)]:{const _0x586eaa=(_0x4fe717=this['_threadCommentModel'][_0x57905f(0x1e2)](_0x1aa870[_0x57905f(0x1e6)])[_0x57905f(0x20b)](_0x267414=>_0x267414[_0x57905f(0x1ff)]===_0x1aa870[_0x57905f(0x1ff)]))==null?void 0x0:_0x4fe717[_0x57905f(0x1df)];_0x586eaa&&this[_0x57905f(0x1c0)][_0x57905f(0x1d7)](_0x4fca5b,_0x24b5b2,_0x586eaa['id'],_0x1aa870['solved']===I[_0x57905f(0x1ad)]);break;}}}));}};_=V([p(0x0,_0x5621ab(_0xf448c6)),p(0x1,_0x5621ab(_0x4b7bdb)),p(0x2,_0x5621ab(_0x57ff03)),p(0x3,_0x5621ab(_0x4dc61e))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x5b9be5(0x1f8)],Q=(_0xb92955,_0x42ba66,_0x20fffe,_0x364768)=>{const _0x290b6e=_0x5b9be5;for(var _0x3950a9=_0x364768>0x1?void 0x0:_0x364768?k(_0x42ba66,_0x20fffe):_0x42ba66,_0x18efc2=_0xb92955[_0x290b6e(0x1ce)]-0x1,_0x4a61c2;_0x18efc2>=0x0;_0x18efc2--)(_0x4a61c2=_0xb92955[_0x18efc2])&&(_0x3950a9=_0x4a61c2(_0x3950a9)||_0x3950a9);return _0x3950a9;},b=(_0x4730f6,_0x2ac09d)=>(_0x563512,_0x6730e)=>_0x2ac09d(_0x563512,_0x6730e,_0x4730f6);function X(_0x3d8796,_0x53f87f){const _0x205b9b=_0x5b9be5,_0x3206fa=_0x3d8796[_0x205b9b(0x204)][0x0];return{..._0x53f87f,'id':_0x3206fa[_0x205b9b(0x1c9)],'resolved':_0x3d8796[_0x205b9b(0x1f0)]===0x1,'dT':y(_0x3206fa[_0x205b9b(0x1e9)]),'personId':_0x3206fa[_0x205b9b(0x1d5)],'threadId':_0x3206fa['threadId']};}function ee(_0x7e4471,_0x1ac04d,_0x603050){const _0x263cbd=_0x5b9be5;var _0x2e4cae,_0x752089;if(((_0x752089=(_0x2e4cae=_0x7e4471==null?void 0x0:_0x7e4471[_0x263cbd(0x204)])==null?void 0x0:_0x2e4cae['length'])!=null?_0x752089:0x0)>0x0){const _0x2520c3=(_0x12308e,_0x4600b5)=>({'id':_0x12308e[_0x263cbd(0x1c9)],'threadId':_0x12308e[_0x263cbd(0x1ff)],'dT':y(_0x12308e['createTimestamp']),'personId':_0x12308e[_0x263cbd(0x1d5)],'resolved':_0x7e4471[_0x263cbd(0x1f0)]===I[_0x263cbd(0x1ad)],'unitId':_0x1ac04d,'subUnitId':_0x603050,'text':JSON[_0x263cbd(0x1d9)](_0x12308e['content']),'parentId':_0x4600b5}),_0x2b28d1=_0x2520c3(_0x7e4471[_0x263cbd(0x204)][0x0]);return{..._0x2b28d1,'children':_0x7e4471[_0x263cbd(0x204)][_0x263cbd(0x20a)](0x1)['map'](_0x21a525=>_0x2520c3(_0x21a525,_0x2b28d1['id']))};}return null;}let S=class{constructor(_0x5dd677,_0x94e7cb,_0x3e7ee5){const _0x3e898e=_0x5b9be5;this[_0x3e898e(0x1ea)]=_0x5dd677,this[_0x3e898e(0x1bd)]=_0x94e7cb,this[_0x3e898e(0x1c5)]=_0x3e7ee5;}async[_0x5b9be5(0x1e0)](_0x29121d){const _0x272739=_0x5b9be5;var _0x450768,_0x1343e2;const {parentId:_0x2872c1,unitId:_0x2393ce,text:_0x3cee84,threadId:_0x163a6f}=_0x29121d,_0x591fb1=(_0x1343e2=(_0x450768=_0x3cee84[_0x272739(0x1f5)])==null?void 0x0:_0x450768[_0x272739(0x1c6)](_0x3a7014=>_0x3a7014[_0x272739(0x1d0)]===_0x3596e0[_0x272739(0x1cb)])[_0x272739(0x1e1)](_0xfd0ce4=>_0xfd0ce4[_0x272739(0x200)]))!=null?_0x1343e2:[],_0x53664e=JSON[_0x272739(0x1b1)](_0x3cee84),_0x195d1d=(await this[_0x272739(0x1c5)]['requireSession'](_0x2393ce))['getMemberID']();if(_0x2872c1){const _0x17b23b={'memberId':_0x195d1d,'unitId':_0x2393ce,'content':_0x53664e,'mention':_0x591fb1,'threadId':_0x163a6f},_0x4ba29a=(await this['_httpService'][_0x272739(0x1cd)](_0x272739(0x1fb)+_0x2393ce+_0x272739(0x1c3),{'body':_0x17b23b}))[_0x272739(0x1f9)][_0x272739(0x213)];return{..._0x29121d,'id':_0x4ba29a[_0x272739(0x1c9)],'dT':_0x701736(+_0x4ba29a[_0x272739(0x1e9)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x4ba29a[_0x272739(0x1d5)]};}else{const _0x2fff27={'memberId':_0x195d1d,'unitId':_0x2393ce,'content':_0x53664e,'mention':_0x591fb1},_0x23d9c4=await this[_0x272739(0x1ea)][_0x272739(0x1cd)]('/universer-api/comment/unit/'+_0x2393ce+_0x272739(0x1f2),{'body':_0x2fff27});return X(_0x23d9c4[_0x272739(0x1f9)][_0x272739(0x1af)],_0x29121d);}}async[_0x5b9be5(0x1fe)](_0x483b04){const _0x59c5c5=_0x5b9be5;var _0x5bc3ed,_0x45f9e2;const {text:_0x261790,unitId:_0x25e695}=_0x483b04,_0x52c656=(_0x45f9e2=(_0x5bc3ed=_0x261790['customRanges'])==null?void 0x0:_0x5bc3ed['filter'](_0x503ba4=>_0x503ba4[_0x59c5c5(0x1d0)]===_0x3596e0[_0x59c5c5(0x1cb)])[_0x59c5c5(0x1e1)](_0x157e43=>_0x157e43['rangeId']))!=null?_0x45f9e2:[],_0x2919be=JSON[_0x59c5c5(0x1b1)](_0x261790),_0x219e9b=_0x483b04[_0x59c5c5(0x1ff)],_0x1d0b99=_0x483b04['id'],_0x5ae826={'memberId':(await this[_0x59c5c5(0x1c5)][_0x59c5c5(0x1b7)](_0x25e695))[_0x59c5c5(0x1dc)](),'unitId':_0x25e695,'threadId':_0x219e9b,'mention':_0x52c656,'content':_0x2919be,'replyId':_0x1d0b99},_0x3b5744=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x25e695+_0x59c5c5(0x210),{'body':_0x5ae826});return!_0x3b5744[_0x59c5c5(0x1f9)][_0x59c5c5(0x207)]||_0x3b5744[_0x59c5c5(0x1f9)][_0x59c5c5(0x207)]['code']===0x1;}async[_0x5b9be5(0x1d7)](_0x5eb6b5){const _0x2bc741=_0x5b9be5,{unitId:_0x1ea889}=_0x5eb6b5,_0x4950f8=_0x5eb6b5[_0x2bc741(0x1ff)],_0xaee18a={'memberId':this['_userService'][_0x2bc741(0x1db)]()['userID'],'unitId':_0x1ea889,'threadId':_0x4950f8,'solved':_0x5eb6b5[_0x2bc741(0x1ba)]?I[_0x2bc741(0x1ad)]:I[_0x2bc741(0x20c)]},_0x429c66=await this[_0x2bc741(0x1ea)][_0x2bc741(0x1cd)]('/universer-api/comment/unit/'+_0x1ea889+_0x2bc741(0x1c7),{'body':_0xaee18a});return!_0x429c66[_0x2bc741(0x1f9)][_0x2bc741(0x207)]||_0x429c66['body'][_0x2bc741(0x207)][_0x2bc741(0x1c1)]===0x1;}async[_0x5b9be5(0x1d8)](_0x24a94c,_0x252bbf,_0x18625a,_0x10bc28){const _0x2b477e=_0x5b9be5,_0x38a878={'memberId':(await this[_0x2b477e(0x1c5)][_0x2b477e(0x1b7)](_0x24a94c))[_0x2b477e(0x1dc)](),'threadId':_0x18625a,'replyId':_0x10bc28,'unitId':_0x24a94c},_0x3ec56d=await this[_0x2b477e(0x1ea)]['post'](_0x2b477e(0x1fb)+_0x24a94c+'/delete',{'body':_0x38a878});return!_0x3ec56d['body'][_0x2b477e(0x207)]||_0x3ec56d[_0x2b477e(0x1f9)][_0x2b477e(0x207)][_0x2b477e(0x1c1)]===0x1;}async['listComments'](_0x12bf9f,_0x307613,_0x4391f7){const _0x485123=_0x5b9be5,_0x1e7a51={'unitId':_0x12bf9f,'threadId':_0x4391f7},_0x12877d=await this[_0x485123(0x1ea)][_0x485123(0x1cd)]('/universer-api/comment/unit/'+_0x12bf9f+'/list',{'body':_0x1e7a51}),_0xc7ac3a=_0x4391f7['map'](_0x1dedcc=>ee(_0x12877d[_0x485123(0x1f9)]['comments'][_0x1dedcc],_0x12bf9f,_0x307613))[_0x485123(0x1c6)](Boolean);return Object['values'](_0x12877d[_0x485123(0x1f9)][_0x485123(0x1fc)])['forEach'](_0x3d5b6b=>{const _0x461333=_0x485123;this[_0x461333(0x1bd)]['addUser'](_0x3d5b6b);}),_0xc7ac3a;}[_0x5b9be5(0x1f4)](_0x4f3a4d){const _0x2b41cc=_0x5b9be5;return{'id':_0x4f3a4d['id'],'threadId':_0x4f3a4d[_0x2b41cc(0x1ff)],'ref':_0x4f3a4d[_0x2b41cc(0x1b3)]};}};S=Q([b(0x0,_0x5621ab(_0x3797c5)),b(0x1,_0x5621ab(_0x57ff03)),b(0x2,_0x5621ab(_0x55b756))],S);var re=Object[_0x5b9be5(0x1f8)],te=(_0x10641a,_0x98c72c,_0x1b8ce5,_0x50777d)=>{const _0x2b7e29=_0x5b9be5;for(var _0x40f628=_0x50777d>0x1?void 0x0:_0x50777d?re(_0x98c72c,_0x1b8ce5):_0x98c72c,_0x4c022c=_0x10641a[_0x2b7e29(0x1ce)]-0x1,_0x359994;_0x4c022c>=0x0;_0x4c022c--)(_0x359994=_0x10641a[_0x4c022c])&&(_0x40f628=_0x359994(_0x40f628)||_0x40f628);return _0x40f628;},M=(_0x4ca192,_0xd23b88)=>(_0x371337,_0x40ab45)=>_0xd23b88(_0x371337,_0x40ab45,_0x4ca192);let f=class extends _0x22ac0d{constructor(_0x115e53,_0x5b6386){const _0x661df2=_0x5b9be5;super(),this[_0x661df2(0x1e4)]=_0x115e53,this['_threadCommentDataSource']=_0x5b6386,this[_0x661df2(0x1b0)]();}[_0x5b9be5(0x1b0)](){const _0x488f69=_0x5b9be5;this[_0x488f69(0x1e4)][_0x488f69(0x212)]=this[_0x488f69(0x1d6)],this[_0x488f69(0x1e4)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x16527e),M(0x1,_0x5621ab(S))],f);var se=Object[_0x5b9be5(0x1be)],oe=Object[_0x5b9be5(0x1f8)],ne=(_0x13bd55,_0x457f99,_0x3cd859)=>_0x457f99 in _0x13bd55?se(_0x13bd55,_0x457f99,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3cd859}):_0x13bd55[_0x457f99]=_0x3cd859,ie=(_0x48bc2a,_0x27af71,_0x134ceb,_0x8f50ca)=>{const _0x5e3fe4=_0x5b9be5;for(var _0x2ca741=_0x8f50ca>0x1?void 0x0:_0x8f50ca?oe(_0x27af71,_0x134ceb):_0x27af71,_0x5b4d1d=_0x48bc2a[_0x5e3fe4(0x1ce)]-0x1,_0x23bb3d;_0x5b4d1d>=0x0;_0x5b4d1d--)(_0x23bb3d=_0x48bc2a[_0x5b4d1d])&&(_0x2ca741=_0x23bb3d(_0x2ca741)||_0x2ca741);return _0x2ca741;},N=(_0x137568,_0x55c42e)=>(_0x5db424,_0x465f5b)=>_0x55c42e(_0x5db424,_0x465f5b,_0x137568),$=(_0x291e9c,_0x22928c,_0x26ec7e)=>ne(_0x291e9c,typeof _0x22928c!=_0x5b9be5(0x1cc)?_0x22928c+'':_0x22928c,_0x26ec7e);let g=class extends _0x2bb13{constructor(_0x2b38c4=O,_0xb9eeb3,_0x38ca57){const _0x1a20ec=_0x5b9be5;super(),this['_config']=_0x2b38c4,this['_injector']=_0xb9eeb3,this[_0x1a20ec(0x1d2)]=_0x38ca57;const {..._0x599ef4}=_0x108311({},O,this[_0x1a20ec(0x211)]);this[_0x1a20ec(0x1d2)][_0x1a20ec(0x206)](z,_0x599ef4);}[_0x5b9be5(0x1fa)](){const _0x279704=_0x5b9be5;[[S],[f],[_]][_0x279704(0x1d4)](_0x51a9b0=>{const _0x2b2494=_0x279704;this['_injector'][_0x2b2494(0x1b2)](_0x51a9b0);});}[_0x5b9be5(0x1d1)](){const _0x1cf036=_0x5b9be5;this[_0x1cf036(0x1d3)][_0x1cf036(0x1ab)](f),this[_0x1cf036(0x1d3)][_0x1cf036(0x1ab)](_);}};$(g,_0x5b9be5(0x1ef),W),$(g,_0x5b9be5(0x1f1),_0x801f8b[_0x5b9be5(0x201)]),g=ie([_0x1dd896(_0x39a911,_0x78b621,_0x2f2b47),N(0x1,_0x5621ab(_0x4dc61e)),N(0x2,_0x47c18a)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1b503f=_0x53d2;(function(_0x5ecad4,_0x1ce279){const _0x4e49bf=_0x53d2,_0x29d002=_0x5ecad4();while(!![]){try{const _0x37fd48=-parseInt(_0x4e49bf(0x23b))/0x1+parseInt(_0x4e49bf(0x21b))/0x2+parseInt(_0x4e49bf(0x1ee))/0x3+parseInt(_0x4e49bf(0x226))/0x4*(-parseInt(_0x4e49bf(0x206))/0x5)+-parseInt(_0x4e49bf(0x223))/0x6+parseInt(_0x4e49bf(0x22d))/0x7*(-parseInt(_0x4e49bf(0x1eb))/0x8)+-parseInt(_0x4e49bf(0x1f0))/0x9*(-parseInt(_0x4e49bf(0x228))/0xa);if(_0x37fd48===_0x1ce279)break;else _0x29d002['push'](_0x29d002['shift']());}catch(_0x36ac3f){_0x29d002['push'](_0x29d002['shift']());}}}(_0x5491,0x3fd84));import{CommentService as _0x177479,CollaborationSessionService as _0x5d29c3,UniverCollaborationClientPlugin as _0x4ac8a8}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x54b9da}from'@univerjs-pro/license';import{dayjs as _0x5b328b,UserManagerService as _0x27b619,Inject as _0xe56929,Injector as _0x323c4c,Disposable as _0x496c11,CustomRangeType as _0x1a50f9,UniverInstanceType as _0x4ce168,DependentOn as _0x422474,IConfigService as _0x3cb82c,Plugin as _0x55d139,merge as _0xd65155}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x181ffd}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x34daab,IThreadCommentDataSourceService as _0x51dd11}from'@univerjs/thread-comment';import{bufferTime as _0x487d8e}from'rxjs';function _0x5491(){const _0x3cc461=['solved','35NuGFLm','getComment','map','slice','_httpService','/add','userID','_userService','Unknown','_config','Add','_configService','values','stringify','516782dtHjKf','userId','Solve','_injector','dataSource','body','error','delete','rangeType','replyId','resolved','length','_commentService','_threadCommentModel','/edit','185608fqMmaa','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','119997Jlgsit','size','12303CqawDH','deleteComment','commentUpdate$','requireSession','disposeWithMe','UNRECOGNIZED','resolveComment','onReady','updateComment','type','get','Solved','_threadCommentDataSourceService','symbol','root','find','_initUserSync','OpenOrReOpen','getOwnPropertyDescriptor','syncUpdateMutationToColla','ref','/reply','2311115sPwUbB','_init','rangeId','comments','add','code','_initDataSource','forEach','threadId','content','thread-comment-data-source.config','getUser','setConfig','user','replies','comment','Edit','parentId','Reply','Delete','createTimestamp','919058sOfUAk','addComment','format','onStarting','post','addUser','reply','getMemberID','2182446wvnrOQ','_threadCommentDataSource','/universer-api/comment/unit/','4OqzOCN','_sessionService','8930viHjRA','customRanges','/solved','parse'];_0x5491=function(){return _0x3cc461;};return _0x5491();}import{HTTPService as _0x4b3a69}from'@univerjs/network';const W=_0x1b503f(0x1ed);var I=(_0xf2fff0=>(_0xf2fff0[_0xf2fff0[_0x1b503f(0x201)]=0x0]=_0x1b503f(0x201),_0xf2fff0[_0xf2fff0[_0x1b503f(0x1fb)]=0x1]=_0x1b503f(0x1fb),_0xf2fff0[_0xf2fff0[_0x1b503f(0x1f5)]=-0x1]=_0x1b503f(0x1f5),_0xf2fff0))(I||{}),v=(_0x37b9a2=>(_0x37b9a2[_0x37b9a2[_0x1b503f(0x235)]=0x0]=_0x1b503f(0x235),_0x37b9a2[_0x37b9a2[_0x1b503f(0x237)]=0x1]=_0x1b503f(0x237),_0x37b9a2[_0x37b9a2[_0x1b503f(0x218)]=0x2]=_0x1b503f(0x218),_0x37b9a2[_0x37b9a2[_0x1b503f(0x216)]=0x3]=_0x1b503f(0x216),_0x37b9a2[_0x37b9a2[_0x1b503f(0x219)]=0x4]='Delete',_0x37b9a2[_0x37b9a2[_0x1b503f(0x23d)]=0x5]='Solve',_0x37b9a2[_0x37b9a2[_0x1b503f(0x1f5)]=-0x1]=_0x1b503f(0x1f5),_0x37b9a2))(v||{});const y=_0x1c2e89=>_0x5b328b(new Date(+_0x1c2e89))[_0x1b503f(0x21d)]('YYYY/MM/DD\x20HH:mm'),B=async(_0xc81d1c,_0x561816)=>{const _0x3a5f86=_0x1b503f,_0x2a6bcb=_0xc81d1c['get'](_0x27b619),_0x36d59e=_0xc81d1c['get'](_0x4b3a69);_0x561816[_0x3a5f86(0x20d)](_0xb2e873=>{const _0x3a3acb=_0x3a5f86;_0x2a6bcb[_0x3a3acb(0x211)](_0xb2e873)&&_0x561816[_0x3a3acb(0x1e3)](_0xb2e873);}),_0x561816[_0x3a5f86(0x1ef)]&&(await _0x36d59e[_0x3a5f86(0x1fa)]('/universer-api/user/list',{'params':{'userIDs':[..._0x561816]}}))['body'][_0x3a5f86(0x1ec)][_0x3a5f86(0x20d)](_0x43e85f=>{const _0x415732=_0x3a5f86;_0x43e85f&&_0x2a6bcb[_0x415732(0x220)](_0x43e85f);});};var K=Object[_0x1b503f(0x202)],V=(_0x387c97,_0x5c32d4,_0x428338,_0x5f41b7)=>{for(var _0xf0b265=_0x5f41b7>0x1?void 0x0:_0x5f41b7?K(_0x5c32d4,_0x428338):_0x5c32d4,_0x1395d6=_0x387c97['length']-0x1,_0x1bb40a;_0x1395d6>=0x0;_0x1395d6--)(_0x1bb40a=_0x387c97[_0x1395d6])&&(_0xf0b265=_0x1bb40a(_0xf0b265)||_0xf0b265);return _0xf0b265;},p=(_0x2fc504,_0x5c1669)=>(_0x2e4e18,_0x5f1862)=>_0x5c1669(_0x2e4e18,_0x5f1862,_0x2fc504);let _=class extends _0x496c11{constructor(_0x14c945,_0x1836d1,_0x3ec5a8,_0x27aa08){const _0x4f27a5=_0x1b503f;super(),this[_0x4f27a5(0x1e8)]=_0x14c945,this[_0x4f27a5(0x1e9)]=_0x1836d1,this['_userService']=_0x3ec5a8,this[_0x4f27a5(0x23e)]=_0x27aa08,this[_0x4f27a5(0x207)](),this[_0x4f27a5(0x200)]();}['_initUserSync'](){const _0x4cb21d=_0x1b503f;this[_0x4cb21d(0x1f4)](this[_0x4cb21d(0x1e9)][_0x4cb21d(0x1f2)]['pipe'](_0x487d8e(0x10))['subscribe'](_0x33590f=>{const _0x3e36e9=_0x4cb21d,_0x5b166c=new Set();_0x33590f[_0x3e36e9(0x20d)](_0x37ba4c=>{const _0x1133f2=_0x3e36e9;switch(_0x37ba4c[_0x1133f2(0x1f9)]){case _0x1133f2(0x20a):{const _0x330e8d=_0x37ba4c['payload']['personId'];_0x5b166c[_0x1133f2(0x20a)](_0x330e8d);break;}}}),B(this['_injector'],_0x5b166c);}));}[_0x1b503f(0x207)](){const _0x20b5b2=_0x1b503f;this['disposeWithMe'](this[_0x20b5b2(0x1e8)][_0x20b5b2(0x1f2)]['subscribe'](async _0x16eda5=>{const _0x56ef1b=_0x20b5b2;var _0x458bf3,_0xd96ddd,_0x4f9b16,_0x3ed873;const _0xb15ac0=(_0x458bf3=this[_0x56ef1b(0x1e9)]['getUnit'](_0x16eda5['unitId'])[_0x56ef1b(0x1ff)](_0x2752bb=>_0x2752bb['threadId']===_0x16eda5['threadId']))==null?void 0x0:_0x458bf3['root'];if(!_0xb15ac0)return;const {unitId:_0x23a6ff,subUnitId:_0x153a0a}=_0xb15ac0;switch(_0x16eda5[_0x56ef1b(0x213)]&&this[_0x56ef1b(0x234)][_0x56ef1b(0x220)](_0x16eda5[_0x56ef1b(0x213)]),_0x16eda5[_0x56ef1b(0x1f9)]){case v[_0x56ef1b(0x237)]:break;case v[_0x56ef1b(0x218)]:{this['_threadCommentModel'][_0x56ef1b(0x21c)](_0x23a6ff,_0x153a0a,{'unitId':_0x23a6ff,'subUnitId':_0x153a0a,'ref':'','id':_0x16eda5[_0x56ef1b(0x1e5)],'dT':y(+_0x16eda5[_0x56ef1b(0x21a)]),'threadId':_0x16eda5[_0x56ef1b(0x20e)],'personId':(_0x4f9b16=(_0xd96ddd=_0x16eda5['user'])==null?void 0x0:_0xd96ddd[_0x56ef1b(0x233)])!=null?_0x4f9b16:_0x16eda5[_0x56ef1b(0x23c)],'text':JSON[_0x56ef1b(0x22b)](_0x16eda5[_0x56ef1b(0x20f)]),'parentId':_0xb15ac0['id']});break;}case v[_0x56ef1b(0x219)]:{const _0x5eb921=this[_0x56ef1b(0x1e9)][_0x56ef1b(0x22e)](_0x23a6ff,_0x153a0a,_0x16eda5[_0x56ef1b(0x1e5)]);_0x5eb921&&_0x5eb921[_0x56ef1b(0x217)]&&this[_0x56ef1b(0x1e9)][_0x56ef1b(0x1f1)](_0x23a6ff,_0x153a0a,_0x16eda5[_0x56ef1b(0x1e5)]);break;}case v[_0x56ef1b(0x216)]:{this[_0x56ef1b(0x1e9)][_0x56ef1b(0x1f8)](_0x23a6ff,_0x153a0a,{'commentId':_0x16eda5[_0x56ef1b(0x1e5)],'text':JSON[_0x56ef1b(0x22b)](_0x16eda5[_0x56ef1b(0x20f)])});break;}case v[_0x56ef1b(0x23d)]:{const _0x3a9c54=(_0x3ed873=this[_0x56ef1b(0x1e9)]['getUnit'](_0x16eda5['unitId'])[_0x56ef1b(0x1ff)](_0x55c33d=>_0x55c33d[_0x56ef1b(0x20e)]===_0x16eda5[_0x56ef1b(0x20e)]))==null?void 0x0:_0x3ed873[_0x56ef1b(0x1fe)];_0x3a9c54&&this['_threadCommentModel'][_0x56ef1b(0x1f6)](_0x23a6ff,_0x153a0a,_0x3a9c54['id'],_0x16eda5['solved']===I[_0x56ef1b(0x1fb)]);break;}}}));}};_=V([p(0x0,_0xe56929(_0x177479)),p(0x1,_0xe56929(_0x34daab)),p(0x2,_0xe56929(_0x27b619)),p(0x3,_0xe56929(_0x323c4c))],_);const z=_0x1b503f(0x210),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1f24c0,_0xf3bd,_0x28f0f0,_0x2e75bb)=>{const _0xb8a12a=_0x1b503f;for(var _0x48e1eb=_0x2e75bb>0x1?void 0x0:_0x2e75bb?k(_0xf3bd,_0x28f0f0):_0xf3bd,_0x515e7d=_0x1f24c0[_0xb8a12a(0x1e7)]-0x1,_0x3ddbfb;_0x515e7d>=0x0;_0x515e7d--)(_0x3ddbfb=_0x1f24c0[_0x515e7d])&&(_0x48e1eb=_0x3ddbfb(_0x48e1eb)||_0x48e1eb);return _0x48e1eb;},b=(_0x342fff,_0x44dcd2)=>(_0xd804f3,_0x3c2e2b)=>_0x44dcd2(_0xd804f3,_0x3c2e2b,_0x342fff);function X(_0x480133,_0x29c503){const _0x525730=_0x1b503f,_0x5464c1=_0x480133[_0x525730(0x214)][0x0];return{..._0x29c503,'id':_0x5464c1['replyId'],'resolved':_0x480133[_0x525730(0x22c)]===0x1,'dT':y(_0x5464c1['createTimestamp']),'personId':_0x5464c1[_0x525730(0x23c)],'threadId':_0x5464c1[_0x525730(0x20e)]};}function ee(_0x409c40,_0x206ede,_0x172d6b){const _0x3ddf74=_0x1b503f;var _0x53b8bd,_0x5f5593;if(((_0x5f5593=(_0x53b8bd=_0x409c40==null?void 0x0:_0x409c40[_0x3ddf74(0x214)])==null?void 0x0:_0x53b8bd['length'])!=null?_0x5f5593:0x0)>0x0){const _0x18da36=(_0x12305d,_0x343833)=>({'id':_0x12305d['replyId'],'threadId':_0x12305d[_0x3ddf74(0x20e)],'dT':y(_0x12305d[_0x3ddf74(0x21a)]),'personId':_0x12305d[_0x3ddf74(0x23c)],'resolved':_0x409c40[_0x3ddf74(0x22c)]===I[_0x3ddf74(0x1fb)],'unitId':_0x206ede,'subUnitId':_0x172d6b,'text':JSON[_0x3ddf74(0x22b)](_0x12305d['content']),'parentId':_0x343833}),_0x16582e=_0x18da36(_0x409c40[_0x3ddf74(0x214)][0x0]);return{..._0x16582e,'children':_0x409c40['replies'][_0x3ddf74(0x230)](0x1)[_0x3ddf74(0x22f)](_0x498e08=>_0x18da36(_0x498e08,_0x16582e['id']))};}return null;}function _0x53d2(_0x2f8f1d,_0x3438e8){_0x2f8f1d=_0x2f8f1d-0x1e0;const _0x5491da=_0x5491();let _0x53d231=_0x5491da[_0x2f8f1d];return _0x53d231;}let S=class{constructor(_0x208ca2,_0xb7c40e,_0x2b4bcd){const _0x31a10c=_0x1b503f;this[_0x31a10c(0x231)]=_0x208ca2,this['_userService']=_0xb7c40e,this['_sessionService']=_0x2b4bcd;}async[_0x1b503f(0x21c)](_0x3a8e1e){const _0x387822=_0x1b503f;var _0x9a661d,_0x13e52b;const {parentId:_0x27a3df,unitId:_0x142237,text:_0xc8886c,threadId:_0x269136}=_0x3a8e1e,_0xd3b4d=(_0x13e52b=(_0x9a661d=_0xc8886c[_0x387822(0x229)])==null?void 0x0:_0x9a661d['filter'](_0x2f7eb3=>_0x2f7eb3[_0x387822(0x1e4)]===_0x1a50f9['COMMENT'])[_0x387822(0x22f)](_0x1c1b48=>_0x1c1b48[_0x387822(0x208)]))!=null?_0x13e52b:[],_0x49d2d5=JSON[_0x387822(0x23a)](_0xc8886c),_0x300ebf=(await this[_0x387822(0x227)][_0x387822(0x1f3)](_0x142237))[_0x387822(0x222)]();if(_0x27a3df){const _0x3167b1={'memberId':_0x300ebf,'unitId':_0x142237,'content':_0x49d2d5,'mention':_0xd3b4d,'threadId':_0x269136},_0x1b0851=(await this[_0x387822(0x231)][_0x387822(0x21f)](_0x387822(0x225)+_0x142237+_0x387822(0x205),{'body':_0x3167b1}))[_0x387822(0x1e1)][_0x387822(0x221)];return{..._0x3a8e1e,'id':_0x1b0851['replyId'],'dT':_0x5b328b(+_0x1b0851[_0x387822(0x21a)])[_0x387822(0x21d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1b0851[_0x387822(0x23c)]};}else{const _0x35be21={'memberId':_0x300ebf,'unitId':_0x142237,'content':_0x49d2d5,'mention':_0xd3b4d},_0x15fbab=await this[_0x387822(0x231)][_0x387822(0x21f)](_0x387822(0x225)+_0x142237+_0x387822(0x232),{'body':_0x35be21});return X(_0x15fbab['body'][_0x387822(0x215)],_0x3a8e1e);}}async['updateComment'](_0x260b35){const _0x5bf4f1=_0x1b503f;var _0x48ba6d,_0x2c4f10;const {text:_0x3e7bb0,unitId:_0x247ca6}=_0x260b35,_0xa1342a=(_0x2c4f10=(_0x48ba6d=_0x3e7bb0[_0x5bf4f1(0x229)])==null?void 0x0:_0x48ba6d['filter'](_0x308644=>_0x308644['rangeType']===_0x1a50f9['COMMENT'])[_0x5bf4f1(0x22f)](_0x20dca1=>_0x20dca1[_0x5bf4f1(0x208)]))!=null?_0x2c4f10:[],_0x45370b=JSON[_0x5bf4f1(0x23a)](_0x3e7bb0),_0x4be793=_0x260b35[_0x5bf4f1(0x20e)],_0x2a397e=_0x260b35['id'],_0x146dfa={'memberId':(await this[_0x5bf4f1(0x227)][_0x5bf4f1(0x1f3)](_0x247ca6))[_0x5bf4f1(0x222)](),'unitId':_0x247ca6,'threadId':_0x4be793,'mention':_0xa1342a,'content':_0x45370b,'replyId':_0x2a397e},_0xc37f2c=await this['_httpService'][_0x5bf4f1(0x21f)](_0x5bf4f1(0x225)+_0x247ca6+_0x5bf4f1(0x1ea),{'body':_0x146dfa});return!_0xc37f2c[_0x5bf4f1(0x1e1)]['error']||_0xc37f2c[_0x5bf4f1(0x1e1)][_0x5bf4f1(0x1e2)][_0x5bf4f1(0x20b)]===0x1;}async[_0x1b503f(0x1f6)](_0x32dd47){const _0x2e6f93=_0x1b503f,{unitId:_0xe790bb}=_0x32dd47,_0x28583f=_0x32dd47['threadId'],_0x4a030b={'memberId':this[_0x2e6f93(0x234)]['getCurrentUser']()[_0x2e6f93(0x233)],'unitId':_0xe790bb,'threadId':_0x28583f,'solved':_0x32dd47[_0x2e6f93(0x1e6)]?I['Solved']:I[_0x2e6f93(0x201)]},_0x16ef5a=await this[_0x2e6f93(0x231)][_0x2e6f93(0x21f)](_0x2e6f93(0x225)+_0xe790bb+_0x2e6f93(0x22a),{'body':_0x4a030b});return!_0x16ef5a[_0x2e6f93(0x1e1)][_0x2e6f93(0x1e2)]||_0x16ef5a[_0x2e6f93(0x1e1)][_0x2e6f93(0x1e2)][_0x2e6f93(0x20b)]===0x1;}async[_0x1b503f(0x1f1)](_0x162970,_0x2917ac,_0x44e83f,_0x49a38c){const _0x18cacb=_0x1b503f,_0x277b2c={'memberId':(await this[_0x18cacb(0x227)]['requireSession'](_0x162970))[_0x18cacb(0x222)](),'threadId':_0x44e83f,'replyId':_0x49a38c,'unitId':_0x162970},_0x54a4a7=await this[_0x18cacb(0x231)][_0x18cacb(0x21f)](_0x18cacb(0x225)+_0x162970+'/delete',{'body':_0x277b2c});return!_0x54a4a7[_0x18cacb(0x1e1)][_0x18cacb(0x1e2)]||_0x54a4a7['body'][_0x18cacb(0x1e2)][_0x18cacb(0x20b)]===0x1;}async['listComments'](_0xc26da1,_0x353bf2,_0x1474c8){const _0x368d91=_0x1b503f,_0x508603={'unitId':_0xc26da1,'threadId':_0x1474c8},_0x2160e7=await this['_httpService'][_0x368d91(0x21f)](_0x368d91(0x225)+_0xc26da1+'/list',{'body':_0x508603}),_0x171654=_0x1474c8[_0x368d91(0x22f)](_0x5d3b17=>ee(_0x2160e7[_0x368d91(0x1e1)][_0x368d91(0x209)][_0x5d3b17],_0xc26da1,_0x353bf2))['filter'](Boolean);return Object[_0x368d91(0x239)](_0x2160e7[_0x368d91(0x1e1)][_0x368d91(0x1ec)])['forEach'](_0x26e897=>{const _0x55d431=_0x368d91;this['_userService'][_0x55d431(0x220)](_0x26e897);}),_0x171654;}['saveCommentToSnapshot'](_0x31fc68){const _0x323f5d=_0x1b503f;return{'id':_0x31fc68['id'],'threadId':_0x31fc68[_0x323f5d(0x20e)],'ref':_0x31fc68[_0x323f5d(0x204)]};}};S=Q([b(0x0,_0xe56929(_0x4b3a69)),b(0x1,_0xe56929(_0x27b619)),b(0x2,_0xe56929(_0x5d29c3))],S);var re=Object[_0x1b503f(0x202)],te=(_0x31308c,_0x519ab1,_0x1537c5,_0x488aae)=>{const _0x23851c=_0x1b503f;for(var _0x9a3f9e=_0x488aae>0x1?void 0x0:_0x488aae?re(_0x519ab1,_0x1537c5):_0x519ab1,_0x5022eb=_0x31308c[_0x23851c(0x1e7)]-0x1,_0x51df2c;_0x5022eb>=0x0;_0x5022eb--)(_0x51df2c=_0x31308c[_0x5022eb])&&(_0x9a3f9e=_0x51df2c(_0x9a3f9e)||_0x9a3f9e);return _0x9a3f9e;},M=(_0x47f1ee,_0x349640)=>(_0x4c5a6a,_0x287107)=>_0x349640(_0x4c5a6a,_0x287107,_0x47f1ee);let f=class extends _0x496c11{constructor(_0x1641f1,_0x3b57a5){const _0x57bb5d=_0x1b503f;super(),this[_0x57bb5d(0x1fc)]=_0x1641f1,this[_0x57bb5d(0x224)]=_0x3b57a5,this[_0x57bb5d(0x20c)]();}[_0x1b503f(0x20c)](){const _0x3ad9e5=_0x1b503f;this[_0x3ad9e5(0x1fc)][_0x3ad9e5(0x1e0)]=this[_0x3ad9e5(0x224)],this[_0x3ad9e5(0x1fc)][_0x3ad9e5(0x203)]=!0x1;}};f=te([M(0x0,_0x51dd11),M(0x1,_0xe56929(S))],f);var se=Object['defineProperty'],oe=Object[_0x1b503f(0x202)],ne=(_0x1d8a02,_0x18bf9c,_0x4def72)=>_0x18bf9c in _0x1d8a02?se(_0x1d8a02,_0x18bf9c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4def72}):_0x1d8a02[_0x18bf9c]=_0x4def72,ie=(_0x5a19ac,_0x2db807,_0x5a85c7,_0x3253ec)=>{const _0x570c8=_0x1b503f;for(var _0x470026=_0x3253ec>0x1?void 0x0:_0x3253ec?oe(_0x2db807,_0x5a85c7):_0x2db807,_0x367189=_0x5a19ac[_0x570c8(0x1e7)]-0x1,_0x4e6bb1;_0x367189>=0x0;_0x367189--)(_0x4e6bb1=_0x5a19ac[_0x367189])&&(_0x470026=_0x4e6bb1(_0x470026)||_0x470026);return _0x470026;},N=(_0x5e90f2,_0x9bac7)=>(_0x5c2926,_0x28cdbd)=>_0x9bac7(_0x5c2926,_0x28cdbd,_0x5e90f2),$=(_0x3800b3,_0x502271,_0x56d1c4)=>ne(_0x3800b3,typeof _0x502271!=_0x1b503f(0x1fd)?_0x502271+'':_0x502271,_0x56d1c4);let g=class extends _0x55d139{constructor(_0x7eeebc=O,_0xf478b9,_0x2abb97){const _0x11c674=_0x1b503f;super(),this[_0x11c674(0x236)]=_0x7eeebc,this[_0x11c674(0x23e)]=_0xf478b9,this[_0x11c674(0x238)]=_0x2abb97;const {..._0x2a40dc}=_0xd65155({},O,this[_0x11c674(0x236)]);this[_0x11c674(0x238)][_0x11c674(0x212)](z,_0x2a40dc);}[_0x1b503f(0x21e)](){[[S],[f],[_]]['forEach'](_0x38d0ce=>{const _0x38b66d=_0x53d2;this[_0x38b66d(0x23e)][_0x38b66d(0x20a)](_0x38d0ce);});}[_0x1b503f(0x1f7)](){const _0x53289e=_0x1b503f;this[_0x53289e(0x23e)][_0x53289e(0x1fa)](f),this[_0x53289e(0x23e)][_0x53289e(0x1fa)](_);}};$(g,'pluginName',W),$(g,_0x1b503f(0x1f9),_0x4ce168['UNIVER_UNKNOWN']),g=ie([_0x422474(_0x181ffd,_0x4ac8a8,_0x54b9da),N(0x1,_0xe56929(_0x323c4c)),N(0x2,_0x3cb82c)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x32aa(_0x169fba,_0x2cf823){_0x169fba=_0x169fba-0x1f3;const _0x5392ae=_0x5392();let _0x32aad4=_0x5392ae[_0x169fba];return _0x32aad4;}function _0x5392(){const _0x142342=['_configService','_httpService','personId','/delete','_sessionService','UniverThreadCommentUi','CustomRangeType','payload','CollaborationSessionService','exports','comments','disposeWithMe','42OZJhlV','IThreadCommentDataSourceService','YYYY/MM/DD\x20HH:mm','root','user','94340yhzjVM','saveCommentToSnapshot','Injector','object','UNIVER_UNKNOWN','replyId','stringify','reply','_threadCommentModel','updateComment','getComment','_userService','Solve','UniverCore','deleteComment','slice','threadId','/solved','parse','UniverThreadCommentUIPlugin','getCurrentUser','add','@univerjs/core','Plugin','UniverThreadComment','getMemberID','@univerjs/network','defineProperty','UniverProThreadCommentDatasource','requireSession','syncUpdateMutationToColla','bufferTime','commentUpdate$','983ftbIMz','content','_injector','336705STMOrj','/reply','body','replies','userId','UserManagerService','/list','Module','_commentService','2606XOpIes','createTimestamp','post','UniverThreadCommentDataSourcePlugin','Delete','ref','Disposable','@univerjs/thread-comment','807GxenwF','getOwnPropertyDescriptor','_threadCommentDataSource','length','COMMENT','symbol','CommentService','users','/universer-api/comment/unit/','error','function','subscribe','78cHavmc','type','_config','amd','2263984oPKCCC','UniverLicensePlugin','pluginName','_threadCommentDataSourceService','rangeType','3884309TeftOX','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','DependentOn','format','forEach','resolveComment','UniverProCollaborationClient','Unknown','delete','356iLpGDO','5277429THNYwR','resolved','@univerjs-pro/license','map','Reply','UniverProLicense','toStringTag','HTTPService','setConfig','Edit','getUnit','unitId','addComment','Solved','UniverNetwork','_initUserSync','@univerjs-pro/collaboration-client','addUser','/universer-api/user/list','UNRECOGNIZED','24cDoVxK','onStarting','get','rangeId','_initDataSource','find','_init','@univerjs/thread-comment-ui','Add','getUser','code','OpenOrReOpen','Inject','solved','size','dataSource','filter','merge','onReady','userID','ThreadCommentModel','values','pipe'];_0x5392=function(){return _0x142342;};return _0x5392();}(function(_0x59d862,_0x23ab41){const _0x4e40f5=_0x32aa,_0x242ed2=_0x59d862();while(!![]){try{const _0x42b06d=parseInt(_0x4e40f5(0x228))/0x1*(-parseInt(_0x4e40f5(0x234))/0x2)+-parseInt(_0x4e40f5(0x23c))/0x3*(-parseInt(_0x4e40f5(0x25a))/0x4)+-parseInt(_0x4e40f5(0x22b))/0x5*(parseInt(_0x4e40f5(0x248))/0x6)+-parseInt(_0x4e40f5(0x202))/0x7*(-parseInt(_0x4e40f5(0x24c))/0x8)+parseInt(_0x4e40f5(0x25b))/0x9+parseInt(_0x4e40f5(0x207))/0xa+parseInt(_0x4e40f5(0x251))/0xb*(parseInt(_0x4e40f5(0x26f))/0xc);if(_0x42b06d===_0x23ab41)break;else _0x242ed2['push'](_0x242ed2['shift']());}catch(_0x511618){_0x242ed2['push'](_0x242ed2['shift']());}}}(_0x5392,0xd3d74),function(_0x5a64a6,_0x957993){const _0x3ac4ae=_0x32aa;typeof exports==_0x3ac4ae(0x20a)&&typeof module<'u'?_0x957993(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==_0x3ac4ae(0x246)&&define[_0x3ac4ae(0x24b)]?define([_0x3ac4ae(0x1ff),_0x3ac4ae(0x26b),_0x3ac4ae(0x25d),_0x3ac4ae(0x21d),_0x3ac4ae(0x276),_0x3ac4ae(0x23b),'rxjs',_0x3ac4ae(0x221)],_0x957993):(_0x5a64a6=typeof globalThis<'u'?globalThis:_0x5a64a6||self,_0x957993(_0x5a64a6[_0x3ac4ae(0x223)]={},_0x5a64a6[_0x3ac4ae(0x257)],_0x5a64a6[_0x3ac4ae(0x260)],_0x5a64a6[_0x3ac4ae(0x214)],_0x5a64a6[_0x3ac4ae(0x1fb)],_0x5a64a6[_0x3ac4ae(0x21f)],_0x5a64a6['rxjs'],_0x5a64a6[_0x3ac4ae(0x269)]));}(this,function(_0x586bdc,_0x19b673,_0x7c4d15,_0x1dc4c9,_0x450f4c,_0x125c10,_0x3fe6c6,_0x5d0050){'use strict';const _0x16929d=_0x32aa;const _0x462ddd=_0x16929d(0x252);var _0x5127e8=(_0x2b009f=>(_0x2b009f[_0x2b009f[_0x16929d(0x27a)]=0x0]=_0x16929d(0x27a),_0x2b009f[_0x2b009f['Solved']=0x1]=_0x16929d(0x268),_0x2b009f[_0x2b009f[_0x16929d(0x26e)]=-0x1]=_0x16929d(0x26e),_0x2b009f))(_0x5127e8||{}),_0xb78877=(_0x442a0b=>(_0x442a0b[_0x442a0b[_0x16929d(0x258)]=0x0]=_0x16929d(0x258),_0x442a0b[_0x442a0b['Add']=0x1]=_0x16929d(0x277),_0x442a0b[_0x442a0b['Reply']=0x2]='Reply',_0x442a0b[_0x442a0b[_0x16929d(0x264)]=0x3]=_0x16929d(0x264),_0x442a0b[_0x442a0b[_0x16929d(0x238)]=0x4]=_0x16929d(0x238),_0x442a0b[_0x442a0b[_0x16929d(0x213)]=0x5]=_0x16929d(0x213),_0x442a0b[_0x442a0b[_0x16929d(0x26e)]=-0x1]=_0x16929d(0x26e),_0x442a0b))(_0xb78877||{});const _0x56336a=_0x285c2c=>_0x1dc4c9['dayjs'](new Date(+_0x285c2c))['format'](_0x16929d(0x204)),_0x285b70=async(_0x2b19b5,_0x55627e)=>{const _0x6b2536=_0x16929d,_0x5a7832=_0x2b19b5[_0x6b2536(0x271)](_0x1dc4c9[_0x6b2536(0x230)]),_0x4c1511=_0x2b19b5[_0x6b2536(0x271)](_0x5d0050[_0x6b2536(0x262)]);_0x55627e[_0x6b2536(0x255)](_0x4da253=>{const _0x1bddf3=_0x6b2536;_0x5a7832[_0x1bddf3(0x278)](_0x4da253)&&_0x55627e[_0x1bddf3(0x259)](_0x4da253);}),_0x55627e[_0x6b2536(0x27d)]&&(await _0x4c1511[_0x6b2536(0x271)](_0x6b2536(0x26d),{'params':{'userIDs':[..._0x55627e]}}))['body'][_0x6b2536(0x243)][_0x6b2536(0x255)](_0x2c6d3f=>{const _0x1d883e=_0x6b2536;_0x2c6d3f&&_0x5a7832[_0x1d883e(0x26c)](_0x2c6d3f);});};var _0x70cb6e=Object[_0x16929d(0x23d)],_0x5daf57=(_0x2bf7d0,_0x2c9ae1,_0x51e071,_0x2efa7f)=>{for(var _0x385b85=_0x2efa7f>0x1?void 0x0:_0x2efa7f?_0x70cb6e(_0x2c9ae1,_0x51e071):_0x2c9ae1,_0x188c34=_0x2bf7d0['length']-0x1,_0x5ff37e;_0x188c34>=0x0;_0x188c34--)(_0x5ff37e=_0x2bf7d0[_0x188c34])&&(_0x385b85=_0x5ff37e(_0x385b85)||_0x385b85);return _0x385b85;},_0xb21c84=(_0x2b086b,_0x3f86ca)=>(_0x392cdd,_0x2fee1c)=>_0x3f86ca(_0x392cdd,_0x2fee1c,_0x2b086b);let _0x27939c=class extends _0x1dc4c9[_0x16929d(0x23a)]{constructor(_0x49845d,_0x28ad19,_0x17effb,_0xd2ed9f){const _0x299bc1=_0x16929d;super(),this[_0x299bc1(0x233)]=_0x49845d,this[_0x299bc1(0x20f)]=_0x28ad19,this[_0x299bc1(0x212)]=_0x17effb,this[_0x299bc1(0x22a)]=_0xd2ed9f,this[_0x299bc1(0x275)](),this[_0x299bc1(0x26a)]();}[_0x16929d(0x26a)](){const _0x42ac7b=_0x16929d;this[_0x42ac7b(0x201)](this[_0x42ac7b(0x20f)][_0x42ac7b(0x227)][_0x42ac7b(0x1f5)](_0x3fe6c6[_0x42ac7b(0x226)](0x10))[_0x42ac7b(0x247)](_0x361816=>{const _0x41e242=_0x42ac7b,_0x8a03ca=new Set();_0x361816[_0x41e242(0x255)](_0x12138d=>{const _0x2007e1=_0x41e242;switch(_0x12138d[_0x2007e1(0x249)]){case _0x2007e1(0x21c):{const _0x47de75=_0x12138d[_0x2007e1(0x1fd)][_0x2007e1(0x1f8)];_0x8a03ca[_0x2007e1(0x21c)](_0x47de75);break;}}}),_0x285b70(this[_0x41e242(0x22a)],_0x8a03ca);}));}[_0x16929d(0x275)](){const _0xc516b4=_0x16929d;this[_0xc516b4(0x201)](this['_commentService'][_0xc516b4(0x227)][_0xc516b4(0x247)](async _0x59881f=>{const _0x1e12f4=_0xc516b4;var _0x5a4723,_0x3c5bbd,_0xe4fa17,_0x1f6782;const _0x140240=(_0x5a4723=this[_0x1e12f4(0x20f)][_0x1e12f4(0x265)](_0x59881f[_0x1e12f4(0x266)])['find'](_0x2f50c8=>_0x2f50c8[_0x1e12f4(0x217)]===_0x59881f[_0x1e12f4(0x217)]))==null?void 0x0:_0x5a4723[_0x1e12f4(0x205)];if(!_0x140240)return;const {unitId:_0x38a75b,subUnitId:_0x51dfc8}=_0x140240;switch(_0x59881f[_0x1e12f4(0x206)]&&this['_userService'][_0x1e12f4(0x26c)](_0x59881f[_0x1e12f4(0x206)]),_0x59881f[_0x1e12f4(0x249)]){case _0xb78877[_0x1e12f4(0x277)]:break;case _0xb78877[_0x1e12f4(0x25f)]:{this[_0x1e12f4(0x20f)][_0x1e12f4(0x267)](_0x38a75b,_0x51dfc8,{'unitId':_0x38a75b,'subUnitId':_0x51dfc8,'ref':'','id':_0x59881f['replyId'],'dT':_0x56336a(+_0x59881f[_0x1e12f4(0x235)]),'threadId':_0x59881f[_0x1e12f4(0x217)],'personId':(_0xe4fa17=(_0x3c5bbd=_0x59881f[_0x1e12f4(0x206)])==null?void 0x0:_0x3c5bbd[_0x1e12f4(0x282)])!=null?_0xe4fa17:_0x59881f[_0x1e12f4(0x22f)],'text':JSON[_0x1e12f4(0x219)](_0x59881f[_0x1e12f4(0x229)]),'parentId':_0x140240['id']});break;}case _0xb78877[_0x1e12f4(0x238)]:{const _0x1fcee6=this[_0x1e12f4(0x20f)][_0x1e12f4(0x211)](_0x38a75b,_0x51dfc8,_0x59881f['replyId']);_0x1fcee6&&_0x1fcee6['parentId']&&this[_0x1e12f4(0x20f)]['deleteComment'](_0x38a75b,_0x51dfc8,_0x59881f[_0x1e12f4(0x20c)]);break;}case _0xb78877['Edit']:{this['_threadCommentModel']['updateComment'](_0x38a75b,_0x51dfc8,{'commentId':_0x59881f['replyId'],'text':JSON['parse'](_0x59881f[_0x1e12f4(0x229)])});break;}case _0xb78877[_0x1e12f4(0x213)]:{const _0x421447=(_0x1f6782=this[_0x1e12f4(0x20f)][_0x1e12f4(0x265)](_0x59881f[_0x1e12f4(0x266)])[_0x1e12f4(0x274)](_0x645afe=>_0x645afe[_0x1e12f4(0x217)]===_0x59881f['threadId']))==null?void 0x0:_0x1f6782[_0x1e12f4(0x205)];_0x421447&&this[_0x1e12f4(0x20f)][_0x1e12f4(0x256)](_0x38a75b,_0x51dfc8,_0x421447['id'],_0x59881f[_0x1e12f4(0x27c)]===_0x5127e8[_0x1e12f4(0x268)]);break;}}}));}};_0x27939c=_0x5daf57([_0xb21c84(0x0,_0x1dc4c9[_0x16929d(0x27b)](_0x19b673[_0x16929d(0x242)])),_0xb21c84(0x1,_0x1dc4c9[_0x16929d(0x27b)](_0x125c10[_0x16929d(0x1f3)])),_0xb21c84(0x2,_0x1dc4c9[_0x16929d(0x27b)](_0x1dc4c9['UserManagerService'])),_0xb21c84(0x3,_0x1dc4c9[_0x16929d(0x27b)](_0x1dc4c9[_0x16929d(0x209)]))],_0x27939c);const _0x153406='thread-comment-data-source.config',_0x22d67e={};var _0x37bc0e=Object[_0x16929d(0x23d)],_0x5d81ec=(_0x1f4c43,_0x3fe8e4,_0x1e5e1d,_0x10178d)=>{const _0x441971=_0x16929d;for(var _0x363492=_0x10178d>0x1?void 0x0:_0x10178d?_0x37bc0e(_0x3fe8e4,_0x1e5e1d):_0x3fe8e4,_0x3c6444=_0x1f4c43[_0x441971(0x23f)]-0x1,_0x32b06d;_0x3c6444>=0x0;_0x3c6444--)(_0x32b06d=_0x1f4c43[_0x3c6444])&&(_0x363492=_0x32b06d(_0x363492)||_0x363492);return _0x363492;},_0x122784=(_0x5933c9,_0x590cb6)=>(_0x303aea,_0x4dc482)=>_0x590cb6(_0x303aea,_0x4dc482,_0x5933c9);function _0xeb14fd(_0x2dedd2,_0x5c7c81){const _0x224eb9=_0x16929d,_0x4fcfdd=_0x2dedd2[_0x224eb9(0x22e)][0x0];return{..._0x5c7c81,'id':_0x4fcfdd['replyId'],'resolved':_0x2dedd2['solved']===0x1,'dT':_0x56336a(_0x4fcfdd[_0x224eb9(0x235)]),'personId':_0x4fcfdd['userId'],'threadId':_0x4fcfdd[_0x224eb9(0x217)]};}function _0x376ad7(_0x4e6d05,_0x329886,_0x5e201f){const _0x5dc64f=_0x16929d;var _0x152c95,_0x52edbe;if(((_0x52edbe=(_0x152c95=_0x4e6d05==null?void 0x0:_0x4e6d05[_0x5dc64f(0x22e)])==null?void 0x0:_0x152c95[_0x5dc64f(0x23f)])!=null?_0x52edbe:0x0)>0x0){const _0x303768=(_0xb408d3,_0x1f1ed4)=>({'id':_0xb408d3['replyId'],'threadId':_0xb408d3[_0x5dc64f(0x217)],'dT':_0x56336a(_0xb408d3[_0x5dc64f(0x235)]),'personId':_0xb408d3[_0x5dc64f(0x22f)],'resolved':_0x4e6d05[_0x5dc64f(0x27c)]===_0x5127e8[_0x5dc64f(0x268)],'unitId':_0x329886,'subUnitId':_0x5e201f,'text':JSON[_0x5dc64f(0x219)](_0xb408d3['content']),'parentId':_0x1f1ed4}),_0x584b7e=_0x303768(_0x4e6d05[_0x5dc64f(0x22e)][0x0]);return{..._0x584b7e,'children':_0x4e6d05[_0x5dc64f(0x22e)][_0x5dc64f(0x216)](0x1)[_0x5dc64f(0x25e)](_0x2700aa=>_0x303768(_0x2700aa,_0x584b7e['id']))};}return null;}let _0xe8817c=class{constructor(_0x167131,_0x1e1d15,_0x407187){const _0x21541d=_0x16929d;this[_0x21541d(0x1f7)]=_0x167131,this[_0x21541d(0x212)]=_0x1e1d15,this[_0x21541d(0x1fa)]=_0x407187;}async['addComment'](_0x550dac){const _0x11fcb3=_0x16929d;var _0x5294cb,_0x58f39a;const {parentId:_0xf777c0,unitId:_0x20d72e,text:_0x1caa62,threadId:_0x21aab5}=_0x550dac,_0x21a463=(_0x58f39a=(_0x5294cb=_0x1caa62['customRanges'])==null?void 0x0:_0x5294cb[_0x11fcb3(0x27f)](_0x5a8502=>_0x5a8502[_0x11fcb3(0x250)]===_0x1dc4c9[_0x11fcb3(0x1fc)][_0x11fcb3(0x240)])['map'](_0x486b1b=>_0x486b1b[_0x11fcb3(0x272)]))!=null?_0x58f39a:[],_0x271363=JSON[_0x11fcb3(0x20d)](_0x1caa62),_0x9302e6=(await this['_sessionService'][_0x11fcb3(0x224)](_0x20d72e))[_0x11fcb3(0x220)]();if(_0xf777c0){const _0x1aa305={'memberId':_0x9302e6,'unitId':_0x20d72e,'content':_0x271363,'mention':_0x21a463,'threadId':_0x21aab5},_0x3210ac=(await this[_0x11fcb3(0x1f7)][_0x11fcb3(0x236)](_0x11fcb3(0x244)+_0x20d72e+_0x11fcb3(0x22c),{'body':_0x1aa305}))['body'][_0x11fcb3(0x20e)];return{..._0x550dac,'id':_0x3210ac[_0x11fcb3(0x20c)],'dT':_0x1dc4c9['dayjs'](+_0x3210ac[_0x11fcb3(0x235)])[_0x11fcb3(0x254)](_0x11fcb3(0x204)),'personId':_0x3210ac[_0x11fcb3(0x22f)]};}else{const _0x5d8a57={'memberId':_0x9302e6,'unitId':_0x20d72e,'content':_0x271363,'mention':_0x21a463},_0x5c4f37=await this['_httpService'][_0x11fcb3(0x236)]('/universer-api/comment/unit/'+_0x20d72e+'/add',{'body':_0x5d8a57});return _0xeb14fd(_0x5c4f37[_0x11fcb3(0x22d)]['comment'],_0x550dac);}}async[_0x16929d(0x210)](_0x309234){const _0x221285=_0x16929d;var _0x452fb9,_0x5d963c;const {text:_0x528902,unitId:_0x5f4692}=_0x309234,_0xd65f1e=(_0x5d963c=(_0x452fb9=_0x528902['customRanges'])==null?void 0x0:_0x452fb9[_0x221285(0x27f)](_0x21fa76=>_0x21fa76[_0x221285(0x250)]===_0x1dc4c9['CustomRangeType'][_0x221285(0x240)])[_0x221285(0x25e)](_0x4cce1e=>_0x4cce1e[_0x221285(0x272)]))!=null?_0x5d963c:[],_0x4baf38=JSON[_0x221285(0x20d)](_0x528902),_0x4c5ee7=_0x309234[_0x221285(0x217)],_0x2855ad=_0x309234['id'],_0x5b4e01={'memberId':(await this[_0x221285(0x1fa)][_0x221285(0x224)](_0x5f4692))[_0x221285(0x220)](),'unitId':_0x5f4692,'threadId':_0x4c5ee7,'mention':_0xd65f1e,'content':_0x4baf38,'replyId':_0x2855ad},_0x53b0f0=await this['_httpService'][_0x221285(0x236)]('/universer-api/comment/unit/'+_0x5f4692+'/edit',{'body':_0x5b4e01});return!_0x53b0f0[_0x221285(0x22d)][_0x221285(0x245)]||_0x53b0f0[_0x221285(0x22d)][_0x221285(0x245)][_0x221285(0x279)]===0x1;}async[_0x16929d(0x256)](_0x351746){const _0x3043b1=_0x16929d,{unitId:_0x3d28d9}=_0x351746,_0x2b5865=_0x351746[_0x3043b1(0x217)],_0x2ae23f={'memberId':this[_0x3043b1(0x212)][_0x3043b1(0x21b)]()['userID'],'unitId':_0x3d28d9,'threadId':_0x2b5865,'solved':_0x351746[_0x3043b1(0x25c)]?_0x5127e8[_0x3043b1(0x268)]:_0x5127e8['OpenOrReOpen']},_0x2c52da=await this[_0x3043b1(0x1f7)]['post']('/universer-api/comment/unit/'+_0x3d28d9+_0x3043b1(0x218),{'body':_0x2ae23f});return!_0x2c52da[_0x3043b1(0x22d)]['error']||_0x2c52da[_0x3043b1(0x22d)][_0x3043b1(0x245)][_0x3043b1(0x279)]===0x1;}async[_0x16929d(0x215)](_0x177414,_0x3b084c,_0x5d7c75,_0x364acd){const _0x3546ac=_0x16929d,_0x51a572={'memberId':(await this[_0x3546ac(0x1fa)][_0x3546ac(0x224)](_0x177414))[_0x3546ac(0x220)](),'threadId':_0x5d7c75,'replyId':_0x364acd,'unitId':_0x177414},_0x5af0e9=await this[_0x3546ac(0x1f7)][_0x3546ac(0x236)](_0x3546ac(0x244)+_0x177414+_0x3546ac(0x1f9),{'body':_0x51a572});return!_0x5af0e9[_0x3546ac(0x22d)][_0x3546ac(0x245)]||_0x5af0e9['body'][_0x3546ac(0x245)][_0x3546ac(0x279)]===0x1;}async['listComments'](_0x545efe,_0x575b66,_0x10798e){const _0x5118c1=_0x16929d,_0x17ec2c={'unitId':_0x545efe,'threadId':_0x10798e},_0x106172=await this[_0x5118c1(0x1f7)][_0x5118c1(0x236)](_0x5118c1(0x244)+_0x545efe+_0x5118c1(0x231),{'body':_0x17ec2c}),_0x2bac48=_0x10798e[_0x5118c1(0x25e)](_0x4ba2ab=>_0x376ad7(_0x106172[_0x5118c1(0x22d)][_0x5118c1(0x200)][_0x4ba2ab],_0x545efe,_0x575b66))[_0x5118c1(0x27f)](Boolean);return Object[_0x5118c1(0x1f4)](_0x106172[_0x5118c1(0x22d)][_0x5118c1(0x243)])[_0x5118c1(0x255)](_0xb27634=>{const _0x395cb0=_0x5118c1;this[_0x395cb0(0x212)]['addUser'](_0xb27634);}),_0x2bac48;}[_0x16929d(0x208)](_0xfd0b22){const _0xe77514=_0x16929d;return{'id':_0xfd0b22['id'],'threadId':_0xfd0b22[_0xe77514(0x217)],'ref':_0xfd0b22[_0xe77514(0x239)]};}};_0xe8817c=_0x5d81ec([_0x122784(0x0,_0x1dc4c9[_0x16929d(0x27b)](_0x5d0050['HTTPService'])),_0x122784(0x1,_0x1dc4c9[_0x16929d(0x27b)](_0x1dc4c9[_0x16929d(0x230)])),_0x122784(0x2,_0x1dc4c9['Inject'](_0x19b673[_0x16929d(0x1fe)]))],_0xe8817c);var _0xc21422=Object[_0x16929d(0x23d)],_0x470351=(_0x13be9a,_0x55b709,_0x5ed9e6,_0x13559c)=>{const _0x23f735=_0x16929d;for(var _0x4de175=_0x13559c>0x1?void 0x0:_0x13559c?_0xc21422(_0x55b709,_0x5ed9e6):_0x55b709,_0x389905=_0x13be9a[_0x23f735(0x23f)]-0x1,_0x28d8bf;_0x389905>=0x0;_0x389905--)(_0x28d8bf=_0x13be9a[_0x389905])&&(_0x4de175=_0x28d8bf(_0x4de175)||_0x4de175);return _0x4de175;},_0x473790=(_0x70814e,_0x454deb)=>(_0x40df55,_0x1df3eb)=>_0x454deb(_0x40df55,_0x1df3eb,_0x70814e);let _0x4099ac=class extends _0x1dc4c9[_0x16929d(0x23a)]{constructor(_0x53a620,_0x4111ae){const _0x505598=_0x16929d;super(),this[_0x505598(0x24f)]=_0x53a620,this[_0x505598(0x23e)]=_0x4111ae,this[_0x505598(0x273)]();}['_initDataSource'](){const _0x25509c=_0x16929d;this['_threadCommentDataSourceService'][_0x25509c(0x27e)]=this[_0x25509c(0x23e)],this[_0x25509c(0x24f)][_0x25509c(0x225)]=!0x1;}};_0x4099ac=_0x470351([_0x473790(0x0,_0x125c10[_0x16929d(0x203)]),_0x473790(0x1,_0x1dc4c9[_0x16929d(0x27b)](_0xe8817c))],_0x4099ac);var _0x5174b8=Object[_0x16929d(0x222)],_0xfcd0bf=Object[_0x16929d(0x23d)],_0x2c8b34=(_0x27d166,_0x4bdec1,_0x4dbca9)=>_0x4bdec1 in _0x27d166?_0x5174b8(_0x27d166,_0x4bdec1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4dbca9}):_0x27d166[_0x4bdec1]=_0x4dbca9,_0x408f6e=(_0x1cee6d,_0x25afb8,_0x1555dd,_0x209207)=>{for(var _0x116a66=_0x209207>0x1?void 0x0:_0x209207?_0xfcd0bf(_0x25afb8,_0x1555dd):_0x25afb8,_0x50f8c5=_0x1cee6d['length']-0x1,_0x458b4e;_0x50f8c5>=0x0;_0x50f8c5--)(_0x458b4e=_0x1cee6d[_0x50f8c5])&&(_0x116a66=_0x458b4e(_0x116a66)||_0x116a66);return _0x116a66;},_0x272228=(_0x3d4b8e,_0x2b9447)=>(_0x4777f8,_0x29d947)=>_0x2b9447(_0x4777f8,_0x29d947,_0x3d4b8e),_0x472759=(_0x59a7fd,_0x1126fd,_0x3f18ca)=>_0x2c8b34(_0x59a7fd,typeof _0x1126fd!=_0x16929d(0x241)?_0x1126fd+'':_0x1126fd,_0x3f18ca);_0x586bdc[_0x16929d(0x237)]=class extends _0x1dc4c9[_0x16929d(0x21e)]{constructor(_0x4e51cd=_0x22d67e,_0x4a143f,_0x47e22d){const _0x1a740a=_0x16929d;super(),this[_0x1a740a(0x24a)]=_0x4e51cd,this[_0x1a740a(0x22a)]=_0x4a143f,this[_0x1a740a(0x1f6)]=_0x47e22d;const {..._0xa2ed8c}=_0x1dc4c9[_0x1a740a(0x280)]({},_0x22d67e,this[_0x1a740a(0x24a)]);this[_0x1a740a(0x1f6)][_0x1a740a(0x263)](_0x153406,_0xa2ed8c);}[_0x16929d(0x270)](){const _0x156db6=_0x16929d;[[_0xe8817c],[_0x4099ac],[_0x27939c]][_0x156db6(0x255)](_0x58b153=>{const _0x1e864a=_0x156db6;this[_0x1e864a(0x22a)][_0x1e864a(0x21c)](_0x58b153);});}[_0x16929d(0x281)](){const _0x9f697b=_0x16929d;this[_0x9f697b(0x22a)][_0x9f697b(0x271)](_0x4099ac),this['_injector'][_0x9f697b(0x271)](_0x27939c);}},_0x472759(_0x586bdc[_0x16929d(0x237)],_0x16929d(0x24e),_0x462ddd),_0x472759(_0x586bdc[_0x16929d(0x237)],_0x16929d(0x249),_0x1dc4c9['UniverInstanceType'][_0x16929d(0x20b)]),_0x586bdc['UniverThreadCommentDataSourcePlugin']=_0x408f6e([_0x1dc4c9[_0x16929d(0x253)](_0x450f4c[_0x16929d(0x21a)],_0x19b673['UniverCollaborationClientPlugin'],_0x7c4d15[_0x16929d(0x24d)]),_0x272228(0x1,_0x1dc4c9[_0x16929d(0x27b)](_0x1dc4c9['Injector'])),_0x272228(0x2,_0x1dc4c9['IConfigService'])],_0x586bdc[_0x16929d(0x237)]),Object[_0x16929d(0x222)](_0x586bdc,Symbol[_0x16929d(0x261)],{'value':_0x16929d(0x232)});}));
1
+ function _0x34d6(){const _0x1a1aaa=['rangeId','format','104855noEPLY','parentId','resolveComment','_threadCommentDataSource','getComment','replyId','getMemberID','UniverCollaborationClientPlugin','root','UniverThreadCommentUi','reply','UniverProThreadCommentDatasource','thread-comment-data-source.config','userID','stringify','body','CollaborationSessionService','find','@univerjs/network','_threadCommentModel','Solved','toStringTag','/delete','getOwnPropertyDescriptor','IConfigService','users','userId','_injector','Disposable','365853dyCtWG','onReady','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','error','HTTPService','commentUpdate$','96088UDjIVE','@univerjs-pro/collaboration-client','_userService','ThreadCommentModel','dayjs','rxjs','syncUpdateMutationToColla','153bSQpoB','UniverThreadCommentUIPlugin','UniverLicensePlugin','UniverProLicense','71320ZjrQVA','amd','subscribe','delete','@univerjs/core','_initUserSync','@univerjs/thread-comment-ui','content','3404688MRzOdT','COMMENT','user','function','CustomRangeType','rangeType','_threadCommentDataSourceService','addUser','disposeWithMe','Unknown','5bwmlnl','Add','unitId','getCurrentUser','customRanges','Reply','updateComment','_initDataSource','exports','type','personId','Inject','length','deleteComment','get','getUser','pluginName','UniverThreadComment','OpenOrReOpen','map','DependentOn','_commentService','onStarting','_init','ref','UniverInstanceType','add','size','_configService','UNRECOGNIZED','object','addComment','UserManagerService','dataSource','/list','pipe','1190812zcPYBh','getUnit','saveCommentToSnapshot','forEach','createTimestamp','UniverNetwork','2595420aTxPtt','Delete','UniverCore','YYYY/MM/DD\x20HH:mm','parse','10JhHBTt','symbol','/universer-api/comment/unit/','post','replies','filter','/universer-api/user/list','defineProperty','_config','_httpService','solved','/add','_sessionService','@univerjs-pro/license','2354NyFUrL','Injector','Solve','code','/reply','@univerjs/thread-comment','threadId','Edit','setConfig'];_0x34d6=function(){return _0x1a1aaa;};return _0x34d6();}function _0x43bd(_0x3fc643,_0x5192b9){_0x3fc643=_0x3fc643-0xb5;const _0x34d6f7=_0x34d6();let _0x43bdbb=_0x34d6f7[_0x3fc643];return _0x43bdbb;}(function(_0x1a4e67,_0x501141){const _0x7f0ca1=_0x43bd,_0x5286bd=_0x1a4e67();while(!![]){try{const _0x155c4c=parseInt(_0x7f0ca1(0xf0))/0x1+parseInt(_0x7f0ca1(0xd7))/0x2*(parseInt(_0x7f0ca1(0x10d))/0x3)+parseInt(_0x7f0ca1(0xd2))/0x4+-parseInt(_0x7f0ca1(0x132))/0x5*(-parseInt(_0x7f0ca1(0x128))/0x6)+parseInt(_0x7f0ca1(0xcc))/0x7+parseInt(_0x7f0ca1(0x115))/0x8*(-parseInt(_0x7f0ca1(0x11c))/0x9)+-parseInt(_0x7f0ca1(0x120))/0xa*(parseInt(_0x7f0ca1(0xe5))/0xb);if(_0x155c4c===_0x501141)break;else _0x5286bd['push'](_0x5286bd['shift']());}catch(_0x361105){_0x5286bd['push'](_0x5286bd['shift']());}}}(_0x34d6,0x5a7a2),function(_0x21ab4c,_0x9b5cfb){const _0x185dc1=_0x43bd;typeof exports==_0x185dc1(0xc6)&&typeof module<'u'?_0x9b5cfb(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==_0x185dc1(0x12b)&&define[_0x185dc1(0x121)]?define([_0x185dc1(0x13a),_0x185dc1(0x116),_0x185dc1(0xe4),_0x185dc1(0x124),_0x185dc1(0x126),_0x185dc1(0xea),_0x185dc1(0x11a),_0x185dc1(0x102)],_0x9b5cfb):(_0x21ab4c=typeof globalThis<'u'?globalThis:_0x21ab4c||self,_0x9b5cfb(_0x21ab4c[_0x185dc1(0xfb)]={},_0x21ab4c['UniverProCollaborationClient'],_0x21ab4c[_0x185dc1(0x11f)],_0x21ab4c[_0x185dc1(0xd4)],_0x21ab4c[_0x185dc1(0xf9)],_0x21ab4c[_0x185dc1(0xb9)],_0x21ab4c[_0x185dc1(0x11a)],_0x21ab4c[_0x185dc1(0xd1)]));}(this,function(_0x1cca1d,_0x4804be,_0x2bd3ee,_0x5c8b03,_0xb3c150,_0x332e6a,_0x2f63cc,_0x3ebd5e){'use strict';const _0x39b98c=_0x43bd;const _0x4b3b10=_0x39b98c(0x110);var _0x586a83=(_0x590c4b=>(_0x590c4b[_0x590c4b[_0x39b98c(0xba)]=0x0]=_0x39b98c(0xba),_0x590c4b[_0x590c4b[_0x39b98c(0x104)]=0x1]=_0x39b98c(0x104),_0x590c4b[_0x590c4b[_0x39b98c(0xc5)]=-0x1]=_0x39b98c(0xc5),_0x590c4b))(_0x586a83||{}),_0x1cb75e=(_0x5a29e1=>(_0x5a29e1[_0x5a29e1[_0x39b98c(0x131)]=0x0]='Unknown',_0x5a29e1[_0x5a29e1[_0x39b98c(0x133)]=0x1]='Add',_0x5a29e1[_0x5a29e1['Reply']=0x2]=_0x39b98c(0x137),_0x5a29e1[_0x5a29e1['Edit']=0x3]=_0x39b98c(0xec),_0x5a29e1[_0x5a29e1[_0x39b98c(0xd3)]=0x4]='Delete',_0x5a29e1[_0x5a29e1['Solve']=0x5]='Solve',_0x5a29e1[_0x5a29e1[_0x39b98c(0xc5)]=-0x1]='UNRECOGNIZED',_0x5a29e1))(_0x1cb75e||{});const _0x16c55a=_0x472564=>_0x5c8b03[_0x39b98c(0x119)](new Date(+_0x472564))[_0x39b98c(0xef)](_0x39b98c(0xd5)),_0x38a654=async(_0x13c5f2,_0x1ce11e)=>{const _0x5589b0=_0x39b98c,_0x4c626a=_0x13c5f2[_0x5589b0(0xb6)](_0x5c8b03[_0x5589b0(0xc8)]),_0x17b905=_0x13c5f2[_0x5589b0(0xb6)](_0x3ebd5e[_0x5589b0(0x113)]);_0x1ce11e[_0x5589b0(0xcf)](_0x2b7685=>{const _0x2a3947=_0x5589b0;_0x4c626a[_0x2a3947(0xb7)](_0x2b7685)&&_0x1ce11e[_0x2a3947(0x123)](_0x2b7685);}),_0x1ce11e[_0x5589b0(0xc3)]&&(await _0x17b905['get'](_0x5589b0(0xdd),{'params':{'userIDs':[..._0x1ce11e]}}))[_0x5589b0(0xff)][_0x5589b0(0x109)][_0x5589b0(0xcf)](_0x513687=>{const _0x42fcba=_0x5589b0;_0x513687&&_0x4c626a[_0x42fcba(0x12f)](_0x513687);});};var _0x4b12cb=Object['getOwnPropertyDescriptor'],_0x52e908=(_0x950eeb,_0x3dee68,_0x58f39a,_0x2e5b1c)=>{const _0x4cbccf=_0x39b98c;for(var _0x49bb23=_0x2e5b1c>0x1?void 0x0:_0x2e5b1c?_0x4b12cb(_0x3dee68,_0x58f39a):_0x3dee68,_0x30bd03=_0x950eeb[_0x4cbccf(0x13e)]-0x1,_0x129fa2;_0x30bd03>=0x0;_0x30bd03--)(_0x129fa2=_0x950eeb[_0x30bd03])&&(_0x49bb23=_0x129fa2(_0x49bb23)||_0x49bb23);return _0x49bb23;},_0x37510e=(_0xf7881e,_0x5d8825)=>(_0x3bc284,_0x1e6aca)=>_0x5d8825(_0x3bc284,_0x1e6aca,_0xf7881e);let _0x1c1924=class extends _0x5c8b03[_0x39b98c(0x10c)]{constructor(_0x4f8eed,_0xdf87bd,_0x3b2635,_0x2af54e){const _0x4ac3d0=_0x39b98c;super(),this['_commentService']=_0x4f8eed,this[_0x4ac3d0(0x103)]=_0xdf87bd,this['_userService']=_0x3b2635,this[_0x4ac3d0(0x10b)]=_0x2af54e,this[_0x4ac3d0(0xbf)](),this[_0x4ac3d0(0x125)]();}[_0x39b98c(0x125)](){const _0x571ad4=_0x39b98c;this[_0x571ad4(0x130)](this[_0x571ad4(0x103)][_0x571ad4(0x114)][_0x571ad4(0xcb)](_0x2f63cc['bufferTime'](0x10))[_0x571ad4(0x122)](_0x352044=>{const _0x16e39c=_0x571ad4,_0x428df9=new Set();_0x352044[_0x16e39c(0xcf)](_0x32abc9=>{const _0x904dac=_0x16e39c;switch(_0x32abc9[_0x904dac(0x13b)]){case'add':{const _0x128376=_0x32abc9['payload'][_0x904dac(0x13c)];_0x428df9[_0x904dac(0xc2)](_0x128376);break;}}}),_0x38a654(this[_0x16e39c(0x10b)],_0x428df9);}));}['_init'](){const _0x314883=_0x39b98c;this[_0x314883(0x130)](this[_0x314883(0xbd)][_0x314883(0x114)][_0x314883(0x122)](async _0x2f9015=>{const _0x49e2af=_0x314883;var _0x2101ea,_0xe50909,_0x338463,_0x11930b;const _0x39da5f=(_0x2101ea=this[_0x49e2af(0x103)][_0x49e2af(0xcd)](_0x2f9015[_0x49e2af(0x134)])[_0x49e2af(0x101)](_0x18bc57=>_0x18bc57[_0x49e2af(0xeb)]===_0x2f9015['threadId']))==null?void 0x0:_0x2101ea[_0x49e2af(0xf8)];if(!_0x39da5f)return;const {unitId:_0x2cdb83,subUnitId:_0x502351}=_0x39da5f;switch(_0x2f9015[_0x49e2af(0x12a)]&&this[_0x49e2af(0x117)]['addUser'](_0x2f9015[_0x49e2af(0x12a)]),_0x2f9015['type']){case _0x1cb75e[_0x49e2af(0x133)]:break;case _0x1cb75e['Reply']:{this['_threadCommentModel']['addComment'](_0x2cdb83,_0x502351,{'unitId':_0x2cdb83,'subUnitId':_0x502351,'ref':'','id':_0x2f9015[_0x49e2af(0xf5)],'dT':_0x16c55a(+_0x2f9015[_0x49e2af(0xd0)]),'threadId':_0x2f9015['threadId'],'personId':(_0x338463=(_0xe50909=_0x2f9015[_0x49e2af(0x12a)])==null?void 0x0:_0xe50909[_0x49e2af(0xfd)])!=null?_0x338463:_0x2f9015[_0x49e2af(0x10a)],'text':JSON[_0x49e2af(0xd6)](_0x2f9015[_0x49e2af(0x127)]),'parentId':_0x39da5f['id']});break;}case _0x1cb75e[_0x49e2af(0xd3)]:{const _0x539cd6=this[_0x49e2af(0x103)][_0x49e2af(0xf4)](_0x2cdb83,_0x502351,_0x2f9015[_0x49e2af(0xf5)]);_0x539cd6&&_0x539cd6[_0x49e2af(0xf1)]&&this[_0x49e2af(0x103)][_0x49e2af(0xb5)](_0x2cdb83,_0x502351,_0x2f9015[_0x49e2af(0xf5)]);break;}case _0x1cb75e['Edit']:{this[_0x49e2af(0x103)][_0x49e2af(0x138)](_0x2cdb83,_0x502351,{'commentId':_0x2f9015['replyId'],'text':JSON[_0x49e2af(0xd6)](_0x2f9015[_0x49e2af(0x127)])});break;}case _0x1cb75e[_0x49e2af(0xe7)]:{const _0x119090=(_0x11930b=this[_0x49e2af(0x103)]['getUnit'](_0x2f9015[_0x49e2af(0x134)])[_0x49e2af(0x101)](_0x4d8be0=>_0x4d8be0[_0x49e2af(0xeb)]===_0x2f9015[_0x49e2af(0xeb)]))==null?void 0x0:_0x11930b[_0x49e2af(0xf8)];_0x119090&&this[_0x49e2af(0x103)][_0x49e2af(0xf2)](_0x2cdb83,_0x502351,_0x119090['id'],_0x2f9015['solved']===_0x586a83['Solved']);break;}}}));}};_0x1c1924=_0x52e908([_0x37510e(0x0,_0x5c8b03[_0x39b98c(0x13d)](_0x4804be['CommentService'])),_0x37510e(0x1,_0x5c8b03['Inject'](_0x332e6a[_0x39b98c(0x118)])),_0x37510e(0x2,_0x5c8b03[_0x39b98c(0x13d)](_0x5c8b03['UserManagerService'])),_0x37510e(0x3,_0x5c8b03[_0x39b98c(0x13d)](_0x5c8b03[_0x39b98c(0xe6)]))],_0x1c1924);const _0x59b6ad=_0x39b98c(0xfc),_0xde8992={};var _0x20bc11=Object['getOwnPropertyDescriptor'],_0x3f4890=(_0x22a039,_0x459692,_0x2e0617,_0x3c6feb)=>{const _0x51c63a=_0x39b98c;for(var _0x6f956b=_0x3c6feb>0x1?void 0x0:_0x3c6feb?_0x20bc11(_0x459692,_0x2e0617):_0x459692,_0x488ad8=_0x22a039[_0x51c63a(0x13e)]-0x1,_0x38cd44;_0x488ad8>=0x0;_0x488ad8--)(_0x38cd44=_0x22a039[_0x488ad8])&&(_0x6f956b=_0x38cd44(_0x6f956b)||_0x6f956b);return _0x6f956b;},_0x1ae8bc=(_0x3e93d8,_0x50e3c7)=>(_0x465d16,_0x4a4d2c)=>_0x50e3c7(_0x465d16,_0x4a4d2c,_0x3e93d8);function _0x43c20a(_0x430fcf,_0x5d64e6){const _0x213364=_0x39b98c,_0x11a6a9=_0x430fcf[_0x213364(0xdb)][0x0];return{..._0x5d64e6,'id':_0x11a6a9['replyId'],'resolved':_0x430fcf[_0x213364(0xe1)]===0x1,'dT':_0x16c55a(_0x11a6a9[_0x213364(0xd0)]),'personId':_0x11a6a9[_0x213364(0x10a)],'threadId':_0x11a6a9['threadId']};}function _0x1043ed(_0x12f6bb,_0x3a2181,_0x10280c){const _0x1eee2d=_0x39b98c;var _0x1e83e8,_0x3b12ff;if(((_0x3b12ff=(_0x1e83e8=_0x12f6bb==null?void 0x0:_0x12f6bb[_0x1eee2d(0xdb)])==null?void 0x0:_0x1e83e8[_0x1eee2d(0x13e)])!=null?_0x3b12ff:0x0)>0x0){const _0x3e735=(_0x5392ab,_0x1b4a34)=>({'id':_0x5392ab[_0x1eee2d(0xf5)],'threadId':_0x5392ab[_0x1eee2d(0xeb)],'dT':_0x16c55a(_0x5392ab[_0x1eee2d(0xd0)]),'personId':_0x5392ab[_0x1eee2d(0x10a)],'resolved':_0x12f6bb[_0x1eee2d(0xe1)]===_0x586a83[_0x1eee2d(0x104)],'unitId':_0x3a2181,'subUnitId':_0x10280c,'text':JSON[_0x1eee2d(0xd6)](_0x5392ab['content']),'parentId':_0x1b4a34}),_0x3ea749=_0x3e735(_0x12f6bb['replies'][0x0]);return{..._0x3ea749,'children':_0x12f6bb['replies']['slice'](0x1)['map'](_0x344124=>_0x3e735(_0x344124,_0x3ea749['id']))};}return null;}let _0x4468b7=class{constructor(_0x4a2626,_0x2296de,_0x501509){const _0x4f015c=_0x39b98c;this[_0x4f015c(0xe0)]=_0x4a2626,this[_0x4f015c(0x117)]=_0x2296de,this['_sessionService']=_0x501509;}async[_0x39b98c(0xc7)](_0x1afbfc){const _0x3ac9db=_0x39b98c;var _0x37b489,_0x45abc9;const {parentId:_0x3d8861,unitId:_0x6db85c,text:_0x33297d,threadId:_0xdb32a3}=_0x1afbfc,_0x266fe1=(_0x45abc9=(_0x37b489=_0x33297d[_0x3ac9db(0x136)])==null?void 0x0:_0x37b489[_0x3ac9db(0xdc)](_0x56bcf9=>_0x56bcf9[_0x3ac9db(0x12d)]===_0x5c8b03[_0x3ac9db(0x12c)][_0x3ac9db(0x129)])[_0x3ac9db(0xbb)](_0x3d069a=>_0x3d069a[_0x3ac9db(0xee)]))!=null?_0x45abc9:[],_0x48b580=JSON['stringify'](_0x33297d),_0x17ad04=(await this['_sessionService'][_0x3ac9db(0x10f)](_0x6db85c))[_0x3ac9db(0xf6)]();if(_0x3d8861){const _0x3e0433={'memberId':_0x17ad04,'unitId':_0x6db85c,'content':_0x48b580,'mention':_0x266fe1,'threadId':_0xdb32a3},_0x334342=(await this['_httpService'][_0x3ac9db(0xda)]('/universer-api/comment/unit/'+_0x6db85c+_0x3ac9db(0xe9),{'body':_0x3e0433}))['body'][_0x3ac9db(0xfa)];return{..._0x1afbfc,'id':_0x334342[_0x3ac9db(0xf5)],'dT':_0x5c8b03['dayjs'](+_0x334342[_0x3ac9db(0xd0)])[_0x3ac9db(0xef)](_0x3ac9db(0xd5)),'personId':_0x334342[_0x3ac9db(0x10a)]};}else{const _0x1dba6c={'memberId':_0x17ad04,'unitId':_0x6db85c,'content':_0x48b580,'mention':_0x266fe1},_0x2c405b=await this[_0x3ac9db(0xe0)][_0x3ac9db(0xda)](_0x3ac9db(0xd9)+_0x6db85c+_0x3ac9db(0xe2),{'body':_0x1dba6c});return _0x43c20a(_0x2c405b[_0x3ac9db(0xff)]['comment'],_0x1afbfc);}}async[_0x39b98c(0x138)](_0x1ac5d1){const _0x4428ae=_0x39b98c;var _0x432f6b,_0x4230cb;const {text:_0x40cf19,unitId:_0x251e96}=_0x1ac5d1,_0x4275b2=(_0x4230cb=(_0x432f6b=_0x40cf19[_0x4428ae(0x136)])==null?void 0x0:_0x432f6b[_0x4428ae(0xdc)](_0x212642=>_0x212642[_0x4428ae(0x12d)]===_0x5c8b03[_0x4428ae(0x12c)][_0x4428ae(0x129)])[_0x4428ae(0xbb)](_0x2c24d3=>_0x2c24d3['rangeId']))!=null?_0x4230cb:[],_0x448792=JSON[_0x4428ae(0xfe)](_0x40cf19),_0x200d1a=_0x1ac5d1[_0x4428ae(0xeb)],_0x8befe6=_0x1ac5d1['id'],_0x2fc13b={'memberId':(await this[_0x4428ae(0xe3)][_0x4428ae(0x10f)](_0x251e96))['getMemberID'](),'unitId':_0x251e96,'threadId':_0x200d1a,'mention':_0x4275b2,'content':_0x448792,'replyId':_0x8befe6},_0x55cdbc=await this[_0x4428ae(0xe0)][_0x4428ae(0xda)](_0x4428ae(0xd9)+_0x251e96+'/edit',{'body':_0x2fc13b});return!_0x55cdbc[_0x4428ae(0xff)][_0x4428ae(0x112)]||_0x55cdbc[_0x4428ae(0xff)]['error'][_0x4428ae(0xe8)]===0x1;}async[_0x39b98c(0xf2)](_0x7ebaa1){const _0x1b4af5=_0x39b98c,{unitId:_0x2ac13f}=_0x7ebaa1,_0x281b7a=_0x7ebaa1[_0x1b4af5(0xeb)],_0x2a1a8d={'memberId':this[_0x1b4af5(0x117)][_0x1b4af5(0x135)]()['userID'],'unitId':_0x2ac13f,'threadId':_0x281b7a,'solved':_0x7ebaa1[_0x1b4af5(0x111)]?_0x586a83[_0x1b4af5(0x104)]:_0x586a83['OpenOrReOpen']},_0x107227=await this['_httpService'][_0x1b4af5(0xda)](_0x1b4af5(0xd9)+_0x2ac13f+'/solved',{'body':_0x2a1a8d});return!_0x107227[_0x1b4af5(0xff)][_0x1b4af5(0x112)]||_0x107227[_0x1b4af5(0xff)]['error'][_0x1b4af5(0xe8)]===0x1;}async[_0x39b98c(0xb5)](_0x375298,_0x3674d3,_0x1ff20a,_0x2a12a1){const _0x1d0697=_0x39b98c,_0x4e168d={'memberId':(await this[_0x1d0697(0xe3)][_0x1d0697(0x10f)](_0x375298))[_0x1d0697(0xf6)](),'threadId':_0x1ff20a,'replyId':_0x2a12a1,'unitId':_0x375298},_0x315086=await this[_0x1d0697(0xe0)]['post'](_0x1d0697(0xd9)+_0x375298+_0x1d0697(0x106),{'body':_0x4e168d});return!_0x315086[_0x1d0697(0xff)][_0x1d0697(0x112)]||_0x315086[_0x1d0697(0xff)][_0x1d0697(0x112)][_0x1d0697(0xe8)]===0x1;}async['listComments'](_0x29f7f1,_0xbae825,_0x223202){const _0x3fa659=_0x39b98c,_0x3f2529={'unitId':_0x29f7f1,'threadId':_0x223202},_0x403d36=await this['_httpService'][_0x3fa659(0xda)](_0x3fa659(0xd9)+_0x29f7f1+_0x3fa659(0xca),{'body':_0x3f2529}),_0x45be39=_0x223202[_0x3fa659(0xbb)](_0x46fddf=>_0x1043ed(_0x403d36['body']['comments'][_0x46fddf],_0x29f7f1,_0xbae825))[_0x3fa659(0xdc)](Boolean);return Object['values'](_0x403d36[_0x3fa659(0xff)][_0x3fa659(0x109)])['forEach'](_0x455e1c=>{const _0x54ef89=_0x3fa659;this['_userService'][_0x54ef89(0x12f)](_0x455e1c);}),_0x45be39;}[_0x39b98c(0xce)](_0x49754c){const _0x5aec63=_0x39b98c;return{'id':_0x49754c['id'],'threadId':_0x49754c[_0x5aec63(0xeb)],'ref':_0x49754c[_0x5aec63(0xc0)]};}};_0x4468b7=_0x3f4890([_0x1ae8bc(0x0,_0x5c8b03[_0x39b98c(0x13d)](_0x3ebd5e[_0x39b98c(0x113)])),_0x1ae8bc(0x1,_0x5c8b03['Inject'](_0x5c8b03[_0x39b98c(0xc8)])),_0x1ae8bc(0x2,_0x5c8b03[_0x39b98c(0x13d)](_0x4804be[_0x39b98c(0x100)]))],_0x4468b7);var _0x12367d=Object[_0x39b98c(0x107)],_0x3316fb=(_0x38ea25,_0x5827bb,_0x534bcd,_0x593865)=>{const _0x1314b5=_0x39b98c;for(var _0x3b8d0f=_0x593865>0x1?void 0x0:_0x593865?_0x12367d(_0x5827bb,_0x534bcd):_0x5827bb,_0x6ae820=_0x38ea25[_0x1314b5(0x13e)]-0x1,_0x2be5a4;_0x6ae820>=0x0;_0x6ae820--)(_0x2be5a4=_0x38ea25[_0x6ae820])&&(_0x3b8d0f=_0x2be5a4(_0x3b8d0f)||_0x3b8d0f);return _0x3b8d0f;},_0x7b172a=(_0x20fc52,_0x4178a9)=>(_0x42aa35,_0x5681cb)=>_0x4178a9(_0x42aa35,_0x5681cb,_0x20fc52);let _0x172f4f=class extends _0x5c8b03['Disposable']{constructor(_0x28ea53,_0x20a192){const _0x3a47e0=_0x39b98c;super(),this[_0x3a47e0(0x12e)]=_0x28ea53,this[_0x3a47e0(0xf3)]=_0x20a192,this[_0x3a47e0(0x139)]();}[_0x39b98c(0x139)](){const _0x5e8dd7=_0x39b98c;this['_threadCommentDataSourceService'][_0x5e8dd7(0xc9)]=this[_0x5e8dd7(0xf3)],this['_threadCommentDataSourceService'][_0x5e8dd7(0x11b)]=!0x1;}};_0x172f4f=_0x3316fb([_0x7b172a(0x0,_0x332e6a['IThreadCommentDataSourceService']),_0x7b172a(0x1,_0x5c8b03[_0x39b98c(0x13d)](_0x4468b7))],_0x172f4f);var _0x148c1f=Object[_0x39b98c(0xde)],_0x4a004a=Object[_0x39b98c(0x107)],_0x309698=(_0x1971d8,_0x2f4949,_0x3e0fca)=>_0x2f4949 in _0x1971d8?_0x148c1f(_0x1971d8,_0x2f4949,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e0fca}):_0x1971d8[_0x2f4949]=_0x3e0fca,_0x215408=(_0x7a883a,_0x26c37d,_0x4c5d8d,_0x49aaa5)=>{const _0x3d254e=_0x39b98c;for(var _0x46570b=_0x49aaa5>0x1?void 0x0:_0x49aaa5?_0x4a004a(_0x26c37d,_0x4c5d8d):_0x26c37d,_0x5d8317=_0x7a883a[_0x3d254e(0x13e)]-0x1,_0x32b7ec;_0x5d8317>=0x0;_0x5d8317--)(_0x32b7ec=_0x7a883a[_0x5d8317])&&(_0x46570b=_0x32b7ec(_0x46570b)||_0x46570b);return _0x46570b;},_0x1ea36f=(_0x37c14e,_0x2462ef)=>(_0x582504,_0x285073)=>_0x2462ef(_0x582504,_0x285073,_0x37c14e),_0x1d99dc=(_0x49a314,_0x20431e,_0x47e2d7)=>_0x309698(_0x49a314,typeof _0x20431e!=_0x39b98c(0xd8)?_0x20431e+'':_0x20431e,_0x47e2d7);_0x1cca1d['UniverThreadCommentDataSourcePlugin']=class extends _0x5c8b03['Plugin']{constructor(_0x148b01=_0xde8992,_0x467c5e,_0xf4ff8d){const _0x31a4a5=_0x39b98c;super(),this[_0x31a4a5(0xdf)]=_0x148b01,this[_0x31a4a5(0x10b)]=_0x467c5e,this[_0x31a4a5(0xc4)]=_0xf4ff8d;const {..._0x4d1928}=_0x5c8b03['merge']({},_0xde8992,this[_0x31a4a5(0xdf)]);this[_0x31a4a5(0xc4)][_0x31a4a5(0xed)](_0x59b6ad,_0x4d1928);}[_0x39b98c(0xbe)](){const _0x59a4bb=_0x39b98c;[[_0x4468b7],[_0x172f4f],[_0x1c1924]][_0x59a4bb(0xcf)](_0x25f6e8=>{const _0x47c4eb=_0x59a4bb;this[_0x47c4eb(0x10b)][_0x47c4eb(0xc2)](_0x25f6e8);});}[_0x39b98c(0x10e)](){const _0x31a8ac=_0x39b98c;this['_injector'][_0x31a8ac(0xb6)](_0x172f4f),this[_0x31a8ac(0x10b)]['get'](_0x1c1924);}},_0x1d99dc(_0x1cca1d['UniverThreadCommentDataSourcePlugin'],_0x39b98c(0xb8),_0x4b3b10),_0x1d99dc(_0x1cca1d['UniverThreadCommentDataSourcePlugin'],_0x39b98c(0x13b),_0x5c8b03[_0x39b98c(0xc1)]['UNIVER_UNKNOWN']),_0x1cca1d['UniverThreadCommentDataSourcePlugin']=_0x215408([_0x5c8b03[_0x39b98c(0xbc)](_0xb3c150[_0x39b98c(0x11d)],_0x4804be[_0x39b98c(0xf7)],_0x2bd3ee[_0x39b98c(0x11e)]),_0x1ea36f(0x1,_0x5c8b03[_0x39b98c(0x13d)](_0x5c8b03['Injector'])),_0x1ea36f(0x2,_0x5c8b03[_0x39b98c(0x108)])],_0x1cca1d['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x1cca1d,Symbol[_0x39b98c(0x105)],{'value':'Module'});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.12.4-insiders.20251212-6c41730",
3
+ "version": "0.12.4-insiders.20251213-692494c",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/license": "0.12.4-insiders.20251212-6c41730",
49
- "@univerjs/network": "0.12.4-insiders.20251212-6c41730",
50
- "@univerjs/core": "0.12.4-insiders.20251212-6c41730",
48
+ "@univerjs/core": "0.12.4-insiders.20251213-692494c",
51
49
  "@univerjs/protocol": "0.1.47",
52
- "@univerjs/thread-comment": "0.12.4-insiders.20251212-6c41730",
53
- "@univerjs/thread-comment-ui": "0.12.4-insiders.20251212-6c41730",
54
- "@univerjs-pro/collaboration-client": "0.12.4-insiders.20251212-6c41730"
50
+ "@univerjs-pro/license": "0.12.4-insiders.20251213-692494c",
51
+ "@univerjs/thread-comment-ui": "0.12.4-insiders.20251213-692494c",
52
+ "@univerjs/thread-comment": "0.12.4-insiders.20251213-692494c",
53
+ "@univerjs/network": "0.12.4-insiders.20251213-692494c",
54
+ "@univerjs-pro/collaboration-client": "0.12.4-insiders.20251213-692494c"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",