@univerjs-pro/thread-comment-datasource 0.9.1-nightly.202507041607 → 0.9.1-nightly.202507061606

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 _0x347084=_0x4776;(function(_0x453905,_0x116c3f){const _0x1a6a04=_0x4776,_0x1a4966=_0x453905();while(!![]){try{const _0x88c851=-parseInt(_0x1a6a04(0x248))/0x1+-parseInt(_0x1a6a04(0x20a))/0x2*(-parseInt(_0x1a6a04(0x1f3))/0x3)+-parseInt(_0x1a6a04(0x202))/0x4+parseInt(_0x1a6a04(0x20c))/0x5+-parseInt(_0x1a6a04(0x21e))/0x6*(parseInt(_0x1a6a04(0x234))/0x7)+parseInt(_0x1a6a04(0x1eb))/0x8+-parseInt(_0x1a6a04(0x24d))/0x9;if(_0x88c851===_0x116c3f)break;else _0x1a4966['push'](_0x1a4966['shift']());}catch(_0x45c40e){_0x1a4966['push'](_0x1a4966['shift']());}}}(_0x5ba4,0x42acb));function _0x4776(_0x510854,_0x31bb3b){const _0x5ba441=_0x5ba4();return _0x4776=function(_0x477615,_0x5e53d8){_0x477615=_0x477615-0x1de;let _0xf18d08=_0x5ba441[_0x477615];return _0xf18d08;},_0x4776(_0x510854,_0x31bb3b);}Object[_0x347084(0x240)](exports,Symbol['toStringTag'],{'value':_0x347084(0x1f8)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4a2390=>(_0x4a2390[_0x4a2390['OpenOrReOpen']=0x0]=_0x347084(0x216),_0x4a2390[_0x4a2390[_0x347084(0x22c)]=0x1]='Solved',_0x4a2390[_0x4a2390[_0x347084(0x24f)]=-0x1]=_0x347084(0x24f),_0x4a2390))(I||{}),v=(_0x1baf7a=>(_0x1baf7a[_0x1baf7a[_0x347084(0x1e6)]=0x0]='Unknown',_0x1baf7a[_0x1baf7a[_0x347084(0x210)]=0x1]=_0x347084(0x210),_0x1baf7a[_0x1baf7a['Reply']=0x2]=_0x347084(0x24c),_0x1baf7a[_0x1baf7a[_0x347084(0x23a)]=0x3]='Edit',_0x1baf7a[_0x1baf7a[_0x347084(0x1e9)]=0x4]=_0x347084(0x1e9),_0x1baf7a[_0x1baf7a[_0x347084(0x1ec)]=0x5]=_0x347084(0x1ec),_0x1baf7a[_0x1baf7a[_0x347084(0x24f)]=-0x1]=_0x347084(0x24f),_0x1baf7a))(v||{});const f=_0x5e5114=>c[_0x347084(0x23e)](new Date(+_0x5e5114))[_0x347084(0x1f0)](_0x347084(0x228)),R=async(_0x1cc0d5,_0x5d52e3)=>{const _0x3b4c8f=_0x347084,_0x2c15cd=_0x1cc0d5[_0x3b4c8f(0x222)](c[_0x3b4c8f(0x241)]),_0x54a0bb=_0x1cc0d5['get'](P['HTTPService']);_0x5d52e3[_0x3b4c8f(0x1e2)](_0x185188=>{const _0xf5e62c=_0x3b4c8f;_0x2c15cd[_0xf5e62c(0x21f)](_0x185188)&&_0x5d52e3[_0xf5e62c(0x215)](_0x185188);}),_0x5d52e3[_0x3b4c8f(0x207)]&&(await _0x54a0bb[_0x3b4c8f(0x222)](_0x3b4c8f(0x230),{'params':{'userIDs':[..._0x5d52e3]}}))[_0x3b4c8f(0x24b)][_0x3b4c8f(0x1e0)][_0x3b4c8f(0x1e2)](_0x32f571=>{const _0x25454b=_0x3b4c8f;_0x32f571&&_0x2c15cd[_0x25454b(0x233)](_0x32f571);});};var $=Object[_0x347084(0x219)],E=(_0x9546db,_0x345c16,_0x26cfa3,_0x302d5a)=>{const _0xbfc91f=_0x347084;for(var _0x37cbba=_0x302d5a>0x1?void 0x0:_0x302d5a?$(_0x345c16,_0x26cfa3):_0x345c16,_0x404259=_0x9546db[_0xbfc91f(0x22e)]-0x1,_0x5b9bcc;_0x404259>=0x0;_0x404259--)(_0x5b9bcc=_0x9546db[_0x404259])&&(_0x37cbba=_0x5b9bcc(_0x37cbba)||_0x37cbba);return _0x37cbba;},S=(_0x24092,_0x47552b)=>(_0x2744ea,_0x1e9742)=>_0x47552b(_0x2744ea,_0x1e9742,_0x24092);let p=class extends c['Disposable']{constructor(_0x73b320,_0x49fac9,_0x2f2eca,_0x144978){const _0x3144bb=_0x347084;super(),this[_0x3144bb(0x21c)]=_0x73b320,this['_threadCommentModel']=_0x49fac9,this[_0x3144bb(0x243)]=_0x2f2eca,this['_injector']=_0x144978,this[_0x3144bb(0x224)](),this[_0x3144bb(0x255)]();}[_0x347084(0x255)](){const _0x461fc5=_0x347084;this['disposeWithMe'](this[_0x461fc5(0x212)]['commentUpdate$'][_0x461fc5(0x223)](w[_0x461fc5(0x1f5)](0x10))[_0x461fc5(0x236)](_0x22cea4=>{const _0x4c3aaa=_0x461fc5,_0x4e92a8=new Set();_0x22cea4[_0x4c3aaa(0x1e2)](_0x225b8c=>{const _0x49e558=_0x4c3aaa;switch(_0x225b8c[_0x49e558(0x242)]){case'add':{const _0x1575e6=_0x225b8c['payload']['personId'];_0x4e92a8[_0x49e558(0x231)](_0x1575e6);break;}}}),R(this['_injector'],_0x4e92a8);}));}['_init'](){const _0x42a141=_0x347084;this[_0x42a141(0x22b)](this[_0x42a141(0x21c)]['commentUpdate$']['subscribe'](async _0xf52fee=>{const _0x2c29be=_0x42a141;var _0x3c3eab,_0x284d80,_0xf67595,_0x5c1784;const _0x1ae3cf=(_0x3c3eab=this['_threadCommentModel'][_0x2c29be(0x22f)](_0xf52fee[_0x2c29be(0x22a)])[_0x2c29be(0x1ed)](_0x56805e=>_0x56805e['threadId']===_0xf52fee[_0x2c29be(0x238)]))==null?void 0x0:_0x3c3eab[_0x2c29be(0x208)];if(!_0x1ae3cf)return;const {unitId:_0xd5b860,subUnitId:_0x3ce8f1}=_0x1ae3cf;switch(_0xf52fee[_0x2c29be(0x1f6)]&&this[_0x2c29be(0x243)][_0x2c29be(0x233)](_0xf52fee[_0x2c29be(0x1f6)]),_0xf52fee[_0x2c29be(0x242)]){case v['Add']:break;case v[_0x2c29be(0x24c)]:{this[_0x2c29be(0x212)]['addComment'](_0xd5b860,_0x3ce8f1,{'unitId':_0xd5b860,'subUnitId':_0x3ce8f1,'ref':'','id':_0xf52fee[_0x2c29be(0x217)],'dT':f(+_0xf52fee['createTimestamp']),'threadId':_0xf52fee[_0x2c29be(0x238)],'personId':(_0xf67595=(_0x284d80=_0xf52fee[_0x2c29be(0x1f6)])==null?void 0x0:_0x284d80[_0x2c29be(0x1f1)])!=null?_0xf67595:_0xf52fee[_0x2c29be(0x225)],'text':JSON[_0x2c29be(0x20b)](_0xf52fee['content']),'parentId':_0x1ae3cf['id']});break;}case v[_0x2c29be(0x1e9)]:{const _0x567d24=this[_0x2c29be(0x212)][_0x2c29be(0x252)](_0xd5b860,_0x3ce8f1,_0xf52fee[_0x2c29be(0x217)]);_0x567d24&&_0x567d24['parentId']&&this[_0x2c29be(0x212)][_0x2c29be(0x1fd)](_0xd5b860,_0x3ce8f1,_0xf52fee[_0x2c29be(0x217)]);break;}case v['Edit']:{this[_0x2c29be(0x212)][_0x2c29be(0x23f)](_0xd5b860,_0x3ce8f1,{'commentId':_0xf52fee[_0x2c29be(0x217)],'text':JSON[_0x2c29be(0x20b)](_0xf52fee[_0x2c29be(0x21d)])});break;}case v[_0x2c29be(0x1ec)]:{const _0x1db5a1=(_0x5c1784=this[_0x2c29be(0x212)]['getUnit'](_0xf52fee['unitId'])[_0x2c29be(0x1ed)](_0x2c67ab=>_0x2c67ab['threadId']===_0xf52fee[_0x2c29be(0x238)]))==null?void 0x0:_0x5c1784[_0x2c29be(0x208)];_0x1db5a1&&this[_0x2c29be(0x212)][_0x2c29be(0x1ef)](_0xd5b860,_0x3ce8f1,_0x1db5a1['id'],_0xf52fee['solved']===I[_0x2c29be(0x22c)]);break;}}}));}};p=E([S(0x0,c[_0x347084(0x235)](b[_0x347084(0x246)])),S(0x1,c[_0x347084(0x235)](M[_0x347084(0x1f7)])),S(0x2,c['Inject'](c[_0x347084(0x241)])),S(0x3,c['Inject'](c[_0x347084(0x213)]))],p);const q=_0x347084(0x21b),D={};var A=Object[_0x347084(0x219)],x=(_0xefb70f,_0x51c742,_0x354ea7,_0x17cd5e)=>{for(var _0x576b40=_0x17cd5e>0x1?void 0x0:_0x17cd5e?A(_0x51c742,_0x354ea7):_0x51c742,_0x5a6bc0=_0xefb70f['length']-0x1,_0x286e47;_0x5a6bc0>=0x0;_0x5a6bc0--)(_0x286e47=_0xefb70f[_0x5a6bc0])&&(_0x576b40=_0x286e47(_0x576b40)||_0x576b40);return _0x576b40;},_=(_0x1b32bf,_0x46e5c3)=>(_0xd94bed,_0x5e117d)=>_0x46e5c3(_0xd94bed,_0x5e117d,_0x1b32bf);function Y(_0x1416b2,_0x24fb53){const _0x177688=_0x347084,_0x3246f9=_0x1416b2[_0x177688(0x1ff)][0x0];return{..._0x24fb53,'id':_0x3246f9[_0x177688(0x217)],'resolved':_0x1416b2[_0x177688(0x203)]===0x1,'dT':f(_0x3246f9[_0x177688(0x251)]),'personId':_0x3246f9[_0x177688(0x225)],'threadId':_0x3246f9[_0x177688(0x238)]};}function _0x5ba4(){const _0x46c5a5=['UNRECOGNIZED','slice','createTimestamp','getComment','error','CustomRangeType','_initUserSync','UniverInstanceType','code','users','/list','forEach','onStarting','rangeId','listComments','Unknown','post','merge','Delete','HTTPService','2538456dSGcGS','Solve','find','UniverThreadCommentDataSourcePlugin','resolveComment','format','userID','/edit','3MGiMGH','_threadCommentDataSource','bufferTime','user','ThreadCommentModel','Module','_initDataSource','setConfig','requireSession','_threadCommentDataSourceService','deleteComment','UniverCollaborationClientPlugin','replies','/add','filter','1531264gtaRaJ','solved','comments','resolved','/delete','size','root','IConfigService','1055732UNRpzH','parse','2289630hOvWQo','UniverThreadCommentUIPlugin','UNIVER_UNKNOWN','onReady','Add','Plugin','_threadCommentModel','Injector','addComment','delete','OpenOrReOpen','replyId','symbol','getOwnPropertyDescriptor','_httpService','thread-comment-data-source.config','_commentService','content','60xrkjwG','getUser','CollaborationSessionService','/universer-api/comment/unit/','get','pipe','_init','userId','Disposable','rangeType','YYYY/MM/DD\x20HH:mm','_sessionService','unitId','disposeWithMe','Solved','_config','length','getUnit','/universer-api/user/list','add','saveCommentToSnapshot','addUser','132146PqiKJb','Inject','subscribe','COMMENT','threadId','UniverLicensePlugin','Edit','syncUpdateMutationToColla','_configService','stringify','dayjs','updateComment','defineProperty','UserManagerService','type','_userService','_injector','comment','CommentService','map','355238mKuJwm','customRanges','pluginName','body','Reply','928494qjwKHk','values'];_0x5ba4=function(){return _0x46c5a5;};return _0x5ba4();}function G(_0x1b59b0,_0x4d3128,_0x38f183){const _0x14ddd8=_0x347084;var _0x39bc04,_0xbdda2a;if(((_0xbdda2a=(_0x39bc04=_0x1b59b0==null?void 0x0:_0x1b59b0['replies'])==null?void 0x0:_0x39bc04[_0x14ddd8(0x22e)])!=null?_0xbdda2a:0x0)>0x0){const _0xcc5ac1=(_0x2ecb91,_0x5c7734)=>({'id':_0x2ecb91[_0x14ddd8(0x217)],'threadId':_0x2ecb91[_0x14ddd8(0x238)],'dT':f(_0x2ecb91[_0x14ddd8(0x251)]),'personId':_0x2ecb91[_0x14ddd8(0x225)],'resolved':_0x1b59b0['solved']===I[_0x14ddd8(0x22c)],'unitId':_0x4d3128,'subUnitId':_0x38f183,'text':JSON['parse'](_0x2ecb91['content']),'parentId':_0x5c7734}),_0x2264a6=_0xcc5ac1(_0x1b59b0[_0x14ddd8(0x1ff)][0x0]);return{..._0x2264a6,'children':_0x1b59b0[_0x14ddd8(0x1ff)][_0x14ddd8(0x250)](0x1)['map'](_0x5507dd=>_0xcc5ac1(_0x5507dd,_0x2264a6['id']))};}return null;}let g=class{constructor(_0x41a525,_0xa7d7bb,_0xe96236,_0x3aa911){const _0x3b83bf=_0x347084;this['_httpService']=_0x41a525,this['_userService']=_0xa7d7bb,this[_0x3b83bf(0x229)]=_0xe96236,this[_0x3b83bf(0x244)]=_0x3aa911;}async[_0x347084(0x214)](_0x4cca6c){const _0x5d3b91=_0x347084;var _0x61f202,_0x2a3729;const {parentId:_0x22ea19,unitId:_0x1f75cb,text:_0x2cf3de,threadId:_0x3e5e85}=_0x4cca6c,_0x3d414e=(_0x2a3729=(_0x61f202=_0x2cf3de[_0x5d3b91(0x249)])==null?void 0x0:_0x61f202['filter'](_0x4d8e0a=>_0x4d8e0a[_0x5d3b91(0x227)]===c['CustomRangeType'][_0x5d3b91(0x237)])['map'](_0x5783d5=>_0x5783d5['rangeId']))!=null?_0x2a3729:[],_0x890c9a=JSON['stringify'](_0x2cf3de),_0x4b93b2=(await this[_0x5d3b91(0x229)][_0x5d3b91(0x1fb)](_0x1f75cb))['getMemberID']();if(_0x22ea19){const _0x202aef={'memberId':_0x4b93b2,'unitId':_0x1f75cb,'content':_0x890c9a,'mention':_0x3d414e,'threadId':_0x3e5e85},_0x2f8d72=(await this['_httpService'][_0x5d3b91(0x1e7)]('/universer-api/comment/unit/'+_0x1f75cb+'/reply',{'body':_0x202aef}))[_0x5d3b91(0x24b)]['reply'];return{..._0x4cca6c,'id':_0x2f8d72[_0x5d3b91(0x217)],'dT':c[_0x5d3b91(0x23e)](+_0x2f8d72['createTimestamp'])[_0x5d3b91(0x1f0)](_0x5d3b91(0x228)),'personId':_0x2f8d72[_0x5d3b91(0x225)]};}else{const _0x1ff11b={'memberId':_0x4b93b2,'unitId':_0x1f75cb,'content':_0x890c9a,'mention':_0x3d414e},_0x36a846=await this[_0x5d3b91(0x21a)][_0x5d3b91(0x1e7)]('/universer-api/comment/unit/'+_0x1f75cb+_0x5d3b91(0x200),{'body':_0x1ff11b});return Y(_0x36a846['body'][_0x5d3b91(0x245)],_0x4cca6c);}}async[_0x347084(0x23f)](_0x3d21dd){const _0x1e648f=_0x347084;var _0xb05680,_0x5311d5;const {text:_0x320d70,unitId:_0x3ff537}=_0x3d21dd,_0x23974d=(_0x5311d5=(_0xb05680=_0x320d70[_0x1e648f(0x249)])==null?void 0x0:_0xb05680[_0x1e648f(0x201)](_0x20d0a4=>_0x20d0a4[_0x1e648f(0x227)]===c[_0x1e648f(0x254)][_0x1e648f(0x237)])['map'](_0x4842f9=>_0x4842f9[_0x1e648f(0x1e4)]))!=null?_0x5311d5:[],_0x5804e8=JSON[_0x1e648f(0x23d)](_0x320d70),_0x484fff=_0x3d21dd['threadId'],_0x438d33=_0x3d21dd['id'],_0x2270ce={'memberId':(await this[_0x1e648f(0x229)]['requireSession'](_0x3ff537))['getMemberID'](),'unitId':_0x3ff537,'threadId':_0x484fff,'mention':_0x23974d,'content':_0x5804e8,'replyId':_0x438d33},_0x4ba91c=await this[_0x1e648f(0x21a)][_0x1e648f(0x1e7)]('/universer-api/comment/unit/'+_0x3ff537+_0x1e648f(0x1f2),{'body':_0x2270ce});return!_0x4ba91c['body']['error']||_0x4ba91c['body']['error'][_0x1e648f(0x1df)]===0x1;}async[_0x347084(0x1ef)](_0x586171){const _0x45e425=_0x347084,{unitId:_0x27d8d6}=_0x586171,_0x17c88e=_0x586171['threadId'],_0x576183={'memberId':this[_0x45e425(0x243)]['getCurrentUser']()['userID'],'unitId':_0x27d8d6,'threadId':_0x17c88e,'solved':_0x586171[_0x45e425(0x205)]?I['Solved']:I[_0x45e425(0x216)]},_0x93b3d5=await this['_httpService'][_0x45e425(0x1e7)]('/universer-api/comment/unit/'+_0x27d8d6+'/solved',{'body':_0x576183});return!_0x93b3d5['body'][_0x45e425(0x253)]||_0x93b3d5['body'][_0x45e425(0x253)][_0x45e425(0x1df)]===0x1;}async[_0x347084(0x1fd)](_0x42c63f,_0x48f6ac,_0x2e4a92,_0x2be286){const _0x4f9d20=_0x347084,_0x5e5d42={'memberId':(await this['_sessionService'][_0x4f9d20(0x1fb)](_0x42c63f))['getMemberID'](),'threadId':_0x2e4a92,'replyId':_0x2be286,'unitId':_0x42c63f},_0x98a617=await this['_httpService'][_0x4f9d20(0x1e7)](_0x4f9d20(0x221)+_0x42c63f+_0x4f9d20(0x206),{'body':_0x5e5d42});return!_0x98a617['body'][_0x4f9d20(0x253)]||_0x98a617[_0x4f9d20(0x24b)]['error'][_0x4f9d20(0x1df)]===0x1;}async[_0x347084(0x1e5)](_0x48038f,_0x43e55c,_0x504017){const _0x400754=_0x347084,_0x4ce622={'unitId':_0x48038f,'threadId':_0x504017},_0x22c09d=await this['_httpService'][_0x400754(0x1e7)](_0x400754(0x221)+_0x48038f+_0x400754(0x1e1),{'body':_0x4ce622}),_0x20904f=_0x504017[_0x400754(0x247)](_0x10cb80=>G(_0x22c09d['body'][_0x400754(0x204)][_0x10cb80],_0x48038f,_0x43e55c))[_0x400754(0x201)](Boolean);return Object[_0x400754(0x24e)](_0x22c09d[_0x400754(0x24b)][_0x400754(0x1e0)])[_0x400754(0x1e2)](_0x85cb91=>{const _0x572345=_0x400754;this[_0x572345(0x243)][_0x572345(0x233)](_0x85cb91);}),_0x20904f;}[_0x347084(0x232)](_0x57a31e){const _0xa5ca16=_0x347084;return{'id':_0x57a31e['id'],'threadId':_0x57a31e[_0xa5ca16(0x238)],'ref':_0x57a31e['ref']};}};g=x([_(0x0,c['Inject'](P[_0x347084(0x1ea)])),_(0x1,c[_0x347084(0x235)](c[_0x347084(0x241)])),_(0x2,c[_0x347084(0x235)](b[_0x347084(0x220)])),_(0x3,c[_0x347084(0x235)](c[_0x347084(0x213)]))],g);var H=Object[_0x347084(0x219)],J=(_0x1429b1,_0x2db0ed,_0x28b031,_0x4f1507)=>{const _0x17438a=_0x347084;for(var _0x531942=_0x4f1507>0x1?void 0x0:_0x4f1507?H(_0x2db0ed,_0x28b031):_0x2db0ed,_0x5335d5=_0x1429b1[_0x17438a(0x22e)]-0x1,_0x1d894a;_0x5335d5>=0x0;_0x5335d5--)(_0x1d894a=_0x1429b1[_0x5335d5])&&(_0x531942=_0x1d894a(_0x531942)||_0x531942);return _0x531942;},y=(_0x19da57,_0x128bcd)=>(_0x17e7cd,_0x585671)=>_0x128bcd(_0x17e7cd,_0x585671,_0x19da57);let C=class extends c[_0x347084(0x226)]{constructor(_0xe65574,_0x3006a1){const _0x280c35=_0x347084;super(),this[_0x280c35(0x1fc)]=_0xe65574,this['_threadCommentDataSource']=_0x3006a1,this[_0x280c35(0x1f9)]();}[_0x347084(0x1f9)](){const _0x22d662=_0x347084;this['_threadCommentDataSourceService']['dataSource']=this[_0x22d662(0x1f4)],this[_0x22d662(0x1fc)][_0x22d662(0x23b)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x347084(0x235)](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x2eadc3,_0x4100b2,_0x4ac010)=>_0x4100b2 in _0x2eadc3?F(_0x2eadc3,_0x4100b2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ac010}):_0x2eadc3[_0x4100b2]=_0x4ac010,W=(_0x24022d,_0x29b1f5,_0x5eec74,_0x5dcde1)=>{const _0x4fc8ad=_0x347084;for(var _0x8b18dd=_0x5dcde1>0x1?void 0x0:_0x5dcde1?L(_0x29b1f5,_0x5eec74):_0x29b1f5,_0x3b85ef=_0x24022d[_0x4fc8ad(0x22e)]-0x1,_0x57d638;_0x3b85ef>=0x0;_0x3b85ef--)(_0x57d638=_0x24022d[_0x3b85ef])&&(_0x8b18dd=_0x57d638(_0x8b18dd)||_0x8b18dd);return _0x8b18dd;},O=(_0x1580bc,_0x2f746a)=>(_0x4c4df7,_0x35457c)=>_0x2f746a(_0x4c4df7,_0x35457c,_0x1580bc),N=(_0x53ea26,_0x32c70a,_0x3f8c39)=>Z(_0x53ea26,typeof _0x32c70a!=_0x347084(0x218)?_0x32c70a+'':_0x32c70a,_0x3f8c39);exports[_0x347084(0x1ee)]=class extends c[_0x347084(0x211)]{constructor(_0x26b856=D,_0x2a86a0,_0xd27f04){const _0x1837af=_0x347084;super(),this['_config']=_0x26b856,this[_0x1837af(0x244)]=_0x2a86a0,this[_0x1837af(0x23c)]=_0xd27f04;const {..._0x3fe716}=c[_0x1837af(0x1e8)]({},D,this[_0x1837af(0x22d)]);this[_0x1837af(0x23c)][_0x1837af(0x1fa)](q,_0x3fe716);}[_0x347084(0x1e3)](){[[g],[C],[p]]['forEach'](_0x439b7f=>{const _0x5d96ba=_0x4776;this['_injector'][_0x5d96ba(0x231)](_0x439b7f);});}[_0x347084(0x20f)](){const _0x33945a=_0x347084;this[_0x33945a(0x244)][_0x33945a(0x222)](C),this[_0x33945a(0x244)]['get'](p);}},N(exports[_0x347084(0x1ee)],_0x347084(0x24a),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x347084(0x242),c[_0x347084(0x1de)][_0x347084(0x20e)]),exports[_0x347084(0x1ee)]=W([c['DependentOn'](j[_0x347084(0x20d)],b[_0x347084(0x1fe)],T[_0x347084(0x239)]),O(0x1,c[_0x347084(0x235)](c[_0x347084(0x213)])),O(0x2,c[_0x347084(0x209)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x890958=_0x417b;(function(_0x44e61a,_0x5f33ff){const _0x36b721=_0x417b,_0x5d30af=_0x44e61a();while(!![]){try{const _0x3a3860=parseInt(_0x36b721(0x162))/0x1+parseInt(_0x36b721(0x1ae))/0x2+-parseInt(_0x36b721(0x174))/0x3+parseInt(_0x36b721(0x19e))/0x4+parseInt(_0x36b721(0x190))/0x5*(-parseInt(_0x36b721(0x170))/0x6)+-parseInt(_0x36b721(0x16f))/0x7*(-parseInt(_0x36b721(0x148))/0x8)+-parseInt(_0x36b721(0x19a))/0x9;if(_0x3a3860===_0x5f33ff)break;else _0x5d30af['push'](_0x5d30af['shift']());}catch(_0x1df6a1){_0x5d30af['push'](_0x5d30af['shift']());}}}(_0xdf44,0x2b859));function _0x417b(_0x264f03,_0x1df089){const _0xdf443=_0xdf44();return _0x417b=function(_0x417b1c,_0x3b5e43){_0x417b1c=_0x417b1c-0x142;let _0x1bc91f=_0xdf443[_0x417b1c];return _0x1bc91f;},_0x417b(_0x264f03,_0x1df089);}Object[_0x890958(0x156)](exports,Symbol[_0x890958(0x164)],{'value':_0x890958(0x194)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5355ab=>(_0x5355ab[_0x5355ab[_0x890958(0x15b)]=0x0]=_0x890958(0x15b),_0x5355ab[_0x5355ab['Solved']=0x1]=_0x890958(0x1b7),_0x5355ab[_0x5355ab['UNRECOGNIZED']=-0x1]=_0x890958(0x1b3),_0x5355ab))(I||{}),v=(_0x4a69ec=>(_0x4a69ec[_0x4a69ec['Unknown']=0x0]=_0x890958(0x15c),_0x4a69ec[_0x4a69ec[_0x890958(0x15e)]=0x1]='Add',_0x4a69ec[_0x4a69ec[_0x890958(0x14d)]=0x2]=_0x890958(0x14d),_0x4a69ec[_0x4a69ec['Edit']=0x3]=_0x890958(0x152),_0x4a69ec[_0x4a69ec[_0x890958(0x15a)]=0x4]=_0x890958(0x15a),_0x4a69ec[_0x4a69ec[_0x890958(0x18c)]=0x5]='Solve',_0x4a69ec[_0x4a69ec[_0x890958(0x1b3)]=-0x1]=_0x890958(0x1b3),_0x4a69ec))(v||{});const f=_0x3e90b0=>c[_0x890958(0x1ab)](new Date(+_0x3e90b0))['format'](_0x890958(0x1a0)),R=async(_0x319305,_0x237818)=>{const _0x5b5677=_0x890958,_0x55d863=_0x319305['get'](c[_0x5b5677(0x160)]),_0x5f234f=_0x319305['get'](P[_0x5b5677(0x165)]);_0x237818[_0x5b5677(0x1ba)](_0x5042cd=>{const _0x1e5a68=_0x5b5677;_0x55d863[_0x1e5a68(0x178)](_0x5042cd)&&_0x237818[_0x1e5a68(0x1a1)](_0x5042cd);}),_0x237818[_0x5b5677(0x14b)]&&(await _0x5f234f[_0x5b5677(0x197)](_0x5b5677(0x1a3),{'params':{'userIDs':[..._0x237818]}}))[_0x5b5677(0x19d)]['users'][_0x5b5677(0x1ba)](_0x20b485=>{_0x20b485&&_0x55d863['addUser'](_0x20b485);});};var $=Object[_0x890958(0x1b5)],E=(_0x3b39ff,_0xee7aff,_0x58b200,_0x14888e)=>{const _0xd51139=_0x890958;for(var _0x1c2bd2=_0x14888e>0x1?void 0x0:_0x14888e?$(_0xee7aff,_0x58b200):_0xee7aff,_0x1b5f7c=_0x3b39ff[_0xd51139(0x15d)]-0x1,_0x117af0;_0x1b5f7c>=0x0;_0x1b5f7c--)(_0x117af0=_0x3b39ff[_0x1b5f7c])&&(_0x1c2bd2=_0x117af0(_0x1c2bd2)||_0x1c2bd2);return _0x1c2bd2;},S=(_0x278449,_0x4a1ede)=>(_0x5a6097,_0x57d322)=>_0x4a1ede(_0x5a6097,_0x57d322,_0x278449);let p=class extends c['Disposable']{constructor(_0x2ce659,_0x1b6646,_0x871be9,_0x49cb2a){const _0x3c19e1=_0x890958;super(),this[_0x3c19e1(0x158)]=_0x2ce659,this[_0x3c19e1(0x146)]=_0x1b6646,this['_userService']=_0x871be9,this['_injector']=_0x49cb2a,this[_0x3c19e1(0x142)](),this['_initUserSync']();}[_0x890958(0x145)](){const _0xcf502d=_0x890958;this[_0xcf502d(0x1af)](this['_threadCommentModel']['commentUpdate$'][_0xcf502d(0x143)](w['bufferTime'](0x10))[_0xcf502d(0x182)](_0xceb536=>{const _0x472d5e=_0xcf502d,_0x1635f1=new Set();_0xceb536[_0x472d5e(0x1ba)](_0x4eafe4=>{const _0x159813=_0x472d5e;switch(_0x4eafe4[_0x159813(0x161)]){case _0x159813(0x181):{const _0x344f88=_0x4eafe4[_0x159813(0x176)]['personId'];_0x1635f1[_0x159813(0x181)](_0x344f88);break;}}}),R(this['_injector'],_0x1635f1);}));}['_init'](){const _0x12a772=_0x890958;this['disposeWithMe'](this[_0x12a772(0x158)][_0x12a772(0x1b0)][_0x12a772(0x182)](async _0x2cfcf1=>{const _0x47a79a=_0x12a772;var _0x5c749f,_0x542354,_0x12557e,_0x2e86de;const _0x2fecf8=(_0x5c749f=this['_threadCommentModel'][_0x47a79a(0x172)](_0x2cfcf1[_0x47a79a(0x187)])[_0x47a79a(0x177)](_0x204f12=>_0x204f12[_0x47a79a(0x17f)]===_0x2cfcf1[_0x47a79a(0x17f)]))==null?void 0x0:_0x5c749f[_0x47a79a(0x16b)];if(!_0x2fecf8)return;const {unitId:_0x500a45,subUnitId:_0x38ae18}=_0x2fecf8;switch(_0x2cfcf1[_0x47a79a(0x1b8)]&&this['_userService'][_0x47a79a(0x19b)](_0x2cfcf1[_0x47a79a(0x1b8)]),_0x2cfcf1[_0x47a79a(0x161)]){case v[_0x47a79a(0x15e)]:break;case v['Reply']:{this['_threadCommentModel'][_0x47a79a(0x171)](_0x500a45,_0x38ae18,{'unitId':_0x500a45,'subUnitId':_0x38ae18,'ref':'','id':_0x2cfcf1[_0x47a79a(0x179)],'dT':f(+_0x2cfcf1[_0x47a79a(0x150)]),'threadId':_0x2cfcf1['threadId'],'personId':(_0x12557e=(_0x542354=_0x2cfcf1['user'])==null?void 0x0:_0x542354[_0x47a79a(0x1a4)])!=null?_0x12557e:_0x2cfcf1[_0x47a79a(0x16a)],'text':JSON['parse'](_0x2cfcf1['content']),'parentId':_0x2fecf8['id']});break;}case v[_0x47a79a(0x15a)]:{const _0x147814=this[_0x47a79a(0x146)][_0x47a79a(0x151)](_0x500a45,_0x38ae18,_0x2cfcf1[_0x47a79a(0x179)]);_0x147814&&_0x147814['parentId']&&this[_0x47a79a(0x146)]['deleteComment'](_0x500a45,_0x38ae18,_0x2cfcf1[_0x47a79a(0x179)]);break;}case v[_0x47a79a(0x152)]:{this[_0x47a79a(0x146)]['updateComment'](_0x500a45,_0x38ae18,{'commentId':_0x2cfcf1[_0x47a79a(0x179)],'text':JSON['parse'](_0x2cfcf1['content'])});break;}case v[_0x47a79a(0x18c)]:{const _0x18ab0a=(_0x2e86de=this[_0x47a79a(0x146)][_0x47a79a(0x172)](_0x2cfcf1[_0x47a79a(0x187)])[_0x47a79a(0x177)](_0x474270=>_0x474270[_0x47a79a(0x17f)]===_0x2cfcf1[_0x47a79a(0x17f)]))==null?void 0x0:_0x2e86de['root'];_0x18ab0a&&this[_0x47a79a(0x146)][_0x47a79a(0x175)](_0x500a45,_0x38ae18,_0x18ab0a['id'],_0x2cfcf1[_0x47a79a(0x199)]===I[_0x47a79a(0x1b7)]);break;}}}));}};p=E([S(0x0,c[_0x890958(0x184)](b[_0x890958(0x16c)])),S(0x1,c[_0x890958(0x184)](M['ThreadCommentModel'])),S(0x2,c[_0x890958(0x184)](c[_0x890958(0x160)])),S(0x3,c['Inject'](c[_0x890958(0x18a)]))],p);const q=_0x890958(0x17c),D={};var A=Object[_0x890958(0x1b5)],x=(_0x53dd59,_0x36a0ad,_0x459d2e,_0x49fb4b)=>{for(var _0x281e54=_0x49fb4b>0x1?void 0x0:_0x49fb4b?A(_0x36a0ad,_0x459d2e):_0x36a0ad,_0x3e1478=_0x53dd59['length']-0x1,_0x3ab942;_0x3e1478>=0x0;_0x3e1478--)(_0x3ab942=_0x53dd59[_0x3e1478])&&(_0x281e54=_0x3ab942(_0x281e54)||_0x281e54);return _0x281e54;},_=(_0x21f623,_0x17304c)=>(_0x41d446,_0xb024c3)=>_0x17304c(_0x41d446,_0xb024c3,_0x21f623);function Y(_0xc2402f,_0x34f536){const _0x28cc23=_0x890958,_0x2a3a67=_0xc2402f[_0x28cc23(0x17e)][0x0];return{..._0x34f536,'id':_0x2a3a67[_0x28cc23(0x179)],'resolved':_0xc2402f[_0x28cc23(0x199)]===0x1,'dT':f(_0x2a3a67[_0x28cc23(0x150)]),'personId':_0x2a3a67['userId'],'threadId':_0x2a3a67[_0x28cc23(0x17f)]};}function G(_0x226c30,_0x5f2f2c,_0x3443e1){const _0x50c32e=_0x890958;var _0x1919b7,_0x2eee68;if(((_0x2eee68=(_0x1919b7=_0x226c30==null?void 0x0:_0x226c30[_0x50c32e(0x17e)])==null?void 0x0:_0x1919b7[_0x50c32e(0x15d)])!=null?_0x2eee68:0x0)>0x0){const _0x352d10=(_0x44b6e2,_0xb1e77e)=>({'id':_0x44b6e2[_0x50c32e(0x179)],'threadId':_0x44b6e2[_0x50c32e(0x17f)],'dT':f(_0x44b6e2['createTimestamp']),'personId':_0x44b6e2[_0x50c32e(0x16a)],'resolved':_0x226c30['solved']===I[_0x50c32e(0x1b7)],'unitId':_0x5f2f2c,'subUnitId':_0x3443e1,'text':JSON[_0x50c32e(0x16e)](_0x44b6e2[_0x50c32e(0x195)]),'parentId':_0xb1e77e}),_0x45ca8f=_0x352d10(_0x226c30[_0x50c32e(0x17e)][0x0]);return{..._0x45ca8f,'children':_0x226c30['replies'][_0x50c32e(0x1a6)](0x1)[_0x50c32e(0x183)](_0x460808=>_0x352d10(_0x460808,_0x45ca8f['id']))};}return null;}let g=class{constructor(_0x3f9716,_0x55c54b,_0x2b4b1f,_0x15161d){const _0x4dc0aa=_0x890958;this[_0x4dc0aa(0x18b)]=_0x3f9716,this['_userService']=_0x55c54b,this[_0x4dc0aa(0x196)]=_0x2b4b1f,this[_0x4dc0aa(0x192)]=_0x15161d;}async[_0x890958(0x171)](_0x1b5ca8){const _0x464cfe=_0x890958;var _0x25e19d,_0x34f889;const {parentId:_0x207732,unitId:_0x450b05,text:_0x196328,threadId:_0x355fd8}=_0x1b5ca8,_0x52aef1=(_0x34f889=(_0x25e19d=_0x196328[_0x464cfe(0x1b9)])==null?void 0x0:_0x25e19d[_0x464cfe(0x163)](_0xc5ee7=>_0xc5ee7[_0x464cfe(0x14c)]===c['CustomRangeType'][_0x464cfe(0x153)])['map'](_0xa046ce=>_0xa046ce[_0x464cfe(0x1b2)]))!=null?_0x34f889:[],_0x631f66=JSON[_0x464cfe(0x1bb)](_0x196328),_0x411a7a=(await this['_sessionService'][_0x464cfe(0x19f)](_0x450b05))['getMemberID']();if(_0x207732){const _0x56e696={'memberId':_0x411a7a,'unitId':_0x450b05,'content':_0x631f66,'mention':_0x52aef1,'threadId':_0x355fd8},_0x926433=(await this[_0x464cfe(0x18b)]['post'](_0x464cfe(0x186)+_0x450b05+_0x464cfe(0x144),{'body':_0x56e696}))[_0x464cfe(0x19d)][_0x464cfe(0x18d)];return{..._0x1b5ca8,'id':_0x926433[_0x464cfe(0x179)],'dT':c[_0x464cfe(0x1ab)](+_0x926433[_0x464cfe(0x150)])[_0x464cfe(0x18f)](_0x464cfe(0x1a0)),'personId':_0x926433[_0x464cfe(0x16a)]};}else{const _0xf9b030={'memberId':_0x411a7a,'unitId':_0x450b05,'content':_0x631f66,'mention':_0x52aef1},_0x43f38d=await this['_httpService'][_0x464cfe(0x173)](_0x464cfe(0x186)+_0x450b05+'/add',{'body':_0xf9b030});return Y(_0x43f38d[_0x464cfe(0x19d)][_0x464cfe(0x1a2)],_0x1b5ca8);}}async[_0x890958(0x15f)](_0x3edcfc){const _0x4011d6=_0x890958;var _0x5c7eb1,_0x54b951;const {text:_0x1764d2,unitId:_0x33dbe4}=_0x3edcfc,_0x31756e=(_0x54b951=(_0x5c7eb1=_0x1764d2['customRanges'])==null?void 0x0:_0x5c7eb1[_0x4011d6(0x163)](_0x3da741=>_0x3da741[_0x4011d6(0x14c)]===c[_0x4011d6(0x149)][_0x4011d6(0x153)])[_0x4011d6(0x183)](_0x23c317=>_0x23c317[_0x4011d6(0x1b2)]))!=null?_0x54b951:[],_0x38187c=JSON[_0x4011d6(0x1bb)](_0x1764d2),_0x2c7717=_0x3edcfc['threadId'],_0x1a61ad=_0x3edcfc['id'],_0x5d9d8a={'memberId':(await this[_0x4011d6(0x196)][_0x4011d6(0x19f)](_0x33dbe4))[_0x4011d6(0x157)](),'unitId':_0x33dbe4,'threadId':_0x2c7717,'mention':_0x31756e,'content':_0x38187c,'replyId':_0x1a61ad},_0x52ad01=await this['_httpService'][_0x4011d6(0x173)]('/universer-api/comment/unit/'+_0x33dbe4+'/edit',{'body':_0x5d9d8a});return!_0x52ad01[_0x4011d6(0x19d)][_0x4011d6(0x14f)]||_0x52ad01[_0x4011d6(0x19d)][_0x4011d6(0x14f)][_0x4011d6(0x1ad)]===0x1;}async[_0x890958(0x175)](_0x20c641){const _0x4d724d=_0x890958,{unitId:_0x3740a1}=_0x20c641,_0x4e4e28=_0x20c641['threadId'],_0x24b838={'memberId':this['_userService'][_0x4d724d(0x14e)]()[_0x4d724d(0x1a4)],'unitId':_0x3740a1,'threadId':_0x4e4e28,'solved':_0x20c641[_0x4d724d(0x17d)]?I['Solved']:I['OpenOrReOpen']},_0x5812e3=await this[_0x4d724d(0x18b)][_0x4d724d(0x173)]('/universer-api/comment/unit/'+_0x3740a1+_0x4d724d(0x188),{'body':_0x24b838});return!_0x5812e3[_0x4d724d(0x19d)][_0x4d724d(0x14f)]||_0x5812e3[_0x4d724d(0x19d)][_0x4d724d(0x14f)][_0x4d724d(0x1ad)]===0x1;}async[_0x890958(0x180)](_0x576a25,_0x3acbbe,_0x2f7f44,_0x34c115){const _0x1291eb=_0x890958,_0x262ce3={'memberId':(await this['_sessionService'][_0x1291eb(0x19f)](_0x576a25))[_0x1291eb(0x157)](),'threadId':_0x2f7f44,'replyId':_0x34c115,'unitId':_0x576a25},_0x1fbaf5=await this['_httpService']['post'](_0x1291eb(0x186)+_0x576a25+_0x1291eb(0x17a),{'body':_0x262ce3});return!_0x1fbaf5['body'][_0x1291eb(0x14f)]||_0x1fbaf5['body']['error']['code']===0x1;}async['listComments'](_0x327767,_0x33d3e6,_0x37534e){const _0x2bd181=_0x890958,_0x3dd4fe={'unitId':_0x327767,'threadId':_0x37534e},_0x4eab4c=await this['_httpService'][_0x2bd181(0x173)]('/universer-api/comment/unit/'+_0x327767+_0x2bd181(0x1ac),{'body':_0x3dd4fe}),_0x557235=_0x37534e['map'](_0xe9752=>G(_0x4eab4c[_0x2bd181(0x19d)][_0x2bd181(0x1b4)][_0xe9752],_0x327767,_0x33d3e6))[_0x2bd181(0x163)](Boolean);return Object[_0x2bd181(0x166)](_0x4eab4c[_0x2bd181(0x19d)][_0x2bd181(0x17b)])['forEach'](_0x2379ea=>{const _0x2e57c7=_0x2bd181;this[_0x2e57c7(0x18e)][_0x2e57c7(0x19b)](_0x2379ea);}),_0x557235;}[_0x890958(0x198)](_0x582861){const _0x118b46=_0x890958;return{'id':_0x582861['id'],'threadId':_0x582861[_0x118b46(0x17f)],'ref':_0x582861[_0x118b46(0x1a9)]};}};g=x([_(0x0,c[_0x890958(0x184)](P[_0x890958(0x165)])),_(0x1,c['Inject'](c[_0x890958(0x160)])),_(0x2,c[_0x890958(0x184)](b[_0x890958(0x1a8)])),_(0x3,c[_0x890958(0x184)](c[_0x890958(0x18a)]))],g);var H=Object[_0x890958(0x1b5)],J=(_0x5506f4,_0x1be645,_0x2d1eb7,_0x233eb6)=>{const _0x560946=_0x890958;for(var _0x3d44cc=_0x233eb6>0x1?void 0x0:_0x233eb6?H(_0x1be645,_0x2d1eb7):_0x1be645,_0x24f273=_0x5506f4[_0x560946(0x15d)]-0x1,_0xe9da49;_0x24f273>=0x0;_0x24f273--)(_0xe9da49=_0x5506f4[_0x24f273])&&(_0x3d44cc=_0xe9da49(_0x3d44cc)||_0x3d44cc);return _0x3d44cc;},y=(_0x11d915,_0x4ae6e4)=>(_0x2dd823,_0x37abf5)=>_0x4ae6e4(_0x2dd823,_0x37abf5,_0x11d915);let C=class extends c[_0x890958(0x191)]{constructor(_0xdf97d1,_0x1de124){const _0x1e70f1=_0x890958;super(),this[_0x1e70f1(0x14a)]=_0xdf97d1,this['_threadCommentDataSource']=_0x1de124,this['_initDataSource']();}[_0x890958(0x185)](){const _0x48dfee=_0x890958;this[_0x48dfee(0x14a)]['dataSource']=this[_0x48dfee(0x1b1)],this[_0x48dfee(0x14a)][_0x48dfee(0x147)]=!0x1;}};C=J([y(0x0,M[_0x890958(0x169)]),y(0x1,c[_0x890958(0x184)](g))],C);function _0xdf44(){const _0x33517e=['/universer-api/comment/unit/','unitId','/solved','UniverThreadCommentUIPlugin','Injector','_httpService','Solve','reply','_userService','format','42145BizHem','Disposable','_injector','setConfig','Module','content','_sessionService','get','saveCommentToSnapshot','solved','2109969wJqxWR','addUser','_config','body','307940BaLVtc','requireSession','YYYY/MM/DD\x20HH:mm','delete','comment','/universer-api/user/list','userID','UniverThreadCommentDataSourcePlugin','slice','DependentOn','CollaborationSessionService','ref','UNIVER_UNKNOWN','dayjs','/list','code','68742UBPzLJ','disposeWithMe','commentUpdate$','_threadCommentDataSource','rangeId','UNRECOGNIZED','comments','getOwnPropertyDescriptor','UniverInstanceType','Solved','user','customRanges','forEach','stringify','_init','pipe','/reply','_initUserSync','_threadCommentModel','syncUpdateMutationToColla','26472xZAbvz','CustomRangeType','_threadCommentDataSourceService','size','rangeType','Reply','getCurrentUser','error','createTimestamp','getComment','Edit','COMMENT','merge','Plugin','defineProperty','getMemberID','_commentService','_configService','Delete','OpenOrReOpen','Unknown','length','Add','updateComment','UserManagerService','type','149658RPWZCA','filter','toStringTag','HTTPService','values','IConfigService','symbol','IThreadCommentDataSourceService','userId','root','CommentService','UniverLicensePlugin','parse','630AkqPSQ','12PBEqBZ','addComment','getUnit','post','387780TiQXbL','resolveComment','payload','find','getUser','replyId','/delete','users','thread-comment-data-source.config','resolved','replies','threadId','deleteComment','add','subscribe','map','Inject','_initDataSource'];_0xdf44=function(){return _0x33517e;};return _0xdf44();}var F=Object[_0x890958(0x156)],L=Object[_0x890958(0x1b5)],Z=(_0x120979,_0x27f50c,_0x165d2d)=>_0x27f50c in _0x120979?F(_0x120979,_0x27f50c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x165d2d}):_0x120979[_0x27f50c]=_0x165d2d,W=(_0x46e418,_0x5052aa,_0x4061f9,_0x293215)=>{const _0x3dc0d9=_0x890958;for(var _0x891663=_0x293215>0x1?void 0x0:_0x293215?L(_0x5052aa,_0x4061f9):_0x5052aa,_0x29d688=_0x46e418[_0x3dc0d9(0x15d)]-0x1,_0x5a072b;_0x29d688>=0x0;_0x29d688--)(_0x5a072b=_0x46e418[_0x29d688])&&(_0x891663=_0x5a072b(_0x891663)||_0x891663);return _0x891663;},O=(_0x1dda03,_0x5407e4)=>(_0x5a4fee,_0x53b60e)=>_0x5407e4(_0x5a4fee,_0x53b60e,_0x1dda03),N=(_0x5ea4e4,_0x833d8e,_0x25bf42)=>Z(_0x5ea4e4,typeof _0x833d8e!=_0x890958(0x168)?_0x833d8e+'':_0x833d8e,_0x25bf42);exports[_0x890958(0x1a5)]=class extends c[_0x890958(0x155)]{constructor(_0x22b6de=D,_0x1556fe,_0x551ea6){const _0x3a9ced=_0x890958;super(),this['_config']=_0x22b6de,this[_0x3a9ced(0x192)]=_0x1556fe,this['_configService']=_0x551ea6;const {..._0x156a68}=c[_0x3a9ced(0x154)]({},D,this[_0x3a9ced(0x19c)]);this[_0x3a9ced(0x159)][_0x3a9ced(0x193)](q,_0x156a68);}['onStarting'](){const _0x3d513b=_0x890958;[[g],[C],[p]][_0x3d513b(0x1ba)](_0x1d4a67=>{const _0x168edb=_0x3d513b;this[_0x168edb(0x192)][_0x168edb(0x181)](_0x1d4a67);});}['onReady'](){const _0x515ea4=_0x890958;this[_0x515ea4(0x192)][_0x515ea4(0x197)](C),this[_0x515ea4(0x192)]['get'](p);}},N(exports[_0x890958(0x1a5)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x890958(0x161),c[_0x890958(0x1b6)][_0x890958(0x1aa)]),exports[_0x890958(0x1a5)]=W([c[_0x890958(0x1a7)](j[_0x890958(0x189)],b['UniverCollaborationClientPlugin'],T[_0x890958(0x16d)]),O(0x1,c[_0x890958(0x184)](c[_0x890958(0x18a)])),O(0x2,c[_0x890958(0x167)])],exports[_0x890958(0x1a5)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0xbf68e1=_0x1c41;(function(_0x2be46d,_0x201409){const _0x166ef4=_0x1c41,_0xe90126=_0x2be46d();while(!![]){try{const _0x18c2e5=parseInt(_0x166ef4(0x148))/0x1+-parseInt(_0x166ef4(0x14b))/0x2*(parseInt(_0x166ef4(0x14e))/0x3)+-parseInt(_0x166ef4(0x130))/0x4*(-parseInt(_0x166ef4(0x17b))/0x5)+parseInt(_0x166ef4(0x165))/0x6+-parseInt(_0x166ef4(0x121))/0x7*(parseInt(_0x166ef4(0x17a))/0x8)+parseInt(_0x166ef4(0x167))/0x9*(parseInt(_0x166ef4(0x14d))/0xa)+-parseInt(_0x166ef4(0x12e))/0xb;if(_0x18c2e5===_0x201409)break;else _0xe90126['push'](_0xe90126['shift']());}catch(_0x55eefc){_0xe90126['push'](_0xe90126['shift']());}}}(_0x39fc,0x3dc1c));import{CommentService as _0x24bf5a,CollaborationSessionService as _0x28cbe3,UniverCollaborationClientPlugin as _0x9525d4}from'@univerjs-pro/collaboration-client';function _0x39fc(){const _0x45054d=['post','_configService','ref','COMMENT','replies','get','getUser','defineProperty','/reply','921930HYOshG','forEach','549QiXcri','rangeType','symbol','Edit','content','user','_threadCommentModel','subscribe','OpenOrReOpen','_initUserSync','pipe','comments','disposeWithMe','parse','_threadCommentDataSourceService','/list','code','getOwnPropertyDescriptor','deleteComment','8cHYvvG','2502155fuuGXf','userId','/universer-api/user/list','slice','_initDataSource','onStarting','customRanges','addUser','Delete','updateComment','map','addComment','delete','getUnit','1170218oiFXSJ','getCurrentUser','body','stringify','length','personId','threadId','UNRECOGNIZED','_userService','userID','users','payload','_sessionService','648197DEFwbZ','add','4LUUVNH','resolveComment','Add','type','values','/solved','comment','setConfig','requireSession','_commentService','replyId','filter','error','/universer-api/comment/unit/','resolved','YYYY/MM/DD\x20HH:mm','getComment','_httpService','listComments','pluginName','root','solved','_config','/edit','138038DmcZue','Reply','/add','64850pfUMdo','Solved','17780OoBxTA','39WcDrPS','Solve','unitId','_injector','commentUpdate$','Unknown','format','_init','getMemberID','_threadCommentDataSource','reply','find','createTimestamp','/delete'];_0x39fc=function(){return _0x45054d;};return _0x39fc();}import{UniverLicensePlugin as _0x864633}from'@univerjs-pro/license';import{dayjs as _0x5e2681,UserManagerService as _0x4eab9e,Inject as _0x4f3a21,Injector as _0x8d5e07,Disposable as _0x5a933e,CustomRangeType as _0x1a431c,UniverInstanceType as _0x536cd8,DependentOn as _0x38802e,IConfigService as _0x350c90,Plugin as _0x32d5ff,merge as _0x40e613}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4b97b3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5aae77,IThreadCommentDataSourceService as _0xe116fb}from'@univerjs/thread-comment';import{bufferTime as _0x363eac}from'rxjs';import{HTTPService as _0x36f428}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3b924d=>(_0x3b924d[_0x3b924d['OpenOrReOpen']=0x0]=_0xbf68e1(0x16f),_0x3b924d[_0x3b924d[_0xbf68e1(0x14c)]=0x1]=_0xbf68e1(0x14c),_0x3b924d[_0x3b924d[_0xbf68e1(0x128)]=-0x1]='UNRECOGNIZED',_0x3b924d))(I||{}),v=(_0x3663c9=>(_0x3663c9[_0x3663c9[_0xbf68e1(0x153)]=0x0]='Unknown',_0x3663c9[_0x3663c9[_0xbf68e1(0x132)]=0x1]=_0xbf68e1(0x132),_0x3663c9[_0x3663c9[_0xbf68e1(0x149)]=0x2]='Reply',_0x3663c9[_0x3663c9[_0xbf68e1(0x16a)]=0x3]=_0xbf68e1(0x16a),_0x3663c9[_0x3663c9['Delete']=0x4]=_0xbf68e1(0x11b),_0x3663c9[_0x3663c9[_0xbf68e1(0x14f)]=0x5]='Solve',_0x3663c9[_0x3663c9[_0xbf68e1(0x128)]=-0x1]=_0xbf68e1(0x128),_0x3663c9))(v||{});const D=_0x13cf56=>_0x5e2681(new Date(+_0x13cf56))[_0xbf68e1(0x154)](_0xbf68e1(0x13f)),B=async(_0x2a7abd,_0xe2218c)=>{const _0x28c80b=_0xbf68e1,_0x4eb165=_0x2a7abd[_0x28c80b(0x161)](_0x4eab9e),_0xcb30bd=_0x2a7abd['get'](_0x36f428);_0xe2218c[_0x28c80b(0x166)](_0x4c3a2a=>{const _0x547855=_0x28c80b;_0x4eb165[_0x547855(0x162)](_0x4c3a2a)&&_0xe2218c[_0x547855(0x11f)](_0x4c3a2a);}),_0xe2218c['size']&&(await _0xcb30bd[_0x28c80b(0x161)](_0x28c80b(0x115),{'params':{'userIDs':[..._0xe2218c]}}))[_0x28c80b(0x123)]['users']['forEach'](_0x4e7eba=>{const _0x115dba=_0x28c80b;_0x4e7eba&&_0x4eb165[_0x115dba(0x11a)](_0x4e7eba);});};var K=Object[_0xbf68e1(0x178)],V=(_0x59a755,_0x382e52,_0x3f76e9,_0x5d4827)=>{const _0x3c7999=_0xbf68e1;for(var _0x429bc1=_0x5d4827>0x1?void 0x0:_0x5d4827?K(_0x382e52,_0x3f76e9):_0x382e52,_0x510dc0=_0x59a755[_0x3c7999(0x125)]-0x1,_0x253dc0;_0x510dc0>=0x0;_0x510dc0--)(_0x253dc0=_0x59a755[_0x510dc0])&&(_0x429bc1=_0x253dc0(_0x429bc1)||_0x429bc1);return _0x429bc1;},p=(_0x37ddb4,_0x5082f3)=>(_0x4d8057,_0x105950)=>_0x5082f3(_0x4d8057,_0x105950,_0x37ddb4);function _0x1c41(_0x396f2b,_0x59e721){const _0x39fc90=_0x39fc();return _0x1c41=function(_0x1c41d2,_0x4b933d){_0x1c41d2=_0x1c41d2-0x115;let _0x186892=_0x39fc90[_0x1c41d2];return _0x186892;},_0x1c41(_0x396f2b,_0x59e721);}let S=class extends _0x5a933e{constructor(_0x4e3d93,_0x3cd519,_0x4ab288,_0x1843ee){const _0x4f773d=_0xbf68e1;super(),this[_0x4f773d(0x139)]=_0x4e3d93,this[_0x4f773d(0x16d)]=_0x3cd519,this[_0x4f773d(0x129)]=_0x4ab288,this['_injector']=_0x1843ee,this[_0x4f773d(0x155)](),this[_0x4f773d(0x170)]();}['_initUserSync'](){const _0x1dd83a=_0xbf68e1;this[_0x1dd83a(0x173)](this[_0x1dd83a(0x16d)][_0x1dd83a(0x152)][_0x1dd83a(0x171)](_0x363eac(0x10))[_0x1dd83a(0x16e)](_0x112690=>{const _0x49d524=_0x1dd83a,_0x5479b=new Set();_0x112690[_0x49d524(0x166)](_0x20eec5=>{const _0x3ae9fa=_0x49d524;switch(_0x20eec5['type']){case _0x3ae9fa(0x12f):{const _0x4691de=_0x20eec5[_0x3ae9fa(0x12c)][_0x3ae9fa(0x126)];_0x5479b['add'](_0x4691de);break;}}}),B(this[_0x49d524(0x151)],_0x5479b);}));}[_0xbf68e1(0x155)](){const _0x487e35=_0xbf68e1;this['disposeWithMe'](this[_0x487e35(0x139)][_0x487e35(0x152)][_0x487e35(0x16e)](async _0x41f182=>{const _0x25ec51=_0x487e35;var _0x6e1861,_0x434a5c,_0x47cd03,_0x34fbfb;const _0x191590=(_0x6e1861=this[_0x25ec51(0x16d)][_0x25ec51(0x120)](_0x41f182[_0x25ec51(0x150)])[_0x25ec51(0x159)](_0x205a71=>_0x205a71[_0x25ec51(0x127)]===_0x41f182[_0x25ec51(0x127)]))==null?void 0x0:_0x6e1861[_0x25ec51(0x144)];if(!_0x191590)return;const {unitId:_0x1d2cf4,subUnitId:_0x554e0b}=_0x191590;switch(_0x41f182[_0x25ec51(0x16c)]&&this[_0x25ec51(0x129)][_0x25ec51(0x11a)](_0x41f182[_0x25ec51(0x16c)]),_0x41f182['type']){case v[_0x25ec51(0x132)]:break;case v[_0x25ec51(0x149)]:{this[_0x25ec51(0x16d)]['addComment'](_0x1d2cf4,_0x554e0b,{'unitId':_0x1d2cf4,'subUnitId':_0x554e0b,'ref':'','id':_0x41f182['replyId'],'dT':D(+_0x41f182[_0x25ec51(0x15a)]),'threadId':_0x41f182['threadId'],'personId':(_0x47cd03=(_0x434a5c=_0x41f182[_0x25ec51(0x16c)])==null?void 0x0:_0x434a5c[_0x25ec51(0x12a)])!=null?_0x47cd03:_0x41f182['userId'],'text':JSON[_0x25ec51(0x174)](_0x41f182['content']),'parentId':_0x191590['id']});break;}case v[_0x25ec51(0x11b)]:{const _0x2580ce=this[_0x25ec51(0x16d)][_0x25ec51(0x140)](_0x1d2cf4,_0x554e0b,_0x41f182[_0x25ec51(0x13a)]);_0x2580ce&&_0x2580ce['parentId']&&this[_0x25ec51(0x16d)][_0x25ec51(0x179)](_0x1d2cf4,_0x554e0b,_0x41f182['replyId']);break;}case v[_0x25ec51(0x16a)]:{this['_threadCommentModel'][_0x25ec51(0x11c)](_0x1d2cf4,_0x554e0b,{'commentId':_0x41f182['replyId'],'text':JSON[_0x25ec51(0x174)](_0x41f182['content'])});break;}case v[_0x25ec51(0x14f)]:{const _0x226b6d=(_0x34fbfb=this[_0x25ec51(0x16d)][_0x25ec51(0x120)](_0x41f182[_0x25ec51(0x150)])[_0x25ec51(0x159)](_0x1f0c9c=>_0x1f0c9c[_0x25ec51(0x127)]===_0x41f182['threadId']))==null?void 0x0:_0x34fbfb[_0x25ec51(0x144)];_0x226b6d&&this['_threadCommentModel'][_0x25ec51(0x131)](_0x1d2cf4,_0x554e0b,_0x226b6d['id'],_0x41f182['solved']===I[_0x25ec51(0x14c)]);break;}}}));}};S=V([p(0x0,_0x4f3a21(_0x24bf5a)),p(0x1,_0x4f3a21(_0x5aae77)),p(0x2,_0x4f3a21(_0x4eab9e)),p(0x3,_0x4f3a21(_0x8d5e07))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x255c02,_0xa0e69f,_0x25383d,_0x1519fd)=>{for(var _0x32de6a=_0x1519fd>0x1?void 0x0:_0x1519fd?k(_0xa0e69f,_0x25383d):_0xa0e69f,_0x48e18c=_0x255c02['length']-0x1,_0x28dfe3;_0x48e18c>=0x0;_0x48e18c--)(_0x28dfe3=_0x255c02[_0x48e18c])&&(_0x32de6a=_0x28dfe3(_0x32de6a)||_0x32de6a);return _0x32de6a;},_=(_0x3a289f,_0x1d6a32)=>(_0x37f1bb,_0x307b91)=>_0x1d6a32(_0x37f1bb,_0x307b91,_0x3a289f);function X(_0x40bf0a,_0x2abb47){const _0x14012f=_0xbf68e1,_0x217399=_0x40bf0a[_0x14012f(0x160)][0x0];return{..._0x2abb47,'id':_0x217399[_0x14012f(0x13a)],'resolved':_0x40bf0a[_0x14012f(0x145)]===0x1,'dT':D(_0x217399[_0x14012f(0x15a)]),'personId':_0x217399['userId'],'threadId':_0x217399[_0x14012f(0x127)]};}function ee(_0x1f96d6,_0x247b6f,_0x343b81){const _0x215786=_0xbf68e1;var _0x17e4e1,_0xbdea56;if(((_0xbdea56=(_0x17e4e1=_0x1f96d6==null?void 0x0:_0x1f96d6[_0x215786(0x160)])==null?void 0x0:_0x17e4e1[_0x215786(0x125)])!=null?_0xbdea56:0x0)>0x0){const _0x2bf7b7=(_0x8034a4,_0x4857c9)=>({'id':_0x8034a4[_0x215786(0x13a)],'threadId':_0x8034a4[_0x215786(0x127)],'dT':D(_0x8034a4[_0x215786(0x15a)]),'personId':_0x8034a4[_0x215786(0x17c)],'resolved':_0x1f96d6['solved']===I['Solved'],'unitId':_0x247b6f,'subUnitId':_0x343b81,'text':JSON['parse'](_0x8034a4[_0x215786(0x16b)]),'parentId':_0x4857c9}),_0x150b4b=_0x2bf7b7(_0x1f96d6[_0x215786(0x160)][0x0]);return{..._0x150b4b,'children':_0x1f96d6[_0x215786(0x160)][_0x215786(0x116)](0x1)[_0x215786(0x11d)](_0x234aaf=>_0x2bf7b7(_0x234aaf,_0x150b4b['id']))};}return null;}let f=class{constructor(_0xa200ee,_0x1df30a,_0x115f26,_0x2b7729){const _0x363a7c=_0xbf68e1;this[_0x363a7c(0x141)]=_0xa200ee,this[_0x363a7c(0x129)]=_0x1df30a,this[_0x363a7c(0x12d)]=_0x115f26,this[_0x363a7c(0x151)]=_0x2b7729;}async[_0xbf68e1(0x11e)](_0x11e6f4){const _0x3d6a56=_0xbf68e1;var _0x575978,_0x5f24cc;const {parentId:_0x110641,unitId:_0x342b4c,text:_0x252a1a,threadId:_0x400bad}=_0x11e6f4,_0x3bbe0b=(_0x5f24cc=(_0x575978=_0x252a1a[_0x3d6a56(0x119)])==null?void 0x0:_0x575978[_0x3d6a56(0x13b)](_0xe1f76a=>_0xe1f76a[_0x3d6a56(0x168)]===_0x1a431c[_0x3d6a56(0x15f)])['map'](_0xb1f29c=>_0xb1f29c['rangeId']))!=null?_0x5f24cc:[],_0x4ffe3c=JSON[_0x3d6a56(0x124)](_0x252a1a),_0x1e00d7=(await this[_0x3d6a56(0x12d)][_0x3d6a56(0x138)](_0x342b4c))[_0x3d6a56(0x156)]();if(_0x110641){const _0x31797d={'memberId':_0x1e00d7,'unitId':_0x342b4c,'content':_0x4ffe3c,'mention':_0x3bbe0b,'threadId':_0x400bad},_0x1784cc=(await this[_0x3d6a56(0x141)][_0x3d6a56(0x15c)](_0x3d6a56(0x13d)+_0x342b4c+_0x3d6a56(0x164),{'body':_0x31797d}))[_0x3d6a56(0x123)][_0x3d6a56(0x158)];return{..._0x11e6f4,'id':_0x1784cc[_0x3d6a56(0x13a)],'dT':_0x5e2681(+_0x1784cc[_0x3d6a56(0x15a)])[_0x3d6a56(0x154)](_0x3d6a56(0x13f)),'personId':_0x1784cc[_0x3d6a56(0x17c)]};}else{const _0x4f68be={'memberId':_0x1e00d7,'unitId':_0x342b4c,'content':_0x4ffe3c,'mention':_0x3bbe0b},_0x54ebc7=await this['_httpService'][_0x3d6a56(0x15c)]('/universer-api/comment/unit/'+_0x342b4c+_0x3d6a56(0x14a),{'body':_0x4f68be});return X(_0x54ebc7[_0x3d6a56(0x123)][_0x3d6a56(0x136)],_0x11e6f4);}}async['updateComment'](_0x77a8af){const _0x5229b8=_0xbf68e1;var _0x5942eb,_0x57cb38;const {text:_0x376793,unitId:_0x5c14d5}=_0x77a8af,_0x256637=(_0x57cb38=(_0x5942eb=_0x376793[_0x5229b8(0x119)])==null?void 0x0:_0x5942eb[_0x5229b8(0x13b)](_0x4fb5ce=>_0x4fb5ce['rangeType']===_0x1a431c[_0x5229b8(0x15f)])[_0x5229b8(0x11d)](_0x265ea5=>_0x265ea5['rangeId']))!=null?_0x57cb38:[],_0xe22770=JSON['stringify'](_0x376793),_0x58c073=_0x77a8af['threadId'],_0x370bc3=_0x77a8af['id'],_0x15b891={'memberId':(await this[_0x5229b8(0x12d)]['requireSession'](_0x5c14d5))[_0x5229b8(0x156)](),'unitId':_0x5c14d5,'threadId':_0x58c073,'mention':_0x256637,'content':_0xe22770,'replyId':_0x370bc3},_0x2d9d46=await this[_0x5229b8(0x141)][_0x5229b8(0x15c)](_0x5229b8(0x13d)+_0x5c14d5+_0x5229b8(0x147),{'body':_0x15b891});return!_0x2d9d46[_0x5229b8(0x123)][_0x5229b8(0x13c)]||_0x2d9d46[_0x5229b8(0x123)]['error'][_0x5229b8(0x177)]===0x1;}async[_0xbf68e1(0x131)](_0x47a996){const _0x1a038d=_0xbf68e1,{unitId:_0x476854}=_0x47a996,_0x339186=_0x47a996[_0x1a038d(0x127)],_0x2ba622={'memberId':this[_0x1a038d(0x129)][_0x1a038d(0x122)]()[_0x1a038d(0x12a)],'unitId':_0x476854,'threadId':_0x339186,'solved':_0x47a996[_0x1a038d(0x13e)]?I[_0x1a038d(0x14c)]:I['OpenOrReOpen']},_0x10bddc=await this[_0x1a038d(0x141)][_0x1a038d(0x15c)](_0x1a038d(0x13d)+_0x476854+_0x1a038d(0x135),{'body':_0x2ba622});return!_0x10bddc[_0x1a038d(0x123)][_0x1a038d(0x13c)]||_0x10bddc[_0x1a038d(0x123)][_0x1a038d(0x13c)]['code']===0x1;}async['deleteComment'](_0x3347b2,_0x2033d4,_0x1ef2bf,_0x29ebd5){const _0x344709=_0xbf68e1,_0x575194={'memberId':(await this['_sessionService'][_0x344709(0x138)](_0x3347b2))['getMemberID'](),'threadId':_0x1ef2bf,'replyId':_0x29ebd5,'unitId':_0x3347b2},_0x5e4cf6=await this[_0x344709(0x141)][_0x344709(0x15c)](_0x344709(0x13d)+_0x3347b2+_0x344709(0x15b),{'body':_0x575194});return!_0x5e4cf6[_0x344709(0x123)][_0x344709(0x13c)]||_0x5e4cf6['body'][_0x344709(0x13c)][_0x344709(0x177)]===0x1;}async[_0xbf68e1(0x142)](_0x42e936,_0x3cd446,_0x3e4fd3){const _0x1d2485=_0xbf68e1,_0xcf860f={'unitId':_0x42e936,'threadId':_0x3e4fd3},_0x1b0b49=await this[_0x1d2485(0x141)][_0x1d2485(0x15c)](_0x1d2485(0x13d)+_0x42e936+_0x1d2485(0x176),{'body':_0xcf860f}),_0x56c260=_0x3e4fd3[_0x1d2485(0x11d)](_0x46a2e1=>ee(_0x1b0b49[_0x1d2485(0x123)][_0x1d2485(0x172)][_0x46a2e1],_0x42e936,_0x3cd446))[_0x1d2485(0x13b)](Boolean);return Object[_0x1d2485(0x134)](_0x1b0b49[_0x1d2485(0x123)][_0x1d2485(0x12b)])[_0x1d2485(0x166)](_0x30ca58=>{const _0x256439=_0x1d2485;this[_0x256439(0x129)]['addUser'](_0x30ca58);}),_0x56c260;}['saveCommentToSnapshot'](_0x78d2e0){const _0x3a3e19=_0xbf68e1;return{'id':_0x78d2e0['id'],'threadId':_0x78d2e0['threadId'],'ref':_0x78d2e0[_0x3a3e19(0x15e)]};}};f=Q([_(0x0,_0x4f3a21(_0x36f428)),_(0x1,_0x4f3a21(_0x4eab9e)),_(0x2,_0x4f3a21(_0x28cbe3)),_(0x3,_0x4f3a21(_0x8d5e07))],f);var re=Object[_0xbf68e1(0x178)],te=(_0x5845b6,_0x46f690,_0x52b141,_0x453933)=>{const _0x11a8a0=_0xbf68e1;for(var _0x59b20d=_0x453933>0x1?void 0x0:_0x453933?re(_0x46f690,_0x52b141):_0x46f690,_0x4c4aa6=_0x5845b6[_0x11a8a0(0x125)]-0x1,_0x47346c;_0x4c4aa6>=0x0;_0x4c4aa6--)(_0x47346c=_0x5845b6[_0x4c4aa6])&&(_0x59b20d=_0x47346c(_0x59b20d)||_0x59b20d);return _0x59b20d;},N=(_0x19e5d2,_0x1686db)=>(_0x4d9ef4,_0x4d4a0b)=>_0x1686db(_0x4d9ef4,_0x4d4a0b,_0x19e5d2);let g=class extends _0x5a933e{constructor(_0x1386e0,_0x411940){const _0x2bb172=_0xbf68e1;super(),this[_0x2bb172(0x175)]=_0x1386e0,this['_threadCommentDataSource']=_0x411940,this[_0x2bb172(0x117)]();}[_0xbf68e1(0x117)](){const _0x4e4959=_0xbf68e1;this[_0x4e4959(0x175)]['dataSource']=this[_0x4e4959(0x157)],this[_0x4e4959(0x175)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xe116fb),N(0x1,_0x4f3a21(f))],g);var se=Object[_0xbf68e1(0x163)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x112488,_0x361639,_0x2ca661)=>_0x361639 in _0x112488?se(_0x112488,_0x361639,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2ca661}):_0x112488[_0x361639]=_0x2ca661,ie=(_0x3a3ca9,_0x1d8911,_0x27bba6,_0x1b3536)=>{const _0x6ec18d=_0xbf68e1;for(var _0x1fe28f=_0x1b3536>0x1?void 0x0:_0x1b3536?oe(_0x1d8911,_0x27bba6):_0x1d8911,_0x482e95=_0x3a3ca9[_0x6ec18d(0x125)]-0x1,_0x5d22af;_0x482e95>=0x0;_0x482e95--)(_0x5d22af=_0x3a3ca9[_0x482e95])&&(_0x1fe28f=_0x5d22af(_0x1fe28f)||_0x1fe28f);return _0x1fe28f;},w=(_0x113109,_0x126625)=>(_0x2189b3,_0x5ffa6f)=>_0x126625(_0x2189b3,_0x5ffa6f,_0x113109),$=(_0x11a43c,_0x456808,_0x189106)=>ne(_0x11a43c,typeof _0x456808!=_0xbf68e1(0x169)?_0x456808+'':_0x456808,_0x189106);let b=class extends _0x32d5ff{constructor(_0xb71a87=M,_0x17be08,_0x11d6f2){const _0x4d9ffd=_0xbf68e1;super(),this[_0x4d9ffd(0x146)]=_0xb71a87,this[_0x4d9ffd(0x151)]=_0x17be08,this[_0x4d9ffd(0x15d)]=_0x11d6f2;const {..._0x18e461}=_0x40e613({},M,this[_0x4d9ffd(0x146)]);this['_configService'][_0x4d9ffd(0x137)](z,_0x18e461);}[_0xbf68e1(0x118)](){const _0x3ad986=_0xbf68e1;[[f],[g],[S]][_0x3ad986(0x166)](_0x28bc58=>{const _0x3ca970=_0x3ad986;this[_0x3ca970(0x151)][_0x3ca970(0x12f)](_0x28bc58);});}['onReady'](){const _0x8738b8=_0xbf68e1;this[_0x8738b8(0x151)][_0x8738b8(0x161)](g),this[_0x8738b8(0x151)][_0x8738b8(0x161)](S);}};$(b,_0xbf68e1(0x143),W),$(b,_0xbf68e1(0x133),_0x536cd8['UNIVER_UNKNOWN']),b=ie([_0x38802e(_0x4b97b3,_0x9525d4,_0x864633),w(0x1,_0x4f3a21(_0x8d5e07)),w(0x2,_0x350c90)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x17b82a=_0x715e;(function(_0x4e841e,_0x5093c3){const _0x4231f1=_0x715e,_0x5cf7e7=_0x4e841e();while(!![]){try{const _0x599098=parseInt(_0x4231f1(0x101))/0x1*(parseInt(_0x4231f1(0x119))/0x2)+-parseInt(_0x4231f1(0x10a))/0x3+parseInt(_0x4231f1(0x10e))/0x4*(-parseInt(_0x4231f1(0xdb))/0x5)+parseInt(_0x4231f1(0xfc))/0x6+parseInt(_0x4231f1(0x11d))/0x7+parseInt(_0x4231f1(0x125))/0x8+parseInt(_0x4231f1(0x11a))/0x9;if(_0x599098===_0x5093c3)break;else _0x5cf7e7['push'](_0x5cf7e7['shift']());}catch(_0x44dfb1){_0x5cf7e7['push'](_0x5cf7e7['shift']());}}}(_0x3526,0x3a148));import{CommentService as _0x3a2a96,CollaborationSessionService as _0x19d43c,UniverCollaborationClientPlugin as _0x19e911}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x219f24}from'@univerjs-pro/license';import{dayjs as _0x3a7d70,UserManagerService as _0x350584,Inject as _0x4128a6,Injector as _0x4d52d5,Disposable as _0x546ddf,CustomRangeType as _0x25d92a,UniverInstanceType as _0x4c85bc,DependentOn as _0x5b1abb,IConfigService as _0x17181b,Plugin as _0x235c2b,merge as _0x5886d2}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x21ed2e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x37d2c5,IThreadCommentDataSourceService as _0xc19607}from'@univerjs/thread-comment';function _0x3526(){const _0x59ec1b=['userID','Edit','payload','_userService','pipe','parentId','addUser','content','getOwnPropertyDescriptor','_commentService','_configService','createTimestamp','218005HGGnsY','_initUserSync','UNRECOGNIZED','customRanges','format','stringify','_injector','resolveComment','symbol','code','Reply','COMMENT','_threadCommentModel','Solved','_sessionService','saveCommentToSnapshot','comment','/universer-api/comment/unit/','/add','threadId','root','unitId','deleteComment','reply','find','replies','commentUpdate$','thread-comment-data-source.config','_initDataSource','resolved','map','error','_threadCommentDataSource','20688TWdKlp','getMemberID','defineProperty','forEach','delete','17707HmUuaf','getUnit','addComment','body','_httpService','parse','type','subscribe','length','821046oVofEj','_threadCommentDataSourceService','solved','rangeId','4DzEzvr','listComments','/solved','rangeType','onReady','getUser','post','OpenOrReOpen','slice','Solve','_init','16sYPKRz','460431WaNFex','userId','YYYY/MM/DD\x20HH:mm','1138473wXHXfj','updateComment','/reply','filter','/list','_config','requireSession','disposeWithMe','1570216iBNWBR','Delete','getCurrentUser','/edit','Add','personId','users','get','getComment','add','setConfig','replyId','syncUpdateMutationToColla','size','UNIVER_UNKNOWN'];_0x3526=function(){return _0x59ec1b;};return _0x3526();}import{bufferTime as _0x2badf2}from'rxjs';import{HTTPService as _0x2b51a3}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4d95d1=>(_0x4d95d1[_0x4d95d1['OpenOrReOpen']=0x0]=_0x17b82a(0x115),_0x4d95d1[_0x4d95d1['Solved']=0x1]=_0x17b82a(0xe8),_0x4d95d1[_0x4d95d1[_0x17b82a(0xdd)]=-0x1]=_0x17b82a(0xdd),_0x4d95d1))(I||{}),v=(_0x205eb5=>(_0x205eb5[_0x205eb5['Unknown']=0x0]='Unknown',_0x205eb5[_0x205eb5[_0x17b82a(0x129)]=0x1]=_0x17b82a(0x129),_0x205eb5[_0x205eb5[_0x17b82a(0xe5)]=0x2]=_0x17b82a(0xe5),_0x205eb5[_0x205eb5[_0x17b82a(0x135)]=0x3]=_0x17b82a(0x135),_0x205eb5[_0x205eb5[_0x17b82a(0x126)]=0x4]='Delete',_0x205eb5[_0x205eb5[_0x17b82a(0x117)]=0x5]='Solve',_0x205eb5[_0x205eb5[_0x17b82a(0xdd)]=-0x1]=_0x17b82a(0xdd),_0x205eb5))(v||{});const D=_0x4ccf30=>_0x3a7d70(new Date(+_0x4ccf30))[_0x17b82a(0xdf)](_0x17b82a(0x11c)),B=async(_0xa869a1,_0x425d4a)=>{const _0x4e4138=_0x17b82a,_0x3b1afa=_0xa869a1['get'](_0x350584),_0xc624f5=_0xa869a1[_0x4e4138(0x12c)](_0x2b51a3);_0x425d4a[_0x4e4138(0xff)](_0x4623d6=>{const _0x511586=_0x4e4138;_0x3b1afa[_0x511586(0x113)](_0x4623d6)&&_0x425d4a[_0x511586(0x100)](_0x4623d6);}),_0x425d4a[_0x4e4138(0x132)]&&(await _0xc624f5['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x425d4a]}}))[_0x4e4138(0x104)][_0x4e4138(0x12b)][_0x4e4138(0xff)](_0x17cfb7=>{const _0xe8d197=_0x4e4138;_0x17cfb7&&_0x3b1afa[_0xe8d197(0x13a)](_0x17cfb7);});};var K=Object[_0x17b82a(0x13c)],V=(_0x4f079f,_0x162339,_0x41a461,_0x53c732)=>{const _0x5a1243=_0x17b82a;for(var _0x5628fd=_0x53c732>0x1?void 0x0:_0x53c732?K(_0x162339,_0x41a461):_0x162339,_0x46943f=_0x4f079f[_0x5a1243(0x109)]-0x1,_0x25b76c;_0x46943f>=0x0;_0x46943f--)(_0x25b76c=_0x4f079f[_0x46943f])&&(_0x5628fd=_0x25b76c(_0x5628fd)||_0x5628fd);return _0x5628fd;},p=(_0x4df034,_0x284f92)=>(_0x2a035c,_0x370215)=>_0x284f92(_0x2a035c,_0x370215,_0x4df034);let S=class extends _0x546ddf{constructor(_0xbc44d0,_0xd291ec,_0x1e5fdf,_0x55c841){const _0x2ff66b=_0x17b82a;super(),this[_0x2ff66b(0x13d)]=_0xbc44d0,this[_0x2ff66b(0xe7)]=_0xd291ec,this[_0x2ff66b(0x137)]=_0x1e5fdf,this[_0x2ff66b(0xe1)]=_0x55c841,this[_0x2ff66b(0x118)](),this[_0x2ff66b(0xdc)]();}['_initUserSync'](){const _0x42d530=_0x17b82a;this[_0x42d530(0x124)](this[_0x42d530(0xe7)][_0x42d530(0xf5)][_0x42d530(0x138)](_0x2badf2(0x10))[_0x42d530(0x108)](_0xec9880=>{const _0x5b74a0=_0x42d530,_0x1f3630=new Set();_0xec9880[_0x5b74a0(0xff)](_0x5b5c63=>{const _0x83a605=_0x5b74a0;switch(_0x5b5c63[_0x83a605(0x107)]){case'add':{const _0x23a8e9=_0x5b5c63[_0x83a605(0x136)][_0x83a605(0x12a)];_0x1f3630['add'](_0x23a8e9);break;}}}),B(this[_0x5b74a0(0xe1)],_0x1f3630);}));}[_0x17b82a(0x118)](){const _0x1649d0=_0x17b82a;this[_0x1649d0(0x124)](this[_0x1649d0(0x13d)][_0x1649d0(0xf5)]['subscribe'](async _0x5a4c20=>{const _0x9c2efe=_0x1649d0;var _0x3c4970,_0x44043c,_0x46a65a,_0x35900c;const _0x46d982=(_0x3c4970=this[_0x9c2efe(0xe7)][_0x9c2efe(0x102)](_0x5a4c20[_0x9c2efe(0xf0)])[_0x9c2efe(0xf3)](_0x3d8083=>_0x3d8083['threadId']===_0x5a4c20['threadId']))==null?void 0x0:_0x3c4970[_0x9c2efe(0xef)];if(!_0x46d982)return;const {unitId:_0x34a78a,subUnitId:_0x5ab8bb}=_0x46d982;switch(_0x5a4c20['user']&&this['_userService'][_0x9c2efe(0x13a)](_0x5a4c20['user']),_0x5a4c20['type']){case v[_0x9c2efe(0x129)]:break;case v[_0x9c2efe(0xe5)]:{this['_threadCommentModel']['addComment'](_0x34a78a,_0x5ab8bb,{'unitId':_0x34a78a,'subUnitId':_0x5ab8bb,'ref':'','id':_0x5a4c20[_0x9c2efe(0x130)],'dT':D(+_0x5a4c20[_0x9c2efe(0x13f)]),'threadId':_0x5a4c20['threadId'],'personId':(_0x46a65a=(_0x44043c=_0x5a4c20['user'])==null?void 0x0:_0x44043c[_0x9c2efe(0x134)])!=null?_0x46a65a:_0x5a4c20[_0x9c2efe(0x11b)],'text':JSON['parse'](_0x5a4c20[_0x9c2efe(0x13b)]),'parentId':_0x46d982['id']});break;}case v[_0x9c2efe(0x126)]:{const _0x16c9db=this[_0x9c2efe(0xe7)][_0x9c2efe(0x12d)](_0x34a78a,_0x5ab8bb,_0x5a4c20['replyId']);_0x16c9db&&_0x16c9db[_0x9c2efe(0x139)]&&this['_threadCommentModel'][_0x9c2efe(0xf1)](_0x34a78a,_0x5ab8bb,_0x5a4c20[_0x9c2efe(0x130)]);break;}case v[_0x9c2efe(0x135)]:{this['_threadCommentModel'][_0x9c2efe(0x11e)](_0x34a78a,_0x5ab8bb,{'commentId':_0x5a4c20[_0x9c2efe(0x130)],'text':JSON['parse'](_0x5a4c20[_0x9c2efe(0x13b)])});break;}case v[_0x9c2efe(0x117)]:{const _0x1041e3=(_0x35900c=this[_0x9c2efe(0xe7)][_0x9c2efe(0x102)](_0x5a4c20[_0x9c2efe(0xf0)])[_0x9c2efe(0xf3)](_0x567ac2=>_0x567ac2[_0x9c2efe(0xee)]===_0x5a4c20['threadId']))==null?void 0x0:_0x35900c['root'];_0x1041e3&&this['_threadCommentModel']['resolveComment'](_0x34a78a,_0x5ab8bb,_0x1041e3['id'],_0x5a4c20['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x4128a6(_0x3a2a96)),p(0x1,_0x4128a6(_0x37d2c5)),p(0x2,_0x4128a6(_0x350584)),p(0x3,_0x4128a6(_0x4d52d5))],S);const z=_0x17b82a(0xf6),M={};var k=Object[_0x17b82a(0x13c)],Q=(_0x201cde,_0x5b6cfc,_0x6091a1,_0x30641c)=>{for(var _0x5bde4f=_0x30641c>0x1?void 0x0:_0x30641c?k(_0x5b6cfc,_0x6091a1):_0x5b6cfc,_0x546446=_0x201cde['length']-0x1,_0x58c55f;_0x546446>=0x0;_0x546446--)(_0x58c55f=_0x201cde[_0x546446])&&(_0x5bde4f=_0x58c55f(_0x5bde4f)||_0x5bde4f);return _0x5bde4f;},_=(_0x168ac4,_0x4eaac1)=>(_0x44c667,_0x13dbaa)=>_0x4eaac1(_0x44c667,_0x13dbaa,_0x168ac4);function X(_0x44002b,_0x531905){const _0x357b0a=_0x17b82a,_0x412638=_0x44002b['replies'][0x0];return{..._0x531905,'id':_0x412638[_0x357b0a(0x130)],'resolved':_0x44002b[_0x357b0a(0x10c)]===0x1,'dT':D(_0x412638[_0x357b0a(0x13f)]),'personId':_0x412638[_0x357b0a(0x11b)],'threadId':_0x412638[_0x357b0a(0xee)]};}function ee(_0x2a5ea5,_0x33d41a,_0x518030){const _0x1eb974=_0x17b82a;var _0x42278c,_0x1f360d;if(((_0x1f360d=(_0x42278c=_0x2a5ea5==null?void 0x0:_0x2a5ea5[_0x1eb974(0xf4)])==null?void 0x0:_0x42278c['length'])!=null?_0x1f360d:0x0)>0x0){const _0x799fcf=(_0x440e38,_0x4b6841)=>({'id':_0x440e38['replyId'],'threadId':_0x440e38[_0x1eb974(0xee)],'dT':D(_0x440e38['createTimestamp']),'personId':_0x440e38['userId'],'resolved':_0x2a5ea5['solved']===I[_0x1eb974(0xe8)],'unitId':_0x33d41a,'subUnitId':_0x518030,'text':JSON[_0x1eb974(0x106)](_0x440e38[_0x1eb974(0x13b)]),'parentId':_0x4b6841}),_0x4c7cd2=_0x799fcf(_0x2a5ea5[_0x1eb974(0xf4)][0x0]);return{..._0x4c7cd2,'children':_0x2a5ea5[_0x1eb974(0xf4)][_0x1eb974(0x116)](0x1)[_0x1eb974(0xf9)](_0x4b8de7=>_0x799fcf(_0x4b8de7,_0x4c7cd2['id']))};}return null;}let f=class{constructor(_0x11b759,_0x162509,_0x1b9be4,_0x3e3a17){const _0x3ec8dd=_0x17b82a;this[_0x3ec8dd(0x105)]=_0x11b759,this['_userService']=_0x162509,this['_sessionService']=_0x1b9be4,this[_0x3ec8dd(0xe1)]=_0x3e3a17;}async[_0x17b82a(0x103)](_0x239561){const _0x526c73=_0x17b82a;var _0x4d0b4b,_0x326e59;const {parentId:_0x2c42fe,unitId:_0x2c695e,text:_0x4990f4,threadId:_0x589601}=_0x239561,_0x515fc7=(_0x326e59=(_0x4d0b4b=_0x4990f4[_0x526c73(0xde)])==null?void 0x0:_0x4d0b4b[_0x526c73(0x120)](_0x15d9e5=>_0x15d9e5[_0x526c73(0x111)]===_0x25d92a['COMMENT'])[_0x526c73(0xf9)](_0x4aa213=>_0x4aa213[_0x526c73(0x10d)]))!=null?_0x326e59:[],_0x2866f1=JSON['stringify'](_0x4990f4),_0x4e53c9=(await this['_sessionService'][_0x526c73(0x123)](_0x2c695e))[_0x526c73(0xfd)]();if(_0x2c42fe){const _0x4660e8={'memberId':_0x4e53c9,'unitId':_0x2c695e,'content':_0x2866f1,'mention':_0x515fc7,'threadId':_0x589601},_0x3b052c=(await this[_0x526c73(0x105)][_0x526c73(0x114)](_0x526c73(0xec)+_0x2c695e+_0x526c73(0x11f),{'body':_0x4660e8}))['body'][_0x526c73(0xf2)];return{..._0x239561,'id':_0x3b052c[_0x526c73(0x130)],'dT':_0x3a7d70(+_0x3b052c[_0x526c73(0x13f)])[_0x526c73(0xdf)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3b052c[_0x526c73(0x11b)]};}else{const _0x1545b0={'memberId':_0x4e53c9,'unitId':_0x2c695e,'content':_0x2866f1,'mention':_0x515fc7},_0x315eef=await this[_0x526c73(0x105)][_0x526c73(0x114)](_0x526c73(0xec)+_0x2c695e+_0x526c73(0xed),{'body':_0x1545b0});return X(_0x315eef[_0x526c73(0x104)][_0x526c73(0xeb)],_0x239561);}}async['updateComment'](_0x31f3e6){const _0x3e815c=_0x17b82a;var _0xc710d5,_0x123d96;const {text:_0x3c1cfb,unitId:_0x579cbb}=_0x31f3e6,_0x66ea90=(_0x123d96=(_0xc710d5=_0x3c1cfb[_0x3e815c(0xde)])==null?void 0x0:_0xc710d5[_0x3e815c(0x120)](_0x261fa0=>_0x261fa0['rangeType']===_0x25d92a[_0x3e815c(0xe6)])[_0x3e815c(0xf9)](_0x2801ed=>_0x2801ed[_0x3e815c(0x10d)]))!=null?_0x123d96:[],_0x2650db=JSON[_0x3e815c(0xe0)](_0x3c1cfb),_0x320fd1=_0x31f3e6[_0x3e815c(0xee)],_0x5cfc65=_0x31f3e6['id'],_0x20cf92={'memberId':(await this['_sessionService'][_0x3e815c(0x123)](_0x579cbb))[_0x3e815c(0xfd)](),'unitId':_0x579cbb,'threadId':_0x320fd1,'mention':_0x66ea90,'content':_0x2650db,'replyId':_0x5cfc65},_0x3d8281=await this[_0x3e815c(0x105)]['post'](_0x3e815c(0xec)+_0x579cbb+_0x3e815c(0x128),{'body':_0x20cf92});return!_0x3d8281[_0x3e815c(0x104)][_0x3e815c(0xfa)]||_0x3d8281['body'][_0x3e815c(0xfa)][_0x3e815c(0xe4)]===0x1;}async[_0x17b82a(0xe2)](_0x160dc3){const _0x3a08bf=_0x17b82a,{unitId:_0x54ec44}=_0x160dc3,_0x561c86=_0x160dc3['threadId'],_0x3929b8={'memberId':this[_0x3a08bf(0x137)][_0x3a08bf(0x127)]()[_0x3a08bf(0x134)],'unitId':_0x54ec44,'threadId':_0x561c86,'solved':_0x160dc3[_0x3a08bf(0xf8)]?I[_0x3a08bf(0xe8)]:I['OpenOrReOpen']},_0x2bcc31=await this['_httpService']['post'](_0x3a08bf(0xec)+_0x54ec44+_0x3a08bf(0x110),{'body':_0x3929b8});return!_0x2bcc31['body']['error']||_0x2bcc31[_0x3a08bf(0x104)][_0x3a08bf(0xfa)][_0x3a08bf(0xe4)]===0x1;}async[_0x17b82a(0xf1)](_0x2c537b,_0x1769e2,_0xd79cf0,_0xae8210){const _0x277173=_0x17b82a,_0x517b21={'memberId':(await this[_0x277173(0xe9)]['requireSession'](_0x2c537b))[_0x277173(0xfd)](),'threadId':_0xd79cf0,'replyId':_0xae8210,'unitId':_0x2c537b},_0x2c754c=await this[_0x277173(0x105)][_0x277173(0x114)](_0x277173(0xec)+_0x2c537b+'/delete',{'body':_0x517b21});return!_0x2c754c[_0x277173(0x104)][_0x277173(0xfa)]||_0x2c754c[_0x277173(0x104)]['error'][_0x277173(0xe4)]===0x1;}async[_0x17b82a(0x10f)](_0xd04887,_0x20e1a7,_0x4d8c57){const _0x4a02e8=_0x17b82a,_0x46a642={'unitId':_0xd04887,'threadId':_0x4d8c57},_0x2218f1=await this[_0x4a02e8(0x105)][_0x4a02e8(0x114)](_0x4a02e8(0xec)+_0xd04887+_0x4a02e8(0x121),{'body':_0x46a642}),_0x291b60=_0x4d8c57['map'](_0x5c9938=>ee(_0x2218f1[_0x4a02e8(0x104)]['comments'][_0x5c9938],_0xd04887,_0x20e1a7))['filter'](Boolean);return Object['values'](_0x2218f1[_0x4a02e8(0x104)][_0x4a02e8(0x12b)])[_0x4a02e8(0xff)](_0x2ae379=>{const _0x248b37=_0x4a02e8;this['_userService'][_0x248b37(0x13a)](_0x2ae379);}),_0x291b60;}[_0x17b82a(0xea)](_0x2ef80f){const _0x3ba083=_0x17b82a;return{'id':_0x2ef80f['id'],'threadId':_0x2ef80f[_0x3ba083(0xee)],'ref':_0x2ef80f['ref']};}};f=Q([_(0x0,_0x4128a6(_0x2b51a3)),_(0x1,_0x4128a6(_0x350584)),_(0x2,_0x4128a6(_0x19d43c)),_(0x3,_0x4128a6(_0x4d52d5))],f);var re=Object[_0x17b82a(0x13c)],te=(_0x3237b3,_0x46db88,_0x317ff0,_0x56def5)=>{const _0x26e7a3=_0x17b82a;for(var _0x21217a=_0x56def5>0x1?void 0x0:_0x56def5?re(_0x46db88,_0x317ff0):_0x46db88,_0x38599d=_0x3237b3[_0x26e7a3(0x109)]-0x1,_0x31a63f;_0x38599d>=0x0;_0x38599d--)(_0x31a63f=_0x3237b3[_0x38599d])&&(_0x21217a=_0x31a63f(_0x21217a)||_0x21217a);return _0x21217a;},N=(_0x44bb67,_0x1c0ee4)=>(_0x4307ff,_0x11b61d)=>_0x1c0ee4(_0x4307ff,_0x11b61d,_0x44bb67);let g=class extends _0x546ddf{constructor(_0x17ec65,_0x2e1056){const _0x1360f4=_0x17b82a;super(),this['_threadCommentDataSourceService']=_0x17ec65,this[_0x1360f4(0xfb)]=_0x2e1056,this[_0x1360f4(0xf7)]();}['_initDataSource'](){const _0x51b820=_0x17b82a;this['_threadCommentDataSourceService']['dataSource']=this[_0x51b820(0xfb)],this[_0x51b820(0x10b)][_0x51b820(0x131)]=!0x1;}};g=te([N(0x0,_0xc19607),N(0x1,_0x4128a6(f))],g);var se=Object[_0x17b82a(0xfe)],oe=Object[_0x17b82a(0x13c)],ne=(_0x143215,_0xa11d85,_0x40d424)=>_0xa11d85 in _0x143215?se(_0x143215,_0xa11d85,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40d424}):_0x143215[_0xa11d85]=_0x40d424,ie=(_0x14492c,_0x2b7a57,_0x515b3a,_0x1e5748)=>{const _0x34b283=_0x17b82a;for(var _0x7ac608=_0x1e5748>0x1?void 0x0:_0x1e5748?oe(_0x2b7a57,_0x515b3a):_0x2b7a57,_0x29c895=_0x14492c[_0x34b283(0x109)]-0x1,_0x2acb9c;_0x29c895>=0x0;_0x29c895--)(_0x2acb9c=_0x14492c[_0x29c895])&&(_0x7ac608=_0x2acb9c(_0x7ac608)||_0x7ac608);return _0x7ac608;},w=(_0x73ddf8,_0x2e2ce9)=>(_0x326606,_0x41f52e)=>_0x2e2ce9(_0x326606,_0x41f52e,_0x73ddf8),$=(_0x20fb44,_0x3a98f1,_0x3d057b)=>ne(_0x20fb44,typeof _0x3a98f1!=_0x17b82a(0xe3)?_0x3a98f1+'':_0x3a98f1,_0x3d057b);let b=class extends _0x235c2b{constructor(_0xf7fdcd=M,_0x152b1f,_0xad410a){const _0x4108e=_0x17b82a;super(),this['_config']=_0xf7fdcd,this[_0x4108e(0xe1)]=_0x152b1f,this[_0x4108e(0x13e)]=_0xad410a;const {..._0x2e14f7}=_0x5886d2({},M,this[_0x4108e(0x122)]);this[_0x4108e(0x13e)][_0x4108e(0x12f)](z,_0x2e14f7);}['onStarting'](){const _0x1d298c=_0x17b82a;[[f],[g],[S]][_0x1d298c(0xff)](_0xc98e7e=>{const _0x119e64=_0x1d298c;this[_0x119e64(0xe1)][_0x119e64(0x12e)](_0xc98e7e);});}[_0x17b82a(0x112)](){const _0x45abec=_0x17b82a;this[_0x45abec(0xe1)][_0x45abec(0x12c)](g),this[_0x45abec(0xe1)]['get'](S);}};function _0x715e(_0x1869f7,_0x394278){const _0x352680=_0x3526();return _0x715e=function(_0x715e5a,_0x59550c){_0x715e5a=_0x715e5a-0xdb;let _0x2ef194=_0x352680[_0x715e5a];return _0x2ef194;},_0x715e(_0x1869f7,_0x394278);}$(b,'pluginName',W),$(b,_0x17b82a(0x107),_0x4c85bc[_0x17b82a(0x133)]),b=ie([_0x5b1abb(_0x21ed2e,_0x19e911,_0x219f24),w(0x1,_0x4128a6(_0x4d52d5)),w(0x2,_0x17181b)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0xbf68e1=_0x1c41;(function(_0x2be46d,_0x201409){const _0x166ef4=_0x1c41,_0xe90126=_0x2be46d();while(!![]){try{const _0x18c2e5=parseInt(_0x166ef4(0x148))/0x1+-parseInt(_0x166ef4(0x14b))/0x2*(parseInt(_0x166ef4(0x14e))/0x3)+-parseInt(_0x166ef4(0x130))/0x4*(-parseInt(_0x166ef4(0x17b))/0x5)+parseInt(_0x166ef4(0x165))/0x6+-parseInt(_0x166ef4(0x121))/0x7*(parseInt(_0x166ef4(0x17a))/0x8)+parseInt(_0x166ef4(0x167))/0x9*(parseInt(_0x166ef4(0x14d))/0xa)+-parseInt(_0x166ef4(0x12e))/0xb;if(_0x18c2e5===_0x201409)break;else _0xe90126['push'](_0xe90126['shift']());}catch(_0x55eefc){_0xe90126['push'](_0xe90126['shift']());}}}(_0x39fc,0x3dc1c));import{CommentService as _0x24bf5a,CollaborationSessionService as _0x28cbe3,UniverCollaborationClientPlugin as _0x9525d4}from'@univerjs-pro/collaboration-client';function _0x39fc(){const _0x45054d=['post','_configService','ref','COMMENT','replies','get','getUser','defineProperty','/reply','921930HYOshG','forEach','549QiXcri','rangeType','symbol','Edit','content','user','_threadCommentModel','subscribe','OpenOrReOpen','_initUserSync','pipe','comments','disposeWithMe','parse','_threadCommentDataSourceService','/list','code','getOwnPropertyDescriptor','deleteComment','8cHYvvG','2502155fuuGXf','userId','/universer-api/user/list','slice','_initDataSource','onStarting','customRanges','addUser','Delete','updateComment','map','addComment','delete','getUnit','1170218oiFXSJ','getCurrentUser','body','stringify','length','personId','threadId','UNRECOGNIZED','_userService','userID','users','payload','_sessionService','648197DEFwbZ','add','4LUUVNH','resolveComment','Add','type','values','/solved','comment','setConfig','requireSession','_commentService','replyId','filter','error','/universer-api/comment/unit/','resolved','YYYY/MM/DD\x20HH:mm','getComment','_httpService','listComments','pluginName','root','solved','_config','/edit','138038DmcZue','Reply','/add','64850pfUMdo','Solved','17780OoBxTA','39WcDrPS','Solve','unitId','_injector','commentUpdate$','Unknown','format','_init','getMemberID','_threadCommentDataSource','reply','find','createTimestamp','/delete'];_0x39fc=function(){return _0x45054d;};return _0x39fc();}import{UniverLicensePlugin as _0x864633}from'@univerjs-pro/license';import{dayjs as _0x5e2681,UserManagerService as _0x4eab9e,Inject as _0x4f3a21,Injector as _0x8d5e07,Disposable as _0x5a933e,CustomRangeType as _0x1a431c,UniverInstanceType as _0x536cd8,DependentOn as _0x38802e,IConfigService as _0x350c90,Plugin as _0x32d5ff,merge as _0x40e613}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4b97b3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5aae77,IThreadCommentDataSourceService as _0xe116fb}from'@univerjs/thread-comment';import{bufferTime as _0x363eac}from'rxjs';import{HTTPService as _0x36f428}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3b924d=>(_0x3b924d[_0x3b924d['OpenOrReOpen']=0x0]=_0xbf68e1(0x16f),_0x3b924d[_0x3b924d[_0xbf68e1(0x14c)]=0x1]=_0xbf68e1(0x14c),_0x3b924d[_0x3b924d[_0xbf68e1(0x128)]=-0x1]='UNRECOGNIZED',_0x3b924d))(I||{}),v=(_0x3663c9=>(_0x3663c9[_0x3663c9[_0xbf68e1(0x153)]=0x0]='Unknown',_0x3663c9[_0x3663c9[_0xbf68e1(0x132)]=0x1]=_0xbf68e1(0x132),_0x3663c9[_0x3663c9[_0xbf68e1(0x149)]=0x2]='Reply',_0x3663c9[_0x3663c9[_0xbf68e1(0x16a)]=0x3]=_0xbf68e1(0x16a),_0x3663c9[_0x3663c9['Delete']=0x4]=_0xbf68e1(0x11b),_0x3663c9[_0x3663c9[_0xbf68e1(0x14f)]=0x5]='Solve',_0x3663c9[_0x3663c9[_0xbf68e1(0x128)]=-0x1]=_0xbf68e1(0x128),_0x3663c9))(v||{});const D=_0x13cf56=>_0x5e2681(new Date(+_0x13cf56))[_0xbf68e1(0x154)](_0xbf68e1(0x13f)),B=async(_0x2a7abd,_0xe2218c)=>{const _0x28c80b=_0xbf68e1,_0x4eb165=_0x2a7abd[_0x28c80b(0x161)](_0x4eab9e),_0xcb30bd=_0x2a7abd['get'](_0x36f428);_0xe2218c[_0x28c80b(0x166)](_0x4c3a2a=>{const _0x547855=_0x28c80b;_0x4eb165[_0x547855(0x162)](_0x4c3a2a)&&_0xe2218c[_0x547855(0x11f)](_0x4c3a2a);}),_0xe2218c['size']&&(await _0xcb30bd[_0x28c80b(0x161)](_0x28c80b(0x115),{'params':{'userIDs':[..._0xe2218c]}}))[_0x28c80b(0x123)]['users']['forEach'](_0x4e7eba=>{const _0x115dba=_0x28c80b;_0x4e7eba&&_0x4eb165[_0x115dba(0x11a)](_0x4e7eba);});};var K=Object[_0xbf68e1(0x178)],V=(_0x59a755,_0x382e52,_0x3f76e9,_0x5d4827)=>{const _0x3c7999=_0xbf68e1;for(var _0x429bc1=_0x5d4827>0x1?void 0x0:_0x5d4827?K(_0x382e52,_0x3f76e9):_0x382e52,_0x510dc0=_0x59a755[_0x3c7999(0x125)]-0x1,_0x253dc0;_0x510dc0>=0x0;_0x510dc0--)(_0x253dc0=_0x59a755[_0x510dc0])&&(_0x429bc1=_0x253dc0(_0x429bc1)||_0x429bc1);return _0x429bc1;},p=(_0x37ddb4,_0x5082f3)=>(_0x4d8057,_0x105950)=>_0x5082f3(_0x4d8057,_0x105950,_0x37ddb4);function _0x1c41(_0x396f2b,_0x59e721){const _0x39fc90=_0x39fc();return _0x1c41=function(_0x1c41d2,_0x4b933d){_0x1c41d2=_0x1c41d2-0x115;let _0x186892=_0x39fc90[_0x1c41d2];return _0x186892;},_0x1c41(_0x396f2b,_0x59e721);}let S=class extends _0x5a933e{constructor(_0x4e3d93,_0x3cd519,_0x4ab288,_0x1843ee){const _0x4f773d=_0xbf68e1;super(),this[_0x4f773d(0x139)]=_0x4e3d93,this[_0x4f773d(0x16d)]=_0x3cd519,this[_0x4f773d(0x129)]=_0x4ab288,this['_injector']=_0x1843ee,this[_0x4f773d(0x155)](),this[_0x4f773d(0x170)]();}['_initUserSync'](){const _0x1dd83a=_0xbf68e1;this[_0x1dd83a(0x173)](this[_0x1dd83a(0x16d)][_0x1dd83a(0x152)][_0x1dd83a(0x171)](_0x363eac(0x10))[_0x1dd83a(0x16e)](_0x112690=>{const _0x49d524=_0x1dd83a,_0x5479b=new Set();_0x112690[_0x49d524(0x166)](_0x20eec5=>{const _0x3ae9fa=_0x49d524;switch(_0x20eec5['type']){case _0x3ae9fa(0x12f):{const _0x4691de=_0x20eec5[_0x3ae9fa(0x12c)][_0x3ae9fa(0x126)];_0x5479b['add'](_0x4691de);break;}}}),B(this[_0x49d524(0x151)],_0x5479b);}));}[_0xbf68e1(0x155)](){const _0x487e35=_0xbf68e1;this['disposeWithMe'](this[_0x487e35(0x139)][_0x487e35(0x152)][_0x487e35(0x16e)](async _0x41f182=>{const _0x25ec51=_0x487e35;var _0x6e1861,_0x434a5c,_0x47cd03,_0x34fbfb;const _0x191590=(_0x6e1861=this[_0x25ec51(0x16d)][_0x25ec51(0x120)](_0x41f182[_0x25ec51(0x150)])[_0x25ec51(0x159)](_0x205a71=>_0x205a71[_0x25ec51(0x127)]===_0x41f182[_0x25ec51(0x127)]))==null?void 0x0:_0x6e1861[_0x25ec51(0x144)];if(!_0x191590)return;const {unitId:_0x1d2cf4,subUnitId:_0x554e0b}=_0x191590;switch(_0x41f182[_0x25ec51(0x16c)]&&this[_0x25ec51(0x129)][_0x25ec51(0x11a)](_0x41f182[_0x25ec51(0x16c)]),_0x41f182['type']){case v[_0x25ec51(0x132)]:break;case v[_0x25ec51(0x149)]:{this[_0x25ec51(0x16d)]['addComment'](_0x1d2cf4,_0x554e0b,{'unitId':_0x1d2cf4,'subUnitId':_0x554e0b,'ref':'','id':_0x41f182['replyId'],'dT':D(+_0x41f182[_0x25ec51(0x15a)]),'threadId':_0x41f182['threadId'],'personId':(_0x47cd03=(_0x434a5c=_0x41f182[_0x25ec51(0x16c)])==null?void 0x0:_0x434a5c[_0x25ec51(0x12a)])!=null?_0x47cd03:_0x41f182['userId'],'text':JSON[_0x25ec51(0x174)](_0x41f182['content']),'parentId':_0x191590['id']});break;}case v[_0x25ec51(0x11b)]:{const _0x2580ce=this[_0x25ec51(0x16d)][_0x25ec51(0x140)](_0x1d2cf4,_0x554e0b,_0x41f182[_0x25ec51(0x13a)]);_0x2580ce&&_0x2580ce['parentId']&&this[_0x25ec51(0x16d)][_0x25ec51(0x179)](_0x1d2cf4,_0x554e0b,_0x41f182['replyId']);break;}case v[_0x25ec51(0x16a)]:{this['_threadCommentModel'][_0x25ec51(0x11c)](_0x1d2cf4,_0x554e0b,{'commentId':_0x41f182['replyId'],'text':JSON[_0x25ec51(0x174)](_0x41f182['content'])});break;}case v[_0x25ec51(0x14f)]:{const _0x226b6d=(_0x34fbfb=this[_0x25ec51(0x16d)][_0x25ec51(0x120)](_0x41f182[_0x25ec51(0x150)])[_0x25ec51(0x159)](_0x1f0c9c=>_0x1f0c9c[_0x25ec51(0x127)]===_0x41f182['threadId']))==null?void 0x0:_0x34fbfb[_0x25ec51(0x144)];_0x226b6d&&this['_threadCommentModel'][_0x25ec51(0x131)](_0x1d2cf4,_0x554e0b,_0x226b6d['id'],_0x41f182['solved']===I[_0x25ec51(0x14c)]);break;}}}));}};S=V([p(0x0,_0x4f3a21(_0x24bf5a)),p(0x1,_0x4f3a21(_0x5aae77)),p(0x2,_0x4f3a21(_0x4eab9e)),p(0x3,_0x4f3a21(_0x8d5e07))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x255c02,_0xa0e69f,_0x25383d,_0x1519fd)=>{for(var _0x32de6a=_0x1519fd>0x1?void 0x0:_0x1519fd?k(_0xa0e69f,_0x25383d):_0xa0e69f,_0x48e18c=_0x255c02['length']-0x1,_0x28dfe3;_0x48e18c>=0x0;_0x48e18c--)(_0x28dfe3=_0x255c02[_0x48e18c])&&(_0x32de6a=_0x28dfe3(_0x32de6a)||_0x32de6a);return _0x32de6a;},_=(_0x3a289f,_0x1d6a32)=>(_0x37f1bb,_0x307b91)=>_0x1d6a32(_0x37f1bb,_0x307b91,_0x3a289f);function X(_0x40bf0a,_0x2abb47){const _0x14012f=_0xbf68e1,_0x217399=_0x40bf0a[_0x14012f(0x160)][0x0];return{..._0x2abb47,'id':_0x217399[_0x14012f(0x13a)],'resolved':_0x40bf0a[_0x14012f(0x145)]===0x1,'dT':D(_0x217399[_0x14012f(0x15a)]),'personId':_0x217399['userId'],'threadId':_0x217399[_0x14012f(0x127)]};}function ee(_0x1f96d6,_0x247b6f,_0x343b81){const _0x215786=_0xbf68e1;var _0x17e4e1,_0xbdea56;if(((_0xbdea56=(_0x17e4e1=_0x1f96d6==null?void 0x0:_0x1f96d6[_0x215786(0x160)])==null?void 0x0:_0x17e4e1[_0x215786(0x125)])!=null?_0xbdea56:0x0)>0x0){const _0x2bf7b7=(_0x8034a4,_0x4857c9)=>({'id':_0x8034a4[_0x215786(0x13a)],'threadId':_0x8034a4[_0x215786(0x127)],'dT':D(_0x8034a4[_0x215786(0x15a)]),'personId':_0x8034a4[_0x215786(0x17c)],'resolved':_0x1f96d6['solved']===I['Solved'],'unitId':_0x247b6f,'subUnitId':_0x343b81,'text':JSON['parse'](_0x8034a4[_0x215786(0x16b)]),'parentId':_0x4857c9}),_0x150b4b=_0x2bf7b7(_0x1f96d6[_0x215786(0x160)][0x0]);return{..._0x150b4b,'children':_0x1f96d6[_0x215786(0x160)][_0x215786(0x116)](0x1)[_0x215786(0x11d)](_0x234aaf=>_0x2bf7b7(_0x234aaf,_0x150b4b['id']))};}return null;}let f=class{constructor(_0xa200ee,_0x1df30a,_0x115f26,_0x2b7729){const _0x363a7c=_0xbf68e1;this[_0x363a7c(0x141)]=_0xa200ee,this[_0x363a7c(0x129)]=_0x1df30a,this[_0x363a7c(0x12d)]=_0x115f26,this[_0x363a7c(0x151)]=_0x2b7729;}async[_0xbf68e1(0x11e)](_0x11e6f4){const _0x3d6a56=_0xbf68e1;var _0x575978,_0x5f24cc;const {parentId:_0x110641,unitId:_0x342b4c,text:_0x252a1a,threadId:_0x400bad}=_0x11e6f4,_0x3bbe0b=(_0x5f24cc=(_0x575978=_0x252a1a[_0x3d6a56(0x119)])==null?void 0x0:_0x575978[_0x3d6a56(0x13b)](_0xe1f76a=>_0xe1f76a[_0x3d6a56(0x168)]===_0x1a431c[_0x3d6a56(0x15f)])['map'](_0xb1f29c=>_0xb1f29c['rangeId']))!=null?_0x5f24cc:[],_0x4ffe3c=JSON[_0x3d6a56(0x124)](_0x252a1a),_0x1e00d7=(await this[_0x3d6a56(0x12d)][_0x3d6a56(0x138)](_0x342b4c))[_0x3d6a56(0x156)]();if(_0x110641){const _0x31797d={'memberId':_0x1e00d7,'unitId':_0x342b4c,'content':_0x4ffe3c,'mention':_0x3bbe0b,'threadId':_0x400bad},_0x1784cc=(await this[_0x3d6a56(0x141)][_0x3d6a56(0x15c)](_0x3d6a56(0x13d)+_0x342b4c+_0x3d6a56(0x164),{'body':_0x31797d}))[_0x3d6a56(0x123)][_0x3d6a56(0x158)];return{..._0x11e6f4,'id':_0x1784cc[_0x3d6a56(0x13a)],'dT':_0x5e2681(+_0x1784cc[_0x3d6a56(0x15a)])[_0x3d6a56(0x154)](_0x3d6a56(0x13f)),'personId':_0x1784cc[_0x3d6a56(0x17c)]};}else{const _0x4f68be={'memberId':_0x1e00d7,'unitId':_0x342b4c,'content':_0x4ffe3c,'mention':_0x3bbe0b},_0x54ebc7=await this['_httpService'][_0x3d6a56(0x15c)]('/universer-api/comment/unit/'+_0x342b4c+_0x3d6a56(0x14a),{'body':_0x4f68be});return X(_0x54ebc7[_0x3d6a56(0x123)][_0x3d6a56(0x136)],_0x11e6f4);}}async['updateComment'](_0x77a8af){const _0x5229b8=_0xbf68e1;var _0x5942eb,_0x57cb38;const {text:_0x376793,unitId:_0x5c14d5}=_0x77a8af,_0x256637=(_0x57cb38=(_0x5942eb=_0x376793[_0x5229b8(0x119)])==null?void 0x0:_0x5942eb[_0x5229b8(0x13b)](_0x4fb5ce=>_0x4fb5ce['rangeType']===_0x1a431c[_0x5229b8(0x15f)])[_0x5229b8(0x11d)](_0x265ea5=>_0x265ea5['rangeId']))!=null?_0x57cb38:[],_0xe22770=JSON['stringify'](_0x376793),_0x58c073=_0x77a8af['threadId'],_0x370bc3=_0x77a8af['id'],_0x15b891={'memberId':(await this[_0x5229b8(0x12d)]['requireSession'](_0x5c14d5))[_0x5229b8(0x156)](),'unitId':_0x5c14d5,'threadId':_0x58c073,'mention':_0x256637,'content':_0xe22770,'replyId':_0x370bc3},_0x2d9d46=await this[_0x5229b8(0x141)][_0x5229b8(0x15c)](_0x5229b8(0x13d)+_0x5c14d5+_0x5229b8(0x147),{'body':_0x15b891});return!_0x2d9d46[_0x5229b8(0x123)][_0x5229b8(0x13c)]||_0x2d9d46[_0x5229b8(0x123)]['error'][_0x5229b8(0x177)]===0x1;}async[_0xbf68e1(0x131)](_0x47a996){const _0x1a038d=_0xbf68e1,{unitId:_0x476854}=_0x47a996,_0x339186=_0x47a996[_0x1a038d(0x127)],_0x2ba622={'memberId':this[_0x1a038d(0x129)][_0x1a038d(0x122)]()[_0x1a038d(0x12a)],'unitId':_0x476854,'threadId':_0x339186,'solved':_0x47a996[_0x1a038d(0x13e)]?I[_0x1a038d(0x14c)]:I['OpenOrReOpen']},_0x10bddc=await this[_0x1a038d(0x141)][_0x1a038d(0x15c)](_0x1a038d(0x13d)+_0x476854+_0x1a038d(0x135),{'body':_0x2ba622});return!_0x10bddc[_0x1a038d(0x123)][_0x1a038d(0x13c)]||_0x10bddc[_0x1a038d(0x123)][_0x1a038d(0x13c)]['code']===0x1;}async['deleteComment'](_0x3347b2,_0x2033d4,_0x1ef2bf,_0x29ebd5){const _0x344709=_0xbf68e1,_0x575194={'memberId':(await this['_sessionService'][_0x344709(0x138)](_0x3347b2))['getMemberID'](),'threadId':_0x1ef2bf,'replyId':_0x29ebd5,'unitId':_0x3347b2},_0x5e4cf6=await this[_0x344709(0x141)][_0x344709(0x15c)](_0x344709(0x13d)+_0x3347b2+_0x344709(0x15b),{'body':_0x575194});return!_0x5e4cf6[_0x344709(0x123)][_0x344709(0x13c)]||_0x5e4cf6['body'][_0x344709(0x13c)][_0x344709(0x177)]===0x1;}async[_0xbf68e1(0x142)](_0x42e936,_0x3cd446,_0x3e4fd3){const _0x1d2485=_0xbf68e1,_0xcf860f={'unitId':_0x42e936,'threadId':_0x3e4fd3},_0x1b0b49=await this[_0x1d2485(0x141)][_0x1d2485(0x15c)](_0x1d2485(0x13d)+_0x42e936+_0x1d2485(0x176),{'body':_0xcf860f}),_0x56c260=_0x3e4fd3[_0x1d2485(0x11d)](_0x46a2e1=>ee(_0x1b0b49[_0x1d2485(0x123)][_0x1d2485(0x172)][_0x46a2e1],_0x42e936,_0x3cd446))[_0x1d2485(0x13b)](Boolean);return Object[_0x1d2485(0x134)](_0x1b0b49[_0x1d2485(0x123)][_0x1d2485(0x12b)])[_0x1d2485(0x166)](_0x30ca58=>{const _0x256439=_0x1d2485;this[_0x256439(0x129)]['addUser'](_0x30ca58);}),_0x56c260;}['saveCommentToSnapshot'](_0x78d2e0){const _0x3a3e19=_0xbf68e1;return{'id':_0x78d2e0['id'],'threadId':_0x78d2e0['threadId'],'ref':_0x78d2e0[_0x3a3e19(0x15e)]};}};f=Q([_(0x0,_0x4f3a21(_0x36f428)),_(0x1,_0x4f3a21(_0x4eab9e)),_(0x2,_0x4f3a21(_0x28cbe3)),_(0x3,_0x4f3a21(_0x8d5e07))],f);var re=Object[_0xbf68e1(0x178)],te=(_0x5845b6,_0x46f690,_0x52b141,_0x453933)=>{const _0x11a8a0=_0xbf68e1;for(var _0x59b20d=_0x453933>0x1?void 0x0:_0x453933?re(_0x46f690,_0x52b141):_0x46f690,_0x4c4aa6=_0x5845b6[_0x11a8a0(0x125)]-0x1,_0x47346c;_0x4c4aa6>=0x0;_0x4c4aa6--)(_0x47346c=_0x5845b6[_0x4c4aa6])&&(_0x59b20d=_0x47346c(_0x59b20d)||_0x59b20d);return _0x59b20d;},N=(_0x19e5d2,_0x1686db)=>(_0x4d9ef4,_0x4d4a0b)=>_0x1686db(_0x4d9ef4,_0x4d4a0b,_0x19e5d2);let g=class extends _0x5a933e{constructor(_0x1386e0,_0x411940){const _0x2bb172=_0xbf68e1;super(),this[_0x2bb172(0x175)]=_0x1386e0,this['_threadCommentDataSource']=_0x411940,this[_0x2bb172(0x117)]();}[_0xbf68e1(0x117)](){const _0x4e4959=_0xbf68e1;this[_0x4e4959(0x175)]['dataSource']=this[_0x4e4959(0x157)],this[_0x4e4959(0x175)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xe116fb),N(0x1,_0x4f3a21(f))],g);var se=Object[_0xbf68e1(0x163)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x112488,_0x361639,_0x2ca661)=>_0x361639 in _0x112488?se(_0x112488,_0x361639,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2ca661}):_0x112488[_0x361639]=_0x2ca661,ie=(_0x3a3ca9,_0x1d8911,_0x27bba6,_0x1b3536)=>{const _0x6ec18d=_0xbf68e1;for(var _0x1fe28f=_0x1b3536>0x1?void 0x0:_0x1b3536?oe(_0x1d8911,_0x27bba6):_0x1d8911,_0x482e95=_0x3a3ca9[_0x6ec18d(0x125)]-0x1,_0x5d22af;_0x482e95>=0x0;_0x482e95--)(_0x5d22af=_0x3a3ca9[_0x482e95])&&(_0x1fe28f=_0x5d22af(_0x1fe28f)||_0x1fe28f);return _0x1fe28f;},w=(_0x113109,_0x126625)=>(_0x2189b3,_0x5ffa6f)=>_0x126625(_0x2189b3,_0x5ffa6f,_0x113109),$=(_0x11a43c,_0x456808,_0x189106)=>ne(_0x11a43c,typeof _0x456808!=_0xbf68e1(0x169)?_0x456808+'':_0x456808,_0x189106);let b=class extends _0x32d5ff{constructor(_0xb71a87=M,_0x17be08,_0x11d6f2){const _0x4d9ffd=_0xbf68e1;super(),this[_0x4d9ffd(0x146)]=_0xb71a87,this[_0x4d9ffd(0x151)]=_0x17be08,this[_0x4d9ffd(0x15d)]=_0x11d6f2;const {..._0x18e461}=_0x40e613({},M,this[_0x4d9ffd(0x146)]);this['_configService'][_0x4d9ffd(0x137)](z,_0x18e461);}[_0xbf68e1(0x118)](){const _0x3ad986=_0xbf68e1;[[f],[g],[S]][_0x3ad986(0x166)](_0x28bc58=>{const _0x3ca970=_0x3ad986;this[_0x3ca970(0x151)][_0x3ca970(0x12f)](_0x28bc58);});}['onReady'](){const _0x8738b8=_0xbf68e1;this[_0x8738b8(0x151)][_0x8738b8(0x161)](g),this[_0x8738b8(0x151)][_0x8738b8(0x161)](S);}};$(b,_0xbf68e1(0x143),W),$(b,_0xbf68e1(0x133),_0x536cd8['UNIVER_UNKNOWN']),b=ie([_0x38802e(_0x4b97b3,_0x9525d4,_0x864633),w(0x1,_0x4f3a21(_0x8d5e07)),w(0x2,_0x350c90)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x17b82a=_0x715e;(function(_0x4e841e,_0x5093c3){const _0x4231f1=_0x715e,_0x5cf7e7=_0x4e841e();while(!![]){try{const _0x599098=parseInt(_0x4231f1(0x101))/0x1*(parseInt(_0x4231f1(0x119))/0x2)+-parseInt(_0x4231f1(0x10a))/0x3+parseInt(_0x4231f1(0x10e))/0x4*(-parseInt(_0x4231f1(0xdb))/0x5)+parseInt(_0x4231f1(0xfc))/0x6+parseInt(_0x4231f1(0x11d))/0x7+parseInt(_0x4231f1(0x125))/0x8+parseInt(_0x4231f1(0x11a))/0x9;if(_0x599098===_0x5093c3)break;else _0x5cf7e7['push'](_0x5cf7e7['shift']());}catch(_0x44dfb1){_0x5cf7e7['push'](_0x5cf7e7['shift']());}}}(_0x3526,0x3a148));import{CommentService as _0x3a2a96,CollaborationSessionService as _0x19d43c,UniverCollaborationClientPlugin as _0x19e911}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x219f24}from'@univerjs-pro/license';import{dayjs as _0x3a7d70,UserManagerService as _0x350584,Inject as _0x4128a6,Injector as _0x4d52d5,Disposable as _0x546ddf,CustomRangeType as _0x25d92a,UniverInstanceType as _0x4c85bc,DependentOn as _0x5b1abb,IConfigService as _0x17181b,Plugin as _0x235c2b,merge as _0x5886d2}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x21ed2e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x37d2c5,IThreadCommentDataSourceService as _0xc19607}from'@univerjs/thread-comment';function _0x3526(){const _0x59ec1b=['userID','Edit','payload','_userService','pipe','parentId','addUser','content','getOwnPropertyDescriptor','_commentService','_configService','createTimestamp','218005HGGnsY','_initUserSync','UNRECOGNIZED','customRanges','format','stringify','_injector','resolveComment','symbol','code','Reply','COMMENT','_threadCommentModel','Solved','_sessionService','saveCommentToSnapshot','comment','/universer-api/comment/unit/','/add','threadId','root','unitId','deleteComment','reply','find','replies','commentUpdate$','thread-comment-data-source.config','_initDataSource','resolved','map','error','_threadCommentDataSource','20688TWdKlp','getMemberID','defineProperty','forEach','delete','17707HmUuaf','getUnit','addComment','body','_httpService','parse','type','subscribe','length','821046oVofEj','_threadCommentDataSourceService','solved','rangeId','4DzEzvr','listComments','/solved','rangeType','onReady','getUser','post','OpenOrReOpen','slice','Solve','_init','16sYPKRz','460431WaNFex','userId','YYYY/MM/DD\x20HH:mm','1138473wXHXfj','updateComment','/reply','filter','/list','_config','requireSession','disposeWithMe','1570216iBNWBR','Delete','getCurrentUser','/edit','Add','personId','users','get','getComment','add','setConfig','replyId','syncUpdateMutationToColla','size','UNIVER_UNKNOWN'];_0x3526=function(){return _0x59ec1b;};return _0x3526();}import{bufferTime as _0x2badf2}from'rxjs';import{HTTPService as _0x2b51a3}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4d95d1=>(_0x4d95d1[_0x4d95d1['OpenOrReOpen']=0x0]=_0x17b82a(0x115),_0x4d95d1[_0x4d95d1['Solved']=0x1]=_0x17b82a(0xe8),_0x4d95d1[_0x4d95d1[_0x17b82a(0xdd)]=-0x1]=_0x17b82a(0xdd),_0x4d95d1))(I||{}),v=(_0x205eb5=>(_0x205eb5[_0x205eb5['Unknown']=0x0]='Unknown',_0x205eb5[_0x205eb5[_0x17b82a(0x129)]=0x1]=_0x17b82a(0x129),_0x205eb5[_0x205eb5[_0x17b82a(0xe5)]=0x2]=_0x17b82a(0xe5),_0x205eb5[_0x205eb5[_0x17b82a(0x135)]=0x3]=_0x17b82a(0x135),_0x205eb5[_0x205eb5[_0x17b82a(0x126)]=0x4]='Delete',_0x205eb5[_0x205eb5[_0x17b82a(0x117)]=0x5]='Solve',_0x205eb5[_0x205eb5[_0x17b82a(0xdd)]=-0x1]=_0x17b82a(0xdd),_0x205eb5))(v||{});const D=_0x4ccf30=>_0x3a7d70(new Date(+_0x4ccf30))[_0x17b82a(0xdf)](_0x17b82a(0x11c)),B=async(_0xa869a1,_0x425d4a)=>{const _0x4e4138=_0x17b82a,_0x3b1afa=_0xa869a1['get'](_0x350584),_0xc624f5=_0xa869a1[_0x4e4138(0x12c)](_0x2b51a3);_0x425d4a[_0x4e4138(0xff)](_0x4623d6=>{const _0x511586=_0x4e4138;_0x3b1afa[_0x511586(0x113)](_0x4623d6)&&_0x425d4a[_0x511586(0x100)](_0x4623d6);}),_0x425d4a[_0x4e4138(0x132)]&&(await _0xc624f5['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x425d4a]}}))[_0x4e4138(0x104)][_0x4e4138(0x12b)][_0x4e4138(0xff)](_0x17cfb7=>{const _0xe8d197=_0x4e4138;_0x17cfb7&&_0x3b1afa[_0xe8d197(0x13a)](_0x17cfb7);});};var K=Object[_0x17b82a(0x13c)],V=(_0x4f079f,_0x162339,_0x41a461,_0x53c732)=>{const _0x5a1243=_0x17b82a;for(var _0x5628fd=_0x53c732>0x1?void 0x0:_0x53c732?K(_0x162339,_0x41a461):_0x162339,_0x46943f=_0x4f079f[_0x5a1243(0x109)]-0x1,_0x25b76c;_0x46943f>=0x0;_0x46943f--)(_0x25b76c=_0x4f079f[_0x46943f])&&(_0x5628fd=_0x25b76c(_0x5628fd)||_0x5628fd);return _0x5628fd;},p=(_0x4df034,_0x284f92)=>(_0x2a035c,_0x370215)=>_0x284f92(_0x2a035c,_0x370215,_0x4df034);let S=class extends _0x546ddf{constructor(_0xbc44d0,_0xd291ec,_0x1e5fdf,_0x55c841){const _0x2ff66b=_0x17b82a;super(),this[_0x2ff66b(0x13d)]=_0xbc44d0,this[_0x2ff66b(0xe7)]=_0xd291ec,this[_0x2ff66b(0x137)]=_0x1e5fdf,this[_0x2ff66b(0xe1)]=_0x55c841,this[_0x2ff66b(0x118)](),this[_0x2ff66b(0xdc)]();}['_initUserSync'](){const _0x42d530=_0x17b82a;this[_0x42d530(0x124)](this[_0x42d530(0xe7)][_0x42d530(0xf5)][_0x42d530(0x138)](_0x2badf2(0x10))[_0x42d530(0x108)](_0xec9880=>{const _0x5b74a0=_0x42d530,_0x1f3630=new Set();_0xec9880[_0x5b74a0(0xff)](_0x5b5c63=>{const _0x83a605=_0x5b74a0;switch(_0x5b5c63[_0x83a605(0x107)]){case'add':{const _0x23a8e9=_0x5b5c63[_0x83a605(0x136)][_0x83a605(0x12a)];_0x1f3630['add'](_0x23a8e9);break;}}}),B(this[_0x5b74a0(0xe1)],_0x1f3630);}));}[_0x17b82a(0x118)](){const _0x1649d0=_0x17b82a;this[_0x1649d0(0x124)](this[_0x1649d0(0x13d)][_0x1649d0(0xf5)]['subscribe'](async _0x5a4c20=>{const _0x9c2efe=_0x1649d0;var _0x3c4970,_0x44043c,_0x46a65a,_0x35900c;const _0x46d982=(_0x3c4970=this[_0x9c2efe(0xe7)][_0x9c2efe(0x102)](_0x5a4c20[_0x9c2efe(0xf0)])[_0x9c2efe(0xf3)](_0x3d8083=>_0x3d8083['threadId']===_0x5a4c20['threadId']))==null?void 0x0:_0x3c4970[_0x9c2efe(0xef)];if(!_0x46d982)return;const {unitId:_0x34a78a,subUnitId:_0x5ab8bb}=_0x46d982;switch(_0x5a4c20['user']&&this['_userService'][_0x9c2efe(0x13a)](_0x5a4c20['user']),_0x5a4c20['type']){case v[_0x9c2efe(0x129)]:break;case v[_0x9c2efe(0xe5)]:{this['_threadCommentModel']['addComment'](_0x34a78a,_0x5ab8bb,{'unitId':_0x34a78a,'subUnitId':_0x5ab8bb,'ref':'','id':_0x5a4c20[_0x9c2efe(0x130)],'dT':D(+_0x5a4c20[_0x9c2efe(0x13f)]),'threadId':_0x5a4c20['threadId'],'personId':(_0x46a65a=(_0x44043c=_0x5a4c20['user'])==null?void 0x0:_0x44043c[_0x9c2efe(0x134)])!=null?_0x46a65a:_0x5a4c20[_0x9c2efe(0x11b)],'text':JSON['parse'](_0x5a4c20[_0x9c2efe(0x13b)]),'parentId':_0x46d982['id']});break;}case v[_0x9c2efe(0x126)]:{const _0x16c9db=this[_0x9c2efe(0xe7)][_0x9c2efe(0x12d)](_0x34a78a,_0x5ab8bb,_0x5a4c20['replyId']);_0x16c9db&&_0x16c9db[_0x9c2efe(0x139)]&&this['_threadCommentModel'][_0x9c2efe(0xf1)](_0x34a78a,_0x5ab8bb,_0x5a4c20[_0x9c2efe(0x130)]);break;}case v[_0x9c2efe(0x135)]:{this['_threadCommentModel'][_0x9c2efe(0x11e)](_0x34a78a,_0x5ab8bb,{'commentId':_0x5a4c20[_0x9c2efe(0x130)],'text':JSON['parse'](_0x5a4c20[_0x9c2efe(0x13b)])});break;}case v[_0x9c2efe(0x117)]:{const _0x1041e3=(_0x35900c=this[_0x9c2efe(0xe7)][_0x9c2efe(0x102)](_0x5a4c20[_0x9c2efe(0xf0)])[_0x9c2efe(0xf3)](_0x567ac2=>_0x567ac2[_0x9c2efe(0xee)]===_0x5a4c20['threadId']))==null?void 0x0:_0x35900c['root'];_0x1041e3&&this['_threadCommentModel']['resolveComment'](_0x34a78a,_0x5ab8bb,_0x1041e3['id'],_0x5a4c20['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x4128a6(_0x3a2a96)),p(0x1,_0x4128a6(_0x37d2c5)),p(0x2,_0x4128a6(_0x350584)),p(0x3,_0x4128a6(_0x4d52d5))],S);const z=_0x17b82a(0xf6),M={};var k=Object[_0x17b82a(0x13c)],Q=(_0x201cde,_0x5b6cfc,_0x6091a1,_0x30641c)=>{for(var _0x5bde4f=_0x30641c>0x1?void 0x0:_0x30641c?k(_0x5b6cfc,_0x6091a1):_0x5b6cfc,_0x546446=_0x201cde['length']-0x1,_0x58c55f;_0x546446>=0x0;_0x546446--)(_0x58c55f=_0x201cde[_0x546446])&&(_0x5bde4f=_0x58c55f(_0x5bde4f)||_0x5bde4f);return _0x5bde4f;},_=(_0x168ac4,_0x4eaac1)=>(_0x44c667,_0x13dbaa)=>_0x4eaac1(_0x44c667,_0x13dbaa,_0x168ac4);function X(_0x44002b,_0x531905){const _0x357b0a=_0x17b82a,_0x412638=_0x44002b['replies'][0x0];return{..._0x531905,'id':_0x412638[_0x357b0a(0x130)],'resolved':_0x44002b[_0x357b0a(0x10c)]===0x1,'dT':D(_0x412638[_0x357b0a(0x13f)]),'personId':_0x412638[_0x357b0a(0x11b)],'threadId':_0x412638[_0x357b0a(0xee)]};}function ee(_0x2a5ea5,_0x33d41a,_0x518030){const _0x1eb974=_0x17b82a;var _0x42278c,_0x1f360d;if(((_0x1f360d=(_0x42278c=_0x2a5ea5==null?void 0x0:_0x2a5ea5[_0x1eb974(0xf4)])==null?void 0x0:_0x42278c['length'])!=null?_0x1f360d:0x0)>0x0){const _0x799fcf=(_0x440e38,_0x4b6841)=>({'id':_0x440e38['replyId'],'threadId':_0x440e38[_0x1eb974(0xee)],'dT':D(_0x440e38['createTimestamp']),'personId':_0x440e38['userId'],'resolved':_0x2a5ea5['solved']===I[_0x1eb974(0xe8)],'unitId':_0x33d41a,'subUnitId':_0x518030,'text':JSON[_0x1eb974(0x106)](_0x440e38[_0x1eb974(0x13b)]),'parentId':_0x4b6841}),_0x4c7cd2=_0x799fcf(_0x2a5ea5[_0x1eb974(0xf4)][0x0]);return{..._0x4c7cd2,'children':_0x2a5ea5[_0x1eb974(0xf4)][_0x1eb974(0x116)](0x1)[_0x1eb974(0xf9)](_0x4b8de7=>_0x799fcf(_0x4b8de7,_0x4c7cd2['id']))};}return null;}let f=class{constructor(_0x11b759,_0x162509,_0x1b9be4,_0x3e3a17){const _0x3ec8dd=_0x17b82a;this[_0x3ec8dd(0x105)]=_0x11b759,this['_userService']=_0x162509,this['_sessionService']=_0x1b9be4,this[_0x3ec8dd(0xe1)]=_0x3e3a17;}async[_0x17b82a(0x103)](_0x239561){const _0x526c73=_0x17b82a;var _0x4d0b4b,_0x326e59;const {parentId:_0x2c42fe,unitId:_0x2c695e,text:_0x4990f4,threadId:_0x589601}=_0x239561,_0x515fc7=(_0x326e59=(_0x4d0b4b=_0x4990f4[_0x526c73(0xde)])==null?void 0x0:_0x4d0b4b[_0x526c73(0x120)](_0x15d9e5=>_0x15d9e5[_0x526c73(0x111)]===_0x25d92a['COMMENT'])[_0x526c73(0xf9)](_0x4aa213=>_0x4aa213[_0x526c73(0x10d)]))!=null?_0x326e59:[],_0x2866f1=JSON['stringify'](_0x4990f4),_0x4e53c9=(await this['_sessionService'][_0x526c73(0x123)](_0x2c695e))[_0x526c73(0xfd)]();if(_0x2c42fe){const _0x4660e8={'memberId':_0x4e53c9,'unitId':_0x2c695e,'content':_0x2866f1,'mention':_0x515fc7,'threadId':_0x589601},_0x3b052c=(await this[_0x526c73(0x105)][_0x526c73(0x114)](_0x526c73(0xec)+_0x2c695e+_0x526c73(0x11f),{'body':_0x4660e8}))['body'][_0x526c73(0xf2)];return{..._0x239561,'id':_0x3b052c[_0x526c73(0x130)],'dT':_0x3a7d70(+_0x3b052c[_0x526c73(0x13f)])[_0x526c73(0xdf)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3b052c[_0x526c73(0x11b)]};}else{const _0x1545b0={'memberId':_0x4e53c9,'unitId':_0x2c695e,'content':_0x2866f1,'mention':_0x515fc7},_0x315eef=await this[_0x526c73(0x105)][_0x526c73(0x114)](_0x526c73(0xec)+_0x2c695e+_0x526c73(0xed),{'body':_0x1545b0});return X(_0x315eef[_0x526c73(0x104)][_0x526c73(0xeb)],_0x239561);}}async['updateComment'](_0x31f3e6){const _0x3e815c=_0x17b82a;var _0xc710d5,_0x123d96;const {text:_0x3c1cfb,unitId:_0x579cbb}=_0x31f3e6,_0x66ea90=(_0x123d96=(_0xc710d5=_0x3c1cfb[_0x3e815c(0xde)])==null?void 0x0:_0xc710d5[_0x3e815c(0x120)](_0x261fa0=>_0x261fa0['rangeType']===_0x25d92a[_0x3e815c(0xe6)])[_0x3e815c(0xf9)](_0x2801ed=>_0x2801ed[_0x3e815c(0x10d)]))!=null?_0x123d96:[],_0x2650db=JSON[_0x3e815c(0xe0)](_0x3c1cfb),_0x320fd1=_0x31f3e6[_0x3e815c(0xee)],_0x5cfc65=_0x31f3e6['id'],_0x20cf92={'memberId':(await this['_sessionService'][_0x3e815c(0x123)](_0x579cbb))[_0x3e815c(0xfd)](),'unitId':_0x579cbb,'threadId':_0x320fd1,'mention':_0x66ea90,'content':_0x2650db,'replyId':_0x5cfc65},_0x3d8281=await this[_0x3e815c(0x105)]['post'](_0x3e815c(0xec)+_0x579cbb+_0x3e815c(0x128),{'body':_0x20cf92});return!_0x3d8281[_0x3e815c(0x104)][_0x3e815c(0xfa)]||_0x3d8281['body'][_0x3e815c(0xfa)][_0x3e815c(0xe4)]===0x1;}async[_0x17b82a(0xe2)](_0x160dc3){const _0x3a08bf=_0x17b82a,{unitId:_0x54ec44}=_0x160dc3,_0x561c86=_0x160dc3['threadId'],_0x3929b8={'memberId':this[_0x3a08bf(0x137)][_0x3a08bf(0x127)]()[_0x3a08bf(0x134)],'unitId':_0x54ec44,'threadId':_0x561c86,'solved':_0x160dc3[_0x3a08bf(0xf8)]?I[_0x3a08bf(0xe8)]:I['OpenOrReOpen']},_0x2bcc31=await this['_httpService']['post'](_0x3a08bf(0xec)+_0x54ec44+_0x3a08bf(0x110),{'body':_0x3929b8});return!_0x2bcc31['body']['error']||_0x2bcc31[_0x3a08bf(0x104)][_0x3a08bf(0xfa)][_0x3a08bf(0xe4)]===0x1;}async[_0x17b82a(0xf1)](_0x2c537b,_0x1769e2,_0xd79cf0,_0xae8210){const _0x277173=_0x17b82a,_0x517b21={'memberId':(await this[_0x277173(0xe9)]['requireSession'](_0x2c537b))[_0x277173(0xfd)](),'threadId':_0xd79cf0,'replyId':_0xae8210,'unitId':_0x2c537b},_0x2c754c=await this[_0x277173(0x105)][_0x277173(0x114)](_0x277173(0xec)+_0x2c537b+'/delete',{'body':_0x517b21});return!_0x2c754c[_0x277173(0x104)][_0x277173(0xfa)]||_0x2c754c[_0x277173(0x104)]['error'][_0x277173(0xe4)]===0x1;}async[_0x17b82a(0x10f)](_0xd04887,_0x20e1a7,_0x4d8c57){const _0x4a02e8=_0x17b82a,_0x46a642={'unitId':_0xd04887,'threadId':_0x4d8c57},_0x2218f1=await this[_0x4a02e8(0x105)][_0x4a02e8(0x114)](_0x4a02e8(0xec)+_0xd04887+_0x4a02e8(0x121),{'body':_0x46a642}),_0x291b60=_0x4d8c57['map'](_0x5c9938=>ee(_0x2218f1[_0x4a02e8(0x104)]['comments'][_0x5c9938],_0xd04887,_0x20e1a7))['filter'](Boolean);return Object['values'](_0x2218f1[_0x4a02e8(0x104)][_0x4a02e8(0x12b)])[_0x4a02e8(0xff)](_0x2ae379=>{const _0x248b37=_0x4a02e8;this['_userService'][_0x248b37(0x13a)](_0x2ae379);}),_0x291b60;}[_0x17b82a(0xea)](_0x2ef80f){const _0x3ba083=_0x17b82a;return{'id':_0x2ef80f['id'],'threadId':_0x2ef80f[_0x3ba083(0xee)],'ref':_0x2ef80f['ref']};}};f=Q([_(0x0,_0x4128a6(_0x2b51a3)),_(0x1,_0x4128a6(_0x350584)),_(0x2,_0x4128a6(_0x19d43c)),_(0x3,_0x4128a6(_0x4d52d5))],f);var re=Object[_0x17b82a(0x13c)],te=(_0x3237b3,_0x46db88,_0x317ff0,_0x56def5)=>{const _0x26e7a3=_0x17b82a;for(var _0x21217a=_0x56def5>0x1?void 0x0:_0x56def5?re(_0x46db88,_0x317ff0):_0x46db88,_0x38599d=_0x3237b3[_0x26e7a3(0x109)]-0x1,_0x31a63f;_0x38599d>=0x0;_0x38599d--)(_0x31a63f=_0x3237b3[_0x38599d])&&(_0x21217a=_0x31a63f(_0x21217a)||_0x21217a);return _0x21217a;},N=(_0x44bb67,_0x1c0ee4)=>(_0x4307ff,_0x11b61d)=>_0x1c0ee4(_0x4307ff,_0x11b61d,_0x44bb67);let g=class extends _0x546ddf{constructor(_0x17ec65,_0x2e1056){const _0x1360f4=_0x17b82a;super(),this['_threadCommentDataSourceService']=_0x17ec65,this[_0x1360f4(0xfb)]=_0x2e1056,this[_0x1360f4(0xf7)]();}['_initDataSource'](){const _0x51b820=_0x17b82a;this['_threadCommentDataSourceService']['dataSource']=this[_0x51b820(0xfb)],this[_0x51b820(0x10b)][_0x51b820(0x131)]=!0x1;}};g=te([N(0x0,_0xc19607),N(0x1,_0x4128a6(f))],g);var se=Object[_0x17b82a(0xfe)],oe=Object[_0x17b82a(0x13c)],ne=(_0x143215,_0xa11d85,_0x40d424)=>_0xa11d85 in _0x143215?se(_0x143215,_0xa11d85,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40d424}):_0x143215[_0xa11d85]=_0x40d424,ie=(_0x14492c,_0x2b7a57,_0x515b3a,_0x1e5748)=>{const _0x34b283=_0x17b82a;for(var _0x7ac608=_0x1e5748>0x1?void 0x0:_0x1e5748?oe(_0x2b7a57,_0x515b3a):_0x2b7a57,_0x29c895=_0x14492c[_0x34b283(0x109)]-0x1,_0x2acb9c;_0x29c895>=0x0;_0x29c895--)(_0x2acb9c=_0x14492c[_0x29c895])&&(_0x7ac608=_0x2acb9c(_0x7ac608)||_0x7ac608);return _0x7ac608;},w=(_0x73ddf8,_0x2e2ce9)=>(_0x326606,_0x41f52e)=>_0x2e2ce9(_0x326606,_0x41f52e,_0x73ddf8),$=(_0x20fb44,_0x3a98f1,_0x3d057b)=>ne(_0x20fb44,typeof _0x3a98f1!=_0x17b82a(0xe3)?_0x3a98f1+'':_0x3a98f1,_0x3d057b);let b=class extends _0x235c2b{constructor(_0xf7fdcd=M,_0x152b1f,_0xad410a){const _0x4108e=_0x17b82a;super(),this['_config']=_0xf7fdcd,this[_0x4108e(0xe1)]=_0x152b1f,this[_0x4108e(0x13e)]=_0xad410a;const {..._0x2e14f7}=_0x5886d2({},M,this[_0x4108e(0x122)]);this[_0x4108e(0x13e)][_0x4108e(0x12f)](z,_0x2e14f7);}['onStarting'](){const _0x1d298c=_0x17b82a;[[f],[g],[S]][_0x1d298c(0xff)](_0xc98e7e=>{const _0x119e64=_0x1d298c;this[_0x119e64(0xe1)][_0x119e64(0x12e)](_0xc98e7e);});}[_0x17b82a(0x112)](){const _0x45abec=_0x17b82a;this[_0x45abec(0xe1)][_0x45abec(0x12c)](g),this[_0x45abec(0xe1)]['get'](S);}};function _0x715e(_0x1869f7,_0x394278){const _0x352680=_0x3526();return _0x715e=function(_0x715e5a,_0x59550c){_0x715e5a=_0x715e5a-0xdb;let _0x2ef194=_0x352680[_0x715e5a];return _0x2ef194;},_0x715e(_0x1869f7,_0x394278);}$(b,'pluginName',W),$(b,_0x17b82a(0x107),_0x4c85bc[_0x17b82a(0x133)]),b=ie([_0x5b1abb(_0x21ed2e,_0x19e911,_0x219f24),w(0x1,_0x4128a6(_0x4d52d5)),w(0x2,_0x17181b)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x37ae13,_0x5a5cbe){const _0x48274e=_0x2267,_0x369138=_0x37ae13();while(!![]){try{const _0x2c36fa=-parseInt(_0x48274e(0x1a5))/0x1*(parseInt(_0x48274e(0x138))/0x2)+-parseInt(_0x48274e(0x124))/0x3+parseInt(_0x48274e(0x13a))/0x4+parseInt(_0x48274e(0x155))/0x5*(-parseInt(_0x48274e(0x1a0))/0x6)+-parseInt(_0x48274e(0x19c))/0x7*(-parseInt(_0x48274e(0x157))/0x8)+parseInt(_0x48274e(0x126))/0x9*(parseInt(_0x48274e(0x12c))/0xa)+-parseInt(_0x48274e(0x16f))/0xb*(-parseInt(_0x48274e(0x19b))/0xc);if(_0x2c36fa===_0x5a5cbe)break;else _0x369138['push'](_0x369138['shift']());}catch(_0x1c8e54){_0x369138['push'](_0x369138['shift']());}}}(_0x2455,0xd2e20),function(_0x2b867e,_0x16f207){const _0x43d61f=_0x2267;typeof exports==_0x43d61f(0x1a3)&&typeof module<'u'?_0x16f207(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x43d61f(0x175)&&define[_0x43d61f(0x150)]?define([_0x43d61f(0x159),_0x43d61f(0x143),_0x43d61f(0x133),'@univerjs/core',_0x43d61f(0x127),_0x43d61f(0x193),_0x43d61f(0x15d),'@univerjs/network'],_0x16f207):(_0x2b867e=typeof globalThis<'u'?globalThis:_0x2b867e||self,_0x16f207(_0x2b867e[_0x43d61f(0x199)]={},_0x2b867e['UniverProCollaborationClient'],_0x2b867e[_0x43d61f(0x1a7)],_0x2b867e['UniverCore'],_0x2b867e[_0x43d61f(0x154)],_0x2b867e[_0x43d61f(0x17c)],_0x2b867e[_0x43d61f(0x15d)],_0x2b867e[_0x43d61f(0x12b)]));}(this,function(_0x18e5b4,_0x5f3c61,_0x11fede,_0x501cc3,_0x418467,_0x24abdc,_0x5510be,_0x1311d3){'use strict';const _0x2baaa9=_0x2267;const _0x174803='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0xa4547d=(_0x2495f4=>(_0x2495f4[_0x2495f4[_0x2baaa9(0x132)]=0x0]=_0x2baaa9(0x132),_0x2495f4[_0x2495f4['Solved']=0x1]=_0x2baaa9(0x14f),_0x2495f4[_0x2495f4[_0x2baaa9(0x179)]=-0x1]=_0x2baaa9(0x179),_0x2495f4))(_0xa4547d||{}),_0x3dc639=(_0xa9a032=>(_0xa9a032[_0xa9a032[_0x2baaa9(0x14a)]=0x0]='Unknown',_0xa9a032[_0xa9a032['Add']=0x1]=_0x2baaa9(0x192),_0xa9a032[_0xa9a032[_0x2baaa9(0x12e)]=0x2]=_0x2baaa9(0x12e),_0xa9a032[_0xa9a032[_0x2baaa9(0x15c)]=0x3]=_0x2baaa9(0x15c),_0xa9a032[_0xa9a032[_0x2baaa9(0x12a)]=0x4]='Delete',_0xa9a032[_0xa9a032[_0x2baaa9(0x152)]=0x5]=_0x2baaa9(0x152),_0xa9a032[_0xa9a032[_0x2baaa9(0x179)]=-0x1]='UNRECOGNIZED',_0xa9a032))(_0x3dc639||{});const _0x1d4ebb=_0x3a193b=>_0x501cc3[_0x2baaa9(0x144)](new Date(+_0x3a193b))['format'](_0x2baaa9(0x194)),_0x59220f=async(_0x1abdf2,_0x317bad)=>{const _0x5ed52b=_0x2baaa9,_0x585fd1=_0x1abdf2[_0x5ed52b(0x136)](_0x501cc3['UserManagerService']),_0xede2d6=_0x1abdf2[_0x5ed52b(0x136)](_0x1311d3[_0x5ed52b(0x148)]);_0x317bad[_0x5ed52b(0x189)](_0x2b38ba=>{const _0x174e69=_0x5ed52b;_0x585fd1[_0x174e69(0x183)](_0x2b38ba)&&_0x317bad[_0x174e69(0x170)](_0x2b38ba);}),_0x317bad['size']&&(await _0xede2d6[_0x5ed52b(0x136)]('/universer-api/user/list',{'params':{'userIDs':[..._0x317bad]}}))['body']['users'][_0x5ed52b(0x189)](_0x4c22a=>{const _0x93ffba=_0x5ed52b;_0x4c22a&&_0x585fd1[_0x93ffba(0x182)](_0x4c22a);});};var _0xbac97=Object[_0x2baaa9(0x13b)],_0x844ec0=(_0x2beb31,_0x1cd827,_0x54b6bb,_0x1b365)=>{const _0xdfe69d=_0x2baaa9;for(var _0x12d335=_0x1b365>0x1?void 0x0:_0x1b365?_0xbac97(_0x1cd827,_0x54b6bb):_0x1cd827,_0x13223f=_0x2beb31[_0xdfe69d(0x14b)]-0x1,_0x2994ba;_0x13223f>=0x0;_0x13223f--)(_0x2994ba=_0x2beb31[_0x13223f])&&(_0x12d335=_0x2994ba(_0x12d335)||_0x12d335);return _0x12d335;},_0x473db9=(_0x35725d,_0x19e3ad)=>(_0x69dacd,_0x4d7879)=>_0x19e3ad(_0x69dacd,_0x4d7879,_0x35725d);let _0x4a3036=class extends _0x501cc3[_0x2baaa9(0x180)]{constructor(_0x1b3c15,_0x4c2acf,_0xbacdfb,_0x3c37ed){const _0x426d90=_0x2baaa9;super(),this['_commentService']=_0x1b3c15,this[_0x426d90(0x19d)]=_0x4c2acf,this['_userService']=_0xbacdfb,this[_0x426d90(0x134)]=_0x3c37ed,this[_0x426d90(0x16e)](),this[_0x426d90(0x18c)]();}[_0x2baaa9(0x18c)](){const _0x13646c=_0x2baaa9;this['disposeWithMe'](this['_threadCommentModel'][_0x13646c(0x17f)]['pipe'](_0x5510be[_0x13646c(0x18d)](0x10))['subscribe'](_0x4f3197=>{const _0x111ed6=_0x13646c,_0x5dc08e=new Set();_0x4f3197[_0x111ed6(0x189)](_0x4ea432=>{const _0x381b3b=_0x111ed6;switch(_0x4ea432[_0x381b3b(0x15e)]){case _0x381b3b(0x162):{const _0x58ac66=_0x4ea432[_0x381b3b(0x16a)][_0x381b3b(0x171)];_0x5dc08e['add'](_0x58ac66);break;}}}),_0x59220f(this['_injector'],_0x5dc08e);}));}['_init'](){const _0x129fed=_0x2baaa9;this[_0x129fed(0x169)](this[_0x129fed(0x14c)][_0x129fed(0x17f)][_0x129fed(0x18e)](async _0x132817=>{const _0x3bec6d=_0x129fed;var _0x15fb9c,_0x14c88a,_0x3200cb,_0x24d51e;const _0x4fea29=(_0x15fb9c=this[_0x3bec6d(0x19d)][_0x3bec6d(0x15b)](_0x132817[_0x3bec6d(0x18f)])[_0x3bec6d(0x149)](_0x1eb50e=>_0x1eb50e[_0x3bec6d(0x176)]===_0x132817['threadId']))==null?void 0x0:_0x15fb9c[_0x3bec6d(0x131)];if(!_0x4fea29)return;const {unitId:_0x4de98e,subUnitId:_0x46be9b}=_0x4fea29;switch(_0x132817['user']&&this[_0x3bec6d(0x156)][_0x3bec6d(0x182)](_0x132817[_0x3bec6d(0x186)]),_0x132817['type']){case _0x3dc639[_0x3bec6d(0x192)]:break;case _0x3dc639['Reply']:{this[_0x3bec6d(0x19d)]['addComment'](_0x4de98e,_0x46be9b,{'unitId':_0x4de98e,'subUnitId':_0x46be9b,'ref':'','id':_0x132817['replyId'],'dT':_0x1d4ebb(+_0x132817[_0x3bec6d(0x173)]),'threadId':_0x132817[_0x3bec6d(0x176)],'personId':(_0x3200cb=(_0x14c88a=_0x132817[_0x3bec6d(0x186)])==null?void 0x0:_0x14c88a['userID'])!=null?_0x3200cb:_0x132817[_0x3bec6d(0x184)],'text':JSON[_0x3bec6d(0x160)](_0x132817['content']),'parentId':_0x4fea29['id']});break;}case _0x3dc639[_0x3bec6d(0x12a)]:{const _0x30162a=this['_threadCommentModel'][_0x3bec6d(0x13c)](_0x4de98e,_0x46be9b,_0x132817[_0x3bec6d(0x145)]);_0x30162a&&_0x30162a[_0x3bec6d(0x19e)]&&this[_0x3bec6d(0x19d)][_0x3bec6d(0x197)](_0x4de98e,_0x46be9b,_0x132817[_0x3bec6d(0x145)]);break;}case _0x3dc639['Edit']:{this[_0x3bec6d(0x19d)][_0x3bec6d(0x17e)](_0x4de98e,_0x46be9b,{'commentId':_0x132817['replyId'],'text':JSON[_0x3bec6d(0x160)](_0x132817[_0x3bec6d(0x140)])});break;}case _0x3dc639[_0x3bec6d(0x152)]:{const _0x44ceff=(_0x24d51e=this[_0x3bec6d(0x19d)][_0x3bec6d(0x15b)](_0x132817[_0x3bec6d(0x18f)])[_0x3bec6d(0x149)](_0x4b260a=>_0x4b260a['threadId']===_0x132817[_0x3bec6d(0x176)]))==null?void 0x0:_0x24d51e[_0x3bec6d(0x131)];_0x44ceff&&this['_threadCommentModel'][_0x3bec6d(0x14d)](_0x4de98e,_0x46be9b,_0x44ceff['id'],_0x132817[_0x3bec6d(0x18a)]===_0xa4547d[_0x3bec6d(0x14f)]);break;}}}));}};_0x4a3036=_0x844ec0([_0x473db9(0x0,_0x501cc3['Inject'](_0x5f3c61['CommentService'])),_0x473db9(0x1,_0x501cc3[_0x2baaa9(0x142)](_0x24abdc[_0x2baaa9(0x161)])),_0x473db9(0x2,_0x501cc3[_0x2baaa9(0x142)](_0x501cc3[_0x2baaa9(0x137)])),_0x473db9(0x3,_0x501cc3['Inject'](_0x501cc3[_0x2baaa9(0x1a4)]))],_0x4a3036);const _0x593c3c=_0x2baaa9(0x187),_0x112cff={};var _0x2a0bd3=Object[_0x2baaa9(0x13b)],_0x5ef65a=(_0x481cd5,_0x18a98a,_0x58298,_0x2e7d31)=>{const _0x30f800=_0x2baaa9;for(var _0x4ba74d=_0x2e7d31>0x1?void 0x0:_0x2e7d31?_0x2a0bd3(_0x18a98a,_0x58298):_0x18a98a,_0x30f1d0=_0x481cd5[_0x30f800(0x14b)]-0x1,_0x444753;_0x30f1d0>=0x0;_0x30f1d0--)(_0x444753=_0x481cd5[_0x30f1d0])&&(_0x4ba74d=_0x444753(_0x4ba74d)||_0x4ba74d);return _0x4ba74d;},_0x16178c=(_0x3e7bcf,_0x3b3eb7)=>(_0x179dcc,_0x164099)=>_0x3b3eb7(_0x179dcc,_0x164099,_0x3e7bcf);function _0x3a7773(_0xd60066,_0x4b22d5){const _0x4e9c1f=_0x2baaa9,_0x193a83=_0xd60066[_0x4e9c1f(0x190)][0x0];return{..._0x4b22d5,'id':_0x193a83[_0x4e9c1f(0x145)],'resolved':_0xd60066[_0x4e9c1f(0x18a)]===0x1,'dT':_0x1d4ebb(_0x193a83[_0x4e9c1f(0x173)]),'personId':_0x193a83[_0x4e9c1f(0x184)],'threadId':_0x193a83[_0x4e9c1f(0x176)]};}function _0x3a55da(_0x46c22c,_0x16aa4a,_0x3a66af){const _0x2ac836=_0x2baaa9;var _0x1889ba,_0x1c397a;if(((_0x1c397a=(_0x1889ba=_0x46c22c==null?void 0x0:_0x46c22c[_0x2ac836(0x190)])==null?void 0x0:_0x1889ba[_0x2ac836(0x14b)])!=null?_0x1c397a:0x0)>0x0){const _0x5ec54a=(_0x32436b,_0x5b6f82)=>({'id':_0x32436b[_0x2ac836(0x145)],'threadId':_0x32436b[_0x2ac836(0x176)],'dT':_0x1d4ebb(_0x32436b[_0x2ac836(0x173)]),'personId':_0x32436b['userId'],'resolved':_0x46c22c[_0x2ac836(0x18a)]===_0xa4547d[_0x2ac836(0x14f)],'unitId':_0x16aa4a,'subUnitId':_0x3a66af,'text':JSON[_0x2ac836(0x160)](_0x32436b[_0x2ac836(0x140)]),'parentId':_0x5b6f82}),_0x2a048d=_0x5ec54a(_0x46c22c['replies'][0x0]);return{..._0x2a048d,'children':_0x46c22c[_0x2ac836(0x190)][_0x2ac836(0x17b)](0x1)[_0x2ac836(0x146)](_0x1e9731=>_0x5ec54a(_0x1e9731,_0x2a048d['id']))};}return null;}let _0x4a09a1=class{constructor(_0x500474,_0x2211df,_0x3e4ca3,_0xb69cf8){const _0x29bc55=_0x2baaa9;this['_httpService']=_0x500474,this[_0x29bc55(0x156)]=_0x2211df,this[_0x29bc55(0x15f)]=_0x3e4ca3,this[_0x29bc55(0x134)]=_0xb69cf8;}async['addComment'](_0x21683c){const _0x477650=_0x2baaa9;var _0x3e935c,_0x2f3a21;const {parentId:_0x36fd15,unitId:_0x528350,text:_0x958ff2,threadId:_0x417487}=_0x21683c,_0x3a52eb=(_0x2f3a21=(_0x3e935c=_0x958ff2[_0x477650(0x195)])==null?void 0x0:_0x3e935c[_0x477650(0x15a)](_0x4bdefd=>_0x4bdefd[_0x477650(0x181)]===_0x501cc3[_0x477650(0x13d)][_0x477650(0x16d)])[_0x477650(0x146)](_0x5d09d9=>_0x5d09d9['rangeId']))!=null?_0x2f3a21:[],_0x22d2d=JSON[_0x477650(0x185)](_0x958ff2),_0xacbe57=(await this[_0x477650(0x15f)][_0x477650(0x147)](_0x528350))[_0x477650(0x19f)]();if(_0x36fd15){const _0x4fa1cc={'memberId':_0xacbe57,'unitId':_0x528350,'content':_0x22d2d,'mention':_0x3a52eb,'threadId':_0x417487},_0x3f1933=(await this[_0x477650(0x17a)]['post'](_0x477650(0x163)+_0x528350+_0x477650(0x188),{'body':_0x4fa1cc}))[_0x477650(0x151)]['reply'];return{..._0x21683c,'id':_0x3f1933[_0x477650(0x145)],'dT':_0x501cc3[_0x477650(0x144)](+_0x3f1933[_0x477650(0x173)])[_0x477650(0x14e)](_0x477650(0x194)),'personId':_0x3f1933[_0x477650(0x184)]};}else{const _0x3ec239={'memberId':_0xacbe57,'unitId':_0x528350,'content':_0x22d2d,'mention':_0x3a52eb},_0x17b483=await this[_0x477650(0x17a)][_0x477650(0x129)](_0x477650(0x163)+_0x528350+_0x477650(0x174),{'body':_0x3ec239});return _0x3a7773(_0x17b483[_0x477650(0x151)]['comment'],_0x21683c);}}async[_0x2baaa9(0x17e)](_0x58ccb6){const _0x3e27cb=_0x2baaa9;var _0x4c9974,_0x1d9d08;const {text:_0x3975a0,unitId:_0x1f8191}=_0x58ccb6,_0x556969=(_0x1d9d08=(_0x4c9974=_0x3975a0['customRanges'])==null?void 0x0:_0x4c9974['filter'](_0x5e0dce=>_0x5e0dce[_0x3e27cb(0x181)]===_0x501cc3[_0x3e27cb(0x13d)][_0x3e27cb(0x16d)])[_0x3e27cb(0x146)](_0x46cc89=>_0x46cc89['rangeId']))!=null?_0x1d9d08:[],_0x22bfb1=JSON[_0x3e27cb(0x185)](_0x3975a0),_0x58fa5c=_0x58ccb6[_0x3e27cb(0x176)],_0xe89cce=_0x58ccb6['id'],_0x25a4b0={'memberId':(await this[_0x3e27cb(0x15f)][_0x3e27cb(0x147)](_0x1f8191))[_0x3e27cb(0x19f)](),'unitId':_0x1f8191,'threadId':_0x58fa5c,'mention':_0x556969,'content':_0x22bfb1,'replyId':_0xe89cce},_0x17f970=await this[_0x3e27cb(0x17a)][_0x3e27cb(0x129)](_0x3e27cb(0x163)+_0x1f8191+_0x3e27cb(0x130),{'body':_0x25a4b0});return!_0x17f970[_0x3e27cb(0x151)][_0x3e27cb(0x139)]||_0x17f970[_0x3e27cb(0x151)]['error']['code']===0x1;}async[_0x2baaa9(0x14d)](_0x55d329){const _0x373a5f=_0x2baaa9,{unitId:_0xa644c9}=_0x55d329,_0x445278=_0x55d329[_0x373a5f(0x176)],_0x4c0fc5={'memberId':this[_0x373a5f(0x156)][_0x373a5f(0x196)]()['userID'],'unitId':_0xa644c9,'threadId':_0x445278,'solved':_0x55d329[_0x373a5f(0x153)]?_0xa4547d[_0x373a5f(0x14f)]:_0xa4547d[_0x373a5f(0x132)]},_0x4c3441=await this[_0x373a5f(0x17a)][_0x373a5f(0x129)]('/universer-api/comment/unit/'+_0xa644c9+_0x373a5f(0x198),{'body':_0x4c0fc5});return!_0x4c3441[_0x373a5f(0x151)][_0x373a5f(0x139)]||_0x4c3441[_0x373a5f(0x151)][_0x373a5f(0x139)][_0x373a5f(0x16b)]===0x1;}async[_0x2baaa9(0x197)](_0x21c5db,_0x3a00ed,_0x15a23a,_0x543e34){const _0x5a5f0=_0x2baaa9,_0x2f194f={'memberId':(await this[_0x5a5f0(0x15f)][_0x5a5f0(0x147)](_0x21c5db))[_0x5a5f0(0x19f)](),'threadId':_0x15a23a,'replyId':_0x543e34,'unitId':_0x21c5db},_0x2f0988=await this[_0x5a5f0(0x17a)]['post'](_0x5a5f0(0x163)+_0x21c5db+_0x5a5f0(0x168),{'body':_0x2f194f});return!_0x2f0988[_0x5a5f0(0x151)][_0x5a5f0(0x139)]||_0x2f0988[_0x5a5f0(0x151)][_0x5a5f0(0x139)][_0x5a5f0(0x16b)]===0x1;}async['listComments'](_0xfb0e29,_0x1a4224,_0x4dfaba){const _0x2f0f03=_0x2baaa9,_0x5c87a6={'unitId':_0xfb0e29,'threadId':_0x4dfaba},_0x383b64=await this[_0x2f0f03(0x17a)][_0x2f0f03(0x129)](_0x2f0f03(0x163)+_0xfb0e29+_0x2f0f03(0x177),{'body':_0x5c87a6}),_0x22d53b=_0x4dfaba['map'](_0x213a6a=>_0x3a55da(_0x383b64[_0x2f0f03(0x151)][_0x2f0f03(0x178)][_0x213a6a],_0xfb0e29,_0x1a4224))[_0x2f0f03(0x15a)](Boolean);return Object[_0x2f0f03(0x13e)](_0x383b64[_0x2f0f03(0x151)][_0x2f0f03(0x158)])[_0x2f0f03(0x189)](_0xb1e878=>{const _0x1378f3=_0x2f0f03;this['_userService'][_0x1378f3(0x182)](_0xb1e878);}),_0x22d53b;}[_0x2baaa9(0x12d)](_0x471735){const _0x9806ea=_0x2baaa9;return{'id':_0x471735['id'],'threadId':_0x471735['threadId'],'ref':_0x471735[_0x9806ea(0x1a6)]};}};_0x4a09a1=_0x5ef65a([_0x16178c(0x0,_0x501cc3['Inject'](_0x1311d3[_0x2baaa9(0x148)])),_0x16178c(0x1,_0x501cc3[_0x2baaa9(0x142)](_0x501cc3[_0x2baaa9(0x137)])),_0x16178c(0x2,_0x501cc3[_0x2baaa9(0x142)](_0x5f3c61[_0x2baaa9(0x18b)])),_0x16178c(0x3,_0x501cc3[_0x2baaa9(0x142)](_0x501cc3[_0x2baaa9(0x1a4)]))],_0x4a09a1);var _0x1b819d=Object[_0x2baaa9(0x13b)],_0x241cc5=(_0x1f3afd,_0x4f27f0,_0x55266d,_0x1a54a0)=>{const _0x5edf39=_0x2baaa9;for(var _0x28ba91=_0x1a54a0>0x1?void 0x0:_0x1a54a0?_0x1b819d(_0x4f27f0,_0x55266d):_0x4f27f0,_0x24fbfe=_0x1f3afd[_0x5edf39(0x14b)]-0x1,_0xea4827;_0x24fbfe>=0x0;_0x24fbfe--)(_0xea4827=_0x1f3afd[_0x24fbfe])&&(_0x28ba91=_0xea4827(_0x28ba91)||_0x28ba91);return _0x28ba91;},_0x53fba2=(_0xbed04a,_0xc7887d)=>(_0x1c8624,_0xd89f6d)=>_0xc7887d(_0x1c8624,_0xd89f6d,_0xbed04a);let _0x5a72e8=class extends _0x501cc3[_0x2baaa9(0x180)]{constructor(_0x37fde5,_0x44c06c){const _0x43967b=_0x2baaa9;super(),this[_0x43967b(0x141)]=_0x37fde5,this['_threadCommentDataSource']=_0x44c06c,this[_0x43967b(0x172)]();}['_initDataSource'](){const _0x580ecd=_0x2baaa9;this[_0x580ecd(0x141)][_0x580ecd(0x165)]=this[_0x580ecd(0x135)],this[_0x580ecd(0x141)]['syncUpdateMutationToColla']=!0x1;}};_0x5a72e8=_0x241cc5([_0x53fba2(0x0,_0x24abdc['IThreadCommentDataSourceService']),_0x53fba2(0x1,_0x501cc3[_0x2baaa9(0x142)](_0x4a09a1))],_0x5a72e8);var _0x1706a9=Object['defineProperty'],_0x45938e=Object[_0x2baaa9(0x13b)],_0x271ffa=(_0x155705,_0x275e7e,_0x477101)=>_0x275e7e in _0x155705?_0x1706a9(_0x155705,_0x275e7e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x477101}):_0x155705[_0x275e7e]=_0x477101,_0x1bc9d0=(_0xff431,_0x2e63bf,_0x510b46,_0x4bf814)=>{const _0x325988=_0x2baaa9;for(var _0xe1f790=_0x4bf814>0x1?void 0x0:_0x4bf814?_0x45938e(_0x2e63bf,_0x510b46):_0x2e63bf,_0x2a3050=_0xff431[_0x325988(0x14b)]-0x1,_0x539467;_0x2a3050>=0x0;_0x2a3050--)(_0x539467=_0xff431[_0x2a3050])&&(_0xe1f790=_0x539467(_0xe1f790)||_0xe1f790);return _0xe1f790;},_0x3e6875=(_0x547f10,_0x594276)=>(_0x449ad1,_0x33c177)=>_0x594276(_0x449ad1,_0x33c177,_0x547f10),_0x1f5204=(_0x1f8449,_0x42cf6b,_0xe8eda2)=>_0x271ffa(_0x1f8449,typeof _0x42cf6b!=_0x2baaa9(0x164)?_0x42cf6b+'':_0x42cf6b,_0xe8eda2);_0x18e5b4[_0x2baaa9(0x16c)]=class extends _0x501cc3[_0x2baaa9(0x167)]{constructor(_0x3a309e=_0x112cff,_0x30e43c,_0x255c35){const _0x1dfdc1=_0x2baaa9;super(),this[_0x1dfdc1(0x128)]=_0x3a309e,this[_0x1dfdc1(0x134)]=_0x30e43c,this['_configService']=_0x255c35;const {..._0x53b5c7}=_0x501cc3[_0x1dfdc1(0x19a)]({},_0x112cff,this[_0x1dfdc1(0x128)]);this['_configService'][_0x1dfdc1(0x166)](_0x593c3c,_0x53b5c7);}[_0x2baaa9(0x1a2)](){const _0x5adeed=_0x2baaa9;[[_0x4a09a1],[_0x5a72e8],[_0x4a3036]][_0x5adeed(0x189)](_0x2ce39a=>{const _0x4c6dea=_0x5adeed;this['_injector'][_0x4c6dea(0x162)](_0x2ce39a);});}[_0x2baaa9(0x17d)](){const _0x1880a0=_0x2baaa9;this[_0x1880a0(0x134)][_0x1880a0(0x136)](_0x5a72e8),this[_0x1880a0(0x134)]['get'](_0x4a3036);}},_0x1f5204(_0x18e5b4[_0x2baaa9(0x16c)],'pluginName',_0x174803),_0x1f5204(_0x18e5b4[_0x2baaa9(0x16c)],_0x2baaa9(0x15e),_0x501cc3[_0x2baaa9(0x125)][_0x2baaa9(0x1a1)]),_0x18e5b4[_0x2baaa9(0x16c)]=_0x1bc9d0([_0x501cc3['DependentOn'](_0x418467['UniverThreadCommentUIPlugin'],_0x5f3c61['UniverCollaborationClientPlugin'],_0x11fede['UniverLicensePlugin']),_0x3e6875(0x1,_0x501cc3[_0x2baaa9(0x142)](_0x501cc3[_0x2baaa9(0x1a4)])),_0x3e6875(0x2,_0x501cc3[_0x2baaa9(0x12f)])],_0x18e5b4['UniverThreadCommentDataSourcePlugin']),Object[_0x2baaa9(0x13f)](_0x18e5b4,Symbol['toStringTag'],{'value':_0x2baaa9(0x191)});}));function _0x2267(_0x3f7a0e,_0x211d0f){const _0x245545=_0x2455();return _0x2267=function(_0x226774,_0x52293f){_0x226774=_0x226774-0x124;let _0x28683e=_0x245545[_0x226774];return _0x28683e;},_0x2267(_0x3f7a0e,_0x211d0f);}function _0x2455(){const _0x1741fa=['object','Injector','1qNWWLq','ref','UniverProLicense','4325610RofXLy','UniverInstanceType','27pAnDJS','@univerjs/thread-comment-ui','_config','post','Delete','UniverNetwork','496420JvrBeC','saveCommentToSnapshot','Reply','IConfigService','/edit','root','OpenOrReOpen','@univerjs-pro/license','_injector','_threadCommentDataSource','get','UserManagerService','908042qXlyRA','error','6218000gVmkxT','getOwnPropertyDescriptor','getComment','CustomRangeType','values','defineProperty','content','_threadCommentDataSourceService','Inject','@univerjs-pro/collaboration-client','dayjs','replyId','map','requireSession','HTTPService','find','Unknown','length','_commentService','resolveComment','format','Solved','amd','body','Solve','resolved','UniverThreadCommentUi','2845GmYhfr','_userService','19360KxRrDA','users','exports','filter','getUnit','Edit','rxjs','type','_sessionService','parse','ThreadCommentModel','add','/universer-api/comment/unit/','symbol','dataSource','setConfig','Plugin','/delete','disposeWithMe','payload','code','UniverThreadCommentDataSourcePlugin','COMMENT','_init','5841cLgDys','delete','personId','_initDataSource','createTimestamp','/add','function','threadId','/list','comments','UNRECOGNIZED','_httpService','slice','UniverThreadComment','onReady','updateComment','commentUpdate$','Disposable','rangeType','addUser','getUser','userId','stringify','user','thread-comment-data-source.config','/reply','forEach','solved','CollaborationSessionService','_initUserSync','bufferTime','subscribe','unitId','replies','Module','Add','@univerjs/thread-comment','YYYY/MM/DD\x20HH:mm','customRanges','getCurrentUser','deleteComment','/solved','UniverProThreadCommentDatasource','merge','36828rTZOUj','616GtKSkE','_threadCommentModel','parentId','getMemberID','8292taVckK','UNIVER_UNKNOWN','onStarting'];_0x2455=function(){return _0x1741fa;};return _0x2455();}
1
+ function _0x3d7f(_0x2b9b9f,_0x5755f0){const _0x4815b8=_0x4815();return _0x3d7f=function(_0x3d7ffc,_0x13ee08){_0x3d7ffc=_0x3d7ffc-0x1b1;let _0x497f36=_0x4815b8[_0x3d7ffc];return _0x497f36;},_0x3d7f(_0x2b9b9f,_0x5755f0);}(function(_0x26b3a1,_0x4f1513){const _0x142b9c=_0x3d7f,_0x1cb5e9=_0x26b3a1();while(!![]){try{const _0x42234f=-parseInt(_0x142b9c(0x1cc))/0x1*(parseInt(_0x142b9c(0x1bb))/0x2)+parseInt(_0x142b9c(0x211))/0x3*(-parseInt(_0x142b9c(0x1dc))/0x4)+parseInt(_0x142b9c(0x20c))/0x5*(parseInt(_0x142b9c(0x232))/0x6)+-parseInt(_0x142b9c(0x1df))/0x7+parseInt(_0x142b9c(0x1f3))/0x8+parseInt(_0x142b9c(0x1b7))/0x9+-parseInt(_0x142b9c(0x1f9))/0xa*(parseInt(_0x142b9c(0x1ce))/0xb);if(_0x42234f===_0x4f1513)break;else _0x1cb5e9['push'](_0x1cb5e9['shift']());}catch(_0x2d272b){_0x1cb5e9['push'](_0x1cb5e9['shift']());}}}(_0x4815,0xc5348),function(_0x892da8,_0x4f7f2c){const _0x30e703=_0x3d7f;typeof exports==_0x30e703(0x1c9)&&typeof module<'u'?_0x4f7f2c(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x30e703(0x1ea)&&define[_0x30e703(0x1ef)]?define([_0x30e703(0x1b5),_0x30e703(0x230),_0x30e703(0x20a),_0x30e703(0x206),_0x30e703(0x1ff),'@univerjs/thread-comment',_0x30e703(0x21d),'@univerjs/network'],_0x4f7f2c):(_0x892da8=typeof globalThis<'u'?globalThis:_0x892da8||self,_0x4f7f2c(_0x892da8['UniverProThreadCommentDatasource']={},_0x892da8[_0x30e703(0x236)],_0x892da8[_0x30e703(0x1fa)],_0x892da8[_0x30e703(0x234)],_0x892da8[_0x30e703(0x215)],_0x892da8['UniverThreadComment'],_0x892da8[_0x30e703(0x21d)],_0x892da8['UniverNetwork']));}(this,function(_0x60b3fd,_0x6e9407,_0x34bfcd,_0xa28331,_0x41e30c,_0x38a43b,_0x1087b2,_0x54e878){'use strict';const _0x582b18=_0x3d7f;const _0x7ff09c=_0x582b18(0x1ee);var _0x2fd73b=(_0x3a1ecf=>(_0x3a1ecf[_0x3a1ecf[_0x582b18(0x202)]=0x0]=_0x582b18(0x202),_0x3a1ecf[_0x3a1ecf[_0x582b18(0x1ca)]=0x1]=_0x582b18(0x1ca),_0x3a1ecf[_0x3a1ecf[_0x582b18(0x1da)]=-0x1]=_0x582b18(0x1da),_0x3a1ecf))(_0x2fd73b||{}),_0xb79733=(_0x5d822b=>(_0x5d822b[_0x5d822b[_0x582b18(0x1ed)]=0x0]='Unknown',_0x5d822b[_0x5d822b['Add']=0x1]='Add',_0x5d822b[_0x5d822b['Reply']=0x2]='Reply',_0x5d822b[_0x5d822b[_0x582b18(0x20e)]=0x3]=_0x582b18(0x20e),_0x5d822b[_0x5d822b[_0x582b18(0x1d4)]=0x4]=_0x582b18(0x1d4),_0x5d822b[_0x5d822b[_0x582b18(0x1d7)]=0x5]='Solve',_0x5d822b[_0x5d822b[_0x582b18(0x1da)]=-0x1]=_0x582b18(0x1da),_0x5d822b))(_0xb79733||{});const _0x37eb6c=_0x5b84b4=>_0xa28331[_0x582b18(0x22d)](new Date(+_0x5b84b4))[_0x582b18(0x1d2)](_0x582b18(0x1d5)),_0x415ebf=async(_0x2e0899,_0x77408c)=>{const _0xb2c134=_0x582b18,_0xc52bb8=_0x2e0899['get'](_0xa28331['UserManagerService']),_0x18a4ff=_0x2e0899['get'](_0x54e878[_0xb2c134(0x1bc)]);_0x77408c[_0xb2c134(0x218)](_0x565c6d=>{const _0x3e9ac5=_0xb2c134;_0xc52bb8[_0x3e9ac5(0x20b)](_0x565c6d)&&_0x77408c[_0x3e9ac5(0x1b9)](_0x565c6d);}),_0x77408c[_0xb2c134(0x1f5)]&&(await _0x18a4ff[_0xb2c134(0x223)]('/universer-api/user/list',{'params':{'userIDs':[..._0x77408c]}}))[_0xb2c134(0x21b)][_0xb2c134(0x1b2)][_0xb2c134(0x218)](_0x34d416=>{_0x34d416&&_0xc52bb8['addUser'](_0x34d416);});};var _0x3db9ed=Object[_0x582b18(0x23a)],_0x4ba6dd=(_0x39f761,_0x20b5bc,_0x172774,_0x26c5ef)=>{const _0x3cf95d=_0x582b18;for(var _0x1612d5=_0x26c5ef>0x1?void 0x0:_0x26c5ef?_0x3db9ed(_0x20b5bc,_0x172774):_0x20b5bc,_0x553b3c=_0x39f761[_0x3cf95d(0x212)]-0x1,_0x3ef59a;_0x553b3c>=0x0;_0x553b3c--)(_0x3ef59a=_0x39f761[_0x553b3c])&&(_0x1612d5=_0x3ef59a(_0x1612d5)||_0x1612d5);return _0x1612d5;},_0x13d6dd=(_0x4747bd,_0x3f2a5f)=>(_0x5d861b,_0x51a2d1)=>_0x3f2a5f(_0x5d861b,_0x51a2d1,_0x4747bd);let _0xed5d36=class extends _0xa28331[_0x582b18(0x1cb)]{constructor(_0x685724,_0x33a134,_0x4d0d39,_0x4fbfbd){const _0x541843=_0x582b18;super(),this['_commentService']=_0x685724,this[_0x541843(0x1e5)]=_0x33a134,this['_userService']=_0x4d0d39,this[_0x541843(0x1fb)]=_0x4fbfbd,this[_0x541843(0x1c4)](),this[_0x541843(0x22f)]();}[_0x582b18(0x22f)](){const _0x2e0ef8=_0x582b18;this['disposeWithMe'](this[_0x2e0ef8(0x1e5)][_0x2e0ef8(0x20f)][_0x2e0ef8(0x23b)](_0x1087b2[_0x2e0ef8(0x1bd)](0x10))[_0x2e0ef8(0x228)](_0x2e97e1=>{const _0x5977ba=_0x2e0ef8,_0x243945=new Set();_0x2e97e1[_0x5977ba(0x218)](_0x383534=>{const _0x29572b=_0x5977ba;switch(_0x383534[_0x29572b(0x1d6)]){case _0x29572b(0x220):{const _0x2529ab=_0x383534[_0x29572b(0x1be)]['personId'];_0x243945[_0x29572b(0x220)](_0x2529ab);break;}}}),_0x415ebf(this['_injector'],_0x243945);}));}[_0x582b18(0x1c4)](){const _0xe80763=_0x582b18;this[_0xe80763(0x1cd)](this[_0xe80763(0x1f6)][_0xe80763(0x20f)][_0xe80763(0x228)](async _0x3a6ba5=>{const _0x326ef8=_0xe80763;var _0x5b7b08,_0x7e7f59,_0x4d4fc5,_0x242622;const _0x482a61=(_0x5b7b08=this[_0x326ef8(0x1e5)]['getUnit'](_0x3a6ba5[_0x326ef8(0x204)])[_0x326ef8(0x201)](_0x5cc4ed=>_0x5cc4ed[_0x326ef8(0x1fd)]===_0x3a6ba5[_0x326ef8(0x1fd)]))==null?void 0x0:_0x5b7b08['root'];if(!_0x482a61)return;const {unitId:_0x36f029,subUnitId:_0xff0c7d}=_0x482a61;switch(_0x3a6ba5['user']&&this['_userService'][_0x326ef8(0x21e)](_0x3a6ba5['user']),_0x3a6ba5[_0x326ef8(0x1d6)]){case _0xb79733[_0x326ef8(0x1c0)]:break;case _0xb79733[_0x326ef8(0x200)]:{this[_0x326ef8(0x1e5)][_0x326ef8(0x205)](_0x36f029,_0xff0c7d,{'unitId':_0x36f029,'subUnitId':_0xff0c7d,'ref':'','id':_0x3a6ba5['replyId'],'dT':_0x37eb6c(+_0x3a6ba5['createTimestamp']),'threadId':_0x3a6ba5['threadId'],'personId':(_0x4d4fc5=(_0x7e7f59=_0x3a6ba5['user'])==null?void 0x0:_0x7e7f59[_0x326ef8(0x225)])!=null?_0x4d4fc5:_0x3a6ba5[_0x326ef8(0x22a)],'text':JSON[_0x326ef8(0x1bf)](_0x3a6ba5[_0x326ef8(0x1ec)]),'parentId':_0x482a61['id']});break;}case _0xb79733[_0x326ef8(0x1d4)]:{const _0x1d547f=this[_0x326ef8(0x1e5)]['getComment'](_0x36f029,_0xff0c7d,_0x3a6ba5[_0x326ef8(0x1c5)]);_0x1d547f&&_0x1d547f['parentId']&&this[_0x326ef8(0x1e5)][_0x326ef8(0x1c1)](_0x36f029,_0xff0c7d,_0x3a6ba5[_0x326ef8(0x1c5)]);break;}case _0xb79733['Edit']:{this['_threadCommentModel']['updateComment'](_0x36f029,_0xff0c7d,{'commentId':_0x3a6ba5['replyId'],'text':JSON[_0x326ef8(0x1bf)](_0x3a6ba5['content'])});break;}case _0xb79733[_0x326ef8(0x1d7)]:{const _0x2f59dc=(_0x242622=this[_0x326ef8(0x1e5)][_0x326ef8(0x1e8)](_0x3a6ba5[_0x326ef8(0x204)])[_0x326ef8(0x201)](_0x429ca4=>_0x429ca4[_0x326ef8(0x1fd)]===_0x3a6ba5[_0x326ef8(0x1fd)]))==null?void 0x0:_0x242622[_0x326ef8(0x22c)];_0x2f59dc&&this[_0x326ef8(0x1e5)]['resolveComment'](_0x36f029,_0xff0c7d,_0x2f59dc['id'],_0x3a6ba5[_0x326ef8(0x20d)]===_0x2fd73b[_0x326ef8(0x1ca)]);break;}}}));}};_0xed5d36=_0x4ba6dd([_0x13d6dd(0x0,_0xa28331[_0x582b18(0x1c2)](_0x6e9407[_0x582b18(0x1b4)])),_0x13d6dd(0x1,_0xa28331[_0x582b18(0x1c2)](_0x38a43b['ThreadCommentModel'])),_0x13d6dd(0x2,_0xa28331[_0x582b18(0x1c2)](_0xa28331[_0x582b18(0x1c3)])),_0x13d6dd(0x3,_0xa28331[_0x582b18(0x1c2)](_0xa28331[_0x582b18(0x233)]))],_0xed5d36);const _0x568bed=_0x582b18(0x1b3),_0x24add3={};var _0x55ec85=Object['getOwnPropertyDescriptor'],_0xec324c=(_0x2b1e4b,_0x3219fc,_0x178f6f,_0x58074a)=>{for(var _0x497c45=_0x58074a>0x1?void 0x0:_0x58074a?_0x55ec85(_0x3219fc,_0x178f6f):_0x3219fc,_0x423a66=_0x2b1e4b['length']-0x1,_0x2f9857;_0x423a66>=0x0;_0x423a66--)(_0x2f9857=_0x2b1e4b[_0x423a66])&&(_0x497c45=_0x2f9857(_0x497c45)||_0x497c45);return _0x497c45;},_0x204198=(_0x243425,_0x5921c9)=>(_0xc6f15,_0x4539c4)=>_0x5921c9(_0xc6f15,_0x4539c4,_0x243425);function _0x532c2d(_0x37a0b4,_0x20c245){const _0x26d4cc=_0x582b18,_0x1597a8=_0x37a0b4['replies'][0x0];return{..._0x20c245,'id':_0x1597a8[_0x26d4cc(0x1c5)],'resolved':_0x37a0b4[_0x26d4cc(0x20d)]===0x1,'dT':_0x37eb6c(_0x1597a8[_0x26d4cc(0x1f4)]),'personId':_0x1597a8['userId'],'threadId':_0x1597a8[_0x26d4cc(0x1fd)]};}function _0x348e21(_0x17568f,_0x18536f,_0x3d2bb7){const _0x290365=_0x582b18;var _0x468a8e,_0x4235e1;if(((_0x4235e1=(_0x468a8e=_0x17568f==null?void 0x0:_0x17568f[_0x290365(0x1cf)])==null?void 0x0:_0x468a8e[_0x290365(0x212)])!=null?_0x4235e1:0x0)>0x0){const _0x30abfa=(_0x5aaf8f,_0xdd7716)=>({'id':_0x5aaf8f['replyId'],'threadId':_0x5aaf8f[_0x290365(0x1fd)],'dT':_0x37eb6c(_0x5aaf8f[_0x290365(0x1f4)]),'personId':_0x5aaf8f[_0x290365(0x22a)],'resolved':_0x17568f[_0x290365(0x20d)]===_0x2fd73b[_0x290365(0x1ca)],'unitId':_0x18536f,'subUnitId':_0x3d2bb7,'text':JSON[_0x290365(0x1bf)](_0x5aaf8f['content']),'parentId':_0xdd7716}),_0x4f282e=_0x30abfa(_0x17568f['replies'][0x0]);return{..._0x4f282e,'children':_0x17568f[_0x290365(0x1cf)][_0x290365(0x1e0)](0x1)[_0x290365(0x1db)](_0x570ffa=>_0x30abfa(_0x570ffa,_0x4f282e['id']))};}return null;}let _0x16cc64=class{constructor(_0x5acc71,_0x168d49,_0xbe40e7,_0x22def6){const _0x326cd8=_0x582b18;this[_0x326cd8(0x1b6)]=_0x5acc71,this['_userService']=_0x168d49,this[_0x326cd8(0x1dd)]=_0xbe40e7,this[_0x326cd8(0x1fb)]=_0x22def6;}async[_0x582b18(0x205)](_0x399dcf){const _0x16740d=_0x582b18;var _0x497a80,_0x7b8c82;const {parentId:_0x46461e,unitId:_0x3a7723,text:_0x6b7c5,threadId:_0x1abed4}=_0x399dcf,_0x265dec=(_0x7b8c82=(_0x497a80=_0x6b7c5[_0x16740d(0x229)])==null?void 0x0:_0x497a80['filter'](_0x29e71c=>_0x29e71c['rangeType']===_0xa28331[_0x16740d(0x1b8)][_0x16740d(0x226)])[_0x16740d(0x1db)](_0x50a7bd=>_0x50a7bd['rangeId']))!=null?_0x7b8c82:[],_0x1df9f9=JSON['stringify'](_0x6b7c5),_0x2a0171=(await this[_0x16740d(0x1dd)]['requireSession'](_0x3a7723))['getMemberID']();if(_0x46461e){const _0x4273dd={'memberId':_0x2a0171,'unitId':_0x3a7723,'content':_0x1df9f9,'mention':_0x265dec,'threadId':_0x1abed4},_0x2042c9=(await this[_0x16740d(0x1b6)]['post'](_0x16740d(0x1eb)+_0x3a7723+'/reply',{'body':_0x4273dd}))[_0x16740d(0x21b)][_0x16740d(0x214)];return{..._0x399dcf,'id':_0x2042c9[_0x16740d(0x1c5)],'dT':_0xa28331['dayjs'](+_0x2042c9[_0x16740d(0x1f4)])[_0x16740d(0x1d2)](_0x16740d(0x1d5)),'personId':_0x2042c9[_0x16740d(0x22a)]};}else{const _0x146224={'memberId':_0x2a0171,'unitId':_0x3a7723,'content':_0x1df9f9,'mention':_0x265dec},_0x4412ac=await this[_0x16740d(0x1b6)]['post'](_0x16740d(0x1eb)+_0x3a7723+_0x16740d(0x1c6),{'body':_0x146224});return _0x532c2d(_0x4412ac[_0x16740d(0x21b)][_0x16740d(0x237)],_0x399dcf);}}async[_0x582b18(0x210)](_0x32bf14){const _0xa2c1e2=_0x582b18;var _0x448d8f,_0x320f30;const {text:_0x5eaaba,unitId:_0x4db669}=_0x32bf14,_0x291649=(_0x320f30=(_0x448d8f=_0x5eaaba[_0xa2c1e2(0x229)])==null?void 0x0:_0x448d8f[_0xa2c1e2(0x22b)](_0x155073=>_0x155073[_0xa2c1e2(0x216)]===_0xa28331['CustomRangeType'][_0xa2c1e2(0x226)])[_0xa2c1e2(0x1db)](_0x553ccf=>_0x553ccf[_0xa2c1e2(0x1de)]))!=null?_0x320f30:[],_0x35268c=JSON[_0xa2c1e2(0x1e7)](_0x5eaaba),_0x38a2b4=_0x32bf14[_0xa2c1e2(0x1fd)],_0x1d7fdd=_0x32bf14['id'],_0xddac34={'memberId':(await this[_0xa2c1e2(0x1dd)][_0xa2c1e2(0x227)](_0x4db669))[_0xa2c1e2(0x222)](),'unitId':_0x4db669,'threadId':_0x38a2b4,'mention':_0x291649,'content':_0x35268c,'replyId':_0x1d7fdd},_0x6269f2=await this[_0xa2c1e2(0x1b6)][_0xa2c1e2(0x239)]('/universer-api/comment/unit/'+_0x4db669+_0xa2c1e2(0x1e3),{'body':_0xddac34});return!_0x6269f2[_0xa2c1e2(0x21b)][_0xa2c1e2(0x1ba)]||_0x6269f2[_0xa2c1e2(0x21b)][_0xa2c1e2(0x1ba)][_0xa2c1e2(0x22e)]===0x1;}async[_0x582b18(0x1f8)](_0x1b9469){const _0x4b1f01=_0x582b18,{unitId:_0xfe1560}=_0x1b9469,_0x1c68ae=_0x1b9469['threadId'],_0xc7ef6c={'memberId':this[_0x4b1f01(0x1fe)][_0x4b1f01(0x21a)]()[_0x4b1f01(0x225)],'unitId':_0xfe1560,'threadId':_0x1c68ae,'solved':_0x1b9469[_0x4b1f01(0x209)]?_0x2fd73b[_0x4b1f01(0x1ca)]:_0x2fd73b[_0x4b1f01(0x202)]},_0x475d0e=await this['_httpService'][_0x4b1f01(0x239)](_0x4b1f01(0x1eb)+_0xfe1560+_0x4b1f01(0x208),{'body':_0xc7ef6c});return!_0x475d0e[_0x4b1f01(0x21b)]['error']||_0x475d0e[_0x4b1f01(0x21b)][_0x4b1f01(0x1ba)][_0x4b1f01(0x22e)]===0x1;}async['deleteComment'](_0x133e3f,_0x23cc2d,_0x3dc67d,_0x409045){const _0x20d244=_0x582b18,_0x2b88e6={'memberId':(await this[_0x20d244(0x1dd)][_0x20d244(0x227)](_0x133e3f))[_0x20d244(0x222)](),'threadId':_0x3dc67d,'replyId':_0x409045,'unitId':_0x133e3f},_0x4873f8=await this[_0x20d244(0x1b6)][_0x20d244(0x239)]('/universer-api/comment/unit/'+_0x133e3f+_0x20d244(0x224),{'body':_0x2b88e6});return!_0x4873f8[_0x20d244(0x21b)][_0x20d244(0x1ba)]||_0x4873f8['body'][_0x20d244(0x1ba)][_0x20d244(0x22e)]===0x1;}async[_0x582b18(0x1f2)](_0xb9e6d0,_0x2fce59,_0x28929e){const _0x32558d=_0x582b18,_0x491124={'unitId':_0xb9e6d0,'threadId':_0x28929e},_0x32a2cc=await this['_httpService'][_0x32558d(0x239)](_0x32558d(0x1eb)+_0xb9e6d0+_0x32558d(0x21c),{'body':_0x491124}),_0x4e2096=_0x28929e[_0x32558d(0x1db)](_0x4e6a7d=>_0x348e21(_0x32a2cc[_0x32558d(0x21b)][_0x32558d(0x1f0)][_0x4e6a7d],_0xb9e6d0,_0x2fce59))[_0x32558d(0x22b)](Boolean);return Object[_0x32558d(0x1c7)](_0x32a2cc[_0x32558d(0x21b)][_0x32558d(0x1b2)])['forEach'](_0x427ded=>{const _0x4fba7a=_0x32558d;this['_userService'][_0x4fba7a(0x21e)](_0x427ded);}),_0x4e2096;}[_0x582b18(0x1d0)](_0x387228){const _0x5cf562=_0x582b18;return{'id':_0x387228['id'],'threadId':_0x387228[_0x5cf562(0x1fd)],'ref':_0x387228[_0x5cf562(0x238)]};}};_0x16cc64=_0xec324c([_0x204198(0x0,_0xa28331[_0x582b18(0x1c2)](_0x54e878[_0x582b18(0x1bc)])),_0x204198(0x1,_0xa28331[_0x582b18(0x1c2)](_0xa28331[_0x582b18(0x1c3)])),_0x204198(0x2,_0xa28331[_0x582b18(0x1c2)](_0x6e9407[_0x582b18(0x219)])),_0x204198(0x3,_0xa28331['Inject'](_0xa28331[_0x582b18(0x233)]))],_0x16cc64);var _0x1d1cbf=Object[_0x582b18(0x23a)],_0x34ebe1=(_0x44d5b0,_0xb52f5f,_0x4eeaca,_0x59d957)=>{for(var _0x19617e=_0x59d957>0x1?void 0x0:_0x59d957?_0x1d1cbf(_0xb52f5f,_0x4eeaca):_0xb52f5f,_0x3bcb2b=_0x44d5b0['length']-0x1,_0x2e6864;_0x3bcb2b>=0x0;_0x3bcb2b--)(_0x2e6864=_0x44d5b0[_0x3bcb2b])&&(_0x19617e=_0x2e6864(_0x19617e)||_0x19617e);return _0x19617e;},_0x145a3a=(_0x4abf5a,_0x29ac9a)=>(_0x146a68,_0x5df69e)=>_0x29ac9a(_0x146a68,_0x5df69e,_0x4abf5a);let _0x9f643a=class extends _0xa28331[_0x582b18(0x1cb)]{constructor(_0x5b7ebf,_0x228675){const _0x1af1e8=_0x582b18;super(),this[_0x1af1e8(0x203)]=_0x5b7ebf,this[_0x1af1e8(0x231)]=_0x228675,this['_initDataSource']();}[_0x582b18(0x1f7)](){const _0x34cfcb=_0x582b18;this[_0x34cfcb(0x203)]['dataSource']=this[_0x34cfcb(0x231)],this[_0x34cfcb(0x203)][_0x34cfcb(0x1e9)]=!0x1;}};_0x9f643a=_0x34ebe1([_0x145a3a(0x0,_0x38a43b[_0x582b18(0x1d1)]),_0x145a3a(0x1,_0xa28331['Inject'](_0x16cc64))],_0x9f643a);var _0x5ed0b6=Object[_0x582b18(0x1c8)],_0x905294=Object[_0x582b18(0x23a)],_0x13ca15=(_0x5bbc9f,_0x4776ab,_0x1567c5)=>_0x4776ab in _0x5bbc9f?_0x5ed0b6(_0x5bbc9f,_0x4776ab,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1567c5}):_0x5bbc9f[_0x4776ab]=_0x1567c5,_0x4bdd15=(_0x488d8a,_0x6987f4,_0x4845eb,_0x28e9bd)=>{const _0x31b037=_0x582b18;for(var _0x2d8d43=_0x28e9bd>0x1?void 0x0:_0x28e9bd?_0x905294(_0x6987f4,_0x4845eb):_0x6987f4,_0x10b3c9=_0x488d8a[_0x31b037(0x212)]-0x1,_0x22cb77;_0x10b3c9>=0x0;_0x10b3c9--)(_0x22cb77=_0x488d8a[_0x10b3c9])&&(_0x2d8d43=_0x22cb77(_0x2d8d43)||_0x2d8d43);return _0x2d8d43;},_0x13d8b9=(_0x5ebbd3,_0xa2a926)=>(_0x4480ba,_0x40d39e)=>_0xa2a926(_0x4480ba,_0x40d39e,_0x5ebbd3),_0x3bdd4d=(_0x390415,_0x5a482f,_0x70e610)=>_0x13ca15(_0x390415,typeof _0x5a482f!=_0x582b18(0x1f1)?_0x5a482f+'':_0x5a482f,_0x70e610);_0x60b3fd[_0x582b18(0x207)]=class extends _0xa28331[_0x582b18(0x1e2)]{constructor(_0x4c89f7=_0x24add3,_0xe7258d,_0x3ec3fa){const _0x54e347=_0x582b18;super(),this[_0x54e347(0x221)]=_0x4c89f7,this['_injector']=_0xe7258d,this[_0x54e347(0x1d3)]=_0x3ec3fa;const {..._0x719231}=_0xa28331['merge']({},_0x24add3,this[_0x54e347(0x221)]);this['_configService'][_0x54e347(0x1e1)](_0x568bed,_0x719231);}[_0x582b18(0x21f)](){const _0x48f955=_0x582b18;[[_0x16cc64],[_0x9f643a],[_0xed5d36]][_0x48f955(0x218)](_0x8d94eb=>{const _0x572a69=_0x48f955;this[_0x572a69(0x1fb)][_0x572a69(0x220)](_0x8d94eb);});}[_0x582b18(0x235)](){const _0xc8aa0=_0x582b18;this[_0xc8aa0(0x1fb)][_0xc8aa0(0x223)](_0x9f643a),this[_0xc8aa0(0x1fb)][_0xc8aa0(0x223)](_0xed5d36);}},_0x3bdd4d(_0x60b3fd['UniverThreadCommentDataSourcePlugin'],_0x582b18(0x1e6),_0x7ff09c),_0x3bdd4d(_0x60b3fd[_0x582b18(0x207)],'type',_0xa28331[_0x582b18(0x1fc)]['UNIVER_UNKNOWN']),_0x60b3fd['UniverThreadCommentDataSourcePlugin']=_0x4bdd15([_0xa28331[_0x582b18(0x1e4)](_0x41e30c[_0x582b18(0x217)],_0x6e9407[_0x582b18(0x1d8)],_0x34bfcd['UniverLicensePlugin']),_0x13d8b9(0x1,_0xa28331[_0x582b18(0x1c2)](_0xa28331[_0x582b18(0x233)])),_0x13d8b9(0x2,_0xa28331[_0x582b18(0x213)])],_0x60b3fd[_0x582b18(0x207)]),Object[_0x582b18(0x1c8)](_0x60b3fd,Symbol[_0x582b18(0x1d9)],{'value':_0x582b18(0x1b1)});}));function _0x4815(){const _0x3685ad=['/edit','DependentOn','_threadCommentModel','pluginName','stringify','getUnit','syncUpdateMutationToColla','function','/universer-api/comment/unit/','content','Unknown','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','amd','comments','symbol','listComments','12856608dTMoDW','createTimestamp','size','_commentService','_initDataSource','resolveComment','10mXRqDC','UniverProLicense','_injector','UniverInstanceType','threadId','_userService','@univerjs/thread-comment-ui','Reply','find','OpenOrReOpen','_threadCommentDataSourceService','unitId','addComment','@univerjs/core','UniverThreadCommentDataSourcePlugin','/solved','resolved','@univerjs-pro/license','getUser','1585zVKqsp','solved','Edit','commentUpdate$','updateComment','57rKmtiv','length','IConfigService','reply','UniverThreadCommentUi','rangeType','UniverThreadCommentUIPlugin','forEach','CollaborationSessionService','getCurrentUser','body','/list','rxjs','addUser','onStarting','add','_config','getMemberID','get','/delete','userID','COMMENT','requireSession','subscribe','customRanges','userId','filter','root','dayjs','code','_initUserSync','@univerjs-pro/collaboration-client','_threadCommentDataSource','18372HCVKFN','Injector','UniverCore','onReady','UniverProCollaborationClient','comment','ref','post','getOwnPropertyDescriptor','pipe','Module','users','thread-comment-data-source.config','CommentService','exports','_httpService','1775673wmIDNi','CustomRangeType','delete','error','134fkeaKC','HTTPService','bufferTime','payload','parse','Add','deleteComment','Inject','UserManagerService','_init','replyId','/add','values','defineProperty','object','Solved','Disposable','3785IWXQWQ','disposeWithMe','8086529ddaggn','replies','saveCommentToSnapshot','IThreadCommentDataSourceService','format','_configService','Delete','YYYY/MM/DD\x20HH:mm','type','Solve','UniverCollaborationClientPlugin','toStringTag','UNRECOGNIZED','map','57544HTzDyE','_sessionService','rangeId','4936449werYiN','slice','setConfig','Plugin'];_0x4815=function(){return _0x3685ad;};return _0x4815();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.1-nightly.202507041607",
3
+ "version": "0.9.1-nightly.202507061606",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.9.1-nightly.202507041607",
49
- "@univerjs-pro/license": "0.9.1-nightly.202507041607",
50
- "@univerjs/network": "0.9.1-nightly.202507041607",
48
+ "@univerjs-pro/collaboration-client": "0.9.1-nightly.202507061606",
49
+ "@univerjs-pro/license": "0.9.1-nightly.202507061606",
50
+ "@univerjs/core": "0.9.1-nightly.202507061606",
51
+ "@univerjs/network": "0.9.1-nightly.202507061606",
51
52
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/core": "0.9.1-nightly.202507041607",
53
- "@univerjs/thread-comment": "0.9.1-nightly.202507041607",
54
- "@univerjs/thread-comment-ui": "0.9.1-nightly.202507041607"
53
+ "@univerjs/thread-comment-ui": "0.9.1-nightly.202507061606",
54
+ "@univerjs/thread-comment": "0.9.1-nightly.202507061606"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",