@univerjs-pro/thread-comment-datasource 0.9.2-nightly.202507181608 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function _0x3058(_0x5a995d,_0x18da63){const _0x1f59f6=_0x1f59();return _0x3058=function(_0x30581d,_0x32695d){_0x30581d=_0x30581d-0xc6;let _0x29a09e=_0x1f59f6[_0x30581d];return _0x29a09e;},_0x3058(_0x5a995d,_0x18da63);}const _0x5a3e92=_0x3058;(function(_0x326ad9,_0x38f49f){const _0xeee72a=_0x3058,_0x58989f=_0x326ad9();while(!![]){try{const _0x29ca3d=-parseInt(_0xeee72a(0xe4))/0x1+parseInt(_0xeee72a(0xd5))/0x2*(-parseInt(_0xeee72a(0xed))/0x3)+-parseInt(_0xeee72a(0x118))/0x4+parseInt(_0xeee72a(0xe7))/0x5+-parseInt(_0xeee72a(0x132))/0x6*(-parseInt(_0xeee72a(0x104))/0x7)+parseInt(_0xeee72a(0xeb))/0x8*(-parseInt(_0xeee72a(0xcc))/0x9)+-parseInt(_0xeee72a(0xf4))/0xa*(-parseInt(_0xeee72a(0x103))/0xb);if(_0x29ca3d===_0x38f49f)break;else _0x58989f['push'](_0x58989f['shift']());}catch(_0xbbd06f){_0x58989f['push'](_0x58989f['shift']());}}}(_0x1f59,0x81bcc));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'});function _0x1f59(){const _0x513bd6=['filter','/add','UniverThreadCommentUIPlugin','1850gvwGgI','Solve','YYYY/MM/DD\x20HH:mm','parentId','Inject','userID','UNRECOGNIZED','getUnit','_init','ThreadCommentModel','saveCommentToSnapshot','map','commentUpdate$','payload','Unknown','54153wXrmkm','616LGHVfB','stringify','CustomRangeType','createTimestamp','/universer-api/comment/unit/','getOwnPropertyDescriptor','personId','unitId','addComment','thread-comment-data-source.config','rangeId','/universer-api/user/list','get','_userService','replies','_threadCommentDataSource','/delete','content','_threadCommentDataSourceService','UniverThreadCommentDataSourcePlugin','1628076MWdFaq','addUser','rangeType','parse','Disposable','_config','getMemberID','Solved','length','IConfigService','/list','OpenOrReOpen','comment','symbol','HTTPService','user','solved','/edit','root','forEach','_threadCommentModel','_httpService','threadId','getComment','post','error','51420PidXTU','format','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','body','/reply','Delete','users','CollaborationSessionService','code','onStarting','type','merge','Reply','1233evkPhA','_initUserSync','resolved','updateComment','UNIVER_UNKNOWN','IThreadCommentDataSourceService','Add','dayjs','_initDataSource','1528MWidjC','add','values','reply','bufferTime','Injector','UniverCollaborationClientPlugin','resolveComment','syncUpdateMutationToColla','userId','_configService','UserManagerService','disposeWithMe','onReady','defineProperty','12202uWrAOU','_injector','_commentService','2144120qlUqJB','replyId','_sessionService','Edit','32176jNmrId','CommentService','2325zsqTGj','/solved','customRanges','listComments'];_0x1f59=function(){return _0x513bd6;};return _0x1f59();}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=_0x5a3e92(0x134);var I=(_0x5b946e=>(_0x5b946e[_0x5b946e[_0x5a3e92(0x123)]=0x0]=_0x5a3e92(0x123),_0x5b946e[_0x5b946e[_0x5a3e92(0x11f)]=0x1]=_0x5a3e92(0x11f),_0x5b946e[_0x5b946e['UNRECOGNIZED']=-0x1]=_0x5a3e92(0xfa),_0x5b946e))(I||{}),v=(_0x3920b3=>(_0x3920b3[_0x3920b3['Unknown']=0x0]=_0x5a3e92(0x102),_0x3920b3[_0x3920b3[_0x5a3e92(0xd2)]=0x1]='Add',_0x3920b3[_0x3920b3['Reply']=0x2]='Reply',_0x3920b3[_0x3920b3[_0x5a3e92(0xea)]=0x3]=_0x5a3e92(0xea),_0x3920b3[_0x3920b3[_0x5a3e92(0x138)]=0x4]=_0x5a3e92(0x138),_0x3920b3[_0x3920b3[_0x5a3e92(0xf5)]=0x5]=_0x5a3e92(0xf5),_0x3920b3[_0x3920b3[_0x5a3e92(0xfa)]=-0x1]=_0x5a3e92(0xfa),_0x3920b3))(v||{});const f=_0x2dafeb=>c[_0x5a3e92(0xd3)](new Date(+_0x2dafeb))[_0x5a3e92(0x133)](_0x5a3e92(0xf6)),R=async(_0x5d2e9a,_0x5629c4)=>{const _0x34ef34=_0x5a3e92,_0x41d649=_0x5d2e9a['get'](c[_0x34ef34(0xe0)]),_0x4b8fd2=_0x5d2e9a[_0x34ef34(0x110)](P['HTTPService']);_0x5629c4[_0x34ef34(0x12b)](_0x278db5=>{_0x41d649['getUser'](_0x278db5)&&_0x5629c4['delete'](_0x278db5);}),_0x5629c4['size']&&(await _0x4b8fd2[_0x34ef34(0x110)](_0x34ef34(0x10f),{'params':{'userIDs':[..._0x5629c4]}}))[_0x34ef34(0x136)][_0x34ef34(0x139)]['forEach'](_0x3459f9=>{const _0x102be8=_0x34ef34;_0x3459f9&&_0x41d649[_0x102be8(0x119)](_0x3459f9);});};var $=Object[_0x5a3e92(0x109)],E=(_0x39b66f,_0x3b2649,_0x59b0ca,_0x201171)=>{for(var _0x117d3c=_0x201171>0x1?void 0x0:_0x201171?$(_0x3b2649,_0x59b0ca):_0x3b2649,_0x5296ae=_0x39b66f['length']-0x1,_0x259c7c;_0x5296ae>=0x0;_0x5296ae--)(_0x259c7c=_0x39b66f[_0x5296ae])&&(_0x117d3c=_0x259c7c(_0x117d3c)||_0x117d3c);return _0x117d3c;},S=(_0x20858f,_0x54bc45)=>(_0x1e2b65,_0x5208cf)=>_0x54bc45(_0x1e2b65,_0x5208cf,_0x20858f);let p=class extends c['Disposable']{constructor(_0x2b1deb,_0x50e5ce,_0x209ee3,_0xea51a9){const _0x336489=_0x5a3e92;super(),this['_commentService']=_0x2b1deb,this[_0x336489(0x12c)]=_0x50e5ce,this[_0x336489(0x111)]=_0x209ee3,this[_0x336489(0xe5)]=_0xea51a9,this['_init'](),this[_0x336489(0xcd)]();}['_initUserSync'](){const _0x2e6aaa=_0x5a3e92;this[_0x2e6aaa(0xe1)](this[_0x2e6aaa(0x12c)][_0x2e6aaa(0x100)]['pipe'](w[_0x2e6aaa(0xd9)](0x10))['subscribe'](_0x44b3a0=>{const _0x4df286=_0x2e6aaa,_0x3f4f1b=new Set();_0x44b3a0[_0x4df286(0x12b)](_0x549151=>{const _0x537985=_0x4df286;switch(_0x549151[_0x537985(0xc9)]){case _0x537985(0xd6):{const _0x22ef90=_0x549151[_0x537985(0x101)][_0x537985(0x10a)];_0x3f4f1b[_0x537985(0xd6)](_0x22ef90);break;}}}),R(this['_injector'],_0x3f4f1b);}));}[_0x5a3e92(0xfc)](){const _0x1502ad=_0x5a3e92;this[_0x1502ad(0xe1)](this[_0x1502ad(0xe6)]['commentUpdate$']['subscribe'](async _0x179117=>{const _0x35db77=_0x1502ad;var _0x433505,_0x915f66,_0xb4a0a3,_0x53b2a5;const _0x575051=(_0x433505=this['_threadCommentModel']['getUnit'](_0x179117['unitId'])['find'](_0x4b0cef=>_0x4b0cef[_0x35db77(0x12e)]===_0x179117[_0x35db77(0x12e)]))==null?void 0x0:_0x433505[_0x35db77(0x12a)];if(!_0x575051)return;const {unitId:_0xd99e2a,subUnitId:_0x402d47}=_0x575051;switch(_0x179117[_0x35db77(0x127)]&&this[_0x35db77(0x111)][_0x35db77(0x119)](_0x179117[_0x35db77(0x127)]),_0x179117[_0x35db77(0xc9)]){case v['Add']:break;case v[_0x35db77(0xcb)]:{this['_threadCommentModel']['addComment'](_0xd99e2a,_0x402d47,{'unitId':_0xd99e2a,'subUnitId':_0x402d47,'ref':'','id':_0x179117['replyId'],'dT':f(+_0x179117['createTimestamp']),'threadId':_0x179117[_0x35db77(0x12e)],'personId':(_0xb4a0a3=(_0x915f66=_0x179117[_0x35db77(0x127)])==null?void 0x0:_0x915f66[_0x35db77(0xf9)])!=null?_0xb4a0a3:_0x179117[_0x35db77(0xde)],'text':JSON[_0x35db77(0x11b)](_0x179117[_0x35db77(0x115)]),'parentId':_0x575051['id']});break;}case v[_0x35db77(0x138)]:{const _0x11532e=this[_0x35db77(0x12c)][_0x35db77(0x12f)](_0xd99e2a,_0x402d47,_0x179117[_0x35db77(0xe8)]);_0x11532e&&_0x11532e[_0x35db77(0xf7)]&&this[_0x35db77(0x12c)]['deleteComment'](_0xd99e2a,_0x402d47,_0x179117['replyId']);break;}case v['Edit']:{this[_0x35db77(0x12c)][_0x35db77(0xcf)](_0xd99e2a,_0x402d47,{'commentId':_0x179117[_0x35db77(0xe8)],'text':JSON[_0x35db77(0x11b)](_0x179117[_0x35db77(0x115)])});break;}case v[_0x35db77(0xf5)]:{const _0x524986=(_0x53b2a5=this[_0x35db77(0x12c)][_0x35db77(0xfb)](_0x179117[_0x35db77(0x10b)])['find'](_0x5e6ac1=>_0x5e6ac1[_0x35db77(0x12e)]===_0x179117[_0x35db77(0x12e)]))==null?void 0x0:_0x53b2a5[_0x35db77(0x12a)];_0x524986&&this[_0x35db77(0x12c)][_0x35db77(0xdc)](_0xd99e2a,_0x402d47,_0x524986['id'],_0x179117[_0x35db77(0x128)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x5a3e92(0xf8)](b[_0x5a3e92(0xec)])),S(0x1,c[_0x5a3e92(0xf8)](M[_0x5a3e92(0xfd)])),S(0x2,c[_0x5a3e92(0xf8)](c['UserManagerService'])),S(0x3,c[_0x5a3e92(0xf8)](c[_0x5a3e92(0xda)]))],p);const q=_0x5a3e92(0x10d),D={};var A=Object[_0x5a3e92(0x109)],x=(_0x304227,_0xb04feb,_0x2e7e1a,_0x19301d)=>{const _0x26e057=_0x5a3e92;for(var _0x47adf1=_0x19301d>0x1?void 0x0:_0x19301d?A(_0xb04feb,_0x2e7e1a):_0xb04feb,_0x198127=_0x304227[_0x26e057(0x120)]-0x1,_0x30ca00;_0x198127>=0x0;_0x198127--)(_0x30ca00=_0x304227[_0x198127])&&(_0x47adf1=_0x30ca00(_0x47adf1)||_0x47adf1);return _0x47adf1;},_=(_0x6a0445,_0x1631c4)=>(_0x2be810,_0xaefe6a)=>_0x1631c4(_0x2be810,_0xaefe6a,_0x6a0445);function Y(_0x420919,_0x596ee6){const _0x2aac8a=_0x5a3e92,_0x3427c9=_0x420919['replies'][0x0];return{..._0x596ee6,'id':_0x3427c9[_0x2aac8a(0xe8)],'resolved':_0x420919[_0x2aac8a(0x128)]===0x1,'dT':f(_0x3427c9[_0x2aac8a(0x107)]),'personId':_0x3427c9[_0x2aac8a(0xde)],'threadId':_0x3427c9[_0x2aac8a(0x12e)]};}function G(_0x5f0c71,_0x1ca32d,_0x541d6a){const _0x2708df=_0x5a3e92;var _0x16eff2,_0x33676e;if(((_0x33676e=(_0x16eff2=_0x5f0c71==null?void 0x0:_0x5f0c71[_0x2708df(0x112)])==null?void 0x0:_0x16eff2[_0x2708df(0x120)])!=null?_0x33676e:0x0)>0x0){const _0x31f0cc=(_0x4062fe,_0x1f90c4)=>({'id':_0x4062fe[_0x2708df(0xe8)],'threadId':_0x4062fe[_0x2708df(0x12e)],'dT':f(_0x4062fe[_0x2708df(0x107)]),'personId':_0x4062fe[_0x2708df(0xde)],'resolved':_0x5f0c71[_0x2708df(0x128)]===I['Solved'],'unitId':_0x1ca32d,'subUnitId':_0x541d6a,'text':JSON['parse'](_0x4062fe['content']),'parentId':_0x1f90c4}),_0x340274=_0x31f0cc(_0x5f0c71[_0x2708df(0x112)][0x0]);return{..._0x340274,'children':_0x5f0c71[_0x2708df(0x112)]['slice'](0x1)['map'](_0x43a705=>_0x31f0cc(_0x43a705,_0x340274['id']))};}return null;}let g=class{constructor(_0x220f9b,_0x33f8c2,_0x1a294c,_0x6d34d0){const _0x41b863=_0x5a3e92;this['_httpService']=_0x220f9b,this[_0x41b863(0x111)]=_0x33f8c2,this['_sessionService']=_0x1a294c,this[_0x41b863(0xe5)]=_0x6d34d0;}async[_0x5a3e92(0x10c)](_0x484d36){const _0x3b914f=_0x5a3e92;var _0x36836d,_0x41cee6;const {parentId:_0x304bd7,unitId:_0x447d54,text:_0x8942ed,threadId:_0x4ca339}=_0x484d36,_0x2be604=(_0x41cee6=(_0x36836d=_0x8942ed[_0x3b914f(0xef)])==null?void 0x0:_0x36836d[_0x3b914f(0xf1)](_0x1dac63=>_0x1dac63['rangeType']===c[_0x3b914f(0x106)]['COMMENT'])['map'](_0x3e9c3c=>_0x3e9c3c[_0x3b914f(0x10e)]))!=null?_0x41cee6:[],_0x430a50=JSON[_0x3b914f(0x105)](_0x8942ed),_0x58d899=(await this[_0x3b914f(0xe9)][_0x3b914f(0x135)](_0x447d54))[_0x3b914f(0x11e)]();if(_0x304bd7){const _0x4d1007={'memberId':_0x58d899,'unitId':_0x447d54,'content':_0x430a50,'mention':_0x2be604,'threadId':_0x4ca339},_0x590108=(await this[_0x3b914f(0x12d)][_0x3b914f(0x130)](_0x3b914f(0x108)+_0x447d54+_0x3b914f(0x137),{'body':_0x4d1007}))['body'][_0x3b914f(0xd8)];return{..._0x484d36,'id':_0x590108[_0x3b914f(0xe8)],'dT':c[_0x3b914f(0xd3)](+_0x590108['createTimestamp'])[_0x3b914f(0x133)](_0x3b914f(0xf6)),'personId':_0x590108[_0x3b914f(0xde)]};}else{const _0x117b1f={'memberId':_0x58d899,'unitId':_0x447d54,'content':_0x430a50,'mention':_0x2be604},_0xd3701c=await this[_0x3b914f(0x12d)]['post'](_0x3b914f(0x108)+_0x447d54+_0x3b914f(0xf2),{'body':_0x117b1f});return Y(_0xd3701c[_0x3b914f(0x136)][_0x3b914f(0x124)],_0x484d36);}}async[_0x5a3e92(0xcf)](_0x1695df){const _0x5e4a60=_0x5a3e92;var _0x4898d3,_0x4302f6;const {text:_0xeaaaf3,unitId:_0x239578}=_0x1695df,_0x263e13=(_0x4302f6=(_0x4898d3=_0xeaaaf3[_0x5e4a60(0xef)])==null?void 0x0:_0x4898d3['filter'](_0x33db7c=>_0x33db7c[_0x5e4a60(0x11a)]===c[_0x5e4a60(0x106)]['COMMENT'])[_0x5e4a60(0xff)](_0x3c783f=>_0x3c783f[_0x5e4a60(0x10e)]))!=null?_0x4302f6:[],_0x5f21cb=JSON['stringify'](_0xeaaaf3),_0x249f39=_0x1695df[_0x5e4a60(0x12e)],_0x459172=_0x1695df['id'],_0x2610b9={'memberId':(await this[_0x5e4a60(0xe9)][_0x5e4a60(0x135)](_0x239578))['getMemberID'](),'unitId':_0x239578,'threadId':_0x249f39,'mention':_0x263e13,'content':_0x5f21cb,'replyId':_0x459172},_0x52a463=await this[_0x5e4a60(0x12d)][_0x5e4a60(0x130)]('/universer-api/comment/unit/'+_0x239578+_0x5e4a60(0x129),{'body':_0x2610b9});return!_0x52a463[_0x5e4a60(0x136)][_0x5e4a60(0x131)]||_0x52a463['body']['error'][_0x5e4a60(0xc7)]===0x1;}async[_0x5a3e92(0xdc)](_0x77e6ef){const _0x24fbe6=_0x5a3e92,{unitId:_0x3c096b}=_0x77e6ef,_0xc07df6=_0x77e6ef[_0x24fbe6(0x12e)],_0x2a792d={'memberId':this['_userService']['getCurrentUser']()[_0x24fbe6(0xf9)],'unitId':_0x3c096b,'threadId':_0xc07df6,'solved':_0x77e6ef[_0x24fbe6(0xce)]?I[_0x24fbe6(0x11f)]:I[_0x24fbe6(0x123)]},_0x2cd2e4=await this[_0x24fbe6(0x12d)]['post'](_0x24fbe6(0x108)+_0x3c096b+_0x24fbe6(0xee),{'body':_0x2a792d});return!_0x2cd2e4[_0x24fbe6(0x136)][_0x24fbe6(0x131)]||_0x2cd2e4['body'][_0x24fbe6(0x131)][_0x24fbe6(0xc7)]===0x1;}async['deleteComment'](_0x25d9e5,_0x509fa4,_0x121d97,_0x4ee619){const _0x5b8865=_0x5a3e92,_0xbde299={'memberId':(await this[_0x5b8865(0xe9)][_0x5b8865(0x135)](_0x25d9e5))[_0x5b8865(0x11e)](),'threadId':_0x121d97,'replyId':_0x4ee619,'unitId':_0x25d9e5},_0x129d63=await this['_httpService']['post'](_0x5b8865(0x108)+_0x25d9e5+_0x5b8865(0x114),{'body':_0xbde299});return!_0x129d63['body'][_0x5b8865(0x131)]||_0x129d63[_0x5b8865(0x136)][_0x5b8865(0x131)][_0x5b8865(0xc7)]===0x1;}async[_0x5a3e92(0xf0)](_0xcf4615,_0x76f88d,_0x11e8d1){const _0x15f16c=_0x5a3e92,_0x3026e0={'unitId':_0xcf4615,'threadId':_0x11e8d1},_0x3b766a=await this['_httpService'][_0x15f16c(0x130)]('/universer-api/comment/unit/'+_0xcf4615+_0x15f16c(0x122),{'body':_0x3026e0}),_0x53af8a=_0x11e8d1[_0x15f16c(0xff)](_0x8b07d2=>G(_0x3b766a['body']['comments'][_0x8b07d2],_0xcf4615,_0x76f88d))[_0x15f16c(0xf1)](Boolean);return Object[_0x15f16c(0xd7)](_0x3b766a['body']['users'])['forEach'](_0x1e4415=>{const _0x37eaf9=_0x15f16c;this['_userService'][_0x37eaf9(0x119)](_0x1e4415);}),_0x53af8a;}[_0x5a3e92(0xfe)](_0x4ecd9f){const _0x54c3bf=_0x5a3e92;return{'id':_0x4ecd9f['id'],'threadId':_0x4ecd9f[_0x54c3bf(0x12e)],'ref':_0x4ecd9f['ref']};}};g=x([_(0x0,c[_0x5a3e92(0xf8)](P[_0x5a3e92(0x126)])),_(0x1,c['Inject'](c[_0x5a3e92(0xe0)])),_(0x2,c['Inject'](b[_0x5a3e92(0xc6)])),_(0x3,c['Inject'](c[_0x5a3e92(0xda)]))],g);var H=Object[_0x5a3e92(0x109)],J=(_0x1bfdc1,_0x2b0f58,_0x555418,_0x4d5771)=>{for(var _0x574640=_0x4d5771>0x1?void 0x0:_0x4d5771?H(_0x2b0f58,_0x555418):_0x2b0f58,_0x12be26=_0x1bfdc1['length']-0x1,_0x226fe6;_0x12be26>=0x0;_0x12be26--)(_0x226fe6=_0x1bfdc1[_0x12be26])&&(_0x574640=_0x226fe6(_0x574640)||_0x574640);return _0x574640;},y=(_0x1fc21b,_0x541afb)=>(_0x2a7283,_0x2f5684)=>_0x541afb(_0x2a7283,_0x2f5684,_0x1fc21b);let C=class extends c[_0x5a3e92(0x11c)]{constructor(_0x33ee6e,_0x19a30d){const _0x11b581=_0x5a3e92;super(),this[_0x11b581(0x116)]=_0x33ee6e,this[_0x11b581(0x113)]=_0x19a30d,this['_initDataSource']();}[_0x5a3e92(0xd4)](){const _0x1f6318=_0x5a3e92;this['_threadCommentDataSourceService']['dataSource']=this[_0x1f6318(0x113)],this[_0x1f6318(0x116)][_0x1f6318(0xdd)]=!0x1;}};C=J([y(0x0,M[_0x5a3e92(0xd1)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x5a3e92(0xe3)],L=Object['getOwnPropertyDescriptor'],Z=(_0x2d5723,_0x4953ea,_0x6682db)=>_0x4953ea in _0x2d5723?F(_0x2d5723,_0x4953ea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6682db}):_0x2d5723[_0x4953ea]=_0x6682db,W=(_0x842501,_0x64103c,_0x212d41,_0x56bf75)=>{const _0x128d8f=_0x5a3e92;for(var _0x45b4d5=_0x56bf75>0x1?void 0x0:_0x56bf75?L(_0x64103c,_0x212d41):_0x64103c,_0x58004a=_0x842501[_0x128d8f(0x120)]-0x1,_0x2ffbb1;_0x58004a>=0x0;_0x58004a--)(_0x2ffbb1=_0x842501[_0x58004a])&&(_0x45b4d5=_0x2ffbb1(_0x45b4d5)||_0x45b4d5);return _0x45b4d5;},O=(_0x68917a,_0x149967)=>(_0x513f45,_0x4ffab2)=>_0x149967(_0x513f45,_0x4ffab2,_0x68917a),N=(_0x3ad275,_0x4875fa,_0x1757ff)=>Z(_0x3ad275,typeof _0x4875fa!=_0x5a3e92(0x125)?_0x4875fa+'':_0x4875fa,_0x1757ff);exports[_0x5a3e92(0x117)]=class extends c['Plugin']{constructor(_0x48bbf8=D,_0x1f16ba,_0x928626){const _0xb13038=_0x5a3e92;super(),this[_0xb13038(0x11d)]=_0x48bbf8,this['_injector']=_0x1f16ba,this[_0xb13038(0xdf)]=_0x928626;const {..._0x4bccdb}=c[_0xb13038(0xca)]({},D,this['_config']);this[_0xb13038(0xdf)]['setConfig'](q,_0x4bccdb);}[_0x5a3e92(0xc8)](){const _0xbb7f6=_0x5a3e92;[[g],[C],[p]][_0xbb7f6(0x12b)](_0x357316=>{const _0x598499=_0xbb7f6;this[_0x598499(0xe5)][_0x598499(0xd6)](_0x357316);});}[_0x5a3e92(0xe2)](){const _0x1802a3=_0x5a3e92;this[_0x1802a3(0xe5)][_0x1802a3(0x110)](C),this['_injector'][_0x1802a3(0x110)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x5a3e92(0x117)],_0x5a3e92(0xc9),c['UniverInstanceType'][_0x5a3e92(0xd0)]),exports[_0x5a3e92(0x117)]=W([c['DependentOn'](j[_0x5a3e92(0xf3)],b[_0x5a3e92(0xdb)],T['UniverLicensePlugin']),O(0x1,c[_0x5a3e92(0xf8)](c['Injector'])),O(0x2,c[_0x5a3e92(0x121)])],exports[_0x5a3e92(0x117)]);
1
+ 'use strict';const _0x537e25=_0x28fc;(function(_0x3d7770,_0x3ca40f){const _0x1b99c0=_0x28fc,_0x5735e2=_0x3d7770();while(!![]){try{const _0x569e07=parseInt(_0x1b99c0(0xc0))/0x1*(parseInt(_0x1b99c0(0x10e))/0x2)+-parseInt(_0x1b99c0(0xbf))/0x3*(parseInt(_0x1b99c0(0x11b))/0x4)+-parseInt(_0x1b99c0(0x123))/0x5+-parseInt(_0x1b99c0(0x116))/0x6*(parseInt(_0x1b99c0(0xdb))/0x7)+parseInt(_0x1b99c0(0x105))/0x8*(parseInt(_0x1b99c0(0xd9))/0x9)+parseInt(_0x1b99c0(0x10c))/0xa+parseInt(_0x1b99c0(0xf7))/0xb*(parseInt(_0x1b99c0(0x103))/0xc);if(_0x569e07===_0x3ca40f)break;else _0x5735e2['push'](_0x5735e2['shift']());}catch(_0x36b8a1){_0x5735e2['push'](_0x5735e2['shift']());}}}(_0x43e7,0x57a5f));Object[_0x537e25(0xaf)](exports,Symbol[_0x537e25(0x111)],{'value':_0x537e25(0x126)});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=_0x537e25(0xb0);var I=(_0x2f6e2b=>(_0x2f6e2b[_0x2f6e2b['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2f6e2b[_0x2f6e2b[_0x537e25(0xac)]=0x1]=_0x537e25(0xac),_0x2f6e2b[_0x2f6e2b['UNRECOGNIZED']=-0x1]=_0x537e25(0xf2),_0x2f6e2b))(I||{}),v=(_0x241dc0=>(_0x241dc0[_0x241dc0[_0x537e25(0x114)]=0x0]='Unknown',_0x241dc0[_0x241dc0['Add']=0x1]=_0x537e25(0xd4),_0x241dc0[_0x241dc0[_0x537e25(0x102)]=0x2]=_0x537e25(0x102),_0x241dc0[_0x241dc0[_0x537e25(0xc9)]=0x3]=_0x537e25(0xc9),_0x241dc0[_0x241dc0[_0x537e25(0x119)]=0x4]=_0x537e25(0x119),_0x241dc0[_0x241dc0['Solve']=0x5]='Solve',_0x241dc0[_0x241dc0[_0x537e25(0xf2)]=-0x1]=_0x537e25(0xf2),_0x241dc0))(v||{});const f=_0x599bf6=>c[_0x537e25(0xe1)](new Date(+_0x599bf6))['format'](_0x537e25(0xff)),R=async(_0x5b01e5,_0x554425)=>{const _0x148884=_0x537e25,_0x55092e=_0x5b01e5['get'](c[_0x148884(0xd7)]),_0xe91d8f=_0x5b01e5[_0x148884(0x109)](P['HTTPService']);_0x554425[_0x148884(0xe9)](_0x223e37=>{const _0x3e35c0=_0x148884;_0x55092e[_0x3e35c0(0xf9)](_0x223e37)&&_0x554425[_0x3e35c0(0x104)](_0x223e37);}),_0x554425[_0x148884(0x124)]&&(await _0xe91d8f[_0x148884(0x109)](_0x148884(0xd0),{'params':{'userIDs':[..._0x554425]}}))[_0x148884(0xe0)][_0x148884(0xf8)][_0x148884(0xe9)](_0x4b8757=>{const _0x99ae40=_0x148884;_0x4b8757&&_0x55092e[_0x99ae40(0xe3)](_0x4b8757);});};function _0x43e7(){const _0x52e6c0=['_initUserSync','getComment','UserManagerService','stringify','289287aIFvOA','userId','29869IdMftz','_config','root','add','rangeType','body','dayjs','getUnit','addUser','pluginName','unitId','map','UNIVER_UNKNOWN','replies','forEach','UniverThreadCommentUIPlugin','_threadCommentDataSourceService','user','/edit','/reply','replyId','/universer-api/comment/unit/','type','UNRECOGNIZED','OpenOrReOpen','IConfigService','_init','parentId','303039LlFzFk','users','getUser','_userService','values','HTTPService','find','_httpService','YYYY/MM/DD\x20HH:mm','UniverLicensePlugin','getOwnPropertyDescriptor','Reply','120xZqsxX','delete','8FlbzwJ','/solved','error','CommentService','get','payload','_commentService','6406120vdakte','merge','159754qOyxDF','customRanges','Disposable','toStringTag','resolved','rangeId','Unknown','Inject','318OksRSt','threadId','createTimestamp','Delete','subscribe','36oLTbjz','code','Solve','DependentOn','length','COMMENT','reply','disposeWithMe','1569295LGTVjU','size','UniverThreadCommentDataSourcePlugin','Module','Solved','addComment','content','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dataSource','_sessionService','onReady','resolveComment','userID','_injector','post','IThreadCommentDataSourceService','personId','bufferTime','slice','comments','pipe','setConfig','43035RSFaRi','1WklhnS','thread-comment-data-source.config','updateComment','/add','/delete','onStarting','ThreadCommentModel','getCurrentUser','parse','Edit','_configService','saveCommentToSnapshot','_initDataSource','filter','comment','requireSession','/universer-api/user/list','getMemberID','_threadCommentModel','solved','Add'];_0x43e7=function(){return _0x52e6c0;};return _0x43e7();}var $=Object[_0x537e25(0x101)],E=(_0x25f78d,_0x345e63,_0x26fe70,_0x338327)=>{const _0x22f9f1=_0x537e25;for(var _0x2fa20a=_0x338327>0x1?void 0x0:_0x338327?$(_0x345e63,_0x26fe70):_0x345e63,_0x4f2d5d=_0x25f78d[_0x22f9f1(0x11f)]-0x1,_0x3b679f;_0x4f2d5d>=0x0;_0x4f2d5d--)(_0x3b679f=_0x25f78d[_0x4f2d5d])&&(_0x2fa20a=_0x3b679f(_0x2fa20a)||_0x2fa20a);return _0x2fa20a;},S=(_0x3f8610,_0x3ab7f2)=>(_0x3c4136,_0x5c7990)=>_0x3ab7f2(_0x3c4136,_0x5c7990,_0x3f8610);function _0x28fc(_0x20aa04,_0x196297){const _0x43e73e=_0x43e7();return _0x28fc=function(_0x28fce2,_0x502005){_0x28fce2=_0x28fce2-0xac;let _0x143b90=_0x43e73e[_0x28fce2];return _0x143b90;},_0x28fc(_0x20aa04,_0x196297);}let p=class extends c['Disposable']{constructor(_0x436a32,_0x791b2f,_0x32ea79,_0x146f5e){const _0x1dec4b=_0x537e25;super(),this[_0x1dec4b(0x10b)]=_0x436a32,this[_0x1dec4b(0xd2)]=_0x791b2f,this[_0x1dec4b(0xfa)]=_0x32ea79,this[_0x1dec4b(0xb6)]=_0x146f5e,this[_0x1dec4b(0xf5)](),this[_0x1dec4b(0xd5)]();}[_0x537e25(0xd5)](){const _0x25c184=_0x537e25;this[_0x25c184(0x122)](this[_0x25c184(0xd2)]['commentUpdate$'][_0x25c184(0xbd)](w[_0x25c184(0xba)](0x10))[_0x25c184(0x11a)](_0x1044c0=>{const _0x45a007=_0x25c184,_0x53159b=new Set();_0x1044c0[_0x45a007(0xe9)](_0x48357a=>{const _0x287f3e=_0x45a007;switch(_0x48357a['type']){case _0x287f3e(0xde):{const _0x24bb2b=_0x48357a[_0x287f3e(0x10a)][_0x287f3e(0xb9)];_0x53159b[_0x287f3e(0xde)](_0x24bb2b);break;}}}),R(this[_0x45a007(0xb6)],_0x53159b);}));}[_0x537e25(0xf5)](){const _0x6b0ae6=_0x537e25;this[_0x6b0ae6(0x122)](this[_0x6b0ae6(0x10b)]['commentUpdate$'][_0x6b0ae6(0x11a)](async _0x2413c2=>{const _0x118ca4=_0x6b0ae6;var _0x291608,_0x56fc14,_0x3b23d7,_0x24e08f;const _0x29f28a=(_0x291608=this[_0x118ca4(0xd2)][_0x118ca4(0xe2)](_0x2413c2[_0x118ca4(0xe5)])[_0x118ca4(0xfd)](_0x2847a5=>_0x2847a5[_0x118ca4(0x117)]===_0x2413c2[_0x118ca4(0x117)]))==null?void 0x0:_0x291608[_0x118ca4(0xdd)];if(!_0x29f28a)return;const {unitId:_0x52d860,subUnitId:_0x56b0ff}=_0x29f28a;switch(_0x2413c2[_0x118ca4(0xec)]&&this[_0x118ca4(0xfa)][_0x118ca4(0xe3)](_0x2413c2[_0x118ca4(0xec)]),_0x2413c2[_0x118ca4(0xf1)]){case v[_0x118ca4(0xd4)]:break;case v['Reply']:{this[_0x118ca4(0xd2)][_0x118ca4(0xad)](_0x52d860,_0x56b0ff,{'unitId':_0x52d860,'subUnitId':_0x56b0ff,'ref':'','id':_0x2413c2[_0x118ca4(0xef)],'dT':f(+_0x2413c2[_0x118ca4(0x118)]),'threadId':_0x2413c2['threadId'],'personId':(_0x3b23d7=(_0x56fc14=_0x2413c2[_0x118ca4(0xec)])==null?void 0x0:_0x56fc14[_0x118ca4(0xb5)])!=null?_0x3b23d7:_0x2413c2['userId'],'text':JSON['parse'](_0x2413c2[_0x118ca4(0xae)]),'parentId':_0x29f28a['id']});break;}case v[_0x118ca4(0x119)]:{const _0x1a7c0c=this[_0x118ca4(0xd2)][_0x118ca4(0xd6)](_0x52d860,_0x56b0ff,_0x2413c2[_0x118ca4(0xef)]);_0x1a7c0c&&_0x1a7c0c[_0x118ca4(0xf6)]&&this[_0x118ca4(0xd2)]['deleteComment'](_0x52d860,_0x56b0ff,_0x2413c2[_0x118ca4(0xef)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x118ca4(0xc2)](_0x52d860,_0x56b0ff,{'commentId':_0x2413c2[_0x118ca4(0xef)],'text':JSON[_0x118ca4(0xc8)](_0x2413c2['content'])});break;}case v[_0x118ca4(0x11d)]:{const _0x33134f=(_0x24e08f=this[_0x118ca4(0xd2)][_0x118ca4(0xe2)](_0x2413c2['unitId'])['find'](_0x483573=>_0x483573['threadId']===_0x2413c2[_0x118ca4(0x117)]))==null?void 0x0:_0x24e08f[_0x118ca4(0xdd)];_0x33134f&&this['_threadCommentModel'][_0x118ca4(0xb4)](_0x52d860,_0x56b0ff,_0x33134f['id'],_0x2413c2[_0x118ca4(0xd3)]===I[_0x118ca4(0xac)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x537e25(0x108)])),S(0x1,c[_0x537e25(0x115)](M[_0x537e25(0xc6)])),S(0x2,c[_0x537e25(0x115)](c['UserManagerService'])),S(0x3,c[_0x537e25(0x115)](c['Injector']))],p);const q=_0x537e25(0xc1),D={};var A=Object[_0x537e25(0x101)],x=(_0x46b23a,_0x183003,_0x378d78,_0x5ac0e8)=>{for(var _0x2236a4=_0x5ac0e8>0x1?void 0x0:_0x5ac0e8?A(_0x183003,_0x378d78):_0x183003,_0x3e3f30=_0x46b23a['length']-0x1,_0x496946;_0x3e3f30>=0x0;_0x3e3f30--)(_0x496946=_0x46b23a[_0x3e3f30])&&(_0x2236a4=_0x496946(_0x2236a4)||_0x2236a4);return _0x2236a4;},_=(_0x544788,_0x59d85b)=>(_0x460181,_0xe5bcea)=>_0x59d85b(_0x460181,_0xe5bcea,_0x544788);function Y(_0xa4b98b,_0x17c63d){const _0x24f4b6=_0x537e25,_0x361ce3=_0xa4b98b[_0x24f4b6(0xe8)][0x0];return{..._0x17c63d,'id':_0x361ce3['replyId'],'resolved':_0xa4b98b[_0x24f4b6(0xd3)]===0x1,'dT':f(_0x361ce3[_0x24f4b6(0x118)]),'personId':_0x361ce3[_0x24f4b6(0xda)],'threadId':_0x361ce3[_0x24f4b6(0x117)]};}function G(_0xd166dc,_0x15ae85,_0x10ad5e){const _0x4bbde8=_0x537e25;var _0xbb440e,_0x480962;if(((_0x480962=(_0xbb440e=_0xd166dc==null?void 0x0:_0xd166dc['replies'])==null?void 0x0:_0xbb440e['length'])!=null?_0x480962:0x0)>0x0){const _0x18cefd=(_0x598173,_0x2a7359)=>({'id':_0x598173[_0x4bbde8(0xef)],'threadId':_0x598173['threadId'],'dT':f(_0x598173[_0x4bbde8(0x118)]),'personId':_0x598173['userId'],'resolved':_0xd166dc[_0x4bbde8(0xd3)]===I[_0x4bbde8(0xac)],'unitId':_0x15ae85,'subUnitId':_0x10ad5e,'text':JSON[_0x4bbde8(0xc8)](_0x598173[_0x4bbde8(0xae)]),'parentId':_0x2a7359}),_0x2e59fe=_0x18cefd(_0xd166dc[_0x4bbde8(0xe8)][0x0]);return{..._0x2e59fe,'children':_0xd166dc[_0x4bbde8(0xe8)][_0x4bbde8(0xbb)](0x1)[_0x4bbde8(0xe6)](_0x279bf7=>_0x18cefd(_0x279bf7,_0x2e59fe['id']))};}return null;}let g=class{constructor(_0x4fb84d,_0x4b9d39,_0x17ab6a,_0x2d5e5c){const _0x343df8=_0x537e25;this['_httpService']=_0x4fb84d,this[_0x343df8(0xfa)]=_0x4b9d39,this[_0x343df8(0xb2)]=_0x17ab6a,this[_0x343df8(0xb6)]=_0x2d5e5c;}async[_0x537e25(0xad)](_0xc35956){const _0x2d4571=_0x537e25;var _0x37dfe7,_0x9b3a4c;const {parentId:_0x52fdf0,unitId:_0x1ad11d,text:_0x3c89cb,threadId:_0x3a5c6f}=_0xc35956,_0x5a26c4=(_0x9b3a4c=(_0x37dfe7=_0x3c89cb['customRanges'])==null?void 0x0:_0x37dfe7['filter'](_0x5bdf15=>_0x5bdf15['rangeType']===c['CustomRangeType'][_0x2d4571(0x120)])[_0x2d4571(0xe6)](_0x4ae2a9=>_0x4ae2a9[_0x2d4571(0x113)]))!=null?_0x9b3a4c:[],_0x253c2e=JSON['stringify'](_0x3c89cb),_0x1c84ba=(await this[_0x2d4571(0xb2)][_0x2d4571(0xcf)](_0x1ad11d))[_0x2d4571(0xd1)]();if(_0x52fdf0){const _0x5aefae={'memberId':_0x1c84ba,'unitId':_0x1ad11d,'content':_0x253c2e,'mention':_0x5a26c4,'threadId':_0x3a5c6f},_0x200713=(await this[_0x2d4571(0xfe)]['post'](_0x2d4571(0xf0)+_0x1ad11d+_0x2d4571(0xee),{'body':_0x5aefae}))['body'][_0x2d4571(0x121)];return{..._0xc35956,'id':_0x200713['replyId'],'dT':c[_0x2d4571(0xe1)](+_0x200713[_0x2d4571(0x118)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x200713['userId']};}else{const _0x297e05={'memberId':_0x1c84ba,'unitId':_0x1ad11d,'content':_0x253c2e,'mention':_0x5a26c4},_0x5163bb=await this[_0x2d4571(0xfe)][_0x2d4571(0xb7)](_0x2d4571(0xf0)+_0x1ad11d+_0x2d4571(0xc3),{'body':_0x297e05});return Y(_0x5163bb[_0x2d4571(0xe0)][_0x2d4571(0xce)],_0xc35956);}}async[_0x537e25(0xc2)](_0x106ec9){const _0x2d6a23=_0x537e25;var _0x457b86,_0x4aa8f7;const {text:_0x3ae864,unitId:_0x482cc4}=_0x106ec9,_0x5eecc1=(_0x4aa8f7=(_0x457b86=_0x3ae864[_0x2d6a23(0x10f)])==null?void 0x0:_0x457b86[_0x2d6a23(0xcd)](_0x1e2b3c=>_0x1e2b3c[_0x2d6a23(0xdf)]===c['CustomRangeType'][_0x2d6a23(0x120)])['map'](_0x213ae3=>_0x213ae3[_0x2d6a23(0x113)]))!=null?_0x4aa8f7:[],_0x2274a0=JSON[_0x2d6a23(0xd8)](_0x3ae864),_0x551287=_0x106ec9['threadId'],_0x37e2b3=_0x106ec9['id'],_0x36fafc={'memberId':(await this[_0x2d6a23(0xb2)][_0x2d6a23(0xcf)](_0x482cc4))[_0x2d6a23(0xd1)](),'unitId':_0x482cc4,'threadId':_0x551287,'mention':_0x5eecc1,'content':_0x2274a0,'replyId':_0x37e2b3},_0x10f10a=await this['_httpService'][_0x2d6a23(0xb7)](_0x2d6a23(0xf0)+_0x482cc4+_0x2d6a23(0xed),{'body':_0x36fafc});return!_0x10f10a[_0x2d6a23(0xe0)][_0x2d6a23(0x107)]||_0x10f10a[_0x2d6a23(0xe0)]['error'][_0x2d6a23(0x11c)]===0x1;}async['resolveComment'](_0x38c9a9){const _0x3d63d8=_0x537e25,{unitId:_0x4444d6}=_0x38c9a9,_0x219343=_0x38c9a9[_0x3d63d8(0x117)],_0x44f15c={'memberId':this['_userService'][_0x3d63d8(0xc7)]()[_0x3d63d8(0xb5)],'unitId':_0x4444d6,'threadId':_0x219343,'solved':_0x38c9a9[_0x3d63d8(0x112)]?I[_0x3d63d8(0xac)]:I[_0x3d63d8(0xf3)]},_0x1351d7=await this[_0x3d63d8(0xfe)]['post'](_0x3d63d8(0xf0)+_0x4444d6+_0x3d63d8(0x106),{'body':_0x44f15c});return!_0x1351d7[_0x3d63d8(0xe0)][_0x3d63d8(0x107)]||_0x1351d7[_0x3d63d8(0xe0)]['error']['code']===0x1;}async['deleteComment'](_0xb0cb48,_0xf5b0fd,_0x33803c,_0x44fa68){const _0x3a4ec4=_0x537e25,_0x16431a={'memberId':(await this[_0x3a4ec4(0xb2)][_0x3a4ec4(0xcf)](_0xb0cb48))[_0x3a4ec4(0xd1)](),'threadId':_0x33803c,'replyId':_0x44fa68,'unitId':_0xb0cb48},_0x58318=await this[_0x3a4ec4(0xfe)][_0x3a4ec4(0xb7)](_0x3a4ec4(0xf0)+_0xb0cb48+_0x3a4ec4(0xc4),{'body':_0x16431a});return!_0x58318['body'][_0x3a4ec4(0x107)]||_0x58318[_0x3a4ec4(0xe0)][_0x3a4ec4(0x107)][_0x3a4ec4(0x11c)]===0x1;}async['listComments'](_0x2c4ad8,_0x4a695b,_0x5ed734){const _0x4f82ad=_0x537e25,_0x53023c={'unitId':_0x2c4ad8,'threadId':_0x5ed734},_0x30a8bc=await this['_httpService'][_0x4f82ad(0xb7)](_0x4f82ad(0xf0)+_0x2c4ad8+'/list',{'body':_0x53023c}),_0x44a6d9=_0x5ed734[_0x4f82ad(0xe6)](_0xe1820=>G(_0x30a8bc[_0x4f82ad(0xe0)][_0x4f82ad(0xbc)][_0xe1820],_0x2c4ad8,_0x4a695b))[_0x4f82ad(0xcd)](Boolean);return Object[_0x4f82ad(0xfb)](_0x30a8bc[_0x4f82ad(0xe0)][_0x4f82ad(0xf8)])[_0x4f82ad(0xe9)](_0x418acb=>{const _0x570462=_0x4f82ad;this[_0x570462(0xfa)]['addUser'](_0x418acb);}),_0x44a6d9;}[_0x537e25(0xcb)](_0x591586){return{'id':_0x591586['id'],'threadId':_0x591586['threadId'],'ref':_0x591586['ref']};}};g=x([_(0x0,c[_0x537e25(0x115)](P[_0x537e25(0xfc)])),_(0x1,c[_0x537e25(0x115)](c[_0x537e25(0xd7)])),_(0x2,c[_0x537e25(0x115)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x537e25(0x101)],J=(_0xca9081,_0x393739,_0x4926a6,_0x1e62ec)=>{for(var _0x1f3bd=_0x1e62ec>0x1?void 0x0:_0x1e62ec?H(_0x393739,_0x4926a6):_0x393739,_0x3e06ed=_0xca9081['length']-0x1,_0x3f1fb1;_0x3e06ed>=0x0;_0x3e06ed--)(_0x3f1fb1=_0xca9081[_0x3e06ed])&&(_0x1f3bd=_0x3f1fb1(_0x1f3bd)||_0x1f3bd);return _0x1f3bd;},y=(_0x510d14,_0xe382f1)=>(_0x5bc488,_0x5aba03)=>_0xe382f1(_0x5bc488,_0x5aba03,_0x510d14);let C=class extends c[_0x537e25(0x110)]{constructor(_0x41313a,_0xcf6f00){const _0x38f279=_0x537e25;super(),this['_threadCommentDataSourceService']=_0x41313a,this['_threadCommentDataSource']=_0xcf6f00,this[_0x38f279(0xcc)]();}[_0x537e25(0xcc)](){const _0x43fcdf=_0x537e25;this[_0x43fcdf(0xeb)][_0x43fcdf(0xb1)]=this['_threadCommentDataSource'],this[_0x43fcdf(0xeb)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x537e25(0xb8)]),y(0x1,c[_0x537e25(0x115)](g))],C);var F=Object[_0x537e25(0xaf)],L=Object[_0x537e25(0x101)],Z=(_0x483c4c,_0x561605,_0x19c3c9)=>_0x561605 in _0x483c4c?F(_0x483c4c,_0x561605,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x19c3c9}):_0x483c4c[_0x561605]=_0x19c3c9,W=(_0x1dccb7,_0x2e8fcc,_0x548089,_0x3429dd)=>{for(var _0x3e8f5b=_0x3429dd>0x1?void 0x0:_0x3429dd?L(_0x2e8fcc,_0x548089):_0x2e8fcc,_0x97b84d=_0x1dccb7['length']-0x1,_0x129f1c;_0x97b84d>=0x0;_0x97b84d--)(_0x129f1c=_0x1dccb7[_0x97b84d])&&(_0x3e8f5b=_0x129f1c(_0x3e8f5b)||_0x3e8f5b);return _0x3e8f5b;},O=(_0x21ef7d,_0x5e11d9)=>(_0x4acc8c,_0x3ad932)=>_0x5e11d9(_0x4acc8c,_0x3ad932,_0x21ef7d),N=(_0x3901bf,_0x503a5d,_0x155087)=>Z(_0x3901bf,typeof _0x503a5d!='symbol'?_0x503a5d+'':_0x503a5d,_0x155087);exports[_0x537e25(0x125)]=class extends c['Plugin']{constructor(_0x182ebd=D,_0x2608c8,_0x5840d8){const _0xf15156=_0x537e25;super(),this[_0xf15156(0xdc)]=_0x182ebd,this[_0xf15156(0xb6)]=_0x2608c8,this[_0xf15156(0xca)]=_0x5840d8;const {..._0xf23c28}=c[_0xf15156(0x10d)]({},D,this[_0xf15156(0xdc)]);this[_0xf15156(0xca)][_0xf15156(0xbe)](q,_0xf23c28);}[_0x537e25(0xc5)](){[[g],[C],[p]]['forEach'](_0x216b4e=>{const _0x185a8d=_0x28fc;this['_injector'][_0x185a8d(0xde)](_0x216b4e);});}[_0x537e25(0xb3)](){const _0xcf05d9=_0x537e25;this[_0xcf05d9(0xb6)][_0xcf05d9(0x109)](C),this[_0xcf05d9(0xb6)][_0xcf05d9(0x109)](p);}},N(exports[_0x537e25(0x125)],_0x537e25(0xe4),U),N(exports[_0x537e25(0x125)],_0x537e25(0xf1),c['UniverInstanceType'][_0x537e25(0xe7)]),exports[_0x537e25(0x125)]=W([c[_0x537e25(0x11e)](j[_0x537e25(0xea)],b['UniverCollaborationClientPlugin'],T[_0x537e25(0x100)]),O(0x1,c[_0x537e25(0x115)](c['Injector'])),O(0x2,c[_0x537e25(0xf4)])],exports[_0x537e25(0x125)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- function _0x419f(){const _0x30bc73=['resolved','code','19704uLdKPw','/delete','userID','get','/universer-api/comment/unit/','saveCommentToSnapshot','getUser','requireSession','post','749AjOMpB','addUser','Unknown','281369TSzLxx','_threadCommentDataSource','solved','updateComment','ref','_init','87939rULiBR','unitId','rangeId','Solved','COMMENT','format','resolveComment','Delete','defineProperty','Edit','setConfig','createTimestamp','replies','OpenOrReOpen','map','onReady','470xWsXvm','/edit','_threadCommentDataSourceService','payload','_configService','_initDataSource','getMemberID','delete','_sessionService','filter','stringify','_config','syncUpdateMutationToColla','content','root','error','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','disposeWithMe','180dtNRcc','deleteComment','parse','find','rangeType','getCurrentUser','getOwnPropertyDescriptor','pipe','thread-comment-data-source.config','parentId','1867026ThHWxN','/solved','symbol','_injector','_userService','_httpService','customRanges','comment','getUnit','personId','commentUpdate$','forEach','_initUserSync','replyId','_commentService','933237lKPEDM','add','Reply','/universer-api/user/list','type','260dbMaXs','5225LQZAbh','length','onStarting','values','_threadCommentModel','threadId','user','Solve','dataSource','userId','size','UNRECOGNIZED','1372MsMMsw','4169GwPPtG','body'];_0x419f=function(){return _0x30bc73;};return _0x419f();}const _0x2dab71=_0x38c7;(function(_0x2587d5,_0xbaf0ec){const _0x346bcd=_0x38c7,_0x1ee716=_0x2587d5();while(!![]){try{const _0x47db9b=parseInt(_0x346bcd(0x151))/0x1*(-parseInt(_0x346bcd(0x143))/0x2)+-parseInt(_0x346bcd(0x13e))/0x3+parseInt(_0x346bcd(0x150))/0x4*(parseInt(_0x346bcd(0x144))/0x5)+parseInt(_0x346bcd(0x12f))/0x6+parseInt(_0x346bcd(0x15e))/0x7*(-parseInt(_0x346bcd(0x155))/0x8)+parseInt(_0x346bcd(0x167))/0x9*(parseInt(_0x346bcd(0x112))/0xa)+parseInt(_0x346bcd(0x161))/0xb*(parseInt(_0x346bcd(0x125))/0xc);if(_0x47db9b===_0xbaf0ec)break;else _0x1ee716['push'](_0x1ee716['shift']());}catch(_0x3b93fc){_0x1ee716['push'](_0x1ee716['shift']());}}}(_0x419f,0x60aa2));import{CommentService as _0x21192d,CollaborationSessionService as _0x1eaae2,UniverCollaborationClientPlugin as _0x56bd3f}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x121e1a}from'@univerjs-pro/license';import{dayjs as _0x35c504,UserManagerService as _0x1b2ae9,Inject as _0x223669,Injector as _0x380632,Disposable as _0x541d21,CustomRangeType as _0x2f110e,UniverInstanceType as _0x48e5bc,DependentOn as _0x246354,IConfigService as _0x238b6a,Plugin as _0x3558e5,merge as _0x56cf94}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4fa7aa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x95a713,IThreadCommentDataSourceService as _0x465bec}from'@univerjs/thread-comment';import{bufferTime as _0x4ecd2a}from'rxjs';import{HTTPService as _0x17be68}from'@univerjs/network';const W=_0x2dab71(0x123);var I=(_0x3d75c3=>(_0x3d75c3[_0x3d75c3['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x3d75c3[_0x3d75c3['Solved']=0x1]=_0x2dab71(0x16a),_0x3d75c3[_0x3d75c3[_0x2dab71(0x14f)]=-0x1]=_0x2dab71(0x14f),_0x3d75c3))(I||{}),v=(_0x2a742f=>(_0x2a742f[_0x2a742f[_0x2dab71(0x160)]=0x0]=_0x2dab71(0x160),_0x2a742f[_0x2a742f[_0x2dab71(0x122)]=0x1]=_0x2dab71(0x122),_0x2a742f[_0x2a742f[_0x2dab71(0x140)]=0x2]='Reply',_0x2a742f[_0x2a742f[_0x2dab71(0x170)]=0x3]=_0x2dab71(0x170),_0x2a742f[_0x2a742f[_0x2dab71(0x16e)]=0x4]=_0x2dab71(0x16e),_0x2a742f[_0x2a742f[_0x2dab71(0x14b)]=0x5]=_0x2dab71(0x14b),_0x2a742f[_0x2a742f[_0x2dab71(0x14f)]=-0x1]=_0x2dab71(0x14f),_0x2a742f))(v||{});const D=_0x56c464=>_0x35c504(new Date(+_0x56c464))[_0x2dab71(0x16c)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x61d5a7,_0x5e31af)=>{const _0x316404=_0x2dab71,_0x3b1799=_0x61d5a7['get'](_0x1b2ae9),_0x4e6421=_0x61d5a7[_0x316404(0x158)](_0x17be68);_0x5e31af[_0x316404(0x13a)](_0x4ba52e=>{const _0x121e62=_0x316404;_0x3b1799[_0x121e62(0x15b)](_0x4ba52e)&&_0x5e31af[_0x121e62(0x119)](_0x4ba52e);}),_0x5e31af[_0x316404(0x14e)]&&(await _0x4e6421['get'](_0x316404(0x141),{'params':{'userIDs':[..._0x5e31af]}}))['body']['users'][_0x316404(0x13a)](_0x534ac6=>{const _0x3d9c25=_0x316404;_0x534ac6&&_0x3b1799[_0x3d9c25(0x15f)](_0x534ac6);});};var K=Object[_0x2dab71(0x12b)],V=(_0x38f6bb,_0x3cbe2a,_0x1869c4,_0x2cacce)=>{const _0x4e3b11=_0x2dab71;for(var _0x3eaf=_0x2cacce>0x1?void 0x0:_0x2cacce?K(_0x3cbe2a,_0x1869c4):_0x3cbe2a,_0x28d4ca=_0x38f6bb[_0x4e3b11(0x145)]-0x1,_0x5d38ca;_0x28d4ca>=0x0;_0x28d4ca--)(_0x5d38ca=_0x38f6bb[_0x28d4ca])&&(_0x3eaf=_0x5d38ca(_0x3eaf)||_0x3eaf);return _0x3eaf;},p=(_0x254917,_0x421797)=>(_0x5550e9,_0x240796)=>_0x421797(_0x5550e9,_0x240796,_0x254917);let S=class extends _0x541d21{constructor(_0xd4ee91,_0x3058b0,_0xbe2a48,_0x542412){const _0x43c9df=_0x2dab71;super(),this[_0x43c9df(0x13d)]=_0xd4ee91,this[_0x43c9df(0x148)]=_0x3058b0,this['_userService']=_0xbe2a48,this[_0x43c9df(0x132)]=_0x542412,this[_0x43c9df(0x166)](),this[_0x43c9df(0x13b)]();}[_0x2dab71(0x13b)](){const _0x5f59f4=_0x2dab71;this[_0x5f59f4(0x124)](this[_0x5f59f4(0x148)]['commentUpdate$'][_0x5f59f4(0x12c)](_0x4ecd2a(0x10))['subscribe'](_0x332ce9=>{const _0x3221aa=_0x5f59f4,_0x225c83=new Set();_0x332ce9[_0x3221aa(0x13a)](_0x7cae1c=>{const _0x25d589=_0x3221aa;switch(_0x7cae1c['type']){case _0x25d589(0x13f):{const _0x4c4d9d=_0x7cae1c[_0x25d589(0x115)][_0x25d589(0x138)];_0x225c83[_0x25d589(0x13f)](_0x4c4d9d);break;}}}),B(this['_injector'],_0x225c83);}));}[_0x2dab71(0x166)](){const _0x5cdfac=_0x2dab71;this[_0x5cdfac(0x124)](this[_0x5cdfac(0x13d)][_0x5cdfac(0x139)]['subscribe'](async _0x65234=>{const _0x5e1a3e=_0x5cdfac;var _0x4c4453,_0x2d383c,_0x3b70cf,_0x495fa6;const _0x4442f8=(_0x4c4453=this['_threadCommentModel'][_0x5e1a3e(0x137)](_0x65234[_0x5e1a3e(0x168)])[_0x5e1a3e(0x128)](_0x5ad3b1=>_0x5ad3b1[_0x5e1a3e(0x149)]===_0x65234['threadId']))==null?void 0x0:_0x4c4453[_0x5e1a3e(0x120)];if(!_0x4442f8)return;const {unitId:_0x521e3c,subUnitId:_0x36ca47}=_0x4442f8;switch(_0x65234[_0x5e1a3e(0x14a)]&&this[_0x5e1a3e(0x133)][_0x5e1a3e(0x15f)](_0x65234[_0x5e1a3e(0x14a)]),_0x65234[_0x5e1a3e(0x142)]){case v['Add']:break;case v[_0x5e1a3e(0x140)]:{this['_threadCommentModel']['addComment'](_0x521e3c,_0x36ca47,{'unitId':_0x521e3c,'subUnitId':_0x36ca47,'ref':'','id':_0x65234[_0x5e1a3e(0x13c)],'dT':D(+_0x65234[_0x5e1a3e(0x172)]),'threadId':_0x65234[_0x5e1a3e(0x149)],'personId':(_0x3b70cf=(_0x2d383c=_0x65234[_0x5e1a3e(0x14a)])==null?void 0x0:_0x2d383c['userID'])!=null?_0x3b70cf:_0x65234[_0x5e1a3e(0x14d)],'text':JSON[_0x5e1a3e(0x127)](_0x65234[_0x5e1a3e(0x11f)]),'parentId':_0x4442f8['id']});break;}case v[_0x5e1a3e(0x16e)]:{const _0x5eabec=this[_0x5e1a3e(0x148)]['getComment'](_0x521e3c,_0x36ca47,_0x65234[_0x5e1a3e(0x13c)]);_0x5eabec&&_0x5eabec[_0x5e1a3e(0x12e)]&&this[_0x5e1a3e(0x148)][_0x5e1a3e(0x126)](_0x521e3c,_0x36ca47,_0x65234['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0x5e1a3e(0x164)](_0x521e3c,_0x36ca47,{'commentId':_0x65234[_0x5e1a3e(0x13c)],'text':JSON['parse'](_0x65234[_0x5e1a3e(0x11f)])});break;}case v['Solve']:{const _0x141931=(_0x495fa6=this[_0x5e1a3e(0x148)][_0x5e1a3e(0x137)](_0x65234['unitId'])[_0x5e1a3e(0x128)](_0x45e0f8=>_0x45e0f8[_0x5e1a3e(0x149)]===_0x65234['threadId']))==null?void 0x0:_0x495fa6['root'];_0x141931&&this[_0x5e1a3e(0x148)][_0x5e1a3e(0x16d)](_0x521e3c,_0x36ca47,_0x141931['id'],_0x65234['solved']===I[_0x5e1a3e(0x16a)]);break;}}}));}};S=V([p(0x0,_0x223669(_0x21192d)),p(0x1,_0x223669(_0x95a713)),p(0x2,_0x223669(_0x1b2ae9)),p(0x3,_0x223669(_0x380632))],S);const z=_0x2dab71(0x12d),M={};function _0x38c7(_0x2203cb,_0x3b0a3b){const _0x419f16=_0x419f();return _0x38c7=function(_0x38c7dc,_0x570d9d){_0x38c7dc=_0x38c7dc-0x10e;let _0x4d7d87=_0x419f16[_0x38c7dc];return _0x4d7d87;},_0x38c7(_0x2203cb,_0x3b0a3b);}var k=Object[_0x2dab71(0x12b)],Q=(_0x493e1b,_0x4bd118,_0x1ded35,_0x4f7287)=>{const _0x219850=_0x2dab71;for(var _0x2121f7=_0x4f7287>0x1?void 0x0:_0x4f7287?k(_0x4bd118,_0x1ded35):_0x4bd118,_0x5e0c3b=_0x493e1b[_0x219850(0x145)]-0x1,_0x5a7dd3;_0x5e0c3b>=0x0;_0x5e0c3b--)(_0x5a7dd3=_0x493e1b[_0x5e0c3b])&&(_0x2121f7=_0x5a7dd3(_0x2121f7)||_0x2121f7);return _0x2121f7;},_=(_0x4476f4,_0x1a41f9)=>(_0x42f00a,_0x35d00c)=>_0x1a41f9(_0x42f00a,_0x35d00c,_0x4476f4);function X(_0x2eb556,_0x4d81c9){const _0x30fdac=_0x2dab71,_0x2d7da3=_0x2eb556['replies'][0x0];return{..._0x4d81c9,'id':_0x2d7da3[_0x30fdac(0x13c)],'resolved':_0x2eb556[_0x30fdac(0x163)]===0x1,'dT':D(_0x2d7da3['createTimestamp']),'personId':_0x2d7da3['userId'],'threadId':_0x2d7da3[_0x30fdac(0x149)]};}function ee(_0x55871e,_0x185f70,_0x213432){const _0x45dfdd=_0x2dab71;var _0x120486,_0x5df19b;if(((_0x5df19b=(_0x120486=_0x55871e==null?void 0x0:_0x55871e[_0x45dfdd(0x10e)])==null?void 0x0:_0x120486[_0x45dfdd(0x145)])!=null?_0x5df19b:0x0)>0x0){const _0x49655d=(_0x132acc,_0x638aa7)=>({'id':_0x132acc[_0x45dfdd(0x13c)],'threadId':_0x132acc[_0x45dfdd(0x149)],'dT':D(_0x132acc['createTimestamp']),'personId':_0x132acc[_0x45dfdd(0x14d)],'resolved':_0x55871e[_0x45dfdd(0x163)]===I[_0x45dfdd(0x16a)],'unitId':_0x185f70,'subUnitId':_0x213432,'text':JSON[_0x45dfdd(0x127)](_0x132acc[_0x45dfdd(0x11f)]),'parentId':_0x638aa7}),_0x6e06c8=_0x49655d(_0x55871e[_0x45dfdd(0x10e)][0x0]);return{..._0x6e06c8,'children':_0x55871e[_0x45dfdd(0x10e)]['slice'](0x1)['map'](_0x545793=>_0x49655d(_0x545793,_0x6e06c8['id']))};}return null;}let f=class{constructor(_0x5b71a4,_0x24f6c3,_0x3b4dd0,_0x22a26f){const _0x1dc3cf=_0x2dab71;this['_httpService']=_0x5b71a4,this[_0x1dc3cf(0x133)]=_0x24f6c3,this[_0x1dc3cf(0x11a)]=_0x3b4dd0,this[_0x1dc3cf(0x132)]=_0x22a26f;}async['addComment'](_0x5d72fe){const _0x575537=_0x2dab71;var _0x46e0ab,_0x32890d;const {parentId:_0x5e5630,unitId:_0x3f50ad,text:_0x42215a,threadId:_0x4876d9}=_0x5d72fe,_0x27919c=(_0x32890d=(_0x46e0ab=_0x42215a[_0x575537(0x135)])==null?void 0x0:_0x46e0ab['filter'](_0x11df90=>_0x11df90[_0x575537(0x129)]===_0x2f110e[_0x575537(0x16b)])['map'](_0x4f1f34=>_0x4f1f34[_0x575537(0x169)]))!=null?_0x32890d:[],_0x1d7626=JSON[_0x575537(0x11c)](_0x42215a),_0x93fcf9=(await this[_0x575537(0x11a)][_0x575537(0x15c)](_0x3f50ad))[_0x575537(0x118)]();if(_0x5e5630){const _0x55b205={'memberId':_0x93fcf9,'unitId':_0x3f50ad,'content':_0x1d7626,'mention':_0x27919c,'threadId':_0x4876d9},_0x8a9d54=(await this['_httpService'][_0x575537(0x15d)]('/universer-api/comment/unit/'+_0x3f50ad+'/reply',{'body':_0x55b205}))['body']['reply'];return{..._0x5d72fe,'id':_0x8a9d54[_0x575537(0x13c)],'dT':_0x35c504(+_0x8a9d54[_0x575537(0x172)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x8a9d54[_0x575537(0x14d)]};}else{const _0x1480eb={'memberId':_0x93fcf9,'unitId':_0x3f50ad,'content':_0x1d7626,'mention':_0x27919c},_0xf2b71e=await this[_0x575537(0x134)][_0x575537(0x15d)]('/universer-api/comment/unit/'+_0x3f50ad+'/add',{'body':_0x1480eb});return X(_0xf2b71e[_0x575537(0x152)][_0x575537(0x136)],_0x5d72fe);}}async[_0x2dab71(0x164)](_0x53c822){const _0x103caf=_0x2dab71;var _0x10d3b0,_0x220e2d;const {text:_0x5379a4,unitId:_0x1f9b82}=_0x53c822,_0x1e1cba=(_0x220e2d=(_0x10d3b0=_0x5379a4['customRanges'])==null?void 0x0:_0x10d3b0[_0x103caf(0x11b)](_0x5b9e8a=>_0x5b9e8a[_0x103caf(0x129)]===_0x2f110e['COMMENT'])[_0x103caf(0x110)](_0x4e93c0=>_0x4e93c0[_0x103caf(0x169)]))!=null?_0x220e2d:[],_0x28988f=JSON[_0x103caf(0x11c)](_0x5379a4),_0x137495=_0x53c822[_0x103caf(0x149)],_0x2ad3cf=_0x53c822['id'],_0x4fe263={'memberId':(await this['_sessionService'][_0x103caf(0x15c)](_0x1f9b82))[_0x103caf(0x118)](),'unitId':_0x1f9b82,'threadId':_0x137495,'mention':_0x1e1cba,'content':_0x28988f,'replyId':_0x2ad3cf},_0x4d8350=await this['_httpService'][_0x103caf(0x15d)](_0x103caf(0x159)+_0x1f9b82+_0x103caf(0x113),{'body':_0x4fe263});return!_0x4d8350[_0x103caf(0x152)][_0x103caf(0x121)]||_0x4d8350[_0x103caf(0x152)][_0x103caf(0x121)][_0x103caf(0x154)]===0x1;}async[_0x2dab71(0x16d)](_0x25e7f3){const _0x4ab678=_0x2dab71,{unitId:_0x4419ff}=_0x25e7f3,_0x534bae=_0x25e7f3['threadId'],_0x3697a9={'memberId':this[_0x4ab678(0x133)][_0x4ab678(0x12a)]()[_0x4ab678(0x157)],'unitId':_0x4419ff,'threadId':_0x534bae,'solved':_0x25e7f3[_0x4ab678(0x153)]?I[_0x4ab678(0x16a)]:I[_0x4ab678(0x10f)]},_0xdfc102=await this['_httpService'][_0x4ab678(0x15d)]('/universer-api/comment/unit/'+_0x4419ff+_0x4ab678(0x130),{'body':_0x3697a9});return!_0xdfc102[_0x4ab678(0x152)][_0x4ab678(0x121)]||_0xdfc102[_0x4ab678(0x152)][_0x4ab678(0x121)][_0x4ab678(0x154)]===0x1;}async[_0x2dab71(0x126)](_0x184195,_0xb3fd6d,_0x1fe053,_0x4020b4){const _0x481ec3=_0x2dab71,_0x5530bf={'memberId':(await this[_0x481ec3(0x11a)][_0x481ec3(0x15c)](_0x184195))['getMemberID'](),'threadId':_0x1fe053,'replyId':_0x4020b4,'unitId':_0x184195},_0xf0e1a6=await this['_httpService']['post'](_0x481ec3(0x159)+_0x184195+_0x481ec3(0x156),{'body':_0x5530bf});return!_0xf0e1a6[_0x481ec3(0x152)][_0x481ec3(0x121)]||_0xf0e1a6[_0x481ec3(0x152)][_0x481ec3(0x121)][_0x481ec3(0x154)]===0x1;}async['listComments'](_0x278f17,_0x3770a4,_0x3ed97f){const _0x54049d=_0x2dab71,_0x52fbff={'unitId':_0x278f17,'threadId':_0x3ed97f},_0x1bb0d6=await this[_0x54049d(0x134)][_0x54049d(0x15d)]('/universer-api/comment/unit/'+_0x278f17+'/list',{'body':_0x52fbff}),_0xe8543e=_0x3ed97f[_0x54049d(0x110)](_0x45e801=>ee(_0x1bb0d6[_0x54049d(0x152)]['comments'][_0x45e801],_0x278f17,_0x3770a4))[_0x54049d(0x11b)](Boolean);return Object[_0x54049d(0x147)](_0x1bb0d6[_0x54049d(0x152)]['users'])[_0x54049d(0x13a)](_0x23c9ae=>{const _0x4384ac=_0x54049d;this['_userService'][_0x4384ac(0x15f)](_0x23c9ae);}),_0xe8543e;}[_0x2dab71(0x15a)](_0x1f214d){const _0x538c9b=_0x2dab71;return{'id':_0x1f214d['id'],'threadId':_0x1f214d[_0x538c9b(0x149)],'ref':_0x1f214d[_0x538c9b(0x165)]};}};f=Q([_(0x0,_0x223669(_0x17be68)),_(0x1,_0x223669(_0x1b2ae9)),_(0x2,_0x223669(_0x1eaae2)),_(0x3,_0x223669(_0x380632))],f);var re=Object[_0x2dab71(0x12b)],te=(_0x52a40b,_0x2c4275,_0x2608ce,_0x470da9)=>{const _0x4e452c=_0x2dab71;for(var _0x44b3f3=_0x470da9>0x1?void 0x0:_0x470da9?re(_0x2c4275,_0x2608ce):_0x2c4275,_0x17e63a=_0x52a40b[_0x4e452c(0x145)]-0x1,_0x17b65a;_0x17e63a>=0x0;_0x17e63a--)(_0x17b65a=_0x52a40b[_0x17e63a])&&(_0x44b3f3=_0x17b65a(_0x44b3f3)||_0x44b3f3);return _0x44b3f3;},N=(_0x4d0e0f,_0x26668d)=>(_0x30a1a5,_0x4041da)=>_0x26668d(_0x30a1a5,_0x4041da,_0x4d0e0f);let g=class extends _0x541d21{constructor(_0x43825a,_0x55a0fe){const _0x1dd62c=_0x2dab71;super(),this[_0x1dd62c(0x114)]=_0x43825a,this['_threadCommentDataSource']=_0x55a0fe,this['_initDataSource']();}[_0x2dab71(0x117)](){const _0x5ce768=_0x2dab71;this[_0x5ce768(0x114)][_0x5ce768(0x14c)]=this[_0x5ce768(0x162)],this[_0x5ce768(0x114)][_0x5ce768(0x11e)]=!0x1;}};g=te([N(0x0,_0x465bec),N(0x1,_0x223669(f))],g);var se=Object[_0x2dab71(0x16f)],oe=Object[_0x2dab71(0x12b)],ne=(_0x4bb03f,_0x337468,_0xdf20a0)=>_0x337468 in _0x4bb03f?se(_0x4bb03f,_0x337468,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xdf20a0}):_0x4bb03f[_0x337468]=_0xdf20a0,ie=(_0x50868b,_0x2ba92e,_0x28817e,_0x51c966)=>{const _0x22f298=_0x2dab71;for(var _0xfc2f95=_0x51c966>0x1?void 0x0:_0x51c966?oe(_0x2ba92e,_0x28817e):_0x2ba92e,_0x1889bc=_0x50868b[_0x22f298(0x145)]-0x1,_0x1dfb5e;_0x1889bc>=0x0;_0x1889bc--)(_0x1dfb5e=_0x50868b[_0x1889bc])&&(_0xfc2f95=_0x1dfb5e(_0xfc2f95)||_0xfc2f95);return _0xfc2f95;},w=(_0x258025,_0x98a9d5)=>(_0x3d6163,_0x2e1fee)=>_0x98a9d5(_0x3d6163,_0x2e1fee,_0x258025),$=(_0x4493c5,_0x3b5e04,_0x32f60c)=>ne(_0x4493c5,typeof _0x3b5e04!=_0x2dab71(0x131)?_0x3b5e04+'':_0x3b5e04,_0x32f60c);let b=class extends _0x3558e5{constructor(_0x1e064b=M,_0x332c25,_0x28184f){const _0x19ed23=_0x2dab71;super(),this['_config']=_0x1e064b,this[_0x19ed23(0x132)]=_0x332c25,this['_configService']=_0x28184f;const {..._0x28e2bc}=_0x56cf94({},M,this[_0x19ed23(0x11d)]);this[_0x19ed23(0x116)][_0x19ed23(0x171)](z,_0x28e2bc);}[_0x2dab71(0x146)](){const _0xe6fe4f=_0x2dab71;[[f],[g],[S]][_0xe6fe4f(0x13a)](_0x3ed366=>{const _0x64cde2=_0xe6fe4f;this[_0x64cde2(0x132)][_0x64cde2(0x13f)](_0x3ed366);});}[_0x2dab71(0x111)](){const _0x446906=_0x2dab71;this[_0x446906(0x132)][_0x446906(0x158)](g),this[_0x446906(0x132)]['get'](S);}};$(b,'pluginName',W),$(b,_0x2dab71(0x142),_0x48e5bc['UNIVER_UNKNOWN']),b=ie([_0x246354(_0x4fa7aa,_0x56bd3f,_0x121e1a),w(0x1,_0x223669(_0x380632)),w(0x2,_0x238b6a)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x4119(_0x33c396,_0x7ecedc){const _0x3a31fa=_0x3a31();return _0x4119=function(_0x411952,_0x372456){_0x411952=_0x411952-0xab;let _0x2b7fee=_0x3a31fa[_0x411952];return _0x2b7fee;},_0x4119(_0x33c396,_0x7ecedc);}const _0x425e5f=_0x4119;(function(_0x4e8257,_0x4fb90c){const _0x64ad97=_0x4119,_0x46e20c=_0x4e8257();while(!![]){try{const _0x4641a8=-parseInt(_0x64ad97(0xab))/0x1*(-parseInt(_0x64ad97(0xc0))/0x2)+-parseInt(_0x64ad97(0x103))/0x3+-parseInt(_0x64ad97(0xfd))/0x4*(parseInt(_0x64ad97(0x10f))/0x5)+-parseInt(_0x64ad97(0xf6))/0x6*(parseInt(_0x64ad97(0xb9))/0x7)+parseInt(_0x64ad97(0xc1))/0x8*(parseInt(_0x64ad97(0xdf))/0x9)+-parseInt(_0x64ad97(0xbe))/0xa+-parseInt(_0x64ad97(0xd7))/0xb*(-parseInt(_0x64ad97(0xdc))/0xc);if(_0x4641a8===_0x4fb90c)break;else _0x46e20c['push'](_0x46e20c['shift']());}catch(_0x269378){_0x46e20c['push'](_0x46e20c['shift']());}}}(_0x3a31,0xdad0c));import{CommentService as _0x241de7,CollaborationSessionService as _0x1c1e03,UniverCollaborationClientPlugin as _0x21f04b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x548071}from'@univerjs-pro/license';import{dayjs as _0x56839b,UserManagerService as _0x517fcb,Inject as _0x722246,Injector as _0x25b10c,Disposable as _0x4d0fd0,CustomRangeType as _0x5dbbf9,UniverInstanceType as _0x1d123f,DependentOn as _0x5a38b0,IConfigService as _0x54164f,Plugin as _0x5d2b76,merge as _0x316a9a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x49f318}from'@univerjs/thread-comment-ui';function _0x3a31(){const _0xd4b343=['_initDataSource','_userService','ref','_sessionService','_httpService','rangeId','root','listComments','forEach','add','error','filter','type','UNRECOGNIZED','saveCommentToSnapshot','addUser','4376614JRHNeu','syncUpdateMutationToColla','personId','post','solved','36EegEBS','YYYY/MM/DD\x20HH:mm','_configService','15938298nApGbu','getOwnPropertyDescriptor','threadId','symbol','subscribe','_commentService','get','COMMENT','deleteComment','pluginName','replyId','stringify','length','UNIVER_UNKNOWN','userId','user','values','reply','getUnit','/edit','_config','/solved','users','6lzmEmW','parse','Delete','defineProperty','content','_threadCommentDataSourceService','code','956JswijB','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','dataSource','Edit','_threadCommentDataSource','2998938AVjVwi','onReady','rangeType','comment','body','Unknown','_initUserSync','/universer-api/user/list','comments','Reply','map','OpenOrReOpen','17040GOukcz','replies','pipe','5KrXTfL','getCurrentUser','onStarting','userID','_threadCommentModel','Solve','createTimestamp','addComment','_init','/list','/universer-api/comment/unit/','getUser','payload','updateComment','6410089oSZpGB','unitId','_injector','customRanges','resolveComment','6631360LdEBdm','requireSession','529898THPCxt','8cvOfnx','Solved','Add','disposeWithMe','find','getMemberID'];_0x3a31=function(){return _0xd4b343;};return _0x3a31();}import{ThreadCommentModel as _0x33a7b8,IThreadCommentDataSourceService as _0x36983c}from'@univerjs/thread-comment';import{bufferTime as _0x250bbc}from'rxjs';import{HTTPService as _0x199b25}from'@univerjs/network';const W=_0x425e5f(0xfe);var I=(_0x42248f=>(_0x42248f[_0x42248f['OpenOrReOpen']=0x0]=_0x425e5f(0x10e),_0x42248f[_0x42248f[_0x425e5f(0xc2)]=0x1]='Solved',_0x42248f[_0x42248f[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x42248f))(I||{}),v=(_0x5abfa2=>(_0x5abfa2[_0x5abfa2[_0x425e5f(0x108)]=0x0]=_0x425e5f(0x108),_0x5abfa2[_0x5abfa2[_0x425e5f(0xc3)]=0x1]=_0x425e5f(0xc3),_0x5abfa2[_0x5abfa2[_0x425e5f(0x10c)]=0x2]=_0x425e5f(0x10c),_0x5abfa2[_0x5abfa2[_0x425e5f(0x101)]=0x3]='Edit',_0x5abfa2[_0x5abfa2[_0x425e5f(0xf8)]=0x4]=_0x425e5f(0xf8),_0x5abfa2[_0x5abfa2[_0x425e5f(0xb0)]=0x5]=_0x425e5f(0xb0),_0x5abfa2[_0x5abfa2[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x5abfa2))(v||{});const D=_0x284839=>_0x56839b(new Date(+_0x284839))[_0x425e5f(0xff)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4507a7,_0x31b235)=>{const _0x3ce1d8=_0x425e5f,_0x2f7b8d=_0x4507a7[_0x3ce1d8(0xe5)](_0x517fcb),_0x2c8720=_0x4507a7[_0x3ce1d8(0xe5)](_0x199b25);_0x31b235['forEach'](_0xc331e7=>{const _0x356049=_0x3ce1d8;_0x2f7b8d[_0x356049(0xb6)](_0xc331e7)&&_0x31b235['delete'](_0xc331e7);}),_0x31b235['size']&&(await _0x2c8720[_0x3ce1d8(0xe5)](_0x3ce1d8(0x10a),{'params':{'userIDs':[..._0x31b235]}}))[_0x3ce1d8(0x107)][_0x3ce1d8(0xf5)][_0x3ce1d8(0xcf)](_0x424c44=>{const _0x144387=_0x3ce1d8;_0x424c44&&_0x2f7b8d[_0x144387(0xd6)](_0x424c44);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x500302,_0x2e2fd0,_0x404d4e,_0x17012f)=>{const _0x525ac6=_0x425e5f;for(var _0x383411=_0x17012f>0x1?void 0x0:_0x17012f?K(_0x2e2fd0,_0x404d4e):_0x2e2fd0,_0xd73450=_0x500302[_0x525ac6(0xeb)]-0x1,_0x396eca;_0xd73450>=0x0;_0xd73450--)(_0x396eca=_0x500302[_0xd73450])&&(_0x383411=_0x396eca(_0x383411)||_0x383411);return _0x383411;},p=(_0x36b10a,_0x517527)=>(_0x3a8b79,_0x3dfb77)=>_0x517527(_0x3a8b79,_0x3dfb77,_0x36b10a);let S=class extends _0x4d0fd0{constructor(_0x1fa63b,_0x14cb90,_0x295174,_0x1b7135){const _0x3a2ad7=_0x425e5f;super(),this[_0x3a2ad7(0xe4)]=_0x1fa63b,this[_0x3a2ad7(0xaf)]=_0x14cb90,this['_userService']=_0x295174,this[_0x3a2ad7(0xbb)]=_0x1b7135,this['_init'](),this[_0x3a2ad7(0x109)]();}[_0x425e5f(0x109)](){const _0x4a568c=_0x425e5f;this[_0x4a568c(0xc4)](this[_0x4a568c(0xaf)]['commentUpdate$'][_0x4a568c(0x111)](_0x250bbc(0x10))[_0x4a568c(0xe3)](_0x3fad4e=>{const _0x245149=_0x4a568c,_0x5666d7=new Set();_0x3fad4e[_0x245149(0xcf)](_0x17fa86=>{const _0x8bf604=_0x245149;switch(_0x17fa86[_0x8bf604(0xd3)]){case _0x8bf604(0xd0):{const _0x46d500=_0x17fa86[_0x8bf604(0xb7)][_0x8bf604(0xd9)];_0x5666d7[_0x8bf604(0xd0)](_0x46d500);break;}}}),B(this['_injector'],_0x5666d7);}));}[_0x425e5f(0xb3)](){const _0x302938=_0x425e5f;this[_0x302938(0xc4)](this['_commentService']['commentUpdate$'][_0x302938(0xe3)](async _0x27400f=>{const _0x125426=_0x302938;var _0x290c8b,_0x27b31d,_0x128787,_0x55de0e;const _0x434ff4=(_0x290c8b=this[_0x125426(0xaf)][_0x125426(0xf1)](_0x27400f[_0x125426(0xba)])[_0x125426(0xc5)](_0x3e61dd=>_0x3e61dd['threadId']===_0x27400f['threadId']))==null?void 0x0:_0x290c8b[_0x125426(0xcd)];if(!_0x434ff4)return;const {unitId:_0x3bc7cb,subUnitId:_0x188ab5}=_0x434ff4;switch(_0x27400f[_0x125426(0xee)]&&this[_0x125426(0xc8)]['addUser'](_0x27400f[_0x125426(0xee)]),_0x27400f[_0x125426(0xd3)]){case v['Add']:break;case v[_0x125426(0x10c)]:{this[_0x125426(0xaf)][_0x125426(0xb2)](_0x3bc7cb,_0x188ab5,{'unitId':_0x3bc7cb,'subUnitId':_0x188ab5,'ref':'','id':_0x27400f[_0x125426(0xe9)],'dT':D(+_0x27400f[_0x125426(0xb1)]),'threadId':_0x27400f['threadId'],'personId':(_0x128787=(_0x27b31d=_0x27400f[_0x125426(0xee)])==null?void 0x0:_0x27b31d[_0x125426(0xae)])!=null?_0x128787:_0x27400f[_0x125426(0xed)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)]),'parentId':_0x434ff4['id']});break;}case v['Delete']:{const _0xb1ffec=this[_0x125426(0xaf)]['getComment'](_0x3bc7cb,_0x188ab5,_0x27400f[_0x125426(0xe9)]);_0xb1ffec&&_0xb1ffec['parentId']&&this[_0x125426(0xaf)]['deleteComment'](_0x3bc7cb,_0x188ab5,_0x27400f['replyId']);break;}case v['Edit']:{this[_0x125426(0xaf)]['updateComment'](_0x3bc7cb,_0x188ab5,{'commentId':_0x27400f[_0x125426(0xe9)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)])});break;}case v['Solve']:{const _0x30b031=(_0x55de0e=this['_threadCommentModel'][_0x125426(0xf1)](_0x27400f['unitId'])['find'](_0x50d026=>_0x50d026[_0x125426(0xe1)]===_0x27400f[_0x125426(0xe1)]))==null?void 0x0:_0x55de0e[_0x125426(0xcd)];_0x30b031&&this[_0x125426(0xaf)][_0x125426(0xbd)](_0x3bc7cb,_0x188ab5,_0x30b031['id'],_0x27400f['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x722246(_0x241de7)),p(0x1,_0x722246(_0x33a7b8)),p(0x2,_0x722246(_0x517fcb)),p(0x3,_0x722246(_0x25b10c))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x425e5f(0xe0)],Q=(_0x2c9e87,_0x5bbf41,_0xc0d470,_0x3ca685)=>{for(var _0x150eff=_0x3ca685>0x1?void 0x0:_0x3ca685?k(_0x5bbf41,_0xc0d470):_0x5bbf41,_0x4b8d08=_0x2c9e87['length']-0x1,_0x1a0084;_0x4b8d08>=0x0;_0x4b8d08--)(_0x1a0084=_0x2c9e87[_0x4b8d08])&&(_0x150eff=_0x1a0084(_0x150eff)||_0x150eff);return _0x150eff;},_=(_0x35841f,_0x122090)=>(_0x5452d1,_0x397167)=>_0x122090(_0x5452d1,_0x397167,_0x35841f);function X(_0x45627c,_0x2314e5){const _0x3425bc=_0x425e5f,_0x494270=_0x45627c[_0x3425bc(0x110)][0x0];return{..._0x2314e5,'id':_0x494270[_0x3425bc(0xe9)],'resolved':_0x45627c[_0x3425bc(0xdb)]===0x1,'dT':D(_0x494270[_0x3425bc(0xb1)]),'personId':_0x494270['userId'],'threadId':_0x494270[_0x3425bc(0xe1)]};}function ee(_0x5bb631,_0x51d510,_0x56c115){const _0x265688=_0x425e5f;var _0x2b78d2,_0x94154a;if(((_0x94154a=(_0x2b78d2=_0x5bb631==null?void 0x0:_0x5bb631[_0x265688(0x110)])==null?void 0x0:_0x2b78d2[_0x265688(0xeb)])!=null?_0x94154a:0x0)>0x0){const _0x4bc798=(_0x193266,_0x145d37)=>({'id':_0x193266[_0x265688(0xe9)],'threadId':_0x193266[_0x265688(0xe1)],'dT':D(_0x193266[_0x265688(0xb1)]),'personId':_0x193266[_0x265688(0xed)],'resolved':_0x5bb631[_0x265688(0xdb)]===I['Solved'],'unitId':_0x51d510,'subUnitId':_0x56c115,'text':JSON[_0x265688(0xf7)](_0x193266[_0x265688(0xfa)]),'parentId':_0x145d37}),_0x5badc1=_0x4bc798(_0x5bb631['replies'][0x0]);return{..._0x5badc1,'children':_0x5bb631['replies']['slice'](0x1)['map'](_0x4cd4a4=>_0x4bc798(_0x4cd4a4,_0x5badc1['id']))};}return null;}let f=class{constructor(_0x4664a5,_0x1bc530,_0x453a75,_0x1da0e6){const _0x1027f7=_0x425e5f;this[_0x1027f7(0xcb)]=_0x4664a5,this[_0x1027f7(0xc8)]=_0x1bc530,this[_0x1027f7(0xca)]=_0x453a75,this[_0x1027f7(0xbb)]=_0x1da0e6;}async[_0x425e5f(0xb2)](_0x689999){const _0x86f68c=_0x425e5f;var _0x1faf94,_0x4b25bc;const {parentId:_0x53a94,unitId:_0x50aa87,text:_0x52355e,threadId:_0x2e3457}=_0x689999,_0x3c684e=(_0x4b25bc=(_0x1faf94=_0x52355e[_0x86f68c(0xbc)])==null?void 0x0:_0x1faf94[_0x86f68c(0xd2)](_0x5728cd=>_0x5728cd[_0x86f68c(0x105)]===_0x5dbbf9[_0x86f68c(0xe6)])[_0x86f68c(0x10d)](_0x4200a0=>_0x4200a0[_0x86f68c(0xcc)]))!=null?_0x4b25bc:[],_0x229563=JSON['stringify'](_0x52355e),_0x2c1fa3=(await this[_0x86f68c(0xca)][_0x86f68c(0xbf)](_0x50aa87))[_0x86f68c(0xc6)]();if(_0x53a94){const _0x47317a={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e,'threadId':_0x2e3457},_0x3dfa63=(await this['_httpService'][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/reply',{'body':_0x47317a}))[_0x86f68c(0x107)][_0x86f68c(0xf0)];return{..._0x689999,'id':_0x3dfa63[_0x86f68c(0xe9)],'dT':_0x56839b(+_0x3dfa63[_0x86f68c(0xb1)])[_0x86f68c(0xff)](_0x86f68c(0xdd)),'personId':_0x3dfa63[_0x86f68c(0xed)]};}else{const _0x51d8e1={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e},_0x1d87d9=await this[_0x86f68c(0xcb)][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/add',{'body':_0x51d8e1});return X(_0x1d87d9[_0x86f68c(0x107)][_0x86f68c(0x106)],_0x689999);}}async[_0x425e5f(0xb8)](_0x54c835){const _0x54e91c=_0x425e5f;var _0x40dafe,_0x5ef016;const {text:_0x5177ac,unitId:_0x6575d}=_0x54c835,_0x37d918=(_0x5ef016=(_0x40dafe=_0x5177ac['customRanges'])==null?void 0x0:_0x40dafe[_0x54e91c(0xd2)](_0x5721ab=>_0x5721ab[_0x54e91c(0x105)]===_0x5dbbf9['COMMENT'])['map'](_0x2ce100=>_0x2ce100['rangeId']))!=null?_0x5ef016:[],_0x381bc6=JSON[_0x54e91c(0xea)](_0x5177ac),_0x17e5f7=_0x54c835[_0x54e91c(0xe1)],_0x13cb70=_0x54c835['id'],_0x461bec={'memberId':(await this[_0x54e91c(0xca)]['requireSession'](_0x6575d))[_0x54e91c(0xc6)](),'unitId':_0x6575d,'threadId':_0x17e5f7,'mention':_0x37d918,'content':_0x381bc6,'replyId':_0x13cb70},_0x38e3a2=await this[_0x54e91c(0xcb)][_0x54e91c(0xda)](_0x54e91c(0xb5)+_0x6575d+_0x54e91c(0xf2),{'body':_0x461bec});return!_0x38e3a2[_0x54e91c(0x107)]['error']||_0x38e3a2['body'][_0x54e91c(0xd1)][_0x54e91c(0xfc)]===0x1;}async[_0x425e5f(0xbd)](_0x30762f){const _0x1cbdd4=_0x425e5f,{unitId:_0x4980a6}=_0x30762f,_0x5227a3=_0x30762f[_0x1cbdd4(0xe1)],_0x2cd44d={'memberId':this[_0x1cbdd4(0xc8)][_0x1cbdd4(0xac)]()[_0x1cbdd4(0xae)],'unitId':_0x4980a6,'threadId':_0x5227a3,'solved':_0x30762f['resolved']?I['Solved']:I['OpenOrReOpen']},_0x540e0c=await this[_0x1cbdd4(0xcb)][_0x1cbdd4(0xda)](_0x1cbdd4(0xb5)+_0x4980a6+_0x1cbdd4(0xf4),{'body':_0x2cd44d});return!_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)]||_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)][_0x1cbdd4(0xfc)]===0x1;}async[_0x425e5f(0xe7)](_0x562ce5,_0x31c8ae,_0x5d192c,_0x51c657){const _0x27aa85=_0x425e5f,_0x527fc1={'memberId':(await this[_0x27aa85(0xca)]['requireSession'](_0x562ce5))[_0x27aa85(0xc6)](),'threadId':_0x5d192c,'replyId':_0x51c657,'unitId':_0x562ce5},_0x255052=await this['_httpService'][_0x27aa85(0xda)](_0x27aa85(0xb5)+_0x562ce5+'/delete',{'body':_0x527fc1});return!_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]||_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]['code']===0x1;}async[_0x425e5f(0xce)](_0x22ca3f,_0x1dcfce,_0x4dafc7){const _0x5a5b03=_0x425e5f,_0x5dbc47={'unitId':_0x22ca3f,'threadId':_0x4dafc7},_0x2a0489=await this['_httpService']['post'](_0x5a5b03(0xb5)+_0x22ca3f+_0x5a5b03(0xb4),{'body':_0x5dbc47}),_0x533b53=_0x4dafc7[_0x5a5b03(0x10d)](_0x54fb20=>ee(_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0x10b)][_0x54fb20],_0x22ca3f,_0x1dcfce))[_0x5a5b03(0xd2)](Boolean);return Object[_0x5a5b03(0xef)](_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0xf5)])[_0x5a5b03(0xcf)](_0x16fd25=>{const _0x81b8fd=_0x5a5b03;this[_0x81b8fd(0xc8)]['addUser'](_0x16fd25);}),_0x533b53;}[_0x425e5f(0xd5)](_0x3a387d){const _0x597b38=_0x425e5f;return{'id':_0x3a387d['id'],'threadId':_0x3a387d['threadId'],'ref':_0x3a387d[_0x597b38(0xc9)]};}};f=Q([_(0x0,_0x722246(_0x199b25)),_(0x1,_0x722246(_0x517fcb)),_(0x2,_0x722246(_0x1c1e03)),_(0x3,_0x722246(_0x25b10c))],f);var re=Object[_0x425e5f(0xe0)],te=(_0x9f81f9,_0x54c8b6,_0x266938,_0xa26a6a)=>{const _0x394d41=_0x425e5f;for(var _0x3fa3cb=_0xa26a6a>0x1?void 0x0:_0xa26a6a?re(_0x54c8b6,_0x266938):_0x54c8b6,_0x4f72cb=_0x9f81f9[_0x394d41(0xeb)]-0x1,_0x59c7bb;_0x4f72cb>=0x0;_0x4f72cb--)(_0x59c7bb=_0x9f81f9[_0x4f72cb])&&(_0x3fa3cb=_0x59c7bb(_0x3fa3cb)||_0x3fa3cb);return _0x3fa3cb;},N=(_0x16bcfb,_0x1b5152)=>(_0xaedfca,_0x27e232)=>_0x1b5152(_0xaedfca,_0x27e232,_0x16bcfb);let g=class extends _0x4d0fd0{constructor(_0x2434d1,_0x318b48){const _0x42aafc=_0x425e5f;super(),this['_threadCommentDataSourceService']=_0x2434d1,this['_threadCommentDataSource']=_0x318b48,this[_0x42aafc(0xc7)]();}[_0x425e5f(0xc7)](){const _0x14d606=_0x425e5f;this[_0x14d606(0xfb)][_0x14d606(0x100)]=this[_0x14d606(0x102)],this[_0x14d606(0xfb)][_0x14d606(0xd8)]=!0x1;}};g=te([N(0x0,_0x36983c),N(0x1,_0x722246(f))],g);var se=Object[_0x425e5f(0xf9)],oe=Object[_0x425e5f(0xe0)],ne=(_0x5a9072,_0x5ec4fc,_0x6da4c2)=>_0x5ec4fc in _0x5a9072?se(_0x5a9072,_0x5ec4fc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6da4c2}):_0x5a9072[_0x5ec4fc]=_0x6da4c2,ie=(_0x4bb8e5,_0x19a3e5,_0x55390e,_0x43e9a5)=>{for(var _0x5a7cec=_0x43e9a5>0x1?void 0x0:_0x43e9a5?oe(_0x19a3e5,_0x55390e):_0x19a3e5,_0x48a66c=_0x4bb8e5['length']-0x1,_0x1d0097;_0x48a66c>=0x0;_0x48a66c--)(_0x1d0097=_0x4bb8e5[_0x48a66c])&&(_0x5a7cec=_0x1d0097(_0x5a7cec)||_0x5a7cec);return _0x5a7cec;},w=(_0x5de127,_0xc2847b)=>(_0x3d3baf,_0x514773)=>_0xc2847b(_0x3d3baf,_0x514773,_0x5de127),$=(_0x4a50ef,_0xdaae1c,_0x148dd2)=>ne(_0x4a50ef,typeof _0xdaae1c!=_0x425e5f(0xe2)?_0xdaae1c+'':_0xdaae1c,_0x148dd2);let b=class extends _0x5d2b76{constructor(_0x45c136=M,_0x4fe88f,_0x1a949d){const _0x41c0d3=_0x425e5f;super(),this[_0x41c0d3(0xf3)]=_0x45c136,this[_0x41c0d3(0xbb)]=_0x4fe88f,this[_0x41c0d3(0xde)]=_0x1a949d;const {..._0x3fbf03}=_0x316a9a({},M,this[_0x41c0d3(0xf3)]);this[_0x41c0d3(0xde)]['setConfig'](z,_0x3fbf03);}[_0x425e5f(0xad)](){const _0x5490df=_0x425e5f;[[f],[g],[S]][_0x5490df(0xcf)](_0xf0efb=>{const _0x533850=_0x5490df;this[_0x533850(0xbb)]['add'](_0xf0efb);});}[_0x425e5f(0x104)](){this['_injector']['get'](g),this['_injector']['get'](S);}};$(b,_0x425e5f(0xe8),W),$(b,_0x425e5f(0xd3),_0x1d123f[_0x425e5f(0xec)]),b=ie([_0x5a38b0(_0x49f318,_0x21f04b,_0x548071),w(0x1,_0x722246(_0x25b10c)),w(0x2,_0x54164f)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- function _0x419f(){const _0x30bc73=['resolved','code','19704uLdKPw','/delete','userID','get','/universer-api/comment/unit/','saveCommentToSnapshot','getUser','requireSession','post','749AjOMpB','addUser','Unknown','281369TSzLxx','_threadCommentDataSource','solved','updateComment','ref','_init','87939rULiBR','unitId','rangeId','Solved','COMMENT','format','resolveComment','Delete','defineProperty','Edit','setConfig','createTimestamp','replies','OpenOrReOpen','map','onReady','470xWsXvm','/edit','_threadCommentDataSourceService','payload','_configService','_initDataSource','getMemberID','delete','_sessionService','filter','stringify','_config','syncUpdateMutationToColla','content','root','error','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','disposeWithMe','180dtNRcc','deleteComment','parse','find','rangeType','getCurrentUser','getOwnPropertyDescriptor','pipe','thread-comment-data-source.config','parentId','1867026ThHWxN','/solved','symbol','_injector','_userService','_httpService','customRanges','comment','getUnit','personId','commentUpdate$','forEach','_initUserSync','replyId','_commentService','933237lKPEDM','add','Reply','/universer-api/user/list','type','260dbMaXs','5225LQZAbh','length','onStarting','values','_threadCommentModel','threadId','user','Solve','dataSource','userId','size','UNRECOGNIZED','1372MsMMsw','4169GwPPtG','body'];_0x419f=function(){return _0x30bc73;};return _0x419f();}const _0x2dab71=_0x38c7;(function(_0x2587d5,_0xbaf0ec){const _0x346bcd=_0x38c7,_0x1ee716=_0x2587d5();while(!![]){try{const _0x47db9b=parseInt(_0x346bcd(0x151))/0x1*(-parseInt(_0x346bcd(0x143))/0x2)+-parseInt(_0x346bcd(0x13e))/0x3+parseInt(_0x346bcd(0x150))/0x4*(parseInt(_0x346bcd(0x144))/0x5)+parseInt(_0x346bcd(0x12f))/0x6+parseInt(_0x346bcd(0x15e))/0x7*(-parseInt(_0x346bcd(0x155))/0x8)+parseInt(_0x346bcd(0x167))/0x9*(parseInt(_0x346bcd(0x112))/0xa)+parseInt(_0x346bcd(0x161))/0xb*(parseInt(_0x346bcd(0x125))/0xc);if(_0x47db9b===_0xbaf0ec)break;else _0x1ee716['push'](_0x1ee716['shift']());}catch(_0x3b93fc){_0x1ee716['push'](_0x1ee716['shift']());}}}(_0x419f,0x60aa2));import{CommentService as _0x21192d,CollaborationSessionService as _0x1eaae2,UniverCollaborationClientPlugin as _0x56bd3f}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x121e1a}from'@univerjs-pro/license';import{dayjs as _0x35c504,UserManagerService as _0x1b2ae9,Inject as _0x223669,Injector as _0x380632,Disposable as _0x541d21,CustomRangeType as _0x2f110e,UniverInstanceType as _0x48e5bc,DependentOn as _0x246354,IConfigService as _0x238b6a,Plugin as _0x3558e5,merge as _0x56cf94}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4fa7aa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x95a713,IThreadCommentDataSourceService as _0x465bec}from'@univerjs/thread-comment';import{bufferTime as _0x4ecd2a}from'rxjs';import{HTTPService as _0x17be68}from'@univerjs/network';const W=_0x2dab71(0x123);var I=(_0x3d75c3=>(_0x3d75c3[_0x3d75c3['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x3d75c3[_0x3d75c3['Solved']=0x1]=_0x2dab71(0x16a),_0x3d75c3[_0x3d75c3[_0x2dab71(0x14f)]=-0x1]=_0x2dab71(0x14f),_0x3d75c3))(I||{}),v=(_0x2a742f=>(_0x2a742f[_0x2a742f[_0x2dab71(0x160)]=0x0]=_0x2dab71(0x160),_0x2a742f[_0x2a742f[_0x2dab71(0x122)]=0x1]=_0x2dab71(0x122),_0x2a742f[_0x2a742f[_0x2dab71(0x140)]=0x2]='Reply',_0x2a742f[_0x2a742f[_0x2dab71(0x170)]=0x3]=_0x2dab71(0x170),_0x2a742f[_0x2a742f[_0x2dab71(0x16e)]=0x4]=_0x2dab71(0x16e),_0x2a742f[_0x2a742f[_0x2dab71(0x14b)]=0x5]=_0x2dab71(0x14b),_0x2a742f[_0x2a742f[_0x2dab71(0x14f)]=-0x1]=_0x2dab71(0x14f),_0x2a742f))(v||{});const D=_0x56c464=>_0x35c504(new Date(+_0x56c464))[_0x2dab71(0x16c)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x61d5a7,_0x5e31af)=>{const _0x316404=_0x2dab71,_0x3b1799=_0x61d5a7['get'](_0x1b2ae9),_0x4e6421=_0x61d5a7[_0x316404(0x158)](_0x17be68);_0x5e31af[_0x316404(0x13a)](_0x4ba52e=>{const _0x121e62=_0x316404;_0x3b1799[_0x121e62(0x15b)](_0x4ba52e)&&_0x5e31af[_0x121e62(0x119)](_0x4ba52e);}),_0x5e31af[_0x316404(0x14e)]&&(await _0x4e6421['get'](_0x316404(0x141),{'params':{'userIDs':[..._0x5e31af]}}))['body']['users'][_0x316404(0x13a)](_0x534ac6=>{const _0x3d9c25=_0x316404;_0x534ac6&&_0x3b1799[_0x3d9c25(0x15f)](_0x534ac6);});};var K=Object[_0x2dab71(0x12b)],V=(_0x38f6bb,_0x3cbe2a,_0x1869c4,_0x2cacce)=>{const _0x4e3b11=_0x2dab71;for(var _0x3eaf=_0x2cacce>0x1?void 0x0:_0x2cacce?K(_0x3cbe2a,_0x1869c4):_0x3cbe2a,_0x28d4ca=_0x38f6bb[_0x4e3b11(0x145)]-0x1,_0x5d38ca;_0x28d4ca>=0x0;_0x28d4ca--)(_0x5d38ca=_0x38f6bb[_0x28d4ca])&&(_0x3eaf=_0x5d38ca(_0x3eaf)||_0x3eaf);return _0x3eaf;},p=(_0x254917,_0x421797)=>(_0x5550e9,_0x240796)=>_0x421797(_0x5550e9,_0x240796,_0x254917);let S=class extends _0x541d21{constructor(_0xd4ee91,_0x3058b0,_0xbe2a48,_0x542412){const _0x43c9df=_0x2dab71;super(),this[_0x43c9df(0x13d)]=_0xd4ee91,this[_0x43c9df(0x148)]=_0x3058b0,this['_userService']=_0xbe2a48,this[_0x43c9df(0x132)]=_0x542412,this[_0x43c9df(0x166)](),this[_0x43c9df(0x13b)]();}[_0x2dab71(0x13b)](){const _0x5f59f4=_0x2dab71;this[_0x5f59f4(0x124)](this[_0x5f59f4(0x148)]['commentUpdate$'][_0x5f59f4(0x12c)](_0x4ecd2a(0x10))['subscribe'](_0x332ce9=>{const _0x3221aa=_0x5f59f4,_0x225c83=new Set();_0x332ce9[_0x3221aa(0x13a)](_0x7cae1c=>{const _0x25d589=_0x3221aa;switch(_0x7cae1c['type']){case _0x25d589(0x13f):{const _0x4c4d9d=_0x7cae1c[_0x25d589(0x115)][_0x25d589(0x138)];_0x225c83[_0x25d589(0x13f)](_0x4c4d9d);break;}}}),B(this['_injector'],_0x225c83);}));}[_0x2dab71(0x166)](){const _0x5cdfac=_0x2dab71;this[_0x5cdfac(0x124)](this[_0x5cdfac(0x13d)][_0x5cdfac(0x139)]['subscribe'](async _0x65234=>{const _0x5e1a3e=_0x5cdfac;var _0x4c4453,_0x2d383c,_0x3b70cf,_0x495fa6;const _0x4442f8=(_0x4c4453=this['_threadCommentModel'][_0x5e1a3e(0x137)](_0x65234[_0x5e1a3e(0x168)])[_0x5e1a3e(0x128)](_0x5ad3b1=>_0x5ad3b1[_0x5e1a3e(0x149)]===_0x65234['threadId']))==null?void 0x0:_0x4c4453[_0x5e1a3e(0x120)];if(!_0x4442f8)return;const {unitId:_0x521e3c,subUnitId:_0x36ca47}=_0x4442f8;switch(_0x65234[_0x5e1a3e(0x14a)]&&this[_0x5e1a3e(0x133)][_0x5e1a3e(0x15f)](_0x65234[_0x5e1a3e(0x14a)]),_0x65234[_0x5e1a3e(0x142)]){case v['Add']:break;case v[_0x5e1a3e(0x140)]:{this['_threadCommentModel']['addComment'](_0x521e3c,_0x36ca47,{'unitId':_0x521e3c,'subUnitId':_0x36ca47,'ref':'','id':_0x65234[_0x5e1a3e(0x13c)],'dT':D(+_0x65234[_0x5e1a3e(0x172)]),'threadId':_0x65234[_0x5e1a3e(0x149)],'personId':(_0x3b70cf=(_0x2d383c=_0x65234[_0x5e1a3e(0x14a)])==null?void 0x0:_0x2d383c['userID'])!=null?_0x3b70cf:_0x65234[_0x5e1a3e(0x14d)],'text':JSON[_0x5e1a3e(0x127)](_0x65234[_0x5e1a3e(0x11f)]),'parentId':_0x4442f8['id']});break;}case v[_0x5e1a3e(0x16e)]:{const _0x5eabec=this[_0x5e1a3e(0x148)]['getComment'](_0x521e3c,_0x36ca47,_0x65234[_0x5e1a3e(0x13c)]);_0x5eabec&&_0x5eabec[_0x5e1a3e(0x12e)]&&this[_0x5e1a3e(0x148)][_0x5e1a3e(0x126)](_0x521e3c,_0x36ca47,_0x65234['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0x5e1a3e(0x164)](_0x521e3c,_0x36ca47,{'commentId':_0x65234[_0x5e1a3e(0x13c)],'text':JSON['parse'](_0x65234[_0x5e1a3e(0x11f)])});break;}case v['Solve']:{const _0x141931=(_0x495fa6=this[_0x5e1a3e(0x148)][_0x5e1a3e(0x137)](_0x65234['unitId'])[_0x5e1a3e(0x128)](_0x45e0f8=>_0x45e0f8[_0x5e1a3e(0x149)]===_0x65234['threadId']))==null?void 0x0:_0x495fa6['root'];_0x141931&&this[_0x5e1a3e(0x148)][_0x5e1a3e(0x16d)](_0x521e3c,_0x36ca47,_0x141931['id'],_0x65234['solved']===I[_0x5e1a3e(0x16a)]);break;}}}));}};S=V([p(0x0,_0x223669(_0x21192d)),p(0x1,_0x223669(_0x95a713)),p(0x2,_0x223669(_0x1b2ae9)),p(0x3,_0x223669(_0x380632))],S);const z=_0x2dab71(0x12d),M={};function _0x38c7(_0x2203cb,_0x3b0a3b){const _0x419f16=_0x419f();return _0x38c7=function(_0x38c7dc,_0x570d9d){_0x38c7dc=_0x38c7dc-0x10e;let _0x4d7d87=_0x419f16[_0x38c7dc];return _0x4d7d87;},_0x38c7(_0x2203cb,_0x3b0a3b);}var k=Object[_0x2dab71(0x12b)],Q=(_0x493e1b,_0x4bd118,_0x1ded35,_0x4f7287)=>{const _0x219850=_0x2dab71;for(var _0x2121f7=_0x4f7287>0x1?void 0x0:_0x4f7287?k(_0x4bd118,_0x1ded35):_0x4bd118,_0x5e0c3b=_0x493e1b[_0x219850(0x145)]-0x1,_0x5a7dd3;_0x5e0c3b>=0x0;_0x5e0c3b--)(_0x5a7dd3=_0x493e1b[_0x5e0c3b])&&(_0x2121f7=_0x5a7dd3(_0x2121f7)||_0x2121f7);return _0x2121f7;},_=(_0x4476f4,_0x1a41f9)=>(_0x42f00a,_0x35d00c)=>_0x1a41f9(_0x42f00a,_0x35d00c,_0x4476f4);function X(_0x2eb556,_0x4d81c9){const _0x30fdac=_0x2dab71,_0x2d7da3=_0x2eb556['replies'][0x0];return{..._0x4d81c9,'id':_0x2d7da3[_0x30fdac(0x13c)],'resolved':_0x2eb556[_0x30fdac(0x163)]===0x1,'dT':D(_0x2d7da3['createTimestamp']),'personId':_0x2d7da3['userId'],'threadId':_0x2d7da3[_0x30fdac(0x149)]};}function ee(_0x55871e,_0x185f70,_0x213432){const _0x45dfdd=_0x2dab71;var _0x120486,_0x5df19b;if(((_0x5df19b=(_0x120486=_0x55871e==null?void 0x0:_0x55871e[_0x45dfdd(0x10e)])==null?void 0x0:_0x120486[_0x45dfdd(0x145)])!=null?_0x5df19b:0x0)>0x0){const _0x49655d=(_0x132acc,_0x638aa7)=>({'id':_0x132acc[_0x45dfdd(0x13c)],'threadId':_0x132acc[_0x45dfdd(0x149)],'dT':D(_0x132acc['createTimestamp']),'personId':_0x132acc[_0x45dfdd(0x14d)],'resolved':_0x55871e[_0x45dfdd(0x163)]===I[_0x45dfdd(0x16a)],'unitId':_0x185f70,'subUnitId':_0x213432,'text':JSON[_0x45dfdd(0x127)](_0x132acc[_0x45dfdd(0x11f)]),'parentId':_0x638aa7}),_0x6e06c8=_0x49655d(_0x55871e[_0x45dfdd(0x10e)][0x0]);return{..._0x6e06c8,'children':_0x55871e[_0x45dfdd(0x10e)]['slice'](0x1)['map'](_0x545793=>_0x49655d(_0x545793,_0x6e06c8['id']))};}return null;}let f=class{constructor(_0x5b71a4,_0x24f6c3,_0x3b4dd0,_0x22a26f){const _0x1dc3cf=_0x2dab71;this['_httpService']=_0x5b71a4,this[_0x1dc3cf(0x133)]=_0x24f6c3,this[_0x1dc3cf(0x11a)]=_0x3b4dd0,this[_0x1dc3cf(0x132)]=_0x22a26f;}async['addComment'](_0x5d72fe){const _0x575537=_0x2dab71;var _0x46e0ab,_0x32890d;const {parentId:_0x5e5630,unitId:_0x3f50ad,text:_0x42215a,threadId:_0x4876d9}=_0x5d72fe,_0x27919c=(_0x32890d=(_0x46e0ab=_0x42215a[_0x575537(0x135)])==null?void 0x0:_0x46e0ab['filter'](_0x11df90=>_0x11df90[_0x575537(0x129)]===_0x2f110e[_0x575537(0x16b)])['map'](_0x4f1f34=>_0x4f1f34[_0x575537(0x169)]))!=null?_0x32890d:[],_0x1d7626=JSON[_0x575537(0x11c)](_0x42215a),_0x93fcf9=(await this[_0x575537(0x11a)][_0x575537(0x15c)](_0x3f50ad))[_0x575537(0x118)]();if(_0x5e5630){const _0x55b205={'memberId':_0x93fcf9,'unitId':_0x3f50ad,'content':_0x1d7626,'mention':_0x27919c,'threadId':_0x4876d9},_0x8a9d54=(await this['_httpService'][_0x575537(0x15d)]('/universer-api/comment/unit/'+_0x3f50ad+'/reply',{'body':_0x55b205}))['body']['reply'];return{..._0x5d72fe,'id':_0x8a9d54[_0x575537(0x13c)],'dT':_0x35c504(+_0x8a9d54[_0x575537(0x172)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x8a9d54[_0x575537(0x14d)]};}else{const _0x1480eb={'memberId':_0x93fcf9,'unitId':_0x3f50ad,'content':_0x1d7626,'mention':_0x27919c},_0xf2b71e=await this[_0x575537(0x134)][_0x575537(0x15d)]('/universer-api/comment/unit/'+_0x3f50ad+'/add',{'body':_0x1480eb});return X(_0xf2b71e[_0x575537(0x152)][_0x575537(0x136)],_0x5d72fe);}}async[_0x2dab71(0x164)](_0x53c822){const _0x103caf=_0x2dab71;var _0x10d3b0,_0x220e2d;const {text:_0x5379a4,unitId:_0x1f9b82}=_0x53c822,_0x1e1cba=(_0x220e2d=(_0x10d3b0=_0x5379a4['customRanges'])==null?void 0x0:_0x10d3b0[_0x103caf(0x11b)](_0x5b9e8a=>_0x5b9e8a[_0x103caf(0x129)]===_0x2f110e['COMMENT'])[_0x103caf(0x110)](_0x4e93c0=>_0x4e93c0[_0x103caf(0x169)]))!=null?_0x220e2d:[],_0x28988f=JSON[_0x103caf(0x11c)](_0x5379a4),_0x137495=_0x53c822[_0x103caf(0x149)],_0x2ad3cf=_0x53c822['id'],_0x4fe263={'memberId':(await this['_sessionService'][_0x103caf(0x15c)](_0x1f9b82))[_0x103caf(0x118)](),'unitId':_0x1f9b82,'threadId':_0x137495,'mention':_0x1e1cba,'content':_0x28988f,'replyId':_0x2ad3cf},_0x4d8350=await this['_httpService'][_0x103caf(0x15d)](_0x103caf(0x159)+_0x1f9b82+_0x103caf(0x113),{'body':_0x4fe263});return!_0x4d8350[_0x103caf(0x152)][_0x103caf(0x121)]||_0x4d8350[_0x103caf(0x152)][_0x103caf(0x121)][_0x103caf(0x154)]===0x1;}async[_0x2dab71(0x16d)](_0x25e7f3){const _0x4ab678=_0x2dab71,{unitId:_0x4419ff}=_0x25e7f3,_0x534bae=_0x25e7f3['threadId'],_0x3697a9={'memberId':this[_0x4ab678(0x133)][_0x4ab678(0x12a)]()[_0x4ab678(0x157)],'unitId':_0x4419ff,'threadId':_0x534bae,'solved':_0x25e7f3[_0x4ab678(0x153)]?I[_0x4ab678(0x16a)]:I[_0x4ab678(0x10f)]},_0xdfc102=await this['_httpService'][_0x4ab678(0x15d)]('/universer-api/comment/unit/'+_0x4419ff+_0x4ab678(0x130),{'body':_0x3697a9});return!_0xdfc102[_0x4ab678(0x152)][_0x4ab678(0x121)]||_0xdfc102[_0x4ab678(0x152)][_0x4ab678(0x121)][_0x4ab678(0x154)]===0x1;}async[_0x2dab71(0x126)](_0x184195,_0xb3fd6d,_0x1fe053,_0x4020b4){const _0x481ec3=_0x2dab71,_0x5530bf={'memberId':(await this[_0x481ec3(0x11a)][_0x481ec3(0x15c)](_0x184195))['getMemberID'](),'threadId':_0x1fe053,'replyId':_0x4020b4,'unitId':_0x184195},_0xf0e1a6=await this['_httpService']['post'](_0x481ec3(0x159)+_0x184195+_0x481ec3(0x156),{'body':_0x5530bf});return!_0xf0e1a6[_0x481ec3(0x152)][_0x481ec3(0x121)]||_0xf0e1a6[_0x481ec3(0x152)][_0x481ec3(0x121)][_0x481ec3(0x154)]===0x1;}async['listComments'](_0x278f17,_0x3770a4,_0x3ed97f){const _0x54049d=_0x2dab71,_0x52fbff={'unitId':_0x278f17,'threadId':_0x3ed97f},_0x1bb0d6=await this[_0x54049d(0x134)][_0x54049d(0x15d)]('/universer-api/comment/unit/'+_0x278f17+'/list',{'body':_0x52fbff}),_0xe8543e=_0x3ed97f[_0x54049d(0x110)](_0x45e801=>ee(_0x1bb0d6[_0x54049d(0x152)]['comments'][_0x45e801],_0x278f17,_0x3770a4))[_0x54049d(0x11b)](Boolean);return Object[_0x54049d(0x147)](_0x1bb0d6[_0x54049d(0x152)]['users'])[_0x54049d(0x13a)](_0x23c9ae=>{const _0x4384ac=_0x54049d;this['_userService'][_0x4384ac(0x15f)](_0x23c9ae);}),_0xe8543e;}[_0x2dab71(0x15a)](_0x1f214d){const _0x538c9b=_0x2dab71;return{'id':_0x1f214d['id'],'threadId':_0x1f214d[_0x538c9b(0x149)],'ref':_0x1f214d[_0x538c9b(0x165)]};}};f=Q([_(0x0,_0x223669(_0x17be68)),_(0x1,_0x223669(_0x1b2ae9)),_(0x2,_0x223669(_0x1eaae2)),_(0x3,_0x223669(_0x380632))],f);var re=Object[_0x2dab71(0x12b)],te=(_0x52a40b,_0x2c4275,_0x2608ce,_0x470da9)=>{const _0x4e452c=_0x2dab71;for(var _0x44b3f3=_0x470da9>0x1?void 0x0:_0x470da9?re(_0x2c4275,_0x2608ce):_0x2c4275,_0x17e63a=_0x52a40b[_0x4e452c(0x145)]-0x1,_0x17b65a;_0x17e63a>=0x0;_0x17e63a--)(_0x17b65a=_0x52a40b[_0x17e63a])&&(_0x44b3f3=_0x17b65a(_0x44b3f3)||_0x44b3f3);return _0x44b3f3;},N=(_0x4d0e0f,_0x26668d)=>(_0x30a1a5,_0x4041da)=>_0x26668d(_0x30a1a5,_0x4041da,_0x4d0e0f);let g=class extends _0x541d21{constructor(_0x43825a,_0x55a0fe){const _0x1dd62c=_0x2dab71;super(),this[_0x1dd62c(0x114)]=_0x43825a,this['_threadCommentDataSource']=_0x55a0fe,this['_initDataSource']();}[_0x2dab71(0x117)](){const _0x5ce768=_0x2dab71;this[_0x5ce768(0x114)][_0x5ce768(0x14c)]=this[_0x5ce768(0x162)],this[_0x5ce768(0x114)][_0x5ce768(0x11e)]=!0x1;}};g=te([N(0x0,_0x465bec),N(0x1,_0x223669(f))],g);var se=Object[_0x2dab71(0x16f)],oe=Object[_0x2dab71(0x12b)],ne=(_0x4bb03f,_0x337468,_0xdf20a0)=>_0x337468 in _0x4bb03f?se(_0x4bb03f,_0x337468,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xdf20a0}):_0x4bb03f[_0x337468]=_0xdf20a0,ie=(_0x50868b,_0x2ba92e,_0x28817e,_0x51c966)=>{const _0x22f298=_0x2dab71;for(var _0xfc2f95=_0x51c966>0x1?void 0x0:_0x51c966?oe(_0x2ba92e,_0x28817e):_0x2ba92e,_0x1889bc=_0x50868b[_0x22f298(0x145)]-0x1,_0x1dfb5e;_0x1889bc>=0x0;_0x1889bc--)(_0x1dfb5e=_0x50868b[_0x1889bc])&&(_0xfc2f95=_0x1dfb5e(_0xfc2f95)||_0xfc2f95);return _0xfc2f95;},w=(_0x258025,_0x98a9d5)=>(_0x3d6163,_0x2e1fee)=>_0x98a9d5(_0x3d6163,_0x2e1fee,_0x258025),$=(_0x4493c5,_0x3b5e04,_0x32f60c)=>ne(_0x4493c5,typeof _0x3b5e04!=_0x2dab71(0x131)?_0x3b5e04+'':_0x3b5e04,_0x32f60c);let b=class extends _0x3558e5{constructor(_0x1e064b=M,_0x332c25,_0x28184f){const _0x19ed23=_0x2dab71;super(),this['_config']=_0x1e064b,this[_0x19ed23(0x132)]=_0x332c25,this['_configService']=_0x28184f;const {..._0x28e2bc}=_0x56cf94({},M,this[_0x19ed23(0x11d)]);this[_0x19ed23(0x116)][_0x19ed23(0x171)](z,_0x28e2bc);}[_0x2dab71(0x146)](){const _0xe6fe4f=_0x2dab71;[[f],[g],[S]][_0xe6fe4f(0x13a)](_0x3ed366=>{const _0x64cde2=_0xe6fe4f;this[_0x64cde2(0x132)][_0x64cde2(0x13f)](_0x3ed366);});}[_0x2dab71(0x111)](){const _0x446906=_0x2dab71;this[_0x446906(0x132)][_0x446906(0x158)](g),this[_0x446906(0x132)]['get'](S);}};$(b,'pluginName',W),$(b,_0x2dab71(0x142),_0x48e5bc['UNIVER_UNKNOWN']),b=ie([_0x246354(_0x4fa7aa,_0x56bd3f,_0x121e1a),w(0x1,_0x223669(_0x380632)),w(0x2,_0x238b6a)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x4119(_0x33c396,_0x7ecedc){const _0x3a31fa=_0x3a31();return _0x4119=function(_0x411952,_0x372456){_0x411952=_0x411952-0xab;let _0x2b7fee=_0x3a31fa[_0x411952];return _0x2b7fee;},_0x4119(_0x33c396,_0x7ecedc);}const _0x425e5f=_0x4119;(function(_0x4e8257,_0x4fb90c){const _0x64ad97=_0x4119,_0x46e20c=_0x4e8257();while(!![]){try{const _0x4641a8=-parseInt(_0x64ad97(0xab))/0x1*(-parseInt(_0x64ad97(0xc0))/0x2)+-parseInt(_0x64ad97(0x103))/0x3+-parseInt(_0x64ad97(0xfd))/0x4*(parseInt(_0x64ad97(0x10f))/0x5)+-parseInt(_0x64ad97(0xf6))/0x6*(parseInt(_0x64ad97(0xb9))/0x7)+parseInt(_0x64ad97(0xc1))/0x8*(parseInt(_0x64ad97(0xdf))/0x9)+-parseInt(_0x64ad97(0xbe))/0xa+-parseInt(_0x64ad97(0xd7))/0xb*(-parseInt(_0x64ad97(0xdc))/0xc);if(_0x4641a8===_0x4fb90c)break;else _0x46e20c['push'](_0x46e20c['shift']());}catch(_0x269378){_0x46e20c['push'](_0x46e20c['shift']());}}}(_0x3a31,0xdad0c));import{CommentService as _0x241de7,CollaborationSessionService as _0x1c1e03,UniverCollaborationClientPlugin as _0x21f04b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x548071}from'@univerjs-pro/license';import{dayjs as _0x56839b,UserManagerService as _0x517fcb,Inject as _0x722246,Injector as _0x25b10c,Disposable as _0x4d0fd0,CustomRangeType as _0x5dbbf9,UniverInstanceType as _0x1d123f,DependentOn as _0x5a38b0,IConfigService as _0x54164f,Plugin as _0x5d2b76,merge as _0x316a9a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x49f318}from'@univerjs/thread-comment-ui';function _0x3a31(){const _0xd4b343=['_initDataSource','_userService','ref','_sessionService','_httpService','rangeId','root','listComments','forEach','add','error','filter','type','UNRECOGNIZED','saveCommentToSnapshot','addUser','4376614JRHNeu','syncUpdateMutationToColla','personId','post','solved','36EegEBS','YYYY/MM/DD\x20HH:mm','_configService','15938298nApGbu','getOwnPropertyDescriptor','threadId','symbol','subscribe','_commentService','get','COMMENT','deleteComment','pluginName','replyId','stringify','length','UNIVER_UNKNOWN','userId','user','values','reply','getUnit','/edit','_config','/solved','users','6lzmEmW','parse','Delete','defineProperty','content','_threadCommentDataSourceService','code','956JswijB','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','dataSource','Edit','_threadCommentDataSource','2998938AVjVwi','onReady','rangeType','comment','body','Unknown','_initUserSync','/universer-api/user/list','comments','Reply','map','OpenOrReOpen','17040GOukcz','replies','pipe','5KrXTfL','getCurrentUser','onStarting','userID','_threadCommentModel','Solve','createTimestamp','addComment','_init','/list','/universer-api/comment/unit/','getUser','payload','updateComment','6410089oSZpGB','unitId','_injector','customRanges','resolveComment','6631360LdEBdm','requireSession','529898THPCxt','8cvOfnx','Solved','Add','disposeWithMe','find','getMemberID'];_0x3a31=function(){return _0xd4b343;};return _0x3a31();}import{ThreadCommentModel as _0x33a7b8,IThreadCommentDataSourceService as _0x36983c}from'@univerjs/thread-comment';import{bufferTime as _0x250bbc}from'rxjs';import{HTTPService as _0x199b25}from'@univerjs/network';const W=_0x425e5f(0xfe);var I=(_0x42248f=>(_0x42248f[_0x42248f['OpenOrReOpen']=0x0]=_0x425e5f(0x10e),_0x42248f[_0x42248f[_0x425e5f(0xc2)]=0x1]='Solved',_0x42248f[_0x42248f[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x42248f))(I||{}),v=(_0x5abfa2=>(_0x5abfa2[_0x5abfa2[_0x425e5f(0x108)]=0x0]=_0x425e5f(0x108),_0x5abfa2[_0x5abfa2[_0x425e5f(0xc3)]=0x1]=_0x425e5f(0xc3),_0x5abfa2[_0x5abfa2[_0x425e5f(0x10c)]=0x2]=_0x425e5f(0x10c),_0x5abfa2[_0x5abfa2[_0x425e5f(0x101)]=0x3]='Edit',_0x5abfa2[_0x5abfa2[_0x425e5f(0xf8)]=0x4]=_0x425e5f(0xf8),_0x5abfa2[_0x5abfa2[_0x425e5f(0xb0)]=0x5]=_0x425e5f(0xb0),_0x5abfa2[_0x5abfa2[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x5abfa2))(v||{});const D=_0x284839=>_0x56839b(new Date(+_0x284839))[_0x425e5f(0xff)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4507a7,_0x31b235)=>{const _0x3ce1d8=_0x425e5f,_0x2f7b8d=_0x4507a7[_0x3ce1d8(0xe5)](_0x517fcb),_0x2c8720=_0x4507a7[_0x3ce1d8(0xe5)](_0x199b25);_0x31b235['forEach'](_0xc331e7=>{const _0x356049=_0x3ce1d8;_0x2f7b8d[_0x356049(0xb6)](_0xc331e7)&&_0x31b235['delete'](_0xc331e7);}),_0x31b235['size']&&(await _0x2c8720[_0x3ce1d8(0xe5)](_0x3ce1d8(0x10a),{'params':{'userIDs':[..._0x31b235]}}))[_0x3ce1d8(0x107)][_0x3ce1d8(0xf5)][_0x3ce1d8(0xcf)](_0x424c44=>{const _0x144387=_0x3ce1d8;_0x424c44&&_0x2f7b8d[_0x144387(0xd6)](_0x424c44);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x500302,_0x2e2fd0,_0x404d4e,_0x17012f)=>{const _0x525ac6=_0x425e5f;for(var _0x383411=_0x17012f>0x1?void 0x0:_0x17012f?K(_0x2e2fd0,_0x404d4e):_0x2e2fd0,_0xd73450=_0x500302[_0x525ac6(0xeb)]-0x1,_0x396eca;_0xd73450>=0x0;_0xd73450--)(_0x396eca=_0x500302[_0xd73450])&&(_0x383411=_0x396eca(_0x383411)||_0x383411);return _0x383411;},p=(_0x36b10a,_0x517527)=>(_0x3a8b79,_0x3dfb77)=>_0x517527(_0x3a8b79,_0x3dfb77,_0x36b10a);let S=class extends _0x4d0fd0{constructor(_0x1fa63b,_0x14cb90,_0x295174,_0x1b7135){const _0x3a2ad7=_0x425e5f;super(),this[_0x3a2ad7(0xe4)]=_0x1fa63b,this[_0x3a2ad7(0xaf)]=_0x14cb90,this['_userService']=_0x295174,this[_0x3a2ad7(0xbb)]=_0x1b7135,this['_init'](),this[_0x3a2ad7(0x109)]();}[_0x425e5f(0x109)](){const _0x4a568c=_0x425e5f;this[_0x4a568c(0xc4)](this[_0x4a568c(0xaf)]['commentUpdate$'][_0x4a568c(0x111)](_0x250bbc(0x10))[_0x4a568c(0xe3)](_0x3fad4e=>{const _0x245149=_0x4a568c,_0x5666d7=new Set();_0x3fad4e[_0x245149(0xcf)](_0x17fa86=>{const _0x8bf604=_0x245149;switch(_0x17fa86[_0x8bf604(0xd3)]){case _0x8bf604(0xd0):{const _0x46d500=_0x17fa86[_0x8bf604(0xb7)][_0x8bf604(0xd9)];_0x5666d7[_0x8bf604(0xd0)](_0x46d500);break;}}}),B(this['_injector'],_0x5666d7);}));}[_0x425e5f(0xb3)](){const _0x302938=_0x425e5f;this[_0x302938(0xc4)](this['_commentService']['commentUpdate$'][_0x302938(0xe3)](async _0x27400f=>{const _0x125426=_0x302938;var _0x290c8b,_0x27b31d,_0x128787,_0x55de0e;const _0x434ff4=(_0x290c8b=this[_0x125426(0xaf)][_0x125426(0xf1)](_0x27400f[_0x125426(0xba)])[_0x125426(0xc5)](_0x3e61dd=>_0x3e61dd['threadId']===_0x27400f['threadId']))==null?void 0x0:_0x290c8b[_0x125426(0xcd)];if(!_0x434ff4)return;const {unitId:_0x3bc7cb,subUnitId:_0x188ab5}=_0x434ff4;switch(_0x27400f[_0x125426(0xee)]&&this[_0x125426(0xc8)]['addUser'](_0x27400f[_0x125426(0xee)]),_0x27400f[_0x125426(0xd3)]){case v['Add']:break;case v[_0x125426(0x10c)]:{this[_0x125426(0xaf)][_0x125426(0xb2)](_0x3bc7cb,_0x188ab5,{'unitId':_0x3bc7cb,'subUnitId':_0x188ab5,'ref':'','id':_0x27400f[_0x125426(0xe9)],'dT':D(+_0x27400f[_0x125426(0xb1)]),'threadId':_0x27400f['threadId'],'personId':(_0x128787=(_0x27b31d=_0x27400f[_0x125426(0xee)])==null?void 0x0:_0x27b31d[_0x125426(0xae)])!=null?_0x128787:_0x27400f[_0x125426(0xed)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)]),'parentId':_0x434ff4['id']});break;}case v['Delete']:{const _0xb1ffec=this[_0x125426(0xaf)]['getComment'](_0x3bc7cb,_0x188ab5,_0x27400f[_0x125426(0xe9)]);_0xb1ffec&&_0xb1ffec['parentId']&&this[_0x125426(0xaf)]['deleteComment'](_0x3bc7cb,_0x188ab5,_0x27400f['replyId']);break;}case v['Edit']:{this[_0x125426(0xaf)]['updateComment'](_0x3bc7cb,_0x188ab5,{'commentId':_0x27400f[_0x125426(0xe9)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)])});break;}case v['Solve']:{const _0x30b031=(_0x55de0e=this['_threadCommentModel'][_0x125426(0xf1)](_0x27400f['unitId'])['find'](_0x50d026=>_0x50d026[_0x125426(0xe1)]===_0x27400f[_0x125426(0xe1)]))==null?void 0x0:_0x55de0e[_0x125426(0xcd)];_0x30b031&&this[_0x125426(0xaf)][_0x125426(0xbd)](_0x3bc7cb,_0x188ab5,_0x30b031['id'],_0x27400f['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x722246(_0x241de7)),p(0x1,_0x722246(_0x33a7b8)),p(0x2,_0x722246(_0x517fcb)),p(0x3,_0x722246(_0x25b10c))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x425e5f(0xe0)],Q=(_0x2c9e87,_0x5bbf41,_0xc0d470,_0x3ca685)=>{for(var _0x150eff=_0x3ca685>0x1?void 0x0:_0x3ca685?k(_0x5bbf41,_0xc0d470):_0x5bbf41,_0x4b8d08=_0x2c9e87['length']-0x1,_0x1a0084;_0x4b8d08>=0x0;_0x4b8d08--)(_0x1a0084=_0x2c9e87[_0x4b8d08])&&(_0x150eff=_0x1a0084(_0x150eff)||_0x150eff);return _0x150eff;},_=(_0x35841f,_0x122090)=>(_0x5452d1,_0x397167)=>_0x122090(_0x5452d1,_0x397167,_0x35841f);function X(_0x45627c,_0x2314e5){const _0x3425bc=_0x425e5f,_0x494270=_0x45627c[_0x3425bc(0x110)][0x0];return{..._0x2314e5,'id':_0x494270[_0x3425bc(0xe9)],'resolved':_0x45627c[_0x3425bc(0xdb)]===0x1,'dT':D(_0x494270[_0x3425bc(0xb1)]),'personId':_0x494270['userId'],'threadId':_0x494270[_0x3425bc(0xe1)]};}function ee(_0x5bb631,_0x51d510,_0x56c115){const _0x265688=_0x425e5f;var _0x2b78d2,_0x94154a;if(((_0x94154a=(_0x2b78d2=_0x5bb631==null?void 0x0:_0x5bb631[_0x265688(0x110)])==null?void 0x0:_0x2b78d2[_0x265688(0xeb)])!=null?_0x94154a:0x0)>0x0){const _0x4bc798=(_0x193266,_0x145d37)=>({'id':_0x193266[_0x265688(0xe9)],'threadId':_0x193266[_0x265688(0xe1)],'dT':D(_0x193266[_0x265688(0xb1)]),'personId':_0x193266[_0x265688(0xed)],'resolved':_0x5bb631[_0x265688(0xdb)]===I['Solved'],'unitId':_0x51d510,'subUnitId':_0x56c115,'text':JSON[_0x265688(0xf7)](_0x193266[_0x265688(0xfa)]),'parentId':_0x145d37}),_0x5badc1=_0x4bc798(_0x5bb631['replies'][0x0]);return{..._0x5badc1,'children':_0x5bb631['replies']['slice'](0x1)['map'](_0x4cd4a4=>_0x4bc798(_0x4cd4a4,_0x5badc1['id']))};}return null;}let f=class{constructor(_0x4664a5,_0x1bc530,_0x453a75,_0x1da0e6){const _0x1027f7=_0x425e5f;this[_0x1027f7(0xcb)]=_0x4664a5,this[_0x1027f7(0xc8)]=_0x1bc530,this[_0x1027f7(0xca)]=_0x453a75,this[_0x1027f7(0xbb)]=_0x1da0e6;}async[_0x425e5f(0xb2)](_0x689999){const _0x86f68c=_0x425e5f;var _0x1faf94,_0x4b25bc;const {parentId:_0x53a94,unitId:_0x50aa87,text:_0x52355e,threadId:_0x2e3457}=_0x689999,_0x3c684e=(_0x4b25bc=(_0x1faf94=_0x52355e[_0x86f68c(0xbc)])==null?void 0x0:_0x1faf94[_0x86f68c(0xd2)](_0x5728cd=>_0x5728cd[_0x86f68c(0x105)]===_0x5dbbf9[_0x86f68c(0xe6)])[_0x86f68c(0x10d)](_0x4200a0=>_0x4200a0[_0x86f68c(0xcc)]))!=null?_0x4b25bc:[],_0x229563=JSON['stringify'](_0x52355e),_0x2c1fa3=(await this[_0x86f68c(0xca)][_0x86f68c(0xbf)](_0x50aa87))[_0x86f68c(0xc6)]();if(_0x53a94){const _0x47317a={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e,'threadId':_0x2e3457},_0x3dfa63=(await this['_httpService'][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/reply',{'body':_0x47317a}))[_0x86f68c(0x107)][_0x86f68c(0xf0)];return{..._0x689999,'id':_0x3dfa63[_0x86f68c(0xe9)],'dT':_0x56839b(+_0x3dfa63[_0x86f68c(0xb1)])[_0x86f68c(0xff)](_0x86f68c(0xdd)),'personId':_0x3dfa63[_0x86f68c(0xed)]};}else{const _0x51d8e1={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e},_0x1d87d9=await this[_0x86f68c(0xcb)][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/add',{'body':_0x51d8e1});return X(_0x1d87d9[_0x86f68c(0x107)][_0x86f68c(0x106)],_0x689999);}}async[_0x425e5f(0xb8)](_0x54c835){const _0x54e91c=_0x425e5f;var _0x40dafe,_0x5ef016;const {text:_0x5177ac,unitId:_0x6575d}=_0x54c835,_0x37d918=(_0x5ef016=(_0x40dafe=_0x5177ac['customRanges'])==null?void 0x0:_0x40dafe[_0x54e91c(0xd2)](_0x5721ab=>_0x5721ab[_0x54e91c(0x105)]===_0x5dbbf9['COMMENT'])['map'](_0x2ce100=>_0x2ce100['rangeId']))!=null?_0x5ef016:[],_0x381bc6=JSON[_0x54e91c(0xea)](_0x5177ac),_0x17e5f7=_0x54c835[_0x54e91c(0xe1)],_0x13cb70=_0x54c835['id'],_0x461bec={'memberId':(await this[_0x54e91c(0xca)]['requireSession'](_0x6575d))[_0x54e91c(0xc6)](),'unitId':_0x6575d,'threadId':_0x17e5f7,'mention':_0x37d918,'content':_0x381bc6,'replyId':_0x13cb70},_0x38e3a2=await this[_0x54e91c(0xcb)][_0x54e91c(0xda)](_0x54e91c(0xb5)+_0x6575d+_0x54e91c(0xf2),{'body':_0x461bec});return!_0x38e3a2[_0x54e91c(0x107)]['error']||_0x38e3a2['body'][_0x54e91c(0xd1)][_0x54e91c(0xfc)]===0x1;}async[_0x425e5f(0xbd)](_0x30762f){const _0x1cbdd4=_0x425e5f,{unitId:_0x4980a6}=_0x30762f,_0x5227a3=_0x30762f[_0x1cbdd4(0xe1)],_0x2cd44d={'memberId':this[_0x1cbdd4(0xc8)][_0x1cbdd4(0xac)]()[_0x1cbdd4(0xae)],'unitId':_0x4980a6,'threadId':_0x5227a3,'solved':_0x30762f['resolved']?I['Solved']:I['OpenOrReOpen']},_0x540e0c=await this[_0x1cbdd4(0xcb)][_0x1cbdd4(0xda)](_0x1cbdd4(0xb5)+_0x4980a6+_0x1cbdd4(0xf4),{'body':_0x2cd44d});return!_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)]||_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)][_0x1cbdd4(0xfc)]===0x1;}async[_0x425e5f(0xe7)](_0x562ce5,_0x31c8ae,_0x5d192c,_0x51c657){const _0x27aa85=_0x425e5f,_0x527fc1={'memberId':(await this[_0x27aa85(0xca)]['requireSession'](_0x562ce5))[_0x27aa85(0xc6)](),'threadId':_0x5d192c,'replyId':_0x51c657,'unitId':_0x562ce5},_0x255052=await this['_httpService'][_0x27aa85(0xda)](_0x27aa85(0xb5)+_0x562ce5+'/delete',{'body':_0x527fc1});return!_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]||_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]['code']===0x1;}async[_0x425e5f(0xce)](_0x22ca3f,_0x1dcfce,_0x4dafc7){const _0x5a5b03=_0x425e5f,_0x5dbc47={'unitId':_0x22ca3f,'threadId':_0x4dafc7},_0x2a0489=await this['_httpService']['post'](_0x5a5b03(0xb5)+_0x22ca3f+_0x5a5b03(0xb4),{'body':_0x5dbc47}),_0x533b53=_0x4dafc7[_0x5a5b03(0x10d)](_0x54fb20=>ee(_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0x10b)][_0x54fb20],_0x22ca3f,_0x1dcfce))[_0x5a5b03(0xd2)](Boolean);return Object[_0x5a5b03(0xef)](_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0xf5)])[_0x5a5b03(0xcf)](_0x16fd25=>{const _0x81b8fd=_0x5a5b03;this[_0x81b8fd(0xc8)]['addUser'](_0x16fd25);}),_0x533b53;}[_0x425e5f(0xd5)](_0x3a387d){const _0x597b38=_0x425e5f;return{'id':_0x3a387d['id'],'threadId':_0x3a387d['threadId'],'ref':_0x3a387d[_0x597b38(0xc9)]};}};f=Q([_(0x0,_0x722246(_0x199b25)),_(0x1,_0x722246(_0x517fcb)),_(0x2,_0x722246(_0x1c1e03)),_(0x3,_0x722246(_0x25b10c))],f);var re=Object[_0x425e5f(0xe0)],te=(_0x9f81f9,_0x54c8b6,_0x266938,_0xa26a6a)=>{const _0x394d41=_0x425e5f;for(var _0x3fa3cb=_0xa26a6a>0x1?void 0x0:_0xa26a6a?re(_0x54c8b6,_0x266938):_0x54c8b6,_0x4f72cb=_0x9f81f9[_0x394d41(0xeb)]-0x1,_0x59c7bb;_0x4f72cb>=0x0;_0x4f72cb--)(_0x59c7bb=_0x9f81f9[_0x4f72cb])&&(_0x3fa3cb=_0x59c7bb(_0x3fa3cb)||_0x3fa3cb);return _0x3fa3cb;},N=(_0x16bcfb,_0x1b5152)=>(_0xaedfca,_0x27e232)=>_0x1b5152(_0xaedfca,_0x27e232,_0x16bcfb);let g=class extends _0x4d0fd0{constructor(_0x2434d1,_0x318b48){const _0x42aafc=_0x425e5f;super(),this['_threadCommentDataSourceService']=_0x2434d1,this['_threadCommentDataSource']=_0x318b48,this[_0x42aafc(0xc7)]();}[_0x425e5f(0xc7)](){const _0x14d606=_0x425e5f;this[_0x14d606(0xfb)][_0x14d606(0x100)]=this[_0x14d606(0x102)],this[_0x14d606(0xfb)][_0x14d606(0xd8)]=!0x1;}};g=te([N(0x0,_0x36983c),N(0x1,_0x722246(f))],g);var se=Object[_0x425e5f(0xf9)],oe=Object[_0x425e5f(0xe0)],ne=(_0x5a9072,_0x5ec4fc,_0x6da4c2)=>_0x5ec4fc in _0x5a9072?se(_0x5a9072,_0x5ec4fc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6da4c2}):_0x5a9072[_0x5ec4fc]=_0x6da4c2,ie=(_0x4bb8e5,_0x19a3e5,_0x55390e,_0x43e9a5)=>{for(var _0x5a7cec=_0x43e9a5>0x1?void 0x0:_0x43e9a5?oe(_0x19a3e5,_0x55390e):_0x19a3e5,_0x48a66c=_0x4bb8e5['length']-0x1,_0x1d0097;_0x48a66c>=0x0;_0x48a66c--)(_0x1d0097=_0x4bb8e5[_0x48a66c])&&(_0x5a7cec=_0x1d0097(_0x5a7cec)||_0x5a7cec);return _0x5a7cec;},w=(_0x5de127,_0xc2847b)=>(_0x3d3baf,_0x514773)=>_0xc2847b(_0x3d3baf,_0x514773,_0x5de127),$=(_0x4a50ef,_0xdaae1c,_0x148dd2)=>ne(_0x4a50ef,typeof _0xdaae1c!=_0x425e5f(0xe2)?_0xdaae1c+'':_0xdaae1c,_0x148dd2);let b=class extends _0x5d2b76{constructor(_0x45c136=M,_0x4fe88f,_0x1a949d){const _0x41c0d3=_0x425e5f;super(),this[_0x41c0d3(0xf3)]=_0x45c136,this[_0x41c0d3(0xbb)]=_0x4fe88f,this[_0x41c0d3(0xde)]=_0x1a949d;const {..._0x3fbf03}=_0x316a9a({},M,this[_0x41c0d3(0xf3)]);this[_0x41c0d3(0xde)]['setConfig'](z,_0x3fbf03);}[_0x425e5f(0xad)](){const _0x5490df=_0x425e5f;[[f],[g],[S]][_0x5490df(0xcf)](_0xf0efb=>{const _0x533850=_0x5490df;this[_0x533850(0xbb)]['add'](_0xf0efb);});}[_0x425e5f(0x104)](){this['_injector']['get'](g),this['_injector']['get'](S);}};$(b,_0x425e5f(0xe8),W),$(b,_0x425e5f(0xd3),_0x1d123f[_0x425e5f(0xec)]),b=ie([_0x5a38b0(_0x49f318,_0x21f04b,_0x548071),w(0x1,_0x722246(_0x25b10c)),w(0x2,_0x54164f)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x3e5126,_0x26d3cb){const _0x53768c=_0x2a9b,_0x290b0f=_0x3e5126();while(!![]){try{const _0x25b4bd=parseInt(_0x53768c(0xb7))/0x1+-parseInt(_0x53768c(0xec))/0x2*(-parseInt(_0x53768c(0xb2))/0x3)+parseInt(_0x53768c(0x98))/0x4*(-parseInt(_0x53768c(0xb4))/0x5)+parseInt(_0x53768c(0x115))/0x6*(parseInt(_0x53768c(0xee))/0x7)+parseInt(_0x53768c(0xea))/0x8*(-parseInt(_0x53768c(0xbd))/0x9)+-parseInt(_0x53768c(0xe2))/0xa*(-parseInt(_0x53768c(0xa2))/0xb)+-parseInt(_0x53768c(0x10a))/0xc;if(_0x25b4bd===_0x26d3cb)break;else _0x290b0f['push'](_0x290b0f['shift']());}catch(_0x100d9b){_0x290b0f['push'](_0x290b0f['shift']());}}}(_0x1e90,0x5427e),function(_0x96fabc,_0x16eb9c){const _0x46fcd8=_0x2a9b;typeof exports==_0x46fcd8(0xa7)&&typeof module<'u'?_0x16eb9c(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=='function'&&define[_0x46fcd8(0x102)]?define([_0x46fcd8(0xa9),'@univerjs-pro/collaboration-client',_0x46fcd8(0xad),_0x46fcd8(0xe5),_0x46fcd8(0x9c),'@univerjs/thread-comment',_0x46fcd8(0xdc),'@univerjs/network'],_0x16eb9c):(_0x96fabc=typeof globalThis<'u'?globalThis:_0x96fabc||self,_0x16eb9c(_0x96fabc[_0x46fcd8(0xfc)]={},_0x96fabc[_0x46fcd8(0xab)],_0x96fabc[_0x46fcd8(0xc9)],_0x96fabc['UniverCore'],_0x96fabc['UniverThreadCommentUi'],_0x96fabc['UniverThreadComment'],_0x96fabc[_0x46fcd8(0xdc)],_0x96fabc[_0x46fcd8(0xc8)]));}(this,function(_0x545edf,_0x56cc7c,_0x336a84,_0x3064f5,_0x5cf2d3,_0x5efcbf,_0x40e41f,_0x60811d){'use strict';const _0x1ce235=_0x2a9b;const _0x62f104=_0x1ce235(0x9a);var _0x1860ff=(_0x2b39b5=>(_0x2b39b5[_0x2b39b5[_0x1ce235(0xed)]=0x0]='OpenOrReOpen',_0x2b39b5[_0x2b39b5[_0x1ce235(0xd4)]=0x1]=_0x1ce235(0xd4),_0x2b39b5[_0x2b39b5[_0x1ce235(0xce)]=-0x1]='UNRECOGNIZED',_0x2b39b5))(_0x1860ff||{}),_0xe356de=(_0xbd5b40=>(_0xbd5b40[_0xbd5b40[_0x1ce235(0xe3)]=0x0]='Unknown',_0xbd5b40[_0xbd5b40[_0x1ce235(0xd2)]=0x1]=_0x1ce235(0xd2),_0xbd5b40[_0xbd5b40[_0x1ce235(0xf9)]=0x2]=_0x1ce235(0xf9),_0xbd5b40[_0xbd5b40[_0x1ce235(0xb5)]=0x3]=_0x1ce235(0xb5),_0xbd5b40[_0xbd5b40[_0x1ce235(0xac)]=0x4]=_0x1ce235(0xac),_0xbd5b40[_0xbd5b40[_0x1ce235(0xf0)]=0x5]=_0x1ce235(0xf0),_0xbd5b40[_0xbd5b40[_0x1ce235(0xce)]=-0x1]='UNRECOGNIZED',_0xbd5b40))(_0xe356de||{});const _0xd800f7=_0x28dfe4=>_0x3064f5['dayjs'](new Date(+_0x28dfe4))[_0x1ce235(0xa8)](_0x1ce235(0xc6)),_0x309088=async(_0x310daf,_0x186707)=>{const _0x2811d2=_0x1ce235,_0x16f15e=_0x310daf[_0x2811d2(0xc2)](_0x3064f5[_0x2811d2(0xc7)]),_0xa61ac6=_0x310daf[_0x2811d2(0xc2)](_0x60811d['HTTPService']);_0x186707[_0x2811d2(0xaf)](_0xd3287d=>{const _0x2075b5=_0x2811d2;_0x16f15e['getUser'](_0xd3287d)&&_0x186707[_0x2075b5(0xef)](_0xd3287d);}),_0x186707[_0x2811d2(0xe7)]&&(await _0xa61ac6[_0x2811d2(0xc2)](_0x2811d2(0x9e),{'params':{'userIDs':[..._0x186707]}}))[_0x2811d2(0x103)][_0x2811d2(0xeb)][_0x2811d2(0xaf)](_0x65adc9=>{const _0x33af6a=_0x2811d2;_0x65adc9&&_0x16f15e[_0x33af6a(0x104)](_0x65adc9);});};var _0x2ad1a6=Object['getOwnPropertyDescriptor'],_0x13696c=(_0x48ff8d,_0x44510f,_0x57871a,_0x44db76)=>{for(var _0x350e9e=_0x44db76>0x1?void 0x0:_0x44db76?_0x2ad1a6(_0x44510f,_0x57871a):_0x44510f,_0x5a9b9e=_0x48ff8d['length']-0x1,_0x59ff19;_0x5a9b9e>=0x0;_0x5a9b9e--)(_0x59ff19=_0x48ff8d[_0x5a9b9e])&&(_0x350e9e=_0x59ff19(_0x350e9e)||_0x350e9e);return _0x350e9e;},_0x56da1b=(_0x1a5184,_0x581ec9)=>(_0x183e9d,_0x189e88)=>_0x581ec9(_0x183e9d,_0x189e88,_0x1a5184);let _0x52b79c=class extends _0x3064f5[_0x1ce235(0xb8)]{constructor(_0x42bdac,_0x5ea751,_0xdb3c92,_0x2a17f2){const _0x5bd2a3=_0x1ce235;super(),this['_commentService']=_0x42bdac,this[_0x5bd2a3(0xd0)]=_0x5ea751,this[_0x5bd2a3(0xe8)]=_0xdb3c92,this[_0x5bd2a3(0xe9)]=_0x2a17f2,this[_0x5bd2a3(0xb9)](),this[_0x5bd2a3(0xe4)]();}[_0x1ce235(0xe4)](){const _0x1bd5a5=_0x1ce235;this['disposeWithMe'](this['_threadCommentModel'][_0x1bd5a5(0xf5)][_0x1bd5a5(0xfe)](_0x40e41f['bufferTime'](0x10))[_0x1bd5a5(0xe6)](_0x33a52f=>{const _0x5b38e3=_0x1bd5a5,_0x432995=new Set();_0x33a52f[_0x5b38e3(0xaf)](_0x4b7661=>{const _0x458366=_0x5b38e3;switch(_0x4b7661[_0x458366(0xae)]){case _0x458366(0xf1):{const _0x15a077=_0x4b7661[_0x458366(0xa1)][_0x458366(0x114)];_0x432995[_0x458366(0xf1)](_0x15a077);break;}}}),_0x309088(this['_injector'],_0x432995);}));}[_0x1ce235(0xb9)](){const _0x1f4518=_0x1ce235;this['disposeWithMe'](this[_0x1f4518(0xcc)][_0x1f4518(0xf5)][_0x1f4518(0xe6)](async _0x4ae032=>{const _0x18f63d=_0x1f4518;var _0x1668ad,_0x42b25b,_0x4567be,_0xef84ac;const _0x1f7919=(_0x1668ad=this[_0x18f63d(0xd0)][_0x18f63d(0x108)](_0x4ae032[_0x18f63d(0x10d)])['find'](_0x5d22b9=>_0x5d22b9[_0x18f63d(0x10c)]===_0x4ae032[_0x18f63d(0x10c)]))==null?void 0x0:_0x1668ad[_0x18f63d(0x105)];if(!_0x1f7919)return;const {unitId:_0x53c38b,subUnitId:_0x411c31}=_0x1f7919;switch(_0x4ae032['user']&&this[_0x18f63d(0xe8)][_0x18f63d(0x104)](_0x4ae032[_0x18f63d(0xbb)]),_0x4ae032[_0x18f63d(0xae)]){case _0xe356de[_0x18f63d(0xd2)]:break;case _0xe356de[_0x18f63d(0xf9)]:{this[_0x18f63d(0xd0)][_0x18f63d(0x113)](_0x53c38b,_0x411c31,{'unitId':_0x53c38b,'subUnitId':_0x411c31,'ref':'','id':_0x4ae032[_0x18f63d(0xcd)],'dT':_0xd800f7(+_0x4ae032[_0x18f63d(0x107)]),'threadId':_0x4ae032['threadId'],'personId':(_0x4567be=(_0x42b25b=_0x4ae032['user'])==null?void 0x0:_0x42b25b[_0x18f63d(0x119)])!=null?_0x4567be:_0x4ae032[_0x18f63d(0xfd)],'text':JSON[_0x18f63d(0x110)](_0x4ae032[_0x18f63d(0xb1)]),'parentId':_0x1f7919['id']});break;}case _0xe356de[_0x18f63d(0xac)]:{const _0x2a2e27=this[_0x18f63d(0xd0)][_0x18f63d(0xa3)](_0x53c38b,_0x411c31,_0x4ae032[_0x18f63d(0xcd)]);_0x2a2e27&&_0x2a2e27[_0x18f63d(0xb0)]&&this[_0x18f63d(0xd0)][_0x18f63d(0xda)](_0x53c38b,_0x411c31,_0x4ae032[_0x18f63d(0xcd)]);break;}case _0xe356de[_0x18f63d(0xb5)]:{this[_0x18f63d(0xd0)][_0x18f63d(0xc0)](_0x53c38b,_0x411c31,{'commentId':_0x4ae032[_0x18f63d(0xcd)],'text':JSON['parse'](_0x4ae032[_0x18f63d(0xb1)])});break;}case _0xe356de[_0x18f63d(0xf0)]:{const _0x1ec080=(_0xef84ac=this[_0x18f63d(0xd0)]['getUnit'](_0x4ae032[_0x18f63d(0x10d)])[_0x18f63d(0xfb)](_0x4f508=>_0x4f508[_0x18f63d(0x10c)]===_0x4ae032[_0x18f63d(0x10c)]))==null?void 0x0:_0xef84ac[_0x18f63d(0x105)];_0x1ec080&&this['_threadCommentModel']['resolveComment'](_0x53c38b,_0x411c31,_0x1ec080['id'],_0x4ae032['solved']===_0x1860ff[_0x18f63d(0xd4)]);break;}}}));}};_0x52b79c=_0x13696c([_0x56da1b(0x0,_0x3064f5[_0x1ce235(0x106)](_0x56cc7c[_0x1ce235(0xf4)])),_0x56da1b(0x1,_0x3064f5[_0x1ce235(0x106)](_0x5efcbf['ThreadCommentModel'])),_0x56da1b(0x2,_0x3064f5[_0x1ce235(0x106)](_0x3064f5['UserManagerService'])),_0x56da1b(0x3,_0x3064f5[_0x1ce235(0x106)](_0x3064f5[_0x1ce235(0x101)]))],_0x52b79c);const _0x3061b0='thread-comment-data-source.config',_0x3fda5b={};var _0x14b761=Object['getOwnPropertyDescriptor'],_0x39a6fa=(_0x541633,_0x44030d,_0x52b18d,_0x22aa2d)=>{const _0x2aca3=_0x1ce235;for(var _0x57da34=_0x22aa2d>0x1?void 0x0:_0x22aa2d?_0x14b761(_0x44030d,_0x52b18d):_0x44030d,_0x1f429b=_0x541633[_0x2aca3(0xe0)]-0x1,_0x16fa47;_0x1f429b>=0x0;_0x1f429b--)(_0x16fa47=_0x541633[_0x1f429b])&&(_0x57da34=_0x16fa47(_0x57da34)||_0x57da34);return _0x57da34;},_0x32903c=(_0x3a9a23,_0x30a704)=>(_0x70d076,_0x56f57c)=>_0x30a704(_0x70d076,_0x56f57c,_0x3a9a23);function _0x8d3d13(_0x50d5bf,_0x4be0d9){const _0x23697f=_0x1ce235,_0x4f61b0=_0x50d5bf['replies'][0x0];return{..._0x4be0d9,'id':_0x4f61b0[_0x23697f(0xcd)],'resolved':_0x50d5bf[_0x23697f(0x116)]===0x1,'dT':_0xd800f7(_0x4f61b0[_0x23697f(0x107)]),'personId':_0x4f61b0[_0x23697f(0xfd)],'threadId':_0x4f61b0[_0x23697f(0x10c)]};}function _0x1552cd(_0x2097a3,_0x3f507c,_0x154396){const _0x2243a9=_0x1ce235;var _0x18ec45,_0x1d21d9;if(((_0x1d21d9=(_0x18ec45=_0x2097a3==null?void 0x0:_0x2097a3['replies'])==null?void 0x0:_0x18ec45[_0x2243a9(0xe0)])!=null?_0x1d21d9:0x0)>0x0){const _0x31c71c=(_0x2ae71c,_0x21ef60)=>({'id':_0x2ae71c[_0x2243a9(0xcd)],'threadId':_0x2ae71c[_0x2243a9(0x10c)],'dT':_0xd800f7(_0x2ae71c[_0x2243a9(0x107)]),'personId':_0x2ae71c[_0x2243a9(0xfd)],'resolved':_0x2097a3[_0x2243a9(0x116)]===_0x1860ff[_0x2243a9(0xd4)],'unitId':_0x3f507c,'subUnitId':_0x154396,'text':JSON[_0x2243a9(0x110)](_0x2ae71c[_0x2243a9(0xb1)]),'parentId':_0x21ef60}),_0x3b9050=_0x31c71c(_0x2097a3['replies'][0x0]);return{..._0x3b9050,'children':_0x2097a3[_0x2243a9(0x10b)][_0x2243a9(0xbe)](0x1)[_0x2243a9(0xa6)](_0x192f55=>_0x31c71c(_0x192f55,_0x3b9050['id']))};}return null;}let _0x52bed4=class{constructor(_0x57b09e,_0x4f3477,_0x226a05,_0x525842){const _0xed05ea=_0x1ce235;this[_0xed05ea(0xf7)]=_0x57b09e,this['_userService']=_0x4f3477,this[_0xed05ea(0xbc)]=_0x226a05,this[_0xed05ea(0xe9)]=_0x525842;}async['addComment'](_0x32248e){const _0x13bfa9=_0x1ce235;var _0xf631fd,_0x5d2ea3;const {parentId:_0x237ebd,unitId:_0x1ffe39,text:_0x138e5d,threadId:_0x4447b5}=_0x32248e,_0x101e5f=(_0x5d2ea3=(_0xf631fd=_0x138e5d[_0x13bfa9(0xdb)])==null?void 0x0:_0xf631fd[_0x13bfa9(0x9f)](_0x3102e3=>_0x3102e3['rangeType']===_0x3064f5[_0x13bfa9(0xaa)]['COMMENT'])[_0x13bfa9(0xa6)](_0xcd961f=>_0xcd961f[_0x13bfa9(0xcb)]))!=null?_0x5d2ea3:[],_0x37b213=JSON['stringify'](_0x138e5d),_0x1a1688=(await this[_0x13bfa9(0xbc)][_0x13bfa9(0x9d)](_0x1ffe39))[_0x13bfa9(0xd5)]();if(_0x237ebd){const _0x1e7b7c={'memberId':_0x1a1688,'unitId':_0x1ffe39,'content':_0x37b213,'mention':_0x101e5f,'threadId':_0x4447b5},_0x4b9852=(await this[_0x13bfa9(0xf7)]['post'](_0x13bfa9(0xbf)+_0x1ffe39+'/reply',{'body':_0x1e7b7c}))['body']['reply'];return{..._0x32248e,'id':_0x4b9852[_0x13bfa9(0xcd)],'dT':_0x3064f5['dayjs'](+_0x4b9852[_0x13bfa9(0x107)])[_0x13bfa9(0xa8)](_0x13bfa9(0xc6)),'personId':_0x4b9852[_0x13bfa9(0xfd)]};}else{const _0x2ac222={'memberId':_0x1a1688,'unitId':_0x1ffe39,'content':_0x37b213,'mention':_0x101e5f},_0x4f3150=await this[_0x13bfa9(0xf7)][_0x13bfa9(0x118)]('/universer-api/comment/unit/'+_0x1ffe39+_0x13bfa9(0x111),{'body':_0x2ac222});return _0x8d3d13(_0x4f3150[_0x13bfa9(0x103)][_0x13bfa9(0x9b)],_0x32248e);}}async[_0x1ce235(0xc0)](_0x1040c5){const _0x5e654d=_0x1ce235;var _0x205422,_0x87b5eb;const {text:_0x8eea5b,unitId:_0x13af5a}=_0x1040c5,_0x5aa54b=(_0x87b5eb=(_0x205422=_0x8eea5b['customRanges'])==null?void 0x0:_0x205422[_0x5e654d(0x9f)](_0x159354=>_0x159354['rangeType']===_0x3064f5[_0x5e654d(0xaa)]['COMMENT'])[_0x5e654d(0xa6)](_0x2f2261=>_0x2f2261[_0x5e654d(0xcb)]))!=null?_0x87b5eb:[],_0x8da19d=JSON[_0x5e654d(0xd6)](_0x8eea5b),_0xf086d1=_0x1040c5['threadId'],_0x444736=_0x1040c5['id'],_0x3ac2cf={'memberId':(await this[_0x5e654d(0xbc)][_0x5e654d(0x9d)](_0x13af5a))[_0x5e654d(0xd5)](),'unitId':_0x13af5a,'threadId':_0xf086d1,'mention':_0x5aa54b,'content':_0x8da19d,'replyId':_0x444736},_0x5b2031=await this[_0x5e654d(0xf7)]['post'](_0x5e654d(0xbf)+_0x13af5a+_0x5e654d(0xca),{'body':_0x3ac2cf});return!_0x5b2031[_0x5e654d(0x103)]['error']||_0x5b2031['body']['error'][_0x5e654d(0xd8)]===0x1;}async['resolveComment'](_0x33e791){const _0x5dd20a=_0x1ce235,{unitId:_0x22a35e}=_0x33e791,_0x2f81b6=_0x33e791[_0x5dd20a(0x10c)],_0x2b3de1={'memberId':this[_0x5dd20a(0xe8)][_0x5dd20a(0xb6)]()[_0x5dd20a(0x119)],'unitId':_0x22a35e,'threadId':_0x2f81b6,'solved':_0x33e791['resolved']?_0x1860ff[_0x5dd20a(0xd4)]:_0x1860ff[_0x5dd20a(0xed)]},_0x308327=await this['_httpService'][_0x5dd20a(0x118)]('/universer-api/comment/unit/'+_0x22a35e+_0x5dd20a(0x100),{'body':_0x2b3de1});return!_0x308327[_0x5dd20a(0x103)][_0x5dd20a(0xd9)]||_0x308327[_0x5dd20a(0x103)][_0x5dd20a(0xd9)]['code']===0x1;}async[_0x1ce235(0xda)](_0x237e2d,_0x35232c,_0x58262f,_0x3b802f){const _0x4338eb=_0x1ce235,_0x3083cf={'memberId':(await this['_sessionService'][_0x4338eb(0x9d)](_0x237e2d))[_0x4338eb(0xd5)](),'threadId':_0x58262f,'replyId':_0x3b802f,'unitId':_0x237e2d},_0x5b1f81=await this[_0x4338eb(0xf7)][_0x4338eb(0x118)](_0x4338eb(0xbf)+_0x237e2d+_0x4338eb(0xf6),{'body':_0x3083cf});return!_0x5b1f81['body'][_0x4338eb(0xd9)]||_0x5b1f81[_0x4338eb(0x103)][_0x4338eb(0xd9)][_0x4338eb(0xd8)]===0x1;}async[_0x1ce235(0xd3)](_0x4c88ef,_0x4a9045,_0x33dbfc){const _0xba3a17=_0x1ce235,_0x5725bc={'unitId':_0x4c88ef,'threadId':_0x33dbfc},_0x362034=await this[_0xba3a17(0xf7)]['post'](_0xba3a17(0xbf)+_0x4c88ef+_0xba3a17(0xc4),{'body':_0x5725bc}),_0x1f389f=_0x33dbfc['map'](_0x3d01cb=>_0x1552cd(_0x362034[_0xba3a17(0x103)][_0xba3a17(0x99)][_0x3d01cb],_0x4c88ef,_0x4a9045))[_0xba3a17(0x9f)](Boolean);return Object[_0xba3a17(0xba)](_0x362034['body'][_0xba3a17(0xeb)])[_0xba3a17(0xaf)](_0x2568d6=>{const _0x4bde95=_0xba3a17;this[_0x4bde95(0xe8)][_0x4bde95(0x104)](_0x2568d6);}),_0x1f389f;}[_0x1ce235(0xc5)](_0x563423){const _0x379407=_0x1ce235;return{'id':_0x563423['id'],'threadId':_0x563423[_0x379407(0x10c)],'ref':_0x563423[_0x379407(0x10f)]};}};_0x52bed4=_0x39a6fa([_0x32903c(0x0,_0x3064f5[_0x1ce235(0x106)](_0x60811d[_0x1ce235(0xd7)])),_0x32903c(0x1,_0x3064f5[_0x1ce235(0x106)](_0x3064f5[_0x1ce235(0xc7)])),_0x32903c(0x2,_0x3064f5[_0x1ce235(0x106)](_0x56cc7c['CollaborationSessionService'])),_0x32903c(0x3,_0x3064f5[_0x1ce235(0x106)](_0x3064f5[_0x1ce235(0x101)]))],_0x52bed4);var _0xb9a9ce=Object[_0x1ce235(0xf8)],_0x2847d1=(_0x33a684,_0x313559,_0x4d6b35,_0x3d7a2b)=>{const _0x22c79a=_0x1ce235;for(var _0x4438de=_0x3d7a2b>0x1?void 0x0:_0x3d7a2b?_0xb9a9ce(_0x313559,_0x4d6b35):_0x313559,_0x14a090=_0x33a684[_0x22c79a(0xe0)]-0x1,_0x30d402;_0x14a090>=0x0;_0x14a090--)(_0x30d402=_0x33a684[_0x14a090])&&(_0x4438de=_0x30d402(_0x4438de)||_0x4438de);return _0x4438de;},_0x2b1209=(_0x242c51,_0x1308da)=>(_0x10c207,_0x5dcf64)=>_0x1308da(_0x10c207,_0x5dcf64,_0x242c51);let _0x39bb2f=class extends _0x3064f5[_0x1ce235(0xb8)]{constructor(_0xbc76e1,_0x13d6bb){const _0x2c6d3d=_0x1ce235;super(),this[_0x2c6d3d(0xf3)]=_0xbc76e1,this['_threadCommentDataSource']=_0x13d6bb,this['_initDataSource']();}[_0x1ce235(0xf2)](){const _0x1a07da=_0x1ce235;this[_0x1a07da(0xf3)][_0x1a07da(0xb3)]=this[_0x1a07da(0xc3)],this[_0x1a07da(0xf3)][_0x1a07da(0xde)]=!0x1;}};_0x39bb2f=_0x2847d1([_0x2b1209(0x0,_0x5efcbf[_0x1ce235(0xfa)]),_0x2b1209(0x1,_0x3064f5[_0x1ce235(0x106)](_0x52bed4))],_0x39bb2f);var _0x32e35b=Object[_0x1ce235(0xdf)],_0x45c325=Object[_0x1ce235(0xf8)],_0x290cd8=(_0x1feb7f,_0x114c41,_0x1c56eb)=>_0x114c41 in _0x1feb7f?_0x32e35b(_0x1feb7f,_0x114c41,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1c56eb}):_0x1feb7f[_0x114c41]=_0x1c56eb,_0x22f307=(_0x1cf3ed,_0x3d5622,_0x70c47e,_0x1982b5)=>{for(var _0xa1ef8d=_0x1982b5>0x1?void 0x0:_0x1982b5?_0x45c325(_0x3d5622,_0x70c47e):_0x3d5622,_0x4c80fa=_0x1cf3ed['length']-0x1,_0x59b884;_0x4c80fa>=0x0;_0x4c80fa--)(_0x59b884=_0x1cf3ed[_0x4c80fa])&&(_0xa1ef8d=_0x59b884(_0xa1ef8d)||_0xa1ef8d);return _0xa1ef8d;},_0x242ff4=(_0x42731e,_0x526763)=>(_0x268967,_0x5bdb9d)=>_0x526763(_0x268967,_0x5bdb9d,_0x42731e),_0x39b7c4=(_0x5bd678,_0x183a53,_0x2a2690)=>_0x290cd8(_0x5bd678,typeof _0x183a53!=_0x1ce235(0xcf)?_0x183a53+'':_0x183a53,_0x2a2690);_0x545edf['UniverThreadCommentDataSourcePlugin']=class extends _0x3064f5['Plugin']{constructor(_0x5efa4b=_0x3fda5b,_0x316a84,_0x537687){const _0x5f1d5f=_0x1ce235;super(),this['_config']=_0x5efa4b,this[_0x5f1d5f(0xe9)]=_0x316a84,this[_0x5f1d5f(0xd1)]=_0x537687;const {..._0x282142}=_0x3064f5[_0x5f1d5f(0xff)]({},_0x3fda5b,this[_0x5f1d5f(0xdd)]);this['_configService'][_0x5f1d5f(0x112)](_0x3061b0,_0x282142);}['onStarting'](){[[_0x52bed4],[_0x39bb2f],[_0x52b79c]]['forEach'](_0x287cce=>{const _0x495a8f=_0x2a9b;this[_0x495a8f(0xe9)][_0x495a8f(0xf1)](_0x287cce);});}['onReady'](){const _0x14316a=_0x1ce235;this[_0x14316a(0xe9)][_0x14316a(0xc2)](_0x39bb2f),this[_0x14316a(0xe9)][_0x14316a(0xc2)](_0x52b79c);}},_0x39b7c4(_0x545edf[_0x1ce235(0x117)],_0x1ce235(0xa5),_0x62f104),_0x39b7c4(_0x545edf[_0x1ce235(0x117)],'type',_0x3064f5[_0x1ce235(0xa4)]['UNIVER_UNKNOWN']),_0x545edf[_0x1ce235(0x117)]=_0x22f307([_0x3064f5[_0x1ce235(0x10e)](_0x5cf2d3[_0x1ce235(0x109)],_0x56cc7c['UniverCollaborationClientPlugin'],_0x336a84[_0x1ce235(0xa0)]),_0x242ff4(0x1,_0x3064f5['Inject'](_0x3064f5['Injector'])),_0x242ff4(0x2,_0x3064f5[_0x1ce235(0xc1)])],_0x545edf['UniverThreadCommentDataSourcePlugin']),Object[_0x1ce235(0xdf)](_0x545edf,Symbol['toStringTag'],{'value':_0x1ce235(0xe1)});}));function _0x2a9b(_0x34d043,_0x501a18){const _0x1e90fb=_0x1e90();return _0x2a9b=function(_0x2a9bee,_0x5ec0c0){_0x2a9bee=_0x2a9bee-0x98;let _0x2f754b=_0x1e90fb[_0x2a9bee];return _0x2f754b;},_0x2a9b(_0x34d043,_0x501a18);}function _0x1e90(){const _0x35ce4b=['pluginName','map','object','format','exports','CustomRangeType','UniverProCollaborationClient','Delete','@univerjs-pro/license','type','forEach','parentId','content','3CMlhbm','dataSource','99305vXSODl','Edit','getCurrentUser','528635RAoFMh','Disposable','_init','values','user','_sessionService','987111ATcNzh','slice','/universer-api/comment/unit/','updateComment','IConfigService','get','_threadCommentDataSource','/list','saveCommentToSnapshot','YYYY/MM/DD\x20HH:mm','UserManagerService','UniverNetwork','UniverProLicense','/edit','rangeId','_commentService','replyId','UNRECOGNIZED','symbol','_threadCommentModel','_configService','Add','listComments','Solved','getMemberID','stringify','HTTPService','code','error','deleteComment','customRanges','rxjs','_config','syncUpdateMutationToColla','defineProperty','length','Module','680EtgQoh','Unknown','_initUserSync','@univerjs/core','subscribe','size','_userService','_injector','32QngJqW','users','1345286ZoBJGQ','OpenOrReOpen','539JgZonf','delete','Solve','add','_initDataSource','_threadCommentDataSourceService','CommentService','commentUpdate$','/delete','_httpService','getOwnPropertyDescriptor','Reply','IThreadCommentDataSourceService','find','UniverProThreadCommentDatasource','userId','pipe','merge','/solved','Injector','amd','body','addUser','root','Inject','createTimestamp','getUnit','UniverThreadCommentUIPlugin','11704044NIECvv','replies','threadId','unitId','DependentOn','ref','parse','/add','setConfig','addComment','personId','46572lAmrAo','solved','UniverThreadCommentDataSourcePlugin','post','userID','116Qoekma','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comment','@univerjs/thread-comment-ui','requireSession','/universer-api/user/list','filter','UniverLicensePlugin','payload','86669jlFObI','getComment','UniverInstanceType'];_0x1e90=function(){return _0x35ce4b;};return _0x1e90();}
1
+ function _0xac8b(_0x349f53,_0x1b7620){const _0x210c8d=_0x210c();return _0xac8b=function(_0xac8bb9,_0x4e2e7b){_0xac8bb9=_0xac8bb9-0xa4;let _0x235519=_0x210c8d[_0xac8bb9];return _0x235519;},_0xac8b(_0x349f53,_0x1b7620);}(function(_0x38003a,_0x17c3e0){const _0x5ed62e=_0xac8b,_0x231e73=_0x38003a();while(!![]){try{const _0x3e5fc9=parseInt(_0x5ed62e(0x11f))/0x1*(parseInt(_0x5ed62e(0xd8))/0x2)+parseInt(_0x5ed62e(0xcf))/0x3+parseInt(_0x5ed62e(0xd0))/0x4*(parseInt(_0x5ed62e(0xc2))/0x5)+-parseInt(_0x5ed62e(0xe5))/0x6+-parseInt(_0x5ed62e(0xbd))/0x7*(-parseInt(_0x5ed62e(0xb4))/0x8)+-parseInt(_0x5ed62e(0xe3))/0x9*(parseInt(_0x5ed62e(0xf7))/0xa)+-parseInt(_0x5ed62e(0x103))/0xb;if(_0x3e5fc9===_0x17c3e0)break;else _0x231e73['push'](_0x231e73['shift']());}catch(_0xb42b70){_0x231e73['push'](_0x231e73['shift']());}}}(_0x210c,0x78ea9),function(_0x472981,_0x10d18d){const _0x24b9d0=_0xac8b;typeof exports==_0x24b9d0(0xbf)&&typeof module<'u'?_0x10d18d(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=='function'&&define[_0x24b9d0(0x116)]?define([_0x24b9d0(0xda),_0x24b9d0(0x122),_0x24b9d0(0xe4),_0x24b9d0(0xa9),_0x24b9d0(0xba),'@univerjs/thread-comment',_0x24b9d0(0xd5),_0x24b9d0(0xd7)],_0x10d18d):(_0x472981=typeof globalThis<'u'?globalThis:_0x472981||self,_0x10d18d(_0x472981[_0x24b9d0(0xc1)]={},_0x472981[_0x24b9d0(0xdb)],_0x472981[_0x24b9d0(0xa8)],_0x472981['UniverCore'],_0x472981[_0x24b9d0(0x110)],_0x472981[_0x24b9d0(0xb9)],_0x472981[_0x24b9d0(0xd5)],_0x472981[_0x24b9d0(0x121)]));}(this,function(_0x3f28f9,_0x464d37,_0x3841b4,_0x4175d3,_0x14644c,_0x391618,_0x399f04,_0x3c568e){'use strict';const _0x3e564b=_0xac8b;const _0x3eb321=_0x3e564b(0x10e);var _0x58b7cb=(_0x3b7cf9=>(_0x3b7cf9[_0x3b7cf9[_0x3e564b(0xe7)]=0x0]='OpenOrReOpen',_0x3b7cf9[_0x3b7cf9[_0x3e564b(0xf5)]=0x1]='Solved',_0x3b7cf9[_0x3b7cf9[_0x3e564b(0xe0)]=-0x1]='UNRECOGNIZED',_0x3b7cf9))(_0x58b7cb||{}),_0x3503fc=(_0x506305=>(_0x506305[_0x506305[_0x3e564b(0x120)]=0x0]=_0x3e564b(0x120),_0x506305[_0x506305[_0x3e564b(0xc9)]=0x1]=_0x3e564b(0xc9),_0x506305[_0x506305['Reply']=0x2]=_0x3e564b(0xd4),_0x506305[_0x506305[_0x3e564b(0xbc)]=0x3]=_0x3e564b(0xbc),_0x506305[_0x506305[_0x3e564b(0xff)]=0x4]=_0x3e564b(0xff),_0x506305[_0x506305[_0x3e564b(0xf1)]=0x5]=_0x3e564b(0xf1),_0x506305[_0x506305[_0x3e564b(0xe0)]=-0x1]='UNRECOGNIZED',_0x506305))(_0x3503fc||{});const _0x658574=_0x3819c9=>_0x4175d3[_0x3e564b(0x109)](new Date(+_0x3819c9))['format']('YYYY/MM/DD\x20HH:mm'),_0x3ecf13=async(_0x4f5c70,_0x3b711f)=>{const _0x2d7db1=_0x3e564b,_0x5c4c6e=_0x4f5c70[_0x2d7db1(0x10f)](_0x4175d3[_0x2d7db1(0x10a)]),_0x540302=_0x4f5c70['get'](_0x3c568e[_0x2d7db1(0xcd)]);_0x3b711f[_0x2d7db1(0xcc)](_0xfbe496=>{const _0x4347a0=_0x2d7db1;_0x5c4c6e[_0x4347a0(0x119)](_0xfbe496)&&_0x3b711f[_0x4347a0(0xf0)](_0xfbe496);}),_0x3b711f[_0x2d7db1(0x11e)]&&(await _0x540302[_0x2d7db1(0x10f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3b711f]}}))[_0x2d7db1(0xd2)]['users'][_0x2d7db1(0xcc)](_0x35314e=>{const _0x1dc96a=_0x2d7db1;_0x35314e&&_0x5c4c6e[_0x1dc96a(0xfb)](_0x35314e);});};var _0x47a7c6=Object[_0x3e564b(0xc8)],_0x2cd025=(_0x90ba7d,_0x564a02,_0x5d5e0c,_0x2eb20e)=>{const _0x28d1a6=_0x3e564b;for(var _0x35cd4c=_0x2eb20e>0x1?void 0x0:_0x2eb20e?_0x47a7c6(_0x564a02,_0x5d5e0c):_0x564a02,_0x362b74=_0x90ba7d[_0x28d1a6(0xc7)]-0x1,_0x5ca26b;_0x362b74>=0x0;_0x362b74--)(_0x5ca26b=_0x90ba7d[_0x362b74])&&(_0x35cd4c=_0x5ca26b(_0x35cd4c)||_0x35cd4c);return _0x35cd4c;},_0x52f777=(_0x3a51d2,_0x5527f1)=>(_0x1537b4,_0x105b2c)=>_0x5527f1(_0x1537b4,_0x105b2c,_0x3a51d2);let _0x96850c=class extends _0x4175d3[_0x3e564b(0x124)]{constructor(_0x20d0f9,_0x287d0b,_0x32c68d,_0x36ff36){const _0x2e2b96=_0x3e564b;super(),this[_0x2e2b96(0xf9)]=_0x20d0f9,this['_threadCommentModel']=_0x287d0b,this[_0x2e2b96(0xdc)]=_0x32c68d,this[_0x2e2b96(0xdd)]=_0x36ff36,this['_init'](),this[_0x2e2b96(0x108)]();}['_initUserSync'](){const _0x36c5c6=_0x3e564b;this['disposeWithMe'](this['_threadCommentModel'][_0x36c5c6(0xf3)][_0x36c5c6(0xab)](_0x399f04[_0x36c5c6(0x101)](0x10))[_0x36c5c6(0x11a)](_0x2c3fcc=>{const _0x595183=_0x36c5c6,_0x5d52f2=new Set();_0x2c3fcc[_0x595183(0xcc)](_0x268d27=>{const _0x3fd078=_0x595183;switch(_0x268d27[_0x3fd078(0x115)]){case _0x3fd078(0xa5):{const _0x556f0a=_0x268d27[_0x3fd078(0xaf)][_0x3fd078(0xfa)];_0x5d52f2[_0x3fd078(0xa5)](_0x556f0a);break;}}}),_0x3ecf13(this[_0x595183(0xdd)],_0x5d52f2);}));}[_0x3e564b(0xec)](){const _0x29fdf2=_0x3e564b;this[_0x29fdf2(0x10c)](this[_0x29fdf2(0xf9)]['commentUpdate$'][_0x29fdf2(0x11a)](async _0x5a13c6=>{const _0x5c4bb2=_0x29fdf2;var _0x5b570e,_0x4a6f68,_0x3e6bf4,_0x25353c;const _0x131a71=(_0x5b570e=this[_0x5c4bb2(0xae)]['getUnit'](_0x5a13c6[_0x5c4bb2(0xa6)])[_0x5c4bb2(0xb7)](_0x85e900=>_0x85e900[_0x5c4bb2(0xf8)]===_0x5a13c6[_0x5c4bb2(0xf8)]))==null?void 0x0:_0x5b570e[_0x5c4bb2(0xad)];if(!_0x131a71)return;const {unitId:_0x9f94a6,subUnitId:_0x21bc47}=_0x131a71;switch(_0x5a13c6[_0x5c4bb2(0xf6)]&&this['_userService']['addUser'](_0x5a13c6[_0x5c4bb2(0xf6)]),_0x5a13c6[_0x5c4bb2(0x115)]){case _0x3503fc[_0x5c4bb2(0xc9)]:break;case _0x3503fc[_0x5c4bb2(0xd4)]:{this[_0x5c4bb2(0xae)][_0x5c4bb2(0x104)](_0x9f94a6,_0x21bc47,{'unitId':_0x9f94a6,'subUnitId':_0x21bc47,'ref':'','id':_0x5a13c6[_0x5c4bb2(0xce)],'dT':_0x658574(+_0x5a13c6[_0x5c4bb2(0xd9)]),'threadId':_0x5a13c6[_0x5c4bb2(0xf8)],'personId':(_0x3e6bf4=(_0x4a6f68=_0x5a13c6['user'])==null?void 0x0:_0x4a6f68[_0x5c4bb2(0x10b)])!=null?_0x3e6bf4:_0x5a13c6[_0x5c4bb2(0x11c)],'text':JSON[_0x5c4bb2(0xc5)](_0x5a13c6[_0x5c4bb2(0x118)]),'parentId':_0x131a71['id']});break;}case _0x3503fc[_0x5c4bb2(0xff)]:{const _0x259ad8=this[_0x5c4bb2(0xae)]['getComment'](_0x9f94a6,_0x21bc47,_0x5a13c6['replyId']);_0x259ad8&&_0x259ad8[_0x5c4bb2(0x11b)]&&this[_0x5c4bb2(0xae)]['deleteComment'](_0x9f94a6,_0x21bc47,_0x5a13c6[_0x5c4bb2(0xce)]);break;}case _0x3503fc['Edit']:{this[_0x5c4bb2(0xae)][_0x5c4bb2(0xd6)](_0x9f94a6,_0x21bc47,{'commentId':_0x5a13c6[_0x5c4bb2(0xce)],'text':JSON['parse'](_0x5a13c6[_0x5c4bb2(0x118)])});break;}case _0x3503fc['Solve']:{const _0x34e606=(_0x25353c=this[_0x5c4bb2(0xae)][_0x5c4bb2(0xb1)](_0x5a13c6[_0x5c4bb2(0xa6)])[_0x5c4bb2(0xb7)](_0x2afe88=>_0x2afe88[_0x5c4bb2(0xf8)]===_0x5a13c6[_0x5c4bb2(0xf8)]))==null?void 0x0:_0x25353c[_0x5c4bb2(0xad)];_0x34e606&&this[_0x5c4bb2(0xae)][_0x5c4bb2(0xcb)](_0x9f94a6,_0x21bc47,_0x34e606['id'],_0x5a13c6[_0x5c4bb2(0xfe)]===_0x58b7cb[_0x5c4bb2(0xf5)]);break;}}}));}};_0x96850c=_0x2cd025([_0x52f777(0x0,_0x4175d3[_0x3e564b(0xca)](_0x464d37[_0x3e564b(0xe8)])),_0x52f777(0x1,_0x4175d3[_0x3e564b(0xca)](_0x391618[_0x3e564b(0xea)])),_0x52f777(0x2,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x10a)])),_0x52f777(0x3,_0x4175d3['Inject'](_0x4175d3[_0x3e564b(0x113)]))],_0x96850c);const _0x7b069a='thread-comment-data-source.config',_0x4dbde8={};var _0x467f3a=Object[_0x3e564b(0xc8)],_0x287e6a=(_0xcf2adb,_0x3ee68e,_0x41a483,_0x5d5741)=>{for(var _0x30e891=_0x5d5741>0x1?void 0x0:_0x5d5741?_0x467f3a(_0x3ee68e,_0x41a483):_0x3ee68e,_0x52e78e=_0xcf2adb['length']-0x1,_0x3824a7;_0x52e78e>=0x0;_0x52e78e--)(_0x3824a7=_0xcf2adb[_0x52e78e])&&(_0x30e891=_0x3824a7(_0x30e891)||_0x30e891);return _0x30e891;},_0x46a99e=(_0x222e6d,_0x5a5a22)=>(_0x32f9ae,_0x2e5302)=>_0x5a5a22(_0x32f9ae,_0x2e5302,_0x222e6d);function _0x1fe52e(_0x302cd0,_0x4c4c81){const _0x7e5952=_0x3e564b,_0x3ba1de=_0x302cd0['replies'][0x0];return{..._0x4c4c81,'id':_0x3ba1de['replyId'],'resolved':_0x302cd0[_0x7e5952(0xfe)]===0x1,'dT':_0x658574(_0x3ba1de[_0x7e5952(0xd9)]),'personId':_0x3ba1de['userId'],'threadId':_0x3ba1de[_0x7e5952(0xf8)]};}function _0x22ae1d(_0x2a93d1,_0x2129dd,_0x35f1ce){const _0x17a96a=_0x3e564b;var _0x9be277,_0xc8a0fc;if(((_0xc8a0fc=(_0x9be277=_0x2a93d1==null?void 0x0:_0x2a93d1['replies'])==null?void 0x0:_0x9be277[_0x17a96a(0xc7)])!=null?_0xc8a0fc:0x0)>0x0){const _0x3ff6e4=(_0xe02805,_0x40a35c)=>({'id':_0xe02805['replyId'],'threadId':_0xe02805[_0x17a96a(0xf8)],'dT':_0x658574(_0xe02805[_0x17a96a(0xd9)]),'personId':_0xe02805[_0x17a96a(0x11c)],'resolved':_0x2a93d1[_0x17a96a(0xfe)]===_0x58b7cb[_0x17a96a(0xf5)],'unitId':_0x2129dd,'subUnitId':_0x35f1ce,'text':JSON['parse'](_0xe02805[_0x17a96a(0x118)]),'parentId':_0x40a35c}),_0xd27222=_0x3ff6e4(_0x2a93d1[_0x17a96a(0x10d)][0x0]);return{..._0xd27222,'children':_0x2a93d1[_0x17a96a(0x10d)][_0x17a96a(0x106)](0x1)[_0x17a96a(0xb8)](_0x2db525=>_0x3ff6e4(_0x2db525,_0xd27222['id']))};}return null;}let _0x369bbe=class{constructor(_0x46a5b0,_0x42e198,_0x2c2bab,_0x411807){const _0x3080ff=_0x3e564b;this[_0x3080ff(0xde)]=_0x46a5b0,this[_0x3080ff(0xdc)]=_0x42e198,this[_0x3080ff(0x100)]=_0x2c2bab,this[_0x3080ff(0xdd)]=_0x411807;}async[_0x3e564b(0x104)](_0x51c8fe){const _0x3e00c5=_0x3e564b;var _0x227dd3,_0x38417a;const {parentId:_0x249894,unitId:_0xe80e5a,text:_0x3dfb2b,threadId:_0x42adc3}=_0x51c8fe,_0x1904a4=(_0x38417a=(_0x227dd3=_0x3dfb2b['customRanges'])==null?void 0x0:_0x227dd3[_0x3e00c5(0x111)](_0x1f54d0=>_0x1f54d0[_0x3e00c5(0xd1)]===_0x4175d3[_0x3e00c5(0x102)][_0x3e00c5(0x125)])[_0x3e00c5(0xb8)](_0x58aa17=>_0x58aa17[_0x3e00c5(0xfc)]))!=null?_0x38417a:[],_0x12bb57=JSON[_0x3e00c5(0x11d)](_0x3dfb2b),_0x233b85=(await this[_0x3e00c5(0x100)]['requireSession'](_0xe80e5a))[_0x3e00c5(0xe6)]();if(_0x249894){const _0x35f514={'memberId':_0x233b85,'unitId':_0xe80e5a,'content':_0x12bb57,'mention':_0x1904a4,'threadId':_0x42adc3},_0x36eb4b=(await this['_httpService'][_0x3e00c5(0xf4)]('/universer-api/comment/unit/'+_0xe80e5a+'/reply',{'body':_0x35f514}))['body']['reply'];return{..._0x51c8fe,'id':_0x36eb4b[_0x3e00c5(0xce)],'dT':_0x4175d3[_0x3e00c5(0x109)](+_0x36eb4b[_0x3e00c5(0xd9)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x36eb4b['userId']};}else{const _0x1d0074={'memberId':_0x233b85,'unitId':_0xe80e5a,'content':_0x12bb57,'mention':_0x1904a4},_0x4bc478=await this[_0x3e00c5(0xde)]['post'](_0x3e00c5(0xeb)+_0xe80e5a+_0x3e00c5(0xac),{'body':_0x1d0074});return _0x1fe52e(_0x4bc478['body']['comment'],_0x51c8fe);}}async[_0x3e564b(0xd6)](_0x244ca8){const _0x32d504=_0x3e564b;var _0x3aef65,_0x309d8b;const {text:_0x24f84e,unitId:_0x122036}=_0x244ca8,_0x136274=(_0x309d8b=(_0x3aef65=_0x24f84e['customRanges'])==null?void 0x0:_0x3aef65[_0x32d504(0x111)](_0x176e2b=>_0x176e2b[_0x32d504(0xd1)]===_0x4175d3[_0x32d504(0x102)]['COMMENT'])['map'](_0x20881b=>_0x20881b[_0x32d504(0xfc)]))!=null?_0x309d8b:[],_0x436414=JSON[_0x32d504(0x11d)](_0x24f84e),_0x821e43=_0x244ca8[_0x32d504(0xf8)],_0x171a8a=_0x244ca8['id'],_0x40fe34={'memberId':(await this['_sessionService'][_0x32d504(0x117)](_0x122036))[_0x32d504(0xe6)](),'unitId':_0x122036,'threadId':_0x821e43,'mention':_0x136274,'content':_0x436414,'replyId':_0x171a8a},_0x1f8d4f=await this[_0x32d504(0xde)][_0x32d504(0xf4)](_0x32d504(0xeb)+_0x122036+_0x32d504(0xe1),{'body':_0x40fe34});return!_0x1f8d4f[_0x32d504(0xd2)]['error']||_0x1f8d4f[_0x32d504(0xd2)][_0x32d504(0xc6)][_0x32d504(0xb5)]===0x1;}async[_0x3e564b(0xcb)](_0x5dfd00){const _0x3d360f=_0x3e564b,{unitId:_0x2ca0b6}=_0x5dfd00,_0x1a2cc4=_0x5dfd00[_0x3d360f(0xf8)],_0x4f80f1={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x2ca0b6,'threadId':_0x1a2cc4,'solved':_0x5dfd00['resolved']?_0x58b7cb[_0x3d360f(0xf5)]:_0x58b7cb[_0x3d360f(0xe7)]},_0x915efb=await this[_0x3d360f(0xde)][_0x3d360f(0xf4)](_0x3d360f(0xeb)+_0x2ca0b6+_0x3d360f(0xb0),{'body':_0x4f80f1});return!_0x915efb[_0x3d360f(0xd2)][_0x3d360f(0xc6)]||_0x915efb[_0x3d360f(0xd2)]['error'][_0x3d360f(0xb5)]===0x1;}async[_0x3e564b(0xd3)](_0x42d30a,_0x2d39af,_0x2b96ec,_0x4fdefd){const _0x86e240=_0x3e564b,_0x41cb9b={'memberId':(await this[_0x86e240(0x100)]['requireSession'](_0x42d30a))['getMemberID'](),'threadId':_0x2b96ec,'replyId':_0x4fdefd,'unitId':_0x42d30a},_0x29a43c=await this['_httpService'][_0x86e240(0xf4)](_0x86e240(0xeb)+_0x42d30a+_0x86e240(0xee),{'body':_0x41cb9b});return!_0x29a43c[_0x86e240(0xd2)][_0x86e240(0xc6)]||_0x29a43c[_0x86e240(0xd2)][_0x86e240(0xc6)][_0x86e240(0xb5)]===0x1;}async[_0x3e564b(0xed)](_0x395c90,_0x1d13a1,_0x70230e){const _0x1366cd=_0x3e564b,_0x13e976={'unitId':_0x395c90,'threadId':_0x70230e},_0x18e67c=await this['_httpService'][_0x1366cd(0xf4)]('/universer-api/comment/unit/'+_0x395c90+_0x1366cd(0xc0),{'body':_0x13e976}),_0x32f4da=_0x70230e[_0x1366cd(0xb8)](_0x595a0d=>_0x22ae1d(_0x18e67c[_0x1366cd(0xd2)]['comments'][_0x595a0d],_0x395c90,_0x1d13a1))['filter'](Boolean);return Object[_0x1366cd(0xc3)](_0x18e67c['body']['users'])[_0x1366cd(0xcc)](_0x682e37=>{const _0x1fb726=_0x1366cd;this['_userService'][_0x1fb726(0xfb)](_0x682e37);}),_0x32f4da;}[_0x3e564b(0xc4)](_0x47ae3c){const _0x1cb56e=_0x3e564b;return{'id':_0x47ae3c['id'],'threadId':_0x47ae3c['threadId'],'ref':_0x47ae3c[_0x1cb56e(0x114)]};}};_0x369bbe=_0x287e6a([_0x46a99e(0x0,_0x4175d3[_0x3e564b(0xca)](_0x3c568e[_0x3e564b(0xcd)])),_0x46a99e(0x1,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x10a)])),_0x46a99e(0x2,_0x4175d3[_0x3e564b(0xca)](_0x464d37['CollaborationSessionService'])),_0x46a99e(0x3,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x113)]))],_0x369bbe);var _0x2bc4de=Object[_0x3e564b(0xc8)],_0x371cfc=(_0x5a0b52,_0x26efad,_0x46baf9,_0x2e57e0)=>{const _0x156372=_0x3e564b;for(var _0x1e2c62=_0x2e57e0>0x1?void 0x0:_0x2e57e0?_0x2bc4de(_0x26efad,_0x46baf9):_0x26efad,_0x4708e9=_0x5a0b52[_0x156372(0xc7)]-0x1,_0x511da0;_0x4708e9>=0x0;_0x4708e9--)(_0x511da0=_0x5a0b52[_0x4708e9])&&(_0x1e2c62=_0x511da0(_0x1e2c62)||_0x1e2c62);return _0x1e2c62;},_0x95ec7b=(_0x240974,_0x366164)=>(_0x1a7414,_0x1c7fd7)=>_0x366164(_0x1a7414,_0x1c7fd7,_0x240974);let _0x360983=class extends _0x4175d3[_0x3e564b(0x124)]{constructor(_0x3d6a10,_0x1ff145){const _0x3f06eb=_0x3e564b;super(),this[_0x3f06eb(0xe9)]=_0x3d6a10,this[_0x3f06eb(0xbb)]=_0x1ff145,this[_0x3f06eb(0xa7)]();}[_0x3e564b(0xa7)](){const _0x16958f=_0x3e564b;this[_0x16958f(0xe9)]['dataSource']=this[_0x16958f(0xbb)],this[_0x16958f(0xe9)][_0x16958f(0x105)]=!0x1;}};_0x360983=_0x371cfc([_0x95ec7b(0x0,_0x391618['IThreadCommentDataSourceService']),_0x95ec7b(0x1,_0x4175d3[_0x3e564b(0xca)](_0x369bbe))],_0x360983);var _0x2a9408=Object[_0x3e564b(0x107)],_0x1361a4=Object[_0x3e564b(0xc8)],_0x4fb667=(_0x2d3bd2,_0x984f08,_0x2eceb6)=>_0x984f08 in _0x2d3bd2?_0x2a9408(_0x2d3bd2,_0x984f08,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2eceb6}):_0x2d3bd2[_0x984f08]=_0x2eceb6,_0x5055dc=(_0x1aa075,_0x1ee6c1,_0x3b7c90,_0x616a0b)=>{const _0x43b492=_0x3e564b;for(var _0x5a47cc=_0x616a0b>0x1?void 0x0:_0x616a0b?_0x1361a4(_0x1ee6c1,_0x3b7c90):_0x1ee6c1,_0x12ba76=_0x1aa075[_0x43b492(0xc7)]-0x1,_0x25bf1a;_0x12ba76>=0x0;_0x12ba76--)(_0x25bf1a=_0x1aa075[_0x12ba76])&&(_0x5a47cc=_0x25bf1a(_0x5a47cc)||_0x5a47cc);return _0x5a47cc;},_0x1f8e79=(_0x310d99,_0x59d82a)=>(_0x2c9bdc,_0x3cb947)=>_0x59d82a(_0x2c9bdc,_0x3cb947,_0x310d99),_0x593af9=(_0x578f18,_0x45fa19,_0x58abc8)=>_0x4fb667(_0x578f18,typeof _0x45fa19!='symbol'?_0x45fa19+'':_0x45fa19,_0x58abc8);_0x3f28f9[_0x3e564b(0xaa)]=class extends _0x4175d3[_0x3e564b(0xa4)]{constructor(_0x25447d=_0x4dbde8,_0x5d657a,_0x90cca0){const _0x778fd=_0x3e564b;super(),this[_0x778fd(0xbe)]=_0x25447d,this[_0x778fd(0xdd)]=_0x5d657a,this[_0x778fd(0xef)]=_0x90cca0;const {..._0x47ef4e}=_0x4175d3[_0x778fd(0xe2)]({},_0x4dbde8,this[_0x778fd(0xbe)]);this[_0x778fd(0xef)][_0x778fd(0xb2)](_0x7b069a,_0x47ef4e);}[_0x3e564b(0x123)](){const _0x5b5ef7=_0x3e564b;[[_0x369bbe],[_0x360983],[_0x96850c]][_0x5b5ef7(0xcc)](_0x456643=>{const _0x262ea1=_0x5b5ef7;this['_injector'][_0x262ea1(0xa5)](_0x456643);});}['onReady'](){const _0x4b108c=_0x3e564b;this[_0x4b108c(0xdd)][_0x4b108c(0x10f)](_0x360983),this[_0x4b108c(0xdd)][_0x4b108c(0x10f)](_0x96850c);}},_0x593af9(_0x3f28f9[_0x3e564b(0xaa)],_0x3e564b(0xb3),_0x3eb321),_0x593af9(_0x3f28f9['UniverThreadCommentDataSourcePlugin'],_0x3e564b(0x115),_0x4175d3[_0x3e564b(0xb6)]['UNIVER_UNKNOWN']),_0x3f28f9[_0x3e564b(0xaa)]=_0x5055dc([_0x4175d3['DependentOn'](_0x14644c['UniverThreadCommentUIPlugin'],_0x464d37[_0x3e564b(0xfd)],_0x3841b4[_0x3e564b(0xdf)]),_0x1f8e79(0x1,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x113)])),_0x1f8e79(0x2,_0x4175d3[_0x3e564b(0xf2)])],_0x3f28f9[_0x3e564b(0xaa)]),Object[_0x3e564b(0x107)](_0x3f28f9,Symbol[_0x3e564b(0x112)],{'value':'Module'});}));function _0x210c(){const _0x267a4a=['userId','stringify','size','1091MCqtuA','Unknown','UniverNetwork','@univerjs-pro/collaboration-client','onStarting','Disposable','COMMENT','Plugin','add','unitId','_initDataSource','UniverProLicense','@univerjs/core','UniverThreadCommentDataSourcePlugin','pipe','/add','root','_threadCommentModel','payload','/solved','getUnit','setConfig','pluginName','70664OmCdrq','code','UniverInstanceType','find','map','UniverThreadComment','@univerjs/thread-comment-ui','_threadCommentDataSource','Edit','7YUqZoz','_config','object','/list','UniverProThreadCommentDatasource','185buNbAc','values','saveCommentToSnapshot','parse','error','length','getOwnPropertyDescriptor','Add','Inject','resolveComment','forEach','HTTPService','replyId','2592711cDDvxi','31368VamJlx','rangeType','body','deleteComment','Reply','rxjs','updateComment','@univerjs/network','1074UZXkCH','createTimestamp','exports','UniverProCollaborationClient','_userService','_injector','_httpService','UniverLicensePlugin','UNRECOGNIZED','/edit','merge','162VtWLJt','@univerjs-pro/license','4738914HFaisk','getMemberID','OpenOrReOpen','CommentService','_threadCommentDataSourceService','ThreadCommentModel','/universer-api/comment/unit/','_init','listComments','/delete','_configService','delete','Solve','IConfigService','commentUpdate$','post','Solved','user','243670fLqxUZ','threadId','_commentService','personId','addUser','rangeId','UniverCollaborationClientPlugin','solved','Delete','_sessionService','bufferTime','CustomRangeType','279323UhsFrU','addComment','syncUpdateMutationToColla','slice','defineProperty','_initUserSync','dayjs','UserManagerService','userID','disposeWithMe','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','UniverThreadCommentUi','filter','toStringTag','Injector','ref','type','amd','requireSession','content','getUser','subscribe','parentId'];_0x210c=function(){return _0x267a4a;};return _0x210c();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.2-nightly.202507181608",
3
+ "version": "0.9.3",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.9.2-nightly.202507181608",
49
- "@univerjs-pro/license": "0.9.2-nightly.202507181608",
50
- "@univerjs/core": "0.9.2-nightly.202507181608",
51
- "@univerjs/network": "0.9.2-nightly.202507181608",
52
- "@univerjs/thread-comment": "0.9.2-nightly.202507181608",
48
+ "@univerjs-pro/collaboration-client": "0.9.3",
49
+ "@univerjs/core": "0.9.3",
50
+ "@univerjs/network": "0.9.3",
51
+ "@univerjs/thread-comment": "0.9.3",
53
52
  "@univerjs/protocol": "0.1.47-alpha.0",
54
- "@univerjs/thread-comment-ui": "0.9.2-nightly.202507181608"
53
+ "@univerjs/thread-comment-ui": "0.9.3",
54
+ "@univerjs-pro/license": "0.9.3"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^7.0.5",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.9.2"
61
+ "@univerjs-infra/shared": "0.9.3"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",