@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505171606 → 0.7.0-nightly.202505191607
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 +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x528a9f=_0x22fc;(function(_0x38529b,_0x571ac0){const _0x5af93b=_0x22fc,_0x350212=_0x38529b();while(!![]){try{const _0x3cdf22=parseInt(_0x5af93b(0x1c5))/0x1+parseInt(_0x5af93b(0x22b))/0x2*(parseInt(_0x5af93b(0x20d))/0x3)+parseInt(_0x5af93b(0x20e))/0x4+parseInt(_0x5af93b(0x230))/0x5*(-parseInt(_0x5af93b(0x1e5))/0x6)+-parseInt(_0x5af93b(0x1f0))/0x7+parseInt(_0x5af93b(0x1fb))/0x8*(parseInt(_0x5af93b(0x1db))/0x9)+-parseInt(_0x5af93b(0x1c7))/0xa*(-parseInt(_0x5af93b(0x1e8))/0xb);if(_0x3cdf22===_0x571ac0)break;else _0x350212['push'](_0x350212['shift']());}catch(_0x158956){_0x350212['push'](_0x350212['shift']());}}}(_0x52c7,0x35c3a));Object['defineProperty'](exports,Symbol[_0x528a9f(0x215)],{'value':'Module'});const b=require(_0x528a9f(0x1ca)),T=require(_0x528a9f(0x205)),c=require(_0x528a9f(0x20c)),j=require(_0x528a9f(0x1f6)),M=require(_0x528a9f(0x1d9)),w=require(_0x528a9f(0x214)),P=require('@univerjs/network'),U=_0x528a9f(0x22f);var I=(_0x426b0a=>(_0x426b0a[_0x426b0a['OpenOrReOpen']=0x0]=_0x528a9f(0x236),_0x426b0a[_0x426b0a[_0x528a9f(0x233)]=0x1]='Solved',_0x426b0a[_0x426b0a['UNRECOGNIZED']=-0x1]=_0x528a9f(0x20b),_0x426b0a))(I||{}),v=(_0x1b3ad5=>(_0x1b3ad5[_0x1b3ad5[_0x528a9f(0x1e7)]=0x0]=_0x528a9f(0x1e7),_0x1b3ad5[_0x1b3ad5['Add']=0x1]=_0x528a9f(0x232),_0x1b3ad5[_0x1b3ad5[_0x528a9f(0x1f5)]=0x2]=_0x528a9f(0x1f5),_0x1b3ad5[_0x1b3ad5[_0x528a9f(0x1f1)]=0x3]='Edit',_0x1b3ad5[_0x1b3ad5[_0x528a9f(0x231)]=0x4]=_0x528a9f(0x231),_0x1b3ad5[_0x1b3ad5['Solve']=0x5]=_0x528a9f(0x243),_0x1b3ad5[_0x1b3ad5[_0x528a9f(0x20b)]=-0x1]=_0x528a9f(0x20b),_0x1b3ad5))(v||{});const f=_0x5e7254=>c[_0x528a9f(0x229)](new Date(+_0x5e7254))[_0x528a9f(0x1ce)](_0x528a9f(0x23d)),R=async(_0x4e30e5,_0x2b897d)=>{const _0x10acc0=_0x528a9f,_0x43eb36=_0x4e30e5[_0x10acc0(0x1eb)](c['UserManagerService']),_0x2d3f21=_0x4e30e5['get'](P['HTTPService']);_0x2b897d[_0x10acc0(0x1d4)](_0x3237b0=>{const _0x2c8e31=_0x10acc0;_0x43eb36[_0x2c8e31(0x216)](_0x3237b0)&&_0x2b897d['delete'](_0x3237b0);}),_0x2b897d['size']&&(await _0x2d3f21[_0x10acc0(0x1eb)](_0x10acc0(0x1cc),{'params':{'userIDs':[..._0x2b897d]}}))[_0x10acc0(0x1f3)][_0x10acc0(0x1e6)][_0x10acc0(0x1d4)](_0x150cd0=>{const _0x387f38=_0x10acc0;_0x150cd0&&_0x43eb36[_0x387f38(0x225)](_0x150cd0);});};function _0x52c7(){const _0x2848c6=['338544XHclVb','values','148860zpvlpK','comments','/reply','@univerjs-pro/collaboration-client','type','/universer-api/user/list','slice','format','IThreadCommentDataSourceService','deleteComment','UserManagerService','/edit','reply','forEach','bufferTime','post','UniverThreadCommentDataSourcePlugin','CollaborationSessionService','@univerjs/thread-comment','comment','9iAzWfu','CommentService','getUnit','subscribe','/delete','payload','_threadCommentModel','unitId','Disposable','error','150054JLDxwc','users','Unknown','66UcdUeY','createTimestamp','COMMENT','get','userId','content','add','IConfigService','2848650PdrHbL','Edit','getOwnPropertyDescriptor','body','ThreadCommentModel','Reply','@univerjs/thread-comment-ui','getCurrentUser','/universer-api/comment/unit/','rangeId','_configService','2040584HkWsbc','find','Plugin','_injector','DependentOn','threadId','filter','_threadCommentDataSource','getComment','_threadCommentDataSourceService','@univerjs-pro/license','addComment','UniverCollaborationClientPlugin','commentUpdate$','userID','/solved','UNRECOGNIZED','@univerjs/core','4308TAzNal','447504KPTgRn','getMemberID','_userService','_initDataSource','customRanges','HTTPService','rxjs','toStringTag','getUser','disposeWithMe','pipe','user','ref','Injector','symbol','defineProperty','root','length','pluginName','/add','/list','setConfig','updateComment','addUser','rangeType','_sessionService','UniverLicensePlugin','dayjs','onReady','80enXzNA','stringify','replyId','map','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','45XTzIpZ','Delete','Add','Solved','_httpService','dataSource','OpenOrReOpen','Inject','_initUserSync','CustomRangeType','solved','_init','_config','YYYY/MM/DD\x20HH:mm','code','onStarting','parentId','replies','resolveComment','Solve'];_0x52c7=function(){return _0x2848c6;};return _0x52c7();}var $=Object[_0x528a9f(0x1f2)],E=(_0x1e0879,_0x59bd40,_0xde60c2,_0x4503d7)=>{for(var _0x3ba808=_0x4503d7>0x1?void 0x0:_0x4503d7?$(_0x59bd40,_0xde60c2):_0x59bd40,_0x1b4815=_0x1e0879['length']-0x1,_0x1872d1;_0x1b4815>=0x0;_0x1b4815--)(_0x1872d1=_0x1e0879[_0x1b4815])&&(_0x3ba808=_0x1872d1(_0x3ba808)||_0x3ba808);return _0x3ba808;},S=(_0x39f939,_0x33b9d4)=>(_0x3d790a,_0x3bec44)=>_0x33b9d4(_0x3d790a,_0x3bec44,_0x39f939);let p=class extends c[_0x528a9f(0x1e3)]{constructor(_0x4634c7,_0x48d69a,_0x2c4846,_0x68e41f){const _0x30b1b6=_0x528a9f;super(),this['_commentService']=_0x4634c7,this[_0x30b1b6(0x1e1)]=_0x48d69a,this[_0x30b1b6(0x210)]=_0x2c4846,this['_injector']=_0x68e41f,this['_init'](),this[_0x30b1b6(0x238)]();}['_initUserSync'](){const _0x372829=_0x528a9f;this[_0x372829(0x217)](this[_0x372829(0x1e1)][_0x372829(0x208)][_0x372829(0x218)](w[_0x372829(0x1d5)](0x10))['subscribe'](_0x3de0bf=>{const _0x46c4b7=_0x372829,_0x4994cc=new Set();_0x3de0bf[_0x46c4b7(0x1d4)](_0xb33cb6=>{const _0x249d44=_0x46c4b7;switch(_0xb33cb6[_0x249d44(0x1cb)]){case'add':{const _0x32c6d9=_0xb33cb6[_0x249d44(0x1e0)]['personId'];_0x4994cc['add'](_0x32c6d9);break;}}}),R(this[_0x46c4b7(0x1fe)],_0x4994cc);}));}[_0x528a9f(0x23b)](){const _0x1a9c69=_0x528a9f;this[_0x1a9c69(0x217)](this['_commentService'][_0x1a9c69(0x208)][_0x1a9c69(0x1de)](async _0x43c818=>{const _0x550967=_0x1a9c69;var _0x2a2919,_0x191d76,_0x3577de,_0x3b58c6;const _0x284b82=(_0x2a2919=this[_0x550967(0x1e1)][_0x550967(0x1dd)](_0x43c818[_0x550967(0x1e2)])['find'](_0x55c186=>_0x55c186['threadId']===_0x43c818['threadId']))==null?void 0x0:_0x2a2919[_0x550967(0x21e)];if(!_0x284b82)return;const {unitId:_0x3d482f,subUnitId:_0x31dc7d}=_0x284b82;switch(_0x43c818[_0x550967(0x219)]&&this['_userService']['addUser'](_0x43c818['user']),_0x43c818[_0x550967(0x1cb)]){case v[_0x550967(0x232)]:break;case v[_0x550967(0x1f5)]:{this['_threadCommentModel'][_0x550967(0x206)](_0x3d482f,_0x31dc7d,{'unitId':_0x3d482f,'subUnitId':_0x31dc7d,'ref':'','id':_0x43c818[_0x550967(0x22d)],'dT':f(+_0x43c818[_0x550967(0x1e9)]),'threadId':_0x43c818[_0x550967(0x200)],'personId':(_0x3577de=(_0x191d76=_0x43c818[_0x550967(0x219)])==null?void 0x0:_0x191d76[_0x550967(0x209)])!=null?_0x3577de:_0x43c818[_0x550967(0x1ec)],'text':JSON['parse'](_0x43c818[_0x550967(0x1ed)]),'parentId':_0x284b82['id']});break;}case v['Delete']:{const _0x2d04c7=this['_threadCommentModel'][_0x550967(0x203)](_0x3d482f,_0x31dc7d,_0x43c818['replyId']);_0x2d04c7&&_0x2d04c7[_0x550967(0x240)]&&this[_0x550967(0x1e1)][_0x550967(0x1d0)](_0x3d482f,_0x31dc7d,_0x43c818['replyId']);break;}case v[_0x550967(0x1f1)]:{this['_threadCommentModel'][_0x550967(0x224)](_0x3d482f,_0x31dc7d,{'commentId':_0x43c818[_0x550967(0x22d)],'text':JSON['parse'](_0x43c818[_0x550967(0x1ed)])});break;}case v[_0x550967(0x243)]:{const _0x756157=(_0x3b58c6=this[_0x550967(0x1e1)][_0x550967(0x1dd)](_0x43c818['unitId'])[_0x550967(0x1fc)](_0xecde27=>_0xecde27['threadId']===_0x43c818['threadId']))==null?void 0x0:_0x3b58c6['root'];_0x756157&&this[_0x550967(0x1e1)][_0x550967(0x242)](_0x3d482f,_0x31dc7d,_0x756157['id'],_0x43c818[_0x550967(0x23a)]===I[_0x550967(0x233)]);break;}}}));}};p=E([S(0x0,c[_0x528a9f(0x237)](b[_0x528a9f(0x1dc)])),S(0x1,c[_0x528a9f(0x237)](M[_0x528a9f(0x1f4)])),S(0x2,c[_0x528a9f(0x237)](c[_0x528a9f(0x1d1)])),S(0x3,c[_0x528a9f(0x237)](c[_0x528a9f(0x21b)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x528a9f(0x1f2)],x=(_0x34e8a2,_0x881297,_0x4b1afd,_0x58b4d8)=>{const _0xf6f8bf=_0x528a9f;for(var _0x5dcd95=_0x58b4d8>0x1?void 0x0:_0x58b4d8?A(_0x881297,_0x4b1afd):_0x881297,_0x1b55be=_0x34e8a2[_0xf6f8bf(0x21f)]-0x1,_0x56f4e4;_0x1b55be>=0x0;_0x1b55be--)(_0x56f4e4=_0x34e8a2[_0x1b55be])&&(_0x5dcd95=_0x56f4e4(_0x5dcd95)||_0x5dcd95);return _0x5dcd95;},_=(_0x205199,_0x1e6b02)=>(_0x3d89f1,_0x559b1d)=>_0x1e6b02(_0x3d89f1,_0x559b1d,_0x205199);function Y(_0x3d7c29,_0x425a4a){const _0x5ed7c3=_0x528a9f,_0x338de8=_0x3d7c29[_0x5ed7c3(0x241)][0x0];return{..._0x425a4a,'id':_0x338de8['replyId'],'resolved':_0x3d7c29[_0x5ed7c3(0x23a)]===0x1,'dT':f(_0x338de8['createTimestamp']),'personId':_0x338de8[_0x5ed7c3(0x1ec)],'threadId':_0x338de8['threadId']};}function G(_0x4aab2b,_0x47da3d,_0x259d4d){const _0x539362=_0x528a9f;var _0x28f627,_0x13b0c6;if(((_0x13b0c6=(_0x28f627=_0x4aab2b==null?void 0x0:_0x4aab2b[_0x539362(0x241)])==null?void 0x0:_0x28f627[_0x539362(0x21f)])!=null?_0x13b0c6:0x0)>0x0){const _0x534bfc=(_0x4d5031,_0x50620f)=>({'id':_0x4d5031[_0x539362(0x22d)],'threadId':_0x4d5031[_0x539362(0x200)],'dT':f(_0x4d5031[_0x539362(0x1e9)]),'personId':_0x4d5031[_0x539362(0x1ec)],'resolved':_0x4aab2b['solved']===I[_0x539362(0x233)],'unitId':_0x47da3d,'subUnitId':_0x259d4d,'text':JSON['parse'](_0x4d5031['content']),'parentId':_0x50620f}),_0x692d71=_0x534bfc(_0x4aab2b[_0x539362(0x241)][0x0]);return{..._0x692d71,'children':_0x4aab2b[_0x539362(0x241)][_0x539362(0x1cd)](0x1)[_0x539362(0x22e)](_0x4a0880=>_0x534bfc(_0x4a0880,_0x692d71['id']))};}return null;}let g=class{constructor(_0x13ab9e,_0xfd725b,_0x311f96,_0x52745c){const _0xe9f54f=_0x528a9f;this['_httpService']=_0x13ab9e,this[_0xe9f54f(0x210)]=_0xfd725b,this[_0xe9f54f(0x227)]=_0x311f96,this[_0xe9f54f(0x1fe)]=_0x52745c;}async[_0x528a9f(0x206)](_0x35187e){const _0x45066c=_0x528a9f;var _0x4cbd1d,_0x211ba9;const {parentId:_0x5e21ee,unitId:_0x1071bb,text:_0x55e839,threadId:_0x438433}=_0x35187e,_0xc8f11e=(_0x211ba9=(_0x4cbd1d=_0x55e839[_0x45066c(0x212)])==null?void 0x0:_0x4cbd1d['filter'](_0x58f6b6=>_0x58f6b6[_0x45066c(0x226)]===c[_0x45066c(0x239)][_0x45066c(0x1ea)])[_0x45066c(0x22e)](_0x1bd1d7=>_0x1bd1d7[_0x45066c(0x1f9)]))!=null?_0x211ba9:[],_0x49db3a=JSON[_0x45066c(0x22c)](_0x55e839),_0x2018f8=(await this[_0x45066c(0x227)]['requireSession'](_0x1071bb))[_0x45066c(0x20f)]();if(_0x5e21ee){const _0x3af894={'memberId':_0x2018f8,'unitId':_0x1071bb,'content':_0x49db3a,'mention':_0xc8f11e,'threadId':_0x438433},_0x279f2f=(await this[_0x45066c(0x234)][_0x45066c(0x1d6)](_0x45066c(0x1f8)+_0x1071bb+_0x45066c(0x1c9),{'body':_0x3af894}))[_0x45066c(0x1f3)][_0x45066c(0x1d3)];return{..._0x35187e,'id':_0x279f2f[_0x45066c(0x22d)],'dT':c[_0x45066c(0x229)](+_0x279f2f[_0x45066c(0x1e9)])[_0x45066c(0x1ce)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x279f2f[_0x45066c(0x1ec)]};}else{const _0x246bf6={'memberId':_0x2018f8,'unitId':_0x1071bb,'content':_0x49db3a,'mention':_0xc8f11e},_0x250a28=await this['_httpService'][_0x45066c(0x1d6)]('/universer-api/comment/unit/'+_0x1071bb+_0x45066c(0x221),{'body':_0x246bf6});return Y(_0x250a28[_0x45066c(0x1f3)][_0x45066c(0x1da)],_0x35187e);}}async[_0x528a9f(0x224)](_0x881abc){const _0x124743=_0x528a9f;var _0x4c9b17,_0x229ec8;const {text:_0x4a9d0f,unitId:_0x582b46}=_0x881abc,_0x440c0c=(_0x229ec8=(_0x4c9b17=_0x4a9d0f[_0x124743(0x212)])==null?void 0x0:_0x4c9b17['filter'](_0x25d690=>_0x25d690['rangeType']===c['CustomRangeType'][_0x124743(0x1ea)])[_0x124743(0x22e)](_0x3d95aa=>_0x3d95aa['rangeId']))!=null?_0x229ec8:[],_0x53f81e=JSON[_0x124743(0x22c)](_0x4a9d0f),_0x34eb15=_0x881abc[_0x124743(0x200)],_0x28fcce=_0x881abc['id'],_0x12a32b={'memberId':(await this[_0x124743(0x227)]['requireSession'](_0x582b46))[_0x124743(0x20f)](),'unitId':_0x582b46,'threadId':_0x34eb15,'mention':_0x440c0c,'content':_0x53f81e,'replyId':_0x28fcce},_0x4d5556=await this[_0x124743(0x234)]['post'](_0x124743(0x1f8)+_0x582b46+_0x124743(0x1d2),{'body':_0x12a32b});return!_0x4d5556[_0x124743(0x1f3)][_0x124743(0x1e4)]||_0x4d5556[_0x124743(0x1f3)][_0x124743(0x1e4)][_0x124743(0x23e)]===0x1;}async[_0x528a9f(0x242)](_0x3dfddc){const _0x34edde=_0x528a9f,{unitId:_0x582ee1}=_0x3dfddc,_0x31392f=_0x3dfddc['threadId'],_0x162c51={'memberId':this[_0x34edde(0x210)][_0x34edde(0x1f7)]()[_0x34edde(0x209)],'unitId':_0x582ee1,'threadId':_0x31392f,'solved':_0x3dfddc['resolved']?I[_0x34edde(0x233)]:I[_0x34edde(0x236)]},_0x392c0a=await this[_0x34edde(0x234)]['post'](_0x34edde(0x1f8)+_0x582ee1+_0x34edde(0x20a),{'body':_0x162c51});return!_0x392c0a['body']['error']||_0x392c0a[_0x34edde(0x1f3)][_0x34edde(0x1e4)]['code']===0x1;}async[_0x528a9f(0x1d0)](_0xd34e41,_0x445aab,_0x165778,_0x17fce1){const _0x2c038e=_0x528a9f,_0x506472={'memberId':(await this[_0x2c038e(0x227)]['requireSession'](_0xd34e41))[_0x2c038e(0x20f)](),'threadId':_0x165778,'replyId':_0x17fce1,'unitId':_0xd34e41},_0x4c5873=await this[_0x2c038e(0x234)][_0x2c038e(0x1d6)](_0x2c038e(0x1f8)+_0xd34e41+_0x2c038e(0x1df),{'body':_0x506472});return!_0x4c5873[_0x2c038e(0x1f3)][_0x2c038e(0x1e4)]||_0x4c5873[_0x2c038e(0x1f3)][_0x2c038e(0x1e4)]['code']===0x1;}async['listComments'](_0x19aa31,_0x5db856,_0x25feaf){const _0x58fedd=_0x528a9f,_0x9dd90a={'unitId':_0x19aa31,'threadId':_0x25feaf},_0x319b0e=await this[_0x58fedd(0x234)][_0x58fedd(0x1d6)]('/universer-api/comment/unit/'+_0x19aa31+_0x58fedd(0x222),{'body':_0x9dd90a}),_0x1b5121=_0x25feaf[_0x58fedd(0x22e)](_0x3242f1=>G(_0x319b0e[_0x58fedd(0x1f3)][_0x58fedd(0x1c8)][_0x3242f1],_0x19aa31,_0x5db856))[_0x58fedd(0x201)](Boolean);return Object[_0x58fedd(0x1c6)](_0x319b0e[_0x58fedd(0x1f3)][_0x58fedd(0x1e6)])[_0x58fedd(0x1d4)](_0x492f29=>{const _0x21df10=_0x58fedd;this[_0x21df10(0x210)][_0x21df10(0x225)](_0x492f29);}),_0x1b5121;}['saveCommentToSnapshot'](_0x574726){const _0x20a576=_0x528a9f;return{'id':_0x574726['id'],'threadId':_0x574726[_0x20a576(0x200)],'ref':_0x574726[_0x20a576(0x21a)]};}};g=x([_(0x0,c[_0x528a9f(0x237)](P[_0x528a9f(0x213)])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x528a9f(0x1d8)])),_(0x3,c[_0x528a9f(0x237)](c['Injector']))],g);var H=Object[_0x528a9f(0x1f2)],J=(_0x2efa6d,_0x5aa7eb,_0x51a721,_0x526af)=>{const _0x34d6cb=_0x528a9f;for(var _0x3044e0=_0x526af>0x1?void 0x0:_0x526af?H(_0x5aa7eb,_0x51a721):_0x5aa7eb,_0x7c4bd=_0x2efa6d[_0x34d6cb(0x21f)]-0x1,_0x47d1a2;_0x7c4bd>=0x0;_0x7c4bd--)(_0x47d1a2=_0x2efa6d[_0x7c4bd])&&(_0x3044e0=_0x47d1a2(_0x3044e0)||_0x3044e0);return _0x3044e0;},y=(_0x17a08a,_0x56cb54)=>(_0x51d4b2,_0x17c85c)=>_0x56cb54(_0x51d4b2,_0x17c85c,_0x17a08a);let C=class extends c[_0x528a9f(0x1e3)]{constructor(_0x326ab0,_0x5a5a20){const _0x262592=_0x528a9f;super(),this[_0x262592(0x204)]=_0x326ab0,this[_0x262592(0x202)]=_0x5a5a20,this[_0x262592(0x211)]();}[_0x528a9f(0x211)](){const _0x44aadd=_0x528a9f;this[_0x44aadd(0x204)][_0x44aadd(0x235)]=this[_0x44aadd(0x202)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x528a9f(0x1cf)]),y(0x1,c[_0x528a9f(0x237)](g))],C);var F=Object[_0x528a9f(0x21d)],L=Object['getOwnPropertyDescriptor'],Z=(_0x321fc2,_0x2e4a25,_0x52c14b)=>_0x2e4a25 in _0x321fc2?F(_0x321fc2,_0x2e4a25,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x52c14b}):_0x321fc2[_0x2e4a25]=_0x52c14b,W=(_0x8c1f87,_0x1ee9b5,_0x7d4c95,_0x263330)=>{const _0x4b49bd=_0x528a9f;for(var _0x40d63d=_0x263330>0x1?void 0x0:_0x263330?L(_0x1ee9b5,_0x7d4c95):_0x1ee9b5,_0x10e348=_0x8c1f87[_0x4b49bd(0x21f)]-0x1,_0x1e6e60;_0x10e348>=0x0;_0x10e348--)(_0x1e6e60=_0x8c1f87[_0x10e348])&&(_0x40d63d=_0x1e6e60(_0x40d63d)||_0x40d63d);return _0x40d63d;},O=(_0x16c76a,_0x39a1b3)=>(_0x32aed6,_0x573215)=>_0x39a1b3(_0x32aed6,_0x573215,_0x16c76a),N=(_0x501822,_0x25f780,_0xde2ecf)=>Z(_0x501822,typeof _0x25f780!=_0x528a9f(0x21c)?_0x25f780+'':_0x25f780,_0xde2ecf);function _0x22fc(_0x5ccc09,_0x3e818c){const _0x52c716=_0x52c7();return _0x22fc=function(_0x22fc16,_0x29e243){_0x22fc16=_0x22fc16-0x1c5;let _0x53435e=_0x52c716[_0x22fc16];return _0x53435e;},_0x22fc(_0x5ccc09,_0x3e818c);}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x528a9f(0x1fd)]{constructor(_0x182f21=D,_0xf67d75,_0x27d8ff){const _0x1ee348=_0x528a9f;super(),this[_0x1ee348(0x23c)]=_0x182f21,this[_0x1ee348(0x1fe)]=_0xf67d75,this[_0x1ee348(0x1fa)]=_0x27d8ff;const {..._0x5d5d09}=c['merge']({},D,this[_0x1ee348(0x23c)]);this[_0x1ee348(0x1fa)][_0x1ee348(0x223)](q,_0x5d5d09);}[_0x528a9f(0x23f)](){const _0x20ffc3=_0x528a9f;[[g],[C],[p]][_0x20ffc3(0x1d4)](_0x4ca1d1=>{const _0x365cf7=_0x20ffc3;this['_injector'][_0x365cf7(0x1ee)](_0x4ca1d1);});}[_0x528a9f(0x22a)](){const _0x5e2dd8=_0x528a9f;this[_0x5e2dd8(0x1fe)][_0x5e2dd8(0x1eb)](C),this[_0x5e2dd8(0x1fe)][_0x5e2dd8(0x1eb)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x528a9f(0x220),U),N(exports[_0x528a9f(0x1d7)],_0x528a9f(0x1cb),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x528a9f(0x1ff)](j['UniverThreadCommentUIPlugin'],b[_0x528a9f(0x207)],T[_0x528a9f(0x228)]),O(0x1,c[_0x528a9f(0x237)](c['Injector'])),O(0x2,c[_0x528a9f(0x1ef)])],exports[_0x528a9f(0x1d7)]);
|
|
1
|
+
'use strict';const _0x359eaa=_0x36fd;(function(_0x5c88e4,_0x3b5374){const _0xaea755=_0x36fd,_0x30459d=_0x5c88e4();while(!![]){try{const _0x3effb7=-parseInt(_0xaea755(0x13a))/0x1+-parseInt(_0xaea755(0x14f))/0x2*(parseInt(_0xaea755(0x15c))/0x3)+parseInt(_0xaea755(0x16c))/0x4+-parseInt(_0xaea755(0x10d))/0x5*(-parseInt(_0xaea755(0x16d))/0x6)+parseInt(_0xaea755(0x14d))/0x7*(parseInt(_0xaea755(0x15f))/0x8)+-parseInt(_0xaea755(0x110))/0x9+parseInt(_0xaea755(0x113))/0xa*(parseInt(_0xaea755(0x120))/0xb);if(_0x3effb7===_0x3b5374)break;else _0x30459d['push'](_0x30459d['shift']());}catch(_0x2d1beb){_0x30459d['push'](_0x30459d['shift']());}}}(_0x23d6,0xbe469));Object[_0x359eaa(0xff)](exports,Symbol[_0x359eaa(0x144)],{'value':_0x359eaa(0x14e)});const b=require(_0x359eaa(0x104)),T=require('@univerjs-pro/license'),c=require(_0x359eaa(0x103)),j=require('@univerjs/thread-comment-ui'),M=require(_0x359eaa(0x106)),w=require(_0x359eaa(0x116)),P=require('@univerjs/network'),U=_0x359eaa(0x109);var I=(_0xf26e87=>(_0xf26e87[_0xf26e87[_0x359eaa(0xf0)]=0x0]=_0x359eaa(0xf0),_0xf26e87[_0xf26e87[_0x359eaa(0x11f)]=0x1]='Solved',_0xf26e87[_0xf26e87[_0x359eaa(0x132)]=-0x1]='UNRECOGNIZED',_0xf26e87))(I||{}),v=(_0x155126=>(_0x155126[_0x155126[_0x359eaa(0x141)]=0x0]='Unknown',_0x155126[_0x155126[_0x359eaa(0x14c)]=0x1]=_0x359eaa(0x14c),_0x155126[_0x155126[_0x359eaa(0x107)]=0x2]=_0x359eaa(0x107),_0x155126[_0x155126[_0x359eaa(0x11b)]=0x3]=_0x359eaa(0x11b),_0x155126[_0x155126['Delete']=0x4]='Delete',_0x155126[_0x155126[_0x359eaa(0x124)]=0x5]=_0x359eaa(0x124),_0x155126[_0x155126['UNRECOGNIZED']=-0x1]=_0x359eaa(0x132),_0x155126))(v||{});const f=_0x729ad2=>c[_0x359eaa(0x164)](new Date(+_0x729ad2))[_0x359eaa(0xf5)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x51a645,_0x59c00d)=>{const _0x33024d=_0x359eaa,_0x237285=_0x51a645[_0x33024d(0x160)](c['UserManagerService']),_0x1ebf32=_0x51a645[_0x33024d(0x160)](P[_0x33024d(0x13f)]);_0x59c00d['forEach'](_0x573c82=>{const _0x50eddc=_0x33024d;_0x237285[_0x50eddc(0x168)](_0x573c82)&&_0x59c00d['delete'](_0x573c82);}),_0x59c00d['size']&&(await _0x1ebf32[_0x33024d(0x160)]('/universer-api/user/list',{'params':{'userIDs':[..._0x59c00d]}}))[_0x33024d(0xf9)][_0x33024d(0xfb)][_0x33024d(0x100)](_0x2d0e70=>{_0x2d0e70&&_0x237285['addUser'](_0x2d0e70);});};var $=Object[_0x359eaa(0x136)],E=(_0x5bda5,_0xfbe328,_0x19ad48,_0x5dfa1c)=>{const _0x31e73b=_0x359eaa;for(var _0x2ca9a8=_0x5dfa1c>0x1?void 0x0:_0x5dfa1c?$(_0xfbe328,_0x19ad48):_0xfbe328,_0x30b44c=_0x5bda5[_0x31e73b(0x114)]-0x1,_0x10ed05;_0x30b44c>=0x0;_0x30b44c--)(_0x10ed05=_0x5bda5[_0x30b44c])&&(_0x2ca9a8=_0x10ed05(_0x2ca9a8)||_0x2ca9a8);return _0x2ca9a8;},S=(_0x3d1c29,_0x1da384)=>(_0x3dcfe8,_0x2a09dc)=>_0x1da384(_0x3dcfe8,_0x2a09dc,_0x3d1c29);let p=class extends c[_0x359eaa(0x134)]{constructor(_0x1bc4be,_0xa2bc06,_0x5ceef0,_0x22da33){const _0x5e4698=_0x359eaa;super(),this[_0x5e4698(0x155)]=_0x1bc4be,this['_threadCommentModel']=_0xa2bc06,this[_0x5e4698(0x143)]=_0x5ceef0,this[_0x5e4698(0x121)]=_0x22da33,this[_0x5e4698(0x108)](),this['_initUserSync']();}[_0x359eaa(0x11e)](){const _0x326263=_0x359eaa;this[_0x326263(0x12f)](this[_0x326263(0x111)]['commentUpdate$'][_0x326263(0xf8)](w[_0x326263(0x166)](0x10))[_0x326263(0x119)](_0x433c1f=>{const _0x3d66e5=_0x326263,_0x5a9269=new Set();_0x433c1f[_0x3d66e5(0x100)](_0x244081=>{const _0x5583da=_0x3d66e5;switch(_0x244081[_0x5583da(0xfa)]){case'add':{const _0x11c141=_0x244081[_0x5583da(0x12a)][_0x5583da(0x13d)];_0x5a9269[_0x5583da(0x152)](_0x11c141);break;}}}),R(this[_0x3d66e5(0x121)],_0x5a9269);}));}[_0x359eaa(0x108)](){const _0xe84ff=_0x359eaa;this[_0xe84ff(0x12f)](this['_commentService']['commentUpdate$'][_0xe84ff(0x119)](async _0x5e2353=>{const _0x5dd938=_0xe84ff;var _0x36f976,_0x1e87fc,_0x24108a,_0x45bf88;const _0x29e205=(_0x36f976=this[_0x5dd938(0x111)][_0x5dd938(0x126)](_0x5e2353[_0x5dd938(0x15a)])['find'](_0x48978c=>_0x48978c['threadId']===_0x5e2353[_0x5dd938(0x14b)]))==null?void 0x0:_0x36f976[_0x5dd938(0x10f)];if(!_0x29e205)return;const {unitId:_0x285c61,subUnitId:_0x6695a8}=_0x29e205;switch(_0x5e2353[_0x5dd938(0x158)]&&this['_userService'][_0x5dd938(0xfc)](_0x5e2353[_0x5dd938(0x158)]),_0x5e2353['type']){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0x5dd938(0x148)](_0x285c61,_0x6695a8,{'unitId':_0x285c61,'subUnitId':_0x6695a8,'ref':'','id':_0x5e2353[_0x5dd938(0x118)],'dT':f(+_0x5e2353[_0x5dd938(0x12b)]),'threadId':_0x5e2353[_0x5dd938(0x14b)],'personId':(_0x24108a=(_0x1e87fc=_0x5e2353[_0x5dd938(0x158)])==null?void 0x0:_0x1e87fc[_0x5dd938(0xf4)])!=null?_0x24108a:_0x5e2353[_0x5dd938(0x10c)],'text':JSON[_0x5dd938(0x149)](_0x5e2353[_0x5dd938(0x13b)]),'parentId':_0x29e205['id']});break;}case v[_0x5dd938(0x140)]:{const _0x215244=this[_0x5dd938(0x111)][_0x5dd938(0x15e)](_0x285c61,_0x6695a8,_0x5e2353[_0x5dd938(0x118)]);_0x215244&&_0x215244[_0x5dd938(0x10a)]&&this[_0x5dd938(0x111)][_0x5dd938(0x165)](_0x285c61,_0x6695a8,_0x5e2353['replyId']);break;}case v[_0x5dd938(0x11b)]:{this['_threadCommentModel'][_0x5dd938(0xf3)](_0x285c61,_0x6695a8,{'commentId':_0x5e2353[_0x5dd938(0x118)],'text':JSON['parse'](_0x5e2353[_0x5dd938(0x13b)])});break;}case v[_0x5dd938(0x124)]:{const _0xf74777=(_0x45bf88=this['_threadCommentModel'][_0x5dd938(0x126)](_0x5e2353['unitId'])[_0x5dd938(0x138)](_0x54f3e7=>_0x54f3e7[_0x5dd938(0x14b)]===_0x5e2353[_0x5dd938(0x14b)]))==null?void 0x0:_0x45bf88[_0x5dd938(0x10f)];_0xf74777&&this[_0x5dd938(0x111)][_0x5dd938(0xf2)](_0x285c61,_0x6695a8,_0xf74777['id'],_0x5e2353[_0x5dd938(0x11a)]===I[_0x5dd938(0x11f)]);break;}}}));}};p=E([S(0x0,c[_0x359eaa(0x14a)](b[_0x359eaa(0x125)])),S(0x1,c[_0x359eaa(0x14a)](M['ThreadCommentModel'])),S(0x2,c[_0x359eaa(0x14a)](c[_0x359eaa(0x12c)])),S(0x3,c['Inject'](c['Injector']))],p);const q=_0x359eaa(0x129),D={};function _0x36fd(_0x104295,_0x373066){const _0x23d6cd=_0x23d6();return _0x36fd=function(_0x36fd7a,_0x57d016){_0x36fd7a=_0x36fd7a-0xf0;let _0x46895e=_0x23d6cd[_0x36fd7a];return _0x46895e;},_0x36fd(_0x104295,_0x373066);}var A=Object[_0x359eaa(0x136)],x=(_0x4d7388,_0x1bc795,_0x443f16,_0x99dd67)=>{for(var _0x3e5bac=_0x99dd67>0x1?void 0x0:_0x99dd67?A(_0x1bc795,_0x443f16):_0x1bc795,_0x5a28e1=_0x4d7388['length']-0x1,_0x5aea80;_0x5a28e1>=0x0;_0x5a28e1--)(_0x5aea80=_0x4d7388[_0x5a28e1])&&(_0x3e5bac=_0x5aea80(_0x3e5bac)||_0x3e5bac);return _0x3e5bac;},_=(_0x21ea27,_0x4db676)=>(_0x3515b1,_0x1e6906)=>_0x4db676(_0x3515b1,_0x1e6906,_0x21ea27);function Y(_0x473fcf,_0x354fc2){const _0x205bff=_0x359eaa,_0x2bfb5a=_0x473fcf[_0x205bff(0xfe)][0x0];return{..._0x354fc2,'id':_0x2bfb5a[_0x205bff(0x118)],'resolved':_0x473fcf[_0x205bff(0x11a)]===0x1,'dT':f(_0x2bfb5a[_0x205bff(0x12b)]),'personId':_0x2bfb5a[_0x205bff(0x10c)],'threadId':_0x2bfb5a[_0x205bff(0x14b)]};}function G(_0x1cf2e1,_0x1b794f,_0x57018d){const _0x2346dd=_0x359eaa;var _0x9d7907,_0x569f5a;if(((_0x569f5a=(_0x9d7907=_0x1cf2e1==null?void 0x0:_0x1cf2e1[_0x2346dd(0xfe)])==null?void 0x0:_0x9d7907[_0x2346dd(0x114)])!=null?_0x569f5a:0x0)>0x0){const _0x41b9ab=(_0x5e6f72,_0x51bb6d)=>({'id':_0x5e6f72[_0x2346dd(0x118)],'threadId':_0x5e6f72[_0x2346dd(0x14b)],'dT':f(_0x5e6f72[_0x2346dd(0x12b)]),'personId':_0x5e6f72[_0x2346dd(0x10c)],'resolved':_0x1cf2e1[_0x2346dd(0x11a)]===I['Solved'],'unitId':_0x1b794f,'subUnitId':_0x57018d,'text':JSON['parse'](_0x5e6f72[_0x2346dd(0x13b)]),'parentId':_0x51bb6d}),_0x20b4f6=_0x41b9ab(_0x1cf2e1['replies'][0x0]);return{..._0x20b4f6,'children':_0x1cf2e1[_0x2346dd(0xfe)][_0x2346dd(0x16e)](0x1)[_0x2346dd(0x115)](_0x1fe1e4=>_0x41b9ab(_0x1fe1e4,_0x20b4f6['id']))};}return null;}let g=class{constructor(_0x21907f,_0x2b9b08,_0x13867f,_0x33a4ee){const _0x470332=_0x359eaa;this[_0x470332(0x15d)]=_0x21907f,this[_0x470332(0x143)]=_0x2b9b08,this[_0x470332(0x102)]=_0x13867f,this['_injector']=_0x33a4ee;}async[_0x359eaa(0x148)](_0x53f684){const _0x253fce=_0x359eaa;var _0x117452,_0x2fada1;const {parentId:_0xeac7cc,unitId:_0x136a6d,text:_0x1822eb,threadId:_0xbd134}=_0x53f684,_0x142d74=(_0x2fada1=(_0x117452=_0x1822eb[_0x253fce(0x128)])==null?void 0x0:_0x117452['filter'](_0x4b0579=>_0x4b0579['rangeType']===c['CustomRangeType'][_0x253fce(0x13e)])['map'](_0x535b01=>_0x535b01[_0x253fce(0x16a)]))!=null?_0x2fada1:[],_0x3f3d8c=JSON['stringify'](_0x1822eb),_0x3ca266=(await this['_sessionService'][_0x253fce(0x117)](_0x136a6d))[_0x253fce(0x135)]();if(_0xeac7cc){const _0x1fa7a5={'memberId':_0x3ca266,'unitId':_0x136a6d,'content':_0x3f3d8c,'mention':_0x142d74,'threadId':_0xbd134},_0x4775ae=(await this['_httpService'][_0x253fce(0x162)](_0x253fce(0x101)+_0x136a6d+_0x253fce(0x11c),{'body':_0x1fa7a5}))[_0x253fce(0xf9)][_0x253fce(0x154)];return{..._0x53f684,'id':_0x4775ae['replyId'],'dT':c['dayjs'](+_0x4775ae['createTimestamp'])[_0x253fce(0xf5)](_0x253fce(0x105)),'personId':_0x4775ae[_0x253fce(0x10c)]};}else{const _0x785698={'memberId':_0x3ca266,'unitId':_0x136a6d,'content':_0x3f3d8c,'mention':_0x142d74},_0x159da4=await this[_0x253fce(0x15d)][_0x253fce(0x162)](_0x253fce(0x101)+_0x136a6d+_0x253fce(0x150),{'body':_0x785698});return Y(_0x159da4[_0x253fce(0xf9)][_0x253fce(0x10b)],_0x53f684);}}async[_0x359eaa(0xf3)](_0x587389){const _0x34cf8b=_0x359eaa;var _0x3bd984,_0x10dd0f;const {text:_0x211358,unitId:_0x4ff69e}=_0x587389,_0x129895=(_0x10dd0f=(_0x3bd984=_0x211358[_0x34cf8b(0x128)])==null?void 0x0:_0x3bd984[_0x34cf8b(0x137)](_0x4775ab=>_0x4775ab[_0x34cf8b(0xfd)]===c[_0x34cf8b(0x146)][_0x34cf8b(0x13e)])[_0x34cf8b(0x115)](_0x1becc3=>_0x1becc3[_0x34cf8b(0x16a)]))!=null?_0x10dd0f:[],_0x20b436=JSON[_0x34cf8b(0x12d)](_0x211358),_0x13a399=_0x587389[_0x34cf8b(0x14b)],_0x15e5c4=_0x587389['id'],_0x2f637e={'memberId':(await this[_0x34cf8b(0x102)][_0x34cf8b(0x117)](_0x4ff69e))[_0x34cf8b(0x135)](),'unitId':_0x4ff69e,'threadId':_0x13a399,'mention':_0x129895,'content':_0x20b436,'replyId':_0x15e5c4},_0x101313=await this[_0x34cf8b(0x15d)]['post'](_0x34cf8b(0x101)+_0x4ff69e+_0x34cf8b(0x112),{'body':_0x2f637e});return!_0x101313[_0x34cf8b(0xf9)]['error']||_0x101313[_0x34cf8b(0xf9)][_0x34cf8b(0x167)]['code']===0x1;}async[_0x359eaa(0xf2)](_0x3e954b){const _0x1f0f00=_0x359eaa,{unitId:_0x22a85c}=_0x3e954b,_0x36d0e0=_0x3e954b['threadId'],_0xa63acd={'memberId':this[_0x1f0f00(0x143)][_0x1f0f00(0x11d)]()['userID'],'unitId':_0x22a85c,'threadId':_0x36d0e0,'solved':_0x3e954b[_0x1f0f00(0x156)]?I['Solved']:I[_0x1f0f00(0xf0)]},_0x1bc35e=await this[_0x1f0f00(0x15d)]['post'](_0x1f0f00(0x101)+_0x22a85c+_0x1f0f00(0x10e),{'body':_0xa63acd});return!_0x1bc35e[_0x1f0f00(0xf9)][_0x1f0f00(0x167)]||_0x1bc35e[_0x1f0f00(0xf9)][_0x1f0f00(0x167)][_0x1f0f00(0xf6)]===0x1;}async[_0x359eaa(0x165)](_0x4cea89,_0x2a7822,_0x5837e3,_0x1c3619){const _0x3a6a80=_0x359eaa,_0x5d15e5={'memberId':(await this[_0x3a6a80(0x102)][_0x3a6a80(0x117)](_0x4cea89))['getMemberID'](),'threadId':_0x5837e3,'replyId':_0x1c3619,'unitId':_0x4cea89},_0x33dd7b=await this['_httpService'][_0x3a6a80(0x162)](_0x3a6a80(0x101)+_0x4cea89+'/delete',{'body':_0x5d15e5});return!_0x33dd7b[_0x3a6a80(0xf9)]['error']||_0x33dd7b[_0x3a6a80(0xf9)][_0x3a6a80(0x167)][_0x3a6a80(0xf6)]===0x1;}async[_0x359eaa(0x147)](_0x4362e2,_0x24a9c0,_0x58474c){const _0x40f16c=_0x359eaa,_0xd4abd2={'unitId':_0x4362e2,'threadId':_0x58474c},_0x1080d3=await this[_0x40f16c(0x15d)][_0x40f16c(0x162)]('/universer-api/comment/unit/'+_0x4362e2+'/list',{'body':_0xd4abd2}),_0x526b81=_0x58474c['map'](_0x9c531=>G(_0x1080d3[_0x40f16c(0xf9)][_0x40f16c(0x153)][_0x9c531],_0x4362e2,_0x24a9c0))[_0x40f16c(0x137)](Boolean);return Object[_0x40f16c(0xf7)](_0x1080d3[_0x40f16c(0xf9)][_0x40f16c(0xfb)])['forEach'](_0xb75ce9=>{const _0x128aac=_0x40f16c;this[_0x128aac(0x143)][_0x128aac(0xfc)](_0xb75ce9);}),_0x526b81;}[_0x359eaa(0x142)](_0xa0f214){const _0x1b6ebb=_0x359eaa;return{'id':_0xa0f214['id'],'threadId':_0xa0f214[_0x1b6ebb(0x14b)],'ref':_0xa0f214[_0x1b6ebb(0x139)]};}};g=x([_(0x0,c['Inject'](P['HTTPService'])),_(0x1,c[_0x359eaa(0x14a)](c[_0x359eaa(0x12c)])),_(0x2,c[_0x359eaa(0x14a)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c[_0x359eaa(0x130)]))],g);var H=Object[_0x359eaa(0x136)],J=(_0x1e58ed,_0x5b15a8,_0x199ec9,_0x55cd70)=>{const _0x1c88a7=_0x359eaa;for(var _0x29dc1a=_0x55cd70>0x1?void 0x0:_0x55cd70?H(_0x5b15a8,_0x199ec9):_0x5b15a8,_0xef5554=_0x1e58ed[_0x1c88a7(0x114)]-0x1,_0x47c30e;_0xef5554>=0x0;_0xef5554--)(_0x47c30e=_0x1e58ed[_0xef5554])&&(_0x29dc1a=_0x47c30e(_0x29dc1a)||_0x29dc1a);return _0x29dc1a;},y=(_0x3c6bdb,_0x19888f)=>(_0x2467e1,_0x2b6355)=>_0x19888f(_0x2467e1,_0x2b6355,_0x3c6bdb);let C=class extends c[_0x359eaa(0x134)]{constructor(_0x5008b2,_0x4d22a8){const _0x43b313=_0x359eaa;super(),this[_0x43b313(0x163)]=_0x5008b2,this[_0x43b313(0x161)]=_0x4d22a8,this[_0x43b313(0x122)]();}[_0x359eaa(0x122)](){const _0x33f5e3=_0x359eaa;this['_threadCommentDataSourceService'][_0x33f5e3(0x16b)]=this[_0x33f5e3(0x161)],this[_0x33f5e3(0x163)][_0x33f5e3(0x133)]=!0x1;}};function _0x23d6(){const _0xd328f7=['rangeType','replies','defineProperty','forEach','/universer-api/comment/unit/','_sessionService','@univerjs/core','@univerjs-pro/collaboration-client','YYYY/MM/DD\x20HH:mm','@univerjs/thread-comment','Reply','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parentId','comment','userId','4550FJSerE','/solved','root','7928163jLOwdY','_threadCommentModel','/edit','10CYkznj','length','map','rxjs','requireSession','replyId','subscribe','solved','Edit','/reply','getCurrentUser','_initUserSync','Solved','13553507MeLaLA','_injector','_initDataSource','onStarting','Solve','CommentService','getUnit','pluginName','customRanges','thread-comment-data-source.config','payload','createTimestamp','UserManagerService','stringify','UniverInstanceType','disposeWithMe','Injector','merge','UNRECOGNIZED','syncUpdateMutationToColla','Disposable','getMemberID','getOwnPropertyDescriptor','filter','find','ref','1496886YItiVU','content','DependentOn','personId','COMMENT','HTTPService','Delete','Unknown','saveCommentToSnapshot','_userService','toStringTag','UniverThreadCommentDataSourcePlugin','CustomRangeType','listComments','addComment','parse','Inject','threadId','Add','329gfuVfo','Module','53188uKWkUz','/add','IThreadCommentDataSourceService','add','comments','reply','_commentService','resolved','UNIVER_UNKNOWN','user','_config','unitId','UniverCollaborationClientPlugin','39HdUUqh','_httpService','getComment','188536xdtdRg','get','_threadCommentDataSource','post','_threadCommentDataSourceService','dayjs','deleteComment','bufferTime','error','getUser','setConfig','rangeId','dataSource','4550472dNvQLx','168moiDuk','slice','OpenOrReOpen','_configService','resolveComment','updateComment','userID','format','code','values','pipe','body','type','users','addUser'];_0x23d6=function(){return _0xd328f7;};return _0x23d6();}C=J([y(0x0,M[_0x359eaa(0x151)]),y(0x1,c[_0x359eaa(0x14a)](g))],C);var F=Object[_0x359eaa(0xff)],L=Object[_0x359eaa(0x136)],Z=(_0x13e869,_0x114a29,_0x12f7f4)=>_0x114a29 in _0x13e869?F(_0x13e869,_0x114a29,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x12f7f4}):_0x13e869[_0x114a29]=_0x12f7f4,W=(_0x356df3,_0x13ae2c,_0x18380d,_0x1266f8)=>{const _0xbc8cf9=_0x359eaa;for(var _0xae5df5=_0x1266f8>0x1?void 0x0:_0x1266f8?L(_0x13ae2c,_0x18380d):_0x13ae2c,_0x597c93=_0x356df3[_0xbc8cf9(0x114)]-0x1,_0x48ada2;_0x597c93>=0x0;_0x597c93--)(_0x48ada2=_0x356df3[_0x597c93])&&(_0xae5df5=_0x48ada2(_0xae5df5)||_0xae5df5);return _0xae5df5;},O=(_0x242978,_0x5e377e)=>(_0x3ad9b8,_0x488eee)=>_0x5e377e(_0x3ad9b8,_0x488eee,_0x242978),N=(_0x299bfd,_0x17ad3,_0x7f9fbb)=>Z(_0x299bfd,typeof _0x17ad3!='symbol'?_0x17ad3+'':_0x17ad3,_0x7f9fbb);exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x2cf942=D,_0x3cd05d,_0x1ca6c6){const _0x3c6b8a=_0x359eaa;super(),this[_0x3c6b8a(0x159)]=_0x2cf942,this['_injector']=_0x3cd05d,this[_0x3c6b8a(0xf1)]=_0x1ca6c6;const {..._0x24d9f0}=c[_0x3c6b8a(0x131)]({},D,this[_0x3c6b8a(0x159)]);this[_0x3c6b8a(0xf1)][_0x3c6b8a(0x169)](q,_0x24d9f0);}[_0x359eaa(0x123)](){const _0x3a6a9b=_0x359eaa;[[g],[C],[p]][_0x3a6a9b(0x100)](_0x517f55=>{const _0x44b8d2=_0x3a6a9b;this['_injector'][_0x44b8d2(0x152)](_0x517f55);});}['onReady'](){const _0x19b8e6=_0x359eaa;this[_0x19b8e6(0x121)][_0x19b8e6(0x160)](C),this[_0x19b8e6(0x121)]['get'](p);}},N(exports[_0x359eaa(0x145)],_0x359eaa(0x127),U),N(exports[_0x359eaa(0x145)],_0x359eaa(0xfa),c[_0x359eaa(0x12e)][_0x359eaa(0x157)]),exports[_0x359eaa(0x145)]=W([c[_0x359eaa(0x13c)](j['UniverThreadCommentUIPlugin'],b[_0x359eaa(0x15b)],T['UniverLicensePlugin']),O(0x1,c[_0x359eaa(0x14a)](c[_0x359eaa(0x130)])),O(0x2,c['IConfigService'])],exports[_0x359eaa(0x145)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x32e807=_0x4476;(function(_0x196e4b,_0x53f5c8){const _0x14fb33=_0x4476,_0x203376=_0x196e4b();while(!![]){try{const _0x514d95=-parseInt(_0x14fb33(0x170))/0x1+-parseInt(_0x14fb33(0x163))/0x2+parseInt(_0x14fb33(0x186))/0x3*(parseInt(_0x14fb33(0x14d))/0x4)+parseInt(_0x14fb33(0x167))/0x5*(-parseInt(_0x14fb33(0x1a1))/0x6)+parseInt(_0x14fb33(0x19e))/0x7*(-parseInt(_0x14fb33(0x182))/0x8)+parseInt(_0x14fb33(0x141))/0x9+-parseInt(_0x14fb33(0x19b))/0xa*(-parseInt(_0x14fb33(0x196))/0xb);if(_0x514d95===_0x53f5c8)break;else _0x203376['push'](_0x203376['shift']());}catch(_0x3a5873){_0x203376['push'](_0x203376['shift']());}}}(_0x1bce,0x647c4));import{CommentService as _0x12f7f5,CollaborationSessionService as _0x307a0a,UniverCollaborationClientPlugin as _0x40e60c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xcfd646}from'@univerjs-pro/license';import{dayjs as _0xa47b16,UserManagerService as _0x3a2f14,Inject as _0x2829ff,Injector as _0x2a4fc8,Disposable as _0x2e1c60,CustomRangeType as _0x5d6a87,UniverInstanceType as _0xd4c5e1,DependentOn as _0xe03605,IConfigService as _0x5c82ef,Plugin as _0x5d5f99,merge as _0x1eb38a}from'@univerjs/core';function _0x1bce(){const _0x2b93a9=['73636LCOYQF','userID','replyId','type','25uWlVaF','users','Solve','/reply','_threadCommentDataSourceService','setConfig','addUser','_initUserSync','_initDataSource','247326ttyqTa','format','add','forEach','/solved','syncUpdateMutationToColla','get','rangeType','stringify','find','/add','_config','resolveComment','_userService','_threadCommentDataSource','updateComment','UNIVER_UNKNOWN','defineProperty','641848dqYYHn','size','code','user','9pMggjU','_init','saveCommentToSnapshot','Solved','comment','unitId','userId','symbol','body','_httpService','getOwnPropertyDescriptor','comments','personId','Delete','createTimestamp','_sessionService','9097GZJPGv','addComment','Reply','onReady','commentUpdate$','5180XeWhLs','parse','/delete','7yTFnRh','solved','_threadCommentModel','85842lSwjTI','map','delete','_commentService','getUnit','/universer-api/user/list','570699YQiMKp','UNRECOGNIZED','reply','subscribe','_injector','requireSession','threadId','payload','/universer-api/comment/unit/','dataSource','YYYY/MM/DD\x20HH:mm','/edit','474268XPBGtP','length','rangeId','filter','deleteComment','OpenOrReOpen','customRanges','getMemberID','content','disposeWithMe','pluginName','COMMENT','Unknown','getUser','replies','error','values','listComments','Edit','Add','onStarting','post'];_0x1bce=function(){return _0x2b93a9;};return _0x1bce();}import{UniverThreadCommentUIPlugin as _0x2bfb63}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3cc6a8,IThreadCommentDataSourceService as _0x3047aa}from'@univerjs/thread-comment';import{bufferTime as _0x314186}from'rxjs';import{HTTPService as _0x382c33}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3a95a7=>(_0x3a95a7[_0x3a95a7[_0x32e807(0x152)]=0x0]='OpenOrReOpen',_0x3a95a7[_0x3a95a7[_0x32e807(0x189)]=0x1]=_0x32e807(0x189),_0x3a95a7[_0x3a95a7[_0x32e807(0x142)]=-0x1]=_0x32e807(0x142),_0x3a95a7))(I||{}),v=(_0x5a05af=>(_0x5a05af[_0x5a05af[_0x32e807(0x159)]=0x0]=_0x32e807(0x159),_0x5a05af[_0x5a05af[_0x32e807(0x160)]=0x1]=_0x32e807(0x160),_0x5a05af[_0x5a05af[_0x32e807(0x198)]=0x2]='Reply',_0x5a05af[_0x5a05af['Edit']=0x3]='Edit',_0x5a05af[_0x5a05af[_0x32e807(0x193)]=0x4]=_0x32e807(0x193),_0x5a05af[_0x5a05af[_0x32e807(0x169)]=0x5]='Solve',_0x5a05af[_0x5a05af[_0x32e807(0x142)]=-0x1]=_0x32e807(0x142),_0x5a05af))(v||{});const D=_0x91474b=>_0xa47b16(new Date(+_0x91474b))[_0x32e807(0x171)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4c3f24,_0x219510)=>{const _0x483072=_0x32e807,_0x4f5f0d=_0x4c3f24[_0x483072(0x176)](_0x3a2f14),_0x53b718=_0x4c3f24['get'](_0x382c33);_0x219510[_0x483072(0x173)](_0x2137f8=>{const _0x15a67d=_0x483072;_0x4f5f0d[_0x15a67d(0x15a)](_0x2137f8)&&_0x219510[_0x15a67d(0x1a3)](_0x2137f8);}),_0x219510[_0x483072(0x183)]&&(await _0x53b718[_0x483072(0x176)](_0x483072(0x140),{'params':{'userIDs':[..._0x219510]}}))[_0x483072(0x18e)][_0x483072(0x168)]['forEach'](_0x242d2e=>{const _0x50326b=_0x483072;_0x242d2e&&_0x4f5f0d[_0x50326b(0x16d)](_0x242d2e);});};var K=Object[_0x32e807(0x190)],V=(_0x154698,_0x4459af,_0x288650,_0x323267)=>{const _0xf55b8f=_0x32e807;for(var _0x3d4b83=_0x323267>0x1?void 0x0:_0x323267?K(_0x4459af,_0x288650):_0x4459af,_0x567c79=_0x154698[_0xf55b8f(0x14e)]-0x1,_0x237049;_0x567c79>=0x0;_0x567c79--)(_0x237049=_0x154698[_0x567c79])&&(_0x3d4b83=_0x237049(_0x3d4b83)||_0x3d4b83);return _0x3d4b83;},p=(_0x33dad5,_0x139e2c)=>(_0x399b49,_0x248c7b)=>_0x139e2c(_0x399b49,_0x248c7b,_0x33dad5);let S=class extends _0x2e1c60{constructor(_0x2cd379,_0x28a325,_0x1860e8,_0x241e90){const _0x459d88=_0x32e807;super(),this[_0x459d88(0x1a4)]=_0x2cd379,this[_0x459d88(0x1a0)]=_0x28a325,this[_0x459d88(0x17d)]=_0x1860e8,this[_0x459d88(0x145)]=_0x241e90,this[_0x459d88(0x187)](),this['_initUserSync']();}[_0x32e807(0x16e)](){const _0x5f18f0=_0x32e807;this[_0x5f18f0(0x156)](this[_0x5f18f0(0x1a0)]['commentUpdate$']['pipe'](_0x314186(0x10))[_0x5f18f0(0x144)](_0x4a9db1=>{const _0x21681b=new Set();_0x4a9db1['forEach'](_0x4d98b0=>{const _0x49f3ed=_0x4476;switch(_0x4d98b0[_0x49f3ed(0x166)]){case _0x49f3ed(0x172):{const _0xa701b3=_0x4d98b0[_0x49f3ed(0x148)][_0x49f3ed(0x192)];_0x21681b[_0x49f3ed(0x172)](_0xa701b3);break;}}}),B(this['_injector'],_0x21681b);}));}[_0x32e807(0x187)](){const _0x221b32=_0x32e807;this[_0x221b32(0x156)](this['_commentService'][_0x221b32(0x19a)][_0x221b32(0x144)](async _0x1ed94b=>{const _0x1e4463=_0x221b32;var _0x2c37f5,_0x2f251b,_0x3ef3e4,_0x17c7ca;const _0xaafa6d=(_0x2c37f5=this['_threadCommentModel'][_0x1e4463(0x13f)](_0x1ed94b[_0x1e4463(0x18b)])[_0x1e4463(0x179)](_0x2ace29=>_0x2ace29['threadId']===_0x1ed94b[_0x1e4463(0x147)]))==null?void 0x0:_0x2c37f5['root'];if(!_0xaafa6d)return;const {unitId:_0x4bce15,subUnitId:_0x5c9007}=_0xaafa6d;switch(_0x1ed94b[_0x1e4463(0x185)]&&this['_userService'][_0x1e4463(0x16d)](_0x1ed94b['user']),_0x1ed94b[_0x1e4463(0x166)]){case v[_0x1e4463(0x160)]:break;case v[_0x1e4463(0x198)]:{this[_0x1e4463(0x1a0)][_0x1e4463(0x197)](_0x4bce15,_0x5c9007,{'unitId':_0x4bce15,'subUnitId':_0x5c9007,'ref':'','id':_0x1ed94b[_0x1e4463(0x165)],'dT':D(+_0x1ed94b['createTimestamp']),'threadId':_0x1ed94b[_0x1e4463(0x147)],'personId':(_0x3ef3e4=(_0x2f251b=_0x1ed94b[_0x1e4463(0x185)])==null?void 0x0:_0x2f251b[_0x1e4463(0x164)])!=null?_0x3ef3e4:_0x1ed94b['userId'],'text':JSON['parse'](_0x1ed94b[_0x1e4463(0x155)]),'parentId':_0xaafa6d['id']});break;}case v['Delete']:{const _0x412077=this[_0x1e4463(0x1a0)]['getComment'](_0x4bce15,_0x5c9007,_0x1ed94b[_0x1e4463(0x165)]);_0x412077&&_0x412077['parentId']&&this[_0x1e4463(0x1a0)][_0x1e4463(0x151)](_0x4bce15,_0x5c9007,_0x1ed94b[_0x1e4463(0x165)]);break;}case v[_0x1e4463(0x15f)]:{this[_0x1e4463(0x1a0)][_0x1e4463(0x17f)](_0x4bce15,_0x5c9007,{'commentId':_0x1ed94b[_0x1e4463(0x165)],'text':JSON[_0x1e4463(0x19c)](_0x1ed94b[_0x1e4463(0x155)])});break;}case v['Solve']:{const _0x9d9a8f=(_0x17c7ca=this['_threadCommentModel'][_0x1e4463(0x13f)](_0x1ed94b['unitId'])[_0x1e4463(0x179)](_0x5e87b=>_0x5e87b[_0x1e4463(0x147)]===_0x1ed94b[_0x1e4463(0x147)]))==null?void 0x0:_0x17c7ca['root'];_0x9d9a8f&&this[_0x1e4463(0x1a0)][_0x1e4463(0x17c)](_0x4bce15,_0x5c9007,_0x9d9a8f['id'],_0x1ed94b[_0x1e4463(0x19f)]===I[_0x1e4463(0x189)]);break;}}}));}};S=V([p(0x0,_0x2829ff(_0x12f7f5)),p(0x1,_0x2829ff(_0x3cc6a8)),p(0x2,_0x2829ff(_0x3a2f14)),p(0x3,_0x2829ff(_0x2a4fc8))],S);function _0x4476(_0x2d2148,_0x46df1f){const _0x1bcefa=_0x1bce();return _0x4476=function(_0x44764f,_0x1aecd0){_0x44764f=_0x44764f-0x13f;let _0x1a0903=_0x1bcefa[_0x44764f];return _0x1a0903;},_0x4476(_0x2d2148,_0x46df1f);}const z='thread-comment-data-source.config',M={};var k=Object[_0x32e807(0x190)],Q=(_0x185955,_0x1b8521,_0x1aefcf,_0x40c70b)=>{const _0x23888e=_0x32e807;for(var _0x4cbd4e=_0x40c70b>0x1?void 0x0:_0x40c70b?k(_0x1b8521,_0x1aefcf):_0x1b8521,_0x3f9b78=_0x185955[_0x23888e(0x14e)]-0x1,_0x5d33bd;_0x3f9b78>=0x0;_0x3f9b78--)(_0x5d33bd=_0x185955[_0x3f9b78])&&(_0x4cbd4e=_0x5d33bd(_0x4cbd4e)||_0x4cbd4e);return _0x4cbd4e;},_=(_0x2dc7ed,_0x507198)=>(_0x391d90,_0x394dd3)=>_0x507198(_0x391d90,_0x394dd3,_0x2dc7ed);function X(_0x1080f0,_0x19b150){const _0x3a20bf=_0x32e807,_0x14717a=_0x1080f0['replies'][0x0];return{..._0x19b150,'id':_0x14717a[_0x3a20bf(0x165)],'resolved':_0x1080f0[_0x3a20bf(0x19f)]===0x1,'dT':D(_0x14717a[_0x3a20bf(0x194)]),'personId':_0x14717a['userId'],'threadId':_0x14717a[_0x3a20bf(0x147)]};}function ee(_0x14a8f9,_0x51acfd,_0x5c98eb){const _0x44ba27=_0x32e807;var _0x5490de,_0x51ce0e;if(((_0x51ce0e=(_0x5490de=_0x14a8f9==null?void 0x0:_0x14a8f9[_0x44ba27(0x15b)])==null?void 0x0:_0x5490de[_0x44ba27(0x14e)])!=null?_0x51ce0e:0x0)>0x0){const _0x30de3c=(_0x182695,_0x4ed258)=>({'id':_0x182695['replyId'],'threadId':_0x182695[_0x44ba27(0x147)],'dT':D(_0x182695[_0x44ba27(0x194)]),'personId':_0x182695['userId'],'resolved':_0x14a8f9[_0x44ba27(0x19f)]===I[_0x44ba27(0x189)],'unitId':_0x51acfd,'subUnitId':_0x5c98eb,'text':JSON[_0x44ba27(0x19c)](_0x182695[_0x44ba27(0x155)]),'parentId':_0x4ed258}),_0x4f224e=_0x30de3c(_0x14a8f9[_0x44ba27(0x15b)][0x0]);return{..._0x4f224e,'children':_0x14a8f9[_0x44ba27(0x15b)]['slice'](0x1)[_0x44ba27(0x1a2)](_0x258445=>_0x30de3c(_0x258445,_0x4f224e['id']))};}return null;}let f=class{constructor(_0x21c918,_0x5d2f6e,_0x49539f,_0x455f1f){const _0xe8d59e=_0x32e807;this[_0xe8d59e(0x18f)]=_0x21c918,this[_0xe8d59e(0x17d)]=_0x5d2f6e,this[_0xe8d59e(0x195)]=_0x49539f,this['_injector']=_0x455f1f;}async[_0x32e807(0x197)](_0x92fc1){const _0x25cd56=_0x32e807;var _0x3b05de,_0x2406a8;const {parentId:_0x24040e,unitId:_0x4d11c1,text:_0x456396,threadId:_0x5b115f}=_0x92fc1,_0xdfff1d=(_0x2406a8=(_0x3b05de=_0x456396[_0x25cd56(0x153)])==null?void 0x0:_0x3b05de['filter'](_0x5c41ca=>_0x5c41ca[_0x25cd56(0x177)]===_0x5d6a87[_0x25cd56(0x158)])[_0x25cd56(0x1a2)](_0x4dd386=>_0x4dd386[_0x25cd56(0x14f)]))!=null?_0x2406a8:[],_0x34eb7c=JSON[_0x25cd56(0x178)](_0x456396),_0x3643dc=(await this[_0x25cd56(0x195)]['requireSession'](_0x4d11c1))[_0x25cd56(0x154)]();if(_0x24040e){const _0x5445ab={'memberId':_0x3643dc,'unitId':_0x4d11c1,'content':_0x34eb7c,'mention':_0xdfff1d,'threadId':_0x5b115f},_0xf10b74=(await this[_0x25cd56(0x18f)][_0x25cd56(0x162)](_0x25cd56(0x149)+_0x4d11c1+_0x25cd56(0x16a),{'body':_0x5445ab}))[_0x25cd56(0x18e)][_0x25cd56(0x143)];return{..._0x92fc1,'id':_0xf10b74[_0x25cd56(0x165)],'dT':_0xa47b16(+_0xf10b74[_0x25cd56(0x194)])['format'](_0x25cd56(0x14b)),'personId':_0xf10b74[_0x25cd56(0x18c)]};}else{const _0x57ff6a={'memberId':_0x3643dc,'unitId':_0x4d11c1,'content':_0x34eb7c,'mention':_0xdfff1d},_0x3a3072=await this[_0x25cd56(0x18f)]['post'](_0x25cd56(0x149)+_0x4d11c1+_0x25cd56(0x17a),{'body':_0x57ff6a});return X(_0x3a3072[_0x25cd56(0x18e)][_0x25cd56(0x18a)],_0x92fc1);}}async['updateComment'](_0x55c954){const _0x45ea3d=_0x32e807;var _0x2e9d1f,_0xf1f4e9;const {text:_0x512393,unitId:_0x482091}=_0x55c954,_0x2066f5=(_0xf1f4e9=(_0x2e9d1f=_0x512393[_0x45ea3d(0x153)])==null?void 0x0:_0x2e9d1f[_0x45ea3d(0x150)](_0x104c9a=>_0x104c9a[_0x45ea3d(0x177)]===_0x5d6a87['COMMENT'])[_0x45ea3d(0x1a2)](_0x2e7e89=>_0x2e7e89[_0x45ea3d(0x14f)]))!=null?_0xf1f4e9:[],_0x422c9e=JSON['stringify'](_0x512393),_0x575cd7=_0x55c954[_0x45ea3d(0x147)],_0x2d5f61=_0x55c954['id'],_0x5b5b08={'memberId':(await this[_0x45ea3d(0x195)]['requireSession'](_0x482091))[_0x45ea3d(0x154)](),'unitId':_0x482091,'threadId':_0x575cd7,'mention':_0x2066f5,'content':_0x422c9e,'replyId':_0x2d5f61},_0x4c6a88=await this[_0x45ea3d(0x18f)][_0x45ea3d(0x162)](_0x45ea3d(0x149)+_0x482091+_0x45ea3d(0x14c),{'body':_0x5b5b08});return!_0x4c6a88[_0x45ea3d(0x18e)][_0x45ea3d(0x15c)]||_0x4c6a88['body'][_0x45ea3d(0x15c)][_0x45ea3d(0x184)]===0x1;}async[_0x32e807(0x17c)](_0x2f7daf){const _0x89ad27=_0x32e807,{unitId:_0x40e601}=_0x2f7daf,_0xea795b=_0x2f7daf[_0x89ad27(0x147)],_0x31ffa6={'memberId':this[_0x89ad27(0x17d)]['getCurrentUser']()[_0x89ad27(0x164)],'unitId':_0x40e601,'threadId':_0xea795b,'solved':_0x2f7daf['resolved']?I['Solved']:I[_0x89ad27(0x152)]},_0x141238=await this[_0x89ad27(0x18f)][_0x89ad27(0x162)]('/universer-api/comment/unit/'+_0x40e601+_0x89ad27(0x174),{'body':_0x31ffa6});return!_0x141238['body']['error']||_0x141238['body'][_0x89ad27(0x15c)][_0x89ad27(0x184)]===0x1;}async[_0x32e807(0x151)](_0x4bd2ae,_0x1b2fb7,_0x46c209,_0x419a4b){const _0x53c921=_0x32e807,_0x90d404={'memberId':(await this['_sessionService'][_0x53c921(0x146)](_0x4bd2ae))['getMemberID'](),'threadId':_0x46c209,'replyId':_0x419a4b,'unitId':_0x4bd2ae},_0x3b8728=await this[_0x53c921(0x18f)][_0x53c921(0x162)]('/universer-api/comment/unit/'+_0x4bd2ae+_0x53c921(0x19d),{'body':_0x90d404});return!_0x3b8728[_0x53c921(0x18e)][_0x53c921(0x15c)]||_0x3b8728[_0x53c921(0x18e)]['error'][_0x53c921(0x184)]===0x1;}async[_0x32e807(0x15e)](_0x3e1ab3,_0x548a8c,_0x125fd7){const _0x82f234=_0x32e807,_0x1bc0b3={'unitId':_0x3e1ab3,'threadId':_0x125fd7},_0x19b85d=await this['_httpService'][_0x82f234(0x162)]('/universer-api/comment/unit/'+_0x3e1ab3+'/list',{'body':_0x1bc0b3}),_0x301a64=_0x125fd7[_0x82f234(0x1a2)](_0x5e6c98=>ee(_0x19b85d[_0x82f234(0x18e)][_0x82f234(0x191)][_0x5e6c98],_0x3e1ab3,_0x548a8c))['filter'](Boolean);return Object[_0x82f234(0x15d)](_0x19b85d[_0x82f234(0x18e)][_0x82f234(0x168)])[_0x82f234(0x173)](_0xdf3a61=>{this['_userService']['addUser'](_0xdf3a61);}),_0x301a64;}[_0x32e807(0x188)](_0x4e174e){const _0x37d5ce=_0x32e807;return{'id':_0x4e174e['id'],'threadId':_0x4e174e[_0x37d5ce(0x147)],'ref':_0x4e174e['ref']};}};f=Q([_(0x0,_0x2829ff(_0x382c33)),_(0x1,_0x2829ff(_0x3a2f14)),_(0x2,_0x2829ff(_0x307a0a)),_(0x3,_0x2829ff(_0x2a4fc8))],f);var re=Object[_0x32e807(0x190)],te=(_0x27fe5e,_0x2986c1,_0x43f4e4,_0x375d69)=>{const _0x335fc1=_0x32e807;for(var _0x2a480e=_0x375d69>0x1?void 0x0:_0x375d69?re(_0x2986c1,_0x43f4e4):_0x2986c1,_0x4c574e=_0x27fe5e[_0x335fc1(0x14e)]-0x1,_0x17ac10;_0x4c574e>=0x0;_0x4c574e--)(_0x17ac10=_0x27fe5e[_0x4c574e])&&(_0x2a480e=_0x17ac10(_0x2a480e)||_0x2a480e);return _0x2a480e;},N=(_0x3dd2ac,_0x5151d6)=>(_0x4b3fe7,_0x55bc28)=>_0x5151d6(_0x4b3fe7,_0x55bc28,_0x3dd2ac);let g=class extends _0x2e1c60{constructor(_0x2a7e7e,_0x32d749){const _0x4ec5c7=_0x32e807;super(),this[_0x4ec5c7(0x16b)]=_0x2a7e7e,this['_threadCommentDataSource']=_0x32d749,this[_0x4ec5c7(0x16f)]();}[_0x32e807(0x16f)](){const _0x519bab=_0x32e807;this[_0x519bab(0x16b)][_0x519bab(0x14a)]=this[_0x519bab(0x17e)],this[_0x519bab(0x16b)][_0x519bab(0x175)]=!0x1;}};g=te([N(0x0,_0x3047aa),N(0x1,_0x2829ff(f))],g);var se=Object[_0x32e807(0x181)],oe=Object[_0x32e807(0x190)],ne=(_0x4d954b,_0x5666fe,_0x1fec59)=>_0x5666fe in _0x4d954b?se(_0x4d954b,_0x5666fe,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fec59}):_0x4d954b[_0x5666fe]=_0x1fec59,ie=(_0x55092d,_0x4d1819,_0x595d7d,_0x432597)=>{const _0x3255a7=_0x32e807;for(var _0x2b3eef=_0x432597>0x1?void 0x0:_0x432597?oe(_0x4d1819,_0x595d7d):_0x4d1819,_0x538402=_0x55092d[_0x3255a7(0x14e)]-0x1,_0x48f900;_0x538402>=0x0;_0x538402--)(_0x48f900=_0x55092d[_0x538402])&&(_0x2b3eef=_0x48f900(_0x2b3eef)||_0x2b3eef);return _0x2b3eef;},w=(_0x53b011,_0x2ecc64)=>(_0x5e7c5d,_0x2ee9b0)=>_0x2ecc64(_0x5e7c5d,_0x2ee9b0,_0x53b011),$=(_0x3411e5,_0x5b2c1f,_0x50df34)=>ne(_0x3411e5,typeof _0x5b2c1f!=_0x32e807(0x18d)?_0x5b2c1f+'':_0x5b2c1f,_0x50df34);let b=class extends _0x5d5f99{constructor(_0x5336b5=M,_0x136ddf,_0x57007d){const _0xb2cbb2=_0x32e807;super(),this['_config']=_0x5336b5,this[_0xb2cbb2(0x145)]=_0x136ddf,this['_configService']=_0x57007d;const {..._0x15e441}=_0x1eb38a({},M,this[_0xb2cbb2(0x17b)]);this['_configService'][_0xb2cbb2(0x16c)](z,_0x15e441);}[_0x32e807(0x161)](){const _0x59456f=_0x32e807;[[f],[g],[S]][_0x59456f(0x173)](_0x4667ce=>{const _0x5688b0=_0x59456f;this[_0x5688b0(0x145)][_0x5688b0(0x172)](_0x4667ce);});}[_0x32e807(0x199)](){const _0x59d14f=_0x32e807;this['_injector'][_0x59d14f(0x176)](g),this[_0x59d14f(0x145)][_0x59d14f(0x176)](S);}};$(b,_0x32e807(0x157),W),$(b,_0x32e807(0x166),_0xd4c5e1[_0x32e807(0x180)]),b=ie([_0xe03605(_0x2bfb63,_0x40e60c,_0xcfd646),w(0x1,_0x2829ff(_0x2a4fc8)),w(0x2,_0x5c82ef)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0xd82d43=_0x1572;(function(_0x5b5441,_0x36fc3e){const _0x3c9df9=_0x1572,_0x4768c6=_0x5b5441();while(!![]){try{const _0xbef156=parseInt(_0x3c9df9(0x126))/0x1*(parseInt(_0x3c9df9(0xf4))/0x2)+-parseInt(_0x3c9df9(0x13f))/0x3+-parseInt(_0x3c9df9(0x137))/0x4+-parseInt(_0x3c9df9(0x132))/0x5+parseInt(_0x3c9df9(0x107))/0x6*(-parseInt(_0x3c9df9(0x103))/0x7)+-parseInt(_0x3c9df9(0xf5))/0x8*(-parseInt(_0x3c9df9(0x12f))/0x9)+parseInt(_0x3c9df9(0x127))/0xa;if(_0xbef156===_0x36fc3e)break;else _0x4768c6['push'](_0x4768c6['shift']());}catch(_0x136615){_0x4768c6['push'](_0x4768c6['shift']());}}}(_0x3d56,0x524df));import{CommentService as _0x2afbd1,CollaborationSessionService as _0x309717,UniverCollaborationClientPlugin as _0x5e0c12}from'@univerjs-pro/collaboration-client';function _0x3d56(){const _0x2c5c0c=['comments','unitId','getMemberID','content','replyId','user','596253qhlIDC','_userService','YYYY/MM/DD\x20HH:mm','length','18PovyPk','_configService','parentId','subscribe','Delete','_sessionService','listComments','addComment','rangeId','/list','/edit','post','getUnit','disposeWithMe','code','_threadCommentDataSourceService','_commentService','addUser','deleteComment','symbol','setConfig','syncUpdateMutationToColla','/universer-api/user/list','Add','Reply','body','payload','_initDataSource','Edit','_initUserSync','COMMENT','1641JrHVBX','12962320WRGTXQ','personId','_init','UNRECOGNIZED','getComment','customRanges','_threadCommentModel','thread-comment-data-source.config','8586PXQyRI','commentUpdate$','_injector','901470WLWzAq','dataSource','solved','saveCommentToSnapshot','userId','106868DixNtn','Solved','createTimestamp','Solve','format','root','resolved','rangeType','1785408wzthXx','resolveComment','/reply','_config','pluginName','replies','values','map','getOwnPropertyDescriptor','error','parse','stringify','get','/universer-api/comment/unit/','/delete','OpenOrReOpen','onStarting','_httpService','userID','Unknown','find','filter','add','defineProperty','users','pipe','forEach','type','62JHcdZg','400GvExMy','delete','threadId','updateComment','requireSession','/solved','onReady','_threadCommentDataSource'];_0x3d56=function(){return _0x2c5c0c;};return _0x3d56();}import{UniverLicensePlugin as _0x4d7a5a}from'@univerjs-pro/license';import{dayjs as _0xd05752,UserManagerService as _0x41b9cd,Inject as _0x5d8c37,Injector as _0x4cf3db,Disposable as _0x275151,CustomRangeType as _0x181f60,UniverInstanceType as _0xf2bc01,DependentOn as _0x29bf69,IConfigService as _0x6c6242,Plugin as _0x36e53a,merge as _0x438ac3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x43ebb9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x271da6,IThreadCommentDataSourceService as _0x815dfc}from'@univerjs/thread-comment';import{bufferTime as _0x2dd4ef}from'rxjs';import{HTTPService as _0x54b85d}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5134d7=>(_0x5134d7[_0x5134d7[_0xd82d43(0x14e)]=0x0]='OpenOrReOpen',_0x5134d7[_0x5134d7[_0xd82d43(0x138)]=0x1]=_0xd82d43(0x138),_0x5134d7[_0x5134d7['UNRECOGNIZED']=-0x1]=_0xd82d43(0x12a),_0x5134d7))(I||{}),v=(_0xff5a21=>(_0xff5a21[_0xff5a21[_0xd82d43(0xeb)]=0x0]='Unknown',_0xff5a21[_0xff5a21[_0xd82d43(0x11e)]=0x1]='Add',_0xff5a21[_0xff5a21[_0xd82d43(0x11f)]=0x2]=_0xd82d43(0x11f),_0xff5a21[_0xff5a21[_0xd82d43(0x123)]=0x3]='Edit',_0xff5a21[_0xff5a21[_0xd82d43(0x10b)]=0x4]=_0xd82d43(0x10b),_0xff5a21[_0xff5a21[_0xd82d43(0x13a)]=0x5]=_0xd82d43(0x13a),_0xff5a21[_0xff5a21[_0xd82d43(0x12a)]=-0x1]=_0xd82d43(0x12a),_0xff5a21))(v||{});const D=_0x32dae8=>_0xd05752(new Date(+_0x32dae8))[_0xd82d43(0x13b)](_0xd82d43(0x105)),B=async(_0x530237,_0x1f227e)=>{const _0x540796=_0xd82d43,_0x304797=_0x530237[_0x540796(0x14b)](_0x41b9cd),_0x4f22b0=_0x530237[_0x540796(0x14b)](_0x54b85d);_0x1f227e[_0x540796(0xf2)](_0x59e5b5=>{const _0x3b77ff=_0x540796;_0x304797['getUser'](_0x59e5b5)&&_0x1f227e[_0x3b77ff(0xf6)](_0x59e5b5);}),_0x1f227e['size']&&(await _0x4f22b0[_0x540796(0x14b)](_0x540796(0x11d),{'params':{'userIDs':[..._0x1f227e]}}))[_0x540796(0x120)][_0x540796(0xf0)]['forEach'](_0x4e76a1=>{const _0x3731f3=_0x540796;_0x4e76a1&&_0x304797[_0x3731f3(0x118)](_0x4e76a1);});};var K=Object[_0xd82d43(0x147)],V=(_0x4495f8,_0x45ba53,_0x4a91f5,_0x5af961)=>{for(var _0x2170b0=_0x5af961>0x1?void 0x0:_0x5af961?K(_0x45ba53,_0x4a91f5):_0x45ba53,_0x1994ac=_0x4495f8['length']-0x1,_0x3c338b;_0x1994ac>=0x0;_0x1994ac--)(_0x3c338b=_0x4495f8[_0x1994ac])&&(_0x2170b0=_0x3c338b(_0x2170b0)||_0x2170b0);return _0x2170b0;},p=(_0x442411,_0x2414d9)=>(_0x2c58d5,_0x56d89f)=>_0x2414d9(_0x2c58d5,_0x56d89f,_0x442411);let S=class extends _0x275151{constructor(_0x5692e6,_0x509ecb,_0x4e2a48,_0x3098bb){const _0x48b0cf=_0xd82d43;super(),this[_0x48b0cf(0x117)]=_0x5692e6,this[_0x48b0cf(0x12d)]=_0x509ecb,this[_0x48b0cf(0x104)]=_0x4e2a48,this[_0x48b0cf(0x131)]=_0x3098bb,this[_0x48b0cf(0x129)](),this[_0x48b0cf(0x124)]();}[_0xd82d43(0x124)](){const _0x27fe34=_0xd82d43;this[_0x27fe34(0x114)](this['_threadCommentModel'][_0x27fe34(0x130)][_0x27fe34(0xf1)](_0x2dd4ef(0x10))['subscribe'](_0x434863=>{const _0x114694=_0x27fe34,_0x2b5227=new Set();_0x434863[_0x114694(0xf2)](_0x247e9e=>{const _0x471372=_0x114694;switch(_0x247e9e[_0x471372(0xf3)]){case _0x471372(0xee):{const _0x466f50=_0x247e9e[_0x471372(0x121)][_0x471372(0x128)];_0x2b5227[_0x471372(0xee)](_0x466f50);break;}}}),B(this['_injector'],_0x2b5227);}));}['_init'](){const _0x281b0d=_0xd82d43;this[_0x281b0d(0x114)](this[_0x281b0d(0x117)]['commentUpdate$'][_0x281b0d(0x10a)](async _0xb56ee=>{const _0x1ea863=_0x281b0d;var _0x25780a,_0x5d58cd,_0x3047a2,_0x2b773a;const _0x3418ab=(_0x25780a=this[_0x1ea863(0x12d)]['getUnit'](_0xb56ee[_0x1ea863(0xfe)])[_0x1ea863(0xec)](_0x5d50eb=>_0x5d50eb[_0x1ea863(0xf7)]===_0xb56ee[_0x1ea863(0xf7)]))==null?void 0x0:_0x25780a[_0x1ea863(0x13c)];if(!_0x3418ab)return;const {unitId:_0x115efd,subUnitId:_0x157cde}=_0x3418ab;switch(_0xb56ee[_0x1ea863(0x102)]&&this[_0x1ea863(0x104)]['addUser'](_0xb56ee[_0x1ea863(0x102)]),_0xb56ee[_0x1ea863(0xf3)]){case v[_0x1ea863(0x11e)]:break;case v[_0x1ea863(0x11f)]:{this[_0x1ea863(0x12d)][_0x1ea863(0x10e)](_0x115efd,_0x157cde,{'unitId':_0x115efd,'subUnitId':_0x157cde,'ref':'','id':_0xb56ee[_0x1ea863(0x101)],'dT':D(+_0xb56ee[_0x1ea863(0x139)]),'threadId':_0xb56ee[_0x1ea863(0xf7)],'personId':(_0x3047a2=(_0x5d58cd=_0xb56ee['user'])==null?void 0x0:_0x5d58cd[_0x1ea863(0x151)])!=null?_0x3047a2:_0xb56ee[_0x1ea863(0x136)],'text':JSON['parse'](_0xb56ee['content']),'parentId':_0x3418ab['id']});break;}case v[_0x1ea863(0x10b)]:{const _0x2f354c=this[_0x1ea863(0x12d)][_0x1ea863(0x12b)](_0x115efd,_0x157cde,_0xb56ee[_0x1ea863(0x101)]);_0x2f354c&&_0x2f354c[_0x1ea863(0x109)]&&this[_0x1ea863(0x12d)]['deleteComment'](_0x115efd,_0x157cde,_0xb56ee['replyId']);break;}case v[_0x1ea863(0x123)]:{this[_0x1ea863(0x12d)][_0x1ea863(0xf8)](_0x115efd,_0x157cde,{'commentId':_0xb56ee[_0x1ea863(0x101)],'text':JSON[_0x1ea863(0x149)](_0xb56ee['content'])});break;}case v['Solve']:{const _0x268532=(_0x2b773a=this['_threadCommentModel'][_0x1ea863(0x113)](_0xb56ee['unitId'])[_0x1ea863(0xec)](_0x1d0a84=>_0x1d0a84[_0x1ea863(0xf7)]===_0xb56ee[_0x1ea863(0xf7)]))==null?void 0x0:_0x2b773a[_0x1ea863(0x13c)];_0x268532&&this[_0x1ea863(0x12d)][_0x1ea863(0x140)](_0x115efd,_0x157cde,_0x268532['id'],_0xb56ee[_0x1ea863(0x134)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x5d8c37(_0x2afbd1)),p(0x1,_0x5d8c37(_0x271da6)),p(0x2,_0x5d8c37(_0x41b9cd)),p(0x3,_0x5d8c37(_0x4cf3db))],S);const z=_0xd82d43(0x12e),M={};function _0x1572(_0x3327ea,_0x4c73b8){const _0x3d5678=_0x3d56();return _0x1572=function(_0x1572ec,_0x528845){_0x1572ec=_0x1572ec-0xeb;let _0x5cd1b8=_0x3d5678[_0x1572ec];return _0x5cd1b8;},_0x1572(_0x3327ea,_0x4c73b8);}var k=Object[_0xd82d43(0x147)],Q=(_0x25e839,_0x1eab5a,_0x8ce6d6,_0x1ddd4b)=>{for(var _0x502771=_0x1ddd4b>0x1?void 0x0:_0x1ddd4b?k(_0x1eab5a,_0x8ce6d6):_0x1eab5a,_0x2caf64=_0x25e839['length']-0x1,_0x560723;_0x2caf64>=0x0;_0x2caf64--)(_0x560723=_0x25e839[_0x2caf64])&&(_0x502771=_0x560723(_0x502771)||_0x502771);return _0x502771;},_=(_0x49f117,_0x164e7e)=>(_0x8c55ef,_0x3bf822)=>_0x164e7e(_0x8c55ef,_0x3bf822,_0x49f117);function X(_0x1b5380,_0x3d7683){const _0x2a729c=_0xd82d43,_0x547be9=_0x1b5380[_0x2a729c(0x144)][0x0];return{..._0x3d7683,'id':_0x547be9[_0x2a729c(0x101)],'resolved':_0x1b5380[_0x2a729c(0x134)]===0x1,'dT':D(_0x547be9[_0x2a729c(0x139)]),'personId':_0x547be9[_0x2a729c(0x136)],'threadId':_0x547be9[_0x2a729c(0xf7)]};}function ee(_0x59c2f1,_0x144c2a,_0x12a879){const _0x41aee2=_0xd82d43;var _0x264ecc,_0x5346b0;if(((_0x5346b0=(_0x264ecc=_0x59c2f1==null?void 0x0:_0x59c2f1[_0x41aee2(0x144)])==null?void 0x0:_0x264ecc[_0x41aee2(0x106)])!=null?_0x5346b0:0x0)>0x0){const _0x7b37d=(_0x41b163,_0x4fcd08)=>({'id':_0x41b163[_0x41aee2(0x101)],'threadId':_0x41b163[_0x41aee2(0xf7)],'dT':D(_0x41b163['createTimestamp']),'personId':_0x41b163[_0x41aee2(0x136)],'resolved':_0x59c2f1[_0x41aee2(0x134)]===I[_0x41aee2(0x138)],'unitId':_0x144c2a,'subUnitId':_0x12a879,'text':JSON[_0x41aee2(0x149)](_0x41b163[_0x41aee2(0x100)]),'parentId':_0x4fcd08}),_0x3a2fa2=_0x7b37d(_0x59c2f1[_0x41aee2(0x144)][0x0]);return{..._0x3a2fa2,'children':_0x59c2f1[_0x41aee2(0x144)]['slice'](0x1)['map'](_0x3f2457=>_0x7b37d(_0x3f2457,_0x3a2fa2['id']))};}return null;}let f=class{constructor(_0x1dbfc0,_0x1257a3,_0x4f3416,_0x5103c2){const _0x5ca99d=_0xd82d43;this[_0x5ca99d(0x150)]=_0x1dbfc0,this[_0x5ca99d(0x104)]=_0x1257a3,this[_0x5ca99d(0x10c)]=_0x4f3416,this[_0x5ca99d(0x131)]=_0x5103c2;}async[_0xd82d43(0x10e)](_0x525e3d){const _0x45c37a=_0xd82d43;var _0x6d07ab,_0x48ef73;const {parentId:_0x41bcbf,unitId:_0x2a996d,text:_0x5b35db,threadId:_0x5d0217}=_0x525e3d,_0x18bfeb=(_0x48ef73=(_0x6d07ab=_0x5b35db[_0x45c37a(0x12c)])==null?void 0x0:_0x6d07ab[_0x45c37a(0xed)](_0x21321e=>_0x21321e[_0x45c37a(0x13e)]===_0x181f60[_0x45c37a(0x125)])[_0x45c37a(0x146)](_0x15a50f=>_0x15a50f['rangeId']))!=null?_0x48ef73:[],_0x38ced0=JSON[_0x45c37a(0x14a)](_0x5b35db),_0x4bcc49=(await this[_0x45c37a(0x10c)][_0x45c37a(0xf9)](_0x2a996d))['getMemberID']();if(_0x41bcbf){const _0x51407f={'memberId':_0x4bcc49,'unitId':_0x2a996d,'content':_0x38ced0,'mention':_0x18bfeb,'threadId':_0x5d0217},_0x52fafa=(await this[_0x45c37a(0x150)]['post'](_0x45c37a(0x14c)+_0x2a996d+_0x45c37a(0x141),{'body':_0x51407f}))['body']['reply'];return{..._0x525e3d,'id':_0x52fafa[_0x45c37a(0x101)],'dT':_0xd05752(+_0x52fafa[_0x45c37a(0x139)])[_0x45c37a(0x13b)](_0x45c37a(0x105)),'personId':_0x52fafa[_0x45c37a(0x136)]};}else{const _0x159e48={'memberId':_0x4bcc49,'unitId':_0x2a996d,'content':_0x38ced0,'mention':_0x18bfeb},_0x36fa45=await this['_httpService'][_0x45c37a(0x112)]('/universer-api/comment/unit/'+_0x2a996d+'/add',{'body':_0x159e48});return X(_0x36fa45[_0x45c37a(0x120)]['comment'],_0x525e3d);}}async['updateComment'](_0x2b106a){const _0x5e2e5d=_0xd82d43;var _0x445c6f,_0x2dfa91;const {text:_0x45aaf8,unitId:_0x517b32}=_0x2b106a,_0x1d6e6d=(_0x2dfa91=(_0x445c6f=_0x45aaf8[_0x5e2e5d(0x12c)])==null?void 0x0:_0x445c6f[_0x5e2e5d(0xed)](_0x44b896=>_0x44b896['rangeType']===_0x181f60[_0x5e2e5d(0x125)])[_0x5e2e5d(0x146)](_0xbaa41d=>_0xbaa41d[_0x5e2e5d(0x10f)]))!=null?_0x2dfa91:[],_0x4d8653=JSON[_0x5e2e5d(0x14a)](_0x45aaf8),_0x367182=_0x2b106a[_0x5e2e5d(0xf7)],_0x2ba288=_0x2b106a['id'],_0x11a720={'memberId':(await this[_0x5e2e5d(0x10c)]['requireSession'](_0x517b32))[_0x5e2e5d(0xff)](),'unitId':_0x517b32,'threadId':_0x367182,'mention':_0x1d6e6d,'content':_0x4d8653,'replyId':_0x2ba288},_0x1b9c67=await this['_httpService']['post'](_0x5e2e5d(0x14c)+_0x517b32+_0x5e2e5d(0x111),{'body':_0x11a720});return!_0x1b9c67[_0x5e2e5d(0x120)]['error']||_0x1b9c67[_0x5e2e5d(0x120)][_0x5e2e5d(0x148)][_0x5e2e5d(0x115)]===0x1;}async[_0xd82d43(0x140)](_0x4893f4){const _0x519710=_0xd82d43,{unitId:_0x466518}=_0x4893f4,_0x47b68c=_0x4893f4[_0x519710(0xf7)],_0x274a1b={'memberId':this['_userService']['getCurrentUser']()[_0x519710(0x151)],'unitId':_0x466518,'threadId':_0x47b68c,'solved':_0x4893f4[_0x519710(0x13d)]?I[_0x519710(0x138)]:I[_0x519710(0x14e)]},_0x606572=await this[_0x519710(0x150)][_0x519710(0x112)]('/universer-api/comment/unit/'+_0x466518+_0x519710(0xfa),{'body':_0x274a1b});return!_0x606572['body'][_0x519710(0x148)]||_0x606572[_0x519710(0x120)][_0x519710(0x148)][_0x519710(0x115)]===0x1;}async[_0xd82d43(0x119)](_0x26b4a3,_0x123483,_0x4adb8a,_0xf9cfad){const _0x4c9b52=_0xd82d43,_0x1d428d={'memberId':(await this[_0x4c9b52(0x10c)][_0x4c9b52(0xf9)](_0x26b4a3))[_0x4c9b52(0xff)](),'threadId':_0x4adb8a,'replyId':_0xf9cfad,'unitId':_0x26b4a3},_0x3f0bfd=await this[_0x4c9b52(0x150)][_0x4c9b52(0x112)](_0x4c9b52(0x14c)+_0x26b4a3+_0x4c9b52(0x14d),{'body':_0x1d428d});return!_0x3f0bfd[_0x4c9b52(0x120)][_0x4c9b52(0x148)]||_0x3f0bfd['body'][_0x4c9b52(0x148)][_0x4c9b52(0x115)]===0x1;}async[_0xd82d43(0x10d)](_0x577f57,_0x52d722,_0xe7beeb){const _0x4ff479=_0xd82d43,_0x245c77={'unitId':_0x577f57,'threadId':_0xe7beeb},_0x20f99a=await this[_0x4ff479(0x150)][_0x4ff479(0x112)](_0x4ff479(0x14c)+_0x577f57+_0x4ff479(0x110),{'body':_0x245c77}),_0x3de7a1=_0xe7beeb[_0x4ff479(0x146)](_0x45f73e=>ee(_0x20f99a[_0x4ff479(0x120)][_0x4ff479(0xfd)][_0x45f73e],_0x577f57,_0x52d722))[_0x4ff479(0xed)](Boolean);return Object[_0x4ff479(0x145)](_0x20f99a[_0x4ff479(0x120)][_0x4ff479(0xf0)])['forEach'](_0x403c56=>{const _0x1e968c=_0x4ff479;this[_0x1e968c(0x104)][_0x1e968c(0x118)](_0x403c56);}),_0x3de7a1;}[_0xd82d43(0x135)](_0x5b8d97){const _0x59cd6a=_0xd82d43;return{'id':_0x5b8d97['id'],'threadId':_0x5b8d97[_0x59cd6a(0xf7)],'ref':_0x5b8d97['ref']};}};f=Q([_(0x0,_0x5d8c37(_0x54b85d)),_(0x1,_0x5d8c37(_0x41b9cd)),_(0x2,_0x5d8c37(_0x309717)),_(0x3,_0x5d8c37(_0x4cf3db))],f);var re=Object[_0xd82d43(0x147)],te=(_0x4fad81,_0x1ab5c0,_0x1ba570,_0x46bdf7)=>{const _0x52bbe1=_0xd82d43;for(var _0x2e1037=_0x46bdf7>0x1?void 0x0:_0x46bdf7?re(_0x1ab5c0,_0x1ba570):_0x1ab5c0,_0x284fa9=_0x4fad81[_0x52bbe1(0x106)]-0x1,_0xb47cff;_0x284fa9>=0x0;_0x284fa9--)(_0xb47cff=_0x4fad81[_0x284fa9])&&(_0x2e1037=_0xb47cff(_0x2e1037)||_0x2e1037);return _0x2e1037;},N=(_0x1f9535,_0x51001e)=>(_0x3ffdbb,_0x4962bb)=>_0x51001e(_0x3ffdbb,_0x4962bb,_0x1f9535);let g=class extends _0x275151{constructor(_0x2ba7c3,_0x2d6df2){const _0x23c949=_0xd82d43;super(),this[_0x23c949(0x116)]=_0x2ba7c3,this['_threadCommentDataSource']=_0x2d6df2,this[_0x23c949(0x122)]();}[_0xd82d43(0x122)](){const _0x2ca8e6=_0xd82d43;this[_0x2ca8e6(0x116)][_0x2ca8e6(0x133)]=this[_0x2ca8e6(0xfc)],this['_threadCommentDataSourceService'][_0x2ca8e6(0x11c)]=!0x1;}};g=te([N(0x0,_0x815dfc),N(0x1,_0x5d8c37(f))],g);var se=Object[_0xd82d43(0xef)],oe=Object[_0xd82d43(0x147)],ne=(_0x12af1d,_0x1366f5,_0x179e08)=>_0x1366f5 in _0x12af1d?se(_0x12af1d,_0x1366f5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x179e08}):_0x12af1d[_0x1366f5]=_0x179e08,ie=(_0x3c2b43,_0x21e10a,_0x515854,_0x47b6a1)=>{const _0x4831e8=_0xd82d43;for(var _0x1bc770=_0x47b6a1>0x1?void 0x0:_0x47b6a1?oe(_0x21e10a,_0x515854):_0x21e10a,_0x4ba224=_0x3c2b43[_0x4831e8(0x106)]-0x1,_0x49c03d;_0x4ba224>=0x0;_0x4ba224--)(_0x49c03d=_0x3c2b43[_0x4ba224])&&(_0x1bc770=_0x49c03d(_0x1bc770)||_0x1bc770);return _0x1bc770;},w=(_0xfc2d1a,_0x5568de)=>(_0x1a761a,_0x391a44)=>_0x5568de(_0x1a761a,_0x391a44,_0xfc2d1a),$=(_0x72e15c,_0x4ba227,_0x3c9664)=>ne(_0x72e15c,typeof _0x4ba227!=_0xd82d43(0x11a)?_0x4ba227+'':_0x4ba227,_0x3c9664);let b=class extends _0x36e53a{constructor(_0xfa57f2=M,_0x419983,_0x2f46ef){const _0x3b0ad6=_0xd82d43;super(),this[_0x3b0ad6(0x142)]=_0xfa57f2,this['_injector']=_0x419983,this[_0x3b0ad6(0x108)]=_0x2f46ef;const {..._0x2da69e}=_0x438ac3({},M,this['_config']);this[_0x3b0ad6(0x108)][_0x3b0ad6(0x11b)](z,_0x2da69e);}[_0xd82d43(0x14f)](){const _0x3ec210=_0xd82d43;[[f],[g],[S]][_0x3ec210(0xf2)](_0x19d377=>{const _0x28ccd0=_0x3ec210;this[_0x28ccd0(0x131)][_0x28ccd0(0xee)](_0x19d377);});}[_0xd82d43(0xfb)](){const _0x58524b=_0xd82d43;this[_0x58524b(0x131)][_0x58524b(0x14b)](g),this[_0x58524b(0x131)]['get'](S);}};$(b,_0xd82d43(0x143),W),$(b,_0xd82d43(0xf3),_0xf2bc01['UNIVER_UNKNOWN']),b=ie([_0x29bf69(_0x43ebb9,_0x5e0c12,_0x4d7a5a),w(0x1,_0x5d8c37(_0x4cf3db)),w(0x2,_0x6c6242)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x32e807=_0x4476;(function(_0x196e4b,_0x53f5c8){const _0x14fb33=_0x4476,_0x203376=_0x196e4b();while(!![]){try{const _0x514d95=-parseInt(_0x14fb33(0x170))/0x1+-parseInt(_0x14fb33(0x163))/0x2+parseInt(_0x14fb33(0x186))/0x3*(parseInt(_0x14fb33(0x14d))/0x4)+parseInt(_0x14fb33(0x167))/0x5*(-parseInt(_0x14fb33(0x1a1))/0x6)+parseInt(_0x14fb33(0x19e))/0x7*(-parseInt(_0x14fb33(0x182))/0x8)+parseInt(_0x14fb33(0x141))/0x9+-parseInt(_0x14fb33(0x19b))/0xa*(-parseInt(_0x14fb33(0x196))/0xb);if(_0x514d95===_0x53f5c8)break;else _0x203376['push'](_0x203376['shift']());}catch(_0x3a5873){_0x203376['push'](_0x203376['shift']());}}}(_0x1bce,0x647c4));import{CommentService as _0x12f7f5,CollaborationSessionService as _0x307a0a,UniverCollaborationClientPlugin as _0x40e60c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xcfd646}from'@univerjs-pro/license';import{dayjs as _0xa47b16,UserManagerService as _0x3a2f14,Inject as _0x2829ff,Injector as _0x2a4fc8,Disposable as _0x2e1c60,CustomRangeType as _0x5d6a87,UniverInstanceType as _0xd4c5e1,DependentOn as _0xe03605,IConfigService as _0x5c82ef,Plugin as _0x5d5f99,merge as _0x1eb38a}from'@univerjs/core';function _0x1bce(){const _0x2b93a9=['73636LCOYQF','userID','replyId','type','25uWlVaF','users','Solve','/reply','_threadCommentDataSourceService','setConfig','addUser','_initUserSync','_initDataSource','247326ttyqTa','format','add','forEach','/solved','syncUpdateMutationToColla','get','rangeType','stringify','find','/add','_config','resolveComment','_userService','_threadCommentDataSource','updateComment','UNIVER_UNKNOWN','defineProperty','641848dqYYHn','size','code','user','9pMggjU','_init','saveCommentToSnapshot','Solved','comment','unitId','userId','symbol','body','_httpService','getOwnPropertyDescriptor','comments','personId','Delete','createTimestamp','_sessionService','9097GZJPGv','addComment','Reply','onReady','commentUpdate$','5180XeWhLs','parse','/delete','7yTFnRh','solved','_threadCommentModel','85842lSwjTI','map','delete','_commentService','getUnit','/universer-api/user/list','570699YQiMKp','UNRECOGNIZED','reply','subscribe','_injector','requireSession','threadId','payload','/universer-api/comment/unit/','dataSource','YYYY/MM/DD\x20HH:mm','/edit','474268XPBGtP','length','rangeId','filter','deleteComment','OpenOrReOpen','customRanges','getMemberID','content','disposeWithMe','pluginName','COMMENT','Unknown','getUser','replies','error','values','listComments','Edit','Add','onStarting','post'];_0x1bce=function(){return _0x2b93a9;};return _0x1bce();}import{UniverThreadCommentUIPlugin as _0x2bfb63}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3cc6a8,IThreadCommentDataSourceService as _0x3047aa}from'@univerjs/thread-comment';import{bufferTime as _0x314186}from'rxjs';import{HTTPService as _0x382c33}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3a95a7=>(_0x3a95a7[_0x3a95a7[_0x32e807(0x152)]=0x0]='OpenOrReOpen',_0x3a95a7[_0x3a95a7[_0x32e807(0x189)]=0x1]=_0x32e807(0x189),_0x3a95a7[_0x3a95a7[_0x32e807(0x142)]=-0x1]=_0x32e807(0x142),_0x3a95a7))(I||{}),v=(_0x5a05af=>(_0x5a05af[_0x5a05af[_0x32e807(0x159)]=0x0]=_0x32e807(0x159),_0x5a05af[_0x5a05af[_0x32e807(0x160)]=0x1]=_0x32e807(0x160),_0x5a05af[_0x5a05af[_0x32e807(0x198)]=0x2]='Reply',_0x5a05af[_0x5a05af['Edit']=0x3]='Edit',_0x5a05af[_0x5a05af[_0x32e807(0x193)]=0x4]=_0x32e807(0x193),_0x5a05af[_0x5a05af[_0x32e807(0x169)]=0x5]='Solve',_0x5a05af[_0x5a05af[_0x32e807(0x142)]=-0x1]=_0x32e807(0x142),_0x5a05af))(v||{});const D=_0x91474b=>_0xa47b16(new Date(+_0x91474b))[_0x32e807(0x171)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4c3f24,_0x219510)=>{const _0x483072=_0x32e807,_0x4f5f0d=_0x4c3f24[_0x483072(0x176)](_0x3a2f14),_0x53b718=_0x4c3f24['get'](_0x382c33);_0x219510[_0x483072(0x173)](_0x2137f8=>{const _0x15a67d=_0x483072;_0x4f5f0d[_0x15a67d(0x15a)](_0x2137f8)&&_0x219510[_0x15a67d(0x1a3)](_0x2137f8);}),_0x219510[_0x483072(0x183)]&&(await _0x53b718[_0x483072(0x176)](_0x483072(0x140),{'params':{'userIDs':[..._0x219510]}}))[_0x483072(0x18e)][_0x483072(0x168)]['forEach'](_0x242d2e=>{const _0x50326b=_0x483072;_0x242d2e&&_0x4f5f0d[_0x50326b(0x16d)](_0x242d2e);});};var K=Object[_0x32e807(0x190)],V=(_0x154698,_0x4459af,_0x288650,_0x323267)=>{const _0xf55b8f=_0x32e807;for(var _0x3d4b83=_0x323267>0x1?void 0x0:_0x323267?K(_0x4459af,_0x288650):_0x4459af,_0x567c79=_0x154698[_0xf55b8f(0x14e)]-0x1,_0x237049;_0x567c79>=0x0;_0x567c79--)(_0x237049=_0x154698[_0x567c79])&&(_0x3d4b83=_0x237049(_0x3d4b83)||_0x3d4b83);return _0x3d4b83;},p=(_0x33dad5,_0x139e2c)=>(_0x399b49,_0x248c7b)=>_0x139e2c(_0x399b49,_0x248c7b,_0x33dad5);let S=class extends _0x2e1c60{constructor(_0x2cd379,_0x28a325,_0x1860e8,_0x241e90){const _0x459d88=_0x32e807;super(),this[_0x459d88(0x1a4)]=_0x2cd379,this[_0x459d88(0x1a0)]=_0x28a325,this[_0x459d88(0x17d)]=_0x1860e8,this[_0x459d88(0x145)]=_0x241e90,this[_0x459d88(0x187)](),this['_initUserSync']();}[_0x32e807(0x16e)](){const _0x5f18f0=_0x32e807;this[_0x5f18f0(0x156)](this[_0x5f18f0(0x1a0)]['commentUpdate$']['pipe'](_0x314186(0x10))[_0x5f18f0(0x144)](_0x4a9db1=>{const _0x21681b=new Set();_0x4a9db1['forEach'](_0x4d98b0=>{const _0x49f3ed=_0x4476;switch(_0x4d98b0[_0x49f3ed(0x166)]){case _0x49f3ed(0x172):{const _0xa701b3=_0x4d98b0[_0x49f3ed(0x148)][_0x49f3ed(0x192)];_0x21681b[_0x49f3ed(0x172)](_0xa701b3);break;}}}),B(this['_injector'],_0x21681b);}));}[_0x32e807(0x187)](){const _0x221b32=_0x32e807;this[_0x221b32(0x156)](this['_commentService'][_0x221b32(0x19a)][_0x221b32(0x144)](async _0x1ed94b=>{const _0x1e4463=_0x221b32;var _0x2c37f5,_0x2f251b,_0x3ef3e4,_0x17c7ca;const _0xaafa6d=(_0x2c37f5=this['_threadCommentModel'][_0x1e4463(0x13f)](_0x1ed94b[_0x1e4463(0x18b)])[_0x1e4463(0x179)](_0x2ace29=>_0x2ace29['threadId']===_0x1ed94b[_0x1e4463(0x147)]))==null?void 0x0:_0x2c37f5['root'];if(!_0xaafa6d)return;const {unitId:_0x4bce15,subUnitId:_0x5c9007}=_0xaafa6d;switch(_0x1ed94b[_0x1e4463(0x185)]&&this['_userService'][_0x1e4463(0x16d)](_0x1ed94b['user']),_0x1ed94b[_0x1e4463(0x166)]){case v[_0x1e4463(0x160)]:break;case v[_0x1e4463(0x198)]:{this[_0x1e4463(0x1a0)][_0x1e4463(0x197)](_0x4bce15,_0x5c9007,{'unitId':_0x4bce15,'subUnitId':_0x5c9007,'ref':'','id':_0x1ed94b[_0x1e4463(0x165)],'dT':D(+_0x1ed94b['createTimestamp']),'threadId':_0x1ed94b[_0x1e4463(0x147)],'personId':(_0x3ef3e4=(_0x2f251b=_0x1ed94b[_0x1e4463(0x185)])==null?void 0x0:_0x2f251b[_0x1e4463(0x164)])!=null?_0x3ef3e4:_0x1ed94b['userId'],'text':JSON['parse'](_0x1ed94b[_0x1e4463(0x155)]),'parentId':_0xaafa6d['id']});break;}case v['Delete']:{const _0x412077=this[_0x1e4463(0x1a0)]['getComment'](_0x4bce15,_0x5c9007,_0x1ed94b[_0x1e4463(0x165)]);_0x412077&&_0x412077['parentId']&&this[_0x1e4463(0x1a0)][_0x1e4463(0x151)](_0x4bce15,_0x5c9007,_0x1ed94b[_0x1e4463(0x165)]);break;}case v[_0x1e4463(0x15f)]:{this[_0x1e4463(0x1a0)][_0x1e4463(0x17f)](_0x4bce15,_0x5c9007,{'commentId':_0x1ed94b[_0x1e4463(0x165)],'text':JSON[_0x1e4463(0x19c)](_0x1ed94b[_0x1e4463(0x155)])});break;}case v['Solve']:{const _0x9d9a8f=(_0x17c7ca=this['_threadCommentModel'][_0x1e4463(0x13f)](_0x1ed94b['unitId'])[_0x1e4463(0x179)](_0x5e87b=>_0x5e87b[_0x1e4463(0x147)]===_0x1ed94b[_0x1e4463(0x147)]))==null?void 0x0:_0x17c7ca['root'];_0x9d9a8f&&this[_0x1e4463(0x1a0)][_0x1e4463(0x17c)](_0x4bce15,_0x5c9007,_0x9d9a8f['id'],_0x1ed94b[_0x1e4463(0x19f)]===I[_0x1e4463(0x189)]);break;}}}));}};S=V([p(0x0,_0x2829ff(_0x12f7f5)),p(0x1,_0x2829ff(_0x3cc6a8)),p(0x2,_0x2829ff(_0x3a2f14)),p(0x3,_0x2829ff(_0x2a4fc8))],S);function _0x4476(_0x2d2148,_0x46df1f){const _0x1bcefa=_0x1bce();return _0x4476=function(_0x44764f,_0x1aecd0){_0x44764f=_0x44764f-0x13f;let _0x1a0903=_0x1bcefa[_0x44764f];return _0x1a0903;},_0x4476(_0x2d2148,_0x46df1f);}const z='thread-comment-data-source.config',M={};var k=Object[_0x32e807(0x190)],Q=(_0x185955,_0x1b8521,_0x1aefcf,_0x40c70b)=>{const _0x23888e=_0x32e807;for(var _0x4cbd4e=_0x40c70b>0x1?void 0x0:_0x40c70b?k(_0x1b8521,_0x1aefcf):_0x1b8521,_0x3f9b78=_0x185955[_0x23888e(0x14e)]-0x1,_0x5d33bd;_0x3f9b78>=0x0;_0x3f9b78--)(_0x5d33bd=_0x185955[_0x3f9b78])&&(_0x4cbd4e=_0x5d33bd(_0x4cbd4e)||_0x4cbd4e);return _0x4cbd4e;},_=(_0x2dc7ed,_0x507198)=>(_0x391d90,_0x394dd3)=>_0x507198(_0x391d90,_0x394dd3,_0x2dc7ed);function X(_0x1080f0,_0x19b150){const _0x3a20bf=_0x32e807,_0x14717a=_0x1080f0['replies'][0x0];return{..._0x19b150,'id':_0x14717a[_0x3a20bf(0x165)],'resolved':_0x1080f0[_0x3a20bf(0x19f)]===0x1,'dT':D(_0x14717a[_0x3a20bf(0x194)]),'personId':_0x14717a['userId'],'threadId':_0x14717a[_0x3a20bf(0x147)]};}function ee(_0x14a8f9,_0x51acfd,_0x5c98eb){const _0x44ba27=_0x32e807;var _0x5490de,_0x51ce0e;if(((_0x51ce0e=(_0x5490de=_0x14a8f9==null?void 0x0:_0x14a8f9[_0x44ba27(0x15b)])==null?void 0x0:_0x5490de[_0x44ba27(0x14e)])!=null?_0x51ce0e:0x0)>0x0){const _0x30de3c=(_0x182695,_0x4ed258)=>({'id':_0x182695['replyId'],'threadId':_0x182695[_0x44ba27(0x147)],'dT':D(_0x182695[_0x44ba27(0x194)]),'personId':_0x182695['userId'],'resolved':_0x14a8f9[_0x44ba27(0x19f)]===I[_0x44ba27(0x189)],'unitId':_0x51acfd,'subUnitId':_0x5c98eb,'text':JSON[_0x44ba27(0x19c)](_0x182695[_0x44ba27(0x155)]),'parentId':_0x4ed258}),_0x4f224e=_0x30de3c(_0x14a8f9[_0x44ba27(0x15b)][0x0]);return{..._0x4f224e,'children':_0x14a8f9[_0x44ba27(0x15b)]['slice'](0x1)[_0x44ba27(0x1a2)](_0x258445=>_0x30de3c(_0x258445,_0x4f224e['id']))};}return null;}let f=class{constructor(_0x21c918,_0x5d2f6e,_0x49539f,_0x455f1f){const _0xe8d59e=_0x32e807;this[_0xe8d59e(0x18f)]=_0x21c918,this[_0xe8d59e(0x17d)]=_0x5d2f6e,this[_0xe8d59e(0x195)]=_0x49539f,this['_injector']=_0x455f1f;}async[_0x32e807(0x197)](_0x92fc1){const _0x25cd56=_0x32e807;var _0x3b05de,_0x2406a8;const {parentId:_0x24040e,unitId:_0x4d11c1,text:_0x456396,threadId:_0x5b115f}=_0x92fc1,_0xdfff1d=(_0x2406a8=(_0x3b05de=_0x456396[_0x25cd56(0x153)])==null?void 0x0:_0x3b05de['filter'](_0x5c41ca=>_0x5c41ca[_0x25cd56(0x177)]===_0x5d6a87[_0x25cd56(0x158)])[_0x25cd56(0x1a2)](_0x4dd386=>_0x4dd386[_0x25cd56(0x14f)]))!=null?_0x2406a8:[],_0x34eb7c=JSON[_0x25cd56(0x178)](_0x456396),_0x3643dc=(await this[_0x25cd56(0x195)]['requireSession'](_0x4d11c1))[_0x25cd56(0x154)]();if(_0x24040e){const _0x5445ab={'memberId':_0x3643dc,'unitId':_0x4d11c1,'content':_0x34eb7c,'mention':_0xdfff1d,'threadId':_0x5b115f},_0xf10b74=(await this[_0x25cd56(0x18f)][_0x25cd56(0x162)](_0x25cd56(0x149)+_0x4d11c1+_0x25cd56(0x16a),{'body':_0x5445ab}))[_0x25cd56(0x18e)][_0x25cd56(0x143)];return{..._0x92fc1,'id':_0xf10b74[_0x25cd56(0x165)],'dT':_0xa47b16(+_0xf10b74[_0x25cd56(0x194)])['format'](_0x25cd56(0x14b)),'personId':_0xf10b74[_0x25cd56(0x18c)]};}else{const _0x57ff6a={'memberId':_0x3643dc,'unitId':_0x4d11c1,'content':_0x34eb7c,'mention':_0xdfff1d},_0x3a3072=await this[_0x25cd56(0x18f)]['post'](_0x25cd56(0x149)+_0x4d11c1+_0x25cd56(0x17a),{'body':_0x57ff6a});return X(_0x3a3072[_0x25cd56(0x18e)][_0x25cd56(0x18a)],_0x92fc1);}}async['updateComment'](_0x55c954){const _0x45ea3d=_0x32e807;var _0x2e9d1f,_0xf1f4e9;const {text:_0x512393,unitId:_0x482091}=_0x55c954,_0x2066f5=(_0xf1f4e9=(_0x2e9d1f=_0x512393[_0x45ea3d(0x153)])==null?void 0x0:_0x2e9d1f[_0x45ea3d(0x150)](_0x104c9a=>_0x104c9a[_0x45ea3d(0x177)]===_0x5d6a87['COMMENT'])[_0x45ea3d(0x1a2)](_0x2e7e89=>_0x2e7e89[_0x45ea3d(0x14f)]))!=null?_0xf1f4e9:[],_0x422c9e=JSON['stringify'](_0x512393),_0x575cd7=_0x55c954[_0x45ea3d(0x147)],_0x2d5f61=_0x55c954['id'],_0x5b5b08={'memberId':(await this[_0x45ea3d(0x195)]['requireSession'](_0x482091))[_0x45ea3d(0x154)](),'unitId':_0x482091,'threadId':_0x575cd7,'mention':_0x2066f5,'content':_0x422c9e,'replyId':_0x2d5f61},_0x4c6a88=await this[_0x45ea3d(0x18f)][_0x45ea3d(0x162)](_0x45ea3d(0x149)+_0x482091+_0x45ea3d(0x14c),{'body':_0x5b5b08});return!_0x4c6a88[_0x45ea3d(0x18e)][_0x45ea3d(0x15c)]||_0x4c6a88['body'][_0x45ea3d(0x15c)][_0x45ea3d(0x184)]===0x1;}async[_0x32e807(0x17c)](_0x2f7daf){const _0x89ad27=_0x32e807,{unitId:_0x40e601}=_0x2f7daf,_0xea795b=_0x2f7daf[_0x89ad27(0x147)],_0x31ffa6={'memberId':this[_0x89ad27(0x17d)]['getCurrentUser']()[_0x89ad27(0x164)],'unitId':_0x40e601,'threadId':_0xea795b,'solved':_0x2f7daf['resolved']?I['Solved']:I[_0x89ad27(0x152)]},_0x141238=await this[_0x89ad27(0x18f)][_0x89ad27(0x162)]('/universer-api/comment/unit/'+_0x40e601+_0x89ad27(0x174),{'body':_0x31ffa6});return!_0x141238['body']['error']||_0x141238['body'][_0x89ad27(0x15c)][_0x89ad27(0x184)]===0x1;}async[_0x32e807(0x151)](_0x4bd2ae,_0x1b2fb7,_0x46c209,_0x419a4b){const _0x53c921=_0x32e807,_0x90d404={'memberId':(await this['_sessionService'][_0x53c921(0x146)](_0x4bd2ae))['getMemberID'](),'threadId':_0x46c209,'replyId':_0x419a4b,'unitId':_0x4bd2ae},_0x3b8728=await this[_0x53c921(0x18f)][_0x53c921(0x162)]('/universer-api/comment/unit/'+_0x4bd2ae+_0x53c921(0x19d),{'body':_0x90d404});return!_0x3b8728[_0x53c921(0x18e)][_0x53c921(0x15c)]||_0x3b8728[_0x53c921(0x18e)]['error'][_0x53c921(0x184)]===0x1;}async[_0x32e807(0x15e)](_0x3e1ab3,_0x548a8c,_0x125fd7){const _0x82f234=_0x32e807,_0x1bc0b3={'unitId':_0x3e1ab3,'threadId':_0x125fd7},_0x19b85d=await this['_httpService'][_0x82f234(0x162)]('/universer-api/comment/unit/'+_0x3e1ab3+'/list',{'body':_0x1bc0b3}),_0x301a64=_0x125fd7[_0x82f234(0x1a2)](_0x5e6c98=>ee(_0x19b85d[_0x82f234(0x18e)][_0x82f234(0x191)][_0x5e6c98],_0x3e1ab3,_0x548a8c))['filter'](Boolean);return Object[_0x82f234(0x15d)](_0x19b85d[_0x82f234(0x18e)][_0x82f234(0x168)])[_0x82f234(0x173)](_0xdf3a61=>{this['_userService']['addUser'](_0xdf3a61);}),_0x301a64;}[_0x32e807(0x188)](_0x4e174e){const _0x37d5ce=_0x32e807;return{'id':_0x4e174e['id'],'threadId':_0x4e174e[_0x37d5ce(0x147)],'ref':_0x4e174e['ref']};}};f=Q([_(0x0,_0x2829ff(_0x382c33)),_(0x1,_0x2829ff(_0x3a2f14)),_(0x2,_0x2829ff(_0x307a0a)),_(0x3,_0x2829ff(_0x2a4fc8))],f);var re=Object[_0x32e807(0x190)],te=(_0x27fe5e,_0x2986c1,_0x43f4e4,_0x375d69)=>{const _0x335fc1=_0x32e807;for(var _0x2a480e=_0x375d69>0x1?void 0x0:_0x375d69?re(_0x2986c1,_0x43f4e4):_0x2986c1,_0x4c574e=_0x27fe5e[_0x335fc1(0x14e)]-0x1,_0x17ac10;_0x4c574e>=0x0;_0x4c574e--)(_0x17ac10=_0x27fe5e[_0x4c574e])&&(_0x2a480e=_0x17ac10(_0x2a480e)||_0x2a480e);return _0x2a480e;},N=(_0x3dd2ac,_0x5151d6)=>(_0x4b3fe7,_0x55bc28)=>_0x5151d6(_0x4b3fe7,_0x55bc28,_0x3dd2ac);let g=class extends _0x2e1c60{constructor(_0x2a7e7e,_0x32d749){const _0x4ec5c7=_0x32e807;super(),this[_0x4ec5c7(0x16b)]=_0x2a7e7e,this['_threadCommentDataSource']=_0x32d749,this[_0x4ec5c7(0x16f)]();}[_0x32e807(0x16f)](){const _0x519bab=_0x32e807;this[_0x519bab(0x16b)][_0x519bab(0x14a)]=this[_0x519bab(0x17e)],this[_0x519bab(0x16b)][_0x519bab(0x175)]=!0x1;}};g=te([N(0x0,_0x3047aa),N(0x1,_0x2829ff(f))],g);var se=Object[_0x32e807(0x181)],oe=Object[_0x32e807(0x190)],ne=(_0x4d954b,_0x5666fe,_0x1fec59)=>_0x5666fe in _0x4d954b?se(_0x4d954b,_0x5666fe,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fec59}):_0x4d954b[_0x5666fe]=_0x1fec59,ie=(_0x55092d,_0x4d1819,_0x595d7d,_0x432597)=>{const _0x3255a7=_0x32e807;for(var _0x2b3eef=_0x432597>0x1?void 0x0:_0x432597?oe(_0x4d1819,_0x595d7d):_0x4d1819,_0x538402=_0x55092d[_0x3255a7(0x14e)]-0x1,_0x48f900;_0x538402>=0x0;_0x538402--)(_0x48f900=_0x55092d[_0x538402])&&(_0x2b3eef=_0x48f900(_0x2b3eef)||_0x2b3eef);return _0x2b3eef;},w=(_0x53b011,_0x2ecc64)=>(_0x5e7c5d,_0x2ee9b0)=>_0x2ecc64(_0x5e7c5d,_0x2ee9b0,_0x53b011),$=(_0x3411e5,_0x5b2c1f,_0x50df34)=>ne(_0x3411e5,typeof _0x5b2c1f!=_0x32e807(0x18d)?_0x5b2c1f+'':_0x5b2c1f,_0x50df34);let b=class extends _0x5d5f99{constructor(_0x5336b5=M,_0x136ddf,_0x57007d){const _0xb2cbb2=_0x32e807;super(),this['_config']=_0x5336b5,this[_0xb2cbb2(0x145)]=_0x136ddf,this['_configService']=_0x57007d;const {..._0x15e441}=_0x1eb38a({},M,this[_0xb2cbb2(0x17b)]);this['_configService'][_0xb2cbb2(0x16c)](z,_0x15e441);}[_0x32e807(0x161)](){const _0x59456f=_0x32e807;[[f],[g],[S]][_0x59456f(0x173)](_0x4667ce=>{const _0x5688b0=_0x59456f;this[_0x5688b0(0x145)][_0x5688b0(0x172)](_0x4667ce);});}[_0x32e807(0x199)](){const _0x59d14f=_0x32e807;this['_injector'][_0x59d14f(0x176)](g),this[_0x59d14f(0x145)][_0x59d14f(0x176)](S);}};$(b,_0x32e807(0x157),W),$(b,_0x32e807(0x166),_0xd4c5e1[_0x32e807(0x180)]),b=ie([_0xe03605(_0x2bfb63,_0x40e60c,_0xcfd646),w(0x1,_0x2829ff(_0x2a4fc8)),w(0x2,_0x5c82ef)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0xd82d43=_0x1572;(function(_0x5b5441,_0x36fc3e){const _0x3c9df9=_0x1572,_0x4768c6=_0x5b5441();while(!![]){try{const _0xbef156=parseInt(_0x3c9df9(0x126))/0x1*(parseInt(_0x3c9df9(0xf4))/0x2)+-parseInt(_0x3c9df9(0x13f))/0x3+-parseInt(_0x3c9df9(0x137))/0x4+-parseInt(_0x3c9df9(0x132))/0x5+parseInt(_0x3c9df9(0x107))/0x6*(-parseInt(_0x3c9df9(0x103))/0x7)+-parseInt(_0x3c9df9(0xf5))/0x8*(-parseInt(_0x3c9df9(0x12f))/0x9)+parseInt(_0x3c9df9(0x127))/0xa;if(_0xbef156===_0x36fc3e)break;else _0x4768c6['push'](_0x4768c6['shift']());}catch(_0x136615){_0x4768c6['push'](_0x4768c6['shift']());}}}(_0x3d56,0x524df));import{CommentService as _0x2afbd1,CollaborationSessionService as _0x309717,UniverCollaborationClientPlugin as _0x5e0c12}from'@univerjs-pro/collaboration-client';function _0x3d56(){const _0x2c5c0c=['comments','unitId','getMemberID','content','replyId','user','596253qhlIDC','_userService','YYYY/MM/DD\x20HH:mm','length','18PovyPk','_configService','parentId','subscribe','Delete','_sessionService','listComments','addComment','rangeId','/list','/edit','post','getUnit','disposeWithMe','code','_threadCommentDataSourceService','_commentService','addUser','deleteComment','symbol','setConfig','syncUpdateMutationToColla','/universer-api/user/list','Add','Reply','body','payload','_initDataSource','Edit','_initUserSync','COMMENT','1641JrHVBX','12962320WRGTXQ','personId','_init','UNRECOGNIZED','getComment','customRanges','_threadCommentModel','thread-comment-data-source.config','8586PXQyRI','commentUpdate$','_injector','901470WLWzAq','dataSource','solved','saveCommentToSnapshot','userId','106868DixNtn','Solved','createTimestamp','Solve','format','root','resolved','rangeType','1785408wzthXx','resolveComment','/reply','_config','pluginName','replies','values','map','getOwnPropertyDescriptor','error','parse','stringify','get','/universer-api/comment/unit/','/delete','OpenOrReOpen','onStarting','_httpService','userID','Unknown','find','filter','add','defineProperty','users','pipe','forEach','type','62JHcdZg','400GvExMy','delete','threadId','updateComment','requireSession','/solved','onReady','_threadCommentDataSource'];_0x3d56=function(){return _0x2c5c0c;};return _0x3d56();}import{UniverLicensePlugin as _0x4d7a5a}from'@univerjs-pro/license';import{dayjs as _0xd05752,UserManagerService as _0x41b9cd,Inject as _0x5d8c37,Injector as _0x4cf3db,Disposable as _0x275151,CustomRangeType as _0x181f60,UniverInstanceType as _0xf2bc01,DependentOn as _0x29bf69,IConfigService as _0x6c6242,Plugin as _0x36e53a,merge as _0x438ac3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x43ebb9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x271da6,IThreadCommentDataSourceService as _0x815dfc}from'@univerjs/thread-comment';import{bufferTime as _0x2dd4ef}from'rxjs';import{HTTPService as _0x54b85d}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5134d7=>(_0x5134d7[_0x5134d7[_0xd82d43(0x14e)]=0x0]='OpenOrReOpen',_0x5134d7[_0x5134d7[_0xd82d43(0x138)]=0x1]=_0xd82d43(0x138),_0x5134d7[_0x5134d7['UNRECOGNIZED']=-0x1]=_0xd82d43(0x12a),_0x5134d7))(I||{}),v=(_0xff5a21=>(_0xff5a21[_0xff5a21[_0xd82d43(0xeb)]=0x0]='Unknown',_0xff5a21[_0xff5a21[_0xd82d43(0x11e)]=0x1]='Add',_0xff5a21[_0xff5a21[_0xd82d43(0x11f)]=0x2]=_0xd82d43(0x11f),_0xff5a21[_0xff5a21[_0xd82d43(0x123)]=0x3]='Edit',_0xff5a21[_0xff5a21[_0xd82d43(0x10b)]=0x4]=_0xd82d43(0x10b),_0xff5a21[_0xff5a21[_0xd82d43(0x13a)]=0x5]=_0xd82d43(0x13a),_0xff5a21[_0xff5a21[_0xd82d43(0x12a)]=-0x1]=_0xd82d43(0x12a),_0xff5a21))(v||{});const D=_0x32dae8=>_0xd05752(new Date(+_0x32dae8))[_0xd82d43(0x13b)](_0xd82d43(0x105)),B=async(_0x530237,_0x1f227e)=>{const _0x540796=_0xd82d43,_0x304797=_0x530237[_0x540796(0x14b)](_0x41b9cd),_0x4f22b0=_0x530237[_0x540796(0x14b)](_0x54b85d);_0x1f227e[_0x540796(0xf2)](_0x59e5b5=>{const _0x3b77ff=_0x540796;_0x304797['getUser'](_0x59e5b5)&&_0x1f227e[_0x3b77ff(0xf6)](_0x59e5b5);}),_0x1f227e['size']&&(await _0x4f22b0[_0x540796(0x14b)](_0x540796(0x11d),{'params':{'userIDs':[..._0x1f227e]}}))[_0x540796(0x120)][_0x540796(0xf0)]['forEach'](_0x4e76a1=>{const _0x3731f3=_0x540796;_0x4e76a1&&_0x304797[_0x3731f3(0x118)](_0x4e76a1);});};var K=Object[_0xd82d43(0x147)],V=(_0x4495f8,_0x45ba53,_0x4a91f5,_0x5af961)=>{for(var _0x2170b0=_0x5af961>0x1?void 0x0:_0x5af961?K(_0x45ba53,_0x4a91f5):_0x45ba53,_0x1994ac=_0x4495f8['length']-0x1,_0x3c338b;_0x1994ac>=0x0;_0x1994ac--)(_0x3c338b=_0x4495f8[_0x1994ac])&&(_0x2170b0=_0x3c338b(_0x2170b0)||_0x2170b0);return _0x2170b0;},p=(_0x442411,_0x2414d9)=>(_0x2c58d5,_0x56d89f)=>_0x2414d9(_0x2c58d5,_0x56d89f,_0x442411);let S=class extends _0x275151{constructor(_0x5692e6,_0x509ecb,_0x4e2a48,_0x3098bb){const _0x48b0cf=_0xd82d43;super(),this[_0x48b0cf(0x117)]=_0x5692e6,this[_0x48b0cf(0x12d)]=_0x509ecb,this[_0x48b0cf(0x104)]=_0x4e2a48,this[_0x48b0cf(0x131)]=_0x3098bb,this[_0x48b0cf(0x129)](),this[_0x48b0cf(0x124)]();}[_0xd82d43(0x124)](){const _0x27fe34=_0xd82d43;this[_0x27fe34(0x114)](this['_threadCommentModel'][_0x27fe34(0x130)][_0x27fe34(0xf1)](_0x2dd4ef(0x10))['subscribe'](_0x434863=>{const _0x114694=_0x27fe34,_0x2b5227=new Set();_0x434863[_0x114694(0xf2)](_0x247e9e=>{const _0x471372=_0x114694;switch(_0x247e9e[_0x471372(0xf3)]){case _0x471372(0xee):{const _0x466f50=_0x247e9e[_0x471372(0x121)][_0x471372(0x128)];_0x2b5227[_0x471372(0xee)](_0x466f50);break;}}}),B(this['_injector'],_0x2b5227);}));}['_init'](){const _0x281b0d=_0xd82d43;this[_0x281b0d(0x114)](this[_0x281b0d(0x117)]['commentUpdate$'][_0x281b0d(0x10a)](async _0xb56ee=>{const _0x1ea863=_0x281b0d;var _0x25780a,_0x5d58cd,_0x3047a2,_0x2b773a;const _0x3418ab=(_0x25780a=this[_0x1ea863(0x12d)]['getUnit'](_0xb56ee[_0x1ea863(0xfe)])[_0x1ea863(0xec)](_0x5d50eb=>_0x5d50eb[_0x1ea863(0xf7)]===_0xb56ee[_0x1ea863(0xf7)]))==null?void 0x0:_0x25780a[_0x1ea863(0x13c)];if(!_0x3418ab)return;const {unitId:_0x115efd,subUnitId:_0x157cde}=_0x3418ab;switch(_0xb56ee[_0x1ea863(0x102)]&&this[_0x1ea863(0x104)]['addUser'](_0xb56ee[_0x1ea863(0x102)]),_0xb56ee[_0x1ea863(0xf3)]){case v[_0x1ea863(0x11e)]:break;case v[_0x1ea863(0x11f)]:{this[_0x1ea863(0x12d)][_0x1ea863(0x10e)](_0x115efd,_0x157cde,{'unitId':_0x115efd,'subUnitId':_0x157cde,'ref':'','id':_0xb56ee[_0x1ea863(0x101)],'dT':D(+_0xb56ee[_0x1ea863(0x139)]),'threadId':_0xb56ee[_0x1ea863(0xf7)],'personId':(_0x3047a2=(_0x5d58cd=_0xb56ee['user'])==null?void 0x0:_0x5d58cd[_0x1ea863(0x151)])!=null?_0x3047a2:_0xb56ee[_0x1ea863(0x136)],'text':JSON['parse'](_0xb56ee['content']),'parentId':_0x3418ab['id']});break;}case v[_0x1ea863(0x10b)]:{const _0x2f354c=this[_0x1ea863(0x12d)][_0x1ea863(0x12b)](_0x115efd,_0x157cde,_0xb56ee[_0x1ea863(0x101)]);_0x2f354c&&_0x2f354c[_0x1ea863(0x109)]&&this[_0x1ea863(0x12d)]['deleteComment'](_0x115efd,_0x157cde,_0xb56ee['replyId']);break;}case v[_0x1ea863(0x123)]:{this[_0x1ea863(0x12d)][_0x1ea863(0xf8)](_0x115efd,_0x157cde,{'commentId':_0xb56ee[_0x1ea863(0x101)],'text':JSON[_0x1ea863(0x149)](_0xb56ee['content'])});break;}case v['Solve']:{const _0x268532=(_0x2b773a=this['_threadCommentModel'][_0x1ea863(0x113)](_0xb56ee['unitId'])[_0x1ea863(0xec)](_0x1d0a84=>_0x1d0a84[_0x1ea863(0xf7)]===_0xb56ee[_0x1ea863(0xf7)]))==null?void 0x0:_0x2b773a[_0x1ea863(0x13c)];_0x268532&&this[_0x1ea863(0x12d)][_0x1ea863(0x140)](_0x115efd,_0x157cde,_0x268532['id'],_0xb56ee[_0x1ea863(0x134)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x5d8c37(_0x2afbd1)),p(0x1,_0x5d8c37(_0x271da6)),p(0x2,_0x5d8c37(_0x41b9cd)),p(0x3,_0x5d8c37(_0x4cf3db))],S);const z=_0xd82d43(0x12e),M={};function _0x1572(_0x3327ea,_0x4c73b8){const _0x3d5678=_0x3d56();return _0x1572=function(_0x1572ec,_0x528845){_0x1572ec=_0x1572ec-0xeb;let _0x5cd1b8=_0x3d5678[_0x1572ec];return _0x5cd1b8;},_0x1572(_0x3327ea,_0x4c73b8);}var k=Object[_0xd82d43(0x147)],Q=(_0x25e839,_0x1eab5a,_0x8ce6d6,_0x1ddd4b)=>{for(var _0x502771=_0x1ddd4b>0x1?void 0x0:_0x1ddd4b?k(_0x1eab5a,_0x8ce6d6):_0x1eab5a,_0x2caf64=_0x25e839['length']-0x1,_0x560723;_0x2caf64>=0x0;_0x2caf64--)(_0x560723=_0x25e839[_0x2caf64])&&(_0x502771=_0x560723(_0x502771)||_0x502771);return _0x502771;},_=(_0x49f117,_0x164e7e)=>(_0x8c55ef,_0x3bf822)=>_0x164e7e(_0x8c55ef,_0x3bf822,_0x49f117);function X(_0x1b5380,_0x3d7683){const _0x2a729c=_0xd82d43,_0x547be9=_0x1b5380[_0x2a729c(0x144)][0x0];return{..._0x3d7683,'id':_0x547be9[_0x2a729c(0x101)],'resolved':_0x1b5380[_0x2a729c(0x134)]===0x1,'dT':D(_0x547be9[_0x2a729c(0x139)]),'personId':_0x547be9[_0x2a729c(0x136)],'threadId':_0x547be9[_0x2a729c(0xf7)]};}function ee(_0x59c2f1,_0x144c2a,_0x12a879){const _0x41aee2=_0xd82d43;var _0x264ecc,_0x5346b0;if(((_0x5346b0=(_0x264ecc=_0x59c2f1==null?void 0x0:_0x59c2f1[_0x41aee2(0x144)])==null?void 0x0:_0x264ecc[_0x41aee2(0x106)])!=null?_0x5346b0:0x0)>0x0){const _0x7b37d=(_0x41b163,_0x4fcd08)=>({'id':_0x41b163[_0x41aee2(0x101)],'threadId':_0x41b163[_0x41aee2(0xf7)],'dT':D(_0x41b163['createTimestamp']),'personId':_0x41b163[_0x41aee2(0x136)],'resolved':_0x59c2f1[_0x41aee2(0x134)]===I[_0x41aee2(0x138)],'unitId':_0x144c2a,'subUnitId':_0x12a879,'text':JSON[_0x41aee2(0x149)](_0x41b163[_0x41aee2(0x100)]),'parentId':_0x4fcd08}),_0x3a2fa2=_0x7b37d(_0x59c2f1[_0x41aee2(0x144)][0x0]);return{..._0x3a2fa2,'children':_0x59c2f1[_0x41aee2(0x144)]['slice'](0x1)['map'](_0x3f2457=>_0x7b37d(_0x3f2457,_0x3a2fa2['id']))};}return null;}let f=class{constructor(_0x1dbfc0,_0x1257a3,_0x4f3416,_0x5103c2){const _0x5ca99d=_0xd82d43;this[_0x5ca99d(0x150)]=_0x1dbfc0,this[_0x5ca99d(0x104)]=_0x1257a3,this[_0x5ca99d(0x10c)]=_0x4f3416,this[_0x5ca99d(0x131)]=_0x5103c2;}async[_0xd82d43(0x10e)](_0x525e3d){const _0x45c37a=_0xd82d43;var _0x6d07ab,_0x48ef73;const {parentId:_0x41bcbf,unitId:_0x2a996d,text:_0x5b35db,threadId:_0x5d0217}=_0x525e3d,_0x18bfeb=(_0x48ef73=(_0x6d07ab=_0x5b35db[_0x45c37a(0x12c)])==null?void 0x0:_0x6d07ab[_0x45c37a(0xed)](_0x21321e=>_0x21321e[_0x45c37a(0x13e)]===_0x181f60[_0x45c37a(0x125)])[_0x45c37a(0x146)](_0x15a50f=>_0x15a50f['rangeId']))!=null?_0x48ef73:[],_0x38ced0=JSON[_0x45c37a(0x14a)](_0x5b35db),_0x4bcc49=(await this[_0x45c37a(0x10c)][_0x45c37a(0xf9)](_0x2a996d))['getMemberID']();if(_0x41bcbf){const _0x51407f={'memberId':_0x4bcc49,'unitId':_0x2a996d,'content':_0x38ced0,'mention':_0x18bfeb,'threadId':_0x5d0217},_0x52fafa=(await this[_0x45c37a(0x150)]['post'](_0x45c37a(0x14c)+_0x2a996d+_0x45c37a(0x141),{'body':_0x51407f}))['body']['reply'];return{..._0x525e3d,'id':_0x52fafa[_0x45c37a(0x101)],'dT':_0xd05752(+_0x52fafa[_0x45c37a(0x139)])[_0x45c37a(0x13b)](_0x45c37a(0x105)),'personId':_0x52fafa[_0x45c37a(0x136)]};}else{const _0x159e48={'memberId':_0x4bcc49,'unitId':_0x2a996d,'content':_0x38ced0,'mention':_0x18bfeb},_0x36fa45=await this['_httpService'][_0x45c37a(0x112)]('/universer-api/comment/unit/'+_0x2a996d+'/add',{'body':_0x159e48});return X(_0x36fa45[_0x45c37a(0x120)]['comment'],_0x525e3d);}}async['updateComment'](_0x2b106a){const _0x5e2e5d=_0xd82d43;var _0x445c6f,_0x2dfa91;const {text:_0x45aaf8,unitId:_0x517b32}=_0x2b106a,_0x1d6e6d=(_0x2dfa91=(_0x445c6f=_0x45aaf8[_0x5e2e5d(0x12c)])==null?void 0x0:_0x445c6f[_0x5e2e5d(0xed)](_0x44b896=>_0x44b896['rangeType']===_0x181f60[_0x5e2e5d(0x125)])[_0x5e2e5d(0x146)](_0xbaa41d=>_0xbaa41d[_0x5e2e5d(0x10f)]))!=null?_0x2dfa91:[],_0x4d8653=JSON[_0x5e2e5d(0x14a)](_0x45aaf8),_0x367182=_0x2b106a[_0x5e2e5d(0xf7)],_0x2ba288=_0x2b106a['id'],_0x11a720={'memberId':(await this[_0x5e2e5d(0x10c)]['requireSession'](_0x517b32))[_0x5e2e5d(0xff)](),'unitId':_0x517b32,'threadId':_0x367182,'mention':_0x1d6e6d,'content':_0x4d8653,'replyId':_0x2ba288},_0x1b9c67=await this['_httpService']['post'](_0x5e2e5d(0x14c)+_0x517b32+_0x5e2e5d(0x111),{'body':_0x11a720});return!_0x1b9c67[_0x5e2e5d(0x120)]['error']||_0x1b9c67[_0x5e2e5d(0x120)][_0x5e2e5d(0x148)][_0x5e2e5d(0x115)]===0x1;}async[_0xd82d43(0x140)](_0x4893f4){const _0x519710=_0xd82d43,{unitId:_0x466518}=_0x4893f4,_0x47b68c=_0x4893f4[_0x519710(0xf7)],_0x274a1b={'memberId':this['_userService']['getCurrentUser']()[_0x519710(0x151)],'unitId':_0x466518,'threadId':_0x47b68c,'solved':_0x4893f4[_0x519710(0x13d)]?I[_0x519710(0x138)]:I[_0x519710(0x14e)]},_0x606572=await this[_0x519710(0x150)][_0x519710(0x112)]('/universer-api/comment/unit/'+_0x466518+_0x519710(0xfa),{'body':_0x274a1b});return!_0x606572['body'][_0x519710(0x148)]||_0x606572[_0x519710(0x120)][_0x519710(0x148)][_0x519710(0x115)]===0x1;}async[_0xd82d43(0x119)](_0x26b4a3,_0x123483,_0x4adb8a,_0xf9cfad){const _0x4c9b52=_0xd82d43,_0x1d428d={'memberId':(await this[_0x4c9b52(0x10c)][_0x4c9b52(0xf9)](_0x26b4a3))[_0x4c9b52(0xff)](),'threadId':_0x4adb8a,'replyId':_0xf9cfad,'unitId':_0x26b4a3},_0x3f0bfd=await this[_0x4c9b52(0x150)][_0x4c9b52(0x112)](_0x4c9b52(0x14c)+_0x26b4a3+_0x4c9b52(0x14d),{'body':_0x1d428d});return!_0x3f0bfd[_0x4c9b52(0x120)][_0x4c9b52(0x148)]||_0x3f0bfd['body'][_0x4c9b52(0x148)][_0x4c9b52(0x115)]===0x1;}async[_0xd82d43(0x10d)](_0x577f57,_0x52d722,_0xe7beeb){const _0x4ff479=_0xd82d43,_0x245c77={'unitId':_0x577f57,'threadId':_0xe7beeb},_0x20f99a=await this[_0x4ff479(0x150)][_0x4ff479(0x112)](_0x4ff479(0x14c)+_0x577f57+_0x4ff479(0x110),{'body':_0x245c77}),_0x3de7a1=_0xe7beeb[_0x4ff479(0x146)](_0x45f73e=>ee(_0x20f99a[_0x4ff479(0x120)][_0x4ff479(0xfd)][_0x45f73e],_0x577f57,_0x52d722))[_0x4ff479(0xed)](Boolean);return Object[_0x4ff479(0x145)](_0x20f99a[_0x4ff479(0x120)][_0x4ff479(0xf0)])['forEach'](_0x403c56=>{const _0x1e968c=_0x4ff479;this[_0x1e968c(0x104)][_0x1e968c(0x118)](_0x403c56);}),_0x3de7a1;}[_0xd82d43(0x135)](_0x5b8d97){const _0x59cd6a=_0xd82d43;return{'id':_0x5b8d97['id'],'threadId':_0x5b8d97[_0x59cd6a(0xf7)],'ref':_0x5b8d97['ref']};}};f=Q([_(0x0,_0x5d8c37(_0x54b85d)),_(0x1,_0x5d8c37(_0x41b9cd)),_(0x2,_0x5d8c37(_0x309717)),_(0x3,_0x5d8c37(_0x4cf3db))],f);var re=Object[_0xd82d43(0x147)],te=(_0x4fad81,_0x1ab5c0,_0x1ba570,_0x46bdf7)=>{const _0x52bbe1=_0xd82d43;for(var _0x2e1037=_0x46bdf7>0x1?void 0x0:_0x46bdf7?re(_0x1ab5c0,_0x1ba570):_0x1ab5c0,_0x284fa9=_0x4fad81[_0x52bbe1(0x106)]-0x1,_0xb47cff;_0x284fa9>=0x0;_0x284fa9--)(_0xb47cff=_0x4fad81[_0x284fa9])&&(_0x2e1037=_0xb47cff(_0x2e1037)||_0x2e1037);return _0x2e1037;},N=(_0x1f9535,_0x51001e)=>(_0x3ffdbb,_0x4962bb)=>_0x51001e(_0x3ffdbb,_0x4962bb,_0x1f9535);let g=class extends _0x275151{constructor(_0x2ba7c3,_0x2d6df2){const _0x23c949=_0xd82d43;super(),this[_0x23c949(0x116)]=_0x2ba7c3,this['_threadCommentDataSource']=_0x2d6df2,this[_0x23c949(0x122)]();}[_0xd82d43(0x122)](){const _0x2ca8e6=_0xd82d43;this[_0x2ca8e6(0x116)][_0x2ca8e6(0x133)]=this[_0x2ca8e6(0xfc)],this['_threadCommentDataSourceService'][_0x2ca8e6(0x11c)]=!0x1;}};g=te([N(0x0,_0x815dfc),N(0x1,_0x5d8c37(f))],g);var se=Object[_0xd82d43(0xef)],oe=Object[_0xd82d43(0x147)],ne=(_0x12af1d,_0x1366f5,_0x179e08)=>_0x1366f5 in _0x12af1d?se(_0x12af1d,_0x1366f5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x179e08}):_0x12af1d[_0x1366f5]=_0x179e08,ie=(_0x3c2b43,_0x21e10a,_0x515854,_0x47b6a1)=>{const _0x4831e8=_0xd82d43;for(var _0x1bc770=_0x47b6a1>0x1?void 0x0:_0x47b6a1?oe(_0x21e10a,_0x515854):_0x21e10a,_0x4ba224=_0x3c2b43[_0x4831e8(0x106)]-0x1,_0x49c03d;_0x4ba224>=0x0;_0x4ba224--)(_0x49c03d=_0x3c2b43[_0x4ba224])&&(_0x1bc770=_0x49c03d(_0x1bc770)||_0x1bc770);return _0x1bc770;},w=(_0xfc2d1a,_0x5568de)=>(_0x1a761a,_0x391a44)=>_0x5568de(_0x1a761a,_0x391a44,_0xfc2d1a),$=(_0x72e15c,_0x4ba227,_0x3c9664)=>ne(_0x72e15c,typeof _0x4ba227!=_0xd82d43(0x11a)?_0x4ba227+'':_0x4ba227,_0x3c9664);let b=class extends _0x36e53a{constructor(_0xfa57f2=M,_0x419983,_0x2f46ef){const _0x3b0ad6=_0xd82d43;super(),this[_0x3b0ad6(0x142)]=_0xfa57f2,this['_injector']=_0x419983,this[_0x3b0ad6(0x108)]=_0x2f46ef;const {..._0x2da69e}=_0x438ac3({},M,this['_config']);this[_0x3b0ad6(0x108)][_0x3b0ad6(0x11b)](z,_0x2da69e);}[_0xd82d43(0x14f)](){const _0x3ec210=_0xd82d43;[[f],[g],[S]][_0x3ec210(0xf2)](_0x19d377=>{const _0x28ccd0=_0x3ec210;this[_0x28ccd0(0x131)][_0x28ccd0(0xee)](_0x19d377);});}[_0xd82d43(0xfb)](){const _0x58524b=_0xd82d43;this[_0x58524b(0x131)][_0x58524b(0x14b)](g),this[_0x58524b(0x131)]['get'](S);}};$(b,_0xd82d43(0x143),W),$(b,_0xd82d43(0xf3),_0xf2bc01['UNIVER_UNKNOWN']),b=ie([_0x29bf69(_0x43ebb9,_0x5e0c12,_0x4d7a5a),w(0x1,_0x5d8c37(_0x4cf3db)),w(0x2,_0x6c6242)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x23c6(){const _0xc1d6b9=['type','UniverProCollaborationClient','resolveComment','length','subscribe','Unknown','UniverProThreadCommentDatasource','IThreadCommentDataSourceService','forEach','rxjs','2518824CeNMHV','user','parentId','get','personId','ThreadCommentModel','UniverCollaborationClientPlugin','2185794uiHNpa','Disposable','_configService','Solve','UniverLicensePlugin','UniverInstanceType','delete','resolved','Edit','_httpService','UniverProLicense','requireSession','listComments','users','symbol','getComment','IConfigService','979PxONii','/universer-api/comment/unit/','CommentService','UniverThreadCommentDataSourcePlugin','threadId','format','size','getUser','body','add','/add','/list','comment','_config','syncUpdateMutationToColla','Add','pipe','commentUpdate$','merge','slice','updateComment','875244CMptyc','_threadCommentModel','4hnMbNM','127930YZJzOK','payload','814zUnoqe','setConfig','replies','amd','Reply','25063116sGGKKt','@univerjs-pro/license','getMemberID','_threadCommentDataSourceService','/solved','values','UniverNetwork','parse','@univerjs/core','deleteComment','/universer-api/user/list','_initDataSource','CollaborationSessionService','unitId','_threadCommentDataSource','reply','rangeType','7JhvkaE','@univerjs-pro/collaboration-client','getOwnPropertyDescriptor','replyId','post','_initUserSync','userId','@univerjs/thread-comment-ui','UNRECOGNIZED','find','addComment','_init','defineProperty','rangeId','/delete','getCurrentUser','createTimestamp','Module','disposeWithMe','Delete','684YLorFO','content','stringify','UniverCore','/reply','addUser','_commentService','getUnit','@univerjs/network','Inject','solved','code','Injector','toStringTag','onReady','Plugin','HTTPService','function','map','OpenOrReOpen','_userService','/edit','@univerjs/thread-comment','comments','object','customRanges','CustomRangeType','11AvXBTb','COMMENT','error','_sessionService','saveCommentToSnapshot','Solved','filter','dayjs','DependentOn','_injector','pluginName','thread-comment-data-source.config','UserManagerService','2697310ZoLcvA'];_0x23c6=function(){return _0xc1d6b9;};return _0x23c6();}function _0xcabc(_0x268a6d,_0x29f57f){const _0x23c6eb=_0x23c6();return _0xcabc=function(_0xcabce5,_0x2a9ea4){_0xcabce5=_0xcabce5-0xa9;let _0x318bb9=_0x23c6eb[_0xcabce5];return _0x318bb9;},_0xcabc(_0x268a6d,_0x29f57f);}(function(_0x3ca7fd,_0x1c5ec8){const _0x5e7c48=_0xcabc,_0x126a44=_0x3ca7fd();while(!![]){try{const _0x43eefa=-parseInt(_0x5e7c48(0x135))/0x1*(parseInt(_0x5e7c48(0xc0))/0x2)+parseInt(_0x5e7c48(0xbb))/0x3*(parseInt(_0x5e7c48(0xbd))/0x4)+-parseInt(_0x5e7c48(0x112))/0x5+parseInt(_0x5e7c48(0x124))/0x6+parseInt(_0x5e7c48(0xd6))/0x7*(-parseInt(_0x5e7c48(0x11d))/0x8)+parseInt(_0x5e7c48(0xea))/0x9*(-parseInt(_0x5e7c48(0xbe))/0xa)+parseInt(_0x5e7c48(0x105))/0xb*(parseInt(_0x5e7c48(0xc5))/0xc);if(_0x43eefa===_0x1c5ec8)break;else _0x126a44['push'](_0x126a44['shift']());}catch(_0x36c7b1){_0x126a44['push'](_0x126a44['shift']());}}}(_0x23c6,0x7edb4),function(_0x37ec81,_0x5d062c){const _0x5cf8a1=_0xcabc;typeof exports==_0x5cf8a1(0x102)&&typeof module<'u'?_0x5d062c(exports,require(_0x5cf8a1(0xd7)),require(_0x5cf8a1(0xc6)),require(_0x5cf8a1(0xcd)),require('@univerjs/thread-comment-ui'),require(_0x5cf8a1(0x100)),require(_0x5cf8a1(0x11c)),require(_0x5cf8a1(0xf2))):typeof define==_0x5cf8a1(0xfb)&&define[_0x5cf8a1(0xc3)]?define(['exports',_0x5cf8a1(0xd7),_0x5cf8a1(0xc6),_0x5cf8a1(0xcd),_0x5cf8a1(0xdd),_0x5cf8a1(0x100),'rxjs',_0x5cf8a1(0xf2)],_0x5d062c):(_0x37ec81=typeof globalThis<'u'?globalThis:_0x37ec81||self,_0x5d062c(_0x37ec81[_0x5cf8a1(0x119)]={},_0x37ec81[_0x5cf8a1(0x114)],_0x37ec81[_0x5cf8a1(0x12e)],_0x37ec81[_0x5cf8a1(0xed)],_0x37ec81['UniverThreadCommentUi'],_0x37ec81['UniverThreadComment'],_0x37ec81[_0x5cf8a1(0x11c)],_0x37ec81[_0x5cf8a1(0xcb)]));}(this,function(_0x436e08,_0x9d204b,_0x39e458,_0x3777e4,_0x24e3d7,_0xabdbc4,_0x3069ce,_0x47855e){'use strict';const _0x5dba39=_0xcabc;const _0x48cf41='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x583558=(_0x5c76b6=>(_0x5c76b6[_0x5c76b6[_0x5dba39(0xfd)]=0x0]=_0x5dba39(0xfd),_0x5c76b6[_0x5c76b6[_0x5dba39(0x10a)]=0x1]=_0x5dba39(0x10a),_0x5c76b6[_0x5c76b6[_0x5dba39(0xde)]=-0x1]='UNRECOGNIZED',_0x5c76b6))(_0x583558||{}),_0x329f22=(_0x4dd219=>(_0x4dd219[_0x4dd219[_0x5dba39(0x118)]=0x0]=_0x5dba39(0x118),_0x4dd219[_0x4dd219['Add']=0x1]=_0x5dba39(0xb5),_0x4dd219[_0x4dd219[_0x5dba39(0xc4)]=0x2]='Reply',_0x4dd219[_0x4dd219[_0x5dba39(0x12c)]=0x3]=_0x5dba39(0x12c),_0x4dd219[_0x4dd219[_0x5dba39(0xe9)]=0x4]=_0x5dba39(0xe9),_0x4dd219[_0x4dd219[_0x5dba39(0x127)]=0x5]=_0x5dba39(0x127),_0x4dd219[_0x4dd219[_0x5dba39(0xde)]=-0x1]=_0x5dba39(0xde),_0x4dd219))(_0x329f22||{});const _0x37df52=_0x1ccfd4=>_0x3777e4['dayjs'](new Date(+_0x1ccfd4))[_0x5dba39(0xab)]('YYYY/MM/DD\x20HH:mm'),_0xd96371=async(_0x1c3ac5,_0x36e96c)=>{const _0x2913d3=_0x5dba39,_0x29f621=_0x1c3ac5[_0x2913d3(0x120)](_0x3777e4[_0x2913d3(0x111)]),_0x49a08f=_0x1c3ac5[_0x2913d3(0x120)](_0x47855e['HTTPService']);_0x36e96c[_0x2913d3(0x11b)](_0x136568=>{const _0x4511d2=_0x2913d3;_0x29f621[_0x4511d2(0xad)](_0x136568)&&_0x36e96c[_0x4511d2(0x12a)](_0x136568);}),_0x36e96c[_0x2913d3(0xac)]&&(await _0x49a08f[_0x2913d3(0x120)](_0x2913d3(0xcf),{'params':{'userIDs':[..._0x36e96c]}}))[_0x2913d3(0xae)]['users'][_0x2913d3(0x11b)](_0x2f596e=>{const _0x3ae5a0=_0x2913d3;_0x2f596e&&_0x29f621[_0x3ae5a0(0xef)](_0x2f596e);});};var _0x38b556=Object['getOwnPropertyDescriptor'],_0x388c65=(_0x301c6d,_0x296be0,_0x431eae,_0x4a9911)=>{const _0x11af2b=_0x5dba39;for(var _0x3aa80d=_0x4a9911>0x1?void 0x0:_0x4a9911?_0x38b556(_0x296be0,_0x431eae):_0x296be0,_0x59b883=_0x301c6d[_0x11af2b(0x116)]-0x1,_0x17b0d0;_0x59b883>=0x0;_0x59b883--)(_0x17b0d0=_0x301c6d[_0x59b883])&&(_0x3aa80d=_0x17b0d0(_0x3aa80d)||_0x3aa80d);return _0x3aa80d;},_0xceaef5=(_0x40afa7,_0x2956d7)=>(_0xd8b5e3,_0x2b4ff8)=>_0x2956d7(_0xd8b5e3,_0x2b4ff8,_0x40afa7);let _0x31d783=class extends _0x3777e4['Disposable']{constructor(_0x4f7e64,_0x4a9109,_0x4628ac,_0x18509d){const _0x2ea4c2=_0x5dba39;super(),this[_0x2ea4c2(0xf0)]=_0x4f7e64,this[_0x2ea4c2(0xbc)]=_0x4a9109,this[_0x2ea4c2(0xfe)]=_0x4628ac,this[_0x2ea4c2(0x10e)]=_0x18509d,this[_0x2ea4c2(0xe1)](),this['_initUserSync']();}[_0x5dba39(0xdb)](){const _0x3eef96=_0x5dba39;this['disposeWithMe'](this['_threadCommentModel'][_0x3eef96(0xb7)][_0x3eef96(0xb6)](_0x3069ce['bufferTime'](0x10))[_0x3eef96(0x117)](_0x4a41ab=>{const _0x9a6dda=_0x3eef96,_0x2997ec=new Set();_0x4a41ab[_0x9a6dda(0x11b)](_0x37ff32=>{const _0x4482af=_0x9a6dda;switch(_0x37ff32[_0x4482af(0x113)]){case _0x4482af(0xaf):{const _0x349020=_0x37ff32[_0x4482af(0xbf)][_0x4482af(0x121)];_0x2997ec['add'](_0x349020);break;}}}),_0xd96371(this['_injector'],_0x2997ec);}));}[_0x5dba39(0xe1)](){const _0x383714=_0x5dba39;this[_0x383714(0xe8)](this[_0x383714(0xf0)][_0x383714(0xb7)][_0x383714(0x117)](async _0xad7a3a=>{const _0x1af3af=_0x383714;var _0x140ca6,_0x3e1ed4,_0x4b6f8c,_0x267a2b;const _0x2ab658=(_0x140ca6=this['_threadCommentModel'][_0x1af3af(0xf1)](_0xad7a3a[_0x1af3af(0xd2)])[_0x1af3af(0xdf)](_0x236fea=>_0x236fea[_0x1af3af(0xaa)]===_0xad7a3a[_0x1af3af(0xaa)]))==null?void 0x0:_0x140ca6['root'];if(!_0x2ab658)return;const {unitId:_0xb5eca0,subUnitId:_0x91e78e}=_0x2ab658;switch(_0xad7a3a[_0x1af3af(0x11e)]&&this[_0x1af3af(0xfe)][_0x1af3af(0xef)](_0xad7a3a[_0x1af3af(0x11e)]),_0xad7a3a[_0x1af3af(0x113)]){case _0x329f22[_0x1af3af(0xb5)]:break;case _0x329f22[_0x1af3af(0xc4)]:{this[_0x1af3af(0xbc)][_0x1af3af(0xe0)](_0xb5eca0,_0x91e78e,{'unitId':_0xb5eca0,'subUnitId':_0x91e78e,'ref':'','id':_0xad7a3a[_0x1af3af(0xd9)],'dT':_0x37df52(+_0xad7a3a[_0x1af3af(0xe6)]),'threadId':_0xad7a3a[_0x1af3af(0xaa)],'personId':(_0x4b6f8c=(_0x3e1ed4=_0xad7a3a[_0x1af3af(0x11e)])==null?void 0x0:_0x3e1ed4['userID'])!=null?_0x4b6f8c:_0xad7a3a['userId'],'text':JSON[_0x1af3af(0xcc)](_0xad7a3a[_0x1af3af(0xeb)]),'parentId':_0x2ab658['id']});break;}case _0x329f22['Delete']:{const _0x47ba93=this['_threadCommentModel'][_0x1af3af(0x133)](_0xb5eca0,_0x91e78e,_0xad7a3a[_0x1af3af(0xd9)]);_0x47ba93&&_0x47ba93[_0x1af3af(0x11f)]&&this[_0x1af3af(0xbc)][_0x1af3af(0xce)](_0xb5eca0,_0x91e78e,_0xad7a3a[_0x1af3af(0xd9)]);break;}case _0x329f22['Edit']:{this[_0x1af3af(0xbc)][_0x1af3af(0xba)](_0xb5eca0,_0x91e78e,{'commentId':_0xad7a3a[_0x1af3af(0xd9)],'text':JSON[_0x1af3af(0xcc)](_0xad7a3a['content'])});break;}case _0x329f22['Solve']:{const _0x34e30d=(_0x267a2b=this[_0x1af3af(0xbc)][_0x1af3af(0xf1)](_0xad7a3a[_0x1af3af(0xd2)])[_0x1af3af(0xdf)](_0x251efd=>_0x251efd[_0x1af3af(0xaa)]===_0xad7a3a[_0x1af3af(0xaa)]))==null?void 0x0:_0x267a2b['root'];_0x34e30d&&this[_0x1af3af(0xbc)][_0x1af3af(0x115)](_0xb5eca0,_0x91e78e,_0x34e30d['id'],_0xad7a3a[_0x1af3af(0xf4)]===_0x583558[_0x1af3af(0x10a)]);break;}}}));}};_0x31d783=_0x388c65([_0xceaef5(0x0,_0x3777e4[_0x5dba39(0xf3)](_0x9d204b[_0x5dba39(0x137)])),_0xceaef5(0x1,_0x3777e4[_0x5dba39(0xf3)](_0xabdbc4[_0x5dba39(0x122)])),_0xceaef5(0x2,_0x3777e4[_0x5dba39(0xf3)](_0x3777e4[_0x5dba39(0x111)])),_0xceaef5(0x3,_0x3777e4[_0x5dba39(0xf3)](_0x3777e4['Injector']))],_0x31d783);const _0x47e529=_0x5dba39(0x110),_0x490629={};var _0x498a30=Object[_0x5dba39(0xd8)],_0x1d2106=(_0x1b4979,_0x1b372f,_0x4645d4,_0x3f5429)=>{const _0xc397bb=_0x5dba39;for(var _0xc9509e=_0x3f5429>0x1?void 0x0:_0x3f5429?_0x498a30(_0x1b372f,_0x4645d4):_0x1b372f,_0x12904e=_0x1b4979[_0xc397bb(0x116)]-0x1,_0x383cce;_0x12904e>=0x0;_0x12904e--)(_0x383cce=_0x1b4979[_0x12904e])&&(_0xc9509e=_0x383cce(_0xc9509e)||_0xc9509e);return _0xc9509e;},_0x39f735=(_0x168817,_0x1a8b2e)=>(_0x2bc438,_0xb91fc8)=>_0x1a8b2e(_0x2bc438,_0xb91fc8,_0x168817);function _0x4d3383(_0x1db3d8,_0x53ba04){const _0x2a9e8a=_0x5dba39,_0x369912=_0x1db3d8['replies'][0x0];return{..._0x53ba04,'id':_0x369912['replyId'],'resolved':_0x1db3d8[_0x2a9e8a(0xf4)]===0x1,'dT':_0x37df52(_0x369912['createTimestamp']),'personId':_0x369912['userId'],'threadId':_0x369912['threadId']};}function _0x56e0d3(_0x13b697,_0x312a61,_0x3b3639){const _0x3e81c4=_0x5dba39;var _0xfa6b1c,_0x3d945a;if(((_0x3d945a=(_0xfa6b1c=_0x13b697==null?void 0x0:_0x13b697[_0x3e81c4(0xc2)])==null?void 0x0:_0xfa6b1c[_0x3e81c4(0x116)])!=null?_0x3d945a:0x0)>0x0){const _0x32bb42=(_0xf8a5a4,_0x251707)=>({'id':_0xf8a5a4[_0x3e81c4(0xd9)],'threadId':_0xf8a5a4[_0x3e81c4(0xaa)],'dT':_0x37df52(_0xf8a5a4[_0x3e81c4(0xe6)]),'personId':_0xf8a5a4[_0x3e81c4(0xdc)],'resolved':_0x13b697[_0x3e81c4(0xf4)]===_0x583558[_0x3e81c4(0x10a)],'unitId':_0x312a61,'subUnitId':_0x3b3639,'text':JSON['parse'](_0xf8a5a4[_0x3e81c4(0xeb)]),'parentId':_0x251707}),_0xc3fef2=_0x32bb42(_0x13b697[_0x3e81c4(0xc2)][0x0]);return{..._0xc3fef2,'children':_0x13b697[_0x3e81c4(0xc2)][_0x3e81c4(0xb9)](0x1)[_0x3e81c4(0xfc)](_0x5c7c5f=>_0x32bb42(_0x5c7c5f,_0xc3fef2['id']))};}return null;}let _0x3ad2c7=class{constructor(_0x1353f0,_0x13fbf4,_0x1e19cf,_0x20610d){const _0x26dd3f=_0x5dba39;this[_0x26dd3f(0x12d)]=_0x1353f0,this[_0x26dd3f(0xfe)]=_0x13fbf4,this[_0x26dd3f(0x108)]=_0x1e19cf,this[_0x26dd3f(0x10e)]=_0x20610d;}async[_0x5dba39(0xe0)](_0x1d3c32){const _0x43533e=_0x5dba39;var _0x2ac945,_0x7bb07e;const {parentId:_0x2ef3cf,unitId:_0x52b8bb,text:_0x268d2f,threadId:_0x407a74}=_0x1d3c32,_0x47fb2f=(_0x7bb07e=(_0x2ac945=_0x268d2f[_0x43533e(0x103)])==null?void 0x0:_0x2ac945[_0x43533e(0x10b)](_0x21f8ad=>_0x21f8ad[_0x43533e(0xd5)]===_0x3777e4[_0x43533e(0x104)]['COMMENT'])[_0x43533e(0xfc)](_0x18197f=>_0x18197f[_0x43533e(0xe3)]))!=null?_0x7bb07e:[],_0xb1a62c=JSON[_0x43533e(0xec)](_0x268d2f),_0x83a77d=(await this[_0x43533e(0x108)]['requireSession'](_0x52b8bb))[_0x43533e(0xc7)]();if(_0x2ef3cf){const _0x25327e={'memberId':_0x83a77d,'unitId':_0x52b8bb,'content':_0xb1a62c,'mention':_0x47fb2f,'threadId':_0x407a74},_0x3e96d7=(await this[_0x43533e(0x12d)][_0x43533e(0xda)]('/universer-api/comment/unit/'+_0x52b8bb+_0x43533e(0xee),{'body':_0x25327e}))[_0x43533e(0xae)][_0x43533e(0xd4)];return{..._0x1d3c32,'id':_0x3e96d7[_0x43533e(0xd9)],'dT':_0x3777e4[_0x43533e(0x10c)](+_0x3e96d7[_0x43533e(0xe6)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x3e96d7[_0x43533e(0xdc)]};}else{const _0x56f2f5={'memberId':_0x83a77d,'unitId':_0x52b8bb,'content':_0xb1a62c,'mention':_0x47fb2f},_0x1b000a=await this[_0x43533e(0x12d)][_0x43533e(0xda)](_0x43533e(0x136)+_0x52b8bb+_0x43533e(0xb0),{'body':_0x56f2f5});return _0x4d3383(_0x1b000a[_0x43533e(0xae)][_0x43533e(0xb2)],_0x1d3c32);}}async[_0x5dba39(0xba)](_0x4db649){const _0x2af52a=_0x5dba39;var _0x31c5e6,_0x48dd90;const {text:_0x515839,unitId:_0x23ccc2}=_0x4db649,_0x4e87f2=(_0x48dd90=(_0x31c5e6=_0x515839[_0x2af52a(0x103)])==null?void 0x0:_0x31c5e6[_0x2af52a(0x10b)](_0x43f33d=>_0x43f33d[_0x2af52a(0xd5)]===_0x3777e4[_0x2af52a(0x104)][_0x2af52a(0x106)])[_0x2af52a(0xfc)](_0x6c4557=>_0x6c4557[_0x2af52a(0xe3)]))!=null?_0x48dd90:[],_0x2b9dd8=JSON[_0x2af52a(0xec)](_0x515839),_0xf6948b=_0x4db649[_0x2af52a(0xaa)],_0x376e39=_0x4db649['id'],_0x3edb1a={'memberId':(await this[_0x2af52a(0x108)][_0x2af52a(0x12f)](_0x23ccc2))[_0x2af52a(0xc7)](),'unitId':_0x23ccc2,'threadId':_0xf6948b,'mention':_0x4e87f2,'content':_0x2b9dd8,'replyId':_0x376e39},_0x504745=await this['_httpService'][_0x2af52a(0xda)]('/universer-api/comment/unit/'+_0x23ccc2+_0x2af52a(0xff),{'body':_0x3edb1a});return!_0x504745[_0x2af52a(0xae)][_0x2af52a(0x107)]||_0x504745[_0x2af52a(0xae)][_0x2af52a(0x107)][_0x2af52a(0xf5)]===0x1;}async['resolveComment'](_0x3e6027){const _0x5d45d5=_0x5dba39,{unitId:_0x42ad83}=_0x3e6027,_0x843216=_0x3e6027[_0x5d45d5(0xaa)],_0x214581={'memberId':this[_0x5d45d5(0xfe)][_0x5d45d5(0xe5)]()['userID'],'unitId':_0x42ad83,'threadId':_0x843216,'solved':_0x3e6027[_0x5d45d5(0x12b)]?_0x583558['Solved']:_0x583558[_0x5d45d5(0xfd)]},_0x38ef32=await this[_0x5d45d5(0x12d)][_0x5d45d5(0xda)](_0x5d45d5(0x136)+_0x42ad83+_0x5d45d5(0xc9),{'body':_0x214581});return!_0x38ef32[_0x5d45d5(0xae)][_0x5d45d5(0x107)]||_0x38ef32['body'][_0x5d45d5(0x107)][_0x5d45d5(0xf5)]===0x1;}async[_0x5dba39(0xce)](_0x45941f,_0x189c9c,_0x4de7d1,_0x45e1de){const _0x1a5fd9=_0x5dba39,_0x5d0bbe={'memberId':(await this[_0x1a5fd9(0x108)][_0x1a5fd9(0x12f)](_0x45941f))[_0x1a5fd9(0xc7)](),'threadId':_0x4de7d1,'replyId':_0x45e1de,'unitId':_0x45941f},_0xaf361c=await this[_0x1a5fd9(0x12d)][_0x1a5fd9(0xda)](_0x1a5fd9(0x136)+_0x45941f+_0x1a5fd9(0xe4),{'body':_0x5d0bbe});return!_0xaf361c[_0x1a5fd9(0xae)][_0x1a5fd9(0x107)]||_0xaf361c[_0x1a5fd9(0xae)][_0x1a5fd9(0x107)][_0x1a5fd9(0xf5)]===0x1;}async[_0x5dba39(0x130)](_0x27b85e,_0x3f7e8f,_0x150fcf){const _0x35fbaa=_0x5dba39,_0x173497={'unitId':_0x27b85e,'threadId':_0x150fcf},_0x402ffe=await this[_0x35fbaa(0x12d)]['post'](_0x35fbaa(0x136)+_0x27b85e+_0x35fbaa(0xb1),{'body':_0x173497}),_0x49ceae=_0x150fcf[_0x35fbaa(0xfc)](_0x4202e1=>_0x56e0d3(_0x402ffe[_0x35fbaa(0xae)][_0x35fbaa(0x101)][_0x4202e1],_0x27b85e,_0x3f7e8f))['filter'](Boolean);return Object[_0x35fbaa(0xca)](_0x402ffe[_0x35fbaa(0xae)][_0x35fbaa(0x131)])[_0x35fbaa(0x11b)](_0x13b36e=>{const _0x3ac8ad=_0x35fbaa;this[_0x3ac8ad(0xfe)]['addUser'](_0x13b36e);}),_0x49ceae;}[_0x5dba39(0x109)](_0x45fd88){const _0x562672=_0x5dba39;return{'id':_0x45fd88['id'],'threadId':_0x45fd88[_0x562672(0xaa)],'ref':_0x45fd88['ref']};}};_0x3ad2c7=_0x1d2106([_0x39f735(0x0,_0x3777e4[_0x5dba39(0xf3)](_0x47855e[_0x5dba39(0xfa)])),_0x39f735(0x1,_0x3777e4[_0x5dba39(0xf3)](_0x3777e4[_0x5dba39(0x111)])),_0x39f735(0x2,_0x3777e4['Inject'](_0x9d204b[_0x5dba39(0xd1)])),_0x39f735(0x3,_0x3777e4[_0x5dba39(0xf3)](_0x3777e4[_0x5dba39(0xf6)]))],_0x3ad2c7);var _0x534494=Object[_0x5dba39(0xd8)],_0x16e760=(_0x5dc478,_0x199edf,_0x1a9220,_0x1882a2)=>{const _0x2cf8db=_0x5dba39;for(var _0x22cdde=_0x1882a2>0x1?void 0x0:_0x1882a2?_0x534494(_0x199edf,_0x1a9220):_0x199edf,_0x5f3c09=_0x5dc478[_0x2cf8db(0x116)]-0x1,_0x379d27;_0x5f3c09>=0x0;_0x5f3c09--)(_0x379d27=_0x5dc478[_0x5f3c09])&&(_0x22cdde=_0x379d27(_0x22cdde)||_0x22cdde);return _0x22cdde;},_0xb45429=(_0x197ff1,_0x3a566b)=>(_0x186d53,_0x5493cf)=>_0x3a566b(_0x186d53,_0x5493cf,_0x197ff1);let _0x1d0090=class extends _0x3777e4[_0x5dba39(0x125)]{constructor(_0x34acad,_0x5d4a6d){const _0x5df932=_0x5dba39;super(),this['_threadCommentDataSourceService']=_0x34acad,this[_0x5df932(0xd3)]=_0x5d4a6d,this[_0x5df932(0xd0)]();}[_0x5dba39(0xd0)](){const _0x22de98=_0x5dba39;this[_0x22de98(0xc8)]['dataSource']=this[_0x22de98(0xd3)],this[_0x22de98(0xc8)][_0x22de98(0xb4)]=!0x1;}};_0x1d0090=_0x16e760([_0xb45429(0x0,_0xabdbc4[_0x5dba39(0x11a)]),_0xb45429(0x1,_0x3777e4[_0x5dba39(0xf3)](_0x3ad2c7))],_0x1d0090);var _0x457362=Object[_0x5dba39(0xe2)],_0x33d040=Object[_0x5dba39(0xd8)],_0x361ec0=(_0x4930c6,_0x547a2e,_0x2170a3)=>_0x547a2e in _0x4930c6?_0x457362(_0x4930c6,_0x547a2e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2170a3}):_0x4930c6[_0x547a2e]=_0x2170a3,_0x298e95=(_0xbd0ba1,_0x4c193b,_0x1ad22c,_0x4b0e74)=>{const _0x18ee6b=_0x5dba39;for(var _0x284529=_0x4b0e74>0x1?void 0x0:_0x4b0e74?_0x33d040(_0x4c193b,_0x1ad22c):_0x4c193b,_0x44e791=_0xbd0ba1[_0x18ee6b(0x116)]-0x1,_0x6ee4e4;_0x44e791>=0x0;_0x44e791--)(_0x6ee4e4=_0xbd0ba1[_0x44e791])&&(_0x284529=_0x6ee4e4(_0x284529)||_0x284529);return _0x284529;},_0x30c6c5=(_0x212244,_0x5c905b)=>(_0x1bff08,_0x331eeb)=>_0x5c905b(_0x1bff08,_0x331eeb,_0x212244),_0x1867ba=(_0x17e8c9,_0x70581f,_0x1f285c)=>_0x361ec0(_0x17e8c9,typeof _0x70581f!=_0x5dba39(0x132)?_0x70581f+'':_0x70581f,_0x1f285c);_0x436e08[_0x5dba39(0xa9)]=class extends _0x3777e4[_0x5dba39(0xf9)]{constructor(_0x2146fc=_0x490629,_0x31336a,_0x3d8d32){const _0xaa436c=_0x5dba39;super(),this[_0xaa436c(0xb3)]=_0x2146fc,this['_injector']=_0x31336a,this['_configService']=_0x3d8d32;const {..._0x583d54}=_0x3777e4[_0xaa436c(0xb8)]({},_0x490629,this['_config']);this[_0xaa436c(0x126)][_0xaa436c(0xc1)](_0x47e529,_0x583d54);}['onStarting'](){const _0x3bf3fc=_0x5dba39;[[_0x3ad2c7],[_0x1d0090],[_0x31d783]][_0x3bf3fc(0x11b)](_0x42b645=>{const _0x4bdb0f=_0x3bf3fc;this[_0x4bdb0f(0x10e)]['add'](_0x42b645);});}[_0x5dba39(0xf8)](){const _0x1d6870=_0x5dba39;this['_injector'][_0x1d6870(0x120)](_0x1d0090),this['_injector'][_0x1d6870(0x120)](_0x31d783);}},_0x1867ba(_0x436e08[_0x5dba39(0xa9)],_0x5dba39(0x10f),_0x48cf41),_0x1867ba(_0x436e08[_0x5dba39(0xa9)],_0x5dba39(0x113),_0x3777e4[_0x5dba39(0x129)]['UNIVER_UNKNOWN']),_0x436e08[_0x5dba39(0xa9)]=_0x298e95([_0x3777e4[_0x5dba39(0x10d)](_0x24e3d7['UniverThreadCommentUIPlugin'],_0x9d204b[_0x5dba39(0x123)],_0x39e458[_0x5dba39(0x128)]),_0x30c6c5(0x1,_0x3777e4[_0x5dba39(0xf3)](_0x3777e4[_0x5dba39(0xf6)])),_0x30c6c5(0x2,_0x3777e4[_0x5dba39(0x134)])],_0x436e08[_0x5dba39(0xa9)]),Object[_0x5dba39(0xe2)](_0x436e08,Symbol[_0x5dba39(0xf7)],{'value':_0x5dba39(0xe7)});}));
|
|
1
|
+
function _0x144e(_0x5da490,_0x3b2b93){const _0x58681b=_0x5868();return _0x144e=function(_0x144e43,_0x579c0a){_0x144e43=_0x144e43-0x11b;let _0x4fe74c=_0x58681b[_0x144e43];return _0x4fe74c;},_0x144e(_0x5da490,_0x3b2b93);}function _0x5868(){const _0x2c62cd=['Solved','_config','onStarting','CustomRangeType','Reply','values','map','UniverThreadCommentDataSourcePlugin','273xeQsBR','UniverNetwork','users','parse','replies','CommentService','createTimestamp','Add','rangeId','DependentOn','body','UniverProLicense','_threadCommentDataSourceService','deleteComment','getOwnPropertyDescriptor','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_httpService','YYYY/MM/DD\x20HH:mm','userId','addUser','reply','_init','ref','merge','_injector','dayjs','5rXmnaQ','amd','post','CollaborationSessionService','exports','filter','bufferTime','saveCommentToSnapshot','object','COMMENT','getComment','user','toStringTag','/list','getCurrentUser','size','addComment','get','type','UniverProCollaborationClient','updateComment','error','comment','/universer-api/comment/unit/','Plugin','forEach','listComments','customRanges','root','requireSession','Disposable','pluginName','subscribe','slice','3677052QzxaML','10VOQAkj','delete','replyId','resolved','UniverProThreadCommentDatasource','OpenOrReOpen','/solved','Edit','setConfig','64716RslTfQ','personId','UniverThreadCommentUi','Injector','@univerjs-pro/collaboration-client','_initDataSource','UserManagerService','_userService','Solve','defineProperty','1368YFIlIc','@univerjs/network','UNRECOGNIZED','Module','11034126BwrxHB','HTTPService','/reply','/universer-api/user/list','dataSource','UniverThreadCommentUIPlugin','solved','disposeWithMe','_commentService','code','getMemberID','3442802NTzETH','UNIVER_UNKNOWN','parentId','_configService','_threadCommentDataSource','payload','rangeType','Inject','syncUpdateMutationToColla','length','_sessionService','threadId','64519TYTFzW','userID','rxjs','_threadCommentModel','@univerjs-pro/license','UniverCore','IThreadCommentDataSourceService','@univerjs/core','12CdeURU','Unknown','resolveComment','comments','_initUserSync','1629267RREtYT','stringify','@univerjs/thread-comment-ui','getUnit','Delete','add','find','commentUpdate$','25269673ynAwDC','content'];_0x5868=function(){return _0x2c62cd;};return _0x5868();}(function(_0x30f443,_0x32520b){const _0x3585fc=_0x144e,_0x301b34=_0x30f443();while(!![]){try{const _0x3245b4=parseInt(_0x3585fc(0x121))/0x1+-parseInt(_0x3585fc(0x193))/0x2+-parseInt(_0x3585fc(0x133))/0x3*(parseInt(_0x3585fc(0x17a))/0x4)+parseInt(_0x3585fc(0x14e))/0x5*(parseInt(_0x3585fc(0x170))/0x6)+parseInt(_0x3585fc(0x19f))/0x7*(-parseInt(_0x3585fc(0x184))/0x8)+parseInt(_0x3585fc(0x188))/0x9*(parseInt(_0x3585fc(0x171))/0xa)+parseInt(_0x3585fc(0x129))/0xb*(parseInt(_0x3585fc(0x11c))/0xc);if(_0x3245b4===_0x32520b)break;else _0x301b34['push'](_0x301b34['shift']());}catch(_0x38f0d4){_0x301b34['push'](_0x301b34['shift']());}}}(_0x5868,0xf30f1),function(_0x7e8278,_0x2d4a1c){const _0x3793be=_0x144e;typeof exports==_0x3793be(0x156)&&typeof module<'u'?_0x2d4a1c(exports,require(_0x3793be(0x17e)),require(_0x3793be(0x1a3)),require('@univerjs/core'),require(_0x3793be(0x123)),require('@univerjs/thread-comment'),require(_0x3793be(0x1a1)),require(_0x3793be(0x185))):typeof define=='function'&&define[_0x3793be(0x14f)]?define([_0x3793be(0x152),_0x3793be(0x17e),_0x3793be(0x1a3),_0x3793be(0x11b),_0x3793be(0x123),'@univerjs/thread-comment',_0x3793be(0x1a1),_0x3793be(0x185)],_0x2d4a1c):(_0x7e8278=typeof globalThis<'u'?globalThis:_0x7e8278||self,_0x2d4a1c(_0x7e8278[_0x3793be(0x175)]={},_0x7e8278[_0x3793be(0x161)],_0x7e8278[_0x3793be(0x13e)],_0x7e8278[_0x3793be(0x1a4)],_0x7e8278[_0x3793be(0x17c)],_0x7e8278['UniverThreadComment'],_0x7e8278['rxjs'],_0x7e8278[_0x3793be(0x134)]));}(this,function(_0x52fcf5,_0x460bf4,_0x3b803c,_0x533f59,_0x374430,_0x3271af,_0x1d0038,_0x57e286){'use strict';const _0x2386f2=_0x144e;const _0x3d6877=_0x2386f2(0x143);var _0x459f91=(_0x2b496f=>(_0x2b496f[_0x2b496f[_0x2386f2(0x176)]=0x0]=_0x2386f2(0x176),_0x2b496f[_0x2b496f[_0x2386f2(0x12b)]=0x1]='Solved',_0x2b496f[_0x2b496f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2b496f))(_0x459f91||{}),_0x84442c=(_0x61b418=>(_0x61b418[_0x61b418[_0x2386f2(0x11d)]=0x0]=_0x2386f2(0x11d),_0x61b418[_0x61b418[_0x2386f2(0x13a)]=0x1]='Add',_0x61b418[_0x61b418['Reply']=0x2]=_0x2386f2(0x12f),_0x61b418[_0x61b418['Edit']=0x3]='Edit',_0x61b418[_0x61b418[_0x2386f2(0x125)]=0x4]='Delete',_0x61b418[_0x61b418[_0x2386f2(0x182)]=0x5]=_0x2386f2(0x182),_0x61b418[_0x61b418[_0x2386f2(0x186)]=-0x1]=_0x2386f2(0x186),_0x61b418))(_0x84442c||{});const _0x4dace6=_0x1acd73=>_0x533f59[_0x2386f2(0x14d)](new Date(+_0x1acd73))['format'](_0x2386f2(0x145)),_0x2f3f71=async(_0x4c44ff,_0x18c701)=>{const _0x2982de=_0x2386f2,_0x29596a=_0x4c44ff[_0x2982de(0x15f)](_0x533f59[_0x2982de(0x180)]),_0x2012d8=_0x4c44ff[_0x2982de(0x15f)](_0x57e286[_0x2982de(0x189)]);_0x18c701[_0x2982de(0x167)](_0x120917=>{const _0x556330=_0x2982de;_0x29596a['getUser'](_0x120917)&&_0x18c701[_0x556330(0x172)](_0x120917);}),_0x18c701[_0x2982de(0x15d)]&&(await _0x2012d8[_0x2982de(0x15f)](_0x2982de(0x18b),{'params':{'userIDs':[..._0x18c701]}}))[_0x2982de(0x13d)][_0x2982de(0x135)]['forEach'](_0x4ed85b=>{const _0x4f4c7a=_0x2982de;_0x4ed85b&&_0x29596a[_0x4f4c7a(0x147)](_0x4ed85b);});};var _0x5a889f=Object[_0x2386f2(0x141)],_0x1017d3=(_0x50197a,_0x424c7b,_0xc08815,_0x1f61ca)=>{for(var _0x47b1a9=_0x1f61ca>0x1?void 0x0:_0x1f61ca?_0x5a889f(_0x424c7b,_0xc08815):_0x424c7b,_0x3a703d=_0x50197a['length']-0x1,_0x54cff3;_0x3a703d>=0x0;_0x3a703d--)(_0x54cff3=_0x50197a[_0x3a703d])&&(_0x47b1a9=_0x54cff3(_0x47b1a9)||_0x47b1a9);return _0x47b1a9;},_0x5d3c09=(_0x5c79cc,_0x1b509c)=>(_0x1ae58d,_0x1a83cb)=>_0x1b509c(_0x1ae58d,_0x1a83cb,_0x5c79cc);let _0x263cbc=class extends _0x533f59[_0x2386f2(0x16c)]{constructor(_0xc9a493,_0x4148e9,_0x34c174,_0x30effe){const _0x4c7d3c=_0x2386f2;super(),this[_0x4c7d3c(0x190)]=_0xc9a493,this[_0x4c7d3c(0x1a2)]=_0x4148e9,this[_0x4c7d3c(0x181)]=_0x34c174,this['_injector']=_0x30effe,this[_0x4c7d3c(0x149)](),this[_0x4c7d3c(0x120)]();}[_0x2386f2(0x120)](){const _0x32e899=_0x2386f2;this['disposeWithMe'](this['_threadCommentModel'][_0x32e899(0x128)]['pipe'](_0x1d0038[_0x32e899(0x154)](0x10))[_0x32e899(0x16e)](_0xed4857=>{const _0x105050=_0x32e899,_0x3f1c3c=new Set();_0xed4857[_0x105050(0x167)](_0x5a94bf=>{const _0x1ff796=_0x105050;switch(_0x5a94bf['type']){case _0x1ff796(0x126):{const _0x48b069=_0x5a94bf[_0x1ff796(0x198)][_0x1ff796(0x17b)];_0x3f1c3c['add'](_0x48b069);break;}}}),_0x2f3f71(this[_0x105050(0x14c)],_0x3f1c3c);}));}[_0x2386f2(0x149)](){const _0x7ee1ac=_0x2386f2;this[_0x7ee1ac(0x18f)](this[_0x7ee1ac(0x190)][_0x7ee1ac(0x128)][_0x7ee1ac(0x16e)](async _0x405cdc=>{const _0x1da5fc=_0x7ee1ac;var _0x2e6ec4,_0x3ef01e,_0x3d6e3a,_0x2d7f59;const _0x54d233=(_0x2e6ec4=this[_0x1da5fc(0x1a2)][_0x1da5fc(0x124)](_0x405cdc[_0x1da5fc(0x142)])[_0x1da5fc(0x127)](_0x9f3afb=>_0x9f3afb['threadId']===_0x405cdc[_0x1da5fc(0x19e)]))==null?void 0x0:_0x2e6ec4[_0x1da5fc(0x16a)];if(!_0x54d233)return;const {unitId:_0xd35bd8,subUnitId:_0x289a41}=_0x54d233;switch(_0x405cdc[_0x1da5fc(0x159)]&&this['_userService'][_0x1da5fc(0x147)](_0x405cdc[_0x1da5fc(0x159)]),_0x405cdc[_0x1da5fc(0x160)]){case _0x84442c[_0x1da5fc(0x13a)]:break;case _0x84442c[_0x1da5fc(0x12f)]:{this[_0x1da5fc(0x1a2)][_0x1da5fc(0x15e)](_0xd35bd8,_0x289a41,{'unitId':_0xd35bd8,'subUnitId':_0x289a41,'ref':'','id':_0x405cdc[_0x1da5fc(0x173)],'dT':_0x4dace6(+_0x405cdc[_0x1da5fc(0x139)]),'threadId':_0x405cdc[_0x1da5fc(0x19e)],'personId':(_0x3d6e3a=(_0x3ef01e=_0x405cdc[_0x1da5fc(0x159)])==null?void 0x0:_0x3ef01e[_0x1da5fc(0x1a0)])!=null?_0x3d6e3a:_0x405cdc[_0x1da5fc(0x146)],'text':JSON[_0x1da5fc(0x136)](_0x405cdc[_0x1da5fc(0x12a)]),'parentId':_0x54d233['id']});break;}case _0x84442c['Delete']:{const _0x5942da=this['_threadCommentModel'][_0x1da5fc(0x158)](_0xd35bd8,_0x289a41,_0x405cdc[_0x1da5fc(0x173)]);_0x5942da&&_0x5942da[_0x1da5fc(0x195)]&&this['_threadCommentModel'][_0x1da5fc(0x140)](_0xd35bd8,_0x289a41,_0x405cdc['replyId']);break;}case _0x84442c[_0x1da5fc(0x178)]:{this[_0x1da5fc(0x1a2)][_0x1da5fc(0x162)](_0xd35bd8,_0x289a41,{'commentId':_0x405cdc[_0x1da5fc(0x173)],'text':JSON[_0x1da5fc(0x136)](_0x405cdc['content'])});break;}case _0x84442c[_0x1da5fc(0x182)]:{const _0x585260=(_0x2d7f59=this['_threadCommentModel'][_0x1da5fc(0x124)](_0x405cdc['unitId'])[_0x1da5fc(0x127)](_0x5be8e6=>_0x5be8e6[_0x1da5fc(0x19e)]===_0x405cdc[_0x1da5fc(0x19e)]))==null?void 0x0:_0x2d7f59['root'];_0x585260&&this[_0x1da5fc(0x1a2)]['resolveComment'](_0xd35bd8,_0x289a41,_0x585260['id'],_0x405cdc[_0x1da5fc(0x18e)]===_0x459f91[_0x1da5fc(0x12b)]);break;}}}));}};_0x263cbc=_0x1017d3([_0x5d3c09(0x0,_0x533f59[_0x2386f2(0x19a)](_0x460bf4[_0x2386f2(0x138)])),_0x5d3c09(0x1,_0x533f59[_0x2386f2(0x19a)](_0x3271af['ThreadCommentModel'])),_0x5d3c09(0x2,_0x533f59[_0x2386f2(0x19a)](_0x533f59['UserManagerService'])),_0x5d3c09(0x3,_0x533f59['Inject'](_0x533f59['Injector']))],_0x263cbc);const _0x400adb='thread-comment-data-source.config',_0x14bcf8={};var _0x4358da=Object[_0x2386f2(0x141)],_0x282d75=(_0x1387f2,_0x12c240,_0x45f8aa,_0xd662af)=>{for(var _0x57e31c=_0xd662af>0x1?void 0x0:_0xd662af?_0x4358da(_0x12c240,_0x45f8aa):_0x12c240,_0x2cccdf=_0x1387f2['length']-0x1,_0x418287;_0x2cccdf>=0x0;_0x2cccdf--)(_0x418287=_0x1387f2[_0x2cccdf])&&(_0x57e31c=_0x418287(_0x57e31c)||_0x57e31c);return _0x57e31c;},_0x162e0f=(_0xd841c3,_0x25e74e)=>(_0x48b2dc,_0x14a1d6)=>_0x25e74e(_0x48b2dc,_0x14a1d6,_0xd841c3);function _0x28e354(_0x50f178,_0x5cb8d7){const _0x164757=_0x2386f2,_0x154998=_0x50f178[_0x164757(0x137)][0x0];return{..._0x5cb8d7,'id':_0x154998['replyId'],'resolved':_0x50f178[_0x164757(0x18e)]===0x1,'dT':_0x4dace6(_0x154998['createTimestamp']),'personId':_0x154998['userId'],'threadId':_0x154998[_0x164757(0x19e)]};}function _0x245674(_0x505be3,_0x18b5ba,_0x4711a6){const _0x430009=_0x2386f2;var _0x393384,_0x13aeab;if(((_0x13aeab=(_0x393384=_0x505be3==null?void 0x0:_0x505be3[_0x430009(0x137)])==null?void 0x0:_0x393384[_0x430009(0x19c)])!=null?_0x13aeab:0x0)>0x0){const _0x49f296=(_0x1faeeb,_0xd6642)=>({'id':_0x1faeeb[_0x430009(0x173)],'threadId':_0x1faeeb[_0x430009(0x19e)],'dT':_0x4dace6(_0x1faeeb[_0x430009(0x139)]),'personId':_0x1faeeb[_0x430009(0x146)],'resolved':_0x505be3[_0x430009(0x18e)]===_0x459f91[_0x430009(0x12b)],'unitId':_0x18b5ba,'subUnitId':_0x4711a6,'text':JSON['parse'](_0x1faeeb[_0x430009(0x12a)]),'parentId':_0xd6642}),_0x4b4b9a=_0x49f296(_0x505be3[_0x430009(0x137)][0x0]);return{..._0x4b4b9a,'children':_0x505be3[_0x430009(0x137)][_0x430009(0x16f)](0x1)[_0x430009(0x131)](_0x329db7=>_0x49f296(_0x329db7,_0x4b4b9a['id']))};}return null;}let _0x48590c=class{constructor(_0x2fd508,_0x395f10,_0x368e3d,_0x592b78){const _0x398a93=_0x2386f2;this[_0x398a93(0x144)]=_0x2fd508,this['_userService']=_0x395f10,this['_sessionService']=_0x368e3d,this['_injector']=_0x592b78;}async[_0x2386f2(0x15e)](_0x162e4d){const _0x11a6c0=_0x2386f2;var _0x540377,_0x37f56b;const {parentId:_0x4fdf33,unitId:_0x2f3531,text:_0x57b59f,threadId:_0x43135a}=_0x162e4d,_0x45d8cc=(_0x37f56b=(_0x540377=_0x57b59f[_0x11a6c0(0x169)])==null?void 0x0:_0x540377[_0x11a6c0(0x153)](_0x41b6c8=>_0x41b6c8[_0x11a6c0(0x199)]===_0x533f59['CustomRangeType'][_0x11a6c0(0x157)])[_0x11a6c0(0x131)](_0x4bcff5=>_0x4bcff5[_0x11a6c0(0x13b)]))!=null?_0x37f56b:[],_0x178236=JSON[_0x11a6c0(0x122)](_0x57b59f),_0x2c782d=(await this[_0x11a6c0(0x19d)][_0x11a6c0(0x16b)](_0x2f3531))[_0x11a6c0(0x192)]();if(_0x4fdf33){const _0x1f4fab={'memberId':_0x2c782d,'unitId':_0x2f3531,'content':_0x178236,'mention':_0x45d8cc,'threadId':_0x43135a},_0x208fab=(await this[_0x11a6c0(0x144)][_0x11a6c0(0x150)]('/universer-api/comment/unit/'+_0x2f3531+_0x11a6c0(0x18a),{'body':_0x1f4fab}))[_0x11a6c0(0x13d)][_0x11a6c0(0x148)];return{..._0x162e4d,'id':_0x208fab[_0x11a6c0(0x173)],'dT':_0x533f59[_0x11a6c0(0x14d)](+_0x208fab[_0x11a6c0(0x139)])['format'](_0x11a6c0(0x145)),'personId':_0x208fab[_0x11a6c0(0x146)]};}else{const _0x299f9c={'memberId':_0x2c782d,'unitId':_0x2f3531,'content':_0x178236,'mention':_0x45d8cc},_0x113cb2=await this[_0x11a6c0(0x144)][_0x11a6c0(0x150)](_0x11a6c0(0x165)+_0x2f3531+'/add',{'body':_0x299f9c});return _0x28e354(_0x113cb2[_0x11a6c0(0x13d)][_0x11a6c0(0x164)],_0x162e4d);}}async[_0x2386f2(0x162)](_0x287dc5){const _0x5dfd0d=_0x2386f2;var _0x8f3cf4,_0x2f0cb1;const {text:_0xf5b636,unitId:_0x5a8a0e}=_0x287dc5,_0x2dc080=(_0x2f0cb1=(_0x8f3cf4=_0xf5b636[_0x5dfd0d(0x169)])==null?void 0x0:_0x8f3cf4[_0x5dfd0d(0x153)](_0xc2c3b1=>_0xc2c3b1[_0x5dfd0d(0x199)]===_0x533f59[_0x5dfd0d(0x12e)]['COMMENT'])[_0x5dfd0d(0x131)](_0x313874=>_0x313874[_0x5dfd0d(0x13b)]))!=null?_0x2f0cb1:[],_0x4769f2=JSON[_0x5dfd0d(0x122)](_0xf5b636),_0x541115=_0x287dc5[_0x5dfd0d(0x19e)],_0x2d581c=_0x287dc5['id'],_0x5c02b7={'memberId':(await this['_sessionService']['requireSession'](_0x5a8a0e))[_0x5dfd0d(0x192)](),'unitId':_0x5a8a0e,'threadId':_0x541115,'mention':_0x2dc080,'content':_0x4769f2,'replyId':_0x2d581c},_0x2eb59c=await this[_0x5dfd0d(0x144)][_0x5dfd0d(0x150)](_0x5dfd0d(0x165)+_0x5a8a0e+'/edit',{'body':_0x5c02b7});return!_0x2eb59c[_0x5dfd0d(0x13d)][_0x5dfd0d(0x163)]||_0x2eb59c[_0x5dfd0d(0x13d)]['error'][_0x5dfd0d(0x191)]===0x1;}async[_0x2386f2(0x11e)](_0x21aea6){const _0x3123d7=_0x2386f2,{unitId:_0x4da0ce}=_0x21aea6,_0x199f1d=_0x21aea6[_0x3123d7(0x19e)],_0x44681a={'memberId':this['_userService'][_0x3123d7(0x15c)]()['userID'],'unitId':_0x4da0ce,'threadId':_0x199f1d,'solved':_0x21aea6[_0x3123d7(0x174)]?_0x459f91[_0x3123d7(0x12b)]:_0x459f91['OpenOrReOpen']},_0x302cd0=await this['_httpService'][_0x3123d7(0x150)](_0x3123d7(0x165)+_0x4da0ce+_0x3123d7(0x177),{'body':_0x44681a});return!_0x302cd0[_0x3123d7(0x13d)][_0x3123d7(0x163)]||_0x302cd0[_0x3123d7(0x13d)][_0x3123d7(0x163)][_0x3123d7(0x191)]===0x1;}async[_0x2386f2(0x140)](_0x30a1d7,_0x3314fb,_0x31b129,_0x424c42){const _0x451a23=_0x2386f2,_0x3d5773={'memberId':(await this[_0x451a23(0x19d)][_0x451a23(0x16b)](_0x30a1d7))[_0x451a23(0x192)](),'threadId':_0x31b129,'replyId':_0x424c42,'unitId':_0x30a1d7},_0x10783c=await this['_httpService'][_0x451a23(0x150)](_0x451a23(0x165)+_0x30a1d7+'/delete',{'body':_0x3d5773});return!_0x10783c['body'][_0x451a23(0x163)]||_0x10783c[_0x451a23(0x13d)]['error'][_0x451a23(0x191)]===0x1;}async[_0x2386f2(0x168)](_0x21b6db,_0x2d656b,_0x59ce0a){const _0x34e14e=_0x2386f2,_0x5d595d={'unitId':_0x21b6db,'threadId':_0x59ce0a},_0x2d09c6=await this[_0x34e14e(0x144)][_0x34e14e(0x150)](_0x34e14e(0x165)+_0x21b6db+_0x34e14e(0x15b),{'body':_0x5d595d}),_0x5c3270=_0x59ce0a[_0x34e14e(0x131)](_0x233dcb=>_0x245674(_0x2d09c6['body'][_0x34e14e(0x11f)][_0x233dcb],_0x21b6db,_0x2d656b))['filter'](Boolean);return Object[_0x34e14e(0x130)](_0x2d09c6[_0x34e14e(0x13d)][_0x34e14e(0x135)])['forEach'](_0x52b848=>{const _0x4aaf01=_0x34e14e;this[_0x4aaf01(0x181)][_0x4aaf01(0x147)](_0x52b848);}),_0x5c3270;}[_0x2386f2(0x155)](_0x19b81a){const _0x11c25c=_0x2386f2;return{'id':_0x19b81a['id'],'threadId':_0x19b81a[_0x11c25c(0x19e)],'ref':_0x19b81a[_0x11c25c(0x14a)]};}};_0x48590c=_0x282d75([_0x162e0f(0x0,_0x533f59[_0x2386f2(0x19a)](_0x57e286[_0x2386f2(0x189)])),_0x162e0f(0x1,_0x533f59[_0x2386f2(0x19a)](_0x533f59[_0x2386f2(0x180)])),_0x162e0f(0x2,_0x533f59[_0x2386f2(0x19a)](_0x460bf4[_0x2386f2(0x151)])),_0x162e0f(0x3,_0x533f59[_0x2386f2(0x19a)](_0x533f59[_0x2386f2(0x17d)]))],_0x48590c);var _0x3a80ec=Object[_0x2386f2(0x141)],_0x1fe58b=(_0x426c80,_0x45ac1d,_0x3d9df2,_0x1f7684)=>{const _0x2f8a41=_0x2386f2;for(var _0x562714=_0x1f7684>0x1?void 0x0:_0x1f7684?_0x3a80ec(_0x45ac1d,_0x3d9df2):_0x45ac1d,_0x5e4d0d=_0x426c80[_0x2f8a41(0x19c)]-0x1,_0x4c0df6;_0x5e4d0d>=0x0;_0x5e4d0d--)(_0x4c0df6=_0x426c80[_0x5e4d0d])&&(_0x562714=_0x4c0df6(_0x562714)||_0x562714);return _0x562714;},_0x353c57=(_0x3bddc3,_0x3f777d)=>(_0x341426,_0x17fad9)=>_0x3f777d(_0x341426,_0x17fad9,_0x3bddc3);let _0x236d90=class extends _0x533f59['Disposable']{constructor(_0x728e00,_0x3ee7f0){const _0x2a5f58=_0x2386f2;super(),this[_0x2a5f58(0x13f)]=_0x728e00,this[_0x2a5f58(0x197)]=_0x3ee7f0,this[_0x2a5f58(0x17f)]();}[_0x2386f2(0x17f)](){const _0x5aa5ab=_0x2386f2;this['_threadCommentDataSourceService'][_0x5aa5ab(0x18c)]=this['_threadCommentDataSource'],this[_0x5aa5ab(0x13f)][_0x5aa5ab(0x19b)]=!0x1;}};_0x236d90=_0x1fe58b([_0x353c57(0x0,_0x3271af[_0x2386f2(0x1a5)]),_0x353c57(0x1,_0x533f59[_0x2386f2(0x19a)](_0x48590c))],_0x236d90);var _0x145173=Object[_0x2386f2(0x183)],_0x56b775=Object[_0x2386f2(0x141)],_0x357519=(_0x405743,_0x1815ea,_0x256757)=>_0x1815ea in _0x405743?_0x145173(_0x405743,_0x1815ea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x256757}):_0x405743[_0x1815ea]=_0x256757,_0x3579d8=(_0x3967d0,_0x2a84ab,_0xf6c7de,_0x22b5ab)=>{const _0x1665cd=_0x2386f2;for(var _0x40fa8e=_0x22b5ab>0x1?void 0x0:_0x22b5ab?_0x56b775(_0x2a84ab,_0xf6c7de):_0x2a84ab,_0x263861=_0x3967d0[_0x1665cd(0x19c)]-0x1,_0x5c8c4e;_0x263861>=0x0;_0x263861--)(_0x5c8c4e=_0x3967d0[_0x263861])&&(_0x40fa8e=_0x5c8c4e(_0x40fa8e)||_0x40fa8e);return _0x40fa8e;},_0x5f22ad=(_0x53159c,_0x2dedfa)=>(_0x44fb77,_0xbae929)=>_0x2dedfa(_0x44fb77,_0xbae929,_0x53159c),_0x3982ad=(_0x5ee866,_0xceede4,_0x5147ec)=>_0x357519(_0x5ee866,typeof _0xceede4!='symbol'?_0xceede4+'':_0xceede4,_0x5147ec);_0x52fcf5['UniverThreadCommentDataSourcePlugin']=class extends _0x533f59[_0x2386f2(0x166)]{constructor(_0x178b68=_0x14bcf8,_0x1e159f,_0x21ef8e){const _0x234528=_0x2386f2;super(),this[_0x234528(0x12c)]=_0x178b68,this['_injector']=_0x1e159f,this['_configService']=_0x21ef8e;const {..._0x20c222}=_0x533f59[_0x234528(0x14b)]({},_0x14bcf8,this[_0x234528(0x12c)]);this[_0x234528(0x196)][_0x234528(0x179)](_0x400adb,_0x20c222);}[_0x2386f2(0x12d)](){const _0x176332=_0x2386f2;[[_0x48590c],[_0x236d90],[_0x263cbc]][_0x176332(0x167)](_0x3f41b5=>{const _0x2e9ad3=_0x176332;this[_0x2e9ad3(0x14c)]['add'](_0x3f41b5);});}['onReady'](){const _0x4aee00=_0x2386f2;this[_0x4aee00(0x14c)]['get'](_0x236d90),this['_injector'][_0x4aee00(0x15f)](_0x263cbc);}},_0x3982ad(_0x52fcf5[_0x2386f2(0x132)],_0x2386f2(0x16d),_0x3d6877),_0x3982ad(_0x52fcf5[_0x2386f2(0x132)],_0x2386f2(0x160),_0x533f59['UniverInstanceType'][_0x2386f2(0x194)]),_0x52fcf5[_0x2386f2(0x132)]=_0x3579d8([_0x533f59[_0x2386f2(0x13c)](_0x374430[_0x2386f2(0x18d)],_0x460bf4['UniverCollaborationClientPlugin'],_0x3b803c['UniverLicensePlugin']),_0x5f22ad(0x1,_0x533f59[_0x2386f2(0x19a)](_0x533f59[_0x2386f2(0x17d)])),_0x5f22ad(0x2,_0x533f59['IConfigService'])],_0x52fcf5['UniverThreadCommentDataSourcePlugin']),Object[_0x2386f2(0x183)](_0x52fcf5,Symbol[_0x2386f2(0x15a)],{'value':_0x2386f2(0x187)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.7.0-nightly.
|
|
3
|
+
"version": "0.7.0-nightly.202505191607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.7.0-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.7.0-nightly.
|
|
50
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.7.0-nightly.202505191607",
|
|
49
|
+
"@univerjs-pro/license": "0.7.0-nightly.202505191607",
|
|
50
|
+
"@univerjs/network": "0.7.0-nightly.202505191607",
|
|
51
|
+
"@univerjs/core": "0.7.0-nightly.202505191607",
|
|
51
52
|
"@univerjs/protocol": "0.1.46-alpha.3",
|
|
52
|
-
"@univerjs/thread-comment": "0.7.0-nightly.
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.7.0-nightly.
|
|
54
|
-
"@univerjs/network": "0.7.0-nightly.202505171606"
|
|
53
|
+
"@univerjs/thread-comment": "0.7.0-nightly.202505191607",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.7.0-nightly.202505191607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|