@univerjs-pro/thread-comment-datasource 0.9.2-nightly.202507181608 → 0.9.3-nightly.202507250750
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +16 -9
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 _0x1dd4ba=_0x2691;function _0x2691(_0x1b07ce,_0x247264){const _0x3cebcb=_0x3ceb();return _0x2691=function(_0x26915e,_0x52f6fc){_0x26915e=_0x26915e-0xd9;let _0x5630c6=_0x3cebcb[_0x26915e];return _0x5630c6;},_0x2691(_0x1b07ce,_0x247264);}(function(_0x53eccb,_0x3a5021){const _0x7b97f1=_0x2691,_0x437919=_0x53eccb();while(!![]){try{const _0x2fbc95=parseInt(_0x7b97f1(0xe7))/0x1*(parseInt(_0x7b97f1(0x106))/0x2)+-parseInt(_0x7b97f1(0x132))/0x3+-parseInt(_0x7b97f1(0x100))/0x4+parseInt(_0x7b97f1(0x103))/0x5+parseInt(_0x7b97f1(0x107))/0x6+-parseInt(_0x7b97f1(0xe8))/0x7+-parseInt(_0x7b97f1(0xf4))/0x8*(-parseInt(_0x7b97f1(0x117))/0x9);if(_0x2fbc95===_0x3a5021)break;else _0x437919['push'](_0x437919['shift']());}catch(_0x4087e7){_0x437919['push'](_0x437919['shift']());}}}(_0x3ceb,0xf00f1));Object[_0x1dd4ba(0xf6)](exports,Symbol[_0x1dd4ba(0x143)],{'value':_0x1dd4ba(0x11c)});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=_0x1dd4ba(0x10e);var I=(_0x206243=>(_0x206243[_0x206243[_0x1dd4ba(0xe0)]=0x0]=_0x1dd4ba(0xe0),_0x206243[_0x206243[_0x1dd4ba(0x112)]=0x1]=_0x1dd4ba(0x112),_0x206243[_0x206243[_0x1dd4ba(0x10d)]=-0x1]='UNRECOGNIZED',_0x206243))(I||{}),v=(_0x4ddfcf=>(_0x4ddfcf[_0x4ddfcf[_0x1dd4ba(0x14e)]=0x0]='Unknown',_0x4ddfcf[_0x4ddfcf['Add']=0x1]=_0x1dd4ba(0x126),_0x4ddfcf[_0x4ddfcf[_0x1dd4ba(0x125)]=0x2]=_0x1dd4ba(0x125),_0x4ddfcf[_0x4ddfcf[_0x1dd4ba(0xfe)]=0x3]=_0x1dd4ba(0xfe),_0x4ddfcf[_0x4ddfcf[_0x1dd4ba(0x131)]=0x4]=_0x1dd4ba(0x131),_0x4ddfcf[_0x4ddfcf[_0x1dd4ba(0xe1)]=0x5]=_0x1dd4ba(0xe1),_0x4ddfcf[_0x4ddfcf[_0x1dd4ba(0x10d)]=-0x1]=_0x1dd4ba(0x10d),_0x4ddfcf))(v||{});const f=_0x155566=>c[_0x1dd4ba(0x150)](new Date(+_0x155566))[_0x1dd4ba(0xf0)](_0x1dd4ba(0xf2)),R=async(_0x2e5c41,_0x1dbe25)=>{const _0x56dada=_0x1dd4ba,_0x4407fd=_0x2e5c41[_0x56dada(0x122)](c[_0x56dada(0x14b)]),_0x1672e4=_0x2e5c41[_0x56dada(0x122)](P[_0x56dada(0x14f)]);_0x1dbe25['forEach'](_0x26efb6=>{const _0x41b9a4=_0x56dada;_0x4407fd[_0x41b9a4(0x121)](_0x26efb6)&&_0x1dbe25[_0x41b9a4(0x142)](_0x26efb6);}),_0x1dbe25[_0x56dada(0x149)]&&(await _0x1672e4[_0x56dada(0x122)](_0x56dada(0xfd),{'params':{'userIDs':[..._0x1dbe25]}}))[_0x56dada(0x102)]['users'][_0x56dada(0x135)](_0x4ca107=>{const _0xd1cee6=_0x56dada;_0x4ca107&&_0x4407fd[_0xd1cee6(0x138)](_0x4ca107);});};var $=Object[_0x1dd4ba(0x147)],E=(_0x16db06,_0x4c64cb,_0x2c5255,_0x400812)=>{const _0x57f013=_0x1dd4ba;for(var _0x2e9b48=_0x400812>0x1?void 0x0:_0x400812?$(_0x4c64cb,_0x2c5255):_0x4c64cb,_0x1d160b=_0x16db06[_0x57f013(0x146)]-0x1,_0x4ad2cc;_0x1d160b>=0x0;_0x1d160b--)(_0x4ad2cc=_0x16db06[_0x1d160b])&&(_0x2e9b48=_0x4ad2cc(_0x2e9b48)||_0x2e9b48);return _0x2e9b48;},S=(_0x2db835,_0x114d2a)=>(_0x672b6a,_0x46579d)=>_0x114d2a(_0x672b6a,_0x46579d,_0x2db835);let p=class extends c[_0x1dd4ba(0x139)]{constructor(_0x5c7fa9,_0x3a7846,_0x321c12,_0x13ac4e){const _0x3b78ea=_0x1dd4ba;super(),this[_0x3b78ea(0x153)]=_0x5c7fa9,this[_0x3b78ea(0x11f)]=_0x3a7846,this[_0x3b78ea(0x12d)]=_0x321c12,this['_injector']=_0x13ac4e,this['_init'](),this[_0x3b78ea(0x145)]();}[_0x1dd4ba(0x145)](){const _0x2a602b=_0x1dd4ba;this[_0x2a602b(0x10b)](this['_threadCommentModel'][_0x2a602b(0x10a)][_0x2a602b(0x144)](w[_0x2a602b(0x152)](0x10))['subscribe'](_0x5af9e7=>{const _0xad85ba=_0x2a602b,_0x45e8fc=new Set();_0x5af9e7[_0xad85ba(0x135)](_0x2a18b5=>{const _0x4e24eb=_0xad85ba;switch(_0x2a18b5['type']){case'add':{const _0x19ab8a=_0x2a18b5[_0x4e24eb(0x14d)]['personId'];_0x45e8fc['add'](_0x19ab8a);break;}}}),R(this['_injector'],_0x45e8fc);}));}[_0x1dd4ba(0x129)](){const _0x4fa95b=_0x1dd4ba;this[_0x4fa95b(0x10b)](this[_0x4fa95b(0x153)]['commentUpdate$'][_0x4fa95b(0x119)](async _0x334025=>{const _0x1dd918=_0x4fa95b;var _0x2df40b,_0x9b70d8,_0x2fdf0c,_0x5176f8;const _0x5454c2=(_0x2df40b=this[_0x1dd918(0x11f)][_0x1dd918(0xee)](_0x334025[_0x1dd918(0xe9)])[_0x1dd918(0x10c)](_0x11f648=>_0x11f648[_0x1dd918(0x13f)]===_0x334025[_0x1dd918(0x13f)]))==null?void 0x0:_0x2df40b['root'];if(!_0x5454c2)return;const {unitId:_0x5ef7cc,subUnitId:_0x57a49a}=_0x5454c2;switch(_0x334025[_0x1dd918(0x14c)]&&this[_0x1dd918(0x12d)]['addUser'](_0x334025[_0x1dd918(0x14c)]),_0x334025[_0x1dd918(0x12c)]){case v[_0x1dd918(0x126)]:break;case v[_0x1dd918(0x125)]:{this['_threadCommentModel'][_0x1dd918(0xef)](_0x5ef7cc,_0x57a49a,{'unitId':_0x5ef7cc,'subUnitId':_0x57a49a,'ref':'','id':_0x334025[_0x1dd918(0x140)],'dT':f(+_0x334025['createTimestamp']),'threadId':_0x334025[_0x1dd918(0x13f)],'personId':(_0x2fdf0c=(_0x9b70d8=_0x334025[_0x1dd918(0x14c)])==null?void 0x0:_0x9b70d8[_0x1dd918(0x137)])!=null?_0x2fdf0c:_0x334025['userId'],'text':JSON[_0x1dd918(0x123)](_0x334025['content']),'parentId':_0x5454c2['id']});break;}case v[_0x1dd918(0x131)]:{const _0x5b2ade=this[_0x1dd918(0x11f)][_0x1dd918(0x12a)](_0x5ef7cc,_0x57a49a,_0x334025[_0x1dd918(0x140)]);_0x5b2ade&&_0x5b2ade['parentId']&&this[_0x1dd918(0x11f)][_0x1dd918(0xe2)](_0x5ef7cc,_0x57a49a,_0x334025[_0x1dd918(0x140)]);break;}case v[_0x1dd918(0xfe)]:{this[_0x1dd918(0x11f)][_0x1dd918(0x118)](_0x5ef7cc,_0x57a49a,{'commentId':_0x334025[_0x1dd918(0x140)],'text':JSON[_0x1dd918(0x123)](_0x334025['content'])});break;}case v['Solve']:{const _0xd8ab48=(_0x5176f8=this[_0x1dd918(0x11f)][_0x1dd918(0xee)](_0x334025[_0x1dd918(0xe9)])[_0x1dd918(0x10c)](_0x46f7c4=>_0x46f7c4[_0x1dd918(0x13f)]===_0x334025[_0x1dd918(0x13f)]))==null?void 0x0:_0x5176f8['root'];_0xd8ab48&&this[_0x1dd918(0x11f)][_0x1dd918(0xdc)](_0x5ef7cc,_0x57a49a,_0xd8ab48['id'],_0x334025[_0x1dd918(0x113)]===I[_0x1dd918(0x112)]);break;}}}));}};p=E([S(0x0,c[_0x1dd4ba(0xe4)](b[_0x1dd4ba(0xfa)])),S(0x1,c['Inject'](M[_0x1dd4ba(0xec)])),S(0x2,c[_0x1dd4ba(0xe4)](c[_0x1dd4ba(0x14b)])),S(0x3,c['Inject'](c[_0x1dd4ba(0xe5)]))],p);const q=_0x1dd4ba(0xde),D={};var A=Object[_0x1dd4ba(0x147)],x=(_0x501def,_0x11389a,_0xc35fdf,_0x3c6367)=>{const _0x4a466d=_0x1dd4ba;for(var _0x5bc73a=_0x3c6367>0x1?void 0x0:_0x3c6367?A(_0x11389a,_0xc35fdf):_0x11389a,_0x51cc16=_0x501def[_0x4a466d(0x146)]-0x1,_0x578325;_0x51cc16>=0x0;_0x51cc16--)(_0x578325=_0x501def[_0x51cc16])&&(_0x5bc73a=_0x578325(_0x5bc73a)||_0x5bc73a);return _0x5bc73a;},_=(_0x30c47e,_0x75f420)=>(_0x5a6cf6,_0x320b6a)=>_0x75f420(_0x5a6cf6,_0x320b6a,_0x30c47e);function Y(_0x2e56a2,_0x1a3d9b){const _0x1adf42=_0x1dd4ba,_0x12c422=_0x2e56a2[_0x1adf42(0x110)][0x0];return{..._0x1a3d9b,'id':_0x12c422[_0x1adf42(0x140)],'resolved':_0x2e56a2['solved']===0x1,'dT':f(_0x12c422[_0x1adf42(0xfb)]),'personId':_0x12c422['userId'],'threadId':_0x12c422['threadId']};}function G(_0x1415a6,_0x1165af,_0x462036){const _0x15860d=_0x1dd4ba;var _0x4a0744,_0x1578b0;if(((_0x1578b0=(_0x4a0744=_0x1415a6==null?void 0x0:_0x1415a6[_0x15860d(0x110)])==null?void 0x0:_0x4a0744[_0x15860d(0x146)])!=null?_0x1578b0:0x0)>0x0){const _0xc174bb=(_0x5e4de1,_0x152c8d)=>({'id':_0x5e4de1[_0x15860d(0x140)],'threadId':_0x5e4de1[_0x15860d(0x13f)],'dT':f(_0x5e4de1[_0x15860d(0xfb)]),'personId':_0x5e4de1[_0x15860d(0x10f)],'resolved':_0x1415a6['solved']===I[_0x15860d(0x112)],'unitId':_0x1165af,'subUnitId':_0x462036,'text':JSON[_0x15860d(0x123)](_0x5e4de1[_0x15860d(0x13a)]),'parentId':_0x152c8d}),_0x3b61d0=_0xc174bb(_0x1415a6[_0x15860d(0x110)][0x0]);return{..._0x3b61d0,'children':_0x1415a6[_0x15860d(0x110)][_0x15860d(0x13c)](0x1)['map'](_0x4710c6=>_0xc174bb(_0x4710c6,_0x3b61d0['id']))};}return null;}let g=class{constructor(_0x43380a,_0x8b4e5d,_0x28098c,_0x34b009){const _0x1c2708=_0x1dd4ba;this[_0x1c2708(0xeb)]=_0x43380a,this[_0x1c2708(0x12d)]=_0x8b4e5d,this[_0x1c2708(0x108)]=_0x28098c,this[_0x1c2708(0x151)]=_0x34b009;}async[_0x1dd4ba(0xef)](_0x30a778){const _0x3a34a1=_0x1dd4ba;var _0x34453e,_0x5b5920;const {parentId:_0x29a5a4,unitId:_0x1fe86c,text:_0x450b72,threadId:_0x292110}=_0x30a778,_0x3dd852=(_0x5b5920=(_0x34453e=_0x450b72[_0x3a34a1(0xf8)])==null?void 0x0:_0x34453e['filter'](_0x162a23=>_0x162a23[_0x3a34a1(0x13b)]===c['CustomRangeType'][_0x3a34a1(0x11a)])['map'](_0x17afe7=>_0x17afe7[_0x3a34a1(0xfc)]))!=null?_0x5b5920:[],_0x49c600=JSON[_0x3a34a1(0x11b)](_0x450b72),_0x471ed8=(await this[_0x3a34a1(0x108)]['requireSession'](_0x1fe86c))[_0x3a34a1(0x12f)]();if(_0x29a5a4){const _0x3ee836={'memberId':_0x471ed8,'unitId':_0x1fe86c,'content':_0x49c600,'mention':_0x3dd852,'threadId':_0x292110},_0x14120b=(await this[_0x3a34a1(0xeb)]['post']('/universer-api/comment/unit/'+_0x1fe86c+'/reply',{'body':_0x3ee836}))[_0x3a34a1(0x102)][_0x3a34a1(0x115)];return{..._0x30a778,'id':_0x14120b[_0x3a34a1(0x140)],'dT':c[_0x3a34a1(0x150)](+_0x14120b[_0x3a34a1(0xfb)])[_0x3a34a1(0xf0)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x14120b['userId']};}else{const _0x4f9d06={'memberId':_0x471ed8,'unitId':_0x1fe86c,'content':_0x49c600,'mention':_0x3dd852},_0x545a93=await this[_0x3a34a1(0xeb)]['post'](_0x3a34a1(0xdd)+_0x1fe86c+_0x3a34a1(0x136),{'body':_0x4f9d06});return Y(_0x545a93[_0x3a34a1(0x102)][_0x3a34a1(0x116)],_0x30a778);}}async[_0x1dd4ba(0x118)](_0x4a9836){const _0x3c8a06=_0x1dd4ba;var _0x43ad1c,_0x23556e;const {text:_0x5b75c9,unitId:_0x2851}=_0x4a9836,_0x40dc32=(_0x23556e=(_0x43ad1c=_0x5b75c9[_0x3c8a06(0xf8)])==null?void 0x0:_0x43ad1c['filter'](_0x443b56=>_0x443b56[_0x3c8a06(0x13b)]===c[_0x3c8a06(0xf3)][_0x3c8a06(0x11a)])['map'](_0x51767b=>_0x51767b[_0x3c8a06(0xfc)]))!=null?_0x23556e:[],_0x5f0708=JSON[_0x3c8a06(0x11b)](_0x5b75c9),_0x2156ff=_0x4a9836[_0x3c8a06(0x13f)],_0x2de1cb=_0x4a9836['id'],_0x42964b={'memberId':(await this['_sessionService'][_0x3c8a06(0xea)](_0x2851))[_0x3c8a06(0x12f)](),'unitId':_0x2851,'threadId':_0x2156ff,'mention':_0x40dc32,'content':_0x5f0708,'replyId':_0x2de1cb},_0x1024fc=await this['_httpService'][_0x3c8a06(0xf9)]('/universer-api/comment/unit/'+_0x2851+_0x3c8a06(0xe6),{'body':_0x42964b});return!_0x1024fc['body'][_0x3c8a06(0xf1)]||_0x1024fc['body'][_0x3c8a06(0xf1)][_0x3c8a06(0x127)]===0x1;}async[_0x1dd4ba(0xdc)](_0x401945){const _0x2e87b4=_0x1dd4ba,{unitId:_0x5ecc09}=_0x401945,_0xf810df=_0x401945[_0x2e87b4(0x13f)],_0x236787={'memberId':this[_0x2e87b4(0x12d)][_0x2e87b4(0xf7)]()['userID'],'unitId':_0x5ecc09,'threadId':_0xf810df,'solved':_0x401945['resolved']?I[_0x2e87b4(0x112)]:I[_0x2e87b4(0xe0)]},_0x39a68a=await this[_0x2e87b4(0xeb)][_0x2e87b4(0xf9)]('/universer-api/comment/unit/'+_0x5ecc09+_0x2e87b4(0x128),{'body':_0x236787});return!_0x39a68a['body'][_0x2e87b4(0xf1)]||_0x39a68a[_0x2e87b4(0x102)][_0x2e87b4(0xf1)][_0x2e87b4(0x127)]===0x1;}async[_0x1dd4ba(0xe2)](_0x286fa5,_0x36cf28,_0x293534,_0x531a11){const _0x2aff67=_0x1dd4ba,_0x1a2bce={'memberId':(await this[_0x2aff67(0x108)][_0x2aff67(0xea)](_0x286fa5))[_0x2aff67(0x12f)](),'threadId':_0x293534,'replyId':_0x531a11,'unitId':_0x286fa5},_0x3a9dbf=await this[_0x2aff67(0xeb)][_0x2aff67(0xf9)](_0x2aff67(0xdd)+_0x286fa5+'/delete',{'body':_0x1a2bce});return!_0x3a9dbf[_0x2aff67(0x102)][_0x2aff67(0xf1)]||_0x3a9dbf[_0x2aff67(0x102)][_0x2aff67(0xf1)][_0x2aff67(0x127)]===0x1;}async[_0x1dd4ba(0x11d)](_0x863158,_0x40844a,_0x25c547){const _0x24478c=_0x1dd4ba,_0x207a1e={'unitId':_0x863158,'threadId':_0x25c547},_0x4e1326=await this[_0x24478c(0xeb)]['post'](_0x24478c(0xdd)+_0x863158+_0x24478c(0x109),{'body':_0x207a1e}),_0x173ba2=_0x25c547[_0x24478c(0x12e)](_0x22ab9b=>G(_0x4e1326[_0x24478c(0x102)][_0x24478c(0x124)][_0x22ab9b],_0x863158,_0x40844a))['filter'](Boolean);return Object[_0x24478c(0xff)](_0x4e1326[_0x24478c(0x102)][_0x24478c(0xdb)])['forEach'](_0x42dee3=>{const _0x425fe9=_0x24478c;this['_userService'][_0x425fe9(0x138)](_0x42dee3);}),_0x173ba2;}[_0x1dd4ba(0x134)](_0x5aab80){const _0x22133c=_0x1dd4ba;return{'id':_0x5aab80['id'],'threadId':_0x5aab80[_0x22133c(0x13f)],'ref':_0x5aab80[_0x22133c(0x120)]};}};g=x([_(0x0,c[_0x1dd4ba(0xe4)](P[_0x1dd4ba(0x14f)])),_(0x1,c['Inject'](c[_0x1dd4ba(0x14b)])),_(0x2,c[_0x1dd4ba(0xe4)](b[_0x1dd4ba(0xed)])),_(0x3,c[_0x1dd4ba(0xe4)](c[_0x1dd4ba(0xe5)]))],g);var H=Object[_0x1dd4ba(0x147)],J=(_0x3b6937,_0x50b52b,_0xd8e354,_0x400615)=>{const _0x488675=_0x1dd4ba;for(var _0x47581d=_0x400615>0x1?void 0x0:_0x400615?H(_0x50b52b,_0xd8e354):_0x50b52b,_0x49411f=_0x3b6937[_0x488675(0x146)]-0x1,_0x1865d8;_0x49411f>=0x0;_0x49411f--)(_0x1865d8=_0x3b6937[_0x49411f])&&(_0x47581d=_0x1865d8(_0x47581d)||_0x47581d);return _0x47581d;},y=(_0x26eb6c,_0x5f1949)=>(_0x4ba766,_0x22c923)=>_0x5f1949(_0x4ba766,_0x22c923,_0x26eb6c);let C=class extends c[_0x1dd4ba(0x139)]{constructor(_0x210352,_0x3fdd45){const _0x572963=_0x1dd4ba;super(),this[_0x572963(0x141)]=_0x210352,this[_0x572963(0x13e)]=_0x3fdd45,this['_initDataSource']();}[_0x1dd4ba(0x148)](){const _0x3ec04e=_0x1dd4ba;this['_threadCommentDataSourceService'][_0x3ec04e(0x130)]=this[_0x3ec04e(0x13e)],this[_0x3ec04e(0x141)]['syncUpdateMutationToColla']=!0x1;}};function _0x3ceb(){const _0x533463=['setConfig','_threadCommentDataSource','threadId','replyId','_threadCommentDataSourceService','delete','toStringTag','pipe','_initUserSync','length','getOwnPropertyDescriptor','_initDataSource','size','DependentOn','UserManagerService','user','payload','Unknown','HTTPService','dayjs','_injector','bufferTime','_commentService','add','onStarting','users','resolveComment','/universer-api/comment/unit/','thread-comment-data-source.config','symbol','OpenOrReOpen','Solve','deleteComment','UniverCollaborationClientPlugin','Inject','Injector','/edit','5okaMNQ','13373241HbrqyW','unitId','requireSession','_httpService','ThreadCommentModel','CollaborationSessionService','getUnit','addComment','format','error','YYYY/MM/DD\x20HH:mm','CustomRangeType','1548280gOvbjZ','UniverThreadCommentDataSourcePlugin','defineProperty','getCurrentUser','customRanges','post','CommentService','createTimestamp','rangeId','/universer-api/user/list','Edit','values','2090572sndTWy','_configService','body','235955UlEtEj','_config','IConfigService','708560iXpwUk','10664838giXSqk','_sessionService','/list','commentUpdate$','disposeWithMe','find','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userId','replies','IThreadCommentDataSourceService','Solved','solved','pluginName','reply','comment','72HOEfnn','updateComment','subscribe','COMMENT','stringify','Module','listComments','UniverThreadCommentUIPlugin','_threadCommentModel','ref','getUser','get','parse','comments','Reply','Add','code','/solved','_init','getComment','Plugin','type','_userService','map','getMemberID','dataSource','Delete','5183871Kykrzs','merge','saveCommentToSnapshot','forEach','/add','userID','addUser','Disposable','content','rangeType','slice'];_0x3ceb=function(){return _0x533463;};return _0x3ceb();}C=J([y(0x0,M[_0x1dd4ba(0x111)]),y(0x1,c[_0x1dd4ba(0xe4)](g))],C);var F=Object['defineProperty'],L=Object[_0x1dd4ba(0x147)],Z=(_0x431a09,_0x266a6b,_0x1a6902)=>_0x266a6b in _0x431a09?F(_0x431a09,_0x266a6b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1a6902}):_0x431a09[_0x266a6b]=_0x1a6902,W=(_0xd4d7cc,_0x55114d,_0x1ab601,_0x24441f)=>{const _0x477570=_0x1dd4ba;for(var _0x2c482b=_0x24441f>0x1?void 0x0:_0x24441f?L(_0x55114d,_0x1ab601):_0x55114d,_0x42abf1=_0xd4d7cc[_0x477570(0x146)]-0x1,_0x3a7e14;_0x42abf1>=0x0;_0x42abf1--)(_0x3a7e14=_0xd4d7cc[_0x42abf1])&&(_0x2c482b=_0x3a7e14(_0x2c482b)||_0x2c482b);return _0x2c482b;},O=(_0x322710,_0x37b6a7)=>(_0xce5305,_0x32180a)=>_0x37b6a7(_0xce5305,_0x32180a,_0x322710),N=(_0x5dbbab,_0x83840,_0x1a9103)=>Z(_0x5dbbab,typeof _0x83840!=_0x1dd4ba(0xdf)?_0x83840+'':_0x83840,_0x1a9103);exports[_0x1dd4ba(0xf5)]=class extends c[_0x1dd4ba(0x12b)]{constructor(_0xb8c392=D,_0x3e7b0b,_0x650ecf){const _0x605506=_0x1dd4ba;super(),this['_config']=_0xb8c392,this[_0x605506(0x151)]=_0x3e7b0b,this[_0x605506(0x101)]=_0x650ecf;const {..._0x1f7e33}=c[_0x605506(0x133)]({},D,this[_0x605506(0x104)]);this['_configService'][_0x605506(0x13d)](q,_0x1f7e33);}[_0x1dd4ba(0xda)](){[[g],[C],[p]]['forEach'](_0x5a758c=>{const _0x3158d0=_0x2691;this[_0x3158d0(0x151)][_0x3158d0(0xd9)](_0x5a758c);});}['onReady'](){const _0x268ce3=_0x1dd4ba;this[_0x268ce3(0x151)]['get'](C),this[_0x268ce3(0x151)][_0x268ce3(0x122)](p);}},N(exports[_0x1dd4ba(0xf5)],_0x1dd4ba(0x114),U),N(exports[_0x1dd4ba(0xf5)],_0x1dd4ba(0x12c),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x1dd4ba(0xf5)]=W([c[_0x1dd4ba(0x14a)](j[_0x1dd4ba(0x11e)],b[_0x1dd4ba(0xe3)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x1dd4ba(0x105)])],exports[_0x1dd4ba(0xf5)]);
|
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 _0x2319(){const _0x5d0f62=['/delete','parse','payload','rangeType','OpenOrReOpen','_injector','user','subscribe','users','/list','body','getCurrentUser','updateComment','userId','replies','40ZLfDWk','172BrtCUe','root','YYYY/MM/DD\x20HH:mm','_httpService','ref','1042281EYBXlf','_threadCommentDataSource','_initUserSync','code','get','Solve','281969ILZRYe','delete','/solved','resolveComment','_configService','requireSession','values','disposeWithMe','find','threadId','userID','UNRECOGNIZED','getMemberID','error','addUser','content','_commentService','onReady','slice','replyId','getOwnPropertyDescriptor','getUser','format','createTimestamp','getComment','_sessionService','solved','syncUpdateMutationToColla','resolved','/add','Solved','type','setConfig','_threadCommentModel','UNIVER_UNKNOWN','Reply','onStarting','17280aVxQUW','_initDataSource','addComment','Delete','1274862hFUalg','reply','_threadCommentDataSourceService','symbol','saveCommentToSnapshot','filter','forEach','237534gtaeKT','_userService','/universer-api/user/list','stringify','/universer-api/comment/unit/','thread-comment-data-source.config','rangeId','post','add','Edit','map','length','commentUpdate$','customRanges','getUnit','comments','Unknown','73479LMqijt','unitId','17646GVUvGS','/edit','COMMENT','Add'];_0x2319=function(){return _0x5d0f62;};return _0x2319();}const _0x47fc26=_0x260c;(function(_0x34ba70,_0x281d95){const _0x164bb9=_0x260c,_0x41c8a0=_0x34ba70();while(!![]){try{const _0x5d2c18=parseInt(_0x164bb9(0x1e7))/0x1+-parseInt(_0x164bb9(0x1c8))/0x2+-parseInt(_0x164bb9(0x1ae))/0x3+parseInt(_0x164bb9(0x1dc))/0x4*(-parseInt(_0x164bb9(0x1aa))/0x5)+-parseInt(_0x164bb9(0x1b5))/0x6+-parseInt(_0x164bb9(0x1c6))/0x7+-parseInt(_0x164bb9(0x1db))/0x8*(-parseInt(_0x164bb9(0x1e1))/0x9);if(_0x5d2c18===_0x281d95)break;else _0x41c8a0['push'](_0x41c8a0['shift']());}catch(_0x57ff1e){_0x41c8a0['push'](_0x41c8a0['shift']());}}}(_0x2319,0x37cbf));import{CommentService as _0x5dcb26,CollaborationSessionService as _0xf33af6,UniverCollaborationClientPlugin as _0x83ef3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xc79184}from'@univerjs-pro/license';import{dayjs as _0x9aa364,UserManagerService as _0x3be824,Inject as _0x321edf,Injector as _0x1f30c6,Disposable as _0x585462,CustomRangeType as _0x2d49c8,UniverInstanceType as _0xede23f,DependentOn as _0xa6f944,IConfigService as _0x54450d,Plugin as _0x2d2250,merge as _0x54b819}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5ec74e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2f0c98,IThreadCommentDataSourceService as _0x41c736}from'@univerjs/thread-comment';import{bufferTime as _0x5c1b54}from'rxjs';import{HTTPService as _0x1c9089}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x260c(_0x1b6059,_0x4b5457){const _0x2319c2=_0x2319();return _0x260c=function(_0x260cb4,_0x1d9c9f){_0x260cb4=_0x260cb4-0x196;let _0x2ba24f=_0x2319c2[_0x260cb4];return _0x2ba24f;},_0x260c(_0x1b6059,_0x4b5457);}var I=(_0x1735f5=>(_0x1735f5[_0x1735f5['OpenOrReOpen']=0x0]=_0x47fc26(0x1d0),_0x1735f5[_0x1735f5[_0x47fc26(0x1a3)]=0x1]=_0x47fc26(0x1a3),_0x1735f5[_0x1735f5[_0x47fc26(0x1f2)]=-0x1]=_0x47fc26(0x1f2),_0x1735f5))(I||{}),v=(_0xa927a8=>(_0xa927a8[_0xa927a8[_0x47fc26(0x1c5)]=0x0]=_0x47fc26(0x1c5),_0xa927a8[_0xa927a8[_0x47fc26(0x1cb)]=0x1]=_0x47fc26(0x1cb),_0xa927a8[_0xa927a8['Reply']=0x2]=_0x47fc26(0x1a8),_0xa927a8[_0xa927a8[_0x47fc26(0x1be)]=0x3]=_0x47fc26(0x1be),_0xa927a8[_0xa927a8[_0x47fc26(0x1ad)]=0x4]='Delete',_0xa927a8[_0xa927a8['Solve']=0x5]=_0x47fc26(0x1e6),_0xa927a8[_0xa927a8[_0x47fc26(0x1f2)]=-0x1]=_0x47fc26(0x1f2),_0xa927a8))(v||{});const D=_0x16a323=>_0x9aa364(new Date(+_0x16a323))[_0x47fc26(0x19b)](_0x47fc26(0x1de)),B=async(_0x2b5b34,_0xb608ae)=>{const _0x5e9aa2=_0x47fc26,_0x166a96=_0x2b5b34[_0x5e9aa2(0x1e5)](_0x3be824),_0x53447d=_0x2b5b34[_0x5e9aa2(0x1e5)](_0x1c9089);_0xb608ae[_0x5e9aa2(0x1b4)](_0x12b073=>{const _0x50362d=_0x5e9aa2;_0x166a96[_0x50362d(0x19a)](_0x12b073)&&_0xb608ae[_0x50362d(0x1e8)](_0x12b073);}),_0xb608ae['size']&&(await _0x53447d[_0x5e9aa2(0x1e5)](_0x5e9aa2(0x1b7),{'params':{'userIDs':[..._0xb608ae]}}))[_0x5e9aa2(0x1d6)][_0x5e9aa2(0x1d4)]['forEach'](_0x218867=>{const _0x55796c=_0x5e9aa2;_0x218867&&_0x166a96[_0x55796c(0x1f5)](_0x218867);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x927c31,_0x5203ba,_0x7daad,_0x33d3a2)=>{for(var _0x13fef0=_0x33d3a2>0x1?void 0x0:_0x33d3a2?K(_0x5203ba,_0x7daad):_0x5203ba,_0x3ab8a3=_0x927c31['length']-0x1,_0x15c4ec;_0x3ab8a3>=0x0;_0x3ab8a3--)(_0x15c4ec=_0x927c31[_0x3ab8a3])&&(_0x13fef0=_0x15c4ec(_0x13fef0)||_0x13fef0);return _0x13fef0;},p=(_0x319415,_0x408d31)=>(_0x3ce163,_0x330555)=>_0x408d31(_0x3ce163,_0x330555,_0x319415);let S=class extends _0x585462{constructor(_0x328b88,_0x299aec,_0x4122a8,_0x371c70){const _0xe29ead=_0x47fc26;super(),this[_0xe29ead(0x1f7)]=_0x328b88,this['_threadCommentModel']=_0x299aec,this[_0xe29ead(0x1b6)]=_0x4122a8,this[_0xe29ead(0x1d1)]=_0x371c70,this['_init'](),this[_0xe29ead(0x1e3)]();}[_0x47fc26(0x1e3)](){const _0x17bd23=_0x47fc26;this[_0x17bd23(0x1ee)](this[_0x17bd23(0x1a6)][_0x17bd23(0x1c1)]['pipe'](_0x5c1b54(0x10))[_0x17bd23(0x1d3)](_0x4c50a4=>{const _0x39c352=new Set();_0x4c50a4['forEach'](_0x4ced81=>{const _0x293fa5=_0x260c;switch(_0x4ced81['type']){case _0x293fa5(0x1bd):{const _0x1259e1=_0x4ced81[_0x293fa5(0x1ce)]['personId'];_0x39c352[_0x293fa5(0x1bd)](_0x1259e1);break;}}}),B(this['_injector'],_0x39c352);}));}['_init'](){const _0x488d94=_0x47fc26;this[_0x488d94(0x1ee)](this['_commentService'][_0x488d94(0x1c1)]['subscribe'](async _0x1d5bc8=>{const _0x117830=_0x488d94;var _0x375766,_0x1b270a,_0x140070,_0x3ca7fa;const _0x1520a3=(_0x375766=this[_0x117830(0x1a6)][_0x117830(0x1c3)](_0x1d5bc8[_0x117830(0x1c7)])[_0x117830(0x1ef)](_0x3d2791=>_0x3d2791[_0x117830(0x1f0)]===_0x1d5bc8['threadId']))==null?void 0x0:_0x375766['root'];if(!_0x1520a3)return;const {unitId:_0xeef3a8,subUnitId:_0x46d4dd}=_0x1520a3;switch(_0x1d5bc8[_0x117830(0x1d2)]&&this[_0x117830(0x1b6)]['addUser'](_0x1d5bc8['user']),_0x1d5bc8[_0x117830(0x1a4)]){case v['Add']:break;case v[_0x117830(0x1a8)]:{this[_0x117830(0x1a6)][_0x117830(0x1ac)](_0xeef3a8,_0x46d4dd,{'unitId':_0xeef3a8,'subUnitId':_0x46d4dd,'ref':'','id':_0x1d5bc8[_0x117830(0x198)],'dT':D(+_0x1d5bc8[_0x117830(0x19c)]),'threadId':_0x1d5bc8['threadId'],'personId':(_0x140070=(_0x1b270a=_0x1d5bc8[_0x117830(0x1d2)])==null?void 0x0:_0x1b270a[_0x117830(0x1f1)])!=null?_0x140070:_0x1d5bc8[_0x117830(0x1d9)],'text':JSON['parse'](_0x1d5bc8[_0x117830(0x1f6)]),'parentId':_0x1520a3['id']});break;}case v[_0x117830(0x1ad)]:{const _0x1583aa=this[_0x117830(0x1a6)][_0x117830(0x19d)](_0xeef3a8,_0x46d4dd,_0x1d5bc8[_0x117830(0x198)]);_0x1583aa&&_0x1583aa['parentId']&&this[_0x117830(0x1a6)]['deleteComment'](_0xeef3a8,_0x46d4dd,_0x1d5bc8[_0x117830(0x198)]);break;}case v[_0x117830(0x1be)]:{this[_0x117830(0x1a6)][_0x117830(0x1d8)](_0xeef3a8,_0x46d4dd,{'commentId':_0x1d5bc8['replyId'],'text':JSON[_0x117830(0x1cd)](_0x1d5bc8[_0x117830(0x1f6)])});break;}case v[_0x117830(0x1e6)]:{const _0x43ddca=(_0x3ca7fa=this[_0x117830(0x1a6)][_0x117830(0x1c3)](_0x1d5bc8['unitId'])[_0x117830(0x1ef)](_0x1ead56=>_0x1ead56[_0x117830(0x1f0)]===_0x1d5bc8[_0x117830(0x1f0)]))==null?void 0x0:_0x3ca7fa[_0x117830(0x1dd)];_0x43ddca&&this[_0x117830(0x1a6)][_0x117830(0x1ea)](_0xeef3a8,_0x46d4dd,_0x43ddca['id'],_0x1d5bc8[_0x117830(0x19f)]===I[_0x117830(0x1a3)]);break;}}}));}};S=V([p(0x0,_0x321edf(_0x5dcb26)),p(0x1,_0x321edf(_0x2f0c98)),p(0x2,_0x321edf(_0x3be824)),p(0x3,_0x321edf(_0x1f30c6))],S);const z=_0x47fc26(0x1ba),M={};var k=Object[_0x47fc26(0x199)],Q=(_0xb09a87,_0x49f828,_0x39d4ac,_0x11304b)=>{const _0x5f43b1=_0x47fc26;for(var _0x2a38ae=_0x11304b>0x1?void 0x0:_0x11304b?k(_0x49f828,_0x39d4ac):_0x49f828,_0xae389=_0xb09a87[_0x5f43b1(0x1c0)]-0x1,_0x4b9d81;_0xae389>=0x0;_0xae389--)(_0x4b9d81=_0xb09a87[_0xae389])&&(_0x2a38ae=_0x4b9d81(_0x2a38ae)||_0x2a38ae);return _0x2a38ae;},_=(_0x35d2f9,_0x1ad20e)=>(_0x437467,_0x3bf411)=>_0x1ad20e(_0x437467,_0x3bf411,_0x35d2f9);function X(_0x13a250,_0x3481b4){const _0x4c4870=_0x47fc26,_0x30cb26=_0x13a250[_0x4c4870(0x1da)][0x0];return{..._0x3481b4,'id':_0x30cb26['replyId'],'resolved':_0x13a250[_0x4c4870(0x19f)]===0x1,'dT':D(_0x30cb26[_0x4c4870(0x19c)]),'personId':_0x30cb26[_0x4c4870(0x1d9)],'threadId':_0x30cb26[_0x4c4870(0x1f0)]};}function ee(_0x36cb90,_0x243ef9,_0x36dd4b){const _0x491b54=_0x47fc26;var _0x1bdd23,_0x3e3238;if(((_0x3e3238=(_0x1bdd23=_0x36cb90==null?void 0x0:_0x36cb90[_0x491b54(0x1da)])==null?void 0x0:_0x1bdd23[_0x491b54(0x1c0)])!=null?_0x3e3238:0x0)>0x0){const _0x2ee385=(_0x4deaeb,_0x527cf1)=>({'id':_0x4deaeb[_0x491b54(0x198)],'threadId':_0x4deaeb[_0x491b54(0x1f0)],'dT':D(_0x4deaeb[_0x491b54(0x19c)]),'personId':_0x4deaeb[_0x491b54(0x1d9)],'resolved':_0x36cb90[_0x491b54(0x19f)]===I[_0x491b54(0x1a3)],'unitId':_0x243ef9,'subUnitId':_0x36dd4b,'text':JSON[_0x491b54(0x1cd)](_0x4deaeb[_0x491b54(0x1f6)]),'parentId':_0x527cf1}),_0x28a5c6=_0x2ee385(_0x36cb90[_0x491b54(0x1da)][0x0]);return{..._0x28a5c6,'children':_0x36cb90[_0x491b54(0x1da)][_0x491b54(0x197)](0x1)[_0x491b54(0x1bf)](_0x43b292=>_0x2ee385(_0x43b292,_0x28a5c6['id']))};}return null;}let f=class{constructor(_0xabc3b9,_0x3519ce,_0x521326,_0x36f213){const _0x283bd4=_0x47fc26;this[_0x283bd4(0x1df)]=_0xabc3b9,this[_0x283bd4(0x1b6)]=_0x3519ce,this['_sessionService']=_0x521326,this[_0x283bd4(0x1d1)]=_0x36f213;}async[_0x47fc26(0x1ac)](_0x52630d){const _0x2eb6c6=_0x47fc26;var _0x23bfc9,_0x42c2ba;const {parentId:_0x25451b,unitId:_0x31df77,text:_0x5e6e3e,threadId:_0x3794f7}=_0x52630d,_0x6d3777=(_0x42c2ba=(_0x23bfc9=_0x5e6e3e[_0x2eb6c6(0x1c2)])==null?void 0x0:_0x23bfc9[_0x2eb6c6(0x1b3)](_0x549e21=>_0x549e21[_0x2eb6c6(0x1cf)]===_0x2d49c8[_0x2eb6c6(0x1ca)])[_0x2eb6c6(0x1bf)](_0x3ae6da=>_0x3ae6da[_0x2eb6c6(0x1bb)]))!=null?_0x42c2ba:[],_0xfc668a=JSON[_0x2eb6c6(0x1b8)](_0x5e6e3e),_0xa4f0eb=(await this[_0x2eb6c6(0x19e)][_0x2eb6c6(0x1ec)](_0x31df77))['getMemberID']();if(_0x25451b){const _0x549871={'memberId':_0xa4f0eb,'unitId':_0x31df77,'content':_0xfc668a,'mention':_0x6d3777,'threadId':_0x3794f7},_0x3343f1=(await this[_0x2eb6c6(0x1df)]['post'](_0x2eb6c6(0x1b9)+_0x31df77+'/reply',{'body':_0x549871}))['body'][_0x2eb6c6(0x1af)];return{..._0x52630d,'id':_0x3343f1[_0x2eb6c6(0x198)],'dT':_0x9aa364(+_0x3343f1[_0x2eb6c6(0x19c)])['format'](_0x2eb6c6(0x1de)),'personId':_0x3343f1[_0x2eb6c6(0x1d9)]};}else{const _0x3b5f58={'memberId':_0xa4f0eb,'unitId':_0x31df77,'content':_0xfc668a,'mention':_0x6d3777},_0x1064e7=await this[_0x2eb6c6(0x1df)][_0x2eb6c6(0x1bc)](_0x2eb6c6(0x1b9)+_0x31df77+_0x2eb6c6(0x1a2),{'body':_0x3b5f58});return X(_0x1064e7['body']['comment'],_0x52630d);}}async[_0x47fc26(0x1d8)](_0x3f2525){const _0x135b2c=_0x47fc26;var _0x532785,_0x1c5ce6;const {text:_0x34b779,unitId:_0x45480a}=_0x3f2525,_0x2555c6=(_0x1c5ce6=(_0x532785=_0x34b779[_0x135b2c(0x1c2)])==null?void 0x0:_0x532785[_0x135b2c(0x1b3)](_0x356601=>_0x356601[_0x135b2c(0x1cf)]===_0x2d49c8[_0x135b2c(0x1ca)])[_0x135b2c(0x1bf)](_0x16f542=>_0x16f542[_0x135b2c(0x1bb)]))!=null?_0x1c5ce6:[],_0x1f488d=JSON[_0x135b2c(0x1b8)](_0x34b779),_0x346b58=_0x3f2525[_0x135b2c(0x1f0)],_0x576f41=_0x3f2525['id'],_0xc798ea={'memberId':(await this[_0x135b2c(0x19e)][_0x135b2c(0x1ec)](_0x45480a))[_0x135b2c(0x1f3)](),'unitId':_0x45480a,'threadId':_0x346b58,'mention':_0x2555c6,'content':_0x1f488d,'replyId':_0x576f41},_0x56a8b3=await this['_httpService']['post'](_0x135b2c(0x1b9)+_0x45480a+_0x135b2c(0x1c9),{'body':_0xc798ea});return!_0x56a8b3[_0x135b2c(0x1d6)]['error']||_0x56a8b3[_0x135b2c(0x1d6)][_0x135b2c(0x1f4)][_0x135b2c(0x1e4)]===0x1;}async[_0x47fc26(0x1ea)](_0x4cdbc9){const _0x352b68=_0x47fc26,{unitId:_0x395a1e}=_0x4cdbc9,_0x248276=_0x4cdbc9[_0x352b68(0x1f0)],_0x395e81={'memberId':this[_0x352b68(0x1b6)][_0x352b68(0x1d7)]()[_0x352b68(0x1f1)],'unitId':_0x395a1e,'threadId':_0x248276,'solved':_0x4cdbc9[_0x352b68(0x1a1)]?I[_0x352b68(0x1a3)]:I['OpenOrReOpen']},_0x3938f9=await this['_httpService'][_0x352b68(0x1bc)](_0x352b68(0x1b9)+_0x395a1e+_0x352b68(0x1e9),{'body':_0x395e81});return!_0x3938f9[_0x352b68(0x1d6)][_0x352b68(0x1f4)]||_0x3938f9[_0x352b68(0x1d6)][_0x352b68(0x1f4)]['code']===0x1;}async['deleteComment'](_0x19388c,_0x13ffcc,_0x109415,_0x536d68){const _0x4a289e=_0x47fc26,_0x2b09eb={'memberId':(await this['_sessionService'][_0x4a289e(0x1ec)](_0x19388c))['getMemberID'](),'threadId':_0x109415,'replyId':_0x536d68,'unitId':_0x19388c},_0x223195=await this[_0x4a289e(0x1df)][_0x4a289e(0x1bc)](_0x4a289e(0x1b9)+_0x19388c+_0x4a289e(0x1cc),{'body':_0x2b09eb});return!_0x223195[_0x4a289e(0x1d6)][_0x4a289e(0x1f4)]||_0x223195[_0x4a289e(0x1d6)][_0x4a289e(0x1f4)]['code']===0x1;}async['listComments'](_0x57d844,_0xe2c5f7,_0x474ede){const _0x248abd=_0x47fc26,_0x384bc3={'unitId':_0x57d844,'threadId':_0x474ede},_0x1e8b60=await this[_0x248abd(0x1df)][_0x248abd(0x1bc)](_0x248abd(0x1b9)+_0x57d844+_0x248abd(0x1d5),{'body':_0x384bc3}),_0x5d5815=_0x474ede['map'](_0x3835e5=>ee(_0x1e8b60['body'][_0x248abd(0x1c4)][_0x3835e5],_0x57d844,_0xe2c5f7))['filter'](Boolean);return Object[_0x248abd(0x1ed)](_0x1e8b60[_0x248abd(0x1d6)][_0x248abd(0x1d4)])[_0x248abd(0x1b4)](_0x20a2ef=>{const _0x9d257f=_0x248abd;this['_userService'][_0x9d257f(0x1f5)](_0x20a2ef);}),_0x5d5815;}[_0x47fc26(0x1b2)](_0x565e7e){const _0x52ea76=_0x47fc26;return{'id':_0x565e7e['id'],'threadId':_0x565e7e[_0x52ea76(0x1f0)],'ref':_0x565e7e[_0x52ea76(0x1e0)]};}};f=Q([_(0x0,_0x321edf(_0x1c9089)),_(0x1,_0x321edf(_0x3be824)),_(0x2,_0x321edf(_0xf33af6)),_(0x3,_0x321edf(_0x1f30c6))],f);var re=Object[_0x47fc26(0x199)],te=(_0x4a0a8d,_0x678ea1,_0x36a12c,_0x508e21)=>{const _0x359bd0=_0x47fc26;for(var _0x1986fb=_0x508e21>0x1?void 0x0:_0x508e21?re(_0x678ea1,_0x36a12c):_0x678ea1,_0x14943a=_0x4a0a8d[_0x359bd0(0x1c0)]-0x1,_0x5b2474;_0x14943a>=0x0;_0x14943a--)(_0x5b2474=_0x4a0a8d[_0x14943a])&&(_0x1986fb=_0x5b2474(_0x1986fb)||_0x1986fb);return _0x1986fb;},N=(_0x50fb3c,_0x55a612)=>(_0x3d1b84,_0x389020)=>_0x55a612(_0x3d1b84,_0x389020,_0x50fb3c);let g=class extends _0x585462{constructor(_0x2dd2b4,_0x59b55b){const _0x109c38=_0x47fc26;super(),this['_threadCommentDataSourceService']=_0x2dd2b4,this[_0x109c38(0x1e2)]=_0x59b55b,this[_0x109c38(0x1ab)]();}['_initDataSource'](){const _0x49f5d8=_0x47fc26;this['_threadCommentDataSourceService']['dataSource']=this[_0x49f5d8(0x1e2)],this[_0x49f5d8(0x1b0)][_0x49f5d8(0x1a0)]=!0x1;}};g=te([N(0x0,_0x41c736),N(0x1,_0x321edf(f))],g);var se=Object['defineProperty'],oe=Object[_0x47fc26(0x199)],ne=(_0x1efed7,_0x3878e0,_0x1dfefd)=>_0x3878e0 in _0x1efed7?se(_0x1efed7,_0x3878e0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1dfefd}):_0x1efed7[_0x3878e0]=_0x1dfefd,ie=(_0x49bc90,_0x15fb9c,_0x19e5c9,_0xfb9733)=>{const _0x51b755=_0x47fc26;for(var _0x4b70bb=_0xfb9733>0x1?void 0x0:_0xfb9733?oe(_0x15fb9c,_0x19e5c9):_0x15fb9c,_0x2b4c59=_0x49bc90[_0x51b755(0x1c0)]-0x1,_0x5e1f2a;_0x2b4c59>=0x0;_0x2b4c59--)(_0x5e1f2a=_0x49bc90[_0x2b4c59])&&(_0x4b70bb=_0x5e1f2a(_0x4b70bb)||_0x4b70bb);return _0x4b70bb;},w=(_0x39523f,_0x2f4b3c)=>(_0x34bfe4,_0x237f64)=>_0x2f4b3c(_0x34bfe4,_0x237f64,_0x39523f),$=(_0x4a94e3,_0x1c03af,_0x5e4f58)=>ne(_0x4a94e3,typeof _0x1c03af!=_0x47fc26(0x1b1)?_0x1c03af+'':_0x1c03af,_0x5e4f58);let b=class extends _0x2d2250{constructor(_0x45ee8c=M,_0x2f3010,_0x1dd338){const _0x372e26=_0x47fc26;super(),this['_config']=_0x45ee8c,this[_0x372e26(0x1d1)]=_0x2f3010,this[_0x372e26(0x1eb)]=_0x1dd338;const {..._0x59f697}=_0x54b819({},M,this['_config']);this[_0x372e26(0x1eb)][_0x372e26(0x1a5)](z,_0x59f697);}[_0x47fc26(0x1a9)](){[[f],[g],[S]]['forEach'](_0x18c6a2=>{const _0x284bd3=_0x260c;this[_0x284bd3(0x1d1)][_0x284bd3(0x1bd)](_0x18c6a2);});}[_0x47fc26(0x196)](){const _0x9ed62=_0x47fc26;this[_0x9ed62(0x1d1)][_0x9ed62(0x1e5)](g),this[_0x9ed62(0x1d1)][_0x9ed62(0x1e5)](S);}};$(b,'pluginName',W),$(b,_0x47fc26(0x1a4),_0xede23f[_0x47fc26(0x1a7)]),b=ie([_0xa6f944(_0x5ec74e,_0x83ef3,_0xc79184),w(0x1,_0x321edf(_0x1f30c6)),w(0x2,_0x54450d)],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 _0x2319(){const _0x5d0f62=['/delete','parse','payload','rangeType','OpenOrReOpen','_injector','user','subscribe','users','/list','body','getCurrentUser','updateComment','userId','replies','40ZLfDWk','172BrtCUe','root','YYYY/MM/DD\x20HH:mm','_httpService','ref','1042281EYBXlf','_threadCommentDataSource','_initUserSync','code','get','Solve','281969ILZRYe','delete','/solved','resolveComment','_configService','requireSession','values','disposeWithMe','find','threadId','userID','UNRECOGNIZED','getMemberID','error','addUser','content','_commentService','onReady','slice','replyId','getOwnPropertyDescriptor','getUser','format','createTimestamp','getComment','_sessionService','solved','syncUpdateMutationToColla','resolved','/add','Solved','type','setConfig','_threadCommentModel','UNIVER_UNKNOWN','Reply','onStarting','17280aVxQUW','_initDataSource','addComment','Delete','1274862hFUalg','reply','_threadCommentDataSourceService','symbol','saveCommentToSnapshot','filter','forEach','237534gtaeKT','_userService','/universer-api/user/list','stringify','/universer-api/comment/unit/','thread-comment-data-source.config','rangeId','post','add','Edit','map','length','commentUpdate$','customRanges','getUnit','comments','Unknown','73479LMqijt','unitId','17646GVUvGS','/edit','COMMENT','Add'];_0x2319=function(){return _0x5d0f62;};return _0x2319();}const _0x47fc26=_0x260c;(function(_0x34ba70,_0x281d95){const _0x164bb9=_0x260c,_0x41c8a0=_0x34ba70();while(!![]){try{const _0x5d2c18=parseInt(_0x164bb9(0x1e7))/0x1+-parseInt(_0x164bb9(0x1c8))/0x2+-parseInt(_0x164bb9(0x1ae))/0x3+parseInt(_0x164bb9(0x1dc))/0x4*(-parseInt(_0x164bb9(0x1aa))/0x5)+-parseInt(_0x164bb9(0x1b5))/0x6+-parseInt(_0x164bb9(0x1c6))/0x7+-parseInt(_0x164bb9(0x1db))/0x8*(-parseInt(_0x164bb9(0x1e1))/0x9);if(_0x5d2c18===_0x281d95)break;else _0x41c8a0['push'](_0x41c8a0['shift']());}catch(_0x57ff1e){_0x41c8a0['push'](_0x41c8a0['shift']());}}}(_0x2319,0x37cbf));import{CommentService as _0x5dcb26,CollaborationSessionService as _0xf33af6,UniverCollaborationClientPlugin as _0x83ef3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xc79184}from'@univerjs-pro/license';import{dayjs as _0x9aa364,UserManagerService as _0x3be824,Inject as _0x321edf,Injector as _0x1f30c6,Disposable as _0x585462,CustomRangeType as _0x2d49c8,UniverInstanceType as _0xede23f,DependentOn as _0xa6f944,IConfigService as _0x54450d,Plugin as _0x2d2250,merge as _0x54b819}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5ec74e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2f0c98,IThreadCommentDataSourceService as _0x41c736}from'@univerjs/thread-comment';import{bufferTime as _0x5c1b54}from'rxjs';import{HTTPService as _0x1c9089}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x260c(_0x1b6059,_0x4b5457){const _0x2319c2=_0x2319();return _0x260c=function(_0x260cb4,_0x1d9c9f){_0x260cb4=_0x260cb4-0x196;let _0x2ba24f=_0x2319c2[_0x260cb4];return _0x2ba24f;},_0x260c(_0x1b6059,_0x4b5457);}var I=(_0x1735f5=>(_0x1735f5[_0x1735f5['OpenOrReOpen']=0x0]=_0x47fc26(0x1d0),_0x1735f5[_0x1735f5[_0x47fc26(0x1a3)]=0x1]=_0x47fc26(0x1a3),_0x1735f5[_0x1735f5[_0x47fc26(0x1f2)]=-0x1]=_0x47fc26(0x1f2),_0x1735f5))(I||{}),v=(_0xa927a8=>(_0xa927a8[_0xa927a8[_0x47fc26(0x1c5)]=0x0]=_0x47fc26(0x1c5),_0xa927a8[_0xa927a8[_0x47fc26(0x1cb)]=0x1]=_0x47fc26(0x1cb),_0xa927a8[_0xa927a8['Reply']=0x2]=_0x47fc26(0x1a8),_0xa927a8[_0xa927a8[_0x47fc26(0x1be)]=0x3]=_0x47fc26(0x1be),_0xa927a8[_0xa927a8[_0x47fc26(0x1ad)]=0x4]='Delete',_0xa927a8[_0xa927a8['Solve']=0x5]=_0x47fc26(0x1e6),_0xa927a8[_0xa927a8[_0x47fc26(0x1f2)]=-0x1]=_0x47fc26(0x1f2),_0xa927a8))(v||{});const D=_0x16a323=>_0x9aa364(new Date(+_0x16a323))[_0x47fc26(0x19b)](_0x47fc26(0x1de)),B=async(_0x2b5b34,_0xb608ae)=>{const _0x5e9aa2=_0x47fc26,_0x166a96=_0x2b5b34[_0x5e9aa2(0x1e5)](_0x3be824),_0x53447d=_0x2b5b34[_0x5e9aa2(0x1e5)](_0x1c9089);_0xb608ae[_0x5e9aa2(0x1b4)](_0x12b073=>{const _0x50362d=_0x5e9aa2;_0x166a96[_0x50362d(0x19a)](_0x12b073)&&_0xb608ae[_0x50362d(0x1e8)](_0x12b073);}),_0xb608ae['size']&&(await _0x53447d[_0x5e9aa2(0x1e5)](_0x5e9aa2(0x1b7),{'params':{'userIDs':[..._0xb608ae]}}))[_0x5e9aa2(0x1d6)][_0x5e9aa2(0x1d4)]['forEach'](_0x218867=>{const _0x55796c=_0x5e9aa2;_0x218867&&_0x166a96[_0x55796c(0x1f5)](_0x218867);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x927c31,_0x5203ba,_0x7daad,_0x33d3a2)=>{for(var _0x13fef0=_0x33d3a2>0x1?void 0x0:_0x33d3a2?K(_0x5203ba,_0x7daad):_0x5203ba,_0x3ab8a3=_0x927c31['length']-0x1,_0x15c4ec;_0x3ab8a3>=0x0;_0x3ab8a3--)(_0x15c4ec=_0x927c31[_0x3ab8a3])&&(_0x13fef0=_0x15c4ec(_0x13fef0)||_0x13fef0);return _0x13fef0;},p=(_0x319415,_0x408d31)=>(_0x3ce163,_0x330555)=>_0x408d31(_0x3ce163,_0x330555,_0x319415);let S=class extends _0x585462{constructor(_0x328b88,_0x299aec,_0x4122a8,_0x371c70){const _0xe29ead=_0x47fc26;super(),this[_0xe29ead(0x1f7)]=_0x328b88,this['_threadCommentModel']=_0x299aec,this[_0xe29ead(0x1b6)]=_0x4122a8,this[_0xe29ead(0x1d1)]=_0x371c70,this['_init'](),this[_0xe29ead(0x1e3)]();}[_0x47fc26(0x1e3)](){const _0x17bd23=_0x47fc26;this[_0x17bd23(0x1ee)](this[_0x17bd23(0x1a6)][_0x17bd23(0x1c1)]['pipe'](_0x5c1b54(0x10))[_0x17bd23(0x1d3)](_0x4c50a4=>{const _0x39c352=new Set();_0x4c50a4['forEach'](_0x4ced81=>{const _0x293fa5=_0x260c;switch(_0x4ced81['type']){case _0x293fa5(0x1bd):{const _0x1259e1=_0x4ced81[_0x293fa5(0x1ce)]['personId'];_0x39c352[_0x293fa5(0x1bd)](_0x1259e1);break;}}}),B(this['_injector'],_0x39c352);}));}['_init'](){const _0x488d94=_0x47fc26;this[_0x488d94(0x1ee)](this['_commentService'][_0x488d94(0x1c1)]['subscribe'](async _0x1d5bc8=>{const _0x117830=_0x488d94;var _0x375766,_0x1b270a,_0x140070,_0x3ca7fa;const _0x1520a3=(_0x375766=this[_0x117830(0x1a6)][_0x117830(0x1c3)](_0x1d5bc8[_0x117830(0x1c7)])[_0x117830(0x1ef)](_0x3d2791=>_0x3d2791[_0x117830(0x1f0)]===_0x1d5bc8['threadId']))==null?void 0x0:_0x375766['root'];if(!_0x1520a3)return;const {unitId:_0xeef3a8,subUnitId:_0x46d4dd}=_0x1520a3;switch(_0x1d5bc8[_0x117830(0x1d2)]&&this[_0x117830(0x1b6)]['addUser'](_0x1d5bc8['user']),_0x1d5bc8[_0x117830(0x1a4)]){case v['Add']:break;case v[_0x117830(0x1a8)]:{this[_0x117830(0x1a6)][_0x117830(0x1ac)](_0xeef3a8,_0x46d4dd,{'unitId':_0xeef3a8,'subUnitId':_0x46d4dd,'ref':'','id':_0x1d5bc8[_0x117830(0x198)],'dT':D(+_0x1d5bc8[_0x117830(0x19c)]),'threadId':_0x1d5bc8['threadId'],'personId':(_0x140070=(_0x1b270a=_0x1d5bc8[_0x117830(0x1d2)])==null?void 0x0:_0x1b270a[_0x117830(0x1f1)])!=null?_0x140070:_0x1d5bc8[_0x117830(0x1d9)],'text':JSON['parse'](_0x1d5bc8[_0x117830(0x1f6)]),'parentId':_0x1520a3['id']});break;}case v[_0x117830(0x1ad)]:{const _0x1583aa=this[_0x117830(0x1a6)][_0x117830(0x19d)](_0xeef3a8,_0x46d4dd,_0x1d5bc8[_0x117830(0x198)]);_0x1583aa&&_0x1583aa['parentId']&&this[_0x117830(0x1a6)]['deleteComment'](_0xeef3a8,_0x46d4dd,_0x1d5bc8[_0x117830(0x198)]);break;}case v[_0x117830(0x1be)]:{this[_0x117830(0x1a6)][_0x117830(0x1d8)](_0xeef3a8,_0x46d4dd,{'commentId':_0x1d5bc8['replyId'],'text':JSON[_0x117830(0x1cd)](_0x1d5bc8[_0x117830(0x1f6)])});break;}case v[_0x117830(0x1e6)]:{const _0x43ddca=(_0x3ca7fa=this[_0x117830(0x1a6)][_0x117830(0x1c3)](_0x1d5bc8['unitId'])[_0x117830(0x1ef)](_0x1ead56=>_0x1ead56[_0x117830(0x1f0)]===_0x1d5bc8[_0x117830(0x1f0)]))==null?void 0x0:_0x3ca7fa[_0x117830(0x1dd)];_0x43ddca&&this[_0x117830(0x1a6)][_0x117830(0x1ea)](_0xeef3a8,_0x46d4dd,_0x43ddca['id'],_0x1d5bc8[_0x117830(0x19f)]===I[_0x117830(0x1a3)]);break;}}}));}};S=V([p(0x0,_0x321edf(_0x5dcb26)),p(0x1,_0x321edf(_0x2f0c98)),p(0x2,_0x321edf(_0x3be824)),p(0x3,_0x321edf(_0x1f30c6))],S);const z=_0x47fc26(0x1ba),M={};var k=Object[_0x47fc26(0x199)],Q=(_0xb09a87,_0x49f828,_0x39d4ac,_0x11304b)=>{const _0x5f43b1=_0x47fc26;for(var _0x2a38ae=_0x11304b>0x1?void 0x0:_0x11304b?k(_0x49f828,_0x39d4ac):_0x49f828,_0xae389=_0xb09a87[_0x5f43b1(0x1c0)]-0x1,_0x4b9d81;_0xae389>=0x0;_0xae389--)(_0x4b9d81=_0xb09a87[_0xae389])&&(_0x2a38ae=_0x4b9d81(_0x2a38ae)||_0x2a38ae);return _0x2a38ae;},_=(_0x35d2f9,_0x1ad20e)=>(_0x437467,_0x3bf411)=>_0x1ad20e(_0x437467,_0x3bf411,_0x35d2f9);function X(_0x13a250,_0x3481b4){const _0x4c4870=_0x47fc26,_0x30cb26=_0x13a250[_0x4c4870(0x1da)][0x0];return{..._0x3481b4,'id':_0x30cb26['replyId'],'resolved':_0x13a250[_0x4c4870(0x19f)]===0x1,'dT':D(_0x30cb26[_0x4c4870(0x19c)]),'personId':_0x30cb26[_0x4c4870(0x1d9)],'threadId':_0x30cb26[_0x4c4870(0x1f0)]};}function ee(_0x36cb90,_0x243ef9,_0x36dd4b){const _0x491b54=_0x47fc26;var _0x1bdd23,_0x3e3238;if(((_0x3e3238=(_0x1bdd23=_0x36cb90==null?void 0x0:_0x36cb90[_0x491b54(0x1da)])==null?void 0x0:_0x1bdd23[_0x491b54(0x1c0)])!=null?_0x3e3238:0x0)>0x0){const _0x2ee385=(_0x4deaeb,_0x527cf1)=>({'id':_0x4deaeb[_0x491b54(0x198)],'threadId':_0x4deaeb[_0x491b54(0x1f0)],'dT':D(_0x4deaeb[_0x491b54(0x19c)]),'personId':_0x4deaeb[_0x491b54(0x1d9)],'resolved':_0x36cb90[_0x491b54(0x19f)]===I[_0x491b54(0x1a3)],'unitId':_0x243ef9,'subUnitId':_0x36dd4b,'text':JSON[_0x491b54(0x1cd)](_0x4deaeb[_0x491b54(0x1f6)]),'parentId':_0x527cf1}),_0x28a5c6=_0x2ee385(_0x36cb90[_0x491b54(0x1da)][0x0]);return{..._0x28a5c6,'children':_0x36cb90[_0x491b54(0x1da)][_0x491b54(0x197)](0x1)[_0x491b54(0x1bf)](_0x43b292=>_0x2ee385(_0x43b292,_0x28a5c6['id']))};}return null;}let f=class{constructor(_0xabc3b9,_0x3519ce,_0x521326,_0x36f213){const _0x283bd4=_0x47fc26;this[_0x283bd4(0x1df)]=_0xabc3b9,this[_0x283bd4(0x1b6)]=_0x3519ce,this['_sessionService']=_0x521326,this[_0x283bd4(0x1d1)]=_0x36f213;}async[_0x47fc26(0x1ac)](_0x52630d){const _0x2eb6c6=_0x47fc26;var _0x23bfc9,_0x42c2ba;const {parentId:_0x25451b,unitId:_0x31df77,text:_0x5e6e3e,threadId:_0x3794f7}=_0x52630d,_0x6d3777=(_0x42c2ba=(_0x23bfc9=_0x5e6e3e[_0x2eb6c6(0x1c2)])==null?void 0x0:_0x23bfc9[_0x2eb6c6(0x1b3)](_0x549e21=>_0x549e21[_0x2eb6c6(0x1cf)]===_0x2d49c8[_0x2eb6c6(0x1ca)])[_0x2eb6c6(0x1bf)](_0x3ae6da=>_0x3ae6da[_0x2eb6c6(0x1bb)]))!=null?_0x42c2ba:[],_0xfc668a=JSON[_0x2eb6c6(0x1b8)](_0x5e6e3e),_0xa4f0eb=(await this[_0x2eb6c6(0x19e)][_0x2eb6c6(0x1ec)](_0x31df77))['getMemberID']();if(_0x25451b){const _0x549871={'memberId':_0xa4f0eb,'unitId':_0x31df77,'content':_0xfc668a,'mention':_0x6d3777,'threadId':_0x3794f7},_0x3343f1=(await this[_0x2eb6c6(0x1df)]['post'](_0x2eb6c6(0x1b9)+_0x31df77+'/reply',{'body':_0x549871}))['body'][_0x2eb6c6(0x1af)];return{..._0x52630d,'id':_0x3343f1[_0x2eb6c6(0x198)],'dT':_0x9aa364(+_0x3343f1[_0x2eb6c6(0x19c)])['format'](_0x2eb6c6(0x1de)),'personId':_0x3343f1[_0x2eb6c6(0x1d9)]};}else{const _0x3b5f58={'memberId':_0xa4f0eb,'unitId':_0x31df77,'content':_0xfc668a,'mention':_0x6d3777},_0x1064e7=await this[_0x2eb6c6(0x1df)][_0x2eb6c6(0x1bc)](_0x2eb6c6(0x1b9)+_0x31df77+_0x2eb6c6(0x1a2),{'body':_0x3b5f58});return X(_0x1064e7['body']['comment'],_0x52630d);}}async[_0x47fc26(0x1d8)](_0x3f2525){const _0x135b2c=_0x47fc26;var _0x532785,_0x1c5ce6;const {text:_0x34b779,unitId:_0x45480a}=_0x3f2525,_0x2555c6=(_0x1c5ce6=(_0x532785=_0x34b779[_0x135b2c(0x1c2)])==null?void 0x0:_0x532785[_0x135b2c(0x1b3)](_0x356601=>_0x356601[_0x135b2c(0x1cf)]===_0x2d49c8[_0x135b2c(0x1ca)])[_0x135b2c(0x1bf)](_0x16f542=>_0x16f542[_0x135b2c(0x1bb)]))!=null?_0x1c5ce6:[],_0x1f488d=JSON[_0x135b2c(0x1b8)](_0x34b779),_0x346b58=_0x3f2525[_0x135b2c(0x1f0)],_0x576f41=_0x3f2525['id'],_0xc798ea={'memberId':(await this[_0x135b2c(0x19e)][_0x135b2c(0x1ec)](_0x45480a))[_0x135b2c(0x1f3)](),'unitId':_0x45480a,'threadId':_0x346b58,'mention':_0x2555c6,'content':_0x1f488d,'replyId':_0x576f41},_0x56a8b3=await this['_httpService']['post'](_0x135b2c(0x1b9)+_0x45480a+_0x135b2c(0x1c9),{'body':_0xc798ea});return!_0x56a8b3[_0x135b2c(0x1d6)]['error']||_0x56a8b3[_0x135b2c(0x1d6)][_0x135b2c(0x1f4)][_0x135b2c(0x1e4)]===0x1;}async[_0x47fc26(0x1ea)](_0x4cdbc9){const _0x352b68=_0x47fc26,{unitId:_0x395a1e}=_0x4cdbc9,_0x248276=_0x4cdbc9[_0x352b68(0x1f0)],_0x395e81={'memberId':this[_0x352b68(0x1b6)][_0x352b68(0x1d7)]()[_0x352b68(0x1f1)],'unitId':_0x395a1e,'threadId':_0x248276,'solved':_0x4cdbc9[_0x352b68(0x1a1)]?I[_0x352b68(0x1a3)]:I['OpenOrReOpen']},_0x3938f9=await this['_httpService'][_0x352b68(0x1bc)](_0x352b68(0x1b9)+_0x395a1e+_0x352b68(0x1e9),{'body':_0x395e81});return!_0x3938f9[_0x352b68(0x1d6)][_0x352b68(0x1f4)]||_0x3938f9[_0x352b68(0x1d6)][_0x352b68(0x1f4)]['code']===0x1;}async['deleteComment'](_0x19388c,_0x13ffcc,_0x109415,_0x536d68){const _0x4a289e=_0x47fc26,_0x2b09eb={'memberId':(await this['_sessionService'][_0x4a289e(0x1ec)](_0x19388c))['getMemberID'](),'threadId':_0x109415,'replyId':_0x536d68,'unitId':_0x19388c},_0x223195=await this[_0x4a289e(0x1df)][_0x4a289e(0x1bc)](_0x4a289e(0x1b9)+_0x19388c+_0x4a289e(0x1cc),{'body':_0x2b09eb});return!_0x223195[_0x4a289e(0x1d6)][_0x4a289e(0x1f4)]||_0x223195[_0x4a289e(0x1d6)][_0x4a289e(0x1f4)]['code']===0x1;}async['listComments'](_0x57d844,_0xe2c5f7,_0x474ede){const _0x248abd=_0x47fc26,_0x384bc3={'unitId':_0x57d844,'threadId':_0x474ede},_0x1e8b60=await this[_0x248abd(0x1df)][_0x248abd(0x1bc)](_0x248abd(0x1b9)+_0x57d844+_0x248abd(0x1d5),{'body':_0x384bc3}),_0x5d5815=_0x474ede['map'](_0x3835e5=>ee(_0x1e8b60['body'][_0x248abd(0x1c4)][_0x3835e5],_0x57d844,_0xe2c5f7))['filter'](Boolean);return Object[_0x248abd(0x1ed)](_0x1e8b60[_0x248abd(0x1d6)][_0x248abd(0x1d4)])[_0x248abd(0x1b4)](_0x20a2ef=>{const _0x9d257f=_0x248abd;this['_userService'][_0x9d257f(0x1f5)](_0x20a2ef);}),_0x5d5815;}[_0x47fc26(0x1b2)](_0x565e7e){const _0x52ea76=_0x47fc26;return{'id':_0x565e7e['id'],'threadId':_0x565e7e[_0x52ea76(0x1f0)],'ref':_0x565e7e[_0x52ea76(0x1e0)]};}};f=Q([_(0x0,_0x321edf(_0x1c9089)),_(0x1,_0x321edf(_0x3be824)),_(0x2,_0x321edf(_0xf33af6)),_(0x3,_0x321edf(_0x1f30c6))],f);var re=Object[_0x47fc26(0x199)],te=(_0x4a0a8d,_0x678ea1,_0x36a12c,_0x508e21)=>{const _0x359bd0=_0x47fc26;for(var _0x1986fb=_0x508e21>0x1?void 0x0:_0x508e21?re(_0x678ea1,_0x36a12c):_0x678ea1,_0x14943a=_0x4a0a8d[_0x359bd0(0x1c0)]-0x1,_0x5b2474;_0x14943a>=0x0;_0x14943a--)(_0x5b2474=_0x4a0a8d[_0x14943a])&&(_0x1986fb=_0x5b2474(_0x1986fb)||_0x1986fb);return _0x1986fb;},N=(_0x50fb3c,_0x55a612)=>(_0x3d1b84,_0x389020)=>_0x55a612(_0x3d1b84,_0x389020,_0x50fb3c);let g=class extends _0x585462{constructor(_0x2dd2b4,_0x59b55b){const _0x109c38=_0x47fc26;super(),this['_threadCommentDataSourceService']=_0x2dd2b4,this[_0x109c38(0x1e2)]=_0x59b55b,this[_0x109c38(0x1ab)]();}['_initDataSource'](){const _0x49f5d8=_0x47fc26;this['_threadCommentDataSourceService']['dataSource']=this[_0x49f5d8(0x1e2)],this[_0x49f5d8(0x1b0)][_0x49f5d8(0x1a0)]=!0x1;}};g=te([N(0x0,_0x41c736),N(0x1,_0x321edf(f))],g);var se=Object['defineProperty'],oe=Object[_0x47fc26(0x199)],ne=(_0x1efed7,_0x3878e0,_0x1dfefd)=>_0x3878e0 in _0x1efed7?se(_0x1efed7,_0x3878e0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1dfefd}):_0x1efed7[_0x3878e0]=_0x1dfefd,ie=(_0x49bc90,_0x15fb9c,_0x19e5c9,_0xfb9733)=>{const _0x51b755=_0x47fc26;for(var _0x4b70bb=_0xfb9733>0x1?void 0x0:_0xfb9733?oe(_0x15fb9c,_0x19e5c9):_0x15fb9c,_0x2b4c59=_0x49bc90[_0x51b755(0x1c0)]-0x1,_0x5e1f2a;_0x2b4c59>=0x0;_0x2b4c59--)(_0x5e1f2a=_0x49bc90[_0x2b4c59])&&(_0x4b70bb=_0x5e1f2a(_0x4b70bb)||_0x4b70bb);return _0x4b70bb;},w=(_0x39523f,_0x2f4b3c)=>(_0x34bfe4,_0x237f64)=>_0x2f4b3c(_0x34bfe4,_0x237f64,_0x39523f),$=(_0x4a94e3,_0x1c03af,_0x5e4f58)=>ne(_0x4a94e3,typeof _0x1c03af!=_0x47fc26(0x1b1)?_0x1c03af+'':_0x1c03af,_0x5e4f58);let b=class extends _0x2d2250{constructor(_0x45ee8c=M,_0x2f3010,_0x1dd338){const _0x372e26=_0x47fc26;super(),this['_config']=_0x45ee8c,this[_0x372e26(0x1d1)]=_0x2f3010,this[_0x372e26(0x1eb)]=_0x1dd338;const {..._0x59f697}=_0x54b819({},M,this['_config']);this[_0x372e26(0x1eb)][_0x372e26(0x1a5)](z,_0x59f697);}[_0x47fc26(0x1a9)](){[[f],[g],[S]]['forEach'](_0x18c6a2=>{const _0x284bd3=_0x260c;this[_0x284bd3(0x1d1)][_0x284bd3(0x1bd)](_0x18c6a2);});}[_0x47fc26(0x196)](){const _0x9ed62=_0x47fc26;this[_0x9ed62(0x1d1)][_0x9ed62(0x1e5)](g),this[_0x9ed62(0x1d1)][_0x9ed62(0x1e5)](S);}};$(b,'pluginName',W),$(b,_0x47fc26(0x1a4),_0xede23f[_0x47fc26(0x1a7)]),b=ie([_0xa6f944(_0x5ec74e,_0x83ef3,_0xc79184),w(0x1,_0x321edf(_0x1f30c6)),w(0x2,_0x54450d)],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(_0x20017f,_0x9da6d5){const _0x9cea28=_0x3c17,_0x4fda3d=_0x20017f();while(!![]){try{const _0x15636a=-parseInt(_0x9cea28(0x1ce))/0x1*(-parseInt(_0x9cea28(0x1fd))/0x2)+-parseInt(_0x9cea28(0x1f2))/0x3+parseInt(_0x9cea28(0x1f0))/0x4*(-parseInt(_0x9cea28(0x226))/0x5)+parseInt(_0x9cea28(0x1fb))/0x6*(parseInt(_0x9cea28(0x1d7))/0x7)+parseInt(_0x9cea28(0x1eb))/0x8+-parseInt(_0x9cea28(0x1e1))/0x9*(parseInt(_0x9cea28(0x1b5))/0xa)+-parseInt(_0x9cea28(0x1ad))/0xb*(-parseInt(_0x9cea28(0x1f3))/0xc);if(_0x15636a===_0x9da6d5)break;else _0x4fda3d['push'](_0x4fda3d['shift']());}catch(_0x19b3c6){_0x4fda3d['push'](_0x4fda3d['shift']());}}}(_0xe3de,0xcf058),function(_0x441c75,_0x28be67){const _0xf37031=_0x3c17;typeof exports=='object'&&typeof module<'u'?_0x28be67(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==_0xf37031(0x1a4)&&define[_0xf37031(0x218)]?define([_0xf37031(0x1b0),_0xf37031(0x20b),'@univerjs-pro/license','@univerjs/core','@univerjs/thread-comment-ui',_0xf37031(0x1e8),_0xf37031(0x22a),_0xf37031(0x21c)],_0x28be67):(_0x441c75=typeof globalThis<'u'?globalThis:_0x441c75||self,_0x28be67(_0x441c75[_0xf37031(0x1a9)]={},_0x441c75['UniverProCollaborationClient'],_0x441c75['UniverProLicense'],_0x441c75[_0xf37031(0x204)],_0x441c75[_0xf37031(0x208)],_0x441c75[_0xf37031(0x1ff)],_0x441c75[_0xf37031(0x22a)],_0x441c75['UniverNetwork']));}(this,function(_0x4f18fd,_0x27707d,_0x2e38c4,_0x36e2ec,_0x53f578,_0x1a56f1,_0x5e0e6d,_0x49a291){'use strict';const _0x162ef1=_0x3c17;const _0x1be69d=_0x162ef1(0x1a8);var _0x4fe311=(_0x1fe0e3=>(_0x1fe0e3[_0x1fe0e3['OpenOrReOpen']=0x0]=_0x162ef1(0x1a2),_0x1fe0e3[_0x1fe0e3['Solved']=0x1]=_0x162ef1(0x20d),_0x1fe0e3[_0x1fe0e3[_0x162ef1(0x1cb)]=-0x1]='UNRECOGNIZED',_0x1fe0e3))(_0x4fe311||{}),_0x2fcded=(_0x50243f=>(_0x50243f[_0x50243f[_0x162ef1(0x216)]=0x0]='Unknown',_0x50243f[_0x50243f['Add']=0x1]='Add',_0x50243f[_0x50243f[_0x162ef1(0x1ac)]=0x2]=_0x162ef1(0x1ac),_0x50243f[_0x50243f[_0x162ef1(0x1d2)]=0x3]=_0x162ef1(0x1d2),_0x50243f[_0x50243f[_0x162ef1(0x1e3)]=0x4]=_0x162ef1(0x1e3),_0x50243f[_0x50243f[_0x162ef1(0x210)]=0x5]=_0x162ef1(0x210),_0x50243f[_0x50243f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x50243f))(_0x2fcded||{});const _0x4b5b8b=_0x23e4f5=>_0x36e2ec['dayjs'](new Date(+_0x23e4f5))[_0x162ef1(0x200)](_0x162ef1(0x1d9)),_0x2e3032=async(_0x12be96,_0x5110b0)=>{const _0x1fe7b0=_0x162ef1,_0x238f7d=_0x12be96[_0x1fe7b0(0x229)](_0x36e2ec['UserManagerService']),_0x49ca52=_0x12be96[_0x1fe7b0(0x229)](_0x49a291[_0x1fe7b0(0x1e9)]);_0x5110b0['forEach'](_0x21b4a5=>{const _0x532a84=_0x1fe7b0;_0x238f7d[_0x532a84(0x1af)](_0x21b4a5)&&_0x5110b0[_0x532a84(0x1bd)](_0x21b4a5);}),_0x5110b0['size']&&(await _0x49ca52[_0x1fe7b0(0x229)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5110b0]}}))[_0x1fe7b0(0x20e)][_0x1fe7b0(0x1d5)][_0x1fe7b0(0x1dd)](_0x12f942=>{const _0x45aa9c=_0x1fe7b0;_0x12f942&&_0x238f7d[_0x45aa9c(0x219)](_0x12f942);});};var _0x52240f=Object[_0x162ef1(0x206)],_0x5568ba=(_0x59e142,_0x1adeea,_0x57bf8d,_0x3c650e)=>{const _0xdf4eb1=_0x162ef1;for(var _0x38e378=_0x3c650e>0x1?void 0x0:_0x3c650e?_0x52240f(_0x1adeea,_0x57bf8d):_0x1adeea,_0x75fae8=_0x59e142[_0xdf4eb1(0x1d6)]-0x1,_0x3e3437;_0x75fae8>=0x0;_0x75fae8--)(_0x3e3437=_0x59e142[_0x75fae8])&&(_0x38e378=_0x3e3437(_0x38e378)||_0x38e378);return _0x38e378;},_0x3f603f=(_0x117571,_0x1ef572)=>(_0x465310,_0x3b3ba0)=>_0x1ef572(_0x465310,_0x3b3ba0,_0x117571);let _0x26bce3=class extends _0x36e2ec['Disposable']{constructor(_0x895ad,_0x28f732,_0x1d5370,_0x162010){const _0x43549c=_0x162ef1;super(),this['_commentService']=_0x895ad,this[_0x43549c(0x21d)]=_0x28f732,this[_0x43549c(0x20c)]=_0x1d5370,this[_0x43549c(0x21a)]=_0x162010,this[_0x43549c(0x1e5)](),this[_0x43549c(0x1cd)]();}[_0x162ef1(0x1cd)](){const _0x21592a=_0x162ef1;this['disposeWithMe'](this[_0x21592a(0x21d)]['commentUpdate$'][_0x21592a(0x1b6)](_0x5e0e6d[_0x21592a(0x202)](0x10))[_0x21592a(0x1c8)](_0x53c964=>{const _0x3fde3d=_0x21592a,_0x4e1bdb=new Set();_0x53c964[_0x3fde3d(0x1dd)](_0x2265c5=>{const _0x618ed0=_0x3fde3d;switch(_0x2265c5[_0x618ed0(0x1cc)]){case _0x618ed0(0x207):{const _0x6eb410=_0x2265c5[_0x618ed0(0x1d1)][_0x618ed0(0x225)];_0x4e1bdb[_0x618ed0(0x207)](_0x6eb410);break;}}}),_0x2e3032(this[_0x3fde3d(0x21a)],_0x4e1bdb);}));}[_0x162ef1(0x1e5)](){const _0x5b6fe3=_0x162ef1;this[_0x5b6fe3(0x1a1)](this[_0x5b6fe3(0x1c6)][_0x5b6fe3(0x1ca)][_0x5b6fe3(0x1c8)](async _0x2838b7=>{const _0x4a5155=_0x5b6fe3;var _0x3b1395,_0x147285,_0x1fe734,_0xbcf770;const _0x361017=(_0x3b1395=this[_0x4a5155(0x21d)][_0x4a5155(0x1ab)](_0x2838b7[_0x4a5155(0x1ee)])[_0x4a5155(0x1e7)](_0x35ecd9=>_0x35ecd9[_0x4a5155(0x21f)]===_0x2838b7['threadId']))==null?void 0x0:_0x3b1395['root'];if(!_0x361017)return;const {unitId:_0x4edb60,subUnitId:_0x260997}=_0x361017;switch(_0x2838b7[_0x4a5155(0x1bc)]&&this[_0x4a5155(0x20c)][_0x4a5155(0x219)](_0x2838b7[_0x4a5155(0x1bc)]),_0x2838b7['type']){case _0x2fcded['Add']:break;case _0x2fcded[_0x4a5155(0x1ac)]:{this['_threadCommentModel'][_0x4a5155(0x1c3)](_0x4edb60,_0x260997,{'unitId':_0x4edb60,'subUnitId':_0x260997,'ref':'','id':_0x2838b7['replyId'],'dT':_0x4b5b8b(+_0x2838b7[_0x4a5155(0x1b8)]),'threadId':_0x2838b7[_0x4a5155(0x21f)],'personId':(_0x1fe734=(_0x147285=_0x2838b7[_0x4a5155(0x1bc)])==null?void 0x0:_0x147285[_0x4a5155(0x1c0)])!=null?_0x1fe734:_0x2838b7[_0x4a5155(0x227)],'text':JSON['parse'](_0x2838b7[_0x4a5155(0x1f7)]),'parentId':_0x361017['id']});break;}case _0x2fcded[_0x4a5155(0x1e3)]:{const _0x4a3483=this['_threadCommentModel'][_0x4a5155(0x1c9)](_0x4edb60,_0x260997,_0x2838b7[_0x4a5155(0x1b4)]);_0x4a3483&&_0x4a3483[_0x4a5155(0x20f)]&&this[_0x4a5155(0x21d)][_0x4a5155(0x1b2)](_0x4edb60,_0x260997,_0x2838b7['replyId']);break;}case _0x2fcded['Edit']:{this[_0x4a5155(0x21d)][_0x4a5155(0x1b9)](_0x4edb60,_0x260997,{'commentId':_0x2838b7[_0x4a5155(0x1b4)],'text':JSON[_0x4a5155(0x1dc)](_0x2838b7[_0x4a5155(0x1f7)])});break;}case _0x2fcded['Solve']:{const _0x3c6a27=(_0xbcf770=this[_0x4a5155(0x21d)]['getUnit'](_0x2838b7[_0x4a5155(0x1ee)])[_0x4a5155(0x1e7)](_0x151e5e=>_0x151e5e[_0x4a5155(0x21f)]===_0x2838b7[_0x4a5155(0x21f)]))==null?void 0x0:_0xbcf770[_0x4a5155(0x1ef)];_0x3c6a27&&this['_threadCommentModel']['resolveComment'](_0x4edb60,_0x260997,_0x3c6a27['id'],_0x2838b7[_0x4a5155(0x1fc)]===_0x4fe311[_0x4a5155(0x20d)]);break;}}}));}};_0x26bce3=_0x5568ba([_0x3f603f(0x0,_0x36e2ec[_0x162ef1(0x1a6)](_0x27707d['CommentService'])),_0x3f603f(0x1,_0x36e2ec['Inject'](_0x1a56f1[_0x162ef1(0x1be)])),_0x3f603f(0x2,_0x36e2ec[_0x162ef1(0x1a6)](_0x36e2ec[_0x162ef1(0x1df)])),_0x3f603f(0x3,_0x36e2ec['Inject'](_0x36e2ec[_0x162ef1(0x1c4)]))],_0x26bce3);const _0x2a6a6e=_0x162ef1(0x212),_0x2d0d8f={};var _0x4c7736=Object['getOwnPropertyDescriptor'],_0x4b5860=(_0x557e34,_0x3ef565,_0x3486cd,_0x39a76b)=>{const _0x4e5818=_0x162ef1;for(var _0x3c2ecc=_0x39a76b>0x1?void 0x0:_0x39a76b?_0x4c7736(_0x3ef565,_0x3486cd):_0x3ef565,_0x5b8fa9=_0x557e34[_0x4e5818(0x1d6)]-0x1,_0x59ad06;_0x5b8fa9>=0x0;_0x5b8fa9--)(_0x59ad06=_0x557e34[_0x5b8fa9])&&(_0x3c2ecc=_0x59ad06(_0x3c2ecc)||_0x3c2ecc);return _0x3c2ecc;},_0x8e5bc9=(_0x161d2d,_0x86ace)=>(_0xa3eae2,_0x277b7a)=>_0x86ace(_0xa3eae2,_0x277b7a,_0x161d2d);function _0x24ed59(_0x351768,_0x4d4818){const _0x55d84a=_0x162ef1,_0x4f26df=_0x351768[_0x55d84a(0x1fa)][0x0];return{..._0x4d4818,'id':_0x4f26df['replyId'],'resolved':_0x351768['solved']===0x1,'dT':_0x4b5b8b(_0x4f26df[_0x55d84a(0x1b8)]),'personId':_0x4f26df[_0x55d84a(0x227)],'threadId':_0x4f26df[_0x55d84a(0x21f)]};}function _0x2db9fb(_0x1e614c,_0x13ee02,_0x24774f){const _0x5ac472=_0x162ef1;var _0x33da79,_0x55fdc2;if(((_0x55fdc2=(_0x33da79=_0x1e614c==null?void 0x0:_0x1e614c['replies'])==null?void 0x0:_0x33da79[_0x5ac472(0x1d6)])!=null?_0x55fdc2:0x0)>0x0){const _0x3135a5=(_0x7ae1a8,_0x456b31)=>({'id':_0x7ae1a8[_0x5ac472(0x1b4)],'threadId':_0x7ae1a8[_0x5ac472(0x21f)],'dT':_0x4b5b8b(_0x7ae1a8[_0x5ac472(0x1b8)]),'personId':_0x7ae1a8['userId'],'resolved':_0x1e614c[_0x5ac472(0x1fc)]===_0x4fe311[_0x5ac472(0x20d)],'unitId':_0x13ee02,'subUnitId':_0x24774f,'text':JSON['parse'](_0x7ae1a8[_0x5ac472(0x1f7)]),'parentId':_0x456b31}),_0x2e9a2c=_0x3135a5(_0x1e614c['replies'][0x0]);return{..._0x2e9a2c,'children':_0x1e614c[_0x5ac472(0x1fa)][_0x5ac472(0x1cf)](0x1)[_0x5ac472(0x217)](_0x16cd70=>_0x3135a5(_0x16cd70,_0x2e9a2c['id']))};}return null;}let _0x39b1bf=class{constructor(_0x911241,_0x3c0e3d,_0x10dea7,_0x383024){const _0x591153=_0x162ef1;this[_0x591153(0x1bb)]=_0x911241,this[_0x591153(0x20c)]=_0x3c0e3d,this['_sessionService']=_0x10dea7,this[_0x591153(0x21a)]=_0x383024;}async[_0x162ef1(0x1c3)](_0x143599){const _0x31a9f3=_0x162ef1;var _0x5d83e2,_0x1cfb64;const {parentId:_0x388039,unitId:_0x4f9ecd,text:_0x46745d,threadId:_0x509d0a}=_0x143599,_0xa9a6d6=(_0x1cfb64=(_0x5d83e2=_0x46745d[_0x31a9f3(0x20a)])==null?void 0x0:_0x5d83e2['filter'](_0x1cdcb0=>_0x1cdcb0[_0x31a9f3(0x1b7)]===_0x36e2ec[_0x31a9f3(0x1e4)][_0x31a9f3(0x213)])[_0x31a9f3(0x217)](_0x505480=>_0x505480['rangeId']))!=null?_0x1cfb64:[],_0x3a54e0=JSON[_0x31a9f3(0x1ba)](_0x46745d),_0x91760=(await this['_sessionService'][_0x31a9f3(0x1c7)](_0x4f9ecd))[_0x31a9f3(0x205)]();if(_0x388039){const _0xa4ab4b={'memberId':_0x91760,'unitId':_0x4f9ecd,'content':_0x3a54e0,'mention':_0xa9a6d6,'threadId':_0x509d0a},_0x1644f7=(await this[_0x31a9f3(0x1bb)]['post']('/universer-api/comment/unit/'+_0x4f9ecd+_0x31a9f3(0x1c2),{'body':_0xa4ab4b}))[_0x31a9f3(0x20e)][_0x31a9f3(0x1ae)];return{..._0x143599,'id':_0x1644f7[_0x31a9f3(0x1b4)],'dT':_0x36e2ec['dayjs'](+_0x1644f7[_0x31a9f3(0x1b8)])[_0x31a9f3(0x200)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1644f7[_0x31a9f3(0x227)]};}else{const _0x5741fa={'memberId':_0x91760,'unitId':_0x4f9ecd,'content':_0x3a54e0,'mention':_0xa9a6d6},_0x367f0d=await this[_0x31a9f3(0x1bb)]['post'](_0x31a9f3(0x1f1)+_0x4f9ecd+_0x31a9f3(0x1bf),{'body':_0x5741fa});return _0x24ed59(_0x367f0d[_0x31a9f3(0x20e)][_0x31a9f3(0x1ed)],_0x143599);}}async[_0x162ef1(0x1b9)](_0x5920c1){const _0x24c8af=_0x162ef1;var _0x5d7696,_0x17ba2a;const {text:_0x141ee8,unitId:_0x417d63}=_0x5920c1,_0x49f208=(_0x17ba2a=(_0x5d7696=_0x141ee8['customRanges'])==null?void 0x0:_0x5d7696[_0x24c8af(0x1f4)](_0x49794b=>_0x49794b[_0x24c8af(0x1b7)]===_0x36e2ec['CustomRangeType']['COMMENT'])[_0x24c8af(0x217)](_0x495a01=>_0x495a01[_0x24c8af(0x1f5)]))!=null?_0x17ba2a:[],_0x488fa8=JSON['stringify'](_0x141ee8),_0x3a446a=_0x5920c1[_0x24c8af(0x21f)],_0x199d67=_0x5920c1['id'],_0x24c635={'memberId':(await this[_0x24c8af(0x1b1)][_0x24c8af(0x1c7)](_0x417d63))[_0x24c8af(0x205)](),'unitId':_0x417d63,'threadId':_0x3a446a,'mention':_0x49f208,'content':_0x488fa8,'replyId':_0x199d67},_0x2631ed=await this[_0x24c8af(0x1bb)][_0x24c8af(0x1e0)](_0x24c8af(0x1f1)+_0x417d63+_0x24c8af(0x1f6),{'body':_0x24c635});return!_0x2631ed['body'][_0x24c8af(0x1d4)]||_0x2631ed[_0x24c8af(0x20e)][_0x24c8af(0x1d4)]['code']===0x1;}async[_0x162ef1(0x1f8)](_0x4a9958){const _0x3c35ff=_0x162ef1,{unitId:_0x56720c}=_0x4a9958,_0x321e5d=_0x4a9958[_0x3c35ff(0x21f)],_0x567d6c={'memberId':this[_0x3c35ff(0x20c)][_0x3c35ff(0x1e2)]()[_0x3c35ff(0x1c0)],'unitId':_0x56720c,'threadId':_0x321e5d,'solved':_0x4a9958[_0x3c35ff(0x1e6)]?_0x4fe311[_0x3c35ff(0x20d)]:_0x4fe311[_0x3c35ff(0x1a2)]},_0x268382=await this[_0x3c35ff(0x1bb)]['post']('/universer-api/comment/unit/'+_0x56720c+_0x3c35ff(0x1a7),{'body':_0x567d6c});return!_0x268382[_0x3c35ff(0x20e)]['error']||_0x268382['body'][_0x3c35ff(0x1d4)][_0x3c35ff(0x1ec)]===0x1;}async[_0x162ef1(0x1b2)](_0x3f3c33,_0x1caf73,_0x2f208d,_0x272fe4){const _0x4012e4=_0x162ef1,_0x44aeae={'memberId':(await this[_0x4012e4(0x1b1)][_0x4012e4(0x1c7)](_0x3f3c33))['getMemberID'](),'threadId':_0x2f208d,'replyId':_0x272fe4,'unitId':_0x3f3c33},_0x2397d7=await this[_0x4012e4(0x1bb)][_0x4012e4(0x1e0)]('/universer-api/comment/unit/'+_0x3f3c33+'/delete',{'body':_0x44aeae});return!_0x2397d7['body'][_0x4012e4(0x1d4)]||_0x2397d7[_0x4012e4(0x20e)][_0x4012e4(0x1d4)][_0x4012e4(0x1ec)]===0x1;}async[_0x162ef1(0x21e)](_0x49d0e9,_0x35de42,_0x26e106){const _0x4b754d=_0x162ef1,_0x4ecfcc={'unitId':_0x49d0e9,'threadId':_0x26e106},_0x42ee52=await this[_0x4b754d(0x1bb)][_0x4b754d(0x1e0)](_0x4b754d(0x1f1)+_0x49d0e9+_0x4b754d(0x209),{'body':_0x4ecfcc}),_0x45239a=_0x26e106[_0x4b754d(0x217)](_0x3d8495=>_0x2db9fb(_0x42ee52[_0x4b754d(0x20e)][_0x4b754d(0x1d8)][_0x3d8495],_0x49d0e9,_0x35de42))[_0x4b754d(0x1f4)](Boolean);return Object[_0x4b754d(0x21b)](_0x42ee52[_0x4b754d(0x20e)][_0x4b754d(0x1d5)])[_0x4b754d(0x1dd)](_0x1f8509=>{const _0x54ec3d=_0x4b754d;this[_0x54ec3d(0x20c)][_0x54ec3d(0x219)](_0x1f8509);}),_0x45239a;}[_0x162ef1(0x201)](_0x2f5c64){const _0x482819=_0x162ef1;return{'id':_0x2f5c64['id'],'threadId':_0x2f5c64[_0x482819(0x21f)],'ref':_0x2f5c64[_0x482819(0x1d3)]};}};_0x39b1bf=_0x4b5860([_0x8e5bc9(0x0,_0x36e2ec[_0x162ef1(0x1a6)](_0x49a291['HTTPService'])),_0x8e5bc9(0x1,_0x36e2ec[_0x162ef1(0x1a6)](_0x36e2ec[_0x162ef1(0x1df)])),_0x8e5bc9(0x2,_0x36e2ec[_0x162ef1(0x1a6)](_0x27707d[_0x162ef1(0x228)])),_0x8e5bc9(0x3,_0x36e2ec[_0x162ef1(0x1a6)](_0x36e2ec[_0x162ef1(0x1c4)]))],_0x39b1bf);var _0x209822=Object[_0x162ef1(0x206)],_0x1afb0a=(_0x1c784a,_0x29dc53,_0x225288,_0x1ca312)=>{const _0x35655e=_0x162ef1;for(var _0x4c3f69=_0x1ca312>0x1?void 0x0:_0x1ca312?_0x209822(_0x29dc53,_0x225288):_0x29dc53,_0x552c91=_0x1c784a[_0x35655e(0x1d6)]-0x1,_0xe7313b;_0x552c91>=0x0;_0x552c91--)(_0xe7313b=_0x1c784a[_0x552c91])&&(_0x4c3f69=_0xe7313b(_0x4c3f69)||_0x4c3f69);return _0x4c3f69;},_0x122138=(_0x2b7042,_0x3ea823)=>(_0x354de3,_0x4bd542)=>_0x3ea823(_0x354de3,_0x4bd542,_0x2b7042);let _0x44ea26=class extends _0x36e2ec['Disposable']{constructor(_0x5dee39,_0x5f0d4c){const _0xd9fc6e=_0x162ef1;super(),this[_0xd9fc6e(0x222)]=_0x5dee39,this[_0xd9fc6e(0x1c5)]=_0x5f0d4c,this[_0xd9fc6e(0x1da)]();}[_0x162ef1(0x1da)](){const _0x2d82ef=_0x162ef1;this[_0x2d82ef(0x222)][_0x2d82ef(0x224)]=this['_threadCommentDataSource'],this[_0x2d82ef(0x222)][_0x2d82ef(0x215)]=!0x1;}};_0x44ea26=_0x1afb0a([_0x122138(0x0,_0x1a56f1[_0x162ef1(0x223)]),_0x122138(0x1,_0x36e2ec[_0x162ef1(0x1a6)](_0x39b1bf))],_0x44ea26);var _0x2a0ab3=Object[_0x162ef1(0x1a3)],_0x51772b=Object[_0x162ef1(0x206)],_0x538a6c=(_0x107c4d,_0x241348,_0x5e7ba3)=>_0x241348 in _0x107c4d?_0x2a0ab3(_0x107c4d,_0x241348,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e7ba3}):_0x107c4d[_0x241348]=_0x5e7ba3,_0x43c099=(_0x2f4979,_0x52ff32,_0x3982e8,_0x2012e8)=>{const _0x59f018=_0x162ef1;for(var _0x772624=_0x2012e8>0x1?void 0x0:_0x2012e8?_0x51772b(_0x52ff32,_0x3982e8):_0x52ff32,_0x4c60cd=_0x2f4979[_0x59f018(0x1d6)]-0x1,_0x494008;_0x4c60cd>=0x0;_0x4c60cd--)(_0x494008=_0x2f4979[_0x4c60cd])&&(_0x772624=_0x494008(_0x772624)||_0x772624);return _0x772624;},_0x114544=(_0x4ce7bd,_0x544e5b)=>(_0xd1d86d,_0x30a6d3)=>_0x544e5b(_0xd1d86d,_0x30a6d3,_0x4ce7bd),_0x93394a=(_0x48fcb9,_0x2786ed,_0x2b8bf2)=>_0x538a6c(_0x48fcb9,typeof _0x2786ed!=_0x162ef1(0x1f9)?_0x2786ed+'':_0x2786ed,_0x2b8bf2);_0x4f18fd[_0x162ef1(0x203)]=class extends _0x36e2ec[_0x162ef1(0x1b3)]{constructor(_0x568446=_0x2d0d8f,_0x5d063a,_0x4a6416){const _0xc30e35=_0x162ef1;super(),this[_0xc30e35(0x1aa)]=_0x568446,this['_injector']=_0x5d063a,this[_0xc30e35(0x1ea)]=_0x4a6416;const {..._0x41de00}=_0x36e2ec[_0xc30e35(0x220)]({},_0x2d0d8f,this[_0xc30e35(0x1aa)]);this[_0xc30e35(0x1ea)]['setConfig'](_0x2a6a6e,_0x41de00);}[_0x162ef1(0x211)](){const _0x50e7cd=_0x162ef1;[[_0x39b1bf],[_0x44ea26],[_0x26bce3]][_0x50e7cd(0x1dd)](_0x2f2045=>{const _0x39b2db=_0x50e7cd;this[_0x39b2db(0x21a)][_0x39b2db(0x207)](_0x2f2045);});}[_0x162ef1(0x1c1)](){const _0x592fdb=_0x162ef1;this[_0x592fdb(0x21a)][_0x592fdb(0x229)](_0x44ea26),this[_0x592fdb(0x21a)][_0x592fdb(0x229)](_0x26bce3);}},_0x93394a(_0x4f18fd[_0x162ef1(0x203)],'pluginName',_0x1be69d),_0x93394a(_0x4f18fd['UniverThreadCommentDataSourcePlugin'],_0x162ef1(0x1cc),_0x36e2ec['UniverInstanceType'][_0x162ef1(0x214)]),_0x4f18fd['UniverThreadCommentDataSourcePlugin']=_0x43c099([_0x36e2ec[_0x162ef1(0x221)](_0x53f578[_0x162ef1(0x1de)],_0x27707d[_0x162ef1(0x1fe)],_0x2e38c4['UniverLicensePlugin']),_0x114544(0x1,_0x36e2ec[_0x162ef1(0x1a6)](_0x36e2ec[_0x162ef1(0x1c4)])),_0x114544(0x2,_0x36e2ec[_0x162ef1(0x1a5)])],_0x4f18fd[_0x162ef1(0x203)]),Object[_0x162ef1(0x1a3)](_0x4f18fd,Symbol[_0x162ef1(0x1d0)],{'value':_0x162ef1(0x1db)});}));function _0x3c17(_0x58a67f,_0xce7fd0){const _0xe3ded8=_0xe3de();return _0x3c17=function(_0x3c176c,_0x25da38){_0x3c176c=_0x3c176c-0x1a1;let _0x27aad5=_0xe3ded8[_0x3c176c];return _0x27aad5;},_0x3c17(_0x58a67f,_0xce7fd0);}function _0xe3de(){const _0x113e14=['/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverProThreadCommentDatasource','_config','getUnit','Reply','2211TiPzUR','reply','getUser','exports','_sessionService','deleteComment','Plugin','replyId','123790vpVVyz','pipe','rangeType','createTimestamp','updateComment','stringify','_httpService','user','delete','ThreadCommentModel','/add','userID','onReady','/reply','addComment','Injector','_threadCommentDataSource','_commentService','requireSession','subscribe','getComment','commentUpdate$','UNRECOGNIZED','type','_initUserSync','166tFsiXf','slice','toStringTag','payload','Edit','ref','error','users','length','38290PCopLF','comments','YYYY/MM/DD\x20HH:mm','_initDataSource','Module','parse','forEach','UniverThreadCommentUIPlugin','UserManagerService','post','135UIwMsx','getCurrentUser','Delete','CustomRangeType','_init','resolved','find','@univerjs/thread-comment','HTTPService','_configService','12744928HdIozL','code','comment','unitId','root','2176mQgNqn','/universer-api/comment/unit/','3484770UORplT','28716BMuwwA','filter','rangeId','/edit','content','resolveComment','symbol','replies','612huUfDH','solved','7046kmzkFx','UniverCollaborationClientPlugin','UniverThreadComment','format','saveCommentToSnapshot','bufferTime','UniverThreadCommentDataSourcePlugin','UniverCore','getMemberID','getOwnPropertyDescriptor','add','UniverThreadCommentUi','/list','customRanges','@univerjs-pro/collaboration-client','_userService','Solved','body','parentId','Solve','onStarting','thread-comment-data-source.config','COMMENT','UNIVER_UNKNOWN','syncUpdateMutationToColla','Unknown','map','amd','addUser','_injector','values','@univerjs/network','_threadCommentModel','listComments','threadId','merge','DependentOn','_threadCommentDataSourceService','IThreadCommentDataSourceService','dataSource','personId','9390xBwBQW','userId','CollaborationSessionService','get','rxjs','disposeWithMe','OpenOrReOpen','defineProperty','function','IConfigService','Inject'];_0xe3de=function(){return _0x113e14;};return _0xe3de();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3-nightly.202507250750",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -42,23 +42,30 @@
|
|
|
42
42
|
"lib"
|
|
43
43
|
],
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"rxjs": ">=7.0.0"
|
|
45
|
+
"rxjs": ">=7.0.0",
|
|
46
|
+
"@univerjs-pro/collaboration-client": "0.9.3-nightly.202507250750",
|
|
47
|
+
"@univerjs/core": "0.9.3-nightly.202507250750",
|
|
48
|
+
"@univerjs/network": "0.9.3-nightly.202507250750",
|
|
49
|
+
"@univerjs-pro/license": "0.9.3-nightly.202507250750",
|
|
50
|
+
"@univerjs/thread-comment": "0.9.3-nightly.202507250750",
|
|
51
|
+
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
52
|
+
"@univerjs/thread-comment-ui": "0.9.3-nightly.202507250750"
|
|
46
53
|
},
|
|
47
54
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.9.
|
|
49
|
-
"@univerjs-pro/license": "0.9.
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/network": "0.9.2-nightly.202507181608",
|
|
52
|
-
"@univerjs/thread-comment": "0.9.2-nightly.202507181608",
|
|
55
|
+
"@univerjs-pro/collaboration-client": "0.9.3-nightly.202507250750",
|
|
56
|
+
"@univerjs-pro/license": "0.9.3-nightly.202507250750",
|
|
57
|
+
"@univerjs/network": "0.9.3-nightly.202507250750",
|
|
53
58
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
54
|
-
"@univerjs/thread-comment
|
|
59
|
+
"@univerjs/thread-comment": "0.9.3-nightly.202507250750",
|
|
60
|
+
"@univerjs/core": "0.9.3-nightly.202507250750",
|
|
61
|
+
"@univerjs/thread-comment-ui": "0.9.3-nightly.202507250750"
|
|
55
62
|
},
|
|
56
63
|
"devDependencies": {
|
|
57
64
|
"rxjs": "7.8.2",
|
|
58
65
|
"typescript": "^5.8.3",
|
|
59
66
|
"vite": "^7.0.5",
|
|
60
67
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.9.
|
|
68
|
+
"@univerjs-infra/shared": "0.9.3"
|
|
62
69
|
},
|
|
63
70
|
"scripts": {
|
|
64
71
|
"test": "vitest run",
|