@univerjs-pro/thread-comment-datasource 0.9.3 → 0.9.4-nightly.202507290757

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 _0x537e25=_0x28fc;(function(_0x3d7770,_0x3ca40f){const _0x1b99c0=_0x28fc,_0x5735e2=_0x3d7770();while(!![]){try{const _0x569e07=parseInt(_0x1b99c0(0xc0))/0x1*(parseInt(_0x1b99c0(0x10e))/0x2)+-parseInt(_0x1b99c0(0xbf))/0x3*(parseInt(_0x1b99c0(0x11b))/0x4)+-parseInt(_0x1b99c0(0x123))/0x5+-parseInt(_0x1b99c0(0x116))/0x6*(parseInt(_0x1b99c0(0xdb))/0x7)+parseInt(_0x1b99c0(0x105))/0x8*(parseInt(_0x1b99c0(0xd9))/0x9)+parseInt(_0x1b99c0(0x10c))/0xa+parseInt(_0x1b99c0(0xf7))/0xb*(parseInt(_0x1b99c0(0x103))/0xc);if(_0x569e07===_0x3ca40f)break;else _0x5735e2['push'](_0x5735e2['shift']());}catch(_0x36b8a1){_0x5735e2['push'](_0x5735e2['shift']());}}}(_0x43e7,0x57a5f));Object[_0x537e25(0xaf)](exports,Symbol[_0x537e25(0x111)],{'value':_0x537e25(0x126)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x537e25(0xb0);var I=(_0x2f6e2b=>(_0x2f6e2b[_0x2f6e2b['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2f6e2b[_0x2f6e2b[_0x537e25(0xac)]=0x1]=_0x537e25(0xac),_0x2f6e2b[_0x2f6e2b['UNRECOGNIZED']=-0x1]=_0x537e25(0xf2),_0x2f6e2b))(I||{}),v=(_0x241dc0=>(_0x241dc0[_0x241dc0[_0x537e25(0x114)]=0x0]='Unknown',_0x241dc0[_0x241dc0['Add']=0x1]=_0x537e25(0xd4),_0x241dc0[_0x241dc0[_0x537e25(0x102)]=0x2]=_0x537e25(0x102),_0x241dc0[_0x241dc0[_0x537e25(0xc9)]=0x3]=_0x537e25(0xc9),_0x241dc0[_0x241dc0[_0x537e25(0x119)]=0x4]=_0x537e25(0x119),_0x241dc0[_0x241dc0['Solve']=0x5]='Solve',_0x241dc0[_0x241dc0[_0x537e25(0xf2)]=-0x1]=_0x537e25(0xf2),_0x241dc0))(v||{});const f=_0x599bf6=>c[_0x537e25(0xe1)](new Date(+_0x599bf6))['format'](_0x537e25(0xff)),R=async(_0x5b01e5,_0x554425)=>{const _0x148884=_0x537e25,_0x55092e=_0x5b01e5['get'](c[_0x148884(0xd7)]),_0xe91d8f=_0x5b01e5[_0x148884(0x109)](P['HTTPService']);_0x554425[_0x148884(0xe9)](_0x223e37=>{const _0x3e35c0=_0x148884;_0x55092e[_0x3e35c0(0xf9)](_0x223e37)&&_0x554425[_0x3e35c0(0x104)](_0x223e37);}),_0x554425[_0x148884(0x124)]&&(await _0xe91d8f[_0x148884(0x109)](_0x148884(0xd0),{'params':{'userIDs':[..._0x554425]}}))[_0x148884(0xe0)][_0x148884(0xf8)][_0x148884(0xe9)](_0x4b8757=>{const _0x99ae40=_0x148884;_0x4b8757&&_0x55092e[_0x99ae40(0xe3)](_0x4b8757);});};function _0x43e7(){const _0x52e6c0=['_initUserSync','getComment','UserManagerService','stringify','289287aIFvOA','userId','29869IdMftz','_config','root','add','rangeType','body','dayjs','getUnit','addUser','pluginName','unitId','map','UNIVER_UNKNOWN','replies','forEach','UniverThreadCommentUIPlugin','_threadCommentDataSourceService','user','/edit','/reply','replyId','/universer-api/comment/unit/','type','UNRECOGNIZED','OpenOrReOpen','IConfigService','_init','parentId','303039LlFzFk','users','getUser','_userService','values','HTTPService','find','_httpService','YYYY/MM/DD\x20HH:mm','UniverLicensePlugin','getOwnPropertyDescriptor','Reply','120xZqsxX','delete','8FlbzwJ','/solved','error','CommentService','get','payload','_commentService','6406120vdakte','merge','159754qOyxDF','customRanges','Disposable','toStringTag','resolved','rangeId','Unknown','Inject','318OksRSt','threadId','createTimestamp','Delete','subscribe','36oLTbjz','code','Solve','DependentOn','length','COMMENT','reply','disposeWithMe','1569295LGTVjU','size','UniverThreadCommentDataSourcePlugin','Module','Solved','addComment','content','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dataSource','_sessionService','onReady','resolveComment','userID','_injector','post','IThreadCommentDataSourceService','personId','bufferTime','slice','comments','pipe','setConfig','43035RSFaRi','1WklhnS','thread-comment-data-source.config','updateComment','/add','/delete','onStarting','ThreadCommentModel','getCurrentUser','parse','Edit','_configService','saveCommentToSnapshot','_initDataSource','filter','comment','requireSession','/universer-api/user/list','getMemberID','_threadCommentModel','solved','Add'];_0x43e7=function(){return _0x52e6c0;};return _0x43e7();}var $=Object[_0x537e25(0x101)],E=(_0x25f78d,_0x345e63,_0x26fe70,_0x338327)=>{const _0x22f9f1=_0x537e25;for(var _0x2fa20a=_0x338327>0x1?void 0x0:_0x338327?$(_0x345e63,_0x26fe70):_0x345e63,_0x4f2d5d=_0x25f78d[_0x22f9f1(0x11f)]-0x1,_0x3b679f;_0x4f2d5d>=0x0;_0x4f2d5d--)(_0x3b679f=_0x25f78d[_0x4f2d5d])&&(_0x2fa20a=_0x3b679f(_0x2fa20a)||_0x2fa20a);return _0x2fa20a;},S=(_0x3f8610,_0x3ab7f2)=>(_0x3c4136,_0x5c7990)=>_0x3ab7f2(_0x3c4136,_0x5c7990,_0x3f8610);function _0x28fc(_0x20aa04,_0x196297){const _0x43e73e=_0x43e7();return _0x28fc=function(_0x28fce2,_0x502005){_0x28fce2=_0x28fce2-0xac;let _0x143b90=_0x43e73e[_0x28fce2];return _0x143b90;},_0x28fc(_0x20aa04,_0x196297);}let p=class extends c['Disposable']{constructor(_0x436a32,_0x791b2f,_0x32ea79,_0x146f5e){const _0x1dec4b=_0x537e25;super(),this[_0x1dec4b(0x10b)]=_0x436a32,this[_0x1dec4b(0xd2)]=_0x791b2f,this[_0x1dec4b(0xfa)]=_0x32ea79,this[_0x1dec4b(0xb6)]=_0x146f5e,this[_0x1dec4b(0xf5)](),this[_0x1dec4b(0xd5)]();}[_0x537e25(0xd5)](){const _0x25c184=_0x537e25;this[_0x25c184(0x122)](this[_0x25c184(0xd2)]['commentUpdate$'][_0x25c184(0xbd)](w[_0x25c184(0xba)](0x10))[_0x25c184(0x11a)](_0x1044c0=>{const _0x45a007=_0x25c184,_0x53159b=new Set();_0x1044c0[_0x45a007(0xe9)](_0x48357a=>{const _0x287f3e=_0x45a007;switch(_0x48357a['type']){case _0x287f3e(0xde):{const _0x24bb2b=_0x48357a[_0x287f3e(0x10a)][_0x287f3e(0xb9)];_0x53159b[_0x287f3e(0xde)](_0x24bb2b);break;}}}),R(this[_0x45a007(0xb6)],_0x53159b);}));}[_0x537e25(0xf5)](){const _0x6b0ae6=_0x537e25;this[_0x6b0ae6(0x122)](this[_0x6b0ae6(0x10b)]['commentUpdate$'][_0x6b0ae6(0x11a)](async _0x2413c2=>{const _0x118ca4=_0x6b0ae6;var _0x291608,_0x56fc14,_0x3b23d7,_0x24e08f;const _0x29f28a=(_0x291608=this[_0x118ca4(0xd2)][_0x118ca4(0xe2)](_0x2413c2[_0x118ca4(0xe5)])[_0x118ca4(0xfd)](_0x2847a5=>_0x2847a5[_0x118ca4(0x117)]===_0x2413c2[_0x118ca4(0x117)]))==null?void 0x0:_0x291608[_0x118ca4(0xdd)];if(!_0x29f28a)return;const {unitId:_0x52d860,subUnitId:_0x56b0ff}=_0x29f28a;switch(_0x2413c2[_0x118ca4(0xec)]&&this[_0x118ca4(0xfa)][_0x118ca4(0xe3)](_0x2413c2[_0x118ca4(0xec)]),_0x2413c2[_0x118ca4(0xf1)]){case v[_0x118ca4(0xd4)]:break;case v['Reply']:{this[_0x118ca4(0xd2)][_0x118ca4(0xad)](_0x52d860,_0x56b0ff,{'unitId':_0x52d860,'subUnitId':_0x56b0ff,'ref':'','id':_0x2413c2[_0x118ca4(0xef)],'dT':f(+_0x2413c2[_0x118ca4(0x118)]),'threadId':_0x2413c2['threadId'],'personId':(_0x3b23d7=(_0x56fc14=_0x2413c2[_0x118ca4(0xec)])==null?void 0x0:_0x56fc14[_0x118ca4(0xb5)])!=null?_0x3b23d7:_0x2413c2['userId'],'text':JSON['parse'](_0x2413c2[_0x118ca4(0xae)]),'parentId':_0x29f28a['id']});break;}case v[_0x118ca4(0x119)]:{const _0x1a7c0c=this[_0x118ca4(0xd2)][_0x118ca4(0xd6)](_0x52d860,_0x56b0ff,_0x2413c2[_0x118ca4(0xef)]);_0x1a7c0c&&_0x1a7c0c[_0x118ca4(0xf6)]&&this[_0x118ca4(0xd2)]['deleteComment'](_0x52d860,_0x56b0ff,_0x2413c2[_0x118ca4(0xef)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x118ca4(0xc2)](_0x52d860,_0x56b0ff,{'commentId':_0x2413c2[_0x118ca4(0xef)],'text':JSON[_0x118ca4(0xc8)](_0x2413c2['content'])});break;}case v[_0x118ca4(0x11d)]:{const _0x33134f=(_0x24e08f=this[_0x118ca4(0xd2)][_0x118ca4(0xe2)](_0x2413c2['unitId'])['find'](_0x483573=>_0x483573['threadId']===_0x2413c2[_0x118ca4(0x117)]))==null?void 0x0:_0x24e08f[_0x118ca4(0xdd)];_0x33134f&&this['_threadCommentModel'][_0x118ca4(0xb4)](_0x52d860,_0x56b0ff,_0x33134f['id'],_0x2413c2[_0x118ca4(0xd3)]===I[_0x118ca4(0xac)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x537e25(0x108)])),S(0x1,c[_0x537e25(0x115)](M[_0x537e25(0xc6)])),S(0x2,c[_0x537e25(0x115)](c['UserManagerService'])),S(0x3,c[_0x537e25(0x115)](c['Injector']))],p);const q=_0x537e25(0xc1),D={};var A=Object[_0x537e25(0x101)],x=(_0x46b23a,_0x183003,_0x378d78,_0x5ac0e8)=>{for(var _0x2236a4=_0x5ac0e8>0x1?void 0x0:_0x5ac0e8?A(_0x183003,_0x378d78):_0x183003,_0x3e3f30=_0x46b23a['length']-0x1,_0x496946;_0x3e3f30>=0x0;_0x3e3f30--)(_0x496946=_0x46b23a[_0x3e3f30])&&(_0x2236a4=_0x496946(_0x2236a4)||_0x2236a4);return _0x2236a4;},_=(_0x544788,_0x59d85b)=>(_0x460181,_0xe5bcea)=>_0x59d85b(_0x460181,_0xe5bcea,_0x544788);function Y(_0xa4b98b,_0x17c63d){const _0x24f4b6=_0x537e25,_0x361ce3=_0xa4b98b[_0x24f4b6(0xe8)][0x0];return{..._0x17c63d,'id':_0x361ce3['replyId'],'resolved':_0xa4b98b[_0x24f4b6(0xd3)]===0x1,'dT':f(_0x361ce3[_0x24f4b6(0x118)]),'personId':_0x361ce3[_0x24f4b6(0xda)],'threadId':_0x361ce3[_0x24f4b6(0x117)]};}function G(_0xd166dc,_0x15ae85,_0x10ad5e){const _0x4bbde8=_0x537e25;var _0xbb440e,_0x480962;if(((_0x480962=(_0xbb440e=_0xd166dc==null?void 0x0:_0xd166dc['replies'])==null?void 0x0:_0xbb440e['length'])!=null?_0x480962:0x0)>0x0){const _0x18cefd=(_0x598173,_0x2a7359)=>({'id':_0x598173[_0x4bbde8(0xef)],'threadId':_0x598173['threadId'],'dT':f(_0x598173[_0x4bbde8(0x118)]),'personId':_0x598173['userId'],'resolved':_0xd166dc[_0x4bbde8(0xd3)]===I[_0x4bbde8(0xac)],'unitId':_0x15ae85,'subUnitId':_0x10ad5e,'text':JSON[_0x4bbde8(0xc8)](_0x598173[_0x4bbde8(0xae)]),'parentId':_0x2a7359}),_0x2e59fe=_0x18cefd(_0xd166dc[_0x4bbde8(0xe8)][0x0]);return{..._0x2e59fe,'children':_0xd166dc[_0x4bbde8(0xe8)][_0x4bbde8(0xbb)](0x1)[_0x4bbde8(0xe6)](_0x279bf7=>_0x18cefd(_0x279bf7,_0x2e59fe['id']))};}return null;}let g=class{constructor(_0x4fb84d,_0x4b9d39,_0x17ab6a,_0x2d5e5c){const _0x343df8=_0x537e25;this['_httpService']=_0x4fb84d,this[_0x343df8(0xfa)]=_0x4b9d39,this[_0x343df8(0xb2)]=_0x17ab6a,this[_0x343df8(0xb6)]=_0x2d5e5c;}async[_0x537e25(0xad)](_0xc35956){const _0x2d4571=_0x537e25;var _0x37dfe7,_0x9b3a4c;const {parentId:_0x52fdf0,unitId:_0x1ad11d,text:_0x3c89cb,threadId:_0x3a5c6f}=_0xc35956,_0x5a26c4=(_0x9b3a4c=(_0x37dfe7=_0x3c89cb['customRanges'])==null?void 0x0:_0x37dfe7['filter'](_0x5bdf15=>_0x5bdf15['rangeType']===c['CustomRangeType'][_0x2d4571(0x120)])[_0x2d4571(0xe6)](_0x4ae2a9=>_0x4ae2a9[_0x2d4571(0x113)]))!=null?_0x9b3a4c:[],_0x253c2e=JSON['stringify'](_0x3c89cb),_0x1c84ba=(await this[_0x2d4571(0xb2)][_0x2d4571(0xcf)](_0x1ad11d))[_0x2d4571(0xd1)]();if(_0x52fdf0){const _0x5aefae={'memberId':_0x1c84ba,'unitId':_0x1ad11d,'content':_0x253c2e,'mention':_0x5a26c4,'threadId':_0x3a5c6f},_0x200713=(await this[_0x2d4571(0xfe)]['post'](_0x2d4571(0xf0)+_0x1ad11d+_0x2d4571(0xee),{'body':_0x5aefae}))['body'][_0x2d4571(0x121)];return{..._0xc35956,'id':_0x200713['replyId'],'dT':c[_0x2d4571(0xe1)](+_0x200713[_0x2d4571(0x118)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x200713['userId']};}else{const _0x297e05={'memberId':_0x1c84ba,'unitId':_0x1ad11d,'content':_0x253c2e,'mention':_0x5a26c4},_0x5163bb=await this[_0x2d4571(0xfe)][_0x2d4571(0xb7)](_0x2d4571(0xf0)+_0x1ad11d+_0x2d4571(0xc3),{'body':_0x297e05});return Y(_0x5163bb[_0x2d4571(0xe0)][_0x2d4571(0xce)],_0xc35956);}}async[_0x537e25(0xc2)](_0x106ec9){const _0x2d6a23=_0x537e25;var _0x457b86,_0x4aa8f7;const {text:_0x3ae864,unitId:_0x482cc4}=_0x106ec9,_0x5eecc1=(_0x4aa8f7=(_0x457b86=_0x3ae864[_0x2d6a23(0x10f)])==null?void 0x0:_0x457b86[_0x2d6a23(0xcd)](_0x1e2b3c=>_0x1e2b3c[_0x2d6a23(0xdf)]===c['CustomRangeType'][_0x2d6a23(0x120)])['map'](_0x213ae3=>_0x213ae3[_0x2d6a23(0x113)]))!=null?_0x4aa8f7:[],_0x2274a0=JSON[_0x2d6a23(0xd8)](_0x3ae864),_0x551287=_0x106ec9['threadId'],_0x37e2b3=_0x106ec9['id'],_0x36fafc={'memberId':(await this[_0x2d6a23(0xb2)][_0x2d6a23(0xcf)](_0x482cc4))[_0x2d6a23(0xd1)](),'unitId':_0x482cc4,'threadId':_0x551287,'mention':_0x5eecc1,'content':_0x2274a0,'replyId':_0x37e2b3},_0x10f10a=await this['_httpService'][_0x2d6a23(0xb7)](_0x2d6a23(0xf0)+_0x482cc4+_0x2d6a23(0xed),{'body':_0x36fafc});return!_0x10f10a[_0x2d6a23(0xe0)][_0x2d6a23(0x107)]||_0x10f10a[_0x2d6a23(0xe0)]['error'][_0x2d6a23(0x11c)]===0x1;}async['resolveComment'](_0x38c9a9){const _0x3d63d8=_0x537e25,{unitId:_0x4444d6}=_0x38c9a9,_0x219343=_0x38c9a9[_0x3d63d8(0x117)],_0x44f15c={'memberId':this['_userService'][_0x3d63d8(0xc7)]()[_0x3d63d8(0xb5)],'unitId':_0x4444d6,'threadId':_0x219343,'solved':_0x38c9a9[_0x3d63d8(0x112)]?I[_0x3d63d8(0xac)]:I[_0x3d63d8(0xf3)]},_0x1351d7=await this[_0x3d63d8(0xfe)]['post'](_0x3d63d8(0xf0)+_0x4444d6+_0x3d63d8(0x106),{'body':_0x44f15c});return!_0x1351d7[_0x3d63d8(0xe0)][_0x3d63d8(0x107)]||_0x1351d7[_0x3d63d8(0xe0)]['error']['code']===0x1;}async['deleteComment'](_0xb0cb48,_0xf5b0fd,_0x33803c,_0x44fa68){const _0x3a4ec4=_0x537e25,_0x16431a={'memberId':(await this[_0x3a4ec4(0xb2)][_0x3a4ec4(0xcf)](_0xb0cb48))[_0x3a4ec4(0xd1)](),'threadId':_0x33803c,'replyId':_0x44fa68,'unitId':_0xb0cb48},_0x58318=await this[_0x3a4ec4(0xfe)][_0x3a4ec4(0xb7)](_0x3a4ec4(0xf0)+_0xb0cb48+_0x3a4ec4(0xc4),{'body':_0x16431a});return!_0x58318['body'][_0x3a4ec4(0x107)]||_0x58318[_0x3a4ec4(0xe0)][_0x3a4ec4(0x107)][_0x3a4ec4(0x11c)]===0x1;}async['listComments'](_0x2c4ad8,_0x4a695b,_0x5ed734){const _0x4f82ad=_0x537e25,_0x53023c={'unitId':_0x2c4ad8,'threadId':_0x5ed734},_0x30a8bc=await this['_httpService'][_0x4f82ad(0xb7)](_0x4f82ad(0xf0)+_0x2c4ad8+'/list',{'body':_0x53023c}),_0x44a6d9=_0x5ed734[_0x4f82ad(0xe6)](_0xe1820=>G(_0x30a8bc[_0x4f82ad(0xe0)][_0x4f82ad(0xbc)][_0xe1820],_0x2c4ad8,_0x4a695b))[_0x4f82ad(0xcd)](Boolean);return Object[_0x4f82ad(0xfb)](_0x30a8bc[_0x4f82ad(0xe0)][_0x4f82ad(0xf8)])[_0x4f82ad(0xe9)](_0x418acb=>{const _0x570462=_0x4f82ad;this[_0x570462(0xfa)]['addUser'](_0x418acb);}),_0x44a6d9;}[_0x537e25(0xcb)](_0x591586){return{'id':_0x591586['id'],'threadId':_0x591586['threadId'],'ref':_0x591586['ref']};}};g=x([_(0x0,c[_0x537e25(0x115)](P[_0x537e25(0xfc)])),_(0x1,c[_0x537e25(0x115)](c[_0x537e25(0xd7)])),_(0x2,c[_0x537e25(0x115)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x537e25(0x101)],J=(_0xca9081,_0x393739,_0x4926a6,_0x1e62ec)=>{for(var _0x1f3bd=_0x1e62ec>0x1?void 0x0:_0x1e62ec?H(_0x393739,_0x4926a6):_0x393739,_0x3e06ed=_0xca9081['length']-0x1,_0x3f1fb1;_0x3e06ed>=0x0;_0x3e06ed--)(_0x3f1fb1=_0xca9081[_0x3e06ed])&&(_0x1f3bd=_0x3f1fb1(_0x1f3bd)||_0x1f3bd);return _0x1f3bd;},y=(_0x510d14,_0xe382f1)=>(_0x5bc488,_0x5aba03)=>_0xe382f1(_0x5bc488,_0x5aba03,_0x510d14);let C=class extends c[_0x537e25(0x110)]{constructor(_0x41313a,_0xcf6f00){const _0x38f279=_0x537e25;super(),this['_threadCommentDataSourceService']=_0x41313a,this['_threadCommentDataSource']=_0xcf6f00,this[_0x38f279(0xcc)]();}[_0x537e25(0xcc)](){const _0x43fcdf=_0x537e25;this[_0x43fcdf(0xeb)][_0x43fcdf(0xb1)]=this['_threadCommentDataSource'],this[_0x43fcdf(0xeb)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x537e25(0xb8)]),y(0x1,c[_0x537e25(0x115)](g))],C);var F=Object[_0x537e25(0xaf)],L=Object[_0x537e25(0x101)],Z=(_0x483c4c,_0x561605,_0x19c3c9)=>_0x561605 in _0x483c4c?F(_0x483c4c,_0x561605,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x19c3c9}):_0x483c4c[_0x561605]=_0x19c3c9,W=(_0x1dccb7,_0x2e8fcc,_0x548089,_0x3429dd)=>{for(var _0x3e8f5b=_0x3429dd>0x1?void 0x0:_0x3429dd?L(_0x2e8fcc,_0x548089):_0x2e8fcc,_0x97b84d=_0x1dccb7['length']-0x1,_0x129f1c;_0x97b84d>=0x0;_0x97b84d--)(_0x129f1c=_0x1dccb7[_0x97b84d])&&(_0x3e8f5b=_0x129f1c(_0x3e8f5b)||_0x3e8f5b);return _0x3e8f5b;},O=(_0x21ef7d,_0x5e11d9)=>(_0x4acc8c,_0x3ad932)=>_0x5e11d9(_0x4acc8c,_0x3ad932,_0x21ef7d),N=(_0x3901bf,_0x503a5d,_0x155087)=>Z(_0x3901bf,typeof _0x503a5d!='symbol'?_0x503a5d+'':_0x503a5d,_0x155087);exports[_0x537e25(0x125)]=class extends c['Plugin']{constructor(_0x182ebd=D,_0x2608c8,_0x5840d8){const _0xf15156=_0x537e25;super(),this[_0xf15156(0xdc)]=_0x182ebd,this[_0xf15156(0xb6)]=_0x2608c8,this[_0xf15156(0xca)]=_0x5840d8;const {..._0xf23c28}=c[_0xf15156(0x10d)]({},D,this[_0xf15156(0xdc)]);this[_0xf15156(0xca)][_0xf15156(0xbe)](q,_0xf23c28);}[_0x537e25(0xc5)](){[[g],[C],[p]]['forEach'](_0x216b4e=>{const _0x185a8d=_0x28fc;this['_injector'][_0x185a8d(0xde)](_0x216b4e);});}[_0x537e25(0xb3)](){const _0xcf05d9=_0x537e25;this[_0xcf05d9(0xb6)][_0xcf05d9(0x109)](C),this[_0xcf05d9(0xb6)][_0xcf05d9(0x109)](p);}},N(exports[_0x537e25(0x125)],_0x537e25(0xe4),U),N(exports[_0x537e25(0x125)],_0x537e25(0xf1),c['UniverInstanceType'][_0x537e25(0xe7)]),exports[_0x537e25(0x125)]=W([c[_0x537e25(0x11e)](j[_0x537e25(0xea)],b['UniverCollaborationClientPlugin'],T[_0x537e25(0x100)]),O(0x1,c[_0x537e25(0x115)](c['Injector'])),O(0x2,c[_0x537e25(0xf4)])],exports[_0x537e25(0x125)]);
1
+ 'use strict';const _0x46ea9f=_0x52c6;(function(_0x3f87ae,_0x4889e0){const _0x57fd15=_0x52c6,_0x27c6d8=_0x3f87ae();while(!![]){try{const _0x21d126=parseInt(_0x57fd15(0x1ee))/0x1+-parseInt(_0x57fd15(0x1c3))/0x2*(-parseInt(_0x57fd15(0x19e))/0x3)+parseInt(_0x57fd15(0x1e0))/0x4*(parseInt(_0x57fd15(0x1a3))/0x5)+-parseInt(_0x57fd15(0x19d))/0x6*(parseInt(_0x57fd15(0x1ba))/0x7)+parseInt(_0x57fd15(0x1d7))/0x8+-parseInt(_0x57fd15(0x1b7))/0x9*(parseInt(_0x57fd15(0x1ec))/0xa)+-parseInt(_0x57fd15(0x1b3))/0xb;if(_0x21d126===_0x4889e0)break;else _0x27c6d8['push'](_0x27c6d8['shift']());}catch(_0x20f4f6){_0x27c6d8['push'](_0x27c6d8['shift']());}}}(_0x14f8,0x78396));Object[_0x46ea9f(0x1d0)](exports,Symbol['toStringTag'],{'value':_0x46ea9f(0x1ca)});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=_0x46ea9f(0x1af);var I=(_0x5eabe6=>(_0x5eabe6[_0x5eabe6[_0x46ea9f(0x1b1)]=0x0]=_0x46ea9f(0x1b1),_0x5eabe6[_0x5eabe6[_0x46ea9f(0x1f2)]=0x1]=_0x46ea9f(0x1f2),_0x5eabe6[_0x5eabe6['UNRECOGNIZED']=-0x1]=_0x46ea9f(0x1d2),_0x5eabe6))(I||{}),v=(_0x358b55=>(_0x358b55[_0x358b55['Unknown']=0x0]=_0x46ea9f(0x1bb),_0x358b55[_0x358b55[_0x46ea9f(0x1cc)]=0x1]=_0x46ea9f(0x1cc),_0x358b55[_0x358b55['Reply']=0x2]=_0x46ea9f(0x1f5),_0x358b55[_0x358b55[_0x46ea9f(0x1c6)]=0x3]=_0x46ea9f(0x1c6),_0x358b55[_0x358b55[_0x46ea9f(0x1db)]=0x4]='Delete',_0x358b55[_0x358b55[_0x46ea9f(0x1f8)]=0x5]=_0x46ea9f(0x1f8),_0x358b55[_0x358b55['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x358b55))(v||{});const f=_0x46d4e0=>c['dayjs'](new Date(+_0x46d4e0))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x9c74c,_0x3b9fa9)=>{const _0xc88ff2=_0x46ea9f,_0x4980ce=_0x9c74c['get'](c['UserManagerService']),_0x5452cc=_0x9c74c[_0xc88ff2(0x1bd)](P[_0xc88ff2(0x195)]);_0x3b9fa9['forEach'](_0x364c44=>{const _0x2f9839=_0xc88ff2;_0x4980ce[_0x2f9839(0x1a5)](_0x364c44)&&_0x3b9fa9[_0x2f9839(0x1b0)](_0x364c44);}),_0x3b9fa9[_0xc88ff2(0x1eb)]&&(await _0x5452cc[_0xc88ff2(0x1bd)](_0xc88ff2(0x1c5),{'params':{'userIDs':[..._0x3b9fa9]}}))[_0xc88ff2(0x189)][_0xc88ff2(0x185)][_0xc88ff2(0x1f0)](_0x51b101=>{const _0x5e52bd=_0xc88ff2;_0x51b101&&_0x4980ce[_0x5e52bd(0x1aa)](_0x51b101);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x29e8d8,_0x21665f,_0x2d7b0c,_0x582420)=>{const _0x93c9c0=_0x46ea9f;for(var _0x5f3dc8=_0x582420>0x1?void 0x0:_0x582420?$(_0x21665f,_0x2d7b0c):_0x21665f,_0x120084=_0x29e8d8[_0x93c9c0(0x1e5)]-0x1,_0x2d96f8;_0x120084>=0x0;_0x120084--)(_0x2d96f8=_0x29e8d8[_0x120084])&&(_0x5f3dc8=_0x2d96f8(_0x5f3dc8)||_0x5f3dc8);return _0x5f3dc8;},S=(_0x571aab,_0x55a032)=>(_0x23327d,_0xd95672)=>_0x55a032(_0x23327d,_0xd95672,_0x571aab);function _0x52c6(_0x37df04,_0x17983d){const _0x14f834=_0x14f8();return _0x52c6=function(_0x52c6d0,_0x2ef85f){_0x52c6d0=_0x52c6d0-0x184;let _0x2a2d9f=_0x14f834[_0x52c6d0];return _0x2a2d9f;},_0x52c6(_0x37df04,_0x17983d);}let _=class extends c[_0x46ea9f(0x1ce)]{constructor(_0x1a7384,_0x548dea,_0x52d99d,_0x49935b){const _0x1534e9=_0x46ea9f;super(),this[_0x1534e9(0x188)]=_0x1a7384,this[_0x1534e9(0x1e1)]=_0x548dea,this[_0x1534e9(0x198)]=_0x52d99d,this[_0x1534e9(0x1b2)]=_0x49935b,this['_init'](),this[_0x1534e9(0x1ac)]();}['_initUserSync'](){const _0x4af199=_0x46ea9f;this[_0x4af199(0x1d9)](this[_0x4af199(0x1e1)][_0x4af199(0x18b)][_0x4af199(0x1e7)](j[_0x4af199(0x187)](0x10))[_0x4af199(0x1d5)](_0x39f82e=>{const _0x4a45e4=_0x4af199,_0x5129fd=new Set();_0x39f82e[_0x4a45e4(0x1f0)](_0x325c17=>{const _0x148609=_0x4a45e4;switch(_0x325c17[_0x148609(0x1cf)]){case _0x148609(0x1b4):{const _0x4f4e60=_0x325c17[_0x148609(0x1d4)][_0x148609(0x19b)];_0x5129fd['add'](_0x4f4e60);break;}}}),R(this[_0x4a45e4(0x1b2)],_0x5129fd);}));}[_0x46ea9f(0x1a9)](){const _0x5e6ec8=_0x46ea9f;this[_0x5e6ec8(0x1d9)](this[_0x5e6ec8(0x188)][_0x5e6ec8(0x18b)][_0x5e6ec8(0x1d5)](async _0x2ff537=>{const _0x24567d=_0x5e6ec8;var _0xb3e1b7,_0xa7c448,_0x17e164,_0x1410b8;const _0x5d600d=(_0xb3e1b7=this[_0x24567d(0x1e1)][_0x24567d(0x19f)](_0x2ff537['unitId'])[_0x24567d(0x1c0)](_0x4c3149=>_0x4c3149['threadId']===_0x2ff537[_0x24567d(0x1d1)]))==null?void 0x0:_0xb3e1b7['root'];if(!_0x5d600d)return;const {unitId:_0x35cf0,subUnitId:_0x42b804}=_0x5d600d;switch(_0x2ff537['user']&&this[_0x24567d(0x198)][_0x24567d(0x1aa)](_0x2ff537['user']),_0x2ff537['type']){case v[_0x24567d(0x1cc)]:break;case v[_0x24567d(0x1f5)]:{this[_0x24567d(0x1e1)][_0x24567d(0x1a0)](_0x35cf0,_0x42b804,{'unitId':_0x35cf0,'subUnitId':_0x42b804,'ref':'','id':_0x2ff537['replyId'],'dT':f(+_0x2ff537[_0x24567d(0x1c1)]),'threadId':_0x2ff537['threadId'],'personId':(_0x17e164=(_0xa7c448=_0x2ff537['user'])==null?void 0x0:_0xa7c448[_0x24567d(0x1a2)])!=null?_0x17e164:_0x2ff537[_0x24567d(0x1f4)],'text':JSON[_0x24567d(0x199)](_0x2ff537['content']),'parentId':_0x5d600d['id']});break;}case v['Delete']:{const _0x35245c=this[_0x24567d(0x1e1)]['getComment'](_0x35cf0,_0x42b804,_0x2ff537[_0x24567d(0x1ed)]);_0x35245c&&_0x35245c[_0x24567d(0x193)]&&this[_0x24567d(0x1e1)]['deleteComment'](_0x35cf0,_0x42b804,_0x2ff537['replyId']);break;}case v[_0x24567d(0x1c6)]:{this[_0x24567d(0x1e1)]['updateComment'](_0x35cf0,_0x42b804,{'commentId':_0x2ff537['replyId'],'text':JSON['parse'](_0x2ff537[_0x24567d(0x18a)])});break;}case v[_0x24567d(0x1f8)]:{const _0x3d193d=(_0x1410b8=this[_0x24567d(0x1e1)][_0x24567d(0x19f)](_0x2ff537[_0x24567d(0x1df)])[_0x24567d(0x1c0)](_0x1323f1=>_0x1323f1['threadId']===_0x2ff537[_0x24567d(0x1d1)]))==null?void 0x0:_0x1410b8[_0x24567d(0x1d3)];_0x3d193d&&this[_0x24567d(0x1e1)][_0x24567d(0x1a6)](_0x35cf0,_0x42b804,_0x3d193d['id'],_0x2ff537['solved']===I[_0x24567d(0x1f2)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x46ea9f(0x1b6)])),S(0x1,c[_0x46ea9f(0x192)](M[_0x46ea9f(0x1a4)])),S(0x2,c['Inject'](c[_0x46ea9f(0x1c4)])),S(0x3,c[_0x46ea9f(0x192)](c[_0x46ea9f(0x184)]))],_);const q=_0x46ea9f(0x1dc),D={};var A=Object[_0x46ea9f(0x1bc)],x=(_0x3d1b94,_0x4e0e81,_0x13ecbd,_0x27c93d)=>{const _0x1af105=_0x46ea9f;for(var _0x1664c0=_0x27c93d>0x1?void 0x0:_0x27c93d?A(_0x4e0e81,_0x13ecbd):_0x4e0e81,_0x3be72f=_0x3d1b94[_0x1af105(0x1e5)]-0x1,_0x5c67e4;_0x3be72f>=0x0;_0x3be72f--)(_0x5c67e4=_0x3d1b94[_0x3be72f])&&(_0x1664c0=_0x5c67e4(_0x1664c0)||_0x1664c0);return _0x1664c0;},C=(_0x2c6b04,_0x43dd2a)=>(_0x176b12,_0x2b0a83)=>_0x43dd2a(_0x176b12,_0x2b0a83,_0x2c6b04);function Y(_0x149563,_0x194167){const _0x1b7e46=_0x46ea9f,_0x4bf5aa=_0x149563['replies'][0x0];return{..._0x194167,'id':_0x4bf5aa['replyId'],'resolved':_0x149563[_0x1b7e46(0x1bf)]===0x1,'dT':f(_0x4bf5aa[_0x1b7e46(0x1c1)]),'personId':_0x4bf5aa[_0x1b7e46(0x1f4)],'threadId':_0x4bf5aa['threadId']};}function G(_0x837d8b,_0x4e394f,_0x3eadcc){const _0x18a17c=_0x46ea9f;var _0x5979a0,_0x583e68;if(((_0x583e68=(_0x5979a0=_0x837d8b==null?void 0x0:_0x837d8b[_0x18a17c(0x1e2)])==null?void 0x0:_0x5979a0[_0x18a17c(0x1e5)])!=null?_0x583e68:0x0)>0x0){const _0x1c46ab=(_0xcf3c47,_0x2a86e8)=>({'id':_0xcf3c47[_0x18a17c(0x1ed)],'threadId':_0xcf3c47[_0x18a17c(0x1d1)],'dT':f(_0xcf3c47[_0x18a17c(0x1c1)]),'personId':_0xcf3c47[_0x18a17c(0x1f4)],'resolved':_0x837d8b[_0x18a17c(0x1bf)]===I[_0x18a17c(0x1f2)],'unitId':_0x4e394f,'subUnitId':_0x3eadcc,'text':JSON[_0x18a17c(0x199)](_0xcf3c47['content']),'parentId':_0x2a86e8}),_0x3f8302=_0x1c46ab(_0x837d8b['replies'][0x0]);return{..._0x3f8302,'children':_0x837d8b[_0x18a17c(0x1e2)]['slice'](0x1)[_0x18a17c(0x1f6)](_0x34caf1=>_0x1c46ab(_0x34caf1,_0x3f8302['id']))};}return null;}function _0x14f8(){const _0x5e9249=['length','YYYY/MM/DD\x20HH:mm','pipe','filter','UniverThreadCommentDataSourcePlugin','saveCommentToSnapshot','size','58980yBpZnl','replyId','541011MqpnJZ','format','forEach','onStarting','Solved','_config','userId','Reply','map','/list','Solve','customRanges','UniverInstanceType','Injector','users','_sessionService','bufferTime','_commentService','body','content','commentUpdate$','_threadCommentDataSourceService','_threadCommentDataSource','pluginName','post','getCurrentUser','/add','Inject','parentId','getMemberID','HTTPService','error','_initDataSource','_userService','parse','_httpService','personId','stringify','15834nmNDIl','3WWvbaw','getUnit','addComment','UniverLicensePlugin','userID','5OTPCkm','ThreadCommentModel','getUser','resolveComment','_configService','dataSource','_init','addUser','/universer-api/comment/unit/','_initUserSync','requireSession','setConfig','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','delete','OpenOrReOpen','_injector','6149209GxLtGT','add','code','CommentService','333HgGULN','UniverThreadCommentUIPlugin','symbol','2135jHutRc','Unknown','getOwnPropertyDescriptor','get','onReady','solved','find','createTimestamp','UniverCollaborationClientPlugin','1087342qSiWfK','UserManagerService','/universer-api/user/list','Edit','dayjs','CustomRangeType','comments','Module','comment','Add','merge','Disposable','type','defineProperty','threadId','UNRECOGNIZED','root','payload','subscribe','/solved','4779160QGJEYG','values','disposeWithMe','rangeId','Delete','thread-comment-data-source.config','updateComment','COMMENT','unitId','1570004ipUpYY','_threadCommentModel','replies','rangeType','Plugin'];_0x14f8=function(){return _0x5e9249;};return _0x14f8();}let p=class{constructor(_0x4fd72f,_0x28463e,_0x452359){const _0x376717=_0x46ea9f;this[_0x376717(0x19a)]=_0x4fd72f,this['_userService']=_0x28463e,this[_0x376717(0x186)]=_0x452359;}async['addComment'](_0x36041f){const _0x33944e=_0x46ea9f;var _0x2037c6,_0x21ca2e;const {parentId:_0x29b7c3,unitId:_0x3d6210,text:_0x591fe6,threadId:_0x4816b2}=_0x36041f,_0x34ade7=(_0x21ca2e=(_0x2037c6=_0x591fe6['customRanges'])==null?void 0x0:_0x2037c6['filter'](_0x2bd5e8=>_0x2bd5e8[_0x33944e(0x1e3)]===c[_0x33944e(0x1c8)]['COMMENT'])[_0x33944e(0x1f6)](_0x1743db=>_0x1743db[_0x33944e(0x1da)]))!=null?_0x21ca2e:[],_0x48727b=JSON['stringify'](_0x591fe6),_0x2c8b57=(await this[_0x33944e(0x186)][_0x33944e(0x1ad)](_0x3d6210))[_0x33944e(0x194)]();if(_0x29b7c3){const _0x25f177={'memberId':_0x2c8b57,'unitId':_0x3d6210,'content':_0x48727b,'mention':_0x34ade7,'threadId':_0x4816b2},_0x231572=(await this[_0x33944e(0x19a)]['post']('/universer-api/comment/unit/'+_0x3d6210+'/reply',{'body':_0x25f177}))[_0x33944e(0x189)]['reply'];return{..._0x36041f,'id':_0x231572['replyId'],'dT':c[_0x33944e(0x1c7)](+_0x231572['createTimestamp'])[_0x33944e(0x1ef)](_0x33944e(0x1e6)),'personId':_0x231572[_0x33944e(0x1f4)]};}else{const _0x908660={'memberId':_0x2c8b57,'unitId':_0x3d6210,'content':_0x48727b,'mention':_0x34ade7},_0x58b3c3=await this[_0x33944e(0x19a)][_0x33944e(0x18f)](_0x33944e(0x1ab)+_0x3d6210+_0x33944e(0x191),{'body':_0x908660});return Y(_0x58b3c3[_0x33944e(0x189)][_0x33944e(0x1cb)],_0x36041f);}}async[_0x46ea9f(0x1dd)](_0x2317c1){const _0x4c5eb7=_0x46ea9f;var _0x590a8b,_0x52622b;const {text:_0x2c90b7,unitId:_0x57e752}=_0x2317c1,_0x3b4419=(_0x52622b=(_0x590a8b=_0x2c90b7[_0x4c5eb7(0x1f9)])==null?void 0x0:_0x590a8b[_0x4c5eb7(0x1e8)](_0x4ed0c2=>_0x4ed0c2['rangeType']===c[_0x4c5eb7(0x1c8)][_0x4c5eb7(0x1de)])[_0x4c5eb7(0x1f6)](_0x348c56=>_0x348c56[_0x4c5eb7(0x1da)]))!=null?_0x52622b:[],_0x569795=JSON[_0x4c5eb7(0x19c)](_0x2c90b7),_0xb3cbb5=_0x2317c1[_0x4c5eb7(0x1d1)],_0x41724f=_0x2317c1['id'],_0x436fcf={'memberId':(await this[_0x4c5eb7(0x186)]['requireSession'](_0x57e752))[_0x4c5eb7(0x194)](),'unitId':_0x57e752,'threadId':_0xb3cbb5,'mention':_0x3b4419,'content':_0x569795,'replyId':_0x41724f},_0x5e43a7=await this[_0x4c5eb7(0x19a)][_0x4c5eb7(0x18f)]('/universer-api/comment/unit/'+_0x57e752+'/edit',{'body':_0x436fcf});return!_0x5e43a7['body']['error']||_0x5e43a7[_0x4c5eb7(0x189)][_0x4c5eb7(0x196)][_0x4c5eb7(0x1b5)]===0x1;}async['resolveComment'](_0x3f5350){const _0x15172f=_0x46ea9f,{unitId:_0x2b3ba3}=_0x3f5350,_0x3d7d1e=_0x3f5350[_0x15172f(0x1d1)],_0x21057a={'memberId':this[_0x15172f(0x198)][_0x15172f(0x190)]()[_0x15172f(0x1a2)],'unitId':_0x2b3ba3,'threadId':_0x3d7d1e,'solved':_0x3f5350['resolved']?I[_0x15172f(0x1f2)]:I['OpenOrReOpen']},_0x5e7ec5=await this['_httpService']['post'](_0x15172f(0x1ab)+_0x2b3ba3+_0x15172f(0x1d6),{'body':_0x21057a});return!_0x5e7ec5[_0x15172f(0x189)][_0x15172f(0x196)]||_0x5e7ec5[_0x15172f(0x189)]['error']['code']===0x1;}async['deleteComment'](_0x594d61,_0x38e5c3,_0x34dbe5,_0x4fcadc){const _0x524e6a=_0x46ea9f,_0x52a4a1={'memberId':(await this['_sessionService']['requireSession'](_0x594d61))['getMemberID'](),'threadId':_0x34dbe5,'replyId':_0x4fcadc,'unitId':_0x594d61},_0x2b752a=await this[_0x524e6a(0x19a)][_0x524e6a(0x18f)](_0x524e6a(0x1ab)+_0x594d61+'/delete',{'body':_0x52a4a1});return!_0x2b752a['body'][_0x524e6a(0x196)]||_0x2b752a[_0x524e6a(0x189)]['error']['code']===0x1;}async['listComments'](_0x1ec326,_0x4c8df0,_0x2f4dd3){const _0x569201=_0x46ea9f,_0x403c3c={'unitId':_0x1ec326,'threadId':_0x2f4dd3},_0x264067=await this[_0x569201(0x19a)][_0x569201(0x18f)]('/universer-api/comment/unit/'+_0x1ec326+_0x569201(0x1f7),{'body':_0x403c3c}),_0x2745be=_0x2f4dd3[_0x569201(0x1f6)](_0x283461=>G(_0x264067[_0x569201(0x189)][_0x569201(0x1c9)][_0x283461],_0x1ec326,_0x4c8df0))[_0x569201(0x1e8)](Boolean);return Object[_0x569201(0x1d8)](_0x264067[_0x569201(0x189)]['users'])['forEach'](_0x18e2e4=>{const _0x48b0cd=_0x569201;this[_0x48b0cd(0x198)][_0x48b0cd(0x1aa)](_0x18e2e4);}),_0x2745be;}[_0x46ea9f(0x1ea)](_0x40cd8e){const _0x3c223f=_0x46ea9f;return{'id':_0x40cd8e['id'],'threadId':_0x40cd8e[_0x3c223f(0x1d1)],'ref':_0x40cd8e['ref']};}};p=x([C(0x0,c['Inject'](P[_0x46ea9f(0x195)])),C(0x1,c['Inject'](c[_0x46ea9f(0x1c4)])),C(0x2,c['Inject'](b['CollaborationSessionService']))],p);var H=Object[_0x46ea9f(0x1bc)],J=(_0x25d567,_0x1a11ff,_0x16d2f9,_0x1f877a)=>{const _0x367753=_0x46ea9f;for(var _0x5198ec=_0x1f877a>0x1?void 0x0:_0x1f877a?H(_0x1a11ff,_0x16d2f9):_0x1a11ff,_0x3359dd=_0x25d567[_0x367753(0x1e5)]-0x1,_0x245c79;_0x3359dd>=0x0;_0x3359dd--)(_0x245c79=_0x25d567[_0x3359dd])&&(_0x5198ec=_0x245c79(_0x5198ec)||_0x5198ec);return _0x5198ec;},y=(_0x8b87f6,_0x3d108d)=>(_0x112a7f,_0x1b1849)=>_0x3d108d(_0x112a7f,_0x1b1849,_0x8b87f6);let g=class extends c[_0x46ea9f(0x1ce)]{constructor(_0x1d69fd,_0x26c073){const _0x533c26=_0x46ea9f;super(),this[_0x533c26(0x18c)]=_0x1d69fd,this[_0x533c26(0x18d)]=_0x26c073,this[_0x533c26(0x197)]();}[_0x46ea9f(0x197)](){const _0x538122=_0x46ea9f;this['_threadCommentDataSourceService'][_0x538122(0x1a8)]=this['_threadCommentDataSource'],this[_0x538122(0x18c)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x46ea9f(0x192)](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x102305,_0x28cc25,_0x5e0209)=>_0x28cc25 in _0x102305?F(_0x102305,_0x28cc25,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e0209}):_0x102305[_0x28cc25]=_0x5e0209,W=(_0x70e7f7,_0x45f96d,_0x3765ed,_0x4991c1)=>{for(var _0x1bde35=_0x4991c1>0x1?void 0x0:_0x4991c1?L(_0x45f96d,_0x3765ed):_0x45f96d,_0x82f9cb=_0x70e7f7['length']-0x1,_0x2ef1eb;_0x82f9cb>=0x0;_0x82f9cb--)(_0x2ef1eb=_0x70e7f7[_0x82f9cb])&&(_0x1bde35=_0x2ef1eb(_0x1bde35)||_0x1bde35);return _0x1bde35;},O=(_0xe86a82,_0x241ba7)=>(_0x21dc17,_0xa91f42)=>_0x241ba7(_0x21dc17,_0xa91f42,_0xe86a82),N=(_0x3f4983,_0x358a5e,_0x319a39)=>Z(_0x3f4983,typeof _0x358a5e!=_0x46ea9f(0x1b9)?_0x358a5e+'':_0x358a5e,_0x319a39);exports[_0x46ea9f(0x1e9)]=class extends c[_0x46ea9f(0x1e4)]{constructor(_0x38bcfc=D,_0x592bd7,_0x566e31){const _0x32288a=_0x46ea9f;super(),this[_0x32288a(0x1f3)]=_0x38bcfc,this[_0x32288a(0x1b2)]=_0x592bd7,this[_0x32288a(0x1a7)]=_0x566e31;const {..._0x1d04a9}=c[_0x32288a(0x1cd)]({},D,this['_config']);this[_0x32288a(0x1a7)][_0x32288a(0x1ae)](q,_0x1d04a9);}[_0x46ea9f(0x1f1)](){[[p],[g],[_]]['forEach'](_0x242fbb=>{const _0x435dfc=_0x52c6;this['_injector'][_0x435dfc(0x1b4)](_0x242fbb);});}[_0x46ea9f(0x1be)](){const _0x534ced=_0x46ea9f;this[_0x534ced(0x1b2)]['get'](g),this[_0x534ced(0x1b2)]['get'](_);}},N(exports[_0x46ea9f(0x1e9)],_0x46ea9f(0x18e),U),N(exports[_0x46ea9f(0x1e9)],_0x46ea9f(0x1cf),c[_0x46ea9f(0x1fa)]['UNIVER_UNKNOWN']),exports[_0x46ea9f(0x1e9)]=W([c['DependentOn'](w[_0x46ea9f(0x1b8)],b[_0x46ea9f(0x1c2)],T[_0x46ea9f(0x1a1)]),O(0x1,c[_0x46ea9f(0x192)](c[_0x46ea9f(0x184)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- function _0x4119(_0x33c396,_0x7ecedc){const _0x3a31fa=_0x3a31();return _0x4119=function(_0x411952,_0x372456){_0x411952=_0x411952-0xab;let _0x2b7fee=_0x3a31fa[_0x411952];return _0x2b7fee;},_0x4119(_0x33c396,_0x7ecedc);}const _0x425e5f=_0x4119;(function(_0x4e8257,_0x4fb90c){const _0x64ad97=_0x4119,_0x46e20c=_0x4e8257();while(!![]){try{const _0x4641a8=-parseInt(_0x64ad97(0xab))/0x1*(-parseInt(_0x64ad97(0xc0))/0x2)+-parseInt(_0x64ad97(0x103))/0x3+-parseInt(_0x64ad97(0xfd))/0x4*(parseInt(_0x64ad97(0x10f))/0x5)+-parseInt(_0x64ad97(0xf6))/0x6*(parseInt(_0x64ad97(0xb9))/0x7)+parseInt(_0x64ad97(0xc1))/0x8*(parseInt(_0x64ad97(0xdf))/0x9)+-parseInt(_0x64ad97(0xbe))/0xa+-parseInt(_0x64ad97(0xd7))/0xb*(-parseInt(_0x64ad97(0xdc))/0xc);if(_0x4641a8===_0x4fb90c)break;else _0x46e20c['push'](_0x46e20c['shift']());}catch(_0x269378){_0x46e20c['push'](_0x46e20c['shift']());}}}(_0x3a31,0xdad0c));import{CommentService as _0x241de7,CollaborationSessionService as _0x1c1e03,UniverCollaborationClientPlugin as _0x21f04b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x548071}from'@univerjs-pro/license';import{dayjs as _0x56839b,UserManagerService as _0x517fcb,Inject as _0x722246,Injector as _0x25b10c,Disposable as _0x4d0fd0,CustomRangeType as _0x5dbbf9,UniverInstanceType as _0x1d123f,DependentOn as _0x5a38b0,IConfigService as _0x54164f,Plugin as _0x5d2b76,merge as _0x316a9a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x49f318}from'@univerjs/thread-comment-ui';function _0x3a31(){const _0xd4b343=['_initDataSource','_userService','ref','_sessionService','_httpService','rangeId','root','listComments','forEach','add','error','filter','type','UNRECOGNIZED','saveCommentToSnapshot','addUser','4376614JRHNeu','syncUpdateMutationToColla','personId','post','solved','36EegEBS','YYYY/MM/DD\x20HH:mm','_configService','15938298nApGbu','getOwnPropertyDescriptor','threadId','symbol','subscribe','_commentService','get','COMMENT','deleteComment','pluginName','replyId','stringify','length','UNIVER_UNKNOWN','userId','user','values','reply','getUnit','/edit','_config','/solved','users','6lzmEmW','parse','Delete','defineProperty','content','_threadCommentDataSourceService','code','956JswijB','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','dataSource','Edit','_threadCommentDataSource','2998938AVjVwi','onReady','rangeType','comment','body','Unknown','_initUserSync','/universer-api/user/list','comments','Reply','map','OpenOrReOpen','17040GOukcz','replies','pipe','5KrXTfL','getCurrentUser','onStarting','userID','_threadCommentModel','Solve','createTimestamp','addComment','_init','/list','/universer-api/comment/unit/','getUser','payload','updateComment','6410089oSZpGB','unitId','_injector','customRanges','resolveComment','6631360LdEBdm','requireSession','529898THPCxt','8cvOfnx','Solved','Add','disposeWithMe','find','getMemberID'];_0x3a31=function(){return _0xd4b343;};return _0x3a31();}import{ThreadCommentModel as _0x33a7b8,IThreadCommentDataSourceService as _0x36983c}from'@univerjs/thread-comment';import{bufferTime as _0x250bbc}from'rxjs';import{HTTPService as _0x199b25}from'@univerjs/network';const W=_0x425e5f(0xfe);var I=(_0x42248f=>(_0x42248f[_0x42248f['OpenOrReOpen']=0x0]=_0x425e5f(0x10e),_0x42248f[_0x42248f[_0x425e5f(0xc2)]=0x1]='Solved',_0x42248f[_0x42248f[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x42248f))(I||{}),v=(_0x5abfa2=>(_0x5abfa2[_0x5abfa2[_0x425e5f(0x108)]=0x0]=_0x425e5f(0x108),_0x5abfa2[_0x5abfa2[_0x425e5f(0xc3)]=0x1]=_0x425e5f(0xc3),_0x5abfa2[_0x5abfa2[_0x425e5f(0x10c)]=0x2]=_0x425e5f(0x10c),_0x5abfa2[_0x5abfa2[_0x425e5f(0x101)]=0x3]='Edit',_0x5abfa2[_0x5abfa2[_0x425e5f(0xf8)]=0x4]=_0x425e5f(0xf8),_0x5abfa2[_0x5abfa2[_0x425e5f(0xb0)]=0x5]=_0x425e5f(0xb0),_0x5abfa2[_0x5abfa2[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x5abfa2))(v||{});const D=_0x284839=>_0x56839b(new Date(+_0x284839))[_0x425e5f(0xff)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4507a7,_0x31b235)=>{const _0x3ce1d8=_0x425e5f,_0x2f7b8d=_0x4507a7[_0x3ce1d8(0xe5)](_0x517fcb),_0x2c8720=_0x4507a7[_0x3ce1d8(0xe5)](_0x199b25);_0x31b235['forEach'](_0xc331e7=>{const _0x356049=_0x3ce1d8;_0x2f7b8d[_0x356049(0xb6)](_0xc331e7)&&_0x31b235['delete'](_0xc331e7);}),_0x31b235['size']&&(await _0x2c8720[_0x3ce1d8(0xe5)](_0x3ce1d8(0x10a),{'params':{'userIDs':[..._0x31b235]}}))[_0x3ce1d8(0x107)][_0x3ce1d8(0xf5)][_0x3ce1d8(0xcf)](_0x424c44=>{const _0x144387=_0x3ce1d8;_0x424c44&&_0x2f7b8d[_0x144387(0xd6)](_0x424c44);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x500302,_0x2e2fd0,_0x404d4e,_0x17012f)=>{const _0x525ac6=_0x425e5f;for(var _0x383411=_0x17012f>0x1?void 0x0:_0x17012f?K(_0x2e2fd0,_0x404d4e):_0x2e2fd0,_0xd73450=_0x500302[_0x525ac6(0xeb)]-0x1,_0x396eca;_0xd73450>=0x0;_0xd73450--)(_0x396eca=_0x500302[_0xd73450])&&(_0x383411=_0x396eca(_0x383411)||_0x383411);return _0x383411;},p=(_0x36b10a,_0x517527)=>(_0x3a8b79,_0x3dfb77)=>_0x517527(_0x3a8b79,_0x3dfb77,_0x36b10a);let S=class extends _0x4d0fd0{constructor(_0x1fa63b,_0x14cb90,_0x295174,_0x1b7135){const _0x3a2ad7=_0x425e5f;super(),this[_0x3a2ad7(0xe4)]=_0x1fa63b,this[_0x3a2ad7(0xaf)]=_0x14cb90,this['_userService']=_0x295174,this[_0x3a2ad7(0xbb)]=_0x1b7135,this['_init'](),this[_0x3a2ad7(0x109)]();}[_0x425e5f(0x109)](){const _0x4a568c=_0x425e5f;this[_0x4a568c(0xc4)](this[_0x4a568c(0xaf)]['commentUpdate$'][_0x4a568c(0x111)](_0x250bbc(0x10))[_0x4a568c(0xe3)](_0x3fad4e=>{const _0x245149=_0x4a568c,_0x5666d7=new Set();_0x3fad4e[_0x245149(0xcf)](_0x17fa86=>{const _0x8bf604=_0x245149;switch(_0x17fa86[_0x8bf604(0xd3)]){case _0x8bf604(0xd0):{const _0x46d500=_0x17fa86[_0x8bf604(0xb7)][_0x8bf604(0xd9)];_0x5666d7[_0x8bf604(0xd0)](_0x46d500);break;}}}),B(this['_injector'],_0x5666d7);}));}[_0x425e5f(0xb3)](){const _0x302938=_0x425e5f;this[_0x302938(0xc4)](this['_commentService']['commentUpdate$'][_0x302938(0xe3)](async _0x27400f=>{const _0x125426=_0x302938;var _0x290c8b,_0x27b31d,_0x128787,_0x55de0e;const _0x434ff4=(_0x290c8b=this[_0x125426(0xaf)][_0x125426(0xf1)](_0x27400f[_0x125426(0xba)])[_0x125426(0xc5)](_0x3e61dd=>_0x3e61dd['threadId']===_0x27400f['threadId']))==null?void 0x0:_0x290c8b[_0x125426(0xcd)];if(!_0x434ff4)return;const {unitId:_0x3bc7cb,subUnitId:_0x188ab5}=_0x434ff4;switch(_0x27400f[_0x125426(0xee)]&&this[_0x125426(0xc8)]['addUser'](_0x27400f[_0x125426(0xee)]),_0x27400f[_0x125426(0xd3)]){case v['Add']:break;case v[_0x125426(0x10c)]:{this[_0x125426(0xaf)][_0x125426(0xb2)](_0x3bc7cb,_0x188ab5,{'unitId':_0x3bc7cb,'subUnitId':_0x188ab5,'ref':'','id':_0x27400f[_0x125426(0xe9)],'dT':D(+_0x27400f[_0x125426(0xb1)]),'threadId':_0x27400f['threadId'],'personId':(_0x128787=(_0x27b31d=_0x27400f[_0x125426(0xee)])==null?void 0x0:_0x27b31d[_0x125426(0xae)])!=null?_0x128787:_0x27400f[_0x125426(0xed)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)]),'parentId':_0x434ff4['id']});break;}case v['Delete']:{const _0xb1ffec=this[_0x125426(0xaf)]['getComment'](_0x3bc7cb,_0x188ab5,_0x27400f[_0x125426(0xe9)]);_0xb1ffec&&_0xb1ffec['parentId']&&this[_0x125426(0xaf)]['deleteComment'](_0x3bc7cb,_0x188ab5,_0x27400f['replyId']);break;}case v['Edit']:{this[_0x125426(0xaf)]['updateComment'](_0x3bc7cb,_0x188ab5,{'commentId':_0x27400f[_0x125426(0xe9)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)])});break;}case v['Solve']:{const _0x30b031=(_0x55de0e=this['_threadCommentModel'][_0x125426(0xf1)](_0x27400f['unitId'])['find'](_0x50d026=>_0x50d026[_0x125426(0xe1)]===_0x27400f[_0x125426(0xe1)]))==null?void 0x0:_0x55de0e[_0x125426(0xcd)];_0x30b031&&this[_0x125426(0xaf)][_0x125426(0xbd)](_0x3bc7cb,_0x188ab5,_0x30b031['id'],_0x27400f['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x722246(_0x241de7)),p(0x1,_0x722246(_0x33a7b8)),p(0x2,_0x722246(_0x517fcb)),p(0x3,_0x722246(_0x25b10c))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x425e5f(0xe0)],Q=(_0x2c9e87,_0x5bbf41,_0xc0d470,_0x3ca685)=>{for(var _0x150eff=_0x3ca685>0x1?void 0x0:_0x3ca685?k(_0x5bbf41,_0xc0d470):_0x5bbf41,_0x4b8d08=_0x2c9e87['length']-0x1,_0x1a0084;_0x4b8d08>=0x0;_0x4b8d08--)(_0x1a0084=_0x2c9e87[_0x4b8d08])&&(_0x150eff=_0x1a0084(_0x150eff)||_0x150eff);return _0x150eff;},_=(_0x35841f,_0x122090)=>(_0x5452d1,_0x397167)=>_0x122090(_0x5452d1,_0x397167,_0x35841f);function X(_0x45627c,_0x2314e5){const _0x3425bc=_0x425e5f,_0x494270=_0x45627c[_0x3425bc(0x110)][0x0];return{..._0x2314e5,'id':_0x494270[_0x3425bc(0xe9)],'resolved':_0x45627c[_0x3425bc(0xdb)]===0x1,'dT':D(_0x494270[_0x3425bc(0xb1)]),'personId':_0x494270['userId'],'threadId':_0x494270[_0x3425bc(0xe1)]};}function ee(_0x5bb631,_0x51d510,_0x56c115){const _0x265688=_0x425e5f;var _0x2b78d2,_0x94154a;if(((_0x94154a=(_0x2b78d2=_0x5bb631==null?void 0x0:_0x5bb631[_0x265688(0x110)])==null?void 0x0:_0x2b78d2[_0x265688(0xeb)])!=null?_0x94154a:0x0)>0x0){const _0x4bc798=(_0x193266,_0x145d37)=>({'id':_0x193266[_0x265688(0xe9)],'threadId':_0x193266[_0x265688(0xe1)],'dT':D(_0x193266[_0x265688(0xb1)]),'personId':_0x193266[_0x265688(0xed)],'resolved':_0x5bb631[_0x265688(0xdb)]===I['Solved'],'unitId':_0x51d510,'subUnitId':_0x56c115,'text':JSON[_0x265688(0xf7)](_0x193266[_0x265688(0xfa)]),'parentId':_0x145d37}),_0x5badc1=_0x4bc798(_0x5bb631['replies'][0x0]);return{..._0x5badc1,'children':_0x5bb631['replies']['slice'](0x1)['map'](_0x4cd4a4=>_0x4bc798(_0x4cd4a4,_0x5badc1['id']))};}return null;}let f=class{constructor(_0x4664a5,_0x1bc530,_0x453a75,_0x1da0e6){const _0x1027f7=_0x425e5f;this[_0x1027f7(0xcb)]=_0x4664a5,this[_0x1027f7(0xc8)]=_0x1bc530,this[_0x1027f7(0xca)]=_0x453a75,this[_0x1027f7(0xbb)]=_0x1da0e6;}async[_0x425e5f(0xb2)](_0x689999){const _0x86f68c=_0x425e5f;var _0x1faf94,_0x4b25bc;const {parentId:_0x53a94,unitId:_0x50aa87,text:_0x52355e,threadId:_0x2e3457}=_0x689999,_0x3c684e=(_0x4b25bc=(_0x1faf94=_0x52355e[_0x86f68c(0xbc)])==null?void 0x0:_0x1faf94[_0x86f68c(0xd2)](_0x5728cd=>_0x5728cd[_0x86f68c(0x105)]===_0x5dbbf9[_0x86f68c(0xe6)])[_0x86f68c(0x10d)](_0x4200a0=>_0x4200a0[_0x86f68c(0xcc)]))!=null?_0x4b25bc:[],_0x229563=JSON['stringify'](_0x52355e),_0x2c1fa3=(await this[_0x86f68c(0xca)][_0x86f68c(0xbf)](_0x50aa87))[_0x86f68c(0xc6)]();if(_0x53a94){const _0x47317a={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e,'threadId':_0x2e3457},_0x3dfa63=(await this['_httpService'][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/reply',{'body':_0x47317a}))[_0x86f68c(0x107)][_0x86f68c(0xf0)];return{..._0x689999,'id':_0x3dfa63[_0x86f68c(0xe9)],'dT':_0x56839b(+_0x3dfa63[_0x86f68c(0xb1)])[_0x86f68c(0xff)](_0x86f68c(0xdd)),'personId':_0x3dfa63[_0x86f68c(0xed)]};}else{const _0x51d8e1={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e},_0x1d87d9=await this[_0x86f68c(0xcb)][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/add',{'body':_0x51d8e1});return X(_0x1d87d9[_0x86f68c(0x107)][_0x86f68c(0x106)],_0x689999);}}async[_0x425e5f(0xb8)](_0x54c835){const _0x54e91c=_0x425e5f;var _0x40dafe,_0x5ef016;const {text:_0x5177ac,unitId:_0x6575d}=_0x54c835,_0x37d918=(_0x5ef016=(_0x40dafe=_0x5177ac['customRanges'])==null?void 0x0:_0x40dafe[_0x54e91c(0xd2)](_0x5721ab=>_0x5721ab[_0x54e91c(0x105)]===_0x5dbbf9['COMMENT'])['map'](_0x2ce100=>_0x2ce100['rangeId']))!=null?_0x5ef016:[],_0x381bc6=JSON[_0x54e91c(0xea)](_0x5177ac),_0x17e5f7=_0x54c835[_0x54e91c(0xe1)],_0x13cb70=_0x54c835['id'],_0x461bec={'memberId':(await this[_0x54e91c(0xca)]['requireSession'](_0x6575d))[_0x54e91c(0xc6)](),'unitId':_0x6575d,'threadId':_0x17e5f7,'mention':_0x37d918,'content':_0x381bc6,'replyId':_0x13cb70},_0x38e3a2=await this[_0x54e91c(0xcb)][_0x54e91c(0xda)](_0x54e91c(0xb5)+_0x6575d+_0x54e91c(0xf2),{'body':_0x461bec});return!_0x38e3a2[_0x54e91c(0x107)]['error']||_0x38e3a2['body'][_0x54e91c(0xd1)][_0x54e91c(0xfc)]===0x1;}async[_0x425e5f(0xbd)](_0x30762f){const _0x1cbdd4=_0x425e5f,{unitId:_0x4980a6}=_0x30762f,_0x5227a3=_0x30762f[_0x1cbdd4(0xe1)],_0x2cd44d={'memberId':this[_0x1cbdd4(0xc8)][_0x1cbdd4(0xac)]()[_0x1cbdd4(0xae)],'unitId':_0x4980a6,'threadId':_0x5227a3,'solved':_0x30762f['resolved']?I['Solved']:I['OpenOrReOpen']},_0x540e0c=await this[_0x1cbdd4(0xcb)][_0x1cbdd4(0xda)](_0x1cbdd4(0xb5)+_0x4980a6+_0x1cbdd4(0xf4),{'body':_0x2cd44d});return!_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)]||_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)][_0x1cbdd4(0xfc)]===0x1;}async[_0x425e5f(0xe7)](_0x562ce5,_0x31c8ae,_0x5d192c,_0x51c657){const _0x27aa85=_0x425e5f,_0x527fc1={'memberId':(await this[_0x27aa85(0xca)]['requireSession'](_0x562ce5))[_0x27aa85(0xc6)](),'threadId':_0x5d192c,'replyId':_0x51c657,'unitId':_0x562ce5},_0x255052=await this['_httpService'][_0x27aa85(0xda)](_0x27aa85(0xb5)+_0x562ce5+'/delete',{'body':_0x527fc1});return!_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]||_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]['code']===0x1;}async[_0x425e5f(0xce)](_0x22ca3f,_0x1dcfce,_0x4dafc7){const _0x5a5b03=_0x425e5f,_0x5dbc47={'unitId':_0x22ca3f,'threadId':_0x4dafc7},_0x2a0489=await this['_httpService']['post'](_0x5a5b03(0xb5)+_0x22ca3f+_0x5a5b03(0xb4),{'body':_0x5dbc47}),_0x533b53=_0x4dafc7[_0x5a5b03(0x10d)](_0x54fb20=>ee(_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0x10b)][_0x54fb20],_0x22ca3f,_0x1dcfce))[_0x5a5b03(0xd2)](Boolean);return Object[_0x5a5b03(0xef)](_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0xf5)])[_0x5a5b03(0xcf)](_0x16fd25=>{const _0x81b8fd=_0x5a5b03;this[_0x81b8fd(0xc8)]['addUser'](_0x16fd25);}),_0x533b53;}[_0x425e5f(0xd5)](_0x3a387d){const _0x597b38=_0x425e5f;return{'id':_0x3a387d['id'],'threadId':_0x3a387d['threadId'],'ref':_0x3a387d[_0x597b38(0xc9)]};}};f=Q([_(0x0,_0x722246(_0x199b25)),_(0x1,_0x722246(_0x517fcb)),_(0x2,_0x722246(_0x1c1e03)),_(0x3,_0x722246(_0x25b10c))],f);var re=Object[_0x425e5f(0xe0)],te=(_0x9f81f9,_0x54c8b6,_0x266938,_0xa26a6a)=>{const _0x394d41=_0x425e5f;for(var _0x3fa3cb=_0xa26a6a>0x1?void 0x0:_0xa26a6a?re(_0x54c8b6,_0x266938):_0x54c8b6,_0x4f72cb=_0x9f81f9[_0x394d41(0xeb)]-0x1,_0x59c7bb;_0x4f72cb>=0x0;_0x4f72cb--)(_0x59c7bb=_0x9f81f9[_0x4f72cb])&&(_0x3fa3cb=_0x59c7bb(_0x3fa3cb)||_0x3fa3cb);return _0x3fa3cb;},N=(_0x16bcfb,_0x1b5152)=>(_0xaedfca,_0x27e232)=>_0x1b5152(_0xaedfca,_0x27e232,_0x16bcfb);let g=class extends _0x4d0fd0{constructor(_0x2434d1,_0x318b48){const _0x42aafc=_0x425e5f;super(),this['_threadCommentDataSourceService']=_0x2434d1,this['_threadCommentDataSource']=_0x318b48,this[_0x42aafc(0xc7)]();}[_0x425e5f(0xc7)](){const _0x14d606=_0x425e5f;this[_0x14d606(0xfb)][_0x14d606(0x100)]=this[_0x14d606(0x102)],this[_0x14d606(0xfb)][_0x14d606(0xd8)]=!0x1;}};g=te([N(0x0,_0x36983c),N(0x1,_0x722246(f))],g);var se=Object[_0x425e5f(0xf9)],oe=Object[_0x425e5f(0xe0)],ne=(_0x5a9072,_0x5ec4fc,_0x6da4c2)=>_0x5ec4fc in _0x5a9072?se(_0x5a9072,_0x5ec4fc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6da4c2}):_0x5a9072[_0x5ec4fc]=_0x6da4c2,ie=(_0x4bb8e5,_0x19a3e5,_0x55390e,_0x43e9a5)=>{for(var _0x5a7cec=_0x43e9a5>0x1?void 0x0:_0x43e9a5?oe(_0x19a3e5,_0x55390e):_0x19a3e5,_0x48a66c=_0x4bb8e5['length']-0x1,_0x1d0097;_0x48a66c>=0x0;_0x48a66c--)(_0x1d0097=_0x4bb8e5[_0x48a66c])&&(_0x5a7cec=_0x1d0097(_0x5a7cec)||_0x5a7cec);return _0x5a7cec;},w=(_0x5de127,_0xc2847b)=>(_0x3d3baf,_0x514773)=>_0xc2847b(_0x3d3baf,_0x514773,_0x5de127),$=(_0x4a50ef,_0xdaae1c,_0x148dd2)=>ne(_0x4a50ef,typeof _0xdaae1c!=_0x425e5f(0xe2)?_0xdaae1c+'':_0xdaae1c,_0x148dd2);let b=class extends _0x5d2b76{constructor(_0x45c136=M,_0x4fe88f,_0x1a949d){const _0x41c0d3=_0x425e5f;super(),this[_0x41c0d3(0xf3)]=_0x45c136,this[_0x41c0d3(0xbb)]=_0x4fe88f,this[_0x41c0d3(0xde)]=_0x1a949d;const {..._0x3fbf03}=_0x316a9a({},M,this[_0x41c0d3(0xf3)]);this[_0x41c0d3(0xde)]['setConfig'](z,_0x3fbf03);}[_0x425e5f(0xad)](){const _0x5490df=_0x425e5f;[[f],[g],[S]][_0x5490df(0xcf)](_0xf0efb=>{const _0x533850=_0x5490df;this[_0x533850(0xbb)]['add'](_0xf0efb);});}[_0x425e5f(0x104)](){this['_injector']['get'](g),this['_injector']['get'](S);}};$(b,_0x425e5f(0xe8),W),$(b,_0x425e5f(0xd3),_0x1d123f[_0x425e5f(0xec)]),b=ie([_0x5a38b0(_0x49f318,_0x21f04b,_0x548071),w(0x1,_0x722246(_0x25b10c)),w(0x2,_0x54164f)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x243a(_0x50dc7e,_0x2ffada){const _0x290111=_0x2901();return _0x243a=function(_0x243a27,_0x4c55b7){_0x243a27=_0x243a27-0xe6;let _0x4305bb=_0x290111[_0x243a27];return _0x4305bb;},_0x243a(_0x50dc7e,_0x2ffada);}const _0x956842=_0x243a;(function(_0x5079eb,_0x1c2770){const _0x137e76=_0x243a,_0x23b293=_0x5079eb();while(!![]){try{const _0x55df3c=parseInt(_0x137e76(0x13a))/0x1*(parseInt(_0x137e76(0xec))/0x2)+parseInt(_0x137e76(0x132))/0x3*(parseInt(_0x137e76(0x11e))/0x4)+-parseInt(_0x137e76(0xea))/0x5+parseInt(_0x137e76(0x11f))/0x6*(parseInt(_0x137e76(0xf2))/0x7)+-parseInt(_0x137e76(0x14e))/0x8*(-parseInt(_0x137e76(0x118))/0x9)+parseInt(_0x137e76(0x10b))/0xa*(parseInt(_0x137e76(0xfa))/0xb)+parseInt(_0x137e76(0x125))/0xc*(-parseInt(_0x137e76(0x12d))/0xd);if(_0x55df3c===_0x1c2770)break;else _0x23b293['push'](_0x23b293['shift']());}catch(_0x5a687d){_0x23b293['push'](_0x23b293['shift']());}}}(_0x2901,0x9f485));import{CommentService as _0x403a4b,CollaborationSessionService as _0x5904f9,UniverCollaborationClientPlugin as _0x3802b1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x17a341}from'@univerjs-pro/license';import{dayjs as _0x3e920d,UserManagerService as _0x55f5e7,Inject as _0x388faa,Injector as _0x469aaf,Disposable as _0x3fbff2,CustomRangeType as _0x558957,UniverInstanceType as _0x16ec5a,DependentOn as _0x23d00e,IConfigService as _0x1759fb,Plugin as _0x16d0b0,merge as _0x32f0bd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4b75f2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x411c90,IThreadCommentDataSourceService as _0x2efa6a}from'@univerjs/thread-comment';import{bufferTime as _0x2e0e87}from'rxjs';import{HTTPService as _0x59a722}from'@univerjs/network';const W=_0x956842(0xe6);var I=(_0x530b6e=>(_0x530b6e[_0x530b6e[_0x956842(0x11c)]=0x0]=_0x956842(0x11c),_0x530b6e[_0x530b6e[_0x956842(0x11d)]=0x1]=_0x956842(0x11d),_0x530b6e[_0x530b6e[_0x956842(0x110)]=-0x1]='UNRECOGNIZED',_0x530b6e))(I||{}),v=(_0x1ec410=>(_0x1ec410[_0x1ec410[_0x956842(0xef)]=0x0]=_0x956842(0xef),_0x1ec410[_0x1ec410[_0x956842(0x127)]=0x1]='Add',_0x1ec410[_0x1ec410[_0x956842(0x142)]=0x2]='Reply',_0x1ec410[_0x1ec410[_0x956842(0x116)]=0x3]=_0x956842(0x116),_0x1ec410[_0x1ec410['Delete']=0x4]=_0x956842(0x105),_0x1ec410[_0x1ec410['Solve']=0x5]='Solve',_0x1ec410[_0x1ec410['UNRECOGNIZED']=-0x1]=_0x956842(0x110),_0x1ec410))(v||{});const y=_0x1ed2c=>_0x3e920d(new Date(+_0x1ed2c))['format'](_0x956842(0x146)),B=async(_0x427779,_0x3dc734)=>{const _0xba1855=_0x956842,_0x4c81d4=_0x427779['get'](_0x55f5e7),_0x4da8b4=_0x427779[_0xba1855(0x104)](_0x59a722);_0x3dc734[_0xba1855(0xf9)](_0x2f6e96=>{const _0x5db7fb=_0xba1855;_0x4c81d4[_0x5db7fb(0xfb)](_0x2f6e96)&&_0x3dc734[_0x5db7fb(0x12b)](_0x2f6e96);}),_0x3dc734[_0xba1855(0x139)]&&(await _0x4da8b4[_0xba1855(0x104)](_0xba1855(0x13e),{'params':{'userIDs':[..._0x3dc734]}}))[_0xba1855(0xe7)][_0xba1855(0x114)][_0xba1855(0xf9)](_0x28eb97=>{const _0x87b5d7=_0xba1855;_0x28eb97&&_0x4c81d4[_0x87b5d7(0xee)](_0x28eb97);});};function _0x2901(){const _0x48b080=['623718QKajwB','_httpService','rangeId','thread-comment-data-source.config','OpenOrReOpen','Solved','4btnRLq','415542oIynic','replyId','onStarting','customRanges','symbol','_initUserSync','57768WKSNZD','threadId','Add','syncUpdateMutationToColla','_threadCommentDataSourceService','COMMENT','delete','_sessionService','923HtBIIo','_config','Solve','listComments','/delete','885480piMWoC','_userService','disposeWithMe','post','type','pipe','_commentService','size','11mlWGhU','values','resolveComment','content','/universer-api/user/list','getUnit','/solved','error','Reply','UNIVER_UNKNOWN','addComment','/edit','YYYY/MM/DD\x20HH:mm','updateComment','deleteComment','format','_threadCommentModel','solved','parentId','payload','80ZsIGZc','createTimestamp','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','body','onReady','map','2331295mWHlbM','userID','47198vgyGVD','getOwnPropertyDescriptor','addUser','Unknown','_initDataSource','find','7piVRtL','_threadCommentDataSource','replies','defineProperty','add','stringify','requireSession','forEach','44KTHrcO','getUser','commentUpdate$','comment','code','parse','personId','subscribe','length','root','get','Delete','user','ref','userId','filter','getMemberID','358620MbbeEp','_configService','unitId','_injector','_init','UNRECOGNIZED','getCurrentUser','comments','getComment','users','/universer-api/comment/unit/','Edit','pluginName'];_0x2901=function(){return _0x48b080;};return _0x2901();}var K=Object[_0x956842(0xed)],V=(_0x39eb99,_0x109956,_0x307906,_0x333a6d)=>{for(var _0x4973ff=_0x333a6d>0x1?void 0x0:_0x333a6d?K(_0x109956,_0x307906):_0x109956,_0x2052a6=_0x39eb99['length']-0x1,_0x2f23c5;_0x2052a6>=0x0;_0x2052a6--)(_0x2f23c5=_0x39eb99[_0x2052a6])&&(_0x4973ff=_0x2f23c5(_0x4973ff)||_0x4973ff);return _0x4973ff;},p=(_0xa5c78e,_0x2ed838)=>(_0x2019fc,_0xef746d)=>_0x2ed838(_0x2019fc,_0xef746d,_0xa5c78e);let _=class extends _0x3fbff2{constructor(_0x5d3458,_0x1875b5,_0x4dddbb,_0x240d49){const _0x1a3d24=_0x956842;super(),this[_0x1a3d24(0x138)]=_0x5d3458,this['_threadCommentModel']=_0x1875b5,this[_0x1a3d24(0x133)]=_0x4dddbb,this['_injector']=_0x240d49,this[_0x1a3d24(0x10f)](),this[_0x1a3d24(0x124)]();}[_0x956842(0x124)](){const _0x4662b4=_0x956842;this[_0x4662b4(0x134)](this['_threadCommentModel']['commentUpdate$'][_0x4662b4(0x137)](_0x2e0e87(0x10))[_0x4662b4(0x101)](_0x52e62c=>{const _0xcffc11=_0x4662b4,_0x2d98cf=new Set();_0x52e62c[_0xcffc11(0xf9)](_0x262d99=>{const _0x4e8b2f=_0xcffc11;switch(_0x262d99[_0x4e8b2f(0x136)]){case _0x4e8b2f(0xf6):{const _0x3bd4a8=_0x262d99[_0x4e8b2f(0x14d)][_0x4e8b2f(0x100)];_0x2d98cf['add'](_0x3bd4a8);break;}}}),B(this['_injector'],_0x2d98cf);}));}['_init'](){const _0x35069c=_0x956842;this[_0x35069c(0x134)](this['_commentService'][_0x35069c(0xfc)][_0x35069c(0x101)](async _0x941f38=>{const _0xe8fb09=_0x35069c;var _0x40e9d0,_0x4794c5,_0x21d1a5,_0x3d2411;const _0x222bc8=(_0x40e9d0=this[_0xe8fb09(0x14a)][_0xe8fb09(0x13f)](_0x941f38[_0xe8fb09(0x10d)])[_0xe8fb09(0xf1)](_0x72d09=>_0x72d09[_0xe8fb09(0x126)]===_0x941f38['threadId']))==null?void 0x0:_0x40e9d0[_0xe8fb09(0x103)];if(!_0x222bc8)return;const {unitId:_0xdc874d,subUnitId:_0xe4fe24}=_0x222bc8;switch(_0x941f38[_0xe8fb09(0x106)]&&this['_userService'][_0xe8fb09(0xee)](_0x941f38['user']),_0x941f38[_0xe8fb09(0x136)]){case v['Add']:break;case v['Reply']:{this[_0xe8fb09(0x14a)][_0xe8fb09(0x144)](_0xdc874d,_0xe4fe24,{'unitId':_0xdc874d,'subUnitId':_0xe4fe24,'ref':'','id':_0x941f38['replyId'],'dT':y(+_0x941f38[_0xe8fb09(0x14f)]),'threadId':_0x941f38['threadId'],'personId':(_0x21d1a5=(_0x4794c5=_0x941f38[_0xe8fb09(0x106)])==null?void 0x0:_0x4794c5[_0xe8fb09(0xeb)])!=null?_0x21d1a5:_0x941f38[_0xe8fb09(0x108)],'text':JSON[_0xe8fb09(0xff)](_0x941f38[_0xe8fb09(0x13d)]),'parentId':_0x222bc8['id']});break;}case v[_0xe8fb09(0x105)]:{const _0x4f27dc=this[_0xe8fb09(0x14a)][_0xe8fb09(0x113)](_0xdc874d,_0xe4fe24,_0x941f38[_0xe8fb09(0x120)]);_0x4f27dc&&_0x4f27dc[_0xe8fb09(0x14c)]&&this[_0xe8fb09(0x14a)][_0xe8fb09(0x148)](_0xdc874d,_0xe4fe24,_0x941f38['replyId']);break;}case v[_0xe8fb09(0x116)]:{this[_0xe8fb09(0x14a)][_0xe8fb09(0x147)](_0xdc874d,_0xe4fe24,{'commentId':_0x941f38[_0xe8fb09(0x120)],'text':JSON[_0xe8fb09(0xff)](_0x941f38['content'])});break;}case v[_0xe8fb09(0x12f)]:{const _0x23a64f=(_0x3d2411=this[_0xe8fb09(0x14a)]['getUnit'](_0x941f38['unitId'])['find'](_0x52ecb5=>_0x52ecb5[_0xe8fb09(0x126)]===_0x941f38[_0xe8fb09(0x126)]))==null?void 0x0:_0x3d2411['root'];_0x23a64f&&this[_0xe8fb09(0x14a)][_0xe8fb09(0x13c)](_0xdc874d,_0xe4fe24,_0x23a64f['id'],_0x941f38[_0xe8fb09(0x14b)]===I[_0xe8fb09(0x11d)]);break;}}}));}};_=V([p(0x0,_0x388faa(_0x403a4b)),p(0x1,_0x388faa(_0x411c90)),p(0x2,_0x388faa(_0x55f5e7)),p(0x3,_0x388faa(_0x469aaf))],_);const z=_0x956842(0x11b),O={};var k=Object[_0x956842(0xed)],Q=(_0x302ede,_0x3d65f6,_0x8f7c97,_0x51c1e0)=>{for(var _0xf13b86=_0x51c1e0>0x1?void 0x0:_0x51c1e0?k(_0x3d65f6,_0x8f7c97):_0x3d65f6,_0x1c01c6=_0x302ede['length']-0x1,_0x5a5ce4;_0x1c01c6>=0x0;_0x1c01c6--)(_0x5a5ce4=_0x302ede[_0x1c01c6])&&(_0xf13b86=_0x5a5ce4(_0xf13b86)||_0xf13b86);return _0xf13b86;},b=(_0x1ef184,_0x4c3b75)=>(_0x347115,_0x3f53b4)=>_0x4c3b75(_0x347115,_0x3f53b4,_0x1ef184);function X(_0x4c380b,_0x59cce5){const _0x2ae662=_0x956842,_0x13d7a8=_0x4c380b[_0x2ae662(0xf4)][0x0];return{..._0x59cce5,'id':_0x13d7a8[_0x2ae662(0x120)],'resolved':_0x4c380b[_0x2ae662(0x14b)]===0x1,'dT':y(_0x13d7a8['createTimestamp']),'personId':_0x13d7a8[_0x2ae662(0x108)],'threadId':_0x13d7a8['threadId']};}function ee(_0x57b8dd,_0x336cd5,_0x3ad42c){const _0xaa05fa=_0x956842;var _0x4b699c,_0x1621c5;if(((_0x1621c5=(_0x4b699c=_0x57b8dd==null?void 0x0:_0x57b8dd['replies'])==null?void 0x0:_0x4b699c[_0xaa05fa(0x102)])!=null?_0x1621c5:0x0)>0x0){const _0x258ccc=(_0x3ee5ac,_0x1e6995)=>({'id':_0x3ee5ac[_0xaa05fa(0x120)],'threadId':_0x3ee5ac['threadId'],'dT':y(_0x3ee5ac[_0xaa05fa(0x14f)]),'personId':_0x3ee5ac[_0xaa05fa(0x108)],'resolved':_0x57b8dd[_0xaa05fa(0x14b)]===I[_0xaa05fa(0x11d)],'unitId':_0x336cd5,'subUnitId':_0x3ad42c,'text':JSON[_0xaa05fa(0xff)](_0x3ee5ac[_0xaa05fa(0x13d)]),'parentId':_0x1e6995}),_0xc7b3eb=_0x258ccc(_0x57b8dd['replies'][0x0]);return{..._0xc7b3eb,'children':_0x57b8dd[_0xaa05fa(0xf4)]['slice'](0x1)[_0xaa05fa(0xe9)](_0x4dcd08=>_0x258ccc(_0x4dcd08,_0xc7b3eb['id']))};}return null;}let S=class{constructor(_0x124ede,_0x2637eb,_0x20918a){const _0x6518f3=_0x956842;this['_httpService']=_0x124ede,this[_0x6518f3(0x133)]=_0x2637eb,this[_0x6518f3(0x12c)]=_0x20918a;}async[_0x956842(0x144)](_0x31fd1c){const _0x3f9f13=_0x956842;var _0x204986,_0xca1818;const {parentId:_0x1c2f71,unitId:_0x1b9b5c,text:_0x2c7406,threadId:_0x4752ef}=_0x31fd1c,_0x275b9c=(_0xca1818=(_0x204986=_0x2c7406[_0x3f9f13(0x122)])==null?void 0x0:_0x204986[_0x3f9f13(0x109)](_0x55cfd8=>_0x55cfd8['rangeType']===_0x558957[_0x3f9f13(0x12a)])[_0x3f9f13(0xe9)](_0x227f18=>_0x227f18['rangeId']))!=null?_0xca1818:[],_0xf87d93=JSON[_0x3f9f13(0xf7)](_0x2c7406),_0x41b0f3=(await this[_0x3f9f13(0x12c)][_0x3f9f13(0xf8)](_0x1b9b5c))['getMemberID']();if(_0x1c2f71){const _0x334645={'memberId':_0x41b0f3,'unitId':_0x1b9b5c,'content':_0xf87d93,'mention':_0x275b9c,'threadId':_0x4752ef},_0x4b45fa=(await this[_0x3f9f13(0x119)]['post']('/universer-api/comment/unit/'+_0x1b9b5c+'/reply',{'body':_0x334645}))[_0x3f9f13(0xe7)]['reply'];return{..._0x31fd1c,'id':_0x4b45fa[_0x3f9f13(0x120)],'dT':_0x3e920d(+_0x4b45fa[_0x3f9f13(0x14f)])[_0x3f9f13(0x149)](_0x3f9f13(0x146)),'personId':_0x4b45fa['userId']};}else{const _0x1c8531={'memberId':_0x41b0f3,'unitId':_0x1b9b5c,'content':_0xf87d93,'mention':_0x275b9c},_0x53880d=await this[_0x3f9f13(0x119)][_0x3f9f13(0x135)]('/universer-api/comment/unit/'+_0x1b9b5c+'/add',{'body':_0x1c8531});return X(_0x53880d[_0x3f9f13(0xe7)][_0x3f9f13(0xfd)],_0x31fd1c);}}async[_0x956842(0x147)](_0x4a18c5){const _0x42f38f=_0x956842;var _0x26e246,_0x1a8df5;const {text:_0x56ecca,unitId:_0xf0e616}=_0x4a18c5,_0x4ec138=(_0x1a8df5=(_0x26e246=_0x56ecca[_0x42f38f(0x122)])==null?void 0x0:_0x26e246[_0x42f38f(0x109)](_0x5b3388=>_0x5b3388['rangeType']===_0x558957['COMMENT'])['map'](_0x345545=>_0x345545[_0x42f38f(0x11a)]))!=null?_0x1a8df5:[],_0x345d78=JSON[_0x42f38f(0xf7)](_0x56ecca),_0x55c176=_0x4a18c5['threadId'],_0x5ab3b5=_0x4a18c5['id'],_0x113690={'memberId':(await this[_0x42f38f(0x12c)]['requireSession'](_0xf0e616))[_0x42f38f(0x10a)](),'unitId':_0xf0e616,'threadId':_0x55c176,'mention':_0x4ec138,'content':_0x345d78,'replyId':_0x5ab3b5},_0x549625=await this[_0x42f38f(0x119)][_0x42f38f(0x135)](_0x42f38f(0x115)+_0xf0e616+_0x42f38f(0x145),{'body':_0x113690});return!_0x549625[_0x42f38f(0xe7)][_0x42f38f(0x141)]||_0x549625[_0x42f38f(0xe7)][_0x42f38f(0x141)][_0x42f38f(0xfe)]===0x1;}async[_0x956842(0x13c)](_0x385737){const _0x324e5c=_0x956842,{unitId:_0x2b620f}=_0x385737,_0x13b3b4=_0x385737[_0x324e5c(0x126)],_0x5b351c={'memberId':this[_0x324e5c(0x133)][_0x324e5c(0x111)]()[_0x324e5c(0xeb)],'unitId':_0x2b620f,'threadId':_0x13b3b4,'solved':_0x385737['resolved']?I[_0x324e5c(0x11d)]:I['OpenOrReOpen']},_0x1f4c16=await this[_0x324e5c(0x119)][_0x324e5c(0x135)]('/universer-api/comment/unit/'+_0x2b620f+_0x324e5c(0x140),{'body':_0x5b351c});return!_0x1f4c16[_0x324e5c(0xe7)]['error']||_0x1f4c16[_0x324e5c(0xe7)][_0x324e5c(0x141)][_0x324e5c(0xfe)]===0x1;}async['deleteComment'](_0x4270ad,_0x29fd95,_0xaad581,_0x3d79cd){const _0x44ff0e=_0x956842,_0x3a0cd0={'memberId':(await this[_0x44ff0e(0x12c)][_0x44ff0e(0xf8)](_0x4270ad))['getMemberID'](),'threadId':_0xaad581,'replyId':_0x3d79cd,'unitId':_0x4270ad},_0x395fd6=await this[_0x44ff0e(0x119)][_0x44ff0e(0x135)](_0x44ff0e(0x115)+_0x4270ad+_0x44ff0e(0x131),{'body':_0x3a0cd0});return!_0x395fd6[_0x44ff0e(0xe7)][_0x44ff0e(0x141)]||_0x395fd6[_0x44ff0e(0xe7)][_0x44ff0e(0x141)]['code']===0x1;}async[_0x956842(0x130)](_0x5498c0,_0x5eb2b6,_0x2d5c00){const _0x28e2d9=_0x956842,_0x1137ab={'unitId':_0x5498c0,'threadId':_0x2d5c00},_0xf1d849=await this['_httpService']['post'](_0x28e2d9(0x115)+_0x5498c0+'/list',{'body':_0x1137ab}),_0x24fac9=_0x2d5c00[_0x28e2d9(0xe9)](_0x264b43=>ee(_0xf1d849['body'][_0x28e2d9(0x112)][_0x264b43],_0x5498c0,_0x5eb2b6))['filter'](Boolean);return Object[_0x28e2d9(0x13b)](_0xf1d849[_0x28e2d9(0xe7)][_0x28e2d9(0x114)])['forEach'](_0x5c7149=>{const _0x59a7a7=_0x28e2d9;this['_userService'][_0x59a7a7(0xee)](_0x5c7149);}),_0x24fac9;}['saveCommentToSnapshot'](_0x44f4d7){const _0x4d650c=_0x956842;return{'id':_0x44f4d7['id'],'threadId':_0x44f4d7[_0x4d650c(0x126)],'ref':_0x44f4d7[_0x4d650c(0x107)]};}};S=Q([b(0x0,_0x388faa(_0x59a722)),b(0x1,_0x388faa(_0x55f5e7)),b(0x2,_0x388faa(_0x5904f9))],S);var re=Object[_0x956842(0xed)],te=(_0x28e891,_0x1eecb4,_0x18e04b,_0x4ba75d)=>{const _0x204eb6=_0x956842;for(var _0x1e4226=_0x4ba75d>0x1?void 0x0:_0x4ba75d?re(_0x1eecb4,_0x18e04b):_0x1eecb4,_0x53c6eb=_0x28e891[_0x204eb6(0x102)]-0x1,_0xf586cd;_0x53c6eb>=0x0;_0x53c6eb--)(_0xf586cd=_0x28e891[_0x53c6eb])&&(_0x1e4226=_0xf586cd(_0x1e4226)||_0x1e4226);return _0x1e4226;},M=(_0x313d98,_0x5b8d07)=>(_0x3b1760,_0x2ef73a)=>_0x5b8d07(_0x3b1760,_0x2ef73a,_0x313d98);let f=class extends _0x3fbff2{constructor(_0x229eca,_0x4e2365){const _0x50bb22=_0x956842;super(),this['_threadCommentDataSourceService']=_0x229eca,this[_0x50bb22(0xf3)]=_0x4e2365,this[_0x50bb22(0xf0)]();}[_0x956842(0xf0)](){const _0x1e648b=_0x956842;this[_0x1e648b(0x129)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x1e648b(0x128)]=!0x1;}};f=te([M(0x0,_0x2efa6a),M(0x1,_0x388faa(S))],f);var se=Object[_0x956842(0xf5)],oe=Object[_0x956842(0xed)],ne=(_0x247e7d,_0x4462e6,_0x394e7e)=>_0x4462e6 in _0x247e7d?se(_0x247e7d,_0x4462e6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x394e7e}):_0x247e7d[_0x4462e6]=_0x394e7e,ie=(_0x314c32,_0x17d4cc,_0x5828f0,_0x37f6de)=>{const _0x385a6a=_0x956842;for(var _0x357c99=_0x37f6de>0x1?void 0x0:_0x37f6de?oe(_0x17d4cc,_0x5828f0):_0x17d4cc,_0x195918=_0x314c32[_0x385a6a(0x102)]-0x1,_0x3d119f;_0x195918>=0x0;_0x195918--)(_0x3d119f=_0x314c32[_0x195918])&&(_0x357c99=_0x3d119f(_0x357c99)||_0x357c99);return _0x357c99;},N=(_0x4dfbab,_0x436cf6)=>(_0xacb57,_0x24b764)=>_0x436cf6(_0xacb57,_0x24b764,_0x4dfbab),$=(_0x37a608,_0x4fe0b5,_0xda5cba)=>ne(_0x37a608,typeof _0x4fe0b5!=_0x956842(0x123)?_0x4fe0b5+'':_0x4fe0b5,_0xda5cba);let g=class extends _0x16d0b0{constructor(_0x56a7ed=O,_0x15a610,_0x572da2){const _0x2ff10a=_0x956842;super(),this[_0x2ff10a(0x12e)]=_0x56a7ed,this[_0x2ff10a(0x10e)]=_0x15a610,this[_0x2ff10a(0x10c)]=_0x572da2;const {..._0x496091}=_0x32f0bd({},O,this[_0x2ff10a(0x12e)]);this[_0x2ff10a(0x10c)]['setConfig'](z,_0x496091);}[_0x956842(0x121)](){[[S],[f],[_]]['forEach'](_0x5b2cfd=>{const _0x18cbe0=_0x243a;this[_0x18cbe0(0x10e)][_0x18cbe0(0xf6)](_0x5b2cfd);});}[_0x956842(0xe8)](){const _0x1a50d7=_0x956842;this['_injector']['get'](f),this[_0x1a50d7(0x10e)][_0x1a50d7(0x104)](_);}};$(g,_0x956842(0x117),W),$(g,_0x956842(0x136),_0x16ec5a[_0x956842(0x143)]),g=ie([_0x23d00e(_0x4b75f2,_0x3802b1,_0x17a341),N(0x1,_0x388faa(_0x469aaf)),N(0x2,_0x1759fb)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- function _0x4119(_0x33c396,_0x7ecedc){const _0x3a31fa=_0x3a31();return _0x4119=function(_0x411952,_0x372456){_0x411952=_0x411952-0xab;let _0x2b7fee=_0x3a31fa[_0x411952];return _0x2b7fee;},_0x4119(_0x33c396,_0x7ecedc);}const _0x425e5f=_0x4119;(function(_0x4e8257,_0x4fb90c){const _0x64ad97=_0x4119,_0x46e20c=_0x4e8257();while(!![]){try{const _0x4641a8=-parseInt(_0x64ad97(0xab))/0x1*(-parseInt(_0x64ad97(0xc0))/0x2)+-parseInt(_0x64ad97(0x103))/0x3+-parseInt(_0x64ad97(0xfd))/0x4*(parseInt(_0x64ad97(0x10f))/0x5)+-parseInt(_0x64ad97(0xf6))/0x6*(parseInt(_0x64ad97(0xb9))/0x7)+parseInt(_0x64ad97(0xc1))/0x8*(parseInt(_0x64ad97(0xdf))/0x9)+-parseInt(_0x64ad97(0xbe))/0xa+-parseInt(_0x64ad97(0xd7))/0xb*(-parseInt(_0x64ad97(0xdc))/0xc);if(_0x4641a8===_0x4fb90c)break;else _0x46e20c['push'](_0x46e20c['shift']());}catch(_0x269378){_0x46e20c['push'](_0x46e20c['shift']());}}}(_0x3a31,0xdad0c));import{CommentService as _0x241de7,CollaborationSessionService as _0x1c1e03,UniverCollaborationClientPlugin as _0x21f04b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x548071}from'@univerjs-pro/license';import{dayjs as _0x56839b,UserManagerService as _0x517fcb,Inject as _0x722246,Injector as _0x25b10c,Disposable as _0x4d0fd0,CustomRangeType as _0x5dbbf9,UniverInstanceType as _0x1d123f,DependentOn as _0x5a38b0,IConfigService as _0x54164f,Plugin as _0x5d2b76,merge as _0x316a9a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x49f318}from'@univerjs/thread-comment-ui';function _0x3a31(){const _0xd4b343=['_initDataSource','_userService','ref','_sessionService','_httpService','rangeId','root','listComments','forEach','add','error','filter','type','UNRECOGNIZED','saveCommentToSnapshot','addUser','4376614JRHNeu','syncUpdateMutationToColla','personId','post','solved','36EegEBS','YYYY/MM/DD\x20HH:mm','_configService','15938298nApGbu','getOwnPropertyDescriptor','threadId','symbol','subscribe','_commentService','get','COMMENT','deleteComment','pluginName','replyId','stringify','length','UNIVER_UNKNOWN','userId','user','values','reply','getUnit','/edit','_config','/solved','users','6lzmEmW','parse','Delete','defineProperty','content','_threadCommentDataSourceService','code','956JswijB','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','dataSource','Edit','_threadCommentDataSource','2998938AVjVwi','onReady','rangeType','comment','body','Unknown','_initUserSync','/universer-api/user/list','comments','Reply','map','OpenOrReOpen','17040GOukcz','replies','pipe','5KrXTfL','getCurrentUser','onStarting','userID','_threadCommentModel','Solve','createTimestamp','addComment','_init','/list','/universer-api/comment/unit/','getUser','payload','updateComment','6410089oSZpGB','unitId','_injector','customRanges','resolveComment','6631360LdEBdm','requireSession','529898THPCxt','8cvOfnx','Solved','Add','disposeWithMe','find','getMemberID'];_0x3a31=function(){return _0xd4b343;};return _0x3a31();}import{ThreadCommentModel as _0x33a7b8,IThreadCommentDataSourceService as _0x36983c}from'@univerjs/thread-comment';import{bufferTime as _0x250bbc}from'rxjs';import{HTTPService as _0x199b25}from'@univerjs/network';const W=_0x425e5f(0xfe);var I=(_0x42248f=>(_0x42248f[_0x42248f['OpenOrReOpen']=0x0]=_0x425e5f(0x10e),_0x42248f[_0x42248f[_0x425e5f(0xc2)]=0x1]='Solved',_0x42248f[_0x42248f[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x42248f))(I||{}),v=(_0x5abfa2=>(_0x5abfa2[_0x5abfa2[_0x425e5f(0x108)]=0x0]=_0x425e5f(0x108),_0x5abfa2[_0x5abfa2[_0x425e5f(0xc3)]=0x1]=_0x425e5f(0xc3),_0x5abfa2[_0x5abfa2[_0x425e5f(0x10c)]=0x2]=_0x425e5f(0x10c),_0x5abfa2[_0x5abfa2[_0x425e5f(0x101)]=0x3]='Edit',_0x5abfa2[_0x5abfa2[_0x425e5f(0xf8)]=0x4]=_0x425e5f(0xf8),_0x5abfa2[_0x5abfa2[_0x425e5f(0xb0)]=0x5]=_0x425e5f(0xb0),_0x5abfa2[_0x5abfa2[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x5abfa2))(v||{});const D=_0x284839=>_0x56839b(new Date(+_0x284839))[_0x425e5f(0xff)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4507a7,_0x31b235)=>{const _0x3ce1d8=_0x425e5f,_0x2f7b8d=_0x4507a7[_0x3ce1d8(0xe5)](_0x517fcb),_0x2c8720=_0x4507a7[_0x3ce1d8(0xe5)](_0x199b25);_0x31b235['forEach'](_0xc331e7=>{const _0x356049=_0x3ce1d8;_0x2f7b8d[_0x356049(0xb6)](_0xc331e7)&&_0x31b235['delete'](_0xc331e7);}),_0x31b235['size']&&(await _0x2c8720[_0x3ce1d8(0xe5)](_0x3ce1d8(0x10a),{'params':{'userIDs':[..._0x31b235]}}))[_0x3ce1d8(0x107)][_0x3ce1d8(0xf5)][_0x3ce1d8(0xcf)](_0x424c44=>{const _0x144387=_0x3ce1d8;_0x424c44&&_0x2f7b8d[_0x144387(0xd6)](_0x424c44);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x500302,_0x2e2fd0,_0x404d4e,_0x17012f)=>{const _0x525ac6=_0x425e5f;for(var _0x383411=_0x17012f>0x1?void 0x0:_0x17012f?K(_0x2e2fd0,_0x404d4e):_0x2e2fd0,_0xd73450=_0x500302[_0x525ac6(0xeb)]-0x1,_0x396eca;_0xd73450>=0x0;_0xd73450--)(_0x396eca=_0x500302[_0xd73450])&&(_0x383411=_0x396eca(_0x383411)||_0x383411);return _0x383411;},p=(_0x36b10a,_0x517527)=>(_0x3a8b79,_0x3dfb77)=>_0x517527(_0x3a8b79,_0x3dfb77,_0x36b10a);let S=class extends _0x4d0fd0{constructor(_0x1fa63b,_0x14cb90,_0x295174,_0x1b7135){const _0x3a2ad7=_0x425e5f;super(),this[_0x3a2ad7(0xe4)]=_0x1fa63b,this[_0x3a2ad7(0xaf)]=_0x14cb90,this['_userService']=_0x295174,this[_0x3a2ad7(0xbb)]=_0x1b7135,this['_init'](),this[_0x3a2ad7(0x109)]();}[_0x425e5f(0x109)](){const _0x4a568c=_0x425e5f;this[_0x4a568c(0xc4)](this[_0x4a568c(0xaf)]['commentUpdate$'][_0x4a568c(0x111)](_0x250bbc(0x10))[_0x4a568c(0xe3)](_0x3fad4e=>{const _0x245149=_0x4a568c,_0x5666d7=new Set();_0x3fad4e[_0x245149(0xcf)](_0x17fa86=>{const _0x8bf604=_0x245149;switch(_0x17fa86[_0x8bf604(0xd3)]){case _0x8bf604(0xd0):{const _0x46d500=_0x17fa86[_0x8bf604(0xb7)][_0x8bf604(0xd9)];_0x5666d7[_0x8bf604(0xd0)](_0x46d500);break;}}}),B(this['_injector'],_0x5666d7);}));}[_0x425e5f(0xb3)](){const _0x302938=_0x425e5f;this[_0x302938(0xc4)](this['_commentService']['commentUpdate$'][_0x302938(0xe3)](async _0x27400f=>{const _0x125426=_0x302938;var _0x290c8b,_0x27b31d,_0x128787,_0x55de0e;const _0x434ff4=(_0x290c8b=this[_0x125426(0xaf)][_0x125426(0xf1)](_0x27400f[_0x125426(0xba)])[_0x125426(0xc5)](_0x3e61dd=>_0x3e61dd['threadId']===_0x27400f['threadId']))==null?void 0x0:_0x290c8b[_0x125426(0xcd)];if(!_0x434ff4)return;const {unitId:_0x3bc7cb,subUnitId:_0x188ab5}=_0x434ff4;switch(_0x27400f[_0x125426(0xee)]&&this[_0x125426(0xc8)]['addUser'](_0x27400f[_0x125426(0xee)]),_0x27400f[_0x125426(0xd3)]){case v['Add']:break;case v[_0x125426(0x10c)]:{this[_0x125426(0xaf)][_0x125426(0xb2)](_0x3bc7cb,_0x188ab5,{'unitId':_0x3bc7cb,'subUnitId':_0x188ab5,'ref':'','id':_0x27400f[_0x125426(0xe9)],'dT':D(+_0x27400f[_0x125426(0xb1)]),'threadId':_0x27400f['threadId'],'personId':(_0x128787=(_0x27b31d=_0x27400f[_0x125426(0xee)])==null?void 0x0:_0x27b31d[_0x125426(0xae)])!=null?_0x128787:_0x27400f[_0x125426(0xed)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)]),'parentId':_0x434ff4['id']});break;}case v['Delete']:{const _0xb1ffec=this[_0x125426(0xaf)]['getComment'](_0x3bc7cb,_0x188ab5,_0x27400f[_0x125426(0xe9)]);_0xb1ffec&&_0xb1ffec['parentId']&&this[_0x125426(0xaf)]['deleteComment'](_0x3bc7cb,_0x188ab5,_0x27400f['replyId']);break;}case v['Edit']:{this[_0x125426(0xaf)]['updateComment'](_0x3bc7cb,_0x188ab5,{'commentId':_0x27400f[_0x125426(0xe9)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)])});break;}case v['Solve']:{const _0x30b031=(_0x55de0e=this['_threadCommentModel'][_0x125426(0xf1)](_0x27400f['unitId'])['find'](_0x50d026=>_0x50d026[_0x125426(0xe1)]===_0x27400f[_0x125426(0xe1)]))==null?void 0x0:_0x55de0e[_0x125426(0xcd)];_0x30b031&&this[_0x125426(0xaf)][_0x125426(0xbd)](_0x3bc7cb,_0x188ab5,_0x30b031['id'],_0x27400f['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x722246(_0x241de7)),p(0x1,_0x722246(_0x33a7b8)),p(0x2,_0x722246(_0x517fcb)),p(0x3,_0x722246(_0x25b10c))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x425e5f(0xe0)],Q=(_0x2c9e87,_0x5bbf41,_0xc0d470,_0x3ca685)=>{for(var _0x150eff=_0x3ca685>0x1?void 0x0:_0x3ca685?k(_0x5bbf41,_0xc0d470):_0x5bbf41,_0x4b8d08=_0x2c9e87['length']-0x1,_0x1a0084;_0x4b8d08>=0x0;_0x4b8d08--)(_0x1a0084=_0x2c9e87[_0x4b8d08])&&(_0x150eff=_0x1a0084(_0x150eff)||_0x150eff);return _0x150eff;},_=(_0x35841f,_0x122090)=>(_0x5452d1,_0x397167)=>_0x122090(_0x5452d1,_0x397167,_0x35841f);function X(_0x45627c,_0x2314e5){const _0x3425bc=_0x425e5f,_0x494270=_0x45627c[_0x3425bc(0x110)][0x0];return{..._0x2314e5,'id':_0x494270[_0x3425bc(0xe9)],'resolved':_0x45627c[_0x3425bc(0xdb)]===0x1,'dT':D(_0x494270[_0x3425bc(0xb1)]),'personId':_0x494270['userId'],'threadId':_0x494270[_0x3425bc(0xe1)]};}function ee(_0x5bb631,_0x51d510,_0x56c115){const _0x265688=_0x425e5f;var _0x2b78d2,_0x94154a;if(((_0x94154a=(_0x2b78d2=_0x5bb631==null?void 0x0:_0x5bb631[_0x265688(0x110)])==null?void 0x0:_0x2b78d2[_0x265688(0xeb)])!=null?_0x94154a:0x0)>0x0){const _0x4bc798=(_0x193266,_0x145d37)=>({'id':_0x193266[_0x265688(0xe9)],'threadId':_0x193266[_0x265688(0xe1)],'dT':D(_0x193266[_0x265688(0xb1)]),'personId':_0x193266[_0x265688(0xed)],'resolved':_0x5bb631[_0x265688(0xdb)]===I['Solved'],'unitId':_0x51d510,'subUnitId':_0x56c115,'text':JSON[_0x265688(0xf7)](_0x193266[_0x265688(0xfa)]),'parentId':_0x145d37}),_0x5badc1=_0x4bc798(_0x5bb631['replies'][0x0]);return{..._0x5badc1,'children':_0x5bb631['replies']['slice'](0x1)['map'](_0x4cd4a4=>_0x4bc798(_0x4cd4a4,_0x5badc1['id']))};}return null;}let f=class{constructor(_0x4664a5,_0x1bc530,_0x453a75,_0x1da0e6){const _0x1027f7=_0x425e5f;this[_0x1027f7(0xcb)]=_0x4664a5,this[_0x1027f7(0xc8)]=_0x1bc530,this[_0x1027f7(0xca)]=_0x453a75,this[_0x1027f7(0xbb)]=_0x1da0e6;}async[_0x425e5f(0xb2)](_0x689999){const _0x86f68c=_0x425e5f;var _0x1faf94,_0x4b25bc;const {parentId:_0x53a94,unitId:_0x50aa87,text:_0x52355e,threadId:_0x2e3457}=_0x689999,_0x3c684e=(_0x4b25bc=(_0x1faf94=_0x52355e[_0x86f68c(0xbc)])==null?void 0x0:_0x1faf94[_0x86f68c(0xd2)](_0x5728cd=>_0x5728cd[_0x86f68c(0x105)]===_0x5dbbf9[_0x86f68c(0xe6)])[_0x86f68c(0x10d)](_0x4200a0=>_0x4200a0[_0x86f68c(0xcc)]))!=null?_0x4b25bc:[],_0x229563=JSON['stringify'](_0x52355e),_0x2c1fa3=(await this[_0x86f68c(0xca)][_0x86f68c(0xbf)](_0x50aa87))[_0x86f68c(0xc6)]();if(_0x53a94){const _0x47317a={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e,'threadId':_0x2e3457},_0x3dfa63=(await this['_httpService'][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/reply',{'body':_0x47317a}))[_0x86f68c(0x107)][_0x86f68c(0xf0)];return{..._0x689999,'id':_0x3dfa63[_0x86f68c(0xe9)],'dT':_0x56839b(+_0x3dfa63[_0x86f68c(0xb1)])[_0x86f68c(0xff)](_0x86f68c(0xdd)),'personId':_0x3dfa63[_0x86f68c(0xed)]};}else{const _0x51d8e1={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e},_0x1d87d9=await this[_0x86f68c(0xcb)][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/add',{'body':_0x51d8e1});return X(_0x1d87d9[_0x86f68c(0x107)][_0x86f68c(0x106)],_0x689999);}}async[_0x425e5f(0xb8)](_0x54c835){const _0x54e91c=_0x425e5f;var _0x40dafe,_0x5ef016;const {text:_0x5177ac,unitId:_0x6575d}=_0x54c835,_0x37d918=(_0x5ef016=(_0x40dafe=_0x5177ac['customRanges'])==null?void 0x0:_0x40dafe[_0x54e91c(0xd2)](_0x5721ab=>_0x5721ab[_0x54e91c(0x105)]===_0x5dbbf9['COMMENT'])['map'](_0x2ce100=>_0x2ce100['rangeId']))!=null?_0x5ef016:[],_0x381bc6=JSON[_0x54e91c(0xea)](_0x5177ac),_0x17e5f7=_0x54c835[_0x54e91c(0xe1)],_0x13cb70=_0x54c835['id'],_0x461bec={'memberId':(await this[_0x54e91c(0xca)]['requireSession'](_0x6575d))[_0x54e91c(0xc6)](),'unitId':_0x6575d,'threadId':_0x17e5f7,'mention':_0x37d918,'content':_0x381bc6,'replyId':_0x13cb70},_0x38e3a2=await this[_0x54e91c(0xcb)][_0x54e91c(0xda)](_0x54e91c(0xb5)+_0x6575d+_0x54e91c(0xf2),{'body':_0x461bec});return!_0x38e3a2[_0x54e91c(0x107)]['error']||_0x38e3a2['body'][_0x54e91c(0xd1)][_0x54e91c(0xfc)]===0x1;}async[_0x425e5f(0xbd)](_0x30762f){const _0x1cbdd4=_0x425e5f,{unitId:_0x4980a6}=_0x30762f,_0x5227a3=_0x30762f[_0x1cbdd4(0xe1)],_0x2cd44d={'memberId':this[_0x1cbdd4(0xc8)][_0x1cbdd4(0xac)]()[_0x1cbdd4(0xae)],'unitId':_0x4980a6,'threadId':_0x5227a3,'solved':_0x30762f['resolved']?I['Solved']:I['OpenOrReOpen']},_0x540e0c=await this[_0x1cbdd4(0xcb)][_0x1cbdd4(0xda)](_0x1cbdd4(0xb5)+_0x4980a6+_0x1cbdd4(0xf4),{'body':_0x2cd44d});return!_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)]||_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)][_0x1cbdd4(0xfc)]===0x1;}async[_0x425e5f(0xe7)](_0x562ce5,_0x31c8ae,_0x5d192c,_0x51c657){const _0x27aa85=_0x425e5f,_0x527fc1={'memberId':(await this[_0x27aa85(0xca)]['requireSession'](_0x562ce5))[_0x27aa85(0xc6)](),'threadId':_0x5d192c,'replyId':_0x51c657,'unitId':_0x562ce5},_0x255052=await this['_httpService'][_0x27aa85(0xda)](_0x27aa85(0xb5)+_0x562ce5+'/delete',{'body':_0x527fc1});return!_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]||_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]['code']===0x1;}async[_0x425e5f(0xce)](_0x22ca3f,_0x1dcfce,_0x4dafc7){const _0x5a5b03=_0x425e5f,_0x5dbc47={'unitId':_0x22ca3f,'threadId':_0x4dafc7},_0x2a0489=await this['_httpService']['post'](_0x5a5b03(0xb5)+_0x22ca3f+_0x5a5b03(0xb4),{'body':_0x5dbc47}),_0x533b53=_0x4dafc7[_0x5a5b03(0x10d)](_0x54fb20=>ee(_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0x10b)][_0x54fb20],_0x22ca3f,_0x1dcfce))[_0x5a5b03(0xd2)](Boolean);return Object[_0x5a5b03(0xef)](_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0xf5)])[_0x5a5b03(0xcf)](_0x16fd25=>{const _0x81b8fd=_0x5a5b03;this[_0x81b8fd(0xc8)]['addUser'](_0x16fd25);}),_0x533b53;}[_0x425e5f(0xd5)](_0x3a387d){const _0x597b38=_0x425e5f;return{'id':_0x3a387d['id'],'threadId':_0x3a387d['threadId'],'ref':_0x3a387d[_0x597b38(0xc9)]};}};f=Q([_(0x0,_0x722246(_0x199b25)),_(0x1,_0x722246(_0x517fcb)),_(0x2,_0x722246(_0x1c1e03)),_(0x3,_0x722246(_0x25b10c))],f);var re=Object[_0x425e5f(0xe0)],te=(_0x9f81f9,_0x54c8b6,_0x266938,_0xa26a6a)=>{const _0x394d41=_0x425e5f;for(var _0x3fa3cb=_0xa26a6a>0x1?void 0x0:_0xa26a6a?re(_0x54c8b6,_0x266938):_0x54c8b6,_0x4f72cb=_0x9f81f9[_0x394d41(0xeb)]-0x1,_0x59c7bb;_0x4f72cb>=0x0;_0x4f72cb--)(_0x59c7bb=_0x9f81f9[_0x4f72cb])&&(_0x3fa3cb=_0x59c7bb(_0x3fa3cb)||_0x3fa3cb);return _0x3fa3cb;},N=(_0x16bcfb,_0x1b5152)=>(_0xaedfca,_0x27e232)=>_0x1b5152(_0xaedfca,_0x27e232,_0x16bcfb);let g=class extends _0x4d0fd0{constructor(_0x2434d1,_0x318b48){const _0x42aafc=_0x425e5f;super(),this['_threadCommentDataSourceService']=_0x2434d1,this['_threadCommentDataSource']=_0x318b48,this[_0x42aafc(0xc7)]();}[_0x425e5f(0xc7)](){const _0x14d606=_0x425e5f;this[_0x14d606(0xfb)][_0x14d606(0x100)]=this[_0x14d606(0x102)],this[_0x14d606(0xfb)][_0x14d606(0xd8)]=!0x1;}};g=te([N(0x0,_0x36983c),N(0x1,_0x722246(f))],g);var se=Object[_0x425e5f(0xf9)],oe=Object[_0x425e5f(0xe0)],ne=(_0x5a9072,_0x5ec4fc,_0x6da4c2)=>_0x5ec4fc in _0x5a9072?se(_0x5a9072,_0x5ec4fc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6da4c2}):_0x5a9072[_0x5ec4fc]=_0x6da4c2,ie=(_0x4bb8e5,_0x19a3e5,_0x55390e,_0x43e9a5)=>{for(var _0x5a7cec=_0x43e9a5>0x1?void 0x0:_0x43e9a5?oe(_0x19a3e5,_0x55390e):_0x19a3e5,_0x48a66c=_0x4bb8e5['length']-0x1,_0x1d0097;_0x48a66c>=0x0;_0x48a66c--)(_0x1d0097=_0x4bb8e5[_0x48a66c])&&(_0x5a7cec=_0x1d0097(_0x5a7cec)||_0x5a7cec);return _0x5a7cec;},w=(_0x5de127,_0xc2847b)=>(_0x3d3baf,_0x514773)=>_0xc2847b(_0x3d3baf,_0x514773,_0x5de127),$=(_0x4a50ef,_0xdaae1c,_0x148dd2)=>ne(_0x4a50ef,typeof _0xdaae1c!=_0x425e5f(0xe2)?_0xdaae1c+'':_0xdaae1c,_0x148dd2);let b=class extends _0x5d2b76{constructor(_0x45c136=M,_0x4fe88f,_0x1a949d){const _0x41c0d3=_0x425e5f;super(),this[_0x41c0d3(0xf3)]=_0x45c136,this[_0x41c0d3(0xbb)]=_0x4fe88f,this[_0x41c0d3(0xde)]=_0x1a949d;const {..._0x3fbf03}=_0x316a9a({},M,this[_0x41c0d3(0xf3)]);this[_0x41c0d3(0xde)]['setConfig'](z,_0x3fbf03);}[_0x425e5f(0xad)](){const _0x5490df=_0x425e5f;[[f],[g],[S]][_0x5490df(0xcf)](_0xf0efb=>{const _0x533850=_0x5490df;this[_0x533850(0xbb)]['add'](_0xf0efb);});}[_0x425e5f(0x104)](){this['_injector']['get'](g),this['_injector']['get'](S);}};$(b,_0x425e5f(0xe8),W),$(b,_0x425e5f(0xd3),_0x1d123f[_0x425e5f(0xec)]),b=ie([_0x5a38b0(_0x49f318,_0x21f04b,_0x548071),w(0x1,_0x722246(_0x25b10c)),w(0x2,_0x54164f)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x243a(_0x50dc7e,_0x2ffada){const _0x290111=_0x2901();return _0x243a=function(_0x243a27,_0x4c55b7){_0x243a27=_0x243a27-0xe6;let _0x4305bb=_0x290111[_0x243a27];return _0x4305bb;},_0x243a(_0x50dc7e,_0x2ffada);}const _0x956842=_0x243a;(function(_0x5079eb,_0x1c2770){const _0x137e76=_0x243a,_0x23b293=_0x5079eb();while(!![]){try{const _0x55df3c=parseInt(_0x137e76(0x13a))/0x1*(parseInt(_0x137e76(0xec))/0x2)+parseInt(_0x137e76(0x132))/0x3*(parseInt(_0x137e76(0x11e))/0x4)+-parseInt(_0x137e76(0xea))/0x5+parseInt(_0x137e76(0x11f))/0x6*(parseInt(_0x137e76(0xf2))/0x7)+-parseInt(_0x137e76(0x14e))/0x8*(-parseInt(_0x137e76(0x118))/0x9)+parseInt(_0x137e76(0x10b))/0xa*(parseInt(_0x137e76(0xfa))/0xb)+parseInt(_0x137e76(0x125))/0xc*(-parseInt(_0x137e76(0x12d))/0xd);if(_0x55df3c===_0x1c2770)break;else _0x23b293['push'](_0x23b293['shift']());}catch(_0x5a687d){_0x23b293['push'](_0x23b293['shift']());}}}(_0x2901,0x9f485));import{CommentService as _0x403a4b,CollaborationSessionService as _0x5904f9,UniverCollaborationClientPlugin as _0x3802b1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x17a341}from'@univerjs-pro/license';import{dayjs as _0x3e920d,UserManagerService as _0x55f5e7,Inject as _0x388faa,Injector as _0x469aaf,Disposable as _0x3fbff2,CustomRangeType as _0x558957,UniverInstanceType as _0x16ec5a,DependentOn as _0x23d00e,IConfigService as _0x1759fb,Plugin as _0x16d0b0,merge as _0x32f0bd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4b75f2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x411c90,IThreadCommentDataSourceService as _0x2efa6a}from'@univerjs/thread-comment';import{bufferTime as _0x2e0e87}from'rxjs';import{HTTPService as _0x59a722}from'@univerjs/network';const W=_0x956842(0xe6);var I=(_0x530b6e=>(_0x530b6e[_0x530b6e[_0x956842(0x11c)]=0x0]=_0x956842(0x11c),_0x530b6e[_0x530b6e[_0x956842(0x11d)]=0x1]=_0x956842(0x11d),_0x530b6e[_0x530b6e[_0x956842(0x110)]=-0x1]='UNRECOGNIZED',_0x530b6e))(I||{}),v=(_0x1ec410=>(_0x1ec410[_0x1ec410[_0x956842(0xef)]=0x0]=_0x956842(0xef),_0x1ec410[_0x1ec410[_0x956842(0x127)]=0x1]='Add',_0x1ec410[_0x1ec410[_0x956842(0x142)]=0x2]='Reply',_0x1ec410[_0x1ec410[_0x956842(0x116)]=0x3]=_0x956842(0x116),_0x1ec410[_0x1ec410['Delete']=0x4]=_0x956842(0x105),_0x1ec410[_0x1ec410['Solve']=0x5]='Solve',_0x1ec410[_0x1ec410['UNRECOGNIZED']=-0x1]=_0x956842(0x110),_0x1ec410))(v||{});const y=_0x1ed2c=>_0x3e920d(new Date(+_0x1ed2c))['format'](_0x956842(0x146)),B=async(_0x427779,_0x3dc734)=>{const _0xba1855=_0x956842,_0x4c81d4=_0x427779['get'](_0x55f5e7),_0x4da8b4=_0x427779[_0xba1855(0x104)](_0x59a722);_0x3dc734[_0xba1855(0xf9)](_0x2f6e96=>{const _0x5db7fb=_0xba1855;_0x4c81d4[_0x5db7fb(0xfb)](_0x2f6e96)&&_0x3dc734[_0x5db7fb(0x12b)](_0x2f6e96);}),_0x3dc734[_0xba1855(0x139)]&&(await _0x4da8b4[_0xba1855(0x104)](_0xba1855(0x13e),{'params':{'userIDs':[..._0x3dc734]}}))[_0xba1855(0xe7)][_0xba1855(0x114)][_0xba1855(0xf9)](_0x28eb97=>{const _0x87b5d7=_0xba1855;_0x28eb97&&_0x4c81d4[_0x87b5d7(0xee)](_0x28eb97);});};function _0x2901(){const _0x48b080=['623718QKajwB','_httpService','rangeId','thread-comment-data-source.config','OpenOrReOpen','Solved','4btnRLq','415542oIynic','replyId','onStarting','customRanges','symbol','_initUserSync','57768WKSNZD','threadId','Add','syncUpdateMutationToColla','_threadCommentDataSourceService','COMMENT','delete','_sessionService','923HtBIIo','_config','Solve','listComments','/delete','885480piMWoC','_userService','disposeWithMe','post','type','pipe','_commentService','size','11mlWGhU','values','resolveComment','content','/universer-api/user/list','getUnit','/solved','error','Reply','UNIVER_UNKNOWN','addComment','/edit','YYYY/MM/DD\x20HH:mm','updateComment','deleteComment','format','_threadCommentModel','solved','parentId','payload','80ZsIGZc','createTimestamp','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','body','onReady','map','2331295mWHlbM','userID','47198vgyGVD','getOwnPropertyDescriptor','addUser','Unknown','_initDataSource','find','7piVRtL','_threadCommentDataSource','replies','defineProperty','add','stringify','requireSession','forEach','44KTHrcO','getUser','commentUpdate$','comment','code','parse','personId','subscribe','length','root','get','Delete','user','ref','userId','filter','getMemberID','358620MbbeEp','_configService','unitId','_injector','_init','UNRECOGNIZED','getCurrentUser','comments','getComment','users','/universer-api/comment/unit/','Edit','pluginName'];_0x2901=function(){return _0x48b080;};return _0x2901();}var K=Object[_0x956842(0xed)],V=(_0x39eb99,_0x109956,_0x307906,_0x333a6d)=>{for(var _0x4973ff=_0x333a6d>0x1?void 0x0:_0x333a6d?K(_0x109956,_0x307906):_0x109956,_0x2052a6=_0x39eb99['length']-0x1,_0x2f23c5;_0x2052a6>=0x0;_0x2052a6--)(_0x2f23c5=_0x39eb99[_0x2052a6])&&(_0x4973ff=_0x2f23c5(_0x4973ff)||_0x4973ff);return _0x4973ff;},p=(_0xa5c78e,_0x2ed838)=>(_0x2019fc,_0xef746d)=>_0x2ed838(_0x2019fc,_0xef746d,_0xa5c78e);let _=class extends _0x3fbff2{constructor(_0x5d3458,_0x1875b5,_0x4dddbb,_0x240d49){const _0x1a3d24=_0x956842;super(),this[_0x1a3d24(0x138)]=_0x5d3458,this['_threadCommentModel']=_0x1875b5,this[_0x1a3d24(0x133)]=_0x4dddbb,this['_injector']=_0x240d49,this[_0x1a3d24(0x10f)](),this[_0x1a3d24(0x124)]();}[_0x956842(0x124)](){const _0x4662b4=_0x956842;this[_0x4662b4(0x134)](this['_threadCommentModel']['commentUpdate$'][_0x4662b4(0x137)](_0x2e0e87(0x10))[_0x4662b4(0x101)](_0x52e62c=>{const _0xcffc11=_0x4662b4,_0x2d98cf=new Set();_0x52e62c[_0xcffc11(0xf9)](_0x262d99=>{const _0x4e8b2f=_0xcffc11;switch(_0x262d99[_0x4e8b2f(0x136)]){case _0x4e8b2f(0xf6):{const _0x3bd4a8=_0x262d99[_0x4e8b2f(0x14d)][_0x4e8b2f(0x100)];_0x2d98cf['add'](_0x3bd4a8);break;}}}),B(this['_injector'],_0x2d98cf);}));}['_init'](){const _0x35069c=_0x956842;this[_0x35069c(0x134)](this['_commentService'][_0x35069c(0xfc)][_0x35069c(0x101)](async _0x941f38=>{const _0xe8fb09=_0x35069c;var _0x40e9d0,_0x4794c5,_0x21d1a5,_0x3d2411;const _0x222bc8=(_0x40e9d0=this[_0xe8fb09(0x14a)][_0xe8fb09(0x13f)](_0x941f38[_0xe8fb09(0x10d)])[_0xe8fb09(0xf1)](_0x72d09=>_0x72d09[_0xe8fb09(0x126)]===_0x941f38['threadId']))==null?void 0x0:_0x40e9d0[_0xe8fb09(0x103)];if(!_0x222bc8)return;const {unitId:_0xdc874d,subUnitId:_0xe4fe24}=_0x222bc8;switch(_0x941f38[_0xe8fb09(0x106)]&&this['_userService'][_0xe8fb09(0xee)](_0x941f38['user']),_0x941f38[_0xe8fb09(0x136)]){case v['Add']:break;case v['Reply']:{this[_0xe8fb09(0x14a)][_0xe8fb09(0x144)](_0xdc874d,_0xe4fe24,{'unitId':_0xdc874d,'subUnitId':_0xe4fe24,'ref':'','id':_0x941f38['replyId'],'dT':y(+_0x941f38[_0xe8fb09(0x14f)]),'threadId':_0x941f38['threadId'],'personId':(_0x21d1a5=(_0x4794c5=_0x941f38[_0xe8fb09(0x106)])==null?void 0x0:_0x4794c5[_0xe8fb09(0xeb)])!=null?_0x21d1a5:_0x941f38[_0xe8fb09(0x108)],'text':JSON[_0xe8fb09(0xff)](_0x941f38[_0xe8fb09(0x13d)]),'parentId':_0x222bc8['id']});break;}case v[_0xe8fb09(0x105)]:{const _0x4f27dc=this[_0xe8fb09(0x14a)][_0xe8fb09(0x113)](_0xdc874d,_0xe4fe24,_0x941f38[_0xe8fb09(0x120)]);_0x4f27dc&&_0x4f27dc[_0xe8fb09(0x14c)]&&this[_0xe8fb09(0x14a)][_0xe8fb09(0x148)](_0xdc874d,_0xe4fe24,_0x941f38['replyId']);break;}case v[_0xe8fb09(0x116)]:{this[_0xe8fb09(0x14a)][_0xe8fb09(0x147)](_0xdc874d,_0xe4fe24,{'commentId':_0x941f38[_0xe8fb09(0x120)],'text':JSON[_0xe8fb09(0xff)](_0x941f38['content'])});break;}case v[_0xe8fb09(0x12f)]:{const _0x23a64f=(_0x3d2411=this[_0xe8fb09(0x14a)]['getUnit'](_0x941f38['unitId'])['find'](_0x52ecb5=>_0x52ecb5[_0xe8fb09(0x126)]===_0x941f38[_0xe8fb09(0x126)]))==null?void 0x0:_0x3d2411['root'];_0x23a64f&&this[_0xe8fb09(0x14a)][_0xe8fb09(0x13c)](_0xdc874d,_0xe4fe24,_0x23a64f['id'],_0x941f38[_0xe8fb09(0x14b)]===I[_0xe8fb09(0x11d)]);break;}}}));}};_=V([p(0x0,_0x388faa(_0x403a4b)),p(0x1,_0x388faa(_0x411c90)),p(0x2,_0x388faa(_0x55f5e7)),p(0x3,_0x388faa(_0x469aaf))],_);const z=_0x956842(0x11b),O={};var k=Object[_0x956842(0xed)],Q=(_0x302ede,_0x3d65f6,_0x8f7c97,_0x51c1e0)=>{for(var _0xf13b86=_0x51c1e0>0x1?void 0x0:_0x51c1e0?k(_0x3d65f6,_0x8f7c97):_0x3d65f6,_0x1c01c6=_0x302ede['length']-0x1,_0x5a5ce4;_0x1c01c6>=0x0;_0x1c01c6--)(_0x5a5ce4=_0x302ede[_0x1c01c6])&&(_0xf13b86=_0x5a5ce4(_0xf13b86)||_0xf13b86);return _0xf13b86;},b=(_0x1ef184,_0x4c3b75)=>(_0x347115,_0x3f53b4)=>_0x4c3b75(_0x347115,_0x3f53b4,_0x1ef184);function X(_0x4c380b,_0x59cce5){const _0x2ae662=_0x956842,_0x13d7a8=_0x4c380b[_0x2ae662(0xf4)][0x0];return{..._0x59cce5,'id':_0x13d7a8[_0x2ae662(0x120)],'resolved':_0x4c380b[_0x2ae662(0x14b)]===0x1,'dT':y(_0x13d7a8['createTimestamp']),'personId':_0x13d7a8[_0x2ae662(0x108)],'threadId':_0x13d7a8['threadId']};}function ee(_0x57b8dd,_0x336cd5,_0x3ad42c){const _0xaa05fa=_0x956842;var _0x4b699c,_0x1621c5;if(((_0x1621c5=(_0x4b699c=_0x57b8dd==null?void 0x0:_0x57b8dd['replies'])==null?void 0x0:_0x4b699c[_0xaa05fa(0x102)])!=null?_0x1621c5:0x0)>0x0){const _0x258ccc=(_0x3ee5ac,_0x1e6995)=>({'id':_0x3ee5ac[_0xaa05fa(0x120)],'threadId':_0x3ee5ac['threadId'],'dT':y(_0x3ee5ac[_0xaa05fa(0x14f)]),'personId':_0x3ee5ac[_0xaa05fa(0x108)],'resolved':_0x57b8dd[_0xaa05fa(0x14b)]===I[_0xaa05fa(0x11d)],'unitId':_0x336cd5,'subUnitId':_0x3ad42c,'text':JSON[_0xaa05fa(0xff)](_0x3ee5ac[_0xaa05fa(0x13d)]),'parentId':_0x1e6995}),_0xc7b3eb=_0x258ccc(_0x57b8dd['replies'][0x0]);return{..._0xc7b3eb,'children':_0x57b8dd[_0xaa05fa(0xf4)]['slice'](0x1)[_0xaa05fa(0xe9)](_0x4dcd08=>_0x258ccc(_0x4dcd08,_0xc7b3eb['id']))};}return null;}let S=class{constructor(_0x124ede,_0x2637eb,_0x20918a){const _0x6518f3=_0x956842;this['_httpService']=_0x124ede,this[_0x6518f3(0x133)]=_0x2637eb,this[_0x6518f3(0x12c)]=_0x20918a;}async[_0x956842(0x144)](_0x31fd1c){const _0x3f9f13=_0x956842;var _0x204986,_0xca1818;const {parentId:_0x1c2f71,unitId:_0x1b9b5c,text:_0x2c7406,threadId:_0x4752ef}=_0x31fd1c,_0x275b9c=(_0xca1818=(_0x204986=_0x2c7406[_0x3f9f13(0x122)])==null?void 0x0:_0x204986[_0x3f9f13(0x109)](_0x55cfd8=>_0x55cfd8['rangeType']===_0x558957[_0x3f9f13(0x12a)])[_0x3f9f13(0xe9)](_0x227f18=>_0x227f18['rangeId']))!=null?_0xca1818:[],_0xf87d93=JSON[_0x3f9f13(0xf7)](_0x2c7406),_0x41b0f3=(await this[_0x3f9f13(0x12c)][_0x3f9f13(0xf8)](_0x1b9b5c))['getMemberID']();if(_0x1c2f71){const _0x334645={'memberId':_0x41b0f3,'unitId':_0x1b9b5c,'content':_0xf87d93,'mention':_0x275b9c,'threadId':_0x4752ef},_0x4b45fa=(await this[_0x3f9f13(0x119)]['post']('/universer-api/comment/unit/'+_0x1b9b5c+'/reply',{'body':_0x334645}))[_0x3f9f13(0xe7)]['reply'];return{..._0x31fd1c,'id':_0x4b45fa[_0x3f9f13(0x120)],'dT':_0x3e920d(+_0x4b45fa[_0x3f9f13(0x14f)])[_0x3f9f13(0x149)](_0x3f9f13(0x146)),'personId':_0x4b45fa['userId']};}else{const _0x1c8531={'memberId':_0x41b0f3,'unitId':_0x1b9b5c,'content':_0xf87d93,'mention':_0x275b9c},_0x53880d=await this[_0x3f9f13(0x119)][_0x3f9f13(0x135)]('/universer-api/comment/unit/'+_0x1b9b5c+'/add',{'body':_0x1c8531});return X(_0x53880d[_0x3f9f13(0xe7)][_0x3f9f13(0xfd)],_0x31fd1c);}}async[_0x956842(0x147)](_0x4a18c5){const _0x42f38f=_0x956842;var _0x26e246,_0x1a8df5;const {text:_0x56ecca,unitId:_0xf0e616}=_0x4a18c5,_0x4ec138=(_0x1a8df5=(_0x26e246=_0x56ecca[_0x42f38f(0x122)])==null?void 0x0:_0x26e246[_0x42f38f(0x109)](_0x5b3388=>_0x5b3388['rangeType']===_0x558957['COMMENT'])['map'](_0x345545=>_0x345545[_0x42f38f(0x11a)]))!=null?_0x1a8df5:[],_0x345d78=JSON[_0x42f38f(0xf7)](_0x56ecca),_0x55c176=_0x4a18c5['threadId'],_0x5ab3b5=_0x4a18c5['id'],_0x113690={'memberId':(await this[_0x42f38f(0x12c)]['requireSession'](_0xf0e616))[_0x42f38f(0x10a)](),'unitId':_0xf0e616,'threadId':_0x55c176,'mention':_0x4ec138,'content':_0x345d78,'replyId':_0x5ab3b5},_0x549625=await this[_0x42f38f(0x119)][_0x42f38f(0x135)](_0x42f38f(0x115)+_0xf0e616+_0x42f38f(0x145),{'body':_0x113690});return!_0x549625[_0x42f38f(0xe7)][_0x42f38f(0x141)]||_0x549625[_0x42f38f(0xe7)][_0x42f38f(0x141)][_0x42f38f(0xfe)]===0x1;}async[_0x956842(0x13c)](_0x385737){const _0x324e5c=_0x956842,{unitId:_0x2b620f}=_0x385737,_0x13b3b4=_0x385737[_0x324e5c(0x126)],_0x5b351c={'memberId':this[_0x324e5c(0x133)][_0x324e5c(0x111)]()[_0x324e5c(0xeb)],'unitId':_0x2b620f,'threadId':_0x13b3b4,'solved':_0x385737['resolved']?I[_0x324e5c(0x11d)]:I['OpenOrReOpen']},_0x1f4c16=await this[_0x324e5c(0x119)][_0x324e5c(0x135)]('/universer-api/comment/unit/'+_0x2b620f+_0x324e5c(0x140),{'body':_0x5b351c});return!_0x1f4c16[_0x324e5c(0xe7)]['error']||_0x1f4c16[_0x324e5c(0xe7)][_0x324e5c(0x141)][_0x324e5c(0xfe)]===0x1;}async['deleteComment'](_0x4270ad,_0x29fd95,_0xaad581,_0x3d79cd){const _0x44ff0e=_0x956842,_0x3a0cd0={'memberId':(await this[_0x44ff0e(0x12c)][_0x44ff0e(0xf8)](_0x4270ad))['getMemberID'](),'threadId':_0xaad581,'replyId':_0x3d79cd,'unitId':_0x4270ad},_0x395fd6=await this[_0x44ff0e(0x119)][_0x44ff0e(0x135)](_0x44ff0e(0x115)+_0x4270ad+_0x44ff0e(0x131),{'body':_0x3a0cd0});return!_0x395fd6[_0x44ff0e(0xe7)][_0x44ff0e(0x141)]||_0x395fd6[_0x44ff0e(0xe7)][_0x44ff0e(0x141)]['code']===0x1;}async[_0x956842(0x130)](_0x5498c0,_0x5eb2b6,_0x2d5c00){const _0x28e2d9=_0x956842,_0x1137ab={'unitId':_0x5498c0,'threadId':_0x2d5c00},_0xf1d849=await this['_httpService']['post'](_0x28e2d9(0x115)+_0x5498c0+'/list',{'body':_0x1137ab}),_0x24fac9=_0x2d5c00[_0x28e2d9(0xe9)](_0x264b43=>ee(_0xf1d849['body'][_0x28e2d9(0x112)][_0x264b43],_0x5498c0,_0x5eb2b6))['filter'](Boolean);return Object[_0x28e2d9(0x13b)](_0xf1d849[_0x28e2d9(0xe7)][_0x28e2d9(0x114)])['forEach'](_0x5c7149=>{const _0x59a7a7=_0x28e2d9;this['_userService'][_0x59a7a7(0xee)](_0x5c7149);}),_0x24fac9;}['saveCommentToSnapshot'](_0x44f4d7){const _0x4d650c=_0x956842;return{'id':_0x44f4d7['id'],'threadId':_0x44f4d7[_0x4d650c(0x126)],'ref':_0x44f4d7[_0x4d650c(0x107)]};}};S=Q([b(0x0,_0x388faa(_0x59a722)),b(0x1,_0x388faa(_0x55f5e7)),b(0x2,_0x388faa(_0x5904f9))],S);var re=Object[_0x956842(0xed)],te=(_0x28e891,_0x1eecb4,_0x18e04b,_0x4ba75d)=>{const _0x204eb6=_0x956842;for(var _0x1e4226=_0x4ba75d>0x1?void 0x0:_0x4ba75d?re(_0x1eecb4,_0x18e04b):_0x1eecb4,_0x53c6eb=_0x28e891[_0x204eb6(0x102)]-0x1,_0xf586cd;_0x53c6eb>=0x0;_0x53c6eb--)(_0xf586cd=_0x28e891[_0x53c6eb])&&(_0x1e4226=_0xf586cd(_0x1e4226)||_0x1e4226);return _0x1e4226;},M=(_0x313d98,_0x5b8d07)=>(_0x3b1760,_0x2ef73a)=>_0x5b8d07(_0x3b1760,_0x2ef73a,_0x313d98);let f=class extends _0x3fbff2{constructor(_0x229eca,_0x4e2365){const _0x50bb22=_0x956842;super(),this['_threadCommentDataSourceService']=_0x229eca,this[_0x50bb22(0xf3)]=_0x4e2365,this[_0x50bb22(0xf0)]();}[_0x956842(0xf0)](){const _0x1e648b=_0x956842;this[_0x1e648b(0x129)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x1e648b(0x128)]=!0x1;}};f=te([M(0x0,_0x2efa6a),M(0x1,_0x388faa(S))],f);var se=Object[_0x956842(0xf5)],oe=Object[_0x956842(0xed)],ne=(_0x247e7d,_0x4462e6,_0x394e7e)=>_0x4462e6 in _0x247e7d?se(_0x247e7d,_0x4462e6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x394e7e}):_0x247e7d[_0x4462e6]=_0x394e7e,ie=(_0x314c32,_0x17d4cc,_0x5828f0,_0x37f6de)=>{const _0x385a6a=_0x956842;for(var _0x357c99=_0x37f6de>0x1?void 0x0:_0x37f6de?oe(_0x17d4cc,_0x5828f0):_0x17d4cc,_0x195918=_0x314c32[_0x385a6a(0x102)]-0x1,_0x3d119f;_0x195918>=0x0;_0x195918--)(_0x3d119f=_0x314c32[_0x195918])&&(_0x357c99=_0x3d119f(_0x357c99)||_0x357c99);return _0x357c99;},N=(_0x4dfbab,_0x436cf6)=>(_0xacb57,_0x24b764)=>_0x436cf6(_0xacb57,_0x24b764,_0x4dfbab),$=(_0x37a608,_0x4fe0b5,_0xda5cba)=>ne(_0x37a608,typeof _0x4fe0b5!=_0x956842(0x123)?_0x4fe0b5+'':_0x4fe0b5,_0xda5cba);let g=class extends _0x16d0b0{constructor(_0x56a7ed=O,_0x15a610,_0x572da2){const _0x2ff10a=_0x956842;super(),this[_0x2ff10a(0x12e)]=_0x56a7ed,this[_0x2ff10a(0x10e)]=_0x15a610,this[_0x2ff10a(0x10c)]=_0x572da2;const {..._0x496091}=_0x32f0bd({},O,this[_0x2ff10a(0x12e)]);this[_0x2ff10a(0x10c)]['setConfig'](z,_0x496091);}[_0x956842(0x121)](){[[S],[f],[_]]['forEach'](_0x5b2cfd=>{const _0x18cbe0=_0x243a;this[_0x18cbe0(0x10e)][_0x18cbe0(0xf6)](_0x5b2cfd);});}[_0x956842(0xe8)](){const _0x1a50d7=_0x956842;this['_injector']['get'](f),this[_0x1a50d7(0x10e)][_0x1a50d7(0x104)](_);}};$(g,_0x956842(0x117),W),$(g,_0x956842(0x136),_0x16ec5a[_0x956842(0x143)]),g=ie([_0x23d00e(_0x4b75f2,_0x3802b1,_0x17a341),N(0x1,_0x388faa(_0x469aaf)),N(0x2,_0x1759fb)],g);export{g as UniverThreadCommentDataSourcePlugin};
@@ -1,13 +1,12 @@
1
1
  import { IBaseComment, IThreadComment, IThreadCommentDataSource } from '@univerjs/thread-comment';
2
2
  import { CollaborationSessionService } from '@univerjs-pro/collaboration-client';
3
- import { Injector, UserManagerService } from '@univerjs/core';
3
+ import { UserManagerService } from '@univerjs/core';
4
4
  import { HTTPService } from '@univerjs/network';
5
5
  export declare class ThreadCommentServerDataSource implements IThreadCommentDataSource {
6
6
  private readonly _httpService;
7
7
  private readonly _userService;
8
8
  private readonly _sessionService;
9
- private _injector;
10
- constructor(_httpService: HTTPService, _userService: UserManagerService, _sessionService: CollaborationSessionService, _injector: Injector);
9
+ constructor(_httpService: HTTPService, _userService: UserManagerService, _sessionService: CollaborationSessionService);
11
10
  addComment(comment: IThreadComment): Promise<IThreadComment>;
12
11
  updateComment(comment: IThreadComment): Promise<boolean>;
13
12
  resolveComment(comment: IThreadComment): Promise<boolean>;
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0xac8b(_0x349f53,_0x1b7620){const _0x210c8d=_0x210c();return _0xac8b=function(_0xac8bb9,_0x4e2e7b){_0xac8bb9=_0xac8bb9-0xa4;let _0x235519=_0x210c8d[_0xac8bb9];return _0x235519;},_0xac8b(_0x349f53,_0x1b7620);}(function(_0x38003a,_0x17c3e0){const _0x5ed62e=_0xac8b,_0x231e73=_0x38003a();while(!![]){try{const _0x3e5fc9=parseInt(_0x5ed62e(0x11f))/0x1*(parseInt(_0x5ed62e(0xd8))/0x2)+parseInt(_0x5ed62e(0xcf))/0x3+parseInt(_0x5ed62e(0xd0))/0x4*(parseInt(_0x5ed62e(0xc2))/0x5)+-parseInt(_0x5ed62e(0xe5))/0x6+-parseInt(_0x5ed62e(0xbd))/0x7*(-parseInt(_0x5ed62e(0xb4))/0x8)+-parseInt(_0x5ed62e(0xe3))/0x9*(parseInt(_0x5ed62e(0xf7))/0xa)+-parseInt(_0x5ed62e(0x103))/0xb;if(_0x3e5fc9===_0x17c3e0)break;else _0x231e73['push'](_0x231e73['shift']());}catch(_0xb42b70){_0x231e73['push'](_0x231e73['shift']());}}}(_0x210c,0x78ea9),function(_0x472981,_0x10d18d){const _0x24b9d0=_0xac8b;typeof exports==_0x24b9d0(0xbf)&&typeof module<'u'?_0x10d18d(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=='function'&&define[_0x24b9d0(0x116)]?define([_0x24b9d0(0xda),_0x24b9d0(0x122),_0x24b9d0(0xe4),_0x24b9d0(0xa9),_0x24b9d0(0xba),'@univerjs/thread-comment',_0x24b9d0(0xd5),_0x24b9d0(0xd7)],_0x10d18d):(_0x472981=typeof globalThis<'u'?globalThis:_0x472981||self,_0x10d18d(_0x472981[_0x24b9d0(0xc1)]={},_0x472981[_0x24b9d0(0xdb)],_0x472981[_0x24b9d0(0xa8)],_0x472981['UniverCore'],_0x472981[_0x24b9d0(0x110)],_0x472981[_0x24b9d0(0xb9)],_0x472981[_0x24b9d0(0xd5)],_0x472981[_0x24b9d0(0x121)]));}(this,function(_0x3f28f9,_0x464d37,_0x3841b4,_0x4175d3,_0x14644c,_0x391618,_0x399f04,_0x3c568e){'use strict';const _0x3e564b=_0xac8b;const _0x3eb321=_0x3e564b(0x10e);var _0x58b7cb=(_0x3b7cf9=>(_0x3b7cf9[_0x3b7cf9[_0x3e564b(0xe7)]=0x0]='OpenOrReOpen',_0x3b7cf9[_0x3b7cf9[_0x3e564b(0xf5)]=0x1]='Solved',_0x3b7cf9[_0x3b7cf9[_0x3e564b(0xe0)]=-0x1]='UNRECOGNIZED',_0x3b7cf9))(_0x58b7cb||{}),_0x3503fc=(_0x506305=>(_0x506305[_0x506305[_0x3e564b(0x120)]=0x0]=_0x3e564b(0x120),_0x506305[_0x506305[_0x3e564b(0xc9)]=0x1]=_0x3e564b(0xc9),_0x506305[_0x506305['Reply']=0x2]=_0x3e564b(0xd4),_0x506305[_0x506305[_0x3e564b(0xbc)]=0x3]=_0x3e564b(0xbc),_0x506305[_0x506305[_0x3e564b(0xff)]=0x4]=_0x3e564b(0xff),_0x506305[_0x506305[_0x3e564b(0xf1)]=0x5]=_0x3e564b(0xf1),_0x506305[_0x506305[_0x3e564b(0xe0)]=-0x1]='UNRECOGNIZED',_0x506305))(_0x3503fc||{});const _0x658574=_0x3819c9=>_0x4175d3[_0x3e564b(0x109)](new Date(+_0x3819c9))['format']('YYYY/MM/DD\x20HH:mm'),_0x3ecf13=async(_0x4f5c70,_0x3b711f)=>{const _0x2d7db1=_0x3e564b,_0x5c4c6e=_0x4f5c70[_0x2d7db1(0x10f)](_0x4175d3[_0x2d7db1(0x10a)]),_0x540302=_0x4f5c70['get'](_0x3c568e[_0x2d7db1(0xcd)]);_0x3b711f[_0x2d7db1(0xcc)](_0xfbe496=>{const _0x4347a0=_0x2d7db1;_0x5c4c6e[_0x4347a0(0x119)](_0xfbe496)&&_0x3b711f[_0x4347a0(0xf0)](_0xfbe496);}),_0x3b711f[_0x2d7db1(0x11e)]&&(await _0x540302[_0x2d7db1(0x10f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3b711f]}}))[_0x2d7db1(0xd2)]['users'][_0x2d7db1(0xcc)](_0x35314e=>{const _0x1dc96a=_0x2d7db1;_0x35314e&&_0x5c4c6e[_0x1dc96a(0xfb)](_0x35314e);});};var _0x47a7c6=Object[_0x3e564b(0xc8)],_0x2cd025=(_0x90ba7d,_0x564a02,_0x5d5e0c,_0x2eb20e)=>{const _0x28d1a6=_0x3e564b;for(var _0x35cd4c=_0x2eb20e>0x1?void 0x0:_0x2eb20e?_0x47a7c6(_0x564a02,_0x5d5e0c):_0x564a02,_0x362b74=_0x90ba7d[_0x28d1a6(0xc7)]-0x1,_0x5ca26b;_0x362b74>=0x0;_0x362b74--)(_0x5ca26b=_0x90ba7d[_0x362b74])&&(_0x35cd4c=_0x5ca26b(_0x35cd4c)||_0x35cd4c);return _0x35cd4c;},_0x52f777=(_0x3a51d2,_0x5527f1)=>(_0x1537b4,_0x105b2c)=>_0x5527f1(_0x1537b4,_0x105b2c,_0x3a51d2);let _0x96850c=class extends _0x4175d3[_0x3e564b(0x124)]{constructor(_0x20d0f9,_0x287d0b,_0x32c68d,_0x36ff36){const _0x2e2b96=_0x3e564b;super(),this[_0x2e2b96(0xf9)]=_0x20d0f9,this['_threadCommentModel']=_0x287d0b,this[_0x2e2b96(0xdc)]=_0x32c68d,this[_0x2e2b96(0xdd)]=_0x36ff36,this['_init'](),this[_0x2e2b96(0x108)]();}['_initUserSync'](){const _0x36c5c6=_0x3e564b;this['disposeWithMe'](this['_threadCommentModel'][_0x36c5c6(0xf3)][_0x36c5c6(0xab)](_0x399f04[_0x36c5c6(0x101)](0x10))[_0x36c5c6(0x11a)](_0x2c3fcc=>{const _0x595183=_0x36c5c6,_0x5d52f2=new Set();_0x2c3fcc[_0x595183(0xcc)](_0x268d27=>{const _0x3fd078=_0x595183;switch(_0x268d27[_0x3fd078(0x115)]){case _0x3fd078(0xa5):{const _0x556f0a=_0x268d27[_0x3fd078(0xaf)][_0x3fd078(0xfa)];_0x5d52f2[_0x3fd078(0xa5)](_0x556f0a);break;}}}),_0x3ecf13(this[_0x595183(0xdd)],_0x5d52f2);}));}[_0x3e564b(0xec)](){const _0x29fdf2=_0x3e564b;this[_0x29fdf2(0x10c)](this[_0x29fdf2(0xf9)]['commentUpdate$'][_0x29fdf2(0x11a)](async _0x5a13c6=>{const _0x5c4bb2=_0x29fdf2;var _0x5b570e,_0x4a6f68,_0x3e6bf4,_0x25353c;const _0x131a71=(_0x5b570e=this[_0x5c4bb2(0xae)]['getUnit'](_0x5a13c6[_0x5c4bb2(0xa6)])[_0x5c4bb2(0xb7)](_0x85e900=>_0x85e900[_0x5c4bb2(0xf8)]===_0x5a13c6[_0x5c4bb2(0xf8)]))==null?void 0x0:_0x5b570e[_0x5c4bb2(0xad)];if(!_0x131a71)return;const {unitId:_0x9f94a6,subUnitId:_0x21bc47}=_0x131a71;switch(_0x5a13c6[_0x5c4bb2(0xf6)]&&this['_userService']['addUser'](_0x5a13c6[_0x5c4bb2(0xf6)]),_0x5a13c6[_0x5c4bb2(0x115)]){case _0x3503fc[_0x5c4bb2(0xc9)]:break;case _0x3503fc[_0x5c4bb2(0xd4)]:{this[_0x5c4bb2(0xae)][_0x5c4bb2(0x104)](_0x9f94a6,_0x21bc47,{'unitId':_0x9f94a6,'subUnitId':_0x21bc47,'ref':'','id':_0x5a13c6[_0x5c4bb2(0xce)],'dT':_0x658574(+_0x5a13c6[_0x5c4bb2(0xd9)]),'threadId':_0x5a13c6[_0x5c4bb2(0xf8)],'personId':(_0x3e6bf4=(_0x4a6f68=_0x5a13c6['user'])==null?void 0x0:_0x4a6f68[_0x5c4bb2(0x10b)])!=null?_0x3e6bf4:_0x5a13c6[_0x5c4bb2(0x11c)],'text':JSON[_0x5c4bb2(0xc5)](_0x5a13c6[_0x5c4bb2(0x118)]),'parentId':_0x131a71['id']});break;}case _0x3503fc[_0x5c4bb2(0xff)]:{const _0x259ad8=this[_0x5c4bb2(0xae)]['getComment'](_0x9f94a6,_0x21bc47,_0x5a13c6['replyId']);_0x259ad8&&_0x259ad8[_0x5c4bb2(0x11b)]&&this[_0x5c4bb2(0xae)]['deleteComment'](_0x9f94a6,_0x21bc47,_0x5a13c6[_0x5c4bb2(0xce)]);break;}case _0x3503fc['Edit']:{this[_0x5c4bb2(0xae)][_0x5c4bb2(0xd6)](_0x9f94a6,_0x21bc47,{'commentId':_0x5a13c6[_0x5c4bb2(0xce)],'text':JSON['parse'](_0x5a13c6[_0x5c4bb2(0x118)])});break;}case _0x3503fc['Solve']:{const _0x34e606=(_0x25353c=this[_0x5c4bb2(0xae)][_0x5c4bb2(0xb1)](_0x5a13c6[_0x5c4bb2(0xa6)])[_0x5c4bb2(0xb7)](_0x2afe88=>_0x2afe88[_0x5c4bb2(0xf8)]===_0x5a13c6[_0x5c4bb2(0xf8)]))==null?void 0x0:_0x25353c[_0x5c4bb2(0xad)];_0x34e606&&this[_0x5c4bb2(0xae)][_0x5c4bb2(0xcb)](_0x9f94a6,_0x21bc47,_0x34e606['id'],_0x5a13c6[_0x5c4bb2(0xfe)]===_0x58b7cb[_0x5c4bb2(0xf5)]);break;}}}));}};_0x96850c=_0x2cd025([_0x52f777(0x0,_0x4175d3[_0x3e564b(0xca)](_0x464d37[_0x3e564b(0xe8)])),_0x52f777(0x1,_0x4175d3[_0x3e564b(0xca)](_0x391618[_0x3e564b(0xea)])),_0x52f777(0x2,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x10a)])),_0x52f777(0x3,_0x4175d3['Inject'](_0x4175d3[_0x3e564b(0x113)]))],_0x96850c);const _0x7b069a='thread-comment-data-source.config',_0x4dbde8={};var _0x467f3a=Object[_0x3e564b(0xc8)],_0x287e6a=(_0xcf2adb,_0x3ee68e,_0x41a483,_0x5d5741)=>{for(var _0x30e891=_0x5d5741>0x1?void 0x0:_0x5d5741?_0x467f3a(_0x3ee68e,_0x41a483):_0x3ee68e,_0x52e78e=_0xcf2adb['length']-0x1,_0x3824a7;_0x52e78e>=0x0;_0x52e78e--)(_0x3824a7=_0xcf2adb[_0x52e78e])&&(_0x30e891=_0x3824a7(_0x30e891)||_0x30e891);return _0x30e891;},_0x46a99e=(_0x222e6d,_0x5a5a22)=>(_0x32f9ae,_0x2e5302)=>_0x5a5a22(_0x32f9ae,_0x2e5302,_0x222e6d);function _0x1fe52e(_0x302cd0,_0x4c4c81){const _0x7e5952=_0x3e564b,_0x3ba1de=_0x302cd0['replies'][0x0];return{..._0x4c4c81,'id':_0x3ba1de['replyId'],'resolved':_0x302cd0[_0x7e5952(0xfe)]===0x1,'dT':_0x658574(_0x3ba1de[_0x7e5952(0xd9)]),'personId':_0x3ba1de['userId'],'threadId':_0x3ba1de[_0x7e5952(0xf8)]};}function _0x22ae1d(_0x2a93d1,_0x2129dd,_0x35f1ce){const _0x17a96a=_0x3e564b;var _0x9be277,_0xc8a0fc;if(((_0xc8a0fc=(_0x9be277=_0x2a93d1==null?void 0x0:_0x2a93d1['replies'])==null?void 0x0:_0x9be277[_0x17a96a(0xc7)])!=null?_0xc8a0fc:0x0)>0x0){const _0x3ff6e4=(_0xe02805,_0x40a35c)=>({'id':_0xe02805['replyId'],'threadId':_0xe02805[_0x17a96a(0xf8)],'dT':_0x658574(_0xe02805[_0x17a96a(0xd9)]),'personId':_0xe02805[_0x17a96a(0x11c)],'resolved':_0x2a93d1[_0x17a96a(0xfe)]===_0x58b7cb[_0x17a96a(0xf5)],'unitId':_0x2129dd,'subUnitId':_0x35f1ce,'text':JSON['parse'](_0xe02805[_0x17a96a(0x118)]),'parentId':_0x40a35c}),_0xd27222=_0x3ff6e4(_0x2a93d1[_0x17a96a(0x10d)][0x0]);return{..._0xd27222,'children':_0x2a93d1[_0x17a96a(0x10d)][_0x17a96a(0x106)](0x1)[_0x17a96a(0xb8)](_0x2db525=>_0x3ff6e4(_0x2db525,_0xd27222['id']))};}return null;}let _0x369bbe=class{constructor(_0x46a5b0,_0x42e198,_0x2c2bab,_0x411807){const _0x3080ff=_0x3e564b;this[_0x3080ff(0xde)]=_0x46a5b0,this[_0x3080ff(0xdc)]=_0x42e198,this[_0x3080ff(0x100)]=_0x2c2bab,this[_0x3080ff(0xdd)]=_0x411807;}async[_0x3e564b(0x104)](_0x51c8fe){const _0x3e00c5=_0x3e564b;var _0x227dd3,_0x38417a;const {parentId:_0x249894,unitId:_0xe80e5a,text:_0x3dfb2b,threadId:_0x42adc3}=_0x51c8fe,_0x1904a4=(_0x38417a=(_0x227dd3=_0x3dfb2b['customRanges'])==null?void 0x0:_0x227dd3[_0x3e00c5(0x111)](_0x1f54d0=>_0x1f54d0[_0x3e00c5(0xd1)]===_0x4175d3[_0x3e00c5(0x102)][_0x3e00c5(0x125)])[_0x3e00c5(0xb8)](_0x58aa17=>_0x58aa17[_0x3e00c5(0xfc)]))!=null?_0x38417a:[],_0x12bb57=JSON[_0x3e00c5(0x11d)](_0x3dfb2b),_0x233b85=(await this[_0x3e00c5(0x100)]['requireSession'](_0xe80e5a))[_0x3e00c5(0xe6)]();if(_0x249894){const _0x35f514={'memberId':_0x233b85,'unitId':_0xe80e5a,'content':_0x12bb57,'mention':_0x1904a4,'threadId':_0x42adc3},_0x36eb4b=(await this['_httpService'][_0x3e00c5(0xf4)]('/universer-api/comment/unit/'+_0xe80e5a+'/reply',{'body':_0x35f514}))['body']['reply'];return{..._0x51c8fe,'id':_0x36eb4b[_0x3e00c5(0xce)],'dT':_0x4175d3[_0x3e00c5(0x109)](+_0x36eb4b[_0x3e00c5(0xd9)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x36eb4b['userId']};}else{const _0x1d0074={'memberId':_0x233b85,'unitId':_0xe80e5a,'content':_0x12bb57,'mention':_0x1904a4},_0x4bc478=await this[_0x3e00c5(0xde)]['post'](_0x3e00c5(0xeb)+_0xe80e5a+_0x3e00c5(0xac),{'body':_0x1d0074});return _0x1fe52e(_0x4bc478['body']['comment'],_0x51c8fe);}}async[_0x3e564b(0xd6)](_0x244ca8){const _0x32d504=_0x3e564b;var _0x3aef65,_0x309d8b;const {text:_0x24f84e,unitId:_0x122036}=_0x244ca8,_0x136274=(_0x309d8b=(_0x3aef65=_0x24f84e['customRanges'])==null?void 0x0:_0x3aef65[_0x32d504(0x111)](_0x176e2b=>_0x176e2b[_0x32d504(0xd1)]===_0x4175d3[_0x32d504(0x102)]['COMMENT'])['map'](_0x20881b=>_0x20881b[_0x32d504(0xfc)]))!=null?_0x309d8b:[],_0x436414=JSON[_0x32d504(0x11d)](_0x24f84e),_0x821e43=_0x244ca8[_0x32d504(0xf8)],_0x171a8a=_0x244ca8['id'],_0x40fe34={'memberId':(await this['_sessionService'][_0x32d504(0x117)](_0x122036))[_0x32d504(0xe6)](),'unitId':_0x122036,'threadId':_0x821e43,'mention':_0x136274,'content':_0x436414,'replyId':_0x171a8a},_0x1f8d4f=await this[_0x32d504(0xde)][_0x32d504(0xf4)](_0x32d504(0xeb)+_0x122036+_0x32d504(0xe1),{'body':_0x40fe34});return!_0x1f8d4f[_0x32d504(0xd2)]['error']||_0x1f8d4f[_0x32d504(0xd2)][_0x32d504(0xc6)][_0x32d504(0xb5)]===0x1;}async[_0x3e564b(0xcb)](_0x5dfd00){const _0x3d360f=_0x3e564b,{unitId:_0x2ca0b6}=_0x5dfd00,_0x1a2cc4=_0x5dfd00[_0x3d360f(0xf8)],_0x4f80f1={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x2ca0b6,'threadId':_0x1a2cc4,'solved':_0x5dfd00['resolved']?_0x58b7cb[_0x3d360f(0xf5)]:_0x58b7cb[_0x3d360f(0xe7)]},_0x915efb=await this[_0x3d360f(0xde)][_0x3d360f(0xf4)](_0x3d360f(0xeb)+_0x2ca0b6+_0x3d360f(0xb0),{'body':_0x4f80f1});return!_0x915efb[_0x3d360f(0xd2)][_0x3d360f(0xc6)]||_0x915efb[_0x3d360f(0xd2)]['error'][_0x3d360f(0xb5)]===0x1;}async[_0x3e564b(0xd3)](_0x42d30a,_0x2d39af,_0x2b96ec,_0x4fdefd){const _0x86e240=_0x3e564b,_0x41cb9b={'memberId':(await this[_0x86e240(0x100)]['requireSession'](_0x42d30a))['getMemberID'](),'threadId':_0x2b96ec,'replyId':_0x4fdefd,'unitId':_0x42d30a},_0x29a43c=await this['_httpService'][_0x86e240(0xf4)](_0x86e240(0xeb)+_0x42d30a+_0x86e240(0xee),{'body':_0x41cb9b});return!_0x29a43c[_0x86e240(0xd2)][_0x86e240(0xc6)]||_0x29a43c[_0x86e240(0xd2)][_0x86e240(0xc6)][_0x86e240(0xb5)]===0x1;}async[_0x3e564b(0xed)](_0x395c90,_0x1d13a1,_0x70230e){const _0x1366cd=_0x3e564b,_0x13e976={'unitId':_0x395c90,'threadId':_0x70230e},_0x18e67c=await this['_httpService'][_0x1366cd(0xf4)]('/universer-api/comment/unit/'+_0x395c90+_0x1366cd(0xc0),{'body':_0x13e976}),_0x32f4da=_0x70230e[_0x1366cd(0xb8)](_0x595a0d=>_0x22ae1d(_0x18e67c[_0x1366cd(0xd2)]['comments'][_0x595a0d],_0x395c90,_0x1d13a1))['filter'](Boolean);return Object[_0x1366cd(0xc3)](_0x18e67c['body']['users'])[_0x1366cd(0xcc)](_0x682e37=>{const _0x1fb726=_0x1366cd;this['_userService'][_0x1fb726(0xfb)](_0x682e37);}),_0x32f4da;}[_0x3e564b(0xc4)](_0x47ae3c){const _0x1cb56e=_0x3e564b;return{'id':_0x47ae3c['id'],'threadId':_0x47ae3c['threadId'],'ref':_0x47ae3c[_0x1cb56e(0x114)]};}};_0x369bbe=_0x287e6a([_0x46a99e(0x0,_0x4175d3[_0x3e564b(0xca)](_0x3c568e[_0x3e564b(0xcd)])),_0x46a99e(0x1,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x10a)])),_0x46a99e(0x2,_0x4175d3[_0x3e564b(0xca)](_0x464d37['CollaborationSessionService'])),_0x46a99e(0x3,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x113)]))],_0x369bbe);var _0x2bc4de=Object[_0x3e564b(0xc8)],_0x371cfc=(_0x5a0b52,_0x26efad,_0x46baf9,_0x2e57e0)=>{const _0x156372=_0x3e564b;for(var _0x1e2c62=_0x2e57e0>0x1?void 0x0:_0x2e57e0?_0x2bc4de(_0x26efad,_0x46baf9):_0x26efad,_0x4708e9=_0x5a0b52[_0x156372(0xc7)]-0x1,_0x511da0;_0x4708e9>=0x0;_0x4708e9--)(_0x511da0=_0x5a0b52[_0x4708e9])&&(_0x1e2c62=_0x511da0(_0x1e2c62)||_0x1e2c62);return _0x1e2c62;},_0x95ec7b=(_0x240974,_0x366164)=>(_0x1a7414,_0x1c7fd7)=>_0x366164(_0x1a7414,_0x1c7fd7,_0x240974);let _0x360983=class extends _0x4175d3[_0x3e564b(0x124)]{constructor(_0x3d6a10,_0x1ff145){const _0x3f06eb=_0x3e564b;super(),this[_0x3f06eb(0xe9)]=_0x3d6a10,this[_0x3f06eb(0xbb)]=_0x1ff145,this[_0x3f06eb(0xa7)]();}[_0x3e564b(0xa7)](){const _0x16958f=_0x3e564b;this[_0x16958f(0xe9)]['dataSource']=this[_0x16958f(0xbb)],this[_0x16958f(0xe9)][_0x16958f(0x105)]=!0x1;}};_0x360983=_0x371cfc([_0x95ec7b(0x0,_0x391618['IThreadCommentDataSourceService']),_0x95ec7b(0x1,_0x4175d3[_0x3e564b(0xca)](_0x369bbe))],_0x360983);var _0x2a9408=Object[_0x3e564b(0x107)],_0x1361a4=Object[_0x3e564b(0xc8)],_0x4fb667=(_0x2d3bd2,_0x984f08,_0x2eceb6)=>_0x984f08 in _0x2d3bd2?_0x2a9408(_0x2d3bd2,_0x984f08,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2eceb6}):_0x2d3bd2[_0x984f08]=_0x2eceb6,_0x5055dc=(_0x1aa075,_0x1ee6c1,_0x3b7c90,_0x616a0b)=>{const _0x43b492=_0x3e564b;for(var _0x5a47cc=_0x616a0b>0x1?void 0x0:_0x616a0b?_0x1361a4(_0x1ee6c1,_0x3b7c90):_0x1ee6c1,_0x12ba76=_0x1aa075[_0x43b492(0xc7)]-0x1,_0x25bf1a;_0x12ba76>=0x0;_0x12ba76--)(_0x25bf1a=_0x1aa075[_0x12ba76])&&(_0x5a47cc=_0x25bf1a(_0x5a47cc)||_0x5a47cc);return _0x5a47cc;},_0x1f8e79=(_0x310d99,_0x59d82a)=>(_0x2c9bdc,_0x3cb947)=>_0x59d82a(_0x2c9bdc,_0x3cb947,_0x310d99),_0x593af9=(_0x578f18,_0x45fa19,_0x58abc8)=>_0x4fb667(_0x578f18,typeof _0x45fa19!='symbol'?_0x45fa19+'':_0x45fa19,_0x58abc8);_0x3f28f9[_0x3e564b(0xaa)]=class extends _0x4175d3[_0x3e564b(0xa4)]{constructor(_0x25447d=_0x4dbde8,_0x5d657a,_0x90cca0){const _0x778fd=_0x3e564b;super(),this[_0x778fd(0xbe)]=_0x25447d,this[_0x778fd(0xdd)]=_0x5d657a,this[_0x778fd(0xef)]=_0x90cca0;const {..._0x47ef4e}=_0x4175d3[_0x778fd(0xe2)]({},_0x4dbde8,this[_0x778fd(0xbe)]);this[_0x778fd(0xef)][_0x778fd(0xb2)](_0x7b069a,_0x47ef4e);}[_0x3e564b(0x123)](){const _0x5b5ef7=_0x3e564b;[[_0x369bbe],[_0x360983],[_0x96850c]][_0x5b5ef7(0xcc)](_0x456643=>{const _0x262ea1=_0x5b5ef7;this['_injector'][_0x262ea1(0xa5)](_0x456643);});}['onReady'](){const _0x4b108c=_0x3e564b;this[_0x4b108c(0xdd)][_0x4b108c(0x10f)](_0x360983),this[_0x4b108c(0xdd)][_0x4b108c(0x10f)](_0x96850c);}},_0x593af9(_0x3f28f9[_0x3e564b(0xaa)],_0x3e564b(0xb3),_0x3eb321),_0x593af9(_0x3f28f9['UniverThreadCommentDataSourcePlugin'],_0x3e564b(0x115),_0x4175d3[_0x3e564b(0xb6)]['UNIVER_UNKNOWN']),_0x3f28f9[_0x3e564b(0xaa)]=_0x5055dc([_0x4175d3['DependentOn'](_0x14644c['UniverThreadCommentUIPlugin'],_0x464d37[_0x3e564b(0xfd)],_0x3841b4[_0x3e564b(0xdf)]),_0x1f8e79(0x1,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x113)])),_0x1f8e79(0x2,_0x4175d3[_0x3e564b(0xf2)])],_0x3f28f9[_0x3e564b(0xaa)]),Object[_0x3e564b(0x107)](_0x3f28f9,Symbol[_0x3e564b(0x112)],{'value':'Module'});}));function _0x210c(){const _0x267a4a=['userId','stringify','size','1091MCqtuA','Unknown','UniverNetwork','@univerjs-pro/collaboration-client','onStarting','Disposable','COMMENT','Plugin','add','unitId','_initDataSource','UniverProLicense','@univerjs/core','UniverThreadCommentDataSourcePlugin','pipe','/add','root','_threadCommentModel','payload','/solved','getUnit','setConfig','pluginName','70664OmCdrq','code','UniverInstanceType','find','map','UniverThreadComment','@univerjs/thread-comment-ui','_threadCommentDataSource','Edit','7YUqZoz','_config','object','/list','UniverProThreadCommentDatasource','185buNbAc','values','saveCommentToSnapshot','parse','error','length','getOwnPropertyDescriptor','Add','Inject','resolveComment','forEach','HTTPService','replyId','2592711cDDvxi','31368VamJlx','rangeType','body','deleteComment','Reply','rxjs','updateComment','@univerjs/network','1074UZXkCH','createTimestamp','exports','UniverProCollaborationClient','_userService','_injector','_httpService','UniverLicensePlugin','UNRECOGNIZED','/edit','merge','162VtWLJt','@univerjs-pro/license','4738914HFaisk','getMemberID','OpenOrReOpen','CommentService','_threadCommentDataSourceService','ThreadCommentModel','/universer-api/comment/unit/','_init','listComments','/delete','_configService','delete','Solve','IConfigService','commentUpdate$','post','Solved','user','243670fLqxUZ','threadId','_commentService','personId','addUser','rangeId','UniverCollaborationClientPlugin','solved','Delete','_sessionService','bufferTime','CustomRangeType','279323UhsFrU','addComment','syncUpdateMutationToColla','slice','defineProperty','_initUserSync','dayjs','UserManagerService','userID','disposeWithMe','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','UniverThreadCommentUi','filter','toStringTag','Injector','ref','type','amd','requireSession','content','getUser','subscribe','parentId'];_0x210c=function(){return _0x267a4a;};return _0x210c();}
1
+ (function(_0x39cc1a,_0x45617c){const _0x5c8131=_0x462d,_0x4b4f3f=_0x39cc1a();while(!![]){try{const _0x5c6f71=parseInt(_0x5c8131(0x165))/0x1*(-parseInt(_0x5c8131(0x173))/0x2)+parseInt(_0x5c8131(0x196))/0x3+-parseInt(_0x5c8131(0x1e5))/0x4*(parseInt(_0x5c8131(0x1a3))/0x5)+parseInt(_0x5c8131(0x1da))/0x6+parseInt(_0x5c8131(0x17f))/0x7*(-parseInt(_0x5c8131(0x1d0))/0x8)+-parseInt(_0x5c8131(0x1c5))/0x9+parseInt(_0x5c8131(0x198))/0xa;if(_0x5c6f71===_0x45617c)break;else _0x4b4f3f['push'](_0x4b4f3f['shift']());}catch(_0x5c3571){_0x4b4f3f['push'](_0x4b4f3f['shift']());}}}(_0x39f1,0x6043a),function(_0x5a1200,_0x105947){const _0x51106f=_0x462d;typeof exports=='object'&&typeof module<'u'?_0x105947(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==_0x51106f(0x1c3)&&define[_0x51106f(0x19e)]?define([_0x51106f(0x1ac),_0x51106f(0x188),'@univerjs-pro/license',_0x51106f(0x1cb),_0x51106f(0x1c4),_0x51106f(0x1bd),_0x51106f(0x16e),_0x51106f(0x1b8)],_0x105947):(_0x5a1200=typeof globalThis<'u'?globalThis:_0x5a1200||self,_0x105947(_0x5a1200[_0x51106f(0x18e)]={},_0x5a1200[_0x51106f(0x1b5)],_0x5a1200['UniverProLicense'],_0x5a1200[_0x51106f(0x19d)],_0x5a1200[_0x51106f(0x1e2)],_0x5a1200[_0x51106f(0x17b)],_0x5a1200['rxjs'],_0x5a1200[_0x51106f(0x192)]));}(this,function(_0x9ebc8f,_0x4fd8e6,_0xab9414,_0x5be78c,_0x5edfa9,_0x571e47,_0x555bb1,_0x266f01){'use strict';const _0x41b6fe=_0x462d;const _0xf917b9='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x43500a=(_0x341cbc=>(_0x341cbc[_0x341cbc[_0x41b6fe(0x183)]=0x0]='OpenOrReOpen',_0x341cbc[_0x341cbc[_0x41b6fe(0x1ec)]=0x1]=_0x41b6fe(0x1ec),_0x341cbc[_0x341cbc[_0x41b6fe(0x1d4)]=-0x1]=_0x41b6fe(0x1d4),_0x341cbc))(_0x43500a||{}),_0x71578d=(_0x506646=>(_0x506646[_0x506646[_0x41b6fe(0x1a8)]=0x0]='Unknown',_0x506646[_0x506646[_0x41b6fe(0x1d9)]=0x1]=_0x41b6fe(0x1d9),_0x506646[_0x506646[_0x41b6fe(0x187)]=0x2]='Reply',_0x506646[_0x506646[_0x41b6fe(0x1e6)]=0x3]='Edit',_0x506646[_0x506646['Delete']=0x4]='Delete',_0x506646[_0x506646['Solve']=0x5]=_0x41b6fe(0x1d8),_0x506646[_0x506646[_0x41b6fe(0x1d4)]=-0x1]='UNRECOGNIZED',_0x506646))(_0x71578d||{});const _0x225ec6=_0x55d7ff=>_0x5be78c['dayjs'](new Date(+_0x55d7ff))[_0x41b6fe(0x16a)](_0x41b6fe(0x194)),_0x48a595=async(_0x1d2451,_0x3e6838)=>{const _0x5eafc9=_0x41b6fe,_0x370d50=_0x1d2451[_0x5eafc9(0x1b1)](_0x5be78c[_0x5eafc9(0x17d)]),_0x4bab78=_0x1d2451[_0x5eafc9(0x1b1)](_0x266f01[_0x5eafc9(0x1a1)]);_0x3e6838[_0x5eafc9(0x1c7)](_0x81645a=>{const _0x41e0e8=_0x5eafc9;_0x370d50[_0x41e0e8(0x1cf)](_0x81645a)&&_0x3e6838[_0x41e0e8(0x176)](_0x81645a);}),_0x3e6838[_0x5eafc9(0x19b)]&&(await _0x4bab78[_0x5eafc9(0x1b1)](_0x5eafc9(0x1e4),{'params':{'userIDs':[..._0x3e6838]}}))[_0x5eafc9(0x1b3)]['users'][_0x5eafc9(0x1c7)](_0x48907e=>{const _0x33545c=_0x5eafc9;_0x48907e&&_0x370d50[_0x33545c(0x1d2)](_0x48907e);});};var _0x50a793=Object[_0x41b6fe(0x193)],_0x5e342e=(_0x313618,_0x5c1f43,_0x1d38e3,_0x8ae266)=>{const _0x5cf8dc=_0x41b6fe;for(var _0x340ef2=_0x8ae266>0x1?void 0x0:_0x8ae266?_0x50a793(_0x5c1f43,_0x1d38e3):_0x5c1f43,_0x4714b3=_0x313618[_0x5cf8dc(0x1a0)]-0x1,_0x5e4677;_0x4714b3>=0x0;_0x4714b3--)(_0x5e4677=_0x313618[_0x4714b3])&&(_0x340ef2=_0x5e4677(_0x340ef2)||_0x340ef2);return _0x340ef2;},_0x436241=(_0x3cb9d3,_0xd50054)=>(_0x360105,_0x5defc7)=>_0xd50054(_0x360105,_0x5defc7,_0x3cb9d3);let _0x4b488f=class extends _0x5be78c['Disposable']{constructor(_0x4e442d,_0x4b0c5f,_0x464b54,_0x380f47){const _0x16627f=_0x41b6fe;super(),this[_0x16627f(0x1b0)]=_0x4e442d,this[_0x16627f(0x1db)]=_0x4b0c5f,this[_0x16627f(0x1eb)]=_0x464b54,this[_0x16627f(0x1df)]=_0x380f47,this[_0x16627f(0x1ad)](),this[_0x16627f(0x175)]();}[_0x41b6fe(0x175)](){const _0x4fe006=_0x41b6fe;this[_0x4fe006(0x1a7)](this[_0x4fe006(0x1db)][_0x4fe006(0x1dc)]['pipe'](_0x555bb1[_0x4fe006(0x182)](0x10))['subscribe'](_0x393da0=>{const _0x883710=_0x4fe006,_0x57d579=new Set();_0x393da0[_0x883710(0x1c7)](_0x287115=>{const _0x2d528d=_0x883710;switch(_0x287115[_0x2d528d(0x1b4)]){case'add':{const _0x36fec3=_0x287115[_0x2d528d(0x195)][_0x2d528d(0x1ea)];_0x57d579[_0x2d528d(0x1d5)](_0x36fec3);break;}}}),_0x48a595(this['_injector'],_0x57d579);}));}[_0x41b6fe(0x1ad)](){const _0x3e7747=_0x41b6fe;this[_0x3e7747(0x1a7)](this[_0x3e7747(0x1b0)][_0x3e7747(0x1dc)]['subscribe'](async _0x1feac6=>{const _0x6cc4c=_0x3e7747;var _0x2ac56a,_0x588d49,_0x5cb461,_0x58be09;const _0xed0d54=(_0x2ac56a=this[_0x6cc4c(0x1db)][_0x6cc4c(0x184)](_0x1feac6[_0x6cc4c(0x1a2)])[_0x6cc4c(0x1e7)](_0x41db1e=>_0x41db1e[_0x6cc4c(0x18a)]===_0x1feac6[_0x6cc4c(0x18a)]))==null?void 0x0:_0x2ac56a[_0x6cc4c(0x16b)];if(!_0xed0d54)return;const {unitId:_0x3fdd82,subUnitId:_0x5883ab}=_0xed0d54;switch(_0x1feac6[_0x6cc4c(0x17a)]&&this[_0x6cc4c(0x1eb)][_0x6cc4c(0x1d2)](_0x1feac6['user']),_0x1feac6['type']){case _0x71578d['Add']:break;case _0x71578d[_0x6cc4c(0x187)]:{this[_0x6cc4c(0x1db)][_0x6cc4c(0x166)](_0x3fdd82,_0x5883ab,{'unitId':_0x3fdd82,'subUnitId':_0x5883ab,'ref':'','id':_0x1feac6['replyId'],'dT':_0x225ec6(+_0x1feac6[_0x6cc4c(0x18b)]),'threadId':_0x1feac6['threadId'],'personId':(_0x5cb461=(_0x588d49=_0x1feac6[_0x6cc4c(0x17a)])==null?void 0x0:_0x588d49[_0x6cc4c(0x197)])!=null?_0x5cb461:_0x1feac6[_0x6cc4c(0x1c8)],'text':JSON[_0x6cc4c(0x16c)](_0x1feac6[_0x6cc4c(0x171)]),'parentId':_0xed0d54['id']});break;}case _0x71578d[_0x6cc4c(0x177)]:{const _0x4dd7e4=this['_threadCommentModel'][_0x6cc4c(0x1b9)](_0x3fdd82,_0x5883ab,_0x1feac6[_0x6cc4c(0x1cd)]);_0x4dd7e4&&_0x4dd7e4[_0x6cc4c(0x189)]&&this[_0x6cc4c(0x1db)]['deleteComment'](_0x3fdd82,_0x5883ab,_0x1feac6[_0x6cc4c(0x1cd)]);break;}case _0x71578d['Edit']:{this[_0x6cc4c(0x1db)][_0x6cc4c(0x17c)](_0x3fdd82,_0x5883ab,{'commentId':_0x1feac6[_0x6cc4c(0x1cd)],'text':JSON[_0x6cc4c(0x16c)](_0x1feac6[_0x6cc4c(0x171)])});break;}case _0x71578d[_0x6cc4c(0x1d8)]:{const _0x42fd89=(_0x58be09=this[_0x6cc4c(0x1db)]['getUnit'](_0x1feac6['unitId'])['find'](_0xd31639=>_0xd31639[_0x6cc4c(0x18a)]===_0x1feac6[_0x6cc4c(0x18a)]))==null?void 0x0:_0x58be09[_0x6cc4c(0x16b)];_0x42fd89&&this['_threadCommentModel'][_0x6cc4c(0x16d)](_0x3fdd82,_0x5883ab,_0x42fd89['id'],_0x1feac6[_0x6cc4c(0x1e1)]===_0x43500a[_0x6cc4c(0x1ec)]);break;}}}));}};_0x4b488f=_0x5e342e([_0x436241(0x0,_0x5be78c[_0x41b6fe(0x170)](_0x4fd8e6['CommentService'])),_0x436241(0x1,_0x5be78c['Inject'](_0x571e47[_0x41b6fe(0x1d1)])),_0x436241(0x2,_0x5be78c[_0x41b6fe(0x170)](_0x5be78c[_0x41b6fe(0x17d)])),_0x436241(0x3,_0x5be78c[_0x41b6fe(0x170)](_0x5be78c[_0x41b6fe(0x169)]))],_0x4b488f);const _0x4e0bc2='thread-comment-data-source.config',_0xdef13d={};var _0x24732e=Object[_0x41b6fe(0x193)],_0x44a202=(_0xb9cd7a,_0x491af4,_0x2caf8e,_0x4b212f)=>{const _0x3ea1ce=_0x41b6fe;for(var _0x197a31=_0x4b212f>0x1?void 0x0:_0x4b212f?_0x24732e(_0x491af4,_0x2caf8e):_0x491af4,_0x55a111=_0xb9cd7a[_0x3ea1ce(0x1a0)]-0x1,_0x30c9a3;_0x55a111>=0x0;_0x55a111--)(_0x30c9a3=_0xb9cd7a[_0x55a111])&&(_0x197a31=_0x30c9a3(_0x197a31)||_0x197a31);return _0x197a31;},_0x4612ba=(_0x418da1,_0x584b47)=>(_0x29615a,_0x204619)=>_0x584b47(_0x29615a,_0x204619,_0x418da1);function _0x4a7584(_0x3ec253,_0x3ed5ea){const _0x50180e=_0x41b6fe,_0x13d49f=_0x3ec253[_0x50180e(0x167)][0x0];return{..._0x3ed5ea,'id':_0x13d49f[_0x50180e(0x1cd)],'resolved':_0x3ec253['solved']===0x1,'dT':_0x225ec6(_0x13d49f[_0x50180e(0x18b)]),'personId':_0x13d49f[_0x50180e(0x1c8)],'threadId':_0x13d49f['threadId']};}function _0x4c6026(_0x5deef6,_0x4451f4,_0x568b51){const _0x2e7211=_0x41b6fe;var _0x3c89fe,_0x49aeef;if(((_0x49aeef=(_0x3c89fe=_0x5deef6==null?void 0x0:_0x5deef6[_0x2e7211(0x167)])==null?void 0x0:_0x3c89fe[_0x2e7211(0x1a0)])!=null?_0x49aeef:0x0)>0x0){const _0x3e7a41=(_0x1bf6d9,_0x5d9694)=>({'id':_0x1bf6d9['replyId'],'threadId':_0x1bf6d9[_0x2e7211(0x18a)],'dT':_0x225ec6(_0x1bf6d9[_0x2e7211(0x18b)]),'personId':_0x1bf6d9['userId'],'resolved':_0x5deef6['solved']===_0x43500a[_0x2e7211(0x1ec)],'unitId':_0x4451f4,'subUnitId':_0x568b51,'text':JSON[_0x2e7211(0x16c)](_0x1bf6d9[_0x2e7211(0x171)]),'parentId':_0x5d9694}),_0x4d8ff2=_0x3e7a41(_0x5deef6[_0x2e7211(0x167)][0x0]);return{..._0x4d8ff2,'children':_0x5deef6[_0x2e7211(0x167)][_0x2e7211(0x181)](0x1)[_0x2e7211(0x191)](_0x16b312=>_0x3e7a41(_0x16b312,_0x4d8ff2['id']))};}return null;}let _0x44ed28=class{constructor(_0x300bb5,_0x5813da,_0x5801c1){const _0xfaedc0=_0x41b6fe;this[_0xfaedc0(0x18c)]=_0x300bb5,this['_userService']=_0x5813da,this[_0xfaedc0(0x1d6)]=_0x5801c1;}async[_0x41b6fe(0x166)](_0xefa031){const _0xd93711=_0x41b6fe;var _0x163902,_0x5ba9f7;const {parentId:_0x178b9b,unitId:_0x51aebf,text:_0x4d7967,threadId:_0x2f817d}=_0xefa031,_0x299439=(_0x5ba9f7=(_0x163902=_0x4d7967[_0xd93711(0x1be)])==null?void 0x0:_0x163902[_0xd93711(0x19f)](_0x45fe3f=>_0x45fe3f[_0xd93711(0x1ca)]===_0x5be78c[_0xd93711(0x1de)][_0xd93711(0x1e9)])[_0xd93711(0x191)](_0x567828=>_0x567828[_0xd93711(0x178)]))!=null?_0x5ba9f7:[],_0x39ade9=JSON[_0xd93711(0x1ba)](_0x4d7967),_0xff666e=(await this['_sessionService'][_0xd93711(0x180)](_0x51aebf))[_0xd93711(0x1b6)]();if(_0x178b9b){const _0x116259={'memberId':_0xff666e,'unitId':_0x51aebf,'content':_0x39ade9,'mention':_0x299439,'threadId':_0x2f817d},_0x87291f=(await this[_0xd93711(0x18c)]['post'](_0xd93711(0x190)+_0x51aebf+_0xd93711(0x19a),{'body':_0x116259}))[_0xd93711(0x1b3)][_0xd93711(0x1ae)];return{..._0xefa031,'id':_0x87291f[_0xd93711(0x1cd)],'dT':_0x5be78c[_0xd93711(0x1e8)](+_0x87291f[_0xd93711(0x18b)])[_0xd93711(0x16a)](_0xd93711(0x194)),'personId':_0x87291f[_0xd93711(0x1c8)]};}else{const _0x5af5fa={'memberId':_0xff666e,'unitId':_0x51aebf,'content':_0x39ade9,'mention':_0x299439},_0xb485da=await this[_0xd93711(0x18c)]['post']('/universer-api/comment/unit/'+_0x51aebf+_0xd93711(0x1d7),{'body':_0x5af5fa});return _0x4a7584(_0xb485da[_0xd93711(0x1b3)][_0xd93711(0x1c9)],_0xefa031);}}async[_0x41b6fe(0x17c)](_0x4708db){const _0xbc8f44=_0x41b6fe;var _0x2478c1,_0x196910;const {text:_0x26064d,unitId:_0x36940d}=_0x4708db,_0x5d2f05=(_0x196910=(_0x2478c1=_0x26064d[_0xbc8f44(0x1be)])==null?void 0x0:_0x2478c1['filter'](_0x534966=>_0x534966[_0xbc8f44(0x1ca)]===_0x5be78c[_0xbc8f44(0x1de)][_0xbc8f44(0x1e9)])['map'](_0x4983ba=>_0x4983ba[_0xbc8f44(0x178)]))!=null?_0x196910:[],_0x5d64eb=JSON['stringify'](_0x26064d),_0x143052=_0x4708db[_0xbc8f44(0x18a)],_0x3b15f9=_0x4708db['id'],_0x9ea0da={'memberId':(await this[_0xbc8f44(0x1d6)]['requireSession'](_0x36940d))[_0xbc8f44(0x1b6)](),'unitId':_0x36940d,'threadId':_0x143052,'mention':_0x5d2f05,'content':_0x5d64eb,'replyId':_0x3b15f9},_0x5619f2=await this['_httpService'][_0xbc8f44(0x17e)](_0xbc8f44(0x190)+_0x36940d+_0xbc8f44(0x199),{'body':_0x9ea0da});return!_0x5619f2[_0xbc8f44(0x1b3)][_0xbc8f44(0x185)]||_0x5619f2[_0xbc8f44(0x1b3)][_0xbc8f44(0x185)][_0xbc8f44(0x1a9)]===0x1;}async[_0x41b6fe(0x16d)](_0x3abb84){const _0x5208b0=_0x41b6fe,{unitId:_0x191d8a}=_0x3abb84,_0x543f70=_0x3abb84['threadId'],_0x3f1fcd={'memberId':this[_0x5208b0(0x1eb)]['getCurrentUser']()[_0x5208b0(0x197)],'unitId':_0x191d8a,'threadId':_0x543f70,'solved':_0x3abb84[_0x5208b0(0x1ce)]?_0x43500a['Solved']:_0x43500a[_0x5208b0(0x183)]},_0x2674ba=await this[_0x5208b0(0x18c)][_0x5208b0(0x17e)]('/universer-api/comment/unit/'+_0x191d8a+_0x5208b0(0x186),{'body':_0x3f1fcd});return!_0x2674ba['body'][_0x5208b0(0x185)]||_0x2674ba['body'][_0x5208b0(0x185)]['code']===0x1;}async[_0x41b6fe(0x1a5)](_0x38546d,_0x5ba380,_0x17b163,_0xec12db){const _0x1178df=_0x41b6fe,_0x54fc96={'memberId':(await this[_0x1178df(0x1d6)][_0x1178df(0x180)](_0x38546d))[_0x1178df(0x1b6)](),'threadId':_0x17b163,'replyId':_0xec12db,'unitId':_0x38546d},_0x2fc559=await this[_0x1178df(0x18c)][_0x1178df(0x17e)](_0x1178df(0x190)+_0x38546d+_0x1178df(0x168),{'body':_0x54fc96});return!_0x2fc559[_0x1178df(0x1b3)]['error']||_0x2fc559[_0x1178df(0x1b3)][_0x1178df(0x185)][_0x1178df(0x1a9)]===0x1;}async['listComments'](_0x300352,_0x2bb518,_0x564c48){const _0xf5c193=_0x41b6fe,_0x516a11={'unitId':_0x300352,'threadId':_0x564c48},_0x2b506c=await this[_0xf5c193(0x18c)][_0xf5c193(0x17e)](_0xf5c193(0x190)+_0x300352+_0xf5c193(0x1b2),{'body':_0x516a11}),_0x12f94c=_0x564c48['map'](_0x43b469=>_0x4c6026(_0x2b506c[_0xf5c193(0x1b3)]['comments'][_0x43b469],_0x300352,_0x2bb518))[_0xf5c193(0x19f)](Boolean);return Object[_0xf5c193(0x1cc)](_0x2b506c[_0xf5c193(0x1b3)][_0xf5c193(0x1b7)])[_0xf5c193(0x1c7)](_0x19f253=>{const _0x4055a7=_0xf5c193;this[_0x4055a7(0x1eb)]['addUser'](_0x19f253);}),_0x12f94c;}[_0x41b6fe(0x1af)](_0x42679c){const _0x148556=_0x41b6fe;return{'id':_0x42679c['id'],'threadId':_0x42679c[_0x148556(0x18a)],'ref':_0x42679c['ref']};}};_0x44ed28=_0x44a202([_0x4612ba(0x0,_0x5be78c[_0x41b6fe(0x170)](_0x266f01['HTTPService'])),_0x4612ba(0x1,_0x5be78c[_0x41b6fe(0x170)](_0x5be78c[_0x41b6fe(0x17d)])),_0x4612ba(0x2,_0x5be78c['Inject'](_0x4fd8e6[_0x41b6fe(0x1ab)]))],_0x44ed28);var _0x52a247=Object['getOwnPropertyDescriptor'],_0xfe3176=(_0x4eaac4,_0x5efdd9,_0x1af157,_0x2e01e7)=>{const _0x5ed3df=_0x41b6fe;for(var _0x517d59=_0x2e01e7>0x1?void 0x0:_0x2e01e7?_0x52a247(_0x5efdd9,_0x1af157):_0x5efdd9,_0x58c101=_0x4eaac4[_0x5ed3df(0x1a0)]-0x1,_0x430452;_0x58c101>=0x0;_0x58c101--)(_0x430452=_0x4eaac4[_0x58c101])&&(_0x517d59=_0x430452(_0x517d59)||_0x517d59);return _0x517d59;},_0x56dc7d=(_0x5c1b49,_0x5fc2da)=>(_0x5955b4,_0x103e6a)=>_0x5fc2da(_0x5955b4,_0x103e6a,_0x5c1b49);let _0x246e4e=class extends _0x5be78c[_0x41b6fe(0x19c)]{constructor(_0xfe1792,_0x5d5187){const _0xcfb4fe=_0x41b6fe;super(),this[_0xcfb4fe(0x1bf)]=_0xfe1792,this[_0xcfb4fe(0x1a4)]=_0x5d5187,this[_0xcfb4fe(0x1aa)]();}['_initDataSource'](){const _0x3e4c50=_0x41b6fe;this[_0x3e4c50(0x1bf)]['dataSource']=this['_threadCommentDataSource'],this[_0x3e4c50(0x1bf)][_0x3e4c50(0x1e3)]=!0x1;}};_0x246e4e=_0xfe3176([_0x56dc7d(0x0,_0x571e47[_0x41b6fe(0x16f)]),_0x56dc7d(0x1,_0x5be78c[_0x41b6fe(0x170)](_0x44ed28))],_0x246e4e);var _0x58cfbf=Object[_0x41b6fe(0x1dd)],_0x13444f=Object[_0x41b6fe(0x193)],_0x49bdba=(_0xb7f334,_0x506a36,_0x21a4b4)=>_0x506a36 in _0xb7f334?_0x58cfbf(_0xb7f334,_0x506a36,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x21a4b4}):_0xb7f334[_0x506a36]=_0x21a4b4,_0x4c452d=(_0x3f42a2,_0x5229f3,_0x6ef864,_0x50cb9d)=>{const _0x177f64=_0x41b6fe;for(var _0x2abffa=_0x50cb9d>0x1?void 0x0:_0x50cb9d?_0x13444f(_0x5229f3,_0x6ef864):_0x5229f3,_0x36dff3=_0x3f42a2[_0x177f64(0x1a0)]-0x1,_0x1383c5;_0x36dff3>=0x0;_0x36dff3--)(_0x1383c5=_0x3f42a2[_0x36dff3])&&(_0x2abffa=_0x1383c5(_0x2abffa)||_0x2abffa);return _0x2abffa;},_0x4580d1=(_0x7a3fcb,_0x48e29b)=>(_0x43928a,_0x14070f)=>_0x48e29b(_0x43928a,_0x14070f,_0x7a3fcb),_0x3430a1=(_0x19197b,_0x4d4072,_0x499049)=>_0x49bdba(_0x19197b,typeof _0x4d4072!=_0x41b6fe(0x1c6)?_0x4d4072+'':_0x4d4072,_0x499049);_0x9ebc8f[_0x41b6fe(0x179)]=class extends _0x5be78c[_0x41b6fe(0x1c1)]{constructor(_0x5b946d=_0xdef13d,_0x3a612d,_0x3c3ee8){const _0xf7211c=_0x41b6fe;super(),this[_0xf7211c(0x1bb)]=_0x5b946d,this[_0xf7211c(0x1df)]=_0x3a612d,this[_0xf7211c(0x1c0)]=_0x3c3ee8;const {..._0xef50e2}=_0x5be78c[_0xf7211c(0x1e0)]({},_0xdef13d,this['_config']);this['_configService'][_0xf7211c(0x18f)](_0x4e0bc2,_0xef50e2);}[_0x41b6fe(0x1a6)](){[[_0x44ed28],[_0x246e4e],[_0x4b488f]]['forEach'](_0x7f0fe1=>{const _0x2085c8=_0x462d;this[_0x2085c8(0x1df)][_0x2085c8(0x1d5)](_0x7f0fe1);});}[_0x41b6fe(0x1bc)](){const _0x42adb1=_0x41b6fe;this[_0x42adb1(0x1df)][_0x42adb1(0x1b1)](_0x246e4e),this[_0x42adb1(0x1df)]['get'](_0x4b488f);}},_0x3430a1(_0x9ebc8f[_0x41b6fe(0x179)],'pluginName',_0xf917b9),_0x3430a1(_0x9ebc8f[_0x41b6fe(0x179)],_0x41b6fe(0x1b4),_0x5be78c[_0x41b6fe(0x1d3)]['UNIVER_UNKNOWN']),_0x9ebc8f['UniverThreadCommentDataSourcePlugin']=_0x4c452d([_0x5be78c[_0x41b6fe(0x1ed)](_0x5edfa9[_0x41b6fe(0x18d)],_0x4fd8e6['UniverCollaborationClientPlugin'],_0xab9414[_0x41b6fe(0x1c2)]),_0x4580d1(0x1,_0x5be78c['Inject'](_0x5be78c['Injector'])),_0x4580d1(0x2,_0x5be78c[_0x41b6fe(0x172)])],_0x9ebc8f[_0x41b6fe(0x179)]),Object[_0x41b6fe(0x1dd)](_0x9ebc8f,Symbol[_0x41b6fe(0x174)],{'value':'Module'});}));function _0x462d(_0x42352c,_0x27a22f){const _0x39f160=_0x39f1();return _0x462d=function(_0x462d1c,_0x2dae7b){_0x462d1c=_0x462d1c-0x165;let _0x197b95=_0x39f160[_0x462d1c];return _0x197b95;},_0x462d(_0x42352c,_0x27a22f);}function _0x39f1(){const _0x178986=['UniverThreadCommentUIPlugin','UniverProThreadCommentDatasource','setConfig','/universer-api/comment/unit/','map','UniverNetwork','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','payload','2129073hNjRKk','userID','7685040hojojq','/edit','/reply','size','Disposable','UniverCore','amd','filter','length','HTTPService','unitId','5VMkRFi','_threadCommentDataSource','deleteComment','onStarting','disposeWithMe','Unknown','code','_initDataSource','CollaborationSessionService','exports','_init','reply','saveCommentToSnapshot','_commentService','get','/list','body','type','UniverProCollaborationClient','getMemberID','users','@univerjs/network','getComment','stringify','_config','onReady','@univerjs/thread-comment','customRanges','_threadCommentDataSourceService','_configService','Plugin','UniverLicensePlugin','function','@univerjs/thread-comment-ui','2236122xHhELI','symbol','forEach','userId','comment','rangeType','@univerjs/core','values','replyId','resolved','getUser','1768072gSaDsi','ThreadCommentModel','addUser','UniverInstanceType','UNRECOGNIZED','add','_sessionService','/add','Solve','Add','2174286qwKRZk','_threadCommentModel','commentUpdate$','defineProperty','CustomRangeType','_injector','merge','solved','UniverThreadCommentUi','syncUpdateMutationToColla','/universer-api/user/list','1335988IEHKwB','Edit','find','dayjs','COMMENT','personId','_userService','Solved','DependentOn','58rfvCcM','addComment','replies','/delete','Injector','format','root','parse','resolveComment','rxjs','IThreadCommentDataSourceService','Inject','content','IConfigService','22166lUKgIl','toStringTag','_initUserSync','delete','Delete','rangeId','UniverThreadCommentDataSourcePlugin','user','UniverThreadComment','updateComment','UserManagerService','post','7tzzpCP','requireSession','slice','bufferTime','OpenOrReOpen','getUnit','error','/solved','Reply','@univerjs-pro/collaboration-client','parentId','threadId','createTimestamp','_httpService'];_0x39f1=function(){return _0x178986;};return _0x39f1();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.3",
3
+ "version": "0.9.4-nightly.202507290757",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.9.3",
49
- "@univerjs/core": "0.9.3",
50
- "@univerjs/network": "0.9.3",
51
- "@univerjs/thread-comment": "0.9.3",
48
+ "@univerjs-pro/license": "0.9.4-nightly.202507290757",
49
+ "@univerjs/network": "0.9.4-nightly.202507290757",
50
+ "@univerjs/core": "0.9.4-nightly.202507290757",
52
51
  "@univerjs/protocol": "0.1.47-alpha.0",
53
- "@univerjs/thread-comment-ui": "0.9.3",
54
- "@univerjs-pro/license": "0.9.3"
52
+ "@univerjs/thread-comment": "0.9.4-nightly.202507290757",
53
+ "@univerjs/thread-comment-ui": "0.9.4-nightly.202507290757",
54
+ "@univerjs-pro/collaboration-client": "0.9.4-nightly.202507290757"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
- "vite": "^7.0.5",
59
+ "vite": "^7.0.6",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.9.3"
61
+ "@univerjs-infra/shared": "0.9.4"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",