@univerjs-pro/thread-comment-datasource 0.10.2 → 0.10.3-nightly.202508121228

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x594d5d=_0x524c;(function(_0x1a1ab0,_0x14e545){const _0x2ba9f7=_0x524c,_0x373ac6=_0x1a1ab0();while(!![]){try{const _0x2663b6=parseInt(_0x2ba9f7(0x123))/0x1+parseInt(_0x2ba9f7(0x114))/0x2*(parseInt(_0x2ba9f7(0x117))/0x3)+parseInt(_0x2ba9f7(0xb8))/0x4*(-parseInt(_0x2ba9f7(0xef))/0x5)+parseInt(_0x2ba9f7(0xd7))/0x6+parseInt(_0x2ba9f7(0x106))/0x7+parseInt(_0x2ba9f7(0xfd))/0x8+-parseInt(_0x2ba9f7(0xe7))/0x9;if(_0x2663b6===_0x14e545)break;else _0x373ac6['push'](_0x373ac6['shift']());}catch(_0x5ebb7e){_0x373ac6['push'](_0x373ac6['shift']());}}}(_0x1fe0,0xe43f2));Object[_0x594d5d(0xd8)](exports,Symbol[_0x594d5d(0xc5)],{'value':_0x594d5d(0x119)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x13ada6=>(_0x13ada6[_0x13ada6[_0x594d5d(0xbe)]=0x0]=_0x594d5d(0xbe),_0x13ada6[_0x13ada6[_0x594d5d(0xfa)]=0x1]=_0x594d5d(0xfa),_0x13ada6[_0x13ada6[_0x594d5d(0xcd)]=-0x1]='UNRECOGNIZED',_0x13ada6))(I||{}),v=(_0x386e9a=>(_0x386e9a[_0x386e9a[_0x594d5d(0xe3)]=0x0]=_0x594d5d(0xe3),_0x386e9a[_0x386e9a[_0x594d5d(0xe2)]=0x1]=_0x594d5d(0xe2),_0x386e9a[_0x386e9a[_0x594d5d(0x103)]=0x2]='Reply',_0x386e9a[_0x386e9a[_0x594d5d(0xf9)]=0x3]=_0x594d5d(0xf9),_0x386e9a[_0x386e9a[_0x594d5d(0x12b)]=0x4]='Delete',_0x386e9a[_0x386e9a['Solve']=0x5]=_0x594d5d(0x11b),_0x386e9a[_0x386e9a[_0x594d5d(0xcd)]=-0x1]=_0x594d5d(0xcd),_0x386e9a))(v||{});const f=_0xf5a751=>c['dayjs'](new Date(+_0xf5a751))['format'](_0x594d5d(0xf4)),R=async(_0x4d7089,_0x35d53a)=>{const _0x4eab42=_0x594d5d,_0xab36c9=_0x4d7089[_0x4eab42(0xc4)](c[_0x4eab42(0x10a)]),_0x4d51d5=_0x4d7089[_0x4eab42(0xc4)](P[_0x4eab42(0x10c)]);_0x35d53a[_0x4eab42(0xf7)](_0x5b24f3=>{const _0x180b58=_0x4eab42;_0xab36c9[_0x180b58(0xe5)](_0x5b24f3)&&_0x35d53a[_0x180b58(0xba)](_0x5b24f3);}),_0x35d53a[_0x4eab42(0xd9)]&&(await _0x4d51d5[_0x4eab42(0xc4)](_0x4eab42(0xde),{'params':{'userIDs':[..._0x35d53a]}}))['body'][_0x4eab42(0x10b)][_0x4eab42(0xf7)](_0x1d8261=>{const _0x436f2d=_0x4eab42;_0x1d8261&&_0xab36c9[_0x436f2d(0x130)](_0x1d8261);});};var $=Object[_0x594d5d(0xcf)],E=(_0x25de6a,_0x32abc0,_0xa2671,_0x45f07e)=>{const _0x14b781=_0x594d5d;for(var _0x3fa9f4=_0x45f07e>0x1?void 0x0:_0x45f07e?$(_0x32abc0,_0xa2671):_0x32abc0,_0x2ececd=_0x25de6a[_0x14b781(0xf2)]-0x1,_0x471ab9;_0x2ececd>=0x0;_0x2ececd--)(_0x471ab9=_0x25de6a[_0x2ececd])&&(_0x3fa9f4=_0x471ab9(_0x3fa9f4)||_0x3fa9f4);return _0x3fa9f4;},S=(_0x33aa7d,_0x54f28e)=>(_0x54c5e5,_0x1df815)=>_0x54f28e(_0x54c5e5,_0x1df815,_0x33aa7d);let _=class extends c[_0x594d5d(0xdb)]{constructor(_0xb712f3,_0x4930a7,_0x39ab8a,_0xf3350d){const _0x81ca39=_0x594d5d;super(),this['_commentService']=_0xb712f3,this['_threadCommentModel']=_0x4930a7,this[_0x81ca39(0x12a)]=_0x39ab8a,this[_0x81ca39(0x12c)]=_0xf3350d,this[_0x81ca39(0xbb)](),this[_0x81ca39(0xe8)]();}['_initUserSync'](){const _0x54a53d=_0x594d5d;this['disposeWithMe'](this[_0x54a53d(0x10d)][_0x54a53d(0xcc)][_0x54a53d(0xb6)](j[_0x54a53d(0xe9)](0x10))[_0x54a53d(0xb7)](_0x5e7805=>{const _0xccd60d=_0x54a53d,_0x4994e3=new Set();_0x5e7805[_0xccd60d(0xf7)](_0x29037b=>{const _0x35e656=_0xccd60d;switch(_0x29037b[_0x35e656(0x113)]){case _0x35e656(0xd4):{const _0xd397d0=_0x29037b[_0x35e656(0xda)][_0x35e656(0xf8)];_0x4994e3[_0x35e656(0xd4)](_0xd397d0);break;}}}),R(this[_0xccd60d(0x12c)],_0x4994e3);}));}[_0x594d5d(0xbb)](){const _0x526f59=_0x594d5d;this[_0x526f59(0xc8)](this[_0x526f59(0x101)]['commentUpdate$'][_0x526f59(0xb7)](async _0x398310=>{const _0x1bf6f4=_0x526f59;var _0x22d62e,_0x2e39b8,_0x1dfce8,_0x4fd792;const _0x2c80e9=(_0x22d62e=this[_0x1bf6f4(0x10d)][_0x1bf6f4(0xdd)](_0x398310[_0x1bf6f4(0x126)])[_0x1bf6f4(0x109)](_0x4ae921=>_0x4ae921[_0x1bf6f4(0x100)]===_0x398310[_0x1bf6f4(0x100)]))==null?void 0x0:_0x22d62e[_0x1bf6f4(0x12f)];if(!_0x2c80e9)return;const {unitId:_0x3ce8c9,subUnitId:_0x5ba9ae}=_0x2c80e9;switch(_0x398310[_0x1bf6f4(0xd0)]&&this[_0x1bf6f4(0x12a)][_0x1bf6f4(0x130)](_0x398310[_0x1bf6f4(0xd0)]),_0x398310[_0x1bf6f4(0x113)]){case v[_0x1bf6f4(0xe2)]:break;case v[_0x1bf6f4(0x103)]:{this['_threadCommentModel']['addComment'](_0x3ce8c9,_0x5ba9ae,{'unitId':_0x3ce8c9,'subUnitId':_0x5ba9ae,'ref':'','id':_0x398310['replyId'],'dT':f(+_0x398310['createTimestamp']),'threadId':_0x398310[_0x1bf6f4(0x100)],'personId':(_0x1dfce8=(_0x2e39b8=_0x398310['user'])==null?void 0x0:_0x2e39b8['userID'])!=null?_0x1dfce8:_0x398310[_0x1bf6f4(0xbc)],'text':JSON[_0x1bf6f4(0xd3)](_0x398310[_0x1bf6f4(0xbd)]),'parentId':_0x2c80e9['id']});break;}case v[_0x1bf6f4(0x12b)]:{const _0x555c65=this[_0x1bf6f4(0x10d)][_0x1bf6f4(0xe4)](_0x3ce8c9,_0x5ba9ae,_0x398310['replyId']);_0x555c65&&_0x555c65[_0x1bf6f4(0xe6)]&&this['_threadCommentModel'][_0x1bf6f4(0x125)](_0x3ce8c9,_0x5ba9ae,_0x398310[_0x1bf6f4(0x104)]);break;}case v[_0x1bf6f4(0xf9)]:{this['_threadCommentModel']['updateComment'](_0x3ce8c9,_0x5ba9ae,{'commentId':_0x398310['replyId'],'text':JSON[_0x1bf6f4(0xd3)](_0x398310[_0x1bf6f4(0xbd)])});break;}case v[_0x1bf6f4(0x11b)]:{const _0x7a34c5=(_0x4fd792=this[_0x1bf6f4(0x10d)][_0x1bf6f4(0xdd)](_0x398310['unitId'])[_0x1bf6f4(0x109)](_0x233ee8=>_0x233ee8[_0x1bf6f4(0x100)]===_0x398310['threadId']))==null?void 0x0:_0x4fd792[_0x1bf6f4(0x12f)];_0x7a34c5&&this[_0x1bf6f4(0x10d)][_0x1bf6f4(0x122)](_0x3ce8c9,_0x5ba9ae,_0x7a34c5['id'],_0x398310[_0x1bf6f4(0xca)]===I[_0x1bf6f4(0xfa)]);break;}}}));}};_=E([S(0x0,c[_0x594d5d(0x121)](b[_0x594d5d(0xf3)])),S(0x1,c[_0x594d5d(0x121)](M[_0x594d5d(0xf0)])),S(0x2,c[_0x594d5d(0x121)](c['UserManagerService'])),S(0x3,c[_0x594d5d(0x121)](c[_0x594d5d(0x11d)]))],_);const q=_0x594d5d(0xfb),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x1ff802,_0x5573e9,_0x17b64a,_0x46f77c)=>{const _0x1e93df=_0x594d5d;for(var _0x5df172=_0x46f77c>0x1?void 0x0:_0x46f77c?A(_0x5573e9,_0x17b64a):_0x5573e9,_0xb2ac76=_0x1ff802[_0x1e93df(0xf2)]-0x1,_0x2265c6;_0xb2ac76>=0x0;_0xb2ac76--)(_0x2265c6=_0x1ff802[_0xb2ac76])&&(_0x5df172=_0x2265c6(_0x5df172)||_0x5df172);return _0x5df172;},C=(_0x5ef763,_0x56964b)=>(_0x10b516,_0x4d9c9a)=>_0x56964b(_0x10b516,_0x4d9c9a,_0x5ef763);function _0x524c(_0x7a6923,_0x30cafa){const _0x1fe02d=_0x1fe0();return _0x524c=function(_0x524ca2,_0x1d18a9){_0x524ca2=_0x524ca2-0xb6;let _0x4f912e=_0x1fe02d[_0x524ca2];return _0x4f912e;},_0x524c(_0x7a6923,_0x30cafa);}function Y(_0x48e201,_0x23f926){const _0x4a15de=_0x594d5d,_0x3517f7=_0x48e201[_0x4a15de(0x115)][0x0];return{..._0x23f926,'id':_0x3517f7[_0x4a15de(0x104)],'resolved':_0x48e201[_0x4a15de(0xca)]===0x1,'dT':f(_0x3517f7[_0x4a15de(0xc1)]),'personId':_0x3517f7[_0x4a15de(0xbc)],'threadId':_0x3517f7['threadId']};}function G(_0x3dd197,_0x1b9e53,_0x141b71){const _0x7af8ba=_0x594d5d;var _0x24b7fb,_0x1c2ce0;if(((_0x1c2ce0=(_0x24b7fb=_0x3dd197==null?void 0x0:_0x3dd197[_0x7af8ba(0x115)])==null?void 0x0:_0x24b7fb[_0x7af8ba(0xf2)])!=null?_0x1c2ce0:0x0)>0x0){const _0xe5df8=(_0x5d742e,_0x2fb3cb)=>({'id':_0x5d742e[_0x7af8ba(0x104)],'threadId':_0x5d742e[_0x7af8ba(0x100)],'dT':f(_0x5d742e[_0x7af8ba(0xc1)]),'personId':_0x5d742e['userId'],'resolved':_0x3dd197[_0x7af8ba(0xca)]===I[_0x7af8ba(0xfa)],'unitId':_0x1b9e53,'subUnitId':_0x141b71,'text':JSON[_0x7af8ba(0xd3)](_0x5d742e[_0x7af8ba(0xbd)]),'parentId':_0x2fb3cb}),_0x2532b5=_0xe5df8(_0x3dd197[_0x7af8ba(0x115)][0x0]);return{..._0x2532b5,'children':_0x3dd197[_0x7af8ba(0x115)][_0x7af8ba(0xce)](0x1)[_0x7af8ba(0x111)](_0x4720d0=>_0xe5df8(_0x4720d0,_0x2532b5['id']))};}return null;}let p=class{constructor(_0x3af8f8,_0x3edbb7,_0x22a94c){const _0x3cbcc4=_0x594d5d;this[_0x3cbcc4(0x120)]=_0x3af8f8,this[_0x3cbcc4(0x12a)]=_0x3edbb7,this['_sessionService']=_0x22a94c;}async['addComment'](_0x3afd37){const _0x213918=_0x594d5d;var _0x1e0cbe,_0x181612;const {parentId:_0xb47e9,unitId:_0x189f07,text:_0x4b17ed,threadId:_0xeb9e17}=_0x3afd37,_0x9243a0=(_0x181612=(_0x1e0cbe=_0x4b17ed['customRanges'])==null?void 0x0:_0x1e0cbe[_0x213918(0xc0)](_0x275789=>_0x275789[_0x213918(0xc2)]===c[_0x213918(0xea)]['COMMENT'])['map'](_0x2fe8b9=>_0x2fe8b9['rangeId']))!=null?_0x181612:[],_0x163b97=JSON[_0x213918(0xec)](_0x4b17ed),_0x3f851e=(await this[_0x213918(0xf5)][_0x213918(0xd2)](_0x189f07))[_0x213918(0xc7)]();if(_0xb47e9){const _0x2297a8={'memberId':_0x3f851e,'unitId':_0x189f07,'content':_0x163b97,'mention':_0x9243a0,'threadId':_0xeb9e17},_0x1dfff0=(await this['_httpService']['post'](_0x213918(0x105)+_0x189f07+_0x213918(0xf1),{'body':_0x2297a8}))[_0x213918(0xe0)][_0x213918(0xdc)];return{..._0x3afd37,'id':_0x1dfff0[_0x213918(0x104)],'dT':c[_0x213918(0x11c)](+_0x1dfff0['createTimestamp'])[_0x213918(0xf6)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1dfff0['userId']};}else{const _0x1305ae={'memberId':_0x3f851e,'unitId':_0x189f07,'content':_0x163b97,'mention':_0x9243a0},_0x4864a5=await this[_0x213918(0x120)][_0x213918(0xed)](_0x213918(0x105)+_0x189f07+'/add',{'body':_0x1305ae});return Y(_0x4864a5[_0x213918(0xe0)]['comment'],_0x3afd37);}}async[_0x594d5d(0xc6)](_0x44bf95){const _0x52bded=_0x594d5d;var _0x10674b,_0x33f940;const {text:_0xb9476e,unitId:_0x4680ef}=_0x44bf95,_0x5af89c=(_0x33f940=(_0x10674b=_0xb9476e[_0x52bded(0xff)])==null?void 0x0:_0x10674b[_0x52bded(0xc0)](_0x3f94a9=>_0x3f94a9[_0x52bded(0xc2)]===c[_0x52bded(0xea)][_0x52bded(0x11e)])[_0x52bded(0x111)](_0x2f568d=>_0x2f568d[_0x52bded(0x11f)]))!=null?_0x33f940:[],_0x1bef04=JSON[_0x52bded(0xec)](_0xb9476e),_0x479b99=_0x44bf95[_0x52bded(0x100)],_0x28c5ed=_0x44bf95['id'],_0x5a8ce9={'memberId':(await this['_sessionService'][_0x52bded(0xd2)](_0x4680ef))[_0x52bded(0xc7)](),'unitId':_0x4680ef,'threadId':_0x479b99,'mention':_0x5af89c,'content':_0x1bef04,'replyId':_0x28c5ed},_0x59a5f9=await this[_0x52bded(0x120)][_0x52bded(0xed)]('/universer-api/comment/unit/'+_0x4680ef+_0x52bded(0x12d),{'body':_0x5a8ce9});return!_0x59a5f9[_0x52bded(0xe0)][_0x52bded(0xfe)]||_0x59a5f9[_0x52bded(0xe0)]['error'][_0x52bded(0x108)]===0x1;}async[_0x594d5d(0x122)](_0x552323){const _0x20f912=_0x594d5d,{unitId:_0x3ff0bd}=_0x552323,_0x1cd87a=_0x552323['threadId'],_0x2e80b0={'memberId':this['_userService'][_0x20f912(0xbf)]()[_0x20f912(0x118)],'unitId':_0x3ff0bd,'threadId':_0x1cd87a,'solved':_0x552323[_0x20f912(0xd1)]?I[_0x20f912(0xfa)]:I[_0x20f912(0xbe)]},_0x15670c=await this['_httpService']['post'](_0x20f912(0x105)+_0x3ff0bd+'/solved',{'body':_0x2e80b0});return!_0x15670c['body']['error']||_0x15670c[_0x20f912(0xe0)][_0x20f912(0xfe)][_0x20f912(0x108)]===0x1;}async[_0x594d5d(0x125)](_0x2a308b,_0x4807a6,_0x2192f3,_0x466b3e){const _0x1f9a36=_0x594d5d,_0x3f54b5={'memberId':(await this['_sessionService'][_0x1f9a36(0xd2)](_0x2a308b))[_0x1f9a36(0xc7)](),'threadId':_0x2192f3,'replyId':_0x466b3e,'unitId':_0x2a308b},_0x5c7aa3=await this[_0x1f9a36(0x120)][_0x1f9a36(0xed)](_0x1f9a36(0x105)+_0x2a308b+_0x1f9a36(0xc3),{'body':_0x3f54b5});return!_0x5c7aa3[_0x1f9a36(0xe0)][_0x1f9a36(0xfe)]||_0x5c7aa3['body'][_0x1f9a36(0xfe)][_0x1f9a36(0x108)]===0x1;}async['listComments'](_0xc849a2,_0x2a7ce9,_0x22b96d){const _0x4de5a9=_0x594d5d,_0x2f65ab={'unitId':_0xc849a2,'threadId':_0x22b96d},_0x3cd2e5=await this[_0x4de5a9(0x120)][_0x4de5a9(0xed)](_0x4de5a9(0x105)+_0xc849a2+'/list',{'body':_0x2f65ab}),_0x5c8b7a=_0x22b96d[_0x4de5a9(0x111)](_0x56e45d=>G(_0x3cd2e5[_0x4de5a9(0xe0)][_0x4de5a9(0xd6)][_0x56e45d],_0xc849a2,_0x2a7ce9))[_0x4de5a9(0xc0)](Boolean);return Object[_0x4de5a9(0x127)](_0x3cd2e5[_0x4de5a9(0xe0)]['users'])[_0x4de5a9(0xf7)](_0x51247e=>{this['_userService']['addUser'](_0x51247e);}),_0x5c8b7a;}[_0x594d5d(0xee)](_0x5a2a21){const _0x93e815=_0x594d5d;return{'id':_0x5a2a21['id'],'threadId':_0x5a2a21[_0x93e815(0x100)],'ref':_0x5a2a21[_0x93e815(0x116)]};}};p=x([C(0x0,c[_0x594d5d(0x121)](P[_0x594d5d(0x10c)])),C(0x1,c[_0x594d5d(0x121)](c['UserManagerService'])),C(0x2,c[_0x594d5d(0x121)](b[_0x594d5d(0x107)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x5127d7,_0x183b83,_0x4334d2,_0x2eb7c7)=>{const _0x2eb3c6=_0x594d5d;for(var _0x21943d=_0x2eb7c7>0x1?void 0x0:_0x2eb7c7?H(_0x183b83,_0x4334d2):_0x183b83,_0xbd72f4=_0x5127d7[_0x2eb3c6(0xf2)]-0x1,_0x53f646;_0xbd72f4>=0x0;_0xbd72f4--)(_0x53f646=_0x5127d7[_0xbd72f4])&&(_0x21943d=_0x53f646(_0x21943d)||_0x21943d);return _0x21943d;},y=(_0x75cd31,_0x3aaa5b)=>(_0x134f49,_0x425609)=>_0x3aaa5b(_0x134f49,_0x425609,_0x75cd31);let g=class extends c[_0x594d5d(0xdb)]{constructor(_0x5ea384,_0x13a0fe){const _0x711683=_0x594d5d;super(),this[_0x711683(0x110)]=_0x5ea384,this[_0x711683(0xeb)]=_0x13a0fe,this[_0x711683(0xb9)]();}[_0x594d5d(0xb9)](){const _0x5bddb4=_0x594d5d;this[_0x5bddb4(0x110)][_0x5bddb4(0x102)]=this['_threadCommentDataSource'],this[_0x5bddb4(0x110)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](p))],g);var F=Object[_0x594d5d(0xd8)],L=Object[_0x594d5d(0xcf)],Z=(_0x80ab5,_0x540dfc,_0x534d32)=>_0x540dfc in _0x80ab5?F(_0x80ab5,_0x540dfc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x534d32}):_0x80ab5[_0x540dfc]=_0x534d32,W=(_0x2912f5,_0x504d52,_0x1aaad8,_0x40ea99)=>{const _0xf72ec3=_0x594d5d;for(var _0x238429=_0x40ea99>0x1?void 0x0:_0x40ea99?L(_0x504d52,_0x1aaad8):_0x504d52,_0x29d6ce=_0x2912f5[_0xf72ec3(0xf2)]-0x1,_0x363560;_0x29d6ce>=0x0;_0x29d6ce--)(_0x363560=_0x2912f5[_0x29d6ce])&&(_0x238429=_0x363560(_0x238429)||_0x238429);return _0x238429;},O=(_0x3a252b,_0x18ea77)=>(_0x4cb036,_0x589642)=>_0x18ea77(_0x4cb036,_0x589642,_0x3a252b),N=(_0x2789c2,_0x5ad201,_0x2e156c)=>Z(_0x2789c2,typeof _0x5ad201!='symbol'?_0x5ad201+'':_0x5ad201,_0x2e156c);exports[_0x594d5d(0xfc)]=class extends c[_0x594d5d(0x124)]{constructor(_0x1456e1=D,_0x1d4b8c,_0x586c68){const _0x35989f=_0x594d5d;super(),this[_0x35989f(0x11a)]=_0x1456e1,this[_0x35989f(0x12c)]=_0x1d4b8c,this[_0x35989f(0xc9)]=_0x586c68;const {..._0x2ec248}=c[_0x35989f(0xd5)]({},D,this[_0x35989f(0x11a)]);this[_0x35989f(0xc9)][_0x35989f(0x12e)](q,_0x2ec248);}[_0x594d5d(0x10f)](){const _0x1f58b6=_0x594d5d;[[p],[g],[_]][_0x1f58b6(0xf7)](_0x3bafce=>{const _0x32973b=_0x1f58b6;this[_0x32973b(0x12c)][_0x32973b(0xd4)](_0x3bafce);});}[_0x594d5d(0xcb)](){const _0x31379a=_0x594d5d;this[_0x31379a(0x12c)][_0x31379a(0xc4)](g),this[_0x31379a(0x12c)]['get'](_);}},N(exports[_0x594d5d(0xfc)],_0x594d5d(0x129),U),N(exports[_0x594d5d(0xfc)],_0x594d5d(0x113),c[_0x594d5d(0xe1)]['UNIVER_UNKNOWN']),exports[_0x594d5d(0xfc)]=W([c['DependentOn'](w[_0x594d5d(0x128)],b[_0x594d5d(0x10e)],T[_0x594d5d(0x112)]),O(0x1,c[_0x594d5d(0x121)](c['Injector'])),O(0x2,c[_0x594d5d(0xdf)])],exports['UniverThreadCommentDataSourcePlugin']);function _0x1fe0(){const _0x2f02cc=['Add','Unknown','getComment','getUser','parentId','49955274alCfzq','_initUserSync','bufferTime','CustomRangeType','_threadCommentDataSource','stringify','post','saveCommentToSnapshot','350fgvpHU','ThreadCommentModel','/reply','length','CommentService','YYYY/MM/DD\x20HH:mm','_sessionService','format','forEach','personId','Edit','Solved','thread-comment-data-source.config','UniverThreadCommentDataSourcePlugin','13904112qxTrkt','error','customRanges','threadId','_commentService','dataSource','Reply','replyId','/universer-api/comment/unit/','12748778nVqVNE','CollaborationSessionService','code','find','UserManagerService','users','HTTPService','_threadCommentModel','UniverCollaborationClientPlugin','onStarting','_threadCommentDataSourceService','map','UniverLicensePlugin','type','6kKriPP','replies','ref','134031MgxwzU','userID','Module','_config','Solve','dayjs','Injector','COMMENT','rangeId','_httpService','Inject','resolveComment','1535960RGdcDJ','Plugin','deleteComment','unitId','values','UniverThreadCommentUIPlugin','pluginName','_userService','Delete','_injector','/edit','setConfig','root','addUser','pipe','subscribe','10684ytDNqt','_initDataSource','delete','_init','userId','content','OpenOrReOpen','getCurrentUser','filter','createTimestamp','rangeType','/delete','get','toStringTag','updateComment','getMemberID','disposeWithMe','_configService','solved','onReady','commentUpdate$','UNRECOGNIZED','slice','getOwnPropertyDescriptor','user','resolved','requireSession','parse','add','merge','comments','8659170JFGKzP','defineProperty','size','payload','Disposable','reply','getUnit','/universer-api/user/list','IConfigService','body','UniverInstanceType'];_0x1fe0=function(){return _0x2f02cc;};return _0x1fe0();}
1
+ 'use strict';const _0x2d5d1c=_0x937a;(function(_0x205b06,_0x301069){const _0x534cb9=_0x937a,_0x28f668=_0x205b06();while(!![]){try{const _0x2b51aa=-parseInt(_0x534cb9(0x179))/0x1*(parseInt(_0x534cb9(0x15e))/0x2)+-parseInt(_0x534cb9(0x18a))/0x3*(parseInt(_0x534cb9(0x1a3))/0x4)+-parseInt(_0x534cb9(0x141))/0x5*(parseInt(_0x534cb9(0x135))/0x6)+-parseInt(_0x534cb9(0x130))/0x7*(-parseInt(_0x534cb9(0x13f))/0x8)+parseInt(_0x534cb9(0x129))/0x9+parseInt(_0x534cb9(0x12b))/0xa*(parseInt(_0x534cb9(0x18e))/0xb)+-parseInt(_0x534cb9(0x14c))/0xc;if(_0x2b51aa===_0x301069)break;else _0x28f668['push'](_0x28f668['shift']());}catch(_0x402bf8){_0x28f668['push'](_0x28f668['shift']());}}}(_0x9315,0xd70ca));Object['defineProperty'](exports,Symbol[_0x2d5d1c(0x172)],{'value':_0x2d5d1c(0x176)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x2d5d1c(0x19d);var I=(_0x1a1e83=>(_0x1a1e83[_0x1a1e83[_0x2d5d1c(0x13d)]=0x0]=_0x2d5d1c(0x13d),_0x1a1e83[_0x1a1e83['Solved']=0x1]='Solved',_0x1a1e83[_0x1a1e83[_0x2d5d1c(0x144)]=-0x1]=_0x2d5d1c(0x144),_0x1a1e83))(I||{}),v=(_0x38d61b=>(_0x38d61b[_0x38d61b[_0x2d5d1c(0x148)]=0x0]=_0x2d5d1c(0x148),_0x38d61b[_0x38d61b[_0x2d5d1c(0x154)]=0x1]=_0x2d5d1c(0x154),_0x38d61b[_0x38d61b['Reply']=0x2]=_0x2d5d1c(0x16e),_0x38d61b[_0x38d61b[_0x2d5d1c(0x13b)]=0x3]=_0x2d5d1c(0x13b),_0x38d61b[_0x38d61b[_0x2d5d1c(0x18c)]=0x4]=_0x2d5d1c(0x18c),_0x38d61b[_0x38d61b[_0x2d5d1c(0x132)]=0x5]=_0x2d5d1c(0x132),_0x38d61b[_0x38d61b['UNRECOGNIZED']=-0x1]=_0x2d5d1c(0x144),_0x38d61b))(v||{});const f=_0x170c03=>c[_0x2d5d1c(0x14e)](new Date(+_0x170c03))[_0x2d5d1c(0x128)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x395029,_0xf59cdf)=>{const _0x16bfdd=_0x2d5d1c,_0x1c759d=_0x395029[_0x16bfdd(0x13e)](c[_0x16bfdd(0x149)]),_0x20721b=_0x395029[_0x16bfdd(0x13e)](P[_0x16bfdd(0x193)]);_0xf59cdf[_0x16bfdd(0x1a1)](_0x4c545b=>{const _0x580127=_0x16bfdd;_0x1c759d[_0x580127(0x19a)](_0x4c545b)&&_0xf59cdf['delete'](_0x4c545b);}),_0xf59cdf[_0x16bfdd(0x198)]&&(await _0x20721b['get'](_0x16bfdd(0x19c),{'params':{'userIDs':[..._0xf59cdf]}}))[_0x16bfdd(0x17d)][_0x16bfdd(0x17b)][_0x16bfdd(0x1a1)](_0x59d036=>{_0x59d036&&_0x1c759d['addUser'](_0x59d036);});};var $=Object[_0x2d5d1c(0x177)],E=(_0x32d654,_0x45c194,_0x4ce546,_0x175c9f)=>{const _0x6bb612=_0x2d5d1c;for(var _0x4ae6c8=_0x175c9f>0x1?void 0x0:_0x175c9f?$(_0x45c194,_0x4ce546):_0x45c194,_0xb7093=_0x32d654[_0x6bb612(0x153)]-0x1,_0x26be55;_0xb7093>=0x0;_0xb7093--)(_0x26be55=_0x32d654[_0xb7093])&&(_0x4ae6c8=_0x26be55(_0x4ae6c8)||_0x4ae6c8);return _0x4ae6c8;},S=(_0x4c493a,_0x46837a)=>(_0x4c3948,_0x2ee9dc)=>_0x46837a(_0x4c3948,_0x2ee9dc,_0x4c493a);let _=class extends c[_0x2d5d1c(0x16b)]{constructor(_0x3e0c52,_0x5bedb0,_0x17f714,_0x4e9fbb){const _0x101203=_0x2d5d1c;super(),this['_commentService']=_0x3e0c52,this[_0x101203(0x185)]=_0x5bedb0,this[_0x101203(0x150)]=_0x17f714,this[_0x101203(0x159)]=_0x4e9fbb,this['_init'](),this[_0x101203(0x171)]();}[_0x2d5d1c(0x171)](){const _0x2452fe=_0x2d5d1c;this[_0x2452fe(0x1a2)](this['_threadCommentModel'][_0x2452fe(0x196)][_0x2452fe(0x183)](j[_0x2452fe(0x15a)](0x10))[_0x2452fe(0x157)](_0x40a789=>{const _0x2fce50=_0x2452fe,_0x215ba8=new Set();_0x40a789[_0x2fce50(0x1a1)](_0x1d4ff3=>{const _0x2e1fbd=_0x2fce50;switch(_0x1d4ff3[_0x2e1fbd(0x19e)]){case'add':{const _0x1db8b0=_0x1d4ff3[_0x2e1fbd(0x12c)][_0x2e1fbd(0x131)];_0x215ba8[_0x2e1fbd(0x147)](_0x1db8b0);break;}}}),R(this['_injector'],_0x215ba8);}));}['_init'](){const _0x46e4bc=_0x2d5d1c;this[_0x46e4bc(0x1a2)](this[_0x46e4bc(0x156)][_0x46e4bc(0x196)][_0x46e4bc(0x157)](async _0x21e41e=>{const _0x1cc09a=_0x46e4bc;var _0x9bd824,_0x8f5252,_0x141d00,_0x54e0a6;const _0x42b5ea=(_0x9bd824=this[_0x1cc09a(0x185)][_0x1cc09a(0x15d)](_0x21e41e[_0x1cc09a(0x16f)])[_0x1cc09a(0x18b)](_0x700372=>_0x700372[_0x1cc09a(0x136)]===_0x21e41e[_0x1cc09a(0x136)]))==null?void 0x0:_0x9bd824[_0x1cc09a(0x138)];if(!_0x42b5ea)return;const {unitId:_0x2adae9,subUnitId:_0x243641}=_0x42b5ea;switch(_0x21e41e[_0x1cc09a(0x1a0)]&&this[_0x1cc09a(0x150)]['addUser'](_0x21e41e['user']),_0x21e41e[_0x1cc09a(0x19e)]){case v[_0x1cc09a(0x154)]:break;case v[_0x1cc09a(0x16e)]:{this[_0x1cc09a(0x185)][_0x1cc09a(0x139)](_0x2adae9,_0x243641,{'unitId':_0x2adae9,'subUnitId':_0x243641,'ref':'','id':_0x21e41e[_0x1cc09a(0x197)],'dT':f(+_0x21e41e[_0x1cc09a(0x184)]),'threadId':_0x21e41e[_0x1cc09a(0x136)],'personId':(_0x141d00=(_0x8f5252=_0x21e41e[_0x1cc09a(0x1a0)])==null?void 0x0:_0x8f5252[_0x1cc09a(0x190)])!=null?_0x141d00:_0x21e41e['userId'],'text':JSON[_0x1cc09a(0x14a)](_0x21e41e[_0x1cc09a(0x12e)]),'parentId':_0x42b5ea['id']});break;}case v['Delete']:{const _0x1191ed=this[_0x1cc09a(0x185)]['getComment'](_0x2adae9,_0x243641,_0x21e41e[_0x1cc09a(0x197)]);_0x1191ed&&_0x1191ed[_0x1cc09a(0x186)]&&this['_threadCommentModel'][_0x1cc09a(0x173)](_0x2adae9,_0x243641,_0x21e41e['replyId']);break;}case v[_0x1cc09a(0x13b)]:{this[_0x1cc09a(0x185)][_0x1cc09a(0x165)](_0x2adae9,_0x243641,{'commentId':_0x21e41e['replyId'],'text':JSON[_0x1cc09a(0x14a)](_0x21e41e['content'])});break;}case v[_0x1cc09a(0x132)]:{const _0x345893=(_0x54e0a6=this[_0x1cc09a(0x185)]['getUnit'](_0x21e41e[_0x1cc09a(0x16f)])[_0x1cc09a(0x18b)](_0x4a7a9e=>_0x4a7a9e[_0x1cc09a(0x136)]===_0x21e41e['threadId']))==null?void 0x0:_0x54e0a6[_0x1cc09a(0x138)];_0x345893&&this[_0x1cc09a(0x185)][_0x1cc09a(0x17e)](_0x2adae9,_0x243641,_0x345893['id'],_0x21e41e[_0x1cc09a(0x164)]===I[_0x1cc09a(0x18f)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x2d5d1c(0x158)])),S(0x1,c[_0x2d5d1c(0x145)](M[_0x2d5d1c(0x143)])),S(0x2,c[_0x2d5d1c(0x145)](c[_0x2d5d1c(0x149)])),S(0x3,c[_0x2d5d1c(0x145)](c[_0x2d5d1c(0x195)]))],_);const q='thread-comment-data-source.config',D={};function _0x9315(){const _0x428f07=['UniverCollaborationClientPlugin','length','Add','code','_commentService','subscribe','CommentService','_injector','bufferTime','onStarting','values','getUnit','390umKcml','/edit','CollaborationSessionService','resolved','/list','setConfig','solved','updateComment','_config','_threadCommentDataSourceService','rangeId','CustomRangeType','_httpService','Disposable','/reply','post','Reply','unitId','syncUpdateMutationToColla','_initUserSync','toStringTag','deleteComment','slice','reply','Module','getOwnPropertyDescriptor','_threadCommentDataSource','955gUxXri','requireSession','users','COMMENT','body','resolveComment','stringify','error','customRanges','/solved','pipe','createTimestamp','_threadCommentModel','parentId','IThreadCommentDataSourceService','merge','/add','3859353HoxZJD','find','Delete','UniverInstanceType','2482832NVRBVx','Solved','userID','_initDataSource','listComments','HTTPService','filter','Injector','commentUpdate$','replyId','size','/universer-api/comment/unit/','getUser','Plugin','/universer-api/user/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','type','getMemberID','user','forEach','disposeWithMe','4NfITjv','_sessionService','format','12578571nDPdnP','IConfigService','70kgRTsL','payload','rangeType','content','symbol','511OcPNKu','personId','Solve','dataSource','map','69966VpKUlt','threadId','defineProperty','root','addComment','YYYY/MM/DD\x20HH:mm','Edit','DependentOn','OpenOrReOpen','get','106000uKOZMe','replies','335WpWZDS','UNIVER_UNKNOWN','ThreadCommentModel','UNRECOGNIZED','Inject','userId','add','Unknown','UserManagerService','parse','UniverLicensePlugin','9720576xxhlGg','UniverThreadCommentDataSourcePlugin','dayjs','_configService','_userService','saveCommentToSnapshot'];_0x9315=function(){return _0x428f07;};return _0x9315();}var A=Object[_0x2d5d1c(0x177)],x=(_0x277b79,_0x59a345,_0x502fbe,_0x1054b7)=>{const _0x28c313=_0x2d5d1c;for(var _0x427490=_0x1054b7>0x1?void 0x0:_0x1054b7?A(_0x59a345,_0x502fbe):_0x59a345,_0x423b99=_0x277b79[_0x28c313(0x153)]-0x1,_0x2dd47e;_0x423b99>=0x0;_0x423b99--)(_0x2dd47e=_0x277b79[_0x423b99])&&(_0x427490=_0x2dd47e(_0x427490)||_0x427490);return _0x427490;},C=(_0x42348e,_0x42dd0b)=>(_0x56d9a4,_0x25e93c)=>_0x42dd0b(_0x56d9a4,_0x25e93c,_0x42348e);function Y(_0x5cd27f,_0x12bde1){const _0x35f27e=_0x2d5d1c,_0x522f27=_0x5cd27f[_0x35f27e(0x140)][0x0];return{..._0x12bde1,'id':_0x522f27[_0x35f27e(0x197)],'resolved':_0x5cd27f[_0x35f27e(0x164)]===0x1,'dT':f(_0x522f27[_0x35f27e(0x184)]),'personId':_0x522f27[_0x35f27e(0x146)],'threadId':_0x522f27[_0x35f27e(0x136)]};}function G(_0xe2107b,_0x4ab549,_0x19c2b5){const _0x5a1f30=_0x2d5d1c;var _0x48530f,_0x1f99c7;if(((_0x1f99c7=(_0x48530f=_0xe2107b==null?void 0x0:_0xe2107b[_0x5a1f30(0x140)])==null?void 0x0:_0x48530f[_0x5a1f30(0x153)])!=null?_0x1f99c7:0x0)>0x0){const _0xe3520d=(_0x58b6e6,_0x40163a)=>({'id':_0x58b6e6[_0x5a1f30(0x197)],'threadId':_0x58b6e6[_0x5a1f30(0x136)],'dT':f(_0x58b6e6[_0x5a1f30(0x184)]),'personId':_0x58b6e6['userId'],'resolved':_0xe2107b['solved']===I['Solved'],'unitId':_0x4ab549,'subUnitId':_0x19c2b5,'text':JSON['parse'](_0x58b6e6[_0x5a1f30(0x12e)]),'parentId':_0x40163a}),_0x37880a=_0xe3520d(_0xe2107b[_0x5a1f30(0x140)][0x0]);return{..._0x37880a,'children':_0xe2107b['replies'][_0x5a1f30(0x174)](0x1)[_0x5a1f30(0x134)](_0x5acb31=>_0xe3520d(_0x5acb31,_0x37880a['id']))};}return null;}let p=class{constructor(_0x50c5e4,_0x19b8c1,_0x422898){const _0x4f9624=_0x2d5d1c;this[_0x4f9624(0x16a)]=_0x50c5e4,this['_userService']=_0x19b8c1,this['_sessionService']=_0x422898;}async[_0x2d5d1c(0x139)](_0x1e9d18){const _0x20fee9=_0x2d5d1c;var _0x3e6978,_0x47f75a;const {parentId:_0x42930f,unitId:_0x5cbf35,text:_0x26b662,threadId:_0x3b924c}=_0x1e9d18,_0x26cc07=(_0x47f75a=(_0x3e6978=_0x26b662[_0x20fee9(0x181)])==null?void 0x0:_0x3e6978[_0x20fee9(0x194)](_0x77bfa2=>_0x77bfa2[_0x20fee9(0x12d)]===c[_0x20fee9(0x169)][_0x20fee9(0x17c)])[_0x20fee9(0x134)](_0x4f2c83=>_0x4f2c83[_0x20fee9(0x168)]))!=null?_0x47f75a:[],_0x39cffe=JSON[_0x20fee9(0x17f)](_0x26b662),_0x1fb9df=(await this[_0x20fee9(0x127)][_0x20fee9(0x17a)](_0x5cbf35))[_0x20fee9(0x19f)]();if(_0x42930f){const _0x2ebcf8={'memberId':_0x1fb9df,'unitId':_0x5cbf35,'content':_0x39cffe,'mention':_0x26cc07,'threadId':_0x3b924c},_0x21f5c4=(await this[_0x20fee9(0x16a)][_0x20fee9(0x16d)](_0x20fee9(0x199)+_0x5cbf35+_0x20fee9(0x16c),{'body':_0x2ebcf8}))['body'][_0x20fee9(0x175)];return{..._0x1e9d18,'id':_0x21f5c4[_0x20fee9(0x197)],'dT':c[_0x20fee9(0x14e)](+_0x21f5c4[_0x20fee9(0x184)])[_0x20fee9(0x128)](_0x20fee9(0x13a)),'personId':_0x21f5c4[_0x20fee9(0x146)]};}else{const _0x545436={'memberId':_0x1fb9df,'unitId':_0x5cbf35,'content':_0x39cffe,'mention':_0x26cc07},_0x4503e0=await this[_0x20fee9(0x16a)][_0x20fee9(0x16d)](_0x20fee9(0x199)+_0x5cbf35+_0x20fee9(0x189),{'body':_0x545436});return Y(_0x4503e0[_0x20fee9(0x17d)]['comment'],_0x1e9d18);}}async[_0x2d5d1c(0x165)](_0x110842){const _0x14b8b5=_0x2d5d1c;var _0x4ac640,_0x189ae2;const {text:_0x5abe84,unitId:_0x58a782}=_0x110842,_0x120ac1=(_0x189ae2=(_0x4ac640=_0x5abe84[_0x14b8b5(0x181)])==null?void 0x0:_0x4ac640['filter'](_0x2cdfe0=>_0x2cdfe0[_0x14b8b5(0x12d)]===c['CustomRangeType'][_0x14b8b5(0x17c)])[_0x14b8b5(0x134)](_0x375b0f=>_0x375b0f[_0x14b8b5(0x168)]))!=null?_0x189ae2:[],_0x29f7f4=JSON[_0x14b8b5(0x17f)](_0x5abe84),_0x57e17e=_0x110842[_0x14b8b5(0x136)],_0x36319c=_0x110842['id'],_0x41933e={'memberId':(await this[_0x14b8b5(0x127)][_0x14b8b5(0x17a)](_0x58a782))[_0x14b8b5(0x19f)](),'unitId':_0x58a782,'threadId':_0x57e17e,'mention':_0x120ac1,'content':_0x29f7f4,'replyId':_0x36319c},_0x23406e=await this[_0x14b8b5(0x16a)][_0x14b8b5(0x16d)]('/universer-api/comment/unit/'+_0x58a782+_0x14b8b5(0x15f),{'body':_0x41933e});return!_0x23406e['body']['error']||_0x23406e[_0x14b8b5(0x17d)]['error']['code']===0x1;}async[_0x2d5d1c(0x17e)](_0x154eab){const _0x4c3a03=_0x2d5d1c,{unitId:_0x3dbdee}=_0x154eab,_0x9b26ab=_0x154eab[_0x4c3a03(0x136)],_0x56d362={'memberId':this[_0x4c3a03(0x150)]['getCurrentUser']()[_0x4c3a03(0x190)],'unitId':_0x3dbdee,'threadId':_0x9b26ab,'solved':_0x154eab[_0x4c3a03(0x161)]?I[_0x4c3a03(0x18f)]:I[_0x4c3a03(0x13d)]},_0x2cd5cf=await this[_0x4c3a03(0x16a)][_0x4c3a03(0x16d)]('/universer-api/comment/unit/'+_0x3dbdee+_0x4c3a03(0x182),{'body':_0x56d362});return!_0x2cd5cf[_0x4c3a03(0x17d)][_0x4c3a03(0x180)]||_0x2cd5cf[_0x4c3a03(0x17d)]['error'][_0x4c3a03(0x155)]===0x1;}async[_0x2d5d1c(0x173)](_0x346062,_0x5f2c9f,_0x58eaf3,_0x5dc8db){const _0x4667fa=_0x2d5d1c,_0x3e32ff={'memberId':(await this[_0x4667fa(0x127)][_0x4667fa(0x17a)](_0x346062))['getMemberID'](),'threadId':_0x58eaf3,'replyId':_0x5dc8db,'unitId':_0x346062},_0x28984d=await this['_httpService'][_0x4667fa(0x16d)](_0x4667fa(0x199)+_0x346062+'/delete',{'body':_0x3e32ff});return!_0x28984d[_0x4667fa(0x17d)]['error']||_0x28984d[_0x4667fa(0x17d)][_0x4667fa(0x180)]['code']===0x1;}async[_0x2d5d1c(0x192)](_0xa62426,_0x4f7f9c,_0x15ace6){const _0x16c0b1=_0x2d5d1c,_0x26a40f={'unitId':_0xa62426,'threadId':_0x15ace6},_0x25a1c5=await this[_0x16c0b1(0x16a)][_0x16c0b1(0x16d)]('/universer-api/comment/unit/'+_0xa62426+_0x16c0b1(0x162),{'body':_0x26a40f}),_0x15250c=_0x15ace6[_0x16c0b1(0x134)](_0x6cc3e9=>G(_0x25a1c5[_0x16c0b1(0x17d)]['comments'][_0x6cc3e9],_0xa62426,_0x4f7f9c))[_0x16c0b1(0x194)](Boolean);return Object[_0x16c0b1(0x15c)](_0x25a1c5[_0x16c0b1(0x17d)][_0x16c0b1(0x17b)])[_0x16c0b1(0x1a1)](_0x4a1d99=>{const _0x4402ea=_0x16c0b1;this[_0x4402ea(0x150)]['addUser'](_0x4a1d99);}),_0x15250c;}[_0x2d5d1c(0x151)](_0x4101e1){const _0x5aca04=_0x2d5d1c;return{'id':_0x4101e1['id'],'threadId':_0x4101e1[_0x5aca04(0x136)],'ref':_0x4101e1['ref']};}};p=x([C(0x0,c[_0x2d5d1c(0x145)](P['HTTPService'])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x2d5d1c(0x145)](b[_0x2d5d1c(0x160)]))],p);function _0x937a(_0x20fe46,_0x14c83a){const _0x93159c=_0x9315();return _0x937a=function(_0x937ad0,_0x12332f){_0x937ad0=_0x937ad0-0x127;let _0x2db651=_0x93159c[_0x937ad0];return _0x2db651;},_0x937a(_0x20fe46,_0x14c83a);}var H=Object[_0x2d5d1c(0x177)],J=(_0x3c09df,_0xd6ab6e,_0x5ccc3d,_0x12aa91)=>{const _0x31a8c7=_0x2d5d1c;for(var _0x33d68b=_0x12aa91>0x1?void 0x0:_0x12aa91?H(_0xd6ab6e,_0x5ccc3d):_0xd6ab6e,_0xcbf4d7=_0x3c09df[_0x31a8c7(0x153)]-0x1,_0x446b5b;_0xcbf4d7>=0x0;_0xcbf4d7--)(_0x446b5b=_0x3c09df[_0xcbf4d7])&&(_0x33d68b=_0x446b5b(_0x33d68b)||_0x33d68b);return _0x33d68b;},y=(_0x4f9159,_0x2ef317)=>(_0x50194a,_0x1f5875)=>_0x2ef317(_0x50194a,_0x1f5875,_0x4f9159);let g=class extends c[_0x2d5d1c(0x16b)]{constructor(_0x4cf0d4,_0xe80b64){const _0xe1ff4=_0x2d5d1c;super(),this[_0xe1ff4(0x167)]=_0x4cf0d4,this[_0xe1ff4(0x178)]=_0xe80b64,this[_0xe1ff4(0x191)]();}[_0x2d5d1c(0x191)](){const _0xedb93f=_0x2d5d1c;this[_0xedb93f(0x167)][_0xedb93f(0x133)]=this[_0xedb93f(0x178)],this[_0xedb93f(0x167)][_0xedb93f(0x170)]=!0x1;}};g=J([y(0x0,M[_0x2d5d1c(0x187)]),y(0x1,c[_0x2d5d1c(0x145)](p))],g);var F=Object[_0x2d5d1c(0x137)],L=Object['getOwnPropertyDescriptor'],Z=(_0x484627,_0x2ec610,_0x2103dd)=>_0x2ec610 in _0x484627?F(_0x484627,_0x2ec610,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2103dd}):_0x484627[_0x2ec610]=_0x2103dd,W=(_0xe1ff51,_0x473b52,_0x47b531,_0x1730ef)=>{const _0x1f6575=_0x2d5d1c;for(var _0x3001ed=_0x1730ef>0x1?void 0x0:_0x1730ef?L(_0x473b52,_0x47b531):_0x473b52,_0x34d78f=_0xe1ff51[_0x1f6575(0x153)]-0x1,_0x2e9ba5;_0x34d78f>=0x0;_0x34d78f--)(_0x2e9ba5=_0xe1ff51[_0x34d78f])&&(_0x3001ed=_0x2e9ba5(_0x3001ed)||_0x3001ed);return _0x3001ed;},O=(_0xce0a4e,_0x2e4960)=>(_0x28f1b4,_0x4fe557)=>_0x2e4960(_0x28f1b4,_0x4fe557,_0xce0a4e),N=(_0x31229d,_0xd6ddb2,_0x5f4bec)=>Z(_0x31229d,typeof _0xd6ddb2!=_0x2d5d1c(0x12f)?_0xd6ddb2+'':_0xd6ddb2,_0x5f4bec);exports[_0x2d5d1c(0x14d)]=class extends c[_0x2d5d1c(0x19b)]{constructor(_0x347e4a=D,_0x1b7ecb,_0x1cfd07){const _0xac400c=_0x2d5d1c;super(),this[_0xac400c(0x166)]=_0x347e4a,this[_0xac400c(0x159)]=_0x1b7ecb,this[_0xac400c(0x14f)]=_0x1cfd07;const {..._0x502bca}=c[_0xac400c(0x188)]({},D,this[_0xac400c(0x166)]);this[_0xac400c(0x14f)][_0xac400c(0x163)](q,_0x502bca);}[_0x2d5d1c(0x15b)](){const _0x53b17f=_0x2d5d1c;[[p],[g],[_]][_0x53b17f(0x1a1)](_0x406c78=>{const _0x1fce04=_0x53b17f;this['_injector'][_0x1fce04(0x147)](_0x406c78);});}['onReady'](){const _0x152638=_0x2d5d1c;this['_injector'][_0x152638(0x13e)](g),this['_injector'][_0x152638(0x13e)](_);}},N(exports[_0x2d5d1c(0x14d)],'pluginName',U),N(exports[_0x2d5d1c(0x14d)],_0x2d5d1c(0x19e),c[_0x2d5d1c(0x18d)][_0x2d5d1c(0x142)]),exports[_0x2d5d1c(0x14d)]=W([c[_0x2d5d1c(0x13c)](w['UniverThreadCommentUIPlugin'],b[_0x2d5d1c(0x152)],T[_0x2d5d1c(0x14b)]),O(0x1,c[_0x2d5d1c(0x145)](c[_0x2d5d1c(0x195)])),O(0x2,c[_0x2d5d1c(0x12a)])],exports[_0x2d5d1c(0x14d)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1c57(){const _0x4a1845=['_initDataSource','map','parentId','/add','syncUpdateMutationToColla','error','replyId','_initUserSync','user','_injector','Solved','22KLCfNk','_threadCommentModel','comments','values','reply','Edit','content','132gZSJNT','_threadCommentDataSourceService','threadId','8562294FRgmqS','filter','userID','stringify','replies','unitId','post','symbol','_configService','475500yUNqXq','find','root','body','UNIVER_UNKNOWN','getComment','setConfig','getUnit','onReady','/universer-api/comment/unit/','deleteComment','315387fcUwRU','addUser','solved','Reply','Add','UNRECOGNIZED','slice','createTimestamp','ref','comment','3076799FfTbgW','userId','listComments','getOwnPropertyDescriptor','62956szIVfH','get','onStarting','rangeType','format','141cXOcEl','_config','COMMENT','/edit','280FtvdKR','57520pndvXZ','add','getUser','getCurrentUser','_userService','size','addComment','updateComment','/delete','_sessionService','Solve','_threadCommentDataSource','parse','Unknown','129094wGlagb','users','getMemberID','disposeWithMe','saveCommentToSnapshot','thread-comment-data-source.config','requireSession','OpenOrReOpen','rangeId','_init','customRanges','type','code','personId','/universer-api/user/list','forEach','subscribe','/list','_httpService','410JTpVIM','dataSource','length','pipe','Delete','_commentService','YYYY/MM/DD\x20HH:mm'];_0x1c57=function(){return _0x4a1845;};return _0x1c57();}const _0x4589a6=_0x1bd1;(function(_0x1b20d8,_0x5927c1){const _0x306e6e=_0x1bd1,_0x1764cf=_0x1b20d8();while(!![]){try{const _0x2db186=parseInt(_0x306e6e(0xc8))/0x1*(-parseInt(_0x306e6e(0x9c))/0x2)+-parseInt(_0x306e6e(0xcd))/0x3*(parseInt(_0x306e6e(0xd2))/0x4)+-parseInt(_0x306e6e(0xaf))/0x5+parseInt(_0x306e6e(0xa6))/0x6+-parseInt(_0x306e6e(0xe0))/0x7*(parseInt(_0x306e6e(0xd1))/0x8)+-parseInt(_0x306e6e(0xba))/0x9*(parseInt(_0x306e6e(0xf3))/0xa)+-parseInt(_0x306e6e(0xc4))/0xb*(-parseInt(_0x306e6e(0xa3))/0xc);if(_0x2db186===_0x5927c1)break;else _0x1764cf['push'](_0x1764cf['shift']());}catch(_0x22e1d1){_0x1764cf['push'](_0x1764cf['shift']());}}}(_0x1c57,0xe9ebb));import{CommentService as _0x3e001d,CollaborationSessionService as _0x129018,UniverCollaborationClientPlugin as _0x6a1198}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x17902a}from'@univerjs-pro/license';import{dayjs as _0x33562b,UserManagerService as _0x3332b7,Inject as _0x47535d,Injector as _0x4f1901,Disposable as _0x2a85ba,CustomRangeType as _0x13e826,UniverInstanceType as _0x4d3911,DependentOn as _0x1e604f,IConfigService as _0x23d4eb,Plugin as _0x184bc7,merge as _0x182991}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x552a21}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x303fe8,IThreadCommentDataSourceService as _0x12c212}from'@univerjs/thread-comment';import{bufferTime as _0x4eed33}from'rxjs';import{HTTPService as _0x4c611f}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x123e23=>(_0x123e23[_0x123e23['OpenOrReOpen']=0x0]=_0x4589a6(0xe7),_0x123e23[_0x123e23[_0x4589a6(0x9b)]=0x1]=_0x4589a6(0x9b),_0x123e23[_0x123e23['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x123e23))(I||{}),v=(_0x4c7caa=>(_0x4c7caa[_0x4c7caa['Unknown']=0x0]=_0x4589a6(0xdf),_0x4c7caa[_0x4c7caa[_0x4589a6(0xbe)]=0x1]='Add',_0x4c7caa[_0x4c7caa[_0x4589a6(0xbd)]=0x2]=_0x4589a6(0xbd),_0x4c7caa[_0x4c7caa[_0x4589a6(0xa1)]=0x3]=_0x4589a6(0xa1),_0x4c7caa[_0x4c7caa['Delete']=0x4]=_0x4589a6(0xf7),_0x4c7caa[_0x4c7caa['Solve']=0x5]=_0x4589a6(0xdc),_0x4c7caa[_0x4c7caa[_0x4589a6(0xbf)]=-0x1]=_0x4589a6(0xbf),_0x4c7caa))(v||{});const y=_0x21aad6=>_0x33562b(new Date(+_0x21aad6))['format'](_0x4589a6(0xf9)),B=async(_0x30e199,_0x516f20)=>{const _0x55e5ad=_0x4589a6,_0x334845=_0x30e199[_0x55e5ad(0xc9)](_0x3332b7),_0x4884b0=_0x30e199[_0x55e5ad(0xc9)](_0x4c611f);_0x516f20['forEach'](_0x4546d9=>{const _0x5732ba=_0x55e5ad;_0x334845[_0x5732ba(0xd4)](_0x4546d9)&&_0x516f20['delete'](_0x4546d9);}),_0x516f20[_0x55e5ad(0xd7)]&&(await _0x4884b0[_0x55e5ad(0xc9)](_0x55e5ad(0xee),{'params':{'userIDs':[..._0x516f20]}}))[_0x55e5ad(0xb2)][_0x55e5ad(0xe1)]['forEach'](_0x5f258a=>{_0x5f258a&&_0x334845['addUser'](_0x5f258a);});};var K=Object[_0x4589a6(0xc7)],V=(_0x562410,_0x12efe4,_0x5b4d8e,_0x4d8fe2)=>{const _0xc4a07e=_0x4589a6;for(var _0x42e8ec=_0x4d8fe2>0x1?void 0x0:_0x4d8fe2?K(_0x12efe4,_0x5b4d8e):_0x12efe4,_0x8928a8=_0x562410[_0xc4a07e(0xf5)]-0x1,_0x253872;_0x8928a8>=0x0;_0x8928a8--)(_0x253872=_0x562410[_0x8928a8])&&(_0x42e8ec=_0x253872(_0x42e8ec)||_0x42e8ec);return _0x42e8ec;},p=(_0x5bfc56,_0x212204)=>(_0x2e604c,_0x19d794)=>_0x212204(_0x2e604c,_0x19d794,_0x5bfc56);let _=class extends _0x2a85ba{constructor(_0x5998f2,_0x3e1234,_0x64b3f0,_0x5c1143){const _0x3155b2=_0x4589a6;super(),this[_0x3155b2(0xf8)]=_0x5998f2,this[_0x3155b2(0x9d)]=_0x3e1234,this[_0x3155b2(0xd6)]=_0x64b3f0,this['_injector']=_0x5c1143,this['_init'](),this['_initUserSync']();}[_0x4589a6(0x101)](){const _0x5e4e03=_0x4589a6;this[_0x5e4e03(0xe3)](this[_0x5e4e03(0x9d)]['commentUpdate$'][_0x5e4e03(0xf6)](_0x4eed33(0x10))[_0x5e4e03(0xf0)](_0x52eac3=>{const _0x543bd1=_0x5e4e03,_0x35a8e1=new Set();_0x52eac3[_0x543bd1(0xef)](_0x3ab2eb=>{const _0x498e0c=_0x543bd1;switch(_0x3ab2eb[_0x498e0c(0xeb)]){case _0x498e0c(0xd3):{const _0x5209cb=_0x3ab2eb['payload'][_0x498e0c(0xed)];_0x35a8e1[_0x498e0c(0xd3)](_0x5209cb);break;}}}),B(this['_injector'],_0x35a8e1);}));}[_0x4589a6(0xe9)](){const _0x3c9f8e=_0x4589a6;this[_0x3c9f8e(0xe3)](this[_0x3c9f8e(0xf8)]['commentUpdate$']['subscribe'](async _0x407395=>{const _0x2a864e=_0x3c9f8e;var _0x57cdbe,_0x3f946f,_0x1748ba,_0x25824b;const _0x494809=(_0x57cdbe=this[_0x2a864e(0x9d)][_0x2a864e(0xb6)](_0x407395[_0x2a864e(0xab)])['find'](_0x1b145b=>_0x1b145b[_0x2a864e(0xa5)]===_0x407395[_0x2a864e(0xa5)]))==null?void 0x0:_0x57cdbe[_0x2a864e(0xb1)];if(!_0x494809)return;const {unitId:_0x18d68b,subUnitId:_0x2aeab9}=_0x494809;switch(_0x407395[_0x2a864e(0x102)]&&this[_0x2a864e(0xd6)][_0x2a864e(0xbb)](_0x407395['user']),_0x407395[_0x2a864e(0xeb)]){case v[_0x2a864e(0xbe)]:break;case v[_0x2a864e(0xbd)]:{this['_threadCommentModel'][_0x2a864e(0xd8)](_0x18d68b,_0x2aeab9,{'unitId':_0x18d68b,'subUnitId':_0x2aeab9,'ref':'','id':_0x407395[_0x2a864e(0x100)],'dT':y(+_0x407395[_0x2a864e(0xc1)]),'threadId':_0x407395['threadId'],'personId':(_0x1748ba=(_0x3f946f=_0x407395['user'])==null?void 0x0:_0x3f946f['userID'])!=null?_0x1748ba:_0x407395['userId'],'text':JSON[_0x2a864e(0xde)](_0x407395['content']),'parentId':_0x494809['id']});break;}case v[_0x2a864e(0xf7)]:{const _0xd3fee4=this[_0x2a864e(0x9d)][_0x2a864e(0xb4)](_0x18d68b,_0x2aeab9,_0x407395[_0x2a864e(0x100)]);_0xd3fee4&&_0xd3fee4[_0x2a864e(0xfc)]&&this[_0x2a864e(0x9d)][_0x2a864e(0xb9)](_0x18d68b,_0x2aeab9,_0x407395['replyId']);break;}case v[_0x2a864e(0xa1)]:{this[_0x2a864e(0x9d)][_0x2a864e(0xd9)](_0x18d68b,_0x2aeab9,{'commentId':_0x407395[_0x2a864e(0x100)],'text':JSON['parse'](_0x407395[_0x2a864e(0xa2)])});break;}case v[_0x2a864e(0xdc)]:{const _0x97db8=(_0x25824b=this['_threadCommentModel'][_0x2a864e(0xb6)](_0x407395['unitId'])[_0x2a864e(0xb0)](_0x2e94f7=>_0x2e94f7['threadId']===_0x407395[_0x2a864e(0xa5)]))==null?void 0x0:_0x25824b[_0x2a864e(0xb1)];_0x97db8&&this[_0x2a864e(0x9d)]['resolveComment'](_0x18d68b,_0x2aeab9,_0x97db8['id'],_0x407395['solved']===I[_0x2a864e(0x9b)]);break;}}}));}};_=V([p(0x0,_0x47535d(_0x3e001d)),p(0x1,_0x47535d(_0x303fe8)),p(0x2,_0x47535d(_0x3332b7)),p(0x3,_0x47535d(_0x4f1901))],_);const z=_0x4589a6(0xe5),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x3dbf89,_0x5c8ab9,_0x1d19c4,_0x4c67b8)=>{for(var _0x3a174d=_0x4c67b8>0x1?void 0x0:_0x4c67b8?k(_0x5c8ab9,_0x1d19c4):_0x5c8ab9,_0x339383=_0x3dbf89['length']-0x1,_0xf2be25;_0x339383>=0x0;_0x339383--)(_0xf2be25=_0x3dbf89[_0x339383])&&(_0x3a174d=_0xf2be25(_0x3a174d)||_0x3a174d);return _0x3a174d;},b=(_0x386871,_0x3bd6ac)=>(_0xf6fd15,_0x5bad38)=>_0x3bd6ac(_0xf6fd15,_0x5bad38,_0x386871);function X(_0x29b28f,_0x537cf9){const _0x1baf58=_0x4589a6,_0x248932=_0x29b28f[_0x1baf58(0xaa)][0x0];return{..._0x537cf9,'id':_0x248932[_0x1baf58(0x100)],'resolved':_0x29b28f[_0x1baf58(0xbc)]===0x1,'dT':y(_0x248932[_0x1baf58(0xc1)]),'personId':_0x248932[_0x1baf58(0xc5)],'threadId':_0x248932[_0x1baf58(0xa5)]};}function ee(_0x33b920,_0x466321,_0xe864fd){const _0x51ec7b=_0x4589a6;var _0x42fd84,_0x4b3162;if(((_0x4b3162=(_0x42fd84=_0x33b920==null?void 0x0:_0x33b920['replies'])==null?void 0x0:_0x42fd84['length'])!=null?_0x4b3162:0x0)>0x0){const _0xdb8c41=(_0x21489c,_0x313910)=>({'id':_0x21489c[_0x51ec7b(0x100)],'threadId':_0x21489c['threadId'],'dT':y(_0x21489c[_0x51ec7b(0xc1)]),'personId':_0x21489c[_0x51ec7b(0xc5)],'resolved':_0x33b920[_0x51ec7b(0xbc)]===I[_0x51ec7b(0x9b)],'unitId':_0x466321,'subUnitId':_0xe864fd,'text':JSON[_0x51ec7b(0xde)](_0x21489c[_0x51ec7b(0xa2)]),'parentId':_0x313910}),_0x200632=_0xdb8c41(_0x33b920[_0x51ec7b(0xaa)][0x0]);return{..._0x200632,'children':_0x33b920[_0x51ec7b(0xaa)][_0x51ec7b(0xc0)](0x1)['map'](_0x56c7e3=>_0xdb8c41(_0x56c7e3,_0x200632['id']))};}return null;}let S=class{constructor(_0x1e435c,_0x48a72f,_0x6ad733){const _0x3a2ad9=_0x4589a6;this[_0x3a2ad9(0xf2)]=_0x1e435c,this['_userService']=_0x48a72f,this[_0x3a2ad9(0xdb)]=_0x6ad733;}async[_0x4589a6(0xd8)](_0x105acd){const _0x28666d=_0x4589a6;var _0x2d934e,_0x4f1f22;const {parentId:_0x4da64c,unitId:_0xa868e2,text:_0x19e15a,threadId:_0x2828b7}=_0x105acd,_0x188643=(_0x4f1f22=(_0x2d934e=_0x19e15a['customRanges'])==null?void 0x0:_0x2d934e[_0x28666d(0xa7)](_0x5aa96f=>_0x5aa96f[_0x28666d(0xcb)]===_0x13e826[_0x28666d(0xcf)])['map'](_0x28409d=>_0x28409d[_0x28666d(0xe8)]))!=null?_0x4f1f22:[],_0x5e662d=JSON['stringify'](_0x19e15a),_0x4e0d6c=(await this[_0x28666d(0xdb)][_0x28666d(0xe6)](_0xa868e2))[_0x28666d(0xe2)]();if(_0x4da64c){const _0x32cfc9={'memberId':_0x4e0d6c,'unitId':_0xa868e2,'content':_0x5e662d,'mention':_0x188643,'threadId':_0x2828b7},_0x4abd1b=(await this[_0x28666d(0xf2)]['post'](_0x28666d(0xb8)+_0xa868e2+'/reply',{'body':_0x32cfc9}))[_0x28666d(0xb2)][_0x28666d(0xa0)];return{..._0x105acd,'id':_0x4abd1b[_0x28666d(0x100)],'dT':_0x33562b(+_0x4abd1b[_0x28666d(0xc1)])[_0x28666d(0xcc)](_0x28666d(0xf9)),'personId':_0x4abd1b[_0x28666d(0xc5)]};}else{const _0x36cbb4={'memberId':_0x4e0d6c,'unitId':_0xa868e2,'content':_0x5e662d,'mention':_0x188643},_0x4e6e30=await this['_httpService'][_0x28666d(0xac)](_0x28666d(0xb8)+_0xa868e2+_0x28666d(0xfd),{'body':_0x36cbb4});return X(_0x4e6e30['body'][_0x28666d(0xc3)],_0x105acd);}}async[_0x4589a6(0xd9)](_0x287845){const _0x378c8b=_0x4589a6;var _0x403835,_0x213d3d;const {text:_0x34a9f6,unitId:_0xbf14af}=_0x287845,_0x49c389=(_0x213d3d=(_0x403835=_0x34a9f6[_0x378c8b(0xea)])==null?void 0x0:_0x403835[_0x378c8b(0xa7)](_0x42650c=>_0x42650c[_0x378c8b(0xcb)]===_0x13e826['COMMENT'])['map'](_0x5c875d=>_0x5c875d[_0x378c8b(0xe8)]))!=null?_0x213d3d:[],_0x99fdb9=JSON[_0x378c8b(0xa9)](_0x34a9f6),_0x235bd6=_0x287845[_0x378c8b(0xa5)],_0x5bdd0c=_0x287845['id'],_0x58ef65={'memberId':(await this[_0x378c8b(0xdb)]['requireSession'](_0xbf14af))[_0x378c8b(0xe2)](),'unitId':_0xbf14af,'threadId':_0x235bd6,'mention':_0x49c389,'content':_0x99fdb9,'replyId':_0x5bdd0c},_0x6d4a66=await this[_0x378c8b(0xf2)][_0x378c8b(0xac)](_0x378c8b(0xb8)+_0xbf14af+_0x378c8b(0xd0),{'body':_0x58ef65});return!_0x6d4a66[_0x378c8b(0xb2)][_0x378c8b(0xff)]||_0x6d4a66[_0x378c8b(0xb2)][_0x378c8b(0xff)][_0x378c8b(0xec)]===0x1;}async['resolveComment'](_0x46baa6){const _0x3823cb=_0x4589a6,{unitId:_0x11a346}=_0x46baa6,_0x5a0271=_0x46baa6[_0x3823cb(0xa5)],_0x165a5e={'memberId':this['_userService'][_0x3823cb(0xd5)]()[_0x3823cb(0xa8)],'unitId':_0x11a346,'threadId':_0x5a0271,'solved':_0x46baa6['resolved']?I[_0x3823cb(0x9b)]:I['OpenOrReOpen']},_0x418027=await this[_0x3823cb(0xf2)][_0x3823cb(0xac)](_0x3823cb(0xb8)+_0x11a346+'/solved',{'body':_0x165a5e});return!_0x418027['body'][_0x3823cb(0xff)]||_0x418027['body'][_0x3823cb(0xff)][_0x3823cb(0xec)]===0x1;}async[_0x4589a6(0xb9)](_0x2c6ca1,_0x58b8b6,_0x12a6af,_0x4b1619){const _0x3a3cd8=_0x4589a6,_0x32a16d={'memberId':(await this[_0x3a3cd8(0xdb)][_0x3a3cd8(0xe6)](_0x2c6ca1))[_0x3a3cd8(0xe2)](),'threadId':_0x12a6af,'replyId':_0x4b1619,'unitId':_0x2c6ca1},_0xf5fb88=await this[_0x3a3cd8(0xf2)][_0x3a3cd8(0xac)](_0x3a3cd8(0xb8)+_0x2c6ca1+_0x3a3cd8(0xda),{'body':_0x32a16d});return!_0xf5fb88[_0x3a3cd8(0xb2)]['error']||_0xf5fb88[_0x3a3cd8(0xb2)][_0x3a3cd8(0xff)][_0x3a3cd8(0xec)]===0x1;}async[_0x4589a6(0xc6)](_0x3e3ece,_0x5f07ed,_0x5e2438){const _0x541b63=_0x4589a6,_0x5ce53f={'unitId':_0x3e3ece,'threadId':_0x5e2438},_0x68f1b6=await this[_0x541b63(0xf2)][_0x541b63(0xac)](_0x541b63(0xb8)+_0x3e3ece+_0x541b63(0xf1),{'body':_0x5ce53f}),_0x594057=_0x5e2438[_0x541b63(0xfb)](_0x5ad9ee=>ee(_0x68f1b6[_0x541b63(0xb2)][_0x541b63(0x9e)][_0x5ad9ee],_0x3e3ece,_0x5f07ed))[_0x541b63(0xa7)](Boolean);return Object[_0x541b63(0x9f)](_0x68f1b6[_0x541b63(0xb2)]['users'])[_0x541b63(0xef)](_0x5f4ccc=>{const _0x4e0e27=_0x541b63;this[_0x4e0e27(0xd6)][_0x4e0e27(0xbb)](_0x5f4ccc);}),_0x594057;}[_0x4589a6(0xe4)](_0x3cf381){const _0x5e9f2b=_0x4589a6;return{'id':_0x3cf381['id'],'threadId':_0x3cf381[_0x5e9f2b(0xa5)],'ref':_0x3cf381[_0x5e9f2b(0xc2)]};}};function _0x1bd1(_0x464450,_0x6dbf5a){const _0x1c57ba=_0x1c57();return _0x1bd1=function(_0x1bd19d,_0xcc8ba2){_0x1bd19d=_0x1bd19d-0x9a;let _0xf55d8c=_0x1c57ba[_0x1bd19d];return _0xf55d8c;},_0x1bd1(_0x464450,_0x6dbf5a);}S=Q([b(0x0,_0x47535d(_0x4c611f)),b(0x1,_0x47535d(_0x3332b7)),b(0x2,_0x47535d(_0x129018))],S);var re=Object[_0x4589a6(0xc7)],te=(_0x55f8d7,_0x2327e3,_0x225e74,_0x29136d)=>{const _0x3c8df1=_0x4589a6;for(var _0x3fa651=_0x29136d>0x1?void 0x0:_0x29136d?re(_0x2327e3,_0x225e74):_0x2327e3,_0x1a4a77=_0x55f8d7[_0x3c8df1(0xf5)]-0x1,_0xb19a50;_0x1a4a77>=0x0;_0x1a4a77--)(_0xb19a50=_0x55f8d7[_0x1a4a77])&&(_0x3fa651=_0xb19a50(_0x3fa651)||_0x3fa651);return _0x3fa651;},M=(_0x506b64,_0x1ad209)=>(_0x4f4f38,_0x120751)=>_0x1ad209(_0x4f4f38,_0x120751,_0x506b64);let f=class extends _0x2a85ba{constructor(_0x3496d4,_0x3fbdf5){const _0x3edf0b=_0x4589a6;super(),this['_threadCommentDataSourceService']=_0x3496d4,this[_0x3edf0b(0xdd)]=_0x3fbdf5,this['_initDataSource']();}[_0x4589a6(0xfa)](){const _0x4332b8=_0x4589a6;this['_threadCommentDataSourceService'][_0x4332b8(0xf4)]=this[_0x4332b8(0xdd)],this[_0x4332b8(0xa4)][_0x4332b8(0xfe)]=!0x1;}};f=te([M(0x0,_0x12c212),M(0x1,_0x47535d(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x525286,_0x16ce9b,_0x46bb18)=>_0x16ce9b in _0x525286?se(_0x525286,_0x16ce9b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46bb18}):_0x525286[_0x16ce9b]=_0x46bb18,ie=(_0x5106c0,_0xb64b58,_0x199068,_0x564315)=>{const _0x5afb4c=_0x4589a6;for(var _0x5740b9=_0x564315>0x1?void 0x0:_0x564315?oe(_0xb64b58,_0x199068):_0xb64b58,_0x4506de=_0x5106c0[_0x5afb4c(0xf5)]-0x1,_0x218ede;_0x4506de>=0x0;_0x4506de--)(_0x218ede=_0x5106c0[_0x4506de])&&(_0x5740b9=_0x218ede(_0x5740b9)||_0x5740b9);return _0x5740b9;},N=(_0x2dea51,_0x119b59)=>(_0x1ed9a7,_0x4604d7)=>_0x119b59(_0x1ed9a7,_0x4604d7,_0x2dea51),$=(_0xb8e551,_0x15912c,_0x464698)=>ne(_0xb8e551,typeof _0x15912c!=_0x4589a6(0xad)?_0x15912c+'':_0x15912c,_0x464698);let g=class extends _0x184bc7{constructor(_0x5a8e08=O,_0x3a9771,_0x49786f){const _0x45e9d1=_0x4589a6;super(),this['_config']=_0x5a8e08,this[_0x45e9d1(0x9a)]=_0x3a9771,this[_0x45e9d1(0xae)]=_0x49786f;const {..._0x5e6f55}=_0x182991({},O,this[_0x45e9d1(0xce)]);this[_0x45e9d1(0xae)][_0x45e9d1(0xb5)](z,_0x5e6f55);}[_0x4589a6(0xca)](){[[S],[f],[_]]['forEach'](_0x3c24d5=>{this['_injector']['add'](_0x3c24d5);});}[_0x4589a6(0xb7)](){const _0x35a267=_0x4589a6;this['_injector'][_0x35a267(0xc9)](f),this[_0x35a267(0x9a)][_0x35a267(0xc9)](_);}};$(g,'pluginName',W),$(g,_0x4589a6(0xeb),_0x4d3911[_0x4589a6(0xb3)]),g=ie([_0x1e604f(_0x552a21,_0x6a1198,_0x17902a),N(0x1,_0x47535d(_0x4f1901)),N(0x2,_0x23d4eb)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ function _0x2a0d(){const _0x5d0c5e=['getOwnPropertyDescriptor','_init','_httpService','unitId','pluginName','/add','410003ZrOwBA','getUnit','UNIVER_UNKNOWN','user','type','slice','delete','COMMENT','commentUpdate$','get','code','/delete','_userService','content','forEach','syncUpdateMutationToColla','Reply','replies','dataSource','customRanges','YYYY/MM/DD\x20HH:mm','55DxAgtR','Solved','_threadCommentDataSource','filter','setConfig','payload','subscribe','symbol','getMemberID','85196AsVuof','length','_config','840864WiteAJ','map','comment','values','Unknown','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','ref','addComment','userId','/reply','_injector','OpenOrReOpen','createTimestamp','reply','Delete','thread-comment-data-source.config','find','_configService','_initUserSync','requireSession','stringify','486525wvJUtb','onReady','_threadCommentDataSourceService','post','comments','body','rangeId','/universer-api/comment/unit/','replyId','9AKoaPU','_sessionService','size','/list','3487344GtSZhE','resolved','_commentService','disposeWithMe','Add','1203642ZWZhCv','UNRECOGNIZED','getComment','rangeType','deleteComment','add','2187848SUCEhq','parse','resolveComment','error','/edit','updateComment','addUser','listComments','userID','solved','threadId','defineProperty','parentId','pipe','/solved','saveCommentToSnapshot','format','_threadCommentModel','users'];_0x2a0d=function(){return _0x5d0c5e;};return _0x2a0d();}const _0x2b3a05=_0x81a1;(function(_0x5937ad,_0x232c0a){const _0x9b48ba=_0x81a1,_0x23d8e0=_0x5937ad();while(!![]){try{const _0x328333=parseInt(_0x9b48ba(0x104))/0x1+-parseInt(_0x9b48ba(0xe5))/0x2+-parseInt(_0x9b48ba(0xd3))/0x3+-parseInt(_0x9b48ba(0xba))/0x4*(parseInt(_0x9b48ba(0xb1))/0x5)+parseInt(_0x9b48ba(0xbd))/0x6+parseInt(_0x9b48ba(0xe0))/0x7+parseInt(_0x9b48ba(0xeb))/0x8*(parseInt(_0x9b48ba(0xdc))/0x9);if(_0x328333===_0x232c0a)break;else _0x23d8e0['push'](_0x23d8e0['shift']());}catch(_0x28618b){_0x23d8e0['push'](_0x23d8e0['shift']());}}}(_0x2a0d,0x4efcf));import{CommentService as _0x57eda0,CollaborationSessionService as _0x34dfc7,UniverCollaborationClientPlugin as _0x24dfe9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2890f9}from'@univerjs-pro/license';import{dayjs as _0x8123a1,UserManagerService as _0x29389e,Inject as _0x498129,Injector as _0x4a0051,Disposable as _0x36a07e,CustomRangeType as _0x450107,UniverInstanceType as _0x5e44b5,DependentOn as _0x100038,IConfigService as _0x31db9c,Plugin as _0x1f8d6e,merge as _0x1b1ca2}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xa3c3d4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59939f,IThreadCommentDataSourceService as _0x4069f7}from'@univerjs/thread-comment';import{bufferTime as _0x2daf75}from'rxjs';import{HTTPService as _0x26a669}from'@univerjs/network';const W=_0x2b3a05(0xc2);var I=(_0x145428=>(_0x145428[_0x145428[_0x2b3a05(0xc9)]=0x0]='OpenOrReOpen',_0x145428[_0x145428[_0x2b3a05(0xb2)]=0x1]=_0x2b3a05(0xb2),_0x145428[_0x145428[_0x2b3a05(0xe6)]=-0x1]='UNRECOGNIZED',_0x145428))(I||{}),v=(_0x130188=>(_0x130188[_0x130188[_0x2b3a05(0xc1)]=0x0]=_0x2b3a05(0xc1),_0x130188[_0x130188[_0x2b3a05(0xe4)]=0x1]=_0x2b3a05(0xe4),_0x130188[_0x130188['Reply']=0x2]=_0x2b3a05(0xac),_0x130188[_0x130188['Edit']=0x3]=_0x2b3a05(0xc3),_0x130188[_0x130188['Delete']=0x4]=_0x2b3a05(0xcc),_0x130188[_0x130188['Solve']=0x5]='Solve',_0x130188[_0x130188[_0x2b3a05(0xe6)]=-0x1]=_0x2b3a05(0xe6),_0x130188))(v||{});const y=_0x177b1d=>_0x8123a1(new Date(+_0x177b1d))[_0x2b3a05(0xfb)](_0x2b3a05(0xb0)),B=async(_0x46cc82,_0x2ba6db)=>{const _0x9493a3=_0x2b3a05,_0x6ea9fc=_0x46cc82[_0x9493a3(0xa5)](_0x29389e),_0x152d99=_0x46cc82[_0x9493a3(0xa5)](_0x26a669);_0x2ba6db['forEach'](_0xe0a975=>{const _0x504d9e=_0x9493a3;_0x6ea9fc['getUser'](_0xe0a975)&&_0x2ba6db[_0x504d9e(0x10a)](_0xe0a975);}),_0x2ba6db[_0x9493a3(0xde)]&&(await _0x152d99['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2ba6db]}}))[_0x9493a3(0xd8)][_0x9493a3(0xfd)][_0x9493a3(0xaa)](_0x4ca041=>{_0x4ca041&&_0x6ea9fc['addUser'](_0x4ca041);});};var K=Object[_0x2b3a05(0xfe)],V=(_0x3ccb97,_0x1bf184,_0x14da28,_0x2e9ef7)=>{for(var _0x1eae47=_0x2e9ef7>0x1?void 0x0:_0x2e9ef7?K(_0x1bf184,_0x14da28):_0x1bf184,_0x82114d=_0x3ccb97['length']-0x1,_0xcf1a2;_0x82114d>=0x0;_0x82114d--)(_0xcf1a2=_0x3ccb97[_0x82114d])&&(_0x1eae47=_0xcf1a2(_0x1eae47)||_0x1eae47);return _0x1eae47;},p=(_0x127bbb,_0x4ddbf6)=>(_0x3fe9ec,_0x1834e3)=>_0x4ddbf6(_0x3fe9ec,_0x1834e3,_0x127bbb);let _=class extends _0x36a07e{constructor(_0x31a92b,_0x5dbcb1,_0x24fda3,_0x49e3e8){const _0x39452e=_0x2b3a05;super(),this[_0x39452e(0xe2)]=_0x31a92b,this[_0x39452e(0xfc)]=_0x5dbcb1,this[_0x39452e(0xa8)]=_0x24fda3,this[_0x39452e(0xc8)]=_0x49e3e8,this[_0x39452e(0xff)](),this['_initUserSync']();}[_0x2b3a05(0xd0)](){const _0x38e32f=_0x2b3a05;this[_0x38e32f(0xe3)](this[_0x38e32f(0xfc)][_0x38e32f(0xa4)][_0x38e32f(0xf8)](_0x2daf75(0x10))[_0x38e32f(0xb7)](_0x3fc155=>{const _0x2153a1=_0x38e32f,_0x3abdc6=new Set();_0x3fc155[_0x2153a1(0xaa)](_0x7b70a4=>{const _0xaa0e38=_0x2153a1;switch(_0x7b70a4[_0xaa0e38(0x108)]){case _0xaa0e38(0xea):{const _0x436d90=_0x7b70a4[_0xaa0e38(0xb6)]['personId'];_0x3abdc6['add'](_0x436d90);break;}}}),B(this[_0x2153a1(0xc8)],_0x3abdc6);}));}[_0x2b3a05(0xff)](){const _0x4411d9=_0x2b3a05;this[_0x4411d9(0xe3)](this[_0x4411d9(0xe2)]['commentUpdate$'][_0x4411d9(0xb7)](async _0x2c708d=>{const _0x5c7953=_0x4411d9;var _0x4b0a00,_0x31c3e3,_0x2f3d3a,_0x2a5386;const _0x5d36f4=(_0x4b0a00=this[_0x5c7953(0xfc)][_0x5c7953(0x105)](_0x2c708d[_0x5c7953(0x101)])[_0x5c7953(0xce)](_0x69703e=>_0x69703e[_0x5c7953(0xf5)]===_0x2c708d[_0x5c7953(0xf5)]))==null?void 0x0:_0x4b0a00['root'];if(!_0x5d36f4)return;const {unitId:_0xa6e968,subUnitId:_0xa812bc}=_0x5d36f4;switch(_0x2c708d[_0x5c7953(0x107)]&&this['_userService'][_0x5c7953(0xf1)](_0x2c708d[_0x5c7953(0x107)]),_0x2c708d[_0x5c7953(0x108)]){case v[_0x5c7953(0xe4)]:break;case v[_0x5c7953(0xac)]:{this[_0x5c7953(0xfc)][_0x5c7953(0xc5)](_0xa6e968,_0xa812bc,{'unitId':_0xa6e968,'subUnitId':_0xa812bc,'ref':'','id':_0x2c708d[_0x5c7953(0xdb)],'dT':y(+_0x2c708d[_0x5c7953(0xca)]),'threadId':_0x2c708d[_0x5c7953(0xf5)],'personId':(_0x2f3d3a=(_0x31c3e3=_0x2c708d[_0x5c7953(0x107)])==null?void 0x0:_0x31c3e3[_0x5c7953(0xf3)])!=null?_0x2f3d3a:_0x2c708d[_0x5c7953(0xc6)],'text':JSON[_0x5c7953(0xec)](_0x2c708d['content']),'parentId':_0x5d36f4['id']});break;}case v['Delete']:{const _0x13abc4=this[_0x5c7953(0xfc)][_0x5c7953(0xe7)](_0xa6e968,_0xa812bc,_0x2c708d['replyId']);_0x13abc4&&_0x13abc4[_0x5c7953(0xf7)]&&this[_0x5c7953(0xfc)][_0x5c7953(0xe9)](_0xa6e968,_0xa812bc,_0x2c708d['replyId']);break;}case v[_0x5c7953(0xc3)]:{this[_0x5c7953(0xfc)][_0x5c7953(0xf0)](_0xa6e968,_0xa812bc,{'commentId':_0x2c708d['replyId'],'text':JSON[_0x5c7953(0xec)](_0x2c708d[_0x5c7953(0xa9)])});break;}case v['Solve']:{const _0x5f0403=(_0x2a5386=this[_0x5c7953(0xfc)]['getUnit'](_0x2c708d[_0x5c7953(0x101)])['find'](_0x346a0d=>_0x346a0d['threadId']===_0x2c708d['threadId']))==null?void 0x0:_0x2a5386['root'];_0x5f0403&&this[_0x5c7953(0xfc)][_0x5c7953(0xed)](_0xa6e968,_0xa812bc,_0x5f0403['id'],_0x2c708d['solved']===I[_0x5c7953(0xb2)]);break;}}}));}};_=V([p(0x0,_0x498129(_0x57eda0)),p(0x1,_0x498129(_0x59939f)),p(0x2,_0x498129(_0x29389e)),p(0x3,_0x498129(_0x4a0051))],_);const z=_0x2b3a05(0xcd),O={};var k=Object[_0x2b3a05(0xfe)],Q=(_0x137738,_0x58e2dd,_0x33fb3e,_0xa4184d)=>{const _0x3d3795=_0x2b3a05;for(var _0x5a0188=_0xa4184d>0x1?void 0x0:_0xa4184d?k(_0x58e2dd,_0x33fb3e):_0x58e2dd,_0x4e6697=_0x137738[_0x3d3795(0xbb)]-0x1,_0x1c6276;_0x4e6697>=0x0;_0x4e6697--)(_0x1c6276=_0x137738[_0x4e6697])&&(_0x5a0188=_0x1c6276(_0x5a0188)||_0x5a0188);return _0x5a0188;},b=(_0x58e9f7,_0x2d8fb1)=>(_0x3ef83b,_0x1f6602)=>_0x2d8fb1(_0x3ef83b,_0x1f6602,_0x58e9f7);function _0x81a1(_0x59653b,_0x3e4848){const _0x2a0d55=_0x2a0d();return _0x81a1=function(_0x81a15b,_0xae53e9){_0x81a15b=_0x81a15b-0xa3;let _0x462405=_0x2a0d55[_0x81a15b];return _0x462405;},_0x81a1(_0x59653b,_0x3e4848);}function X(_0x4c2bcc,_0x2abf67){const _0x405497=_0x2b3a05,_0x24f327=_0x4c2bcc['replies'][0x0];return{..._0x2abf67,'id':_0x24f327[_0x405497(0xdb)],'resolved':_0x4c2bcc[_0x405497(0xf4)]===0x1,'dT':y(_0x24f327[_0x405497(0xca)]),'personId':_0x24f327['userId'],'threadId':_0x24f327[_0x405497(0xf5)]};}function ee(_0x4de25f,_0x3f471b,_0x13f928){const _0x4f1039=_0x2b3a05;var _0x55fd92,_0x20976b;if(((_0x20976b=(_0x55fd92=_0x4de25f==null?void 0x0:_0x4de25f[_0x4f1039(0xad)])==null?void 0x0:_0x55fd92[_0x4f1039(0xbb)])!=null?_0x20976b:0x0)>0x0){const _0x14f233=(_0x282b42,_0x49735b)=>({'id':_0x282b42[_0x4f1039(0xdb)],'threadId':_0x282b42[_0x4f1039(0xf5)],'dT':y(_0x282b42[_0x4f1039(0xca)]),'personId':_0x282b42[_0x4f1039(0xc6)],'resolved':_0x4de25f[_0x4f1039(0xf4)]===I['Solved'],'unitId':_0x3f471b,'subUnitId':_0x13f928,'text':JSON[_0x4f1039(0xec)](_0x282b42['content']),'parentId':_0x49735b}),_0x5c74db=_0x14f233(_0x4de25f['replies'][0x0]);return{..._0x5c74db,'children':_0x4de25f[_0x4f1039(0xad)][_0x4f1039(0x109)](0x1)[_0x4f1039(0xbe)](_0x29dff8=>_0x14f233(_0x29dff8,_0x5c74db['id']))};}return null;}let S=class{constructor(_0x2ee7f3,_0x58d0cc,_0x38f933){const _0x420dcd=_0x2b3a05;this['_httpService']=_0x2ee7f3,this[_0x420dcd(0xa8)]=_0x58d0cc,this[_0x420dcd(0xdd)]=_0x38f933;}async[_0x2b3a05(0xc5)](_0x5237fe){const _0x89560a=_0x2b3a05;var _0xb05776,_0x10b74d;const {parentId:_0x5654f9,unitId:_0x972565,text:_0x37986e,threadId:_0x2e044a}=_0x5237fe,_0x54bc0c=(_0x10b74d=(_0xb05776=_0x37986e[_0x89560a(0xaf)])==null?void 0x0:_0xb05776['filter'](_0x2d2b98=>_0x2d2b98[_0x89560a(0xe8)]===_0x450107[_0x89560a(0xa3)])[_0x89560a(0xbe)](_0x4f2c7a=>_0x4f2c7a[_0x89560a(0xd9)]))!=null?_0x10b74d:[],_0x3678f9=JSON[_0x89560a(0xd2)](_0x37986e),_0x54e823=(await this[_0x89560a(0xdd)][_0x89560a(0xd1)](_0x972565))[_0x89560a(0xb9)]();if(_0x5654f9){const _0x3b95d9={'memberId':_0x54e823,'unitId':_0x972565,'content':_0x3678f9,'mention':_0x54bc0c,'threadId':_0x2e044a},_0x39c1ec=(await this[_0x89560a(0x100)]['post'](_0x89560a(0xda)+_0x972565+_0x89560a(0xc7),{'body':_0x3b95d9}))[_0x89560a(0xd8)][_0x89560a(0xcb)];return{..._0x5237fe,'id':_0x39c1ec[_0x89560a(0xdb)],'dT':_0x8123a1(+_0x39c1ec[_0x89560a(0xca)])[_0x89560a(0xfb)](_0x89560a(0xb0)),'personId':_0x39c1ec[_0x89560a(0xc6)]};}else{const _0x1b5d8f={'memberId':_0x54e823,'unitId':_0x972565,'content':_0x3678f9,'mention':_0x54bc0c},_0x363458=await this[_0x89560a(0x100)]['post'](_0x89560a(0xda)+_0x972565+_0x89560a(0x103),{'body':_0x1b5d8f});return X(_0x363458[_0x89560a(0xd8)][_0x89560a(0xbf)],_0x5237fe);}}async['updateComment'](_0x1bb80e){const _0x23c55b=_0x2b3a05;var _0x2f7f46,_0x41ebd1;const {text:_0xff9c23,unitId:_0x23fdb3}=_0x1bb80e,_0x4a016c=(_0x41ebd1=(_0x2f7f46=_0xff9c23[_0x23c55b(0xaf)])==null?void 0x0:_0x2f7f46[_0x23c55b(0xb4)](_0x46c3ae=>_0x46c3ae[_0x23c55b(0xe8)]===_0x450107[_0x23c55b(0xa3)])[_0x23c55b(0xbe)](_0x31bced=>_0x31bced[_0x23c55b(0xd9)]))!=null?_0x41ebd1:[],_0x22036a=JSON[_0x23c55b(0xd2)](_0xff9c23),_0x26e176=_0x1bb80e['threadId'],_0x37c6ef=_0x1bb80e['id'],_0x2cb86c={'memberId':(await this['_sessionService']['requireSession'](_0x23fdb3))[_0x23c55b(0xb9)](),'unitId':_0x23fdb3,'threadId':_0x26e176,'mention':_0x4a016c,'content':_0x22036a,'replyId':_0x37c6ef},_0x1267e9=await this[_0x23c55b(0x100)][_0x23c55b(0xd6)](_0x23c55b(0xda)+_0x23fdb3+_0x23c55b(0xef),{'body':_0x2cb86c});return!_0x1267e9[_0x23c55b(0xd8)][_0x23c55b(0xee)]||_0x1267e9['body'][_0x23c55b(0xee)][_0x23c55b(0xa6)]===0x1;}async['resolveComment'](_0x21f90c){const _0x4f3c95=_0x2b3a05,{unitId:_0x12ce03}=_0x21f90c,_0xbf820e=_0x21f90c[_0x4f3c95(0xf5)],_0x2f1e7e={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x12ce03,'threadId':_0xbf820e,'solved':_0x21f90c[_0x4f3c95(0xe1)]?I[_0x4f3c95(0xb2)]:I[_0x4f3c95(0xc9)]},_0x52ed40=await this[_0x4f3c95(0x100)]['post']('/universer-api/comment/unit/'+_0x12ce03+_0x4f3c95(0xf9),{'body':_0x2f1e7e});return!_0x52ed40[_0x4f3c95(0xd8)][_0x4f3c95(0xee)]||_0x52ed40[_0x4f3c95(0xd8)][_0x4f3c95(0xee)][_0x4f3c95(0xa6)]===0x1;}async[_0x2b3a05(0xe9)](_0x543592,_0x5ba2ac,_0x532199,_0x445b27){const _0x43d901=_0x2b3a05,_0x54e169={'memberId':(await this[_0x43d901(0xdd)][_0x43d901(0xd1)](_0x543592))[_0x43d901(0xb9)](),'threadId':_0x532199,'replyId':_0x445b27,'unitId':_0x543592},_0x4152f7=await this[_0x43d901(0x100)]['post'](_0x43d901(0xda)+_0x543592+_0x43d901(0xa7),{'body':_0x54e169});return!_0x4152f7[_0x43d901(0xd8)]['error']||_0x4152f7['body'][_0x43d901(0xee)][_0x43d901(0xa6)]===0x1;}async[_0x2b3a05(0xf2)](_0x43fb89,_0x35dfc7,_0x44ccf7){const _0xdc56a0=_0x2b3a05,_0x2bb512={'unitId':_0x43fb89,'threadId':_0x44ccf7},_0x136aa3=await this[_0xdc56a0(0x100)][_0xdc56a0(0xd6)](_0xdc56a0(0xda)+_0x43fb89+_0xdc56a0(0xdf),{'body':_0x2bb512}),_0x396b45=_0x44ccf7[_0xdc56a0(0xbe)](_0x521a42=>ee(_0x136aa3[_0xdc56a0(0xd8)][_0xdc56a0(0xd7)][_0x521a42],_0x43fb89,_0x35dfc7))['filter'](Boolean);return Object[_0xdc56a0(0xc0)](_0x136aa3[_0xdc56a0(0xd8)][_0xdc56a0(0xfd)])[_0xdc56a0(0xaa)](_0x51b647=>{const _0x5f17ad=_0xdc56a0;this['_userService'][_0x5f17ad(0xf1)](_0x51b647);}),_0x396b45;}[_0x2b3a05(0xfa)](_0x532809){const _0x48a49a=_0x2b3a05;return{'id':_0x532809['id'],'threadId':_0x532809[_0x48a49a(0xf5)],'ref':_0x532809[_0x48a49a(0xc4)]};}};S=Q([b(0x0,_0x498129(_0x26a669)),b(0x1,_0x498129(_0x29389e)),b(0x2,_0x498129(_0x34dfc7))],S);var re=Object[_0x2b3a05(0xfe)],te=(_0x2b6795,_0x24c0d5,_0x177188,_0x2fa035)=>{for(var _0x5313f7=_0x2fa035>0x1?void 0x0:_0x2fa035?re(_0x24c0d5,_0x177188):_0x24c0d5,_0x3135b0=_0x2b6795['length']-0x1,_0x503ffd;_0x3135b0>=0x0;_0x3135b0--)(_0x503ffd=_0x2b6795[_0x3135b0])&&(_0x5313f7=_0x503ffd(_0x5313f7)||_0x5313f7);return _0x5313f7;},M=(_0x1f5aaa,_0x5cb32c)=>(_0x16b200,_0x5c335a)=>_0x5cb32c(_0x16b200,_0x5c335a,_0x1f5aaa);let f=class extends _0x36a07e{constructor(_0x16e3b6,_0x14ab06){const _0x40106c=_0x2b3a05;super(),this[_0x40106c(0xd5)]=_0x16e3b6,this[_0x40106c(0xb3)]=_0x14ab06,this['_initDataSource']();}['_initDataSource'](){const _0x29dfc7=_0x2b3a05;this[_0x29dfc7(0xd5)][_0x29dfc7(0xae)]=this[_0x29dfc7(0xb3)],this[_0x29dfc7(0xd5)][_0x29dfc7(0xab)]=!0x1;}};f=te([M(0x0,_0x4069f7),M(0x1,_0x498129(S))],f);var se=Object[_0x2b3a05(0xf6)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xf6d3f8,_0x53120e,_0x40e63d)=>_0x53120e in _0xf6d3f8?se(_0xf6d3f8,_0x53120e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40e63d}):_0xf6d3f8[_0x53120e]=_0x40e63d,ie=(_0x46d76f,_0x43b2b0,_0x52d179,_0x723148)=>{const _0x465b61=_0x2b3a05;for(var _0x1267a0=_0x723148>0x1?void 0x0:_0x723148?oe(_0x43b2b0,_0x52d179):_0x43b2b0,_0x1a5a81=_0x46d76f[_0x465b61(0xbb)]-0x1,_0x56c178;_0x1a5a81>=0x0;_0x1a5a81--)(_0x56c178=_0x46d76f[_0x1a5a81])&&(_0x1267a0=_0x56c178(_0x1267a0)||_0x1267a0);return _0x1267a0;},N=(_0x516c10,_0x34c475)=>(_0x3d8091,_0x18876d)=>_0x34c475(_0x3d8091,_0x18876d,_0x516c10),$=(_0x24957d,_0x2ce9cd,_0x54fd97)=>ne(_0x24957d,typeof _0x2ce9cd!=_0x2b3a05(0xb8)?_0x2ce9cd+'':_0x2ce9cd,_0x54fd97);let g=class extends _0x1f8d6e{constructor(_0x30ac06=O,_0x33d4ec,_0x4403be){const _0x156dfb=_0x2b3a05;super(),this[_0x156dfb(0xbc)]=_0x30ac06,this['_injector']=_0x33d4ec,this[_0x156dfb(0xcf)]=_0x4403be;const {..._0x5ddd41}=_0x1b1ca2({},O,this['_config']);this[_0x156dfb(0xcf)][_0x156dfb(0xb5)](z,_0x5ddd41);}['onStarting'](){const _0x2796d5=_0x2b3a05;[[S],[f],[_]][_0x2796d5(0xaa)](_0x42ec86=>{const _0x175418=_0x2796d5;this[_0x175418(0xc8)][_0x175418(0xea)](_0x42ec86);});}[_0x2b3a05(0xd4)](){const _0x324ca2=_0x2b3a05;this[_0x324ca2(0xc8)][_0x324ca2(0xa5)](f),this[_0x324ca2(0xc8)]['get'](_);}};$(g,_0x2b3a05(0x102),W),$(g,'type',_0x5e44b5[_0x2b3a05(0x106)]),g=ie([_0x100038(_0xa3c3d4,_0x24dfe9,_0x2890f9),N(0x1,_0x498129(_0x4a0051)),N(0x2,_0x31db9c)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1c57(){const _0x4a1845=['_initDataSource','map','parentId','/add','syncUpdateMutationToColla','error','replyId','_initUserSync','user','_injector','Solved','22KLCfNk','_threadCommentModel','comments','values','reply','Edit','content','132gZSJNT','_threadCommentDataSourceService','threadId','8562294FRgmqS','filter','userID','stringify','replies','unitId','post','symbol','_configService','475500yUNqXq','find','root','body','UNIVER_UNKNOWN','getComment','setConfig','getUnit','onReady','/universer-api/comment/unit/','deleteComment','315387fcUwRU','addUser','solved','Reply','Add','UNRECOGNIZED','slice','createTimestamp','ref','comment','3076799FfTbgW','userId','listComments','getOwnPropertyDescriptor','62956szIVfH','get','onStarting','rangeType','format','141cXOcEl','_config','COMMENT','/edit','280FtvdKR','57520pndvXZ','add','getUser','getCurrentUser','_userService','size','addComment','updateComment','/delete','_sessionService','Solve','_threadCommentDataSource','parse','Unknown','129094wGlagb','users','getMemberID','disposeWithMe','saveCommentToSnapshot','thread-comment-data-source.config','requireSession','OpenOrReOpen','rangeId','_init','customRanges','type','code','personId','/universer-api/user/list','forEach','subscribe','/list','_httpService','410JTpVIM','dataSource','length','pipe','Delete','_commentService','YYYY/MM/DD\x20HH:mm'];_0x1c57=function(){return _0x4a1845;};return _0x1c57();}const _0x4589a6=_0x1bd1;(function(_0x1b20d8,_0x5927c1){const _0x306e6e=_0x1bd1,_0x1764cf=_0x1b20d8();while(!![]){try{const _0x2db186=parseInt(_0x306e6e(0xc8))/0x1*(-parseInt(_0x306e6e(0x9c))/0x2)+-parseInt(_0x306e6e(0xcd))/0x3*(parseInt(_0x306e6e(0xd2))/0x4)+-parseInt(_0x306e6e(0xaf))/0x5+parseInt(_0x306e6e(0xa6))/0x6+-parseInt(_0x306e6e(0xe0))/0x7*(parseInt(_0x306e6e(0xd1))/0x8)+-parseInt(_0x306e6e(0xba))/0x9*(parseInt(_0x306e6e(0xf3))/0xa)+-parseInt(_0x306e6e(0xc4))/0xb*(-parseInt(_0x306e6e(0xa3))/0xc);if(_0x2db186===_0x5927c1)break;else _0x1764cf['push'](_0x1764cf['shift']());}catch(_0x22e1d1){_0x1764cf['push'](_0x1764cf['shift']());}}}(_0x1c57,0xe9ebb));import{CommentService as _0x3e001d,CollaborationSessionService as _0x129018,UniverCollaborationClientPlugin as _0x6a1198}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x17902a}from'@univerjs-pro/license';import{dayjs as _0x33562b,UserManagerService as _0x3332b7,Inject as _0x47535d,Injector as _0x4f1901,Disposable as _0x2a85ba,CustomRangeType as _0x13e826,UniverInstanceType as _0x4d3911,DependentOn as _0x1e604f,IConfigService as _0x23d4eb,Plugin as _0x184bc7,merge as _0x182991}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x552a21}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x303fe8,IThreadCommentDataSourceService as _0x12c212}from'@univerjs/thread-comment';import{bufferTime as _0x4eed33}from'rxjs';import{HTTPService as _0x4c611f}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x123e23=>(_0x123e23[_0x123e23['OpenOrReOpen']=0x0]=_0x4589a6(0xe7),_0x123e23[_0x123e23[_0x4589a6(0x9b)]=0x1]=_0x4589a6(0x9b),_0x123e23[_0x123e23['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x123e23))(I||{}),v=(_0x4c7caa=>(_0x4c7caa[_0x4c7caa['Unknown']=0x0]=_0x4589a6(0xdf),_0x4c7caa[_0x4c7caa[_0x4589a6(0xbe)]=0x1]='Add',_0x4c7caa[_0x4c7caa[_0x4589a6(0xbd)]=0x2]=_0x4589a6(0xbd),_0x4c7caa[_0x4c7caa[_0x4589a6(0xa1)]=0x3]=_0x4589a6(0xa1),_0x4c7caa[_0x4c7caa['Delete']=0x4]=_0x4589a6(0xf7),_0x4c7caa[_0x4c7caa['Solve']=0x5]=_0x4589a6(0xdc),_0x4c7caa[_0x4c7caa[_0x4589a6(0xbf)]=-0x1]=_0x4589a6(0xbf),_0x4c7caa))(v||{});const y=_0x21aad6=>_0x33562b(new Date(+_0x21aad6))['format'](_0x4589a6(0xf9)),B=async(_0x30e199,_0x516f20)=>{const _0x55e5ad=_0x4589a6,_0x334845=_0x30e199[_0x55e5ad(0xc9)](_0x3332b7),_0x4884b0=_0x30e199[_0x55e5ad(0xc9)](_0x4c611f);_0x516f20['forEach'](_0x4546d9=>{const _0x5732ba=_0x55e5ad;_0x334845[_0x5732ba(0xd4)](_0x4546d9)&&_0x516f20['delete'](_0x4546d9);}),_0x516f20[_0x55e5ad(0xd7)]&&(await _0x4884b0[_0x55e5ad(0xc9)](_0x55e5ad(0xee),{'params':{'userIDs':[..._0x516f20]}}))[_0x55e5ad(0xb2)][_0x55e5ad(0xe1)]['forEach'](_0x5f258a=>{_0x5f258a&&_0x334845['addUser'](_0x5f258a);});};var K=Object[_0x4589a6(0xc7)],V=(_0x562410,_0x12efe4,_0x5b4d8e,_0x4d8fe2)=>{const _0xc4a07e=_0x4589a6;for(var _0x42e8ec=_0x4d8fe2>0x1?void 0x0:_0x4d8fe2?K(_0x12efe4,_0x5b4d8e):_0x12efe4,_0x8928a8=_0x562410[_0xc4a07e(0xf5)]-0x1,_0x253872;_0x8928a8>=0x0;_0x8928a8--)(_0x253872=_0x562410[_0x8928a8])&&(_0x42e8ec=_0x253872(_0x42e8ec)||_0x42e8ec);return _0x42e8ec;},p=(_0x5bfc56,_0x212204)=>(_0x2e604c,_0x19d794)=>_0x212204(_0x2e604c,_0x19d794,_0x5bfc56);let _=class extends _0x2a85ba{constructor(_0x5998f2,_0x3e1234,_0x64b3f0,_0x5c1143){const _0x3155b2=_0x4589a6;super(),this[_0x3155b2(0xf8)]=_0x5998f2,this[_0x3155b2(0x9d)]=_0x3e1234,this[_0x3155b2(0xd6)]=_0x64b3f0,this['_injector']=_0x5c1143,this['_init'](),this['_initUserSync']();}[_0x4589a6(0x101)](){const _0x5e4e03=_0x4589a6;this[_0x5e4e03(0xe3)](this[_0x5e4e03(0x9d)]['commentUpdate$'][_0x5e4e03(0xf6)](_0x4eed33(0x10))[_0x5e4e03(0xf0)](_0x52eac3=>{const _0x543bd1=_0x5e4e03,_0x35a8e1=new Set();_0x52eac3[_0x543bd1(0xef)](_0x3ab2eb=>{const _0x498e0c=_0x543bd1;switch(_0x3ab2eb[_0x498e0c(0xeb)]){case _0x498e0c(0xd3):{const _0x5209cb=_0x3ab2eb['payload'][_0x498e0c(0xed)];_0x35a8e1[_0x498e0c(0xd3)](_0x5209cb);break;}}}),B(this['_injector'],_0x35a8e1);}));}[_0x4589a6(0xe9)](){const _0x3c9f8e=_0x4589a6;this[_0x3c9f8e(0xe3)](this[_0x3c9f8e(0xf8)]['commentUpdate$']['subscribe'](async _0x407395=>{const _0x2a864e=_0x3c9f8e;var _0x57cdbe,_0x3f946f,_0x1748ba,_0x25824b;const _0x494809=(_0x57cdbe=this[_0x2a864e(0x9d)][_0x2a864e(0xb6)](_0x407395[_0x2a864e(0xab)])['find'](_0x1b145b=>_0x1b145b[_0x2a864e(0xa5)]===_0x407395[_0x2a864e(0xa5)]))==null?void 0x0:_0x57cdbe[_0x2a864e(0xb1)];if(!_0x494809)return;const {unitId:_0x18d68b,subUnitId:_0x2aeab9}=_0x494809;switch(_0x407395[_0x2a864e(0x102)]&&this[_0x2a864e(0xd6)][_0x2a864e(0xbb)](_0x407395['user']),_0x407395[_0x2a864e(0xeb)]){case v[_0x2a864e(0xbe)]:break;case v[_0x2a864e(0xbd)]:{this['_threadCommentModel'][_0x2a864e(0xd8)](_0x18d68b,_0x2aeab9,{'unitId':_0x18d68b,'subUnitId':_0x2aeab9,'ref':'','id':_0x407395[_0x2a864e(0x100)],'dT':y(+_0x407395[_0x2a864e(0xc1)]),'threadId':_0x407395['threadId'],'personId':(_0x1748ba=(_0x3f946f=_0x407395['user'])==null?void 0x0:_0x3f946f['userID'])!=null?_0x1748ba:_0x407395['userId'],'text':JSON[_0x2a864e(0xde)](_0x407395['content']),'parentId':_0x494809['id']});break;}case v[_0x2a864e(0xf7)]:{const _0xd3fee4=this[_0x2a864e(0x9d)][_0x2a864e(0xb4)](_0x18d68b,_0x2aeab9,_0x407395[_0x2a864e(0x100)]);_0xd3fee4&&_0xd3fee4[_0x2a864e(0xfc)]&&this[_0x2a864e(0x9d)][_0x2a864e(0xb9)](_0x18d68b,_0x2aeab9,_0x407395['replyId']);break;}case v[_0x2a864e(0xa1)]:{this[_0x2a864e(0x9d)][_0x2a864e(0xd9)](_0x18d68b,_0x2aeab9,{'commentId':_0x407395[_0x2a864e(0x100)],'text':JSON['parse'](_0x407395[_0x2a864e(0xa2)])});break;}case v[_0x2a864e(0xdc)]:{const _0x97db8=(_0x25824b=this['_threadCommentModel'][_0x2a864e(0xb6)](_0x407395['unitId'])[_0x2a864e(0xb0)](_0x2e94f7=>_0x2e94f7['threadId']===_0x407395[_0x2a864e(0xa5)]))==null?void 0x0:_0x25824b[_0x2a864e(0xb1)];_0x97db8&&this[_0x2a864e(0x9d)]['resolveComment'](_0x18d68b,_0x2aeab9,_0x97db8['id'],_0x407395['solved']===I[_0x2a864e(0x9b)]);break;}}}));}};_=V([p(0x0,_0x47535d(_0x3e001d)),p(0x1,_0x47535d(_0x303fe8)),p(0x2,_0x47535d(_0x3332b7)),p(0x3,_0x47535d(_0x4f1901))],_);const z=_0x4589a6(0xe5),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x3dbf89,_0x5c8ab9,_0x1d19c4,_0x4c67b8)=>{for(var _0x3a174d=_0x4c67b8>0x1?void 0x0:_0x4c67b8?k(_0x5c8ab9,_0x1d19c4):_0x5c8ab9,_0x339383=_0x3dbf89['length']-0x1,_0xf2be25;_0x339383>=0x0;_0x339383--)(_0xf2be25=_0x3dbf89[_0x339383])&&(_0x3a174d=_0xf2be25(_0x3a174d)||_0x3a174d);return _0x3a174d;},b=(_0x386871,_0x3bd6ac)=>(_0xf6fd15,_0x5bad38)=>_0x3bd6ac(_0xf6fd15,_0x5bad38,_0x386871);function X(_0x29b28f,_0x537cf9){const _0x1baf58=_0x4589a6,_0x248932=_0x29b28f[_0x1baf58(0xaa)][0x0];return{..._0x537cf9,'id':_0x248932[_0x1baf58(0x100)],'resolved':_0x29b28f[_0x1baf58(0xbc)]===0x1,'dT':y(_0x248932[_0x1baf58(0xc1)]),'personId':_0x248932[_0x1baf58(0xc5)],'threadId':_0x248932[_0x1baf58(0xa5)]};}function ee(_0x33b920,_0x466321,_0xe864fd){const _0x51ec7b=_0x4589a6;var _0x42fd84,_0x4b3162;if(((_0x4b3162=(_0x42fd84=_0x33b920==null?void 0x0:_0x33b920['replies'])==null?void 0x0:_0x42fd84['length'])!=null?_0x4b3162:0x0)>0x0){const _0xdb8c41=(_0x21489c,_0x313910)=>({'id':_0x21489c[_0x51ec7b(0x100)],'threadId':_0x21489c['threadId'],'dT':y(_0x21489c[_0x51ec7b(0xc1)]),'personId':_0x21489c[_0x51ec7b(0xc5)],'resolved':_0x33b920[_0x51ec7b(0xbc)]===I[_0x51ec7b(0x9b)],'unitId':_0x466321,'subUnitId':_0xe864fd,'text':JSON[_0x51ec7b(0xde)](_0x21489c[_0x51ec7b(0xa2)]),'parentId':_0x313910}),_0x200632=_0xdb8c41(_0x33b920[_0x51ec7b(0xaa)][0x0]);return{..._0x200632,'children':_0x33b920[_0x51ec7b(0xaa)][_0x51ec7b(0xc0)](0x1)['map'](_0x56c7e3=>_0xdb8c41(_0x56c7e3,_0x200632['id']))};}return null;}let S=class{constructor(_0x1e435c,_0x48a72f,_0x6ad733){const _0x3a2ad9=_0x4589a6;this[_0x3a2ad9(0xf2)]=_0x1e435c,this['_userService']=_0x48a72f,this[_0x3a2ad9(0xdb)]=_0x6ad733;}async[_0x4589a6(0xd8)](_0x105acd){const _0x28666d=_0x4589a6;var _0x2d934e,_0x4f1f22;const {parentId:_0x4da64c,unitId:_0xa868e2,text:_0x19e15a,threadId:_0x2828b7}=_0x105acd,_0x188643=(_0x4f1f22=(_0x2d934e=_0x19e15a['customRanges'])==null?void 0x0:_0x2d934e[_0x28666d(0xa7)](_0x5aa96f=>_0x5aa96f[_0x28666d(0xcb)]===_0x13e826[_0x28666d(0xcf)])['map'](_0x28409d=>_0x28409d[_0x28666d(0xe8)]))!=null?_0x4f1f22:[],_0x5e662d=JSON['stringify'](_0x19e15a),_0x4e0d6c=(await this[_0x28666d(0xdb)][_0x28666d(0xe6)](_0xa868e2))[_0x28666d(0xe2)]();if(_0x4da64c){const _0x32cfc9={'memberId':_0x4e0d6c,'unitId':_0xa868e2,'content':_0x5e662d,'mention':_0x188643,'threadId':_0x2828b7},_0x4abd1b=(await this[_0x28666d(0xf2)]['post'](_0x28666d(0xb8)+_0xa868e2+'/reply',{'body':_0x32cfc9}))[_0x28666d(0xb2)][_0x28666d(0xa0)];return{..._0x105acd,'id':_0x4abd1b[_0x28666d(0x100)],'dT':_0x33562b(+_0x4abd1b[_0x28666d(0xc1)])[_0x28666d(0xcc)](_0x28666d(0xf9)),'personId':_0x4abd1b[_0x28666d(0xc5)]};}else{const _0x36cbb4={'memberId':_0x4e0d6c,'unitId':_0xa868e2,'content':_0x5e662d,'mention':_0x188643},_0x4e6e30=await this['_httpService'][_0x28666d(0xac)](_0x28666d(0xb8)+_0xa868e2+_0x28666d(0xfd),{'body':_0x36cbb4});return X(_0x4e6e30['body'][_0x28666d(0xc3)],_0x105acd);}}async[_0x4589a6(0xd9)](_0x287845){const _0x378c8b=_0x4589a6;var _0x403835,_0x213d3d;const {text:_0x34a9f6,unitId:_0xbf14af}=_0x287845,_0x49c389=(_0x213d3d=(_0x403835=_0x34a9f6[_0x378c8b(0xea)])==null?void 0x0:_0x403835[_0x378c8b(0xa7)](_0x42650c=>_0x42650c[_0x378c8b(0xcb)]===_0x13e826['COMMENT'])['map'](_0x5c875d=>_0x5c875d[_0x378c8b(0xe8)]))!=null?_0x213d3d:[],_0x99fdb9=JSON[_0x378c8b(0xa9)](_0x34a9f6),_0x235bd6=_0x287845[_0x378c8b(0xa5)],_0x5bdd0c=_0x287845['id'],_0x58ef65={'memberId':(await this[_0x378c8b(0xdb)]['requireSession'](_0xbf14af))[_0x378c8b(0xe2)](),'unitId':_0xbf14af,'threadId':_0x235bd6,'mention':_0x49c389,'content':_0x99fdb9,'replyId':_0x5bdd0c},_0x6d4a66=await this[_0x378c8b(0xf2)][_0x378c8b(0xac)](_0x378c8b(0xb8)+_0xbf14af+_0x378c8b(0xd0),{'body':_0x58ef65});return!_0x6d4a66[_0x378c8b(0xb2)][_0x378c8b(0xff)]||_0x6d4a66[_0x378c8b(0xb2)][_0x378c8b(0xff)][_0x378c8b(0xec)]===0x1;}async['resolveComment'](_0x46baa6){const _0x3823cb=_0x4589a6,{unitId:_0x11a346}=_0x46baa6,_0x5a0271=_0x46baa6[_0x3823cb(0xa5)],_0x165a5e={'memberId':this['_userService'][_0x3823cb(0xd5)]()[_0x3823cb(0xa8)],'unitId':_0x11a346,'threadId':_0x5a0271,'solved':_0x46baa6['resolved']?I[_0x3823cb(0x9b)]:I['OpenOrReOpen']},_0x418027=await this[_0x3823cb(0xf2)][_0x3823cb(0xac)](_0x3823cb(0xb8)+_0x11a346+'/solved',{'body':_0x165a5e});return!_0x418027['body'][_0x3823cb(0xff)]||_0x418027['body'][_0x3823cb(0xff)][_0x3823cb(0xec)]===0x1;}async[_0x4589a6(0xb9)](_0x2c6ca1,_0x58b8b6,_0x12a6af,_0x4b1619){const _0x3a3cd8=_0x4589a6,_0x32a16d={'memberId':(await this[_0x3a3cd8(0xdb)][_0x3a3cd8(0xe6)](_0x2c6ca1))[_0x3a3cd8(0xe2)](),'threadId':_0x12a6af,'replyId':_0x4b1619,'unitId':_0x2c6ca1},_0xf5fb88=await this[_0x3a3cd8(0xf2)][_0x3a3cd8(0xac)](_0x3a3cd8(0xb8)+_0x2c6ca1+_0x3a3cd8(0xda),{'body':_0x32a16d});return!_0xf5fb88[_0x3a3cd8(0xb2)]['error']||_0xf5fb88[_0x3a3cd8(0xb2)][_0x3a3cd8(0xff)][_0x3a3cd8(0xec)]===0x1;}async[_0x4589a6(0xc6)](_0x3e3ece,_0x5f07ed,_0x5e2438){const _0x541b63=_0x4589a6,_0x5ce53f={'unitId':_0x3e3ece,'threadId':_0x5e2438},_0x68f1b6=await this[_0x541b63(0xf2)][_0x541b63(0xac)](_0x541b63(0xb8)+_0x3e3ece+_0x541b63(0xf1),{'body':_0x5ce53f}),_0x594057=_0x5e2438[_0x541b63(0xfb)](_0x5ad9ee=>ee(_0x68f1b6[_0x541b63(0xb2)][_0x541b63(0x9e)][_0x5ad9ee],_0x3e3ece,_0x5f07ed))[_0x541b63(0xa7)](Boolean);return Object[_0x541b63(0x9f)](_0x68f1b6[_0x541b63(0xb2)]['users'])[_0x541b63(0xef)](_0x5f4ccc=>{const _0x4e0e27=_0x541b63;this[_0x4e0e27(0xd6)][_0x4e0e27(0xbb)](_0x5f4ccc);}),_0x594057;}[_0x4589a6(0xe4)](_0x3cf381){const _0x5e9f2b=_0x4589a6;return{'id':_0x3cf381['id'],'threadId':_0x3cf381[_0x5e9f2b(0xa5)],'ref':_0x3cf381[_0x5e9f2b(0xc2)]};}};function _0x1bd1(_0x464450,_0x6dbf5a){const _0x1c57ba=_0x1c57();return _0x1bd1=function(_0x1bd19d,_0xcc8ba2){_0x1bd19d=_0x1bd19d-0x9a;let _0xf55d8c=_0x1c57ba[_0x1bd19d];return _0xf55d8c;},_0x1bd1(_0x464450,_0x6dbf5a);}S=Q([b(0x0,_0x47535d(_0x4c611f)),b(0x1,_0x47535d(_0x3332b7)),b(0x2,_0x47535d(_0x129018))],S);var re=Object[_0x4589a6(0xc7)],te=(_0x55f8d7,_0x2327e3,_0x225e74,_0x29136d)=>{const _0x3c8df1=_0x4589a6;for(var _0x3fa651=_0x29136d>0x1?void 0x0:_0x29136d?re(_0x2327e3,_0x225e74):_0x2327e3,_0x1a4a77=_0x55f8d7[_0x3c8df1(0xf5)]-0x1,_0xb19a50;_0x1a4a77>=0x0;_0x1a4a77--)(_0xb19a50=_0x55f8d7[_0x1a4a77])&&(_0x3fa651=_0xb19a50(_0x3fa651)||_0x3fa651);return _0x3fa651;},M=(_0x506b64,_0x1ad209)=>(_0x4f4f38,_0x120751)=>_0x1ad209(_0x4f4f38,_0x120751,_0x506b64);let f=class extends _0x2a85ba{constructor(_0x3496d4,_0x3fbdf5){const _0x3edf0b=_0x4589a6;super(),this['_threadCommentDataSourceService']=_0x3496d4,this[_0x3edf0b(0xdd)]=_0x3fbdf5,this['_initDataSource']();}[_0x4589a6(0xfa)](){const _0x4332b8=_0x4589a6;this['_threadCommentDataSourceService'][_0x4332b8(0xf4)]=this[_0x4332b8(0xdd)],this[_0x4332b8(0xa4)][_0x4332b8(0xfe)]=!0x1;}};f=te([M(0x0,_0x12c212),M(0x1,_0x47535d(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x525286,_0x16ce9b,_0x46bb18)=>_0x16ce9b in _0x525286?se(_0x525286,_0x16ce9b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46bb18}):_0x525286[_0x16ce9b]=_0x46bb18,ie=(_0x5106c0,_0xb64b58,_0x199068,_0x564315)=>{const _0x5afb4c=_0x4589a6;for(var _0x5740b9=_0x564315>0x1?void 0x0:_0x564315?oe(_0xb64b58,_0x199068):_0xb64b58,_0x4506de=_0x5106c0[_0x5afb4c(0xf5)]-0x1,_0x218ede;_0x4506de>=0x0;_0x4506de--)(_0x218ede=_0x5106c0[_0x4506de])&&(_0x5740b9=_0x218ede(_0x5740b9)||_0x5740b9);return _0x5740b9;},N=(_0x2dea51,_0x119b59)=>(_0x1ed9a7,_0x4604d7)=>_0x119b59(_0x1ed9a7,_0x4604d7,_0x2dea51),$=(_0xb8e551,_0x15912c,_0x464698)=>ne(_0xb8e551,typeof _0x15912c!=_0x4589a6(0xad)?_0x15912c+'':_0x15912c,_0x464698);let g=class extends _0x184bc7{constructor(_0x5a8e08=O,_0x3a9771,_0x49786f){const _0x45e9d1=_0x4589a6;super(),this['_config']=_0x5a8e08,this[_0x45e9d1(0x9a)]=_0x3a9771,this[_0x45e9d1(0xae)]=_0x49786f;const {..._0x5e6f55}=_0x182991({},O,this[_0x45e9d1(0xce)]);this[_0x45e9d1(0xae)][_0x45e9d1(0xb5)](z,_0x5e6f55);}[_0x4589a6(0xca)](){[[S],[f],[_]]['forEach'](_0x3c24d5=>{this['_injector']['add'](_0x3c24d5);});}[_0x4589a6(0xb7)](){const _0x35a267=_0x4589a6;this['_injector'][_0x35a267(0xc9)](f),this[_0x35a267(0x9a)][_0x35a267(0xc9)](_);}};$(g,'pluginName',W),$(g,_0x4589a6(0xeb),_0x4d3911[_0x4589a6(0xb3)]),g=ie([_0x1e604f(_0x552a21,_0x6a1198,_0x17902a),N(0x1,_0x47535d(_0x4f1901)),N(0x2,_0x23d4eb)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ function _0x2a0d(){const _0x5d0c5e=['getOwnPropertyDescriptor','_init','_httpService','unitId','pluginName','/add','410003ZrOwBA','getUnit','UNIVER_UNKNOWN','user','type','slice','delete','COMMENT','commentUpdate$','get','code','/delete','_userService','content','forEach','syncUpdateMutationToColla','Reply','replies','dataSource','customRanges','YYYY/MM/DD\x20HH:mm','55DxAgtR','Solved','_threadCommentDataSource','filter','setConfig','payload','subscribe','symbol','getMemberID','85196AsVuof','length','_config','840864WiteAJ','map','comment','values','Unknown','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','ref','addComment','userId','/reply','_injector','OpenOrReOpen','createTimestamp','reply','Delete','thread-comment-data-source.config','find','_configService','_initUserSync','requireSession','stringify','486525wvJUtb','onReady','_threadCommentDataSourceService','post','comments','body','rangeId','/universer-api/comment/unit/','replyId','9AKoaPU','_sessionService','size','/list','3487344GtSZhE','resolved','_commentService','disposeWithMe','Add','1203642ZWZhCv','UNRECOGNIZED','getComment','rangeType','deleteComment','add','2187848SUCEhq','parse','resolveComment','error','/edit','updateComment','addUser','listComments','userID','solved','threadId','defineProperty','parentId','pipe','/solved','saveCommentToSnapshot','format','_threadCommentModel','users'];_0x2a0d=function(){return _0x5d0c5e;};return _0x2a0d();}const _0x2b3a05=_0x81a1;(function(_0x5937ad,_0x232c0a){const _0x9b48ba=_0x81a1,_0x23d8e0=_0x5937ad();while(!![]){try{const _0x328333=parseInt(_0x9b48ba(0x104))/0x1+-parseInt(_0x9b48ba(0xe5))/0x2+-parseInt(_0x9b48ba(0xd3))/0x3+-parseInt(_0x9b48ba(0xba))/0x4*(parseInt(_0x9b48ba(0xb1))/0x5)+parseInt(_0x9b48ba(0xbd))/0x6+parseInt(_0x9b48ba(0xe0))/0x7+parseInt(_0x9b48ba(0xeb))/0x8*(parseInt(_0x9b48ba(0xdc))/0x9);if(_0x328333===_0x232c0a)break;else _0x23d8e0['push'](_0x23d8e0['shift']());}catch(_0x28618b){_0x23d8e0['push'](_0x23d8e0['shift']());}}}(_0x2a0d,0x4efcf));import{CommentService as _0x57eda0,CollaborationSessionService as _0x34dfc7,UniverCollaborationClientPlugin as _0x24dfe9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2890f9}from'@univerjs-pro/license';import{dayjs as _0x8123a1,UserManagerService as _0x29389e,Inject as _0x498129,Injector as _0x4a0051,Disposable as _0x36a07e,CustomRangeType as _0x450107,UniverInstanceType as _0x5e44b5,DependentOn as _0x100038,IConfigService as _0x31db9c,Plugin as _0x1f8d6e,merge as _0x1b1ca2}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xa3c3d4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59939f,IThreadCommentDataSourceService as _0x4069f7}from'@univerjs/thread-comment';import{bufferTime as _0x2daf75}from'rxjs';import{HTTPService as _0x26a669}from'@univerjs/network';const W=_0x2b3a05(0xc2);var I=(_0x145428=>(_0x145428[_0x145428[_0x2b3a05(0xc9)]=0x0]='OpenOrReOpen',_0x145428[_0x145428[_0x2b3a05(0xb2)]=0x1]=_0x2b3a05(0xb2),_0x145428[_0x145428[_0x2b3a05(0xe6)]=-0x1]='UNRECOGNIZED',_0x145428))(I||{}),v=(_0x130188=>(_0x130188[_0x130188[_0x2b3a05(0xc1)]=0x0]=_0x2b3a05(0xc1),_0x130188[_0x130188[_0x2b3a05(0xe4)]=0x1]=_0x2b3a05(0xe4),_0x130188[_0x130188['Reply']=0x2]=_0x2b3a05(0xac),_0x130188[_0x130188['Edit']=0x3]=_0x2b3a05(0xc3),_0x130188[_0x130188['Delete']=0x4]=_0x2b3a05(0xcc),_0x130188[_0x130188['Solve']=0x5]='Solve',_0x130188[_0x130188[_0x2b3a05(0xe6)]=-0x1]=_0x2b3a05(0xe6),_0x130188))(v||{});const y=_0x177b1d=>_0x8123a1(new Date(+_0x177b1d))[_0x2b3a05(0xfb)](_0x2b3a05(0xb0)),B=async(_0x46cc82,_0x2ba6db)=>{const _0x9493a3=_0x2b3a05,_0x6ea9fc=_0x46cc82[_0x9493a3(0xa5)](_0x29389e),_0x152d99=_0x46cc82[_0x9493a3(0xa5)](_0x26a669);_0x2ba6db['forEach'](_0xe0a975=>{const _0x504d9e=_0x9493a3;_0x6ea9fc['getUser'](_0xe0a975)&&_0x2ba6db[_0x504d9e(0x10a)](_0xe0a975);}),_0x2ba6db[_0x9493a3(0xde)]&&(await _0x152d99['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2ba6db]}}))[_0x9493a3(0xd8)][_0x9493a3(0xfd)][_0x9493a3(0xaa)](_0x4ca041=>{_0x4ca041&&_0x6ea9fc['addUser'](_0x4ca041);});};var K=Object[_0x2b3a05(0xfe)],V=(_0x3ccb97,_0x1bf184,_0x14da28,_0x2e9ef7)=>{for(var _0x1eae47=_0x2e9ef7>0x1?void 0x0:_0x2e9ef7?K(_0x1bf184,_0x14da28):_0x1bf184,_0x82114d=_0x3ccb97['length']-0x1,_0xcf1a2;_0x82114d>=0x0;_0x82114d--)(_0xcf1a2=_0x3ccb97[_0x82114d])&&(_0x1eae47=_0xcf1a2(_0x1eae47)||_0x1eae47);return _0x1eae47;},p=(_0x127bbb,_0x4ddbf6)=>(_0x3fe9ec,_0x1834e3)=>_0x4ddbf6(_0x3fe9ec,_0x1834e3,_0x127bbb);let _=class extends _0x36a07e{constructor(_0x31a92b,_0x5dbcb1,_0x24fda3,_0x49e3e8){const _0x39452e=_0x2b3a05;super(),this[_0x39452e(0xe2)]=_0x31a92b,this[_0x39452e(0xfc)]=_0x5dbcb1,this[_0x39452e(0xa8)]=_0x24fda3,this[_0x39452e(0xc8)]=_0x49e3e8,this[_0x39452e(0xff)](),this['_initUserSync']();}[_0x2b3a05(0xd0)](){const _0x38e32f=_0x2b3a05;this[_0x38e32f(0xe3)](this[_0x38e32f(0xfc)][_0x38e32f(0xa4)][_0x38e32f(0xf8)](_0x2daf75(0x10))[_0x38e32f(0xb7)](_0x3fc155=>{const _0x2153a1=_0x38e32f,_0x3abdc6=new Set();_0x3fc155[_0x2153a1(0xaa)](_0x7b70a4=>{const _0xaa0e38=_0x2153a1;switch(_0x7b70a4[_0xaa0e38(0x108)]){case _0xaa0e38(0xea):{const _0x436d90=_0x7b70a4[_0xaa0e38(0xb6)]['personId'];_0x3abdc6['add'](_0x436d90);break;}}}),B(this[_0x2153a1(0xc8)],_0x3abdc6);}));}[_0x2b3a05(0xff)](){const _0x4411d9=_0x2b3a05;this[_0x4411d9(0xe3)](this[_0x4411d9(0xe2)]['commentUpdate$'][_0x4411d9(0xb7)](async _0x2c708d=>{const _0x5c7953=_0x4411d9;var _0x4b0a00,_0x31c3e3,_0x2f3d3a,_0x2a5386;const _0x5d36f4=(_0x4b0a00=this[_0x5c7953(0xfc)][_0x5c7953(0x105)](_0x2c708d[_0x5c7953(0x101)])[_0x5c7953(0xce)](_0x69703e=>_0x69703e[_0x5c7953(0xf5)]===_0x2c708d[_0x5c7953(0xf5)]))==null?void 0x0:_0x4b0a00['root'];if(!_0x5d36f4)return;const {unitId:_0xa6e968,subUnitId:_0xa812bc}=_0x5d36f4;switch(_0x2c708d[_0x5c7953(0x107)]&&this['_userService'][_0x5c7953(0xf1)](_0x2c708d[_0x5c7953(0x107)]),_0x2c708d[_0x5c7953(0x108)]){case v[_0x5c7953(0xe4)]:break;case v[_0x5c7953(0xac)]:{this[_0x5c7953(0xfc)][_0x5c7953(0xc5)](_0xa6e968,_0xa812bc,{'unitId':_0xa6e968,'subUnitId':_0xa812bc,'ref':'','id':_0x2c708d[_0x5c7953(0xdb)],'dT':y(+_0x2c708d[_0x5c7953(0xca)]),'threadId':_0x2c708d[_0x5c7953(0xf5)],'personId':(_0x2f3d3a=(_0x31c3e3=_0x2c708d[_0x5c7953(0x107)])==null?void 0x0:_0x31c3e3[_0x5c7953(0xf3)])!=null?_0x2f3d3a:_0x2c708d[_0x5c7953(0xc6)],'text':JSON[_0x5c7953(0xec)](_0x2c708d['content']),'parentId':_0x5d36f4['id']});break;}case v['Delete']:{const _0x13abc4=this[_0x5c7953(0xfc)][_0x5c7953(0xe7)](_0xa6e968,_0xa812bc,_0x2c708d['replyId']);_0x13abc4&&_0x13abc4[_0x5c7953(0xf7)]&&this[_0x5c7953(0xfc)][_0x5c7953(0xe9)](_0xa6e968,_0xa812bc,_0x2c708d['replyId']);break;}case v[_0x5c7953(0xc3)]:{this[_0x5c7953(0xfc)][_0x5c7953(0xf0)](_0xa6e968,_0xa812bc,{'commentId':_0x2c708d['replyId'],'text':JSON[_0x5c7953(0xec)](_0x2c708d[_0x5c7953(0xa9)])});break;}case v['Solve']:{const _0x5f0403=(_0x2a5386=this[_0x5c7953(0xfc)]['getUnit'](_0x2c708d[_0x5c7953(0x101)])['find'](_0x346a0d=>_0x346a0d['threadId']===_0x2c708d['threadId']))==null?void 0x0:_0x2a5386['root'];_0x5f0403&&this[_0x5c7953(0xfc)][_0x5c7953(0xed)](_0xa6e968,_0xa812bc,_0x5f0403['id'],_0x2c708d['solved']===I[_0x5c7953(0xb2)]);break;}}}));}};_=V([p(0x0,_0x498129(_0x57eda0)),p(0x1,_0x498129(_0x59939f)),p(0x2,_0x498129(_0x29389e)),p(0x3,_0x498129(_0x4a0051))],_);const z=_0x2b3a05(0xcd),O={};var k=Object[_0x2b3a05(0xfe)],Q=(_0x137738,_0x58e2dd,_0x33fb3e,_0xa4184d)=>{const _0x3d3795=_0x2b3a05;for(var _0x5a0188=_0xa4184d>0x1?void 0x0:_0xa4184d?k(_0x58e2dd,_0x33fb3e):_0x58e2dd,_0x4e6697=_0x137738[_0x3d3795(0xbb)]-0x1,_0x1c6276;_0x4e6697>=0x0;_0x4e6697--)(_0x1c6276=_0x137738[_0x4e6697])&&(_0x5a0188=_0x1c6276(_0x5a0188)||_0x5a0188);return _0x5a0188;},b=(_0x58e9f7,_0x2d8fb1)=>(_0x3ef83b,_0x1f6602)=>_0x2d8fb1(_0x3ef83b,_0x1f6602,_0x58e9f7);function _0x81a1(_0x59653b,_0x3e4848){const _0x2a0d55=_0x2a0d();return _0x81a1=function(_0x81a15b,_0xae53e9){_0x81a15b=_0x81a15b-0xa3;let _0x462405=_0x2a0d55[_0x81a15b];return _0x462405;},_0x81a1(_0x59653b,_0x3e4848);}function X(_0x4c2bcc,_0x2abf67){const _0x405497=_0x2b3a05,_0x24f327=_0x4c2bcc['replies'][0x0];return{..._0x2abf67,'id':_0x24f327[_0x405497(0xdb)],'resolved':_0x4c2bcc[_0x405497(0xf4)]===0x1,'dT':y(_0x24f327[_0x405497(0xca)]),'personId':_0x24f327['userId'],'threadId':_0x24f327[_0x405497(0xf5)]};}function ee(_0x4de25f,_0x3f471b,_0x13f928){const _0x4f1039=_0x2b3a05;var _0x55fd92,_0x20976b;if(((_0x20976b=(_0x55fd92=_0x4de25f==null?void 0x0:_0x4de25f[_0x4f1039(0xad)])==null?void 0x0:_0x55fd92[_0x4f1039(0xbb)])!=null?_0x20976b:0x0)>0x0){const _0x14f233=(_0x282b42,_0x49735b)=>({'id':_0x282b42[_0x4f1039(0xdb)],'threadId':_0x282b42[_0x4f1039(0xf5)],'dT':y(_0x282b42[_0x4f1039(0xca)]),'personId':_0x282b42[_0x4f1039(0xc6)],'resolved':_0x4de25f[_0x4f1039(0xf4)]===I['Solved'],'unitId':_0x3f471b,'subUnitId':_0x13f928,'text':JSON[_0x4f1039(0xec)](_0x282b42['content']),'parentId':_0x49735b}),_0x5c74db=_0x14f233(_0x4de25f['replies'][0x0]);return{..._0x5c74db,'children':_0x4de25f[_0x4f1039(0xad)][_0x4f1039(0x109)](0x1)[_0x4f1039(0xbe)](_0x29dff8=>_0x14f233(_0x29dff8,_0x5c74db['id']))};}return null;}let S=class{constructor(_0x2ee7f3,_0x58d0cc,_0x38f933){const _0x420dcd=_0x2b3a05;this['_httpService']=_0x2ee7f3,this[_0x420dcd(0xa8)]=_0x58d0cc,this[_0x420dcd(0xdd)]=_0x38f933;}async[_0x2b3a05(0xc5)](_0x5237fe){const _0x89560a=_0x2b3a05;var _0xb05776,_0x10b74d;const {parentId:_0x5654f9,unitId:_0x972565,text:_0x37986e,threadId:_0x2e044a}=_0x5237fe,_0x54bc0c=(_0x10b74d=(_0xb05776=_0x37986e[_0x89560a(0xaf)])==null?void 0x0:_0xb05776['filter'](_0x2d2b98=>_0x2d2b98[_0x89560a(0xe8)]===_0x450107[_0x89560a(0xa3)])[_0x89560a(0xbe)](_0x4f2c7a=>_0x4f2c7a[_0x89560a(0xd9)]))!=null?_0x10b74d:[],_0x3678f9=JSON[_0x89560a(0xd2)](_0x37986e),_0x54e823=(await this[_0x89560a(0xdd)][_0x89560a(0xd1)](_0x972565))[_0x89560a(0xb9)]();if(_0x5654f9){const _0x3b95d9={'memberId':_0x54e823,'unitId':_0x972565,'content':_0x3678f9,'mention':_0x54bc0c,'threadId':_0x2e044a},_0x39c1ec=(await this[_0x89560a(0x100)]['post'](_0x89560a(0xda)+_0x972565+_0x89560a(0xc7),{'body':_0x3b95d9}))[_0x89560a(0xd8)][_0x89560a(0xcb)];return{..._0x5237fe,'id':_0x39c1ec[_0x89560a(0xdb)],'dT':_0x8123a1(+_0x39c1ec[_0x89560a(0xca)])[_0x89560a(0xfb)](_0x89560a(0xb0)),'personId':_0x39c1ec[_0x89560a(0xc6)]};}else{const _0x1b5d8f={'memberId':_0x54e823,'unitId':_0x972565,'content':_0x3678f9,'mention':_0x54bc0c},_0x363458=await this[_0x89560a(0x100)]['post'](_0x89560a(0xda)+_0x972565+_0x89560a(0x103),{'body':_0x1b5d8f});return X(_0x363458[_0x89560a(0xd8)][_0x89560a(0xbf)],_0x5237fe);}}async['updateComment'](_0x1bb80e){const _0x23c55b=_0x2b3a05;var _0x2f7f46,_0x41ebd1;const {text:_0xff9c23,unitId:_0x23fdb3}=_0x1bb80e,_0x4a016c=(_0x41ebd1=(_0x2f7f46=_0xff9c23[_0x23c55b(0xaf)])==null?void 0x0:_0x2f7f46[_0x23c55b(0xb4)](_0x46c3ae=>_0x46c3ae[_0x23c55b(0xe8)]===_0x450107[_0x23c55b(0xa3)])[_0x23c55b(0xbe)](_0x31bced=>_0x31bced[_0x23c55b(0xd9)]))!=null?_0x41ebd1:[],_0x22036a=JSON[_0x23c55b(0xd2)](_0xff9c23),_0x26e176=_0x1bb80e['threadId'],_0x37c6ef=_0x1bb80e['id'],_0x2cb86c={'memberId':(await this['_sessionService']['requireSession'](_0x23fdb3))[_0x23c55b(0xb9)](),'unitId':_0x23fdb3,'threadId':_0x26e176,'mention':_0x4a016c,'content':_0x22036a,'replyId':_0x37c6ef},_0x1267e9=await this[_0x23c55b(0x100)][_0x23c55b(0xd6)](_0x23c55b(0xda)+_0x23fdb3+_0x23c55b(0xef),{'body':_0x2cb86c});return!_0x1267e9[_0x23c55b(0xd8)][_0x23c55b(0xee)]||_0x1267e9['body'][_0x23c55b(0xee)][_0x23c55b(0xa6)]===0x1;}async['resolveComment'](_0x21f90c){const _0x4f3c95=_0x2b3a05,{unitId:_0x12ce03}=_0x21f90c,_0xbf820e=_0x21f90c[_0x4f3c95(0xf5)],_0x2f1e7e={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x12ce03,'threadId':_0xbf820e,'solved':_0x21f90c[_0x4f3c95(0xe1)]?I[_0x4f3c95(0xb2)]:I[_0x4f3c95(0xc9)]},_0x52ed40=await this[_0x4f3c95(0x100)]['post']('/universer-api/comment/unit/'+_0x12ce03+_0x4f3c95(0xf9),{'body':_0x2f1e7e});return!_0x52ed40[_0x4f3c95(0xd8)][_0x4f3c95(0xee)]||_0x52ed40[_0x4f3c95(0xd8)][_0x4f3c95(0xee)][_0x4f3c95(0xa6)]===0x1;}async[_0x2b3a05(0xe9)](_0x543592,_0x5ba2ac,_0x532199,_0x445b27){const _0x43d901=_0x2b3a05,_0x54e169={'memberId':(await this[_0x43d901(0xdd)][_0x43d901(0xd1)](_0x543592))[_0x43d901(0xb9)](),'threadId':_0x532199,'replyId':_0x445b27,'unitId':_0x543592},_0x4152f7=await this[_0x43d901(0x100)]['post'](_0x43d901(0xda)+_0x543592+_0x43d901(0xa7),{'body':_0x54e169});return!_0x4152f7[_0x43d901(0xd8)]['error']||_0x4152f7['body'][_0x43d901(0xee)][_0x43d901(0xa6)]===0x1;}async[_0x2b3a05(0xf2)](_0x43fb89,_0x35dfc7,_0x44ccf7){const _0xdc56a0=_0x2b3a05,_0x2bb512={'unitId':_0x43fb89,'threadId':_0x44ccf7},_0x136aa3=await this[_0xdc56a0(0x100)][_0xdc56a0(0xd6)](_0xdc56a0(0xda)+_0x43fb89+_0xdc56a0(0xdf),{'body':_0x2bb512}),_0x396b45=_0x44ccf7[_0xdc56a0(0xbe)](_0x521a42=>ee(_0x136aa3[_0xdc56a0(0xd8)][_0xdc56a0(0xd7)][_0x521a42],_0x43fb89,_0x35dfc7))['filter'](Boolean);return Object[_0xdc56a0(0xc0)](_0x136aa3[_0xdc56a0(0xd8)][_0xdc56a0(0xfd)])[_0xdc56a0(0xaa)](_0x51b647=>{const _0x5f17ad=_0xdc56a0;this['_userService'][_0x5f17ad(0xf1)](_0x51b647);}),_0x396b45;}[_0x2b3a05(0xfa)](_0x532809){const _0x48a49a=_0x2b3a05;return{'id':_0x532809['id'],'threadId':_0x532809[_0x48a49a(0xf5)],'ref':_0x532809[_0x48a49a(0xc4)]};}};S=Q([b(0x0,_0x498129(_0x26a669)),b(0x1,_0x498129(_0x29389e)),b(0x2,_0x498129(_0x34dfc7))],S);var re=Object[_0x2b3a05(0xfe)],te=(_0x2b6795,_0x24c0d5,_0x177188,_0x2fa035)=>{for(var _0x5313f7=_0x2fa035>0x1?void 0x0:_0x2fa035?re(_0x24c0d5,_0x177188):_0x24c0d5,_0x3135b0=_0x2b6795['length']-0x1,_0x503ffd;_0x3135b0>=0x0;_0x3135b0--)(_0x503ffd=_0x2b6795[_0x3135b0])&&(_0x5313f7=_0x503ffd(_0x5313f7)||_0x5313f7);return _0x5313f7;},M=(_0x1f5aaa,_0x5cb32c)=>(_0x16b200,_0x5c335a)=>_0x5cb32c(_0x16b200,_0x5c335a,_0x1f5aaa);let f=class extends _0x36a07e{constructor(_0x16e3b6,_0x14ab06){const _0x40106c=_0x2b3a05;super(),this[_0x40106c(0xd5)]=_0x16e3b6,this[_0x40106c(0xb3)]=_0x14ab06,this['_initDataSource']();}['_initDataSource'](){const _0x29dfc7=_0x2b3a05;this[_0x29dfc7(0xd5)][_0x29dfc7(0xae)]=this[_0x29dfc7(0xb3)],this[_0x29dfc7(0xd5)][_0x29dfc7(0xab)]=!0x1;}};f=te([M(0x0,_0x4069f7),M(0x1,_0x498129(S))],f);var se=Object[_0x2b3a05(0xf6)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xf6d3f8,_0x53120e,_0x40e63d)=>_0x53120e in _0xf6d3f8?se(_0xf6d3f8,_0x53120e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40e63d}):_0xf6d3f8[_0x53120e]=_0x40e63d,ie=(_0x46d76f,_0x43b2b0,_0x52d179,_0x723148)=>{const _0x465b61=_0x2b3a05;for(var _0x1267a0=_0x723148>0x1?void 0x0:_0x723148?oe(_0x43b2b0,_0x52d179):_0x43b2b0,_0x1a5a81=_0x46d76f[_0x465b61(0xbb)]-0x1,_0x56c178;_0x1a5a81>=0x0;_0x1a5a81--)(_0x56c178=_0x46d76f[_0x1a5a81])&&(_0x1267a0=_0x56c178(_0x1267a0)||_0x1267a0);return _0x1267a0;},N=(_0x516c10,_0x34c475)=>(_0x3d8091,_0x18876d)=>_0x34c475(_0x3d8091,_0x18876d,_0x516c10),$=(_0x24957d,_0x2ce9cd,_0x54fd97)=>ne(_0x24957d,typeof _0x2ce9cd!=_0x2b3a05(0xb8)?_0x2ce9cd+'':_0x2ce9cd,_0x54fd97);let g=class extends _0x1f8d6e{constructor(_0x30ac06=O,_0x33d4ec,_0x4403be){const _0x156dfb=_0x2b3a05;super(),this[_0x156dfb(0xbc)]=_0x30ac06,this['_injector']=_0x33d4ec,this[_0x156dfb(0xcf)]=_0x4403be;const {..._0x5ddd41}=_0x1b1ca2({},O,this['_config']);this[_0x156dfb(0xcf)][_0x156dfb(0xb5)](z,_0x5ddd41);}['onStarting'](){const _0x2796d5=_0x2b3a05;[[S],[f],[_]][_0x2796d5(0xaa)](_0x42ec86=>{const _0x175418=_0x2796d5;this[_0x175418(0xc8)][_0x175418(0xea)](_0x42ec86);});}[_0x2b3a05(0xd4)](){const _0x324ca2=_0x2b3a05;this[_0x324ca2(0xc8)][_0x324ca2(0xa5)](f),this[_0x324ca2(0xc8)]['get'](_);}};$(g,_0x2b3a05(0x102),W),$(g,'type',_0x5e44b5[_0x2b3a05(0x106)]),g=ie([_0x100038(_0xa3c3d4,_0x24dfe9,_0x2890f9),N(0x1,_0x498129(_0x4a0051)),N(0x2,_0x31db9c)],g);export{g as UniverThreadCommentDataSourcePlugin};
@@ -1,2 +1,2 @@
1
- export { UniverThreadCommentDataSourcePlugin } from './plugin';
2
1
  export type { IUniverThreadCommentDataSourceConfig } from './controllers/config.schema';
2
+ export { UniverThreadCommentDataSourcePlugin } from './plugin';
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x58ae0a,_0x19ce9d){const _0x1ff3ba=_0x7638,_0xf13bc5=_0x58ae0a();while(!![]){try{const _0x5a8d05=-parseInt(_0x1ff3ba(0x137))/0x1+parseInt(_0x1ff3ba(0x100))/0x2+parseInt(_0x1ff3ba(0xe3))/0x3*(parseInt(_0x1ff3ba(0xd9))/0x4)+parseInt(_0x1ff3ba(0xda))/0x5+-parseInt(_0x1ff3ba(0xf9))/0x6+-parseInt(_0x1ff3ba(0xd3))/0x7+-parseInt(_0x1ff3ba(0xd4))/0x8*(-parseInt(_0x1ff3ba(0x117))/0x9);if(_0x5a8d05===_0x19ce9d)break;else _0xf13bc5['push'](_0xf13bc5['shift']());}catch(_0x367a28){_0xf13bc5['push'](_0xf13bc5['shift']());}}}(_0xe519,0x7dcb7),function(_0x2988cb,_0xb2efc9){const _0x318f0d=_0x7638;typeof exports==_0x318f0d(0x13e)&&typeof module<'u'?_0xb2efc9(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==_0x318f0d(0x10c)&&define['amd']?define([_0x318f0d(0xc5),_0x318f0d(0x119),_0x318f0d(0xea),_0x318f0d(0xdb),_0x318f0d(0xe4),_0x318f0d(0xd8),_0x318f0d(0x102),_0x318f0d(0xbb)],_0xb2efc9):(_0x2988cb=typeof globalThis<'u'?globalThis:_0x2988cb||self,_0xb2efc9(_0x2988cb[_0x318f0d(0x124)]={},_0x2988cb[_0x318f0d(0x135)],_0x2988cb[_0x318f0d(0x122)],_0x2988cb['UniverCore'],_0x2988cb[_0x318f0d(0xec)],_0x2988cb[_0x318f0d(0x126)],_0x2988cb[_0x318f0d(0x102)],_0x2988cb[_0x318f0d(0xc7)]));}(this,function(_0x16275a,_0x4f69e9,_0x28b4d5,_0x34c685,_0x52e5cc,_0x2e97f3,_0x26b64f,_0x2b4a22){'use strict';const _0x239c63=_0x7638;const _0x4409fc=_0x239c63(0x128);var _0x530123=(_0x1b9f56=>(_0x1b9f56[_0x1b9f56[_0x239c63(0x115)]=0x0]=_0x239c63(0x115),_0x1b9f56[_0x1b9f56['Solved']=0x1]=_0x239c63(0xdc),_0x1b9f56[_0x1b9f56[_0x239c63(0x118)]=-0x1]=_0x239c63(0x118),_0x1b9f56))(_0x530123||{}),_0x39a9ec=(_0x1d1e5a=>(_0x1d1e5a[_0x1d1e5a[_0x239c63(0x127)]=0x0]=_0x239c63(0x127),_0x1d1e5a[_0x1d1e5a[_0x239c63(0x12f)]=0x1]='Add',_0x1d1e5a[_0x1d1e5a[_0x239c63(0x130)]=0x2]=_0x239c63(0x130),_0x1d1e5a[_0x1d1e5a[_0x239c63(0x129)]=0x3]=_0x239c63(0x129),_0x1d1e5a[_0x1d1e5a[_0x239c63(0x106)]=0x4]='Delete',_0x1d1e5a[_0x1d1e5a[_0x239c63(0x116)]=0x5]='Solve',_0x1d1e5a[_0x1d1e5a['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1d1e5a))(_0x39a9ec||{});const _0x4fe706=_0x33b28d=>_0x34c685[_0x239c63(0xc2)](new Date(+_0x33b28d))[_0x239c63(0xef)](_0x239c63(0x105)),_0x4ae220=async(_0xfe2ef2,_0x56debd)=>{const _0x4f02e0=_0x239c63,_0x35c311=_0xfe2ef2[_0x4f02e0(0x11e)](_0x34c685[_0x4f02e0(0x131)]),_0x2de2a5=_0xfe2ef2[_0x4f02e0(0x11e)](_0x2b4a22[_0x4f02e0(0xbc)]);_0x56debd[_0x4f02e0(0xf4)](_0x76788e=>{_0x35c311['getUser'](_0x76788e)&&_0x56debd['delete'](_0x76788e);}),_0x56debd[_0x4f02e0(0x114)]&&(await _0x2de2a5['get'](_0x4f02e0(0xe6),{'params':{'userIDs':[..._0x56debd]}}))[_0x4f02e0(0xdd)][_0x4f02e0(0xc9)][_0x4f02e0(0xf4)](_0x3865bd=>{const _0x325db3=_0x4f02e0;_0x3865bd&&_0x35c311[_0x325db3(0x10f)](_0x3865bd);});};var _0x3b66e8=Object[_0x239c63(0x104)],_0x413f0e=(_0x535193,_0x29859a,_0x18f4ae,_0x10a72a)=>{const _0x1266ba=_0x239c63;for(var _0x3ed0ef=_0x10a72a>0x1?void 0x0:_0x10a72a?_0x3b66e8(_0x29859a,_0x18f4ae):_0x29859a,_0x302928=_0x535193[_0x1266ba(0x13b)]-0x1,_0x2acb82;_0x302928>=0x0;_0x302928--)(_0x2acb82=_0x535193[_0x302928])&&(_0x3ed0ef=_0x2acb82(_0x3ed0ef)||_0x3ed0ef);return _0x3ed0ef;},_0x1022a9=(_0x410d96,_0x55bb44)=>(_0x3cbaff,_0x187a02)=>_0x55bb44(_0x3cbaff,_0x187a02,_0x410d96);let _0x77681a=class extends _0x34c685[_0x239c63(0xf1)]{constructor(_0x85b78c,_0x17a39d,_0x5d9d5f,_0x3fb444){const _0x238180=_0x239c63;super(),this[_0x238180(0xf6)]=_0x85b78c,this['_threadCommentModel']=_0x17a39d,this[_0x238180(0x10e)]=_0x5d9d5f,this[_0x238180(0xe1)]=_0x3fb444,this[_0x238180(0xcf)](),this[_0x238180(0x142)]();}['_initUserSync'](){const _0x51513a=_0x239c63;this[_0x51513a(0xc6)](this[_0x51513a(0x109)][_0x51513a(0x123)][_0x51513a(0xd6)](_0x26b64f[_0x51513a(0xe5)](0x10))[_0x51513a(0x11d)](_0xb2471a=>{const _0x5999f4=_0x51513a,_0x65dd4f=new Set();_0xb2471a[_0x5999f4(0xf4)](_0x3f576f=>{const _0x4facdc=_0x5999f4;switch(_0x3f576f[_0x4facdc(0x111)]){case'add':{const _0xb464e0=_0x3f576f['payload'][_0x4facdc(0xfd)];_0x65dd4f[_0x4facdc(0x125)](_0xb464e0);break;}}}),_0x4ae220(this['_injector'],_0x65dd4f);}));}[_0x239c63(0xcf)](){const _0x5f4ae5=_0x239c63;this[_0x5f4ae5(0xc6)](this[_0x5f4ae5(0xf6)][_0x5f4ae5(0x123)][_0x5f4ae5(0x11d)](async _0x239cb=>{const _0x130b46=_0x5f4ae5;var _0x3c3945,_0x564f0e,_0x47f330,_0x5a3845;const _0x312a62=(_0x3c3945=this[_0x130b46(0x109)][_0x130b46(0x12a)](_0x239cb[_0x130b46(0xd1)])[_0x130b46(0xce)](_0x2561f1=>_0x2561f1[_0x130b46(0xcd)]===_0x239cb[_0x130b46(0xcd)]))==null?void 0x0:_0x3c3945[_0x130b46(0xe9)];if(!_0x312a62)return;const {unitId:_0x3775e9,subUnitId:_0x9d75d6}=_0x312a62;switch(_0x239cb[_0x130b46(0xf7)]&&this[_0x130b46(0x10e)]['addUser'](_0x239cb[_0x130b46(0xf7)]),_0x239cb[_0x130b46(0x111)]){case _0x39a9ec['Add']:break;case _0x39a9ec[_0x130b46(0x130)]:{this[_0x130b46(0x109)]['addComment'](_0x3775e9,_0x9d75d6,{'unitId':_0x3775e9,'subUnitId':_0x9d75d6,'ref':'','id':_0x239cb[_0x130b46(0xfa)],'dT':_0x4fe706(+_0x239cb[_0x130b46(0x112)]),'threadId':_0x239cb[_0x130b46(0xcd)],'personId':(_0x47f330=(_0x564f0e=_0x239cb['user'])==null?void 0x0:_0x564f0e[_0x130b46(0x120)])!=null?_0x47f330:_0x239cb[_0x130b46(0x113)],'text':JSON[_0x130b46(0xf2)](_0x239cb[_0x130b46(0xc3)]),'parentId':_0x312a62['id']});break;}case _0x39a9ec[_0x130b46(0x106)]:{const _0x10d1f2=this[_0x130b46(0x109)]['getComment'](_0x3775e9,_0x9d75d6,_0x239cb[_0x130b46(0xfa)]);_0x10d1f2&&_0x10d1f2[_0x130b46(0x13f)]&&this['_threadCommentModel'][_0x130b46(0xbf)](_0x3775e9,_0x9d75d6,_0x239cb['replyId']);break;}case _0x39a9ec[_0x130b46(0x129)]:{this[_0x130b46(0x109)][_0x130b46(0x11c)](_0x3775e9,_0x9d75d6,{'commentId':_0x239cb[_0x130b46(0xfa)],'text':JSON[_0x130b46(0xf2)](_0x239cb[_0x130b46(0xc3)])});break;}case _0x39a9ec[_0x130b46(0x116)]:{const _0x31d39a=(_0x5a3845=this[_0x130b46(0x109)][_0x130b46(0x12a)](_0x239cb['unitId'])[_0x130b46(0xce)](_0x343705=>_0x343705['threadId']===_0x239cb[_0x130b46(0xcd)]))==null?void 0x0:_0x5a3845[_0x130b46(0xe9)];_0x31d39a&&this[_0x130b46(0x109)][_0x130b46(0xe7)](_0x3775e9,_0x9d75d6,_0x31d39a['id'],_0x239cb['solved']===_0x530123[_0x130b46(0xdc)]);break;}}}));}};_0x77681a=_0x413f0e([_0x1022a9(0x0,_0x34c685[_0x239c63(0xc8)](_0x4f69e9[_0x239c63(0x12b)])),_0x1022a9(0x1,_0x34c685['Inject'](_0x2e97f3[_0x239c63(0xbe)])),_0x1022a9(0x2,_0x34c685[_0x239c63(0xc8)](_0x34c685[_0x239c63(0x131)])),_0x1022a9(0x3,_0x34c685[_0x239c63(0xc8)](_0x34c685[_0x239c63(0xee)]))],_0x77681a);const _0x41e39d=_0x239c63(0xfc),_0x1a9661={};var _0x388e91=Object[_0x239c63(0x104)],_0x331c35=(_0x34af7b,_0x4d8035,_0x2c2d53,_0x23d5e2)=>{const _0x4eff5a=_0x239c63;for(var _0xe74b26=_0x23d5e2>0x1?void 0x0:_0x23d5e2?_0x388e91(_0x4d8035,_0x2c2d53):_0x4d8035,_0x26a510=_0x34af7b[_0x4eff5a(0x13b)]-0x1,_0x34eb44;_0x26a510>=0x0;_0x26a510--)(_0x34eb44=_0x34af7b[_0x26a510])&&(_0xe74b26=_0x34eb44(_0xe74b26)||_0xe74b26);return _0xe74b26;},_0x3bf7e3=(_0x37b715,_0x52d60e)=>(_0x2c68cf,_0x5224ec)=>_0x52d60e(_0x2c68cf,_0x5224ec,_0x37b715);function _0x39a84d(_0x2b2b6,_0x605b9b){const _0x2d5bc8=_0x239c63,_0x46c615=_0x2b2b6['replies'][0x0];return{..._0x605b9b,'id':_0x46c615[_0x2d5bc8(0xfa)],'resolved':_0x2b2b6[_0x2d5bc8(0xe2)]===0x1,'dT':_0x4fe706(_0x46c615['createTimestamp']),'personId':_0x46c615[_0x2d5bc8(0x113)],'threadId':_0x46c615['threadId']};}function _0x54cef2(_0x2a6915,_0x4c70a9,_0x13efab){const _0x17dc55=_0x239c63;var _0x20c6f9,_0x3b05a9;if(((_0x3b05a9=(_0x20c6f9=_0x2a6915==null?void 0x0:_0x2a6915[_0x17dc55(0x103)])==null?void 0x0:_0x20c6f9[_0x17dc55(0x13b)])!=null?_0x3b05a9:0x0)>0x0){const _0x5045ff=(_0x18e982,_0x33e663)=>({'id':_0x18e982[_0x17dc55(0xfa)],'threadId':_0x18e982['threadId'],'dT':_0x4fe706(_0x18e982['createTimestamp']),'personId':_0x18e982['userId'],'resolved':_0x2a6915[_0x17dc55(0xe2)]===_0x530123['Solved'],'unitId':_0x4c70a9,'subUnitId':_0x13efab,'text':JSON[_0x17dc55(0xf2)](_0x18e982[_0x17dc55(0xc3)]),'parentId':_0x33e663}),_0xdbcc43=_0x5045ff(_0x2a6915['replies'][0x0]);return{..._0xdbcc43,'children':_0x2a6915['replies'][_0x17dc55(0x13c)](0x1)[_0x17dc55(0xde)](_0x3b7a7a=>_0x5045ff(_0x3b7a7a,_0xdbcc43['id']))};}return null;}let _0x26605f=class{constructor(_0x2de2b5,_0xf99852,_0x3b6424){const _0x3715ce=_0x239c63;this['_httpService']=_0x2de2b5,this[_0x3715ce(0x10e)]=_0xf99852,this[_0x3715ce(0x141)]=_0x3b6424;}async[_0x239c63(0x10b)](_0x31390c){const _0x112f8f=_0x239c63;var _0x420cb3,_0x27fec2;const {parentId:_0x5711de,unitId:_0x5eee57,text:_0x179a85,threadId:_0x36f6fc}=_0x31390c,_0x1b1e54=(_0x27fec2=(_0x420cb3=_0x179a85[_0x112f8f(0x138)])==null?void 0x0:_0x420cb3[_0x112f8f(0x134)](_0xc652a7=>_0xc652a7[_0x112f8f(0xeb)]===_0x34c685[_0x112f8f(0xbd)]['COMMENT'])[_0x112f8f(0xde)](_0xc46de0=>_0xc46de0[_0x112f8f(0x13d)]))!=null?_0x27fec2:[],_0x3f0d9d=JSON[_0x112f8f(0x12e)](_0x179a85),_0x20282e=(await this[_0x112f8f(0x141)][_0x112f8f(0xcc)](_0x5eee57))[_0x112f8f(0xf8)]();if(_0x5711de){const _0x3f003e={'memberId':_0x20282e,'unitId':_0x5eee57,'content':_0x3f0d9d,'mention':_0x1b1e54,'threadId':_0x36f6fc},_0x3437ef=(await this[_0x112f8f(0xcb)][_0x112f8f(0xfe)](_0x112f8f(0x10a)+_0x5eee57+_0x112f8f(0xff),{'body':_0x3f003e}))[_0x112f8f(0xdd)][_0x112f8f(0xd7)];return{..._0x31390c,'id':_0x3437ef[_0x112f8f(0xfa)],'dT':_0x34c685[_0x112f8f(0xc2)](+_0x3437ef[_0x112f8f(0x112)])[_0x112f8f(0xef)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3437ef[_0x112f8f(0x113)]};}else{const _0x36798a={'memberId':_0x20282e,'unitId':_0x5eee57,'content':_0x3f0d9d,'mention':_0x1b1e54},_0x58b5a3=await this[_0x112f8f(0xcb)][_0x112f8f(0xfe)](_0x112f8f(0x10a)+_0x5eee57+_0x112f8f(0xe8),{'body':_0x36798a});return _0x39a84d(_0x58b5a3[_0x112f8f(0xdd)][_0x112f8f(0xc4)],_0x31390c);}}async[_0x239c63(0x11c)](_0x2cded0){const _0x217fa6=_0x239c63;var _0x476dba,_0x965644;const {text:_0x6a4e7f,unitId:_0x326263}=_0x2cded0,_0x75292=(_0x965644=(_0x476dba=_0x6a4e7f[_0x217fa6(0x138)])==null?void 0x0:_0x476dba[_0x217fa6(0x134)](_0x52d145=>_0x52d145[_0x217fa6(0xeb)]===_0x34c685[_0x217fa6(0xbd)][_0x217fa6(0x121)])[_0x217fa6(0xde)](_0x2ad2d1=>_0x2ad2d1['rangeId']))!=null?_0x965644:[],_0xaae888=JSON[_0x217fa6(0x12e)](_0x6a4e7f),_0x32328f=_0x2cded0[_0x217fa6(0xcd)],_0x5e58db=_0x2cded0['id'],_0x58e0ef={'memberId':(await this[_0x217fa6(0x141)][_0x217fa6(0xcc)](_0x326263))[_0x217fa6(0xf8)](),'unitId':_0x326263,'threadId':_0x32328f,'mention':_0x75292,'content':_0xaae888,'replyId':_0x5e58db},_0x3abc08=await this['_httpService'][_0x217fa6(0xfe)]('/universer-api/comment/unit/'+_0x326263+'/edit',{'body':_0x58e0ef});return!_0x3abc08[_0x217fa6(0xdd)]['error']||_0x3abc08['body'][_0x217fa6(0x136)][_0x217fa6(0xd5)]===0x1;}async[_0x239c63(0xe7)](_0x12a91e){const _0x23b6f5=_0x239c63,{unitId:_0x53db0c}=_0x12a91e,_0x3cd344=_0x12a91e[_0x23b6f5(0xcd)],_0x5bfb14={'memberId':this['_userService'][_0x23b6f5(0x133)]()[_0x23b6f5(0x120)],'unitId':_0x53db0c,'threadId':_0x3cd344,'solved':_0x12a91e[_0x23b6f5(0xc1)]?_0x530123['Solved']:_0x530123[_0x23b6f5(0x115)]},_0x5c3471=await this[_0x23b6f5(0xcb)][_0x23b6f5(0xfe)](_0x23b6f5(0x10a)+_0x53db0c+_0x23b6f5(0xe0),{'body':_0x5bfb14});return!_0x5c3471[_0x23b6f5(0xdd)][_0x23b6f5(0x136)]||_0x5c3471['body'][_0x23b6f5(0x136)]['code']===0x1;}async[_0x239c63(0xbf)](_0xaa7af1,_0xc4d376,_0x4b287b,_0x33c18b){const _0x432f45=_0x239c63,_0x4b51ff={'memberId':(await this[_0x432f45(0x141)]['requireSession'](_0xaa7af1))['getMemberID'](),'threadId':_0x4b287b,'replyId':_0x33c18b,'unitId':_0xaa7af1},_0x20f633=await this[_0x432f45(0xcb)][_0x432f45(0xfe)]('/universer-api/comment/unit/'+_0xaa7af1+'/delete',{'body':_0x4b51ff});return!_0x20f633[_0x432f45(0xdd)]['error']||_0x20f633[_0x432f45(0xdd)]['error']['code']===0x1;}async[_0x239c63(0xdf)](_0x327f8d,_0x16cea5,_0x256086){const _0x474533=_0x239c63,_0x310596={'unitId':_0x327f8d,'threadId':_0x256086},_0x574149=await this[_0x474533(0xcb)][_0x474533(0xfe)](_0x474533(0x10a)+_0x327f8d+'/list',{'body':_0x310596}),_0x3abbb4=_0x256086['map'](_0x3ead63=>_0x54cef2(_0x574149[_0x474533(0xdd)]['comments'][_0x3ead63],_0x327f8d,_0x16cea5))[_0x474533(0x134)](Boolean);return Object[_0x474533(0x10d)](_0x574149[_0x474533(0xdd)][_0x474533(0xc9)])[_0x474533(0xf4)](_0x5b537e=>{const _0x2494bd=_0x474533;this[_0x2494bd(0x10e)][_0x2494bd(0x10f)](_0x5b537e);}),_0x3abbb4;}['saveCommentToSnapshot'](_0x13f506){const _0x5f1cde=_0x239c63;return{'id':_0x13f506['id'],'threadId':_0x13f506['threadId'],'ref':_0x13f506[_0x5f1cde(0x12d)]};}};_0x26605f=_0x331c35([_0x3bf7e3(0x0,_0x34c685['Inject'](_0x2b4a22[_0x239c63(0xbc)])),_0x3bf7e3(0x1,_0x34c685[_0x239c63(0xc8)](_0x34c685[_0x239c63(0x131)])),_0x3bf7e3(0x2,_0x34c685[_0x239c63(0xc8)](_0x4f69e9[_0x239c63(0xd0)]))],_0x26605f);var _0x42669c=Object[_0x239c63(0x104)],_0x303669=(_0x4f5f59,_0x2cb32e,_0xcd501e,_0x3c2c1a)=>{for(var _0x2cfa21=_0x3c2c1a>0x1?void 0x0:_0x3c2c1a?_0x42669c(_0x2cb32e,_0xcd501e):_0x2cb32e,_0x3bd727=_0x4f5f59['length']-0x1,_0x7f5e03;_0x3bd727>=0x0;_0x3bd727--)(_0x7f5e03=_0x4f5f59[_0x3bd727])&&(_0x2cfa21=_0x7f5e03(_0x2cfa21)||_0x2cfa21);return _0x2cfa21;},_0x5e7ae4=(_0x230f55,_0x8759d3)=>(_0x537852,_0x464867)=>_0x8759d3(_0x537852,_0x464867,_0x230f55);let _0x2335e5=class extends _0x34c685[_0x239c63(0xf1)]{constructor(_0x33f9ad,_0x45eddb){const _0x15770c=_0x239c63;super(),this['_threadCommentDataSourceService']=_0x33f9ad,this[_0x15770c(0xf0)]=_0x45eddb,this[_0x15770c(0x12c)]();}[_0x239c63(0x12c)](){const _0x4b5836=_0x239c63;this[_0x4b5836(0x101)][_0x4b5836(0x108)]=this[_0x4b5836(0xf0)],this[_0x4b5836(0x101)][_0x4b5836(0x139)]=!0x1;}};_0x2335e5=_0x303669([_0x5e7ae4(0x0,_0x2e97f3[_0x239c63(0x132)]),_0x5e7ae4(0x1,_0x34c685[_0x239c63(0xc8)](_0x26605f))],_0x2335e5);var _0x481b8c=Object[_0x239c63(0x11b)],_0x463073=Object['getOwnPropertyDescriptor'],_0x4632d5=(_0x510155,_0x25c0ec,_0x548634)=>_0x25c0ec in _0x510155?_0x481b8c(_0x510155,_0x25c0ec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x548634}):_0x510155[_0x25c0ec]=_0x548634,_0x5579fa=(_0x358d44,_0x444eda,_0x2a0c65,_0x164993)=>{for(var _0x32cbd5=_0x164993>0x1?void 0x0:_0x164993?_0x463073(_0x444eda,_0x2a0c65):_0x444eda,_0x44efc5=_0x358d44['length']-0x1,_0x198508;_0x44efc5>=0x0;_0x44efc5--)(_0x198508=_0x358d44[_0x44efc5])&&(_0x32cbd5=_0x198508(_0x32cbd5)||_0x32cbd5);return _0x32cbd5;},_0x391ade=(_0x51fd08,_0x49952a)=>(_0x581669,_0x4e9420)=>_0x49952a(_0x581669,_0x4e9420,_0x51fd08),_0x2563b6=(_0x3a1ef6,_0x146ad8,_0x5a2fc1)=>_0x4632d5(_0x3a1ef6,typeof _0x146ad8!=_0x239c63(0x107)?_0x146ad8+'':_0x146ad8,_0x5a2fc1);_0x16275a[_0x239c63(0x11f)]=class extends _0x34c685['Plugin']{constructor(_0x3f03a8=_0x1a9661,_0x251c32,_0x4c9f59){const _0x17d2ce=_0x239c63;super(),this[_0x17d2ce(0x11a)]=_0x3f03a8,this[_0x17d2ce(0xe1)]=_0x251c32,this[_0x17d2ce(0x140)]=_0x4c9f59;const {..._0x3bd0bc}=_0x34c685[_0x17d2ce(0x110)]({},_0x1a9661,this[_0x17d2ce(0x11a)]);this[_0x17d2ce(0x140)][_0x17d2ce(0xca)](_0x41e39d,_0x3bd0bc);}[_0x239c63(0xc0)](){const _0x3def2c=_0x239c63;[[_0x26605f],[_0x2335e5],[_0x77681a]][_0x3def2c(0xf4)](_0x2afb59=>{const _0x2aa538=_0x3def2c;this[_0x2aa538(0xe1)]['add'](_0x2afb59);});}['onReady'](){const _0xaf6f7b=_0x239c63;this[_0xaf6f7b(0xe1)][_0xaf6f7b(0x11e)](_0x2335e5),this[_0xaf6f7b(0xe1)][_0xaf6f7b(0x11e)](_0x77681a);}},_0x2563b6(_0x16275a[_0x239c63(0x11f)],_0x239c63(0xd2),_0x4409fc),_0x2563b6(_0x16275a[_0x239c63(0x11f)],_0x239c63(0x111),_0x34c685['UniverInstanceType'][_0x239c63(0xfb)]),_0x16275a['UniverThreadCommentDataSourcePlugin']=_0x5579fa([_0x34c685['DependentOn'](_0x52e5cc[_0x239c63(0xed)],_0x4f69e9['UniverCollaborationClientPlugin'],_0x28b4d5[_0x239c63(0x143)]),_0x391ade(0x1,_0x34c685['Inject'](_0x34c685['Injector'])),_0x391ade(0x2,_0x34c685[_0x239c63(0x13a)])],_0x16275a['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x16275a,Symbol[_0x239c63(0xf5)],{'value':_0x239c63(0xf3)});}));function _0x7638(_0x3974f9,_0x8f1778){const _0xe5196=_0xe519();return _0x7638=function(_0x7638cf,_0x5090e7){_0x7638cf=_0x7638cf-0xbb;let _0x1c1700=_0xe5196[_0x7638cf];return _0x1c1700;},_0x7638(_0x3974f9,_0x8f1778);}function _0xe519(){const _0x2ae0c3=['values','_userService','addUser','merge','type','createTimestamp','userId','size','OpenOrReOpen','Solve','99SfrwHz','UNRECOGNIZED','@univerjs-pro/collaboration-client','_config','defineProperty','updateComment','subscribe','get','UniverThreadCommentDataSourcePlugin','userID','COMMENT','UniverProLicense','commentUpdate$','UniverProThreadCommentDatasource','add','UniverThreadComment','Unknown','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','getUnit','CommentService','_initDataSource','ref','stringify','Add','Reply','UserManagerService','IThreadCommentDataSourceService','getCurrentUser','filter','UniverProCollaborationClient','error','736128ZZpySN','customRanges','syncUpdateMutationToColla','IConfigService','length','slice','rangeId','object','parentId','_configService','_sessionService','_initUserSync','UniverLicensePlugin','@univerjs/network','HTTPService','CustomRangeType','ThreadCommentModel','deleteComment','onStarting','resolved','dayjs','content','comment','exports','disposeWithMe','UniverNetwork','Inject','users','setConfig','_httpService','requireSession','threadId','find','_init','CollaborationSessionService','unitId','pluginName','5129005tYknmD','1532024eysHvT','code','pipe','reply','@univerjs/thread-comment','4gxsxuX','2116080LJiSft','@univerjs/core','Solved','body','map','listComments','/solved','_injector','solved','433971GJSiji','@univerjs/thread-comment-ui','bufferTime','/universer-api/user/list','resolveComment','/add','root','@univerjs-pro/license','rangeType','UniverThreadCommentUi','UniverThreadCommentUIPlugin','Injector','format','_threadCommentDataSource','Disposable','parse','Module','forEach','toStringTag','_commentService','user','getMemberID','5941734veElPE','replyId','UNIVER_UNKNOWN','thread-comment-data-source.config','personId','post','/reply','599962mOMEJo','_threadCommentDataSourceService','rxjs','replies','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','Delete','symbol','dataSource','_threadCommentModel','/universer-api/comment/unit/','addComment','function'];_0xe519=function(){return _0x2ae0c3;};return _0xe519();}
1
+ (function(_0xd66fd9,_0x5c1538){const _0x426762=_0x5c50,_0xc13820=_0xd66fd9();while(!![]){try{const _0x2ba1f3=-parseInt(_0x426762(0x1b5))/0x1*(parseInt(_0x426762(0x1ce))/0x2)+-parseInt(_0x426762(0x190))/0x3*(parseInt(_0x426762(0x1d1))/0x4)+-parseInt(_0x426762(0x19d))/0x5*(parseInt(_0x426762(0x1eb))/0x6)+-parseInt(_0x426762(0x186))/0x7*(parseInt(_0x426762(0x1da))/0x8)+-parseInt(_0x426762(0x1a4))/0x9+-parseInt(_0x426762(0x1c1))/0xa*(-parseInt(_0x426762(0x1af))/0xb)+parseInt(_0x426762(0x16e))/0xc;if(_0x2ba1f3===_0x5c1538)break;else _0xc13820['push'](_0xc13820['shift']());}catch(_0x366184){_0xc13820['push'](_0xc13820['shift']());}}}(_0x1ab1,0x3e612),function(_0x16d5eb,_0x3f6ff8){const _0x5c0453=_0x5c50;typeof exports==_0x5c0453(0x1cb)&&typeof module<'u'?_0x3f6ff8(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['amd']?define([_0x5c0453(0x1e9),_0x5c0453(0x1ee),_0x5c0453(0x1bf),_0x5c0453(0x1c8),_0x5c0453(0x1c3),_0x5c0453(0x170),'rxjs',_0x5c0453(0x1b9)],_0x3f6ff8):(_0x16d5eb=typeof globalThis<'u'?globalThis:_0x16d5eb||self,_0x3f6ff8(_0x16d5eb[_0x5c0453(0x1aa)]={},_0x16d5eb[_0x5c0453(0x1b7)],_0x16d5eb[_0x5c0453(0x1e3)],_0x16d5eb['UniverCore'],_0x16d5eb['UniverThreadCommentUi'],_0x16d5eb[_0x5c0453(0x16d)],_0x16d5eb[_0x5c0453(0x17a)],_0x16d5eb['UniverNetwork']));}(this,function(_0x2658bc,_0x42c319,_0x5c2e4c,_0x42599a,_0x6de668,_0x2b67bb,_0x590b5b,_0x11d5d9){'use strict';const _0x12b0cc=_0x5c50;const _0x2532e4=_0x12b0cc(0x19b);var _0x562e05=(_0x111521=>(_0x111521[_0x111521[_0x12b0cc(0x191)]=0x0]=_0x12b0cc(0x191),_0x111521[_0x111521[_0x12b0cc(0x18b)]=0x1]=_0x12b0cc(0x18b),_0x111521[_0x111521[_0x12b0cc(0x1cd)]=-0x1]=_0x12b0cc(0x1cd),_0x111521))(_0x562e05||{}),_0x5adc3b=(_0x4eeb23=>(_0x4eeb23[_0x4eeb23[_0x12b0cc(0x1d5)]=0x0]=_0x12b0cc(0x1d5),_0x4eeb23[_0x4eeb23[_0x12b0cc(0x1b4)]=0x1]=_0x12b0cc(0x1b4),_0x4eeb23[_0x4eeb23[_0x12b0cc(0x1db)]=0x2]='Reply',_0x4eeb23[_0x4eeb23[_0x12b0cc(0x195)]=0x3]=_0x12b0cc(0x195),_0x4eeb23[_0x4eeb23[_0x12b0cc(0x1ab)]=0x4]=_0x12b0cc(0x1ab),_0x4eeb23[_0x4eeb23[_0x12b0cc(0x1e6)]=0x5]='Solve',_0x4eeb23[_0x4eeb23[_0x12b0cc(0x1cd)]=-0x1]=_0x12b0cc(0x1cd),_0x4eeb23))(_0x5adc3b||{});const _0x2e9c6c=_0x37657c=>_0x42599a['dayjs'](new Date(+_0x37657c))['format'](_0x12b0cc(0x181)),_0x411cbd=async(_0x331a47,_0x3e0d0e)=>{const _0x4ad1ab=_0x12b0cc,_0x325ad9=_0x331a47[_0x4ad1ab(0x18c)](_0x42599a['UserManagerService']),_0x1a81d5=_0x331a47[_0x4ad1ab(0x18c)](_0x11d5d9[_0x4ad1ab(0x185)]);_0x3e0d0e[_0x4ad1ab(0x17f)](_0xc4a606=>{const _0x5cf849=_0x4ad1ab;_0x325ad9['getUser'](_0xc4a606)&&_0x3e0d0e[_0x5cf849(0x19e)](_0xc4a606);}),_0x3e0d0e[_0x4ad1ab(0x197)]&&(await _0x1a81d5['get'](_0x4ad1ab(0x1df),{'params':{'userIDs':[..._0x3e0d0e]}}))[_0x4ad1ab(0x1a9)]['users']['forEach'](_0x525834=>{const _0x2b68af=_0x4ad1ab;_0x525834&&_0x325ad9[_0x2b68af(0x1bc)](_0x525834);});};var _0x400d7e=Object[_0x12b0cc(0x1de)],_0x134501=(_0x296739,_0x564fdf,_0x54c7fe,_0x337a4b)=>{const _0x363097=_0x12b0cc;for(var _0x333c0f=_0x337a4b>0x1?void 0x0:_0x337a4b?_0x400d7e(_0x564fdf,_0x54c7fe):_0x564fdf,_0x1a3ef8=_0x296739[_0x363097(0x194)]-0x1,_0x9bdb8c;_0x1a3ef8>=0x0;_0x1a3ef8--)(_0x9bdb8c=_0x296739[_0x1a3ef8])&&(_0x333c0f=_0x9bdb8c(_0x333c0f)||_0x333c0f);return _0x333c0f;},_0x3d3ecb=(_0x57cbf1,_0xf3625d)=>(_0x518724,_0x51d59d)=>_0xf3625d(_0x518724,_0x51d59d,_0x57cbf1);let _0x498709=class extends _0x42599a['Disposable']{constructor(_0x4d270d,_0x4098c9,_0x4d1357,_0x822259){const _0x2239e6=_0x12b0cc;super(),this[_0x2239e6(0x1e7)]=_0x4d270d,this['_threadCommentModel']=_0x4098c9,this['_userService']=_0x4d1357,this[_0x2239e6(0x1a3)]=_0x822259,this[_0x2239e6(0x1e1)](),this[_0x2239e6(0x180)]();}[_0x12b0cc(0x180)](){const _0x309fe1=_0x12b0cc;this[_0x309fe1(0x18d)](this[_0x309fe1(0x1d8)][_0x309fe1(0x1cf)]['pipe'](_0x590b5b[_0x309fe1(0x1b0)](0x10))['subscribe'](_0x52d2a5=>{const _0x5ca46b=_0x309fe1,_0x46aff3=new Set();_0x52d2a5['forEach'](_0x161d58=>{const _0x56e8c7=_0x5c50;switch(_0x161d58['type']){case'add':{const _0x28423d=_0x161d58[_0x56e8c7(0x1d9)][_0x56e8c7(0x1be)];_0x46aff3[_0x56e8c7(0x1a0)](_0x28423d);break;}}}),_0x411cbd(this[_0x5ca46b(0x1a3)],_0x46aff3);}));}[_0x12b0cc(0x1e1)](){const _0x18493a=_0x12b0cc;this[_0x18493a(0x18d)](this[_0x18493a(0x1e7)][_0x18493a(0x1cf)][_0x18493a(0x18a)](async _0x533ede=>{const _0x3f5f80=_0x18493a;var _0x5f5b70,_0x3d3d1b,_0xfdfb6,_0x52d0d6;const _0xdb7833=(_0x5f5b70=this[_0x3f5f80(0x1d8)][_0x3f5f80(0x1a6)](_0x533ede['unitId'])[_0x3f5f80(0x1f0)](_0x361a9d=>_0x361a9d['threadId']===_0x533ede[_0x3f5f80(0x1c5)]))==null?void 0x0:_0x5f5b70['root'];if(!_0xdb7833)return;const {unitId:_0x32f55e,subUnitId:_0x2607f6}=_0xdb7833;switch(_0x533ede[_0x3f5f80(0x1e2)]&&this[_0x3f5f80(0x1ae)][_0x3f5f80(0x1bc)](_0x533ede['user']),_0x533ede[_0x3f5f80(0x1c6)]){case _0x5adc3b[_0x3f5f80(0x1b4)]:break;case _0x5adc3b[_0x3f5f80(0x1db)]:{this[_0x3f5f80(0x1d8)][_0x3f5f80(0x1cc)](_0x32f55e,_0x2607f6,{'unitId':_0x32f55e,'subUnitId':_0x2607f6,'ref':'','id':_0x533ede[_0x3f5f80(0x16c)],'dT':_0x2e9c6c(+_0x533ede['createTimestamp']),'threadId':_0x533ede[_0x3f5f80(0x1c5)],'personId':(_0xfdfb6=(_0x3d3d1b=_0x533ede[_0x3f5f80(0x1e2)])==null?void 0x0:_0x3d3d1b['userID'])!=null?_0xfdfb6:_0x533ede['userId'],'text':JSON['parse'](_0x533ede[_0x3f5f80(0x1a2)]),'parentId':_0xdb7833['id']});break;}case _0x5adc3b['Delete']:{const _0x22ac5b=this[_0x3f5f80(0x1d8)][_0x3f5f80(0x1ad)](_0x32f55e,_0x2607f6,_0x533ede[_0x3f5f80(0x16c)]);_0x22ac5b&&_0x22ac5b[_0x3f5f80(0x1d3)]&&this['_threadCommentModel'][_0x3f5f80(0x1d2)](_0x32f55e,_0x2607f6,_0x533ede[_0x3f5f80(0x16c)]);break;}case _0x5adc3b['Edit']:{this[_0x3f5f80(0x1d8)][_0x3f5f80(0x1ed)](_0x32f55e,_0x2607f6,{'commentId':_0x533ede[_0x3f5f80(0x16c)],'text':JSON['parse'](_0x533ede['content'])});break;}case _0x5adc3b[_0x3f5f80(0x1e6)]:{const _0x292079=(_0x52d0d6=this[_0x3f5f80(0x1d8)][_0x3f5f80(0x1a6)](_0x533ede[_0x3f5f80(0x19c)])[_0x3f5f80(0x1f0)](_0x39058c=>_0x39058c['threadId']===_0x533ede['threadId']))==null?void 0x0:_0x52d0d6[_0x3f5f80(0x19a)];_0x292079&&this['_threadCommentModel'][_0x3f5f80(0x187)](_0x32f55e,_0x2607f6,_0x292079['id'],_0x533ede['solved']===_0x562e05[_0x3f5f80(0x18b)]);break;}}}));}};_0x498709=_0x134501([_0x3d3ecb(0x0,_0x42599a[_0x12b0cc(0x1d4)](_0x42c319[_0x12b0cc(0x193)])),_0x3d3ecb(0x1,_0x42599a[_0x12b0cc(0x1d4)](_0x2b67bb['ThreadCommentModel'])),_0x3d3ecb(0x2,_0x42599a[_0x12b0cc(0x1d4)](_0x42599a[_0x12b0cc(0x1bd)])),_0x3d3ecb(0x3,_0x42599a['Inject'](_0x42599a['Injector']))],_0x498709);const _0x530a65='thread-comment-data-source.config',_0x4267d1={};var _0x335c76=Object[_0x12b0cc(0x1de)],_0x2ef107=(_0x391bd6,_0x3e81e7,_0x28d960,_0x115157)=>{const _0x5df394=_0x12b0cc;for(var _0x1fe39f=_0x115157>0x1?void 0x0:_0x115157?_0x335c76(_0x3e81e7,_0x28d960):_0x3e81e7,_0x1debf7=_0x391bd6[_0x5df394(0x194)]-0x1,_0x5a902a;_0x1debf7>=0x0;_0x1debf7--)(_0x5a902a=_0x391bd6[_0x1debf7])&&(_0x1fe39f=_0x5a902a(_0x1fe39f)||_0x1fe39f);return _0x1fe39f;},_0x396c75=(_0x486618,_0x2ed593)=>(_0x50f0b5,_0x4798de)=>_0x2ed593(_0x50f0b5,_0x4798de,_0x486618);function _0xac1cfc(_0x331678,_0x41486b){const _0x14d9c2=_0x12b0cc,_0x1b35a6=_0x331678[_0x14d9c2(0x196)][0x0];return{..._0x41486b,'id':_0x1b35a6['replyId'],'resolved':_0x331678[_0x14d9c2(0x1e4)]===0x1,'dT':_0x2e9c6c(_0x1b35a6[_0x14d9c2(0x1ca)]),'personId':_0x1b35a6[_0x14d9c2(0x17b)],'threadId':_0x1b35a6[_0x14d9c2(0x1c5)]};}function _0x297557(_0x1e3d17,_0x597c63,_0x380e2f){const _0x37664c=_0x12b0cc;var _0x500cbd,_0x5b961c;if(((_0x5b961c=(_0x500cbd=_0x1e3d17==null?void 0x0:_0x1e3d17['replies'])==null?void 0x0:_0x500cbd[_0x37664c(0x194)])!=null?_0x5b961c:0x0)>0x0){const _0x2ef7e7=(_0x101a59,_0x4bca4f)=>({'id':_0x101a59[_0x37664c(0x16c)],'threadId':_0x101a59[_0x37664c(0x1c5)],'dT':_0x2e9c6c(_0x101a59[_0x37664c(0x1ca)]),'personId':_0x101a59[_0x37664c(0x17b)],'resolved':_0x1e3d17[_0x37664c(0x1e4)]===_0x562e05['Solved'],'unitId':_0x597c63,'subUnitId':_0x380e2f,'text':JSON[_0x37664c(0x169)](_0x101a59[_0x37664c(0x1a2)]),'parentId':_0x4bca4f}),_0x40e108=_0x2ef7e7(_0x1e3d17['replies'][0x0]);return{..._0x40e108,'children':_0x1e3d17[_0x37664c(0x196)][_0x37664c(0x1ef)](0x1)[_0x37664c(0x16b)](_0x7fddef=>_0x2ef7e7(_0x7fddef,_0x40e108['id']))};}return null;}let _0x49b173=class{constructor(_0x36404d,_0x1903f6,_0x3ee212){const _0x5413b0=_0x12b0cc;this['_httpService']=_0x36404d,this[_0x5413b0(0x1ae)]=_0x1903f6,this['_sessionService']=_0x3ee212;}async[_0x12b0cc(0x1cc)](_0x3ba889){const _0x546dfb=_0x12b0cc;var _0x24cb91,_0x43ae8e;const {parentId:_0x964e25,unitId:_0x512675,text:_0x547112,threadId:_0x20ff1b}=_0x3ba889,_0x4e94c7=(_0x43ae8e=(_0x24cb91=_0x547112[_0x546dfb(0x1c7)])==null?void 0x0:_0x24cb91[_0x546dfb(0x1c2)](_0x399fcb=>_0x399fcb[_0x546dfb(0x177)]===_0x42599a[_0x546dfb(0x192)][_0x546dfb(0x1a1)])[_0x546dfb(0x16b)](_0x1918a3=>_0x1918a3[_0x546dfb(0x173)]))!=null?_0x43ae8e:[],_0x4983ba=JSON[_0x546dfb(0x1a5)](_0x547112),_0x1d5f91=(await this['_sessionService'][_0x546dfb(0x1c4)](_0x512675))[_0x546dfb(0x188)]();if(_0x964e25){const _0x35bd9a={'memberId':_0x1d5f91,'unitId':_0x512675,'content':_0x4983ba,'mention':_0x4e94c7,'threadId':_0x20ff1b},_0x2ca155=(await this[_0x546dfb(0x1bb)]['post'](_0x546dfb(0x1b2)+_0x512675+_0x546dfb(0x182),{'body':_0x35bd9a}))[_0x546dfb(0x1a9)][_0x546dfb(0x178)];return{..._0x3ba889,'id':_0x2ca155[_0x546dfb(0x16c)],'dT':_0x42599a[_0x546dfb(0x1c0)](+_0x2ca155['createTimestamp'])[_0x546dfb(0x17d)](_0x546dfb(0x181)),'personId':_0x2ca155[_0x546dfb(0x17b)]};}else{const _0x50859c={'memberId':_0x1d5f91,'unitId':_0x512675,'content':_0x4983ba,'mention':_0x4e94c7},_0x56a678=await this[_0x546dfb(0x1bb)][_0x546dfb(0x1e5)](_0x546dfb(0x1b2)+_0x512675+'/add',{'body':_0x50859c});return _0xac1cfc(_0x56a678[_0x546dfb(0x1a9)][_0x546dfb(0x179)],_0x3ba889);}}async[_0x12b0cc(0x1ed)](_0x1e1df0){const _0x29dcc9=_0x12b0cc;var _0x148477,_0x4d1d61;const {text:_0x3d9590,unitId:_0x349854}=_0x1e1df0,_0x367503=(_0x4d1d61=(_0x148477=_0x3d9590['customRanges'])==null?void 0x0:_0x148477[_0x29dcc9(0x1c2)](_0x35419c=>_0x35419c[_0x29dcc9(0x177)]===_0x42599a[_0x29dcc9(0x192)]['COMMENT'])['map'](_0x273a5a=>_0x273a5a[_0x29dcc9(0x173)]))!=null?_0x4d1d61:[],_0x3bab8c=JSON[_0x29dcc9(0x1a5)](_0x3d9590),_0x146684=_0x1e1df0[_0x29dcc9(0x1c5)],_0xf917a5=_0x1e1df0['id'],_0x4361a8={'memberId':(await this[_0x29dcc9(0x1ac)][_0x29dcc9(0x1c4)](_0x349854))[_0x29dcc9(0x188)](),'unitId':_0x349854,'threadId':_0x146684,'mention':_0x367503,'content':_0x3bab8c,'replyId':_0xf917a5},_0x2cd38f=await this[_0x29dcc9(0x1bb)][_0x29dcc9(0x1e5)]('/universer-api/comment/unit/'+_0x349854+'/edit',{'body':_0x4361a8});return!_0x2cd38f[_0x29dcc9(0x1a9)]['error']||_0x2cd38f['body'][_0x29dcc9(0x183)][_0x29dcc9(0x1c9)]===0x1;}async[_0x12b0cc(0x187)](_0x2d6db1){const _0x43e37e=_0x12b0cc,{unitId:_0x2d8c00}=_0x2d6db1,_0xd2ce70=_0x2d6db1[_0x43e37e(0x1c5)],_0x181259={'memberId':this[_0x43e37e(0x1ae)][_0x43e37e(0x184)]()[_0x43e37e(0x1a7)],'unitId':_0x2d8c00,'threadId':_0xd2ce70,'solved':_0x2d6db1[_0x43e37e(0x1dc)]?_0x562e05[_0x43e37e(0x18b)]:_0x562e05[_0x43e37e(0x191)]},_0x4a13e1=await this['_httpService'][_0x43e37e(0x1e5)](_0x43e37e(0x1b2)+_0x2d8c00+_0x43e37e(0x1b1),{'body':_0x181259});return!_0x4a13e1[_0x43e37e(0x1a9)][_0x43e37e(0x183)]||_0x4a13e1[_0x43e37e(0x1a9)][_0x43e37e(0x183)][_0x43e37e(0x1c9)]===0x1;}async['deleteComment'](_0x70537a,_0x4bdbb4,_0xce1313,_0x5d0295){const _0x548622=_0x12b0cc,_0x170bbe={'memberId':(await this['_sessionService'][_0x548622(0x1c4)](_0x70537a))['getMemberID'](),'threadId':_0xce1313,'replyId':_0x5d0295,'unitId':_0x70537a},_0x4609af=await this[_0x548622(0x1bb)]['post'](_0x548622(0x1b2)+_0x70537a+_0x548622(0x199),{'body':_0x170bbe});return!_0x4609af['body'][_0x548622(0x183)]||_0x4609af[_0x548622(0x1a9)][_0x548622(0x183)][_0x548622(0x1c9)]===0x1;}async['listComments'](_0xae0e0c,_0x248f3b,_0x54d85a){const _0x2a18b9=_0x12b0cc,_0x2dee56={'unitId':_0xae0e0c,'threadId':_0x54d85a},_0x35088d=await this[_0x2a18b9(0x1bb)][_0x2a18b9(0x1e5)]('/universer-api/comment/unit/'+_0xae0e0c+_0x2a18b9(0x1d6),{'body':_0x2dee56}),_0x435fe6=_0x54d85a[_0x2a18b9(0x16b)](_0x8d1de2=>_0x297557(_0x35088d['body']['comments'][_0x8d1de2],_0xae0e0c,_0x248f3b))[_0x2a18b9(0x1c2)](Boolean);return Object['values'](_0x35088d[_0x2a18b9(0x1a9)][_0x2a18b9(0x174)])[_0x2a18b9(0x17f)](_0x1ea756=>{this['_userService']['addUser'](_0x1ea756);}),_0x435fe6;}[_0x12b0cc(0x1ba)](_0x46b32c){const _0x4fac22=_0x12b0cc;return{'id':_0x46b32c['id'],'threadId':_0x46b32c['threadId'],'ref':_0x46b32c[_0x4fac22(0x1b6)]};}};_0x49b173=_0x2ef107([_0x396c75(0x0,_0x42599a[_0x12b0cc(0x1d4)](_0x11d5d9[_0x12b0cc(0x185)])),_0x396c75(0x1,_0x42599a['Inject'](_0x42599a[_0x12b0cc(0x1bd)])),_0x396c75(0x2,_0x42599a[_0x12b0cc(0x1d4)](_0x42c319[_0x12b0cc(0x1b8)]))],_0x49b173);var _0x500772=Object[_0x12b0cc(0x1de)],_0x55cd39=(_0x383f91,_0x1437e3,_0xd80369,_0x1a0451)=>{const _0x43e7f7=_0x12b0cc;for(var _0x17a344=_0x1a0451>0x1?void 0x0:_0x1a0451?_0x500772(_0x1437e3,_0xd80369):_0x1437e3,_0x411719=_0x383f91[_0x43e7f7(0x194)]-0x1,_0x29e18f;_0x411719>=0x0;_0x411719--)(_0x29e18f=_0x383f91[_0x411719])&&(_0x17a344=_0x29e18f(_0x17a344)||_0x17a344);return _0x17a344;},_0x4db8b2=(_0x585627,_0x2d28eb)=>(_0x1bf808,_0x372651)=>_0x2d28eb(_0x1bf808,_0x372651,_0x585627);let _0x1a4a0e=class extends _0x42599a[_0x12b0cc(0x198)]{constructor(_0x5e093e,_0x22484a){const _0x5ca96d=_0x12b0cc;super(),this['_threadCommentDataSourceService']=_0x5e093e,this[_0x5ca96d(0x1d0)]=_0x22484a,this['_initDataSource']();}['_initDataSource'](){const _0x1d3b20=_0x12b0cc;this[_0x1d3b20(0x175)][_0x1d3b20(0x1dd)]=this[_0x1d3b20(0x1d0)],this['_threadCommentDataSourceService'][_0x1d3b20(0x176)]=!0x1;}};_0x1a4a0e=_0x55cd39([_0x4db8b2(0x0,_0x2b67bb[_0x12b0cc(0x1ec)]),_0x4db8b2(0x1,_0x42599a[_0x12b0cc(0x1d4)](_0x49b173))],_0x1a4a0e);var _0x2faf6b=Object[_0x12b0cc(0x168)],_0x33d933=Object[_0x12b0cc(0x1de)],_0xee51e6=(_0x27395e,_0x34ff2e,_0x377525)=>_0x34ff2e in _0x27395e?_0x2faf6b(_0x27395e,_0x34ff2e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x377525}):_0x27395e[_0x34ff2e]=_0x377525,_0x4e0187=(_0x58d3a5,_0x3e5c32,_0x190705,_0x37f190)=>{for(var _0x52cc10=_0x37f190>0x1?void 0x0:_0x37f190?_0x33d933(_0x3e5c32,_0x190705):_0x3e5c32,_0x4a37e7=_0x58d3a5['length']-0x1,_0x2615a4;_0x4a37e7>=0x0;_0x4a37e7--)(_0x2615a4=_0x58d3a5[_0x4a37e7])&&(_0x52cc10=_0x2615a4(_0x52cc10)||_0x52cc10);return _0x52cc10;},_0x9e1a86=(_0x10dccb,_0x139477)=>(_0x3688ff,_0x15d31b)=>_0x139477(_0x3688ff,_0x15d31b,_0x10dccb),_0x505e4c=(_0x2e071e,_0x359feb,_0x1197f3)=>_0xee51e6(_0x2e071e,typeof _0x359feb!=_0x12b0cc(0x17c)?_0x359feb+'':_0x359feb,_0x1197f3);_0x2658bc[_0x12b0cc(0x1ea)]=class extends _0x42599a[_0x12b0cc(0x16f)]{constructor(_0x352107=_0x4267d1,_0x205a5f,_0x13240f){const _0x2e8403=_0x12b0cc;super(),this[_0x2e8403(0x1f1)]=_0x352107,this[_0x2e8403(0x1a3)]=_0x205a5f,this[_0x2e8403(0x19f)]=_0x13240f;const {..._0x1104c9}=_0x42599a[_0x2e8403(0x18f)]({},_0x4267d1,this[_0x2e8403(0x1f1)]);this[_0x2e8403(0x19f)]['setConfig'](_0x530a65,_0x1104c9);}[_0x12b0cc(0x171)](){const _0x212e44=_0x12b0cc;[[_0x49b173],[_0x1a4a0e],[_0x498709]][_0x212e44(0x17f)](_0x30e70f=>{const _0x51abb5=_0x212e44;this['_injector'][_0x51abb5(0x1a0)](_0x30e70f);});}['onReady'](){const _0x43fa20=_0x12b0cc;this['_injector'][_0x43fa20(0x18c)](_0x1a4a0e),this[_0x43fa20(0x1a3)][_0x43fa20(0x18c)](_0x498709);}},_0x505e4c(_0x2658bc[_0x12b0cc(0x1ea)],_0x12b0cc(0x16a),_0x2532e4),_0x505e4c(_0x2658bc[_0x12b0cc(0x1ea)],_0x12b0cc(0x1c6),_0x42599a[_0x12b0cc(0x172)][_0x12b0cc(0x1a8)]),_0x2658bc[_0x12b0cc(0x1ea)]=_0x4e0187([_0x42599a[_0x12b0cc(0x1b3)](_0x6de668[_0x12b0cc(0x1e0)],_0x42c319[_0x12b0cc(0x1d7)],_0x5c2e4c[_0x12b0cc(0x18e)]),_0x9e1a86(0x1,_0x42599a['Inject'](_0x42599a['Injector'])),_0x9e1a86(0x2,_0x42599a[_0x12b0cc(0x189)])],_0x2658bc[_0x12b0cc(0x1ea)]),Object[_0x12b0cc(0x168)](_0x2658bc,Symbol[_0x12b0cc(0x1e8)],{'value':_0x12b0cc(0x17e)});}));function _0x5c50(_0x4e1f5a,_0x1e6df2){const _0x1ab18f=_0x1ab1();return _0x5c50=function(_0x5c507c,_0x1ba68a){_0x5c507c=_0x5c507c-0x168;let _0x33689a=_0x1ab18f[_0x5c507c];return _0x33689a;},_0x5c50(_0x4e1f5a,_0x1e6df2);}function _0x1ab1(){const _0x44e7b9=['_init','user','UniverProLicense','solved','post','Solve','_commentService','toStringTag','exports','UniverThreadCommentDataSourcePlugin','24sKEDzT','IThreadCommentDataSourceService','updateComment','@univerjs-pro/collaboration-client','slice','find','_config','defineProperty','parse','pluginName','map','replyId','UniverThreadComment','16557588uevqBM','Plugin','@univerjs/thread-comment','onStarting','UniverInstanceType','rangeId','users','_threadCommentDataSourceService','syncUpdateMutationToColla','rangeType','reply','comment','rxjs','userId','symbol','format','Module','forEach','_initUserSync','YYYY/MM/DD\x20HH:mm','/reply','error','getCurrentUser','HTTPService','49ZKDkQp','resolveComment','getMemberID','IConfigService','subscribe','Solved','get','disposeWithMe','UniverLicensePlugin','merge','23151YclcaM','OpenOrReOpen','CustomRangeType','CommentService','length','Edit','replies','size','Disposable','/delete','root','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','335840WWkjtr','delete','_configService','add','COMMENT','content','_injector','2490354TLpvoM','stringify','getUnit','userID','UNIVER_UNKNOWN','body','UniverProThreadCommentDatasource','Delete','_sessionService','getComment','_userService','2596IvPQLd','bufferTime','/solved','/universer-api/comment/unit/','DependentOn','Add','221Dhmtyz','ref','UniverProCollaborationClient','CollaborationSessionService','@univerjs/network','saveCommentToSnapshot','_httpService','addUser','UserManagerService','personId','@univerjs-pro/license','dayjs','8190OFVBdH','filter','@univerjs/thread-comment-ui','requireSession','threadId','type','customRanges','@univerjs/core','code','createTimestamp','object','addComment','UNRECOGNIZED','626armHnI','commentUpdate$','_threadCommentDataSource','236rzVhlw','deleteComment','parentId','Inject','Unknown','/list','UniverCollaborationClientPlugin','_threadCommentModel','payload','283112bQkwee','Reply','resolved','dataSource','getOwnPropertyDescriptor','/universer-api/user/list','UniverThreadCommentUIPlugin'];_0x1ab1=function(){return _0x44e7b9;};return _0x1ab1();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.2",
3
+ "version": "0.10.3-nightly.202508121228",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.10.2",
49
- "@univerjs-pro/license": "0.10.2",
50
- "@univerjs/core": "0.10.2",
48
+ "@univerjs-pro/license": "0.10.3-nightly.202508121228",
49
+ "@univerjs-pro/collaboration-client": "0.10.3-nightly.202508121228",
50
+ "@univerjs/network": "0.10.3-nightly.202508121228",
51
51
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/network": "0.10.2",
53
- "@univerjs/thread-comment": "0.10.2",
54
- "@univerjs/thread-comment-ui": "0.10.2"
52
+ "@univerjs/core": "0.10.3-nightly.202508121228",
53
+ "@univerjs/thread-comment-ui": "0.10.3-nightly.202508121228",
54
+ "@univerjs/thread-comment": "0.10.3-nightly.202508121228"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^7.0.6",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.10.2"
61
+ "@univerjs-infra/shared": "0.10.3"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",