@univerjs-pro/thread-comment-datasource 0.10.13 → 0.10.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +10 -10
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x3dcb94=_0x537f;(function(_0x58d913,_0x23bde1){const _0x294a91=_0x537f,_0xc7f612=_0x58d913();while(!![]){try{const _0x47a73f=parseInt(_0x294a91(0x15e))/0x1*(-parseInt(_0x294a91(0x163))/0x2)+-parseInt(_0x294a91(0x1a2))/0x3*(parseInt(_0x294a91(0x179))/0x4)+-parseInt(_0x294a91(0x17a))/0x5+parseInt(_0x294a91(0x149))/0x6*(-parseInt(_0x294a91(0x170))/0x7)+-parseInt(_0x294a91(0x17f))/0x8*(-parseInt(_0x294a91(0x16a))/0x9)+parseInt(_0x294a91(0x189))/0xa+parseInt(_0x294a91(0x1af))/0xb;if(_0x47a73f===_0x23bde1)break;else _0xc7f612['push'](_0xc7f612['shift']());}catch(_0x2addbd){_0xc7f612['push'](_0xc7f612['shift']());}}}(_0x59bc,0x9e0a5));Object[_0x3dcb94(0x158)](exports,Symbol[_0x3dcb94(0x145)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2795e4=>(_0x2795e4[_0x2795e4[_0x3dcb94(0x16b)]=0x0]=_0x3dcb94(0x16b),_0x2795e4[_0x2795e4[_0x3dcb94(0x183)]=0x1]=_0x3dcb94(0x183),_0x2795e4[_0x2795e4[_0x3dcb94(0x1ae)]=-0x1]=_0x3dcb94(0x1ae),_0x2795e4))(I||{}),v=(_0x121bc6=>(_0x121bc6[_0x121bc6[_0x3dcb94(0x160)]=0x0]=_0x3dcb94(0x160),_0x121bc6[_0x121bc6['Add']=0x1]=_0x3dcb94(0x140),_0x121bc6[_0x121bc6[_0x3dcb94(0x14f)]=0x2]='Reply',_0x121bc6[_0x121bc6[_0x3dcb94(0x15f)]=0x3]=_0x3dcb94(0x15f),_0x121bc6[_0x121bc6['Delete']=0x4]=_0x3dcb94(0x16e),_0x121bc6[_0x121bc6['Solve']=0x5]=_0x3dcb94(0x187),_0x121bc6[_0x121bc6[_0x3dcb94(0x1ae)]=-0x1]=_0x3dcb94(0x1ae),_0x121bc6))(v||{});const f=_0x4b4ddc=>c[_0x3dcb94(0x1a1)](new Date(+_0x4b4ddc))[_0x3dcb94(0x141)](_0x3dcb94(0x177)),R=async(_0xa8388d,_0x45085b)=>{const _0x58e4d=_0x3dcb94,_0x2d6d76=_0xa8388d['get'](c[_0x58e4d(0x181)]),_0x28c654=_0xa8388d[_0x58e4d(0x150)](P[_0x58e4d(0x178)]);_0x45085b['forEach'](_0x4a7d5b=>{const _0x5b2c08=_0x58e4d;_0x2d6d76[_0x5b2c08(0x148)](_0x4a7d5b)&&_0x45085b[_0x5b2c08(0x13f)](_0x4a7d5b);}),_0x45085b[_0x58e4d(0x172)]&&(await _0x28c654[_0x58e4d(0x150)](_0x58e4d(0x1b0),{'params':{'userIDs':[..._0x45085b]}}))[_0x58e4d(0x1a6)]['users'][_0x58e4d(0x1ab)](_0xd6d266=>{const _0x472a5c=_0x58e4d;_0xd6d266&&_0x2d6d76[_0x472a5c(0x157)](_0xd6d266);});};function _0x59bc(){const _0x193253=['34213BNCZsM','Edit','Unknown','_threadCommentDataSourceService','parentId','74nAOgdS','userID','find','deleteComment','content','UniverLicensePlugin','onStarting','6417jQtMFb','OpenOrReOpen','threadId','userId','Delete','/add','8035174rjtxDM','rangeId','size','add','DependentOn','/solved','requireSession','YYYY/MM/DD\x20HH:mm','HTTPService','88492GfzqnC','1339010iAtAzY','getCurrentUser','getMemberID','onReady','ThreadCommentModel','3456xahHte','_configService','UserManagerService','personId','Solved','/universer-api/comment/unit/','pipe','slice','Solve','_initDataSource','10213940kumHPv','comment','CollaborationSessionService','comments','resolveComment','filter','length','getComment','getUnit','IConfigService','_init','map','symbol','UniverThreadCommentDataSourcePlugin','user','merge','rangeType','subscribe','root','UniverInstanceType','code','customRanges','/edit','reply','dayjs','84rnhAqw','_injector','_userService','solved','body','UniverThreadCommentUIPlugin','_commentService','_httpService','UNIVER_UNKNOWN','forEach','values','/delete','UNRECOGNIZED','28808252pniULH','/universer-api/user/list','error','getOwnPropertyDescriptor','parse','_sessionService','COMMENT','disposeWithMe','delete','Add','format','Injector','replies','_threadCommentModel','toStringTag','commentUpdate$','updateComment','getUser','6FTeDcW','CustomRangeType','setConfig','addComment','bufferTime','Inject','Reply','get','Disposable','replyId','stringify','syncUpdateMutationToColla','createTimestamp','_config','addUser','defineProperty','unitId','saveCommentToSnapshot','_threadCommentDataSource','post','type'];_0x59bc=function(){return _0x193253;};return _0x59bc();}var $=Object[_0x3dcb94(0x1b2)],E=(_0x5af5b1,_0x14ff0b,_0x35f6b8,_0x25f776)=>{const _0x31732d=_0x3dcb94;for(var _0x28f086=_0x25f776>0x1?void 0x0:_0x25f776?$(_0x14ff0b,_0x35f6b8):_0x14ff0b,_0xc1bfae=_0x5af5b1[_0x31732d(0x18f)]-0x1,_0x52a720;_0xc1bfae>=0x0;_0xc1bfae--)(_0x52a720=_0x5af5b1[_0xc1bfae])&&(_0x28f086=_0x52a720(_0x28f086)||_0x28f086);return _0x28f086;},S=(_0x3f0ddd,_0x301afc)=>(_0x12aa8f,_0xd41606)=>_0x301afc(_0x12aa8f,_0xd41606,_0x3f0ddd);let _=class extends c[_0x3dcb94(0x151)]{constructor(_0x239896,_0x32303d,_0x310d25,_0x2bc5e9){const _0x5e2a3a=_0x3dcb94;super(),this[_0x5e2a3a(0x1a8)]=_0x239896,this['_threadCommentModel']=_0x32303d,this[_0x5e2a3a(0x1a4)]=_0x310d25,this[_0x5e2a3a(0x1a3)]=_0x2bc5e9,this[_0x5e2a3a(0x193)](),this['_initUserSync']();}['_initUserSync'](){const _0x247bca=_0x3dcb94;this[_0x247bca(0x13e)](this[_0x247bca(0x144)][_0x247bca(0x146)][_0x247bca(0x185)](j[_0x247bca(0x14d)](0x10))[_0x247bca(0x19a)](_0x23b25b=>{const _0xeec6ce=_0x247bca,_0x2b545a=new Set();_0x23b25b[_0xeec6ce(0x1ab)](_0xffd541=>{const _0xe01cbb=_0xeec6ce;switch(_0xffd541[_0xe01cbb(0x15d)]){case _0xe01cbb(0x173):{const _0x4ddaa0=_0xffd541['payload'][_0xe01cbb(0x182)];_0x2b545a[_0xe01cbb(0x173)](_0x4ddaa0);break;}}}),R(this['_injector'],_0x2b545a);}));}[_0x3dcb94(0x193)](){const _0x49800a=_0x3dcb94;this['disposeWithMe'](this[_0x49800a(0x1a8)][_0x49800a(0x146)][_0x49800a(0x19a)](async _0xa7db20=>{const _0x306810=_0x49800a;var _0x7f5c6f,_0x2c9687,_0x1cb43b,_0x3cd200;const _0x5617f4=(_0x7f5c6f=this['_threadCommentModel'][_0x306810(0x191)](_0xa7db20['unitId'])[_0x306810(0x165)](_0x4fbc48=>_0x4fbc48[_0x306810(0x16c)]===_0xa7db20['threadId']))==null?void 0x0:_0x7f5c6f[_0x306810(0x19b)];if(!_0x5617f4)return;const {unitId:_0x579c8e,subUnitId:_0x436294}=_0x5617f4;switch(_0xa7db20[_0x306810(0x197)]&&this[_0x306810(0x1a4)]['addUser'](_0xa7db20[_0x306810(0x197)]),_0xa7db20[_0x306810(0x15d)]){case v['Add']:break;case v['Reply']:{this[_0x306810(0x144)][_0x306810(0x14c)](_0x579c8e,_0x436294,{'unitId':_0x579c8e,'subUnitId':_0x436294,'ref':'','id':_0xa7db20[_0x306810(0x152)],'dT':f(+_0xa7db20[_0x306810(0x155)]),'threadId':_0xa7db20[_0x306810(0x16c)],'personId':(_0x1cb43b=(_0x2c9687=_0xa7db20[_0x306810(0x197)])==null?void 0x0:_0x2c9687[_0x306810(0x164)])!=null?_0x1cb43b:_0xa7db20['userId'],'text':JSON[_0x306810(0x1b3)](_0xa7db20[_0x306810(0x167)]),'parentId':_0x5617f4['id']});break;}case v[_0x306810(0x16e)]:{const _0x101364=this[_0x306810(0x144)][_0x306810(0x190)](_0x579c8e,_0x436294,_0xa7db20[_0x306810(0x152)]);_0x101364&&_0x101364[_0x306810(0x162)]&&this[_0x306810(0x144)][_0x306810(0x166)](_0x579c8e,_0x436294,_0xa7db20[_0x306810(0x152)]);break;}case v[_0x306810(0x15f)]:{this[_0x306810(0x144)]['updateComment'](_0x579c8e,_0x436294,{'commentId':_0xa7db20['replyId'],'text':JSON['parse'](_0xa7db20['content'])});break;}case v[_0x306810(0x187)]:{const _0x124cd5=(_0x3cd200=this[_0x306810(0x144)][_0x306810(0x191)](_0xa7db20[_0x306810(0x159)])[_0x306810(0x165)](_0x5d5e5f=>_0x5d5e5f[_0x306810(0x16c)]===_0xa7db20[_0x306810(0x16c)]))==null?void 0x0:_0x3cd200[_0x306810(0x19b)];_0x124cd5&&this[_0x306810(0x144)][_0x306810(0x18d)](_0x579c8e,_0x436294,_0x124cd5['id'],_0xa7db20[_0x306810(0x1a5)]===I[_0x306810(0x183)]);break;}}}));}};_=E([S(0x0,c[_0x3dcb94(0x14e)](b['CommentService'])),S(0x1,c[_0x3dcb94(0x14e)](M[_0x3dcb94(0x17e)])),S(0x2,c[_0x3dcb94(0x14e)](c[_0x3dcb94(0x181)])),S(0x3,c['Inject'](c['Injector']))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x3dcb94(0x1b2)],x=(_0x477f1f,_0x575c47,_0x4f8447,_0x4be4ef)=>{for(var _0x272274=_0x4be4ef>0x1?void 0x0:_0x4be4ef?A(_0x575c47,_0x4f8447):_0x575c47,_0x33990c=_0x477f1f['length']-0x1,_0x384843;_0x33990c>=0x0;_0x33990c--)(_0x384843=_0x477f1f[_0x33990c])&&(_0x272274=_0x384843(_0x272274)||_0x272274);return _0x272274;},C=(_0x213e67,_0x20f971)=>(_0x164dc0,_0x37dce9)=>_0x20f971(_0x164dc0,_0x37dce9,_0x213e67);function Y(_0xd10ef2,_0x231b01){const _0xdbc1b6=_0x3dcb94,_0x20d2ac=_0xd10ef2[_0xdbc1b6(0x143)][0x0];return{..._0x231b01,'id':_0x20d2ac[_0xdbc1b6(0x152)],'resolved':_0xd10ef2[_0xdbc1b6(0x1a5)]===0x1,'dT':f(_0x20d2ac[_0xdbc1b6(0x155)]),'personId':_0x20d2ac[_0xdbc1b6(0x16d)],'threadId':_0x20d2ac[_0xdbc1b6(0x16c)]};}function G(_0x15c062,_0x24c0b4,_0x8947f4){const _0x1f25a9=_0x3dcb94;var _0x49613e,_0x4d70ee;if(((_0x4d70ee=(_0x49613e=_0x15c062==null?void 0x0:_0x15c062[_0x1f25a9(0x143)])==null?void 0x0:_0x49613e[_0x1f25a9(0x18f)])!=null?_0x4d70ee:0x0)>0x0){const _0x541fa7=(_0x1d3dfb,_0x50a180)=>({'id':_0x1d3dfb[_0x1f25a9(0x152)],'threadId':_0x1d3dfb[_0x1f25a9(0x16c)],'dT':f(_0x1d3dfb[_0x1f25a9(0x155)]),'personId':_0x1d3dfb[_0x1f25a9(0x16d)],'resolved':_0x15c062[_0x1f25a9(0x1a5)]===I['Solved'],'unitId':_0x24c0b4,'subUnitId':_0x8947f4,'text':JSON[_0x1f25a9(0x1b3)](_0x1d3dfb['content']),'parentId':_0x50a180}),_0x25aef2=_0x541fa7(_0x15c062[_0x1f25a9(0x143)][0x0]);return{..._0x25aef2,'children':_0x15c062['replies'][_0x1f25a9(0x186)](0x1)[_0x1f25a9(0x194)](_0x406a18=>_0x541fa7(_0x406a18,_0x25aef2['id']))};}return null;}let p=class{constructor(_0x53b126,_0x46abd0,_0x3199cf){const _0x5d1bc2=_0x3dcb94;this[_0x5d1bc2(0x1a9)]=_0x53b126,this['_userService']=_0x46abd0,this[_0x5d1bc2(0x1b4)]=_0x3199cf;}async[_0x3dcb94(0x14c)](_0x3b4f75){const _0x105b6a=_0x3dcb94;var _0x4d54ff,_0x4b3c6d;const {parentId:_0x102f47,unitId:_0x4c4606,text:_0x323e33,threadId:_0xbe047a}=_0x3b4f75,_0xa57db=(_0x4b3c6d=(_0x4d54ff=_0x323e33[_0x105b6a(0x19e)])==null?void 0x0:_0x4d54ff['filter'](_0x8cc614=>_0x8cc614[_0x105b6a(0x199)]===c['CustomRangeType'][_0x105b6a(0x1b5)])['map'](_0xdc3dd9=>_0xdc3dd9['rangeId']))!=null?_0x4b3c6d:[],_0x3dd83e=JSON[_0x105b6a(0x153)](_0x323e33),_0x19636a=(await this['_sessionService']['requireSession'](_0x4c4606))[_0x105b6a(0x17c)]();if(_0x102f47){const _0x7b30ea={'memberId':_0x19636a,'unitId':_0x4c4606,'content':_0x3dd83e,'mention':_0xa57db,'threadId':_0xbe047a},_0x172b7b=(await this[_0x105b6a(0x1a9)]['post'](_0x105b6a(0x184)+_0x4c4606+'/reply',{'body':_0x7b30ea}))[_0x105b6a(0x1a6)][_0x105b6a(0x1a0)];return{..._0x3b4f75,'id':_0x172b7b[_0x105b6a(0x152)],'dT':c[_0x105b6a(0x1a1)](+_0x172b7b[_0x105b6a(0x155)])[_0x105b6a(0x141)](_0x105b6a(0x177)),'personId':_0x172b7b['userId']};}else{const _0x155ab7={'memberId':_0x19636a,'unitId':_0x4c4606,'content':_0x3dd83e,'mention':_0xa57db},_0xb2eeda=await this[_0x105b6a(0x1a9)][_0x105b6a(0x15c)]('/universer-api/comment/unit/'+_0x4c4606+_0x105b6a(0x16f),{'body':_0x155ab7});return Y(_0xb2eeda['body'][_0x105b6a(0x18a)],_0x3b4f75);}}async[_0x3dcb94(0x147)](_0x5d0c4a){const _0x3d57a4=_0x3dcb94;var _0x57f276,_0x5727a3;const {text:_0x4e6c4e,unitId:_0x285acf}=_0x5d0c4a,_0x1de2ca=(_0x5727a3=(_0x57f276=_0x4e6c4e[_0x3d57a4(0x19e)])==null?void 0x0:_0x57f276[_0x3d57a4(0x18e)](_0x3c478d=>_0x3c478d['rangeType']===c[_0x3d57a4(0x14a)][_0x3d57a4(0x1b5)])['map'](_0x398f15=>_0x398f15[_0x3d57a4(0x171)]))!=null?_0x5727a3:[],_0x476c4e=JSON[_0x3d57a4(0x153)](_0x4e6c4e),_0x31bcab=_0x5d0c4a[_0x3d57a4(0x16c)],_0x51f55e=_0x5d0c4a['id'],_0x2e648f={'memberId':(await this['_sessionService']['requireSession'](_0x285acf))['getMemberID'](),'unitId':_0x285acf,'threadId':_0x31bcab,'mention':_0x1de2ca,'content':_0x476c4e,'replyId':_0x51f55e},_0x2527b0=await this[_0x3d57a4(0x1a9)][_0x3d57a4(0x15c)](_0x3d57a4(0x184)+_0x285acf+_0x3d57a4(0x19f),{'body':_0x2e648f});return!_0x2527b0[_0x3d57a4(0x1a6)][_0x3d57a4(0x1b1)]||_0x2527b0[_0x3d57a4(0x1a6)]['error'][_0x3d57a4(0x19d)]===0x1;}async[_0x3dcb94(0x18d)](_0x1f5865){const _0x2d5a7b=_0x3dcb94,{unitId:_0x5cf80c}=_0x1f5865,_0x2e4c5a=_0x1f5865['threadId'],_0x16fe0b={'memberId':this[_0x2d5a7b(0x1a4)][_0x2d5a7b(0x17b)]()[_0x2d5a7b(0x164)],'unitId':_0x5cf80c,'threadId':_0x2e4c5a,'solved':_0x1f5865['resolved']?I[_0x2d5a7b(0x183)]:I[_0x2d5a7b(0x16b)]},_0x4add96=await this[_0x2d5a7b(0x1a9)]['post'](_0x2d5a7b(0x184)+_0x5cf80c+_0x2d5a7b(0x175),{'body':_0x16fe0b});return!_0x4add96[_0x2d5a7b(0x1a6)][_0x2d5a7b(0x1b1)]||_0x4add96[_0x2d5a7b(0x1a6)]['error'][_0x2d5a7b(0x19d)]===0x1;}async[_0x3dcb94(0x166)](_0x30ab70,_0x4ad5a6,_0x423fb7,_0x3929c5){const _0x1b3157=_0x3dcb94,_0x84ccff={'memberId':(await this[_0x1b3157(0x1b4)][_0x1b3157(0x176)](_0x30ab70))[_0x1b3157(0x17c)](),'threadId':_0x423fb7,'replyId':_0x3929c5,'unitId':_0x30ab70},_0x4a1969=await this[_0x1b3157(0x1a9)]['post'](_0x1b3157(0x184)+_0x30ab70+_0x1b3157(0x1ad),{'body':_0x84ccff});return!_0x4a1969['body'][_0x1b3157(0x1b1)]||_0x4a1969[_0x1b3157(0x1a6)][_0x1b3157(0x1b1)][_0x1b3157(0x19d)]===0x1;}async['listComments'](_0x2d29d9,_0x2511db,_0x3ab4c9){const _0x898a6a=_0x3dcb94,_0x34786d={'unitId':_0x2d29d9,'threadId':_0x3ab4c9},_0x5d3121=await this[_0x898a6a(0x1a9)]['post'](_0x898a6a(0x184)+_0x2d29d9+'/list',{'body':_0x34786d}),_0x431145=_0x3ab4c9[_0x898a6a(0x194)](_0x5a42dc=>G(_0x5d3121[_0x898a6a(0x1a6)][_0x898a6a(0x18c)][_0x5a42dc],_0x2d29d9,_0x2511db))[_0x898a6a(0x18e)](Boolean);return Object[_0x898a6a(0x1ac)](_0x5d3121[_0x898a6a(0x1a6)]['users'])[_0x898a6a(0x1ab)](_0x2776e5=>{const _0x3f49b6=_0x898a6a;this[_0x3f49b6(0x1a4)][_0x3f49b6(0x157)](_0x2776e5);}),_0x431145;}[_0x3dcb94(0x15a)](_0x5e3b32){const _0x4a19f0=_0x3dcb94;return{'id':_0x5e3b32['id'],'threadId':_0x5e3b32[_0x4a19f0(0x16c)],'ref':_0x5e3b32['ref']};}};p=x([C(0x0,c[_0x3dcb94(0x14e)](P[_0x3dcb94(0x178)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c['Inject'](b[_0x3dcb94(0x18b)]))],p);function _0x537f(_0x86ae62,_0x3368e2){const _0x59bcb4=_0x59bc();return _0x537f=function(_0x537f94,_0x487414){_0x537f94=_0x537f94-0x13e;let _0x481777=_0x59bcb4[_0x537f94];return _0x481777;},_0x537f(_0x86ae62,_0x3368e2);}var H=Object['getOwnPropertyDescriptor'],J=(_0xbf39c6,_0x18f43e,_0x2c68a4,_0x43c528)=>{const _0x47cb58=_0x3dcb94;for(var _0x487bad=_0x43c528>0x1?void 0x0:_0x43c528?H(_0x18f43e,_0x2c68a4):_0x18f43e,_0x1e61ad=_0xbf39c6[_0x47cb58(0x18f)]-0x1,_0x1a2533;_0x1e61ad>=0x0;_0x1e61ad--)(_0x1a2533=_0xbf39c6[_0x1e61ad])&&(_0x487bad=_0x1a2533(_0x487bad)||_0x487bad);return _0x487bad;},y=(_0x531a08,_0x5a6282)=>(_0xe26a38,_0x4d6a89)=>_0x5a6282(_0xe26a38,_0x4d6a89,_0x531a08);let g=class extends c[_0x3dcb94(0x151)]{constructor(_0x514fcf,_0x2634ef){const _0x226897=_0x3dcb94;super(),this[_0x226897(0x161)]=_0x514fcf,this[_0x226897(0x15b)]=_0x2634ef,this[_0x226897(0x188)]();}[_0x3dcb94(0x188)](){const _0x436007=_0x3dcb94;this[_0x436007(0x161)]['dataSource']=this['_threadCommentDataSource'],this[_0x436007(0x161)][_0x436007(0x154)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x3dcb94(0x14e)](p))],g);var F=Object['defineProperty'],L=Object[_0x3dcb94(0x1b2)],Z=(_0xbf484c,_0x4755d0,_0x5e48e8)=>_0x4755d0 in _0xbf484c?F(_0xbf484c,_0x4755d0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e48e8}):_0xbf484c[_0x4755d0]=_0x5e48e8,W=(_0x450bbc,_0x3fdb7b,_0x5d4614,_0x2b2dec)=>{for(var _0x4d3cd9=_0x2b2dec>0x1?void 0x0:_0x2b2dec?L(_0x3fdb7b,_0x5d4614):_0x3fdb7b,_0x5898d7=_0x450bbc['length']-0x1,_0x2ace87;_0x5898d7>=0x0;_0x5898d7--)(_0x2ace87=_0x450bbc[_0x5898d7])&&(_0x4d3cd9=_0x2ace87(_0x4d3cd9)||_0x4d3cd9);return _0x4d3cd9;},O=(_0x5cd1f1,_0x1ac29d)=>(_0x5e1f61,_0x4ec3d7)=>_0x1ac29d(_0x5e1f61,_0x4ec3d7,_0x5cd1f1),N=(_0x222569,_0x45d00e,_0x3c76c7)=>Z(_0x222569,typeof _0x45d00e!=_0x3dcb94(0x195)?_0x45d00e+'':_0x45d00e,_0x3c76c7);exports[_0x3dcb94(0x196)]=class extends c['Plugin']{constructor(_0xd43cc=D,_0x954d7c,_0x4139cc){const _0x1ea1d1=_0x3dcb94;super(),this[_0x1ea1d1(0x156)]=_0xd43cc,this['_injector']=_0x954d7c,this[_0x1ea1d1(0x180)]=_0x4139cc;const {..._0x1fb425}=c[_0x1ea1d1(0x198)]({},D,this[_0x1ea1d1(0x156)]);this['_configService'][_0x1ea1d1(0x14b)](q,_0x1fb425);}[_0x3dcb94(0x169)](){const _0x357d3d=_0x3dcb94;[[p],[g],[_]][_0x357d3d(0x1ab)](_0x39317c=>{const _0x5eec45=_0x357d3d;this[_0x5eec45(0x1a3)]['add'](_0x39317c);});}[_0x3dcb94(0x17d)](){const _0x13cb0e=_0x3dcb94;this[_0x13cb0e(0x1a3)]['get'](g),this[_0x13cb0e(0x1a3)][_0x13cb0e(0x150)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x3dcb94(0x196)],_0x3dcb94(0x15d),c[_0x3dcb94(0x19c)][_0x3dcb94(0x1aa)]),exports[_0x3dcb94(0x196)]=W([c[_0x3dcb94(0x174)](w[_0x3dcb94(0x1a7)],b['UniverCollaborationClientPlugin'],T[_0x3dcb94(0x168)]),O(0x1,c[_0x3dcb94(0x14e)](c[_0x3dcb94(0x142)])),O(0x2,c[_0x3dcb94(0x192)])],exports[_0x3dcb94(0x196)]);
|
|
1
|
+
'use strict';const _0x3ec2b5=_0x26a3;(function(_0x384107,_0xad7f0){const _0x35f2a9=_0x26a3,_0x24954f=_0x384107();while(!![]){try{const _0x7ce1d3=parseInt(_0x35f2a9(0x1f5))/0x1*(-parseInt(_0x35f2a9(0x20c))/0x2)+-parseInt(_0x35f2a9(0x21e))/0x3+parseInt(_0x35f2a9(0x1dd))/0x4+parseInt(_0x35f2a9(0x203))/0x5+parseInt(_0x35f2a9(0x209))/0x6+parseInt(_0x35f2a9(0x243))/0x7*(-parseInt(_0x35f2a9(0x214))/0x8)+-parseInt(_0x35f2a9(0x1f2))/0x9;if(_0x7ce1d3===_0xad7f0)break;else _0x24954f['push'](_0x24954f['shift']());}catch(_0x5f4d9b){_0x24954f['push'](_0x24954f['shift']());}}}(_0x978b,0x39c6d));Object[_0x3ec2b5(0x22b)](exports,Symbol['toStringTag'],{'value':_0x3ec2b5(0x22e)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x3ec2b5(0x20f);var I=(_0xe03bb=>(_0xe03bb[_0xe03bb[_0x3ec2b5(0x1e0)]=0x0]=_0x3ec2b5(0x1e0),_0xe03bb[_0xe03bb['Solved']=0x1]=_0x3ec2b5(0x239),_0xe03bb[_0xe03bb['UNRECOGNIZED']=-0x1]=_0x3ec2b5(0x223),_0xe03bb))(I||{}),v=(_0x591ffe=>(_0x591ffe[_0x591ffe[_0x3ec2b5(0x227)]=0x0]='Unknown',_0x591ffe[_0x591ffe[_0x3ec2b5(0x21f)]=0x1]=_0x3ec2b5(0x21f),_0x591ffe[_0x591ffe[_0x3ec2b5(0x220)]=0x2]='Reply',_0x591ffe[_0x591ffe[_0x3ec2b5(0x221)]=0x3]='Edit',_0x591ffe[_0x591ffe[_0x3ec2b5(0x205)]=0x4]=_0x3ec2b5(0x205),_0x591ffe[_0x591ffe['Solve']=0x5]=_0x3ec2b5(0x204),_0x591ffe[_0x591ffe[_0x3ec2b5(0x223)]=-0x1]=_0x3ec2b5(0x223),_0x591ffe))(v||{});function _0x26a3(_0x119b25,_0x3bc972){const _0x978ba8=_0x978b();return _0x26a3=function(_0x26a318,_0x4c0b78){_0x26a318=_0x26a318-0x1d7;let _0x3f05a1=_0x978ba8[_0x26a318];return _0x3f05a1;},_0x26a3(_0x119b25,_0x3bc972);}const f=_0x425d0c=>c['dayjs'](new Date(+_0x425d0c))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x4c1f2c,_0x352622)=>{const _0x595ef8=_0x3ec2b5,_0x3e9bcf=_0x4c1f2c['get'](c['UserManagerService']),_0x24850a=_0x4c1f2c[_0x595ef8(0x1ea)](P[_0x595ef8(0x226)]);_0x352622['forEach'](_0x58084d=>{const _0x1d8b6f=_0x595ef8;_0x3e9bcf[_0x1d8b6f(0x1d9)](_0x58084d)&&_0x352622[_0x1d8b6f(0x1e7)](_0x58084d);}),_0x352622['size']&&(await _0x24850a['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x352622]}}))[_0x595ef8(0x23f)][_0x595ef8(0x1ee)][_0x595ef8(0x20d)](_0x1cb0f4=>{const _0x9c9fc2=_0x595ef8;_0x1cb0f4&&_0x3e9bcf[_0x9c9fc2(0x250)](_0x1cb0f4);});};var $=Object[_0x3ec2b5(0x1e8)],E=(_0x36cf19,_0x35fea3,_0x1dcd81,_0xae2c9f)=>{for(var _0x55dd47=_0xae2c9f>0x1?void 0x0:_0xae2c9f?$(_0x35fea3,_0x1dcd81):_0x35fea3,_0x3b487f=_0x36cf19['length']-0x1,_0xd4e587;_0x3b487f>=0x0;_0x3b487f--)(_0xd4e587=_0x36cf19[_0x3b487f])&&(_0x55dd47=_0xd4e587(_0x55dd47)||_0x55dd47);return _0x55dd47;},S=(_0x528a82,_0x33fa22)=>(_0x1beac4,_0x1b1f07)=>_0x33fa22(_0x1beac4,_0x1b1f07,_0x528a82);let _=class extends c[_0x3ec2b5(0x225)]{constructor(_0x50694a,_0x1b4255,_0x5c1298,_0x46e781){const _0x960ef7=_0x3ec2b5;super(),this['_commentService']=_0x50694a,this[_0x960ef7(0x1ec)]=_0x1b4255,this[_0x960ef7(0x1e9)]=_0x5c1298,this[_0x960ef7(0x1e6)]=_0x46e781,this[_0x960ef7(0x207)](),this[_0x960ef7(0x1e3)]();}[_0x3ec2b5(0x1e3)](){const _0x30bf1d=_0x3ec2b5;this['disposeWithMe'](this[_0x30bf1d(0x1ec)][_0x30bf1d(0x20b)][_0x30bf1d(0x200)](j['bufferTime'](0x10))['subscribe'](_0x356fe2=>{const _0x27ef9d=_0x30bf1d,_0x12576b=new Set();_0x356fe2['forEach'](_0x1e77d6=>{const _0x5ce2e4=_0x26a3;switch(_0x1e77d6['type']){case _0x5ce2e4(0x1fd):{const _0x227e79=_0x1e77d6[_0x5ce2e4(0x231)][_0x5ce2e4(0x233)];_0x12576b[_0x5ce2e4(0x1fd)](_0x227e79);break;}}}),R(this[_0x27ef9d(0x1e6)],_0x12576b);}));}['_init'](){const _0x5eb7e6=_0x3ec2b5;this[_0x5eb7e6(0x212)](this[_0x5eb7e6(0x201)][_0x5eb7e6(0x20b)][_0x5eb7e6(0x1db)](async _0x44db31=>{const _0x59995f=_0x5eb7e6;var _0x5ac2c3,_0x4ffd42,_0x1ce727,_0xb46fa1;const _0x303822=(_0x5ac2c3=this[_0x59995f(0x1ec)][_0x59995f(0x1f3)](_0x44db31[_0x59995f(0x234)])[_0x59995f(0x22a)](_0x573852=>_0x573852['threadId']===_0x44db31[_0x59995f(0x1fe)]))==null?void 0x0:_0x5ac2c3['root'];if(!_0x303822)return;const {unitId:_0x56172b,subUnitId:_0x205165}=_0x303822;switch(_0x44db31[_0x59995f(0x232)]&&this[_0x59995f(0x1e9)][_0x59995f(0x250)](_0x44db31[_0x59995f(0x232)]),_0x44db31['type']){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0x59995f(0x1fc)](_0x56172b,_0x205165,{'unitId':_0x56172b,'subUnitId':_0x205165,'ref':'','id':_0x44db31['replyId'],'dT':f(+_0x44db31['createTimestamp']),'threadId':_0x44db31[_0x59995f(0x1fe)],'personId':(_0x1ce727=(_0x4ffd42=_0x44db31[_0x59995f(0x232)])==null?void 0x0:_0x4ffd42['userID'])!=null?_0x1ce727:_0x44db31[_0x59995f(0x1d8)],'text':JSON[_0x59995f(0x24e)](_0x44db31[_0x59995f(0x1eb)]),'parentId':_0x303822['id']});break;}case v[_0x59995f(0x205)]:{const _0x5ce199=this['_threadCommentModel'][_0x59995f(0x21d)](_0x56172b,_0x205165,_0x44db31[_0x59995f(0x1de)]);_0x5ce199&&_0x5ce199[_0x59995f(0x222)]&&this[_0x59995f(0x1ec)]['deleteComment'](_0x56172b,_0x205165,_0x44db31['replyId']);break;}case v[_0x59995f(0x221)]:{this['_threadCommentModel']['updateComment'](_0x56172b,_0x205165,{'commentId':_0x44db31[_0x59995f(0x1de)],'text':JSON[_0x59995f(0x24e)](_0x44db31[_0x59995f(0x1eb)])});break;}case v[_0x59995f(0x204)]:{const _0x29b4bb=(_0xb46fa1=this[_0x59995f(0x1ec)][_0x59995f(0x1f3)](_0x44db31[_0x59995f(0x234)])['find'](_0x5612a3=>_0x5612a3[_0x59995f(0x1fe)]===_0x44db31[_0x59995f(0x1fe)]))==null?void 0x0:_0xb46fa1[_0x59995f(0x20e)];_0x29b4bb&&this[_0x59995f(0x1ec)]['resolveComment'](_0x56172b,_0x205165,_0x29b4bb['id'],_0x44db31[_0x59995f(0x211)]===I[_0x59995f(0x239)]);break;}}}));}};function _0x978b(){const _0x18a08d=['_configService','syncUpdateMutationToColla','CollaborationSessionService','filter','userID','rangeType','parse','/add','addUser','UserManagerService','userId','getUser','getCurrentUser','subscribe','onStarting','1223284xGWCjd','replyId','map','OpenOrReOpen','format','saveCommentToSnapshot','_initUserSync','onReady','type','_injector','delete','getOwnPropertyDescriptor','_userService','get','content','_threadCommentModel','IThreadCommentDataSourceService','users','ThreadCommentModel','/delete','customRanges','2452320mVOiqU','getUnit','_config','385PlEQdd','/list','deleteComment','pluginName','replies','updateComment','length','addComment','add','threadId','_threadCommentDataSourceService','pipe','_commentService','_sessionService','690090yIrPLD','Solve','Delete','_threadCommentDataSource','_init','thread-comment-data-source.config','1330362qtmQXb','_initDataSource','commentUpdate$','182cQTxHb','forEach','root','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolveComment','solved','disposeWithMe','CustomRangeType','5896sypcYt','UniverCollaborationClientPlugin','listComments','UniverLicensePlugin','_httpService','CommentService','Injector','UniverInstanceType','stringify','getComment','273543LLFGwF','Add','Reply','Edit','parentId','UNRECOGNIZED','symbol','Disposable','HTTPService','Unknown','error','/reply','find','defineProperty','reply','createTimestamp','Module','dayjs','rangeId','payload','user','personId','unitId','/universer-api/comment/unit/','resolved','comment','values','Solved','UNIVER_UNKNOWN','Inject','Plugin','ref','DependentOn','body','getMemberID','code','merge','287DaELIj','IConfigService','requireSession','UniverThreadCommentDataSourcePlugin','post'];_0x978b=function(){return _0x18a08d;};return _0x978b();}_=E([S(0x0,c[_0x3ec2b5(0x23b)](b[_0x3ec2b5(0x219)])),S(0x1,c[_0x3ec2b5(0x23b)](M[_0x3ec2b5(0x1ef)])),S(0x2,c[_0x3ec2b5(0x23b)](c[_0x3ec2b5(0x1d7)])),S(0x3,c[_0x3ec2b5(0x23b)](c[_0x3ec2b5(0x21a)]))],_);const q=_0x3ec2b5(0x208),D={};var A=Object[_0x3ec2b5(0x1e8)],x=(_0x1b1f22,_0x3da50d,_0x8d43fc,_0x195e29)=>{for(var _0x26385b=_0x195e29>0x1?void 0x0:_0x195e29?A(_0x3da50d,_0x8d43fc):_0x3da50d,_0x2f0adc=_0x1b1f22['length']-0x1,_0xdad89c;_0x2f0adc>=0x0;_0x2f0adc--)(_0xdad89c=_0x1b1f22[_0x2f0adc])&&(_0x26385b=_0xdad89c(_0x26385b)||_0x26385b);return _0x26385b;},C=(_0x1148d6,_0x1b9f52)=>(_0x3681d6,_0x4c6b60)=>_0x1b9f52(_0x3681d6,_0x4c6b60,_0x1148d6);function Y(_0x1aa98e,_0x10194e){const _0x12f839=_0x3ec2b5,_0x178c34=_0x1aa98e['replies'][0x0];return{..._0x10194e,'id':_0x178c34[_0x12f839(0x1de)],'resolved':_0x1aa98e['solved']===0x1,'dT':f(_0x178c34[_0x12f839(0x22d)]),'personId':_0x178c34[_0x12f839(0x1d8)],'threadId':_0x178c34['threadId']};}function G(_0xf74d43,_0x36e470,_0x1037a0){const _0x1b8839=_0x3ec2b5;var _0x3d0eaf,_0x2582f0;if(((_0x2582f0=(_0x3d0eaf=_0xf74d43==null?void 0x0:_0xf74d43['replies'])==null?void 0x0:_0x3d0eaf['length'])!=null?_0x2582f0:0x0)>0x0){const _0x16b6ca=(_0x2ef666,_0x2e30c2)=>({'id':_0x2ef666[_0x1b8839(0x1de)],'threadId':_0x2ef666[_0x1b8839(0x1fe)],'dT':f(_0x2ef666['createTimestamp']),'personId':_0x2ef666[_0x1b8839(0x1d8)],'resolved':_0xf74d43['solved']===I[_0x1b8839(0x239)],'unitId':_0x36e470,'subUnitId':_0x1037a0,'text':JSON[_0x1b8839(0x24e)](_0x2ef666[_0x1b8839(0x1eb)]),'parentId':_0x2e30c2}),_0x5df7e9=_0x16b6ca(_0xf74d43[_0x1b8839(0x1f9)][0x0]);return{..._0x5df7e9,'children':_0xf74d43[_0x1b8839(0x1f9)]['slice'](0x1)[_0x1b8839(0x1df)](_0x2a893a=>_0x16b6ca(_0x2a893a,_0x5df7e9['id']))};}return null;}let p=class{constructor(_0x1b87bb,_0x8576e5,_0x249f5a){const _0x4820f5=_0x3ec2b5;this['_httpService']=_0x1b87bb,this[_0x4820f5(0x1e9)]=_0x8576e5,this[_0x4820f5(0x202)]=_0x249f5a;}async[_0x3ec2b5(0x1fc)](_0x400455){const _0xb825ad=_0x3ec2b5;var _0x2a025a,_0x579e41;const {parentId:_0x2c745a,unitId:_0x2f6073,text:_0x2fec78,threadId:_0x51adf1}=_0x400455,_0x265d6c=(_0x579e41=(_0x2a025a=_0x2fec78['customRanges'])==null?void 0x0:_0x2a025a[_0xb825ad(0x24b)](_0x18122d=>_0x18122d[_0xb825ad(0x24d)]===c[_0xb825ad(0x213)]['COMMENT'])['map'](_0x26cb4a=>_0x26cb4a['rangeId']))!=null?_0x579e41:[],_0x47b895=JSON['stringify'](_0x2fec78),_0x2582a9=(await this['_sessionService'][_0xb825ad(0x245)](_0x2f6073))[_0xb825ad(0x240)]();if(_0x2c745a){const _0x3586af={'memberId':_0x2582a9,'unitId':_0x2f6073,'content':_0x47b895,'mention':_0x265d6c,'threadId':_0x51adf1},_0x300353=(await this[_0xb825ad(0x218)]['post'](_0xb825ad(0x235)+_0x2f6073+_0xb825ad(0x229),{'body':_0x3586af}))[_0xb825ad(0x23f)][_0xb825ad(0x22c)];return{..._0x400455,'id':_0x300353[_0xb825ad(0x1de)],'dT':c[_0xb825ad(0x22f)](+_0x300353[_0xb825ad(0x22d)])[_0xb825ad(0x1e1)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x300353[_0xb825ad(0x1d8)]};}else{const _0x5a5560={'memberId':_0x2582a9,'unitId':_0x2f6073,'content':_0x47b895,'mention':_0x265d6c},_0x5d20c3=await this[_0xb825ad(0x218)][_0xb825ad(0x247)](_0xb825ad(0x235)+_0x2f6073+_0xb825ad(0x24f),{'body':_0x5a5560});return Y(_0x5d20c3[_0xb825ad(0x23f)][_0xb825ad(0x237)],_0x400455);}}async[_0x3ec2b5(0x1fa)](_0xff2643){const _0x1e2fc8=_0x3ec2b5;var _0x71995c,_0x33689a;const {text:_0x396c4f,unitId:_0x49aae6}=_0xff2643,_0x417c51=(_0x33689a=(_0x71995c=_0x396c4f[_0x1e2fc8(0x1f1)])==null?void 0x0:_0x71995c[_0x1e2fc8(0x24b)](_0x2adb42=>_0x2adb42['rangeType']===c[_0x1e2fc8(0x213)]['COMMENT'])[_0x1e2fc8(0x1df)](_0xc73d2a=>_0xc73d2a[_0x1e2fc8(0x230)]))!=null?_0x33689a:[],_0x28a1d1=JSON[_0x1e2fc8(0x21c)](_0x396c4f),_0x4f96e3=_0xff2643['threadId'],_0x50f556=_0xff2643['id'],_0x1b1605={'memberId':(await this[_0x1e2fc8(0x202)]['requireSession'](_0x49aae6))[_0x1e2fc8(0x240)](),'unitId':_0x49aae6,'threadId':_0x4f96e3,'mention':_0x417c51,'content':_0x28a1d1,'replyId':_0x50f556},_0xf52e1f=await this[_0x1e2fc8(0x218)][_0x1e2fc8(0x247)](_0x1e2fc8(0x235)+_0x49aae6+'/edit',{'body':_0x1b1605});return!_0xf52e1f[_0x1e2fc8(0x23f)]['error']||_0xf52e1f[_0x1e2fc8(0x23f)][_0x1e2fc8(0x228)][_0x1e2fc8(0x241)]===0x1;}async[_0x3ec2b5(0x210)](_0x485db5){const _0x4e9f51=_0x3ec2b5,{unitId:_0xac93d}=_0x485db5,_0x5eda84=_0x485db5[_0x4e9f51(0x1fe)],_0x563b04={'memberId':this['_userService'][_0x4e9f51(0x1da)]()[_0x4e9f51(0x24c)],'unitId':_0xac93d,'threadId':_0x5eda84,'solved':_0x485db5[_0x4e9f51(0x236)]?I[_0x4e9f51(0x239)]:I[_0x4e9f51(0x1e0)]},_0x437b93=await this['_httpService'][_0x4e9f51(0x247)](_0x4e9f51(0x235)+_0xac93d+'/solved',{'body':_0x563b04});return!_0x437b93['body'][_0x4e9f51(0x228)]||_0x437b93['body'][_0x4e9f51(0x228)]['code']===0x1;}async[_0x3ec2b5(0x1f7)](_0x5abb78,_0x265b7c,_0x21caba,_0x5015b5){const _0x522fa1=_0x3ec2b5,_0x20326e={'memberId':(await this['_sessionService'][_0x522fa1(0x245)](_0x5abb78))[_0x522fa1(0x240)](),'threadId':_0x21caba,'replyId':_0x5015b5,'unitId':_0x5abb78},_0x5de453=await this[_0x522fa1(0x218)]['post'](_0x522fa1(0x235)+_0x5abb78+_0x522fa1(0x1f0),{'body':_0x20326e});return!_0x5de453['body']['error']||_0x5de453['body'][_0x522fa1(0x228)][_0x522fa1(0x241)]===0x1;}async[_0x3ec2b5(0x216)](_0x1d510d,_0x24d805,_0x14da21){const _0x23eca5=_0x3ec2b5,_0x21ea9b={'unitId':_0x1d510d,'threadId':_0x14da21},_0x3024e0=await this[_0x23eca5(0x218)][_0x23eca5(0x247)](_0x23eca5(0x235)+_0x1d510d+_0x23eca5(0x1f6),{'body':_0x21ea9b}),_0x219213=_0x14da21[_0x23eca5(0x1df)](_0x554f6f=>G(_0x3024e0[_0x23eca5(0x23f)]['comments'][_0x554f6f],_0x1d510d,_0x24d805))[_0x23eca5(0x24b)](Boolean);return Object[_0x23eca5(0x238)](_0x3024e0[_0x23eca5(0x23f)]['users'])['forEach'](_0x3e683c=>{const _0x2a9c0b=_0x23eca5;this[_0x2a9c0b(0x1e9)][_0x2a9c0b(0x250)](_0x3e683c);}),_0x219213;}[_0x3ec2b5(0x1e2)](_0x12835f){const _0x41b9d4=_0x3ec2b5;return{'id':_0x12835f['id'],'threadId':_0x12835f[_0x41b9d4(0x1fe)],'ref':_0x12835f[_0x41b9d4(0x23d)]};}};p=x([C(0x0,c['Inject'](P[_0x3ec2b5(0x226)])),C(0x1,c['Inject'](c[_0x3ec2b5(0x1d7)])),C(0x2,c[_0x3ec2b5(0x23b)](b[_0x3ec2b5(0x24a)]))],p);var H=Object[_0x3ec2b5(0x1e8)],J=(_0x308309,_0x37aff9,_0x3a65fb,_0x276483)=>{for(var _0x22ead7=_0x276483>0x1?void 0x0:_0x276483?H(_0x37aff9,_0x3a65fb):_0x37aff9,_0x4f6150=_0x308309['length']-0x1,_0x129141;_0x4f6150>=0x0;_0x4f6150--)(_0x129141=_0x308309[_0x4f6150])&&(_0x22ead7=_0x129141(_0x22ead7)||_0x22ead7);return _0x22ead7;},y=(_0x9343eb,_0x1344a8)=>(_0x18075f,_0x157868)=>_0x1344a8(_0x18075f,_0x157868,_0x9343eb);let g=class extends c['Disposable']{constructor(_0x2505ee,_0x26048e){const _0x5595a7=_0x3ec2b5;super(),this[_0x5595a7(0x1ff)]=_0x2505ee,this[_0x5595a7(0x206)]=_0x26048e,this[_0x5595a7(0x20a)]();}[_0x3ec2b5(0x20a)](){const _0x3c3d5c=_0x3ec2b5;this[_0x3c3d5c(0x1ff)]['dataSource']=this[_0x3c3d5c(0x206)],this[_0x3c3d5c(0x1ff)][_0x3c3d5c(0x249)]=!0x1;}};g=J([y(0x0,M[_0x3ec2b5(0x1ed)]),y(0x1,c[_0x3ec2b5(0x23b)](p))],g);var F=Object[_0x3ec2b5(0x22b)],L=Object[_0x3ec2b5(0x1e8)],Z=(_0x2eaf5f,_0x52dde6,_0x3fc062)=>_0x52dde6 in _0x2eaf5f?F(_0x2eaf5f,_0x52dde6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3fc062}):_0x2eaf5f[_0x52dde6]=_0x3fc062,W=(_0x4568f7,_0x5e8f33,_0x56f3c2,_0x5eba7f)=>{const _0x2ad9f1=_0x3ec2b5;for(var _0x39dbce=_0x5eba7f>0x1?void 0x0:_0x5eba7f?L(_0x5e8f33,_0x56f3c2):_0x5e8f33,_0x563751=_0x4568f7[_0x2ad9f1(0x1fb)]-0x1,_0x5bf7e1;_0x563751>=0x0;_0x563751--)(_0x5bf7e1=_0x4568f7[_0x563751])&&(_0x39dbce=_0x5bf7e1(_0x39dbce)||_0x39dbce);return _0x39dbce;},O=(_0x2eac42,_0x18b804)=>(_0x58ce40,_0x101a7e)=>_0x18b804(_0x58ce40,_0x101a7e,_0x2eac42),N=(_0xe77621,_0x9c6757,_0x31ba94)=>Z(_0xe77621,typeof _0x9c6757!=_0x3ec2b5(0x224)?_0x9c6757+'':_0x9c6757,_0x31ba94);exports[_0x3ec2b5(0x246)]=class extends c[_0x3ec2b5(0x23c)]{constructor(_0x32993c=D,_0x39618a,_0x1c7d9f){const _0x4b1259=_0x3ec2b5;super(),this[_0x4b1259(0x1f4)]=_0x32993c,this[_0x4b1259(0x1e6)]=_0x39618a,this['_configService']=_0x1c7d9f;const {..._0x3b0d8e}=c[_0x4b1259(0x242)]({},D,this['_config']);this[_0x4b1259(0x248)]['setConfig'](q,_0x3b0d8e);}[_0x3ec2b5(0x1dc)](){const _0x87f5=_0x3ec2b5;[[p],[g],[_]][_0x87f5(0x20d)](_0xb38a67=>{const _0xca035b=_0x87f5;this[_0xca035b(0x1e6)][_0xca035b(0x1fd)](_0xb38a67);});}[_0x3ec2b5(0x1e4)](){const _0x1c327f=_0x3ec2b5;this[_0x1c327f(0x1e6)][_0x1c327f(0x1ea)](g),this[_0x1c327f(0x1e6)][_0x1c327f(0x1ea)](_);}},N(exports[_0x3ec2b5(0x246)],_0x3ec2b5(0x1f8),U),N(exports[_0x3ec2b5(0x246)],_0x3ec2b5(0x1e5),c[_0x3ec2b5(0x21b)][_0x3ec2b5(0x23a)]),exports[_0x3ec2b5(0x246)]=W([c[_0x3ec2b5(0x23e)](w['UniverThreadCommentUIPlugin'],b[_0x3ec2b5(0x215)],T[_0x3ec2b5(0x217)]),O(0x1,c[_0x3ec2b5(0x23b)](c['Injector'])),O(0x2,c[_0x3ec2b5(0x244)])],exports[_0x3ec2b5(0x246)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xfce04a=_0x44da;(function(_0x5eb61f,_0xb4aefa){const _0x12c3b8=_0x44da,_0xd0860b=_0x5eb61f();while(!![]){try{const _0x3efb4d=-parseInt(_0x12c3b8(0x108))/0x1+parseInt(_0x12c3b8(0x121))/0x2*(-parseInt(_0x12c3b8(0xf3))/0x3)+parseInt(_0x12c3b8(0x12a))/0x4*(-parseInt(_0x12c3b8(0x13d))/0x5)+-parseInt(_0x12c3b8(0x137))/0x6+-parseInt(_0x12c3b8(0xe6))/0x7*(parseInt(_0x12c3b8(0xe9))/0x8)+-parseInt(_0x12c3b8(0xf5))/0x9*(parseInt(_0x12c3b8(0x144))/0xa)+parseInt(_0x12c3b8(0xfd))/0xb;if(_0x3efb4d===_0xb4aefa)break;else _0xd0860b['push'](_0xd0860b['shift']());}catch(_0x499787){_0xd0860b['push'](_0xd0860b['shift']());}}}(_0x2561,0xdd1ea));import{CommentService as _0x1a73fd,CollaborationSessionService as _0x25d635,UniverCollaborationClientPlugin as _0x394080}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x50fff8}from'@univerjs-pro/license';function _0x44da(_0x4894c3,_0x599ff1){const _0x2561f6=_0x2561();return _0x44da=function(_0x44da48,_0x436ad0){_0x44da48=_0x44da48-0xe3;let _0x5a8a9a=_0x2561f6[_0x44da48];return _0x5a8a9a;},_0x44da(_0x4894c3,_0x599ff1);}import{dayjs as _0x310155,UserManagerService as _0x45e780,Inject as _0x4f3041,Injector as _0x469122,Disposable as _0x5b77e0,CustomRangeType as _0x5bad6a,UniverInstanceType as _0xe3d688,DependentOn as _0x1e1d9f,IConfigService as _0x41d53f,Plugin as _0x136f78,merge as _0x4dae59}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5ca99e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x25e01c,IThreadCommentDataSourceService as _0x531f6f}from'@univerjs/thread-comment';import{bufferTime as _0x43b0ed}from'rxjs';import{HTTPService as _0xb56acb}from'@univerjs/network';const W=_0xfce04a(0x12c);var I=(_0x34b9a3=>(_0x34b9a3[_0x34b9a3[_0xfce04a(0x141)]=0x0]='OpenOrReOpen',_0x34b9a3[_0x34b9a3[_0xfce04a(0x13a)]=0x1]=_0xfce04a(0x13a),_0x34b9a3[_0x34b9a3[_0xfce04a(0x136)]=-0x1]='UNRECOGNIZED',_0x34b9a3))(I||{}),v=(_0x51a35e=>(_0x51a35e[_0x51a35e[_0xfce04a(0x140)]=0x0]=_0xfce04a(0x140),_0x51a35e[_0x51a35e[_0xfce04a(0xf1)]=0x1]=_0xfce04a(0xf1),_0x51a35e[_0x51a35e[_0xfce04a(0x135)]=0x2]=_0xfce04a(0x135),_0x51a35e[_0x51a35e['Edit']=0x3]=_0xfce04a(0x109),_0x51a35e[_0x51a35e[_0xfce04a(0x142)]=0x4]=_0xfce04a(0x142),_0x51a35e[_0x51a35e[_0xfce04a(0x11b)]=0x5]=_0xfce04a(0x11b),_0x51a35e[_0x51a35e[_0xfce04a(0x136)]=-0x1]=_0xfce04a(0x136),_0x51a35e))(v||{});const y=_0x5a0b4a=>_0x310155(new Date(+_0x5a0b4a))['format'](_0xfce04a(0xe7)),B=async(_0x1efee0,_0xcf15e)=>{const _0x15e55c=_0xfce04a,_0x56e63b=_0x1efee0['get'](_0x45e780),_0x500652=_0x1efee0['get'](_0xb56acb);_0xcf15e[_0x15e55c(0x115)](_0x5d614d=>{_0x56e63b['getUser'](_0x5d614d)&&_0xcf15e['delete'](_0x5d614d);}),_0xcf15e[_0x15e55c(0xeb)]&&(await _0x500652[_0x15e55c(0x123)]('/universer-api/user/list',{'params':{'userIDs':[..._0xcf15e]}}))['body'][_0x15e55c(0xf0)][_0x15e55c(0x115)](_0x2e7cc9=>{const _0x348e5a=_0x15e55c;_0x2e7cc9&&_0x56e63b[_0x348e5a(0x13e)](_0x2e7cc9);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5d78c8,_0x3e640a,_0x1c5602,_0x1be3de)=>{const _0x49826b=_0xfce04a;for(var _0x293aea=_0x1be3de>0x1?void 0x0:_0x1be3de?K(_0x3e640a,_0x1c5602):_0x3e640a,_0x525357=_0x5d78c8[_0x49826b(0x10c)]-0x1,_0x187481;_0x525357>=0x0;_0x525357--)(_0x187481=_0x5d78c8[_0x525357])&&(_0x293aea=_0x187481(_0x293aea)||_0x293aea);return _0x293aea;},p=(_0x2db76a,_0x3e55da)=>(_0x2dd75a,_0x2d90e5)=>_0x3e55da(_0x2dd75a,_0x2d90e5,_0x2db76a);let _=class extends _0x5b77e0{constructor(_0x3259a6,_0xaad8a7,_0x2d9d87,_0x4f7122){const _0xf2ad53=_0xfce04a;super(),this[_0xf2ad53(0x127)]=_0x3259a6,this[_0xf2ad53(0x13b)]=_0xaad8a7,this[_0xf2ad53(0x129)]=_0x2d9d87,this['_injector']=_0x4f7122,this['_init'](),this[_0xf2ad53(0xec)]();}['_initUserSync'](){const _0x596faa=_0xfce04a;this[_0x596faa(0xf8)](this[_0x596faa(0x13b)][_0x596faa(0x119)][_0x596faa(0x11e)](_0x43b0ed(0x10))[_0x596faa(0x10f)](_0x44652c=>{const _0x496fe8=_0x596faa,_0x1a5253=new Set();_0x44652c[_0x496fe8(0x115)](_0x3f16a5=>{const _0xda20b7=_0x496fe8;switch(_0x3f16a5[_0xda20b7(0xf2)]){case _0xda20b7(0xf4):{const _0x5e2be9=_0x3f16a5['payload']['personId'];_0x1a5253['add'](_0x5e2be9);break;}}}),B(this[_0x496fe8(0x102)],_0x1a5253);}));}[_0xfce04a(0x12d)](){const _0x401292=_0xfce04a;this[_0x401292(0xf8)](this[_0x401292(0x127)][_0x401292(0x119)]['subscribe'](async _0x1e8622=>{const _0x50b91e=_0x401292;var _0x30e0a3,_0x319517,_0x4ae273,_0x43fb3d;const _0x4e5315=(_0x30e0a3=this['_threadCommentModel']['getUnit'](_0x1e8622['unitId'])[_0x50b91e(0x145)](_0x3e846b=>_0x3e846b[_0x50b91e(0x10e)]===_0x1e8622[_0x50b91e(0x10e)]))==null?void 0x0:_0x30e0a3[_0x50b91e(0x12f)];if(!_0x4e5315)return;const {unitId:_0x2f393e,subUnitId:_0xe63792}=_0x4e5315;switch(_0x1e8622['user']&&this[_0x50b91e(0x129)][_0x50b91e(0x13e)](_0x1e8622[_0x50b91e(0x12b)]),_0x1e8622[_0x50b91e(0xf2)]){case v[_0x50b91e(0xf1)]:break;case v[_0x50b91e(0x135)]:{this[_0x50b91e(0x13b)][_0x50b91e(0x148)](_0x2f393e,_0xe63792,{'unitId':_0x2f393e,'subUnitId':_0xe63792,'ref':'','id':_0x1e8622[_0x50b91e(0x12e)],'dT':y(+_0x1e8622[_0x50b91e(0x13f)]),'threadId':_0x1e8622[_0x50b91e(0x10e)],'personId':(_0x4ae273=(_0x319517=_0x1e8622['user'])==null?void 0x0:_0x319517['userID'])!=null?_0x4ae273:_0x1e8622[_0x50b91e(0x146)],'text':JSON['parse'](_0x1e8622[_0x50b91e(0x10d)]),'parentId':_0x4e5315['id']});break;}case v[_0x50b91e(0x142)]:{const _0x3b5945=this[_0x50b91e(0x13b)][_0x50b91e(0x11c)](_0x2f393e,_0xe63792,_0x1e8622[_0x50b91e(0x12e)]);_0x3b5945&&_0x3b5945[_0x50b91e(0x11f)]&&this[_0x50b91e(0x13b)][_0x50b91e(0x11a)](_0x2f393e,_0xe63792,_0x1e8622['replyId']);break;}case v[_0x50b91e(0x109)]:{this[_0x50b91e(0x13b)][_0x50b91e(0x124)](_0x2f393e,_0xe63792,{'commentId':_0x1e8622['replyId'],'text':JSON['parse'](_0x1e8622['content'])});break;}case v['Solve']:{const _0x21962a=(_0x43fb3d=this[_0x50b91e(0x13b)][_0x50b91e(0x13c)](_0x1e8622[_0x50b91e(0x101)])[_0x50b91e(0x145)](_0x5058f1=>_0x5058f1[_0x50b91e(0x10e)]===_0x1e8622['threadId']))==null?void 0x0:_0x43fb3d[_0x50b91e(0x12f)];_0x21962a&&this[_0x50b91e(0x13b)][_0x50b91e(0x120)](_0x2f393e,_0xe63792,_0x21962a['id'],_0x1e8622[_0x50b91e(0xee)]===I[_0x50b91e(0x13a)]);break;}}}));}};_=V([p(0x0,_0x4f3041(_0x1a73fd)),p(0x1,_0x4f3041(_0x25e01c)),p(0x2,_0x4f3041(_0x45e780)),p(0x3,_0x4f3041(_0x469122))],_);const z=_0xfce04a(0x104),O={};var k=Object[_0xfce04a(0x10b)],Q=(_0x43f854,_0x52f480,_0x19696c,_0x54c902)=>{const _0x105099=_0xfce04a;for(var _0x8336ad=_0x54c902>0x1?void 0x0:_0x54c902?k(_0x52f480,_0x19696c):_0x52f480,_0x2a4917=_0x43f854[_0x105099(0x10c)]-0x1,_0x39def6;_0x2a4917>=0x0;_0x2a4917--)(_0x39def6=_0x43f854[_0x2a4917])&&(_0x8336ad=_0x39def6(_0x8336ad)||_0x8336ad);return _0x8336ad;},b=(_0x4a7c78,_0x3fc807)=>(_0x35db81,_0x36105d)=>_0x3fc807(_0x35db81,_0x36105d,_0x4a7c78);function X(_0x1e1a4f,_0x3a2f0a){const _0x54ba00=_0xfce04a,_0x3c0f65=_0x1e1a4f[_0x54ba00(0x10a)][0x0];return{..._0x3a2f0a,'id':_0x3c0f65[_0x54ba00(0x12e)],'resolved':_0x1e1a4f[_0x54ba00(0xee)]===0x1,'dT':y(_0x3c0f65[_0x54ba00(0x13f)]),'personId':_0x3c0f65[_0x54ba00(0x146)],'threadId':_0x3c0f65[_0x54ba00(0x10e)]};}function ee(_0x176ed9,_0x515e79,_0x19e687){const _0x16633e=_0xfce04a;var _0x1f3c92,_0x3eb2e1;if(((_0x3eb2e1=(_0x1f3c92=_0x176ed9==null?void 0x0:_0x176ed9[_0x16633e(0x10a)])==null?void 0x0:_0x1f3c92[_0x16633e(0x10c)])!=null?_0x3eb2e1:0x0)>0x0){const _0x57ac3c=(_0x1d0bb8,_0x2f5028)=>({'id':_0x1d0bb8['replyId'],'threadId':_0x1d0bb8[_0x16633e(0x10e)],'dT':y(_0x1d0bb8[_0x16633e(0x13f)]),'personId':_0x1d0bb8[_0x16633e(0x146)],'resolved':_0x176ed9[_0x16633e(0xee)]===I[_0x16633e(0x13a)],'unitId':_0x515e79,'subUnitId':_0x19e687,'text':JSON['parse'](_0x1d0bb8[_0x16633e(0x10d)]),'parentId':_0x2f5028}),_0x121b9d=_0x57ac3c(_0x176ed9[_0x16633e(0x10a)][0x0]);return{..._0x121b9d,'children':_0x176ed9['replies']['slice'](0x1)['map'](_0x4c4fcb=>_0x57ac3c(_0x4c4fcb,_0x121b9d['id']))};}return null;}let S=class{constructor(_0x47bfcc,_0x2e7e3a,_0x47c544){const _0xd59b18=_0xfce04a;this[_0xd59b18(0xe8)]=_0x47bfcc,this[_0xd59b18(0x129)]=_0x2e7e3a,this[_0xd59b18(0xe3)]=_0x47c544;}async[_0xfce04a(0x148)](_0x3ac375){const _0x4eef5a=_0xfce04a;var _0x7db16e,_0x1b66df;const {parentId:_0x4dc1df,unitId:_0x3b03f0,text:_0x376c0e,threadId:_0x401386}=_0x3ac375,_0x29a784=(_0x1b66df=(_0x7db16e=_0x376c0e['customRanges'])==null?void 0x0:_0x7db16e[_0x4eef5a(0x113)](_0x344bf5=>_0x344bf5[_0x4eef5a(0x134)]===_0x5bad6a[_0x4eef5a(0x118)])[_0x4eef5a(0xea)](_0x4c3701=>_0x4c3701[_0x4eef5a(0xfb)]))!=null?_0x1b66df:[],_0x4bedb7=JSON[_0x4eef5a(0xe5)](_0x376c0e),_0x11b06c=(await this['_sessionService'][_0x4eef5a(0x139)](_0x3b03f0))[_0x4eef5a(0x125)]();if(_0x4dc1df){const _0x343405={'memberId':_0x11b06c,'unitId':_0x3b03f0,'content':_0x4bedb7,'mention':_0x29a784,'threadId':_0x401386},_0x2c51ea=(await this[_0x4eef5a(0xe8)][_0x4eef5a(0x106)](_0x4eef5a(0xf9)+_0x3b03f0+_0x4eef5a(0xfa),{'body':_0x343405}))[_0x4eef5a(0x130)][_0x4eef5a(0x133)];return{..._0x3ac375,'id':_0x2c51ea[_0x4eef5a(0x12e)],'dT':_0x310155(+_0x2c51ea[_0x4eef5a(0x13f)])[_0x4eef5a(0x111)](_0x4eef5a(0xe7)),'personId':_0x2c51ea[_0x4eef5a(0x146)]};}else{const _0x11a7f8={'memberId':_0x11b06c,'unitId':_0x3b03f0,'content':_0x4bedb7,'mention':_0x29a784},_0x58767b=await this[_0x4eef5a(0xe8)][_0x4eef5a(0x106)](_0x4eef5a(0xf9)+_0x3b03f0+_0x4eef5a(0xe4),{'body':_0x11a7f8});return X(_0x58767b[_0x4eef5a(0x130)][_0x4eef5a(0x114)],_0x3ac375);}}async['updateComment'](_0x24ff34){const _0x12fd98=_0xfce04a;var _0x5689b6,_0x262679;const {text:_0x408f33,unitId:_0x2e9f92}=_0x24ff34,_0x171db3=(_0x262679=(_0x5689b6=_0x408f33['customRanges'])==null?void 0x0:_0x5689b6['filter'](_0x238e9d=>_0x238e9d[_0x12fd98(0x134)]===_0x5bad6a[_0x12fd98(0x118)])['map'](_0x2667ef=>_0x2667ef[_0x12fd98(0xfb)]))!=null?_0x262679:[],_0x1a3948=JSON[_0x12fd98(0xe5)](_0x408f33),_0x3ac0ac=_0x24ff34['threadId'],_0x344e76=_0x24ff34['id'],_0x29066b={'memberId':(await this['_sessionService']['requireSession'](_0x2e9f92))[_0x12fd98(0x125)](),'unitId':_0x2e9f92,'threadId':_0x3ac0ac,'mention':_0x171db3,'content':_0x1a3948,'replyId':_0x344e76},_0x436b50=await this[_0x12fd98(0xe8)][_0x12fd98(0x106)](_0x12fd98(0xf9)+_0x2e9f92+_0x12fd98(0xff),{'body':_0x29066b});return!_0x436b50[_0x12fd98(0x130)][_0x12fd98(0xed)]||_0x436b50[_0x12fd98(0x130)][_0x12fd98(0xed)]['code']===0x1;}async['resolveComment'](_0x17cd0c){const _0x438939=_0xfce04a,{unitId:_0x5cc292}=_0x17cd0c,_0x40f8f8=_0x17cd0c[_0x438939(0x10e)],_0x199d53={'memberId':this[_0x438939(0x129)][_0x438939(0x126)]()[_0x438939(0x103)],'unitId':_0x5cc292,'threadId':_0x40f8f8,'solved':_0x17cd0c[_0x438939(0x132)]?I['Solved']:I[_0x438939(0x141)]},_0x5c1059=await this[_0x438939(0xe8)][_0x438939(0x106)]('/universer-api/comment/unit/'+_0x5cc292+_0x438939(0x110),{'body':_0x199d53});return!_0x5c1059[_0x438939(0x130)][_0x438939(0xed)]||_0x5c1059['body']['error']['code']===0x1;}async[_0xfce04a(0x11a)](_0x25400c,_0x2305ac,_0x53de3f,_0x467589){const _0x109957=_0xfce04a,_0xabcd3c={'memberId':(await this[_0x109957(0xe3)][_0x109957(0x139)](_0x25400c))[_0x109957(0x125)](),'threadId':_0x53de3f,'replyId':_0x467589,'unitId':_0x25400c},_0x3d842c=await this[_0x109957(0xe8)][_0x109957(0x106)](_0x109957(0xf9)+_0x25400c+_0x109957(0x112),{'body':_0xabcd3c});return!_0x3d842c[_0x109957(0x130)][_0x109957(0xed)]||_0x3d842c['body'][_0x109957(0xed)][_0x109957(0x122)]===0x1;}async[_0xfce04a(0x116)](_0x558cf9,_0x54c594,_0x14512d){const _0xa3d2ee=_0xfce04a,_0x46344b={'unitId':_0x558cf9,'threadId':_0x14512d},_0x1a902d=await this[_0xa3d2ee(0xe8)][_0xa3d2ee(0x106)](_0xa3d2ee(0xf9)+_0x558cf9+'/list',{'body':_0x46344b}),_0x174c1d=_0x14512d[_0xa3d2ee(0xea)](_0x1b05f7=>ee(_0x1a902d['body'][_0xa3d2ee(0x131)][_0x1b05f7],_0x558cf9,_0x54c594))[_0xa3d2ee(0x113)](Boolean);return Object['values'](_0x1a902d[_0xa3d2ee(0x130)][_0xa3d2ee(0xf0)])[_0xa3d2ee(0x115)](_0x1130c1=>{const _0x133ece=_0xa3d2ee;this[_0x133ece(0x129)][_0x133ece(0x13e)](_0x1130c1);}),_0x174c1d;}[_0xfce04a(0x107)](_0x34e21e){const _0x7a85f=_0xfce04a;return{'id':_0x34e21e['id'],'threadId':_0x34e21e[_0x7a85f(0x10e)],'ref':_0x34e21e['ref']};}};S=Q([b(0x0,_0x4f3041(_0xb56acb)),b(0x1,_0x4f3041(_0x45e780)),b(0x2,_0x4f3041(_0x25d635))],S);var re=Object[_0xfce04a(0x10b)],te=(_0x1c7f8d,_0x42264b,_0x350777,_0x2e4869)=>{for(var _0x5cdc33=_0x2e4869>0x1?void 0x0:_0x2e4869?re(_0x42264b,_0x350777):_0x42264b,_0x1a278c=_0x1c7f8d['length']-0x1,_0x8b9ed7;_0x1a278c>=0x0;_0x1a278c--)(_0x8b9ed7=_0x1c7f8d[_0x1a278c])&&(_0x5cdc33=_0x8b9ed7(_0x5cdc33)||_0x5cdc33);return _0x5cdc33;},M=(_0x13e3b8,_0x36edb2)=>(_0xe13d49,_0x10222c)=>_0x36edb2(_0xe13d49,_0x10222c,_0x13e3b8);let f=class extends _0x5b77e0{constructor(_0x592708,_0x356a42){const _0x1879e5=_0xfce04a;super(),this[_0x1879e5(0xf7)]=_0x592708,this['_threadCommentDataSource']=_0x356a42,this[_0x1879e5(0x128)]();}[_0xfce04a(0x128)](){const _0xad93d5=_0xfce04a;this[_0xad93d5(0xf7)][_0xad93d5(0xef)]=this[_0xad93d5(0x11d)],this[_0xad93d5(0xf7)][_0xad93d5(0xf6)]=!0x1;}};f=te([M(0x0,_0x531f6f),M(0x1,_0x4f3041(S))],f);var se=Object[_0xfce04a(0x143)],oe=Object[_0xfce04a(0x10b)],ne=(_0x593f4b,_0x4d9402,_0xc1a9c5)=>_0x4d9402 in _0x593f4b?se(_0x593f4b,_0x4d9402,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xc1a9c5}):_0x593f4b[_0x4d9402]=_0xc1a9c5,ie=(_0x432568,_0x379bde,_0x4cd714,_0x39df3)=>{const _0x3ff5ea=_0xfce04a;for(var _0x21585e=_0x39df3>0x1?void 0x0:_0x39df3?oe(_0x379bde,_0x4cd714):_0x379bde,_0x3d4ac9=_0x432568[_0x3ff5ea(0x10c)]-0x1,_0x266903;_0x3d4ac9>=0x0;_0x3d4ac9--)(_0x266903=_0x432568[_0x3d4ac9])&&(_0x21585e=_0x266903(_0x21585e)||_0x21585e);return _0x21585e;},N=(_0x4e479d,_0x5c4729)=>(_0x187777,_0x12412f)=>_0x5c4729(_0x187777,_0x12412f,_0x4e479d),$=(_0x26c7de,_0x197688,_0x34228a)=>ne(_0x26c7de,typeof _0x197688!=_0xfce04a(0xfe)?_0x197688+'':_0x197688,_0x34228a);function _0x2561(){const _0x3f4ba6=['filter','comment','forEach','listComments','pluginName','COMMENT','commentUpdate$','deleteComment','Solve','getComment','_threadCommentDataSource','pipe','parentId','resolveComment','965348zKaUjl','code','get','updateComment','getMemberID','getCurrentUser','_commentService','_initDataSource','_userService','4oteoTq','user','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_init','replyId','root','body','comments','resolved','reply','rangeType','Reply','UNRECOGNIZED','7376622OZvKwv','setConfig','requireSession','Solved','_threadCommentModel','getUnit','1430215EjBWlI','addUser','createTimestamp','Unknown','OpenOrReOpen','Delete','defineProperty','10BjApbN','find','userId','onStarting','addComment','_sessionService','/add','stringify','7njZvMo','YYYY/MM/DD\x20HH:mm','_httpService','11323960zsCFin','map','size','_initUserSync','error','solved','dataSource','users','Add','type','3KFeIhe','add','15509007qJHcMb','syncUpdateMutationToColla','_threadCommentDataSourceService','disposeWithMe','/universer-api/comment/unit/','/reply','rangeId','_configService','75079433KqMMMf','symbol','/edit','_config','unitId','_injector','userID','thread-comment-data-source.config','onReady','post','saveCommentToSnapshot','782825qScoOv','Edit','replies','getOwnPropertyDescriptor','length','content','threadId','subscribe','/solved','format','/delete'];_0x2561=function(){return _0x3f4ba6;};return _0x2561();}let g=class extends _0x136f78{constructor(_0x1d60af=O,_0x8433a8,_0x5ca261){const _0x3c2235=_0xfce04a;super(),this[_0x3c2235(0x100)]=_0x1d60af,this[_0x3c2235(0x102)]=_0x8433a8,this[_0x3c2235(0xfc)]=_0x5ca261;const {..._0x197bc4}=_0x4dae59({},O,this[_0x3c2235(0x100)]);this['_configService'][_0x3c2235(0x138)](z,_0x197bc4);}[_0xfce04a(0x147)](){[[S],[f],[_]]['forEach'](_0x51e02=>{const _0x10d7b1=_0x44da;this[_0x10d7b1(0x102)][_0x10d7b1(0xf4)](_0x51e02);});}[_0xfce04a(0x105)](){const _0x20b7f1=_0xfce04a;this[_0x20b7f1(0x102)]['get'](f),this['_injector']['get'](_);}};$(g,_0xfce04a(0x117),W),$(g,_0xfce04a(0xf2),_0xe3d688['UNIVER_UNKNOWN']),g=ie([_0x1e1d9f(_0x5ca99e,_0x394080,_0x50fff8),N(0x1,_0x4f3041(_0x469122)),N(0x2,_0x41d53f)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x1235ca=_0x5811;function _0x5811(_0x2c7335,_0x26cf29){const _0x3ccd63=_0x3ccd();return _0x5811=function(_0x5811f4,_0x5c6159){_0x5811f4=_0x5811f4-0xc5;let _0x4c9d7d=_0x3ccd63[_0x5811f4];return _0x4c9d7d;},_0x5811(_0x2c7335,_0x26cf29);}(function(_0x14533f,_0x207232){const _0x1c9c10=_0x5811,_0x349fa2=_0x14533f();while(!![]){try{const _0x5a5bf2=-parseInt(_0x1c9c10(0x11c))/0x1*(parseInt(_0x1c9c10(0xe7))/0x2)+-parseInt(_0x1c9c10(0x123))/0x3*(-parseInt(_0x1c9c10(0xe8))/0x4)+parseInt(_0x1c9c10(0x121))/0x5+parseInt(_0x1c9c10(0xfb))/0x6*(-parseInt(_0x1c9c10(0x12e))/0x7)+-parseInt(_0x1c9c10(0x106))/0x8*(-parseInt(_0x1c9c10(0xcb))/0x9)+parseInt(_0x1c9c10(0x10f))/0xa+parseInt(_0x1c9c10(0xff))/0xb*(parseInt(_0x1c9c10(0x10d))/0xc);if(_0x5a5bf2===_0x207232)break;else _0x349fa2['push'](_0x349fa2['shift']());}catch(_0x3b770a){_0x349fa2['push'](_0x349fa2['shift']());}}}(_0x3ccd,0x4de89));import{CommentService as _0x555562,CollaborationSessionService as _0x573248,UniverCollaborationClientPlugin as _0x540873}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5c21b8}from'@univerjs-pro/license';function _0x3ccd(){const _0x8e391b=['userId','_userService','onStarting','1282506dPByvH','rangeId','error','_injector','78474ZQKxqY','type','getComment','defineProperty','delete','_initDataSource','resolved','712ssnrFi','updateComment','parse','pluginName','requireSession','post','/universer-api/comment/unit/','312HpPVAZ','/reply','335340RHBnUt','commentUpdate$','get','parentId','Solve','deleteComment','_initUserSync','reply','getMemberID','payload','Unknown','/list','pipe','7WQIWRt','map','Reply','getOwnPropertyDescriptor','size','2383800fMioHG','content','153dVcMiL','addUser','UNRECOGNIZED','_threadCommentModel','/delete','symbol','threadId','disposeWithMe','createTimestamp','COMMENT','getCurrentUser','7GkjEzz','_configService','_init','Delete','add','_sessionService','getUnit','body','32094vspwBt','UNIVER_UNKNOWN','unitId','getUser','YYYY/MM/DD\x20HH:mm','_commentService','find','/universer-api/user/list','forEach','saveCommentToSnapshot','code','setConfig','values','solved','OpenOrReOpen','format','root','users','listComments','/solved','_config','comments','Add','resolveComment','_httpService','Edit','_threadCommentDataSourceService','userID','161982rCYluo','6796iiMWEs','subscribe','user','/add','stringify','Solved','replies','addComment','customRanges','length','replyId','_threadCommentDataSource','personId','slice','rangeType','filter'];_0x3ccd=function(){return _0x8e391b;};return _0x3ccd();}import{dayjs as _0x56a1fb,UserManagerService as _0x5956d5,Inject as _0x2350c9,Injector as _0x15c6a3,Disposable as _0x3afd63,CustomRangeType as _0x1f64b6,UniverInstanceType as _0x5dc2ff,DependentOn as _0x9d2f9d,IConfigService as _0x4ec177,Plugin as _0x42556e,merge as _0x1578da}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x25c137}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x236df7,IThreadCommentDataSourceService as _0x592d8c}from'@univerjs/thread-comment';import{bufferTime as _0x1f07b6}from'rxjs';import{HTTPService as _0x2ef774}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1aaa12=>(_0x1aaa12[_0x1aaa12[_0x1235ca(0xd9)]=0x0]=_0x1235ca(0xd9),_0x1aaa12[_0x1aaa12[_0x1235ca(0xed)]=0x1]=_0x1235ca(0xed),_0x1aaa12[_0x1aaa12['UNRECOGNIZED']=-0x1]=_0x1235ca(0x125),_0x1aaa12))(I||{}),v=(_0x4b9f29=>(_0x4b9f29[_0x4b9f29[_0x1235ca(0x119)]=0x0]=_0x1235ca(0x119),_0x4b9f29[_0x4b9f29[_0x1235ca(0xe1)]=0x1]='Add',_0x4b9f29[_0x4b9f29['Reply']=0x2]=_0x1235ca(0x11e),_0x4b9f29[_0x4b9f29[_0x1235ca(0xe4)]=0x3]=_0x1235ca(0xe4),_0x4b9f29[_0x4b9f29[_0x1235ca(0xc6)]=0x4]=_0x1235ca(0xc6),_0x4b9f29[_0x4b9f29[_0x1235ca(0x113)]=0x5]=_0x1235ca(0x113),_0x4b9f29[_0x4b9f29['UNRECOGNIZED']=-0x1]=_0x1235ca(0x125),_0x4b9f29))(v||{});const y=_0x389042=>_0x56a1fb(new Date(+_0x389042))[_0x1235ca(0xda)](_0x1235ca(0xcf)),B=async(_0x19bab3,_0xb700ac)=>{const _0xe09022=_0x1235ca,_0x49b1b4=_0x19bab3[_0xe09022(0x111)](_0x5956d5),_0xac9ef0=_0x19bab3[_0xe09022(0x111)](_0x2ef774);_0xb700ac[_0xe09022(0xd3)](_0x1db26d=>{const _0x54274e=_0xe09022;_0x49b1b4[_0x54274e(0xce)](_0x1db26d)&&_0xb700ac[_0x54274e(0x103)](_0x1db26d);}),_0xb700ac[_0xe09022(0x120)]&&(await _0xac9ef0['get'](_0xe09022(0xd2),{'params':{'userIDs':[..._0xb700ac]}}))[_0xe09022(0xca)]['users']['forEach'](_0x7d3c81=>{const _0x29398b=_0xe09022;_0x7d3c81&&_0x49b1b4[_0x29398b(0x124)](_0x7d3c81);});};var K=Object[_0x1235ca(0x11f)],V=(_0x53f30d,_0xa11763,_0x1a7166,_0x431707)=>{const _0x4fd0db=_0x1235ca;for(var _0x1c2f9c=_0x431707>0x1?void 0x0:_0x431707?K(_0xa11763,_0x1a7166):_0xa11763,_0xe156ed=_0x53f30d[_0x4fd0db(0xf1)]-0x1,_0x277212;_0xe156ed>=0x0;_0xe156ed--)(_0x277212=_0x53f30d[_0xe156ed])&&(_0x1c2f9c=_0x277212(_0x1c2f9c)||_0x1c2f9c);return _0x1c2f9c;},p=(_0x9b0dc7,_0x14595a)=>(_0x41e3d1,_0x12080f)=>_0x14595a(_0x41e3d1,_0x12080f,_0x9b0dc7);let _=class extends _0x3afd63{constructor(_0x2606eb,_0x554212,_0x1b019a,_0x389f42){const _0x5b16cb=_0x1235ca;super(),this[_0x5b16cb(0xd0)]=_0x2606eb,this[_0x5b16cb(0x126)]=_0x554212,this[_0x5b16cb(0xf9)]=_0x1b019a,this[_0x5b16cb(0xfe)]=_0x389f42,this[_0x5b16cb(0xc5)](),this[_0x5b16cb(0x115)]();}[_0x1235ca(0x115)](){const _0x69d15f=_0x1235ca;this[_0x69d15f(0x12a)](this['_threadCommentModel'][_0x69d15f(0x110)][_0x69d15f(0x11b)](_0x1f07b6(0x10))['subscribe'](_0x1c26e3=>{const _0x141fc8=_0x69d15f,_0x1bd0a0=new Set();_0x1c26e3[_0x141fc8(0xd3)](_0x429180=>{const _0x507ccd=_0x141fc8;switch(_0x429180[_0x507ccd(0x100)]){case _0x507ccd(0xc7):{const _0x103eab=_0x429180[_0x507ccd(0x118)][_0x507ccd(0xf4)];_0x1bd0a0[_0x507ccd(0xc7)](_0x103eab);break;}}}),B(this[_0x141fc8(0xfe)],_0x1bd0a0);}));}[_0x1235ca(0xc5)](){const _0x4e719e=_0x1235ca;this[_0x4e719e(0x12a)](this[_0x4e719e(0xd0)][_0x4e719e(0x110)][_0x4e719e(0xe9)](async _0x56fc05=>{const _0x121ff5=_0x4e719e;var _0xe33357,_0x557356,_0x55ac37,_0x177d7c;const _0x59f3e2=(_0xe33357=this['_threadCommentModel'][_0x121ff5(0xc9)](_0x56fc05[_0x121ff5(0xcd)])[_0x121ff5(0xd1)](_0x5dd17c=>_0x5dd17c['threadId']===_0x56fc05[_0x121ff5(0x129)]))==null?void 0x0:_0xe33357['root'];if(!_0x59f3e2)return;const {unitId:_0x2092bf,subUnitId:_0x292803}=_0x59f3e2;switch(_0x56fc05[_0x121ff5(0xea)]&&this[_0x121ff5(0xf9)][_0x121ff5(0x124)](_0x56fc05[_0x121ff5(0xea)]),_0x56fc05[_0x121ff5(0x100)]){case v['Add']:break;case v[_0x121ff5(0x11e)]:{this[_0x121ff5(0x126)][_0x121ff5(0xef)](_0x2092bf,_0x292803,{'unitId':_0x2092bf,'subUnitId':_0x292803,'ref':'','id':_0x56fc05[_0x121ff5(0xf2)],'dT':y(+_0x56fc05[_0x121ff5(0x12b)]),'threadId':_0x56fc05[_0x121ff5(0x129)],'personId':(_0x55ac37=(_0x557356=_0x56fc05[_0x121ff5(0xea)])==null?void 0x0:_0x557356[_0x121ff5(0xe6)])!=null?_0x55ac37:_0x56fc05['userId'],'text':JSON['parse'](_0x56fc05[_0x121ff5(0x122)]),'parentId':_0x59f3e2['id']});break;}case v[_0x121ff5(0xc6)]:{const _0x2484be=this[_0x121ff5(0x126)][_0x121ff5(0x101)](_0x2092bf,_0x292803,_0x56fc05[_0x121ff5(0xf2)]);_0x2484be&&_0x2484be[_0x121ff5(0x112)]&&this[_0x121ff5(0x126)][_0x121ff5(0x114)](_0x2092bf,_0x292803,_0x56fc05[_0x121ff5(0xf2)]);break;}case v[_0x121ff5(0xe4)]:{this[_0x121ff5(0x126)][_0x121ff5(0x107)](_0x2092bf,_0x292803,{'commentId':_0x56fc05[_0x121ff5(0xf2)],'text':JSON['parse'](_0x56fc05[_0x121ff5(0x122)])});break;}case v['Solve']:{const _0x5e20ba=(_0x177d7c=this[_0x121ff5(0x126)]['getUnit'](_0x56fc05[_0x121ff5(0xcd)])[_0x121ff5(0xd1)](_0x17306=>_0x17306['threadId']===_0x56fc05[_0x121ff5(0x129)]))==null?void 0x0:_0x177d7c[_0x121ff5(0xdb)];_0x5e20ba&&this[_0x121ff5(0x126)]['resolveComment'](_0x2092bf,_0x292803,_0x5e20ba['id'],_0x56fc05['solved']===I[_0x121ff5(0xed)]);break;}}}));}};_=V([p(0x0,_0x2350c9(_0x555562)),p(0x1,_0x2350c9(_0x236df7)),p(0x2,_0x2350c9(_0x5956d5)),p(0x3,_0x2350c9(_0x15c6a3))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x1235ca(0x11f)],Q=(_0x2eb056,_0x4131f1,_0x5edd1c,_0x4e52d6)=>{const _0x24d183=_0x1235ca;for(var _0x2d146c=_0x4e52d6>0x1?void 0x0:_0x4e52d6?k(_0x4131f1,_0x5edd1c):_0x4131f1,_0x186ca1=_0x2eb056[_0x24d183(0xf1)]-0x1,_0x5411bb;_0x186ca1>=0x0;_0x186ca1--)(_0x5411bb=_0x2eb056[_0x186ca1])&&(_0x2d146c=_0x5411bb(_0x2d146c)||_0x2d146c);return _0x2d146c;},b=(_0x185f63,_0x37f0d2)=>(_0x24dcd6,_0xa789d5)=>_0x37f0d2(_0x24dcd6,_0xa789d5,_0x185f63);function X(_0x200340,_0xe2490f){const _0x501738=_0x1235ca,_0x7ba541=_0x200340[_0x501738(0xee)][0x0];return{..._0xe2490f,'id':_0x7ba541['replyId'],'resolved':_0x200340[_0x501738(0xd8)]===0x1,'dT':y(_0x7ba541['createTimestamp']),'personId':_0x7ba541[_0x501738(0xf8)],'threadId':_0x7ba541[_0x501738(0x129)]};}function ee(_0x4ba0a2,_0x35ee9b,_0x4d0955){const _0x15e026=_0x1235ca;var _0x2b91a5,_0x393e9c;if(((_0x393e9c=(_0x2b91a5=_0x4ba0a2==null?void 0x0:_0x4ba0a2[_0x15e026(0xee)])==null?void 0x0:_0x2b91a5['length'])!=null?_0x393e9c:0x0)>0x0){const _0x4de92e=(_0x314a62,_0x11623a)=>({'id':_0x314a62[_0x15e026(0xf2)],'threadId':_0x314a62['threadId'],'dT':y(_0x314a62['createTimestamp']),'personId':_0x314a62[_0x15e026(0xf8)],'resolved':_0x4ba0a2[_0x15e026(0xd8)]===I[_0x15e026(0xed)],'unitId':_0x35ee9b,'subUnitId':_0x4d0955,'text':JSON[_0x15e026(0x108)](_0x314a62[_0x15e026(0x122)]),'parentId':_0x11623a}),_0x18a972=_0x4de92e(_0x4ba0a2['replies'][0x0]);return{..._0x18a972,'children':_0x4ba0a2['replies'][_0x15e026(0xf5)](0x1)['map'](_0x382d43=>_0x4de92e(_0x382d43,_0x18a972['id']))};}return null;}let S=class{constructor(_0x26e002,_0x32017d,_0x5b9781){const _0x58501e=_0x1235ca;this['_httpService']=_0x26e002,this['_userService']=_0x32017d,this[_0x58501e(0xc8)]=_0x5b9781;}async[_0x1235ca(0xef)](_0x2f8775){const _0x3fb915=_0x1235ca;var _0x5658ba,_0x53ed3f;const {parentId:_0x2ef50e,unitId:_0x49c02d,text:_0x266a8d,threadId:_0x4049df}=_0x2f8775,_0xca096a=(_0x53ed3f=(_0x5658ba=_0x266a8d[_0x3fb915(0xf0)])==null?void 0x0:_0x5658ba['filter'](_0x6d30a4=>_0x6d30a4['rangeType']===_0x1f64b6['COMMENT'])[_0x3fb915(0x11d)](_0x5e3151=>_0x5e3151['rangeId']))!=null?_0x53ed3f:[],_0x5c2b0a=JSON[_0x3fb915(0xec)](_0x266a8d),_0x3e24e1=(await this[_0x3fb915(0xc8)][_0x3fb915(0x10a)](_0x49c02d))[_0x3fb915(0x117)]();if(_0x2ef50e){const _0x327163={'memberId':_0x3e24e1,'unitId':_0x49c02d,'content':_0x5c2b0a,'mention':_0xca096a,'threadId':_0x4049df},_0x363ad2=(await this[_0x3fb915(0xe3)][_0x3fb915(0x10b)](_0x3fb915(0x10c)+_0x49c02d+_0x3fb915(0x10e),{'body':_0x327163}))['body'][_0x3fb915(0x116)];return{..._0x2f8775,'id':_0x363ad2['replyId'],'dT':_0x56a1fb(+_0x363ad2[_0x3fb915(0x12b)])['format'](_0x3fb915(0xcf)),'personId':_0x363ad2[_0x3fb915(0xf8)]};}else{const _0x119bec={'memberId':_0x3e24e1,'unitId':_0x49c02d,'content':_0x5c2b0a,'mention':_0xca096a},_0x4b6eca=await this[_0x3fb915(0xe3)][_0x3fb915(0x10b)](_0x3fb915(0x10c)+_0x49c02d+_0x3fb915(0xeb),{'body':_0x119bec});return X(_0x4b6eca['body']['comment'],_0x2f8775);}}async[_0x1235ca(0x107)](_0x2bb358){const _0x5d710c=_0x1235ca;var _0x8c170d,_0x5ce3a6;const {text:_0x5092de,unitId:_0xe2f23b}=_0x2bb358,_0x367f94=(_0x5ce3a6=(_0x8c170d=_0x5092de[_0x5d710c(0xf0)])==null?void 0x0:_0x8c170d[_0x5d710c(0xf7)](_0x305ca5=>_0x305ca5[_0x5d710c(0xf6)]===_0x1f64b6[_0x5d710c(0x12c)])['map'](_0x5da768=>_0x5da768[_0x5d710c(0xfc)]))!=null?_0x5ce3a6:[],_0xa6a941=JSON['stringify'](_0x5092de),_0x40a6df=_0x2bb358[_0x5d710c(0x129)],_0x14c408=_0x2bb358['id'],_0x19aabc={'memberId':(await this[_0x5d710c(0xc8)][_0x5d710c(0x10a)](_0xe2f23b))[_0x5d710c(0x117)](),'unitId':_0xe2f23b,'threadId':_0x40a6df,'mention':_0x367f94,'content':_0xa6a941,'replyId':_0x14c408},_0x1aaa42=await this['_httpService'][_0x5d710c(0x10b)]('/universer-api/comment/unit/'+_0xe2f23b+'/edit',{'body':_0x19aabc});return!_0x1aaa42[_0x5d710c(0xca)][_0x5d710c(0xfd)]||_0x1aaa42[_0x5d710c(0xca)][_0x5d710c(0xfd)][_0x5d710c(0xd5)]===0x1;}async[_0x1235ca(0xe2)](_0x234ba7){const _0x3f5870=_0x1235ca,{unitId:_0xba90de}=_0x234ba7,_0x58f3d8=_0x234ba7[_0x3f5870(0x129)],_0x4b9bc4={'memberId':this[_0x3f5870(0xf9)][_0x3f5870(0x12d)]()[_0x3f5870(0xe6)],'unitId':_0xba90de,'threadId':_0x58f3d8,'solved':_0x234ba7[_0x3f5870(0x105)]?I[_0x3f5870(0xed)]:I[_0x3f5870(0xd9)]},_0x2285e7=await this['_httpService'][_0x3f5870(0x10b)]('/universer-api/comment/unit/'+_0xba90de+_0x3f5870(0xde),{'body':_0x4b9bc4});return!_0x2285e7[_0x3f5870(0xca)][_0x3f5870(0xfd)]||_0x2285e7['body']['error'][_0x3f5870(0xd5)]===0x1;}async['deleteComment'](_0x5cb1f7,_0xa3c303,_0x240c55,_0x3eaf87){const _0x5d8cd2=_0x1235ca,_0x56b285={'memberId':(await this[_0x5d8cd2(0xc8)][_0x5d8cd2(0x10a)](_0x5cb1f7))['getMemberID'](),'threadId':_0x240c55,'replyId':_0x3eaf87,'unitId':_0x5cb1f7},_0x43a669=await this['_httpService'][_0x5d8cd2(0x10b)](_0x5d8cd2(0x10c)+_0x5cb1f7+_0x5d8cd2(0x127),{'body':_0x56b285});return!_0x43a669[_0x5d8cd2(0xca)][_0x5d8cd2(0xfd)]||_0x43a669[_0x5d8cd2(0xca)][_0x5d8cd2(0xfd)][_0x5d8cd2(0xd5)]===0x1;}async[_0x1235ca(0xdd)](_0x5b19e7,_0x133444,_0x2fa07b){const _0x2b64fb=_0x1235ca,_0x4bd3e7={'unitId':_0x5b19e7,'threadId':_0x2fa07b},_0x2be89f=await this[_0x2b64fb(0xe3)]['post']('/universer-api/comment/unit/'+_0x5b19e7+_0x2b64fb(0x11a),{'body':_0x4bd3e7}),_0x2b3f9b=_0x2fa07b['map'](_0x4182a6=>ee(_0x2be89f['body'][_0x2b64fb(0xe0)][_0x4182a6],_0x5b19e7,_0x133444))[_0x2b64fb(0xf7)](Boolean);return Object[_0x2b64fb(0xd7)](_0x2be89f[_0x2b64fb(0xca)][_0x2b64fb(0xdc)])[_0x2b64fb(0xd3)](_0x388e3a=>{const _0x130c41=_0x2b64fb;this[_0x130c41(0xf9)][_0x130c41(0x124)](_0x388e3a);}),_0x2b3f9b;}[_0x1235ca(0xd4)](_0x1983ca){const _0x10fd02=_0x1235ca;return{'id':_0x1983ca['id'],'threadId':_0x1983ca[_0x10fd02(0x129)],'ref':_0x1983ca['ref']};}};S=Q([b(0x0,_0x2350c9(_0x2ef774)),b(0x1,_0x2350c9(_0x5956d5)),b(0x2,_0x2350c9(_0x573248))],S);var re=Object[_0x1235ca(0x11f)],te=(_0x38823f,_0xcc5db3,_0x5d3b08,_0x5deff8)=>{const _0x55feb8=_0x1235ca;for(var _0x3df669=_0x5deff8>0x1?void 0x0:_0x5deff8?re(_0xcc5db3,_0x5d3b08):_0xcc5db3,_0x8fb86b=_0x38823f[_0x55feb8(0xf1)]-0x1,_0x2846a6;_0x8fb86b>=0x0;_0x8fb86b--)(_0x2846a6=_0x38823f[_0x8fb86b])&&(_0x3df669=_0x2846a6(_0x3df669)||_0x3df669);return _0x3df669;},M=(_0x495b59,_0x5b21ae)=>(_0x2e68ea,_0xa442e9)=>_0x5b21ae(_0x2e68ea,_0xa442e9,_0x495b59);let f=class extends _0x3afd63{constructor(_0x1d58a6,_0x190b1c){const _0x1b1814=_0x1235ca;super(),this['_threadCommentDataSourceService']=_0x1d58a6,this['_threadCommentDataSource']=_0x190b1c,this[_0x1b1814(0x104)]();}[_0x1235ca(0x104)](){const _0x38aa39=_0x1235ca;this[_0x38aa39(0xe5)]['dataSource']=this[_0x38aa39(0xf3)],this[_0x38aa39(0xe5)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x592d8c),M(0x1,_0x2350c9(S))],f);var se=Object[_0x1235ca(0x102)],oe=Object[_0x1235ca(0x11f)],ne=(_0x5cf78a,_0x190ffb,_0x2a73ec)=>_0x190ffb in _0x5cf78a?se(_0x5cf78a,_0x190ffb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2a73ec}):_0x5cf78a[_0x190ffb]=_0x2a73ec,ie=(_0x2fd0b1,_0xf159f7,_0x4a56b3,_0x544c43)=>{for(var _0x26a1ae=_0x544c43>0x1?void 0x0:_0x544c43?oe(_0xf159f7,_0x4a56b3):_0xf159f7,_0x56e105=_0x2fd0b1['length']-0x1,_0x2987fa;_0x56e105>=0x0;_0x56e105--)(_0x2987fa=_0x2fd0b1[_0x56e105])&&(_0x26a1ae=_0x2987fa(_0x26a1ae)||_0x26a1ae);return _0x26a1ae;},N=(_0x91e233,_0x554281)=>(_0x386be6,_0x9e1fa8)=>_0x554281(_0x386be6,_0x9e1fa8,_0x91e233),$=(_0x68969,_0x502e0b,_0x2db86e)=>ne(_0x68969,typeof _0x502e0b!=_0x1235ca(0x128)?_0x502e0b+'':_0x502e0b,_0x2db86e);let g=class extends _0x42556e{constructor(_0x1bf8d5=O,_0x5be294,_0x2eac1b){const _0x4fa692=_0x1235ca;super(),this[_0x4fa692(0xdf)]=_0x1bf8d5,this[_0x4fa692(0xfe)]=_0x5be294,this[_0x4fa692(0x12f)]=_0x2eac1b;const {..._0x1515c7}=_0x1578da({},O,this[_0x4fa692(0xdf)]);this[_0x4fa692(0x12f)][_0x4fa692(0xd6)](z,_0x1515c7);}[_0x1235ca(0xfa)](){const _0x1f8c53=_0x1235ca;[[S],[f],[_]][_0x1f8c53(0xd3)](_0x284561=>{this['_injector']['add'](_0x284561);});}['onReady'](){const _0x182ce7=_0x1235ca;this[_0x182ce7(0xfe)][_0x182ce7(0x111)](f),this['_injector']['get'](_);}};$(g,_0x1235ca(0x109),W),$(g,_0x1235ca(0x100),_0x5dc2ff[_0x1235ca(0xcc)]),g=ie([_0x9d2f9d(_0x25c137,_0x540873,_0x5c21b8),N(0x1,_0x2350c9(_0x15c6a3)),N(0x2,_0x4ec177)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xfce04a=_0x44da;(function(_0x5eb61f,_0xb4aefa){const _0x12c3b8=_0x44da,_0xd0860b=_0x5eb61f();while(!![]){try{const _0x3efb4d=-parseInt(_0x12c3b8(0x108))/0x1+parseInt(_0x12c3b8(0x121))/0x2*(-parseInt(_0x12c3b8(0xf3))/0x3)+parseInt(_0x12c3b8(0x12a))/0x4*(-parseInt(_0x12c3b8(0x13d))/0x5)+-parseInt(_0x12c3b8(0x137))/0x6+-parseInt(_0x12c3b8(0xe6))/0x7*(parseInt(_0x12c3b8(0xe9))/0x8)+-parseInt(_0x12c3b8(0xf5))/0x9*(parseInt(_0x12c3b8(0x144))/0xa)+parseInt(_0x12c3b8(0xfd))/0xb;if(_0x3efb4d===_0xb4aefa)break;else _0xd0860b['push'](_0xd0860b['shift']());}catch(_0x499787){_0xd0860b['push'](_0xd0860b['shift']());}}}(_0x2561,0xdd1ea));import{CommentService as _0x1a73fd,CollaborationSessionService as _0x25d635,UniverCollaborationClientPlugin as _0x394080}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x50fff8}from'@univerjs-pro/license';function _0x44da(_0x4894c3,_0x599ff1){const _0x2561f6=_0x2561();return _0x44da=function(_0x44da48,_0x436ad0){_0x44da48=_0x44da48-0xe3;let _0x5a8a9a=_0x2561f6[_0x44da48];return _0x5a8a9a;},_0x44da(_0x4894c3,_0x599ff1);}import{dayjs as _0x310155,UserManagerService as _0x45e780,Inject as _0x4f3041,Injector as _0x469122,Disposable as _0x5b77e0,CustomRangeType as _0x5bad6a,UniverInstanceType as _0xe3d688,DependentOn as _0x1e1d9f,IConfigService as _0x41d53f,Plugin as _0x136f78,merge as _0x4dae59}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5ca99e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x25e01c,IThreadCommentDataSourceService as _0x531f6f}from'@univerjs/thread-comment';import{bufferTime as _0x43b0ed}from'rxjs';import{HTTPService as _0xb56acb}from'@univerjs/network';const W=_0xfce04a(0x12c);var I=(_0x34b9a3=>(_0x34b9a3[_0x34b9a3[_0xfce04a(0x141)]=0x0]='OpenOrReOpen',_0x34b9a3[_0x34b9a3[_0xfce04a(0x13a)]=0x1]=_0xfce04a(0x13a),_0x34b9a3[_0x34b9a3[_0xfce04a(0x136)]=-0x1]='UNRECOGNIZED',_0x34b9a3))(I||{}),v=(_0x51a35e=>(_0x51a35e[_0x51a35e[_0xfce04a(0x140)]=0x0]=_0xfce04a(0x140),_0x51a35e[_0x51a35e[_0xfce04a(0xf1)]=0x1]=_0xfce04a(0xf1),_0x51a35e[_0x51a35e[_0xfce04a(0x135)]=0x2]=_0xfce04a(0x135),_0x51a35e[_0x51a35e['Edit']=0x3]=_0xfce04a(0x109),_0x51a35e[_0x51a35e[_0xfce04a(0x142)]=0x4]=_0xfce04a(0x142),_0x51a35e[_0x51a35e[_0xfce04a(0x11b)]=0x5]=_0xfce04a(0x11b),_0x51a35e[_0x51a35e[_0xfce04a(0x136)]=-0x1]=_0xfce04a(0x136),_0x51a35e))(v||{});const y=_0x5a0b4a=>_0x310155(new Date(+_0x5a0b4a))['format'](_0xfce04a(0xe7)),B=async(_0x1efee0,_0xcf15e)=>{const _0x15e55c=_0xfce04a,_0x56e63b=_0x1efee0['get'](_0x45e780),_0x500652=_0x1efee0['get'](_0xb56acb);_0xcf15e[_0x15e55c(0x115)](_0x5d614d=>{_0x56e63b['getUser'](_0x5d614d)&&_0xcf15e['delete'](_0x5d614d);}),_0xcf15e[_0x15e55c(0xeb)]&&(await _0x500652[_0x15e55c(0x123)]('/universer-api/user/list',{'params':{'userIDs':[..._0xcf15e]}}))['body'][_0x15e55c(0xf0)][_0x15e55c(0x115)](_0x2e7cc9=>{const _0x348e5a=_0x15e55c;_0x2e7cc9&&_0x56e63b[_0x348e5a(0x13e)](_0x2e7cc9);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5d78c8,_0x3e640a,_0x1c5602,_0x1be3de)=>{const _0x49826b=_0xfce04a;for(var _0x293aea=_0x1be3de>0x1?void 0x0:_0x1be3de?K(_0x3e640a,_0x1c5602):_0x3e640a,_0x525357=_0x5d78c8[_0x49826b(0x10c)]-0x1,_0x187481;_0x525357>=0x0;_0x525357--)(_0x187481=_0x5d78c8[_0x525357])&&(_0x293aea=_0x187481(_0x293aea)||_0x293aea);return _0x293aea;},p=(_0x2db76a,_0x3e55da)=>(_0x2dd75a,_0x2d90e5)=>_0x3e55da(_0x2dd75a,_0x2d90e5,_0x2db76a);let _=class extends _0x5b77e0{constructor(_0x3259a6,_0xaad8a7,_0x2d9d87,_0x4f7122){const _0xf2ad53=_0xfce04a;super(),this[_0xf2ad53(0x127)]=_0x3259a6,this[_0xf2ad53(0x13b)]=_0xaad8a7,this[_0xf2ad53(0x129)]=_0x2d9d87,this['_injector']=_0x4f7122,this['_init'](),this[_0xf2ad53(0xec)]();}['_initUserSync'](){const _0x596faa=_0xfce04a;this[_0x596faa(0xf8)](this[_0x596faa(0x13b)][_0x596faa(0x119)][_0x596faa(0x11e)](_0x43b0ed(0x10))[_0x596faa(0x10f)](_0x44652c=>{const _0x496fe8=_0x596faa,_0x1a5253=new Set();_0x44652c[_0x496fe8(0x115)](_0x3f16a5=>{const _0xda20b7=_0x496fe8;switch(_0x3f16a5[_0xda20b7(0xf2)]){case _0xda20b7(0xf4):{const _0x5e2be9=_0x3f16a5['payload']['personId'];_0x1a5253['add'](_0x5e2be9);break;}}}),B(this[_0x496fe8(0x102)],_0x1a5253);}));}[_0xfce04a(0x12d)](){const _0x401292=_0xfce04a;this[_0x401292(0xf8)](this[_0x401292(0x127)][_0x401292(0x119)]['subscribe'](async _0x1e8622=>{const _0x50b91e=_0x401292;var _0x30e0a3,_0x319517,_0x4ae273,_0x43fb3d;const _0x4e5315=(_0x30e0a3=this['_threadCommentModel']['getUnit'](_0x1e8622['unitId'])[_0x50b91e(0x145)](_0x3e846b=>_0x3e846b[_0x50b91e(0x10e)]===_0x1e8622[_0x50b91e(0x10e)]))==null?void 0x0:_0x30e0a3[_0x50b91e(0x12f)];if(!_0x4e5315)return;const {unitId:_0x2f393e,subUnitId:_0xe63792}=_0x4e5315;switch(_0x1e8622['user']&&this[_0x50b91e(0x129)][_0x50b91e(0x13e)](_0x1e8622[_0x50b91e(0x12b)]),_0x1e8622[_0x50b91e(0xf2)]){case v[_0x50b91e(0xf1)]:break;case v[_0x50b91e(0x135)]:{this[_0x50b91e(0x13b)][_0x50b91e(0x148)](_0x2f393e,_0xe63792,{'unitId':_0x2f393e,'subUnitId':_0xe63792,'ref':'','id':_0x1e8622[_0x50b91e(0x12e)],'dT':y(+_0x1e8622[_0x50b91e(0x13f)]),'threadId':_0x1e8622[_0x50b91e(0x10e)],'personId':(_0x4ae273=(_0x319517=_0x1e8622['user'])==null?void 0x0:_0x319517['userID'])!=null?_0x4ae273:_0x1e8622[_0x50b91e(0x146)],'text':JSON['parse'](_0x1e8622[_0x50b91e(0x10d)]),'parentId':_0x4e5315['id']});break;}case v[_0x50b91e(0x142)]:{const _0x3b5945=this[_0x50b91e(0x13b)][_0x50b91e(0x11c)](_0x2f393e,_0xe63792,_0x1e8622[_0x50b91e(0x12e)]);_0x3b5945&&_0x3b5945[_0x50b91e(0x11f)]&&this[_0x50b91e(0x13b)][_0x50b91e(0x11a)](_0x2f393e,_0xe63792,_0x1e8622['replyId']);break;}case v[_0x50b91e(0x109)]:{this[_0x50b91e(0x13b)][_0x50b91e(0x124)](_0x2f393e,_0xe63792,{'commentId':_0x1e8622['replyId'],'text':JSON['parse'](_0x1e8622['content'])});break;}case v['Solve']:{const _0x21962a=(_0x43fb3d=this[_0x50b91e(0x13b)][_0x50b91e(0x13c)](_0x1e8622[_0x50b91e(0x101)])[_0x50b91e(0x145)](_0x5058f1=>_0x5058f1[_0x50b91e(0x10e)]===_0x1e8622['threadId']))==null?void 0x0:_0x43fb3d[_0x50b91e(0x12f)];_0x21962a&&this[_0x50b91e(0x13b)][_0x50b91e(0x120)](_0x2f393e,_0xe63792,_0x21962a['id'],_0x1e8622[_0x50b91e(0xee)]===I[_0x50b91e(0x13a)]);break;}}}));}};_=V([p(0x0,_0x4f3041(_0x1a73fd)),p(0x1,_0x4f3041(_0x25e01c)),p(0x2,_0x4f3041(_0x45e780)),p(0x3,_0x4f3041(_0x469122))],_);const z=_0xfce04a(0x104),O={};var k=Object[_0xfce04a(0x10b)],Q=(_0x43f854,_0x52f480,_0x19696c,_0x54c902)=>{const _0x105099=_0xfce04a;for(var _0x8336ad=_0x54c902>0x1?void 0x0:_0x54c902?k(_0x52f480,_0x19696c):_0x52f480,_0x2a4917=_0x43f854[_0x105099(0x10c)]-0x1,_0x39def6;_0x2a4917>=0x0;_0x2a4917--)(_0x39def6=_0x43f854[_0x2a4917])&&(_0x8336ad=_0x39def6(_0x8336ad)||_0x8336ad);return _0x8336ad;},b=(_0x4a7c78,_0x3fc807)=>(_0x35db81,_0x36105d)=>_0x3fc807(_0x35db81,_0x36105d,_0x4a7c78);function X(_0x1e1a4f,_0x3a2f0a){const _0x54ba00=_0xfce04a,_0x3c0f65=_0x1e1a4f[_0x54ba00(0x10a)][0x0];return{..._0x3a2f0a,'id':_0x3c0f65[_0x54ba00(0x12e)],'resolved':_0x1e1a4f[_0x54ba00(0xee)]===0x1,'dT':y(_0x3c0f65[_0x54ba00(0x13f)]),'personId':_0x3c0f65[_0x54ba00(0x146)],'threadId':_0x3c0f65[_0x54ba00(0x10e)]};}function ee(_0x176ed9,_0x515e79,_0x19e687){const _0x16633e=_0xfce04a;var _0x1f3c92,_0x3eb2e1;if(((_0x3eb2e1=(_0x1f3c92=_0x176ed9==null?void 0x0:_0x176ed9[_0x16633e(0x10a)])==null?void 0x0:_0x1f3c92[_0x16633e(0x10c)])!=null?_0x3eb2e1:0x0)>0x0){const _0x57ac3c=(_0x1d0bb8,_0x2f5028)=>({'id':_0x1d0bb8['replyId'],'threadId':_0x1d0bb8[_0x16633e(0x10e)],'dT':y(_0x1d0bb8[_0x16633e(0x13f)]),'personId':_0x1d0bb8[_0x16633e(0x146)],'resolved':_0x176ed9[_0x16633e(0xee)]===I[_0x16633e(0x13a)],'unitId':_0x515e79,'subUnitId':_0x19e687,'text':JSON['parse'](_0x1d0bb8[_0x16633e(0x10d)]),'parentId':_0x2f5028}),_0x121b9d=_0x57ac3c(_0x176ed9[_0x16633e(0x10a)][0x0]);return{..._0x121b9d,'children':_0x176ed9['replies']['slice'](0x1)['map'](_0x4c4fcb=>_0x57ac3c(_0x4c4fcb,_0x121b9d['id']))};}return null;}let S=class{constructor(_0x47bfcc,_0x2e7e3a,_0x47c544){const _0xd59b18=_0xfce04a;this[_0xd59b18(0xe8)]=_0x47bfcc,this[_0xd59b18(0x129)]=_0x2e7e3a,this[_0xd59b18(0xe3)]=_0x47c544;}async[_0xfce04a(0x148)](_0x3ac375){const _0x4eef5a=_0xfce04a;var _0x7db16e,_0x1b66df;const {parentId:_0x4dc1df,unitId:_0x3b03f0,text:_0x376c0e,threadId:_0x401386}=_0x3ac375,_0x29a784=(_0x1b66df=(_0x7db16e=_0x376c0e['customRanges'])==null?void 0x0:_0x7db16e[_0x4eef5a(0x113)](_0x344bf5=>_0x344bf5[_0x4eef5a(0x134)]===_0x5bad6a[_0x4eef5a(0x118)])[_0x4eef5a(0xea)](_0x4c3701=>_0x4c3701[_0x4eef5a(0xfb)]))!=null?_0x1b66df:[],_0x4bedb7=JSON[_0x4eef5a(0xe5)](_0x376c0e),_0x11b06c=(await this['_sessionService'][_0x4eef5a(0x139)](_0x3b03f0))[_0x4eef5a(0x125)]();if(_0x4dc1df){const _0x343405={'memberId':_0x11b06c,'unitId':_0x3b03f0,'content':_0x4bedb7,'mention':_0x29a784,'threadId':_0x401386},_0x2c51ea=(await this[_0x4eef5a(0xe8)][_0x4eef5a(0x106)](_0x4eef5a(0xf9)+_0x3b03f0+_0x4eef5a(0xfa),{'body':_0x343405}))[_0x4eef5a(0x130)][_0x4eef5a(0x133)];return{..._0x3ac375,'id':_0x2c51ea[_0x4eef5a(0x12e)],'dT':_0x310155(+_0x2c51ea[_0x4eef5a(0x13f)])[_0x4eef5a(0x111)](_0x4eef5a(0xe7)),'personId':_0x2c51ea[_0x4eef5a(0x146)]};}else{const _0x11a7f8={'memberId':_0x11b06c,'unitId':_0x3b03f0,'content':_0x4bedb7,'mention':_0x29a784},_0x58767b=await this[_0x4eef5a(0xe8)][_0x4eef5a(0x106)](_0x4eef5a(0xf9)+_0x3b03f0+_0x4eef5a(0xe4),{'body':_0x11a7f8});return X(_0x58767b[_0x4eef5a(0x130)][_0x4eef5a(0x114)],_0x3ac375);}}async['updateComment'](_0x24ff34){const _0x12fd98=_0xfce04a;var _0x5689b6,_0x262679;const {text:_0x408f33,unitId:_0x2e9f92}=_0x24ff34,_0x171db3=(_0x262679=(_0x5689b6=_0x408f33['customRanges'])==null?void 0x0:_0x5689b6['filter'](_0x238e9d=>_0x238e9d[_0x12fd98(0x134)]===_0x5bad6a[_0x12fd98(0x118)])['map'](_0x2667ef=>_0x2667ef[_0x12fd98(0xfb)]))!=null?_0x262679:[],_0x1a3948=JSON[_0x12fd98(0xe5)](_0x408f33),_0x3ac0ac=_0x24ff34['threadId'],_0x344e76=_0x24ff34['id'],_0x29066b={'memberId':(await this['_sessionService']['requireSession'](_0x2e9f92))[_0x12fd98(0x125)](),'unitId':_0x2e9f92,'threadId':_0x3ac0ac,'mention':_0x171db3,'content':_0x1a3948,'replyId':_0x344e76},_0x436b50=await this[_0x12fd98(0xe8)][_0x12fd98(0x106)](_0x12fd98(0xf9)+_0x2e9f92+_0x12fd98(0xff),{'body':_0x29066b});return!_0x436b50[_0x12fd98(0x130)][_0x12fd98(0xed)]||_0x436b50[_0x12fd98(0x130)][_0x12fd98(0xed)]['code']===0x1;}async['resolveComment'](_0x17cd0c){const _0x438939=_0xfce04a,{unitId:_0x5cc292}=_0x17cd0c,_0x40f8f8=_0x17cd0c[_0x438939(0x10e)],_0x199d53={'memberId':this[_0x438939(0x129)][_0x438939(0x126)]()[_0x438939(0x103)],'unitId':_0x5cc292,'threadId':_0x40f8f8,'solved':_0x17cd0c[_0x438939(0x132)]?I['Solved']:I[_0x438939(0x141)]},_0x5c1059=await this[_0x438939(0xe8)][_0x438939(0x106)]('/universer-api/comment/unit/'+_0x5cc292+_0x438939(0x110),{'body':_0x199d53});return!_0x5c1059[_0x438939(0x130)][_0x438939(0xed)]||_0x5c1059['body']['error']['code']===0x1;}async[_0xfce04a(0x11a)](_0x25400c,_0x2305ac,_0x53de3f,_0x467589){const _0x109957=_0xfce04a,_0xabcd3c={'memberId':(await this[_0x109957(0xe3)][_0x109957(0x139)](_0x25400c))[_0x109957(0x125)](),'threadId':_0x53de3f,'replyId':_0x467589,'unitId':_0x25400c},_0x3d842c=await this[_0x109957(0xe8)][_0x109957(0x106)](_0x109957(0xf9)+_0x25400c+_0x109957(0x112),{'body':_0xabcd3c});return!_0x3d842c[_0x109957(0x130)][_0x109957(0xed)]||_0x3d842c['body'][_0x109957(0xed)][_0x109957(0x122)]===0x1;}async[_0xfce04a(0x116)](_0x558cf9,_0x54c594,_0x14512d){const _0xa3d2ee=_0xfce04a,_0x46344b={'unitId':_0x558cf9,'threadId':_0x14512d},_0x1a902d=await this[_0xa3d2ee(0xe8)][_0xa3d2ee(0x106)](_0xa3d2ee(0xf9)+_0x558cf9+'/list',{'body':_0x46344b}),_0x174c1d=_0x14512d[_0xa3d2ee(0xea)](_0x1b05f7=>ee(_0x1a902d['body'][_0xa3d2ee(0x131)][_0x1b05f7],_0x558cf9,_0x54c594))[_0xa3d2ee(0x113)](Boolean);return Object['values'](_0x1a902d[_0xa3d2ee(0x130)][_0xa3d2ee(0xf0)])[_0xa3d2ee(0x115)](_0x1130c1=>{const _0x133ece=_0xa3d2ee;this[_0x133ece(0x129)][_0x133ece(0x13e)](_0x1130c1);}),_0x174c1d;}[_0xfce04a(0x107)](_0x34e21e){const _0x7a85f=_0xfce04a;return{'id':_0x34e21e['id'],'threadId':_0x34e21e[_0x7a85f(0x10e)],'ref':_0x34e21e['ref']};}};S=Q([b(0x0,_0x4f3041(_0xb56acb)),b(0x1,_0x4f3041(_0x45e780)),b(0x2,_0x4f3041(_0x25d635))],S);var re=Object[_0xfce04a(0x10b)],te=(_0x1c7f8d,_0x42264b,_0x350777,_0x2e4869)=>{for(var _0x5cdc33=_0x2e4869>0x1?void 0x0:_0x2e4869?re(_0x42264b,_0x350777):_0x42264b,_0x1a278c=_0x1c7f8d['length']-0x1,_0x8b9ed7;_0x1a278c>=0x0;_0x1a278c--)(_0x8b9ed7=_0x1c7f8d[_0x1a278c])&&(_0x5cdc33=_0x8b9ed7(_0x5cdc33)||_0x5cdc33);return _0x5cdc33;},M=(_0x13e3b8,_0x36edb2)=>(_0xe13d49,_0x10222c)=>_0x36edb2(_0xe13d49,_0x10222c,_0x13e3b8);let f=class extends _0x5b77e0{constructor(_0x592708,_0x356a42){const _0x1879e5=_0xfce04a;super(),this[_0x1879e5(0xf7)]=_0x592708,this['_threadCommentDataSource']=_0x356a42,this[_0x1879e5(0x128)]();}[_0xfce04a(0x128)](){const _0xad93d5=_0xfce04a;this[_0xad93d5(0xf7)][_0xad93d5(0xef)]=this[_0xad93d5(0x11d)],this[_0xad93d5(0xf7)][_0xad93d5(0xf6)]=!0x1;}};f=te([M(0x0,_0x531f6f),M(0x1,_0x4f3041(S))],f);var se=Object[_0xfce04a(0x143)],oe=Object[_0xfce04a(0x10b)],ne=(_0x593f4b,_0x4d9402,_0xc1a9c5)=>_0x4d9402 in _0x593f4b?se(_0x593f4b,_0x4d9402,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xc1a9c5}):_0x593f4b[_0x4d9402]=_0xc1a9c5,ie=(_0x432568,_0x379bde,_0x4cd714,_0x39df3)=>{const _0x3ff5ea=_0xfce04a;for(var _0x21585e=_0x39df3>0x1?void 0x0:_0x39df3?oe(_0x379bde,_0x4cd714):_0x379bde,_0x3d4ac9=_0x432568[_0x3ff5ea(0x10c)]-0x1,_0x266903;_0x3d4ac9>=0x0;_0x3d4ac9--)(_0x266903=_0x432568[_0x3d4ac9])&&(_0x21585e=_0x266903(_0x21585e)||_0x21585e);return _0x21585e;},N=(_0x4e479d,_0x5c4729)=>(_0x187777,_0x12412f)=>_0x5c4729(_0x187777,_0x12412f,_0x4e479d),$=(_0x26c7de,_0x197688,_0x34228a)=>ne(_0x26c7de,typeof _0x197688!=_0xfce04a(0xfe)?_0x197688+'':_0x197688,_0x34228a);function _0x2561(){const _0x3f4ba6=['filter','comment','forEach','listComments','pluginName','COMMENT','commentUpdate$','deleteComment','Solve','getComment','_threadCommentDataSource','pipe','parentId','resolveComment','965348zKaUjl','code','get','updateComment','getMemberID','getCurrentUser','_commentService','_initDataSource','_userService','4oteoTq','user','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_init','replyId','root','body','comments','resolved','reply','rangeType','Reply','UNRECOGNIZED','7376622OZvKwv','setConfig','requireSession','Solved','_threadCommentModel','getUnit','1430215EjBWlI','addUser','createTimestamp','Unknown','OpenOrReOpen','Delete','defineProperty','10BjApbN','find','userId','onStarting','addComment','_sessionService','/add','stringify','7njZvMo','YYYY/MM/DD\x20HH:mm','_httpService','11323960zsCFin','map','size','_initUserSync','error','solved','dataSource','users','Add','type','3KFeIhe','add','15509007qJHcMb','syncUpdateMutationToColla','_threadCommentDataSourceService','disposeWithMe','/universer-api/comment/unit/','/reply','rangeId','_configService','75079433KqMMMf','symbol','/edit','_config','unitId','_injector','userID','thread-comment-data-source.config','onReady','post','saveCommentToSnapshot','782825qScoOv','Edit','replies','getOwnPropertyDescriptor','length','content','threadId','subscribe','/solved','format','/delete'];_0x2561=function(){return _0x3f4ba6;};return _0x2561();}let g=class extends _0x136f78{constructor(_0x1d60af=O,_0x8433a8,_0x5ca261){const _0x3c2235=_0xfce04a;super(),this[_0x3c2235(0x100)]=_0x1d60af,this[_0x3c2235(0x102)]=_0x8433a8,this[_0x3c2235(0xfc)]=_0x5ca261;const {..._0x197bc4}=_0x4dae59({},O,this[_0x3c2235(0x100)]);this['_configService'][_0x3c2235(0x138)](z,_0x197bc4);}[_0xfce04a(0x147)](){[[S],[f],[_]]['forEach'](_0x51e02=>{const _0x10d7b1=_0x44da;this[_0x10d7b1(0x102)][_0x10d7b1(0xf4)](_0x51e02);});}[_0xfce04a(0x105)](){const _0x20b7f1=_0xfce04a;this[_0x20b7f1(0x102)]['get'](f),this['_injector']['get'](_);}};$(g,_0xfce04a(0x117),W),$(g,_0xfce04a(0xf2),_0xe3d688['UNIVER_UNKNOWN']),g=ie([_0x1e1d9f(_0x5ca99e,_0x394080,_0x50fff8),N(0x1,_0x4f3041(_0x469122)),N(0x2,_0x41d53f)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x1235ca=_0x5811;function _0x5811(_0x2c7335,_0x26cf29){const _0x3ccd63=_0x3ccd();return _0x5811=function(_0x5811f4,_0x5c6159){_0x5811f4=_0x5811f4-0xc5;let _0x4c9d7d=_0x3ccd63[_0x5811f4];return _0x4c9d7d;},_0x5811(_0x2c7335,_0x26cf29);}(function(_0x14533f,_0x207232){const _0x1c9c10=_0x5811,_0x349fa2=_0x14533f();while(!![]){try{const _0x5a5bf2=-parseInt(_0x1c9c10(0x11c))/0x1*(parseInt(_0x1c9c10(0xe7))/0x2)+-parseInt(_0x1c9c10(0x123))/0x3*(-parseInt(_0x1c9c10(0xe8))/0x4)+parseInt(_0x1c9c10(0x121))/0x5+parseInt(_0x1c9c10(0xfb))/0x6*(-parseInt(_0x1c9c10(0x12e))/0x7)+-parseInt(_0x1c9c10(0x106))/0x8*(-parseInt(_0x1c9c10(0xcb))/0x9)+parseInt(_0x1c9c10(0x10f))/0xa+parseInt(_0x1c9c10(0xff))/0xb*(parseInt(_0x1c9c10(0x10d))/0xc);if(_0x5a5bf2===_0x207232)break;else _0x349fa2['push'](_0x349fa2['shift']());}catch(_0x3b770a){_0x349fa2['push'](_0x349fa2['shift']());}}}(_0x3ccd,0x4de89));import{CommentService as _0x555562,CollaborationSessionService as _0x573248,UniverCollaborationClientPlugin as _0x540873}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5c21b8}from'@univerjs-pro/license';function _0x3ccd(){const _0x8e391b=['userId','_userService','onStarting','1282506dPByvH','rangeId','error','_injector','78474ZQKxqY','type','getComment','defineProperty','delete','_initDataSource','resolved','712ssnrFi','updateComment','parse','pluginName','requireSession','post','/universer-api/comment/unit/','312HpPVAZ','/reply','335340RHBnUt','commentUpdate$','get','parentId','Solve','deleteComment','_initUserSync','reply','getMemberID','payload','Unknown','/list','pipe','7WQIWRt','map','Reply','getOwnPropertyDescriptor','size','2383800fMioHG','content','153dVcMiL','addUser','UNRECOGNIZED','_threadCommentModel','/delete','symbol','threadId','disposeWithMe','createTimestamp','COMMENT','getCurrentUser','7GkjEzz','_configService','_init','Delete','add','_sessionService','getUnit','body','32094vspwBt','UNIVER_UNKNOWN','unitId','getUser','YYYY/MM/DD\x20HH:mm','_commentService','find','/universer-api/user/list','forEach','saveCommentToSnapshot','code','setConfig','values','solved','OpenOrReOpen','format','root','users','listComments','/solved','_config','comments','Add','resolveComment','_httpService','Edit','_threadCommentDataSourceService','userID','161982rCYluo','6796iiMWEs','subscribe','user','/add','stringify','Solved','replies','addComment','customRanges','length','replyId','_threadCommentDataSource','personId','slice','rangeType','filter'];_0x3ccd=function(){return _0x8e391b;};return _0x3ccd();}import{dayjs as _0x56a1fb,UserManagerService as _0x5956d5,Inject as _0x2350c9,Injector as _0x15c6a3,Disposable as _0x3afd63,CustomRangeType as _0x1f64b6,UniverInstanceType as _0x5dc2ff,DependentOn as _0x9d2f9d,IConfigService as _0x4ec177,Plugin as _0x42556e,merge as _0x1578da}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x25c137}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x236df7,IThreadCommentDataSourceService as _0x592d8c}from'@univerjs/thread-comment';import{bufferTime as _0x1f07b6}from'rxjs';import{HTTPService as _0x2ef774}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1aaa12=>(_0x1aaa12[_0x1aaa12[_0x1235ca(0xd9)]=0x0]=_0x1235ca(0xd9),_0x1aaa12[_0x1aaa12[_0x1235ca(0xed)]=0x1]=_0x1235ca(0xed),_0x1aaa12[_0x1aaa12['UNRECOGNIZED']=-0x1]=_0x1235ca(0x125),_0x1aaa12))(I||{}),v=(_0x4b9f29=>(_0x4b9f29[_0x4b9f29[_0x1235ca(0x119)]=0x0]=_0x1235ca(0x119),_0x4b9f29[_0x4b9f29[_0x1235ca(0xe1)]=0x1]='Add',_0x4b9f29[_0x4b9f29['Reply']=0x2]=_0x1235ca(0x11e),_0x4b9f29[_0x4b9f29[_0x1235ca(0xe4)]=0x3]=_0x1235ca(0xe4),_0x4b9f29[_0x4b9f29[_0x1235ca(0xc6)]=0x4]=_0x1235ca(0xc6),_0x4b9f29[_0x4b9f29[_0x1235ca(0x113)]=0x5]=_0x1235ca(0x113),_0x4b9f29[_0x4b9f29['UNRECOGNIZED']=-0x1]=_0x1235ca(0x125),_0x4b9f29))(v||{});const y=_0x389042=>_0x56a1fb(new Date(+_0x389042))[_0x1235ca(0xda)](_0x1235ca(0xcf)),B=async(_0x19bab3,_0xb700ac)=>{const _0xe09022=_0x1235ca,_0x49b1b4=_0x19bab3[_0xe09022(0x111)](_0x5956d5),_0xac9ef0=_0x19bab3[_0xe09022(0x111)](_0x2ef774);_0xb700ac[_0xe09022(0xd3)](_0x1db26d=>{const _0x54274e=_0xe09022;_0x49b1b4[_0x54274e(0xce)](_0x1db26d)&&_0xb700ac[_0x54274e(0x103)](_0x1db26d);}),_0xb700ac[_0xe09022(0x120)]&&(await _0xac9ef0['get'](_0xe09022(0xd2),{'params':{'userIDs':[..._0xb700ac]}}))[_0xe09022(0xca)]['users']['forEach'](_0x7d3c81=>{const _0x29398b=_0xe09022;_0x7d3c81&&_0x49b1b4[_0x29398b(0x124)](_0x7d3c81);});};var K=Object[_0x1235ca(0x11f)],V=(_0x53f30d,_0xa11763,_0x1a7166,_0x431707)=>{const _0x4fd0db=_0x1235ca;for(var _0x1c2f9c=_0x431707>0x1?void 0x0:_0x431707?K(_0xa11763,_0x1a7166):_0xa11763,_0xe156ed=_0x53f30d[_0x4fd0db(0xf1)]-0x1,_0x277212;_0xe156ed>=0x0;_0xe156ed--)(_0x277212=_0x53f30d[_0xe156ed])&&(_0x1c2f9c=_0x277212(_0x1c2f9c)||_0x1c2f9c);return _0x1c2f9c;},p=(_0x9b0dc7,_0x14595a)=>(_0x41e3d1,_0x12080f)=>_0x14595a(_0x41e3d1,_0x12080f,_0x9b0dc7);let _=class extends _0x3afd63{constructor(_0x2606eb,_0x554212,_0x1b019a,_0x389f42){const _0x5b16cb=_0x1235ca;super(),this[_0x5b16cb(0xd0)]=_0x2606eb,this[_0x5b16cb(0x126)]=_0x554212,this[_0x5b16cb(0xf9)]=_0x1b019a,this[_0x5b16cb(0xfe)]=_0x389f42,this[_0x5b16cb(0xc5)](),this[_0x5b16cb(0x115)]();}[_0x1235ca(0x115)](){const _0x69d15f=_0x1235ca;this[_0x69d15f(0x12a)](this['_threadCommentModel'][_0x69d15f(0x110)][_0x69d15f(0x11b)](_0x1f07b6(0x10))['subscribe'](_0x1c26e3=>{const _0x141fc8=_0x69d15f,_0x1bd0a0=new Set();_0x1c26e3[_0x141fc8(0xd3)](_0x429180=>{const _0x507ccd=_0x141fc8;switch(_0x429180[_0x507ccd(0x100)]){case _0x507ccd(0xc7):{const _0x103eab=_0x429180[_0x507ccd(0x118)][_0x507ccd(0xf4)];_0x1bd0a0[_0x507ccd(0xc7)](_0x103eab);break;}}}),B(this[_0x141fc8(0xfe)],_0x1bd0a0);}));}[_0x1235ca(0xc5)](){const _0x4e719e=_0x1235ca;this[_0x4e719e(0x12a)](this[_0x4e719e(0xd0)][_0x4e719e(0x110)][_0x4e719e(0xe9)](async _0x56fc05=>{const _0x121ff5=_0x4e719e;var _0xe33357,_0x557356,_0x55ac37,_0x177d7c;const _0x59f3e2=(_0xe33357=this['_threadCommentModel'][_0x121ff5(0xc9)](_0x56fc05[_0x121ff5(0xcd)])[_0x121ff5(0xd1)](_0x5dd17c=>_0x5dd17c['threadId']===_0x56fc05[_0x121ff5(0x129)]))==null?void 0x0:_0xe33357['root'];if(!_0x59f3e2)return;const {unitId:_0x2092bf,subUnitId:_0x292803}=_0x59f3e2;switch(_0x56fc05[_0x121ff5(0xea)]&&this[_0x121ff5(0xf9)][_0x121ff5(0x124)](_0x56fc05[_0x121ff5(0xea)]),_0x56fc05[_0x121ff5(0x100)]){case v['Add']:break;case v[_0x121ff5(0x11e)]:{this[_0x121ff5(0x126)][_0x121ff5(0xef)](_0x2092bf,_0x292803,{'unitId':_0x2092bf,'subUnitId':_0x292803,'ref':'','id':_0x56fc05[_0x121ff5(0xf2)],'dT':y(+_0x56fc05[_0x121ff5(0x12b)]),'threadId':_0x56fc05[_0x121ff5(0x129)],'personId':(_0x55ac37=(_0x557356=_0x56fc05[_0x121ff5(0xea)])==null?void 0x0:_0x557356[_0x121ff5(0xe6)])!=null?_0x55ac37:_0x56fc05['userId'],'text':JSON['parse'](_0x56fc05[_0x121ff5(0x122)]),'parentId':_0x59f3e2['id']});break;}case v[_0x121ff5(0xc6)]:{const _0x2484be=this[_0x121ff5(0x126)][_0x121ff5(0x101)](_0x2092bf,_0x292803,_0x56fc05[_0x121ff5(0xf2)]);_0x2484be&&_0x2484be[_0x121ff5(0x112)]&&this[_0x121ff5(0x126)][_0x121ff5(0x114)](_0x2092bf,_0x292803,_0x56fc05[_0x121ff5(0xf2)]);break;}case v[_0x121ff5(0xe4)]:{this[_0x121ff5(0x126)][_0x121ff5(0x107)](_0x2092bf,_0x292803,{'commentId':_0x56fc05[_0x121ff5(0xf2)],'text':JSON['parse'](_0x56fc05[_0x121ff5(0x122)])});break;}case v['Solve']:{const _0x5e20ba=(_0x177d7c=this[_0x121ff5(0x126)]['getUnit'](_0x56fc05[_0x121ff5(0xcd)])[_0x121ff5(0xd1)](_0x17306=>_0x17306['threadId']===_0x56fc05[_0x121ff5(0x129)]))==null?void 0x0:_0x177d7c[_0x121ff5(0xdb)];_0x5e20ba&&this[_0x121ff5(0x126)]['resolveComment'](_0x2092bf,_0x292803,_0x5e20ba['id'],_0x56fc05['solved']===I[_0x121ff5(0xed)]);break;}}}));}};_=V([p(0x0,_0x2350c9(_0x555562)),p(0x1,_0x2350c9(_0x236df7)),p(0x2,_0x2350c9(_0x5956d5)),p(0x3,_0x2350c9(_0x15c6a3))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x1235ca(0x11f)],Q=(_0x2eb056,_0x4131f1,_0x5edd1c,_0x4e52d6)=>{const _0x24d183=_0x1235ca;for(var _0x2d146c=_0x4e52d6>0x1?void 0x0:_0x4e52d6?k(_0x4131f1,_0x5edd1c):_0x4131f1,_0x186ca1=_0x2eb056[_0x24d183(0xf1)]-0x1,_0x5411bb;_0x186ca1>=0x0;_0x186ca1--)(_0x5411bb=_0x2eb056[_0x186ca1])&&(_0x2d146c=_0x5411bb(_0x2d146c)||_0x2d146c);return _0x2d146c;},b=(_0x185f63,_0x37f0d2)=>(_0x24dcd6,_0xa789d5)=>_0x37f0d2(_0x24dcd6,_0xa789d5,_0x185f63);function X(_0x200340,_0xe2490f){const _0x501738=_0x1235ca,_0x7ba541=_0x200340[_0x501738(0xee)][0x0];return{..._0xe2490f,'id':_0x7ba541['replyId'],'resolved':_0x200340[_0x501738(0xd8)]===0x1,'dT':y(_0x7ba541['createTimestamp']),'personId':_0x7ba541[_0x501738(0xf8)],'threadId':_0x7ba541[_0x501738(0x129)]};}function ee(_0x4ba0a2,_0x35ee9b,_0x4d0955){const _0x15e026=_0x1235ca;var _0x2b91a5,_0x393e9c;if(((_0x393e9c=(_0x2b91a5=_0x4ba0a2==null?void 0x0:_0x4ba0a2[_0x15e026(0xee)])==null?void 0x0:_0x2b91a5['length'])!=null?_0x393e9c:0x0)>0x0){const _0x4de92e=(_0x314a62,_0x11623a)=>({'id':_0x314a62[_0x15e026(0xf2)],'threadId':_0x314a62['threadId'],'dT':y(_0x314a62['createTimestamp']),'personId':_0x314a62[_0x15e026(0xf8)],'resolved':_0x4ba0a2[_0x15e026(0xd8)]===I[_0x15e026(0xed)],'unitId':_0x35ee9b,'subUnitId':_0x4d0955,'text':JSON[_0x15e026(0x108)](_0x314a62[_0x15e026(0x122)]),'parentId':_0x11623a}),_0x18a972=_0x4de92e(_0x4ba0a2['replies'][0x0]);return{..._0x18a972,'children':_0x4ba0a2['replies'][_0x15e026(0xf5)](0x1)['map'](_0x382d43=>_0x4de92e(_0x382d43,_0x18a972['id']))};}return null;}let S=class{constructor(_0x26e002,_0x32017d,_0x5b9781){const _0x58501e=_0x1235ca;this['_httpService']=_0x26e002,this['_userService']=_0x32017d,this[_0x58501e(0xc8)]=_0x5b9781;}async[_0x1235ca(0xef)](_0x2f8775){const _0x3fb915=_0x1235ca;var _0x5658ba,_0x53ed3f;const {parentId:_0x2ef50e,unitId:_0x49c02d,text:_0x266a8d,threadId:_0x4049df}=_0x2f8775,_0xca096a=(_0x53ed3f=(_0x5658ba=_0x266a8d[_0x3fb915(0xf0)])==null?void 0x0:_0x5658ba['filter'](_0x6d30a4=>_0x6d30a4['rangeType']===_0x1f64b6['COMMENT'])[_0x3fb915(0x11d)](_0x5e3151=>_0x5e3151['rangeId']))!=null?_0x53ed3f:[],_0x5c2b0a=JSON[_0x3fb915(0xec)](_0x266a8d),_0x3e24e1=(await this[_0x3fb915(0xc8)][_0x3fb915(0x10a)](_0x49c02d))[_0x3fb915(0x117)]();if(_0x2ef50e){const _0x327163={'memberId':_0x3e24e1,'unitId':_0x49c02d,'content':_0x5c2b0a,'mention':_0xca096a,'threadId':_0x4049df},_0x363ad2=(await this[_0x3fb915(0xe3)][_0x3fb915(0x10b)](_0x3fb915(0x10c)+_0x49c02d+_0x3fb915(0x10e),{'body':_0x327163}))['body'][_0x3fb915(0x116)];return{..._0x2f8775,'id':_0x363ad2['replyId'],'dT':_0x56a1fb(+_0x363ad2[_0x3fb915(0x12b)])['format'](_0x3fb915(0xcf)),'personId':_0x363ad2[_0x3fb915(0xf8)]};}else{const _0x119bec={'memberId':_0x3e24e1,'unitId':_0x49c02d,'content':_0x5c2b0a,'mention':_0xca096a},_0x4b6eca=await this[_0x3fb915(0xe3)][_0x3fb915(0x10b)](_0x3fb915(0x10c)+_0x49c02d+_0x3fb915(0xeb),{'body':_0x119bec});return X(_0x4b6eca['body']['comment'],_0x2f8775);}}async[_0x1235ca(0x107)](_0x2bb358){const _0x5d710c=_0x1235ca;var _0x8c170d,_0x5ce3a6;const {text:_0x5092de,unitId:_0xe2f23b}=_0x2bb358,_0x367f94=(_0x5ce3a6=(_0x8c170d=_0x5092de[_0x5d710c(0xf0)])==null?void 0x0:_0x8c170d[_0x5d710c(0xf7)](_0x305ca5=>_0x305ca5[_0x5d710c(0xf6)]===_0x1f64b6[_0x5d710c(0x12c)])['map'](_0x5da768=>_0x5da768[_0x5d710c(0xfc)]))!=null?_0x5ce3a6:[],_0xa6a941=JSON['stringify'](_0x5092de),_0x40a6df=_0x2bb358[_0x5d710c(0x129)],_0x14c408=_0x2bb358['id'],_0x19aabc={'memberId':(await this[_0x5d710c(0xc8)][_0x5d710c(0x10a)](_0xe2f23b))[_0x5d710c(0x117)](),'unitId':_0xe2f23b,'threadId':_0x40a6df,'mention':_0x367f94,'content':_0xa6a941,'replyId':_0x14c408},_0x1aaa42=await this['_httpService'][_0x5d710c(0x10b)]('/universer-api/comment/unit/'+_0xe2f23b+'/edit',{'body':_0x19aabc});return!_0x1aaa42[_0x5d710c(0xca)][_0x5d710c(0xfd)]||_0x1aaa42[_0x5d710c(0xca)][_0x5d710c(0xfd)][_0x5d710c(0xd5)]===0x1;}async[_0x1235ca(0xe2)](_0x234ba7){const _0x3f5870=_0x1235ca,{unitId:_0xba90de}=_0x234ba7,_0x58f3d8=_0x234ba7[_0x3f5870(0x129)],_0x4b9bc4={'memberId':this[_0x3f5870(0xf9)][_0x3f5870(0x12d)]()[_0x3f5870(0xe6)],'unitId':_0xba90de,'threadId':_0x58f3d8,'solved':_0x234ba7[_0x3f5870(0x105)]?I[_0x3f5870(0xed)]:I[_0x3f5870(0xd9)]},_0x2285e7=await this['_httpService'][_0x3f5870(0x10b)]('/universer-api/comment/unit/'+_0xba90de+_0x3f5870(0xde),{'body':_0x4b9bc4});return!_0x2285e7[_0x3f5870(0xca)][_0x3f5870(0xfd)]||_0x2285e7['body']['error'][_0x3f5870(0xd5)]===0x1;}async['deleteComment'](_0x5cb1f7,_0xa3c303,_0x240c55,_0x3eaf87){const _0x5d8cd2=_0x1235ca,_0x56b285={'memberId':(await this[_0x5d8cd2(0xc8)][_0x5d8cd2(0x10a)](_0x5cb1f7))['getMemberID'](),'threadId':_0x240c55,'replyId':_0x3eaf87,'unitId':_0x5cb1f7},_0x43a669=await this['_httpService'][_0x5d8cd2(0x10b)](_0x5d8cd2(0x10c)+_0x5cb1f7+_0x5d8cd2(0x127),{'body':_0x56b285});return!_0x43a669[_0x5d8cd2(0xca)][_0x5d8cd2(0xfd)]||_0x43a669[_0x5d8cd2(0xca)][_0x5d8cd2(0xfd)][_0x5d8cd2(0xd5)]===0x1;}async[_0x1235ca(0xdd)](_0x5b19e7,_0x133444,_0x2fa07b){const _0x2b64fb=_0x1235ca,_0x4bd3e7={'unitId':_0x5b19e7,'threadId':_0x2fa07b},_0x2be89f=await this[_0x2b64fb(0xe3)]['post']('/universer-api/comment/unit/'+_0x5b19e7+_0x2b64fb(0x11a),{'body':_0x4bd3e7}),_0x2b3f9b=_0x2fa07b['map'](_0x4182a6=>ee(_0x2be89f['body'][_0x2b64fb(0xe0)][_0x4182a6],_0x5b19e7,_0x133444))[_0x2b64fb(0xf7)](Boolean);return Object[_0x2b64fb(0xd7)](_0x2be89f[_0x2b64fb(0xca)][_0x2b64fb(0xdc)])[_0x2b64fb(0xd3)](_0x388e3a=>{const _0x130c41=_0x2b64fb;this[_0x130c41(0xf9)][_0x130c41(0x124)](_0x388e3a);}),_0x2b3f9b;}[_0x1235ca(0xd4)](_0x1983ca){const _0x10fd02=_0x1235ca;return{'id':_0x1983ca['id'],'threadId':_0x1983ca[_0x10fd02(0x129)],'ref':_0x1983ca['ref']};}};S=Q([b(0x0,_0x2350c9(_0x2ef774)),b(0x1,_0x2350c9(_0x5956d5)),b(0x2,_0x2350c9(_0x573248))],S);var re=Object[_0x1235ca(0x11f)],te=(_0x38823f,_0xcc5db3,_0x5d3b08,_0x5deff8)=>{const _0x55feb8=_0x1235ca;for(var _0x3df669=_0x5deff8>0x1?void 0x0:_0x5deff8?re(_0xcc5db3,_0x5d3b08):_0xcc5db3,_0x8fb86b=_0x38823f[_0x55feb8(0xf1)]-0x1,_0x2846a6;_0x8fb86b>=0x0;_0x8fb86b--)(_0x2846a6=_0x38823f[_0x8fb86b])&&(_0x3df669=_0x2846a6(_0x3df669)||_0x3df669);return _0x3df669;},M=(_0x495b59,_0x5b21ae)=>(_0x2e68ea,_0xa442e9)=>_0x5b21ae(_0x2e68ea,_0xa442e9,_0x495b59);let f=class extends _0x3afd63{constructor(_0x1d58a6,_0x190b1c){const _0x1b1814=_0x1235ca;super(),this['_threadCommentDataSourceService']=_0x1d58a6,this['_threadCommentDataSource']=_0x190b1c,this[_0x1b1814(0x104)]();}[_0x1235ca(0x104)](){const _0x38aa39=_0x1235ca;this[_0x38aa39(0xe5)]['dataSource']=this[_0x38aa39(0xf3)],this[_0x38aa39(0xe5)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x592d8c),M(0x1,_0x2350c9(S))],f);var se=Object[_0x1235ca(0x102)],oe=Object[_0x1235ca(0x11f)],ne=(_0x5cf78a,_0x190ffb,_0x2a73ec)=>_0x190ffb in _0x5cf78a?se(_0x5cf78a,_0x190ffb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2a73ec}):_0x5cf78a[_0x190ffb]=_0x2a73ec,ie=(_0x2fd0b1,_0xf159f7,_0x4a56b3,_0x544c43)=>{for(var _0x26a1ae=_0x544c43>0x1?void 0x0:_0x544c43?oe(_0xf159f7,_0x4a56b3):_0xf159f7,_0x56e105=_0x2fd0b1['length']-0x1,_0x2987fa;_0x56e105>=0x0;_0x56e105--)(_0x2987fa=_0x2fd0b1[_0x56e105])&&(_0x26a1ae=_0x2987fa(_0x26a1ae)||_0x26a1ae);return _0x26a1ae;},N=(_0x91e233,_0x554281)=>(_0x386be6,_0x9e1fa8)=>_0x554281(_0x386be6,_0x9e1fa8,_0x91e233),$=(_0x68969,_0x502e0b,_0x2db86e)=>ne(_0x68969,typeof _0x502e0b!=_0x1235ca(0x128)?_0x502e0b+'':_0x502e0b,_0x2db86e);let g=class extends _0x42556e{constructor(_0x1bf8d5=O,_0x5be294,_0x2eac1b){const _0x4fa692=_0x1235ca;super(),this[_0x4fa692(0xdf)]=_0x1bf8d5,this[_0x4fa692(0xfe)]=_0x5be294,this[_0x4fa692(0x12f)]=_0x2eac1b;const {..._0x1515c7}=_0x1578da({},O,this[_0x4fa692(0xdf)]);this[_0x4fa692(0x12f)][_0x4fa692(0xd6)](z,_0x1515c7);}[_0x1235ca(0xfa)](){const _0x1f8c53=_0x1235ca;[[S],[f],[_]][_0x1f8c53(0xd3)](_0x284561=>{this['_injector']['add'](_0x284561);});}['onReady'](){const _0x182ce7=_0x1235ca;this[_0x182ce7(0xfe)][_0x182ce7(0x111)](f),this['_injector']['get'](_);}};$(g,_0x1235ca(0x109),W),$(g,_0x1235ca(0x100),_0x5dc2ff[_0x1235ca(0xcc)]),g=ie([_0x9d2f9d(_0x25c137,_0x540873,_0x5c21b8),N(0x1,_0x2350c9(_0x15c6a3)),N(0x2,_0x4ec177)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x24ff(){const _0x4631d7=['symbol','@univerjs/network','/add','subscribe','_configService','/list','resolved','rangeId','Inject','user','Disposable','listComments','Edit','UniverInstanceType','Plugin','HTTPService','pipe','object','getOwnPropertyDescriptor','UniverNetwork','createTimestamp','forEach','code','/solved','content','comments','thread-comment-data-source.config','setConfig','UniverCollaborationClientPlugin','1242iPRVHi','145896WpYvXk','UniverProLicense','UniverProCollaborationClient','body','parse','1534440QWQQot','Add','/universer-api/user/list','Solved','CommentService','pluginName','371slGdIo','_config','Solve','Unknown','17540fkxsPe','customRanges','384emoEmt','stringify','482996JAlveh','syncUpdateMutationToColla','values','504413qzzBow','replyId','_sessionService','userId','_initUserSync','addUser','replies','comment','/universer-api/comment/unit/','length','addComment','UserManagerService','Delete','requireSession','bufferTime','rxjs','onStarting','335YlbMTD','/reply','dayjs','users','Reply','disposeWithMe','rangeType','deleteComment','2300ZFObBH','_commentService','_initDataSource','updateComment','YYYY/MM/DD\x20HH:mm','error','253RxRonv','defineProperty','_httpService','root','saveCommentToSnapshot','commentUpdate$','4FDpbba','UniverThreadCommentDataSourcePlugin','map','getUnit','@univerjs/thread-comment-ui','getCurrentUser','UniverProThreadCommentDatasource','180tNgOYC','@univerjs-pro/license','_userService','onReady','IConfigService','filter','UNIVER_UNKNOWN','_init','get','exports','COMMENT','reply','Module','find','UniverLicensePlugin','unitId','_injector','_threadCommentDataSourceService','post','type','_threadCommentModel','CustomRangeType','size','format','threadId','amd','resolveComment','@univerjs-pro/collaboration-client','payload','UniverThreadCommentUIPlugin','personId','@univerjs/core','getMemberID','userID','parentId','solved','UNRECOGNIZED','OpenOrReOpen'];_0x24ff=function(){return _0x4631d7;};return _0x24ff();}function _0x29df(_0x94b15c,_0x3ff4c8){const _0x24ffd0=_0x24ff();return _0x29df=function(_0x29df2f,_0x452d07){_0x29df2f=_0x29df2f-0x1c2;let _0x54e486=_0x24ffd0[_0x29df2f];return _0x54e486;},_0x29df(_0x94b15c,_0x3ff4c8);}(function(_0x4be3c7,_0x1e513b){const _0xc3e33c=_0x29df,_0xc37a45=_0x4be3c7();while(!![]){try{const _0x44fa05=parseInt(_0xc3e33c(0x243))/0x1*(-parseInt(_0xc3e33c(0x1e5))/0x2)+-parseInt(_0xc3e33c(0x235))/0x3+parseInt(_0xc3e33c(0x23f))/0x4*(parseInt(_0xc3e33c(0x1d1))/0x5)+parseInt(_0xc3e33c(0x230))/0x6*(parseInt(_0xc3e33c(0x23b))/0x7)+-parseInt(_0xc3e33c(0x241))/0x8*(-parseInt(_0xc3e33c(0x22f))/0x9)+parseInt(_0xc3e33c(0x1d9))/0xa*(-parseInt(_0xc3e33c(0x1df))/0xb)+-parseInt(_0xc3e33c(0x1ec))/0xc*(-parseInt(_0xc3e33c(0x246))/0xd);if(_0x44fa05===_0x1e513b)break;else _0xc37a45['push'](_0xc37a45['shift']());}catch(_0xec27ad){_0xc37a45['push'](_0xc37a45['shift']());}}}(_0x24ff,0xa8124),function(_0x31153f,_0x51d7f7){const _0x3f52c4=_0x29df;typeof exports==_0x3f52c4(0x223)&&typeof module<'u'?_0x51d7f7(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x3f52c4(0x205)]?define([_0x3f52c4(0x1f5),_0x3f52c4(0x207),_0x3f52c4(0x1ed),_0x3f52c4(0x20b),_0x3f52c4(0x1e9),'@univerjs/thread-comment','rxjs',_0x3f52c4(0x213)],_0x51d7f7):(_0x31153f=typeof globalThis<'u'?globalThis:_0x31153f||self,_0x51d7f7(_0x31153f[_0x3f52c4(0x1eb)]={},_0x31153f[_0x3f52c4(0x232)],_0x31153f[_0x3f52c4(0x231)],_0x31153f['UniverCore'],_0x31153f['UniverThreadCommentUi'],_0x31153f['UniverThreadComment'],_0x31153f[_0x3f52c4(0x1cf)],_0x31153f[_0x3f52c4(0x225)]));}(this,function(_0x3188c5,_0x32ad6d,_0x38464e,_0x458bb5,_0x47786a,_0xfb4f33,_0x4b2743,_0x221283){'use strict';const _0x340648=_0x29df;const _0x39cd8a='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x323cf3=(_0x292234=>(_0x292234[_0x292234['OpenOrReOpen']=0x0]=_0x340648(0x211),_0x292234[_0x292234['Solved']=0x1]=_0x340648(0x238),_0x292234[_0x292234[_0x340648(0x210)]=-0x1]=_0x340648(0x210),_0x292234))(_0x323cf3||{}),_0x5b91b4=(_0x308a5b=>(_0x308a5b[_0x308a5b[_0x340648(0x23e)]=0x0]=_0x340648(0x23e),_0x308a5b[_0x308a5b[_0x340648(0x236)]=0x1]='Add',_0x308a5b[_0x308a5b[_0x340648(0x1d5)]=0x2]=_0x340648(0x1d5),_0x308a5b[_0x308a5b[_0x340648(0x21e)]=0x3]=_0x340648(0x21e),_0x308a5b[_0x308a5b[_0x340648(0x1cc)]=0x4]=_0x340648(0x1cc),_0x308a5b[_0x308a5b[_0x340648(0x23d)]=0x5]=_0x340648(0x23d),_0x308a5b[_0x308a5b['UNRECOGNIZED']=-0x1]=_0x340648(0x210),_0x308a5b))(_0x5b91b4||{});const _0x23bde2=_0x186af7=>_0x458bb5['dayjs'](new Date(+_0x186af7))[_0x340648(0x203)](_0x340648(0x1dd)),_0x2dd3be=async(_0x395b65,_0x4d6fdf)=>{const _0x37ce5e=_0x340648,_0x4d14ca=_0x395b65[_0x37ce5e(0x1f4)](_0x458bb5[_0x37ce5e(0x1cb)]),_0x404548=_0x395b65[_0x37ce5e(0x1f4)](_0x221283[_0x37ce5e(0x221)]);_0x4d6fdf[_0x37ce5e(0x227)](_0x4f1be3=>{_0x4d14ca['getUser'](_0x4f1be3)&&_0x4d6fdf['delete'](_0x4f1be3);}),_0x4d6fdf[_0x37ce5e(0x202)]&&(await _0x404548[_0x37ce5e(0x1f4)](_0x37ce5e(0x237),{'params':{'userIDs':[..._0x4d6fdf]}}))['body'][_0x37ce5e(0x1d4)][_0x37ce5e(0x227)](_0x3b5915=>{const _0x50aefd=_0x37ce5e;_0x3b5915&&_0x4d14ca[_0x50aefd(0x1c5)](_0x3b5915);});};var _0x4752ff=Object['getOwnPropertyDescriptor'],_0x44d914=(_0x53104a,_0x4c14bc,_0x4f12b9,_0x11a82a)=>{for(var _0x12aadc=_0x11a82a>0x1?void 0x0:_0x11a82a?_0x4752ff(_0x4c14bc,_0x4f12b9):_0x4c14bc,_0x1fd1b4=_0x53104a['length']-0x1,_0x41d8df;_0x1fd1b4>=0x0;_0x1fd1b4--)(_0x41d8df=_0x53104a[_0x1fd1b4])&&(_0x12aadc=_0x41d8df(_0x12aadc)||_0x12aadc);return _0x12aadc;},_0x1dd67f=(_0xdb5f25,_0x5adf80)=>(_0x11a7e3,_0x1d4220)=>_0x5adf80(_0x11a7e3,_0x1d4220,_0xdb5f25);let _0x348a71=class extends _0x458bb5[_0x340648(0x21c)]{constructor(_0x1baf0a,_0x336c23,_0x33459f,_0x517a06){const _0x2c3108=_0x340648;super(),this[_0x2c3108(0x1da)]=_0x1baf0a,this[_0x2c3108(0x200)]=_0x336c23,this[_0x2c3108(0x1ee)]=_0x33459f,this['_injector']=_0x517a06,this[_0x2c3108(0x1f3)](),this[_0x2c3108(0x1c4)]();}['_initUserSync'](){const _0xb85a46=_0x340648;this[_0xb85a46(0x1d6)](this[_0xb85a46(0x200)][_0xb85a46(0x1e4)][_0xb85a46(0x222)](_0x4b2743[_0xb85a46(0x1ce)](0x10))[_0xb85a46(0x215)](_0x2c9304=>{const _0x20d7d7=_0xb85a46,_0x28e10e=new Set();_0x2c9304[_0x20d7d7(0x227)](_0x2365fa=>{const _0x4614e4=_0x20d7d7;switch(_0x2365fa['type']){case'add':{const _0x803aed=_0x2365fa[_0x4614e4(0x208)][_0x4614e4(0x20a)];_0x28e10e['add'](_0x803aed);break;}}}),_0x2dd3be(this[_0x20d7d7(0x1fc)],_0x28e10e);}));}[_0x340648(0x1f3)](){const _0x1c3e82=_0x340648;this[_0x1c3e82(0x1d6)](this[_0x1c3e82(0x1da)]['commentUpdate$'][_0x1c3e82(0x215)](async _0x3b821d=>{const _0x2fbedd=_0x1c3e82;var _0x5c1618,_0x13165a,_0x2713f3,_0x3e85c2;const _0x1d4e48=(_0x5c1618=this[_0x2fbedd(0x200)][_0x2fbedd(0x1e8)](_0x3b821d[_0x2fbedd(0x1fb)])[_0x2fbedd(0x1f9)](_0x405574=>_0x405574[_0x2fbedd(0x204)]===_0x3b821d[_0x2fbedd(0x204)]))==null?void 0x0:_0x5c1618[_0x2fbedd(0x1e2)];if(!_0x1d4e48)return;const {unitId:_0x6784f1,subUnitId:_0x2bfdef}=_0x1d4e48;switch(_0x3b821d[_0x2fbedd(0x21b)]&&this[_0x2fbedd(0x1ee)][_0x2fbedd(0x1c5)](_0x3b821d['user']),_0x3b821d[_0x2fbedd(0x1ff)]){case _0x5b91b4[_0x2fbedd(0x236)]:break;case _0x5b91b4[_0x2fbedd(0x1d5)]:{this[_0x2fbedd(0x200)][_0x2fbedd(0x1ca)](_0x6784f1,_0x2bfdef,{'unitId':_0x6784f1,'subUnitId':_0x2bfdef,'ref':'','id':_0x3b821d[_0x2fbedd(0x247)],'dT':_0x23bde2(+_0x3b821d[_0x2fbedd(0x226)]),'threadId':_0x3b821d[_0x2fbedd(0x204)],'personId':(_0x2713f3=(_0x13165a=_0x3b821d['user'])==null?void 0x0:_0x13165a[_0x2fbedd(0x20d)])!=null?_0x2713f3:_0x3b821d[_0x2fbedd(0x1c3)],'text':JSON[_0x2fbedd(0x234)](_0x3b821d[_0x2fbedd(0x22a)]),'parentId':_0x1d4e48['id']});break;}case _0x5b91b4[_0x2fbedd(0x1cc)]:{const _0x2190d5=this[_0x2fbedd(0x200)]['getComment'](_0x6784f1,_0x2bfdef,_0x3b821d[_0x2fbedd(0x247)]);_0x2190d5&&_0x2190d5[_0x2fbedd(0x20e)]&&this[_0x2fbedd(0x200)][_0x2fbedd(0x1d8)](_0x6784f1,_0x2bfdef,_0x3b821d[_0x2fbedd(0x247)]);break;}case _0x5b91b4[_0x2fbedd(0x21e)]:{this[_0x2fbedd(0x200)][_0x2fbedd(0x1dc)](_0x6784f1,_0x2bfdef,{'commentId':_0x3b821d[_0x2fbedd(0x247)],'text':JSON['parse'](_0x3b821d[_0x2fbedd(0x22a)])});break;}case _0x5b91b4[_0x2fbedd(0x23d)]:{const _0x559b5a=(_0x3e85c2=this[_0x2fbedd(0x200)][_0x2fbedd(0x1e8)](_0x3b821d['unitId'])[_0x2fbedd(0x1f9)](_0x578f88=>_0x578f88['threadId']===_0x3b821d[_0x2fbedd(0x204)]))==null?void 0x0:_0x3e85c2['root'];_0x559b5a&&this['_threadCommentModel']['resolveComment'](_0x6784f1,_0x2bfdef,_0x559b5a['id'],_0x3b821d[_0x2fbedd(0x20f)]===_0x323cf3['Solved']);break;}}}));}};_0x348a71=_0x44d914([_0x1dd67f(0x0,_0x458bb5[_0x340648(0x21a)](_0x32ad6d[_0x340648(0x239)])),_0x1dd67f(0x1,_0x458bb5[_0x340648(0x21a)](_0xfb4f33['ThreadCommentModel'])),_0x1dd67f(0x2,_0x458bb5[_0x340648(0x21a)](_0x458bb5['UserManagerService'])),_0x1dd67f(0x3,_0x458bb5[_0x340648(0x21a)](_0x458bb5['Injector']))],_0x348a71);const _0x142f24=_0x340648(0x22c),_0x3abd2a={};var _0x58757c=Object[_0x340648(0x224)],_0x13c1bd=(_0x2d35ff,_0x124d28,_0x1580e6,_0x5e81c4)=>{const _0x17aa06=_0x340648;for(var _0x405273=_0x5e81c4>0x1?void 0x0:_0x5e81c4?_0x58757c(_0x124d28,_0x1580e6):_0x124d28,_0x1f4b07=_0x2d35ff[_0x17aa06(0x1c9)]-0x1,_0x8b523f;_0x1f4b07>=0x0;_0x1f4b07--)(_0x8b523f=_0x2d35ff[_0x1f4b07])&&(_0x405273=_0x8b523f(_0x405273)||_0x405273);return _0x405273;},_0x3e547f=(_0x435dce,_0x2b8c23)=>(_0x173946,_0x2657b3)=>_0x2b8c23(_0x173946,_0x2657b3,_0x435dce);function _0xbb19a3(_0x2082ee,_0x33af49){const _0x122013=_0x340648,_0x4b888d=_0x2082ee[_0x122013(0x1c6)][0x0];return{..._0x33af49,'id':_0x4b888d[_0x122013(0x247)],'resolved':_0x2082ee[_0x122013(0x20f)]===0x1,'dT':_0x23bde2(_0x4b888d[_0x122013(0x226)]),'personId':_0x4b888d['userId'],'threadId':_0x4b888d[_0x122013(0x204)]};}function _0x373208(_0x2d9743,_0x217348,_0x2192af){const _0x3cfb63=_0x340648;var _0xb16320,_0x2580b4;if(((_0x2580b4=(_0xb16320=_0x2d9743==null?void 0x0:_0x2d9743['replies'])==null?void 0x0:_0xb16320[_0x3cfb63(0x1c9)])!=null?_0x2580b4:0x0)>0x0){const _0x292465=(_0x39220c,_0x3e656f)=>({'id':_0x39220c[_0x3cfb63(0x247)],'threadId':_0x39220c[_0x3cfb63(0x204)],'dT':_0x23bde2(_0x39220c[_0x3cfb63(0x226)]),'personId':_0x39220c['userId'],'resolved':_0x2d9743['solved']===_0x323cf3[_0x3cfb63(0x238)],'unitId':_0x217348,'subUnitId':_0x2192af,'text':JSON[_0x3cfb63(0x234)](_0x39220c[_0x3cfb63(0x22a)]),'parentId':_0x3e656f}),_0x329509=_0x292465(_0x2d9743[_0x3cfb63(0x1c6)][0x0]);return{..._0x329509,'children':_0x2d9743[_0x3cfb63(0x1c6)]['slice'](0x1)['map'](_0x549d59=>_0x292465(_0x549d59,_0x329509['id']))};}return null;}let _0x418641=class{constructor(_0x1b3781,_0x3bea40,_0x40af09){const _0x5da181=_0x340648;this['_httpService']=_0x1b3781,this['_userService']=_0x3bea40,this[_0x5da181(0x1c2)]=_0x40af09;}async[_0x340648(0x1ca)](_0x1f38ff){const _0x5aeca1=_0x340648;var _0x2c5510,_0x31af85;const {parentId:_0x117d3a,unitId:_0x226126,text:_0x447096,threadId:_0x22183d}=_0x1f38ff,_0x57c55e=(_0x31af85=(_0x2c5510=_0x447096[_0x5aeca1(0x240)])==null?void 0x0:_0x2c5510[_0x5aeca1(0x1f1)](_0x811feb=>_0x811feb[_0x5aeca1(0x1d7)]===_0x458bb5[_0x5aeca1(0x201)][_0x5aeca1(0x1f6)])[_0x5aeca1(0x1e7)](_0x34a2d1=>_0x34a2d1['rangeId']))!=null?_0x31af85:[],_0x1411ee=JSON['stringify'](_0x447096),_0x24412c=(await this[_0x5aeca1(0x1c2)]['requireSession'](_0x226126))[_0x5aeca1(0x20c)]();if(_0x117d3a){const _0x24474c={'memberId':_0x24412c,'unitId':_0x226126,'content':_0x1411ee,'mention':_0x57c55e,'threadId':_0x22183d},_0x196638=(await this[_0x5aeca1(0x1e1)][_0x5aeca1(0x1fe)]('/universer-api/comment/unit/'+_0x226126+_0x5aeca1(0x1d2),{'body':_0x24474c}))[_0x5aeca1(0x233)][_0x5aeca1(0x1f7)];return{..._0x1f38ff,'id':_0x196638[_0x5aeca1(0x247)],'dT':_0x458bb5[_0x5aeca1(0x1d3)](+_0x196638[_0x5aeca1(0x226)])['format'](_0x5aeca1(0x1dd)),'personId':_0x196638[_0x5aeca1(0x1c3)]};}else{const _0xf660e9={'memberId':_0x24412c,'unitId':_0x226126,'content':_0x1411ee,'mention':_0x57c55e},_0x5898db=await this['_httpService'][_0x5aeca1(0x1fe)](_0x5aeca1(0x1c8)+_0x226126+_0x5aeca1(0x214),{'body':_0xf660e9});return _0xbb19a3(_0x5898db['body'][_0x5aeca1(0x1c7)],_0x1f38ff);}}async[_0x340648(0x1dc)](_0x25aedc){const _0x63b0ad=_0x340648;var _0x4dff73,_0x5b048d;const {text:_0x400031,unitId:_0x310cd9}=_0x25aedc,_0x2c1114=(_0x5b048d=(_0x4dff73=_0x400031[_0x63b0ad(0x240)])==null?void 0x0:_0x4dff73['filter'](_0x127314=>_0x127314[_0x63b0ad(0x1d7)]===_0x458bb5[_0x63b0ad(0x201)]['COMMENT'])['map'](_0x18d204=>_0x18d204[_0x63b0ad(0x219)]))!=null?_0x5b048d:[],_0x5cb815=JSON[_0x63b0ad(0x242)](_0x400031),_0x4b8d9b=_0x25aedc['threadId'],_0x18ed8c=_0x25aedc['id'],_0x5246b7={'memberId':(await this[_0x63b0ad(0x1c2)][_0x63b0ad(0x1cd)](_0x310cd9))[_0x63b0ad(0x20c)](),'unitId':_0x310cd9,'threadId':_0x4b8d9b,'mention':_0x2c1114,'content':_0x5cb815,'replyId':_0x18ed8c},_0x85b265=await this[_0x63b0ad(0x1e1)][_0x63b0ad(0x1fe)]('/universer-api/comment/unit/'+_0x310cd9+'/edit',{'body':_0x5246b7});return!_0x85b265[_0x63b0ad(0x233)]['error']||_0x85b265[_0x63b0ad(0x233)][_0x63b0ad(0x1de)][_0x63b0ad(0x228)]===0x1;}async[_0x340648(0x206)](_0x54083d){const _0x1a669c=_0x340648,{unitId:_0x3415a3}=_0x54083d,_0x36bdde=_0x54083d[_0x1a669c(0x204)],_0x5818c4={'memberId':this['_userService'][_0x1a669c(0x1ea)]()[_0x1a669c(0x20d)],'unitId':_0x3415a3,'threadId':_0x36bdde,'solved':_0x54083d[_0x1a669c(0x218)]?_0x323cf3[_0x1a669c(0x238)]:_0x323cf3[_0x1a669c(0x211)]},_0x35d8fa=await this['_httpService'][_0x1a669c(0x1fe)](_0x1a669c(0x1c8)+_0x3415a3+_0x1a669c(0x229),{'body':_0x5818c4});return!_0x35d8fa['body'][_0x1a669c(0x1de)]||_0x35d8fa['body']['error'][_0x1a669c(0x228)]===0x1;}async['deleteComment'](_0x464603,_0x3881d4,_0x56f4ff,_0x2c7df6){const _0x3230e3=_0x340648,_0x1a4996={'memberId':(await this[_0x3230e3(0x1c2)]['requireSession'](_0x464603))['getMemberID'](),'threadId':_0x56f4ff,'replyId':_0x2c7df6,'unitId':_0x464603},_0x5211e2=await this[_0x3230e3(0x1e1)][_0x3230e3(0x1fe)](_0x3230e3(0x1c8)+_0x464603+'/delete',{'body':_0x1a4996});return!_0x5211e2[_0x3230e3(0x233)][_0x3230e3(0x1de)]||_0x5211e2[_0x3230e3(0x233)][_0x3230e3(0x1de)][_0x3230e3(0x228)]===0x1;}async[_0x340648(0x21d)](_0x1aea59,_0x730cf4,_0x48bc9d){const _0x2d180c=_0x340648,_0x171503={'unitId':_0x1aea59,'threadId':_0x48bc9d},_0x149970=await this[_0x2d180c(0x1e1)]['post'](_0x2d180c(0x1c8)+_0x1aea59+_0x2d180c(0x217),{'body':_0x171503}),_0x32df85=_0x48bc9d[_0x2d180c(0x1e7)](_0x446b5d=>_0x373208(_0x149970[_0x2d180c(0x233)][_0x2d180c(0x22b)][_0x446b5d],_0x1aea59,_0x730cf4))['filter'](Boolean);return Object[_0x2d180c(0x245)](_0x149970['body'][_0x2d180c(0x1d4)])[_0x2d180c(0x227)](_0x394a2f=>{const _0x3ba7d5=_0x2d180c;this[_0x3ba7d5(0x1ee)][_0x3ba7d5(0x1c5)](_0x394a2f);}),_0x32df85;}[_0x340648(0x1e3)](_0xf1ca29){const _0x34ca6a=_0x340648;return{'id':_0xf1ca29['id'],'threadId':_0xf1ca29[_0x34ca6a(0x204)],'ref':_0xf1ca29['ref']};}};_0x418641=_0x13c1bd([_0x3e547f(0x0,_0x458bb5[_0x340648(0x21a)](_0x221283[_0x340648(0x221)])),_0x3e547f(0x1,_0x458bb5[_0x340648(0x21a)](_0x458bb5[_0x340648(0x1cb)])),_0x3e547f(0x2,_0x458bb5[_0x340648(0x21a)](_0x32ad6d['CollaborationSessionService']))],_0x418641);var _0x55e23b=Object[_0x340648(0x224)],_0x3218d0=(_0x102584,_0x6fb656,_0x13e10d,_0x45cd62)=>{const _0x307e4a=_0x340648;for(var _0x43cfee=_0x45cd62>0x1?void 0x0:_0x45cd62?_0x55e23b(_0x6fb656,_0x13e10d):_0x6fb656,_0x39227a=_0x102584[_0x307e4a(0x1c9)]-0x1,_0x4fda48;_0x39227a>=0x0;_0x39227a--)(_0x4fda48=_0x102584[_0x39227a])&&(_0x43cfee=_0x4fda48(_0x43cfee)||_0x43cfee);return _0x43cfee;},_0x1e07db=(_0x1a6996,_0xdc0d8)=>(_0x4e97fc,_0xe44141)=>_0xdc0d8(_0x4e97fc,_0xe44141,_0x1a6996);let _0xe5db44=class extends _0x458bb5[_0x340648(0x21c)]{constructor(_0x204cd6,_0x4ca9e0){const _0x369ed8=_0x340648;super(),this[_0x369ed8(0x1fd)]=_0x204cd6,this['_threadCommentDataSource']=_0x4ca9e0,this['_initDataSource']();}[_0x340648(0x1db)](){const _0x2b2416=_0x340648;this[_0x2b2416(0x1fd)]['dataSource']=this['_threadCommentDataSource'],this[_0x2b2416(0x1fd)][_0x2b2416(0x244)]=!0x1;}};_0xe5db44=_0x3218d0([_0x1e07db(0x0,_0xfb4f33['IThreadCommentDataSourceService']),_0x1e07db(0x1,_0x458bb5['Inject'](_0x418641))],_0xe5db44);var _0x4351d5=Object[_0x340648(0x1e0)],_0x3f3083=Object[_0x340648(0x224)],_0x212858=(_0x2aac1a,_0x2c9a22,_0x1855b4)=>_0x2c9a22 in _0x2aac1a?_0x4351d5(_0x2aac1a,_0x2c9a22,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1855b4}):_0x2aac1a[_0x2c9a22]=_0x1855b4,_0x3514bb=(_0x5228a6,_0x504ae1,_0x18b963,_0x2c7d90)=>{const _0xfa47ff=_0x340648;for(var _0x145724=_0x2c7d90>0x1?void 0x0:_0x2c7d90?_0x3f3083(_0x504ae1,_0x18b963):_0x504ae1,_0x2d687a=_0x5228a6[_0xfa47ff(0x1c9)]-0x1,_0x54eb8c;_0x2d687a>=0x0;_0x2d687a--)(_0x54eb8c=_0x5228a6[_0x2d687a])&&(_0x145724=_0x54eb8c(_0x145724)||_0x145724);return _0x145724;},_0x321a4c=(_0x50597e,_0x12e0a3)=>(_0x568e0d,_0x430cb2)=>_0x12e0a3(_0x568e0d,_0x430cb2,_0x50597e),_0x216f0f=(_0x52e394,_0x2d85be,_0x251d2e)=>_0x212858(_0x52e394,typeof _0x2d85be!=_0x340648(0x212)?_0x2d85be+'':_0x2d85be,_0x251d2e);_0x3188c5[_0x340648(0x1e6)]=class extends _0x458bb5[_0x340648(0x220)]{constructor(_0x1412a1=_0x3abd2a,_0x55ff4,_0x556e1a){const _0x245f06=_0x340648;super(),this[_0x245f06(0x23c)]=_0x1412a1,this[_0x245f06(0x1fc)]=_0x55ff4,this[_0x245f06(0x216)]=_0x556e1a;const {..._0x484d36}=_0x458bb5['merge']({},_0x3abd2a,this['_config']);this['_configService'][_0x245f06(0x22d)](_0x142f24,_0x484d36);}[_0x340648(0x1d0)](){const _0x211023=_0x340648;[[_0x418641],[_0xe5db44],[_0x348a71]][_0x211023(0x227)](_0x4b943c=>{const _0x2aa3e9=_0x211023;this[_0x2aa3e9(0x1fc)]['add'](_0x4b943c);});}[_0x340648(0x1ef)](){const _0x5ce8b4=_0x340648;this[_0x5ce8b4(0x1fc)]['get'](_0xe5db44),this[_0x5ce8b4(0x1fc)][_0x5ce8b4(0x1f4)](_0x348a71);}},_0x216f0f(_0x3188c5[_0x340648(0x1e6)],_0x340648(0x23a),_0x39cd8a),_0x216f0f(_0x3188c5[_0x340648(0x1e6)],'type',_0x458bb5[_0x340648(0x21f)][_0x340648(0x1f2)]),_0x3188c5[_0x340648(0x1e6)]=_0x3514bb([_0x458bb5['DependentOn'](_0x47786a[_0x340648(0x209)],_0x32ad6d[_0x340648(0x22e)],_0x38464e[_0x340648(0x1fa)]),_0x321a4c(0x1,_0x458bb5[_0x340648(0x21a)](_0x458bb5['Injector'])),_0x321a4c(0x2,_0x458bb5[_0x340648(0x1f0)])],_0x3188c5[_0x340648(0x1e6)]),Object[_0x340648(0x1e0)](_0x3188c5,Symbol['toStringTag'],{'value':_0x340648(0x1f8)});}));
|
|
1
|
+
(function(_0x1bfa3b,_0x3fd18c){const _0x248a1b=_0x159d,_0x2b8387=_0x1bfa3b();while(!![]){try{const _0x299b58=-parseInt(_0x248a1b(0x12d))/0x1*(parseInt(_0x248a1b(0x129))/0x2)+parseInt(_0x248a1b(0x11f))/0x3+parseInt(_0x248a1b(0x10c))/0x4+parseInt(_0x248a1b(0x15e))/0x5*(parseInt(_0x248a1b(0x14b))/0x6)+-parseInt(_0x248a1b(0xe6))/0x7+-parseInt(_0x248a1b(0x164))/0x8+parseInt(_0x248a1b(0xef))/0x9;if(_0x299b58===_0x3fd18c)break;else _0x2b8387['push'](_0x2b8387['shift']());}catch(_0x2134e4){_0x2b8387['push'](_0x2b8387['shift']());}}}(_0x20e3,0x95211),function(_0x3846c8,_0x1ccffd){const _0x1f4bf5=_0x159d;typeof exports=='object'&&typeof module<'u'?_0x1ccffd(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x1f4bf5(0x127)&&define[_0x1f4bf5(0x14f)]?define([_0x1f4bf5(0x156),_0x1f4bf5(0x160),_0x1f4bf5(0xe7),_0x1f4bf5(0x13f),_0x1f4bf5(0x113),'@univerjs/thread-comment',_0x1f4bf5(0x144),_0x1f4bf5(0x15f)],_0x1ccffd):(_0x3846c8=typeof globalThis<'u'?globalThis:_0x3846c8||self,_0x1ccffd(_0x3846c8[_0x1f4bf5(0x138)]={},_0x3846c8[_0x1f4bf5(0x161)],_0x3846c8[_0x1f4bf5(0x158)],_0x3846c8['UniverCore'],_0x3846c8[_0x1f4bf5(0x16b)],_0x3846c8['UniverThreadComment'],_0x3846c8['rxjs'],_0x3846c8[_0x1f4bf5(0x125)]));}(this,function(_0x4f5aa7,_0xa2b264,_0x2f0f88,_0x51f4c2,_0xd65207,_0x372d5a,_0x2b0eaa,_0x59ee14){'use strict';const _0xea1147=_0x159d;const _0x541b80='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x3963c5=(_0x5a82e1=>(_0x5a82e1[_0x5a82e1[_0xea1147(0x131)]=0x0]=_0xea1147(0x131),_0x5a82e1[_0x5a82e1[_0xea1147(0x142)]=0x1]='Solved',_0x5a82e1[_0x5a82e1[_0xea1147(0xf2)]=-0x1]=_0xea1147(0xf2),_0x5a82e1))(_0x3963c5||{}),_0x1fb87c=(_0x409d10=>(_0x409d10[_0x409d10[_0xea1147(0xf9)]=0x0]=_0xea1147(0xf9),_0x409d10[_0x409d10['Add']=0x1]=_0xea1147(0xf8),_0x409d10[_0x409d10[_0xea1147(0x134)]=0x2]=_0xea1147(0x134),_0x409d10[_0x409d10['Edit']=0x3]=_0xea1147(0x111),_0x409d10[_0x409d10[_0xea1147(0x12c)]=0x4]=_0xea1147(0x12c),_0x409d10[_0x409d10['Solve']=0x5]=_0xea1147(0x104),_0x409d10[_0x409d10['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x409d10))(_0x1fb87c||{});const _0xf52dcc=_0x3f7171=>_0x51f4c2[_0xea1147(0x13c)](new Date(+_0x3f7171))[_0xea1147(0xe4)]('YYYY/MM/DD\x20HH:mm'),_0x16e9ef=async(_0x48d1b9,_0x87568f)=>{const _0x240084=_0xea1147,_0x392b1c=_0x48d1b9[_0x240084(0x123)](_0x51f4c2['UserManagerService']),_0x1a7f27=_0x48d1b9[_0x240084(0x123)](_0x59ee14[_0x240084(0x102)]);_0x87568f[_0x240084(0x145)](_0xa79bb8=>{_0x392b1c['getUser'](_0xa79bb8)&&_0x87568f['delete'](_0xa79bb8);}),_0x87568f[_0x240084(0x169)]&&(await _0x1a7f27[_0x240084(0x123)](_0x240084(0x130),{'params':{'userIDs':[..._0x87568f]}}))['body'][_0x240084(0x139)][_0x240084(0x145)](_0x3decc8=>{const _0x274d00=_0x240084;_0x3decc8&&_0x392b1c[_0x274d00(0xfc)](_0x3decc8);});};var _0x1928fa=Object[_0xea1147(0xe8)],_0x524a40=(_0x26e847,_0x47298b,_0x5a2c92,_0x234a39)=>{const _0x53ac35=_0xea1147;for(var _0x1d4333=_0x234a39>0x1?void 0x0:_0x234a39?_0x1928fa(_0x47298b,_0x5a2c92):_0x47298b,_0x590ae8=_0x26e847[_0x53ac35(0xec)]-0x1,_0x14cfbd;_0x590ae8>=0x0;_0x590ae8--)(_0x14cfbd=_0x26e847[_0x590ae8])&&(_0x1d4333=_0x14cfbd(_0x1d4333)||_0x1d4333);return _0x1d4333;},_0x214ba1=(_0x31535c,_0x2ff9b3)=>(_0x288f42,_0xaaa357)=>_0x2ff9b3(_0x288f42,_0xaaa357,_0x31535c);let _0x45c609=class extends _0x51f4c2[_0xea1147(0x110)]{constructor(_0x2fd81e,_0x4380e8,_0x37a37b,_0x353198){const _0x381d53=_0xea1147;super(),this[_0x381d53(0x14a)]=_0x2fd81e,this['_threadCommentModel']=_0x4380e8,this[_0x381d53(0xe9)]=_0x37a37b,this[_0x381d53(0xfe)]=_0x353198,this[_0x381d53(0x115)](),this[_0x381d53(0x114)]();}['_initUserSync'](){const _0x56c523=_0xea1147;this[_0x56c523(0x14e)](this[_0x56c523(0x15a)][_0x56c523(0x152)][_0x56c523(0x122)](_0x2b0eaa[_0x56c523(0x137)](0x10))['subscribe'](_0x22a1f4=>{const _0x1298fa=_0x56c523,_0x1769d2=new Set();_0x22a1f4['forEach'](_0x531ea2=>{const _0xfa24b=_0x159d;switch(_0x531ea2[_0xfa24b(0x100)]){case _0xfa24b(0x15d):{const _0x59d257=_0x531ea2['payload'][_0xfa24b(0x150)];_0x1769d2[_0xfa24b(0x15d)](_0x59d257);break;}}}),_0x16e9ef(this[_0x1298fa(0xfe)],_0x1769d2);}));}[_0xea1147(0x115)](){const _0x172c31=_0xea1147;this[_0x172c31(0x14e)](this[_0x172c31(0x14a)][_0x172c31(0x152)][_0x172c31(0x119)](async _0x4b4d4e=>{const _0x280b76=_0x172c31;var _0x52b951,_0x21f973,_0x393b75,_0x19f028;const _0xb090e=(_0x52b951=this[_0x280b76(0x15a)][_0x280b76(0x154)](_0x4b4d4e[_0x280b76(0x11b)])[_0x280b76(0xe5)](_0x2524fd=>_0x2524fd[_0x280b76(0x13a)]===_0x4b4d4e[_0x280b76(0x13a)]))==null?void 0x0:_0x52b951[_0x280b76(0x112)];if(!_0xb090e)return;const {unitId:_0x462141,subUnitId:_0x57ddd1}=_0xb090e;switch(_0x4b4d4e[_0x280b76(0x140)]&&this[_0x280b76(0xe9)][_0x280b76(0xfc)](_0x4b4d4e['user']),_0x4b4d4e[_0x280b76(0x100)]){case _0x1fb87c[_0x280b76(0xf8)]:break;case _0x1fb87c['Reply']:{this[_0x280b76(0x15a)][_0x280b76(0x107)](_0x462141,_0x57ddd1,{'unitId':_0x462141,'subUnitId':_0x57ddd1,'ref':'','id':_0x4b4d4e['replyId'],'dT':_0xf52dcc(+_0x4b4d4e[_0x280b76(0x16a)]),'threadId':_0x4b4d4e['threadId'],'personId':(_0x393b75=(_0x21f973=_0x4b4d4e[_0x280b76(0x140)])==null?void 0x0:_0x21f973[_0x280b76(0x162)])!=null?_0x393b75:_0x4b4d4e[_0x280b76(0x124)],'text':JSON[_0x280b76(0x121)](_0x4b4d4e['content']),'parentId':_0xb090e['id']});break;}case _0x1fb87c[_0x280b76(0x12c)]:{const _0x4eea5b=this[_0x280b76(0x15a)][_0x280b76(0xee)](_0x462141,_0x57ddd1,_0x4b4d4e[_0x280b76(0xfd)]);_0x4eea5b&&_0x4eea5b[_0x280b76(0xf6)]&&this['_threadCommentModel'][_0x280b76(0xf7)](_0x462141,_0x57ddd1,_0x4b4d4e['replyId']);break;}case _0x1fb87c['Edit']:{this[_0x280b76(0x15a)][_0x280b76(0x157)](_0x462141,_0x57ddd1,{'commentId':_0x4b4d4e[_0x280b76(0xfd)],'text':JSON[_0x280b76(0x121)](_0x4b4d4e[_0x280b76(0x120)])});break;}case _0x1fb87c['Solve']:{const _0x25aa9e=(_0x19f028=this['_threadCommentModel'][_0x280b76(0x154)](_0x4b4d4e[_0x280b76(0x11b)])[_0x280b76(0xe5)](_0x4ab655=>_0x4ab655['threadId']===_0x4b4d4e['threadId']))==null?void 0x0:_0x19f028[_0x280b76(0x112)];_0x25aa9e&&this['_threadCommentModel'][_0x280b76(0xf1)](_0x462141,_0x57ddd1,_0x25aa9e['id'],_0x4b4d4e[_0x280b76(0x167)]===_0x3963c5['Solved']);break;}}}));}};_0x45c609=_0x524a40([_0x214ba1(0x0,_0x51f4c2['Inject'](_0xa2b264[_0xea1147(0x133)])),_0x214ba1(0x1,_0x51f4c2[_0xea1147(0x117)](_0x372d5a[_0xea1147(0x148)])),_0x214ba1(0x2,_0x51f4c2[_0xea1147(0x117)](_0x51f4c2[_0xea1147(0xea)])),_0x214ba1(0x3,_0x51f4c2[_0xea1147(0x117)](_0x51f4c2[_0xea1147(0x155)]))],_0x45c609);const _0x4005db=_0xea1147(0x10f),_0x230a78={};var _0x164d3e=Object[_0xea1147(0xe8)],_0x14bca7=(_0x3c43d6,_0x1caa67,_0x133d4e,_0x3ce581)=>{const _0x5b5cdf=_0xea1147;for(var _0x5e58c0=_0x3ce581>0x1?void 0x0:_0x3ce581?_0x164d3e(_0x1caa67,_0x133d4e):_0x1caa67,_0xc8221d=_0x3c43d6[_0x5b5cdf(0xec)]-0x1,_0x47248b;_0xc8221d>=0x0;_0xc8221d--)(_0x47248b=_0x3c43d6[_0xc8221d])&&(_0x5e58c0=_0x47248b(_0x5e58c0)||_0x5e58c0);return _0x5e58c0;},_0x3ee364=(_0x2fa118,_0x401704)=>(_0x556756,_0x30a65e)=>_0x401704(_0x556756,_0x30a65e,_0x2fa118);function _0x5c77fb(_0x3f4172,_0x4df8b8){const _0x5a3a6a=_0xea1147,_0x488400=_0x3f4172[_0x5a3a6a(0x11c)][0x0];return{..._0x4df8b8,'id':_0x488400[_0x5a3a6a(0xfd)],'resolved':_0x3f4172['solved']===0x1,'dT':_0xf52dcc(_0x488400[_0x5a3a6a(0x16a)]),'personId':_0x488400[_0x5a3a6a(0x124)],'threadId':_0x488400['threadId']};}function _0x2fb4cb(_0xc59cdb,_0xece2a,_0x3da2fc){const _0x404f0c=_0xea1147;var _0x105df0,_0x5098c0;if(((_0x5098c0=(_0x105df0=_0xc59cdb==null?void 0x0:_0xc59cdb[_0x404f0c(0x11c)])==null?void 0x0:_0x105df0[_0x404f0c(0xec)])!=null?_0x5098c0:0x0)>0x0){const _0x56e011=(_0x1f92ca,_0xd75e5f)=>({'id':_0x1f92ca[_0x404f0c(0xfd)],'threadId':_0x1f92ca[_0x404f0c(0x13a)],'dT':_0xf52dcc(_0x1f92ca['createTimestamp']),'personId':_0x1f92ca[_0x404f0c(0x124)],'resolved':_0xc59cdb['solved']===_0x3963c5[_0x404f0c(0x142)],'unitId':_0xece2a,'subUnitId':_0x3da2fc,'text':JSON[_0x404f0c(0x121)](_0x1f92ca['content']),'parentId':_0xd75e5f}),_0x1ef800=_0x56e011(_0xc59cdb[_0x404f0c(0x11c)][0x0]);return{..._0x1ef800,'children':_0xc59cdb[_0x404f0c(0x11c)][_0x404f0c(0x103)](0x1)['map'](_0x46ef17=>_0x56e011(_0x46ef17,_0x1ef800['id']))};}return null;}let _0x27e2b9=class{constructor(_0x49f215,_0xfa7aa7,_0x4293f6){const _0x58b7d4=_0xea1147;this['_httpService']=_0x49f215,this[_0x58b7d4(0xe9)]=_0xfa7aa7,this[_0x58b7d4(0x136)]=_0x4293f6;}async[_0xea1147(0x107)](_0x2e43ba){const _0x122f3d=_0xea1147;var _0x5097fe,_0x171f4e;const {parentId:_0x319e16,unitId:_0x3362d8,text:_0x41a3d6,threadId:_0x3d91c8}=_0x2e43ba,_0x567411=(_0x171f4e=(_0x5097fe=_0x41a3d6[_0x122f3d(0xfa)])==null?void 0x0:_0x5097fe[_0x122f3d(0x126)](_0x3cecac=>_0x3cecac['rangeType']===_0x51f4c2[_0x122f3d(0x159)][_0x122f3d(0x10e)])[_0x122f3d(0xf5)](_0x301f35=>_0x301f35['rangeId']))!=null?_0x171f4e:[],_0x19adfa=JSON['stringify'](_0x41a3d6),_0x39d8dd=(await this[_0x122f3d(0x136)][_0x122f3d(0x141)](_0x3362d8))[_0x122f3d(0x147)]();if(_0x319e16){const _0x535484={'memberId':_0x39d8dd,'unitId':_0x3362d8,'content':_0x19adfa,'mention':_0x567411,'threadId':_0x3d91c8},_0x5ba347=(await this['_httpService'][_0x122f3d(0xff)](_0x122f3d(0x14c)+_0x3362d8+_0x122f3d(0x10b),{'body':_0x535484}))['body'][_0x122f3d(0x10a)];return{..._0x2e43ba,'id':_0x5ba347[_0x122f3d(0xfd)],'dT':_0x51f4c2[_0x122f3d(0x13c)](+_0x5ba347[_0x122f3d(0x16a)])[_0x122f3d(0xe4)](_0x122f3d(0x109)),'personId':_0x5ba347['userId']};}else{const _0x140db5={'memberId':_0x39d8dd,'unitId':_0x3362d8,'content':_0x19adfa,'mention':_0x567411},_0x1340ec=await this[_0x122f3d(0x146)]['post'](_0x122f3d(0x14c)+_0x3362d8+_0x122f3d(0x12f),{'body':_0x140db5});return _0x5c77fb(_0x1340ec['body'][_0x122f3d(0xf3)],_0x2e43ba);}}async[_0xea1147(0x157)](_0x34ab32){const _0x2a22c9=_0xea1147;var _0x30a2cb,_0x5da000;const {text:_0x581aee,unitId:_0x4faf04}=_0x34ab32,_0x4311b1=(_0x5da000=(_0x30a2cb=_0x581aee[_0x2a22c9(0xfa)])==null?void 0x0:_0x30a2cb[_0x2a22c9(0x126)](_0x3db2d2=>_0x3db2d2[_0x2a22c9(0x10d)]===_0x51f4c2[_0x2a22c9(0x159)]['COMMENT'])['map'](_0x14f0c=>_0x14f0c['rangeId']))!=null?_0x5da000:[],_0x1f01a4=JSON[_0x2a22c9(0x135)](_0x581aee),_0x46577b=_0x34ab32['threadId'],_0x306225=_0x34ab32['id'],_0x33b3a7={'memberId':(await this[_0x2a22c9(0x136)][_0x2a22c9(0x141)](_0x4faf04))[_0x2a22c9(0x147)](),'unitId':_0x4faf04,'threadId':_0x46577b,'mention':_0x4311b1,'content':_0x1f01a4,'replyId':_0x306225},_0x5a17db=await this[_0x2a22c9(0x146)][_0x2a22c9(0xff)]('/universer-api/comment/unit/'+_0x4faf04+_0x2a22c9(0xed),{'body':_0x33b3a7});return!_0x5a17db[_0x2a22c9(0x11d)][_0x2a22c9(0xf4)]||_0x5a17db['body']['error']['code']===0x1;}async[_0xea1147(0xf1)](_0x2edaa1){const _0x3725a4=_0xea1147,{unitId:_0x571ea5}=_0x2edaa1,_0xc12ba=_0x2edaa1['threadId'],_0x118f26={'memberId':this[_0x3725a4(0xe9)]['getCurrentUser']()[_0x3725a4(0x162)],'unitId':_0x571ea5,'threadId':_0xc12ba,'solved':_0x2edaa1[_0x3725a4(0xfb)]?_0x3963c5[_0x3725a4(0x142)]:_0x3963c5[_0x3725a4(0x131)]},_0x2cf115=await this[_0x3725a4(0x146)]['post'](_0x3725a4(0x14c)+_0x571ea5+'/solved',{'body':_0x118f26});return!_0x2cf115['body'][_0x3725a4(0xf4)]||_0x2cf115[_0x3725a4(0x11d)][_0x3725a4(0xf4)]['code']===0x1;}async['deleteComment'](_0x43ab33,_0x392177,_0x33ea6a,_0x202484){const _0x479d7b=_0xea1147,_0x4fdb30={'memberId':(await this['_sessionService'][_0x479d7b(0x141)](_0x43ab33))[_0x479d7b(0x147)](),'threadId':_0x33ea6a,'replyId':_0x202484,'unitId':_0x43ab33},_0x4ecc29=await this[_0x479d7b(0x146)]['post'](_0x479d7b(0x14c)+_0x43ab33+_0x479d7b(0x105),{'body':_0x4fdb30});return!_0x4ecc29[_0x479d7b(0x11d)][_0x479d7b(0xf4)]||_0x4ecc29[_0x479d7b(0x11d)][_0x479d7b(0xf4)]['code']===0x1;}async['listComments'](_0x563867,_0x2917dc,_0x426065){const _0x24d48e=_0xea1147,_0x6ddecc={'unitId':_0x563867,'threadId':_0x426065},_0x59af72=await this[_0x24d48e(0x146)][_0x24d48e(0xff)]('/universer-api/comment/unit/'+_0x563867+_0x24d48e(0x11e),{'body':_0x6ddecc}),_0x6d2a7d=_0x426065[_0x24d48e(0xf5)](_0x116b66=>_0x2fb4cb(_0x59af72[_0x24d48e(0x11d)][_0x24d48e(0x149)][_0x116b66],_0x563867,_0x2917dc))[_0x24d48e(0x126)](Boolean);return Object[_0x24d48e(0xf0)](_0x59af72[_0x24d48e(0x11d)][_0x24d48e(0x139)])[_0x24d48e(0x145)](_0x58433d=>{const _0x461034=_0x24d48e;this[_0x461034(0xe9)][_0x461034(0xfc)](_0x58433d);}),_0x6d2a7d;}[_0xea1147(0x153)](_0x5e4078){const _0x4119ad=_0xea1147;return{'id':_0x5e4078['id'],'threadId':_0x5e4078[_0x4119ad(0x13a)],'ref':_0x5e4078[_0x4119ad(0x132)]};}};_0x27e2b9=_0x14bca7([_0x3ee364(0x0,_0x51f4c2[_0xea1147(0x117)](_0x59ee14[_0xea1147(0x102)])),_0x3ee364(0x1,_0x51f4c2['Inject'](_0x51f4c2[_0xea1147(0xea)])),_0x3ee364(0x2,_0x51f4c2[_0xea1147(0x117)](_0xa2b264[_0xea1147(0x15c)]))],_0x27e2b9);var _0x200489=Object[_0xea1147(0xe8)],_0x3792c0=(_0x1e4001,_0x316403,_0x58eef5,_0x29df7f)=>{const _0x75d0ee=_0xea1147;for(var _0x3bed9e=_0x29df7f>0x1?void 0x0:_0x29df7f?_0x200489(_0x316403,_0x58eef5):_0x316403,_0x23bfdf=_0x1e4001[_0x75d0ee(0xec)]-0x1,_0xa16886;_0x23bfdf>=0x0;_0x23bfdf--)(_0xa16886=_0x1e4001[_0x23bfdf])&&(_0x3bed9e=_0xa16886(_0x3bed9e)||_0x3bed9e);return _0x3bed9e;},_0x16b83b=(_0x58fe06,_0x22ff60)=>(_0x5b8ead,_0x1e7f29)=>_0x22ff60(_0x5b8ead,_0x1e7f29,_0x58fe06);let _0xd162e1=class extends _0x51f4c2[_0xea1147(0x110)]{constructor(_0x45173c,_0x1d597c){const _0x48861a=_0xea1147;super(),this['_threadCommentDataSourceService']=_0x45173c,this['_threadCommentDataSource']=_0x1d597c,this[_0x48861a(0x14d)]();}[_0xea1147(0x14d)](){const _0x5dfff4=_0xea1147;this[_0x5dfff4(0x166)][_0x5dfff4(0x11a)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x5dfff4(0x118)]=!0x1;}};_0xd162e1=_0x3792c0([_0x16b83b(0x0,_0x372d5a[_0xea1147(0x108)]),_0x16b83b(0x1,_0x51f4c2[_0xea1147(0x117)](_0x27e2b9))],_0xd162e1);var _0x3c8144=Object[_0xea1147(0x13d)],_0x1e799e=Object[_0xea1147(0xe8)],_0x131931=(_0x5dfd64,_0x7d5b51,_0x2fc34e)=>_0x7d5b51 in _0x5dfd64?_0x3c8144(_0x5dfd64,_0x7d5b51,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2fc34e}):_0x5dfd64[_0x7d5b51]=_0x2fc34e,_0x1f88f8=(_0x497618,_0x4e3300,_0x1e7e98,_0x54ebb7)=>{const _0x4d14ae=_0xea1147;for(var _0x5e60cb=_0x54ebb7>0x1?void 0x0:_0x54ebb7?_0x1e799e(_0x4e3300,_0x1e7e98):_0x4e3300,_0x27cec6=_0x497618[_0x4d14ae(0xec)]-0x1,_0x4ed302;_0x27cec6>=0x0;_0x27cec6--)(_0x4ed302=_0x497618[_0x27cec6])&&(_0x5e60cb=_0x4ed302(_0x5e60cb)||_0x5e60cb);return _0x5e60cb;},_0x3e1735=(_0x2f8838,_0x350363)=>(_0x459f3d,_0x192ef9)=>_0x350363(_0x459f3d,_0x192ef9,_0x2f8838),_0x44a5a4=(_0x3ed614,_0x45eea5,_0x41f25a)=>_0x131931(_0x3ed614,typeof _0x45eea5!=_0xea1147(0x116)?_0x45eea5+'':_0x45eea5,_0x41f25a);_0x4f5aa7[_0xea1147(0x128)]=class extends _0x51f4c2[_0xea1147(0x151)]{constructor(_0x354312=_0x230a78,_0x487ce4,_0x26c540){const _0x25b8d2=_0xea1147;super(),this[_0x25b8d2(0x168)]=_0x354312,this[_0x25b8d2(0xfe)]=_0x487ce4,this[_0x25b8d2(0x13b)]=_0x26c540;const {..._0x4ea830}=_0x51f4c2[_0x25b8d2(0xe3)]({},_0x230a78,this[_0x25b8d2(0x168)]);this[_0x25b8d2(0x13b)][_0x25b8d2(0x12e)](_0x4005db,_0x4ea830);}[_0xea1147(0x12a)](){const _0x5c2c25=_0xea1147;[[_0x27e2b9],[_0xd162e1],[_0x45c609]][_0x5c2c25(0x145)](_0x51f68d=>{const _0x37b2b7=_0x5c2c25;this[_0x37b2b7(0xfe)][_0x37b2b7(0x15d)](_0x51f68d);});}[_0xea1147(0x143)](){const _0x387598=_0xea1147;this[_0x387598(0xfe)][_0x387598(0x123)](_0xd162e1),this[_0x387598(0xfe)]['get'](_0x45c609);}},_0x44a5a4(_0x4f5aa7[_0xea1147(0x128)],_0xea1147(0x15b),_0x541b80),_0x44a5a4(_0x4f5aa7[_0xea1147(0x128)],_0xea1147(0x100),_0x51f4c2['UniverInstanceType'][_0xea1147(0x106)]),_0x4f5aa7['UniverThreadCommentDataSourcePlugin']=_0x1f88f8([_0x51f4c2[_0xea1147(0x13e)](_0xd65207['UniverThreadCommentUIPlugin'],_0xa2b264[_0xea1147(0x101)],_0x2f0f88[_0xea1147(0x12b)]),_0x3e1735(0x1,_0x51f4c2[_0xea1147(0x117)](_0x51f4c2[_0xea1147(0x155)])),_0x3e1735(0x2,_0x51f4c2[_0xea1147(0x165)])],_0x4f5aa7[_0xea1147(0x128)]),Object[_0xea1147(0x13d)](_0x4f5aa7,Symbol[_0xea1147(0xeb)],{'value':_0xea1147(0x163)});}));function _0x159d(_0x1fb8d2,_0x4bc364){const _0x20e3b8=_0x20e3();return _0x159d=function(_0x159d5b,_0x576b06){_0x159d5b=_0x159d5b-0xe3;let _0x4c302d=_0x20e3b8[_0x159d5b];return _0x4c302d;},_0x159d(_0x1fb8d2,_0x4bc364);}function _0x20e3(){const _0x191030=['UniverNetwork','filter','function','UniverThreadCommentDataSourcePlugin','2QCaJJf','onStarting','UniverLicensePlugin','Delete','787381rqHvTC','setConfig','/add','/universer-api/user/list','OpenOrReOpen','ref','CommentService','Reply','stringify','_sessionService','bufferTime','UniverProThreadCommentDatasource','users','threadId','_configService','dayjs','defineProperty','DependentOn','@univerjs/core','user','requireSession','Solved','onReady','rxjs','forEach','_httpService','getMemberID','ThreadCommentModel','comments','_commentService','12rVQOCR','/universer-api/comment/unit/','_initDataSource','disposeWithMe','amd','personId','Plugin','commentUpdate$','saveCommentToSnapshot','getUnit','Injector','exports','updateComment','UniverProLicense','CustomRangeType','_threadCommentModel','pluginName','CollaborationSessionService','add','1112525NONaju','@univerjs/network','@univerjs-pro/collaboration-client','UniverProCollaborationClient','userID','Module','6944152pmgDmW','IConfigService','_threadCommentDataSourceService','solved','_config','size','createTimestamp','UniverThreadCommentUi','merge','format','find','7918617NNqHXX','@univerjs-pro/license','getOwnPropertyDescriptor','_userService','UserManagerService','toStringTag','length','/edit','getComment','7581267dMvYTl','values','resolveComment','UNRECOGNIZED','comment','error','map','parentId','deleteComment','Add','Unknown','customRanges','resolved','addUser','replyId','_injector','post','type','UniverCollaborationClientPlugin','HTTPService','slice','Solve','/delete','UNIVER_UNKNOWN','addComment','IThreadCommentDataSourceService','YYYY/MM/DD\x20HH:mm','reply','/reply','4324216QOGCrW','rangeType','COMMENT','thread-comment-data-source.config','Disposable','Edit','root','@univerjs/thread-comment-ui','_initUserSync','_init','symbol','Inject','syncUpdateMutationToColla','subscribe','dataSource','unitId','replies','body','/list','3087111ZrOhlJ','content','parse','pipe','get','userId'];_0x20e3=function(){return _0x191030;};return _0x20e3();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.14",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs
|
|
52
|
-
"@univerjs/protocol": "0.1.47
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.10.
|
|
54
|
-
"@univerjs/thread-comment": "0.10.
|
|
48
|
+
"@univerjs-pro/license": "0.10.14",
|
|
49
|
+
"@univerjs-pro/collaboration-client": "0.10.14",
|
|
50
|
+
"@univerjs/network": "0.10.14",
|
|
51
|
+
"@univerjs/core": "0.10.14",
|
|
52
|
+
"@univerjs/protocol": "0.1.47",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.10.14",
|
|
54
|
+
"@univerjs/thread-comment": "0.10.14"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
|
-
"vite": "^7.1.
|
|
59
|
+
"vite": "^7.1.12",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.10.
|
|
61
|
+
"@univerjs-infra/shared": "0.10.14"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|