@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505051607 → 0.7.0-nightly.202505071607

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x198baa=_0x1c06;(function(_0x263383,_0x2f9ca3){const _0x25dfd0=_0x1c06,_0x41cd7d=_0x263383();while(!![]){try{const _0x466fce=parseInt(_0x25dfd0(0xed))/0x1*(parseInt(_0x25dfd0(0xfc))/0x2)+-parseInt(_0x25dfd0(0xfa))/0x3+parseInt(_0x25dfd0(0x12b))/0x4+parseInt(_0x25dfd0(0xb0))/0x5*(-parseInt(_0x25dfd0(0xd1))/0x6)+-parseInt(_0x25dfd0(0xb6))/0x7+-parseInt(_0x25dfd0(0xbc))/0x8*(parseInt(_0x25dfd0(0xd2))/0x9)+parseInt(_0x25dfd0(0x103))/0xa;if(_0x466fce===_0x2f9ca3)break;else _0x41cd7d['push'](_0x41cd7d['shift']());}catch(_0x1c59e1){_0x41cd7d['push'](_0x41cd7d['shift']());}}}(_0x2adb,0x9f850));function _0x1c06(_0x26be66,_0x418965){const _0x2adb9a=_0x2adb();return _0x1c06=function(_0x1c068a,_0x196211){_0x1c068a=_0x1c068a-0xaf;let _0x1845e2=_0x2adb9a[_0x1c068a];return _0x1845e2;},_0x1c06(_0x26be66,_0x418965);}Object[_0x198baa(0x109)](exports,Symbol[_0x198baa(0x111)],{'value':'Module'});const b=require(_0x198baa(0x12a)),T=require(_0x198baa(0xca)),c=require('@univerjs/core'),j=require(_0x198baa(0xaf)),M=require(_0x198baa(0x118)),w=require(_0x198baa(0xd0)),P=require(_0x198baa(0xbb)),U=_0x198baa(0xcb);var I=(_0x544eda=>(_0x544eda[_0x544eda[_0x198baa(0xf3)]=0x0]=_0x198baa(0xf3),_0x544eda[_0x544eda['Solved']=0x1]=_0x198baa(0x11f),_0x544eda[_0x544eda[_0x198baa(0xff)]=-0x1]=_0x198baa(0xff),_0x544eda))(I||{}),v=(_0xad55e0=>(_0xad55e0[_0xad55e0[_0x198baa(0xb7)]=0x0]=_0x198baa(0xb7),_0xad55e0[_0xad55e0['Add']=0x1]=_0x198baa(0xfb),_0xad55e0[_0xad55e0[_0x198baa(0x105)]=0x2]=_0x198baa(0x105),_0xad55e0[_0xad55e0[_0x198baa(0x115)]=0x3]='Edit',_0xad55e0[_0xad55e0[_0x198baa(0x11b)]=0x4]=_0x198baa(0x11b),_0xad55e0[_0xad55e0[_0x198baa(0xf0)]=0x5]=_0x198baa(0xf0),_0xad55e0[_0xad55e0[_0x198baa(0xff)]=-0x1]=_0x198baa(0xff),_0xad55e0))(v||{});const f=_0x16c6da=>c['dayjs'](new Date(+_0x16c6da))[_0x198baa(0x119)](_0x198baa(0x104)),R=async(_0x3827ef,_0x23fa53)=>{const _0x2a83d5=_0x198baa,_0x36a250=_0x3827ef[_0x2a83d5(0xd9)](c[_0x2a83d5(0x120)]),_0x37cb14=_0x3827ef[_0x2a83d5(0xd9)](P[_0x2a83d5(0xf7)]);_0x23fa53['forEach'](_0x327093=>{const _0x3146e5=_0x2a83d5;_0x36a250['getUser'](_0x327093)&&_0x23fa53[_0x3146e5(0xec)](_0x327093);}),_0x23fa53['size']&&(await _0x37cb14[_0x2a83d5(0xd9)](_0x2a83d5(0xe5),{'params':{'userIDs':[..._0x23fa53]}}))['body'][_0x2a83d5(0xe2)]['forEach'](_0x4f1a4d=>{const _0x43f207=_0x2a83d5;_0x4f1a4d&&_0x36a250[_0x43f207(0xfe)](_0x4f1a4d);});};var $=Object[_0x198baa(0xe8)],E=(_0x4bd56d,_0x896d8c,_0x51aa9c,_0xadde65)=>{const _0x5201a5=_0x198baa;for(var _0x3e6e3e=_0xadde65>0x1?void 0x0:_0xadde65?$(_0x896d8c,_0x51aa9c):_0x896d8c,_0x246b5a=_0x4bd56d[_0x5201a5(0x108)]-0x1,_0x3d24aa;_0x246b5a>=0x0;_0x246b5a--)(_0x3d24aa=_0x4bd56d[_0x246b5a])&&(_0x3e6e3e=_0x3d24aa(_0x3e6e3e)||_0x3e6e3e);return _0x3e6e3e;},S=(_0x367026,_0x5dd3fc)=>(_0x3a22f0,_0xeac4f0)=>_0x5dd3fc(_0x3a22f0,_0xeac4f0,_0x367026);let p=class extends c[_0x198baa(0x11c)]{constructor(_0x46d5cc,_0x335407,_0x1c327a,_0x39748){const _0x27dfd2=_0x198baa;super(),this[_0x27dfd2(0xfd)]=_0x46d5cc,this[_0x27dfd2(0xba)]=_0x335407,this[_0x27dfd2(0x121)]=_0x1c327a,this[_0x27dfd2(0xbf)]=_0x39748,this[_0x27dfd2(0x11d)](),this[_0x27dfd2(0x11a)]();}[_0x198baa(0x11a)](){const _0x506396=_0x198baa;this['disposeWithMe'](this[_0x506396(0xba)][_0x506396(0xeb)][_0x506396(0xdc)](w['bufferTime'](0x10))[_0x506396(0xf2)](_0x190379=>{const _0x19f93a=_0x506396,_0x470ae1=new Set();_0x190379[_0x19f93a(0xd6)](_0x287c10=>{const _0x32a9e1=_0x19f93a;switch(_0x287c10[_0x32a9e1(0xea)]){case _0x32a9e1(0xf1):{const _0x663077=_0x287c10[_0x32a9e1(0x10f)][_0x32a9e1(0xc3)];_0x470ae1[_0x32a9e1(0xf1)](_0x663077);break;}}}),R(this[_0x19f93a(0xbf)],_0x470ae1);}));}['_init'](){const _0x5b3a86=_0x198baa;this[_0x5b3a86(0xdb)](this['_commentService'][_0x5b3a86(0xeb)][_0x5b3a86(0xf2)](async _0x4b740a=>{const _0x42ad58=_0x5b3a86;var _0x4bed04,_0x3a3354,_0x6acfb5,_0x3269c1;const _0xbd3b5=(_0x4bed04=this[_0x42ad58(0xba)][_0x42ad58(0xe6)](_0x4b740a[_0x42ad58(0xc0)])[_0x42ad58(0xdd)](_0x1b013e=>_0x1b013e[_0x42ad58(0xf9)]===_0x4b740a[_0x42ad58(0xf9)]))==null?void 0x0:_0x4bed04[_0x42ad58(0x129)];if(!_0xbd3b5)return;const {unitId:_0x12fa56,subUnitId:_0x17ff27}=_0xbd3b5;switch(_0x4b740a[_0x42ad58(0xc7)]&&this['_userService'][_0x42ad58(0xfe)](_0x4b740a['user']),_0x4b740a[_0x42ad58(0xea)]){case v[_0x42ad58(0xfb)]:break;case v['Reply']:{this[_0x42ad58(0xba)][_0x42ad58(0xc4)](_0x12fa56,_0x17ff27,{'unitId':_0x12fa56,'subUnitId':_0x17ff27,'ref':'','id':_0x4b740a[_0x42ad58(0x123)],'dT':f(+_0x4b740a[_0x42ad58(0x100)]),'threadId':_0x4b740a[_0x42ad58(0xf9)],'personId':(_0x6acfb5=(_0x3a3354=_0x4b740a[_0x42ad58(0xc7)])==null?void 0x0:_0x3a3354['userID'])!=null?_0x6acfb5:_0x4b740a[_0x42ad58(0xef)],'text':JSON[_0x42ad58(0x112)](_0x4b740a['content']),'parentId':_0xbd3b5['id']});break;}case v[_0x42ad58(0x11b)]:{const _0x5bee38=this[_0x42ad58(0xba)][_0x42ad58(0xf8)](_0x12fa56,_0x17ff27,_0x4b740a[_0x42ad58(0x123)]);_0x5bee38&&_0x5bee38[_0x42ad58(0xb1)]&&this['_threadCommentModel'][_0x42ad58(0x113)](_0x12fa56,_0x17ff27,_0x4b740a[_0x42ad58(0x123)]);break;}case v[_0x42ad58(0x115)]:{this[_0x42ad58(0xba)][_0x42ad58(0xb3)](_0x12fa56,_0x17ff27,{'commentId':_0x4b740a[_0x42ad58(0x123)],'text':JSON[_0x42ad58(0x112)](_0x4b740a[_0x42ad58(0xe4)])});break;}case v[_0x42ad58(0xf0)]:{const _0x204c72=(_0x3269c1=this[_0x42ad58(0xba)][_0x42ad58(0xe6)](_0x4b740a[_0x42ad58(0xc0)])[_0x42ad58(0xdd)](_0x45a3be=>_0x45a3be[_0x42ad58(0xf9)]===_0x4b740a[_0x42ad58(0xf9)]))==null?void 0x0:_0x3269c1[_0x42ad58(0x129)];_0x204c72&&this[_0x42ad58(0xba)][_0x42ad58(0xce)](_0x12fa56,_0x17ff27,_0x204c72['id'],_0x4b740a[_0x42ad58(0xbd)]===I[_0x42ad58(0x11f)]);break;}}}));}};p=E([S(0x0,c[_0x198baa(0xd3)](b[_0x198baa(0xde)])),S(0x1,c[_0x198baa(0xd3)](M[_0x198baa(0x117)])),S(0x2,c[_0x198baa(0xd3)](c[_0x198baa(0x120)])),S(0x3,c[_0x198baa(0xd3)](c['Injector']))],p);const q=_0x198baa(0xe3),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0xd0480b,_0x316ada,_0x3194ba,_0x5df2a3)=>{const _0x102160=_0x198baa;for(var _0x25cb7f=_0x5df2a3>0x1?void 0x0:_0x5df2a3?A(_0x316ada,_0x3194ba):_0x316ada,_0x7e9e15=_0xd0480b[_0x102160(0x108)]-0x1,_0x5e6185;_0x7e9e15>=0x0;_0x7e9e15--)(_0x5e6185=_0xd0480b[_0x7e9e15])&&(_0x25cb7f=_0x5e6185(_0x25cb7f)||_0x25cb7f);return _0x25cb7f;},_=(_0x127a83,_0x2e9a8a)=>(_0x2c34bb,_0x159064)=>_0x2e9a8a(_0x2c34bb,_0x159064,_0x127a83);function Y(_0xa87748,_0x2e67c9){const _0x3cc921=_0x198baa,_0x1c3b10=_0xa87748[_0x3cc921(0x10b)][0x0];return{..._0x2e67c9,'id':_0x1c3b10[_0x3cc921(0x123)],'resolved':_0xa87748[_0x3cc921(0xbd)]===0x1,'dT':f(_0x1c3b10['createTimestamp']),'personId':_0x1c3b10['userId'],'threadId':_0x1c3b10[_0x3cc921(0xf9)]};}function G(_0x4b37dc,_0x444f86,_0x315551){const _0x6e968=_0x198baa;var _0x49e093,_0x3db437;if(((_0x3db437=(_0x49e093=_0x4b37dc==null?void 0x0:_0x4b37dc[_0x6e968(0x10b)])==null?void 0x0:_0x49e093[_0x6e968(0x108)])!=null?_0x3db437:0x0)>0x0){const _0x4f4cfa=(_0x3a1b40,_0x5057f9)=>({'id':_0x3a1b40[_0x6e968(0x123)],'threadId':_0x3a1b40['threadId'],'dT':f(_0x3a1b40['createTimestamp']),'personId':_0x3a1b40[_0x6e968(0xef)],'resolved':_0x4b37dc['solved']===I[_0x6e968(0x11f)],'unitId':_0x444f86,'subUnitId':_0x315551,'text':JSON[_0x6e968(0x112)](_0x3a1b40[_0x6e968(0xe4)]),'parentId':_0x5057f9}),_0x2f5d3c=_0x4f4cfa(_0x4b37dc['replies'][0x0]);return{..._0x2f5d3c,'children':_0x4b37dc[_0x6e968(0x10b)][_0x6e968(0x124)](0x1)['map'](_0x29fade=>_0x4f4cfa(_0x29fade,_0x2f5d3c['id']))};}return null;}let g=class{constructor(_0x5c4357,_0x19730f,_0xf5eac7,_0x5c69d7){const _0x37172b=_0x198baa;this[_0x37172b(0x110)]=_0x5c4357,this[_0x37172b(0x121)]=_0x19730f,this[_0x37172b(0x128)]=_0xf5eac7,this[_0x37172b(0xbf)]=_0x5c69d7;}async[_0x198baa(0xc4)](_0x2fda1b){const _0x131723=_0x198baa;var _0x4295e8,_0x41dc5a;const {parentId:_0x4297af,unitId:_0x45d9e6,text:_0x4ec99e,threadId:_0x21c035}=_0x2fda1b,_0x409c45=(_0x41dc5a=(_0x4295e8=_0x4ec99e[_0x131723(0xc1)])==null?void 0x0:_0x4295e8[_0x131723(0x114)](_0x161d0e=>_0x161d0e[_0x131723(0xc2)]===c[_0x131723(0x122)][_0x131723(0xd4)])[_0x131723(0xcd)](_0x4b5aa2=>_0x4b5aa2['rangeId']))!=null?_0x41dc5a:[],_0x284638=JSON[_0x131723(0xd5)](_0x4ec99e),_0x39b02b=(await this['_sessionService'][_0x131723(0x107)](_0x45d9e6))[_0x131723(0xcf)]();if(_0x4297af){const _0x1378df={'memberId':_0x39b02b,'unitId':_0x45d9e6,'content':_0x284638,'mention':_0x409c45,'threadId':_0x21c035},_0x344a38=(await this['_httpService'][_0x131723(0xee)](_0x131723(0x11e)+_0x45d9e6+_0x131723(0x125),{'body':_0x1378df}))['body'][_0x131723(0xc9)];return{..._0x2fda1b,'id':_0x344a38['replyId'],'dT':c['dayjs'](+_0x344a38['createTimestamp'])[_0x131723(0x119)](_0x131723(0x104)),'personId':_0x344a38[_0x131723(0xef)]};}else{const _0x3cc85c={'memberId':_0x39b02b,'unitId':_0x45d9e6,'content':_0x284638,'mention':_0x409c45},_0x2c747e=await this[_0x131723(0x110)][_0x131723(0xee)](_0x131723(0x11e)+_0x45d9e6+_0x131723(0xb5),{'body':_0x3cc85c});return Y(_0x2c747e['body'][_0x131723(0xd7)],_0x2fda1b);}}async['updateComment'](_0x57403a){const _0x16de7e=_0x198baa;var _0x3235d5,_0x384da2;const {text:_0x425895,unitId:_0x32a370}=_0x57403a,_0x1586d4=(_0x384da2=(_0x3235d5=_0x425895[_0x16de7e(0xc1)])==null?void 0x0:_0x3235d5[_0x16de7e(0x114)](_0x300646=>_0x300646['rangeType']===c['CustomRangeType'][_0x16de7e(0xd4)])['map'](_0x2e0dcf=>_0x2e0dcf[_0x16de7e(0x102)]))!=null?_0x384da2:[],_0xd8c178=JSON[_0x16de7e(0xd5)](_0x425895),_0x498b0d=_0x57403a[_0x16de7e(0xf9)],_0x924345=_0x57403a['id'],_0x218a65={'memberId':(await this[_0x16de7e(0x128)][_0x16de7e(0x107)](_0x32a370))[_0x16de7e(0xcf)](),'unitId':_0x32a370,'threadId':_0x498b0d,'mention':_0x1586d4,'content':_0xd8c178,'replyId':_0x924345},_0x3b7c05=await this['_httpService'][_0x16de7e(0xee)](_0x16de7e(0x11e)+_0x32a370+_0x16de7e(0xe7),{'body':_0x218a65});return!_0x3b7c05['body'][_0x16de7e(0x12c)]||_0x3b7c05['body'][_0x16de7e(0x12c)][_0x16de7e(0xe1)]===0x1;}async[_0x198baa(0xce)](_0x309e65){const _0x48a1eb=_0x198baa,{unitId:_0x2f63d6}=_0x309e65,_0x210845=_0x309e65[_0x48a1eb(0xf9)],_0x4cdd12={'memberId':this['_userService'][_0x48a1eb(0x116)]()[_0x48a1eb(0xc5)],'unitId':_0x2f63d6,'threadId':_0x210845,'solved':_0x309e65[_0x48a1eb(0xb2)]?I[_0x48a1eb(0x11f)]:I[_0x48a1eb(0xf3)]},_0x4ec78e=await this[_0x48a1eb(0x110)][_0x48a1eb(0xee)](_0x48a1eb(0x11e)+_0x2f63d6+_0x48a1eb(0x126),{'body':_0x4cdd12});return!_0x4ec78e[_0x48a1eb(0x127)][_0x48a1eb(0x12c)]||_0x4ec78e[_0x48a1eb(0x127)][_0x48a1eb(0x12c)][_0x48a1eb(0xe1)]===0x1;}async[_0x198baa(0x113)](_0x5cd547,_0x242331,_0x378499,_0x407b66){const _0x2b6413=_0x198baa,_0x790447={'memberId':(await this[_0x2b6413(0x128)][_0x2b6413(0x107)](_0x5cd547))['getMemberID'](),'threadId':_0x378499,'replyId':_0x407b66,'unitId':_0x5cd547},_0x1c9808=await this[_0x2b6413(0x110)][_0x2b6413(0xee)](_0x2b6413(0x11e)+_0x5cd547+_0x2b6413(0x10d),{'body':_0x790447});return!_0x1c9808[_0x2b6413(0x127)][_0x2b6413(0x12c)]||_0x1c9808['body'][_0x2b6413(0x12c)][_0x2b6413(0xe1)]===0x1;}async[_0x198baa(0x10e)](_0x136212,_0x53a648,_0x2a68b9){const _0x2b5867=_0x198baa,_0x4ee690={'unitId':_0x136212,'threadId':_0x2a68b9},_0x4f9adb=await this[_0x2b5867(0x110)][_0x2b5867(0xee)](_0x2b5867(0x11e)+_0x136212+'/list',{'body':_0x4ee690}),_0x979585=_0x2a68b9[_0x2b5867(0xcd)](_0x3484cb=>G(_0x4f9adb['body'][_0x2b5867(0xf4)][_0x3484cb],_0x136212,_0x53a648))['filter'](Boolean);return Object['values'](_0x4f9adb[_0x2b5867(0x127)][_0x2b5867(0xe2)])[_0x2b5867(0xd6)](_0x4a83fb=>{const _0x2572f0=_0x2b5867;this[_0x2572f0(0x121)][_0x2572f0(0xfe)](_0x4a83fb);}),_0x979585;}['saveCommentToSnapshot'](_0x1636cb){return{'id':_0x1636cb['id'],'threadId':_0x1636cb['threadId'],'ref':_0x1636cb['ref']};}};function _0x2adb(){const _0x4e8855=['solved','UniverThreadCommentUIPlugin','_injector','unitId','customRanges','rangeType','personId','addComment','userID','_initDataSource','user','dataSource','reply','@univerjs-pro/license','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Injector','map','resolveComment','getMemberID','rxjs','1086414AXNHdn','25911BLEaFc','Inject','COMMENT','stringify','forEach','comment','setConfig','get','UniverThreadCommentDataSourcePlugin','disposeWithMe','pipe','find','CommentService','symbol','DependentOn','code','users','thread-comment-data-source.config','content','/universer-api/user/list','getUnit','/edit','getOwnPropertyDescriptor','syncUpdateMutationToColla','type','commentUpdate$','delete','547IbrKRh','post','userId','Solve','add','subscribe','OpenOrReOpen','comments','_configService','IThreadCommentDataSourceService','HTTPService','getComment','threadId','378333Lkklch','Add','1490stUiyw','_commentService','addUser','UNRECOGNIZED','createTimestamp','onStarting','rangeId','7414700XgyQQO','YYYY/MM/DD\x20HH:mm','Reply','_config','requireSession','length','defineProperty','UniverLicensePlugin','replies','_threadCommentDataSourceService','/delete','listComments','payload','_httpService','toStringTag','parse','deleteComment','filter','Edit','getCurrentUser','ThreadCommentModel','@univerjs/thread-comment','format','_initUserSync','Delete','Disposable','_init','/universer-api/comment/unit/','Solved','UserManagerService','_userService','CustomRangeType','replyId','slice','/reply','/solved','body','_sessionService','root','@univerjs-pro/collaboration-client','4709704knkvGp','error','@univerjs/thread-comment-ui','25lsJSJe','parentId','resolved','updateComment','onReady','/add','1729980RriwVh','Unknown','CollaborationSessionService','Plugin','_threadCommentModel','@univerjs/network','1096gVxFKk'];_0x2adb=function(){return _0x4e8855;};return _0x2adb();}g=x([_(0x0,c['Inject'](P['HTTPService'])),_(0x1,c[_0x198baa(0xd3)](c[_0x198baa(0x120)])),_(0x2,c[_0x198baa(0xd3)](b[_0x198baa(0xb8)])),_(0x3,c[_0x198baa(0xd3)](c[_0x198baa(0xcc)]))],g);var H=Object[_0x198baa(0xe8)],J=(_0x16a78f,_0x2ce0e1,_0x2acf9d,_0x1f3fe8)=>{const _0x5e14d2=_0x198baa;for(var _0x4da8f9=_0x1f3fe8>0x1?void 0x0:_0x1f3fe8?H(_0x2ce0e1,_0x2acf9d):_0x2ce0e1,_0x32450a=_0x16a78f[_0x5e14d2(0x108)]-0x1,_0x2b5814;_0x32450a>=0x0;_0x32450a--)(_0x2b5814=_0x16a78f[_0x32450a])&&(_0x4da8f9=_0x2b5814(_0x4da8f9)||_0x4da8f9);return _0x4da8f9;},y=(_0x571eea,_0x2a59a3)=>(_0x3c9b67,_0x27dad7)=>_0x2a59a3(_0x3c9b67,_0x27dad7,_0x571eea);let C=class extends c[_0x198baa(0x11c)]{constructor(_0x1ac1ed,_0x3248cf){const _0x136770=_0x198baa;super(),this['_threadCommentDataSourceService']=_0x1ac1ed,this['_threadCommentDataSource']=_0x3248cf,this[_0x136770(0xc6)]();}[_0x198baa(0xc6)](){const _0x7982c0=_0x198baa;this[_0x7982c0(0x10c)][_0x7982c0(0xc8)]=this['_threadCommentDataSource'],this[_0x7982c0(0x10c)][_0x7982c0(0xe9)]=!0x1;}};C=J([y(0x0,M[_0x198baa(0xf6)]),y(0x1,c[_0x198baa(0xd3)](g))],C);var F=Object[_0x198baa(0x109)],L=Object[_0x198baa(0xe8)],Z=(_0x9c7e57,_0x245c53,_0x5435ac)=>_0x245c53 in _0x9c7e57?F(_0x9c7e57,_0x245c53,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5435ac}):_0x9c7e57[_0x245c53]=_0x5435ac,W=(_0x9410a9,_0x2a6fac,_0x211707,_0x786130)=>{const _0x5b4bf5=_0x198baa;for(var _0x571b9a=_0x786130>0x1?void 0x0:_0x786130?L(_0x2a6fac,_0x211707):_0x2a6fac,_0x53c74d=_0x9410a9[_0x5b4bf5(0x108)]-0x1,_0x406a12;_0x53c74d>=0x0;_0x53c74d--)(_0x406a12=_0x9410a9[_0x53c74d])&&(_0x571b9a=_0x406a12(_0x571b9a)||_0x571b9a);return _0x571b9a;},O=(_0x393a1d,_0x43a907)=>(_0x2ca47b,_0x1b2251)=>_0x43a907(_0x2ca47b,_0x1b2251,_0x393a1d),N=(_0x4a13f1,_0x58a6f1,_0x2ace9f)=>Z(_0x4a13f1,typeof _0x58a6f1!=_0x198baa(0xdf)?_0x58a6f1+'':_0x58a6f1,_0x2ace9f);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x198baa(0xb9)]{constructor(_0x1f3143=D,_0xfbe742,_0x49ee31){const _0x4998c4=_0x198baa;super(),this[_0x4998c4(0x106)]=_0x1f3143,this[_0x4998c4(0xbf)]=_0xfbe742,this[_0x4998c4(0xf5)]=_0x49ee31;const {..._0x18c28c}=c['merge']({},D,this[_0x4998c4(0x106)]);this[_0x4998c4(0xf5)][_0x4998c4(0xd8)](q,_0x18c28c);}[_0x198baa(0x101)](){const _0x3df737=_0x198baa;[[g],[C],[p]][_0x3df737(0xd6)](_0x543f5c=>{const _0x3964ab=_0x3df737;this[_0x3964ab(0xbf)]['add'](_0x543f5c);});}[_0x198baa(0xb4)](){const _0x58dcf4=_0x198baa;this['_injector'][_0x58dcf4(0xd9)](C),this[_0x58dcf4(0xbf)][_0x58dcf4(0xd9)](p);}},N(exports[_0x198baa(0xda)],'pluginName',U),N(exports[_0x198baa(0xda)],_0x198baa(0xea),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x198baa(0xda)]=W([c[_0x198baa(0xe0)](j[_0x198baa(0xbe)],b['UniverCollaborationClientPlugin'],T[_0x198baa(0x10a)]),O(0x1,c[_0x198baa(0xd3)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x198baa(0xda)]);
1
+ 'use strict';const _0x367232=_0x4df4;(function(_0xd779eb,_0x252f9d){const _0x3f7aa4=_0x4df4,_0x12478=_0xd779eb();while(!![]){try{const _0x3b00bd=-parseInt(_0x3f7aa4(0x1e1))/0x1+parseInt(_0x3f7aa4(0x1b4))/0x2*(-parseInt(_0x3f7aa4(0x1b8))/0x3)+-parseInt(_0x3f7aa4(0x1ab))/0x4*(parseInt(_0x3f7aa4(0x1e5))/0x5)+parseInt(_0x3f7aa4(0x1aa))/0x6*(parseInt(_0x3f7aa4(0x1b5))/0x7)+parseInt(_0x3f7aa4(0x17c))/0x8+parseInt(_0x3f7aa4(0x196))/0x9+parseInt(_0x3f7aa4(0x19a))/0xa*(-parseInt(_0x3f7aa4(0x1dd))/0xb);if(_0x3b00bd===_0x252f9d)break;else _0x12478['push'](_0x12478['shift']());}catch(_0x525dd7){_0x12478['push'](_0x12478['shift']());}}}(_0x450c,0x720d3));Object[_0x367232(0x191)](exports,Symbol[_0x367232(0x16e)],{'value':_0x367232(0x1c8)});const b=require(_0x367232(0x176)),T=require(_0x367232(0x182)),c=require('@univerjs/core'),j=require(_0x367232(0x1c1)),M=require(_0x367232(0x17f)),w=require(_0x367232(0x192)),P=require('@univerjs/network'),U=_0x367232(0x16b);var I=(_0x10cf79=>(_0x10cf79[_0x10cf79[_0x367232(0x1a8)]=0x0]=_0x367232(0x1a8),_0x10cf79[_0x10cf79[_0x367232(0x1c9)]=0x1]='Solved',_0x10cf79[_0x10cf79[_0x367232(0x184)]=-0x1]=_0x367232(0x184),_0x10cf79))(I||{}),v=(_0x5e795c=>(_0x5e795c[_0x5e795c[_0x367232(0x1cd)]=0x0]=_0x367232(0x1cd),_0x5e795c[_0x5e795c[_0x367232(0x16c)]=0x1]='Add',_0x5e795c[_0x5e795c[_0x367232(0x1ad)]=0x2]='Reply',_0x5e795c[_0x5e795c[_0x367232(0x1cb)]=0x3]=_0x367232(0x1cb),_0x5e795c[_0x5e795c['Delete']=0x4]=_0x367232(0x1e0),_0x5e795c[_0x5e795c['Solve']=0x5]=_0x367232(0x1a9),_0x5e795c[_0x5e795c['UNRECOGNIZED']=-0x1]=_0x367232(0x184),_0x5e795c))(v||{});const f=_0xf78c50=>c['dayjs'](new Date(+_0xf78c50))[_0x367232(0x1bd)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x2f9629,_0x433fcb)=>{const _0x552865=_0x367232,_0x5dee73=_0x2f9629['get'](c[_0x552865(0x1bc)]),_0x4c792d=_0x2f9629['get'](P['HTTPService']);_0x433fcb[_0x552865(0x1cf)](_0xfb84a5=>{const _0x3cf832=_0x552865;_0x5dee73[_0x3cf832(0x183)](_0xfb84a5)&&_0x433fcb['delete'](_0xfb84a5);}),_0x433fcb['size']&&(await _0x4c792d[_0x552865(0x1bf)](_0x552865(0x1b7),{'params':{'userIDs':[..._0x433fcb]}}))[_0x552865(0x1a0)]['users']['forEach'](_0x155f38=>{const _0x26639b=_0x552865;_0x155f38&&_0x5dee73[_0x26639b(0x1db)](_0x155f38);});};var $=Object[_0x367232(0x1d9)],E=(_0x32bbd9,_0x2a9b0a,_0x87baaf,_0x38eef9)=>{const _0x396d57=_0x367232;for(var _0x278eb5=_0x38eef9>0x1?void 0x0:_0x38eef9?$(_0x2a9b0a,_0x87baaf):_0x2a9b0a,_0x93c396=_0x32bbd9[_0x396d57(0x19f)]-0x1,_0x5f334b;_0x93c396>=0x0;_0x93c396--)(_0x5f334b=_0x32bbd9[_0x93c396])&&(_0x278eb5=_0x5f334b(_0x278eb5)||_0x278eb5);return _0x278eb5;},S=(_0x548bd8,_0x3a51a3)=>(_0x5a542c,_0x3356e0)=>_0x3a51a3(_0x5a542c,_0x3356e0,_0x548bd8);let p=class extends c[_0x367232(0x1ae)]{constructor(_0x33aff1,_0x4c0329,_0x5be9d7,_0x486542){const _0x88a054=_0x367232;super(),this['_commentService']=_0x33aff1,this[_0x88a054(0x175)]=_0x4c0329,this['_userService']=_0x5be9d7,this[_0x88a054(0x17d)]=_0x486542,this[_0x88a054(0x1dc)](),this[_0x88a054(0x1d5)]();}[_0x367232(0x1d5)](){const _0x4e0641=_0x367232;this[_0x4e0641(0x1e4)](this['_threadCommentModel'][_0x4e0641(0x1bb)][_0x4e0641(0x1a7)](w['bufferTime'](0x10))[_0x4e0641(0x1d0)](_0x397734=>{const _0x38657b=_0x4e0641,_0x33eaf7=new Set();_0x397734[_0x38657b(0x1cf)](_0x245203=>{const _0x4c39e3=_0x38657b;switch(_0x245203[_0x4c39e3(0x195)]){case _0x4c39e3(0x1da):{const _0x156d7c=_0x245203[_0x4c39e3(0x190)]['personId'];_0x33eaf7['add'](_0x156d7c);break;}}}),R(this[_0x38657b(0x17d)],_0x33eaf7);}));}[_0x367232(0x1dc)](){const _0x3cdf32=_0x367232;this[_0x3cdf32(0x1e4)](this['_commentService'][_0x3cdf32(0x1bb)][_0x3cdf32(0x1d0)](async _0x50c80a=>{const _0x4d7d2f=_0x3cdf32;var _0x5b725a,_0x5e65a5,_0x2f8222,_0x4e75e3;const _0x3d8d71=(_0x5b725a=this[_0x4d7d2f(0x175)]['getUnit'](_0x50c80a['unitId'])[_0x4d7d2f(0x199)](_0x40ccd1=>_0x40ccd1[_0x4d7d2f(0x1ce)]===_0x50c80a[_0x4d7d2f(0x1ce)]))==null?void 0x0:_0x5b725a[_0x4d7d2f(0x169)];if(!_0x3d8d71)return;const {unitId:_0x31c8c7,subUnitId:_0x4beba0}=_0x3d8d71;switch(_0x50c80a[_0x4d7d2f(0x1c5)]&&this[_0x4d7d2f(0x186)]['addUser'](_0x50c80a['user']),_0x50c80a[_0x4d7d2f(0x195)]){case v[_0x4d7d2f(0x16c)]:break;case v[_0x4d7d2f(0x1ad)]:{this[_0x4d7d2f(0x175)][_0x4d7d2f(0x1a3)](_0x31c8c7,_0x4beba0,{'unitId':_0x31c8c7,'subUnitId':_0x4beba0,'ref':'','id':_0x50c80a[_0x4d7d2f(0x170)],'dT':f(+_0x50c80a[_0x4d7d2f(0x1e6)]),'threadId':_0x50c80a[_0x4d7d2f(0x1ce)],'personId':(_0x2f8222=(_0x5e65a5=_0x50c80a['user'])==null?void 0x0:_0x5e65a5[_0x4d7d2f(0x19d)])!=null?_0x2f8222:_0x50c80a[_0x4d7d2f(0x1cc)],'text':JSON[_0x4d7d2f(0x1ac)](_0x50c80a[_0x4d7d2f(0x1c7)]),'parentId':_0x3d8d71['id']});break;}case v[_0x4d7d2f(0x1e0)]:{const _0x19a54b=this[_0x4d7d2f(0x175)][_0x4d7d2f(0x1d3)](_0x31c8c7,_0x4beba0,_0x50c80a['replyId']);_0x19a54b&&_0x19a54b['parentId']&&this[_0x4d7d2f(0x175)][_0x4d7d2f(0x1b6)](_0x31c8c7,_0x4beba0,_0x50c80a['replyId']);break;}case v[_0x4d7d2f(0x1cb)]:{this[_0x4d7d2f(0x175)][_0x4d7d2f(0x1a2)](_0x31c8c7,_0x4beba0,{'commentId':_0x50c80a[_0x4d7d2f(0x170)],'text':JSON[_0x4d7d2f(0x1ac)](_0x50c80a[_0x4d7d2f(0x1c7)])});break;}case v['Solve']:{const _0x49df2c=(_0x4e75e3=this['_threadCommentModel'][_0x4d7d2f(0x1de)](_0x50c80a['unitId'])[_0x4d7d2f(0x199)](_0x37ec67=>_0x37ec67[_0x4d7d2f(0x1ce)]===_0x50c80a[_0x4d7d2f(0x1ce)]))==null?void 0x0:_0x4e75e3[_0x4d7d2f(0x169)];_0x49df2c&&this[_0x4d7d2f(0x175)][_0x4d7d2f(0x17a)](_0x31c8c7,_0x4beba0,_0x49df2c['id'],_0x50c80a['solved']===I[_0x4d7d2f(0x1c9)]);break;}}}));}};p=E([S(0x0,c[_0x367232(0x173)](b[_0x367232(0x16a)])),S(0x1,c[_0x367232(0x173)](M[_0x367232(0x172)])),S(0x2,c['Inject'](c[_0x367232(0x1bc)])),S(0x3,c['Inject'](c[_0x367232(0x188)]))],p);const q=_0x367232(0x1d8),D={};var A=Object[_0x367232(0x1d9)],x=(_0x46ab0a,_0x4f14c6,_0x33d409,_0x34d104)=>{const _0x4fba65=_0x367232;for(var _0x4fe326=_0x34d104>0x1?void 0x0:_0x34d104?A(_0x4f14c6,_0x33d409):_0x4f14c6,_0x182a6a=_0x46ab0a[_0x4fba65(0x19f)]-0x1,_0x1f8842;_0x182a6a>=0x0;_0x182a6a--)(_0x1f8842=_0x46ab0a[_0x182a6a])&&(_0x4fe326=_0x1f8842(_0x4fe326)||_0x4fe326);return _0x4fe326;},_=(_0x1811fd,_0x10379d)=>(_0x4688b7,_0x35aaef)=>_0x10379d(_0x4688b7,_0x35aaef,_0x1811fd);function Y(_0x18f434,_0x80f676){const _0x4f8b15=_0x367232,_0x49ab0e=_0x18f434[_0x4f8b15(0x1ba)][0x0];return{..._0x80f676,'id':_0x49ab0e[_0x4f8b15(0x170)],'resolved':_0x18f434[_0x4f8b15(0x1ca)]===0x1,'dT':f(_0x49ab0e[_0x4f8b15(0x1e6)]),'personId':_0x49ab0e[_0x4f8b15(0x1cc)],'threadId':_0x49ab0e[_0x4f8b15(0x1ce)]};}function G(_0x2c4374,_0x51abb5,_0xcd3e69){const _0x26b9e7=_0x367232;var _0x11fbc1,_0x4088d1;if(((_0x4088d1=(_0x11fbc1=_0x2c4374==null?void 0x0:_0x2c4374['replies'])==null?void 0x0:_0x11fbc1['length'])!=null?_0x4088d1:0x0)>0x0){const _0x5a8b7b=(_0x3bf35a,_0x22dd5a)=>({'id':_0x3bf35a[_0x26b9e7(0x170)],'threadId':_0x3bf35a[_0x26b9e7(0x1ce)],'dT':f(_0x3bf35a[_0x26b9e7(0x1e6)]),'personId':_0x3bf35a[_0x26b9e7(0x1cc)],'resolved':_0x2c4374['solved']===I[_0x26b9e7(0x1c9)],'unitId':_0x51abb5,'subUnitId':_0xcd3e69,'text':JSON[_0x26b9e7(0x1ac)](_0x3bf35a[_0x26b9e7(0x1c7)]),'parentId':_0x22dd5a}),_0x52b059=_0x5a8b7b(_0x2c4374['replies'][0x0]);return{..._0x52b059,'children':_0x2c4374['replies'][_0x26b9e7(0x198)](0x1)[_0x26b9e7(0x18b)](_0x2eac46=>_0x5a8b7b(_0x2eac46,_0x52b059['id']))};}return null;}let g=class{constructor(_0x34e766,_0x2f96ee,_0x553378,_0x155a29){const _0x241f72=_0x367232;this[_0x241f72(0x1b2)]=_0x34e766,this[_0x241f72(0x186)]=_0x2f96ee,this[_0x241f72(0x1df)]=_0x553378,this['_injector']=_0x155a29;}async[_0x367232(0x1a3)](_0x5564a2){const _0x1a9e03=_0x367232;var _0x1250a5,_0x7bffd4;const {parentId:_0x2daf3d,unitId:_0x1a3909,text:_0x359fcd,threadId:_0x5a5333}=_0x5564a2,_0x2f8a1a=(_0x7bffd4=(_0x1250a5=_0x359fcd[_0x1a9e03(0x1a1)])==null?void 0x0:_0x1250a5[_0x1a9e03(0x1d6)](_0xaa2cc0=>_0xaa2cc0['rangeType']===c[_0x1a9e03(0x19b)][_0x1a9e03(0x1d4)])['map'](_0x3e5099=>_0x3e5099['rangeId']))!=null?_0x7bffd4:[],_0x1c99fa=JSON[_0x1a9e03(0x16d)](_0x359fcd),_0x15a88f=(await this[_0x1a9e03(0x1df)]['requireSession'](_0x1a3909))['getMemberID']();if(_0x2daf3d){const _0x2b9a9e={'memberId':_0x15a88f,'unitId':_0x1a3909,'content':_0x1c99fa,'mention':_0x2f8a1a,'threadId':_0x5a5333},_0x4eaeb3=(await this[_0x1a9e03(0x1b2)][_0x1a9e03(0x179)](_0x1a9e03(0x1e2)+_0x1a3909+_0x1a9e03(0x1c3),{'body':_0x2b9a9e}))[_0x1a9e03(0x1a0)][_0x1a9e03(0x17b)];return{..._0x5564a2,'id':_0x4eaeb3[_0x1a9e03(0x170)],'dT':c[_0x1a9e03(0x1d7)](+_0x4eaeb3['createTimestamp'])[_0x1a9e03(0x1bd)](_0x1a9e03(0x1b1)),'personId':_0x4eaeb3['userId']};}else{const _0x2398c0={'memberId':_0x15a88f,'unitId':_0x1a3909,'content':_0x1c99fa,'mention':_0x2f8a1a},_0x4fe46=await this[_0x1a9e03(0x1b2)][_0x1a9e03(0x179)]('/universer-api/comment/unit/'+_0x1a3909+_0x1a9e03(0x18a),{'body':_0x2398c0});return Y(_0x4fe46[_0x1a9e03(0x1a0)]['comment'],_0x5564a2);}}async[_0x367232(0x1a2)](_0x50b88c){const _0xdaf4bf=_0x367232;var _0x295940,_0x301745;const {text:_0x579139,unitId:_0x2dbaff}=_0x50b88c,_0x3ec79c=(_0x301745=(_0x295940=_0x579139[_0xdaf4bf(0x1a1)])==null?void 0x0:_0x295940[_0xdaf4bf(0x1d6)](_0x59e453=>_0x59e453[_0xdaf4bf(0x19e)]===c[_0xdaf4bf(0x19b)][_0xdaf4bf(0x1d4)])['map'](_0x450c1e=>_0x450c1e['rangeId']))!=null?_0x301745:[],_0x171587=JSON[_0xdaf4bf(0x16d)](_0x579139),_0x2e0ebd=_0x50b88c['threadId'],_0x2139c7=_0x50b88c['id'],_0x294a0d={'memberId':(await this[_0xdaf4bf(0x1df)][_0xdaf4bf(0x178)](_0x2dbaff))[_0xdaf4bf(0x1c6)](),'unitId':_0x2dbaff,'threadId':_0x2e0ebd,'mention':_0x3ec79c,'content':_0x171587,'replyId':_0x2139c7},_0x37ce02=await this['_httpService'][_0xdaf4bf(0x179)](_0xdaf4bf(0x1e2)+_0x2dbaff+_0xdaf4bf(0x197),{'body':_0x294a0d});return!_0x37ce02['body'][_0xdaf4bf(0x193)]||_0x37ce02[_0xdaf4bf(0x1a0)][_0xdaf4bf(0x193)]['code']===0x1;}async[_0x367232(0x17a)](_0x7d1ca8){const _0x29e058=_0x367232,{unitId:_0x23c431}=_0x7d1ca8,_0x307c5e=_0x7d1ca8[_0x29e058(0x1ce)],_0x19eaa3={'memberId':this[_0x29e058(0x186)]['getCurrentUser']()[_0x29e058(0x19d)],'unitId':_0x23c431,'threadId':_0x307c5e,'solved':_0x7d1ca8[_0x29e058(0x185)]?I['Solved']:I[_0x29e058(0x1a8)]},_0x41a8b5=await this[_0x29e058(0x1b2)]['post']('/universer-api/comment/unit/'+_0x23c431+'/solved',{'body':_0x19eaa3});return!_0x41a8b5[_0x29e058(0x1a0)][_0x29e058(0x193)]||_0x41a8b5['body'][_0x29e058(0x193)][_0x29e058(0x18f)]===0x1;}async['deleteComment'](_0x287ca4,_0x27b070,_0x2b611e,_0x44f3a9){const _0x331e72=_0x367232,_0x14fbda={'memberId':(await this[_0x331e72(0x1df)][_0x331e72(0x178)](_0x287ca4))[_0x331e72(0x1c6)](),'threadId':_0x2b611e,'replyId':_0x44f3a9,'unitId':_0x287ca4},_0x219f61=await this[_0x331e72(0x1b2)][_0x331e72(0x179)](_0x331e72(0x1e2)+_0x287ca4+_0x331e72(0x1e3),{'body':_0x14fbda});return!_0x219f61[_0x331e72(0x1a0)]['error']||_0x219f61[_0x331e72(0x1a0)][_0x331e72(0x193)][_0x331e72(0x18f)]===0x1;}async['listComments'](_0x150692,_0x30bd69,_0x53c191){const _0x1e46d4=_0x367232,_0x12cdff={'unitId':_0x150692,'threadId':_0x53c191},_0x4a3321=await this[_0x1e46d4(0x1b2)][_0x1e46d4(0x179)]('/universer-api/comment/unit/'+_0x150692+_0x1e46d4(0x171),{'body':_0x12cdff}),_0x16a2f4=_0x53c191[_0x1e46d4(0x18b)](_0x51ab6d=>G(_0x4a3321['body'][_0x1e46d4(0x174)][_0x51ab6d],_0x150692,_0x30bd69))['filter'](Boolean);return Object[_0x1e46d4(0x1a5)](_0x4a3321[_0x1e46d4(0x1a0)][_0x1e46d4(0x1af)])[_0x1e46d4(0x1cf)](_0x5d6e58=>{const _0x3bd19b=_0x1e46d4;this[_0x3bd19b(0x186)][_0x3bd19b(0x1db)](_0x5d6e58);}),_0x16a2f4;}[_0x367232(0x18c)](_0x4f9dbe){const _0x5b2736=_0x367232;return{'id':_0x4f9dbe['id'],'threadId':_0x4f9dbe['threadId'],'ref':_0x4f9dbe[_0x5b2736(0x1be)]};}};g=x([_(0x0,c[_0x367232(0x173)](P[_0x367232(0x187)])),_(0x1,c[_0x367232(0x173)](c[_0x367232(0x1bc)])),_(0x2,c[_0x367232(0x173)](b[_0x367232(0x1b0)])),_(0x3,c[_0x367232(0x173)](c[_0x367232(0x188)]))],g);var H=Object[_0x367232(0x1d9)],J=(_0x2fc280,_0x261b27,_0x54d2f4,_0x53fcff)=>{const _0x1b746b=_0x367232;for(var _0x280d01=_0x53fcff>0x1?void 0x0:_0x53fcff?H(_0x261b27,_0x54d2f4):_0x261b27,_0x5d46bb=_0x2fc280[_0x1b746b(0x19f)]-0x1,_0x1dc319;_0x5d46bb>=0x0;_0x5d46bb--)(_0x1dc319=_0x2fc280[_0x5d46bb])&&(_0x280d01=_0x1dc319(_0x280d01)||_0x280d01);return _0x280d01;},y=(_0x1d96ae,_0x3a825b)=>(_0x46d80e,_0x27cc00)=>_0x3a825b(_0x46d80e,_0x27cc00,_0x1d96ae);let C=class extends c[_0x367232(0x1ae)]{constructor(_0x5a9de0,_0x3385bd){const _0x55c606=_0x367232;super(),this[_0x55c606(0x189)]=_0x5a9de0,this[_0x55c606(0x19c)]=_0x3385bd,this[_0x55c606(0x177)]();}[_0x367232(0x177)](){const _0x1bde51=_0x367232;this[_0x1bde51(0x189)]['dataSource']=this['_threadCommentDataSource'],this[_0x1bde51(0x189)][_0x1bde51(0x1d2)]=!0x1;}};C=J([y(0x0,M[_0x367232(0x1c4)]),y(0x1,c[_0x367232(0x173)](g))],C);function _0x4df4(_0x3b5c,_0x151c53){const _0x450c85=_0x450c();return _0x4df4=function(_0x4df499,_0x24f296){_0x4df499=_0x4df499-0x169;let _0x45c2d9=_0x450c85[_0x4df499];return _0x45c2d9;},_0x4df4(_0x3b5c,_0x151c53);}var F=Object[_0x367232(0x191)],L=Object['getOwnPropertyDescriptor'],Z=(_0x1e259b,_0xeb17b6,_0x228973)=>_0xeb17b6 in _0x1e259b?F(_0x1e259b,_0xeb17b6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x228973}):_0x1e259b[_0xeb17b6]=_0x228973,W=(_0x5935a5,_0x5059f3,_0x5a8cd1,_0x4d5912)=>{const _0x1d3291=_0x367232;for(var _0x2720c5=_0x4d5912>0x1?void 0x0:_0x4d5912?L(_0x5059f3,_0x5a8cd1):_0x5059f3,_0x270789=_0x5935a5[_0x1d3291(0x19f)]-0x1,_0x23e82d;_0x270789>=0x0;_0x270789--)(_0x23e82d=_0x5935a5[_0x270789])&&(_0x2720c5=_0x23e82d(_0x2720c5)||_0x2720c5);return _0x2720c5;},O=(_0x2d0980,_0x1d1bf5)=>(_0x2e1606,_0x4c8a9d)=>_0x1d1bf5(_0x2e1606,_0x4c8a9d,_0x2d0980),N=(_0x4c539a,_0x438c06,_0x38f44a)=>Z(_0x4c539a,typeof _0x438c06!=_0x367232(0x180)?_0x438c06+'':_0x438c06,_0x38f44a);function _0x450c(){const _0x46f1d2=['@univerjs-pro/collaboration-client','_initDataSource','requireSession','post','resolveComment','reply','5937424SxOccx','_injector','_config','@univerjs/thread-comment','symbol','UniverCollaborationClientPlugin','@univerjs-pro/license','getUser','UNRECOGNIZED','resolved','_userService','HTTPService','Injector','_threadCommentDataSourceService','/add','map','saveCommentToSnapshot','pluginName','UniverThreadCommentUIPlugin','code','payload','defineProperty','rxjs','error','merge','type','3933198ezbhkc','/edit','slice','find','116890diYOvf','CustomRangeType','_threadCommentDataSource','userID','rangeType','length','body','customRanges','updateComment','addComment','setConfig','values','UniverLicensePlugin','pipe','OpenOrReOpen','Solve','12InTdQn','569684WXiHiy','parse','Reply','Disposable','users','CollaborationSessionService','YYYY/MM/DD\x20HH:mm','_httpService','UniverThreadCommentDataSourcePlugin','2uyETmo','2239531KDaknz','deleteComment','/universer-api/user/list','527997ERGHRt','UniverInstanceType','replies','commentUpdate$','UserManagerService','format','ref','get','IConfigService','@univerjs/thread-comment-ui','_configService','/reply','IThreadCommentDataSourceService','user','getMemberID','content','Module','Solved','solved','Edit','userId','Unknown','threadId','forEach','subscribe','Plugin','syncUpdateMutationToColla','getComment','COMMENT','_initUserSync','filter','dayjs','thread-comment-data-source.config','getOwnPropertyDescriptor','add','addUser','_init','275MbHFay','getUnit','_sessionService','Delete','741266feTEPI','/universer-api/comment/unit/','/delete','disposeWithMe','5jaSmib','createTimestamp','root','CommentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Add','stringify','toStringTag','UNIVER_UNKNOWN','replyId','/list','ThreadCommentModel','Inject','comments','_threadCommentModel'];_0x450c=function(){return _0x46f1d2;};return _0x450c();}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x367232(0x1d1)]{constructor(_0x3b7606=D,_0x1152ca,_0x3c736e){const _0x5c9dff=_0x367232;super(),this[_0x5c9dff(0x17e)]=_0x3b7606,this[_0x5c9dff(0x17d)]=_0x1152ca,this[_0x5c9dff(0x1c2)]=_0x3c736e;const {..._0x2a21aa}=c[_0x5c9dff(0x194)]({},D,this[_0x5c9dff(0x17e)]);this['_configService'][_0x5c9dff(0x1a4)](q,_0x2a21aa);}['onStarting'](){const _0x57b935=_0x367232;[[g],[C],[p]][_0x57b935(0x1cf)](_0x43b0d8=>{const _0x497ab3=_0x57b935;this[_0x497ab3(0x17d)][_0x497ab3(0x1da)](_0x43b0d8);});}['onReady'](){const _0x28ec21=_0x367232;this['_injector'][_0x28ec21(0x1bf)](C),this[_0x28ec21(0x17d)]['get'](p);}},N(exports[_0x367232(0x1b3)],_0x367232(0x18d),U),N(exports[_0x367232(0x1b3)],_0x367232(0x195),c[_0x367232(0x1b9)][_0x367232(0x16f)]),exports[_0x367232(0x1b3)]=W([c['DependentOn'](j[_0x367232(0x18e)],b[_0x367232(0x181)],T[_0x367232(0x1a6)]),O(0x1,c[_0x367232(0x173)](c[_0x367232(0x188)])),O(0x2,c[_0x367232(0x1c0)])],exports[_0x367232(0x1b3)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x31bbbd=_0x21da;(function(_0x31d346,_0x3e9d05){const _0xf91fd5=_0x21da,_0x26fbd9=_0x31d346();while(!![]){try{const _0x14e63f=-parseInt(_0xf91fd5(0x15f))/0x1*(parseInt(_0xf91fd5(0x179))/0x2)+-parseInt(_0xf91fd5(0x137))/0x3*(parseInt(_0xf91fd5(0x15e))/0x4)+parseInt(_0xf91fd5(0x16f))/0x5*(parseInt(_0xf91fd5(0x191))/0x6)+-parseInt(_0xf91fd5(0x14f))/0x7*(-parseInt(_0xf91fd5(0x17b))/0x8)+-parseInt(_0xf91fd5(0x131))/0x9*(parseInt(_0xf91fd5(0x176))/0xa)+parseInt(_0xf91fd5(0x132))/0xb*(parseInt(_0xf91fd5(0x18d))/0xc)+parseInt(_0xf91fd5(0x12f))/0xd;if(_0x14e63f===_0x3e9d05)break;else _0x26fbd9['push'](_0x26fbd9['shift']());}catch(_0x2bfda6){_0x26fbd9['push'](_0x26fbd9['shift']());}}}(_0x4420,0x5fe5d));import{CommentService as _0x43bbdf,CollaborationSessionService as _0x582565,UniverCollaborationClientPlugin as _0x1ea497}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x20554f}from'@univerjs-pro/license';import{dayjs as _0x479c12,UserManagerService as _0x5393ba,Inject as _0x4ebf50,Injector as _0x5ca649,Disposable as _0x577ca3,CustomRangeType as _0x49c383,UniverInstanceType as _0x38d7cc,DependentOn as _0x5881c2,IConfigService as _0x5e3e43,Plugin as _0x459f72,merge as _0x43f57a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x24f61f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x11b41d,IThreadCommentDataSourceService as _0x117fb0}from'@univerjs/thread-comment';import{bufferTime as _0xbe21c3}from'rxjs';import{HTTPService as _0x4b5d31}from'@univerjs/network';const W=_0x31bbbd(0x18a);var I=(_0x3091d6=>(_0x3091d6[_0x3091d6[_0x31bbbd(0x194)]=0x0]=_0x31bbbd(0x194),_0x3091d6[_0x3091d6[_0x31bbbd(0x17f)]=0x1]=_0x31bbbd(0x17f),_0x3091d6[_0x3091d6[_0x31bbbd(0x164)]=-0x1]=_0x31bbbd(0x164),_0x3091d6))(I||{}),v=(_0x41117d=>(_0x41117d[_0x41117d[_0x31bbbd(0x172)]=0x0]=_0x31bbbd(0x172),_0x41117d[_0x41117d[_0x31bbbd(0x151)]=0x1]='Add',_0x41117d[_0x41117d['Reply']=0x2]='Reply',_0x41117d[_0x41117d[_0x31bbbd(0x140)]=0x3]='Edit',_0x41117d[_0x41117d[_0x31bbbd(0x146)]=0x4]=_0x31bbbd(0x146),_0x41117d[_0x41117d[_0x31bbbd(0x147)]=0x5]=_0x31bbbd(0x147),_0x41117d[_0x41117d['UNRECOGNIZED']=-0x1]=_0x31bbbd(0x164),_0x41117d))(v||{});const D=_0x230b8a=>_0x479c12(new Date(+_0x230b8a))[_0x31bbbd(0x171)](_0x31bbbd(0x168)),B=async(_0x5e9cad,_0x4a1fcc)=>{const _0x4a8dbc=_0x31bbbd,_0x2e6918=_0x5e9cad['get'](_0x5393ba),_0x58be34=_0x5e9cad[_0x4a8dbc(0x157)](_0x4b5d31);_0x4a1fcc[_0x4a8dbc(0x142)](_0x426a89=>{const _0x5acb64=_0x4a8dbc;_0x2e6918[_0x5acb64(0x154)](_0x426a89)&&_0x4a1fcc[_0x5acb64(0x169)](_0x426a89);}),_0x4a1fcc[_0x4a8dbc(0x13b)]&&(await _0x58be34[_0x4a8dbc(0x157)](_0x4a8dbc(0x143),{'params':{'userIDs':[..._0x4a1fcc]}}))[_0x4a8dbc(0x138)][_0x4a8dbc(0x16b)][_0x4a8dbc(0x142)](_0x5a4a01=>{const _0x280305=_0x4a8dbc;_0x5a4a01&&_0x2e6918[_0x280305(0x150)](_0x5a4a01);});};var K=Object[_0x31bbbd(0x190)],V=(_0x12c59b,_0x280992,_0xc58fee,_0x3b110b)=>{const _0x4a8414=_0x31bbbd;for(var _0x963214=_0x3b110b>0x1?void 0x0:_0x3b110b?K(_0x280992,_0xc58fee):_0x280992,_0xcd422f=_0x12c59b[_0x4a8414(0x170)]-0x1,_0x1cf465;_0xcd422f>=0x0;_0xcd422f--)(_0x1cf465=_0x12c59b[_0xcd422f])&&(_0x963214=_0x1cf465(_0x963214)||_0x963214);return _0x963214;},p=(_0x4aeee5,_0x5446ee)=>(_0x2e3a90,_0x1c833f)=>_0x5446ee(_0x2e3a90,_0x1c833f,_0x4aeee5);let S=class extends _0x577ca3{constructor(_0x2affbe,_0x54d445,_0x28a11a,_0x4f4a73){const _0x588d0b=_0x31bbbd;super(),this[_0x588d0b(0x181)]=_0x2affbe,this[_0x588d0b(0x133)]=_0x54d445,this[_0x588d0b(0x156)]=_0x28a11a,this['_injector']=_0x4f4a73,this[_0x588d0b(0x15b)](),this[_0x588d0b(0x186)]();}[_0x31bbbd(0x186)](){const _0x56f198=_0x31bbbd;this[_0x56f198(0x174)](this[_0x56f198(0x133)][_0x56f198(0x183)][_0x56f198(0x192)](_0xbe21c3(0x10))['subscribe'](_0x38a0c9=>{const _0xc03563=_0x56f198,_0x471dca=new Set();_0x38a0c9[_0xc03563(0x142)](_0x572b26=>{const _0x5f54a3=_0xc03563;switch(_0x572b26['type']){case _0x5f54a3(0x175):{const _0xdc4fe6=_0x572b26['payload'][_0x5f54a3(0x130)];_0x471dca[_0x5f54a3(0x175)](_0xdc4fe6);break;}}}),B(this[_0xc03563(0x13c)],_0x471dca);}));}[_0x31bbbd(0x15b)](){const _0x82b66b=_0x31bbbd;this[_0x82b66b(0x174)](this[_0x82b66b(0x181)][_0x82b66b(0x183)][_0x82b66b(0x158)](async _0x1c0824=>{const _0xe6fc33=_0x82b66b;var _0x5337de,_0x2d3eff,_0x3a7cb3,_0x5aa39d;const _0x600730=(_0x5337de=this[_0xe6fc33(0x133)][_0xe6fc33(0x17c)](_0x1c0824[_0xe6fc33(0x178)])['find'](_0xa798b2=>_0xa798b2[_0xe6fc33(0x13f)]===_0x1c0824[_0xe6fc33(0x13f)]))==null?void 0x0:_0x5337de['root'];if(!_0x600730)return;const {unitId:_0x31b69a,subUnitId:_0x37902f}=_0x600730;switch(_0x1c0824[_0xe6fc33(0x13a)]&&this[_0xe6fc33(0x156)][_0xe6fc33(0x150)](_0x1c0824[_0xe6fc33(0x13a)]),_0x1c0824[_0xe6fc33(0x14c)]){case v[_0xe6fc33(0x151)]:break;case v['Reply']:{this['_threadCommentModel'][_0xe6fc33(0x188)](_0x31b69a,_0x37902f,{'unitId':_0x31b69a,'subUnitId':_0x37902f,'ref':'','id':_0x1c0824[_0xe6fc33(0x162)],'dT':D(+_0x1c0824['createTimestamp']),'threadId':_0x1c0824[_0xe6fc33(0x13f)],'personId':(_0x3a7cb3=(_0x2d3eff=_0x1c0824[_0xe6fc33(0x13a)])==null?void 0x0:_0x2d3eff[_0xe6fc33(0x177)])!=null?_0x3a7cb3:_0x1c0824['userId'],'text':JSON[_0xe6fc33(0x184)](_0x1c0824[_0xe6fc33(0x14b)]),'parentId':_0x600730['id']});break;}case v[_0xe6fc33(0x146)]:{const _0x2df031=this['_threadCommentModel']['getComment'](_0x31b69a,_0x37902f,_0x1c0824['replyId']);_0x2df031&&_0x2df031[_0xe6fc33(0x14d)]&&this[_0xe6fc33(0x133)][_0xe6fc33(0x153)](_0x31b69a,_0x37902f,_0x1c0824[_0xe6fc33(0x162)]);break;}case v[_0xe6fc33(0x140)]:{this[_0xe6fc33(0x133)][_0xe6fc33(0x13d)](_0x31b69a,_0x37902f,{'commentId':_0x1c0824[_0xe6fc33(0x162)],'text':JSON[_0xe6fc33(0x184)](_0x1c0824[_0xe6fc33(0x14b)])});break;}case v[_0xe6fc33(0x147)]:{const _0xf2853c=(_0x5aa39d=this[_0xe6fc33(0x133)][_0xe6fc33(0x17c)](_0x1c0824[_0xe6fc33(0x178)])[_0xe6fc33(0x18f)](_0x31811b=>_0x31811b[_0xe6fc33(0x13f)]===_0x1c0824['threadId']))==null?void 0x0:_0x5aa39d['root'];_0xf2853c&&this[_0xe6fc33(0x133)][_0xe6fc33(0x14e)](_0x31b69a,_0x37902f,_0xf2853c['id'],_0x1c0824['solved']===I[_0xe6fc33(0x17f)]);break;}}}));}};function _0x4420(){const _0x2c6800=['rangeType','Solved','comment','_commentService','ref','commentUpdate$','parse','/list','_initUserSync','slice','addComment','dataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','code','defineProperty','24WpCHtn','_threadCommentDataSource','find','getOwnPropertyDescriptor','6ceNcfO','pipe','post','OpenOrReOpen','onReady','stringify','_configService','5166785BZrQdL','personId','1266606QQIHWo','3274139ophxRg','_threadCommentModel','/reply','_httpService','symbol','49443LbpbXq','body','map','user','size','_injector','updateComment','comments','threadId','Edit','requireSession','forEach','/universer-api/user/list','error','/delete','Delete','Solve','_sessionService','_threadCommentDataSourceService','/edit','content','type','parentId','resolveComment','5782KEZCwO','addUser','Add','customRanges','deleteComment','getUser','replies','_userService','get','subscribe','filter','solved','_init','_config','onStarting','28oiRMlF','43VlsBRa','userId','UNIVER_UNKNOWN','replyId','getCurrentUser','UNRECOGNIZED','thread-comment-data-source.config','_initDataSource','rangeId','YYYY/MM/DD\x20HH:mm','delete','COMMENT','users','/universer-api/comment/unit/','createTimestamp','getMemberID','52905dxJeog','length','format','Unknown','/add','disposeWithMe','add','30evAPNY','userID','unitId','12076hsmHGQ','syncUpdateMutationToColla','1808wiuErR','getUnit','saveCommentToSnapshot'];_0x4420=function(){return _0x2c6800;};return _0x4420();}S=V([p(0x0,_0x4ebf50(_0x43bbdf)),p(0x1,_0x4ebf50(_0x11b41d)),p(0x2,_0x4ebf50(_0x5393ba)),p(0x3,_0x4ebf50(_0x5ca649))],S);const z=_0x31bbbd(0x165),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x494384,_0x59654b,_0x59fc4e,_0x575791)=>{const _0x4eadda=_0x31bbbd;for(var _0x9589d2=_0x575791>0x1?void 0x0:_0x575791?k(_0x59654b,_0x59fc4e):_0x59654b,_0x8d2168=_0x494384[_0x4eadda(0x170)]-0x1,_0x3b024d;_0x8d2168>=0x0;_0x8d2168--)(_0x3b024d=_0x494384[_0x8d2168])&&(_0x9589d2=_0x3b024d(_0x9589d2)||_0x9589d2);return _0x9589d2;},_=(_0x3b3b69,_0x24a250)=>(_0x196487,_0x378f7)=>_0x24a250(_0x196487,_0x378f7,_0x3b3b69);function _0x21da(_0x5e161d,_0x2d03c8){const _0x44202e=_0x4420();return _0x21da=function(_0x21da34,_0x564a94){_0x21da34=_0x21da34-0x12d;let _0x5891ba=_0x44202e[_0x21da34];return _0x5891ba;},_0x21da(_0x5e161d,_0x2d03c8);}function X(_0x116a59,_0xf5fd43){const _0x467e64=_0x31bbbd,_0x2559f0=_0x116a59['replies'][0x0];return{..._0xf5fd43,'id':_0x2559f0[_0x467e64(0x162)],'resolved':_0x116a59['solved']===0x1,'dT':D(_0x2559f0[_0x467e64(0x16d)]),'personId':_0x2559f0['userId'],'threadId':_0x2559f0[_0x467e64(0x13f)]};}function ee(_0x3a9aab,_0x45d851,_0x22b5a0){const _0x4f173c=_0x31bbbd;var _0x5bda3a,_0x3d4d9b;if(((_0x3d4d9b=(_0x5bda3a=_0x3a9aab==null?void 0x0:_0x3a9aab[_0x4f173c(0x155)])==null?void 0x0:_0x5bda3a[_0x4f173c(0x170)])!=null?_0x3d4d9b:0x0)>0x0){const _0x101975=(_0x33b8f5,_0x34af27)=>({'id':_0x33b8f5[_0x4f173c(0x162)],'threadId':_0x33b8f5[_0x4f173c(0x13f)],'dT':D(_0x33b8f5['createTimestamp']),'personId':_0x33b8f5['userId'],'resolved':_0x3a9aab[_0x4f173c(0x15a)]===I['Solved'],'unitId':_0x45d851,'subUnitId':_0x22b5a0,'text':JSON[_0x4f173c(0x184)](_0x33b8f5[_0x4f173c(0x14b)]),'parentId':_0x34af27}),_0x4861fa=_0x101975(_0x3a9aab[_0x4f173c(0x155)][0x0]);return{..._0x4861fa,'children':_0x3a9aab[_0x4f173c(0x155)][_0x4f173c(0x187)](0x1)[_0x4f173c(0x139)](_0x37c594=>_0x101975(_0x37c594,_0x4861fa['id']))};}return null;}let f=class{constructor(_0x1266be,_0x32917f,_0x57b3a1,_0x9c0efb){const _0x20fc2b=_0x31bbbd;this['_httpService']=_0x1266be,this['_userService']=_0x32917f,this[_0x20fc2b(0x148)]=_0x57b3a1,this['_injector']=_0x9c0efb;}async[_0x31bbbd(0x188)](_0x48b3fa){const _0x97b177=_0x31bbbd;var _0x19ea7d,_0x5a72a4;const {parentId:_0x140852,unitId:_0x30785d,text:_0x29ae1d,threadId:_0x1f7046}=_0x48b3fa,_0x4caee7=(_0x5a72a4=(_0x19ea7d=_0x29ae1d[_0x97b177(0x152)])==null?void 0x0:_0x19ea7d[_0x97b177(0x159)](_0x3487fa=>_0x3487fa[_0x97b177(0x17e)]===_0x49c383[_0x97b177(0x16a)])[_0x97b177(0x139)](_0x5a3f53=>_0x5a3f53[_0x97b177(0x167)]))!=null?_0x5a72a4:[],_0x4c4b42=JSON[_0x97b177(0x12d)](_0x29ae1d),_0x478c76=(await this[_0x97b177(0x148)][_0x97b177(0x141)](_0x30785d))[_0x97b177(0x16e)]();if(_0x140852){const _0x5be347={'memberId':_0x478c76,'unitId':_0x30785d,'content':_0x4c4b42,'mention':_0x4caee7,'threadId':_0x1f7046},_0x19cd09=(await this[_0x97b177(0x135)]['post']('/universer-api/comment/unit/'+_0x30785d+_0x97b177(0x134),{'body':_0x5be347}))[_0x97b177(0x138)]['reply'];return{..._0x48b3fa,'id':_0x19cd09[_0x97b177(0x162)],'dT':_0x479c12(+_0x19cd09[_0x97b177(0x16d)])[_0x97b177(0x171)](_0x97b177(0x168)),'personId':_0x19cd09[_0x97b177(0x160)]};}else{const _0x3f8e0e={'memberId':_0x478c76,'unitId':_0x30785d,'content':_0x4c4b42,'mention':_0x4caee7},_0x4388b5=await this[_0x97b177(0x135)][_0x97b177(0x193)](_0x97b177(0x16c)+_0x30785d+_0x97b177(0x173),{'body':_0x3f8e0e});return X(_0x4388b5[_0x97b177(0x138)][_0x97b177(0x180)],_0x48b3fa);}}async[_0x31bbbd(0x13d)](_0x1924ac){const _0x244805=_0x31bbbd;var _0x385d5c,_0x19be98;const {text:_0x2b6005,unitId:_0xb2d8f}=_0x1924ac,_0x279244=(_0x19be98=(_0x385d5c=_0x2b6005[_0x244805(0x152)])==null?void 0x0:_0x385d5c['filter'](_0x50d9b6=>_0x50d9b6[_0x244805(0x17e)]===_0x49c383[_0x244805(0x16a)])[_0x244805(0x139)](_0x289197=>_0x289197['rangeId']))!=null?_0x19be98:[],_0x210c29=JSON['stringify'](_0x2b6005),_0x1561fc=_0x1924ac[_0x244805(0x13f)],_0x18d4d0=_0x1924ac['id'],_0x220d28={'memberId':(await this[_0x244805(0x148)][_0x244805(0x141)](_0xb2d8f))['getMemberID'](),'unitId':_0xb2d8f,'threadId':_0x1561fc,'mention':_0x279244,'content':_0x210c29,'replyId':_0x18d4d0},_0xd6595b=await this[_0x244805(0x135)][_0x244805(0x193)]('/universer-api/comment/unit/'+_0xb2d8f+_0x244805(0x14a),{'body':_0x220d28});return!_0xd6595b[_0x244805(0x138)][_0x244805(0x144)]||_0xd6595b['body'][_0x244805(0x144)]['code']===0x1;}async[_0x31bbbd(0x14e)](_0x34d98a){const _0x2a1e1a=_0x31bbbd,{unitId:_0x4ae2ac}=_0x34d98a,_0x36d006=_0x34d98a[_0x2a1e1a(0x13f)],_0x5f4d92={'memberId':this[_0x2a1e1a(0x156)][_0x2a1e1a(0x163)]()[_0x2a1e1a(0x177)],'unitId':_0x4ae2ac,'threadId':_0x36d006,'solved':_0x34d98a['resolved']?I[_0x2a1e1a(0x17f)]:I[_0x2a1e1a(0x194)]},_0x186bcd=await this[_0x2a1e1a(0x135)][_0x2a1e1a(0x193)](_0x2a1e1a(0x16c)+_0x4ae2ac+'/solved',{'body':_0x5f4d92});return!_0x186bcd[_0x2a1e1a(0x138)][_0x2a1e1a(0x144)]||_0x186bcd['body']['error'][_0x2a1e1a(0x18b)]===0x1;}async[_0x31bbbd(0x153)](_0x13edbc,_0x591626,_0x47b09b,_0x3b7b80){const _0x3c0b4e=_0x31bbbd,_0x4ed664={'memberId':(await this[_0x3c0b4e(0x148)][_0x3c0b4e(0x141)](_0x13edbc))[_0x3c0b4e(0x16e)](),'threadId':_0x47b09b,'replyId':_0x3b7b80,'unitId':_0x13edbc},_0x3dea00=await this[_0x3c0b4e(0x135)][_0x3c0b4e(0x193)]('/universer-api/comment/unit/'+_0x13edbc+_0x3c0b4e(0x145),{'body':_0x4ed664});return!_0x3dea00[_0x3c0b4e(0x138)][_0x3c0b4e(0x144)]||_0x3dea00['body']['error']['code']===0x1;}async['listComments'](_0x15ed87,_0x2b5302,_0x18e1ae){const _0x24272f=_0x31bbbd,_0x3ad64a={'unitId':_0x15ed87,'threadId':_0x18e1ae},_0x3a0676=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x15ed87+_0x24272f(0x185),{'body':_0x3ad64a}),_0x52796a=_0x18e1ae['map'](_0x5c4482=>ee(_0x3a0676[_0x24272f(0x138)][_0x24272f(0x13e)][_0x5c4482],_0x15ed87,_0x2b5302))['filter'](Boolean);return Object['values'](_0x3a0676['body'][_0x24272f(0x16b)])['forEach'](_0x2822a3=>{const _0x4b2d15=_0x24272f;this[_0x4b2d15(0x156)]['addUser'](_0x2822a3);}),_0x52796a;}[_0x31bbbd(0x17d)](_0x4e43f1){const _0x19f4c3=_0x31bbbd;return{'id':_0x4e43f1['id'],'threadId':_0x4e43f1[_0x19f4c3(0x13f)],'ref':_0x4e43f1[_0x19f4c3(0x182)]};}};f=Q([_(0x0,_0x4ebf50(_0x4b5d31)),_(0x1,_0x4ebf50(_0x5393ba)),_(0x2,_0x4ebf50(_0x582565)),_(0x3,_0x4ebf50(_0x5ca649))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x5192eb,_0x348419,_0x4f856c,_0x214d0c)=>{const _0x1f07b0=_0x31bbbd;for(var _0x178d35=_0x214d0c>0x1?void 0x0:_0x214d0c?re(_0x348419,_0x4f856c):_0x348419,_0x330e72=_0x5192eb[_0x1f07b0(0x170)]-0x1,_0x1aaca7;_0x330e72>=0x0;_0x330e72--)(_0x1aaca7=_0x5192eb[_0x330e72])&&(_0x178d35=_0x1aaca7(_0x178d35)||_0x178d35);return _0x178d35;},N=(_0x543faa,_0xe659c5)=>(_0x30899d,_0x373755)=>_0xe659c5(_0x30899d,_0x373755,_0x543faa);let g=class extends _0x577ca3{constructor(_0x4d374e,_0x1d30f1){const _0x5ebbd8=_0x31bbbd;super(),this[_0x5ebbd8(0x149)]=_0x4d374e,this['_threadCommentDataSource']=_0x1d30f1,this[_0x5ebbd8(0x166)]();}[_0x31bbbd(0x166)](){const _0x4e11dc=_0x31bbbd;this[_0x4e11dc(0x149)][_0x4e11dc(0x189)]=this[_0x4e11dc(0x18e)],this[_0x4e11dc(0x149)][_0x4e11dc(0x17a)]=!0x1;}};g=te([N(0x0,_0x117fb0),N(0x1,_0x4ebf50(f))],g);var se=Object[_0x31bbbd(0x18c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x161b0a,_0x4058bf,_0x29a516)=>_0x4058bf in _0x161b0a?se(_0x161b0a,_0x4058bf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29a516}):_0x161b0a[_0x4058bf]=_0x29a516,ie=(_0x89cb76,_0x21d1af,_0x5c94dd,_0x4965d9)=>{const _0x5e9cd0=_0x31bbbd;for(var _0x56a904=_0x4965d9>0x1?void 0x0:_0x4965d9?oe(_0x21d1af,_0x5c94dd):_0x21d1af,_0x2ee7b5=_0x89cb76[_0x5e9cd0(0x170)]-0x1,_0x2be2cf;_0x2ee7b5>=0x0;_0x2ee7b5--)(_0x2be2cf=_0x89cb76[_0x2ee7b5])&&(_0x56a904=_0x2be2cf(_0x56a904)||_0x56a904);return _0x56a904;},w=(_0x449119,_0x59eac7)=>(_0x4996fc,_0x443692)=>_0x59eac7(_0x4996fc,_0x443692,_0x449119),$=(_0x5850a6,_0x81d065,_0x59f6e7)=>ne(_0x5850a6,typeof _0x81d065!=_0x31bbbd(0x136)?_0x81d065+'':_0x81d065,_0x59f6e7);let b=class extends _0x459f72{constructor(_0x2e0007=M,_0x2f237c,_0x563bb0){const _0x2c12f2=_0x31bbbd;super(),this['_config']=_0x2e0007,this['_injector']=_0x2f237c,this['_configService']=_0x563bb0;const {..._0x4311fa}=_0x43f57a({},M,this[_0x2c12f2(0x15c)]);this[_0x2c12f2(0x12e)]['setConfig'](z,_0x4311fa);}[_0x31bbbd(0x15d)](){const _0x4d266f=_0x31bbbd;[[f],[g],[S]][_0x4d266f(0x142)](_0x5cd3b6=>{const _0x4bc877=_0x4d266f;this['_injector'][_0x4bc877(0x175)](_0x5cd3b6);});}[_0x31bbbd(0x195)](){const _0x1c040e=_0x31bbbd;this['_injector'][_0x1c040e(0x157)](g),this[_0x1c040e(0x13c)]['get'](S);}};$(b,'pluginName',W),$(b,_0x31bbbd(0x14c),_0x38d7cc[_0x31bbbd(0x161)]),b=ie([_0x5881c2(_0x24f61f,_0x1ea497,_0x20554f),w(0x1,_0x4ebf50(_0x5ca649)),w(0x2,_0x5e3e43)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x14e8f6=_0x31ff;(function(_0x2481d2,_0x5e0d93){const _0x474d7a=_0x31ff,_0x45e3ad=_0x2481d2();while(!![]){try{const _0x759750=-parseInt(_0x474d7a(0xcc))/0x1*(-parseInt(_0x474d7a(0x118))/0x2)+parseInt(_0x474d7a(0xe9))/0x3*(parseInt(_0x474d7a(0x115))/0x4)+-parseInt(_0x474d7a(0x111))/0x5*(-parseInt(_0x474d7a(0x107))/0x6)+parseInt(_0x474d7a(0xd4))/0x7+parseInt(_0x474d7a(0xf2))/0x8+-parseInt(_0x474d7a(0x123))/0x9+parseInt(_0x474d7a(0xc5))/0xa*(-parseInt(_0x474d7a(0xf4))/0xb);if(_0x759750===_0x5e0d93)break;else _0x45e3ad['push'](_0x45e3ad['shift']());}catch(_0x3b2381){_0x45e3ad['push'](_0x45e3ad['shift']());}}}(_0x2411,0x2c294));import{CommentService as _0x6346bf,CollaborationSessionService as _0x6db0c8,UniverCollaborationClientPlugin as _0x281d67}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2fa253}from'@univerjs-pro/license';import{dayjs as _0x47e258,UserManagerService as _0x44233a,Inject as _0x59bc1b,Injector as _0x5ee519,Disposable as _0x4a90c9,CustomRangeType as _0x3d1118,UniverInstanceType as _0x454a2c,DependentOn as _0x4be0bf,IConfigService as _0x38206b,Plugin as _0x41398f,merge as _0xdfd847}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xce439}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x23d8a0,IThreadCommentDataSourceService as _0x1f38fa}from'@univerjs/thread-comment';function _0x31ff(_0x2aeb82,_0xbec4c){const _0x2411a4=_0x2411();return _0x31ff=function(_0x31ffb0,_0x2e9983){_0x31ffb0=_0x31ffb0-0xbe;let _0x595ea8=_0x2411a4[_0x31ffb0];return _0x595ea8;},_0x31ff(_0x2aeb82,_0xbec4c);}import{bufferTime as _0x390860}from'rxjs';import{HTTPService as _0x5ae147}from'@univerjs/network';const W=_0x14e8f6(0xee);var I=(_0x541df3=>(_0x541df3[_0x541df3['OpenOrReOpen']=0x0]=_0x14e8f6(0xe3),_0x541df3[_0x541df3[_0x14e8f6(0x104)]=0x1]=_0x14e8f6(0x104),_0x541df3[_0x541df3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x541df3))(I||{}),v=(_0x189f28=>(_0x189f28[_0x189f28[_0x14e8f6(0xf3)]=0x0]=_0x14e8f6(0xf3),_0x189f28[_0x189f28['Add']=0x1]=_0x14e8f6(0xcf),_0x189f28[_0x189f28[_0x14e8f6(0x101)]=0x2]=_0x14e8f6(0x101),_0x189f28[_0x189f28['Edit']=0x3]=_0x14e8f6(0xc1),_0x189f28[_0x189f28[_0x14e8f6(0xfd)]=0x4]=_0x14e8f6(0xfd),_0x189f28[_0x189f28[_0x14e8f6(0xbf)]=0x5]=_0x14e8f6(0xbf),_0x189f28[_0x189f28[_0x14e8f6(0xdd)]=-0x1]=_0x14e8f6(0xdd),_0x189f28))(v||{});const D=_0x5ce6cd=>_0x47e258(new Date(+_0x5ce6cd))[_0x14e8f6(0x109)](_0x14e8f6(0x119)),B=async(_0x1f5dc3,_0x59284a)=>{const _0x3f6c43=_0x14e8f6,_0x19e75=_0x1f5dc3[_0x3f6c43(0xd7)](_0x44233a),_0x4804f3=_0x1f5dc3[_0x3f6c43(0xd7)](_0x5ae147);_0x59284a[_0x3f6c43(0xc4)](_0x5d03ee=>{const _0x417b0c=_0x3f6c43;_0x19e75['getUser'](_0x5d03ee)&&_0x59284a[_0x417b0c(0xd2)](_0x5d03ee);}),_0x59284a[_0x3f6c43(0xd8)]&&(await _0x4804f3[_0x3f6c43(0xd7)](_0x3f6c43(0x116),{'params':{'userIDs':[..._0x59284a]}}))['body'][_0x3f6c43(0xe8)][_0x3f6c43(0xc4)](_0x1c410a=>{const _0x55bced=_0x3f6c43;_0x1c410a&&_0x19e75[_0x55bced(0xff)](_0x1c410a);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x27fa48,_0x26bbfa,_0x68ac5e,_0x726e5a)=>{const _0x3e9f77=_0x14e8f6;for(var _0x233cf1=_0x726e5a>0x1?void 0x0:_0x726e5a?K(_0x26bbfa,_0x68ac5e):_0x26bbfa,_0x1bc118=_0x27fa48[_0x3e9f77(0xd6)]-0x1,_0xd74061;_0x1bc118>=0x0;_0x1bc118--)(_0xd74061=_0x27fa48[_0x1bc118])&&(_0x233cf1=_0xd74061(_0x233cf1)||_0x233cf1);return _0x233cf1;},p=(_0x439f04,_0x4a7d14)=>(_0x5509cd,_0xfd9dc8)=>_0x4a7d14(_0x5509cd,_0xfd9dc8,_0x439f04);let S=class extends _0x4a90c9{constructor(_0x42cbd0,_0x24ed3d,_0x5ce4e4,_0x2e3f9f){const _0x1dd1ff=_0x14e8f6;super(),this[_0x1dd1ff(0xc9)]=_0x42cbd0,this['_threadCommentModel']=_0x24ed3d,this['_userService']=_0x5ce4e4,this[_0x1dd1ff(0xef)]=_0x2e3f9f,this[_0x1dd1ff(0xf5)](),this[_0x1dd1ff(0x11d)]();}['_initUserSync'](){const _0xa92790=_0x14e8f6;this['disposeWithMe'](this[_0xa92790(0x126)][_0xa92790(0xf8)][_0xa92790(0xf1)](_0x390860(0x10))[_0xa92790(0xe1)](_0x50acd0=>{const _0xd46a63=_0xa92790,_0x341e26=new Set();_0x50acd0[_0xd46a63(0xc4)](_0x217e8d=>{const _0x40f8ae=_0xd46a63;switch(_0x217e8d[_0x40f8ae(0xca)]){case _0x40f8ae(0xc2):{const _0x41827d=_0x217e8d[_0x40f8ae(0xdc)][_0x40f8ae(0xeb)];_0x341e26[_0x40f8ae(0xc2)](_0x41827d);break;}}}),B(this[_0xd46a63(0xef)],_0x341e26);}));}[_0x14e8f6(0xf5)](){const _0x38fe3f=_0x14e8f6;this[_0x38fe3f(0x103)](this[_0x38fe3f(0xc9)][_0x38fe3f(0xf8)][_0x38fe3f(0xe1)](async _0x4fd38f=>{const _0x2afcbc=_0x38fe3f;var _0x4fa83d,_0x26eeb6,_0x2aa72e,_0x354d6d;const _0x601859=(_0x4fa83d=this[_0x2afcbc(0x126)][_0x2afcbc(0xdb)](_0x4fd38f[_0x2afcbc(0x117)])['find'](_0x446e5d=>_0x446e5d[_0x2afcbc(0x10e)]===_0x4fd38f[_0x2afcbc(0x10e)]))==null?void 0x0:_0x4fa83d[_0x2afcbc(0xd9)];if(!_0x601859)return;const {unitId:_0x221cd1,subUnitId:_0xee5ada}=_0x601859;switch(_0x4fd38f[_0x2afcbc(0x113)]&&this[_0x2afcbc(0x122)]['addUser'](_0x4fd38f['user']),_0x4fd38f[_0x2afcbc(0xca)]){case v['Add']:break;case v[_0x2afcbc(0x101)]:{this[_0x2afcbc(0x126)][_0x2afcbc(0x128)](_0x221cd1,_0xee5ada,{'unitId':_0x221cd1,'subUnitId':_0xee5ada,'ref':'','id':_0x4fd38f[_0x2afcbc(0xd3)],'dT':D(+_0x4fd38f['createTimestamp']),'threadId':_0x4fd38f[_0x2afcbc(0x10e)],'personId':(_0x2aa72e=(_0x26eeb6=_0x4fd38f[_0x2afcbc(0x113)])==null?void 0x0:_0x26eeb6['userID'])!=null?_0x2aa72e:_0x4fd38f[_0x2afcbc(0xcd)],'text':JSON[_0x2afcbc(0xed)](_0x4fd38f[_0x2afcbc(0xfb)]),'parentId':_0x601859['id']});break;}case v['Delete']:{const _0x318e51=this['_threadCommentModel']['getComment'](_0x221cd1,_0xee5ada,_0x4fd38f['replyId']);_0x318e51&&_0x318e51[_0x2afcbc(0x10c)]&&this[_0x2afcbc(0x126)][_0x2afcbc(0xe2)](_0x221cd1,_0xee5ada,_0x4fd38f[_0x2afcbc(0xd3)]);break;}case v[_0x2afcbc(0xc1)]:{this[_0x2afcbc(0x126)][_0x2afcbc(0xbe)](_0x221cd1,_0xee5ada,{'commentId':_0x4fd38f[_0x2afcbc(0xd3)],'text':JSON[_0x2afcbc(0xed)](_0x4fd38f['content'])});break;}case v[_0x2afcbc(0xbf)]:{const _0x458ba9=(_0x354d6d=this[_0x2afcbc(0x126)][_0x2afcbc(0xdb)](_0x4fd38f[_0x2afcbc(0x117)])[_0x2afcbc(0xd1)](_0x2d0026=>_0x2d0026['threadId']===_0x4fd38f['threadId']))==null?void 0x0:_0x354d6d[_0x2afcbc(0xd9)];_0x458ba9&&this[_0x2afcbc(0x126)][_0x2afcbc(0xc8)](_0x221cd1,_0xee5ada,_0x458ba9['id'],_0x4fd38f[_0x2afcbc(0xcb)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x59bc1b(_0x6346bf)),p(0x1,_0x59bc1b(_0x23d8a0)),p(0x2,_0x59bc1b(_0x44233a)),p(0x3,_0x59bc1b(_0x5ee519))],S);const z=_0x14e8f6(0xe0),M={};var k=Object[_0x14e8f6(0x10b)],Q=(_0x20ed71,_0x572fad,_0x49abcf,_0x3f6fbc)=>{for(var _0x13b9c8=_0x3f6fbc>0x1?void 0x0:_0x3f6fbc?k(_0x572fad,_0x49abcf):_0x572fad,_0x31dcc7=_0x20ed71['length']-0x1,_0x1bb3d6;_0x31dcc7>=0x0;_0x31dcc7--)(_0x1bb3d6=_0x20ed71[_0x31dcc7])&&(_0x13b9c8=_0x1bb3d6(_0x13b9c8)||_0x13b9c8);return _0x13b9c8;},_=(_0x3aced9,_0x2dc6c8)=>(_0x408e82,_0x1093c6)=>_0x2dc6c8(_0x408e82,_0x1093c6,_0x3aced9);function X(_0xe2cbb8,_0x14addc){const _0x427158=_0x14e8f6,_0x1c3b6b=_0xe2cbb8[_0x427158(0xf7)][0x0];return{..._0x14addc,'id':_0x1c3b6b[_0x427158(0xd3)],'resolved':_0xe2cbb8[_0x427158(0xcb)]===0x1,'dT':D(_0x1c3b6b[_0x427158(0x102)]),'personId':_0x1c3b6b[_0x427158(0xcd)],'threadId':_0x1c3b6b[_0x427158(0x10e)]};}function ee(_0x305687,_0x5ea6ba,_0x29aff7){const _0x9554fe=_0x14e8f6;var _0x110feb,_0x22a35e;if(((_0x22a35e=(_0x110feb=_0x305687==null?void 0x0:_0x305687['replies'])==null?void 0x0:_0x110feb[_0x9554fe(0xd6)])!=null?_0x22a35e:0x0)>0x0){const _0xc2ce31=(_0x4cb2dd,_0x3995bb)=>({'id':_0x4cb2dd['replyId'],'threadId':_0x4cb2dd[_0x9554fe(0x10e)],'dT':D(_0x4cb2dd[_0x9554fe(0x102)]),'personId':_0x4cb2dd[_0x9554fe(0xcd)],'resolved':_0x305687['solved']===I[_0x9554fe(0x104)],'unitId':_0x5ea6ba,'subUnitId':_0x29aff7,'text':JSON[_0x9554fe(0xed)](_0x4cb2dd['content']),'parentId':_0x3995bb}),_0x464e0b=_0xc2ce31(_0x305687[_0x9554fe(0xf7)][0x0]);return{..._0x464e0b,'children':_0x305687[_0x9554fe(0xf7)][_0x9554fe(0x110)](0x1)[_0x9554fe(0x105)](_0xf966cc=>_0xc2ce31(_0xf966cc,_0x464e0b['id']))};}return null;}let f=class{constructor(_0x20fce9,_0x11385d,_0x46f32b,_0x4854b4){const _0x3bc21f=_0x14e8f6;this[_0x3bc21f(0xc0)]=_0x20fce9,this[_0x3bc21f(0x122)]=_0x11385d,this[_0x3bc21f(0x124)]=_0x46f32b,this[_0x3bc21f(0xef)]=_0x4854b4;}async[_0x14e8f6(0x128)](_0x1851e4){const _0x1e6f03=_0x14e8f6;var _0x3ef62f,_0xb6fb58;const {parentId:_0x328a95,unitId:_0x468f6c,text:_0x25e55f,threadId:_0x558da0}=_0x1851e4,_0x309e67=(_0xb6fb58=(_0x3ef62f=_0x25e55f[_0x1e6f03(0x11b)])==null?void 0x0:_0x3ef62f[_0x1e6f03(0xc7)](_0x245dac=>_0x245dac[_0x1e6f03(0x114)]===_0x3d1118[_0x1e6f03(0x129)])[_0x1e6f03(0x105)](_0x457ca8=>_0x457ca8[_0x1e6f03(0xf6)]))!=null?_0xb6fb58:[],_0x326c60=JSON[_0x1e6f03(0xe6)](_0x25e55f),_0x512e66=(await this['_sessionService'][_0x1e6f03(0xde)](_0x468f6c))[_0x1e6f03(0xfe)]();if(_0x328a95){const _0x475578={'memberId':_0x512e66,'unitId':_0x468f6c,'content':_0x326c60,'mention':_0x309e67,'threadId':_0x558da0},_0x4172a6=(await this[_0x1e6f03(0xc0)][_0x1e6f03(0xd5)]('/universer-api/comment/unit/'+_0x468f6c+_0x1e6f03(0x121),{'body':_0x475578}))[_0x1e6f03(0xdf)][_0x1e6f03(0xf0)];return{..._0x1851e4,'id':_0x4172a6['replyId'],'dT':_0x47e258(+_0x4172a6['createTimestamp'])[_0x1e6f03(0x109)](_0x1e6f03(0x119)),'personId':_0x4172a6[_0x1e6f03(0xcd)]};}else{const _0x3b7587={'memberId':_0x512e66,'unitId':_0x468f6c,'content':_0x326c60,'mention':_0x309e67},_0x2d686b=await this['_httpService']['post'](_0x1e6f03(0xfa)+_0x468f6c+_0x1e6f03(0xda),{'body':_0x3b7587});return X(_0x2d686b[_0x1e6f03(0xdf)][_0x1e6f03(0x11c)],_0x1851e4);}}async['updateComment'](_0x4d0efc){const _0x3779b0=_0x14e8f6;var _0x4e2acc,_0xe849d6;const {text:_0x32c058,unitId:_0x184b7a}=_0x4d0efc,_0x166c3f=(_0xe849d6=(_0x4e2acc=_0x32c058['customRanges'])==null?void 0x0:_0x4e2acc[_0x3779b0(0xc7)](_0x6a6db2=>_0x6a6db2[_0x3779b0(0x114)]===_0x3d1118[_0x3779b0(0x129)])[_0x3779b0(0x105)](_0x5db9f5=>_0x5db9f5[_0x3779b0(0xf6)]))!=null?_0xe849d6:[],_0x50c451=JSON['stringify'](_0x32c058),_0x4e9ee4=_0x4d0efc[_0x3779b0(0x10e)],_0xada142=_0x4d0efc['id'],_0x423454={'memberId':(await this[_0x3779b0(0x124)]['requireSession'](_0x184b7a))[_0x3779b0(0xfe)](),'unitId':_0x184b7a,'threadId':_0x4e9ee4,'mention':_0x166c3f,'content':_0x50c451,'replyId':_0xada142},_0x4c3a38=await this[_0x3779b0(0xc0)][_0x3779b0(0xd5)](_0x3779b0(0xfa)+_0x184b7a+_0x3779b0(0xea),{'body':_0x423454});return!_0x4c3a38['body'][_0x3779b0(0xfc)]||_0x4c3a38['body'][_0x3779b0(0xfc)]['code']===0x1;}async[_0x14e8f6(0xc8)](_0x2a0fda){const _0x2a1630=_0x14e8f6,{unitId:_0x338ee6}=_0x2a0fda,_0x59efe2=_0x2a0fda['threadId'],_0x1c0d87={'memberId':this['_userService'][_0x2a1630(0x10d)]()[_0x2a1630(0x11e)],'unitId':_0x338ee6,'threadId':_0x59efe2,'solved':_0x2a0fda[_0x2a1630(0xe7)]?I['Solved']:I[_0x2a1630(0xe3)]},_0x160403=await this['_httpService'][_0x2a1630(0xd5)](_0x2a1630(0xfa)+_0x338ee6+_0x2a1630(0xce),{'body':_0x1c0d87});return!_0x160403['body']['error']||_0x160403['body'][_0x2a1630(0xfc)][_0x2a1630(0xf9)]===0x1;}async[_0x14e8f6(0xe2)](_0x4bbe02,_0x1f000e,_0x43eaa0,_0x41aa8c){const _0x2547b1=_0x14e8f6,_0xf17f68={'memberId':(await this[_0x2547b1(0x124)][_0x2547b1(0xde)](_0x4bbe02))['getMemberID'](),'threadId':_0x43eaa0,'replyId':_0x41aa8c,'unitId':_0x4bbe02},_0xa47529=await this[_0x2547b1(0xc0)][_0x2547b1(0xd5)](_0x2547b1(0xfa)+_0x4bbe02+'/delete',{'body':_0xf17f68});return!_0xa47529[_0x2547b1(0xdf)][_0x2547b1(0xfc)]||_0xa47529[_0x2547b1(0xdf)][_0x2547b1(0xfc)][_0x2547b1(0xf9)]===0x1;}async[_0x14e8f6(0x10f)](_0x1ad2ba,_0x1f4692,_0x15ea54){const _0x15e753=_0x14e8f6,_0x7829de={'unitId':_0x1ad2ba,'threadId':_0x15ea54},_0x36450b=await this['_httpService'][_0x15e753(0xd5)](_0x15e753(0xfa)+_0x1ad2ba+_0x15e753(0x106),{'body':_0x7829de}),_0x5e05a3=_0x15ea54[_0x15e753(0x105)](_0x5ab93c=>ee(_0x36450b[_0x15e753(0xdf)][_0x15e753(0x125)][_0x5ab93c],_0x1ad2ba,_0x1f4692))[_0x15e753(0xc7)](Boolean);return Object[_0x15e753(0xd0)](_0x36450b[_0x15e753(0xdf)][_0x15e753(0xe8)])[_0x15e753(0xc4)](_0x15d45e=>{const _0x54c674=_0x15e753;this[_0x54c674(0x122)][_0x54c674(0xff)](_0x15d45e);}),_0x5e05a3;}['saveCommentToSnapshot'](_0x4ed038){const _0x144f34=_0x14e8f6;return{'id':_0x4ed038['id'],'threadId':_0x4ed038[_0x144f34(0x10e)],'ref':_0x4ed038[_0x144f34(0x100)]};}};f=Q([_(0x0,_0x59bc1b(_0x5ae147)),_(0x1,_0x59bc1b(_0x44233a)),_(0x2,_0x59bc1b(_0x6db0c8)),_(0x3,_0x59bc1b(_0x5ee519))],f);var re=Object[_0x14e8f6(0x10b)],te=(_0x35451d,_0x25aa9b,_0x4eb219,_0x40a5b3)=>{const _0x2cefac=_0x14e8f6;for(var _0x2042e4=_0x40a5b3>0x1?void 0x0:_0x40a5b3?re(_0x25aa9b,_0x4eb219):_0x25aa9b,_0x5d4b81=_0x35451d[_0x2cefac(0xd6)]-0x1,_0x5efc5a;_0x5d4b81>=0x0;_0x5d4b81--)(_0x5efc5a=_0x35451d[_0x5d4b81])&&(_0x2042e4=_0x5efc5a(_0x2042e4)||_0x2042e4);return _0x2042e4;},N=(_0x53ef74,_0x2f595b)=>(_0x1d4661,_0x590e98)=>_0x2f595b(_0x1d4661,_0x590e98,_0x53ef74);let g=class extends _0x4a90c9{constructor(_0x1197db,_0x3b81d4){const _0x9ce958=_0x14e8f6;super(),this[_0x9ce958(0x11a)]=_0x1197db,this[_0x9ce958(0x127)]=_0x3b81d4,this[_0x9ce958(0x12a)]();}[_0x14e8f6(0x12a)](){const _0x179475=_0x14e8f6;this[_0x179475(0x11a)][_0x179475(0x10a)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x179475(0xc3)]=!0x1;}};function _0x2411(){const _0x1a0e82=['dataSource','getOwnPropertyDescriptor','parentId','getCurrentUser','threadId','listComments','slice','955NRmKPp','_config','user','rangeType','156YECbnn','/universer-api/user/list','unitId','2hXAWdx','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','customRanges','comment','_initUserSync','userID','onStarting','UNIVER_UNKNOWN','/reply','_userService','2743866aybfYS','_sessionService','comments','_threadCommentModel','_threadCommentDataSource','addComment','COMMENT','_initDataSource','updateComment','Solve','_httpService','Edit','add','syncUpdateMutationToColla','forEach','22960BkdIzD','onReady','filter','resolveComment','_commentService','type','solved','12218aLEqco','userId','/solved','Add','values','find','delete','replyId','478170JPEEaa','post','length','get','size','root','/add','getUnit','payload','UNRECOGNIZED','requireSession','body','thread-comment-data-source.config','subscribe','deleteComment','OpenOrReOpen','defineProperty','setConfig','stringify','resolved','users','12387XioJrk','/edit','personId','symbol','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','reply','pipe','2627376ltFMWH','Unknown','2079eJtcOz','_init','rangeId','replies','commentUpdate$','code','/universer-api/comment/unit/','content','error','Delete','getMemberID','addUser','ref','Reply','createTimestamp','disposeWithMe','Solved','map','/list','10986hLOMHH','_configService','format'];_0x2411=function(){return _0x1a0e82;};return _0x2411();}g=te([N(0x0,_0x1f38fa),N(0x1,_0x59bc1b(f))],g);var se=Object[_0x14e8f6(0xe4)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x43cb38,_0x1f3646,_0x42ea57)=>_0x1f3646 in _0x43cb38?se(_0x43cb38,_0x1f3646,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x42ea57}):_0x43cb38[_0x1f3646]=_0x42ea57,ie=(_0x375564,_0x1c0104,_0x51397b,_0x108c4f)=>{for(var _0x4d036e=_0x108c4f>0x1?void 0x0:_0x108c4f?oe(_0x1c0104,_0x51397b):_0x1c0104,_0x4a1f92=_0x375564['length']-0x1,_0x14238c;_0x4a1f92>=0x0;_0x4a1f92--)(_0x14238c=_0x375564[_0x4a1f92])&&(_0x4d036e=_0x14238c(_0x4d036e)||_0x4d036e);return _0x4d036e;},w=(_0x179abf,_0x153d70)=>(_0x16f650,_0x46cccf)=>_0x153d70(_0x16f650,_0x46cccf,_0x179abf),$=(_0x3ecd5,_0x2350f5,_0x4ace5b)=>ne(_0x3ecd5,typeof _0x2350f5!=_0x14e8f6(0xec)?_0x2350f5+'':_0x2350f5,_0x4ace5b);let b=class extends _0x41398f{constructor(_0x342318=M,_0x1801b8,_0x150ec8){const _0xc3e8ac=_0x14e8f6;super(),this[_0xc3e8ac(0x112)]=_0x342318,this['_injector']=_0x1801b8,this['_configService']=_0x150ec8;const {..._0x14cfbf}=_0xdfd847({},M,this['_config']);this[_0xc3e8ac(0x108)][_0xc3e8ac(0xe5)](z,_0x14cfbf);}[_0x14e8f6(0x11f)](){const _0x5cb8e6=_0x14e8f6;[[f],[g],[S]][_0x5cb8e6(0xc4)](_0x5459d8=>{const _0x297049=_0x5cb8e6;this[_0x297049(0xef)][_0x297049(0xc2)](_0x5459d8);});}[_0x14e8f6(0xc6)](){const _0xf28336=_0x14e8f6;this[_0xf28336(0xef)][_0xf28336(0xd7)](g),this['_injector'][_0xf28336(0xd7)](S);}};$(b,'pluginName',W),$(b,_0x14e8f6(0xca),_0x454a2c[_0x14e8f6(0x120)]),b=ie([_0x4be0bf(_0xce439,_0x281d67,_0x2fa253),w(0x1,_0x59bc1b(_0x5ee519)),w(0x2,_0x38206b)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x31bbbd=_0x21da;(function(_0x31d346,_0x3e9d05){const _0xf91fd5=_0x21da,_0x26fbd9=_0x31d346();while(!![]){try{const _0x14e63f=-parseInt(_0xf91fd5(0x15f))/0x1*(parseInt(_0xf91fd5(0x179))/0x2)+-parseInt(_0xf91fd5(0x137))/0x3*(parseInt(_0xf91fd5(0x15e))/0x4)+parseInt(_0xf91fd5(0x16f))/0x5*(parseInt(_0xf91fd5(0x191))/0x6)+-parseInt(_0xf91fd5(0x14f))/0x7*(-parseInt(_0xf91fd5(0x17b))/0x8)+-parseInt(_0xf91fd5(0x131))/0x9*(parseInt(_0xf91fd5(0x176))/0xa)+parseInt(_0xf91fd5(0x132))/0xb*(parseInt(_0xf91fd5(0x18d))/0xc)+parseInt(_0xf91fd5(0x12f))/0xd;if(_0x14e63f===_0x3e9d05)break;else _0x26fbd9['push'](_0x26fbd9['shift']());}catch(_0x2bfda6){_0x26fbd9['push'](_0x26fbd9['shift']());}}}(_0x4420,0x5fe5d));import{CommentService as _0x43bbdf,CollaborationSessionService as _0x582565,UniverCollaborationClientPlugin as _0x1ea497}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x20554f}from'@univerjs-pro/license';import{dayjs as _0x479c12,UserManagerService as _0x5393ba,Inject as _0x4ebf50,Injector as _0x5ca649,Disposable as _0x577ca3,CustomRangeType as _0x49c383,UniverInstanceType as _0x38d7cc,DependentOn as _0x5881c2,IConfigService as _0x5e3e43,Plugin as _0x459f72,merge as _0x43f57a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x24f61f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x11b41d,IThreadCommentDataSourceService as _0x117fb0}from'@univerjs/thread-comment';import{bufferTime as _0xbe21c3}from'rxjs';import{HTTPService as _0x4b5d31}from'@univerjs/network';const W=_0x31bbbd(0x18a);var I=(_0x3091d6=>(_0x3091d6[_0x3091d6[_0x31bbbd(0x194)]=0x0]=_0x31bbbd(0x194),_0x3091d6[_0x3091d6[_0x31bbbd(0x17f)]=0x1]=_0x31bbbd(0x17f),_0x3091d6[_0x3091d6[_0x31bbbd(0x164)]=-0x1]=_0x31bbbd(0x164),_0x3091d6))(I||{}),v=(_0x41117d=>(_0x41117d[_0x41117d[_0x31bbbd(0x172)]=0x0]=_0x31bbbd(0x172),_0x41117d[_0x41117d[_0x31bbbd(0x151)]=0x1]='Add',_0x41117d[_0x41117d['Reply']=0x2]='Reply',_0x41117d[_0x41117d[_0x31bbbd(0x140)]=0x3]='Edit',_0x41117d[_0x41117d[_0x31bbbd(0x146)]=0x4]=_0x31bbbd(0x146),_0x41117d[_0x41117d[_0x31bbbd(0x147)]=0x5]=_0x31bbbd(0x147),_0x41117d[_0x41117d['UNRECOGNIZED']=-0x1]=_0x31bbbd(0x164),_0x41117d))(v||{});const D=_0x230b8a=>_0x479c12(new Date(+_0x230b8a))[_0x31bbbd(0x171)](_0x31bbbd(0x168)),B=async(_0x5e9cad,_0x4a1fcc)=>{const _0x4a8dbc=_0x31bbbd,_0x2e6918=_0x5e9cad['get'](_0x5393ba),_0x58be34=_0x5e9cad[_0x4a8dbc(0x157)](_0x4b5d31);_0x4a1fcc[_0x4a8dbc(0x142)](_0x426a89=>{const _0x5acb64=_0x4a8dbc;_0x2e6918[_0x5acb64(0x154)](_0x426a89)&&_0x4a1fcc[_0x5acb64(0x169)](_0x426a89);}),_0x4a1fcc[_0x4a8dbc(0x13b)]&&(await _0x58be34[_0x4a8dbc(0x157)](_0x4a8dbc(0x143),{'params':{'userIDs':[..._0x4a1fcc]}}))[_0x4a8dbc(0x138)][_0x4a8dbc(0x16b)][_0x4a8dbc(0x142)](_0x5a4a01=>{const _0x280305=_0x4a8dbc;_0x5a4a01&&_0x2e6918[_0x280305(0x150)](_0x5a4a01);});};var K=Object[_0x31bbbd(0x190)],V=(_0x12c59b,_0x280992,_0xc58fee,_0x3b110b)=>{const _0x4a8414=_0x31bbbd;for(var _0x963214=_0x3b110b>0x1?void 0x0:_0x3b110b?K(_0x280992,_0xc58fee):_0x280992,_0xcd422f=_0x12c59b[_0x4a8414(0x170)]-0x1,_0x1cf465;_0xcd422f>=0x0;_0xcd422f--)(_0x1cf465=_0x12c59b[_0xcd422f])&&(_0x963214=_0x1cf465(_0x963214)||_0x963214);return _0x963214;},p=(_0x4aeee5,_0x5446ee)=>(_0x2e3a90,_0x1c833f)=>_0x5446ee(_0x2e3a90,_0x1c833f,_0x4aeee5);let S=class extends _0x577ca3{constructor(_0x2affbe,_0x54d445,_0x28a11a,_0x4f4a73){const _0x588d0b=_0x31bbbd;super(),this[_0x588d0b(0x181)]=_0x2affbe,this[_0x588d0b(0x133)]=_0x54d445,this[_0x588d0b(0x156)]=_0x28a11a,this['_injector']=_0x4f4a73,this[_0x588d0b(0x15b)](),this[_0x588d0b(0x186)]();}[_0x31bbbd(0x186)](){const _0x56f198=_0x31bbbd;this[_0x56f198(0x174)](this[_0x56f198(0x133)][_0x56f198(0x183)][_0x56f198(0x192)](_0xbe21c3(0x10))['subscribe'](_0x38a0c9=>{const _0xc03563=_0x56f198,_0x471dca=new Set();_0x38a0c9[_0xc03563(0x142)](_0x572b26=>{const _0x5f54a3=_0xc03563;switch(_0x572b26['type']){case _0x5f54a3(0x175):{const _0xdc4fe6=_0x572b26['payload'][_0x5f54a3(0x130)];_0x471dca[_0x5f54a3(0x175)](_0xdc4fe6);break;}}}),B(this[_0xc03563(0x13c)],_0x471dca);}));}[_0x31bbbd(0x15b)](){const _0x82b66b=_0x31bbbd;this[_0x82b66b(0x174)](this[_0x82b66b(0x181)][_0x82b66b(0x183)][_0x82b66b(0x158)](async _0x1c0824=>{const _0xe6fc33=_0x82b66b;var _0x5337de,_0x2d3eff,_0x3a7cb3,_0x5aa39d;const _0x600730=(_0x5337de=this[_0xe6fc33(0x133)][_0xe6fc33(0x17c)](_0x1c0824[_0xe6fc33(0x178)])['find'](_0xa798b2=>_0xa798b2[_0xe6fc33(0x13f)]===_0x1c0824[_0xe6fc33(0x13f)]))==null?void 0x0:_0x5337de['root'];if(!_0x600730)return;const {unitId:_0x31b69a,subUnitId:_0x37902f}=_0x600730;switch(_0x1c0824[_0xe6fc33(0x13a)]&&this[_0xe6fc33(0x156)][_0xe6fc33(0x150)](_0x1c0824[_0xe6fc33(0x13a)]),_0x1c0824[_0xe6fc33(0x14c)]){case v[_0xe6fc33(0x151)]:break;case v['Reply']:{this['_threadCommentModel'][_0xe6fc33(0x188)](_0x31b69a,_0x37902f,{'unitId':_0x31b69a,'subUnitId':_0x37902f,'ref':'','id':_0x1c0824[_0xe6fc33(0x162)],'dT':D(+_0x1c0824['createTimestamp']),'threadId':_0x1c0824[_0xe6fc33(0x13f)],'personId':(_0x3a7cb3=(_0x2d3eff=_0x1c0824[_0xe6fc33(0x13a)])==null?void 0x0:_0x2d3eff[_0xe6fc33(0x177)])!=null?_0x3a7cb3:_0x1c0824['userId'],'text':JSON[_0xe6fc33(0x184)](_0x1c0824[_0xe6fc33(0x14b)]),'parentId':_0x600730['id']});break;}case v[_0xe6fc33(0x146)]:{const _0x2df031=this['_threadCommentModel']['getComment'](_0x31b69a,_0x37902f,_0x1c0824['replyId']);_0x2df031&&_0x2df031[_0xe6fc33(0x14d)]&&this[_0xe6fc33(0x133)][_0xe6fc33(0x153)](_0x31b69a,_0x37902f,_0x1c0824[_0xe6fc33(0x162)]);break;}case v[_0xe6fc33(0x140)]:{this[_0xe6fc33(0x133)][_0xe6fc33(0x13d)](_0x31b69a,_0x37902f,{'commentId':_0x1c0824[_0xe6fc33(0x162)],'text':JSON[_0xe6fc33(0x184)](_0x1c0824[_0xe6fc33(0x14b)])});break;}case v[_0xe6fc33(0x147)]:{const _0xf2853c=(_0x5aa39d=this[_0xe6fc33(0x133)][_0xe6fc33(0x17c)](_0x1c0824[_0xe6fc33(0x178)])[_0xe6fc33(0x18f)](_0x31811b=>_0x31811b[_0xe6fc33(0x13f)]===_0x1c0824['threadId']))==null?void 0x0:_0x5aa39d['root'];_0xf2853c&&this[_0xe6fc33(0x133)][_0xe6fc33(0x14e)](_0x31b69a,_0x37902f,_0xf2853c['id'],_0x1c0824['solved']===I[_0xe6fc33(0x17f)]);break;}}}));}};function _0x4420(){const _0x2c6800=['rangeType','Solved','comment','_commentService','ref','commentUpdate$','parse','/list','_initUserSync','slice','addComment','dataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','code','defineProperty','24WpCHtn','_threadCommentDataSource','find','getOwnPropertyDescriptor','6ceNcfO','pipe','post','OpenOrReOpen','onReady','stringify','_configService','5166785BZrQdL','personId','1266606QQIHWo','3274139ophxRg','_threadCommentModel','/reply','_httpService','symbol','49443LbpbXq','body','map','user','size','_injector','updateComment','comments','threadId','Edit','requireSession','forEach','/universer-api/user/list','error','/delete','Delete','Solve','_sessionService','_threadCommentDataSourceService','/edit','content','type','parentId','resolveComment','5782KEZCwO','addUser','Add','customRanges','deleteComment','getUser','replies','_userService','get','subscribe','filter','solved','_init','_config','onStarting','28oiRMlF','43VlsBRa','userId','UNIVER_UNKNOWN','replyId','getCurrentUser','UNRECOGNIZED','thread-comment-data-source.config','_initDataSource','rangeId','YYYY/MM/DD\x20HH:mm','delete','COMMENT','users','/universer-api/comment/unit/','createTimestamp','getMemberID','52905dxJeog','length','format','Unknown','/add','disposeWithMe','add','30evAPNY','userID','unitId','12076hsmHGQ','syncUpdateMutationToColla','1808wiuErR','getUnit','saveCommentToSnapshot'];_0x4420=function(){return _0x2c6800;};return _0x4420();}S=V([p(0x0,_0x4ebf50(_0x43bbdf)),p(0x1,_0x4ebf50(_0x11b41d)),p(0x2,_0x4ebf50(_0x5393ba)),p(0x3,_0x4ebf50(_0x5ca649))],S);const z=_0x31bbbd(0x165),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x494384,_0x59654b,_0x59fc4e,_0x575791)=>{const _0x4eadda=_0x31bbbd;for(var _0x9589d2=_0x575791>0x1?void 0x0:_0x575791?k(_0x59654b,_0x59fc4e):_0x59654b,_0x8d2168=_0x494384[_0x4eadda(0x170)]-0x1,_0x3b024d;_0x8d2168>=0x0;_0x8d2168--)(_0x3b024d=_0x494384[_0x8d2168])&&(_0x9589d2=_0x3b024d(_0x9589d2)||_0x9589d2);return _0x9589d2;},_=(_0x3b3b69,_0x24a250)=>(_0x196487,_0x378f7)=>_0x24a250(_0x196487,_0x378f7,_0x3b3b69);function _0x21da(_0x5e161d,_0x2d03c8){const _0x44202e=_0x4420();return _0x21da=function(_0x21da34,_0x564a94){_0x21da34=_0x21da34-0x12d;let _0x5891ba=_0x44202e[_0x21da34];return _0x5891ba;},_0x21da(_0x5e161d,_0x2d03c8);}function X(_0x116a59,_0xf5fd43){const _0x467e64=_0x31bbbd,_0x2559f0=_0x116a59['replies'][0x0];return{..._0xf5fd43,'id':_0x2559f0[_0x467e64(0x162)],'resolved':_0x116a59['solved']===0x1,'dT':D(_0x2559f0[_0x467e64(0x16d)]),'personId':_0x2559f0['userId'],'threadId':_0x2559f0[_0x467e64(0x13f)]};}function ee(_0x3a9aab,_0x45d851,_0x22b5a0){const _0x4f173c=_0x31bbbd;var _0x5bda3a,_0x3d4d9b;if(((_0x3d4d9b=(_0x5bda3a=_0x3a9aab==null?void 0x0:_0x3a9aab[_0x4f173c(0x155)])==null?void 0x0:_0x5bda3a[_0x4f173c(0x170)])!=null?_0x3d4d9b:0x0)>0x0){const _0x101975=(_0x33b8f5,_0x34af27)=>({'id':_0x33b8f5[_0x4f173c(0x162)],'threadId':_0x33b8f5[_0x4f173c(0x13f)],'dT':D(_0x33b8f5['createTimestamp']),'personId':_0x33b8f5['userId'],'resolved':_0x3a9aab[_0x4f173c(0x15a)]===I['Solved'],'unitId':_0x45d851,'subUnitId':_0x22b5a0,'text':JSON[_0x4f173c(0x184)](_0x33b8f5[_0x4f173c(0x14b)]),'parentId':_0x34af27}),_0x4861fa=_0x101975(_0x3a9aab[_0x4f173c(0x155)][0x0]);return{..._0x4861fa,'children':_0x3a9aab[_0x4f173c(0x155)][_0x4f173c(0x187)](0x1)[_0x4f173c(0x139)](_0x37c594=>_0x101975(_0x37c594,_0x4861fa['id']))};}return null;}let f=class{constructor(_0x1266be,_0x32917f,_0x57b3a1,_0x9c0efb){const _0x20fc2b=_0x31bbbd;this['_httpService']=_0x1266be,this['_userService']=_0x32917f,this[_0x20fc2b(0x148)]=_0x57b3a1,this['_injector']=_0x9c0efb;}async[_0x31bbbd(0x188)](_0x48b3fa){const _0x97b177=_0x31bbbd;var _0x19ea7d,_0x5a72a4;const {parentId:_0x140852,unitId:_0x30785d,text:_0x29ae1d,threadId:_0x1f7046}=_0x48b3fa,_0x4caee7=(_0x5a72a4=(_0x19ea7d=_0x29ae1d[_0x97b177(0x152)])==null?void 0x0:_0x19ea7d[_0x97b177(0x159)](_0x3487fa=>_0x3487fa[_0x97b177(0x17e)]===_0x49c383[_0x97b177(0x16a)])[_0x97b177(0x139)](_0x5a3f53=>_0x5a3f53[_0x97b177(0x167)]))!=null?_0x5a72a4:[],_0x4c4b42=JSON[_0x97b177(0x12d)](_0x29ae1d),_0x478c76=(await this[_0x97b177(0x148)][_0x97b177(0x141)](_0x30785d))[_0x97b177(0x16e)]();if(_0x140852){const _0x5be347={'memberId':_0x478c76,'unitId':_0x30785d,'content':_0x4c4b42,'mention':_0x4caee7,'threadId':_0x1f7046},_0x19cd09=(await this[_0x97b177(0x135)]['post']('/universer-api/comment/unit/'+_0x30785d+_0x97b177(0x134),{'body':_0x5be347}))[_0x97b177(0x138)]['reply'];return{..._0x48b3fa,'id':_0x19cd09[_0x97b177(0x162)],'dT':_0x479c12(+_0x19cd09[_0x97b177(0x16d)])[_0x97b177(0x171)](_0x97b177(0x168)),'personId':_0x19cd09[_0x97b177(0x160)]};}else{const _0x3f8e0e={'memberId':_0x478c76,'unitId':_0x30785d,'content':_0x4c4b42,'mention':_0x4caee7},_0x4388b5=await this[_0x97b177(0x135)][_0x97b177(0x193)](_0x97b177(0x16c)+_0x30785d+_0x97b177(0x173),{'body':_0x3f8e0e});return X(_0x4388b5[_0x97b177(0x138)][_0x97b177(0x180)],_0x48b3fa);}}async[_0x31bbbd(0x13d)](_0x1924ac){const _0x244805=_0x31bbbd;var _0x385d5c,_0x19be98;const {text:_0x2b6005,unitId:_0xb2d8f}=_0x1924ac,_0x279244=(_0x19be98=(_0x385d5c=_0x2b6005[_0x244805(0x152)])==null?void 0x0:_0x385d5c['filter'](_0x50d9b6=>_0x50d9b6[_0x244805(0x17e)]===_0x49c383[_0x244805(0x16a)])[_0x244805(0x139)](_0x289197=>_0x289197['rangeId']))!=null?_0x19be98:[],_0x210c29=JSON['stringify'](_0x2b6005),_0x1561fc=_0x1924ac[_0x244805(0x13f)],_0x18d4d0=_0x1924ac['id'],_0x220d28={'memberId':(await this[_0x244805(0x148)][_0x244805(0x141)](_0xb2d8f))['getMemberID'](),'unitId':_0xb2d8f,'threadId':_0x1561fc,'mention':_0x279244,'content':_0x210c29,'replyId':_0x18d4d0},_0xd6595b=await this[_0x244805(0x135)][_0x244805(0x193)]('/universer-api/comment/unit/'+_0xb2d8f+_0x244805(0x14a),{'body':_0x220d28});return!_0xd6595b[_0x244805(0x138)][_0x244805(0x144)]||_0xd6595b['body'][_0x244805(0x144)]['code']===0x1;}async[_0x31bbbd(0x14e)](_0x34d98a){const _0x2a1e1a=_0x31bbbd,{unitId:_0x4ae2ac}=_0x34d98a,_0x36d006=_0x34d98a[_0x2a1e1a(0x13f)],_0x5f4d92={'memberId':this[_0x2a1e1a(0x156)][_0x2a1e1a(0x163)]()[_0x2a1e1a(0x177)],'unitId':_0x4ae2ac,'threadId':_0x36d006,'solved':_0x34d98a['resolved']?I[_0x2a1e1a(0x17f)]:I[_0x2a1e1a(0x194)]},_0x186bcd=await this[_0x2a1e1a(0x135)][_0x2a1e1a(0x193)](_0x2a1e1a(0x16c)+_0x4ae2ac+'/solved',{'body':_0x5f4d92});return!_0x186bcd[_0x2a1e1a(0x138)][_0x2a1e1a(0x144)]||_0x186bcd['body']['error'][_0x2a1e1a(0x18b)]===0x1;}async[_0x31bbbd(0x153)](_0x13edbc,_0x591626,_0x47b09b,_0x3b7b80){const _0x3c0b4e=_0x31bbbd,_0x4ed664={'memberId':(await this[_0x3c0b4e(0x148)][_0x3c0b4e(0x141)](_0x13edbc))[_0x3c0b4e(0x16e)](),'threadId':_0x47b09b,'replyId':_0x3b7b80,'unitId':_0x13edbc},_0x3dea00=await this[_0x3c0b4e(0x135)][_0x3c0b4e(0x193)]('/universer-api/comment/unit/'+_0x13edbc+_0x3c0b4e(0x145),{'body':_0x4ed664});return!_0x3dea00[_0x3c0b4e(0x138)][_0x3c0b4e(0x144)]||_0x3dea00['body']['error']['code']===0x1;}async['listComments'](_0x15ed87,_0x2b5302,_0x18e1ae){const _0x24272f=_0x31bbbd,_0x3ad64a={'unitId':_0x15ed87,'threadId':_0x18e1ae},_0x3a0676=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x15ed87+_0x24272f(0x185),{'body':_0x3ad64a}),_0x52796a=_0x18e1ae['map'](_0x5c4482=>ee(_0x3a0676[_0x24272f(0x138)][_0x24272f(0x13e)][_0x5c4482],_0x15ed87,_0x2b5302))['filter'](Boolean);return Object['values'](_0x3a0676['body'][_0x24272f(0x16b)])['forEach'](_0x2822a3=>{const _0x4b2d15=_0x24272f;this[_0x4b2d15(0x156)]['addUser'](_0x2822a3);}),_0x52796a;}[_0x31bbbd(0x17d)](_0x4e43f1){const _0x19f4c3=_0x31bbbd;return{'id':_0x4e43f1['id'],'threadId':_0x4e43f1[_0x19f4c3(0x13f)],'ref':_0x4e43f1[_0x19f4c3(0x182)]};}};f=Q([_(0x0,_0x4ebf50(_0x4b5d31)),_(0x1,_0x4ebf50(_0x5393ba)),_(0x2,_0x4ebf50(_0x582565)),_(0x3,_0x4ebf50(_0x5ca649))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x5192eb,_0x348419,_0x4f856c,_0x214d0c)=>{const _0x1f07b0=_0x31bbbd;for(var _0x178d35=_0x214d0c>0x1?void 0x0:_0x214d0c?re(_0x348419,_0x4f856c):_0x348419,_0x330e72=_0x5192eb[_0x1f07b0(0x170)]-0x1,_0x1aaca7;_0x330e72>=0x0;_0x330e72--)(_0x1aaca7=_0x5192eb[_0x330e72])&&(_0x178d35=_0x1aaca7(_0x178d35)||_0x178d35);return _0x178d35;},N=(_0x543faa,_0xe659c5)=>(_0x30899d,_0x373755)=>_0xe659c5(_0x30899d,_0x373755,_0x543faa);let g=class extends _0x577ca3{constructor(_0x4d374e,_0x1d30f1){const _0x5ebbd8=_0x31bbbd;super(),this[_0x5ebbd8(0x149)]=_0x4d374e,this['_threadCommentDataSource']=_0x1d30f1,this[_0x5ebbd8(0x166)]();}[_0x31bbbd(0x166)](){const _0x4e11dc=_0x31bbbd;this[_0x4e11dc(0x149)][_0x4e11dc(0x189)]=this[_0x4e11dc(0x18e)],this[_0x4e11dc(0x149)][_0x4e11dc(0x17a)]=!0x1;}};g=te([N(0x0,_0x117fb0),N(0x1,_0x4ebf50(f))],g);var se=Object[_0x31bbbd(0x18c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x161b0a,_0x4058bf,_0x29a516)=>_0x4058bf in _0x161b0a?se(_0x161b0a,_0x4058bf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29a516}):_0x161b0a[_0x4058bf]=_0x29a516,ie=(_0x89cb76,_0x21d1af,_0x5c94dd,_0x4965d9)=>{const _0x5e9cd0=_0x31bbbd;for(var _0x56a904=_0x4965d9>0x1?void 0x0:_0x4965d9?oe(_0x21d1af,_0x5c94dd):_0x21d1af,_0x2ee7b5=_0x89cb76[_0x5e9cd0(0x170)]-0x1,_0x2be2cf;_0x2ee7b5>=0x0;_0x2ee7b5--)(_0x2be2cf=_0x89cb76[_0x2ee7b5])&&(_0x56a904=_0x2be2cf(_0x56a904)||_0x56a904);return _0x56a904;},w=(_0x449119,_0x59eac7)=>(_0x4996fc,_0x443692)=>_0x59eac7(_0x4996fc,_0x443692,_0x449119),$=(_0x5850a6,_0x81d065,_0x59f6e7)=>ne(_0x5850a6,typeof _0x81d065!=_0x31bbbd(0x136)?_0x81d065+'':_0x81d065,_0x59f6e7);let b=class extends _0x459f72{constructor(_0x2e0007=M,_0x2f237c,_0x563bb0){const _0x2c12f2=_0x31bbbd;super(),this['_config']=_0x2e0007,this['_injector']=_0x2f237c,this['_configService']=_0x563bb0;const {..._0x4311fa}=_0x43f57a({},M,this[_0x2c12f2(0x15c)]);this[_0x2c12f2(0x12e)]['setConfig'](z,_0x4311fa);}[_0x31bbbd(0x15d)](){const _0x4d266f=_0x31bbbd;[[f],[g],[S]][_0x4d266f(0x142)](_0x5cd3b6=>{const _0x4bc877=_0x4d266f;this['_injector'][_0x4bc877(0x175)](_0x5cd3b6);});}[_0x31bbbd(0x195)](){const _0x1c040e=_0x31bbbd;this['_injector'][_0x1c040e(0x157)](g),this[_0x1c040e(0x13c)]['get'](S);}};$(b,'pluginName',W),$(b,_0x31bbbd(0x14c),_0x38d7cc[_0x31bbbd(0x161)]),b=ie([_0x5881c2(_0x24f61f,_0x1ea497,_0x20554f),w(0x1,_0x4ebf50(_0x5ca649)),w(0x2,_0x5e3e43)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x14e8f6=_0x31ff;(function(_0x2481d2,_0x5e0d93){const _0x474d7a=_0x31ff,_0x45e3ad=_0x2481d2();while(!![]){try{const _0x759750=-parseInt(_0x474d7a(0xcc))/0x1*(-parseInt(_0x474d7a(0x118))/0x2)+parseInt(_0x474d7a(0xe9))/0x3*(parseInt(_0x474d7a(0x115))/0x4)+-parseInt(_0x474d7a(0x111))/0x5*(-parseInt(_0x474d7a(0x107))/0x6)+parseInt(_0x474d7a(0xd4))/0x7+parseInt(_0x474d7a(0xf2))/0x8+-parseInt(_0x474d7a(0x123))/0x9+parseInt(_0x474d7a(0xc5))/0xa*(-parseInt(_0x474d7a(0xf4))/0xb);if(_0x759750===_0x5e0d93)break;else _0x45e3ad['push'](_0x45e3ad['shift']());}catch(_0x3b2381){_0x45e3ad['push'](_0x45e3ad['shift']());}}}(_0x2411,0x2c294));import{CommentService as _0x6346bf,CollaborationSessionService as _0x6db0c8,UniverCollaborationClientPlugin as _0x281d67}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2fa253}from'@univerjs-pro/license';import{dayjs as _0x47e258,UserManagerService as _0x44233a,Inject as _0x59bc1b,Injector as _0x5ee519,Disposable as _0x4a90c9,CustomRangeType as _0x3d1118,UniverInstanceType as _0x454a2c,DependentOn as _0x4be0bf,IConfigService as _0x38206b,Plugin as _0x41398f,merge as _0xdfd847}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xce439}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x23d8a0,IThreadCommentDataSourceService as _0x1f38fa}from'@univerjs/thread-comment';function _0x31ff(_0x2aeb82,_0xbec4c){const _0x2411a4=_0x2411();return _0x31ff=function(_0x31ffb0,_0x2e9983){_0x31ffb0=_0x31ffb0-0xbe;let _0x595ea8=_0x2411a4[_0x31ffb0];return _0x595ea8;},_0x31ff(_0x2aeb82,_0xbec4c);}import{bufferTime as _0x390860}from'rxjs';import{HTTPService as _0x5ae147}from'@univerjs/network';const W=_0x14e8f6(0xee);var I=(_0x541df3=>(_0x541df3[_0x541df3['OpenOrReOpen']=0x0]=_0x14e8f6(0xe3),_0x541df3[_0x541df3[_0x14e8f6(0x104)]=0x1]=_0x14e8f6(0x104),_0x541df3[_0x541df3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x541df3))(I||{}),v=(_0x189f28=>(_0x189f28[_0x189f28[_0x14e8f6(0xf3)]=0x0]=_0x14e8f6(0xf3),_0x189f28[_0x189f28['Add']=0x1]=_0x14e8f6(0xcf),_0x189f28[_0x189f28[_0x14e8f6(0x101)]=0x2]=_0x14e8f6(0x101),_0x189f28[_0x189f28['Edit']=0x3]=_0x14e8f6(0xc1),_0x189f28[_0x189f28[_0x14e8f6(0xfd)]=0x4]=_0x14e8f6(0xfd),_0x189f28[_0x189f28[_0x14e8f6(0xbf)]=0x5]=_0x14e8f6(0xbf),_0x189f28[_0x189f28[_0x14e8f6(0xdd)]=-0x1]=_0x14e8f6(0xdd),_0x189f28))(v||{});const D=_0x5ce6cd=>_0x47e258(new Date(+_0x5ce6cd))[_0x14e8f6(0x109)](_0x14e8f6(0x119)),B=async(_0x1f5dc3,_0x59284a)=>{const _0x3f6c43=_0x14e8f6,_0x19e75=_0x1f5dc3[_0x3f6c43(0xd7)](_0x44233a),_0x4804f3=_0x1f5dc3[_0x3f6c43(0xd7)](_0x5ae147);_0x59284a[_0x3f6c43(0xc4)](_0x5d03ee=>{const _0x417b0c=_0x3f6c43;_0x19e75['getUser'](_0x5d03ee)&&_0x59284a[_0x417b0c(0xd2)](_0x5d03ee);}),_0x59284a[_0x3f6c43(0xd8)]&&(await _0x4804f3[_0x3f6c43(0xd7)](_0x3f6c43(0x116),{'params':{'userIDs':[..._0x59284a]}}))['body'][_0x3f6c43(0xe8)][_0x3f6c43(0xc4)](_0x1c410a=>{const _0x55bced=_0x3f6c43;_0x1c410a&&_0x19e75[_0x55bced(0xff)](_0x1c410a);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x27fa48,_0x26bbfa,_0x68ac5e,_0x726e5a)=>{const _0x3e9f77=_0x14e8f6;for(var _0x233cf1=_0x726e5a>0x1?void 0x0:_0x726e5a?K(_0x26bbfa,_0x68ac5e):_0x26bbfa,_0x1bc118=_0x27fa48[_0x3e9f77(0xd6)]-0x1,_0xd74061;_0x1bc118>=0x0;_0x1bc118--)(_0xd74061=_0x27fa48[_0x1bc118])&&(_0x233cf1=_0xd74061(_0x233cf1)||_0x233cf1);return _0x233cf1;},p=(_0x439f04,_0x4a7d14)=>(_0x5509cd,_0xfd9dc8)=>_0x4a7d14(_0x5509cd,_0xfd9dc8,_0x439f04);let S=class extends _0x4a90c9{constructor(_0x42cbd0,_0x24ed3d,_0x5ce4e4,_0x2e3f9f){const _0x1dd1ff=_0x14e8f6;super(),this[_0x1dd1ff(0xc9)]=_0x42cbd0,this['_threadCommentModel']=_0x24ed3d,this['_userService']=_0x5ce4e4,this[_0x1dd1ff(0xef)]=_0x2e3f9f,this[_0x1dd1ff(0xf5)](),this[_0x1dd1ff(0x11d)]();}['_initUserSync'](){const _0xa92790=_0x14e8f6;this['disposeWithMe'](this[_0xa92790(0x126)][_0xa92790(0xf8)][_0xa92790(0xf1)](_0x390860(0x10))[_0xa92790(0xe1)](_0x50acd0=>{const _0xd46a63=_0xa92790,_0x341e26=new Set();_0x50acd0[_0xd46a63(0xc4)](_0x217e8d=>{const _0x40f8ae=_0xd46a63;switch(_0x217e8d[_0x40f8ae(0xca)]){case _0x40f8ae(0xc2):{const _0x41827d=_0x217e8d[_0x40f8ae(0xdc)][_0x40f8ae(0xeb)];_0x341e26[_0x40f8ae(0xc2)](_0x41827d);break;}}}),B(this[_0xd46a63(0xef)],_0x341e26);}));}[_0x14e8f6(0xf5)](){const _0x38fe3f=_0x14e8f6;this[_0x38fe3f(0x103)](this[_0x38fe3f(0xc9)][_0x38fe3f(0xf8)][_0x38fe3f(0xe1)](async _0x4fd38f=>{const _0x2afcbc=_0x38fe3f;var _0x4fa83d,_0x26eeb6,_0x2aa72e,_0x354d6d;const _0x601859=(_0x4fa83d=this[_0x2afcbc(0x126)][_0x2afcbc(0xdb)](_0x4fd38f[_0x2afcbc(0x117)])['find'](_0x446e5d=>_0x446e5d[_0x2afcbc(0x10e)]===_0x4fd38f[_0x2afcbc(0x10e)]))==null?void 0x0:_0x4fa83d[_0x2afcbc(0xd9)];if(!_0x601859)return;const {unitId:_0x221cd1,subUnitId:_0xee5ada}=_0x601859;switch(_0x4fd38f[_0x2afcbc(0x113)]&&this[_0x2afcbc(0x122)]['addUser'](_0x4fd38f['user']),_0x4fd38f[_0x2afcbc(0xca)]){case v['Add']:break;case v[_0x2afcbc(0x101)]:{this[_0x2afcbc(0x126)][_0x2afcbc(0x128)](_0x221cd1,_0xee5ada,{'unitId':_0x221cd1,'subUnitId':_0xee5ada,'ref':'','id':_0x4fd38f[_0x2afcbc(0xd3)],'dT':D(+_0x4fd38f['createTimestamp']),'threadId':_0x4fd38f[_0x2afcbc(0x10e)],'personId':(_0x2aa72e=(_0x26eeb6=_0x4fd38f[_0x2afcbc(0x113)])==null?void 0x0:_0x26eeb6['userID'])!=null?_0x2aa72e:_0x4fd38f[_0x2afcbc(0xcd)],'text':JSON[_0x2afcbc(0xed)](_0x4fd38f[_0x2afcbc(0xfb)]),'parentId':_0x601859['id']});break;}case v['Delete']:{const _0x318e51=this['_threadCommentModel']['getComment'](_0x221cd1,_0xee5ada,_0x4fd38f['replyId']);_0x318e51&&_0x318e51[_0x2afcbc(0x10c)]&&this[_0x2afcbc(0x126)][_0x2afcbc(0xe2)](_0x221cd1,_0xee5ada,_0x4fd38f[_0x2afcbc(0xd3)]);break;}case v[_0x2afcbc(0xc1)]:{this[_0x2afcbc(0x126)][_0x2afcbc(0xbe)](_0x221cd1,_0xee5ada,{'commentId':_0x4fd38f[_0x2afcbc(0xd3)],'text':JSON[_0x2afcbc(0xed)](_0x4fd38f['content'])});break;}case v[_0x2afcbc(0xbf)]:{const _0x458ba9=(_0x354d6d=this[_0x2afcbc(0x126)][_0x2afcbc(0xdb)](_0x4fd38f[_0x2afcbc(0x117)])[_0x2afcbc(0xd1)](_0x2d0026=>_0x2d0026['threadId']===_0x4fd38f['threadId']))==null?void 0x0:_0x354d6d[_0x2afcbc(0xd9)];_0x458ba9&&this[_0x2afcbc(0x126)][_0x2afcbc(0xc8)](_0x221cd1,_0xee5ada,_0x458ba9['id'],_0x4fd38f[_0x2afcbc(0xcb)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x59bc1b(_0x6346bf)),p(0x1,_0x59bc1b(_0x23d8a0)),p(0x2,_0x59bc1b(_0x44233a)),p(0x3,_0x59bc1b(_0x5ee519))],S);const z=_0x14e8f6(0xe0),M={};var k=Object[_0x14e8f6(0x10b)],Q=(_0x20ed71,_0x572fad,_0x49abcf,_0x3f6fbc)=>{for(var _0x13b9c8=_0x3f6fbc>0x1?void 0x0:_0x3f6fbc?k(_0x572fad,_0x49abcf):_0x572fad,_0x31dcc7=_0x20ed71['length']-0x1,_0x1bb3d6;_0x31dcc7>=0x0;_0x31dcc7--)(_0x1bb3d6=_0x20ed71[_0x31dcc7])&&(_0x13b9c8=_0x1bb3d6(_0x13b9c8)||_0x13b9c8);return _0x13b9c8;},_=(_0x3aced9,_0x2dc6c8)=>(_0x408e82,_0x1093c6)=>_0x2dc6c8(_0x408e82,_0x1093c6,_0x3aced9);function X(_0xe2cbb8,_0x14addc){const _0x427158=_0x14e8f6,_0x1c3b6b=_0xe2cbb8[_0x427158(0xf7)][0x0];return{..._0x14addc,'id':_0x1c3b6b[_0x427158(0xd3)],'resolved':_0xe2cbb8[_0x427158(0xcb)]===0x1,'dT':D(_0x1c3b6b[_0x427158(0x102)]),'personId':_0x1c3b6b[_0x427158(0xcd)],'threadId':_0x1c3b6b[_0x427158(0x10e)]};}function ee(_0x305687,_0x5ea6ba,_0x29aff7){const _0x9554fe=_0x14e8f6;var _0x110feb,_0x22a35e;if(((_0x22a35e=(_0x110feb=_0x305687==null?void 0x0:_0x305687['replies'])==null?void 0x0:_0x110feb[_0x9554fe(0xd6)])!=null?_0x22a35e:0x0)>0x0){const _0xc2ce31=(_0x4cb2dd,_0x3995bb)=>({'id':_0x4cb2dd['replyId'],'threadId':_0x4cb2dd[_0x9554fe(0x10e)],'dT':D(_0x4cb2dd[_0x9554fe(0x102)]),'personId':_0x4cb2dd[_0x9554fe(0xcd)],'resolved':_0x305687['solved']===I[_0x9554fe(0x104)],'unitId':_0x5ea6ba,'subUnitId':_0x29aff7,'text':JSON[_0x9554fe(0xed)](_0x4cb2dd['content']),'parentId':_0x3995bb}),_0x464e0b=_0xc2ce31(_0x305687[_0x9554fe(0xf7)][0x0]);return{..._0x464e0b,'children':_0x305687[_0x9554fe(0xf7)][_0x9554fe(0x110)](0x1)[_0x9554fe(0x105)](_0xf966cc=>_0xc2ce31(_0xf966cc,_0x464e0b['id']))};}return null;}let f=class{constructor(_0x20fce9,_0x11385d,_0x46f32b,_0x4854b4){const _0x3bc21f=_0x14e8f6;this[_0x3bc21f(0xc0)]=_0x20fce9,this[_0x3bc21f(0x122)]=_0x11385d,this[_0x3bc21f(0x124)]=_0x46f32b,this[_0x3bc21f(0xef)]=_0x4854b4;}async[_0x14e8f6(0x128)](_0x1851e4){const _0x1e6f03=_0x14e8f6;var _0x3ef62f,_0xb6fb58;const {parentId:_0x328a95,unitId:_0x468f6c,text:_0x25e55f,threadId:_0x558da0}=_0x1851e4,_0x309e67=(_0xb6fb58=(_0x3ef62f=_0x25e55f[_0x1e6f03(0x11b)])==null?void 0x0:_0x3ef62f[_0x1e6f03(0xc7)](_0x245dac=>_0x245dac[_0x1e6f03(0x114)]===_0x3d1118[_0x1e6f03(0x129)])[_0x1e6f03(0x105)](_0x457ca8=>_0x457ca8[_0x1e6f03(0xf6)]))!=null?_0xb6fb58:[],_0x326c60=JSON[_0x1e6f03(0xe6)](_0x25e55f),_0x512e66=(await this['_sessionService'][_0x1e6f03(0xde)](_0x468f6c))[_0x1e6f03(0xfe)]();if(_0x328a95){const _0x475578={'memberId':_0x512e66,'unitId':_0x468f6c,'content':_0x326c60,'mention':_0x309e67,'threadId':_0x558da0},_0x4172a6=(await this[_0x1e6f03(0xc0)][_0x1e6f03(0xd5)]('/universer-api/comment/unit/'+_0x468f6c+_0x1e6f03(0x121),{'body':_0x475578}))[_0x1e6f03(0xdf)][_0x1e6f03(0xf0)];return{..._0x1851e4,'id':_0x4172a6['replyId'],'dT':_0x47e258(+_0x4172a6['createTimestamp'])[_0x1e6f03(0x109)](_0x1e6f03(0x119)),'personId':_0x4172a6[_0x1e6f03(0xcd)]};}else{const _0x3b7587={'memberId':_0x512e66,'unitId':_0x468f6c,'content':_0x326c60,'mention':_0x309e67},_0x2d686b=await this['_httpService']['post'](_0x1e6f03(0xfa)+_0x468f6c+_0x1e6f03(0xda),{'body':_0x3b7587});return X(_0x2d686b[_0x1e6f03(0xdf)][_0x1e6f03(0x11c)],_0x1851e4);}}async['updateComment'](_0x4d0efc){const _0x3779b0=_0x14e8f6;var _0x4e2acc,_0xe849d6;const {text:_0x32c058,unitId:_0x184b7a}=_0x4d0efc,_0x166c3f=(_0xe849d6=(_0x4e2acc=_0x32c058['customRanges'])==null?void 0x0:_0x4e2acc[_0x3779b0(0xc7)](_0x6a6db2=>_0x6a6db2[_0x3779b0(0x114)]===_0x3d1118[_0x3779b0(0x129)])[_0x3779b0(0x105)](_0x5db9f5=>_0x5db9f5[_0x3779b0(0xf6)]))!=null?_0xe849d6:[],_0x50c451=JSON['stringify'](_0x32c058),_0x4e9ee4=_0x4d0efc[_0x3779b0(0x10e)],_0xada142=_0x4d0efc['id'],_0x423454={'memberId':(await this[_0x3779b0(0x124)]['requireSession'](_0x184b7a))[_0x3779b0(0xfe)](),'unitId':_0x184b7a,'threadId':_0x4e9ee4,'mention':_0x166c3f,'content':_0x50c451,'replyId':_0xada142},_0x4c3a38=await this[_0x3779b0(0xc0)][_0x3779b0(0xd5)](_0x3779b0(0xfa)+_0x184b7a+_0x3779b0(0xea),{'body':_0x423454});return!_0x4c3a38['body'][_0x3779b0(0xfc)]||_0x4c3a38['body'][_0x3779b0(0xfc)]['code']===0x1;}async[_0x14e8f6(0xc8)](_0x2a0fda){const _0x2a1630=_0x14e8f6,{unitId:_0x338ee6}=_0x2a0fda,_0x59efe2=_0x2a0fda['threadId'],_0x1c0d87={'memberId':this['_userService'][_0x2a1630(0x10d)]()[_0x2a1630(0x11e)],'unitId':_0x338ee6,'threadId':_0x59efe2,'solved':_0x2a0fda[_0x2a1630(0xe7)]?I['Solved']:I[_0x2a1630(0xe3)]},_0x160403=await this['_httpService'][_0x2a1630(0xd5)](_0x2a1630(0xfa)+_0x338ee6+_0x2a1630(0xce),{'body':_0x1c0d87});return!_0x160403['body']['error']||_0x160403['body'][_0x2a1630(0xfc)][_0x2a1630(0xf9)]===0x1;}async[_0x14e8f6(0xe2)](_0x4bbe02,_0x1f000e,_0x43eaa0,_0x41aa8c){const _0x2547b1=_0x14e8f6,_0xf17f68={'memberId':(await this[_0x2547b1(0x124)][_0x2547b1(0xde)](_0x4bbe02))['getMemberID'](),'threadId':_0x43eaa0,'replyId':_0x41aa8c,'unitId':_0x4bbe02},_0xa47529=await this[_0x2547b1(0xc0)][_0x2547b1(0xd5)](_0x2547b1(0xfa)+_0x4bbe02+'/delete',{'body':_0xf17f68});return!_0xa47529[_0x2547b1(0xdf)][_0x2547b1(0xfc)]||_0xa47529[_0x2547b1(0xdf)][_0x2547b1(0xfc)][_0x2547b1(0xf9)]===0x1;}async[_0x14e8f6(0x10f)](_0x1ad2ba,_0x1f4692,_0x15ea54){const _0x15e753=_0x14e8f6,_0x7829de={'unitId':_0x1ad2ba,'threadId':_0x15ea54},_0x36450b=await this['_httpService'][_0x15e753(0xd5)](_0x15e753(0xfa)+_0x1ad2ba+_0x15e753(0x106),{'body':_0x7829de}),_0x5e05a3=_0x15ea54[_0x15e753(0x105)](_0x5ab93c=>ee(_0x36450b[_0x15e753(0xdf)][_0x15e753(0x125)][_0x5ab93c],_0x1ad2ba,_0x1f4692))[_0x15e753(0xc7)](Boolean);return Object[_0x15e753(0xd0)](_0x36450b[_0x15e753(0xdf)][_0x15e753(0xe8)])[_0x15e753(0xc4)](_0x15d45e=>{const _0x54c674=_0x15e753;this[_0x54c674(0x122)][_0x54c674(0xff)](_0x15d45e);}),_0x5e05a3;}['saveCommentToSnapshot'](_0x4ed038){const _0x144f34=_0x14e8f6;return{'id':_0x4ed038['id'],'threadId':_0x4ed038[_0x144f34(0x10e)],'ref':_0x4ed038[_0x144f34(0x100)]};}};f=Q([_(0x0,_0x59bc1b(_0x5ae147)),_(0x1,_0x59bc1b(_0x44233a)),_(0x2,_0x59bc1b(_0x6db0c8)),_(0x3,_0x59bc1b(_0x5ee519))],f);var re=Object[_0x14e8f6(0x10b)],te=(_0x35451d,_0x25aa9b,_0x4eb219,_0x40a5b3)=>{const _0x2cefac=_0x14e8f6;for(var _0x2042e4=_0x40a5b3>0x1?void 0x0:_0x40a5b3?re(_0x25aa9b,_0x4eb219):_0x25aa9b,_0x5d4b81=_0x35451d[_0x2cefac(0xd6)]-0x1,_0x5efc5a;_0x5d4b81>=0x0;_0x5d4b81--)(_0x5efc5a=_0x35451d[_0x5d4b81])&&(_0x2042e4=_0x5efc5a(_0x2042e4)||_0x2042e4);return _0x2042e4;},N=(_0x53ef74,_0x2f595b)=>(_0x1d4661,_0x590e98)=>_0x2f595b(_0x1d4661,_0x590e98,_0x53ef74);let g=class extends _0x4a90c9{constructor(_0x1197db,_0x3b81d4){const _0x9ce958=_0x14e8f6;super(),this[_0x9ce958(0x11a)]=_0x1197db,this[_0x9ce958(0x127)]=_0x3b81d4,this[_0x9ce958(0x12a)]();}[_0x14e8f6(0x12a)](){const _0x179475=_0x14e8f6;this[_0x179475(0x11a)][_0x179475(0x10a)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x179475(0xc3)]=!0x1;}};function _0x2411(){const _0x1a0e82=['dataSource','getOwnPropertyDescriptor','parentId','getCurrentUser','threadId','listComments','slice','955NRmKPp','_config','user','rangeType','156YECbnn','/universer-api/user/list','unitId','2hXAWdx','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','customRanges','comment','_initUserSync','userID','onStarting','UNIVER_UNKNOWN','/reply','_userService','2743866aybfYS','_sessionService','comments','_threadCommentModel','_threadCommentDataSource','addComment','COMMENT','_initDataSource','updateComment','Solve','_httpService','Edit','add','syncUpdateMutationToColla','forEach','22960BkdIzD','onReady','filter','resolveComment','_commentService','type','solved','12218aLEqco','userId','/solved','Add','values','find','delete','replyId','478170JPEEaa','post','length','get','size','root','/add','getUnit','payload','UNRECOGNIZED','requireSession','body','thread-comment-data-source.config','subscribe','deleteComment','OpenOrReOpen','defineProperty','setConfig','stringify','resolved','users','12387XioJrk','/edit','personId','symbol','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','reply','pipe','2627376ltFMWH','Unknown','2079eJtcOz','_init','rangeId','replies','commentUpdate$','code','/universer-api/comment/unit/','content','error','Delete','getMemberID','addUser','ref','Reply','createTimestamp','disposeWithMe','Solved','map','/list','10986hLOMHH','_configService','format'];_0x2411=function(){return _0x1a0e82;};return _0x2411();}g=te([N(0x0,_0x1f38fa),N(0x1,_0x59bc1b(f))],g);var se=Object[_0x14e8f6(0xe4)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x43cb38,_0x1f3646,_0x42ea57)=>_0x1f3646 in _0x43cb38?se(_0x43cb38,_0x1f3646,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x42ea57}):_0x43cb38[_0x1f3646]=_0x42ea57,ie=(_0x375564,_0x1c0104,_0x51397b,_0x108c4f)=>{for(var _0x4d036e=_0x108c4f>0x1?void 0x0:_0x108c4f?oe(_0x1c0104,_0x51397b):_0x1c0104,_0x4a1f92=_0x375564['length']-0x1,_0x14238c;_0x4a1f92>=0x0;_0x4a1f92--)(_0x14238c=_0x375564[_0x4a1f92])&&(_0x4d036e=_0x14238c(_0x4d036e)||_0x4d036e);return _0x4d036e;},w=(_0x179abf,_0x153d70)=>(_0x16f650,_0x46cccf)=>_0x153d70(_0x16f650,_0x46cccf,_0x179abf),$=(_0x3ecd5,_0x2350f5,_0x4ace5b)=>ne(_0x3ecd5,typeof _0x2350f5!=_0x14e8f6(0xec)?_0x2350f5+'':_0x2350f5,_0x4ace5b);let b=class extends _0x41398f{constructor(_0x342318=M,_0x1801b8,_0x150ec8){const _0xc3e8ac=_0x14e8f6;super(),this[_0xc3e8ac(0x112)]=_0x342318,this['_injector']=_0x1801b8,this['_configService']=_0x150ec8;const {..._0x14cfbf}=_0xdfd847({},M,this['_config']);this[_0xc3e8ac(0x108)][_0xc3e8ac(0xe5)](z,_0x14cfbf);}[_0x14e8f6(0x11f)](){const _0x5cb8e6=_0x14e8f6;[[f],[g],[S]][_0x5cb8e6(0xc4)](_0x5459d8=>{const _0x297049=_0x5cb8e6;this[_0x297049(0xef)][_0x297049(0xc2)](_0x5459d8);});}[_0x14e8f6(0xc6)](){const _0xf28336=_0x14e8f6;this[_0xf28336(0xef)][_0xf28336(0xd7)](g),this['_injector'][_0xf28336(0xd7)](S);}};$(b,'pluginName',W),$(b,_0x14e8f6(0xca),_0x454a2c[_0x14e8f6(0x120)]),b=ie([_0x4be0bf(_0xce439,_0x281d67,_0x2fa253),w(0x1,_0x59bc1b(_0x5ee519)),w(0x2,_0x38206b)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x38c454,_0x3cb451){const _0x3abab8=_0x51b9,_0x59e857=_0x38c454();while(!![]){try{const _0x595050=-parseInt(_0x3abab8(0xf6))/0x1*(-parseInt(_0x3abab8(0x15c))/0x2)+-parseInt(_0x3abab8(0x147))/0x3+parseInt(_0x3abab8(0x161))/0x4+-parseInt(_0x3abab8(0x118))/0x5+parseInt(_0x3abab8(0xe4))/0x6*(parseInt(_0x3abab8(0x113))/0x7)+-parseInt(_0x3abab8(0x163))/0x8*(-parseInt(_0x3abab8(0x123))/0x9)+-parseInt(_0x3abab8(0x132))/0xa*(-parseInt(_0x3abab8(0xfe))/0xb);if(_0x595050===_0x3cb451)break;else _0x59e857['push'](_0x59e857['shift']());}catch(_0xfd7d98){_0x59e857['push'](_0x59e857['shift']());}}}(_0x39e8,0x28c9e),function(_0xbbba91,_0x10b99c){const _0x1c1dc5=_0x51b9;typeof exports==_0x1c1dc5(0x128)&&typeof module<'u'?_0x10b99c(exports,require(_0x1c1dc5(0x130)),require('@univerjs-pro/license'),require('@univerjs/core'),require(_0x1c1dc5(0x135)),require(_0x1c1dc5(0x15e)),require(_0x1c1dc5(0x126)),require(_0x1c1dc5(0x15a))):typeof define==_0x1c1dc5(0x10c)&&define[_0x1c1dc5(0x131)]?define([_0x1c1dc5(0x141),_0x1c1dc5(0x130),_0x1c1dc5(0x151),'@univerjs/core','@univerjs/thread-comment-ui',_0x1c1dc5(0x15e),_0x1c1dc5(0x126),_0x1c1dc5(0x15a)],_0x10b99c):(_0xbbba91=typeof globalThis<'u'?globalThis:_0xbbba91||self,_0x10b99c(_0xbbba91[_0x1c1dc5(0x14c)]={},_0xbbba91[_0x1c1dc5(0x13b)],_0xbbba91['UniverProLicense'],_0xbbba91[_0x1c1dc5(0x110)],_0xbbba91[_0x1c1dc5(0xec)],_0xbbba91['UniverThreadComment'],_0xbbba91['rxjs'],_0xbbba91[_0x1c1dc5(0x15d)]));}(this,function(_0x3394f9,_0x8faabb,_0x44b0ab,_0x18b9aa,_0x4e3a70,_0x526e02,_0x3035d1,_0x25117c){'use strict';const _0x22d2ae=_0x51b9;const _0x55248e=_0x22d2ae(0x11d);var _0x49cb3d=(_0x461212=>(_0x461212[_0x461212[_0x22d2ae(0x14d)]=0x0]=_0x22d2ae(0x14d),_0x461212[_0x461212[_0x22d2ae(0x114)]=0x1]=_0x22d2ae(0x114),_0x461212[_0x461212[_0x22d2ae(0xfc)]=-0x1]=_0x22d2ae(0xfc),_0x461212))(_0x49cb3d||{}),_0x257fd9=(_0x33573c=>(_0x33573c[_0x33573c[_0x22d2ae(0xe9)]=0x0]=_0x22d2ae(0xe9),_0x33573c[_0x33573c[_0x22d2ae(0xfa)]=0x1]=_0x22d2ae(0xfa),_0x33573c[_0x33573c[_0x22d2ae(0x11a)]=0x2]=_0x22d2ae(0x11a),_0x33573c[_0x33573c['Edit']=0x3]=_0x22d2ae(0xfb),_0x33573c[_0x33573c['Delete']=0x4]=_0x22d2ae(0x12f),_0x33573c[_0x33573c['Solve']=0x5]=_0x22d2ae(0x158),_0x33573c[_0x33573c[_0x22d2ae(0xfc)]=-0x1]='UNRECOGNIZED',_0x33573c))(_0x257fd9||{});const _0x4924c6=_0x414144=>_0x18b9aa[_0x22d2ae(0x13d)](new Date(+_0x414144))['format'](_0x22d2ae(0x104)),_0x28d784=async(_0x24bae1,_0x2e02a6)=>{const _0x29fcb6=_0x22d2ae,_0x2ef365=_0x24bae1[_0x29fcb6(0xe3)](_0x18b9aa['UserManagerService']),_0x4e1914=_0x24bae1[_0x29fcb6(0xe3)](_0x25117c[_0x29fcb6(0x109)]);_0x2e02a6['forEach'](_0x4dc104=>{const _0x32b93c=_0x29fcb6;_0x2ef365[_0x32b93c(0x134)](_0x4dc104)&&_0x2e02a6['delete'](_0x4dc104);}),_0x2e02a6[_0x29fcb6(0xf2)]&&(await _0x4e1914[_0x29fcb6(0xe3)](_0x29fcb6(0x125),{'params':{'userIDs':[..._0x2e02a6]}}))['body'][_0x29fcb6(0x166)]['forEach'](_0xb46884=>{const _0x52e01d=_0x29fcb6;_0xb46884&&_0x2ef365[_0x52e01d(0x138)](_0xb46884);});};var _0x1b726c=Object[_0x22d2ae(0x122)],_0x118a62=(_0x267180,_0x4c594f,_0x175908,_0x5c08c7)=>{for(var _0xfad790=_0x5c08c7>0x1?void 0x0:_0x5c08c7?_0x1b726c(_0x4c594f,_0x175908):_0x4c594f,_0x51043c=_0x267180['length']-0x1,_0x572414;_0x51043c>=0x0;_0x51043c--)(_0x572414=_0x267180[_0x51043c])&&(_0xfad790=_0x572414(_0xfad790)||_0xfad790);return _0xfad790;},_0x439bfa=(_0x143f1e,_0x16ce6b)=>(_0x246c21,_0x198c66)=>_0x16ce6b(_0x246c21,_0x198c66,_0x143f1e);let _0xa8af72=class extends _0x18b9aa[_0x22d2ae(0x10e)]{constructor(_0x5b36e5,_0x3f9637,_0x54f40b,_0x475a61){const _0x2cc3e4=_0x22d2ae;super(),this[_0x2cc3e4(0x119)]=_0x5b36e5,this[_0x2cc3e4(0x12d)]=_0x3f9637,this[_0x2cc3e4(0x108)]=_0x54f40b,this[_0x2cc3e4(0x137)]=_0x475a61,this[_0x2cc3e4(0x107)](),this[_0x2cc3e4(0x117)]();}[_0x22d2ae(0x117)](){const _0xe57727=_0x22d2ae;this[_0xe57727(0x162)](this[_0xe57727(0x12d)][_0xe57727(0x10d)]['pipe'](_0x3035d1[_0xe57727(0x116)](0x10))[_0xe57727(0xf7)](_0xca162=>{const _0x519888=_0xe57727,_0x4b151a=new Set();_0xca162[_0x519888(0xf5)](_0x1e6f50=>{const _0xfdac6d=_0x519888;switch(_0x1e6f50[_0xfdac6d(0x153)]){case'add':{const _0x78a81b=_0x1e6f50['payload'][_0xfdac6d(0x143)];_0x4b151a[_0xfdac6d(0x106)](_0x78a81b);break;}}}),_0x28d784(this[_0x519888(0x137)],_0x4b151a);}));}[_0x22d2ae(0x107)](){const _0x122c1c=_0x22d2ae;this[_0x122c1c(0x162)](this[_0x122c1c(0x119)][_0x122c1c(0x10d)][_0x122c1c(0xf7)](async _0x5c84aa=>{const _0x49d2ae=_0x122c1c;var _0x48c248,_0x3b1150,_0x55a93f,_0x5d00ac;const _0x3b8efd=(_0x48c248=this[_0x49d2ae(0x12d)][_0x49d2ae(0x11e)](_0x5c84aa[_0x49d2ae(0x121)])[_0x49d2ae(0x10f)](_0x4fde9c=>_0x4fde9c[_0x49d2ae(0xef)]===_0x5c84aa[_0x49d2ae(0xef)]))==null?void 0x0:_0x48c248[_0x49d2ae(0x149)];if(!_0x3b8efd)return;const {unitId:_0x105417,subUnitId:_0x226908}=_0x3b8efd;switch(_0x5c84aa[_0x49d2ae(0x145)]&&this[_0x49d2ae(0x108)]['addUser'](_0x5c84aa[_0x49d2ae(0x145)]),_0x5c84aa['type']){case _0x257fd9['Add']:break;case _0x257fd9[_0x49d2ae(0x11a)]:{this[_0x49d2ae(0x12d)]['addComment'](_0x105417,_0x226908,{'unitId':_0x105417,'subUnitId':_0x226908,'ref':'','id':_0x5c84aa[_0x49d2ae(0x115)],'dT':_0x4924c6(+_0x5c84aa[_0x49d2ae(0x139)]),'threadId':_0x5c84aa[_0x49d2ae(0xef)],'personId':(_0x55a93f=(_0x3b1150=_0x5c84aa[_0x49d2ae(0x145)])==null?void 0x0:_0x3b1150['userID'])!=null?_0x55a93f:_0x5c84aa['userId'],'text':JSON[_0x49d2ae(0x103)](_0x5c84aa[_0x49d2ae(0x152)]),'parentId':_0x3b8efd['id']});break;}case _0x257fd9[_0x49d2ae(0x12f)]:{const _0x1d61ab=this[_0x49d2ae(0x12d)][_0x49d2ae(0x102)](_0x105417,_0x226908,_0x5c84aa['replyId']);_0x1d61ab&&_0x1d61ab[_0x49d2ae(0xf0)]&&this[_0x49d2ae(0x12d)]['deleteComment'](_0x105417,_0x226908,_0x5c84aa[_0x49d2ae(0x115)]);break;}case _0x257fd9[_0x49d2ae(0xfb)]:{this['_threadCommentModel']['updateComment'](_0x105417,_0x226908,{'commentId':_0x5c84aa[_0x49d2ae(0x115)],'text':JSON['parse'](_0x5c84aa[_0x49d2ae(0x152)])});break;}case _0x257fd9['Solve']:{const _0x16bc06=(_0x5d00ac=this[_0x49d2ae(0x12d)][_0x49d2ae(0x11e)](_0x5c84aa[_0x49d2ae(0x121)])['find'](_0x47f46d=>_0x47f46d[_0x49d2ae(0xef)]===_0x5c84aa[_0x49d2ae(0xef)]))==null?void 0x0:_0x5d00ac['root'];_0x16bc06&&this[_0x49d2ae(0x12d)][_0x49d2ae(0x164)](_0x105417,_0x226908,_0x16bc06['id'],_0x5c84aa[_0x49d2ae(0x12a)]===_0x49cb3d['Solved']);break;}}}));}};_0xa8af72=_0x118a62([_0x439bfa(0x0,_0x18b9aa[_0x22d2ae(0xe8)](_0x8faabb[_0x22d2ae(0x11f)])),_0x439bfa(0x1,_0x18b9aa[_0x22d2ae(0xe8)](_0x526e02['ThreadCommentModel'])),_0x439bfa(0x2,_0x18b9aa[_0x22d2ae(0xe8)](_0x18b9aa[_0x22d2ae(0x11c)])),_0x439bfa(0x3,_0x18b9aa[_0x22d2ae(0xe8)](_0x18b9aa['Injector']))],_0xa8af72);const _0x4cd660=_0x22d2ae(0x127),_0x227aa6={};var _0x4f1ac6=Object[_0x22d2ae(0x122)],_0x4e3445=(_0x3d9481,_0x19e051,_0xcbf485,_0xa2f468)=>{const _0xf3b973=_0x22d2ae;for(var _0x5e0cd1=_0xa2f468>0x1?void 0x0:_0xa2f468?_0x4f1ac6(_0x19e051,_0xcbf485):_0x19e051,_0x4d06d9=_0x3d9481[_0xf3b973(0x14f)]-0x1,_0x4612e1;_0x4d06d9>=0x0;_0x4d06d9--)(_0x4612e1=_0x3d9481[_0x4d06d9])&&(_0x5e0cd1=_0x4612e1(_0x5e0cd1)||_0x5e0cd1);return _0x5e0cd1;},_0x1dcdbf=(_0x19a49d,_0x4ea6f9)=>(_0x45b1f0,_0x20cdb9)=>_0x4ea6f9(_0x45b1f0,_0x20cdb9,_0x19a49d);function _0x1e8991(_0x139387,_0x3b7f7c){const _0x2cee6e=_0x22d2ae,_0x384a93=_0x139387[_0x2cee6e(0x100)][0x0];return{..._0x3b7f7c,'id':_0x384a93[_0x2cee6e(0x115)],'resolved':_0x139387['solved']===0x1,'dT':_0x4924c6(_0x384a93[_0x2cee6e(0x139)]),'personId':_0x384a93[_0x2cee6e(0x14e)],'threadId':_0x384a93[_0x2cee6e(0xef)]};}function _0x1503f5(_0x3dd7fa,_0x492986,_0x65e142){const _0x3bf5aa=_0x22d2ae;var _0x2237cf,_0x5ec946;if(((_0x5ec946=(_0x2237cf=_0x3dd7fa==null?void 0x0:_0x3dd7fa[_0x3bf5aa(0x100)])==null?void 0x0:_0x2237cf[_0x3bf5aa(0x14f)])!=null?_0x5ec946:0x0)>0x0){const _0x13c939=(_0x90cf39,_0x587e8a)=>({'id':_0x90cf39[_0x3bf5aa(0x115)],'threadId':_0x90cf39[_0x3bf5aa(0xef)],'dT':_0x4924c6(_0x90cf39['createTimestamp']),'personId':_0x90cf39[_0x3bf5aa(0x14e)],'resolved':_0x3dd7fa[_0x3bf5aa(0x12a)]===_0x49cb3d[_0x3bf5aa(0x114)],'unitId':_0x492986,'subUnitId':_0x65e142,'text':JSON['parse'](_0x90cf39[_0x3bf5aa(0x152)]),'parentId':_0x587e8a}),_0x532571=_0x13c939(_0x3dd7fa[_0x3bf5aa(0x100)][0x0]);return{..._0x532571,'children':_0x3dd7fa['replies'][_0x3bf5aa(0x156)](0x1)[_0x3bf5aa(0xed)](_0x27bd35=>_0x13c939(_0x27bd35,_0x532571['id']))};}return null;}let _0x16e0db=class{constructor(_0x7a3b9e,_0x596215,_0x1c5efc,_0x3aaeca){const _0x4eb333=_0x22d2ae;this[_0x4eb333(0x160)]=_0x7a3b9e,this[_0x4eb333(0x108)]=_0x596215,this[_0x4eb333(0x157)]=_0x1c5efc,this[_0x4eb333(0x137)]=_0x3aaeca;}async[_0x22d2ae(0x13c)](_0x2b8aa9){const _0xabe5ce=_0x22d2ae;var _0x44eaf5,_0x2e2daf;const {parentId:_0x2f6f48,unitId:_0x417237,text:_0x4dd1c4,threadId:_0x59235e}=_0x2b8aa9,_0x1fc414=(_0x2e2daf=(_0x44eaf5=_0x4dd1c4['customRanges'])==null?void 0x0:_0x44eaf5['filter'](_0x394c57=>_0x394c57[_0xabe5ce(0x120)]===_0x18b9aa['CustomRangeType'][_0xabe5ce(0x169)])[_0xabe5ce(0xed)](_0x1ebbd6=>_0x1ebbd6[_0xabe5ce(0x136)]))!=null?_0x2e2daf:[],_0x5472fd=JSON[_0xabe5ce(0x105)](_0x4dd1c4),_0x43f7d1=(await this[_0xabe5ce(0x157)][_0xabe5ce(0xf1)](_0x417237))[_0xabe5ce(0x167)]();if(_0x2f6f48){const _0x45bd19={'memberId':_0x43f7d1,'unitId':_0x417237,'content':_0x5472fd,'mention':_0x1fc414,'threadId':_0x59235e},_0x2e1da2=(await this[_0xabe5ce(0x160)][_0xabe5ce(0x140)](_0xabe5ce(0x154)+_0x417237+_0xabe5ce(0xe6),{'body':_0x45bd19}))[_0xabe5ce(0x133)]['reply'];return{..._0x2b8aa9,'id':_0x2e1da2['replyId'],'dT':_0x18b9aa[_0xabe5ce(0x13d)](+_0x2e1da2[_0xabe5ce(0x139)])[_0xabe5ce(0x144)](_0xabe5ce(0x104)),'personId':_0x2e1da2[_0xabe5ce(0x14e)]};}else{const _0x4867e5={'memberId':_0x43f7d1,'unitId':_0x417237,'content':_0x5472fd,'mention':_0x1fc414},_0x362d03=await this[_0xabe5ce(0x160)][_0xabe5ce(0x140)](_0xabe5ce(0x154)+_0x417237+_0xabe5ce(0x10a),{'body':_0x4867e5});return _0x1e8991(_0x362d03[_0xabe5ce(0x133)]['comment'],_0x2b8aa9);}}async[_0x22d2ae(0xee)](_0x5e4141){const _0x247504=_0x22d2ae;var _0x5bb31c,_0x3fece7;const {text:_0x1d81a3,unitId:_0x48e506}=_0x5e4141,_0x2cb2e2=(_0x3fece7=(_0x5bb31c=_0x1d81a3[_0x247504(0x168)])==null?void 0x0:_0x5bb31c[_0x247504(0xff)](_0x4747cd=>_0x4747cd[_0x247504(0x120)]===_0x18b9aa['CustomRangeType'][_0x247504(0x169)])[_0x247504(0xed)](_0x209b58=>_0x209b58[_0x247504(0x136)]))!=null?_0x3fece7:[],_0x4094c5=JSON[_0x247504(0x105)](_0x1d81a3),_0x5f1bb9=_0x5e4141[_0x247504(0xef)],_0x596e85=_0x5e4141['id'],_0x5cfc12={'memberId':(await this['_sessionService'][_0x247504(0xf1)](_0x48e506))[_0x247504(0x167)](),'unitId':_0x48e506,'threadId':_0x5f1bb9,'mention':_0x2cb2e2,'content':_0x4094c5,'replyId':_0x596e85},_0x43f8fb=await this[_0x247504(0x160)][_0x247504(0x140)]('/universer-api/comment/unit/'+_0x48e506+_0x247504(0x15b),{'body':_0x5cfc12});return!_0x43f8fb['body'][_0x247504(0x10b)]||_0x43f8fb['body']['error'][_0x247504(0xf3)]===0x1;}async[_0x22d2ae(0x164)](_0x29dd37){const _0x59be11=_0x22d2ae,{unitId:_0x1bde37}=_0x29dd37,_0x5d4987=_0x29dd37[_0x59be11(0xef)],_0x1b19ad={'memberId':this[_0x59be11(0x108)]['getCurrentUser']()[_0x59be11(0x11b)],'unitId':_0x1bde37,'threadId':_0x5d4987,'solved':_0x29dd37['resolved']?_0x49cb3d[_0x59be11(0x114)]:_0x49cb3d[_0x59be11(0x14d)]},_0x27829e=await this[_0x59be11(0x160)][_0x59be11(0x140)](_0x59be11(0x154)+_0x1bde37+_0x59be11(0x12e),{'body':_0x1b19ad});return!_0x27829e[_0x59be11(0x133)][_0x59be11(0x10b)]||_0x27829e[_0x59be11(0x133)]['error'][_0x59be11(0xf3)]===0x1;}async[_0x22d2ae(0x129)](_0x42777f,_0x32ddc1,_0x569892,_0x3a3758){const _0x54c02f=_0x22d2ae,_0x3579f9={'memberId':(await this['_sessionService']['requireSession'](_0x42777f))[_0x54c02f(0x167)](),'threadId':_0x569892,'replyId':_0x3a3758,'unitId':_0x42777f},_0x4587c1=await this['_httpService'][_0x54c02f(0x140)](_0x54c02f(0x154)+_0x42777f+_0x54c02f(0x159),{'body':_0x3579f9});return!_0x4587c1[_0x54c02f(0x133)][_0x54c02f(0x10b)]||_0x4587c1[_0x54c02f(0x133)][_0x54c02f(0x10b)][_0x54c02f(0xf3)]===0x1;}async[_0x22d2ae(0x146)](_0x31644f,_0xf8f693,_0x3f9fb8){const _0x1a5d13=_0x22d2ae,_0x56653b={'unitId':_0x31644f,'threadId':_0x3f9fb8},_0x24e36f=await this[_0x1a5d13(0x160)]['post'](_0x1a5d13(0x154)+_0x31644f+_0x1a5d13(0x150),{'body':_0x56653b}),_0x157563=_0x3f9fb8['map'](_0x33be2b=>_0x1503f5(_0x24e36f['body'][_0x1a5d13(0x14a)][_0x33be2b],_0x31644f,_0xf8f693))[_0x1a5d13(0xff)](Boolean);return Object[_0x1a5d13(0x155)](_0x24e36f[_0x1a5d13(0x133)][_0x1a5d13(0x166)])['forEach'](_0x4d5b1c=>{const _0x4ff833=_0x1a5d13;this['_userService'][_0x4ff833(0x138)](_0x4d5b1c);}),_0x157563;}['saveCommentToSnapshot'](_0x34df5f){const _0xf7f1b1=_0x22d2ae;return{'id':_0x34df5f['id'],'threadId':_0x34df5f[_0xf7f1b1(0xef)],'ref':_0x34df5f['ref']};}};_0x16e0db=_0x4e3445([_0x1dcdbf(0x0,_0x18b9aa[_0x22d2ae(0xe8)](_0x25117c[_0x22d2ae(0x109)])),_0x1dcdbf(0x1,_0x18b9aa[_0x22d2ae(0xe8)](_0x18b9aa[_0x22d2ae(0x11c)])),_0x1dcdbf(0x2,_0x18b9aa[_0x22d2ae(0xe8)](_0x8faabb[_0x22d2ae(0x14b)])),_0x1dcdbf(0x3,_0x18b9aa[_0x22d2ae(0xe8)](_0x18b9aa[_0x22d2ae(0x13a)]))],_0x16e0db);var _0x3b6f83=Object[_0x22d2ae(0x122)],_0x565574=(_0x5dad3b,_0x53eab3,_0x122070,_0x3a1994)=>{const _0x3978e2=_0x22d2ae;for(var _0x863cc0=_0x3a1994>0x1?void 0x0:_0x3a1994?_0x3b6f83(_0x53eab3,_0x122070):_0x53eab3,_0x276d98=_0x5dad3b[_0x3978e2(0x14f)]-0x1,_0x21ba69;_0x276d98>=0x0;_0x276d98--)(_0x21ba69=_0x5dad3b[_0x276d98])&&(_0x863cc0=_0x21ba69(_0x863cc0)||_0x863cc0);return _0x863cc0;},_0x41be6d=(_0x4d8efe,_0x1cfaf7)=>(_0x33deb4,_0x2e5f86)=>_0x1cfaf7(_0x33deb4,_0x2e5f86,_0x4d8efe);let _0x5b3610=class extends _0x18b9aa['Disposable']{constructor(_0x178e66,_0x3823ad){const _0x2794e8=_0x22d2ae;super(),this[_0x2794e8(0x12c)]=_0x178e66,this[_0x2794e8(0x111)]=_0x3823ad,this['_initDataSource']();}[_0x22d2ae(0x12b)](){const _0x293f0c=_0x22d2ae;this[_0x293f0c(0x12c)][_0x293f0c(0xe5)]=this['_threadCommentDataSource'],this[_0x293f0c(0x12c)]['syncUpdateMutationToColla']=!0x1;}};_0x5b3610=_0x565574([_0x41be6d(0x0,_0x526e02['IThreadCommentDataSourceService']),_0x41be6d(0x1,_0x18b9aa[_0x22d2ae(0xe8)](_0x16e0db))],_0x5b3610);var _0x96ddc=Object['defineProperty'],_0x32ac70=Object['getOwnPropertyDescriptor'],_0x47ae7a=(_0x523e73,_0x2f35e7,_0x38410d)=>_0x2f35e7 in _0x523e73?_0x96ddc(_0x523e73,_0x2f35e7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x38410d}):_0x523e73[_0x2f35e7]=_0x38410d,_0xba4127=(_0x4b4ce0,_0x57db33,_0x99a90d,_0x266df7)=>{const _0xa6de5b=_0x22d2ae;for(var _0x5b65af=_0x266df7>0x1?void 0x0:_0x266df7?_0x32ac70(_0x57db33,_0x99a90d):_0x57db33,_0x53768a=_0x4b4ce0[_0xa6de5b(0x14f)]-0x1,_0x4c693c;_0x53768a>=0x0;_0x53768a--)(_0x4c693c=_0x4b4ce0[_0x53768a])&&(_0x5b65af=_0x4c693c(_0x5b65af)||_0x5b65af);return _0x5b65af;},_0x3ea438=(_0x4aa23c,_0x41122d)=>(_0x2cfa55,_0xbc494b)=>_0x41122d(_0x2cfa55,_0xbc494b,_0x4aa23c),_0x160394=(_0x373750,_0xbbc6b1,_0x27aab2)=>_0x47ae7a(_0x373750,typeof _0xbbc6b1!=_0x22d2ae(0xf8)?_0xbbc6b1+'':_0xbbc6b1,_0x27aab2);_0x3394f9[_0x22d2ae(0xfd)]=class extends _0x18b9aa[_0x22d2ae(0xea)]{constructor(_0x4b6175=_0x227aa6,_0x2b3b28,_0x521d18){const _0x44e700=_0x22d2ae;super(),this['_config']=_0x4b6175,this[_0x44e700(0x137)]=_0x2b3b28,this[_0x44e700(0xf9)]=_0x521d18;const {..._0x57644a}=_0x18b9aa['merge']({},_0x227aa6,this['_config']);this['_configService'][_0x44e700(0x165)](_0x4cd660,_0x57644a);}[_0x22d2ae(0xeb)](){const _0x25393d=_0x22d2ae;[[_0x16e0db],[_0x5b3610],[_0xa8af72]][_0x25393d(0xf5)](_0x102344=>{const _0x2d78db=_0x25393d;this[_0x2d78db(0x137)][_0x2d78db(0x106)](_0x102344);});}[_0x22d2ae(0x142)](){const _0x25578d=_0x22d2ae;this[_0x25578d(0x137)][_0x25578d(0xe3)](_0x5b3610),this['_injector'][_0x25578d(0xe3)](_0xa8af72);}},_0x160394(_0x3394f9[_0x22d2ae(0xfd)],_0x22d2ae(0xe7),_0x55248e),_0x160394(_0x3394f9[_0x22d2ae(0xfd)],_0x22d2ae(0x153),_0x18b9aa[_0x22d2ae(0x13f)][_0x22d2ae(0x148)]),_0x3394f9[_0x22d2ae(0xfd)]=_0xba4127([_0x18b9aa[_0x22d2ae(0x15f)](_0x4e3a70[_0x22d2ae(0x124)],_0x8faabb['UniverCollaborationClientPlugin'],_0x44b0ab['UniverLicensePlugin']),_0x3ea438(0x1,_0x18b9aa['Inject'](_0x18b9aa[_0x22d2ae(0x13a)])),_0x3ea438(0x2,_0x18b9aa[_0x22d2ae(0xf4)])],_0x3394f9[_0x22d2ae(0xfd)]),Object[_0x22d2ae(0x112)](_0x3394f9,Symbol[_0x22d2ae(0x13e)],{'value':_0x22d2ae(0x101)});}));function _0x51b9(_0x4e63e8,_0x195b0b){const _0x39e871=_0x39e8();return _0x51b9=function(_0x51b912,_0x33c708){_0x51b912=_0x51b912-0xe3;let _0x5882fe=_0x39e871[_0x51b912];return _0x5882fe;},_0x51b9(_0x4e63e8,_0x195b0b);}function _0x39e8(){const _0x5efe35=['571404jQJbsT','disposeWithMe','8vkRhxA','resolveComment','setConfig','users','getMemberID','customRanges','COMMENT','get','7950PZlqbo','dataSource','/reply','pluginName','Inject','Unknown','Plugin','onStarting','UniverThreadCommentUi','map','updateComment','threadId','parentId','requireSession','size','code','IConfigService','forEach','170509QxWLCz','subscribe','symbol','_configService','Add','Edit','UNRECOGNIZED','UniverThreadCommentDataSourcePlugin','33hPXEBl','filter','replies','Module','getComment','parse','YYYY/MM/DD\x20HH:mm','stringify','add','_init','_userService','HTTPService','/add','error','function','commentUpdate$','Disposable','find','UniverCore','_threadCommentDataSource','defineProperty','378dnLQlX','Solved','replyId','bufferTime','_initUserSync','677265QciynP','_commentService','Reply','userID','UserManagerService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getUnit','CommentService','rangeType','unitId','getOwnPropertyDescriptor','3303JFiAwh','UniverThreadCommentUIPlugin','/universer-api/user/list','rxjs','thread-comment-data-source.config','object','deleteComment','solved','_initDataSource','_threadCommentDataSourceService','_threadCommentModel','/solved','Delete','@univerjs-pro/collaboration-client','amd','525530QRqZsJ','body','getUser','@univerjs/thread-comment-ui','rangeId','_injector','addUser','createTimestamp','Injector','UniverProCollaborationClient','addComment','dayjs','toStringTag','UniverInstanceType','post','exports','onReady','personId','format','user','listComments','721239LnwMSq','UNIVER_UNKNOWN','root','comments','CollaborationSessionService','UniverProThreadCommentDatasource','OpenOrReOpen','userId','length','/list','@univerjs-pro/license','content','type','/universer-api/comment/unit/','values','slice','_sessionService','Solve','/delete','@univerjs/network','/edit','2sfjgPs','UniverNetwork','@univerjs/thread-comment','DependentOn','_httpService'];_0x39e8=function(){return _0x5efe35;};return _0x39e8();}
1
+ function _0x246c(_0x3defc2,_0x4afd9e){const _0x38da22=_0x38da();return _0x246c=function(_0x246c25,_0xccc5d3){_0x246c25=_0x246c25-0xe2;let _0x3c5cab=_0x38da22[_0x246c25];return _0x3c5cab;},_0x246c(_0x3defc2,_0x4afd9e);}function _0x38da(){const _0x1990a0=['UniverProCollaborationClient','UNIVER_UNKNOWN','/edit','Unknown','11FZpYVU','values','deleteComment','getComment','getUser','IThreadCommentDataSourceService','UniverInstanceType','bufferTime','49703GfHtRf','solved','5608cfhnji','27704724yNZnRc','@univerjs-pro/collaboration-client','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','8ziojMR','onReady','_threadCommentDataSource','DependentOn','getCurrentUser','dataSource','code','UniverThreadCommentUi','addUser','UniverProLicense','reply','_initUserSync','Plugin','_httpService','_threadCommentDataSourceService','resolveComment','object','pipe','disposeWithMe','/universer-api/user/list','ref','386406YyFrqM','OpenOrReOpen','ThreadCommentModel','forEach','personId','_sessionService','Delete','rxjs','/list','defineProperty','saveCommentToSnapshot','getMemberID','@univerjs/network','createTimestamp','delete','parse','syncUpdateMutationToColla','/solved','/universer-api/comment/unit/','content','UniverThreadCommentUIPlugin','map','UniverThreadCommentDataSourcePlugin','userId','symbol','_userService','threadId','COMMENT','Inject','filter','/add','CommentService','format','commentUpdate$','_threadCommentModel','UNRECOGNIZED','_configService','comment','Solved','merge','Module','amd','UniverThreadComment','resolved','6134330mgmwua','getUnit','payload','673830kOocEy','Add','HTTPService','@univerjs/thread-comment','slice','root','find','customRanges','YYYY/MM/DD\x20HH:mm','addComment','Disposable','listComments','Reply','UniverCore','length','userID','get','type','77VBSyME','body','stringify','CustomRangeType','_init','replyId','unitId','rangeType','Edit','user','/reply','comments','_injector','2612538HvFvIB','post','6cDLHqN','_commentService','exports','UserManagerService','UniverNetwork','Injector','rangeId','subscribe','dayjs','9783FetaTW','Solve','error','updateComment','@univerjs-pro/license','add','@univerjs/thread-comment-ui','requireSession','size','getOwnPropertyDescriptor','users'];_0x38da=function(){return _0x1990a0;};return _0x38da();}(function(_0x5bd4f0,_0x213df5){const _0x40218a=_0x246c,_0x4101b2=_0x5bd4f0();while(!![]){try{const _0x20b4c2=parseInt(_0x40218a(0x141))/0x1*(-parseInt(_0x40218a(0x121))/0x2)+-parseInt(_0x40218a(0x11f))/0x3+-parseInt(_0x40218a(0x148))/0x4*(parseInt(_0x40218a(0x100))/0x5)+parseInt(_0x40218a(0x15d))/0x6*(-parseInt(_0x40218a(0x112))/0x7)+-parseInt(_0x40218a(0x143))/0x8*(-parseInt(_0x40218a(0x12a))/0x9)+-parseInt(_0x40218a(0xfd))/0xa+parseInt(_0x40218a(0x139))/0xb*(parseInt(_0x40218a(0x144))/0xc);if(_0x20b4c2===_0x213df5)break;else _0x4101b2['push'](_0x4101b2['shift']());}catch(_0x510dae){_0x4101b2['push'](_0x4101b2['shift']());}}}(_0x38da,0x70277),function(_0x6043f9,_0x45fb63){const _0x48ec58=_0x246c;typeof exports==_0x48ec58(0x158)&&typeof module<'u'?_0x45fb63(exports,require('@univerjs-pro/collaboration-client'),require(_0x48ec58(0x12e)),require('@univerjs/core'),require(_0x48ec58(0x130)),require('@univerjs/thread-comment'),require(_0x48ec58(0x164)),require(_0x48ec58(0x169))):typeof define=='function'&&define[_0x48ec58(0xfa)]?define([_0x48ec58(0x123),_0x48ec58(0x145),_0x48ec58(0x12e),'@univerjs/core',_0x48ec58(0x130),_0x48ec58(0x103),_0x48ec58(0x164),_0x48ec58(0x169)],_0x45fb63):(_0x6043f9=typeof globalThis<'u'?globalThis:_0x6043f9||self,_0x45fb63(_0x6043f9['UniverProThreadCommentDatasource']={},_0x6043f9[_0x48ec58(0x135)],_0x6043f9[_0x48ec58(0x151)],_0x6043f9[_0x48ec58(0x10d)],_0x6043f9[_0x48ec58(0x14f)],_0x6043f9[_0x48ec58(0xfb)],_0x6043f9[_0x48ec58(0x164)],_0x6043f9[_0x48ec58(0x125)]));}(this,function(_0x583ef1,_0x2e266b,_0x11f360,_0x208443,_0x2f4e2e,_0x195a9a,_0x306e6b,_0x2e4d72){'use strict';const _0x1da00a=_0x246c;const _0x36ea8d=_0x1da00a(0x147);var _0x4ea4ca=(_0x172f68=>(_0x172f68[_0x172f68['OpenOrReOpen']=0x0]=_0x1da00a(0x15e),_0x172f68[_0x172f68[_0x1da00a(0xf7)]=0x1]=_0x1da00a(0xf7),_0x172f68[_0x172f68[_0x1da00a(0xf4)]=-0x1]=_0x1da00a(0xf4),_0x172f68))(_0x4ea4ca||{}),_0x45d2dd=(_0x317a96=>(_0x317a96[_0x317a96[_0x1da00a(0x138)]=0x0]='Unknown',_0x317a96[_0x317a96['Add']=0x1]=_0x1da00a(0x101),_0x317a96[_0x317a96[_0x1da00a(0x10c)]=0x2]=_0x1da00a(0x10c),_0x317a96[_0x317a96[_0x1da00a(0x11a)]=0x3]=_0x1da00a(0x11a),_0x317a96[_0x317a96[_0x1da00a(0x163)]=0x4]='Delete',_0x317a96[_0x317a96[_0x1da00a(0x12b)]=0x5]=_0x1da00a(0x12b),_0x317a96[_0x317a96[_0x1da00a(0xf4)]=-0x1]=_0x1da00a(0xf4),_0x317a96))(_0x45d2dd||{});const _0x5392f0=_0x215fc1=>_0x208443[_0x1da00a(0x129)](new Date(+_0x215fc1))[_0x1da00a(0xf1)]('YYYY/MM/DD\x20HH:mm'),_0x3e9aa4=async(_0x28c4fc,_0x1bbb77)=>{const _0x58977e=_0x1da00a,_0x3a3732=_0x28c4fc[_0x58977e(0x110)](_0x208443[_0x58977e(0x124)]),_0x34b877=_0x28c4fc[_0x58977e(0x110)](_0x2e4d72[_0x58977e(0x102)]);_0x1bbb77[_0x58977e(0x160)](_0x45a695=>{const _0x5c5b70=_0x58977e;_0x3a3732[_0x5c5b70(0x13d)](_0x45a695)&&_0x1bbb77[_0x5c5b70(0x16b)](_0x45a695);}),_0x1bbb77[_0x58977e(0x132)]&&(await _0x34b877[_0x58977e(0x110)](_0x58977e(0x15b),{'params':{'userIDs':[..._0x1bbb77]}}))['body'][_0x58977e(0x134)][_0x58977e(0x160)](_0x51a145=>{_0x51a145&&_0x3a3732['addUser'](_0x51a145);});};var _0x7b1aae=Object[_0x1da00a(0x133)],_0xab3793=(_0xb3df,_0x4ff128,_0x57275c,_0x16708c)=>{const _0x53db84=_0x1da00a;for(var _0x544424=_0x16708c>0x1?void 0x0:_0x16708c?_0x7b1aae(_0x4ff128,_0x57275c):_0x4ff128,_0x43ca07=_0xb3df[_0x53db84(0x10e)]-0x1,_0x3ad77b;_0x43ca07>=0x0;_0x43ca07--)(_0x3ad77b=_0xb3df[_0x43ca07])&&(_0x544424=_0x3ad77b(_0x544424)||_0x544424);return _0x544424;},_0x34a507=(_0x4941cb,_0x1cf498)=>(_0x4c13fe,_0x2240ac)=>_0x1cf498(_0x4c13fe,_0x2240ac,_0x4941cb);let _0x2dbee5=class extends _0x208443[_0x1da00a(0x10a)]{constructor(_0x40ba21,_0x143e54,_0x271992,_0x12fed0){const _0x270729=_0x1da00a;super(),this['_commentService']=_0x40ba21,this['_threadCommentModel']=_0x143e54,this[_0x270729(0xea)]=_0x271992,this['_injector']=_0x12fed0,this[_0x270729(0x116)](),this[_0x270729(0x153)]();}[_0x1da00a(0x153)](){const _0x46d136=_0x1da00a;this[_0x46d136(0x15a)](this[_0x46d136(0xf3)][_0x46d136(0xf2)][_0x46d136(0x159)](_0x306e6b[_0x46d136(0x140)](0x10))[_0x46d136(0x128)](_0x1eafca=>{const _0x427f8b=_0x46d136,_0x7e6443=new Set();_0x1eafca[_0x427f8b(0x160)](_0x269ca2=>{const _0x1c7430=_0x427f8b;switch(_0x269ca2[_0x1c7430(0x111)]){case'add':{const _0x538ee4=_0x269ca2[_0x1c7430(0xff)][_0x1c7430(0x161)];_0x7e6443[_0x1c7430(0x12f)](_0x538ee4);break;}}}),_0x3e9aa4(this[_0x427f8b(0x11e)],_0x7e6443);}));}[_0x1da00a(0x116)](){const _0x5f8f62=_0x1da00a;this[_0x5f8f62(0x15a)](this[_0x5f8f62(0x122)][_0x5f8f62(0xf2)][_0x5f8f62(0x128)](async _0x80c35c=>{const _0x1135fd=_0x5f8f62;var _0x56bcba,_0x4b1355,_0x22c527,_0x1f86b5;const _0x5ccd78=(_0x56bcba=this[_0x1135fd(0xf3)]['getUnit'](_0x80c35c[_0x1135fd(0x118)])[_0x1135fd(0x106)](_0x45ddc8=>_0x45ddc8[_0x1135fd(0xeb)]===_0x80c35c[_0x1135fd(0xeb)]))==null?void 0x0:_0x56bcba[_0x1135fd(0x105)];if(!_0x5ccd78)return;const {unitId:_0x4f29ad,subUnitId:_0x31702f}=_0x5ccd78;switch(_0x80c35c[_0x1135fd(0x11b)]&&this['_userService'][_0x1135fd(0x150)](_0x80c35c['user']),_0x80c35c[_0x1135fd(0x111)]){case _0x45d2dd[_0x1135fd(0x101)]:break;case _0x45d2dd[_0x1135fd(0x10c)]:{this[_0x1135fd(0xf3)][_0x1135fd(0x109)](_0x4f29ad,_0x31702f,{'unitId':_0x4f29ad,'subUnitId':_0x31702f,'ref':'','id':_0x80c35c[_0x1135fd(0x117)],'dT':_0x5392f0(+_0x80c35c['createTimestamp']),'threadId':_0x80c35c[_0x1135fd(0xeb)],'personId':(_0x22c527=(_0x4b1355=_0x80c35c[_0x1135fd(0x11b)])==null?void 0x0:_0x4b1355['userID'])!=null?_0x22c527:_0x80c35c['userId'],'text':JSON[_0x1135fd(0x16c)](_0x80c35c['content']),'parentId':_0x5ccd78['id']});break;}case _0x45d2dd[_0x1135fd(0x163)]:{const _0xdddbee=this[_0x1135fd(0xf3)][_0x1135fd(0x13c)](_0x4f29ad,_0x31702f,_0x80c35c['replyId']);_0xdddbee&&_0xdddbee['parentId']&&this[_0x1135fd(0xf3)][_0x1135fd(0x13b)](_0x4f29ad,_0x31702f,_0x80c35c[_0x1135fd(0x117)]);break;}case _0x45d2dd[_0x1135fd(0x11a)]:{this[_0x1135fd(0xf3)][_0x1135fd(0x12d)](_0x4f29ad,_0x31702f,{'commentId':_0x80c35c['replyId'],'text':JSON[_0x1135fd(0x16c)](_0x80c35c[_0x1135fd(0xe4)])});break;}case _0x45d2dd[_0x1135fd(0x12b)]:{const _0xd231d1=(_0x1f86b5=this['_threadCommentModel'][_0x1135fd(0xfe)](_0x80c35c['unitId'])[_0x1135fd(0x106)](_0x31e5cc=>_0x31e5cc['threadId']===_0x80c35c[_0x1135fd(0xeb)]))==null?void 0x0:_0x1f86b5[_0x1135fd(0x105)];_0xd231d1&&this['_threadCommentModel']['resolveComment'](_0x4f29ad,_0x31702f,_0xd231d1['id'],_0x80c35c[_0x1135fd(0x142)]===_0x4ea4ca['Solved']);break;}}}));}};_0x2dbee5=_0xab3793([_0x34a507(0x0,_0x208443[_0x1da00a(0xed)](_0x2e266b[_0x1da00a(0xf0)])),_0x34a507(0x1,_0x208443[_0x1da00a(0xed)](_0x195a9a[_0x1da00a(0x15f)])),_0x34a507(0x2,_0x208443[_0x1da00a(0xed)](_0x208443[_0x1da00a(0x124)])),_0x34a507(0x3,_0x208443[_0x1da00a(0xed)](_0x208443[_0x1da00a(0x126)]))],_0x2dbee5);const _0x2fe050='thread-comment-data-source.config',_0xa39fc1={};var _0x564dd1=Object[_0x1da00a(0x133)],_0xa5ac09=(_0x424059,_0x145cb7,_0x51973e,_0xc75961)=>{const _0x39df44=_0x1da00a;for(var _0x77f3c5=_0xc75961>0x1?void 0x0:_0xc75961?_0x564dd1(_0x145cb7,_0x51973e):_0x145cb7,_0x51e797=_0x424059[_0x39df44(0x10e)]-0x1,_0x21a28a;_0x51e797>=0x0;_0x51e797--)(_0x21a28a=_0x424059[_0x51e797])&&(_0x77f3c5=_0x21a28a(_0x77f3c5)||_0x77f3c5);return _0x77f3c5;},_0x362cd7=(_0x4ae2d6,_0x11168e)=>(_0x14c35d,_0xf53835)=>_0x11168e(_0x14c35d,_0xf53835,_0x4ae2d6);function _0xb291bc(_0x16aaf8,_0x4a5225){const _0x58ec10=_0x1da00a,_0x21132e=_0x16aaf8[_0x58ec10(0x146)][0x0];return{..._0x4a5225,'id':_0x21132e['replyId'],'resolved':_0x16aaf8[_0x58ec10(0x142)]===0x1,'dT':_0x5392f0(_0x21132e['createTimestamp']),'personId':_0x21132e[_0x58ec10(0xe8)],'threadId':_0x21132e[_0x58ec10(0xeb)]};}function _0x1d691f(_0x312501,_0x5806c2,_0x3f509e){const _0x2e97c3=_0x1da00a;var _0x4c7328,_0x369dca;if(((_0x369dca=(_0x4c7328=_0x312501==null?void 0x0:_0x312501[_0x2e97c3(0x146)])==null?void 0x0:_0x4c7328[_0x2e97c3(0x10e)])!=null?_0x369dca:0x0)>0x0){const _0x4d9a4a=(_0x2c03fb,_0x19efba)=>({'id':_0x2c03fb['replyId'],'threadId':_0x2c03fb[_0x2e97c3(0xeb)],'dT':_0x5392f0(_0x2c03fb[_0x2e97c3(0x16a)]),'personId':_0x2c03fb[_0x2e97c3(0xe8)],'resolved':_0x312501[_0x2e97c3(0x142)]===_0x4ea4ca[_0x2e97c3(0xf7)],'unitId':_0x5806c2,'subUnitId':_0x3f509e,'text':JSON['parse'](_0x2c03fb[_0x2e97c3(0xe4)]),'parentId':_0x19efba}),_0x413e9a=_0x4d9a4a(_0x312501[_0x2e97c3(0x146)][0x0]);return{..._0x413e9a,'children':_0x312501['replies'][_0x2e97c3(0x104)](0x1)['map'](_0x4f3ca5=>_0x4d9a4a(_0x4f3ca5,_0x413e9a['id']))};}return null;}let _0x22d406=class{constructor(_0x5576d3,_0x493dce,_0x31aa73,_0x5958be){const _0x5cb26d=_0x1da00a;this[_0x5cb26d(0x155)]=_0x5576d3,this['_userService']=_0x493dce,this[_0x5cb26d(0x162)]=_0x31aa73,this[_0x5cb26d(0x11e)]=_0x5958be;}async[_0x1da00a(0x109)](_0x21ec71){const _0x51ef98=_0x1da00a;var _0x5a113d,_0x4eb7b0;const {parentId:_0x4261ea,unitId:_0x28d799,text:_0x21e33c,threadId:_0x3a43ca}=_0x21ec71,_0x5a3c12=(_0x4eb7b0=(_0x5a113d=_0x21e33c[_0x51ef98(0x107)])==null?void 0x0:_0x5a113d['filter'](_0x325311=>_0x325311[_0x51ef98(0x119)]===_0x208443[_0x51ef98(0x115)][_0x51ef98(0xec)])[_0x51ef98(0xe6)](_0x34cce4=>_0x34cce4[_0x51ef98(0x127)]))!=null?_0x4eb7b0:[],_0x51c40d=JSON[_0x51ef98(0x114)](_0x21e33c),_0x115c92=(await this[_0x51ef98(0x162)][_0x51ef98(0x131)](_0x28d799))[_0x51ef98(0x168)]();if(_0x4261ea){const _0x4f771b={'memberId':_0x115c92,'unitId':_0x28d799,'content':_0x51c40d,'mention':_0x5a3c12,'threadId':_0x3a43ca},_0x140f11=(await this[_0x51ef98(0x155)][_0x51ef98(0x120)]('/universer-api/comment/unit/'+_0x28d799+_0x51ef98(0x11c),{'body':_0x4f771b}))[_0x51ef98(0x113)][_0x51ef98(0x152)];return{..._0x21ec71,'id':_0x140f11[_0x51ef98(0x117)],'dT':_0x208443['dayjs'](+_0x140f11[_0x51ef98(0x16a)])[_0x51ef98(0xf1)](_0x51ef98(0x108)),'personId':_0x140f11[_0x51ef98(0xe8)]};}else{const _0x4f7e8f={'memberId':_0x115c92,'unitId':_0x28d799,'content':_0x51c40d,'mention':_0x5a3c12},_0x40f1a5=await this[_0x51ef98(0x155)]['post'](_0x51ef98(0xe3)+_0x28d799+_0x51ef98(0xef),{'body':_0x4f7e8f});return _0xb291bc(_0x40f1a5[_0x51ef98(0x113)][_0x51ef98(0xf6)],_0x21ec71);}}async[_0x1da00a(0x12d)](_0x2fa0c2){const _0x6dd98f=_0x1da00a;var _0x2dc2da,_0x12f5b7;const {text:_0x378a7c,unitId:_0x3e2a42}=_0x2fa0c2,_0x443f83=(_0x12f5b7=(_0x2dc2da=_0x378a7c['customRanges'])==null?void 0x0:_0x2dc2da[_0x6dd98f(0xee)](_0x1dfb52=>_0x1dfb52[_0x6dd98f(0x119)]===_0x208443[_0x6dd98f(0x115)]['COMMENT'])['map'](_0x32d030=>_0x32d030[_0x6dd98f(0x127)]))!=null?_0x12f5b7:[],_0x35700c=JSON['stringify'](_0x378a7c),_0x3a3816=_0x2fa0c2[_0x6dd98f(0xeb)],_0x2c2667=_0x2fa0c2['id'],_0x492bac={'memberId':(await this[_0x6dd98f(0x162)][_0x6dd98f(0x131)](_0x3e2a42))['getMemberID'](),'unitId':_0x3e2a42,'threadId':_0x3a3816,'mention':_0x443f83,'content':_0x35700c,'replyId':_0x2c2667},_0x50b7e8=await this[_0x6dd98f(0x155)][_0x6dd98f(0x120)]('/universer-api/comment/unit/'+_0x3e2a42+_0x6dd98f(0x137),{'body':_0x492bac});return!_0x50b7e8[_0x6dd98f(0x113)]['error']||_0x50b7e8[_0x6dd98f(0x113)][_0x6dd98f(0x12c)][_0x6dd98f(0x14e)]===0x1;}async[_0x1da00a(0x157)](_0x348637){const _0x3269ad=_0x1da00a,{unitId:_0x31a797}=_0x348637,_0x4f83b6=_0x348637['threadId'],_0x6e9c8c={'memberId':this[_0x3269ad(0xea)][_0x3269ad(0x14c)]()[_0x3269ad(0x10f)],'unitId':_0x31a797,'threadId':_0x4f83b6,'solved':_0x348637[_0x3269ad(0xfc)]?_0x4ea4ca[_0x3269ad(0xf7)]:_0x4ea4ca[_0x3269ad(0x15e)]},_0x1555ca=await this[_0x3269ad(0x155)][_0x3269ad(0x120)](_0x3269ad(0xe3)+_0x31a797+_0x3269ad(0xe2),{'body':_0x6e9c8c});return!_0x1555ca[_0x3269ad(0x113)][_0x3269ad(0x12c)]||_0x1555ca[_0x3269ad(0x113)][_0x3269ad(0x12c)]['code']===0x1;}async[_0x1da00a(0x13b)](_0x3ab693,_0x2bde7d,_0xd77aaa,_0x1869d8){const _0x10eb2c=_0x1da00a,_0x35b09f={'memberId':(await this['_sessionService'][_0x10eb2c(0x131)](_0x3ab693))['getMemberID'](),'threadId':_0xd77aaa,'replyId':_0x1869d8,'unitId':_0x3ab693},_0x26bc1a=await this[_0x10eb2c(0x155)]['post'](_0x10eb2c(0xe3)+_0x3ab693+'/delete',{'body':_0x35b09f});return!_0x26bc1a[_0x10eb2c(0x113)][_0x10eb2c(0x12c)]||_0x26bc1a[_0x10eb2c(0x113)]['error'][_0x10eb2c(0x14e)]===0x1;}async[_0x1da00a(0x10b)](_0x3120dc,_0x120058,_0x273baa){const _0x4d9013=_0x1da00a,_0x442927={'unitId':_0x3120dc,'threadId':_0x273baa},_0x5450f5=await this['_httpService'][_0x4d9013(0x120)](_0x4d9013(0xe3)+_0x3120dc+_0x4d9013(0x165),{'body':_0x442927}),_0xd7807f=_0x273baa[_0x4d9013(0xe6)](_0x42c744=>_0x1d691f(_0x5450f5[_0x4d9013(0x113)][_0x4d9013(0x11d)][_0x42c744],_0x3120dc,_0x120058))[_0x4d9013(0xee)](Boolean);return Object[_0x4d9013(0x13a)](_0x5450f5[_0x4d9013(0x113)][_0x4d9013(0x134)])[_0x4d9013(0x160)](_0x3bdb8d=>{const _0x2d84a6=_0x4d9013;this[_0x2d84a6(0xea)][_0x2d84a6(0x150)](_0x3bdb8d);}),_0xd7807f;}[_0x1da00a(0x167)](_0x2a607f){const _0x1580dc=_0x1da00a;return{'id':_0x2a607f['id'],'threadId':_0x2a607f[_0x1580dc(0xeb)],'ref':_0x2a607f[_0x1580dc(0x15c)]};}};_0x22d406=_0xa5ac09([_0x362cd7(0x0,_0x208443[_0x1da00a(0xed)](_0x2e4d72[_0x1da00a(0x102)])),_0x362cd7(0x1,_0x208443[_0x1da00a(0xed)](_0x208443[_0x1da00a(0x124)])),_0x362cd7(0x2,_0x208443[_0x1da00a(0xed)](_0x2e266b['CollaborationSessionService'])),_0x362cd7(0x3,_0x208443['Inject'](_0x208443[_0x1da00a(0x126)]))],_0x22d406);var _0x3ec6d4=Object[_0x1da00a(0x133)],_0x418553=(_0x4a6bb3,_0x4e2cb1,_0x274f7b,_0x3684dc)=>{const _0x325e1d=_0x1da00a;for(var _0x897ae1=_0x3684dc>0x1?void 0x0:_0x3684dc?_0x3ec6d4(_0x4e2cb1,_0x274f7b):_0x4e2cb1,_0x1a9ebf=_0x4a6bb3[_0x325e1d(0x10e)]-0x1,_0x5d6253;_0x1a9ebf>=0x0;_0x1a9ebf--)(_0x5d6253=_0x4a6bb3[_0x1a9ebf])&&(_0x897ae1=_0x5d6253(_0x897ae1)||_0x897ae1);return _0x897ae1;},_0x138734=(_0x70f20d,_0x26b7a1)=>(_0x3b9d88,_0x55ad25)=>_0x26b7a1(_0x3b9d88,_0x55ad25,_0x70f20d);let _0x118433=class extends _0x208443['Disposable']{constructor(_0x2db7bf,_0x120be2){const _0x4467df=_0x1da00a;super(),this[_0x4467df(0x156)]=_0x2db7bf,this[_0x4467df(0x14a)]=_0x120be2,this['_initDataSource']();}['_initDataSource'](){const _0x410087=_0x1da00a;this['_threadCommentDataSourceService'][_0x410087(0x14d)]=this[_0x410087(0x14a)],this['_threadCommentDataSourceService'][_0x410087(0x16d)]=!0x1;}};_0x118433=_0x418553([_0x138734(0x0,_0x195a9a[_0x1da00a(0x13e)]),_0x138734(0x1,_0x208443[_0x1da00a(0xed)](_0x22d406))],_0x118433);var _0x5636cd=Object['defineProperty'],_0xdf0f0a=Object[_0x1da00a(0x133)],_0x4115d4=(_0x635056,_0xba623e,_0x30867c)=>_0xba623e in _0x635056?_0x5636cd(_0x635056,_0xba623e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x30867c}):_0x635056[_0xba623e]=_0x30867c,_0xb94089=(_0x28d185,_0x5e9c0b,_0x254f84,_0xabef6d)=>{const _0x253085=_0x1da00a;for(var _0x4998ad=_0xabef6d>0x1?void 0x0:_0xabef6d?_0xdf0f0a(_0x5e9c0b,_0x254f84):_0x5e9c0b,_0x354ace=_0x28d185[_0x253085(0x10e)]-0x1,_0x1a1759;_0x354ace>=0x0;_0x354ace--)(_0x1a1759=_0x28d185[_0x354ace])&&(_0x4998ad=_0x1a1759(_0x4998ad)||_0x4998ad);return _0x4998ad;},_0x1b2bde=(_0x18f252,_0xb3c80a)=>(_0x306e25,_0x2456ea)=>_0xb3c80a(_0x306e25,_0x2456ea,_0x18f252),_0x5cb5bb=(_0x8a50b8,_0x3746a1,_0x3eb035)=>_0x4115d4(_0x8a50b8,typeof _0x3746a1!=_0x1da00a(0xe9)?_0x3746a1+'':_0x3746a1,_0x3eb035);_0x583ef1['UniverThreadCommentDataSourcePlugin']=class extends _0x208443[_0x1da00a(0x154)]{constructor(_0x1d4c5d=_0xa39fc1,_0x1fd188,_0x57a4ab){const _0x5c9617=_0x1da00a;super(),this['_config']=_0x1d4c5d,this[_0x5c9617(0x11e)]=_0x1fd188,this[_0x5c9617(0xf5)]=_0x57a4ab;const {..._0x2ceaa8}=_0x208443[_0x5c9617(0xf8)]({},_0xa39fc1,this['_config']);this['_configService']['setConfig'](_0x2fe050,_0x2ceaa8);}['onStarting'](){const _0x2aec90=_0x1da00a;[[_0x22d406],[_0x118433],[_0x2dbee5]][_0x2aec90(0x160)](_0x50ff7e=>{const _0x2faaa1=_0x2aec90;this[_0x2faaa1(0x11e)][_0x2faaa1(0x12f)](_0x50ff7e);});}[_0x1da00a(0x149)](){const _0x13ebbc=_0x1da00a;this[_0x13ebbc(0x11e)]['get'](_0x118433),this['_injector']['get'](_0x2dbee5);}},_0x5cb5bb(_0x583ef1[_0x1da00a(0xe7)],'pluginName',_0x36ea8d),_0x5cb5bb(_0x583ef1[_0x1da00a(0xe7)],_0x1da00a(0x111),_0x208443[_0x1da00a(0x13f)][_0x1da00a(0x136)]),_0x583ef1['UniverThreadCommentDataSourcePlugin']=_0xb94089([_0x208443[_0x1da00a(0x14b)](_0x2f4e2e[_0x1da00a(0xe5)],_0x2e266b['UniverCollaborationClientPlugin'],_0x11f360['UniverLicensePlugin']),_0x1b2bde(0x1,_0x208443[_0x1da00a(0xed)](_0x208443[_0x1da00a(0x126)])),_0x1b2bde(0x2,_0x208443['IConfigService'])],_0x583ef1[_0x1da00a(0xe7)]),Object[_0x1da00a(0x166)](_0x583ef1,Symbol['toStringTag'],{'value':_0x1da00a(0xf9)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202505051607",
3
+ "version": "0.7.0-nightly.202505071607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,19 +45,19 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs/core": "0.7.0-nightly.202505051607",
49
- "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505051607",
50
- "@univerjs-pro/license": "0.7.0-nightly.202505051607",
48
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505071607",
49
+ "@univerjs-pro/license": "0.7.0-nightly.202505071607",
50
+ "@univerjs/core": "0.7.0-nightly.202505071607",
51
+ "@univerjs/network": "0.7.0-nightly.202505071607",
51
52
  "@univerjs/protocol": "0.1.46-alpha.3",
52
- "@univerjs/network": "0.7.0-nightly.202505051607",
53
- "@univerjs/thread-comment-ui": "0.7.0-nightly.202505051607",
54
- "@univerjs/thread-comment": "0.7.0-nightly.202505051607"
53
+ "@univerjs/thread-comment": "0.7.0-nightly.202505071607",
54
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202505071607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.3",
59
- "vite": "^6.3.4",
60
- "vitest": "^3.1.2",
59
+ "vite": "^6.3.5",
60
+ "vitest": "^3.1.3",
61
61
  "@univerjs-infra/shared": "0.7.0-beta.0"
62
62
  },
63
63
  "scripts": {