@univerjs-pro/thread-comment-datasource 0.10.3-experimental.20250812-b4b6f1a → 0.10.3-nightly.202508150623

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 _0x4e17d9=_0x3823;(function(_0xb29057,_0x5387e0){const _0x4adaa9=_0x3823,_0x225e72=_0xb29057();while(!![]){try{const _0x3f7496=parseInt(_0x4adaa9(0x11a))/0x1*(-parseInt(_0x4adaa9(0x12d))/0x2)+-parseInt(_0x4adaa9(0x109))/0x3*(-parseInt(_0x4adaa9(0xee))/0x4)+parseInt(_0x4adaa9(0x13b))/0x5+parseInt(_0x4adaa9(0x136))/0x6+-parseInt(_0x4adaa9(0x10e))/0x7*(-parseInt(_0x4adaa9(0x12f))/0x8)+parseInt(_0x4adaa9(0xf4))/0x9+-parseInt(_0x4adaa9(0x100))/0xa;if(_0x3f7496===_0x5387e0)break;else _0x225e72['push'](_0x225e72['shift']());}catch(_0xd7ce1b){_0x225e72['push'](_0x225e72['shift']());}}}(_0x12be,0x796cd));Object[_0x4e17d9(0x130)](exports,Symbol['toStringTag'],{'value':_0x4e17d9(0x129)});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=_0x4e17d9(0xf1);var I=(_0x145e10=>(_0x145e10[_0x145e10[_0x4e17d9(0xf9)]=0x0]='OpenOrReOpen',_0x145e10[_0x145e10[_0x4e17d9(0x112)]=0x1]=_0x4e17d9(0x112),_0x145e10[_0x145e10[_0x4e17d9(0x108)]=-0x1]='UNRECOGNIZED',_0x145e10))(I||{}),v=(_0xac5613=>(_0xac5613[_0xac5613[_0x4e17d9(0xdd)]=0x0]=_0x4e17d9(0xdd),_0xac5613[_0xac5613['Add']=0x1]='Add',_0xac5613[_0xac5613[_0x4e17d9(0x12a)]=0x2]=_0x4e17d9(0x12a),_0xac5613[_0xac5613[_0x4e17d9(0x133)]=0x3]=_0x4e17d9(0x133),_0xac5613[_0xac5613[_0x4e17d9(0xed)]=0x4]=_0x4e17d9(0xed),_0xac5613[_0xac5613['Solve']=0x5]=_0x4e17d9(0x117),_0xac5613[_0xac5613[_0x4e17d9(0x108)]=-0x1]=_0x4e17d9(0x108),_0xac5613))(v||{});const f=_0x4a397d=>c[_0x4e17d9(0x122)](new Date(+_0x4a397d))['format'](_0x4e17d9(0xdf)),R=async(_0x477e5e,_0x2d7a16)=>{const _0xb1531e=_0x4e17d9,_0x1f9d41=_0x477e5e[_0xb1531e(0x11c)](c[_0xb1531e(0x11b)]),_0x1e0074=_0x477e5e[_0xb1531e(0x11c)](P[_0xb1531e(0x137)]);_0x2d7a16[_0xb1531e(0x141)](_0x45b6ba=>{_0x1f9d41['getUser'](_0x45b6ba)&&_0x2d7a16['delete'](_0x45b6ba);}),_0x2d7a16[_0xb1531e(0x110)]&&(await _0x1e0074['get'](_0xb1531e(0xe9),{'params':{'userIDs':[..._0x2d7a16]}}))[_0xb1531e(0x121)][_0xb1531e(0x126)][_0xb1531e(0x141)](_0x31d795=>{const _0x19ac06=_0xb1531e;_0x31d795&&_0x1f9d41[_0x19ac06(0xfe)](_0x31d795);});};var $=Object[_0x4e17d9(0x10b)],E=(_0xa820e2,_0x48a996,_0x3579fe,_0x1e1f0f)=>{for(var _0x1272f2=_0x1e1f0f>0x1?void 0x0:_0x1e1f0f?$(_0x48a996,_0x3579fe):_0x48a996,_0x3db5a5=_0xa820e2['length']-0x1,_0x54098d;_0x3db5a5>=0x0;_0x3db5a5--)(_0x54098d=_0xa820e2[_0x3db5a5])&&(_0x1272f2=_0x54098d(_0x1272f2)||_0x1272f2);return _0x1272f2;},S=(_0x46e83c,_0x11630a)=>(_0x580307,_0x16a374)=>_0x11630a(_0x580307,_0x16a374,_0x46e83c);let _=class extends c['Disposable']{constructor(_0x69ac87,_0x1ead45,_0x4d0706,_0x5c591a){const _0x171005=_0x4e17d9;super(),this['_commentService']=_0x69ac87,this[_0x171005(0x10f)]=_0x1ead45,this['_userService']=_0x4d0706,this[_0x171005(0x147)]=_0x5c591a,this['_init'](),this[_0x171005(0x13a)]();}[_0x4e17d9(0x13a)](){const _0x4d506f=_0x4e17d9;this['disposeWithMe'](this[_0x4d506f(0x10f)]['commentUpdate$'][_0x4d506f(0xda)](j[_0x4d506f(0x106)](0x10))['subscribe'](_0x3b7b4f=>{const _0x8ac26=_0x4d506f,_0x200455=new Set();_0x3b7b4f[_0x8ac26(0x141)](_0x3efb93=>{const _0x576d0f=_0x8ac26;switch(_0x3efb93['type']){case'add':{const _0x3e51b3=_0x3efb93[_0x576d0f(0x119)][_0x576d0f(0xd1)];_0x200455[_0x576d0f(0xe2)](_0x3e51b3);break;}}}),R(this['_injector'],_0x200455);}));}[_0x4e17d9(0x127)](){const _0x35d0c0=_0x4e17d9;this[_0x35d0c0(0xf3)](this[_0x35d0c0(0x111)][_0x35d0c0(0x132)][_0x35d0c0(0xea)](async _0x342afb=>{const _0x3c4237=_0x35d0c0;var _0x379990,_0x2e0bad,_0x25e331,_0x55adc5;const _0x3d9750=(_0x379990=this[_0x3c4237(0x10f)][_0x3c4237(0xec)](_0x342afb[_0x3c4237(0x138)])[_0x3c4237(0xfb)](_0x34d9b2=>_0x34d9b2[_0x3c4237(0xd9)]===_0x342afb[_0x3c4237(0xd9)]))==null?void 0x0:_0x379990[_0x3c4237(0xff)];if(!_0x3d9750)return;const {unitId:_0x26ec77,subUnitId:_0x1c55fe}=_0x3d9750;switch(_0x342afb[_0x3c4237(0x113)]&&this[_0x3c4237(0xf2)][_0x3c4237(0xfe)](_0x342afb[_0x3c4237(0x113)]),_0x342afb[_0x3c4237(0x145)]){case v[_0x3c4237(0x10d)]:break;case v[_0x3c4237(0x12a)]:{this['_threadCommentModel']['addComment'](_0x26ec77,_0x1c55fe,{'unitId':_0x26ec77,'subUnitId':_0x1c55fe,'ref':'','id':_0x342afb[_0x3c4237(0x13f)],'dT':f(+_0x342afb[_0x3c4237(0xfd)]),'threadId':_0x342afb[_0x3c4237(0xd9)],'personId':(_0x25e331=(_0x2e0bad=_0x342afb['user'])==null?void 0x0:_0x2e0bad['userID'])!=null?_0x25e331:_0x342afb[_0x3c4237(0x120)],'text':JSON[_0x3c4237(0x116)](_0x342afb[_0x3c4237(0xef)]),'parentId':_0x3d9750['id']});break;}case v[_0x3c4237(0xed)]:{const _0x42cef3=this[_0x3c4237(0x10f)][_0x3c4237(0xe7)](_0x26ec77,_0x1c55fe,_0x342afb['replyId']);_0x42cef3&&_0x42cef3['parentId']&&this[_0x3c4237(0x10f)]['deleteComment'](_0x26ec77,_0x1c55fe,_0x342afb[_0x3c4237(0x13f)]);break;}case v[_0x3c4237(0x133)]:{this[_0x3c4237(0x10f)][_0x3c4237(0xe3)](_0x26ec77,_0x1c55fe,{'commentId':_0x342afb[_0x3c4237(0x13f)],'text':JSON['parse'](_0x342afb[_0x3c4237(0xef)])});break;}case v[_0x3c4237(0x117)]:{const _0x24650f=(_0x55adc5=this[_0x3c4237(0x10f)][_0x3c4237(0xec)](_0x342afb[_0x3c4237(0x138)])[_0x3c4237(0xfb)](_0x374a74=>_0x374a74[_0x3c4237(0xd9)]===_0x342afb[_0x3c4237(0xd9)]))==null?void 0x0:_0x55adc5['root'];_0x24650f&&this[_0x3c4237(0x10f)]['resolveComment'](_0x26ec77,_0x1c55fe,_0x24650f['id'],_0x342afb[_0x3c4237(0xce)]===I[_0x3c4237(0x112)]);break;}}}));}};_=E([S(0x0,c[_0x4e17d9(0xd4)](b[_0x4e17d9(0x123)])),S(0x1,c['Inject'](M[_0x4e17d9(0x144)])),S(0x2,c[_0x4e17d9(0xd4)](c[_0x4e17d9(0x11b)])),S(0x3,c[_0x4e17d9(0xd4)](c[_0x4e17d9(0x13e)]))],_);const q=_0x4e17d9(0xd7),D={};function _0x12be(){const _0x37e88a=['personId','_configService','comments','Inject','DependentOn','COMMENT','thread-comment-data-source.config','CustomRangeType','threadId','pipe','_sessionService','pluginName','Unknown','Plugin','YYYY/MM/DD\x20HH:mm','values','getMemberID','add','updateComment','/add','comment','/solved','getComment','dataSource','/universer-api/user/list','subscribe','IThreadCommentDataSourceService','getUnit','Delete','202556rTHpDe','content','listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','disposeWithMe','4658085rtefFO','map','/reply','UniverCollaborationClientPlugin','UniverThreadCommentUIPlugin','OpenOrReOpen','CollaborationSessionService','find','Disposable','createTimestamp','addUser','root','18651000UOUOUW','_threadCommentDataSource','_threadCommentDataSourceService','deleteComment','reply','_initDataSource','bufferTime','post','UNRECOGNIZED','6nkrmUS','UniverLicensePlugin','getOwnPropertyDescriptor','symbol','Add','1505HenaNg','_threadCommentModel','size','_commentService','Solved','user','filter','resolveComment','parse','Solve','/delete','payload','44LbftRN','UserManagerService','get','resolved','IConfigService','customRanges','userId','body','dayjs','CommentService','_httpService','code','users','_init','error','Module','Reply','length','onStarting','22854zLsdaG','requireSession','31880KgLHof','defineProperty','_config','commentUpdate$','Edit','onReady','UniverThreadCommentDataSourcePlugin','5964006OqygSC','HTTPService','unitId','addComment','_initUserSync','1978130lBzAvl','setConfig','stringify','Injector','replyId','/universer-api/comment/unit/','forEach','merge','replies','ThreadCommentModel','type','rangeType','_injector','UNIVER_UNKNOWN','solved','rangeId','userID'];_0x12be=function(){return _0x37e88a;};return _0x12be();}var A=Object[_0x4e17d9(0x10b)],x=(_0x2eb4ac,_0x268727,_0x11aaf8,_0xe65d0c)=>{const _0x28e1b1=_0x4e17d9;for(var _0x53b2f4=_0xe65d0c>0x1?void 0x0:_0xe65d0c?A(_0x268727,_0x11aaf8):_0x268727,_0x4dcb1e=_0x2eb4ac[_0x28e1b1(0x12b)]-0x1,_0x137b0c;_0x4dcb1e>=0x0;_0x4dcb1e--)(_0x137b0c=_0x2eb4ac[_0x4dcb1e])&&(_0x53b2f4=_0x137b0c(_0x53b2f4)||_0x53b2f4);return _0x53b2f4;},C=(_0x54e97a,_0x290d5e)=>(_0x28bed3,_0x248d72)=>_0x290d5e(_0x28bed3,_0x248d72,_0x54e97a);function Y(_0x3ada4e,_0x11d4ee){const _0x44b437=_0x4e17d9,_0x354407=_0x3ada4e[_0x44b437(0x143)][0x0];return{..._0x11d4ee,'id':_0x354407[_0x44b437(0x13f)],'resolved':_0x3ada4e[_0x44b437(0xce)]===0x1,'dT':f(_0x354407[_0x44b437(0xfd)]),'personId':_0x354407[_0x44b437(0x120)],'threadId':_0x354407[_0x44b437(0xd9)]};}function G(_0x4fbd4e,_0x183c75,_0x8309ce){const _0x18d4f0=_0x4e17d9;var _0x41606e,_0x3dc0b1;if(((_0x3dc0b1=(_0x41606e=_0x4fbd4e==null?void 0x0:_0x4fbd4e[_0x18d4f0(0x143)])==null?void 0x0:_0x41606e[_0x18d4f0(0x12b)])!=null?_0x3dc0b1:0x0)>0x0){const _0x4939f1=(_0x47dcef,_0x259023)=>({'id':_0x47dcef[_0x18d4f0(0x13f)],'threadId':_0x47dcef[_0x18d4f0(0xd9)],'dT':f(_0x47dcef[_0x18d4f0(0xfd)]),'personId':_0x47dcef['userId'],'resolved':_0x4fbd4e[_0x18d4f0(0xce)]===I['Solved'],'unitId':_0x183c75,'subUnitId':_0x8309ce,'text':JSON[_0x18d4f0(0x116)](_0x47dcef['content']),'parentId':_0x259023}),_0xb36bbc=_0x4939f1(_0x4fbd4e[_0x18d4f0(0x143)][0x0]);return{..._0xb36bbc,'children':_0x4fbd4e[_0x18d4f0(0x143)]['slice'](0x1)[_0x18d4f0(0xf5)](_0x2abdac=>_0x4939f1(_0x2abdac,_0xb36bbc['id']))};}return null;}let p=class{constructor(_0x49ccc4,_0x376817,_0x3f9ff2){const _0x214a91=_0x4e17d9;this[_0x214a91(0x124)]=_0x49ccc4,this[_0x214a91(0xf2)]=_0x376817,this[_0x214a91(0xdb)]=_0x3f9ff2;}async[_0x4e17d9(0x139)](_0x4f8dc5){const _0x1327b0=_0x4e17d9;var _0x5c51cb,_0x9d0b24;const {parentId:_0x94b0e7,unitId:_0x5b2992,text:_0x52e12f,threadId:_0x2cdbdb}=_0x4f8dc5,_0x8c1907=(_0x9d0b24=(_0x5c51cb=_0x52e12f[_0x1327b0(0x11f)])==null?void 0x0:_0x5c51cb['filter'](_0x281cfe=>_0x281cfe['rangeType']===c[_0x1327b0(0xd8)][_0x1327b0(0xd6)])['map'](_0x7168e8=>_0x7168e8[_0x1327b0(0xcf)]))!=null?_0x9d0b24:[],_0x167be7=JSON['stringify'](_0x52e12f),_0x49b65a=(await this['_sessionService']['requireSession'](_0x5b2992))[_0x1327b0(0xe1)]();if(_0x94b0e7){const _0x298611={'memberId':_0x49b65a,'unitId':_0x5b2992,'content':_0x167be7,'mention':_0x8c1907,'threadId':_0x2cdbdb},_0x50f763=(await this[_0x1327b0(0x124)][_0x1327b0(0x107)](_0x1327b0(0x140)+_0x5b2992+_0x1327b0(0xf6),{'body':_0x298611}))[_0x1327b0(0x121)][_0x1327b0(0x104)];return{..._0x4f8dc5,'id':_0x50f763['replyId'],'dT':c['dayjs'](+_0x50f763['createTimestamp'])['format'](_0x1327b0(0xdf)),'personId':_0x50f763[_0x1327b0(0x120)]};}else{const _0x2a7a85={'memberId':_0x49b65a,'unitId':_0x5b2992,'content':_0x167be7,'mention':_0x8c1907},_0x173bbc=await this[_0x1327b0(0x124)][_0x1327b0(0x107)](_0x1327b0(0x140)+_0x5b2992+_0x1327b0(0xe4),{'body':_0x2a7a85});return Y(_0x173bbc[_0x1327b0(0x121)][_0x1327b0(0xe5)],_0x4f8dc5);}}async[_0x4e17d9(0xe3)](_0x25ba3a){const _0x55de65=_0x4e17d9;var _0x275f2a,_0x4e51fb;const {text:_0x256c93,unitId:_0x2f2b17}=_0x25ba3a,_0xdee93d=(_0x4e51fb=(_0x275f2a=_0x256c93['customRanges'])==null?void 0x0:_0x275f2a[_0x55de65(0x114)](_0x57eecc=>_0x57eecc[_0x55de65(0x146)]===c['CustomRangeType'][_0x55de65(0xd6)])[_0x55de65(0xf5)](_0x4c0316=>_0x4c0316[_0x55de65(0xcf)]))!=null?_0x4e51fb:[],_0x9059e6=JSON[_0x55de65(0x13d)](_0x256c93),_0x103d64=_0x25ba3a[_0x55de65(0xd9)],_0x4b47ca=_0x25ba3a['id'],_0x3d660e={'memberId':(await this[_0x55de65(0xdb)][_0x55de65(0x12e)](_0x2f2b17))[_0x55de65(0xe1)](),'unitId':_0x2f2b17,'threadId':_0x103d64,'mention':_0xdee93d,'content':_0x9059e6,'replyId':_0x4b47ca},_0x4f295e=await this[_0x55de65(0x124)]['post'](_0x55de65(0x140)+_0x2f2b17+'/edit',{'body':_0x3d660e});return!_0x4f295e[_0x55de65(0x121)][_0x55de65(0x128)]||_0x4f295e['body'][_0x55de65(0x128)]['code']===0x1;}async[_0x4e17d9(0x115)](_0xf153cb){const _0xfe0cc7=_0x4e17d9,{unitId:_0x3eeef0}=_0xf153cb,_0x49263f=_0xf153cb[_0xfe0cc7(0xd9)],_0x53f00e={'memberId':this[_0xfe0cc7(0xf2)]['getCurrentUser']()[_0xfe0cc7(0xd0)],'unitId':_0x3eeef0,'threadId':_0x49263f,'solved':_0xf153cb[_0xfe0cc7(0x11d)]?I[_0xfe0cc7(0x112)]:I[_0xfe0cc7(0xf9)]},_0x31ba52=await this[_0xfe0cc7(0x124)][_0xfe0cc7(0x107)](_0xfe0cc7(0x140)+_0x3eeef0+_0xfe0cc7(0xe6),{'body':_0x53f00e});return!_0x31ba52[_0xfe0cc7(0x121)]['error']||_0x31ba52[_0xfe0cc7(0x121)][_0xfe0cc7(0x128)][_0xfe0cc7(0x125)]===0x1;}async[_0x4e17d9(0x103)](_0x11dc11,_0x11a1d4,_0x3f98b5,_0x550438){const _0x92860d=_0x4e17d9,_0x52f063={'memberId':(await this[_0x92860d(0xdb)][_0x92860d(0x12e)](_0x11dc11))[_0x92860d(0xe1)](),'threadId':_0x3f98b5,'replyId':_0x550438,'unitId':_0x11dc11},_0x47fb00=await this['_httpService'][_0x92860d(0x107)](_0x92860d(0x140)+_0x11dc11+_0x92860d(0x118),{'body':_0x52f063});return!_0x47fb00[_0x92860d(0x121)][_0x92860d(0x128)]||_0x47fb00['body'][_0x92860d(0x128)]['code']===0x1;}async[_0x4e17d9(0xf0)](_0x50f3b0,_0x249f60,_0x5b9591){const _0x5304b5=_0x4e17d9,_0x7e808c={'unitId':_0x50f3b0,'threadId':_0x5b9591},_0x559bef=await this[_0x5304b5(0x124)][_0x5304b5(0x107)](_0x5304b5(0x140)+_0x50f3b0+'/list',{'body':_0x7e808c}),_0x4adb69=_0x5b9591[_0x5304b5(0xf5)](_0x3de047=>G(_0x559bef[_0x5304b5(0x121)][_0x5304b5(0xd3)][_0x3de047],_0x50f3b0,_0x249f60))['filter'](Boolean);return Object[_0x5304b5(0xe0)](_0x559bef[_0x5304b5(0x121)][_0x5304b5(0x126)])[_0x5304b5(0x141)](_0x544ec3=>{const _0x48ffcc=_0x5304b5;this[_0x48ffcc(0xf2)][_0x48ffcc(0xfe)](_0x544ec3);}),_0x4adb69;}['saveCommentToSnapshot'](_0x4ea878){return{'id':_0x4ea878['id'],'threadId':_0x4ea878['threadId'],'ref':_0x4ea878['ref']};}};p=x([C(0x0,c[_0x4e17d9(0xd4)](P[_0x4e17d9(0x137)])),C(0x1,c[_0x4e17d9(0xd4)](c[_0x4e17d9(0x11b)])),C(0x2,c[_0x4e17d9(0xd4)](b[_0x4e17d9(0xfa)]))],p);var H=Object[_0x4e17d9(0x10b)],J=(_0x1c8b9c,_0x442ace,_0xa3f0f6,_0x4114a9)=>{const _0x35c6a4=_0x4e17d9;for(var _0x5cf295=_0x4114a9>0x1?void 0x0:_0x4114a9?H(_0x442ace,_0xa3f0f6):_0x442ace,_0x5c4051=_0x1c8b9c[_0x35c6a4(0x12b)]-0x1,_0x16ff27;_0x5c4051>=0x0;_0x5c4051--)(_0x16ff27=_0x1c8b9c[_0x5c4051])&&(_0x5cf295=_0x16ff27(_0x5cf295)||_0x5cf295);return _0x5cf295;},y=(_0x2e8f6e,_0x3af385)=>(_0x248e36,_0x104cbf)=>_0x3af385(_0x248e36,_0x104cbf,_0x2e8f6e);let g=class extends c[_0x4e17d9(0xfc)]{constructor(_0x59abb2,_0x333b9a){const _0x625d6f=_0x4e17d9;super(),this[_0x625d6f(0x102)]=_0x59abb2,this[_0x625d6f(0x101)]=_0x333b9a,this[_0x625d6f(0x105)]();}['_initDataSource'](){const _0x2927fb=_0x4e17d9;this[_0x2927fb(0x102)][_0x2927fb(0xe8)]=this['_threadCommentDataSource'],this[_0x2927fb(0x102)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4e17d9(0xeb)]),y(0x1,c[_0x4e17d9(0xd4)](p))],g);function _0x3823(_0x32c266,_0x26fd90){const _0x12be48=_0x12be();return _0x3823=function(_0x382373,_0x54a3ba){_0x382373=_0x382373-0xce;let _0x2c7e67=_0x12be48[_0x382373];return _0x2c7e67;},_0x3823(_0x32c266,_0x26fd90);}var F=Object[_0x4e17d9(0x130)],L=Object[_0x4e17d9(0x10b)],Z=(_0xe92ea8,_0x2cbfba,_0x4c975e)=>_0x2cbfba in _0xe92ea8?F(_0xe92ea8,_0x2cbfba,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c975e}):_0xe92ea8[_0x2cbfba]=_0x4c975e,W=(_0xd1f9b1,_0x231c7a,_0x43656a,_0xbf70aa)=>{const _0x4b7489=_0x4e17d9;for(var _0x117c37=_0xbf70aa>0x1?void 0x0:_0xbf70aa?L(_0x231c7a,_0x43656a):_0x231c7a,_0x18a78d=_0xd1f9b1[_0x4b7489(0x12b)]-0x1,_0x78b8fe;_0x18a78d>=0x0;_0x18a78d--)(_0x78b8fe=_0xd1f9b1[_0x18a78d])&&(_0x117c37=_0x78b8fe(_0x117c37)||_0x117c37);return _0x117c37;},O=(_0x5d10b7,_0x20047c)=>(_0x2eb921,_0x48bb4d)=>_0x20047c(_0x2eb921,_0x48bb4d,_0x5d10b7),N=(_0x51112e,_0x454e1c,_0x3cfccb)=>Z(_0x51112e,typeof _0x454e1c!=_0x4e17d9(0x10c)?_0x454e1c+'':_0x454e1c,_0x3cfccb);exports[_0x4e17d9(0x135)]=class extends c[_0x4e17d9(0xde)]{constructor(_0x2c1584=D,_0x3ee91d,_0x117bbe){const _0xc15ccb=_0x4e17d9;super(),this[_0xc15ccb(0x131)]=_0x2c1584,this['_injector']=_0x3ee91d,this[_0xc15ccb(0xd2)]=_0x117bbe;const {..._0x5ea0da}=c[_0xc15ccb(0x142)]({},D,this[_0xc15ccb(0x131)]);this[_0xc15ccb(0xd2)][_0xc15ccb(0x13c)](q,_0x5ea0da);}[_0x4e17d9(0x12c)](){[[p],[g],[_]]['forEach'](_0x1897f5=>{const _0x492956=_0x3823;this[_0x492956(0x147)]['add'](_0x1897f5);});}[_0x4e17d9(0x134)](){const _0x4e9bcb=_0x4e17d9;this['_injector'][_0x4e9bcb(0x11c)](g),this['_injector'][_0x4e9bcb(0x11c)](_);}},N(exports[_0x4e17d9(0x135)],_0x4e17d9(0xdc),U),N(exports[_0x4e17d9(0x135)],_0x4e17d9(0x145),c['UniverInstanceType'][_0x4e17d9(0x148)]),exports[_0x4e17d9(0x135)]=W([c[_0x4e17d9(0xd5)](w[_0x4e17d9(0xf8)],b[_0x4e17d9(0xf7)],T[_0x4e17d9(0x10a)]),O(0x1,c[_0x4e17d9(0xd4)](c['Injector'])),O(0x2,c[_0x4e17d9(0x11e)])],exports[_0x4e17d9(0x135)]);
1
+ 'use strict';const _0x35a5ab=_0x7193;(function(_0x577646,_0x333f60){const _0x591d94=_0x7193,_0x59d24b=_0x577646();while(!![]){try{const _0x3b92b0=parseInt(_0x591d94(0xdc))/0x1*(parseInt(_0x591d94(0xd6))/0x2)+-parseInt(_0x591d94(0xa5))/0x3*(-parseInt(_0x591d94(0xf8))/0x4)+parseInt(_0x591d94(0xfd))/0x5+parseInt(_0x591d94(0xd2))/0x6+-parseInt(_0x591d94(0xe0))/0x7+parseInt(_0x591d94(0xb6))/0x8+parseInt(_0x591d94(0xa6))/0x9*(-parseInt(_0x591d94(0xd0))/0xa);if(_0x3b92b0===_0x333f60)break;else _0x59d24b['push'](_0x59d24b['shift']());}catch(_0x1807c0){_0x59d24b['push'](_0x59d24b['shift']());}}}(_0x33a0,0x86788));Object[_0x35a5ab(0x102)](exports,Symbol[_0x35a5ab(0xbc)],{'value':_0x35a5ab(0xd9)});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=_0x35a5ab(0xfa);var I=(_0x5e53f6=>(_0x5e53f6[_0x5e53f6[_0x35a5ab(0x101)]=0x0]=_0x35a5ab(0x101),_0x5e53f6[_0x5e53f6[_0x35a5ab(0x10a)]=0x1]='Solved',_0x5e53f6[_0x5e53f6[_0x35a5ab(0xf2)]=-0x1]=_0x35a5ab(0xf2),_0x5e53f6))(I||{}),v=(_0x45d326=>(_0x45d326[_0x45d326['Unknown']=0x0]=_0x35a5ab(0x107),_0x45d326[_0x45d326[_0x35a5ab(0xee)]=0x1]=_0x35a5ab(0xee),_0x45d326[_0x45d326[_0x35a5ab(0xc5)]=0x2]=_0x35a5ab(0xc5),_0x45d326[_0x45d326[_0x35a5ab(0x103)]=0x3]=_0x35a5ab(0x103),_0x45d326[_0x45d326[_0x35a5ab(0xda)]=0x4]=_0x35a5ab(0xda),_0x45d326[_0x45d326['Solve']=0x5]='Solve',_0x45d326[_0x45d326['UNRECOGNIZED']=-0x1]=_0x35a5ab(0xf2),_0x45d326))(v||{});const f=_0x4b37dd=>c[_0x35a5ab(0xc7)](new Date(+_0x4b37dd))[_0x35a5ab(0xd7)](_0x35a5ab(0x117)),R=async(_0x124d1e,_0x161c23)=>{const _0xb85fbc=_0x35a5ab,_0x3782d4=_0x124d1e[_0xb85fbc(0x112)](c[_0xb85fbc(0xa4)]),_0x3c3b6a=_0x124d1e[_0xb85fbc(0x112)](P['HTTPService']);_0x161c23[_0xb85fbc(0x100)](_0x4b3aff=>{const _0x4b3f38=_0xb85fbc;_0x3782d4[_0x4b3f38(0xbf)](_0x4b3aff)&&_0x161c23[_0x4b3f38(0x10d)](_0x4b3aff);}),_0x161c23[_0xb85fbc(0x10b)]&&(await _0x3c3b6a[_0xb85fbc(0x112)]('/universer-api/user/list',{'params':{'userIDs':[..._0x161c23]}}))[_0xb85fbc(0xcd)][_0xb85fbc(0x106)][_0xb85fbc(0x100)](_0x391b19=>{const _0x2aca40=_0xb85fbc;_0x391b19&&_0x3782d4[_0x2aca40(0xae)](_0x391b19);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x43576b,_0x209190,_0x3fe690,_0x49c5eb)=>{const _0x350c11=_0x35a5ab;for(var _0x1b2535=_0x49c5eb>0x1?void 0x0:_0x49c5eb?$(_0x209190,_0x3fe690):_0x209190,_0x36d554=_0x43576b[_0x350c11(0x110)]-0x1,_0x3ad588;_0x36d554>=0x0;_0x36d554--)(_0x3ad588=_0x43576b[_0x36d554])&&(_0x1b2535=_0x3ad588(_0x1b2535)||_0x1b2535);return _0x1b2535;},S=(_0x387ccc,_0x1ea3ad)=>(_0xe28f64,_0x35edb5)=>_0x1ea3ad(_0xe28f64,_0x35edb5,_0x387ccc);let _=class extends c[_0x35a5ab(0x119)]{constructor(_0x468c4f,_0x57c177,_0x2771b2,_0x1e23af){const _0x50e38e=_0x35a5ab;super(),this['_commentService']=_0x468c4f,this[_0x50e38e(0xa3)]=_0x57c177,this[_0x50e38e(0xb0)]=_0x2771b2,this[_0x50e38e(0xb8)]=_0x1e23af,this[_0x50e38e(0xc8)](),this[_0x50e38e(0xaa)]();}[_0x35a5ab(0xaa)](){const _0x3dab22=_0x35a5ab;this[_0x3dab22(0xe9)](this[_0x3dab22(0xa3)]['commentUpdate$'][_0x3dab22(0xbb)](j[_0x3dab22(0xf6)](0x10))['subscribe'](_0x591f42=>{const _0x509edd=_0x3dab22,_0x112502=new Set();_0x591f42[_0x509edd(0x100)](_0x42089c=>{const _0x553d4d=_0x509edd;switch(_0x42089c[_0x553d4d(0xf0)]){case _0x553d4d(0xaf):{const _0x5c08e3=_0x42089c[_0x553d4d(0xf3)]['personId'];_0x112502['add'](_0x5c08e3);break;}}}),R(this[_0x509edd(0xb8)],_0x112502);}));}[_0x35a5ab(0xc8)](){const _0x244c17=_0x35a5ab;this['disposeWithMe'](this[_0x244c17(0x118)][_0x244c17(0x10f)][_0x244c17(0xb7)](async _0x271c8c=>{const _0x45843c=_0x244c17;var _0x74a57e,_0x242e39,_0x14e9ab,_0x20fde0;const _0x2976fb=(_0x74a57e=this[_0x45843c(0xa3)][_0x45843c(0xc9)](_0x271c8c[_0x45843c(0x109)])[_0x45843c(0x114)](_0x3492d7=>_0x3492d7[_0x45843c(0xcf)]===_0x271c8c['threadId']))==null?void 0x0:_0x74a57e[_0x45843c(0xf5)];if(!_0x2976fb)return;const {unitId:_0x1461e8,subUnitId:_0x8af43f}=_0x2976fb;switch(_0x271c8c[_0x45843c(0xfb)]&&this[_0x45843c(0xb0)]['addUser'](_0x271c8c[_0x45843c(0xfb)]),_0x271c8c[_0x45843c(0xf0)]){case v[_0x45843c(0xee)]:break;case v[_0x45843c(0xc5)]:{this[_0x45843c(0xa3)][_0x45843c(0xe3)](_0x1461e8,_0x8af43f,{'unitId':_0x1461e8,'subUnitId':_0x8af43f,'ref':'','id':_0x271c8c[_0x45843c(0xf7)],'dT':f(+_0x271c8c[_0x45843c(0xed)]),'threadId':_0x271c8c['threadId'],'personId':(_0x14e9ab=(_0x242e39=_0x271c8c['user'])==null?void 0x0:_0x242e39['userID'])!=null?_0x14e9ab:_0x271c8c[_0x45843c(0xc4)],'text':JSON[_0x45843c(0xff)](_0x271c8c['content']),'parentId':_0x2976fb['id']});break;}case v[_0x45843c(0xda)]:{const _0xa3156e=this['_threadCommentModel'][_0x45843c(0x10c)](_0x1461e8,_0x8af43f,_0x271c8c[_0x45843c(0xf7)]);_0xa3156e&&_0xa3156e[_0x45843c(0xd3)]&&this[_0x45843c(0xa3)][_0x45843c(0x108)](_0x1461e8,_0x8af43f,_0x271c8c['replyId']);break;}case v[_0x45843c(0x103)]:{this['_threadCommentModel']['updateComment'](_0x1461e8,_0x8af43f,{'commentId':_0x271c8c[_0x45843c(0xf7)],'text':JSON[_0x45843c(0xff)](_0x271c8c[_0x45843c(0x104)])});break;}case v['Solve']:{const _0x1732e1=(_0x20fde0=this[_0x45843c(0xa3)][_0x45843c(0xc9)](_0x271c8c[_0x45843c(0x109)])['find'](_0x2b83e8=>_0x2b83e8[_0x45843c(0xcf)]===_0x271c8c[_0x45843c(0xcf)]))==null?void 0x0:_0x20fde0['root'];_0x1732e1&&this[_0x45843c(0xa3)][_0x45843c(0xd8)](_0x1461e8,_0x8af43f,_0x1732e1['id'],_0x271c8c[_0x45843c(0xfc)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x35a5ab(0xd1)](b[_0x35a5ab(0xad)])),S(0x1,c[_0x35a5ab(0xd1)](M[_0x35a5ab(0xde)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x35a5ab(0xbe)]))],_);const q=_0x35a5ab(0xb2),D={};var A=Object[_0x35a5ab(0xb3)],x=(_0xc77cb2,_0x2a9c77,_0x594138,_0x3fe1f0)=>{const _0x402de4=_0x35a5ab;for(var _0x4479a0=_0x3fe1f0>0x1?void 0x0:_0x3fe1f0?A(_0x2a9c77,_0x594138):_0x2a9c77,_0x26b670=_0xc77cb2[_0x402de4(0x110)]-0x1,_0x5bbb83;_0x26b670>=0x0;_0x26b670--)(_0x5bbb83=_0xc77cb2[_0x26b670])&&(_0x4479a0=_0x5bbb83(_0x4479a0)||_0x4479a0);return _0x4479a0;},C=(_0x195134,_0x420826)=>(_0x5d1143,_0x26bffd)=>_0x420826(_0x5d1143,_0x26bffd,_0x195134);function _0x33a0(){const _0x122e8e=['commentUpdate$','length','merge','get','UniverCollaborationClientPlugin','find','UNIVER_UNKNOWN','requireSession','YYYY/MM/DD\x20HH:mm','_commentService','Disposable','DependentOn','_threadCommentDataSource','_threadCommentModel','UserManagerService','531EwCzXH','353367YVSRAA','userID','symbol','_sessionService','_initUserSync','getCurrentUser','code','CommentService','addUser','add','_userService','_configService','thread-comment-data-source.config','getOwnPropertyDescriptor','map','stringify','3885352qOwwrV','subscribe','_injector','reply','onStarting','pipe','toStringTag','_threadCommentDataSourceService','Injector','getUser','slice','resolved','values','COMMENT','userId','Reply','replies','dayjs','_init','getUnit','syncUpdateMutationToColla','post','IConfigService','body','CustomRangeType','threadId','120tMPMzD','Inject','1778646yItcMr','parentId','rangeId','HTTPService','33290SZPyDj','format','resolveComment','Module','Delete','error','6RSUOBH','comment','ThreadCommentModel','CollaborationSessionService','5824028YpPhwa','pluginName','/solved','addComment','filter','_httpService','UniverThreadCommentDataSourcePlugin','_initDataSource','UniverThreadCommentUIPlugin','disposeWithMe','IThreadCommentDataSourceService','rangeType','saveCommentToSnapshot','createTimestamp','Add','/add','type','dataSource','UNRECOGNIZED','payload','/edit','root','bufferTime','replyId','2872ecJKdx','/universer-api/comment/unit/','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','user','solved','4224430VtSLYx','/reply','parse','forEach','OpenOrReOpen','defineProperty','Edit','content','listComments','users','Unknown','deleteComment','unitId','Solved','size','getComment','delete','setConfig'];_0x33a0=function(){return _0x122e8e;};return _0x33a0();}function Y(_0x255075,_0x445970){const _0x2d5265=_0x35a5ab,_0xe9ff8=_0x255075[_0x2d5265(0xc6)][0x0];return{..._0x445970,'id':_0xe9ff8['replyId'],'resolved':_0x255075[_0x2d5265(0xfc)]===0x1,'dT':f(_0xe9ff8[_0x2d5265(0xed)]),'personId':_0xe9ff8[_0x2d5265(0xc4)],'threadId':_0xe9ff8[_0x2d5265(0xcf)]};}function G(_0x3711bc,_0x87f31c,_0x4e87e6){const _0x44634a=_0x35a5ab;var _0x22ab5c,_0x95e655;if(((_0x95e655=(_0x22ab5c=_0x3711bc==null?void 0x0:_0x3711bc[_0x44634a(0xc6)])==null?void 0x0:_0x22ab5c[_0x44634a(0x110)])!=null?_0x95e655:0x0)>0x0){const _0x48e6aa=(_0x495104,_0x367140)=>({'id':_0x495104[_0x44634a(0xf7)],'threadId':_0x495104['threadId'],'dT':f(_0x495104[_0x44634a(0xed)]),'personId':_0x495104['userId'],'resolved':_0x3711bc[_0x44634a(0xfc)]===I[_0x44634a(0x10a)],'unitId':_0x87f31c,'subUnitId':_0x4e87e6,'text':JSON[_0x44634a(0xff)](_0x495104['content']),'parentId':_0x367140}),_0x259d66=_0x48e6aa(_0x3711bc[_0x44634a(0xc6)][0x0]);return{..._0x259d66,'children':_0x3711bc['replies'][_0x44634a(0xc0)](0x1)['map'](_0xd7edc9=>_0x48e6aa(_0xd7edc9,_0x259d66['id']))};}return null;}let p=class{constructor(_0x21e3d5,_0xd8de2c,_0x3032c7){const _0x37717d=_0x35a5ab;this[_0x37717d(0xe5)]=_0x21e3d5,this[_0x37717d(0xb0)]=_0xd8de2c,this[_0x37717d(0xa9)]=_0x3032c7;}async['addComment'](_0x5877c5){const _0x1cd50e=_0x35a5ab;var _0x30a0c,_0x5e858a;const {parentId:_0x2bda05,unitId:_0x159b35,text:_0x4122fc,threadId:_0x346d17}=_0x5877c5,_0x95a6e1=(_0x5e858a=(_0x30a0c=_0x4122fc['customRanges'])==null?void 0x0:_0x30a0c[_0x1cd50e(0xe4)](_0x1eb91d=>_0x1eb91d[_0x1cd50e(0xeb)]===c['CustomRangeType'][_0x1cd50e(0xc3)])[_0x1cd50e(0xb4)](_0x1b5915=>_0x1b5915[_0x1cd50e(0xd4)]))!=null?_0x5e858a:[],_0x2240ae=JSON['stringify'](_0x4122fc),_0x3e1971=(await this[_0x1cd50e(0xa9)][_0x1cd50e(0x116)](_0x159b35))['getMemberID']();if(_0x2bda05){const _0x481e06={'memberId':_0x3e1971,'unitId':_0x159b35,'content':_0x2240ae,'mention':_0x95a6e1,'threadId':_0x346d17},_0xc39e14=(await this[_0x1cd50e(0xe5)][_0x1cd50e(0xcb)](_0x1cd50e(0xf9)+_0x159b35+_0x1cd50e(0xfe),{'body':_0x481e06}))[_0x1cd50e(0xcd)][_0x1cd50e(0xb9)];return{..._0x5877c5,'id':_0xc39e14[_0x1cd50e(0xf7)],'dT':c['dayjs'](+_0xc39e14[_0x1cd50e(0xed)])[_0x1cd50e(0xd7)](_0x1cd50e(0x117)),'personId':_0xc39e14[_0x1cd50e(0xc4)]};}else{const _0x165d3a={'memberId':_0x3e1971,'unitId':_0x159b35,'content':_0x2240ae,'mention':_0x95a6e1},_0x3810ee=await this[_0x1cd50e(0xe5)][_0x1cd50e(0xcb)](_0x1cd50e(0xf9)+_0x159b35+_0x1cd50e(0xef),{'body':_0x165d3a});return Y(_0x3810ee[_0x1cd50e(0xcd)][_0x1cd50e(0xdd)],_0x5877c5);}}async['updateComment'](_0x221d6b){const _0x209a1a=_0x35a5ab;var _0x3cc631,_0x3db8e0;const {text:_0x3be8a6,unitId:_0x5a8f50}=_0x221d6b,_0x5cc058=(_0x3db8e0=(_0x3cc631=_0x3be8a6['customRanges'])==null?void 0x0:_0x3cc631[_0x209a1a(0xe4)](_0x780ae4=>_0x780ae4[_0x209a1a(0xeb)]===c[_0x209a1a(0xce)][_0x209a1a(0xc3)])[_0x209a1a(0xb4)](_0x72502f=>_0x72502f['rangeId']))!=null?_0x3db8e0:[],_0x2818d0=JSON[_0x209a1a(0xb5)](_0x3be8a6),_0x58a3db=_0x221d6b[_0x209a1a(0xcf)],_0x168ab8=_0x221d6b['id'],_0x204976={'memberId':(await this[_0x209a1a(0xa9)][_0x209a1a(0x116)](_0x5a8f50))['getMemberID'](),'unitId':_0x5a8f50,'threadId':_0x58a3db,'mention':_0x5cc058,'content':_0x2818d0,'replyId':_0x168ab8},_0x27278e=await this[_0x209a1a(0xe5)][_0x209a1a(0xcb)](_0x209a1a(0xf9)+_0x5a8f50+_0x209a1a(0xf4),{'body':_0x204976});return!_0x27278e[_0x209a1a(0xcd)][_0x209a1a(0xdb)]||_0x27278e['body'][_0x209a1a(0xdb)][_0x209a1a(0xac)]===0x1;}async[_0x35a5ab(0xd8)](_0x3cd459){const _0x143fae=_0x35a5ab,{unitId:_0x3a830a}=_0x3cd459,_0x375696=_0x3cd459['threadId'],_0x2bde59={'memberId':this[_0x143fae(0xb0)][_0x143fae(0xab)]()[_0x143fae(0xa7)],'unitId':_0x3a830a,'threadId':_0x375696,'solved':_0x3cd459[_0x143fae(0xc1)]?I[_0x143fae(0x10a)]:I['OpenOrReOpen']},_0x37ebce=await this['_httpService'][_0x143fae(0xcb)](_0x143fae(0xf9)+_0x3a830a+_0x143fae(0xe2),{'body':_0x2bde59});return!_0x37ebce[_0x143fae(0xcd)]['error']||_0x37ebce[_0x143fae(0xcd)][_0x143fae(0xdb)]['code']===0x1;}async['deleteComment'](_0x48c307,_0x3cc5d5,_0x32d8f2,_0x5d6b5e){const _0x220eb0=_0x35a5ab,_0x2b7aff={'memberId':(await this[_0x220eb0(0xa9)][_0x220eb0(0x116)](_0x48c307))['getMemberID'](),'threadId':_0x32d8f2,'replyId':_0x5d6b5e,'unitId':_0x48c307},_0xf7d648=await this[_0x220eb0(0xe5)][_0x220eb0(0xcb)](_0x220eb0(0xf9)+_0x48c307+'/delete',{'body':_0x2b7aff});return!_0xf7d648[_0x220eb0(0xcd)][_0x220eb0(0xdb)]||_0xf7d648[_0x220eb0(0xcd)]['error']['code']===0x1;}async[_0x35a5ab(0x105)](_0xe46b2d,_0x27482d,_0x2816a0){const _0x21a80b=_0x35a5ab,_0x50292={'unitId':_0xe46b2d,'threadId':_0x2816a0},_0x17c87e=await this['_httpService'][_0x21a80b(0xcb)](_0x21a80b(0xf9)+_0xe46b2d+'/list',{'body':_0x50292}),_0x56e53c=_0x2816a0[_0x21a80b(0xb4)](_0x15c3f1=>G(_0x17c87e[_0x21a80b(0xcd)]['comments'][_0x15c3f1],_0xe46b2d,_0x27482d))['filter'](Boolean);return Object[_0x21a80b(0xc2)](_0x17c87e[_0x21a80b(0xcd)][_0x21a80b(0x106)])[_0x21a80b(0x100)](_0x3507b0=>{const _0x16fb8e=_0x21a80b;this['_userService'][_0x16fb8e(0xae)](_0x3507b0);}),_0x56e53c;}[_0x35a5ab(0xec)](_0x3fafc3){const _0x493ee9=_0x35a5ab;return{'id':_0x3fafc3['id'],'threadId':_0x3fafc3[_0x493ee9(0xcf)],'ref':_0x3fafc3['ref']};}};p=x([C(0x0,c[_0x35a5ab(0xd1)](P[_0x35a5ab(0xd5)])),C(0x1,c['Inject'](c[_0x35a5ab(0xa4)])),C(0x2,c['Inject'](b[_0x35a5ab(0xdf)]))],p);var H=Object[_0x35a5ab(0xb3)],J=(_0x3e456f,_0x5dda8d,_0x39c102,_0x5857b0)=>{const _0x2c7a32=_0x35a5ab;for(var _0x307802=_0x5857b0>0x1?void 0x0:_0x5857b0?H(_0x5dda8d,_0x39c102):_0x5dda8d,_0x4b3619=_0x3e456f[_0x2c7a32(0x110)]-0x1,_0x2df532;_0x4b3619>=0x0;_0x4b3619--)(_0x2df532=_0x3e456f[_0x4b3619])&&(_0x307802=_0x2df532(_0x307802)||_0x307802);return _0x307802;},y=(_0x33cf02,_0x7268aa)=>(_0x2091e2,_0x226f5)=>_0x7268aa(_0x2091e2,_0x226f5,_0x33cf02);function _0x7193(_0x21d612,_0x5b4dc3){const _0x33a074=_0x33a0();return _0x7193=function(_0x719345,_0x4d9a49){_0x719345=_0x719345-0xa1;let _0x4e328a=_0x33a074[_0x719345];return _0x4e328a;},_0x7193(_0x21d612,_0x5b4dc3);}let g=class extends c[_0x35a5ab(0x119)]{constructor(_0x14840c,_0xde0d3b){const _0x5427c6=_0x35a5ab;super(),this[_0x5427c6(0xbd)]=_0x14840c,this[_0x5427c6(0xa2)]=_0xde0d3b,this[_0x5427c6(0xe7)]();}[_0x35a5ab(0xe7)](){const _0x5adaf3=_0x35a5ab;this[_0x5adaf3(0xbd)][_0x5adaf3(0xf1)]=this[_0x5adaf3(0xa2)],this['_threadCommentDataSourceService'][_0x5adaf3(0xca)]=!0x1;}};g=J([y(0x0,M[_0x35a5ab(0xea)]),y(0x1,c[_0x35a5ab(0xd1)](p))],g);var F=Object[_0x35a5ab(0x102)],L=Object[_0x35a5ab(0xb3)],Z=(_0x10b622,_0x2a6a1f,_0x483a20)=>_0x2a6a1f in _0x10b622?F(_0x10b622,_0x2a6a1f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x483a20}):_0x10b622[_0x2a6a1f]=_0x483a20,W=(_0xe2e451,_0x3275d2,_0x1bd4c2,_0x566d27)=>{const _0x43aaf6=_0x35a5ab;for(var _0x1f8cba=_0x566d27>0x1?void 0x0:_0x566d27?L(_0x3275d2,_0x1bd4c2):_0x3275d2,_0x354c49=_0xe2e451[_0x43aaf6(0x110)]-0x1,_0xf019e6;_0x354c49>=0x0;_0x354c49--)(_0xf019e6=_0xe2e451[_0x354c49])&&(_0x1f8cba=_0xf019e6(_0x1f8cba)||_0x1f8cba);return _0x1f8cba;},O=(_0x556259,_0x22386b)=>(_0x3d3c31,_0x5c9538)=>_0x22386b(_0x3d3c31,_0x5c9538,_0x556259),N=(_0x2845ab,_0x5dd455,_0x4cdc24)=>Z(_0x2845ab,typeof _0x5dd455!=_0x35a5ab(0xa8)?_0x5dd455+'':_0x5dd455,_0x4cdc24);exports[_0x35a5ab(0xe6)]=class extends c['Plugin']{constructor(_0x574cc3=D,_0x372eab,_0x4a7e7a){const _0x3d5e90=_0x35a5ab;super(),this['_config']=_0x574cc3,this[_0x3d5e90(0xb8)]=_0x372eab,this[_0x3d5e90(0xb1)]=_0x4a7e7a;const {..._0x2a5abd}=c[_0x3d5e90(0x111)]({},D,this['_config']);this['_configService'][_0x3d5e90(0x10e)](q,_0x2a5abd);}[_0x35a5ab(0xba)](){const _0x544ffa=_0x35a5ab;[[p],[g],[_]][_0x544ffa(0x100)](_0xd952d3=>{this['_injector']['add'](_0xd952d3);});}['onReady'](){const _0xa24a74=_0x35a5ab;this[_0xa24a74(0xb8)][_0xa24a74(0x112)](g),this[_0xa24a74(0xb8)]['get'](_);}},N(exports[_0x35a5ab(0xe6)],_0x35a5ab(0xe1),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x35a5ab(0xf0),c['UniverInstanceType'][_0x35a5ab(0x115)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x35a5ab(0xa1)](w[_0x35a5ab(0xe8)],b[_0x35a5ab(0x113)],T['UniverLicensePlugin']),O(0x1,c[_0x35a5ab(0xd1)](c[_0x35a5ab(0xbe)])),O(0x2,c[_0x35a5ab(0xcc)])],exports[_0x35a5ab(0xe6)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x35a1d4=_0x3e59;(function(_0x46ccbb,_0x4d668c){const _0x4e7b0a=_0x3e59,_0x2cd634=_0x46ccbb();while(!![]){try{const _0x392e65=parseInt(_0x4e7b0a(0xe9))/0x1*(parseInt(_0x4e7b0a(0xdd))/0x2)+-parseInt(_0x4e7b0a(0xf3))/0x3*(-parseInt(_0x4e7b0a(0xc6))/0x4)+-parseInt(_0x4e7b0a(0xbf))/0x5*(-parseInt(_0x4e7b0a(0x9d))/0x6)+-parseInt(_0x4e7b0a(0xeb))/0x7+parseInt(_0x4e7b0a(0xe1))/0x8*(-parseInt(_0x4e7b0a(0x90))/0x9)+-parseInt(_0x4e7b0a(0xbd))/0xa+-parseInt(_0x4e7b0a(0xb0))/0xb*(-parseInt(_0x4e7b0a(0xef))/0xc);if(_0x392e65===_0x4d668c)break;else _0x2cd634['push'](_0x2cd634['shift']());}catch(_0x215a14){_0x2cd634['push'](_0x2cd634['shift']());}}}(_0x2b72,0x7656d));import{CommentService as _0x57b718,CollaborationSessionService as _0x333ebf,UniverCollaborationClientPlugin as _0x27c89b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x32bd05}from'@univerjs-pro/license';import{dayjs as _0x5eed82,UserManagerService as _0x104e56,Inject as _0x568319,Injector as _0x5710e7,Disposable as _0xacb343,CustomRangeType as _0x228e02,UniverInstanceType as _0x505f7d,DependentOn as _0x54f3d1,IConfigService as _0x241ad2,Plugin as _0x46fdf3,merge as _0x577e8b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2aaa9d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59aefc,IThreadCommentDataSourceService as _0x1e6e5b}from'@univerjs/thread-comment';import{bufferTime as _0x4bd892}from'rxjs';import{HTTPService as _0x2e05a5}from'@univerjs/network';const W=_0x35a1d4(0x91);var I=(_0x1eae20=>(_0x1eae20[_0x1eae20[_0x35a1d4(0xa2)]=0x0]=_0x35a1d4(0xa2),_0x1eae20[_0x1eae20[_0x35a1d4(0xa7)]=0x1]=_0x35a1d4(0xa7),_0x1eae20[_0x1eae20['UNRECOGNIZED']=-0x1]=_0x35a1d4(0x95),_0x1eae20))(I||{}),v=(_0x435084=>(_0x435084[_0x435084[_0x35a1d4(0xee)]=0x0]=_0x35a1d4(0xee),_0x435084[_0x435084[_0x35a1d4(0xd5)]=0x1]=_0x35a1d4(0xd5),_0x435084[_0x435084[_0x35a1d4(0xd4)]=0x2]=_0x35a1d4(0xd4),_0x435084[_0x435084[_0x35a1d4(0xc8)]=0x3]='Edit',_0x435084[_0x435084[_0x35a1d4(0xb2)]=0x4]=_0x35a1d4(0xb2),_0x435084[_0x435084[_0x35a1d4(0xaf)]=0x5]=_0x35a1d4(0xaf),_0x435084[_0x435084[_0x35a1d4(0x95)]=-0x1]=_0x35a1d4(0x95),_0x435084))(v||{});function _0x3e59(_0x3acb0f,_0x3be540){const _0x2b729e=_0x2b72();return _0x3e59=function(_0x3e59c3,_0xca1bd9){_0x3e59c3=_0x3e59c3-0x8f;let _0x20e9fd=_0x2b729e[_0x3e59c3];return _0x20e9fd;},_0x3e59(_0x3acb0f,_0x3be540);}const y=_0x5e73ac=>_0x5eed82(new Date(+_0x5e73ac))[_0x35a1d4(0xb4)](_0x35a1d4(0x9e)),B=async(_0x56a26e,_0x55c367)=>{const _0x338a87=_0x35a1d4,_0x5bc796=_0x56a26e[_0x338a87(0xa3)](_0x104e56),_0x3cb0aa=_0x56a26e[_0x338a87(0xa3)](_0x2e05a5);_0x55c367[_0x338a87(0xa1)](_0x470cfa=>{const _0x3ba6e9=_0x338a87;_0x5bc796[_0x3ba6e9(0x97)](_0x470cfa)&&_0x55c367['delete'](_0x470cfa);}),_0x55c367[_0x338a87(0xcf)]&&(await _0x3cb0aa[_0x338a87(0xa3)](_0x338a87(0x9b),{'params':{'userIDs':[..._0x55c367]}}))[_0x338a87(0xea)][_0x338a87(0xe0)][_0x338a87(0xa1)](_0xc0ba51=>{const _0x1814e9=_0x338a87;_0xc0ba51&&_0x5bc796[_0x1814e9(0xe3)](_0xc0ba51);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x248a24,_0x33537b,_0x3887e5,_0x84099)=>{const _0x50c4f6=_0x35a1d4;for(var _0x1b299d=_0x84099>0x1?void 0x0:_0x84099?K(_0x33537b,_0x3887e5):_0x33537b,_0x23200c=_0x248a24[_0x50c4f6(0x99)]-0x1,_0x3b4368;_0x23200c>=0x0;_0x23200c--)(_0x3b4368=_0x248a24[_0x23200c])&&(_0x1b299d=_0x3b4368(_0x1b299d)||_0x1b299d);return _0x1b299d;},p=(_0xe9bd7a,_0x152668)=>(_0x1f70fb,_0x543d64)=>_0x152668(_0x1f70fb,_0x543d64,_0xe9bd7a);let _=class extends _0xacb343{constructor(_0x576436,_0x2718f0,_0x4149be,_0x31bf06){const _0x27725f=_0x35a1d4;super(),this['_commentService']=_0x576436,this['_threadCommentModel']=_0x2718f0,this[_0x27725f(0xbc)]=_0x4149be,this['_injector']=_0x31bf06,this[_0x27725f(0x98)](),this[_0x27725f(0x94)]();}[_0x35a1d4(0x94)](){const _0x74bc5d=_0x35a1d4;this[_0x74bc5d(0xe6)](this[_0x74bc5d(0xf0)][_0x74bc5d(0xe5)][_0x74bc5d(0xb6)](_0x4bd892(0x10))['subscribe'](_0x534b4b=>{const _0x1916c2=_0x74bc5d,_0x121af6=new Set();_0x534b4b[_0x1916c2(0xa1)](_0x58e66d=>{const _0x12efe0=_0x1916c2;switch(_0x58e66d[_0x12efe0(0xbe)]){case _0x12efe0(0xd9):{const _0x1e416f=_0x58e66d['payload'][_0x12efe0(0xc1)];_0x121af6['add'](_0x1e416f);break;}}}),B(this[_0x1916c2(0xec)],_0x121af6);}));}[_0x35a1d4(0x98)](){const _0x4c07d0=_0x35a1d4;this['disposeWithMe'](this[_0x4c07d0(0xd2)][_0x4c07d0(0xe5)][_0x4c07d0(0x92)](async _0x1cb16b=>{const _0x3c097c=_0x4c07d0;var _0x2db8cd,_0x478f80,_0x419b44,_0x3d6358;const _0x5c889f=(_0x2db8cd=this['_threadCommentModel'][_0x3c097c(0xdb)](_0x1cb16b[_0x3c097c(0xdc)])['find'](_0x5b86a8=>_0x5b86a8['threadId']===_0x1cb16b[_0x3c097c(0xc2)]))==null?void 0x0:_0x2db8cd[_0x3c097c(0xba)];if(!_0x5c889f)return;const {unitId:_0xcb196f,subUnitId:_0x5defad}=_0x5c889f;switch(_0x1cb16b['user']&&this[_0x3c097c(0xbc)][_0x3c097c(0xe3)](_0x1cb16b['user']),_0x1cb16b[_0x3c097c(0xbe)]){case v['Add']:break;case v[_0x3c097c(0xd4)]:{this[_0x3c097c(0xf0)]['addComment'](_0xcb196f,_0x5defad,{'unitId':_0xcb196f,'subUnitId':_0x5defad,'ref':'','id':_0x1cb16b['replyId'],'dT':y(+_0x1cb16b[_0x3c097c(0xdf)]),'threadId':_0x1cb16b[_0x3c097c(0xc2)],'personId':(_0x419b44=(_0x478f80=_0x1cb16b[_0x3c097c(0xcc)])==null?void 0x0:_0x478f80[_0x3c097c(0xf2)])!=null?_0x419b44:_0x1cb16b[_0x3c097c(0xc7)],'text':JSON[_0x3c097c(0x93)](_0x1cb16b[_0x3c097c(0xa0)]),'parentId':_0x5c889f['id']});break;}case v[_0x3c097c(0xb2)]:{const _0x1aa9cf=this[_0x3c097c(0xf0)]['getComment'](_0xcb196f,_0x5defad,_0x1cb16b[_0x3c097c(0xa8)]);_0x1aa9cf&&_0x1aa9cf[_0x3c097c(0xed)]&&this[_0x3c097c(0xf0)][_0x3c097c(0xd6)](_0xcb196f,_0x5defad,_0x1cb16b[_0x3c097c(0xa8)]);break;}case v[_0x3c097c(0xc8)]:{this['_threadCommentModel']['updateComment'](_0xcb196f,_0x5defad,{'commentId':_0x1cb16b[_0x3c097c(0xa8)],'text':JSON[_0x3c097c(0x93)](_0x1cb16b['content'])});break;}case v[_0x3c097c(0xaf)]:{const _0x2049e2=(_0x3d6358=this[_0x3c097c(0xf0)][_0x3c097c(0xdb)](_0x1cb16b['unitId'])[_0x3c097c(0xc3)](_0x138b34=>_0x138b34['threadId']===_0x1cb16b['threadId']))==null?void 0x0:_0x3d6358[_0x3c097c(0xba)];_0x2049e2&&this[_0x3c097c(0xf0)]['resolveComment'](_0xcb196f,_0x5defad,_0x2049e2['id'],_0x1cb16b[_0x3c097c(0xd1)]===I[_0x3c097c(0xa7)]);break;}}}));}};_=V([p(0x0,_0x568319(_0x57b718)),p(0x1,_0x568319(_0x59aefc)),p(0x2,_0x568319(_0x104e56)),p(0x3,_0x568319(_0x5710e7))],_);const z=_0x35a1d4(0xb9),O={};var k=Object[_0x35a1d4(0xac)],Q=(_0x103a5f,_0x4fb6d6,_0x29bb89,_0x3868fc)=>{for(var _0x349259=_0x3868fc>0x1?void 0x0:_0x3868fc?k(_0x4fb6d6,_0x29bb89):_0x4fb6d6,_0x52e029=_0x103a5f['length']-0x1,_0x5efa3c;_0x52e029>=0x0;_0x52e029--)(_0x5efa3c=_0x103a5f[_0x52e029])&&(_0x349259=_0x5efa3c(_0x349259)||_0x349259);return _0x349259;},b=(_0x748b5b,_0x2388f2)=>(_0xeda274,_0x4ac3ef)=>_0x2388f2(_0xeda274,_0x4ac3ef,_0x748b5b);function _0x2b72(){const _0x246614=['/delete','_threadCommentDataSource','filter','9EtYIMz','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','parse','_initUserSync','UNRECOGNIZED','onReady','getUser','_init','length','_threadCommentDataSourceService','/universer-api/user/list','symbol','1374ZSHgVz','YYYY/MM/DD\x20HH:mm','addComment','content','forEach','OpenOrReOpen','get','/reply','rangeId','/universer-api/comment/unit/','Solved','replyId','stringify','rangeType','reply','getOwnPropertyDescriptor','setConfig','customRanges','Solve','143451iTAUOR','_httpService','Delete','post','format','saveCommentToSnapshot','pipe','UNIVER_UNKNOWN','defineProperty','thread-comment-data-source.config','root','getMemberID','_userService','9640610VDqTnD','type','18775MpIcAp','ref','personId','threadId','find','requireSession','comments','4OQVRKW','userId','Edit','dataSource','resolved','_sessionService','user','/edit','listComments','size','code','solved','_commentService','syncUpdateMutationToColla','Reply','Add','deleteComment','/list','/add','add','_configService','getUnit','unitId','19226kishrT','pluginName','createTimestamp','users','7297144nTxfhI','COMMENT','addUser','comment','commentUpdate$','disposeWithMe','_initDataSource','map','4fRQqqS','body','5427254xlyzCf','_injector','parentId','Unknown','1488RZJrkK','_threadCommentModel','error','userID','1862436SeumzB'];_0x2b72=function(){return _0x246614;};return _0x2b72();}function X(_0x519930,_0x12d8ad){const _0x35e14f=_0x35a1d4,_0x25899a=_0x519930['replies'][0x0];return{..._0x12d8ad,'id':_0x25899a[_0x35e14f(0xa8)],'resolved':_0x519930[_0x35e14f(0xd1)]===0x1,'dT':y(_0x25899a[_0x35e14f(0xdf)]),'personId':_0x25899a['userId'],'threadId':_0x25899a['threadId']};}function ee(_0x2305a0,_0x48400e,_0x1fda8d){const _0x11c244=_0x35a1d4;var _0x4a490b,_0x223f5e;if(((_0x223f5e=(_0x4a490b=_0x2305a0==null?void 0x0:_0x2305a0['replies'])==null?void 0x0:_0x4a490b[_0x11c244(0x99)])!=null?_0x223f5e:0x0)>0x0){const _0x2503ee=(_0x4abf93,_0x218f10)=>({'id':_0x4abf93[_0x11c244(0xa8)],'threadId':_0x4abf93[_0x11c244(0xc2)],'dT':y(_0x4abf93[_0x11c244(0xdf)]),'personId':_0x4abf93[_0x11c244(0xc7)],'resolved':_0x2305a0[_0x11c244(0xd1)]===I['Solved'],'unitId':_0x48400e,'subUnitId':_0x1fda8d,'text':JSON[_0x11c244(0x93)](_0x4abf93['content']),'parentId':_0x218f10}),_0x19bf52=_0x2503ee(_0x2305a0['replies'][0x0]);return{..._0x19bf52,'children':_0x2305a0['replies']['slice'](0x1)[_0x11c244(0xe8)](_0x5074a7=>_0x2503ee(_0x5074a7,_0x19bf52['id']))};}return null;}let S=class{constructor(_0x3a49ae,_0x169264,_0x2d1b80){const _0x470caf=_0x35a1d4;this[_0x470caf(0xb1)]=_0x3a49ae,this[_0x470caf(0xbc)]=_0x169264,this['_sessionService']=_0x2d1b80;}async[_0x35a1d4(0x9f)](_0x5cc68c){const _0x229205=_0x35a1d4;var _0x35c9c4,_0x33eee7;const {parentId:_0x30c06c,unitId:_0x28c657,text:_0x157728,threadId:_0x54cb36}=_0x5cc68c,_0x24e640=(_0x33eee7=(_0x35c9c4=_0x157728[_0x229205(0xae)])==null?void 0x0:_0x35c9c4[_0x229205(0x8f)](_0x5885c3=>_0x5885c3[_0x229205(0xaa)]===_0x228e02[_0x229205(0xe2)])['map'](_0x1f4ee8=>_0x1f4ee8[_0x229205(0xa5)]))!=null?_0x33eee7:[],_0x100776=JSON[_0x229205(0xa9)](_0x157728),_0x37a1dd=(await this[_0x229205(0xcb)][_0x229205(0xc4)](_0x28c657))['getMemberID']();if(_0x30c06c){const _0x56bcc3={'memberId':_0x37a1dd,'unitId':_0x28c657,'content':_0x100776,'mention':_0x24e640,'threadId':_0x54cb36},_0x1edd0a=(await this['_httpService'][_0x229205(0xb3)](_0x229205(0xa6)+_0x28c657+_0x229205(0xa4),{'body':_0x56bcc3}))['body'][_0x229205(0xab)];return{..._0x5cc68c,'id':_0x1edd0a[_0x229205(0xa8)],'dT':_0x5eed82(+_0x1edd0a[_0x229205(0xdf)])[_0x229205(0xb4)](_0x229205(0x9e)),'personId':_0x1edd0a[_0x229205(0xc7)]};}else{const _0x57dbe7={'memberId':_0x37a1dd,'unitId':_0x28c657,'content':_0x100776,'mention':_0x24e640},_0x25c7fb=await this[_0x229205(0xb1)][_0x229205(0xb3)](_0x229205(0xa6)+_0x28c657+_0x229205(0xd8),{'body':_0x57dbe7});return X(_0x25c7fb[_0x229205(0xea)][_0x229205(0xe4)],_0x5cc68c);}}async['updateComment'](_0x5dc479){const _0x2c587a=_0x35a1d4;var _0x5248fe,_0x25bf8c;const {text:_0x2562d6,unitId:_0x40f509}=_0x5dc479,_0x8c32d6=(_0x25bf8c=(_0x5248fe=_0x2562d6['customRanges'])==null?void 0x0:_0x5248fe['filter'](_0x558266=>_0x558266[_0x2c587a(0xaa)]===_0x228e02[_0x2c587a(0xe2)])[_0x2c587a(0xe8)](_0x2a472f=>_0x2a472f[_0x2c587a(0xa5)]))!=null?_0x25bf8c:[],_0x327578=JSON[_0x2c587a(0xa9)](_0x2562d6),_0x10c9e3=_0x5dc479[_0x2c587a(0xc2)],_0x48f001=_0x5dc479['id'],_0x35d3fd={'memberId':(await this['_sessionService'][_0x2c587a(0xc4)](_0x40f509))[_0x2c587a(0xbb)](),'unitId':_0x40f509,'threadId':_0x10c9e3,'mention':_0x8c32d6,'content':_0x327578,'replyId':_0x48f001},_0x28b562=await this['_httpService'][_0x2c587a(0xb3)](_0x2c587a(0xa6)+_0x40f509+_0x2c587a(0xcd),{'body':_0x35d3fd});return!_0x28b562[_0x2c587a(0xea)][_0x2c587a(0xf1)]||_0x28b562[_0x2c587a(0xea)]['error'][_0x2c587a(0xd0)]===0x1;}async['resolveComment'](_0x3de4ce){const _0x2da0d3=_0x35a1d4,{unitId:_0x1212a9}=_0x3de4ce,_0x4da36e=_0x3de4ce[_0x2da0d3(0xc2)],_0x5049e7={'memberId':this[_0x2da0d3(0xbc)]['getCurrentUser']()['userID'],'unitId':_0x1212a9,'threadId':_0x4da36e,'solved':_0x3de4ce[_0x2da0d3(0xca)]?I[_0x2da0d3(0xa7)]:I['OpenOrReOpen']},_0x4934f0=await this[_0x2da0d3(0xb1)][_0x2da0d3(0xb3)](_0x2da0d3(0xa6)+_0x1212a9+'/solved',{'body':_0x5049e7});return!_0x4934f0[_0x2da0d3(0xea)]['error']||_0x4934f0[_0x2da0d3(0xea)][_0x2da0d3(0xf1)][_0x2da0d3(0xd0)]===0x1;}async['deleteComment'](_0x27c585,_0x68030d,_0x12f87c,_0x4d6021){const _0x1cda9c=_0x35a1d4,_0x27f5e1={'memberId':(await this[_0x1cda9c(0xcb)][_0x1cda9c(0xc4)](_0x27c585))[_0x1cda9c(0xbb)](),'threadId':_0x12f87c,'replyId':_0x4d6021,'unitId':_0x27c585},_0x5efc0c=await this[_0x1cda9c(0xb1)]['post'](_0x1cda9c(0xa6)+_0x27c585+_0x1cda9c(0xf4),{'body':_0x27f5e1});return!_0x5efc0c[_0x1cda9c(0xea)][_0x1cda9c(0xf1)]||_0x5efc0c[_0x1cda9c(0xea)]['error']['code']===0x1;}async[_0x35a1d4(0xce)](_0x5a0527,_0x20ddce,_0x557567){const _0x44466e=_0x35a1d4,_0x2c2a62={'unitId':_0x5a0527,'threadId':_0x557567},_0x2c9ac2=await this[_0x44466e(0xb1)][_0x44466e(0xb3)](_0x44466e(0xa6)+_0x5a0527+_0x44466e(0xd7),{'body':_0x2c2a62}),_0x2eec90=_0x557567[_0x44466e(0xe8)](_0x9e07a7=>ee(_0x2c9ac2[_0x44466e(0xea)][_0x44466e(0xc5)][_0x9e07a7],_0x5a0527,_0x20ddce))['filter'](Boolean);return Object['values'](_0x2c9ac2['body'][_0x44466e(0xe0)])[_0x44466e(0xa1)](_0xe1388b=>{const _0x2f7030=_0x44466e;this[_0x2f7030(0xbc)][_0x2f7030(0xe3)](_0xe1388b);}),_0x2eec90;}[_0x35a1d4(0xb5)](_0x2cfdd1){const _0x28fa45=_0x35a1d4;return{'id':_0x2cfdd1['id'],'threadId':_0x2cfdd1['threadId'],'ref':_0x2cfdd1[_0x28fa45(0xc0)]};}};S=Q([b(0x0,_0x568319(_0x2e05a5)),b(0x1,_0x568319(_0x104e56)),b(0x2,_0x568319(_0x333ebf))],S);var re=Object[_0x35a1d4(0xac)],te=(_0x24a234,_0x569947,_0x1eadd9,_0x33713d)=>{const _0x47b595=_0x35a1d4;for(var _0x159440=_0x33713d>0x1?void 0x0:_0x33713d?re(_0x569947,_0x1eadd9):_0x569947,_0x47b3e9=_0x24a234[_0x47b595(0x99)]-0x1,_0x5088b9;_0x47b3e9>=0x0;_0x47b3e9--)(_0x5088b9=_0x24a234[_0x47b3e9])&&(_0x159440=_0x5088b9(_0x159440)||_0x159440);return _0x159440;},M=(_0x281b33,_0x25d9ed)=>(_0x3fda6b,_0x44ae4e)=>_0x25d9ed(_0x3fda6b,_0x44ae4e,_0x281b33);let f=class extends _0xacb343{constructor(_0x16ac65,_0x2820d3){const _0x4f2094=_0x35a1d4;super(),this[_0x4f2094(0x9a)]=_0x16ac65,this['_threadCommentDataSource']=_0x2820d3,this[_0x4f2094(0xe7)]();}[_0x35a1d4(0xe7)](){const _0x1b2b85=_0x35a1d4;this['_threadCommentDataSourceService'][_0x1b2b85(0xc9)]=this[_0x1b2b85(0xf5)],this[_0x1b2b85(0x9a)][_0x1b2b85(0xd3)]=!0x1;}};f=te([M(0x0,_0x1e6e5b),M(0x1,_0x568319(S))],f);var se=Object[_0x35a1d4(0xb8)],oe=Object[_0x35a1d4(0xac)],ne=(_0x13e5a4,_0x43e3ee,_0x5c4c9d)=>_0x43e3ee in _0x13e5a4?se(_0x13e5a4,_0x43e3ee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c4c9d}):_0x13e5a4[_0x43e3ee]=_0x5c4c9d,ie=(_0x1395d2,_0x37448f,_0x2ec810,_0x18cb0f)=>{const _0x2dd999=_0x35a1d4;for(var _0x3131ac=_0x18cb0f>0x1?void 0x0:_0x18cb0f?oe(_0x37448f,_0x2ec810):_0x37448f,_0x564a35=_0x1395d2[_0x2dd999(0x99)]-0x1,_0x4114e0;_0x564a35>=0x0;_0x564a35--)(_0x4114e0=_0x1395d2[_0x564a35])&&(_0x3131ac=_0x4114e0(_0x3131ac)||_0x3131ac);return _0x3131ac;},N=(_0x58d5f1,_0x16c8d5)=>(_0x45c77b,_0x5ba941)=>_0x16c8d5(_0x45c77b,_0x5ba941,_0x58d5f1),$=(_0x5db7cc,_0x237fd5,_0xc25b5a)=>ne(_0x5db7cc,typeof _0x237fd5!=_0x35a1d4(0x9c)?_0x237fd5+'':_0x237fd5,_0xc25b5a);let g=class extends _0x46fdf3{constructor(_0x39b1bd=O,_0x32b609,_0x572c09){const _0x196965=_0x35a1d4;super(),this['_config']=_0x39b1bd,this['_injector']=_0x32b609,this[_0x196965(0xda)]=_0x572c09;const {..._0x2a2787}=_0x577e8b({},O,this['_config']);this[_0x196965(0xda)][_0x196965(0xad)](z,_0x2a2787);}['onStarting'](){const _0x36fea8=_0x35a1d4;[[S],[f],[_]][_0x36fea8(0xa1)](_0x69b35f=>{const _0x2c7cb6=_0x36fea8;this[_0x2c7cb6(0xec)][_0x2c7cb6(0xd9)](_0x69b35f);});}[_0x35a1d4(0x96)](){const _0xe4235e=_0x35a1d4;this[_0xe4235e(0xec)][_0xe4235e(0xa3)](f),this[_0xe4235e(0xec)]['get'](_);}};$(g,_0x35a1d4(0xde),W),$(g,_0x35a1d4(0xbe),_0x505f7d[_0x35a1d4(0xb7)]),g=ie([_0x54f3d1(_0x2aaa9d,_0x27c89b,_0x32bd05),N(0x1,_0x568319(_0x5710e7)),N(0x2,_0x241ad2)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0xf2dd0a=_0x4f80;(function(_0x5d3492,_0x139a0a){const _0x1ac33b=_0x4f80,_0x30b8ca=_0x5d3492();while(!![]){try{const _0x5da65c=parseInt(_0x1ac33b(0x14a))/0x1+parseInt(_0x1ac33b(0x177))/0x2*(parseInt(_0x1ac33b(0x12d))/0x3)+parseInt(_0x1ac33b(0x12c))/0x4*(-parseInt(_0x1ac33b(0x18d))/0x5)+parseInt(_0x1ac33b(0x188))/0x6+-parseInt(_0x1ac33b(0x132))/0x7+-parseInt(_0x1ac33b(0x15b))/0x8*(-parseInt(_0x1ac33b(0x129))/0x9)+-parseInt(_0x1ac33b(0x150))/0xa;if(_0x5da65c===_0x139a0a)break;else _0x30b8ca['push'](_0x30b8ca['shift']());}catch(_0x19890a){_0x30b8ca['push'](_0x30b8ca['shift']());}}}(_0x20b3,0xba5e8));import{CommentService as _0x27ef41,CollaborationSessionService as _0x408cc2,UniverCollaborationClientPlugin as _0x4d714d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xf62078}from'@univerjs-pro/license';import{dayjs as _0x3296f5,UserManagerService as _0x1a82c8,Inject as _0x2a723d,Injector as _0x48547d,Disposable as _0x5f0700,CustomRangeType as _0x8aea36,UniverInstanceType as _0x561314,DependentOn as _0xd6cc24,IConfigService as _0x3fbe75,Plugin as _0xa37bcf,merge as _0x3de015}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x55c17b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x378e1d,IThreadCommentDataSourceService as _0x2bb3bb}from'@univerjs/thread-comment';import{bufferTime as _0x2eb9bc}from'rxjs';import{HTTPService as _0x105545}from'@univerjs/network';const W=_0xf2dd0a(0x169);var I=(_0x3f38d7=>(_0x3f38d7[_0x3f38d7[_0xf2dd0a(0x12b)]=0x0]=_0xf2dd0a(0x12b),_0x3f38d7[_0x3f38d7[_0xf2dd0a(0x181)]=0x1]=_0xf2dd0a(0x181),_0x3f38d7[_0x3f38d7['UNRECOGNIZED']=-0x1]=_0xf2dd0a(0x18b),_0x3f38d7))(I||{}),v=(_0x74bc2e=>(_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x154)]=0x0]=_0xf2dd0a(0x154),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x161)]=0x1]=_0xf2dd0a(0x161),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x149)]=0x2]=_0xf2dd0a(0x149),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x156)]=0x3]='Edit',_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x139)]=0x4]='Delete',_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x158)]=0x5]=_0xf2dd0a(0x158),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x18b)]=-0x1]=_0xf2dd0a(0x18b),_0x74bc2e))(v||{});const y=_0x4ff9da=>_0x3296f5(new Date(+_0x4ff9da))[_0xf2dd0a(0x128)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x14f257,_0x1663fb)=>{const _0x2ed6f0=_0xf2dd0a,_0x60d12b=_0x14f257['get'](_0x1a82c8),_0x29195a=_0x14f257[_0x2ed6f0(0x130)](_0x105545);_0x1663fb[_0x2ed6f0(0x144)](_0x2167d6=>{const _0x2554c1=_0x2ed6f0;_0x60d12b['getUser'](_0x2167d6)&&_0x1663fb[_0x2554c1(0x14e)](_0x2167d6);}),_0x1663fb[_0x2ed6f0(0x17a)]&&(await _0x29195a['get'](_0x2ed6f0(0x141),{'params':{'userIDs':[..._0x1663fb]}}))[_0x2ed6f0(0x16c)]['users'][_0x2ed6f0(0x144)](_0x349ba6=>{const _0x328932=_0x2ed6f0;_0x349ba6&&_0x60d12b[_0x328932(0x164)](_0x349ba6);});};var K=Object[_0xf2dd0a(0x180)],V=(_0xf6bd97,_0x2acb42,_0x581d3a,_0x29947b)=>{const _0x3894b9=_0xf2dd0a;for(var _0x34f9cf=_0x29947b>0x1?void 0x0:_0x29947b?K(_0x2acb42,_0x581d3a):_0x2acb42,_0x12e167=_0xf6bd97[_0x3894b9(0x13e)]-0x1,_0x3fd1bb;_0x12e167>=0x0;_0x12e167--)(_0x3fd1bb=_0xf6bd97[_0x12e167])&&(_0x34f9cf=_0x3fd1bb(_0x34f9cf)||_0x34f9cf);return _0x34f9cf;},p=(_0x324197,_0x11351c)=>(_0x32dd4f,_0x173b14)=>_0x11351c(_0x32dd4f,_0x173b14,_0x324197);let _=class extends _0x5f0700{constructor(_0x16e83d,_0x12f3ff,_0x97344f,_0x1e96e3){const _0x4546ac=_0xf2dd0a;super(),this['_commentService']=_0x16e83d,this[_0x4546ac(0x165)]=_0x12f3ff,this[_0x4546ac(0x171)]=_0x97344f,this[_0x4546ac(0x14b)]=_0x1e96e3,this[_0x4546ac(0x138)](),this[_0x4546ac(0x17d)]();}[_0xf2dd0a(0x17d)](){const _0x354784=_0xf2dd0a;this[_0x354784(0x16b)](this[_0x354784(0x165)][_0x354784(0x187)]['pipe'](_0x2eb9bc(0x10))[_0x354784(0x145)](_0x41dd81=>{const _0x576917=_0x354784,_0x23ccf9=new Set();_0x41dd81[_0x576917(0x144)](_0x164fff=>{const _0x29e8c9=_0x576917;switch(_0x164fff[_0x29e8c9(0x137)]){case'add':{const _0x591f11=_0x164fff['payload'][_0x29e8c9(0x189)];_0x23ccf9['add'](_0x591f11);break;}}}),B(this[_0x576917(0x14b)],_0x23ccf9);}));}[_0xf2dd0a(0x138)](){const _0x40ac59=_0xf2dd0a;this[_0x40ac59(0x16b)](this[_0x40ac59(0x16a)][_0x40ac59(0x187)][_0x40ac59(0x145)](async _0xb6794c=>{const _0x3dbbcb=_0x40ac59;var _0x5a9004,_0x5d7313,_0x2f6c21,_0x514210;const _0x13ceed=(_0x5a9004=this[_0x3dbbcb(0x165)][_0x3dbbcb(0x13d)](_0xb6794c[_0x3dbbcb(0x172)])[_0x3dbbcb(0x135)](_0x20214e=>_0x20214e['threadId']===_0xb6794c[_0x3dbbcb(0x184)]))==null?void 0x0:_0x5a9004[_0x3dbbcb(0x151)];if(!_0x13ceed)return;const {unitId:_0xc065bf,subUnitId:_0x425db2}=_0x13ceed;switch(_0xb6794c[_0x3dbbcb(0x17f)]&&this[_0x3dbbcb(0x171)][_0x3dbbcb(0x164)](_0xb6794c[_0x3dbbcb(0x17f)]),_0xb6794c[_0x3dbbcb(0x137)]){case v[_0x3dbbcb(0x161)]:break;case v[_0x3dbbcb(0x149)]:{this[_0x3dbbcb(0x165)]['addComment'](_0xc065bf,_0x425db2,{'unitId':_0xc065bf,'subUnitId':_0x425db2,'ref':'','id':_0xb6794c[_0x3dbbcb(0x18a)],'dT':y(+_0xb6794c['createTimestamp']),'threadId':_0xb6794c[_0x3dbbcb(0x184)],'personId':(_0x2f6c21=(_0x5d7313=_0xb6794c[_0x3dbbcb(0x17f)])==null?void 0x0:_0x5d7313[_0x3dbbcb(0x152)])!=null?_0x2f6c21:_0xb6794c['userId'],'text':JSON[_0x3dbbcb(0x18c)](_0xb6794c[_0x3dbbcb(0x143)]),'parentId':_0x13ceed['id']});break;}case v[_0x3dbbcb(0x139)]:{const _0x48c22d=this[_0x3dbbcb(0x165)][_0x3dbbcb(0x142)](_0xc065bf,_0x425db2,_0xb6794c[_0x3dbbcb(0x18a)]);_0x48c22d&&_0x48c22d[_0x3dbbcb(0x146)]&&this['_threadCommentModel'][_0x3dbbcb(0x13b)](_0xc065bf,_0x425db2,_0xb6794c[_0x3dbbcb(0x18a)]);break;}case v[_0x3dbbcb(0x156)]:{this[_0x3dbbcb(0x165)][_0x3dbbcb(0x131)](_0xc065bf,_0x425db2,{'commentId':_0xb6794c[_0x3dbbcb(0x18a)],'text':JSON['parse'](_0xb6794c[_0x3dbbcb(0x143)])});break;}case v[_0x3dbbcb(0x158)]:{const _0x402136=(_0x514210=this['_threadCommentModel']['getUnit'](_0xb6794c[_0x3dbbcb(0x172)])['find'](_0x31de39=>_0x31de39[_0x3dbbcb(0x184)]===_0xb6794c[_0x3dbbcb(0x184)]))==null?void 0x0:_0x514210['root'];_0x402136&&this[_0x3dbbcb(0x165)][_0x3dbbcb(0x167)](_0xc065bf,_0x425db2,_0x402136['id'],_0xb6794c[_0x3dbbcb(0x14c)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x2a723d(_0x27ef41)),p(0x1,_0x2a723d(_0x378e1d)),p(0x2,_0x2a723d(_0x1a82c8)),p(0x3,_0x2a723d(_0x48547d))],_);const z=_0xf2dd0a(0x16f),O={};var k=Object[_0xf2dd0a(0x180)],Q=(_0x121ad6,_0x2099aa,_0xbb3d2b,_0x5ca734)=>{for(var _0xda0bf6=_0x5ca734>0x1?void 0x0:_0x5ca734?k(_0x2099aa,_0xbb3d2b):_0x2099aa,_0xc12bea=_0x121ad6['length']-0x1,_0x3815eb;_0xc12bea>=0x0;_0xc12bea--)(_0x3815eb=_0x121ad6[_0xc12bea])&&(_0xda0bf6=_0x3815eb(_0xda0bf6)||_0xda0bf6);return _0xda0bf6;},b=(_0x18125b,_0x4381de)=>(_0x5a6f9f,_0x387ab5)=>_0x4381de(_0x5a6f9f,_0x387ab5,_0x18125b);function _0x20b3(){const _0xc2e80c=['/delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','disposeWithMe','body','UNIVER_UNKNOWN','filter','thread-comment-data-source.config','slice','_userService','unitId','_httpService','COMMENT','getCurrentUser','onStarting','2gcrWcU','/reply','_config','size','comment','_configService','_initUserSync','defineProperty','user','getOwnPropertyDescriptor','Solved','addComment','YYYY/MM/DD\x20HH:mm','threadId','/add','customRanges','commentUpdate$','6815640KPJKBg','personId','replyId','UNRECOGNIZED','parse','4170XRqfsC','_sessionService','format','2670363FDClmw','users','OpenOrReOpen','6712swSIDj','2582373JjyrMK','add','listComments','get','updateComment','9569280BVbtga','map','requireSession','find','/universer-api/comment/unit/','type','_init','Delete','rangeType','deleteComment','getMemberID','getUnit','length','syncUpdateMutationToColla','_threadCommentDataSourceService','/universer-api/user/list','getComment','content','forEach','subscribe','parentId','/list','/edit','Reply','236418JBsXCB','_injector','solved','error','delete','post','1868240HNBtQJ','root','userID','setConfig','Unknown','_threadCommentDataSource','Edit','resolved','Solve','stringify','replies','40iIaDqq','symbol','reply','userId','rangeId','dataSource','Add','_initDataSource','code','addUser','_threadCommentModel','createTimestamp','resolveComment'];_0x20b3=function(){return _0xc2e80c;};return _0x20b3();}function X(_0x36dd8f,_0x43caab){const _0x1f2558=_0xf2dd0a,_0x53c775=_0x36dd8f[_0x1f2558(0x15a)][0x0];return{..._0x43caab,'id':_0x53c775['replyId'],'resolved':_0x36dd8f[_0x1f2558(0x14c)]===0x1,'dT':y(_0x53c775[_0x1f2558(0x166)]),'personId':_0x53c775[_0x1f2558(0x15e)],'threadId':_0x53c775[_0x1f2558(0x184)]};}function ee(_0x2f6674,_0x5b0134,_0x1ad43c){const _0x398fd6=_0xf2dd0a;var _0x52f95a,_0x5d1eae;if(((_0x5d1eae=(_0x52f95a=_0x2f6674==null?void 0x0:_0x2f6674[_0x398fd6(0x15a)])==null?void 0x0:_0x52f95a[_0x398fd6(0x13e)])!=null?_0x5d1eae:0x0)>0x0){const _0x422ddf=(_0x15657c,_0x1c9cbf)=>({'id':_0x15657c[_0x398fd6(0x18a)],'threadId':_0x15657c[_0x398fd6(0x184)],'dT':y(_0x15657c[_0x398fd6(0x166)]),'personId':_0x15657c[_0x398fd6(0x15e)],'resolved':_0x2f6674[_0x398fd6(0x14c)]===I[_0x398fd6(0x181)],'unitId':_0x5b0134,'subUnitId':_0x1ad43c,'text':JSON[_0x398fd6(0x18c)](_0x15657c[_0x398fd6(0x143)]),'parentId':_0x1c9cbf}),_0x542975=_0x422ddf(_0x2f6674[_0x398fd6(0x15a)][0x0]);return{..._0x542975,'children':_0x2f6674[_0x398fd6(0x15a)][_0x398fd6(0x170)](0x1)[_0x398fd6(0x133)](_0x4ed855=>_0x422ddf(_0x4ed855,_0x542975['id']))};}return null;}let S=class{constructor(_0x501c85,_0x9778bf,_0x4a0706){const _0x488c6e=_0xf2dd0a;this['_httpService']=_0x501c85,this[_0x488c6e(0x171)]=_0x9778bf,this[_0x488c6e(0x18e)]=_0x4a0706;}async[_0xf2dd0a(0x182)](_0x22fe1d){const _0x32a6be=_0xf2dd0a;var _0x225ad7,_0x82421;const {parentId:_0x329542,unitId:_0x38cbfc,text:_0x1c6112,threadId:_0x5ebdb5}=_0x22fe1d,_0x7157e3=(_0x82421=(_0x225ad7=_0x1c6112[_0x32a6be(0x186)])==null?void 0x0:_0x225ad7[_0x32a6be(0x16e)](_0x233b9f=>_0x233b9f[_0x32a6be(0x13a)]===_0x8aea36[_0x32a6be(0x174)])[_0x32a6be(0x133)](_0x20329a=>_0x20329a['rangeId']))!=null?_0x82421:[],_0xc8c301=JSON[_0x32a6be(0x159)](_0x1c6112),_0x1196e2=(await this[_0x32a6be(0x18e)][_0x32a6be(0x134)](_0x38cbfc))[_0x32a6be(0x13c)]();if(_0x329542){const _0x1712f0={'memberId':_0x1196e2,'unitId':_0x38cbfc,'content':_0xc8c301,'mention':_0x7157e3,'threadId':_0x5ebdb5},_0x5a8480=(await this['_httpService']['post'](_0x32a6be(0x136)+_0x38cbfc+_0x32a6be(0x178),{'body':_0x1712f0}))[_0x32a6be(0x16c)][_0x32a6be(0x15d)];return{..._0x22fe1d,'id':_0x5a8480[_0x32a6be(0x18a)],'dT':_0x3296f5(+_0x5a8480[_0x32a6be(0x166)])[_0x32a6be(0x128)](_0x32a6be(0x183)),'personId':_0x5a8480['userId']};}else{const _0x25f543={'memberId':_0x1196e2,'unitId':_0x38cbfc,'content':_0xc8c301,'mention':_0x7157e3},_0x18f544=await this[_0x32a6be(0x173)][_0x32a6be(0x14f)](_0x32a6be(0x136)+_0x38cbfc+_0x32a6be(0x185),{'body':_0x25f543});return X(_0x18f544['body'][_0x32a6be(0x17b)],_0x22fe1d);}}async[_0xf2dd0a(0x131)](_0x2b5516){const _0x281c01=_0xf2dd0a;var _0x4c9901,_0x31daf5;const {text:_0x1eabcf,unitId:_0xf44fcc}=_0x2b5516,_0x3da96a=(_0x31daf5=(_0x4c9901=_0x1eabcf['customRanges'])==null?void 0x0:_0x4c9901['filter'](_0x34afb5=>_0x34afb5[_0x281c01(0x13a)]===_0x8aea36[_0x281c01(0x174)])[_0x281c01(0x133)](_0x45002d=>_0x45002d[_0x281c01(0x15f)]))!=null?_0x31daf5:[],_0xc320be=JSON[_0x281c01(0x159)](_0x1eabcf),_0x340380=_0x2b5516[_0x281c01(0x184)],_0x375d5b=_0x2b5516['id'],_0x431709={'memberId':(await this[_0x281c01(0x18e)]['requireSession'](_0xf44fcc))[_0x281c01(0x13c)](),'unitId':_0xf44fcc,'threadId':_0x340380,'mention':_0x3da96a,'content':_0xc320be,'replyId':_0x375d5b},_0x48a4b2=await this[_0x281c01(0x173)][_0x281c01(0x14f)]('/universer-api/comment/unit/'+_0xf44fcc+_0x281c01(0x148),{'body':_0x431709});return!_0x48a4b2[_0x281c01(0x16c)][_0x281c01(0x14d)]||_0x48a4b2[_0x281c01(0x16c)][_0x281c01(0x14d)][_0x281c01(0x163)]===0x1;}async[_0xf2dd0a(0x167)](_0x46894a){const _0x34faa1=_0xf2dd0a,{unitId:_0x28685f}=_0x46894a,_0x276e95=_0x46894a['threadId'],_0x1d22ef={'memberId':this[_0x34faa1(0x171)][_0x34faa1(0x175)]()[_0x34faa1(0x152)],'unitId':_0x28685f,'threadId':_0x276e95,'solved':_0x46894a[_0x34faa1(0x157)]?I[_0x34faa1(0x181)]:I[_0x34faa1(0x12b)]},_0x53a167=await this['_httpService'][_0x34faa1(0x14f)]('/universer-api/comment/unit/'+_0x28685f+'/solved',{'body':_0x1d22ef});return!_0x53a167[_0x34faa1(0x16c)][_0x34faa1(0x14d)]||_0x53a167[_0x34faa1(0x16c)]['error'][_0x34faa1(0x163)]===0x1;}async['deleteComment'](_0x5505fb,_0x2530ff,_0x581f06,_0x2ae049){const _0x208c41=_0xf2dd0a,_0x319a56={'memberId':(await this[_0x208c41(0x18e)]['requireSession'](_0x5505fb))[_0x208c41(0x13c)](),'threadId':_0x581f06,'replyId':_0x2ae049,'unitId':_0x5505fb},_0xe85e02=await this[_0x208c41(0x173)][_0x208c41(0x14f)](_0x208c41(0x136)+_0x5505fb+_0x208c41(0x168),{'body':_0x319a56});return!_0xe85e02[_0x208c41(0x16c)][_0x208c41(0x14d)]||_0xe85e02[_0x208c41(0x16c)][_0x208c41(0x14d)][_0x208c41(0x163)]===0x1;}async[_0xf2dd0a(0x12f)](_0x4e2784,_0x34788e,_0x139f5f){const _0x3cc636=_0xf2dd0a,_0x44bac9={'unitId':_0x4e2784,'threadId':_0x139f5f},_0x11cb45=await this['_httpService'][_0x3cc636(0x14f)](_0x3cc636(0x136)+_0x4e2784+_0x3cc636(0x147),{'body':_0x44bac9}),_0x4a706f=_0x139f5f[_0x3cc636(0x133)](_0x516815=>ee(_0x11cb45['body']['comments'][_0x516815],_0x4e2784,_0x34788e))['filter'](Boolean);return Object['values'](_0x11cb45[_0x3cc636(0x16c)][_0x3cc636(0x12a)])[_0x3cc636(0x144)](_0x407cfd=>{this['_userService']['addUser'](_0x407cfd);}),_0x4a706f;}['saveCommentToSnapshot'](_0x111ede){const _0x42ff2f=_0xf2dd0a;return{'id':_0x111ede['id'],'threadId':_0x111ede[_0x42ff2f(0x184)],'ref':_0x111ede['ref']};}};function _0x4f80(_0xafa963,_0x53b3ab){const _0x20b31c=_0x20b3();return _0x4f80=function(_0x4f8050,_0x2f83d0){_0x4f8050=_0x4f8050-0x128;let _0x267939=_0x20b31c[_0x4f8050];return _0x267939;},_0x4f80(_0xafa963,_0x53b3ab);}S=Q([b(0x0,_0x2a723d(_0x105545)),b(0x1,_0x2a723d(_0x1a82c8)),b(0x2,_0x2a723d(_0x408cc2))],S);var re=Object[_0xf2dd0a(0x180)],te=(_0xb5e824,_0xa391bc,_0x1e4e99,_0x394c85)=>{const _0x3d1b5b=_0xf2dd0a;for(var _0x4b4688=_0x394c85>0x1?void 0x0:_0x394c85?re(_0xa391bc,_0x1e4e99):_0xa391bc,_0x383471=_0xb5e824[_0x3d1b5b(0x13e)]-0x1,_0x4c51b7;_0x383471>=0x0;_0x383471--)(_0x4c51b7=_0xb5e824[_0x383471])&&(_0x4b4688=_0x4c51b7(_0x4b4688)||_0x4b4688);return _0x4b4688;},M=(_0x2c2d19,_0x9fcb9f)=>(_0x3620cf,_0x100100)=>_0x9fcb9f(_0x3620cf,_0x100100,_0x2c2d19);let f=class extends _0x5f0700{constructor(_0xea660f,_0x175171){const _0x12490e=_0xf2dd0a;super(),this[_0x12490e(0x140)]=_0xea660f,this[_0x12490e(0x155)]=_0x175171,this['_initDataSource']();}[_0xf2dd0a(0x162)](){const _0x1fd6d0=_0xf2dd0a;this[_0x1fd6d0(0x140)][_0x1fd6d0(0x160)]=this[_0x1fd6d0(0x155)],this['_threadCommentDataSourceService'][_0x1fd6d0(0x13f)]=!0x1;}};f=te([M(0x0,_0x2bb3bb),M(0x1,_0x2a723d(S))],f);var se=Object[_0xf2dd0a(0x17e)],oe=Object[_0xf2dd0a(0x180)],ne=(_0x5df8ae,_0x1cd5b7,_0x5911ff)=>_0x1cd5b7 in _0x5df8ae?se(_0x5df8ae,_0x1cd5b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5911ff}):_0x5df8ae[_0x1cd5b7]=_0x5911ff,ie=(_0x53b488,_0x53832f,_0x1aa73f,_0x1aa272)=>{const _0x3b3a05=_0xf2dd0a;for(var _0x132eeb=_0x1aa272>0x1?void 0x0:_0x1aa272?oe(_0x53832f,_0x1aa73f):_0x53832f,_0x5ef4a7=_0x53b488[_0x3b3a05(0x13e)]-0x1,_0x247717;_0x5ef4a7>=0x0;_0x5ef4a7--)(_0x247717=_0x53b488[_0x5ef4a7])&&(_0x132eeb=_0x247717(_0x132eeb)||_0x132eeb);return _0x132eeb;},N=(_0x2fee8f,_0x318ed6)=>(_0x37d2ba,_0x2224df)=>_0x318ed6(_0x37d2ba,_0x2224df,_0x2fee8f),$=(_0x3df332,_0x5200d7,_0xdef899)=>ne(_0x3df332,typeof _0x5200d7!=_0xf2dd0a(0x15c)?_0x5200d7+'':_0x5200d7,_0xdef899);let g=class extends _0xa37bcf{constructor(_0x12010b=O,_0x21ffe7,_0x58d343){const _0x2a10bf=_0xf2dd0a;super(),this['_config']=_0x12010b,this['_injector']=_0x21ffe7,this[_0x2a10bf(0x17c)]=_0x58d343;const {..._0x37b03a}=_0x3de015({},O,this[_0x2a10bf(0x179)]);this['_configService'][_0x2a10bf(0x153)](z,_0x37b03a);}[_0xf2dd0a(0x176)](){const _0x464609=_0xf2dd0a;[[S],[f],[_]][_0x464609(0x144)](_0x35b556=>{const _0x3912a1=_0x464609;this['_injector'][_0x3912a1(0x12e)](_0x35b556);});}['onReady'](){const _0x55e5c8=_0xf2dd0a;this[_0x55e5c8(0x14b)]['get'](f),this[_0x55e5c8(0x14b)][_0x55e5c8(0x130)](_);}};$(g,'pluginName',W),$(g,_0xf2dd0a(0x137),_0x561314[_0xf2dd0a(0x16d)]),g=ie([_0xd6cc24(_0x55c17b,_0x4d714d,_0xf62078),N(0x1,_0x2a723d(_0x48547d)),N(0x2,_0x3fbe75)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x35a1d4=_0x3e59;(function(_0x46ccbb,_0x4d668c){const _0x4e7b0a=_0x3e59,_0x2cd634=_0x46ccbb();while(!![]){try{const _0x392e65=parseInt(_0x4e7b0a(0xe9))/0x1*(parseInt(_0x4e7b0a(0xdd))/0x2)+-parseInt(_0x4e7b0a(0xf3))/0x3*(-parseInt(_0x4e7b0a(0xc6))/0x4)+-parseInt(_0x4e7b0a(0xbf))/0x5*(-parseInt(_0x4e7b0a(0x9d))/0x6)+-parseInt(_0x4e7b0a(0xeb))/0x7+parseInt(_0x4e7b0a(0xe1))/0x8*(-parseInt(_0x4e7b0a(0x90))/0x9)+-parseInt(_0x4e7b0a(0xbd))/0xa+-parseInt(_0x4e7b0a(0xb0))/0xb*(-parseInt(_0x4e7b0a(0xef))/0xc);if(_0x392e65===_0x4d668c)break;else _0x2cd634['push'](_0x2cd634['shift']());}catch(_0x215a14){_0x2cd634['push'](_0x2cd634['shift']());}}}(_0x2b72,0x7656d));import{CommentService as _0x57b718,CollaborationSessionService as _0x333ebf,UniverCollaborationClientPlugin as _0x27c89b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x32bd05}from'@univerjs-pro/license';import{dayjs as _0x5eed82,UserManagerService as _0x104e56,Inject as _0x568319,Injector as _0x5710e7,Disposable as _0xacb343,CustomRangeType as _0x228e02,UniverInstanceType as _0x505f7d,DependentOn as _0x54f3d1,IConfigService as _0x241ad2,Plugin as _0x46fdf3,merge as _0x577e8b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2aaa9d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59aefc,IThreadCommentDataSourceService as _0x1e6e5b}from'@univerjs/thread-comment';import{bufferTime as _0x4bd892}from'rxjs';import{HTTPService as _0x2e05a5}from'@univerjs/network';const W=_0x35a1d4(0x91);var I=(_0x1eae20=>(_0x1eae20[_0x1eae20[_0x35a1d4(0xa2)]=0x0]=_0x35a1d4(0xa2),_0x1eae20[_0x1eae20[_0x35a1d4(0xa7)]=0x1]=_0x35a1d4(0xa7),_0x1eae20[_0x1eae20['UNRECOGNIZED']=-0x1]=_0x35a1d4(0x95),_0x1eae20))(I||{}),v=(_0x435084=>(_0x435084[_0x435084[_0x35a1d4(0xee)]=0x0]=_0x35a1d4(0xee),_0x435084[_0x435084[_0x35a1d4(0xd5)]=0x1]=_0x35a1d4(0xd5),_0x435084[_0x435084[_0x35a1d4(0xd4)]=0x2]=_0x35a1d4(0xd4),_0x435084[_0x435084[_0x35a1d4(0xc8)]=0x3]='Edit',_0x435084[_0x435084[_0x35a1d4(0xb2)]=0x4]=_0x35a1d4(0xb2),_0x435084[_0x435084[_0x35a1d4(0xaf)]=0x5]=_0x35a1d4(0xaf),_0x435084[_0x435084[_0x35a1d4(0x95)]=-0x1]=_0x35a1d4(0x95),_0x435084))(v||{});function _0x3e59(_0x3acb0f,_0x3be540){const _0x2b729e=_0x2b72();return _0x3e59=function(_0x3e59c3,_0xca1bd9){_0x3e59c3=_0x3e59c3-0x8f;let _0x20e9fd=_0x2b729e[_0x3e59c3];return _0x20e9fd;},_0x3e59(_0x3acb0f,_0x3be540);}const y=_0x5e73ac=>_0x5eed82(new Date(+_0x5e73ac))[_0x35a1d4(0xb4)](_0x35a1d4(0x9e)),B=async(_0x56a26e,_0x55c367)=>{const _0x338a87=_0x35a1d4,_0x5bc796=_0x56a26e[_0x338a87(0xa3)](_0x104e56),_0x3cb0aa=_0x56a26e[_0x338a87(0xa3)](_0x2e05a5);_0x55c367[_0x338a87(0xa1)](_0x470cfa=>{const _0x3ba6e9=_0x338a87;_0x5bc796[_0x3ba6e9(0x97)](_0x470cfa)&&_0x55c367['delete'](_0x470cfa);}),_0x55c367[_0x338a87(0xcf)]&&(await _0x3cb0aa[_0x338a87(0xa3)](_0x338a87(0x9b),{'params':{'userIDs':[..._0x55c367]}}))[_0x338a87(0xea)][_0x338a87(0xe0)][_0x338a87(0xa1)](_0xc0ba51=>{const _0x1814e9=_0x338a87;_0xc0ba51&&_0x5bc796[_0x1814e9(0xe3)](_0xc0ba51);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x248a24,_0x33537b,_0x3887e5,_0x84099)=>{const _0x50c4f6=_0x35a1d4;for(var _0x1b299d=_0x84099>0x1?void 0x0:_0x84099?K(_0x33537b,_0x3887e5):_0x33537b,_0x23200c=_0x248a24[_0x50c4f6(0x99)]-0x1,_0x3b4368;_0x23200c>=0x0;_0x23200c--)(_0x3b4368=_0x248a24[_0x23200c])&&(_0x1b299d=_0x3b4368(_0x1b299d)||_0x1b299d);return _0x1b299d;},p=(_0xe9bd7a,_0x152668)=>(_0x1f70fb,_0x543d64)=>_0x152668(_0x1f70fb,_0x543d64,_0xe9bd7a);let _=class extends _0xacb343{constructor(_0x576436,_0x2718f0,_0x4149be,_0x31bf06){const _0x27725f=_0x35a1d4;super(),this['_commentService']=_0x576436,this['_threadCommentModel']=_0x2718f0,this[_0x27725f(0xbc)]=_0x4149be,this['_injector']=_0x31bf06,this[_0x27725f(0x98)](),this[_0x27725f(0x94)]();}[_0x35a1d4(0x94)](){const _0x74bc5d=_0x35a1d4;this[_0x74bc5d(0xe6)](this[_0x74bc5d(0xf0)][_0x74bc5d(0xe5)][_0x74bc5d(0xb6)](_0x4bd892(0x10))['subscribe'](_0x534b4b=>{const _0x1916c2=_0x74bc5d,_0x121af6=new Set();_0x534b4b[_0x1916c2(0xa1)](_0x58e66d=>{const _0x12efe0=_0x1916c2;switch(_0x58e66d[_0x12efe0(0xbe)]){case _0x12efe0(0xd9):{const _0x1e416f=_0x58e66d['payload'][_0x12efe0(0xc1)];_0x121af6['add'](_0x1e416f);break;}}}),B(this[_0x1916c2(0xec)],_0x121af6);}));}[_0x35a1d4(0x98)](){const _0x4c07d0=_0x35a1d4;this['disposeWithMe'](this[_0x4c07d0(0xd2)][_0x4c07d0(0xe5)][_0x4c07d0(0x92)](async _0x1cb16b=>{const _0x3c097c=_0x4c07d0;var _0x2db8cd,_0x478f80,_0x419b44,_0x3d6358;const _0x5c889f=(_0x2db8cd=this['_threadCommentModel'][_0x3c097c(0xdb)](_0x1cb16b[_0x3c097c(0xdc)])['find'](_0x5b86a8=>_0x5b86a8['threadId']===_0x1cb16b[_0x3c097c(0xc2)]))==null?void 0x0:_0x2db8cd[_0x3c097c(0xba)];if(!_0x5c889f)return;const {unitId:_0xcb196f,subUnitId:_0x5defad}=_0x5c889f;switch(_0x1cb16b['user']&&this[_0x3c097c(0xbc)][_0x3c097c(0xe3)](_0x1cb16b['user']),_0x1cb16b[_0x3c097c(0xbe)]){case v['Add']:break;case v[_0x3c097c(0xd4)]:{this[_0x3c097c(0xf0)]['addComment'](_0xcb196f,_0x5defad,{'unitId':_0xcb196f,'subUnitId':_0x5defad,'ref':'','id':_0x1cb16b['replyId'],'dT':y(+_0x1cb16b[_0x3c097c(0xdf)]),'threadId':_0x1cb16b[_0x3c097c(0xc2)],'personId':(_0x419b44=(_0x478f80=_0x1cb16b[_0x3c097c(0xcc)])==null?void 0x0:_0x478f80[_0x3c097c(0xf2)])!=null?_0x419b44:_0x1cb16b[_0x3c097c(0xc7)],'text':JSON[_0x3c097c(0x93)](_0x1cb16b[_0x3c097c(0xa0)]),'parentId':_0x5c889f['id']});break;}case v[_0x3c097c(0xb2)]:{const _0x1aa9cf=this[_0x3c097c(0xf0)]['getComment'](_0xcb196f,_0x5defad,_0x1cb16b[_0x3c097c(0xa8)]);_0x1aa9cf&&_0x1aa9cf[_0x3c097c(0xed)]&&this[_0x3c097c(0xf0)][_0x3c097c(0xd6)](_0xcb196f,_0x5defad,_0x1cb16b[_0x3c097c(0xa8)]);break;}case v[_0x3c097c(0xc8)]:{this['_threadCommentModel']['updateComment'](_0xcb196f,_0x5defad,{'commentId':_0x1cb16b[_0x3c097c(0xa8)],'text':JSON[_0x3c097c(0x93)](_0x1cb16b['content'])});break;}case v[_0x3c097c(0xaf)]:{const _0x2049e2=(_0x3d6358=this[_0x3c097c(0xf0)][_0x3c097c(0xdb)](_0x1cb16b['unitId'])[_0x3c097c(0xc3)](_0x138b34=>_0x138b34['threadId']===_0x1cb16b['threadId']))==null?void 0x0:_0x3d6358[_0x3c097c(0xba)];_0x2049e2&&this[_0x3c097c(0xf0)]['resolveComment'](_0xcb196f,_0x5defad,_0x2049e2['id'],_0x1cb16b[_0x3c097c(0xd1)]===I[_0x3c097c(0xa7)]);break;}}}));}};_=V([p(0x0,_0x568319(_0x57b718)),p(0x1,_0x568319(_0x59aefc)),p(0x2,_0x568319(_0x104e56)),p(0x3,_0x568319(_0x5710e7))],_);const z=_0x35a1d4(0xb9),O={};var k=Object[_0x35a1d4(0xac)],Q=(_0x103a5f,_0x4fb6d6,_0x29bb89,_0x3868fc)=>{for(var _0x349259=_0x3868fc>0x1?void 0x0:_0x3868fc?k(_0x4fb6d6,_0x29bb89):_0x4fb6d6,_0x52e029=_0x103a5f['length']-0x1,_0x5efa3c;_0x52e029>=0x0;_0x52e029--)(_0x5efa3c=_0x103a5f[_0x52e029])&&(_0x349259=_0x5efa3c(_0x349259)||_0x349259);return _0x349259;},b=(_0x748b5b,_0x2388f2)=>(_0xeda274,_0x4ac3ef)=>_0x2388f2(_0xeda274,_0x4ac3ef,_0x748b5b);function _0x2b72(){const _0x246614=['/delete','_threadCommentDataSource','filter','9EtYIMz','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','parse','_initUserSync','UNRECOGNIZED','onReady','getUser','_init','length','_threadCommentDataSourceService','/universer-api/user/list','symbol','1374ZSHgVz','YYYY/MM/DD\x20HH:mm','addComment','content','forEach','OpenOrReOpen','get','/reply','rangeId','/universer-api/comment/unit/','Solved','replyId','stringify','rangeType','reply','getOwnPropertyDescriptor','setConfig','customRanges','Solve','143451iTAUOR','_httpService','Delete','post','format','saveCommentToSnapshot','pipe','UNIVER_UNKNOWN','defineProperty','thread-comment-data-source.config','root','getMemberID','_userService','9640610VDqTnD','type','18775MpIcAp','ref','personId','threadId','find','requireSession','comments','4OQVRKW','userId','Edit','dataSource','resolved','_sessionService','user','/edit','listComments','size','code','solved','_commentService','syncUpdateMutationToColla','Reply','Add','deleteComment','/list','/add','add','_configService','getUnit','unitId','19226kishrT','pluginName','createTimestamp','users','7297144nTxfhI','COMMENT','addUser','comment','commentUpdate$','disposeWithMe','_initDataSource','map','4fRQqqS','body','5427254xlyzCf','_injector','parentId','Unknown','1488RZJrkK','_threadCommentModel','error','userID','1862436SeumzB'];_0x2b72=function(){return _0x246614;};return _0x2b72();}function X(_0x519930,_0x12d8ad){const _0x35e14f=_0x35a1d4,_0x25899a=_0x519930['replies'][0x0];return{..._0x12d8ad,'id':_0x25899a[_0x35e14f(0xa8)],'resolved':_0x519930[_0x35e14f(0xd1)]===0x1,'dT':y(_0x25899a[_0x35e14f(0xdf)]),'personId':_0x25899a['userId'],'threadId':_0x25899a['threadId']};}function ee(_0x2305a0,_0x48400e,_0x1fda8d){const _0x11c244=_0x35a1d4;var _0x4a490b,_0x223f5e;if(((_0x223f5e=(_0x4a490b=_0x2305a0==null?void 0x0:_0x2305a0['replies'])==null?void 0x0:_0x4a490b[_0x11c244(0x99)])!=null?_0x223f5e:0x0)>0x0){const _0x2503ee=(_0x4abf93,_0x218f10)=>({'id':_0x4abf93[_0x11c244(0xa8)],'threadId':_0x4abf93[_0x11c244(0xc2)],'dT':y(_0x4abf93[_0x11c244(0xdf)]),'personId':_0x4abf93[_0x11c244(0xc7)],'resolved':_0x2305a0[_0x11c244(0xd1)]===I['Solved'],'unitId':_0x48400e,'subUnitId':_0x1fda8d,'text':JSON[_0x11c244(0x93)](_0x4abf93['content']),'parentId':_0x218f10}),_0x19bf52=_0x2503ee(_0x2305a0['replies'][0x0]);return{..._0x19bf52,'children':_0x2305a0['replies']['slice'](0x1)[_0x11c244(0xe8)](_0x5074a7=>_0x2503ee(_0x5074a7,_0x19bf52['id']))};}return null;}let S=class{constructor(_0x3a49ae,_0x169264,_0x2d1b80){const _0x470caf=_0x35a1d4;this[_0x470caf(0xb1)]=_0x3a49ae,this[_0x470caf(0xbc)]=_0x169264,this['_sessionService']=_0x2d1b80;}async[_0x35a1d4(0x9f)](_0x5cc68c){const _0x229205=_0x35a1d4;var _0x35c9c4,_0x33eee7;const {parentId:_0x30c06c,unitId:_0x28c657,text:_0x157728,threadId:_0x54cb36}=_0x5cc68c,_0x24e640=(_0x33eee7=(_0x35c9c4=_0x157728[_0x229205(0xae)])==null?void 0x0:_0x35c9c4[_0x229205(0x8f)](_0x5885c3=>_0x5885c3[_0x229205(0xaa)]===_0x228e02[_0x229205(0xe2)])['map'](_0x1f4ee8=>_0x1f4ee8[_0x229205(0xa5)]))!=null?_0x33eee7:[],_0x100776=JSON[_0x229205(0xa9)](_0x157728),_0x37a1dd=(await this[_0x229205(0xcb)][_0x229205(0xc4)](_0x28c657))['getMemberID']();if(_0x30c06c){const _0x56bcc3={'memberId':_0x37a1dd,'unitId':_0x28c657,'content':_0x100776,'mention':_0x24e640,'threadId':_0x54cb36},_0x1edd0a=(await this['_httpService'][_0x229205(0xb3)](_0x229205(0xa6)+_0x28c657+_0x229205(0xa4),{'body':_0x56bcc3}))['body'][_0x229205(0xab)];return{..._0x5cc68c,'id':_0x1edd0a[_0x229205(0xa8)],'dT':_0x5eed82(+_0x1edd0a[_0x229205(0xdf)])[_0x229205(0xb4)](_0x229205(0x9e)),'personId':_0x1edd0a[_0x229205(0xc7)]};}else{const _0x57dbe7={'memberId':_0x37a1dd,'unitId':_0x28c657,'content':_0x100776,'mention':_0x24e640},_0x25c7fb=await this[_0x229205(0xb1)][_0x229205(0xb3)](_0x229205(0xa6)+_0x28c657+_0x229205(0xd8),{'body':_0x57dbe7});return X(_0x25c7fb[_0x229205(0xea)][_0x229205(0xe4)],_0x5cc68c);}}async['updateComment'](_0x5dc479){const _0x2c587a=_0x35a1d4;var _0x5248fe,_0x25bf8c;const {text:_0x2562d6,unitId:_0x40f509}=_0x5dc479,_0x8c32d6=(_0x25bf8c=(_0x5248fe=_0x2562d6['customRanges'])==null?void 0x0:_0x5248fe['filter'](_0x558266=>_0x558266[_0x2c587a(0xaa)]===_0x228e02[_0x2c587a(0xe2)])[_0x2c587a(0xe8)](_0x2a472f=>_0x2a472f[_0x2c587a(0xa5)]))!=null?_0x25bf8c:[],_0x327578=JSON[_0x2c587a(0xa9)](_0x2562d6),_0x10c9e3=_0x5dc479[_0x2c587a(0xc2)],_0x48f001=_0x5dc479['id'],_0x35d3fd={'memberId':(await this['_sessionService'][_0x2c587a(0xc4)](_0x40f509))[_0x2c587a(0xbb)](),'unitId':_0x40f509,'threadId':_0x10c9e3,'mention':_0x8c32d6,'content':_0x327578,'replyId':_0x48f001},_0x28b562=await this['_httpService'][_0x2c587a(0xb3)](_0x2c587a(0xa6)+_0x40f509+_0x2c587a(0xcd),{'body':_0x35d3fd});return!_0x28b562[_0x2c587a(0xea)][_0x2c587a(0xf1)]||_0x28b562[_0x2c587a(0xea)]['error'][_0x2c587a(0xd0)]===0x1;}async['resolveComment'](_0x3de4ce){const _0x2da0d3=_0x35a1d4,{unitId:_0x1212a9}=_0x3de4ce,_0x4da36e=_0x3de4ce[_0x2da0d3(0xc2)],_0x5049e7={'memberId':this[_0x2da0d3(0xbc)]['getCurrentUser']()['userID'],'unitId':_0x1212a9,'threadId':_0x4da36e,'solved':_0x3de4ce[_0x2da0d3(0xca)]?I[_0x2da0d3(0xa7)]:I['OpenOrReOpen']},_0x4934f0=await this[_0x2da0d3(0xb1)][_0x2da0d3(0xb3)](_0x2da0d3(0xa6)+_0x1212a9+'/solved',{'body':_0x5049e7});return!_0x4934f0[_0x2da0d3(0xea)]['error']||_0x4934f0[_0x2da0d3(0xea)][_0x2da0d3(0xf1)][_0x2da0d3(0xd0)]===0x1;}async['deleteComment'](_0x27c585,_0x68030d,_0x12f87c,_0x4d6021){const _0x1cda9c=_0x35a1d4,_0x27f5e1={'memberId':(await this[_0x1cda9c(0xcb)][_0x1cda9c(0xc4)](_0x27c585))[_0x1cda9c(0xbb)](),'threadId':_0x12f87c,'replyId':_0x4d6021,'unitId':_0x27c585},_0x5efc0c=await this[_0x1cda9c(0xb1)]['post'](_0x1cda9c(0xa6)+_0x27c585+_0x1cda9c(0xf4),{'body':_0x27f5e1});return!_0x5efc0c[_0x1cda9c(0xea)][_0x1cda9c(0xf1)]||_0x5efc0c[_0x1cda9c(0xea)]['error']['code']===0x1;}async[_0x35a1d4(0xce)](_0x5a0527,_0x20ddce,_0x557567){const _0x44466e=_0x35a1d4,_0x2c2a62={'unitId':_0x5a0527,'threadId':_0x557567},_0x2c9ac2=await this[_0x44466e(0xb1)][_0x44466e(0xb3)](_0x44466e(0xa6)+_0x5a0527+_0x44466e(0xd7),{'body':_0x2c2a62}),_0x2eec90=_0x557567[_0x44466e(0xe8)](_0x9e07a7=>ee(_0x2c9ac2[_0x44466e(0xea)][_0x44466e(0xc5)][_0x9e07a7],_0x5a0527,_0x20ddce))['filter'](Boolean);return Object['values'](_0x2c9ac2['body'][_0x44466e(0xe0)])[_0x44466e(0xa1)](_0xe1388b=>{const _0x2f7030=_0x44466e;this[_0x2f7030(0xbc)][_0x2f7030(0xe3)](_0xe1388b);}),_0x2eec90;}[_0x35a1d4(0xb5)](_0x2cfdd1){const _0x28fa45=_0x35a1d4;return{'id':_0x2cfdd1['id'],'threadId':_0x2cfdd1['threadId'],'ref':_0x2cfdd1[_0x28fa45(0xc0)]};}};S=Q([b(0x0,_0x568319(_0x2e05a5)),b(0x1,_0x568319(_0x104e56)),b(0x2,_0x568319(_0x333ebf))],S);var re=Object[_0x35a1d4(0xac)],te=(_0x24a234,_0x569947,_0x1eadd9,_0x33713d)=>{const _0x47b595=_0x35a1d4;for(var _0x159440=_0x33713d>0x1?void 0x0:_0x33713d?re(_0x569947,_0x1eadd9):_0x569947,_0x47b3e9=_0x24a234[_0x47b595(0x99)]-0x1,_0x5088b9;_0x47b3e9>=0x0;_0x47b3e9--)(_0x5088b9=_0x24a234[_0x47b3e9])&&(_0x159440=_0x5088b9(_0x159440)||_0x159440);return _0x159440;},M=(_0x281b33,_0x25d9ed)=>(_0x3fda6b,_0x44ae4e)=>_0x25d9ed(_0x3fda6b,_0x44ae4e,_0x281b33);let f=class extends _0xacb343{constructor(_0x16ac65,_0x2820d3){const _0x4f2094=_0x35a1d4;super(),this[_0x4f2094(0x9a)]=_0x16ac65,this['_threadCommentDataSource']=_0x2820d3,this[_0x4f2094(0xe7)]();}[_0x35a1d4(0xe7)](){const _0x1b2b85=_0x35a1d4;this['_threadCommentDataSourceService'][_0x1b2b85(0xc9)]=this[_0x1b2b85(0xf5)],this[_0x1b2b85(0x9a)][_0x1b2b85(0xd3)]=!0x1;}};f=te([M(0x0,_0x1e6e5b),M(0x1,_0x568319(S))],f);var se=Object[_0x35a1d4(0xb8)],oe=Object[_0x35a1d4(0xac)],ne=(_0x13e5a4,_0x43e3ee,_0x5c4c9d)=>_0x43e3ee in _0x13e5a4?se(_0x13e5a4,_0x43e3ee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c4c9d}):_0x13e5a4[_0x43e3ee]=_0x5c4c9d,ie=(_0x1395d2,_0x37448f,_0x2ec810,_0x18cb0f)=>{const _0x2dd999=_0x35a1d4;for(var _0x3131ac=_0x18cb0f>0x1?void 0x0:_0x18cb0f?oe(_0x37448f,_0x2ec810):_0x37448f,_0x564a35=_0x1395d2[_0x2dd999(0x99)]-0x1,_0x4114e0;_0x564a35>=0x0;_0x564a35--)(_0x4114e0=_0x1395d2[_0x564a35])&&(_0x3131ac=_0x4114e0(_0x3131ac)||_0x3131ac);return _0x3131ac;},N=(_0x58d5f1,_0x16c8d5)=>(_0x45c77b,_0x5ba941)=>_0x16c8d5(_0x45c77b,_0x5ba941,_0x58d5f1),$=(_0x5db7cc,_0x237fd5,_0xc25b5a)=>ne(_0x5db7cc,typeof _0x237fd5!=_0x35a1d4(0x9c)?_0x237fd5+'':_0x237fd5,_0xc25b5a);let g=class extends _0x46fdf3{constructor(_0x39b1bd=O,_0x32b609,_0x572c09){const _0x196965=_0x35a1d4;super(),this['_config']=_0x39b1bd,this['_injector']=_0x32b609,this[_0x196965(0xda)]=_0x572c09;const {..._0x2a2787}=_0x577e8b({},O,this['_config']);this[_0x196965(0xda)][_0x196965(0xad)](z,_0x2a2787);}['onStarting'](){const _0x36fea8=_0x35a1d4;[[S],[f],[_]][_0x36fea8(0xa1)](_0x69b35f=>{const _0x2c7cb6=_0x36fea8;this[_0x2c7cb6(0xec)][_0x2c7cb6(0xd9)](_0x69b35f);});}[_0x35a1d4(0x96)](){const _0xe4235e=_0x35a1d4;this[_0xe4235e(0xec)][_0xe4235e(0xa3)](f),this[_0xe4235e(0xec)]['get'](_);}};$(g,_0x35a1d4(0xde),W),$(g,_0x35a1d4(0xbe),_0x505f7d[_0x35a1d4(0xb7)]),g=ie([_0x54f3d1(_0x2aaa9d,_0x27c89b,_0x32bd05),N(0x1,_0x568319(_0x5710e7)),N(0x2,_0x241ad2)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0xf2dd0a=_0x4f80;(function(_0x5d3492,_0x139a0a){const _0x1ac33b=_0x4f80,_0x30b8ca=_0x5d3492();while(!![]){try{const _0x5da65c=parseInt(_0x1ac33b(0x14a))/0x1+parseInt(_0x1ac33b(0x177))/0x2*(parseInt(_0x1ac33b(0x12d))/0x3)+parseInt(_0x1ac33b(0x12c))/0x4*(-parseInt(_0x1ac33b(0x18d))/0x5)+parseInt(_0x1ac33b(0x188))/0x6+-parseInt(_0x1ac33b(0x132))/0x7+-parseInt(_0x1ac33b(0x15b))/0x8*(-parseInt(_0x1ac33b(0x129))/0x9)+-parseInt(_0x1ac33b(0x150))/0xa;if(_0x5da65c===_0x139a0a)break;else _0x30b8ca['push'](_0x30b8ca['shift']());}catch(_0x19890a){_0x30b8ca['push'](_0x30b8ca['shift']());}}}(_0x20b3,0xba5e8));import{CommentService as _0x27ef41,CollaborationSessionService as _0x408cc2,UniverCollaborationClientPlugin as _0x4d714d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xf62078}from'@univerjs-pro/license';import{dayjs as _0x3296f5,UserManagerService as _0x1a82c8,Inject as _0x2a723d,Injector as _0x48547d,Disposable as _0x5f0700,CustomRangeType as _0x8aea36,UniverInstanceType as _0x561314,DependentOn as _0xd6cc24,IConfigService as _0x3fbe75,Plugin as _0xa37bcf,merge as _0x3de015}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x55c17b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x378e1d,IThreadCommentDataSourceService as _0x2bb3bb}from'@univerjs/thread-comment';import{bufferTime as _0x2eb9bc}from'rxjs';import{HTTPService as _0x105545}from'@univerjs/network';const W=_0xf2dd0a(0x169);var I=(_0x3f38d7=>(_0x3f38d7[_0x3f38d7[_0xf2dd0a(0x12b)]=0x0]=_0xf2dd0a(0x12b),_0x3f38d7[_0x3f38d7[_0xf2dd0a(0x181)]=0x1]=_0xf2dd0a(0x181),_0x3f38d7[_0x3f38d7['UNRECOGNIZED']=-0x1]=_0xf2dd0a(0x18b),_0x3f38d7))(I||{}),v=(_0x74bc2e=>(_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x154)]=0x0]=_0xf2dd0a(0x154),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x161)]=0x1]=_0xf2dd0a(0x161),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x149)]=0x2]=_0xf2dd0a(0x149),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x156)]=0x3]='Edit',_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x139)]=0x4]='Delete',_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x158)]=0x5]=_0xf2dd0a(0x158),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x18b)]=-0x1]=_0xf2dd0a(0x18b),_0x74bc2e))(v||{});const y=_0x4ff9da=>_0x3296f5(new Date(+_0x4ff9da))[_0xf2dd0a(0x128)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x14f257,_0x1663fb)=>{const _0x2ed6f0=_0xf2dd0a,_0x60d12b=_0x14f257['get'](_0x1a82c8),_0x29195a=_0x14f257[_0x2ed6f0(0x130)](_0x105545);_0x1663fb[_0x2ed6f0(0x144)](_0x2167d6=>{const _0x2554c1=_0x2ed6f0;_0x60d12b['getUser'](_0x2167d6)&&_0x1663fb[_0x2554c1(0x14e)](_0x2167d6);}),_0x1663fb[_0x2ed6f0(0x17a)]&&(await _0x29195a['get'](_0x2ed6f0(0x141),{'params':{'userIDs':[..._0x1663fb]}}))[_0x2ed6f0(0x16c)]['users'][_0x2ed6f0(0x144)](_0x349ba6=>{const _0x328932=_0x2ed6f0;_0x349ba6&&_0x60d12b[_0x328932(0x164)](_0x349ba6);});};var K=Object[_0xf2dd0a(0x180)],V=(_0xf6bd97,_0x2acb42,_0x581d3a,_0x29947b)=>{const _0x3894b9=_0xf2dd0a;for(var _0x34f9cf=_0x29947b>0x1?void 0x0:_0x29947b?K(_0x2acb42,_0x581d3a):_0x2acb42,_0x12e167=_0xf6bd97[_0x3894b9(0x13e)]-0x1,_0x3fd1bb;_0x12e167>=0x0;_0x12e167--)(_0x3fd1bb=_0xf6bd97[_0x12e167])&&(_0x34f9cf=_0x3fd1bb(_0x34f9cf)||_0x34f9cf);return _0x34f9cf;},p=(_0x324197,_0x11351c)=>(_0x32dd4f,_0x173b14)=>_0x11351c(_0x32dd4f,_0x173b14,_0x324197);let _=class extends _0x5f0700{constructor(_0x16e83d,_0x12f3ff,_0x97344f,_0x1e96e3){const _0x4546ac=_0xf2dd0a;super(),this['_commentService']=_0x16e83d,this[_0x4546ac(0x165)]=_0x12f3ff,this[_0x4546ac(0x171)]=_0x97344f,this[_0x4546ac(0x14b)]=_0x1e96e3,this[_0x4546ac(0x138)](),this[_0x4546ac(0x17d)]();}[_0xf2dd0a(0x17d)](){const _0x354784=_0xf2dd0a;this[_0x354784(0x16b)](this[_0x354784(0x165)][_0x354784(0x187)]['pipe'](_0x2eb9bc(0x10))[_0x354784(0x145)](_0x41dd81=>{const _0x576917=_0x354784,_0x23ccf9=new Set();_0x41dd81[_0x576917(0x144)](_0x164fff=>{const _0x29e8c9=_0x576917;switch(_0x164fff[_0x29e8c9(0x137)]){case'add':{const _0x591f11=_0x164fff['payload'][_0x29e8c9(0x189)];_0x23ccf9['add'](_0x591f11);break;}}}),B(this[_0x576917(0x14b)],_0x23ccf9);}));}[_0xf2dd0a(0x138)](){const _0x40ac59=_0xf2dd0a;this[_0x40ac59(0x16b)](this[_0x40ac59(0x16a)][_0x40ac59(0x187)][_0x40ac59(0x145)](async _0xb6794c=>{const _0x3dbbcb=_0x40ac59;var _0x5a9004,_0x5d7313,_0x2f6c21,_0x514210;const _0x13ceed=(_0x5a9004=this[_0x3dbbcb(0x165)][_0x3dbbcb(0x13d)](_0xb6794c[_0x3dbbcb(0x172)])[_0x3dbbcb(0x135)](_0x20214e=>_0x20214e['threadId']===_0xb6794c[_0x3dbbcb(0x184)]))==null?void 0x0:_0x5a9004[_0x3dbbcb(0x151)];if(!_0x13ceed)return;const {unitId:_0xc065bf,subUnitId:_0x425db2}=_0x13ceed;switch(_0xb6794c[_0x3dbbcb(0x17f)]&&this[_0x3dbbcb(0x171)][_0x3dbbcb(0x164)](_0xb6794c[_0x3dbbcb(0x17f)]),_0xb6794c[_0x3dbbcb(0x137)]){case v[_0x3dbbcb(0x161)]:break;case v[_0x3dbbcb(0x149)]:{this[_0x3dbbcb(0x165)]['addComment'](_0xc065bf,_0x425db2,{'unitId':_0xc065bf,'subUnitId':_0x425db2,'ref':'','id':_0xb6794c[_0x3dbbcb(0x18a)],'dT':y(+_0xb6794c['createTimestamp']),'threadId':_0xb6794c[_0x3dbbcb(0x184)],'personId':(_0x2f6c21=(_0x5d7313=_0xb6794c[_0x3dbbcb(0x17f)])==null?void 0x0:_0x5d7313[_0x3dbbcb(0x152)])!=null?_0x2f6c21:_0xb6794c['userId'],'text':JSON[_0x3dbbcb(0x18c)](_0xb6794c[_0x3dbbcb(0x143)]),'parentId':_0x13ceed['id']});break;}case v[_0x3dbbcb(0x139)]:{const _0x48c22d=this[_0x3dbbcb(0x165)][_0x3dbbcb(0x142)](_0xc065bf,_0x425db2,_0xb6794c[_0x3dbbcb(0x18a)]);_0x48c22d&&_0x48c22d[_0x3dbbcb(0x146)]&&this['_threadCommentModel'][_0x3dbbcb(0x13b)](_0xc065bf,_0x425db2,_0xb6794c[_0x3dbbcb(0x18a)]);break;}case v[_0x3dbbcb(0x156)]:{this[_0x3dbbcb(0x165)][_0x3dbbcb(0x131)](_0xc065bf,_0x425db2,{'commentId':_0xb6794c[_0x3dbbcb(0x18a)],'text':JSON['parse'](_0xb6794c[_0x3dbbcb(0x143)])});break;}case v[_0x3dbbcb(0x158)]:{const _0x402136=(_0x514210=this['_threadCommentModel']['getUnit'](_0xb6794c[_0x3dbbcb(0x172)])['find'](_0x31de39=>_0x31de39[_0x3dbbcb(0x184)]===_0xb6794c[_0x3dbbcb(0x184)]))==null?void 0x0:_0x514210['root'];_0x402136&&this[_0x3dbbcb(0x165)][_0x3dbbcb(0x167)](_0xc065bf,_0x425db2,_0x402136['id'],_0xb6794c[_0x3dbbcb(0x14c)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x2a723d(_0x27ef41)),p(0x1,_0x2a723d(_0x378e1d)),p(0x2,_0x2a723d(_0x1a82c8)),p(0x3,_0x2a723d(_0x48547d))],_);const z=_0xf2dd0a(0x16f),O={};var k=Object[_0xf2dd0a(0x180)],Q=(_0x121ad6,_0x2099aa,_0xbb3d2b,_0x5ca734)=>{for(var _0xda0bf6=_0x5ca734>0x1?void 0x0:_0x5ca734?k(_0x2099aa,_0xbb3d2b):_0x2099aa,_0xc12bea=_0x121ad6['length']-0x1,_0x3815eb;_0xc12bea>=0x0;_0xc12bea--)(_0x3815eb=_0x121ad6[_0xc12bea])&&(_0xda0bf6=_0x3815eb(_0xda0bf6)||_0xda0bf6);return _0xda0bf6;},b=(_0x18125b,_0x4381de)=>(_0x5a6f9f,_0x387ab5)=>_0x4381de(_0x5a6f9f,_0x387ab5,_0x18125b);function _0x20b3(){const _0xc2e80c=['/delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','disposeWithMe','body','UNIVER_UNKNOWN','filter','thread-comment-data-source.config','slice','_userService','unitId','_httpService','COMMENT','getCurrentUser','onStarting','2gcrWcU','/reply','_config','size','comment','_configService','_initUserSync','defineProperty','user','getOwnPropertyDescriptor','Solved','addComment','YYYY/MM/DD\x20HH:mm','threadId','/add','customRanges','commentUpdate$','6815640KPJKBg','personId','replyId','UNRECOGNIZED','parse','4170XRqfsC','_sessionService','format','2670363FDClmw','users','OpenOrReOpen','6712swSIDj','2582373JjyrMK','add','listComments','get','updateComment','9569280BVbtga','map','requireSession','find','/universer-api/comment/unit/','type','_init','Delete','rangeType','deleteComment','getMemberID','getUnit','length','syncUpdateMutationToColla','_threadCommentDataSourceService','/universer-api/user/list','getComment','content','forEach','subscribe','parentId','/list','/edit','Reply','236418JBsXCB','_injector','solved','error','delete','post','1868240HNBtQJ','root','userID','setConfig','Unknown','_threadCommentDataSource','Edit','resolved','Solve','stringify','replies','40iIaDqq','symbol','reply','userId','rangeId','dataSource','Add','_initDataSource','code','addUser','_threadCommentModel','createTimestamp','resolveComment'];_0x20b3=function(){return _0xc2e80c;};return _0x20b3();}function X(_0x36dd8f,_0x43caab){const _0x1f2558=_0xf2dd0a,_0x53c775=_0x36dd8f[_0x1f2558(0x15a)][0x0];return{..._0x43caab,'id':_0x53c775['replyId'],'resolved':_0x36dd8f[_0x1f2558(0x14c)]===0x1,'dT':y(_0x53c775[_0x1f2558(0x166)]),'personId':_0x53c775[_0x1f2558(0x15e)],'threadId':_0x53c775[_0x1f2558(0x184)]};}function ee(_0x2f6674,_0x5b0134,_0x1ad43c){const _0x398fd6=_0xf2dd0a;var _0x52f95a,_0x5d1eae;if(((_0x5d1eae=(_0x52f95a=_0x2f6674==null?void 0x0:_0x2f6674[_0x398fd6(0x15a)])==null?void 0x0:_0x52f95a[_0x398fd6(0x13e)])!=null?_0x5d1eae:0x0)>0x0){const _0x422ddf=(_0x15657c,_0x1c9cbf)=>({'id':_0x15657c[_0x398fd6(0x18a)],'threadId':_0x15657c[_0x398fd6(0x184)],'dT':y(_0x15657c[_0x398fd6(0x166)]),'personId':_0x15657c[_0x398fd6(0x15e)],'resolved':_0x2f6674[_0x398fd6(0x14c)]===I[_0x398fd6(0x181)],'unitId':_0x5b0134,'subUnitId':_0x1ad43c,'text':JSON[_0x398fd6(0x18c)](_0x15657c[_0x398fd6(0x143)]),'parentId':_0x1c9cbf}),_0x542975=_0x422ddf(_0x2f6674[_0x398fd6(0x15a)][0x0]);return{..._0x542975,'children':_0x2f6674[_0x398fd6(0x15a)][_0x398fd6(0x170)](0x1)[_0x398fd6(0x133)](_0x4ed855=>_0x422ddf(_0x4ed855,_0x542975['id']))};}return null;}let S=class{constructor(_0x501c85,_0x9778bf,_0x4a0706){const _0x488c6e=_0xf2dd0a;this['_httpService']=_0x501c85,this[_0x488c6e(0x171)]=_0x9778bf,this[_0x488c6e(0x18e)]=_0x4a0706;}async[_0xf2dd0a(0x182)](_0x22fe1d){const _0x32a6be=_0xf2dd0a;var _0x225ad7,_0x82421;const {parentId:_0x329542,unitId:_0x38cbfc,text:_0x1c6112,threadId:_0x5ebdb5}=_0x22fe1d,_0x7157e3=(_0x82421=(_0x225ad7=_0x1c6112[_0x32a6be(0x186)])==null?void 0x0:_0x225ad7[_0x32a6be(0x16e)](_0x233b9f=>_0x233b9f[_0x32a6be(0x13a)]===_0x8aea36[_0x32a6be(0x174)])[_0x32a6be(0x133)](_0x20329a=>_0x20329a['rangeId']))!=null?_0x82421:[],_0xc8c301=JSON[_0x32a6be(0x159)](_0x1c6112),_0x1196e2=(await this[_0x32a6be(0x18e)][_0x32a6be(0x134)](_0x38cbfc))[_0x32a6be(0x13c)]();if(_0x329542){const _0x1712f0={'memberId':_0x1196e2,'unitId':_0x38cbfc,'content':_0xc8c301,'mention':_0x7157e3,'threadId':_0x5ebdb5},_0x5a8480=(await this['_httpService']['post'](_0x32a6be(0x136)+_0x38cbfc+_0x32a6be(0x178),{'body':_0x1712f0}))[_0x32a6be(0x16c)][_0x32a6be(0x15d)];return{..._0x22fe1d,'id':_0x5a8480[_0x32a6be(0x18a)],'dT':_0x3296f5(+_0x5a8480[_0x32a6be(0x166)])[_0x32a6be(0x128)](_0x32a6be(0x183)),'personId':_0x5a8480['userId']};}else{const _0x25f543={'memberId':_0x1196e2,'unitId':_0x38cbfc,'content':_0xc8c301,'mention':_0x7157e3},_0x18f544=await this[_0x32a6be(0x173)][_0x32a6be(0x14f)](_0x32a6be(0x136)+_0x38cbfc+_0x32a6be(0x185),{'body':_0x25f543});return X(_0x18f544['body'][_0x32a6be(0x17b)],_0x22fe1d);}}async[_0xf2dd0a(0x131)](_0x2b5516){const _0x281c01=_0xf2dd0a;var _0x4c9901,_0x31daf5;const {text:_0x1eabcf,unitId:_0xf44fcc}=_0x2b5516,_0x3da96a=(_0x31daf5=(_0x4c9901=_0x1eabcf['customRanges'])==null?void 0x0:_0x4c9901['filter'](_0x34afb5=>_0x34afb5[_0x281c01(0x13a)]===_0x8aea36[_0x281c01(0x174)])[_0x281c01(0x133)](_0x45002d=>_0x45002d[_0x281c01(0x15f)]))!=null?_0x31daf5:[],_0xc320be=JSON[_0x281c01(0x159)](_0x1eabcf),_0x340380=_0x2b5516[_0x281c01(0x184)],_0x375d5b=_0x2b5516['id'],_0x431709={'memberId':(await this[_0x281c01(0x18e)]['requireSession'](_0xf44fcc))[_0x281c01(0x13c)](),'unitId':_0xf44fcc,'threadId':_0x340380,'mention':_0x3da96a,'content':_0xc320be,'replyId':_0x375d5b},_0x48a4b2=await this[_0x281c01(0x173)][_0x281c01(0x14f)]('/universer-api/comment/unit/'+_0xf44fcc+_0x281c01(0x148),{'body':_0x431709});return!_0x48a4b2[_0x281c01(0x16c)][_0x281c01(0x14d)]||_0x48a4b2[_0x281c01(0x16c)][_0x281c01(0x14d)][_0x281c01(0x163)]===0x1;}async[_0xf2dd0a(0x167)](_0x46894a){const _0x34faa1=_0xf2dd0a,{unitId:_0x28685f}=_0x46894a,_0x276e95=_0x46894a['threadId'],_0x1d22ef={'memberId':this[_0x34faa1(0x171)][_0x34faa1(0x175)]()[_0x34faa1(0x152)],'unitId':_0x28685f,'threadId':_0x276e95,'solved':_0x46894a[_0x34faa1(0x157)]?I[_0x34faa1(0x181)]:I[_0x34faa1(0x12b)]},_0x53a167=await this['_httpService'][_0x34faa1(0x14f)]('/universer-api/comment/unit/'+_0x28685f+'/solved',{'body':_0x1d22ef});return!_0x53a167[_0x34faa1(0x16c)][_0x34faa1(0x14d)]||_0x53a167[_0x34faa1(0x16c)]['error'][_0x34faa1(0x163)]===0x1;}async['deleteComment'](_0x5505fb,_0x2530ff,_0x581f06,_0x2ae049){const _0x208c41=_0xf2dd0a,_0x319a56={'memberId':(await this[_0x208c41(0x18e)]['requireSession'](_0x5505fb))[_0x208c41(0x13c)](),'threadId':_0x581f06,'replyId':_0x2ae049,'unitId':_0x5505fb},_0xe85e02=await this[_0x208c41(0x173)][_0x208c41(0x14f)](_0x208c41(0x136)+_0x5505fb+_0x208c41(0x168),{'body':_0x319a56});return!_0xe85e02[_0x208c41(0x16c)][_0x208c41(0x14d)]||_0xe85e02[_0x208c41(0x16c)][_0x208c41(0x14d)][_0x208c41(0x163)]===0x1;}async[_0xf2dd0a(0x12f)](_0x4e2784,_0x34788e,_0x139f5f){const _0x3cc636=_0xf2dd0a,_0x44bac9={'unitId':_0x4e2784,'threadId':_0x139f5f},_0x11cb45=await this['_httpService'][_0x3cc636(0x14f)](_0x3cc636(0x136)+_0x4e2784+_0x3cc636(0x147),{'body':_0x44bac9}),_0x4a706f=_0x139f5f[_0x3cc636(0x133)](_0x516815=>ee(_0x11cb45['body']['comments'][_0x516815],_0x4e2784,_0x34788e))['filter'](Boolean);return Object['values'](_0x11cb45[_0x3cc636(0x16c)][_0x3cc636(0x12a)])[_0x3cc636(0x144)](_0x407cfd=>{this['_userService']['addUser'](_0x407cfd);}),_0x4a706f;}['saveCommentToSnapshot'](_0x111ede){const _0x42ff2f=_0xf2dd0a;return{'id':_0x111ede['id'],'threadId':_0x111ede[_0x42ff2f(0x184)],'ref':_0x111ede['ref']};}};function _0x4f80(_0xafa963,_0x53b3ab){const _0x20b31c=_0x20b3();return _0x4f80=function(_0x4f8050,_0x2f83d0){_0x4f8050=_0x4f8050-0x128;let _0x267939=_0x20b31c[_0x4f8050];return _0x267939;},_0x4f80(_0xafa963,_0x53b3ab);}S=Q([b(0x0,_0x2a723d(_0x105545)),b(0x1,_0x2a723d(_0x1a82c8)),b(0x2,_0x2a723d(_0x408cc2))],S);var re=Object[_0xf2dd0a(0x180)],te=(_0xb5e824,_0xa391bc,_0x1e4e99,_0x394c85)=>{const _0x3d1b5b=_0xf2dd0a;for(var _0x4b4688=_0x394c85>0x1?void 0x0:_0x394c85?re(_0xa391bc,_0x1e4e99):_0xa391bc,_0x383471=_0xb5e824[_0x3d1b5b(0x13e)]-0x1,_0x4c51b7;_0x383471>=0x0;_0x383471--)(_0x4c51b7=_0xb5e824[_0x383471])&&(_0x4b4688=_0x4c51b7(_0x4b4688)||_0x4b4688);return _0x4b4688;},M=(_0x2c2d19,_0x9fcb9f)=>(_0x3620cf,_0x100100)=>_0x9fcb9f(_0x3620cf,_0x100100,_0x2c2d19);let f=class extends _0x5f0700{constructor(_0xea660f,_0x175171){const _0x12490e=_0xf2dd0a;super(),this[_0x12490e(0x140)]=_0xea660f,this[_0x12490e(0x155)]=_0x175171,this['_initDataSource']();}[_0xf2dd0a(0x162)](){const _0x1fd6d0=_0xf2dd0a;this[_0x1fd6d0(0x140)][_0x1fd6d0(0x160)]=this[_0x1fd6d0(0x155)],this['_threadCommentDataSourceService'][_0x1fd6d0(0x13f)]=!0x1;}};f=te([M(0x0,_0x2bb3bb),M(0x1,_0x2a723d(S))],f);var se=Object[_0xf2dd0a(0x17e)],oe=Object[_0xf2dd0a(0x180)],ne=(_0x5df8ae,_0x1cd5b7,_0x5911ff)=>_0x1cd5b7 in _0x5df8ae?se(_0x5df8ae,_0x1cd5b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5911ff}):_0x5df8ae[_0x1cd5b7]=_0x5911ff,ie=(_0x53b488,_0x53832f,_0x1aa73f,_0x1aa272)=>{const _0x3b3a05=_0xf2dd0a;for(var _0x132eeb=_0x1aa272>0x1?void 0x0:_0x1aa272?oe(_0x53832f,_0x1aa73f):_0x53832f,_0x5ef4a7=_0x53b488[_0x3b3a05(0x13e)]-0x1,_0x247717;_0x5ef4a7>=0x0;_0x5ef4a7--)(_0x247717=_0x53b488[_0x5ef4a7])&&(_0x132eeb=_0x247717(_0x132eeb)||_0x132eeb);return _0x132eeb;},N=(_0x2fee8f,_0x318ed6)=>(_0x37d2ba,_0x2224df)=>_0x318ed6(_0x37d2ba,_0x2224df,_0x2fee8f),$=(_0x3df332,_0x5200d7,_0xdef899)=>ne(_0x3df332,typeof _0x5200d7!=_0xf2dd0a(0x15c)?_0x5200d7+'':_0x5200d7,_0xdef899);let g=class extends _0xa37bcf{constructor(_0x12010b=O,_0x21ffe7,_0x58d343){const _0x2a10bf=_0xf2dd0a;super(),this['_config']=_0x12010b,this['_injector']=_0x21ffe7,this[_0x2a10bf(0x17c)]=_0x58d343;const {..._0x37b03a}=_0x3de015({},O,this[_0x2a10bf(0x179)]);this['_configService'][_0x2a10bf(0x153)](z,_0x37b03a);}[_0xf2dd0a(0x176)](){const _0x464609=_0xf2dd0a;[[S],[f],[_]][_0x464609(0x144)](_0x35b556=>{const _0x3912a1=_0x464609;this['_injector'][_0x3912a1(0x12e)](_0x35b556);});}['onReady'](){const _0x55e5c8=_0xf2dd0a;this[_0x55e5c8(0x14b)]['get'](f),this[_0x55e5c8(0x14b)][_0x55e5c8(0x130)](_);}};$(g,'pluginName',W),$(g,_0xf2dd0a(0x137),_0x561314[_0xf2dd0a(0x16d)]),g=ie([_0xd6cc24(_0x55c17b,_0x4d714d,_0xf62078),N(0x1,_0x2a723d(_0x48547d)),N(0x2,_0x3fbe75)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0xc476(){const _0x529c11=['Solved','359895lMNRKv','comment','post','_configService','HTTPService','UniverCore','ref','COMMENT','replyId','map','function','Injector','@univerjs/network','dayjs','slice','format','disposeWithMe','root','reply','CollaborationSessionService','addUser','code','filter','add','Delete','exports','_commentService','error','symbol','delete','5170758jYcYic','personId','Unknown','11OLwFjr','/universer-api/user/list','rangeId','user','amd','comments','994995rcyiDm','stringify','UniverCollaborationClientPlugin','IThreadCommentDataSourceService','UNRECOGNIZED','pipe','@univerjs/thread-comment','_threadCommentDataSourceService','_userService','replies','customRanges','_init','userId','Module','forEach','@univerjs/core','payload','/universer-api/comment/unit/','parse','1864528KxNzww','type','users','_initDataSource','parentId','CustomRangeType','DependentOn','pluginName','threadId','defineProperty','merge','Add','getOwnPropertyDescriptor','length','size','5467700TRtfnB','toStringTag','rxjs','object','setConfig','getUnit','Edit','/solved','_sessionService','Disposable','_httpService','values','get','/add','UniverThreadCommentUi','19970570nRvqLm','_injector','ThreadCommentModel','find','userID','getComment','CommentService','3870324hpRuwN','resolved','Plugin','UniverProThreadCommentDatasource','YYYY/MM/DD\x20HH:mm','deleteComment','solved','UniverThreadComment','addComment','rangeType','Reply','OpenOrReOpen','commentUpdate$','UniverThreadCommentDataSourcePlugin','UniverNetwork','getMemberID','subscribe','content','_threadCommentModel','getUser','unitId','UniverProCollaborationClient','resolveComment','onReady','/delete','body','IConfigService','Solve','_initUserSync','UniverInstanceType','_threadCommentDataSource','UniverLicensePlugin','requireSession','@univerjs/thread-comment-ui','@univerjs-pro/collaboration-client','54fvkEMT','/edit','_config','UserManagerService','Inject','10xruOlO','createTimestamp','7eGvcAH','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/reply'];_0xc476=function(){return _0x529c11;};return _0xc476();}function _0x2f68(_0x271dbe,_0x25f33c){const _0xc4765=_0xc476();return _0x2f68=function(_0x2f6854,_0x5469bf){_0x2f6854=_0x2f6854-0x96;let _0x210980=_0xc4765[_0x2f6854];return _0x210980;},_0x2f68(_0x271dbe,_0x25f33c);}(function(_0xb87033,_0x2fb6a7){const _0x31b3f0=_0x2f68,_0x2181ed=_0xb87033();while(!![]){try{const _0x1dc901=parseInt(_0x31b3f0(0xd6))/0x1*(-parseInt(_0x31b3f0(0xcf))/0x2)+parseInt(_0x31b3f0(0xa7))/0x3+parseInt(_0x31b3f0(0x11f))/0x4+-parseInt(_0x31b3f0(0xfd))/0x5+-parseInt(_0x31b3f0(0xf4))/0x6*(-parseInt(_0x31b3f0(0xd1))/0x7)+-parseInt(_0x31b3f0(0x110))/0x8*(-parseInt(_0x31b3f0(0xca))/0x9)+-parseInt(_0x31b3f0(0xa0))/0xa*(parseInt(_0x31b3f0(0xf7))/0xb);if(_0x1dc901===_0x2fb6a7)break;else _0x2181ed['push'](_0x2181ed['shift']());}catch(_0xd37a1f){_0x2181ed['push'](_0x2181ed['shift']());}}}(_0xc476,0xe105b),function(_0x1c9d4d,_0x7f4872){const _0xb1b1e9=_0x2f68;typeof exports==_0xb1b1e9(0x122)&&typeof module<'u'?_0x7f4872(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==_0xb1b1e9(0xe0)&&define[_0xb1b1e9(0xfb)]?define([_0xb1b1e9(0xef),_0xb1b1e9(0xc9),'@univerjs-pro/license',_0xb1b1e9(0x10c),_0xb1b1e9(0xc8),_0xb1b1e9(0x103),_0xb1b1e9(0x121),_0xb1b1e9(0xe2)],_0x7f4872):(_0x1c9d4d=typeof globalThis<'u'?globalThis:_0x1c9d4d||self,_0x7f4872(_0x1c9d4d[_0xb1b1e9(0xaa)]={},_0x1c9d4d[_0xb1b1e9(0xbc)],_0x1c9d4d['UniverProLicense'],_0x1c9d4d[_0xb1b1e9(0xdb)],_0x1c9d4d[_0xb1b1e9(0x9f)],_0x1c9d4d[_0xb1b1e9(0xae)],_0x1c9d4d[_0xb1b1e9(0x121)],_0x1c9d4d[_0xb1b1e9(0xb5)]));}(this,function(_0x3b0238,_0x1f850e,_0x25b08e,_0x4dc168,_0x940fd9,_0x396cb8,_0x32004a,_0x3bd295){'use strict';const _0x327966=_0x2f68;const _0x43fbd9=_0x327966(0xd3);var _0x58e237=(_0x5ca945=>(_0x5ca945[_0x5ca945[_0x327966(0xb2)]=0x0]=_0x327966(0xb2),_0x5ca945[_0x5ca945[_0x327966(0xd5)]=0x1]=_0x327966(0xd5),_0x5ca945[_0x5ca945['UNRECOGNIZED']=-0x1]=_0x327966(0x101),_0x5ca945))(_0x58e237||{}),_0x2a392e=(_0x471823=>(_0x471823[_0x471823[_0x327966(0xf6)]=0x0]=_0x327966(0xf6),_0x471823[_0x471823[_0x327966(0x11b)]=0x1]='Add',_0x471823[_0x471823[_0x327966(0xb1)]=0x2]=_0x327966(0xb1),_0x471823[_0x471823['Edit']=0x3]=_0x327966(0x97),_0x471823[_0x471823[_0x327966(0xee)]=0x4]=_0x327966(0xee),_0x471823[_0x471823[_0x327966(0xc2)]=0x5]=_0x327966(0xc2),_0x471823[_0x471823[_0x327966(0x101)]=-0x1]='UNRECOGNIZED',_0x471823))(_0x2a392e||{});const _0x5efbbc=_0x3c4c00=>_0x4dc168[_0x327966(0xe3)](new Date(+_0x3c4c00))[_0x327966(0xe5)](_0x327966(0xab)),_0x135566=async(_0x448abc,_0x12c5cf)=>{const _0x42b1e5=_0x327966,_0x384e7f=_0x448abc[_0x42b1e5(0x9d)](_0x4dc168[_0x42b1e5(0xcd)]),_0x1b02c2=_0x448abc[_0x42b1e5(0x9d)](_0x3bd295[_0x42b1e5(0xda)]);_0x12c5cf[_0x42b1e5(0x10b)](_0x55b00d=>{const _0x1145a6=_0x42b1e5;_0x384e7f[_0x1145a6(0xba)](_0x55b00d)&&_0x12c5cf[_0x1145a6(0xf3)](_0x55b00d);}),_0x12c5cf[_0x42b1e5(0x11e)]&&(await _0x1b02c2[_0x42b1e5(0x9d)](_0x42b1e5(0xf8),{'params':{'userIDs':[..._0x12c5cf]}}))[_0x42b1e5(0xc0)][_0x42b1e5(0x112)][_0x42b1e5(0x10b)](_0x5d0f07=>{const _0x4f3e14=_0x42b1e5;_0x5d0f07&&_0x384e7f[_0x4f3e14(0xea)](_0x5d0f07);});};var _0x56432e=Object[_0x327966(0x11c)],_0x40a743=(_0x251ee5,_0x113d2e,_0x192411,_0x44c1eb)=>{for(var _0x560eba=_0x44c1eb>0x1?void 0x0:_0x44c1eb?_0x56432e(_0x113d2e,_0x192411):_0x113d2e,_0x44aedc=_0x251ee5['length']-0x1,_0x3c1251;_0x44aedc>=0x0;_0x44aedc--)(_0x3c1251=_0x251ee5[_0x44aedc])&&(_0x560eba=_0x3c1251(_0x560eba)||_0x560eba);return _0x560eba;},_0x2e2e56=(_0xe3044d,_0x1d9822)=>(_0x4d105e,_0x5bec97)=>_0x1d9822(_0x4d105e,_0x5bec97,_0xe3044d);let _0x1f3357=class extends _0x4dc168[_0x327966(0x9a)]{constructor(_0x1a3b73,_0x4eb07f,_0x25f8d8,_0x1ea39f){const _0x4802ad=_0x327966;super(),this[_0x4802ad(0xf0)]=_0x1a3b73,this[_0x4802ad(0xb9)]=_0x4eb07f,this[_0x4802ad(0x105)]=_0x25f8d8,this[_0x4802ad(0xa1)]=_0x1ea39f,this[_0x4802ad(0x108)](),this[_0x4802ad(0xc3)]();}['_initUserSync'](){const _0x988aaa=_0x327966;this['disposeWithMe'](this[_0x988aaa(0xb9)][_0x988aaa(0xb3)][_0x988aaa(0x102)](_0x32004a['bufferTime'](0x10))[_0x988aaa(0xb7)](_0x546705=>{const _0xfb2e84=_0x988aaa,_0x4fdcba=new Set();_0x546705[_0xfb2e84(0x10b)](_0x1fb96d=>{const _0x3d2d0b=_0xfb2e84;switch(_0x1fb96d[_0x3d2d0b(0x111)]){case _0x3d2d0b(0xed):{const _0xd045cc=_0x1fb96d[_0x3d2d0b(0x10d)][_0x3d2d0b(0xf5)];_0x4fdcba['add'](_0xd045cc);break;}}}),_0x135566(this[_0xfb2e84(0xa1)],_0x4fdcba);}));}[_0x327966(0x108)](){const _0x4f0181=_0x327966;this[_0x4f0181(0xe6)](this[_0x4f0181(0xf0)]['commentUpdate$'][_0x4f0181(0xb7)](async _0x2aed10=>{const _0x3ff38f=_0x4f0181;var _0x44e2bf,_0x1fdc39,_0x415389,_0x24759e;const _0x20ee2a=(_0x44e2bf=this[_0x3ff38f(0xb9)][_0x3ff38f(0x96)](_0x2aed10[_0x3ff38f(0xbb)])['find'](_0x5caf9a=>_0x5caf9a[_0x3ff38f(0x118)]===_0x2aed10[_0x3ff38f(0x118)]))==null?void 0x0:_0x44e2bf[_0x3ff38f(0xe7)];if(!_0x20ee2a)return;const {unitId:_0x2655f8,subUnitId:_0x4ba732}=_0x20ee2a;switch(_0x2aed10[_0x3ff38f(0xfa)]&&this[_0x3ff38f(0x105)]['addUser'](_0x2aed10[_0x3ff38f(0xfa)]),_0x2aed10[_0x3ff38f(0x111)]){case _0x2a392e[_0x3ff38f(0x11b)]:break;case _0x2a392e[_0x3ff38f(0xb1)]:{this['_threadCommentModel']['addComment'](_0x2655f8,_0x4ba732,{'unitId':_0x2655f8,'subUnitId':_0x4ba732,'ref':'','id':_0x2aed10[_0x3ff38f(0xde)],'dT':_0x5efbbc(+_0x2aed10['createTimestamp']),'threadId':_0x2aed10[_0x3ff38f(0x118)],'personId':(_0x415389=(_0x1fdc39=_0x2aed10[_0x3ff38f(0xfa)])==null?void 0x0:_0x1fdc39[_0x3ff38f(0xa4)])!=null?_0x415389:_0x2aed10[_0x3ff38f(0x109)],'text':JSON['parse'](_0x2aed10[_0x3ff38f(0xb8)]),'parentId':_0x20ee2a['id']});break;}case _0x2a392e[_0x3ff38f(0xee)]:{const _0x323b0d=this['_threadCommentModel'][_0x3ff38f(0xa5)](_0x2655f8,_0x4ba732,_0x2aed10[_0x3ff38f(0xde)]);_0x323b0d&&_0x323b0d[_0x3ff38f(0x114)]&&this['_threadCommentModel']['deleteComment'](_0x2655f8,_0x4ba732,_0x2aed10[_0x3ff38f(0xde)]);break;}case _0x2a392e[_0x3ff38f(0x97)]:{this[_0x3ff38f(0xb9)]['updateComment'](_0x2655f8,_0x4ba732,{'commentId':_0x2aed10[_0x3ff38f(0xde)],'text':JSON[_0x3ff38f(0x10f)](_0x2aed10[_0x3ff38f(0xb8)])});break;}case _0x2a392e['Solve']:{const _0x4923dc=(_0x24759e=this[_0x3ff38f(0xb9)][_0x3ff38f(0x96)](_0x2aed10[_0x3ff38f(0xbb)])[_0x3ff38f(0xa3)](_0x4cd95a=>_0x4cd95a[_0x3ff38f(0x118)]===_0x2aed10['threadId']))==null?void 0x0:_0x24759e[_0x3ff38f(0xe7)];_0x4923dc&&this['_threadCommentModel'][_0x3ff38f(0xbd)](_0x2655f8,_0x4ba732,_0x4923dc['id'],_0x2aed10[_0x3ff38f(0xad)]===_0x58e237[_0x3ff38f(0xd5)]);break;}}}));}};_0x1f3357=_0x40a743([_0x2e2e56(0x0,_0x4dc168[_0x327966(0xce)](_0x1f850e[_0x327966(0xa6)])),_0x2e2e56(0x1,_0x4dc168['Inject'](_0x396cb8[_0x327966(0xa2)])),_0x2e2e56(0x2,_0x4dc168[_0x327966(0xce)](_0x4dc168['UserManagerService'])),_0x2e2e56(0x3,_0x4dc168[_0x327966(0xce)](_0x4dc168[_0x327966(0xe1)]))],_0x1f3357);const _0x2f467a='thread-comment-data-source.config',_0x1cae5c={};var _0x3b79be=Object[_0x327966(0x11c)],_0x4e6402=(_0x120d59,_0x448a6c,_0x1be3a5,_0x10f36a)=>{for(var _0x2ae339=_0x10f36a>0x1?void 0x0:_0x10f36a?_0x3b79be(_0x448a6c,_0x1be3a5):_0x448a6c,_0x1047ee=_0x120d59['length']-0x1,_0x8fa1e0;_0x1047ee>=0x0;_0x1047ee--)(_0x8fa1e0=_0x120d59[_0x1047ee])&&(_0x2ae339=_0x8fa1e0(_0x2ae339)||_0x2ae339);return _0x2ae339;},_0x2799af=(_0x5eb65b,_0xe5f370)=>(_0x15c027,_0xb320a0)=>_0xe5f370(_0x15c027,_0xb320a0,_0x5eb65b);function _0x250f64(_0x3be529,_0x81d08){const _0x58c0b5=_0x327966,_0x5abd65=_0x3be529[_0x58c0b5(0x106)][0x0];return{..._0x81d08,'id':_0x5abd65['replyId'],'resolved':_0x3be529[_0x58c0b5(0xad)]===0x1,'dT':_0x5efbbc(_0x5abd65[_0x58c0b5(0xd0)]),'personId':_0x5abd65[_0x58c0b5(0x109)],'threadId':_0x5abd65['threadId']};}function _0x3e5dca(_0x1468fa,_0x160309,_0x438dba){const _0x873b07=_0x327966;var _0x586873,_0xbc9885;if(((_0xbc9885=(_0x586873=_0x1468fa==null?void 0x0:_0x1468fa[_0x873b07(0x106)])==null?void 0x0:_0x586873[_0x873b07(0x11d)])!=null?_0xbc9885:0x0)>0x0){const _0x3559fc=(_0x2e089c,_0x296079)=>({'id':_0x2e089c[_0x873b07(0xde)],'threadId':_0x2e089c[_0x873b07(0x118)],'dT':_0x5efbbc(_0x2e089c[_0x873b07(0xd0)]),'personId':_0x2e089c[_0x873b07(0x109)],'resolved':_0x1468fa[_0x873b07(0xad)]===_0x58e237[_0x873b07(0xd5)],'unitId':_0x160309,'subUnitId':_0x438dba,'text':JSON[_0x873b07(0x10f)](_0x2e089c[_0x873b07(0xb8)]),'parentId':_0x296079}),_0x1930b3=_0x3559fc(_0x1468fa[_0x873b07(0x106)][0x0]);return{..._0x1930b3,'children':_0x1468fa['replies'][_0x873b07(0xe4)](0x1)[_0x873b07(0xdf)](_0x54c705=>_0x3559fc(_0x54c705,_0x1930b3['id']))};}return null;}let _0x20bedb=class{constructor(_0x9b5c11,_0xbf37e,_0x7cd19a){const _0x187d17=_0x327966;this[_0x187d17(0x9b)]=_0x9b5c11,this[_0x187d17(0x105)]=_0xbf37e,this[_0x187d17(0x99)]=_0x7cd19a;}async[_0x327966(0xaf)](_0x399b9b){const _0x8d977d=_0x327966;var _0x7957ed,_0x454120;const {parentId:_0x4ed1f3,unitId:_0x450045,text:_0x5d15de,threadId:_0x5af9c8}=_0x399b9b,_0x46b199=(_0x454120=(_0x7957ed=_0x5d15de[_0x8d977d(0x107)])==null?void 0x0:_0x7957ed['filter'](_0x3c444c=>_0x3c444c[_0x8d977d(0xb0)]===_0x4dc168[_0x8d977d(0x115)][_0x8d977d(0xdd)])[_0x8d977d(0xdf)](_0x23af1c=>_0x23af1c[_0x8d977d(0xf9)]))!=null?_0x454120:[],_0x265330=JSON[_0x8d977d(0xfe)](_0x5d15de),_0x1f67ff=(await this['_sessionService'][_0x8d977d(0xc7)](_0x450045))['getMemberID']();if(_0x4ed1f3){const _0xc45976={'memberId':_0x1f67ff,'unitId':_0x450045,'content':_0x265330,'mention':_0x46b199,'threadId':_0x5af9c8},_0x3968a7=(await this['_httpService']['post'](_0x8d977d(0x10e)+_0x450045+_0x8d977d(0xd4),{'body':_0xc45976}))[_0x8d977d(0xc0)][_0x8d977d(0xe8)];return{..._0x399b9b,'id':_0x3968a7[_0x8d977d(0xde)],'dT':_0x4dc168[_0x8d977d(0xe3)](+_0x3968a7['createTimestamp'])[_0x8d977d(0xe5)](_0x8d977d(0xab)),'personId':_0x3968a7[_0x8d977d(0x109)]};}else{const _0x1e8550={'memberId':_0x1f67ff,'unitId':_0x450045,'content':_0x265330,'mention':_0x46b199},_0x46dba1=await this[_0x8d977d(0x9b)]['post'](_0x8d977d(0x10e)+_0x450045+_0x8d977d(0x9e),{'body':_0x1e8550});return _0x250f64(_0x46dba1[_0x8d977d(0xc0)][_0x8d977d(0xd7)],_0x399b9b);}}async['updateComment'](_0x4acc59){const _0x5a2422=_0x327966;var _0x3e55a1,_0x1f6490;const {text:_0x5c2a2c,unitId:_0x4c9c45}=_0x4acc59,_0x1b1a54=(_0x1f6490=(_0x3e55a1=_0x5c2a2c[_0x5a2422(0x107)])==null?void 0x0:_0x3e55a1[_0x5a2422(0xec)](_0x212719=>_0x212719['rangeType']===_0x4dc168['CustomRangeType'][_0x5a2422(0xdd)])[_0x5a2422(0xdf)](_0x10a5f0=>_0x10a5f0[_0x5a2422(0xf9)]))!=null?_0x1f6490:[],_0x569a3a=JSON[_0x5a2422(0xfe)](_0x5c2a2c),_0x5c710f=_0x4acc59[_0x5a2422(0x118)],_0x328083=_0x4acc59['id'],_0x55a772={'memberId':(await this[_0x5a2422(0x99)][_0x5a2422(0xc7)](_0x4c9c45))[_0x5a2422(0xb6)](),'unitId':_0x4c9c45,'threadId':_0x5c710f,'mention':_0x1b1a54,'content':_0x569a3a,'replyId':_0x328083},_0x2a52b5=await this['_httpService'][_0x5a2422(0xd8)](_0x5a2422(0x10e)+_0x4c9c45+_0x5a2422(0xcb),{'body':_0x55a772});return!_0x2a52b5['body'][_0x5a2422(0xf1)]||_0x2a52b5[_0x5a2422(0xc0)][_0x5a2422(0xf1)][_0x5a2422(0xeb)]===0x1;}async['resolveComment'](_0x2f54be){const _0x562f28=_0x327966,{unitId:_0x1960f6}=_0x2f54be,_0x17e2a6=_0x2f54be[_0x562f28(0x118)],_0x1d5afe={'memberId':this[_0x562f28(0x105)]['getCurrentUser']()[_0x562f28(0xa4)],'unitId':_0x1960f6,'threadId':_0x17e2a6,'solved':_0x2f54be[_0x562f28(0xa8)]?_0x58e237[_0x562f28(0xd5)]:_0x58e237[_0x562f28(0xb2)]},_0x45f41c=await this[_0x562f28(0x9b)][_0x562f28(0xd8)](_0x562f28(0x10e)+_0x1960f6+_0x562f28(0x98),{'body':_0x1d5afe});return!_0x45f41c[_0x562f28(0xc0)]['error']||_0x45f41c['body'][_0x562f28(0xf1)]['code']===0x1;}async[_0x327966(0xac)](_0x24caf5,_0xf81232,_0xa82bcd,_0x2e4957){const _0x1cb6bd=_0x327966,_0x40aaf3={'memberId':(await this[_0x1cb6bd(0x99)][_0x1cb6bd(0xc7)](_0x24caf5))[_0x1cb6bd(0xb6)](),'threadId':_0xa82bcd,'replyId':_0x2e4957,'unitId':_0x24caf5},_0x3558b1=await this['_httpService'][_0x1cb6bd(0xd8)](_0x1cb6bd(0x10e)+_0x24caf5+_0x1cb6bd(0xbf),{'body':_0x40aaf3});return!_0x3558b1[_0x1cb6bd(0xc0)]['error']||_0x3558b1['body'][_0x1cb6bd(0xf1)][_0x1cb6bd(0xeb)]===0x1;}async['listComments'](_0x315b3b,_0x48c897,_0x4769a9){const _0x33f8b2=_0x327966,_0x313d24={'unitId':_0x315b3b,'threadId':_0x4769a9},_0x26d2b1=await this['_httpService'][_0x33f8b2(0xd8)](_0x33f8b2(0x10e)+_0x315b3b+'/list',{'body':_0x313d24}),_0x5ddca4=_0x4769a9[_0x33f8b2(0xdf)](_0x595540=>_0x3e5dca(_0x26d2b1[_0x33f8b2(0xc0)][_0x33f8b2(0xfc)][_0x595540],_0x315b3b,_0x48c897))[_0x33f8b2(0xec)](Boolean);return Object[_0x33f8b2(0x9c)](_0x26d2b1[_0x33f8b2(0xc0)][_0x33f8b2(0x112)])[_0x33f8b2(0x10b)](_0x50a925=>{const _0x2430ff=_0x33f8b2;this[_0x2430ff(0x105)][_0x2430ff(0xea)](_0x50a925);}),_0x5ddca4;}[_0x327966(0xd2)](_0xd0cfdf){const _0x15901=_0x327966;return{'id':_0xd0cfdf['id'],'threadId':_0xd0cfdf[_0x15901(0x118)],'ref':_0xd0cfdf[_0x15901(0xdc)]};}};_0x20bedb=_0x4e6402([_0x2799af(0x0,_0x4dc168[_0x327966(0xce)](_0x3bd295['HTTPService'])),_0x2799af(0x1,_0x4dc168[_0x327966(0xce)](_0x4dc168['UserManagerService'])),_0x2799af(0x2,_0x4dc168[_0x327966(0xce)](_0x1f850e[_0x327966(0xe9)]))],_0x20bedb);var _0x23ebe6=Object['getOwnPropertyDescriptor'],_0x50725f=(_0x5d6c4e,_0x13eb2d,_0x33425a,_0x274e1c)=>{const _0x3f81c1=_0x327966;for(var _0x219dc0=_0x274e1c>0x1?void 0x0:_0x274e1c?_0x23ebe6(_0x13eb2d,_0x33425a):_0x13eb2d,_0x4ceed7=_0x5d6c4e[_0x3f81c1(0x11d)]-0x1,_0x1fefe3;_0x4ceed7>=0x0;_0x4ceed7--)(_0x1fefe3=_0x5d6c4e[_0x4ceed7])&&(_0x219dc0=_0x1fefe3(_0x219dc0)||_0x219dc0);return _0x219dc0;},_0x554cb4=(_0x152ca7,_0x4daf52)=>(_0x248d07,_0x1182aa)=>_0x4daf52(_0x248d07,_0x1182aa,_0x152ca7);let _0x13880a=class extends _0x4dc168[_0x327966(0x9a)]{constructor(_0x3b5ce7,_0x4a165f){const _0x409e49=_0x327966;super(),this[_0x409e49(0x104)]=_0x3b5ce7,this[_0x409e49(0xc5)]=_0x4a165f,this[_0x409e49(0x113)]();}['_initDataSource'](){const _0x1217df=_0x327966;this[_0x1217df(0x104)]['dataSource']=this['_threadCommentDataSource'],this[_0x1217df(0x104)]['syncUpdateMutationToColla']=!0x1;}};_0x13880a=_0x50725f([_0x554cb4(0x0,_0x396cb8[_0x327966(0x100)]),_0x554cb4(0x1,_0x4dc168[_0x327966(0xce)](_0x20bedb))],_0x13880a);var _0x2deb99=Object[_0x327966(0x119)],_0x43f983=Object[_0x327966(0x11c)],_0x4a34d2=(_0xeeee9c,_0x43d041,_0x192aca)=>_0x43d041 in _0xeeee9c?_0x2deb99(_0xeeee9c,_0x43d041,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x192aca}):_0xeeee9c[_0x43d041]=_0x192aca,_0x1dda2c=(_0x5424b5,_0x256c3f,_0x581b2f,_0xa1af5)=>{for(var _0x48f96c=_0xa1af5>0x1?void 0x0:_0xa1af5?_0x43f983(_0x256c3f,_0x581b2f):_0x256c3f,_0xd23ea1=_0x5424b5['length']-0x1,_0x4e716a;_0xd23ea1>=0x0;_0xd23ea1--)(_0x4e716a=_0x5424b5[_0xd23ea1])&&(_0x48f96c=_0x4e716a(_0x48f96c)||_0x48f96c);return _0x48f96c;},_0x50ef05=(_0x296b9e,_0x219ace)=>(_0x399328,_0x5bb111)=>_0x219ace(_0x399328,_0x5bb111,_0x296b9e),_0x7b636b=(_0x247b1c,_0x494df5,_0x58443c)=>_0x4a34d2(_0x247b1c,typeof _0x494df5!=_0x327966(0xf2)?_0x494df5+'':_0x494df5,_0x58443c);_0x3b0238[_0x327966(0xb4)]=class extends _0x4dc168[_0x327966(0xa9)]{constructor(_0x3a0702=_0x1cae5c,_0xbc51cd,_0x46c99a){const _0x58904b=_0x327966;super(),this[_0x58904b(0xcc)]=_0x3a0702,this[_0x58904b(0xa1)]=_0xbc51cd,this[_0x58904b(0xd9)]=_0x46c99a;const {..._0x1329d1}=_0x4dc168[_0x58904b(0x11a)]({},_0x1cae5c,this[_0x58904b(0xcc)]);this[_0x58904b(0xd9)][_0x58904b(0x123)](_0x2f467a,_0x1329d1);}['onStarting'](){const _0x3a6c34=_0x327966;[[_0x20bedb],[_0x13880a],[_0x1f3357]][_0x3a6c34(0x10b)](_0x403a6e=>{const _0x51151d=_0x3a6c34;this['_injector'][_0x51151d(0xed)](_0x403a6e);});}[_0x327966(0xbe)](){const _0x1730d6=_0x327966;this[_0x1730d6(0xa1)][_0x1730d6(0x9d)](_0x13880a),this[_0x1730d6(0xa1)]['get'](_0x1f3357);}},_0x7b636b(_0x3b0238[_0x327966(0xb4)],_0x327966(0x117),_0x43fbd9),_0x7b636b(_0x3b0238[_0x327966(0xb4)],'type',_0x4dc168[_0x327966(0xc4)]['UNIVER_UNKNOWN']),_0x3b0238['UniverThreadCommentDataSourcePlugin']=_0x1dda2c([_0x4dc168[_0x327966(0x116)](_0x940fd9['UniverThreadCommentUIPlugin'],_0x1f850e[_0x327966(0xff)],_0x25b08e[_0x327966(0xc6)]),_0x50ef05(0x1,_0x4dc168[_0x327966(0xce)](_0x4dc168[_0x327966(0xe1)])),_0x50ef05(0x2,_0x4dc168[_0x327966(0xc1)])],_0x3b0238['UniverThreadCommentDataSourcePlugin']),Object[_0x327966(0x119)](_0x3b0238,Symbol[_0x327966(0x120)],{'value':_0x327966(0x10a)});}));
1
+ function _0x26eb(){const _0x384bbe=['IThreadCommentDataSourceService','size','rxjs','Disposable','UniverProCollaborationClient','IConfigService','UNRECOGNIZED','object','saveCommentToSnapshot','unitId','resolveComment','YYYY/MM/DD\x20HH:mm','@univerjs/thread-comment-ui','_init','addUser','11696900KyexYi','disposeWithMe','parentId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','110468qWMkeQ','defineProperty','forEach','code','updateComment','_config','replyId','threadId','pipe','UniverNetwork','length','comments','requireSession','onReady','userId','listComments','error','format','UniverThreadComment','rangeType','comment','Edit','Delete','601321oFmPdo','Add','add','createTimestamp','deleteComment','@univerjs/thread-comment','_httpService','subscribe','OpenOrReOpen','3059602faIqll','onStarting','dayjs','/add','Unknown','UniverProThreadCommentDatasource','Inject','UniverInstanceType','UniverProLicense','users','COMMENT','setConfig','UniverThreadCommentUi','getMemberID','delete','Solve','_threadCommentModel','8oQyjSA','user','type','body','toStringTag','rangeId','amd','_sessionService','pluginName','getUnit','/delete','UniverLicensePlugin','commentUpdate$','dataSource','Reply','root','_initUserSync','/reply','Injector','@univerjs-pro/collaboration-client','post','_injector','@univerjs/core','getOwnPropertyDescriptor','filter','addComment','HTTPService','_userService','@univerjs-pro/license','120kvjrlH','84oUXNeg','solved','get','customRanges','personId','_configService','UserManagerService','Plugin','2674179JoeeQz','/universer-api/user/list','UNIVER_UNKNOWN','Solved','1353648kbxZdo','userID','function','thread-comment-data-source.config','198515vgKxPS','parse','CustomRangeType','/solved','_threadCommentDataSource','symbol','stringify','_initDataSource','_commentService','find','/universer-api/comment/unit/','_threadCommentDataSourceService','replies','payload','getComment','content','UniverThreadCommentDataSourcePlugin','UniverCollaborationClientPlugin','CommentService','map'];_0x26eb=function(){return _0x384bbe;};return _0x26eb();}function _0x5d93(_0x572b6c,_0x1b5639){const _0x26eb6c=_0x26eb();return _0x5d93=function(_0x5d93bc,_0x49f7b6){_0x5d93bc=_0x5d93bc-0x12d;let _0xa76e9e=_0x26eb6c[_0x5d93bc];return _0xa76e9e;},_0x5d93(_0x572b6c,_0x1b5639);}(function(_0x4b9a23,_0x360406){const _0x23a188=_0x5d93,_0x45b82a=_0x4b9a23();while(!![]){try{const _0x5bbfd9=-parseInt(_0x23a188(0x196))/0x1+parseInt(_0x23a188(0x154))/0x2+parseInt(_0x23a188(0x148))/0x3*(parseInt(_0x23a188(0x17f))/0x4)+parseInt(_0x23a188(0x158))/0x5*(-parseInt(_0x23a188(0x147))/0x6)+-parseInt(_0x23a188(0x19f))/0x7+-parseInt(_0x23a188(0x1b0))/0x8*(parseInt(_0x23a188(0x150))/0x9)+parseInt(_0x23a188(0x17b))/0xa;if(_0x5bbfd9===_0x360406)break;else _0x45b82a['push'](_0x45b82a['shift']());}catch(_0x5d4dec){_0x45b82a['push'](_0x45b82a['shift']());}}}(_0x26eb,0x77ad0),function(_0x2673ac,_0x18786b){const _0x1a072d=_0x5d93;typeof exports==_0x1a072d(0x173)&&typeof module<'u'?_0x18786b(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==_0x1a072d(0x156)&&define[_0x1a072d(0x130)]?define(['exports',_0x1a072d(0x13d),_0x1a072d(0x146),_0x1a072d(0x140),_0x1a072d(0x178),_0x1a072d(0x19b),_0x1a072d(0x16e),'@univerjs/network'],_0x18786b):(_0x2673ac=typeof globalThis<'u'?globalThis:_0x2673ac||self,_0x18786b(_0x2673ac[_0x1a072d(0x1a4)]={},_0x2673ac[_0x1a072d(0x170)],_0x2673ac[_0x1a072d(0x1a7)],_0x2673ac['UniverCore'],_0x2673ac[_0x1a072d(0x1ab)],_0x2673ac[_0x1a072d(0x191)],_0x2673ac[_0x1a072d(0x16e)],_0x2673ac[_0x1a072d(0x188)]));}(this,function(_0x3a087b,_0x323a48,_0x575afd,_0x19df08,_0x16314d,_0x421745,_0x3762e0,_0x446d9c){'use strict';const _0x52621c=_0x5d93;const _0x2f1353=_0x52621c(0x17e);var _0x48d075=(_0x2f6aea=>(_0x2f6aea[_0x2f6aea[_0x52621c(0x19e)]=0x0]='OpenOrReOpen',_0x2f6aea[_0x2f6aea[_0x52621c(0x153)]=0x1]=_0x52621c(0x153),_0x2f6aea[_0x2f6aea['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2f6aea))(_0x48d075||{}),_0x28aaad=(_0x457d9e=>(_0x457d9e[_0x457d9e[_0x52621c(0x1a3)]=0x0]=_0x52621c(0x1a3),_0x457d9e[_0x457d9e[_0x52621c(0x197)]=0x1]='Add',_0x457d9e[_0x457d9e['Reply']=0x2]=_0x52621c(0x138),_0x457d9e[_0x457d9e[_0x52621c(0x194)]=0x3]='Edit',_0x457d9e[_0x457d9e[_0x52621c(0x195)]=0x4]=_0x52621c(0x195),_0x457d9e[_0x457d9e[_0x52621c(0x1ae)]=0x5]=_0x52621c(0x1ae),_0x457d9e[_0x457d9e[_0x52621c(0x172)]=-0x1]=_0x52621c(0x172),_0x457d9e))(_0x28aaad||{});const _0x217280=_0x474528=>_0x19df08[_0x52621c(0x1a1)](new Date(+_0x474528))[_0x52621c(0x190)](_0x52621c(0x177)),_0x32d475=async(_0x30ee5c,_0x194c70)=>{const _0x3ea5a2=_0x52621c,_0x406fd7=_0x30ee5c['get'](_0x19df08[_0x3ea5a2(0x14e)]),_0x47f38f=_0x30ee5c[_0x3ea5a2(0x14a)](_0x446d9c[_0x3ea5a2(0x144)]);_0x194c70[_0x3ea5a2(0x181)](_0x4045f1=>{const _0x1aba79=_0x3ea5a2;_0x406fd7['getUser'](_0x4045f1)&&_0x194c70[_0x1aba79(0x1ad)](_0x4045f1);}),_0x194c70[_0x3ea5a2(0x16d)]&&(await _0x47f38f['get'](_0x3ea5a2(0x151),{'params':{'userIDs':[..._0x194c70]}}))[_0x3ea5a2(0x12d)][_0x3ea5a2(0x1a8)][_0x3ea5a2(0x181)](_0x23bba0=>{const _0x1cc050=_0x3ea5a2;_0x23bba0&&_0x406fd7[_0x1cc050(0x17a)](_0x23bba0);});};var _0x1dbe4d=Object[_0x52621c(0x141)],_0x254c2d=(_0x3edbce,_0xa07762,_0xb014b9,_0x3e347e)=>{const _0x373a31=_0x52621c;for(var _0x3230a0=_0x3e347e>0x1?void 0x0:_0x3e347e?_0x1dbe4d(_0xa07762,_0xb014b9):_0xa07762,_0x41ccef=_0x3edbce[_0x373a31(0x189)]-0x1,_0x5f4aa2;_0x41ccef>=0x0;_0x41ccef--)(_0x5f4aa2=_0x3edbce[_0x41ccef])&&(_0x3230a0=_0x5f4aa2(_0x3230a0)||_0x3230a0);return _0x3230a0;},_0x13ff24=(_0x187597,_0x315d76)=>(_0x26d958,_0x37e28a)=>_0x315d76(_0x26d958,_0x37e28a,_0x187597);let _0x26214a=class extends _0x19df08[_0x52621c(0x16f)]{constructor(_0x570951,_0x52a93c,_0x45f3cb,_0x59d76f){const _0x49df0e=_0x52621c;super(),this[_0x49df0e(0x160)]=_0x570951,this['_threadCommentModel']=_0x52a93c,this[_0x49df0e(0x145)]=_0x45f3cb,this[_0x49df0e(0x13f)]=_0x59d76f,this[_0x49df0e(0x179)](),this[_0x49df0e(0x13a)]();}[_0x52621c(0x13a)](){const _0x4e2eef=_0x52621c;this[_0x4e2eef(0x17c)](this[_0x4e2eef(0x1af)][_0x4e2eef(0x136)][_0x4e2eef(0x187)](_0x3762e0['bufferTime'](0x10))[_0x4e2eef(0x19d)](_0xa89dd8=>{const _0x41334b=_0x4e2eef,_0x103c44=new Set();_0xa89dd8[_0x41334b(0x181)](_0x6f78c8=>{const _0x270579=_0x41334b;switch(_0x6f78c8['type']){case _0x270579(0x198):{const _0x5e0f48=_0x6f78c8[_0x270579(0x165)][_0x270579(0x14c)];_0x103c44[_0x270579(0x198)](_0x5e0f48);break;}}}),_0x32d475(this[_0x41334b(0x13f)],_0x103c44);}));}[_0x52621c(0x179)](){const _0x10fab2=_0x52621c;this[_0x10fab2(0x17c)](this[_0x10fab2(0x160)][_0x10fab2(0x136)][_0x10fab2(0x19d)](async _0x5d8010=>{const _0x7ea267=_0x10fab2;var _0x2497a6,_0x87ec51,_0x16548f,_0x3dd121;const _0x256206=(_0x2497a6=this[_0x7ea267(0x1af)][_0x7ea267(0x133)](_0x5d8010[_0x7ea267(0x175)])[_0x7ea267(0x161)](_0x534e25=>_0x534e25[_0x7ea267(0x186)]===_0x5d8010['threadId']))==null?void 0x0:_0x2497a6[_0x7ea267(0x139)];if(!_0x256206)return;const {unitId:_0x358949,subUnitId:_0x31f582}=_0x256206;switch(_0x5d8010[_0x7ea267(0x1b1)]&&this[_0x7ea267(0x145)][_0x7ea267(0x17a)](_0x5d8010[_0x7ea267(0x1b1)]),_0x5d8010[_0x7ea267(0x1b2)]){case _0x28aaad[_0x7ea267(0x197)]:break;case _0x28aaad[_0x7ea267(0x138)]:{this[_0x7ea267(0x1af)][_0x7ea267(0x143)](_0x358949,_0x31f582,{'unitId':_0x358949,'subUnitId':_0x31f582,'ref':'','id':_0x5d8010[_0x7ea267(0x185)],'dT':_0x217280(+_0x5d8010['createTimestamp']),'threadId':_0x5d8010['threadId'],'personId':(_0x16548f=(_0x87ec51=_0x5d8010[_0x7ea267(0x1b1)])==null?void 0x0:_0x87ec51[_0x7ea267(0x155)])!=null?_0x16548f:_0x5d8010['userId'],'text':JSON[_0x7ea267(0x159)](_0x5d8010[_0x7ea267(0x167)]),'parentId':_0x256206['id']});break;}case _0x28aaad[_0x7ea267(0x195)]:{const _0x56107e=this[_0x7ea267(0x1af)][_0x7ea267(0x166)](_0x358949,_0x31f582,_0x5d8010[_0x7ea267(0x185)]);_0x56107e&&_0x56107e[_0x7ea267(0x17d)]&&this['_threadCommentModel'][_0x7ea267(0x19a)](_0x358949,_0x31f582,_0x5d8010[_0x7ea267(0x185)]);break;}case _0x28aaad[_0x7ea267(0x194)]:{this['_threadCommentModel'][_0x7ea267(0x183)](_0x358949,_0x31f582,{'commentId':_0x5d8010['replyId'],'text':JSON[_0x7ea267(0x159)](_0x5d8010[_0x7ea267(0x167)])});break;}case _0x28aaad[_0x7ea267(0x1ae)]:{const _0x58eaae=(_0x3dd121=this[_0x7ea267(0x1af)][_0x7ea267(0x133)](_0x5d8010[_0x7ea267(0x175)])['find'](_0x5d04c2=>_0x5d04c2[_0x7ea267(0x186)]===_0x5d8010[_0x7ea267(0x186)]))==null?void 0x0:_0x3dd121[_0x7ea267(0x139)];_0x58eaae&&this[_0x7ea267(0x1af)][_0x7ea267(0x176)](_0x358949,_0x31f582,_0x58eaae['id'],_0x5d8010[_0x7ea267(0x149)]===_0x48d075[_0x7ea267(0x153)]);break;}}}));}};_0x26214a=_0x254c2d([_0x13ff24(0x0,_0x19df08[_0x52621c(0x1a5)](_0x323a48[_0x52621c(0x16a)])),_0x13ff24(0x1,_0x19df08[_0x52621c(0x1a5)](_0x421745['ThreadCommentModel'])),_0x13ff24(0x2,_0x19df08[_0x52621c(0x1a5)](_0x19df08[_0x52621c(0x14e)])),_0x13ff24(0x3,_0x19df08['Inject'](_0x19df08[_0x52621c(0x13c)]))],_0x26214a);const _0x4b3d2e=_0x52621c(0x157),_0x2d7ec7={};var _0x20ab17=Object[_0x52621c(0x141)],_0x2b26b3=(_0x1406d3,_0x5635b0,_0x562926,_0x432411)=>{const _0x51ad3e=_0x52621c;for(var _0x13ae4b=_0x432411>0x1?void 0x0:_0x432411?_0x20ab17(_0x5635b0,_0x562926):_0x5635b0,_0x2a4a82=_0x1406d3[_0x51ad3e(0x189)]-0x1,_0x5663e9;_0x2a4a82>=0x0;_0x2a4a82--)(_0x5663e9=_0x1406d3[_0x2a4a82])&&(_0x13ae4b=_0x5663e9(_0x13ae4b)||_0x13ae4b);return _0x13ae4b;},_0xd97f5e=(_0x15a147,_0x3a4e9b)=>(_0x512065,_0x49724b)=>_0x3a4e9b(_0x512065,_0x49724b,_0x15a147);function _0x5183c8(_0x1be41b,_0x3de3b6){const _0x1b42bb=_0x52621c,_0x26c5e9=_0x1be41b[_0x1b42bb(0x164)][0x0];return{..._0x3de3b6,'id':_0x26c5e9[_0x1b42bb(0x185)],'resolved':_0x1be41b[_0x1b42bb(0x149)]===0x1,'dT':_0x217280(_0x26c5e9[_0x1b42bb(0x199)]),'personId':_0x26c5e9[_0x1b42bb(0x18d)],'threadId':_0x26c5e9[_0x1b42bb(0x186)]};}function _0x3ab341(_0x25c4dd,_0x498fec,_0x2cb424){const _0x1010d0=_0x52621c;var _0x36f90d,_0x33ebf0;if(((_0x33ebf0=(_0x36f90d=_0x25c4dd==null?void 0x0:_0x25c4dd['replies'])==null?void 0x0:_0x36f90d[_0x1010d0(0x189)])!=null?_0x33ebf0:0x0)>0x0){const _0x11f92d=(_0x20d4a4,_0x44be6e)=>({'id':_0x20d4a4['replyId'],'threadId':_0x20d4a4['threadId'],'dT':_0x217280(_0x20d4a4[_0x1010d0(0x199)]),'personId':_0x20d4a4[_0x1010d0(0x18d)],'resolved':_0x25c4dd[_0x1010d0(0x149)]===_0x48d075['Solved'],'unitId':_0x498fec,'subUnitId':_0x2cb424,'text':JSON[_0x1010d0(0x159)](_0x20d4a4[_0x1010d0(0x167)]),'parentId':_0x44be6e}),_0x5f1f47=_0x11f92d(_0x25c4dd[_0x1010d0(0x164)][0x0]);return{..._0x5f1f47,'children':_0x25c4dd[_0x1010d0(0x164)]['slice'](0x1)[_0x1010d0(0x16b)](_0x3aa11c=>_0x11f92d(_0x3aa11c,_0x5f1f47['id']))};}return null;}let _0x2e7e20=class{constructor(_0x3d78b9,_0x1db7dd,_0x5cd356){const _0x439ff4=_0x52621c;this[_0x439ff4(0x19c)]=_0x3d78b9,this[_0x439ff4(0x145)]=_0x1db7dd,this[_0x439ff4(0x131)]=_0x5cd356;}async[_0x52621c(0x143)](_0x1e2f31){const _0x5a3be3=_0x52621c;var _0x4b2ee0,_0x17f2fa;const {parentId:_0x1241fb,unitId:_0x13b7ee,text:_0x47abb2,threadId:_0x2b1a5d}=_0x1e2f31,_0x35d0a3=(_0x17f2fa=(_0x4b2ee0=_0x47abb2[_0x5a3be3(0x14b)])==null?void 0x0:_0x4b2ee0['filter'](_0x461fed=>_0x461fed[_0x5a3be3(0x192)]===_0x19df08[_0x5a3be3(0x15a)][_0x5a3be3(0x1a9)])[_0x5a3be3(0x16b)](_0x3bc4de=>_0x3bc4de[_0x5a3be3(0x12f)]))!=null?_0x17f2fa:[],_0x50e493=JSON[_0x5a3be3(0x15e)](_0x47abb2),_0x449137=(await this[_0x5a3be3(0x131)][_0x5a3be3(0x18b)](_0x13b7ee))['getMemberID']();if(_0x1241fb){const _0x4c020c={'memberId':_0x449137,'unitId':_0x13b7ee,'content':_0x50e493,'mention':_0x35d0a3,'threadId':_0x2b1a5d},_0x5e5051=(await this[_0x5a3be3(0x19c)][_0x5a3be3(0x13e)](_0x5a3be3(0x162)+_0x13b7ee+_0x5a3be3(0x13b),{'body':_0x4c020c}))['body']['reply'];return{..._0x1e2f31,'id':_0x5e5051[_0x5a3be3(0x185)],'dT':_0x19df08[_0x5a3be3(0x1a1)](+_0x5e5051[_0x5a3be3(0x199)])[_0x5a3be3(0x190)](_0x5a3be3(0x177)),'personId':_0x5e5051['userId']};}else{const _0x56b19e={'memberId':_0x449137,'unitId':_0x13b7ee,'content':_0x50e493,'mention':_0x35d0a3},_0x24606f=await this[_0x5a3be3(0x19c)][_0x5a3be3(0x13e)](_0x5a3be3(0x162)+_0x13b7ee+_0x5a3be3(0x1a2),{'body':_0x56b19e});return _0x5183c8(_0x24606f[_0x5a3be3(0x12d)][_0x5a3be3(0x193)],_0x1e2f31);}}async['updateComment'](_0x339b14){const _0x12df87=_0x52621c;var _0x14cb54,_0x3bfb85;const {text:_0x3b8059,unitId:_0x1e867d}=_0x339b14,_0x18b0e2=(_0x3bfb85=(_0x14cb54=_0x3b8059[_0x12df87(0x14b)])==null?void 0x0:_0x14cb54[_0x12df87(0x142)](_0x3d7025=>_0x3d7025[_0x12df87(0x192)]===_0x19df08[_0x12df87(0x15a)]['COMMENT'])[_0x12df87(0x16b)](_0x178d84=>_0x178d84['rangeId']))!=null?_0x3bfb85:[],_0xc6fb10=JSON['stringify'](_0x3b8059),_0x815b9f=_0x339b14[_0x12df87(0x186)],_0x1d98cc=_0x339b14['id'],_0x4a5116={'memberId':(await this[_0x12df87(0x131)][_0x12df87(0x18b)](_0x1e867d))[_0x12df87(0x1ac)](),'unitId':_0x1e867d,'threadId':_0x815b9f,'mention':_0x18b0e2,'content':_0xc6fb10,'replyId':_0x1d98cc},_0x15a7bf=await this[_0x12df87(0x19c)][_0x12df87(0x13e)](_0x12df87(0x162)+_0x1e867d+'/edit',{'body':_0x4a5116});return!_0x15a7bf[_0x12df87(0x12d)][_0x12df87(0x18f)]||_0x15a7bf['body']['error'][_0x12df87(0x182)]===0x1;}async['resolveComment'](_0x178e51){const _0xc45704=_0x52621c,{unitId:_0x48a285}=_0x178e51,_0x5474f5=_0x178e51[_0xc45704(0x186)],_0x3f3a0f={'memberId':this[_0xc45704(0x145)]['getCurrentUser']()[_0xc45704(0x155)],'unitId':_0x48a285,'threadId':_0x5474f5,'solved':_0x178e51['resolved']?_0x48d075[_0xc45704(0x153)]:_0x48d075[_0xc45704(0x19e)]},_0x588aa8=await this['_httpService']['post'](_0xc45704(0x162)+_0x48a285+_0xc45704(0x15b),{'body':_0x3f3a0f});return!_0x588aa8[_0xc45704(0x12d)][_0xc45704(0x18f)]||_0x588aa8[_0xc45704(0x12d)]['error'][_0xc45704(0x182)]===0x1;}async[_0x52621c(0x19a)](_0x3ffa4f,_0x3d8a84,_0x4a1078,_0x2dde06){const _0x10e3a9=_0x52621c,_0xa1019f={'memberId':(await this[_0x10e3a9(0x131)][_0x10e3a9(0x18b)](_0x3ffa4f))[_0x10e3a9(0x1ac)](),'threadId':_0x4a1078,'replyId':_0x2dde06,'unitId':_0x3ffa4f},_0xb4896b=await this[_0x10e3a9(0x19c)][_0x10e3a9(0x13e)](_0x10e3a9(0x162)+_0x3ffa4f+_0x10e3a9(0x134),{'body':_0xa1019f});return!_0xb4896b['body'][_0x10e3a9(0x18f)]||_0xb4896b[_0x10e3a9(0x12d)]['error']['code']===0x1;}async[_0x52621c(0x18e)](_0x373ef7,_0x3fc767,_0x3c4035){const _0x290ec2=_0x52621c,_0x4f23a0={'unitId':_0x373ef7,'threadId':_0x3c4035},_0x59f2a4=await this['_httpService'][_0x290ec2(0x13e)](_0x290ec2(0x162)+_0x373ef7+'/list',{'body':_0x4f23a0}),_0x25f204=_0x3c4035[_0x290ec2(0x16b)](_0x4ddbfd=>_0x3ab341(_0x59f2a4[_0x290ec2(0x12d)][_0x290ec2(0x18a)][_0x4ddbfd],_0x373ef7,_0x3fc767))[_0x290ec2(0x142)](Boolean);return Object['values'](_0x59f2a4['body'][_0x290ec2(0x1a8)])[_0x290ec2(0x181)](_0x26214c=>{this['_userService']['addUser'](_0x26214c);}),_0x25f204;}[_0x52621c(0x174)](_0x327c0c){const _0x331c13=_0x52621c;return{'id':_0x327c0c['id'],'threadId':_0x327c0c[_0x331c13(0x186)],'ref':_0x327c0c['ref']};}};_0x2e7e20=_0x2b26b3([_0xd97f5e(0x0,_0x19df08[_0x52621c(0x1a5)](_0x446d9c[_0x52621c(0x144)])),_0xd97f5e(0x1,_0x19df08[_0x52621c(0x1a5)](_0x19df08[_0x52621c(0x14e)])),_0xd97f5e(0x2,_0x19df08[_0x52621c(0x1a5)](_0x323a48['CollaborationSessionService']))],_0x2e7e20);var _0x42232d=Object[_0x52621c(0x141)],_0x3836f6=(_0x14f681,_0x2bd2a4,_0x2c8c66,_0x5b68bb)=>{for(var _0x2c6340=_0x5b68bb>0x1?void 0x0:_0x5b68bb?_0x42232d(_0x2bd2a4,_0x2c8c66):_0x2bd2a4,_0x50b346=_0x14f681['length']-0x1,_0x565f3c;_0x50b346>=0x0;_0x50b346--)(_0x565f3c=_0x14f681[_0x50b346])&&(_0x2c6340=_0x565f3c(_0x2c6340)||_0x2c6340);return _0x2c6340;},_0x4ab953=(_0x5c6fb7,_0x254208)=>(_0x25a362,_0x2a4a1b)=>_0x254208(_0x25a362,_0x2a4a1b,_0x5c6fb7);let _0x5ec874=class extends _0x19df08[_0x52621c(0x16f)]{constructor(_0x8cb54e,_0x5de5f0){const _0x425452=_0x52621c;super(),this['_threadCommentDataSourceService']=_0x8cb54e,this[_0x425452(0x15c)]=_0x5de5f0,this[_0x425452(0x15f)]();}['_initDataSource'](){const _0x5348e1=_0x52621c;this['_threadCommentDataSourceService'][_0x5348e1(0x137)]=this['_threadCommentDataSource'],this[_0x5348e1(0x163)]['syncUpdateMutationToColla']=!0x1;}};_0x5ec874=_0x3836f6([_0x4ab953(0x0,_0x421745[_0x52621c(0x16c)]),_0x4ab953(0x1,_0x19df08[_0x52621c(0x1a5)](_0x2e7e20))],_0x5ec874);var _0x4c04c5=Object[_0x52621c(0x180)],_0x3e63bb=Object['getOwnPropertyDescriptor'],_0x1f131f=(_0x38f7ab,_0x38fb0c,_0xc45e0)=>_0x38fb0c in _0x38f7ab?_0x4c04c5(_0x38f7ab,_0x38fb0c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xc45e0}):_0x38f7ab[_0x38fb0c]=_0xc45e0,_0x17f52f=(_0xe783a7,_0x2ab9b0,_0xb2df55,_0x47a416)=>{const _0x19cee6=_0x52621c;for(var _0xd845e4=_0x47a416>0x1?void 0x0:_0x47a416?_0x3e63bb(_0x2ab9b0,_0xb2df55):_0x2ab9b0,_0x5e2687=_0xe783a7[_0x19cee6(0x189)]-0x1,_0x12e7a4;_0x5e2687>=0x0;_0x5e2687--)(_0x12e7a4=_0xe783a7[_0x5e2687])&&(_0xd845e4=_0x12e7a4(_0xd845e4)||_0xd845e4);return _0xd845e4;},_0x1b8b4d=(_0x7c6f04,_0x38886f)=>(_0x569c23,_0x32b914)=>_0x38886f(_0x569c23,_0x32b914,_0x7c6f04),_0x4130b6=(_0x44c847,_0x5990de,_0xf325f5)=>_0x1f131f(_0x44c847,typeof _0x5990de!=_0x52621c(0x15d)?_0x5990de+'':_0x5990de,_0xf325f5);_0x3a087b[_0x52621c(0x168)]=class extends _0x19df08[_0x52621c(0x14f)]{constructor(_0x4608b7=_0x2d7ec7,_0x30aa3e,_0x48a0fd){const _0x3e544d=_0x52621c;super(),this[_0x3e544d(0x184)]=_0x4608b7,this[_0x3e544d(0x13f)]=_0x30aa3e,this[_0x3e544d(0x14d)]=_0x48a0fd;const {..._0x59b1d8}=_0x19df08['merge']({},_0x2d7ec7,this[_0x3e544d(0x184)]);this[_0x3e544d(0x14d)][_0x3e544d(0x1aa)](_0x4b3d2e,_0x59b1d8);}[_0x52621c(0x1a0)](){const _0xd64399=_0x52621c;[[_0x2e7e20],[_0x5ec874],[_0x26214a]][_0xd64399(0x181)](_0x19ff3c=>{const _0x41296d=_0xd64399;this['_injector'][_0x41296d(0x198)](_0x19ff3c);});}[_0x52621c(0x18c)](){const _0xed3f3c=_0x52621c;this[_0xed3f3c(0x13f)]['get'](_0x5ec874),this[_0xed3f3c(0x13f)][_0xed3f3c(0x14a)](_0x26214a);}},_0x4130b6(_0x3a087b[_0x52621c(0x168)],_0x52621c(0x132),_0x2f1353),_0x4130b6(_0x3a087b['UniverThreadCommentDataSourcePlugin'],_0x52621c(0x1b2),_0x19df08[_0x52621c(0x1a6)][_0x52621c(0x152)]),_0x3a087b[_0x52621c(0x168)]=_0x17f52f([_0x19df08['DependentOn'](_0x16314d['UniverThreadCommentUIPlugin'],_0x323a48[_0x52621c(0x169)],_0x575afd[_0x52621c(0x135)]),_0x1b8b4d(0x1,_0x19df08['Inject'](_0x19df08[_0x52621c(0x13c)])),_0x1b8b4d(0x2,_0x19df08[_0x52621c(0x171)])],_0x3a087b['UniverThreadCommentDataSourcePlugin']),Object[_0x52621c(0x180)](_0x3a087b,Symbol[_0x52621c(0x12e)],{'value':'Module'});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.3-experimental.20250812-b4b6f1a",
3
+ "version": "0.10.3-nightly.202508150623",
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/collaboration-client": "0.10.3-experimental.20250812-b4b6f1a",
49
- "@univerjs-pro/license": "0.10.3-experimental.20250812-b4b6f1a",
50
- "@univerjs/core": "0.10.3-experimental.20250812-b4b6f1a",
51
- "@univerjs/network": "0.10.3-experimental.20250812-b4b6f1a",
52
- "@univerjs/thread-comment": "0.10.3-experimental.20250812-b4b6f1a",
48
+ "@univerjs-pro/collaboration-client": "0.10.3-nightly.202508150623",
49
+ "@univerjs-pro/license": "0.10.3-nightly.202508150623",
50
+ "@univerjs/network": "0.10.3-nightly.202508150623",
53
51
  "@univerjs/protocol": "0.1.47-alpha.0",
54
- "@univerjs/thread-comment-ui": "0.10.3-experimental.20250812-b4b6f1a"
52
+ "@univerjs/thread-comment-ui": "0.10.3-nightly.202508150623",
53
+ "@univerjs/thread-comment": "0.10.3-nightly.202508150623",
54
+ "@univerjs/core": "0.10.3-nightly.202508150623"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",