@univerjs-pro/thread-comment-datasource 0.8.0-nightly.202505271607 → 0.8.0-nightly.202505281606
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 +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x4deb1c=_0x4d64;(function(_0x116328,_0x49454b){const _0x37072f=_0x4d64,_0x298eac=_0x116328();while(!![]){try{const _0x3be10a=-parseInt(_0x37072f(0x1a5))/0x1+parseInt(_0x37072f(0x1a1))/0x2*(-parseInt(_0x37072f(0x1cf))/0x3)+parseInt(_0x37072f(0x1da))/0x4+-parseInt(_0x37072f(0x177))/0x5*(-parseInt(_0x37072f(0x1a8))/0x6)+parseInt(_0x37072f(0x1ce))/0x7*(-parseInt(_0x37072f(0x1d7))/0x8)+-parseInt(_0x37072f(0x1af))/0x9*(-parseInt(_0x37072f(0x165))/0xa)+-parseInt(_0x37072f(0x19a))/0xb*(parseInt(_0x37072f(0x1d4))/0xc);if(_0x3be10a===_0x49454b)break;else _0x298eac['push'](_0x298eac['shift']());}catch(_0x21b5dd){_0x298eac['push'](_0x298eac['shift']());}}}(_0x3068,0x859e5));Object[_0x4deb1c(0x1d2)](exports,Symbol[_0x4deb1c(0x1df)],{'value':_0x4deb1c(0x16d)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x4deb1c(0x1b7)),c=require(_0x4deb1c(0x197)),j=require('@univerjs/thread-comment-ui'),M=require(_0x4deb1c(0x16a)),w=require(_0x4deb1c(0x1dd)),P=require('@univerjs/network'),U=_0x4deb1c(0x1ab);var I=(_0x3ad4cf=>(_0x3ad4cf[_0x3ad4cf[_0x4deb1c(0x192)]=0x0]=_0x4deb1c(0x192),_0x3ad4cf[_0x3ad4cf[_0x4deb1c(0x18e)]=0x1]=_0x4deb1c(0x18e),_0x3ad4cf[_0x3ad4cf['UNRECOGNIZED']=-0x1]=_0x4deb1c(0x190),_0x3ad4cf))(I||{}),v=(_0x5f5d88=>(_0x5f5d88[_0x5f5d88[_0x4deb1c(0x171)]=0x0]=_0x4deb1c(0x171),_0x5f5d88[_0x5f5d88['Add']=0x1]=_0x4deb1c(0x19d),_0x5f5d88[_0x5f5d88['Reply']=0x2]=_0x4deb1c(0x193),_0x5f5d88[_0x5f5d88[_0x4deb1c(0x19f)]=0x3]=_0x4deb1c(0x19f),_0x5f5d88[_0x5f5d88['Delete']=0x4]='Delete',_0x5f5d88[_0x5f5d88[_0x4deb1c(0x1b5)]=0x5]=_0x4deb1c(0x1b5),_0x5f5d88[_0x5f5d88[_0x4deb1c(0x190)]=-0x1]='UNRECOGNIZED',_0x5f5d88))(v||{});const f=_0x4f9d0b=>c[_0x4deb1c(0x1a2)](new Date(+_0x4f9d0b))[_0x4deb1c(0x19c)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x1fec01,_0x3253a5)=>{const _0x5329d9=_0x4deb1c,_0x7272aa=_0x1fec01['get'](c[_0x5329d9(0x184)]),_0x2c24ca=_0x1fec01[_0x5329d9(0x195)](P[_0x5329d9(0x1c1)]);_0x3253a5[_0x5329d9(0x1be)](_0x4e4e5d=>{const _0x154a67=_0x5329d9;_0x7272aa['getUser'](_0x4e4e5d)&&_0x3253a5[_0x154a67(0x1b4)](_0x4e4e5d);}),_0x3253a5[_0x5329d9(0x17f)]&&(await _0x2c24ca[_0x5329d9(0x195)](_0x5329d9(0x1e0),{'params':{'userIDs':[..._0x3253a5]}}))[_0x5329d9(0x1db)][_0x5329d9(0x160)][_0x5329d9(0x1be)](_0x4a46b2=>{const _0x942d4c=_0x5329d9;_0x4a46b2&&_0x7272aa[_0x942d4c(0x1ae)](_0x4a46b2);});};var $=Object[_0x4deb1c(0x17d)],E=(_0x3f5361,_0x5df08f,_0xfa55b8,_0x33692b)=>{for(var _0x34a77d=_0x33692b>0x1?void 0x0:_0x33692b?$(_0x5df08f,_0xfa55b8):_0x5df08f,_0x3c3368=_0x3f5361['length']-0x1,_0x353fa9;_0x3c3368>=0x0;_0x3c3368--)(_0x353fa9=_0x3f5361[_0x3c3368])&&(_0x34a77d=_0x353fa9(_0x34a77d)||_0x34a77d);return _0x34a77d;},S=(_0x5395cc,_0x178471)=>(_0x24292e,_0x4b6c8a)=>_0x178471(_0x24292e,_0x4b6c8a,_0x5395cc);let p=class extends c[_0x4deb1c(0x164)]{constructor(_0x168e57,_0xc39edc,_0x28592e,_0x4448d1){const _0x2f9303=_0x4deb1c;super(),this[_0x2f9303(0x162)]=_0x168e57,this['_threadCommentModel']=_0xc39edc,this[_0x2f9303(0x15e)]=_0x28592e,this['_injector']=_0x4448d1,this[_0x2f9303(0x1bb)](),this[_0x2f9303(0x1c9)]();}[_0x4deb1c(0x1c9)](){const _0x5d8b09=_0x4deb1c;this['disposeWithMe'](this[_0x5d8b09(0x1bf)][_0x5d8b09(0x199)][_0x5d8b09(0x17b)](w[_0x5d8b09(0x1d6)](0x10))[_0x5d8b09(0x196)](_0x2e3c9e=>{const _0xc06a17=_0x5d8b09,_0x110c23=new Set();_0x2e3c9e[_0xc06a17(0x1be)](_0x24dd30=>{const _0x2c679e=_0xc06a17;switch(_0x24dd30['type']){case _0x2c679e(0x198):{const _0x519bf=_0x24dd30[_0x2c679e(0x1c7)][_0x2c679e(0x1ac)];_0x110c23[_0x2c679e(0x198)](_0x519bf);break;}}}),R(this[_0xc06a17(0x18d)],_0x110c23);}));}['_init'](){const _0x4411b9=_0x4deb1c;this[_0x4411b9(0x1cb)](this[_0x4411b9(0x162)][_0x4411b9(0x199)][_0x4411b9(0x196)](async _0x148ba0=>{const _0x577e6a=_0x4411b9;var _0x5d18e0,_0x181b45,_0xfc210a,_0x34ac40;const _0x6d7b39=(_0x5d18e0=this[_0x577e6a(0x1bf)][_0x577e6a(0x15d)](_0x148ba0[_0x577e6a(0x178)])[_0x577e6a(0x166)](_0x5085ca=>_0x5085ca[_0x577e6a(0x168)]===_0x148ba0[_0x577e6a(0x168)]))==null?void 0x0:_0x5d18e0[_0x577e6a(0x16e)];if(!_0x6d7b39)return;const {unitId:_0xbc118e,subUnitId:_0x287cd4}=_0x6d7b39;switch(_0x148ba0[_0x577e6a(0x1a9)]&&this['_userService'][_0x577e6a(0x1ae)](_0x148ba0['user']),_0x148ba0['type']){case v[_0x577e6a(0x19d)]:break;case v[_0x577e6a(0x193)]:{this[_0x577e6a(0x1bf)][_0x577e6a(0x1bd)](_0xbc118e,_0x287cd4,{'unitId':_0xbc118e,'subUnitId':_0x287cd4,'ref':'','id':_0x148ba0[_0x577e6a(0x18a)],'dT':f(+_0x148ba0[_0x577e6a(0x16c)]),'threadId':_0x148ba0['threadId'],'personId':(_0xfc210a=(_0x181b45=_0x148ba0[_0x577e6a(0x1a9)])==null?void 0x0:_0x181b45[_0x577e6a(0x1b9)])!=null?_0xfc210a:_0x148ba0['userId'],'text':JSON[_0x577e6a(0x1d5)](_0x148ba0[_0x577e6a(0x183)]),'parentId':_0x6d7b39['id']});break;}case v['Delete']:{const _0x551356=this[_0x577e6a(0x1bf)]['getComment'](_0xbc118e,_0x287cd4,_0x148ba0['replyId']);_0x551356&&_0x551356[_0x577e6a(0x181)]&&this[_0x577e6a(0x1bf)][_0x577e6a(0x173)](_0xbc118e,_0x287cd4,_0x148ba0[_0x577e6a(0x18a)]);break;}case v[_0x577e6a(0x19f)]:{this['_threadCommentModel']['updateComment'](_0xbc118e,_0x287cd4,{'commentId':_0x148ba0[_0x577e6a(0x18a)],'text':JSON['parse'](_0x148ba0[_0x577e6a(0x183)])});break;}case v[_0x577e6a(0x1b5)]:{const _0x136919=(_0x34ac40=this[_0x577e6a(0x1bf)][_0x577e6a(0x15d)](_0x148ba0[_0x577e6a(0x178)])['find'](_0x11610f=>_0x11610f['threadId']===_0x148ba0[_0x577e6a(0x168)]))==null?void 0x0:_0x34ac40['root'];_0x136919&&this[_0x577e6a(0x1bf)][_0x577e6a(0x1ad)](_0xbc118e,_0x287cd4,_0x136919['id'],_0x148ba0[_0x577e6a(0x1b1)]===I[_0x577e6a(0x18e)]);break;}}}));}};p=E([S(0x0,c[_0x4deb1c(0x18f)](b['CommentService'])),S(0x1,c[_0x4deb1c(0x18f)](M['ThreadCommentModel'])),S(0x2,c[_0x4deb1c(0x18f)](c['UserManagerService'])),S(0x3,c[_0x4deb1c(0x18f)](c[_0x4deb1c(0x17c)]))],p);const q=_0x4deb1c(0x1d1),D={};var A=Object[_0x4deb1c(0x17d)],x=(_0x3b0cb0,_0x5bf2ad,_0x40c627,_0x44e679)=>{const _0x108d27=_0x4deb1c;for(var _0xff5cb6=_0x44e679>0x1?void 0x0:_0x44e679?A(_0x5bf2ad,_0x40c627):_0x5bf2ad,_0x42001c=_0x3b0cb0[_0x108d27(0x17e)]-0x1,_0x4b65e5;_0x42001c>=0x0;_0x42001c--)(_0x4b65e5=_0x3b0cb0[_0x42001c])&&(_0xff5cb6=_0x4b65e5(_0xff5cb6)||_0xff5cb6);return _0xff5cb6;},_=(_0x135633,_0x5b1f79)=>(_0x4a24ee,_0x32a479)=>_0x5b1f79(_0x4a24ee,_0x32a479,_0x135633);function Y(_0x45c10a,_0x5e56c4){const _0x269e5b=_0x4deb1c,_0x133b83=_0x45c10a[_0x269e5b(0x174)][0x0];return{..._0x5e56c4,'id':_0x133b83['replyId'],'resolved':_0x45c10a[_0x269e5b(0x1b1)]===0x1,'dT':f(_0x133b83['createTimestamp']),'personId':_0x133b83[_0x269e5b(0x1c3)],'threadId':_0x133b83['threadId']};}function G(_0x108d87,_0x57c02c,_0xb254c7){const _0x1dee86=_0x4deb1c;var _0x4cd930,_0x3a04b8;if(((_0x3a04b8=(_0x4cd930=_0x108d87==null?void 0x0:_0x108d87[_0x1dee86(0x174)])==null?void 0x0:_0x4cd930[_0x1dee86(0x17e)])!=null?_0x3a04b8:0x0)>0x0){const _0x49cbd5=(_0x521d5b,_0x41eb75)=>({'id':_0x521d5b[_0x1dee86(0x18a)],'threadId':_0x521d5b['threadId'],'dT':f(_0x521d5b[_0x1dee86(0x16c)]),'personId':_0x521d5b[_0x1dee86(0x1c3)],'resolved':_0x108d87[_0x1dee86(0x1b1)]===I[_0x1dee86(0x18e)],'unitId':_0x57c02c,'subUnitId':_0xb254c7,'text':JSON[_0x1dee86(0x1d5)](_0x521d5b['content']),'parentId':_0x41eb75}),_0x14f29c=_0x49cbd5(_0x108d87[_0x1dee86(0x174)][0x0]);return{..._0x14f29c,'children':_0x108d87[_0x1dee86(0x174)][_0x1dee86(0x175)](0x1)[_0x1dee86(0x1d9)](_0x1422dd=>_0x49cbd5(_0x1422dd,_0x14f29c['id']))};}return null;}let g=class{constructor(_0x86b181,_0x3a0e4a,_0x55faf5,_0xecc61e){const _0x464811=_0x4deb1c;this[_0x464811(0x1cc)]=_0x86b181,this['_userService']=_0x3a0e4a,this['_sessionService']=_0x55faf5,this[_0x464811(0x18d)]=_0xecc61e;}async[_0x4deb1c(0x1bd)](_0x5a3ca1){const _0xc15d6b=_0x4deb1c;var _0x1501a8,_0x9f0d2;const {parentId:_0x23d9b8,unitId:_0x4753cb,text:_0x2c4a7d,threadId:_0x292740}=_0x5a3ca1,_0x5f25cb=(_0x9f0d2=(_0x1501a8=_0x2c4a7d[_0xc15d6b(0x1e1)])==null?void 0x0:_0x1501a8['filter'](_0xfa1b5f=>_0xfa1b5f[_0xc15d6b(0x186)]===c[_0xc15d6b(0x1a6)][_0xc15d6b(0x182)])['map'](_0xea7818=>_0xea7818[_0xc15d6b(0x1b8)]))!=null?_0x9f0d2:[],_0x587e69=JSON[_0xc15d6b(0x188)](_0x2c4a7d),_0x322d65=(await this[_0xc15d6b(0x179)][_0xc15d6b(0x1c5)](_0x4753cb))[_0xc15d6b(0x1e2)]();if(_0x23d9b8){const _0x565d18={'memberId':_0x322d65,'unitId':_0x4753cb,'content':_0x587e69,'mention':_0x5f25cb,'threadId':_0x292740},_0x810bce=(await this[_0xc15d6b(0x1cc)][_0xc15d6b(0x19e)]('/universer-api/comment/unit/'+_0x4753cb+_0xc15d6b(0x1de),{'body':_0x565d18}))['body'][_0xc15d6b(0x170)];return{..._0x5a3ca1,'id':_0x810bce['replyId'],'dT':c[_0xc15d6b(0x1a2)](+_0x810bce[_0xc15d6b(0x16c)])[_0xc15d6b(0x19c)](_0xc15d6b(0x1d0)),'personId':_0x810bce[_0xc15d6b(0x1c3)]};}else{const _0x48fda1={'memberId':_0x322d65,'unitId':_0x4753cb,'content':_0x587e69,'mention':_0x5f25cb},_0x5c19a4=await this[_0xc15d6b(0x1cc)][_0xc15d6b(0x19e)](_0xc15d6b(0x1b0)+_0x4753cb+_0xc15d6b(0x1c0),{'body':_0x48fda1});return Y(_0x5c19a4[_0xc15d6b(0x1db)][_0xc15d6b(0x16f)],_0x5a3ca1);}}async[_0x4deb1c(0x187)](_0x1901f5){const _0x36e10a=_0x4deb1c;var _0x4b17fd,_0x2af6a3;const {text:_0x5bc7f3,unitId:_0x494964}=_0x1901f5,_0x39e2eb=(_0x2af6a3=(_0x4b17fd=_0x5bc7f3[_0x36e10a(0x1e1)])==null?void 0x0:_0x4b17fd[_0x36e10a(0x1dc)](_0x114d8c=>_0x114d8c[_0x36e10a(0x186)]===c['CustomRangeType']['COMMENT'])['map'](_0x3cdd42=>_0x3cdd42[_0x36e10a(0x1b8)]))!=null?_0x2af6a3:[],_0x3ac44e=JSON[_0x36e10a(0x188)](_0x5bc7f3),_0x5d84c3=_0x1901f5[_0x36e10a(0x168)],_0x37e2a0=_0x1901f5['id'],_0x33eade={'memberId':(await this[_0x36e10a(0x179)][_0x36e10a(0x1c5)](_0x494964))[_0x36e10a(0x1e2)](),'unitId':_0x494964,'threadId':_0x5d84c3,'mention':_0x39e2eb,'content':_0x3ac44e,'replyId':_0x37e2a0},_0x140ac6=await this[_0x36e10a(0x1cc)][_0x36e10a(0x19e)]('/universer-api/comment/unit/'+_0x494964+_0x36e10a(0x185),{'body':_0x33eade});return!_0x140ac6['body']['error']||_0x140ac6[_0x36e10a(0x1db)]['error'][_0x36e10a(0x17a)]===0x1;}async['resolveComment'](_0x96010e){const _0x167534=_0x4deb1c,{unitId:_0x54c9cd}=_0x96010e,_0x436ebf=_0x96010e[_0x167534(0x168)],_0x18e3b4={'memberId':this[_0x167534(0x15e)][_0x167534(0x1ca)]()[_0x167534(0x1b9)],'unitId':_0x54c9cd,'threadId':_0x436ebf,'solved':_0x96010e[_0x167534(0x189)]?I['Solved']:I[_0x167534(0x192)]},_0x1d1c52=await this['_httpService'][_0x167534(0x19e)](_0x167534(0x1b0)+_0x54c9cd+'/solved',{'body':_0x18e3b4});return!_0x1d1c52[_0x167534(0x1db)][_0x167534(0x1bc)]||_0x1d1c52[_0x167534(0x1db)][_0x167534(0x1bc)][_0x167534(0x17a)]===0x1;}async[_0x4deb1c(0x173)](_0x4053d0,_0x1fb42c,_0x415d6c,_0x1bcbef){const _0x52ee5b=_0x4deb1c,_0x49ef59={'memberId':(await this[_0x52ee5b(0x179)][_0x52ee5b(0x1c5)](_0x4053d0))[_0x52ee5b(0x1e2)](),'threadId':_0x415d6c,'replyId':_0x1bcbef,'unitId':_0x4053d0},_0x5f3abb=await this[_0x52ee5b(0x1cc)]['post'](_0x52ee5b(0x1b0)+_0x4053d0+_0x52ee5b(0x1b2),{'body':_0x49ef59});return!_0x5f3abb[_0x52ee5b(0x1db)][_0x52ee5b(0x1bc)]||_0x5f3abb['body'][_0x52ee5b(0x1bc)][_0x52ee5b(0x17a)]===0x1;}async[_0x4deb1c(0x1ba)](_0x37757d,_0x1cdb2a,_0x476991){const _0x4fa238=_0x4deb1c,_0x53d9ab={'unitId':_0x37757d,'threadId':_0x476991},_0x189087=await this[_0x4fa238(0x1cc)][_0x4fa238(0x19e)](_0x4fa238(0x1b0)+_0x37757d+_0x4fa238(0x1b3),{'body':_0x53d9ab}),_0x3c93cc=_0x476991[_0x4fa238(0x1d9)](_0x25aec9=>G(_0x189087[_0x4fa238(0x1db)][_0x4fa238(0x19b)][_0x25aec9],_0x37757d,_0x1cdb2a))['filter'](Boolean);return Object['values'](_0x189087['body']['users'])[_0x4fa238(0x1be)](_0x384791=>{const _0x103c85=_0x4fa238;this['_userService'][_0x103c85(0x1ae)](_0x384791);}),_0x3c93cc;}[_0x4deb1c(0x1a4)](_0x59aa02){const _0xad1d02=_0x4deb1c;return{'id':_0x59aa02['id'],'threadId':_0x59aa02[_0xad1d02(0x168)],'ref':_0x59aa02[_0xad1d02(0x1d3)]};}};function _0x3068(){const _0x20ba1e=['slice','_threadCommentDataSourceService','12895EkVcBS','unitId','_sessionService','code','pipe','Injector','getOwnPropertyDescriptor','length','size','UniverThreadCommentUIPlugin','parentId','COMMENT','content','UserManagerService','/edit','rangeType','updateComment','stringify','resolved','replyId','_configService','_threadCommentDataSource','_injector','Solved','Inject','UNRECOGNIZED','Plugin','OpenOrReOpen','Reply','syncUpdateMutationToColla','get','subscribe','@univerjs/core','add','commentUpdate$','55iDiWnI','comments','format','Add','post','Edit','onStarting','56aOzPmS','dayjs','UniverThreadCommentDataSourcePlugin','saveCommentToSnapshot','859586uCzZqZ','CustomRangeType','UniverCollaborationClientPlugin','1746bcpSfQ','user','CollaborationSessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','personId','resolveComment','addUser','269883eeNlCt','/universer-api/comment/unit/','solved','/delete','/list','delete','Solve','symbol','@univerjs-pro/license','rangeId','userID','listComments','_init','error','addComment','forEach','_threadCommentModel','/add','HTTPService','_initDataSource','userId','UniverLicensePlugin','requireSession','setConfig','payload','type','_initUserSync','getCurrentUser','disposeWithMe','_httpService','dataSource','1234009hdrFGb','51225NEMnTJ','YYYY/MM/DD\x20HH:mm','thread-comment-data-source.config','defineProperty','ref','158736zIXJUz','parse','bufferTime','24FbSzQU','merge','map','2719816ZAwsYC','body','filter','rxjs','/reply','toStringTag','/universer-api/user/list','customRanges','getMemberID','pluginName','getUnit','_userService','onReady','users','IThreadCommentDataSourceService','_commentService','IConfigService','Disposable','350eHcoDE','find','UniverInstanceType','threadId','_config','@univerjs/thread-comment','UNIVER_UNKNOWN','createTimestamp','Module','root','comment','reply','Unknown','DependentOn','deleteComment','replies'];_0x3068=function(){return _0x20ba1e;};return _0x3068();}g=x([_(0x0,c[_0x4deb1c(0x18f)](P['HTTPService'])),_(0x1,c[_0x4deb1c(0x18f)](c['UserManagerService'])),_(0x2,c[_0x4deb1c(0x18f)](b[_0x4deb1c(0x1aa)])),_(0x3,c[_0x4deb1c(0x18f)](c[_0x4deb1c(0x17c)]))],g);var H=Object[_0x4deb1c(0x17d)],J=(_0x161935,_0x2173f0,_0x172e66,_0x35a0a1)=>{const _0x5b1bf3=_0x4deb1c;for(var _0x477ebe=_0x35a0a1>0x1?void 0x0:_0x35a0a1?H(_0x2173f0,_0x172e66):_0x2173f0,_0x409bd3=_0x161935[_0x5b1bf3(0x17e)]-0x1,_0x3ec163;_0x409bd3>=0x0;_0x409bd3--)(_0x3ec163=_0x161935[_0x409bd3])&&(_0x477ebe=_0x3ec163(_0x477ebe)||_0x477ebe);return _0x477ebe;},y=(_0x1a54ae,_0x105c94)=>(_0x78397b,_0x5932c1)=>_0x105c94(_0x78397b,_0x5932c1,_0x1a54ae);let C=class extends c[_0x4deb1c(0x164)]{constructor(_0x20c804,_0x346bce){const _0x57ff3a=_0x4deb1c;super(),this[_0x57ff3a(0x176)]=_0x20c804,this[_0x57ff3a(0x18c)]=_0x346bce,this[_0x57ff3a(0x1c2)]();}['_initDataSource'](){const _0x3f3135=_0x4deb1c;this['_threadCommentDataSourceService'][_0x3f3135(0x1cd)]=this[_0x3f3135(0x18c)],this[_0x3f3135(0x176)][_0x3f3135(0x194)]=!0x1;}};C=J([y(0x0,M[_0x4deb1c(0x161)]),y(0x1,c[_0x4deb1c(0x18f)](g))],C);var F=Object[_0x4deb1c(0x1d2)],L=Object[_0x4deb1c(0x17d)],Z=(_0x352015,_0x4c2311,_0x874d2f)=>_0x4c2311 in _0x352015?F(_0x352015,_0x4c2311,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x874d2f}):_0x352015[_0x4c2311]=_0x874d2f,W=(_0x376111,_0x18cdc4,_0x1c152d,_0x187f87)=>{const _0x4e4d36=_0x4deb1c;for(var _0xad2e6f=_0x187f87>0x1?void 0x0:_0x187f87?L(_0x18cdc4,_0x1c152d):_0x18cdc4,_0x22ef4b=_0x376111[_0x4e4d36(0x17e)]-0x1,_0x3803a9;_0x22ef4b>=0x0;_0x22ef4b--)(_0x3803a9=_0x376111[_0x22ef4b])&&(_0xad2e6f=_0x3803a9(_0xad2e6f)||_0xad2e6f);return _0xad2e6f;},O=(_0x533b7c,_0xd7ccd5)=>(_0x20cd7c,_0x2f7a6f)=>_0xd7ccd5(_0x20cd7c,_0x2f7a6f,_0x533b7c),N=(_0x5cf3d7,_0x564d7c,_0x3c4043)=>Z(_0x5cf3d7,typeof _0x564d7c!=_0x4deb1c(0x1b6)?_0x564d7c+'':_0x564d7c,_0x3c4043);function _0x4d64(_0xa99ae,_0x52f4bb){const _0x306821=_0x3068();return _0x4d64=function(_0x4d64e3,_0x5b12a4){_0x4d64e3=_0x4d64e3-0x15c;let _0x57ebb0=_0x306821[_0x4d64e3];return _0x57ebb0;},_0x4d64(_0xa99ae,_0x52f4bb);}exports[_0x4deb1c(0x1a3)]=class extends c[_0x4deb1c(0x191)]{constructor(_0x4c1d0e=D,_0x44c187,_0x1ca1a4){const _0x34e44e=_0x4deb1c;super(),this[_0x34e44e(0x169)]=_0x4c1d0e,this[_0x34e44e(0x18d)]=_0x44c187,this[_0x34e44e(0x18b)]=_0x1ca1a4;const {..._0x2551bd}=c[_0x34e44e(0x1d8)]({},D,this[_0x34e44e(0x169)]);this[_0x34e44e(0x18b)][_0x34e44e(0x1c6)](q,_0x2551bd);}[_0x4deb1c(0x1a0)](){const _0xbfadb8=_0x4deb1c;[[g],[C],[p]][_0xbfadb8(0x1be)](_0xde0635=>{const _0x1b4546=_0xbfadb8;this[_0x1b4546(0x18d)][_0x1b4546(0x198)](_0xde0635);});}[_0x4deb1c(0x15f)](){const _0x37d72b=_0x4deb1c;this['_injector'][_0x37d72b(0x195)](C),this[_0x37d72b(0x18d)][_0x37d72b(0x195)](p);}},N(exports[_0x4deb1c(0x1a3)],_0x4deb1c(0x15c),U),N(exports[_0x4deb1c(0x1a3)],_0x4deb1c(0x1c8),c[_0x4deb1c(0x167)][_0x4deb1c(0x16b)]),exports[_0x4deb1c(0x1a3)]=W([c[_0x4deb1c(0x172)](j[_0x4deb1c(0x180)],b[_0x4deb1c(0x1a7)],T[_0x4deb1c(0x1c4)]),O(0x1,c[_0x4deb1c(0x18f)](c[_0x4deb1c(0x17c)])),O(0x2,c[_0x4deb1c(0x163)])],exports[_0x4deb1c(0x1a3)]);
|
|
1
|
+
'use strict';const _0x43de35=_0x10b0;(function(_0x2ced00,_0x4d1f91){const _0xab217=_0x10b0,_0x127535=_0x2ced00();while(!![]){try{const _0x1858be=parseInt(_0xab217(0x154))/0x1*(parseInt(_0xab217(0x14b))/0x2)+-parseInt(_0xab217(0x13e))/0x3+-parseInt(_0xab217(0x14d))/0x4*(parseInt(_0xab217(0x151))/0x5)+-parseInt(_0xab217(0x129))/0x6*(parseInt(_0xab217(0x13f))/0x7)+parseInt(_0xab217(0x14a))/0x8+parseInt(_0xab217(0x144))/0x9+-parseInt(_0xab217(0x16c))/0xa*(-parseInt(_0xab217(0x187))/0xb);if(_0x1858be===_0x4d1f91)break;else _0x127535['push'](_0x127535['shift']());}catch(_0x10ffb7){_0x127535['push'](_0x127535['shift']());}}}(_0x6249,0x990a1));function _0x10b0(_0x7a39dd,_0x49df73){const _0x624927=_0x6249();return _0x10b0=function(_0x10b0ac,_0x55d462){_0x10b0ac=_0x10b0ac-0x10f;let _0x5b8419=_0x624927[_0x10b0ac];return _0x5b8419;},_0x10b0(_0x7a39dd,_0x49df73);}function _0x6249(){const _0x3b0eef=['/solved','length','pipe','Reply','users','filter','@univerjs/network','@univerjs/thread-comment-ui','parse','forEach','Module','UniverCollaborationClientPlugin','userId','Solve','delete','subscribe','resolved','UNIVER_UNKNOWN','_threadCommentDataSourceService','/universer-api/comment/unit/','content','thread-comment-data-source.config','_sessionService','COMMENT','saveCommentToSnapshot','/delete','308622OwSHRR','HTTPService','user','Unknown','comment','disposeWithMe','Injector','/list','getUnit','onReady','ThreadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','@univerjs/core','replies','_commentService','parentId','_threadCommentDataSource','defineProperty','createTimestamp','solved','3031197YpxXUI','161tFKjsH','YYYY/MM/DD\x20HH:mm','get','UNRECOGNIZED','replyId','9091692zGuMwt','dayjs','@univerjs-pro/collaboration-client','root','Disposable','getMemberID','8268216kvyqUk','128sHKrUg','getOwnPropertyDescriptor','476vCMFsn','error','_initUserSync','_configService','23035iRcRkG','post','_config','13297SQpoaS','find','updateComment','userID','addUser','getUser','body','_injector','merge','_threadCommentModel','code','payload','getCurrentUser','comments','dataSource','symbol','requireSession','@univerjs-pro/license','UniverLicensePlugin','rangeId','type','resolveComment','_httpService','Solved','5990ZHMADs','customRanges','ref','_initDataSource','unitId','slice','CustomRangeType','onStarting','threadId','_userService','rxjs','format','map','personId','Delete','Inject','reply','bufferTime','setConfig','UniverThreadCommentDataSourcePlugin','rangeType','UserManagerService','Edit','@univerjs/thread-comment','syncUpdateMutationToColla','commentUpdate$','_init','8701MyKioS','Add','OpenOrReOpen','getComment','stringify'];_0x6249=function(){return _0x3b0eef;};return _0x6249();}Object[_0x43de35(0x13b)](exports,Symbol['toStringTag'],{'value':_0x43de35(0x119)});const b=require(_0x43de35(0x146)),T=require(_0x43de35(0x165)),c=require(_0x43de35(0x136)),j=require(_0x43de35(0x116)),M=require(_0x43de35(0x183)),w=require(_0x43de35(0x176)),P=require(_0x43de35(0x115)),U=_0x43de35(0x134);var I=(_0x1e1611=>(_0x1e1611[_0x1e1611['OpenOrReOpen']=0x0]=_0x43de35(0x189),_0x1e1611[_0x1e1611[_0x43de35(0x16b)]=0x1]=_0x43de35(0x16b),_0x1e1611[_0x1e1611[_0x43de35(0x142)]=-0x1]='UNRECOGNIZED',_0x1e1611))(I||{}),v=(_0x5c1321=>(_0x5c1321[_0x5c1321[_0x43de35(0x12c)]=0x0]='Unknown',_0x5c1321[_0x5c1321[_0x43de35(0x188)]=0x1]=_0x43de35(0x188),_0x5c1321[_0x5c1321['Reply']=0x2]=_0x43de35(0x112),_0x5c1321[_0x5c1321[_0x43de35(0x182)]=0x3]=_0x43de35(0x182),_0x5c1321[_0x5c1321[_0x43de35(0x17a)]=0x4]='Delete',_0x5c1321[_0x5c1321[_0x43de35(0x11c)]=0x5]=_0x43de35(0x11c),_0x5c1321[_0x5c1321[_0x43de35(0x142)]=-0x1]='UNRECOGNIZED',_0x5c1321))(v||{});const f=_0x22e58d=>c[_0x43de35(0x145)](new Date(+_0x22e58d))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x44bba2,_0x46e97c)=>{const _0x197888=_0x43de35,_0x3d5a0a=_0x44bba2[_0x197888(0x141)](c[_0x197888(0x181)]),_0x74770a=_0x44bba2[_0x197888(0x141)](P[_0x197888(0x12a)]);_0x46e97c[_0x197888(0x118)](_0x4adf10=>{const _0xf7a6f9=_0x197888;_0x3d5a0a[_0xf7a6f9(0x159)](_0x4adf10)&&_0x46e97c[_0xf7a6f9(0x11d)](_0x4adf10);}),_0x46e97c['size']&&(await _0x74770a[_0x197888(0x141)]('/universer-api/user/list',{'params':{'userIDs':[..._0x46e97c]}}))[_0x197888(0x15a)][_0x197888(0x113)][_0x197888(0x118)](_0x89a715=>{const _0x375094=_0x197888;_0x89a715&&_0x3d5a0a[_0x375094(0x158)](_0x89a715);});};var $=Object[_0x43de35(0x14c)],E=(_0x44f086,_0x346e0c,_0x22528a,_0x2851f8)=>{const _0x8aa1ab=_0x43de35;for(var _0x37834a=_0x2851f8>0x1?void 0x0:_0x2851f8?$(_0x346e0c,_0x22528a):_0x346e0c,_0x32b22a=_0x44f086[_0x8aa1ab(0x110)]-0x1,_0x33344b;_0x32b22a>=0x0;_0x32b22a--)(_0x33344b=_0x44f086[_0x32b22a])&&(_0x37834a=_0x33344b(_0x37834a)||_0x37834a);return _0x37834a;},S=(_0x4a8cb0,_0x385ca5)=>(_0xa509f1,_0x59a2c4)=>_0x385ca5(_0xa509f1,_0x59a2c4,_0x4a8cb0);let p=class extends c[_0x43de35(0x148)]{constructor(_0x1b78ae,_0x199780,_0x4ee5ad,_0x2da136){const _0x446129=_0x43de35;super(),this[_0x446129(0x138)]=_0x1b78ae,this[_0x446129(0x15d)]=_0x199780,this[_0x446129(0x175)]=_0x4ee5ad,this['_injector']=_0x2da136,this[_0x446129(0x186)](),this[_0x446129(0x14f)]();}['_initUserSync'](){const _0x1f3188=_0x43de35;this[_0x1f3188(0x12e)](this['_threadCommentModel']['commentUpdate$'][_0x1f3188(0x111)](w[_0x1f3188(0x17d)](0x10))[_0x1f3188(0x11e)](_0x2673e8=>{const _0x4a88b8=_0x1f3188,_0x41880c=new Set();_0x2673e8[_0x4a88b8(0x118)](_0x3be270=>{const _0x44af95=_0x4a88b8;switch(_0x3be270[_0x44af95(0x168)]){case'add':{const _0x10711f=_0x3be270[_0x44af95(0x15f)][_0x44af95(0x179)];_0x41880c['add'](_0x10711f);break;}}}),R(this[_0x4a88b8(0x15b)],_0x41880c);}));}[_0x43de35(0x186)](){const _0x5766ea=_0x43de35;this[_0x5766ea(0x12e)](this['_commentService'][_0x5766ea(0x185)]['subscribe'](async _0x3bd977=>{const _0x13b4f8=_0x5766ea;var _0x261e1b,_0x2890eb,_0x3c8b21,_0x358ecd;const _0xa37f53=(_0x261e1b=this[_0x13b4f8(0x15d)][_0x13b4f8(0x131)](_0x3bd977[_0x13b4f8(0x170)])['find'](_0x1ce041=>_0x1ce041[_0x13b4f8(0x174)]===_0x3bd977['threadId']))==null?void 0x0:_0x261e1b[_0x13b4f8(0x147)];if(!_0xa37f53)return;const {unitId:_0x2b7186,subUnitId:_0x3be203}=_0xa37f53;switch(_0x3bd977['user']&&this[_0x13b4f8(0x175)][_0x13b4f8(0x158)](_0x3bd977[_0x13b4f8(0x12b)]),_0x3bd977[_0x13b4f8(0x168)]){case v[_0x13b4f8(0x188)]:break;case v[_0x13b4f8(0x112)]:{this[_0x13b4f8(0x15d)]['addComment'](_0x2b7186,_0x3be203,{'unitId':_0x2b7186,'subUnitId':_0x3be203,'ref':'','id':_0x3bd977[_0x13b4f8(0x143)],'dT':f(+_0x3bd977[_0x13b4f8(0x13c)]),'threadId':_0x3bd977[_0x13b4f8(0x174)],'personId':(_0x3c8b21=(_0x2890eb=_0x3bd977['user'])==null?void 0x0:_0x2890eb[_0x13b4f8(0x157)])!=null?_0x3c8b21:_0x3bd977[_0x13b4f8(0x11b)],'text':JSON[_0x13b4f8(0x117)](_0x3bd977['content']),'parentId':_0xa37f53['id']});break;}case v['Delete']:{const _0x3ccda7=this[_0x13b4f8(0x15d)][_0x13b4f8(0x18a)](_0x2b7186,_0x3be203,_0x3bd977[_0x13b4f8(0x143)]);_0x3ccda7&&_0x3ccda7[_0x13b4f8(0x139)]&&this[_0x13b4f8(0x15d)]['deleteComment'](_0x2b7186,_0x3be203,_0x3bd977[_0x13b4f8(0x143)]);break;}case v[_0x13b4f8(0x182)]:{this[_0x13b4f8(0x15d)][_0x13b4f8(0x156)](_0x2b7186,_0x3be203,{'commentId':_0x3bd977[_0x13b4f8(0x143)],'text':JSON['parse'](_0x3bd977[_0x13b4f8(0x123)])});break;}case v['Solve']:{const _0xf6d96e=(_0x358ecd=this['_threadCommentModel']['getUnit'](_0x3bd977[_0x13b4f8(0x170)])[_0x13b4f8(0x155)](_0x33977a=>_0x33977a['threadId']===_0x3bd977[_0x13b4f8(0x174)]))==null?void 0x0:_0x358ecd[_0x13b4f8(0x147)];_0xf6d96e&&this[_0x13b4f8(0x15d)][_0x13b4f8(0x169)](_0x2b7186,_0x3be203,_0xf6d96e['id'],_0x3bd977[_0x13b4f8(0x13d)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x43de35(0x17b)](b['CommentService'])),S(0x1,c['Inject'](M[_0x43de35(0x133)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c['Inject'](c['Injector']))],p);const q=_0x43de35(0x124),D={};var A=Object[_0x43de35(0x14c)],x=(_0x14a1da,_0x17ed2a,_0x3bef6f,_0x31c20b)=>{for(var _0x4b2800=_0x31c20b>0x1?void 0x0:_0x31c20b?A(_0x17ed2a,_0x3bef6f):_0x17ed2a,_0x412d0e=_0x14a1da['length']-0x1,_0x47ee31;_0x412d0e>=0x0;_0x412d0e--)(_0x47ee31=_0x14a1da[_0x412d0e])&&(_0x4b2800=_0x47ee31(_0x4b2800)||_0x4b2800);return _0x4b2800;},_=(_0x310fd6,_0x115947)=>(_0xb64e59,_0x3ac44c)=>_0x115947(_0xb64e59,_0x3ac44c,_0x310fd6);function Y(_0x2f7b96,_0x1ffff8){const _0x393b7c=_0x43de35,_0xbc4b2e=_0x2f7b96[_0x393b7c(0x137)][0x0];return{..._0x1ffff8,'id':_0xbc4b2e[_0x393b7c(0x143)],'resolved':_0x2f7b96['solved']===0x1,'dT':f(_0xbc4b2e[_0x393b7c(0x13c)]),'personId':_0xbc4b2e[_0x393b7c(0x11b)],'threadId':_0xbc4b2e['threadId']};}function G(_0x50174a,_0x362d93,_0x40d628){const _0x6e5845=_0x43de35;var _0x56823f,_0x7ae6df;if(((_0x7ae6df=(_0x56823f=_0x50174a==null?void 0x0:_0x50174a[_0x6e5845(0x137)])==null?void 0x0:_0x56823f[_0x6e5845(0x110)])!=null?_0x7ae6df:0x0)>0x0){const _0x327f1c=(_0x4818e1,_0x4cdab2)=>({'id':_0x4818e1[_0x6e5845(0x143)],'threadId':_0x4818e1[_0x6e5845(0x174)],'dT':f(_0x4818e1['createTimestamp']),'personId':_0x4818e1[_0x6e5845(0x11b)],'resolved':_0x50174a[_0x6e5845(0x13d)]===I[_0x6e5845(0x16b)],'unitId':_0x362d93,'subUnitId':_0x40d628,'text':JSON[_0x6e5845(0x117)](_0x4818e1['content']),'parentId':_0x4cdab2}),_0x18538b=_0x327f1c(_0x50174a[_0x6e5845(0x137)][0x0]);return{..._0x18538b,'children':_0x50174a['replies'][_0x6e5845(0x171)](0x1)[_0x6e5845(0x178)](_0x21fc77=>_0x327f1c(_0x21fc77,_0x18538b['id']))};}return null;}let g=class{constructor(_0x2b1a67,_0x22dac5,_0x12cb3a,_0x16aaac){const _0x3bd87e=_0x43de35;this[_0x3bd87e(0x16a)]=_0x2b1a67,this[_0x3bd87e(0x175)]=_0x22dac5,this[_0x3bd87e(0x125)]=_0x12cb3a,this[_0x3bd87e(0x15b)]=_0x16aaac;}async['addComment'](_0x347a61){const _0x49d7b4=_0x43de35;var _0x4bd876,_0x5c5b86;const {parentId:_0x160738,unitId:_0x2f9f07,text:_0x336b04,threadId:_0x45e330}=_0x347a61,_0x2be1b0=(_0x5c5b86=(_0x4bd876=_0x336b04[_0x49d7b4(0x16d)])==null?void 0x0:_0x4bd876[_0x49d7b4(0x114)](_0xd77708=>_0xd77708[_0x49d7b4(0x180)]===c[_0x49d7b4(0x172)]['COMMENT'])[_0x49d7b4(0x178)](_0x23ea0c=>_0x23ea0c[_0x49d7b4(0x167)]))!=null?_0x5c5b86:[],_0x41fcc5=JSON[_0x49d7b4(0x18b)](_0x336b04),_0x5a7337=(await this[_0x49d7b4(0x125)][_0x49d7b4(0x164)](_0x2f9f07))[_0x49d7b4(0x149)]();if(_0x160738){const _0x59e4f9={'memberId':_0x5a7337,'unitId':_0x2f9f07,'content':_0x41fcc5,'mention':_0x2be1b0,'threadId':_0x45e330},_0x342285=(await this['_httpService'][_0x49d7b4(0x152)](_0x49d7b4(0x122)+_0x2f9f07+'/reply',{'body':_0x59e4f9}))[_0x49d7b4(0x15a)][_0x49d7b4(0x17c)];return{..._0x347a61,'id':_0x342285[_0x49d7b4(0x143)],'dT':c['dayjs'](+_0x342285['createTimestamp'])[_0x49d7b4(0x177)](_0x49d7b4(0x140)),'personId':_0x342285[_0x49d7b4(0x11b)]};}else{const _0x4c60d6={'memberId':_0x5a7337,'unitId':_0x2f9f07,'content':_0x41fcc5,'mention':_0x2be1b0},_0x3b6108=await this[_0x49d7b4(0x16a)][_0x49d7b4(0x152)](_0x49d7b4(0x122)+_0x2f9f07+'/add',{'body':_0x4c60d6});return Y(_0x3b6108[_0x49d7b4(0x15a)][_0x49d7b4(0x12d)],_0x347a61);}}async[_0x43de35(0x156)](_0x390504){const _0x185a27=_0x43de35;var _0x12eea8,_0x2e15ad;const {text:_0x3b902a,unitId:_0x8077bd}=_0x390504,_0x38db2f=(_0x2e15ad=(_0x12eea8=_0x3b902a[_0x185a27(0x16d)])==null?void 0x0:_0x12eea8[_0x185a27(0x114)](_0x49687c=>_0x49687c[_0x185a27(0x180)]===c[_0x185a27(0x172)][_0x185a27(0x126)])[_0x185a27(0x178)](_0xaeab52=>_0xaeab52[_0x185a27(0x167)]))!=null?_0x2e15ad:[],_0x4ff87e=JSON['stringify'](_0x3b902a),_0x35da7e=_0x390504[_0x185a27(0x174)],_0x31a902=_0x390504['id'],_0x1f87b2={'memberId':(await this[_0x185a27(0x125)][_0x185a27(0x164)](_0x8077bd))['getMemberID'](),'unitId':_0x8077bd,'threadId':_0x35da7e,'mention':_0x38db2f,'content':_0x4ff87e,'replyId':_0x31a902},_0xb7c8de=await this[_0x185a27(0x16a)]['post'](_0x185a27(0x122)+_0x8077bd+'/edit',{'body':_0x1f87b2});return!_0xb7c8de[_0x185a27(0x15a)][_0x185a27(0x14e)]||_0xb7c8de[_0x185a27(0x15a)][_0x185a27(0x14e)][_0x185a27(0x15e)]===0x1;}async[_0x43de35(0x169)](_0x1acc67){const _0x421b93=_0x43de35,{unitId:_0x121e3f}=_0x1acc67,_0x8a77cc=_0x1acc67['threadId'],_0x172a6a={'memberId':this[_0x421b93(0x175)][_0x421b93(0x160)]()[_0x421b93(0x157)],'unitId':_0x121e3f,'threadId':_0x8a77cc,'solved':_0x1acc67[_0x421b93(0x11f)]?I[_0x421b93(0x16b)]:I[_0x421b93(0x189)]},_0x3537af=await this[_0x421b93(0x16a)][_0x421b93(0x152)](_0x421b93(0x122)+_0x121e3f+_0x421b93(0x10f),{'body':_0x172a6a});return!_0x3537af[_0x421b93(0x15a)]['error']||_0x3537af['body'][_0x421b93(0x14e)]['code']===0x1;}async['deleteComment'](_0x2ca15f,_0x93a9a7,_0x56e06c,_0x5ec476){const _0x3d37d5=_0x43de35,_0x14dc0f={'memberId':(await this[_0x3d37d5(0x125)][_0x3d37d5(0x164)](_0x2ca15f))[_0x3d37d5(0x149)](),'threadId':_0x56e06c,'replyId':_0x5ec476,'unitId':_0x2ca15f},_0x31461d=await this[_0x3d37d5(0x16a)][_0x3d37d5(0x152)](_0x3d37d5(0x122)+_0x2ca15f+_0x3d37d5(0x128),{'body':_0x14dc0f});return!_0x31461d[_0x3d37d5(0x15a)][_0x3d37d5(0x14e)]||_0x31461d['body'][_0x3d37d5(0x14e)][_0x3d37d5(0x15e)]===0x1;}async['listComments'](_0x45a9c6,_0x3975ef,_0x38076d){const _0x44d2da=_0x43de35,_0x2e32a8={'unitId':_0x45a9c6,'threadId':_0x38076d},_0x416c3e=await this[_0x44d2da(0x16a)][_0x44d2da(0x152)]('/universer-api/comment/unit/'+_0x45a9c6+_0x44d2da(0x130),{'body':_0x2e32a8}),_0x44cb77=_0x38076d[_0x44d2da(0x178)](_0x48ca98=>G(_0x416c3e[_0x44d2da(0x15a)][_0x44d2da(0x161)][_0x48ca98],_0x45a9c6,_0x3975ef))[_0x44d2da(0x114)](Boolean);return Object['values'](_0x416c3e[_0x44d2da(0x15a)][_0x44d2da(0x113)])[_0x44d2da(0x118)](_0x15298d=>{const _0x4bfdfc=_0x44d2da;this['_userService'][_0x4bfdfc(0x158)](_0x15298d);}),_0x44cb77;}[_0x43de35(0x127)](_0x21e434){const _0x3f09f7=_0x43de35;return{'id':_0x21e434['id'],'threadId':_0x21e434[_0x3f09f7(0x174)],'ref':_0x21e434[_0x3f09f7(0x16e)]};}};g=x([_(0x0,c['Inject'](P[_0x43de35(0x12a)])),_(0x1,c[_0x43de35(0x17b)](c[_0x43de35(0x181)])),_(0x2,c['Inject'](b['CollaborationSessionService'])),_(0x3,c[_0x43de35(0x17b)](c['Injector']))],g);var H=Object[_0x43de35(0x14c)],J=(_0x3dbb62,_0x203685,_0x49635e,_0x123d2e)=>{const _0x481484=_0x43de35;for(var _0x396774=_0x123d2e>0x1?void 0x0:_0x123d2e?H(_0x203685,_0x49635e):_0x203685,_0x2dcda8=_0x3dbb62[_0x481484(0x110)]-0x1,_0x1818bd;_0x2dcda8>=0x0;_0x2dcda8--)(_0x1818bd=_0x3dbb62[_0x2dcda8])&&(_0x396774=_0x1818bd(_0x396774)||_0x396774);return _0x396774;},y=(_0x685009,_0x52f722)=>(_0xdb7663,_0x2f89d4)=>_0x52f722(_0xdb7663,_0x2f89d4,_0x685009);let C=class extends c[_0x43de35(0x148)]{constructor(_0x20fcb5,_0x5993b6){const _0x23250e=_0x43de35;super(),this['_threadCommentDataSourceService']=_0x20fcb5,this[_0x23250e(0x13a)]=_0x5993b6,this[_0x23250e(0x16f)]();}[_0x43de35(0x16f)](){const _0x4d8f7a=_0x43de35;this['_threadCommentDataSourceService'][_0x4d8f7a(0x162)]=this[_0x4d8f7a(0x13a)],this[_0x4d8f7a(0x121)][_0x4d8f7a(0x184)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x43de35(0x17b)](g))],C);var F=Object['defineProperty'],L=Object[_0x43de35(0x14c)],Z=(_0xa3b8b3,_0x3fc9ac,_0xd4b2fc)=>_0x3fc9ac in _0xa3b8b3?F(_0xa3b8b3,_0x3fc9ac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd4b2fc}):_0xa3b8b3[_0x3fc9ac]=_0xd4b2fc,W=(_0x196dec,_0x5c817f,_0x2e80d4,_0x465333)=>{const _0x5ca863=_0x43de35;for(var _0x126ae5=_0x465333>0x1?void 0x0:_0x465333?L(_0x5c817f,_0x2e80d4):_0x5c817f,_0x4e0a39=_0x196dec[_0x5ca863(0x110)]-0x1,_0x1c731c;_0x4e0a39>=0x0;_0x4e0a39--)(_0x1c731c=_0x196dec[_0x4e0a39])&&(_0x126ae5=_0x1c731c(_0x126ae5)||_0x126ae5);return _0x126ae5;},O=(_0x3f69d6,_0x32e0d1)=>(_0x38166b,_0x364ce)=>_0x32e0d1(_0x38166b,_0x364ce,_0x3f69d6),N=(_0x3467db,_0x210b33,_0x535088)=>Z(_0x3467db,typeof _0x210b33!=_0x43de35(0x163)?_0x210b33+'':_0x210b33,_0x535088);exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x93110f=D,_0x565451,_0x178654){const _0x9a58cc=_0x43de35;super(),this[_0x9a58cc(0x153)]=_0x93110f,this['_injector']=_0x565451,this['_configService']=_0x178654;const {..._0x59b7da}=c[_0x9a58cc(0x15c)]({},D,this[_0x9a58cc(0x153)]);this[_0x9a58cc(0x150)][_0x9a58cc(0x17e)](q,_0x59b7da);}[_0x43de35(0x173)](){const _0x47edca=_0x43de35;[[g],[C],[p]][_0x47edca(0x118)](_0x562525=>{const _0x3614de=_0x47edca;this[_0x3614de(0x15b)]['add'](_0x562525);});}[_0x43de35(0x132)](){const _0x2fb36a=_0x43de35;this['_injector']['get'](C),this[_0x2fb36a(0x15b)][_0x2fb36a(0x141)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x43de35(0x17f)],'type',c['UniverInstanceType'][_0x43de35(0x120)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b[_0x43de35(0x11a)],T[_0x43de35(0x166)]),O(0x1,c[_0x43de35(0x17b)](c[_0x43de35(0x12f)])),O(0x2,c[_0x43de35(0x135)])],exports[_0x43de35(0x17f)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4e76f=_0x173a;(function(_0x226cbb,_0x41b0f0){const _0x5cf68d=_0x173a,_0x4e1a76=_0x226cbb();while(!![]){try{const _0x46f023=-parseInt(_0x5cf68d(0x16f))/0x1+parseInt(_0x5cf68d(0x123))/0x2+parseInt(_0x5cf68d(0x137))/0x3*(parseInt(_0x5cf68d(0x12d))/0x4)+-parseInt(_0x5cf68d(0x146))/0x5*(-parseInt(_0x5cf68d(0x14d))/0x6)+parseInt(_0x5cf68d(0x151))/0x7*(parseInt(_0x5cf68d(0x121))/0x8)+parseInt(_0x5cf68d(0x13c))/0x9+-parseInt(_0x5cf68d(0x16b))/0xa;if(_0x46f023===_0x41b0f0)break;else _0x4e1a76['push'](_0x4e1a76['shift']());}catch(_0x1d1506){_0x4e1a76['push'](_0x4e1a76['shift']());}}}(_0x2a00,0xc36c6));import{CommentService as _0x3fd827,CollaborationSessionService as _0x312cb8,UniverCollaborationClientPlugin as _0xe00712}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1e497f}from'@univerjs-pro/license';import{dayjs as _0x21bb25,UserManagerService as _0x516a13,Inject as _0x113b48,Injector as _0x130087,Disposable as _0x311500,CustomRangeType as _0x488275,UniverInstanceType as _0x414e33,DependentOn as _0x14f0d8,IConfigService as _0x40717c,Plugin as _0x177895,merge as _0x1d1215}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x322bae}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xfb0986,IThreadCommentDataSourceService as _0x2a9349}from'@univerjs/thread-comment';import{bufferTime as _0x25c191}from'rxjs';function _0x173a(_0x3780c3,_0x26751c){const _0x2a009d=_0x2a00();return _0x173a=function(_0x173a32,_0x1aada5){_0x173a32=_0x173a32-0x113;let _0x547450=_0x2a009d[_0x173a32];return _0x547450;},_0x173a(_0x3780c3,_0x26751c);}import{HTTPService as _0x28d87b}from'@univerjs/network';const W=_0x4e76f(0x156);var I=(_0x51b954=>(_0x51b954[_0x51b954['OpenOrReOpen']=0x0]=_0x4e76f(0x169),_0x51b954[_0x51b954[_0x4e76f(0x154)]=0x1]=_0x4e76f(0x154),_0x51b954[_0x51b954[_0x4e76f(0x119)]=-0x1]=_0x4e76f(0x119),_0x51b954))(I||{}),v=(_0x51af3c=>(_0x51af3c[_0x51af3c[_0x4e76f(0x162)]=0x0]=_0x4e76f(0x162),_0x51af3c[_0x51af3c[_0x4e76f(0x16a)]=0x1]='Add',_0x51af3c[_0x51af3c[_0x4e76f(0x171)]=0x2]=_0x4e76f(0x171),_0x51af3c[_0x51af3c[_0x4e76f(0x12c)]=0x3]=_0x4e76f(0x12c),_0x51af3c[_0x51af3c[_0x4e76f(0x114)]=0x4]=_0x4e76f(0x114),_0x51af3c[_0x51af3c['Solve']=0x5]=_0x4e76f(0x178),_0x51af3c[_0x51af3c[_0x4e76f(0x119)]=-0x1]=_0x4e76f(0x119),_0x51af3c))(v||{});const D=_0x250c87=>_0x21bb25(new Date(+_0x250c87))[_0x4e76f(0x11b)](_0x4e76f(0x142)),B=async(_0x23e660,_0x170f3f)=>{const _0x2d9366=_0x4e76f,_0x3f3df0=_0x23e660[_0x2d9366(0x144)](_0x516a13),_0x1b1eb1=_0x23e660['get'](_0x28d87b);_0x170f3f[_0x2d9366(0x160)](_0x3c1cd7=>{const _0x3955d9=_0x2d9366;_0x3f3df0[_0x3955d9(0x143)](_0x3c1cd7)&&_0x170f3f[_0x3955d9(0x16d)](_0x3c1cd7);}),_0x170f3f[_0x2d9366(0x167)]&&(await _0x1b1eb1[_0x2d9366(0x144)](_0x2d9366(0x179),{'params':{'userIDs':[..._0x170f3f]}}))[_0x2d9366(0x130)]['users'][_0x2d9366(0x160)](_0x182a19=>{const _0x1e0345=_0x2d9366;_0x182a19&&_0x3f3df0[_0x1e0345(0x177)](_0x182a19);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5dc74d,_0x4ac995,_0x3bbf85,_0x5020ff)=>{const _0x5cd43f=_0x4e76f;for(var _0x3bbe85=_0x5020ff>0x1?void 0x0:_0x5020ff?K(_0x4ac995,_0x3bbf85):_0x4ac995,_0x223f4d=_0x5dc74d[_0x5cd43f(0x14b)]-0x1,_0x4f7810;_0x223f4d>=0x0;_0x223f4d--)(_0x4f7810=_0x5dc74d[_0x223f4d])&&(_0x3bbe85=_0x4f7810(_0x3bbe85)||_0x3bbe85);return _0x3bbe85;},p=(_0x208eed,_0x5cbabf)=>(_0x5b8c18,_0x55544b)=>_0x5cbabf(_0x5b8c18,_0x55544b,_0x208eed);let S=class extends _0x311500{constructor(_0x38059a,_0x5434c7,_0x41ef4f,_0x4082f1){const _0x3128e7=_0x4e76f;super(),this[_0x3128e7(0x157)]=_0x38059a,this[_0x3128e7(0x118)]=_0x5434c7,this[_0x3128e7(0x124)]=_0x41ef4f,this['_injector']=_0x4082f1,this[_0x3128e7(0x134)](),this[_0x3128e7(0x163)]();}[_0x4e76f(0x163)](){const _0x1313d3=_0x4e76f;this['disposeWithMe'](this[_0x1313d3(0x118)][_0x1313d3(0x155)][_0x1313d3(0x127)](_0x25c191(0x10))['subscribe'](_0x37593a=>{const _0x3221bc=_0x1313d3,_0x235850=new Set();_0x37593a[_0x3221bc(0x160)](_0x16a2c6=>{const _0x22ba9c=_0x3221bc;switch(_0x16a2c6[_0x22ba9c(0x120)]){case _0x22ba9c(0x161):{const _0x52a32b=_0x16a2c6[_0x22ba9c(0x15d)]['personId'];_0x235850[_0x22ba9c(0x161)](_0x52a32b);break;}}}),B(this[_0x3221bc(0x11e)],_0x235850);}));}[_0x4e76f(0x134)](){const _0x197da0=_0x4e76f;this[_0x197da0(0x13a)](this[_0x197da0(0x157)][_0x197da0(0x155)][_0x197da0(0x14f)](async _0x323457=>{const _0x1a59c3=_0x197da0;var _0x4a5272,_0x44c8fa,_0x4a1a70,_0xb2ab84;const _0x489c20=(_0x4a5272=this[_0x1a59c3(0x118)][_0x1a59c3(0x173)](_0x323457['unitId'])['find'](_0x2ee3cc=>_0x2ee3cc[_0x1a59c3(0x125)]===_0x323457[_0x1a59c3(0x125)]))==null?void 0x0:_0x4a5272[_0x1a59c3(0x14e)];if(!_0x489c20)return;const {unitId:_0xe1c271,subUnitId:_0x26414f}=_0x489c20;switch(_0x323457[_0x1a59c3(0x16e)]&&this[_0x1a59c3(0x124)]['addUser'](_0x323457['user']),_0x323457[_0x1a59c3(0x120)]){case v[_0x1a59c3(0x16a)]:break;case v[_0x1a59c3(0x171)]:{this['_threadCommentModel'][_0x1a59c3(0x168)](_0xe1c271,_0x26414f,{'unitId':_0xe1c271,'subUnitId':_0x26414f,'ref':'','id':_0x323457['replyId'],'dT':D(+_0x323457[_0x1a59c3(0x133)]),'threadId':_0x323457[_0x1a59c3(0x125)],'personId':(_0x4a1a70=(_0x44c8fa=_0x323457[_0x1a59c3(0x16e)])==null?void 0x0:_0x44c8fa[_0x1a59c3(0x15a)])!=null?_0x4a1a70:_0x323457[_0x1a59c3(0x17c)],'text':JSON[_0x1a59c3(0x128)](_0x323457[_0x1a59c3(0x170)]),'parentId':_0x489c20['id']});break;}case v['Delete']:{const _0x4f0f7e=this[_0x1a59c3(0x118)][_0x1a59c3(0x139)](_0xe1c271,_0x26414f,_0x323457[_0x1a59c3(0x131)]);_0x4f0f7e&&_0x4f0f7e[_0x1a59c3(0x11f)]&&this[_0x1a59c3(0x118)][_0x1a59c3(0x115)](_0xe1c271,_0x26414f,_0x323457['replyId']);break;}case v[_0x1a59c3(0x12c)]:{this['_threadCommentModel'][_0x1a59c3(0x158)](_0xe1c271,_0x26414f,{'commentId':_0x323457[_0x1a59c3(0x131)],'text':JSON[_0x1a59c3(0x128)](_0x323457['content'])});break;}case v[_0x1a59c3(0x178)]:{const _0x3bb8d5=(_0xb2ab84=this[_0x1a59c3(0x118)][_0x1a59c3(0x173)](_0x323457[_0x1a59c3(0x12a)])[_0x1a59c3(0x148)](_0x5a32aa=>_0x5a32aa['threadId']===_0x323457[_0x1a59c3(0x125)]))==null?void 0x0:_0xb2ab84[_0x1a59c3(0x14e)];_0x3bb8d5&&this[_0x1a59c3(0x118)]['resolveComment'](_0xe1c271,_0x26414f,_0x3bb8d5['id'],_0x323457[_0x1a59c3(0x175)]===I[_0x1a59c3(0x154)]);break;}}}));}};S=V([p(0x0,_0x113b48(_0x3fd827)),p(0x1,_0x113b48(_0xfb0986)),p(0x2,_0x113b48(_0x516a13)),p(0x3,_0x113b48(_0x130087))],S);const z=_0x4e76f(0x126),M={};var k=Object[_0x4e76f(0x132)],Q=(_0x89db04,_0x215f04,_0x577efd,_0x1dd950)=>{const _0x483137=_0x4e76f;for(var _0x35bf35=_0x1dd950>0x1?void 0x0:_0x1dd950?k(_0x215f04,_0x577efd):_0x215f04,_0x2fc482=_0x89db04[_0x483137(0x14b)]-0x1,_0x4d377d;_0x2fc482>=0x0;_0x2fc482--)(_0x4d377d=_0x89db04[_0x2fc482])&&(_0x35bf35=_0x4d377d(_0x35bf35)||_0x35bf35);return _0x35bf35;},_=(_0x1d5945,_0x241dc2)=>(_0x17d376,_0xe16305)=>_0x241dc2(_0x17d376,_0xe16305,_0x1d5945);function X(_0x4c6d0a,_0xa08a1c){const _0x4169a0=_0x4e76f,_0x2b26a2=_0x4c6d0a[_0x4169a0(0x122)][0x0];return{..._0xa08a1c,'id':_0x2b26a2[_0x4169a0(0x131)],'resolved':_0x4c6d0a['solved']===0x1,'dT':D(_0x2b26a2[_0x4169a0(0x133)]),'personId':_0x2b26a2[_0x4169a0(0x17c)],'threadId':_0x2b26a2[_0x4169a0(0x125)]};}function ee(_0x50c8a3,_0x4f0d55,_0x414b48){const _0x4d921b=_0x4e76f;var _0x49551f,_0x48ff7b;if(((_0x48ff7b=(_0x49551f=_0x50c8a3==null?void 0x0:_0x50c8a3[_0x4d921b(0x122)])==null?void 0x0:_0x49551f['length'])!=null?_0x48ff7b:0x0)>0x0){const _0x1d275d=(_0x218bbb,_0x451fa5)=>({'id':_0x218bbb[_0x4d921b(0x131)],'threadId':_0x218bbb[_0x4d921b(0x125)],'dT':D(_0x218bbb[_0x4d921b(0x133)]),'personId':_0x218bbb[_0x4d921b(0x17c)],'resolved':_0x50c8a3[_0x4d921b(0x175)]===I[_0x4d921b(0x154)],'unitId':_0x4f0d55,'subUnitId':_0x414b48,'text':JSON[_0x4d921b(0x128)](_0x218bbb[_0x4d921b(0x170)]),'parentId':_0x451fa5}),_0x1dd06d=_0x1d275d(_0x50c8a3[_0x4d921b(0x122)][0x0]);return{..._0x1dd06d,'children':_0x50c8a3['replies']['slice'](0x1)['map'](_0x56f60f=>_0x1d275d(_0x56f60f,_0x1dd06d['id']))};}return null;}let f=class{constructor(_0x75dd6b,_0x2ca638,_0x3f2f8b,_0x194d57){const _0x588cb5=_0x4e76f;this[_0x588cb5(0x17a)]=_0x75dd6b,this[_0x588cb5(0x124)]=_0x2ca638,this[_0x588cb5(0x129)]=_0x3f2f8b,this['_injector']=_0x194d57;}async[_0x4e76f(0x168)](_0xa1fb67){const _0x32bffb=_0x4e76f;var _0x59adaa,_0x3adcc2;const {parentId:_0x15ec77,unitId:_0x5a2dd2,text:_0xd9a0ee,threadId:_0x7b6a91}=_0xa1fb67,_0x1130d8=(_0x3adcc2=(_0x59adaa=_0xd9a0ee['customRanges'])==null?void 0x0:_0x59adaa[_0x32bffb(0x15c)](_0x508ebc=>_0x508ebc[_0x32bffb(0x164)]===_0x488275[_0x32bffb(0x159)])[_0x32bffb(0x172)](_0x48505d=>_0x48505d['rangeId']))!=null?_0x3adcc2:[],_0x507721=JSON[_0x32bffb(0x13d)](_0xd9a0ee),_0xe05860=(await this[_0x32bffb(0x129)][_0x32bffb(0x152)](_0x5a2dd2))['getMemberID']();if(_0x15ec77){const _0x4a6aab={'memberId':_0xe05860,'unitId':_0x5a2dd2,'content':_0x507721,'mention':_0x1130d8,'threadId':_0x7b6a91},_0x37d9cf=(await this[_0x32bffb(0x17a)][_0x32bffb(0x135)](_0x32bffb(0x176)+_0x5a2dd2+_0x32bffb(0x136),{'body':_0x4a6aab}))[_0x32bffb(0x130)][_0x32bffb(0x17d)];return{..._0xa1fb67,'id':_0x37d9cf[_0x32bffb(0x131)],'dT':_0x21bb25(+_0x37d9cf['createTimestamp'])[_0x32bffb(0x11b)](_0x32bffb(0x142)),'personId':_0x37d9cf[_0x32bffb(0x17c)]};}else{const _0x186775={'memberId':_0xe05860,'unitId':_0x5a2dd2,'content':_0x507721,'mention':_0x1130d8},_0x4426f5=await this[_0x32bffb(0x17a)][_0x32bffb(0x135)](_0x32bffb(0x176)+_0x5a2dd2+_0x32bffb(0x113),{'body':_0x186775});return X(_0x4426f5[_0x32bffb(0x130)][_0x32bffb(0x116)],_0xa1fb67);}}async['updateComment'](_0x5cf13e){const _0x541960=_0x4e76f;var _0x33f1be,_0x153579;const {text:_0x565d58,unitId:_0x1320e2}=_0x5cf13e,_0x26ff26=(_0x153579=(_0x33f1be=_0x565d58[_0x541960(0x150)])==null?void 0x0:_0x33f1be['filter'](_0x528401=>_0x528401[_0x541960(0x164)]===_0x488275[_0x541960(0x159)])[_0x541960(0x172)](_0x32cb40=>_0x32cb40['rangeId']))!=null?_0x153579:[],_0x4b37ff=JSON['stringify'](_0x565d58),_0x4285fa=_0x5cf13e[_0x541960(0x125)],_0x3fb545=_0x5cf13e['id'],_0x1a05c8={'memberId':(await this[_0x541960(0x129)][_0x541960(0x152)](_0x1320e2))[_0x541960(0x174)](),'unitId':_0x1320e2,'threadId':_0x4285fa,'mention':_0x26ff26,'content':_0x4b37ff,'replyId':_0x3fb545},_0x590671=await this[_0x541960(0x17a)]['post'](_0x541960(0x176)+_0x1320e2+_0x541960(0x153),{'body':_0x1a05c8});return!_0x590671['body'][_0x541960(0x117)]||_0x590671[_0x541960(0x130)][_0x541960(0x117)][_0x541960(0x149)]===0x1;}async[_0x4e76f(0x15e)](_0x498879){const _0x53e844=_0x4e76f,{unitId:_0x269a30}=_0x498879,_0x527487=_0x498879[_0x53e844(0x125)],_0x157d06={'memberId':this[_0x53e844(0x124)][_0x53e844(0x141)]()['userID'],'unitId':_0x269a30,'threadId':_0x527487,'solved':_0x498879[_0x53e844(0x13e)]?I['Solved']:I[_0x53e844(0x169)]},_0x1891d9=await this['_httpService'][_0x53e844(0x135)](_0x53e844(0x176)+_0x269a30+'/solved',{'body':_0x157d06});return!_0x1891d9['body'][_0x53e844(0x117)]||_0x1891d9['body']['error'][_0x53e844(0x149)]===0x1;}async[_0x4e76f(0x115)](_0x11bde1,_0x52967a,_0x5228ae,_0x332692){const _0x12b8d9=_0x4e76f,_0x56c35d={'memberId':(await this['_sessionService'][_0x12b8d9(0x152)](_0x11bde1))[_0x12b8d9(0x174)](),'threadId':_0x5228ae,'replyId':_0x332692,'unitId':_0x11bde1},_0x384526=await this[_0x12b8d9(0x17a)][_0x12b8d9(0x135)](_0x12b8d9(0x176)+_0x11bde1+_0x12b8d9(0x11d),{'body':_0x56c35d});return!_0x384526['body']['error']||_0x384526[_0x12b8d9(0x130)][_0x12b8d9(0x117)][_0x12b8d9(0x149)]===0x1;}async[_0x4e76f(0x16c)](_0x34d9cd,_0x101f62,_0x3e0a73){const _0x1de798=_0x4e76f,_0x5049f8={'unitId':_0x34d9cd,'threadId':_0x3e0a73},_0xce298e=await this['_httpService']['post'](_0x1de798(0x176)+_0x34d9cd+'/list',{'body':_0x5049f8}),_0x280787=_0x3e0a73[_0x1de798(0x172)](_0x23a250=>ee(_0xce298e[_0x1de798(0x130)][_0x1de798(0x12e)][_0x23a250],_0x34d9cd,_0x101f62))[_0x1de798(0x15c)](Boolean);return Object[_0x1de798(0x147)](_0xce298e[_0x1de798(0x130)][_0x1de798(0x145)])['forEach'](_0x49c9b5=>{const _0x3e8a9b=_0x1de798;this['_userService'][_0x3e8a9b(0x177)](_0x49c9b5);}),_0x280787;}[_0x4e76f(0x13b)](_0x161504){const _0x232fe9=_0x4e76f;return{'id':_0x161504['id'],'threadId':_0x161504[_0x232fe9(0x125)],'ref':_0x161504[_0x232fe9(0x17b)]};}};f=Q([_(0x0,_0x113b48(_0x28d87b)),_(0x1,_0x113b48(_0x516a13)),_(0x2,_0x113b48(_0x312cb8)),_(0x3,_0x113b48(_0x130087))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x743fd8,_0x5cb16f,_0x2b0c63,_0x525290)=>{const _0x81cea0=_0x4e76f;for(var _0x29e226=_0x525290>0x1?void 0x0:_0x525290?re(_0x5cb16f,_0x2b0c63):_0x5cb16f,_0xa05e90=_0x743fd8[_0x81cea0(0x14b)]-0x1,_0x5460c2;_0xa05e90>=0x0;_0xa05e90--)(_0x5460c2=_0x743fd8[_0xa05e90])&&(_0x29e226=_0x5460c2(_0x29e226)||_0x29e226);return _0x29e226;},N=(_0x2b51f3,_0xa3ee79)=>(_0x37b244,_0x6ca17d)=>_0xa3ee79(_0x37b244,_0x6ca17d,_0x2b51f3);function _0x2a00(){const _0x1c3838=['COMMENT','userID','defineProperty','filter','payload','resolveComment','_threadCommentDataSourceService','forEach','add','Unknown','_initUserSync','rangeType','setConfig','onReady','size','addComment','OpenOrReOpen','Add','17189440RAJMBU','listComments','delete','user','6100CvjTcz','content','Reply','map','getUnit','getMemberID','solved','/universer-api/comment/unit/','addUser','Solve','/universer-api/user/list','_httpService','ref','userId','reply','/add','Delete','deleteComment','comment','error','_threadCommentModel','UNRECOGNIZED','_config','format','onStarting','/delete','_injector','parentId','type','4856JgUuPZ','replies','2965112BydwKc','_userService','threadId','thread-comment-data-source.config','pipe','parse','_sessionService','unitId','_configService','Edit','834004WfCspo','comments','symbol','body','replyId','getOwnPropertyDescriptor','createTimestamp','_init','post','/reply','12QEkJLH','UNIVER_UNKNOWN','getComment','disposeWithMe','saveCommentToSnapshot','734661HnJWAK','stringify','resolved','pluginName','dataSource','getCurrentUser','YYYY/MM/DD\x20HH:mm','getUser','get','users','107885GefCNY','values','find','code','_initDataSource','length','_threadCommentDataSource','30YGFUSM','root','subscribe','customRanges','224zdWAzQ','requireSession','/edit','Solved','commentUpdate$','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','updateComment'];_0x2a00=function(){return _0x1c3838;};return _0x2a00();}let g=class extends _0x311500{constructor(_0x216287,_0xb2ccf9){const _0x4289c8=_0x4e76f;super(),this[_0x4289c8(0x15f)]=_0x216287,this[_0x4289c8(0x14c)]=_0xb2ccf9,this[_0x4289c8(0x14a)]();}['_initDataSource'](){const _0x1c1695=_0x4e76f;this[_0x1c1695(0x15f)][_0x1c1695(0x140)]=this[_0x1c1695(0x14c)],this[_0x1c1695(0x15f)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x2a9349),N(0x1,_0x113b48(f))],g);var se=Object[_0x4e76f(0x15b)],oe=Object[_0x4e76f(0x132)],ne=(_0x3394a7,_0xe46d86,_0x2eded9)=>_0xe46d86 in _0x3394a7?se(_0x3394a7,_0xe46d86,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2eded9}):_0x3394a7[_0xe46d86]=_0x2eded9,ie=(_0x15999a,_0x5d8095,_0xc65a86,_0xfc9e27)=>{for(var _0x373b7f=_0xfc9e27>0x1?void 0x0:_0xfc9e27?oe(_0x5d8095,_0xc65a86):_0x5d8095,_0x20bca9=_0x15999a['length']-0x1,_0x17f830;_0x20bca9>=0x0;_0x20bca9--)(_0x17f830=_0x15999a[_0x20bca9])&&(_0x373b7f=_0x17f830(_0x373b7f)||_0x373b7f);return _0x373b7f;},w=(_0x23c853,_0x25fff0)=>(_0x280bd6,_0x276d71)=>_0x25fff0(_0x280bd6,_0x276d71,_0x23c853),$=(_0x464b68,_0x57af3e,_0x55247a)=>ne(_0x464b68,typeof _0x57af3e!=_0x4e76f(0x12f)?_0x57af3e+'':_0x57af3e,_0x55247a);let b=class extends _0x177895{constructor(_0x662cda=M,_0x2512d3,_0x13de20){const _0x187016=_0x4e76f;super(),this['_config']=_0x662cda,this[_0x187016(0x11e)]=_0x2512d3,this['_configService']=_0x13de20;const {..._0x40df12}=_0x1d1215({},M,this[_0x187016(0x11a)]);this[_0x187016(0x12b)][_0x187016(0x165)](z,_0x40df12);}[_0x4e76f(0x11c)](){const _0x589212=_0x4e76f;[[f],[g],[S]][_0x589212(0x160)](_0x1b8c43=>{const _0x2c55a7=_0x589212;this[_0x2c55a7(0x11e)][_0x2c55a7(0x161)](_0x1b8c43);});}[_0x4e76f(0x166)](){const _0x414fed=_0x4e76f;this['_injector'][_0x414fed(0x144)](g),this['_injector'][_0x414fed(0x144)](S);}};$(b,_0x4e76f(0x13f),W),$(b,_0x4e76f(0x120),_0x414e33[_0x4e76f(0x138)]),b=ie([_0x14f0d8(_0x322bae,_0xe00712,_0x1e497f),w(0x1,_0x113b48(_0x130087)),w(0x2,_0x40717c)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x13c3d9=_0x1f7a;(function(_0x4ed8d7,_0x1548a6){const _0x431f6b=_0x1f7a,_0x15e302=_0x4ed8d7();while(!![]){try{const _0x5afb94=parseInt(_0x431f6b(0x18a))/0x1+-parseInt(_0x431f6b(0x161))/0x2*(-parseInt(_0x431f6b(0x1ae))/0x3)+-parseInt(_0x431f6b(0x1b9))/0x4+parseInt(_0x431f6b(0x1b7))/0x5+-parseInt(_0x431f6b(0x1aa))/0x6+parseInt(_0x431f6b(0x19c))/0x7*(-parseInt(_0x431f6b(0x1ab))/0x8)+parseInt(_0x431f6b(0x173))/0x9;if(_0x5afb94===_0x1548a6)break;else _0x15e302['push'](_0x15e302['shift']());}catch(_0x340034){_0x15e302['push'](_0x15e302['shift']());}}}(_0x47de,0xc8e49));import{CommentService as _0x2c934f,CollaborationSessionService as _0x1a8f5d,UniverCollaborationClientPlugin as _0x16df65}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x237eea}from'@univerjs-pro/license';import{dayjs as _0x557c68,UserManagerService as _0x583a05,Inject as _0x2e04ee,Injector as _0x11dcec,Disposable as _0x9427da,CustomRangeType as _0x547673,UniverInstanceType as _0x13aaa0,DependentOn as _0x3f4f9d,IConfigService as _0x194b3f,Plugin as _0x292764,merge as _0x3b1dff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3910bf}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1dc95e,IThreadCommentDataSourceService as _0x4366cf}from'@univerjs/thread-comment';import{bufferTime as _0x4c388f}from'rxjs';import{HTTPService as _0x468171}from'@univerjs/network';const W=_0x13c3d9(0x189);var I=(_0x28569d=>(_0x28569d[_0x28569d[_0x13c3d9(0x17e)]=0x0]=_0x13c3d9(0x17e),_0x28569d[_0x28569d[_0x13c3d9(0x191)]=0x1]=_0x13c3d9(0x191),_0x28569d[_0x28569d[_0x13c3d9(0x1a6)]=-0x1]='UNRECOGNIZED',_0x28569d))(I||{}),v=(_0x4dcb82=>(_0x4dcb82[_0x4dcb82[_0x13c3d9(0x19b)]=0x0]=_0x13c3d9(0x19b),_0x4dcb82[_0x4dcb82[_0x13c3d9(0x194)]=0x1]='Add',_0x4dcb82[_0x4dcb82['Reply']=0x2]=_0x13c3d9(0x18c),_0x4dcb82[_0x4dcb82[_0x13c3d9(0x19a)]=0x3]=_0x13c3d9(0x19a),_0x4dcb82[_0x4dcb82[_0x13c3d9(0x174)]=0x4]='Delete',_0x4dcb82[_0x4dcb82[_0x13c3d9(0x15e)]=0x5]=_0x13c3d9(0x15e),_0x4dcb82[_0x4dcb82[_0x13c3d9(0x1a6)]=-0x1]=_0x13c3d9(0x1a6),_0x4dcb82))(v||{});const D=_0xbd4eb3=>_0x557c68(new Date(+_0xbd4eb3))['format'](_0x13c3d9(0x18d)),B=async(_0xa60b83,_0x25b454)=>{const _0x151990=_0x13c3d9,_0x58cd82=_0xa60b83['get'](_0x583a05),_0x5c0441=_0xa60b83[_0x151990(0x180)](_0x468171);_0x25b454[_0x151990(0x1b8)](_0x13c772=>{const _0x10379d=_0x151990;_0x58cd82[_0x10379d(0x179)](_0x13c772)&&_0x25b454[_0x10379d(0x169)](_0x13c772);}),_0x25b454[_0x151990(0x1b5)]&&(await _0x5c0441['get'](_0x151990(0x1a0),{'params':{'userIDs':[..._0x25b454]}}))[_0x151990(0x1bb)][_0x151990(0x1a4)][_0x151990(0x1b8)](_0x3fc04c=>{const _0x582281=_0x151990;_0x3fc04c&&_0x58cd82[_0x582281(0x1b6)](_0x3fc04c);});};function _0x1f7a(_0x26020b,_0x1fa16d){const _0x47defc=_0x47de();return _0x1f7a=function(_0x1f7a0f,_0x47af48){_0x1f7a0f=_0x1f7a0f-0x159;let _0x5e88db=_0x47defc[_0x1f7a0f];return _0x5e88db;},_0x1f7a(_0x26020b,_0x1fa16d);}var K=Object[_0x13c3d9(0x16b)],V=(_0x3951aa,_0x6cee0,_0x325766,_0x26b0b2)=>{const _0x52cc57=_0x13c3d9;for(var _0xf82e1b=_0x26b0b2>0x1?void 0x0:_0x26b0b2?K(_0x6cee0,_0x325766):_0x6cee0,_0x4a0f80=_0x3951aa[_0x52cc57(0x15f)]-0x1,_0xf85993;_0x4a0f80>=0x0;_0x4a0f80--)(_0xf85993=_0x3951aa[_0x4a0f80])&&(_0xf82e1b=_0xf85993(_0xf82e1b)||_0xf82e1b);return _0xf82e1b;},p=(_0x46eac1,_0x24c6c7)=>(_0x5ca751,_0x1cc803)=>_0x24c6c7(_0x5ca751,_0x1cc803,_0x46eac1);let S=class extends _0x9427da{constructor(_0x4ab9f9,_0x24d719,_0x2115f4,_0x4bb72b){const _0x20155a=_0x13c3d9;super(),this[_0x20155a(0x159)]=_0x4ab9f9,this[_0x20155a(0x17c)]=_0x24d719,this['_userService']=_0x2115f4,this[_0x20155a(0x193)]=_0x4bb72b,this[_0x20155a(0x16a)](),this[_0x20155a(0x19d)]();}[_0x13c3d9(0x19d)](){const _0x16a772=_0x13c3d9;this[_0x16a772(0x1a2)](this[_0x16a772(0x17c)]['commentUpdate$']['pipe'](_0x4c388f(0x10))[_0x16a772(0x175)](_0x5444bc=>{const _0x4c064e=_0x16a772,_0x4d260f=new Set();_0x5444bc[_0x4c064e(0x1b8)](_0x36efa7=>{const _0xdee37c=_0x4c064e;switch(_0x36efa7['type']){case _0xdee37c(0x186):{const _0x2452e4=_0x36efa7[_0xdee37c(0x1b0)][_0xdee37c(0x188)];_0x4d260f['add'](_0x2452e4);break;}}}),B(this['_injector'],_0x4d260f);}));}[_0x13c3d9(0x16a)](){const _0x128840=_0x13c3d9;this[_0x128840(0x1a2)](this[_0x128840(0x159)][_0x128840(0x1bc)][_0x128840(0x175)](async _0xcccfed=>{const _0xb50b5e=_0x128840;var _0x22030b,_0x4fd26e,_0x15e64c,_0x2845a2;const _0x18e939=(_0x22030b=this[_0xb50b5e(0x17c)][_0xb50b5e(0x18b)](_0xcccfed['unitId'])[_0xb50b5e(0x160)](_0xfd24d3=>_0xfd24d3[_0xb50b5e(0x162)]===_0xcccfed['threadId']))==null?void 0x0:_0x22030b[_0xb50b5e(0x167)];if(!_0x18e939)return;const {unitId:_0x45ac15,subUnitId:_0x5c6377}=_0x18e939;switch(_0xcccfed['user']&&this[_0xb50b5e(0x192)][_0xb50b5e(0x1b6)](_0xcccfed[_0xb50b5e(0x170)]),_0xcccfed[_0xb50b5e(0x164)]){case v[_0xb50b5e(0x194)]:break;case v[_0xb50b5e(0x18c)]:{this[_0xb50b5e(0x17c)][_0xb50b5e(0x16f)](_0x45ac15,_0x5c6377,{'unitId':_0x45ac15,'subUnitId':_0x5c6377,'ref':'','id':_0xcccfed[_0xb50b5e(0x1ba)],'dT':D(+_0xcccfed[_0xb50b5e(0x172)]),'threadId':_0xcccfed[_0xb50b5e(0x162)],'personId':(_0x15e64c=(_0x4fd26e=_0xcccfed[_0xb50b5e(0x170)])==null?void 0x0:_0x4fd26e['userID'])!=null?_0x15e64c:_0xcccfed[_0xb50b5e(0x17d)],'text':JSON[_0xb50b5e(0x166)](_0xcccfed[_0xb50b5e(0x1a8)]),'parentId':_0x18e939['id']});break;}case v['Delete']:{const _0x297496=this[_0xb50b5e(0x17c)]['getComment'](_0x45ac15,_0x5c6377,_0xcccfed['replyId']);_0x297496&&_0x297496['parentId']&&this[_0xb50b5e(0x17c)][_0xb50b5e(0x182)](_0x45ac15,_0x5c6377,_0xcccfed['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0xb50b5e(0x19f)](_0x45ac15,_0x5c6377,{'commentId':_0xcccfed[_0xb50b5e(0x1ba)],'text':JSON[_0xb50b5e(0x166)](_0xcccfed[_0xb50b5e(0x1a8)])});break;}case v['Solve']:{const _0x4da2fb=(_0x2845a2=this[_0xb50b5e(0x17c)][_0xb50b5e(0x18b)](_0xcccfed['unitId'])[_0xb50b5e(0x160)](_0x29fc1a=>_0x29fc1a['threadId']===_0xcccfed['threadId']))==null?void 0x0:_0x2845a2['root'];_0x4da2fb&&this[_0xb50b5e(0x17c)][_0xb50b5e(0x187)](_0x45ac15,_0x5c6377,_0x4da2fb['id'],_0xcccfed[_0xb50b5e(0x171)]===I[_0xb50b5e(0x191)]);break;}}}));}};S=V([p(0x0,_0x2e04ee(_0x2c934f)),p(0x1,_0x2e04ee(_0x1dc95e)),p(0x2,_0x2e04ee(_0x583a05)),p(0x3,_0x2e04ee(_0x11dcec))],S);const z=_0x13c3d9(0x16d),M={};var k=Object[_0x13c3d9(0x16b)],Q=(_0xdb34a9,_0x536a52,_0x2fa342,_0xff8b96)=>{const _0x4c7e7e=_0x13c3d9;for(var _0x47262f=_0xff8b96>0x1?void 0x0:_0xff8b96?k(_0x536a52,_0x2fa342):_0x536a52,_0x5bac06=_0xdb34a9[_0x4c7e7e(0x15f)]-0x1,_0x401592;_0x5bac06>=0x0;_0x5bac06--)(_0x401592=_0xdb34a9[_0x5bac06])&&(_0x47262f=_0x401592(_0x47262f)||_0x47262f);return _0x47262f;},_=(_0x52befc,_0x186154)=>(_0x21e84a,_0x206526)=>_0x186154(_0x21e84a,_0x206526,_0x52befc);function _0x47de(){const _0x5a6842=['/list','size','addUser','5896755vDkePv','forEach','6409424uGZcnb','replyId','body','commentUpdate$','getCurrentUser','ref','_commentService','/edit','resolved','symbol','COMMENT','Solve','length','find','23558KxZbWm','threadId','reply','type','userID','parse','root','/add','delete','_init','getOwnPropertyDescriptor','_configService','thread-comment-data-source.config','replies','addComment','user','solved','createTimestamp','21122352tEvcRL','Delete','subscribe','pluginName','_threadCommentDataSource','filter','getUser','map','/reply','_threadCommentModel','userId','OpenOrReOpen','/universer-api/comment/unit/','get','_sessionService','deleteComment','saveCommentToSnapshot','listComments','_httpService','add','resolveComment','personId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','855490ljkGKX','getUnit','Reply','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','dataSource','onStarting','Solved','_userService','_injector','Add','requireSession','syncUpdateMutationToColla','onReady','comments','rangeId','Edit','Unknown','217DAtJwE','_initUserSync','stringify','updateComment','/universer-api/user/list','code','disposeWithMe','post','users','rangeType','UNRECOGNIZED','defineProperty','content','slice','5228742sTOkEP','298264jxDHzF','format','getMemberID','18UPYafB','/delete','payload','customRanges','error','_initDataSource'];_0x47de=function(){return _0x5a6842;};return _0x47de();}function X(_0x24ce99,_0x25cec6){const _0x4bb7f0=_0x13c3d9,_0x5b4d6a=_0x24ce99[_0x4bb7f0(0x16e)][0x0];return{..._0x25cec6,'id':_0x5b4d6a[_0x4bb7f0(0x1ba)],'resolved':_0x24ce99['solved']===0x1,'dT':D(_0x5b4d6a[_0x4bb7f0(0x172)]),'personId':_0x5b4d6a[_0x4bb7f0(0x17d)],'threadId':_0x5b4d6a['threadId']};}function ee(_0x20e1e3,_0x590ef1,_0x556137){const _0x4cbfc8=_0x13c3d9;var _0x4ef7fe,_0x538691;if(((_0x538691=(_0x4ef7fe=_0x20e1e3==null?void 0x0:_0x20e1e3['replies'])==null?void 0x0:_0x4ef7fe['length'])!=null?_0x538691:0x0)>0x0){const _0x501990=(_0x305557,_0x27fc88)=>({'id':_0x305557[_0x4cbfc8(0x1ba)],'threadId':_0x305557[_0x4cbfc8(0x162)],'dT':D(_0x305557[_0x4cbfc8(0x172)]),'personId':_0x305557[_0x4cbfc8(0x17d)],'resolved':_0x20e1e3[_0x4cbfc8(0x171)]===I[_0x4cbfc8(0x191)],'unitId':_0x590ef1,'subUnitId':_0x556137,'text':JSON['parse'](_0x305557['content']),'parentId':_0x27fc88}),_0x432053=_0x501990(_0x20e1e3[_0x4cbfc8(0x16e)][0x0]);return{..._0x432053,'children':_0x20e1e3['replies'][_0x4cbfc8(0x1a9)](0x1)[_0x4cbfc8(0x17a)](_0x33448f=>_0x501990(_0x33448f,_0x432053['id']))};}return null;}let f=class{constructor(_0x4e8625,_0x5c246a,_0x5d9300,_0x554242){const _0xc244fe=_0x13c3d9;this['_httpService']=_0x4e8625,this['_userService']=_0x5c246a,this[_0xc244fe(0x181)]=_0x5d9300,this[_0xc244fe(0x193)]=_0x554242;}async[_0x13c3d9(0x16f)](_0x3f7f59){const _0x55e224=_0x13c3d9;var _0x28d8f6,_0x40dec9;const {parentId:_0x34a06f,unitId:_0x2d38e8,text:_0x128f83,threadId:_0x2c6625}=_0x3f7f59,_0x5bd4f7=(_0x40dec9=(_0x28d8f6=_0x128f83[_0x55e224(0x1b1)])==null?void 0x0:_0x28d8f6['filter'](_0x265f3d=>_0x265f3d['rangeType']===_0x547673['COMMENT'])[_0x55e224(0x17a)](_0x34e026=>_0x34e026[_0x55e224(0x199)]))!=null?_0x40dec9:[],_0x5a82a4=JSON[_0x55e224(0x19e)](_0x128f83),_0x48437e=(await this[_0x55e224(0x181)]['requireSession'](_0x2d38e8))[_0x55e224(0x1ad)]();if(_0x34a06f){const _0x99bc31={'memberId':_0x48437e,'unitId':_0x2d38e8,'content':_0x5a82a4,'mention':_0x5bd4f7,'threadId':_0x2c6625},_0x250919=(await this[_0x55e224(0x185)][_0x55e224(0x1a3)](_0x55e224(0x17f)+_0x2d38e8+_0x55e224(0x17b),{'body':_0x99bc31}))[_0x55e224(0x1bb)][_0x55e224(0x163)];return{..._0x3f7f59,'id':_0x250919[_0x55e224(0x1ba)],'dT':_0x557c68(+_0x250919[_0x55e224(0x172)])[_0x55e224(0x1ac)](_0x55e224(0x18d)),'personId':_0x250919[_0x55e224(0x17d)]};}else{const _0x3b11eb={'memberId':_0x48437e,'unitId':_0x2d38e8,'content':_0x5a82a4,'mention':_0x5bd4f7},_0x5a385c=await this[_0x55e224(0x185)][_0x55e224(0x1a3)](_0x55e224(0x17f)+_0x2d38e8+_0x55e224(0x168),{'body':_0x3b11eb});return X(_0x5a385c[_0x55e224(0x1bb)]['comment'],_0x3f7f59);}}async[_0x13c3d9(0x19f)](_0x149dbb){const _0x3169bb=_0x13c3d9;var _0x16bce0,_0x85e0fa;const {text:_0x1626f1,unitId:_0x2ccf66}=_0x149dbb,_0x2afb95=(_0x85e0fa=(_0x16bce0=_0x1626f1[_0x3169bb(0x1b1)])==null?void 0x0:_0x16bce0[_0x3169bb(0x178)](_0x5a1939=>_0x5a1939[_0x3169bb(0x1a5)]===_0x547673[_0x3169bb(0x15d)])[_0x3169bb(0x17a)](_0x1be393=>_0x1be393[_0x3169bb(0x199)]))!=null?_0x85e0fa:[],_0x295e13=JSON[_0x3169bb(0x19e)](_0x1626f1),_0x47b53a=_0x149dbb[_0x3169bb(0x162)],_0x549837=_0x149dbb['id'],_0x5d7fb3={'memberId':(await this[_0x3169bb(0x181)][_0x3169bb(0x195)](_0x2ccf66))[_0x3169bb(0x1ad)](),'unitId':_0x2ccf66,'threadId':_0x47b53a,'mention':_0x2afb95,'content':_0x295e13,'replyId':_0x549837},_0x255e1e=await this[_0x3169bb(0x185)][_0x3169bb(0x1a3)]('/universer-api/comment/unit/'+_0x2ccf66+_0x3169bb(0x15a),{'body':_0x5d7fb3});return!_0x255e1e['body'][_0x3169bb(0x1b2)]||_0x255e1e['body']['error']['code']===0x1;}async[_0x13c3d9(0x187)](_0x5034b2){const _0x549165=_0x13c3d9,{unitId:_0x555eab}=_0x5034b2,_0x2b91b5=_0x5034b2[_0x549165(0x162)],_0x1083a4={'memberId':this[_0x549165(0x192)][_0x549165(0x1bd)]()[_0x549165(0x165)],'unitId':_0x555eab,'threadId':_0x2b91b5,'solved':_0x5034b2[_0x549165(0x15b)]?I[_0x549165(0x191)]:I['OpenOrReOpen']},_0x1edcc8=await this[_0x549165(0x185)][_0x549165(0x1a3)](_0x549165(0x17f)+_0x555eab+'/solved',{'body':_0x1083a4});return!_0x1edcc8[_0x549165(0x1bb)]['error']||_0x1edcc8[_0x549165(0x1bb)][_0x549165(0x1b2)][_0x549165(0x1a1)]===0x1;}async[_0x13c3d9(0x182)](_0x564d19,_0x20bd13,_0x4ae960,_0x546cc2){const _0x1e5c1e=_0x13c3d9,_0x3704ce={'memberId':(await this[_0x1e5c1e(0x181)][_0x1e5c1e(0x195)](_0x564d19))[_0x1e5c1e(0x1ad)](),'threadId':_0x4ae960,'replyId':_0x546cc2,'unitId':_0x564d19},_0x2ee176=await this[_0x1e5c1e(0x185)]['post'](_0x1e5c1e(0x17f)+_0x564d19+_0x1e5c1e(0x1af),{'body':_0x3704ce});return!_0x2ee176['body'][_0x1e5c1e(0x1b2)]||_0x2ee176[_0x1e5c1e(0x1bb)][_0x1e5c1e(0x1b2)][_0x1e5c1e(0x1a1)]===0x1;}async[_0x13c3d9(0x184)](_0x30643d,_0x2afaf5,_0xbb66e0){const _0xa6e8be=_0x13c3d9,_0x38dcbe={'unitId':_0x30643d,'threadId':_0xbb66e0},_0x16d47f=await this[_0xa6e8be(0x185)][_0xa6e8be(0x1a3)](_0xa6e8be(0x17f)+_0x30643d+_0xa6e8be(0x1b4),{'body':_0x38dcbe}),_0x1d1054=_0xbb66e0['map'](_0x4a6116=>ee(_0x16d47f['body'][_0xa6e8be(0x198)][_0x4a6116],_0x30643d,_0x2afaf5))[_0xa6e8be(0x178)](Boolean);return Object['values'](_0x16d47f['body'][_0xa6e8be(0x1a4)])[_0xa6e8be(0x1b8)](_0x55a5e8=>{const _0x20affa=_0xa6e8be;this['_userService'][_0x20affa(0x1b6)](_0x55a5e8);}),_0x1d1054;}[_0x13c3d9(0x183)](_0x78275e){const _0x405ced=_0x13c3d9;return{'id':_0x78275e['id'],'threadId':_0x78275e['threadId'],'ref':_0x78275e[_0x405ced(0x1be)]};}};f=Q([_(0x0,_0x2e04ee(_0x468171)),_(0x1,_0x2e04ee(_0x583a05)),_(0x2,_0x2e04ee(_0x1a8f5d)),_(0x3,_0x2e04ee(_0x11dcec))],f);var re=Object[_0x13c3d9(0x16b)],te=(_0x28bd81,_0xa5147a,_0x2f2566,_0x16ac68)=>{const _0x480083=_0x13c3d9;for(var _0x35d15b=_0x16ac68>0x1?void 0x0:_0x16ac68?re(_0xa5147a,_0x2f2566):_0xa5147a,_0x5aadb1=_0x28bd81[_0x480083(0x15f)]-0x1,_0x420851;_0x5aadb1>=0x0;_0x5aadb1--)(_0x420851=_0x28bd81[_0x5aadb1])&&(_0x35d15b=_0x420851(_0x35d15b)||_0x35d15b);return _0x35d15b;},N=(_0x10d84d,_0x38d699)=>(_0x3d3604,_0x2a265b)=>_0x38d699(_0x3d3604,_0x2a265b,_0x10d84d);let g=class extends _0x9427da{constructor(_0x1139ec,_0x41f04c){const _0x3b5c8c=_0x13c3d9;super(),this[_0x3b5c8c(0x18e)]=_0x1139ec,this['_threadCommentDataSource']=_0x41f04c,this[_0x3b5c8c(0x1b3)]();}[_0x13c3d9(0x1b3)](){const _0x25e838=_0x13c3d9;this['_threadCommentDataSourceService'][_0x25e838(0x18f)]=this[_0x25e838(0x177)],this[_0x25e838(0x18e)][_0x25e838(0x196)]=!0x1;}};g=te([N(0x0,_0x4366cf),N(0x1,_0x2e04ee(f))],g);var se=Object[_0x13c3d9(0x1a7)],oe=Object[_0x13c3d9(0x16b)],ne=(_0x5ad281,_0x2f1b6e,_0x4c2f12)=>_0x2f1b6e in _0x5ad281?se(_0x5ad281,_0x2f1b6e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c2f12}):_0x5ad281[_0x2f1b6e]=_0x4c2f12,ie=(_0x22ef7f,_0x499d25,_0x44cf9a,_0x60f26)=>{for(var _0x1c08ca=_0x60f26>0x1?void 0x0:_0x60f26?oe(_0x499d25,_0x44cf9a):_0x499d25,_0x1b190b=_0x22ef7f['length']-0x1,_0x30f278;_0x1b190b>=0x0;_0x1b190b--)(_0x30f278=_0x22ef7f[_0x1b190b])&&(_0x1c08ca=_0x30f278(_0x1c08ca)||_0x1c08ca);return _0x1c08ca;},w=(_0x1121f4,_0x55e0eb)=>(_0x43d869,_0x429b4a)=>_0x55e0eb(_0x43d869,_0x429b4a,_0x1121f4),$=(_0x8a6448,_0x4493d2,_0x5998b7)=>ne(_0x8a6448,typeof _0x4493d2!=_0x13c3d9(0x15c)?_0x4493d2+'':_0x4493d2,_0x5998b7);let b=class extends _0x292764{constructor(_0x530d2f=M,_0xe03b19,_0x2cb324){const _0x50d2aa=_0x13c3d9;super(),this['_config']=_0x530d2f,this['_injector']=_0xe03b19,this[_0x50d2aa(0x16c)]=_0x2cb324;const {..._0x4dcfc8}=_0x3b1dff({},M,this['_config']);this[_0x50d2aa(0x16c)]['setConfig'](z,_0x4dcfc8);}[_0x13c3d9(0x190)](){[[f],[g],[S]]['forEach'](_0x1373f8=>{const _0x5746a5=_0x1f7a;this['_injector'][_0x5746a5(0x186)](_0x1373f8);});}[_0x13c3d9(0x197)](){const _0x3f6b4f=_0x13c3d9;this['_injector']['get'](g),this[_0x3f6b4f(0x193)][_0x3f6b4f(0x180)](S);}};$(b,_0x13c3d9(0x176),W),$(b,'type',_0x13aaa0['UNIVER_UNKNOWN']),b=ie([_0x3f4f9d(_0x3910bf,_0x16df65,_0x237eea),w(0x1,_0x2e04ee(_0x11dcec)),w(0x2,_0x194b3f)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4e76f=_0x173a;(function(_0x226cbb,_0x41b0f0){const _0x5cf68d=_0x173a,_0x4e1a76=_0x226cbb();while(!![]){try{const _0x46f023=-parseInt(_0x5cf68d(0x16f))/0x1+parseInt(_0x5cf68d(0x123))/0x2+parseInt(_0x5cf68d(0x137))/0x3*(parseInt(_0x5cf68d(0x12d))/0x4)+-parseInt(_0x5cf68d(0x146))/0x5*(-parseInt(_0x5cf68d(0x14d))/0x6)+parseInt(_0x5cf68d(0x151))/0x7*(parseInt(_0x5cf68d(0x121))/0x8)+parseInt(_0x5cf68d(0x13c))/0x9+-parseInt(_0x5cf68d(0x16b))/0xa;if(_0x46f023===_0x41b0f0)break;else _0x4e1a76['push'](_0x4e1a76['shift']());}catch(_0x1d1506){_0x4e1a76['push'](_0x4e1a76['shift']());}}}(_0x2a00,0xc36c6));import{CommentService as _0x3fd827,CollaborationSessionService as _0x312cb8,UniverCollaborationClientPlugin as _0xe00712}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1e497f}from'@univerjs-pro/license';import{dayjs as _0x21bb25,UserManagerService as _0x516a13,Inject as _0x113b48,Injector as _0x130087,Disposable as _0x311500,CustomRangeType as _0x488275,UniverInstanceType as _0x414e33,DependentOn as _0x14f0d8,IConfigService as _0x40717c,Plugin as _0x177895,merge as _0x1d1215}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x322bae}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xfb0986,IThreadCommentDataSourceService as _0x2a9349}from'@univerjs/thread-comment';import{bufferTime as _0x25c191}from'rxjs';function _0x173a(_0x3780c3,_0x26751c){const _0x2a009d=_0x2a00();return _0x173a=function(_0x173a32,_0x1aada5){_0x173a32=_0x173a32-0x113;let _0x547450=_0x2a009d[_0x173a32];return _0x547450;},_0x173a(_0x3780c3,_0x26751c);}import{HTTPService as _0x28d87b}from'@univerjs/network';const W=_0x4e76f(0x156);var I=(_0x51b954=>(_0x51b954[_0x51b954['OpenOrReOpen']=0x0]=_0x4e76f(0x169),_0x51b954[_0x51b954[_0x4e76f(0x154)]=0x1]=_0x4e76f(0x154),_0x51b954[_0x51b954[_0x4e76f(0x119)]=-0x1]=_0x4e76f(0x119),_0x51b954))(I||{}),v=(_0x51af3c=>(_0x51af3c[_0x51af3c[_0x4e76f(0x162)]=0x0]=_0x4e76f(0x162),_0x51af3c[_0x51af3c[_0x4e76f(0x16a)]=0x1]='Add',_0x51af3c[_0x51af3c[_0x4e76f(0x171)]=0x2]=_0x4e76f(0x171),_0x51af3c[_0x51af3c[_0x4e76f(0x12c)]=0x3]=_0x4e76f(0x12c),_0x51af3c[_0x51af3c[_0x4e76f(0x114)]=0x4]=_0x4e76f(0x114),_0x51af3c[_0x51af3c['Solve']=0x5]=_0x4e76f(0x178),_0x51af3c[_0x51af3c[_0x4e76f(0x119)]=-0x1]=_0x4e76f(0x119),_0x51af3c))(v||{});const D=_0x250c87=>_0x21bb25(new Date(+_0x250c87))[_0x4e76f(0x11b)](_0x4e76f(0x142)),B=async(_0x23e660,_0x170f3f)=>{const _0x2d9366=_0x4e76f,_0x3f3df0=_0x23e660[_0x2d9366(0x144)](_0x516a13),_0x1b1eb1=_0x23e660['get'](_0x28d87b);_0x170f3f[_0x2d9366(0x160)](_0x3c1cd7=>{const _0x3955d9=_0x2d9366;_0x3f3df0[_0x3955d9(0x143)](_0x3c1cd7)&&_0x170f3f[_0x3955d9(0x16d)](_0x3c1cd7);}),_0x170f3f[_0x2d9366(0x167)]&&(await _0x1b1eb1[_0x2d9366(0x144)](_0x2d9366(0x179),{'params':{'userIDs':[..._0x170f3f]}}))[_0x2d9366(0x130)]['users'][_0x2d9366(0x160)](_0x182a19=>{const _0x1e0345=_0x2d9366;_0x182a19&&_0x3f3df0[_0x1e0345(0x177)](_0x182a19);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5dc74d,_0x4ac995,_0x3bbf85,_0x5020ff)=>{const _0x5cd43f=_0x4e76f;for(var _0x3bbe85=_0x5020ff>0x1?void 0x0:_0x5020ff?K(_0x4ac995,_0x3bbf85):_0x4ac995,_0x223f4d=_0x5dc74d[_0x5cd43f(0x14b)]-0x1,_0x4f7810;_0x223f4d>=0x0;_0x223f4d--)(_0x4f7810=_0x5dc74d[_0x223f4d])&&(_0x3bbe85=_0x4f7810(_0x3bbe85)||_0x3bbe85);return _0x3bbe85;},p=(_0x208eed,_0x5cbabf)=>(_0x5b8c18,_0x55544b)=>_0x5cbabf(_0x5b8c18,_0x55544b,_0x208eed);let S=class extends _0x311500{constructor(_0x38059a,_0x5434c7,_0x41ef4f,_0x4082f1){const _0x3128e7=_0x4e76f;super(),this[_0x3128e7(0x157)]=_0x38059a,this[_0x3128e7(0x118)]=_0x5434c7,this[_0x3128e7(0x124)]=_0x41ef4f,this['_injector']=_0x4082f1,this[_0x3128e7(0x134)](),this[_0x3128e7(0x163)]();}[_0x4e76f(0x163)](){const _0x1313d3=_0x4e76f;this['disposeWithMe'](this[_0x1313d3(0x118)][_0x1313d3(0x155)][_0x1313d3(0x127)](_0x25c191(0x10))['subscribe'](_0x37593a=>{const _0x3221bc=_0x1313d3,_0x235850=new Set();_0x37593a[_0x3221bc(0x160)](_0x16a2c6=>{const _0x22ba9c=_0x3221bc;switch(_0x16a2c6[_0x22ba9c(0x120)]){case _0x22ba9c(0x161):{const _0x52a32b=_0x16a2c6[_0x22ba9c(0x15d)]['personId'];_0x235850[_0x22ba9c(0x161)](_0x52a32b);break;}}}),B(this[_0x3221bc(0x11e)],_0x235850);}));}[_0x4e76f(0x134)](){const _0x197da0=_0x4e76f;this[_0x197da0(0x13a)](this[_0x197da0(0x157)][_0x197da0(0x155)][_0x197da0(0x14f)](async _0x323457=>{const _0x1a59c3=_0x197da0;var _0x4a5272,_0x44c8fa,_0x4a1a70,_0xb2ab84;const _0x489c20=(_0x4a5272=this[_0x1a59c3(0x118)][_0x1a59c3(0x173)](_0x323457['unitId'])['find'](_0x2ee3cc=>_0x2ee3cc[_0x1a59c3(0x125)]===_0x323457[_0x1a59c3(0x125)]))==null?void 0x0:_0x4a5272[_0x1a59c3(0x14e)];if(!_0x489c20)return;const {unitId:_0xe1c271,subUnitId:_0x26414f}=_0x489c20;switch(_0x323457[_0x1a59c3(0x16e)]&&this[_0x1a59c3(0x124)]['addUser'](_0x323457['user']),_0x323457[_0x1a59c3(0x120)]){case v[_0x1a59c3(0x16a)]:break;case v[_0x1a59c3(0x171)]:{this['_threadCommentModel'][_0x1a59c3(0x168)](_0xe1c271,_0x26414f,{'unitId':_0xe1c271,'subUnitId':_0x26414f,'ref':'','id':_0x323457['replyId'],'dT':D(+_0x323457[_0x1a59c3(0x133)]),'threadId':_0x323457[_0x1a59c3(0x125)],'personId':(_0x4a1a70=(_0x44c8fa=_0x323457[_0x1a59c3(0x16e)])==null?void 0x0:_0x44c8fa[_0x1a59c3(0x15a)])!=null?_0x4a1a70:_0x323457[_0x1a59c3(0x17c)],'text':JSON[_0x1a59c3(0x128)](_0x323457[_0x1a59c3(0x170)]),'parentId':_0x489c20['id']});break;}case v['Delete']:{const _0x4f0f7e=this[_0x1a59c3(0x118)][_0x1a59c3(0x139)](_0xe1c271,_0x26414f,_0x323457[_0x1a59c3(0x131)]);_0x4f0f7e&&_0x4f0f7e[_0x1a59c3(0x11f)]&&this[_0x1a59c3(0x118)][_0x1a59c3(0x115)](_0xe1c271,_0x26414f,_0x323457['replyId']);break;}case v[_0x1a59c3(0x12c)]:{this['_threadCommentModel'][_0x1a59c3(0x158)](_0xe1c271,_0x26414f,{'commentId':_0x323457[_0x1a59c3(0x131)],'text':JSON[_0x1a59c3(0x128)](_0x323457['content'])});break;}case v[_0x1a59c3(0x178)]:{const _0x3bb8d5=(_0xb2ab84=this[_0x1a59c3(0x118)][_0x1a59c3(0x173)](_0x323457[_0x1a59c3(0x12a)])[_0x1a59c3(0x148)](_0x5a32aa=>_0x5a32aa['threadId']===_0x323457[_0x1a59c3(0x125)]))==null?void 0x0:_0xb2ab84[_0x1a59c3(0x14e)];_0x3bb8d5&&this[_0x1a59c3(0x118)]['resolveComment'](_0xe1c271,_0x26414f,_0x3bb8d5['id'],_0x323457[_0x1a59c3(0x175)]===I[_0x1a59c3(0x154)]);break;}}}));}};S=V([p(0x0,_0x113b48(_0x3fd827)),p(0x1,_0x113b48(_0xfb0986)),p(0x2,_0x113b48(_0x516a13)),p(0x3,_0x113b48(_0x130087))],S);const z=_0x4e76f(0x126),M={};var k=Object[_0x4e76f(0x132)],Q=(_0x89db04,_0x215f04,_0x577efd,_0x1dd950)=>{const _0x483137=_0x4e76f;for(var _0x35bf35=_0x1dd950>0x1?void 0x0:_0x1dd950?k(_0x215f04,_0x577efd):_0x215f04,_0x2fc482=_0x89db04[_0x483137(0x14b)]-0x1,_0x4d377d;_0x2fc482>=0x0;_0x2fc482--)(_0x4d377d=_0x89db04[_0x2fc482])&&(_0x35bf35=_0x4d377d(_0x35bf35)||_0x35bf35);return _0x35bf35;},_=(_0x1d5945,_0x241dc2)=>(_0x17d376,_0xe16305)=>_0x241dc2(_0x17d376,_0xe16305,_0x1d5945);function X(_0x4c6d0a,_0xa08a1c){const _0x4169a0=_0x4e76f,_0x2b26a2=_0x4c6d0a[_0x4169a0(0x122)][0x0];return{..._0xa08a1c,'id':_0x2b26a2[_0x4169a0(0x131)],'resolved':_0x4c6d0a['solved']===0x1,'dT':D(_0x2b26a2[_0x4169a0(0x133)]),'personId':_0x2b26a2[_0x4169a0(0x17c)],'threadId':_0x2b26a2[_0x4169a0(0x125)]};}function ee(_0x50c8a3,_0x4f0d55,_0x414b48){const _0x4d921b=_0x4e76f;var _0x49551f,_0x48ff7b;if(((_0x48ff7b=(_0x49551f=_0x50c8a3==null?void 0x0:_0x50c8a3[_0x4d921b(0x122)])==null?void 0x0:_0x49551f['length'])!=null?_0x48ff7b:0x0)>0x0){const _0x1d275d=(_0x218bbb,_0x451fa5)=>({'id':_0x218bbb[_0x4d921b(0x131)],'threadId':_0x218bbb[_0x4d921b(0x125)],'dT':D(_0x218bbb[_0x4d921b(0x133)]),'personId':_0x218bbb[_0x4d921b(0x17c)],'resolved':_0x50c8a3[_0x4d921b(0x175)]===I[_0x4d921b(0x154)],'unitId':_0x4f0d55,'subUnitId':_0x414b48,'text':JSON[_0x4d921b(0x128)](_0x218bbb[_0x4d921b(0x170)]),'parentId':_0x451fa5}),_0x1dd06d=_0x1d275d(_0x50c8a3[_0x4d921b(0x122)][0x0]);return{..._0x1dd06d,'children':_0x50c8a3['replies']['slice'](0x1)['map'](_0x56f60f=>_0x1d275d(_0x56f60f,_0x1dd06d['id']))};}return null;}let f=class{constructor(_0x75dd6b,_0x2ca638,_0x3f2f8b,_0x194d57){const _0x588cb5=_0x4e76f;this[_0x588cb5(0x17a)]=_0x75dd6b,this[_0x588cb5(0x124)]=_0x2ca638,this[_0x588cb5(0x129)]=_0x3f2f8b,this['_injector']=_0x194d57;}async[_0x4e76f(0x168)](_0xa1fb67){const _0x32bffb=_0x4e76f;var _0x59adaa,_0x3adcc2;const {parentId:_0x15ec77,unitId:_0x5a2dd2,text:_0xd9a0ee,threadId:_0x7b6a91}=_0xa1fb67,_0x1130d8=(_0x3adcc2=(_0x59adaa=_0xd9a0ee['customRanges'])==null?void 0x0:_0x59adaa[_0x32bffb(0x15c)](_0x508ebc=>_0x508ebc[_0x32bffb(0x164)]===_0x488275[_0x32bffb(0x159)])[_0x32bffb(0x172)](_0x48505d=>_0x48505d['rangeId']))!=null?_0x3adcc2:[],_0x507721=JSON[_0x32bffb(0x13d)](_0xd9a0ee),_0xe05860=(await this[_0x32bffb(0x129)][_0x32bffb(0x152)](_0x5a2dd2))['getMemberID']();if(_0x15ec77){const _0x4a6aab={'memberId':_0xe05860,'unitId':_0x5a2dd2,'content':_0x507721,'mention':_0x1130d8,'threadId':_0x7b6a91},_0x37d9cf=(await this[_0x32bffb(0x17a)][_0x32bffb(0x135)](_0x32bffb(0x176)+_0x5a2dd2+_0x32bffb(0x136),{'body':_0x4a6aab}))[_0x32bffb(0x130)][_0x32bffb(0x17d)];return{..._0xa1fb67,'id':_0x37d9cf[_0x32bffb(0x131)],'dT':_0x21bb25(+_0x37d9cf['createTimestamp'])[_0x32bffb(0x11b)](_0x32bffb(0x142)),'personId':_0x37d9cf[_0x32bffb(0x17c)]};}else{const _0x186775={'memberId':_0xe05860,'unitId':_0x5a2dd2,'content':_0x507721,'mention':_0x1130d8},_0x4426f5=await this[_0x32bffb(0x17a)][_0x32bffb(0x135)](_0x32bffb(0x176)+_0x5a2dd2+_0x32bffb(0x113),{'body':_0x186775});return X(_0x4426f5[_0x32bffb(0x130)][_0x32bffb(0x116)],_0xa1fb67);}}async['updateComment'](_0x5cf13e){const _0x541960=_0x4e76f;var _0x33f1be,_0x153579;const {text:_0x565d58,unitId:_0x1320e2}=_0x5cf13e,_0x26ff26=(_0x153579=(_0x33f1be=_0x565d58[_0x541960(0x150)])==null?void 0x0:_0x33f1be['filter'](_0x528401=>_0x528401[_0x541960(0x164)]===_0x488275[_0x541960(0x159)])[_0x541960(0x172)](_0x32cb40=>_0x32cb40['rangeId']))!=null?_0x153579:[],_0x4b37ff=JSON['stringify'](_0x565d58),_0x4285fa=_0x5cf13e[_0x541960(0x125)],_0x3fb545=_0x5cf13e['id'],_0x1a05c8={'memberId':(await this[_0x541960(0x129)][_0x541960(0x152)](_0x1320e2))[_0x541960(0x174)](),'unitId':_0x1320e2,'threadId':_0x4285fa,'mention':_0x26ff26,'content':_0x4b37ff,'replyId':_0x3fb545},_0x590671=await this[_0x541960(0x17a)]['post'](_0x541960(0x176)+_0x1320e2+_0x541960(0x153),{'body':_0x1a05c8});return!_0x590671['body'][_0x541960(0x117)]||_0x590671[_0x541960(0x130)][_0x541960(0x117)][_0x541960(0x149)]===0x1;}async[_0x4e76f(0x15e)](_0x498879){const _0x53e844=_0x4e76f,{unitId:_0x269a30}=_0x498879,_0x527487=_0x498879[_0x53e844(0x125)],_0x157d06={'memberId':this[_0x53e844(0x124)][_0x53e844(0x141)]()['userID'],'unitId':_0x269a30,'threadId':_0x527487,'solved':_0x498879[_0x53e844(0x13e)]?I['Solved']:I[_0x53e844(0x169)]},_0x1891d9=await this['_httpService'][_0x53e844(0x135)](_0x53e844(0x176)+_0x269a30+'/solved',{'body':_0x157d06});return!_0x1891d9['body'][_0x53e844(0x117)]||_0x1891d9['body']['error'][_0x53e844(0x149)]===0x1;}async[_0x4e76f(0x115)](_0x11bde1,_0x52967a,_0x5228ae,_0x332692){const _0x12b8d9=_0x4e76f,_0x56c35d={'memberId':(await this['_sessionService'][_0x12b8d9(0x152)](_0x11bde1))[_0x12b8d9(0x174)](),'threadId':_0x5228ae,'replyId':_0x332692,'unitId':_0x11bde1},_0x384526=await this[_0x12b8d9(0x17a)][_0x12b8d9(0x135)](_0x12b8d9(0x176)+_0x11bde1+_0x12b8d9(0x11d),{'body':_0x56c35d});return!_0x384526['body']['error']||_0x384526[_0x12b8d9(0x130)][_0x12b8d9(0x117)][_0x12b8d9(0x149)]===0x1;}async[_0x4e76f(0x16c)](_0x34d9cd,_0x101f62,_0x3e0a73){const _0x1de798=_0x4e76f,_0x5049f8={'unitId':_0x34d9cd,'threadId':_0x3e0a73},_0xce298e=await this['_httpService']['post'](_0x1de798(0x176)+_0x34d9cd+'/list',{'body':_0x5049f8}),_0x280787=_0x3e0a73[_0x1de798(0x172)](_0x23a250=>ee(_0xce298e[_0x1de798(0x130)][_0x1de798(0x12e)][_0x23a250],_0x34d9cd,_0x101f62))[_0x1de798(0x15c)](Boolean);return Object[_0x1de798(0x147)](_0xce298e[_0x1de798(0x130)][_0x1de798(0x145)])['forEach'](_0x49c9b5=>{const _0x3e8a9b=_0x1de798;this['_userService'][_0x3e8a9b(0x177)](_0x49c9b5);}),_0x280787;}[_0x4e76f(0x13b)](_0x161504){const _0x232fe9=_0x4e76f;return{'id':_0x161504['id'],'threadId':_0x161504[_0x232fe9(0x125)],'ref':_0x161504[_0x232fe9(0x17b)]};}};f=Q([_(0x0,_0x113b48(_0x28d87b)),_(0x1,_0x113b48(_0x516a13)),_(0x2,_0x113b48(_0x312cb8)),_(0x3,_0x113b48(_0x130087))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x743fd8,_0x5cb16f,_0x2b0c63,_0x525290)=>{const _0x81cea0=_0x4e76f;for(var _0x29e226=_0x525290>0x1?void 0x0:_0x525290?re(_0x5cb16f,_0x2b0c63):_0x5cb16f,_0xa05e90=_0x743fd8[_0x81cea0(0x14b)]-0x1,_0x5460c2;_0xa05e90>=0x0;_0xa05e90--)(_0x5460c2=_0x743fd8[_0xa05e90])&&(_0x29e226=_0x5460c2(_0x29e226)||_0x29e226);return _0x29e226;},N=(_0x2b51f3,_0xa3ee79)=>(_0x37b244,_0x6ca17d)=>_0xa3ee79(_0x37b244,_0x6ca17d,_0x2b51f3);function _0x2a00(){const _0x1c3838=['COMMENT','userID','defineProperty','filter','payload','resolveComment','_threadCommentDataSourceService','forEach','add','Unknown','_initUserSync','rangeType','setConfig','onReady','size','addComment','OpenOrReOpen','Add','17189440RAJMBU','listComments','delete','user','6100CvjTcz','content','Reply','map','getUnit','getMemberID','solved','/universer-api/comment/unit/','addUser','Solve','/universer-api/user/list','_httpService','ref','userId','reply','/add','Delete','deleteComment','comment','error','_threadCommentModel','UNRECOGNIZED','_config','format','onStarting','/delete','_injector','parentId','type','4856JgUuPZ','replies','2965112BydwKc','_userService','threadId','thread-comment-data-source.config','pipe','parse','_sessionService','unitId','_configService','Edit','834004WfCspo','comments','symbol','body','replyId','getOwnPropertyDescriptor','createTimestamp','_init','post','/reply','12QEkJLH','UNIVER_UNKNOWN','getComment','disposeWithMe','saveCommentToSnapshot','734661HnJWAK','stringify','resolved','pluginName','dataSource','getCurrentUser','YYYY/MM/DD\x20HH:mm','getUser','get','users','107885GefCNY','values','find','code','_initDataSource','length','_threadCommentDataSource','30YGFUSM','root','subscribe','customRanges','224zdWAzQ','requireSession','/edit','Solved','commentUpdate$','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','updateComment'];_0x2a00=function(){return _0x1c3838;};return _0x2a00();}let g=class extends _0x311500{constructor(_0x216287,_0xb2ccf9){const _0x4289c8=_0x4e76f;super(),this[_0x4289c8(0x15f)]=_0x216287,this[_0x4289c8(0x14c)]=_0xb2ccf9,this[_0x4289c8(0x14a)]();}['_initDataSource'](){const _0x1c1695=_0x4e76f;this[_0x1c1695(0x15f)][_0x1c1695(0x140)]=this[_0x1c1695(0x14c)],this[_0x1c1695(0x15f)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x2a9349),N(0x1,_0x113b48(f))],g);var se=Object[_0x4e76f(0x15b)],oe=Object[_0x4e76f(0x132)],ne=(_0x3394a7,_0xe46d86,_0x2eded9)=>_0xe46d86 in _0x3394a7?se(_0x3394a7,_0xe46d86,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2eded9}):_0x3394a7[_0xe46d86]=_0x2eded9,ie=(_0x15999a,_0x5d8095,_0xc65a86,_0xfc9e27)=>{for(var _0x373b7f=_0xfc9e27>0x1?void 0x0:_0xfc9e27?oe(_0x5d8095,_0xc65a86):_0x5d8095,_0x20bca9=_0x15999a['length']-0x1,_0x17f830;_0x20bca9>=0x0;_0x20bca9--)(_0x17f830=_0x15999a[_0x20bca9])&&(_0x373b7f=_0x17f830(_0x373b7f)||_0x373b7f);return _0x373b7f;},w=(_0x23c853,_0x25fff0)=>(_0x280bd6,_0x276d71)=>_0x25fff0(_0x280bd6,_0x276d71,_0x23c853),$=(_0x464b68,_0x57af3e,_0x55247a)=>ne(_0x464b68,typeof _0x57af3e!=_0x4e76f(0x12f)?_0x57af3e+'':_0x57af3e,_0x55247a);let b=class extends _0x177895{constructor(_0x662cda=M,_0x2512d3,_0x13de20){const _0x187016=_0x4e76f;super(),this['_config']=_0x662cda,this[_0x187016(0x11e)]=_0x2512d3,this['_configService']=_0x13de20;const {..._0x40df12}=_0x1d1215({},M,this[_0x187016(0x11a)]);this[_0x187016(0x12b)][_0x187016(0x165)](z,_0x40df12);}[_0x4e76f(0x11c)](){const _0x589212=_0x4e76f;[[f],[g],[S]][_0x589212(0x160)](_0x1b8c43=>{const _0x2c55a7=_0x589212;this[_0x2c55a7(0x11e)][_0x2c55a7(0x161)](_0x1b8c43);});}[_0x4e76f(0x166)](){const _0x414fed=_0x4e76f;this['_injector'][_0x414fed(0x144)](g),this['_injector'][_0x414fed(0x144)](S);}};$(b,_0x4e76f(0x13f),W),$(b,_0x4e76f(0x120),_0x414e33[_0x4e76f(0x138)]),b=ie([_0x14f0d8(_0x322bae,_0xe00712,_0x1e497f),w(0x1,_0x113b48(_0x130087)),w(0x2,_0x40717c)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x13c3d9=_0x1f7a;(function(_0x4ed8d7,_0x1548a6){const _0x431f6b=_0x1f7a,_0x15e302=_0x4ed8d7();while(!![]){try{const _0x5afb94=parseInt(_0x431f6b(0x18a))/0x1+-parseInt(_0x431f6b(0x161))/0x2*(-parseInt(_0x431f6b(0x1ae))/0x3)+-parseInt(_0x431f6b(0x1b9))/0x4+parseInt(_0x431f6b(0x1b7))/0x5+-parseInt(_0x431f6b(0x1aa))/0x6+parseInt(_0x431f6b(0x19c))/0x7*(-parseInt(_0x431f6b(0x1ab))/0x8)+parseInt(_0x431f6b(0x173))/0x9;if(_0x5afb94===_0x1548a6)break;else _0x15e302['push'](_0x15e302['shift']());}catch(_0x340034){_0x15e302['push'](_0x15e302['shift']());}}}(_0x47de,0xc8e49));import{CommentService as _0x2c934f,CollaborationSessionService as _0x1a8f5d,UniverCollaborationClientPlugin as _0x16df65}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x237eea}from'@univerjs-pro/license';import{dayjs as _0x557c68,UserManagerService as _0x583a05,Inject as _0x2e04ee,Injector as _0x11dcec,Disposable as _0x9427da,CustomRangeType as _0x547673,UniverInstanceType as _0x13aaa0,DependentOn as _0x3f4f9d,IConfigService as _0x194b3f,Plugin as _0x292764,merge as _0x3b1dff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3910bf}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1dc95e,IThreadCommentDataSourceService as _0x4366cf}from'@univerjs/thread-comment';import{bufferTime as _0x4c388f}from'rxjs';import{HTTPService as _0x468171}from'@univerjs/network';const W=_0x13c3d9(0x189);var I=(_0x28569d=>(_0x28569d[_0x28569d[_0x13c3d9(0x17e)]=0x0]=_0x13c3d9(0x17e),_0x28569d[_0x28569d[_0x13c3d9(0x191)]=0x1]=_0x13c3d9(0x191),_0x28569d[_0x28569d[_0x13c3d9(0x1a6)]=-0x1]='UNRECOGNIZED',_0x28569d))(I||{}),v=(_0x4dcb82=>(_0x4dcb82[_0x4dcb82[_0x13c3d9(0x19b)]=0x0]=_0x13c3d9(0x19b),_0x4dcb82[_0x4dcb82[_0x13c3d9(0x194)]=0x1]='Add',_0x4dcb82[_0x4dcb82['Reply']=0x2]=_0x13c3d9(0x18c),_0x4dcb82[_0x4dcb82[_0x13c3d9(0x19a)]=0x3]=_0x13c3d9(0x19a),_0x4dcb82[_0x4dcb82[_0x13c3d9(0x174)]=0x4]='Delete',_0x4dcb82[_0x4dcb82[_0x13c3d9(0x15e)]=0x5]=_0x13c3d9(0x15e),_0x4dcb82[_0x4dcb82[_0x13c3d9(0x1a6)]=-0x1]=_0x13c3d9(0x1a6),_0x4dcb82))(v||{});const D=_0xbd4eb3=>_0x557c68(new Date(+_0xbd4eb3))['format'](_0x13c3d9(0x18d)),B=async(_0xa60b83,_0x25b454)=>{const _0x151990=_0x13c3d9,_0x58cd82=_0xa60b83['get'](_0x583a05),_0x5c0441=_0xa60b83[_0x151990(0x180)](_0x468171);_0x25b454[_0x151990(0x1b8)](_0x13c772=>{const _0x10379d=_0x151990;_0x58cd82[_0x10379d(0x179)](_0x13c772)&&_0x25b454[_0x10379d(0x169)](_0x13c772);}),_0x25b454[_0x151990(0x1b5)]&&(await _0x5c0441['get'](_0x151990(0x1a0),{'params':{'userIDs':[..._0x25b454]}}))[_0x151990(0x1bb)][_0x151990(0x1a4)][_0x151990(0x1b8)](_0x3fc04c=>{const _0x582281=_0x151990;_0x3fc04c&&_0x58cd82[_0x582281(0x1b6)](_0x3fc04c);});};function _0x1f7a(_0x26020b,_0x1fa16d){const _0x47defc=_0x47de();return _0x1f7a=function(_0x1f7a0f,_0x47af48){_0x1f7a0f=_0x1f7a0f-0x159;let _0x5e88db=_0x47defc[_0x1f7a0f];return _0x5e88db;},_0x1f7a(_0x26020b,_0x1fa16d);}var K=Object[_0x13c3d9(0x16b)],V=(_0x3951aa,_0x6cee0,_0x325766,_0x26b0b2)=>{const _0x52cc57=_0x13c3d9;for(var _0xf82e1b=_0x26b0b2>0x1?void 0x0:_0x26b0b2?K(_0x6cee0,_0x325766):_0x6cee0,_0x4a0f80=_0x3951aa[_0x52cc57(0x15f)]-0x1,_0xf85993;_0x4a0f80>=0x0;_0x4a0f80--)(_0xf85993=_0x3951aa[_0x4a0f80])&&(_0xf82e1b=_0xf85993(_0xf82e1b)||_0xf82e1b);return _0xf82e1b;},p=(_0x46eac1,_0x24c6c7)=>(_0x5ca751,_0x1cc803)=>_0x24c6c7(_0x5ca751,_0x1cc803,_0x46eac1);let S=class extends _0x9427da{constructor(_0x4ab9f9,_0x24d719,_0x2115f4,_0x4bb72b){const _0x20155a=_0x13c3d9;super(),this[_0x20155a(0x159)]=_0x4ab9f9,this[_0x20155a(0x17c)]=_0x24d719,this['_userService']=_0x2115f4,this[_0x20155a(0x193)]=_0x4bb72b,this[_0x20155a(0x16a)](),this[_0x20155a(0x19d)]();}[_0x13c3d9(0x19d)](){const _0x16a772=_0x13c3d9;this[_0x16a772(0x1a2)](this[_0x16a772(0x17c)]['commentUpdate$']['pipe'](_0x4c388f(0x10))[_0x16a772(0x175)](_0x5444bc=>{const _0x4c064e=_0x16a772,_0x4d260f=new Set();_0x5444bc[_0x4c064e(0x1b8)](_0x36efa7=>{const _0xdee37c=_0x4c064e;switch(_0x36efa7['type']){case _0xdee37c(0x186):{const _0x2452e4=_0x36efa7[_0xdee37c(0x1b0)][_0xdee37c(0x188)];_0x4d260f['add'](_0x2452e4);break;}}}),B(this['_injector'],_0x4d260f);}));}[_0x13c3d9(0x16a)](){const _0x128840=_0x13c3d9;this[_0x128840(0x1a2)](this[_0x128840(0x159)][_0x128840(0x1bc)][_0x128840(0x175)](async _0xcccfed=>{const _0xb50b5e=_0x128840;var _0x22030b,_0x4fd26e,_0x15e64c,_0x2845a2;const _0x18e939=(_0x22030b=this[_0xb50b5e(0x17c)][_0xb50b5e(0x18b)](_0xcccfed['unitId'])[_0xb50b5e(0x160)](_0xfd24d3=>_0xfd24d3[_0xb50b5e(0x162)]===_0xcccfed['threadId']))==null?void 0x0:_0x22030b[_0xb50b5e(0x167)];if(!_0x18e939)return;const {unitId:_0x45ac15,subUnitId:_0x5c6377}=_0x18e939;switch(_0xcccfed['user']&&this[_0xb50b5e(0x192)][_0xb50b5e(0x1b6)](_0xcccfed[_0xb50b5e(0x170)]),_0xcccfed[_0xb50b5e(0x164)]){case v[_0xb50b5e(0x194)]:break;case v[_0xb50b5e(0x18c)]:{this[_0xb50b5e(0x17c)][_0xb50b5e(0x16f)](_0x45ac15,_0x5c6377,{'unitId':_0x45ac15,'subUnitId':_0x5c6377,'ref':'','id':_0xcccfed[_0xb50b5e(0x1ba)],'dT':D(+_0xcccfed[_0xb50b5e(0x172)]),'threadId':_0xcccfed[_0xb50b5e(0x162)],'personId':(_0x15e64c=(_0x4fd26e=_0xcccfed[_0xb50b5e(0x170)])==null?void 0x0:_0x4fd26e['userID'])!=null?_0x15e64c:_0xcccfed[_0xb50b5e(0x17d)],'text':JSON[_0xb50b5e(0x166)](_0xcccfed[_0xb50b5e(0x1a8)]),'parentId':_0x18e939['id']});break;}case v['Delete']:{const _0x297496=this[_0xb50b5e(0x17c)]['getComment'](_0x45ac15,_0x5c6377,_0xcccfed['replyId']);_0x297496&&_0x297496['parentId']&&this[_0xb50b5e(0x17c)][_0xb50b5e(0x182)](_0x45ac15,_0x5c6377,_0xcccfed['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0xb50b5e(0x19f)](_0x45ac15,_0x5c6377,{'commentId':_0xcccfed[_0xb50b5e(0x1ba)],'text':JSON[_0xb50b5e(0x166)](_0xcccfed[_0xb50b5e(0x1a8)])});break;}case v['Solve']:{const _0x4da2fb=(_0x2845a2=this[_0xb50b5e(0x17c)][_0xb50b5e(0x18b)](_0xcccfed['unitId'])[_0xb50b5e(0x160)](_0x29fc1a=>_0x29fc1a['threadId']===_0xcccfed['threadId']))==null?void 0x0:_0x2845a2['root'];_0x4da2fb&&this[_0xb50b5e(0x17c)][_0xb50b5e(0x187)](_0x45ac15,_0x5c6377,_0x4da2fb['id'],_0xcccfed[_0xb50b5e(0x171)]===I[_0xb50b5e(0x191)]);break;}}}));}};S=V([p(0x0,_0x2e04ee(_0x2c934f)),p(0x1,_0x2e04ee(_0x1dc95e)),p(0x2,_0x2e04ee(_0x583a05)),p(0x3,_0x2e04ee(_0x11dcec))],S);const z=_0x13c3d9(0x16d),M={};var k=Object[_0x13c3d9(0x16b)],Q=(_0xdb34a9,_0x536a52,_0x2fa342,_0xff8b96)=>{const _0x4c7e7e=_0x13c3d9;for(var _0x47262f=_0xff8b96>0x1?void 0x0:_0xff8b96?k(_0x536a52,_0x2fa342):_0x536a52,_0x5bac06=_0xdb34a9[_0x4c7e7e(0x15f)]-0x1,_0x401592;_0x5bac06>=0x0;_0x5bac06--)(_0x401592=_0xdb34a9[_0x5bac06])&&(_0x47262f=_0x401592(_0x47262f)||_0x47262f);return _0x47262f;},_=(_0x52befc,_0x186154)=>(_0x21e84a,_0x206526)=>_0x186154(_0x21e84a,_0x206526,_0x52befc);function _0x47de(){const _0x5a6842=['/list','size','addUser','5896755vDkePv','forEach','6409424uGZcnb','replyId','body','commentUpdate$','getCurrentUser','ref','_commentService','/edit','resolved','symbol','COMMENT','Solve','length','find','23558KxZbWm','threadId','reply','type','userID','parse','root','/add','delete','_init','getOwnPropertyDescriptor','_configService','thread-comment-data-source.config','replies','addComment','user','solved','createTimestamp','21122352tEvcRL','Delete','subscribe','pluginName','_threadCommentDataSource','filter','getUser','map','/reply','_threadCommentModel','userId','OpenOrReOpen','/universer-api/comment/unit/','get','_sessionService','deleteComment','saveCommentToSnapshot','listComments','_httpService','add','resolveComment','personId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','855490ljkGKX','getUnit','Reply','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','dataSource','onStarting','Solved','_userService','_injector','Add','requireSession','syncUpdateMutationToColla','onReady','comments','rangeId','Edit','Unknown','217DAtJwE','_initUserSync','stringify','updateComment','/universer-api/user/list','code','disposeWithMe','post','users','rangeType','UNRECOGNIZED','defineProperty','content','slice','5228742sTOkEP','298264jxDHzF','format','getMemberID','18UPYafB','/delete','payload','customRanges','error','_initDataSource'];_0x47de=function(){return _0x5a6842;};return _0x47de();}function X(_0x24ce99,_0x25cec6){const _0x4bb7f0=_0x13c3d9,_0x5b4d6a=_0x24ce99[_0x4bb7f0(0x16e)][0x0];return{..._0x25cec6,'id':_0x5b4d6a[_0x4bb7f0(0x1ba)],'resolved':_0x24ce99['solved']===0x1,'dT':D(_0x5b4d6a[_0x4bb7f0(0x172)]),'personId':_0x5b4d6a[_0x4bb7f0(0x17d)],'threadId':_0x5b4d6a['threadId']};}function ee(_0x20e1e3,_0x590ef1,_0x556137){const _0x4cbfc8=_0x13c3d9;var _0x4ef7fe,_0x538691;if(((_0x538691=(_0x4ef7fe=_0x20e1e3==null?void 0x0:_0x20e1e3['replies'])==null?void 0x0:_0x4ef7fe['length'])!=null?_0x538691:0x0)>0x0){const _0x501990=(_0x305557,_0x27fc88)=>({'id':_0x305557[_0x4cbfc8(0x1ba)],'threadId':_0x305557[_0x4cbfc8(0x162)],'dT':D(_0x305557[_0x4cbfc8(0x172)]),'personId':_0x305557[_0x4cbfc8(0x17d)],'resolved':_0x20e1e3[_0x4cbfc8(0x171)]===I[_0x4cbfc8(0x191)],'unitId':_0x590ef1,'subUnitId':_0x556137,'text':JSON['parse'](_0x305557['content']),'parentId':_0x27fc88}),_0x432053=_0x501990(_0x20e1e3[_0x4cbfc8(0x16e)][0x0]);return{..._0x432053,'children':_0x20e1e3['replies'][_0x4cbfc8(0x1a9)](0x1)[_0x4cbfc8(0x17a)](_0x33448f=>_0x501990(_0x33448f,_0x432053['id']))};}return null;}let f=class{constructor(_0x4e8625,_0x5c246a,_0x5d9300,_0x554242){const _0xc244fe=_0x13c3d9;this['_httpService']=_0x4e8625,this['_userService']=_0x5c246a,this[_0xc244fe(0x181)]=_0x5d9300,this[_0xc244fe(0x193)]=_0x554242;}async[_0x13c3d9(0x16f)](_0x3f7f59){const _0x55e224=_0x13c3d9;var _0x28d8f6,_0x40dec9;const {parentId:_0x34a06f,unitId:_0x2d38e8,text:_0x128f83,threadId:_0x2c6625}=_0x3f7f59,_0x5bd4f7=(_0x40dec9=(_0x28d8f6=_0x128f83[_0x55e224(0x1b1)])==null?void 0x0:_0x28d8f6['filter'](_0x265f3d=>_0x265f3d['rangeType']===_0x547673['COMMENT'])[_0x55e224(0x17a)](_0x34e026=>_0x34e026[_0x55e224(0x199)]))!=null?_0x40dec9:[],_0x5a82a4=JSON[_0x55e224(0x19e)](_0x128f83),_0x48437e=(await this[_0x55e224(0x181)]['requireSession'](_0x2d38e8))[_0x55e224(0x1ad)]();if(_0x34a06f){const _0x99bc31={'memberId':_0x48437e,'unitId':_0x2d38e8,'content':_0x5a82a4,'mention':_0x5bd4f7,'threadId':_0x2c6625},_0x250919=(await this[_0x55e224(0x185)][_0x55e224(0x1a3)](_0x55e224(0x17f)+_0x2d38e8+_0x55e224(0x17b),{'body':_0x99bc31}))[_0x55e224(0x1bb)][_0x55e224(0x163)];return{..._0x3f7f59,'id':_0x250919[_0x55e224(0x1ba)],'dT':_0x557c68(+_0x250919[_0x55e224(0x172)])[_0x55e224(0x1ac)](_0x55e224(0x18d)),'personId':_0x250919[_0x55e224(0x17d)]};}else{const _0x3b11eb={'memberId':_0x48437e,'unitId':_0x2d38e8,'content':_0x5a82a4,'mention':_0x5bd4f7},_0x5a385c=await this[_0x55e224(0x185)][_0x55e224(0x1a3)](_0x55e224(0x17f)+_0x2d38e8+_0x55e224(0x168),{'body':_0x3b11eb});return X(_0x5a385c[_0x55e224(0x1bb)]['comment'],_0x3f7f59);}}async[_0x13c3d9(0x19f)](_0x149dbb){const _0x3169bb=_0x13c3d9;var _0x16bce0,_0x85e0fa;const {text:_0x1626f1,unitId:_0x2ccf66}=_0x149dbb,_0x2afb95=(_0x85e0fa=(_0x16bce0=_0x1626f1[_0x3169bb(0x1b1)])==null?void 0x0:_0x16bce0[_0x3169bb(0x178)](_0x5a1939=>_0x5a1939[_0x3169bb(0x1a5)]===_0x547673[_0x3169bb(0x15d)])[_0x3169bb(0x17a)](_0x1be393=>_0x1be393[_0x3169bb(0x199)]))!=null?_0x85e0fa:[],_0x295e13=JSON[_0x3169bb(0x19e)](_0x1626f1),_0x47b53a=_0x149dbb[_0x3169bb(0x162)],_0x549837=_0x149dbb['id'],_0x5d7fb3={'memberId':(await this[_0x3169bb(0x181)][_0x3169bb(0x195)](_0x2ccf66))[_0x3169bb(0x1ad)](),'unitId':_0x2ccf66,'threadId':_0x47b53a,'mention':_0x2afb95,'content':_0x295e13,'replyId':_0x549837},_0x255e1e=await this[_0x3169bb(0x185)][_0x3169bb(0x1a3)]('/universer-api/comment/unit/'+_0x2ccf66+_0x3169bb(0x15a),{'body':_0x5d7fb3});return!_0x255e1e['body'][_0x3169bb(0x1b2)]||_0x255e1e['body']['error']['code']===0x1;}async[_0x13c3d9(0x187)](_0x5034b2){const _0x549165=_0x13c3d9,{unitId:_0x555eab}=_0x5034b2,_0x2b91b5=_0x5034b2[_0x549165(0x162)],_0x1083a4={'memberId':this[_0x549165(0x192)][_0x549165(0x1bd)]()[_0x549165(0x165)],'unitId':_0x555eab,'threadId':_0x2b91b5,'solved':_0x5034b2[_0x549165(0x15b)]?I[_0x549165(0x191)]:I['OpenOrReOpen']},_0x1edcc8=await this[_0x549165(0x185)][_0x549165(0x1a3)](_0x549165(0x17f)+_0x555eab+'/solved',{'body':_0x1083a4});return!_0x1edcc8[_0x549165(0x1bb)]['error']||_0x1edcc8[_0x549165(0x1bb)][_0x549165(0x1b2)][_0x549165(0x1a1)]===0x1;}async[_0x13c3d9(0x182)](_0x564d19,_0x20bd13,_0x4ae960,_0x546cc2){const _0x1e5c1e=_0x13c3d9,_0x3704ce={'memberId':(await this[_0x1e5c1e(0x181)][_0x1e5c1e(0x195)](_0x564d19))[_0x1e5c1e(0x1ad)](),'threadId':_0x4ae960,'replyId':_0x546cc2,'unitId':_0x564d19},_0x2ee176=await this[_0x1e5c1e(0x185)]['post'](_0x1e5c1e(0x17f)+_0x564d19+_0x1e5c1e(0x1af),{'body':_0x3704ce});return!_0x2ee176['body'][_0x1e5c1e(0x1b2)]||_0x2ee176[_0x1e5c1e(0x1bb)][_0x1e5c1e(0x1b2)][_0x1e5c1e(0x1a1)]===0x1;}async[_0x13c3d9(0x184)](_0x30643d,_0x2afaf5,_0xbb66e0){const _0xa6e8be=_0x13c3d9,_0x38dcbe={'unitId':_0x30643d,'threadId':_0xbb66e0},_0x16d47f=await this[_0xa6e8be(0x185)][_0xa6e8be(0x1a3)](_0xa6e8be(0x17f)+_0x30643d+_0xa6e8be(0x1b4),{'body':_0x38dcbe}),_0x1d1054=_0xbb66e0['map'](_0x4a6116=>ee(_0x16d47f['body'][_0xa6e8be(0x198)][_0x4a6116],_0x30643d,_0x2afaf5))[_0xa6e8be(0x178)](Boolean);return Object['values'](_0x16d47f['body'][_0xa6e8be(0x1a4)])[_0xa6e8be(0x1b8)](_0x55a5e8=>{const _0x20affa=_0xa6e8be;this['_userService'][_0x20affa(0x1b6)](_0x55a5e8);}),_0x1d1054;}[_0x13c3d9(0x183)](_0x78275e){const _0x405ced=_0x13c3d9;return{'id':_0x78275e['id'],'threadId':_0x78275e['threadId'],'ref':_0x78275e[_0x405ced(0x1be)]};}};f=Q([_(0x0,_0x2e04ee(_0x468171)),_(0x1,_0x2e04ee(_0x583a05)),_(0x2,_0x2e04ee(_0x1a8f5d)),_(0x3,_0x2e04ee(_0x11dcec))],f);var re=Object[_0x13c3d9(0x16b)],te=(_0x28bd81,_0xa5147a,_0x2f2566,_0x16ac68)=>{const _0x480083=_0x13c3d9;for(var _0x35d15b=_0x16ac68>0x1?void 0x0:_0x16ac68?re(_0xa5147a,_0x2f2566):_0xa5147a,_0x5aadb1=_0x28bd81[_0x480083(0x15f)]-0x1,_0x420851;_0x5aadb1>=0x0;_0x5aadb1--)(_0x420851=_0x28bd81[_0x5aadb1])&&(_0x35d15b=_0x420851(_0x35d15b)||_0x35d15b);return _0x35d15b;},N=(_0x10d84d,_0x38d699)=>(_0x3d3604,_0x2a265b)=>_0x38d699(_0x3d3604,_0x2a265b,_0x10d84d);let g=class extends _0x9427da{constructor(_0x1139ec,_0x41f04c){const _0x3b5c8c=_0x13c3d9;super(),this[_0x3b5c8c(0x18e)]=_0x1139ec,this['_threadCommentDataSource']=_0x41f04c,this[_0x3b5c8c(0x1b3)]();}[_0x13c3d9(0x1b3)](){const _0x25e838=_0x13c3d9;this['_threadCommentDataSourceService'][_0x25e838(0x18f)]=this[_0x25e838(0x177)],this[_0x25e838(0x18e)][_0x25e838(0x196)]=!0x1;}};g=te([N(0x0,_0x4366cf),N(0x1,_0x2e04ee(f))],g);var se=Object[_0x13c3d9(0x1a7)],oe=Object[_0x13c3d9(0x16b)],ne=(_0x5ad281,_0x2f1b6e,_0x4c2f12)=>_0x2f1b6e in _0x5ad281?se(_0x5ad281,_0x2f1b6e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c2f12}):_0x5ad281[_0x2f1b6e]=_0x4c2f12,ie=(_0x22ef7f,_0x499d25,_0x44cf9a,_0x60f26)=>{for(var _0x1c08ca=_0x60f26>0x1?void 0x0:_0x60f26?oe(_0x499d25,_0x44cf9a):_0x499d25,_0x1b190b=_0x22ef7f['length']-0x1,_0x30f278;_0x1b190b>=0x0;_0x1b190b--)(_0x30f278=_0x22ef7f[_0x1b190b])&&(_0x1c08ca=_0x30f278(_0x1c08ca)||_0x1c08ca);return _0x1c08ca;},w=(_0x1121f4,_0x55e0eb)=>(_0x43d869,_0x429b4a)=>_0x55e0eb(_0x43d869,_0x429b4a,_0x1121f4),$=(_0x8a6448,_0x4493d2,_0x5998b7)=>ne(_0x8a6448,typeof _0x4493d2!=_0x13c3d9(0x15c)?_0x4493d2+'':_0x4493d2,_0x5998b7);let b=class extends _0x292764{constructor(_0x530d2f=M,_0xe03b19,_0x2cb324){const _0x50d2aa=_0x13c3d9;super(),this['_config']=_0x530d2f,this['_injector']=_0xe03b19,this[_0x50d2aa(0x16c)]=_0x2cb324;const {..._0x4dcfc8}=_0x3b1dff({},M,this['_config']);this[_0x50d2aa(0x16c)]['setConfig'](z,_0x4dcfc8);}[_0x13c3d9(0x190)](){[[f],[g],[S]]['forEach'](_0x1373f8=>{const _0x5746a5=_0x1f7a;this['_injector'][_0x5746a5(0x186)](_0x1373f8);});}[_0x13c3d9(0x197)](){const _0x3f6b4f=_0x13c3d9;this['_injector']['get'](g),this[_0x3f6b4f(0x193)][_0x3f6b4f(0x180)](S);}};$(b,_0x13c3d9(0x176),W),$(b,'type',_0x13aaa0['UNIVER_UNKNOWN']),b=ie([_0x3f4f9d(_0x3910bf,_0x16df65,_0x237eea),w(0x1,_0x2e04ee(_0x11dcec)),w(0x2,_0x194b3f)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x86a69a,_0x54fa86){const _0xd758f1=_0x1af2,_0x2e67b2=_0x86a69a();while(!![]){try{const _0x2e845e=-parseInt(_0xd758f1(0x1be))/0x1*(-parseInt(_0xd758f1(0x1b2))/0x2)+-parseInt(_0xd758f1(0x13c))/0x3*(parseInt(_0xd758f1(0x141))/0x4)+parseInt(_0xd758f1(0x17b))/0x5+parseInt(_0xd758f1(0x1ab))/0x6*(parseInt(_0xd758f1(0x184))/0x7)+-parseInt(_0xd758f1(0x149))/0x8*(-parseInt(_0xd758f1(0x154))/0x9)+-parseInt(_0xd758f1(0x1ad))/0xa+parseInt(_0xd758f1(0x1b8))/0xb*(-parseInt(_0xd758f1(0x1a9))/0xc);if(_0x2e845e===_0x54fa86)break;else _0x2e67b2['push'](_0x2e67b2['shift']());}catch(_0x96302){_0x2e67b2['push'](_0x2e67b2['shift']());}}}(_0x3c95,0xafeea),function(_0x505a51,_0x8476bf){const _0x152dd6=_0x1af2;typeof exports==_0x152dd6(0x178)&&typeof module<'u'?_0x8476bf(exports,require(_0x152dd6(0x176)),require(_0x152dd6(0x156)),require(_0x152dd6(0x19f)),require('@univerjs/thread-comment-ui'),require(_0x152dd6(0x151)),require(_0x152dd6(0x142)),require(_0x152dd6(0x1b3))):typeof define==_0x152dd6(0x1aa)&&define[_0x152dd6(0x169)]?define([_0x152dd6(0x157),_0x152dd6(0x176),_0x152dd6(0x156),'@univerjs/core','@univerjs/thread-comment-ui',_0x152dd6(0x151),_0x152dd6(0x142),'@univerjs/network'],_0x8476bf):(_0x505a51=typeof globalThis<'u'?globalThis:_0x505a51||self,_0x8476bf(_0x505a51[_0x152dd6(0x196)]={},_0x505a51[_0x152dd6(0x165)],_0x505a51['UniverProLicense'],_0x505a51[_0x152dd6(0x18d)],_0x505a51[_0x152dd6(0x198)],_0x505a51[_0x152dd6(0x1bb)],_0x505a51[_0x152dd6(0x142)],_0x505a51[_0x152dd6(0x19d)]));}(this,function(_0x54c443,_0x17f06f,_0x27b3c8,_0x5af020,_0x11abb0,_0x1affee,_0x47f407,_0x61f4b4){'use strict';const _0x2f3eb6=_0x1af2;const _0x53620e=_0x2f3eb6(0x143);var _0x18219b=(_0x4b914e=>(_0x4b914e[_0x4b914e['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x4b914e[_0x4b914e['Solved']=0x1]='Solved',_0x4b914e[_0x4b914e[_0x2f3eb6(0x13b)]=-0x1]='UNRECOGNIZED',_0x4b914e))(_0x18219b||{}),_0x357c5d=(_0x3f2f6d=>(_0x3f2f6d[_0x3f2f6d['Unknown']=0x0]=_0x2f3eb6(0x179),_0x3f2f6d[_0x3f2f6d[_0x2f3eb6(0x173)]=0x1]='Add',_0x3f2f6d[_0x3f2f6d['Reply']=0x2]=_0x2f3eb6(0x183),_0x3f2f6d[_0x3f2f6d[_0x2f3eb6(0x172)]=0x3]=_0x2f3eb6(0x172),_0x3f2f6d[_0x3f2f6d[_0x2f3eb6(0x192)]=0x4]=_0x2f3eb6(0x192),_0x3f2f6d[_0x3f2f6d[_0x2f3eb6(0x19b)]=0x5]='Solve',_0x3f2f6d[_0x3f2f6d[_0x2f3eb6(0x13b)]=-0x1]=_0x2f3eb6(0x13b),_0x3f2f6d))(_0x357c5d||{});const _0x2ae6c5=_0x3d3c5d=>_0x5af020['dayjs'](new Date(+_0x3d3c5d))['format'](_0x2f3eb6(0x15b)),_0x15f18c=async(_0x37a68f,_0x567003)=>{const _0x5c13f2=_0x2f3eb6,_0x28b5a6=_0x37a68f[_0x5c13f2(0x180)](_0x5af020[_0x5c13f2(0x15d)]),_0x59617c=_0x37a68f[_0x5c13f2(0x180)](_0x61f4b4[_0x5c13f2(0x155)]);_0x567003[_0x5c13f2(0x1a6)](_0xcc07d1=>{_0x28b5a6['getUser'](_0xcc07d1)&&_0x567003['delete'](_0xcc07d1);}),_0x567003[_0x5c13f2(0x13e)]&&(await _0x59617c['get'](_0x5c13f2(0x193),{'params':{'userIDs':[..._0x567003]}}))[_0x5c13f2(0x174)][_0x5c13f2(0x1a3)][_0x5c13f2(0x1a6)](_0x29b9c1=>{const _0x9b6fb3=_0x5c13f2;_0x29b9c1&&_0x28b5a6[_0x9b6fb3(0x15e)](_0x29b9c1);});};var _0x9fdb87=Object[_0x2f3eb6(0x14b)],_0x4bee03=(_0x28c2c3,_0x2b4af5,_0x399b24,_0x467ace)=>{const _0x12247a=_0x2f3eb6;for(var _0x328404=_0x467ace>0x1?void 0x0:_0x467ace?_0x9fdb87(_0x2b4af5,_0x399b24):_0x2b4af5,_0xec4f86=_0x28c2c3[_0x12247a(0x189)]-0x1,_0x375a75;_0xec4f86>=0x0;_0xec4f86--)(_0x375a75=_0x28c2c3[_0xec4f86])&&(_0x328404=_0x375a75(_0x328404)||_0x328404);return _0x328404;},_0x5c13d6=(_0x2751a5,_0x4a3475)=>(_0xe79715,_0x518397)=>_0x4a3475(_0xe79715,_0x518397,_0x2751a5);let _0x303fa7=class extends _0x5af020[_0x2f3eb6(0x1a2)]{constructor(_0x3bc234,_0x26a5df,_0x339e36,_0x12d5f2){const _0x3f1054=_0x2f3eb6;super(),this['_commentService']=_0x3bc234,this[_0x3f1054(0x17e)]=_0x26a5df,this[_0x3f1054(0x194)]=_0x339e36,this['_injector']=_0x12d5f2,this[_0x3f1054(0x145)](),this['_initUserSync']();}[_0x2f3eb6(0x15a)](){const _0xb15f97=_0x2f3eb6;this[_0xb15f97(0x170)](this[_0xb15f97(0x17e)][_0xb15f97(0x160)][_0xb15f97(0x1a5)](_0x47f407['bufferTime'](0x10))[_0xb15f97(0x13f)](_0x1f6118=>{const _0x18805d=_0xb15f97,_0x49d58e=new Set();_0x1f6118[_0x18805d(0x1a6)](_0x4f9441=>{const _0x5a17e0=_0x18805d;switch(_0x4f9441[_0x5a17e0(0x1a4)]){case'add':{const _0x25c7d1=_0x4f9441[_0x5a17e0(0x188)]['personId'];_0x49d58e[_0x5a17e0(0x14c)](_0x25c7d1);break;}}}),_0x15f18c(this[_0x18805d(0x1a7)],_0x49d58e);}));}[_0x2f3eb6(0x145)](){const _0x5c6c83=_0x2f3eb6;this[_0x5c6c83(0x170)](this[_0x5c6c83(0x1c4)]['commentUpdate$'][_0x5c6c83(0x13f)](async _0x3c28cf=>{const _0x1e5f53=_0x5c6c83;var _0x3e5d47,_0x13c85d,_0xb4a3eb,_0xe6fd97;const _0x35cc20=(_0x3e5d47=this[_0x1e5f53(0x17e)]['getUnit'](_0x3c28cf[_0x1e5f53(0x1b1)])[_0x1e5f53(0x14d)](_0x4ddb5b=>_0x4ddb5b[_0x1e5f53(0x168)]===_0x3c28cf['threadId']))==null?void 0x0:_0x3e5d47[_0x1e5f53(0x18c)];if(!_0x35cc20)return;const {unitId:_0x3215f8,subUnitId:_0x29b39f}=_0x35cc20;switch(_0x3c28cf[_0x1e5f53(0x153)]&&this[_0x1e5f53(0x194)][_0x1e5f53(0x15e)](_0x3c28cf['user']),_0x3c28cf[_0x1e5f53(0x1a4)]){case _0x357c5d['Add']:break;case _0x357c5d['Reply']:{this['_threadCommentModel']['addComment'](_0x3215f8,_0x29b39f,{'unitId':_0x3215f8,'subUnitId':_0x29b39f,'ref':'','id':_0x3c28cf[_0x1e5f53(0x14a)],'dT':_0x2ae6c5(+_0x3c28cf['createTimestamp']),'threadId':_0x3c28cf['threadId'],'personId':(_0xb4a3eb=(_0x13c85d=_0x3c28cf[_0x1e5f53(0x153)])==null?void 0x0:_0x13c85d['userID'])!=null?_0xb4a3eb:_0x3c28cf[_0x1e5f53(0x1c1)],'text':JSON[_0x1e5f53(0x18e)](_0x3c28cf[_0x1e5f53(0x14e)]),'parentId':_0x35cc20['id']});break;}case _0x357c5d[_0x1e5f53(0x192)]:{const _0x26b8ab=this[_0x1e5f53(0x17e)][_0x1e5f53(0x150)](_0x3215f8,_0x29b39f,_0x3c28cf[_0x1e5f53(0x14a)]);_0x26b8ab&&_0x26b8ab[_0x1e5f53(0x1af)]&&this['_threadCommentModel']['deleteComment'](_0x3215f8,_0x29b39f,_0x3c28cf[_0x1e5f53(0x14a)]);break;}case _0x357c5d[_0x1e5f53(0x172)]:{this[_0x1e5f53(0x17e)][_0x1e5f53(0x15c)](_0x3215f8,_0x29b39f,{'commentId':_0x3c28cf[_0x1e5f53(0x14a)],'text':JSON[_0x1e5f53(0x18e)](_0x3c28cf['content'])});break;}case _0x357c5d[_0x1e5f53(0x19b)]:{const _0x3bca79=(_0xe6fd97=this['_threadCommentModel']['getUnit'](_0x3c28cf[_0x1e5f53(0x1b1)])[_0x1e5f53(0x14d)](_0x3c5507=>_0x3c5507['threadId']===_0x3c28cf['threadId']))==null?void 0x0:_0xe6fd97[_0x1e5f53(0x18c)];_0x3bca79&&this[_0x1e5f53(0x17e)][_0x1e5f53(0x1a1)](_0x3215f8,_0x29b39f,_0x3bca79['id'],_0x3c28cf[_0x1e5f53(0x1c0)]===_0x18219b[_0x1e5f53(0x16a)]);break;}}}));}};_0x303fa7=_0x4bee03([_0x5c13d6(0x0,_0x5af020[_0x2f3eb6(0x1b7)](_0x17f06f[_0x2f3eb6(0x1bf)])),_0x5c13d6(0x1,_0x5af020['Inject'](_0x1affee[_0x2f3eb6(0x167)])),_0x5c13d6(0x2,_0x5af020['Inject'](_0x5af020[_0x2f3eb6(0x15d)])),_0x5c13d6(0x3,_0x5af020[_0x2f3eb6(0x1b7)](_0x5af020['Injector']))],_0x303fa7);const _0x4ac308='thread-comment-data-source.config',_0x7f1c54={};var _0x418b8a=Object[_0x2f3eb6(0x14b)],_0x3d504d=(_0x5588b3,_0x378f53,_0x4abcf9,_0x5d609b)=>{const _0xfa7a06=_0x2f3eb6;for(var _0x398e2d=_0x5d609b>0x1?void 0x0:_0x5d609b?_0x418b8a(_0x378f53,_0x4abcf9):_0x378f53,_0x2b2e9e=_0x5588b3[_0xfa7a06(0x189)]-0x1,_0x17837d;_0x2b2e9e>=0x0;_0x2b2e9e--)(_0x17837d=_0x5588b3[_0x2b2e9e])&&(_0x398e2d=_0x17837d(_0x398e2d)||_0x398e2d);return _0x398e2d;},_0x14cfd5=(_0x1fa72c,_0x42d076)=>(_0x55529f,_0x1988b3)=>_0x42d076(_0x55529f,_0x1988b3,_0x1fa72c);function _0x4666b2(_0x2cab68,_0x1a1c67){const _0x2bc2a5=_0x2f3eb6,_0x489f44=_0x2cab68[_0x2bc2a5(0x175)][0x0];return{..._0x1a1c67,'id':_0x489f44[_0x2bc2a5(0x14a)],'resolved':_0x2cab68[_0x2bc2a5(0x1c0)]===0x1,'dT':_0x2ae6c5(_0x489f44[_0x2bc2a5(0x19a)]),'personId':_0x489f44[_0x2bc2a5(0x1c1)],'threadId':_0x489f44['threadId']};}function _0xbd3c07(_0x17d9dc,_0x2fa7eb,_0x28535d){const _0x4f1fae=_0x2f3eb6;var _0x1847e7,_0x16ada5;if(((_0x16ada5=(_0x1847e7=_0x17d9dc==null?void 0x0:_0x17d9dc[_0x4f1fae(0x175)])==null?void 0x0:_0x1847e7[_0x4f1fae(0x189)])!=null?_0x16ada5:0x0)>0x0){const _0x233fd4=(_0x4b58bf,_0x2c5df1)=>({'id':_0x4b58bf[_0x4f1fae(0x14a)],'threadId':_0x4b58bf[_0x4f1fae(0x168)],'dT':_0x2ae6c5(_0x4b58bf[_0x4f1fae(0x19a)]),'personId':_0x4b58bf[_0x4f1fae(0x1c1)],'resolved':_0x17d9dc[_0x4f1fae(0x1c0)]===_0x18219b[_0x4f1fae(0x16a)],'unitId':_0x2fa7eb,'subUnitId':_0x28535d,'text':JSON[_0x4f1fae(0x18e)](_0x4b58bf[_0x4f1fae(0x14e)]),'parentId':_0x2c5df1}),_0x4ab9f6=_0x233fd4(_0x17d9dc[_0x4f1fae(0x175)][0x0]);return{..._0x4ab9f6,'children':_0x17d9dc[_0x4f1fae(0x175)]['slice'](0x1)['map'](_0x2133fb=>_0x233fd4(_0x2133fb,_0x4ab9f6['id']))};}return null;}let _0x733606=class{constructor(_0x428051,_0x3a187a,_0x3ba0fe,_0x569fe6){const _0x3e5d36=_0x2f3eb6;this[_0x3e5d36(0x1b9)]=_0x428051,this[_0x3e5d36(0x194)]=_0x3a187a,this[_0x3e5d36(0x147)]=_0x3ba0fe,this[_0x3e5d36(0x1a7)]=_0x569fe6;}async[_0x2f3eb6(0x148)](_0x393736){const _0x3422b3=_0x2f3eb6;var _0x583522,_0x32b3ae;const {parentId:_0x39eb93,unitId:_0x4ee73d,text:_0x1d508e,threadId:_0x27b866}=_0x393736,_0x11767b=(_0x32b3ae=(_0x583522=_0x1d508e[_0x3422b3(0x146)])==null?void 0x0:_0x583522[_0x3422b3(0x195)](_0x336fae=>_0x336fae[_0x3422b3(0x1b6)]===_0x5af020[_0x3422b3(0x161)]['COMMENT'])[_0x3422b3(0x1ae)](_0x3de5b3=>_0x3de5b3['rangeId']))!=null?_0x32b3ae:[],_0x4c76e3=JSON[_0x3422b3(0x166)](_0x1d508e),_0x5d8ce0=(await this[_0x3422b3(0x147)][_0x3422b3(0x1ac)](_0x4ee73d))[_0x3422b3(0x1c2)]();if(_0x39eb93){const _0x56f8ba={'memberId':_0x5d8ce0,'unitId':_0x4ee73d,'content':_0x4c76e3,'mention':_0x11767b,'threadId':_0x27b866},_0x54e048=(await this[_0x3422b3(0x1b9)]['post'](_0x3422b3(0x18f)+_0x4ee73d+_0x3422b3(0x16e),{'body':_0x56f8ba}))[_0x3422b3(0x174)]['reply'];return{..._0x393736,'id':_0x54e048[_0x3422b3(0x14a)],'dT':_0x5af020[_0x3422b3(0x13a)](+_0x54e048[_0x3422b3(0x19a)])['format'](_0x3422b3(0x15b)),'personId':_0x54e048[_0x3422b3(0x1c1)]};}else{const _0x38b7da={'memberId':_0x5d8ce0,'unitId':_0x4ee73d,'content':_0x4c76e3,'mention':_0x11767b},_0x17ba61=await this[_0x3422b3(0x1b9)][_0x3422b3(0x187)](_0x3422b3(0x18f)+_0x4ee73d+_0x3422b3(0x171),{'body':_0x38b7da});return _0x4666b2(_0x17ba61[_0x3422b3(0x174)][_0x3422b3(0x17f)],_0x393736);}}async[_0x2f3eb6(0x15c)](_0x3259b7){const _0x1443ab=_0x2f3eb6;var _0x480695,_0x414cf5;const {text:_0x460ead,unitId:_0x2db669}=_0x3259b7,_0x36fdc1=(_0x414cf5=(_0x480695=_0x460ead['customRanges'])==null?void 0x0:_0x480695[_0x1443ab(0x195)](_0x2bff2f=>_0x2bff2f[_0x1443ab(0x1b6)]===_0x5af020[_0x1443ab(0x161)][_0x1443ab(0x1a8)])['map'](_0x1e9216=>_0x1e9216[_0x1443ab(0x1a0)]))!=null?_0x414cf5:[],_0x1cbd26=JSON[_0x1443ab(0x166)](_0x460ead),_0x364c34=_0x3259b7[_0x1443ab(0x168)],_0x5c2550=_0x3259b7['id'],_0x2456ce={'memberId':(await this[_0x1443ab(0x147)][_0x1443ab(0x1ac)](_0x2db669))[_0x1443ab(0x1c2)](),'unitId':_0x2db669,'threadId':_0x364c34,'mention':_0x36fdc1,'content':_0x1cbd26,'replyId':_0x5c2550},_0x362404=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2db669+_0x1443ab(0x15f),{'body':_0x2456ce});return!_0x362404['body'][_0x1443ab(0x16f)]||_0x362404[_0x1443ab(0x174)]['error']['code']===0x1;}async[_0x2f3eb6(0x1a1)](_0x50906f){const _0x420b2b=_0x2f3eb6,{unitId:_0x2dbb40}=_0x50906f,_0x51f0fa=_0x50906f[_0x420b2b(0x168)],_0x496287={'memberId':this[_0x420b2b(0x194)][_0x420b2b(0x181)]()['userID'],'unitId':_0x2dbb40,'threadId':_0x51f0fa,'solved':_0x50906f[_0x420b2b(0x1bd)]?_0x18219b[_0x420b2b(0x16a)]:_0x18219b[_0x420b2b(0x16c)]},_0x12cf14=await this[_0x420b2b(0x1b9)][_0x420b2b(0x187)](_0x420b2b(0x18f)+_0x2dbb40+_0x420b2b(0x1ba),{'body':_0x496287});return!_0x12cf14[_0x420b2b(0x174)][_0x420b2b(0x16f)]||_0x12cf14[_0x420b2b(0x174)][_0x420b2b(0x16f)][_0x420b2b(0x1b0)]===0x1;}async[_0x2f3eb6(0x186)](_0x553d61,_0x4700b3,_0x20d3bb,_0x52bd82){const _0x14934a=_0x2f3eb6,_0x205875={'memberId':(await this[_0x14934a(0x147)][_0x14934a(0x1ac)](_0x553d61))[_0x14934a(0x1c2)](),'threadId':_0x20d3bb,'replyId':_0x52bd82,'unitId':_0x553d61},_0x48f0a2=await this[_0x14934a(0x1b9)][_0x14934a(0x187)](_0x14934a(0x18f)+_0x553d61+_0x14934a(0x152),{'body':_0x205875});return!_0x48f0a2[_0x14934a(0x174)]['error']||_0x48f0a2[_0x14934a(0x174)][_0x14934a(0x16f)][_0x14934a(0x1b0)]===0x1;}async[_0x2f3eb6(0x1b5)](_0x621d7c,_0x3bb61c,_0x3dc855){const _0x925dc0=_0x2f3eb6,_0xc9ec5d={'unitId':_0x621d7c,'threadId':_0x3dc855},_0x4cf06c=await this[_0x925dc0(0x1b9)][_0x925dc0(0x187)](_0x925dc0(0x18f)+_0x621d7c+_0x925dc0(0x1c3),{'body':_0xc9ec5d}),_0x4dc681=_0x3dc855[_0x925dc0(0x1ae)](_0x2b0b1e=>_0xbd3c07(_0x4cf06c['body'][_0x925dc0(0x16d)][_0x2b0b1e],_0x621d7c,_0x3bb61c))['filter'](Boolean);return Object['values'](_0x4cf06c[_0x925dc0(0x174)][_0x925dc0(0x1a3)])[_0x925dc0(0x1a6)](_0x14ce9e=>{const _0x2c3a39=_0x925dc0;this[_0x2c3a39(0x194)]['addUser'](_0x14ce9e);}),_0x4dc681;}[_0x2f3eb6(0x18a)](_0x50206d){const _0x434267=_0x2f3eb6;return{'id':_0x50206d['id'],'threadId':_0x50206d[_0x434267(0x168)],'ref':_0x50206d[_0x434267(0x1bc)]};}};_0x733606=_0x3d504d([_0x14cfd5(0x0,_0x5af020[_0x2f3eb6(0x1b7)](_0x61f4b4[_0x2f3eb6(0x155)])),_0x14cfd5(0x1,_0x5af020['Inject'](_0x5af020[_0x2f3eb6(0x15d)])),_0x14cfd5(0x2,_0x5af020[_0x2f3eb6(0x1b7)](_0x17f06f[_0x2f3eb6(0x18b)])),_0x14cfd5(0x3,_0x5af020[_0x2f3eb6(0x1b7)](_0x5af020[_0x2f3eb6(0x190)]))],_0x733606);var _0x497c40=Object[_0x2f3eb6(0x14b)],_0x683968=(_0x2d99c2,_0x36986f,_0xf3d3a5,_0x39d79b)=>{const _0x276060=_0x2f3eb6;for(var _0x5d01c2=_0x39d79b>0x1?void 0x0:_0x39d79b?_0x497c40(_0x36986f,_0xf3d3a5):_0x36986f,_0x1dd166=_0x2d99c2[_0x276060(0x189)]-0x1,_0x2f1b7a;_0x1dd166>=0x0;_0x1dd166--)(_0x2f1b7a=_0x2d99c2[_0x1dd166])&&(_0x5d01c2=_0x2f1b7a(_0x5d01c2)||_0x5d01c2);return _0x5d01c2;},_0x1b7c4b=(_0x3b9906,_0x7be051)=>(_0x40b810,_0x181976)=>_0x7be051(_0x40b810,_0x181976,_0x3b9906);let _0xbab93=class extends _0x5af020[_0x2f3eb6(0x1a2)]{constructor(_0x5879b2,_0x2fc1c4){const _0x136330=_0x2f3eb6;super(),this['_threadCommentDataSourceService']=_0x5879b2,this[_0x136330(0x14f)]=_0x2fc1c4,this['_initDataSource']();}['_initDataSource'](){const _0x82d559=_0x2f3eb6;this['_threadCommentDataSourceService'][_0x82d559(0x162)]=this['_threadCommentDataSource'],this[_0x82d559(0x1b4)][_0x82d559(0x159)]=!0x1;}};_0xbab93=_0x683968([_0x1b7c4b(0x0,_0x1affee[_0x2f3eb6(0x199)]),_0x1b7c4b(0x1,_0x5af020[_0x2f3eb6(0x1b7)](_0x733606))],_0xbab93);var _0x3d53df=Object[_0x2f3eb6(0x197)],_0x51d39b=Object['getOwnPropertyDescriptor'],_0x51ac15=(_0x20daed,_0x548536,_0x277fd4)=>_0x548536 in _0x20daed?_0x3d53df(_0x20daed,_0x548536,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x277fd4}):_0x20daed[_0x548536]=_0x277fd4,_0x2f3f38=(_0x15a4c0,_0x545e0e,_0x5b00f1,_0x265b23)=>{const _0x3a5cdf=_0x2f3eb6;for(var _0x3fdb95=_0x265b23>0x1?void 0x0:_0x265b23?_0x51d39b(_0x545e0e,_0x5b00f1):_0x545e0e,_0x1b835a=_0x15a4c0[_0x3a5cdf(0x189)]-0x1,_0x5b0e58;_0x1b835a>=0x0;_0x1b835a--)(_0x5b0e58=_0x15a4c0[_0x1b835a])&&(_0x3fdb95=_0x5b0e58(_0x3fdb95)||_0x3fdb95);return _0x3fdb95;},_0x21605c=(_0x5107a8,_0xa7e4d5)=>(_0x204fd5,_0x101a83)=>_0xa7e4d5(_0x204fd5,_0x101a83,_0x5107a8),_0x4222c3=(_0x12698f,_0x407daa,_0x1e31b4)=>_0x51ac15(_0x12698f,typeof _0x407daa!='symbol'?_0x407daa+'':_0x407daa,_0x1e31b4);_0x54c443['UniverThreadCommentDataSourcePlugin']=class extends _0x5af020[_0x2f3eb6(0x17d)]{constructor(_0x4ba840=_0x7f1c54,_0x385eed,_0x48e800){const _0x1c93b6=_0x2f3eb6;super(),this[_0x1c93b6(0x164)]=_0x4ba840,this[_0x1c93b6(0x1a7)]=_0x385eed,this[_0x1c93b6(0x163)]=_0x48e800;const {..._0x417ed5}=_0x5af020[_0x1c93b6(0x185)]({},_0x7f1c54,this[_0x1c93b6(0x164)]);this['_configService'][_0x1c93b6(0x177)](_0x4ac308,_0x417ed5);}['onStarting'](){const _0x54fffc=_0x2f3eb6;[[_0x733606],[_0xbab93],[_0x303fa7]][_0x54fffc(0x1a6)](_0x4a81aa=>{const _0x494567=_0x54fffc;this['_injector'][_0x494567(0x14c)](_0x4a81aa);});}['onReady'](){const _0x1964f8=_0x2f3eb6;this[_0x1964f8(0x1a7)][_0x1964f8(0x180)](_0xbab93),this[_0x1964f8(0x1a7)][_0x1964f8(0x180)](_0x303fa7);}},_0x4222c3(_0x54c443['UniverThreadCommentDataSourcePlugin'],_0x2f3eb6(0x158),_0x53620e),_0x4222c3(_0x54c443['UniverThreadCommentDataSourcePlugin'],_0x2f3eb6(0x1a4),_0x5af020[_0x2f3eb6(0x19c)][_0x2f3eb6(0x17a)]),_0x54c443[_0x2f3eb6(0x16b)]=_0x2f3f38([_0x5af020[_0x2f3eb6(0x17c)](_0x11abb0[_0x2f3eb6(0x140)],_0x17f06f[_0x2f3eb6(0x13d)],_0x27b3c8[_0x2f3eb6(0x182)]),_0x21605c(0x1,_0x5af020[_0x2f3eb6(0x1b7)](_0x5af020[_0x2f3eb6(0x190)])),_0x21605c(0x2,_0x5af020[_0x2f3eb6(0x144)])],_0x54c443['UniverThreadCommentDataSourcePlugin']),Object[_0x2f3eb6(0x197)](_0x54c443,Symbol[_0x2f3eb6(0x191)],{'value':_0x2f3eb6(0x19e)});}));function _0x1af2(_0x66b7f5,_0x4fbe28){const _0x3c95af=_0x3c95();return _0x1af2=function(_0x1af2d3,_0x2609f8){_0x1af2d3=_0x1af2d3-0x13a;let _0x9f0ace=_0x3c95af[_0x1af2d3];return _0x9f0ace;},_0x1af2(_0x66b7f5,_0x4fbe28);}function _0x3c95(){const _0xd91313=['stringify','ThreadCommentModel','threadId','amd','Solved','UniverThreadCommentDataSourcePlugin','OpenOrReOpen','comments','/reply','error','disposeWithMe','/add','Edit','Add','body','replies','@univerjs-pro/collaboration-client','setConfig','object','Unknown','UNIVER_UNKNOWN','4570675yVyIoJ','DependentOn','Plugin','_threadCommentModel','comment','get','getCurrentUser','UniverLicensePlugin','Reply','234899lfsyZi','merge','deleteComment','post','payload','length','saveCommentToSnapshot','CollaborationSessionService','root','UniverCore','parse','/universer-api/comment/unit/','Injector','toStringTag','Delete','/universer-api/user/list','_userService','filter','UniverProThreadCommentDatasource','defineProperty','UniverThreadCommentUi','IThreadCommentDataSourceService','createTimestamp','Solve','UniverInstanceType','UniverNetwork','Module','@univerjs/core','rangeId','resolveComment','Disposable','users','type','pipe','forEach','_injector','COMMENT','1476jawRnZ','function','114YJrMfN','requireSession','5290250deGMgS','map','parentId','code','unitId','2918kVZCPU','@univerjs/network','_threadCommentDataSourceService','listComments','rangeType','Inject','146663cWYkzo','_httpService','/solved','UniverThreadComment','ref','resolved','667LhmXkK','CommentService','solved','userId','getMemberID','/list','_commentService','dayjs','UNRECOGNIZED','351141ajqngL','UniverCollaborationClientPlugin','size','subscribe','UniverThreadCommentUIPlugin','20fxTlXD','rxjs','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','_init','customRanges','_sessionService','addComment','3799864rHIYmM','replyId','getOwnPropertyDescriptor','add','find','content','_threadCommentDataSource','getComment','@univerjs/thread-comment','/delete','user','18SkUqcH','HTTPService','@univerjs-pro/license','exports','pluginName','syncUpdateMutationToColla','_initUserSync','YYYY/MM/DD\x20HH:mm','updateComment','UserManagerService','addUser','/edit','commentUpdate$','CustomRangeType','dataSource','_configService','_config','UniverProCollaborationClient'];_0x3c95=function(){return _0xd91313;};return _0x3c95();}
|
|
1
|
+
(function(_0x2b167d,_0x481c5a){const _0x1bbd60=_0x2915,_0x160967=_0x2b167d();while(!![]){try{const _0x3e67c9=parseInt(_0x1bbd60(0x212))/0x1*(-parseInt(_0x1bbd60(0x239))/0x2)+parseInt(_0x1bbd60(0x240))/0x3+-parseInt(_0x1bbd60(0x225))/0x4*(-parseInt(_0x1bbd60(0x243))/0x5)+parseInt(_0x1bbd60(0x21f))/0x6+-parseInt(_0x1bbd60(0x22c))/0x7+-parseInt(_0x1bbd60(0x21c))/0x8*(-parseInt(_0x1bbd60(0x241))/0x9)+parseInt(_0x1bbd60(0x236))/0xa*(parseInt(_0x1bbd60(0x1d4))/0xb);if(_0x3e67c9===_0x481c5a)break;else _0x160967['push'](_0x160967['shift']());}catch(_0x593549){_0x160967['push'](_0x160967['shift']());}}}(_0x9d0a,0x9b124),function(_0x45b113,_0xcfd599){const _0x377792=_0x2915;typeof exports==_0x377792(0x1fb)&&typeof module<'u'?_0xcfd599(exports,require(_0x377792(0x20e)),require(_0x377792(0x1e3)),require(_0x377792(0x226)),require(_0x377792(0x1d9)),require(_0x377792(0x1f8)),require(_0x377792(0x22a)),require(_0x377792(0x22e))):typeof define==_0x377792(0x1ed)&&define[_0x377792(0x24f)]?define([_0x377792(0x215),_0x377792(0x20e),_0x377792(0x1e3),_0x377792(0x226),'@univerjs/thread-comment-ui',_0x377792(0x1f8),_0x377792(0x22a),'@univerjs/network'],_0xcfd599):(_0x45b113=typeof globalThis<'u'?globalThis:_0x45b113||self,_0xcfd599(_0x45b113[_0x377792(0x1e9)]={},_0x45b113[_0x377792(0x249)],_0x45b113[_0x377792(0x1e0)],_0x45b113[_0x377792(0x22d)],_0x45b113[_0x377792(0x227)],_0x45b113[_0x377792(0x216)],_0x45b113[_0x377792(0x22a)],_0x45b113['UniverNetwork']));}(this,function(_0x590601,_0x4df3eb,_0x141ede,_0x2e1277,_0x595765,_0x4811cc,_0x3d3cdf,_0x41ee9a){'use strict';const _0xcc6fee=_0x2915;const _0x28f5e2=_0xcc6fee(0x24e);var _0x106a4a=(_0x147564=>(_0x147564[_0x147564['OpenOrReOpen']=0x0]=_0xcc6fee(0x202),_0x147564[_0x147564[_0xcc6fee(0x230)]=0x1]='Solved',_0x147564[_0x147564['UNRECOGNIZED']=-0x1]=_0xcc6fee(0x1dc),_0x147564))(_0x106a4a||{}),_0xe31b97=(_0x4c35d1=>(_0x4c35d1[_0x4c35d1[_0xcc6fee(0x21e)]=0x0]=_0xcc6fee(0x21e),_0x4c35d1[_0x4c35d1[_0xcc6fee(0x20f)]=0x1]=_0xcc6fee(0x20f),_0x4c35d1[_0x4c35d1[_0xcc6fee(0x219)]=0x2]=_0xcc6fee(0x219),_0x4c35d1[_0x4c35d1[_0xcc6fee(0x23b)]=0x3]=_0xcc6fee(0x23b),_0x4c35d1[_0x4c35d1[_0xcc6fee(0x24c)]=0x4]=_0xcc6fee(0x24c),_0x4c35d1[_0x4c35d1[_0xcc6fee(0x22f)]=0x5]=_0xcc6fee(0x22f),_0x4c35d1[_0x4c35d1['UNRECOGNIZED']=-0x1]=_0xcc6fee(0x1dc),_0x4c35d1))(_0xe31b97||{});const _0x3ed5e6=_0x34e1f8=>_0x2e1277[_0xcc6fee(0x1e8)](new Date(+_0x34e1f8))['format'](_0xcc6fee(0x1dd)),_0x5115d7=async(_0x9929c1,_0x2f2d84)=>{const _0x4bd17d=_0xcc6fee,_0x212783=_0x9929c1['get'](_0x2e1277['UserManagerService']),_0x746284=_0x9929c1['get'](_0x41ee9a['HTTPService']);_0x2f2d84[_0x4bd17d(0x246)](_0x394d3b=>{const _0x4f416c=_0x4bd17d;_0x212783[_0x4f416c(0x1f3)](_0x394d3b)&&_0x2f2d84[_0x4f416c(0x224)](_0x394d3b);}),_0x2f2d84[_0x4bd17d(0x1e2)]&&(await _0x746284[_0x4bd17d(0x206)](_0x4bd17d(0x234),{'params':{'userIDs':[..._0x2f2d84]}}))[_0x4bd17d(0x247)]['users'][_0x4bd17d(0x246)](_0x5038e0=>{_0x5038e0&&_0x212783['addUser'](_0x5038e0);});};var _0x4fd3ff=Object[_0xcc6fee(0x211)],_0xa99ccf=(_0x16f6fa,_0x3f1a4e,_0x31e2d9,_0xef659e)=>{const _0x261074=_0xcc6fee;for(var _0x51801f=_0xef659e>0x1?void 0x0:_0xef659e?_0x4fd3ff(_0x3f1a4e,_0x31e2d9):_0x3f1a4e,_0xa1f1dc=_0x16f6fa[_0x261074(0x1cd)]-0x1,_0x9166d1;_0xa1f1dc>=0x0;_0xa1f1dc--)(_0x9166d1=_0x16f6fa[_0xa1f1dc])&&(_0x51801f=_0x9166d1(_0x51801f)||_0x51801f);return _0x51801f;},_0x45b453=(_0x587afb,_0x4a6343)=>(_0xc93c12,_0x4f4b3f)=>_0x4a6343(_0xc93c12,_0x4f4b3f,_0x587afb);let _0x1978f8=class extends _0x2e1277['Disposable']{constructor(_0x5691fd,_0xc8d4f5,_0x4c8fe4,_0x35d751){const _0x4b55d8=_0xcc6fee;super(),this['_commentService']=_0x5691fd,this[_0x4b55d8(0x228)]=_0xc8d4f5,this[_0x4b55d8(0x20a)]=_0x4c8fe4,this[_0x4b55d8(0x220)]=_0x35d751,this[_0x4b55d8(0x208)](),this[_0x4b55d8(0x253)]();}['_initUserSync'](){const _0x1865b5=_0xcc6fee;this['disposeWithMe'](this['_threadCommentModel'][_0x1865b5(0x207)][_0x1865b5(0x223)](_0x3d3cdf['bufferTime'](0x10))[_0x1865b5(0x217)](_0x2860c9=>{const _0x302b6d=_0x1865b5,_0x57f6a8=new Set();_0x2860c9[_0x302b6d(0x246)](_0x16e530=>{const _0x20830f=_0x302b6d;switch(_0x16e530[_0x20830f(0x1fa)]){case'add':{const _0x81773d=_0x16e530['payload'][_0x20830f(0x23d)];_0x57f6a8['add'](_0x81773d);break;}}}),_0x5115d7(this[_0x302b6d(0x220)],_0x57f6a8);}));}[_0xcc6fee(0x208)](){const _0x4d7d44=_0xcc6fee;this[_0x4d7d44(0x221)](this[_0x4d7d44(0x1ec)][_0x4d7d44(0x207)][_0x4d7d44(0x217)](async _0xaa138f=>{const _0x4a4895=_0x4d7d44;var _0x4d722b,_0x1da883,_0x4b1f02,_0x4e67af;const _0x33ecfc=(_0x4d722b=this[_0x4a4895(0x228)][_0x4a4895(0x21b)](_0xaa138f['unitId'])[_0x4a4895(0x235)](_0x25a8ad=>_0x25a8ad[_0x4a4895(0x1d5)]===_0xaa138f[_0x4a4895(0x1d5)]))==null?void 0x0:_0x4d722b['root'];if(!_0x33ecfc)return;const {unitId:_0x32acd8,subUnitId:_0x5e2c9a}=_0x33ecfc;switch(_0xaa138f['user']&&this['_userService'][_0x4a4895(0x1e6)](_0xaa138f[_0x4a4895(0x1f1)]),_0xaa138f[_0x4a4895(0x1fa)]){case _0xe31b97[_0x4a4895(0x20f)]:break;case _0xe31b97['Reply']:{this[_0x4a4895(0x228)]['addComment'](_0x32acd8,_0x5e2c9a,{'unitId':_0x32acd8,'subUnitId':_0x5e2c9a,'ref':'','id':_0xaa138f[_0x4a4895(0x200)],'dT':_0x3ed5e6(+_0xaa138f[_0x4a4895(0x254)]),'threadId':_0xaa138f[_0x4a4895(0x1d5)],'personId':(_0x4b1f02=(_0x1da883=_0xaa138f[_0x4a4895(0x1f1)])==null?void 0x0:_0x1da883[_0x4a4895(0x1f4)])!=null?_0x4b1f02:_0xaa138f['userId'],'text':JSON[_0x4a4895(0x1f7)](_0xaa138f[_0x4a4895(0x231)]),'parentId':_0x33ecfc['id']});break;}case _0xe31b97[_0x4a4895(0x24c)]:{const _0x5c9c9a=this[_0x4a4895(0x228)][_0x4a4895(0x1d2)](_0x32acd8,_0x5e2c9a,_0xaa138f[_0x4a4895(0x200)]);_0x5c9c9a&&_0x5c9c9a[_0x4a4895(0x24b)]&&this['_threadCommentModel'][_0x4a4895(0x233)](_0x32acd8,_0x5e2c9a,_0xaa138f[_0x4a4895(0x200)]);break;}case _0xe31b97[_0x4a4895(0x23b)]:{this['_threadCommentModel'][_0x4a4895(0x1eb)](_0x32acd8,_0x5e2c9a,{'commentId':_0xaa138f['replyId'],'text':JSON[_0x4a4895(0x1f7)](_0xaa138f[_0x4a4895(0x231)])});break;}case _0xe31b97['Solve']:{const _0x3ad8fd=(_0x4e67af=this[_0x4a4895(0x228)][_0x4a4895(0x21b)](_0xaa138f[_0x4a4895(0x24a)])[_0x4a4895(0x235)](_0x5816e7=>_0x5816e7['threadId']===_0xaa138f[_0x4a4895(0x1d5)]))==null?void 0x0:_0x4e67af['root'];_0x3ad8fd&&this['_threadCommentModel'][_0x4a4895(0x23f)](_0x32acd8,_0x5e2c9a,_0x3ad8fd['id'],_0xaa138f[_0x4a4895(0x1d1)]===_0x106a4a[_0x4a4895(0x230)]);break;}}}));}};_0x1978f8=_0xa99ccf([_0x45b453(0x0,_0x2e1277[_0xcc6fee(0x1ef)](_0x4df3eb[_0xcc6fee(0x201)])),_0x45b453(0x1,_0x2e1277['Inject'](_0x4811cc[_0xcc6fee(0x251)])),_0x45b453(0x2,_0x2e1277[_0xcc6fee(0x1ef)](_0x2e1277[_0xcc6fee(0x252)])),_0x45b453(0x3,_0x2e1277[_0xcc6fee(0x1ef)](_0x2e1277[_0xcc6fee(0x23e)]))],_0x1978f8);const _0x4bbef1=_0xcc6fee(0x1e4),_0x77d6={};var _0x47e33b=Object[_0xcc6fee(0x211)],_0x11445f=(_0x128b92,_0x56e3ea,_0x56c1f4,_0x118ce3)=>{for(var _0x33d6ee=_0x118ce3>0x1?void 0x0:_0x118ce3?_0x47e33b(_0x56e3ea,_0x56c1f4):_0x56e3ea,_0x27814d=_0x128b92['length']-0x1,_0x2bd554;_0x27814d>=0x0;_0x27814d--)(_0x2bd554=_0x128b92[_0x27814d])&&(_0x33d6ee=_0x2bd554(_0x33d6ee)||_0x33d6ee);return _0x33d6ee;},_0x23cf3a=(_0x4e69d4,_0x1b63b1)=>(_0x33a74f,_0x4472a5)=>_0x1b63b1(_0x33a74f,_0x4472a5,_0x4e69d4);function _0x4af970(_0x261366,_0x51987f){const _0x52d038=_0xcc6fee,_0x35c330=_0x261366[_0x52d038(0x213)][0x0];return{..._0x51987f,'id':_0x35c330[_0x52d038(0x200)],'resolved':_0x261366[_0x52d038(0x1d1)]===0x1,'dT':_0x3ed5e6(_0x35c330['createTimestamp']),'personId':_0x35c330[_0x52d038(0x1ce)],'threadId':_0x35c330[_0x52d038(0x1d5)]};}function _0x2e7241(_0xfa1d39,_0x1885f7,_0x4e0e7a){const _0x3f5252=_0xcc6fee;var _0x307820,_0x5b4c20;if(((_0x5b4c20=(_0x307820=_0xfa1d39==null?void 0x0:_0xfa1d39['replies'])==null?void 0x0:_0x307820['length'])!=null?_0x5b4c20:0x0)>0x0){const _0x2008bd=(_0x4eaf63,_0x4c2cdb)=>({'id':_0x4eaf63[_0x3f5252(0x200)],'threadId':_0x4eaf63[_0x3f5252(0x1d5)],'dT':_0x3ed5e6(_0x4eaf63[_0x3f5252(0x254)]),'personId':_0x4eaf63[_0x3f5252(0x1ce)],'resolved':_0xfa1d39['solved']===_0x106a4a[_0x3f5252(0x230)],'unitId':_0x1885f7,'subUnitId':_0x4e0e7a,'text':JSON[_0x3f5252(0x1f7)](_0x4eaf63[_0x3f5252(0x231)]),'parentId':_0x4c2cdb}),_0x29a071=_0x2008bd(_0xfa1d39[_0x3f5252(0x213)][0x0]);return{..._0x29a071,'children':_0xfa1d39['replies'][_0x3f5252(0x1fd)](0x1)[_0x3f5252(0x1d7)](_0x47738b=>_0x2008bd(_0x47738b,_0x29a071['id']))};}return null;}let _0x9c25d8=class{constructor(_0x326271,_0x403ea7,_0x45a310,_0x297e69){const _0x3826d9=_0xcc6fee;this[_0x3826d9(0x248)]=_0x326271,this[_0x3826d9(0x20a)]=_0x403ea7,this[_0x3826d9(0x1f5)]=_0x45a310,this[_0x3826d9(0x220)]=_0x297e69;}async[_0xcc6fee(0x1df)](_0x49417c){const _0x49fe77=_0xcc6fee;var _0x4a6a8a,_0xd9adb4;const {parentId:_0x3113d7,unitId:_0x5712ac,text:_0x18ba40,threadId:_0x695338}=_0x49417c,_0x1e5023=(_0xd9adb4=(_0x4a6a8a=_0x18ba40[_0x49fe77(0x1d8)])==null?void 0x0:_0x4a6a8a[_0x49fe77(0x22b)](_0x574390=>_0x574390[_0x49fe77(0x214)]===_0x2e1277['CustomRangeType'][_0x49fe77(0x244)])[_0x49fe77(0x1d7)](_0x47c2f8=>_0x47c2f8['rangeId']))!=null?_0xd9adb4:[],_0x55d255=JSON['stringify'](_0x18ba40),_0x2d1202=(await this[_0x49fe77(0x1f5)][_0x49fe77(0x245)](_0x5712ac))[_0x49fe77(0x23a)]();if(_0x3113d7){const _0x5f0e93={'memberId':_0x2d1202,'unitId':_0x5712ac,'content':_0x55d255,'mention':_0x1e5023,'threadId':_0x695338},_0x12e270=(await this[_0x49fe77(0x248)][_0x49fe77(0x1e7)]('/universer-api/comment/unit/'+_0x5712ac+'/reply',{'body':_0x5f0e93}))[_0x49fe77(0x247)][_0x49fe77(0x21d)];return{..._0x49417c,'id':_0x12e270[_0x49fe77(0x200)],'dT':_0x2e1277[_0x49fe77(0x1e8)](+_0x12e270[_0x49fe77(0x254)])[_0x49fe77(0x1d6)](_0x49fe77(0x1dd)),'personId':_0x12e270['userId']};}else{const _0x5433bf={'memberId':_0x2d1202,'unitId':_0x5712ac,'content':_0x55d255,'mention':_0x1e5023},_0x187d29=await this[_0x49fe77(0x248)]['post'](_0x49fe77(0x20b)+_0x5712ac+'/add',{'body':_0x5433bf});return _0x4af970(_0x187d29[_0x49fe77(0x247)][_0x49fe77(0x237)],_0x49417c);}}async[_0xcc6fee(0x1eb)](_0x1db66f){const _0x1cf417=_0xcc6fee;var _0x33947b,_0x490c64;const {text:_0x585b19,unitId:_0x1805c0}=_0x1db66f,_0x2477f2=(_0x490c64=(_0x33947b=_0x585b19[_0x1cf417(0x1d8)])==null?void 0x0:_0x33947b['filter'](_0x4a779f=>_0x4a779f[_0x1cf417(0x214)]===_0x2e1277[_0x1cf417(0x218)][_0x1cf417(0x244)])[_0x1cf417(0x1d7)](_0x56d2a8=>_0x56d2a8['rangeId']))!=null?_0x490c64:[],_0x510d1f=JSON['stringify'](_0x585b19),_0x1c21aa=_0x1db66f[_0x1cf417(0x1d5)],_0x5147e6=_0x1db66f['id'],_0x2dd480={'memberId':(await this[_0x1cf417(0x1f5)][_0x1cf417(0x245)](_0x1805c0))[_0x1cf417(0x23a)](),'unitId':_0x1805c0,'threadId':_0x1c21aa,'mention':_0x2477f2,'content':_0x510d1f,'replyId':_0x5147e6},_0x3c1b55=await this['_httpService']['post'](_0x1cf417(0x20b)+_0x1805c0+_0x1cf417(0x20d),{'body':_0x2dd480});return!_0x3c1b55['body'][_0x1cf417(0x1db)]||_0x3c1b55[_0x1cf417(0x247)][_0x1cf417(0x1db)][_0x1cf417(0x1e5)]===0x1;}async[_0xcc6fee(0x23f)](_0xdf5705){const _0x58dfa7=_0xcc6fee,{unitId:_0x772ea6}=_0xdf5705,_0x2c3892=_0xdf5705[_0x58dfa7(0x1d5)],_0x4f92a0={'memberId':this[_0x58dfa7(0x20a)]['getCurrentUser']()[_0x58dfa7(0x1f4)],'unitId':_0x772ea6,'threadId':_0x2c3892,'solved':_0xdf5705['resolved']?_0x106a4a[_0x58dfa7(0x230)]:_0x106a4a['OpenOrReOpen']},_0x2fe356=await this[_0x58dfa7(0x248)][_0x58dfa7(0x1e7)](_0x58dfa7(0x20b)+_0x772ea6+_0x58dfa7(0x24d),{'body':_0x4f92a0});return!_0x2fe356[_0x58dfa7(0x247)][_0x58dfa7(0x1db)]||_0x2fe356['body'][_0x58dfa7(0x1db)][_0x58dfa7(0x1e5)]===0x1;}async[_0xcc6fee(0x233)](_0x3cec0e,_0x48799e,_0x4eecdb,_0x273d5f){const _0x3c5cd0=_0xcc6fee,_0x15de5c={'memberId':(await this[_0x3c5cd0(0x1f5)][_0x3c5cd0(0x245)](_0x3cec0e))[_0x3c5cd0(0x23a)](),'threadId':_0x4eecdb,'replyId':_0x273d5f,'unitId':_0x3cec0e},_0x25a61d=await this[_0x3c5cd0(0x248)][_0x3c5cd0(0x1e7)](_0x3c5cd0(0x20b)+_0x3cec0e+_0x3c5cd0(0x1f9),{'body':_0x15de5c});return!_0x25a61d['body'][_0x3c5cd0(0x1db)]||_0x25a61d[_0x3c5cd0(0x247)][_0x3c5cd0(0x1db)][_0x3c5cd0(0x1e5)]===0x1;}async[_0xcc6fee(0x205)](_0x19c245,_0x474f83,_0x181313){const _0x1f8955=_0xcc6fee,_0x28c31e={'unitId':_0x19c245,'threadId':_0x181313},_0x210c4a=await this[_0x1f8955(0x248)]['post']('/universer-api/comment/unit/'+_0x19c245+_0x1f8955(0x21a),{'body':_0x28c31e}),_0x1bd7cd=_0x181313['map'](_0x217193=>_0x2e7241(_0x210c4a[_0x1f8955(0x247)][_0x1f8955(0x1d3)][_0x217193],_0x19c245,_0x474f83))[_0x1f8955(0x22b)](Boolean);return Object[_0x1f8955(0x1ea)](_0x210c4a[_0x1f8955(0x247)][_0x1f8955(0x222)])[_0x1f8955(0x246)](_0x3c8118=>{const _0x4aa0af=_0x1f8955;this[_0x4aa0af(0x20a)]['addUser'](_0x3c8118);}),_0x1bd7cd;}[_0xcc6fee(0x1de)](_0x1e19f0){const _0x25ae0f=_0xcc6fee;return{'id':_0x1e19f0['id'],'threadId':_0x1e19f0[_0x25ae0f(0x1d5)],'ref':_0x1e19f0['ref']};}};_0x9c25d8=_0x11445f([_0x23cf3a(0x0,_0x2e1277[_0xcc6fee(0x1ef)](_0x41ee9a[_0xcc6fee(0x229)])),_0x23cf3a(0x1,_0x2e1277[_0xcc6fee(0x1ef)](_0x2e1277[_0xcc6fee(0x252)])),_0x23cf3a(0x2,_0x2e1277['Inject'](_0x4df3eb[_0xcc6fee(0x1da)])),_0x23cf3a(0x3,_0x2e1277[_0xcc6fee(0x1ef)](_0x2e1277['Injector']))],_0x9c25d8);var _0x31f1cc=Object[_0xcc6fee(0x211)],_0x1f3694=(_0x1707dc,_0x383653,_0x319d1f,_0x27abfe)=>{const _0x3c8365=_0xcc6fee;for(var _0x27808a=_0x27abfe>0x1?void 0x0:_0x27abfe?_0x31f1cc(_0x383653,_0x319d1f):_0x383653,_0xfba363=_0x1707dc[_0x3c8365(0x1cd)]-0x1,_0x4d30f5;_0xfba363>=0x0;_0xfba363--)(_0x4d30f5=_0x1707dc[_0xfba363])&&(_0x27808a=_0x4d30f5(_0x27808a)||_0x27808a);return _0x27808a;},_0x3a317d=(_0x1dc875,_0x395bb8)=>(_0x30c3d3,_0x3041ea)=>_0x395bb8(_0x30c3d3,_0x3041ea,_0x1dc875);let _0x58bf4e=class extends _0x2e1277['Disposable']{constructor(_0x22b038,_0x3419dd){const _0x41ac34=_0xcc6fee;super(),this['_threadCommentDataSourceService']=_0x22b038,this[_0x41ac34(0x210)]=_0x3419dd,this[_0x41ac34(0x23c)]();}['_initDataSource'](){const _0xee5288=_0xcc6fee;this[_0xee5288(0x238)]['dataSource']=this[_0xee5288(0x210)],this[_0xee5288(0x238)][_0xee5288(0x209)]=!0x1;}};_0x58bf4e=_0x1f3694([_0x3a317d(0x0,_0x4811cc['IThreadCommentDataSourceService']),_0x3a317d(0x1,_0x2e1277[_0xcc6fee(0x1ef)](_0x9c25d8))],_0x58bf4e);var _0x28c344=Object[_0xcc6fee(0x250)],_0x54633f=Object[_0xcc6fee(0x211)],_0x1f0ebc=(_0xbeecf2,_0x101f41,_0x2c6439)=>_0x101f41 in _0xbeecf2?_0x28c344(_0xbeecf2,_0x101f41,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c6439}):_0xbeecf2[_0x101f41]=_0x2c6439,_0x187425=(_0x9b69c,_0x28c19c,_0x2aa686,_0xfe44cc)=>{const _0x466cde=_0xcc6fee;for(var _0x49b13d=_0xfe44cc>0x1?void 0x0:_0xfe44cc?_0x54633f(_0x28c19c,_0x2aa686):_0x28c19c,_0x3d9f93=_0x9b69c[_0x466cde(0x1cd)]-0x1,_0x404e6a;_0x3d9f93>=0x0;_0x3d9f93--)(_0x404e6a=_0x9b69c[_0x3d9f93])&&(_0x49b13d=_0x404e6a(_0x49b13d)||_0x49b13d);return _0x49b13d;},_0xa47f2f=(_0x2567bc,_0x55d4e2)=>(_0x4a9284,_0x49fda1)=>_0x55d4e2(_0x4a9284,_0x49fda1,_0x2567bc),_0x32f6d8=(_0x5ffcca,_0x35964c,_0x23404b)=>_0x1f0ebc(_0x5ffcca,typeof _0x35964c!='symbol'?_0x35964c+'':_0x35964c,_0x23404b);_0x590601[_0xcc6fee(0x1ee)]=class extends _0x2e1277['Plugin']{constructor(_0x5a799d=_0x77d6,_0x39add0,_0x21a3fa){const _0x42c7f5=_0xcc6fee;super(),this[_0x42c7f5(0x1f0)]=_0x5a799d,this['_injector']=_0x39add0,this[_0x42c7f5(0x1d0)]=_0x21a3fa;const {..._0x14e615}=_0x2e1277[_0x42c7f5(0x20c)]({},_0x77d6,this[_0x42c7f5(0x1f0)]);this['_configService'][_0x42c7f5(0x1fe)](_0x4bbef1,_0x14e615);}[_0xcc6fee(0x1f6)](){[[_0x9c25d8],[_0x58bf4e],[_0x1978f8]]['forEach'](_0x5a8ba6=>{const _0xdde6ef=_0x2915;this[_0xdde6ef(0x220)][_0xdde6ef(0x1f2)](_0x5a8ba6);});}['onReady'](){const _0x1e58c5=_0xcc6fee;this[_0x1e58c5(0x220)][_0x1e58c5(0x206)](_0x58bf4e),this[_0x1e58c5(0x220)][_0x1e58c5(0x206)](_0x1978f8);}},_0x32f6d8(_0x590601[_0xcc6fee(0x1ee)],_0xcc6fee(0x242),_0x28f5e2),_0x32f6d8(_0x590601['UniverThreadCommentDataSourcePlugin'],'type',_0x2e1277[_0xcc6fee(0x204)][_0xcc6fee(0x1cf)]),_0x590601[_0xcc6fee(0x1ee)]=_0x187425([_0x2e1277[_0xcc6fee(0x203)](_0x595765['UniverThreadCommentUIPlugin'],_0x4df3eb[_0xcc6fee(0x232)],_0x141ede[_0xcc6fee(0x1e1)]),_0xa47f2f(0x1,_0x2e1277[_0xcc6fee(0x1ef)](_0x2e1277[_0xcc6fee(0x23e)])),_0xa47f2f(0x2,_0x2e1277['IConfigService'])],_0x590601['UniverThreadCommentDataSourcePlugin']),Object[_0xcc6fee(0x250)](_0x590601,Symbol[_0xcc6fee(0x1ff)],{'value':_0xcc6fee(0x1fc)});}));function _0x2915(_0x409180,_0x1dda08){const _0x9d0a17=_0x9d0a();return _0x2915=function(_0x291540,_0x20da92){_0x291540=_0x291540-0x1cd;let _0x116197=_0x9d0a17[_0x291540];return _0x116197;},_0x2915(_0x409180,_0x1dda08);}function _0x9d0a(){const _0x191335=['find','10BkiIfY','comment','_threadCommentDataSourceService','1922914OpCqpX','getMemberID','Edit','_initDataSource','personId','Injector','resolveComment','1299027rSkbJP','279EhVmHS','pluginName','35SzxTxG','COMMENT','requireSession','forEach','body','_httpService','UniverProCollaborationClient','unitId','parentId','Delete','/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','amd','defineProperty','ThreadCommentModel','UserManagerService','_initUserSync','createTimestamp','length','userId','UNIVER_UNKNOWN','_configService','solved','getComment','comments','15065105cBeLHd','threadId','format','map','customRanges','@univerjs/thread-comment-ui','CollaborationSessionService','error','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','saveCommentToSnapshot','addComment','UniverProLicense','UniverLicensePlugin','size','@univerjs-pro/license','thread-comment-data-source.config','code','addUser','post','dayjs','UniverProThreadCommentDatasource','values','updateComment','_commentService','function','UniverThreadCommentDataSourcePlugin','Inject','_config','user','add','getUser','userID','_sessionService','onStarting','parse','@univerjs/thread-comment','/delete','type','object','Module','slice','setConfig','toStringTag','replyId','CommentService','OpenOrReOpen','DependentOn','UniverInstanceType','listComments','get','commentUpdate$','_init','syncUpdateMutationToColla','_userService','/universer-api/comment/unit/','merge','/edit','@univerjs-pro/collaboration-client','Add','_threadCommentDataSource','getOwnPropertyDescriptor','1dNJunf','replies','rangeType','exports','UniverThreadComment','subscribe','CustomRangeType','Reply','/list','getUnit','69192qAJnSR','reply','Unknown','949644wxSKMh','_injector','disposeWithMe','users','pipe','delete','116108TFdZvp','@univerjs/core','UniverThreadCommentUi','_threadCommentModel','HTTPService','rxjs','filter','5848619yenAPn','UniverCore','@univerjs/network','Solve','Solved','content','UniverCollaborationClientPlugin','deleteComment','/universer-api/user/list'];_0x9d0a=function(){return _0x191335;};return _0x9d0a();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.0-nightly.
|
|
3
|
+
"version": "0.8.0-nightly.202505281606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.8.0-nightly.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/core": "0.8.0-nightly.
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs-
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.8.0-nightly.202505281606",
|
|
49
|
+
"@univerjs-pro/license": "0.8.0-nightly.202505281606",
|
|
50
|
+
"@univerjs/core": "0.8.0-nightly.202505281606",
|
|
51
|
+
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
52
|
+
"@univerjs/thread-comment": "0.8.0-nightly.202505281606",
|
|
53
|
+
"@univerjs/network": "0.8.0-nightly.202505281606",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.8.0-nightly.202505281606"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|