@univerjs-pro/thread-comment-datasource 0.14.0-insiders.20251222-4efcfbb → 0.14.0-insiders.20251227-b250a8d
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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +10 -10
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x403535=_0x5332;(function(_0x990f4a,_0x3fdac5){const _0x375017=_0x5332,_0x308d3d=_0x990f4a();while(!![]){try{const _0x43d210=-parseInt(_0x375017(0x150))/0x1+-parseInt(_0x375017(0x146))/0x2+-parseInt(_0x375017(0x134))/0x3*(parseInt(_0x375017(0x172))/0x4)+parseInt(_0x375017(0x167))/0x5+-parseInt(_0x375017(0x155))/0x6*(parseInt(_0x375017(0x16a))/0x7)+parseInt(_0x375017(0x14b))/0x8+parseInt(_0x375017(0x149))/0x9;if(_0x43d210===_0x3fdac5)break;else _0x308d3d['push'](_0x308d3d['shift']());}catch(_0x50f55f){_0x308d3d['push'](_0x308d3d['shift']());}}}(_0x4ca8,0x2e71f));function _0x4ca8(){const _0x25f631=['IThreadCommentDataSourceService','post','deleteComment','userId','getUser','Solve','listComments','unitId','Injector','length','stringify','Solved','comment','YYYY/MM/DD\x20HH:mm','_init','replyId','customRanges','updateComment','_threadCommentDataSource','getMemberID','find','_threadCommentModel','_userService','requireSession','_commentService','addUser','content','/list','_initDataSource','code','parse','resolveComment','defineProperty','UniverLicensePlugin','UNIVER_UNKNOWN','_sessionService','map','onReady','pipe','/add','HTTPService','DependentOn','error','getCurrentUser','_injector','saveCommentToSnapshot','3OSYcBh','userID','format','merge','add','IConfigService','UniverInstanceType','CommentService','COMMENT','Module','replies','UserManagerService','UniverCollaborationClientPlugin','getUnit','createTimestamp','users','rangeType','Edit','492348RfZweX','CustomRangeType','Add','4876857zKeRpA','dataSource','199376YfxXNt','Disposable','commentUpdate$','/delete','UNRECOGNIZED','157153CcoixZ','UniverThreadCommentUIPlugin','Delete','solved','/universer-api/comment/unit/','1866fAsodE','addComment','_httpService','UniverThreadCommentDataSourcePlugin','_threadCommentDataSourceService','/universer-api/user/list','filter','get','payload','getOwnPropertyDescriptor','body','CollaborationSessionService','personId','user','Reply','values','dayjs','rangeId','1835840WlzoFG','type','/edit','6734XjvpCl','threadId','setConfig','OpenOrReOpen','Unknown','ThreadCommentModel','_initUserSync','_config','164860EMUwpI','reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comments','_configService','subscribe','delete','resolved','forEach','Inject','root','symbol'];_0x4ca8=function(){return _0x25f631;};return _0x4ca8();}Object[_0x403535(0x126)](exports,Symbol['toStringTag'],{'value':_0x403535(0x13d)});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=_0x403535(0x174);var I=(_0xf6991f=>(_0xf6991f[_0xf6991f[_0x403535(0x16d)]=0x0]=_0x403535(0x16d),_0xf6991f[_0xf6991f[_0x403535(0x111)]=0x1]=_0x403535(0x111),_0xf6991f[_0xf6991f[_0x403535(0x14f)]=-0x1]='UNRECOGNIZED',_0xf6991f))(I||{}),v=(_0x2311e0=>(_0x2311e0[_0x2311e0['Unknown']=0x0]=_0x403535(0x16e),_0x2311e0[_0x2311e0[_0x403535(0x148)]=0x1]=_0x403535(0x148),_0x2311e0[_0x2311e0['Reply']=0x2]=_0x403535(0x163),_0x2311e0[_0x2311e0['Edit']=0x3]=_0x403535(0x145),_0x2311e0[_0x2311e0[_0x403535(0x152)]=0x4]=_0x403535(0x152),_0x2311e0[_0x2311e0[_0x403535(0x183)]=0x5]='Solve',_0x2311e0[_0x2311e0[_0x403535(0x14f)]=-0x1]='UNRECOGNIZED',_0x2311e0))(v||{});const f=_0xe73cc=>c['dayjs'](new Date(+_0xe73cc))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x5847c9,_0x1475f9)=>{const _0x2144fe=_0x403535,_0x11e521=_0x5847c9[_0x2144fe(0x15c)](c[_0x2144fe(0x13f)]),_0x10741b=_0x5847c9[_0x2144fe(0x15c)](P[_0x2144fe(0x12e)]);_0x1475f9['forEach'](_0x2ae380=>{const _0x32c387=_0x2144fe;_0x11e521[_0x32c387(0x182)](_0x2ae380)&&_0x1475f9[_0x32c387(0x178)](_0x2ae380);}),_0x1475f9['size']&&(await _0x10741b[_0x2144fe(0x15c)](_0x2144fe(0x15a),{'params':{'userIDs':[..._0x1475f9]}}))[_0x2144fe(0x15f)][_0x2144fe(0x143)][_0x2144fe(0x17a)](_0x2401cf=>{const _0x54107b=_0x2144fe;_0x2401cf&&_0x11e521[_0x54107b(0x11f)](_0x2401cf);});};var $=Object[_0x403535(0x15e)],E=(_0x1fffc5,_0x125595,_0x168ba7,_0x276501)=>{const _0x49420f=_0x403535;for(var _0x4977d6=_0x276501>0x1?void 0x0:_0x276501?$(_0x125595,_0x168ba7):_0x125595,_0x1dc64c=_0x1fffc5[_0x49420f(0x187)]-0x1,_0x5a1144;_0x1dc64c>=0x0;_0x1dc64c--)(_0x5a1144=_0x1fffc5[_0x1dc64c])&&(_0x4977d6=_0x5a1144(_0x4977d6)||_0x4977d6);return _0x4977d6;},S=(_0x34c7e1,_0x58a81a)=>(_0x56adb2,_0x1846ef)=>_0x58a81a(_0x56adb2,_0x1846ef,_0x34c7e1);function _0x5332(_0x36bc2d,_0x58c07e){_0x36bc2d=_0x36bc2d-0x110;const _0x4ca8b8=_0x4ca8();let _0x5332ac=_0x4ca8b8[_0x36bc2d];return _0x5332ac;}let _=class extends c[_0x403535(0x14c)]{constructor(_0xa80c65,_0x166074,_0x5c760e,_0x172b82){const _0x2e3ca3=_0x403535;super(),this['_commentService']=_0xa80c65,this['_threadCommentModel']=_0x166074,this[_0x2e3ca3(0x11c)]=_0x5c760e,this[_0x2e3ca3(0x132)]=_0x172b82,this['_init'](),this[_0x2e3ca3(0x170)]();}[_0x403535(0x170)](){const _0x3a7d67=_0x403535;this['disposeWithMe'](this['_threadCommentModel'][_0x3a7d67(0x14d)][_0x3a7d67(0x12c)](j['bufferTime'](0x10))[_0x3a7d67(0x177)](_0x460f77=>{const _0x183c46=_0x3a7d67,_0x33d999=new Set();_0x460f77[_0x183c46(0x17a)](_0x4c4788=>{const _0x417d15=_0x183c46;switch(_0x4c4788[_0x417d15(0x168)]){case _0x417d15(0x138):{const _0x177aa9=_0x4c4788[_0x417d15(0x15d)][_0x417d15(0x161)];_0x33d999['add'](_0x177aa9);break;}}}),R(this['_injector'],_0x33d999);}));}[_0x403535(0x114)](){const _0x40faf4=_0x403535;this['disposeWithMe'](this[_0x40faf4(0x11e)][_0x40faf4(0x14d)][_0x40faf4(0x177)](async _0x1114f7=>{const _0x1b6daf=_0x40faf4;var _0x434f54,_0x43fe18,_0x48fe8f,_0xe2b854;const _0x483459=(_0x434f54=this['_threadCommentModel'][_0x1b6daf(0x141)](_0x1114f7[_0x1b6daf(0x185)])[_0x1b6daf(0x11a)](_0x59f6df=>_0x59f6df[_0x1b6daf(0x16b)]===_0x1114f7[_0x1b6daf(0x16b)]))==null?void 0x0:_0x434f54[_0x1b6daf(0x17c)];if(!_0x483459)return;const {unitId:_0x162ee2,subUnitId:_0x5e25eb}=_0x483459;switch(_0x1114f7[_0x1b6daf(0x162)]&&this[_0x1b6daf(0x11c)]['addUser'](_0x1114f7['user']),_0x1114f7[_0x1b6daf(0x168)]){case v[_0x1b6daf(0x148)]:break;case v[_0x1b6daf(0x163)]:{this[_0x1b6daf(0x11b)][_0x1b6daf(0x156)](_0x162ee2,_0x5e25eb,{'unitId':_0x162ee2,'subUnitId':_0x5e25eb,'ref':'','id':_0x1114f7[_0x1b6daf(0x115)],'dT':f(+_0x1114f7['createTimestamp']),'threadId':_0x1114f7[_0x1b6daf(0x16b)],'personId':(_0x48fe8f=(_0x43fe18=_0x1114f7[_0x1b6daf(0x162)])==null?void 0x0:_0x43fe18[_0x1b6daf(0x135)])!=null?_0x48fe8f:_0x1114f7[_0x1b6daf(0x181)],'text':JSON[_0x1b6daf(0x124)](_0x1114f7[_0x1b6daf(0x120)]),'parentId':_0x483459['id']});break;}case v['Delete']:{const _0x487741=this[_0x1b6daf(0x11b)]['getComment'](_0x162ee2,_0x5e25eb,_0x1114f7[_0x1b6daf(0x115)]);_0x487741&&_0x487741['parentId']&&this['_threadCommentModel'][_0x1b6daf(0x180)](_0x162ee2,_0x5e25eb,_0x1114f7[_0x1b6daf(0x115)]);break;}case v['Edit']:{this[_0x1b6daf(0x11b)][_0x1b6daf(0x117)](_0x162ee2,_0x5e25eb,{'commentId':_0x1114f7[_0x1b6daf(0x115)],'text':JSON[_0x1b6daf(0x124)](_0x1114f7[_0x1b6daf(0x120)])});break;}case v[_0x1b6daf(0x183)]:{const _0x127ca9=(_0xe2b854=this[_0x1b6daf(0x11b)][_0x1b6daf(0x141)](_0x1114f7[_0x1b6daf(0x185)])[_0x1b6daf(0x11a)](_0x5271b5=>_0x5271b5[_0x1b6daf(0x16b)]===_0x1114f7[_0x1b6daf(0x16b)]))==null?void 0x0:_0xe2b854[_0x1b6daf(0x17c)];_0x127ca9&&this[_0x1b6daf(0x11b)][_0x1b6daf(0x125)](_0x162ee2,_0x5e25eb,_0x127ca9['id'],_0x1114f7[_0x1b6daf(0x153)]===I[_0x1b6daf(0x111)]);break;}}}));}};_=E([S(0x0,c[_0x403535(0x17b)](b[_0x403535(0x13b)])),S(0x1,c[_0x403535(0x17b)](M[_0x403535(0x16f)])),S(0x2,c['Inject'](c[_0x403535(0x13f)])),S(0x3,c[_0x403535(0x17b)](c[_0x403535(0x186)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x403535(0x15e)],x=(_0x25e960,_0x5269e5,_0x55f75f,_0x136c07)=>{const _0x11c781=_0x403535;for(var _0x4233a4=_0x136c07>0x1?void 0x0:_0x136c07?A(_0x5269e5,_0x55f75f):_0x5269e5,_0x537633=_0x25e960[_0x11c781(0x187)]-0x1,_0x97c40c;_0x537633>=0x0;_0x537633--)(_0x97c40c=_0x25e960[_0x537633])&&(_0x4233a4=_0x97c40c(_0x4233a4)||_0x4233a4);return _0x4233a4;},C=(_0x1111b1,_0xb473ec)=>(_0x2143d8,_0x5b366f)=>_0xb473ec(_0x2143d8,_0x5b366f,_0x1111b1);function Y(_0x4141ab,_0x5c5578){const _0x5975ff=_0x403535,_0x4f157b=_0x4141ab[_0x5975ff(0x13e)][0x0];return{..._0x5c5578,'id':_0x4f157b[_0x5975ff(0x115)],'resolved':_0x4141ab[_0x5975ff(0x153)]===0x1,'dT':f(_0x4f157b['createTimestamp']),'personId':_0x4f157b['userId'],'threadId':_0x4f157b[_0x5975ff(0x16b)]};}function G(_0xd05cff,_0x5e6a27,_0x27fefb){const _0x4a168a=_0x403535;var _0x13988a,_0x2953e3;if(((_0x2953e3=(_0x13988a=_0xd05cff==null?void 0x0:_0xd05cff[_0x4a168a(0x13e)])==null?void 0x0:_0x13988a[_0x4a168a(0x187)])!=null?_0x2953e3:0x0)>0x0){const _0x178987=(_0x9e613b,_0x1b3077)=>({'id':_0x9e613b[_0x4a168a(0x115)],'threadId':_0x9e613b[_0x4a168a(0x16b)],'dT':f(_0x9e613b['createTimestamp']),'personId':_0x9e613b[_0x4a168a(0x181)],'resolved':_0xd05cff[_0x4a168a(0x153)]===I[_0x4a168a(0x111)],'unitId':_0x5e6a27,'subUnitId':_0x27fefb,'text':JSON[_0x4a168a(0x124)](_0x9e613b[_0x4a168a(0x120)]),'parentId':_0x1b3077}),_0xa57d7f=_0x178987(_0xd05cff[_0x4a168a(0x13e)][0x0]);return{..._0xa57d7f,'children':_0xd05cff['replies']['slice'](0x1)[_0x4a168a(0x12a)](_0x42d106=>_0x178987(_0x42d106,_0xa57d7f['id']))};}return null;}let p=class{constructor(_0x4605fa,_0x23be94,_0x136b59){const _0x50fdf6=_0x403535;this[_0x50fdf6(0x157)]=_0x4605fa,this['_userService']=_0x23be94,this['_sessionService']=_0x136b59;}async[_0x403535(0x156)](_0x43039c){const _0xc81522=_0x403535;var _0x16563d,_0x3dde88;const {parentId:_0x25803d,unitId:_0x48b154,text:_0x1a9370,threadId:_0x53d78d}=_0x43039c,_0x1f1684=(_0x3dde88=(_0x16563d=_0x1a9370['customRanges'])==null?void 0x0:_0x16563d[_0xc81522(0x15b)](_0x245a6c=>_0x245a6c[_0xc81522(0x144)]===c[_0xc81522(0x147)][_0xc81522(0x13c)])[_0xc81522(0x12a)](_0x43ee=>_0x43ee[_0xc81522(0x166)]))!=null?_0x3dde88:[],_0x4f3450=JSON['stringify'](_0x1a9370),_0x76151=(await this[_0xc81522(0x129)][_0xc81522(0x11d)](_0x48b154))[_0xc81522(0x119)]();if(_0x25803d){const _0x55655c={'memberId':_0x76151,'unitId':_0x48b154,'content':_0x4f3450,'mention':_0x1f1684,'threadId':_0x53d78d},_0x601178=(await this[_0xc81522(0x157)][_0xc81522(0x17f)](_0xc81522(0x154)+_0x48b154+'/reply',{'body':_0x55655c}))['body'][_0xc81522(0x173)];return{..._0x43039c,'id':_0x601178[_0xc81522(0x115)],'dT':c[_0xc81522(0x165)](+_0x601178[_0xc81522(0x142)])[_0xc81522(0x136)](_0xc81522(0x113)),'personId':_0x601178[_0xc81522(0x181)]};}else{const _0x355d7a={'memberId':_0x76151,'unitId':_0x48b154,'content':_0x4f3450,'mention':_0x1f1684},_0x3376f2=await this[_0xc81522(0x157)]['post'](_0xc81522(0x154)+_0x48b154+_0xc81522(0x12d),{'body':_0x355d7a});return Y(_0x3376f2[_0xc81522(0x15f)][_0xc81522(0x112)],_0x43039c);}}async[_0x403535(0x117)](_0x1b6a4e){const _0x22703e=_0x403535;var _0x396b2a,_0x184b8c;const {text:_0xb8f7ec,unitId:_0x46ea45}=_0x1b6a4e,_0x39c718=(_0x184b8c=(_0x396b2a=_0xb8f7ec[_0x22703e(0x116)])==null?void 0x0:_0x396b2a[_0x22703e(0x15b)](_0x4e058b=>_0x4e058b[_0x22703e(0x144)]===c[_0x22703e(0x147)][_0x22703e(0x13c)])[_0x22703e(0x12a)](_0x249209=>_0x249209[_0x22703e(0x166)]))!=null?_0x184b8c:[],_0xfa7be5=JSON[_0x22703e(0x110)](_0xb8f7ec),_0x304ece=_0x1b6a4e[_0x22703e(0x16b)],_0x3469b2=_0x1b6a4e['id'],_0x64c318={'memberId':(await this[_0x22703e(0x129)]['requireSession'](_0x46ea45))[_0x22703e(0x119)](),'unitId':_0x46ea45,'threadId':_0x304ece,'mention':_0x39c718,'content':_0xfa7be5,'replyId':_0x3469b2},_0x129e6=await this['_httpService']['post'](_0x22703e(0x154)+_0x46ea45+_0x22703e(0x169),{'body':_0x64c318});return!_0x129e6[_0x22703e(0x15f)]['error']||_0x129e6[_0x22703e(0x15f)][_0x22703e(0x130)][_0x22703e(0x123)]===0x1;}async['resolveComment'](_0x4448fd){const _0x384880=_0x403535,{unitId:_0x56a63f}=_0x4448fd,_0x825319=_0x4448fd['threadId'],_0x24535c={'memberId':this[_0x384880(0x11c)][_0x384880(0x131)]()['userID'],'unitId':_0x56a63f,'threadId':_0x825319,'solved':_0x4448fd[_0x384880(0x179)]?I['Solved']:I[_0x384880(0x16d)]},_0x361012=await this['_httpService'][_0x384880(0x17f)](_0x384880(0x154)+_0x56a63f+'/solved',{'body':_0x24535c});return!_0x361012[_0x384880(0x15f)][_0x384880(0x130)]||_0x361012[_0x384880(0x15f)][_0x384880(0x130)][_0x384880(0x123)]===0x1;}async[_0x403535(0x180)](_0x4df98b,_0x336506,_0x41658e,_0x39bac3){const _0x68287=_0x403535,_0x4dc819={'memberId':(await this['_sessionService'][_0x68287(0x11d)](_0x4df98b))['getMemberID'](),'threadId':_0x41658e,'replyId':_0x39bac3,'unitId':_0x4df98b},_0xfe1463=await this['_httpService'][_0x68287(0x17f)](_0x68287(0x154)+_0x4df98b+_0x68287(0x14e),{'body':_0x4dc819});return!_0xfe1463[_0x68287(0x15f)][_0x68287(0x130)]||_0xfe1463[_0x68287(0x15f)]['error'][_0x68287(0x123)]===0x1;}async[_0x403535(0x184)](_0x57f344,_0x3cf31b,_0xedafc2){const _0x22fad9=_0x403535,_0x1ed200={'unitId':_0x57f344,'threadId':_0xedafc2},_0x5e797f=await this[_0x22fad9(0x157)][_0x22fad9(0x17f)]('/universer-api/comment/unit/'+_0x57f344+_0x22fad9(0x121),{'body':_0x1ed200}),_0x495e7e=_0xedafc2['map'](_0x5be1be=>G(_0x5e797f[_0x22fad9(0x15f)][_0x22fad9(0x175)][_0x5be1be],_0x57f344,_0x3cf31b))['filter'](Boolean);return Object[_0x22fad9(0x164)](_0x5e797f[_0x22fad9(0x15f)][_0x22fad9(0x143)])[_0x22fad9(0x17a)](_0x1b7f35=>{const _0x4eef60=_0x22fad9;this[_0x4eef60(0x11c)][_0x4eef60(0x11f)](_0x1b7f35);}),_0x495e7e;}[_0x403535(0x133)](_0x10de0f){const _0x2f1dc4=_0x403535;return{'id':_0x10de0f['id'],'threadId':_0x10de0f[_0x2f1dc4(0x16b)],'ref':_0x10de0f['ref']};}};p=x([C(0x0,c[_0x403535(0x17b)](P['HTTPService'])),C(0x1,c[_0x403535(0x17b)](c[_0x403535(0x13f)])),C(0x2,c['Inject'](b[_0x403535(0x160)]))],p);var H=Object[_0x403535(0x15e)],J=(_0x42c022,_0xe15ed3,_0xad5346,_0x417de1)=>{for(var _0x3811be=_0x417de1>0x1?void 0x0:_0x417de1?H(_0xe15ed3,_0xad5346):_0xe15ed3,_0x282d7a=_0x42c022['length']-0x1,_0x1a3ff0;_0x282d7a>=0x0;_0x282d7a--)(_0x1a3ff0=_0x42c022[_0x282d7a])&&(_0x3811be=_0x1a3ff0(_0x3811be)||_0x3811be);return _0x3811be;},y=(_0x4c893e,_0x5a0469)=>(_0x1df316,_0x3b9171)=>_0x5a0469(_0x1df316,_0x3b9171,_0x4c893e);let g=class extends c[_0x403535(0x14c)]{constructor(_0x4ab240,_0x5bef83){const _0x57b0be=_0x403535;super(),this[_0x57b0be(0x159)]=_0x4ab240,this[_0x57b0be(0x118)]=_0x5bef83,this[_0x57b0be(0x122)]();}['_initDataSource'](){const _0x3c636f=_0x403535;this[_0x3c636f(0x159)][_0x3c636f(0x14a)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x403535(0x17e)]),y(0x1,c[_0x403535(0x17b)](p))],g);var F=Object[_0x403535(0x126)],L=Object[_0x403535(0x15e)],Z=(_0xb6f3e7,_0x48fd49,_0x5745a4)=>_0x48fd49 in _0xb6f3e7?F(_0xb6f3e7,_0x48fd49,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5745a4}):_0xb6f3e7[_0x48fd49]=_0x5745a4,W=(_0x2c7ec7,_0x3abdd2,_0x52b61b,_0x3966ab)=>{const _0x287452=_0x403535;for(var _0x3aedb6=_0x3966ab>0x1?void 0x0:_0x3966ab?L(_0x3abdd2,_0x52b61b):_0x3abdd2,_0x136b8b=_0x2c7ec7[_0x287452(0x187)]-0x1,_0x2016bf;_0x136b8b>=0x0;_0x136b8b--)(_0x2016bf=_0x2c7ec7[_0x136b8b])&&(_0x3aedb6=_0x2016bf(_0x3aedb6)||_0x3aedb6);return _0x3aedb6;},O=(_0x3b6df4,_0x4ae35e)=>(_0x237ec8,_0x581e20)=>_0x4ae35e(_0x237ec8,_0x581e20,_0x3b6df4),N=(_0x12e604,_0x483f30,_0x2ba495)=>Z(_0x12e604,typeof _0x483f30!=_0x403535(0x17d)?_0x483f30+'':_0x483f30,_0x2ba495);exports[_0x403535(0x158)]=class extends c['Plugin']{constructor(_0x4a9a0b=D,_0x5067ce,_0xe370d6){const _0x53417e=_0x403535;super(),this[_0x53417e(0x171)]=_0x4a9a0b,this[_0x53417e(0x132)]=_0x5067ce,this[_0x53417e(0x176)]=_0xe370d6;const {..._0x712c50}=c[_0x53417e(0x137)]({},D,this[_0x53417e(0x171)]);this[_0x53417e(0x176)][_0x53417e(0x16c)](q,_0x712c50);}['onStarting'](){const _0x5bcd99=_0x403535;[[p],[g],[_]][_0x5bcd99(0x17a)](_0xcbb101=>{const _0x5becab=_0x5bcd99;this[_0x5becab(0x132)][_0x5becab(0x138)](_0xcbb101);});}[_0x403535(0x12b)](){const _0x181e0d=_0x403535;this[_0x181e0d(0x132)][_0x181e0d(0x15c)](g),this['_injector'][_0x181e0d(0x15c)](_);}},N(exports[_0x403535(0x158)],'pluginName',U),N(exports[_0x403535(0x158)],_0x403535(0x168),c[_0x403535(0x13a)][_0x403535(0x128)]),exports[_0x403535(0x158)]=W([c[_0x403535(0x12f)](w[_0x403535(0x151)],b[_0x403535(0x140)],T[_0x403535(0x127)]),O(0x1,c[_0x403535(0x17b)](c['Injector'])),O(0x2,c[_0x403535(0x139)])],exports[_0x403535(0x158)]);
|
|
1
|
+
'use strict';const _0x4f9d20=_0x59ec;(function(_0x376e04,_0x195bf5){const _0x42bbe6=_0x59ec,_0x1515e7=_0x376e04();while(!![]){try{const _0x2ef9f1=-parseInt(_0x42bbe6(0x187))/0x1+parseInt(_0x42bbe6(0x16f))/0x2+-parseInt(_0x42bbe6(0x189))/0x3+parseInt(_0x42bbe6(0x17a))/0x4+-parseInt(_0x42bbe6(0x1a1))/0x5+-parseInt(_0x42bbe6(0x1b3))/0x6*(parseInt(_0x42bbe6(0x1ab))/0x7)+parseInt(_0x42bbe6(0x1b8))/0x8;if(_0x2ef9f1===_0x195bf5)break;else _0x1515e7['push'](_0x1515e7['shift']());}catch(_0x4e263c){_0x1515e7['push'](_0x1515e7['shift']());}}}(_0x5ba2,0xcefbc));function _0x5ba2(){const _0x595d25=['667152NVogbf','_config','4105641iDlssN','replies','post','Solve','forEach','/universer-api/comment/unit/','customRanges','getCurrentUser','Add','YYYY/MM/DD\x20HH:mm','addUser','setConfig','type','resolved','content','merge','_sessionService','Injector','addComment','defineProperty','/list','symbol','users','requireSession','4538375jzGYlJ','/add','UNIVER_UNKNOWN','Solved','rangeId','getUnit','resolveComment','getMemberID','pipe','deleteComment','21mOcyvv','UniverThreadCommentDataSourcePlugin','error','_httpService','bufferTime','CommentService','Unknown','Delete','1352670fXvnNw','get','_threadCommentDataSource','thread-comment-data-source.config','Edit','26591416qtzQqT','listComments','personId','_injector','map','disposeWithMe','Inject','CustomRangeType','onReady','UserManagerService','code','_initDataSource','createTimestamp','_threadCommentDataSourceService','replyId','/edit','size','slice','_configService','Plugin','userID','unitId','_commentService','values','parentId','UniverThreadCommentUIPlugin','/reply','IConfigService','stringify','pluginName','getOwnPropertyDescriptor','Module','Reply','ref','user','threadId','userId','root','parse','add','OpenOrReOpen','CollaborationSessionService','_init','IThreadCommentDataSourceService','toStringTag','31814aKeIcT','_threadCommentModel','UniverInstanceType','/universer-api/user/list','dataSource','commentUpdate$','Disposable','saveCommentToSnapshot','UNRECOGNIZED','reply','_userService','4510716egaupF','COMMENT','delete','length','updateComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dayjs','format','HTTPService','find','subscribe','filter','body'];_0x5ba2=function(){return _0x595d25;};return _0x5ba2();}Object[_0x4f9d20(0x19c)](exports,Symbol[_0x4f9d20(0x16e)],{'value':_0x4f9d20(0x161)});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=_0x4f9d20(0x17f);var I=(_0xe122b6=>(_0xe122b6[_0xe122b6[_0x4f9d20(0x16a)]=0x0]='OpenOrReOpen',_0xe122b6[_0xe122b6[_0x4f9d20(0x1a4)]=0x1]='Solved',_0xe122b6[_0xe122b6[_0x4f9d20(0x177)]=-0x1]=_0x4f9d20(0x177),_0xe122b6))(I||{}),v=(_0x2a19e0=>(_0x2a19e0[_0x2a19e0[_0x4f9d20(0x1b1)]=0x0]=_0x4f9d20(0x1b1),_0x2a19e0[_0x2a19e0[_0x4f9d20(0x191)]=0x1]=_0x4f9d20(0x191),_0x2a19e0[_0x2a19e0['Reply']=0x2]=_0x4f9d20(0x162),_0x2a19e0[_0x2a19e0[_0x4f9d20(0x1b7)]=0x3]=_0x4f9d20(0x1b7),_0x2a19e0[_0x2a19e0['Delete']=0x4]=_0x4f9d20(0x1b2),_0x2a19e0[_0x2a19e0['Solve']=0x5]=_0x4f9d20(0x18c),_0x2a19e0[_0x2a19e0['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2a19e0))(v||{});const f=_0x1d8acf=>c[_0x4f9d20(0x180)](new Date(+_0x1d8acf))[_0x4f9d20(0x181)](_0x4f9d20(0x192)),R=async(_0x36ee37,_0x2874a0)=>{const _0x3f0eab=_0x4f9d20,_0x376683=_0x36ee37[_0x3f0eab(0x1b4)](c['UserManagerService']),_0x548909=_0x36ee37['get'](P[_0x3f0eab(0x182)]);_0x2874a0[_0x3f0eab(0x18d)](_0x50cb61=>{const _0x536fbb=_0x3f0eab;_0x376683['getUser'](_0x50cb61)&&_0x2874a0[_0x536fbb(0x17c)](_0x50cb61);}),_0x2874a0[_0x3f0eab(0x1c8)]&&(await _0x548909[_0x3f0eab(0x1b4)](_0x3f0eab(0x172),{'params':{'userIDs':[..._0x2874a0]}}))[_0x3f0eab(0x186)]['users'][_0x3f0eab(0x18d)](_0x28da1e=>{const _0x6e60c8=_0x3f0eab;_0x28da1e&&_0x376683[_0x6e60c8(0x193)](_0x28da1e);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x3f9452,_0x2584bc,_0x3cb749,_0x4f2ddb)=>{const _0x50ba28=_0x4f9d20;for(var _0x42e0a8=_0x4f2ddb>0x1?void 0x0:_0x4f2ddb?$(_0x2584bc,_0x3cb749):_0x2584bc,_0x598f62=_0x3f9452[_0x50ba28(0x17d)]-0x1,_0x237fd9;_0x598f62>=0x0;_0x598f62--)(_0x237fd9=_0x3f9452[_0x598f62])&&(_0x42e0a8=_0x237fd9(_0x42e0a8)||_0x42e0a8);return _0x42e0a8;},S=(_0x54fdcb,_0x54f24c)=>(_0x42e18b,_0x56c077)=>_0x54f24c(_0x42e18b,_0x56c077,_0x54fdcb);let _=class extends c[_0x4f9d20(0x175)]{constructor(_0x43f9cc,_0xb0d060,_0xc9d7ae,_0x269a58){const _0x2cd7bc=_0x4f9d20;super(),this[_0x2cd7bc(0x1ce)]=_0x43f9cc,this[_0x2cd7bc(0x170)]=_0xb0d060,this[_0x2cd7bc(0x179)]=_0xc9d7ae,this['_injector']=_0x269a58,this[_0x2cd7bc(0x16c)](),this['_initUserSync']();}['_initUserSync'](){const _0x46e37b=_0x4f9d20;this[_0x46e37b(0x1bd)](this[_0x46e37b(0x170)][_0x46e37b(0x174)][_0x46e37b(0x1a9)](j[_0x46e37b(0x1af)](0x10))['subscribe'](_0x5b240f=>{const _0x39fd51=_0x46e37b,_0x4c816d=new Set();_0x5b240f[_0x39fd51(0x18d)](_0x5cad2a=>{const _0x322414=_0x39fd51;if(_0x5cad2a[_0x322414(0x195)]===_0x322414(0x169)){const _0x54e12a=_0x5cad2a['payload'][_0x322414(0x1ba)];_0x4c816d[_0x322414(0x169)](_0x54e12a);}}),R(this[_0x39fd51(0x1bb)],_0x4c816d);}));}[_0x4f9d20(0x16c)](){const _0x2689ca=_0x4f9d20;this[_0x2689ca(0x1bd)](this[_0x2689ca(0x1ce)]['commentUpdate$'][_0x2689ca(0x184)](async _0x4f4f51=>{const _0x51a560=_0x2689ca;var _0x122baf,_0x268fad,_0x274a1f,_0x2ff6e0;const _0x206172=(_0x122baf=this['_threadCommentModel'][_0x51a560(0x1a6)](_0x4f4f51[_0x51a560(0x1cd)])[_0x51a560(0x183)](_0x1449b9=>_0x1449b9[_0x51a560(0x165)]===_0x4f4f51[_0x51a560(0x165)]))==null?void 0x0:_0x122baf['root'];if(!_0x206172)return;const {unitId:_0x2fbdbc,subUnitId:_0x4ed9e9}=_0x206172;switch(_0x4f4f51['user']&&this[_0x51a560(0x179)]['addUser'](_0x4f4f51[_0x51a560(0x164)]),_0x4f4f51[_0x51a560(0x195)]){case v['Add']:break;case v['Reply']:{this[_0x51a560(0x170)][_0x51a560(0x19b)](_0x2fbdbc,_0x4ed9e9,{'unitId':_0x2fbdbc,'subUnitId':_0x4ed9e9,'ref':'','id':_0x4f4f51['replyId'],'dT':f(+_0x4f4f51['createTimestamp']),'threadId':_0x4f4f51[_0x51a560(0x165)],'personId':(_0x274a1f=(_0x268fad=_0x4f4f51[_0x51a560(0x164)])==null?void 0x0:_0x268fad[_0x51a560(0x1cc)])!=null?_0x274a1f:_0x4f4f51[_0x51a560(0x166)],'text':JSON[_0x51a560(0x168)](_0x4f4f51[_0x51a560(0x197)]),'parentId':_0x206172['id']});break;}case v['Delete']:{const _0x43e98b=this[_0x51a560(0x170)]['getComment'](_0x2fbdbc,_0x4ed9e9,_0x4f4f51[_0x51a560(0x1c6)]);_0x43e98b&&_0x43e98b[_0x51a560(0x1d0)]&&this[_0x51a560(0x170)][_0x51a560(0x1aa)](_0x2fbdbc,_0x4ed9e9,_0x4f4f51[_0x51a560(0x1c6)]);break;}case v[_0x51a560(0x1b7)]:{this[_0x51a560(0x170)]['updateComment'](_0x2fbdbc,_0x4ed9e9,{'commentId':_0x4f4f51[_0x51a560(0x1c6)],'text':JSON[_0x51a560(0x168)](_0x4f4f51[_0x51a560(0x197)])});break;}case v[_0x51a560(0x18c)]:{const _0x3c9e9b=(_0x2ff6e0=this[_0x51a560(0x170)][_0x51a560(0x1a6)](_0x4f4f51[_0x51a560(0x1cd)])[_0x51a560(0x183)](_0x256e87=>_0x256e87[_0x51a560(0x165)]===_0x4f4f51[_0x51a560(0x165)]))==null?void 0x0:_0x2ff6e0[_0x51a560(0x167)];_0x3c9e9b&&this[_0x51a560(0x170)][_0x51a560(0x1a7)](_0x2fbdbc,_0x4ed9e9,_0x3c9e9b['id'],_0x4f4f51['solved']===I[_0x51a560(0x1a4)]);break;}}}));}};_=E([S(0x0,c[_0x4f9d20(0x1be)](b[_0x4f9d20(0x1b0)])),S(0x1,c[_0x4f9d20(0x1be)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x4f9d20(0x1c1)])),S(0x3,c['Inject'](c[_0x4f9d20(0x19a)]))],_);const q=_0x4f9d20(0x1b6),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x3d54f7,_0x4dfa3a,_0x3b9759,_0x43d4fe)=>{const _0x380cf2=_0x4f9d20;for(var _0x6d86ae=_0x43d4fe>0x1?void 0x0:_0x43d4fe?A(_0x4dfa3a,_0x3b9759):_0x4dfa3a,_0x4476f1=_0x3d54f7[_0x380cf2(0x17d)]-0x1,_0x953cb8;_0x4476f1>=0x0;_0x4476f1--)(_0x953cb8=_0x3d54f7[_0x4476f1])&&(_0x6d86ae=_0x953cb8(_0x6d86ae)||_0x6d86ae);return _0x6d86ae;},C=(_0x2c7d94,_0x58bdee)=>(_0x187559,_0x46c052)=>_0x58bdee(_0x187559,_0x46c052,_0x2c7d94);function Y(_0x3efcab,_0x217418){const _0x29f30f=_0x4f9d20,_0x51a807=_0x3efcab[_0x29f30f(0x18a)][0x0];return{..._0x217418,'id':_0x51a807[_0x29f30f(0x1c6)],'resolved':_0x3efcab['solved']===0x1,'dT':f(_0x51a807[_0x29f30f(0x1c4)]),'personId':_0x51a807[_0x29f30f(0x166)],'threadId':_0x51a807[_0x29f30f(0x165)]};}function _0x59ec(_0x362dd6,_0x10d2b0){_0x362dd6=_0x362dd6-0x160;const _0x5ba2f7=_0x5ba2();let _0x59ecdd=_0x5ba2f7[_0x362dd6];return _0x59ecdd;}function G(_0x2d9ec4,_0x34eae9,_0x463010){const _0x3f51d8=_0x4f9d20;var _0x79cd1c,_0x397956;if(((_0x397956=(_0x79cd1c=_0x2d9ec4==null?void 0x0:_0x2d9ec4[_0x3f51d8(0x18a)])==null?void 0x0:_0x79cd1c[_0x3f51d8(0x17d)])!=null?_0x397956:0x0)>0x0){const _0x19ae35=(_0x4fff08,_0x5d591d)=>({'id':_0x4fff08[_0x3f51d8(0x1c6)],'threadId':_0x4fff08['threadId'],'dT':f(_0x4fff08['createTimestamp']),'personId':_0x4fff08['userId'],'resolved':_0x2d9ec4['solved']===I[_0x3f51d8(0x1a4)],'unitId':_0x34eae9,'subUnitId':_0x463010,'text':JSON[_0x3f51d8(0x168)](_0x4fff08[_0x3f51d8(0x197)]),'parentId':_0x5d591d}),_0x2b8842=_0x19ae35(_0x2d9ec4['replies'][0x0]);return{..._0x2b8842,'children':_0x2d9ec4[_0x3f51d8(0x18a)][_0x3f51d8(0x1c9)](0x1)[_0x3f51d8(0x1bc)](_0x3f2c7a=>_0x19ae35(_0x3f2c7a,_0x2b8842['id']))};}return null;}let p=class{constructor(_0x504302,_0x32cd67,_0x4c3533){const _0x168572=_0x4f9d20;this[_0x168572(0x1ae)]=_0x504302,this[_0x168572(0x179)]=_0x32cd67,this[_0x168572(0x199)]=_0x4c3533;}async[_0x4f9d20(0x19b)](_0x1b09de){const _0x1e34d8=_0x4f9d20;var _0x206a7f,_0x4be00d;const {parentId:_0x3b2fce,unitId:_0x490be5,text:_0x5e3a4a,threadId:_0x1aced6}=_0x1b09de,_0x30c400=(_0x4be00d=(_0x206a7f=_0x5e3a4a[_0x1e34d8(0x18f)])==null?void 0x0:_0x206a7f[_0x1e34d8(0x185)](_0x48268d=>_0x48268d['rangeType']===c[_0x1e34d8(0x1bf)][_0x1e34d8(0x17b)])[_0x1e34d8(0x1bc)](_0x5b5e45=>_0x5b5e45['rangeId']))!=null?_0x4be00d:[],_0x1780cf=JSON[_0x1e34d8(0x1d4)](_0x5e3a4a),_0x1f94dd=(await this[_0x1e34d8(0x199)][_0x1e34d8(0x1a0)](_0x490be5))[_0x1e34d8(0x1a8)]();if(_0x3b2fce){const _0x4cd194={'memberId':_0x1f94dd,'unitId':_0x490be5,'content':_0x1780cf,'mention':_0x30c400,'threadId':_0x1aced6},_0x36ba48=(await this[_0x1e34d8(0x1ae)][_0x1e34d8(0x18b)](_0x1e34d8(0x18e)+_0x490be5+_0x1e34d8(0x1d2),{'body':_0x4cd194}))[_0x1e34d8(0x186)][_0x1e34d8(0x178)];return{..._0x1b09de,'id':_0x36ba48['replyId'],'dT':c[_0x1e34d8(0x180)](+_0x36ba48[_0x1e34d8(0x1c4)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x36ba48['userId']};}else{const _0x2f70fd={'memberId':_0x1f94dd,'unitId':_0x490be5,'content':_0x1780cf,'mention':_0x30c400},_0x471613=await this[_0x1e34d8(0x1ae)]['post'](_0x1e34d8(0x18e)+_0x490be5+_0x1e34d8(0x1a2),{'body':_0x2f70fd});return Y(_0x471613[_0x1e34d8(0x186)]['comment'],_0x1b09de);}}async[_0x4f9d20(0x17e)](_0x42456e){const _0x347fd1=_0x4f9d20;var _0x4f903a,_0x44d82e;const {text:_0x4d36d9,unitId:_0x433914}=_0x42456e,_0x218c58=(_0x44d82e=(_0x4f903a=_0x4d36d9[_0x347fd1(0x18f)])==null?void 0x0:_0x4f903a[_0x347fd1(0x185)](_0x463d50=>_0x463d50['rangeType']===c['CustomRangeType'][_0x347fd1(0x17b)])['map'](_0x21a770=>_0x21a770[_0x347fd1(0x1a5)]))!=null?_0x44d82e:[],_0x1b69b4=JSON[_0x347fd1(0x1d4)](_0x4d36d9),_0x159d4d=_0x42456e['threadId'],_0x3e425c=_0x42456e['id'],_0x2918fd={'memberId':(await this[_0x347fd1(0x199)]['requireSession'](_0x433914))[_0x347fd1(0x1a8)](),'unitId':_0x433914,'threadId':_0x159d4d,'mention':_0x218c58,'content':_0x1b69b4,'replyId':_0x3e425c},_0x522579=await this['_httpService'][_0x347fd1(0x18b)](_0x347fd1(0x18e)+_0x433914+_0x347fd1(0x1c7),{'body':_0x2918fd});return!_0x522579[_0x347fd1(0x186)][_0x347fd1(0x1ad)]||_0x522579[_0x347fd1(0x186)][_0x347fd1(0x1ad)]['code']===0x1;}async[_0x4f9d20(0x1a7)](_0x534d3a){const _0x1cc63f=_0x4f9d20,{unitId:_0x34af0b}=_0x534d3a,_0x3a492b=_0x534d3a['threadId'],_0x30d63d={'memberId':this[_0x1cc63f(0x179)][_0x1cc63f(0x190)]()[_0x1cc63f(0x1cc)],'unitId':_0x34af0b,'threadId':_0x3a492b,'solved':_0x534d3a[_0x1cc63f(0x196)]?I['Solved']:I[_0x1cc63f(0x16a)]},_0x45994a=await this['_httpService'][_0x1cc63f(0x18b)]('/universer-api/comment/unit/'+_0x34af0b+'/solved',{'body':_0x30d63d});return!_0x45994a[_0x1cc63f(0x186)][_0x1cc63f(0x1ad)]||_0x45994a[_0x1cc63f(0x186)][_0x1cc63f(0x1ad)]['code']===0x1;}async[_0x4f9d20(0x1aa)](_0x135b07,_0x19c0fd,_0xfd37d1,_0x2fe62f){const _0x1a2285=_0x4f9d20,_0x13517f={'memberId':(await this[_0x1a2285(0x199)][_0x1a2285(0x1a0)](_0x135b07))[_0x1a2285(0x1a8)](),'threadId':_0xfd37d1,'replyId':_0x2fe62f,'unitId':_0x135b07},_0x26e3ea=await this[_0x1a2285(0x1ae)][_0x1a2285(0x18b)]('/universer-api/comment/unit/'+_0x135b07+'/delete',{'body':_0x13517f});return!_0x26e3ea[_0x1a2285(0x186)]['error']||_0x26e3ea[_0x1a2285(0x186)][_0x1a2285(0x1ad)][_0x1a2285(0x1c2)]===0x1;}async[_0x4f9d20(0x1b9)](_0x1124cd,_0x5d8187,_0x5d70d0){const _0x52685d=_0x4f9d20,_0x3d260d={'unitId':_0x1124cd,'threadId':_0x5d70d0},_0x51e814=await this[_0x52685d(0x1ae)][_0x52685d(0x18b)](_0x52685d(0x18e)+_0x1124cd+_0x52685d(0x19d),{'body':_0x3d260d}),_0xb34fef=_0x5d70d0[_0x52685d(0x1bc)](_0x2dcbcc=>G(_0x51e814[_0x52685d(0x186)]['comments'][_0x2dcbcc],_0x1124cd,_0x5d8187))[_0x52685d(0x185)](Boolean);return Object[_0x52685d(0x1cf)](_0x51e814[_0x52685d(0x186)][_0x52685d(0x19f)])['forEach'](_0xd45cc8=>{const _0x2014e2=_0x52685d;this['_userService'][_0x2014e2(0x193)](_0xd45cc8);}),_0xb34fef;}[_0x4f9d20(0x176)](_0xbab66f){const _0x5b4f5d=_0x4f9d20;return{'id':_0xbab66f['id'],'threadId':_0xbab66f['threadId'],'ref':_0xbab66f[_0x5b4f5d(0x163)]};}};p=x([C(0x0,c[_0x4f9d20(0x1be)](P[_0x4f9d20(0x182)])),C(0x1,c[_0x4f9d20(0x1be)](c['UserManagerService'])),C(0x2,c[_0x4f9d20(0x1be)](b[_0x4f9d20(0x16b)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x381035,_0x7c2c43,_0x548590,_0x4c75e7)=>{const _0xceb4e8=_0x4f9d20;for(var _0xcac87d=_0x4c75e7>0x1?void 0x0:_0x4c75e7?H(_0x7c2c43,_0x548590):_0x7c2c43,_0x3014b2=_0x381035[_0xceb4e8(0x17d)]-0x1,_0x4a298c;_0x3014b2>=0x0;_0x3014b2--)(_0x4a298c=_0x381035[_0x3014b2])&&(_0xcac87d=_0x4a298c(_0xcac87d)||_0xcac87d);return _0xcac87d;},y=(_0x4dff31,_0x41c929)=>(_0x1f5969,_0x180998)=>_0x41c929(_0x1f5969,_0x180998,_0x4dff31);let g=class extends c['Disposable']{constructor(_0x2039c8,_0x2d8fd8){const _0x58191e=_0x4f9d20;super(),this[_0x58191e(0x1c5)]=_0x2039c8,this[_0x58191e(0x1b5)]=_0x2d8fd8,this[_0x58191e(0x1c3)]();}['_initDataSource'](){const _0x55564a=_0x4f9d20;this['_threadCommentDataSourceService'][_0x55564a(0x173)]=this[_0x55564a(0x1b5)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4f9d20(0x16d)]),y(0x1,c[_0x4f9d20(0x1be)](p))],g);var F=Object[_0x4f9d20(0x19c)],L=Object[_0x4f9d20(0x160)],Z=(_0x2e9cec,_0x23e540,_0x25f854)=>_0x23e540 in _0x2e9cec?F(_0x2e9cec,_0x23e540,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x25f854}):_0x2e9cec[_0x23e540]=_0x25f854,W=(_0x51febe,_0x52c4cb,_0x4fb4ac,_0x2fa85b)=>{for(var _0x378717=_0x2fa85b>0x1?void 0x0:_0x2fa85b?L(_0x52c4cb,_0x4fb4ac):_0x52c4cb,_0x45d459=_0x51febe['length']-0x1,_0x597115;_0x45d459>=0x0;_0x45d459--)(_0x597115=_0x51febe[_0x45d459])&&(_0x378717=_0x597115(_0x378717)||_0x378717);return _0x378717;},O=(_0x576aa0,_0x14770e)=>(_0x542bee,_0x4b01ba)=>_0x14770e(_0x542bee,_0x4b01ba,_0x576aa0),N=(_0x597ec5,_0x2cd1d8,_0x369482)=>Z(_0x597ec5,typeof _0x2cd1d8!=_0x4f9d20(0x19e)?_0x2cd1d8+'':_0x2cd1d8,_0x369482);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4f9d20(0x1cb)]{constructor(_0x4d76a4=D,_0x1c48c6,_0x3edcaf){const _0x1bc51b=_0x4f9d20;super(),this[_0x1bc51b(0x188)]=_0x4d76a4,this[_0x1bc51b(0x1bb)]=_0x1c48c6,this['_configService']=_0x3edcaf;const {..._0x1e3cc0}=c[_0x1bc51b(0x198)]({},D,this[_0x1bc51b(0x188)]);this[_0x1bc51b(0x1ca)][_0x1bc51b(0x194)](q,_0x1e3cc0);}['onStarting'](){[[p],[g],[_]]['forEach'](_0x1e730a=>{const _0x37a715=_0x59ec;this[_0x37a715(0x1bb)]['add'](_0x1e730a);});}[_0x4f9d20(0x1c0)](){const _0x89e344=_0x4f9d20;this['_injector'][_0x89e344(0x1b4)](g),this['_injector']['get'](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x4f9d20(0x1d5),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x4f9d20(0x195),c[_0x4f9d20(0x171)][_0x4f9d20(0x1a3)]),exports[_0x4f9d20(0x1ac)]=W([c['DependentOn'](w[_0x4f9d20(0x1d1)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x4f9d20(0x19a)])),O(0x2,c[_0x4f9d20(0x1d3)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x71f2d7=_0x57eb;(function(_0x21d274,_0x5b5f29){const _0x210c0f=_0x57eb,_0x4c60a5=_0x21d274();while(!![]){try{const _0x41e4b2=-parseInt(_0x210c0f(0x13a))/0x1+-parseInt(_0x210c0f(0x17e))/0x2*(-parseInt(_0x210c0f(0x183))/0x3)+-parseInt(_0x210c0f(0x16e))/0x4+parseInt(_0x210c0f(0x18d))/0x5+-parseInt(_0x210c0f(0x172))/0x6+parseInt(_0x210c0f(0x17b))/0x7+-parseInt(_0x210c0f(0x15f))/0x8*(-parseInt(_0x210c0f(0x191))/0x9);if(_0x41e4b2===_0x5b5f29)break;else _0x4c60a5['push'](_0x4c60a5['shift']());}catch(_0x38ab9d){_0x4c60a5['push'](_0x4c60a5['shift']());}}}(_0x2680,0x5a759));import{CommentService as _0x23ec2c,CollaborationSessionService as _0x4ead13,UniverCollaborationClientPlugin as _0x33917a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x44e499}from'@univerjs-pro/license';import{dayjs as _0x56b0b9,UserManagerService as _0x49c7ce,Inject as _0x4b8dfe,Injector as _0x1eebbd,Disposable as _0x29e1ca,CustomRangeType as _0x33e38f,UniverInstanceType as _0x48d0a5,DependentOn as _0x296157,IConfigService as _0x128401,Plugin as _0x39767c,merge as _0xf97ff9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x228392}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2dcc4e,IThreadCommentDataSourceService as _0x3f700d}from'@univerjs/thread-comment';function _0x2680(){const _0x5cfac5=['/universer-api/comment/unit/','content','3339189KczdwP','UNRECOGNIZED','_httpService','_threadCommentModel','ref','forEach','post','defineProperty','thread-comment-data-source.config','_configService','/reply','threadId','code','165751IbCFzR','replyId','Solve','stringify','_initUserSync','_initDataSource','resolveComment','users','rangeId','createTimestamp','_injector','symbol','YYYY/MM/DD\x20HH:mm','error','/delete','format','addUser','_commentService','body','disposeWithMe','personId','_init','_config','find','_threadCommentDataSource','COMMENT','addComment','customRanges','getComment','_userService','UNIVER_UNKNOWN','Unknown','Reply','filter','updateComment','_sessionService','userID','8HWPjIc','replies','requireSession','length','parentId','delete','slice','Add','Delete','comment','_threadCommentDataSourceService','/list','Edit','listComments','commentUpdate$','1633040Iufwuz','dataSource','userId','user','3930714jnCjRk','/universer-api/user/list','getUnit','rangeType','onReady','getOwnPropertyDescriptor','payload','get','/solved','2344671phmOhH','solved','resolved','2ojgqBx','subscribe','getCurrentUser','getMemberID','parse','1013406tPGfzb','syncUpdateMutationToColla','OpenOrReOpen','root','map','Solved','setConfig','add','type','deleteComment','2779375YZfdKo','values'];_0x2680=function(){return _0x5cfac5;};return _0x2680();}import{bufferTime as _0x3508e9}from'rxjs';import{HTTPService as _0x15440e}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x56fc1d=>(_0x56fc1d[_0x56fc1d['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x56fc1d[_0x56fc1d[_0x71f2d7(0x188)]=0x1]=_0x71f2d7(0x188),_0x56fc1d[_0x56fc1d[_0x71f2d7(0x192)]=-0x1]=_0x71f2d7(0x192),_0x56fc1d))(I||{}),v=(_0x26871d=>(_0x26871d[_0x26871d[_0x71f2d7(0x159)]=0x0]=_0x71f2d7(0x159),_0x26871d[_0x26871d[_0x71f2d7(0x166)]=0x1]=_0x71f2d7(0x166),_0x26871d[_0x26871d[_0x71f2d7(0x15a)]=0x2]=_0x71f2d7(0x15a),_0x26871d[_0x26871d[_0x71f2d7(0x16b)]=0x3]=_0x71f2d7(0x16b),_0x26871d[_0x26871d[_0x71f2d7(0x167)]=0x4]=_0x71f2d7(0x167),_0x26871d[_0x26871d['Solve']=0x5]=_0x71f2d7(0x13c),_0x26871d[_0x26871d[_0x71f2d7(0x192)]=-0x1]=_0x71f2d7(0x192),_0x26871d))(v||{});const y=_0x4296bd=>_0x56b0b9(new Date(+_0x4296bd))[_0x71f2d7(0x149)](_0x71f2d7(0x146)),B=async(_0x1ac44e,_0x4198a7)=>{const _0x5c3ae5=_0x71f2d7,_0x3ac77b=_0x1ac44e[_0x5c3ae5(0x179)](_0x49c7ce),_0x2b1578=_0x1ac44e[_0x5c3ae5(0x179)](_0x15440e);_0x4198a7['forEach'](_0x1286b8=>{const _0x26abe=_0x5c3ae5;_0x3ac77b['getUser'](_0x1286b8)&&_0x4198a7[_0x26abe(0x164)](_0x1286b8);}),_0x4198a7['size']&&(await _0x2b1578[_0x5c3ae5(0x179)](_0x5c3ae5(0x173),{'params':{'userIDs':[..._0x4198a7]}}))['body'][_0x5c3ae5(0x141)]['forEach'](_0xe61910=>{const _0x136b5b=_0x5c3ae5;_0xe61910&&_0x3ac77b[_0x136b5b(0x14a)](_0xe61910);});};var K=Object[_0x71f2d7(0x177)],V=(_0x1d4c36,_0x52bff5,_0x2de957,_0xfd6f4c)=>{const _0x5bd90d=_0x71f2d7;for(var _0x4ac7ea=_0xfd6f4c>0x1?void 0x0:_0xfd6f4c?K(_0x52bff5,_0x2de957):_0x52bff5,_0x1f51ba=_0x1d4c36[_0x5bd90d(0x162)]-0x1,_0x2707df;_0x1f51ba>=0x0;_0x1f51ba--)(_0x2707df=_0x1d4c36[_0x1f51ba])&&(_0x4ac7ea=_0x2707df(_0x4ac7ea)||_0x4ac7ea);return _0x4ac7ea;},p=(_0x5bfa55,_0x5a8f58)=>(_0x23f223,_0x3f5dda)=>_0x5a8f58(_0x23f223,_0x3f5dda,_0x5bfa55);function _0x57eb(_0x1136d5,_0xda6e82){_0x1136d5=_0x1136d5-0x135;const _0x26806f=_0x2680();let _0x57ebbc=_0x26806f[_0x1136d5];return _0x57ebbc;}let _=class extends _0x29e1ca{constructor(_0xe091b8,_0x26fd23,_0x3baac5,_0x33652c){const _0x3fdb7f=_0x71f2d7;super(),this['_commentService']=_0xe091b8,this[_0x3fdb7f(0x194)]=_0x26fd23,this['_userService']=_0x3baac5,this[_0x3fdb7f(0x144)]=_0x33652c,this[_0x3fdb7f(0x14f)](),this[_0x3fdb7f(0x13e)]();}[_0x71f2d7(0x13e)](){const _0x416183=_0x71f2d7;this[_0x416183(0x14d)](this[_0x416183(0x194)][_0x416183(0x16d)]['pipe'](_0x3508e9(0x10))[_0x416183(0x17f)](_0x1ee22a=>{const _0x561f50=_0x416183,_0x264331=new Set();_0x1ee22a[_0x561f50(0x196)](_0x1ba53c=>{const _0x3d3925=_0x561f50;switch(_0x1ba53c['type']){case _0x3d3925(0x18a):{const _0x1ca1e8=_0x1ba53c[_0x3d3925(0x178)][_0x3d3925(0x14e)];_0x264331[_0x3d3925(0x18a)](_0x1ca1e8);break;}}}),B(this['_injector'],_0x264331);}));}[_0x71f2d7(0x14f)](){const _0xb9b1b1=_0x71f2d7;this[_0xb9b1b1(0x14d)](this[_0xb9b1b1(0x14b)]['commentUpdate$'][_0xb9b1b1(0x17f)](async _0x1c8959=>{const _0x1c3d0c=_0xb9b1b1;var _0x1083d4,_0x13f867,_0x4e51cb,_0x4a91a2;const _0x45b154=(_0x1083d4=this[_0x1c3d0c(0x194)]['getUnit'](_0x1c8959['unitId'])['find'](_0x48a8be=>_0x48a8be[_0x1c3d0c(0x138)]===_0x1c8959[_0x1c3d0c(0x138)]))==null?void 0x0:_0x1083d4[_0x1c3d0c(0x186)];if(!_0x45b154)return;const {unitId:_0xaf9cca,subUnitId:_0x3413ef}=_0x45b154;switch(_0x1c8959['user']&&this[_0x1c3d0c(0x157)]['addUser'](_0x1c8959[_0x1c3d0c(0x171)]),_0x1c8959[_0x1c3d0c(0x18b)]){case v['Add']:break;case v[_0x1c3d0c(0x15a)]:{this['_threadCommentModel'][_0x1c3d0c(0x154)](_0xaf9cca,_0x3413ef,{'unitId':_0xaf9cca,'subUnitId':_0x3413ef,'ref':'','id':_0x1c8959[_0x1c3d0c(0x13b)],'dT':y(+_0x1c8959[_0x1c3d0c(0x143)]),'threadId':_0x1c8959[_0x1c3d0c(0x138)],'personId':(_0x4e51cb=(_0x13f867=_0x1c8959[_0x1c3d0c(0x171)])==null?void 0x0:_0x13f867[_0x1c3d0c(0x15e)])!=null?_0x4e51cb:_0x1c8959[_0x1c3d0c(0x170)],'text':JSON['parse'](_0x1c8959[_0x1c3d0c(0x190)]),'parentId':_0x45b154['id']});break;}case v[_0x1c3d0c(0x167)]:{const _0x4db363=this[_0x1c3d0c(0x194)][_0x1c3d0c(0x156)](_0xaf9cca,_0x3413ef,_0x1c8959['replyId']);_0x4db363&&_0x4db363[_0x1c3d0c(0x163)]&&this[_0x1c3d0c(0x194)]['deleteComment'](_0xaf9cca,_0x3413ef,_0x1c8959[_0x1c3d0c(0x13b)]);break;}case v[_0x1c3d0c(0x16b)]:{this[_0x1c3d0c(0x194)][_0x1c3d0c(0x15c)](_0xaf9cca,_0x3413ef,{'commentId':_0x1c8959['replyId'],'text':JSON['parse'](_0x1c8959[_0x1c3d0c(0x190)])});break;}case v[_0x1c3d0c(0x13c)]:{const _0x5549a1=(_0x4a91a2=this[_0x1c3d0c(0x194)][_0x1c3d0c(0x174)](_0x1c8959['unitId'])[_0x1c3d0c(0x151)](_0x93216c=>_0x93216c[_0x1c3d0c(0x138)]===_0x1c8959[_0x1c3d0c(0x138)]))==null?void 0x0:_0x4a91a2[_0x1c3d0c(0x186)];_0x5549a1&&this[_0x1c3d0c(0x194)][_0x1c3d0c(0x140)](_0xaf9cca,_0x3413ef,_0x5549a1['id'],_0x1c8959['solved']===I[_0x1c3d0c(0x188)]);break;}}}));}};_=V([p(0x0,_0x4b8dfe(_0x23ec2c)),p(0x1,_0x4b8dfe(_0x2dcc4e)),p(0x2,_0x4b8dfe(_0x49c7ce)),p(0x3,_0x4b8dfe(_0x1eebbd))],_);const z=_0x71f2d7(0x135),O={};var k=Object[_0x71f2d7(0x177)],Q=(_0x3d60bc,_0x493938,_0x136973,_0x1d93f6)=>{const _0x3369e1=_0x71f2d7;for(var _0x517063=_0x1d93f6>0x1?void 0x0:_0x1d93f6?k(_0x493938,_0x136973):_0x493938,_0x188461=_0x3d60bc[_0x3369e1(0x162)]-0x1,_0x40d2e8;_0x188461>=0x0;_0x188461--)(_0x40d2e8=_0x3d60bc[_0x188461])&&(_0x517063=_0x40d2e8(_0x517063)||_0x517063);return _0x517063;},b=(_0x35691c,_0x67caae)=>(_0x2ee21b,_0x17d4a1)=>_0x67caae(_0x2ee21b,_0x17d4a1,_0x35691c);function X(_0x59ab06,_0x4cc334){const _0x4457af=_0x71f2d7,_0x5e5dc6=_0x59ab06[_0x4457af(0x160)][0x0];return{..._0x4cc334,'id':_0x5e5dc6[_0x4457af(0x13b)],'resolved':_0x59ab06[_0x4457af(0x17c)]===0x1,'dT':y(_0x5e5dc6[_0x4457af(0x143)]),'personId':_0x5e5dc6['userId'],'threadId':_0x5e5dc6[_0x4457af(0x138)]};}function ee(_0x2267d7,_0x4f4b41,_0x39b43d){const _0x3b5123=_0x71f2d7;var _0x30f74c,_0x206827;if(((_0x206827=(_0x30f74c=_0x2267d7==null?void 0x0:_0x2267d7[_0x3b5123(0x160)])==null?void 0x0:_0x30f74c[_0x3b5123(0x162)])!=null?_0x206827:0x0)>0x0){const _0x13066a=(_0x15f570,_0x301025)=>({'id':_0x15f570[_0x3b5123(0x13b)],'threadId':_0x15f570['threadId'],'dT':y(_0x15f570[_0x3b5123(0x143)]),'personId':_0x15f570[_0x3b5123(0x170)],'resolved':_0x2267d7[_0x3b5123(0x17c)]===I['Solved'],'unitId':_0x4f4b41,'subUnitId':_0x39b43d,'text':JSON[_0x3b5123(0x182)](_0x15f570['content']),'parentId':_0x301025}),_0x15e419=_0x13066a(_0x2267d7[_0x3b5123(0x160)][0x0]);return{..._0x15e419,'children':_0x2267d7[_0x3b5123(0x160)][_0x3b5123(0x165)](0x1)[_0x3b5123(0x187)](_0x35e611=>_0x13066a(_0x35e611,_0x15e419['id']))};}return null;}let S=class{constructor(_0x25f792,_0x849e6d,_0x39f288){const _0x8e49be=_0x71f2d7;this[_0x8e49be(0x193)]=_0x25f792,this[_0x8e49be(0x157)]=_0x849e6d,this[_0x8e49be(0x15d)]=_0x39f288;}async[_0x71f2d7(0x154)](_0x242c98){const _0xa5f463=_0x71f2d7;var _0x38accf,_0x353f16;const {parentId:_0x2a7630,unitId:_0x497fec,text:_0xf6a2ce,threadId:_0x195cc2}=_0x242c98,_0x295059=(_0x353f16=(_0x38accf=_0xf6a2ce[_0xa5f463(0x155)])==null?void 0x0:_0x38accf['filter'](_0xcf57df=>_0xcf57df['rangeType']===_0x33e38f[_0xa5f463(0x153)])[_0xa5f463(0x187)](_0x5a3db7=>_0x5a3db7[_0xa5f463(0x142)]))!=null?_0x353f16:[],_0x426211=JSON['stringify'](_0xf6a2ce),_0x29028c=(await this[_0xa5f463(0x15d)][_0xa5f463(0x161)](_0x497fec))[_0xa5f463(0x181)]();if(_0x2a7630){const _0x1e955a={'memberId':_0x29028c,'unitId':_0x497fec,'content':_0x426211,'mention':_0x295059,'threadId':_0x195cc2},_0x1cbd27=(await this['_httpService'][_0xa5f463(0x197)]('/universer-api/comment/unit/'+_0x497fec+_0xa5f463(0x137),{'body':_0x1e955a}))[_0xa5f463(0x14c)]['reply'];return{..._0x242c98,'id':_0x1cbd27[_0xa5f463(0x13b)],'dT':_0x56b0b9(+_0x1cbd27[_0xa5f463(0x143)])[_0xa5f463(0x149)](_0xa5f463(0x146)),'personId':_0x1cbd27['userId']};}else{const _0x416382={'memberId':_0x29028c,'unitId':_0x497fec,'content':_0x426211,'mention':_0x295059},_0x64dbf6=await this['_httpService'][_0xa5f463(0x197)](_0xa5f463(0x18f)+_0x497fec+'/add',{'body':_0x416382});return X(_0x64dbf6[_0xa5f463(0x14c)][_0xa5f463(0x168)],_0x242c98);}}async[_0x71f2d7(0x15c)](_0x5b8b9a){const _0x405343=_0x71f2d7;var _0x34842a,_0x430f73;const {text:_0x9d1f6d,unitId:_0x2cf297}=_0x5b8b9a,_0x4e7979=(_0x430f73=(_0x34842a=_0x9d1f6d[_0x405343(0x155)])==null?void 0x0:_0x34842a[_0x405343(0x15b)](_0x3ad844=>_0x3ad844[_0x405343(0x175)]===_0x33e38f[_0x405343(0x153)])['map'](_0xce2b6b=>_0xce2b6b[_0x405343(0x142)]))!=null?_0x430f73:[],_0x1b0ac6=JSON[_0x405343(0x13d)](_0x9d1f6d),_0x5616c4=_0x5b8b9a[_0x405343(0x138)],_0x35d6b2=_0x5b8b9a['id'],_0x52df02={'memberId':(await this[_0x405343(0x15d)]['requireSession'](_0x2cf297))[_0x405343(0x181)](),'unitId':_0x2cf297,'threadId':_0x5616c4,'mention':_0x4e7979,'content':_0x1b0ac6,'replyId':_0x35d6b2},_0x4baeac=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2cf297+'/edit',{'body':_0x52df02});return!_0x4baeac[_0x405343(0x14c)][_0x405343(0x147)]||_0x4baeac[_0x405343(0x14c)][_0x405343(0x147)]['code']===0x1;}async['resolveComment'](_0x33443c){const _0x1bf878=_0x71f2d7,{unitId:_0x1eafff}=_0x33443c,_0x28978b=_0x33443c[_0x1bf878(0x138)],_0x24b380={'memberId':this[_0x1bf878(0x157)][_0x1bf878(0x180)]()[_0x1bf878(0x15e)],'unitId':_0x1eafff,'threadId':_0x28978b,'solved':_0x33443c[_0x1bf878(0x17d)]?I[_0x1bf878(0x188)]:I[_0x1bf878(0x185)]},_0x55081b=await this[_0x1bf878(0x193)][_0x1bf878(0x197)](_0x1bf878(0x18f)+_0x1eafff+_0x1bf878(0x17a),{'body':_0x24b380});return!_0x55081b[_0x1bf878(0x14c)][_0x1bf878(0x147)]||_0x55081b['body'][_0x1bf878(0x147)][_0x1bf878(0x139)]===0x1;}async[_0x71f2d7(0x18c)](_0x4737d2,_0x1f6e83,_0x10f08c,_0x492560){const _0x54d510=_0x71f2d7,_0x1ccf04={'memberId':(await this[_0x54d510(0x15d)][_0x54d510(0x161)](_0x4737d2))[_0x54d510(0x181)](),'threadId':_0x10f08c,'replyId':_0x492560,'unitId':_0x4737d2},_0x2829ca=await this['_httpService'][_0x54d510(0x197)](_0x54d510(0x18f)+_0x4737d2+_0x54d510(0x148),{'body':_0x1ccf04});return!_0x2829ca[_0x54d510(0x14c)]['error']||_0x2829ca[_0x54d510(0x14c)]['error']['code']===0x1;}async[_0x71f2d7(0x16c)](_0x1bf58e,_0x43c086,_0x11e529){const _0x3b4f67=_0x71f2d7,_0x3d576b={'unitId':_0x1bf58e,'threadId':_0x11e529},_0x4f57fa=await this[_0x3b4f67(0x193)][_0x3b4f67(0x197)]('/universer-api/comment/unit/'+_0x1bf58e+_0x3b4f67(0x16a),{'body':_0x3d576b}),_0x12307e=_0x11e529[_0x3b4f67(0x187)](_0x31626e=>ee(_0x4f57fa[_0x3b4f67(0x14c)]['comments'][_0x31626e],_0x1bf58e,_0x43c086))[_0x3b4f67(0x15b)](Boolean);return Object[_0x3b4f67(0x18e)](_0x4f57fa[_0x3b4f67(0x14c)][_0x3b4f67(0x141)])['forEach'](_0x4a9a31=>{const _0x3df9de=_0x3b4f67;this[_0x3df9de(0x157)][_0x3df9de(0x14a)](_0x4a9a31);}),_0x12307e;}['saveCommentToSnapshot'](_0x2422c6){const _0x27c2cc=_0x71f2d7;return{'id':_0x2422c6['id'],'threadId':_0x2422c6[_0x27c2cc(0x138)],'ref':_0x2422c6[_0x27c2cc(0x195)]};}};S=Q([b(0x0,_0x4b8dfe(_0x15440e)),b(0x1,_0x4b8dfe(_0x49c7ce)),b(0x2,_0x4b8dfe(_0x4ead13))],S);var re=Object[_0x71f2d7(0x177)],te=(_0x50bf10,_0x3fdbfc,_0x36687f,_0x289651)=>{const _0x173baa=_0x71f2d7;for(var _0x39cbfb=_0x289651>0x1?void 0x0:_0x289651?re(_0x3fdbfc,_0x36687f):_0x3fdbfc,_0x5a9f7d=_0x50bf10[_0x173baa(0x162)]-0x1,_0x59fe3c;_0x5a9f7d>=0x0;_0x5a9f7d--)(_0x59fe3c=_0x50bf10[_0x5a9f7d])&&(_0x39cbfb=_0x59fe3c(_0x39cbfb)||_0x39cbfb);return _0x39cbfb;},M=(_0x5b7d28,_0x24860d)=>(_0x4551b0,_0x870ee8)=>_0x24860d(_0x4551b0,_0x870ee8,_0x5b7d28);let f=class extends _0x29e1ca{constructor(_0xf65984,_0x4262cc){const _0x412f95=_0x71f2d7;super(),this[_0x412f95(0x169)]=_0xf65984,this[_0x412f95(0x152)]=_0x4262cc,this['_initDataSource']();}[_0x71f2d7(0x13f)](){const _0x4e4d0b=_0x71f2d7;this[_0x4e4d0b(0x169)][_0x4e4d0b(0x16f)]=this['_threadCommentDataSource'],this[_0x4e4d0b(0x169)][_0x4e4d0b(0x184)]=!0x1;}};f=te([M(0x0,_0x3f700d),M(0x1,_0x4b8dfe(S))],f);var se=Object[_0x71f2d7(0x198)],oe=Object[_0x71f2d7(0x177)],ne=(_0x5a2935,_0x1a5f49,_0x2380d7)=>_0x1a5f49 in _0x5a2935?se(_0x5a2935,_0x1a5f49,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2380d7}):_0x5a2935[_0x1a5f49]=_0x2380d7,ie=(_0x42624b,_0x16437a,_0x5817be,_0x2f9234)=>{const _0x257769=_0x71f2d7;for(var _0x20b0cc=_0x2f9234>0x1?void 0x0:_0x2f9234?oe(_0x16437a,_0x5817be):_0x16437a,_0x465cc7=_0x42624b[_0x257769(0x162)]-0x1,_0x51cc57;_0x465cc7>=0x0;_0x465cc7--)(_0x51cc57=_0x42624b[_0x465cc7])&&(_0x20b0cc=_0x51cc57(_0x20b0cc)||_0x20b0cc);return _0x20b0cc;},N=(_0x5ebd8c,_0xf91dba)=>(_0x45e77c,_0x410d4e)=>_0xf91dba(_0x45e77c,_0x410d4e,_0x5ebd8c),$=(_0x3476e5,_0x1d61ca,_0x2345bc)=>ne(_0x3476e5,typeof _0x1d61ca!=_0x71f2d7(0x145)?_0x1d61ca+'':_0x1d61ca,_0x2345bc);let g=class extends _0x39767c{constructor(_0x30c6c8=O,_0x1b0758,_0x4b4e72){const _0x1510e7=_0x71f2d7;super(),this[_0x1510e7(0x150)]=_0x30c6c8,this[_0x1510e7(0x144)]=_0x1b0758,this[_0x1510e7(0x136)]=_0x4b4e72;const {..._0x185bf6}=_0xf97ff9({},O,this[_0x1510e7(0x150)]);this['_configService'][_0x1510e7(0x189)](z,_0x185bf6);}['onStarting'](){const _0x9bf7fb=_0x71f2d7;[[S],[f],[_]][_0x9bf7fb(0x196)](_0x31e914=>{const _0x587ac2=_0x9bf7fb;this[_0x587ac2(0x144)][_0x587ac2(0x18a)](_0x31e914);});}[_0x71f2d7(0x176)](){const _0x2c4b82=_0x71f2d7;this[_0x2c4b82(0x144)][_0x2c4b82(0x179)](f),this[_0x2c4b82(0x144)][_0x2c4b82(0x179)](_);}};$(g,'pluginName',W),$(g,'type',_0x48d0a5[_0x71f2d7(0x158)]),g=ie([_0x296157(_0x228392,_0x33917a,_0x44e499),N(0x1,_0x4b8dfe(_0x1eebbd)),N(0x2,_0x128401)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x291d(_0x16eeaa,_0x471f56){_0x16eeaa=_0x16eeaa-0x1c8;const _0xfc6ad=_0xfc6a();let _0x291d9e=_0xfc6ad[_0x16eeaa];return _0x291d9e;}const _0x478432=_0x291d;(function(_0x37e517,_0x4c7595){const _0x3e35f1=_0x291d,_0x31cd04=_0x37e517();while(!![]){try{const _0x4dba27=-parseInt(_0x3e35f1(0x211))/0x1+parseInt(_0x3e35f1(0x1e2))/0x2+parseInt(_0x3e35f1(0x1ea))/0x3*(-parseInt(_0x3e35f1(0x1d7))/0x4)+parseInt(_0x3e35f1(0x205))/0x5*(-parseInt(_0x3e35f1(0x1e3))/0x6)+parseInt(_0x3e35f1(0x1e0))/0x7*(-parseInt(_0x3e35f1(0x1ef))/0x8)+-parseInt(_0x3e35f1(0x1cf))/0x9+-parseInt(_0x3e35f1(0x229))/0xa*(-parseInt(_0x3e35f1(0x225))/0xb);if(_0x4dba27===_0x4c7595)break;else _0x31cd04['push'](_0x31cd04['shift']());}catch(_0x22f316){_0x31cd04['push'](_0x31cd04['shift']());}}}(_0xfc6a,0xb0da6));import{CommentService as _0x4d6773,CollaborationSessionService as _0x5a5dbc,UniverCollaborationClientPlugin as _0x50e6cf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2390e8}from'@univerjs-pro/license';import{dayjs as _0x145609,UserManagerService as _0x16864d,Inject as _0x36a50d,Injector as _0x30deff,Disposable as _0x7e40e5,CustomRangeType as _0x161914,UniverInstanceType as _0x219303,DependentOn as _0x1eee3d,IConfigService as _0x3ab8b5,Plugin as _0x1d64a2,merge as _0x340d8a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x48dfe6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x30be5c,IThreadCommentDataSourceService as _0x524c21}from'@univerjs/thread-comment';import{bufferTime as _0x2df956}from'rxjs';import{HTTPService as _0x5f1b17}from'@univerjs/network';const W=_0x478432(0x20b);var I=(_0x2a74f8=>(_0x2a74f8[_0x2a74f8['OpenOrReOpen']=0x0]=_0x478432(0x223),_0x2a74f8[_0x2a74f8[_0x478432(0x1d3)]=0x1]=_0x478432(0x1d3),_0x2a74f8[_0x2a74f8[_0x478432(0x1ce)]=-0x1]=_0x478432(0x1ce),_0x2a74f8))(I||{}),v=(_0x30825b=>(_0x30825b[_0x30825b[_0x478432(0x21b)]=0x0]=_0x478432(0x21b),_0x30825b[_0x30825b[_0x478432(0x1ed)]=0x1]=_0x478432(0x1ed),_0x30825b[_0x30825b[_0x478432(0x221)]=0x2]='Reply',_0x30825b[_0x30825b[_0x478432(0x204)]=0x3]=_0x478432(0x204),_0x30825b[_0x30825b[_0x478432(0x217)]=0x4]=_0x478432(0x217),_0x30825b[_0x30825b[_0x478432(0x208)]=0x5]='Solve',_0x30825b[_0x30825b[_0x478432(0x1ce)]=-0x1]='UNRECOGNIZED',_0x30825b))(v||{});const y=_0x394b28=>_0x145609(new Date(+_0x394b28))[_0x478432(0x1c9)](_0x478432(0x214)),B=async(_0x3aed0a,_0x45a551)=>{const _0x31410d=_0x478432,_0x2fbdab=_0x3aed0a[_0x31410d(0x218)](_0x16864d),_0x3afb0b=_0x3aed0a['get'](_0x5f1b17);_0x45a551[_0x31410d(0x1f2)](_0x56a6cf=>{const _0x1d34d6=_0x31410d;_0x2fbdab[_0x1d34d6(0x1e6)](_0x56a6cf)&&_0x45a551[_0x1d34d6(0x1f7)](_0x56a6cf);}),_0x45a551[_0x31410d(0x1fb)]&&(await _0x3afb0b[_0x31410d(0x218)]('/universer-api/user/list',{'params':{'userIDs':[..._0x45a551]}}))['body'][_0x31410d(0x216)][_0x31410d(0x1f2)](_0x127a73=>{const _0x26a5ec=_0x31410d;_0x127a73&&_0x2fbdab[_0x26a5ec(0x1ee)](_0x127a73);});};var K=Object[_0x478432(0x201)],V=(_0x26b37b,_0x540f26,_0xc94a67,_0x30de2b)=>{for(var _0x35391b=_0x30de2b>0x1?void 0x0:_0x30de2b?K(_0x540f26,_0xc94a67):_0x540f26,_0x234b44=_0x26b37b['length']-0x1,_0xa8d190;_0x234b44>=0x0;_0x234b44--)(_0xa8d190=_0x26b37b[_0x234b44])&&(_0x35391b=_0xa8d190(_0x35391b)||_0x35391b);return _0x35391b;},p=(_0x137813,_0x323c9b)=>(_0xb387a3,_0x4082f2)=>_0x323c9b(_0xb387a3,_0x4082f2,_0x137813);let _=class extends _0x7e40e5{constructor(_0x298557,_0x98bd5e,_0x95118f,_0x353d22){const _0x33091c=_0x478432;super(),this[_0x33091c(0x1f6)]=_0x298557,this[_0x33091c(0x220)]=_0x98bd5e,this[_0x33091c(0x209)]=_0x95118f,this[_0x33091c(0x1dc)]=_0x353d22,this[_0x33091c(0x1f3)](),this[_0x33091c(0x22b)]();}[_0x478432(0x22b)](){const _0x1b8dca=_0x478432;this[_0x1b8dca(0x1d0)](this[_0x1b8dca(0x220)]['commentUpdate$']['pipe'](_0x2df956(0x10))[_0x1b8dca(0x1da)](_0x41e402=>{const _0x23e32d=_0x1b8dca,_0x5c9f2f=new Set();_0x41e402[_0x23e32d(0x1f2)](_0x2df846=>{const _0x24cc2d=_0x23e32d;if(_0x2df846[_0x24cc2d(0x1e7)]===_0x24cc2d(0x200)){const _0x27e419=_0x2df846[_0x24cc2d(0x1dd)][_0x24cc2d(0x1e5)];_0x5c9f2f[_0x24cc2d(0x200)](_0x27e419);}}),B(this['_injector'],_0x5c9f2f);}));}[_0x478432(0x1f3)](){const _0x1bf7da=_0x478432;this[_0x1bf7da(0x1d0)](this[_0x1bf7da(0x1f6)][_0x1bf7da(0x1e1)][_0x1bf7da(0x1da)](async _0x39fdf4=>{const _0x3e14fb=_0x1bf7da;var _0x1cf798,_0x47221c,_0x335fce,_0x16efff;const _0x1bda7d=(_0x1cf798=this[_0x3e14fb(0x220)][_0x3e14fb(0x22d)](_0x39fdf4[_0x3e14fb(0x206)])[_0x3e14fb(0x1f9)](_0x169427=>_0x169427[_0x3e14fb(0x20c)]===_0x39fdf4[_0x3e14fb(0x20c)]))==null?void 0x0:_0x1cf798[_0x3e14fb(0x1de)];if(!_0x1bda7d)return;const {unitId:_0x24c76c,subUnitId:_0x2e1e27}=_0x1bda7d;switch(_0x39fdf4['user']&&this['_userService'][_0x3e14fb(0x1ee)](_0x39fdf4['user']),_0x39fdf4[_0x3e14fb(0x1e7)]){case v['Add']:break;case v[_0x3e14fb(0x221)]:{this['_threadCommentModel'][_0x3e14fb(0x207)](_0x24c76c,_0x2e1e27,{'unitId':_0x24c76c,'subUnitId':_0x2e1e27,'ref':'','id':_0x39fdf4[_0x3e14fb(0x20e)],'dT':y(+_0x39fdf4[_0x3e14fb(0x1fc)]),'threadId':_0x39fdf4[_0x3e14fb(0x20c)],'personId':(_0x335fce=(_0x47221c=_0x39fdf4[_0x3e14fb(0x1cb)])==null?void 0x0:_0x47221c[_0x3e14fb(0x210)])!=null?_0x335fce:_0x39fdf4[_0x3e14fb(0x1ec)],'text':JSON['parse'](_0x39fdf4[_0x3e14fb(0x21a)]),'parentId':_0x1bda7d['id']});break;}case v[_0x3e14fb(0x217)]:{const _0x3fd564=this[_0x3e14fb(0x220)][_0x3e14fb(0x1fd)](_0x24c76c,_0x2e1e27,_0x39fdf4['replyId']);_0x3fd564&&_0x3fd564['parentId']&&this[_0x3e14fb(0x220)]['deleteComment'](_0x24c76c,_0x2e1e27,_0x39fdf4[_0x3e14fb(0x20e)]);break;}case v[_0x3e14fb(0x204)]:{this[_0x3e14fb(0x220)]['updateComment'](_0x24c76c,_0x2e1e27,{'commentId':_0x39fdf4[_0x3e14fb(0x20e)],'text':JSON[_0x3e14fb(0x1e8)](_0x39fdf4[_0x3e14fb(0x21a)])});break;}case v[_0x3e14fb(0x208)]:{const _0x4d2a13=(_0x16efff=this['_threadCommentModel']['getUnit'](_0x39fdf4['unitId'])[_0x3e14fb(0x1f9)](_0x20e43a=>_0x20e43a[_0x3e14fb(0x20c)]===_0x39fdf4[_0x3e14fb(0x20c)]))==null?void 0x0:_0x16efff['root'];_0x4d2a13&&this['_threadCommentModel'][_0x3e14fb(0x202)](_0x24c76c,_0x2e1e27,_0x4d2a13['id'],_0x39fdf4[_0x3e14fb(0x1d2)]===I[_0x3e14fb(0x1d3)]);break;}}}));}};_=V([p(0x0,_0x36a50d(_0x4d6773)),p(0x1,_0x36a50d(_0x30be5c)),p(0x2,_0x36a50d(_0x16864d)),p(0x3,_0x36a50d(_0x30deff))],_);const z=_0x478432(0x226),O={};var k=Object[_0x478432(0x201)],Q=(_0x3a10b2,_0x2a637d,_0xb513df,_0x583d84)=>{for(var _0x3a704d=_0x583d84>0x1?void 0x0:_0x583d84?k(_0x2a637d,_0xb513df):_0x2a637d,_0x3cab65=_0x3a10b2['length']-0x1,_0x37d7ed;_0x3cab65>=0x0;_0x3cab65--)(_0x37d7ed=_0x3a10b2[_0x3cab65])&&(_0x3a704d=_0x37d7ed(_0x3a704d)||_0x3a704d);return _0x3a704d;},b=(_0x222663,_0x2b6042)=>(_0x16fb97,_0x440f2d)=>_0x2b6042(_0x16fb97,_0x440f2d,_0x222663);function X(_0x269f7c,_0x4219b3){const _0xd09ddd=_0x478432,_0x518277=_0x269f7c[_0xd09ddd(0x1d9)][0x0];return{..._0x4219b3,'id':_0x518277[_0xd09ddd(0x20e)],'resolved':_0x269f7c[_0xd09ddd(0x1d2)]===0x1,'dT':y(_0x518277[_0xd09ddd(0x1fc)]),'personId':_0x518277['userId'],'threadId':_0x518277[_0xd09ddd(0x20c)]};}function _0xfc6a(){const _0x15c126=['userId','Add','addUser','8qAZwdW','requireSession','/delete','forEach','_init','updateComment','getMemberID','_commentService','delete','saveCommentToSnapshot','find','_configService','size','createTimestamp','getComment','onStarting','error','add','getOwnPropertyDescriptor','resolveComment','comments','Edit','6662050KyTSdr','unitId','addComment','Solve','_userService','post','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','threadId','setConfig','replyId','COMMENT','userID','1188182dEEUZD','_initDataSource','body','YYYY/MM/DD\x20HH:mm','_config','users','Delete','get','_sessionService','content','Unknown','customRanges','rangeType','filter','symbol','_threadCommentModel','Reply','/solved','OpenOrReOpen','stringify','59796484kAeGrJ','thread-comment-data-source.config','map','getCurrentUser','10pBgWMG','pluginName','_initUserSync','/add','getUnit','onReady','resolved','format','slice','user','/edit','/universer-api/comment/unit/','UNRECOGNIZED','11306610TMfujg','disposeWithMe','/list','solved','Solved','ref','_threadCommentDataSourceService','length','3988lfMWpY','rangeId','replies','subscribe','reply','_injector','payload','root','deleteComment','3222884lOQoRb','commentUpdate$','498924IjFNqv','6ZuuDMP','code','personId','getUser','type','parse','_httpService','2178Ypfbrf','UNIVER_UNKNOWN'];_0xfc6a=function(){return _0x15c126;};return _0xfc6a();}function ee(_0x5716c2,_0x2ca91c,_0x266d9a){const _0x110647=_0x478432;var _0x4f6382,_0x30b0e6;if(((_0x30b0e6=(_0x4f6382=_0x5716c2==null?void 0x0:_0x5716c2[_0x110647(0x1d9)])==null?void 0x0:_0x4f6382[_0x110647(0x1d6)])!=null?_0x30b0e6:0x0)>0x0){const _0xfdbd32=(_0x456fb7,_0x242ac4)=>({'id':_0x456fb7[_0x110647(0x20e)],'threadId':_0x456fb7['threadId'],'dT':y(_0x456fb7['createTimestamp']),'personId':_0x456fb7['userId'],'resolved':_0x5716c2['solved']===I[_0x110647(0x1d3)],'unitId':_0x2ca91c,'subUnitId':_0x266d9a,'text':JSON[_0x110647(0x1e8)](_0x456fb7[_0x110647(0x21a)]),'parentId':_0x242ac4}),_0x56920f=_0xfdbd32(_0x5716c2[_0x110647(0x1d9)][0x0]);return{..._0x56920f,'children':_0x5716c2[_0x110647(0x1d9)][_0x110647(0x1ca)](0x1)['map'](_0x52a59c=>_0xfdbd32(_0x52a59c,_0x56920f['id']))};}return null;}let S=class{constructor(_0x29e923,_0x477422,_0x3e4e0c){const _0xffd692=_0x478432;this[_0xffd692(0x1e9)]=_0x29e923,this['_userService']=_0x477422,this[_0xffd692(0x219)]=_0x3e4e0c;}async['addComment'](_0x284fa2){const _0x5e198a=_0x478432;var _0x55131e,_0x288a44;const {parentId:_0x350fec,unitId:_0xb36757,text:_0x9bd13,threadId:_0x36527b}=_0x284fa2,_0x5e08eb=(_0x288a44=(_0x55131e=_0x9bd13[_0x5e198a(0x21c)])==null?void 0x0:_0x55131e[_0x5e198a(0x21e)](_0x2f4e88=>_0x2f4e88['rangeType']===_0x161914[_0x5e198a(0x20f)])[_0x5e198a(0x227)](_0x43e195=>_0x43e195[_0x5e198a(0x1d8)]))!=null?_0x288a44:[],_0x6ae6c9=JSON[_0x5e198a(0x224)](_0x9bd13),_0x3b16ae=(await this['_sessionService'][_0x5e198a(0x1f0)](_0xb36757))[_0x5e198a(0x1f5)]();if(_0x350fec){const _0x5d2ea4={'memberId':_0x3b16ae,'unitId':_0xb36757,'content':_0x6ae6c9,'mention':_0x5e08eb,'threadId':_0x36527b},_0x37c555=(await this[_0x5e198a(0x1e9)][_0x5e198a(0x20a)]('/universer-api/comment/unit/'+_0xb36757+'/reply',{'body':_0x5d2ea4}))[_0x5e198a(0x213)][_0x5e198a(0x1db)];return{..._0x284fa2,'id':_0x37c555[_0x5e198a(0x20e)],'dT':_0x145609(+_0x37c555[_0x5e198a(0x1fc)])[_0x5e198a(0x1c9)](_0x5e198a(0x214)),'personId':_0x37c555[_0x5e198a(0x1ec)]};}else{const _0x509f3a={'memberId':_0x3b16ae,'unitId':_0xb36757,'content':_0x6ae6c9,'mention':_0x5e08eb},_0xcbf359=await this[_0x5e198a(0x1e9)][_0x5e198a(0x20a)](_0x5e198a(0x1cd)+_0xb36757+_0x5e198a(0x22c),{'body':_0x509f3a});return X(_0xcbf359[_0x5e198a(0x213)]['comment'],_0x284fa2);}}async[_0x478432(0x1f4)](_0x3c8490){const _0x21f060=_0x478432;var _0x5bd9a1,_0x40494b;const {text:_0x594797,unitId:_0x5c4490}=_0x3c8490,_0x130963=(_0x40494b=(_0x5bd9a1=_0x594797[_0x21f060(0x21c)])==null?void 0x0:_0x5bd9a1[_0x21f060(0x21e)](_0x7fe289=>_0x7fe289[_0x21f060(0x21d)]===_0x161914[_0x21f060(0x20f)])['map'](_0x2a384e=>_0x2a384e[_0x21f060(0x1d8)]))!=null?_0x40494b:[],_0x530938=JSON[_0x21f060(0x224)](_0x594797),_0x3d5f05=_0x3c8490[_0x21f060(0x20c)],_0x1f79d7=_0x3c8490['id'],_0x35f684={'memberId':(await this['_sessionService']['requireSession'](_0x5c4490))[_0x21f060(0x1f5)](),'unitId':_0x5c4490,'threadId':_0x3d5f05,'mention':_0x130963,'content':_0x530938,'replyId':_0x1f79d7},_0x40a287=await this[_0x21f060(0x1e9)][_0x21f060(0x20a)](_0x21f060(0x1cd)+_0x5c4490+_0x21f060(0x1cc),{'body':_0x35f684});return!_0x40a287['body'][_0x21f060(0x1ff)]||_0x40a287['body']['error'][_0x21f060(0x1e4)]===0x1;}async[_0x478432(0x202)](_0x2bc9ca){const _0x3e7dc6=_0x478432,{unitId:_0x1cb1c9}=_0x2bc9ca,_0x160e50=_0x2bc9ca[_0x3e7dc6(0x20c)],_0x4e7359={'memberId':this[_0x3e7dc6(0x209)][_0x3e7dc6(0x228)]()[_0x3e7dc6(0x210)],'unitId':_0x1cb1c9,'threadId':_0x160e50,'solved':_0x2bc9ca[_0x3e7dc6(0x1c8)]?I[_0x3e7dc6(0x1d3)]:I['OpenOrReOpen']},_0x26e0d7=await this[_0x3e7dc6(0x1e9)][_0x3e7dc6(0x20a)](_0x3e7dc6(0x1cd)+_0x1cb1c9+_0x3e7dc6(0x222),{'body':_0x4e7359});return!_0x26e0d7[_0x3e7dc6(0x213)]['error']||_0x26e0d7['body'][_0x3e7dc6(0x1ff)][_0x3e7dc6(0x1e4)]===0x1;}async[_0x478432(0x1df)](_0x18e33e,_0x758322,_0x2d0d76,_0xe69b7){const _0x1fb194=_0x478432,_0x3470da={'memberId':(await this['_sessionService'][_0x1fb194(0x1f0)](_0x18e33e))[_0x1fb194(0x1f5)](),'threadId':_0x2d0d76,'replyId':_0xe69b7,'unitId':_0x18e33e},_0x50da42=await this[_0x1fb194(0x1e9)]['post'](_0x1fb194(0x1cd)+_0x18e33e+_0x1fb194(0x1f1),{'body':_0x3470da});return!_0x50da42[_0x1fb194(0x213)][_0x1fb194(0x1ff)]||_0x50da42[_0x1fb194(0x213)]['error'][_0x1fb194(0x1e4)]===0x1;}async['listComments'](_0xbaa23,_0x30c73c,_0x4bcd9c){const _0xc6ccde=_0x478432,_0x5ce3b2={'unitId':_0xbaa23,'threadId':_0x4bcd9c},_0x38ab59=await this[_0xc6ccde(0x1e9)][_0xc6ccde(0x20a)](_0xc6ccde(0x1cd)+_0xbaa23+_0xc6ccde(0x1d1),{'body':_0x5ce3b2}),_0x3c6159=_0x4bcd9c['map'](_0x5bd884=>ee(_0x38ab59[_0xc6ccde(0x213)][_0xc6ccde(0x203)][_0x5bd884],_0xbaa23,_0x30c73c))[_0xc6ccde(0x21e)](Boolean);return Object['values'](_0x38ab59[_0xc6ccde(0x213)][_0xc6ccde(0x216)])['forEach'](_0x30d9e7=>{this['_userService']['addUser'](_0x30d9e7);}),_0x3c6159;}[_0x478432(0x1f8)](_0x491c13){const _0x41fef4=_0x478432;return{'id':_0x491c13['id'],'threadId':_0x491c13[_0x41fef4(0x20c)],'ref':_0x491c13[_0x41fef4(0x1d4)]};}};S=Q([b(0x0,_0x36a50d(_0x5f1b17)),b(0x1,_0x36a50d(_0x16864d)),b(0x2,_0x36a50d(_0x5a5dbc))],S);var re=Object[_0x478432(0x201)],te=(_0xe5c866,_0x4f02ff,_0x4ab25a,_0x201543)=>{const _0x59a080=_0x478432;for(var _0x342ca9=_0x201543>0x1?void 0x0:_0x201543?re(_0x4f02ff,_0x4ab25a):_0x4f02ff,_0x47fce7=_0xe5c866[_0x59a080(0x1d6)]-0x1,_0x4a0c49;_0x47fce7>=0x0;_0x47fce7--)(_0x4a0c49=_0xe5c866[_0x47fce7])&&(_0x342ca9=_0x4a0c49(_0x342ca9)||_0x342ca9);return _0x342ca9;},M=(_0x2d0d4b,_0x16f7e5)=>(_0x1f4a48,_0x3362d3)=>_0x16f7e5(_0x1f4a48,_0x3362d3,_0x2d0d4b);let f=class extends _0x7e40e5{constructor(_0x37594e,_0x42b1ea){const _0x394424=_0x478432;super(),this[_0x394424(0x1d5)]=_0x37594e,this['_threadCommentDataSource']=_0x42b1ea,this[_0x394424(0x212)]();}[_0x478432(0x212)](){const _0x152f0c=_0x478432;this[_0x152f0c(0x1d5)]['dataSource']=this['_threadCommentDataSource'],this[_0x152f0c(0x1d5)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x524c21),M(0x1,_0x36a50d(S))],f);var se=Object['defineProperty'],oe=Object[_0x478432(0x201)],ne=(_0x1874eb,_0x51500a,_0x4535bf)=>_0x51500a in _0x1874eb?se(_0x1874eb,_0x51500a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4535bf}):_0x1874eb[_0x51500a]=_0x4535bf,ie=(_0x153cb8,_0x315489,_0x4c560f,_0x4ce1cb)=>{for(var _0x11002e=_0x4ce1cb>0x1?void 0x0:_0x4ce1cb?oe(_0x315489,_0x4c560f):_0x315489,_0x24ee2e=_0x153cb8['length']-0x1,_0x4fc23e;_0x24ee2e>=0x0;_0x24ee2e--)(_0x4fc23e=_0x153cb8[_0x24ee2e])&&(_0x11002e=_0x4fc23e(_0x11002e)||_0x11002e);return _0x11002e;},N=(_0x58b67f,_0x4a5cfb)=>(_0x52f128,_0x26a9cb)=>_0x4a5cfb(_0x52f128,_0x26a9cb,_0x58b67f),$=(_0xcfc9e9,_0x338f40,_0x1396f5)=>ne(_0xcfc9e9,typeof _0x338f40!=_0x478432(0x21f)?_0x338f40+'':_0x338f40,_0x1396f5);let g=class extends _0x1d64a2{constructor(_0x162844=O,_0x1eb126,_0x140a24){const _0x5e08d2=_0x478432;super(),this[_0x5e08d2(0x215)]=_0x162844,this['_injector']=_0x1eb126,this[_0x5e08d2(0x1fa)]=_0x140a24;const {..._0x32578e}=_0x340d8a({},O,this['_config']);this[_0x5e08d2(0x1fa)][_0x5e08d2(0x20d)](z,_0x32578e);}[_0x478432(0x1fe)](){const _0x4ac928=_0x478432;[[S],[f],[_]][_0x4ac928(0x1f2)](_0x2d1d6d=>{const _0x1e630e=_0x4ac928;this['_injector'][_0x1e630e(0x200)](_0x2d1d6d);});}[_0x478432(0x22e)](){const _0x5006bd=_0x478432;this[_0x5006bd(0x1dc)]['get'](f),this[_0x5006bd(0x1dc)][_0x5006bd(0x218)](_);}};$(g,_0x478432(0x22a),W),$(g,_0x478432(0x1e7),_0x219303[_0x478432(0x1eb)]),g=ie([_0x1eee3d(_0x48dfe6,_0x50e6cf,_0x2390e8),N(0x1,_0x36a50d(_0x30deff)),N(0x2,_0x3ab8b5)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x71f2d7=_0x57eb;(function(_0x21d274,_0x5b5f29){const _0x210c0f=_0x57eb,_0x4c60a5=_0x21d274();while(!![]){try{const _0x41e4b2=-parseInt(_0x210c0f(0x13a))/0x1+-parseInt(_0x210c0f(0x17e))/0x2*(-parseInt(_0x210c0f(0x183))/0x3)+-parseInt(_0x210c0f(0x16e))/0x4+parseInt(_0x210c0f(0x18d))/0x5+-parseInt(_0x210c0f(0x172))/0x6+parseInt(_0x210c0f(0x17b))/0x7+-parseInt(_0x210c0f(0x15f))/0x8*(-parseInt(_0x210c0f(0x191))/0x9);if(_0x41e4b2===_0x5b5f29)break;else _0x4c60a5['push'](_0x4c60a5['shift']());}catch(_0x38ab9d){_0x4c60a5['push'](_0x4c60a5['shift']());}}}(_0x2680,0x5a759));import{CommentService as _0x23ec2c,CollaborationSessionService as _0x4ead13,UniverCollaborationClientPlugin as _0x33917a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x44e499}from'@univerjs-pro/license';import{dayjs as _0x56b0b9,UserManagerService as _0x49c7ce,Inject as _0x4b8dfe,Injector as _0x1eebbd,Disposable as _0x29e1ca,CustomRangeType as _0x33e38f,UniverInstanceType as _0x48d0a5,DependentOn as _0x296157,IConfigService as _0x128401,Plugin as _0x39767c,merge as _0xf97ff9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x228392}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2dcc4e,IThreadCommentDataSourceService as _0x3f700d}from'@univerjs/thread-comment';function _0x2680(){const _0x5cfac5=['/universer-api/comment/unit/','content','3339189KczdwP','UNRECOGNIZED','_httpService','_threadCommentModel','ref','forEach','post','defineProperty','thread-comment-data-source.config','_configService','/reply','threadId','code','165751IbCFzR','replyId','Solve','stringify','_initUserSync','_initDataSource','resolveComment','users','rangeId','createTimestamp','_injector','symbol','YYYY/MM/DD\x20HH:mm','error','/delete','format','addUser','_commentService','body','disposeWithMe','personId','_init','_config','find','_threadCommentDataSource','COMMENT','addComment','customRanges','getComment','_userService','UNIVER_UNKNOWN','Unknown','Reply','filter','updateComment','_sessionService','userID','8HWPjIc','replies','requireSession','length','parentId','delete','slice','Add','Delete','comment','_threadCommentDataSourceService','/list','Edit','listComments','commentUpdate$','1633040Iufwuz','dataSource','userId','user','3930714jnCjRk','/universer-api/user/list','getUnit','rangeType','onReady','getOwnPropertyDescriptor','payload','get','/solved','2344671phmOhH','solved','resolved','2ojgqBx','subscribe','getCurrentUser','getMemberID','parse','1013406tPGfzb','syncUpdateMutationToColla','OpenOrReOpen','root','map','Solved','setConfig','add','type','deleteComment','2779375YZfdKo','values'];_0x2680=function(){return _0x5cfac5;};return _0x2680();}import{bufferTime as _0x3508e9}from'rxjs';import{HTTPService as _0x15440e}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x56fc1d=>(_0x56fc1d[_0x56fc1d['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x56fc1d[_0x56fc1d[_0x71f2d7(0x188)]=0x1]=_0x71f2d7(0x188),_0x56fc1d[_0x56fc1d[_0x71f2d7(0x192)]=-0x1]=_0x71f2d7(0x192),_0x56fc1d))(I||{}),v=(_0x26871d=>(_0x26871d[_0x26871d[_0x71f2d7(0x159)]=0x0]=_0x71f2d7(0x159),_0x26871d[_0x26871d[_0x71f2d7(0x166)]=0x1]=_0x71f2d7(0x166),_0x26871d[_0x26871d[_0x71f2d7(0x15a)]=0x2]=_0x71f2d7(0x15a),_0x26871d[_0x26871d[_0x71f2d7(0x16b)]=0x3]=_0x71f2d7(0x16b),_0x26871d[_0x26871d[_0x71f2d7(0x167)]=0x4]=_0x71f2d7(0x167),_0x26871d[_0x26871d['Solve']=0x5]=_0x71f2d7(0x13c),_0x26871d[_0x26871d[_0x71f2d7(0x192)]=-0x1]=_0x71f2d7(0x192),_0x26871d))(v||{});const y=_0x4296bd=>_0x56b0b9(new Date(+_0x4296bd))[_0x71f2d7(0x149)](_0x71f2d7(0x146)),B=async(_0x1ac44e,_0x4198a7)=>{const _0x5c3ae5=_0x71f2d7,_0x3ac77b=_0x1ac44e[_0x5c3ae5(0x179)](_0x49c7ce),_0x2b1578=_0x1ac44e[_0x5c3ae5(0x179)](_0x15440e);_0x4198a7['forEach'](_0x1286b8=>{const _0x26abe=_0x5c3ae5;_0x3ac77b['getUser'](_0x1286b8)&&_0x4198a7[_0x26abe(0x164)](_0x1286b8);}),_0x4198a7['size']&&(await _0x2b1578[_0x5c3ae5(0x179)](_0x5c3ae5(0x173),{'params':{'userIDs':[..._0x4198a7]}}))['body'][_0x5c3ae5(0x141)]['forEach'](_0xe61910=>{const _0x136b5b=_0x5c3ae5;_0xe61910&&_0x3ac77b[_0x136b5b(0x14a)](_0xe61910);});};var K=Object[_0x71f2d7(0x177)],V=(_0x1d4c36,_0x52bff5,_0x2de957,_0xfd6f4c)=>{const _0x5bd90d=_0x71f2d7;for(var _0x4ac7ea=_0xfd6f4c>0x1?void 0x0:_0xfd6f4c?K(_0x52bff5,_0x2de957):_0x52bff5,_0x1f51ba=_0x1d4c36[_0x5bd90d(0x162)]-0x1,_0x2707df;_0x1f51ba>=0x0;_0x1f51ba--)(_0x2707df=_0x1d4c36[_0x1f51ba])&&(_0x4ac7ea=_0x2707df(_0x4ac7ea)||_0x4ac7ea);return _0x4ac7ea;},p=(_0x5bfa55,_0x5a8f58)=>(_0x23f223,_0x3f5dda)=>_0x5a8f58(_0x23f223,_0x3f5dda,_0x5bfa55);function _0x57eb(_0x1136d5,_0xda6e82){_0x1136d5=_0x1136d5-0x135;const _0x26806f=_0x2680();let _0x57ebbc=_0x26806f[_0x1136d5];return _0x57ebbc;}let _=class extends _0x29e1ca{constructor(_0xe091b8,_0x26fd23,_0x3baac5,_0x33652c){const _0x3fdb7f=_0x71f2d7;super(),this['_commentService']=_0xe091b8,this[_0x3fdb7f(0x194)]=_0x26fd23,this['_userService']=_0x3baac5,this[_0x3fdb7f(0x144)]=_0x33652c,this[_0x3fdb7f(0x14f)](),this[_0x3fdb7f(0x13e)]();}[_0x71f2d7(0x13e)](){const _0x416183=_0x71f2d7;this[_0x416183(0x14d)](this[_0x416183(0x194)][_0x416183(0x16d)]['pipe'](_0x3508e9(0x10))[_0x416183(0x17f)](_0x1ee22a=>{const _0x561f50=_0x416183,_0x264331=new Set();_0x1ee22a[_0x561f50(0x196)](_0x1ba53c=>{const _0x3d3925=_0x561f50;switch(_0x1ba53c['type']){case _0x3d3925(0x18a):{const _0x1ca1e8=_0x1ba53c[_0x3d3925(0x178)][_0x3d3925(0x14e)];_0x264331[_0x3d3925(0x18a)](_0x1ca1e8);break;}}}),B(this['_injector'],_0x264331);}));}[_0x71f2d7(0x14f)](){const _0xb9b1b1=_0x71f2d7;this[_0xb9b1b1(0x14d)](this[_0xb9b1b1(0x14b)]['commentUpdate$'][_0xb9b1b1(0x17f)](async _0x1c8959=>{const _0x1c3d0c=_0xb9b1b1;var _0x1083d4,_0x13f867,_0x4e51cb,_0x4a91a2;const _0x45b154=(_0x1083d4=this[_0x1c3d0c(0x194)]['getUnit'](_0x1c8959['unitId'])['find'](_0x48a8be=>_0x48a8be[_0x1c3d0c(0x138)]===_0x1c8959[_0x1c3d0c(0x138)]))==null?void 0x0:_0x1083d4[_0x1c3d0c(0x186)];if(!_0x45b154)return;const {unitId:_0xaf9cca,subUnitId:_0x3413ef}=_0x45b154;switch(_0x1c8959['user']&&this[_0x1c3d0c(0x157)]['addUser'](_0x1c8959[_0x1c3d0c(0x171)]),_0x1c8959[_0x1c3d0c(0x18b)]){case v['Add']:break;case v[_0x1c3d0c(0x15a)]:{this['_threadCommentModel'][_0x1c3d0c(0x154)](_0xaf9cca,_0x3413ef,{'unitId':_0xaf9cca,'subUnitId':_0x3413ef,'ref':'','id':_0x1c8959[_0x1c3d0c(0x13b)],'dT':y(+_0x1c8959[_0x1c3d0c(0x143)]),'threadId':_0x1c8959[_0x1c3d0c(0x138)],'personId':(_0x4e51cb=(_0x13f867=_0x1c8959[_0x1c3d0c(0x171)])==null?void 0x0:_0x13f867[_0x1c3d0c(0x15e)])!=null?_0x4e51cb:_0x1c8959[_0x1c3d0c(0x170)],'text':JSON['parse'](_0x1c8959[_0x1c3d0c(0x190)]),'parentId':_0x45b154['id']});break;}case v[_0x1c3d0c(0x167)]:{const _0x4db363=this[_0x1c3d0c(0x194)][_0x1c3d0c(0x156)](_0xaf9cca,_0x3413ef,_0x1c8959['replyId']);_0x4db363&&_0x4db363[_0x1c3d0c(0x163)]&&this[_0x1c3d0c(0x194)]['deleteComment'](_0xaf9cca,_0x3413ef,_0x1c8959[_0x1c3d0c(0x13b)]);break;}case v[_0x1c3d0c(0x16b)]:{this[_0x1c3d0c(0x194)][_0x1c3d0c(0x15c)](_0xaf9cca,_0x3413ef,{'commentId':_0x1c8959['replyId'],'text':JSON['parse'](_0x1c8959[_0x1c3d0c(0x190)])});break;}case v[_0x1c3d0c(0x13c)]:{const _0x5549a1=(_0x4a91a2=this[_0x1c3d0c(0x194)][_0x1c3d0c(0x174)](_0x1c8959['unitId'])[_0x1c3d0c(0x151)](_0x93216c=>_0x93216c[_0x1c3d0c(0x138)]===_0x1c8959[_0x1c3d0c(0x138)]))==null?void 0x0:_0x4a91a2[_0x1c3d0c(0x186)];_0x5549a1&&this[_0x1c3d0c(0x194)][_0x1c3d0c(0x140)](_0xaf9cca,_0x3413ef,_0x5549a1['id'],_0x1c8959['solved']===I[_0x1c3d0c(0x188)]);break;}}}));}};_=V([p(0x0,_0x4b8dfe(_0x23ec2c)),p(0x1,_0x4b8dfe(_0x2dcc4e)),p(0x2,_0x4b8dfe(_0x49c7ce)),p(0x3,_0x4b8dfe(_0x1eebbd))],_);const z=_0x71f2d7(0x135),O={};var k=Object[_0x71f2d7(0x177)],Q=(_0x3d60bc,_0x493938,_0x136973,_0x1d93f6)=>{const _0x3369e1=_0x71f2d7;for(var _0x517063=_0x1d93f6>0x1?void 0x0:_0x1d93f6?k(_0x493938,_0x136973):_0x493938,_0x188461=_0x3d60bc[_0x3369e1(0x162)]-0x1,_0x40d2e8;_0x188461>=0x0;_0x188461--)(_0x40d2e8=_0x3d60bc[_0x188461])&&(_0x517063=_0x40d2e8(_0x517063)||_0x517063);return _0x517063;},b=(_0x35691c,_0x67caae)=>(_0x2ee21b,_0x17d4a1)=>_0x67caae(_0x2ee21b,_0x17d4a1,_0x35691c);function X(_0x59ab06,_0x4cc334){const _0x4457af=_0x71f2d7,_0x5e5dc6=_0x59ab06[_0x4457af(0x160)][0x0];return{..._0x4cc334,'id':_0x5e5dc6[_0x4457af(0x13b)],'resolved':_0x59ab06[_0x4457af(0x17c)]===0x1,'dT':y(_0x5e5dc6[_0x4457af(0x143)]),'personId':_0x5e5dc6['userId'],'threadId':_0x5e5dc6[_0x4457af(0x138)]};}function ee(_0x2267d7,_0x4f4b41,_0x39b43d){const _0x3b5123=_0x71f2d7;var _0x30f74c,_0x206827;if(((_0x206827=(_0x30f74c=_0x2267d7==null?void 0x0:_0x2267d7[_0x3b5123(0x160)])==null?void 0x0:_0x30f74c[_0x3b5123(0x162)])!=null?_0x206827:0x0)>0x0){const _0x13066a=(_0x15f570,_0x301025)=>({'id':_0x15f570[_0x3b5123(0x13b)],'threadId':_0x15f570['threadId'],'dT':y(_0x15f570[_0x3b5123(0x143)]),'personId':_0x15f570[_0x3b5123(0x170)],'resolved':_0x2267d7[_0x3b5123(0x17c)]===I['Solved'],'unitId':_0x4f4b41,'subUnitId':_0x39b43d,'text':JSON[_0x3b5123(0x182)](_0x15f570['content']),'parentId':_0x301025}),_0x15e419=_0x13066a(_0x2267d7[_0x3b5123(0x160)][0x0]);return{..._0x15e419,'children':_0x2267d7[_0x3b5123(0x160)][_0x3b5123(0x165)](0x1)[_0x3b5123(0x187)](_0x35e611=>_0x13066a(_0x35e611,_0x15e419['id']))};}return null;}let S=class{constructor(_0x25f792,_0x849e6d,_0x39f288){const _0x8e49be=_0x71f2d7;this[_0x8e49be(0x193)]=_0x25f792,this[_0x8e49be(0x157)]=_0x849e6d,this[_0x8e49be(0x15d)]=_0x39f288;}async[_0x71f2d7(0x154)](_0x242c98){const _0xa5f463=_0x71f2d7;var _0x38accf,_0x353f16;const {parentId:_0x2a7630,unitId:_0x497fec,text:_0xf6a2ce,threadId:_0x195cc2}=_0x242c98,_0x295059=(_0x353f16=(_0x38accf=_0xf6a2ce[_0xa5f463(0x155)])==null?void 0x0:_0x38accf['filter'](_0xcf57df=>_0xcf57df['rangeType']===_0x33e38f[_0xa5f463(0x153)])[_0xa5f463(0x187)](_0x5a3db7=>_0x5a3db7[_0xa5f463(0x142)]))!=null?_0x353f16:[],_0x426211=JSON['stringify'](_0xf6a2ce),_0x29028c=(await this[_0xa5f463(0x15d)][_0xa5f463(0x161)](_0x497fec))[_0xa5f463(0x181)]();if(_0x2a7630){const _0x1e955a={'memberId':_0x29028c,'unitId':_0x497fec,'content':_0x426211,'mention':_0x295059,'threadId':_0x195cc2},_0x1cbd27=(await this['_httpService'][_0xa5f463(0x197)]('/universer-api/comment/unit/'+_0x497fec+_0xa5f463(0x137),{'body':_0x1e955a}))[_0xa5f463(0x14c)]['reply'];return{..._0x242c98,'id':_0x1cbd27[_0xa5f463(0x13b)],'dT':_0x56b0b9(+_0x1cbd27[_0xa5f463(0x143)])[_0xa5f463(0x149)](_0xa5f463(0x146)),'personId':_0x1cbd27['userId']};}else{const _0x416382={'memberId':_0x29028c,'unitId':_0x497fec,'content':_0x426211,'mention':_0x295059},_0x64dbf6=await this['_httpService'][_0xa5f463(0x197)](_0xa5f463(0x18f)+_0x497fec+'/add',{'body':_0x416382});return X(_0x64dbf6[_0xa5f463(0x14c)][_0xa5f463(0x168)],_0x242c98);}}async[_0x71f2d7(0x15c)](_0x5b8b9a){const _0x405343=_0x71f2d7;var _0x34842a,_0x430f73;const {text:_0x9d1f6d,unitId:_0x2cf297}=_0x5b8b9a,_0x4e7979=(_0x430f73=(_0x34842a=_0x9d1f6d[_0x405343(0x155)])==null?void 0x0:_0x34842a[_0x405343(0x15b)](_0x3ad844=>_0x3ad844[_0x405343(0x175)]===_0x33e38f[_0x405343(0x153)])['map'](_0xce2b6b=>_0xce2b6b[_0x405343(0x142)]))!=null?_0x430f73:[],_0x1b0ac6=JSON[_0x405343(0x13d)](_0x9d1f6d),_0x5616c4=_0x5b8b9a[_0x405343(0x138)],_0x35d6b2=_0x5b8b9a['id'],_0x52df02={'memberId':(await this[_0x405343(0x15d)]['requireSession'](_0x2cf297))[_0x405343(0x181)](),'unitId':_0x2cf297,'threadId':_0x5616c4,'mention':_0x4e7979,'content':_0x1b0ac6,'replyId':_0x35d6b2},_0x4baeac=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2cf297+'/edit',{'body':_0x52df02});return!_0x4baeac[_0x405343(0x14c)][_0x405343(0x147)]||_0x4baeac[_0x405343(0x14c)][_0x405343(0x147)]['code']===0x1;}async['resolveComment'](_0x33443c){const _0x1bf878=_0x71f2d7,{unitId:_0x1eafff}=_0x33443c,_0x28978b=_0x33443c[_0x1bf878(0x138)],_0x24b380={'memberId':this[_0x1bf878(0x157)][_0x1bf878(0x180)]()[_0x1bf878(0x15e)],'unitId':_0x1eafff,'threadId':_0x28978b,'solved':_0x33443c[_0x1bf878(0x17d)]?I[_0x1bf878(0x188)]:I[_0x1bf878(0x185)]},_0x55081b=await this[_0x1bf878(0x193)][_0x1bf878(0x197)](_0x1bf878(0x18f)+_0x1eafff+_0x1bf878(0x17a),{'body':_0x24b380});return!_0x55081b[_0x1bf878(0x14c)][_0x1bf878(0x147)]||_0x55081b['body'][_0x1bf878(0x147)][_0x1bf878(0x139)]===0x1;}async[_0x71f2d7(0x18c)](_0x4737d2,_0x1f6e83,_0x10f08c,_0x492560){const _0x54d510=_0x71f2d7,_0x1ccf04={'memberId':(await this[_0x54d510(0x15d)][_0x54d510(0x161)](_0x4737d2))[_0x54d510(0x181)](),'threadId':_0x10f08c,'replyId':_0x492560,'unitId':_0x4737d2},_0x2829ca=await this['_httpService'][_0x54d510(0x197)](_0x54d510(0x18f)+_0x4737d2+_0x54d510(0x148),{'body':_0x1ccf04});return!_0x2829ca[_0x54d510(0x14c)]['error']||_0x2829ca[_0x54d510(0x14c)]['error']['code']===0x1;}async[_0x71f2d7(0x16c)](_0x1bf58e,_0x43c086,_0x11e529){const _0x3b4f67=_0x71f2d7,_0x3d576b={'unitId':_0x1bf58e,'threadId':_0x11e529},_0x4f57fa=await this[_0x3b4f67(0x193)][_0x3b4f67(0x197)]('/universer-api/comment/unit/'+_0x1bf58e+_0x3b4f67(0x16a),{'body':_0x3d576b}),_0x12307e=_0x11e529[_0x3b4f67(0x187)](_0x31626e=>ee(_0x4f57fa[_0x3b4f67(0x14c)]['comments'][_0x31626e],_0x1bf58e,_0x43c086))[_0x3b4f67(0x15b)](Boolean);return Object[_0x3b4f67(0x18e)](_0x4f57fa[_0x3b4f67(0x14c)][_0x3b4f67(0x141)])['forEach'](_0x4a9a31=>{const _0x3df9de=_0x3b4f67;this[_0x3df9de(0x157)][_0x3df9de(0x14a)](_0x4a9a31);}),_0x12307e;}['saveCommentToSnapshot'](_0x2422c6){const _0x27c2cc=_0x71f2d7;return{'id':_0x2422c6['id'],'threadId':_0x2422c6[_0x27c2cc(0x138)],'ref':_0x2422c6[_0x27c2cc(0x195)]};}};S=Q([b(0x0,_0x4b8dfe(_0x15440e)),b(0x1,_0x4b8dfe(_0x49c7ce)),b(0x2,_0x4b8dfe(_0x4ead13))],S);var re=Object[_0x71f2d7(0x177)],te=(_0x50bf10,_0x3fdbfc,_0x36687f,_0x289651)=>{const _0x173baa=_0x71f2d7;for(var _0x39cbfb=_0x289651>0x1?void 0x0:_0x289651?re(_0x3fdbfc,_0x36687f):_0x3fdbfc,_0x5a9f7d=_0x50bf10[_0x173baa(0x162)]-0x1,_0x59fe3c;_0x5a9f7d>=0x0;_0x5a9f7d--)(_0x59fe3c=_0x50bf10[_0x5a9f7d])&&(_0x39cbfb=_0x59fe3c(_0x39cbfb)||_0x39cbfb);return _0x39cbfb;},M=(_0x5b7d28,_0x24860d)=>(_0x4551b0,_0x870ee8)=>_0x24860d(_0x4551b0,_0x870ee8,_0x5b7d28);let f=class extends _0x29e1ca{constructor(_0xf65984,_0x4262cc){const _0x412f95=_0x71f2d7;super(),this[_0x412f95(0x169)]=_0xf65984,this[_0x412f95(0x152)]=_0x4262cc,this['_initDataSource']();}[_0x71f2d7(0x13f)](){const _0x4e4d0b=_0x71f2d7;this[_0x4e4d0b(0x169)][_0x4e4d0b(0x16f)]=this['_threadCommentDataSource'],this[_0x4e4d0b(0x169)][_0x4e4d0b(0x184)]=!0x1;}};f=te([M(0x0,_0x3f700d),M(0x1,_0x4b8dfe(S))],f);var se=Object[_0x71f2d7(0x198)],oe=Object[_0x71f2d7(0x177)],ne=(_0x5a2935,_0x1a5f49,_0x2380d7)=>_0x1a5f49 in _0x5a2935?se(_0x5a2935,_0x1a5f49,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2380d7}):_0x5a2935[_0x1a5f49]=_0x2380d7,ie=(_0x42624b,_0x16437a,_0x5817be,_0x2f9234)=>{const _0x257769=_0x71f2d7;for(var _0x20b0cc=_0x2f9234>0x1?void 0x0:_0x2f9234?oe(_0x16437a,_0x5817be):_0x16437a,_0x465cc7=_0x42624b[_0x257769(0x162)]-0x1,_0x51cc57;_0x465cc7>=0x0;_0x465cc7--)(_0x51cc57=_0x42624b[_0x465cc7])&&(_0x20b0cc=_0x51cc57(_0x20b0cc)||_0x20b0cc);return _0x20b0cc;},N=(_0x5ebd8c,_0xf91dba)=>(_0x45e77c,_0x410d4e)=>_0xf91dba(_0x45e77c,_0x410d4e,_0x5ebd8c),$=(_0x3476e5,_0x1d61ca,_0x2345bc)=>ne(_0x3476e5,typeof _0x1d61ca!=_0x71f2d7(0x145)?_0x1d61ca+'':_0x1d61ca,_0x2345bc);let g=class extends _0x39767c{constructor(_0x30c6c8=O,_0x1b0758,_0x4b4e72){const _0x1510e7=_0x71f2d7;super(),this[_0x1510e7(0x150)]=_0x30c6c8,this[_0x1510e7(0x144)]=_0x1b0758,this[_0x1510e7(0x136)]=_0x4b4e72;const {..._0x185bf6}=_0xf97ff9({},O,this[_0x1510e7(0x150)]);this['_configService'][_0x1510e7(0x189)](z,_0x185bf6);}['onStarting'](){const _0x9bf7fb=_0x71f2d7;[[S],[f],[_]][_0x9bf7fb(0x196)](_0x31e914=>{const _0x587ac2=_0x9bf7fb;this[_0x587ac2(0x144)][_0x587ac2(0x18a)](_0x31e914);});}[_0x71f2d7(0x176)](){const _0x2c4b82=_0x71f2d7;this[_0x2c4b82(0x144)][_0x2c4b82(0x179)](f),this[_0x2c4b82(0x144)][_0x2c4b82(0x179)](_);}};$(g,'pluginName',W),$(g,'type',_0x48d0a5[_0x71f2d7(0x158)]),g=ie([_0x296157(_0x228392,_0x33917a,_0x44e499),N(0x1,_0x4b8dfe(_0x1eebbd)),N(0x2,_0x128401)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x291d(_0x16eeaa,_0x471f56){_0x16eeaa=_0x16eeaa-0x1c8;const _0xfc6ad=_0xfc6a();let _0x291d9e=_0xfc6ad[_0x16eeaa];return _0x291d9e;}const _0x478432=_0x291d;(function(_0x37e517,_0x4c7595){const _0x3e35f1=_0x291d,_0x31cd04=_0x37e517();while(!![]){try{const _0x4dba27=-parseInt(_0x3e35f1(0x211))/0x1+parseInt(_0x3e35f1(0x1e2))/0x2+parseInt(_0x3e35f1(0x1ea))/0x3*(-parseInt(_0x3e35f1(0x1d7))/0x4)+parseInt(_0x3e35f1(0x205))/0x5*(-parseInt(_0x3e35f1(0x1e3))/0x6)+parseInt(_0x3e35f1(0x1e0))/0x7*(-parseInt(_0x3e35f1(0x1ef))/0x8)+-parseInt(_0x3e35f1(0x1cf))/0x9+-parseInt(_0x3e35f1(0x229))/0xa*(-parseInt(_0x3e35f1(0x225))/0xb);if(_0x4dba27===_0x4c7595)break;else _0x31cd04['push'](_0x31cd04['shift']());}catch(_0x22f316){_0x31cd04['push'](_0x31cd04['shift']());}}}(_0xfc6a,0xb0da6));import{CommentService as _0x4d6773,CollaborationSessionService as _0x5a5dbc,UniverCollaborationClientPlugin as _0x50e6cf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2390e8}from'@univerjs-pro/license';import{dayjs as _0x145609,UserManagerService as _0x16864d,Inject as _0x36a50d,Injector as _0x30deff,Disposable as _0x7e40e5,CustomRangeType as _0x161914,UniverInstanceType as _0x219303,DependentOn as _0x1eee3d,IConfigService as _0x3ab8b5,Plugin as _0x1d64a2,merge as _0x340d8a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x48dfe6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x30be5c,IThreadCommentDataSourceService as _0x524c21}from'@univerjs/thread-comment';import{bufferTime as _0x2df956}from'rxjs';import{HTTPService as _0x5f1b17}from'@univerjs/network';const W=_0x478432(0x20b);var I=(_0x2a74f8=>(_0x2a74f8[_0x2a74f8['OpenOrReOpen']=0x0]=_0x478432(0x223),_0x2a74f8[_0x2a74f8[_0x478432(0x1d3)]=0x1]=_0x478432(0x1d3),_0x2a74f8[_0x2a74f8[_0x478432(0x1ce)]=-0x1]=_0x478432(0x1ce),_0x2a74f8))(I||{}),v=(_0x30825b=>(_0x30825b[_0x30825b[_0x478432(0x21b)]=0x0]=_0x478432(0x21b),_0x30825b[_0x30825b[_0x478432(0x1ed)]=0x1]=_0x478432(0x1ed),_0x30825b[_0x30825b[_0x478432(0x221)]=0x2]='Reply',_0x30825b[_0x30825b[_0x478432(0x204)]=0x3]=_0x478432(0x204),_0x30825b[_0x30825b[_0x478432(0x217)]=0x4]=_0x478432(0x217),_0x30825b[_0x30825b[_0x478432(0x208)]=0x5]='Solve',_0x30825b[_0x30825b[_0x478432(0x1ce)]=-0x1]='UNRECOGNIZED',_0x30825b))(v||{});const y=_0x394b28=>_0x145609(new Date(+_0x394b28))[_0x478432(0x1c9)](_0x478432(0x214)),B=async(_0x3aed0a,_0x45a551)=>{const _0x31410d=_0x478432,_0x2fbdab=_0x3aed0a[_0x31410d(0x218)](_0x16864d),_0x3afb0b=_0x3aed0a['get'](_0x5f1b17);_0x45a551[_0x31410d(0x1f2)](_0x56a6cf=>{const _0x1d34d6=_0x31410d;_0x2fbdab[_0x1d34d6(0x1e6)](_0x56a6cf)&&_0x45a551[_0x1d34d6(0x1f7)](_0x56a6cf);}),_0x45a551[_0x31410d(0x1fb)]&&(await _0x3afb0b[_0x31410d(0x218)]('/universer-api/user/list',{'params':{'userIDs':[..._0x45a551]}}))['body'][_0x31410d(0x216)][_0x31410d(0x1f2)](_0x127a73=>{const _0x26a5ec=_0x31410d;_0x127a73&&_0x2fbdab[_0x26a5ec(0x1ee)](_0x127a73);});};var K=Object[_0x478432(0x201)],V=(_0x26b37b,_0x540f26,_0xc94a67,_0x30de2b)=>{for(var _0x35391b=_0x30de2b>0x1?void 0x0:_0x30de2b?K(_0x540f26,_0xc94a67):_0x540f26,_0x234b44=_0x26b37b['length']-0x1,_0xa8d190;_0x234b44>=0x0;_0x234b44--)(_0xa8d190=_0x26b37b[_0x234b44])&&(_0x35391b=_0xa8d190(_0x35391b)||_0x35391b);return _0x35391b;},p=(_0x137813,_0x323c9b)=>(_0xb387a3,_0x4082f2)=>_0x323c9b(_0xb387a3,_0x4082f2,_0x137813);let _=class extends _0x7e40e5{constructor(_0x298557,_0x98bd5e,_0x95118f,_0x353d22){const _0x33091c=_0x478432;super(),this[_0x33091c(0x1f6)]=_0x298557,this[_0x33091c(0x220)]=_0x98bd5e,this[_0x33091c(0x209)]=_0x95118f,this[_0x33091c(0x1dc)]=_0x353d22,this[_0x33091c(0x1f3)](),this[_0x33091c(0x22b)]();}[_0x478432(0x22b)](){const _0x1b8dca=_0x478432;this[_0x1b8dca(0x1d0)](this[_0x1b8dca(0x220)]['commentUpdate$']['pipe'](_0x2df956(0x10))[_0x1b8dca(0x1da)](_0x41e402=>{const _0x23e32d=_0x1b8dca,_0x5c9f2f=new Set();_0x41e402[_0x23e32d(0x1f2)](_0x2df846=>{const _0x24cc2d=_0x23e32d;if(_0x2df846[_0x24cc2d(0x1e7)]===_0x24cc2d(0x200)){const _0x27e419=_0x2df846[_0x24cc2d(0x1dd)][_0x24cc2d(0x1e5)];_0x5c9f2f[_0x24cc2d(0x200)](_0x27e419);}}),B(this['_injector'],_0x5c9f2f);}));}[_0x478432(0x1f3)](){const _0x1bf7da=_0x478432;this[_0x1bf7da(0x1d0)](this[_0x1bf7da(0x1f6)][_0x1bf7da(0x1e1)][_0x1bf7da(0x1da)](async _0x39fdf4=>{const _0x3e14fb=_0x1bf7da;var _0x1cf798,_0x47221c,_0x335fce,_0x16efff;const _0x1bda7d=(_0x1cf798=this[_0x3e14fb(0x220)][_0x3e14fb(0x22d)](_0x39fdf4[_0x3e14fb(0x206)])[_0x3e14fb(0x1f9)](_0x169427=>_0x169427[_0x3e14fb(0x20c)]===_0x39fdf4[_0x3e14fb(0x20c)]))==null?void 0x0:_0x1cf798[_0x3e14fb(0x1de)];if(!_0x1bda7d)return;const {unitId:_0x24c76c,subUnitId:_0x2e1e27}=_0x1bda7d;switch(_0x39fdf4['user']&&this['_userService'][_0x3e14fb(0x1ee)](_0x39fdf4['user']),_0x39fdf4[_0x3e14fb(0x1e7)]){case v['Add']:break;case v[_0x3e14fb(0x221)]:{this['_threadCommentModel'][_0x3e14fb(0x207)](_0x24c76c,_0x2e1e27,{'unitId':_0x24c76c,'subUnitId':_0x2e1e27,'ref':'','id':_0x39fdf4[_0x3e14fb(0x20e)],'dT':y(+_0x39fdf4[_0x3e14fb(0x1fc)]),'threadId':_0x39fdf4[_0x3e14fb(0x20c)],'personId':(_0x335fce=(_0x47221c=_0x39fdf4[_0x3e14fb(0x1cb)])==null?void 0x0:_0x47221c[_0x3e14fb(0x210)])!=null?_0x335fce:_0x39fdf4[_0x3e14fb(0x1ec)],'text':JSON['parse'](_0x39fdf4[_0x3e14fb(0x21a)]),'parentId':_0x1bda7d['id']});break;}case v[_0x3e14fb(0x217)]:{const _0x3fd564=this[_0x3e14fb(0x220)][_0x3e14fb(0x1fd)](_0x24c76c,_0x2e1e27,_0x39fdf4['replyId']);_0x3fd564&&_0x3fd564['parentId']&&this[_0x3e14fb(0x220)]['deleteComment'](_0x24c76c,_0x2e1e27,_0x39fdf4[_0x3e14fb(0x20e)]);break;}case v[_0x3e14fb(0x204)]:{this[_0x3e14fb(0x220)]['updateComment'](_0x24c76c,_0x2e1e27,{'commentId':_0x39fdf4[_0x3e14fb(0x20e)],'text':JSON[_0x3e14fb(0x1e8)](_0x39fdf4[_0x3e14fb(0x21a)])});break;}case v[_0x3e14fb(0x208)]:{const _0x4d2a13=(_0x16efff=this['_threadCommentModel']['getUnit'](_0x39fdf4['unitId'])[_0x3e14fb(0x1f9)](_0x20e43a=>_0x20e43a[_0x3e14fb(0x20c)]===_0x39fdf4[_0x3e14fb(0x20c)]))==null?void 0x0:_0x16efff['root'];_0x4d2a13&&this['_threadCommentModel'][_0x3e14fb(0x202)](_0x24c76c,_0x2e1e27,_0x4d2a13['id'],_0x39fdf4[_0x3e14fb(0x1d2)]===I[_0x3e14fb(0x1d3)]);break;}}}));}};_=V([p(0x0,_0x36a50d(_0x4d6773)),p(0x1,_0x36a50d(_0x30be5c)),p(0x2,_0x36a50d(_0x16864d)),p(0x3,_0x36a50d(_0x30deff))],_);const z=_0x478432(0x226),O={};var k=Object[_0x478432(0x201)],Q=(_0x3a10b2,_0x2a637d,_0xb513df,_0x583d84)=>{for(var _0x3a704d=_0x583d84>0x1?void 0x0:_0x583d84?k(_0x2a637d,_0xb513df):_0x2a637d,_0x3cab65=_0x3a10b2['length']-0x1,_0x37d7ed;_0x3cab65>=0x0;_0x3cab65--)(_0x37d7ed=_0x3a10b2[_0x3cab65])&&(_0x3a704d=_0x37d7ed(_0x3a704d)||_0x3a704d);return _0x3a704d;},b=(_0x222663,_0x2b6042)=>(_0x16fb97,_0x440f2d)=>_0x2b6042(_0x16fb97,_0x440f2d,_0x222663);function X(_0x269f7c,_0x4219b3){const _0xd09ddd=_0x478432,_0x518277=_0x269f7c[_0xd09ddd(0x1d9)][0x0];return{..._0x4219b3,'id':_0x518277[_0xd09ddd(0x20e)],'resolved':_0x269f7c[_0xd09ddd(0x1d2)]===0x1,'dT':y(_0x518277[_0xd09ddd(0x1fc)]),'personId':_0x518277['userId'],'threadId':_0x518277[_0xd09ddd(0x20c)]};}function _0xfc6a(){const _0x15c126=['userId','Add','addUser','8qAZwdW','requireSession','/delete','forEach','_init','updateComment','getMemberID','_commentService','delete','saveCommentToSnapshot','find','_configService','size','createTimestamp','getComment','onStarting','error','add','getOwnPropertyDescriptor','resolveComment','comments','Edit','6662050KyTSdr','unitId','addComment','Solve','_userService','post','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','threadId','setConfig','replyId','COMMENT','userID','1188182dEEUZD','_initDataSource','body','YYYY/MM/DD\x20HH:mm','_config','users','Delete','get','_sessionService','content','Unknown','customRanges','rangeType','filter','symbol','_threadCommentModel','Reply','/solved','OpenOrReOpen','stringify','59796484kAeGrJ','thread-comment-data-source.config','map','getCurrentUser','10pBgWMG','pluginName','_initUserSync','/add','getUnit','onReady','resolved','format','slice','user','/edit','/universer-api/comment/unit/','UNRECOGNIZED','11306610TMfujg','disposeWithMe','/list','solved','Solved','ref','_threadCommentDataSourceService','length','3988lfMWpY','rangeId','replies','subscribe','reply','_injector','payload','root','deleteComment','3222884lOQoRb','commentUpdate$','498924IjFNqv','6ZuuDMP','code','personId','getUser','type','parse','_httpService','2178Ypfbrf','UNIVER_UNKNOWN'];_0xfc6a=function(){return _0x15c126;};return _0xfc6a();}function ee(_0x5716c2,_0x2ca91c,_0x266d9a){const _0x110647=_0x478432;var _0x4f6382,_0x30b0e6;if(((_0x30b0e6=(_0x4f6382=_0x5716c2==null?void 0x0:_0x5716c2[_0x110647(0x1d9)])==null?void 0x0:_0x4f6382[_0x110647(0x1d6)])!=null?_0x30b0e6:0x0)>0x0){const _0xfdbd32=(_0x456fb7,_0x242ac4)=>({'id':_0x456fb7[_0x110647(0x20e)],'threadId':_0x456fb7['threadId'],'dT':y(_0x456fb7['createTimestamp']),'personId':_0x456fb7['userId'],'resolved':_0x5716c2['solved']===I[_0x110647(0x1d3)],'unitId':_0x2ca91c,'subUnitId':_0x266d9a,'text':JSON[_0x110647(0x1e8)](_0x456fb7[_0x110647(0x21a)]),'parentId':_0x242ac4}),_0x56920f=_0xfdbd32(_0x5716c2[_0x110647(0x1d9)][0x0]);return{..._0x56920f,'children':_0x5716c2[_0x110647(0x1d9)][_0x110647(0x1ca)](0x1)['map'](_0x52a59c=>_0xfdbd32(_0x52a59c,_0x56920f['id']))};}return null;}let S=class{constructor(_0x29e923,_0x477422,_0x3e4e0c){const _0xffd692=_0x478432;this[_0xffd692(0x1e9)]=_0x29e923,this['_userService']=_0x477422,this[_0xffd692(0x219)]=_0x3e4e0c;}async['addComment'](_0x284fa2){const _0x5e198a=_0x478432;var _0x55131e,_0x288a44;const {parentId:_0x350fec,unitId:_0xb36757,text:_0x9bd13,threadId:_0x36527b}=_0x284fa2,_0x5e08eb=(_0x288a44=(_0x55131e=_0x9bd13[_0x5e198a(0x21c)])==null?void 0x0:_0x55131e[_0x5e198a(0x21e)](_0x2f4e88=>_0x2f4e88['rangeType']===_0x161914[_0x5e198a(0x20f)])[_0x5e198a(0x227)](_0x43e195=>_0x43e195[_0x5e198a(0x1d8)]))!=null?_0x288a44:[],_0x6ae6c9=JSON[_0x5e198a(0x224)](_0x9bd13),_0x3b16ae=(await this['_sessionService'][_0x5e198a(0x1f0)](_0xb36757))[_0x5e198a(0x1f5)]();if(_0x350fec){const _0x5d2ea4={'memberId':_0x3b16ae,'unitId':_0xb36757,'content':_0x6ae6c9,'mention':_0x5e08eb,'threadId':_0x36527b},_0x37c555=(await this[_0x5e198a(0x1e9)][_0x5e198a(0x20a)]('/universer-api/comment/unit/'+_0xb36757+'/reply',{'body':_0x5d2ea4}))[_0x5e198a(0x213)][_0x5e198a(0x1db)];return{..._0x284fa2,'id':_0x37c555[_0x5e198a(0x20e)],'dT':_0x145609(+_0x37c555[_0x5e198a(0x1fc)])[_0x5e198a(0x1c9)](_0x5e198a(0x214)),'personId':_0x37c555[_0x5e198a(0x1ec)]};}else{const _0x509f3a={'memberId':_0x3b16ae,'unitId':_0xb36757,'content':_0x6ae6c9,'mention':_0x5e08eb},_0xcbf359=await this[_0x5e198a(0x1e9)][_0x5e198a(0x20a)](_0x5e198a(0x1cd)+_0xb36757+_0x5e198a(0x22c),{'body':_0x509f3a});return X(_0xcbf359[_0x5e198a(0x213)]['comment'],_0x284fa2);}}async[_0x478432(0x1f4)](_0x3c8490){const _0x21f060=_0x478432;var _0x5bd9a1,_0x40494b;const {text:_0x594797,unitId:_0x5c4490}=_0x3c8490,_0x130963=(_0x40494b=(_0x5bd9a1=_0x594797[_0x21f060(0x21c)])==null?void 0x0:_0x5bd9a1[_0x21f060(0x21e)](_0x7fe289=>_0x7fe289[_0x21f060(0x21d)]===_0x161914[_0x21f060(0x20f)])['map'](_0x2a384e=>_0x2a384e[_0x21f060(0x1d8)]))!=null?_0x40494b:[],_0x530938=JSON[_0x21f060(0x224)](_0x594797),_0x3d5f05=_0x3c8490[_0x21f060(0x20c)],_0x1f79d7=_0x3c8490['id'],_0x35f684={'memberId':(await this['_sessionService']['requireSession'](_0x5c4490))[_0x21f060(0x1f5)](),'unitId':_0x5c4490,'threadId':_0x3d5f05,'mention':_0x130963,'content':_0x530938,'replyId':_0x1f79d7},_0x40a287=await this[_0x21f060(0x1e9)][_0x21f060(0x20a)](_0x21f060(0x1cd)+_0x5c4490+_0x21f060(0x1cc),{'body':_0x35f684});return!_0x40a287['body'][_0x21f060(0x1ff)]||_0x40a287['body']['error'][_0x21f060(0x1e4)]===0x1;}async[_0x478432(0x202)](_0x2bc9ca){const _0x3e7dc6=_0x478432,{unitId:_0x1cb1c9}=_0x2bc9ca,_0x160e50=_0x2bc9ca[_0x3e7dc6(0x20c)],_0x4e7359={'memberId':this[_0x3e7dc6(0x209)][_0x3e7dc6(0x228)]()[_0x3e7dc6(0x210)],'unitId':_0x1cb1c9,'threadId':_0x160e50,'solved':_0x2bc9ca[_0x3e7dc6(0x1c8)]?I[_0x3e7dc6(0x1d3)]:I['OpenOrReOpen']},_0x26e0d7=await this[_0x3e7dc6(0x1e9)][_0x3e7dc6(0x20a)](_0x3e7dc6(0x1cd)+_0x1cb1c9+_0x3e7dc6(0x222),{'body':_0x4e7359});return!_0x26e0d7[_0x3e7dc6(0x213)]['error']||_0x26e0d7['body'][_0x3e7dc6(0x1ff)][_0x3e7dc6(0x1e4)]===0x1;}async[_0x478432(0x1df)](_0x18e33e,_0x758322,_0x2d0d76,_0xe69b7){const _0x1fb194=_0x478432,_0x3470da={'memberId':(await this['_sessionService'][_0x1fb194(0x1f0)](_0x18e33e))[_0x1fb194(0x1f5)](),'threadId':_0x2d0d76,'replyId':_0xe69b7,'unitId':_0x18e33e},_0x50da42=await this[_0x1fb194(0x1e9)]['post'](_0x1fb194(0x1cd)+_0x18e33e+_0x1fb194(0x1f1),{'body':_0x3470da});return!_0x50da42[_0x1fb194(0x213)][_0x1fb194(0x1ff)]||_0x50da42[_0x1fb194(0x213)]['error'][_0x1fb194(0x1e4)]===0x1;}async['listComments'](_0xbaa23,_0x30c73c,_0x4bcd9c){const _0xc6ccde=_0x478432,_0x5ce3b2={'unitId':_0xbaa23,'threadId':_0x4bcd9c},_0x38ab59=await this[_0xc6ccde(0x1e9)][_0xc6ccde(0x20a)](_0xc6ccde(0x1cd)+_0xbaa23+_0xc6ccde(0x1d1),{'body':_0x5ce3b2}),_0x3c6159=_0x4bcd9c['map'](_0x5bd884=>ee(_0x38ab59[_0xc6ccde(0x213)][_0xc6ccde(0x203)][_0x5bd884],_0xbaa23,_0x30c73c))[_0xc6ccde(0x21e)](Boolean);return Object['values'](_0x38ab59[_0xc6ccde(0x213)][_0xc6ccde(0x216)])['forEach'](_0x30d9e7=>{this['_userService']['addUser'](_0x30d9e7);}),_0x3c6159;}[_0x478432(0x1f8)](_0x491c13){const _0x41fef4=_0x478432;return{'id':_0x491c13['id'],'threadId':_0x491c13[_0x41fef4(0x20c)],'ref':_0x491c13[_0x41fef4(0x1d4)]};}};S=Q([b(0x0,_0x36a50d(_0x5f1b17)),b(0x1,_0x36a50d(_0x16864d)),b(0x2,_0x36a50d(_0x5a5dbc))],S);var re=Object[_0x478432(0x201)],te=(_0xe5c866,_0x4f02ff,_0x4ab25a,_0x201543)=>{const _0x59a080=_0x478432;for(var _0x342ca9=_0x201543>0x1?void 0x0:_0x201543?re(_0x4f02ff,_0x4ab25a):_0x4f02ff,_0x47fce7=_0xe5c866[_0x59a080(0x1d6)]-0x1,_0x4a0c49;_0x47fce7>=0x0;_0x47fce7--)(_0x4a0c49=_0xe5c866[_0x47fce7])&&(_0x342ca9=_0x4a0c49(_0x342ca9)||_0x342ca9);return _0x342ca9;},M=(_0x2d0d4b,_0x16f7e5)=>(_0x1f4a48,_0x3362d3)=>_0x16f7e5(_0x1f4a48,_0x3362d3,_0x2d0d4b);let f=class extends _0x7e40e5{constructor(_0x37594e,_0x42b1ea){const _0x394424=_0x478432;super(),this[_0x394424(0x1d5)]=_0x37594e,this['_threadCommentDataSource']=_0x42b1ea,this[_0x394424(0x212)]();}[_0x478432(0x212)](){const _0x152f0c=_0x478432;this[_0x152f0c(0x1d5)]['dataSource']=this['_threadCommentDataSource'],this[_0x152f0c(0x1d5)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x524c21),M(0x1,_0x36a50d(S))],f);var se=Object['defineProperty'],oe=Object[_0x478432(0x201)],ne=(_0x1874eb,_0x51500a,_0x4535bf)=>_0x51500a in _0x1874eb?se(_0x1874eb,_0x51500a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4535bf}):_0x1874eb[_0x51500a]=_0x4535bf,ie=(_0x153cb8,_0x315489,_0x4c560f,_0x4ce1cb)=>{for(var _0x11002e=_0x4ce1cb>0x1?void 0x0:_0x4ce1cb?oe(_0x315489,_0x4c560f):_0x315489,_0x24ee2e=_0x153cb8['length']-0x1,_0x4fc23e;_0x24ee2e>=0x0;_0x24ee2e--)(_0x4fc23e=_0x153cb8[_0x24ee2e])&&(_0x11002e=_0x4fc23e(_0x11002e)||_0x11002e);return _0x11002e;},N=(_0x58b67f,_0x4a5cfb)=>(_0x52f128,_0x26a9cb)=>_0x4a5cfb(_0x52f128,_0x26a9cb,_0x58b67f),$=(_0xcfc9e9,_0x338f40,_0x1396f5)=>ne(_0xcfc9e9,typeof _0x338f40!=_0x478432(0x21f)?_0x338f40+'':_0x338f40,_0x1396f5);let g=class extends _0x1d64a2{constructor(_0x162844=O,_0x1eb126,_0x140a24){const _0x5e08d2=_0x478432;super(),this[_0x5e08d2(0x215)]=_0x162844,this['_injector']=_0x1eb126,this[_0x5e08d2(0x1fa)]=_0x140a24;const {..._0x32578e}=_0x340d8a({},O,this['_config']);this[_0x5e08d2(0x1fa)][_0x5e08d2(0x20d)](z,_0x32578e);}[_0x478432(0x1fe)](){const _0x4ac928=_0x478432;[[S],[f],[_]][_0x4ac928(0x1f2)](_0x2d1d6d=>{const _0x1e630e=_0x4ac928;this['_injector'][_0x1e630e(0x200)](_0x2d1d6d);});}[_0x478432(0x22e)](){const _0x5006bd=_0x478432;this[_0x5006bd(0x1dc)]['get'](f),this[_0x5006bd(0x1dc)][_0x5006bd(0x218)](_);}};$(g,_0x478432(0x22a),W),$(g,_0x478432(0x1e7),_0x219303[_0x478432(0x1eb)]),g=ie([_0x1eee3d(_0x48dfe6,_0x50e6cf,_0x2390e8),N(0x1,_0x36a50d(_0x30deff)),N(0x2,_0x3ab8b5)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xeb5dd5,_0x2c5eab){const _0x27a719=_0x252d,_0x2514db=_0xeb5dd5();while(!![]){try{const _0x38ef6b=-parseInt(_0x27a719(0x1a8))/0x1*(-parseInt(_0x27a719(0x1ab))/0x2)+parseInt(_0x27a719(0x1db))/0x3+-parseInt(_0x27a719(0x1b6))/0x4+-parseInt(_0x27a719(0x1ed))/0x5+-parseInt(_0x27a719(0x205))/0x6+-parseInt(_0x27a719(0x20e))/0x7*(parseInt(_0x27a719(0x1ff))/0x8)+parseInt(_0x27a719(0x1f5))/0x9;if(_0x38ef6b===_0x2c5eab)break;else _0x2514db['push'](_0x2514db['shift']());}catch(_0x31750b){_0x2514db['push'](_0x2514db['shift']());}}}(_0x35a6,0x4a661),function(_0x14c6ca,_0xa3ad81){const _0x1e1d63=_0x252d;typeof exports==_0x1e1d63(0x1c4)&&typeof module<'u'?_0xa3ad81(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[_0x1e1d63(0x1fb)]?define([_0x1e1d63(0x191),_0x1e1d63(0x1f1),'@univerjs-pro/license','@univerjs/core','@univerjs/thread-comment-ui',_0x1e1d63(0x195),_0x1e1d63(0x197),_0x1e1d63(0x1e2)],_0xa3ad81):(_0x14c6ca=typeof globalThis<'u'?globalThis:_0x14c6ca||self,_0xa3ad81(_0x14c6ca[_0x1e1d63(0x198)]={},_0x14c6ca[_0x1e1d63(0x1d8)],_0x14c6ca['UniverProLicense'],_0x14c6ca[_0x1e1d63(0x1b0)],_0x14c6ca[_0x1e1d63(0x19e)],_0x14c6ca['UniverThreadComment'],_0x14c6ca[_0x1e1d63(0x197)],_0x14c6ca[_0x1e1d63(0x1bd)]));}(this,function(_0x4afe61,_0x3f0ee1,_0x3ada5f,_0x92db82,_0x164632,_0x3dde62,_0x3e3a06,_0x206d9f){'use strict';const _0x8e74c2=_0x252d;const _0x2b801f=_0x8e74c2(0x1dc);var _0x551ddc=(_0xf2bb46=>(_0xf2bb46[_0xf2bb46[_0x8e74c2(0x19b)]=0x0]=_0x8e74c2(0x19b),_0xf2bb46[_0xf2bb46[_0x8e74c2(0x1bf)]=0x1]='Solved',_0xf2bb46[_0xf2bb46[_0x8e74c2(0x1cb)]=-0x1]=_0x8e74c2(0x1cb),_0xf2bb46))(_0x551ddc||{}),_0x5d0ba5=(_0x4eeeed=>(_0x4eeeed[_0x4eeeed[_0x8e74c2(0x1f6)]=0x0]='Unknown',_0x4eeeed[_0x4eeeed[_0x8e74c2(0x1a3)]=0x1]=_0x8e74c2(0x1a3),_0x4eeeed[_0x4eeeed['Reply']=0x2]=_0x8e74c2(0x19a),_0x4eeeed[_0x4eeeed['Edit']=0x3]=_0x8e74c2(0x1be),_0x4eeeed[_0x4eeeed['Delete']=0x4]=_0x8e74c2(0x1f7),_0x4eeeed[_0x4eeeed['Solve']=0x5]=_0x8e74c2(0x1a0),_0x4eeeed[_0x4eeeed[_0x8e74c2(0x1cb)]=-0x1]=_0x8e74c2(0x1cb),_0x4eeeed))(_0x5d0ba5||{});const _0x4747c0=_0x487d92=>_0x92db82[_0x8e74c2(0x1ba)](new Date(+_0x487d92))['format']('YYYY/MM/DD\x20HH:mm'),_0x56921a=async(_0x19562d,_0x1f9fe2)=>{const _0x56a905=_0x8e74c2,_0x1e97b7=_0x19562d[_0x56a905(0x1dd)](_0x92db82[_0x56a905(0x1d0)]),_0x1f1574=_0x19562d[_0x56a905(0x1dd)](_0x206d9f[_0x56a905(0x18c)]);_0x1f9fe2[_0x56a905(0x1d9)](_0x454c6c=>{const _0x1d7375=_0x56a905;_0x1e97b7[_0x1d7375(0x196)](_0x454c6c)&&_0x1f9fe2[_0x1d7375(0x1c0)](_0x454c6c);}),_0x1f9fe2[_0x56a905(0x1c8)]&&(await _0x1f1574[_0x56a905(0x1dd)](_0x56a905(0x1af),{'params':{'userIDs':[..._0x1f9fe2]}}))[_0x56a905(0x1e1)]['users'][_0x56a905(0x1d9)](_0x9f0395=>{const _0x2b92ef=_0x56a905;_0x9f0395&&_0x1e97b7[_0x2b92ef(0x1e4)](_0x9f0395);});};var _0x58b32f=Object[_0x8e74c2(0x18f)],_0x5bef24=(_0x1c7541,_0x2b97da,_0x5953a1,_0x469327)=>{const _0x8e6fb7=_0x8e74c2;for(var _0x35a58f=_0x469327>0x1?void 0x0:_0x469327?_0x58b32f(_0x2b97da,_0x5953a1):_0x2b97da,_0xb16469=_0x1c7541[_0x8e6fb7(0x193)]-0x1,_0x259695;_0xb16469>=0x0;_0xb16469--)(_0x259695=_0x1c7541[_0xb16469])&&(_0x35a58f=_0x259695(_0x35a58f)||_0x35a58f);return _0x35a58f;},_0x5f53ff=(_0x43018d,_0x11e81f)=>(_0x2878d7,_0x4d1288)=>_0x11e81f(_0x2878d7,_0x4d1288,_0x43018d);let _0x2b59de=class extends _0x92db82['Disposable']{constructor(_0x1cdffe,_0x5bbef7,_0x513eaa,_0x5db3ed){const _0x1a6316=_0x8e74c2;super(),this['_commentService']=_0x1cdffe,this[_0x1a6316(0x1e8)]=_0x5bbef7,this[_0x1a6316(0x201)]=_0x513eaa,this[_0x1a6316(0x20b)]=_0x5db3ed,this[_0x1a6316(0x1b8)](),this['_initUserSync']();}['_initUserSync'](){const _0x3dacb0=_0x8e74c2;this[_0x3dacb0(0x1ad)](this['_threadCommentModel'][_0x3dacb0(0x1f9)][_0x3dacb0(0x19f)](_0x3e3a06[_0x3dacb0(0x1c3)](0x10))[_0x3dacb0(0x1ca)](_0x3e2b25=>{const _0x1dac19=_0x3dacb0,_0x546cfa=new Set();_0x3e2b25[_0x1dac19(0x1d9)](_0x700b68=>{const _0x310119=_0x1dac19;switch(_0x700b68['type']){case'add':{const _0x1a4bd7=_0x700b68['payload'][_0x310119(0x1ee)];_0x546cfa[_0x310119(0x1cd)](_0x1a4bd7);break;}}}),_0x56921a(this['_injector'],_0x546cfa);}));}[_0x8e74c2(0x1b8)](){const _0x437c7c=_0x8e74c2;this['disposeWithMe'](this[_0x437c7c(0x1f0)][_0x437c7c(0x1f9)][_0x437c7c(0x1ca)](async _0x220669=>{const _0x2121fa=_0x437c7c;var _0x346fff,_0x470513,_0x16ee0d,_0x3a312a;const _0x567a48=(_0x346fff=this[_0x2121fa(0x1e8)][_0x2121fa(0x209)](_0x220669['unitId'])[_0x2121fa(0x1cf)](_0x11782c=>_0x11782c[_0x2121fa(0x1bb)]===_0x220669['threadId']))==null?void 0x0:_0x346fff[_0x2121fa(0x1e9)];if(!_0x567a48)return;const {unitId:_0x12e60a,subUnitId:_0x5333a7}=_0x567a48;switch(_0x220669[_0x2121fa(0x1f3)]&&this[_0x2121fa(0x201)][_0x2121fa(0x1e4)](_0x220669[_0x2121fa(0x1f3)]),_0x220669[_0x2121fa(0x1b5)]){case _0x5d0ba5[_0x2121fa(0x1a3)]:break;case _0x5d0ba5[_0x2121fa(0x19a)]:{this[_0x2121fa(0x1e8)][_0x2121fa(0x1fc)](_0x12e60a,_0x5333a7,{'unitId':_0x12e60a,'subUnitId':_0x5333a7,'ref':'','id':_0x220669[_0x2121fa(0x1a5)],'dT':_0x4747c0(+_0x220669['createTimestamp']),'threadId':_0x220669[_0x2121fa(0x1bb)],'personId':(_0x16ee0d=(_0x470513=_0x220669['user'])==null?void 0x0:_0x470513[_0x2121fa(0x20a)])!=null?_0x16ee0d:_0x220669[_0x2121fa(0x192)],'text':JSON['parse'](_0x220669[_0x2121fa(0x1ec)]),'parentId':_0x567a48['id']});break;}case _0x5d0ba5[_0x2121fa(0x1f7)]:{const _0x13ea52=this[_0x2121fa(0x1e8)][_0x2121fa(0x18b)](_0x12e60a,_0x5333a7,_0x220669[_0x2121fa(0x1a5)]);_0x13ea52&&_0x13ea52[_0x2121fa(0x1f4)]&&this['_threadCommentModel']['deleteComment'](_0x12e60a,_0x5333a7,_0x220669[_0x2121fa(0x1a5)]);break;}case _0x5d0ba5[_0x2121fa(0x1be)]:{this[_0x2121fa(0x1e8)][_0x2121fa(0x1d6)](_0x12e60a,_0x5333a7,{'commentId':_0x220669[_0x2121fa(0x1a5)],'text':JSON[_0x2121fa(0x207)](_0x220669[_0x2121fa(0x1ec)])});break;}case _0x5d0ba5['Solve']:{const _0x54cfa6=(_0x3a312a=this[_0x2121fa(0x1e8)][_0x2121fa(0x209)](_0x220669[_0x2121fa(0x19d)])['find'](_0x1fad21=>_0x1fad21[_0x2121fa(0x1bb)]===_0x220669['threadId']))==null?void 0x0:_0x3a312a[_0x2121fa(0x1e9)];_0x54cfa6&&this[_0x2121fa(0x1e8)]['resolveComment'](_0x12e60a,_0x5333a7,_0x54cfa6['id'],_0x220669[_0x2121fa(0x1fa)]===_0x551ddc[_0x2121fa(0x1bf)]);break;}}}));}};_0x2b59de=_0x5bef24([_0x5f53ff(0x0,_0x92db82[_0x8e74c2(0x1d7)](_0x3f0ee1[_0x8e74c2(0x1e6)])),_0x5f53ff(0x1,_0x92db82['Inject'](_0x3dde62[_0x8e74c2(0x1b9)])),_0x5f53ff(0x2,_0x92db82[_0x8e74c2(0x1d7)](_0x92db82[_0x8e74c2(0x1d0)])),_0x5f53ff(0x3,_0x92db82[_0x8e74c2(0x1d7)](_0x92db82[_0x8e74c2(0x1a6)]))],_0x2b59de);const _0x410026=_0x8e74c2(0x1e7),_0x22114d={};var _0x4d7156=Object['getOwnPropertyDescriptor'],_0x2ed38e=(_0x51218d,_0x5a693d,_0x19db9a,_0x3d3fa6)=>{for(var _0x1646b0=_0x3d3fa6>0x1?void 0x0:_0x3d3fa6?_0x4d7156(_0x5a693d,_0x19db9a):_0x5a693d,_0x40da6f=_0x51218d['length']-0x1,_0xd179e6;_0x40da6f>=0x0;_0x40da6f--)(_0xd179e6=_0x51218d[_0x40da6f])&&(_0x1646b0=_0xd179e6(_0x1646b0)||_0x1646b0);return _0x1646b0;},_0x403db3=(_0x58d44f,_0x5bf2f4)=>(_0x27c06b,_0x1650a3)=>_0x5bf2f4(_0x27c06b,_0x1650a3,_0x58d44f);function _0x489f18(_0x525e13,_0x1645c0){const _0x5066ed=_0x8e74c2,_0x458516=_0x525e13[_0x5066ed(0x1de)][0x0];return{..._0x1645c0,'id':_0x458516[_0x5066ed(0x1a5)],'resolved':_0x525e13[_0x5066ed(0x1fa)]===0x1,'dT':_0x4747c0(_0x458516['createTimestamp']),'personId':_0x458516['userId'],'threadId':_0x458516[_0x5066ed(0x1bb)]};}function _0x53f8c0(_0x45f841,_0x1ffbfa,_0x4ce031){const _0x3ca480=_0x8e74c2;var _0x1ae60e,_0x4ed7df;if(((_0x4ed7df=(_0x1ae60e=_0x45f841==null?void 0x0:_0x45f841[_0x3ca480(0x1de)])==null?void 0x0:_0x1ae60e[_0x3ca480(0x193)])!=null?_0x4ed7df:0x0)>0x0){const _0x584678=(_0x2904ea,_0x48566e)=>({'id':_0x2904ea[_0x3ca480(0x1a5)],'threadId':_0x2904ea[_0x3ca480(0x1bb)],'dT':_0x4747c0(_0x2904ea[_0x3ca480(0x1d2)]),'personId':_0x2904ea[_0x3ca480(0x192)],'resolved':_0x45f841[_0x3ca480(0x1fa)]===_0x551ddc[_0x3ca480(0x1bf)],'unitId':_0x1ffbfa,'subUnitId':_0x4ce031,'text':JSON[_0x3ca480(0x207)](_0x2904ea[_0x3ca480(0x1ec)]),'parentId':_0x48566e}),_0x2b7b7c=_0x584678(_0x45f841['replies'][0x0]);return{..._0x2b7b7c,'children':_0x45f841[_0x3ca480(0x1de)][_0x3ca480(0x1bc)](0x1)[_0x3ca480(0x206)](_0x116613=>_0x584678(_0x116613,_0x2b7b7c['id']))};}return null;}let _0x15d3de=class{constructor(_0x449f25,_0x227d87,_0x1135e0){const _0x380add=_0x8e74c2;this[_0x380add(0x1f2)]=_0x449f25,this[_0x380add(0x201)]=_0x227d87,this[_0x380add(0x1c5)]=_0x1135e0;}async['addComment'](_0x5b3f77){const _0x401911=_0x8e74c2;var _0x1d72d0,_0x418e73;const {parentId:_0x591483,unitId:_0x4be70c,text:_0xf0de95,threadId:_0x4ff4e0}=_0x5b3f77,_0x1e8540=(_0x418e73=(_0x1d72d0=_0xf0de95[_0x401911(0x1df)])==null?void 0x0:_0x1d72d0['filter'](_0x1cdc50=>_0x1cdc50[_0x401911(0x1d5)]===_0x92db82[_0x401911(0x1b1)][_0x401911(0x1b2)])[_0x401911(0x206)](_0x227b0a=>_0x227b0a[_0x401911(0x1a1)]))!=null?_0x418e73:[],_0x175705=JSON[_0x401911(0x1d3)](_0xf0de95),_0x524676=(await this[_0x401911(0x1c5)][_0x401911(0x1d1)](_0x4be70c))['getMemberID']();if(_0x591483){const _0x4dd3ef={'memberId':_0x524676,'unitId':_0x4be70c,'content':_0x175705,'mention':_0x1e8540,'threadId':_0x4ff4e0},_0x41d7fb=(await this[_0x401911(0x1f2)][_0x401911(0x200)](_0x401911(0x1b3)+_0x4be70c+'/reply',{'body':_0x4dd3ef}))['body'][_0x401911(0x1c2)];return{..._0x5b3f77,'id':_0x41d7fb[_0x401911(0x1a5)],'dT':_0x92db82[_0x401911(0x1ba)](+_0x41d7fb[_0x401911(0x1d2)])[_0x401911(0x208)](_0x401911(0x1c1)),'personId':_0x41d7fb['userId']};}else{const _0x140593={'memberId':_0x524676,'unitId':_0x4be70c,'content':_0x175705,'mention':_0x1e8540},_0x4cbdd6=await this['_httpService'][_0x401911(0x200)](_0x401911(0x1b3)+_0x4be70c+_0x401911(0x20c),{'body':_0x140593});return _0x489f18(_0x4cbdd6[_0x401911(0x1e1)][_0x401911(0x1a2)],_0x5b3f77);}}async['updateComment'](_0x1dc6bc){const _0x116c54=_0x8e74c2;var _0x28c61f,_0x2a0314;const {text:_0x5133a9,unitId:_0x148485}=_0x1dc6bc,_0x1b9cdf=(_0x2a0314=(_0x28c61f=_0x5133a9[_0x116c54(0x1df)])==null?void 0x0:_0x28c61f['filter'](_0x148650=>_0x148650['rangeType']===_0x92db82[_0x116c54(0x1b1)]['COMMENT'])[_0x116c54(0x206)](_0x5e0880=>_0x5e0880[_0x116c54(0x1a1)]))!=null?_0x2a0314:[],_0x289772=JSON[_0x116c54(0x1d3)](_0x5133a9),_0x1e5319=_0x1dc6bc[_0x116c54(0x1bb)],_0x1d0d23=_0x1dc6bc['id'],_0xd50343={'memberId':(await this[_0x116c54(0x1c5)][_0x116c54(0x1d1)](_0x148485))[_0x116c54(0x1f8)](),'unitId':_0x148485,'threadId':_0x1e5319,'mention':_0x1b9cdf,'content':_0x289772,'replyId':_0x1d0d23},_0x1a379=await this[_0x116c54(0x1f2)][_0x116c54(0x200)]('/universer-api/comment/unit/'+_0x148485+_0x116c54(0x202),{'body':_0xd50343});return!_0x1a379[_0x116c54(0x1e1)][_0x116c54(0x18a)]||_0x1a379[_0x116c54(0x1e1)]['error']['code']===0x1;}async['resolveComment'](_0x57b868){const _0x2f828a=_0x8e74c2,{unitId:_0x469947}=_0x57b868,_0x40f299=_0x57b868[_0x2f828a(0x1bb)],_0x4b1450={'memberId':this[_0x2f828a(0x201)][_0x2f828a(0x1eb)]()['userID'],'unitId':_0x469947,'threadId':_0x40f299,'solved':_0x57b868[_0x2f828a(0x20d)]?_0x551ddc[_0x2f828a(0x1bf)]:_0x551ddc[_0x2f828a(0x19b)]},_0x28394c=await this[_0x2f828a(0x1f2)][_0x2f828a(0x200)](_0x2f828a(0x1b3)+_0x469947+'/solved',{'body':_0x4b1450});return!_0x28394c[_0x2f828a(0x1e1)][_0x2f828a(0x18a)]||_0x28394c[_0x2f828a(0x1e1)][_0x2f828a(0x18a)][_0x2f828a(0x1b4)]===0x1;}async[_0x8e74c2(0x18e)](_0x1ed241,_0x3c37a0,_0x3ebf5d,_0x5e4492){const _0x1db10b=_0x8e74c2,_0x531762={'memberId':(await this[_0x1db10b(0x1c5)]['requireSession'](_0x1ed241))[_0x1db10b(0x1f8)](),'threadId':_0x3ebf5d,'replyId':_0x5e4492,'unitId':_0x1ed241},_0x4b5597=await this['_httpService'][_0x1db10b(0x200)](_0x1db10b(0x1b3)+_0x1ed241+'/delete',{'body':_0x531762});return!_0x4b5597[_0x1db10b(0x1e1)][_0x1db10b(0x18a)]||_0x4b5597[_0x1db10b(0x1e1)][_0x1db10b(0x18a)][_0x1db10b(0x1b4)]===0x1;}async[_0x8e74c2(0x1b7)](_0x5ea5dc,_0x1188ff,_0x48aa5b){const _0x14f9b3=_0x8e74c2,_0x20109b={'unitId':_0x5ea5dc,'threadId':_0x48aa5b},_0x13db2c=await this[_0x14f9b3(0x1f2)][_0x14f9b3(0x200)](_0x14f9b3(0x1b3)+_0x5ea5dc+_0x14f9b3(0x1fd),{'body':_0x20109b}),_0x16d296=_0x48aa5b[_0x14f9b3(0x206)](_0x4aab23=>_0x53f8c0(_0x13db2c[_0x14f9b3(0x1e1)]['comments'][_0x4aab23],_0x5ea5dc,_0x1188ff))[_0x14f9b3(0x1cc)](Boolean);return Object[_0x14f9b3(0x1e0)](_0x13db2c[_0x14f9b3(0x1e1)]['users'])['forEach'](_0x16d32d=>{const _0x8520c=_0x14f9b3;this['_userService'][_0x8520c(0x1e4)](_0x16d32d);}),_0x16d296;}[_0x8e74c2(0x1e5)](_0x6b0e8c){const _0x40459e=_0x8e74c2;return{'id':_0x6b0e8c['id'],'threadId':_0x6b0e8c[_0x40459e(0x1bb)],'ref':_0x6b0e8c[_0x40459e(0x1c9)]};}};_0x15d3de=_0x2ed38e([_0x403db3(0x0,_0x92db82['Inject'](_0x206d9f[_0x8e74c2(0x18c)])),_0x403db3(0x1,_0x92db82['Inject'](_0x92db82[_0x8e74c2(0x1d0)])),_0x403db3(0x2,_0x92db82[_0x8e74c2(0x1d7)](_0x3f0ee1[_0x8e74c2(0x19c)]))],_0x15d3de);var _0x1b8f85=Object['getOwnPropertyDescriptor'],_0x33864e=(_0x4d0d48,_0x32578d,_0x2912b4,_0x4add0d)=>{for(var _0x3e7161=_0x4add0d>0x1?void 0x0:_0x4add0d?_0x1b8f85(_0x32578d,_0x2912b4):_0x32578d,_0x537b6d=_0x4d0d48['length']-0x1,_0x1f0dc8;_0x537b6d>=0x0;_0x537b6d--)(_0x1f0dc8=_0x4d0d48[_0x537b6d])&&(_0x3e7161=_0x1f0dc8(_0x3e7161)||_0x3e7161);return _0x3e7161;},_0x864310=(_0x312da2,_0x29f58c)=>(_0x2e1df1,_0x2a0301)=>_0x29f58c(_0x2e1df1,_0x2a0301,_0x312da2);let _0x1b82f1=class extends _0x92db82[_0x8e74c2(0x1a7)]{constructor(_0x381e41,_0x5812dc){const _0x49643f=_0x8e74c2;super(),this[_0x49643f(0x18d)]=_0x381e41,this['_threadCommentDataSource']=_0x5812dc,this[_0x49643f(0x1ac)]();}[_0x8e74c2(0x1ac)](){const _0x1a4247=_0x8e74c2;this[_0x1a4247(0x18d)][_0x1a4247(0x1aa)]=this[_0x1a4247(0x1ea)],this[_0x1a4247(0x18d)][_0x1a4247(0x1a9)]=!0x1;}};_0x1b82f1=_0x33864e([_0x864310(0x0,_0x3dde62['IThreadCommentDataSourceService']),_0x864310(0x1,_0x92db82[_0x8e74c2(0x1d7)](_0x15d3de))],_0x1b82f1);var _0x527b89=Object['defineProperty'],_0x185feb=Object['getOwnPropertyDescriptor'],_0x1a4e11=(_0x301d90,_0x2afb90,_0x43ef52)=>_0x2afb90 in _0x301d90?_0x527b89(_0x301d90,_0x2afb90,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x43ef52}):_0x301d90[_0x2afb90]=_0x43ef52,_0x3538c5=(_0x223611,_0x1cd909,_0x25dca3,_0x28d4e5)=>{const _0x4ef8d5=_0x8e74c2;for(var _0x7a5ead=_0x28d4e5>0x1?void 0x0:_0x28d4e5?_0x185feb(_0x1cd909,_0x25dca3):_0x1cd909,_0x3daec4=_0x223611[_0x4ef8d5(0x193)]-0x1,_0x1644f0;_0x3daec4>=0x0;_0x3daec4--)(_0x1644f0=_0x223611[_0x3daec4])&&(_0x7a5ead=_0x1644f0(_0x7a5ead)||_0x7a5ead);return _0x7a5ead;},_0x207ce0=(_0x3b783e,_0x550928)=>(_0x2c4955,_0x348e30)=>_0x550928(_0x2c4955,_0x348e30,_0x3b783e),_0x30e433=(_0x4c7e6f,_0x39628f,_0x114e97)=>_0x1a4e11(_0x4c7e6f,typeof _0x39628f!=_0x8e74c2(0x203)?_0x39628f+'':_0x39628f,_0x114e97);_0x4afe61['UniverThreadCommentDataSourcePlugin']=class extends _0x92db82[_0x8e74c2(0x1ce)]{constructor(_0x16114d=_0x22114d,_0x360940,_0x55096d){const _0x3cbb9e=_0x8e74c2;super(),this['_config']=_0x16114d,this[_0x3cbb9e(0x20b)]=_0x360940,this['_configService']=_0x55096d;const {..._0x3c8fa4}=_0x92db82[_0x3cbb9e(0x1c7)]({},_0x22114d,this[_0x3cbb9e(0x204)]);this['_configService'][_0x3cbb9e(0x1a4)](_0x410026,_0x3c8fa4);}[_0x8e74c2(0x1c6)](){[[_0x15d3de],[_0x1b82f1],[_0x2b59de]]['forEach'](_0x332ff7=>{const _0x52b7a2=_0x252d;this[_0x52b7a2(0x20b)]['add'](_0x332ff7);});}[_0x8e74c2(0x1d4)](){const _0x364541=_0x8e74c2;this['_injector'][_0x364541(0x1dd)](_0x1b82f1),this['_injector'][_0x364541(0x1dd)](_0x2b59de);}},_0x30e433(_0x4afe61[_0x8e74c2(0x190)],_0x8e74c2(0x1e3),_0x2b801f),_0x30e433(_0x4afe61[_0x8e74c2(0x190)],_0x8e74c2(0x1b5),_0x92db82['UniverInstanceType']['UNIVER_UNKNOWN']),_0x4afe61[_0x8e74c2(0x190)]=_0x3538c5([_0x92db82[_0x8e74c2(0x1fe)](_0x164632['UniverThreadCommentUIPlugin'],_0x3f0ee1['UniverCollaborationClientPlugin'],_0x3ada5f[_0x8e74c2(0x1da)]),_0x207ce0(0x1,_0x92db82[_0x8e74c2(0x1d7)](_0x92db82[_0x8e74c2(0x1a6)])),_0x207ce0(0x2,_0x92db82[_0x8e74c2(0x1ae)])],_0x4afe61['UniverThreadCommentDataSourcePlugin']),Object[_0x8e74c2(0x194)](_0x4afe61,Symbol[_0x8e74c2(0x1ef)],{'value':_0x8e74c2(0x199)});}));function _0x252d(_0x1bfa8,_0x298735){_0x1bfa8=_0x1bfa8-0x18a;const _0x35a6d6=_0x35a6();let _0x252da4=_0x35a6d6[_0x1bfa8];return _0x252da4;}function _0x35a6(){const _0x499eb8=['disposeWithMe','IConfigService','/universer-api/user/list','UniverCore','CustomRangeType','COMMENT','/universer-api/comment/unit/','code','type','856580qerIsf','listComments','_init','ThreadCommentModel','dayjs','threadId','slice','UniverNetwork','Edit','Solved','delete','YYYY/MM/DD\x20HH:mm','reply','bufferTime','object','_sessionService','onStarting','merge','size','ref','subscribe','UNRECOGNIZED','filter','add','Plugin','find','UserManagerService','requireSession','createTimestamp','stringify','onReady','rangeType','updateComment','Inject','UniverProCollaborationClient','forEach','UniverLicensePlugin','302100qVGovs','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','replies','customRanges','values','body','@univerjs/network','pluginName','addUser','saveCommentToSnapshot','CommentService','thread-comment-data-source.config','_threadCommentModel','root','_threadCommentDataSource','getCurrentUser','content','1718150YyAUEa','personId','toStringTag','_commentService','@univerjs-pro/collaboration-client','_httpService','user','parentId','7425495vsAxOg','Unknown','Delete','getMemberID','commentUpdate$','solved','amd','addComment','/list','DependentOn','109264WNtXao','post','_userService','/edit','symbol','_config','2593434lCkAkI','map','parse','format','getUnit','userID','_injector','/add','resolved','91ukVzKn','error','getComment','HTTPService','_threadCommentDataSourceService','deleteComment','getOwnPropertyDescriptor','UniverThreadCommentDataSourcePlugin','exports','userId','length','defineProperty','@univerjs/thread-comment','getUser','rxjs','UniverProThreadCommentDatasource','Module','Reply','OpenOrReOpen','CollaborationSessionService','unitId','UniverThreadCommentUi','pipe','Solve','rangeId','comment','Add','setConfig','replyId','Injector','Disposable','3215bNELiz','syncUpdateMutationToColla','dataSource','340nwhzpC','_initDataSource'];_0x35a6=function(){return _0x499eb8;};return _0x35a6();}
|
|
1
|
+
function _0x1904(_0x511091,_0x3eb19d){_0x511091=_0x511091-0x1f1;const _0x276e43=_0x276e();let _0x19046d=_0x276e43[_0x511091];return _0x19046d;}function _0x276e(){const _0x40c426=['listComments','format','content','UserManagerService','UniverThreadCommentUIPlugin','/solved','map','users','UNRECOGNIZED','object','userID','Reply','UNIVER_UNKNOWN','10234315ZZxlCI','payload','userId','Solved','user','error','OpenOrReOpen','IThreadCommentDataSourceService','replyId','UniverCollaborationClientPlugin','forEach','amd','CommentService','resolveComment','_httpService','resolved','3285819hLeAkg','customRanges','UniverThreadCommentDataSourcePlugin','rangeId','filter','length','/edit','getComment','352752FCMPjj','onReady','dataSource','syncUpdateMutationToColla','disposeWithMe','4094615HESdCo','parse','40rlzBCq','requireSession','function','body','getCurrentUser','ref','slice','@univerjs-pro/collaboration-client','_threadCommentDataSource','_init','/delete','_userService','getMemberID','saveCommentToSnapshot','bufferTime','_injector','code','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','deleteComment','7199382NPtRMF','/add','get','post','UniverThreadCommentUi','UniverNetwork','676304yUBxvH','solved','UniverLicensePlugin','createTimestamp','personId','getUnit','UniverThreadComment','Edit','/list','root','UniverProThreadCommentDatasource','HTTPService','_sessionService','4NYcyOM','comments','type','commentUpdate$','replies','rxjs','@univerjs-pro/license','/universer-api/comment/unit/','threadId','/universer-api/user/list','stringify','UniverInstanceType','rangeType','Delete','@univerjs/network','toStringTag','CollaborationSessionService','getOwnPropertyDescriptor','pluginName','exports','find','defineProperty','4158189bguVLt','COMMENT','unitId','Add','Solve','Disposable','pipe','add','updateComment','thread-comment-data-source.config','addUser','setConfig','subscribe','dayjs','UniverCore','onStarting','IConfigService','Inject','@univerjs/core','parentId','Injector','_config','addComment','CustomRangeType','Module','size','/reply','comment','_threadCommentModel','merge','Unknown'];_0x276e=function(){return _0x40c426;};return _0x276e();}(function(_0x326157,_0x31f369){const _0x252a13=_0x1904,_0x49238b=_0x326157();while(!![]){try{const _0x11f7b9=-parseInt(_0x252a13(0x22c))/0x1+parseInt(_0x252a13(0x20b))/0x2+parseInt(_0x252a13(0x24f))/0x3+-parseInt(_0x252a13(0x239))/0x4*(parseInt(_0x252a13(0x210))/0x5)+parseInt(_0x252a13(0x226))/0x6+parseInt(_0x252a13(0x1f3))/0x7+-parseInt(_0x252a13(0x212))/0x8*(parseInt(_0x252a13(0x203))/0x9);if(_0x11f7b9===_0x31f369)break;else _0x49238b['push'](_0x49238b['shift']());}catch(_0x1869c8){_0x49238b['push'](_0x49238b['shift']());}}}(_0x276e,0xdca13),function(_0x22dfae,_0x1efa96){const _0xeec76e=_0x1904;typeof exports==_0xeec76e(0x277)&&typeof module<'u'?_0x1efa96(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==_0xeec76e(0x214)&&define[_0xeec76e(0x1fe)]?define([_0xeec76e(0x24c),_0xeec76e(0x219),_0xeec76e(0x23f),_0xeec76e(0x261),'@univerjs/thread-comment-ui','@univerjs/thread-comment',_0xeec76e(0x23e),_0xeec76e(0x247)],_0x1efa96):(_0x22dfae=typeof globalThis<'u'?globalThis:_0x22dfae||self,_0x1efa96(_0x22dfae[_0xeec76e(0x236)]={},_0x22dfae['UniverProCollaborationClient'],_0x22dfae['UniverProLicense'],_0x22dfae[_0xeec76e(0x25d)],_0x22dfae[_0xeec76e(0x22a)],_0x22dfae[_0xeec76e(0x232)],_0x22dfae[_0xeec76e(0x23e)],_0x22dfae[_0xeec76e(0x22b)]));}(this,function(_0x35afed,_0x30719c,_0x292145,_0x47843b,_0x26034b,_0x57d0a4,_0x5c6c51,_0x1c3ab0){'use strict';const _0x570821=_0x1904;const _0x48b96f='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x373334=(_0x298e00=>(_0x298e00[_0x298e00[_0x570821(0x1f9)]=0x0]=_0x570821(0x1f9),_0x298e00[_0x298e00[_0x570821(0x1f6)]=0x1]='Solved',_0x298e00[_0x298e00[_0x570821(0x276)]=-0x1]=_0x570821(0x276),_0x298e00))(_0x373334||{}),_0x27fe43=(_0x133f32=>(_0x133f32[_0x133f32[_0x570821(0x26d)]=0x0]=_0x570821(0x26d),_0x133f32[_0x133f32['Add']=0x1]=_0x570821(0x252),_0x133f32[_0x133f32['Reply']=0x2]=_0x570821(0x1f1),_0x133f32[_0x133f32[_0x570821(0x233)]=0x3]='Edit',_0x133f32[_0x133f32['Delete']=0x4]=_0x570821(0x246),_0x133f32[_0x133f32['Solve']=0x5]=_0x570821(0x253),_0x133f32[_0x133f32['UNRECOGNIZED']=-0x1]=_0x570821(0x276),_0x133f32))(_0x27fe43||{});const _0x58e970=_0xc4d27b=>_0x47843b['dayjs'](new Date(+_0xc4d27b))[_0x570821(0x26f)](_0x570821(0x223)),_0x50dc7d=async(_0x1f0fb4,_0x1dc49e)=>{const _0x4a658f=_0x570821,_0x29818f=_0x1f0fb4[_0x4a658f(0x228)](_0x47843b[_0x4a658f(0x271)]),_0x5798ed=_0x1f0fb4[_0x4a658f(0x228)](_0x1c3ab0[_0x4a658f(0x237)]);_0x1dc49e[_0x4a658f(0x1fd)](_0x124a0f=>{_0x29818f['getUser'](_0x124a0f)&&_0x1dc49e['delete'](_0x124a0f);}),_0x1dc49e[_0x4a658f(0x268)]&&(await _0x5798ed[_0x4a658f(0x228)](_0x4a658f(0x242),{'params':{'userIDs':[..._0x1dc49e]}}))[_0x4a658f(0x215)][_0x4a658f(0x275)][_0x4a658f(0x1fd)](_0x41c8c0=>{_0x41c8c0&&_0x29818f['addUser'](_0x41c8c0);});};var _0x29f3fd=Object[_0x570821(0x24a)],_0x3fd049=(_0x180862,_0x2bf236,_0x1f88d7,_0x2bc966)=>{for(var _0x5d5d2e=_0x2bc966>0x1?void 0x0:_0x2bc966?_0x29f3fd(_0x2bf236,_0x1f88d7):_0x2bf236,_0x2c653a=_0x180862['length']-0x1,_0x29ad54;_0x2c653a>=0x0;_0x2c653a--)(_0x29ad54=_0x180862[_0x2c653a])&&(_0x5d5d2e=_0x29ad54(_0x5d5d2e)||_0x5d5d2e);return _0x5d5d2e;},_0x1bf2ef=(_0x558ef3,_0x8ebbb1)=>(_0x54bec5,_0x442f37)=>_0x8ebbb1(_0x54bec5,_0x442f37,_0x558ef3);let _0x17121c=class extends _0x47843b[_0x570821(0x254)]{constructor(_0x4fe997,_0x103d77,_0x4121fc,_0x53bac3){const _0xe5fe09=_0x570821;super(),this['_commentService']=_0x4fe997,this[_0xe5fe09(0x26b)]=_0x103d77,this[_0xe5fe09(0x21d)]=_0x4121fc,this[_0xe5fe09(0x221)]=_0x53bac3,this[_0xe5fe09(0x21b)](),this['_initUserSync']();}['_initUserSync'](){const _0x1fe28c=_0x570821;this[_0x1fe28c(0x20f)](this[_0x1fe28c(0x26b)][_0x1fe28c(0x23c)][_0x1fe28c(0x255)](_0x5c6c51[_0x1fe28c(0x220)](0x10))[_0x1fe28c(0x25b)](_0x38ea0b=>{const _0x3ba430=_0x1fe28c,_0x1017e2=new Set();_0x38ea0b[_0x3ba430(0x1fd)](_0x418e40=>{const _0x5f1a1b=_0x3ba430;if(_0x418e40[_0x5f1a1b(0x23b)]===_0x5f1a1b(0x256)){const _0x145a99=_0x418e40[_0x5f1a1b(0x1f4)][_0x5f1a1b(0x230)];_0x1017e2['add'](_0x145a99);}}),_0x50dc7d(this['_injector'],_0x1017e2);}));}[_0x570821(0x21b)](){const _0x245567=_0x570821;this[_0x245567(0x20f)](this['_commentService']['commentUpdate$'][_0x245567(0x25b)](async _0x540daa=>{const _0x248a44=_0x245567;var _0x3adefa,_0x5bd88d,_0x2ef0aa,_0x44c5d6;const _0x5d1d8b=(_0x3adefa=this[_0x248a44(0x26b)][_0x248a44(0x231)](_0x540daa[_0x248a44(0x251)])['find'](_0x26f403=>_0x26f403[_0x248a44(0x241)]===_0x540daa[_0x248a44(0x241)]))==null?void 0x0:_0x3adefa[_0x248a44(0x235)];if(!_0x5d1d8b)return;const {unitId:_0x3caa00,subUnitId:_0x31f402}=_0x5d1d8b;switch(_0x540daa[_0x248a44(0x1f7)]&&this[_0x248a44(0x21d)]['addUser'](_0x540daa[_0x248a44(0x1f7)]),_0x540daa['type']){case _0x27fe43[_0x248a44(0x252)]:break;case _0x27fe43[_0x248a44(0x1f1)]:{this[_0x248a44(0x26b)][_0x248a44(0x265)](_0x3caa00,_0x31f402,{'unitId':_0x3caa00,'subUnitId':_0x31f402,'ref':'','id':_0x540daa[_0x248a44(0x1fb)],'dT':_0x58e970(+_0x540daa['createTimestamp']),'threadId':_0x540daa[_0x248a44(0x241)],'personId':(_0x2ef0aa=(_0x5bd88d=_0x540daa[_0x248a44(0x1f7)])==null?void 0x0:_0x5bd88d[_0x248a44(0x278)])!=null?_0x2ef0aa:_0x540daa[_0x248a44(0x1f5)],'text':JSON[_0x248a44(0x211)](_0x540daa[_0x248a44(0x270)]),'parentId':_0x5d1d8b['id']});break;}case _0x27fe43[_0x248a44(0x246)]:{const _0x3f7322=this['_threadCommentModel'][_0x248a44(0x20a)](_0x3caa00,_0x31f402,_0x540daa[_0x248a44(0x1fb)]);_0x3f7322&&_0x3f7322[_0x248a44(0x262)]&&this[_0x248a44(0x26b)][_0x248a44(0x225)](_0x3caa00,_0x31f402,_0x540daa[_0x248a44(0x1fb)]);break;}case _0x27fe43['Edit']:{this['_threadCommentModel']['updateComment'](_0x3caa00,_0x31f402,{'commentId':_0x540daa[_0x248a44(0x1fb)],'text':JSON[_0x248a44(0x211)](_0x540daa[_0x248a44(0x270)])});break;}case _0x27fe43[_0x248a44(0x253)]:{const _0x43533d=(_0x44c5d6=this[_0x248a44(0x26b)][_0x248a44(0x231)](_0x540daa['unitId'])[_0x248a44(0x24d)](_0x1f18ac=>_0x1f18ac[_0x248a44(0x241)]===_0x540daa['threadId']))==null?void 0x0:_0x44c5d6['root'];_0x43533d&&this[_0x248a44(0x26b)][_0x248a44(0x200)](_0x3caa00,_0x31f402,_0x43533d['id'],_0x540daa[_0x248a44(0x22d)]===_0x373334[_0x248a44(0x1f6)]);break;}}}));}};_0x17121c=_0x3fd049([_0x1bf2ef(0x0,_0x47843b[_0x570821(0x260)](_0x30719c[_0x570821(0x1ff)])),_0x1bf2ef(0x1,_0x47843b[_0x570821(0x260)](_0x57d0a4['ThreadCommentModel'])),_0x1bf2ef(0x2,_0x47843b[_0x570821(0x260)](_0x47843b[_0x570821(0x271)])),_0x1bf2ef(0x3,_0x47843b[_0x570821(0x260)](_0x47843b[_0x570821(0x263)]))],_0x17121c);const _0x1934d7=_0x570821(0x258),_0x1a8cb5={};var _0x56e7bd=Object['getOwnPropertyDescriptor'],_0x28150d=(_0x2a6623,_0x2926dc,_0x35d619,_0x4daa25)=>{const _0x81a6d6=_0x570821;for(var _0x2e8cd1=_0x4daa25>0x1?void 0x0:_0x4daa25?_0x56e7bd(_0x2926dc,_0x35d619):_0x2926dc,_0x60c0e8=_0x2a6623[_0x81a6d6(0x208)]-0x1,_0x51883f;_0x60c0e8>=0x0;_0x60c0e8--)(_0x51883f=_0x2a6623[_0x60c0e8])&&(_0x2e8cd1=_0x51883f(_0x2e8cd1)||_0x2e8cd1);return _0x2e8cd1;},_0xa426a8=(_0x4ff543,_0x393e50)=>(_0x5cb6a8,_0x545683)=>_0x393e50(_0x5cb6a8,_0x545683,_0x4ff543);function _0x534bcc(_0x43978b,_0x420f7a){const _0x2f2fe5=_0x570821,_0x19726b=_0x43978b[_0x2f2fe5(0x23d)][0x0];return{..._0x420f7a,'id':_0x19726b[_0x2f2fe5(0x1fb)],'resolved':_0x43978b['solved']===0x1,'dT':_0x58e970(_0x19726b[_0x2f2fe5(0x22f)]),'personId':_0x19726b[_0x2f2fe5(0x1f5)],'threadId':_0x19726b[_0x2f2fe5(0x241)]};}function _0x21ce75(_0x137712,_0x3e537f,_0xb7432){const _0x4d1d2e=_0x570821;var _0x3ab6d8,_0x566367;if(((_0x566367=(_0x3ab6d8=_0x137712==null?void 0x0:_0x137712[_0x4d1d2e(0x23d)])==null?void 0x0:_0x3ab6d8['length'])!=null?_0x566367:0x0)>0x0){const _0x3bd8ce=(_0x24466a,_0x429806)=>({'id':_0x24466a[_0x4d1d2e(0x1fb)],'threadId':_0x24466a['threadId'],'dT':_0x58e970(_0x24466a['createTimestamp']),'personId':_0x24466a[_0x4d1d2e(0x1f5)],'resolved':_0x137712[_0x4d1d2e(0x22d)]===_0x373334['Solved'],'unitId':_0x3e537f,'subUnitId':_0xb7432,'text':JSON['parse'](_0x24466a[_0x4d1d2e(0x270)]),'parentId':_0x429806}),_0x4ecaff=_0x3bd8ce(_0x137712[_0x4d1d2e(0x23d)][0x0]);return{..._0x4ecaff,'children':_0x137712[_0x4d1d2e(0x23d)][_0x4d1d2e(0x218)](0x1)[_0x4d1d2e(0x274)](_0x2632bf=>_0x3bd8ce(_0x2632bf,_0x4ecaff['id']))};}return null;}let _0x388c17=class{constructor(_0x421c94,_0x526c5d,_0x428a78){const _0x17cf99=_0x570821;this[_0x17cf99(0x201)]=_0x421c94,this[_0x17cf99(0x21d)]=_0x526c5d,this[_0x17cf99(0x238)]=_0x428a78;}async['addComment'](_0x48794a){const _0x303827=_0x570821;var _0x2cf995,_0x1d89e1;const {parentId:_0xcbaa45,unitId:_0x41f235,text:_0x20d3eb,threadId:_0x25228b}=_0x48794a,_0x106551=(_0x1d89e1=(_0x2cf995=_0x20d3eb[_0x303827(0x204)])==null?void 0x0:_0x2cf995['filter'](_0xb83259=>_0xb83259[_0x303827(0x245)]===_0x47843b[_0x303827(0x266)]['COMMENT'])[_0x303827(0x274)](_0x322300=>_0x322300[_0x303827(0x206)]))!=null?_0x1d89e1:[],_0x46d3ad=JSON[_0x303827(0x243)](_0x20d3eb),_0x4385df=(await this[_0x303827(0x238)][_0x303827(0x213)](_0x41f235))['getMemberID']();if(_0xcbaa45){const _0x5c72a8={'memberId':_0x4385df,'unitId':_0x41f235,'content':_0x46d3ad,'mention':_0x106551,'threadId':_0x25228b},_0x258ded=(await this['_httpService'][_0x303827(0x229)](_0x303827(0x240)+_0x41f235+_0x303827(0x269),{'body':_0x5c72a8}))[_0x303827(0x215)]['reply'];return{..._0x48794a,'id':_0x258ded[_0x303827(0x1fb)],'dT':_0x47843b[_0x303827(0x25c)](+_0x258ded[_0x303827(0x22f)])['format'](_0x303827(0x223)),'personId':_0x258ded[_0x303827(0x1f5)]};}else{const _0x2e71d2={'memberId':_0x4385df,'unitId':_0x41f235,'content':_0x46d3ad,'mention':_0x106551},_0x33bed5=await this['_httpService'][_0x303827(0x229)](_0x303827(0x240)+_0x41f235+_0x303827(0x227),{'body':_0x2e71d2});return _0x534bcc(_0x33bed5[_0x303827(0x215)][_0x303827(0x26a)],_0x48794a);}}async[_0x570821(0x257)](_0xcef057){const _0x5d82d6=_0x570821;var _0x2d77f9,_0x5bded2;const {text:_0x54ca3c,unitId:_0x36a6c5}=_0xcef057,_0x2cf800=(_0x5bded2=(_0x2d77f9=_0x54ca3c[_0x5d82d6(0x204)])==null?void 0x0:_0x2d77f9[_0x5d82d6(0x207)](_0x77707d=>_0x77707d[_0x5d82d6(0x245)]===_0x47843b['CustomRangeType'][_0x5d82d6(0x250)])[_0x5d82d6(0x274)](_0x15ec8a=>_0x15ec8a['rangeId']))!=null?_0x5bded2:[],_0x29e2ad=JSON['stringify'](_0x54ca3c),_0x2ee3e8=_0xcef057[_0x5d82d6(0x241)],_0x2d7d79=_0xcef057['id'],_0x575656={'memberId':(await this[_0x5d82d6(0x238)][_0x5d82d6(0x213)](_0x36a6c5))[_0x5d82d6(0x21e)](),'unitId':_0x36a6c5,'threadId':_0x2ee3e8,'mention':_0x2cf800,'content':_0x29e2ad,'replyId':_0x2d7d79},_0x3aab37=await this['_httpService'][_0x5d82d6(0x229)](_0x5d82d6(0x240)+_0x36a6c5+_0x5d82d6(0x209),{'body':_0x575656});return!_0x3aab37['body'][_0x5d82d6(0x1f8)]||_0x3aab37[_0x5d82d6(0x215)][_0x5d82d6(0x1f8)]['code']===0x1;}async['resolveComment'](_0x3f4670){const _0x2a6f3e=_0x570821,{unitId:_0x94858}=_0x3f4670,_0x23eb71=_0x3f4670['threadId'],_0x25531b={'memberId':this[_0x2a6f3e(0x21d)][_0x2a6f3e(0x216)]()['userID'],'unitId':_0x94858,'threadId':_0x23eb71,'solved':_0x3f4670[_0x2a6f3e(0x202)]?_0x373334[_0x2a6f3e(0x1f6)]:_0x373334[_0x2a6f3e(0x1f9)]},_0x2f8456=await this['_httpService']['post'](_0x2a6f3e(0x240)+_0x94858+_0x2a6f3e(0x273),{'body':_0x25531b});return!_0x2f8456[_0x2a6f3e(0x215)][_0x2a6f3e(0x1f8)]||_0x2f8456[_0x2a6f3e(0x215)]['error'][_0x2a6f3e(0x222)]===0x1;}async[_0x570821(0x225)](_0x81da4f,_0x106420,_0x273c43,_0x2e0c5e){const _0x9ad671=_0x570821,_0x2112fe={'memberId':(await this[_0x9ad671(0x238)][_0x9ad671(0x213)](_0x81da4f))[_0x9ad671(0x21e)](),'threadId':_0x273c43,'replyId':_0x2e0c5e,'unitId':_0x81da4f},_0x4eee1c=await this['_httpService'][_0x9ad671(0x229)]('/universer-api/comment/unit/'+_0x81da4f+_0x9ad671(0x21c),{'body':_0x2112fe});return!_0x4eee1c[_0x9ad671(0x215)][_0x9ad671(0x1f8)]||_0x4eee1c['body'][_0x9ad671(0x1f8)][_0x9ad671(0x222)]===0x1;}async[_0x570821(0x26e)](_0x2b514e,_0x16313b,_0x2cc15b){const _0x51dfe8=_0x570821,_0x295850={'unitId':_0x2b514e,'threadId':_0x2cc15b},_0x330ef0=await this['_httpService']['post'](_0x51dfe8(0x240)+_0x2b514e+_0x51dfe8(0x234),{'body':_0x295850}),_0x5424e6=_0x2cc15b[_0x51dfe8(0x274)](_0x14fdba=>_0x21ce75(_0x330ef0[_0x51dfe8(0x215)][_0x51dfe8(0x23a)][_0x14fdba],_0x2b514e,_0x16313b))['filter'](Boolean);return Object['values'](_0x330ef0[_0x51dfe8(0x215)]['users'])['forEach'](_0xbb6097=>{const _0x1d0ed9=_0x51dfe8;this[_0x1d0ed9(0x21d)][_0x1d0ed9(0x259)](_0xbb6097);}),_0x5424e6;}[_0x570821(0x21f)](_0x547ab4){const _0xe35383=_0x570821;return{'id':_0x547ab4['id'],'threadId':_0x547ab4[_0xe35383(0x241)],'ref':_0x547ab4[_0xe35383(0x217)]};}};_0x388c17=_0x28150d([_0xa426a8(0x0,_0x47843b['Inject'](_0x1c3ab0['HTTPService'])),_0xa426a8(0x1,_0x47843b[_0x570821(0x260)](_0x47843b[_0x570821(0x271)])),_0xa426a8(0x2,_0x47843b[_0x570821(0x260)](_0x30719c[_0x570821(0x249)]))],_0x388c17);var _0x282b77=Object[_0x570821(0x24a)],_0x3e2342=(_0x1deabe,_0x2655df,_0x4b6558,_0x478796)=>{const _0x18c465=_0x570821;for(var _0x2ea153=_0x478796>0x1?void 0x0:_0x478796?_0x282b77(_0x2655df,_0x4b6558):_0x2655df,_0x3bcfc7=_0x1deabe[_0x18c465(0x208)]-0x1,_0x322137;_0x3bcfc7>=0x0;_0x3bcfc7--)(_0x322137=_0x1deabe[_0x3bcfc7])&&(_0x2ea153=_0x322137(_0x2ea153)||_0x2ea153);return _0x2ea153;},_0x2c68a7=(_0x17e1f0,_0x38a79f)=>(_0x2f6149,_0x187a30)=>_0x38a79f(_0x2f6149,_0x187a30,_0x17e1f0);let _0x2cdbd3=class extends _0x47843b['Disposable']{constructor(_0x20ddcc,_0x2f4a85){const _0x5e054e=_0x570821;super(),this[_0x5e054e(0x224)]=_0x20ddcc,this['_threadCommentDataSource']=_0x2f4a85,this['_initDataSource']();}['_initDataSource'](){const _0x4ae3d4=_0x570821;this[_0x4ae3d4(0x224)][_0x4ae3d4(0x20d)]=this[_0x4ae3d4(0x21a)],this['_threadCommentDataSourceService'][_0x4ae3d4(0x20e)]=!0x1;}};_0x2cdbd3=_0x3e2342([_0x2c68a7(0x0,_0x57d0a4[_0x570821(0x1fa)]),_0x2c68a7(0x1,_0x47843b[_0x570821(0x260)](_0x388c17))],_0x2cdbd3);var _0x1acf7b=Object[_0x570821(0x24e)],_0xb34213=Object[_0x570821(0x24a)],_0x5c025f=(_0x52d394,_0x8cef88,_0x2313a8)=>_0x8cef88 in _0x52d394?_0x1acf7b(_0x52d394,_0x8cef88,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2313a8}):_0x52d394[_0x8cef88]=_0x2313a8,_0x3274d8=(_0x1c954a,_0x58163b,_0x469d13,_0x503bed)=>{const _0x18a7f7=_0x570821;for(var _0x406453=_0x503bed>0x1?void 0x0:_0x503bed?_0xb34213(_0x58163b,_0x469d13):_0x58163b,_0x13ac22=_0x1c954a[_0x18a7f7(0x208)]-0x1,_0x349e9c;_0x13ac22>=0x0;_0x13ac22--)(_0x349e9c=_0x1c954a[_0x13ac22])&&(_0x406453=_0x349e9c(_0x406453)||_0x406453);return _0x406453;},_0x269114=(_0x2bf4ad,_0x5da607)=>(_0x434d23,_0x2b27a0)=>_0x5da607(_0x434d23,_0x2b27a0,_0x2bf4ad),_0x4f74f5=(_0x22758a,_0x2f19c4,_0x559d79)=>_0x5c025f(_0x22758a,typeof _0x2f19c4!='symbol'?_0x2f19c4+'':_0x2f19c4,_0x559d79);_0x35afed[_0x570821(0x205)]=class extends _0x47843b['Plugin']{constructor(_0x2923ec=_0x1a8cb5,_0x2730f7,_0x47521a){const _0x3d5080=_0x570821;super(),this[_0x3d5080(0x264)]=_0x2923ec,this[_0x3d5080(0x221)]=_0x2730f7,this['_configService']=_0x47521a;const {..._0x4d60c3}=_0x47843b[_0x3d5080(0x26c)]({},_0x1a8cb5,this['_config']);this['_configService'][_0x3d5080(0x25a)](_0x1934d7,_0x4d60c3);}[_0x570821(0x25e)](){[[_0x388c17],[_0x2cdbd3],[_0x17121c]]['forEach'](_0x1484a0=>{const _0x1611d3=_0x1904;this['_injector'][_0x1611d3(0x256)](_0x1484a0);});}[_0x570821(0x20c)](){const _0x3368e1=_0x570821;this[_0x3368e1(0x221)][_0x3368e1(0x228)](_0x2cdbd3),this['_injector'][_0x3368e1(0x228)](_0x17121c);}},_0x4f74f5(_0x35afed['UniverThreadCommentDataSourcePlugin'],_0x570821(0x24b),_0x48b96f),_0x4f74f5(_0x35afed[_0x570821(0x205)],_0x570821(0x23b),_0x47843b[_0x570821(0x244)][_0x570821(0x1f2)]),_0x35afed['UniverThreadCommentDataSourcePlugin']=_0x3274d8([_0x47843b['DependentOn'](_0x26034b[_0x570821(0x272)],_0x30719c[_0x570821(0x1fc)],_0x292145[_0x570821(0x22e)]),_0x269114(0x1,_0x47843b[_0x570821(0x260)](_0x47843b[_0x570821(0x263)])),_0x269114(0x2,_0x47843b[_0x570821(0x25f)])],_0x35afed['UniverThreadCommentDataSourcePlugin']),Object[_0x570821(0x24e)](_0x35afed,Symbol[_0x570821(0x248)],{'value':_0x570821(0x267)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.14.0-insiders.
|
|
3
|
+
"version": "0.14.0-insiders.20251227-b250a8d",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,19 +45,19 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.14.0-insiders.
|
|
49
|
-
"@univerjs-pro/license": "0.14.0-insiders.
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.14.0-insiders.20251227-b250a8d",
|
|
49
|
+
"@univerjs-pro/license": "0.14.0-insiders.20251227-b250a8d",
|
|
50
|
+
"@univerjs/protocol": "0.1.48",
|
|
51
|
+
"@univerjs/thread-comment-ui": "0.14.0-insiders.20251227-b250a8d",
|
|
52
|
+
"@univerjs/thread-comment": "0.14.0-insiders.20251227-b250a8d",
|
|
53
|
+
"@univerjs/network": "0.14.0-insiders.20251227-b250a8d",
|
|
54
|
+
"@univerjs/core": "0.14.0-insiders.20251227-b250a8d"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
|
-
"vite": "^7.
|
|
60
|
-
"vitest": "^4.0.
|
|
59
|
+
"vite": "^7.3.0",
|
|
60
|
+
"vitest": "^4.0.16",
|
|
61
61
|
"@univerjs-infra/shared": "0.14.0"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|