@univerjs-pro/thread-comment-datasource 0.6.7-experimental.20250331-1a09136 → 0.6.7-experimental.20250331-25f6e0e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x4f7d5f=_0x4576;(function(_0x1ed414,_0x53fd5c){const _0x57a443=_0x4576,_0x5d9ee5=_0x1ed414();while(!![]){try{const _0x585afb=-parseInt(_0x57a443(0xfa))/0x1+-parseInt(_0x57a443(0x132))/0x2*(parseInt(_0x57a443(0x135))/0x3)+-parseInt(_0x57a443(0x123))/0x4+-parseInt(_0x57a443(0x160))/0x5+parseInt(_0x57a443(0x12e))/0x6+parseInt(_0x57a443(0x143))/0x7*(parseInt(_0x57a443(0x16e))/0x8)+parseInt(_0x57a443(0x164))/0x9;if(_0x585afb===_0x53fd5c)break;else _0x5d9ee5['push'](_0x5d9ee5['shift']());}catch(_0x3a3f5a){_0x5d9ee5['push'](_0x5d9ee5['shift']());}}}(_0x105b,0x3592d));Object['defineProperty'](exports,Symbol[_0x4f7d5f(0x104)],{'value':_0x4f7d5f(0x12d)});const b=require(_0x4f7d5f(0x13a)),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require(_0x4f7d5f(0xfb)),M=require(_0x4f7d5f(0x129)),w=require(_0x4f7d5f(0x150)),P=require(_0x4f7d5f(0x157)),U=_0x4f7d5f(0x141);var I=(_0x18c264=>(_0x18c264[_0x18c264[_0x4f7d5f(0x112)]=0x0]=_0x4f7d5f(0x112),_0x18c264[_0x18c264[_0x4f7d5f(0x156)]=0x1]=_0x4f7d5f(0x156),_0x18c264[_0x18c264[_0x4f7d5f(0x12f)]=-0x1]=_0x4f7d5f(0x12f),_0x18c264))(I||{}),v=(_0x339c76=>(_0x339c76[_0x339c76['Unknown']=0x0]=_0x4f7d5f(0x12a),_0x339c76[_0x339c76['Add']=0x1]='Add',_0x339c76[_0x339c76[_0x4f7d5f(0x154)]=0x2]=_0x4f7d5f(0x154),_0x339c76[_0x339c76[_0x4f7d5f(0x140)]=0x3]=_0x4f7d5f(0x140),_0x339c76[_0x339c76[_0x4f7d5f(0x158)]=0x4]='Delete',_0x339c76[_0x339c76[_0x4f7d5f(0x14b)]=0x5]=_0x4f7d5f(0x14b),_0x339c76[_0x339c76[_0x4f7d5f(0x12f)]=-0x1]=_0x4f7d5f(0x12f),_0x339c76))(v||{});const f=_0x1c0a9c=>c[_0x4f7d5f(0x162)](new Date(+_0x1c0a9c))[_0x4f7d5f(0x167)](_0x4f7d5f(0x126)),R=async(_0x480a90,_0x12e826)=>{const _0x3e61b6=_0x4f7d5f,_0x4967ba=_0x480a90[_0x3e61b6(0x161)](c[_0x3e61b6(0x151)]),_0x211123=_0x480a90[_0x3e61b6(0x161)](P[_0x3e61b6(0x138)]);_0x12e826['forEach'](_0x265931=>{const _0x4c7217=_0x3e61b6;_0x4967ba[_0x4c7217(0x14e)](_0x265931)&&_0x12e826['delete'](_0x265931);}),_0x12e826[_0x3e61b6(0x169)]&&(await _0x211123[_0x3e61b6(0x161)](_0x3e61b6(0x15c),{'params':{'userIDs':[..._0x12e826]}}))[_0x3e61b6(0xfd)][_0x3e61b6(0x153)][_0x3e61b6(0x133)](_0x2cac8f=>{const _0x2cad4f=_0x3e61b6;_0x2cac8f&&_0x4967ba[_0x2cad4f(0x148)](_0x2cac8f);});};function _0x105b(){const _0x397150=['resolveComment','_configService','rangeType','comments','_httpService','OpenOrReOpen','disposeWithMe','DependentOn','error','COMMENT','updateComment','Plugin','content','thread-comment-data-source.config','filter','/reply','length','root','CollaborationSessionService','UniverCollaborationClientPlugin','replies','createTimestamp','1067644VPBAmZ','symbol','dataSource','YYYY/MM/DD\x20HH:mm','getMemberID','onReady','@univerjs/thread-comment','Unknown','reply','requireSession','Module','1609542DtaLNc','UNRECOGNIZED','stringify','onStarting','558rJvgrI','forEach','_init','2511mePNMO','_threadCommentModel','_initUserSync','HTTPService','commentUpdate$','@univerjs-pro/collaboration-client','_injector','post','Disposable','_initDataSource','CustomRangeType','Edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','235459VwPgib','Add','_config','_commentService','/add','addUser','Inject','userID','Solve','subscribe','UNIVER_UNKNOWN','getUser','defineProperty','rxjs','UserManagerService','userId','users','Reply','getOwnPropertyDescriptor','Solved','@univerjs/network','Delete','UniverLicensePlugin','/universer-api/comment/unit/','_threadCommentDataSource','/universer-api/user/list','IConfigService','Injector','getComment','191405WEZpny','get','dayjs','rangeId','7667064MZVoYw','/edit','listComments','format','/delete','size','values','pluginName','UniverThreadCommentDataSourcePlugin','IThreadCommentDataSourceService','8EinSNx','add','/list','parentId','_sessionService','UniverInstanceType','slice','map','395638OaPWXr','@univerjs/thread-comment-ui','threadId','body','customRanges','comment','getCurrentUser','user','replyId','_threadCommentDataSourceService','toStringTag','ThreadCommentModel','payload','unitId','pipe','type','addComment','find','solved'];_0x105b=function(){return _0x397150;};return _0x105b();}var $=Object[_0x4f7d5f(0x155)],E=(_0x4f2e79,_0x85a310,_0x36ca61,_0x1f576a)=>{const _0x2e9135=_0x4f7d5f;for(var _0x57a948=_0x1f576a>0x1?void 0x0:_0x1f576a?$(_0x85a310,_0x36ca61):_0x85a310,_0x11f1ac=_0x4f2e79[_0x2e9135(0x11d)]-0x1,_0x492fff;_0x11f1ac>=0x0;_0x11f1ac--)(_0x492fff=_0x4f2e79[_0x11f1ac])&&(_0x57a948=_0x492fff(_0x57a948)||_0x57a948);return _0x57a948;},S=(_0x1a23f5,_0x2bace4)=>(_0x35799e,_0x505618)=>_0x2bace4(_0x35799e,_0x505618,_0x1a23f5);let p=class extends c[_0x4f7d5f(0x13d)]{constructor(_0x442acb,_0xad4e6,_0x3d1574,_0x36b384){const _0x916dd8=_0x4f7d5f;super(),this[_0x916dd8(0x146)]=_0x442acb,this[_0x916dd8(0x136)]=_0xad4e6,this[_0x916dd8(0x142)]=_0x3d1574,this[_0x916dd8(0x13b)]=_0x36b384,this['_init'](),this[_0x916dd8(0x137)]();}[_0x4f7d5f(0x137)](){const _0x2b536b=_0x4f7d5f;this['disposeWithMe'](this[_0x2b536b(0x136)][_0x2b536b(0x139)][_0x2b536b(0x108)](w['bufferTime'](0x10))[_0x2b536b(0x14c)](_0x1797a0=>{const _0x5bb6d7=_0x2b536b,_0x374349=new Set();_0x1797a0['forEach'](_0x4d27f2=>{const _0x440eed=_0x4576;switch(_0x4d27f2[_0x440eed(0x109)]){case _0x440eed(0x16f):{const _0x1a4b82=_0x4d27f2[_0x440eed(0x106)]['personId'];_0x374349['add'](_0x1a4b82);break;}}}),R(this[_0x5bb6d7(0x13b)],_0x374349);}));}[_0x4f7d5f(0x134)](){const _0x450168=_0x4f7d5f;this[_0x450168(0x113)](this[_0x450168(0x146)][_0x450168(0x139)][_0x450168(0x14c)](async _0x358cc3=>{const _0x1ce19e=_0x450168;var _0x27533e,_0xe17254,_0x4131ce,_0x232e31;const _0x380eb0=(_0x27533e=this[_0x1ce19e(0x136)]['getUnit'](_0x358cc3[_0x1ce19e(0x107)])['find'](_0x22ef04=>_0x22ef04[_0x1ce19e(0xfc)]===_0x358cc3[_0x1ce19e(0xfc)]))==null?void 0x0:_0x27533e['root'];if(!_0x380eb0)return;const {unitId:_0x1dda9a,subUnitId:_0xec946c}=_0x380eb0;switch(_0x358cc3[_0x1ce19e(0x101)]&&this[_0x1ce19e(0x142)]['addUser'](_0x358cc3['user']),_0x358cc3[_0x1ce19e(0x109)]){case v[_0x1ce19e(0x144)]:break;case v[_0x1ce19e(0x154)]:{this[_0x1ce19e(0x136)]['addComment'](_0x1dda9a,_0xec946c,{'unitId':_0x1dda9a,'subUnitId':_0xec946c,'ref':'','id':_0x358cc3[_0x1ce19e(0x102)],'dT':f(+_0x358cc3[_0x1ce19e(0x122)]),'threadId':_0x358cc3[_0x1ce19e(0xfc)],'personId':(_0x4131ce=(_0xe17254=_0x358cc3['user'])==null?void 0x0:_0xe17254[_0x1ce19e(0x14a)])!=null?_0x4131ce:_0x358cc3[_0x1ce19e(0x152)],'text':JSON['parse'](_0x358cc3[_0x1ce19e(0x119)]),'parentId':_0x380eb0['id']});break;}case v['Delete']:{const _0x505038=this[_0x1ce19e(0x136)][_0x1ce19e(0x15f)](_0x1dda9a,_0xec946c,_0x358cc3[_0x1ce19e(0x102)]);_0x505038&&_0x505038[_0x1ce19e(0x171)]&&this[_0x1ce19e(0x136)]['deleteComment'](_0x1dda9a,_0xec946c,_0x358cc3[_0x1ce19e(0x102)]);break;}case v[_0x1ce19e(0x140)]:{this['_threadCommentModel'][_0x1ce19e(0x117)](_0x1dda9a,_0xec946c,{'commentId':_0x358cc3[_0x1ce19e(0x102)],'text':JSON['parse'](_0x358cc3['content'])});break;}case v[_0x1ce19e(0x14b)]:{const _0x45e0c3=(_0x232e31=this[_0x1ce19e(0x136)]['getUnit'](_0x358cc3['unitId'])[_0x1ce19e(0x10b)](_0x53569a=>_0x53569a[_0x1ce19e(0xfc)]===_0x358cc3[_0x1ce19e(0xfc)]))==null?void 0x0:_0x232e31[_0x1ce19e(0x11e)];_0x45e0c3&&this['_threadCommentModel']['resolveComment'](_0x1dda9a,_0xec946c,_0x45e0c3['id'],_0x358cc3[_0x1ce19e(0x10c)]===I[_0x1ce19e(0x156)]);break;}}}));}};p=E([S(0x0,c[_0x4f7d5f(0x149)](b['CommentService'])),S(0x1,c[_0x4f7d5f(0x149)](M[_0x4f7d5f(0x105)])),S(0x2,c[_0x4f7d5f(0x149)](c[_0x4f7d5f(0x151)])),S(0x3,c['Inject'](c[_0x4f7d5f(0x15e)]))],p);const q=_0x4f7d5f(0x11a),D={};var A=Object[_0x4f7d5f(0x155)],x=(_0x4fc890,_0xbba8cd,_0x142db5,_0x392614)=>{for(var _0x56af93=_0x392614>0x1?void 0x0:_0x392614?A(_0xbba8cd,_0x142db5):_0xbba8cd,_0x1175a1=_0x4fc890['length']-0x1,_0x27e5e1;_0x1175a1>=0x0;_0x1175a1--)(_0x27e5e1=_0x4fc890[_0x1175a1])&&(_0x56af93=_0x27e5e1(_0x56af93)||_0x56af93);return _0x56af93;},_=(_0x42ad0c,_0x3dccb0)=>(_0x3f9f1e,_0x33d027)=>_0x3dccb0(_0x3f9f1e,_0x33d027,_0x42ad0c);function _0x4576(_0x569a68,_0x2cee1c){const _0x105b7b=_0x105b();return _0x4576=function(_0x457621,_0x1b754e){_0x457621=_0x457621-0xf7;let _0x50dfda=_0x105b7b[_0x457621];return _0x50dfda;},_0x4576(_0x569a68,_0x2cee1c);}function Y(_0x1ad10e,_0x2717c4){const _0x3005bd=_0x4f7d5f,_0x2a4a62=_0x1ad10e[_0x3005bd(0x121)][0x0];return{..._0x2717c4,'id':_0x2a4a62[_0x3005bd(0x102)],'resolved':_0x1ad10e['solved']===0x1,'dT':f(_0x2a4a62['createTimestamp']),'personId':_0x2a4a62[_0x3005bd(0x152)],'threadId':_0x2a4a62['threadId']};}function G(_0x140a35,_0xcd6c9d,_0x2dca0e){const _0x120678=_0x4f7d5f;var _0x57ae3b,_0x47914b;if(((_0x47914b=(_0x57ae3b=_0x140a35==null?void 0x0:_0x140a35['replies'])==null?void 0x0:_0x57ae3b[_0x120678(0x11d)])!=null?_0x47914b:0x0)>0x0){const _0x4eb57f=(_0x5bd891,_0x2a6b29)=>({'id':_0x5bd891[_0x120678(0x102)],'threadId':_0x5bd891[_0x120678(0xfc)],'dT':f(_0x5bd891[_0x120678(0x122)]),'personId':_0x5bd891[_0x120678(0x152)],'resolved':_0x140a35[_0x120678(0x10c)]===I[_0x120678(0x156)],'unitId':_0xcd6c9d,'subUnitId':_0x2dca0e,'text':JSON['parse'](_0x5bd891[_0x120678(0x119)]),'parentId':_0x2a6b29}),_0x1a40aa=_0x4eb57f(_0x140a35[_0x120678(0x121)][0x0]);return{..._0x1a40aa,'children':_0x140a35[_0x120678(0x121)][_0x120678(0xf8)](0x1)[_0x120678(0xf9)](_0x32e6b4=>_0x4eb57f(_0x32e6b4,_0x1a40aa['id']))};}return null;}let g=class{constructor(_0x38056a,_0x204f9c,_0x357958,_0x1d8ac1){const _0x572664=_0x4f7d5f;this[_0x572664(0x111)]=_0x38056a,this[_0x572664(0x142)]=_0x204f9c,this[_0x572664(0x172)]=_0x357958,this[_0x572664(0x13b)]=_0x1d8ac1;}async[_0x4f7d5f(0x10a)](_0xb4aa23){const _0x2d5a52=_0x4f7d5f;var _0x523c5a,_0x563a80;const {parentId:_0x5a4e6a,unitId:_0x2cef49,text:_0xa52d48,threadId:_0x200bd9}=_0xb4aa23,_0x42a1a3=(_0x563a80=(_0x523c5a=_0xa52d48[_0x2d5a52(0xfe)])==null?void 0x0:_0x523c5a[_0x2d5a52(0x11b)](_0x2d4fcd=>_0x2d4fcd[_0x2d5a52(0x10f)]===c[_0x2d5a52(0x13f)][_0x2d5a52(0x116)])[_0x2d5a52(0xf9)](_0x2faffa=>_0x2faffa['rangeId']))!=null?_0x563a80:[],_0x48c2ee=JSON[_0x2d5a52(0x130)](_0xa52d48),_0x1007b2=(await this[_0x2d5a52(0x172)][_0x2d5a52(0x12c)](_0x2cef49))['getMemberID']();if(_0x5a4e6a){const _0x45afaa={'memberId':_0x1007b2,'unitId':_0x2cef49,'content':_0x48c2ee,'mention':_0x42a1a3,'threadId':_0x200bd9},_0x48986b=(await this[_0x2d5a52(0x111)][_0x2d5a52(0x13c)](_0x2d5a52(0x15a)+_0x2cef49+_0x2d5a52(0x11c),{'body':_0x45afaa}))['body'][_0x2d5a52(0x12b)];return{..._0xb4aa23,'id':_0x48986b[_0x2d5a52(0x102)],'dT':c[_0x2d5a52(0x162)](+_0x48986b[_0x2d5a52(0x122)])[_0x2d5a52(0x167)](_0x2d5a52(0x126)),'personId':_0x48986b['userId']};}else{const _0x490233={'memberId':_0x1007b2,'unitId':_0x2cef49,'content':_0x48c2ee,'mention':_0x42a1a3},_0x229271=await this[_0x2d5a52(0x111)][_0x2d5a52(0x13c)](_0x2d5a52(0x15a)+_0x2cef49+_0x2d5a52(0x147),{'body':_0x490233});return Y(_0x229271['body'][_0x2d5a52(0xff)],_0xb4aa23);}}async[_0x4f7d5f(0x117)](_0x1d2473){const _0x184ac8=_0x4f7d5f;var _0x11f30f,_0x3fab2c;const {text:_0x36604a,unitId:_0x43fc73}=_0x1d2473,_0xc50916=(_0x3fab2c=(_0x11f30f=_0x36604a[_0x184ac8(0xfe)])==null?void 0x0:_0x11f30f[_0x184ac8(0x11b)](_0x4439fb=>_0x4439fb[_0x184ac8(0x10f)]===c[_0x184ac8(0x13f)][_0x184ac8(0x116)])[_0x184ac8(0xf9)](_0x2aa148=>_0x2aa148[_0x184ac8(0x163)]))!=null?_0x3fab2c:[],_0x138543=JSON[_0x184ac8(0x130)](_0x36604a),_0x211ba0=_0x1d2473['threadId'],_0x1e13f1=_0x1d2473['id'],_0x960fa0={'memberId':(await this[_0x184ac8(0x172)][_0x184ac8(0x12c)](_0x43fc73))[_0x184ac8(0x127)](),'unitId':_0x43fc73,'threadId':_0x211ba0,'mention':_0xc50916,'content':_0x138543,'replyId':_0x1e13f1},_0x3dc6de=await this['_httpService'][_0x184ac8(0x13c)](_0x184ac8(0x15a)+_0x43fc73+_0x184ac8(0x165),{'body':_0x960fa0});return!_0x3dc6de[_0x184ac8(0xfd)][_0x184ac8(0x115)]||_0x3dc6de[_0x184ac8(0xfd)][_0x184ac8(0x115)]['code']===0x1;}async[_0x4f7d5f(0x10d)](_0x185f27){const _0x4ee2cb=_0x4f7d5f,{unitId:_0x22d3b7}=_0x185f27,_0x51150a=_0x185f27[_0x4ee2cb(0xfc)],_0x30fcec={'memberId':this[_0x4ee2cb(0x142)][_0x4ee2cb(0x100)]()[_0x4ee2cb(0x14a)],'unitId':_0x22d3b7,'threadId':_0x51150a,'solved':_0x185f27['resolved']?I[_0x4ee2cb(0x156)]:I['OpenOrReOpen']},_0x32ed56=await this[_0x4ee2cb(0x111)][_0x4ee2cb(0x13c)](_0x4ee2cb(0x15a)+_0x22d3b7+'/solved',{'body':_0x30fcec});return!_0x32ed56[_0x4ee2cb(0xfd)][_0x4ee2cb(0x115)]||_0x32ed56['body'][_0x4ee2cb(0x115)]['code']===0x1;}async['deleteComment'](_0xed0726,_0xe28250,_0x5ac9d4,_0x93973e){const _0x4b631a=_0x4f7d5f,_0x368aa3={'memberId':(await this[_0x4b631a(0x172)][_0x4b631a(0x12c)](_0xed0726))[_0x4b631a(0x127)](),'threadId':_0x5ac9d4,'replyId':_0x93973e,'unitId':_0xed0726},_0x22b7f8=await this[_0x4b631a(0x111)][_0x4b631a(0x13c)]('/universer-api/comment/unit/'+_0xed0726+_0x4b631a(0x168),{'body':_0x368aa3});return!_0x22b7f8[_0x4b631a(0xfd)][_0x4b631a(0x115)]||_0x22b7f8[_0x4b631a(0xfd)][_0x4b631a(0x115)]['code']===0x1;}async[_0x4f7d5f(0x166)](_0x415fcc,_0xbb663c,_0x3c10bb){const _0x44f773=_0x4f7d5f,_0x36fa87={'unitId':_0x415fcc,'threadId':_0x3c10bb},_0x103a13=await this[_0x44f773(0x111)][_0x44f773(0x13c)](_0x44f773(0x15a)+_0x415fcc+_0x44f773(0x170),{'body':_0x36fa87}),_0x5b36d4=_0x3c10bb[_0x44f773(0xf9)](_0x213104=>G(_0x103a13['body'][_0x44f773(0x110)][_0x213104],_0x415fcc,_0xbb663c))[_0x44f773(0x11b)](Boolean);return Object[_0x44f773(0x16a)](_0x103a13[_0x44f773(0xfd)][_0x44f773(0x153)])[_0x44f773(0x133)](_0x4ff936=>{const _0x4db673=_0x44f773;this[_0x4db673(0x142)]['addUser'](_0x4ff936);}),_0x5b36d4;}['saveCommentToSnapshot'](_0x566549){const _0x5a6f08=_0x4f7d5f;return{'id':_0x566549['id'],'threadId':_0x566549[_0x5a6f08(0xfc)],'ref':_0x566549['ref']};}};g=x([_(0x0,c[_0x4f7d5f(0x149)](P[_0x4f7d5f(0x138)])),_(0x1,c[_0x4f7d5f(0x149)](c[_0x4f7d5f(0x151)])),_(0x2,c['Inject'](b[_0x4f7d5f(0x11f)])),_(0x3,c[_0x4f7d5f(0x149)](c[_0x4f7d5f(0x15e)]))],g);var H=Object[_0x4f7d5f(0x155)],J=(_0x5a8a4e,_0x510c24,_0x428176,_0x4edcf1)=>{const _0xffaf5b=_0x4f7d5f;for(var _0x4f9870=_0x4edcf1>0x1?void 0x0:_0x4edcf1?H(_0x510c24,_0x428176):_0x510c24,_0x5ae0f6=_0x5a8a4e[_0xffaf5b(0x11d)]-0x1,_0x37af9c;_0x5ae0f6>=0x0;_0x5ae0f6--)(_0x37af9c=_0x5a8a4e[_0x5ae0f6])&&(_0x4f9870=_0x37af9c(_0x4f9870)||_0x4f9870);return _0x4f9870;},y=(_0x30937d,_0x33fa3b)=>(_0x5b3084,_0x3cf5ca)=>_0x33fa3b(_0x5b3084,_0x3cf5ca,_0x30937d);let C=class extends c[_0x4f7d5f(0x13d)]{constructor(_0x326dbc,_0x510996){const _0xc79541=_0x4f7d5f;super(),this[_0xc79541(0x103)]=_0x326dbc,this[_0xc79541(0x15b)]=_0x510996,this[_0xc79541(0x13e)]();}[_0x4f7d5f(0x13e)](){const _0x1c5b6e=_0x4f7d5f;this[_0x1c5b6e(0x103)][_0x1c5b6e(0x125)]=this['_threadCommentDataSource'],this[_0x1c5b6e(0x103)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x4f7d5f(0x16d)]),y(0x1,c[_0x4f7d5f(0x149)](g))],C);var F=Object[_0x4f7d5f(0x14f)],L=Object[_0x4f7d5f(0x155)],Z=(_0x46f35d,_0x35dc4b,_0x2d1168)=>_0x35dc4b in _0x46f35d?F(_0x46f35d,_0x35dc4b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2d1168}):_0x46f35d[_0x35dc4b]=_0x2d1168,W=(_0x4d478e,_0x3cd590,_0x12fd7d,_0x2c7e70)=>{const _0x49abea=_0x4f7d5f;for(var _0x4e678b=_0x2c7e70>0x1?void 0x0:_0x2c7e70?L(_0x3cd590,_0x12fd7d):_0x3cd590,_0x560264=_0x4d478e[_0x49abea(0x11d)]-0x1,_0x48db85;_0x560264>=0x0;_0x560264--)(_0x48db85=_0x4d478e[_0x560264])&&(_0x4e678b=_0x48db85(_0x4e678b)||_0x4e678b);return _0x4e678b;},O=(_0x4a0076,_0x156de8)=>(_0x29d0fc,_0x120fea)=>_0x156de8(_0x29d0fc,_0x120fea,_0x4a0076),N=(_0x376330,_0x170af0,_0x2756f4)=>Z(_0x376330,typeof _0x170af0!=_0x4f7d5f(0x124)?_0x170af0+'':_0x170af0,_0x2756f4);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4f7d5f(0x118)]{constructor(_0x5394b9=D,_0x266dfb,_0x5077e4){const _0x290b5c=_0x4f7d5f;super(),this[_0x290b5c(0x145)]=_0x5394b9,this[_0x290b5c(0x13b)]=_0x266dfb,this[_0x290b5c(0x10e)]=_0x5077e4;const {..._0x519c85}=c['merge']({},D,this[_0x290b5c(0x145)]);this[_0x290b5c(0x10e)]['setConfig'](q,_0x519c85);}[_0x4f7d5f(0x131)](){const _0x3f3005=_0x4f7d5f;[[g],[C],[p]][_0x3f3005(0x133)](_0x12d738=>{const _0x229420=_0x3f3005;this[_0x229420(0x13b)][_0x229420(0x16f)](_0x12d738);});}[_0x4f7d5f(0x128)](){const _0x5a10f8=_0x4f7d5f;this[_0x5a10f8(0x13b)][_0x5a10f8(0x161)](C),this['_injector']['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x4f7d5f(0x16b),U),N(exports[_0x4f7d5f(0x16c)],_0x4f7d5f(0x109),c[_0x4f7d5f(0xf7)][_0x4f7d5f(0x14d)]),exports[_0x4f7d5f(0x16c)]=W([c[_0x4f7d5f(0x114)](j['UniverThreadCommentUIPlugin'],b[_0x4f7d5f(0x120)],T[_0x4f7d5f(0x159)]),O(0x1,c['Inject'](c[_0x4f7d5f(0x15e)])),O(0x2,c[_0x4f7d5f(0x15d)])],exports[_0x4f7d5f(0x16c)]);
|
|
1
|
+
'use strict';const _0xf31ee5=_0x53b0;function _0x53b0(_0x1198f6,_0x110178){const _0x373e07=_0x373e();return _0x53b0=function(_0x53b00b,_0x5b81c9){_0x53b00b=_0x53b00b-0x169;let _0x4175da=_0x373e07[_0x53b00b];return _0x4175da;},_0x53b0(_0x1198f6,_0x110178);}(function(_0x3fe8bb,_0x2d68bf){const _0x3fd657=_0x53b0,_0x1a960a=_0x3fe8bb();while(!![]){try{const _0x36be69=parseInt(_0x3fd657(0x1ca))/0x1+parseInt(_0x3fd657(0x1ce))/0x2+-parseInt(_0x3fd657(0x1d4))/0x3*(-parseInt(_0x3fd657(0x192))/0x4)+-parseInt(_0x3fd657(0x189))/0x5+-parseInt(_0x3fd657(0x1c9))/0x6*(parseInt(_0x3fd657(0x1c5))/0x7)+-parseInt(_0x3fd657(0x1b4))/0x8+parseInt(_0x3fd657(0x1bf))/0x9*(-parseInt(_0x3fd657(0x173))/0xa);if(_0x36be69===_0x2d68bf)break;else _0x1a960a['push'](_0x1a960a['shift']());}catch(_0x2025f6){_0x1a960a['push'](_0x1a960a['shift']());}}}(_0x373e,0xf231d));Object['defineProperty'](exports,Symbol[_0xf31ee5(0x193)],{'value':'Module'});const b=require(_0xf31ee5(0x1cc)),T=require(_0xf31ee5(0x1db)),c=require('@univerjs/core'),j=require(_0xf31ee5(0x1bb)),M=require(_0xf31ee5(0x1ab)),w=require(_0xf31ee5(0x172)),P=require(_0xf31ee5(0x1a7)),U=_0xf31ee5(0x1c8);var I=(_0xdf70ee=>(_0xdf70ee[_0xdf70ee[_0xf31ee5(0x17c)]=0x0]=_0xf31ee5(0x17c),_0xdf70ee[_0xdf70ee['Solved']=0x1]=_0xf31ee5(0x16c),_0xdf70ee[_0xdf70ee[_0xf31ee5(0x185)]=-0x1]=_0xf31ee5(0x185),_0xdf70ee))(I||{}),v=(_0x283704=>(_0x283704[_0x283704[_0xf31ee5(0x18d)]=0x0]=_0xf31ee5(0x18d),_0x283704[_0x283704['Add']=0x1]='Add',_0x283704[_0x283704[_0xf31ee5(0x175)]=0x2]='Reply',_0x283704[_0x283704[_0xf31ee5(0x182)]=0x3]='Edit',_0x283704[_0x283704['Delete']=0x4]=_0xf31ee5(0x16e),_0x283704[_0x283704[_0xf31ee5(0x1b6)]=0x5]=_0xf31ee5(0x1b6),_0x283704[_0x283704['UNRECOGNIZED']=-0x1]=_0xf31ee5(0x185),_0x283704))(v||{});const f=_0x1700e0=>c[_0xf31ee5(0x1de)](new Date(+_0x1700e0))[_0xf31ee5(0x1dc)](_0xf31ee5(0x18b)),R=async(_0x581b56,_0x405c41)=>{const _0x404f7a=_0xf31ee5,_0x2572d1=_0x581b56[_0x404f7a(0x1b5)](c[_0x404f7a(0x1b7)]),_0x576ebc=_0x581b56[_0x404f7a(0x1b5)](P['HTTPService']);_0x405c41[_0x404f7a(0x16f)](_0x1a6894=>{const _0x5637c4=_0x404f7a;_0x2572d1[_0x5637c4(0x169)](_0x1a6894)&&_0x405c41[_0x5637c4(0x1b8)](_0x1a6894);}),_0x405c41['size']&&(await _0x576ebc[_0x404f7a(0x1b5)]('/universer-api/user/list',{'params':{'userIDs':[..._0x405c41]}}))['body'][_0x404f7a(0x1e0)]['forEach'](_0x10dba7=>{const _0x5cf7ae=_0x404f7a;_0x10dba7&&_0x2572d1[_0x5cf7ae(0x1ac)](_0x10dba7);});};var $=Object[_0xf31ee5(0x16b)],E=(_0x342931,_0x52c005,_0x3960e5,_0x2037af)=>{for(var _0x13e640=_0x2037af>0x1?void 0x0:_0x2037af?$(_0x52c005,_0x3960e5):_0x52c005,_0x3b6ade=_0x342931['length']-0x1,_0x45b722;_0x3b6ade>=0x0;_0x3b6ade--)(_0x45b722=_0x342931[_0x3b6ade])&&(_0x13e640=_0x45b722(_0x13e640)||_0x13e640);return _0x13e640;},S=(_0x586812,_0x3213d4)=>(_0x1866c5,_0x5f4498)=>_0x3213d4(_0x1866c5,_0x5f4498,_0x586812);let p=class extends c[_0xf31ee5(0x1c3)]{constructor(_0x47c8e7,_0x108490,_0x51ab20,_0x2a3184){const _0x40d026=_0xf31ee5;super(),this['_commentService']=_0x47c8e7,this[_0x40d026(0x1d6)]=_0x108490,this['_userService']=_0x51ab20,this['_injector']=_0x2a3184,this[_0x40d026(0x195)](),this['_initUserSync']();}[_0xf31ee5(0x18e)](){const _0x1fa2ce=_0xf31ee5;this['disposeWithMe'](this[_0x1fa2ce(0x1d6)][_0x1fa2ce(0x19b)][_0x1fa2ce(0x19e)](w[_0x1fa2ce(0x1b3)](0x10))[_0x1fa2ce(0x1cf)](_0x46177f=>{const _0x3f4e56=_0x1fa2ce,_0x5e7312=new Set();_0x46177f[_0x3f4e56(0x16f)](_0x25bd14=>{const _0x280c6c=_0x3f4e56;switch(_0x25bd14[_0x280c6c(0x1e1)]){case _0x280c6c(0x186):{const _0x4453a9=_0x25bd14[_0x280c6c(0x17a)][_0x280c6c(0x1d3)];_0x5e7312[_0x280c6c(0x186)](_0x4453a9);break;}}}),R(this['_injector'],_0x5e7312);}));}[_0xf31ee5(0x195)](){const _0x4e8c7d=_0xf31ee5;this['disposeWithMe'](this[_0x4e8c7d(0x1a0)][_0x4e8c7d(0x19b)]['subscribe'](async _0x3dc6b2=>{const _0x523025=_0x4e8c7d;var _0x5e77a4,_0xa61f00,_0x40ff3c,_0x4eef52;const _0x1b9810=(_0x5e77a4=this[_0x523025(0x1d6)]['getUnit'](_0x3dc6b2['unitId'])['find'](_0x17aa48=>_0x17aa48[_0x523025(0x1a6)]===_0x3dc6b2['threadId']))==null?void 0x0:_0x5e77a4[_0x523025(0x1b1)];if(!_0x1b9810)return;const {unitId:_0x5540fc,subUnitId:_0x552c77}=_0x1b9810;switch(_0x3dc6b2[_0x523025(0x18f)]&&this[_0x523025(0x19c)]['addUser'](_0x3dc6b2[_0x523025(0x18f)]),_0x3dc6b2['type']){case v[_0x523025(0x1ad)]:break;case v[_0x523025(0x175)]:{this[_0x523025(0x1d6)][_0x523025(0x1c2)](_0x5540fc,_0x552c77,{'unitId':_0x5540fc,'subUnitId':_0x552c77,'ref':'','id':_0x3dc6b2[_0x523025(0x198)],'dT':f(+_0x3dc6b2['createTimestamp']),'threadId':_0x3dc6b2[_0x523025(0x1a6)],'personId':(_0x40ff3c=(_0xa61f00=_0x3dc6b2[_0x523025(0x18f)])==null?void 0x0:_0xa61f00[_0x523025(0x17d)])!=null?_0x40ff3c:_0x3dc6b2[_0x523025(0x183)],'text':JSON[_0x523025(0x187)](_0x3dc6b2[_0x523025(0x1d2)]),'parentId':_0x1b9810['id']});break;}case v[_0x523025(0x16e)]:{const _0x5e0560=this[_0x523025(0x1d6)]['getComment'](_0x5540fc,_0x552c77,_0x3dc6b2[_0x523025(0x198)]);_0x5e0560&&_0x5e0560[_0x523025(0x1d1)]&&this['_threadCommentModel'][_0x523025(0x19a)](_0x5540fc,_0x552c77,_0x3dc6b2['replyId']);break;}case v[_0x523025(0x182)]:{this['_threadCommentModel'][_0x523025(0x17f)](_0x5540fc,_0x552c77,{'commentId':_0x3dc6b2[_0x523025(0x198)],'text':JSON[_0x523025(0x187)](_0x3dc6b2[_0x523025(0x1d2)])});break;}case v['Solve']:{const _0x3c8863=(_0x4eef52=this[_0x523025(0x1d6)][_0x523025(0x1aa)](_0x3dc6b2[_0x523025(0x1ae)])['find'](_0x34f47b=>_0x34f47b[_0x523025(0x1a6)]===_0x3dc6b2[_0x523025(0x1a6)]))==null?void 0x0:_0x4eef52[_0x523025(0x1b1)];_0x3c8863&&this['_threadCommentModel']['resolveComment'](_0x5540fc,_0x552c77,_0x3c8863['id'],_0x3dc6b2['solved']===I[_0x523025(0x16c)]);break;}}}));}};p=E([S(0x0,c[_0xf31ee5(0x19f)](b[_0xf31ee5(0x190)])),S(0x1,c[_0xf31ee5(0x19f)](M[_0xf31ee5(0x1a8)])),S(0x2,c[_0xf31ee5(0x19f)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0xf31ee5(0x1cd)]))],p);const q=_0xf31ee5(0x18c),D={};var A=Object[_0xf31ee5(0x16b)],x=(_0x53d4bb,_0x163786,_0x434f5c,_0x4635fb)=>{const _0x56b2d9=_0xf31ee5;for(var _0x4b8113=_0x4635fb>0x1?void 0x0:_0x4635fb?A(_0x163786,_0x434f5c):_0x163786,_0x470464=_0x53d4bb[_0x56b2d9(0x176)]-0x1,_0x10906c;_0x470464>=0x0;_0x470464--)(_0x10906c=_0x53d4bb[_0x470464])&&(_0x4b8113=_0x10906c(_0x4b8113)||_0x4b8113);return _0x4b8113;},_=(_0x1bef15,_0x26ea18)=>(_0xb2e494,_0x1f8064)=>_0x26ea18(_0xb2e494,_0x1f8064,_0x1bef15);function Y(_0x31ec7c,_0x4df799){const _0x2f1598=_0xf31ee5,_0x1768a4=_0x31ec7c['replies'][0x0];return{..._0x4df799,'id':_0x1768a4['replyId'],'resolved':_0x31ec7c['solved']===0x1,'dT':f(_0x1768a4[_0x2f1598(0x181)]),'personId':_0x1768a4[_0x2f1598(0x183)],'threadId':_0x1768a4['threadId']};}function G(_0x4fd0e4,_0x474fc9,_0x1ee9a4){const _0x55321d=_0xf31ee5;var _0x3fcbaa,_0xa34c71;if(((_0xa34c71=(_0x3fcbaa=_0x4fd0e4==null?void 0x0:_0x4fd0e4[_0x55321d(0x196)])==null?void 0x0:_0x3fcbaa['length'])!=null?_0xa34c71:0x0)>0x0){const _0x2674c8=(_0x1ca011,_0x456091)=>({'id':_0x1ca011[_0x55321d(0x198)],'threadId':_0x1ca011['threadId'],'dT':f(_0x1ca011[_0x55321d(0x181)]),'personId':_0x1ca011[_0x55321d(0x183)],'resolved':_0x4fd0e4[_0x55321d(0x1c0)]===I['Solved'],'unitId':_0x474fc9,'subUnitId':_0x1ee9a4,'text':JSON[_0x55321d(0x187)](_0x1ca011[_0x55321d(0x1d2)]),'parentId':_0x456091}),_0x29ed6b=_0x2674c8(_0x4fd0e4[_0x55321d(0x196)][0x0]);return{..._0x29ed6b,'children':_0x4fd0e4['replies']['slice'](0x1)[_0x55321d(0x16a)](_0x3d3ab0=>_0x2674c8(_0x3d3ab0,_0x29ed6b['id']))};}return null;}let g=class{constructor(_0x3e7084,_0x2cdd8c,_0x8d99fc,_0x5c5273){const _0x10892b=_0xf31ee5;this[_0x10892b(0x1d7)]=_0x3e7084,this['_userService']=_0x2cdd8c,this['_sessionService']=_0x8d99fc,this['_injector']=_0x5c5273;}async[_0xf31ee5(0x1c2)](_0x319cc8){const _0xdc4efc=_0xf31ee5;var _0x2e960a,_0x6c3d3a;const {parentId:_0x592b4c,unitId:_0x1fc867,text:_0x272069,threadId:_0xa958a4}=_0x319cc8,_0x548bdf=(_0x6c3d3a=(_0x2e960a=_0x272069[_0xdc4efc(0x1c1)])==null?void 0x0:_0x2e960a[_0xdc4efc(0x17e)](_0x302571=>_0x302571['rangeType']===c[_0xdc4efc(0x1a3)][_0xdc4efc(0x1af)])[_0xdc4efc(0x16a)](_0x55a7da=>_0x55a7da[_0xdc4efc(0x1cb)]))!=null?_0x6c3d3a:[],_0x37453a=JSON[_0xdc4efc(0x1d9)](_0x272069),_0x3a090a=(await this[_0xdc4efc(0x1a1)]['requireSession'](_0x1fc867))[_0xdc4efc(0x1c4)]();if(_0x592b4c){const _0x252cdd={'memberId':_0x3a090a,'unitId':_0x1fc867,'content':_0x37453a,'mention':_0x548bdf,'threadId':_0xa958a4},_0x242887=(await this['_httpService'][_0xdc4efc(0x1a4)](_0xdc4efc(0x197)+_0x1fc867+_0xdc4efc(0x178),{'body':_0x252cdd}))['body'][_0xdc4efc(0x180)];return{..._0x319cc8,'id':_0x242887[_0xdc4efc(0x198)],'dT':c['dayjs'](+_0x242887[_0xdc4efc(0x181)])[_0xdc4efc(0x1dc)](_0xdc4efc(0x18b)),'personId':_0x242887[_0xdc4efc(0x183)]};}else{const _0x22de0e={'memberId':_0x3a090a,'unitId':_0x1fc867,'content':_0x37453a,'mention':_0x548bdf},_0x427a8d=await this['_httpService'][_0xdc4efc(0x1a4)](_0xdc4efc(0x197)+_0x1fc867+_0xdc4efc(0x170),{'body':_0x22de0e});return Y(_0x427a8d[_0xdc4efc(0x1a5)][_0xdc4efc(0x1a2)],_0x319cc8);}}async[_0xf31ee5(0x17f)](_0x443314){const _0x4d8d95=_0xf31ee5;var _0x5af1ce,_0x2be2e9;const {text:_0x1d3120,unitId:_0x3724bf}=_0x443314,_0x3b9494=(_0x2be2e9=(_0x5af1ce=_0x1d3120[_0x4d8d95(0x1c1)])==null?void 0x0:_0x5af1ce[_0x4d8d95(0x17e)](_0x2d7efc=>_0x2d7efc['rangeType']===c[_0x4d8d95(0x1a3)]['COMMENT'])['map'](_0xfd29e0=>_0xfd29e0['rangeId']))!=null?_0x2be2e9:[],_0xc81183=JSON['stringify'](_0x1d3120),_0x436651=_0x443314[_0x4d8d95(0x1a6)],_0x2e38d4=_0x443314['id'],_0x27eeaa={'memberId':(await this[_0x4d8d95(0x1a1)]['requireSession'](_0x3724bf))[_0x4d8d95(0x1c4)](),'unitId':_0x3724bf,'threadId':_0x436651,'mention':_0x3b9494,'content':_0xc81183,'replyId':_0x2e38d4},_0x3c6588=await this[_0x4d8d95(0x1d7)][_0x4d8d95(0x1a4)](_0x4d8d95(0x197)+_0x3724bf+_0x4d8d95(0x1dd),{'body':_0x27eeaa});return!_0x3c6588['body'][_0x4d8d95(0x1bc)]||_0x3c6588['body'][_0x4d8d95(0x1bc)]['code']===0x1;}async['resolveComment'](_0x59b1a1){const _0x249a7c=_0xf31ee5,{unitId:_0xbc365e}=_0x59b1a1,_0x505a75=_0x59b1a1[_0x249a7c(0x1a6)],_0x37e58a={'memberId':this[_0x249a7c(0x19c)]['getCurrentUser']()[_0x249a7c(0x17d)],'unitId':_0xbc365e,'threadId':_0x505a75,'solved':_0x59b1a1[_0x249a7c(0x1b9)]?I[_0x249a7c(0x16c)]:I['OpenOrReOpen']},_0x584b8c=await this['_httpService'][_0x249a7c(0x1a4)](_0x249a7c(0x197)+_0xbc365e+_0x249a7c(0x16d),{'body':_0x37e58a});return!_0x584b8c[_0x249a7c(0x1a5)][_0x249a7c(0x1bc)]||_0x584b8c[_0x249a7c(0x1a5)]['error'][_0x249a7c(0x171)]===0x1;}async[_0xf31ee5(0x19a)](_0x5cc70e,_0x4800a6,_0x3a3a78,_0x2402ae){const _0x4c8e9d=_0xf31ee5,_0x3c65e4={'memberId':(await this[_0x4c8e9d(0x1a1)]['requireSession'](_0x5cc70e))[_0x4c8e9d(0x1c4)](),'threadId':_0x3a3a78,'replyId':_0x2402ae,'unitId':_0x5cc70e},_0x2c744d=await this[_0x4c8e9d(0x1d7)]['post'](_0x4c8e9d(0x197)+_0x5cc70e+_0x4c8e9d(0x1ba),{'body':_0x3c65e4});return!_0x2c744d[_0x4c8e9d(0x1a5)][_0x4c8e9d(0x1bc)]||_0x2c744d[_0x4c8e9d(0x1a5)][_0x4c8e9d(0x1bc)]['code']===0x1;}async[_0xf31ee5(0x191)](_0xa90049,_0x3da51a,_0x2e3513){const _0x3c550a=_0xf31ee5,_0x5f4f49={'unitId':_0xa90049,'threadId':_0x2e3513},_0x4aa49e=await this[_0x3c550a(0x1d7)]['post'](_0x3c550a(0x197)+_0xa90049+_0x3c550a(0x1e2),{'body':_0x5f4f49}),_0x2da94c=_0x2e3513[_0x3c550a(0x16a)](_0x35ed7e=>G(_0x4aa49e[_0x3c550a(0x1a5)][_0x3c550a(0x177)][_0x35ed7e],_0xa90049,_0x3da51a))[_0x3c550a(0x17e)](Boolean);return Object[_0x3c550a(0x1b0)](_0x4aa49e[_0x3c550a(0x1a5)][_0x3c550a(0x1e0)])[_0x3c550a(0x16f)](_0x136f1a=>{const _0x1ef82b=_0x3c550a;this[_0x1ef82b(0x19c)][_0x1ef82b(0x1ac)](_0x136f1a);}),_0x2da94c;}['saveCommentToSnapshot'](_0x5cc34e){const _0x1b7afb=_0xf31ee5;return{'id':_0x5cc34e['id'],'threadId':_0x5cc34e[_0x1b7afb(0x1a6)],'ref':_0x5cc34e[_0x1b7afb(0x1c7)]};}};g=x([_(0x0,c[_0xf31ee5(0x19f)](P[_0xf31ee5(0x194)])),_(0x1,c[_0xf31ee5(0x19f)](c[_0xf31ee5(0x1b7)])),_(0x2,c[_0xf31ee5(0x19f)](b[_0xf31ee5(0x1d5)])),_(0x3,c[_0xf31ee5(0x19f)](c['Injector']))],g);function _0x373e(){const _0x445d9c=['UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','513654kJrOJW','1504285gRFBDU','rangeId','@univerjs-pro/collaboration-client','Injector','3432828OlICFI','subscribe','defineProperty','parentId','content','personId','3186831RazndY','CollaborationSessionService','_threadCommentModel','_httpService','_threadCommentDataSource','stringify','_configService','@univerjs-pro/license','format','/edit','dayjs','UniverThreadCommentDataSourcePlugin','users','type','/list','getUser','map','getOwnPropertyDescriptor','Solved','/solved','Delete','forEach','/add','code','rxjs','22056550asOrel','UniverInstanceType','Reply','length','comments','/reply','IThreadCommentDataSourceService','payload','DependentOn','OpenOrReOpen','userID','filter','updateComment','reply','createTimestamp','Edit','userId','_config','UNRECOGNIZED','add','parse','onReady','322330rKTFli','dataSource','YYYY/MM/DD\x20HH:mm','thread-comment-data-source.config','Unknown','_initUserSync','user','CommentService','listComments','4FkvuZK','toStringTag','HTTPService','_init','replies','/universer-api/comment/unit/','replyId','Plugin','deleteComment','commentUpdate$','_userService','_initDataSource','pipe','Inject','_commentService','_sessionService','comment','CustomRangeType','post','body','threadId','@univerjs/network','ThreadCommentModel','IConfigService','getUnit','@univerjs/thread-comment','addUser','Add','unitId','COMMENT','values','root','onStarting','bufferTime','7481736SGcVhQ','get','Solve','UserManagerService','delete','resolved','/delete','@univerjs/thread-comment-ui','error','_injector','_threadCommentDataSourceService','9ITpJIF','solved','customRanges','addComment','Disposable','getMemberID','7PEHaid','UniverCollaborationClientPlugin','ref'];_0x373e=function(){return _0x445d9c;};return _0x373e();}var H=Object[_0xf31ee5(0x16b)],J=(_0x3a761b,_0x2078f0,_0x101d6e,_0xb4bae5)=>{const _0x260ef7=_0xf31ee5;for(var _0x441fa2=_0xb4bae5>0x1?void 0x0:_0xb4bae5?H(_0x2078f0,_0x101d6e):_0x2078f0,_0x2aac80=_0x3a761b[_0x260ef7(0x176)]-0x1,_0x6acdb9;_0x2aac80>=0x0;_0x2aac80--)(_0x6acdb9=_0x3a761b[_0x2aac80])&&(_0x441fa2=_0x6acdb9(_0x441fa2)||_0x441fa2);return _0x441fa2;},y=(_0x52652f,_0x8c8504)=>(_0x5d5e1f,_0x59d044)=>_0x8c8504(_0x5d5e1f,_0x59d044,_0x52652f);let C=class extends c[_0xf31ee5(0x1c3)]{constructor(_0xb8f23,_0x232cf6){const _0x2144dc=_0xf31ee5;super(),this['_threadCommentDataSourceService']=_0xb8f23,this['_threadCommentDataSource']=_0x232cf6,this[_0x2144dc(0x19d)]();}['_initDataSource'](){const _0x302bd9=_0xf31ee5;this[_0x302bd9(0x1be)][_0x302bd9(0x18a)]=this[_0x302bd9(0x1d8)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0xf31ee5(0x179)]),y(0x1,c[_0xf31ee5(0x19f)](g))],C);var F=Object[_0xf31ee5(0x1d0)],L=Object['getOwnPropertyDescriptor'],Z=(_0x40c33c,_0x5c140e,_0x47ada0)=>_0x5c140e in _0x40c33c?F(_0x40c33c,_0x5c140e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x47ada0}):_0x40c33c[_0x5c140e]=_0x47ada0,W=(_0x58787d,_0x587417,_0x1f96c4,_0xfeff5a)=>{const _0x434a5=_0xf31ee5;for(var _0x2df0e9=_0xfeff5a>0x1?void 0x0:_0xfeff5a?L(_0x587417,_0x1f96c4):_0x587417,_0x19806f=_0x58787d[_0x434a5(0x176)]-0x1,_0x15bf39;_0x19806f>=0x0;_0x19806f--)(_0x15bf39=_0x58787d[_0x19806f])&&(_0x2df0e9=_0x15bf39(_0x2df0e9)||_0x2df0e9);return _0x2df0e9;},O=(_0x1050c4,_0x10c4fe)=>(_0x559767,_0x56215a)=>_0x10c4fe(_0x559767,_0x56215a,_0x1050c4),N=(_0xed5281,_0x1a4427,_0x1d1ae5)=>Z(_0xed5281,typeof _0x1a4427!='symbol'?_0x1a4427+'':_0x1a4427,_0x1d1ae5);exports[_0xf31ee5(0x1df)]=class extends c[_0xf31ee5(0x199)]{constructor(_0x5a2a24=D,_0x415c14,_0x22b9bd){const _0x1195c6=_0xf31ee5;super(),this[_0x1195c6(0x184)]=_0x5a2a24,this[_0x1195c6(0x1bd)]=_0x415c14,this[_0x1195c6(0x1da)]=_0x22b9bd;const {..._0x441122}=c['merge']({},D,this[_0x1195c6(0x184)]);this['_configService']['setConfig'](q,_0x441122);}[_0xf31ee5(0x1b2)](){[[g],[C],[p]]['forEach'](_0x1a022c=>{const _0x227957=_0x53b0;this[_0x227957(0x1bd)][_0x227957(0x186)](_0x1a022c);});}[_0xf31ee5(0x188)](){const _0x217ea7=_0xf31ee5;this[_0x217ea7(0x1bd)][_0x217ea7(0x1b5)](C),this[_0x217ea7(0x1bd)][_0x217ea7(0x1b5)](p);}},N(exports[_0xf31ee5(0x1df)],'pluginName',U),N(exports[_0xf31ee5(0x1df)],_0xf31ee5(0x1e1),c[_0xf31ee5(0x174)]['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0xf31ee5(0x17b)](j['UniverThreadCommentUIPlugin'],b[_0xf31ee5(0x1c6)],T['UniverLicensePlugin']),O(0x1,c[_0xf31ee5(0x19f)](c[_0xf31ee5(0x1cd)])),O(0x2,c[_0xf31ee5(0x1a9)])],exports[_0xf31ee5(0x1df)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4b07e7=_0x181b;(function(_0x2791fb,_0x4da5a1){const _0x521bea=_0x181b,_0x550324=_0x2791fb();while(!![]){try{const _0x1a9c71=-parseInt(_0x521bea(0x106))/0x1*(-parseInt(_0x521bea(0x151))/0x2)+parseInt(_0x521bea(0xf8))/0x3*(parseInt(_0x521bea(0x120))/0x4)+-parseInt(_0x521bea(0x121))/0x5+-parseInt(_0x521bea(0x154))/0x6*(-parseInt(_0x521bea(0x107))/0x7)+parseInt(_0x521bea(0x134))/0x8*(parseInt(_0x521bea(0x110))/0x9)+-parseInt(_0x521bea(0x13f))/0xa*(-parseInt(_0x521bea(0x108))/0xb)+-parseInt(_0x521bea(0x14c))/0xc*(parseInt(_0x521bea(0x10b))/0xd);if(_0x1a9c71===_0x4da5a1)break;else _0x550324['push'](_0x550324['shift']());}catch(_0x2d228d){_0x550324['push'](_0x550324['shift']());}}}(_0x1923,0x7b47f));import{CommentService as _0x1a1583,CollaborationSessionService as _0x1fd658,UniverCollaborationClientPlugin as _0x3d47fa}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x21e0fd}from'@univerjs-pro/license';import{dayjs as _0x471760,UserManagerService as _0x416fe6,Inject as _0x3c112c,Injector as _0x15e34d,Disposable as _0x6c7d02,CustomRangeType as _0x23fccf,UniverInstanceType as _0x514331,DependentOn as _0x5e5e54,IConfigService as _0x1e0359,Plugin as _0x2f5ef4,merge as _0x4a2386}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xe804bc}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x52f7ea,IThreadCommentDataSourceService as _0x4013bc}from'@univerjs/thread-comment';import{bufferTime as _0x5984f4}from'rxjs';import{HTTPService as _0x3849c5}from'@univerjs/network';const W=_0x4b07e7(0xf7);function _0x1923(){const _0x5595fb=['_threadCommentDataSourceService','_sessionService','COMMENT','unitId','get','_commentService','symbol','defineProperty','filter','disposeWithMe','241448yIyFkS','pluginName','YYYY/MM/DD\x20HH:mm','getUnit','userId','_userService','addUser','users','/delete','getMemberID','getOwnPropertyDescriptor','27460jbIabh','delete','user','values','personId','solved','Reply','code','syncUpdateMutationToColla','_config','slice','getComment','_configService','98664bwJkjc','UNRECOGNIZED','format','threadId','commentUpdate$','2EkVeVN','replyId','comment','6slXwyg','_injector','rangeId','thread-comment-data-source.config','OpenOrReOpen','stringify','content','Delete','addComment','ref','Edit','find','requireSession','forEach','listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3AYQNmX','size','subscribe','length','Add','updateComment','Solved','/universer-api/comment/unit/','createTimestamp','rangeType','parse','resolved','/list','/edit','507930tvnOII','4267585kMQSso','2651HoayUC','pipe','replies','3653zSsDez','getUser','deleteComment','add','parentId','171XKoZlS','setConfig','error','post','dataSource','_initUserSync','getCurrentUser','/universer-api/user/list','/reply','map','Solve','root','_threadCommentDataSource','userID','resolveComment','type','1853308qdwozu','3980aQywqa','_threadCommentModel','onStarting','_init','body','_initDataSource','_httpService','payload','Unknown'];_0x1923=function(){return _0x5595fb;};return _0x1923();}var I=(_0x31d8b8=>(_0x31d8b8[_0x31d8b8[_0x4b07e7(0x158)]=0x0]='OpenOrReOpen',_0x31d8b8[_0x31d8b8['Solved']=0x1]=_0x4b07e7(0xfe),_0x31d8b8[_0x31d8b8[_0x4b07e7(0x14d)]=-0x1]='UNRECOGNIZED',_0x31d8b8))(I||{}),v=(_0x5d3573=>(_0x5d3573[_0x5d3573[_0x4b07e7(0x129)]=0x0]=_0x4b07e7(0x129),_0x5d3573[_0x5d3573[_0x4b07e7(0xfc)]=0x1]=_0x4b07e7(0xfc),_0x5d3573[_0x5d3573[_0x4b07e7(0x145)]=0x2]=_0x4b07e7(0x145),_0x5d3573[_0x5d3573['Edit']=0x3]=_0x4b07e7(0x15e),_0x5d3573[_0x5d3573['Delete']=0x4]=_0x4b07e7(0x15b),_0x5d3573[_0x5d3573[_0x4b07e7(0x11a)]=0x5]=_0x4b07e7(0x11a),_0x5d3573[_0x5d3573[_0x4b07e7(0x14d)]=-0x1]=_0x4b07e7(0x14d),_0x5d3573))(v||{});const D=_0x3c2d82=>_0x471760(new Date(+_0x3c2d82))[_0x4b07e7(0x14e)](_0x4b07e7(0x136)),B=async(_0x1cde4d,_0xe92fe5)=>{const _0xaa6722=_0x4b07e7,_0xab947f=_0x1cde4d[_0xaa6722(0x12e)](_0x416fe6),_0x1ef13a=_0x1cde4d[_0xaa6722(0x12e)](_0x3849c5);_0xe92fe5['forEach'](_0x5a1bdb=>{const _0x5de147=_0xaa6722;_0xab947f[_0x5de147(0x10c)](_0x5a1bdb)&&_0xe92fe5[_0x5de147(0x140)](_0x5a1bdb);}),_0xe92fe5[_0xaa6722(0xf9)]&&(await _0x1ef13a['get'](_0xaa6722(0x117),{'params':{'userIDs':[..._0xe92fe5]}}))[_0xaa6722(0x125)][_0xaa6722(0x13b)]['forEach'](_0x406591=>{const _0x3be61b=_0xaa6722;_0x406591&&_0xab947f[_0x3be61b(0x13a)](_0x406591);});};var K=Object[_0x4b07e7(0x13e)],V=(_0x2a6c1b,_0xd948de,_0x508d56,_0xaca8b0)=>{const _0x1deed3=_0x4b07e7;for(var _0x5844b2=_0xaca8b0>0x1?void 0x0:_0xaca8b0?K(_0xd948de,_0x508d56):_0xd948de,_0x5766e1=_0x2a6c1b[_0x1deed3(0xfb)]-0x1,_0x54902d;_0x5766e1>=0x0;_0x5766e1--)(_0x54902d=_0x2a6c1b[_0x5766e1])&&(_0x5844b2=_0x54902d(_0x5844b2)||_0x5844b2);return _0x5844b2;},p=(_0x5b1438,_0x1d7b6b)=>(_0x1ef566,_0x3ea25f)=>_0x1d7b6b(_0x1ef566,_0x3ea25f,_0x5b1438);let S=class extends _0x6c7d02{constructor(_0x19bb64,_0x218317,_0x4ce68c,_0x4922a3){const _0x237b44=_0x4b07e7;super(),this[_0x237b44(0x12f)]=_0x19bb64,this[_0x237b44(0x122)]=_0x218317,this['_userService']=_0x4ce68c,this['_injector']=_0x4922a3,this[_0x237b44(0x124)](),this[_0x237b44(0x115)]();}[_0x4b07e7(0x115)](){const _0x42c3b3=_0x4b07e7;this['disposeWithMe'](this[_0x42c3b3(0x122)]['commentUpdate$'][_0x42c3b3(0x109)](_0x5984f4(0x10))[_0x42c3b3(0xfa)](_0xf821f6=>{const _0x1c1c92=_0x42c3b3,_0x11dfb5=new Set();_0xf821f6['forEach'](_0x3926f1=>{const _0x942c36=_0x181b;switch(_0x3926f1[_0x942c36(0x11f)]){case _0x942c36(0x10e):{const _0x2cf316=_0x3926f1[_0x942c36(0x128)][_0x942c36(0x143)];_0x11dfb5[_0x942c36(0x10e)](_0x2cf316);break;}}}),B(this[_0x1c1c92(0x155)],_0x11dfb5);}));}[_0x4b07e7(0x124)](){const _0x1a1700=_0x4b07e7;this[_0x1a1700(0x133)](this['_commentService'][_0x1a1700(0x150)][_0x1a1700(0xfa)](async _0x483617=>{const _0x31cf19=_0x1a1700;var _0x4dddb6,_0x8c2546,_0x33af4c,_0xd89e1a;const _0x187d48=(_0x4dddb6=this[_0x31cf19(0x122)][_0x31cf19(0x137)](_0x483617[_0x31cf19(0x12d)])['find'](_0xb1ef45=>_0xb1ef45[_0x31cf19(0x14f)]===_0x483617['threadId']))==null?void 0x0:_0x4dddb6[_0x31cf19(0x11b)];if(!_0x187d48)return;const {unitId:_0x80eb4b,subUnitId:_0x599791}=_0x187d48;switch(_0x483617[_0x31cf19(0x141)]&&this['_userService'][_0x31cf19(0x13a)](_0x483617[_0x31cf19(0x141)]),_0x483617[_0x31cf19(0x11f)]){case v['Add']:break;case v[_0x31cf19(0x145)]:{this[_0x31cf19(0x122)]['addComment'](_0x80eb4b,_0x599791,{'unitId':_0x80eb4b,'subUnitId':_0x599791,'ref':'','id':_0x483617[_0x31cf19(0x152)],'dT':D(+_0x483617[_0x31cf19(0x100)]),'threadId':_0x483617[_0x31cf19(0x14f)],'personId':(_0x33af4c=(_0x8c2546=_0x483617[_0x31cf19(0x141)])==null?void 0x0:_0x8c2546['userID'])!=null?_0x33af4c:_0x483617['userId'],'text':JSON[_0x31cf19(0x102)](_0x483617['content']),'parentId':_0x187d48['id']});break;}case v[_0x31cf19(0x15b)]:{const _0x4e0c9a=this[_0x31cf19(0x122)][_0x31cf19(0x14a)](_0x80eb4b,_0x599791,_0x483617[_0x31cf19(0x152)]);_0x4e0c9a&&_0x4e0c9a[_0x31cf19(0x10f)]&&this[_0x31cf19(0x122)][_0x31cf19(0x10d)](_0x80eb4b,_0x599791,_0x483617['replyId']);break;}case v[_0x31cf19(0x15e)]:{this[_0x31cf19(0x122)][_0x31cf19(0xfd)](_0x80eb4b,_0x599791,{'commentId':_0x483617['replyId'],'text':JSON['parse'](_0x483617[_0x31cf19(0x15a)])});break;}case v['Solve']:{const _0x8cf9d8=(_0xd89e1a=this['_threadCommentModel'][_0x31cf19(0x137)](_0x483617[_0x31cf19(0x12d)])[_0x31cf19(0x15f)](_0x4001df=>_0x4001df[_0x31cf19(0x14f)]===_0x483617[_0x31cf19(0x14f)]))==null?void 0x0:_0xd89e1a[_0x31cf19(0x11b)];_0x8cf9d8&&this[_0x31cf19(0x122)][_0x31cf19(0x11e)](_0x80eb4b,_0x599791,_0x8cf9d8['id'],_0x483617[_0x31cf19(0x144)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x3c112c(_0x1a1583)),p(0x1,_0x3c112c(_0x52f7ea)),p(0x2,_0x3c112c(_0x416fe6)),p(0x3,_0x3c112c(_0x15e34d))],S);const z=_0x4b07e7(0x157),M={};var k=Object[_0x4b07e7(0x13e)],Q=(_0x1950c6,_0x4cf0e0,_0x49ccc0,_0x33a086)=>{const _0x273370=_0x4b07e7;for(var _0xec26fb=_0x33a086>0x1?void 0x0:_0x33a086?k(_0x4cf0e0,_0x49ccc0):_0x4cf0e0,_0x3359eb=_0x1950c6[_0x273370(0xfb)]-0x1,_0x2a84f7;_0x3359eb>=0x0;_0x3359eb--)(_0x2a84f7=_0x1950c6[_0x3359eb])&&(_0xec26fb=_0x2a84f7(_0xec26fb)||_0xec26fb);return _0xec26fb;},_=(_0x2ee0ab,_0x344c50)=>(_0x1c2240,_0xa54929)=>_0x344c50(_0x1c2240,_0xa54929,_0x2ee0ab);function _0x181b(_0xb1ae11,_0x318b9f){const _0x192349=_0x1923();return _0x181b=function(_0x181bd3,_0x418c9d){_0x181bd3=_0x181bd3-0xf5;let _0x4defb7=_0x192349[_0x181bd3];return _0x4defb7;},_0x181b(_0xb1ae11,_0x318b9f);}function X(_0x25bb61,_0xe72036){const _0x286d65=_0x4b07e7,_0x8e733f=_0x25bb61[_0x286d65(0x10a)][0x0];return{..._0xe72036,'id':_0x8e733f['replyId'],'resolved':_0x25bb61['solved']===0x1,'dT':D(_0x8e733f[_0x286d65(0x100)]),'personId':_0x8e733f[_0x286d65(0x138)],'threadId':_0x8e733f[_0x286d65(0x14f)]};}function ee(_0x34270e,_0x3c5a87,_0x6b82ad){const _0x4a34f9=_0x4b07e7;var _0x30047c,_0x4aeb13;if(((_0x4aeb13=(_0x30047c=_0x34270e==null?void 0x0:_0x34270e[_0x4a34f9(0x10a)])==null?void 0x0:_0x30047c[_0x4a34f9(0xfb)])!=null?_0x4aeb13:0x0)>0x0){const _0x3cc799=(_0x474b6b,_0x632057)=>({'id':_0x474b6b[_0x4a34f9(0x152)],'threadId':_0x474b6b['threadId'],'dT':D(_0x474b6b[_0x4a34f9(0x100)]),'personId':_0x474b6b['userId'],'resolved':_0x34270e[_0x4a34f9(0x144)]===I[_0x4a34f9(0xfe)],'unitId':_0x3c5a87,'subUnitId':_0x6b82ad,'text':JSON['parse'](_0x474b6b[_0x4a34f9(0x15a)]),'parentId':_0x632057}),_0x5b5a02=_0x3cc799(_0x34270e['replies'][0x0]);return{..._0x5b5a02,'children':_0x34270e[_0x4a34f9(0x10a)][_0x4a34f9(0x149)](0x1)[_0x4a34f9(0x119)](_0x4e43f9=>_0x3cc799(_0x4e43f9,_0x5b5a02['id']))};}return null;}let f=class{constructor(_0xa96396,_0xf6c0e7,_0x25aae8,_0xa13c7a){const _0x349230=_0x4b07e7;this[_0x349230(0x127)]=_0xa96396,this[_0x349230(0x139)]=_0xf6c0e7,this[_0x349230(0x12b)]=_0x25aae8,this[_0x349230(0x155)]=_0xa13c7a;}async[_0x4b07e7(0x15c)](_0x268f50){const _0x492111=_0x4b07e7;var _0x26e451,_0xc31f89;const {parentId:_0x4d0ae6,unitId:_0x2ffe0e,text:_0x2f6cc1,threadId:_0xd0ceb5}=_0x268f50,_0x5b0c99=(_0xc31f89=(_0x26e451=_0x2f6cc1['customRanges'])==null?void 0x0:_0x26e451[_0x492111(0x132)](_0x5c52ac=>_0x5c52ac[_0x492111(0x101)]===_0x23fccf[_0x492111(0x12c)])[_0x492111(0x119)](_0x396ad5=>_0x396ad5[_0x492111(0x156)]))!=null?_0xc31f89:[],_0x223fe2=JSON[_0x492111(0x159)](_0x2f6cc1),_0x578938=(await this[_0x492111(0x12b)][_0x492111(0x160)](_0x2ffe0e))['getMemberID']();if(_0x4d0ae6){const _0x22a6ab={'memberId':_0x578938,'unitId':_0x2ffe0e,'content':_0x223fe2,'mention':_0x5b0c99,'threadId':_0xd0ceb5},_0x307626=(await this['_httpService']['post'](_0x492111(0xff)+_0x2ffe0e+_0x492111(0x118),{'body':_0x22a6ab}))[_0x492111(0x125)]['reply'];return{..._0x268f50,'id':_0x307626[_0x492111(0x152)],'dT':_0x471760(+_0x307626[_0x492111(0x100)])[_0x492111(0x14e)](_0x492111(0x136)),'personId':_0x307626[_0x492111(0x138)]};}else{const _0x38e7be={'memberId':_0x578938,'unitId':_0x2ffe0e,'content':_0x223fe2,'mention':_0x5b0c99},_0x56dca0=await this[_0x492111(0x127)][_0x492111(0x113)]('/universer-api/comment/unit/'+_0x2ffe0e+'/add',{'body':_0x38e7be});return X(_0x56dca0[_0x492111(0x125)][_0x492111(0x153)],_0x268f50);}}async[_0x4b07e7(0xfd)](_0x2b5825){const _0x43bce7=_0x4b07e7;var _0xb1a846,_0x37e651;const {text:_0x3d9ae5,unitId:_0x20c932}=_0x2b5825,_0x6841ec=(_0x37e651=(_0xb1a846=_0x3d9ae5['customRanges'])==null?void 0x0:_0xb1a846[_0x43bce7(0x132)](_0x349cb4=>_0x349cb4[_0x43bce7(0x101)]===_0x23fccf['COMMENT'])[_0x43bce7(0x119)](_0x11c5df=>_0x11c5df[_0x43bce7(0x156)]))!=null?_0x37e651:[],_0x35375a=JSON[_0x43bce7(0x159)](_0x3d9ae5),_0x1dbf12=_0x2b5825['threadId'],_0x4f956c=_0x2b5825['id'],_0xdf99f8={'memberId':(await this[_0x43bce7(0x12b)]['requireSession'](_0x20c932))[_0x43bce7(0x13d)](),'unitId':_0x20c932,'threadId':_0x1dbf12,'mention':_0x6841ec,'content':_0x35375a,'replyId':_0x4f956c},_0x4c504c=await this[_0x43bce7(0x127)][_0x43bce7(0x113)](_0x43bce7(0xff)+_0x20c932+_0x43bce7(0x105),{'body':_0xdf99f8});return!_0x4c504c[_0x43bce7(0x125)]['error']||_0x4c504c['body'][_0x43bce7(0x112)][_0x43bce7(0x146)]===0x1;}async['resolveComment'](_0xeda29b){const _0x23942d=_0x4b07e7,{unitId:_0x106db7}=_0xeda29b,_0x2e58a0=_0xeda29b[_0x23942d(0x14f)],_0x586e94={'memberId':this[_0x23942d(0x139)][_0x23942d(0x116)]()[_0x23942d(0x11d)],'unitId':_0x106db7,'threadId':_0x2e58a0,'solved':_0xeda29b[_0x23942d(0x103)]?I[_0x23942d(0xfe)]:I[_0x23942d(0x158)]},_0x47f213=await this[_0x23942d(0x127)]['post']('/universer-api/comment/unit/'+_0x106db7+'/solved',{'body':_0x586e94});return!_0x47f213['body'][_0x23942d(0x112)]||_0x47f213[_0x23942d(0x125)][_0x23942d(0x112)][_0x23942d(0x146)]===0x1;}async[_0x4b07e7(0x10d)](_0x52f61f,_0x24553e,_0x3d6b6e,_0x4d1b87){const _0x4825c8=_0x4b07e7,_0x24be61={'memberId':(await this[_0x4825c8(0x12b)][_0x4825c8(0x160)](_0x52f61f))[_0x4825c8(0x13d)](),'threadId':_0x3d6b6e,'replyId':_0x4d1b87,'unitId':_0x52f61f},_0x3740a2=await this['_httpService']['post'](_0x4825c8(0xff)+_0x52f61f+_0x4825c8(0x13c),{'body':_0x24be61});return!_0x3740a2[_0x4825c8(0x125)][_0x4825c8(0x112)]||_0x3740a2['body'][_0x4825c8(0x112)][_0x4825c8(0x146)]===0x1;}async[_0x4b07e7(0xf6)](_0xb39f73,_0x9fb586,_0x43b657){const _0x3127e2=_0x4b07e7,_0x35685f={'unitId':_0xb39f73,'threadId':_0x43b657},_0x1323e3=await this['_httpService'][_0x3127e2(0x113)]('/universer-api/comment/unit/'+_0xb39f73+_0x3127e2(0x104),{'body':_0x35685f}),_0x1e6210=_0x43b657[_0x3127e2(0x119)](_0x464aad=>ee(_0x1323e3[_0x3127e2(0x125)]['comments'][_0x464aad],_0xb39f73,_0x9fb586))[_0x3127e2(0x132)](Boolean);return Object[_0x3127e2(0x142)](_0x1323e3['body'][_0x3127e2(0x13b)])[_0x3127e2(0xf5)](_0x457901=>{const _0x3beb47=_0x3127e2;this[_0x3beb47(0x139)][_0x3beb47(0x13a)](_0x457901);}),_0x1e6210;}['saveCommentToSnapshot'](_0x4cdda2){const _0x347081=_0x4b07e7;return{'id':_0x4cdda2['id'],'threadId':_0x4cdda2['threadId'],'ref':_0x4cdda2[_0x347081(0x15d)]};}};f=Q([_(0x0,_0x3c112c(_0x3849c5)),_(0x1,_0x3c112c(_0x416fe6)),_(0x2,_0x3c112c(_0x1fd658)),_(0x3,_0x3c112c(_0x15e34d))],f);var re=Object[_0x4b07e7(0x13e)],te=(_0x35f8b3,_0x572dc3,_0x31f1d6,_0x5e12e9)=>{const _0x3ed32d=_0x4b07e7;for(var _0x448a9e=_0x5e12e9>0x1?void 0x0:_0x5e12e9?re(_0x572dc3,_0x31f1d6):_0x572dc3,_0x3da971=_0x35f8b3[_0x3ed32d(0xfb)]-0x1,_0x226144;_0x3da971>=0x0;_0x3da971--)(_0x226144=_0x35f8b3[_0x3da971])&&(_0x448a9e=_0x226144(_0x448a9e)||_0x448a9e);return _0x448a9e;},N=(_0x225574,_0x52e624)=>(_0x48768a,_0x4b2472)=>_0x52e624(_0x48768a,_0x4b2472,_0x225574);let g=class extends _0x6c7d02{constructor(_0x511312,_0x556241){const _0x209718=_0x4b07e7;super(),this[_0x209718(0x12a)]=_0x511312,this[_0x209718(0x11c)]=_0x556241,this[_0x209718(0x126)]();}['_initDataSource'](){const _0x5e7ed7=_0x4b07e7;this['_threadCommentDataSourceService'][_0x5e7ed7(0x114)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x5e7ed7(0x147)]=!0x1;}};g=te([N(0x0,_0x4013bc),N(0x1,_0x3c112c(f))],g);var se=Object[_0x4b07e7(0x131)],oe=Object[_0x4b07e7(0x13e)],ne=(_0x23ed34,_0x149197,_0xf47f53)=>_0x149197 in _0x23ed34?se(_0x23ed34,_0x149197,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf47f53}):_0x23ed34[_0x149197]=_0xf47f53,ie=(_0x30f388,_0x4f08ba,_0x28af5a,_0x36b259)=>{const _0x42e9e8=_0x4b07e7;for(var _0xb1b034=_0x36b259>0x1?void 0x0:_0x36b259?oe(_0x4f08ba,_0x28af5a):_0x4f08ba,_0x2f1e0b=_0x30f388[_0x42e9e8(0xfb)]-0x1,_0x559d65;_0x2f1e0b>=0x0;_0x2f1e0b--)(_0x559d65=_0x30f388[_0x2f1e0b])&&(_0xb1b034=_0x559d65(_0xb1b034)||_0xb1b034);return _0xb1b034;},w=(_0x292aee,_0x414712)=>(_0x167677,_0xb23af6)=>_0x414712(_0x167677,_0xb23af6,_0x292aee),$=(_0x2d8b37,_0x791142,_0x3859c1)=>ne(_0x2d8b37,typeof _0x791142!=_0x4b07e7(0x130)?_0x791142+'':_0x791142,_0x3859c1);let b=class extends _0x2f5ef4{constructor(_0x39969e=M,_0x292be0,_0x38ca6c){const _0x3d7004=_0x4b07e7;super(),this['_config']=_0x39969e,this['_injector']=_0x292be0,this[_0x3d7004(0x14b)]=_0x38ca6c;const {..._0x3a1b14}=_0x4a2386({},M,this[_0x3d7004(0x148)]);this[_0x3d7004(0x14b)][_0x3d7004(0x111)](z,_0x3a1b14);}[_0x4b07e7(0x123)](){const _0x4f8495=_0x4b07e7;[[f],[g],[S]][_0x4f8495(0xf5)](_0x45d384=>{const _0x281297=_0x4f8495;this[_0x281297(0x155)][_0x281297(0x10e)](_0x45d384);});}['onReady'](){const _0x4943ec=_0x4b07e7;this['_injector'][_0x4943ec(0x12e)](g),this['_injector']['get'](S);}};$(b,_0x4b07e7(0x135),W),$(b,'type',_0x514331['UNIVER_UNKNOWN']),b=ie([_0x5e5e54(_0xe804bc,_0x3d47fa,_0x21e0fd),w(0x1,_0x3c112c(_0x15e34d)),w(0x2,_0x1e0359)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2b6fb4=_0x585c;function _0x585c(_0x51f73b,_0x5e16c2){const _0xe115fe=_0xe115();return _0x585c=function(_0x585c64,_0x5e3847){_0x585c64=_0x585c64-0x11a;let _0x245a0d=_0xe115fe[_0x585c64];return _0x245a0d;},_0x585c(_0x51f73b,_0x5e16c2);}(function(_0x21ecce,_0x501a47){const _0x1fd13d=_0x585c,_0x5ea129=_0x21ecce();while(!![]){try{const _0x5a4666=parseInt(_0x1fd13d(0x164))/0x1*(parseInt(_0x1fd13d(0x172))/0x2)+parseInt(_0x1fd13d(0x156))/0x3*(-parseInt(_0x1fd13d(0x17e))/0x4)+-parseInt(_0x1fd13d(0x122))/0x5*(-parseInt(_0x1fd13d(0x16b))/0x6)+-parseInt(_0x1fd13d(0x129))/0x7*(parseInt(_0x1fd13d(0x178))/0x8)+parseInt(_0x1fd13d(0x154))/0x9*(-parseInt(_0x1fd13d(0x167))/0xa)+parseInt(_0x1fd13d(0x143))/0xb*(parseInt(_0x1fd13d(0x17c))/0xc)+parseInt(_0x1fd13d(0x145))/0xd;if(_0x5a4666===_0x501a47)break;else _0x5ea129['push'](_0x5ea129['shift']());}catch(_0x4765d7){_0x5ea129['push'](_0x5ea129['shift']());}}}(_0xe115,0x721b0));import{CommentService as _0x57d1e1,CollaborationSessionService as _0x4e39a0,UniverCollaborationClientPlugin as _0x24b712}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x507f31}from'@univerjs-pro/license';import{dayjs as _0x19f256,UserManagerService as _0x45864e,Inject as _0x999591,Injector as _0x5cd924,Disposable as _0x3d69cb,CustomRangeType as _0x7f7105,UniverInstanceType as _0x96876,DependentOn as _0x4eebb,IConfigService as _0x4a0a76,Plugin as _0x8e71cc,merge as _0x95a5cc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x128800}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3953ab,IThreadCommentDataSourceService as _0x139f27}from'@univerjs/thread-comment';import{bufferTime as _0x14879c}from'rxjs';import{HTTPService as _0x50b333}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0xe115(){const _0x47ec2a=['rangeType','map','code','delete','addUser','parse','_commentService','/list','pipe','pluginName','13PPDrLp','Edit','root','10mYLldd','content','thread-comment-data-source.config','commentUpdate$','1925274mmoQdN','replies','/delete','error','_configService','length','onReady','89394YaktVk','resolveComment','solved','slice','disposeWithMe','forEach','2781472FTcPGI','updateComment','_initDataSource','dataSource','36ggJVZX','getComment','351812DdHVSc','UNRECOGNIZED','_sessionService','Reply','subscribe','/add','setConfig','COMMENT','Unknown','saveCommentToSnapshot','add','stringify','5kWdcwH','UNIVER_UNKNOWN','userID','find','personId','_httpService','rangeId','7jHccjC','_injector','createTimestamp','deleteComment','comment','body','userId','Solved','_initUserSync','get','_threadCommentDataSource','getCurrentUser','Add','post','replyId','getUnit','OpenOrReOpen','Solve','values','defineProperty','getMemberID','symbol','unitId','getOwnPropertyDescriptor','listComments','_config','1643114GQSLjc','comments','5328362iumgjm','/universer-api/user/list','_userService','YYYY/MM/DD\x20HH:mm','_threadCommentModel','Delete','_init','/universer-api/comment/unit/','type','reply','format','_threadCommentDataSourceService','getUser','requireSession','parentId','7712307Wotpzx','user','3zIROJI','filter','threadId','size'];_0xe115=function(){return _0x47ec2a;};return _0xe115();}var I=(_0x42cc93=>(_0x42cc93[_0x42cc93[_0x2b6fb4(0x139)]=0x0]='OpenOrReOpen',_0x42cc93[_0x42cc93['Solved']=0x1]='Solved',_0x42cc93[_0x42cc93[_0x2b6fb4(0x17f)]=-0x1]=_0x2b6fb4(0x17f),_0x42cc93))(I||{}),v=(_0x3c93d5=>(_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x11e)]=0x0]=_0x2b6fb4(0x11e),_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x135)]=0x1]=_0x2b6fb4(0x135),_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x181)]=0x2]='Reply',_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x165)]=0x3]=_0x2b6fb4(0x165),_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x14a)]=0x4]=_0x2b6fb4(0x14a),_0x3c93d5[_0x3c93d5['Solve']=0x5]=_0x2b6fb4(0x13a),_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x17f)]=-0x1]=_0x2b6fb4(0x17f),_0x3c93d5))(v||{});const D=_0x3c1eb5=>_0x19f256(new Date(+_0x3c1eb5))[_0x2b6fb4(0x14f)](_0x2b6fb4(0x148)),B=async(_0x2b0849,_0x51263c)=>{const _0x349d58=_0x2b6fb4,_0x40162e=_0x2b0849['get'](_0x45864e),_0x1748d2=_0x2b0849['get'](_0x50b333);_0x51263c[_0x349d58(0x177)](_0x27099b=>{const _0xedfc27=_0x349d58;_0x40162e[_0xedfc27(0x151)](_0x27099b)&&_0x51263c[_0xedfc27(0x15d)](_0x27099b);}),_0x51263c[_0x349d58(0x159)]&&(await _0x1748d2['get'](_0x349d58(0x146),{'params':{'userIDs':[..._0x51263c]}}))[_0x349d58(0x12e)]['users'][_0x349d58(0x177)](_0x1eff89=>{const _0x509815=_0x349d58;_0x1eff89&&_0x40162e[_0x509815(0x15e)](_0x1eff89);});};var K=Object[_0x2b6fb4(0x140)],V=(_0x5e986c,_0x2e7615,_0x3fd8c6,_0x152cd0)=>{const _0x178878=_0x2b6fb4;for(var _0x40f319=_0x152cd0>0x1?void 0x0:_0x152cd0?K(_0x2e7615,_0x3fd8c6):_0x2e7615,_0x499678=_0x5e986c[_0x178878(0x170)]-0x1,_0x370664;_0x499678>=0x0;_0x499678--)(_0x370664=_0x5e986c[_0x499678])&&(_0x40f319=_0x370664(_0x40f319)||_0x40f319);return _0x40f319;},p=(_0x69b35f,_0x1e1023)=>(_0x2baeef,_0x34ddb1)=>_0x1e1023(_0x2baeef,_0x34ddb1,_0x69b35f);let S=class extends _0x3d69cb{constructor(_0x16a4a5,_0x54c5ee,_0x208d5c,_0x927183){const _0x4b992b=_0x2b6fb4;super(),this[_0x4b992b(0x160)]=_0x16a4a5,this[_0x4b992b(0x149)]=_0x54c5ee,this['_userService']=_0x208d5c,this[_0x4b992b(0x12a)]=_0x927183,this[_0x4b992b(0x14b)](),this[_0x4b992b(0x131)]();}['_initUserSync'](){const _0x2585b1=_0x2b6fb4;this[_0x2585b1(0x176)](this[_0x2585b1(0x149)][_0x2585b1(0x16a)][_0x2585b1(0x162)](_0x14879c(0x10))[_0x2585b1(0x11a)](_0x137c7e=>{const _0x12a871=_0x2585b1,_0x1cb452=new Set();_0x137c7e[_0x12a871(0x177)](_0x574345=>{const _0x53f1f2=_0x12a871;switch(_0x574345[_0x53f1f2(0x14d)]){case'add':{const _0x2b6156=_0x574345['payload'][_0x53f1f2(0x126)];_0x1cb452[_0x53f1f2(0x120)](_0x2b6156);break;}}}),B(this[_0x12a871(0x12a)],_0x1cb452);}));}[_0x2b6fb4(0x14b)](){const _0x24d1cd=_0x2b6fb4;this[_0x24d1cd(0x176)](this[_0x24d1cd(0x160)]['commentUpdate$'][_0x24d1cd(0x11a)](async _0x12ef50=>{const _0x51a5f2=_0x24d1cd;var _0x338ca7,_0x2b2752,_0x342b89,_0x197352;const _0x23172b=(_0x338ca7=this[_0x51a5f2(0x149)][_0x51a5f2(0x138)](_0x12ef50[_0x51a5f2(0x13f)])[_0x51a5f2(0x125)](_0x16a338=>_0x16a338[_0x51a5f2(0x158)]===_0x12ef50['threadId']))==null?void 0x0:_0x338ca7['root'];if(!_0x23172b)return;const {unitId:_0x49507f,subUnitId:_0x459b3f}=_0x23172b;switch(_0x12ef50[_0x51a5f2(0x155)]&&this[_0x51a5f2(0x147)]['addUser'](_0x12ef50[_0x51a5f2(0x155)]),_0x12ef50[_0x51a5f2(0x14d)]){case v['Add']:break;case v[_0x51a5f2(0x181)]:{this[_0x51a5f2(0x149)]['addComment'](_0x49507f,_0x459b3f,{'unitId':_0x49507f,'subUnitId':_0x459b3f,'ref':'','id':_0x12ef50[_0x51a5f2(0x137)],'dT':D(+_0x12ef50['createTimestamp']),'threadId':_0x12ef50[_0x51a5f2(0x158)],'personId':(_0x342b89=(_0x2b2752=_0x12ef50['user'])==null?void 0x0:_0x2b2752['userID'])!=null?_0x342b89:_0x12ef50[_0x51a5f2(0x12f)],'text':JSON[_0x51a5f2(0x15f)](_0x12ef50[_0x51a5f2(0x168)]),'parentId':_0x23172b['id']});break;}case v[_0x51a5f2(0x14a)]:{const _0x5b7101=this[_0x51a5f2(0x149)][_0x51a5f2(0x17d)](_0x49507f,_0x459b3f,_0x12ef50[_0x51a5f2(0x137)]);_0x5b7101&&_0x5b7101[_0x51a5f2(0x153)]&&this[_0x51a5f2(0x149)][_0x51a5f2(0x12c)](_0x49507f,_0x459b3f,_0x12ef50[_0x51a5f2(0x137)]);break;}case v['Edit']:{this[_0x51a5f2(0x149)][_0x51a5f2(0x179)](_0x49507f,_0x459b3f,{'commentId':_0x12ef50[_0x51a5f2(0x137)],'text':JSON[_0x51a5f2(0x15f)](_0x12ef50[_0x51a5f2(0x168)])});break;}case v['Solve']:{const _0x9f10f2=(_0x197352=this[_0x51a5f2(0x149)][_0x51a5f2(0x138)](_0x12ef50[_0x51a5f2(0x13f)])[_0x51a5f2(0x125)](_0x1f9b18=>_0x1f9b18[_0x51a5f2(0x158)]===_0x12ef50[_0x51a5f2(0x158)]))==null?void 0x0:_0x197352[_0x51a5f2(0x166)];_0x9f10f2&&this[_0x51a5f2(0x149)][_0x51a5f2(0x173)](_0x49507f,_0x459b3f,_0x9f10f2['id'],_0x12ef50[_0x51a5f2(0x174)]===I[_0x51a5f2(0x130)]);break;}}}));}};S=V([p(0x0,_0x999591(_0x57d1e1)),p(0x1,_0x999591(_0x3953ab)),p(0x2,_0x999591(_0x45864e)),p(0x3,_0x999591(_0x5cd924))],S);const z=_0x2b6fb4(0x169),M={};var k=Object[_0x2b6fb4(0x140)],Q=(_0x28fe6f,_0x17c03c,_0x1d3bec,_0x38d99a)=>{const _0x3b56b8=_0x2b6fb4;for(var _0x1558d8=_0x38d99a>0x1?void 0x0:_0x38d99a?k(_0x17c03c,_0x1d3bec):_0x17c03c,_0xdb83bd=_0x28fe6f[_0x3b56b8(0x170)]-0x1,_0x48601a;_0xdb83bd>=0x0;_0xdb83bd--)(_0x48601a=_0x28fe6f[_0xdb83bd])&&(_0x1558d8=_0x48601a(_0x1558d8)||_0x1558d8);return _0x1558d8;},_=(_0xafea79,_0x90ce06)=>(_0x21b2c5,_0x421ad0)=>_0x90ce06(_0x21b2c5,_0x421ad0,_0xafea79);function X(_0x3e1bb4,_0x68436){const _0x2d4a28=_0x2b6fb4,_0x25c302=_0x3e1bb4['replies'][0x0];return{..._0x68436,'id':_0x25c302[_0x2d4a28(0x137)],'resolved':_0x3e1bb4['solved']===0x1,'dT':D(_0x25c302[_0x2d4a28(0x12b)]),'personId':_0x25c302[_0x2d4a28(0x12f)],'threadId':_0x25c302[_0x2d4a28(0x158)]};}function ee(_0x6fc597,_0x239895,_0x49c8ea){const _0x229648=_0x2b6fb4;var _0x26098d,_0x1ba738;if(((_0x1ba738=(_0x26098d=_0x6fc597==null?void 0x0:_0x6fc597[_0x229648(0x16c)])==null?void 0x0:_0x26098d[_0x229648(0x170)])!=null?_0x1ba738:0x0)>0x0){const _0x1eb252=(_0x3e02e0,_0x44f40b)=>({'id':_0x3e02e0[_0x229648(0x137)],'threadId':_0x3e02e0[_0x229648(0x158)],'dT':D(_0x3e02e0[_0x229648(0x12b)]),'personId':_0x3e02e0[_0x229648(0x12f)],'resolved':_0x6fc597[_0x229648(0x174)]===I[_0x229648(0x130)],'unitId':_0x239895,'subUnitId':_0x49c8ea,'text':JSON[_0x229648(0x15f)](_0x3e02e0[_0x229648(0x168)]),'parentId':_0x44f40b}),_0x38d991=_0x1eb252(_0x6fc597[_0x229648(0x16c)][0x0]);return{..._0x38d991,'children':_0x6fc597[_0x229648(0x16c)][_0x229648(0x175)](0x1)['map'](_0x342fd8=>_0x1eb252(_0x342fd8,_0x38d991['id']))};}return null;}let f=class{constructor(_0x208448,_0x4fcf7f,_0x173f1a,_0x142a24){const _0x4bf9a3=_0x2b6fb4;this[_0x4bf9a3(0x127)]=_0x208448,this[_0x4bf9a3(0x147)]=_0x4fcf7f,this[_0x4bf9a3(0x180)]=_0x173f1a,this[_0x4bf9a3(0x12a)]=_0x142a24;}async['addComment'](_0xedcc16){const _0x4a9cc6=_0x2b6fb4;var _0x190e3d,_0x2677ba;const {parentId:_0x58949d,unitId:_0x27a1eb,text:_0x463c4a,threadId:_0x3c2638}=_0xedcc16,_0x30f199=(_0x2677ba=(_0x190e3d=_0x463c4a['customRanges'])==null?void 0x0:_0x190e3d[_0x4a9cc6(0x157)](_0x2fe3c7=>_0x2fe3c7[_0x4a9cc6(0x15a)]===_0x7f7105[_0x4a9cc6(0x11d)])[_0x4a9cc6(0x15b)](_0x42e209=>_0x42e209[_0x4a9cc6(0x128)]))!=null?_0x2677ba:[],_0x72e67=JSON[_0x4a9cc6(0x121)](_0x463c4a),_0x5a2be8=(await this['_sessionService'][_0x4a9cc6(0x152)](_0x27a1eb))[_0x4a9cc6(0x13d)]();if(_0x58949d){const _0x4d4e0d={'memberId':_0x5a2be8,'unitId':_0x27a1eb,'content':_0x72e67,'mention':_0x30f199,'threadId':_0x3c2638},_0x3c215c=(await this[_0x4a9cc6(0x127)][_0x4a9cc6(0x136)](_0x4a9cc6(0x14c)+_0x27a1eb+'/reply',{'body':_0x4d4e0d}))['body'][_0x4a9cc6(0x14e)];return{..._0xedcc16,'id':_0x3c215c[_0x4a9cc6(0x137)],'dT':_0x19f256(+_0x3c215c[_0x4a9cc6(0x12b)])[_0x4a9cc6(0x14f)](_0x4a9cc6(0x148)),'personId':_0x3c215c[_0x4a9cc6(0x12f)]};}else{const _0xeb165={'memberId':_0x5a2be8,'unitId':_0x27a1eb,'content':_0x72e67,'mention':_0x30f199},_0x4e2623=await this['_httpService'][_0x4a9cc6(0x136)](_0x4a9cc6(0x14c)+_0x27a1eb+_0x4a9cc6(0x11b),{'body':_0xeb165});return X(_0x4e2623[_0x4a9cc6(0x12e)][_0x4a9cc6(0x12d)],_0xedcc16);}}async[_0x2b6fb4(0x179)](_0x12db1d){const _0x10af38=_0x2b6fb4;var _0xe413f4,_0x5c68d4;const {text:_0x105b1d,unitId:_0x34d84d}=_0x12db1d,_0x517c01=(_0x5c68d4=(_0xe413f4=_0x105b1d['customRanges'])==null?void 0x0:_0xe413f4['filter'](_0x4f3d18=>_0x4f3d18['rangeType']===_0x7f7105[_0x10af38(0x11d)])[_0x10af38(0x15b)](_0x15cdaa=>_0x15cdaa[_0x10af38(0x128)]))!=null?_0x5c68d4:[],_0x2bee84=JSON[_0x10af38(0x121)](_0x105b1d),_0x3f03e0=_0x12db1d[_0x10af38(0x158)],_0x7de356=_0x12db1d['id'],_0x1df881={'memberId':(await this[_0x10af38(0x180)][_0x10af38(0x152)](_0x34d84d))[_0x10af38(0x13d)](),'unitId':_0x34d84d,'threadId':_0x3f03e0,'mention':_0x517c01,'content':_0x2bee84,'replyId':_0x7de356},_0x4e53a8=await this[_0x10af38(0x127)]['post'](_0x10af38(0x14c)+_0x34d84d+'/edit',{'body':_0x1df881});return!_0x4e53a8[_0x10af38(0x12e)][_0x10af38(0x16e)]||_0x4e53a8[_0x10af38(0x12e)]['error'][_0x10af38(0x15c)]===0x1;}async['resolveComment'](_0x995e69){const _0x256b11=_0x2b6fb4,{unitId:_0x331438}=_0x995e69,_0x18cd80=_0x995e69[_0x256b11(0x158)],_0x281321={'memberId':this[_0x256b11(0x147)][_0x256b11(0x134)]()[_0x256b11(0x124)],'unitId':_0x331438,'threadId':_0x18cd80,'solved':_0x995e69['resolved']?I[_0x256b11(0x130)]:I['OpenOrReOpen']},_0x5b1003=await this['_httpService'][_0x256b11(0x136)](_0x256b11(0x14c)+_0x331438+'/solved',{'body':_0x281321});return!_0x5b1003[_0x256b11(0x12e)]['error']||_0x5b1003['body'][_0x256b11(0x16e)][_0x256b11(0x15c)]===0x1;}async[_0x2b6fb4(0x12c)](_0x4c7ca3,_0x371e44,_0x40c80a,_0x359e34){const _0x1fc7c8=_0x2b6fb4,_0x1265e7={'memberId':(await this['_sessionService'][_0x1fc7c8(0x152)](_0x4c7ca3))[_0x1fc7c8(0x13d)](),'threadId':_0x40c80a,'replyId':_0x359e34,'unitId':_0x4c7ca3},_0x5404b8=await this[_0x1fc7c8(0x127)][_0x1fc7c8(0x136)](_0x1fc7c8(0x14c)+_0x4c7ca3+_0x1fc7c8(0x16d),{'body':_0x1265e7});return!_0x5404b8[_0x1fc7c8(0x12e)]['error']||_0x5404b8['body'][_0x1fc7c8(0x16e)][_0x1fc7c8(0x15c)]===0x1;}async[_0x2b6fb4(0x141)](_0x27f5bd,_0x2feb52,_0x3c8534){const _0x401929=_0x2b6fb4,_0x8ddbb7={'unitId':_0x27f5bd,'threadId':_0x3c8534},_0xe0564f=await this[_0x401929(0x127)][_0x401929(0x136)](_0x401929(0x14c)+_0x27f5bd+_0x401929(0x161),{'body':_0x8ddbb7}),_0x127391=_0x3c8534[_0x401929(0x15b)](_0x59f29e=>ee(_0xe0564f['body'][_0x401929(0x144)][_0x59f29e],_0x27f5bd,_0x2feb52))[_0x401929(0x157)](Boolean);return Object[_0x401929(0x13b)](_0xe0564f[_0x401929(0x12e)]['users'])['forEach'](_0x2a4cd0=>{this['_userService']['addUser'](_0x2a4cd0);}),_0x127391;}[_0x2b6fb4(0x11f)](_0xcb6815){return{'id':_0xcb6815['id'],'threadId':_0xcb6815['threadId'],'ref':_0xcb6815['ref']};}};f=Q([_(0x0,_0x999591(_0x50b333)),_(0x1,_0x999591(_0x45864e)),_(0x2,_0x999591(_0x4e39a0)),_(0x3,_0x999591(_0x5cd924))],f);var re=Object[_0x2b6fb4(0x140)],te=(_0x52c5be,_0x195f0d,_0x33dd49,_0x4705c1)=>{const _0x8848ae=_0x2b6fb4;for(var _0x202d6c=_0x4705c1>0x1?void 0x0:_0x4705c1?re(_0x195f0d,_0x33dd49):_0x195f0d,_0x42fc19=_0x52c5be[_0x8848ae(0x170)]-0x1,_0x3975e3;_0x42fc19>=0x0;_0x42fc19--)(_0x3975e3=_0x52c5be[_0x42fc19])&&(_0x202d6c=_0x3975e3(_0x202d6c)||_0x202d6c);return _0x202d6c;},N=(_0x195e78,_0x575e38)=>(_0x322760,_0x2e234b)=>_0x575e38(_0x322760,_0x2e234b,_0x195e78);let g=class extends _0x3d69cb{constructor(_0x3835fb,_0xa1fa6c){const _0x92d218=_0x2b6fb4;super(),this[_0x92d218(0x150)]=_0x3835fb,this[_0x92d218(0x133)]=_0xa1fa6c,this[_0x92d218(0x17a)]();}[_0x2b6fb4(0x17a)](){const _0x2b62fa=_0x2b6fb4;this[_0x2b62fa(0x150)][_0x2b62fa(0x17b)]=this[_0x2b62fa(0x133)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x139f27),N(0x1,_0x999591(f))],g);var se=Object[_0x2b6fb4(0x13c)],oe=Object[_0x2b6fb4(0x140)],ne=(_0x25a221,_0x1dc1ee,_0x3e636b)=>_0x1dc1ee in _0x25a221?se(_0x25a221,_0x1dc1ee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e636b}):_0x25a221[_0x1dc1ee]=_0x3e636b,ie=(_0x32ff04,_0x57a637,_0x1d3be5,_0xa8e580)=>{for(var _0x5a8626=_0xa8e580>0x1?void 0x0:_0xa8e580?oe(_0x57a637,_0x1d3be5):_0x57a637,_0x3d1268=_0x32ff04['length']-0x1,_0x32606b;_0x3d1268>=0x0;_0x3d1268--)(_0x32606b=_0x32ff04[_0x3d1268])&&(_0x5a8626=_0x32606b(_0x5a8626)||_0x5a8626);return _0x5a8626;},w=(_0x31c9cc,_0x94e05f)=>(_0x349c84,_0x3dc712)=>_0x94e05f(_0x349c84,_0x3dc712,_0x31c9cc),$=(_0x581b03,_0x390b4c,_0x116f13)=>ne(_0x581b03,typeof _0x390b4c!=_0x2b6fb4(0x13e)?_0x390b4c+'':_0x390b4c,_0x116f13);let b=class extends _0x8e71cc{constructor(_0x27f0fd=M,_0x34c54c,_0x5339a1){const _0x431779=_0x2b6fb4;super(),this[_0x431779(0x142)]=_0x27f0fd,this['_injector']=_0x34c54c,this[_0x431779(0x16f)]=_0x5339a1;const {..._0x41b26d}=_0x95a5cc({},M,this[_0x431779(0x142)]);this[_0x431779(0x16f)][_0x431779(0x11c)](z,_0x41b26d);}['onStarting'](){const _0x265766=_0x2b6fb4;[[f],[g],[S]][_0x265766(0x177)](_0x9256cb=>{const _0x184aa3=_0x265766;this[_0x184aa3(0x12a)]['add'](_0x9256cb);});}[_0x2b6fb4(0x171)](){const _0x1e510e=_0x2b6fb4;this[_0x1e510e(0x12a)][_0x1e510e(0x132)](g),this[_0x1e510e(0x12a)][_0x1e510e(0x132)](S);}};$(b,_0x2b6fb4(0x163),W),$(b,_0x2b6fb4(0x14d),_0x96876[_0x2b6fb4(0x123)]),b=ie([_0x4eebb(_0x128800,_0x24b712,_0x507f31),w(0x1,_0x999591(_0x5cd924)),w(0x2,_0x4a0a76)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4b07e7=_0x181b;(function(_0x2791fb,_0x4da5a1){const _0x521bea=_0x181b,_0x550324=_0x2791fb();while(!![]){try{const _0x1a9c71=-parseInt(_0x521bea(0x106))/0x1*(-parseInt(_0x521bea(0x151))/0x2)+parseInt(_0x521bea(0xf8))/0x3*(parseInt(_0x521bea(0x120))/0x4)+-parseInt(_0x521bea(0x121))/0x5+-parseInt(_0x521bea(0x154))/0x6*(-parseInt(_0x521bea(0x107))/0x7)+parseInt(_0x521bea(0x134))/0x8*(parseInt(_0x521bea(0x110))/0x9)+-parseInt(_0x521bea(0x13f))/0xa*(-parseInt(_0x521bea(0x108))/0xb)+-parseInt(_0x521bea(0x14c))/0xc*(parseInt(_0x521bea(0x10b))/0xd);if(_0x1a9c71===_0x4da5a1)break;else _0x550324['push'](_0x550324['shift']());}catch(_0x2d228d){_0x550324['push'](_0x550324['shift']());}}}(_0x1923,0x7b47f));import{CommentService as _0x1a1583,CollaborationSessionService as _0x1fd658,UniverCollaborationClientPlugin as _0x3d47fa}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x21e0fd}from'@univerjs-pro/license';import{dayjs as _0x471760,UserManagerService as _0x416fe6,Inject as _0x3c112c,Injector as _0x15e34d,Disposable as _0x6c7d02,CustomRangeType as _0x23fccf,UniverInstanceType as _0x514331,DependentOn as _0x5e5e54,IConfigService as _0x1e0359,Plugin as _0x2f5ef4,merge as _0x4a2386}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xe804bc}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x52f7ea,IThreadCommentDataSourceService as _0x4013bc}from'@univerjs/thread-comment';import{bufferTime as _0x5984f4}from'rxjs';import{HTTPService as _0x3849c5}from'@univerjs/network';const W=_0x4b07e7(0xf7);function _0x1923(){const _0x5595fb=['_threadCommentDataSourceService','_sessionService','COMMENT','unitId','get','_commentService','symbol','defineProperty','filter','disposeWithMe','241448yIyFkS','pluginName','YYYY/MM/DD\x20HH:mm','getUnit','userId','_userService','addUser','users','/delete','getMemberID','getOwnPropertyDescriptor','27460jbIabh','delete','user','values','personId','solved','Reply','code','syncUpdateMutationToColla','_config','slice','getComment','_configService','98664bwJkjc','UNRECOGNIZED','format','threadId','commentUpdate$','2EkVeVN','replyId','comment','6slXwyg','_injector','rangeId','thread-comment-data-source.config','OpenOrReOpen','stringify','content','Delete','addComment','ref','Edit','find','requireSession','forEach','listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3AYQNmX','size','subscribe','length','Add','updateComment','Solved','/universer-api/comment/unit/','createTimestamp','rangeType','parse','resolved','/list','/edit','507930tvnOII','4267585kMQSso','2651HoayUC','pipe','replies','3653zSsDez','getUser','deleteComment','add','parentId','171XKoZlS','setConfig','error','post','dataSource','_initUserSync','getCurrentUser','/universer-api/user/list','/reply','map','Solve','root','_threadCommentDataSource','userID','resolveComment','type','1853308qdwozu','3980aQywqa','_threadCommentModel','onStarting','_init','body','_initDataSource','_httpService','payload','Unknown'];_0x1923=function(){return _0x5595fb;};return _0x1923();}var I=(_0x31d8b8=>(_0x31d8b8[_0x31d8b8[_0x4b07e7(0x158)]=0x0]='OpenOrReOpen',_0x31d8b8[_0x31d8b8['Solved']=0x1]=_0x4b07e7(0xfe),_0x31d8b8[_0x31d8b8[_0x4b07e7(0x14d)]=-0x1]='UNRECOGNIZED',_0x31d8b8))(I||{}),v=(_0x5d3573=>(_0x5d3573[_0x5d3573[_0x4b07e7(0x129)]=0x0]=_0x4b07e7(0x129),_0x5d3573[_0x5d3573[_0x4b07e7(0xfc)]=0x1]=_0x4b07e7(0xfc),_0x5d3573[_0x5d3573[_0x4b07e7(0x145)]=0x2]=_0x4b07e7(0x145),_0x5d3573[_0x5d3573['Edit']=0x3]=_0x4b07e7(0x15e),_0x5d3573[_0x5d3573['Delete']=0x4]=_0x4b07e7(0x15b),_0x5d3573[_0x5d3573[_0x4b07e7(0x11a)]=0x5]=_0x4b07e7(0x11a),_0x5d3573[_0x5d3573[_0x4b07e7(0x14d)]=-0x1]=_0x4b07e7(0x14d),_0x5d3573))(v||{});const D=_0x3c2d82=>_0x471760(new Date(+_0x3c2d82))[_0x4b07e7(0x14e)](_0x4b07e7(0x136)),B=async(_0x1cde4d,_0xe92fe5)=>{const _0xaa6722=_0x4b07e7,_0xab947f=_0x1cde4d[_0xaa6722(0x12e)](_0x416fe6),_0x1ef13a=_0x1cde4d[_0xaa6722(0x12e)](_0x3849c5);_0xe92fe5['forEach'](_0x5a1bdb=>{const _0x5de147=_0xaa6722;_0xab947f[_0x5de147(0x10c)](_0x5a1bdb)&&_0xe92fe5[_0x5de147(0x140)](_0x5a1bdb);}),_0xe92fe5[_0xaa6722(0xf9)]&&(await _0x1ef13a['get'](_0xaa6722(0x117),{'params':{'userIDs':[..._0xe92fe5]}}))[_0xaa6722(0x125)][_0xaa6722(0x13b)]['forEach'](_0x406591=>{const _0x3be61b=_0xaa6722;_0x406591&&_0xab947f[_0x3be61b(0x13a)](_0x406591);});};var K=Object[_0x4b07e7(0x13e)],V=(_0x2a6c1b,_0xd948de,_0x508d56,_0xaca8b0)=>{const _0x1deed3=_0x4b07e7;for(var _0x5844b2=_0xaca8b0>0x1?void 0x0:_0xaca8b0?K(_0xd948de,_0x508d56):_0xd948de,_0x5766e1=_0x2a6c1b[_0x1deed3(0xfb)]-0x1,_0x54902d;_0x5766e1>=0x0;_0x5766e1--)(_0x54902d=_0x2a6c1b[_0x5766e1])&&(_0x5844b2=_0x54902d(_0x5844b2)||_0x5844b2);return _0x5844b2;},p=(_0x5b1438,_0x1d7b6b)=>(_0x1ef566,_0x3ea25f)=>_0x1d7b6b(_0x1ef566,_0x3ea25f,_0x5b1438);let S=class extends _0x6c7d02{constructor(_0x19bb64,_0x218317,_0x4ce68c,_0x4922a3){const _0x237b44=_0x4b07e7;super(),this[_0x237b44(0x12f)]=_0x19bb64,this[_0x237b44(0x122)]=_0x218317,this['_userService']=_0x4ce68c,this['_injector']=_0x4922a3,this[_0x237b44(0x124)](),this[_0x237b44(0x115)]();}[_0x4b07e7(0x115)](){const _0x42c3b3=_0x4b07e7;this['disposeWithMe'](this[_0x42c3b3(0x122)]['commentUpdate$'][_0x42c3b3(0x109)](_0x5984f4(0x10))[_0x42c3b3(0xfa)](_0xf821f6=>{const _0x1c1c92=_0x42c3b3,_0x11dfb5=new Set();_0xf821f6['forEach'](_0x3926f1=>{const _0x942c36=_0x181b;switch(_0x3926f1[_0x942c36(0x11f)]){case _0x942c36(0x10e):{const _0x2cf316=_0x3926f1[_0x942c36(0x128)][_0x942c36(0x143)];_0x11dfb5[_0x942c36(0x10e)](_0x2cf316);break;}}}),B(this[_0x1c1c92(0x155)],_0x11dfb5);}));}[_0x4b07e7(0x124)](){const _0x1a1700=_0x4b07e7;this[_0x1a1700(0x133)](this['_commentService'][_0x1a1700(0x150)][_0x1a1700(0xfa)](async _0x483617=>{const _0x31cf19=_0x1a1700;var _0x4dddb6,_0x8c2546,_0x33af4c,_0xd89e1a;const _0x187d48=(_0x4dddb6=this[_0x31cf19(0x122)][_0x31cf19(0x137)](_0x483617[_0x31cf19(0x12d)])['find'](_0xb1ef45=>_0xb1ef45[_0x31cf19(0x14f)]===_0x483617['threadId']))==null?void 0x0:_0x4dddb6[_0x31cf19(0x11b)];if(!_0x187d48)return;const {unitId:_0x80eb4b,subUnitId:_0x599791}=_0x187d48;switch(_0x483617[_0x31cf19(0x141)]&&this['_userService'][_0x31cf19(0x13a)](_0x483617[_0x31cf19(0x141)]),_0x483617[_0x31cf19(0x11f)]){case v['Add']:break;case v[_0x31cf19(0x145)]:{this[_0x31cf19(0x122)]['addComment'](_0x80eb4b,_0x599791,{'unitId':_0x80eb4b,'subUnitId':_0x599791,'ref':'','id':_0x483617[_0x31cf19(0x152)],'dT':D(+_0x483617[_0x31cf19(0x100)]),'threadId':_0x483617[_0x31cf19(0x14f)],'personId':(_0x33af4c=(_0x8c2546=_0x483617[_0x31cf19(0x141)])==null?void 0x0:_0x8c2546['userID'])!=null?_0x33af4c:_0x483617['userId'],'text':JSON[_0x31cf19(0x102)](_0x483617['content']),'parentId':_0x187d48['id']});break;}case v[_0x31cf19(0x15b)]:{const _0x4e0c9a=this[_0x31cf19(0x122)][_0x31cf19(0x14a)](_0x80eb4b,_0x599791,_0x483617[_0x31cf19(0x152)]);_0x4e0c9a&&_0x4e0c9a[_0x31cf19(0x10f)]&&this[_0x31cf19(0x122)][_0x31cf19(0x10d)](_0x80eb4b,_0x599791,_0x483617['replyId']);break;}case v[_0x31cf19(0x15e)]:{this[_0x31cf19(0x122)][_0x31cf19(0xfd)](_0x80eb4b,_0x599791,{'commentId':_0x483617['replyId'],'text':JSON['parse'](_0x483617[_0x31cf19(0x15a)])});break;}case v['Solve']:{const _0x8cf9d8=(_0xd89e1a=this['_threadCommentModel'][_0x31cf19(0x137)](_0x483617[_0x31cf19(0x12d)])[_0x31cf19(0x15f)](_0x4001df=>_0x4001df[_0x31cf19(0x14f)]===_0x483617[_0x31cf19(0x14f)]))==null?void 0x0:_0xd89e1a[_0x31cf19(0x11b)];_0x8cf9d8&&this[_0x31cf19(0x122)][_0x31cf19(0x11e)](_0x80eb4b,_0x599791,_0x8cf9d8['id'],_0x483617[_0x31cf19(0x144)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x3c112c(_0x1a1583)),p(0x1,_0x3c112c(_0x52f7ea)),p(0x2,_0x3c112c(_0x416fe6)),p(0x3,_0x3c112c(_0x15e34d))],S);const z=_0x4b07e7(0x157),M={};var k=Object[_0x4b07e7(0x13e)],Q=(_0x1950c6,_0x4cf0e0,_0x49ccc0,_0x33a086)=>{const _0x273370=_0x4b07e7;for(var _0xec26fb=_0x33a086>0x1?void 0x0:_0x33a086?k(_0x4cf0e0,_0x49ccc0):_0x4cf0e0,_0x3359eb=_0x1950c6[_0x273370(0xfb)]-0x1,_0x2a84f7;_0x3359eb>=0x0;_0x3359eb--)(_0x2a84f7=_0x1950c6[_0x3359eb])&&(_0xec26fb=_0x2a84f7(_0xec26fb)||_0xec26fb);return _0xec26fb;},_=(_0x2ee0ab,_0x344c50)=>(_0x1c2240,_0xa54929)=>_0x344c50(_0x1c2240,_0xa54929,_0x2ee0ab);function _0x181b(_0xb1ae11,_0x318b9f){const _0x192349=_0x1923();return _0x181b=function(_0x181bd3,_0x418c9d){_0x181bd3=_0x181bd3-0xf5;let _0x4defb7=_0x192349[_0x181bd3];return _0x4defb7;},_0x181b(_0xb1ae11,_0x318b9f);}function X(_0x25bb61,_0xe72036){const _0x286d65=_0x4b07e7,_0x8e733f=_0x25bb61[_0x286d65(0x10a)][0x0];return{..._0xe72036,'id':_0x8e733f['replyId'],'resolved':_0x25bb61['solved']===0x1,'dT':D(_0x8e733f[_0x286d65(0x100)]),'personId':_0x8e733f[_0x286d65(0x138)],'threadId':_0x8e733f[_0x286d65(0x14f)]};}function ee(_0x34270e,_0x3c5a87,_0x6b82ad){const _0x4a34f9=_0x4b07e7;var _0x30047c,_0x4aeb13;if(((_0x4aeb13=(_0x30047c=_0x34270e==null?void 0x0:_0x34270e[_0x4a34f9(0x10a)])==null?void 0x0:_0x30047c[_0x4a34f9(0xfb)])!=null?_0x4aeb13:0x0)>0x0){const _0x3cc799=(_0x474b6b,_0x632057)=>({'id':_0x474b6b[_0x4a34f9(0x152)],'threadId':_0x474b6b['threadId'],'dT':D(_0x474b6b[_0x4a34f9(0x100)]),'personId':_0x474b6b['userId'],'resolved':_0x34270e[_0x4a34f9(0x144)]===I[_0x4a34f9(0xfe)],'unitId':_0x3c5a87,'subUnitId':_0x6b82ad,'text':JSON['parse'](_0x474b6b[_0x4a34f9(0x15a)]),'parentId':_0x632057}),_0x5b5a02=_0x3cc799(_0x34270e['replies'][0x0]);return{..._0x5b5a02,'children':_0x34270e[_0x4a34f9(0x10a)][_0x4a34f9(0x149)](0x1)[_0x4a34f9(0x119)](_0x4e43f9=>_0x3cc799(_0x4e43f9,_0x5b5a02['id']))};}return null;}let f=class{constructor(_0xa96396,_0xf6c0e7,_0x25aae8,_0xa13c7a){const _0x349230=_0x4b07e7;this[_0x349230(0x127)]=_0xa96396,this[_0x349230(0x139)]=_0xf6c0e7,this[_0x349230(0x12b)]=_0x25aae8,this[_0x349230(0x155)]=_0xa13c7a;}async[_0x4b07e7(0x15c)](_0x268f50){const _0x492111=_0x4b07e7;var _0x26e451,_0xc31f89;const {parentId:_0x4d0ae6,unitId:_0x2ffe0e,text:_0x2f6cc1,threadId:_0xd0ceb5}=_0x268f50,_0x5b0c99=(_0xc31f89=(_0x26e451=_0x2f6cc1['customRanges'])==null?void 0x0:_0x26e451[_0x492111(0x132)](_0x5c52ac=>_0x5c52ac[_0x492111(0x101)]===_0x23fccf[_0x492111(0x12c)])[_0x492111(0x119)](_0x396ad5=>_0x396ad5[_0x492111(0x156)]))!=null?_0xc31f89:[],_0x223fe2=JSON[_0x492111(0x159)](_0x2f6cc1),_0x578938=(await this[_0x492111(0x12b)][_0x492111(0x160)](_0x2ffe0e))['getMemberID']();if(_0x4d0ae6){const _0x22a6ab={'memberId':_0x578938,'unitId':_0x2ffe0e,'content':_0x223fe2,'mention':_0x5b0c99,'threadId':_0xd0ceb5},_0x307626=(await this['_httpService']['post'](_0x492111(0xff)+_0x2ffe0e+_0x492111(0x118),{'body':_0x22a6ab}))[_0x492111(0x125)]['reply'];return{..._0x268f50,'id':_0x307626[_0x492111(0x152)],'dT':_0x471760(+_0x307626[_0x492111(0x100)])[_0x492111(0x14e)](_0x492111(0x136)),'personId':_0x307626[_0x492111(0x138)]};}else{const _0x38e7be={'memberId':_0x578938,'unitId':_0x2ffe0e,'content':_0x223fe2,'mention':_0x5b0c99},_0x56dca0=await this[_0x492111(0x127)][_0x492111(0x113)]('/universer-api/comment/unit/'+_0x2ffe0e+'/add',{'body':_0x38e7be});return X(_0x56dca0[_0x492111(0x125)][_0x492111(0x153)],_0x268f50);}}async[_0x4b07e7(0xfd)](_0x2b5825){const _0x43bce7=_0x4b07e7;var _0xb1a846,_0x37e651;const {text:_0x3d9ae5,unitId:_0x20c932}=_0x2b5825,_0x6841ec=(_0x37e651=(_0xb1a846=_0x3d9ae5['customRanges'])==null?void 0x0:_0xb1a846[_0x43bce7(0x132)](_0x349cb4=>_0x349cb4[_0x43bce7(0x101)]===_0x23fccf['COMMENT'])[_0x43bce7(0x119)](_0x11c5df=>_0x11c5df[_0x43bce7(0x156)]))!=null?_0x37e651:[],_0x35375a=JSON[_0x43bce7(0x159)](_0x3d9ae5),_0x1dbf12=_0x2b5825['threadId'],_0x4f956c=_0x2b5825['id'],_0xdf99f8={'memberId':(await this[_0x43bce7(0x12b)]['requireSession'](_0x20c932))[_0x43bce7(0x13d)](),'unitId':_0x20c932,'threadId':_0x1dbf12,'mention':_0x6841ec,'content':_0x35375a,'replyId':_0x4f956c},_0x4c504c=await this[_0x43bce7(0x127)][_0x43bce7(0x113)](_0x43bce7(0xff)+_0x20c932+_0x43bce7(0x105),{'body':_0xdf99f8});return!_0x4c504c[_0x43bce7(0x125)]['error']||_0x4c504c['body'][_0x43bce7(0x112)][_0x43bce7(0x146)]===0x1;}async['resolveComment'](_0xeda29b){const _0x23942d=_0x4b07e7,{unitId:_0x106db7}=_0xeda29b,_0x2e58a0=_0xeda29b[_0x23942d(0x14f)],_0x586e94={'memberId':this[_0x23942d(0x139)][_0x23942d(0x116)]()[_0x23942d(0x11d)],'unitId':_0x106db7,'threadId':_0x2e58a0,'solved':_0xeda29b[_0x23942d(0x103)]?I[_0x23942d(0xfe)]:I[_0x23942d(0x158)]},_0x47f213=await this[_0x23942d(0x127)]['post']('/universer-api/comment/unit/'+_0x106db7+'/solved',{'body':_0x586e94});return!_0x47f213['body'][_0x23942d(0x112)]||_0x47f213[_0x23942d(0x125)][_0x23942d(0x112)][_0x23942d(0x146)]===0x1;}async[_0x4b07e7(0x10d)](_0x52f61f,_0x24553e,_0x3d6b6e,_0x4d1b87){const _0x4825c8=_0x4b07e7,_0x24be61={'memberId':(await this[_0x4825c8(0x12b)][_0x4825c8(0x160)](_0x52f61f))[_0x4825c8(0x13d)](),'threadId':_0x3d6b6e,'replyId':_0x4d1b87,'unitId':_0x52f61f},_0x3740a2=await this['_httpService']['post'](_0x4825c8(0xff)+_0x52f61f+_0x4825c8(0x13c),{'body':_0x24be61});return!_0x3740a2[_0x4825c8(0x125)][_0x4825c8(0x112)]||_0x3740a2['body'][_0x4825c8(0x112)][_0x4825c8(0x146)]===0x1;}async[_0x4b07e7(0xf6)](_0xb39f73,_0x9fb586,_0x43b657){const _0x3127e2=_0x4b07e7,_0x35685f={'unitId':_0xb39f73,'threadId':_0x43b657},_0x1323e3=await this['_httpService'][_0x3127e2(0x113)]('/universer-api/comment/unit/'+_0xb39f73+_0x3127e2(0x104),{'body':_0x35685f}),_0x1e6210=_0x43b657[_0x3127e2(0x119)](_0x464aad=>ee(_0x1323e3[_0x3127e2(0x125)]['comments'][_0x464aad],_0xb39f73,_0x9fb586))[_0x3127e2(0x132)](Boolean);return Object[_0x3127e2(0x142)](_0x1323e3['body'][_0x3127e2(0x13b)])[_0x3127e2(0xf5)](_0x457901=>{const _0x3beb47=_0x3127e2;this[_0x3beb47(0x139)][_0x3beb47(0x13a)](_0x457901);}),_0x1e6210;}['saveCommentToSnapshot'](_0x4cdda2){const _0x347081=_0x4b07e7;return{'id':_0x4cdda2['id'],'threadId':_0x4cdda2['threadId'],'ref':_0x4cdda2[_0x347081(0x15d)]};}};f=Q([_(0x0,_0x3c112c(_0x3849c5)),_(0x1,_0x3c112c(_0x416fe6)),_(0x2,_0x3c112c(_0x1fd658)),_(0x3,_0x3c112c(_0x15e34d))],f);var re=Object[_0x4b07e7(0x13e)],te=(_0x35f8b3,_0x572dc3,_0x31f1d6,_0x5e12e9)=>{const _0x3ed32d=_0x4b07e7;for(var _0x448a9e=_0x5e12e9>0x1?void 0x0:_0x5e12e9?re(_0x572dc3,_0x31f1d6):_0x572dc3,_0x3da971=_0x35f8b3[_0x3ed32d(0xfb)]-0x1,_0x226144;_0x3da971>=0x0;_0x3da971--)(_0x226144=_0x35f8b3[_0x3da971])&&(_0x448a9e=_0x226144(_0x448a9e)||_0x448a9e);return _0x448a9e;},N=(_0x225574,_0x52e624)=>(_0x48768a,_0x4b2472)=>_0x52e624(_0x48768a,_0x4b2472,_0x225574);let g=class extends _0x6c7d02{constructor(_0x511312,_0x556241){const _0x209718=_0x4b07e7;super(),this[_0x209718(0x12a)]=_0x511312,this[_0x209718(0x11c)]=_0x556241,this[_0x209718(0x126)]();}['_initDataSource'](){const _0x5e7ed7=_0x4b07e7;this['_threadCommentDataSourceService'][_0x5e7ed7(0x114)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x5e7ed7(0x147)]=!0x1;}};g=te([N(0x0,_0x4013bc),N(0x1,_0x3c112c(f))],g);var se=Object[_0x4b07e7(0x131)],oe=Object[_0x4b07e7(0x13e)],ne=(_0x23ed34,_0x149197,_0xf47f53)=>_0x149197 in _0x23ed34?se(_0x23ed34,_0x149197,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf47f53}):_0x23ed34[_0x149197]=_0xf47f53,ie=(_0x30f388,_0x4f08ba,_0x28af5a,_0x36b259)=>{const _0x42e9e8=_0x4b07e7;for(var _0xb1b034=_0x36b259>0x1?void 0x0:_0x36b259?oe(_0x4f08ba,_0x28af5a):_0x4f08ba,_0x2f1e0b=_0x30f388[_0x42e9e8(0xfb)]-0x1,_0x559d65;_0x2f1e0b>=0x0;_0x2f1e0b--)(_0x559d65=_0x30f388[_0x2f1e0b])&&(_0xb1b034=_0x559d65(_0xb1b034)||_0xb1b034);return _0xb1b034;},w=(_0x292aee,_0x414712)=>(_0x167677,_0xb23af6)=>_0x414712(_0x167677,_0xb23af6,_0x292aee),$=(_0x2d8b37,_0x791142,_0x3859c1)=>ne(_0x2d8b37,typeof _0x791142!=_0x4b07e7(0x130)?_0x791142+'':_0x791142,_0x3859c1);let b=class extends _0x2f5ef4{constructor(_0x39969e=M,_0x292be0,_0x38ca6c){const _0x3d7004=_0x4b07e7;super(),this['_config']=_0x39969e,this['_injector']=_0x292be0,this[_0x3d7004(0x14b)]=_0x38ca6c;const {..._0x3a1b14}=_0x4a2386({},M,this[_0x3d7004(0x148)]);this[_0x3d7004(0x14b)][_0x3d7004(0x111)](z,_0x3a1b14);}[_0x4b07e7(0x123)](){const _0x4f8495=_0x4b07e7;[[f],[g],[S]][_0x4f8495(0xf5)](_0x45d384=>{const _0x281297=_0x4f8495;this[_0x281297(0x155)][_0x281297(0x10e)](_0x45d384);});}['onReady'](){const _0x4943ec=_0x4b07e7;this['_injector'][_0x4943ec(0x12e)](g),this['_injector']['get'](S);}};$(b,_0x4b07e7(0x135),W),$(b,'type',_0x514331['UNIVER_UNKNOWN']),b=ie([_0x5e5e54(_0xe804bc,_0x3d47fa,_0x21e0fd),w(0x1,_0x3c112c(_0x15e34d)),w(0x2,_0x1e0359)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2b6fb4=_0x585c;function _0x585c(_0x51f73b,_0x5e16c2){const _0xe115fe=_0xe115();return _0x585c=function(_0x585c64,_0x5e3847){_0x585c64=_0x585c64-0x11a;let _0x245a0d=_0xe115fe[_0x585c64];return _0x245a0d;},_0x585c(_0x51f73b,_0x5e16c2);}(function(_0x21ecce,_0x501a47){const _0x1fd13d=_0x585c,_0x5ea129=_0x21ecce();while(!![]){try{const _0x5a4666=parseInt(_0x1fd13d(0x164))/0x1*(parseInt(_0x1fd13d(0x172))/0x2)+parseInt(_0x1fd13d(0x156))/0x3*(-parseInt(_0x1fd13d(0x17e))/0x4)+-parseInt(_0x1fd13d(0x122))/0x5*(-parseInt(_0x1fd13d(0x16b))/0x6)+-parseInt(_0x1fd13d(0x129))/0x7*(parseInt(_0x1fd13d(0x178))/0x8)+parseInt(_0x1fd13d(0x154))/0x9*(-parseInt(_0x1fd13d(0x167))/0xa)+parseInt(_0x1fd13d(0x143))/0xb*(parseInt(_0x1fd13d(0x17c))/0xc)+parseInt(_0x1fd13d(0x145))/0xd;if(_0x5a4666===_0x501a47)break;else _0x5ea129['push'](_0x5ea129['shift']());}catch(_0x4765d7){_0x5ea129['push'](_0x5ea129['shift']());}}}(_0xe115,0x721b0));import{CommentService as _0x57d1e1,CollaborationSessionService as _0x4e39a0,UniverCollaborationClientPlugin as _0x24b712}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x507f31}from'@univerjs-pro/license';import{dayjs as _0x19f256,UserManagerService as _0x45864e,Inject as _0x999591,Injector as _0x5cd924,Disposable as _0x3d69cb,CustomRangeType as _0x7f7105,UniverInstanceType as _0x96876,DependentOn as _0x4eebb,IConfigService as _0x4a0a76,Plugin as _0x8e71cc,merge as _0x95a5cc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x128800}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3953ab,IThreadCommentDataSourceService as _0x139f27}from'@univerjs/thread-comment';import{bufferTime as _0x14879c}from'rxjs';import{HTTPService as _0x50b333}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0xe115(){const _0x47ec2a=['rangeType','map','code','delete','addUser','parse','_commentService','/list','pipe','pluginName','13PPDrLp','Edit','root','10mYLldd','content','thread-comment-data-source.config','commentUpdate$','1925274mmoQdN','replies','/delete','error','_configService','length','onReady','89394YaktVk','resolveComment','solved','slice','disposeWithMe','forEach','2781472FTcPGI','updateComment','_initDataSource','dataSource','36ggJVZX','getComment','351812DdHVSc','UNRECOGNIZED','_sessionService','Reply','subscribe','/add','setConfig','COMMENT','Unknown','saveCommentToSnapshot','add','stringify','5kWdcwH','UNIVER_UNKNOWN','userID','find','personId','_httpService','rangeId','7jHccjC','_injector','createTimestamp','deleteComment','comment','body','userId','Solved','_initUserSync','get','_threadCommentDataSource','getCurrentUser','Add','post','replyId','getUnit','OpenOrReOpen','Solve','values','defineProperty','getMemberID','symbol','unitId','getOwnPropertyDescriptor','listComments','_config','1643114GQSLjc','comments','5328362iumgjm','/universer-api/user/list','_userService','YYYY/MM/DD\x20HH:mm','_threadCommentModel','Delete','_init','/universer-api/comment/unit/','type','reply','format','_threadCommentDataSourceService','getUser','requireSession','parentId','7712307Wotpzx','user','3zIROJI','filter','threadId','size'];_0xe115=function(){return _0x47ec2a;};return _0xe115();}var I=(_0x42cc93=>(_0x42cc93[_0x42cc93[_0x2b6fb4(0x139)]=0x0]='OpenOrReOpen',_0x42cc93[_0x42cc93['Solved']=0x1]='Solved',_0x42cc93[_0x42cc93[_0x2b6fb4(0x17f)]=-0x1]=_0x2b6fb4(0x17f),_0x42cc93))(I||{}),v=(_0x3c93d5=>(_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x11e)]=0x0]=_0x2b6fb4(0x11e),_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x135)]=0x1]=_0x2b6fb4(0x135),_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x181)]=0x2]='Reply',_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x165)]=0x3]=_0x2b6fb4(0x165),_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x14a)]=0x4]=_0x2b6fb4(0x14a),_0x3c93d5[_0x3c93d5['Solve']=0x5]=_0x2b6fb4(0x13a),_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x17f)]=-0x1]=_0x2b6fb4(0x17f),_0x3c93d5))(v||{});const D=_0x3c1eb5=>_0x19f256(new Date(+_0x3c1eb5))[_0x2b6fb4(0x14f)](_0x2b6fb4(0x148)),B=async(_0x2b0849,_0x51263c)=>{const _0x349d58=_0x2b6fb4,_0x40162e=_0x2b0849['get'](_0x45864e),_0x1748d2=_0x2b0849['get'](_0x50b333);_0x51263c[_0x349d58(0x177)](_0x27099b=>{const _0xedfc27=_0x349d58;_0x40162e[_0xedfc27(0x151)](_0x27099b)&&_0x51263c[_0xedfc27(0x15d)](_0x27099b);}),_0x51263c[_0x349d58(0x159)]&&(await _0x1748d2['get'](_0x349d58(0x146),{'params':{'userIDs':[..._0x51263c]}}))[_0x349d58(0x12e)]['users'][_0x349d58(0x177)](_0x1eff89=>{const _0x509815=_0x349d58;_0x1eff89&&_0x40162e[_0x509815(0x15e)](_0x1eff89);});};var K=Object[_0x2b6fb4(0x140)],V=(_0x5e986c,_0x2e7615,_0x3fd8c6,_0x152cd0)=>{const _0x178878=_0x2b6fb4;for(var _0x40f319=_0x152cd0>0x1?void 0x0:_0x152cd0?K(_0x2e7615,_0x3fd8c6):_0x2e7615,_0x499678=_0x5e986c[_0x178878(0x170)]-0x1,_0x370664;_0x499678>=0x0;_0x499678--)(_0x370664=_0x5e986c[_0x499678])&&(_0x40f319=_0x370664(_0x40f319)||_0x40f319);return _0x40f319;},p=(_0x69b35f,_0x1e1023)=>(_0x2baeef,_0x34ddb1)=>_0x1e1023(_0x2baeef,_0x34ddb1,_0x69b35f);let S=class extends _0x3d69cb{constructor(_0x16a4a5,_0x54c5ee,_0x208d5c,_0x927183){const _0x4b992b=_0x2b6fb4;super(),this[_0x4b992b(0x160)]=_0x16a4a5,this[_0x4b992b(0x149)]=_0x54c5ee,this['_userService']=_0x208d5c,this[_0x4b992b(0x12a)]=_0x927183,this[_0x4b992b(0x14b)](),this[_0x4b992b(0x131)]();}['_initUserSync'](){const _0x2585b1=_0x2b6fb4;this[_0x2585b1(0x176)](this[_0x2585b1(0x149)][_0x2585b1(0x16a)][_0x2585b1(0x162)](_0x14879c(0x10))[_0x2585b1(0x11a)](_0x137c7e=>{const _0x12a871=_0x2585b1,_0x1cb452=new Set();_0x137c7e[_0x12a871(0x177)](_0x574345=>{const _0x53f1f2=_0x12a871;switch(_0x574345[_0x53f1f2(0x14d)]){case'add':{const _0x2b6156=_0x574345['payload'][_0x53f1f2(0x126)];_0x1cb452[_0x53f1f2(0x120)](_0x2b6156);break;}}}),B(this[_0x12a871(0x12a)],_0x1cb452);}));}[_0x2b6fb4(0x14b)](){const _0x24d1cd=_0x2b6fb4;this[_0x24d1cd(0x176)](this[_0x24d1cd(0x160)]['commentUpdate$'][_0x24d1cd(0x11a)](async _0x12ef50=>{const _0x51a5f2=_0x24d1cd;var _0x338ca7,_0x2b2752,_0x342b89,_0x197352;const _0x23172b=(_0x338ca7=this[_0x51a5f2(0x149)][_0x51a5f2(0x138)](_0x12ef50[_0x51a5f2(0x13f)])[_0x51a5f2(0x125)](_0x16a338=>_0x16a338[_0x51a5f2(0x158)]===_0x12ef50['threadId']))==null?void 0x0:_0x338ca7['root'];if(!_0x23172b)return;const {unitId:_0x49507f,subUnitId:_0x459b3f}=_0x23172b;switch(_0x12ef50[_0x51a5f2(0x155)]&&this[_0x51a5f2(0x147)]['addUser'](_0x12ef50[_0x51a5f2(0x155)]),_0x12ef50[_0x51a5f2(0x14d)]){case v['Add']:break;case v[_0x51a5f2(0x181)]:{this[_0x51a5f2(0x149)]['addComment'](_0x49507f,_0x459b3f,{'unitId':_0x49507f,'subUnitId':_0x459b3f,'ref':'','id':_0x12ef50[_0x51a5f2(0x137)],'dT':D(+_0x12ef50['createTimestamp']),'threadId':_0x12ef50[_0x51a5f2(0x158)],'personId':(_0x342b89=(_0x2b2752=_0x12ef50['user'])==null?void 0x0:_0x2b2752['userID'])!=null?_0x342b89:_0x12ef50[_0x51a5f2(0x12f)],'text':JSON[_0x51a5f2(0x15f)](_0x12ef50[_0x51a5f2(0x168)]),'parentId':_0x23172b['id']});break;}case v[_0x51a5f2(0x14a)]:{const _0x5b7101=this[_0x51a5f2(0x149)][_0x51a5f2(0x17d)](_0x49507f,_0x459b3f,_0x12ef50[_0x51a5f2(0x137)]);_0x5b7101&&_0x5b7101[_0x51a5f2(0x153)]&&this[_0x51a5f2(0x149)][_0x51a5f2(0x12c)](_0x49507f,_0x459b3f,_0x12ef50[_0x51a5f2(0x137)]);break;}case v['Edit']:{this[_0x51a5f2(0x149)][_0x51a5f2(0x179)](_0x49507f,_0x459b3f,{'commentId':_0x12ef50[_0x51a5f2(0x137)],'text':JSON[_0x51a5f2(0x15f)](_0x12ef50[_0x51a5f2(0x168)])});break;}case v['Solve']:{const _0x9f10f2=(_0x197352=this[_0x51a5f2(0x149)][_0x51a5f2(0x138)](_0x12ef50[_0x51a5f2(0x13f)])[_0x51a5f2(0x125)](_0x1f9b18=>_0x1f9b18[_0x51a5f2(0x158)]===_0x12ef50[_0x51a5f2(0x158)]))==null?void 0x0:_0x197352[_0x51a5f2(0x166)];_0x9f10f2&&this[_0x51a5f2(0x149)][_0x51a5f2(0x173)](_0x49507f,_0x459b3f,_0x9f10f2['id'],_0x12ef50[_0x51a5f2(0x174)]===I[_0x51a5f2(0x130)]);break;}}}));}};S=V([p(0x0,_0x999591(_0x57d1e1)),p(0x1,_0x999591(_0x3953ab)),p(0x2,_0x999591(_0x45864e)),p(0x3,_0x999591(_0x5cd924))],S);const z=_0x2b6fb4(0x169),M={};var k=Object[_0x2b6fb4(0x140)],Q=(_0x28fe6f,_0x17c03c,_0x1d3bec,_0x38d99a)=>{const _0x3b56b8=_0x2b6fb4;for(var _0x1558d8=_0x38d99a>0x1?void 0x0:_0x38d99a?k(_0x17c03c,_0x1d3bec):_0x17c03c,_0xdb83bd=_0x28fe6f[_0x3b56b8(0x170)]-0x1,_0x48601a;_0xdb83bd>=0x0;_0xdb83bd--)(_0x48601a=_0x28fe6f[_0xdb83bd])&&(_0x1558d8=_0x48601a(_0x1558d8)||_0x1558d8);return _0x1558d8;},_=(_0xafea79,_0x90ce06)=>(_0x21b2c5,_0x421ad0)=>_0x90ce06(_0x21b2c5,_0x421ad0,_0xafea79);function X(_0x3e1bb4,_0x68436){const _0x2d4a28=_0x2b6fb4,_0x25c302=_0x3e1bb4['replies'][0x0];return{..._0x68436,'id':_0x25c302[_0x2d4a28(0x137)],'resolved':_0x3e1bb4['solved']===0x1,'dT':D(_0x25c302[_0x2d4a28(0x12b)]),'personId':_0x25c302[_0x2d4a28(0x12f)],'threadId':_0x25c302[_0x2d4a28(0x158)]};}function ee(_0x6fc597,_0x239895,_0x49c8ea){const _0x229648=_0x2b6fb4;var _0x26098d,_0x1ba738;if(((_0x1ba738=(_0x26098d=_0x6fc597==null?void 0x0:_0x6fc597[_0x229648(0x16c)])==null?void 0x0:_0x26098d[_0x229648(0x170)])!=null?_0x1ba738:0x0)>0x0){const _0x1eb252=(_0x3e02e0,_0x44f40b)=>({'id':_0x3e02e0[_0x229648(0x137)],'threadId':_0x3e02e0[_0x229648(0x158)],'dT':D(_0x3e02e0[_0x229648(0x12b)]),'personId':_0x3e02e0[_0x229648(0x12f)],'resolved':_0x6fc597[_0x229648(0x174)]===I[_0x229648(0x130)],'unitId':_0x239895,'subUnitId':_0x49c8ea,'text':JSON[_0x229648(0x15f)](_0x3e02e0[_0x229648(0x168)]),'parentId':_0x44f40b}),_0x38d991=_0x1eb252(_0x6fc597[_0x229648(0x16c)][0x0]);return{..._0x38d991,'children':_0x6fc597[_0x229648(0x16c)][_0x229648(0x175)](0x1)['map'](_0x342fd8=>_0x1eb252(_0x342fd8,_0x38d991['id']))};}return null;}let f=class{constructor(_0x208448,_0x4fcf7f,_0x173f1a,_0x142a24){const _0x4bf9a3=_0x2b6fb4;this[_0x4bf9a3(0x127)]=_0x208448,this[_0x4bf9a3(0x147)]=_0x4fcf7f,this[_0x4bf9a3(0x180)]=_0x173f1a,this[_0x4bf9a3(0x12a)]=_0x142a24;}async['addComment'](_0xedcc16){const _0x4a9cc6=_0x2b6fb4;var _0x190e3d,_0x2677ba;const {parentId:_0x58949d,unitId:_0x27a1eb,text:_0x463c4a,threadId:_0x3c2638}=_0xedcc16,_0x30f199=(_0x2677ba=(_0x190e3d=_0x463c4a['customRanges'])==null?void 0x0:_0x190e3d[_0x4a9cc6(0x157)](_0x2fe3c7=>_0x2fe3c7[_0x4a9cc6(0x15a)]===_0x7f7105[_0x4a9cc6(0x11d)])[_0x4a9cc6(0x15b)](_0x42e209=>_0x42e209[_0x4a9cc6(0x128)]))!=null?_0x2677ba:[],_0x72e67=JSON[_0x4a9cc6(0x121)](_0x463c4a),_0x5a2be8=(await this['_sessionService'][_0x4a9cc6(0x152)](_0x27a1eb))[_0x4a9cc6(0x13d)]();if(_0x58949d){const _0x4d4e0d={'memberId':_0x5a2be8,'unitId':_0x27a1eb,'content':_0x72e67,'mention':_0x30f199,'threadId':_0x3c2638},_0x3c215c=(await this[_0x4a9cc6(0x127)][_0x4a9cc6(0x136)](_0x4a9cc6(0x14c)+_0x27a1eb+'/reply',{'body':_0x4d4e0d}))['body'][_0x4a9cc6(0x14e)];return{..._0xedcc16,'id':_0x3c215c[_0x4a9cc6(0x137)],'dT':_0x19f256(+_0x3c215c[_0x4a9cc6(0x12b)])[_0x4a9cc6(0x14f)](_0x4a9cc6(0x148)),'personId':_0x3c215c[_0x4a9cc6(0x12f)]};}else{const _0xeb165={'memberId':_0x5a2be8,'unitId':_0x27a1eb,'content':_0x72e67,'mention':_0x30f199},_0x4e2623=await this['_httpService'][_0x4a9cc6(0x136)](_0x4a9cc6(0x14c)+_0x27a1eb+_0x4a9cc6(0x11b),{'body':_0xeb165});return X(_0x4e2623[_0x4a9cc6(0x12e)][_0x4a9cc6(0x12d)],_0xedcc16);}}async[_0x2b6fb4(0x179)](_0x12db1d){const _0x10af38=_0x2b6fb4;var _0xe413f4,_0x5c68d4;const {text:_0x105b1d,unitId:_0x34d84d}=_0x12db1d,_0x517c01=(_0x5c68d4=(_0xe413f4=_0x105b1d['customRanges'])==null?void 0x0:_0xe413f4['filter'](_0x4f3d18=>_0x4f3d18['rangeType']===_0x7f7105[_0x10af38(0x11d)])[_0x10af38(0x15b)](_0x15cdaa=>_0x15cdaa[_0x10af38(0x128)]))!=null?_0x5c68d4:[],_0x2bee84=JSON[_0x10af38(0x121)](_0x105b1d),_0x3f03e0=_0x12db1d[_0x10af38(0x158)],_0x7de356=_0x12db1d['id'],_0x1df881={'memberId':(await this[_0x10af38(0x180)][_0x10af38(0x152)](_0x34d84d))[_0x10af38(0x13d)](),'unitId':_0x34d84d,'threadId':_0x3f03e0,'mention':_0x517c01,'content':_0x2bee84,'replyId':_0x7de356},_0x4e53a8=await this[_0x10af38(0x127)]['post'](_0x10af38(0x14c)+_0x34d84d+'/edit',{'body':_0x1df881});return!_0x4e53a8[_0x10af38(0x12e)][_0x10af38(0x16e)]||_0x4e53a8[_0x10af38(0x12e)]['error'][_0x10af38(0x15c)]===0x1;}async['resolveComment'](_0x995e69){const _0x256b11=_0x2b6fb4,{unitId:_0x331438}=_0x995e69,_0x18cd80=_0x995e69[_0x256b11(0x158)],_0x281321={'memberId':this[_0x256b11(0x147)][_0x256b11(0x134)]()[_0x256b11(0x124)],'unitId':_0x331438,'threadId':_0x18cd80,'solved':_0x995e69['resolved']?I[_0x256b11(0x130)]:I['OpenOrReOpen']},_0x5b1003=await this['_httpService'][_0x256b11(0x136)](_0x256b11(0x14c)+_0x331438+'/solved',{'body':_0x281321});return!_0x5b1003[_0x256b11(0x12e)]['error']||_0x5b1003['body'][_0x256b11(0x16e)][_0x256b11(0x15c)]===0x1;}async[_0x2b6fb4(0x12c)](_0x4c7ca3,_0x371e44,_0x40c80a,_0x359e34){const _0x1fc7c8=_0x2b6fb4,_0x1265e7={'memberId':(await this['_sessionService'][_0x1fc7c8(0x152)](_0x4c7ca3))[_0x1fc7c8(0x13d)](),'threadId':_0x40c80a,'replyId':_0x359e34,'unitId':_0x4c7ca3},_0x5404b8=await this[_0x1fc7c8(0x127)][_0x1fc7c8(0x136)](_0x1fc7c8(0x14c)+_0x4c7ca3+_0x1fc7c8(0x16d),{'body':_0x1265e7});return!_0x5404b8[_0x1fc7c8(0x12e)]['error']||_0x5404b8['body'][_0x1fc7c8(0x16e)][_0x1fc7c8(0x15c)]===0x1;}async[_0x2b6fb4(0x141)](_0x27f5bd,_0x2feb52,_0x3c8534){const _0x401929=_0x2b6fb4,_0x8ddbb7={'unitId':_0x27f5bd,'threadId':_0x3c8534},_0xe0564f=await this[_0x401929(0x127)][_0x401929(0x136)](_0x401929(0x14c)+_0x27f5bd+_0x401929(0x161),{'body':_0x8ddbb7}),_0x127391=_0x3c8534[_0x401929(0x15b)](_0x59f29e=>ee(_0xe0564f['body'][_0x401929(0x144)][_0x59f29e],_0x27f5bd,_0x2feb52))[_0x401929(0x157)](Boolean);return Object[_0x401929(0x13b)](_0xe0564f[_0x401929(0x12e)]['users'])['forEach'](_0x2a4cd0=>{this['_userService']['addUser'](_0x2a4cd0);}),_0x127391;}[_0x2b6fb4(0x11f)](_0xcb6815){return{'id':_0xcb6815['id'],'threadId':_0xcb6815['threadId'],'ref':_0xcb6815['ref']};}};f=Q([_(0x0,_0x999591(_0x50b333)),_(0x1,_0x999591(_0x45864e)),_(0x2,_0x999591(_0x4e39a0)),_(0x3,_0x999591(_0x5cd924))],f);var re=Object[_0x2b6fb4(0x140)],te=(_0x52c5be,_0x195f0d,_0x33dd49,_0x4705c1)=>{const _0x8848ae=_0x2b6fb4;for(var _0x202d6c=_0x4705c1>0x1?void 0x0:_0x4705c1?re(_0x195f0d,_0x33dd49):_0x195f0d,_0x42fc19=_0x52c5be[_0x8848ae(0x170)]-0x1,_0x3975e3;_0x42fc19>=0x0;_0x42fc19--)(_0x3975e3=_0x52c5be[_0x42fc19])&&(_0x202d6c=_0x3975e3(_0x202d6c)||_0x202d6c);return _0x202d6c;},N=(_0x195e78,_0x575e38)=>(_0x322760,_0x2e234b)=>_0x575e38(_0x322760,_0x2e234b,_0x195e78);let g=class extends _0x3d69cb{constructor(_0x3835fb,_0xa1fa6c){const _0x92d218=_0x2b6fb4;super(),this[_0x92d218(0x150)]=_0x3835fb,this[_0x92d218(0x133)]=_0xa1fa6c,this[_0x92d218(0x17a)]();}[_0x2b6fb4(0x17a)](){const _0x2b62fa=_0x2b6fb4;this[_0x2b62fa(0x150)][_0x2b62fa(0x17b)]=this[_0x2b62fa(0x133)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x139f27),N(0x1,_0x999591(f))],g);var se=Object[_0x2b6fb4(0x13c)],oe=Object[_0x2b6fb4(0x140)],ne=(_0x25a221,_0x1dc1ee,_0x3e636b)=>_0x1dc1ee in _0x25a221?se(_0x25a221,_0x1dc1ee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e636b}):_0x25a221[_0x1dc1ee]=_0x3e636b,ie=(_0x32ff04,_0x57a637,_0x1d3be5,_0xa8e580)=>{for(var _0x5a8626=_0xa8e580>0x1?void 0x0:_0xa8e580?oe(_0x57a637,_0x1d3be5):_0x57a637,_0x3d1268=_0x32ff04['length']-0x1,_0x32606b;_0x3d1268>=0x0;_0x3d1268--)(_0x32606b=_0x32ff04[_0x3d1268])&&(_0x5a8626=_0x32606b(_0x5a8626)||_0x5a8626);return _0x5a8626;},w=(_0x31c9cc,_0x94e05f)=>(_0x349c84,_0x3dc712)=>_0x94e05f(_0x349c84,_0x3dc712,_0x31c9cc),$=(_0x581b03,_0x390b4c,_0x116f13)=>ne(_0x581b03,typeof _0x390b4c!=_0x2b6fb4(0x13e)?_0x390b4c+'':_0x390b4c,_0x116f13);let b=class extends _0x8e71cc{constructor(_0x27f0fd=M,_0x34c54c,_0x5339a1){const _0x431779=_0x2b6fb4;super(),this[_0x431779(0x142)]=_0x27f0fd,this['_injector']=_0x34c54c,this[_0x431779(0x16f)]=_0x5339a1;const {..._0x41b26d}=_0x95a5cc({},M,this[_0x431779(0x142)]);this[_0x431779(0x16f)][_0x431779(0x11c)](z,_0x41b26d);}['onStarting'](){const _0x265766=_0x2b6fb4;[[f],[g],[S]][_0x265766(0x177)](_0x9256cb=>{const _0x184aa3=_0x265766;this[_0x184aa3(0x12a)]['add'](_0x9256cb);});}[_0x2b6fb4(0x171)](){const _0x1e510e=_0x2b6fb4;this[_0x1e510e(0x12a)][_0x1e510e(0x132)](g),this[_0x1e510e(0x12a)][_0x1e510e(0x132)](S);}};$(b,_0x2b6fb4(0x163),W),$(b,_0x2b6fb4(0x14d),_0x96876[_0x2b6fb4(0x123)]),b=ie([_0x4eebb(_0x128800,_0x24b712,_0x507f31),w(0x1,_0x999591(_0x5cd924)),w(0x2,_0x4a0a76)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x495c(_0x20bd29,_0x30fb79){const _0x408862=_0x4088();return _0x495c=function(_0x495c7d,_0x5fd996){_0x495c7d=_0x495c7d-0xbd;let _0x393b7b=_0x408862[_0x495c7d];return _0x393b7b;},_0x495c(_0x20bd29,_0x30fb79);}(function(_0xa3c9a7,_0x2703f6){const _0x357327=_0x495c,_0x56e544=_0xa3c9a7();while(!![]){try{const _0x5bd3ec=parseInt(_0x357327(0xe7))/0x1+-parseInt(_0x357327(0xbd))/0x2*(parseInt(_0x357327(0xd1))/0x3)+-parseInt(_0x357327(0xda))/0x4+-parseInt(_0x357327(0x10f))/0x5*(parseInt(_0x357327(0x117))/0x6)+parseInt(_0x357327(0x131))/0x7+parseInt(_0x357327(0x10a))/0x8+parseInt(_0x357327(0xf3))/0x9*(parseInt(_0x357327(0x123))/0xa);if(_0x5bd3ec===_0x2703f6)break;else _0x56e544['push'](_0x56e544['shift']());}catch(_0x251772){_0x56e544['push'](_0x56e544['shift']());}}}(_0x4088,0xa6a3f),function(_0x3486ea,_0x317126){const _0x36df24=_0x495c;typeof exports==_0x36df24(0xd3)&&typeof module<'u'?_0x317126(exports,require('@univerjs-pro/collaboration-client'),require(_0x36df24(0x134)),require(_0x36df24(0xf6)),require(_0x36df24(0xea)),require(_0x36df24(0xfe)),require('rxjs'),require(_0x36df24(0xca))):typeof define==_0x36df24(0xe6)&&define['amd']?define(['exports','@univerjs-pro/collaboration-client',_0x36df24(0x134),_0x36df24(0xf6),'@univerjs/thread-comment-ui',_0x36df24(0xfe),'rxjs','@univerjs/network'],_0x317126):(_0x3486ea=typeof globalThis<'u'?globalThis:_0x3486ea||self,_0x317126(_0x3486ea['UniverProThreadCommentDatasource']={},_0x3486ea[_0x36df24(0x11a)],_0x3486ea['UniverProLicense'],_0x3486ea[_0x36df24(0x13c)],_0x3486ea[_0x36df24(0xe4)],_0x3486ea[_0x36df24(0xc5)],_0x3486ea[_0x36df24(0xf0)],_0x3486ea['UniverNetwork']));}(this,function(_0x4f4d62,_0x4be1ec,_0x5699d5,_0xab27a6,_0x4df0d4,_0x313a66,_0x257afd,_0x4f5a03){'use strict';const _0x4d69f0=_0x495c;const _0x43a0a7=_0x4d69f0(0x100);var _0x523864=(_0x4e6981=>(_0x4e6981[_0x4e6981[_0x4d69f0(0x13e)]=0x0]=_0x4d69f0(0x13e),_0x4e6981[_0x4e6981[_0x4d69f0(0x10d)]=0x1]=_0x4d69f0(0x10d),_0x4e6981[_0x4e6981[_0x4d69f0(0x12b)]=-0x1]=_0x4d69f0(0x12b),_0x4e6981))(_0x523864||{}),_0x37cf78=(_0x5c11a0=>(_0x5c11a0[_0x5c11a0['Unknown']=0x0]=_0x4d69f0(0x133),_0x5c11a0[_0x5c11a0[_0x4d69f0(0xf8)]=0x1]=_0x4d69f0(0xf8),_0x5c11a0[_0x5c11a0['Reply']=0x2]='Reply',_0x5c11a0[_0x5c11a0[_0x4d69f0(0x124)]=0x3]=_0x4d69f0(0x124),_0x5c11a0[_0x5c11a0['Delete']=0x4]='Delete',_0x5c11a0[_0x5c11a0['Solve']=0x5]=_0x4d69f0(0x138),_0x5c11a0[_0x5c11a0['UNRECOGNIZED']=-0x1]=_0x4d69f0(0x12b),_0x5c11a0))(_0x37cf78||{});const _0x21145a=_0x1ee46e=>_0xab27a6[_0x4d69f0(0xf4)](new Date(+_0x1ee46e))[_0x4d69f0(0xc1)](_0x4d69f0(0x11b)),_0x6824af=async(_0x302bbd,_0x4d4fb1)=>{const _0x5e068d=_0x4d69f0,_0x4c9815=_0x302bbd[_0x5e068d(0x112)](_0xab27a6[_0x5e068d(0x122)]),_0x3f9578=_0x302bbd[_0x5e068d(0x112)](_0x4f5a03[_0x5e068d(0xf1)]);_0x4d4fb1[_0x5e068d(0xde)](_0x37ce4a=>{const _0x59a987=_0x5e068d;_0x4c9815[_0x59a987(0xef)](_0x37ce4a)&&_0x4d4fb1['delete'](_0x37ce4a);}),_0x4d4fb1['size']&&(await _0x3f9578[_0x5e068d(0x112)](_0x5e068d(0x105),{'params':{'userIDs':[..._0x4d4fb1]}}))['body'][_0x5e068d(0x126)][_0x5e068d(0xde)](_0x2e1f25=>{const _0x2dff17=_0x5e068d;_0x2e1f25&&_0x4c9815[_0x2dff17(0xc2)](_0x2e1f25);});};var _0x4aff70=Object[_0x4d69f0(0xdb)],_0x4b0991=(_0x205b53,_0x4b65ca,_0x3a3f34,_0x7feb2c)=>{const _0x2a24ef=_0x4d69f0;for(var _0x5de04b=_0x7feb2c>0x1?void 0x0:_0x7feb2c?_0x4aff70(_0x4b65ca,_0x3a3f34):_0x4b65ca,_0x3b0051=_0x205b53[_0x2a24ef(0xc7)]-0x1,_0x2f53c1;_0x3b0051>=0x0;_0x3b0051--)(_0x2f53c1=_0x205b53[_0x3b0051])&&(_0x5de04b=_0x2f53c1(_0x5de04b)||_0x5de04b);return _0x5de04b;},_0x507ccd=(_0x17a9e4,_0x28f1d8)=>(_0x5eeaa3,_0x3d51ff)=>_0x28f1d8(_0x5eeaa3,_0x3d51ff,_0x17a9e4);let _0x1aa0a9=class extends _0xab27a6[_0x4d69f0(0xc9)]{constructor(_0x11dc96,_0x5cc002,_0x3b9b1d,_0x5101a3){const _0x3ca6e4=_0x4d69f0;super(),this[_0x3ca6e4(0xe8)]=_0x11dc96,this[_0x3ca6e4(0xd4)]=_0x5cc002,this[_0x3ca6e4(0xf9)]=_0x3b9b1d,this['_injector']=_0x5101a3,this['_init'](),this[_0x3ca6e4(0x11e)]();}[_0x4d69f0(0x11e)](){const _0x4abcf2=_0x4d69f0;this[_0x4abcf2(0x12a)](this[_0x4abcf2(0xd4)][_0x4abcf2(0x110)]['pipe'](_0x257afd[_0x4abcf2(0x129)](0x10))[_0x4abcf2(0xd7)](_0x3c2d90=>{const _0x3ad64d=_0x4abcf2,_0x545905=new Set();_0x3c2d90[_0x3ad64d(0xde)](_0x39dc87=>{const _0x13e8de=_0x3ad64d;switch(_0x39dc87[_0x13e8de(0x130)]){case _0x13e8de(0xd9):{const _0x39018f=_0x39dc87[_0x13e8de(0x139)][_0x13e8de(0x11c)];_0x545905['add'](_0x39018f);break;}}}),_0x6824af(this['_injector'],_0x545905);}));}[_0x4d69f0(0xc0)](){const _0x7346b3=_0x4d69f0;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0x7346b3(0xd7)](async _0x1a1917=>{const _0x3a5a33=_0x7346b3;var _0x44a090,_0x359ff5,_0x56a2f2,_0x10e22d;const _0x59e5f3=(_0x44a090=this[_0x3a5a33(0xd4)][_0x3a5a33(0xd5)](_0x1a1917[_0x3a5a33(0xe5)])[_0x3a5a33(0xbe)](_0x431753=>_0x431753['threadId']===_0x1a1917['threadId']))==null?void 0x0:_0x44a090[_0x3a5a33(0xf2)];if(!_0x59e5f3)return;const {unitId:_0x11b199,subUnitId:_0x5940d5}=_0x59e5f3;switch(_0x1a1917[_0x3a5a33(0xc8)]&&this[_0x3a5a33(0xf9)][_0x3a5a33(0xc2)](_0x1a1917['user']),_0x1a1917['type']){case _0x37cf78['Add']:break;case _0x37cf78[_0x3a5a33(0xed)]:{this[_0x3a5a33(0xd4)][_0x3a5a33(0xeb)](_0x11b199,_0x5940d5,{'unitId':_0x11b199,'subUnitId':_0x5940d5,'ref':'','id':_0x1a1917['replyId'],'dT':_0x21145a(+_0x1a1917['createTimestamp']),'threadId':_0x1a1917[_0x3a5a33(0xcf)],'personId':(_0x56a2f2=(_0x359ff5=_0x1a1917[_0x3a5a33(0xc8)])==null?void 0x0:_0x359ff5[_0x3a5a33(0x119)])!=null?_0x56a2f2:_0x1a1917[_0x3a5a33(0x12f)],'text':JSON[_0x3a5a33(0x128)](_0x1a1917[_0x3a5a33(0x115)]),'parentId':_0x59e5f3['id']});break;}case _0x37cf78[_0x3a5a33(0x108)]:{const _0x111d26=this[_0x3a5a33(0xd4)]['getComment'](_0x11b199,_0x5940d5,_0x1a1917[_0x3a5a33(0xcd)]);_0x111d26&&_0x111d26[_0x3a5a33(0xd8)]&&this[_0x3a5a33(0xd4)][_0x3a5a33(0x13a)](_0x11b199,_0x5940d5,_0x1a1917[_0x3a5a33(0xcd)]);break;}case _0x37cf78[_0x3a5a33(0x124)]:{this[_0x3a5a33(0xd4)][_0x3a5a33(0x107)](_0x11b199,_0x5940d5,{'commentId':_0x1a1917['replyId'],'text':JSON[_0x3a5a33(0x128)](_0x1a1917[_0x3a5a33(0x115)])});break;}case _0x37cf78[_0x3a5a33(0x138)]:{const _0x24d6bc=(_0x10e22d=this[_0x3a5a33(0xd4)][_0x3a5a33(0xd5)](_0x1a1917['unitId'])[_0x3a5a33(0xbe)](_0x59a370=>_0x59a370[_0x3a5a33(0xcf)]===_0x1a1917['threadId']))==null?void 0x0:_0x10e22d[_0x3a5a33(0xf2)];_0x24d6bc&&this[_0x3a5a33(0xd4)][_0x3a5a33(0x11f)](_0x11b199,_0x5940d5,_0x24d6bc['id'],_0x1a1917[_0x3a5a33(0x127)]===_0x523864['Solved']);break;}}}));}};_0x1aa0a9=_0x4b0991([_0x507ccd(0x0,_0xab27a6['Inject'](_0x4be1ec[_0x4d69f0(0xe9)])),_0x507ccd(0x1,_0xab27a6['Inject'](_0x313a66[_0x4d69f0(0x11d)])),_0x507ccd(0x2,_0xab27a6[_0x4d69f0(0xc4)](_0xab27a6[_0x4d69f0(0x122)])),_0x507ccd(0x3,_0xab27a6[_0x4d69f0(0xc4)](_0xab27a6[_0x4d69f0(0xd6)]))],_0x1aa0a9);const _0x1f5605=_0x4d69f0(0x10c),_0x4b6f52={};var _0x36980a=Object['getOwnPropertyDescriptor'],_0x166a2d=(_0x475e2b,_0x4013b2,_0x1d4ee8,_0x227916)=>{const _0xceba13=_0x4d69f0;for(var _0x15bebd=_0x227916>0x1?void 0x0:_0x227916?_0x36980a(_0x4013b2,_0x1d4ee8):_0x4013b2,_0x4bac9b=_0x475e2b[_0xceba13(0xc7)]-0x1,_0x2cc268;_0x4bac9b>=0x0;_0x4bac9b--)(_0x2cc268=_0x475e2b[_0x4bac9b])&&(_0x15bebd=_0x2cc268(_0x15bebd)||_0x15bebd);return _0x15bebd;},_0x125dc5=(_0xb73bf3,_0x3c159d)=>(_0x25e4f7,_0x4525b4)=>_0x3c159d(_0x25e4f7,_0x4525b4,_0xb73bf3);function _0x5729bb(_0x4d85eb,_0x1b974a){const _0x26dcad=_0x4d69f0,_0x27d1bd=_0x4d85eb[_0x26dcad(0xff)][0x0];return{..._0x1b974a,'id':_0x27d1bd[_0x26dcad(0xcd)],'resolved':_0x4d85eb[_0x26dcad(0x127)]===0x1,'dT':_0x21145a(_0x27d1bd[_0x26dcad(0x10e)]),'personId':_0x27d1bd['userId'],'threadId':_0x27d1bd['threadId']};}function _0x1a2f96(_0x34efd0,_0x19f6e1,_0x30587b){const _0x3f1935=_0x4d69f0;var _0x2a410f,_0x3975f7;if(((_0x3975f7=(_0x2a410f=_0x34efd0==null?void 0x0:_0x34efd0[_0x3f1935(0xff)])==null?void 0x0:_0x2a410f['length'])!=null?_0x3975f7:0x0)>0x0){const _0x4ba5c1=(_0x256ffc,_0x85ccf6)=>({'id':_0x256ffc[_0x3f1935(0xcd)],'threadId':_0x256ffc[_0x3f1935(0xcf)],'dT':_0x21145a(_0x256ffc[_0x3f1935(0x10e)]),'personId':_0x256ffc[_0x3f1935(0x12f)],'resolved':_0x34efd0[_0x3f1935(0x127)]===_0x523864[_0x3f1935(0x10d)],'unitId':_0x19f6e1,'subUnitId':_0x30587b,'text':JSON[_0x3f1935(0x128)](_0x256ffc[_0x3f1935(0x115)]),'parentId':_0x85ccf6}),_0x74174c=_0x4ba5c1(_0x34efd0[_0x3f1935(0xff)][0x0]);return{..._0x74174c,'children':_0x34efd0[_0x3f1935(0xff)][_0x3f1935(0x125)](0x1)[_0x3f1935(0x101)](_0x2037b3=>_0x4ba5c1(_0x2037b3,_0x74174c['id']))};}return null;}let _0x45c26b=class{constructor(_0x15cd4f,_0x60b8bf,_0x40a9a0,_0x53f914){const _0x3861a9=_0x4d69f0;this[_0x3861a9(0x12c)]=_0x15cd4f,this[_0x3861a9(0xf9)]=_0x60b8bf,this[_0x3861a9(0xcb)]=_0x40a9a0,this[_0x3861a9(0x136)]=_0x53f914;}async[_0x4d69f0(0xeb)](_0x53d4bc){const _0x15169a=_0x4d69f0;var _0x475079,_0x5880a9;const {parentId:_0x104d37,unitId:_0x4f3653,text:_0x1eec2e,threadId:_0x2aa013}=_0x53d4bc,_0x428023=(_0x5880a9=(_0x475079=_0x1eec2e['customRanges'])==null?void 0x0:_0x475079[_0x15169a(0xdd)](_0x568119=>_0x568119[_0x15169a(0xce)]===_0xab27a6[_0x15169a(0xd2)]['COMMENT'])['map'](_0x57f7d7=>_0x57f7d7['rangeId']))!=null?_0x5880a9:[],_0x204d80=JSON[_0x15169a(0xf7)](_0x1eec2e),_0x1dfbbe=(await this[_0x15169a(0xcb)][_0x15169a(0xfc)](_0x4f3653))['getMemberID']();if(_0x104d37){const _0x501b0f={'memberId':_0x1dfbbe,'unitId':_0x4f3653,'content':_0x204d80,'mention':_0x428023,'threadId':_0x2aa013},_0x235249=(await this['_httpService']['post'](_0x15169a(0x106)+_0x4f3653+_0x15169a(0xd0),{'body':_0x501b0f}))[_0x15169a(0x13f)][_0x15169a(0x114)];return{..._0x53d4bc,'id':_0x235249[_0x15169a(0xcd)],'dT':_0xab27a6['dayjs'](+_0x235249[_0x15169a(0x10e)])[_0x15169a(0xc1)](_0x15169a(0x11b)),'personId':_0x235249['userId']};}else{const _0x205c3e={'memberId':_0x1dfbbe,'unitId':_0x4f3653,'content':_0x204d80,'mention':_0x428023},_0x50453d=await this[_0x15169a(0x12c)][_0x15169a(0x104)](_0x15169a(0x106)+_0x4f3653+_0x15169a(0x116),{'body':_0x205c3e});return _0x5729bb(_0x50453d[_0x15169a(0x13f)][_0x15169a(0xdf)],_0x53d4bc);}}async[_0x4d69f0(0x107)](_0x101936){const _0x1d8674=_0x4d69f0;var _0x411dc6,_0x30ea97;const {text:_0x19f7d4,unitId:_0x5e130f}=_0x101936,_0x1f4ac3=(_0x30ea97=(_0x411dc6=_0x19f7d4[_0x1d8674(0xcc)])==null?void 0x0:_0x411dc6['filter'](_0x62b157=>_0x62b157[_0x1d8674(0xce)]===_0xab27a6[_0x1d8674(0xd2)][_0x1d8674(0x132)])[_0x1d8674(0x101)](_0x4afa6c=>_0x4afa6c['rangeId']))!=null?_0x30ea97:[],_0x338f3f=JSON[_0x1d8674(0xf7)](_0x19f7d4),_0xba0fed=_0x101936[_0x1d8674(0xcf)],_0x4aa8dd=_0x101936['id'],_0x2775c0={'memberId':(await this[_0x1d8674(0xcb)][_0x1d8674(0xfc)](_0x5e130f))[_0x1d8674(0x12d)](),'unitId':_0x5e130f,'threadId':_0xba0fed,'mention':_0x1f4ac3,'content':_0x338f3f,'replyId':_0x4aa8dd},_0x2eaf6e=await this[_0x1d8674(0x12c)][_0x1d8674(0x104)]('/universer-api/comment/unit/'+_0x5e130f+_0x1d8674(0x109),{'body':_0x2775c0});return!_0x2eaf6e[_0x1d8674(0x13f)][_0x1d8674(0x113)]||_0x2eaf6e['body'][_0x1d8674(0x113)][_0x1d8674(0xec)]===0x1;}async['resolveComment'](_0x25eeec){const _0x3282c8=_0x4d69f0,{unitId:_0x37d67a}=_0x25eeec,_0x34c00a=_0x25eeec[_0x3282c8(0xcf)],_0x5cf4e8={'memberId':this[_0x3282c8(0xf9)]['getCurrentUser']()['userID'],'unitId':_0x37d67a,'threadId':_0x34c00a,'solved':_0x25eeec[_0x3282c8(0x10b)]?_0x523864[_0x3282c8(0x10d)]:_0x523864[_0x3282c8(0x13e)]},_0x4af850=await this['_httpService']['post'](_0x3282c8(0x106)+_0x37d67a+_0x3282c8(0x118),{'body':_0x5cf4e8});return!_0x4af850[_0x3282c8(0x13f)][_0x3282c8(0x113)]||_0x4af850[_0x3282c8(0x13f)]['error'][_0x3282c8(0xec)]===0x1;}async[_0x4d69f0(0x13a)](_0x1d507a,_0x3ff1ea,_0xf521a5,_0x2b29d8){const _0x1b55b1=_0x4d69f0,_0x10af34={'memberId':(await this[_0x1b55b1(0xcb)]['requireSession'](_0x1d507a))[_0x1b55b1(0x12d)](),'threadId':_0xf521a5,'replyId':_0x2b29d8,'unitId':_0x1d507a},_0xd04208=await this['_httpService'][_0x1b55b1(0x104)]('/universer-api/comment/unit/'+_0x1d507a+_0x1b55b1(0xe1),{'body':_0x10af34});return!_0xd04208[_0x1b55b1(0x13f)][_0x1b55b1(0x113)]||_0xd04208['body']['error'][_0x1b55b1(0xec)]===0x1;}async['listComments'](_0x3b0fe4,_0x4ab459,_0x222c24){const _0x59e2c9=_0x4d69f0,_0x3f0c53={'unitId':_0x3b0fe4,'threadId':_0x222c24},_0x27ae75=await this[_0x59e2c9(0x12c)][_0x59e2c9(0x104)](_0x59e2c9(0x106)+_0x3b0fe4+_0x59e2c9(0xee),{'body':_0x3f0c53}),_0x35711b=_0x222c24[_0x59e2c9(0x101)](_0x24a639=>_0x1a2f96(_0x27ae75[_0x59e2c9(0x13f)]['comments'][_0x24a639],_0x3b0fe4,_0x4ab459))['filter'](Boolean);return Object[_0x59e2c9(0x120)](_0x27ae75['body'][_0x59e2c9(0x126)])[_0x59e2c9(0xde)](_0x324968=>{const _0x2c2ba4=_0x59e2c9;this[_0x2c2ba4(0xf9)]['addUser'](_0x324968);}),_0x35711b;}[_0x4d69f0(0xc3)](_0x8eb15){const _0x3e7396=_0x4d69f0;return{'id':_0x8eb15['id'],'threadId':_0x8eb15[_0x3e7396(0xcf)],'ref':_0x8eb15[_0x3e7396(0xe2)]};}};_0x45c26b=_0x166a2d([_0x125dc5(0x0,_0xab27a6[_0x4d69f0(0xc4)](_0x4f5a03['HTTPService'])),_0x125dc5(0x1,_0xab27a6[_0x4d69f0(0xc4)](_0xab27a6[_0x4d69f0(0x122)])),_0x125dc5(0x2,_0xab27a6[_0x4d69f0(0xc4)](_0x4be1ec[_0x4d69f0(0x12e)])),_0x125dc5(0x3,_0xab27a6[_0x4d69f0(0xc4)](_0xab27a6[_0x4d69f0(0xd6)]))],_0x45c26b);var _0x2c83e3=Object['getOwnPropertyDescriptor'],_0x20ce87=(_0x5614aa,_0x2ef186,_0x1a0ae4,_0x1373ed)=>{const _0x1afad1=_0x4d69f0;for(var _0x57d500=_0x1373ed>0x1?void 0x0:_0x1373ed?_0x2c83e3(_0x2ef186,_0x1a0ae4):_0x2ef186,_0x4bdae2=_0x5614aa[_0x1afad1(0xc7)]-0x1,_0xd695b8;_0x4bdae2>=0x0;_0x4bdae2--)(_0xd695b8=_0x5614aa[_0x4bdae2])&&(_0x57d500=_0xd695b8(_0x57d500)||_0x57d500);return _0x57d500;},_0xf66220=(_0x52ddc6,_0xe9fc40)=>(_0x4e8c4f,_0x18d8e6)=>_0xe9fc40(_0x4e8c4f,_0x18d8e6,_0x52ddc6);let _0x4643c0=class extends _0xab27a6[_0x4d69f0(0xc9)]{constructor(_0x10dc9d,_0x1476b2){const _0x4d62ed=_0x4d69f0;super(),this['_threadCommentDataSourceService']=_0x10dc9d,this[_0x4d62ed(0xe3)]=_0x1476b2,this['_initDataSource']();}['_initDataSource'](){const _0x44945a=_0x4d69f0;this[_0x44945a(0x103)]['dataSource']=this[_0x44945a(0xe3)],this[_0x44945a(0x103)][_0x44945a(0x137)]=!0x1;}};_0x4643c0=_0x20ce87([_0xf66220(0x0,_0x313a66[_0x4d69f0(0xbf)]),_0xf66220(0x1,_0xab27a6[_0x4d69f0(0xc4)](_0x45c26b))],_0x4643c0);var _0x13c838=Object[_0x4d69f0(0xf5)],_0x3d8df0=Object['getOwnPropertyDescriptor'],_0x51c580=(_0x538264,_0x19cf21,_0x4ad2e0)=>_0x19cf21 in _0x538264?_0x13c838(_0x538264,_0x19cf21,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ad2e0}):_0x538264[_0x19cf21]=_0x4ad2e0,_0x24f5c2=(_0x3231aa,_0x1f1dfd,_0x20c0b5,_0x5bf2b7)=>{for(var _0x49efc7=_0x5bf2b7>0x1?void 0x0:_0x5bf2b7?_0x3d8df0(_0x1f1dfd,_0x20c0b5):_0x1f1dfd,_0x42308c=_0x3231aa['length']-0x1,_0x1be820;_0x42308c>=0x0;_0x42308c--)(_0x1be820=_0x3231aa[_0x42308c])&&(_0x49efc7=_0x1be820(_0x49efc7)||_0x49efc7);return _0x49efc7;},_0xb7e5b8=(_0x37f166,_0x1de625)=>(_0xf7fdb1,_0x2375d8)=>_0x1de625(_0xf7fdb1,_0x2375d8,_0x37f166),_0x1d6842=(_0x37d0dc,_0x5b8408,_0x2ae1ce)=>_0x51c580(_0x37d0dc,typeof _0x5b8408!='symbol'?_0x5b8408+'':_0x5b8408,_0x2ae1ce);_0x4f4d62[_0x4d69f0(0xfa)]=class extends _0xab27a6[_0x4d69f0(0x121)]{constructor(_0x1ad055=_0x4b6f52,_0x248c69,_0x543aa4){const _0x3de0f2=_0x4d69f0;super(),this['_config']=_0x1ad055,this['_injector']=_0x248c69,this[_0x3de0f2(0x102)]=_0x543aa4;const {..._0x276d8a}=_0xab27a6[_0x3de0f2(0x13b)]({},_0x4b6f52,this[_0x3de0f2(0x13d)]);this[_0x3de0f2(0x102)]['setConfig'](_0x1f5605,_0x276d8a);}['onStarting'](){const _0x48ce7d=_0x4d69f0;[[_0x45c26b],[_0x4643c0],[_0x1aa0a9]][_0x48ce7d(0xde)](_0x2dca17=>{const _0x1e44e7=_0x48ce7d;this[_0x1e44e7(0x136)][_0x1e44e7(0xd9)](_0x2dca17);});}['onReady'](){const _0x3f0d19=_0x4d69f0;this[_0x3f0d19(0x136)][_0x3f0d19(0x112)](_0x4643c0),this[_0x3f0d19(0x136)][_0x3f0d19(0x112)](_0x1aa0a9);}},_0x1d6842(_0x4f4d62[_0x4d69f0(0xfa)],_0x4d69f0(0xdc),_0x43a0a7),_0x1d6842(_0x4f4d62[_0x4d69f0(0xfa)],'type',_0xab27a6['UniverInstanceType'][_0x4d69f0(0xe0)]),_0x4f4d62[_0x4d69f0(0xfa)]=_0x24f5c2([_0xab27a6[_0x4d69f0(0xfd)](_0x4df0d4[_0x4d69f0(0x135)],_0x4be1ec[_0x4d69f0(0xfb)],_0x5699d5['UniverLicensePlugin']),_0xb7e5b8(0x1,_0xab27a6[_0x4d69f0(0xc4)](_0xab27a6[_0x4d69f0(0xd6)])),_0xb7e5b8(0x2,_0xab27a6[_0x4d69f0(0xc6)])],_0x4f4d62['UniverThreadCommentDataSourcePlugin']),Object[_0x4d69f0(0xf5)](_0x4f4d62,Symbol['toStringTag'],{'value':_0x4d69f0(0x111)});}));function _0x4088(){const _0xfee050=['reply','content','/add','24TpXImn','/solved','userID','UniverProCollaborationClient','YYYY/MM/DD\x20HH:mm','personId','ThreadCommentModel','_initUserSync','resolveComment','values','Plugin','UserManagerService','10BsRNhH','Edit','slice','users','solved','parse','bufferTime','disposeWithMe','UNRECOGNIZED','_httpService','getMemberID','CollaborationSessionService','userId','type','5500306PMZbmN','COMMENT','Unknown','@univerjs-pro/license','UniverThreadCommentUIPlugin','_injector','syncUpdateMutationToColla','Solve','payload','deleteComment','merge','UniverCore','_config','OpenOrReOpen','body','330452dbAkFm','find','IThreadCommentDataSourceService','_init','format','addUser','saveCommentToSnapshot','Inject','UniverThreadComment','IConfigService','length','user','Disposable','@univerjs/network','_sessionService','customRanges','replyId','rangeType','threadId','/reply','18XAAFfm','CustomRangeType','object','_threadCommentModel','getUnit','Injector','subscribe','parentId','add','1475836jSqCGl','getOwnPropertyDescriptor','pluginName','filter','forEach','comment','UNIVER_UNKNOWN','/delete','ref','_threadCommentDataSource','UniverThreadCommentUi','unitId','function','1115818aPIYoa','_commentService','CommentService','@univerjs/thread-comment-ui','addComment','code','Reply','/list','getUser','rxjs','HTTPService','root','4625568iXOnUQ','dayjs','defineProperty','@univerjs/core','stringify','Add','_userService','UniverThreadCommentDataSourcePlugin','UniverCollaborationClientPlugin','requireSession','DependentOn','@univerjs/thread-comment','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','_configService','_threadCommentDataSourceService','post','/universer-api/user/list','/universer-api/comment/unit/','updateComment','Delete','/edit','3099664zTYMMk','resolved','thread-comment-data-source.config','Solved','createTimestamp','950140HYBvgU','commentUpdate$','Module','get','error'];_0x4088=function(){return _0xfee050;};return _0x4088();}
|
|
1
|
+
(function(_0x9ba79f,_0x1d3614){const _0x331910=_0x3188,_0x305030=_0x9ba79f();while(!![]){try{const _0x5d69ae=-parseInt(_0x331910(0x19b))/0x1+-parseInt(_0x331910(0x178))/0x2*(parseInt(_0x331910(0x172))/0x3)+parseInt(_0x331910(0x15c))/0x4+parseInt(_0x331910(0x165))/0x5+parseInt(_0x331910(0x179))/0x6*(-parseInt(_0x331910(0x16f))/0x7)+parseInt(_0x331910(0x18d))/0x8+-parseInt(_0x331910(0x144))/0x9*(-parseInt(_0x331910(0x15e))/0xa);if(_0x5d69ae===_0x1d3614)break;else _0x305030['push'](_0x305030['shift']());}catch(_0x337966){_0x305030['push'](_0x305030['shift']());}}}(_0x2a52,0xb90a9),function(_0x2f0821,_0x5dd305){const _0x35f0c0=_0x3188;typeof exports==_0x35f0c0(0x13e)&&typeof module<'u'?_0x5dd305(exports,require(_0x35f0c0(0x14c)),require(_0x35f0c0(0x16e)),require(_0x35f0c0(0x17b)),require(_0x35f0c0(0x139)),require(_0x35f0c0(0x16b)),require(_0x35f0c0(0x18b)),require(_0x35f0c0(0x138))):typeof define==_0x35f0c0(0x19e)&&define['amd']?define([_0x35f0c0(0x15b),_0x35f0c0(0x14c),'@univerjs-pro/license',_0x35f0c0(0x17b),_0x35f0c0(0x139),_0x35f0c0(0x16b),'rxjs',_0x35f0c0(0x138)],_0x5dd305):(_0x2f0821=typeof globalThis<'u'?globalThis:_0x2f0821||self,_0x5dd305(_0x2f0821[_0x35f0c0(0x161)]={},_0x2f0821['UniverProCollaborationClient'],_0x2f0821['UniverProLicense'],_0x2f0821['UniverCore'],_0x2f0821[_0x35f0c0(0x18c)],_0x2f0821['UniverThreadComment'],_0x2f0821[_0x35f0c0(0x18b)],_0x2f0821[_0x35f0c0(0x13c)]));}(this,function(_0x3df0d1,_0x3ff5c1,_0x130a71,_0xd72f64,_0x23cb8a,_0x188a0d,_0x1f55c2,_0xd33d61){'use strict';const _0x520c95=_0x3188;const _0x1df966=_0x520c95(0x1b4);var _0x3c082c=(_0x48ed70=>(_0x48ed70[_0x48ed70['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x48ed70[_0x48ed70['Solved']=0x1]=_0x520c95(0x193),_0x48ed70[_0x48ed70['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x48ed70))(_0x3c082c||{}),_0x4d56f7=(_0xd59dc1=>(_0xd59dc1[_0xd59dc1['Unknown']=0x0]='Unknown',_0xd59dc1[_0xd59dc1[_0x520c95(0x155)]=0x1]=_0x520c95(0x155),_0xd59dc1[_0xd59dc1['Reply']=0x2]=_0x520c95(0x175),_0xd59dc1[_0xd59dc1[_0x520c95(0x14b)]=0x3]=_0x520c95(0x14b),_0xd59dc1[_0xd59dc1[_0x520c95(0x1a8)]=0x4]=_0x520c95(0x1a8),_0xd59dc1[_0xd59dc1[_0x520c95(0x1a7)]=0x5]=_0x520c95(0x1a7),_0xd59dc1[_0xd59dc1[_0x520c95(0x171)]=-0x1]='UNRECOGNIZED',_0xd59dc1))(_0x4d56f7||{});const _0x1d2042=_0x587337=>_0xd72f64[_0x520c95(0x151)](new Date(+_0x587337))['format'](_0x520c95(0x14a)),_0x459e9e=async(_0x3073c0,_0x5df78e)=>{const _0x2c99e9=_0x520c95,_0x5e70a9=_0x3073c0[_0x2c99e9(0x17e)](_0xd72f64['UserManagerService']),_0x25ad2d=_0x3073c0[_0x2c99e9(0x17e)](_0xd33d61[_0x2c99e9(0x17c)]);_0x5df78e[_0x2c99e9(0x195)](_0x18d457=>{const _0x27549d=_0x2c99e9;_0x5e70a9[_0x27549d(0x19f)](_0x18d457)&&_0x5df78e[_0x27549d(0x1b0)](_0x18d457);}),_0x5df78e[_0x2c99e9(0x14e)]&&(await _0x25ad2d[_0x2c99e9(0x17e)](_0x2c99e9(0x1ad),{'params':{'userIDs':[..._0x5df78e]}}))[_0x2c99e9(0x1a9)][_0x2c99e9(0x189)][_0x2c99e9(0x195)](_0x451533=>{const _0x50cd26=_0x2c99e9;_0x451533&&_0x5e70a9[_0x50cd26(0x168)](_0x451533);});};var _0x5ba424=Object[_0x520c95(0x1b8)],_0x307d60=(_0x3e6ac2,_0x8f6ef1,_0x5472c8,_0x4fcac7)=>{const _0xeff480=_0x520c95;for(var _0x23ff46=_0x4fcac7>0x1?void 0x0:_0x4fcac7?_0x5ba424(_0x8f6ef1,_0x5472c8):_0x8f6ef1,_0x4b10e5=_0x3e6ac2[_0xeff480(0x169)]-0x1,_0x20f319;_0x4b10e5>=0x0;_0x4b10e5--)(_0x20f319=_0x3e6ac2[_0x4b10e5])&&(_0x23ff46=_0x20f319(_0x23ff46)||_0x23ff46);return _0x23ff46;},_0x3da9cc=(_0x3e6bf5,_0x4d5b21)=>(_0x5068f3,_0x10997b)=>_0x4d5b21(_0x5068f3,_0x10997b,_0x3e6bf5);let _0xbbe383=class extends _0xd72f64['Disposable']{constructor(_0x9ab0e3,_0xbce21f,_0x96d446,_0x42e993){const _0x13f369=_0x520c95;super(),this[_0x13f369(0x1b3)]=_0x9ab0e3,this[_0x13f369(0x1a5)]=_0xbce21f,this[_0x13f369(0x1a2)]=_0x96d446,this[_0x13f369(0x1af)]=_0x42e993,this[_0x13f369(0x146)](),this['_initUserSync']();}[_0x520c95(0x181)](){const _0x4e2111=_0x520c95;this['disposeWithMe'](this[_0x4e2111(0x1a5)][_0x4e2111(0x1b6)][_0x4e2111(0x170)](_0x1f55c2['bufferTime'](0x10))[_0x4e2111(0x158)](_0x4ee7f9=>{const _0x2355b4=_0x4e2111,_0x1e85cd=new Set();_0x4ee7f9[_0x2355b4(0x195)](_0x4a9df9=>{const _0x4125ac=_0x2355b4;switch(_0x4a9df9[_0x4125ac(0x14d)]){case'add':{const _0x56e846=_0x4a9df9['payload']['personId'];_0x1e85cd[_0x4125ac(0x159)](_0x56e846);break;}}}),_0x459e9e(this['_injector'],_0x1e85cd);}));}[_0x520c95(0x146)](){const _0x29c9d3=_0x520c95;this[_0x29c9d3(0x148)](this[_0x29c9d3(0x1b3)][_0x29c9d3(0x1b6)]['subscribe'](async _0x3a1901=>{const _0x2057cd=_0x29c9d3;var _0x44d3c9,_0x25c8e7,_0x476390,_0x4c434f;const _0x291c13=(_0x44d3c9=this[_0x2057cd(0x1a5)][_0x2057cd(0x142)](_0x3a1901['unitId'])[_0x2057cd(0x13a)](_0x24b4db=>_0x24b4db[_0x2057cd(0x191)]===_0x3a1901[_0x2057cd(0x191)]))==null?void 0x0:_0x44d3c9[_0x2057cd(0x196)];if(!_0x291c13)return;const {unitId:_0x385dbb,subUnitId:_0x4d175}=_0x291c13;switch(_0x3a1901[_0x2057cd(0x17a)]&&this['_userService'][_0x2057cd(0x168)](_0x3a1901['user']),_0x3a1901['type']){case _0x4d56f7[_0x2057cd(0x155)]:break;case _0x4d56f7[_0x2057cd(0x175)]:{this['_threadCommentModel'][_0x2057cd(0x13f)](_0x385dbb,_0x4d175,{'unitId':_0x385dbb,'subUnitId':_0x4d175,'ref':'','id':_0x3a1901['replyId'],'dT':_0x1d2042(+_0x3a1901[_0x2057cd(0x1a6)]),'threadId':_0x3a1901[_0x2057cd(0x191)],'personId':(_0x476390=(_0x25c8e7=_0x3a1901[_0x2057cd(0x17a)])==null?void 0x0:_0x25c8e7[_0x2057cd(0x153)])!=null?_0x476390:_0x3a1901[_0x2057cd(0x180)],'text':JSON[_0x2057cd(0x1b2)](_0x3a1901[_0x2057cd(0x16d)]),'parentId':_0x291c13['id']});break;}case _0x4d56f7['Delete']:{const _0x305ef5=this[_0x2057cd(0x1a5)][_0x2057cd(0x185)](_0x385dbb,_0x4d175,_0x3a1901['replyId']);_0x305ef5&&_0x305ef5[_0x2057cd(0x1a3)]&&this['_threadCommentModel'][_0x2057cd(0x1aa)](_0x385dbb,_0x4d175,_0x3a1901['replyId']);break;}case _0x4d56f7[_0x2057cd(0x14b)]:{this[_0x2057cd(0x1a5)][_0x2057cd(0x192)](_0x385dbb,_0x4d175,{'commentId':_0x3a1901[_0x2057cd(0x173)],'text':JSON['parse'](_0x3a1901[_0x2057cd(0x16d)])});break;}case _0x4d56f7[_0x2057cd(0x1a7)]:{const _0x3468cf=(_0x4c434f=this[_0x2057cd(0x1a5)][_0x2057cd(0x142)](_0x3a1901[_0x2057cd(0x1b9)])[_0x2057cd(0x13a)](_0x2cf07b=>_0x2cf07b['threadId']===_0x3a1901[_0x2057cd(0x191)]))==null?void 0x0:_0x4c434f[_0x2057cd(0x196)];_0x3468cf&&this[_0x2057cd(0x1a5)][_0x2057cd(0x166)](_0x385dbb,_0x4d175,_0x3468cf['id'],_0x3a1901[_0x2057cd(0x183)]===_0x3c082c[_0x2057cd(0x193)]);break;}}}));}};_0xbbe383=_0x307d60([_0x3da9cc(0x0,_0xd72f64[_0x520c95(0x19c)](_0x3ff5c1[_0x520c95(0x194)])),_0x3da9cc(0x1,_0xd72f64[_0x520c95(0x19c)](_0x188a0d['ThreadCommentModel'])),_0x3da9cc(0x2,_0xd72f64[_0x520c95(0x19c)](_0xd72f64[_0x520c95(0x1ab)])),_0x3da9cc(0x3,_0xd72f64[_0x520c95(0x19c)](_0xd72f64['Injector']))],_0xbbe383);const _0x527561=_0x520c95(0x197),_0x5fad3b={};var _0x34bec4=Object['getOwnPropertyDescriptor'],_0x459670=(_0x314466,_0x4b2c3d,_0x55b3ca,_0x5cfb0f)=>{for(var _0x4dda74=_0x5cfb0f>0x1?void 0x0:_0x5cfb0f?_0x34bec4(_0x4b2c3d,_0x55b3ca):_0x4b2c3d,_0x35647e=_0x314466['length']-0x1,_0x3eb830;_0x35647e>=0x0;_0x35647e--)(_0x3eb830=_0x314466[_0x35647e])&&(_0x4dda74=_0x3eb830(_0x4dda74)||_0x4dda74);return _0x4dda74;},_0x3f29aa=(_0x41c806,_0x29fb7e)=>(_0x22a3cc,_0x23a908)=>_0x29fb7e(_0x22a3cc,_0x23a908,_0x41c806);function _0x44dde9(_0x3bf4d4,_0x4af614){const _0x1e484b=_0x520c95,_0x16eda7=_0x3bf4d4[_0x1e484b(0x1b7)][0x0];return{..._0x4af614,'id':_0x16eda7['replyId'],'resolved':_0x3bf4d4[_0x1e484b(0x183)]===0x1,'dT':_0x1d2042(_0x16eda7[_0x1e484b(0x1a6)]),'personId':_0x16eda7[_0x1e484b(0x180)],'threadId':_0x16eda7[_0x1e484b(0x191)]};}function _0x2e7f3e(_0x5b883f,_0x2135e0,_0x5b5063){const _0x41b691=_0x520c95;var _0x47caba,_0x56259a;if(((_0x56259a=(_0x47caba=_0x5b883f==null?void 0x0:_0x5b883f[_0x41b691(0x1b7)])==null?void 0x0:_0x47caba['length'])!=null?_0x56259a:0x0)>0x0){const _0xafe045=(_0x7da05,_0xf813ab)=>({'id':_0x7da05[_0x41b691(0x173)],'threadId':_0x7da05[_0x41b691(0x191)],'dT':_0x1d2042(_0x7da05[_0x41b691(0x1a6)]),'personId':_0x7da05[_0x41b691(0x180)],'resolved':_0x5b883f[_0x41b691(0x183)]===_0x3c082c[_0x41b691(0x193)],'unitId':_0x2135e0,'subUnitId':_0x5b5063,'text':JSON[_0x41b691(0x1b2)](_0x7da05[_0x41b691(0x16d)]),'parentId':_0xf813ab}),_0xd871ab=_0xafe045(_0x5b883f[_0x41b691(0x1b7)][0x0]);return{..._0xd871ab,'children':_0x5b883f[_0x41b691(0x1b7)]['slice'](0x1)[_0x41b691(0x1b5)](_0x3ce0d0=>_0xafe045(_0x3ce0d0,_0xd871ab['id']))};}return null;}let _0x3e9012=class{constructor(_0x4fc62c,_0x120a22,_0x5abf9b,_0x5c4a41){const _0x4a7829=_0x520c95;this[_0x4a7829(0x174)]=_0x4fc62c,this[_0x4a7829(0x1a2)]=_0x120a22,this[_0x4a7829(0x1ae)]=_0x5abf9b,this['_injector']=_0x5c4a41;}async['addComment'](_0x3e8f9e){const _0x4d2af3=_0x520c95;var _0x30f1db,_0x268476;const {parentId:_0xf52e64,unitId:_0x174594,text:_0x39629a,threadId:_0x1d88a3}=_0x3e8f9e,_0x3799f4=(_0x268476=(_0x30f1db=_0x39629a['customRanges'])==null?void 0x0:_0x30f1db[_0x4d2af3(0x13d)](_0x1c84d2=>_0x1c84d2[_0x4d2af3(0x167)]===_0xd72f64[_0x4d2af3(0x199)]['COMMENT'])[_0x4d2af3(0x1b5)](_0x373330=>_0x373330[_0x4d2af3(0x150)]))!=null?_0x268476:[],_0x587057=JSON[_0x4d2af3(0x15a)](_0x39629a),_0x20df04=(await this[_0x4d2af3(0x1ae)][_0x4d2af3(0x162)](_0x174594))['getMemberID']();if(_0xf52e64){const _0x3f891d={'memberId':_0x20df04,'unitId':_0x174594,'content':_0x587057,'mention':_0x3799f4,'threadId':_0x1d88a3},_0xf44b97=(await this[_0x4d2af3(0x174)][_0x4d2af3(0x147)]('/universer-api/comment/unit/'+_0x174594+_0x4d2af3(0x145),{'body':_0x3f891d}))[_0x4d2af3(0x1a9)][_0x4d2af3(0x16c)];return{..._0x3e8f9e,'id':_0xf44b97[_0x4d2af3(0x173)],'dT':_0xd72f64[_0x4d2af3(0x151)](+_0xf44b97['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0xf44b97[_0x4d2af3(0x180)]};}else{const _0x38fedc={'memberId':_0x20df04,'unitId':_0x174594,'content':_0x587057,'mention':_0x3799f4},_0x87834a=await this[_0x4d2af3(0x174)]['post'](_0x4d2af3(0x188)+_0x174594+_0x4d2af3(0x160),{'body':_0x38fedc});return _0x44dde9(_0x87834a[_0x4d2af3(0x1a9)]['comment'],_0x3e8f9e);}}async['updateComment'](_0x2c9522){const _0x3c791a=_0x520c95;var _0x15c426,_0x11014e;const {text:_0x195678,unitId:_0x21abf9}=_0x2c9522,_0x157325=(_0x11014e=(_0x15c426=_0x195678['customRanges'])==null?void 0x0:_0x15c426[_0x3c791a(0x13d)](_0x10f9c9=>_0x10f9c9[_0x3c791a(0x167)]===_0xd72f64['CustomRangeType'][_0x3c791a(0x154)])[_0x3c791a(0x1b5)](_0x3d0f6d=>_0x3d0f6d[_0x3c791a(0x150)]))!=null?_0x11014e:[],_0x2593f9=JSON[_0x3c791a(0x15a)](_0x195678),_0x54cde6=_0x2c9522[_0x3c791a(0x191)],_0x343c1d=_0x2c9522['id'],_0x48f0d7={'memberId':(await this['_sessionService'][_0x3c791a(0x162)](_0x21abf9))[_0x3c791a(0x19d)](),'unitId':_0x21abf9,'threadId':_0x54cde6,'mention':_0x157325,'content':_0x2593f9,'replyId':_0x343c1d},_0x56407d=await this[_0x3c791a(0x174)][_0x3c791a(0x147)]('/universer-api/comment/unit/'+_0x21abf9+'/edit',{'body':_0x48f0d7});return!_0x56407d[_0x3c791a(0x1a9)]['error']||_0x56407d[_0x3c791a(0x1a9)][_0x3c791a(0x19a)]['code']===0x1;}async[_0x520c95(0x166)](_0x1deac3){const _0x22da61=_0x520c95,{unitId:_0xaf1c82}=_0x1deac3,_0x4eade5=_0x1deac3[_0x22da61(0x191)],_0x47e2fa={'memberId':this[_0x22da61(0x1a2)][_0x22da61(0x163)]()[_0x22da61(0x153)],'unitId':_0xaf1c82,'threadId':_0x4eade5,'solved':_0x1deac3['resolved']?_0x3c082c[_0x22da61(0x193)]:_0x3c082c[_0x22da61(0x1b1)]},_0x4b9082=await this[_0x22da61(0x174)]['post'](_0x22da61(0x188)+_0xaf1c82+_0x22da61(0x1ac),{'body':_0x47e2fa});return!_0x4b9082[_0x22da61(0x1a9)][_0x22da61(0x19a)]||_0x4b9082['body'][_0x22da61(0x19a)][_0x22da61(0x149)]===0x1;}async[_0x520c95(0x1aa)](_0x456baf,_0x22ed06,_0x160169,_0x1889f7){const _0x5d20ef=_0x520c95,_0x181a35={'memberId':(await this[_0x5d20ef(0x1ae)][_0x5d20ef(0x162)](_0x456baf))[_0x5d20ef(0x19d)](),'threadId':_0x160169,'replyId':_0x1889f7,'unitId':_0x456baf},_0x3c5964=await this[_0x5d20ef(0x174)][_0x5d20ef(0x147)](_0x5d20ef(0x188)+_0x456baf+_0x5d20ef(0x17f),{'body':_0x181a35});return!_0x3c5964[_0x5d20ef(0x1a9)][_0x5d20ef(0x19a)]||_0x3c5964['body'][_0x5d20ef(0x19a)]['code']===0x1;}async['listComments'](_0x207981,_0x9b1d21,_0x57a582){const _0x3186d6=_0x520c95,_0x12574f={'unitId':_0x207981,'threadId':_0x57a582},_0x5556ba=await this[_0x3186d6(0x174)][_0x3186d6(0x147)](_0x3186d6(0x188)+_0x207981+'/list',{'body':_0x12574f}),_0xedd9d9=_0x57a582[_0x3186d6(0x1b5)](_0x51c5ea=>_0x2e7f3e(_0x5556ba[_0x3186d6(0x1a9)][_0x3186d6(0x1a0)][_0x51c5ea],_0x207981,_0x9b1d21))[_0x3186d6(0x13d)](Boolean);return Object[_0x3186d6(0x143)](_0x5556ba[_0x3186d6(0x1a9)]['users'])['forEach'](_0xfb3c64=>{const _0x42d884=_0x3186d6;this[_0x42d884(0x1a2)][_0x42d884(0x168)](_0xfb3c64);}),_0xedd9d9;}[_0x520c95(0x18e)](_0x475f8c){const _0x27bdd7=_0x520c95;return{'id':_0x475f8c['id'],'threadId':_0x475f8c[_0x27bdd7(0x191)],'ref':_0x475f8c[_0x27bdd7(0x184)]};}};_0x3e9012=_0x459670([_0x3f29aa(0x0,_0xd72f64[_0x520c95(0x19c)](_0xd33d61[_0x520c95(0x17c)])),_0x3f29aa(0x1,_0xd72f64[_0x520c95(0x19c)](_0xd72f64[_0x520c95(0x1ab)])),_0x3f29aa(0x2,_0xd72f64[_0x520c95(0x19c)](_0x3ff5c1[_0x520c95(0x152)])),_0x3f29aa(0x3,_0xd72f64[_0x520c95(0x19c)](_0xd72f64[_0x520c95(0x176)]))],_0x3e9012);var _0x7d2986=Object[_0x520c95(0x1b8)],_0x2250e0=(_0x5da902,_0x2078bb,_0x30c80e,_0x1f3f55)=>{const _0x3f2890=_0x520c95;for(var _0x16f923=_0x1f3f55>0x1?void 0x0:_0x1f3f55?_0x7d2986(_0x2078bb,_0x30c80e):_0x2078bb,_0x5edf31=_0x5da902[_0x3f2890(0x169)]-0x1,_0x198ceb;_0x5edf31>=0x0;_0x5edf31--)(_0x198ceb=_0x5da902[_0x5edf31])&&(_0x16f923=_0x198ceb(_0x16f923)||_0x16f923);return _0x16f923;},_0xf70da9=(_0x4ada0a,_0xccdc4)=>(_0x44999d,_0x32803f)=>_0xccdc4(_0x44999d,_0x32803f,_0x4ada0a);let _0x6ce052=class extends _0xd72f64[_0x520c95(0x190)]{constructor(_0x58292f,_0x5a298a){const _0x384e41=_0x520c95;super(),this[_0x384e41(0x13b)]=_0x58292f,this['_threadCommentDataSource']=_0x5a298a,this[_0x384e41(0x14f)]();}[_0x520c95(0x14f)](){const _0x1914a8=_0x520c95;this[_0x1914a8(0x13b)][_0x1914a8(0x18a)]=this[_0x1914a8(0x187)],this['_threadCommentDataSourceService'][_0x1914a8(0x17d)]=!0x1;}};_0x6ce052=_0x2250e0([_0xf70da9(0x0,_0x188a0d['IThreadCommentDataSourceService']),_0xf70da9(0x1,_0xd72f64[_0x520c95(0x19c)](_0x3e9012))],_0x6ce052);var _0x5159e4=Object['defineProperty'],_0x2153fa=Object[_0x520c95(0x1b8)],_0x37752a=(_0x4c290b,_0x4d97bc,_0x39a463)=>_0x4d97bc in _0x4c290b?_0x5159e4(_0x4c290b,_0x4d97bc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39a463}):_0x4c290b[_0x4d97bc]=_0x39a463,_0x42de05=(_0x23125c,_0x2e02a6,_0x5e01df,_0x3ed078)=>{const _0x59267c=_0x520c95;for(var _0x2698a9=_0x3ed078>0x1?void 0x0:_0x3ed078?_0x2153fa(_0x2e02a6,_0x5e01df):_0x2e02a6,_0x29d6f2=_0x23125c[_0x59267c(0x169)]-0x1,_0x40fd2a;_0x29d6f2>=0x0;_0x29d6f2--)(_0x40fd2a=_0x23125c[_0x29d6f2])&&(_0x2698a9=_0x40fd2a(_0x2698a9)||_0x2698a9);return _0x2698a9;},_0x2ec69f=(_0x4b7307,_0x50e42f)=>(_0x54f499,_0x5e0b0d)=>_0x50e42f(_0x54f499,_0x5e0b0d,_0x4b7307),_0x240462=(_0x217a77,_0xc0b02c,_0x36742e)=>_0x37752a(_0x217a77,typeof _0xc0b02c!=_0x520c95(0x182)?_0xc0b02c+'':_0xc0b02c,_0x36742e);_0x3df0d1[_0x520c95(0x198)]=class extends _0xd72f64[_0x520c95(0x164)]{constructor(_0x40c8ff=_0x5fad3b,_0x696931,_0x5074e0){const _0x28f7c0=_0x520c95;super(),this['_config']=_0x40c8ff,this[_0x28f7c0(0x1af)]=_0x696931,this[_0x28f7c0(0x15f)]=_0x5074e0;const {..._0x4ad040}=_0xd72f64[_0x28f7c0(0x140)]({},_0x5fad3b,this[_0x28f7c0(0x16a)]);this[_0x28f7c0(0x15f)][_0x28f7c0(0x156)](_0x527561,_0x4ad040);}[_0x520c95(0x15d)](){const _0x313fba=_0x520c95;[[_0x3e9012],[_0x6ce052],[_0xbbe383]][_0x313fba(0x195)](_0x207c43=>{const _0x48c022=_0x313fba;this[_0x48c022(0x1af)][_0x48c022(0x159)](_0x207c43);});}[_0x520c95(0x177)](){const _0x1177dd=_0x520c95;this[_0x1177dd(0x1af)][_0x1177dd(0x17e)](_0x6ce052),this[_0x1177dd(0x1af)]['get'](_0xbbe383);}},_0x240462(_0x3df0d1[_0x520c95(0x198)],_0x520c95(0x186),_0x1df966),_0x240462(_0x3df0d1[_0x520c95(0x198)],_0x520c95(0x14d),_0xd72f64[_0x520c95(0x141)][_0x520c95(0x1a4)]),_0x3df0d1['UniverThreadCommentDataSourcePlugin']=_0x42de05([_0xd72f64[_0x520c95(0x18f)](_0x23cb8a['UniverThreadCommentUIPlugin'],_0x3ff5c1['UniverCollaborationClientPlugin'],_0x130a71['UniverLicensePlugin']),_0x2ec69f(0x1,_0xd72f64[_0x520c95(0x19c)](_0xd72f64['Injector'])),_0x2ec69f(0x2,_0xd72f64[_0x520c95(0x157)])],_0x3df0d1[_0x520c95(0x198)]),Object[_0x520c95(0x1a1)](_0x3df0d1,Symbol['toStringTag'],{'value':'Module'});}));function _0x3188(_0xfcdee3,_0x2b560e){const _0x2a52f1=_0x2a52();return _0x3188=function(_0x3188c5,_0x1d8e24){_0x3188c5=_0x3188c5-0x138;let _0x443ee4=_0x2a52f1[_0x3188c5];return _0x443ee4;},_0x3188(_0xfcdee3,_0x2b560e);}function _0x2a52(){const _0x16399c=['exports','613444wzUhAn','onStarting','20390torded','_configService','/add','UniverProThreadCommentDatasource','requireSession','getCurrentUser','Plugin','4455665CvAYEE','resolveComment','rangeType','addUser','length','_config','@univerjs/thread-comment','reply','content','@univerjs-pro/license','165207BzLFXY','pipe','UNRECOGNIZED','33bjenlf','replyId','_httpService','Reply','Injector','onReady','59118TJcCEf','126vBikii','user','@univerjs/core','HTTPService','syncUpdateMutationToColla','get','/delete','userId','_initUserSync','symbol','solved','ref','getComment','pluginName','_threadCommentDataSource','/universer-api/comment/unit/','users','dataSource','rxjs','UniverThreadCommentUi','11198288wQRUxZ','saveCommentToSnapshot','DependentOn','Disposable','threadId','updateComment','Solved','CommentService','forEach','root','thread-comment-data-source.config','UniverThreadCommentDataSourcePlugin','CustomRangeType','error','1322317OgWvQJ','Inject','getMemberID','function','getUser','comments','defineProperty','_userService','parentId','UNIVER_UNKNOWN','_threadCommentModel','createTimestamp','Solve','Delete','body','deleteComment','UserManagerService','/solved','/universer-api/user/list','_sessionService','_injector','delete','OpenOrReOpen','parse','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','commentUpdate$','replies','getOwnPropertyDescriptor','unitId','@univerjs/network','@univerjs/thread-comment-ui','find','_threadCommentDataSourceService','UniverNetwork','filter','object','addComment','merge','UniverInstanceType','getUnit','values','2016nXvkEW','/reply','_init','post','disposeWithMe','code','YYYY/MM/DD\x20HH:mm','Edit','@univerjs-pro/collaboration-client','type','size','_initDataSource','rangeId','dayjs','CollaborationSessionService','userID','COMMENT','Add','setConfig','IConfigService','subscribe','add','stringify'];_0x2a52=function(){return _0x16399c;};return _0x2a52();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.7-experimental.20250331-
|
|
3
|
+
"version": "0.6.7-experimental.20250331-25f6e0e",
|
|
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/
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/network": "0.6.7-experimental.20250331-
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.7-experimental.20250331-25f6e0e",
|
|
49
|
+
"@univerjs-pro/license": "0.6.7-experimental.20250331-25f6e0e",
|
|
50
|
+
"@univerjs/core": "0.6.7-experimental.20250331-25f6e0e",
|
|
51
|
+
"@univerjs/network": "0.6.7-experimental.20250331-25f6e0e",
|
|
52
52
|
"@univerjs/protocol": "0.1.45",
|
|
53
|
-
"@univerjs/thread-comment": "0.6.7-experimental.20250331-
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.6.7-experimental.20250331-
|
|
53
|
+
"@univerjs/thread-comment": "0.6.7-experimental.20250331-25f6e0e",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.6.7-experimental.20250331-25f6e0e"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|