@univerjs-pro/thread-comment-datasource 0.13.0-insiders.20251218-2062647 → 0.13.0-insiders.20251223-857805c

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 CHANGED
@@ -1 +1 @@
1
- 'use strict';function _0x3584(){const _0x50b1a6=['thread-comment-data-source.config','Inject','DependentOn','/reply','_threadCommentModel','Injector','getOwnPropertyDescriptor','IThreadCommentDataSourceService','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','_userService','user','parse','customRanges','Solve','Module','UserManagerService','disposeWithMe','size','_initDataSource','UNRECOGNIZED','format','addComment','10AuxtrQ','Unknown','values','get','createTimestamp','Edit','merge','YYYY/MM/DD\x20HH:mm','post','error','_commentService','_initUserSync','5580330gHSVAb','root','getCurrentUser','subscribe','_httpService','comments','_threadCommentDataSourceService','users','UniverThreadCommentDataSourcePlugin','/delete','forEach','IConfigService','435192mrtami','/universer-api/user/list','code','_config','payload','userID','ThreadCommentModel','slice','content','map','Delete','ref','resolveComment','filter','add','setConfig','userId','reply','resolved','defineProperty','addUser','OpenOrReOpen','updateComment','CommentService','dataSource','_init','onStarting','listComments','commentUpdate$','replyId','/universer-api/comment/unit/','toStringTag','/add','deleteComment','1085114JERVmY','2RpTolI','/solved','find','type','HTTPService','onReady','UniverLicensePlugin','pluginName','COMMENT','comment','_sessionService','stringify','Reply','8653352JKSgJf','937071aUMlzd','_injector','getComment','getUnit','body','solved','rangeType','47383866OccVtQ','rangeId','delete','dayjs','threadId','CollaborationSessionService','5391540YhjDhJ','requireSession','personId','getMemberID','length','replies','saveCommentToSnapshot','CustomRangeType','Solved','Disposable'];_0x3584=function(){return _0x50b1a6;};return _0x3584();}const _0x5f45a4=_0x1444;(function(_0x262afb,_0x401723){const _0x1bbfee=_0x1444,_0x24036f=_0x262afb();while(!![]){try{const _0x49f0db=parseInt(_0x1bbfee(0x1b5))/0x1*(-parseInt(_0x1bbfee(0x1b4))/0x2)+-parseInt(_0x1bbfee(0x1c3))/0x3+-parseInt(_0x1bbfee(0x1d0))/0x4+-parseInt(_0x1bbfee(0x17a))/0x5*(-parseInt(_0x1bbfee(0x192))/0x6)+-parseInt(_0x1bbfee(0x186))/0x7+-parseInt(_0x1bbfee(0x1c2))/0x8+parseInt(_0x1bbfee(0x1ca))/0x9;if(_0x49f0db===_0x401723)break;else _0x24036f['push'](_0x24036f['shift']());}catch(_0x4886dc){_0x24036f['push'](_0x24036f['shift']());}}}(_0x3584,0xbfd3b));Object[_0x5f45a4(0x1a5)](exports,Symbol[_0x5f45a4(0x1b1)],{'value':_0x5f45a4(0x172)});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=_0x5f45a4(0x1e3);var I=(_0xf2a5f9=>(_0xf2a5f9[_0xf2a5f9[_0x5f45a4(0x1a7)]=0x0]=_0x5f45a4(0x1a7),_0xf2a5f9[_0xf2a5f9[_0x5f45a4(0x1d8)]=0x1]=_0x5f45a4(0x1d8),_0xf2a5f9[_0xf2a5f9[_0x5f45a4(0x177)]=-0x1]=_0x5f45a4(0x177),_0xf2a5f9))(I||{}),v=(_0x396f58=>(_0x396f58[_0x396f58[_0x5f45a4(0x17b)]=0x0]='Unknown',_0x396f58[_0x396f58[_0x5f45a4(0x1e2)]=0x1]='Add',_0x396f58[_0x396f58[_0x5f45a4(0x1c1)]=0x2]='Reply',_0x396f58[_0x396f58[_0x5f45a4(0x17f)]=0x3]=_0x5f45a4(0x17f),_0x396f58[_0x396f58[_0x5f45a4(0x19c)]=0x4]='Delete',_0x396f58[_0x396f58[_0x5f45a4(0x171)]=0x5]=_0x5f45a4(0x171),_0x396f58[_0x396f58[_0x5f45a4(0x177)]=-0x1]=_0x5f45a4(0x177),_0x396f58))(v||{});const f=_0x5213d2=>c[_0x5f45a4(0x1cd)](new Date(+_0x5213d2))[_0x5f45a4(0x178)](_0x5f45a4(0x181)),R=async(_0x4163de,_0x4a5113)=>{const _0x17d789=_0x5f45a4,_0x2400b3=_0x4163de['get'](c[_0x17d789(0x173)]),_0x1897b5=_0x4163de[_0x17d789(0x17d)](P['HTTPService']);_0x4a5113['forEach'](_0x4aeb4b=>{const _0x9b966d=_0x17d789;_0x2400b3['getUser'](_0x4aeb4b)&&_0x4a5113[_0x9b966d(0x1cc)](_0x4aeb4b);}),_0x4a5113[_0x17d789(0x175)]&&(await _0x1897b5['get'](_0x17d789(0x193),{'params':{'userIDs':[..._0x4a5113]}}))[_0x17d789(0x1c7)][_0x17d789(0x18d)]['forEach'](_0x5adc5f=>{const _0x167064=_0x17d789;_0x5adc5f&&_0x2400b3[_0x167064(0x1a6)](_0x5adc5f);});};var $=Object[_0x5f45a4(0x1e0)],E=(_0x1263f2,_0x1570f9,_0x2439f6,_0x676d41)=>{const _0x48b8d3=_0x5f45a4;for(var _0x5d52ac=_0x676d41>0x1?void 0x0:_0x676d41?$(_0x1570f9,_0x2439f6):_0x1570f9,_0xb4ac2=_0x1263f2[_0x48b8d3(0x1d4)]-0x1,_0x82b4b5;_0xb4ac2>=0x0;_0xb4ac2--)(_0x82b4b5=_0x1263f2[_0xb4ac2])&&(_0x5d52ac=_0x82b4b5(_0x5d52ac)||_0x5d52ac);return _0x5d52ac;},S=(_0xbb7323,_0x2c7627)=>(_0x2cf287,_0x1d28ad)=>_0x2c7627(_0x2cf287,_0x1d28ad,_0xbb7323);let _=class extends c[_0x5f45a4(0x1d9)]{constructor(_0x42d9ef,_0x5a8bfd,_0x1ddf7a,_0x15aa1d){const _0x11e1fc=_0x5f45a4;super(),this[_0x11e1fc(0x184)]=_0x42d9ef,this[_0x11e1fc(0x1de)]=_0x5a8bfd,this[_0x11e1fc(0x1e5)]=_0x1ddf7a,this[_0x11e1fc(0x1c4)]=_0x15aa1d,this['_init'](),this[_0x11e1fc(0x185)]();}[_0x5f45a4(0x185)](){const _0x26edc6=_0x5f45a4;this['disposeWithMe'](this[_0x26edc6(0x1de)][_0x26edc6(0x1ae)]['pipe'](j['bufferTime'](0x10))[_0x26edc6(0x189)](_0x6f8f1f=>{const _0x5ec1a2=_0x26edc6,_0x3755ba=new Set();_0x6f8f1f[_0x5ec1a2(0x190)](_0x240eca=>{const _0x3c9c1c=_0x5ec1a2;switch(_0x240eca[_0x3c9c1c(0x1b8)]){case _0x3c9c1c(0x1a0):{const _0x3a8809=_0x240eca[_0x3c9c1c(0x196)][_0x3c9c1c(0x1d2)];_0x3755ba[_0x3c9c1c(0x1a0)](_0x3a8809);break;}}}),R(this['_injector'],_0x3755ba);}));}[_0x5f45a4(0x1ab)](){const _0x2c88cb=_0x5f45a4;this[_0x2c88cb(0x174)](this['_commentService'][_0x2c88cb(0x1ae)][_0x2c88cb(0x189)](async _0x3e8dae=>{const _0x405b35=_0x2c88cb;var _0x503923,_0x5c7892,_0x368a32,_0xcad93d;const _0x5464af=(_0x503923=this[_0x405b35(0x1de)][_0x405b35(0x1c6)](_0x3e8dae[_0x405b35(0x1e4)])[_0x405b35(0x1b7)](_0x80ca6a=>_0x80ca6a[_0x405b35(0x1ce)]===_0x3e8dae['threadId']))==null?void 0x0:_0x503923['root'];if(!_0x5464af)return;const {unitId:_0x511381,subUnitId:_0x17ff6d}=_0x5464af;switch(_0x3e8dae['user']&&this['_userService']['addUser'](_0x3e8dae['user']),_0x3e8dae['type']){case v[_0x405b35(0x1e2)]:break;case v[_0x405b35(0x1c1)]:{this[_0x405b35(0x1de)][_0x405b35(0x179)](_0x511381,_0x17ff6d,{'unitId':_0x511381,'subUnitId':_0x17ff6d,'ref':'','id':_0x3e8dae['replyId'],'dT':f(+_0x3e8dae[_0x405b35(0x17e)]),'threadId':_0x3e8dae[_0x405b35(0x1ce)],'personId':(_0x368a32=(_0x5c7892=_0x3e8dae[_0x405b35(0x1e6)])==null?void 0x0:_0x5c7892['userID'])!=null?_0x368a32:_0x3e8dae['userId'],'text':JSON[_0x405b35(0x1e7)](_0x3e8dae['content']),'parentId':_0x5464af['id']});break;}case v[_0x405b35(0x19c)]:{const _0x4360e3=this[_0x405b35(0x1de)][_0x405b35(0x1c5)](_0x511381,_0x17ff6d,_0x3e8dae[_0x405b35(0x1af)]);_0x4360e3&&_0x4360e3['parentId']&&this[_0x405b35(0x1de)][_0x405b35(0x1b3)](_0x511381,_0x17ff6d,_0x3e8dae[_0x405b35(0x1af)]);break;}case v[_0x405b35(0x17f)]:{this[_0x405b35(0x1de)][_0x405b35(0x1a8)](_0x511381,_0x17ff6d,{'commentId':_0x3e8dae[_0x405b35(0x1af)],'text':JSON[_0x405b35(0x1e7)](_0x3e8dae[_0x405b35(0x19a)])});break;}case v[_0x405b35(0x171)]:{const _0x4c7de8=(_0xcad93d=this[_0x405b35(0x1de)]['getUnit'](_0x3e8dae[_0x405b35(0x1e4)])['find'](_0x392747=>_0x392747[_0x405b35(0x1ce)]===_0x3e8dae['threadId']))==null?void 0x0:_0xcad93d[_0x405b35(0x187)];_0x4c7de8&&this['_threadCommentModel'][_0x405b35(0x19e)](_0x511381,_0x17ff6d,_0x4c7de8['id'],_0x3e8dae[_0x405b35(0x1c8)]===I[_0x405b35(0x1d8)]);break;}}}));}};_=E([S(0x0,c[_0x5f45a4(0x1db)](b[_0x5f45a4(0x1a9)])),S(0x1,c[_0x5f45a4(0x1db)](M[_0x5f45a4(0x198)])),S(0x2,c['Inject'](c[_0x5f45a4(0x173)])),S(0x3,c[_0x5f45a4(0x1db)](c[_0x5f45a4(0x1df)]))],_);const q=_0x5f45a4(0x1da),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x472959,_0x119fc8,_0x5e5e52,_0x15a0e4)=>{for(var _0x14a426=_0x15a0e4>0x1?void 0x0:_0x15a0e4?A(_0x119fc8,_0x5e5e52):_0x119fc8,_0x17a3bf=_0x472959['length']-0x1,_0x4cc5d7;_0x17a3bf>=0x0;_0x17a3bf--)(_0x4cc5d7=_0x472959[_0x17a3bf])&&(_0x14a426=_0x4cc5d7(_0x14a426)||_0x14a426);return _0x14a426;},C=(_0x3aab8d,_0x5ab867)=>(_0x172dba,_0x2d72b1)=>_0x5ab867(_0x172dba,_0x2d72b1,_0x3aab8d);function Y(_0x5cf7aa,_0x3c7ab8){const _0x14c208=_0x5f45a4,_0x1cfbcd=_0x5cf7aa[_0x14c208(0x1d5)][0x0];return{..._0x3c7ab8,'id':_0x1cfbcd[_0x14c208(0x1af)],'resolved':_0x5cf7aa['solved']===0x1,'dT':f(_0x1cfbcd[_0x14c208(0x17e)]),'personId':_0x1cfbcd['userId'],'threadId':_0x1cfbcd[_0x14c208(0x1ce)]};}function G(_0x387779,_0x14f713,_0x43deae){const _0x4f20b3=_0x5f45a4;var _0xa97c37,_0x982c16;if(((_0x982c16=(_0xa97c37=_0x387779==null?void 0x0:_0x387779[_0x4f20b3(0x1d5)])==null?void 0x0:_0xa97c37[_0x4f20b3(0x1d4)])!=null?_0x982c16:0x0)>0x0){const _0xc8f535=(_0x37bf9a,_0x1c2cb4)=>({'id':_0x37bf9a['replyId'],'threadId':_0x37bf9a[_0x4f20b3(0x1ce)],'dT':f(_0x37bf9a['createTimestamp']),'personId':_0x37bf9a[_0x4f20b3(0x1a2)],'resolved':_0x387779[_0x4f20b3(0x1c8)]===I[_0x4f20b3(0x1d8)],'unitId':_0x14f713,'subUnitId':_0x43deae,'text':JSON[_0x4f20b3(0x1e7)](_0x37bf9a[_0x4f20b3(0x19a)]),'parentId':_0x1c2cb4}),_0x34a381=_0xc8f535(_0x387779[_0x4f20b3(0x1d5)][0x0]);return{..._0x34a381,'children':_0x387779[_0x4f20b3(0x1d5)][_0x4f20b3(0x199)](0x1)[_0x4f20b3(0x19b)](_0x24021b=>_0xc8f535(_0x24021b,_0x34a381['id']))};}return null;}let p=class{constructor(_0x1a946d,_0x563784,_0x71c5ad){const _0x41d49d=_0x5f45a4;this[_0x41d49d(0x18a)]=_0x1a946d,this[_0x41d49d(0x1e5)]=_0x563784,this['_sessionService']=_0x71c5ad;}async[_0x5f45a4(0x179)](_0x166def){const _0x29ce92=_0x5f45a4;var _0x237b29,_0x3f832c;const {parentId:_0x1c4803,unitId:_0x5c60af,text:_0x40ebe8,threadId:_0xcf5dd8}=_0x166def,_0x142825=(_0x3f832c=(_0x237b29=_0x40ebe8[_0x29ce92(0x1e8)])==null?void 0x0:_0x237b29[_0x29ce92(0x19f)](_0x43868c=>_0x43868c[_0x29ce92(0x1c9)]===c[_0x29ce92(0x1d7)][_0x29ce92(0x1bd)])[_0x29ce92(0x19b)](_0xbd2c5a=>_0xbd2c5a['rangeId']))!=null?_0x3f832c:[],_0x898519=JSON[_0x29ce92(0x1c0)](_0x40ebe8),_0x5113fb=(await this[_0x29ce92(0x1bf)][_0x29ce92(0x1d1)](_0x5c60af))['getMemberID']();if(_0x1c4803){const _0x1afba8={'memberId':_0x5113fb,'unitId':_0x5c60af,'content':_0x898519,'mention':_0x142825,'threadId':_0xcf5dd8},_0x3cec0d=(await this['_httpService'][_0x29ce92(0x182)](_0x29ce92(0x1b0)+_0x5c60af+_0x29ce92(0x1dd),{'body':_0x1afba8}))[_0x29ce92(0x1c7)][_0x29ce92(0x1a3)];return{..._0x166def,'id':_0x3cec0d['replyId'],'dT':c['dayjs'](+_0x3cec0d[_0x29ce92(0x17e)])['format'](_0x29ce92(0x181)),'personId':_0x3cec0d['userId']};}else{const _0x32c215={'memberId':_0x5113fb,'unitId':_0x5c60af,'content':_0x898519,'mention':_0x142825},_0x54bcb7=await this[_0x29ce92(0x18a)][_0x29ce92(0x182)](_0x29ce92(0x1b0)+_0x5c60af+_0x29ce92(0x1b2),{'body':_0x32c215});return Y(_0x54bcb7['body'][_0x29ce92(0x1be)],_0x166def);}}async[_0x5f45a4(0x1a8)](_0x1879f7){const _0xef4a1b=_0x5f45a4;var _0x12913b,_0x15937b;const {text:_0x5eafdd,unitId:_0x4d8a2e}=_0x1879f7,_0x3b3e56=(_0x15937b=(_0x12913b=_0x5eafdd[_0xef4a1b(0x1e8)])==null?void 0x0:_0x12913b[_0xef4a1b(0x19f)](_0x4ddf52=>_0x4ddf52[_0xef4a1b(0x1c9)]===c['CustomRangeType'][_0xef4a1b(0x1bd)])['map'](_0x3ad0bd=>_0x3ad0bd[_0xef4a1b(0x1cb)]))!=null?_0x15937b:[],_0x2caaa4=JSON[_0xef4a1b(0x1c0)](_0x5eafdd),_0x2383bc=_0x1879f7[_0xef4a1b(0x1ce)],_0x4829dd=_0x1879f7['id'],_0x5d635e={'memberId':(await this[_0xef4a1b(0x1bf)]['requireSession'](_0x4d8a2e))[_0xef4a1b(0x1d3)](),'unitId':_0x4d8a2e,'threadId':_0x2383bc,'mention':_0x3b3e56,'content':_0x2caaa4,'replyId':_0x4829dd},_0x701d1e=await this['_httpService'][_0xef4a1b(0x182)](_0xef4a1b(0x1b0)+_0x4d8a2e+'/edit',{'body':_0x5d635e});return!_0x701d1e[_0xef4a1b(0x1c7)][_0xef4a1b(0x183)]||_0x701d1e[_0xef4a1b(0x1c7)][_0xef4a1b(0x183)][_0xef4a1b(0x194)]===0x1;}async[_0x5f45a4(0x19e)](_0x57c8ef){const _0x1ec892=_0x5f45a4,{unitId:_0x558b19}=_0x57c8ef,_0x58f077=_0x57c8ef['threadId'],_0x126560={'memberId':this['_userService'][_0x1ec892(0x188)]()[_0x1ec892(0x197)],'unitId':_0x558b19,'threadId':_0x58f077,'solved':_0x57c8ef[_0x1ec892(0x1a4)]?I['Solved']:I[_0x1ec892(0x1a7)]},_0x4669c7=await this['_httpService'][_0x1ec892(0x182)](_0x1ec892(0x1b0)+_0x558b19+_0x1ec892(0x1b6),{'body':_0x126560});return!_0x4669c7['body'][_0x1ec892(0x183)]||_0x4669c7[_0x1ec892(0x1c7)][_0x1ec892(0x183)][_0x1ec892(0x194)]===0x1;}async[_0x5f45a4(0x1b3)](_0x48bb20,_0x5188f4,_0x68e7fb,_0x27c462){const _0x7408c9=_0x5f45a4,_0x123603={'memberId':(await this[_0x7408c9(0x1bf)][_0x7408c9(0x1d1)](_0x48bb20))[_0x7408c9(0x1d3)](),'threadId':_0x68e7fb,'replyId':_0x27c462,'unitId':_0x48bb20},_0x373488=await this[_0x7408c9(0x18a)]['post'](_0x7408c9(0x1b0)+_0x48bb20+_0x7408c9(0x18f),{'body':_0x123603});return!_0x373488[_0x7408c9(0x1c7)][_0x7408c9(0x183)]||_0x373488[_0x7408c9(0x1c7)]['error']['code']===0x1;}async[_0x5f45a4(0x1ad)](_0x506a55,_0x111f57,_0x23729f){const _0x1fb48a=_0x5f45a4,_0xd30a5e={'unitId':_0x506a55,'threadId':_0x23729f},_0x37e289=await this[_0x1fb48a(0x18a)]['post'](_0x1fb48a(0x1b0)+_0x506a55+'/list',{'body':_0xd30a5e}),_0x3deb2=_0x23729f[_0x1fb48a(0x19b)](_0x205123=>G(_0x37e289[_0x1fb48a(0x1c7)][_0x1fb48a(0x18b)][_0x205123],_0x506a55,_0x111f57))[_0x1fb48a(0x19f)](Boolean);return Object[_0x1fb48a(0x17c)](_0x37e289['body'][_0x1fb48a(0x18d)])[_0x1fb48a(0x190)](_0xf96ba4=>{const _0x3d4809=_0x1fb48a;this[_0x3d4809(0x1e5)][_0x3d4809(0x1a6)](_0xf96ba4);}),_0x3deb2;}[_0x5f45a4(0x1d6)](_0x139209){const _0x33e4eb=_0x5f45a4;return{'id':_0x139209['id'],'threadId':_0x139209['threadId'],'ref':_0x139209[_0x33e4eb(0x19d)]};}};p=x([C(0x0,c[_0x5f45a4(0x1db)](P[_0x5f45a4(0x1b9)])),C(0x1,c[_0x5f45a4(0x1db)](c['UserManagerService'])),C(0x2,c[_0x5f45a4(0x1db)](b[_0x5f45a4(0x1cf)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x28b87d,_0x62d820,_0x387c3f,_0xecd3a5)=>{const _0x377521=_0x5f45a4;for(var _0x4c6b46=_0xecd3a5>0x1?void 0x0:_0xecd3a5?H(_0x62d820,_0x387c3f):_0x62d820,_0x3d3767=_0x28b87d[_0x377521(0x1d4)]-0x1,_0x45f522;_0x3d3767>=0x0;_0x3d3767--)(_0x45f522=_0x28b87d[_0x3d3767])&&(_0x4c6b46=_0x45f522(_0x4c6b46)||_0x4c6b46);return _0x4c6b46;},y=(_0xb3adb2,_0x2648aa)=>(_0x5b3ec7,_0x3ab47a)=>_0x2648aa(_0x5b3ec7,_0x3ab47a,_0xb3adb2);let g=class extends c['Disposable']{constructor(_0x369789,_0x58a55f){const _0x5a8b57=_0x5f45a4;super(),this[_0x5a8b57(0x18c)]=_0x369789,this['_threadCommentDataSource']=_0x58a55f,this['_initDataSource']();}[_0x5f45a4(0x176)](){const _0x5f527c=_0x5f45a4;this[_0x5f527c(0x18c)][_0x5f527c(0x1aa)]=this['_threadCommentDataSource'],this[_0x5f527c(0x18c)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x5f45a4(0x1e1)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x5f45a4(0x1a5)],L=Object[_0x5f45a4(0x1e0)],Z=(_0x33154d,_0x55b1cd,_0x37e4da)=>_0x55b1cd in _0x33154d?F(_0x33154d,_0x55b1cd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37e4da}):_0x33154d[_0x55b1cd]=_0x37e4da,W=(_0x316c26,_0x4227ae,_0x47fec4,_0x50d8d3)=>{const _0x2be59f=_0x5f45a4;for(var _0xe52bc0=_0x50d8d3>0x1?void 0x0:_0x50d8d3?L(_0x4227ae,_0x47fec4):_0x4227ae,_0xeacf29=_0x316c26[_0x2be59f(0x1d4)]-0x1,_0x4bac95;_0xeacf29>=0x0;_0xeacf29--)(_0x4bac95=_0x316c26[_0xeacf29])&&(_0xe52bc0=_0x4bac95(_0xe52bc0)||_0xe52bc0);return _0xe52bc0;},O=(_0x3cd7ec,_0x1798ee)=>(_0xb37364,_0x437a1f)=>_0x1798ee(_0xb37364,_0x437a1f,_0x3cd7ec),N=(_0x2e9a70,_0xe9e545,_0x55cc80)=>Z(_0x2e9a70,typeof _0xe9e545!='symbol'?_0xe9e545+'':_0xe9e545,_0x55cc80);function _0x1444(_0x223419,_0x5b0415){_0x223419=_0x223419-0x171;const _0x35843f=_0x3584();let _0x144494=_0x35843f[_0x223419];return _0x144494;}exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x110189=D,_0x14a32f,_0x67f013){const _0x3a576e=_0x5f45a4;super(),this[_0x3a576e(0x195)]=_0x110189,this[_0x3a576e(0x1c4)]=_0x14a32f,this['_configService']=_0x67f013;const {..._0x5e43ee}=c[_0x3a576e(0x180)]({},D,this['_config']);this['_configService'][_0x3a576e(0x1a1)](q,_0x5e43ee);}[_0x5f45a4(0x1ac)](){const _0x2a7889=_0x5f45a4;[[p],[g],[_]][_0x2a7889(0x190)](_0x1bc9ca=>{const _0x396623=_0x2a7889;this[_0x396623(0x1c4)][_0x396623(0x1a0)](_0x1bc9ca);});}[_0x5f45a4(0x1ba)](){const _0x49d572=_0x5f45a4;this[_0x49d572(0x1c4)][_0x49d572(0x17d)](g),this[_0x49d572(0x1c4)]['get'](_);}},N(exports[_0x5f45a4(0x18e)],_0x5f45a4(0x1bc),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x5f45a4(0x1b8),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x5f45a4(0x18e)]=W([c[_0x5f45a4(0x1dc)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x5f45a4(0x1bb)]),O(0x1,c[_0x5f45a4(0x1db)](c[_0x5f45a4(0x1df)])),O(0x2,c[_0x5f45a4(0x191)])],exports[_0x5f45a4(0x18e)]);
1
+ 'use strict';const _0x43ccab=_0x498d;(function(_0x4d633f,_0x46fed0){const _0x875831=_0x498d,_0x45cca3=_0x4d633f();while(!![]){try{const _0x2c0282=-parseInt(_0x875831(0x13e))/0x1*(-parseInt(_0x875831(0x113))/0x2)+parseInt(_0x875831(0xff))/0x3+parseInt(_0x875831(0xf9))/0x4+-parseInt(_0x875831(0x101))/0x5+-parseInt(_0x875831(0xf8))/0x6+-parseInt(_0x875831(0xed))/0x7+-parseInt(_0x875831(0xf0))/0x8;if(_0x2c0282===_0x46fed0)break;else _0x45cca3['push'](_0x45cca3['shift']());}catch(_0x2e5e1a){_0x45cca3['push'](_0x45cca3['shift']());}}}(_0x1b28,0x4ce9d));Object[_0x43ccab(0x14c)](exports,Symbol[_0x43ccab(0x14d)],{'value':_0x43ccab(0x108)});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=(_0x15a2a2=>(_0x15a2a2[_0x15a2a2['OpenOrReOpen']=0x0]=_0x43ccab(0x131),_0x15a2a2[_0x15a2a2[_0x43ccab(0x10d)]=0x1]='Solved',_0x15a2a2[_0x15a2a2[_0x43ccab(0x136)]=-0x1]=_0x43ccab(0x136),_0x15a2a2))(I||{}),v=(_0xc6acec=>(_0xc6acec[_0xc6acec[_0x43ccab(0x117)]=0x0]=_0x43ccab(0x117),_0xc6acec[_0xc6acec[_0x43ccab(0x122)]=0x1]=_0x43ccab(0x122),_0xc6acec[_0xc6acec[_0x43ccab(0x121)]=0x2]='Reply',_0xc6acec[_0xc6acec['Edit']=0x3]=_0x43ccab(0xe3),_0xc6acec[_0xc6acec[_0x43ccab(0x138)]=0x4]=_0x43ccab(0x138),_0xc6acec[_0xc6acec[_0x43ccab(0xe6)]=0x5]='Solve',_0xc6acec[_0xc6acec[_0x43ccab(0x136)]=-0x1]=_0x43ccab(0x136),_0xc6acec))(v||{});const f=_0x270e07=>c['dayjs'](new Date(+_0x270e07))[_0x43ccab(0xfd)](_0x43ccab(0x137)),R=async(_0x17b671,_0x31b697)=>{const _0x3614a8=_0x43ccab,_0x18f051=_0x17b671[_0x3614a8(0xe4)](c[_0x3614a8(0x114)]),_0x20d5ce=_0x17b671[_0x3614a8(0xe4)](P['HTTPService']);_0x31b697[_0x3614a8(0x14a)](_0x5dff30=>{const _0x3e8059=_0x3614a8;_0x18f051[_0x3e8059(0xf4)](_0x5dff30)&&_0x31b697[_0x3e8059(0x111)](_0x5dff30);}),_0x31b697[_0x3614a8(0xe5)]&&(await _0x20d5ce['get'](_0x3614a8(0xfc),{'params':{'userIDs':[..._0x31b697]}}))['body'][_0x3614a8(0xef)][_0x3614a8(0x14a)](_0x24595c=>{_0x24595c&&_0x18f051['addUser'](_0x24595c);});};var $=Object[_0x43ccab(0xfa)],E=(_0x48bdf1,_0x26c203,_0x1e867d,_0x6eb56d)=>{const _0x185f5d=_0x43ccab;for(var _0x3b78c1=_0x6eb56d>0x1?void 0x0:_0x6eb56d?$(_0x26c203,_0x1e867d):_0x26c203,_0x36c1dd=_0x48bdf1[_0x185f5d(0x144)]-0x1,_0x4c95d5;_0x36c1dd>=0x0;_0x36c1dd--)(_0x4c95d5=_0x48bdf1[_0x36c1dd])&&(_0x3b78c1=_0x4c95d5(_0x3b78c1)||_0x3b78c1);return _0x3b78c1;},S=(_0x1793da,_0x2ee6e0)=>(_0x4cfe32,_0x48a294)=>_0x2ee6e0(_0x4cfe32,_0x48a294,_0x1793da);function _0x1b28(){const _0x1f39aa=['1542162rIajEh','/add','1938295hAtvGu','filter','listComments','/universer-api/comment/unit/','_commentService','_threadCommentDataSource','IConfigService','Module','_threadCommentDataSourceService','_sessionService','payload','addUser','Solved','map','post','personId','delete','code','2wDOSqr','UserManagerService','_initDataSource','addComment','Unknown','resolveComment','subscribe','/edit','_configService','unitId','_httpService','solved','add','UniverThreadCommentDataSourcePlugin','Reply','Add','disposeWithMe','customRanges','Disposable','syncUpdateMutationToColla','getUnit','replies','values','type','Inject','UNIVER_UNKNOWN','_threadCommentModel','pluginName','_init','replyId','OpenOrReOpen','/delete','stringify','pipe','user','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','Delete','IThreadCommentDataSourceService','parse','_config','find','bufferTime','515553pBXqjz','DependentOn','UniverInstanceType','Plugin','/list','content','length','_injector','dayjs','threadId','Injector','rangeId','forEach','CommentService','defineProperty','toStringTag','CustomRangeType','saveCommentToSnapshot','merge','UniverLicensePlugin','error','body','slice','getComment','comments','parentId','onReady','_initUserSync','Edit','get','size','Solve','userId','deleteComment','UniverThreadCommentUIPlugin','onStarting','commentUpdate$','root','2536072XvFOJe','dataSource','users','1511080WTFNUb','updateComment','CollaborationSessionService','getMemberID','getUser','createTimestamp','setConfig','_userService','494796OGXuzk','1226944kCkQYa','getOwnPropertyDescriptor','HTTPService','/universer-api/user/list','format','requireSession'];_0x1b28=function(){return _0x1f39aa;};return _0x1b28();}let _=class extends c[_0x43ccab(0x125)]{constructor(_0x228d4e,_0x282c64,_0xa12896,_0x33a9ce){const _0x5344b9=_0x43ccab;super(),this['_commentService']=_0x228d4e,this[_0x5344b9(0x12d)]=_0x282c64,this[_0x5344b9(0xf7)]=_0xa12896,this[_0x5344b9(0x145)]=_0x33a9ce,this[_0x5344b9(0x12f)](),this['_initUserSync']();}[_0x43ccab(0xe2)](){const _0x5da3f3=_0x43ccab;this[_0x5da3f3(0x123)](this[_0x5da3f3(0x12d)]['commentUpdate$'][_0x5da3f3(0x134)](j[_0x5da3f3(0x13d)](0x10))[_0x5da3f3(0x119)](_0x472ec1=>{const _0x30b34d=_0x5da3f3,_0x22b7fd=new Set();_0x472ec1[_0x30b34d(0x14a)](_0x34e7e6=>{const _0xec517a=_0x30b34d;switch(_0x34e7e6[_0xec517a(0x12a)]){case _0xec517a(0x11f):{const _0x126d60=_0x34e7e6[_0xec517a(0x10b)][_0xec517a(0x110)];_0x22b7fd[_0xec517a(0x11f)](_0x126d60);break;}}}),R(this['_injector'],_0x22b7fd);}));}[_0x43ccab(0x12f)](){const _0x49a759=_0x43ccab;this[_0x49a759(0x123)](this[_0x49a759(0x105)][_0x49a759(0xeb)][_0x49a759(0x119)](async _0x210c3d=>{const _0x931067=_0x49a759;var _0x1c130b,_0x1b7122,_0xa8d3a8,_0xb92b83;const _0x4245b1=(_0x1c130b=this[_0x931067(0x12d)][_0x931067(0x127)](_0x210c3d[_0x931067(0x11c)])[_0x931067(0x13c)](_0x37418e=>_0x37418e[_0x931067(0x147)]===_0x210c3d[_0x931067(0x147)]))==null?void 0x0:_0x1c130b[_0x931067(0xec)];if(!_0x4245b1)return;const {unitId:_0x1810b9,subUnitId:_0x46e62f}=_0x4245b1;switch(_0x210c3d[_0x931067(0x135)]&&this[_0x931067(0xf7)][_0x931067(0x10c)](_0x210c3d['user']),_0x210c3d[_0x931067(0x12a)]){case v[_0x931067(0x122)]:break;case v['Reply']:{this[_0x931067(0x12d)][_0x931067(0x116)](_0x1810b9,_0x46e62f,{'unitId':_0x1810b9,'subUnitId':_0x46e62f,'ref':'','id':_0x210c3d[_0x931067(0x130)],'dT':f(+_0x210c3d['createTimestamp']),'threadId':_0x210c3d['threadId'],'personId':(_0xa8d3a8=(_0x1b7122=_0x210c3d[_0x931067(0x135)])==null?void 0x0:_0x1b7122['userID'])!=null?_0xa8d3a8:_0x210c3d[_0x931067(0xe7)],'text':JSON[_0x931067(0x13a)](_0x210c3d['content']),'parentId':_0x4245b1['id']});break;}case v[_0x931067(0x138)]:{const _0x25a881=this[_0x931067(0x12d)][_0x931067(0xde)](_0x1810b9,_0x46e62f,_0x210c3d[_0x931067(0x130)]);_0x25a881&&_0x25a881[_0x931067(0xe0)]&&this[_0x931067(0x12d)]['deleteComment'](_0x1810b9,_0x46e62f,_0x210c3d['replyId']);break;}case v[_0x931067(0xe3)]:{this['_threadCommentModel'][_0x931067(0xf1)](_0x1810b9,_0x46e62f,{'commentId':_0x210c3d[_0x931067(0x130)],'text':JSON[_0x931067(0x13a)](_0x210c3d[_0x931067(0x143)])});break;}case v[_0x931067(0xe6)]:{const _0x18238c=(_0xb92b83=this[_0x931067(0x12d)][_0x931067(0x127)](_0x210c3d[_0x931067(0x11c)])[_0x931067(0x13c)](_0x2087fd=>_0x2087fd[_0x931067(0x147)]===_0x210c3d[_0x931067(0x147)]))==null?void 0x0:_0xb92b83['root'];_0x18238c&&this[_0x931067(0x12d)][_0x931067(0x118)](_0x1810b9,_0x46e62f,_0x18238c['id'],_0x210c3d[_0x931067(0x11e)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x43ccab(0x12b)](b[_0x43ccab(0x14b)])),S(0x1,c[_0x43ccab(0x12b)](M['ThreadCommentModel'])),S(0x2,c[_0x43ccab(0x12b)](c[_0x43ccab(0x114)])),S(0x3,c[_0x43ccab(0x12b)](c[_0x43ccab(0x148)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x43ccab(0xfa)],x=(_0x3b0c41,_0x37d3ac,_0x375f68,_0x1df15f)=>{const _0x426fb6=_0x43ccab;for(var _0x48b7f8=_0x1df15f>0x1?void 0x0:_0x1df15f?A(_0x37d3ac,_0x375f68):_0x37d3ac,_0x217df2=_0x3b0c41[_0x426fb6(0x144)]-0x1,_0x68d20d;_0x217df2>=0x0;_0x217df2--)(_0x68d20d=_0x3b0c41[_0x217df2])&&(_0x48b7f8=_0x68d20d(_0x48b7f8)||_0x48b7f8);return _0x48b7f8;},C=(_0x4c51fa,_0x6ba5f2)=>(_0x56c334,_0x1c930c)=>_0x6ba5f2(_0x56c334,_0x1c930c,_0x4c51fa);function Y(_0x3091a9,_0x1d6cb2){const _0x20d077=_0x43ccab,_0x42621f=_0x3091a9[_0x20d077(0x128)][0x0];return{..._0x1d6cb2,'id':_0x42621f['replyId'],'resolved':_0x3091a9[_0x20d077(0x11e)]===0x1,'dT':f(_0x42621f[_0x20d077(0xf5)]),'personId':_0x42621f[_0x20d077(0xe7)],'threadId':_0x42621f[_0x20d077(0x147)]};}function G(_0x6d38a2,_0x54dadc,_0x5185b1){const _0x4ca0fb=_0x43ccab;var _0xead5bb,_0x2bde0b;if(((_0x2bde0b=(_0xead5bb=_0x6d38a2==null?void 0x0:_0x6d38a2['replies'])==null?void 0x0:_0xead5bb[_0x4ca0fb(0x144)])!=null?_0x2bde0b:0x0)>0x0){const _0x5094e4=(_0x291f1f,_0x29e1a7)=>({'id':_0x291f1f[_0x4ca0fb(0x130)],'threadId':_0x291f1f[_0x4ca0fb(0x147)],'dT':f(_0x291f1f[_0x4ca0fb(0xf5)]),'personId':_0x291f1f[_0x4ca0fb(0xe7)],'resolved':_0x6d38a2[_0x4ca0fb(0x11e)]===I[_0x4ca0fb(0x10d)],'unitId':_0x54dadc,'subUnitId':_0x5185b1,'text':JSON[_0x4ca0fb(0x13a)](_0x291f1f[_0x4ca0fb(0x143)]),'parentId':_0x29e1a7}),_0x100616=_0x5094e4(_0x6d38a2[_0x4ca0fb(0x128)][0x0]);return{..._0x100616,'children':_0x6d38a2[_0x4ca0fb(0x128)][_0x4ca0fb(0xdd)](0x1)[_0x4ca0fb(0x10e)](_0x203b1c=>_0x5094e4(_0x203b1c,_0x100616['id']))};}return null;}function _0x498d(_0x4b40a0,_0x3f6686){_0x4b40a0=_0x4b40a0-0xdd;const _0x1b2876=_0x1b28();let _0x498db1=_0x1b2876[_0x4b40a0];return _0x498db1;}let p=class{constructor(_0x45b010,_0x1546a6,_0x407de2){const _0x3474aa=_0x43ccab;this[_0x3474aa(0x11d)]=_0x45b010,this[_0x3474aa(0xf7)]=_0x1546a6,this[_0x3474aa(0x10a)]=_0x407de2;}async['addComment'](_0x4a0890){const _0x58f9c8=_0x43ccab;var _0x195c60,_0x547ace;const {parentId:_0x321e49,unitId:_0x2388ae,text:_0x19aee9,threadId:_0x746927}=_0x4a0890,_0x1458a1=(_0x547ace=(_0x195c60=_0x19aee9['customRanges'])==null?void 0x0:_0x195c60['filter'](_0x28a539=>_0x28a539['rangeType']===c[_0x58f9c8(0x14e)]['COMMENT'])[_0x58f9c8(0x10e)](_0x25cb5e=>_0x25cb5e[_0x58f9c8(0x149)]))!=null?_0x547ace:[],_0x974d5e=JSON[_0x58f9c8(0x133)](_0x19aee9),_0x35d5a9=(await this[_0x58f9c8(0x10a)][_0x58f9c8(0xfe)](_0x2388ae))[_0x58f9c8(0xf3)]();if(_0x321e49){const _0x260e51={'memberId':_0x35d5a9,'unitId':_0x2388ae,'content':_0x974d5e,'mention':_0x1458a1,'threadId':_0x746927},_0xefd969=(await this[_0x58f9c8(0x11d)][_0x58f9c8(0x10f)](_0x58f9c8(0x104)+_0x2388ae+'/reply',{'body':_0x260e51}))[_0x58f9c8(0x153)]['reply'];return{..._0x4a0890,'id':_0xefd969['replyId'],'dT':c[_0x58f9c8(0x146)](+_0xefd969[_0x58f9c8(0xf5)])[_0x58f9c8(0xfd)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xefd969[_0x58f9c8(0xe7)]};}else{const _0xd1e06={'memberId':_0x35d5a9,'unitId':_0x2388ae,'content':_0x974d5e,'mention':_0x1458a1},_0x17f2d5=await this[_0x58f9c8(0x11d)][_0x58f9c8(0x10f)](_0x58f9c8(0x104)+_0x2388ae+_0x58f9c8(0x100),{'body':_0xd1e06});return Y(_0x17f2d5[_0x58f9c8(0x153)]['comment'],_0x4a0890);}}async[_0x43ccab(0xf1)](_0x284609){const _0x4c70ce=_0x43ccab;var _0x40792f,_0x20356b;const {text:_0x17d29c,unitId:_0x32c963}=_0x284609,_0x13a4cc=(_0x20356b=(_0x40792f=_0x17d29c[_0x4c70ce(0x124)])==null?void 0x0:_0x40792f[_0x4c70ce(0x102)](_0x1dcd2c=>_0x1dcd2c['rangeType']===c[_0x4c70ce(0x14e)]['COMMENT'])[_0x4c70ce(0x10e)](_0xdab722=>_0xdab722['rangeId']))!=null?_0x20356b:[],_0x2299c7=JSON[_0x4c70ce(0x133)](_0x17d29c),_0x2e0a60=_0x284609[_0x4c70ce(0x147)],_0x240b44=_0x284609['id'],_0x202886={'memberId':(await this[_0x4c70ce(0x10a)][_0x4c70ce(0xfe)](_0x32c963))[_0x4c70ce(0xf3)](),'unitId':_0x32c963,'threadId':_0x2e0a60,'mention':_0x13a4cc,'content':_0x2299c7,'replyId':_0x240b44},_0x1192b8=await this[_0x4c70ce(0x11d)][_0x4c70ce(0x10f)]('/universer-api/comment/unit/'+_0x32c963+_0x4c70ce(0x11a),{'body':_0x202886});return!_0x1192b8[_0x4c70ce(0x153)][_0x4c70ce(0x152)]||_0x1192b8[_0x4c70ce(0x153)]['error']['code']===0x1;}async[_0x43ccab(0x118)](_0x1b7b11){const _0x48da2e=_0x43ccab,{unitId:_0x5b9905}=_0x1b7b11,_0x573727=_0x1b7b11[_0x48da2e(0x147)],_0x24a903={'memberId':this[_0x48da2e(0xf7)]['getCurrentUser']()['userID'],'unitId':_0x5b9905,'threadId':_0x573727,'solved':_0x1b7b11['resolved']?I[_0x48da2e(0x10d)]:I['OpenOrReOpen']},_0x513d17=await this[_0x48da2e(0x11d)]['post'](_0x48da2e(0x104)+_0x5b9905+'/solved',{'body':_0x24a903});return!_0x513d17[_0x48da2e(0x153)]['error']||_0x513d17['body'][_0x48da2e(0x152)][_0x48da2e(0x112)]===0x1;}async[_0x43ccab(0xe8)](_0x33c5fb,_0x150fec,_0x401e5f,_0x6b3dff){const _0x1d2bdc=_0x43ccab,_0x2e59d4={'memberId':(await this[_0x1d2bdc(0x10a)]['requireSession'](_0x33c5fb))['getMemberID'](),'threadId':_0x401e5f,'replyId':_0x6b3dff,'unitId':_0x33c5fb},_0x503c45=await this['_httpService'][_0x1d2bdc(0x10f)](_0x1d2bdc(0x104)+_0x33c5fb+_0x1d2bdc(0x132),{'body':_0x2e59d4});return!_0x503c45[_0x1d2bdc(0x153)][_0x1d2bdc(0x152)]||_0x503c45[_0x1d2bdc(0x153)][_0x1d2bdc(0x152)]['code']===0x1;}async[_0x43ccab(0x103)](_0x1038f4,_0x4951d2,_0x24dd66){const _0xd75d04=_0x43ccab,_0x1a9c6e={'unitId':_0x1038f4,'threadId':_0x24dd66},_0x4838b3=await this[_0xd75d04(0x11d)][_0xd75d04(0x10f)](_0xd75d04(0x104)+_0x1038f4+_0xd75d04(0x142),{'body':_0x1a9c6e}),_0x2e4f60=_0x24dd66[_0xd75d04(0x10e)](_0x5a85c2=>G(_0x4838b3[_0xd75d04(0x153)][_0xd75d04(0xdf)][_0x5a85c2],_0x1038f4,_0x4951d2))[_0xd75d04(0x102)](Boolean);return Object[_0xd75d04(0x129)](_0x4838b3[_0xd75d04(0x153)][_0xd75d04(0xef)])[_0xd75d04(0x14a)](_0x3c9d5e=>{const _0x173d7d=_0xd75d04;this['_userService'][_0x173d7d(0x10c)](_0x3c9d5e);}),_0x2e4f60;}[_0x43ccab(0x14f)](_0x291eb5){return{'id':_0x291eb5['id'],'threadId':_0x291eb5['threadId'],'ref':_0x291eb5['ref']};}};p=x([C(0x0,c['Inject'](P[_0x43ccab(0xfb)])),C(0x1,c[_0x43ccab(0x12b)](c[_0x43ccab(0x114)])),C(0x2,c[_0x43ccab(0x12b)](b[_0x43ccab(0xf2)]))],p);var H=Object[_0x43ccab(0xfa)],J=(_0x5d5690,_0x43de71,_0xf87102,_0x3b63af)=>{for(var _0x22e3d9=_0x3b63af>0x1?void 0x0:_0x3b63af?H(_0x43de71,_0xf87102):_0x43de71,_0x175381=_0x5d5690['length']-0x1,_0x2eb1d5;_0x175381>=0x0;_0x175381--)(_0x2eb1d5=_0x5d5690[_0x175381])&&(_0x22e3d9=_0x2eb1d5(_0x22e3d9)||_0x22e3d9);return _0x22e3d9;},y=(_0x5a7a31,_0x30d09e)=>(_0x49f54f,_0x1b64d3)=>_0x30d09e(_0x49f54f,_0x1b64d3,_0x5a7a31);let g=class extends c['Disposable']{constructor(_0x43716f,_0x19a159){const _0x9c856a=_0x43ccab;super(),this[_0x9c856a(0x109)]=_0x43716f,this[_0x9c856a(0x106)]=_0x19a159,this[_0x9c856a(0x115)]();}['_initDataSource'](){const _0x5d21aa=_0x43ccab;this[_0x5d21aa(0x109)][_0x5d21aa(0xee)]=this[_0x5d21aa(0x106)],this['_threadCommentDataSourceService'][_0x5d21aa(0x126)]=!0x1;}};g=J([y(0x0,M[_0x43ccab(0x139)]),y(0x1,c[_0x43ccab(0x12b)](p))],g);var F=Object[_0x43ccab(0x14c)],L=Object[_0x43ccab(0xfa)],Z=(_0x241ab3,_0x131cac,_0xa9a35e)=>_0x131cac in _0x241ab3?F(_0x241ab3,_0x131cac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xa9a35e}):_0x241ab3[_0x131cac]=_0xa9a35e,W=(_0x2cd0a0,_0x3e43c4,_0x44f326,_0x5632b3)=>{const _0x20c85b=_0x43ccab;for(var _0x49cf67=_0x5632b3>0x1?void 0x0:_0x5632b3?L(_0x3e43c4,_0x44f326):_0x3e43c4,_0x26dc9e=_0x2cd0a0[_0x20c85b(0x144)]-0x1,_0x45c06c;_0x26dc9e>=0x0;_0x26dc9e--)(_0x45c06c=_0x2cd0a0[_0x26dc9e])&&(_0x49cf67=_0x45c06c(_0x49cf67)||_0x49cf67);return _0x49cf67;},O=(_0x505917,_0x21cb7a)=>(_0x4285c4,_0x51a238)=>_0x21cb7a(_0x4285c4,_0x51a238,_0x505917),N=(_0x240320,_0x472aa6,_0x519416)=>Z(_0x240320,typeof _0x472aa6!='symbol'?_0x472aa6+'':_0x472aa6,_0x519416);exports[_0x43ccab(0x120)]=class extends c[_0x43ccab(0x141)]{constructor(_0x5aee77=D,_0x2667d9,_0x19ccb9){const _0x24cb98=_0x43ccab;super(),this[_0x24cb98(0x13b)]=_0x5aee77,this[_0x24cb98(0x145)]=_0x2667d9,this[_0x24cb98(0x11b)]=_0x19ccb9;const {..._0x4adb80}=c[_0x24cb98(0x150)]({},D,this['_config']);this['_configService'][_0x24cb98(0xf6)](q,_0x4adb80);}[_0x43ccab(0xea)](){[[p],[g],[_]]['forEach'](_0x43a23a=>{const _0x55b046=_0x498d;this[_0x55b046(0x145)][_0x55b046(0x11f)](_0x43a23a);});}[_0x43ccab(0xe1)](){const _0x5f3b8a=_0x43ccab;this[_0x5f3b8a(0x145)][_0x5f3b8a(0xe4)](g),this[_0x5f3b8a(0x145)]['get'](_);}},N(exports[_0x43ccab(0x120)],_0x43ccab(0x12e),U),N(exports[_0x43ccab(0x120)],_0x43ccab(0x12a),c[_0x43ccab(0x140)][_0x43ccab(0x12c)]),exports[_0x43ccab(0x120)]=W([c[_0x43ccab(0x13f)](w[_0x43ccab(0xe9)],b['UniverCollaborationClientPlugin'],T[_0x43ccab(0x151)]),O(0x1,c[_0x43ccab(0x12b)](c[_0x43ccab(0x148)])),O(0x2,c[_0x43ccab(0x107)])],exports[_0x43ccab(0x120)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x58a68b=_0x26d7;function _0x2d31(){const _0x1441b6=['YYYY/MM/DD\x20HH:mm','9rJLwcB','/reply','resolveComment','_sessionService','personId','getOwnPropertyDescriptor','2523165UPqAFW','4pyhItl','addUser','ref','rangeType','subscribe','format','_threadCommentModel','OpenOrReOpen','length','values','type','code','/universer-api/user/list','filter','7340712XRboqF','_config','12VQvIui','parentId','listComments','post','Reply','syncUpdateMutationToColla','_injector','get','666919vMqcnm','replyId','/add','Delete','pipe','_initDataSource','1763712yuhxwL','forEach','_threadCommentDataSourceService','Solve','getUnit','/delete','map','_init','/universer-api/comment/unit/','setConfig','40826577MVizQL','/list','getCurrentUser','424eVRNXy','getUser','_commentService','updateComment','_userService','requireSession','/edit','customRanges','getMemberID','disposeWithMe','Edit','symbol','Unknown','content','users','_httpService','unitId','replies','slice','thread-comment-data-source.config','commentUpdate$','userID','stringify','184408pULYsl','COMMENT','onReady','12Mmmdmx','deleteComment','error','body','size','parse','comments','getComment','createTimestamp','UNRECOGNIZED','/solved','_initUserSync','find','user','Solved','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','4330150umnZfM','rangeId','userId','saveCommentToSnapshot','Add','solved','_configService','threadId','dataSource','root','defineProperty'];_0x2d31=function(){return _0x1441b6;};return _0x2d31();}(function(_0x362551,_0x49e7e7){const _0x2f7fa2=_0x26d7,_0x1fe2fa=_0x362551();while(!![]){try{const _0x441201=-parseInt(_0x2f7fa2(0x102))/0x1*(parseInt(_0x2f7fa2(0xea))/0x2)+parseInt(_0x2f7fa2(0x108))/0x3+-parseInt(_0x2f7fa2(0xfa))/0x4*(parseInt(_0x2f7fa2(0x152))/0x5)+parseInt(_0x2f7fa2(0xf8))/0x6+-parseInt(_0x2f7fa2(0x12c))/0x7*(parseInt(_0x2f7fa2(0x115))/0x8)+parseInt(_0x2f7fa2(0x14c))/0x9*(-parseInt(_0x2f7fa2(0x140))/0xa)+-parseInt(_0x2f7fa2(0x112))/0xb*(-parseInt(_0x2f7fa2(0x12f))/0xc);if(_0x441201===_0x49e7e7)break;else _0x1fe2fa['push'](_0x1fe2fa['shift']());}catch(_0x2d8da3){_0x1fe2fa['push'](_0x1fe2fa['shift']());}}}(_0x2d31,0xce837));import{CommentService as _0xbeb1bb,CollaborationSessionService as _0x5276ff,UniverCollaborationClientPlugin as _0xed0bc7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xe241d6}from'@univerjs-pro/license';import{dayjs as _0x54f05b,UserManagerService as _0x1fa2aa,Inject as _0x31afa8,Injector as _0x2e8e75,Disposable as _0x1e5fc7,CustomRangeType as _0x6d9c98,UniverInstanceType as _0x4977eb,DependentOn as _0x2b7f20,IConfigService as _0x5c4f8c,Plugin as _0x5c853b,merge as _0x5d724b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5439b7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43de76,IThreadCommentDataSourceService as _0x2b003d}from'@univerjs/thread-comment';import{bufferTime as _0x1043f3}from'rxjs';import{HTTPService as _0x38d411}from'@univerjs/network';const W=_0x58a68b(0x13f);var I=(_0x27d0f1=>(_0x27d0f1[_0x27d0f1[_0x58a68b(0xf1)]=0x0]=_0x58a68b(0xf1),_0x27d0f1[_0x27d0f1[_0x58a68b(0x13d)]=0x1]=_0x58a68b(0x13d),_0x27d0f1[_0x27d0f1['UNRECOGNIZED']=-0x1]=_0x58a68b(0x138),_0x27d0f1))(I||{}),v=(_0x9e673a=>(_0x9e673a[_0x9e673a[_0x58a68b(0x121)]=0x0]=_0x58a68b(0x121),_0x9e673a[_0x9e673a['Add']=0x1]=_0x58a68b(0x144),_0x9e673a[_0x9e673a[_0x58a68b(0xfe)]=0x2]=_0x58a68b(0xfe),_0x9e673a[_0x9e673a[_0x58a68b(0x11f)]=0x3]=_0x58a68b(0x11f),_0x9e673a[_0x9e673a[_0x58a68b(0x105)]=0x4]=_0x58a68b(0x105),_0x9e673a[_0x9e673a['Solve']=0x5]='Solve',_0x9e673a[_0x9e673a['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x9e673a))(v||{});const y=_0x2a0e79=>_0x54f05b(new Date(+_0x2a0e79))[_0x58a68b(0xef)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x91521f,_0x4cd23c)=>{const _0x62f67e=_0x58a68b,_0xd593ef=_0x91521f[_0x62f67e(0x101)](_0x1fa2aa),_0x2a0839=_0x91521f[_0x62f67e(0x101)](_0x38d411);_0x4cd23c[_0x62f67e(0x109)](_0x1c8691=>{const _0x54b365=_0x62f67e;_0xd593ef[_0x54b365(0x116)](_0x1c8691)&&_0x4cd23c['delete'](_0x1c8691);}),_0x4cd23c[_0x62f67e(0x133)]&&(await _0x2a0839[_0x62f67e(0x101)](_0x62f67e(0xf6),{'params':{'userIDs':[..._0x4cd23c]}}))[_0x62f67e(0x132)][_0x62f67e(0x123)][_0x62f67e(0x109)](_0x25817d=>{_0x25817d&&_0xd593ef['addUser'](_0x25817d);});};var K=Object[_0x58a68b(0x151)],V=(_0xe91c30,_0x131a7f,_0x48f4ac,_0x2151ea)=>{const _0x286b9d=_0x58a68b;for(var _0x39e349=_0x2151ea>0x1?void 0x0:_0x2151ea?K(_0x131a7f,_0x48f4ac):_0x131a7f,_0x8b7a06=_0xe91c30[_0x286b9d(0xf2)]-0x1,_0x116165;_0x8b7a06>=0x0;_0x8b7a06--)(_0x116165=_0xe91c30[_0x8b7a06])&&(_0x39e349=_0x116165(_0x39e349)||_0x39e349);return _0x39e349;},p=(_0x30c89c,_0xd8e8c0)=>(_0x3e0028,_0x1890b4)=>_0xd8e8c0(_0x3e0028,_0x1890b4,_0x30c89c);let _=class extends _0x1e5fc7{constructor(_0x50597e,_0x25c679,_0x3d3c03,_0x3d0cf6){const _0x13a76=_0x58a68b;super(),this[_0x13a76(0x117)]=_0x50597e,this[_0x13a76(0xf0)]=_0x25c679,this[_0x13a76(0x119)]=_0x3d3c03,this[_0x13a76(0x100)]=_0x3d0cf6,this[_0x13a76(0x10f)](),this['_initUserSync']();}[_0x58a68b(0x13a)](){const _0x931c51=_0x58a68b;this[_0x931c51(0x11e)](this[_0x931c51(0xf0)][_0x931c51(0x129)][_0x931c51(0x106)](_0x1043f3(0x10))[_0x931c51(0xee)](_0x5307c0=>{const _0x462b60=_0x931c51,_0x6bf5cb=new Set();_0x5307c0[_0x462b60(0x109)](_0x263a05=>{const _0x1d95c5=_0x462b60;switch(_0x263a05[_0x1d95c5(0xf4)]){case'add':{const _0x1023bc=_0x263a05['payload'][_0x1d95c5(0x150)];_0x6bf5cb[_0x1d95c5(0x13e)](_0x1023bc);break;}}}),B(this[_0x462b60(0x100)],_0x6bf5cb);}));}['_init'](){const _0x48c230=_0x58a68b;this['disposeWithMe'](this['_commentService'][_0x48c230(0x129)][_0x48c230(0xee)](async _0x2e0501=>{const _0x4bec93=_0x48c230;var _0x2d9dd0,_0x1eb95a,_0xcdb3eb,_0x215dfe;const _0x2cc35a=(_0x2d9dd0=this['_threadCommentModel'][_0x4bec93(0x10c)](_0x2e0501[_0x4bec93(0x125)])[_0x4bec93(0x13b)](_0x241e74=>_0x241e74['threadId']===_0x2e0501['threadId']))==null?void 0x0:_0x2d9dd0[_0x4bec93(0x149)];if(!_0x2cc35a)return;const {unitId:_0x4f3178,subUnitId:_0x16dcfc}=_0x2cc35a;switch(_0x2e0501[_0x4bec93(0x13c)]&&this['_userService'][_0x4bec93(0xeb)](_0x2e0501[_0x4bec93(0x13c)]),_0x2e0501['type']){case v[_0x4bec93(0x144)]:break;case v[_0x4bec93(0xfe)]:{this[_0x4bec93(0xf0)]['addComment'](_0x4f3178,_0x16dcfc,{'unitId':_0x4f3178,'subUnitId':_0x16dcfc,'ref':'','id':_0x2e0501[_0x4bec93(0x103)],'dT':y(+_0x2e0501['createTimestamp']),'threadId':_0x2e0501['threadId'],'personId':(_0xcdb3eb=(_0x1eb95a=_0x2e0501['user'])==null?void 0x0:_0x1eb95a[_0x4bec93(0x12a)])!=null?_0xcdb3eb:_0x2e0501[_0x4bec93(0x142)],'text':JSON[_0x4bec93(0x134)](_0x2e0501[_0x4bec93(0x122)]),'parentId':_0x2cc35a['id']});break;}case v[_0x4bec93(0x105)]:{const _0x340683=this['_threadCommentModel'][_0x4bec93(0x136)](_0x4f3178,_0x16dcfc,_0x2e0501[_0x4bec93(0x103)]);_0x340683&&_0x340683[_0x4bec93(0xfb)]&&this[_0x4bec93(0xf0)]['deleteComment'](_0x4f3178,_0x16dcfc,_0x2e0501[_0x4bec93(0x103)]);break;}case v[_0x4bec93(0x11f)]:{this[_0x4bec93(0xf0)][_0x4bec93(0x118)](_0x4f3178,_0x16dcfc,{'commentId':_0x2e0501[_0x4bec93(0x103)],'text':JSON[_0x4bec93(0x134)](_0x2e0501[_0x4bec93(0x122)])});break;}case v[_0x4bec93(0x10b)]:{const _0x51963e=(_0x215dfe=this[_0x4bec93(0xf0)][_0x4bec93(0x10c)](_0x2e0501['unitId'])['find'](_0x7495f3=>_0x7495f3[_0x4bec93(0x147)]===_0x2e0501[_0x4bec93(0x147)]))==null?void 0x0:_0x215dfe[_0x4bec93(0x149)];_0x51963e&&this[_0x4bec93(0xf0)][_0x4bec93(0x14e)](_0x4f3178,_0x16dcfc,_0x51963e['id'],_0x2e0501[_0x4bec93(0x145)]===I[_0x4bec93(0x13d)]);break;}}}));}};function _0x26d7(_0x446de5,_0x5070cc){_0x446de5=_0x446de5-0xea;const _0x2d3140=_0x2d31();let _0x26d731=_0x2d3140[_0x446de5];return _0x26d731;}_=V([p(0x0,_0x31afa8(_0xbeb1bb)),p(0x1,_0x31afa8(_0x43de76)),p(0x2,_0x31afa8(_0x1fa2aa)),p(0x3,_0x31afa8(_0x2e8e75))],_);const z=_0x58a68b(0x128),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1748e6,_0x46fc92,_0x1bf901,_0x4bacd8)=>{const _0x4f624f=_0x58a68b;for(var _0x1d693f=_0x4bacd8>0x1?void 0x0:_0x4bacd8?k(_0x46fc92,_0x1bf901):_0x46fc92,_0x3de32d=_0x1748e6[_0x4f624f(0xf2)]-0x1,_0x68820b;_0x3de32d>=0x0;_0x3de32d--)(_0x68820b=_0x1748e6[_0x3de32d])&&(_0x1d693f=_0x68820b(_0x1d693f)||_0x1d693f);return _0x1d693f;},b=(_0x4c49d6,_0x48f644)=>(_0x32de26,_0x27e4d0)=>_0x48f644(_0x32de26,_0x27e4d0,_0x4c49d6);function X(_0x4ec965,_0x1baf93){const _0x3b6f04=_0x58a68b,_0x34f0fa=_0x4ec965[_0x3b6f04(0x126)][0x0];return{..._0x1baf93,'id':_0x34f0fa[_0x3b6f04(0x103)],'resolved':_0x4ec965[_0x3b6f04(0x145)]===0x1,'dT':y(_0x34f0fa[_0x3b6f04(0x137)]),'personId':_0x34f0fa[_0x3b6f04(0x142)],'threadId':_0x34f0fa[_0x3b6f04(0x147)]};}function ee(_0x52026f,_0x1f563d,_0x1cf0e7){const _0x295a88=_0x58a68b;var _0xca8548,_0xcfb643;if(((_0xcfb643=(_0xca8548=_0x52026f==null?void 0x0:_0x52026f[_0x295a88(0x126)])==null?void 0x0:_0xca8548[_0x295a88(0xf2)])!=null?_0xcfb643:0x0)>0x0){const _0x58d58=(_0x23eb0b,_0x106109)=>({'id':_0x23eb0b['replyId'],'threadId':_0x23eb0b[_0x295a88(0x147)],'dT':y(_0x23eb0b['createTimestamp']),'personId':_0x23eb0b[_0x295a88(0x142)],'resolved':_0x52026f[_0x295a88(0x145)]===I[_0x295a88(0x13d)],'unitId':_0x1f563d,'subUnitId':_0x1cf0e7,'text':JSON[_0x295a88(0x134)](_0x23eb0b[_0x295a88(0x122)]),'parentId':_0x106109}),_0x4d34a8=_0x58d58(_0x52026f[_0x295a88(0x126)][0x0]);return{..._0x4d34a8,'children':_0x52026f[_0x295a88(0x126)][_0x295a88(0x127)](0x1)[_0x295a88(0x10e)](_0x54dbe8=>_0x58d58(_0x54dbe8,_0x4d34a8['id']))};}return null;}let S=class{constructor(_0x4907ce,_0x57e37a,_0x482e31){const _0x3f5431=_0x58a68b;this[_0x3f5431(0x124)]=_0x4907ce,this[_0x3f5431(0x119)]=_0x57e37a,this[_0x3f5431(0x14f)]=_0x482e31;}async['addComment'](_0xb58086){const _0x246e4b=_0x58a68b;var _0x51c686,_0x5b03db;const {parentId:_0x1e43a5,unitId:_0x2478f4,text:_0x3bcff4,threadId:_0x14e78c}=_0xb58086,_0x36803d=(_0x5b03db=(_0x51c686=_0x3bcff4['customRanges'])==null?void 0x0:_0x51c686[_0x246e4b(0xf7)](_0x5d07fe=>_0x5d07fe[_0x246e4b(0xed)]===_0x6d9c98['COMMENT'])[_0x246e4b(0x10e)](_0x9d6501=>_0x9d6501[_0x246e4b(0x141)]))!=null?_0x5b03db:[],_0x356fde=JSON[_0x246e4b(0x12b)](_0x3bcff4),_0x5cf5fd=(await this['_sessionService'][_0x246e4b(0x11a)](_0x2478f4))['getMemberID']();if(_0x1e43a5){const _0x11fff2={'memberId':_0x5cf5fd,'unitId':_0x2478f4,'content':_0x356fde,'mention':_0x36803d,'threadId':_0x14e78c},_0x964969=(await this[_0x246e4b(0x124)][_0x246e4b(0xfd)](_0x246e4b(0x110)+_0x2478f4+_0x246e4b(0x14d),{'body':_0x11fff2}))[_0x246e4b(0x132)]['reply'];return{..._0xb58086,'id':_0x964969['replyId'],'dT':_0x54f05b(+_0x964969[_0x246e4b(0x137)])[_0x246e4b(0xef)](_0x246e4b(0x14b)),'personId':_0x964969[_0x246e4b(0x142)]};}else{const _0x32020c={'memberId':_0x5cf5fd,'unitId':_0x2478f4,'content':_0x356fde,'mention':_0x36803d},_0x27fdea=await this[_0x246e4b(0x124)][_0x246e4b(0xfd)](_0x246e4b(0x110)+_0x2478f4+_0x246e4b(0x104),{'body':_0x32020c});return X(_0x27fdea[_0x246e4b(0x132)]['comment'],_0xb58086);}}async[_0x58a68b(0x118)](_0x44803c){const _0x203913=_0x58a68b;var _0x216b55,_0x441829;const {text:_0x528489,unitId:_0x23689a}=_0x44803c,_0x2ca6f6=(_0x441829=(_0x216b55=_0x528489[_0x203913(0x11c)])==null?void 0x0:_0x216b55[_0x203913(0xf7)](_0x17d955=>_0x17d955['rangeType']===_0x6d9c98[_0x203913(0x12d)])[_0x203913(0x10e)](_0x3f16cb=>_0x3f16cb['rangeId']))!=null?_0x441829:[],_0x25dd1b=JSON[_0x203913(0x12b)](_0x528489),_0x2a65c8=_0x44803c['threadId'],_0x11cacb=_0x44803c['id'],_0x13d144={'memberId':(await this[_0x203913(0x14f)][_0x203913(0x11a)](_0x23689a))['getMemberID'](),'unitId':_0x23689a,'threadId':_0x2a65c8,'mention':_0x2ca6f6,'content':_0x25dd1b,'replyId':_0x11cacb},_0x24d716=await this['_httpService'][_0x203913(0xfd)](_0x203913(0x110)+_0x23689a+_0x203913(0x11b),{'body':_0x13d144});return!_0x24d716[_0x203913(0x132)][_0x203913(0x131)]||_0x24d716[_0x203913(0x132)][_0x203913(0x131)]['code']===0x1;}async['resolveComment'](_0x5083e3){const _0x476103=_0x58a68b,{unitId:_0x2119c6}=_0x5083e3,_0xabddfb=_0x5083e3[_0x476103(0x147)],_0x2fce38={'memberId':this[_0x476103(0x119)][_0x476103(0x114)]()[_0x476103(0x12a)],'unitId':_0x2119c6,'threadId':_0xabddfb,'solved':_0x5083e3['resolved']?I['Solved']:I[_0x476103(0xf1)]},_0x2bb6a9=await this['_httpService'][_0x476103(0xfd)]('/universer-api/comment/unit/'+_0x2119c6+_0x476103(0x139),{'body':_0x2fce38});return!_0x2bb6a9[_0x476103(0x132)][_0x476103(0x131)]||_0x2bb6a9[_0x476103(0x132)][_0x476103(0x131)][_0x476103(0xf5)]===0x1;}async[_0x58a68b(0x130)](_0x2a19fc,_0x280d60,_0x5ce1ca,_0xfc1e8e){const _0x47c9cc=_0x58a68b,_0x30fcb6={'memberId':(await this[_0x47c9cc(0x14f)][_0x47c9cc(0x11a)](_0x2a19fc))[_0x47c9cc(0x11d)](),'threadId':_0x5ce1ca,'replyId':_0xfc1e8e,'unitId':_0x2a19fc},_0x969f6c=await this[_0x47c9cc(0x124)][_0x47c9cc(0xfd)](_0x47c9cc(0x110)+_0x2a19fc+_0x47c9cc(0x10d),{'body':_0x30fcb6});return!_0x969f6c[_0x47c9cc(0x132)]['error']||_0x969f6c[_0x47c9cc(0x132)]['error']['code']===0x1;}async[_0x58a68b(0xfc)](_0x3bcf7f,_0x2b6708,_0x580f25){const _0x254ad1=_0x58a68b,_0x1283bc={'unitId':_0x3bcf7f,'threadId':_0x580f25},_0x233066=await this['_httpService'][_0x254ad1(0xfd)](_0x254ad1(0x110)+_0x3bcf7f+_0x254ad1(0x113),{'body':_0x1283bc}),_0x28b951=_0x580f25[_0x254ad1(0x10e)](_0x304381=>ee(_0x233066[_0x254ad1(0x132)][_0x254ad1(0x135)][_0x304381],_0x3bcf7f,_0x2b6708))[_0x254ad1(0xf7)](Boolean);return Object[_0x254ad1(0xf3)](_0x233066[_0x254ad1(0x132)]['users'])[_0x254ad1(0x109)](_0x30ffd1=>{const _0x4f32f7=_0x254ad1;this[_0x4f32f7(0x119)][_0x4f32f7(0xeb)](_0x30ffd1);}),_0x28b951;}[_0x58a68b(0x143)](_0x5b0899){const _0x364744=_0x58a68b;return{'id':_0x5b0899['id'],'threadId':_0x5b0899[_0x364744(0x147)],'ref':_0x5b0899[_0x364744(0xec)]};}};S=Q([b(0x0,_0x31afa8(_0x38d411)),b(0x1,_0x31afa8(_0x1fa2aa)),b(0x2,_0x31afa8(_0x5276ff))],S);var re=Object[_0x58a68b(0x151)],te=(_0x3e44da,_0x92b9a6,_0x2fc22e,_0x245311)=>{for(var _0x1dd1af=_0x245311>0x1?void 0x0:_0x245311?re(_0x92b9a6,_0x2fc22e):_0x92b9a6,_0x2e4f43=_0x3e44da['length']-0x1,_0x5e6338;_0x2e4f43>=0x0;_0x2e4f43--)(_0x5e6338=_0x3e44da[_0x2e4f43])&&(_0x1dd1af=_0x5e6338(_0x1dd1af)||_0x1dd1af);return _0x1dd1af;},M=(_0x20b435,_0xbce566)=>(_0x48a6c0,_0x4f42a5)=>_0xbce566(_0x48a6c0,_0x4f42a5,_0x20b435);let f=class extends _0x1e5fc7{constructor(_0x596516,_0x4ea0a0){const _0x31a8dd=_0x58a68b;super(),this[_0x31a8dd(0x10a)]=_0x596516,this['_threadCommentDataSource']=_0x4ea0a0,this[_0x31a8dd(0x107)]();}['_initDataSource'](){const _0x302966=_0x58a68b;this[_0x302966(0x10a)][_0x302966(0x148)]=this['_threadCommentDataSource'],this[_0x302966(0x10a)][_0x302966(0xff)]=!0x1;}};f=te([M(0x0,_0x2b003d),M(0x1,_0x31afa8(S))],f);var se=Object[_0x58a68b(0x14a)],oe=Object[_0x58a68b(0x151)],ne=(_0x20ebda,_0x408eec,_0x3b280c)=>_0x408eec in _0x20ebda?se(_0x20ebda,_0x408eec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b280c}):_0x20ebda[_0x408eec]=_0x3b280c,ie=(_0x3ad2bb,_0x3c8f46,_0x3ab232,_0x15b566)=>{const _0x4cddd8=_0x58a68b;for(var _0x208e18=_0x15b566>0x1?void 0x0:_0x15b566?oe(_0x3c8f46,_0x3ab232):_0x3c8f46,_0x56097a=_0x3ad2bb[_0x4cddd8(0xf2)]-0x1,_0x149a3f;_0x56097a>=0x0;_0x56097a--)(_0x149a3f=_0x3ad2bb[_0x56097a])&&(_0x208e18=_0x149a3f(_0x208e18)||_0x208e18);return _0x208e18;},N=(_0x385973,_0x43f4c3)=>(_0x24b45f,_0x363c80)=>_0x43f4c3(_0x24b45f,_0x363c80,_0x385973),$=(_0x559c13,_0x1f8e05,_0x11dc48)=>ne(_0x559c13,typeof _0x1f8e05!=_0x58a68b(0x120)?_0x1f8e05+'':_0x1f8e05,_0x11dc48);let g=class extends _0x5c853b{constructor(_0x3a9859=O,_0x5379bf,_0x3b5b7e){const _0x3705e6=_0x58a68b;super(),this[_0x3705e6(0xf9)]=_0x3a9859,this['_injector']=_0x5379bf,this[_0x3705e6(0x146)]=_0x3b5b7e;const {..._0x4bd947}=_0x5d724b({},O,this[_0x3705e6(0xf9)]);this[_0x3705e6(0x146)][_0x3705e6(0x111)](z,_0x4bd947);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x50fe06=>{const _0x448cd0=_0x26d7;this[_0x448cd0(0x100)][_0x448cd0(0x13e)](_0x50fe06);});}[_0x58a68b(0x12e)](){const _0x389f1c=_0x58a68b;this[_0x389f1c(0x100)][_0x389f1c(0x101)](f),this[_0x389f1c(0x100)][_0x389f1c(0x101)](_);}};$(g,'pluginName',W),$(g,_0x58a68b(0xf4),_0x4977eb['UNIVER_UNKNOWN']),g=ie([_0x2b7f20(_0x5439b7,_0xed0bc7,_0xe241d6),N(0x1,_0x31afa8(_0x2e8e75)),N(0x2,_0x5c4f8c)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x34024c=_0x5be3;(function(_0x5c622f,_0x52bf93){const _0x5c70d0=_0x5be3,_0x3249d4=_0x5c622f();while(!![]){try{const _0x52e758=-parseInt(_0x5c70d0(0x1d0))/0x1+parseInt(_0x5c70d0(0x1cb))/0x2*(-parseInt(_0x5c70d0(0x1d6))/0x3)+-parseInt(_0x5c70d0(0x1b8))/0x4+-parseInt(_0x5c70d0(0x1b3))/0x5+parseInt(_0x5c70d0(0x1dd))/0x6+-parseInt(_0x5c70d0(0x1cf))/0x7+parseInt(_0x5c70d0(0x19b))/0x8;if(_0x52e758===_0x52bf93)break;else _0x3249d4['push'](_0x3249d4['shift']());}catch(_0x1bb696){_0x3249d4['push'](_0x3249d4['shift']());}}}(_0x2c5a,0xb8804));import{CommentService as _0x1b5be1,CollaborationSessionService as _0x17f016,UniverCollaborationClientPlugin as _0x46d5fb}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xf589bd}from'@univerjs-pro/license';import{dayjs as _0x57f149,UserManagerService as _0x1feaec,Inject as _0x1641e7,Injector as _0x5130d8,Disposable as _0x577d5c,CustomRangeType as _0x48489b,UniverInstanceType as _0x1cfbda,DependentOn as _0x114dff,IConfigService as _0x10c05b,Plugin as _0x5ad258,merge as _0x239049}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59bd5d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa45dbf,IThreadCommentDataSourceService as _0x18ef7c}from'@univerjs/thread-comment';import{bufferTime as _0x2d9430}from'rxjs';import{HTTPService as _0x55367e}from'@univerjs/network';const W=_0x34024c(0x1d5);var I=(_0x3390e7=>(_0x3390e7[_0x3390e7[_0x34024c(0x1e5)]=0x0]=_0x34024c(0x1e5),_0x3390e7[_0x3390e7[_0x34024c(0x1ba)]=0x1]=_0x34024c(0x1ba),_0x3390e7[_0x3390e7[_0x34024c(0x1c9)]=-0x1]=_0x34024c(0x1c9),_0x3390e7))(I||{}),v=(_0x45831e=>(_0x45831e[_0x45831e[_0x34024c(0x1de)]=0x0]='Unknown',_0x45831e[_0x45831e[_0x34024c(0x19c)]=0x1]='Add',_0x45831e[_0x45831e['Reply']=0x2]=_0x34024c(0x1f8),_0x45831e[_0x45831e[_0x34024c(0x1c1)]=0x3]=_0x34024c(0x1c1),_0x45831e[_0x45831e['Delete']=0x4]='Delete',_0x45831e[_0x45831e[_0x34024c(0x1a2)]=0x5]=_0x34024c(0x1a2),_0x45831e[_0x45831e[_0x34024c(0x1c9)]=-0x1]=_0x34024c(0x1c9),_0x45831e))(v||{});const y=_0x5b355d=>_0x57f149(new Date(+_0x5b355d))['format'](_0x34024c(0x1a6)),B=async(_0x17c5a2,_0x16a130)=>{const _0x41c8aa=_0x34024c,_0x3f72e9=_0x17c5a2[_0x41c8aa(0x1d9)](_0x1feaec),_0xad84a0=_0x17c5a2[_0x41c8aa(0x1d9)](_0x55367e);_0x16a130[_0x41c8aa(0x1f6)](_0x4f5a43=>{const _0x4976e8=_0x41c8aa;_0x3f72e9[_0x4976e8(0x1f3)](_0x4f5a43)&&_0x16a130[_0x4976e8(0x200)](_0x4f5a43);}),_0x16a130[_0x41c8aa(0x1ec)]&&(await _0xad84a0[_0x41c8aa(0x1d9)](_0x41c8aa(0x1db),{'params':{'userIDs':[..._0x16a130]}}))[_0x41c8aa(0x1b9)][_0x41c8aa(0x1d4)][_0x41c8aa(0x1f6)](_0x842289=>{const _0x5e289f=_0x41c8aa;_0x842289&&_0x3f72e9[_0x5e289f(0x1b6)](_0x842289);});};var K=Object[_0x34024c(0x1cc)],V=(_0x5f3d30,_0x1c2704,_0x55bb9d,_0x5315d7)=>{const _0xf0b0c2=_0x34024c;for(var _0x275314=_0x5315d7>0x1?void 0x0:_0x5315d7?K(_0x1c2704,_0x55bb9d):_0x1c2704,_0x2dee09=_0x5f3d30[_0xf0b0c2(0x1aa)]-0x1,_0x56e849;_0x2dee09>=0x0;_0x2dee09--)(_0x56e849=_0x5f3d30[_0x2dee09])&&(_0x275314=_0x56e849(_0x275314)||_0x275314);return _0x275314;},p=(_0x57b42d,_0x31ecf3)=>(_0x24c347,_0x3cd345)=>_0x31ecf3(_0x24c347,_0x3cd345,_0x57b42d);let _=class extends _0x577d5c{constructor(_0x5ae4a0,_0x47ab27,_0x35fb7d,_0x4ceb57){const _0x17c7ed=_0x34024c;super(),this['_commentService']=_0x5ae4a0,this['_threadCommentModel']=_0x47ab27,this[_0x17c7ed(0x1c4)]=_0x35fb7d,this['_injector']=_0x4ceb57,this[_0x17c7ed(0x1f7)](),this[_0x17c7ed(0x1b0)]();}[_0x34024c(0x1b0)](){const _0x33b2bc=_0x34024c;this[_0x33b2bc(0x1fb)](this[_0x33b2bc(0x1dc)][_0x33b2bc(0x1e1)][_0x33b2bc(0x1fd)](_0x2d9430(0x10))['subscribe'](_0x3059da=>{const _0x185ce8=_0x33b2bc,_0x12c00a=new Set();_0x3059da[_0x185ce8(0x1f6)](_0x1cdf69=>{const _0x1a20fc=_0x185ce8;switch(_0x1cdf69['type']){case _0x1a20fc(0x1e8):{const _0x29690f=_0x1cdf69[_0x1a20fc(0x1ae)][_0x1a20fc(0x1bf)];_0x12c00a['add'](_0x29690f);break;}}}),B(this[_0x185ce8(0x1bd)],_0x12c00a);}));}['_init'](){const _0x493807=_0x34024c;this[_0x493807(0x1fb)](this['_commentService'][_0x493807(0x1e1)]['subscribe'](async _0x50ec9a=>{const _0x521f6a=_0x493807;var _0x3d1775,_0xfd8eac,_0x2c265f,_0x42e616;const _0x51f1a3=(_0x3d1775=this['_threadCommentModel']['getUnit'](_0x50ec9a[_0x521f6a(0x1a4)])[_0x521f6a(0x1e9)](_0x4e49a0=>_0x4e49a0[_0x521f6a(0x1f9)]===_0x50ec9a['threadId']))==null?void 0x0:_0x3d1775[_0x521f6a(0x1df)];if(!_0x51f1a3)return;const {unitId:_0x2e9807,subUnitId:_0x5da9ae}=_0x51f1a3;switch(_0x50ec9a[_0x521f6a(0x1f1)]&&this[_0x521f6a(0x1c4)][_0x521f6a(0x1b6)](_0x50ec9a[_0x521f6a(0x1f1)]),_0x50ec9a[_0x521f6a(0x1ea)]){case v[_0x521f6a(0x19c)]:break;case v[_0x521f6a(0x1f8)]:{this[_0x521f6a(0x1dc)][_0x521f6a(0x1e7)](_0x2e9807,_0x5da9ae,{'unitId':_0x2e9807,'subUnitId':_0x5da9ae,'ref':'','id':_0x50ec9a[_0x521f6a(0x1b1)],'dT':y(+_0x50ec9a['createTimestamp']),'threadId':_0x50ec9a[_0x521f6a(0x1f9)],'personId':(_0x2c265f=(_0xfd8eac=_0x50ec9a[_0x521f6a(0x1f1)])==null?void 0x0:_0xfd8eac[_0x521f6a(0x1d7)])!=null?_0x2c265f:_0x50ec9a[_0x521f6a(0x19d)],'text':JSON['parse'](_0x50ec9a['content']),'parentId':_0x51f1a3['id']});break;}case v[_0x521f6a(0x1ef)]:{const _0x28dc6e=this['_threadCommentModel'][_0x521f6a(0x1a0)](_0x2e9807,_0x5da9ae,_0x50ec9a['replyId']);_0x28dc6e&&_0x28dc6e[_0x521f6a(0x1b2)]&&this[_0x521f6a(0x1dc)][_0x521f6a(0x1fe)](_0x2e9807,_0x5da9ae,_0x50ec9a[_0x521f6a(0x1b1)]);break;}case v['Edit']:{this[_0x521f6a(0x1dc)][_0x521f6a(0x1c0)](_0x2e9807,_0x5da9ae,{'commentId':_0x50ec9a['replyId'],'text':JSON[_0x521f6a(0x1b5)](_0x50ec9a[_0x521f6a(0x1eb)])});break;}case v['Solve']:{const _0x525ad2=(_0x42e616=this['_threadCommentModel'][_0x521f6a(0x202)](_0x50ec9a[_0x521f6a(0x1a4)])[_0x521f6a(0x1e9)](_0x300f7e=>_0x300f7e[_0x521f6a(0x1f9)]===_0x50ec9a[_0x521f6a(0x1f9)]))==null?void 0x0:_0x42e616[_0x521f6a(0x1df)];_0x525ad2&&this[_0x521f6a(0x1dc)][_0x521f6a(0x1d1)](_0x2e9807,_0x5da9ae,_0x525ad2['id'],_0x50ec9a[_0x521f6a(0x1fa)]===I[_0x521f6a(0x1ba)]);break;}}}));}};function _0x5be3(_0x49aadc,_0x1175b0){_0x49aadc=_0x49aadc-0x19a;const _0x2c5a1f=_0x2c5a();let _0x5be38c=_0x2c5a1f[_0x49aadc];return _0x5be38c;}function _0x2c5a(){const _0x185e46=['_sessionService','pipe','deleteComment','rangeType','delete','_httpService','getUnit','values','29070976lzuoVY','Add','userId','setConfig','_threadCommentDataSource','getComment','pluginName','Solve','/add','unitId','getMemberID','YYYY/MM/DD\x20HH:mm','thread-comment-data-source.config','/solved','comment','length','/universer-api/comment/unit/','COMMENT','reply','payload','ref','_initUserSync','replyId','parentId','7023835WjPdcU','_threadCommentDataSourceService','parse','addUser','filter','1804348yOPkrL','body','Solved','_config','_configService','_injector','/edit','personId','updateComment','Edit','UNIVER_UNKNOWN','rangeId','_userService','listComments','replies','saveCommentToSnapshot','map','UNRECOGNIZED','stringify','51886vfHlRC','getOwnPropertyDescriptor','format','post','127785yQLyfq','205305ogzASL','resolveComment','createTimestamp','/delete','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','93hSZgMM','userID','requireSession','get','/list','/universer-api/user/list','_threadCommentModel','32946ZGHgJB','Unknown','root','symbol','commentUpdate$','syncUpdateMutationToColla','code','getCurrentUser','OpenOrReOpen','/reply','addComment','add','find','type','content','size','comments','error','Delete','_initDataSource','user','customRanges','getUser','resolved','onStarting','forEach','_init','Reply','threadId','solved','disposeWithMe'];_0x2c5a=function(){return _0x185e46;};return _0x2c5a();}_=V([p(0x0,_0x1641e7(_0x1b5be1)),p(0x1,_0x1641e7(_0xa45dbf)),p(0x2,_0x1641e7(_0x1feaec)),p(0x3,_0x1641e7(_0x5130d8))],_);const z=_0x34024c(0x1a7),O={};var k=Object[_0x34024c(0x1cc)],Q=(_0x359413,_0x5dc9a8,_0x23fd4a,_0x4cab43)=>{const _0x1d3788=_0x34024c;for(var _0x4ab8cc=_0x4cab43>0x1?void 0x0:_0x4cab43?k(_0x5dc9a8,_0x23fd4a):_0x5dc9a8,_0x47e372=_0x359413[_0x1d3788(0x1aa)]-0x1,_0x46e32c;_0x47e372>=0x0;_0x47e372--)(_0x46e32c=_0x359413[_0x47e372])&&(_0x4ab8cc=_0x46e32c(_0x4ab8cc)||_0x4ab8cc);return _0x4ab8cc;},b=(_0x1ce649,_0x3388af)=>(_0xf78e80,_0x465caa)=>_0x3388af(_0xf78e80,_0x465caa,_0x1ce649);function X(_0x3a1cd0,_0x13f02d){const _0x5c26bd=_0x34024c,_0x1b690d=_0x3a1cd0[_0x5c26bd(0x1c6)][0x0];return{..._0x13f02d,'id':_0x1b690d[_0x5c26bd(0x1b1)],'resolved':_0x3a1cd0[_0x5c26bd(0x1fa)]===0x1,'dT':y(_0x1b690d[_0x5c26bd(0x1d2)]),'personId':_0x1b690d['userId'],'threadId':_0x1b690d['threadId']};}function ee(_0x1856fa,_0x465b27,_0x264b51){const _0x334cee=_0x34024c;var _0xbb920e,_0x421e1b;if(((_0x421e1b=(_0xbb920e=_0x1856fa==null?void 0x0:_0x1856fa[_0x334cee(0x1c6)])==null?void 0x0:_0xbb920e['length'])!=null?_0x421e1b:0x0)>0x0){const _0x305c46=(_0xcf0558,_0x50c12f)=>({'id':_0xcf0558['replyId'],'threadId':_0xcf0558[_0x334cee(0x1f9)],'dT':y(_0xcf0558[_0x334cee(0x1d2)]),'personId':_0xcf0558['userId'],'resolved':_0x1856fa[_0x334cee(0x1fa)]===I[_0x334cee(0x1ba)],'unitId':_0x465b27,'subUnitId':_0x264b51,'text':JSON[_0x334cee(0x1b5)](_0xcf0558[_0x334cee(0x1eb)]),'parentId':_0x50c12f}),_0x583def=_0x305c46(_0x1856fa[_0x334cee(0x1c6)][0x0]);return{..._0x583def,'children':_0x1856fa[_0x334cee(0x1c6)]['slice'](0x1)[_0x334cee(0x1c8)](_0x55d94c=>_0x305c46(_0x55d94c,_0x583def['id']))};}return null;}let S=class{constructor(_0x1e804f,_0x356f43,_0x1bcccc){const _0x2adbc2=_0x34024c;this[_0x2adbc2(0x201)]=_0x1e804f,this['_userService']=_0x356f43,this[_0x2adbc2(0x1fc)]=_0x1bcccc;}async[_0x34024c(0x1e7)](_0x2088cc){const _0x2a1cb5=_0x34024c;var _0x2f1687,_0x1aee98;const {parentId:_0x3ef606,unitId:_0xdccd3e,text:_0x241f43,threadId:_0x539130}=_0x2088cc,_0x10b8e8=(_0x1aee98=(_0x2f1687=_0x241f43[_0x2a1cb5(0x1f2)])==null?void 0x0:_0x2f1687[_0x2a1cb5(0x1b7)](_0x588708=>_0x588708[_0x2a1cb5(0x1ff)]===_0x48489b[_0x2a1cb5(0x1ac)])[_0x2a1cb5(0x1c8)](_0x3f6654=>_0x3f6654[_0x2a1cb5(0x1c3)]))!=null?_0x1aee98:[],_0x5367b7=JSON[_0x2a1cb5(0x1ca)](_0x241f43),_0x5246c7=(await this[_0x2a1cb5(0x1fc)][_0x2a1cb5(0x1d8)](_0xdccd3e))[_0x2a1cb5(0x1a5)]();if(_0x3ef606){const _0x37e11b={'memberId':_0x5246c7,'unitId':_0xdccd3e,'content':_0x5367b7,'mention':_0x10b8e8,'threadId':_0x539130},_0x1b57ab=(await this[_0x2a1cb5(0x201)][_0x2a1cb5(0x1ce)](_0x2a1cb5(0x1ab)+_0xdccd3e+_0x2a1cb5(0x1e6),{'body':_0x37e11b}))[_0x2a1cb5(0x1b9)][_0x2a1cb5(0x1ad)];return{..._0x2088cc,'id':_0x1b57ab[_0x2a1cb5(0x1b1)],'dT':_0x57f149(+_0x1b57ab[_0x2a1cb5(0x1d2)])[_0x2a1cb5(0x1cd)](_0x2a1cb5(0x1a6)),'personId':_0x1b57ab[_0x2a1cb5(0x19d)]};}else{const _0x398d98={'memberId':_0x5246c7,'unitId':_0xdccd3e,'content':_0x5367b7,'mention':_0x10b8e8},_0x3ee03e=await this[_0x2a1cb5(0x201)][_0x2a1cb5(0x1ce)](_0x2a1cb5(0x1ab)+_0xdccd3e+_0x2a1cb5(0x1a3),{'body':_0x398d98});return X(_0x3ee03e[_0x2a1cb5(0x1b9)][_0x2a1cb5(0x1a9)],_0x2088cc);}}async['updateComment'](_0x5ea9b0){const _0x309747=_0x34024c;var _0x5a7bb0,_0x549720;const {text:_0x550b5c,unitId:_0x8ebd09}=_0x5ea9b0,_0xc3b6df=(_0x549720=(_0x5a7bb0=_0x550b5c['customRanges'])==null?void 0x0:_0x5a7bb0['filter'](_0x10880e=>_0x10880e[_0x309747(0x1ff)]===_0x48489b[_0x309747(0x1ac)])['map'](_0xfaffb7=>_0xfaffb7[_0x309747(0x1c3)]))!=null?_0x549720:[],_0x2df98d=JSON['stringify'](_0x550b5c),_0x5b5b47=_0x5ea9b0[_0x309747(0x1f9)],_0x223063=_0x5ea9b0['id'],_0x255e5f={'memberId':(await this[_0x309747(0x1fc)]['requireSession'](_0x8ebd09))[_0x309747(0x1a5)](),'unitId':_0x8ebd09,'threadId':_0x5b5b47,'mention':_0xc3b6df,'content':_0x2df98d,'replyId':_0x223063},_0x2a07e3=await this['_httpService'][_0x309747(0x1ce)]('/universer-api/comment/unit/'+_0x8ebd09+_0x309747(0x1be),{'body':_0x255e5f});return!_0x2a07e3['body'][_0x309747(0x1ee)]||_0x2a07e3[_0x309747(0x1b9)][_0x309747(0x1ee)][_0x309747(0x1e3)]===0x1;}async[_0x34024c(0x1d1)](_0x10a7ea){const _0x48a59c=_0x34024c,{unitId:_0x3ebd04}=_0x10a7ea,_0x353576=_0x10a7ea[_0x48a59c(0x1f9)],_0x3d54de={'memberId':this[_0x48a59c(0x1c4)][_0x48a59c(0x1e4)]()['userID'],'unitId':_0x3ebd04,'threadId':_0x353576,'solved':_0x10a7ea[_0x48a59c(0x1f4)]?I[_0x48a59c(0x1ba)]:I[_0x48a59c(0x1e5)]},_0x10164b=await this[_0x48a59c(0x201)]['post'](_0x48a59c(0x1ab)+_0x3ebd04+_0x48a59c(0x1a8),{'body':_0x3d54de});return!_0x10164b['body'][_0x48a59c(0x1ee)]||_0x10164b[_0x48a59c(0x1b9)][_0x48a59c(0x1ee)]['code']===0x1;}async['deleteComment'](_0x539f6e,_0x4f9213,_0x52b5a3,_0x36a12f){const _0x1e7a30=_0x34024c,_0x26732b={'memberId':(await this[_0x1e7a30(0x1fc)][_0x1e7a30(0x1d8)](_0x539f6e))[_0x1e7a30(0x1a5)](),'threadId':_0x52b5a3,'replyId':_0x36a12f,'unitId':_0x539f6e},_0x43d90f=await this[_0x1e7a30(0x201)][_0x1e7a30(0x1ce)](_0x1e7a30(0x1ab)+_0x539f6e+_0x1e7a30(0x1d3),{'body':_0x26732b});return!_0x43d90f[_0x1e7a30(0x1b9)][_0x1e7a30(0x1ee)]||_0x43d90f[_0x1e7a30(0x1b9)][_0x1e7a30(0x1ee)][_0x1e7a30(0x1e3)]===0x1;}async[_0x34024c(0x1c5)](_0x115913,_0x483dc1,_0x522ecf){const _0x4413d0=_0x34024c,_0x323056={'unitId':_0x115913,'threadId':_0x522ecf},_0x102b59=await this[_0x4413d0(0x201)][_0x4413d0(0x1ce)](_0x4413d0(0x1ab)+_0x115913+_0x4413d0(0x1da),{'body':_0x323056}),_0x3c6f47=_0x522ecf['map'](_0x2ed0e9=>ee(_0x102b59[_0x4413d0(0x1b9)][_0x4413d0(0x1ed)][_0x2ed0e9],_0x115913,_0x483dc1))[_0x4413d0(0x1b7)](Boolean);return Object[_0x4413d0(0x19a)](_0x102b59[_0x4413d0(0x1b9)]['users'])[_0x4413d0(0x1f6)](_0x2ce036=>{const _0x41efa9=_0x4413d0;this[_0x41efa9(0x1c4)][_0x41efa9(0x1b6)](_0x2ce036);}),_0x3c6f47;}[_0x34024c(0x1c7)](_0x459c2e){const _0x501831=_0x34024c;return{'id':_0x459c2e['id'],'threadId':_0x459c2e[_0x501831(0x1f9)],'ref':_0x459c2e[_0x501831(0x1af)]};}};S=Q([b(0x0,_0x1641e7(_0x55367e)),b(0x1,_0x1641e7(_0x1feaec)),b(0x2,_0x1641e7(_0x17f016))],S);var re=Object[_0x34024c(0x1cc)],te=(_0x3e4e4f,_0x99c6cf,_0x362df6,_0xb328f4)=>{const _0x2bdfeb=_0x34024c;for(var _0x40f84c=_0xb328f4>0x1?void 0x0:_0xb328f4?re(_0x99c6cf,_0x362df6):_0x99c6cf,_0x400bf7=_0x3e4e4f[_0x2bdfeb(0x1aa)]-0x1,_0x50e93b;_0x400bf7>=0x0;_0x400bf7--)(_0x50e93b=_0x3e4e4f[_0x400bf7])&&(_0x40f84c=_0x50e93b(_0x40f84c)||_0x40f84c);return _0x40f84c;},M=(_0x1f6019,_0x27e34f)=>(_0x5f2b6c,_0x4377d3)=>_0x27e34f(_0x5f2b6c,_0x4377d3,_0x1f6019);let f=class extends _0x577d5c{constructor(_0x3d56b7,_0x4b8689){const _0xea98e3=_0x34024c;super(),this['_threadCommentDataSourceService']=_0x3d56b7,this[_0xea98e3(0x19f)]=_0x4b8689,this['_initDataSource']();}[_0x34024c(0x1f0)](){const _0x528918=_0x34024c;this[_0x528918(0x1b4)]['dataSource']=this[_0x528918(0x19f)],this['_threadCommentDataSourceService'][_0x528918(0x1e2)]=!0x1;}};f=te([M(0x0,_0x18ef7c),M(0x1,_0x1641e7(S))],f);var se=Object['defineProperty'],oe=Object[_0x34024c(0x1cc)],ne=(_0xf90f18,_0x5c2e80,_0x419594)=>_0x5c2e80 in _0xf90f18?se(_0xf90f18,_0x5c2e80,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x419594}):_0xf90f18[_0x5c2e80]=_0x419594,ie=(_0x2e92bc,_0x36598e,_0x59db40,_0x11915c)=>{for(var _0x4d65f7=_0x11915c>0x1?void 0x0:_0x11915c?oe(_0x36598e,_0x59db40):_0x36598e,_0x76265b=_0x2e92bc['length']-0x1,_0x33d925;_0x76265b>=0x0;_0x76265b--)(_0x33d925=_0x2e92bc[_0x76265b])&&(_0x4d65f7=_0x33d925(_0x4d65f7)||_0x4d65f7);return _0x4d65f7;},N=(_0x2970a4,_0x49b1f0)=>(_0xc86579,_0x2b6f40)=>_0x49b1f0(_0xc86579,_0x2b6f40,_0x2970a4),$=(_0x5eb057,_0x4254f3,_0x4fd376)=>ne(_0x5eb057,typeof _0x4254f3!=_0x34024c(0x1e0)?_0x4254f3+'':_0x4254f3,_0x4fd376);let g=class extends _0x5ad258{constructor(_0x1692ad=O,_0x1058e8,_0x33ea62){const _0x9aa18d=_0x34024c;super(),this['_config']=_0x1692ad,this[_0x9aa18d(0x1bd)]=_0x1058e8,this[_0x9aa18d(0x1bc)]=_0x33ea62;const {..._0x4da21d}=_0x239049({},O,this[_0x9aa18d(0x1bb)]);this[_0x9aa18d(0x1bc)][_0x9aa18d(0x19e)](z,_0x4da21d);}[_0x34024c(0x1f5)](){const _0x354bb4=_0x34024c;[[S],[f],[_]][_0x354bb4(0x1f6)](_0x3322a9=>{const _0x557c5a=_0x354bb4;this[_0x557c5a(0x1bd)][_0x557c5a(0x1e8)](_0x3322a9);});}['onReady'](){const _0x58d2b8=_0x34024c;this[_0x58d2b8(0x1bd)][_0x58d2b8(0x1d9)](f),this[_0x58d2b8(0x1bd)][_0x58d2b8(0x1d9)](_);}};$(g,_0x34024c(0x1a1),W),$(g,_0x34024c(0x1ea),_0x1cfbda[_0x34024c(0x1c2)]),g=ie([_0x114dff(_0x59bd5d,_0x46d5fb,_0xf589bd),N(0x1,_0x1641e7(_0x5130d8)),N(0x2,_0x10c05b)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x58a68b=_0x26d7;function _0x2d31(){const _0x1441b6=['YYYY/MM/DD\x20HH:mm','9rJLwcB','/reply','resolveComment','_sessionService','personId','getOwnPropertyDescriptor','2523165UPqAFW','4pyhItl','addUser','ref','rangeType','subscribe','format','_threadCommentModel','OpenOrReOpen','length','values','type','code','/universer-api/user/list','filter','7340712XRboqF','_config','12VQvIui','parentId','listComments','post','Reply','syncUpdateMutationToColla','_injector','get','666919vMqcnm','replyId','/add','Delete','pipe','_initDataSource','1763712yuhxwL','forEach','_threadCommentDataSourceService','Solve','getUnit','/delete','map','_init','/universer-api/comment/unit/','setConfig','40826577MVizQL','/list','getCurrentUser','424eVRNXy','getUser','_commentService','updateComment','_userService','requireSession','/edit','customRanges','getMemberID','disposeWithMe','Edit','symbol','Unknown','content','users','_httpService','unitId','replies','slice','thread-comment-data-source.config','commentUpdate$','userID','stringify','184408pULYsl','COMMENT','onReady','12Mmmdmx','deleteComment','error','body','size','parse','comments','getComment','createTimestamp','UNRECOGNIZED','/solved','_initUserSync','find','user','Solved','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','4330150umnZfM','rangeId','userId','saveCommentToSnapshot','Add','solved','_configService','threadId','dataSource','root','defineProperty'];_0x2d31=function(){return _0x1441b6;};return _0x2d31();}(function(_0x362551,_0x49e7e7){const _0x2f7fa2=_0x26d7,_0x1fe2fa=_0x362551();while(!![]){try{const _0x441201=-parseInt(_0x2f7fa2(0x102))/0x1*(parseInt(_0x2f7fa2(0xea))/0x2)+parseInt(_0x2f7fa2(0x108))/0x3+-parseInt(_0x2f7fa2(0xfa))/0x4*(parseInt(_0x2f7fa2(0x152))/0x5)+parseInt(_0x2f7fa2(0xf8))/0x6+-parseInt(_0x2f7fa2(0x12c))/0x7*(parseInt(_0x2f7fa2(0x115))/0x8)+parseInt(_0x2f7fa2(0x14c))/0x9*(-parseInt(_0x2f7fa2(0x140))/0xa)+-parseInt(_0x2f7fa2(0x112))/0xb*(-parseInt(_0x2f7fa2(0x12f))/0xc);if(_0x441201===_0x49e7e7)break;else _0x1fe2fa['push'](_0x1fe2fa['shift']());}catch(_0x2d8da3){_0x1fe2fa['push'](_0x1fe2fa['shift']());}}}(_0x2d31,0xce837));import{CommentService as _0xbeb1bb,CollaborationSessionService as _0x5276ff,UniverCollaborationClientPlugin as _0xed0bc7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xe241d6}from'@univerjs-pro/license';import{dayjs as _0x54f05b,UserManagerService as _0x1fa2aa,Inject as _0x31afa8,Injector as _0x2e8e75,Disposable as _0x1e5fc7,CustomRangeType as _0x6d9c98,UniverInstanceType as _0x4977eb,DependentOn as _0x2b7f20,IConfigService as _0x5c4f8c,Plugin as _0x5c853b,merge as _0x5d724b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5439b7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43de76,IThreadCommentDataSourceService as _0x2b003d}from'@univerjs/thread-comment';import{bufferTime as _0x1043f3}from'rxjs';import{HTTPService as _0x38d411}from'@univerjs/network';const W=_0x58a68b(0x13f);var I=(_0x27d0f1=>(_0x27d0f1[_0x27d0f1[_0x58a68b(0xf1)]=0x0]=_0x58a68b(0xf1),_0x27d0f1[_0x27d0f1[_0x58a68b(0x13d)]=0x1]=_0x58a68b(0x13d),_0x27d0f1[_0x27d0f1['UNRECOGNIZED']=-0x1]=_0x58a68b(0x138),_0x27d0f1))(I||{}),v=(_0x9e673a=>(_0x9e673a[_0x9e673a[_0x58a68b(0x121)]=0x0]=_0x58a68b(0x121),_0x9e673a[_0x9e673a['Add']=0x1]=_0x58a68b(0x144),_0x9e673a[_0x9e673a[_0x58a68b(0xfe)]=0x2]=_0x58a68b(0xfe),_0x9e673a[_0x9e673a[_0x58a68b(0x11f)]=0x3]=_0x58a68b(0x11f),_0x9e673a[_0x9e673a[_0x58a68b(0x105)]=0x4]=_0x58a68b(0x105),_0x9e673a[_0x9e673a['Solve']=0x5]='Solve',_0x9e673a[_0x9e673a['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x9e673a))(v||{});const y=_0x2a0e79=>_0x54f05b(new Date(+_0x2a0e79))[_0x58a68b(0xef)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x91521f,_0x4cd23c)=>{const _0x62f67e=_0x58a68b,_0xd593ef=_0x91521f[_0x62f67e(0x101)](_0x1fa2aa),_0x2a0839=_0x91521f[_0x62f67e(0x101)](_0x38d411);_0x4cd23c[_0x62f67e(0x109)](_0x1c8691=>{const _0x54b365=_0x62f67e;_0xd593ef[_0x54b365(0x116)](_0x1c8691)&&_0x4cd23c['delete'](_0x1c8691);}),_0x4cd23c[_0x62f67e(0x133)]&&(await _0x2a0839[_0x62f67e(0x101)](_0x62f67e(0xf6),{'params':{'userIDs':[..._0x4cd23c]}}))[_0x62f67e(0x132)][_0x62f67e(0x123)][_0x62f67e(0x109)](_0x25817d=>{_0x25817d&&_0xd593ef['addUser'](_0x25817d);});};var K=Object[_0x58a68b(0x151)],V=(_0xe91c30,_0x131a7f,_0x48f4ac,_0x2151ea)=>{const _0x286b9d=_0x58a68b;for(var _0x39e349=_0x2151ea>0x1?void 0x0:_0x2151ea?K(_0x131a7f,_0x48f4ac):_0x131a7f,_0x8b7a06=_0xe91c30[_0x286b9d(0xf2)]-0x1,_0x116165;_0x8b7a06>=0x0;_0x8b7a06--)(_0x116165=_0xe91c30[_0x8b7a06])&&(_0x39e349=_0x116165(_0x39e349)||_0x39e349);return _0x39e349;},p=(_0x30c89c,_0xd8e8c0)=>(_0x3e0028,_0x1890b4)=>_0xd8e8c0(_0x3e0028,_0x1890b4,_0x30c89c);let _=class extends _0x1e5fc7{constructor(_0x50597e,_0x25c679,_0x3d3c03,_0x3d0cf6){const _0x13a76=_0x58a68b;super(),this[_0x13a76(0x117)]=_0x50597e,this[_0x13a76(0xf0)]=_0x25c679,this[_0x13a76(0x119)]=_0x3d3c03,this[_0x13a76(0x100)]=_0x3d0cf6,this[_0x13a76(0x10f)](),this['_initUserSync']();}[_0x58a68b(0x13a)](){const _0x931c51=_0x58a68b;this[_0x931c51(0x11e)](this[_0x931c51(0xf0)][_0x931c51(0x129)][_0x931c51(0x106)](_0x1043f3(0x10))[_0x931c51(0xee)](_0x5307c0=>{const _0x462b60=_0x931c51,_0x6bf5cb=new Set();_0x5307c0[_0x462b60(0x109)](_0x263a05=>{const _0x1d95c5=_0x462b60;switch(_0x263a05[_0x1d95c5(0xf4)]){case'add':{const _0x1023bc=_0x263a05['payload'][_0x1d95c5(0x150)];_0x6bf5cb[_0x1d95c5(0x13e)](_0x1023bc);break;}}}),B(this[_0x462b60(0x100)],_0x6bf5cb);}));}['_init'](){const _0x48c230=_0x58a68b;this['disposeWithMe'](this['_commentService'][_0x48c230(0x129)][_0x48c230(0xee)](async _0x2e0501=>{const _0x4bec93=_0x48c230;var _0x2d9dd0,_0x1eb95a,_0xcdb3eb,_0x215dfe;const _0x2cc35a=(_0x2d9dd0=this['_threadCommentModel'][_0x4bec93(0x10c)](_0x2e0501[_0x4bec93(0x125)])[_0x4bec93(0x13b)](_0x241e74=>_0x241e74['threadId']===_0x2e0501['threadId']))==null?void 0x0:_0x2d9dd0[_0x4bec93(0x149)];if(!_0x2cc35a)return;const {unitId:_0x4f3178,subUnitId:_0x16dcfc}=_0x2cc35a;switch(_0x2e0501[_0x4bec93(0x13c)]&&this['_userService'][_0x4bec93(0xeb)](_0x2e0501[_0x4bec93(0x13c)]),_0x2e0501['type']){case v[_0x4bec93(0x144)]:break;case v[_0x4bec93(0xfe)]:{this[_0x4bec93(0xf0)]['addComment'](_0x4f3178,_0x16dcfc,{'unitId':_0x4f3178,'subUnitId':_0x16dcfc,'ref':'','id':_0x2e0501[_0x4bec93(0x103)],'dT':y(+_0x2e0501['createTimestamp']),'threadId':_0x2e0501['threadId'],'personId':(_0xcdb3eb=(_0x1eb95a=_0x2e0501['user'])==null?void 0x0:_0x1eb95a[_0x4bec93(0x12a)])!=null?_0xcdb3eb:_0x2e0501[_0x4bec93(0x142)],'text':JSON[_0x4bec93(0x134)](_0x2e0501[_0x4bec93(0x122)]),'parentId':_0x2cc35a['id']});break;}case v[_0x4bec93(0x105)]:{const _0x340683=this['_threadCommentModel'][_0x4bec93(0x136)](_0x4f3178,_0x16dcfc,_0x2e0501[_0x4bec93(0x103)]);_0x340683&&_0x340683[_0x4bec93(0xfb)]&&this[_0x4bec93(0xf0)]['deleteComment'](_0x4f3178,_0x16dcfc,_0x2e0501[_0x4bec93(0x103)]);break;}case v[_0x4bec93(0x11f)]:{this[_0x4bec93(0xf0)][_0x4bec93(0x118)](_0x4f3178,_0x16dcfc,{'commentId':_0x2e0501[_0x4bec93(0x103)],'text':JSON[_0x4bec93(0x134)](_0x2e0501[_0x4bec93(0x122)])});break;}case v[_0x4bec93(0x10b)]:{const _0x51963e=(_0x215dfe=this[_0x4bec93(0xf0)][_0x4bec93(0x10c)](_0x2e0501['unitId'])['find'](_0x7495f3=>_0x7495f3[_0x4bec93(0x147)]===_0x2e0501[_0x4bec93(0x147)]))==null?void 0x0:_0x215dfe[_0x4bec93(0x149)];_0x51963e&&this[_0x4bec93(0xf0)][_0x4bec93(0x14e)](_0x4f3178,_0x16dcfc,_0x51963e['id'],_0x2e0501[_0x4bec93(0x145)]===I[_0x4bec93(0x13d)]);break;}}}));}};function _0x26d7(_0x446de5,_0x5070cc){_0x446de5=_0x446de5-0xea;const _0x2d3140=_0x2d31();let _0x26d731=_0x2d3140[_0x446de5];return _0x26d731;}_=V([p(0x0,_0x31afa8(_0xbeb1bb)),p(0x1,_0x31afa8(_0x43de76)),p(0x2,_0x31afa8(_0x1fa2aa)),p(0x3,_0x31afa8(_0x2e8e75))],_);const z=_0x58a68b(0x128),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1748e6,_0x46fc92,_0x1bf901,_0x4bacd8)=>{const _0x4f624f=_0x58a68b;for(var _0x1d693f=_0x4bacd8>0x1?void 0x0:_0x4bacd8?k(_0x46fc92,_0x1bf901):_0x46fc92,_0x3de32d=_0x1748e6[_0x4f624f(0xf2)]-0x1,_0x68820b;_0x3de32d>=0x0;_0x3de32d--)(_0x68820b=_0x1748e6[_0x3de32d])&&(_0x1d693f=_0x68820b(_0x1d693f)||_0x1d693f);return _0x1d693f;},b=(_0x4c49d6,_0x48f644)=>(_0x32de26,_0x27e4d0)=>_0x48f644(_0x32de26,_0x27e4d0,_0x4c49d6);function X(_0x4ec965,_0x1baf93){const _0x3b6f04=_0x58a68b,_0x34f0fa=_0x4ec965[_0x3b6f04(0x126)][0x0];return{..._0x1baf93,'id':_0x34f0fa[_0x3b6f04(0x103)],'resolved':_0x4ec965[_0x3b6f04(0x145)]===0x1,'dT':y(_0x34f0fa[_0x3b6f04(0x137)]),'personId':_0x34f0fa[_0x3b6f04(0x142)],'threadId':_0x34f0fa[_0x3b6f04(0x147)]};}function ee(_0x52026f,_0x1f563d,_0x1cf0e7){const _0x295a88=_0x58a68b;var _0xca8548,_0xcfb643;if(((_0xcfb643=(_0xca8548=_0x52026f==null?void 0x0:_0x52026f[_0x295a88(0x126)])==null?void 0x0:_0xca8548[_0x295a88(0xf2)])!=null?_0xcfb643:0x0)>0x0){const _0x58d58=(_0x23eb0b,_0x106109)=>({'id':_0x23eb0b['replyId'],'threadId':_0x23eb0b[_0x295a88(0x147)],'dT':y(_0x23eb0b['createTimestamp']),'personId':_0x23eb0b[_0x295a88(0x142)],'resolved':_0x52026f[_0x295a88(0x145)]===I[_0x295a88(0x13d)],'unitId':_0x1f563d,'subUnitId':_0x1cf0e7,'text':JSON[_0x295a88(0x134)](_0x23eb0b[_0x295a88(0x122)]),'parentId':_0x106109}),_0x4d34a8=_0x58d58(_0x52026f[_0x295a88(0x126)][0x0]);return{..._0x4d34a8,'children':_0x52026f[_0x295a88(0x126)][_0x295a88(0x127)](0x1)[_0x295a88(0x10e)](_0x54dbe8=>_0x58d58(_0x54dbe8,_0x4d34a8['id']))};}return null;}let S=class{constructor(_0x4907ce,_0x57e37a,_0x482e31){const _0x3f5431=_0x58a68b;this[_0x3f5431(0x124)]=_0x4907ce,this[_0x3f5431(0x119)]=_0x57e37a,this[_0x3f5431(0x14f)]=_0x482e31;}async['addComment'](_0xb58086){const _0x246e4b=_0x58a68b;var _0x51c686,_0x5b03db;const {parentId:_0x1e43a5,unitId:_0x2478f4,text:_0x3bcff4,threadId:_0x14e78c}=_0xb58086,_0x36803d=(_0x5b03db=(_0x51c686=_0x3bcff4['customRanges'])==null?void 0x0:_0x51c686[_0x246e4b(0xf7)](_0x5d07fe=>_0x5d07fe[_0x246e4b(0xed)]===_0x6d9c98['COMMENT'])[_0x246e4b(0x10e)](_0x9d6501=>_0x9d6501[_0x246e4b(0x141)]))!=null?_0x5b03db:[],_0x356fde=JSON[_0x246e4b(0x12b)](_0x3bcff4),_0x5cf5fd=(await this['_sessionService'][_0x246e4b(0x11a)](_0x2478f4))['getMemberID']();if(_0x1e43a5){const _0x11fff2={'memberId':_0x5cf5fd,'unitId':_0x2478f4,'content':_0x356fde,'mention':_0x36803d,'threadId':_0x14e78c},_0x964969=(await this[_0x246e4b(0x124)][_0x246e4b(0xfd)](_0x246e4b(0x110)+_0x2478f4+_0x246e4b(0x14d),{'body':_0x11fff2}))[_0x246e4b(0x132)]['reply'];return{..._0xb58086,'id':_0x964969['replyId'],'dT':_0x54f05b(+_0x964969[_0x246e4b(0x137)])[_0x246e4b(0xef)](_0x246e4b(0x14b)),'personId':_0x964969[_0x246e4b(0x142)]};}else{const _0x32020c={'memberId':_0x5cf5fd,'unitId':_0x2478f4,'content':_0x356fde,'mention':_0x36803d},_0x27fdea=await this[_0x246e4b(0x124)][_0x246e4b(0xfd)](_0x246e4b(0x110)+_0x2478f4+_0x246e4b(0x104),{'body':_0x32020c});return X(_0x27fdea[_0x246e4b(0x132)]['comment'],_0xb58086);}}async[_0x58a68b(0x118)](_0x44803c){const _0x203913=_0x58a68b;var _0x216b55,_0x441829;const {text:_0x528489,unitId:_0x23689a}=_0x44803c,_0x2ca6f6=(_0x441829=(_0x216b55=_0x528489[_0x203913(0x11c)])==null?void 0x0:_0x216b55[_0x203913(0xf7)](_0x17d955=>_0x17d955['rangeType']===_0x6d9c98[_0x203913(0x12d)])[_0x203913(0x10e)](_0x3f16cb=>_0x3f16cb['rangeId']))!=null?_0x441829:[],_0x25dd1b=JSON[_0x203913(0x12b)](_0x528489),_0x2a65c8=_0x44803c['threadId'],_0x11cacb=_0x44803c['id'],_0x13d144={'memberId':(await this[_0x203913(0x14f)][_0x203913(0x11a)](_0x23689a))['getMemberID'](),'unitId':_0x23689a,'threadId':_0x2a65c8,'mention':_0x2ca6f6,'content':_0x25dd1b,'replyId':_0x11cacb},_0x24d716=await this['_httpService'][_0x203913(0xfd)](_0x203913(0x110)+_0x23689a+_0x203913(0x11b),{'body':_0x13d144});return!_0x24d716[_0x203913(0x132)][_0x203913(0x131)]||_0x24d716[_0x203913(0x132)][_0x203913(0x131)]['code']===0x1;}async['resolveComment'](_0x5083e3){const _0x476103=_0x58a68b,{unitId:_0x2119c6}=_0x5083e3,_0xabddfb=_0x5083e3[_0x476103(0x147)],_0x2fce38={'memberId':this[_0x476103(0x119)][_0x476103(0x114)]()[_0x476103(0x12a)],'unitId':_0x2119c6,'threadId':_0xabddfb,'solved':_0x5083e3['resolved']?I['Solved']:I[_0x476103(0xf1)]},_0x2bb6a9=await this['_httpService'][_0x476103(0xfd)]('/universer-api/comment/unit/'+_0x2119c6+_0x476103(0x139),{'body':_0x2fce38});return!_0x2bb6a9[_0x476103(0x132)][_0x476103(0x131)]||_0x2bb6a9[_0x476103(0x132)][_0x476103(0x131)][_0x476103(0xf5)]===0x1;}async[_0x58a68b(0x130)](_0x2a19fc,_0x280d60,_0x5ce1ca,_0xfc1e8e){const _0x47c9cc=_0x58a68b,_0x30fcb6={'memberId':(await this[_0x47c9cc(0x14f)][_0x47c9cc(0x11a)](_0x2a19fc))[_0x47c9cc(0x11d)](),'threadId':_0x5ce1ca,'replyId':_0xfc1e8e,'unitId':_0x2a19fc},_0x969f6c=await this[_0x47c9cc(0x124)][_0x47c9cc(0xfd)](_0x47c9cc(0x110)+_0x2a19fc+_0x47c9cc(0x10d),{'body':_0x30fcb6});return!_0x969f6c[_0x47c9cc(0x132)]['error']||_0x969f6c[_0x47c9cc(0x132)]['error']['code']===0x1;}async[_0x58a68b(0xfc)](_0x3bcf7f,_0x2b6708,_0x580f25){const _0x254ad1=_0x58a68b,_0x1283bc={'unitId':_0x3bcf7f,'threadId':_0x580f25},_0x233066=await this['_httpService'][_0x254ad1(0xfd)](_0x254ad1(0x110)+_0x3bcf7f+_0x254ad1(0x113),{'body':_0x1283bc}),_0x28b951=_0x580f25[_0x254ad1(0x10e)](_0x304381=>ee(_0x233066[_0x254ad1(0x132)][_0x254ad1(0x135)][_0x304381],_0x3bcf7f,_0x2b6708))[_0x254ad1(0xf7)](Boolean);return Object[_0x254ad1(0xf3)](_0x233066[_0x254ad1(0x132)]['users'])[_0x254ad1(0x109)](_0x30ffd1=>{const _0x4f32f7=_0x254ad1;this[_0x4f32f7(0x119)][_0x4f32f7(0xeb)](_0x30ffd1);}),_0x28b951;}[_0x58a68b(0x143)](_0x5b0899){const _0x364744=_0x58a68b;return{'id':_0x5b0899['id'],'threadId':_0x5b0899[_0x364744(0x147)],'ref':_0x5b0899[_0x364744(0xec)]};}};S=Q([b(0x0,_0x31afa8(_0x38d411)),b(0x1,_0x31afa8(_0x1fa2aa)),b(0x2,_0x31afa8(_0x5276ff))],S);var re=Object[_0x58a68b(0x151)],te=(_0x3e44da,_0x92b9a6,_0x2fc22e,_0x245311)=>{for(var _0x1dd1af=_0x245311>0x1?void 0x0:_0x245311?re(_0x92b9a6,_0x2fc22e):_0x92b9a6,_0x2e4f43=_0x3e44da['length']-0x1,_0x5e6338;_0x2e4f43>=0x0;_0x2e4f43--)(_0x5e6338=_0x3e44da[_0x2e4f43])&&(_0x1dd1af=_0x5e6338(_0x1dd1af)||_0x1dd1af);return _0x1dd1af;},M=(_0x20b435,_0xbce566)=>(_0x48a6c0,_0x4f42a5)=>_0xbce566(_0x48a6c0,_0x4f42a5,_0x20b435);let f=class extends _0x1e5fc7{constructor(_0x596516,_0x4ea0a0){const _0x31a8dd=_0x58a68b;super(),this[_0x31a8dd(0x10a)]=_0x596516,this['_threadCommentDataSource']=_0x4ea0a0,this[_0x31a8dd(0x107)]();}['_initDataSource'](){const _0x302966=_0x58a68b;this[_0x302966(0x10a)][_0x302966(0x148)]=this['_threadCommentDataSource'],this[_0x302966(0x10a)][_0x302966(0xff)]=!0x1;}};f=te([M(0x0,_0x2b003d),M(0x1,_0x31afa8(S))],f);var se=Object[_0x58a68b(0x14a)],oe=Object[_0x58a68b(0x151)],ne=(_0x20ebda,_0x408eec,_0x3b280c)=>_0x408eec in _0x20ebda?se(_0x20ebda,_0x408eec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b280c}):_0x20ebda[_0x408eec]=_0x3b280c,ie=(_0x3ad2bb,_0x3c8f46,_0x3ab232,_0x15b566)=>{const _0x4cddd8=_0x58a68b;for(var _0x208e18=_0x15b566>0x1?void 0x0:_0x15b566?oe(_0x3c8f46,_0x3ab232):_0x3c8f46,_0x56097a=_0x3ad2bb[_0x4cddd8(0xf2)]-0x1,_0x149a3f;_0x56097a>=0x0;_0x56097a--)(_0x149a3f=_0x3ad2bb[_0x56097a])&&(_0x208e18=_0x149a3f(_0x208e18)||_0x208e18);return _0x208e18;},N=(_0x385973,_0x43f4c3)=>(_0x24b45f,_0x363c80)=>_0x43f4c3(_0x24b45f,_0x363c80,_0x385973),$=(_0x559c13,_0x1f8e05,_0x11dc48)=>ne(_0x559c13,typeof _0x1f8e05!=_0x58a68b(0x120)?_0x1f8e05+'':_0x1f8e05,_0x11dc48);let g=class extends _0x5c853b{constructor(_0x3a9859=O,_0x5379bf,_0x3b5b7e){const _0x3705e6=_0x58a68b;super(),this[_0x3705e6(0xf9)]=_0x3a9859,this['_injector']=_0x5379bf,this[_0x3705e6(0x146)]=_0x3b5b7e;const {..._0x4bd947}=_0x5d724b({},O,this[_0x3705e6(0xf9)]);this[_0x3705e6(0x146)][_0x3705e6(0x111)](z,_0x4bd947);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x50fe06=>{const _0x448cd0=_0x26d7;this[_0x448cd0(0x100)][_0x448cd0(0x13e)](_0x50fe06);});}[_0x58a68b(0x12e)](){const _0x389f1c=_0x58a68b;this[_0x389f1c(0x100)][_0x389f1c(0x101)](f),this[_0x389f1c(0x100)][_0x389f1c(0x101)](_);}};$(g,'pluginName',W),$(g,_0x58a68b(0xf4),_0x4977eb['UNIVER_UNKNOWN']),g=ie([_0x2b7f20(_0x5439b7,_0xed0bc7,_0xe241d6),N(0x1,_0x31afa8(_0x2e8e75)),N(0x2,_0x5c4f8c)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x34024c=_0x5be3;(function(_0x5c622f,_0x52bf93){const _0x5c70d0=_0x5be3,_0x3249d4=_0x5c622f();while(!![]){try{const _0x52e758=-parseInt(_0x5c70d0(0x1d0))/0x1+parseInt(_0x5c70d0(0x1cb))/0x2*(-parseInt(_0x5c70d0(0x1d6))/0x3)+-parseInt(_0x5c70d0(0x1b8))/0x4+-parseInt(_0x5c70d0(0x1b3))/0x5+parseInt(_0x5c70d0(0x1dd))/0x6+-parseInt(_0x5c70d0(0x1cf))/0x7+parseInt(_0x5c70d0(0x19b))/0x8;if(_0x52e758===_0x52bf93)break;else _0x3249d4['push'](_0x3249d4['shift']());}catch(_0x1bb696){_0x3249d4['push'](_0x3249d4['shift']());}}}(_0x2c5a,0xb8804));import{CommentService as _0x1b5be1,CollaborationSessionService as _0x17f016,UniverCollaborationClientPlugin as _0x46d5fb}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xf589bd}from'@univerjs-pro/license';import{dayjs as _0x57f149,UserManagerService as _0x1feaec,Inject as _0x1641e7,Injector as _0x5130d8,Disposable as _0x577d5c,CustomRangeType as _0x48489b,UniverInstanceType as _0x1cfbda,DependentOn as _0x114dff,IConfigService as _0x10c05b,Plugin as _0x5ad258,merge as _0x239049}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59bd5d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa45dbf,IThreadCommentDataSourceService as _0x18ef7c}from'@univerjs/thread-comment';import{bufferTime as _0x2d9430}from'rxjs';import{HTTPService as _0x55367e}from'@univerjs/network';const W=_0x34024c(0x1d5);var I=(_0x3390e7=>(_0x3390e7[_0x3390e7[_0x34024c(0x1e5)]=0x0]=_0x34024c(0x1e5),_0x3390e7[_0x3390e7[_0x34024c(0x1ba)]=0x1]=_0x34024c(0x1ba),_0x3390e7[_0x3390e7[_0x34024c(0x1c9)]=-0x1]=_0x34024c(0x1c9),_0x3390e7))(I||{}),v=(_0x45831e=>(_0x45831e[_0x45831e[_0x34024c(0x1de)]=0x0]='Unknown',_0x45831e[_0x45831e[_0x34024c(0x19c)]=0x1]='Add',_0x45831e[_0x45831e['Reply']=0x2]=_0x34024c(0x1f8),_0x45831e[_0x45831e[_0x34024c(0x1c1)]=0x3]=_0x34024c(0x1c1),_0x45831e[_0x45831e['Delete']=0x4]='Delete',_0x45831e[_0x45831e[_0x34024c(0x1a2)]=0x5]=_0x34024c(0x1a2),_0x45831e[_0x45831e[_0x34024c(0x1c9)]=-0x1]=_0x34024c(0x1c9),_0x45831e))(v||{});const y=_0x5b355d=>_0x57f149(new Date(+_0x5b355d))['format'](_0x34024c(0x1a6)),B=async(_0x17c5a2,_0x16a130)=>{const _0x41c8aa=_0x34024c,_0x3f72e9=_0x17c5a2[_0x41c8aa(0x1d9)](_0x1feaec),_0xad84a0=_0x17c5a2[_0x41c8aa(0x1d9)](_0x55367e);_0x16a130[_0x41c8aa(0x1f6)](_0x4f5a43=>{const _0x4976e8=_0x41c8aa;_0x3f72e9[_0x4976e8(0x1f3)](_0x4f5a43)&&_0x16a130[_0x4976e8(0x200)](_0x4f5a43);}),_0x16a130[_0x41c8aa(0x1ec)]&&(await _0xad84a0[_0x41c8aa(0x1d9)](_0x41c8aa(0x1db),{'params':{'userIDs':[..._0x16a130]}}))[_0x41c8aa(0x1b9)][_0x41c8aa(0x1d4)][_0x41c8aa(0x1f6)](_0x842289=>{const _0x5e289f=_0x41c8aa;_0x842289&&_0x3f72e9[_0x5e289f(0x1b6)](_0x842289);});};var K=Object[_0x34024c(0x1cc)],V=(_0x5f3d30,_0x1c2704,_0x55bb9d,_0x5315d7)=>{const _0xf0b0c2=_0x34024c;for(var _0x275314=_0x5315d7>0x1?void 0x0:_0x5315d7?K(_0x1c2704,_0x55bb9d):_0x1c2704,_0x2dee09=_0x5f3d30[_0xf0b0c2(0x1aa)]-0x1,_0x56e849;_0x2dee09>=0x0;_0x2dee09--)(_0x56e849=_0x5f3d30[_0x2dee09])&&(_0x275314=_0x56e849(_0x275314)||_0x275314);return _0x275314;},p=(_0x57b42d,_0x31ecf3)=>(_0x24c347,_0x3cd345)=>_0x31ecf3(_0x24c347,_0x3cd345,_0x57b42d);let _=class extends _0x577d5c{constructor(_0x5ae4a0,_0x47ab27,_0x35fb7d,_0x4ceb57){const _0x17c7ed=_0x34024c;super(),this['_commentService']=_0x5ae4a0,this['_threadCommentModel']=_0x47ab27,this[_0x17c7ed(0x1c4)]=_0x35fb7d,this['_injector']=_0x4ceb57,this[_0x17c7ed(0x1f7)](),this[_0x17c7ed(0x1b0)]();}[_0x34024c(0x1b0)](){const _0x33b2bc=_0x34024c;this[_0x33b2bc(0x1fb)](this[_0x33b2bc(0x1dc)][_0x33b2bc(0x1e1)][_0x33b2bc(0x1fd)](_0x2d9430(0x10))['subscribe'](_0x3059da=>{const _0x185ce8=_0x33b2bc,_0x12c00a=new Set();_0x3059da[_0x185ce8(0x1f6)](_0x1cdf69=>{const _0x1a20fc=_0x185ce8;switch(_0x1cdf69['type']){case _0x1a20fc(0x1e8):{const _0x29690f=_0x1cdf69[_0x1a20fc(0x1ae)][_0x1a20fc(0x1bf)];_0x12c00a['add'](_0x29690f);break;}}}),B(this[_0x185ce8(0x1bd)],_0x12c00a);}));}['_init'](){const _0x493807=_0x34024c;this[_0x493807(0x1fb)](this['_commentService'][_0x493807(0x1e1)]['subscribe'](async _0x50ec9a=>{const _0x521f6a=_0x493807;var _0x3d1775,_0xfd8eac,_0x2c265f,_0x42e616;const _0x51f1a3=(_0x3d1775=this['_threadCommentModel']['getUnit'](_0x50ec9a[_0x521f6a(0x1a4)])[_0x521f6a(0x1e9)](_0x4e49a0=>_0x4e49a0[_0x521f6a(0x1f9)]===_0x50ec9a['threadId']))==null?void 0x0:_0x3d1775[_0x521f6a(0x1df)];if(!_0x51f1a3)return;const {unitId:_0x2e9807,subUnitId:_0x5da9ae}=_0x51f1a3;switch(_0x50ec9a[_0x521f6a(0x1f1)]&&this[_0x521f6a(0x1c4)][_0x521f6a(0x1b6)](_0x50ec9a[_0x521f6a(0x1f1)]),_0x50ec9a[_0x521f6a(0x1ea)]){case v[_0x521f6a(0x19c)]:break;case v[_0x521f6a(0x1f8)]:{this[_0x521f6a(0x1dc)][_0x521f6a(0x1e7)](_0x2e9807,_0x5da9ae,{'unitId':_0x2e9807,'subUnitId':_0x5da9ae,'ref':'','id':_0x50ec9a[_0x521f6a(0x1b1)],'dT':y(+_0x50ec9a['createTimestamp']),'threadId':_0x50ec9a[_0x521f6a(0x1f9)],'personId':(_0x2c265f=(_0xfd8eac=_0x50ec9a[_0x521f6a(0x1f1)])==null?void 0x0:_0xfd8eac[_0x521f6a(0x1d7)])!=null?_0x2c265f:_0x50ec9a[_0x521f6a(0x19d)],'text':JSON['parse'](_0x50ec9a['content']),'parentId':_0x51f1a3['id']});break;}case v[_0x521f6a(0x1ef)]:{const _0x28dc6e=this['_threadCommentModel'][_0x521f6a(0x1a0)](_0x2e9807,_0x5da9ae,_0x50ec9a['replyId']);_0x28dc6e&&_0x28dc6e[_0x521f6a(0x1b2)]&&this[_0x521f6a(0x1dc)][_0x521f6a(0x1fe)](_0x2e9807,_0x5da9ae,_0x50ec9a[_0x521f6a(0x1b1)]);break;}case v['Edit']:{this[_0x521f6a(0x1dc)][_0x521f6a(0x1c0)](_0x2e9807,_0x5da9ae,{'commentId':_0x50ec9a['replyId'],'text':JSON[_0x521f6a(0x1b5)](_0x50ec9a[_0x521f6a(0x1eb)])});break;}case v['Solve']:{const _0x525ad2=(_0x42e616=this['_threadCommentModel'][_0x521f6a(0x202)](_0x50ec9a[_0x521f6a(0x1a4)])[_0x521f6a(0x1e9)](_0x300f7e=>_0x300f7e[_0x521f6a(0x1f9)]===_0x50ec9a[_0x521f6a(0x1f9)]))==null?void 0x0:_0x42e616[_0x521f6a(0x1df)];_0x525ad2&&this[_0x521f6a(0x1dc)][_0x521f6a(0x1d1)](_0x2e9807,_0x5da9ae,_0x525ad2['id'],_0x50ec9a[_0x521f6a(0x1fa)]===I[_0x521f6a(0x1ba)]);break;}}}));}};function _0x5be3(_0x49aadc,_0x1175b0){_0x49aadc=_0x49aadc-0x19a;const _0x2c5a1f=_0x2c5a();let _0x5be38c=_0x2c5a1f[_0x49aadc];return _0x5be38c;}function _0x2c5a(){const _0x185e46=['_sessionService','pipe','deleteComment','rangeType','delete','_httpService','getUnit','values','29070976lzuoVY','Add','userId','setConfig','_threadCommentDataSource','getComment','pluginName','Solve','/add','unitId','getMemberID','YYYY/MM/DD\x20HH:mm','thread-comment-data-source.config','/solved','comment','length','/universer-api/comment/unit/','COMMENT','reply','payload','ref','_initUserSync','replyId','parentId','7023835WjPdcU','_threadCommentDataSourceService','parse','addUser','filter','1804348yOPkrL','body','Solved','_config','_configService','_injector','/edit','personId','updateComment','Edit','UNIVER_UNKNOWN','rangeId','_userService','listComments','replies','saveCommentToSnapshot','map','UNRECOGNIZED','stringify','51886vfHlRC','getOwnPropertyDescriptor','format','post','127785yQLyfq','205305ogzASL','resolveComment','createTimestamp','/delete','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','93hSZgMM','userID','requireSession','get','/list','/universer-api/user/list','_threadCommentModel','32946ZGHgJB','Unknown','root','symbol','commentUpdate$','syncUpdateMutationToColla','code','getCurrentUser','OpenOrReOpen','/reply','addComment','add','find','type','content','size','comments','error','Delete','_initDataSource','user','customRanges','getUser','resolved','onStarting','forEach','_init','Reply','threadId','solved','disposeWithMe'];_0x2c5a=function(){return _0x185e46;};return _0x2c5a();}_=V([p(0x0,_0x1641e7(_0x1b5be1)),p(0x1,_0x1641e7(_0xa45dbf)),p(0x2,_0x1641e7(_0x1feaec)),p(0x3,_0x1641e7(_0x5130d8))],_);const z=_0x34024c(0x1a7),O={};var k=Object[_0x34024c(0x1cc)],Q=(_0x359413,_0x5dc9a8,_0x23fd4a,_0x4cab43)=>{const _0x1d3788=_0x34024c;for(var _0x4ab8cc=_0x4cab43>0x1?void 0x0:_0x4cab43?k(_0x5dc9a8,_0x23fd4a):_0x5dc9a8,_0x47e372=_0x359413[_0x1d3788(0x1aa)]-0x1,_0x46e32c;_0x47e372>=0x0;_0x47e372--)(_0x46e32c=_0x359413[_0x47e372])&&(_0x4ab8cc=_0x46e32c(_0x4ab8cc)||_0x4ab8cc);return _0x4ab8cc;},b=(_0x1ce649,_0x3388af)=>(_0xf78e80,_0x465caa)=>_0x3388af(_0xf78e80,_0x465caa,_0x1ce649);function X(_0x3a1cd0,_0x13f02d){const _0x5c26bd=_0x34024c,_0x1b690d=_0x3a1cd0[_0x5c26bd(0x1c6)][0x0];return{..._0x13f02d,'id':_0x1b690d[_0x5c26bd(0x1b1)],'resolved':_0x3a1cd0[_0x5c26bd(0x1fa)]===0x1,'dT':y(_0x1b690d[_0x5c26bd(0x1d2)]),'personId':_0x1b690d['userId'],'threadId':_0x1b690d['threadId']};}function ee(_0x1856fa,_0x465b27,_0x264b51){const _0x334cee=_0x34024c;var _0xbb920e,_0x421e1b;if(((_0x421e1b=(_0xbb920e=_0x1856fa==null?void 0x0:_0x1856fa[_0x334cee(0x1c6)])==null?void 0x0:_0xbb920e['length'])!=null?_0x421e1b:0x0)>0x0){const _0x305c46=(_0xcf0558,_0x50c12f)=>({'id':_0xcf0558['replyId'],'threadId':_0xcf0558[_0x334cee(0x1f9)],'dT':y(_0xcf0558[_0x334cee(0x1d2)]),'personId':_0xcf0558['userId'],'resolved':_0x1856fa[_0x334cee(0x1fa)]===I[_0x334cee(0x1ba)],'unitId':_0x465b27,'subUnitId':_0x264b51,'text':JSON[_0x334cee(0x1b5)](_0xcf0558[_0x334cee(0x1eb)]),'parentId':_0x50c12f}),_0x583def=_0x305c46(_0x1856fa[_0x334cee(0x1c6)][0x0]);return{..._0x583def,'children':_0x1856fa[_0x334cee(0x1c6)]['slice'](0x1)[_0x334cee(0x1c8)](_0x55d94c=>_0x305c46(_0x55d94c,_0x583def['id']))};}return null;}let S=class{constructor(_0x1e804f,_0x356f43,_0x1bcccc){const _0x2adbc2=_0x34024c;this[_0x2adbc2(0x201)]=_0x1e804f,this['_userService']=_0x356f43,this[_0x2adbc2(0x1fc)]=_0x1bcccc;}async[_0x34024c(0x1e7)](_0x2088cc){const _0x2a1cb5=_0x34024c;var _0x2f1687,_0x1aee98;const {parentId:_0x3ef606,unitId:_0xdccd3e,text:_0x241f43,threadId:_0x539130}=_0x2088cc,_0x10b8e8=(_0x1aee98=(_0x2f1687=_0x241f43[_0x2a1cb5(0x1f2)])==null?void 0x0:_0x2f1687[_0x2a1cb5(0x1b7)](_0x588708=>_0x588708[_0x2a1cb5(0x1ff)]===_0x48489b[_0x2a1cb5(0x1ac)])[_0x2a1cb5(0x1c8)](_0x3f6654=>_0x3f6654[_0x2a1cb5(0x1c3)]))!=null?_0x1aee98:[],_0x5367b7=JSON[_0x2a1cb5(0x1ca)](_0x241f43),_0x5246c7=(await this[_0x2a1cb5(0x1fc)][_0x2a1cb5(0x1d8)](_0xdccd3e))[_0x2a1cb5(0x1a5)]();if(_0x3ef606){const _0x37e11b={'memberId':_0x5246c7,'unitId':_0xdccd3e,'content':_0x5367b7,'mention':_0x10b8e8,'threadId':_0x539130},_0x1b57ab=(await this[_0x2a1cb5(0x201)][_0x2a1cb5(0x1ce)](_0x2a1cb5(0x1ab)+_0xdccd3e+_0x2a1cb5(0x1e6),{'body':_0x37e11b}))[_0x2a1cb5(0x1b9)][_0x2a1cb5(0x1ad)];return{..._0x2088cc,'id':_0x1b57ab[_0x2a1cb5(0x1b1)],'dT':_0x57f149(+_0x1b57ab[_0x2a1cb5(0x1d2)])[_0x2a1cb5(0x1cd)](_0x2a1cb5(0x1a6)),'personId':_0x1b57ab[_0x2a1cb5(0x19d)]};}else{const _0x398d98={'memberId':_0x5246c7,'unitId':_0xdccd3e,'content':_0x5367b7,'mention':_0x10b8e8},_0x3ee03e=await this[_0x2a1cb5(0x201)][_0x2a1cb5(0x1ce)](_0x2a1cb5(0x1ab)+_0xdccd3e+_0x2a1cb5(0x1a3),{'body':_0x398d98});return X(_0x3ee03e[_0x2a1cb5(0x1b9)][_0x2a1cb5(0x1a9)],_0x2088cc);}}async['updateComment'](_0x5ea9b0){const _0x309747=_0x34024c;var _0x5a7bb0,_0x549720;const {text:_0x550b5c,unitId:_0x8ebd09}=_0x5ea9b0,_0xc3b6df=(_0x549720=(_0x5a7bb0=_0x550b5c['customRanges'])==null?void 0x0:_0x5a7bb0['filter'](_0x10880e=>_0x10880e[_0x309747(0x1ff)]===_0x48489b[_0x309747(0x1ac)])['map'](_0xfaffb7=>_0xfaffb7[_0x309747(0x1c3)]))!=null?_0x549720:[],_0x2df98d=JSON['stringify'](_0x550b5c),_0x5b5b47=_0x5ea9b0[_0x309747(0x1f9)],_0x223063=_0x5ea9b0['id'],_0x255e5f={'memberId':(await this[_0x309747(0x1fc)]['requireSession'](_0x8ebd09))[_0x309747(0x1a5)](),'unitId':_0x8ebd09,'threadId':_0x5b5b47,'mention':_0xc3b6df,'content':_0x2df98d,'replyId':_0x223063},_0x2a07e3=await this['_httpService'][_0x309747(0x1ce)]('/universer-api/comment/unit/'+_0x8ebd09+_0x309747(0x1be),{'body':_0x255e5f});return!_0x2a07e3['body'][_0x309747(0x1ee)]||_0x2a07e3[_0x309747(0x1b9)][_0x309747(0x1ee)][_0x309747(0x1e3)]===0x1;}async[_0x34024c(0x1d1)](_0x10a7ea){const _0x48a59c=_0x34024c,{unitId:_0x3ebd04}=_0x10a7ea,_0x353576=_0x10a7ea[_0x48a59c(0x1f9)],_0x3d54de={'memberId':this[_0x48a59c(0x1c4)][_0x48a59c(0x1e4)]()['userID'],'unitId':_0x3ebd04,'threadId':_0x353576,'solved':_0x10a7ea[_0x48a59c(0x1f4)]?I[_0x48a59c(0x1ba)]:I[_0x48a59c(0x1e5)]},_0x10164b=await this[_0x48a59c(0x201)]['post'](_0x48a59c(0x1ab)+_0x3ebd04+_0x48a59c(0x1a8),{'body':_0x3d54de});return!_0x10164b['body'][_0x48a59c(0x1ee)]||_0x10164b[_0x48a59c(0x1b9)][_0x48a59c(0x1ee)]['code']===0x1;}async['deleteComment'](_0x539f6e,_0x4f9213,_0x52b5a3,_0x36a12f){const _0x1e7a30=_0x34024c,_0x26732b={'memberId':(await this[_0x1e7a30(0x1fc)][_0x1e7a30(0x1d8)](_0x539f6e))[_0x1e7a30(0x1a5)](),'threadId':_0x52b5a3,'replyId':_0x36a12f,'unitId':_0x539f6e},_0x43d90f=await this[_0x1e7a30(0x201)][_0x1e7a30(0x1ce)](_0x1e7a30(0x1ab)+_0x539f6e+_0x1e7a30(0x1d3),{'body':_0x26732b});return!_0x43d90f[_0x1e7a30(0x1b9)][_0x1e7a30(0x1ee)]||_0x43d90f[_0x1e7a30(0x1b9)][_0x1e7a30(0x1ee)][_0x1e7a30(0x1e3)]===0x1;}async[_0x34024c(0x1c5)](_0x115913,_0x483dc1,_0x522ecf){const _0x4413d0=_0x34024c,_0x323056={'unitId':_0x115913,'threadId':_0x522ecf},_0x102b59=await this[_0x4413d0(0x201)][_0x4413d0(0x1ce)](_0x4413d0(0x1ab)+_0x115913+_0x4413d0(0x1da),{'body':_0x323056}),_0x3c6f47=_0x522ecf['map'](_0x2ed0e9=>ee(_0x102b59[_0x4413d0(0x1b9)][_0x4413d0(0x1ed)][_0x2ed0e9],_0x115913,_0x483dc1))[_0x4413d0(0x1b7)](Boolean);return Object[_0x4413d0(0x19a)](_0x102b59[_0x4413d0(0x1b9)]['users'])[_0x4413d0(0x1f6)](_0x2ce036=>{const _0x41efa9=_0x4413d0;this[_0x41efa9(0x1c4)][_0x41efa9(0x1b6)](_0x2ce036);}),_0x3c6f47;}[_0x34024c(0x1c7)](_0x459c2e){const _0x501831=_0x34024c;return{'id':_0x459c2e['id'],'threadId':_0x459c2e[_0x501831(0x1f9)],'ref':_0x459c2e[_0x501831(0x1af)]};}};S=Q([b(0x0,_0x1641e7(_0x55367e)),b(0x1,_0x1641e7(_0x1feaec)),b(0x2,_0x1641e7(_0x17f016))],S);var re=Object[_0x34024c(0x1cc)],te=(_0x3e4e4f,_0x99c6cf,_0x362df6,_0xb328f4)=>{const _0x2bdfeb=_0x34024c;for(var _0x40f84c=_0xb328f4>0x1?void 0x0:_0xb328f4?re(_0x99c6cf,_0x362df6):_0x99c6cf,_0x400bf7=_0x3e4e4f[_0x2bdfeb(0x1aa)]-0x1,_0x50e93b;_0x400bf7>=0x0;_0x400bf7--)(_0x50e93b=_0x3e4e4f[_0x400bf7])&&(_0x40f84c=_0x50e93b(_0x40f84c)||_0x40f84c);return _0x40f84c;},M=(_0x1f6019,_0x27e34f)=>(_0x5f2b6c,_0x4377d3)=>_0x27e34f(_0x5f2b6c,_0x4377d3,_0x1f6019);let f=class extends _0x577d5c{constructor(_0x3d56b7,_0x4b8689){const _0xea98e3=_0x34024c;super(),this['_threadCommentDataSourceService']=_0x3d56b7,this[_0xea98e3(0x19f)]=_0x4b8689,this['_initDataSource']();}[_0x34024c(0x1f0)](){const _0x528918=_0x34024c;this[_0x528918(0x1b4)]['dataSource']=this[_0x528918(0x19f)],this['_threadCommentDataSourceService'][_0x528918(0x1e2)]=!0x1;}};f=te([M(0x0,_0x18ef7c),M(0x1,_0x1641e7(S))],f);var se=Object['defineProperty'],oe=Object[_0x34024c(0x1cc)],ne=(_0xf90f18,_0x5c2e80,_0x419594)=>_0x5c2e80 in _0xf90f18?se(_0xf90f18,_0x5c2e80,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x419594}):_0xf90f18[_0x5c2e80]=_0x419594,ie=(_0x2e92bc,_0x36598e,_0x59db40,_0x11915c)=>{for(var _0x4d65f7=_0x11915c>0x1?void 0x0:_0x11915c?oe(_0x36598e,_0x59db40):_0x36598e,_0x76265b=_0x2e92bc['length']-0x1,_0x33d925;_0x76265b>=0x0;_0x76265b--)(_0x33d925=_0x2e92bc[_0x76265b])&&(_0x4d65f7=_0x33d925(_0x4d65f7)||_0x4d65f7);return _0x4d65f7;},N=(_0x2970a4,_0x49b1f0)=>(_0xc86579,_0x2b6f40)=>_0x49b1f0(_0xc86579,_0x2b6f40,_0x2970a4),$=(_0x5eb057,_0x4254f3,_0x4fd376)=>ne(_0x5eb057,typeof _0x4254f3!=_0x34024c(0x1e0)?_0x4254f3+'':_0x4254f3,_0x4fd376);let g=class extends _0x5ad258{constructor(_0x1692ad=O,_0x1058e8,_0x33ea62){const _0x9aa18d=_0x34024c;super(),this['_config']=_0x1692ad,this[_0x9aa18d(0x1bd)]=_0x1058e8,this[_0x9aa18d(0x1bc)]=_0x33ea62;const {..._0x4da21d}=_0x239049({},O,this[_0x9aa18d(0x1bb)]);this[_0x9aa18d(0x1bc)][_0x9aa18d(0x19e)](z,_0x4da21d);}[_0x34024c(0x1f5)](){const _0x354bb4=_0x34024c;[[S],[f],[_]][_0x354bb4(0x1f6)](_0x3322a9=>{const _0x557c5a=_0x354bb4;this[_0x557c5a(0x1bd)][_0x557c5a(0x1e8)](_0x3322a9);});}['onReady'](){const _0x58d2b8=_0x34024c;this[_0x58d2b8(0x1bd)][_0x58d2b8(0x1d9)](f),this[_0x58d2b8(0x1bd)][_0x58d2b8(0x1d9)](_);}};$(g,_0x34024c(0x1a1),W),$(g,_0x34024c(0x1ea),_0x1cfbda[_0x34024c(0x1c2)]),g=ie([_0x114dff(_0x59bd5d,_0x46d5fb,_0xf589bd),N(0x1,_0x1641e7(_0x5130d8)),N(0x2,_0x10c05b)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x425f(_0x143c94,_0x34679b){_0x143c94=_0x143c94-0xa8;const _0x2ff018=_0x2ff0();let _0x425fd6=_0x2ff018[_0x143c94];return _0x425fd6;}(function(_0x4909ec,_0x43e010){const _0x4d9896=_0x425f,_0x4e713f=_0x4909ec();while(!![]){try{const _0x3d49a4=parseInt(_0x4d9896(0x115))/0x1*(parseInt(_0x4d9896(0xed))/0x2)+-parseInt(_0x4d9896(0xe6))/0x3+parseInt(_0x4d9896(0xcf))/0x4+parseInt(_0x4d9896(0x111))/0x5*(parseInt(_0x4d9896(0x10c))/0x6)+parseInt(_0x4d9896(0x11d))/0x7*(parseInt(_0x4d9896(0xb0))/0x8)+parseInt(_0x4d9896(0xf3))/0x9*(-parseInt(_0x4d9896(0xb3))/0xa)+-parseInt(_0x4d9896(0x10a))/0xb*(parseInt(_0x4d9896(0xbd))/0xc);if(_0x3d49a4===_0x43e010)break;else _0x4e713f['push'](_0x4e713f['shift']());}catch(_0x25f694){_0x4e713f['push'](_0x4e713f['shift']());}}}(_0x2ff0,0xba423),function(_0x58dd86,_0x583295){const _0xac90fc=_0x425f;typeof exports==_0xac90fc(0xd3)&&typeof module<'u'?_0x583295(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==_0xac90fc(0xb2)&&define[_0xac90fc(0xdb)]?define(['exports',_0xac90fc(0xd5),_0xac90fc(0x12a),_0xac90fc(0xcb),'@univerjs/thread-comment-ui',_0xac90fc(0xa9),'rxjs',_0xac90fc(0xca)],_0x583295):(_0x58dd86=typeof globalThis<'u'?globalThis:_0x58dd86||self,_0x583295(_0x58dd86[_0xac90fc(0xc9)]={},_0x58dd86['UniverProCollaborationClient'],_0x58dd86[_0xac90fc(0xab)],_0x58dd86[_0xac90fc(0x10b)],_0x58dd86['UniverThreadCommentUi'],_0x58dd86[_0xac90fc(0xf4)],_0x58dd86[_0xac90fc(0xc3)],_0x58dd86[_0xac90fc(0xd4)]));}(this,function(_0x27d8d1,_0x31a3d9,_0x3c44df,_0x47cd9e,_0x4c82fd,_0x44534f,_0x263ea1,_0x399bbd){'use strict';const _0x4e3fb3=_0x425f;const _0x19e2bb='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x5f1f35=(_0x3760ec=>(_0x3760ec[_0x3760ec[_0x4e3fb3(0x109)]=0x0]=_0x4e3fb3(0x109),_0x3760ec[_0x3760ec[_0x4e3fb3(0x10d)]=0x1]=_0x4e3fb3(0x10d),_0x3760ec[_0x3760ec[_0x4e3fb3(0xd6)]=-0x1]=_0x4e3fb3(0xd6),_0x3760ec))(_0x5f1f35||{}),_0x5472e5=(_0x176c68=>(_0x176c68[_0x176c68[_0x4e3fb3(0xc4)]=0x0]=_0x4e3fb3(0xc4),_0x176c68[_0x176c68['Add']=0x1]=_0x4e3fb3(0x12e),_0x176c68[_0x176c68[_0x4e3fb3(0xc8)]=0x2]=_0x4e3fb3(0xc8),_0x176c68[_0x176c68[_0x4e3fb3(0x107)]=0x3]=_0x4e3fb3(0x107),_0x176c68[_0x176c68[_0x4e3fb3(0x106)]=0x4]='Delete',_0x176c68[_0x176c68[_0x4e3fb3(0x113)]=0x5]='Solve',_0x176c68[_0x176c68[_0x4e3fb3(0xd6)]=-0x1]=_0x4e3fb3(0xd6),_0x176c68))(_0x5472e5||{});const _0x192db0=_0x7e2b09=>_0x47cd9e['dayjs'](new Date(+_0x7e2b09))[_0x4e3fb3(0xac)](_0x4e3fb3(0x129)),_0x588165=async(_0x7c3654,_0x307b5b)=>{const _0x1996a1=_0x4e3fb3,_0x4b7ec7=_0x7c3654[_0x1996a1(0x12d)](_0x47cd9e[_0x1996a1(0xd9)]),_0x46de10=_0x7c3654[_0x1996a1(0x12d)](_0x399bbd[_0x1996a1(0xce)]);_0x307b5b[_0x1996a1(0x108)](_0x5e4de3=>{const _0x254c07=_0x1996a1;_0x4b7ec7[_0x254c07(0xf1)](_0x5e4de3)&&_0x307b5b[_0x254c07(0x10e)](_0x5e4de3);}),_0x307b5b['size']&&(await _0x46de10[_0x1996a1(0x12d)](_0x1996a1(0x105),{'params':{'userIDs':[..._0x307b5b]}}))[_0x1996a1(0x114)]['users'][_0x1996a1(0x108)](_0x385bc2=>{_0x385bc2&&_0x4b7ec7['addUser'](_0x385bc2);});};var _0x2838fa=Object[_0x4e3fb3(0x103)],_0x110754=(_0xfdc2b9,_0xff6371,_0x328ebc,_0x305e38)=>{for(var _0x5ac48f=_0x305e38>0x1?void 0x0:_0x305e38?_0x2838fa(_0xff6371,_0x328ebc):_0xff6371,_0x39c665=_0xfdc2b9['length']-0x1,_0x2f0d4f;_0x39c665>=0x0;_0x39c665--)(_0x2f0d4f=_0xfdc2b9[_0x39c665])&&(_0x5ac48f=_0x2f0d4f(_0x5ac48f)||_0x5ac48f);return _0x5ac48f;},_0x5ebf2c=(_0x5bd804,_0x1bed90)=>(_0x5e2bf1,_0xa0f230)=>_0x1bed90(_0x5e2bf1,_0xa0f230,_0x5bd804);let _0x5dbcc8=class extends _0x47cd9e[_0x4e3fb3(0x117)]{constructor(_0x131956,_0x59215c,_0x58e52d,_0x7e8a7f){const _0x37a704=_0x4e3fb3;super(),this[_0x37a704(0xf7)]=_0x131956,this[_0x37a704(0xaf)]=_0x59215c,this[_0x37a704(0xd0)]=_0x58e52d,this[_0x37a704(0x11f)]=_0x7e8a7f,this[_0x37a704(0xf5)](),this[_0x37a704(0xe5)]();}[_0x4e3fb3(0xe5)](){const _0x458a53=_0x4e3fb3;this[_0x458a53(0xdf)](this['_threadCommentModel'][_0x458a53(0xfc)]['pipe'](_0x263ea1[_0x458a53(0xf8)](0x10))[_0x458a53(0x126)](_0x1b0ea5=>{const _0x319732=_0x458a53,_0x20fb67=new Set();_0x1b0ea5['forEach'](_0x52b9a6=>{const _0x2a493f=_0x425f;switch(_0x52b9a6[_0x2a493f(0xcc)]){case _0x2a493f(0x11e):{const _0x11e3c4=_0x52b9a6[_0x2a493f(0xeb)]['personId'];_0x20fb67[_0x2a493f(0x11e)](_0x11e3c4);break;}}}),_0x588165(this[_0x319732(0x11f)],_0x20fb67);}));}[_0x4e3fb3(0xf5)](){const _0x464834=_0x4e3fb3;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0x464834(0x126)](async _0x301413=>{const _0xa13fa7=_0x464834;var _0x5466ca,_0x2ee4cb,_0x137c6a,_0x154aa2;const _0x472cbe=(_0x5466ca=this[_0xa13fa7(0xaf)][_0xa13fa7(0xc7)](_0x301413['unitId'])['find'](_0x2230be=>_0x2230be[_0xa13fa7(0xfe)]===_0x301413[_0xa13fa7(0xfe)]))==null?void 0x0:_0x5466ca[_0xa13fa7(0xad)];if(!_0x472cbe)return;const {unitId:_0x7ed7b1,subUnitId:_0x3bfde2}=_0x472cbe;switch(_0x301413[_0xa13fa7(0xdd)]&&this['_userService'][_0xa13fa7(0xc6)](_0x301413[_0xa13fa7(0xdd)]),_0x301413[_0xa13fa7(0xcc)]){case _0x5472e5[_0xa13fa7(0x12e)]:break;case _0x5472e5[_0xa13fa7(0xc8)]:{this[_0xa13fa7(0xaf)]['addComment'](_0x7ed7b1,_0x3bfde2,{'unitId':_0x7ed7b1,'subUnitId':_0x3bfde2,'ref':'','id':_0x301413[_0xa13fa7(0xd7)],'dT':_0x192db0(+_0x301413[_0xa13fa7(0xe7)]),'threadId':_0x301413['threadId'],'personId':(_0x137c6a=(_0x2ee4cb=_0x301413['user'])==null?void 0x0:_0x2ee4cb[_0xa13fa7(0xe0)])!=null?_0x137c6a:_0x301413[_0xa13fa7(0xcd)],'text':JSON['parse'](_0x301413[_0xa13fa7(0x128)]),'parentId':_0x472cbe['id']});break;}case _0x5472e5[_0xa13fa7(0x106)]:{const _0x570fea=this[_0xa13fa7(0xaf)]['getComment'](_0x7ed7b1,_0x3bfde2,_0x301413['replyId']);_0x570fea&&_0x570fea['parentId']&&this['_threadCommentModel'][_0xa13fa7(0xba)](_0x7ed7b1,_0x3bfde2,_0x301413[_0xa13fa7(0xd7)]);break;}case _0x5472e5[_0xa13fa7(0x107)]:{this['_threadCommentModel'][_0xa13fa7(0xb9)](_0x7ed7b1,_0x3bfde2,{'commentId':_0x301413[_0xa13fa7(0xd7)],'text':JSON[_0xa13fa7(0x124)](_0x301413[_0xa13fa7(0x128)])});break;}case _0x5472e5[_0xa13fa7(0x113)]:{const _0x2a8c26=(_0x154aa2=this[_0xa13fa7(0xaf)]['getUnit'](_0x301413[_0xa13fa7(0xc2)])[_0xa13fa7(0x11b)](_0x474369=>_0x474369[_0xa13fa7(0xfe)]===_0x301413[_0xa13fa7(0xfe)]))==null?void 0x0:_0x154aa2[_0xa13fa7(0xad)];_0x2a8c26&&this['_threadCommentModel'][_0xa13fa7(0x119)](_0x7ed7b1,_0x3bfde2,_0x2a8c26['id'],_0x301413['solved']===_0x5f1f35[_0xa13fa7(0x10d)]);break;}}}));}};_0x5dbcc8=_0x110754([_0x5ebf2c(0x0,_0x47cd9e['Inject'](_0x31a3d9[_0x4e3fb3(0xd8)])),_0x5ebf2c(0x1,_0x47cd9e[_0x4e3fb3(0x12f)](_0x44534f[_0x4e3fb3(0x11a)])),_0x5ebf2c(0x2,_0x47cd9e[_0x4e3fb3(0x12f)](_0x47cd9e[_0x4e3fb3(0xd9)])),_0x5ebf2c(0x3,_0x47cd9e[_0x4e3fb3(0x12f)](_0x47cd9e[_0x4e3fb3(0xb5)]))],_0x5dbcc8);const _0x11a51f=_0x4e3fb3(0xf2),_0x14681b={};var _0x14125d=Object[_0x4e3fb3(0x103)],_0x80ae84=(_0x55b7da,_0xa89e57,_0x1ab396,_0x12c346)=>{const _0x587a4b=_0x4e3fb3;for(var _0x3c902a=_0x12c346>0x1?void 0x0:_0x12c346?_0x14125d(_0xa89e57,_0x1ab396):_0xa89e57,_0x476935=_0x55b7da[_0x587a4b(0xd1)]-0x1,_0x54107c;_0x476935>=0x0;_0x476935--)(_0x54107c=_0x55b7da[_0x476935])&&(_0x3c902a=_0x54107c(_0x3c902a)||_0x3c902a);return _0x3c902a;},_0x1b35d4=(_0x4df329,_0x599a98)=>(_0x1f0129,_0x3a9835)=>_0x599a98(_0x1f0129,_0x3a9835,_0x4df329);function _0x32cfc8(_0x4ce2fa,_0x27a83d){const _0x24d8e6=_0x4e3fb3,_0x79008f=_0x4ce2fa['replies'][0x0];return{..._0x27a83d,'id':_0x79008f[_0x24d8e6(0xd7)],'resolved':_0x4ce2fa[_0x24d8e6(0xda)]===0x1,'dT':_0x192db0(_0x79008f[_0x24d8e6(0xe7)]),'personId':_0x79008f[_0x24d8e6(0xcd)],'threadId':_0x79008f['threadId']};}function _0x339409(_0x1087e8,_0x43ed9e,_0xa21e51){const _0x17c26d=_0x4e3fb3;var _0x369bee,_0xfdb21c;if(((_0xfdb21c=(_0x369bee=_0x1087e8==null?void 0x0:_0x1087e8[_0x17c26d(0x102)])==null?void 0x0:_0x369bee[_0x17c26d(0xd1)])!=null?_0xfdb21c:0x0)>0x0){const _0x871d28=(_0xbfe1ff,_0x16a519)=>({'id':_0xbfe1ff['replyId'],'threadId':_0xbfe1ff['threadId'],'dT':_0x192db0(_0xbfe1ff[_0x17c26d(0xe7)]),'personId':_0xbfe1ff['userId'],'resolved':_0x1087e8[_0x17c26d(0xda)]===_0x5f1f35[_0x17c26d(0x10d)],'unitId':_0x43ed9e,'subUnitId':_0xa21e51,'text':JSON['parse'](_0xbfe1ff['content']),'parentId':_0x16a519}),_0x4e5e27=_0x871d28(_0x1087e8[_0x17c26d(0x102)][0x0]);return{..._0x4e5e27,'children':_0x1087e8[_0x17c26d(0x102)][_0x17c26d(0x133)](0x1)[_0x17c26d(0xea)](_0x846b26=>_0x871d28(_0x846b26,_0x4e5e27['id']))};}return null;}let _0x51ecb8=class{constructor(_0x1a3576,_0x18549,_0x495230){const _0x3e08b2=_0x4e3fb3;this[_0x3e08b2(0xb8)]=_0x1a3576,this[_0x3e08b2(0xd0)]=_0x18549,this[_0x3e08b2(0xfb)]=_0x495230;}async[_0x4e3fb3(0xdc)](_0x18b685){const _0x407fc8=_0x4e3fb3;var _0x60d630,_0xb93cb5;const {parentId:_0x542535,unitId:_0x456bf9,text:_0x167ffb,threadId:_0x3a4bf7}=_0x18b685,_0x118419=(_0xb93cb5=(_0x60d630=_0x167ffb[_0x407fc8(0x121)])==null?void 0x0:_0x60d630[_0x407fc8(0xae)](_0x1195b3=>_0x1195b3[_0x407fc8(0xf6)]===_0x47cd9e['CustomRangeType']['COMMENT'])['map'](_0x19d91f=>_0x19d91f['rangeId']))!=null?_0xb93cb5:[],_0xec673f=JSON[_0x407fc8(0x120)](_0x167ffb),_0x52b3eb=(await this[_0x407fc8(0xfb)]['requireSession'](_0x456bf9))[_0x407fc8(0xe9)]();if(_0x542535){const _0x5ebe2f={'memberId':_0x52b3eb,'unitId':_0x456bf9,'content':_0xec673f,'mention':_0x118419,'threadId':_0x3a4bf7},_0x17b9ff=(await this['_httpService']['post'](_0x407fc8(0xbc)+_0x456bf9+_0x407fc8(0xef),{'body':_0x5ebe2f}))[_0x407fc8(0x114)][_0x407fc8(0xb7)];return{..._0x18b685,'id':_0x17b9ff[_0x407fc8(0xd7)],'dT':_0x47cd9e[_0x407fc8(0xa8)](+_0x17b9ff[_0x407fc8(0xe7)])[_0x407fc8(0xac)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x17b9ff[_0x407fc8(0xcd)]};}else{const _0x548ad5={'memberId':_0x52b3eb,'unitId':_0x456bf9,'content':_0xec673f,'mention':_0x118419},_0x4fe6a1=await this[_0x407fc8(0xb8)][_0x407fc8(0xc5)](_0x407fc8(0xbc)+_0x456bf9+'/add',{'body':_0x548ad5});return _0x32cfc8(_0x4fe6a1['body'][_0x407fc8(0xc1)],_0x18b685);}}async[_0x4e3fb3(0xb9)](_0x2f91ee){const _0x8d467a=_0x4e3fb3;var _0x598b6b,_0x181507;const {text:_0x3ae11a,unitId:_0x114ee9}=_0x2f91ee,_0xb78e36=(_0x181507=(_0x598b6b=_0x3ae11a[_0x8d467a(0x121)])==null?void 0x0:_0x598b6b[_0x8d467a(0xae)](_0x553f68=>_0x553f68[_0x8d467a(0xf6)]===_0x47cd9e[_0x8d467a(0xe4)]['COMMENT'])['map'](_0x504b28=>_0x504b28[_0x8d467a(0x100)]))!=null?_0x181507:[],_0x3ca393=JSON[_0x8d467a(0x120)](_0x3ae11a),_0x3825db=_0x2f91ee[_0x8d467a(0xfe)],_0x19f538=_0x2f91ee['id'],_0x186b33={'memberId':(await this[_0x8d467a(0xfb)][_0x8d467a(0xff)](_0x114ee9))[_0x8d467a(0xe9)](),'unitId':_0x114ee9,'threadId':_0x3825db,'mention':_0xb78e36,'content':_0x3ca393,'replyId':_0x19f538},_0x6b03f5=await this[_0x8d467a(0xb8)][_0x8d467a(0xc5)](_0x8d467a(0xbc)+_0x114ee9+_0x8d467a(0xbe),{'body':_0x186b33});return!_0x6b03f5[_0x8d467a(0x114)][_0x8d467a(0x12c)]||_0x6b03f5['body'][_0x8d467a(0x12c)][_0x8d467a(0xb4)]===0x1;}async[_0x4e3fb3(0x119)](_0x2b4ed2){const _0x3d59ba=_0x4e3fb3,{unitId:_0x3eb34b}=_0x2b4ed2,_0x309e0e=_0x2b4ed2[_0x3d59ba(0xfe)],_0x2177c0={'memberId':this['_userService'][_0x3d59ba(0x10f)]()[_0x3d59ba(0xe0)],'unitId':_0x3eb34b,'threadId':_0x309e0e,'solved':_0x2b4ed2[_0x3d59ba(0x12b)]?_0x5f1f35[_0x3d59ba(0x10d)]:_0x5f1f35[_0x3d59ba(0x109)]},_0x2f5a1c=await this[_0x3d59ba(0xb8)]['post'](_0x3d59ba(0xbc)+_0x3eb34b+_0x3d59ba(0x112),{'body':_0x2177c0});return!_0x2f5a1c['body'][_0x3d59ba(0x12c)]||_0x2f5a1c[_0x3d59ba(0x114)][_0x3d59ba(0x12c)][_0x3d59ba(0xb4)]===0x1;}async[_0x4e3fb3(0xba)](_0x3c5d95,_0x1d6bfe,_0xd521b3,_0x3577ae){const _0x26ed58=_0x4e3fb3,_0x25e09b={'memberId':(await this['_sessionService'][_0x26ed58(0xff)](_0x3c5d95))[_0x26ed58(0xe9)](),'threadId':_0xd521b3,'replyId':_0x3577ae,'unitId':_0x3c5d95},_0x43de61=await this[_0x26ed58(0xb8)][_0x26ed58(0xc5)](_0x26ed58(0xbc)+_0x3c5d95+'/delete',{'body':_0x25e09b});return!_0x43de61['body'][_0x26ed58(0x12c)]||_0x43de61[_0x26ed58(0x114)][_0x26ed58(0x12c)][_0x26ed58(0xb4)]===0x1;}async[_0x4e3fb3(0x127)](_0x1f9271,_0x1d0b71,_0x5ecea5){const _0x387582=_0x4e3fb3,_0x1bf95e={'unitId':_0x1f9271,'threadId':_0x5ecea5},_0x4482b4=await this[_0x387582(0xb8)][_0x387582(0xc5)](_0x387582(0xbc)+_0x1f9271+_0x387582(0xe1),{'body':_0x1bf95e}),_0xc369d5=_0x5ecea5[_0x387582(0xea)](_0x1ad42f=>_0x339409(_0x4482b4[_0x387582(0x114)][_0x387582(0xf9)][_0x1ad42f],_0x1f9271,_0x1d0b71))[_0x387582(0xae)](Boolean);return Object[_0x387582(0x116)](_0x4482b4[_0x387582(0x114)][_0x387582(0xf0)])[_0x387582(0x108)](_0x30c265=>{const _0x57de50=_0x387582;this[_0x57de50(0xd0)][_0x57de50(0xc6)](_0x30c265);}),_0xc369d5;}[_0x4e3fb3(0xe3)](_0x228c02){const _0x221a97=_0x4e3fb3;return{'id':_0x228c02['id'],'threadId':_0x228c02[_0x221a97(0xfe)],'ref':_0x228c02[_0x221a97(0x118)]};}};_0x51ecb8=_0x80ae84([_0x1b35d4(0x0,_0x47cd9e[_0x4e3fb3(0x12f)](_0x399bbd[_0x4e3fb3(0xce)])),_0x1b35d4(0x1,_0x47cd9e['Inject'](_0x47cd9e[_0x4e3fb3(0xd9)])),_0x1b35d4(0x2,_0x47cd9e[_0x4e3fb3(0x12f)](_0x31a3d9[_0x4e3fb3(0xbb)]))],_0x51ecb8);var _0x3de3d0=Object['getOwnPropertyDescriptor'],_0x55c015=(_0x5ed6fd,_0xffb3eb,_0x399577,_0x25b62e)=>{const _0x55df23=_0x4e3fb3;for(var _0xffc9b4=_0x25b62e>0x1?void 0x0:_0x25b62e?_0x3de3d0(_0xffb3eb,_0x399577):_0xffb3eb,_0x2ce5db=_0x5ed6fd[_0x55df23(0xd1)]-0x1,_0x10bc7d;_0x2ce5db>=0x0;_0x2ce5db--)(_0x10bc7d=_0x5ed6fd[_0x2ce5db])&&(_0xffc9b4=_0x10bc7d(_0xffc9b4)||_0xffc9b4);return _0xffc9b4;},_0x1ab65f=(_0x3ee0c3,_0x299098)=>(_0x2f019e,_0x373a0a)=>_0x299098(_0x2f019e,_0x373a0a,_0x3ee0c3);let _0x21af2b=class extends _0x47cd9e[_0x4e3fb3(0x117)]{constructor(_0xb07193,_0x352fc5){const _0x2024c1=_0x4e3fb3;super(),this['_threadCommentDataSourceService']=_0xb07193,this[_0x2024c1(0xde)]=_0x352fc5,this['_initDataSource']();}[_0x4e3fb3(0xfa)](){const _0x21028a=_0x4e3fb3;this[_0x21028a(0x101)][_0x21028a(0xbf)]=this[_0x21028a(0xde)],this[_0x21028a(0x101)][_0x21028a(0x11c)]=!0x1;}};_0x21af2b=_0x55c015([_0x1ab65f(0x0,_0x44534f[_0x4e3fb3(0xb1)]),_0x1ab65f(0x1,_0x47cd9e[_0x4e3fb3(0x12f)](_0x51ecb8))],_0x21af2b);var _0x264ca9=Object[_0x4e3fb3(0xfd)],_0x590e90=Object['getOwnPropertyDescriptor'],_0x5d80ed=(_0x5316bc,_0x3db511,_0x41036)=>_0x3db511 in _0x5316bc?_0x264ca9(_0x5316bc,_0x3db511,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x41036}):_0x5316bc[_0x3db511]=_0x41036,_0x128a2a=(_0x52610e,_0x82f22f,_0x31c61f,_0x2dafe3)=>{const _0x4de7c0=_0x4e3fb3;for(var _0x55e612=_0x2dafe3>0x1?void 0x0:_0x2dafe3?_0x590e90(_0x82f22f,_0x31c61f):_0x82f22f,_0x4d9af4=_0x52610e[_0x4de7c0(0xd1)]-0x1,_0x3d1f19;_0x4d9af4>=0x0;_0x4d9af4--)(_0x3d1f19=_0x52610e[_0x4d9af4])&&(_0x55e612=_0x3d1f19(_0x55e612)||_0x55e612);return _0x55e612;},_0x332cbb=(_0x1b5826,_0x583eb2)=>(_0x76e12,_0x33a74e)=>_0x583eb2(_0x76e12,_0x33a74e,_0x1b5826),_0x30784c=(_0x24f619,_0x5f41c1,_0xcf0ab5)=>_0x5d80ed(_0x24f619,typeof _0x5f41c1!=_0x4e3fb3(0x132)?_0x5f41c1+'':_0x5f41c1,_0xcf0ab5);_0x27d8d1[_0x4e3fb3(0xb6)]=class extends _0x47cd9e['Plugin']{constructor(_0x208262=_0x14681b,_0x3f426b,_0x5aa047){const _0x492943=_0x4e3fb3;super(),this[_0x492943(0xee)]=_0x208262,this[_0x492943(0x11f)]=_0x3f426b,this[_0x492943(0x110)]=_0x5aa047;const {..._0x17f9e7}=_0x47cd9e[_0x492943(0x123)]({},_0x14681b,this[_0x492943(0xee)]);this[_0x492943(0x110)][_0x492943(0xec)](_0x11a51f,_0x17f9e7);}[_0x4e3fb3(0xe8)](){const _0x5eeb6a=_0x4e3fb3;[[_0x51ecb8],[_0x21af2b],[_0x5dbcc8]][_0x5eeb6a(0x108)](_0x3f6ff4=>{const _0x161580=_0x5eeb6a;this['_injector'][_0x161580(0x11e)](_0x3f6ff4);});}[_0x4e3fb3(0x122)](){const _0x557fdd=_0x4e3fb3;this[_0x557fdd(0x11f)][_0x557fdd(0x12d)](_0x21af2b),this['_injector'][_0x557fdd(0x12d)](_0x5dbcc8);}},_0x30784c(_0x27d8d1[_0x4e3fb3(0xb6)],'pluginName',_0x19e2bb),_0x30784c(_0x27d8d1[_0x4e3fb3(0xb6)],_0x4e3fb3(0xcc),_0x47cd9e[_0x4e3fb3(0xe2)]['UNIVER_UNKNOWN']),_0x27d8d1[_0x4e3fb3(0xb6)]=_0x128a2a([_0x47cd9e[_0x4e3fb3(0xaa)](_0x4c82fd[_0x4e3fb3(0xc0)],_0x31a3d9[_0x4e3fb3(0x104)],_0x3c44df[_0x4e3fb3(0x130)]),_0x332cbb(0x1,_0x47cd9e[_0x4e3fb3(0x12f)](_0x47cd9e['Injector'])),_0x332cbb(0x2,_0x47cd9e[_0x4e3fb3(0xd2)])],_0x27d8d1[_0x4e3fb3(0xb6)]),Object[_0x4e3fb3(0xfd)](_0x27d8d1,Symbol[_0x4e3fb3(0x131)],{'value':_0x4e3fb3(0x125)});}));function _0x2ff0(){const _0x54ef9a=['createTimestamp','onStarting','getMemberID','map','payload','setConfig','1609602XIGmDI','_config','/reply','users','getUser','thread-comment-data-source.config','423RVFSML','UniverThreadComment','_init','rangeType','_commentService','bufferTime','comments','_initDataSource','_sessionService','commentUpdate$','defineProperty','threadId','requireSession','rangeId','_threadCommentDataSourceService','replies','getOwnPropertyDescriptor','UniverCollaborationClientPlugin','/universer-api/user/list','Delete','Edit','forEach','OpenOrReOpen','580558ztTWto','UniverCore','24DHOziT','Solved','delete','getCurrentUser','_configService','788005rpXYFB','/solved','Solve','body','1nHDqKs','values','Disposable','ref','resolveComment','ThreadCommentModel','find','syncUpdateMutationToColla','5387718DIqIpF','add','_injector','stringify','customRanges','onReady','merge','parse','Module','subscribe','listComments','content','YYYY/MM/DD\x20HH:mm','@univerjs-pro/license','resolved','error','get','Add','Inject','UniverLicensePlugin','toStringTag','symbol','slice','dayjs','@univerjs/thread-comment','DependentOn','UniverProLicense','format','root','filter','_threadCommentModel','8GPgiuc','IThreadCommentDataSourceService','function','294890uSwues','code','Injector','UniverThreadCommentDataSourcePlugin','reply','_httpService','updateComment','deleteComment','CollaborationSessionService','/universer-api/comment/unit/','12zCNMlj','/edit','dataSource','UniverThreadCommentUIPlugin','comment','unitId','rxjs','Unknown','post','addUser','getUnit','Reply','UniverProThreadCommentDatasource','@univerjs/network','@univerjs/core','type','userId','HTTPService','4159144lWIAfn','_userService','length','IConfigService','object','UniverNetwork','@univerjs-pro/collaboration-client','UNRECOGNIZED','replyId','CommentService','UserManagerService','solved','amd','addComment','user','_threadCommentDataSource','disposeWithMe','userID','/list','UniverInstanceType','saveCommentToSnapshot','CustomRangeType','_initUserSync','3128967YTScgS'];_0x2ff0=function(){return _0x54ef9a;};return _0x2ff0();}
1
+ function _0x1e10(_0x512148,_0x2ee8c3){_0x512148=_0x512148-0x67;const _0x404909=_0x4049();let _0x1e1039=_0x404909[_0x512148];return _0x1e1039;}(function(_0x104196,_0x2ec350){const _0x586797=_0x1e10,_0x59149f=_0x104196();while(!![]){try{const _0x9d4b96=parseInt(_0x586797(0x92))/0x1+parseInt(_0x586797(0xd4))/0x2+-parseInt(_0x586797(0xb7))/0x3+-parseInt(_0x586797(0xcc))/0x4+-parseInt(_0x586797(0xb5))/0x5+parseInt(_0x586797(0xac))/0x6*(parseInt(_0x586797(0xa8))/0x7)+-parseInt(_0x586797(0x6e))/0x8;if(_0x9d4b96===_0x2ec350)break;else _0x59149f['push'](_0x59149f['shift']());}catch(_0x3e6089){_0x59149f['push'](_0x59149f['shift']());}}}(_0x4049,0x8f55d),function(_0xe078fe,_0x1635f9){const _0x50102b=_0x1e10;typeof exports==_0x50102b(0xcb)&&typeof module<'u'?_0x1635f9(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==_0x50102b(0xdd)&&define[_0x50102b(0xcf)]?define([_0x50102b(0xb0),_0x50102b(0x7a),_0x50102b(0x91),_0x50102b(0xbf),'@univerjs/thread-comment-ui',_0x50102b(0xe5),_0x50102b(0x71),_0x50102b(0xd7)],_0x1635f9):(_0xe078fe=typeof globalThis<'u'?globalThis:_0xe078fe||self,_0x1635f9(_0xe078fe['UniverProThreadCommentDatasource']={},_0xe078fe[_0x50102b(0xa6)],_0xe078fe[_0x50102b(0x77)],_0xe078fe[_0x50102b(0x9c)],_0xe078fe[_0x50102b(0x90)],_0xe078fe[_0x50102b(0x96)],_0xe078fe[_0x50102b(0x71)],_0xe078fe[_0x50102b(0xe8)]));}(this,function(_0x8c5ac4,_0x150138,_0x41db44,_0x20b2cb,_0x422b9e,_0x452b2f,_0xd5333,_0x9f538c){'use strict';const _0x518227=_0x1e10;const _0x378f72=_0x518227(0x95);var _0x4a49df=(_0x51d771=>(_0x51d771[_0x51d771['OpenOrReOpen']=0x0]=_0x518227(0xd9),_0x51d771[_0x51d771[_0x518227(0x8d)]=0x1]=_0x518227(0x8d),_0x51d771[_0x51d771[_0x518227(0x6a)]=-0x1]=_0x518227(0x6a),_0x51d771))(_0x4a49df||{}),_0x39c2af=(_0x3d4198=>(_0x3d4198[_0x3d4198[_0x518227(0xb4)]=0x0]=_0x518227(0xb4),_0x3d4198[_0x3d4198[_0x518227(0x99)]=0x1]=_0x518227(0x99),_0x3d4198[_0x3d4198['Reply']=0x2]=_0x518227(0x9d),_0x3d4198[_0x3d4198[_0x518227(0xd0)]=0x3]='Edit',_0x3d4198[_0x3d4198[_0x518227(0x6f)]=0x4]=_0x518227(0x6f),_0x3d4198[_0x3d4198[_0x518227(0xe9)]=0x5]=_0x518227(0xe9),_0x3d4198[_0x3d4198[_0x518227(0x6a)]=-0x1]=_0x518227(0x6a),_0x3d4198))(_0x39c2af||{});const _0x21b2ba=_0x3039eb=>_0x20b2cb[_0x518227(0xea)](new Date(+_0x3039eb))[_0x518227(0x68)](_0x518227(0xba)),_0x555a25=async(_0x5f30a9,_0x5a5b52)=>{const _0x19177c=_0x518227,_0x4afab7=_0x5f30a9[_0x19177c(0xde)](_0x20b2cb[_0x19177c(0xc8)]),_0x2c7e1b=_0x5f30a9['get'](_0x9f538c[_0x19177c(0xbb)]);_0x5a5b52['forEach'](_0x39fc39=>{const _0x3ea067=_0x19177c;_0x4afab7[_0x3ea067(0xb9)](_0x39fc39)&&_0x5a5b52[_0x3ea067(0xa9)](_0x39fc39);}),_0x5a5b52['size']&&(await _0x2c7e1b['get'](_0x19177c(0x7d),{'params':{'userIDs':[..._0x5a5b52]}}))['body'][_0x19177c(0x85)][_0x19177c(0x7e)](_0x1519cf=>{const _0x110e45=_0x19177c;_0x1519cf&&_0x4afab7[_0x110e45(0x69)](_0x1519cf);});};var _0x32e3d9=Object[_0x518227(0xa5)],_0x40c1de=(_0xaebe00,_0x1b210b,_0x24abab,_0x3d3558)=>{const _0x362537=_0x518227;for(var _0x39e4f5=_0x3d3558>0x1?void 0x0:_0x3d3558?_0x32e3d9(_0x1b210b,_0x24abab):_0x1b210b,_0x1d416a=_0xaebe00[_0x362537(0xab)]-0x1,_0x3ce2c3;_0x1d416a>=0x0;_0x1d416a--)(_0x3ce2c3=_0xaebe00[_0x1d416a])&&(_0x39e4f5=_0x3ce2c3(_0x39e4f5)||_0x39e4f5);return _0x39e4f5;},_0x213a69=(_0x2595d3,_0x378ed7)=>(_0x53d753,_0x5bddd8)=>_0x378ed7(_0x53d753,_0x5bddd8,_0x2595d3);let _0x2021bf=class extends _0x20b2cb[_0x518227(0x88)]{constructor(_0x467d79,_0xb16511,_0x3a4511,_0x2d883c){const _0x215223=_0x518227;super(),this[_0x215223(0xa4)]=_0x467d79,this[_0x215223(0x8c)]=_0xb16511,this[_0x215223(0xda)]=_0x3a4511,this[_0x215223(0x78)]=_0x2d883c,this[_0x215223(0xdc)](),this[_0x215223(0xa3)]();}['_initUserSync'](){const _0x50dd91=_0x518227;this['disposeWithMe'](this[_0x50dd91(0x8c)][_0x50dd91(0xb2)][_0x50dd91(0xaa)](_0xd5333['bufferTime'](0x10))[_0x50dd91(0xe7)](_0x5a1e10=>{const _0x7a8d1b=_0x50dd91,_0x514c0a=new Set();_0x5a1e10[_0x7a8d1b(0x7e)](_0x1a5a9f=>{const _0x55b731=_0x7a8d1b;switch(_0x1a5a9f[_0x55b731(0x8a)]){case _0x55b731(0xbd):{const _0x32a87d=_0x1a5a9f[_0x55b731(0xe4)][_0x55b731(0x67)];_0x514c0a['add'](_0x32a87d);break;}}}),_0x555a25(this['_injector'],_0x514c0a);}));}[_0x518227(0xdc)](){const _0x13763a=_0x518227;this[_0x13763a(0xc9)](this['_commentService']['commentUpdate$']['subscribe'](async _0x533b69=>{const _0x650bbd=_0x13763a;var _0x13251c,_0x884367,_0x210d32,_0x53448d;const _0x18a952=(_0x13251c=this['_threadCommentModel']['getUnit'](_0x533b69[_0x650bbd(0xe0)])['find'](_0x4327a9=>_0x4327a9[_0x650bbd(0x86)]===_0x533b69[_0x650bbd(0x86)]))==null?void 0x0:_0x13251c[_0x650bbd(0xd1)];if(!_0x18a952)return;const {unitId:_0x5707dd,subUnitId:_0x490785}=_0x18a952;switch(_0x533b69['user']&&this['_userService']['addUser'](_0x533b69[_0x650bbd(0xc6)]),_0x533b69[_0x650bbd(0x8a)]){case _0x39c2af[_0x650bbd(0x99)]:break;case _0x39c2af[_0x650bbd(0x9d)]:{this['_threadCommentModel']['addComment'](_0x5707dd,_0x490785,{'unitId':_0x5707dd,'subUnitId':_0x490785,'ref':'','id':_0x533b69[_0x650bbd(0xce)],'dT':_0x21b2ba(+_0x533b69[_0x650bbd(0xca)]),'threadId':_0x533b69[_0x650bbd(0x86)],'personId':(_0x210d32=(_0x884367=_0x533b69[_0x650bbd(0xc6)])==null?void 0x0:_0x884367['userID'])!=null?_0x210d32:_0x533b69[_0x650bbd(0x79)],'text':JSON['parse'](_0x533b69[_0x650bbd(0xdf)]),'parentId':_0x18a952['id']});break;}case _0x39c2af[_0x650bbd(0x6f)]:{const _0x71bad=this[_0x650bbd(0x8c)][_0x650bbd(0xe2)](_0x5707dd,_0x490785,_0x533b69[_0x650bbd(0xce)]);_0x71bad&&_0x71bad['parentId']&&this['_threadCommentModel']['deleteComment'](_0x5707dd,_0x490785,_0x533b69[_0x650bbd(0xce)]);break;}case _0x39c2af[_0x650bbd(0xd0)]:{this[_0x650bbd(0x8c)]['updateComment'](_0x5707dd,_0x490785,{'commentId':_0x533b69[_0x650bbd(0xce)],'text':JSON[_0x650bbd(0xae)](_0x533b69[_0x650bbd(0xdf)])});break;}case _0x39c2af[_0x650bbd(0xe9)]:{const _0x2ccc66=(_0x53448d=this[_0x650bbd(0x8c)][_0x650bbd(0x87)](_0x533b69[_0x650bbd(0xe0)])['find'](_0x180e4a=>_0x180e4a[_0x650bbd(0x86)]===_0x533b69[_0x650bbd(0x86)]))==null?void 0x0:_0x53448d['root'];_0x2ccc66&&this['_threadCommentModel'][_0x650bbd(0xad)](_0x5707dd,_0x490785,_0x2ccc66['id'],_0x533b69[_0x650bbd(0xd2)]===_0x4a49df['Solved']);break;}}}));}};_0x2021bf=_0x40c1de([_0x213a69(0x0,_0x20b2cb[_0x518227(0x76)](_0x150138[_0x518227(0xaf)])),_0x213a69(0x1,_0x20b2cb['Inject'](_0x452b2f['ThreadCommentModel'])),_0x213a69(0x2,_0x20b2cb[_0x518227(0x76)](_0x20b2cb[_0x518227(0xc8)])),_0x213a69(0x3,_0x20b2cb[_0x518227(0x76)](_0x20b2cb['Injector']))],_0x2021bf);const _0xd4012=_0x518227(0x81),_0x12b701={};var _0x13bd95=Object[_0x518227(0xa5)],_0x1e9da9=(_0x257214,_0x49d8cc,_0xaa434b,_0x73aa5)=>{const _0x4105f4=_0x518227;for(var _0x50d19c=_0x73aa5>0x1?void 0x0:_0x73aa5?_0x13bd95(_0x49d8cc,_0xaa434b):_0x49d8cc,_0x3f62ac=_0x257214[_0x4105f4(0xab)]-0x1,_0x43b91f;_0x3f62ac>=0x0;_0x3f62ac--)(_0x43b91f=_0x257214[_0x3f62ac])&&(_0x50d19c=_0x43b91f(_0x50d19c)||_0x50d19c);return _0x50d19c;},_0x5ec117=(_0x2aecdb,_0x169b11)=>(_0x1d9617,_0x4cb2e8)=>_0x169b11(_0x1d9617,_0x4cb2e8,_0x2aecdb);function _0x3c462a(_0x289c47,_0x3fabb){const _0x28b727=_0x518227,_0x42b375=_0x289c47[_0x28b727(0x72)][0x0];return{..._0x3fabb,'id':_0x42b375[_0x28b727(0xce)],'resolved':_0x289c47[_0x28b727(0xd2)]===0x1,'dT':_0x21b2ba(_0x42b375[_0x28b727(0xca)]),'personId':_0x42b375['userId'],'threadId':_0x42b375[_0x28b727(0x86)]};}function _0x52bbc0(_0x1432c7,_0xa742e7,_0x28ff06){const _0x52146c=_0x518227;var _0x4cdfbd,_0x2abd54;if(((_0x2abd54=(_0x4cdfbd=_0x1432c7==null?void 0x0:_0x1432c7[_0x52146c(0x72)])==null?void 0x0:_0x4cdfbd[_0x52146c(0xab)])!=null?_0x2abd54:0x0)>0x0){const _0x4ec8b6=(_0x95cea8,_0xbf9922)=>({'id':_0x95cea8['replyId'],'threadId':_0x95cea8['threadId'],'dT':_0x21b2ba(_0x95cea8[_0x52146c(0xca)]),'personId':_0x95cea8[_0x52146c(0x79)],'resolved':_0x1432c7[_0x52146c(0xd2)]===_0x4a49df['Solved'],'unitId':_0xa742e7,'subUnitId':_0x28ff06,'text':JSON[_0x52146c(0xae)](_0x95cea8[_0x52146c(0xdf)]),'parentId':_0xbf9922}),_0x9a3d33=_0x4ec8b6(_0x1432c7[_0x52146c(0x72)][0x0]);return{..._0x9a3d33,'children':_0x1432c7['replies']['slice'](0x1)[_0x52146c(0xbe)](_0x36e757=>_0x4ec8b6(_0x36e757,_0x9a3d33['id']))};}return null;}let _0x2b8bfd=class{constructor(_0x25ef62,_0x1f6465,_0x2ac169){const _0x4ac67b=_0x518227;this[_0x4ac67b(0xd8)]=_0x25ef62,this['_userService']=_0x1f6465,this[_0x4ac67b(0xd5)]=_0x2ac169;}async['addComment'](_0x3741dd){const _0x53660f=_0x518227;var _0x4b88e8,_0x2656b2;const {parentId:_0x506af3,unitId:_0x53637c,text:_0x4ecfec,threadId:_0x5abcbb}=_0x3741dd,_0x248cad=(_0x2656b2=(_0x4b88e8=_0x4ecfec[_0x53660f(0xb6)])==null?void 0x0:_0x4b88e8[_0x53660f(0x9b)](_0x57c490=>_0x57c490[_0x53660f(0x9a)]===_0x20b2cb[_0x53660f(0x6c)][_0x53660f(0x97)])[_0x53660f(0xbe)](_0x21f21f=>_0x21f21f[_0x53660f(0x7f)]))!=null?_0x2656b2:[],_0x242dde=JSON[_0x53660f(0x83)](_0x4ecfec),_0x287395=(await this['_sessionService'][_0x53660f(0xa7)](_0x53637c))[_0x53660f(0xc2)]();if(_0x506af3){const _0xb23eab={'memberId':_0x287395,'unitId':_0x53637c,'content':_0x242dde,'mention':_0x248cad,'threadId':_0x5abcbb},_0x38c1aa=(await this[_0x53660f(0xd8)]['post'](_0x53660f(0xc5)+_0x53637c+_0x53660f(0xe6),{'body':_0xb23eab}))['body'][_0x53660f(0x9e)];return{..._0x3741dd,'id':_0x38c1aa[_0x53660f(0xce)],'dT':_0x20b2cb[_0x53660f(0xea)](+_0x38c1aa[_0x53660f(0xca)])[_0x53660f(0x68)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x38c1aa['userId']};}else{const _0x23feea={'memberId':_0x287395,'unitId':_0x53637c,'content':_0x242dde,'mention':_0x248cad},_0x35a650=await this['_httpService'][_0x53660f(0x73)](_0x53660f(0xc5)+_0x53637c+_0x53660f(0x8e),{'body':_0x23feea});return _0x3c462a(_0x35a650['body'][_0x53660f(0x84)],_0x3741dd);}}async[_0x518227(0x74)](_0x3560c4){const _0x4fdaf0=_0x518227;var _0x17be41,_0x4fb7b8;const {text:_0x3b64ac,unitId:_0x101030}=_0x3560c4,_0x33dffd=(_0x4fb7b8=(_0x17be41=_0x3b64ac['customRanges'])==null?void 0x0:_0x17be41['filter'](_0x5ef4a4=>_0x5ef4a4[_0x4fdaf0(0x9a)]===_0x20b2cb[_0x4fdaf0(0x6c)][_0x4fdaf0(0x97)])[_0x4fdaf0(0xbe)](_0x24389f=>_0x24389f['rangeId']))!=null?_0x4fb7b8:[],_0x38b5dc=JSON[_0x4fdaf0(0x83)](_0x3b64ac),_0x4df5cf=_0x3560c4['threadId'],_0x220387=_0x3560c4['id'],_0x4d6267={'memberId':(await this['_sessionService'][_0x4fdaf0(0xa7)](_0x101030))['getMemberID'](),'unitId':_0x101030,'threadId':_0x4df5cf,'mention':_0x33dffd,'content':_0x38b5dc,'replyId':_0x220387},_0x4688ea=await this[_0x4fdaf0(0xd8)][_0x4fdaf0(0x73)](_0x4fdaf0(0xc5)+_0x101030+_0x4fdaf0(0xa0),{'body':_0x4d6267});return!_0x4688ea[_0x4fdaf0(0xb3)][_0x4fdaf0(0xc0)]||_0x4688ea[_0x4fdaf0(0xb3)][_0x4fdaf0(0xc0)][_0x4fdaf0(0xc3)]===0x1;}async[_0x518227(0xad)](_0x4c8b32){const _0x515808=_0x518227,{unitId:_0x427b02}=_0x4c8b32,_0x4c09b7=_0x4c8b32[_0x515808(0x86)],_0x31184c={'memberId':this['_userService']['getCurrentUser']()[_0x515808(0xc1)],'unitId':_0x427b02,'threadId':_0x4c09b7,'solved':_0x4c8b32[_0x515808(0xc4)]?_0x4a49df[_0x515808(0x8d)]:_0x4a49df[_0x515808(0xd9)]},_0x3ccd92=await this[_0x515808(0xd8)][_0x515808(0x73)](_0x515808(0xc5)+_0x427b02+'/solved',{'body':_0x31184c});return!_0x3ccd92[_0x515808(0xb3)][_0x515808(0xc0)]||_0x3ccd92[_0x515808(0xb3)][_0x515808(0xc0)][_0x515808(0xc3)]===0x1;}async['deleteComment'](_0x13e7b3,_0x5a1f9c,_0x4f338a,_0x19c020){const _0x26841f=_0x518227,_0x20972b={'memberId':(await this[_0x26841f(0xd5)][_0x26841f(0xa7)](_0x13e7b3))[_0x26841f(0xc2)](),'threadId':_0x4f338a,'replyId':_0x19c020,'unitId':_0x13e7b3},_0x246971=await this['_httpService'][_0x26841f(0x73)](_0x26841f(0xc5)+_0x13e7b3+_0x26841f(0x6b),{'body':_0x20972b});return!_0x246971[_0x26841f(0xb3)][_0x26841f(0xc0)]||_0x246971[_0x26841f(0xb3)]['error'][_0x26841f(0xc3)]===0x1;}async[_0x518227(0x80)](_0x3035db,_0x3958bf,_0x4bd665){const _0x529cff=_0x518227,_0x21de8e={'unitId':_0x3035db,'threadId':_0x4bd665},_0x50bbe2=await this[_0x529cff(0xd8)][_0x529cff(0x73)](_0x529cff(0xc5)+_0x3035db+_0x529cff(0xe3),{'body':_0x21de8e}),_0x5bc75b=_0x4bd665[_0x529cff(0xbe)](_0x19cdee=>_0x52bbc0(_0x50bbe2[_0x529cff(0xb3)][_0x529cff(0x8b)][_0x19cdee],_0x3035db,_0x3958bf))['filter'](Boolean);return Object[_0x529cff(0xcd)](_0x50bbe2[_0x529cff(0xb3)][_0x529cff(0x85)])['forEach'](_0x5ce4cb=>{const _0x289ea6=_0x529cff;this[_0x289ea6(0xda)][_0x289ea6(0x69)](_0x5ce4cb);}),_0x5bc75b;}[_0x518227(0x75)](_0x4bcd1d){return{'id':_0x4bcd1d['id'],'threadId':_0x4bcd1d['threadId'],'ref':_0x4bcd1d['ref']};}};_0x2b8bfd=_0x1e9da9([_0x5ec117(0x0,_0x20b2cb[_0x518227(0x76)](_0x9f538c[_0x518227(0xbb)])),_0x5ec117(0x1,_0x20b2cb[_0x518227(0x76)](_0x20b2cb[_0x518227(0xc8)])),_0x5ec117(0x2,_0x20b2cb[_0x518227(0x76)](_0x150138['CollaborationSessionService']))],_0x2b8bfd);var _0x40aa5b=Object[_0x518227(0xa5)],_0x2864da=(_0x24cbed,_0x4522d9,_0x238b83,_0x5dc6da)=>{const _0x74259c=_0x518227;for(var _0x3b7039=_0x5dc6da>0x1?void 0x0:_0x5dc6da?_0x40aa5b(_0x4522d9,_0x238b83):_0x4522d9,_0x50cb7d=_0x24cbed[_0x74259c(0xab)]-0x1,_0x12b061;_0x50cb7d>=0x0;_0x50cb7d--)(_0x12b061=_0x24cbed[_0x50cb7d])&&(_0x3b7039=_0x12b061(_0x3b7039)||_0x3b7039);return _0x3b7039;},_0x348bbf=(_0x394d1d,_0x561967)=>(_0x517952,_0x18508f)=>_0x561967(_0x517952,_0x18508f,_0x394d1d);let _0x4c10ff=class extends _0x20b2cb['Disposable']{constructor(_0x132fe5,_0x591af8){const _0x37e73f=_0x518227;super(),this[_0x37e73f(0xd3)]=_0x132fe5,this[_0x37e73f(0xe1)]=_0x591af8,this[_0x37e73f(0x9f)]();}[_0x518227(0x9f)](){const _0x4dba7b=_0x518227;this[_0x4dba7b(0xd3)][_0x4dba7b(0xdb)]=this[_0x4dba7b(0xe1)],this[_0x4dba7b(0xd3)][_0x4dba7b(0xa2)]=!0x1;}};_0x4c10ff=_0x2864da([_0x348bbf(0x0,_0x452b2f[_0x518227(0x98)]),_0x348bbf(0x1,_0x20b2cb[_0x518227(0x76)](_0x2b8bfd))],_0x4c10ff);var _0x2140a9=Object['defineProperty'],_0x4a86ed=Object[_0x518227(0xa5)],_0x4eabb3=(_0x190cda,_0x21650a,_0xf1fa12)=>_0x21650a in _0x190cda?_0x2140a9(_0x190cda,_0x21650a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf1fa12}):_0x190cda[_0x21650a]=_0xf1fa12,_0x90131d=(_0x1205dd,_0x4a51cd,_0x4fe526,_0x2466a4)=>{const _0x4f42d6=_0x518227;for(var _0x3255e0=_0x2466a4>0x1?void 0x0:_0x2466a4?_0x4a86ed(_0x4a51cd,_0x4fe526):_0x4a51cd,_0x34cfca=_0x1205dd[_0x4f42d6(0xab)]-0x1,_0x58af97;_0x34cfca>=0x0;_0x34cfca--)(_0x58af97=_0x1205dd[_0x34cfca])&&(_0x3255e0=_0x58af97(_0x3255e0)||_0x3255e0);return _0x3255e0;},_0x7e1683=(_0x485826,_0x2d718d)=>(_0x1121de,_0xd6b854)=>_0x2d718d(_0x1121de,_0xd6b854,_0x485826),_0xbafd78=(_0x355641,_0x4780d0,_0x3ddd51)=>_0x4eabb3(_0x355641,typeof _0x4780d0!='symbol'?_0x4780d0+'':_0x4780d0,_0x3ddd51);_0x8c5ac4[_0x518227(0xb8)]=class extends _0x20b2cb['Plugin']{constructor(_0x11ad2c=_0x12b701,_0x518f52,_0x374606){const _0x3e03c3=_0x518227;super(),this[_0x3e03c3(0x8f)]=_0x11ad2c,this['_injector']=_0x518f52,this[_0x3e03c3(0x82)]=_0x374606;const {..._0x2df462}=_0x20b2cb[_0x3e03c3(0x93)]({},_0x12b701,this[_0x3e03c3(0x8f)]);this[_0x3e03c3(0x82)][_0x3e03c3(0xbc)](_0xd4012,_0x2df462);}[_0x518227(0xc7)](){const _0x1dfb57=_0x518227;[[_0x2b8bfd],[_0x4c10ff],[_0x2021bf]][_0x1dfb57(0x7e)](_0x483a63=>{const _0x48c6f4=_0x1dfb57;this[_0x48c6f4(0x78)]['add'](_0x483a63);});}[_0x518227(0xb1)](){const _0x4da6a1=_0x518227;this[_0x4da6a1(0x78)][_0x4da6a1(0xde)](_0x4c10ff),this['_injector'][_0x4da6a1(0xde)](_0x2021bf);}},_0xbafd78(_0x8c5ac4[_0x518227(0xb8)],'pluginName',_0x378f72),_0xbafd78(_0x8c5ac4[_0x518227(0xb8)],'type',_0x20b2cb[_0x518227(0xd6)][_0x518227(0x7b)]),_0x8c5ac4[_0x518227(0xb8)]=_0x90131d([_0x20b2cb[_0x518227(0x94)](_0x422b9e['UniverThreadCommentUIPlugin'],_0x150138[_0x518227(0x6d)],_0x41db44['UniverLicensePlugin']),_0x7e1683(0x1,_0x20b2cb[_0x518227(0x76)](_0x20b2cb[_0x518227(0x89)])),_0x7e1683(0x2,_0x20b2cb['IConfigService'])],_0x8c5ac4[_0x518227(0xb8)]),Object[_0x518227(0x70)](_0x8c5ac4,Symbol[_0x518227(0xa1)],{'value':_0x518227(0x7c)});}));function _0x4049(){const _0x39bf12=['Edit','root','solved','_threadCommentDataSourceService','1078990nHrzGv','_sessionService','UniverInstanceType','@univerjs/network','_httpService','OpenOrReOpen','_userService','dataSource','_init','function','get','content','unitId','_threadCommentDataSource','getComment','/list','payload','@univerjs/thread-comment','/reply','subscribe','UniverNetwork','Solve','dayjs','personId','format','addUser','UNRECOGNIZED','/delete','CustomRangeType','UniverCollaborationClientPlugin','1108864xDxIzK','Delete','defineProperty','rxjs','replies','post','updateComment','saveCommentToSnapshot','Inject','UniverProLicense','_injector','userId','@univerjs-pro/collaboration-client','UNIVER_UNKNOWN','Module','/universer-api/user/list','forEach','rangeId','listComments','thread-comment-data-source.config','_configService','stringify','comment','users','threadId','getUnit','Disposable','Injector','type','comments','_threadCommentModel','Solved','/add','_config','UniverThreadCommentUi','@univerjs-pro/license','786372HcNVZo','merge','DependentOn','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadComment','COMMENT','IThreadCommentDataSourceService','Add','rangeType','filter','UniverCore','Reply','reply','_initDataSource','/edit','toStringTag','syncUpdateMutationToColla','_initUserSync','_commentService','getOwnPropertyDescriptor','UniverProCollaborationClient','requireSession','63jOAwxh','delete','pipe','length','602466pjRWgY','resolveComment','parse','CommentService','exports','onReady','commentUpdate$','body','Unknown','1147360qIuSXe','customRanges','2384244rRYBel','UniverThreadCommentDataSourcePlugin','getUser','YYYY/MM/DD\x20HH:mm','HTTPService','setConfig','add','map','@univerjs/core','error','userID','getMemberID','code','resolved','/universer-api/comment/unit/','user','onStarting','UserManagerService','disposeWithMe','createTimestamp','object','1918548GsNzdI','values','replyId','amd'];_0x4049=function(){return _0x39bf12;};return _0x4049();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.13.0-insiders.20251218-2062647",
3
+ "version": "0.13.0-insiders.20251223-857805c",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.13.0-insiders.20251218-2062647",
49
- "@univerjs-pro/license": "0.13.0-insiders.20251218-2062647",
50
- "@univerjs/core": "0.13.0-insiders.20251218-2062647",
51
- "@univerjs/network": "0.13.0-insiders.20251218-2062647",
48
+ "@univerjs-pro/collaboration-client": "0.13.0-insiders.20251223-857805c",
49
+ "@univerjs-pro/license": "0.13.0-insiders.20251223-857805c",
50
+ "@univerjs/network": "0.13.0-insiders.20251223-857805c",
51
+ "@univerjs/core": "0.13.0-insiders.20251223-857805c",
52
52
  "@univerjs/protocol": "0.1.47",
53
- "@univerjs/thread-comment": "0.13.0-insiders.20251218-2062647",
54
- "@univerjs/thread-comment-ui": "0.13.0-insiders.20251218-2062647"
53
+ "@univerjs/thread-comment-ui": "0.13.0-insiders.20251223-857805c",
54
+ "@univerjs/thread-comment": "0.13.0-insiders.20251223-857805c"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",