@univerjs-pro/thread-comment-datasource 0.10.5-nightly.202508290716 → 0.10.6-experimental.20250903-f52e3bf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +9 -9
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x18ef15=_0x1e63;(function(_0x2eb40f,_0x523a4c){const _0x49a255=_0x1e63,_0x501553=_0x2eb40f();while(!![]){try{const _0x1774ec=parseInt(_0x49a255(0x13d))/0x1+-parseInt(_0x49a255(0x14a))/0x2*(parseInt(_0x49a255(0x148))/0x3)+-parseInt(_0x49a255(0x11a))/0x4+parseInt(_0x49a255(0x11b))/0x5+-parseInt(_0x49a255(0x141))/0x6+parseInt(_0x49a255(0xfd))/0x7*(parseInt(_0x49a255(0x112))/0x8)+parseInt(_0x49a255(0xe3))/0x9*(-parseInt(_0x49a255(0x114))/0xa);if(_0x1774ec===_0x523a4c)break;else _0x501553['push'](_0x501553['shift']());}catch(_0x2e76bb){_0x501553['push'](_0x501553['shift']());}}}(_0x3caf,0x9e0a8));Object[_0x18ef15(0x106)](exports,Symbol['toStringTag'],{'value':_0x18ef15(0xfe)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x18ef15(0x153);var I=(_0x5ad475=>(_0x5ad475[_0x5ad475[_0x18ef15(0x117)]=0x0]=_0x18ef15(0x117),_0x5ad475[_0x5ad475[_0x18ef15(0x102)]=0x1]=_0x18ef15(0x102),_0x5ad475[_0x5ad475[_0x18ef15(0x119)]=-0x1]=_0x18ef15(0x119),_0x5ad475))(I||{}),v=(_0xeb222e=>(_0xeb222e[_0xeb222e[_0x18ef15(0x10e)]=0x0]=_0x18ef15(0x10e),_0xeb222e[_0xeb222e[_0x18ef15(0x10a)]=0x1]=_0x18ef15(0x10a),_0xeb222e[_0xeb222e['Reply']=0x2]=_0x18ef15(0xe7),_0xeb222e[_0xeb222e[_0x18ef15(0x147)]=0x3]=_0x18ef15(0x147),_0xeb222e[_0xeb222e[_0x18ef15(0x129)]=0x4]=_0x18ef15(0x129),_0xeb222e[_0xeb222e['Solve']=0x5]=_0x18ef15(0x104),_0xeb222e[_0xeb222e[_0x18ef15(0x119)]=-0x1]=_0x18ef15(0x119),_0xeb222e))(v||{});const f=_0x464e0c=>c['dayjs'](new Date(+_0x464e0c))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x18957d,_0x36c24a)=>{const _0xaa2bc7=_0x18ef15,_0x5c0d0d=_0x18957d[_0xaa2bc7(0x14e)](c[_0xaa2bc7(0x13a)]),_0x3b7c21=_0x18957d[_0xaa2bc7(0x14e)](P[_0xaa2bc7(0xf9)]);_0x36c24a[_0xaa2bc7(0x145)](_0x173307=>{const _0x245cae=_0xaa2bc7;_0x5c0d0d[_0x245cae(0xf1)](_0x173307)&&_0x36c24a[_0x245cae(0x149)](_0x173307);}),_0x36c24a[_0xaa2bc7(0x158)]&&(await _0x3b7c21[_0xaa2bc7(0x14e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x36c24a]}}))[_0xaa2bc7(0x11c)][_0xaa2bc7(0x13c)][_0xaa2bc7(0x145)](_0x52ce37=>{const _0x2b9ba7=_0xaa2bc7;_0x52ce37&&_0x5c0d0d[_0x2b9ba7(0x111)](_0x52ce37);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x539bd8,_0x12caae,_0x399d5c,_0x17283c)=>{const _0x31bcd0=_0x18ef15;for(var _0x3117b3=_0x17283c>0x1?void 0x0:_0x17283c?$(_0x12caae,_0x399d5c):_0x12caae,_0x1f74d1=_0x539bd8[_0x31bcd0(0x144)]-0x1,_0x20e42d;_0x1f74d1>=0x0;_0x1f74d1--)(_0x20e42d=_0x539bd8[_0x1f74d1])&&(_0x3117b3=_0x20e42d(_0x3117b3)||_0x3117b3);return _0x3117b3;},S=(_0x543657,_0x1f89e7)=>(_0xf1460f,_0x227972)=>_0x1f89e7(_0xf1460f,_0x227972,_0x543657);let _=class extends c[_0x18ef15(0x116)]{constructor(_0x164ae7,_0x1f0fa3,_0x53d325,_0x510bd1){const _0x5be56f=_0x18ef15;super(),this[_0x5be56f(0x155)]=_0x164ae7,this['_threadCommentModel']=_0x1f0fa3,this['_userService']=_0x53d325,this[_0x5be56f(0x123)]=_0x510bd1,this[_0x5be56f(0x11d)](),this[_0x5be56f(0x127)]();}['_initUserSync'](){const _0x4fc352=_0x18ef15;this[_0x4fc352(0x12a)](this[_0x4fc352(0x143)][_0x4fc352(0xf6)][_0x4fc352(0xe4)](j['bufferTime'](0x10))['subscribe'](_0x629eea=>{const _0x512d7f=_0x4fc352,_0x593435=new Set();_0x629eea[_0x512d7f(0x145)](_0x428ffb=>{const _0x87c4f2=_0x512d7f;switch(_0x428ffb[_0x87c4f2(0x136)]){case _0x87c4f2(0x10d):{const _0x28a177=_0x428ffb[_0x87c4f2(0xf8)][_0x87c4f2(0x10f)];_0x593435[_0x87c4f2(0x10d)](_0x28a177);break;}}}),R(this[_0x512d7f(0x123)],_0x593435);}));}[_0x18ef15(0x11d)](){const _0x495402=_0x18ef15;this[_0x495402(0x12a)](this[_0x495402(0x155)][_0x495402(0xf6)]['subscribe'](async _0x108b2d=>{const _0x5500b9=_0x495402;var _0x35eb1e,_0x593149,_0x3c0fcb,_0x1ac8aa;const _0x45ee6c=(_0x35eb1e=this['_threadCommentModel'][_0x5500b9(0x110)](_0x108b2d[_0x5500b9(0xed)])[_0x5500b9(0x140)](_0x211a1a=>_0x211a1a[_0x5500b9(0x132)]===_0x108b2d[_0x5500b9(0x132)]))==null?void 0x0:_0x35eb1e['root'];if(!_0x45ee6c)return;const {unitId:_0x4a1398,subUnitId:_0x1446d6}=_0x45ee6c;switch(_0x108b2d[_0x5500b9(0x120)]&&this['_userService'][_0x5500b9(0x111)](_0x108b2d[_0x5500b9(0x120)]),_0x108b2d[_0x5500b9(0x136)]){case v[_0x5500b9(0x10a)]:break;case v[_0x5500b9(0xe7)]:{this[_0x5500b9(0x143)][_0x5500b9(0xe9)](_0x4a1398,_0x1446d6,{'unitId':_0x4a1398,'subUnitId':_0x1446d6,'ref':'','id':_0x108b2d[_0x5500b9(0x122)],'dT':f(+_0x108b2d[_0x5500b9(0x118)]),'threadId':_0x108b2d[_0x5500b9(0x132)],'personId':(_0x3c0fcb=(_0x593149=_0x108b2d[_0x5500b9(0x120)])==null?void 0x0:_0x593149['userID'])!=null?_0x3c0fcb:_0x108b2d['userId'],'text':JSON[_0x5500b9(0x137)](_0x108b2d[_0x5500b9(0xeb)]),'parentId':_0x45ee6c['id']});break;}case v['Delete']:{const _0x4df7e8=this[_0x5500b9(0x143)][_0x5500b9(0xef)](_0x4a1398,_0x1446d6,_0x108b2d[_0x5500b9(0x122)]);_0x4df7e8&&_0x4df7e8[_0x5500b9(0x130)]&&this['_threadCommentModel'][_0x5500b9(0x12b)](_0x4a1398,_0x1446d6,_0x108b2d['replyId']);break;}case v['Edit']:{this[_0x5500b9(0x143)]['updateComment'](_0x4a1398,_0x1446d6,{'commentId':_0x108b2d['replyId'],'text':JSON[_0x5500b9(0x137)](_0x108b2d[_0x5500b9(0xeb)])});break;}case v[_0x5500b9(0x104)]:{const _0x36e1a4=(_0x1ac8aa=this[_0x5500b9(0x143)][_0x5500b9(0x110)](_0x108b2d['unitId'])[_0x5500b9(0x140)](_0x4229d2=>_0x4229d2[_0x5500b9(0x132)]===_0x108b2d[_0x5500b9(0x132)]))==null?void 0x0:_0x1ac8aa[_0x5500b9(0x14b)];_0x36e1a4&&this[_0x5500b9(0x143)][_0x5500b9(0x146)](_0x4a1398,_0x1446d6,_0x36e1a4['id'],_0x108b2d[_0x5500b9(0x13b)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x18ef15(0x14c)](b['CommentService'])),S(0x1,c[_0x18ef15(0x14c)](M[_0x18ef15(0x128)])),S(0x2,c['Inject'](c[_0x18ef15(0x13a)])),S(0x3,c[_0x18ef15(0x14c)](c[_0x18ef15(0x135)]))],_);const q=_0x18ef15(0x152),D={};var A=Object[_0x18ef15(0xe8)],x=(_0x370881,_0x551716,_0x33da49,_0x4cfd7e)=>{const _0xd0097=_0x18ef15;for(var _0x388a75=_0x4cfd7e>0x1?void 0x0:_0x4cfd7e?A(_0x551716,_0x33da49):_0x551716,_0xfb3144=_0x370881[_0xd0097(0x144)]-0x1,_0x3bf4cf;_0xfb3144>=0x0;_0xfb3144--)(_0x3bf4cf=_0x370881[_0xfb3144])&&(_0x388a75=_0x3bf4cf(_0x388a75)||_0x388a75);return _0x388a75;},C=(_0x19c0da,_0x12af01)=>(_0x1ec499,_0x16144f)=>_0x12af01(_0x1ec499,_0x16144f,_0x19c0da);function Y(_0x5a60e9,_0x3073fe){const _0x529808=_0x18ef15,_0x213d96=_0x5a60e9[_0x529808(0x113)][0x0];return{..._0x3073fe,'id':_0x213d96[_0x529808(0x122)],'resolved':_0x5a60e9[_0x529808(0x13b)]===0x1,'dT':f(_0x213d96[_0x529808(0x118)]),'personId':_0x213d96[_0x529808(0x126)],'threadId':_0x213d96[_0x529808(0x132)]};}function G(_0x26b9b9,_0x6df85f,_0x5e48d1){const _0xae10cf=_0x18ef15;var _0x4534dd,_0x15d9c3;if(((_0x15d9c3=(_0x4534dd=_0x26b9b9==null?void 0x0:_0x26b9b9[_0xae10cf(0x113)])==null?void 0x0:_0x4534dd['length'])!=null?_0x15d9c3:0x0)>0x0){const _0xcb9c22=(_0x361afc,_0x4107a4)=>({'id':_0x361afc['replyId'],'threadId':_0x361afc[_0xae10cf(0x132)],'dT':f(_0x361afc[_0xae10cf(0x118)]),'personId':_0x361afc[_0xae10cf(0x126)],'resolved':_0x26b9b9['solved']===I['Solved'],'unitId':_0x6df85f,'subUnitId':_0x5e48d1,'text':JSON[_0xae10cf(0x137)](_0x361afc['content']),'parentId':_0x4107a4}),_0x4a0892=_0xcb9c22(_0x26b9b9['replies'][0x0]);return{..._0x4a0892,'children':_0x26b9b9['replies'][_0xae10cf(0x12e)](0x1)[_0xae10cf(0x125)](_0x5c208a=>_0xcb9c22(_0x5c208a,_0x4a0892['id']))};}return null;}function _0x3caf(){const _0x7f64a0=['_threadCommentDataSourceService','UniverInstanceType','rangeId','commentUpdate$','YYYY/MM/DD\x20HH:mm','payload','HTTPService','/universer-api/comment/unit/','merge','CustomRangeType','3849944ryDMvi','Module','pluginName','code','comment','Solved','getCurrentUser','Solve','_userService','defineProperty','getMemberID','requireSession','CollaborationSessionService','Add','ref','UniverThreadCommentUIPlugin','add','Unknown','personId','getUnit','addUser','8TEvTZG','replies','7670SQJAIj','reply','Disposable','OpenOrReOpen','createTimestamp','UNRECOGNIZED','1417820hGaYur','3760390VtoQeu','body','_init','onStarting','dayjs','user','error','replyId','_injector','dataSource','map','userId','_initUserSync','ThreadCommentModel','Delete','disposeWithMe','deleteComment','post','/reply','slice','format','parentId','_configService','threadId','_initDataSource','resolved','Injector','type','parse','/list','UniverCollaborationClientPlugin','UserManagerService','solved','users','817196wADRZh','values','_sessionService','find','6410076FhXIOK','UniverLicensePlugin','_threadCommentModel','length','forEach','resolveComment','Edit','42NWIjQn','delete','5594BWLPfM','root','Inject','onReady','get','_httpService','setConfig','Plugin','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','filter','_commentService','stringify','syncUpdateMutationToColla','size','listComments','_threadCommentDataSource','updateComment','UNIVER_UNKNOWN','IThreadCommentDataSourceService','/solved','COMMENT','117BFGNbA','pipe','_config','/add','Reply','getOwnPropertyDescriptor','addComment','rangeType','content','/edit','unitId','saveCommentToSnapshot','getComment','UniverThreadCommentDataSourcePlugin','getUser','customRanges'];_0x3caf=function(){return _0x7f64a0;};return _0x3caf();}let p=class{constructor(_0x3fabcd,_0x7b1973,_0x4f4d97){const _0x3134d8=_0x18ef15;this[_0x3134d8(0x14f)]=_0x3fabcd,this[_0x3134d8(0x105)]=_0x7b1973,this[_0x3134d8(0x13f)]=_0x4f4d97;}async[_0x18ef15(0xe9)](_0x350329){const _0x1cc2ca=_0x18ef15;var _0x113307,_0x4b56e6;const {parentId:_0x3044c6,unitId:_0x29f69c,text:_0x410ba3,threadId:_0x1de5b0}=_0x350329,_0x4e7ba0=(_0x4b56e6=(_0x113307=_0x410ba3[_0x1cc2ca(0xf2)])==null?void 0x0:_0x113307[_0x1cc2ca(0x154)](_0x100dc4=>_0x100dc4[_0x1cc2ca(0xea)]===c[_0x1cc2ca(0xfc)][_0x1cc2ca(0xe2)])[_0x1cc2ca(0x125)](_0x464889=>_0x464889[_0x1cc2ca(0xf5)]))!=null?_0x4b56e6:[],_0x4d4c6f=JSON[_0x1cc2ca(0x156)](_0x410ba3),_0x1f6d3f=(await this['_sessionService'][_0x1cc2ca(0x108)](_0x29f69c))[_0x1cc2ca(0x107)]();if(_0x3044c6){const _0x2a090e={'memberId':_0x1f6d3f,'unitId':_0x29f69c,'content':_0x4d4c6f,'mention':_0x4e7ba0,'threadId':_0x1de5b0},_0x419234=(await this[_0x1cc2ca(0x14f)][_0x1cc2ca(0x12c)](_0x1cc2ca(0xfa)+_0x29f69c+_0x1cc2ca(0x12d),{'body':_0x2a090e}))['body'][_0x1cc2ca(0x115)];return{..._0x350329,'id':_0x419234['replyId'],'dT':c[_0x1cc2ca(0x11f)](+_0x419234[_0x1cc2ca(0x118)])[_0x1cc2ca(0x12f)](_0x1cc2ca(0xf7)),'personId':_0x419234['userId']};}else{const _0x45f81e={'memberId':_0x1f6d3f,'unitId':_0x29f69c,'content':_0x4d4c6f,'mention':_0x4e7ba0},_0x3f0312=await this['_httpService'][_0x1cc2ca(0x12c)](_0x1cc2ca(0xfa)+_0x29f69c+_0x1cc2ca(0xe6),{'body':_0x45f81e});return Y(_0x3f0312[_0x1cc2ca(0x11c)][_0x1cc2ca(0x101)],_0x350329);}}async[_0x18ef15(0x15b)](_0x3f3e27){const _0x449c14=_0x18ef15;var _0x5ee790,_0x286c7c;const {text:_0x6608df,unitId:_0x11f621}=_0x3f3e27,_0x123cce=(_0x286c7c=(_0x5ee790=_0x6608df[_0x449c14(0xf2)])==null?void 0x0:_0x5ee790[_0x449c14(0x154)](_0x1dbec6=>_0x1dbec6[_0x449c14(0xea)]===c[_0x449c14(0xfc)][_0x449c14(0xe2)])[_0x449c14(0x125)](_0x27bae2=>_0x27bae2[_0x449c14(0xf5)]))!=null?_0x286c7c:[],_0x34da0c=JSON[_0x449c14(0x156)](_0x6608df),_0x2d5610=_0x3f3e27[_0x449c14(0x132)],_0x1f47a5=_0x3f3e27['id'],_0x31293a={'memberId':(await this[_0x449c14(0x13f)][_0x449c14(0x108)](_0x11f621))['getMemberID'](),'unitId':_0x11f621,'threadId':_0x2d5610,'mention':_0x123cce,'content':_0x34da0c,'replyId':_0x1f47a5},_0x28f834=await this[_0x449c14(0x14f)][_0x449c14(0x12c)](_0x449c14(0xfa)+_0x11f621+_0x449c14(0xec),{'body':_0x31293a});return!_0x28f834['body'][_0x449c14(0x121)]||_0x28f834[_0x449c14(0x11c)][_0x449c14(0x121)][_0x449c14(0x100)]===0x1;}async['resolveComment'](_0x5a8421){const _0x26031d=_0x18ef15,{unitId:_0x20c95d}=_0x5a8421,_0x402f98=_0x5a8421[_0x26031d(0x132)],_0x139053={'memberId':this[_0x26031d(0x105)][_0x26031d(0x103)]()['userID'],'unitId':_0x20c95d,'threadId':_0x402f98,'solved':_0x5a8421[_0x26031d(0x134)]?I[_0x26031d(0x102)]:I[_0x26031d(0x117)]},_0x223c78=await this['_httpService'][_0x26031d(0x12c)](_0x26031d(0xfa)+_0x20c95d+_0x26031d(0x15e),{'body':_0x139053});return!_0x223c78[_0x26031d(0x11c)][_0x26031d(0x121)]||_0x223c78[_0x26031d(0x11c)][_0x26031d(0x121)][_0x26031d(0x100)]===0x1;}async[_0x18ef15(0x12b)](_0x22a094,_0x410a33,_0x59a9f6,_0x106233){const _0x584aef=_0x18ef15,_0x4d0ecc={'memberId':(await this[_0x584aef(0x13f)][_0x584aef(0x108)](_0x22a094))[_0x584aef(0x107)](),'threadId':_0x59a9f6,'replyId':_0x106233,'unitId':_0x22a094},_0x3fa4dc=await this['_httpService'][_0x584aef(0x12c)]('/universer-api/comment/unit/'+_0x22a094+'/delete',{'body':_0x4d0ecc});return!_0x3fa4dc['body'][_0x584aef(0x121)]||_0x3fa4dc[_0x584aef(0x11c)][_0x584aef(0x121)]['code']===0x1;}async[_0x18ef15(0x159)](_0x252371,_0x339220,_0x11f056){const _0x4bd5a3=_0x18ef15,_0x397e41={'unitId':_0x252371,'threadId':_0x11f056},_0x46efca=await this[_0x4bd5a3(0x14f)][_0x4bd5a3(0x12c)](_0x4bd5a3(0xfa)+_0x252371+_0x4bd5a3(0x138),{'body':_0x397e41}),_0x2f8eb0=_0x11f056[_0x4bd5a3(0x125)](_0x239fca=>G(_0x46efca[_0x4bd5a3(0x11c)]['comments'][_0x239fca],_0x252371,_0x339220))[_0x4bd5a3(0x154)](Boolean);return Object[_0x4bd5a3(0x13e)](_0x46efca[_0x4bd5a3(0x11c)]['users'])['forEach'](_0x2bc7e6=>{const _0x2e9aea=_0x4bd5a3;this[_0x2e9aea(0x105)][_0x2e9aea(0x111)](_0x2bc7e6);}),_0x2f8eb0;}[_0x18ef15(0xee)](_0x276c5f){const _0x9232de=_0x18ef15;return{'id':_0x276c5f['id'],'threadId':_0x276c5f[_0x9232de(0x132)],'ref':_0x276c5f[_0x9232de(0x10b)]};}};p=x([C(0x0,c['Inject'](P['HTTPService'])),C(0x1,c[_0x18ef15(0x14c)](c[_0x18ef15(0x13a)])),C(0x2,c[_0x18ef15(0x14c)](b[_0x18ef15(0x109)]))],p);var H=Object[_0x18ef15(0xe8)],J=(_0x1c7c66,_0x126821,_0x9914d,_0x4ee688)=>{const _0x1b78c6=_0x18ef15;for(var _0x82b9cc=_0x4ee688>0x1?void 0x0:_0x4ee688?H(_0x126821,_0x9914d):_0x126821,_0x2647ce=_0x1c7c66[_0x1b78c6(0x144)]-0x1,_0x438150;_0x2647ce>=0x0;_0x2647ce--)(_0x438150=_0x1c7c66[_0x2647ce])&&(_0x82b9cc=_0x438150(_0x82b9cc)||_0x82b9cc);return _0x82b9cc;},y=(_0x4002f6,_0x34a8fe)=>(_0x45fdbf,_0x1001da)=>_0x34a8fe(_0x45fdbf,_0x1001da,_0x4002f6);function _0x1e63(_0x1d2e21,_0x5024d4){const _0x3cafa5=_0x3caf();return _0x1e63=function(_0x1e636c,_0xa74451){_0x1e636c=_0x1e636c-0xe2;let _0x5a6d4b=_0x3cafa5[_0x1e636c];return _0x5a6d4b;},_0x1e63(_0x1d2e21,_0x5024d4);}let g=class extends c['Disposable']{constructor(_0xea9b47,_0x4f67ae){const _0x2d4ee6=_0x18ef15;super(),this[_0x2d4ee6(0xf3)]=_0xea9b47,this['_threadCommentDataSource']=_0x4f67ae,this[_0x2d4ee6(0x133)]();}[_0x18ef15(0x133)](){const _0x3f6aa2=_0x18ef15;this[_0x3f6aa2(0xf3)][_0x3f6aa2(0x124)]=this[_0x3f6aa2(0x15a)],this[_0x3f6aa2(0xf3)][_0x3f6aa2(0x157)]=!0x1;}};g=J([y(0x0,M[_0x18ef15(0x15d)]),y(0x1,c[_0x18ef15(0x14c)](p))],g);var F=Object[_0x18ef15(0x106)],L=Object[_0x18ef15(0xe8)],Z=(_0x23e747,_0x154af0,_0x39304f)=>_0x154af0 in _0x23e747?F(_0x23e747,_0x154af0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39304f}):_0x23e747[_0x154af0]=_0x39304f,W=(_0x11ed95,_0x54104a,_0x4bd527,_0x551e6a)=>{for(var _0x35bd98=_0x551e6a>0x1?void 0x0:_0x551e6a?L(_0x54104a,_0x4bd527):_0x54104a,_0x365148=_0x11ed95['length']-0x1,_0x2f406f;_0x365148>=0x0;_0x365148--)(_0x2f406f=_0x11ed95[_0x365148])&&(_0x35bd98=_0x2f406f(_0x35bd98)||_0x35bd98);return _0x35bd98;},O=(_0x3041c0,_0x556c0b)=>(_0x3c049f,_0x27285f)=>_0x556c0b(_0x3c049f,_0x27285f,_0x3041c0),N=(_0x526033,_0x1867b7,_0x3f1134)=>Z(_0x526033,typeof _0x1867b7!='symbol'?_0x1867b7+'':_0x1867b7,_0x3f1134);exports[_0x18ef15(0xf0)]=class extends c[_0x18ef15(0x151)]{constructor(_0x2d63d9=D,_0x548d93,_0x7249bf){const _0x4be808=_0x18ef15;super(),this[_0x4be808(0xe5)]=_0x2d63d9,this['_injector']=_0x548d93,this['_configService']=_0x7249bf;const {..._0x4e7dd0}=c[_0x4be808(0xfb)]({},D,this[_0x4be808(0xe5)]);this[_0x4be808(0x131)][_0x4be808(0x150)](q,_0x4e7dd0);}[_0x18ef15(0x11e)](){const _0x17583a=_0x18ef15;[[p],[g],[_]][_0x17583a(0x145)](_0x52877f=>{const _0x27e212=_0x17583a;this[_0x27e212(0x123)]['add'](_0x52877f);});}[_0x18ef15(0x14d)](){const _0x5ce9d3=_0x18ef15;this[_0x5ce9d3(0x123)][_0x5ce9d3(0x14e)](g),this['_injector'][_0x5ce9d3(0x14e)](_);}},N(exports[_0x18ef15(0xf0)],_0x18ef15(0xff),U),N(exports[_0x18ef15(0xf0)],_0x18ef15(0x136),c[_0x18ef15(0xf4)][_0x18ef15(0x15c)]),exports[_0x18ef15(0xf0)]=W([c['DependentOn'](w[_0x18ef15(0x10c)],b[_0x18ef15(0x139)],T[_0x18ef15(0x142)]),O(0x1,c[_0x18ef15(0x14c)](c[_0x18ef15(0x135)])),O(0x2,c['IConfigService'])],exports[_0x18ef15(0xf0)]);
|
|
1
|
+
'use strict';const _0x232800=_0x2f6c;(function(_0x4cef54,_0x570db4){const _0x42d198=_0x2f6c,_0x41ff4b=_0x4cef54();while(!![]){try{const _0x687806=-parseInt(_0x42d198(0x142))/0x1+-parseInt(_0x42d198(0xfd))/0x2*(parseInt(_0x42d198(0xd3))/0x3)+-parseInt(_0x42d198(0x140))/0x4+parseInt(_0x42d198(0xe5))/0x5*(-parseInt(_0x42d198(0xff))/0x6)+-parseInt(_0x42d198(0x137))/0x7+parseInt(_0x42d198(0xfa))/0x8*(-parseInt(_0x42d198(0x135))/0x9)+-parseInt(_0x42d198(0x149))/0xa*(-parseInt(_0x42d198(0x139))/0xb);if(_0x687806===_0x570db4)break;else _0x41ff4b['push'](_0x41ff4b['shift']());}catch(_0x58a28a){_0x41ff4b['push'](_0x41ff4b['shift']());}}}(_0x4da0,0x6bbe6));Object[_0x232800(0x145)](exports,Symbol[_0x232800(0x118)],{'value':_0x232800(0xda)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x53ee4c=>(_0x53ee4c[_0x53ee4c[_0x232800(0x119)]=0x0]=_0x232800(0x119),_0x53ee4c[_0x53ee4c[_0x232800(0x13a)]=0x1]='Solved',_0x53ee4c[_0x53ee4c['UNRECOGNIZED']=-0x1]=_0x232800(0x102),_0x53ee4c))(I||{}),v=(_0x166b5b=>(_0x166b5b[_0x166b5b[_0x232800(0xf8)]=0x0]=_0x232800(0xf8),_0x166b5b[_0x166b5b[_0x232800(0xe9)]=0x1]=_0x232800(0xe9),_0x166b5b[_0x166b5b[_0x232800(0x126)]=0x2]=_0x232800(0x126),_0x166b5b[_0x166b5b[_0x232800(0xee)]=0x3]=_0x232800(0xee),_0x166b5b[_0x166b5b[_0x232800(0x105)]=0x4]=_0x232800(0x105),_0x166b5b[_0x166b5b['Solve']=0x5]=_0x232800(0x127),_0x166b5b[_0x166b5b[_0x232800(0x102)]=-0x1]=_0x232800(0x102),_0x166b5b))(v||{});const f=_0x284b9c=>c[_0x232800(0x13b)](new Date(+_0x284b9c))[_0x232800(0x117)](_0x232800(0xf0)),R=async(_0x209bf9,_0x206fde)=>{const _0x6aaccc=_0x232800,_0x33cf93=_0x209bf9[_0x6aaccc(0x12c)](c[_0x6aaccc(0xe6)]),_0x44e7b0=_0x209bf9['get'](P[_0x6aaccc(0x10c)]);_0x206fde[_0x6aaccc(0x120)](_0xd1394a=>{const _0x57a77f=_0x6aaccc;_0x33cf93[_0x57a77f(0xd4)](_0xd1394a)&&_0x206fde['delete'](_0xd1394a);}),_0x206fde['size']&&(await _0x44e7b0[_0x6aaccc(0x12c)]('/universer-api/user/list',{'params':{'userIDs':[..._0x206fde]}}))[_0x6aaccc(0xfc)]['users'][_0x6aaccc(0x120)](_0x42a8d6=>{const _0x506eb1=_0x6aaccc;_0x42a8d6&&_0x33cf93[_0x506eb1(0x132)](_0x42a8d6);});};var $=Object[_0x232800(0xed)],E=(_0x2da6c7,_0x50889f,_0x3a8414,_0x4e096e)=>{const _0x58bc84=_0x232800;for(var _0x21a82f=_0x4e096e>0x1?void 0x0:_0x4e096e?$(_0x50889f,_0x3a8414):_0x50889f,_0x3c2f0f=_0x2da6c7[_0x58bc84(0x115)]-0x1,_0x3f9aca;_0x3c2f0f>=0x0;_0x3c2f0f--)(_0x3f9aca=_0x2da6c7[_0x3c2f0f])&&(_0x21a82f=_0x3f9aca(_0x21a82f)||_0x21a82f);return _0x21a82f;},S=(_0x11941d,_0x2d0f0c)=>(_0x2eafc3,_0x41e4f4)=>_0x2d0f0c(_0x2eafc3,_0x41e4f4,_0x11941d);let _=class extends c[_0x232800(0x136)]{constructor(_0x579f24,_0x2c4c37,_0x5e134f,_0x380eb3){const _0x26a89b=_0x232800;super(),this[_0x26a89b(0x10a)]=_0x579f24,this[_0x26a89b(0x13e)]=_0x2c4c37,this[_0x26a89b(0xd2)]=_0x5e134f,this['_injector']=_0x380eb3,this[_0x26a89b(0x13c)](),this[_0x26a89b(0xe3)]();}[_0x232800(0xe3)](){const _0x5528ac=_0x232800;this[_0x5528ac(0x11f)](this[_0x5528ac(0x13e)][_0x5528ac(0xe4)][_0x5528ac(0xde)](j[_0x5528ac(0x12b)](0x10))[_0x5528ac(0x143)](_0x3acec4=>{const _0x1498c5=_0x5528ac,_0x4eac11=new Set();_0x3acec4[_0x1498c5(0x120)](_0xe11b62=>{const _0xd70e6c=_0x1498c5;switch(_0xe11b62[_0xd70e6c(0x12f)]){case _0xd70e6c(0xdc):{const _0x194e1d=_0xe11b62['payload']['personId'];_0x4eac11[_0xd70e6c(0xdc)](_0x194e1d);break;}}}),R(this[_0x1498c5(0xd0)],_0x4eac11);}));}['_init'](){const _0x286d85=_0x232800;this[_0x286d85(0x11f)](this['_commentService']['commentUpdate$'][_0x286d85(0x143)](async _0x51c5d3=>{const _0x15f401=_0x286d85;var _0x4e8f12,_0x412f47,_0x309fd2,_0x4f2c69;const _0x383e2a=(_0x4e8f12=this[_0x15f401(0x13e)][_0x15f401(0x110)](_0x51c5d3['unitId'])[_0x15f401(0xfb)](_0x225c0f=>_0x225c0f['threadId']===_0x51c5d3[_0x15f401(0xf6)]))==null?void 0x0:_0x4e8f12[_0x15f401(0x112)];if(!_0x383e2a)return;const {unitId:_0x545aa6,subUnitId:_0x1df2d0}=_0x383e2a;switch(_0x51c5d3[_0x15f401(0x11d)]&&this[_0x15f401(0xd2)][_0x15f401(0x132)](_0x51c5d3[_0x15f401(0x11d)]),_0x51c5d3[_0x15f401(0x12f)]){case v[_0x15f401(0xe9)]:break;case v['Reply']:{this['_threadCommentModel'][_0x15f401(0xf7)](_0x545aa6,_0x1df2d0,{'unitId':_0x545aa6,'subUnitId':_0x1df2d0,'ref':'','id':_0x51c5d3[_0x15f401(0xd8)],'dT':f(+_0x51c5d3[_0x15f401(0x10f)]),'threadId':_0x51c5d3[_0x15f401(0xf6)],'personId':(_0x309fd2=(_0x412f47=_0x51c5d3[_0x15f401(0x11d)])==null?void 0x0:_0x412f47['userID'])!=null?_0x309fd2:_0x51c5d3['userId'],'text':JSON['parse'](_0x51c5d3[_0x15f401(0x10d)]),'parentId':_0x383e2a['id']});break;}case v[_0x15f401(0x105)]:{const _0xbe11c4=this[_0x15f401(0x13e)][_0x15f401(0x101)](_0x545aa6,_0x1df2d0,_0x51c5d3[_0x15f401(0xd8)]);_0xbe11c4&&_0xbe11c4[_0x15f401(0x12a)]&&this[_0x15f401(0x13e)][_0x15f401(0xef)](_0x545aa6,_0x1df2d0,_0x51c5d3[_0x15f401(0xd8)]);break;}case v[_0x15f401(0xee)]:{this[_0x15f401(0x13e)][_0x15f401(0x131)](_0x545aa6,_0x1df2d0,{'commentId':_0x51c5d3[_0x15f401(0xd8)],'text':JSON['parse'](_0x51c5d3['content'])});break;}case v[_0x15f401(0x127)]:{const _0x17b61d=(_0x4f2c69=this[_0x15f401(0x13e)][_0x15f401(0x110)](_0x51c5d3[_0x15f401(0x133)])[_0x15f401(0xfb)](_0x28b666=>_0x28b666[_0x15f401(0xf6)]===_0x51c5d3[_0x15f401(0xf6)]))==null?void 0x0:_0x4f2c69[_0x15f401(0x112)];_0x17b61d&&this[_0x15f401(0x13e)][_0x15f401(0x122)](_0x545aa6,_0x1df2d0,_0x17b61d['id'],_0x51c5d3[_0x15f401(0x13d)]===I[_0x15f401(0x13a)]);break;}}}));}};_=E([S(0x0,c[_0x232800(0x12e)](b[_0x232800(0xd6)])),S(0x1,c[_0x232800(0x12e)](M[_0x232800(0xfe)])),S(0x2,c[_0x232800(0x12e)](c[_0x232800(0xe6)])),S(0x3,c[_0x232800(0x12e)](c[_0x232800(0x111)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x232800(0xed)],x=(_0x25e1f7,_0x19ebc5,_0x37e45d,_0x697cd1)=>{const _0x1d9d8e=_0x232800;for(var _0x3983df=_0x697cd1>0x1?void 0x0:_0x697cd1?A(_0x19ebc5,_0x37e45d):_0x19ebc5,_0x133e19=_0x25e1f7[_0x1d9d8e(0x115)]-0x1,_0x209105;_0x133e19>=0x0;_0x133e19--)(_0x209105=_0x25e1f7[_0x133e19])&&(_0x3983df=_0x209105(_0x3983df)||_0x3983df);return _0x3983df;},C=(_0x1821cc,_0x2de965)=>(_0x26bc5f,_0x138d15)=>_0x2de965(_0x26bc5f,_0x138d15,_0x1821cc);function Y(_0x506859,_0x526012){const _0x4aba2d=_0x232800,_0x2d6cfb=_0x506859[_0x4aba2d(0x11b)][0x0];return{..._0x526012,'id':_0x2d6cfb[_0x4aba2d(0xd8)],'resolved':_0x506859[_0x4aba2d(0x13d)]===0x1,'dT':f(_0x2d6cfb[_0x4aba2d(0x10f)]),'personId':_0x2d6cfb[_0x4aba2d(0x13f)],'threadId':_0x2d6cfb[_0x4aba2d(0xf6)]};}function _0x4da0(){const _0x717f59=['UNRECOGNIZED','symbol','COMMENT','Delete','_config','/universer-api/comment/unit/','IConfigService','dataSource','_commentService','_sessionService','HTTPService','content','getCurrentUser','createTimestamp','getUnit','Injector','root','ref','merge','length','customRanges','format','toStringTag','OpenOrReOpen','UniverCollaborationClientPlugin','replies','saveCommentToSnapshot','user','IThreadCommentDataSourceService','disposeWithMe','forEach','filter','resolveComment','comments','UniverThreadCommentUIPlugin','CollaborationSessionService','Reply','Solve','listComments','UniverInstanceType','parentId','bufferTime','get','post','Inject','type','comment','updateComment','addUser','unitId','resolved','1179486VtfshR','Disposable','5777450yQImSE','setConfig','20017778VbDsIh','Solved','dayjs','_init','solved','_threadCommentModel','userId','3061972TnSrpo','_initDataSource','16818paLjYF','subscribe','users','defineProperty','error','/list','getMemberID','20xnbEGi','DependentOn','_httpService','code','/delete','_injector','pluginName','_userService','21XOVSAW','getUser','UniverLicensePlugin','CommentService','CustomRangeType','replyId','/solved','Module','onReady','add','syncUpdateMutationToColla','pipe','/add','Plugin','slice','_threadCommentDataSource','_initUserSync','commentUpdate$','4405730QDOloJ','UserManagerService','map','_threadCommentDataSourceService','Add','UniverThreadCommentDataSourcePlugin','/edit','/reply','getOwnPropertyDescriptor','Edit','deleteComment','YYYY/MM/DD\x20HH:mm','requireSession','_configService','UNIVER_UNKNOWN','parse','rangeId','threadId','addComment','Unknown','stringify','8EEcovH','find','body','165262Ryzjsf','ThreadCommentModel','6LtUnDY','rangeType','getComment'];_0x4da0=function(){return _0x717f59;};return _0x4da0();}function G(_0x5ab6b5,_0x477dcd,_0x38dbd8){const _0x570768=_0x232800;var _0x205fd0,_0x14f7e5;if(((_0x14f7e5=(_0x205fd0=_0x5ab6b5==null?void 0x0:_0x5ab6b5['replies'])==null?void 0x0:_0x205fd0[_0x570768(0x115)])!=null?_0x14f7e5:0x0)>0x0){const _0x1e73f4=(_0x1a2bd3,_0x2b1e5d)=>({'id':_0x1a2bd3[_0x570768(0xd8)],'threadId':_0x1a2bd3[_0x570768(0xf6)],'dT':f(_0x1a2bd3[_0x570768(0x10f)]),'personId':_0x1a2bd3[_0x570768(0x13f)],'resolved':_0x5ab6b5['solved']===I['Solved'],'unitId':_0x477dcd,'subUnitId':_0x38dbd8,'text':JSON[_0x570768(0xf4)](_0x1a2bd3['content']),'parentId':_0x2b1e5d}),_0x5e9e44=_0x1e73f4(_0x5ab6b5[_0x570768(0x11b)][0x0]);return{..._0x5e9e44,'children':_0x5ab6b5[_0x570768(0x11b)][_0x570768(0xe1)](0x1)[_0x570768(0xe7)](_0x2787c8=>_0x1e73f4(_0x2787c8,_0x5e9e44['id']))};}return null;}let p=class{constructor(_0xd98f83,_0x384ffb,_0x32addd){const _0x35c11c=_0x232800;this[_0x35c11c(0x14b)]=_0xd98f83,this[_0x35c11c(0xd2)]=_0x384ffb,this[_0x35c11c(0x10b)]=_0x32addd;}async[_0x232800(0xf7)](_0x52c3a5){const _0x21b70e=_0x232800;var _0x2d6257,_0x1a8319;const {parentId:_0x44dc39,unitId:_0x1c2efe,text:_0x2a0e21,threadId:_0x266f95}=_0x52c3a5,_0x58d29e=(_0x1a8319=(_0x2d6257=_0x2a0e21[_0x21b70e(0x116)])==null?void 0x0:_0x2d6257[_0x21b70e(0x121)](_0x434278=>_0x434278[_0x21b70e(0x100)]===c[_0x21b70e(0xd7)][_0x21b70e(0x104)])[_0x21b70e(0xe7)](_0x234003=>_0x234003[_0x21b70e(0xf5)]))!=null?_0x1a8319:[],_0x5da659=JSON[_0x21b70e(0xf9)](_0x2a0e21),_0x312697=(await this[_0x21b70e(0x10b)]['requireSession'](_0x1c2efe))['getMemberID']();if(_0x44dc39){const _0x535cb2={'memberId':_0x312697,'unitId':_0x1c2efe,'content':_0x5da659,'mention':_0x58d29e,'threadId':_0x266f95},_0x2143ca=(await this['_httpService'][_0x21b70e(0x12d)](_0x21b70e(0x107)+_0x1c2efe+_0x21b70e(0xec),{'body':_0x535cb2}))[_0x21b70e(0xfc)]['reply'];return{..._0x52c3a5,'id':_0x2143ca[_0x21b70e(0xd8)],'dT':c[_0x21b70e(0x13b)](+_0x2143ca[_0x21b70e(0x10f)])[_0x21b70e(0x117)](_0x21b70e(0xf0)),'personId':_0x2143ca[_0x21b70e(0x13f)]};}else{const _0x460dad={'memberId':_0x312697,'unitId':_0x1c2efe,'content':_0x5da659,'mention':_0x58d29e},_0xb84c0e=await this[_0x21b70e(0x14b)][_0x21b70e(0x12d)](_0x21b70e(0x107)+_0x1c2efe+_0x21b70e(0xdf),{'body':_0x460dad});return Y(_0xb84c0e[_0x21b70e(0xfc)][_0x21b70e(0x130)],_0x52c3a5);}}async[_0x232800(0x131)](_0xbe2287){const _0x25bd2c=_0x232800;var _0x2bb2a3,_0x20c21c;const {text:_0x25d993,unitId:_0x54e56e}=_0xbe2287,_0x843773=(_0x20c21c=(_0x2bb2a3=_0x25d993['customRanges'])==null?void 0x0:_0x2bb2a3[_0x25bd2c(0x121)](_0x25a29e=>_0x25a29e[_0x25bd2c(0x100)]===c[_0x25bd2c(0xd7)][_0x25bd2c(0x104)])[_0x25bd2c(0xe7)](_0x5b02f1=>_0x5b02f1['rangeId']))!=null?_0x20c21c:[],_0x25ade0=JSON[_0x25bd2c(0xf9)](_0x25d993),_0x35ad10=_0xbe2287['threadId'],_0x1a38ca=_0xbe2287['id'],_0x335074={'memberId':(await this[_0x25bd2c(0x10b)][_0x25bd2c(0xf1)](_0x54e56e))[_0x25bd2c(0x148)](),'unitId':_0x54e56e,'threadId':_0x35ad10,'mention':_0x843773,'content':_0x25ade0,'replyId':_0x1a38ca},_0x5731cc=await this[_0x25bd2c(0x14b)]['post'](_0x25bd2c(0x107)+_0x54e56e+_0x25bd2c(0xeb),{'body':_0x335074});return!_0x5731cc[_0x25bd2c(0xfc)][_0x25bd2c(0x146)]||_0x5731cc[_0x25bd2c(0xfc)][_0x25bd2c(0x146)][_0x25bd2c(0xce)]===0x1;}async[_0x232800(0x122)](_0x139b71){const _0x39aa16=_0x232800,{unitId:_0x3941fc}=_0x139b71,_0x2d335c=_0x139b71[_0x39aa16(0xf6)],_0xc46bbc={'memberId':this[_0x39aa16(0xd2)][_0x39aa16(0x10e)]()['userID'],'unitId':_0x3941fc,'threadId':_0x2d335c,'solved':_0x139b71[_0x39aa16(0x134)]?I[_0x39aa16(0x13a)]:I[_0x39aa16(0x119)]},_0x2d656c=await this[_0x39aa16(0x14b)][_0x39aa16(0x12d)](_0x39aa16(0x107)+_0x3941fc+_0x39aa16(0xd9),{'body':_0xc46bbc});return!_0x2d656c[_0x39aa16(0xfc)][_0x39aa16(0x146)]||_0x2d656c['body'][_0x39aa16(0x146)][_0x39aa16(0xce)]===0x1;}async[_0x232800(0xef)](_0x3f6177,_0x53d5b3,_0x3c6c4d,_0x3dac18){const _0x41dc85=_0x232800,_0x13680a={'memberId':(await this[_0x41dc85(0x10b)][_0x41dc85(0xf1)](_0x3f6177))[_0x41dc85(0x148)](),'threadId':_0x3c6c4d,'replyId':_0x3dac18,'unitId':_0x3f6177},_0x2c8d20=await this[_0x41dc85(0x14b)]['post'](_0x41dc85(0x107)+_0x3f6177+_0x41dc85(0xcf),{'body':_0x13680a});return!_0x2c8d20[_0x41dc85(0xfc)][_0x41dc85(0x146)]||_0x2c8d20[_0x41dc85(0xfc)]['error']['code']===0x1;}async[_0x232800(0x128)](_0xd81062,_0x369037,_0x37f49b){const _0x46dff5=_0x232800,_0x54c628={'unitId':_0xd81062,'threadId':_0x37f49b},_0x17646f=await this['_httpService'][_0x46dff5(0x12d)](_0x46dff5(0x107)+_0xd81062+_0x46dff5(0x147),{'body':_0x54c628}),_0x432580=_0x37f49b['map'](_0x4f6392=>G(_0x17646f[_0x46dff5(0xfc)][_0x46dff5(0x123)][_0x4f6392],_0xd81062,_0x369037))[_0x46dff5(0x121)](Boolean);return Object['values'](_0x17646f['body'][_0x46dff5(0x144)])['forEach'](_0x2d3203=>{const _0x28521a=_0x46dff5;this['_userService'][_0x28521a(0x132)](_0x2d3203);}),_0x432580;}[_0x232800(0x11c)](_0x28246f){const _0x14ac55=_0x232800;return{'id':_0x28246f['id'],'threadId':_0x28246f[_0x14ac55(0xf6)],'ref':_0x28246f[_0x14ac55(0x113)]};}};function _0x2f6c(_0x308771,_0x63d342){const _0x4da0f0=_0x4da0();return _0x2f6c=function(_0x2f6cce,_0x165cbc){_0x2f6cce=_0x2f6cce-0xce;let _0x11983f=_0x4da0f0[_0x2f6cce];return _0x11983f;},_0x2f6c(_0x308771,_0x63d342);}p=x([C(0x0,c[_0x232800(0x12e)](P[_0x232800(0x10c)])),C(0x1,c[_0x232800(0x12e)](c[_0x232800(0xe6)])),C(0x2,c[_0x232800(0x12e)](b[_0x232800(0x125)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x5d588e,_0x19c714,_0x16a5a3,_0x40004e)=>{const _0x4aef67=_0x232800;for(var _0x27d31d=_0x40004e>0x1?void 0x0:_0x40004e?H(_0x19c714,_0x16a5a3):_0x19c714,_0x48607d=_0x5d588e[_0x4aef67(0x115)]-0x1,_0x28f728;_0x48607d>=0x0;_0x48607d--)(_0x28f728=_0x5d588e[_0x48607d])&&(_0x27d31d=_0x28f728(_0x27d31d)||_0x27d31d);return _0x27d31d;},y=(_0x218727,_0x59bce8)=>(_0xd91f64,_0x5f4857)=>_0x59bce8(_0xd91f64,_0x5f4857,_0x218727);let g=class extends c[_0x232800(0x136)]{constructor(_0x3fd8dc,_0x5dc067){const _0x47eee9=_0x232800;super(),this[_0x47eee9(0xe8)]=_0x3fd8dc,this['_threadCommentDataSource']=_0x5dc067,this['_initDataSource']();}[_0x232800(0x141)](){const _0xcf11d9=_0x232800;this['_threadCommentDataSourceService'][_0xcf11d9(0x109)]=this[_0xcf11d9(0xe2)],this['_threadCommentDataSourceService'][_0xcf11d9(0xdd)]=!0x1;}};g=J([y(0x0,M[_0x232800(0x11e)]),y(0x1,c[_0x232800(0x12e)](p))],g);var F=Object[_0x232800(0x145)],L=Object[_0x232800(0xed)],Z=(_0x5283f9,_0x2b3b3f,_0x42b621)=>_0x2b3b3f in _0x5283f9?F(_0x5283f9,_0x2b3b3f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x42b621}):_0x5283f9[_0x2b3b3f]=_0x42b621,W=(_0x1e8ee3,_0x2de0a7,_0xdd8b2f,_0x3a9f2b)=>{const _0x5694b0=_0x232800;for(var _0x3ea703=_0x3a9f2b>0x1?void 0x0:_0x3a9f2b?L(_0x2de0a7,_0xdd8b2f):_0x2de0a7,_0x3f33b7=_0x1e8ee3[_0x5694b0(0x115)]-0x1,_0x37b398;_0x3f33b7>=0x0;_0x3f33b7--)(_0x37b398=_0x1e8ee3[_0x3f33b7])&&(_0x3ea703=_0x37b398(_0x3ea703)||_0x3ea703);return _0x3ea703;},O=(_0x1f4802,_0x4ed76f)=>(_0x4f7ff6,_0x1f2db6)=>_0x4ed76f(_0x4f7ff6,_0x1f2db6,_0x1f4802),N=(_0x354e25,_0x1ef61d,_0x59fe12)=>Z(_0x354e25,typeof _0x1ef61d!=_0x232800(0x103)?_0x1ef61d+'':_0x1ef61d,_0x59fe12);exports[_0x232800(0xea)]=class extends c[_0x232800(0xe0)]{constructor(_0x5c7f8b=D,_0x2d27bc,_0x4270e6){const _0x4602b9=_0x232800;super(),this[_0x4602b9(0x106)]=_0x5c7f8b,this[_0x4602b9(0xd0)]=_0x2d27bc,this[_0x4602b9(0xf2)]=_0x4270e6;const {..._0x296edd}=c[_0x4602b9(0x114)]({},D,this[_0x4602b9(0x106)]);this[_0x4602b9(0xf2)][_0x4602b9(0x138)](q,_0x296edd);}['onStarting'](){const _0x29ead1=_0x232800;[[p],[g],[_]][_0x29ead1(0x120)](_0x311977=>{const _0x4ba5f9=_0x29ead1;this[_0x4ba5f9(0xd0)]['add'](_0x311977);});}[_0x232800(0xdb)](){const _0x22b8b8=_0x232800;this[_0x22b8b8(0xd0)][_0x22b8b8(0x12c)](g),this['_injector'][_0x22b8b8(0x12c)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x232800(0xd1),U),N(exports[_0x232800(0xea)],_0x232800(0x12f),c[_0x232800(0x129)][_0x232800(0xf3)]),exports[_0x232800(0xea)]=W([c[_0x232800(0x14a)](w[_0x232800(0x124)],b[_0x232800(0x11a)],T[_0x232800(0xd5)]),O(0x1,c[_0x232800(0x12e)](c[_0x232800(0x111)])),O(0x2,c[_0x232800(0x108)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4be5b3=_0x1a8d;(function(_0x344bd3,_0x3af6ac){const _0x39c542=_0x1a8d,_0x11c253=_0x344bd3();while(!![]){try{const _0x217d4e=-parseInt(_0x39c542(0x18d))/0x1*(-parseInt(_0x39c542(0x1ea))/0x2)+parseInt(_0x39c542(0x1a5))/0x3*(parseInt(_0x39c542(0x1b9))/0x4)+-parseInt(_0x39c542(0x1bc))/0x5+-parseInt(_0x39c542(0x1a9))/0x6+parseInt(_0x39c542(0x1d6))/0x7*(-parseInt(_0x39c542(0x1c8))/0x8)+-parseInt(_0x39c542(0x1a4))/0x9*(-parseInt(_0x39c542(0x1c7))/0xa)+parseInt(_0x39c542(0x1ba))/0xb*(parseInt(_0x39c542(0x1af))/0xc);if(_0x217d4e===_0x3af6ac)break;else _0x11c253['push'](_0x11c253['shift']());}catch(_0x266e2c){_0x11c253['push'](_0x11c253['shift']());}}}(_0x34cc,0x464c5));import{CommentService as _0x3e43f1,CollaborationSessionService as _0x26789c,UniverCollaborationClientPlugin as _0x632fbe}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4dad28}from'@univerjs-pro/license';import{dayjs as _0x36859c,UserManagerService as _0x394c60,Inject as _0x33e49e,Injector as _0x36e64b,Disposable as _0x55890b,CustomRangeType as _0x1616aa,UniverInstanceType as _0x471339,DependentOn as _0x41b532,IConfigService as _0x707352,Plugin as _0x4bb65f,merge as _0x5765b9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2b0062}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x242492,IThreadCommentDataSourceService as _0x1fe3bb}from'@univerjs/thread-comment';import{bufferTime as _0x4ed255}from'rxjs';import{HTTPService as _0x480aa6}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x77b600=>(_0x77b600[_0x77b600[_0x4be5b3(0x1d3)]=0x0]=_0x4be5b3(0x1d3),_0x77b600[_0x77b600['Solved']=0x1]='Solved',_0x77b600[_0x77b600[_0x4be5b3(0x18b)]=-0x1]=_0x4be5b3(0x18b),_0x77b600))(I||{}),v=(_0x283d3f=>(_0x283d3f[_0x283d3f[_0x4be5b3(0x189)]=0x0]=_0x4be5b3(0x189),_0x283d3f[_0x283d3f[_0x4be5b3(0x1d8)]=0x1]=_0x4be5b3(0x1d8),_0x283d3f[_0x283d3f[_0x4be5b3(0x193)]=0x2]=_0x4be5b3(0x193),_0x283d3f[_0x283d3f[_0x4be5b3(0x1b2)]=0x3]='Edit',_0x283d3f[_0x283d3f[_0x4be5b3(0x194)]=0x4]='Delete',_0x283d3f[_0x283d3f[_0x4be5b3(0x1e8)]=0x5]='Solve',_0x283d3f[_0x283d3f[_0x4be5b3(0x18b)]=-0x1]='UNRECOGNIZED',_0x283d3f))(v||{});const y=_0x2313d9=>_0x36859c(new Date(+_0x2313d9))[_0x4be5b3(0x1e2)](_0x4be5b3(0x1b7)),B=async(_0x1ac2c1,_0x41cd9a)=>{const _0x46f118=_0x4be5b3,_0x3e008d=_0x1ac2c1[_0x46f118(0x1ad)](_0x394c60),_0x5d07bb=_0x1ac2c1['get'](_0x480aa6);_0x41cd9a['forEach'](_0x57a124=>{_0x3e008d['getUser'](_0x57a124)&&_0x41cd9a['delete'](_0x57a124);}),_0x41cd9a['size']&&(await _0x5d07bb[_0x46f118(0x1ad)](_0x46f118(0x18a),{'params':{'userIDs':[..._0x41cd9a]}}))[_0x46f118(0x1eb)][_0x46f118(0x197)][_0x46f118(0x1e3)](_0x3a3d11=>{const _0x487a1b=_0x46f118;_0x3a3d11&&_0x3e008d[_0x487a1b(0x1d9)](_0x3a3d11);});};var K=Object[_0x4be5b3(0x1a0)],V=(_0x5405d2,_0x226810,_0xdca34a,_0x43127a)=>{const _0x2599da=_0x4be5b3;for(var _0x451077=_0x43127a>0x1?void 0x0:_0x43127a?K(_0x226810,_0xdca34a):_0x226810,_0x2fcadc=_0x5405d2[_0x2599da(0x1d4)]-0x1,_0x5a4b73;_0x2fcadc>=0x0;_0x2fcadc--)(_0x5a4b73=_0x5405d2[_0x2fcadc])&&(_0x451077=_0x5a4b73(_0x451077)||_0x451077);return _0x451077;},p=(_0x303215,_0x3dd8e8)=>(_0x38c83e,_0x1b3da2)=>_0x3dd8e8(_0x38c83e,_0x1b3da2,_0x303215);let _=class extends _0x55890b{constructor(_0xe30f39,_0x2ca75e,_0x56abdc,_0x463d97){const _0x5e9af6=_0x4be5b3;super(),this['_commentService']=_0xe30f39,this[_0x5e9af6(0x1c9)]=_0x2ca75e,this[_0x5e9af6(0x1a7)]=_0x56abdc,this['_injector']=_0x463d97,this[_0x5e9af6(0x1aa)](),this[_0x5e9af6(0x1da)]();}['_initUserSync'](){const _0x5ba8d9=_0x4be5b3;this['disposeWithMe'](this[_0x5ba8d9(0x1c9)][_0x5ba8d9(0x18f)][_0x5ba8d9(0x1de)](_0x4ed255(0x10))[_0x5ba8d9(0x1ca)](_0x1353a3=>{const _0x35f7b5=new Set();_0x1353a3['forEach'](_0x7dca46=>{const _0x3f33fe=_0x1a8d;switch(_0x7dca46['type']){case _0x3f33fe(0x1bf):{const _0x45ea17=_0x7dca46[_0x3f33fe(0x1e9)]['personId'];_0x35f7b5[_0x3f33fe(0x1bf)](_0x45ea17);break;}}}),B(this['_injector'],_0x35f7b5);}));}[_0x4be5b3(0x1aa)](){const _0x5ceba0=_0x4be5b3;this[_0x5ceba0(0x18c)](this['_commentService'][_0x5ceba0(0x18f)][_0x5ceba0(0x1ca)](async _0x17d0a5=>{const _0x825e42=_0x5ceba0;var _0x4a3781,_0x5c7ea2,_0x207b7b,_0x436de2;const _0x1cfa86=(_0x4a3781=this[_0x825e42(0x1c9)][_0x825e42(0x1d1)](_0x17d0a5[_0x825e42(0x1d5)])['find'](_0x498a34=>_0x498a34[_0x825e42(0x1ae)]===_0x17d0a5['threadId']))==null?void 0x0:_0x4a3781[_0x825e42(0x1b5)];if(!_0x1cfa86)return;const {unitId:_0x151a2f,subUnitId:_0x532867}=_0x1cfa86;switch(_0x17d0a5[_0x825e42(0x1c1)]&&this[_0x825e42(0x1a7)]['addUser'](_0x17d0a5[_0x825e42(0x1c1)]),_0x17d0a5[_0x825e42(0x190)]){case v['Add']:break;case v[_0x825e42(0x193)]:{this[_0x825e42(0x1c9)]['addComment'](_0x151a2f,_0x532867,{'unitId':_0x151a2f,'subUnitId':_0x532867,'ref':'','id':_0x17d0a5['replyId'],'dT':y(+_0x17d0a5['createTimestamp']),'threadId':_0x17d0a5[_0x825e42(0x1ae)],'personId':(_0x207b7b=(_0x5c7ea2=_0x17d0a5[_0x825e42(0x1c1)])==null?void 0x0:_0x5c7ea2['userID'])!=null?_0x207b7b:_0x17d0a5[_0x825e42(0x1dc)],'text':JSON[_0x825e42(0x1b4)](_0x17d0a5[_0x825e42(0x1d0)]),'parentId':_0x1cfa86['id']});break;}case v[_0x825e42(0x194)]:{const _0x3d4d65=this[_0x825e42(0x1c9)][_0x825e42(0x1a3)](_0x151a2f,_0x532867,_0x17d0a5['replyId']);_0x3d4d65&&_0x3d4d65[_0x825e42(0x1cd)]&&this[_0x825e42(0x1c9)][_0x825e42(0x1df)](_0x151a2f,_0x532867,_0x17d0a5[_0x825e42(0x1cb)]);break;}case v[_0x825e42(0x1b2)]:{this['_threadCommentModel']['updateComment'](_0x151a2f,_0x532867,{'commentId':_0x17d0a5[_0x825e42(0x1cb)],'text':JSON['parse'](_0x17d0a5[_0x825e42(0x1d0)])});break;}case v[_0x825e42(0x1e8)]:{const _0x3e084f=(_0x436de2=this[_0x825e42(0x1c9)][_0x825e42(0x1d1)](_0x17d0a5['unitId'])[_0x825e42(0x1bb)](_0xe3db71=>_0xe3db71[_0x825e42(0x1ae)]===_0x17d0a5['threadId']))==null?void 0x0:_0x436de2['root'];_0x3e084f&&this[_0x825e42(0x1c9)][_0x825e42(0x195)](_0x151a2f,_0x532867,_0x3e084f['id'],_0x17d0a5[_0x825e42(0x1a2)]===I[_0x825e42(0x1c6)]);break;}}}));}};_=V([p(0x0,_0x33e49e(_0x3e43f1)),p(0x1,_0x33e49e(_0x242492)),p(0x2,_0x33e49e(_0x394c60)),p(0x3,_0x33e49e(_0x36e64b))],_);const z='thread-comment-data-source.config',O={};function _0x1a8d(_0x32b13c,_0x1138f8){const _0x34ccdc=_0x34cc();return _0x1a8d=function(_0x1a8dc3,_0x517058){_0x1a8dc3=_0x1a8dc3-0x189;let _0x2d137a=_0x34ccdc[_0x1a8dc3];return _0x2d137a;},_0x1a8d(_0x32b13c,_0x1138f8);}var k=Object['getOwnPropertyDescriptor'],Q=(_0x40aeba,_0x400b51,_0x44a011,_0x403705)=>{for(var _0x1cfc60=_0x403705>0x1?void 0x0:_0x403705?k(_0x400b51,_0x44a011):_0x400b51,_0x37750b=_0x40aeba['length']-0x1,_0x11c5cf;_0x37750b>=0x0;_0x37750b--)(_0x11c5cf=_0x40aeba[_0x37750b])&&(_0x1cfc60=_0x11c5cf(_0x1cfc60)||_0x1cfc60);return _0x1cfc60;},b=(_0x329240,_0x57f6e9)=>(_0x508c6d,_0x4158c4)=>_0x57f6e9(_0x508c6d,_0x4158c4,_0x329240);function X(_0x5c1ee7,_0x5e2bce){const _0xd9b56f=_0x4be5b3,_0x4058a0=_0x5c1ee7[_0xd9b56f(0x1b0)][0x0];return{..._0x5e2bce,'id':_0x4058a0[_0xd9b56f(0x1cb)],'resolved':_0x5c1ee7[_0xd9b56f(0x1a2)]===0x1,'dT':y(_0x4058a0[_0xd9b56f(0x1c4)]),'personId':_0x4058a0[_0xd9b56f(0x1dc)],'threadId':_0x4058a0[_0xd9b56f(0x1ae)]};}function ee(_0x1657ee,_0x538f54,_0x5efc50){const _0x50adf8=_0x4be5b3;var _0x8c08bf,_0x5615c0;if(((_0x5615c0=(_0x8c08bf=_0x1657ee==null?void 0x0:_0x1657ee[_0x50adf8(0x1b0)])==null?void 0x0:_0x8c08bf['length'])!=null?_0x5615c0:0x0)>0x0){const _0x56810b=(_0x263b5f,_0x162537)=>({'id':_0x263b5f['replyId'],'threadId':_0x263b5f[_0x50adf8(0x1ae)],'dT':y(_0x263b5f[_0x50adf8(0x1c4)]),'personId':_0x263b5f[_0x50adf8(0x1dc)],'resolved':_0x1657ee['solved']===I[_0x50adf8(0x1c6)],'unitId':_0x538f54,'subUnitId':_0x5efc50,'text':JSON[_0x50adf8(0x1b4)](_0x263b5f['content']),'parentId':_0x162537}),_0x293a85=_0x56810b(_0x1657ee[_0x50adf8(0x1b0)][0x0]);return{..._0x293a85,'children':_0x1657ee[_0x50adf8(0x1b0)][_0x50adf8(0x19a)](0x1)[_0x50adf8(0x198)](_0x99d8cf=>_0x56810b(_0x99d8cf,_0x293a85['id']))};}return null;}let S=class{constructor(_0x40c14a,_0x5ce7d5,_0x55de4b){const _0x123821=_0x4be5b3;this[_0x123821(0x1d7)]=_0x40c14a,this[_0x123821(0x1a7)]=_0x5ce7d5,this[_0x123821(0x19f)]=_0x55de4b;}async['addComment'](_0x58c55d){const _0x45ceed=_0x4be5b3;var _0x3e12b6,_0x1e052c;const {parentId:_0x4df7d4,unitId:_0x591586,text:_0x43494a,threadId:_0x2bf97a}=_0x58c55d,_0x3c88dd=(_0x1e052c=(_0x3e12b6=_0x43494a['customRanges'])==null?void 0x0:_0x3e12b6[_0x45ceed(0x1bd)](_0x340868=>_0x340868['rangeType']===_0x1616aa[_0x45ceed(0x1e7)])[_0x45ceed(0x198)](_0x22f17f=>_0x22f17f[_0x45ceed(0x18e)]))!=null?_0x1e052c:[],_0x3d9c9c=JSON[_0x45ceed(0x1c3)](_0x43494a),_0x2e9da5=(await this[_0x45ceed(0x19f)][_0x45ceed(0x1a1)](_0x591586))[_0x45ceed(0x19b)]();if(_0x4df7d4){const _0x17a410={'memberId':_0x2e9da5,'unitId':_0x591586,'content':_0x3d9c9c,'mention':_0x3c88dd,'threadId':_0x2bf97a},_0x5c5879=(await this[_0x45ceed(0x1d7)][_0x45ceed(0x1e5)]('/universer-api/comment/unit/'+_0x591586+'/reply',{'body':_0x17a410}))[_0x45ceed(0x1eb)]['reply'];return{..._0x58c55d,'id':_0x5c5879[_0x45ceed(0x1cb)],'dT':_0x36859c(+_0x5c5879[_0x45ceed(0x1c4)])[_0x45ceed(0x1e2)](_0x45ceed(0x1b7)),'personId':_0x5c5879['userId']};}else{const _0x4422dd={'memberId':_0x2e9da5,'unitId':_0x591586,'content':_0x3d9c9c,'mention':_0x3c88dd},_0x4a9ec9=await this[_0x45ceed(0x1d7)][_0x45ceed(0x1e5)](_0x45ceed(0x1a6)+_0x591586+_0x45ceed(0x19d),{'body':_0x4422dd});return X(_0x4a9ec9[_0x45ceed(0x1eb)]['comment'],_0x58c55d);}}async[_0x4be5b3(0x1e6)](_0x1ac0dd){const _0x24cc5b=_0x4be5b3;var _0x5200cc,_0x16fc21;const {text:_0x68b12e,unitId:_0x3adde9}=_0x1ac0dd,_0x14adf6=(_0x16fc21=(_0x5200cc=_0x68b12e['customRanges'])==null?void 0x0:_0x5200cc['filter'](_0x18f2cb=>_0x18f2cb[_0x24cc5b(0x1e4)]===_0x1616aa[_0x24cc5b(0x1e7)])[_0x24cc5b(0x198)](_0x2aff4c=>_0x2aff4c[_0x24cc5b(0x18e)]))!=null?_0x16fc21:[],_0x27d2a3=JSON[_0x24cc5b(0x1c3)](_0x68b12e),_0x213781=_0x1ac0dd['threadId'],_0x110ae8=_0x1ac0dd['id'],_0x2e7412={'memberId':(await this[_0x24cc5b(0x19f)]['requireSession'](_0x3adde9))[_0x24cc5b(0x19b)](),'unitId':_0x3adde9,'threadId':_0x213781,'mention':_0x14adf6,'content':_0x27d2a3,'replyId':_0x110ae8},_0x1541fc=await this[_0x24cc5b(0x1d7)]['post'](_0x24cc5b(0x1a6)+_0x3adde9+'/edit',{'body':_0x2e7412});return!_0x1541fc['body'][_0x24cc5b(0x1ce)]||_0x1541fc[_0x24cc5b(0x1eb)][_0x24cc5b(0x1ce)][_0x24cc5b(0x1e1)]===0x1;}async[_0x4be5b3(0x195)](_0x179726){const _0x272026=_0x4be5b3,{unitId:_0x50c08e}=_0x179726,_0x385703=_0x179726['threadId'],_0x1b930c={'memberId':this[_0x272026(0x1a7)]['getCurrentUser']()['userID'],'unitId':_0x50c08e,'threadId':_0x385703,'solved':_0x179726[_0x272026(0x1ac)]?I[_0x272026(0x1c6)]:I[_0x272026(0x1d3)]},_0x21a1d2=await this[_0x272026(0x1d7)]['post']('/universer-api/comment/unit/'+_0x50c08e+_0x272026(0x1cc),{'body':_0x1b930c});return!_0x21a1d2[_0x272026(0x1eb)][_0x272026(0x1ce)]||_0x21a1d2[_0x272026(0x1eb)]['error']['code']===0x1;}async[_0x4be5b3(0x1df)](_0x5311c1,_0x50d0ac,_0x23524e,_0x456054){const _0x1654f0=_0x4be5b3,_0x31f401={'memberId':(await this[_0x1654f0(0x19f)][_0x1654f0(0x1a1)](_0x5311c1))[_0x1654f0(0x19b)](),'threadId':_0x23524e,'replyId':_0x456054,'unitId':_0x5311c1},_0xb13796=await this['_httpService'][_0x1654f0(0x1e5)](_0x1654f0(0x1a6)+_0x5311c1+_0x1654f0(0x1be),{'body':_0x31f401});return!_0xb13796[_0x1654f0(0x1eb)][_0x1654f0(0x1ce)]||_0xb13796['body'][_0x1654f0(0x1ce)][_0x1654f0(0x1e1)]===0x1;}async[_0x4be5b3(0x1c5)](_0x3f4fd1,_0x1b4c5f,_0x3308c7){const _0x23955b=_0x4be5b3,_0x24d00c={'unitId':_0x3f4fd1,'threadId':_0x3308c7},_0x3cd45a=await this['_httpService']['post'](_0x23955b(0x1a6)+_0x3f4fd1+_0x23955b(0x1c2),{'body':_0x24d00c}),_0x211e1f=_0x3308c7[_0x23955b(0x198)](_0x5578ac=>ee(_0x3cd45a[_0x23955b(0x1eb)][_0x23955b(0x1b1)][_0x5578ac],_0x3f4fd1,_0x1b4c5f))[_0x23955b(0x1bd)](Boolean);return Object[_0x23955b(0x191)](_0x3cd45a['body'][_0x23955b(0x197)])[_0x23955b(0x1e3)](_0x4d0b71=>{const _0x4c417c=_0x23955b;this[_0x4c417c(0x1a7)][_0x4c417c(0x1d9)](_0x4d0b71);}),_0x211e1f;}[_0x4be5b3(0x1b3)](_0x5eacf1){const _0x1d83bc=_0x4be5b3;return{'id':_0x5eacf1['id'],'threadId':_0x5eacf1['threadId'],'ref':_0x5eacf1[_0x1d83bc(0x1d2)]};}};S=Q([b(0x0,_0x33e49e(_0x480aa6)),b(0x1,_0x33e49e(_0x394c60)),b(0x2,_0x33e49e(_0x26789c))],S);var re=Object[_0x4be5b3(0x1a0)],te=(_0x338c07,_0x46c708,_0x7f2c61,_0x3945d9)=>{for(var _0x35d075=_0x3945d9>0x1?void 0x0:_0x3945d9?re(_0x46c708,_0x7f2c61):_0x46c708,_0xd66b61=_0x338c07['length']-0x1,_0x450687;_0xd66b61>=0x0;_0xd66b61--)(_0x450687=_0x338c07[_0xd66b61])&&(_0x35d075=_0x450687(_0x35d075)||_0x35d075);return _0x35d075;},M=(_0x9e05aa,_0x479a0c)=>(_0x497713,_0xf4d726)=>_0x479a0c(_0x497713,_0xf4d726,_0x9e05aa);let f=class extends _0x55890b{constructor(_0xb27e14,_0x1635f6){const _0x560b61=_0x4be5b3;super(),this[_0x560b61(0x19e)]=_0xb27e14,this[_0x560b61(0x1cf)]=_0x1635f6,this[_0x560b61(0x199)]();}[_0x4be5b3(0x199)](){const _0x4f9ec1=_0x4be5b3;this[_0x4f9ec1(0x19e)][_0x4f9ec1(0x1a8)]=this[_0x4f9ec1(0x1cf)],this[_0x4f9ec1(0x19e)][_0x4f9ec1(0x1db)]=!0x1;}};f=te([M(0x0,_0x1fe3bb),M(0x1,_0x33e49e(S))],f);var se=Object[_0x4be5b3(0x1b8)],oe=Object[_0x4be5b3(0x1a0)],ne=(_0x5b557e,_0xd09fd3,_0x3b826a)=>_0xd09fd3 in _0x5b557e?se(_0x5b557e,_0xd09fd3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b826a}):_0x5b557e[_0xd09fd3]=_0x3b826a,ie=(_0x323644,_0x58a8ed,_0x392cd8,_0x102a56)=>{const _0x2502fc=_0x4be5b3;for(var _0x46a692=_0x102a56>0x1?void 0x0:_0x102a56?oe(_0x58a8ed,_0x392cd8):_0x58a8ed,_0x2d6fe4=_0x323644[_0x2502fc(0x1d4)]-0x1,_0x7a68ff;_0x2d6fe4>=0x0;_0x2d6fe4--)(_0x7a68ff=_0x323644[_0x2d6fe4])&&(_0x46a692=_0x7a68ff(_0x46a692)||_0x46a692);return _0x46a692;},N=(_0x43564b,_0x400142)=>(_0x1688dc,_0x4c6459)=>_0x400142(_0x1688dc,_0x4c6459,_0x43564b),$=(_0xf48b47,_0x1caab6,_0x12f446)=>ne(_0xf48b47,typeof _0x1caab6!=_0x4be5b3(0x196)?_0x1caab6+'':_0x1caab6,_0x12f446);let g=class extends _0x4bb65f{constructor(_0xc5acac=O,_0x32b2fb,_0x47878b){const _0x3feb41=_0x4be5b3;super(),this[_0x3feb41(0x1e0)]=_0xc5acac,this['_injector']=_0x32b2fb,this['_configService']=_0x47878b;const {..._0x2415cd}=_0x5765b9({},O,this[_0x3feb41(0x1e0)]);this[_0x3feb41(0x192)][_0x3feb41(0x1ab)](z,_0x2415cd);}[_0x4be5b3(0x1b6)](){[[S],[f],[_]]['forEach'](_0x3de745=>{const _0x4f6067=_0x1a8d;this[_0x4f6067(0x1dd)]['add'](_0x3de745);});}[_0x4be5b3(0x19c)](){const _0x3cbe5d=_0x4be5b3;this[_0x3cbe5d(0x1dd)][_0x3cbe5d(0x1ad)](f),this[_0x3cbe5d(0x1dd)][_0x3cbe5d(0x1ad)](_);}};function _0x34cc(){const _0x181439=['forEach','rangeType','post','updateComment','COMMENT','Solve','payload','424884abwKZI','body','Unknown','/universer-api/user/list','UNRECOGNIZED','disposeWithMe','2NDMHQz','rangeId','commentUpdate$','type','values','_configService','Reply','Delete','resolveComment','symbol','users','map','_initDataSource','slice','getMemberID','onReady','/add','_threadCommentDataSourceService','_sessionService','getOwnPropertyDescriptor','requireSession','solved','getComment','152199xNsJNo','780411paobWA','/universer-api/comment/unit/','_userService','dataSource','1362546scPgnO','_init','setConfig','resolved','get','threadId','80460nItmkz','replies','comments','Edit','saveCommentToSnapshot','parse','root','onStarting','YYYY/MM/DD\x20HH:mm','defineProperty','4prQdaz','407VIOWdl','find','1602055YdMvBH','filter','/delete','add','UNIVER_UNKNOWN','user','/list','stringify','createTimestamp','listComments','Solved','50IHpiUi','728872gnzMxY','_threadCommentModel','subscribe','replyId','/solved','parentId','error','_threadCommentDataSource','content','getUnit','ref','OpenOrReOpen','length','unitId','14ZCiQWC','_httpService','Add','addUser','_initUserSync','syncUpdateMutationToColla','userId','_injector','pipe','deleteComment','_config','code','format'];_0x34cc=function(){return _0x181439;};return _0x34cc();}$(g,'pluginName',W),$(g,'type',_0x471339[_0x4be5b3(0x1c0)]),g=ie([_0x41b532(_0x2b0062,_0x632fbe,_0x4dad28),N(0x1,_0x33e49e(_0x36e64b)),N(0x2,_0x707352)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x15cd(){const _0x3ba6ad=['Reply','Unknown','_threadCommentDataSource','4tdPchq','6fbgOrZ','type','8627880tAtNqW','1528BYvkDZ','/universer-api/user/list','requireSession','add','createTimestamp','8208SlrLsQ','_initUserSync','_userService','symbol','resolveComment','/solved','3139455byeWhe','filter','dataSource','_injector','deleteComment','YYYY/MM/DD\x20HH:mm','commentUpdate$','addComment','replyId','content','user','threadId','error','reply','unitId','format','forEach','_config','syncUpdateMutationToColla','getMemberID','4093453GWzeSq','_threadCommentModel','159OzTvAV','disposeWithMe','/universer-api/comment/unit/','subscribe','onReady','Solved','rangeType','Solve','getOwnPropertyDescriptor','ref','setConfig','/add','_init','20966bfBniH','Add','slice','_configService','/reply','replies','values','_sessionService','_threadCommentDataSourceService','solved','get','OpenOrReOpen','308996SmvDBF','COMMENT','body','users','_httpService','payload','onStarting','getCurrentUser','UNRECOGNIZED','parse','/delete','code','getUser','listComments','post','getUnit','Delete','userID','thread-comment-data-source.config','8796FQzEkC','_initDataSource','userId','find','rangeId','personId','root','length','customRanges','comment','4160RbcSyz','Edit','delete','stringify','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','addUser'];_0x15cd=function(){return _0x3ba6ad;};return _0x15cd();}const _0x484af3=_0x448c;(function(_0x905c0e,_0x2fab82){const _0x4e6bd0=_0x448c,_0x3ba09a=_0x905c0e();while(!![]){try{const _0x3bde17=parseInt(_0x4e6bd0(0xb4))/0x1*(-parseInt(_0x4e6bd0(0xdb))/0x2)+parseInt(_0x4e6bd0(0x9b))/0x3*(-parseInt(_0x4e6bd0(0xdf))/0x4)+parseInt(_0x4e6bd0(0xea))/0x5+-parseInt(_0x4e6bd0(0xdc))/0x6*(-parseInt(_0x4e6bd0(0x99))/0x7)+-parseInt(_0x4e6bd0(0xd1))/0x8*(-parseInt(_0x4e6bd0(0xe4))/0x9)+parseInt(_0x4e6bd0(0xde))/0xa+parseInt(_0x4e6bd0(0xa8))/0xb*(-parseInt(_0x4e6bd0(0xc7))/0xc);if(_0x3bde17===_0x2fab82)break;else _0x3ba09a['push'](_0x3ba09a['shift']());}catch(_0x5f0343){_0x3ba09a['push'](_0x3ba09a['shift']());}}}(_0x15cd,0x7d93a));import{CommentService as _0x410c99,CollaborationSessionService as _0x844a5f,UniverCollaborationClientPlugin as _0x706f71}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3aca80}from'@univerjs-pro/license';import{dayjs as _0x16b3d9,UserManagerService as _0x587f73,Inject as _0x489677,Injector as _0x4b33d3,Disposable as _0x3eeb98,CustomRangeType as _0x25a850,UniverInstanceType as _0x4f170b,DependentOn as _0x24b919,IConfigService as _0x1d6929,Plugin as _0x284dc3,merge as _0x35db6f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3da613}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2321f4,IThreadCommentDataSourceService as _0x3e8143}from'@univerjs/thread-comment';import{bufferTime as _0x46d570}from'rxjs';import{HTTPService as _0x5d2277}from'@univerjs/network';const W=_0x484af3(0xd5);var I=(_0x2417ab=>(_0x2417ab[_0x2417ab[_0x484af3(0xb3)]=0x0]=_0x484af3(0xb3),_0x2417ab[_0x2417ab[_0x484af3(0xa0)]=0x1]=_0x484af3(0xa0),_0x2417ab[_0x2417ab[_0x484af3(0xbc)]=-0x1]='UNRECOGNIZED',_0x2417ab))(I||{}),v=(_0x460bd6=>(_0x460bd6[_0x460bd6[_0x484af3(0xd9)]=0x0]=_0x484af3(0xd9),_0x460bd6[_0x460bd6['Add']=0x1]=_0x484af3(0xa9),_0x460bd6[_0x460bd6[_0x484af3(0xd8)]=0x2]=_0x484af3(0xd8),_0x460bd6[_0x460bd6['Edit']=0x3]=_0x484af3(0xd2),_0x460bd6[_0x460bd6['Delete']=0x4]=_0x484af3(0xc4),_0x460bd6[_0x460bd6[_0x484af3(0xa2)]=0x5]=_0x484af3(0xa2),_0x460bd6[_0x460bd6[_0x484af3(0xbc)]=-0x1]=_0x484af3(0xbc),_0x460bd6))(v||{});const y=_0x3bf6e9=>_0x16b3d9(new Date(+_0x3bf6e9))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x48c2bc,_0x2ddefc)=>{const _0x32cea1=_0x484af3,_0x22886a=_0x48c2bc[_0x32cea1(0xb2)](_0x587f73),_0x57fd7f=_0x48c2bc[_0x32cea1(0xb2)](_0x5d2277);_0x2ddefc[_0x32cea1(0x95)](_0x4de656=>{const _0x14126e=_0x32cea1;_0x22886a[_0x14126e(0xc0)](_0x4de656)&&_0x2ddefc[_0x14126e(0xd3)](_0x4de656);}),_0x2ddefc['size']&&(await _0x57fd7f[_0x32cea1(0xb2)](_0x32cea1(0xe0),{'params':{'userIDs':[..._0x2ddefc]}}))['body'][_0x32cea1(0xb7)][_0x32cea1(0x95)](_0x15b07d=>{const _0x2ab095=_0x32cea1;_0x15b07d&&_0x22886a[_0x2ab095(0xd7)](_0x15b07d);});};function _0x448c(_0x2064a8,_0xe4404c){const _0x15cd26=_0x15cd();return _0x448c=function(_0x448ca1,_0x37a6e6){_0x448ca1=_0x448ca1-0x93;let _0x768dfc=_0x15cd26[_0x448ca1];return _0x768dfc;},_0x448c(_0x2064a8,_0xe4404c);}var K=Object[_0x484af3(0xa3)],V=(_0x10d94f,_0x2b18be,_0x3f5aea,_0x35c7f2)=>{const _0x3ebb44=_0x484af3;for(var _0x324436=_0x35c7f2>0x1?void 0x0:_0x35c7f2?K(_0x2b18be,_0x3f5aea):_0x2b18be,_0x3ae2d1=_0x10d94f[_0x3ebb44(0xce)]-0x1,_0xbf06f2;_0x3ae2d1>=0x0;_0x3ae2d1--)(_0xbf06f2=_0x10d94f[_0x3ae2d1])&&(_0x324436=_0xbf06f2(_0x324436)||_0x324436);return _0x324436;},p=(_0x4c2e6d,_0x5589a2)=>(_0x495644,_0x15801a)=>_0x5589a2(_0x495644,_0x15801a,_0x4c2e6d);let _=class extends _0x3eeb98{constructor(_0x934b1e,_0x4ee911,_0x1bffd9,_0x404782){const _0x2dc7e3=_0x484af3;super(),this['_commentService']=_0x934b1e,this[_0x2dc7e3(0x9a)]=_0x4ee911,this[_0x2dc7e3(0xe6)]=_0x1bffd9,this[_0x2dc7e3(0xed)]=_0x404782,this[_0x2dc7e3(0xa7)](),this[_0x2dc7e3(0xe5)]();}[_0x484af3(0xe5)](){const _0x5ec0d8=_0x484af3;this['disposeWithMe'](this[_0x5ec0d8(0x9a)]['commentUpdate$']['pipe'](_0x46d570(0x10))['subscribe'](_0x520229=>{const _0x41e715=_0x5ec0d8,_0x11d514=new Set();_0x520229[_0x41e715(0x95)](_0x3a4c8a=>{const _0x31cd41=_0x41e715;switch(_0x3a4c8a[_0x31cd41(0xdd)]){case _0x31cd41(0xe2):{const _0x1faa56=_0x3a4c8a[_0x31cd41(0xb9)][_0x31cd41(0xcc)];_0x11d514['add'](_0x1faa56);break;}}}),B(this[_0x41e715(0xed)],_0x11d514);}));}[_0x484af3(0xa7)](){const _0x181688=_0x484af3;this[_0x181688(0x9c)](this['_commentService'][_0x181688(0xf0)][_0x181688(0x9e)](async _0x3f64d0=>{const _0x2ba8d1=_0x181688;var _0x5ca012,_0x4dce7e,_0x515b93,_0x1fcfb8;const _0x981617=(_0x5ca012=this[_0x2ba8d1(0x9a)][_0x2ba8d1(0xc3)](_0x3f64d0[_0x2ba8d1(0x93)])[_0x2ba8d1(0xca)](_0x500fe0=>_0x500fe0['threadId']===_0x3f64d0[_0x2ba8d1(0xf5)]))==null?void 0x0:_0x5ca012[_0x2ba8d1(0xcd)];if(!_0x981617)return;const {unitId:_0xe883c0,subUnitId:_0x1c9acb}=_0x981617;switch(_0x3f64d0[_0x2ba8d1(0xf4)]&&this[_0x2ba8d1(0xe6)][_0x2ba8d1(0xd7)](_0x3f64d0[_0x2ba8d1(0xf4)]),_0x3f64d0[_0x2ba8d1(0xdd)]){case v[_0x2ba8d1(0xa9)]:break;case v['Reply']:{this[_0x2ba8d1(0x9a)][_0x2ba8d1(0xf1)](_0xe883c0,_0x1c9acb,{'unitId':_0xe883c0,'subUnitId':_0x1c9acb,'ref':'','id':_0x3f64d0['replyId'],'dT':y(+_0x3f64d0['createTimestamp']),'threadId':_0x3f64d0[_0x2ba8d1(0xf5)],'personId':(_0x515b93=(_0x4dce7e=_0x3f64d0[_0x2ba8d1(0xf4)])==null?void 0x0:_0x4dce7e[_0x2ba8d1(0xc5)])!=null?_0x515b93:_0x3f64d0[_0x2ba8d1(0xc9)],'text':JSON[_0x2ba8d1(0xbd)](_0x3f64d0[_0x2ba8d1(0xf3)]),'parentId':_0x981617['id']});break;}case v[_0x2ba8d1(0xc4)]:{const _0x2321f3=this[_0x2ba8d1(0x9a)]['getComment'](_0xe883c0,_0x1c9acb,_0x3f64d0[_0x2ba8d1(0xf2)]);_0x2321f3&&_0x2321f3['parentId']&&this[_0x2ba8d1(0x9a)]['deleteComment'](_0xe883c0,_0x1c9acb,_0x3f64d0[_0x2ba8d1(0xf2)]);break;}case v[_0x2ba8d1(0xd2)]:{this['_threadCommentModel']['updateComment'](_0xe883c0,_0x1c9acb,{'commentId':_0x3f64d0[_0x2ba8d1(0xf2)],'text':JSON[_0x2ba8d1(0xbd)](_0x3f64d0[_0x2ba8d1(0xf3)])});break;}case v[_0x2ba8d1(0xa2)]:{const _0x2037ac=(_0x1fcfb8=this[_0x2ba8d1(0x9a)][_0x2ba8d1(0xc3)](_0x3f64d0['unitId'])[_0x2ba8d1(0xca)](_0x1bc15e=>_0x1bc15e[_0x2ba8d1(0xf5)]===_0x3f64d0[_0x2ba8d1(0xf5)]))==null?void 0x0:_0x1fcfb8['root'];_0x2037ac&&this['_threadCommentModel'][_0x2ba8d1(0xe8)](_0xe883c0,_0x1c9acb,_0x2037ac['id'],_0x3f64d0[_0x2ba8d1(0xb1)]===I[_0x2ba8d1(0xa0)]);break;}}}));}};_=V([p(0x0,_0x489677(_0x410c99)),p(0x1,_0x489677(_0x2321f4)),p(0x2,_0x489677(_0x587f73)),p(0x3,_0x489677(_0x4b33d3))],_);const z=_0x484af3(0xc6),O={};var k=Object[_0x484af3(0xa3)],Q=(_0x21b830,_0x5a1f04,_0x5e9582,_0x351cc0)=>{const _0x1befda=_0x484af3;for(var _0x2b57e4=_0x351cc0>0x1?void 0x0:_0x351cc0?k(_0x5a1f04,_0x5e9582):_0x5a1f04,_0x195b38=_0x21b830[_0x1befda(0xce)]-0x1,_0x429f7f;_0x195b38>=0x0;_0x195b38--)(_0x429f7f=_0x21b830[_0x195b38])&&(_0x2b57e4=_0x429f7f(_0x2b57e4)||_0x2b57e4);return _0x2b57e4;},b=(_0x11471f,_0x4d8b98)=>(_0x306e83,_0x4cef75)=>_0x4d8b98(_0x306e83,_0x4cef75,_0x11471f);function X(_0x4d28c0,_0x35001c){const _0x487168=_0x484af3,_0x4ec3d8=_0x4d28c0['replies'][0x0];return{..._0x35001c,'id':_0x4ec3d8['replyId'],'resolved':_0x4d28c0['solved']===0x1,'dT':y(_0x4ec3d8[_0x487168(0xe3)]),'personId':_0x4ec3d8[_0x487168(0xc9)],'threadId':_0x4ec3d8[_0x487168(0xf5)]};}function ee(_0x5a4fd0,_0x4bc89f,_0x262494){const _0x1a90c7=_0x484af3;var _0x592fa9,_0x1bbd44;if(((_0x1bbd44=(_0x592fa9=_0x5a4fd0==null?void 0x0:_0x5a4fd0[_0x1a90c7(0xad)])==null?void 0x0:_0x592fa9['length'])!=null?_0x1bbd44:0x0)>0x0){const _0xd0b0a5=(_0x35b21e,_0x2e4267)=>({'id':_0x35b21e[_0x1a90c7(0xf2)],'threadId':_0x35b21e[_0x1a90c7(0xf5)],'dT':y(_0x35b21e[_0x1a90c7(0xe3)]),'personId':_0x35b21e['userId'],'resolved':_0x5a4fd0[_0x1a90c7(0xb1)]===I['Solved'],'unitId':_0x4bc89f,'subUnitId':_0x262494,'text':JSON['parse'](_0x35b21e['content']),'parentId':_0x2e4267}),_0xfd9577=_0xd0b0a5(_0x5a4fd0[_0x1a90c7(0xad)][0x0]);return{..._0xfd9577,'children':_0x5a4fd0[_0x1a90c7(0xad)][_0x1a90c7(0xaa)](0x1)['map'](_0x45e001=>_0xd0b0a5(_0x45e001,_0xfd9577['id']))};}return null;}let S=class{constructor(_0xb47edd,_0x35a420,_0x2a58a1){const _0x183084=_0x484af3;this[_0x183084(0xb8)]=_0xb47edd,this[_0x183084(0xe6)]=_0x35a420,this[_0x183084(0xaf)]=_0x2a58a1;}async[_0x484af3(0xf1)](_0x542a55){const _0x4a0d05=_0x484af3;var _0x3e71a4,_0x1d1a48;const {parentId:_0x2fd295,unitId:_0xf5a6b1,text:_0x57d8ea,threadId:_0x1b1f97}=_0x542a55,_0x2d3f20=(_0x1d1a48=(_0x3e71a4=_0x57d8ea['customRanges'])==null?void 0x0:_0x3e71a4[_0x4a0d05(0xeb)](_0x450d52=>_0x450d52[_0x4a0d05(0xa1)]===_0x25a850['COMMENT'])[_0x4a0d05(0xd6)](_0x50863b=>_0x50863b[_0x4a0d05(0xcb)]))!=null?_0x1d1a48:[],_0x3cfdde=JSON[_0x4a0d05(0xd4)](_0x57d8ea),_0x452449=(await this[_0x4a0d05(0xaf)][_0x4a0d05(0xe1)](_0xf5a6b1))[_0x4a0d05(0x98)]();if(_0x2fd295){const _0x3aa433={'memberId':_0x452449,'unitId':_0xf5a6b1,'content':_0x3cfdde,'mention':_0x2d3f20,'threadId':_0x1b1f97},_0x42fe71=(await this[_0x4a0d05(0xb8)][_0x4a0d05(0xc2)]('/universer-api/comment/unit/'+_0xf5a6b1+_0x4a0d05(0xac),{'body':_0x3aa433}))[_0x4a0d05(0xb6)][_0x4a0d05(0xf7)];return{..._0x542a55,'id':_0x42fe71[_0x4a0d05(0xf2)],'dT':_0x16b3d9(+_0x42fe71[_0x4a0d05(0xe3)])[_0x4a0d05(0x94)](_0x4a0d05(0xef)),'personId':_0x42fe71[_0x4a0d05(0xc9)]};}else{const _0x53bf30={'memberId':_0x452449,'unitId':_0xf5a6b1,'content':_0x3cfdde,'mention':_0x2d3f20},_0x1ec399=await this[_0x4a0d05(0xb8)]['post'](_0x4a0d05(0x9d)+_0xf5a6b1+_0x4a0d05(0xa6),{'body':_0x53bf30});return X(_0x1ec399['body'][_0x4a0d05(0xd0)],_0x542a55);}}async['updateComment'](_0x3002fb){const _0x55c190=_0x484af3;var _0x2180f7,_0x37dbc6;const {text:_0x36e5e5,unitId:_0x23d397}=_0x3002fb,_0x29f0f6=(_0x37dbc6=(_0x2180f7=_0x36e5e5[_0x55c190(0xcf)])==null?void 0x0:_0x2180f7[_0x55c190(0xeb)](_0x2878b4=>_0x2878b4[_0x55c190(0xa1)]===_0x25a850[_0x55c190(0xb5)])[_0x55c190(0xd6)](_0x40f54e=>_0x40f54e[_0x55c190(0xcb)]))!=null?_0x37dbc6:[],_0xae4095=JSON[_0x55c190(0xd4)](_0x36e5e5),_0x2a6771=_0x3002fb[_0x55c190(0xf5)],_0x56cf47=_0x3002fb['id'],_0x130163={'memberId':(await this[_0x55c190(0xaf)][_0x55c190(0xe1)](_0x23d397))['getMemberID'](),'unitId':_0x23d397,'threadId':_0x2a6771,'mention':_0x29f0f6,'content':_0xae4095,'replyId':_0x56cf47},_0xc88552=await this[_0x55c190(0xb8)][_0x55c190(0xc2)](_0x55c190(0x9d)+_0x23d397+'/edit',{'body':_0x130163});return!_0xc88552[_0x55c190(0xb6)][_0x55c190(0xf6)]||_0xc88552[_0x55c190(0xb6)]['error'][_0x55c190(0xbf)]===0x1;}async[_0x484af3(0xe8)](_0x5ee94c){const _0x5717fa=_0x484af3,{unitId:_0x365c3d}=_0x5ee94c,_0xefed8a=_0x5ee94c[_0x5717fa(0xf5)],_0xc0b204={'memberId':this[_0x5717fa(0xe6)][_0x5717fa(0xbb)]()['userID'],'unitId':_0x365c3d,'threadId':_0xefed8a,'solved':_0x5ee94c['resolved']?I[_0x5717fa(0xa0)]:I[_0x5717fa(0xb3)]},_0x3b8582=await this['_httpService'][_0x5717fa(0xc2)]('/universer-api/comment/unit/'+_0x365c3d+_0x5717fa(0xe9),{'body':_0xc0b204});return!_0x3b8582['body']['error']||_0x3b8582['body'][_0x5717fa(0xf6)][_0x5717fa(0xbf)]===0x1;}async[_0x484af3(0xee)](_0x1d2846,_0x559a89,_0x21f46c,_0x2ce7cc){const _0x8e75cd=_0x484af3,_0x3c700f={'memberId':(await this['_sessionService'][_0x8e75cd(0xe1)](_0x1d2846))[_0x8e75cd(0x98)](),'threadId':_0x21f46c,'replyId':_0x2ce7cc,'unitId':_0x1d2846},_0x538de8=await this[_0x8e75cd(0xb8)][_0x8e75cd(0xc2)](_0x8e75cd(0x9d)+_0x1d2846+_0x8e75cd(0xbe),{'body':_0x3c700f});return!_0x538de8[_0x8e75cd(0xb6)][_0x8e75cd(0xf6)]||_0x538de8[_0x8e75cd(0xb6)]['error'][_0x8e75cd(0xbf)]===0x1;}async[_0x484af3(0xc1)](_0x46a981,_0x502468,_0x3d0730){const _0x1c029c=_0x484af3,_0x208a1e={'unitId':_0x46a981,'threadId':_0x3d0730},_0x201c48=await this[_0x1c029c(0xb8)][_0x1c029c(0xc2)]('/universer-api/comment/unit/'+_0x46a981+'/list',{'body':_0x208a1e}),_0x5ad548=_0x3d0730[_0x1c029c(0xd6)](_0x2c81d2=>ee(_0x201c48['body']['comments'][_0x2c81d2],_0x46a981,_0x502468))[_0x1c029c(0xeb)](Boolean);return Object[_0x1c029c(0xae)](_0x201c48[_0x1c029c(0xb6)][_0x1c029c(0xb7)])[_0x1c029c(0x95)](_0x58c6fd=>{const _0x2b548c=_0x1c029c;this[_0x2b548c(0xe6)][_0x2b548c(0xd7)](_0x58c6fd);}),_0x5ad548;}['saveCommentToSnapshot'](_0x18ec7f){const _0xcd3cdc=_0x484af3;return{'id':_0x18ec7f['id'],'threadId':_0x18ec7f[_0xcd3cdc(0xf5)],'ref':_0x18ec7f[_0xcd3cdc(0xa4)]};}};S=Q([b(0x0,_0x489677(_0x5d2277)),b(0x1,_0x489677(_0x587f73)),b(0x2,_0x489677(_0x844a5f))],S);var re=Object[_0x484af3(0xa3)],te=(_0x40e849,_0xea08,_0x4eadd1,_0x6dc0b0)=>{const _0x10cf87=_0x484af3;for(var _0x1cb20f=_0x6dc0b0>0x1?void 0x0:_0x6dc0b0?re(_0xea08,_0x4eadd1):_0xea08,_0x2a77e3=_0x40e849[_0x10cf87(0xce)]-0x1,_0x7d6160;_0x2a77e3>=0x0;_0x2a77e3--)(_0x7d6160=_0x40e849[_0x2a77e3])&&(_0x1cb20f=_0x7d6160(_0x1cb20f)||_0x1cb20f);return _0x1cb20f;},M=(_0x233f64,_0x42e0ce)=>(_0x110b6e,_0x1eea80)=>_0x42e0ce(_0x110b6e,_0x1eea80,_0x233f64);let f=class extends _0x3eeb98{constructor(_0x5eb981,_0x152c19){const _0x4e4333=_0x484af3;super(),this[_0x4e4333(0xb0)]=_0x5eb981,this[_0x4e4333(0xda)]=_0x152c19,this[_0x4e4333(0xc8)]();}[_0x484af3(0xc8)](){const _0x20935a=_0x484af3;this[_0x20935a(0xb0)][_0x20935a(0xec)]=this[_0x20935a(0xda)],this[_0x20935a(0xb0)][_0x20935a(0x97)]=!0x1;}};f=te([M(0x0,_0x3e8143),M(0x1,_0x489677(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x242656,_0x368037,_0x533a56)=>_0x368037 in _0x242656?se(_0x242656,_0x368037,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x533a56}):_0x242656[_0x368037]=_0x533a56,ie=(_0x5efba4,_0xe6c025,_0x47db5e,_0x5e550c)=>{const _0x5946bf=_0x484af3;for(var _0x25ea17=_0x5e550c>0x1?void 0x0:_0x5e550c?oe(_0xe6c025,_0x47db5e):_0xe6c025,_0x2d8507=_0x5efba4[_0x5946bf(0xce)]-0x1,_0x8838ce;_0x2d8507>=0x0;_0x2d8507--)(_0x8838ce=_0x5efba4[_0x2d8507])&&(_0x25ea17=_0x8838ce(_0x25ea17)||_0x25ea17);return _0x25ea17;},N=(_0x42d093,_0x369d82)=>(_0x195ffc,_0x3a2654)=>_0x369d82(_0x195ffc,_0x3a2654,_0x42d093),$=(_0x2996cf,_0x475366,_0x41333f)=>ne(_0x2996cf,typeof _0x475366!=_0x484af3(0xe7)?_0x475366+'':_0x475366,_0x41333f);let g=class extends _0x284dc3{constructor(_0x5516de=O,_0x2030a7,_0x5c15f7){const _0x47dfe4=_0x484af3;super(),this[_0x47dfe4(0x96)]=_0x5516de,this[_0x47dfe4(0xed)]=_0x2030a7,this[_0x47dfe4(0xab)]=_0x5c15f7;const {..._0x8f9e45}=_0x35db6f({},O,this[_0x47dfe4(0x96)]);this[_0x47dfe4(0xab)][_0x47dfe4(0xa5)](z,_0x8f9e45);}[_0x484af3(0xba)](){const _0x481b45=_0x484af3;[[S],[f],[_]][_0x481b45(0x95)](_0x16081b=>{const _0x37ac73=_0x481b45;this[_0x37ac73(0xed)][_0x37ac73(0xe2)](_0x16081b);});}[_0x484af3(0x9f)](){const _0x57a4ab=_0x484af3;this[_0x57a4ab(0xed)]['get'](f),this[_0x57a4ab(0xed)]['get'](_);}};$(g,'pluginName',W),$(g,'type',_0x4f170b['UNIVER_UNKNOWN']),g=ie([_0x24b919(_0x3da613,_0x706f71,_0x3aca80),N(0x1,_0x489677(_0x4b33d3)),N(0x2,_0x1d6929)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4be5b3=_0x1a8d;(function(_0x344bd3,_0x3af6ac){const _0x39c542=_0x1a8d,_0x11c253=_0x344bd3();while(!![]){try{const _0x217d4e=-parseInt(_0x39c542(0x18d))/0x1*(-parseInt(_0x39c542(0x1ea))/0x2)+parseInt(_0x39c542(0x1a5))/0x3*(parseInt(_0x39c542(0x1b9))/0x4)+-parseInt(_0x39c542(0x1bc))/0x5+-parseInt(_0x39c542(0x1a9))/0x6+parseInt(_0x39c542(0x1d6))/0x7*(-parseInt(_0x39c542(0x1c8))/0x8)+-parseInt(_0x39c542(0x1a4))/0x9*(-parseInt(_0x39c542(0x1c7))/0xa)+parseInt(_0x39c542(0x1ba))/0xb*(parseInt(_0x39c542(0x1af))/0xc);if(_0x217d4e===_0x3af6ac)break;else _0x11c253['push'](_0x11c253['shift']());}catch(_0x266e2c){_0x11c253['push'](_0x11c253['shift']());}}}(_0x34cc,0x464c5));import{CommentService as _0x3e43f1,CollaborationSessionService as _0x26789c,UniverCollaborationClientPlugin as _0x632fbe}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4dad28}from'@univerjs-pro/license';import{dayjs as _0x36859c,UserManagerService as _0x394c60,Inject as _0x33e49e,Injector as _0x36e64b,Disposable as _0x55890b,CustomRangeType as _0x1616aa,UniverInstanceType as _0x471339,DependentOn as _0x41b532,IConfigService as _0x707352,Plugin as _0x4bb65f,merge as _0x5765b9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2b0062}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x242492,IThreadCommentDataSourceService as _0x1fe3bb}from'@univerjs/thread-comment';import{bufferTime as _0x4ed255}from'rxjs';import{HTTPService as _0x480aa6}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x77b600=>(_0x77b600[_0x77b600[_0x4be5b3(0x1d3)]=0x0]=_0x4be5b3(0x1d3),_0x77b600[_0x77b600['Solved']=0x1]='Solved',_0x77b600[_0x77b600[_0x4be5b3(0x18b)]=-0x1]=_0x4be5b3(0x18b),_0x77b600))(I||{}),v=(_0x283d3f=>(_0x283d3f[_0x283d3f[_0x4be5b3(0x189)]=0x0]=_0x4be5b3(0x189),_0x283d3f[_0x283d3f[_0x4be5b3(0x1d8)]=0x1]=_0x4be5b3(0x1d8),_0x283d3f[_0x283d3f[_0x4be5b3(0x193)]=0x2]=_0x4be5b3(0x193),_0x283d3f[_0x283d3f[_0x4be5b3(0x1b2)]=0x3]='Edit',_0x283d3f[_0x283d3f[_0x4be5b3(0x194)]=0x4]='Delete',_0x283d3f[_0x283d3f[_0x4be5b3(0x1e8)]=0x5]='Solve',_0x283d3f[_0x283d3f[_0x4be5b3(0x18b)]=-0x1]='UNRECOGNIZED',_0x283d3f))(v||{});const y=_0x2313d9=>_0x36859c(new Date(+_0x2313d9))[_0x4be5b3(0x1e2)](_0x4be5b3(0x1b7)),B=async(_0x1ac2c1,_0x41cd9a)=>{const _0x46f118=_0x4be5b3,_0x3e008d=_0x1ac2c1[_0x46f118(0x1ad)](_0x394c60),_0x5d07bb=_0x1ac2c1['get'](_0x480aa6);_0x41cd9a['forEach'](_0x57a124=>{_0x3e008d['getUser'](_0x57a124)&&_0x41cd9a['delete'](_0x57a124);}),_0x41cd9a['size']&&(await _0x5d07bb[_0x46f118(0x1ad)](_0x46f118(0x18a),{'params':{'userIDs':[..._0x41cd9a]}}))[_0x46f118(0x1eb)][_0x46f118(0x197)][_0x46f118(0x1e3)](_0x3a3d11=>{const _0x487a1b=_0x46f118;_0x3a3d11&&_0x3e008d[_0x487a1b(0x1d9)](_0x3a3d11);});};var K=Object[_0x4be5b3(0x1a0)],V=(_0x5405d2,_0x226810,_0xdca34a,_0x43127a)=>{const _0x2599da=_0x4be5b3;for(var _0x451077=_0x43127a>0x1?void 0x0:_0x43127a?K(_0x226810,_0xdca34a):_0x226810,_0x2fcadc=_0x5405d2[_0x2599da(0x1d4)]-0x1,_0x5a4b73;_0x2fcadc>=0x0;_0x2fcadc--)(_0x5a4b73=_0x5405d2[_0x2fcadc])&&(_0x451077=_0x5a4b73(_0x451077)||_0x451077);return _0x451077;},p=(_0x303215,_0x3dd8e8)=>(_0x38c83e,_0x1b3da2)=>_0x3dd8e8(_0x38c83e,_0x1b3da2,_0x303215);let _=class extends _0x55890b{constructor(_0xe30f39,_0x2ca75e,_0x56abdc,_0x463d97){const _0x5e9af6=_0x4be5b3;super(),this['_commentService']=_0xe30f39,this[_0x5e9af6(0x1c9)]=_0x2ca75e,this[_0x5e9af6(0x1a7)]=_0x56abdc,this['_injector']=_0x463d97,this[_0x5e9af6(0x1aa)](),this[_0x5e9af6(0x1da)]();}['_initUserSync'](){const _0x5ba8d9=_0x4be5b3;this['disposeWithMe'](this[_0x5ba8d9(0x1c9)][_0x5ba8d9(0x18f)][_0x5ba8d9(0x1de)](_0x4ed255(0x10))[_0x5ba8d9(0x1ca)](_0x1353a3=>{const _0x35f7b5=new Set();_0x1353a3['forEach'](_0x7dca46=>{const _0x3f33fe=_0x1a8d;switch(_0x7dca46['type']){case _0x3f33fe(0x1bf):{const _0x45ea17=_0x7dca46[_0x3f33fe(0x1e9)]['personId'];_0x35f7b5[_0x3f33fe(0x1bf)](_0x45ea17);break;}}}),B(this['_injector'],_0x35f7b5);}));}[_0x4be5b3(0x1aa)](){const _0x5ceba0=_0x4be5b3;this[_0x5ceba0(0x18c)](this['_commentService'][_0x5ceba0(0x18f)][_0x5ceba0(0x1ca)](async _0x17d0a5=>{const _0x825e42=_0x5ceba0;var _0x4a3781,_0x5c7ea2,_0x207b7b,_0x436de2;const _0x1cfa86=(_0x4a3781=this[_0x825e42(0x1c9)][_0x825e42(0x1d1)](_0x17d0a5[_0x825e42(0x1d5)])['find'](_0x498a34=>_0x498a34[_0x825e42(0x1ae)]===_0x17d0a5['threadId']))==null?void 0x0:_0x4a3781[_0x825e42(0x1b5)];if(!_0x1cfa86)return;const {unitId:_0x151a2f,subUnitId:_0x532867}=_0x1cfa86;switch(_0x17d0a5[_0x825e42(0x1c1)]&&this[_0x825e42(0x1a7)]['addUser'](_0x17d0a5[_0x825e42(0x1c1)]),_0x17d0a5[_0x825e42(0x190)]){case v['Add']:break;case v[_0x825e42(0x193)]:{this[_0x825e42(0x1c9)]['addComment'](_0x151a2f,_0x532867,{'unitId':_0x151a2f,'subUnitId':_0x532867,'ref':'','id':_0x17d0a5['replyId'],'dT':y(+_0x17d0a5['createTimestamp']),'threadId':_0x17d0a5[_0x825e42(0x1ae)],'personId':(_0x207b7b=(_0x5c7ea2=_0x17d0a5[_0x825e42(0x1c1)])==null?void 0x0:_0x5c7ea2['userID'])!=null?_0x207b7b:_0x17d0a5[_0x825e42(0x1dc)],'text':JSON[_0x825e42(0x1b4)](_0x17d0a5[_0x825e42(0x1d0)]),'parentId':_0x1cfa86['id']});break;}case v[_0x825e42(0x194)]:{const _0x3d4d65=this[_0x825e42(0x1c9)][_0x825e42(0x1a3)](_0x151a2f,_0x532867,_0x17d0a5['replyId']);_0x3d4d65&&_0x3d4d65[_0x825e42(0x1cd)]&&this[_0x825e42(0x1c9)][_0x825e42(0x1df)](_0x151a2f,_0x532867,_0x17d0a5[_0x825e42(0x1cb)]);break;}case v[_0x825e42(0x1b2)]:{this['_threadCommentModel']['updateComment'](_0x151a2f,_0x532867,{'commentId':_0x17d0a5[_0x825e42(0x1cb)],'text':JSON['parse'](_0x17d0a5[_0x825e42(0x1d0)])});break;}case v[_0x825e42(0x1e8)]:{const _0x3e084f=(_0x436de2=this[_0x825e42(0x1c9)][_0x825e42(0x1d1)](_0x17d0a5['unitId'])[_0x825e42(0x1bb)](_0xe3db71=>_0xe3db71[_0x825e42(0x1ae)]===_0x17d0a5['threadId']))==null?void 0x0:_0x436de2['root'];_0x3e084f&&this[_0x825e42(0x1c9)][_0x825e42(0x195)](_0x151a2f,_0x532867,_0x3e084f['id'],_0x17d0a5[_0x825e42(0x1a2)]===I[_0x825e42(0x1c6)]);break;}}}));}};_=V([p(0x0,_0x33e49e(_0x3e43f1)),p(0x1,_0x33e49e(_0x242492)),p(0x2,_0x33e49e(_0x394c60)),p(0x3,_0x33e49e(_0x36e64b))],_);const z='thread-comment-data-source.config',O={};function _0x1a8d(_0x32b13c,_0x1138f8){const _0x34ccdc=_0x34cc();return _0x1a8d=function(_0x1a8dc3,_0x517058){_0x1a8dc3=_0x1a8dc3-0x189;let _0x2d137a=_0x34ccdc[_0x1a8dc3];return _0x2d137a;},_0x1a8d(_0x32b13c,_0x1138f8);}var k=Object['getOwnPropertyDescriptor'],Q=(_0x40aeba,_0x400b51,_0x44a011,_0x403705)=>{for(var _0x1cfc60=_0x403705>0x1?void 0x0:_0x403705?k(_0x400b51,_0x44a011):_0x400b51,_0x37750b=_0x40aeba['length']-0x1,_0x11c5cf;_0x37750b>=0x0;_0x37750b--)(_0x11c5cf=_0x40aeba[_0x37750b])&&(_0x1cfc60=_0x11c5cf(_0x1cfc60)||_0x1cfc60);return _0x1cfc60;},b=(_0x329240,_0x57f6e9)=>(_0x508c6d,_0x4158c4)=>_0x57f6e9(_0x508c6d,_0x4158c4,_0x329240);function X(_0x5c1ee7,_0x5e2bce){const _0xd9b56f=_0x4be5b3,_0x4058a0=_0x5c1ee7[_0xd9b56f(0x1b0)][0x0];return{..._0x5e2bce,'id':_0x4058a0[_0xd9b56f(0x1cb)],'resolved':_0x5c1ee7[_0xd9b56f(0x1a2)]===0x1,'dT':y(_0x4058a0[_0xd9b56f(0x1c4)]),'personId':_0x4058a0[_0xd9b56f(0x1dc)],'threadId':_0x4058a0[_0xd9b56f(0x1ae)]};}function ee(_0x1657ee,_0x538f54,_0x5efc50){const _0x50adf8=_0x4be5b3;var _0x8c08bf,_0x5615c0;if(((_0x5615c0=(_0x8c08bf=_0x1657ee==null?void 0x0:_0x1657ee[_0x50adf8(0x1b0)])==null?void 0x0:_0x8c08bf['length'])!=null?_0x5615c0:0x0)>0x0){const _0x56810b=(_0x263b5f,_0x162537)=>({'id':_0x263b5f['replyId'],'threadId':_0x263b5f[_0x50adf8(0x1ae)],'dT':y(_0x263b5f[_0x50adf8(0x1c4)]),'personId':_0x263b5f[_0x50adf8(0x1dc)],'resolved':_0x1657ee['solved']===I[_0x50adf8(0x1c6)],'unitId':_0x538f54,'subUnitId':_0x5efc50,'text':JSON[_0x50adf8(0x1b4)](_0x263b5f['content']),'parentId':_0x162537}),_0x293a85=_0x56810b(_0x1657ee[_0x50adf8(0x1b0)][0x0]);return{..._0x293a85,'children':_0x1657ee[_0x50adf8(0x1b0)][_0x50adf8(0x19a)](0x1)[_0x50adf8(0x198)](_0x99d8cf=>_0x56810b(_0x99d8cf,_0x293a85['id']))};}return null;}let S=class{constructor(_0x40c14a,_0x5ce7d5,_0x55de4b){const _0x123821=_0x4be5b3;this[_0x123821(0x1d7)]=_0x40c14a,this[_0x123821(0x1a7)]=_0x5ce7d5,this[_0x123821(0x19f)]=_0x55de4b;}async['addComment'](_0x58c55d){const _0x45ceed=_0x4be5b3;var _0x3e12b6,_0x1e052c;const {parentId:_0x4df7d4,unitId:_0x591586,text:_0x43494a,threadId:_0x2bf97a}=_0x58c55d,_0x3c88dd=(_0x1e052c=(_0x3e12b6=_0x43494a['customRanges'])==null?void 0x0:_0x3e12b6[_0x45ceed(0x1bd)](_0x340868=>_0x340868['rangeType']===_0x1616aa[_0x45ceed(0x1e7)])[_0x45ceed(0x198)](_0x22f17f=>_0x22f17f[_0x45ceed(0x18e)]))!=null?_0x1e052c:[],_0x3d9c9c=JSON[_0x45ceed(0x1c3)](_0x43494a),_0x2e9da5=(await this[_0x45ceed(0x19f)][_0x45ceed(0x1a1)](_0x591586))[_0x45ceed(0x19b)]();if(_0x4df7d4){const _0x17a410={'memberId':_0x2e9da5,'unitId':_0x591586,'content':_0x3d9c9c,'mention':_0x3c88dd,'threadId':_0x2bf97a},_0x5c5879=(await this[_0x45ceed(0x1d7)][_0x45ceed(0x1e5)]('/universer-api/comment/unit/'+_0x591586+'/reply',{'body':_0x17a410}))[_0x45ceed(0x1eb)]['reply'];return{..._0x58c55d,'id':_0x5c5879[_0x45ceed(0x1cb)],'dT':_0x36859c(+_0x5c5879[_0x45ceed(0x1c4)])[_0x45ceed(0x1e2)](_0x45ceed(0x1b7)),'personId':_0x5c5879['userId']};}else{const _0x4422dd={'memberId':_0x2e9da5,'unitId':_0x591586,'content':_0x3d9c9c,'mention':_0x3c88dd},_0x4a9ec9=await this[_0x45ceed(0x1d7)][_0x45ceed(0x1e5)](_0x45ceed(0x1a6)+_0x591586+_0x45ceed(0x19d),{'body':_0x4422dd});return X(_0x4a9ec9[_0x45ceed(0x1eb)]['comment'],_0x58c55d);}}async[_0x4be5b3(0x1e6)](_0x1ac0dd){const _0x24cc5b=_0x4be5b3;var _0x5200cc,_0x16fc21;const {text:_0x68b12e,unitId:_0x3adde9}=_0x1ac0dd,_0x14adf6=(_0x16fc21=(_0x5200cc=_0x68b12e['customRanges'])==null?void 0x0:_0x5200cc['filter'](_0x18f2cb=>_0x18f2cb[_0x24cc5b(0x1e4)]===_0x1616aa[_0x24cc5b(0x1e7)])[_0x24cc5b(0x198)](_0x2aff4c=>_0x2aff4c[_0x24cc5b(0x18e)]))!=null?_0x16fc21:[],_0x27d2a3=JSON[_0x24cc5b(0x1c3)](_0x68b12e),_0x213781=_0x1ac0dd['threadId'],_0x110ae8=_0x1ac0dd['id'],_0x2e7412={'memberId':(await this[_0x24cc5b(0x19f)]['requireSession'](_0x3adde9))[_0x24cc5b(0x19b)](),'unitId':_0x3adde9,'threadId':_0x213781,'mention':_0x14adf6,'content':_0x27d2a3,'replyId':_0x110ae8},_0x1541fc=await this[_0x24cc5b(0x1d7)]['post'](_0x24cc5b(0x1a6)+_0x3adde9+'/edit',{'body':_0x2e7412});return!_0x1541fc['body'][_0x24cc5b(0x1ce)]||_0x1541fc[_0x24cc5b(0x1eb)][_0x24cc5b(0x1ce)][_0x24cc5b(0x1e1)]===0x1;}async[_0x4be5b3(0x195)](_0x179726){const _0x272026=_0x4be5b3,{unitId:_0x50c08e}=_0x179726,_0x385703=_0x179726['threadId'],_0x1b930c={'memberId':this[_0x272026(0x1a7)]['getCurrentUser']()['userID'],'unitId':_0x50c08e,'threadId':_0x385703,'solved':_0x179726[_0x272026(0x1ac)]?I[_0x272026(0x1c6)]:I[_0x272026(0x1d3)]},_0x21a1d2=await this[_0x272026(0x1d7)]['post']('/universer-api/comment/unit/'+_0x50c08e+_0x272026(0x1cc),{'body':_0x1b930c});return!_0x21a1d2[_0x272026(0x1eb)][_0x272026(0x1ce)]||_0x21a1d2[_0x272026(0x1eb)]['error']['code']===0x1;}async[_0x4be5b3(0x1df)](_0x5311c1,_0x50d0ac,_0x23524e,_0x456054){const _0x1654f0=_0x4be5b3,_0x31f401={'memberId':(await this[_0x1654f0(0x19f)][_0x1654f0(0x1a1)](_0x5311c1))[_0x1654f0(0x19b)](),'threadId':_0x23524e,'replyId':_0x456054,'unitId':_0x5311c1},_0xb13796=await this['_httpService'][_0x1654f0(0x1e5)](_0x1654f0(0x1a6)+_0x5311c1+_0x1654f0(0x1be),{'body':_0x31f401});return!_0xb13796[_0x1654f0(0x1eb)][_0x1654f0(0x1ce)]||_0xb13796['body'][_0x1654f0(0x1ce)][_0x1654f0(0x1e1)]===0x1;}async[_0x4be5b3(0x1c5)](_0x3f4fd1,_0x1b4c5f,_0x3308c7){const _0x23955b=_0x4be5b3,_0x24d00c={'unitId':_0x3f4fd1,'threadId':_0x3308c7},_0x3cd45a=await this['_httpService']['post'](_0x23955b(0x1a6)+_0x3f4fd1+_0x23955b(0x1c2),{'body':_0x24d00c}),_0x211e1f=_0x3308c7[_0x23955b(0x198)](_0x5578ac=>ee(_0x3cd45a[_0x23955b(0x1eb)][_0x23955b(0x1b1)][_0x5578ac],_0x3f4fd1,_0x1b4c5f))[_0x23955b(0x1bd)](Boolean);return Object[_0x23955b(0x191)](_0x3cd45a['body'][_0x23955b(0x197)])[_0x23955b(0x1e3)](_0x4d0b71=>{const _0x4c417c=_0x23955b;this[_0x4c417c(0x1a7)][_0x4c417c(0x1d9)](_0x4d0b71);}),_0x211e1f;}[_0x4be5b3(0x1b3)](_0x5eacf1){const _0x1d83bc=_0x4be5b3;return{'id':_0x5eacf1['id'],'threadId':_0x5eacf1['threadId'],'ref':_0x5eacf1[_0x1d83bc(0x1d2)]};}};S=Q([b(0x0,_0x33e49e(_0x480aa6)),b(0x1,_0x33e49e(_0x394c60)),b(0x2,_0x33e49e(_0x26789c))],S);var re=Object[_0x4be5b3(0x1a0)],te=(_0x338c07,_0x46c708,_0x7f2c61,_0x3945d9)=>{for(var _0x35d075=_0x3945d9>0x1?void 0x0:_0x3945d9?re(_0x46c708,_0x7f2c61):_0x46c708,_0xd66b61=_0x338c07['length']-0x1,_0x450687;_0xd66b61>=0x0;_0xd66b61--)(_0x450687=_0x338c07[_0xd66b61])&&(_0x35d075=_0x450687(_0x35d075)||_0x35d075);return _0x35d075;},M=(_0x9e05aa,_0x479a0c)=>(_0x497713,_0xf4d726)=>_0x479a0c(_0x497713,_0xf4d726,_0x9e05aa);let f=class extends _0x55890b{constructor(_0xb27e14,_0x1635f6){const _0x560b61=_0x4be5b3;super(),this[_0x560b61(0x19e)]=_0xb27e14,this[_0x560b61(0x1cf)]=_0x1635f6,this[_0x560b61(0x199)]();}[_0x4be5b3(0x199)](){const _0x4f9ec1=_0x4be5b3;this[_0x4f9ec1(0x19e)][_0x4f9ec1(0x1a8)]=this[_0x4f9ec1(0x1cf)],this[_0x4f9ec1(0x19e)][_0x4f9ec1(0x1db)]=!0x1;}};f=te([M(0x0,_0x1fe3bb),M(0x1,_0x33e49e(S))],f);var se=Object[_0x4be5b3(0x1b8)],oe=Object[_0x4be5b3(0x1a0)],ne=(_0x5b557e,_0xd09fd3,_0x3b826a)=>_0xd09fd3 in _0x5b557e?se(_0x5b557e,_0xd09fd3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b826a}):_0x5b557e[_0xd09fd3]=_0x3b826a,ie=(_0x323644,_0x58a8ed,_0x392cd8,_0x102a56)=>{const _0x2502fc=_0x4be5b3;for(var _0x46a692=_0x102a56>0x1?void 0x0:_0x102a56?oe(_0x58a8ed,_0x392cd8):_0x58a8ed,_0x2d6fe4=_0x323644[_0x2502fc(0x1d4)]-0x1,_0x7a68ff;_0x2d6fe4>=0x0;_0x2d6fe4--)(_0x7a68ff=_0x323644[_0x2d6fe4])&&(_0x46a692=_0x7a68ff(_0x46a692)||_0x46a692);return _0x46a692;},N=(_0x43564b,_0x400142)=>(_0x1688dc,_0x4c6459)=>_0x400142(_0x1688dc,_0x4c6459,_0x43564b),$=(_0xf48b47,_0x1caab6,_0x12f446)=>ne(_0xf48b47,typeof _0x1caab6!=_0x4be5b3(0x196)?_0x1caab6+'':_0x1caab6,_0x12f446);let g=class extends _0x4bb65f{constructor(_0xc5acac=O,_0x32b2fb,_0x47878b){const _0x3feb41=_0x4be5b3;super(),this[_0x3feb41(0x1e0)]=_0xc5acac,this['_injector']=_0x32b2fb,this['_configService']=_0x47878b;const {..._0x2415cd}=_0x5765b9({},O,this[_0x3feb41(0x1e0)]);this[_0x3feb41(0x192)][_0x3feb41(0x1ab)](z,_0x2415cd);}[_0x4be5b3(0x1b6)](){[[S],[f],[_]]['forEach'](_0x3de745=>{const _0x4f6067=_0x1a8d;this[_0x4f6067(0x1dd)]['add'](_0x3de745);});}[_0x4be5b3(0x19c)](){const _0x3cbe5d=_0x4be5b3;this[_0x3cbe5d(0x1dd)][_0x3cbe5d(0x1ad)](f),this[_0x3cbe5d(0x1dd)][_0x3cbe5d(0x1ad)](_);}};function _0x34cc(){const _0x181439=['forEach','rangeType','post','updateComment','COMMENT','Solve','payload','424884abwKZI','body','Unknown','/universer-api/user/list','UNRECOGNIZED','disposeWithMe','2NDMHQz','rangeId','commentUpdate$','type','values','_configService','Reply','Delete','resolveComment','symbol','users','map','_initDataSource','slice','getMemberID','onReady','/add','_threadCommentDataSourceService','_sessionService','getOwnPropertyDescriptor','requireSession','solved','getComment','152199xNsJNo','780411paobWA','/universer-api/comment/unit/','_userService','dataSource','1362546scPgnO','_init','setConfig','resolved','get','threadId','80460nItmkz','replies','comments','Edit','saveCommentToSnapshot','parse','root','onStarting','YYYY/MM/DD\x20HH:mm','defineProperty','4prQdaz','407VIOWdl','find','1602055YdMvBH','filter','/delete','add','UNIVER_UNKNOWN','user','/list','stringify','createTimestamp','listComments','Solved','50IHpiUi','728872gnzMxY','_threadCommentModel','subscribe','replyId','/solved','parentId','error','_threadCommentDataSource','content','getUnit','ref','OpenOrReOpen','length','unitId','14ZCiQWC','_httpService','Add','addUser','_initUserSync','syncUpdateMutationToColla','userId','_injector','pipe','deleteComment','_config','code','format'];_0x34cc=function(){return _0x181439;};return _0x34cc();}$(g,'pluginName',W),$(g,'type',_0x471339[_0x4be5b3(0x1c0)]),g=ie([_0x41b532(_0x2b0062,_0x632fbe,_0x4dad28),N(0x1,_0x33e49e(_0x36e64b)),N(0x2,_0x707352)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x15cd(){const _0x3ba6ad=['Reply','Unknown','_threadCommentDataSource','4tdPchq','6fbgOrZ','type','8627880tAtNqW','1528BYvkDZ','/universer-api/user/list','requireSession','add','createTimestamp','8208SlrLsQ','_initUserSync','_userService','symbol','resolveComment','/solved','3139455byeWhe','filter','dataSource','_injector','deleteComment','YYYY/MM/DD\x20HH:mm','commentUpdate$','addComment','replyId','content','user','threadId','error','reply','unitId','format','forEach','_config','syncUpdateMutationToColla','getMemberID','4093453GWzeSq','_threadCommentModel','159OzTvAV','disposeWithMe','/universer-api/comment/unit/','subscribe','onReady','Solved','rangeType','Solve','getOwnPropertyDescriptor','ref','setConfig','/add','_init','20966bfBniH','Add','slice','_configService','/reply','replies','values','_sessionService','_threadCommentDataSourceService','solved','get','OpenOrReOpen','308996SmvDBF','COMMENT','body','users','_httpService','payload','onStarting','getCurrentUser','UNRECOGNIZED','parse','/delete','code','getUser','listComments','post','getUnit','Delete','userID','thread-comment-data-source.config','8796FQzEkC','_initDataSource','userId','find','rangeId','personId','root','length','customRanges','comment','4160RbcSyz','Edit','delete','stringify','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','addUser'];_0x15cd=function(){return _0x3ba6ad;};return _0x15cd();}const _0x484af3=_0x448c;(function(_0x905c0e,_0x2fab82){const _0x4e6bd0=_0x448c,_0x3ba09a=_0x905c0e();while(!![]){try{const _0x3bde17=parseInt(_0x4e6bd0(0xb4))/0x1*(-parseInt(_0x4e6bd0(0xdb))/0x2)+parseInt(_0x4e6bd0(0x9b))/0x3*(-parseInt(_0x4e6bd0(0xdf))/0x4)+parseInt(_0x4e6bd0(0xea))/0x5+-parseInt(_0x4e6bd0(0xdc))/0x6*(-parseInt(_0x4e6bd0(0x99))/0x7)+-parseInt(_0x4e6bd0(0xd1))/0x8*(-parseInt(_0x4e6bd0(0xe4))/0x9)+parseInt(_0x4e6bd0(0xde))/0xa+parseInt(_0x4e6bd0(0xa8))/0xb*(-parseInt(_0x4e6bd0(0xc7))/0xc);if(_0x3bde17===_0x2fab82)break;else _0x3ba09a['push'](_0x3ba09a['shift']());}catch(_0x5f0343){_0x3ba09a['push'](_0x3ba09a['shift']());}}}(_0x15cd,0x7d93a));import{CommentService as _0x410c99,CollaborationSessionService as _0x844a5f,UniverCollaborationClientPlugin as _0x706f71}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3aca80}from'@univerjs-pro/license';import{dayjs as _0x16b3d9,UserManagerService as _0x587f73,Inject as _0x489677,Injector as _0x4b33d3,Disposable as _0x3eeb98,CustomRangeType as _0x25a850,UniverInstanceType as _0x4f170b,DependentOn as _0x24b919,IConfigService as _0x1d6929,Plugin as _0x284dc3,merge as _0x35db6f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3da613}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2321f4,IThreadCommentDataSourceService as _0x3e8143}from'@univerjs/thread-comment';import{bufferTime as _0x46d570}from'rxjs';import{HTTPService as _0x5d2277}from'@univerjs/network';const W=_0x484af3(0xd5);var I=(_0x2417ab=>(_0x2417ab[_0x2417ab[_0x484af3(0xb3)]=0x0]=_0x484af3(0xb3),_0x2417ab[_0x2417ab[_0x484af3(0xa0)]=0x1]=_0x484af3(0xa0),_0x2417ab[_0x2417ab[_0x484af3(0xbc)]=-0x1]='UNRECOGNIZED',_0x2417ab))(I||{}),v=(_0x460bd6=>(_0x460bd6[_0x460bd6[_0x484af3(0xd9)]=0x0]=_0x484af3(0xd9),_0x460bd6[_0x460bd6['Add']=0x1]=_0x484af3(0xa9),_0x460bd6[_0x460bd6[_0x484af3(0xd8)]=0x2]=_0x484af3(0xd8),_0x460bd6[_0x460bd6['Edit']=0x3]=_0x484af3(0xd2),_0x460bd6[_0x460bd6['Delete']=0x4]=_0x484af3(0xc4),_0x460bd6[_0x460bd6[_0x484af3(0xa2)]=0x5]=_0x484af3(0xa2),_0x460bd6[_0x460bd6[_0x484af3(0xbc)]=-0x1]=_0x484af3(0xbc),_0x460bd6))(v||{});const y=_0x3bf6e9=>_0x16b3d9(new Date(+_0x3bf6e9))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x48c2bc,_0x2ddefc)=>{const _0x32cea1=_0x484af3,_0x22886a=_0x48c2bc[_0x32cea1(0xb2)](_0x587f73),_0x57fd7f=_0x48c2bc[_0x32cea1(0xb2)](_0x5d2277);_0x2ddefc[_0x32cea1(0x95)](_0x4de656=>{const _0x14126e=_0x32cea1;_0x22886a[_0x14126e(0xc0)](_0x4de656)&&_0x2ddefc[_0x14126e(0xd3)](_0x4de656);}),_0x2ddefc['size']&&(await _0x57fd7f[_0x32cea1(0xb2)](_0x32cea1(0xe0),{'params':{'userIDs':[..._0x2ddefc]}}))['body'][_0x32cea1(0xb7)][_0x32cea1(0x95)](_0x15b07d=>{const _0x2ab095=_0x32cea1;_0x15b07d&&_0x22886a[_0x2ab095(0xd7)](_0x15b07d);});};function _0x448c(_0x2064a8,_0xe4404c){const _0x15cd26=_0x15cd();return _0x448c=function(_0x448ca1,_0x37a6e6){_0x448ca1=_0x448ca1-0x93;let _0x768dfc=_0x15cd26[_0x448ca1];return _0x768dfc;},_0x448c(_0x2064a8,_0xe4404c);}var K=Object[_0x484af3(0xa3)],V=(_0x10d94f,_0x2b18be,_0x3f5aea,_0x35c7f2)=>{const _0x3ebb44=_0x484af3;for(var _0x324436=_0x35c7f2>0x1?void 0x0:_0x35c7f2?K(_0x2b18be,_0x3f5aea):_0x2b18be,_0x3ae2d1=_0x10d94f[_0x3ebb44(0xce)]-0x1,_0xbf06f2;_0x3ae2d1>=0x0;_0x3ae2d1--)(_0xbf06f2=_0x10d94f[_0x3ae2d1])&&(_0x324436=_0xbf06f2(_0x324436)||_0x324436);return _0x324436;},p=(_0x4c2e6d,_0x5589a2)=>(_0x495644,_0x15801a)=>_0x5589a2(_0x495644,_0x15801a,_0x4c2e6d);let _=class extends _0x3eeb98{constructor(_0x934b1e,_0x4ee911,_0x1bffd9,_0x404782){const _0x2dc7e3=_0x484af3;super(),this['_commentService']=_0x934b1e,this[_0x2dc7e3(0x9a)]=_0x4ee911,this[_0x2dc7e3(0xe6)]=_0x1bffd9,this[_0x2dc7e3(0xed)]=_0x404782,this[_0x2dc7e3(0xa7)](),this[_0x2dc7e3(0xe5)]();}[_0x484af3(0xe5)](){const _0x5ec0d8=_0x484af3;this['disposeWithMe'](this[_0x5ec0d8(0x9a)]['commentUpdate$']['pipe'](_0x46d570(0x10))['subscribe'](_0x520229=>{const _0x41e715=_0x5ec0d8,_0x11d514=new Set();_0x520229[_0x41e715(0x95)](_0x3a4c8a=>{const _0x31cd41=_0x41e715;switch(_0x3a4c8a[_0x31cd41(0xdd)]){case _0x31cd41(0xe2):{const _0x1faa56=_0x3a4c8a[_0x31cd41(0xb9)][_0x31cd41(0xcc)];_0x11d514['add'](_0x1faa56);break;}}}),B(this[_0x41e715(0xed)],_0x11d514);}));}[_0x484af3(0xa7)](){const _0x181688=_0x484af3;this[_0x181688(0x9c)](this['_commentService'][_0x181688(0xf0)][_0x181688(0x9e)](async _0x3f64d0=>{const _0x2ba8d1=_0x181688;var _0x5ca012,_0x4dce7e,_0x515b93,_0x1fcfb8;const _0x981617=(_0x5ca012=this[_0x2ba8d1(0x9a)][_0x2ba8d1(0xc3)](_0x3f64d0[_0x2ba8d1(0x93)])[_0x2ba8d1(0xca)](_0x500fe0=>_0x500fe0['threadId']===_0x3f64d0[_0x2ba8d1(0xf5)]))==null?void 0x0:_0x5ca012[_0x2ba8d1(0xcd)];if(!_0x981617)return;const {unitId:_0xe883c0,subUnitId:_0x1c9acb}=_0x981617;switch(_0x3f64d0[_0x2ba8d1(0xf4)]&&this[_0x2ba8d1(0xe6)][_0x2ba8d1(0xd7)](_0x3f64d0[_0x2ba8d1(0xf4)]),_0x3f64d0[_0x2ba8d1(0xdd)]){case v[_0x2ba8d1(0xa9)]:break;case v['Reply']:{this[_0x2ba8d1(0x9a)][_0x2ba8d1(0xf1)](_0xe883c0,_0x1c9acb,{'unitId':_0xe883c0,'subUnitId':_0x1c9acb,'ref':'','id':_0x3f64d0['replyId'],'dT':y(+_0x3f64d0['createTimestamp']),'threadId':_0x3f64d0[_0x2ba8d1(0xf5)],'personId':(_0x515b93=(_0x4dce7e=_0x3f64d0[_0x2ba8d1(0xf4)])==null?void 0x0:_0x4dce7e[_0x2ba8d1(0xc5)])!=null?_0x515b93:_0x3f64d0[_0x2ba8d1(0xc9)],'text':JSON[_0x2ba8d1(0xbd)](_0x3f64d0[_0x2ba8d1(0xf3)]),'parentId':_0x981617['id']});break;}case v[_0x2ba8d1(0xc4)]:{const _0x2321f3=this[_0x2ba8d1(0x9a)]['getComment'](_0xe883c0,_0x1c9acb,_0x3f64d0[_0x2ba8d1(0xf2)]);_0x2321f3&&_0x2321f3['parentId']&&this[_0x2ba8d1(0x9a)]['deleteComment'](_0xe883c0,_0x1c9acb,_0x3f64d0[_0x2ba8d1(0xf2)]);break;}case v[_0x2ba8d1(0xd2)]:{this['_threadCommentModel']['updateComment'](_0xe883c0,_0x1c9acb,{'commentId':_0x3f64d0[_0x2ba8d1(0xf2)],'text':JSON[_0x2ba8d1(0xbd)](_0x3f64d0[_0x2ba8d1(0xf3)])});break;}case v[_0x2ba8d1(0xa2)]:{const _0x2037ac=(_0x1fcfb8=this[_0x2ba8d1(0x9a)][_0x2ba8d1(0xc3)](_0x3f64d0['unitId'])[_0x2ba8d1(0xca)](_0x1bc15e=>_0x1bc15e[_0x2ba8d1(0xf5)]===_0x3f64d0[_0x2ba8d1(0xf5)]))==null?void 0x0:_0x1fcfb8['root'];_0x2037ac&&this['_threadCommentModel'][_0x2ba8d1(0xe8)](_0xe883c0,_0x1c9acb,_0x2037ac['id'],_0x3f64d0[_0x2ba8d1(0xb1)]===I[_0x2ba8d1(0xa0)]);break;}}}));}};_=V([p(0x0,_0x489677(_0x410c99)),p(0x1,_0x489677(_0x2321f4)),p(0x2,_0x489677(_0x587f73)),p(0x3,_0x489677(_0x4b33d3))],_);const z=_0x484af3(0xc6),O={};var k=Object[_0x484af3(0xa3)],Q=(_0x21b830,_0x5a1f04,_0x5e9582,_0x351cc0)=>{const _0x1befda=_0x484af3;for(var _0x2b57e4=_0x351cc0>0x1?void 0x0:_0x351cc0?k(_0x5a1f04,_0x5e9582):_0x5a1f04,_0x195b38=_0x21b830[_0x1befda(0xce)]-0x1,_0x429f7f;_0x195b38>=0x0;_0x195b38--)(_0x429f7f=_0x21b830[_0x195b38])&&(_0x2b57e4=_0x429f7f(_0x2b57e4)||_0x2b57e4);return _0x2b57e4;},b=(_0x11471f,_0x4d8b98)=>(_0x306e83,_0x4cef75)=>_0x4d8b98(_0x306e83,_0x4cef75,_0x11471f);function X(_0x4d28c0,_0x35001c){const _0x487168=_0x484af3,_0x4ec3d8=_0x4d28c0['replies'][0x0];return{..._0x35001c,'id':_0x4ec3d8['replyId'],'resolved':_0x4d28c0['solved']===0x1,'dT':y(_0x4ec3d8[_0x487168(0xe3)]),'personId':_0x4ec3d8[_0x487168(0xc9)],'threadId':_0x4ec3d8[_0x487168(0xf5)]};}function ee(_0x5a4fd0,_0x4bc89f,_0x262494){const _0x1a90c7=_0x484af3;var _0x592fa9,_0x1bbd44;if(((_0x1bbd44=(_0x592fa9=_0x5a4fd0==null?void 0x0:_0x5a4fd0[_0x1a90c7(0xad)])==null?void 0x0:_0x592fa9['length'])!=null?_0x1bbd44:0x0)>0x0){const _0xd0b0a5=(_0x35b21e,_0x2e4267)=>({'id':_0x35b21e[_0x1a90c7(0xf2)],'threadId':_0x35b21e[_0x1a90c7(0xf5)],'dT':y(_0x35b21e[_0x1a90c7(0xe3)]),'personId':_0x35b21e['userId'],'resolved':_0x5a4fd0[_0x1a90c7(0xb1)]===I['Solved'],'unitId':_0x4bc89f,'subUnitId':_0x262494,'text':JSON['parse'](_0x35b21e['content']),'parentId':_0x2e4267}),_0xfd9577=_0xd0b0a5(_0x5a4fd0[_0x1a90c7(0xad)][0x0]);return{..._0xfd9577,'children':_0x5a4fd0[_0x1a90c7(0xad)][_0x1a90c7(0xaa)](0x1)['map'](_0x45e001=>_0xd0b0a5(_0x45e001,_0xfd9577['id']))};}return null;}let S=class{constructor(_0xb47edd,_0x35a420,_0x2a58a1){const _0x183084=_0x484af3;this[_0x183084(0xb8)]=_0xb47edd,this[_0x183084(0xe6)]=_0x35a420,this[_0x183084(0xaf)]=_0x2a58a1;}async[_0x484af3(0xf1)](_0x542a55){const _0x4a0d05=_0x484af3;var _0x3e71a4,_0x1d1a48;const {parentId:_0x2fd295,unitId:_0xf5a6b1,text:_0x57d8ea,threadId:_0x1b1f97}=_0x542a55,_0x2d3f20=(_0x1d1a48=(_0x3e71a4=_0x57d8ea['customRanges'])==null?void 0x0:_0x3e71a4[_0x4a0d05(0xeb)](_0x450d52=>_0x450d52[_0x4a0d05(0xa1)]===_0x25a850['COMMENT'])[_0x4a0d05(0xd6)](_0x50863b=>_0x50863b[_0x4a0d05(0xcb)]))!=null?_0x1d1a48:[],_0x3cfdde=JSON[_0x4a0d05(0xd4)](_0x57d8ea),_0x452449=(await this[_0x4a0d05(0xaf)][_0x4a0d05(0xe1)](_0xf5a6b1))[_0x4a0d05(0x98)]();if(_0x2fd295){const _0x3aa433={'memberId':_0x452449,'unitId':_0xf5a6b1,'content':_0x3cfdde,'mention':_0x2d3f20,'threadId':_0x1b1f97},_0x42fe71=(await this[_0x4a0d05(0xb8)][_0x4a0d05(0xc2)]('/universer-api/comment/unit/'+_0xf5a6b1+_0x4a0d05(0xac),{'body':_0x3aa433}))[_0x4a0d05(0xb6)][_0x4a0d05(0xf7)];return{..._0x542a55,'id':_0x42fe71[_0x4a0d05(0xf2)],'dT':_0x16b3d9(+_0x42fe71[_0x4a0d05(0xe3)])[_0x4a0d05(0x94)](_0x4a0d05(0xef)),'personId':_0x42fe71[_0x4a0d05(0xc9)]};}else{const _0x53bf30={'memberId':_0x452449,'unitId':_0xf5a6b1,'content':_0x3cfdde,'mention':_0x2d3f20},_0x1ec399=await this[_0x4a0d05(0xb8)]['post'](_0x4a0d05(0x9d)+_0xf5a6b1+_0x4a0d05(0xa6),{'body':_0x53bf30});return X(_0x1ec399['body'][_0x4a0d05(0xd0)],_0x542a55);}}async['updateComment'](_0x3002fb){const _0x55c190=_0x484af3;var _0x2180f7,_0x37dbc6;const {text:_0x36e5e5,unitId:_0x23d397}=_0x3002fb,_0x29f0f6=(_0x37dbc6=(_0x2180f7=_0x36e5e5[_0x55c190(0xcf)])==null?void 0x0:_0x2180f7[_0x55c190(0xeb)](_0x2878b4=>_0x2878b4[_0x55c190(0xa1)]===_0x25a850[_0x55c190(0xb5)])[_0x55c190(0xd6)](_0x40f54e=>_0x40f54e[_0x55c190(0xcb)]))!=null?_0x37dbc6:[],_0xae4095=JSON[_0x55c190(0xd4)](_0x36e5e5),_0x2a6771=_0x3002fb[_0x55c190(0xf5)],_0x56cf47=_0x3002fb['id'],_0x130163={'memberId':(await this[_0x55c190(0xaf)][_0x55c190(0xe1)](_0x23d397))['getMemberID'](),'unitId':_0x23d397,'threadId':_0x2a6771,'mention':_0x29f0f6,'content':_0xae4095,'replyId':_0x56cf47},_0xc88552=await this[_0x55c190(0xb8)][_0x55c190(0xc2)](_0x55c190(0x9d)+_0x23d397+'/edit',{'body':_0x130163});return!_0xc88552[_0x55c190(0xb6)][_0x55c190(0xf6)]||_0xc88552[_0x55c190(0xb6)]['error'][_0x55c190(0xbf)]===0x1;}async[_0x484af3(0xe8)](_0x5ee94c){const _0x5717fa=_0x484af3,{unitId:_0x365c3d}=_0x5ee94c,_0xefed8a=_0x5ee94c[_0x5717fa(0xf5)],_0xc0b204={'memberId':this[_0x5717fa(0xe6)][_0x5717fa(0xbb)]()['userID'],'unitId':_0x365c3d,'threadId':_0xefed8a,'solved':_0x5ee94c['resolved']?I[_0x5717fa(0xa0)]:I[_0x5717fa(0xb3)]},_0x3b8582=await this['_httpService'][_0x5717fa(0xc2)]('/universer-api/comment/unit/'+_0x365c3d+_0x5717fa(0xe9),{'body':_0xc0b204});return!_0x3b8582['body']['error']||_0x3b8582['body'][_0x5717fa(0xf6)][_0x5717fa(0xbf)]===0x1;}async[_0x484af3(0xee)](_0x1d2846,_0x559a89,_0x21f46c,_0x2ce7cc){const _0x8e75cd=_0x484af3,_0x3c700f={'memberId':(await this['_sessionService'][_0x8e75cd(0xe1)](_0x1d2846))[_0x8e75cd(0x98)](),'threadId':_0x21f46c,'replyId':_0x2ce7cc,'unitId':_0x1d2846},_0x538de8=await this[_0x8e75cd(0xb8)][_0x8e75cd(0xc2)](_0x8e75cd(0x9d)+_0x1d2846+_0x8e75cd(0xbe),{'body':_0x3c700f});return!_0x538de8[_0x8e75cd(0xb6)][_0x8e75cd(0xf6)]||_0x538de8[_0x8e75cd(0xb6)]['error'][_0x8e75cd(0xbf)]===0x1;}async[_0x484af3(0xc1)](_0x46a981,_0x502468,_0x3d0730){const _0x1c029c=_0x484af3,_0x208a1e={'unitId':_0x46a981,'threadId':_0x3d0730},_0x201c48=await this[_0x1c029c(0xb8)][_0x1c029c(0xc2)]('/universer-api/comment/unit/'+_0x46a981+'/list',{'body':_0x208a1e}),_0x5ad548=_0x3d0730[_0x1c029c(0xd6)](_0x2c81d2=>ee(_0x201c48['body']['comments'][_0x2c81d2],_0x46a981,_0x502468))[_0x1c029c(0xeb)](Boolean);return Object[_0x1c029c(0xae)](_0x201c48[_0x1c029c(0xb6)][_0x1c029c(0xb7)])[_0x1c029c(0x95)](_0x58c6fd=>{const _0x2b548c=_0x1c029c;this[_0x2b548c(0xe6)][_0x2b548c(0xd7)](_0x58c6fd);}),_0x5ad548;}['saveCommentToSnapshot'](_0x18ec7f){const _0xcd3cdc=_0x484af3;return{'id':_0x18ec7f['id'],'threadId':_0x18ec7f[_0xcd3cdc(0xf5)],'ref':_0x18ec7f[_0xcd3cdc(0xa4)]};}};S=Q([b(0x0,_0x489677(_0x5d2277)),b(0x1,_0x489677(_0x587f73)),b(0x2,_0x489677(_0x844a5f))],S);var re=Object[_0x484af3(0xa3)],te=(_0x40e849,_0xea08,_0x4eadd1,_0x6dc0b0)=>{const _0x10cf87=_0x484af3;for(var _0x1cb20f=_0x6dc0b0>0x1?void 0x0:_0x6dc0b0?re(_0xea08,_0x4eadd1):_0xea08,_0x2a77e3=_0x40e849[_0x10cf87(0xce)]-0x1,_0x7d6160;_0x2a77e3>=0x0;_0x2a77e3--)(_0x7d6160=_0x40e849[_0x2a77e3])&&(_0x1cb20f=_0x7d6160(_0x1cb20f)||_0x1cb20f);return _0x1cb20f;},M=(_0x233f64,_0x42e0ce)=>(_0x110b6e,_0x1eea80)=>_0x42e0ce(_0x110b6e,_0x1eea80,_0x233f64);let f=class extends _0x3eeb98{constructor(_0x5eb981,_0x152c19){const _0x4e4333=_0x484af3;super(),this[_0x4e4333(0xb0)]=_0x5eb981,this[_0x4e4333(0xda)]=_0x152c19,this[_0x4e4333(0xc8)]();}[_0x484af3(0xc8)](){const _0x20935a=_0x484af3;this[_0x20935a(0xb0)][_0x20935a(0xec)]=this[_0x20935a(0xda)],this[_0x20935a(0xb0)][_0x20935a(0x97)]=!0x1;}};f=te([M(0x0,_0x3e8143),M(0x1,_0x489677(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x242656,_0x368037,_0x533a56)=>_0x368037 in _0x242656?se(_0x242656,_0x368037,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x533a56}):_0x242656[_0x368037]=_0x533a56,ie=(_0x5efba4,_0xe6c025,_0x47db5e,_0x5e550c)=>{const _0x5946bf=_0x484af3;for(var _0x25ea17=_0x5e550c>0x1?void 0x0:_0x5e550c?oe(_0xe6c025,_0x47db5e):_0xe6c025,_0x2d8507=_0x5efba4[_0x5946bf(0xce)]-0x1,_0x8838ce;_0x2d8507>=0x0;_0x2d8507--)(_0x8838ce=_0x5efba4[_0x2d8507])&&(_0x25ea17=_0x8838ce(_0x25ea17)||_0x25ea17);return _0x25ea17;},N=(_0x42d093,_0x369d82)=>(_0x195ffc,_0x3a2654)=>_0x369d82(_0x195ffc,_0x3a2654,_0x42d093),$=(_0x2996cf,_0x475366,_0x41333f)=>ne(_0x2996cf,typeof _0x475366!=_0x484af3(0xe7)?_0x475366+'':_0x475366,_0x41333f);let g=class extends _0x284dc3{constructor(_0x5516de=O,_0x2030a7,_0x5c15f7){const _0x47dfe4=_0x484af3;super(),this[_0x47dfe4(0x96)]=_0x5516de,this[_0x47dfe4(0xed)]=_0x2030a7,this[_0x47dfe4(0xab)]=_0x5c15f7;const {..._0x8f9e45}=_0x35db6f({},O,this[_0x47dfe4(0x96)]);this[_0x47dfe4(0xab)][_0x47dfe4(0xa5)](z,_0x8f9e45);}[_0x484af3(0xba)](){const _0x481b45=_0x484af3;[[S],[f],[_]][_0x481b45(0x95)](_0x16081b=>{const _0x37ac73=_0x481b45;this[_0x37ac73(0xed)][_0x37ac73(0xe2)](_0x16081b);});}[_0x484af3(0x9f)](){const _0x57a4ab=_0x484af3;this[_0x57a4ab(0xed)]['get'](f),this[_0x57a4ab(0xed)]['get'](_);}};$(g,'pluginName',W),$(g,'type',_0x4f170b['UNIVER_UNKNOWN']),g=ie([_0x24b919(_0x3da613,_0x706f71,_0x3aca80),N(0x1,_0x489677(_0x4b33d3)),N(0x2,_0x1d6929)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x3c2c(_0x71f4d1,_0x2fa892){const _0x25ccfe=_0x25cc();return _0x3c2c=function(_0x3c2c9f,_0x4b5b72){_0x3c2c9f=_0x3c2c9f-0x105;let _0x1dac27=_0x25ccfe[_0x3c2c9f];return _0x1dac27;},_0x3c2c(_0x71f4d1,_0x2fa892);}function _0x25cc(){const _0x2f37a7=['Solved','replies','pipe','Plugin','_threadCommentDataSource','content','_configService','_initDataSource','Injector','Solve','values','addUser','_initUserSync','format','personId','getUser','map','userID','_commentService','@univerjs/thread-comment-ui','users','Edit','Unknown','239676UCsgbb','subscribe','707368faDQNI','UniverThreadCommentDataSourcePlugin','505855PqrsmM','onStarting','post','Inject','UserManagerService','/list','add','ThreadCommentModel','user','body','comment','@univerjs-pro/collaboration-client','unitId','defineProperty','_injector','COMMENT','rangeType','createTimestamp','customRanges','type','YYYY/MM/DD\x20HH:mm','UniverProCollaborationClient','UniverThreadCommentUIPlugin','disposeWithMe','getUnit','1990HJvZua','/universer-api/user/list','dataSource','_httpService','setConfig','1161CXRCnq','_init','3KlRFXE','UNIVER_UNKNOWN','merge','DependentOn','onReady','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/add','forEach','Delete','code','deleteComment','IConfigService','threadId','HTTPService','symbol','_config','filter','solved','Reply','replyId','_threadCommentDataSourceService','userId','UNRECOGNIZED','exports','thread-comment-data-source.config','addComment','UniverInstanceType','rangeId','updateComment','comments','3080NcbFGg','Module','OpenOrReOpen','listComments','bufferTime','root','resolved','function','get','size','commentUpdate$','dayjs','CustomRangeType','CollaborationSessionService','find','saveCommentToSnapshot','UniverCore','rxjs','getMemberID','CommentService','@univerjs/core','_threadCommentModel','parse','244040tywNZs','length','syncUpdateMutationToColla','@univerjs-pro/license','_userService','object','resolveComment','Add','252585LSNXPQ','15016SwwdmL','reply','error','parentId','pluginName','IThreadCommentDataSourceService','Disposable','toStringTag','/universer-api/comment/unit/','UniverCollaborationClientPlugin','getOwnPropertyDescriptor','@univerjs/thread-comment','stringify','_sessionService','requireSession'];_0x25cc=function(){return _0x2f37a7;};return _0x25cc();}(function(_0xb69422,_0x54918b){const _0x35f487=_0x3c2c,_0x17716d=_0xb69422();while(!![]){try{const _0x34c497=parseInt(_0x35f487(0x125))/0x1+parseInt(_0x35f487(0x14e))/0x2*(parseInt(_0x35f487(0x170))/0x3)+-parseInt(_0x35f487(0x106))/0x4*(parseInt(_0x35f487(0x169))/0x5)+parseInt(_0x35f487(0x14c))/0x6+parseInt(_0x35f487(0x150))/0x7+parseInt(_0x35f487(0x126))/0x8*(-parseInt(_0x35f487(0x16e))/0x9)+parseInt(_0x35f487(0x11d))/0xa;if(_0x34c497===_0x54918b)break;else _0x17716d['push'](_0x17716d['shift']());}catch(_0xe1d1b3){_0x17716d['push'](_0x17716d['shift']());}}}(_0x25cc,0x2f6f3),function(_0x1fa467,_0x3303a8){const _0x11cbe9=_0x3c2c;typeof exports==_0x11cbe9(0x122)&&typeof module<'u'?_0x3303a8(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x11cbe9(0x10d)&&define['amd']?define([_0x11cbe9(0x187),_0x11cbe9(0x15b),_0x11cbe9(0x120),_0x11cbe9(0x11a),_0x11cbe9(0x148),_0x11cbe9(0x131),_0x11cbe9(0x117),'@univerjs/network'],_0x3303a8):(_0x1fa467=typeof globalThis<'u'?globalThis:_0x1fa467||self,_0x3303a8(_0x1fa467['UniverProThreadCommentDatasource']={},_0x1fa467[_0x11cbe9(0x165)],_0x1fa467['UniverProLicense'],_0x1fa467[_0x11cbe9(0x116)],_0x1fa467['UniverThreadCommentUi'],_0x1fa467['UniverThreadComment'],_0x1fa467[_0x11cbe9(0x117)],_0x1fa467['UniverNetwork']));}(this,function(_0x161f50,_0x1242d5,_0x4a6e86,_0x39af91,_0x455f2b,_0x5e11d8,_0x3628e4,_0x354b38){'use strict';const _0x384348=_0x3c2c;const _0x5a0f87=_0x384348(0x175);var _0x21d08e=(_0x4e0f4e=>(_0x4e0f4e[_0x4e0f4e['OpenOrReOpen']=0x0]=_0x384348(0x108),_0x4e0f4e[_0x4e0f4e['Solved']=0x1]=_0x384348(0x135),_0x4e0f4e[_0x4e0f4e[_0x384348(0x186)]=-0x1]=_0x384348(0x186),_0x4e0f4e))(_0x21d08e||{}),_0x4a3d78=(_0x55cb72=>(_0x55cb72[_0x55cb72[_0x384348(0x14b)]=0x0]=_0x384348(0x14b),_0x55cb72[_0x55cb72[_0x384348(0x124)]=0x1]=_0x384348(0x124),_0x55cb72[_0x55cb72[_0x384348(0x182)]=0x2]=_0x384348(0x182),_0x55cb72[_0x55cb72[_0x384348(0x14a)]=0x3]='Edit',_0x55cb72[_0x55cb72[_0x384348(0x178)]=0x4]=_0x384348(0x178),_0x55cb72[_0x55cb72[_0x384348(0x13e)]=0x5]=_0x384348(0x13e),_0x55cb72[_0x55cb72[_0x384348(0x186)]=-0x1]='UNRECOGNIZED',_0x55cb72))(_0x4a3d78||{});const _0xa62a0=_0x1d468b=>_0x39af91[_0x384348(0x111)](new Date(+_0x1d468b))[_0x384348(0x142)](_0x384348(0x164)),_0x3f6095=async(_0x1c6f8c,_0x30f122)=>{const _0x5b17ca=_0x384348,_0x5c8138=_0x1c6f8c[_0x5b17ca(0x10e)](_0x39af91[_0x5b17ca(0x154)]),_0x45c522=_0x1c6f8c[_0x5b17ca(0x10e)](_0x354b38[_0x5b17ca(0x17d)]);_0x30f122['forEach'](_0xe38da7=>{const _0x4ea8a3=_0x5b17ca;_0x5c8138[_0x4ea8a3(0x144)](_0xe38da7)&&_0x30f122['delete'](_0xe38da7);}),_0x30f122[_0x5b17ca(0x10f)]&&(await _0x45c522[_0x5b17ca(0x10e)](_0x5b17ca(0x16a),{'params':{'userIDs':[..._0x30f122]}}))[_0x5b17ca(0x159)][_0x5b17ca(0x149)][_0x5b17ca(0x177)](_0x3f369a=>{const _0x43bd88=_0x5b17ca;_0x3f369a&&_0x5c8138[_0x43bd88(0x140)](_0x3f369a);});};var _0x2a9aeb=Object[_0x384348(0x130)],_0x3c9071=(_0x3be7ca,_0x13d78b,_0x54527b,_0x5d342e)=>{const _0x92e4a6=_0x384348;for(var _0x2f4396=_0x5d342e>0x1?void 0x0:_0x5d342e?_0x2a9aeb(_0x13d78b,_0x54527b):_0x13d78b,_0x49981d=_0x3be7ca[_0x92e4a6(0x11e)]-0x1,_0x41f1ca;_0x49981d>=0x0;_0x49981d--)(_0x41f1ca=_0x3be7ca[_0x49981d])&&(_0x2f4396=_0x41f1ca(_0x2f4396)||_0x2f4396);return _0x2f4396;},_0x3afb11=(_0x44abf1,_0x5f3a2b)=>(_0x3674d9,_0x23a906)=>_0x5f3a2b(_0x3674d9,_0x23a906,_0x44abf1);let _0x3343e8=class extends _0x39af91[_0x384348(0x12c)]{constructor(_0x26b86a,_0x24f56d,_0x4f59eb,_0x4f89b1){const _0x160372=_0x384348;super(),this[_0x160372(0x147)]=_0x26b86a,this['_threadCommentModel']=_0x24f56d,this[_0x160372(0x121)]=_0x4f59eb,this['_injector']=_0x4f89b1,this['_init'](),this[_0x160372(0x141)]();}[_0x384348(0x141)](){const _0x1f6487=_0x384348;this[_0x1f6487(0x167)](this[_0x1f6487(0x11b)]['commentUpdate$'][_0x1f6487(0x137)](_0x3628e4[_0x1f6487(0x10a)](0x10))['subscribe'](_0xc7631c=>{const _0x399a76=new Set();_0xc7631c['forEach'](_0x520d0a=>{const _0x317b3a=_0x3c2c;switch(_0x520d0a[_0x317b3a(0x163)]){case _0x317b3a(0x156):{const _0x553208=_0x520d0a['payload'][_0x317b3a(0x143)];_0x399a76['add'](_0x553208);break;}}}),_0x3f6095(this['_injector'],_0x399a76);}));}[_0x384348(0x16f)](){const _0x19c70e=_0x384348;this[_0x19c70e(0x167)](this[_0x19c70e(0x147)][_0x19c70e(0x110)][_0x19c70e(0x14d)](async _0x805b75=>{const _0x4ef1f3=_0x19c70e;var _0x4ee3c6,_0x352f56,_0x29ddb2,_0x5c063a;const _0x4325c7=(_0x4ee3c6=this[_0x4ef1f3(0x11b)]['getUnit'](_0x805b75[_0x4ef1f3(0x15c)])['find'](_0x57419d=>_0x57419d[_0x4ef1f3(0x17c)]===_0x805b75[_0x4ef1f3(0x17c)]))==null?void 0x0:_0x4ee3c6[_0x4ef1f3(0x10b)];if(!_0x4325c7)return;const {unitId:_0x60439a,subUnitId:_0x274aa7}=_0x4325c7;switch(_0x805b75['user']&&this['_userService'][_0x4ef1f3(0x140)](_0x805b75[_0x4ef1f3(0x158)]),_0x805b75[_0x4ef1f3(0x163)]){case _0x4a3d78['Add']:break;case _0x4a3d78[_0x4ef1f3(0x182)]:{this[_0x4ef1f3(0x11b)][_0x4ef1f3(0x189)](_0x60439a,_0x274aa7,{'unitId':_0x60439a,'subUnitId':_0x274aa7,'ref':'','id':_0x805b75[_0x4ef1f3(0x183)],'dT':_0xa62a0(+_0x805b75[_0x4ef1f3(0x161)]),'threadId':_0x805b75['threadId'],'personId':(_0x29ddb2=(_0x352f56=_0x805b75['user'])==null?void 0x0:_0x352f56[_0x4ef1f3(0x146)])!=null?_0x29ddb2:_0x805b75[_0x4ef1f3(0x185)],'text':JSON[_0x4ef1f3(0x11c)](_0x805b75[_0x4ef1f3(0x13a)]),'parentId':_0x4325c7['id']});break;}case _0x4a3d78[_0x4ef1f3(0x178)]:{const _0x4330a6=this[_0x4ef1f3(0x11b)]['getComment'](_0x60439a,_0x274aa7,_0x805b75[_0x4ef1f3(0x183)]);_0x4330a6&&_0x4330a6[_0x4ef1f3(0x129)]&&this['_threadCommentModel'][_0x4ef1f3(0x17a)](_0x60439a,_0x274aa7,_0x805b75[_0x4ef1f3(0x183)]);break;}case _0x4a3d78[_0x4ef1f3(0x14a)]:{this[_0x4ef1f3(0x11b)]['updateComment'](_0x60439a,_0x274aa7,{'commentId':_0x805b75[_0x4ef1f3(0x183)],'text':JSON[_0x4ef1f3(0x11c)](_0x805b75[_0x4ef1f3(0x13a)])});break;}case _0x4a3d78[_0x4ef1f3(0x13e)]:{const _0x333b7c=(_0x5c063a=this[_0x4ef1f3(0x11b)][_0x4ef1f3(0x168)](_0x805b75[_0x4ef1f3(0x15c)])[_0x4ef1f3(0x114)](_0x5ab56e=>_0x5ab56e[_0x4ef1f3(0x17c)]===_0x805b75['threadId']))==null?void 0x0:_0x5c063a[_0x4ef1f3(0x10b)];_0x333b7c&&this[_0x4ef1f3(0x11b)]['resolveComment'](_0x60439a,_0x274aa7,_0x333b7c['id'],_0x805b75['solved']===_0x21d08e['Solved']);break;}}}));}};_0x3343e8=_0x3c9071([_0x3afb11(0x0,_0x39af91[_0x384348(0x153)](_0x1242d5[_0x384348(0x119)])),_0x3afb11(0x1,_0x39af91[_0x384348(0x153)](_0x5e11d8[_0x384348(0x157)])),_0x3afb11(0x2,_0x39af91[_0x384348(0x153)](_0x39af91['UserManagerService'])),_0x3afb11(0x3,_0x39af91[_0x384348(0x153)](_0x39af91[_0x384348(0x13d)]))],_0x3343e8);const _0x44cd4a=_0x384348(0x188),_0x5ba9d9={};var _0x333a8c=Object[_0x384348(0x130)],_0x46b8eb=(_0x231822,_0x2b1b11,_0x5cec25,_0x13d96c)=>{const _0x2f9fab=_0x384348;for(var _0xacdd31=_0x13d96c>0x1?void 0x0:_0x13d96c?_0x333a8c(_0x2b1b11,_0x5cec25):_0x2b1b11,_0x436909=_0x231822[_0x2f9fab(0x11e)]-0x1,_0x426c38;_0x436909>=0x0;_0x436909--)(_0x426c38=_0x231822[_0x436909])&&(_0xacdd31=_0x426c38(_0xacdd31)||_0xacdd31);return _0xacdd31;},_0xd5f607=(_0x434c95,_0x4b3d59)=>(_0x1c06ac,_0x1e9b63)=>_0x4b3d59(_0x1c06ac,_0x1e9b63,_0x434c95);function _0xea3b6d(_0x12f6ea,_0x10cd3f){const _0x32fc73=_0x384348,_0x43ef50=_0x12f6ea['replies'][0x0];return{..._0x10cd3f,'id':_0x43ef50[_0x32fc73(0x183)],'resolved':_0x12f6ea[_0x32fc73(0x181)]===0x1,'dT':_0xa62a0(_0x43ef50[_0x32fc73(0x161)]),'personId':_0x43ef50[_0x32fc73(0x185)],'threadId':_0x43ef50[_0x32fc73(0x17c)]};}function _0x3739cb(_0x1be819,_0x46638e,_0x4df579){const _0x2425be=_0x384348;var _0x57f01f,_0x6b2fd5;if(((_0x6b2fd5=(_0x57f01f=_0x1be819==null?void 0x0:_0x1be819[_0x2425be(0x136)])==null?void 0x0:_0x57f01f[_0x2425be(0x11e)])!=null?_0x6b2fd5:0x0)>0x0){const _0x2d7671=(_0x3e0196,_0x3102d4)=>({'id':_0x3e0196[_0x2425be(0x183)],'threadId':_0x3e0196[_0x2425be(0x17c)],'dT':_0xa62a0(_0x3e0196['createTimestamp']),'personId':_0x3e0196[_0x2425be(0x185)],'resolved':_0x1be819['solved']===_0x21d08e[_0x2425be(0x135)],'unitId':_0x46638e,'subUnitId':_0x4df579,'text':JSON[_0x2425be(0x11c)](_0x3e0196[_0x2425be(0x13a)]),'parentId':_0x3102d4}),_0x16647d=_0x2d7671(_0x1be819[_0x2425be(0x136)][0x0]);return{..._0x16647d,'children':_0x1be819[_0x2425be(0x136)]['slice'](0x1)[_0x2425be(0x145)](_0x1b5b93=>_0x2d7671(_0x1b5b93,_0x16647d['id']))};}return null;}let _0x4ca94b=class{constructor(_0x3c6361,_0x36323e,_0x182488){const _0x1e0b18=_0x384348;this[_0x1e0b18(0x16c)]=_0x3c6361,this[_0x1e0b18(0x121)]=_0x36323e,this['_sessionService']=_0x182488;}async[_0x384348(0x189)](_0x2478de){const _0x3b91fb=_0x384348;var _0xb8b797,_0x5e4f22;const {parentId:_0x1607e8,unitId:_0x2fc99b,text:_0x49f327,threadId:_0x1f135a}=_0x2478de,_0xc3e1c8=(_0x5e4f22=(_0xb8b797=_0x49f327['customRanges'])==null?void 0x0:_0xb8b797[_0x3b91fb(0x180)](_0x498ec9=>_0x498ec9[_0x3b91fb(0x160)]===_0x39af91[_0x3b91fb(0x112)]['COMMENT'])[_0x3b91fb(0x145)](_0x2b38bf=>_0x2b38bf[_0x3b91fb(0x18b)]))!=null?_0x5e4f22:[],_0x208a3e=JSON['stringify'](_0x49f327),_0x1cf926=(await this['_sessionService'][_0x3b91fb(0x134)](_0x2fc99b))[_0x3b91fb(0x118)]();if(_0x1607e8){const _0x156cc8={'memberId':_0x1cf926,'unitId':_0x2fc99b,'content':_0x208a3e,'mention':_0xc3e1c8,'threadId':_0x1f135a},_0x33ed71=(await this[_0x3b91fb(0x16c)][_0x3b91fb(0x152)]('/universer-api/comment/unit/'+_0x2fc99b+'/reply',{'body':_0x156cc8}))['body'][_0x3b91fb(0x127)];return{..._0x2478de,'id':_0x33ed71[_0x3b91fb(0x183)],'dT':_0x39af91[_0x3b91fb(0x111)](+_0x33ed71[_0x3b91fb(0x161)])['format'](_0x3b91fb(0x164)),'personId':_0x33ed71[_0x3b91fb(0x185)]};}else{const _0x3768bc={'memberId':_0x1cf926,'unitId':_0x2fc99b,'content':_0x208a3e,'mention':_0xc3e1c8},_0x2234ff=await this[_0x3b91fb(0x16c)]['post'](_0x3b91fb(0x12e)+_0x2fc99b+_0x3b91fb(0x176),{'body':_0x3768bc});return _0xea3b6d(_0x2234ff[_0x3b91fb(0x159)][_0x3b91fb(0x15a)],_0x2478de);}}async[_0x384348(0x18c)](_0x5db7f7){const _0x509e77=_0x384348;var _0x4832c4,_0xa91757;const {text:_0x2ebc4e,unitId:_0x3a3066}=_0x5db7f7,_0x522cd4=(_0xa91757=(_0x4832c4=_0x2ebc4e[_0x509e77(0x162)])==null?void 0x0:_0x4832c4['filter'](_0x1d93e3=>_0x1d93e3[_0x509e77(0x160)]===_0x39af91[_0x509e77(0x112)][_0x509e77(0x15f)])['map'](_0x1ebaef=>_0x1ebaef[_0x509e77(0x18b)]))!=null?_0xa91757:[],_0x4fd1cf=JSON[_0x509e77(0x132)](_0x2ebc4e),_0x41cbf5=_0x5db7f7[_0x509e77(0x17c)],_0x4e83be=_0x5db7f7['id'],_0x25eb40={'memberId':(await this[_0x509e77(0x133)][_0x509e77(0x134)](_0x3a3066))[_0x509e77(0x118)](),'unitId':_0x3a3066,'threadId':_0x41cbf5,'mention':_0x522cd4,'content':_0x4fd1cf,'replyId':_0x4e83be},_0xe7efb7=await this[_0x509e77(0x16c)][_0x509e77(0x152)](_0x509e77(0x12e)+_0x3a3066+'/edit',{'body':_0x25eb40});return!_0xe7efb7[_0x509e77(0x159)][_0x509e77(0x128)]||_0xe7efb7['body'][_0x509e77(0x128)][_0x509e77(0x179)]===0x1;}async[_0x384348(0x123)](_0x4d129a){const _0x28b8fa=_0x384348,{unitId:_0x3708f3}=_0x4d129a,_0x41e6c3=_0x4d129a['threadId'],_0xd2c30d={'memberId':this['_userService']['getCurrentUser']()[_0x28b8fa(0x146)],'unitId':_0x3708f3,'threadId':_0x41e6c3,'solved':_0x4d129a[_0x28b8fa(0x10c)]?_0x21d08e[_0x28b8fa(0x135)]:_0x21d08e[_0x28b8fa(0x108)]},_0x3546fd=await this['_httpService']['post'](_0x28b8fa(0x12e)+_0x3708f3+'/solved',{'body':_0xd2c30d});return!_0x3546fd[_0x28b8fa(0x159)]['error']||_0x3546fd['body'][_0x28b8fa(0x128)]['code']===0x1;}async['deleteComment'](_0x54ccdf,_0x460c99,_0xf1b217,_0x262804){const _0x4217b9=_0x384348,_0x17ec63={'memberId':(await this[_0x4217b9(0x133)][_0x4217b9(0x134)](_0x54ccdf))['getMemberID'](),'threadId':_0xf1b217,'replyId':_0x262804,'unitId':_0x54ccdf},_0x4b77d5=await this['_httpService'][_0x4217b9(0x152)](_0x4217b9(0x12e)+_0x54ccdf+'/delete',{'body':_0x17ec63});return!_0x4b77d5[_0x4217b9(0x159)]['error']||_0x4b77d5[_0x4217b9(0x159)][_0x4217b9(0x128)][_0x4217b9(0x179)]===0x1;}async[_0x384348(0x109)](_0x435548,_0x22e141,_0x2523b4){const _0x37afe9=_0x384348,_0x544672={'unitId':_0x435548,'threadId':_0x2523b4},_0x255734=await this['_httpService'][_0x37afe9(0x152)](_0x37afe9(0x12e)+_0x435548+_0x37afe9(0x155),{'body':_0x544672}),_0x15be87=_0x2523b4[_0x37afe9(0x145)](_0x430566=>_0x3739cb(_0x255734['body'][_0x37afe9(0x105)][_0x430566],_0x435548,_0x22e141))[_0x37afe9(0x180)](Boolean);return Object[_0x37afe9(0x13f)](_0x255734['body'][_0x37afe9(0x149)])['forEach'](_0x186432=>{const _0xfb1077=_0x37afe9;this[_0xfb1077(0x121)][_0xfb1077(0x140)](_0x186432);}),_0x15be87;}[_0x384348(0x115)](_0x399700){const _0x582bb7=_0x384348;return{'id':_0x399700['id'],'threadId':_0x399700[_0x582bb7(0x17c)],'ref':_0x399700['ref']};}};_0x4ca94b=_0x46b8eb([_0xd5f607(0x0,_0x39af91['Inject'](_0x354b38['HTTPService'])),_0xd5f607(0x1,_0x39af91['Inject'](_0x39af91[_0x384348(0x154)])),_0xd5f607(0x2,_0x39af91[_0x384348(0x153)](_0x1242d5[_0x384348(0x113)]))],_0x4ca94b);var _0x5e6ce9=Object[_0x384348(0x130)],_0x14a5c1=(_0x3e5217,_0x5d1b65,_0x378abb,_0xe3fc93)=>{for(var _0x3943b1=_0xe3fc93>0x1?void 0x0:_0xe3fc93?_0x5e6ce9(_0x5d1b65,_0x378abb):_0x5d1b65,_0x31a3a0=_0x3e5217['length']-0x1,_0x17dfc2;_0x31a3a0>=0x0;_0x31a3a0--)(_0x17dfc2=_0x3e5217[_0x31a3a0])&&(_0x3943b1=_0x17dfc2(_0x3943b1)||_0x3943b1);return _0x3943b1;},_0xd4edc4=(_0x1f214d,_0x18d1c3)=>(_0x27483d,_0x5f1713)=>_0x18d1c3(_0x27483d,_0x5f1713,_0x1f214d);let _0x29f2b0=class extends _0x39af91['Disposable']{constructor(_0x518319,_0x421f0a){const _0x33a074=_0x384348;super(),this[_0x33a074(0x184)]=_0x518319,this['_threadCommentDataSource']=_0x421f0a,this[_0x33a074(0x13c)]();}[_0x384348(0x13c)](){const _0x2b094f=_0x384348;this[_0x2b094f(0x184)][_0x2b094f(0x16b)]=this[_0x2b094f(0x139)],this[_0x2b094f(0x184)][_0x2b094f(0x11f)]=!0x1;}};_0x29f2b0=_0x14a5c1([_0xd4edc4(0x0,_0x5e11d8[_0x384348(0x12b)]),_0xd4edc4(0x1,_0x39af91['Inject'](_0x4ca94b))],_0x29f2b0);var _0x226f30=Object[_0x384348(0x15d)],_0x381ac8=Object['getOwnPropertyDescriptor'],_0x20ad3c=(_0x5266bc,_0x307969,_0xd6ef8c)=>_0x307969 in _0x5266bc?_0x226f30(_0x5266bc,_0x307969,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd6ef8c}):_0x5266bc[_0x307969]=_0xd6ef8c,_0x223086=(_0x2a4e8c,_0x545f64,_0x5bfa66,_0x2c2db9)=>{const _0x64ec14=_0x384348;for(var _0x43625c=_0x2c2db9>0x1?void 0x0:_0x2c2db9?_0x381ac8(_0x545f64,_0x5bfa66):_0x545f64,_0x144dcc=_0x2a4e8c[_0x64ec14(0x11e)]-0x1,_0x510657;_0x144dcc>=0x0;_0x144dcc--)(_0x510657=_0x2a4e8c[_0x144dcc])&&(_0x43625c=_0x510657(_0x43625c)||_0x43625c);return _0x43625c;},_0x2e1842=(_0x1c5876,_0x10249b)=>(_0x5c71d7,_0x2a155a)=>_0x10249b(_0x5c71d7,_0x2a155a,_0x1c5876),_0x24958b=(_0x42b372,_0x5dd9f6,_0xf4c8a0)=>_0x20ad3c(_0x42b372,typeof _0x5dd9f6!=_0x384348(0x17e)?_0x5dd9f6+'':_0x5dd9f6,_0xf4c8a0);_0x161f50[_0x384348(0x14f)]=class extends _0x39af91[_0x384348(0x138)]{constructor(_0x26631e=_0x5ba9d9,_0x3f3ae9,_0x3c307c){const _0x4cb81d=_0x384348;super(),this['_config']=_0x26631e,this[_0x4cb81d(0x15e)]=_0x3f3ae9,this['_configService']=_0x3c307c;const {..._0x12b38c}=_0x39af91[_0x4cb81d(0x172)]({},_0x5ba9d9,this[_0x4cb81d(0x17f)]);this[_0x4cb81d(0x13b)][_0x4cb81d(0x16d)](_0x44cd4a,_0x12b38c);}[_0x384348(0x151)](){const _0x534561=_0x384348;[[_0x4ca94b],[_0x29f2b0],[_0x3343e8]][_0x534561(0x177)](_0x62da98=>{this['_injector']['add'](_0x62da98);});}[_0x384348(0x174)](){const _0x5f473d=_0x384348;this['_injector'][_0x5f473d(0x10e)](_0x29f2b0),this[_0x5f473d(0x15e)]['get'](_0x3343e8);}},_0x24958b(_0x161f50[_0x384348(0x14f)],_0x384348(0x12a),_0x5a0f87),_0x24958b(_0x161f50['UniverThreadCommentDataSourcePlugin'],_0x384348(0x163),_0x39af91[_0x384348(0x18a)][_0x384348(0x171)]),_0x161f50[_0x384348(0x14f)]=_0x223086([_0x39af91[_0x384348(0x173)](_0x455f2b[_0x384348(0x166)],_0x1242d5[_0x384348(0x12f)],_0x4a6e86['UniverLicensePlugin']),_0x2e1842(0x1,_0x39af91[_0x384348(0x153)](_0x39af91[_0x384348(0x13d)])),_0x2e1842(0x2,_0x39af91[_0x384348(0x17b)])],_0x161f50[_0x384348(0x14f)]),Object['defineProperty'](_0x161f50,Symbol[_0x384348(0x12d)],{'value':_0x384348(0x107)});}));
|
|
1
|
+
function _0x46f8(){const _0x2991b5=['ref','format','Solved','Plugin','getUnit','syncUpdateMutationToColla','pipe','code','toStringTag','userId','_config','dayjs','341709MkPcpg','customRanges','UniverCollaborationClientPlugin','_threadCommentModel','UniverInstanceType','UniverThreadCommentUIPlugin','parentId','32sYVqLY','users','5686624fTZmbm','/add','resolved','onReady','createTimestamp','UniverThreadComment','Edit','length','OpenOrReOpen','_sessionService','type','Disposable','UserManagerService','rangeType','pluginName','getMemberID','rangeId','listComments','/universer-api/comment/unit/','reply','values','saveCommentToSnapshot','root','8898JYSAaB','onStarting','function','Solve','content','add','_commentService','/reply','personId','@univerjs/thread-comment','UniverThreadCommentDataSourcePlugin','post','addComment','@univerjs/core','UniverLicensePlugin','stringify','deleteComment','3028550FHQVnn','IConfigService','Reply','Injector','_injector','comments','exports','Add','userID','resolveComment','_init','Module','ThreadCommentModel','COMMENT','7NGZRtN','HTTPService','Unknown','getCurrentUser','delete','solved','parse','addUser','amd','getOwnPropertyDescriptor','thread-comment-data-source.config','payload','230733SVQiZf','_initDataSource','@univerjs-pro/collaboration-client','threadId','1848306uXeNBq','commentUpdate$','forEach','updateComment','body','requireSession','_initUserSync','CollaborationSessionService','Inject','get','filter','disposeWithMe','error','@univerjs/thread-comment-ui','symbol','UniverCore','_configService','IThreadCommentDataSourceService','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','18slOrWI','rxjs','subscribe','replies','@univerjs/network','5425800jzKeGS','_threadCommentDataSource','UniverNetwork','bufferTime','map','@univerjs-pro/license','dataSource','merge','size','defineProperty','user','Delete','YYYY/MM/DD\x20HH:mm','/universer-api/user/list','comment','UniverProCollaborationClient','_threadCommentDataSourceService','CustomRangeType','replyId','_httpService'];_0x46f8=function(){return _0x2991b5;};return _0x46f8();}function _0x468f(_0x3a84e3,_0x3e7562){const _0x46f811=_0x46f8();return _0x468f=function(_0x468f3c,_0x16c6a0){_0x468f3c=_0x468f3c-0x1f4;let _0x42cd54=_0x46f811[_0x468f3c];return _0x42cd54;},_0x468f(_0x3a84e3,_0x3e7562);}(function(_0x469a81,_0x1b2f79){const _0x280261=_0x468f,_0x2ea531=_0x469a81();while(!![]){try{const _0x202986=parseInt(_0x280261(0x274))/0x1*(parseInt(_0x280261(0x231))/0x2)+parseInt(_0x280261(0x211))/0x3*(parseInt(_0x280261(0x218))/0x4)+-parseInt(_0x280261(0x279))/0x5+-parseInt(_0x280261(0x260))/0x6*(-parseInt(_0x280261(0x250))/0x7)+parseInt(_0x280261(0x21a))/0x8+-parseInt(_0x280261(0x25c))/0x9+-parseInt(_0x280261(0x242))/0xa;if(_0x202986===_0x1b2f79)break;else _0x2ea531['push'](_0x2ea531['shift']());}catch(_0x10a45c){_0x2ea531['push'](_0x2ea531['shift']());}}}(_0x46f8,0x91a35),function(_0x327c2b,_0x37d1bf){const _0x6f1daf=_0x468f;typeof exports=='object'&&typeof module<'u'?_0x37d1bf(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x6f1daf(0x233)&&define[_0x6f1daf(0x258)]?define([_0x6f1daf(0x248),_0x6f1daf(0x25e),_0x6f1daf(0x1f6),_0x6f1daf(0x23e),_0x6f1daf(0x26d),_0x6f1daf(0x23a),'rxjs',_0x6f1daf(0x278)],_0x37d1bf):(_0x327c2b=typeof globalThis<'u'?globalThis:_0x327c2b||self,_0x37d1bf(_0x327c2b['UniverProThreadCommentDatasource']={},_0x327c2b[_0x6f1daf(0x200)],_0x327c2b['UniverProLicense'],_0x327c2b[_0x6f1daf(0x26f)],_0x327c2b['UniverThreadCommentUi'],_0x327c2b[_0x6f1daf(0x21f)],_0x327c2b[_0x6f1daf(0x275)],_0x327c2b[_0x6f1daf(0x27b)]));}(this,function(_0x3f72c,_0x52eae7,_0x1cf475,_0x459f9a,_0x47763d,_0x1bf7c4,_0x1a357c,_0x51fe71){'use strict';const _0x4b3d97=_0x468f;const _0x201b52=_0x4b3d97(0x273);var _0x57973f=(_0x323e0e=>(_0x323e0e[_0x323e0e[_0x4b3d97(0x222)]=0x0]=_0x4b3d97(0x222),_0x323e0e[_0x323e0e['Solved']=0x1]=_0x4b3d97(0x207),_0x323e0e[_0x323e0e['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x323e0e))(_0x57973f||{}),_0x16a70e=(_0x8f0a4e=>(_0x8f0a4e[_0x8f0a4e[_0x4b3d97(0x252)]=0x0]=_0x4b3d97(0x252),_0x8f0a4e[_0x8f0a4e[_0x4b3d97(0x249)]=0x1]=_0x4b3d97(0x249),_0x8f0a4e[_0x8f0a4e[_0x4b3d97(0x244)]=0x2]=_0x4b3d97(0x244),_0x8f0a4e[_0x8f0a4e[_0x4b3d97(0x220)]=0x3]=_0x4b3d97(0x220),_0x8f0a4e[_0x8f0a4e[_0x4b3d97(0x1fc)]=0x4]=_0x4b3d97(0x1fc),_0x8f0a4e[_0x8f0a4e[_0x4b3d97(0x234)]=0x5]=_0x4b3d97(0x234),_0x8f0a4e[_0x8f0a4e['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x8f0a4e))(_0x16a70e||{});const _0x2e0003=_0x14b184=>_0x459f9a[_0x4b3d97(0x210)](new Date(+_0x14b184))[_0x4b3d97(0x206)](_0x4b3d97(0x1fd)),_0x50984b=async(_0x580c25,_0x717de1)=>{const _0x4852fa=_0x4b3d97,_0x57fca6=_0x580c25['get'](_0x459f9a[_0x4852fa(0x226)]),_0x46b733=_0x580c25[_0x4852fa(0x269)](_0x51fe71[_0x4852fa(0x251)]);_0x717de1['forEach'](_0xce610d=>{const _0x30e574=_0x4852fa;_0x57fca6['getUser'](_0xce610d)&&_0x717de1[_0x30e574(0x254)](_0xce610d);}),_0x717de1[_0x4852fa(0x1f9)]&&(await _0x46b733['get'](_0x4852fa(0x1fe),{'params':{'userIDs':[..._0x717de1]}}))[_0x4852fa(0x264)][_0x4852fa(0x219)]['forEach'](_0x292cb0=>{const _0x568e19=_0x4852fa;_0x292cb0&&_0x57fca6[_0x568e19(0x257)](_0x292cb0);});};var _0x1fed9a=Object['getOwnPropertyDescriptor'],_0x18ceba=(_0x138ab1,_0x51a04d,_0x3ee152,_0x25c122)=>{const _0x1429d1=_0x4b3d97;for(var _0x233168=_0x25c122>0x1?void 0x0:_0x25c122?_0x1fed9a(_0x51a04d,_0x3ee152):_0x51a04d,_0x4e2e32=_0x138ab1[_0x1429d1(0x221)]-0x1,_0x38dc3b;_0x4e2e32>=0x0;_0x4e2e32--)(_0x38dc3b=_0x138ab1[_0x4e2e32])&&(_0x233168=_0x38dc3b(_0x233168)||_0x233168);return _0x233168;},_0x16e1fe=(_0x109cf9,_0x2d4843)=>(_0x3a819d,_0x4ebd16)=>_0x2d4843(_0x3a819d,_0x4ebd16,_0x109cf9);let _0x2b7552=class extends _0x459f9a[_0x4b3d97(0x225)]{constructor(_0x32d9fd,_0x2ba241,_0x343162,_0x4e2d65){const _0x12528b=_0x4b3d97;super(),this[_0x12528b(0x237)]=_0x32d9fd,this[_0x12528b(0x214)]=_0x2ba241,this[_0x12528b(0x272)]=_0x343162,this[_0x12528b(0x246)]=_0x4e2d65,this[_0x12528b(0x24c)](),this[_0x12528b(0x266)]();}['_initUserSync'](){const _0x21ea08=_0x4b3d97;this[_0x21ea08(0x26b)](this[_0x21ea08(0x214)][_0x21ea08(0x261)][_0x21ea08(0x20b)](_0x1a357c[_0x21ea08(0x1f4)](0x10))['subscribe'](_0x575a3b=>{const _0x72c7d9=_0x21ea08,_0x54c70d=new Set();_0x575a3b[_0x72c7d9(0x262)](_0xe23b16=>{const _0x1cc353=_0x72c7d9;switch(_0xe23b16[_0x1cc353(0x224)]){case _0x1cc353(0x236):{const _0x11fa84=_0xe23b16[_0x1cc353(0x25b)][_0x1cc353(0x239)];_0x54c70d['add'](_0x11fa84);break;}}}),_0x50984b(this[_0x72c7d9(0x246)],_0x54c70d);}));}['_init'](){const _0x1a0f20=_0x4b3d97;this[_0x1a0f20(0x26b)](this[_0x1a0f20(0x237)][_0x1a0f20(0x261)][_0x1a0f20(0x276)](async _0x77ee2d=>{const _0x564644=_0x1a0f20;var _0x3df349,_0x2f3ba9,_0x524fdf,_0x124d3e;const _0x25ec5f=(_0x3df349=this[_0x564644(0x214)][_0x564644(0x209)](_0x77ee2d['unitId'])['find'](_0x7e3ce6=>_0x7e3ce6[_0x564644(0x25f)]===_0x77ee2d['threadId']))==null?void 0x0:_0x3df349[_0x564644(0x230)];if(!_0x25ec5f)return;const {unitId:_0x176671,subUnitId:_0x52c605}=_0x25ec5f;switch(_0x77ee2d[_0x564644(0x1fb)]&&this[_0x564644(0x272)][_0x564644(0x257)](_0x77ee2d[_0x564644(0x1fb)]),_0x77ee2d[_0x564644(0x224)]){case _0x16a70e[_0x564644(0x249)]:break;case _0x16a70e[_0x564644(0x244)]:{this[_0x564644(0x214)][_0x564644(0x23d)](_0x176671,_0x52c605,{'unitId':_0x176671,'subUnitId':_0x52c605,'ref':'','id':_0x77ee2d[_0x564644(0x203)],'dT':_0x2e0003(+_0x77ee2d[_0x564644(0x21e)]),'threadId':_0x77ee2d[_0x564644(0x25f)],'personId':(_0x524fdf=(_0x2f3ba9=_0x77ee2d[_0x564644(0x1fb)])==null?void 0x0:_0x2f3ba9[_0x564644(0x24a)])!=null?_0x524fdf:_0x77ee2d[_0x564644(0x20e)],'text':JSON[_0x564644(0x256)](_0x77ee2d['content']),'parentId':_0x25ec5f['id']});break;}case _0x16a70e['Delete']:{const _0x42b3e2=this['_threadCommentModel']['getComment'](_0x176671,_0x52c605,_0x77ee2d['replyId']);_0x42b3e2&&_0x42b3e2[_0x564644(0x217)]&&this['_threadCommentModel'][_0x564644(0x241)](_0x176671,_0x52c605,_0x77ee2d[_0x564644(0x203)]);break;}case _0x16a70e[_0x564644(0x220)]:{this[_0x564644(0x214)][_0x564644(0x263)](_0x176671,_0x52c605,{'commentId':_0x77ee2d[_0x564644(0x203)],'text':JSON[_0x564644(0x256)](_0x77ee2d['content'])});break;}case _0x16a70e[_0x564644(0x234)]:{const _0x13ab61=(_0x124d3e=this[_0x564644(0x214)][_0x564644(0x209)](_0x77ee2d['unitId'])['find'](_0x1e184c=>_0x1e184c['threadId']===_0x77ee2d['threadId']))==null?void 0x0:_0x124d3e['root'];_0x13ab61&&this[_0x564644(0x214)][_0x564644(0x24b)](_0x176671,_0x52c605,_0x13ab61['id'],_0x77ee2d[_0x564644(0x255)]===_0x57973f[_0x564644(0x207)]);break;}}}));}};_0x2b7552=_0x18ceba([_0x16e1fe(0x0,_0x459f9a[_0x4b3d97(0x268)](_0x52eae7['CommentService'])),_0x16e1fe(0x1,_0x459f9a[_0x4b3d97(0x268)](_0x1bf7c4[_0x4b3d97(0x24e)])),_0x16e1fe(0x2,_0x459f9a[_0x4b3d97(0x268)](_0x459f9a[_0x4b3d97(0x226)])),_0x16e1fe(0x3,_0x459f9a[_0x4b3d97(0x268)](_0x459f9a['Injector']))],_0x2b7552);const _0x5ad761=_0x4b3d97(0x25a),_0x5d8192={};var _0x160841=Object[_0x4b3d97(0x259)],_0x10685d=(_0x390467,_0x3496a9,_0x4886df,_0x4dce3a)=>{const _0x28879e=_0x4b3d97;for(var _0x4ce218=_0x4dce3a>0x1?void 0x0:_0x4dce3a?_0x160841(_0x3496a9,_0x4886df):_0x3496a9,_0x1603a0=_0x390467[_0x28879e(0x221)]-0x1,_0x178972;_0x1603a0>=0x0;_0x1603a0--)(_0x178972=_0x390467[_0x1603a0])&&(_0x4ce218=_0x178972(_0x4ce218)||_0x4ce218);return _0x4ce218;},_0x4ad7df=(_0x1be61b,_0x37ff4f)=>(_0x483607,_0x1d7654)=>_0x37ff4f(_0x483607,_0x1d7654,_0x1be61b);function _0x50b5eb(_0x18c689,_0x40ef2c){const _0x538daf=_0x4b3d97,_0x55d2b1=_0x18c689[_0x538daf(0x277)][0x0];return{..._0x40ef2c,'id':_0x55d2b1[_0x538daf(0x203)],'resolved':_0x18c689[_0x538daf(0x255)]===0x1,'dT':_0x2e0003(_0x55d2b1[_0x538daf(0x21e)]),'personId':_0x55d2b1[_0x538daf(0x20e)],'threadId':_0x55d2b1[_0x538daf(0x25f)]};}function _0x15a7dd(_0x21b871,_0x3a6cf5,_0x19ab5e){const _0x2fcedf=_0x4b3d97;var _0x50055b,_0x3f6508;if(((_0x3f6508=(_0x50055b=_0x21b871==null?void 0x0:_0x21b871[_0x2fcedf(0x277)])==null?void 0x0:_0x50055b['length'])!=null?_0x3f6508:0x0)>0x0){const _0x1f7a9f=(_0x1d9c63,_0x2a17b1)=>({'id':_0x1d9c63[_0x2fcedf(0x203)],'threadId':_0x1d9c63[_0x2fcedf(0x25f)],'dT':_0x2e0003(_0x1d9c63[_0x2fcedf(0x21e)]),'personId':_0x1d9c63[_0x2fcedf(0x20e)],'resolved':_0x21b871[_0x2fcedf(0x255)]===_0x57973f[_0x2fcedf(0x207)],'unitId':_0x3a6cf5,'subUnitId':_0x19ab5e,'text':JSON['parse'](_0x1d9c63[_0x2fcedf(0x235)]),'parentId':_0x2a17b1}),_0x536aeb=_0x1f7a9f(_0x21b871['replies'][0x0]);return{..._0x536aeb,'children':_0x21b871[_0x2fcedf(0x277)]['slice'](0x1)['map'](_0x11442c=>_0x1f7a9f(_0x11442c,_0x536aeb['id']))};}return null;}let _0x5d8526=class{constructor(_0x3152f6,_0x58513,_0xc57a41){const _0x535b0e=_0x4b3d97;this[_0x535b0e(0x204)]=_0x3152f6,this[_0x535b0e(0x272)]=_0x58513,this[_0x535b0e(0x223)]=_0xc57a41;}async['addComment'](_0x5d8b53){const _0x22c6e1=_0x4b3d97;var _0x233807,_0x350ffe;const {parentId:_0x582f80,unitId:_0x2200a4,text:_0x4d99e5,threadId:_0x1f6168}=_0x5d8b53,_0xcc9817=(_0x350ffe=(_0x233807=_0x4d99e5[_0x22c6e1(0x212)])==null?void 0x0:_0x233807[_0x22c6e1(0x26a)](_0xb9cf54=>_0xb9cf54[_0x22c6e1(0x227)]===_0x459f9a[_0x22c6e1(0x202)][_0x22c6e1(0x24f)])[_0x22c6e1(0x1f5)](_0x57ad8b=>_0x57ad8b[_0x22c6e1(0x22a)]))!=null?_0x350ffe:[],_0x344b43=JSON[_0x22c6e1(0x240)](_0x4d99e5),_0x513f63=(await this[_0x22c6e1(0x223)][_0x22c6e1(0x265)](_0x2200a4))['getMemberID']();if(_0x582f80){const _0x5de1b1={'memberId':_0x513f63,'unitId':_0x2200a4,'content':_0x344b43,'mention':_0xcc9817,'threadId':_0x1f6168},_0x225988=(await this['_httpService'][_0x22c6e1(0x23c)](_0x22c6e1(0x22c)+_0x2200a4+_0x22c6e1(0x238),{'body':_0x5de1b1}))[_0x22c6e1(0x264)][_0x22c6e1(0x22d)];return{..._0x5d8b53,'id':_0x225988[_0x22c6e1(0x203)],'dT':_0x459f9a[_0x22c6e1(0x210)](+_0x225988[_0x22c6e1(0x21e)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x225988['userId']};}else{const _0x5c70e3={'memberId':_0x513f63,'unitId':_0x2200a4,'content':_0x344b43,'mention':_0xcc9817},_0x4d786b=await this[_0x22c6e1(0x204)][_0x22c6e1(0x23c)](_0x22c6e1(0x22c)+_0x2200a4+_0x22c6e1(0x21b),{'body':_0x5c70e3});return _0x50b5eb(_0x4d786b[_0x22c6e1(0x264)][_0x22c6e1(0x1ff)],_0x5d8b53);}}async[_0x4b3d97(0x263)](_0x4b4b){const _0x22a70d=_0x4b3d97;var _0x5aa49a,_0x268ebc;const {text:_0xd1da81,unitId:_0xafe7ac}=_0x4b4b,_0xcf3c3a=(_0x268ebc=(_0x5aa49a=_0xd1da81[_0x22a70d(0x212)])==null?void 0x0:_0x5aa49a[_0x22a70d(0x26a)](_0x20813b=>_0x20813b[_0x22a70d(0x227)]===_0x459f9a[_0x22a70d(0x202)][_0x22a70d(0x24f)])[_0x22a70d(0x1f5)](_0x46c382=>_0x46c382[_0x22a70d(0x22a)]))!=null?_0x268ebc:[],_0x371f3c=JSON[_0x22a70d(0x240)](_0xd1da81),_0x55a478=_0x4b4b[_0x22a70d(0x25f)],_0x26c539=_0x4b4b['id'],_0x21c86c={'memberId':(await this[_0x22a70d(0x223)][_0x22a70d(0x265)](_0xafe7ac))[_0x22a70d(0x229)](),'unitId':_0xafe7ac,'threadId':_0x55a478,'mention':_0xcf3c3a,'content':_0x371f3c,'replyId':_0x26c539},_0x261e34=await this[_0x22a70d(0x204)]['post']('/universer-api/comment/unit/'+_0xafe7ac+'/edit',{'body':_0x21c86c});return!_0x261e34[_0x22a70d(0x264)][_0x22a70d(0x26c)]||_0x261e34['body'][_0x22a70d(0x26c)][_0x22a70d(0x20c)]===0x1;}async[_0x4b3d97(0x24b)](_0x59b687){const _0x2b85ca=_0x4b3d97,{unitId:_0x51da5b}=_0x59b687,_0x46564e=_0x59b687['threadId'],_0x14a0a3={'memberId':this[_0x2b85ca(0x272)][_0x2b85ca(0x253)]()[_0x2b85ca(0x24a)],'unitId':_0x51da5b,'threadId':_0x46564e,'solved':_0x59b687[_0x2b85ca(0x21c)]?_0x57973f[_0x2b85ca(0x207)]:_0x57973f[_0x2b85ca(0x222)]},_0x1bd6a5=await this[_0x2b85ca(0x204)][_0x2b85ca(0x23c)](_0x2b85ca(0x22c)+_0x51da5b+'/solved',{'body':_0x14a0a3});return!_0x1bd6a5[_0x2b85ca(0x264)][_0x2b85ca(0x26c)]||_0x1bd6a5[_0x2b85ca(0x264)][_0x2b85ca(0x26c)]['code']===0x1;}async[_0x4b3d97(0x241)](_0xdfc77c,_0x2bf876,_0x13eaae,_0x1924de){const _0x195161=_0x4b3d97,_0x23c1fe={'memberId':(await this[_0x195161(0x223)][_0x195161(0x265)](_0xdfc77c))['getMemberID'](),'threadId':_0x13eaae,'replyId':_0x1924de,'unitId':_0xdfc77c},_0x2cfdcc=await this[_0x195161(0x204)][_0x195161(0x23c)](_0x195161(0x22c)+_0xdfc77c+'/delete',{'body':_0x23c1fe});return!_0x2cfdcc['body'][_0x195161(0x26c)]||_0x2cfdcc['body']['error'][_0x195161(0x20c)]===0x1;}async[_0x4b3d97(0x22b)](_0x57f7d2,_0x34bfc4,_0x5c9ff8){const _0xbf00f0=_0x4b3d97,_0xdfcc81={'unitId':_0x57f7d2,'threadId':_0x5c9ff8},_0x2df658=await this[_0xbf00f0(0x204)]['post'](_0xbf00f0(0x22c)+_0x57f7d2+'/list',{'body':_0xdfcc81}),_0x2c82b7=_0x5c9ff8['map'](_0x7c75e8=>_0x15a7dd(_0x2df658[_0xbf00f0(0x264)][_0xbf00f0(0x247)][_0x7c75e8],_0x57f7d2,_0x34bfc4))[_0xbf00f0(0x26a)](Boolean);return Object[_0xbf00f0(0x22e)](_0x2df658[_0xbf00f0(0x264)][_0xbf00f0(0x219)])[_0xbf00f0(0x262)](_0x14f567=>{const _0x47574e=_0xbf00f0;this[_0x47574e(0x272)][_0x47574e(0x257)](_0x14f567);}),_0x2c82b7;}[_0x4b3d97(0x22f)](_0x343186){const _0x73987f=_0x4b3d97;return{'id':_0x343186['id'],'threadId':_0x343186[_0x73987f(0x25f)],'ref':_0x343186[_0x73987f(0x205)]};}};_0x5d8526=_0x10685d([_0x4ad7df(0x0,_0x459f9a[_0x4b3d97(0x268)](_0x51fe71[_0x4b3d97(0x251)])),_0x4ad7df(0x1,_0x459f9a[_0x4b3d97(0x268)](_0x459f9a['UserManagerService'])),_0x4ad7df(0x2,_0x459f9a['Inject'](_0x52eae7[_0x4b3d97(0x267)]))],_0x5d8526);var _0x552e37=Object['getOwnPropertyDescriptor'],_0x5a4769=(_0x5e8dfd,_0x142ed6,_0x30f157,_0x458d15)=>{const _0x243fda=_0x4b3d97;for(var _0x17dfa0=_0x458d15>0x1?void 0x0:_0x458d15?_0x552e37(_0x142ed6,_0x30f157):_0x142ed6,_0xe3071=_0x5e8dfd[_0x243fda(0x221)]-0x1,_0x214f0a;_0xe3071>=0x0;_0xe3071--)(_0x214f0a=_0x5e8dfd[_0xe3071])&&(_0x17dfa0=_0x214f0a(_0x17dfa0)||_0x17dfa0);return _0x17dfa0;},_0x3daec0=(_0x359599,_0x38e571)=>(_0x1eae8f,_0x49b04d)=>_0x38e571(_0x1eae8f,_0x49b04d,_0x359599);let _0x13bed7=class extends _0x459f9a[_0x4b3d97(0x225)]{constructor(_0x1b0ec4,_0x1cdbad){const _0x5de7f2=_0x4b3d97;super(),this[_0x5de7f2(0x201)]=_0x1b0ec4,this[_0x5de7f2(0x27a)]=_0x1cdbad,this[_0x5de7f2(0x25d)]();}['_initDataSource'](){const _0x576f06=_0x4b3d97;this[_0x576f06(0x201)][_0x576f06(0x1f7)]=this[_0x576f06(0x27a)],this['_threadCommentDataSourceService'][_0x576f06(0x20a)]=!0x1;}};_0x13bed7=_0x5a4769([_0x3daec0(0x0,_0x1bf7c4[_0x4b3d97(0x271)]),_0x3daec0(0x1,_0x459f9a[_0x4b3d97(0x268)](_0x5d8526))],_0x13bed7);var _0x438a08=Object[_0x4b3d97(0x1fa)],_0x4b984a=Object[_0x4b3d97(0x259)],_0x3308aa=(_0x2192ff,_0x283c10,_0x5a85e1)=>_0x283c10 in _0x2192ff?_0x438a08(_0x2192ff,_0x283c10,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5a85e1}):_0x2192ff[_0x283c10]=_0x5a85e1,_0x52fdd2=(_0xed8445,_0x49691c,_0x2c2bc7,_0x222e76)=>{const _0x563650=_0x4b3d97;for(var _0xd98fb6=_0x222e76>0x1?void 0x0:_0x222e76?_0x4b984a(_0x49691c,_0x2c2bc7):_0x49691c,_0x211d17=_0xed8445[_0x563650(0x221)]-0x1,_0x192c69;_0x211d17>=0x0;_0x211d17--)(_0x192c69=_0xed8445[_0x211d17])&&(_0xd98fb6=_0x192c69(_0xd98fb6)||_0xd98fb6);return _0xd98fb6;},_0x1b80d8=(_0x4c774f,_0x2ba105)=>(_0x4423ff,_0x2eae73)=>_0x2ba105(_0x4423ff,_0x2eae73,_0x4c774f),_0x29c54d=(_0x577aac,_0xca7ecb,_0x3123f6)=>_0x3308aa(_0x577aac,typeof _0xca7ecb!=_0x4b3d97(0x26e)?_0xca7ecb+'':_0xca7ecb,_0x3123f6);_0x3f72c[_0x4b3d97(0x23b)]=class extends _0x459f9a[_0x4b3d97(0x208)]{constructor(_0x3bdbef=_0x5d8192,_0x9756e3,_0x268d3b){const _0x36b919=_0x4b3d97;super(),this['_config']=_0x3bdbef,this[_0x36b919(0x246)]=_0x9756e3,this[_0x36b919(0x270)]=_0x268d3b;const {..._0x45b1d9}=_0x459f9a[_0x36b919(0x1f8)]({},_0x5d8192,this[_0x36b919(0x20f)]);this[_0x36b919(0x270)]['setConfig'](_0x5ad761,_0x45b1d9);}[_0x4b3d97(0x232)](){[[_0x5d8526],[_0x13bed7],[_0x2b7552]]['forEach'](_0x5bb171=>{const _0x411254=_0x468f;this[_0x411254(0x246)][_0x411254(0x236)](_0x5bb171);});}[_0x4b3d97(0x21d)](){const _0x53a3a4=_0x4b3d97;this[_0x53a3a4(0x246)][_0x53a3a4(0x269)](_0x13bed7),this[_0x53a3a4(0x246)][_0x53a3a4(0x269)](_0x2b7552);}},_0x29c54d(_0x3f72c[_0x4b3d97(0x23b)],_0x4b3d97(0x228),_0x201b52),_0x29c54d(_0x3f72c[_0x4b3d97(0x23b)],_0x4b3d97(0x224),_0x459f9a[_0x4b3d97(0x215)]['UNIVER_UNKNOWN']),_0x3f72c['UniverThreadCommentDataSourcePlugin']=_0x52fdd2([_0x459f9a['DependentOn'](_0x47763d[_0x4b3d97(0x216)],_0x52eae7[_0x4b3d97(0x213)],_0x1cf475[_0x4b3d97(0x23f)]),_0x1b80d8(0x1,_0x459f9a[_0x4b3d97(0x268)](_0x459f9a[_0x4b3d97(0x245)])),_0x1b80d8(0x2,_0x459f9a[_0x4b3d97(0x243)])],_0x3f72c[_0x4b3d97(0x23b)]),Object[_0x4b3d97(0x1fa)](_0x3f72c,Symbol[_0x4b3d97(0x20d)],{'value':_0x4b3d97(0x24d)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.6-experimental.20250903-f52e3bf",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.10.
|
|
49
|
-
"@univerjs-pro/license": "0.10.
|
|
50
|
-
"@univerjs/core": "0.10.
|
|
51
|
-
"@univerjs/network": "0.10.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.6-experimental.20250903-f52e3bf",
|
|
49
|
+
"@univerjs-pro/license": "0.10.6-experimental.20250903-f52e3bf",
|
|
50
|
+
"@univerjs/core": "0.10.6-experimental.20250903-f52e3bf",
|
|
51
|
+
"@univerjs/network": "0.10.6-experimental.20250903-f52e3bf",
|
|
52
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/thread-comment": "0.10.
|
|
54
|
-
"@univerjs/thread-comment
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.10.6-experimental.20250903-f52e3bf",
|
|
54
|
+
"@univerjs/thread-comment": "0.10.6-experimental.20250903-f52e3bf"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
|
-
"typescript": "^5.
|
|
58
|
+
"typescript": "^5.9.2",
|
|
59
59
|
"vite": "^7.1.3",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.10.
|
|
61
|
+
"@univerjs-infra/shared": "0.10.6"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|