@univerjs-pro/thread-comment-datasource 0.8.0-nightly.202505271607 → 0.8.0-nightly.202505291607
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 +9 -9
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 _0x41c014=_0x22d0;(function(_0x1e37d4,_0x26ccfa){const _0x1d0e6a=_0x22d0,_0x4317f3=_0x1e37d4();while(!![]){try{const _0x4f29d7=parseInt(_0x1d0e6a(0x1bb))/0x1+-parseInt(_0x1d0e6a(0x192))/0x2+parseInt(_0x1d0e6a(0x173))/0x3*(parseInt(_0x1d0e6a(0x16b))/0x4)+parseInt(_0x1d0e6a(0x18b))/0x5+parseInt(_0x1d0e6a(0x155))/0x6*(-parseInt(_0x1d0e6a(0x19b))/0x7)+-parseInt(_0x1d0e6a(0x1b0))/0x8+parseInt(_0x1d0e6a(0x1b2))/0x9;if(_0x4f29d7===_0x26ccfa)break;else _0x4317f3['push'](_0x4317f3['shift']());}catch(_0x4f55d4){_0x4317f3['push'](_0x4317f3['shift']());}}}(_0x125a,0xccd48));function _0x22d0(_0x481412,_0x24ba67){const _0x125aa7=_0x125a();return _0x22d0=function(_0x22d0e4,_0x17f954){_0x22d0e4=_0x22d0e4-0x14a;let _0x383db2=_0x125aa7[_0x22d0e4];return _0x383db2;},_0x22d0(_0x481412,_0x24ba67);}Object[_0x41c014(0x1ac)](exports,Symbol[_0x41c014(0x171)],{'value':_0x41c014(0x1c2)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x41c014(0x16d)),c=require(_0x41c014(0x16f)),j=require(_0x41c014(0x150)),M=require(_0x41c014(0x194)),w=require(_0x41c014(0x163)),P=require('@univerjs/network'),U=_0x41c014(0x1a2);function _0x125a(){const _0x200251=['filter','/universer-api/user/list','Disposable','forEach','solved','content','code','UniverLicensePlugin','commentUpdate$','length','get','rxjs','parentId','Injector','rangeType','pluginName','type','updateComment','reply','236FhVwTU','CollaborationSessionService','@univerjs-pro/license','Reply','@univerjs/core','Add','toStringTag','_threadCommentModel','6354YCZkWV','post','parse','error','_init','_sessionService','pipe','ThreadCommentModel','personId','Delete','getUnit','syncUpdateMutationToColla','requireSession','Edit','CustomRangeType','_initDataSource','onReady','UserManagerService','customRanges','getCurrentUser','/reply','/delete','createTimestamp','setConfig','3539455OgCRUt','dataSource','YYYY/MM/DD\x20HH:mm','rangeId','Inject','root','subscribe','1583086eIndCs','_commentService','@univerjs/thread-comment','addUser','comments','replyId','UNRECOGNIZED','Solve','Solved','35VssbSX','_httpService','_initUserSync','/solved','getOwnPropertyDescriptor','merge','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverInstanceType','_threadCommentDataSourceService','users','_userService','disposeWithMe','threadId','symbol','format','HTTPService','defineProperty','payload','dayjs','OpenOrReOpen','9860760NmzBRJ','getMemberID','19298070IPDPZC','userID','UniverThreadCommentDataSourcePlugin','stringify','size','_threadCommentDataSource','onStarting','CommentService','slice','624364cAldct','_injector','userId','getComment','IThreadCommentDataSourceService','COMMENT','map','Module','add','comment','user','resolved','Unknown','_config','/universer-api/comment/unit/','resolveComment','@univerjs/thread-comment-ui','body','values','/add','_configService','885990YImPae','replies','find'];_0x125a=function(){return _0x200251;};return _0x125a();}var I=(_0x199818=>(_0x199818[_0x199818[_0x41c014(0x1af)]=0x0]='OpenOrReOpen',_0x199818[_0x199818[_0x41c014(0x19a)]=0x1]=_0x41c014(0x19a),_0x199818[_0x199818[_0x41c014(0x198)]=-0x1]=_0x41c014(0x198),_0x199818))(I||{}),v=(_0x7c0828=>(_0x7c0828[_0x7c0828[_0x41c014(0x14c)]=0x0]=_0x41c014(0x14c),_0x7c0828[_0x7c0828[_0x41c014(0x170)]=0x1]=_0x41c014(0x170),_0x7c0828[_0x7c0828[_0x41c014(0x16e)]=0x2]='Reply',_0x7c0828[_0x7c0828[_0x41c014(0x180)]=0x3]=_0x41c014(0x180),_0x7c0828[_0x7c0828[_0x41c014(0x17c)]=0x4]='Delete',_0x7c0828[_0x7c0828['Solve']=0x5]='Solve',_0x7c0828[_0x7c0828[_0x41c014(0x198)]=-0x1]=_0x41c014(0x198),_0x7c0828))(v||{});const f=_0x507f62=>c[_0x41c014(0x1ae)](new Date(+_0x507f62))[_0x41c014(0x1aa)](_0x41c014(0x18d)),R=async(_0x51bbae,_0x15bf2b)=>{const _0x21bdb8=_0x41c014,_0x342bf2=_0x51bbae['get'](c[_0x21bdb8(0x184)]),_0x1f76d8=_0x51bbae[_0x21bdb8(0x162)](P[_0x21bdb8(0x1ab)]);_0x15bf2b[_0x21bdb8(0x15b)](_0x22d1c5=>{const _0x1906b7=_0x21bdb8;_0x342bf2[_0x1906b7(0x1a1)](_0x22d1c5)&&_0x15bf2b['delete'](_0x22d1c5);}),_0x15bf2b[_0x21bdb8(0x1b6)]&&(await _0x1f76d8[_0x21bdb8(0x162)](_0x21bdb8(0x159),{'params':{'userIDs':[..._0x15bf2b]}}))[_0x21bdb8(0x151)][_0x21bdb8(0x1a5)]['forEach'](_0xae23fc=>{const _0x42cdf9=_0x21bdb8;_0xae23fc&&_0x342bf2[_0x42cdf9(0x195)](_0xae23fc);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x3ce909,_0x22ba62,_0x51fa83,_0x2cca21)=>{const _0x5c4362=_0x41c014;for(var _0x16a84e=_0x2cca21>0x1?void 0x0:_0x2cca21?$(_0x22ba62,_0x51fa83):_0x22ba62,_0x22c8a3=_0x3ce909[_0x5c4362(0x161)]-0x1,_0x1a2549;_0x22c8a3>=0x0;_0x22c8a3--)(_0x1a2549=_0x3ce909[_0x22c8a3])&&(_0x16a84e=_0x1a2549(_0x16a84e)||_0x16a84e);return _0x16a84e;},S=(_0x3abc32,_0x21cfc9)=>(_0x5a8014,_0x282a24)=>_0x21cfc9(_0x5a8014,_0x282a24,_0x3abc32);let p=class extends c[_0x41c014(0x15a)]{constructor(_0x3216c1,_0x3f929f,_0x3d5ad8,_0x28c2ae){const _0x144949=_0x41c014;super(),this[_0x144949(0x193)]=_0x3216c1,this[_0x144949(0x172)]=_0x3f929f,this[_0x144949(0x1a6)]=_0x3d5ad8,this[_0x144949(0x1bc)]=_0x28c2ae,this['_init'](),this[_0x144949(0x19d)]();}[_0x41c014(0x19d)](){const _0x232e4f=_0x41c014;this[_0x232e4f(0x1a7)](this[_0x232e4f(0x172)]['commentUpdate$'][_0x232e4f(0x179)](w['bufferTime'](0x10))['subscribe'](_0x2a541e=>{const _0x5e3d51=_0x232e4f,_0x1648e6=new Set();_0x2a541e[_0x5e3d51(0x15b)](_0x5c5000=>{const _0x5d95c6=_0x5e3d51;switch(_0x5c5000['type']){case _0x5d95c6(0x1c3):{const _0x578f08=_0x5c5000[_0x5d95c6(0x1ad)][_0x5d95c6(0x17b)];_0x1648e6[_0x5d95c6(0x1c3)](_0x578f08);break;}}}),R(this['_injector'],_0x1648e6);}));}[_0x41c014(0x177)](){const _0x3d5904=_0x41c014;this[_0x3d5904(0x1a7)](this[_0x3d5904(0x193)][_0x3d5904(0x160)][_0x3d5904(0x191)](async _0x529000=>{const _0x1bcaff=_0x3d5904;var _0x23d59d,_0x1ed73d,_0x1ce810,_0x1dc357;const _0x3fa509=(_0x23d59d=this[_0x1bcaff(0x172)][_0x1bcaff(0x17d)](_0x529000['unitId'])['find'](_0x5e8046=>_0x5e8046[_0x1bcaff(0x1a8)]===_0x529000[_0x1bcaff(0x1a8)]))==null?void 0x0:_0x23d59d[_0x1bcaff(0x190)];if(!_0x3fa509)return;const {unitId:_0x543b2f,subUnitId:_0x5713db}=_0x3fa509;switch(_0x529000[_0x1bcaff(0x14a)]&&this[_0x1bcaff(0x1a6)][_0x1bcaff(0x195)](_0x529000[_0x1bcaff(0x14a)]),_0x529000[_0x1bcaff(0x168)]){case v[_0x1bcaff(0x170)]:break;case v['Reply']:{this[_0x1bcaff(0x172)]['addComment'](_0x543b2f,_0x5713db,{'unitId':_0x543b2f,'subUnitId':_0x5713db,'ref':'','id':_0x529000[_0x1bcaff(0x197)],'dT':f(+_0x529000[_0x1bcaff(0x189)]),'threadId':_0x529000[_0x1bcaff(0x1a8)],'personId':(_0x1ce810=(_0x1ed73d=_0x529000[_0x1bcaff(0x14a)])==null?void 0x0:_0x1ed73d['userID'])!=null?_0x1ce810:_0x529000[_0x1bcaff(0x1bd)],'text':JSON['parse'](_0x529000[_0x1bcaff(0x15d)]),'parentId':_0x3fa509['id']});break;}case v['Delete']:{const _0x496354=this[_0x1bcaff(0x172)][_0x1bcaff(0x1be)](_0x543b2f,_0x5713db,_0x529000[_0x1bcaff(0x197)]);_0x496354&&_0x496354[_0x1bcaff(0x164)]&&this[_0x1bcaff(0x172)]['deleteComment'](_0x543b2f,_0x5713db,_0x529000[_0x1bcaff(0x197)]);break;}case v[_0x1bcaff(0x180)]:{this[_0x1bcaff(0x172)][_0x1bcaff(0x169)](_0x543b2f,_0x5713db,{'commentId':_0x529000['replyId'],'text':JSON[_0x1bcaff(0x175)](_0x529000['content'])});break;}case v[_0x1bcaff(0x199)]:{const _0x310b45=(_0x1dc357=this[_0x1bcaff(0x172)][_0x1bcaff(0x17d)](_0x529000['unitId'])[_0x1bcaff(0x157)](_0x48d63b=>_0x48d63b[_0x1bcaff(0x1a8)]===_0x529000[_0x1bcaff(0x1a8)]))==null?void 0x0:_0x1dc357[_0x1bcaff(0x190)];_0x310b45&&this[_0x1bcaff(0x172)][_0x1bcaff(0x14f)](_0x543b2f,_0x5713db,_0x310b45['id'],_0x529000['solved']===I[_0x1bcaff(0x19a)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x41c014(0x1b9)])),S(0x1,c[_0x41c014(0x18f)](M[_0x41c014(0x17a)])),S(0x2,c[_0x41c014(0x18f)](c[_0x41c014(0x184)])),S(0x3,c['Inject'](c[_0x41c014(0x165)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x41c014(0x19f)],x=(_0x498ca5,_0x204027,_0x1239af,_0x3650d8)=>{const _0x5248d8=_0x41c014;for(var _0x3450e1=_0x3650d8>0x1?void 0x0:_0x3650d8?A(_0x204027,_0x1239af):_0x204027,_0x5691d3=_0x498ca5[_0x5248d8(0x161)]-0x1,_0x133df5;_0x5691d3>=0x0;_0x5691d3--)(_0x133df5=_0x498ca5[_0x5691d3])&&(_0x3450e1=_0x133df5(_0x3450e1)||_0x3450e1);return _0x3450e1;},_=(_0x5d2e36,_0x2318ae)=>(_0x40495b,_0x4d378b)=>_0x2318ae(_0x40495b,_0x4d378b,_0x5d2e36);function Y(_0xa084c3,_0x1d4697){const _0x4c0e05=_0x41c014,_0xd82745=_0xa084c3[_0x4c0e05(0x156)][0x0];return{..._0x1d4697,'id':_0xd82745[_0x4c0e05(0x197)],'resolved':_0xa084c3['solved']===0x1,'dT':f(_0xd82745['createTimestamp']),'personId':_0xd82745['userId'],'threadId':_0xd82745['threadId']};}function G(_0x1f2033,_0x25816d,_0x2bb63b){const _0x116f8c=_0x41c014;var _0x3b1e08,_0x3fccb0;if(((_0x3fccb0=(_0x3b1e08=_0x1f2033==null?void 0x0:_0x1f2033['replies'])==null?void 0x0:_0x3b1e08[_0x116f8c(0x161)])!=null?_0x3fccb0:0x0)>0x0){const _0x99ee81=(_0x455770,_0xf02e1e)=>({'id':_0x455770[_0x116f8c(0x197)],'threadId':_0x455770[_0x116f8c(0x1a8)],'dT':f(_0x455770[_0x116f8c(0x189)]),'personId':_0x455770[_0x116f8c(0x1bd)],'resolved':_0x1f2033[_0x116f8c(0x15c)]===I[_0x116f8c(0x19a)],'unitId':_0x25816d,'subUnitId':_0x2bb63b,'text':JSON['parse'](_0x455770['content']),'parentId':_0xf02e1e}),_0x2a00a3=_0x99ee81(_0x1f2033[_0x116f8c(0x156)][0x0]);return{..._0x2a00a3,'children':_0x1f2033['replies'][_0x116f8c(0x1ba)](0x1)[_0x116f8c(0x1c1)](_0x4f0423=>_0x99ee81(_0x4f0423,_0x2a00a3['id']))};}return null;}let g=class{constructor(_0x10abf9,_0x252f9b,_0x169191,_0x56f9d2){const _0x5859e5=_0x41c014;this['_httpService']=_0x10abf9,this[_0x5859e5(0x1a6)]=_0x252f9b,this[_0x5859e5(0x178)]=_0x169191,this[_0x5859e5(0x1bc)]=_0x56f9d2;}async['addComment'](_0x36d9be){const _0x37c665=_0x41c014;var _0xbaf894,_0x19cb44;const {parentId:_0x3295f2,unitId:_0x119fc0,text:_0x2c3149,threadId:_0x2324aa}=_0x36d9be,_0x15accc=(_0x19cb44=(_0xbaf894=_0x2c3149[_0x37c665(0x185)])==null?void 0x0:_0xbaf894[_0x37c665(0x158)](_0xa3886c=>_0xa3886c[_0x37c665(0x166)]===c[_0x37c665(0x181)]['COMMENT'])['map'](_0xab8841=>_0xab8841[_0x37c665(0x18e)]))!=null?_0x19cb44:[],_0x3a5d1b=JSON[_0x37c665(0x1b5)](_0x2c3149),_0x599ef0=(await this[_0x37c665(0x178)][_0x37c665(0x17f)](_0x119fc0))[_0x37c665(0x1b1)]();if(_0x3295f2){const _0x56fe28={'memberId':_0x599ef0,'unitId':_0x119fc0,'content':_0x3a5d1b,'mention':_0x15accc,'threadId':_0x2324aa},_0x1b6e07=(await this['_httpService'][_0x37c665(0x174)](_0x37c665(0x14e)+_0x119fc0+_0x37c665(0x187),{'body':_0x56fe28}))['body'][_0x37c665(0x16a)];return{..._0x36d9be,'id':_0x1b6e07[_0x37c665(0x197)],'dT':c[_0x37c665(0x1ae)](+_0x1b6e07['createTimestamp'])[_0x37c665(0x1aa)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1b6e07['userId']};}else{const _0x36b3a4={'memberId':_0x599ef0,'unitId':_0x119fc0,'content':_0x3a5d1b,'mention':_0x15accc},_0x33dd74=await this[_0x37c665(0x19c)][_0x37c665(0x174)](_0x37c665(0x14e)+_0x119fc0+_0x37c665(0x153),{'body':_0x36b3a4});return Y(_0x33dd74[_0x37c665(0x151)][_0x37c665(0x1c4)],_0x36d9be);}}async[_0x41c014(0x169)](_0x4a8bcf){const _0x3c49b9=_0x41c014;var _0x4e4795,_0x12727b;const {text:_0x1607b4,unitId:_0x4f8449}=_0x4a8bcf,_0x58b6d1=(_0x12727b=(_0x4e4795=_0x1607b4[_0x3c49b9(0x185)])==null?void 0x0:_0x4e4795[_0x3c49b9(0x158)](_0x4a0a23=>_0x4a0a23[_0x3c49b9(0x166)]===c['CustomRangeType'][_0x3c49b9(0x1c0)])[_0x3c49b9(0x1c1)](_0xa331ed=>_0xa331ed[_0x3c49b9(0x18e)]))!=null?_0x12727b:[],_0x5be65c=JSON[_0x3c49b9(0x1b5)](_0x1607b4),_0x1fd60c=_0x4a8bcf[_0x3c49b9(0x1a8)],_0x5211b7=_0x4a8bcf['id'],_0x512e19={'memberId':(await this[_0x3c49b9(0x178)]['requireSession'](_0x4f8449))[_0x3c49b9(0x1b1)](),'unitId':_0x4f8449,'threadId':_0x1fd60c,'mention':_0x58b6d1,'content':_0x5be65c,'replyId':_0x5211b7},_0x4bfc8f=await this[_0x3c49b9(0x19c)][_0x3c49b9(0x174)](_0x3c49b9(0x14e)+_0x4f8449+'/edit',{'body':_0x512e19});return!_0x4bfc8f[_0x3c49b9(0x151)][_0x3c49b9(0x176)]||_0x4bfc8f[_0x3c49b9(0x151)][_0x3c49b9(0x176)]['code']===0x1;}async[_0x41c014(0x14f)](_0x2c619c){const _0x46f3ed=_0x41c014,{unitId:_0x3a36ca}=_0x2c619c,_0x599406=_0x2c619c[_0x46f3ed(0x1a8)],_0x2ec666={'memberId':this[_0x46f3ed(0x1a6)][_0x46f3ed(0x186)]()[_0x46f3ed(0x1b3)],'unitId':_0x3a36ca,'threadId':_0x599406,'solved':_0x2c619c[_0x46f3ed(0x14b)]?I[_0x46f3ed(0x19a)]:I[_0x46f3ed(0x1af)]},_0x1a279f=await this['_httpService'][_0x46f3ed(0x174)](_0x46f3ed(0x14e)+_0x3a36ca+_0x46f3ed(0x19e),{'body':_0x2ec666});return!_0x1a279f[_0x46f3ed(0x151)][_0x46f3ed(0x176)]||_0x1a279f[_0x46f3ed(0x151)]['error'][_0x46f3ed(0x15e)]===0x1;}async['deleteComment'](_0x2eb298,_0x1ee570,_0x3acc18,_0x480f6b){const _0xf6156f=_0x41c014,_0x413bd7={'memberId':(await this[_0xf6156f(0x178)]['requireSession'](_0x2eb298))['getMemberID'](),'threadId':_0x3acc18,'replyId':_0x480f6b,'unitId':_0x2eb298},_0xc04d11=await this[_0xf6156f(0x19c)]['post'](_0xf6156f(0x14e)+_0x2eb298+_0xf6156f(0x188),{'body':_0x413bd7});return!_0xc04d11['body'][_0xf6156f(0x176)]||_0xc04d11[_0xf6156f(0x151)][_0xf6156f(0x176)][_0xf6156f(0x15e)]===0x1;}async['listComments'](_0x3d7782,_0x433308,_0x21a6de){const _0x5cfe3a=_0x41c014,_0x20172b={'unitId':_0x3d7782,'threadId':_0x21a6de},_0x1f89b1=await this[_0x5cfe3a(0x19c)][_0x5cfe3a(0x174)](_0x5cfe3a(0x14e)+_0x3d7782+'/list',{'body':_0x20172b}),_0x160adb=_0x21a6de['map'](_0x17143c=>G(_0x1f89b1[_0x5cfe3a(0x151)][_0x5cfe3a(0x196)][_0x17143c],_0x3d7782,_0x433308))[_0x5cfe3a(0x158)](Boolean);return Object[_0x5cfe3a(0x152)](_0x1f89b1['body']['users'])[_0x5cfe3a(0x15b)](_0x39ee05=>{const _0x1c2d2b=_0x5cfe3a;this[_0x1c2d2b(0x1a6)][_0x1c2d2b(0x195)](_0x39ee05);}),_0x160adb;}['saveCommentToSnapshot'](_0x5783ad){const _0x45ef28=_0x41c014;return{'id':_0x5783ad['id'],'threadId':_0x5783ad[_0x45ef28(0x1a8)],'ref':_0x5783ad['ref']};}};g=x([_(0x0,c[_0x41c014(0x18f)](P[_0x41c014(0x1ab)])),_(0x1,c['Inject'](c[_0x41c014(0x184)])),_(0x2,c[_0x41c014(0x18f)](b[_0x41c014(0x16c)])),_(0x3,c[_0x41c014(0x18f)](c[_0x41c014(0x165)]))],g);var H=Object[_0x41c014(0x19f)],J=(_0x1a03ed,_0x55dcef,_0x1c2107,_0x23db9c)=>{for(var _0x78db90=_0x23db9c>0x1?void 0x0:_0x23db9c?H(_0x55dcef,_0x1c2107):_0x55dcef,_0x5ef9d0=_0x1a03ed['length']-0x1,_0x56402f;_0x5ef9d0>=0x0;_0x5ef9d0--)(_0x56402f=_0x1a03ed[_0x5ef9d0])&&(_0x78db90=_0x56402f(_0x78db90)||_0x78db90);return _0x78db90;},y=(_0x5192f2,_0x1f106a)=>(_0x3d05f4,_0x1435a8)=>_0x1f106a(_0x3d05f4,_0x1435a8,_0x5192f2);let C=class extends c[_0x41c014(0x15a)]{constructor(_0x52a629,_0x59e22a){const _0x544cb2=_0x41c014;super(),this[_0x544cb2(0x1a4)]=_0x52a629,this[_0x544cb2(0x1b7)]=_0x59e22a,this[_0x544cb2(0x182)]();}[_0x41c014(0x182)](){const _0xbe1c3a=_0x41c014;this['_threadCommentDataSourceService'][_0xbe1c3a(0x18c)]=this[_0xbe1c3a(0x1b7)],this[_0xbe1c3a(0x1a4)][_0xbe1c3a(0x17e)]=!0x1;}};C=J([y(0x0,M[_0x41c014(0x1bf)]),y(0x1,c[_0x41c014(0x18f)](g))],C);var F=Object[_0x41c014(0x1ac)],L=Object[_0x41c014(0x19f)],Z=(_0x2c9cde,_0x5e414e,_0x1ce9c9)=>_0x5e414e in _0x2c9cde?F(_0x2c9cde,_0x5e414e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1ce9c9}):_0x2c9cde[_0x5e414e]=_0x1ce9c9,W=(_0xdeb7f6,_0xbeba82,_0x21fad7,_0x93be8a)=>{for(var _0x5c1bea=_0x93be8a>0x1?void 0x0:_0x93be8a?L(_0xbeba82,_0x21fad7):_0xbeba82,_0x322f91=_0xdeb7f6['length']-0x1,_0x235dc2;_0x322f91>=0x0;_0x322f91--)(_0x235dc2=_0xdeb7f6[_0x322f91])&&(_0x5c1bea=_0x235dc2(_0x5c1bea)||_0x5c1bea);return _0x5c1bea;},O=(_0x25785c,_0x3c455f)=>(_0x312a4c,_0x44985c)=>_0x3c455f(_0x312a4c,_0x44985c,_0x25785c),N=(_0x3abfdc,_0x2495d2,_0x2451b4)=>Z(_0x3abfdc,typeof _0x2495d2!=_0x41c014(0x1a9)?_0x2495d2+'':_0x2495d2,_0x2451b4);exports[_0x41c014(0x1b4)]=class extends c['Plugin']{constructor(_0x55a6e7=D,_0x161fb7,_0x19eacb){const _0x575335=_0x41c014;super(),this[_0x575335(0x14d)]=_0x55a6e7,this['_injector']=_0x161fb7,this[_0x575335(0x154)]=_0x19eacb;const {..._0x3104a9}=c[_0x575335(0x1a0)]({},D,this['_config']);this[_0x575335(0x154)][_0x575335(0x18a)](q,_0x3104a9);}[_0x41c014(0x1b8)](){[[g],[C],[p]]['forEach'](_0x4c9ae0=>{this['_injector']['add'](_0x4c9ae0);});}[_0x41c014(0x183)](){const _0x3a2a53=_0x41c014;this[_0x3a2a53(0x1bc)][_0x3a2a53(0x162)](C),this[_0x3a2a53(0x1bc)][_0x3a2a53(0x162)](p);}},N(exports[_0x41c014(0x1b4)],_0x41c014(0x167),U),N(exports[_0x41c014(0x1b4)],'type',c[_0x41c014(0x1a3)]['UNIVER_UNKNOWN']),exports[_0x41c014(0x1b4)]=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x41c014(0x15f)]),O(0x1,c[_0x41c014(0x18f)](c['Injector'])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
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
|
+
function _0x33fa(_0x1c886e,_0x452e28){const _0x49c217=_0x49c2();return _0x33fa=function(_0x33faa4,_0x321e0d){_0x33faa4=_0x33faa4-0x1d1;let _0x16ee20=_0x49c217[_0x33faa4];return _0x16ee20;},_0x33fa(_0x1c886e,_0x452e28);}const _0x30aa2c=_0x33fa;(function(_0xea9769,_0x395bf9){const _0x148eef=_0x33fa,_0x2cbc20=_0xea9769();while(!![]){try{const _0x198c31=-parseInt(_0x148eef(0x1f7))/0x1+-parseInt(_0x148eef(0x237))/0x2+-parseInt(_0x148eef(0x1ef))/0x3+parseInt(_0x148eef(0x203))/0x4+parseInt(_0x148eef(0x1da))/0x5*(parseInt(_0x148eef(0x1e5))/0x6)+-parseInt(_0x148eef(0x211))/0x7*(-parseInt(_0x148eef(0x228))/0x8)+-parseInt(_0x148eef(0x22e))/0x9*(-parseInt(_0x148eef(0x21b))/0xa);if(_0x198c31===_0x395bf9)break;else _0x2cbc20['push'](_0x2cbc20['shift']());}catch(_0x1b9a59){_0x2cbc20['push'](_0x2cbc20['shift']());}}}(_0x49c2,0x1c280));import{CommentService as _0x5b8e09,CollaborationSessionService as _0xd8c8d1,UniverCollaborationClientPlugin as _0x3ba722}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x8b69f9}from'@univerjs-pro/license';import{dayjs as _0x5bd086,UserManagerService as _0x3af105,Inject as _0x1fd388,Injector as _0x5b06f7,Disposable as _0x4634a6,CustomRangeType as _0x5e13de,UniverInstanceType as _0xf35a65,DependentOn as _0x47bcf7,IConfigService as _0x1b3fdc,Plugin as _0x4d1e38,merge as _0x5c5bd8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x558701}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x13192f,IThreadCommentDataSourceService as _0x5b38d7}from'@univerjs/thread-comment';import{bufferTime as _0x21e75e}from'rxjs';import{HTTPService as _0x1bc482}from'@univerjs/network';const W=_0x30aa2c(0x21a);var I=(_0x328aec=>(_0x328aec[_0x328aec['OpenOrReOpen']=0x0]=_0x30aa2c(0x216),_0x328aec[_0x328aec[_0x30aa2c(0x1e9)]=0x1]=_0x30aa2c(0x1e9),_0x328aec[_0x328aec[_0x30aa2c(0x213)]=-0x1]='UNRECOGNIZED',_0x328aec))(I||{}),v=(_0x159cd4=>(_0x159cd4[_0x159cd4['Unknown']=0x0]=_0x30aa2c(0x1d9),_0x159cd4[_0x159cd4['Add']=0x1]='Add',_0x159cd4[_0x159cd4[_0x30aa2c(0x1f6)]=0x2]=_0x30aa2c(0x1f6),_0x159cd4[_0x159cd4['Edit']=0x3]=_0x30aa2c(0x1e3),_0x159cd4[_0x159cd4[_0x30aa2c(0x1e7)]=0x4]=_0x30aa2c(0x1e7),_0x159cd4[_0x159cd4[_0x30aa2c(0x225)]=0x5]=_0x30aa2c(0x225),_0x159cd4[_0x159cd4['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x159cd4))(v||{});const D=_0x18fd5f=>_0x5bd086(new Date(+_0x18fd5f))[_0x30aa2c(0x226)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4b36eb,_0x25b7fa)=>{const _0x266432=_0x30aa2c,_0x3ed367=_0x4b36eb[_0x266432(0x202)](_0x3af105),_0x3cff21=_0x4b36eb['get'](_0x1bc482);_0x25b7fa[_0x266432(0x1f9)](_0x2041c5=>{const _0x3f01bd=_0x266432;_0x3ed367[_0x3f01bd(0x1e6)](_0x2041c5)&&_0x25b7fa[_0x3f01bd(0x1e2)](_0x2041c5);}),_0x25b7fa[_0x266432(0x232)]&&(await _0x3cff21[_0x266432(0x202)](_0x266432(0x222),{'params':{'userIDs':[..._0x25b7fa]}}))['body'][_0x266432(0x1de)]['forEach'](_0x3e0516=>{const _0x3f7c8e=_0x266432;_0x3e0516&&_0x3ed367[_0x3f7c8e(0x1f1)](_0x3e0516);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x229ad4,_0x38ad6c,_0x26058e,_0xd45ed1)=>{const _0xa4202f=_0x30aa2c;for(var _0x15866d=_0xd45ed1>0x1?void 0x0:_0xd45ed1?K(_0x38ad6c,_0x26058e):_0x38ad6c,_0x59acf3=_0x229ad4[_0xa4202f(0x227)]-0x1,_0xd39bc8;_0x59acf3>=0x0;_0x59acf3--)(_0xd39bc8=_0x229ad4[_0x59acf3])&&(_0x15866d=_0xd39bc8(_0x15866d)||_0x15866d);return _0x15866d;},p=(_0x37d7c9,_0x2cf06a)=>(_0x45782b,_0x7eddf1)=>_0x2cf06a(_0x45782b,_0x7eddf1,_0x37d7c9);let S=class extends _0x4634a6{constructor(_0x4f5b40,_0x28294e,_0x283e22,_0x278f8f){const _0x55c073=_0x30aa2c;super(),this[_0x55c073(0x235)]=_0x4f5b40,this[_0x55c073(0x20a)]=_0x28294e,this['_userService']=_0x283e22,this[_0x55c073(0x208)]=_0x278f8f,this[_0x55c073(0x1fb)](),this[_0x55c073(0x1d3)]();}[_0x30aa2c(0x1d3)](){const _0x137ef2=_0x30aa2c;this[_0x137ef2(0x1d7)](this[_0x137ef2(0x20a)]['commentUpdate$'][_0x137ef2(0x200)](_0x21e75e(0x10))[_0x137ef2(0x1e0)](_0x14a702=>{const _0x516aac=_0x137ef2,_0x9b35eb=new Set();_0x14a702['forEach'](_0x74f992=>{const _0xfaa96b=_0x33fa;switch(_0x74f992[_0xfaa96b(0x1fe)]){case _0xfaa96b(0x22d):{const _0x5df6b9=_0x74f992['payload'][_0xfaa96b(0x210)];_0x9b35eb[_0xfaa96b(0x22d)](_0x5df6b9);break;}}}),B(this[_0x516aac(0x208)],_0x9b35eb);}));}['_init'](){const _0x49f994=_0x30aa2c;this[_0x49f994(0x1d7)](this[_0x49f994(0x235)][_0x49f994(0x209)]['subscribe'](async _0x8e2ed2=>{const _0x1e3118=_0x49f994;var _0x4f5545,_0x38d98e,_0x279ae2,_0x204ab7;const _0x1ef2ef=(_0x4f5545=this[_0x1e3118(0x20a)][_0x1e3118(0x20b)](_0x8e2ed2[_0x1e3118(0x207)])['find'](_0x294019=>_0x294019['threadId']===_0x8e2ed2[_0x1e3118(0x1dd)]))==null?void 0x0:_0x4f5545[_0x1e3118(0x214)];if(!_0x1ef2ef)return;const {unitId:_0x2d248f,subUnitId:_0x38ffb8}=_0x1ef2ef;switch(_0x8e2ed2[_0x1e3118(0x20c)]&&this[_0x1e3118(0x236)][_0x1e3118(0x1f1)](_0x8e2ed2['user']),_0x8e2ed2[_0x1e3118(0x1fe)]){case v[_0x1e3118(0x218)]:break;case v[_0x1e3118(0x1f6)]:{this[_0x1e3118(0x20a)][_0x1e3118(0x206)](_0x2d248f,_0x38ffb8,{'unitId':_0x2d248f,'subUnitId':_0x38ffb8,'ref':'','id':_0x8e2ed2[_0x1e3118(0x233)],'dT':D(+_0x8e2ed2[_0x1e3118(0x230)]),'threadId':_0x8e2ed2[_0x1e3118(0x1dd)],'personId':(_0x279ae2=(_0x38d98e=_0x8e2ed2['user'])==null?void 0x0:_0x38d98e[_0x1e3118(0x1e1)])!=null?_0x279ae2:_0x8e2ed2['userId'],'text':JSON['parse'](_0x8e2ed2['content']),'parentId':_0x1ef2ef['id']});break;}case v[_0x1e3118(0x1e7)]:{const _0x4094dc=this['_threadCommentModel'][_0x1e3118(0x1ee)](_0x2d248f,_0x38ffb8,_0x8e2ed2['replyId']);_0x4094dc&&_0x4094dc[_0x1e3118(0x21c)]&&this['_threadCommentModel'][_0x1e3118(0x1f0)](_0x2d248f,_0x38ffb8,_0x8e2ed2[_0x1e3118(0x233)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x2d248f,_0x38ffb8,{'commentId':_0x8e2ed2['replyId'],'text':JSON[_0x1e3118(0x1e8)](_0x8e2ed2[_0x1e3118(0x1fd)])});break;}case v[_0x1e3118(0x225)]:{const _0x3e64cb=(_0x204ab7=this[_0x1e3118(0x20a)][_0x1e3118(0x20b)](_0x8e2ed2[_0x1e3118(0x207)])['find'](_0x4cc301=>_0x4cc301[_0x1e3118(0x1dd)]===_0x8e2ed2[_0x1e3118(0x1dd)]))==null?void 0x0:_0x204ab7[_0x1e3118(0x214)];_0x3e64cb&&this[_0x1e3118(0x20a)][_0x1e3118(0x1d5)](_0x2d248f,_0x38ffb8,_0x3e64cb['id'],_0x8e2ed2[_0x1e3118(0x224)]===I['Solved']);break;}}}));}};function _0x49c2(){const _0x3e4d8c=['setConfig','36MBqhEh','getUser','Delete','parse','Solved','customRanges','requireSession','syncUpdateMutationToColla','dataSource','getComment','508095QTzfWw','deleteComment','addUser','_sessionService','getOwnPropertyDescriptor','pluginName','getMemberID','Reply','7605ZlRMNG','filter','forEach','/add','_init','error','content','type','/reply','pipe','/edit','get','309716lcNqIX','updateComment','comments','addComment','unitId','_injector','commentUpdate$','_threadCommentModel','getUnit','user','post','_threadCommentDataSourceService','COMMENT','personId','63007xniidS','body','UNRECOGNIZED','root','/solved','OpenOrReOpen','userId','Add','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','870OlNaja','parentId','resolved','stringify','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','reply','/universer-api/user/list','/delete','solved','Solve','format','length','184PCXqFt','ref','code','slice','_httpService','add','9Cnehpw','_initDataSource','createTimestamp','getCurrentUser','size','replyId','_config','_commentService','_userService','81214sgLcyk','saveCommentToSnapshot','replies','_initUserSync','_configService','resolveComment','comment','disposeWithMe','onStarting','Unknown','40305Thmsbb','map','rangeId','threadId','users','/list','subscribe','userID','delete','Edit'];_0x49c2=function(){return _0x3e4d8c;};return _0x49c2();}S=V([p(0x0,_0x1fd388(_0x5b8e09)),p(0x1,_0x1fd388(_0x13192f)),p(0x2,_0x1fd388(_0x3af105)),p(0x3,_0x1fd388(_0x5b06f7))],S);const z=_0x30aa2c(0x219),M={};var k=Object[_0x30aa2c(0x1f3)],Q=(_0x3bef0a,_0x5948c2,_0x28126e,_0x20e286)=>{const _0x190324=_0x30aa2c;for(var _0xf30e92=_0x20e286>0x1?void 0x0:_0x20e286?k(_0x5948c2,_0x28126e):_0x5948c2,_0x64c676=_0x3bef0a[_0x190324(0x227)]-0x1,_0x2dc079;_0x64c676>=0x0;_0x64c676--)(_0x2dc079=_0x3bef0a[_0x64c676])&&(_0xf30e92=_0x2dc079(_0xf30e92)||_0xf30e92);return _0xf30e92;},_=(_0x24df89,_0x43b634)=>(_0xf077cc,_0x1f7a25)=>_0x43b634(_0xf077cc,_0x1f7a25,_0x24df89);function X(_0x12d678,_0x1a1cbc){const _0x56a841=_0x30aa2c,_0x23d881=_0x12d678[_0x56a841(0x1d2)][0x0];return{..._0x1a1cbc,'id':_0x23d881[_0x56a841(0x233)],'resolved':_0x12d678[_0x56a841(0x224)]===0x1,'dT':D(_0x23d881[_0x56a841(0x230)]),'personId':_0x23d881[_0x56a841(0x217)],'threadId':_0x23d881[_0x56a841(0x1dd)]};}function ee(_0x574e4a,_0x500a84,_0x31b910){const _0x5357e8=_0x30aa2c;var _0xeb5dc5,_0x4fc02b;if(((_0x4fc02b=(_0xeb5dc5=_0x574e4a==null?void 0x0:_0x574e4a['replies'])==null?void 0x0:_0xeb5dc5[_0x5357e8(0x227)])!=null?_0x4fc02b:0x0)>0x0){const _0x493e94=(_0x2b4474,_0xfc4b76)=>({'id':_0x2b4474[_0x5357e8(0x233)],'threadId':_0x2b4474[_0x5357e8(0x1dd)],'dT':D(_0x2b4474[_0x5357e8(0x230)]),'personId':_0x2b4474['userId'],'resolved':_0x574e4a[_0x5357e8(0x224)]===I[_0x5357e8(0x1e9)],'unitId':_0x500a84,'subUnitId':_0x31b910,'text':JSON['parse'](_0x2b4474['content']),'parentId':_0xfc4b76}),_0x461879=_0x493e94(_0x574e4a[_0x5357e8(0x1d2)][0x0]);return{..._0x461879,'children':_0x574e4a[_0x5357e8(0x1d2)][_0x5357e8(0x22b)](0x1)['map'](_0x238aac=>_0x493e94(_0x238aac,_0x461879['id']))};}return null;}let f=class{constructor(_0x45ab42,_0x35539b,_0x561e2f,_0x21ea1f){const _0x178cac=_0x30aa2c;this[_0x178cac(0x22c)]=_0x45ab42,this[_0x178cac(0x236)]=_0x35539b,this[_0x178cac(0x1f2)]=_0x561e2f,this[_0x178cac(0x208)]=_0x21ea1f;}async[_0x30aa2c(0x206)](_0x5f068c){const _0x5a09d5=_0x30aa2c;var _0x503ef4,_0x21d2f4;const {parentId:_0x5e1f4d,unitId:_0x15f9f1,text:_0x1dcfa5,threadId:_0x3bc39e}=_0x5f068c,_0x2604b3=(_0x21d2f4=(_0x503ef4=_0x1dcfa5[_0x5a09d5(0x1ea)])==null?void 0x0:_0x503ef4['filter'](_0x1ecaf1=>_0x1ecaf1['rangeType']===_0x5e13de[_0x5a09d5(0x20f)])[_0x5a09d5(0x1db)](_0x4958a6=>_0x4958a6['rangeId']))!=null?_0x21d2f4:[],_0x5d17cb=JSON[_0x5a09d5(0x21e)](_0x1dcfa5),_0x284656=(await this[_0x5a09d5(0x1f2)][_0x5a09d5(0x1eb)](_0x15f9f1))[_0x5a09d5(0x1f5)]();if(_0x5e1f4d){const _0x2e7cda={'memberId':_0x284656,'unitId':_0x15f9f1,'content':_0x5d17cb,'mention':_0x2604b3,'threadId':_0x3bc39e},_0x198404=(await this[_0x5a09d5(0x22c)][_0x5a09d5(0x20d)](_0x5a09d5(0x21f)+_0x15f9f1+_0x5a09d5(0x1ff),{'body':_0x2e7cda}))[_0x5a09d5(0x212)][_0x5a09d5(0x221)];return{..._0x5f068c,'id':_0x198404['replyId'],'dT':_0x5bd086(+_0x198404[_0x5a09d5(0x230)])[_0x5a09d5(0x226)](_0x5a09d5(0x220)),'personId':_0x198404['userId']};}else{const _0x551ac2={'memberId':_0x284656,'unitId':_0x15f9f1,'content':_0x5d17cb,'mention':_0x2604b3},_0x1304a4=await this['_httpService'][_0x5a09d5(0x20d)](_0x5a09d5(0x21f)+_0x15f9f1+_0x5a09d5(0x1fa),{'body':_0x551ac2});return X(_0x1304a4[_0x5a09d5(0x212)][_0x5a09d5(0x1d6)],_0x5f068c);}}async[_0x30aa2c(0x204)](_0x470dbc){const _0x151804=_0x30aa2c;var _0x297ec0,_0x5c12bf;const {text:_0xdf3d4e,unitId:_0x403ddd}=_0x470dbc,_0x5dd241=(_0x5c12bf=(_0x297ec0=_0xdf3d4e[_0x151804(0x1ea)])==null?void 0x0:_0x297ec0[_0x151804(0x1f8)](_0x191e9a=>_0x191e9a['rangeType']===_0x5e13de['COMMENT'])[_0x151804(0x1db)](_0x54fdc2=>_0x54fdc2[_0x151804(0x1dc)]))!=null?_0x5c12bf:[],_0x2dd41f=JSON[_0x151804(0x21e)](_0xdf3d4e),_0x3a2fa1=_0x470dbc['threadId'],_0x2eaf43=_0x470dbc['id'],_0xc13804={'memberId':(await this[_0x151804(0x1f2)][_0x151804(0x1eb)](_0x403ddd))[_0x151804(0x1f5)](),'unitId':_0x403ddd,'threadId':_0x3a2fa1,'mention':_0x5dd241,'content':_0x2dd41f,'replyId':_0x2eaf43},_0x490816=await this['_httpService']['post'](_0x151804(0x21f)+_0x403ddd+_0x151804(0x201),{'body':_0xc13804});return!_0x490816[_0x151804(0x212)][_0x151804(0x1fc)]||_0x490816[_0x151804(0x212)][_0x151804(0x1fc)][_0x151804(0x22a)]===0x1;}async[_0x30aa2c(0x1d5)](_0x23ea3b){const _0xf79bf3=_0x30aa2c,{unitId:_0x16fd6d}=_0x23ea3b,_0x4817ab=_0x23ea3b['threadId'],_0xe12318={'memberId':this[_0xf79bf3(0x236)][_0xf79bf3(0x231)]()['userID'],'unitId':_0x16fd6d,'threadId':_0x4817ab,'solved':_0x23ea3b[_0xf79bf3(0x21d)]?I[_0xf79bf3(0x1e9)]:I[_0xf79bf3(0x216)]},_0x36f6f8=await this[_0xf79bf3(0x22c)][_0xf79bf3(0x20d)](_0xf79bf3(0x21f)+_0x16fd6d+_0xf79bf3(0x215),{'body':_0xe12318});return!_0x36f6f8['body'][_0xf79bf3(0x1fc)]||_0x36f6f8[_0xf79bf3(0x212)][_0xf79bf3(0x1fc)][_0xf79bf3(0x22a)]===0x1;}async[_0x30aa2c(0x1f0)](_0x621db4,_0x1ed848,_0x31a6b9,_0x486d75){const _0x225c26=_0x30aa2c,_0xeca5e={'memberId':(await this[_0x225c26(0x1f2)][_0x225c26(0x1eb)](_0x621db4))[_0x225c26(0x1f5)](),'threadId':_0x31a6b9,'replyId':_0x486d75,'unitId':_0x621db4},_0x295acb=await this[_0x225c26(0x22c)][_0x225c26(0x20d)](_0x225c26(0x21f)+_0x621db4+_0x225c26(0x223),{'body':_0xeca5e});return!_0x295acb[_0x225c26(0x212)]['error']||_0x295acb[_0x225c26(0x212)][_0x225c26(0x1fc)][_0x225c26(0x22a)]===0x1;}async['listComments'](_0x47a15a,_0x43e008,_0x43b3e9){const _0x5c1d61=_0x30aa2c,_0x32706d={'unitId':_0x47a15a,'threadId':_0x43b3e9},_0x417385=await this['_httpService'][_0x5c1d61(0x20d)](_0x5c1d61(0x21f)+_0x47a15a+_0x5c1d61(0x1df),{'body':_0x32706d}),_0x2ec702=_0x43b3e9[_0x5c1d61(0x1db)](_0xb61162=>ee(_0x417385[_0x5c1d61(0x212)][_0x5c1d61(0x205)][_0xb61162],_0x47a15a,_0x43e008))['filter'](Boolean);return Object['values'](_0x417385[_0x5c1d61(0x212)][_0x5c1d61(0x1de)])[_0x5c1d61(0x1f9)](_0xf754c6=>{const _0x4d6f6a=_0x5c1d61;this[_0x4d6f6a(0x236)][_0x4d6f6a(0x1f1)](_0xf754c6);}),_0x2ec702;}[_0x30aa2c(0x1d1)](_0x14e26c){const _0x59677e=_0x30aa2c;return{'id':_0x14e26c['id'],'threadId':_0x14e26c[_0x59677e(0x1dd)],'ref':_0x14e26c[_0x59677e(0x229)]};}};f=Q([_(0x0,_0x1fd388(_0x1bc482)),_(0x1,_0x1fd388(_0x3af105)),_(0x2,_0x1fd388(_0xd8c8d1)),_(0x3,_0x1fd388(_0x5b06f7))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x269ac6,_0xbb9e2e,_0x345a1b,_0x389966)=>{for(var _0x2b9a4e=_0x389966>0x1?void 0x0:_0x389966?re(_0xbb9e2e,_0x345a1b):_0xbb9e2e,_0x2962c2=_0x269ac6['length']-0x1,_0x1dc49b;_0x2962c2>=0x0;_0x2962c2--)(_0x1dc49b=_0x269ac6[_0x2962c2])&&(_0x2b9a4e=_0x1dc49b(_0x2b9a4e)||_0x2b9a4e);return _0x2b9a4e;},N=(_0x4a54f0,_0x304681)=>(_0x116c6e,_0x10e270)=>_0x304681(_0x116c6e,_0x10e270,_0x4a54f0);let g=class extends _0x4634a6{constructor(_0x1f5bb9,_0x2fc8e8){const _0x469073=_0x30aa2c;super(),this[_0x469073(0x20e)]=_0x1f5bb9,this['_threadCommentDataSource']=_0x2fc8e8,this[_0x469073(0x22f)]();}[_0x30aa2c(0x22f)](){const _0x94e3c2=_0x30aa2c;this['_threadCommentDataSourceService'][_0x94e3c2(0x1ed)]=this['_threadCommentDataSource'],this[_0x94e3c2(0x20e)][_0x94e3c2(0x1ec)]=!0x1;}};g=te([N(0x0,_0x5b38d7),N(0x1,_0x1fd388(f))],g);var se=Object['defineProperty'],oe=Object[_0x30aa2c(0x1f3)],ne=(_0x8cf9da,_0x42aaac,_0x5c7ad6)=>_0x42aaac in _0x8cf9da?se(_0x8cf9da,_0x42aaac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c7ad6}):_0x8cf9da[_0x42aaac]=_0x5c7ad6,ie=(_0x49fd1d,_0x5e7145,_0x302bb4,_0xca21f2)=>{const _0x33482a=_0x30aa2c;for(var _0x1dc53e=_0xca21f2>0x1?void 0x0:_0xca21f2?oe(_0x5e7145,_0x302bb4):_0x5e7145,_0x24f16f=_0x49fd1d[_0x33482a(0x227)]-0x1,_0x26ab18;_0x24f16f>=0x0;_0x24f16f--)(_0x26ab18=_0x49fd1d[_0x24f16f])&&(_0x1dc53e=_0x26ab18(_0x1dc53e)||_0x1dc53e);return _0x1dc53e;},w=(_0x545fa4,_0x111657)=>(_0x5dbc8f,_0x634620)=>_0x111657(_0x5dbc8f,_0x634620,_0x545fa4),$=(_0x20c701,_0x43285c,_0x2dcfe7)=>ne(_0x20c701,typeof _0x43285c!='symbol'?_0x43285c+'':_0x43285c,_0x2dcfe7);let b=class extends _0x4d1e38{constructor(_0x160139=M,_0x180f6b,_0x44b581){const _0x4ce134=_0x30aa2c;super(),this['_config']=_0x160139,this['_injector']=_0x180f6b,this[_0x4ce134(0x1d4)]=_0x44b581;const {..._0xf7f72a}=_0x5c5bd8({},M,this[_0x4ce134(0x234)]);this[_0x4ce134(0x1d4)][_0x4ce134(0x1e4)](z,_0xf7f72a);}[_0x30aa2c(0x1d8)](){[[f],[g],[S]]['forEach'](_0x1c82fb=>{const _0x2acab6=_0x33fa;this[_0x2acab6(0x208)][_0x2acab6(0x22d)](_0x1c82fb);});}['onReady'](){const _0x39d8dc=_0x30aa2c;this[_0x39d8dc(0x208)][_0x39d8dc(0x202)](g),this[_0x39d8dc(0x208)][_0x39d8dc(0x202)](S);}};$(b,_0x30aa2c(0x1f4),W),$(b,_0x30aa2c(0x1fe),_0xf35a65['UNIVER_UNKNOWN']),b=ie([_0x47bcf7(_0x558701,_0x3ba722,_0x8b69f9),w(0x1,_0x1fd388(_0x5b06f7)),w(0x2,_0x1b3fdc)],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
|
+
function _0x33fa(_0x1c886e,_0x452e28){const _0x49c217=_0x49c2();return _0x33fa=function(_0x33faa4,_0x321e0d){_0x33faa4=_0x33faa4-0x1d1;let _0x16ee20=_0x49c217[_0x33faa4];return _0x16ee20;},_0x33fa(_0x1c886e,_0x452e28);}const _0x30aa2c=_0x33fa;(function(_0xea9769,_0x395bf9){const _0x148eef=_0x33fa,_0x2cbc20=_0xea9769();while(!![]){try{const _0x198c31=-parseInt(_0x148eef(0x1f7))/0x1+-parseInt(_0x148eef(0x237))/0x2+-parseInt(_0x148eef(0x1ef))/0x3+parseInt(_0x148eef(0x203))/0x4+parseInt(_0x148eef(0x1da))/0x5*(parseInt(_0x148eef(0x1e5))/0x6)+-parseInt(_0x148eef(0x211))/0x7*(-parseInt(_0x148eef(0x228))/0x8)+-parseInt(_0x148eef(0x22e))/0x9*(-parseInt(_0x148eef(0x21b))/0xa);if(_0x198c31===_0x395bf9)break;else _0x2cbc20['push'](_0x2cbc20['shift']());}catch(_0x1b9a59){_0x2cbc20['push'](_0x2cbc20['shift']());}}}(_0x49c2,0x1c280));import{CommentService as _0x5b8e09,CollaborationSessionService as _0xd8c8d1,UniverCollaborationClientPlugin as _0x3ba722}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x8b69f9}from'@univerjs-pro/license';import{dayjs as _0x5bd086,UserManagerService as _0x3af105,Inject as _0x1fd388,Injector as _0x5b06f7,Disposable as _0x4634a6,CustomRangeType as _0x5e13de,UniverInstanceType as _0xf35a65,DependentOn as _0x47bcf7,IConfigService as _0x1b3fdc,Plugin as _0x4d1e38,merge as _0x5c5bd8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x558701}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x13192f,IThreadCommentDataSourceService as _0x5b38d7}from'@univerjs/thread-comment';import{bufferTime as _0x21e75e}from'rxjs';import{HTTPService as _0x1bc482}from'@univerjs/network';const W=_0x30aa2c(0x21a);var I=(_0x328aec=>(_0x328aec[_0x328aec['OpenOrReOpen']=0x0]=_0x30aa2c(0x216),_0x328aec[_0x328aec[_0x30aa2c(0x1e9)]=0x1]=_0x30aa2c(0x1e9),_0x328aec[_0x328aec[_0x30aa2c(0x213)]=-0x1]='UNRECOGNIZED',_0x328aec))(I||{}),v=(_0x159cd4=>(_0x159cd4[_0x159cd4['Unknown']=0x0]=_0x30aa2c(0x1d9),_0x159cd4[_0x159cd4['Add']=0x1]='Add',_0x159cd4[_0x159cd4[_0x30aa2c(0x1f6)]=0x2]=_0x30aa2c(0x1f6),_0x159cd4[_0x159cd4['Edit']=0x3]=_0x30aa2c(0x1e3),_0x159cd4[_0x159cd4[_0x30aa2c(0x1e7)]=0x4]=_0x30aa2c(0x1e7),_0x159cd4[_0x159cd4[_0x30aa2c(0x225)]=0x5]=_0x30aa2c(0x225),_0x159cd4[_0x159cd4['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x159cd4))(v||{});const D=_0x18fd5f=>_0x5bd086(new Date(+_0x18fd5f))[_0x30aa2c(0x226)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4b36eb,_0x25b7fa)=>{const _0x266432=_0x30aa2c,_0x3ed367=_0x4b36eb[_0x266432(0x202)](_0x3af105),_0x3cff21=_0x4b36eb['get'](_0x1bc482);_0x25b7fa[_0x266432(0x1f9)](_0x2041c5=>{const _0x3f01bd=_0x266432;_0x3ed367[_0x3f01bd(0x1e6)](_0x2041c5)&&_0x25b7fa[_0x3f01bd(0x1e2)](_0x2041c5);}),_0x25b7fa[_0x266432(0x232)]&&(await _0x3cff21[_0x266432(0x202)](_0x266432(0x222),{'params':{'userIDs':[..._0x25b7fa]}}))['body'][_0x266432(0x1de)]['forEach'](_0x3e0516=>{const _0x3f7c8e=_0x266432;_0x3e0516&&_0x3ed367[_0x3f7c8e(0x1f1)](_0x3e0516);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x229ad4,_0x38ad6c,_0x26058e,_0xd45ed1)=>{const _0xa4202f=_0x30aa2c;for(var _0x15866d=_0xd45ed1>0x1?void 0x0:_0xd45ed1?K(_0x38ad6c,_0x26058e):_0x38ad6c,_0x59acf3=_0x229ad4[_0xa4202f(0x227)]-0x1,_0xd39bc8;_0x59acf3>=0x0;_0x59acf3--)(_0xd39bc8=_0x229ad4[_0x59acf3])&&(_0x15866d=_0xd39bc8(_0x15866d)||_0x15866d);return _0x15866d;},p=(_0x37d7c9,_0x2cf06a)=>(_0x45782b,_0x7eddf1)=>_0x2cf06a(_0x45782b,_0x7eddf1,_0x37d7c9);let S=class extends _0x4634a6{constructor(_0x4f5b40,_0x28294e,_0x283e22,_0x278f8f){const _0x55c073=_0x30aa2c;super(),this[_0x55c073(0x235)]=_0x4f5b40,this[_0x55c073(0x20a)]=_0x28294e,this['_userService']=_0x283e22,this[_0x55c073(0x208)]=_0x278f8f,this[_0x55c073(0x1fb)](),this[_0x55c073(0x1d3)]();}[_0x30aa2c(0x1d3)](){const _0x137ef2=_0x30aa2c;this[_0x137ef2(0x1d7)](this[_0x137ef2(0x20a)]['commentUpdate$'][_0x137ef2(0x200)](_0x21e75e(0x10))[_0x137ef2(0x1e0)](_0x14a702=>{const _0x516aac=_0x137ef2,_0x9b35eb=new Set();_0x14a702['forEach'](_0x74f992=>{const _0xfaa96b=_0x33fa;switch(_0x74f992[_0xfaa96b(0x1fe)]){case _0xfaa96b(0x22d):{const _0x5df6b9=_0x74f992['payload'][_0xfaa96b(0x210)];_0x9b35eb[_0xfaa96b(0x22d)](_0x5df6b9);break;}}}),B(this[_0x516aac(0x208)],_0x9b35eb);}));}['_init'](){const _0x49f994=_0x30aa2c;this[_0x49f994(0x1d7)](this[_0x49f994(0x235)][_0x49f994(0x209)]['subscribe'](async _0x8e2ed2=>{const _0x1e3118=_0x49f994;var _0x4f5545,_0x38d98e,_0x279ae2,_0x204ab7;const _0x1ef2ef=(_0x4f5545=this[_0x1e3118(0x20a)][_0x1e3118(0x20b)](_0x8e2ed2[_0x1e3118(0x207)])['find'](_0x294019=>_0x294019['threadId']===_0x8e2ed2[_0x1e3118(0x1dd)]))==null?void 0x0:_0x4f5545[_0x1e3118(0x214)];if(!_0x1ef2ef)return;const {unitId:_0x2d248f,subUnitId:_0x38ffb8}=_0x1ef2ef;switch(_0x8e2ed2[_0x1e3118(0x20c)]&&this[_0x1e3118(0x236)][_0x1e3118(0x1f1)](_0x8e2ed2['user']),_0x8e2ed2[_0x1e3118(0x1fe)]){case v[_0x1e3118(0x218)]:break;case v[_0x1e3118(0x1f6)]:{this[_0x1e3118(0x20a)][_0x1e3118(0x206)](_0x2d248f,_0x38ffb8,{'unitId':_0x2d248f,'subUnitId':_0x38ffb8,'ref':'','id':_0x8e2ed2[_0x1e3118(0x233)],'dT':D(+_0x8e2ed2[_0x1e3118(0x230)]),'threadId':_0x8e2ed2[_0x1e3118(0x1dd)],'personId':(_0x279ae2=(_0x38d98e=_0x8e2ed2['user'])==null?void 0x0:_0x38d98e[_0x1e3118(0x1e1)])!=null?_0x279ae2:_0x8e2ed2['userId'],'text':JSON['parse'](_0x8e2ed2['content']),'parentId':_0x1ef2ef['id']});break;}case v[_0x1e3118(0x1e7)]:{const _0x4094dc=this['_threadCommentModel'][_0x1e3118(0x1ee)](_0x2d248f,_0x38ffb8,_0x8e2ed2['replyId']);_0x4094dc&&_0x4094dc[_0x1e3118(0x21c)]&&this['_threadCommentModel'][_0x1e3118(0x1f0)](_0x2d248f,_0x38ffb8,_0x8e2ed2[_0x1e3118(0x233)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x2d248f,_0x38ffb8,{'commentId':_0x8e2ed2['replyId'],'text':JSON[_0x1e3118(0x1e8)](_0x8e2ed2[_0x1e3118(0x1fd)])});break;}case v[_0x1e3118(0x225)]:{const _0x3e64cb=(_0x204ab7=this[_0x1e3118(0x20a)][_0x1e3118(0x20b)](_0x8e2ed2[_0x1e3118(0x207)])['find'](_0x4cc301=>_0x4cc301[_0x1e3118(0x1dd)]===_0x8e2ed2[_0x1e3118(0x1dd)]))==null?void 0x0:_0x204ab7[_0x1e3118(0x214)];_0x3e64cb&&this[_0x1e3118(0x20a)][_0x1e3118(0x1d5)](_0x2d248f,_0x38ffb8,_0x3e64cb['id'],_0x8e2ed2[_0x1e3118(0x224)]===I['Solved']);break;}}}));}};function _0x49c2(){const _0x3e4d8c=['setConfig','36MBqhEh','getUser','Delete','parse','Solved','customRanges','requireSession','syncUpdateMutationToColla','dataSource','getComment','508095QTzfWw','deleteComment','addUser','_sessionService','getOwnPropertyDescriptor','pluginName','getMemberID','Reply','7605ZlRMNG','filter','forEach','/add','_init','error','content','type','/reply','pipe','/edit','get','309716lcNqIX','updateComment','comments','addComment','unitId','_injector','commentUpdate$','_threadCommentModel','getUnit','user','post','_threadCommentDataSourceService','COMMENT','personId','63007xniidS','body','UNRECOGNIZED','root','/solved','OpenOrReOpen','userId','Add','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','870OlNaja','parentId','resolved','stringify','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','reply','/universer-api/user/list','/delete','solved','Solve','format','length','184PCXqFt','ref','code','slice','_httpService','add','9Cnehpw','_initDataSource','createTimestamp','getCurrentUser','size','replyId','_config','_commentService','_userService','81214sgLcyk','saveCommentToSnapshot','replies','_initUserSync','_configService','resolveComment','comment','disposeWithMe','onStarting','Unknown','40305Thmsbb','map','rangeId','threadId','users','/list','subscribe','userID','delete','Edit'];_0x49c2=function(){return _0x3e4d8c;};return _0x49c2();}S=V([p(0x0,_0x1fd388(_0x5b8e09)),p(0x1,_0x1fd388(_0x13192f)),p(0x2,_0x1fd388(_0x3af105)),p(0x3,_0x1fd388(_0x5b06f7))],S);const z=_0x30aa2c(0x219),M={};var k=Object[_0x30aa2c(0x1f3)],Q=(_0x3bef0a,_0x5948c2,_0x28126e,_0x20e286)=>{const _0x190324=_0x30aa2c;for(var _0xf30e92=_0x20e286>0x1?void 0x0:_0x20e286?k(_0x5948c2,_0x28126e):_0x5948c2,_0x64c676=_0x3bef0a[_0x190324(0x227)]-0x1,_0x2dc079;_0x64c676>=0x0;_0x64c676--)(_0x2dc079=_0x3bef0a[_0x64c676])&&(_0xf30e92=_0x2dc079(_0xf30e92)||_0xf30e92);return _0xf30e92;},_=(_0x24df89,_0x43b634)=>(_0xf077cc,_0x1f7a25)=>_0x43b634(_0xf077cc,_0x1f7a25,_0x24df89);function X(_0x12d678,_0x1a1cbc){const _0x56a841=_0x30aa2c,_0x23d881=_0x12d678[_0x56a841(0x1d2)][0x0];return{..._0x1a1cbc,'id':_0x23d881[_0x56a841(0x233)],'resolved':_0x12d678[_0x56a841(0x224)]===0x1,'dT':D(_0x23d881[_0x56a841(0x230)]),'personId':_0x23d881[_0x56a841(0x217)],'threadId':_0x23d881[_0x56a841(0x1dd)]};}function ee(_0x574e4a,_0x500a84,_0x31b910){const _0x5357e8=_0x30aa2c;var _0xeb5dc5,_0x4fc02b;if(((_0x4fc02b=(_0xeb5dc5=_0x574e4a==null?void 0x0:_0x574e4a['replies'])==null?void 0x0:_0xeb5dc5[_0x5357e8(0x227)])!=null?_0x4fc02b:0x0)>0x0){const _0x493e94=(_0x2b4474,_0xfc4b76)=>({'id':_0x2b4474[_0x5357e8(0x233)],'threadId':_0x2b4474[_0x5357e8(0x1dd)],'dT':D(_0x2b4474[_0x5357e8(0x230)]),'personId':_0x2b4474['userId'],'resolved':_0x574e4a[_0x5357e8(0x224)]===I[_0x5357e8(0x1e9)],'unitId':_0x500a84,'subUnitId':_0x31b910,'text':JSON['parse'](_0x2b4474['content']),'parentId':_0xfc4b76}),_0x461879=_0x493e94(_0x574e4a[_0x5357e8(0x1d2)][0x0]);return{..._0x461879,'children':_0x574e4a[_0x5357e8(0x1d2)][_0x5357e8(0x22b)](0x1)['map'](_0x238aac=>_0x493e94(_0x238aac,_0x461879['id']))};}return null;}let f=class{constructor(_0x45ab42,_0x35539b,_0x561e2f,_0x21ea1f){const _0x178cac=_0x30aa2c;this[_0x178cac(0x22c)]=_0x45ab42,this[_0x178cac(0x236)]=_0x35539b,this[_0x178cac(0x1f2)]=_0x561e2f,this[_0x178cac(0x208)]=_0x21ea1f;}async[_0x30aa2c(0x206)](_0x5f068c){const _0x5a09d5=_0x30aa2c;var _0x503ef4,_0x21d2f4;const {parentId:_0x5e1f4d,unitId:_0x15f9f1,text:_0x1dcfa5,threadId:_0x3bc39e}=_0x5f068c,_0x2604b3=(_0x21d2f4=(_0x503ef4=_0x1dcfa5[_0x5a09d5(0x1ea)])==null?void 0x0:_0x503ef4['filter'](_0x1ecaf1=>_0x1ecaf1['rangeType']===_0x5e13de[_0x5a09d5(0x20f)])[_0x5a09d5(0x1db)](_0x4958a6=>_0x4958a6['rangeId']))!=null?_0x21d2f4:[],_0x5d17cb=JSON[_0x5a09d5(0x21e)](_0x1dcfa5),_0x284656=(await this[_0x5a09d5(0x1f2)][_0x5a09d5(0x1eb)](_0x15f9f1))[_0x5a09d5(0x1f5)]();if(_0x5e1f4d){const _0x2e7cda={'memberId':_0x284656,'unitId':_0x15f9f1,'content':_0x5d17cb,'mention':_0x2604b3,'threadId':_0x3bc39e},_0x198404=(await this[_0x5a09d5(0x22c)][_0x5a09d5(0x20d)](_0x5a09d5(0x21f)+_0x15f9f1+_0x5a09d5(0x1ff),{'body':_0x2e7cda}))[_0x5a09d5(0x212)][_0x5a09d5(0x221)];return{..._0x5f068c,'id':_0x198404['replyId'],'dT':_0x5bd086(+_0x198404[_0x5a09d5(0x230)])[_0x5a09d5(0x226)](_0x5a09d5(0x220)),'personId':_0x198404['userId']};}else{const _0x551ac2={'memberId':_0x284656,'unitId':_0x15f9f1,'content':_0x5d17cb,'mention':_0x2604b3},_0x1304a4=await this['_httpService'][_0x5a09d5(0x20d)](_0x5a09d5(0x21f)+_0x15f9f1+_0x5a09d5(0x1fa),{'body':_0x551ac2});return X(_0x1304a4[_0x5a09d5(0x212)][_0x5a09d5(0x1d6)],_0x5f068c);}}async[_0x30aa2c(0x204)](_0x470dbc){const _0x151804=_0x30aa2c;var _0x297ec0,_0x5c12bf;const {text:_0xdf3d4e,unitId:_0x403ddd}=_0x470dbc,_0x5dd241=(_0x5c12bf=(_0x297ec0=_0xdf3d4e[_0x151804(0x1ea)])==null?void 0x0:_0x297ec0[_0x151804(0x1f8)](_0x191e9a=>_0x191e9a['rangeType']===_0x5e13de['COMMENT'])[_0x151804(0x1db)](_0x54fdc2=>_0x54fdc2[_0x151804(0x1dc)]))!=null?_0x5c12bf:[],_0x2dd41f=JSON[_0x151804(0x21e)](_0xdf3d4e),_0x3a2fa1=_0x470dbc['threadId'],_0x2eaf43=_0x470dbc['id'],_0xc13804={'memberId':(await this[_0x151804(0x1f2)][_0x151804(0x1eb)](_0x403ddd))[_0x151804(0x1f5)](),'unitId':_0x403ddd,'threadId':_0x3a2fa1,'mention':_0x5dd241,'content':_0x2dd41f,'replyId':_0x2eaf43},_0x490816=await this['_httpService']['post'](_0x151804(0x21f)+_0x403ddd+_0x151804(0x201),{'body':_0xc13804});return!_0x490816[_0x151804(0x212)][_0x151804(0x1fc)]||_0x490816[_0x151804(0x212)][_0x151804(0x1fc)][_0x151804(0x22a)]===0x1;}async[_0x30aa2c(0x1d5)](_0x23ea3b){const _0xf79bf3=_0x30aa2c,{unitId:_0x16fd6d}=_0x23ea3b,_0x4817ab=_0x23ea3b['threadId'],_0xe12318={'memberId':this[_0xf79bf3(0x236)][_0xf79bf3(0x231)]()['userID'],'unitId':_0x16fd6d,'threadId':_0x4817ab,'solved':_0x23ea3b[_0xf79bf3(0x21d)]?I[_0xf79bf3(0x1e9)]:I[_0xf79bf3(0x216)]},_0x36f6f8=await this[_0xf79bf3(0x22c)][_0xf79bf3(0x20d)](_0xf79bf3(0x21f)+_0x16fd6d+_0xf79bf3(0x215),{'body':_0xe12318});return!_0x36f6f8['body'][_0xf79bf3(0x1fc)]||_0x36f6f8[_0xf79bf3(0x212)][_0xf79bf3(0x1fc)][_0xf79bf3(0x22a)]===0x1;}async[_0x30aa2c(0x1f0)](_0x621db4,_0x1ed848,_0x31a6b9,_0x486d75){const _0x225c26=_0x30aa2c,_0xeca5e={'memberId':(await this[_0x225c26(0x1f2)][_0x225c26(0x1eb)](_0x621db4))[_0x225c26(0x1f5)](),'threadId':_0x31a6b9,'replyId':_0x486d75,'unitId':_0x621db4},_0x295acb=await this[_0x225c26(0x22c)][_0x225c26(0x20d)](_0x225c26(0x21f)+_0x621db4+_0x225c26(0x223),{'body':_0xeca5e});return!_0x295acb[_0x225c26(0x212)]['error']||_0x295acb[_0x225c26(0x212)][_0x225c26(0x1fc)][_0x225c26(0x22a)]===0x1;}async['listComments'](_0x47a15a,_0x43e008,_0x43b3e9){const _0x5c1d61=_0x30aa2c,_0x32706d={'unitId':_0x47a15a,'threadId':_0x43b3e9},_0x417385=await this['_httpService'][_0x5c1d61(0x20d)](_0x5c1d61(0x21f)+_0x47a15a+_0x5c1d61(0x1df),{'body':_0x32706d}),_0x2ec702=_0x43b3e9[_0x5c1d61(0x1db)](_0xb61162=>ee(_0x417385[_0x5c1d61(0x212)][_0x5c1d61(0x205)][_0xb61162],_0x47a15a,_0x43e008))['filter'](Boolean);return Object['values'](_0x417385[_0x5c1d61(0x212)][_0x5c1d61(0x1de)])[_0x5c1d61(0x1f9)](_0xf754c6=>{const _0x4d6f6a=_0x5c1d61;this[_0x4d6f6a(0x236)][_0x4d6f6a(0x1f1)](_0xf754c6);}),_0x2ec702;}[_0x30aa2c(0x1d1)](_0x14e26c){const _0x59677e=_0x30aa2c;return{'id':_0x14e26c['id'],'threadId':_0x14e26c[_0x59677e(0x1dd)],'ref':_0x14e26c[_0x59677e(0x229)]};}};f=Q([_(0x0,_0x1fd388(_0x1bc482)),_(0x1,_0x1fd388(_0x3af105)),_(0x2,_0x1fd388(_0xd8c8d1)),_(0x3,_0x1fd388(_0x5b06f7))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x269ac6,_0xbb9e2e,_0x345a1b,_0x389966)=>{for(var _0x2b9a4e=_0x389966>0x1?void 0x0:_0x389966?re(_0xbb9e2e,_0x345a1b):_0xbb9e2e,_0x2962c2=_0x269ac6['length']-0x1,_0x1dc49b;_0x2962c2>=0x0;_0x2962c2--)(_0x1dc49b=_0x269ac6[_0x2962c2])&&(_0x2b9a4e=_0x1dc49b(_0x2b9a4e)||_0x2b9a4e);return _0x2b9a4e;},N=(_0x4a54f0,_0x304681)=>(_0x116c6e,_0x10e270)=>_0x304681(_0x116c6e,_0x10e270,_0x4a54f0);let g=class extends _0x4634a6{constructor(_0x1f5bb9,_0x2fc8e8){const _0x469073=_0x30aa2c;super(),this[_0x469073(0x20e)]=_0x1f5bb9,this['_threadCommentDataSource']=_0x2fc8e8,this[_0x469073(0x22f)]();}[_0x30aa2c(0x22f)](){const _0x94e3c2=_0x30aa2c;this['_threadCommentDataSourceService'][_0x94e3c2(0x1ed)]=this['_threadCommentDataSource'],this[_0x94e3c2(0x20e)][_0x94e3c2(0x1ec)]=!0x1;}};g=te([N(0x0,_0x5b38d7),N(0x1,_0x1fd388(f))],g);var se=Object['defineProperty'],oe=Object[_0x30aa2c(0x1f3)],ne=(_0x8cf9da,_0x42aaac,_0x5c7ad6)=>_0x42aaac in _0x8cf9da?se(_0x8cf9da,_0x42aaac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c7ad6}):_0x8cf9da[_0x42aaac]=_0x5c7ad6,ie=(_0x49fd1d,_0x5e7145,_0x302bb4,_0xca21f2)=>{const _0x33482a=_0x30aa2c;for(var _0x1dc53e=_0xca21f2>0x1?void 0x0:_0xca21f2?oe(_0x5e7145,_0x302bb4):_0x5e7145,_0x24f16f=_0x49fd1d[_0x33482a(0x227)]-0x1,_0x26ab18;_0x24f16f>=0x0;_0x24f16f--)(_0x26ab18=_0x49fd1d[_0x24f16f])&&(_0x1dc53e=_0x26ab18(_0x1dc53e)||_0x1dc53e);return _0x1dc53e;},w=(_0x545fa4,_0x111657)=>(_0x5dbc8f,_0x634620)=>_0x111657(_0x5dbc8f,_0x634620,_0x545fa4),$=(_0x20c701,_0x43285c,_0x2dcfe7)=>ne(_0x20c701,typeof _0x43285c!='symbol'?_0x43285c+'':_0x43285c,_0x2dcfe7);let b=class extends _0x4d1e38{constructor(_0x160139=M,_0x180f6b,_0x44b581){const _0x4ce134=_0x30aa2c;super(),this['_config']=_0x160139,this['_injector']=_0x180f6b,this[_0x4ce134(0x1d4)]=_0x44b581;const {..._0xf7f72a}=_0x5c5bd8({},M,this[_0x4ce134(0x234)]);this[_0x4ce134(0x1d4)][_0x4ce134(0x1e4)](z,_0xf7f72a);}[_0x30aa2c(0x1d8)](){[[f],[g],[S]]['forEach'](_0x1c82fb=>{const _0x2acab6=_0x33fa;this[_0x2acab6(0x208)][_0x2acab6(0x22d)](_0x1c82fb);});}['onReady'](){const _0x39d8dc=_0x30aa2c;this[_0x39d8dc(0x208)][_0x39d8dc(0x202)](g),this[_0x39d8dc(0x208)][_0x39d8dc(0x202)](S);}};$(b,_0x30aa2c(0x1f4),W),$(b,_0x30aa2c(0x1fe),_0xf35a65['UNIVER_UNKNOWN']),b=ie([_0x47bcf7(_0x558701,_0x3ba722,_0x8b69f9),w(0x1,_0x1fd388(_0x5b06f7)),w(0x2,_0x1b3fdc)],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(_0x10d92e,_0x5f3bc7){const _0x1ace98=_0x3fef,_0x44df9=_0x10d92e();while(!![]){try{const _0x1e0951=-parseInt(_0x1ace98(0x196))/0x1*(-parseInt(_0x1ace98(0x1f1))/0x2)+parseInt(_0x1ace98(0x217))/0x3*(-parseInt(_0x1ace98(0x1c1))/0x4)+-parseInt(_0x1ace98(0x206))/0x5*(parseInt(_0x1ace98(0x20c))/0x6)+parseInt(_0x1ace98(0x1de))/0x7*(parseInt(_0x1ace98(0x1a4))/0x8)+parseInt(_0x1ace98(0x200))/0x9+-parseInt(_0x1ace98(0x204))/0xa*(-parseInt(_0x1ace98(0x1fb))/0xb)+parseInt(_0x1ace98(0x1d6))/0xc*(-parseInt(_0x1ace98(0x1ef))/0xd);if(_0x1e0951===_0x5f3bc7)break;else _0x44df9['push'](_0x44df9['shift']());}catch(_0x569fd1){_0x44df9['push'](_0x44df9['shift']());}}}(_0x1270,0x30496),function(_0x19d879,_0x31c09a){const _0xec39=_0x3fef;typeof exports==_0xec39(0x1c9)&&typeof module<'u'?_0x31c09a(exports,require(_0xec39(0x1b1)),require('@univerjs-pro/license'),require(_0xec39(0x1c8)),require('@univerjs/thread-comment-ui'),require(_0xec39(0x1f8)),require(_0xec39(0x1c5)),require('@univerjs/network')):typeof define=='function'&&define[_0xec39(0x1bb)]?define([_0xec39(0x1d9),_0xec39(0x1b1),_0xec39(0x1f6),'@univerjs/core',_0xec39(0x1e9),_0xec39(0x1f8),_0xec39(0x1c5),_0xec39(0x202)],_0x31c09a):(_0x19d879=typeof globalThis<'u'?globalThis:_0x19d879||self,_0x31c09a(_0x19d879[_0xec39(0x1f9)]={},_0x19d879['UniverProCollaborationClient'],_0x19d879[_0xec39(0x1a0)],_0x19d879[_0xec39(0x1df)],_0x19d879['UniverThreadCommentUi'],_0x19d879[_0xec39(0x1d2)],_0x19d879[_0xec39(0x1c5)],_0x19d879['UniverNetwork']));}(this,function(_0x421825,_0x1cb471,_0x179a7a,_0x514323,_0xe499e8,_0x18ced5,_0x1985e1,_0x2aae81){'use strict';const _0x28189d=_0x3fef;const _0x2d2057=_0x28189d(0x1af);var _0x479a51=(_0x1d3324=>(_0x1d3324[_0x1d3324['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x1d3324[_0x1d3324['Solved']=0x1]=_0x28189d(0x208),_0x1d3324[_0x1d3324[_0x28189d(0x19d)]=-0x1]=_0x28189d(0x19d),_0x1d3324))(_0x479a51||{}),_0x4a837d=(_0x18fe0d=>(_0x18fe0d[_0x18fe0d[_0x28189d(0x213)]=0x0]=_0x28189d(0x213),_0x18fe0d[_0x18fe0d[_0x28189d(0x1e7)]=0x1]=_0x28189d(0x1e7),_0x18fe0d[_0x18fe0d[_0x28189d(0x1cf)]=0x2]=_0x28189d(0x1cf),_0x18fe0d[_0x18fe0d[_0x28189d(0x1b0)]=0x3]=_0x28189d(0x1b0),_0x18fe0d[_0x18fe0d['Delete']=0x4]='Delete',_0x18fe0d[_0x18fe0d[_0x28189d(0x1ee)]=0x5]=_0x28189d(0x1ee),_0x18fe0d[_0x18fe0d[_0x28189d(0x19d)]=-0x1]=_0x28189d(0x19d),_0x18fe0d))(_0x4a837d||{});const _0x5d85fb=_0x3db80b=>_0x514323[_0x28189d(0x1e0)](new Date(+_0x3db80b))[_0x28189d(0x1b2)](_0x28189d(0x1ce)),_0x28b767=async(_0x250fcd,_0x3ea770)=>{const _0x519e5e=_0x28189d,_0x4b1c97=_0x250fcd[_0x519e5e(0x209)](_0x514323[_0x519e5e(0x1ea)]),_0x38cbb3=_0x250fcd[_0x519e5e(0x209)](_0x2aae81['HTTPService']);_0x3ea770[_0x519e5e(0x1a8)](_0x45cec3=>{const _0x1a04f0=_0x519e5e;_0x4b1c97[_0x1a04f0(0x1c6)](_0x45cec3)&&_0x3ea770['delete'](_0x45cec3);}),_0x3ea770['size']&&(await _0x38cbb3[_0x519e5e(0x209)](_0x519e5e(0x1d5),{'params':{'userIDs':[..._0x3ea770]}}))[_0x519e5e(0x207)][_0x519e5e(0x1d8)][_0x519e5e(0x1a8)](_0x412172=>{const _0xac1cf2=_0x519e5e;_0x412172&&_0x4b1c97[_0xac1cf2(0x1e3)](_0x412172);});};var _0x1132cd=Object[_0x28189d(0x1b5)],_0x5d5744=(_0x5574f5,_0x202810,_0x543f40,_0x1b0a92)=>{const _0x478757=_0x28189d;for(var _0x175378=_0x1b0a92>0x1?void 0x0:_0x1b0a92?_0x1132cd(_0x202810,_0x543f40):_0x202810,_0x102f61=_0x5574f5[_0x478757(0x1dd)]-0x1,_0xd10611;_0x102f61>=0x0;_0x102f61--)(_0xd10611=_0x5574f5[_0x102f61])&&(_0x175378=_0xd10611(_0x175378)||_0x175378);return _0x175378;},_0x36952b=(_0x33d0b9,_0x52caea)=>(_0x23146,_0x227f97)=>_0x52caea(_0x23146,_0x227f97,_0x33d0b9);let _0x484a95=class extends _0x514323['Disposable']{constructor(_0x418572,_0x5be272,_0x3c2e66,_0x5cc2a0){const _0x235c85=_0x28189d;super(),this[_0x235c85(0x1aa)]=_0x418572,this[_0x235c85(0x19b)]=_0x5be272,this[_0x235c85(0x21b)]=_0x3c2e66,this[_0x235c85(0x194)]=_0x5cc2a0,this['_init'](),this[_0x235c85(0x205)]();}[_0x28189d(0x205)](){const _0x5387ec=_0x28189d;this[_0x5387ec(0x199)](this[_0x5387ec(0x19b)]['commentUpdate$'][_0x5387ec(0x21c)](_0x1985e1[_0x5387ec(0x1e1)](0x10))[_0x5387ec(0x1a2)](_0x538f5f=>{const _0x14553d=_0x5387ec,_0x1d56b7=new Set();_0x538f5f[_0x14553d(0x1a8)](_0x3de6f5=>{const _0x338938=_0x14553d;switch(_0x3de6f5[_0x338938(0x1dc)]){case'add':{const _0x15880e=_0x3de6f5['payload'][_0x338938(0x1d4)];_0x1d56b7[_0x338938(0x1a5)](_0x15880e);break;}}}),_0x28b767(this[_0x14553d(0x194)],_0x1d56b7);}));}['_init'](){const _0x27bbef=_0x28189d;this[_0x27bbef(0x199)](this['_commentService']['commentUpdate$'][_0x27bbef(0x1a2)](async _0x134a66=>{const _0x5c10aa=_0x27bbef;var _0x4c5cf3,_0x347e42,_0x438a32,_0x3ee4a1;const _0x29e3ec=(_0x4c5cf3=this[_0x5c10aa(0x19b)][_0x5c10aa(0x19a)](_0x134a66[_0x5c10aa(0x1ec)])['find'](_0x5e9adb=>_0x5e9adb[_0x5c10aa(0x1c2)]===_0x134a66[_0x5c10aa(0x1c2)]))==null?void 0x0:_0x4c5cf3[_0x5c10aa(0x1ae)];if(!_0x29e3ec)return;const {unitId:_0x396dc7,subUnitId:_0x2a2530}=_0x29e3ec;switch(_0x134a66[_0x5c10aa(0x20b)]&&this[_0x5c10aa(0x21b)]['addUser'](_0x134a66[_0x5c10aa(0x20b)]),_0x134a66['type']){case _0x4a837d[_0x5c10aa(0x1e7)]:break;case _0x4a837d['Reply']:{this[_0x5c10aa(0x19b)][_0x5c10aa(0x1d0)](_0x396dc7,_0x2a2530,{'unitId':_0x396dc7,'subUnitId':_0x2a2530,'ref':'','id':_0x134a66[_0x5c10aa(0x1a1)],'dT':_0x5d85fb(+_0x134a66['createTimestamp']),'threadId':_0x134a66['threadId'],'personId':(_0x438a32=(_0x347e42=_0x134a66[_0x5c10aa(0x20b)])==null?void 0x0:_0x347e42['userID'])!=null?_0x438a32:_0x134a66['userId'],'text':JSON['parse'](_0x134a66[_0x5c10aa(0x1ca)]),'parentId':_0x29e3ec['id']});break;}case _0x4a837d[_0x5c10aa(0x1be)]:{const _0x5ce3f3=this[_0x5c10aa(0x19b)][_0x5c10aa(0x1db)](_0x396dc7,_0x2a2530,_0x134a66[_0x5c10aa(0x1a1)]);_0x5ce3f3&&_0x5ce3f3[_0x5c10aa(0x1bc)]&&this[_0x5c10aa(0x19b)][_0x5c10aa(0x1b7)](_0x396dc7,_0x2a2530,_0x134a66[_0x5c10aa(0x1a1)]);break;}case _0x4a837d[_0x5c10aa(0x1b0)]:{this['_threadCommentModel'][_0x5c10aa(0x1fc)](_0x396dc7,_0x2a2530,{'commentId':_0x134a66['replyId'],'text':JSON[_0x5c10aa(0x20f)](_0x134a66['content'])});break;}case _0x4a837d[_0x5c10aa(0x1ee)]:{const _0x1236a7=(_0x3ee4a1=this[_0x5c10aa(0x19b)]['getUnit'](_0x134a66[_0x5c10aa(0x1ec)])[_0x5c10aa(0x20d)](_0x4767a3=>_0x4767a3[_0x5c10aa(0x1c2)]===_0x134a66[_0x5c10aa(0x1c2)]))==null?void 0x0:_0x3ee4a1[_0x5c10aa(0x1ae)];_0x1236a7&&this['_threadCommentModel'][_0x5c10aa(0x212)](_0x396dc7,_0x2a2530,_0x1236a7['id'],_0x134a66[_0x5c10aa(0x210)]===_0x479a51[_0x5c10aa(0x208)]);break;}}}));}};_0x484a95=_0x5d5744([_0x36952b(0x0,_0x514323[_0x28189d(0x1c4)](_0x1cb471[_0x28189d(0x1e4)])),_0x36952b(0x1,_0x514323[_0x28189d(0x1c4)](_0x18ced5[_0x28189d(0x1f0)])),_0x36952b(0x2,_0x514323[_0x28189d(0x1c4)](_0x514323['UserManagerService'])),_0x36952b(0x3,_0x514323['Inject'](_0x514323[_0x28189d(0x20a)]))],_0x484a95);const _0x434b5c='thread-comment-data-source.config',_0x5ea3e8={};var _0x595551=Object['getOwnPropertyDescriptor'],_0x36943e=(_0x26b29d,_0x5cac30,_0x2a9a84,_0x6a3eca)=>{const _0x2a2476=_0x28189d;for(var _0x3ebea6=_0x6a3eca>0x1?void 0x0:_0x6a3eca?_0x595551(_0x5cac30,_0x2a9a84):_0x5cac30,_0x2dccc2=_0x26b29d[_0x2a2476(0x1dd)]-0x1,_0x294603;_0x2dccc2>=0x0;_0x2dccc2--)(_0x294603=_0x26b29d[_0x2dccc2])&&(_0x3ebea6=_0x294603(_0x3ebea6)||_0x3ebea6);return _0x3ebea6;},_0x1ae31c=(_0x27bb1e,_0x36e48e)=>(_0x1c9bb9,_0x277383)=>_0x36e48e(_0x1c9bb9,_0x277383,_0x27bb1e);function _0xfb3db4(_0x2c17fd,_0x5db41a){const _0x58d3b5=_0x28189d,_0x190958=_0x2c17fd['replies'][0x0];return{..._0x5db41a,'id':_0x190958[_0x58d3b5(0x1a1)],'resolved':_0x2c17fd[_0x58d3b5(0x210)]===0x1,'dT':_0x5d85fb(_0x190958[_0x58d3b5(0x1ad)]),'personId':_0x190958[_0x58d3b5(0x1c0)],'threadId':_0x190958[_0x58d3b5(0x1c2)]};}function _0xd9e2c4(_0x22eb61,_0x3a29b9,_0x16e489){const _0x4b3217=_0x28189d;var _0x23b5c4,_0x3b8806;if(((_0x3b8806=(_0x23b5c4=_0x22eb61==null?void 0x0:_0x22eb61['replies'])==null?void 0x0:_0x23b5c4['length'])!=null?_0x3b8806:0x0)>0x0){const _0x7142e6=(_0x2fc685,_0x5913dc)=>({'id':_0x2fc685[_0x4b3217(0x1a1)],'threadId':_0x2fc685['threadId'],'dT':_0x5d85fb(_0x2fc685['createTimestamp']),'personId':_0x2fc685[_0x4b3217(0x1c0)],'resolved':_0x22eb61[_0x4b3217(0x210)]===_0x479a51[_0x4b3217(0x208)],'unitId':_0x3a29b9,'subUnitId':_0x16e489,'text':JSON[_0x4b3217(0x20f)](_0x2fc685[_0x4b3217(0x1ca)]),'parentId':_0x5913dc}),_0x1a7cf4=_0x7142e6(_0x22eb61[_0x4b3217(0x203)][0x0]);return{..._0x1a7cf4,'children':_0x22eb61[_0x4b3217(0x203)]['slice'](0x1)['map'](_0x1417ff=>_0x7142e6(_0x1417ff,_0x1a7cf4['id']))};}return null;}let _0x368b4e=class{constructor(_0x2995c6,_0x19f702,_0x3a8b05,_0xcbf3d7){const _0x352b5b=_0x28189d;this['_httpService']=_0x2995c6,this[_0x352b5b(0x21b)]=_0x19f702,this[_0x352b5b(0x219)]=_0x3a8b05,this[_0x352b5b(0x194)]=_0xcbf3d7;}async[_0x28189d(0x1d0)](_0xbc0805){const _0x11b9d4=_0x28189d;var _0x308db7,_0x2f2afe;const {parentId:_0x3f4443,unitId:_0x1f73b5,text:_0x255b0d,threadId:_0x52919e}=_0xbc0805,_0x4b1087=(_0x2f2afe=(_0x308db7=_0x255b0d[_0x11b9d4(0x1d1)])==null?void 0x0:_0x308db7[_0x11b9d4(0x1c3)](_0x5c8708=>_0x5c8708[_0x11b9d4(0x1b3)]===_0x514323[_0x11b9d4(0x1ba)]['COMMENT'])[_0x11b9d4(0x21e)](_0x4bef50=>_0x4bef50['rangeId']))!=null?_0x2f2afe:[],_0x5f4a52=JSON[_0x11b9d4(0x218)](_0x255b0d),_0x4a1747=(await this[_0x11b9d4(0x219)]['requireSession'](_0x1f73b5))['getMemberID']();if(_0x3f4443){const _0x26e388={'memberId':_0x4a1747,'unitId':_0x1f73b5,'content':_0x5f4a52,'mention':_0x4b1087,'threadId':_0x52919e},_0x5920b1=(await this['_httpService'][_0x11b9d4(0x1f7)](_0x11b9d4(0x1a7)+_0x1f73b5+_0x11b9d4(0x1a3),{'body':_0x26e388}))[_0x11b9d4(0x207)][_0x11b9d4(0x1ab)];return{..._0xbc0805,'id':_0x5920b1[_0x11b9d4(0x1a1)],'dT':_0x514323[_0x11b9d4(0x1e0)](+_0x5920b1[_0x11b9d4(0x1ad)])[_0x11b9d4(0x1b2)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5920b1[_0x11b9d4(0x1c0)]};}else{const _0x230193={'memberId':_0x4a1747,'unitId':_0x1f73b5,'content':_0x5f4a52,'mention':_0x4b1087},_0x2027de=await this['_httpService'][_0x11b9d4(0x1f7)](_0x11b9d4(0x1a7)+_0x1f73b5+'/add',{'body':_0x230193});return _0xfb3db4(_0x2027de['body'][_0x11b9d4(0x215)],_0xbc0805);}}async['updateComment'](_0x429b2f){const _0x4b20c7=_0x28189d;var _0x32c279,_0x5ca74b;const {text:_0xaa25ab,unitId:_0x15f5aa}=_0x429b2f,_0x4abebf=(_0x5ca74b=(_0x32c279=_0xaa25ab[_0x4b20c7(0x1d1)])==null?void 0x0:_0x32c279[_0x4b20c7(0x1c3)](_0x5e6182=>_0x5e6182[_0x4b20c7(0x1b3)]===_0x514323[_0x4b20c7(0x1ba)][_0x4b20c7(0x1fd)])[_0x4b20c7(0x21e)](_0x553122=>_0x553122[_0x4b20c7(0x1c7)]))!=null?_0x5ca74b:[],_0x49b27e=JSON[_0x4b20c7(0x218)](_0xaa25ab),_0x282f2f=_0x429b2f[_0x4b20c7(0x1c2)],_0x2c5703=_0x429b2f['id'],_0x3dd1f2={'memberId':(await this[_0x4b20c7(0x219)][_0x4b20c7(0x1f5)](_0x15f5aa))[_0x4b20c7(0x1da)](),'unitId':_0x15f5aa,'threadId':_0x282f2f,'mention':_0x4abebf,'content':_0x49b27e,'replyId':_0x2c5703},_0xeeac28=await this[_0x4b20c7(0x1bf)][_0x4b20c7(0x1f7)](_0x4b20c7(0x1a7)+_0x15f5aa+_0x4b20c7(0x1bd),{'body':_0x3dd1f2});return!_0xeeac28[_0x4b20c7(0x207)]['error']||_0xeeac28[_0x4b20c7(0x207)][_0x4b20c7(0x1a6)][_0x4b20c7(0x211)]===0x1;}async['resolveComment'](_0x3a601f){const _0x3947d3=_0x28189d,{unitId:_0x21cc05}=_0x3a601f,_0x351086=_0x3a601f['threadId'],_0x5e6b54={'memberId':this[_0x3947d3(0x21b)][_0x3947d3(0x21a)]()[_0x3947d3(0x1cb)],'unitId':_0x21cc05,'threadId':_0x351086,'solved':_0x3a601f[_0x3947d3(0x1ff)]?_0x479a51[_0x3947d3(0x208)]:_0x479a51[_0x3947d3(0x1e2)]},_0x30e977=await this[_0x3947d3(0x1bf)][_0x3947d3(0x1f7)](_0x3947d3(0x1a7)+_0x21cc05+_0x3947d3(0x1d3),{'body':_0x5e6b54});return!_0x30e977[_0x3947d3(0x207)][_0x3947d3(0x1a6)]||_0x30e977['body']['error']['code']===0x1;}async[_0x28189d(0x1b7)](_0x9cf93b,_0x154f2a,_0x4a145b,_0x2ea039){const _0x58673f=_0x28189d,_0x2b5ffe={'memberId':(await this[_0x58673f(0x219)][_0x58673f(0x1f5)](_0x9cf93b))['getMemberID'](),'threadId':_0x4a145b,'replyId':_0x2ea039,'unitId':_0x9cf93b},_0x553091=await this[_0x58673f(0x1bf)][_0x58673f(0x1f7)]('/universer-api/comment/unit/'+_0x9cf93b+_0x58673f(0x1ed),{'body':_0x2b5ffe});return!_0x553091[_0x58673f(0x207)]['error']||_0x553091['body'][_0x58673f(0x1a6)][_0x58673f(0x211)]===0x1;}async[_0x28189d(0x1f3)](_0x49d825,_0x270d98,_0x3b8848){const _0x1d5e2b=_0x28189d,_0x2c74b9={'unitId':_0x49d825,'threadId':_0x3b8848},_0x464fc=await this[_0x1d5e2b(0x1bf)][_0x1d5e2b(0x1f7)](_0x1d5e2b(0x1a7)+_0x49d825+'/list',{'body':_0x2c74b9}),_0x501ccf=_0x3b8848['map'](_0x3c36bb=>_0xd9e2c4(_0x464fc[_0x1d5e2b(0x207)][_0x1d5e2b(0x19e)][_0x3c36bb],_0x49d825,_0x270d98))[_0x1d5e2b(0x1c3)](Boolean);return Object[_0x1d5e2b(0x201)](_0x464fc['body'][_0x1d5e2b(0x1d8)])[_0x1d5e2b(0x1a8)](_0x756690=>{const _0x4f735a=_0x1d5e2b;this[_0x4f735a(0x21b)]['addUser'](_0x756690);}),_0x501ccf;}[_0x28189d(0x1f4)](_0x5c4762){const _0x48d70c=_0x28189d;return{'id':_0x5c4762['id'],'threadId':_0x5c4762[_0x48d70c(0x1c2)],'ref':_0x5c4762[_0x48d70c(0x1f2)]};}};_0x368b4e=_0x36943e([_0x1ae31c(0x0,_0x514323[_0x28189d(0x1c4)](_0x2aae81[_0x28189d(0x1a9)])),_0x1ae31c(0x1,_0x514323[_0x28189d(0x1c4)](_0x514323[_0x28189d(0x1ea)])),_0x1ae31c(0x2,_0x514323[_0x28189d(0x1c4)](_0x1cb471[_0x28189d(0x1b6)])),_0x1ae31c(0x3,_0x514323['Inject'](_0x514323['Injector']))],_0x368b4e);var _0x5211c6=Object['getOwnPropertyDescriptor'],_0x1a741d=(_0x226182,_0x38d2ca,_0x4d4d26,_0x46f64c)=>{for(var _0x377cd9=_0x46f64c>0x1?void 0x0:_0x46f64c?_0x5211c6(_0x38d2ca,_0x4d4d26):_0x38d2ca,_0x384997=_0x226182['length']-0x1,_0x2f6865;_0x384997>=0x0;_0x384997--)(_0x2f6865=_0x226182[_0x384997])&&(_0x377cd9=_0x2f6865(_0x377cd9)||_0x377cd9);return _0x377cd9;},_0x27cb81=(_0x13902a,_0x3d1c56)=>(_0x3665bd,_0x21685c)=>_0x3d1c56(_0x3665bd,_0x21685c,_0x13902a);let _0xaf8918=class extends _0x514323[_0x28189d(0x1eb)]{constructor(_0x2880fc,_0x1f2437){const _0x4980eb=_0x28189d;super(),this[_0x4980eb(0x198)]=_0x2880fc,this[_0x4980eb(0x19f)]=_0x1f2437,this['_initDataSource']();}[_0x28189d(0x1cc)](){const _0x4b87cc=_0x28189d;this[_0x4b87cc(0x198)][_0x4b87cc(0x1fa)]=this[_0x4b87cc(0x19f)],this[_0x4b87cc(0x198)][_0x4b87cc(0x20e)]=!0x1;}};_0xaf8918=_0x1a741d([_0x27cb81(0x0,_0x18ced5[_0x28189d(0x214)]),_0x27cb81(0x1,_0x514323[_0x28189d(0x1c4)](_0x368b4e))],_0xaf8918);var _0x5ca07e=Object['defineProperty'],_0x3521ae=Object['getOwnPropertyDescriptor'],_0x209b12=(_0x286349,_0xbcb4d3,_0x25e96e)=>_0xbcb4d3 in _0x286349?_0x5ca07e(_0x286349,_0xbcb4d3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x25e96e}):_0x286349[_0xbcb4d3]=_0x25e96e,_0x43f026=(_0x210834,_0x2fd51e,_0x47e1f1,_0x4c40c1)=>{const _0x5812c6=_0x28189d;for(var _0x205932=_0x4c40c1>0x1?void 0x0:_0x4c40c1?_0x3521ae(_0x2fd51e,_0x47e1f1):_0x2fd51e,_0x353781=_0x210834[_0x5812c6(0x1dd)]-0x1,_0xe496b9;_0x353781>=0x0;_0x353781--)(_0xe496b9=_0x210834[_0x353781])&&(_0x205932=_0xe496b9(_0x205932)||_0x205932);return _0x205932;},_0x2e5afe=(_0x11e490,_0x23544f)=>(_0x4ed19b,_0x3da69c)=>_0x23544f(_0x4ed19b,_0x3da69c,_0x11e490),_0x2e4e97=(_0x17cc6c,_0x701f4a,_0x2fd8f2)=>_0x209b12(_0x17cc6c,typeof _0x701f4a!='symbol'?_0x701f4a+'':_0x701f4a,_0x2fd8f2);_0x421825[_0x28189d(0x1d7)]=class extends _0x514323[_0x28189d(0x1cd)]{constructor(_0x39ae02=_0x5ea3e8,_0x264db9,_0x1c7d8b){const _0x37aef5=_0x28189d;super(),this[_0x37aef5(0x216)]=_0x39ae02,this[_0x37aef5(0x194)]=_0x264db9,this['_configService']=_0x1c7d8b;const {..._0x5c1dba}=_0x514323[_0x37aef5(0x1b8)]({},_0x5ea3e8,this[_0x37aef5(0x216)]);this[_0x37aef5(0x1e5)][_0x37aef5(0x1ac)](_0x434b5c,_0x5c1dba);}[_0x28189d(0x195)](){const _0x26975b=_0x28189d;[[_0x368b4e],[_0xaf8918],[_0x484a95]][_0x26975b(0x1a8)](_0x2a8e41=>{const _0x445af3=_0x26975b;this['_injector'][_0x445af3(0x1a5)](_0x2a8e41);});}['onReady'](){const _0x48d018=_0x28189d;this[_0x48d018(0x194)][_0x48d018(0x209)](_0xaf8918),this[_0x48d018(0x194)]['get'](_0x484a95);}},_0x2e4e97(_0x421825['UniverThreadCommentDataSourcePlugin'],_0x28189d(0x1e8),_0x2d2057),_0x2e4e97(_0x421825[_0x28189d(0x1d7)],_0x28189d(0x1dc),_0x514323[_0x28189d(0x19c)][_0x28189d(0x1fe)]),_0x421825[_0x28189d(0x1d7)]=_0x43f026([_0x514323['DependentOn'](_0xe499e8[_0x28189d(0x1b4)],_0x1cb471[_0x28189d(0x1e6)],_0x179a7a['UniverLicensePlugin']),_0x2e5afe(0x1,_0x514323['Inject'](_0x514323['Injector'])),_0x2e5afe(0x2,_0x514323[_0x28189d(0x197)])],_0x421825[_0x28189d(0x1d7)]),Object[_0x28189d(0x1b9)](_0x421825,Symbol[_0x28189d(0x21d)],{'value':'Module'});}));function _0x3fef(_0x1e648e,_0x708da0){const _0x127084=_0x1270();return _0x3fef=function(_0x3fefe3,_0x13c347){_0x3fefe3=_0x3fefe3-0x194;let _0x41598f=_0x127084[_0x3fefe3];return _0x41598f;},_0x3fef(_0x1e648e,_0x708da0);}function _0x1270(){const _0x368cc7=['/reply','48zxhbCA','add','error','/universer-api/comment/unit/','forEach','HTTPService','_commentService','reply','setConfig','createTimestamp','root','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','@univerjs-pro/collaboration-client','format','rangeType','UniverThreadCommentUIPlugin','getOwnPropertyDescriptor','CollaborationSessionService','deleteComment','merge','defineProperty','CustomRangeType','amd','parentId','/edit','Delete','_httpService','userId','1258540FNUnzo','threadId','filter','Inject','rxjs','getUser','rangeId','@univerjs/core','object','content','userID','_initDataSource','Plugin','YYYY/MM/DD\x20HH:mm','Reply','addComment','customRanges','UniverThreadComment','/solved','personId','/universer-api/user/list','8148LLHEad','UniverThreadCommentDataSourcePlugin','users','exports','getMemberID','getComment','type','length','107093Vvoeky','UniverCore','dayjs','bufferTime','OpenOrReOpen','addUser','CommentService','_configService','UniverCollaborationClientPlugin','Add','pluginName','@univerjs/thread-comment-ui','UserManagerService','Disposable','unitId','/delete','Solve','3627RUUHVD','ThreadCommentModel','38JnfAro','ref','listComments','saveCommentToSnapshot','requireSession','@univerjs-pro/license','post','@univerjs/thread-comment','UniverProThreadCommentDatasource','dataSource','352913IhyNZA','updateComment','COMMENT','UNIVER_UNKNOWN','resolved','1495242jJKxjg','values','@univerjs/network','replies','40OyHQPo','_initUserSync','290775IXfAqJ','body','Solved','get','Injector','user','6bqsDET','find','syncUpdateMutationToColla','parse','solved','code','resolveComment','Unknown','IThreadCommentDataSourceService','comment','_config','3FmJywy','stringify','_sessionService','getCurrentUser','_userService','pipe','toStringTag','map','_injector','onStarting','19671OXilXb','IConfigService','_threadCommentDataSourceService','disposeWithMe','getUnit','_threadCommentModel','UniverInstanceType','UNRECOGNIZED','comments','_threadCommentDataSource','UniverProLicense','replyId','subscribe'];_0x1270=function(){return _0x368cc7;};return _0x1270();}
|
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.202505291607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.8.0-nightly.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/core": "0.8.0-nightly.
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs-
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.8.0-nightly.
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.8.0-nightly.202505291607",
|
|
49
|
+
"@univerjs-pro/license": "0.8.0-nightly.202505291607",
|
|
50
|
+
"@univerjs/core": "0.8.0-nightly.202505291607",
|
|
51
|
+
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
52
|
+
"@univerjs/thread-comment": "0.8.0-nightly.202505291607",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.8.0-nightly.202505291607",
|
|
54
|
+
"@univerjs/network": "0.8.0-nightly.202505291607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vite": "^6.3.5",
|
|
60
60
|
"vitest": "^3.1.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.8.0-beta.
|
|
61
|
+
"@univerjs-infra/shared": "0.8.0-beta.1"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|