@univerjs-pro/thread-comment-datasource 0.13.0-insiders.20251216-1519cb7 → 0.13.0-insiders.20251218-2062647

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0xc938f6=_0x8491;function _0x20d3(){const _0x5c8d0d=['Module','ref','getCurrentUser','140576yFGDmw','UniverCollaborationClientPlugin','UniverThreadCommentDataSourcePlugin','syncUpdateMutationToColla','Edit','error','_initUserSync','_commentService','pipe','_httpService','replyId','_threadCommentModel','resolveComment','stringify','requireSession','commentUpdate$','resolved','Plugin','rangeType','values','dayjs','_userService','12WJQEWI','forEach','addComment','deleteComment','length','/universer-api/user/list','users','body','find','UserManagerService','Disposable','16340HbVQvg','parentId','_sessionService','user','thread-comment-data-source.config','pluginName','userId','parse','OpenOrReOpen','7842888SwZCBP','HTTPService','addUser','YYYY/MM/DD\x20HH:mm','map','post','onReady','_threadCommentDataSource','Solved','CommentService','Delete','userID','reply','replies','getUser','subscribe','updateComment','createTimestamp','IThreadCommentDataSourceService','threadId','UniverInstanceType','UNRECOGNIZED','getOwnPropertyDescriptor','size','2250915vfKTLD','customRanges','payload','2853NqKUzn','Unknown','Inject','slice','Solve','_config','filter','_injector','rangeId','4600085cQvugu','bufferTime','_initDataSource','/reply','setConfig','UniverLicensePlugin','get','CustomRangeType','add','defineProperty','Add','getMemberID','/universer-api/comment/unit/','solved','/edit','type','Reply','/add','code','/list','getUnit','17740uKnzyi','103WqtgiW','unitId','content','disposeWithMe','root','Injector','onStarting','966275wurAUZ','comment','COMMENT','format','merge','_init','/solved'];_0x20d3=function(){return _0x5c8d0d;};return _0x20d3();}(function(_0x2b328e,_0x178ad5){const _0x4fd283=_0x8491,_0x4321ac=_0x2b328e();while(!![]){try{const _0x57c3d8=-parseInt(_0x4fd283(0x18d))/0x1*(parseInt(_0x4fd283(0x1bf))/0x2)+parseInt(_0x4fd283(0x16b))/0x3+-parseInt(_0x4fd283(0x19e))/0x4+-parseInt(_0x4fd283(0x194))/0x5*(parseInt(_0x4fd283(0x1b4))/0x6)+parseInt(_0x4fd283(0x177))/0x7+parseInt(_0x4fd283(0x1c8))/0x8+parseInt(_0x4fd283(0x16e))/0x9*(-parseInt(_0x4fd283(0x18c))/0xa);if(_0x57c3d8===_0x178ad5)break;else _0x4321ac['push'](_0x4321ac['shift']());}catch(_0x525b05){_0x4321ac['push'](_0x4321ac['shift']());}}}(_0x20d3,0x8947b));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0xc938f6(0x19b)});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='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5488a6=>(_0x5488a6[_0x5488a6['OpenOrReOpen']=0x0]=_0xc938f6(0x1c7),_0x5488a6[_0x5488a6['Solved']=0x1]=_0xc938f6(0x1d0),_0x5488a6[_0x5488a6[_0xc938f6(0x1dd)]=-0x1]=_0xc938f6(0x1dd),_0x5488a6))(I||{}),v=(_0x5ae9aa=>(_0x5ae9aa[_0x5ae9aa['Unknown']=0x0]=_0xc938f6(0x16f),_0x5ae9aa[_0x5ae9aa[_0xc938f6(0x181)]=0x1]=_0xc938f6(0x181),_0x5ae9aa[_0x5ae9aa['Reply']=0x2]='Reply',_0x5ae9aa[_0x5ae9aa['Edit']=0x3]=_0xc938f6(0x1a2),_0x5ae9aa[_0x5ae9aa[_0xc938f6(0x1d2)]=0x4]='Delete',_0x5ae9aa[_0x5ae9aa[_0xc938f6(0x172)]=0x5]='Solve',_0x5ae9aa[_0x5ae9aa[_0xc938f6(0x1dd)]=-0x1]=_0xc938f6(0x1dd),_0x5ae9aa))(v||{});const f=_0x45fc74=>c[_0xc938f6(0x1b2)](new Date(+_0x45fc74))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x5a0dcf,_0x47fa32)=>{const _0x47702c=_0xc938f6,_0x454292=_0x5a0dcf[_0x47702c(0x17d)](c[_0x47702c(0x1bd)]),_0x4db2a6=_0x5a0dcf[_0x47702c(0x17d)](P[_0x47702c(0x1c9)]);_0x47fa32[_0x47702c(0x1b5)](_0x3b56c2=>{const _0xf4a364=_0x47702c;_0x454292[_0xf4a364(0x1d6)](_0x3b56c2)&&_0x47fa32['delete'](_0x3b56c2);}),_0x47fa32[_0x47702c(0x1df)]&&(await _0x4db2a6[_0x47702c(0x17d)](_0x47702c(0x1b9),{'params':{'userIDs':[..._0x47fa32]}}))[_0x47702c(0x1bb)][_0x47702c(0x1ba)][_0x47702c(0x1b5)](_0x1bcead=>{const _0x2a2f04=_0x47702c;_0x1bcead&&_0x454292[_0x2a2f04(0x1ca)](_0x1bcead);});};var $=Object[_0xc938f6(0x1de)],E=(_0x2dd839,_0x4e4ebf,_0x497fa5,_0x36a496)=>{const _0x33596a=_0xc938f6;for(var _0x5b39dc=_0x36a496>0x1?void 0x0:_0x36a496?$(_0x4e4ebf,_0x497fa5):_0x4e4ebf,_0x5804f4=_0x2dd839[_0x33596a(0x1b8)]-0x1,_0xb1fd18;_0x5804f4>=0x0;_0x5804f4--)(_0xb1fd18=_0x2dd839[_0x5804f4])&&(_0x5b39dc=_0xb1fd18(_0x5b39dc)||_0x5b39dc);return _0x5b39dc;},S=(_0x3c214f,_0x336ae0)=>(_0x54d317,_0x2d6c91)=>_0x336ae0(_0x54d317,_0x2d6c91,_0x3c214f);let _=class extends c['Disposable']{constructor(_0x14fbc2,_0x3c66b9,_0x49333b,_0x334664){const _0x37044f=_0xc938f6;super(),this[_0x37044f(0x1a5)]=_0x14fbc2,this[_0x37044f(0x1a9)]=_0x3c66b9,this[_0x37044f(0x1b3)]=_0x49333b,this['_injector']=_0x334664,this[_0x37044f(0x199)](),this[_0x37044f(0x1a4)]();}[_0xc938f6(0x1a4)](){const _0x56fb75=_0xc938f6;this['disposeWithMe'](this[_0x56fb75(0x1a9)][_0x56fb75(0x1ad)][_0x56fb75(0x1a6)](j[_0x56fb75(0x178)](0x10))[_0x56fb75(0x1d7)](_0x314b38=>{const _0x56ad65=_0x56fb75,_0x212d68=new Set();_0x314b38['forEach'](_0x1ba8c1=>{const _0x16a9ec=_0x8491;switch(_0x1ba8c1[_0x16a9ec(0x186)]){case'add':{const _0x832905=_0x1ba8c1[_0x16a9ec(0x16d)]['personId'];_0x212d68[_0x16a9ec(0x17f)](_0x832905);break;}}}),R(this[_0x56ad65(0x175)],_0x212d68);}));}['_init'](){const _0x552728=_0xc938f6;this[_0x552728(0x190)](this[_0x552728(0x1a5)][_0x552728(0x1ad)][_0x552728(0x1d7)](async _0xdec365=>{const _0x1dea13=_0x552728;var _0x2e3baa,_0x374bdb,_0x2ea446,_0x1a0cef;const _0x125826=(_0x2e3baa=this['_threadCommentModel'][_0x1dea13(0x18b)](_0xdec365[_0x1dea13(0x18e)])['find'](_0x106f5b=>_0x106f5b['threadId']===_0xdec365[_0x1dea13(0x1db)]))==null?void 0x0:_0x2e3baa[_0x1dea13(0x191)];if(!_0x125826)return;const {unitId:_0x38ed06,subUnitId:_0x145f9f}=_0x125826;switch(_0xdec365[_0x1dea13(0x1c2)]&&this[_0x1dea13(0x1b3)]['addUser'](_0xdec365[_0x1dea13(0x1c2)]),_0xdec365[_0x1dea13(0x186)]){case v[_0x1dea13(0x181)]:break;case v[_0x1dea13(0x187)]:{this[_0x1dea13(0x1a9)][_0x1dea13(0x1b6)](_0x38ed06,_0x145f9f,{'unitId':_0x38ed06,'subUnitId':_0x145f9f,'ref':'','id':_0xdec365[_0x1dea13(0x1a8)],'dT':f(+_0xdec365[_0x1dea13(0x1d9)]),'threadId':_0xdec365[_0x1dea13(0x1db)],'personId':(_0x2ea446=(_0x374bdb=_0xdec365['user'])==null?void 0x0:_0x374bdb[_0x1dea13(0x1d3)])!=null?_0x2ea446:_0xdec365['userId'],'text':JSON[_0x1dea13(0x1c6)](_0xdec365[_0x1dea13(0x18f)]),'parentId':_0x125826['id']});break;}case v[_0x1dea13(0x1d2)]:{const _0x31480f=this[_0x1dea13(0x1a9)]['getComment'](_0x38ed06,_0x145f9f,_0xdec365[_0x1dea13(0x1a8)]);_0x31480f&&_0x31480f[_0x1dea13(0x1c0)]&&this['_threadCommentModel']['deleteComment'](_0x38ed06,_0x145f9f,_0xdec365[_0x1dea13(0x1a8)]);break;}case v[_0x1dea13(0x1a2)]:{this['_threadCommentModel'][_0x1dea13(0x1d8)](_0x38ed06,_0x145f9f,{'commentId':_0xdec365['replyId'],'text':JSON['parse'](_0xdec365[_0x1dea13(0x18f)])});break;}case v['Solve']:{const _0x56e1a8=(_0x1a0cef=this[_0x1dea13(0x1a9)][_0x1dea13(0x18b)](_0xdec365[_0x1dea13(0x18e)])[_0x1dea13(0x1bc)](_0x51863c=>_0x51863c[_0x1dea13(0x1db)]===_0xdec365[_0x1dea13(0x1db)]))==null?void 0x0:_0x1a0cef[_0x1dea13(0x191)];_0x56e1a8&&this['_threadCommentModel'][_0x1dea13(0x1aa)](_0x38ed06,_0x145f9f,_0x56e1a8['id'],_0xdec365[_0x1dea13(0x184)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0xc938f6(0x170)](b[_0xc938f6(0x1d1)])),S(0x1,c[_0xc938f6(0x170)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0xc938f6(0x1bd)])),S(0x3,c[_0xc938f6(0x170)](c[_0xc938f6(0x192)]))],_);const q=_0xc938f6(0x1c3),D={};var A=Object[_0xc938f6(0x1de)],x=(_0x2e59d2,_0x2a8880,_0x32971c,_0x8de674)=>{for(var _0x3e0e3d=_0x8de674>0x1?void 0x0:_0x8de674?A(_0x2a8880,_0x32971c):_0x2a8880,_0x449b6d=_0x2e59d2['length']-0x1,_0x375ebd;_0x449b6d>=0x0;_0x449b6d--)(_0x375ebd=_0x2e59d2[_0x449b6d])&&(_0x3e0e3d=_0x375ebd(_0x3e0e3d)||_0x3e0e3d);return _0x3e0e3d;},C=(_0x2cdd2a,_0x419280)=>(_0x162afc,_0x6f4162)=>_0x419280(_0x162afc,_0x6f4162,_0x2cdd2a);function Y(_0x14b0c7,_0x2caea1){const _0x37659b=_0xc938f6,_0x3c5896=_0x14b0c7['replies'][0x0];return{..._0x2caea1,'id':_0x3c5896[_0x37659b(0x1a8)],'resolved':_0x14b0c7['solved']===0x1,'dT':f(_0x3c5896[_0x37659b(0x1d9)]),'personId':_0x3c5896[_0x37659b(0x1c5)],'threadId':_0x3c5896[_0x37659b(0x1db)]};}function G(_0x49f81e,_0x2ee5e4,_0x279b52){const _0x4dfa78=_0xc938f6;var _0xd84fec,_0x9545bb;if(((_0x9545bb=(_0xd84fec=_0x49f81e==null?void 0x0:_0x49f81e[_0x4dfa78(0x1d5)])==null?void 0x0:_0xd84fec[_0x4dfa78(0x1b8)])!=null?_0x9545bb:0x0)>0x0){const _0x4da43=(_0x195289,_0x403a51)=>({'id':_0x195289[_0x4dfa78(0x1a8)],'threadId':_0x195289[_0x4dfa78(0x1db)],'dT':f(_0x195289[_0x4dfa78(0x1d9)]),'personId':_0x195289['userId'],'resolved':_0x49f81e[_0x4dfa78(0x184)]===I['Solved'],'unitId':_0x2ee5e4,'subUnitId':_0x279b52,'text':JSON[_0x4dfa78(0x1c6)](_0x195289['content']),'parentId':_0x403a51}),_0x5ebaa6=_0x4da43(_0x49f81e[_0x4dfa78(0x1d5)][0x0]);return{..._0x5ebaa6,'children':_0x49f81e[_0x4dfa78(0x1d5)][_0x4dfa78(0x171)](0x1)[_0x4dfa78(0x1cc)](_0x2f854a=>_0x4da43(_0x2f854a,_0x5ebaa6['id']))};}return null;}function _0x8491(_0x2aadaf,_0xf7eb6b){_0x2aadaf=_0x2aadaf-0x16b;const _0x20d329=_0x20d3();let _0x849192=_0x20d329[_0x2aadaf];return _0x849192;}let p=class{constructor(_0x322e62,_0x30dbf2,_0x1cb237){const _0xb07b1f=_0xc938f6;this[_0xb07b1f(0x1a7)]=_0x322e62,this[_0xb07b1f(0x1b3)]=_0x30dbf2,this['_sessionService']=_0x1cb237;}async[_0xc938f6(0x1b6)](_0x2d2307){const _0x39368c=_0xc938f6;var _0x49a2bc,_0x170b07;const {parentId:_0x43a7e8,unitId:_0x15e98f,text:_0x57e494,threadId:_0x945762}=_0x2d2307,_0x389c75=(_0x170b07=(_0x49a2bc=_0x57e494[_0x39368c(0x16c)])==null?void 0x0:_0x49a2bc[_0x39368c(0x174)](_0x40fba9=>_0x40fba9[_0x39368c(0x1b0)]===c[_0x39368c(0x17e)][_0x39368c(0x196)])[_0x39368c(0x1cc)](_0x33eb48=>_0x33eb48[_0x39368c(0x176)]))!=null?_0x170b07:[],_0x2d5cb7=JSON[_0x39368c(0x1ab)](_0x57e494),_0x948412=(await this[_0x39368c(0x1c1)][_0x39368c(0x1ac)](_0x15e98f))[_0x39368c(0x182)]();if(_0x43a7e8){const _0x49c24a={'memberId':_0x948412,'unitId':_0x15e98f,'content':_0x2d5cb7,'mention':_0x389c75,'threadId':_0x945762},_0x57bb46=(await this[_0x39368c(0x1a7)][_0x39368c(0x1cd)]('/universer-api/comment/unit/'+_0x15e98f+_0x39368c(0x17a),{'body':_0x49c24a}))['body'][_0x39368c(0x1d4)];return{..._0x2d2307,'id':_0x57bb46[_0x39368c(0x1a8)],'dT':c[_0x39368c(0x1b2)](+_0x57bb46[_0x39368c(0x1d9)])[_0x39368c(0x197)](_0x39368c(0x1cb)),'personId':_0x57bb46['userId']};}else{const _0x252706={'memberId':_0x948412,'unitId':_0x15e98f,'content':_0x2d5cb7,'mention':_0x389c75},_0x57a920=await this[_0x39368c(0x1a7)][_0x39368c(0x1cd)](_0x39368c(0x183)+_0x15e98f+_0x39368c(0x188),{'body':_0x252706});return Y(_0x57a920['body'][_0x39368c(0x195)],_0x2d2307);}}async[_0xc938f6(0x1d8)](_0x48dde){const _0x3f0c09=_0xc938f6;var _0x5f155a,_0x4ef511;const {text:_0xc7f607,unitId:_0x38441d}=_0x48dde,_0x597b05=(_0x4ef511=(_0x5f155a=_0xc7f607[_0x3f0c09(0x16c)])==null?void 0x0:_0x5f155a[_0x3f0c09(0x174)](_0x2fc186=>_0x2fc186[_0x3f0c09(0x1b0)]===c[_0x3f0c09(0x17e)][_0x3f0c09(0x196)])[_0x3f0c09(0x1cc)](_0x3ffa49=>_0x3ffa49[_0x3f0c09(0x176)]))!=null?_0x4ef511:[],_0x165cef=JSON[_0x3f0c09(0x1ab)](_0xc7f607),_0xb9e493=_0x48dde['threadId'],_0x2034e8=_0x48dde['id'],_0x20bb42={'memberId':(await this[_0x3f0c09(0x1c1)][_0x3f0c09(0x1ac)](_0x38441d))[_0x3f0c09(0x182)](),'unitId':_0x38441d,'threadId':_0xb9e493,'mention':_0x597b05,'content':_0x165cef,'replyId':_0x2034e8},_0x10509a=await this['_httpService'][_0x3f0c09(0x1cd)](_0x3f0c09(0x183)+_0x38441d+_0x3f0c09(0x185),{'body':_0x20bb42});return!_0x10509a[_0x3f0c09(0x1bb)][_0x3f0c09(0x1a3)]||_0x10509a[_0x3f0c09(0x1bb)][_0x3f0c09(0x1a3)][_0x3f0c09(0x189)]===0x1;}async[_0xc938f6(0x1aa)](_0x413f5d){const _0x1918ff=_0xc938f6,{unitId:_0x109b99}=_0x413f5d,_0xe38934=_0x413f5d[_0x1918ff(0x1db)],_0x5ba7e1={'memberId':this[_0x1918ff(0x1b3)][_0x1918ff(0x19d)]()[_0x1918ff(0x1d3)],'unitId':_0x109b99,'threadId':_0xe38934,'solved':_0x413f5d[_0x1918ff(0x1ae)]?I['Solved']:I['OpenOrReOpen']},_0x2418b7=await this['_httpService'][_0x1918ff(0x1cd)](_0x1918ff(0x183)+_0x109b99+_0x1918ff(0x19a),{'body':_0x5ba7e1});return!_0x2418b7[_0x1918ff(0x1bb)]['error']||_0x2418b7['body'][_0x1918ff(0x1a3)]['code']===0x1;}async[_0xc938f6(0x1b7)](_0x149d78,_0x309eee,_0x5a4e72,_0x2bd597){const _0x1869ed=_0xc938f6,_0x545a09={'memberId':(await this[_0x1869ed(0x1c1)][_0x1869ed(0x1ac)](_0x149d78))[_0x1869ed(0x182)](),'threadId':_0x5a4e72,'replyId':_0x2bd597,'unitId':_0x149d78},_0x2a2c8b=await this['_httpService'][_0x1869ed(0x1cd)]('/universer-api/comment/unit/'+_0x149d78+'/delete',{'body':_0x545a09});return!_0x2a2c8b[_0x1869ed(0x1bb)][_0x1869ed(0x1a3)]||_0x2a2c8b[_0x1869ed(0x1bb)][_0x1869ed(0x1a3)]['code']===0x1;}async['listComments'](_0x5dd740,_0x14b4d7,_0x370340){const _0x1752b8=_0xc938f6,_0x349306={'unitId':_0x5dd740,'threadId':_0x370340},_0x1c8c24=await this[_0x1752b8(0x1a7)][_0x1752b8(0x1cd)]('/universer-api/comment/unit/'+_0x5dd740+_0x1752b8(0x18a),{'body':_0x349306}),_0x21eaa3=_0x370340['map'](_0xc4f9e0=>G(_0x1c8c24[_0x1752b8(0x1bb)]['comments'][_0xc4f9e0],_0x5dd740,_0x14b4d7))['filter'](Boolean);return Object[_0x1752b8(0x1b1)](_0x1c8c24['body']['users'])[_0x1752b8(0x1b5)](_0x527b66=>{const _0x2d134c=_0x1752b8;this[_0x2d134c(0x1b3)][_0x2d134c(0x1ca)](_0x527b66);}),_0x21eaa3;}['saveCommentToSnapshot'](_0x1dffdc){const _0x2a4fc2=_0xc938f6;return{'id':_0x1dffdc['id'],'threadId':_0x1dffdc[_0x2a4fc2(0x1db)],'ref':_0x1dffdc[_0x2a4fc2(0x19c)]};}};p=x([C(0x0,c['Inject'](P[_0xc938f6(0x1c9)])),C(0x1,c[_0xc938f6(0x170)](c[_0xc938f6(0x1bd)])),C(0x2,c[_0xc938f6(0x170)](b['CollaborationSessionService']))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x139876,_0x48d523,_0xd2761d,_0x5cf572)=>{const _0x10c811=_0xc938f6;for(var _0x430aa9=_0x5cf572>0x1?void 0x0:_0x5cf572?H(_0x48d523,_0xd2761d):_0x48d523,_0xbea806=_0x139876[_0x10c811(0x1b8)]-0x1,_0x357772;_0xbea806>=0x0;_0xbea806--)(_0x357772=_0x139876[_0xbea806])&&(_0x430aa9=_0x357772(_0x430aa9)||_0x430aa9);return _0x430aa9;},y=(_0x1d098b,_0x5a5648)=>(_0x4264c1,_0x234146)=>_0x5a5648(_0x4264c1,_0x234146,_0x1d098b);let g=class extends c[_0xc938f6(0x1be)]{constructor(_0xf4143a,_0x343dd5){const _0x4188e3=_0xc938f6;super(),this['_threadCommentDataSourceService']=_0xf4143a,this[_0x4188e3(0x1cf)]=_0x343dd5,this[_0x4188e3(0x179)]();}[_0xc938f6(0x179)](){const _0x292c9f=_0xc938f6;this['_threadCommentDataSourceService']['dataSource']=this[_0x292c9f(0x1cf)],this['_threadCommentDataSourceService'][_0x292c9f(0x1a1)]=!0x1;}};g=J([y(0x0,M[_0xc938f6(0x1da)]),y(0x1,c[_0xc938f6(0x170)](p))],g);var F=Object[_0xc938f6(0x180)],L=Object[_0xc938f6(0x1de)],Z=(_0x4d478d,_0x15b119,_0x6fa78)=>_0x15b119 in _0x4d478d?F(_0x4d478d,_0x15b119,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6fa78}):_0x4d478d[_0x15b119]=_0x6fa78,W=(_0x4e6a11,_0x30c5a2,_0x35a54e,_0xc67c9f)=>{const _0x2dce32=_0xc938f6;for(var _0x42e268=_0xc67c9f>0x1?void 0x0:_0xc67c9f?L(_0x30c5a2,_0x35a54e):_0x30c5a2,_0x3023a9=_0x4e6a11[_0x2dce32(0x1b8)]-0x1,_0x2462c2;_0x3023a9>=0x0;_0x3023a9--)(_0x2462c2=_0x4e6a11[_0x3023a9])&&(_0x42e268=_0x2462c2(_0x42e268)||_0x42e268);return _0x42e268;},O=(_0x5d4f95,_0x5b3ca6)=>(_0x440f74,_0x8db732)=>_0x5b3ca6(_0x440f74,_0x8db732,_0x5d4f95),N=(_0x2a7795,_0xbe8efa,_0x1e76b0)=>Z(_0x2a7795,typeof _0xbe8efa!='symbol'?_0xbe8efa+'':_0xbe8efa,_0x1e76b0);exports[_0xc938f6(0x1a0)]=class extends c[_0xc938f6(0x1af)]{constructor(_0x2e1ad5=D,_0xda7095,_0x537453){const _0x4c8f50=_0xc938f6;super(),this[_0x4c8f50(0x173)]=_0x2e1ad5,this['_injector']=_0xda7095,this['_configService']=_0x537453;const {..._0x26d0d7}=c[_0x4c8f50(0x198)]({},D,this[_0x4c8f50(0x173)]);this['_configService'][_0x4c8f50(0x17b)](q,_0x26d0d7);}[_0xc938f6(0x193)](){const _0x4c6dc0=_0xc938f6;[[p],[g],[_]][_0x4c6dc0(0x1b5)](_0x36cf9d=>{const _0x25667a=_0x4c6dc0;this[_0x25667a(0x175)]['add'](_0x36cf9d);});}[_0xc938f6(0x1ce)](){const _0x15bb24=_0xc938f6;this[_0x15bb24(0x175)]['get'](g),this[_0x15bb24(0x175)][_0x15bb24(0x17d)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0xc938f6(0x1c4),U),N(exports[_0xc938f6(0x1a0)],_0xc938f6(0x186),c[_0xc938f6(0x1dc)]['UNIVER_UNKNOWN']),exports[_0xc938f6(0x1a0)]=W([c['DependentOn'](w['UniverThreadCommentUIPlugin'],b[_0xc938f6(0x19f)],T[_0xc938f6(0x17c)]),O(0x1,c[_0xc938f6(0x170)](c[_0xc938f6(0x192)])),O(0x2,c['IConfigService'])],exports[_0xc938f6(0x1a0)]);
1
+ 'use strict';function _0x3584(){const _0x50b1a6=['thread-comment-data-source.config','Inject','DependentOn','/reply','_threadCommentModel','Injector','getOwnPropertyDescriptor','IThreadCommentDataSourceService','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','_userService','user','parse','customRanges','Solve','Module','UserManagerService','disposeWithMe','size','_initDataSource','UNRECOGNIZED','format','addComment','10AuxtrQ','Unknown','values','get','createTimestamp','Edit','merge','YYYY/MM/DD\x20HH:mm','post','error','_commentService','_initUserSync','5580330gHSVAb','root','getCurrentUser','subscribe','_httpService','comments','_threadCommentDataSourceService','users','UniverThreadCommentDataSourcePlugin','/delete','forEach','IConfigService','435192mrtami','/universer-api/user/list','code','_config','payload','userID','ThreadCommentModel','slice','content','map','Delete','ref','resolveComment','filter','add','setConfig','userId','reply','resolved','defineProperty','addUser','OpenOrReOpen','updateComment','CommentService','dataSource','_init','onStarting','listComments','commentUpdate$','replyId','/universer-api/comment/unit/','toStringTag','/add','deleteComment','1085114JERVmY','2RpTolI','/solved','find','type','HTTPService','onReady','UniverLicensePlugin','pluginName','COMMENT','comment','_sessionService','stringify','Reply','8653352JKSgJf','937071aUMlzd','_injector','getComment','getUnit','body','solved','rangeType','47383866OccVtQ','rangeId','delete','dayjs','threadId','CollaborationSessionService','5391540YhjDhJ','requireSession','personId','getMemberID','length','replies','saveCommentToSnapshot','CustomRangeType','Solved','Disposable'];_0x3584=function(){return _0x50b1a6;};return _0x3584();}const _0x5f45a4=_0x1444;(function(_0x262afb,_0x401723){const _0x1bbfee=_0x1444,_0x24036f=_0x262afb();while(!![]){try{const _0x49f0db=parseInt(_0x1bbfee(0x1b5))/0x1*(-parseInt(_0x1bbfee(0x1b4))/0x2)+-parseInt(_0x1bbfee(0x1c3))/0x3+-parseInt(_0x1bbfee(0x1d0))/0x4+-parseInt(_0x1bbfee(0x17a))/0x5*(-parseInt(_0x1bbfee(0x192))/0x6)+-parseInt(_0x1bbfee(0x186))/0x7+-parseInt(_0x1bbfee(0x1c2))/0x8+parseInt(_0x1bbfee(0x1ca))/0x9;if(_0x49f0db===_0x401723)break;else _0x24036f['push'](_0x24036f['shift']());}catch(_0x4886dc){_0x24036f['push'](_0x24036f['shift']());}}}(_0x3584,0xbfd3b));Object[_0x5f45a4(0x1a5)](exports,Symbol[_0x5f45a4(0x1b1)],{'value':_0x5f45a4(0x172)});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=_0x5f45a4(0x1e3);var I=(_0xf2a5f9=>(_0xf2a5f9[_0xf2a5f9[_0x5f45a4(0x1a7)]=0x0]=_0x5f45a4(0x1a7),_0xf2a5f9[_0xf2a5f9[_0x5f45a4(0x1d8)]=0x1]=_0x5f45a4(0x1d8),_0xf2a5f9[_0xf2a5f9[_0x5f45a4(0x177)]=-0x1]=_0x5f45a4(0x177),_0xf2a5f9))(I||{}),v=(_0x396f58=>(_0x396f58[_0x396f58[_0x5f45a4(0x17b)]=0x0]='Unknown',_0x396f58[_0x396f58[_0x5f45a4(0x1e2)]=0x1]='Add',_0x396f58[_0x396f58[_0x5f45a4(0x1c1)]=0x2]='Reply',_0x396f58[_0x396f58[_0x5f45a4(0x17f)]=0x3]=_0x5f45a4(0x17f),_0x396f58[_0x396f58[_0x5f45a4(0x19c)]=0x4]='Delete',_0x396f58[_0x396f58[_0x5f45a4(0x171)]=0x5]=_0x5f45a4(0x171),_0x396f58[_0x396f58[_0x5f45a4(0x177)]=-0x1]=_0x5f45a4(0x177),_0x396f58))(v||{});const f=_0x5213d2=>c[_0x5f45a4(0x1cd)](new Date(+_0x5213d2))[_0x5f45a4(0x178)](_0x5f45a4(0x181)),R=async(_0x4163de,_0x4a5113)=>{const _0x17d789=_0x5f45a4,_0x2400b3=_0x4163de['get'](c[_0x17d789(0x173)]),_0x1897b5=_0x4163de[_0x17d789(0x17d)](P['HTTPService']);_0x4a5113['forEach'](_0x4aeb4b=>{const _0x9b966d=_0x17d789;_0x2400b3['getUser'](_0x4aeb4b)&&_0x4a5113[_0x9b966d(0x1cc)](_0x4aeb4b);}),_0x4a5113[_0x17d789(0x175)]&&(await _0x1897b5['get'](_0x17d789(0x193),{'params':{'userIDs':[..._0x4a5113]}}))[_0x17d789(0x1c7)][_0x17d789(0x18d)]['forEach'](_0x5adc5f=>{const _0x167064=_0x17d789;_0x5adc5f&&_0x2400b3[_0x167064(0x1a6)](_0x5adc5f);});};var $=Object[_0x5f45a4(0x1e0)],E=(_0x1263f2,_0x1570f9,_0x2439f6,_0x676d41)=>{const _0x48b8d3=_0x5f45a4;for(var _0x5d52ac=_0x676d41>0x1?void 0x0:_0x676d41?$(_0x1570f9,_0x2439f6):_0x1570f9,_0xb4ac2=_0x1263f2[_0x48b8d3(0x1d4)]-0x1,_0x82b4b5;_0xb4ac2>=0x0;_0xb4ac2--)(_0x82b4b5=_0x1263f2[_0xb4ac2])&&(_0x5d52ac=_0x82b4b5(_0x5d52ac)||_0x5d52ac);return _0x5d52ac;},S=(_0xbb7323,_0x2c7627)=>(_0x2cf287,_0x1d28ad)=>_0x2c7627(_0x2cf287,_0x1d28ad,_0xbb7323);let _=class extends c[_0x5f45a4(0x1d9)]{constructor(_0x42d9ef,_0x5a8bfd,_0x1ddf7a,_0x15aa1d){const _0x11e1fc=_0x5f45a4;super(),this[_0x11e1fc(0x184)]=_0x42d9ef,this[_0x11e1fc(0x1de)]=_0x5a8bfd,this[_0x11e1fc(0x1e5)]=_0x1ddf7a,this[_0x11e1fc(0x1c4)]=_0x15aa1d,this['_init'](),this[_0x11e1fc(0x185)]();}[_0x5f45a4(0x185)](){const _0x26edc6=_0x5f45a4;this['disposeWithMe'](this[_0x26edc6(0x1de)][_0x26edc6(0x1ae)]['pipe'](j['bufferTime'](0x10))[_0x26edc6(0x189)](_0x6f8f1f=>{const _0x5ec1a2=_0x26edc6,_0x3755ba=new Set();_0x6f8f1f[_0x5ec1a2(0x190)](_0x240eca=>{const _0x3c9c1c=_0x5ec1a2;switch(_0x240eca[_0x3c9c1c(0x1b8)]){case _0x3c9c1c(0x1a0):{const _0x3a8809=_0x240eca[_0x3c9c1c(0x196)][_0x3c9c1c(0x1d2)];_0x3755ba[_0x3c9c1c(0x1a0)](_0x3a8809);break;}}}),R(this['_injector'],_0x3755ba);}));}[_0x5f45a4(0x1ab)](){const _0x2c88cb=_0x5f45a4;this[_0x2c88cb(0x174)](this['_commentService'][_0x2c88cb(0x1ae)][_0x2c88cb(0x189)](async _0x3e8dae=>{const _0x405b35=_0x2c88cb;var _0x503923,_0x5c7892,_0x368a32,_0xcad93d;const _0x5464af=(_0x503923=this[_0x405b35(0x1de)][_0x405b35(0x1c6)](_0x3e8dae[_0x405b35(0x1e4)])[_0x405b35(0x1b7)](_0x80ca6a=>_0x80ca6a[_0x405b35(0x1ce)]===_0x3e8dae['threadId']))==null?void 0x0:_0x503923['root'];if(!_0x5464af)return;const {unitId:_0x511381,subUnitId:_0x17ff6d}=_0x5464af;switch(_0x3e8dae['user']&&this['_userService']['addUser'](_0x3e8dae['user']),_0x3e8dae['type']){case v[_0x405b35(0x1e2)]:break;case v[_0x405b35(0x1c1)]:{this[_0x405b35(0x1de)][_0x405b35(0x179)](_0x511381,_0x17ff6d,{'unitId':_0x511381,'subUnitId':_0x17ff6d,'ref':'','id':_0x3e8dae['replyId'],'dT':f(+_0x3e8dae[_0x405b35(0x17e)]),'threadId':_0x3e8dae[_0x405b35(0x1ce)],'personId':(_0x368a32=(_0x5c7892=_0x3e8dae[_0x405b35(0x1e6)])==null?void 0x0:_0x5c7892['userID'])!=null?_0x368a32:_0x3e8dae['userId'],'text':JSON[_0x405b35(0x1e7)](_0x3e8dae['content']),'parentId':_0x5464af['id']});break;}case v[_0x405b35(0x19c)]:{const _0x4360e3=this[_0x405b35(0x1de)][_0x405b35(0x1c5)](_0x511381,_0x17ff6d,_0x3e8dae[_0x405b35(0x1af)]);_0x4360e3&&_0x4360e3['parentId']&&this[_0x405b35(0x1de)][_0x405b35(0x1b3)](_0x511381,_0x17ff6d,_0x3e8dae[_0x405b35(0x1af)]);break;}case v[_0x405b35(0x17f)]:{this[_0x405b35(0x1de)][_0x405b35(0x1a8)](_0x511381,_0x17ff6d,{'commentId':_0x3e8dae[_0x405b35(0x1af)],'text':JSON[_0x405b35(0x1e7)](_0x3e8dae[_0x405b35(0x19a)])});break;}case v[_0x405b35(0x171)]:{const _0x4c7de8=(_0xcad93d=this[_0x405b35(0x1de)]['getUnit'](_0x3e8dae[_0x405b35(0x1e4)])['find'](_0x392747=>_0x392747[_0x405b35(0x1ce)]===_0x3e8dae['threadId']))==null?void 0x0:_0xcad93d[_0x405b35(0x187)];_0x4c7de8&&this['_threadCommentModel'][_0x405b35(0x19e)](_0x511381,_0x17ff6d,_0x4c7de8['id'],_0x3e8dae[_0x405b35(0x1c8)]===I[_0x405b35(0x1d8)]);break;}}}));}};_=E([S(0x0,c[_0x5f45a4(0x1db)](b[_0x5f45a4(0x1a9)])),S(0x1,c[_0x5f45a4(0x1db)](M[_0x5f45a4(0x198)])),S(0x2,c['Inject'](c[_0x5f45a4(0x173)])),S(0x3,c[_0x5f45a4(0x1db)](c[_0x5f45a4(0x1df)]))],_);const q=_0x5f45a4(0x1da),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x472959,_0x119fc8,_0x5e5e52,_0x15a0e4)=>{for(var _0x14a426=_0x15a0e4>0x1?void 0x0:_0x15a0e4?A(_0x119fc8,_0x5e5e52):_0x119fc8,_0x17a3bf=_0x472959['length']-0x1,_0x4cc5d7;_0x17a3bf>=0x0;_0x17a3bf--)(_0x4cc5d7=_0x472959[_0x17a3bf])&&(_0x14a426=_0x4cc5d7(_0x14a426)||_0x14a426);return _0x14a426;},C=(_0x3aab8d,_0x5ab867)=>(_0x172dba,_0x2d72b1)=>_0x5ab867(_0x172dba,_0x2d72b1,_0x3aab8d);function Y(_0x5cf7aa,_0x3c7ab8){const _0x14c208=_0x5f45a4,_0x1cfbcd=_0x5cf7aa[_0x14c208(0x1d5)][0x0];return{..._0x3c7ab8,'id':_0x1cfbcd[_0x14c208(0x1af)],'resolved':_0x5cf7aa['solved']===0x1,'dT':f(_0x1cfbcd[_0x14c208(0x17e)]),'personId':_0x1cfbcd['userId'],'threadId':_0x1cfbcd[_0x14c208(0x1ce)]};}function G(_0x387779,_0x14f713,_0x43deae){const _0x4f20b3=_0x5f45a4;var _0xa97c37,_0x982c16;if(((_0x982c16=(_0xa97c37=_0x387779==null?void 0x0:_0x387779[_0x4f20b3(0x1d5)])==null?void 0x0:_0xa97c37[_0x4f20b3(0x1d4)])!=null?_0x982c16:0x0)>0x0){const _0xc8f535=(_0x37bf9a,_0x1c2cb4)=>({'id':_0x37bf9a['replyId'],'threadId':_0x37bf9a[_0x4f20b3(0x1ce)],'dT':f(_0x37bf9a['createTimestamp']),'personId':_0x37bf9a[_0x4f20b3(0x1a2)],'resolved':_0x387779[_0x4f20b3(0x1c8)]===I[_0x4f20b3(0x1d8)],'unitId':_0x14f713,'subUnitId':_0x43deae,'text':JSON[_0x4f20b3(0x1e7)](_0x37bf9a[_0x4f20b3(0x19a)]),'parentId':_0x1c2cb4}),_0x34a381=_0xc8f535(_0x387779[_0x4f20b3(0x1d5)][0x0]);return{..._0x34a381,'children':_0x387779[_0x4f20b3(0x1d5)][_0x4f20b3(0x199)](0x1)[_0x4f20b3(0x19b)](_0x24021b=>_0xc8f535(_0x24021b,_0x34a381['id']))};}return null;}let p=class{constructor(_0x1a946d,_0x563784,_0x71c5ad){const _0x41d49d=_0x5f45a4;this[_0x41d49d(0x18a)]=_0x1a946d,this[_0x41d49d(0x1e5)]=_0x563784,this['_sessionService']=_0x71c5ad;}async[_0x5f45a4(0x179)](_0x166def){const _0x29ce92=_0x5f45a4;var _0x237b29,_0x3f832c;const {parentId:_0x1c4803,unitId:_0x5c60af,text:_0x40ebe8,threadId:_0xcf5dd8}=_0x166def,_0x142825=(_0x3f832c=(_0x237b29=_0x40ebe8[_0x29ce92(0x1e8)])==null?void 0x0:_0x237b29[_0x29ce92(0x19f)](_0x43868c=>_0x43868c[_0x29ce92(0x1c9)]===c[_0x29ce92(0x1d7)][_0x29ce92(0x1bd)])[_0x29ce92(0x19b)](_0xbd2c5a=>_0xbd2c5a['rangeId']))!=null?_0x3f832c:[],_0x898519=JSON[_0x29ce92(0x1c0)](_0x40ebe8),_0x5113fb=(await this[_0x29ce92(0x1bf)][_0x29ce92(0x1d1)](_0x5c60af))['getMemberID']();if(_0x1c4803){const _0x1afba8={'memberId':_0x5113fb,'unitId':_0x5c60af,'content':_0x898519,'mention':_0x142825,'threadId':_0xcf5dd8},_0x3cec0d=(await this['_httpService'][_0x29ce92(0x182)](_0x29ce92(0x1b0)+_0x5c60af+_0x29ce92(0x1dd),{'body':_0x1afba8}))[_0x29ce92(0x1c7)][_0x29ce92(0x1a3)];return{..._0x166def,'id':_0x3cec0d['replyId'],'dT':c['dayjs'](+_0x3cec0d[_0x29ce92(0x17e)])['format'](_0x29ce92(0x181)),'personId':_0x3cec0d['userId']};}else{const _0x32c215={'memberId':_0x5113fb,'unitId':_0x5c60af,'content':_0x898519,'mention':_0x142825},_0x54bcb7=await this[_0x29ce92(0x18a)][_0x29ce92(0x182)](_0x29ce92(0x1b0)+_0x5c60af+_0x29ce92(0x1b2),{'body':_0x32c215});return Y(_0x54bcb7['body'][_0x29ce92(0x1be)],_0x166def);}}async[_0x5f45a4(0x1a8)](_0x1879f7){const _0xef4a1b=_0x5f45a4;var _0x12913b,_0x15937b;const {text:_0x5eafdd,unitId:_0x4d8a2e}=_0x1879f7,_0x3b3e56=(_0x15937b=(_0x12913b=_0x5eafdd[_0xef4a1b(0x1e8)])==null?void 0x0:_0x12913b[_0xef4a1b(0x19f)](_0x4ddf52=>_0x4ddf52[_0xef4a1b(0x1c9)]===c['CustomRangeType'][_0xef4a1b(0x1bd)])['map'](_0x3ad0bd=>_0x3ad0bd[_0xef4a1b(0x1cb)]))!=null?_0x15937b:[],_0x2caaa4=JSON[_0xef4a1b(0x1c0)](_0x5eafdd),_0x2383bc=_0x1879f7[_0xef4a1b(0x1ce)],_0x4829dd=_0x1879f7['id'],_0x5d635e={'memberId':(await this[_0xef4a1b(0x1bf)]['requireSession'](_0x4d8a2e))[_0xef4a1b(0x1d3)](),'unitId':_0x4d8a2e,'threadId':_0x2383bc,'mention':_0x3b3e56,'content':_0x2caaa4,'replyId':_0x4829dd},_0x701d1e=await this['_httpService'][_0xef4a1b(0x182)](_0xef4a1b(0x1b0)+_0x4d8a2e+'/edit',{'body':_0x5d635e});return!_0x701d1e[_0xef4a1b(0x1c7)][_0xef4a1b(0x183)]||_0x701d1e[_0xef4a1b(0x1c7)][_0xef4a1b(0x183)][_0xef4a1b(0x194)]===0x1;}async[_0x5f45a4(0x19e)](_0x57c8ef){const _0x1ec892=_0x5f45a4,{unitId:_0x558b19}=_0x57c8ef,_0x58f077=_0x57c8ef['threadId'],_0x126560={'memberId':this['_userService'][_0x1ec892(0x188)]()[_0x1ec892(0x197)],'unitId':_0x558b19,'threadId':_0x58f077,'solved':_0x57c8ef[_0x1ec892(0x1a4)]?I['Solved']:I[_0x1ec892(0x1a7)]},_0x4669c7=await this['_httpService'][_0x1ec892(0x182)](_0x1ec892(0x1b0)+_0x558b19+_0x1ec892(0x1b6),{'body':_0x126560});return!_0x4669c7['body'][_0x1ec892(0x183)]||_0x4669c7[_0x1ec892(0x1c7)][_0x1ec892(0x183)][_0x1ec892(0x194)]===0x1;}async[_0x5f45a4(0x1b3)](_0x48bb20,_0x5188f4,_0x68e7fb,_0x27c462){const _0x7408c9=_0x5f45a4,_0x123603={'memberId':(await this[_0x7408c9(0x1bf)][_0x7408c9(0x1d1)](_0x48bb20))[_0x7408c9(0x1d3)](),'threadId':_0x68e7fb,'replyId':_0x27c462,'unitId':_0x48bb20},_0x373488=await this[_0x7408c9(0x18a)]['post'](_0x7408c9(0x1b0)+_0x48bb20+_0x7408c9(0x18f),{'body':_0x123603});return!_0x373488[_0x7408c9(0x1c7)][_0x7408c9(0x183)]||_0x373488[_0x7408c9(0x1c7)]['error']['code']===0x1;}async[_0x5f45a4(0x1ad)](_0x506a55,_0x111f57,_0x23729f){const _0x1fb48a=_0x5f45a4,_0xd30a5e={'unitId':_0x506a55,'threadId':_0x23729f},_0x37e289=await this[_0x1fb48a(0x18a)]['post'](_0x1fb48a(0x1b0)+_0x506a55+'/list',{'body':_0xd30a5e}),_0x3deb2=_0x23729f[_0x1fb48a(0x19b)](_0x205123=>G(_0x37e289[_0x1fb48a(0x1c7)][_0x1fb48a(0x18b)][_0x205123],_0x506a55,_0x111f57))[_0x1fb48a(0x19f)](Boolean);return Object[_0x1fb48a(0x17c)](_0x37e289['body'][_0x1fb48a(0x18d)])[_0x1fb48a(0x190)](_0xf96ba4=>{const _0x3d4809=_0x1fb48a;this[_0x3d4809(0x1e5)][_0x3d4809(0x1a6)](_0xf96ba4);}),_0x3deb2;}[_0x5f45a4(0x1d6)](_0x139209){const _0x33e4eb=_0x5f45a4;return{'id':_0x139209['id'],'threadId':_0x139209['threadId'],'ref':_0x139209[_0x33e4eb(0x19d)]};}};p=x([C(0x0,c[_0x5f45a4(0x1db)](P[_0x5f45a4(0x1b9)])),C(0x1,c[_0x5f45a4(0x1db)](c['UserManagerService'])),C(0x2,c[_0x5f45a4(0x1db)](b[_0x5f45a4(0x1cf)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x28b87d,_0x62d820,_0x387c3f,_0xecd3a5)=>{const _0x377521=_0x5f45a4;for(var _0x4c6b46=_0xecd3a5>0x1?void 0x0:_0xecd3a5?H(_0x62d820,_0x387c3f):_0x62d820,_0x3d3767=_0x28b87d[_0x377521(0x1d4)]-0x1,_0x45f522;_0x3d3767>=0x0;_0x3d3767--)(_0x45f522=_0x28b87d[_0x3d3767])&&(_0x4c6b46=_0x45f522(_0x4c6b46)||_0x4c6b46);return _0x4c6b46;},y=(_0xb3adb2,_0x2648aa)=>(_0x5b3ec7,_0x3ab47a)=>_0x2648aa(_0x5b3ec7,_0x3ab47a,_0xb3adb2);let g=class extends c['Disposable']{constructor(_0x369789,_0x58a55f){const _0x5a8b57=_0x5f45a4;super(),this[_0x5a8b57(0x18c)]=_0x369789,this['_threadCommentDataSource']=_0x58a55f,this['_initDataSource']();}[_0x5f45a4(0x176)](){const _0x5f527c=_0x5f45a4;this[_0x5f527c(0x18c)][_0x5f527c(0x1aa)]=this['_threadCommentDataSource'],this[_0x5f527c(0x18c)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x5f45a4(0x1e1)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x5f45a4(0x1a5)],L=Object[_0x5f45a4(0x1e0)],Z=(_0x33154d,_0x55b1cd,_0x37e4da)=>_0x55b1cd in _0x33154d?F(_0x33154d,_0x55b1cd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37e4da}):_0x33154d[_0x55b1cd]=_0x37e4da,W=(_0x316c26,_0x4227ae,_0x47fec4,_0x50d8d3)=>{const _0x2be59f=_0x5f45a4;for(var _0xe52bc0=_0x50d8d3>0x1?void 0x0:_0x50d8d3?L(_0x4227ae,_0x47fec4):_0x4227ae,_0xeacf29=_0x316c26[_0x2be59f(0x1d4)]-0x1,_0x4bac95;_0xeacf29>=0x0;_0xeacf29--)(_0x4bac95=_0x316c26[_0xeacf29])&&(_0xe52bc0=_0x4bac95(_0xe52bc0)||_0xe52bc0);return _0xe52bc0;},O=(_0x3cd7ec,_0x1798ee)=>(_0xb37364,_0x437a1f)=>_0x1798ee(_0xb37364,_0x437a1f,_0x3cd7ec),N=(_0x2e9a70,_0xe9e545,_0x55cc80)=>Z(_0x2e9a70,typeof _0xe9e545!='symbol'?_0xe9e545+'':_0xe9e545,_0x55cc80);function _0x1444(_0x223419,_0x5b0415){_0x223419=_0x223419-0x171;const _0x35843f=_0x3584();let _0x144494=_0x35843f[_0x223419];return _0x144494;}exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x110189=D,_0x14a32f,_0x67f013){const _0x3a576e=_0x5f45a4;super(),this[_0x3a576e(0x195)]=_0x110189,this[_0x3a576e(0x1c4)]=_0x14a32f,this['_configService']=_0x67f013;const {..._0x5e43ee}=c[_0x3a576e(0x180)]({},D,this['_config']);this['_configService'][_0x3a576e(0x1a1)](q,_0x5e43ee);}[_0x5f45a4(0x1ac)](){const _0x2a7889=_0x5f45a4;[[p],[g],[_]][_0x2a7889(0x190)](_0x1bc9ca=>{const _0x396623=_0x2a7889;this[_0x396623(0x1c4)][_0x396623(0x1a0)](_0x1bc9ca);});}[_0x5f45a4(0x1ba)](){const _0x49d572=_0x5f45a4;this[_0x49d572(0x1c4)][_0x49d572(0x17d)](g),this[_0x49d572(0x1c4)]['get'](_);}},N(exports[_0x5f45a4(0x18e)],_0x5f45a4(0x1bc),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x5f45a4(0x1b8),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x5f45a4(0x18e)]=W([c[_0x5f45a4(0x1dc)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x5f45a4(0x1bb)]),O(0x1,c[_0x5f45a4(0x1db)](c[_0x5f45a4(0x1df)])),O(0x2,c[_0x5f45a4(0x191)])],exports[_0x5f45a4(0x18e)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x390ebd=_0xb832;(function(_0x10052c,_0x44c00b){const _0x555670=_0xb832,_0x19b972=_0x10052c();while(!![]){try{const _0x1c2fd4=parseInt(_0x555670(0x16e))/0x1+-parseInt(_0x555670(0x167))/0x2+parseInt(_0x555670(0x16d))/0x3+parseInt(_0x555670(0x159))/0x4+parseInt(_0x555670(0x15a))/0x5*(-parseInt(_0x555670(0x1be))/0x6)+parseInt(_0x555670(0x1bc))/0x7*(parseInt(_0x555670(0x16f))/0x8)+parseInt(_0x555670(0x18a))/0x9*(-parseInt(_0x555670(0x1a1))/0xa);if(_0x1c2fd4===_0x44c00b)break;else _0x19b972['push'](_0x19b972['shift']());}catch(_0x21deba){_0x19b972['push'](_0x19b972['shift']());}}}(_0x48f8,0x8f0a6));import{CommentService as _0x5b9634,CollaborationSessionService as _0x1815bc,UniverCollaborationClientPlugin as _0x395b52}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x16cf6f}from'@univerjs-pro/license';import{dayjs as _0x252e0c,UserManagerService as _0x3039bd,Inject as _0x1a89d1,Injector as _0x11e476,Disposable as _0xdcc8ac,CustomRangeType as _0x339677,UniverInstanceType as _0x16c046,DependentOn as _0x5b7f34,IConfigService as _0x828273,Plugin as _0x1d42c8,merge as _0x22269a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59d47d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1356a4,IThreadCommentDataSourceService as _0x46c254}from'@univerjs/thread-comment';import{bufferTime as _0x242edb}from'rxjs';import{HTTPService as _0x28a050}from'@univerjs/network';const W=_0x390ebd(0x18f);var I=(_0x531b8b=>(_0x531b8b[_0x531b8b[_0x390ebd(0x1a5)]=0x0]=_0x390ebd(0x1a5),_0x531b8b[_0x531b8b['Solved']=0x1]=_0x390ebd(0x176),_0x531b8b[_0x531b8b['UNRECOGNIZED']=-0x1]=_0x390ebd(0x19a),_0x531b8b))(I||{}),v=(_0x1b8941=>(_0x1b8941[_0x1b8941['Unknown']=0x0]='Unknown',_0x1b8941[_0x1b8941[_0x390ebd(0x187)]=0x1]='Add',_0x1b8941[_0x1b8941['Reply']=0x2]=_0x390ebd(0x189),_0x1b8941[_0x1b8941['Edit']=0x3]=_0x390ebd(0x1a4),_0x1b8941[_0x1b8941[_0x390ebd(0x193)]=0x4]=_0x390ebd(0x193),_0x1b8941[_0x1b8941['Solve']=0x5]='Solve',_0x1b8941[_0x1b8941[_0x390ebd(0x19a)]=-0x1]=_0x390ebd(0x19a),_0x1b8941))(v||{});const y=_0x416089=>_0x252e0c(new Date(+_0x416089))['format'](_0x390ebd(0x17d)),B=async(_0x3bd88d,_0xed1b20)=>{const _0xe95c37=_0x390ebd,_0x850852=_0x3bd88d[_0xe95c37(0x194)](_0x3039bd),_0x4752c7=_0x3bd88d['get'](_0x28a050);_0xed1b20['forEach'](_0x1ced2d=>{const _0x1b55e7=_0xe95c37;_0x850852[_0x1b55e7(0x1a7)](_0x1ced2d)&&_0xed1b20[_0x1b55e7(0x18c)](_0x1ced2d);}),_0xed1b20[_0xe95c37(0x19b)]&&(await _0x4752c7[_0xe95c37(0x194)](_0xe95c37(0x171),{'params':{'userIDs':[..._0xed1b20]}}))[_0xe95c37(0x1aa)][_0xe95c37(0x190)][_0xe95c37(0x186)](_0x427edb=>{_0x427edb&&_0x850852['addUser'](_0x427edb);});};var K=Object[_0x390ebd(0x197)],V=(_0x8bbdb3,_0x57ca97,_0x7a84d6,_0x2114c8)=>{const _0x3d7b91=_0x390ebd;for(var _0x1b4225=_0x2114c8>0x1?void 0x0:_0x2114c8?K(_0x57ca97,_0x7a84d6):_0x57ca97,_0x31ce4e=_0x8bbdb3[_0x3d7b91(0x19f)]-0x1,_0x52c782;_0x31ce4e>=0x0;_0x31ce4e--)(_0x52c782=_0x8bbdb3[_0x31ce4e])&&(_0x1b4225=_0x52c782(_0x1b4225)||_0x1b4225);return _0x1b4225;},p=(_0x30effb,_0xd151e)=>(_0x339de0,_0x1df885)=>_0xd151e(_0x339de0,_0x1df885,_0x30effb);let _=class extends _0xdcc8ac{constructor(_0x4cfc7f,_0x4442dc,_0x33e7d6,_0x57f45d){const _0x1f6528=_0x390ebd;super(),this[_0x1f6528(0x179)]=_0x4cfc7f,this['_threadCommentModel']=_0x4442dc,this[_0x1f6528(0x160)]=_0x33e7d6,this['_injector']=_0x57f45d,this[_0x1f6528(0x16a)](),this[_0x1f6528(0x170)]();}[_0x390ebd(0x170)](){const _0xe28928=_0x390ebd;this[_0xe28928(0x1a3)](this[_0xe28928(0x15b)][_0xe28928(0x15c)][_0xe28928(0x161)](_0x242edb(0x10))['subscribe'](_0x810c8f=>{const _0x248e08=_0xe28928,_0xbdda71=new Set();_0x810c8f[_0x248e08(0x186)](_0x104c92=>{const _0x571adc=_0x248e08;switch(_0x104c92[_0x571adc(0x17b)]){case _0x571adc(0x198):{const _0xfff2fa=_0x104c92[_0x571adc(0x1a2)]['personId'];_0xbdda71[_0x571adc(0x198)](_0xfff2fa);break;}}}),B(this[_0x248e08(0x19e)],_0xbdda71);}));}[_0x390ebd(0x16a)](){const _0x56cae4=_0x390ebd;this[_0x56cae4(0x1a3)](this[_0x56cae4(0x179)][_0x56cae4(0x15c)][_0x56cae4(0x184)](async _0x27bf83=>{const _0x333319=_0x56cae4;var _0x476ce8,_0x3925be,_0x40bc82,_0x566ed4;const _0x1b008c=(_0x476ce8=this[_0x333319(0x15b)]['getUnit'](_0x27bf83['unitId'])[_0x333319(0x17f)](_0x174b29=>_0x174b29[_0x333319(0x17c)]===_0x27bf83[_0x333319(0x17c)]))==null?void 0x0:_0x476ce8['root'];if(!_0x1b008c)return;const {unitId:_0x12b361,subUnitId:_0x1dcd14}=_0x1b008c;switch(_0x27bf83[_0x333319(0x175)]&&this['_userService'][_0x333319(0x180)](_0x27bf83['user']),_0x27bf83[_0x333319(0x17b)]){case v[_0x333319(0x187)]:break;case v[_0x333319(0x189)]:{this[_0x333319(0x15b)][_0x333319(0x1ac)](_0x12b361,_0x1dcd14,{'unitId':_0x12b361,'subUnitId':_0x1dcd14,'ref':'','id':_0x27bf83[_0x333319(0x195)],'dT':y(+_0x27bf83['createTimestamp']),'threadId':_0x27bf83[_0x333319(0x17c)],'personId':(_0x40bc82=(_0x3925be=_0x27bf83[_0x333319(0x175)])==null?void 0x0:_0x3925be[_0x333319(0x18d)])!=null?_0x40bc82:_0x27bf83[_0x333319(0x1b8)],'text':JSON[_0x333319(0x162)](_0x27bf83[_0x333319(0x1ad)]),'parentId':_0x1b008c['id']});break;}case v['Delete']:{const _0x26410b=this[_0x333319(0x15b)]['getComment'](_0x12b361,_0x1dcd14,_0x27bf83[_0x333319(0x195)]);_0x26410b&&_0x26410b[_0x333319(0x19c)]&&this[_0x333319(0x15b)]['deleteComment'](_0x12b361,_0x1dcd14,_0x27bf83[_0x333319(0x195)]);break;}case v['Edit']:{this[_0x333319(0x15b)][_0x333319(0x1b6)](_0x12b361,_0x1dcd14,{'commentId':_0x27bf83[_0x333319(0x195)],'text':JSON[_0x333319(0x162)](_0x27bf83['content'])});break;}case v[_0x333319(0x1a0)]:{const _0x26202a=(_0x566ed4=this['_threadCommentModel'][_0x333319(0x181)](_0x27bf83[_0x333319(0x15f)])[_0x333319(0x17f)](_0x4b5345=>_0x4b5345[_0x333319(0x17c)]===_0x27bf83[_0x333319(0x17c)]))==null?void 0x0:_0x566ed4[_0x333319(0x1a8)];_0x26202a&&this[_0x333319(0x15b)][_0x333319(0x157)](_0x12b361,_0x1dcd14,_0x26202a['id'],_0x27bf83[_0x333319(0x196)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x1a89d1(_0x5b9634)),p(0x1,_0x1a89d1(_0x1356a4)),p(0x2,_0x1a89d1(_0x3039bd)),p(0x3,_0x1a89d1(_0x11e476))],_);function _0xb832(_0x4368d3,_0x1f71ee){_0x4368d3=_0x4368d3-0x157;const _0x48f8e7=_0x48f8();let _0xb83245=_0x48f8e7[_0x4368d3];return _0xb83245;}const z=_0x390ebd(0x1b2),O={};var k=Object[_0x390ebd(0x197)],Q=(_0x32e31a,_0x34f7e7,_0x1d3f16,_0x172180)=>{const _0xfe2134=_0x390ebd;for(var _0x26c6da=_0x172180>0x1?void 0x0:_0x172180?k(_0x34f7e7,_0x1d3f16):_0x34f7e7,_0x571f89=_0x32e31a[_0xfe2134(0x19f)]-0x1,_0x1636e4;_0x571f89>=0x0;_0x571f89--)(_0x1636e4=_0x32e31a[_0x571f89])&&(_0x26c6da=_0x1636e4(_0x26c6da)||_0x26c6da);return _0x26c6da;},b=(_0x530f71,_0x368fda)=>(_0x379903,_0x172958)=>_0x368fda(_0x379903,_0x172958,_0x530f71);function X(_0x52ec88,_0x5f4cea){const _0x57ac86=_0x390ebd,_0x1b44c1=_0x52ec88['replies'][0x0];return{..._0x5f4cea,'id':_0x1b44c1['replyId'],'resolved':_0x52ec88[_0x57ac86(0x196)]===0x1,'dT':y(_0x1b44c1['createTimestamp']),'personId':_0x1b44c1[_0x57ac86(0x1b8)],'threadId':_0x1b44c1[_0x57ac86(0x17c)]};}function ee(_0x1c3ff9,_0x54b2b7,_0x499b7a){const _0xb8ea17=_0x390ebd;var _0x1b7dde,_0x52bb2e;if(((_0x52bb2e=(_0x1b7dde=_0x1c3ff9==null?void 0x0:_0x1c3ff9[_0xb8ea17(0x1b4)])==null?void 0x0:_0x1b7dde[_0xb8ea17(0x19f)])!=null?_0x52bb2e:0x0)>0x0){const _0x10d111=(_0x12acf0,_0x51a6eb)=>({'id':_0x12acf0['replyId'],'threadId':_0x12acf0['threadId'],'dT':y(_0x12acf0[_0xb8ea17(0x183)]),'personId':_0x12acf0[_0xb8ea17(0x1b8)],'resolved':_0x1c3ff9['solved']===I[_0xb8ea17(0x176)],'unitId':_0x54b2b7,'subUnitId':_0x499b7a,'text':JSON['parse'](_0x12acf0[_0xb8ea17(0x1ad)]),'parentId':_0x51a6eb}),_0x18f4ce=_0x10d111(_0x1c3ff9['replies'][0x0]);return{..._0x18f4ce,'children':_0x1c3ff9[_0xb8ea17(0x1b4)][_0xb8ea17(0x1ae)](0x1)['map'](_0xc35bea=>_0x10d111(_0xc35bea,_0x18f4ce['id']))};}return null;}let S=class{constructor(_0x46f022,_0x56f40a,_0x2cc885){const _0x28410a=_0x390ebd;this[_0x28410a(0x15e)]=_0x46f022,this[_0x28410a(0x160)]=_0x56f40a,this[_0x28410a(0x1b5)]=_0x2cc885;}async[_0x390ebd(0x1ac)](_0x39c4be){const _0x29ffc7=_0x390ebd;var _0x3f759c,_0x4d151f;const {parentId:_0x34d7c7,unitId:_0x114d34,text:_0x14d38e,threadId:_0x387a9a}=_0x39c4be,_0x45198f=(_0x4d151f=(_0x3f759c=_0x14d38e[_0x29ffc7(0x16b)])==null?void 0x0:_0x3f759c[_0x29ffc7(0x1ab)](_0x5bc132=>_0x5bc132[_0x29ffc7(0x18e)]===_0x339677[_0x29ffc7(0x1bd)])['map'](_0x40e817=>_0x40e817[_0x29ffc7(0x19d)]))!=null?_0x4d151f:[],_0x4d3bca=JSON[_0x29ffc7(0x163)](_0x14d38e),_0x360cb6=(await this[_0x29ffc7(0x1b5)][_0x29ffc7(0x172)](_0x114d34))[_0x29ffc7(0x188)]();if(_0x34d7c7){const _0x41a87e={'memberId':_0x360cb6,'unitId':_0x114d34,'content':_0x4d3bca,'mention':_0x45198f,'threadId':_0x387a9a},_0x46ebc4=(await this[_0x29ffc7(0x15e)][_0x29ffc7(0x1ba)](_0x29ffc7(0x1b9)+_0x114d34+_0x29ffc7(0x1b0),{'body':_0x41a87e}))[_0x29ffc7(0x1aa)][_0x29ffc7(0x173)];return{..._0x39c4be,'id':_0x46ebc4[_0x29ffc7(0x195)],'dT':_0x252e0c(+_0x46ebc4['createTimestamp'])[_0x29ffc7(0x192)](_0x29ffc7(0x17d)),'personId':_0x46ebc4['userId']};}else{const _0x5122a2={'memberId':_0x360cb6,'unitId':_0x114d34,'content':_0x4d3bca,'mention':_0x45198f},_0xa9d2ff=await this[_0x29ffc7(0x15e)][_0x29ffc7(0x1ba)](_0x29ffc7(0x1b9)+_0x114d34+'/add',{'body':_0x5122a2});return X(_0xa9d2ff[_0x29ffc7(0x1aa)][_0x29ffc7(0x1a9)],_0x39c4be);}}async[_0x390ebd(0x1b6)](_0x3315fe){const _0x5d50cc=_0x390ebd;var _0x4788a8,_0x809d75;const {text:_0x12fd68,unitId:_0x231c69}=_0x3315fe,_0x386f40=(_0x809d75=(_0x4788a8=_0x12fd68['customRanges'])==null?void 0x0:_0x4788a8[_0x5d50cc(0x1ab)](_0x42f56c=>_0x42f56c[_0x5d50cc(0x18e)]===_0x339677[_0x5d50cc(0x1bd)])[_0x5d50cc(0x1a6)](_0x514401=>_0x514401[_0x5d50cc(0x19d)]))!=null?_0x809d75:[],_0x445ca6=JSON[_0x5d50cc(0x163)](_0x12fd68),_0x2fd922=_0x3315fe[_0x5d50cc(0x17c)],_0x3057e6=_0x3315fe['id'],_0x30ba8f={'memberId':(await this[_0x5d50cc(0x1b5)][_0x5d50cc(0x172)](_0x231c69))[_0x5d50cc(0x188)](),'unitId':_0x231c69,'threadId':_0x2fd922,'mention':_0x386f40,'content':_0x445ca6,'replyId':_0x3057e6},_0x395ff9=await this[_0x5d50cc(0x15e)][_0x5d50cc(0x1ba)]('/universer-api/comment/unit/'+_0x231c69+_0x5d50cc(0x177),{'body':_0x30ba8f});return!_0x395ff9['body'][_0x5d50cc(0x174)]||_0x395ff9[_0x5d50cc(0x1aa)][_0x5d50cc(0x174)][_0x5d50cc(0x164)]===0x1;}async[_0x390ebd(0x157)](_0x44be1a){const _0x283893=_0x390ebd,{unitId:_0x36d7bc}=_0x44be1a,_0x565663=_0x44be1a['threadId'],_0x115acc={'memberId':this[_0x283893(0x160)][_0x283893(0x1bb)]()['userID'],'unitId':_0x36d7bc,'threadId':_0x565663,'solved':_0x44be1a[_0x283893(0x1af)]?I[_0x283893(0x176)]:I[_0x283893(0x1a5)]},_0x1c6b6c=await this[_0x283893(0x15e)][_0x283893(0x1ba)]('/universer-api/comment/unit/'+_0x36d7bc+_0x283893(0x165),{'body':_0x115acc});return!_0x1c6b6c[_0x283893(0x1aa)][_0x283893(0x174)]||_0x1c6b6c[_0x283893(0x1aa)][_0x283893(0x174)][_0x283893(0x164)]===0x1;}async[_0x390ebd(0x17e)](_0x4b2fc3,_0x13a00a,_0x4fadb3,_0x7a4c70){const _0x1cf08a=_0x390ebd,_0x16cfa3={'memberId':(await this[_0x1cf08a(0x1b5)][_0x1cf08a(0x172)](_0x4b2fc3))[_0x1cf08a(0x188)](),'threadId':_0x4fadb3,'replyId':_0x7a4c70,'unitId':_0x4b2fc3},_0x192dd4=await this[_0x1cf08a(0x15e)]['post'](_0x1cf08a(0x1b9)+_0x4b2fc3+_0x1cf08a(0x18b),{'body':_0x16cfa3});return!_0x192dd4['body'][_0x1cf08a(0x174)]||_0x192dd4[_0x1cf08a(0x1aa)][_0x1cf08a(0x174)][_0x1cf08a(0x164)]===0x1;}async[_0x390ebd(0x15d)](_0x58f3de,_0x90df94,_0x3f6189){const _0x5396b4=_0x390ebd,_0x2d931c={'unitId':_0x58f3de,'threadId':_0x3f6189},_0x1ca2e2=await this[_0x5396b4(0x15e)][_0x5396b4(0x1ba)]('/universer-api/comment/unit/'+_0x58f3de+_0x5396b4(0x17a),{'body':_0x2d931c}),_0x447a58=_0x3f6189['map'](_0x18e918=>ee(_0x1ca2e2[_0x5396b4(0x1aa)][_0x5396b4(0x182)][_0x18e918],_0x58f3de,_0x90df94))[_0x5396b4(0x1ab)](Boolean);return Object['values'](_0x1ca2e2['body']['users'])[_0x5396b4(0x186)](_0x471c2b=>{const _0x3fb686=_0x5396b4;this[_0x3fb686(0x160)][_0x3fb686(0x180)](_0x471c2b);}),_0x447a58;}[_0x390ebd(0x178)](_0x55cffb){const _0x3c2b42=_0x390ebd;return{'id':_0x55cffb['id'],'threadId':_0x55cffb[_0x3c2b42(0x17c)],'ref':_0x55cffb[_0x3c2b42(0x1b7)]};}};S=Q([b(0x0,_0x1a89d1(_0x28a050)),b(0x1,_0x1a89d1(_0x3039bd)),b(0x2,_0x1a89d1(_0x1815bc))],S);var re=Object[_0x390ebd(0x197)],te=(_0x1fce58,_0x58cca3,_0x1819f0,_0x39d9b6)=>{const _0x24ae52=_0x390ebd;for(var _0x43fb58=_0x39d9b6>0x1?void 0x0:_0x39d9b6?re(_0x58cca3,_0x1819f0):_0x58cca3,_0x3c82f4=_0x1fce58[_0x24ae52(0x19f)]-0x1,_0x1b0197;_0x3c82f4>=0x0;_0x3c82f4--)(_0x1b0197=_0x1fce58[_0x3c82f4])&&(_0x43fb58=_0x1b0197(_0x43fb58)||_0x43fb58);return _0x43fb58;},M=(_0x32d953,_0x4a6396)=>(_0x2dfc45,_0x3d11db)=>_0x4a6396(_0x2dfc45,_0x3d11db,_0x32d953);let f=class extends _0xdcc8ac{constructor(_0x26677a,_0x4923c7){const _0x5ab973=_0x390ebd;super(),this[_0x5ab973(0x191)]=_0x26677a,this['_threadCommentDataSource']=_0x4923c7,this[_0x5ab973(0x16c)]();}['_initDataSource'](){const _0x3cd22c=_0x390ebd;this[_0x3cd22c(0x191)][_0x3cd22c(0x1b3)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x3cd22c(0x168)]=!0x1;}};f=te([M(0x0,_0x46c254),M(0x1,_0x1a89d1(S))],f);var se=Object[_0x390ebd(0x199)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xa7fc83,_0x120229,_0x87295e)=>_0x120229 in _0xa7fc83?se(_0xa7fc83,_0x120229,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x87295e}):_0xa7fc83[_0x120229]=_0x87295e,ie=(_0x391ecd,_0x46da9d,_0x44421c,_0x16df4c)=>{for(var _0x16e47f=_0x16df4c>0x1?void 0x0:_0x16df4c?oe(_0x46da9d,_0x44421c):_0x46da9d,_0x1b9df9=_0x391ecd['length']-0x1,_0x3d7a23;_0x1b9df9>=0x0;_0x1b9df9--)(_0x3d7a23=_0x391ecd[_0x1b9df9])&&(_0x16e47f=_0x3d7a23(_0x16e47f)||_0x16e47f);return _0x16e47f;},N=(_0x2b4efa,_0xb5c73c)=>(_0x558afc,_0x4cd159)=>_0xb5c73c(_0x558afc,_0x4cd159,_0x2b4efa),$=(_0x135955,_0x2bce72,_0x3b8b78)=>ne(_0x135955,typeof _0x2bce72!=_0x390ebd(0x169)?_0x2bce72+'':_0x2bce72,_0x3b8b78);function _0x48f8(){const _0x21d76e=['70188CfXhuL','resolveComment','UNIVER_UNKNOWN','860528khrtpi','90QQqvjn','_threadCommentModel','commentUpdate$','listComments','_httpService','unitId','_userService','pipe','parse','stringify','code','/solved','setConfig','2161640hjUeBk','syncUpdateMutationToColla','symbol','_init','customRanges','_initDataSource','851199pytMiX','371447MXUIly','8IMDaJC','_initUserSync','/universer-api/user/list','requireSession','reply','error','user','Solved','/edit','saveCommentToSnapshot','_commentService','/list','type','threadId','YYYY/MM/DD\x20HH:mm','deleteComment','find','addUser','getUnit','comments','createTimestamp','subscribe','_config','forEach','Add','getMemberID','Reply','313326hioooz','/delete','delete','userID','rangeType','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','users','_threadCommentDataSourceService','format','Delete','get','replyId','solved','getOwnPropertyDescriptor','add','defineProperty','UNRECOGNIZED','size','parentId','rangeId','_injector','length','Solve','20eVjjfg','payload','disposeWithMe','Edit','OpenOrReOpen','map','getUser','root','comment','body','filter','addComment','content','slice','resolved','/reply','_configService','thread-comment-data-source.config','dataSource','replies','_sessionService','updateComment','ref','userId','/universer-api/comment/unit/','post','getCurrentUser','7536158gcvuvp','COMMENT'];_0x48f8=function(){return _0x21d76e;};return _0x48f8();}let g=class extends _0x1d42c8{constructor(_0x13a746=O,_0x47b0f9,_0x46f81b){const _0x6f45a2=_0x390ebd;super(),this[_0x6f45a2(0x185)]=_0x13a746,this[_0x6f45a2(0x19e)]=_0x47b0f9,this[_0x6f45a2(0x1b1)]=_0x46f81b;const {..._0x1da4a1}=_0x22269a({},O,this[_0x6f45a2(0x185)]);this[_0x6f45a2(0x1b1)][_0x6f45a2(0x166)](z,_0x1da4a1);}['onStarting'](){const _0xaed757=_0x390ebd;[[S],[f],[_]][_0xaed757(0x186)](_0x40bab0=>{const _0x2bfe02=_0xaed757;this[_0x2bfe02(0x19e)]['add'](_0x40bab0);});}['onReady'](){const _0x25286c=_0x390ebd;this[_0x25286c(0x19e)]['get'](f),this[_0x25286c(0x19e)]['get'](_);}};$(g,'pluginName',W),$(g,'type',_0x16c046[_0x390ebd(0x158)]),g=ie([_0x5b7f34(_0x59d47d,_0x395b52,_0x16cf6f),N(0x1,_0x1a89d1(_0x11e476)),N(0x2,_0x828273)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x58a68b=_0x26d7;function _0x2d31(){const _0x1441b6=['YYYY/MM/DD\x20HH:mm','9rJLwcB','/reply','resolveComment','_sessionService','personId','getOwnPropertyDescriptor','2523165UPqAFW','4pyhItl','addUser','ref','rangeType','subscribe','format','_threadCommentModel','OpenOrReOpen','length','values','type','code','/universer-api/user/list','filter','7340712XRboqF','_config','12VQvIui','parentId','listComments','post','Reply','syncUpdateMutationToColla','_injector','get','666919vMqcnm','replyId','/add','Delete','pipe','_initDataSource','1763712yuhxwL','forEach','_threadCommentDataSourceService','Solve','getUnit','/delete','map','_init','/universer-api/comment/unit/','setConfig','40826577MVizQL','/list','getCurrentUser','424eVRNXy','getUser','_commentService','updateComment','_userService','requireSession','/edit','customRanges','getMemberID','disposeWithMe','Edit','symbol','Unknown','content','users','_httpService','unitId','replies','slice','thread-comment-data-source.config','commentUpdate$','userID','stringify','184408pULYsl','COMMENT','onReady','12Mmmdmx','deleteComment','error','body','size','parse','comments','getComment','createTimestamp','UNRECOGNIZED','/solved','_initUserSync','find','user','Solved','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','4330150umnZfM','rangeId','userId','saveCommentToSnapshot','Add','solved','_configService','threadId','dataSource','root','defineProperty'];_0x2d31=function(){return _0x1441b6;};return _0x2d31();}(function(_0x362551,_0x49e7e7){const _0x2f7fa2=_0x26d7,_0x1fe2fa=_0x362551();while(!![]){try{const _0x441201=-parseInt(_0x2f7fa2(0x102))/0x1*(parseInt(_0x2f7fa2(0xea))/0x2)+parseInt(_0x2f7fa2(0x108))/0x3+-parseInt(_0x2f7fa2(0xfa))/0x4*(parseInt(_0x2f7fa2(0x152))/0x5)+parseInt(_0x2f7fa2(0xf8))/0x6+-parseInt(_0x2f7fa2(0x12c))/0x7*(parseInt(_0x2f7fa2(0x115))/0x8)+parseInt(_0x2f7fa2(0x14c))/0x9*(-parseInt(_0x2f7fa2(0x140))/0xa)+-parseInt(_0x2f7fa2(0x112))/0xb*(-parseInt(_0x2f7fa2(0x12f))/0xc);if(_0x441201===_0x49e7e7)break;else _0x1fe2fa['push'](_0x1fe2fa['shift']());}catch(_0x2d8da3){_0x1fe2fa['push'](_0x1fe2fa['shift']());}}}(_0x2d31,0xce837));import{CommentService as _0xbeb1bb,CollaborationSessionService as _0x5276ff,UniverCollaborationClientPlugin as _0xed0bc7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xe241d6}from'@univerjs-pro/license';import{dayjs as _0x54f05b,UserManagerService as _0x1fa2aa,Inject as _0x31afa8,Injector as _0x2e8e75,Disposable as _0x1e5fc7,CustomRangeType as _0x6d9c98,UniverInstanceType as _0x4977eb,DependentOn as _0x2b7f20,IConfigService as _0x5c4f8c,Plugin as _0x5c853b,merge as _0x5d724b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5439b7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43de76,IThreadCommentDataSourceService as _0x2b003d}from'@univerjs/thread-comment';import{bufferTime as _0x1043f3}from'rxjs';import{HTTPService as _0x38d411}from'@univerjs/network';const W=_0x58a68b(0x13f);var I=(_0x27d0f1=>(_0x27d0f1[_0x27d0f1[_0x58a68b(0xf1)]=0x0]=_0x58a68b(0xf1),_0x27d0f1[_0x27d0f1[_0x58a68b(0x13d)]=0x1]=_0x58a68b(0x13d),_0x27d0f1[_0x27d0f1['UNRECOGNIZED']=-0x1]=_0x58a68b(0x138),_0x27d0f1))(I||{}),v=(_0x9e673a=>(_0x9e673a[_0x9e673a[_0x58a68b(0x121)]=0x0]=_0x58a68b(0x121),_0x9e673a[_0x9e673a['Add']=0x1]=_0x58a68b(0x144),_0x9e673a[_0x9e673a[_0x58a68b(0xfe)]=0x2]=_0x58a68b(0xfe),_0x9e673a[_0x9e673a[_0x58a68b(0x11f)]=0x3]=_0x58a68b(0x11f),_0x9e673a[_0x9e673a[_0x58a68b(0x105)]=0x4]=_0x58a68b(0x105),_0x9e673a[_0x9e673a['Solve']=0x5]='Solve',_0x9e673a[_0x9e673a['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x9e673a))(v||{});const y=_0x2a0e79=>_0x54f05b(new Date(+_0x2a0e79))[_0x58a68b(0xef)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x91521f,_0x4cd23c)=>{const _0x62f67e=_0x58a68b,_0xd593ef=_0x91521f[_0x62f67e(0x101)](_0x1fa2aa),_0x2a0839=_0x91521f[_0x62f67e(0x101)](_0x38d411);_0x4cd23c[_0x62f67e(0x109)](_0x1c8691=>{const _0x54b365=_0x62f67e;_0xd593ef[_0x54b365(0x116)](_0x1c8691)&&_0x4cd23c['delete'](_0x1c8691);}),_0x4cd23c[_0x62f67e(0x133)]&&(await _0x2a0839[_0x62f67e(0x101)](_0x62f67e(0xf6),{'params':{'userIDs':[..._0x4cd23c]}}))[_0x62f67e(0x132)][_0x62f67e(0x123)][_0x62f67e(0x109)](_0x25817d=>{_0x25817d&&_0xd593ef['addUser'](_0x25817d);});};var K=Object[_0x58a68b(0x151)],V=(_0xe91c30,_0x131a7f,_0x48f4ac,_0x2151ea)=>{const _0x286b9d=_0x58a68b;for(var _0x39e349=_0x2151ea>0x1?void 0x0:_0x2151ea?K(_0x131a7f,_0x48f4ac):_0x131a7f,_0x8b7a06=_0xe91c30[_0x286b9d(0xf2)]-0x1,_0x116165;_0x8b7a06>=0x0;_0x8b7a06--)(_0x116165=_0xe91c30[_0x8b7a06])&&(_0x39e349=_0x116165(_0x39e349)||_0x39e349);return _0x39e349;},p=(_0x30c89c,_0xd8e8c0)=>(_0x3e0028,_0x1890b4)=>_0xd8e8c0(_0x3e0028,_0x1890b4,_0x30c89c);let _=class extends _0x1e5fc7{constructor(_0x50597e,_0x25c679,_0x3d3c03,_0x3d0cf6){const _0x13a76=_0x58a68b;super(),this[_0x13a76(0x117)]=_0x50597e,this[_0x13a76(0xf0)]=_0x25c679,this[_0x13a76(0x119)]=_0x3d3c03,this[_0x13a76(0x100)]=_0x3d0cf6,this[_0x13a76(0x10f)](),this['_initUserSync']();}[_0x58a68b(0x13a)](){const _0x931c51=_0x58a68b;this[_0x931c51(0x11e)](this[_0x931c51(0xf0)][_0x931c51(0x129)][_0x931c51(0x106)](_0x1043f3(0x10))[_0x931c51(0xee)](_0x5307c0=>{const _0x462b60=_0x931c51,_0x6bf5cb=new Set();_0x5307c0[_0x462b60(0x109)](_0x263a05=>{const _0x1d95c5=_0x462b60;switch(_0x263a05[_0x1d95c5(0xf4)]){case'add':{const _0x1023bc=_0x263a05['payload'][_0x1d95c5(0x150)];_0x6bf5cb[_0x1d95c5(0x13e)](_0x1023bc);break;}}}),B(this[_0x462b60(0x100)],_0x6bf5cb);}));}['_init'](){const _0x48c230=_0x58a68b;this['disposeWithMe'](this['_commentService'][_0x48c230(0x129)][_0x48c230(0xee)](async _0x2e0501=>{const _0x4bec93=_0x48c230;var _0x2d9dd0,_0x1eb95a,_0xcdb3eb,_0x215dfe;const _0x2cc35a=(_0x2d9dd0=this['_threadCommentModel'][_0x4bec93(0x10c)](_0x2e0501[_0x4bec93(0x125)])[_0x4bec93(0x13b)](_0x241e74=>_0x241e74['threadId']===_0x2e0501['threadId']))==null?void 0x0:_0x2d9dd0[_0x4bec93(0x149)];if(!_0x2cc35a)return;const {unitId:_0x4f3178,subUnitId:_0x16dcfc}=_0x2cc35a;switch(_0x2e0501[_0x4bec93(0x13c)]&&this['_userService'][_0x4bec93(0xeb)](_0x2e0501[_0x4bec93(0x13c)]),_0x2e0501['type']){case v[_0x4bec93(0x144)]:break;case v[_0x4bec93(0xfe)]:{this[_0x4bec93(0xf0)]['addComment'](_0x4f3178,_0x16dcfc,{'unitId':_0x4f3178,'subUnitId':_0x16dcfc,'ref':'','id':_0x2e0501[_0x4bec93(0x103)],'dT':y(+_0x2e0501['createTimestamp']),'threadId':_0x2e0501['threadId'],'personId':(_0xcdb3eb=(_0x1eb95a=_0x2e0501['user'])==null?void 0x0:_0x1eb95a[_0x4bec93(0x12a)])!=null?_0xcdb3eb:_0x2e0501[_0x4bec93(0x142)],'text':JSON[_0x4bec93(0x134)](_0x2e0501[_0x4bec93(0x122)]),'parentId':_0x2cc35a['id']});break;}case v[_0x4bec93(0x105)]:{const _0x340683=this['_threadCommentModel'][_0x4bec93(0x136)](_0x4f3178,_0x16dcfc,_0x2e0501[_0x4bec93(0x103)]);_0x340683&&_0x340683[_0x4bec93(0xfb)]&&this[_0x4bec93(0xf0)]['deleteComment'](_0x4f3178,_0x16dcfc,_0x2e0501[_0x4bec93(0x103)]);break;}case v[_0x4bec93(0x11f)]:{this[_0x4bec93(0xf0)][_0x4bec93(0x118)](_0x4f3178,_0x16dcfc,{'commentId':_0x2e0501[_0x4bec93(0x103)],'text':JSON[_0x4bec93(0x134)](_0x2e0501[_0x4bec93(0x122)])});break;}case v[_0x4bec93(0x10b)]:{const _0x51963e=(_0x215dfe=this[_0x4bec93(0xf0)][_0x4bec93(0x10c)](_0x2e0501['unitId'])['find'](_0x7495f3=>_0x7495f3[_0x4bec93(0x147)]===_0x2e0501[_0x4bec93(0x147)]))==null?void 0x0:_0x215dfe[_0x4bec93(0x149)];_0x51963e&&this[_0x4bec93(0xf0)][_0x4bec93(0x14e)](_0x4f3178,_0x16dcfc,_0x51963e['id'],_0x2e0501[_0x4bec93(0x145)]===I[_0x4bec93(0x13d)]);break;}}}));}};function _0x26d7(_0x446de5,_0x5070cc){_0x446de5=_0x446de5-0xea;const _0x2d3140=_0x2d31();let _0x26d731=_0x2d3140[_0x446de5];return _0x26d731;}_=V([p(0x0,_0x31afa8(_0xbeb1bb)),p(0x1,_0x31afa8(_0x43de76)),p(0x2,_0x31afa8(_0x1fa2aa)),p(0x3,_0x31afa8(_0x2e8e75))],_);const z=_0x58a68b(0x128),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1748e6,_0x46fc92,_0x1bf901,_0x4bacd8)=>{const _0x4f624f=_0x58a68b;for(var _0x1d693f=_0x4bacd8>0x1?void 0x0:_0x4bacd8?k(_0x46fc92,_0x1bf901):_0x46fc92,_0x3de32d=_0x1748e6[_0x4f624f(0xf2)]-0x1,_0x68820b;_0x3de32d>=0x0;_0x3de32d--)(_0x68820b=_0x1748e6[_0x3de32d])&&(_0x1d693f=_0x68820b(_0x1d693f)||_0x1d693f);return _0x1d693f;},b=(_0x4c49d6,_0x48f644)=>(_0x32de26,_0x27e4d0)=>_0x48f644(_0x32de26,_0x27e4d0,_0x4c49d6);function X(_0x4ec965,_0x1baf93){const _0x3b6f04=_0x58a68b,_0x34f0fa=_0x4ec965[_0x3b6f04(0x126)][0x0];return{..._0x1baf93,'id':_0x34f0fa[_0x3b6f04(0x103)],'resolved':_0x4ec965[_0x3b6f04(0x145)]===0x1,'dT':y(_0x34f0fa[_0x3b6f04(0x137)]),'personId':_0x34f0fa[_0x3b6f04(0x142)],'threadId':_0x34f0fa[_0x3b6f04(0x147)]};}function ee(_0x52026f,_0x1f563d,_0x1cf0e7){const _0x295a88=_0x58a68b;var _0xca8548,_0xcfb643;if(((_0xcfb643=(_0xca8548=_0x52026f==null?void 0x0:_0x52026f[_0x295a88(0x126)])==null?void 0x0:_0xca8548[_0x295a88(0xf2)])!=null?_0xcfb643:0x0)>0x0){const _0x58d58=(_0x23eb0b,_0x106109)=>({'id':_0x23eb0b['replyId'],'threadId':_0x23eb0b[_0x295a88(0x147)],'dT':y(_0x23eb0b['createTimestamp']),'personId':_0x23eb0b[_0x295a88(0x142)],'resolved':_0x52026f[_0x295a88(0x145)]===I[_0x295a88(0x13d)],'unitId':_0x1f563d,'subUnitId':_0x1cf0e7,'text':JSON[_0x295a88(0x134)](_0x23eb0b[_0x295a88(0x122)]),'parentId':_0x106109}),_0x4d34a8=_0x58d58(_0x52026f[_0x295a88(0x126)][0x0]);return{..._0x4d34a8,'children':_0x52026f[_0x295a88(0x126)][_0x295a88(0x127)](0x1)[_0x295a88(0x10e)](_0x54dbe8=>_0x58d58(_0x54dbe8,_0x4d34a8['id']))};}return null;}let S=class{constructor(_0x4907ce,_0x57e37a,_0x482e31){const _0x3f5431=_0x58a68b;this[_0x3f5431(0x124)]=_0x4907ce,this[_0x3f5431(0x119)]=_0x57e37a,this[_0x3f5431(0x14f)]=_0x482e31;}async['addComment'](_0xb58086){const _0x246e4b=_0x58a68b;var _0x51c686,_0x5b03db;const {parentId:_0x1e43a5,unitId:_0x2478f4,text:_0x3bcff4,threadId:_0x14e78c}=_0xb58086,_0x36803d=(_0x5b03db=(_0x51c686=_0x3bcff4['customRanges'])==null?void 0x0:_0x51c686[_0x246e4b(0xf7)](_0x5d07fe=>_0x5d07fe[_0x246e4b(0xed)]===_0x6d9c98['COMMENT'])[_0x246e4b(0x10e)](_0x9d6501=>_0x9d6501[_0x246e4b(0x141)]))!=null?_0x5b03db:[],_0x356fde=JSON[_0x246e4b(0x12b)](_0x3bcff4),_0x5cf5fd=(await this['_sessionService'][_0x246e4b(0x11a)](_0x2478f4))['getMemberID']();if(_0x1e43a5){const _0x11fff2={'memberId':_0x5cf5fd,'unitId':_0x2478f4,'content':_0x356fde,'mention':_0x36803d,'threadId':_0x14e78c},_0x964969=(await this[_0x246e4b(0x124)][_0x246e4b(0xfd)](_0x246e4b(0x110)+_0x2478f4+_0x246e4b(0x14d),{'body':_0x11fff2}))[_0x246e4b(0x132)]['reply'];return{..._0xb58086,'id':_0x964969['replyId'],'dT':_0x54f05b(+_0x964969[_0x246e4b(0x137)])[_0x246e4b(0xef)](_0x246e4b(0x14b)),'personId':_0x964969[_0x246e4b(0x142)]};}else{const _0x32020c={'memberId':_0x5cf5fd,'unitId':_0x2478f4,'content':_0x356fde,'mention':_0x36803d},_0x27fdea=await this[_0x246e4b(0x124)][_0x246e4b(0xfd)](_0x246e4b(0x110)+_0x2478f4+_0x246e4b(0x104),{'body':_0x32020c});return X(_0x27fdea[_0x246e4b(0x132)]['comment'],_0xb58086);}}async[_0x58a68b(0x118)](_0x44803c){const _0x203913=_0x58a68b;var _0x216b55,_0x441829;const {text:_0x528489,unitId:_0x23689a}=_0x44803c,_0x2ca6f6=(_0x441829=(_0x216b55=_0x528489[_0x203913(0x11c)])==null?void 0x0:_0x216b55[_0x203913(0xf7)](_0x17d955=>_0x17d955['rangeType']===_0x6d9c98[_0x203913(0x12d)])[_0x203913(0x10e)](_0x3f16cb=>_0x3f16cb['rangeId']))!=null?_0x441829:[],_0x25dd1b=JSON[_0x203913(0x12b)](_0x528489),_0x2a65c8=_0x44803c['threadId'],_0x11cacb=_0x44803c['id'],_0x13d144={'memberId':(await this[_0x203913(0x14f)][_0x203913(0x11a)](_0x23689a))['getMemberID'](),'unitId':_0x23689a,'threadId':_0x2a65c8,'mention':_0x2ca6f6,'content':_0x25dd1b,'replyId':_0x11cacb},_0x24d716=await this['_httpService'][_0x203913(0xfd)](_0x203913(0x110)+_0x23689a+_0x203913(0x11b),{'body':_0x13d144});return!_0x24d716[_0x203913(0x132)][_0x203913(0x131)]||_0x24d716[_0x203913(0x132)][_0x203913(0x131)]['code']===0x1;}async['resolveComment'](_0x5083e3){const _0x476103=_0x58a68b,{unitId:_0x2119c6}=_0x5083e3,_0xabddfb=_0x5083e3[_0x476103(0x147)],_0x2fce38={'memberId':this[_0x476103(0x119)][_0x476103(0x114)]()[_0x476103(0x12a)],'unitId':_0x2119c6,'threadId':_0xabddfb,'solved':_0x5083e3['resolved']?I['Solved']:I[_0x476103(0xf1)]},_0x2bb6a9=await this['_httpService'][_0x476103(0xfd)]('/universer-api/comment/unit/'+_0x2119c6+_0x476103(0x139),{'body':_0x2fce38});return!_0x2bb6a9[_0x476103(0x132)][_0x476103(0x131)]||_0x2bb6a9[_0x476103(0x132)][_0x476103(0x131)][_0x476103(0xf5)]===0x1;}async[_0x58a68b(0x130)](_0x2a19fc,_0x280d60,_0x5ce1ca,_0xfc1e8e){const _0x47c9cc=_0x58a68b,_0x30fcb6={'memberId':(await this[_0x47c9cc(0x14f)][_0x47c9cc(0x11a)](_0x2a19fc))[_0x47c9cc(0x11d)](),'threadId':_0x5ce1ca,'replyId':_0xfc1e8e,'unitId':_0x2a19fc},_0x969f6c=await this[_0x47c9cc(0x124)][_0x47c9cc(0xfd)](_0x47c9cc(0x110)+_0x2a19fc+_0x47c9cc(0x10d),{'body':_0x30fcb6});return!_0x969f6c[_0x47c9cc(0x132)]['error']||_0x969f6c[_0x47c9cc(0x132)]['error']['code']===0x1;}async[_0x58a68b(0xfc)](_0x3bcf7f,_0x2b6708,_0x580f25){const _0x254ad1=_0x58a68b,_0x1283bc={'unitId':_0x3bcf7f,'threadId':_0x580f25},_0x233066=await this['_httpService'][_0x254ad1(0xfd)](_0x254ad1(0x110)+_0x3bcf7f+_0x254ad1(0x113),{'body':_0x1283bc}),_0x28b951=_0x580f25[_0x254ad1(0x10e)](_0x304381=>ee(_0x233066[_0x254ad1(0x132)][_0x254ad1(0x135)][_0x304381],_0x3bcf7f,_0x2b6708))[_0x254ad1(0xf7)](Boolean);return Object[_0x254ad1(0xf3)](_0x233066[_0x254ad1(0x132)]['users'])[_0x254ad1(0x109)](_0x30ffd1=>{const _0x4f32f7=_0x254ad1;this[_0x4f32f7(0x119)][_0x4f32f7(0xeb)](_0x30ffd1);}),_0x28b951;}[_0x58a68b(0x143)](_0x5b0899){const _0x364744=_0x58a68b;return{'id':_0x5b0899['id'],'threadId':_0x5b0899[_0x364744(0x147)],'ref':_0x5b0899[_0x364744(0xec)]};}};S=Q([b(0x0,_0x31afa8(_0x38d411)),b(0x1,_0x31afa8(_0x1fa2aa)),b(0x2,_0x31afa8(_0x5276ff))],S);var re=Object[_0x58a68b(0x151)],te=(_0x3e44da,_0x92b9a6,_0x2fc22e,_0x245311)=>{for(var _0x1dd1af=_0x245311>0x1?void 0x0:_0x245311?re(_0x92b9a6,_0x2fc22e):_0x92b9a6,_0x2e4f43=_0x3e44da['length']-0x1,_0x5e6338;_0x2e4f43>=0x0;_0x2e4f43--)(_0x5e6338=_0x3e44da[_0x2e4f43])&&(_0x1dd1af=_0x5e6338(_0x1dd1af)||_0x1dd1af);return _0x1dd1af;},M=(_0x20b435,_0xbce566)=>(_0x48a6c0,_0x4f42a5)=>_0xbce566(_0x48a6c0,_0x4f42a5,_0x20b435);let f=class extends _0x1e5fc7{constructor(_0x596516,_0x4ea0a0){const _0x31a8dd=_0x58a68b;super(),this[_0x31a8dd(0x10a)]=_0x596516,this['_threadCommentDataSource']=_0x4ea0a0,this[_0x31a8dd(0x107)]();}['_initDataSource'](){const _0x302966=_0x58a68b;this[_0x302966(0x10a)][_0x302966(0x148)]=this['_threadCommentDataSource'],this[_0x302966(0x10a)][_0x302966(0xff)]=!0x1;}};f=te([M(0x0,_0x2b003d),M(0x1,_0x31afa8(S))],f);var se=Object[_0x58a68b(0x14a)],oe=Object[_0x58a68b(0x151)],ne=(_0x20ebda,_0x408eec,_0x3b280c)=>_0x408eec in _0x20ebda?se(_0x20ebda,_0x408eec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b280c}):_0x20ebda[_0x408eec]=_0x3b280c,ie=(_0x3ad2bb,_0x3c8f46,_0x3ab232,_0x15b566)=>{const _0x4cddd8=_0x58a68b;for(var _0x208e18=_0x15b566>0x1?void 0x0:_0x15b566?oe(_0x3c8f46,_0x3ab232):_0x3c8f46,_0x56097a=_0x3ad2bb[_0x4cddd8(0xf2)]-0x1,_0x149a3f;_0x56097a>=0x0;_0x56097a--)(_0x149a3f=_0x3ad2bb[_0x56097a])&&(_0x208e18=_0x149a3f(_0x208e18)||_0x208e18);return _0x208e18;},N=(_0x385973,_0x43f4c3)=>(_0x24b45f,_0x363c80)=>_0x43f4c3(_0x24b45f,_0x363c80,_0x385973),$=(_0x559c13,_0x1f8e05,_0x11dc48)=>ne(_0x559c13,typeof _0x1f8e05!=_0x58a68b(0x120)?_0x1f8e05+'':_0x1f8e05,_0x11dc48);let g=class extends _0x5c853b{constructor(_0x3a9859=O,_0x5379bf,_0x3b5b7e){const _0x3705e6=_0x58a68b;super(),this[_0x3705e6(0xf9)]=_0x3a9859,this['_injector']=_0x5379bf,this[_0x3705e6(0x146)]=_0x3b5b7e;const {..._0x4bd947}=_0x5d724b({},O,this[_0x3705e6(0xf9)]);this[_0x3705e6(0x146)][_0x3705e6(0x111)](z,_0x4bd947);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x50fe06=>{const _0x448cd0=_0x26d7;this[_0x448cd0(0x100)][_0x448cd0(0x13e)](_0x50fe06);});}[_0x58a68b(0x12e)](){const _0x389f1c=_0x58a68b;this[_0x389f1c(0x100)][_0x389f1c(0x101)](f),this[_0x389f1c(0x100)][_0x389f1c(0x101)](_);}};$(g,'pluginName',W),$(g,_0x58a68b(0xf4),_0x4977eb['UNIVER_UNKNOWN']),g=ie([_0x2b7f20(_0x5439b7,_0xed0bc7,_0xe241d6),N(0x1,_0x31afa8(_0x2e8e75)),N(0x2,_0x5c4f8c)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x390ebd=_0xb832;(function(_0x10052c,_0x44c00b){const _0x555670=_0xb832,_0x19b972=_0x10052c();while(!![]){try{const _0x1c2fd4=parseInt(_0x555670(0x16e))/0x1+-parseInt(_0x555670(0x167))/0x2+parseInt(_0x555670(0x16d))/0x3+parseInt(_0x555670(0x159))/0x4+parseInt(_0x555670(0x15a))/0x5*(-parseInt(_0x555670(0x1be))/0x6)+parseInt(_0x555670(0x1bc))/0x7*(parseInt(_0x555670(0x16f))/0x8)+parseInt(_0x555670(0x18a))/0x9*(-parseInt(_0x555670(0x1a1))/0xa);if(_0x1c2fd4===_0x44c00b)break;else _0x19b972['push'](_0x19b972['shift']());}catch(_0x21deba){_0x19b972['push'](_0x19b972['shift']());}}}(_0x48f8,0x8f0a6));import{CommentService as _0x5b9634,CollaborationSessionService as _0x1815bc,UniverCollaborationClientPlugin as _0x395b52}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x16cf6f}from'@univerjs-pro/license';import{dayjs as _0x252e0c,UserManagerService as _0x3039bd,Inject as _0x1a89d1,Injector as _0x11e476,Disposable as _0xdcc8ac,CustomRangeType as _0x339677,UniverInstanceType as _0x16c046,DependentOn as _0x5b7f34,IConfigService as _0x828273,Plugin as _0x1d42c8,merge as _0x22269a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59d47d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1356a4,IThreadCommentDataSourceService as _0x46c254}from'@univerjs/thread-comment';import{bufferTime as _0x242edb}from'rxjs';import{HTTPService as _0x28a050}from'@univerjs/network';const W=_0x390ebd(0x18f);var I=(_0x531b8b=>(_0x531b8b[_0x531b8b[_0x390ebd(0x1a5)]=0x0]=_0x390ebd(0x1a5),_0x531b8b[_0x531b8b['Solved']=0x1]=_0x390ebd(0x176),_0x531b8b[_0x531b8b['UNRECOGNIZED']=-0x1]=_0x390ebd(0x19a),_0x531b8b))(I||{}),v=(_0x1b8941=>(_0x1b8941[_0x1b8941['Unknown']=0x0]='Unknown',_0x1b8941[_0x1b8941[_0x390ebd(0x187)]=0x1]='Add',_0x1b8941[_0x1b8941['Reply']=0x2]=_0x390ebd(0x189),_0x1b8941[_0x1b8941['Edit']=0x3]=_0x390ebd(0x1a4),_0x1b8941[_0x1b8941[_0x390ebd(0x193)]=0x4]=_0x390ebd(0x193),_0x1b8941[_0x1b8941['Solve']=0x5]='Solve',_0x1b8941[_0x1b8941[_0x390ebd(0x19a)]=-0x1]=_0x390ebd(0x19a),_0x1b8941))(v||{});const y=_0x416089=>_0x252e0c(new Date(+_0x416089))['format'](_0x390ebd(0x17d)),B=async(_0x3bd88d,_0xed1b20)=>{const _0xe95c37=_0x390ebd,_0x850852=_0x3bd88d[_0xe95c37(0x194)](_0x3039bd),_0x4752c7=_0x3bd88d['get'](_0x28a050);_0xed1b20['forEach'](_0x1ced2d=>{const _0x1b55e7=_0xe95c37;_0x850852[_0x1b55e7(0x1a7)](_0x1ced2d)&&_0xed1b20[_0x1b55e7(0x18c)](_0x1ced2d);}),_0xed1b20[_0xe95c37(0x19b)]&&(await _0x4752c7[_0xe95c37(0x194)](_0xe95c37(0x171),{'params':{'userIDs':[..._0xed1b20]}}))[_0xe95c37(0x1aa)][_0xe95c37(0x190)][_0xe95c37(0x186)](_0x427edb=>{_0x427edb&&_0x850852['addUser'](_0x427edb);});};var K=Object[_0x390ebd(0x197)],V=(_0x8bbdb3,_0x57ca97,_0x7a84d6,_0x2114c8)=>{const _0x3d7b91=_0x390ebd;for(var _0x1b4225=_0x2114c8>0x1?void 0x0:_0x2114c8?K(_0x57ca97,_0x7a84d6):_0x57ca97,_0x31ce4e=_0x8bbdb3[_0x3d7b91(0x19f)]-0x1,_0x52c782;_0x31ce4e>=0x0;_0x31ce4e--)(_0x52c782=_0x8bbdb3[_0x31ce4e])&&(_0x1b4225=_0x52c782(_0x1b4225)||_0x1b4225);return _0x1b4225;},p=(_0x30effb,_0xd151e)=>(_0x339de0,_0x1df885)=>_0xd151e(_0x339de0,_0x1df885,_0x30effb);let _=class extends _0xdcc8ac{constructor(_0x4cfc7f,_0x4442dc,_0x33e7d6,_0x57f45d){const _0x1f6528=_0x390ebd;super(),this[_0x1f6528(0x179)]=_0x4cfc7f,this['_threadCommentModel']=_0x4442dc,this[_0x1f6528(0x160)]=_0x33e7d6,this['_injector']=_0x57f45d,this[_0x1f6528(0x16a)](),this[_0x1f6528(0x170)]();}[_0x390ebd(0x170)](){const _0xe28928=_0x390ebd;this[_0xe28928(0x1a3)](this[_0xe28928(0x15b)][_0xe28928(0x15c)][_0xe28928(0x161)](_0x242edb(0x10))['subscribe'](_0x810c8f=>{const _0x248e08=_0xe28928,_0xbdda71=new Set();_0x810c8f[_0x248e08(0x186)](_0x104c92=>{const _0x571adc=_0x248e08;switch(_0x104c92[_0x571adc(0x17b)]){case _0x571adc(0x198):{const _0xfff2fa=_0x104c92[_0x571adc(0x1a2)]['personId'];_0xbdda71[_0x571adc(0x198)](_0xfff2fa);break;}}}),B(this[_0x248e08(0x19e)],_0xbdda71);}));}[_0x390ebd(0x16a)](){const _0x56cae4=_0x390ebd;this[_0x56cae4(0x1a3)](this[_0x56cae4(0x179)][_0x56cae4(0x15c)][_0x56cae4(0x184)](async _0x27bf83=>{const _0x333319=_0x56cae4;var _0x476ce8,_0x3925be,_0x40bc82,_0x566ed4;const _0x1b008c=(_0x476ce8=this[_0x333319(0x15b)]['getUnit'](_0x27bf83['unitId'])[_0x333319(0x17f)](_0x174b29=>_0x174b29[_0x333319(0x17c)]===_0x27bf83[_0x333319(0x17c)]))==null?void 0x0:_0x476ce8['root'];if(!_0x1b008c)return;const {unitId:_0x12b361,subUnitId:_0x1dcd14}=_0x1b008c;switch(_0x27bf83[_0x333319(0x175)]&&this['_userService'][_0x333319(0x180)](_0x27bf83['user']),_0x27bf83[_0x333319(0x17b)]){case v[_0x333319(0x187)]:break;case v[_0x333319(0x189)]:{this[_0x333319(0x15b)][_0x333319(0x1ac)](_0x12b361,_0x1dcd14,{'unitId':_0x12b361,'subUnitId':_0x1dcd14,'ref':'','id':_0x27bf83[_0x333319(0x195)],'dT':y(+_0x27bf83['createTimestamp']),'threadId':_0x27bf83[_0x333319(0x17c)],'personId':(_0x40bc82=(_0x3925be=_0x27bf83[_0x333319(0x175)])==null?void 0x0:_0x3925be[_0x333319(0x18d)])!=null?_0x40bc82:_0x27bf83[_0x333319(0x1b8)],'text':JSON[_0x333319(0x162)](_0x27bf83[_0x333319(0x1ad)]),'parentId':_0x1b008c['id']});break;}case v['Delete']:{const _0x26410b=this[_0x333319(0x15b)]['getComment'](_0x12b361,_0x1dcd14,_0x27bf83[_0x333319(0x195)]);_0x26410b&&_0x26410b[_0x333319(0x19c)]&&this[_0x333319(0x15b)]['deleteComment'](_0x12b361,_0x1dcd14,_0x27bf83[_0x333319(0x195)]);break;}case v['Edit']:{this[_0x333319(0x15b)][_0x333319(0x1b6)](_0x12b361,_0x1dcd14,{'commentId':_0x27bf83[_0x333319(0x195)],'text':JSON[_0x333319(0x162)](_0x27bf83['content'])});break;}case v[_0x333319(0x1a0)]:{const _0x26202a=(_0x566ed4=this['_threadCommentModel'][_0x333319(0x181)](_0x27bf83[_0x333319(0x15f)])[_0x333319(0x17f)](_0x4b5345=>_0x4b5345[_0x333319(0x17c)]===_0x27bf83[_0x333319(0x17c)]))==null?void 0x0:_0x566ed4[_0x333319(0x1a8)];_0x26202a&&this[_0x333319(0x15b)][_0x333319(0x157)](_0x12b361,_0x1dcd14,_0x26202a['id'],_0x27bf83[_0x333319(0x196)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x1a89d1(_0x5b9634)),p(0x1,_0x1a89d1(_0x1356a4)),p(0x2,_0x1a89d1(_0x3039bd)),p(0x3,_0x1a89d1(_0x11e476))],_);function _0xb832(_0x4368d3,_0x1f71ee){_0x4368d3=_0x4368d3-0x157;const _0x48f8e7=_0x48f8();let _0xb83245=_0x48f8e7[_0x4368d3];return _0xb83245;}const z=_0x390ebd(0x1b2),O={};var k=Object[_0x390ebd(0x197)],Q=(_0x32e31a,_0x34f7e7,_0x1d3f16,_0x172180)=>{const _0xfe2134=_0x390ebd;for(var _0x26c6da=_0x172180>0x1?void 0x0:_0x172180?k(_0x34f7e7,_0x1d3f16):_0x34f7e7,_0x571f89=_0x32e31a[_0xfe2134(0x19f)]-0x1,_0x1636e4;_0x571f89>=0x0;_0x571f89--)(_0x1636e4=_0x32e31a[_0x571f89])&&(_0x26c6da=_0x1636e4(_0x26c6da)||_0x26c6da);return _0x26c6da;},b=(_0x530f71,_0x368fda)=>(_0x379903,_0x172958)=>_0x368fda(_0x379903,_0x172958,_0x530f71);function X(_0x52ec88,_0x5f4cea){const _0x57ac86=_0x390ebd,_0x1b44c1=_0x52ec88['replies'][0x0];return{..._0x5f4cea,'id':_0x1b44c1['replyId'],'resolved':_0x52ec88[_0x57ac86(0x196)]===0x1,'dT':y(_0x1b44c1['createTimestamp']),'personId':_0x1b44c1[_0x57ac86(0x1b8)],'threadId':_0x1b44c1[_0x57ac86(0x17c)]};}function ee(_0x1c3ff9,_0x54b2b7,_0x499b7a){const _0xb8ea17=_0x390ebd;var _0x1b7dde,_0x52bb2e;if(((_0x52bb2e=(_0x1b7dde=_0x1c3ff9==null?void 0x0:_0x1c3ff9[_0xb8ea17(0x1b4)])==null?void 0x0:_0x1b7dde[_0xb8ea17(0x19f)])!=null?_0x52bb2e:0x0)>0x0){const _0x10d111=(_0x12acf0,_0x51a6eb)=>({'id':_0x12acf0['replyId'],'threadId':_0x12acf0['threadId'],'dT':y(_0x12acf0[_0xb8ea17(0x183)]),'personId':_0x12acf0[_0xb8ea17(0x1b8)],'resolved':_0x1c3ff9['solved']===I[_0xb8ea17(0x176)],'unitId':_0x54b2b7,'subUnitId':_0x499b7a,'text':JSON['parse'](_0x12acf0[_0xb8ea17(0x1ad)]),'parentId':_0x51a6eb}),_0x18f4ce=_0x10d111(_0x1c3ff9['replies'][0x0]);return{..._0x18f4ce,'children':_0x1c3ff9[_0xb8ea17(0x1b4)][_0xb8ea17(0x1ae)](0x1)['map'](_0xc35bea=>_0x10d111(_0xc35bea,_0x18f4ce['id']))};}return null;}let S=class{constructor(_0x46f022,_0x56f40a,_0x2cc885){const _0x28410a=_0x390ebd;this[_0x28410a(0x15e)]=_0x46f022,this[_0x28410a(0x160)]=_0x56f40a,this[_0x28410a(0x1b5)]=_0x2cc885;}async[_0x390ebd(0x1ac)](_0x39c4be){const _0x29ffc7=_0x390ebd;var _0x3f759c,_0x4d151f;const {parentId:_0x34d7c7,unitId:_0x114d34,text:_0x14d38e,threadId:_0x387a9a}=_0x39c4be,_0x45198f=(_0x4d151f=(_0x3f759c=_0x14d38e[_0x29ffc7(0x16b)])==null?void 0x0:_0x3f759c[_0x29ffc7(0x1ab)](_0x5bc132=>_0x5bc132[_0x29ffc7(0x18e)]===_0x339677[_0x29ffc7(0x1bd)])['map'](_0x40e817=>_0x40e817[_0x29ffc7(0x19d)]))!=null?_0x4d151f:[],_0x4d3bca=JSON[_0x29ffc7(0x163)](_0x14d38e),_0x360cb6=(await this[_0x29ffc7(0x1b5)][_0x29ffc7(0x172)](_0x114d34))[_0x29ffc7(0x188)]();if(_0x34d7c7){const _0x41a87e={'memberId':_0x360cb6,'unitId':_0x114d34,'content':_0x4d3bca,'mention':_0x45198f,'threadId':_0x387a9a},_0x46ebc4=(await this[_0x29ffc7(0x15e)][_0x29ffc7(0x1ba)](_0x29ffc7(0x1b9)+_0x114d34+_0x29ffc7(0x1b0),{'body':_0x41a87e}))[_0x29ffc7(0x1aa)][_0x29ffc7(0x173)];return{..._0x39c4be,'id':_0x46ebc4[_0x29ffc7(0x195)],'dT':_0x252e0c(+_0x46ebc4['createTimestamp'])[_0x29ffc7(0x192)](_0x29ffc7(0x17d)),'personId':_0x46ebc4['userId']};}else{const _0x5122a2={'memberId':_0x360cb6,'unitId':_0x114d34,'content':_0x4d3bca,'mention':_0x45198f},_0xa9d2ff=await this[_0x29ffc7(0x15e)][_0x29ffc7(0x1ba)](_0x29ffc7(0x1b9)+_0x114d34+'/add',{'body':_0x5122a2});return X(_0xa9d2ff[_0x29ffc7(0x1aa)][_0x29ffc7(0x1a9)],_0x39c4be);}}async[_0x390ebd(0x1b6)](_0x3315fe){const _0x5d50cc=_0x390ebd;var _0x4788a8,_0x809d75;const {text:_0x12fd68,unitId:_0x231c69}=_0x3315fe,_0x386f40=(_0x809d75=(_0x4788a8=_0x12fd68['customRanges'])==null?void 0x0:_0x4788a8[_0x5d50cc(0x1ab)](_0x42f56c=>_0x42f56c[_0x5d50cc(0x18e)]===_0x339677[_0x5d50cc(0x1bd)])[_0x5d50cc(0x1a6)](_0x514401=>_0x514401[_0x5d50cc(0x19d)]))!=null?_0x809d75:[],_0x445ca6=JSON[_0x5d50cc(0x163)](_0x12fd68),_0x2fd922=_0x3315fe[_0x5d50cc(0x17c)],_0x3057e6=_0x3315fe['id'],_0x30ba8f={'memberId':(await this[_0x5d50cc(0x1b5)][_0x5d50cc(0x172)](_0x231c69))[_0x5d50cc(0x188)](),'unitId':_0x231c69,'threadId':_0x2fd922,'mention':_0x386f40,'content':_0x445ca6,'replyId':_0x3057e6},_0x395ff9=await this[_0x5d50cc(0x15e)][_0x5d50cc(0x1ba)]('/universer-api/comment/unit/'+_0x231c69+_0x5d50cc(0x177),{'body':_0x30ba8f});return!_0x395ff9['body'][_0x5d50cc(0x174)]||_0x395ff9[_0x5d50cc(0x1aa)][_0x5d50cc(0x174)][_0x5d50cc(0x164)]===0x1;}async[_0x390ebd(0x157)](_0x44be1a){const _0x283893=_0x390ebd,{unitId:_0x36d7bc}=_0x44be1a,_0x565663=_0x44be1a['threadId'],_0x115acc={'memberId':this[_0x283893(0x160)][_0x283893(0x1bb)]()['userID'],'unitId':_0x36d7bc,'threadId':_0x565663,'solved':_0x44be1a[_0x283893(0x1af)]?I[_0x283893(0x176)]:I[_0x283893(0x1a5)]},_0x1c6b6c=await this[_0x283893(0x15e)][_0x283893(0x1ba)]('/universer-api/comment/unit/'+_0x36d7bc+_0x283893(0x165),{'body':_0x115acc});return!_0x1c6b6c[_0x283893(0x1aa)][_0x283893(0x174)]||_0x1c6b6c[_0x283893(0x1aa)][_0x283893(0x174)][_0x283893(0x164)]===0x1;}async[_0x390ebd(0x17e)](_0x4b2fc3,_0x13a00a,_0x4fadb3,_0x7a4c70){const _0x1cf08a=_0x390ebd,_0x16cfa3={'memberId':(await this[_0x1cf08a(0x1b5)][_0x1cf08a(0x172)](_0x4b2fc3))[_0x1cf08a(0x188)](),'threadId':_0x4fadb3,'replyId':_0x7a4c70,'unitId':_0x4b2fc3},_0x192dd4=await this[_0x1cf08a(0x15e)]['post'](_0x1cf08a(0x1b9)+_0x4b2fc3+_0x1cf08a(0x18b),{'body':_0x16cfa3});return!_0x192dd4['body'][_0x1cf08a(0x174)]||_0x192dd4[_0x1cf08a(0x1aa)][_0x1cf08a(0x174)][_0x1cf08a(0x164)]===0x1;}async[_0x390ebd(0x15d)](_0x58f3de,_0x90df94,_0x3f6189){const _0x5396b4=_0x390ebd,_0x2d931c={'unitId':_0x58f3de,'threadId':_0x3f6189},_0x1ca2e2=await this[_0x5396b4(0x15e)][_0x5396b4(0x1ba)]('/universer-api/comment/unit/'+_0x58f3de+_0x5396b4(0x17a),{'body':_0x2d931c}),_0x447a58=_0x3f6189['map'](_0x18e918=>ee(_0x1ca2e2[_0x5396b4(0x1aa)][_0x5396b4(0x182)][_0x18e918],_0x58f3de,_0x90df94))[_0x5396b4(0x1ab)](Boolean);return Object['values'](_0x1ca2e2['body']['users'])[_0x5396b4(0x186)](_0x471c2b=>{const _0x3fb686=_0x5396b4;this[_0x3fb686(0x160)][_0x3fb686(0x180)](_0x471c2b);}),_0x447a58;}[_0x390ebd(0x178)](_0x55cffb){const _0x3c2b42=_0x390ebd;return{'id':_0x55cffb['id'],'threadId':_0x55cffb[_0x3c2b42(0x17c)],'ref':_0x55cffb[_0x3c2b42(0x1b7)]};}};S=Q([b(0x0,_0x1a89d1(_0x28a050)),b(0x1,_0x1a89d1(_0x3039bd)),b(0x2,_0x1a89d1(_0x1815bc))],S);var re=Object[_0x390ebd(0x197)],te=(_0x1fce58,_0x58cca3,_0x1819f0,_0x39d9b6)=>{const _0x24ae52=_0x390ebd;for(var _0x43fb58=_0x39d9b6>0x1?void 0x0:_0x39d9b6?re(_0x58cca3,_0x1819f0):_0x58cca3,_0x3c82f4=_0x1fce58[_0x24ae52(0x19f)]-0x1,_0x1b0197;_0x3c82f4>=0x0;_0x3c82f4--)(_0x1b0197=_0x1fce58[_0x3c82f4])&&(_0x43fb58=_0x1b0197(_0x43fb58)||_0x43fb58);return _0x43fb58;},M=(_0x32d953,_0x4a6396)=>(_0x2dfc45,_0x3d11db)=>_0x4a6396(_0x2dfc45,_0x3d11db,_0x32d953);let f=class extends _0xdcc8ac{constructor(_0x26677a,_0x4923c7){const _0x5ab973=_0x390ebd;super(),this[_0x5ab973(0x191)]=_0x26677a,this['_threadCommentDataSource']=_0x4923c7,this[_0x5ab973(0x16c)]();}['_initDataSource'](){const _0x3cd22c=_0x390ebd;this[_0x3cd22c(0x191)][_0x3cd22c(0x1b3)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x3cd22c(0x168)]=!0x1;}};f=te([M(0x0,_0x46c254),M(0x1,_0x1a89d1(S))],f);var se=Object[_0x390ebd(0x199)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xa7fc83,_0x120229,_0x87295e)=>_0x120229 in _0xa7fc83?se(_0xa7fc83,_0x120229,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x87295e}):_0xa7fc83[_0x120229]=_0x87295e,ie=(_0x391ecd,_0x46da9d,_0x44421c,_0x16df4c)=>{for(var _0x16e47f=_0x16df4c>0x1?void 0x0:_0x16df4c?oe(_0x46da9d,_0x44421c):_0x46da9d,_0x1b9df9=_0x391ecd['length']-0x1,_0x3d7a23;_0x1b9df9>=0x0;_0x1b9df9--)(_0x3d7a23=_0x391ecd[_0x1b9df9])&&(_0x16e47f=_0x3d7a23(_0x16e47f)||_0x16e47f);return _0x16e47f;},N=(_0x2b4efa,_0xb5c73c)=>(_0x558afc,_0x4cd159)=>_0xb5c73c(_0x558afc,_0x4cd159,_0x2b4efa),$=(_0x135955,_0x2bce72,_0x3b8b78)=>ne(_0x135955,typeof _0x2bce72!=_0x390ebd(0x169)?_0x2bce72+'':_0x2bce72,_0x3b8b78);function _0x48f8(){const _0x21d76e=['70188CfXhuL','resolveComment','UNIVER_UNKNOWN','860528khrtpi','90QQqvjn','_threadCommentModel','commentUpdate$','listComments','_httpService','unitId','_userService','pipe','parse','stringify','code','/solved','setConfig','2161640hjUeBk','syncUpdateMutationToColla','symbol','_init','customRanges','_initDataSource','851199pytMiX','371447MXUIly','8IMDaJC','_initUserSync','/universer-api/user/list','requireSession','reply','error','user','Solved','/edit','saveCommentToSnapshot','_commentService','/list','type','threadId','YYYY/MM/DD\x20HH:mm','deleteComment','find','addUser','getUnit','comments','createTimestamp','subscribe','_config','forEach','Add','getMemberID','Reply','313326hioooz','/delete','delete','userID','rangeType','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','users','_threadCommentDataSourceService','format','Delete','get','replyId','solved','getOwnPropertyDescriptor','add','defineProperty','UNRECOGNIZED','size','parentId','rangeId','_injector','length','Solve','20eVjjfg','payload','disposeWithMe','Edit','OpenOrReOpen','map','getUser','root','comment','body','filter','addComment','content','slice','resolved','/reply','_configService','thread-comment-data-source.config','dataSource','replies','_sessionService','updateComment','ref','userId','/universer-api/comment/unit/','post','getCurrentUser','7536158gcvuvp','COMMENT'];_0x48f8=function(){return _0x21d76e;};return _0x48f8();}let g=class extends _0x1d42c8{constructor(_0x13a746=O,_0x47b0f9,_0x46f81b){const _0x6f45a2=_0x390ebd;super(),this[_0x6f45a2(0x185)]=_0x13a746,this[_0x6f45a2(0x19e)]=_0x47b0f9,this[_0x6f45a2(0x1b1)]=_0x46f81b;const {..._0x1da4a1}=_0x22269a({},O,this[_0x6f45a2(0x185)]);this[_0x6f45a2(0x1b1)][_0x6f45a2(0x166)](z,_0x1da4a1);}['onStarting'](){const _0xaed757=_0x390ebd;[[S],[f],[_]][_0xaed757(0x186)](_0x40bab0=>{const _0x2bfe02=_0xaed757;this[_0x2bfe02(0x19e)]['add'](_0x40bab0);});}['onReady'](){const _0x25286c=_0x390ebd;this[_0x25286c(0x19e)]['get'](f),this[_0x25286c(0x19e)]['get'](_);}};$(g,'pluginName',W),$(g,'type',_0x16c046[_0x390ebd(0x158)]),g=ie([_0x5b7f34(_0x59d47d,_0x395b52,_0x16cf6f),N(0x1,_0x1a89d1(_0x11e476)),N(0x2,_0x828273)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x58a68b=_0x26d7;function _0x2d31(){const _0x1441b6=['YYYY/MM/DD\x20HH:mm','9rJLwcB','/reply','resolveComment','_sessionService','personId','getOwnPropertyDescriptor','2523165UPqAFW','4pyhItl','addUser','ref','rangeType','subscribe','format','_threadCommentModel','OpenOrReOpen','length','values','type','code','/universer-api/user/list','filter','7340712XRboqF','_config','12VQvIui','parentId','listComments','post','Reply','syncUpdateMutationToColla','_injector','get','666919vMqcnm','replyId','/add','Delete','pipe','_initDataSource','1763712yuhxwL','forEach','_threadCommentDataSourceService','Solve','getUnit','/delete','map','_init','/universer-api/comment/unit/','setConfig','40826577MVizQL','/list','getCurrentUser','424eVRNXy','getUser','_commentService','updateComment','_userService','requireSession','/edit','customRanges','getMemberID','disposeWithMe','Edit','symbol','Unknown','content','users','_httpService','unitId','replies','slice','thread-comment-data-source.config','commentUpdate$','userID','stringify','184408pULYsl','COMMENT','onReady','12Mmmdmx','deleteComment','error','body','size','parse','comments','getComment','createTimestamp','UNRECOGNIZED','/solved','_initUserSync','find','user','Solved','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','4330150umnZfM','rangeId','userId','saveCommentToSnapshot','Add','solved','_configService','threadId','dataSource','root','defineProperty'];_0x2d31=function(){return _0x1441b6;};return _0x2d31();}(function(_0x362551,_0x49e7e7){const _0x2f7fa2=_0x26d7,_0x1fe2fa=_0x362551();while(!![]){try{const _0x441201=-parseInt(_0x2f7fa2(0x102))/0x1*(parseInt(_0x2f7fa2(0xea))/0x2)+parseInt(_0x2f7fa2(0x108))/0x3+-parseInt(_0x2f7fa2(0xfa))/0x4*(parseInt(_0x2f7fa2(0x152))/0x5)+parseInt(_0x2f7fa2(0xf8))/0x6+-parseInt(_0x2f7fa2(0x12c))/0x7*(parseInt(_0x2f7fa2(0x115))/0x8)+parseInt(_0x2f7fa2(0x14c))/0x9*(-parseInt(_0x2f7fa2(0x140))/0xa)+-parseInt(_0x2f7fa2(0x112))/0xb*(-parseInt(_0x2f7fa2(0x12f))/0xc);if(_0x441201===_0x49e7e7)break;else _0x1fe2fa['push'](_0x1fe2fa['shift']());}catch(_0x2d8da3){_0x1fe2fa['push'](_0x1fe2fa['shift']());}}}(_0x2d31,0xce837));import{CommentService as _0xbeb1bb,CollaborationSessionService as _0x5276ff,UniverCollaborationClientPlugin as _0xed0bc7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xe241d6}from'@univerjs-pro/license';import{dayjs as _0x54f05b,UserManagerService as _0x1fa2aa,Inject as _0x31afa8,Injector as _0x2e8e75,Disposable as _0x1e5fc7,CustomRangeType as _0x6d9c98,UniverInstanceType as _0x4977eb,DependentOn as _0x2b7f20,IConfigService as _0x5c4f8c,Plugin as _0x5c853b,merge as _0x5d724b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5439b7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43de76,IThreadCommentDataSourceService as _0x2b003d}from'@univerjs/thread-comment';import{bufferTime as _0x1043f3}from'rxjs';import{HTTPService as _0x38d411}from'@univerjs/network';const W=_0x58a68b(0x13f);var I=(_0x27d0f1=>(_0x27d0f1[_0x27d0f1[_0x58a68b(0xf1)]=0x0]=_0x58a68b(0xf1),_0x27d0f1[_0x27d0f1[_0x58a68b(0x13d)]=0x1]=_0x58a68b(0x13d),_0x27d0f1[_0x27d0f1['UNRECOGNIZED']=-0x1]=_0x58a68b(0x138),_0x27d0f1))(I||{}),v=(_0x9e673a=>(_0x9e673a[_0x9e673a[_0x58a68b(0x121)]=0x0]=_0x58a68b(0x121),_0x9e673a[_0x9e673a['Add']=0x1]=_0x58a68b(0x144),_0x9e673a[_0x9e673a[_0x58a68b(0xfe)]=0x2]=_0x58a68b(0xfe),_0x9e673a[_0x9e673a[_0x58a68b(0x11f)]=0x3]=_0x58a68b(0x11f),_0x9e673a[_0x9e673a[_0x58a68b(0x105)]=0x4]=_0x58a68b(0x105),_0x9e673a[_0x9e673a['Solve']=0x5]='Solve',_0x9e673a[_0x9e673a['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x9e673a))(v||{});const y=_0x2a0e79=>_0x54f05b(new Date(+_0x2a0e79))[_0x58a68b(0xef)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x91521f,_0x4cd23c)=>{const _0x62f67e=_0x58a68b,_0xd593ef=_0x91521f[_0x62f67e(0x101)](_0x1fa2aa),_0x2a0839=_0x91521f[_0x62f67e(0x101)](_0x38d411);_0x4cd23c[_0x62f67e(0x109)](_0x1c8691=>{const _0x54b365=_0x62f67e;_0xd593ef[_0x54b365(0x116)](_0x1c8691)&&_0x4cd23c['delete'](_0x1c8691);}),_0x4cd23c[_0x62f67e(0x133)]&&(await _0x2a0839[_0x62f67e(0x101)](_0x62f67e(0xf6),{'params':{'userIDs':[..._0x4cd23c]}}))[_0x62f67e(0x132)][_0x62f67e(0x123)][_0x62f67e(0x109)](_0x25817d=>{_0x25817d&&_0xd593ef['addUser'](_0x25817d);});};var K=Object[_0x58a68b(0x151)],V=(_0xe91c30,_0x131a7f,_0x48f4ac,_0x2151ea)=>{const _0x286b9d=_0x58a68b;for(var _0x39e349=_0x2151ea>0x1?void 0x0:_0x2151ea?K(_0x131a7f,_0x48f4ac):_0x131a7f,_0x8b7a06=_0xe91c30[_0x286b9d(0xf2)]-0x1,_0x116165;_0x8b7a06>=0x0;_0x8b7a06--)(_0x116165=_0xe91c30[_0x8b7a06])&&(_0x39e349=_0x116165(_0x39e349)||_0x39e349);return _0x39e349;},p=(_0x30c89c,_0xd8e8c0)=>(_0x3e0028,_0x1890b4)=>_0xd8e8c0(_0x3e0028,_0x1890b4,_0x30c89c);let _=class extends _0x1e5fc7{constructor(_0x50597e,_0x25c679,_0x3d3c03,_0x3d0cf6){const _0x13a76=_0x58a68b;super(),this[_0x13a76(0x117)]=_0x50597e,this[_0x13a76(0xf0)]=_0x25c679,this[_0x13a76(0x119)]=_0x3d3c03,this[_0x13a76(0x100)]=_0x3d0cf6,this[_0x13a76(0x10f)](),this['_initUserSync']();}[_0x58a68b(0x13a)](){const _0x931c51=_0x58a68b;this[_0x931c51(0x11e)](this[_0x931c51(0xf0)][_0x931c51(0x129)][_0x931c51(0x106)](_0x1043f3(0x10))[_0x931c51(0xee)](_0x5307c0=>{const _0x462b60=_0x931c51,_0x6bf5cb=new Set();_0x5307c0[_0x462b60(0x109)](_0x263a05=>{const _0x1d95c5=_0x462b60;switch(_0x263a05[_0x1d95c5(0xf4)]){case'add':{const _0x1023bc=_0x263a05['payload'][_0x1d95c5(0x150)];_0x6bf5cb[_0x1d95c5(0x13e)](_0x1023bc);break;}}}),B(this[_0x462b60(0x100)],_0x6bf5cb);}));}['_init'](){const _0x48c230=_0x58a68b;this['disposeWithMe'](this['_commentService'][_0x48c230(0x129)][_0x48c230(0xee)](async _0x2e0501=>{const _0x4bec93=_0x48c230;var _0x2d9dd0,_0x1eb95a,_0xcdb3eb,_0x215dfe;const _0x2cc35a=(_0x2d9dd0=this['_threadCommentModel'][_0x4bec93(0x10c)](_0x2e0501[_0x4bec93(0x125)])[_0x4bec93(0x13b)](_0x241e74=>_0x241e74['threadId']===_0x2e0501['threadId']))==null?void 0x0:_0x2d9dd0[_0x4bec93(0x149)];if(!_0x2cc35a)return;const {unitId:_0x4f3178,subUnitId:_0x16dcfc}=_0x2cc35a;switch(_0x2e0501[_0x4bec93(0x13c)]&&this['_userService'][_0x4bec93(0xeb)](_0x2e0501[_0x4bec93(0x13c)]),_0x2e0501['type']){case v[_0x4bec93(0x144)]:break;case v[_0x4bec93(0xfe)]:{this[_0x4bec93(0xf0)]['addComment'](_0x4f3178,_0x16dcfc,{'unitId':_0x4f3178,'subUnitId':_0x16dcfc,'ref':'','id':_0x2e0501[_0x4bec93(0x103)],'dT':y(+_0x2e0501['createTimestamp']),'threadId':_0x2e0501['threadId'],'personId':(_0xcdb3eb=(_0x1eb95a=_0x2e0501['user'])==null?void 0x0:_0x1eb95a[_0x4bec93(0x12a)])!=null?_0xcdb3eb:_0x2e0501[_0x4bec93(0x142)],'text':JSON[_0x4bec93(0x134)](_0x2e0501[_0x4bec93(0x122)]),'parentId':_0x2cc35a['id']});break;}case v[_0x4bec93(0x105)]:{const _0x340683=this['_threadCommentModel'][_0x4bec93(0x136)](_0x4f3178,_0x16dcfc,_0x2e0501[_0x4bec93(0x103)]);_0x340683&&_0x340683[_0x4bec93(0xfb)]&&this[_0x4bec93(0xf0)]['deleteComment'](_0x4f3178,_0x16dcfc,_0x2e0501[_0x4bec93(0x103)]);break;}case v[_0x4bec93(0x11f)]:{this[_0x4bec93(0xf0)][_0x4bec93(0x118)](_0x4f3178,_0x16dcfc,{'commentId':_0x2e0501[_0x4bec93(0x103)],'text':JSON[_0x4bec93(0x134)](_0x2e0501[_0x4bec93(0x122)])});break;}case v[_0x4bec93(0x10b)]:{const _0x51963e=(_0x215dfe=this[_0x4bec93(0xf0)][_0x4bec93(0x10c)](_0x2e0501['unitId'])['find'](_0x7495f3=>_0x7495f3[_0x4bec93(0x147)]===_0x2e0501[_0x4bec93(0x147)]))==null?void 0x0:_0x215dfe[_0x4bec93(0x149)];_0x51963e&&this[_0x4bec93(0xf0)][_0x4bec93(0x14e)](_0x4f3178,_0x16dcfc,_0x51963e['id'],_0x2e0501[_0x4bec93(0x145)]===I[_0x4bec93(0x13d)]);break;}}}));}};function _0x26d7(_0x446de5,_0x5070cc){_0x446de5=_0x446de5-0xea;const _0x2d3140=_0x2d31();let _0x26d731=_0x2d3140[_0x446de5];return _0x26d731;}_=V([p(0x0,_0x31afa8(_0xbeb1bb)),p(0x1,_0x31afa8(_0x43de76)),p(0x2,_0x31afa8(_0x1fa2aa)),p(0x3,_0x31afa8(_0x2e8e75))],_);const z=_0x58a68b(0x128),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1748e6,_0x46fc92,_0x1bf901,_0x4bacd8)=>{const _0x4f624f=_0x58a68b;for(var _0x1d693f=_0x4bacd8>0x1?void 0x0:_0x4bacd8?k(_0x46fc92,_0x1bf901):_0x46fc92,_0x3de32d=_0x1748e6[_0x4f624f(0xf2)]-0x1,_0x68820b;_0x3de32d>=0x0;_0x3de32d--)(_0x68820b=_0x1748e6[_0x3de32d])&&(_0x1d693f=_0x68820b(_0x1d693f)||_0x1d693f);return _0x1d693f;},b=(_0x4c49d6,_0x48f644)=>(_0x32de26,_0x27e4d0)=>_0x48f644(_0x32de26,_0x27e4d0,_0x4c49d6);function X(_0x4ec965,_0x1baf93){const _0x3b6f04=_0x58a68b,_0x34f0fa=_0x4ec965[_0x3b6f04(0x126)][0x0];return{..._0x1baf93,'id':_0x34f0fa[_0x3b6f04(0x103)],'resolved':_0x4ec965[_0x3b6f04(0x145)]===0x1,'dT':y(_0x34f0fa[_0x3b6f04(0x137)]),'personId':_0x34f0fa[_0x3b6f04(0x142)],'threadId':_0x34f0fa[_0x3b6f04(0x147)]};}function ee(_0x52026f,_0x1f563d,_0x1cf0e7){const _0x295a88=_0x58a68b;var _0xca8548,_0xcfb643;if(((_0xcfb643=(_0xca8548=_0x52026f==null?void 0x0:_0x52026f[_0x295a88(0x126)])==null?void 0x0:_0xca8548[_0x295a88(0xf2)])!=null?_0xcfb643:0x0)>0x0){const _0x58d58=(_0x23eb0b,_0x106109)=>({'id':_0x23eb0b['replyId'],'threadId':_0x23eb0b[_0x295a88(0x147)],'dT':y(_0x23eb0b['createTimestamp']),'personId':_0x23eb0b[_0x295a88(0x142)],'resolved':_0x52026f[_0x295a88(0x145)]===I[_0x295a88(0x13d)],'unitId':_0x1f563d,'subUnitId':_0x1cf0e7,'text':JSON[_0x295a88(0x134)](_0x23eb0b[_0x295a88(0x122)]),'parentId':_0x106109}),_0x4d34a8=_0x58d58(_0x52026f[_0x295a88(0x126)][0x0]);return{..._0x4d34a8,'children':_0x52026f[_0x295a88(0x126)][_0x295a88(0x127)](0x1)[_0x295a88(0x10e)](_0x54dbe8=>_0x58d58(_0x54dbe8,_0x4d34a8['id']))};}return null;}let S=class{constructor(_0x4907ce,_0x57e37a,_0x482e31){const _0x3f5431=_0x58a68b;this[_0x3f5431(0x124)]=_0x4907ce,this[_0x3f5431(0x119)]=_0x57e37a,this[_0x3f5431(0x14f)]=_0x482e31;}async['addComment'](_0xb58086){const _0x246e4b=_0x58a68b;var _0x51c686,_0x5b03db;const {parentId:_0x1e43a5,unitId:_0x2478f4,text:_0x3bcff4,threadId:_0x14e78c}=_0xb58086,_0x36803d=(_0x5b03db=(_0x51c686=_0x3bcff4['customRanges'])==null?void 0x0:_0x51c686[_0x246e4b(0xf7)](_0x5d07fe=>_0x5d07fe[_0x246e4b(0xed)]===_0x6d9c98['COMMENT'])[_0x246e4b(0x10e)](_0x9d6501=>_0x9d6501[_0x246e4b(0x141)]))!=null?_0x5b03db:[],_0x356fde=JSON[_0x246e4b(0x12b)](_0x3bcff4),_0x5cf5fd=(await this['_sessionService'][_0x246e4b(0x11a)](_0x2478f4))['getMemberID']();if(_0x1e43a5){const _0x11fff2={'memberId':_0x5cf5fd,'unitId':_0x2478f4,'content':_0x356fde,'mention':_0x36803d,'threadId':_0x14e78c},_0x964969=(await this[_0x246e4b(0x124)][_0x246e4b(0xfd)](_0x246e4b(0x110)+_0x2478f4+_0x246e4b(0x14d),{'body':_0x11fff2}))[_0x246e4b(0x132)]['reply'];return{..._0xb58086,'id':_0x964969['replyId'],'dT':_0x54f05b(+_0x964969[_0x246e4b(0x137)])[_0x246e4b(0xef)](_0x246e4b(0x14b)),'personId':_0x964969[_0x246e4b(0x142)]};}else{const _0x32020c={'memberId':_0x5cf5fd,'unitId':_0x2478f4,'content':_0x356fde,'mention':_0x36803d},_0x27fdea=await this[_0x246e4b(0x124)][_0x246e4b(0xfd)](_0x246e4b(0x110)+_0x2478f4+_0x246e4b(0x104),{'body':_0x32020c});return X(_0x27fdea[_0x246e4b(0x132)]['comment'],_0xb58086);}}async[_0x58a68b(0x118)](_0x44803c){const _0x203913=_0x58a68b;var _0x216b55,_0x441829;const {text:_0x528489,unitId:_0x23689a}=_0x44803c,_0x2ca6f6=(_0x441829=(_0x216b55=_0x528489[_0x203913(0x11c)])==null?void 0x0:_0x216b55[_0x203913(0xf7)](_0x17d955=>_0x17d955['rangeType']===_0x6d9c98[_0x203913(0x12d)])[_0x203913(0x10e)](_0x3f16cb=>_0x3f16cb['rangeId']))!=null?_0x441829:[],_0x25dd1b=JSON[_0x203913(0x12b)](_0x528489),_0x2a65c8=_0x44803c['threadId'],_0x11cacb=_0x44803c['id'],_0x13d144={'memberId':(await this[_0x203913(0x14f)][_0x203913(0x11a)](_0x23689a))['getMemberID'](),'unitId':_0x23689a,'threadId':_0x2a65c8,'mention':_0x2ca6f6,'content':_0x25dd1b,'replyId':_0x11cacb},_0x24d716=await this['_httpService'][_0x203913(0xfd)](_0x203913(0x110)+_0x23689a+_0x203913(0x11b),{'body':_0x13d144});return!_0x24d716[_0x203913(0x132)][_0x203913(0x131)]||_0x24d716[_0x203913(0x132)][_0x203913(0x131)]['code']===0x1;}async['resolveComment'](_0x5083e3){const _0x476103=_0x58a68b,{unitId:_0x2119c6}=_0x5083e3,_0xabddfb=_0x5083e3[_0x476103(0x147)],_0x2fce38={'memberId':this[_0x476103(0x119)][_0x476103(0x114)]()[_0x476103(0x12a)],'unitId':_0x2119c6,'threadId':_0xabddfb,'solved':_0x5083e3['resolved']?I['Solved']:I[_0x476103(0xf1)]},_0x2bb6a9=await this['_httpService'][_0x476103(0xfd)]('/universer-api/comment/unit/'+_0x2119c6+_0x476103(0x139),{'body':_0x2fce38});return!_0x2bb6a9[_0x476103(0x132)][_0x476103(0x131)]||_0x2bb6a9[_0x476103(0x132)][_0x476103(0x131)][_0x476103(0xf5)]===0x1;}async[_0x58a68b(0x130)](_0x2a19fc,_0x280d60,_0x5ce1ca,_0xfc1e8e){const _0x47c9cc=_0x58a68b,_0x30fcb6={'memberId':(await this[_0x47c9cc(0x14f)][_0x47c9cc(0x11a)](_0x2a19fc))[_0x47c9cc(0x11d)](),'threadId':_0x5ce1ca,'replyId':_0xfc1e8e,'unitId':_0x2a19fc},_0x969f6c=await this[_0x47c9cc(0x124)][_0x47c9cc(0xfd)](_0x47c9cc(0x110)+_0x2a19fc+_0x47c9cc(0x10d),{'body':_0x30fcb6});return!_0x969f6c[_0x47c9cc(0x132)]['error']||_0x969f6c[_0x47c9cc(0x132)]['error']['code']===0x1;}async[_0x58a68b(0xfc)](_0x3bcf7f,_0x2b6708,_0x580f25){const _0x254ad1=_0x58a68b,_0x1283bc={'unitId':_0x3bcf7f,'threadId':_0x580f25},_0x233066=await this['_httpService'][_0x254ad1(0xfd)](_0x254ad1(0x110)+_0x3bcf7f+_0x254ad1(0x113),{'body':_0x1283bc}),_0x28b951=_0x580f25[_0x254ad1(0x10e)](_0x304381=>ee(_0x233066[_0x254ad1(0x132)][_0x254ad1(0x135)][_0x304381],_0x3bcf7f,_0x2b6708))[_0x254ad1(0xf7)](Boolean);return Object[_0x254ad1(0xf3)](_0x233066[_0x254ad1(0x132)]['users'])[_0x254ad1(0x109)](_0x30ffd1=>{const _0x4f32f7=_0x254ad1;this[_0x4f32f7(0x119)][_0x4f32f7(0xeb)](_0x30ffd1);}),_0x28b951;}[_0x58a68b(0x143)](_0x5b0899){const _0x364744=_0x58a68b;return{'id':_0x5b0899['id'],'threadId':_0x5b0899[_0x364744(0x147)],'ref':_0x5b0899[_0x364744(0xec)]};}};S=Q([b(0x0,_0x31afa8(_0x38d411)),b(0x1,_0x31afa8(_0x1fa2aa)),b(0x2,_0x31afa8(_0x5276ff))],S);var re=Object[_0x58a68b(0x151)],te=(_0x3e44da,_0x92b9a6,_0x2fc22e,_0x245311)=>{for(var _0x1dd1af=_0x245311>0x1?void 0x0:_0x245311?re(_0x92b9a6,_0x2fc22e):_0x92b9a6,_0x2e4f43=_0x3e44da['length']-0x1,_0x5e6338;_0x2e4f43>=0x0;_0x2e4f43--)(_0x5e6338=_0x3e44da[_0x2e4f43])&&(_0x1dd1af=_0x5e6338(_0x1dd1af)||_0x1dd1af);return _0x1dd1af;},M=(_0x20b435,_0xbce566)=>(_0x48a6c0,_0x4f42a5)=>_0xbce566(_0x48a6c0,_0x4f42a5,_0x20b435);let f=class extends _0x1e5fc7{constructor(_0x596516,_0x4ea0a0){const _0x31a8dd=_0x58a68b;super(),this[_0x31a8dd(0x10a)]=_0x596516,this['_threadCommentDataSource']=_0x4ea0a0,this[_0x31a8dd(0x107)]();}['_initDataSource'](){const _0x302966=_0x58a68b;this[_0x302966(0x10a)][_0x302966(0x148)]=this['_threadCommentDataSource'],this[_0x302966(0x10a)][_0x302966(0xff)]=!0x1;}};f=te([M(0x0,_0x2b003d),M(0x1,_0x31afa8(S))],f);var se=Object[_0x58a68b(0x14a)],oe=Object[_0x58a68b(0x151)],ne=(_0x20ebda,_0x408eec,_0x3b280c)=>_0x408eec in _0x20ebda?se(_0x20ebda,_0x408eec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b280c}):_0x20ebda[_0x408eec]=_0x3b280c,ie=(_0x3ad2bb,_0x3c8f46,_0x3ab232,_0x15b566)=>{const _0x4cddd8=_0x58a68b;for(var _0x208e18=_0x15b566>0x1?void 0x0:_0x15b566?oe(_0x3c8f46,_0x3ab232):_0x3c8f46,_0x56097a=_0x3ad2bb[_0x4cddd8(0xf2)]-0x1,_0x149a3f;_0x56097a>=0x0;_0x56097a--)(_0x149a3f=_0x3ad2bb[_0x56097a])&&(_0x208e18=_0x149a3f(_0x208e18)||_0x208e18);return _0x208e18;},N=(_0x385973,_0x43f4c3)=>(_0x24b45f,_0x363c80)=>_0x43f4c3(_0x24b45f,_0x363c80,_0x385973),$=(_0x559c13,_0x1f8e05,_0x11dc48)=>ne(_0x559c13,typeof _0x1f8e05!=_0x58a68b(0x120)?_0x1f8e05+'':_0x1f8e05,_0x11dc48);let g=class extends _0x5c853b{constructor(_0x3a9859=O,_0x5379bf,_0x3b5b7e){const _0x3705e6=_0x58a68b;super(),this[_0x3705e6(0xf9)]=_0x3a9859,this['_injector']=_0x5379bf,this[_0x3705e6(0x146)]=_0x3b5b7e;const {..._0x4bd947}=_0x5d724b({},O,this[_0x3705e6(0xf9)]);this[_0x3705e6(0x146)][_0x3705e6(0x111)](z,_0x4bd947);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x50fe06=>{const _0x448cd0=_0x26d7;this[_0x448cd0(0x100)][_0x448cd0(0x13e)](_0x50fe06);});}[_0x58a68b(0x12e)](){const _0x389f1c=_0x58a68b;this[_0x389f1c(0x100)][_0x389f1c(0x101)](f),this[_0x389f1c(0x100)][_0x389f1c(0x101)](_);}};$(g,'pluginName',W),$(g,_0x58a68b(0xf4),_0x4977eb['UNIVER_UNKNOWN']),g=ie([_0x2b7f20(_0x5439b7,_0xed0bc7,_0xe241d6),N(0x1,_0x31afa8(_0x2e8e75)),N(0x2,_0x5c4f8c)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x4672(_0x1d5ae6,_0x56513a){_0x1d5ae6=_0x1d5ae6-0x110;const _0x1614a2=_0x1614();let _0x4672b2=_0x1614a2[_0x1d5ae6];return _0x4672b2;}function _0x1614(){const _0x47a312=['_init','/universer-api/comment/unit/','Unknown','addComment','onReady','code','reply','addUser','512916Xozhhd','UniverThreadCommentUIPlugin','UniverProCollaborationClient','@univerjs/thread-comment-ui','exports','deleteComment','user','onStarting','Solve','replyId','users','_configService','/list','listComments','map','CustomRangeType','357362cUVnfv','error','userID','@univerjs/thread-comment','find','OpenOrReOpen','UNRECOGNIZED','_commentService','thread-comment-data-source.config','commentUpdate$','userId','content','_sessionService','getUnit','comments','@univerjs/network','resolved','rangeId','_initDataSource','values','/reply','Plugin','object','Solved','get','customRanges','_config','bufferTime','getUser','rangeType','function','COMMENT','getCurrentUser','getMemberID','52262qQhFYc','_userService','merge','body','UNIVER_UNKNOWN','delete','/universer-api/user/list','ThreadCommentModel','disposeWithMe','CommentService','payload','post','UniverProLicense','createTimestamp','IConfigService','Injector','resolveComment','format','threadId','2940543MXdWPK','Disposable','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','Reply','_threadCommentDataSource','10gZgeuw','syncUpdateMutationToColla','/add','_threadCommentDataSourceService','dayjs','unitId','_httpService','HTTPService','getComment','/solved','UniverCore','size','IThreadCommentDataSourceService','pipe','subscribe','replies','UniverThreadCommentUi','saveCommentToSnapshot','55sUnDDu','add','DependentOn','UniverCollaborationClientPlugin','_injector','parse','stringify','solved','_threadCommentModel','defineProperty','pluginName','filter','1285023HBayaJ','Inject','type','ref','dataSource','updateComment','12936fDzsBv','@univerjs-pro/collaboration-client','Delete','getOwnPropertyDescriptor','Add','624580DZhnER','parentId','symbol','comment','rxjs','UniverNetwork','/delete','setConfig','personId','UserManagerService','forEach','UniverThreadCommentDataSourcePlugin','Edit','amd','272aSAqNd','root','requireSession'];_0x1614=function(){return _0x47a312;};return _0x1614();}(function(_0x34c7bd,_0x478576){const _0x39a45f=_0x4672,_0x4a38c3=_0x34c7bd();while(!![]){try{const _0x6ebd02=-parseInt(_0x39a45f(0x12e))/0x1+-parseInt(_0x39a45f(0x192))/0x2+parseInt(_0x39a45f(0x187))/0x3+-parseInt(_0x39a45f(0x18d))/0x4*(parseInt(_0x39a45f(0x17b))/0x5)+-parseInt(_0x39a45f(0x11e))/0x6+-parseInt(_0x39a45f(0x150))/0x7*(-parseInt(_0x39a45f(0x113))/0x8)+parseInt(_0x39a45f(0x163))/0x9*(parseInt(_0x39a45f(0x169))/0xa);if(_0x6ebd02===_0x478576)break;else _0x4a38c3['push'](_0x4a38c3['shift']());}catch(_0x562851){_0x4a38c3['push'](_0x4a38c3['shift']());}}}(_0x1614,0x35458),function(_0x19cdfa,_0x4dbf30){const _0x19a694=_0x4672;typeof exports==_0x19a694(0x144)&&typeof module<'u'?_0x4dbf30(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==_0x19a694(0x14c)&&define[_0x19a694(0x112)]?define([_0x19a694(0x122),_0x19a694(0x18e),'@univerjs-pro/license','@univerjs/core',_0x19a694(0x121),_0x19a694(0x131),_0x19a694(0x196),_0x19a694(0x13d)],_0x4dbf30):(_0x19cdfa=typeof globalThis<'u'?globalThis:_0x19cdfa||self,_0x4dbf30(_0x19cdfa['UniverProThreadCommentDatasource']={},_0x19cdfa[_0x19a694(0x120)],_0x19cdfa[_0x19a694(0x15c)],_0x19cdfa[_0x19a694(0x173)],_0x19cdfa[_0x19a694(0x179)],_0x19cdfa['UniverThreadComment'],_0x19cdfa[_0x19a694(0x196)],_0x19cdfa[_0x19a694(0x197)]));}(this,function(_0x3d14b1,_0x39b4a1,_0x338502,_0x782fd0,_0x145a2a,_0x1a5ffb,_0x325b90,_0x1743c9){'use strict';const _0x39bac6=_0x4672;const _0x13e2de=_0x39bac6(0x165);var _0x164965=(_0x5bcc62=>(_0x5bcc62[_0x5bcc62[_0x39bac6(0x133)]=0x0]=_0x39bac6(0x133),_0x5bcc62[_0x5bcc62[_0x39bac6(0x145)]=0x1]='Solved',_0x5bcc62[_0x5bcc62[_0x39bac6(0x134)]=-0x1]=_0x39bac6(0x134),_0x5bcc62))(_0x164965||{}),_0x121c0c=(_0x3f73e1=>(_0x3f73e1[_0x3f73e1[_0x39bac6(0x118)]=0x0]='Unknown',_0x3f73e1[_0x3f73e1[_0x39bac6(0x191)]=0x1]='Add',_0x3f73e1[_0x3f73e1[_0x39bac6(0x167)]=0x2]=_0x39bac6(0x167),_0x3f73e1[_0x3f73e1['Edit']=0x3]=_0x39bac6(0x111),_0x3f73e1[_0x3f73e1[_0x39bac6(0x18f)]=0x4]=_0x39bac6(0x18f),_0x3f73e1[_0x3f73e1[_0x39bac6(0x126)]=0x5]=_0x39bac6(0x126),_0x3f73e1[_0x3f73e1[_0x39bac6(0x134)]=-0x1]=_0x39bac6(0x134),_0x3f73e1))(_0x121c0c||{});const _0x12611a=_0x4b0ef6=>_0x782fd0[_0x39bac6(0x16d)](new Date(+_0x4b0ef6))[_0x39bac6(0x161)]('YYYY/MM/DD\x20HH:mm'),_0x43d62f=async(_0x3e0d4a,_0x349a23)=>{const _0x34e526=_0x39bac6,_0x40c71f=_0x3e0d4a['get'](_0x782fd0[_0x34e526(0x19b)]),_0x4845bf=_0x3e0d4a['get'](_0x1743c9[_0x34e526(0x170)]);_0x349a23[_0x34e526(0x19c)](_0x1e8930=>{const _0x35ad8b=_0x34e526;_0x40c71f[_0x35ad8b(0x14a)](_0x1e8930)&&_0x349a23[_0x35ad8b(0x155)](_0x1e8930);}),_0x349a23[_0x34e526(0x174)]&&(await _0x4845bf['get'](_0x34e526(0x156),{'params':{'userIDs':[..._0x349a23]}}))[_0x34e526(0x153)][_0x34e526(0x128)]['forEach'](_0x4e4156=>{const _0x4345d8=_0x34e526;_0x4e4156&&_0x40c71f[_0x4345d8(0x11d)](_0x4e4156);});};var _0x10a481=Object[_0x39bac6(0x190)],_0x23ddd7=(_0x33d954,_0x3ccbf0,_0x26231c,_0x132d78)=>{for(var _0x232ff0=_0x132d78>0x1?void 0x0:_0x132d78?_0x10a481(_0x3ccbf0,_0x26231c):_0x3ccbf0,_0x3d2cd2=_0x33d954['length']-0x1,_0x41e040;_0x3d2cd2>=0x0;_0x3d2cd2--)(_0x41e040=_0x33d954[_0x3d2cd2])&&(_0x232ff0=_0x41e040(_0x232ff0)||_0x232ff0);return _0x232ff0;},_0x102341=(_0x52ef4b,_0x364e06)=>(_0x4e89da,_0x2cd7f1)=>_0x364e06(_0x4e89da,_0x2cd7f1,_0x52ef4b);let _0x621e03=class extends _0x782fd0[_0x39bac6(0x164)]{constructor(_0x1f3a4d,_0x3b11a6,_0x2bacbe,_0x1250be){const _0x527f42=_0x39bac6;super(),this[_0x527f42(0x135)]=_0x1f3a4d,this[_0x527f42(0x183)]=_0x3b11a6,this[_0x527f42(0x151)]=_0x2bacbe,this[_0x527f42(0x17f)]=_0x1250be,this[_0x527f42(0x116)](),this['_initUserSync']();}['_initUserSync'](){const _0x22cd0f=_0x39bac6;this[_0x22cd0f(0x158)](this[_0x22cd0f(0x183)][_0x22cd0f(0x137)][_0x22cd0f(0x176)](_0x325b90[_0x22cd0f(0x149)](0x10))[_0x22cd0f(0x177)](_0x390d04=>{const _0x1d100e=_0x22cd0f,_0x5f0131=new Set();_0x390d04[_0x1d100e(0x19c)](_0x21bc3b=>{const _0xebd611=_0x1d100e;switch(_0x21bc3b[_0xebd611(0x189)]){case _0xebd611(0x17c):{const _0xd75310=_0x21bc3b[_0xebd611(0x15a)][_0xebd611(0x19a)];_0x5f0131[_0xebd611(0x17c)](_0xd75310);break;}}}),_0x43d62f(this[_0x1d100e(0x17f)],_0x5f0131);}));}[_0x39bac6(0x116)](){const _0x51ef0a=_0x39bac6;this['disposeWithMe'](this[_0x51ef0a(0x135)][_0x51ef0a(0x137)]['subscribe'](async _0x5f2877=>{const _0x31d188=_0x51ef0a;var _0x4e93bc,_0x50aa02,_0x57f041,_0x54d130;const _0x1fddcc=(_0x4e93bc=this[_0x31d188(0x183)][_0x31d188(0x13b)](_0x5f2877[_0x31d188(0x16e)])[_0x31d188(0x132)](_0x744047=>_0x744047['threadId']===_0x5f2877['threadId']))==null?void 0x0:_0x4e93bc['root'];if(!_0x1fddcc)return;const {unitId:_0x3bfe9b,subUnitId:_0x3c67a0}=_0x1fddcc;switch(_0x5f2877['user']&&this['_userService'][_0x31d188(0x11d)](_0x5f2877[_0x31d188(0x124)]),_0x5f2877[_0x31d188(0x189)]){case _0x121c0c[_0x31d188(0x191)]:break;case _0x121c0c[_0x31d188(0x167)]:{this[_0x31d188(0x183)][_0x31d188(0x119)](_0x3bfe9b,_0x3c67a0,{'unitId':_0x3bfe9b,'subUnitId':_0x3c67a0,'ref':'','id':_0x5f2877[_0x31d188(0x127)],'dT':_0x12611a(+_0x5f2877['createTimestamp']),'threadId':_0x5f2877[_0x31d188(0x162)],'personId':(_0x57f041=(_0x50aa02=_0x5f2877[_0x31d188(0x124)])==null?void 0x0:_0x50aa02['userID'])!=null?_0x57f041:_0x5f2877[_0x31d188(0x138)],'text':JSON[_0x31d188(0x180)](_0x5f2877['content']),'parentId':_0x1fddcc['id']});break;}case _0x121c0c[_0x31d188(0x18f)]:{const _0x3895d4=this[_0x31d188(0x183)][_0x31d188(0x171)](_0x3bfe9b,_0x3c67a0,_0x5f2877['replyId']);_0x3895d4&&_0x3895d4[_0x31d188(0x193)]&&this['_threadCommentModel']['deleteComment'](_0x3bfe9b,_0x3c67a0,_0x5f2877[_0x31d188(0x127)]);break;}case _0x121c0c['Edit']:{this[_0x31d188(0x183)][_0x31d188(0x18c)](_0x3bfe9b,_0x3c67a0,{'commentId':_0x5f2877[_0x31d188(0x127)],'text':JSON[_0x31d188(0x180)](_0x5f2877[_0x31d188(0x139)])});break;}case _0x121c0c[_0x31d188(0x126)]:{const _0x4792f9=(_0x54d130=this[_0x31d188(0x183)][_0x31d188(0x13b)](_0x5f2877[_0x31d188(0x16e)])[_0x31d188(0x132)](_0x1c1f72=>_0x1c1f72[_0x31d188(0x162)]===_0x5f2877[_0x31d188(0x162)]))==null?void 0x0:_0x54d130[_0x31d188(0x114)];_0x4792f9&&this['_threadCommentModel'][_0x31d188(0x160)](_0x3bfe9b,_0x3c67a0,_0x4792f9['id'],_0x5f2877[_0x31d188(0x182)]===_0x164965['Solved']);break;}}}));}};_0x621e03=_0x23ddd7([_0x102341(0x0,_0x782fd0[_0x39bac6(0x188)](_0x39b4a1[_0x39bac6(0x159)])),_0x102341(0x1,_0x782fd0['Inject'](_0x1a5ffb[_0x39bac6(0x157)])),_0x102341(0x2,_0x782fd0[_0x39bac6(0x188)](_0x782fd0[_0x39bac6(0x19b)])),_0x102341(0x3,_0x782fd0['Inject'](_0x782fd0['Injector']))],_0x621e03);const _0x6fb472=_0x39bac6(0x136),_0xb8b559={};var _0x5b95e3=Object[_0x39bac6(0x190)],_0x341482=(_0x421932,_0x319b86,_0x5866ae,_0x5740a1)=>{const _0x14b1cd=_0x39bac6;for(var _0x4a4cfa=_0x5740a1>0x1?void 0x0:_0x5740a1?_0x5b95e3(_0x319b86,_0x5866ae):_0x319b86,_0x512360=_0x421932[_0x14b1cd(0x166)]-0x1,_0x25af2e;_0x512360>=0x0;_0x512360--)(_0x25af2e=_0x421932[_0x512360])&&(_0x4a4cfa=_0x25af2e(_0x4a4cfa)||_0x4a4cfa);return _0x4a4cfa;},_0x54e373=(_0x1725c3,_0x31925e)=>(_0x47fc08,_0x569687)=>_0x31925e(_0x47fc08,_0x569687,_0x1725c3);function _0x920e66(_0x38876b,_0x51bfe3){const _0x118e88=_0x39bac6,_0x15e564=_0x38876b['replies'][0x0];return{..._0x51bfe3,'id':_0x15e564[_0x118e88(0x127)],'resolved':_0x38876b[_0x118e88(0x182)]===0x1,'dT':_0x12611a(_0x15e564[_0x118e88(0x15d)]),'personId':_0x15e564[_0x118e88(0x138)],'threadId':_0x15e564[_0x118e88(0x162)]};}function _0x457631(_0x1ffea8,_0x1ad0b1,_0x43e436){const _0x37814b=_0x39bac6;var _0x5618ae,_0xcca847;if(((_0xcca847=(_0x5618ae=_0x1ffea8==null?void 0x0:_0x1ffea8[_0x37814b(0x178)])==null?void 0x0:_0x5618ae[_0x37814b(0x166)])!=null?_0xcca847:0x0)>0x0){const _0x445749=(_0x258523,_0x16f5a3)=>({'id':_0x258523[_0x37814b(0x127)],'threadId':_0x258523[_0x37814b(0x162)],'dT':_0x12611a(_0x258523['createTimestamp']),'personId':_0x258523['userId'],'resolved':_0x1ffea8[_0x37814b(0x182)]===_0x164965[_0x37814b(0x145)],'unitId':_0x1ad0b1,'subUnitId':_0x43e436,'text':JSON['parse'](_0x258523['content']),'parentId':_0x16f5a3}),_0x1d6c9d=_0x445749(_0x1ffea8[_0x37814b(0x178)][0x0]);return{..._0x1d6c9d,'children':_0x1ffea8[_0x37814b(0x178)]['slice'](0x1)[_0x37814b(0x12c)](_0x20f24c=>_0x445749(_0x20f24c,_0x1d6c9d['id']))};}return null;}let _0xdaded3=class{constructor(_0x260e02,_0x4f3ca9,_0x233e2b){const _0x376e7b=_0x39bac6;this[_0x376e7b(0x16f)]=_0x260e02,this[_0x376e7b(0x151)]=_0x4f3ca9,this['_sessionService']=_0x233e2b;}async[_0x39bac6(0x119)](_0x308b98){const _0x10482e=_0x39bac6;var _0xb3dbeb,_0x106803;const {parentId:_0x26caab,unitId:_0x169a57,text:_0x378339,threadId:_0x19bd27}=_0x308b98,_0x3bcb37=(_0x106803=(_0xb3dbeb=_0x378339[_0x10482e(0x147)])==null?void 0x0:_0xb3dbeb[_0x10482e(0x186)](_0x5a671f=>_0x5a671f[_0x10482e(0x14b)]===_0x782fd0['CustomRangeType']['COMMENT'])[_0x10482e(0x12c)](_0x3c7d7f=>_0x3c7d7f[_0x10482e(0x13f)]))!=null?_0x106803:[],_0x506106=JSON[_0x10482e(0x181)](_0x378339),_0x139885=(await this[_0x10482e(0x13a)][_0x10482e(0x115)](_0x169a57))[_0x10482e(0x14f)]();if(_0x26caab){const _0x5d7a3f={'memberId':_0x139885,'unitId':_0x169a57,'content':_0x506106,'mention':_0x3bcb37,'threadId':_0x19bd27},_0x350feb=(await this[_0x10482e(0x16f)][_0x10482e(0x15b)](_0x10482e(0x117)+_0x169a57+_0x10482e(0x142),{'body':_0x5d7a3f}))[_0x10482e(0x153)][_0x10482e(0x11c)];return{..._0x308b98,'id':_0x350feb[_0x10482e(0x127)],'dT':_0x782fd0['dayjs'](+_0x350feb[_0x10482e(0x15d)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x350feb[_0x10482e(0x138)]};}else{const _0x3e3f56={'memberId':_0x139885,'unitId':_0x169a57,'content':_0x506106,'mention':_0x3bcb37},_0x3fe384=await this[_0x10482e(0x16f)][_0x10482e(0x15b)](_0x10482e(0x117)+_0x169a57+_0x10482e(0x16b),{'body':_0x3e3f56});return _0x920e66(_0x3fe384[_0x10482e(0x153)][_0x10482e(0x195)],_0x308b98);}}async[_0x39bac6(0x18c)](_0x8b9b46){const _0xb450c3=_0x39bac6;var _0x8625a4,_0xa71be4;const {text:_0x4a68e6,unitId:_0x106438}=_0x8b9b46,_0xde822a=(_0xa71be4=(_0x8625a4=_0x4a68e6[_0xb450c3(0x147)])==null?void 0x0:_0x8625a4[_0xb450c3(0x186)](_0xd9a070=>_0xd9a070[_0xb450c3(0x14b)]===_0x782fd0[_0xb450c3(0x12d)][_0xb450c3(0x14d)])[_0xb450c3(0x12c)](_0x4f40c7=>_0x4f40c7['rangeId']))!=null?_0xa71be4:[],_0x242bb9=JSON[_0xb450c3(0x181)](_0x4a68e6),_0x35b175=_0x8b9b46[_0xb450c3(0x162)],_0x208f13=_0x8b9b46['id'],_0x2d3823={'memberId':(await this[_0xb450c3(0x13a)][_0xb450c3(0x115)](_0x106438))[_0xb450c3(0x14f)](),'unitId':_0x106438,'threadId':_0x35b175,'mention':_0xde822a,'content':_0x242bb9,'replyId':_0x208f13},_0x893a3a=await this[_0xb450c3(0x16f)][_0xb450c3(0x15b)](_0xb450c3(0x117)+_0x106438+'/edit',{'body':_0x2d3823});return!_0x893a3a[_0xb450c3(0x153)][_0xb450c3(0x12f)]||_0x893a3a[_0xb450c3(0x153)][_0xb450c3(0x12f)][_0xb450c3(0x11b)]===0x1;}async[_0x39bac6(0x160)](_0x21de49){const _0x232b94=_0x39bac6,{unitId:_0x1a0153}=_0x21de49,_0xecdddd=_0x21de49[_0x232b94(0x162)],_0x5dea95={'memberId':this[_0x232b94(0x151)][_0x232b94(0x14e)]()[_0x232b94(0x130)],'unitId':_0x1a0153,'threadId':_0xecdddd,'solved':_0x21de49[_0x232b94(0x13e)]?_0x164965['Solved']:_0x164965[_0x232b94(0x133)]},_0x3af354=await this[_0x232b94(0x16f)]['post'](_0x232b94(0x117)+_0x1a0153+_0x232b94(0x172),{'body':_0x5dea95});return!_0x3af354[_0x232b94(0x153)][_0x232b94(0x12f)]||_0x3af354[_0x232b94(0x153)][_0x232b94(0x12f)][_0x232b94(0x11b)]===0x1;}async[_0x39bac6(0x123)](_0xadd8cf,_0x4c5b3e,_0x30661a,_0x3ef511){const _0x2daa3d=_0x39bac6,_0x140414={'memberId':(await this['_sessionService'][_0x2daa3d(0x115)](_0xadd8cf))['getMemberID'](),'threadId':_0x30661a,'replyId':_0x3ef511,'unitId':_0xadd8cf},_0x10ecf8=await this['_httpService'][_0x2daa3d(0x15b)](_0x2daa3d(0x117)+_0xadd8cf+_0x2daa3d(0x198),{'body':_0x140414});return!_0x10ecf8['body']['error']||_0x10ecf8['body'][_0x2daa3d(0x12f)][_0x2daa3d(0x11b)]===0x1;}async[_0x39bac6(0x12b)](_0x2a789e,_0x3993fc,_0x24fa13){const _0x8c7613=_0x39bac6,_0x323aba={'unitId':_0x2a789e,'threadId':_0x24fa13},_0x42c927=await this[_0x8c7613(0x16f)]['post'](_0x8c7613(0x117)+_0x2a789e+_0x8c7613(0x12a),{'body':_0x323aba}),_0x53285a=_0x24fa13[_0x8c7613(0x12c)](_0x495b07=>_0x457631(_0x42c927['body'][_0x8c7613(0x13c)][_0x495b07],_0x2a789e,_0x3993fc))[_0x8c7613(0x186)](Boolean);return Object[_0x8c7613(0x141)](_0x42c927['body'][_0x8c7613(0x128)])['forEach'](_0x317cb1=>{const _0xcf96d4=_0x8c7613;this[_0xcf96d4(0x151)]['addUser'](_0x317cb1);}),_0x53285a;}[_0x39bac6(0x17a)](_0x12cf9d){const _0x5eb4ed=_0x39bac6;return{'id':_0x12cf9d['id'],'threadId':_0x12cf9d[_0x5eb4ed(0x162)],'ref':_0x12cf9d[_0x5eb4ed(0x18a)]};}};_0xdaded3=_0x341482([_0x54e373(0x0,_0x782fd0['Inject'](_0x1743c9[_0x39bac6(0x170)])),_0x54e373(0x1,_0x782fd0[_0x39bac6(0x188)](_0x782fd0['UserManagerService'])),_0x54e373(0x2,_0x782fd0['Inject'](_0x39b4a1['CollaborationSessionService']))],_0xdaded3);var _0x35e2d3=Object[_0x39bac6(0x190)],_0x251c6c=(_0x39b604,_0x16e532,_0x3ceee9,_0x544e1f)=>{const _0x4bf264=_0x39bac6;for(var _0x189f22=_0x544e1f>0x1?void 0x0:_0x544e1f?_0x35e2d3(_0x16e532,_0x3ceee9):_0x16e532,_0xa21c5f=_0x39b604[_0x4bf264(0x166)]-0x1,_0x8a23ef;_0xa21c5f>=0x0;_0xa21c5f--)(_0x8a23ef=_0x39b604[_0xa21c5f])&&(_0x189f22=_0x8a23ef(_0x189f22)||_0x189f22);return _0x189f22;},_0xc5bf0a=(_0x4b8646,_0x3c378f)=>(_0x58a946,_0x3e73f9)=>_0x3c378f(_0x58a946,_0x3e73f9,_0x4b8646);let _0x5e86a5=class extends _0x782fd0[_0x39bac6(0x164)]{constructor(_0x5339b6,_0x5edd86){const _0x553597=_0x39bac6;super(),this['_threadCommentDataSourceService']=_0x5339b6,this[_0x553597(0x168)]=_0x5edd86,this[_0x553597(0x140)]();}[_0x39bac6(0x140)](){const _0x5e3ad4=_0x39bac6;this[_0x5e3ad4(0x16c)][_0x5e3ad4(0x18b)]=this[_0x5e3ad4(0x168)],this[_0x5e3ad4(0x16c)][_0x5e3ad4(0x16a)]=!0x1;}};_0x5e86a5=_0x251c6c([_0xc5bf0a(0x0,_0x1a5ffb[_0x39bac6(0x175)]),_0xc5bf0a(0x1,_0x782fd0[_0x39bac6(0x188)](_0xdaded3))],_0x5e86a5);var _0x3e7616=Object[_0x39bac6(0x184)],_0x1478eb=Object['getOwnPropertyDescriptor'],_0x5c00e3=(_0xa5e157,_0x56122d,_0x2608fa)=>_0x56122d in _0xa5e157?_0x3e7616(_0xa5e157,_0x56122d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2608fa}):_0xa5e157[_0x56122d]=_0x2608fa,_0x37846f=(_0x47f843,_0x989710,_0x51a3ce,_0xc9d341)=>{const _0x26911c=_0x39bac6;for(var _0x30c813=_0xc9d341>0x1?void 0x0:_0xc9d341?_0x1478eb(_0x989710,_0x51a3ce):_0x989710,_0x5496bb=_0x47f843[_0x26911c(0x166)]-0x1,_0x4810a4;_0x5496bb>=0x0;_0x5496bb--)(_0x4810a4=_0x47f843[_0x5496bb])&&(_0x30c813=_0x4810a4(_0x30c813)||_0x30c813);return _0x30c813;},_0x31ad66=(_0x4ba811,_0x45e0a8)=>(_0x5a3f4a,_0x12e7c)=>_0x45e0a8(_0x5a3f4a,_0x12e7c,_0x4ba811),_0x44b548=(_0x460ab4,_0x1cc7a1,_0x371345)=>_0x5c00e3(_0x460ab4,typeof _0x1cc7a1!=_0x39bac6(0x194)?_0x1cc7a1+'':_0x1cc7a1,_0x371345);_0x3d14b1[_0x39bac6(0x110)]=class extends _0x782fd0[_0x39bac6(0x143)]{constructor(_0x30c588=_0xb8b559,_0x282a78,_0x18f083){const _0xb35703=_0x39bac6;super(),this[_0xb35703(0x148)]=_0x30c588,this[_0xb35703(0x17f)]=_0x282a78,this[_0xb35703(0x129)]=_0x18f083;const {..._0x5e7252}=_0x782fd0[_0xb35703(0x152)]({},_0xb8b559,this['_config']);this[_0xb35703(0x129)][_0xb35703(0x199)](_0x6fb472,_0x5e7252);}[_0x39bac6(0x125)](){const _0x56a516=_0x39bac6;[[_0xdaded3],[_0x5e86a5],[_0x621e03]][_0x56a516(0x19c)](_0x208c3d=>{const _0x500d5e=_0x56a516;this['_injector'][_0x500d5e(0x17c)](_0x208c3d);});}[_0x39bac6(0x11a)](){const _0x455048=_0x39bac6;this[_0x455048(0x17f)][_0x455048(0x146)](_0x5e86a5),this[_0x455048(0x17f)]['get'](_0x621e03);}},_0x44b548(_0x3d14b1['UniverThreadCommentDataSourcePlugin'],_0x39bac6(0x185),_0x13e2de),_0x44b548(_0x3d14b1[_0x39bac6(0x110)],_0x39bac6(0x189),_0x782fd0['UniverInstanceType'][_0x39bac6(0x154)]),_0x3d14b1['UniverThreadCommentDataSourcePlugin']=_0x37846f([_0x782fd0[_0x39bac6(0x17d)](_0x145a2a[_0x39bac6(0x11f)],_0x39b4a1[_0x39bac6(0x17e)],_0x338502['UniverLicensePlugin']),_0x31ad66(0x1,_0x782fd0[_0x39bac6(0x188)](_0x782fd0[_0x39bac6(0x15f)])),_0x31ad66(0x2,_0x782fd0[_0x39bac6(0x15e)])],_0x3d14b1[_0x39bac6(0x110)]),Object[_0x39bac6(0x184)](_0x3d14b1,Symbol['toStringTag'],{'value':'Module'});}));
1
+ function _0x425f(_0x143c94,_0x34679b){_0x143c94=_0x143c94-0xa8;const _0x2ff018=_0x2ff0();let _0x425fd6=_0x2ff018[_0x143c94];return _0x425fd6;}(function(_0x4909ec,_0x43e010){const _0x4d9896=_0x425f,_0x4e713f=_0x4909ec();while(!![]){try{const _0x3d49a4=parseInt(_0x4d9896(0x115))/0x1*(parseInt(_0x4d9896(0xed))/0x2)+-parseInt(_0x4d9896(0xe6))/0x3+parseInt(_0x4d9896(0xcf))/0x4+parseInt(_0x4d9896(0x111))/0x5*(parseInt(_0x4d9896(0x10c))/0x6)+parseInt(_0x4d9896(0x11d))/0x7*(parseInt(_0x4d9896(0xb0))/0x8)+parseInt(_0x4d9896(0xf3))/0x9*(-parseInt(_0x4d9896(0xb3))/0xa)+-parseInt(_0x4d9896(0x10a))/0xb*(parseInt(_0x4d9896(0xbd))/0xc);if(_0x3d49a4===_0x43e010)break;else _0x4e713f['push'](_0x4e713f['shift']());}catch(_0x25f694){_0x4e713f['push'](_0x4e713f['shift']());}}}(_0x2ff0,0xba423),function(_0x58dd86,_0x583295){const _0xac90fc=_0x425f;typeof exports==_0xac90fc(0xd3)&&typeof module<'u'?_0x583295(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==_0xac90fc(0xb2)&&define[_0xac90fc(0xdb)]?define(['exports',_0xac90fc(0xd5),_0xac90fc(0x12a),_0xac90fc(0xcb),'@univerjs/thread-comment-ui',_0xac90fc(0xa9),'rxjs',_0xac90fc(0xca)],_0x583295):(_0x58dd86=typeof globalThis<'u'?globalThis:_0x58dd86||self,_0x583295(_0x58dd86[_0xac90fc(0xc9)]={},_0x58dd86['UniverProCollaborationClient'],_0x58dd86[_0xac90fc(0xab)],_0x58dd86[_0xac90fc(0x10b)],_0x58dd86['UniverThreadCommentUi'],_0x58dd86[_0xac90fc(0xf4)],_0x58dd86[_0xac90fc(0xc3)],_0x58dd86[_0xac90fc(0xd4)]));}(this,function(_0x27d8d1,_0x31a3d9,_0x3c44df,_0x47cd9e,_0x4c82fd,_0x44534f,_0x263ea1,_0x399bbd){'use strict';const _0x4e3fb3=_0x425f;const _0x19e2bb='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x5f1f35=(_0x3760ec=>(_0x3760ec[_0x3760ec[_0x4e3fb3(0x109)]=0x0]=_0x4e3fb3(0x109),_0x3760ec[_0x3760ec[_0x4e3fb3(0x10d)]=0x1]=_0x4e3fb3(0x10d),_0x3760ec[_0x3760ec[_0x4e3fb3(0xd6)]=-0x1]=_0x4e3fb3(0xd6),_0x3760ec))(_0x5f1f35||{}),_0x5472e5=(_0x176c68=>(_0x176c68[_0x176c68[_0x4e3fb3(0xc4)]=0x0]=_0x4e3fb3(0xc4),_0x176c68[_0x176c68['Add']=0x1]=_0x4e3fb3(0x12e),_0x176c68[_0x176c68[_0x4e3fb3(0xc8)]=0x2]=_0x4e3fb3(0xc8),_0x176c68[_0x176c68[_0x4e3fb3(0x107)]=0x3]=_0x4e3fb3(0x107),_0x176c68[_0x176c68[_0x4e3fb3(0x106)]=0x4]='Delete',_0x176c68[_0x176c68[_0x4e3fb3(0x113)]=0x5]='Solve',_0x176c68[_0x176c68[_0x4e3fb3(0xd6)]=-0x1]=_0x4e3fb3(0xd6),_0x176c68))(_0x5472e5||{});const _0x192db0=_0x7e2b09=>_0x47cd9e['dayjs'](new Date(+_0x7e2b09))[_0x4e3fb3(0xac)](_0x4e3fb3(0x129)),_0x588165=async(_0x7c3654,_0x307b5b)=>{const _0x1996a1=_0x4e3fb3,_0x4b7ec7=_0x7c3654[_0x1996a1(0x12d)](_0x47cd9e[_0x1996a1(0xd9)]),_0x46de10=_0x7c3654[_0x1996a1(0x12d)](_0x399bbd[_0x1996a1(0xce)]);_0x307b5b[_0x1996a1(0x108)](_0x5e4de3=>{const _0x254c07=_0x1996a1;_0x4b7ec7[_0x254c07(0xf1)](_0x5e4de3)&&_0x307b5b[_0x254c07(0x10e)](_0x5e4de3);}),_0x307b5b['size']&&(await _0x46de10[_0x1996a1(0x12d)](_0x1996a1(0x105),{'params':{'userIDs':[..._0x307b5b]}}))[_0x1996a1(0x114)]['users'][_0x1996a1(0x108)](_0x385bc2=>{_0x385bc2&&_0x4b7ec7['addUser'](_0x385bc2);});};var _0x2838fa=Object[_0x4e3fb3(0x103)],_0x110754=(_0xfdc2b9,_0xff6371,_0x328ebc,_0x305e38)=>{for(var _0x5ac48f=_0x305e38>0x1?void 0x0:_0x305e38?_0x2838fa(_0xff6371,_0x328ebc):_0xff6371,_0x39c665=_0xfdc2b9['length']-0x1,_0x2f0d4f;_0x39c665>=0x0;_0x39c665--)(_0x2f0d4f=_0xfdc2b9[_0x39c665])&&(_0x5ac48f=_0x2f0d4f(_0x5ac48f)||_0x5ac48f);return _0x5ac48f;},_0x5ebf2c=(_0x5bd804,_0x1bed90)=>(_0x5e2bf1,_0xa0f230)=>_0x1bed90(_0x5e2bf1,_0xa0f230,_0x5bd804);let _0x5dbcc8=class extends _0x47cd9e[_0x4e3fb3(0x117)]{constructor(_0x131956,_0x59215c,_0x58e52d,_0x7e8a7f){const _0x37a704=_0x4e3fb3;super(),this[_0x37a704(0xf7)]=_0x131956,this[_0x37a704(0xaf)]=_0x59215c,this[_0x37a704(0xd0)]=_0x58e52d,this[_0x37a704(0x11f)]=_0x7e8a7f,this[_0x37a704(0xf5)](),this[_0x37a704(0xe5)]();}[_0x4e3fb3(0xe5)](){const _0x458a53=_0x4e3fb3;this[_0x458a53(0xdf)](this['_threadCommentModel'][_0x458a53(0xfc)]['pipe'](_0x263ea1[_0x458a53(0xf8)](0x10))[_0x458a53(0x126)](_0x1b0ea5=>{const _0x319732=_0x458a53,_0x20fb67=new Set();_0x1b0ea5['forEach'](_0x52b9a6=>{const _0x2a493f=_0x425f;switch(_0x52b9a6[_0x2a493f(0xcc)]){case _0x2a493f(0x11e):{const _0x11e3c4=_0x52b9a6[_0x2a493f(0xeb)]['personId'];_0x20fb67[_0x2a493f(0x11e)](_0x11e3c4);break;}}}),_0x588165(this[_0x319732(0x11f)],_0x20fb67);}));}[_0x4e3fb3(0xf5)](){const _0x464834=_0x4e3fb3;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0x464834(0x126)](async _0x301413=>{const _0xa13fa7=_0x464834;var _0x5466ca,_0x2ee4cb,_0x137c6a,_0x154aa2;const _0x472cbe=(_0x5466ca=this[_0xa13fa7(0xaf)][_0xa13fa7(0xc7)](_0x301413['unitId'])['find'](_0x2230be=>_0x2230be[_0xa13fa7(0xfe)]===_0x301413[_0xa13fa7(0xfe)]))==null?void 0x0:_0x5466ca[_0xa13fa7(0xad)];if(!_0x472cbe)return;const {unitId:_0x7ed7b1,subUnitId:_0x3bfde2}=_0x472cbe;switch(_0x301413[_0xa13fa7(0xdd)]&&this['_userService'][_0xa13fa7(0xc6)](_0x301413[_0xa13fa7(0xdd)]),_0x301413[_0xa13fa7(0xcc)]){case _0x5472e5[_0xa13fa7(0x12e)]:break;case _0x5472e5[_0xa13fa7(0xc8)]:{this[_0xa13fa7(0xaf)]['addComment'](_0x7ed7b1,_0x3bfde2,{'unitId':_0x7ed7b1,'subUnitId':_0x3bfde2,'ref':'','id':_0x301413[_0xa13fa7(0xd7)],'dT':_0x192db0(+_0x301413[_0xa13fa7(0xe7)]),'threadId':_0x301413['threadId'],'personId':(_0x137c6a=(_0x2ee4cb=_0x301413['user'])==null?void 0x0:_0x2ee4cb[_0xa13fa7(0xe0)])!=null?_0x137c6a:_0x301413[_0xa13fa7(0xcd)],'text':JSON['parse'](_0x301413[_0xa13fa7(0x128)]),'parentId':_0x472cbe['id']});break;}case _0x5472e5[_0xa13fa7(0x106)]:{const _0x570fea=this[_0xa13fa7(0xaf)]['getComment'](_0x7ed7b1,_0x3bfde2,_0x301413['replyId']);_0x570fea&&_0x570fea['parentId']&&this['_threadCommentModel'][_0xa13fa7(0xba)](_0x7ed7b1,_0x3bfde2,_0x301413[_0xa13fa7(0xd7)]);break;}case _0x5472e5[_0xa13fa7(0x107)]:{this['_threadCommentModel'][_0xa13fa7(0xb9)](_0x7ed7b1,_0x3bfde2,{'commentId':_0x301413[_0xa13fa7(0xd7)],'text':JSON[_0xa13fa7(0x124)](_0x301413[_0xa13fa7(0x128)])});break;}case _0x5472e5[_0xa13fa7(0x113)]:{const _0x2a8c26=(_0x154aa2=this[_0xa13fa7(0xaf)]['getUnit'](_0x301413[_0xa13fa7(0xc2)])[_0xa13fa7(0x11b)](_0x474369=>_0x474369[_0xa13fa7(0xfe)]===_0x301413[_0xa13fa7(0xfe)]))==null?void 0x0:_0x154aa2[_0xa13fa7(0xad)];_0x2a8c26&&this['_threadCommentModel'][_0xa13fa7(0x119)](_0x7ed7b1,_0x3bfde2,_0x2a8c26['id'],_0x301413['solved']===_0x5f1f35[_0xa13fa7(0x10d)]);break;}}}));}};_0x5dbcc8=_0x110754([_0x5ebf2c(0x0,_0x47cd9e['Inject'](_0x31a3d9[_0x4e3fb3(0xd8)])),_0x5ebf2c(0x1,_0x47cd9e[_0x4e3fb3(0x12f)](_0x44534f[_0x4e3fb3(0x11a)])),_0x5ebf2c(0x2,_0x47cd9e[_0x4e3fb3(0x12f)](_0x47cd9e[_0x4e3fb3(0xd9)])),_0x5ebf2c(0x3,_0x47cd9e[_0x4e3fb3(0x12f)](_0x47cd9e[_0x4e3fb3(0xb5)]))],_0x5dbcc8);const _0x11a51f=_0x4e3fb3(0xf2),_0x14681b={};var _0x14125d=Object[_0x4e3fb3(0x103)],_0x80ae84=(_0x55b7da,_0xa89e57,_0x1ab396,_0x12c346)=>{const _0x587a4b=_0x4e3fb3;for(var _0x3c902a=_0x12c346>0x1?void 0x0:_0x12c346?_0x14125d(_0xa89e57,_0x1ab396):_0xa89e57,_0x476935=_0x55b7da[_0x587a4b(0xd1)]-0x1,_0x54107c;_0x476935>=0x0;_0x476935--)(_0x54107c=_0x55b7da[_0x476935])&&(_0x3c902a=_0x54107c(_0x3c902a)||_0x3c902a);return _0x3c902a;},_0x1b35d4=(_0x4df329,_0x599a98)=>(_0x1f0129,_0x3a9835)=>_0x599a98(_0x1f0129,_0x3a9835,_0x4df329);function _0x32cfc8(_0x4ce2fa,_0x27a83d){const _0x24d8e6=_0x4e3fb3,_0x79008f=_0x4ce2fa['replies'][0x0];return{..._0x27a83d,'id':_0x79008f[_0x24d8e6(0xd7)],'resolved':_0x4ce2fa[_0x24d8e6(0xda)]===0x1,'dT':_0x192db0(_0x79008f[_0x24d8e6(0xe7)]),'personId':_0x79008f[_0x24d8e6(0xcd)],'threadId':_0x79008f['threadId']};}function _0x339409(_0x1087e8,_0x43ed9e,_0xa21e51){const _0x17c26d=_0x4e3fb3;var _0x369bee,_0xfdb21c;if(((_0xfdb21c=(_0x369bee=_0x1087e8==null?void 0x0:_0x1087e8[_0x17c26d(0x102)])==null?void 0x0:_0x369bee[_0x17c26d(0xd1)])!=null?_0xfdb21c:0x0)>0x0){const _0x871d28=(_0xbfe1ff,_0x16a519)=>({'id':_0xbfe1ff['replyId'],'threadId':_0xbfe1ff['threadId'],'dT':_0x192db0(_0xbfe1ff[_0x17c26d(0xe7)]),'personId':_0xbfe1ff['userId'],'resolved':_0x1087e8[_0x17c26d(0xda)]===_0x5f1f35[_0x17c26d(0x10d)],'unitId':_0x43ed9e,'subUnitId':_0xa21e51,'text':JSON['parse'](_0xbfe1ff['content']),'parentId':_0x16a519}),_0x4e5e27=_0x871d28(_0x1087e8[_0x17c26d(0x102)][0x0]);return{..._0x4e5e27,'children':_0x1087e8[_0x17c26d(0x102)][_0x17c26d(0x133)](0x1)[_0x17c26d(0xea)](_0x846b26=>_0x871d28(_0x846b26,_0x4e5e27['id']))};}return null;}let _0x51ecb8=class{constructor(_0x1a3576,_0x18549,_0x495230){const _0x3e08b2=_0x4e3fb3;this[_0x3e08b2(0xb8)]=_0x1a3576,this[_0x3e08b2(0xd0)]=_0x18549,this[_0x3e08b2(0xfb)]=_0x495230;}async[_0x4e3fb3(0xdc)](_0x18b685){const _0x407fc8=_0x4e3fb3;var _0x60d630,_0xb93cb5;const {parentId:_0x542535,unitId:_0x456bf9,text:_0x167ffb,threadId:_0x3a4bf7}=_0x18b685,_0x118419=(_0xb93cb5=(_0x60d630=_0x167ffb[_0x407fc8(0x121)])==null?void 0x0:_0x60d630[_0x407fc8(0xae)](_0x1195b3=>_0x1195b3[_0x407fc8(0xf6)]===_0x47cd9e['CustomRangeType']['COMMENT'])['map'](_0x19d91f=>_0x19d91f['rangeId']))!=null?_0xb93cb5:[],_0xec673f=JSON[_0x407fc8(0x120)](_0x167ffb),_0x52b3eb=(await this[_0x407fc8(0xfb)]['requireSession'](_0x456bf9))[_0x407fc8(0xe9)]();if(_0x542535){const _0x5ebe2f={'memberId':_0x52b3eb,'unitId':_0x456bf9,'content':_0xec673f,'mention':_0x118419,'threadId':_0x3a4bf7},_0x17b9ff=(await this['_httpService']['post'](_0x407fc8(0xbc)+_0x456bf9+_0x407fc8(0xef),{'body':_0x5ebe2f}))[_0x407fc8(0x114)][_0x407fc8(0xb7)];return{..._0x18b685,'id':_0x17b9ff[_0x407fc8(0xd7)],'dT':_0x47cd9e[_0x407fc8(0xa8)](+_0x17b9ff[_0x407fc8(0xe7)])[_0x407fc8(0xac)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x17b9ff[_0x407fc8(0xcd)]};}else{const _0x548ad5={'memberId':_0x52b3eb,'unitId':_0x456bf9,'content':_0xec673f,'mention':_0x118419},_0x4fe6a1=await this[_0x407fc8(0xb8)][_0x407fc8(0xc5)](_0x407fc8(0xbc)+_0x456bf9+'/add',{'body':_0x548ad5});return _0x32cfc8(_0x4fe6a1['body'][_0x407fc8(0xc1)],_0x18b685);}}async[_0x4e3fb3(0xb9)](_0x2f91ee){const _0x8d467a=_0x4e3fb3;var _0x598b6b,_0x181507;const {text:_0x3ae11a,unitId:_0x114ee9}=_0x2f91ee,_0xb78e36=(_0x181507=(_0x598b6b=_0x3ae11a[_0x8d467a(0x121)])==null?void 0x0:_0x598b6b[_0x8d467a(0xae)](_0x553f68=>_0x553f68[_0x8d467a(0xf6)]===_0x47cd9e[_0x8d467a(0xe4)]['COMMENT'])['map'](_0x504b28=>_0x504b28[_0x8d467a(0x100)]))!=null?_0x181507:[],_0x3ca393=JSON[_0x8d467a(0x120)](_0x3ae11a),_0x3825db=_0x2f91ee[_0x8d467a(0xfe)],_0x19f538=_0x2f91ee['id'],_0x186b33={'memberId':(await this[_0x8d467a(0xfb)][_0x8d467a(0xff)](_0x114ee9))[_0x8d467a(0xe9)](),'unitId':_0x114ee9,'threadId':_0x3825db,'mention':_0xb78e36,'content':_0x3ca393,'replyId':_0x19f538},_0x6b03f5=await this[_0x8d467a(0xb8)][_0x8d467a(0xc5)](_0x8d467a(0xbc)+_0x114ee9+_0x8d467a(0xbe),{'body':_0x186b33});return!_0x6b03f5[_0x8d467a(0x114)][_0x8d467a(0x12c)]||_0x6b03f5['body'][_0x8d467a(0x12c)][_0x8d467a(0xb4)]===0x1;}async[_0x4e3fb3(0x119)](_0x2b4ed2){const _0x3d59ba=_0x4e3fb3,{unitId:_0x3eb34b}=_0x2b4ed2,_0x309e0e=_0x2b4ed2[_0x3d59ba(0xfe)],_0x2177c0={'memberId':this['_userService'][_0x3d59ba(0x10f)]()[_0x3d59ba(0xe0)],'unitId':_0x3eb34b,'threadId':_0x309e0e,'solved':_0x2b4ed2[_0x3d59ba(0x12b)]?_0x5f1f35[_0x3d59ba(0x10d)]:_0x5f1f35[_0x3d59ba(0x109)]},_0x2f5a1c=await this[_0x3d59ba(0xb8)]['post'](_0x3d59ba(0xbc)+_0x3eb34b+_0x3d59ba(0x112),{'body':_0x2177c0});return!_0x2f5a1c['body'][_0x3d59ba(0x12c)]||_0x2f5a1c[_0x3d59ba(0x114)][_0x3d59ba(0x12c)][_0x3d59ba(0xb4)]===0x1;}async[_0x4e3fb3(0xba)](_0x3c5d95,_0x1d6bfe,_0xd521b3,_0x3577ae){const _0x26ed58=_0x4e3fb3,_0x25e09b={'memberId':(await this['_sessionService'][_0x26ed58(0xff)](_0x3c5d95))[_0x26ed58(0xe9)](),'threadId':_0xd521b3,'replyId':_0x3577ae,'unitId':_0x3c5d95},_0x43de61=await this[_0x26ed58(0xb8)][_0x26ed58(0xc5)](_0x26ed58(0xbc)+_0x3c5d95+'/delete',{'body':_0x25e09b});return!_0x43de61['body'][_0x26ed58(0x12c)]||_0x43de61[_0x26ed58(0x114)][_0x26ed58(0x12c)][_0x26ed58(0xb4)]===0x1;}async[_0x4e3fb3(0x127)](_0x1f9271,_0x1d0b71,_0x5ecea5){const _0x387582=_0x4e3fb3,_0x1bf95e={'unitId':_0x1f9271,'threadId':_0x5ecea5},_0x4482b4=await this[_0x387582(0xb8)][_0x387582(0xc5)](_0x387582(0xbc)+_0x1f9271+_0x387582(0xe1),{'body':_0x1bf95e}),_0xc369d5=_0x5ecea5[_0x387582(0xea)](_0x1ad42f=>_0x339409(_0x4482b4[_0x387582(0x114)][_0x387582(0xf9)][_0x1ad42f],_0x1f9271,_0x1d0b71))[_0x387582(0xae)](Boolean);return Object[_0x387582(0x116)](_0x4482b4[_0x387582(0x114)][_0x387582(0xf0)])[_0x387582(0x108)](_0x30c265=>{const _0x57de50=_0x387582;this[_0x57de50(0xd0)][_0x57de50(0xc6)](_0x30c265);}),_0xc369d5;}[_0x4e3fb3(0xe3)](_0x228c02){const _0x221a97=_0x4e3fb3;return{'id':_0x228c02['id'],'threadId':_0x228c02[_0x221a97(0xfe)],'ref':_0x228c02[_0x221a97(0x118)]};}};_0x51ecb8=_0x80ae84([_0x1b35d4(0x0,_0x47cd9e[_0x4e3fb3(0x12f)](_0x399bbd[_0x4e3fb3(0xce)])),_0x1b35d4(0x1,_0x47cd9e['Inject'](_0x47cd9e[_0x4e3fb3(0xd9)])),_0x1b35d4(0x2,_0x47cd9e[_0x4e3fb3(0x12f)](_0x31a3d9[_0x4e3fb3(0xbb)]))],_0x51ecb8);var _0x3de3d0=Object['getOwnPropertyDescriptor'],_0x55c015=(_0x5ed6fd,_0xffb3eb,_0x399577,_0x25b62e)=>{const _0x55df23=_0x4e3fb3;for(var _0xffc9b4=_0x25b62e>0x1?void 0x0:_0x25b62e?_0x3de3d0(_0xffb3eb,_0x399577):_0xffb3eb,_0x2ce5db=_0x5ed6fd[_0x55df23(0xd1)]-0x1,_0x10bc7d;_0x2ce5db>=0x0;_0x2ce5db--)(_0x10bc7d=_0x5ed6fd[_0x2ce5db])&&(_0xffc9b4=_0x10bc7d(_0xffc9b4)||_0xffc9b4);return _0xffc9b4;},_0x1ab65f=(_0x3ee0c3,_0x299098)=>(_0x2f019e,_0x373a0a)=>_0x299098(_0x2f019e,_0x373a0a,_0x3ee0c3);let _0x21af2b=class extends _0x47cd9e[_0x4e3fb3(0x117)]{constructor(_0xb07193,_0x352fc5){const _0x2024c1=_0x4e3fb3;super(),this['_threadCommentDataSourceService']=_0xb07193,this[_0x2024c1(0xde)]=_0x352fc5,this['_initDataSource']();}[_0x4e3fb3(0xfa)](){const _0x21028a=_0x4e3fb3;this[_0x21028a(0x101)][_0x21028a(0xbf)]=this[_0x21028a(0xde)],this[_0x21028a(0x101)][_0x21028a(0x11c)]=!0x1;}};_0x21af2b=_0x55c015([_0x1ab65f(0x0,_0x44534f[_0x4e3fb3(0xb1)]),_0x1ab65f(0x1,_0x47cd9e[_0x4e3fb3(0x12f)](_0x51ecb8))],_0x21af2b);var _0x264ca9=Object[_0x4e3fb3(0xfd)],_0x590e90=Object['getOwnPropertyDescriptor'],_0x5d80ed=(_0x5316bc,_0x3db511,_0x41036)=>_0x3db511 in _0x5316bc?_0x264ca9(_0x5316bc,_0x3db511,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x41036}):_0x5316bc[_0x3db511]=_0x41036,_0x128a2a=(_0x52610e,_0x82f22f,_0x31c61f,_0x2dafe3)=>{const _0x4de7c0=_0x4e3fb3;for(var _0x55e612=_0x2dafe3>0x1?void 0x0:_0x2dafe3?_0x590e90(_0x82f22f,_0x31c61f):_0x82f22f,_0x4d9af4=_0x52610e[_0x4de7c0(0xd1)]-0x1,_0x3d1f19;_0x4d9af4>=0x0;_0x4d9af4--)(_0x3d1f19=_0x52610e[_0x4d9af4])&&(_0x55e612=_0x3d1f19(_0x55e612)||_0x55e612);return _0x55e612;},_0x332cbb=(_0x1b5826,_0x583eb2)=>(_0x76e12,_0x33a74e)=>_0x583eb2(_0x76e12,_0x33a74e,_0x1b5826),_0x30784c=(_0x24f619,_0x5f41c1,_0xcf0ab5)=>_0x5d80ed(_0x24f619,typeof _0x5f41c1!=_0x4e3fb3(0x132)?_0x5f41c1+'':_0x5f41c1,_0xcf0ab5);_0x27d8d1[_0x4e3fb3(0xb6)]=class extends _0x47cd9e['Plugin']{constructor(_0x208262=_0x14681b,_0x3f426b,_0x5aa047){const _0x492943=_0x4e3fb3;super(),this[_0x492943(0xee)]=_0x208262,this[_0x492943(0x11f)]=_0x3f426b,this[_0x492943(0x110)]=_0x5aa047;const {..._0x17f9e7}=_0x47cd9e[_0x492943(0x123)]({},_0x14681b,this[_0x492943(0xee)]);this[_0x492943(0x110)][_0x492943(0xec)](_0x11a51f,_0x17f9e7);}[_0x4e3fb3(0xe8)](){const _0x5eeb6a=_0x4e3fb3;[[_0x51ecb8],[_0x21af2b],[_0x5dbcc8]][_0x5eeb6a(0x108)](_0x3f6ff4=>{const _0x161580=_0x5eeb6a;this['_injector'][_0x161580(0x11e)](_0x3f6ff4);});}[_0x4e3fb3(0x122)](){const _0x557fdd=_0x4e3fb3;this[_0x557fdd(0x11f)][_0x557fdd(0x12d)](_0x21af2b),this['_injector'][_0x557fdd(0x12d)](_0x5dbcc8);}},_0x30784c(_0x27d8d1[_0x4e3fb3(0xb6)],'pluginName',_0x19e2bb),_0x30784c(_0x27d8d1[_0x4e3fb3(0xb6)],_0x4e3fb3(0xcc),_0x47cd9e[_0x4e3fb3(0xe2)]['UNIVER_UNKNOWN']),_0x27d8d1[_0x4e3fb3(0xb6)]=_0x128a2a([_0x47cd9e[_0x4e3fb3(0xaa)](_0x4c82fd[_0x4e3fb3(0xc0)],_0x31a3d9[_0x4e3fb3(0x104)],_0x3c44df[_0x4e3fb3(0x130)]),_0x332cbb(0x1,_0x47cd9e[_0x4e3fb3(0x12f)](_0x47cd9e['Injector'])),_0x332cbb(0x2,_0x47cd9e[_0x4e3fb3(0xd2)])],_0x27d8d1[_0x4e3fb3(0xb6)]),Object[_0x4e3fb3(0xfd)](_0x27d8d1,Symbol[_0x4e3fb3(0x131)],{'value':_0x4e3fb3(0x125)});}));function _0x2ff0(){const _0x54ef9a=['createTimestamp','onStarting','getMemberID','map','payload','setConfig','1609602XIGmDI','_config','/reply','users','getUser','thread-comment-data-source.config','423RVFSML','UniverThreadComment','_init','rangeType','_commentService','bufferTime','comments','_initDataSource','_sessionService','commentUpdate$','defineProperty','threadId','requireSession','rangeId','_threadCommentDataSourceService','replies','getOwnPropertyDescriptor','UniverCollaborationClientPlugin','/universer-api/user/list','Delete','Edit','forEach','OpenOrReOpen','580558ztTWto','UniverCore','24DHOziT','Solved','delete','getCurrentUser','_configService','788005rpXYFB','/solved','Solve','body','1nHDqKs','values','Disposable','ref','resolveComment','ThreadCommentModel','find','syncUpdateMutationToColla','5387718DIqIpF','add','_injector','stringify','customRanges','onReady','merge','parse','Module','subscribe','listComments','content','YYYY/MM/DD\x20HH:mm','@univerjs-pro/license','resolved','error','get','Add','Inject','UniverLicensePlugin','toStringTag','symbol','slice','dayjs','@univerjs/thread-comment','DependentOn','UniverProLicense','format','root','filter','_threadCommentModel','8GPgiuc','IThreadCommentDataSourceService','function','294890uSwues','code','Injector','UniverThreadCommentDataSourcePlugin','reply','_httpService','updateComment','deleteComment','CollaborationSessionService','/universer-api/comment/unit/','12zCNMlj','/edit','dataSource','UniverThreadCommentUIPlugin','comment','unitId','rxjs','Unknown','post','addUser','getUnit','Reply','UniverProThreadCommentDatasource','@univerjs/network','@univerjs/core','type','userId','HTTPService','4159144lWIAfn','_userService','length','IConfigService','object','UniverNetwork','@univerjs-pro/collaboration-client','UNRECOGNIZED','replyId','CommentService','UserManagerService','solved','amd','addComment','user','_threadCommentDataSource','disposeWithMe','userID','/list','UniverInstanceType','saveCommentToSnapshot','CustomRangeType','_initUserSync','3128967YTScgS'];_0x2ff0=function(){return _0x54ef9a;};return _0x2ff0();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.13.0-insiders.20251216-1519cb7",
3
+ "version": "0.13.0-insiders.20251218-2062647",
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.13.0-insiders.20251216-1519cb7",
49
- "@univerjs-pro/collaboration-client": "0.13.0-insiders.20251216-1519cb7",
48
+ "@univerjs-pro/collaboration-client": "0.13.0-insiders.20251218-2062647",
49
+ "@univerjs-pro/license": "0.13.0-insiders.20251218-2062647",
50
+ "@univerjs/core": "0.13.0-insiders.20251218-2062647",
51
+ "@univerjs/network": "0.13.0-insiders.20251218-2062647",
50
52
  "@univerjs/protocol": "0.1.47",
51
- "@univerjs/network": "0.13.0-insiders.20251216-1519cb7",
52
- "@univerjs/core": "0.13.0-insiders.20251216-1519cb7",
53
- "@univerjs/thread-comment-ui": "0.13.0-insiders.20251216-1519cb7",
54
- "@univerjs/thread-comment": "0.13.0-insiders.20251216-1519cb7"
53
+ "@univerjs/thread-comment": "0.13.0-insiders.20251218-2062647",
54
+ "@univerjs/thread-comment-ui": "0.13.0-insiders.20251218-2062647"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",