@univerjs-pro/thread-comment-datasource 0.10.12 → 0.10.13-nightly.202510290902

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 _0x1375d2=_0x4f66;(function(_0x134f5a,_0x51ab93){const _0x2b9287=_0x4f66,_0x1e8629=_0x134f5a();while(!![]){try{const _0x139af4=parseInt(_0x2b9287(0x13f))/0x1*(parseInt(_0x2b9287(0x113))/0x2)+parseInt(_0x2b9287(0x12e))/0x3*(parseInt(_0x2b9287(0x137))/0x4)+-parseInt(_0x2b9287(0xce))/0x5*(parseInt(_0x2b9287(0x13c))/0x6)+-parseInt(_0x2b9287(0x13b))/0x7+-parseInt(_0x2b9287(0x128))/0x8*(parseInt(_0x2b9287(0xcc))/0x9)+parseInt(_0x2b9287(0x105))/0xa*(-parseInt(_0x2b9287(0x108))/0xb)+-parseInt(_0x2b9287(0x102))/0xc*(-parseInt(_0x2b9287(0xe7))/0xd);if(_0x139af4===_0x51ab93)break;else _0x1e8629['push'](_0x1e8629['shift']());}catch(_0x2c705e){_0x1e8629['push'](_0x1e8629['shift']());}}}(_0xb92c,0xbbb39));Object[_0x1375d2(0xc8)](exports,Symbol[_0x1375d2(0x101)],{'value':'Module'});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=(_0x36eda1=>(_0x36eda1[_0x36eda1[_0x1375d2(0x10c)]=0x0]='OpenOrReOpen',_0x36eda1[_0x36eda1[_0x1375d2(0x130)]=0x1]=_0x1375d2(0x130),_0x36eda1[_0x36eda1[_0x1375d2(0x138)]=-0x1]=_0x1375d2(0x138),_0x36eda1))(I||{}),v=(_0x2f1566=>(_0x2f1566[_0x2f1566[_0x1375d2(0xf5)]=0x0]=_0x1375d2(0xf5),_0x2f1566[_0x2f1566[_0x1375d2(0xea)]=0x1]=_0x1375d2(0xea),_0x2f1566[_0x2f1566[_0x1375d2(0x111)]=0x2]=_0x1375d2(0x111),_0x2f1566[_0x2f1566[_0x1375d2(0x119)]=0x3]=_0x1375d2(0x119),_0x2f1566[_0x2f1566[_0x1375d2(0xd5)]=0x4]=_0x1375d2(0xd5),_0x2f1566[_0x2f1566[_0x1375d2(0xcb)]=0x5]=_0x1375d2(0xcb),_0x2f1566[_0x2f1566[_0x1375d2(0x138)]=-0x1]=_0x1375d2(0x138),_0x2f1566))(v||{});function _0xb92c(){const _0x3b0ec2=['length','size','code','symbol','_configService','defineProperty','forEach','delete','Solve','126KSRuEx','ThreadCommentModel','55oBlRlv','solved','threadId','/reply','_threadCommentDataSourceService','slice','_sessionService','Delete','DependentOn','_threadCommentDataSource','/list','addUser','replyId','Inject','unitId','commentUpdate$','reply','CommentService','setConfig','stringify','IConfigService','getMemberID','_config','replies','/solved','52AmDxCp','_commentService','deleteComment','Add','saveCommentToSnapshot','disposeWithMe','resolved','CustomRangeType','user','updateComment','users','comment','_init','pluginName','Unknown','createTimestamp','add','/edit','UniverThreadCommentUIPlugin','getUser','ref','userId','YYYY/MM/DD\x20HH:mm','content','/universer-api/comment/unit/','map','toStringTag','8044200UKdItD','_injector','parse','370cMQKgq','get','_initDataSource','455653sUtcrZ','format','parentId','UniverCollaborationClientPlugin','OpenOrReOpen','syncUpdateMutationToColla','/delete','pipe','error','Reply','COMMENT','2KBSbKm','dataSource','requireSession','Injector','find','payload','Edit','/universer-api/user/list','userID','getUnit','UniverLicensePlugin','UNIVER_UNKNOWN','type','rangeId','dayjs','_initUserSync','UniverThreadCommentDataSourcePlugin','IThreadCommentDataSourceService','comments','values','root','369112okIBfb','resolveComment','filter','customRanges','getCurrentUser','UserManagerService','1952298MXOnTr','getOwnPropertyDescriptor','Solved','_threadCommentModel','_userService','Disposable','addComment','post','UniverInstanceType','8aixJNj','UNRECOGNIZED','_httpService','subscribe','10579674XIOsZY','116214pBQNfA','HTTPService','body','688931kNPnFo'];_0xb92c=function(){return _0x3b0ec2;};return _0xb92c();}const f=_0xc89e60=>c[_0x1375d2(0x121)](new Date(+_0xc89e60))[_0x1375d2(0x109)](_0x1375d2(0xfd)),R=async(_0x5c484e,_0x1a6454)=>{const _0x4d75bf=_0x1375d2,_0x5295be=_0x5c484e[_0x4d75bf(0x106)](c[_0x4d75bf(0x12d)]),_0x45d08f=_0x5c484e[_0x4d75bf(0x106)](P['HTTPService']);_0x1a6454[_0x4d75bf(0xc9)](_0x590ef2=>{const _0x3d75c1=_0x4d75bf;_0x5295be[_0x3d75c1(0xfa)](_0x590ef2)&&_0x1a6454[_0x3d75c1(0xca)](_0x590ef2);}),_0x1a6454[_0x4d75bf(0x141)]&&(await _0x45d08f[_0x4d75bf(0x106)](_0x4d75bf(0x11a),{'params':{'userIDs':[..._0x1a6454]}}))[_0x4d75bf(0x13e)][_0x4d75bf(0xf1)][_0x4d75bf(0xc9)](_0x43a323=>{const _0x13c29d=_0x4d75bf;_0x43a323&&_0x5295be[_0x13c29d(0xd9)](_0x43a323);});};var $=Object[_0x1375d2(0x12f)],E=(_0x5b90c2,_0x1e39ba,_0x457e35,_0x355113)=>{for(var _0x550d9c=_0x355113>0x1?void 0x0:_0x355113?$(_0x1e39ba,_0x457e35):_0x1e39ba,_0x45338f=_0x5b90c2['length']-0x1,_0x4ff12a;_0x45338f>=0x0;_0x45338f--)(_0x4ff12a=_0x5b90c2[_0x45338f])&&(_0x550d9c=_0x4ff12a(_0x550d9c)||_0x550d9c);return _0x550d9c;},S=(_0x482890,_0x401ed1)=>(_0x39c925,_0x26e52b)=>_0x401ed1(_0x39c925,_0x26e52b,_0x482890);let _=class extends c[_0x1375d2(0x133)]{constructor(_0x2398e7,_0x18ce1f,_0x275578,_0x558435){const _0x515909=_0x1375d2;super(),this['_commentService']=_0x2398e7,this[_0x515909(0x131)]=_0x18ce1f,this['_userService']=_0x275578,this[_0x515909(0x103)]=_0x558435,this['_init'](),this['_initUserSync']();}[_0x1375d2(0x122)](){const _0x118b5f=_0x1375d2;this[_0x118b5f(0xec)](this[_0x118b5f(0x131)][_0x118b5f(0xdd)][_0x118b5f(0x10f)](j['bufferTime'](0x10))[_0x118b5f(0x13a)](_0x12c792=>{const _0x486ad5=_0x118b5f,_0x324669=new Set();_0x12c792[_0x486ad5(0xc9)](_0x585889=>{const _0x4657ef=_0x486ad5;switch(_0x585889['type']){case _0x4657ef(0xf7):{const _0x213c6e=_0x585889[_0x4657ef(0x118)]['personId'];_0x324669['add'](_0x213c6e);break;}}}),R(this[_0x486ad5(0x103)],_0x324669);}));}[_0x1375d2(0xf3)](){const _0x15a369=_0x1375d2;this[_0x15a369(0xec)](this[_0x15a369(0xe8)][_0x15a369(0xdd)][_0x15a369(0x13a)](async _0x2ff993=>{const _0x48b338=_0x15a369;var _0x5d3af6,_0x243ecc,_0xdeb3e9,_0x5de7f7;const _0x17a0a6=(_0x5d3af6=this[_0x48b338(0x131)][_0x48b338(0x11c)](_0x2ff993[_0x48b338(0xdc)])[_0x48b338(0x117)](_0x567a2a=>_0x567a2a['threadId']===_0x2ff993[_0x48b338(0xd0)]))==null?void 0x0:_0x5d3af6[_0x48b338(0x127)];if(!_0x17a0a6)return;const {unitId:_0x14972f,subUnitId:_0x641f25}=_0x17a0a6;switch(_0x2ff993[_0x48b338(0xef)]&&this['_userService']['addUser'](_0x2ff993[_0x48b338(0xef)]),_0x2ff993[_0x48b338(0x11f)]){case v[_0x48b338(0xea)]:break;case v[_0x48b338(0x111)]:{this[_0x48b338(0x131)][_0x48b338(0x134)](_0x14972f,_0x641f25,{'unitId':_0x14972f,'subUnitId':_0x641f25,'ref':'','id':_0x2ff993[_0x48b338(0xda)],'dT':f(+_0x2ff993[_0x48b338(0xf6)]),'threadId':_0x2ff993[_0x48b338(0xd0)],'personId':(_0xdeb3e9=(_0x243ecc=_0x2ff993[_0x48b338(0xef)])==null?void 0x0:_0x243ecc[_0x48b338(0x11b)])!=null?_0xdeb3e9:_0x2ff993['userId'],'text':JSON[_0x48b338(0x104)](_0x2ff993[_0x48b338(0xfe)]),'parentId':_0x17a0a6['id']});break;}case v[_0x48b338(0xd5)]:{const _0x575984=this['_threadCommentModel']['getComment'](_0x14972f,_0x641f25,_0x2ff993[_0x48b338(0xda)]);_0x575984&&_0x575984[_0x48b338(0x10a)]&&this['_threadCommentModel'][_0x48b338(0xe9)](_0x14972f,_0x641f25,_0x2ff993['replyId']);break;}case v[_0x48b338(0x119)]:{this['_threadCommentModel'][_0x48b338(0xf0)](_0x14972f,_0x641f25,{'commentId':_0x2ff993[_0x48b338(0xda)],'text':JSON[_0x48b338(0x104)](_0x2ff993[_0x48b338(0xfe)])});break;}case v[_0x48b338(0xcb)]:{const _0x25bb28=(_0x5de7f7=this[_0x48b338(0x131)][_0x48b338(0x11c)](_0x2ff993['unitId'])['find'](_0x391cff=>_0x391cff['threadId']===_0x2ff993[_0x48b338(0xd0)]))==null?void 0x0:_0x5de7f7[_0x48b338(0x127)];_0x25bb28&&this[_0x48b338(0x131)][_0x48b338(0x129)](_0x14972f,_0x641f25,_0x25bb28['id'],_0x2ff993[_0x48b338(0xcf)]===I[_0x48b338(0x130)]);break;}}}));}};_=E([S(0x0,c[_0x1375d2(0xdb)](b[_0x1375d2(0xdf)])),S(0x1,c[_0x1375d2(0xdb)](M[_0x1375d2(0xcd)])),S(0x2,c[_0x1375d2(0xdb)](c[_0x1375d2(0x12d)])),S(0x3,c[_0x1375d2(0xdb)](c['Injector']))],_);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x2954b4,_0x2265b2,_0x185b66,_0x3a6fd1)=>{for(var _0x389659=_0x3a6fd1>0x1?void 0x0:_0x3a6fd1?A(_0x2265b2,_0x185b66):_0x2265b2,_0x41ce57=_0x2954b4['length']-0x1,_0x42bc6f;_0x41ce57>=0x0;_0x41ce57--)(_0x42bc6f=_0x2954b4[_0x41ce57])&&(_0x389659=_0x42bc6f(_0x389659)||_0x389659);return _0x389659;},C=(_0x14d36e,_0x28b1d7)=>(_0x1cee25,_0x354516)=>_0x28b1d7(_0x1cee25,_0x354516,_0x14d36e);function Y(_0x35a23e,_0xe25cfb){const _0x3aea6c=_0x1375d2,_0x3d8e6d=_0x35a23e[_0x3aea6c(0xe5)][0x0];return{..._0xe25cfb,'id':_0x3d8e6d[_0x3aea6c(0xda)],'resolved':_0x35a23e[_0x3aea6c(0xcf)]===0x1,'dT':f(_0x3d8e6d[_0x3aea6c(0xf6)]),'personId':_0x3d8e6d[_0x3aea6c(0xfc)],'threadId':_0x3d8e6d['threadId']};}function G(_0x5afc50,_0x110096,_0x250c23){const _0x55ad0a=_0x1375d2;var _0x35b38a,_0x45d879;if(((_0x45d879=(_0x35b38a=_0x5afc50==null?void 0x0:_0x5afc50['replies'])==null?void 0x0:_0x35b38a[_0x55ad0a(0x140)])!=null?_0x45d879:0x0)>0x0){const _0x206d9c=(_0x4ffc6e,_0x4eb75b)=>({'id':_0x4ffc6e[_0x55ad0a(0xda)],'threadId':_0x4ffc6e[_0x55ad0a(0xd0)],'dT':f(_0x4ffc6e[_0x55ad0a(0xf6)]),'personId':_0x4ffc6e[_0x55ad0a(0xfc)],'resolved':_0x5afc50[_0x55ad0a(0xcf)]===I['Solved'],'unitId':_0x110096,'subUnitId':_0x250c23,'text':JSON[_0x55ad0a(0x104)](_0x4ffc6e[_0x55ad0a(0xfe)]),'parentId':_0x4eb75b}),_0x1d2fe7=_0x206d9c(_0x5afc50[_0x55ad0a(0xe5)][0x0]);return{..._0x1d2fe7,'children':_0x5afc50[_0x55ad0a(0xe5)][_0x55ad0a(0xd3)](0x1)['map'](_0x336cfd=>_0x206d9c(_0x336cfd,_0x1d2fe7['id']))};}return null;}let p=class{constructor(_0x44fda8,_0xcf9d9b,_0x37b97d){const _0x35a5eb=_0x1375d2;this[_0x35a5eb(0x139)]=_0x44fda8,this[_0x35a5eb(0x132)]=_0xcf9d9b,this['_sessionService']=_0x37b97d;}async[_0x1375d2(0x134)](_0x2db82f){const _0x2f0799=_0x1375d2;var _0x48f7f3,_0x36ef2f;const {parentId:_0x5a940a,unitId:_0x1fa3fc,text:_0x301435,threadId:_0x30ba64}=_0x2db82f,_0x1c4810=(_0x36ef2f=(_0x48f7f3=_0x301435['customRanges'])==null?void 0x0:_0x48f7f3['filter'](_0x4de6b7=>_0x4de6b7['rangeType']===c[_0x2f0799(0xee)][_0x2f0799(0x112)])['map'](_0x3c1abd=>_0x3c1abd[_0x2f0799(0x120)]))!=null?_0x36ef2f:[],_0x1a0f1a=JSON[_0x2f0799(0xe1)](_0x301435),_0x87e172=(await this[_0x2f0799(0xd4)][_0x2f0799(0x115)](_0x1fa3fc))[_0x2f0799(0xe3)]();if(_0x5a940a){const _0x5eaaf2={'memberId':_0x87e172,'unitId':_0x1fa3fc,'content':_0x1a0f1a,'mention':_0x1c4810,'threadId':_0x30ba64},_0x5b2e5d=(await this[_0x2f0799(0x139)][_0x2f0799(0x135)](_0x2f0799(0xff)+_0x1fa3fc+_0x2f0799(0xd1),{'body':_0x5eaaf2}))[_0x2f0799(0x13e)][_0x2f0799(0xde)];return{..._0x2db82f,'id':_0x5b2e5d[_0x2f0799(0xda)],'dT':c[_0x2f0799(0x121)](+_0x5b2e5d[_0x2f0799(0xf6)])[_0x2f0799(0x109)](_0x2f0799(0xfd)),'personId':_0x5b2e5d['userId']};}else{const _0x24a5aa={'memberId':_0x87e172,'unitId':_0x1fa3fc,'content':_0x1a0f1a,'mention':_0x1c4810},_0x54396d=await this['_httpService'][_0x2f0799(0x135)](_0x2f0799(0xff)+_0x1fa3fc+'/add',{'body':_0x24a5aa});return Y(_0x54396d[_0x2f0799(0x13e)][_0x2f0799(0xf2)],_0x2db82f);}}async[_0x1375d2(0xf0)](_0xdb2370){const _0x243624=_0x1375d2;var _0x15f240,_0x263731;const {text:_0x5a5411,unitId:_0x610605}=_0xdb2370,_0x277683=(_0x263731=(_0x15f240=_0x5a5411[_0x243624(0x12b)])==null?void 0x0:_0x15f240[_0x243624(0x12a)](_0x3956f5=>_0x3956f5['rangeType']===c[_0x243624(0xee)][_0x243624(0x112)])[_0x243624(0x100)](_0x516467=>_0x516467[_0x243624(0x120)]))!=null?_0x263731:[],_0x2687e5=JSON['stringify'](_0x5a5411),_0x4c8c21=_0xdb2370[_0x243624(0xd0)],_0x15fe33=_0xdb2370['id'],_0x4e5a31={'memberId':(await this[_0x243624(0xd4)]['requireSession'](_0x610605))['getMemberID'](),'unitId':_0x610605,'threadId':_0x4c8c21,'mention':_0x277683,'content':_0x2687e5,'replyId':_0x15fe33},_0x44203b=await this['_httpService'][_0x243624(0x135)](_0x243624(0xff)+_0x610605+_0x243624(0xf8),{'body':_0x4e5a31});return!_0x44203b['body']['error']||_0x44203b[_0x243624(0x13e)][_0x243624(0x110)][_0x243624(0x142)]===0x1;}async['resolveComment'](_0x4187d9){const _0xa1806d=_0x1375d2,{unitId:_0x142965}=_0x4187d9,_0x50cc58=_0x4187d9[_0xa1806d(0xd0)],_0x105336={'memberId':this['_userService'][_0xa1806d(0x12c)]()[_0xa1806d(0x11b)],'unitId':_0x142965,'threadId':_0x50cc58,'solved':_0x4187d9[_0xa1806d(0xed)]?I[_0xa1806d(0x130)]:I[_0xa1806d(0x10c)]},_0x3bafe0=await this[_0xa1806d(0x139)][_0xa1806d(0x135)](_0xa1806d(0xff)+_0x142965+_0xa1806d(0xe6),{'body':_0x105336});return!_0x3bafe0[_0xa1806d(0x13e)][_0xa1806d(0x110)]||_0x3bafe0[_0xa1806d(0x13e)][_0xa1806d(0x110)][_0xa1806d(0x142)]===0x1;}async['deleteComment'](_0x45e657,_0x3eeb01,_0x2df8e7,_0x3cf780){const _0x2a38c2=_0x1375d2,_0x430f31={'memberId':(await this[_0x2a38c2(0xd4)][_0x2a38c2(0x115)](_0x45e657))['getMemberID'](),'threadId':_0x2df8e7,'replyId':_0x3cf780,'unitId':_0x45e657},_0xf47d39=await this[_0x2a38c2(0x139)][_0x2a38c2(0x135)](_0x2a38c2(0xff)+_0x45e657+_0x2a38c2(0x10e),{'body':_0x430f31});return!_0xf47d39[_0x2a38c2(0x13e)]['error']||_0xf47d39[_0x2a38c2(0x13e)][_0x2a38c2(0x110)]['code']===0x1;}async['listComments'](_0xace606,_0xb088dd,_0x962b10){const _0x157735=_0x1375d2,_0x1d024a={'unitId':_0xace606,'threadId':_0x962b10},_0x15f611=await this[_0x157735(0x139)][_0x157735(0x135)](_0x157735(0xff)+_0xace606+_0x157735(0xd8),{'body':_0x1d024a}),_0x5116f3=_0x962b10[_0x157735(0x100)](_0x466191=>G(_0x15f611[_0x157735(0x13e)][_0x157735(0x125)][_0x466191],_0xace606,_0xb088dd))[_0x157735(0x12a)](Boolean);return Object[_0x157735(0x126)](_0x15f611['body'][_0x157735(0xf1)])['forEach'](_0xcdeb9f=>{const _0x38353a=_0x157735;this[_0x38353a(0x132)][_0x38353a(0xd9)](_0xcdeb9f);}),_0x5116f3;}[_0x1375d2(0xeb)](_0x2e1585){const _0x38eda0=_0x1375d2;return{'id':_0x2e1585['id'],'threadId':_0x2e1585[_0x38eda0(0xd0)],'ref':_0x2e1585[_0x38eda0(0xfb)]};}};p=x([C(0x0,c[_0x1375d2(0xdb)](P[_0x1375d2(0x13d)])),C(0x1,c[_0x1375d2(0xdb)](c[_0x1375d2(0x12d)])),C(0x2,c[_0x1375d2(0xdb)](b['CollaborationSessionService']))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x27fc8c,_0x4f849b,_0x5eb73f,_0x2c91de)=>{const _0x1bb6ed=_0x1375d2;for(var _0x289e55=_0x2c91de>0x1?void 0x0:_0x2c91de?H(_0x4f849b,_0x5eb73f):_0x4f849b,_0x5cdb3d=_0x27fc8c[_0x1bb6ed(0x140)]-0x1,_0x5497bc;_0x5cdb3d>=0x0;_0x5cdb3d--)(_0x5497bc=_0x27fc8c[_0x5cdb3d])&&(_0x289e55=_0x5497bc(_0x289e55)||_0x289e55);return _0x289e55;},y=(_0x3b0ebb,_0x3620a3)=>(_0x4d99b0,_0x925215)=>_0x3620a3(_0x4d99b0,_0x925215,_0x3b0ebb);let g=class extends c['Disposable']{constructor(_0x1c0b65,_0x270101){const _0x56db43=_0x1375d2;super(),this['_threadCommentDataSourceService']=_0x1c0b65,this[_0x56db43(0xd7)]=_0x270101,this['_initDataSource']();}[_0x1375d2(0x107)](){const _0x261f62=_0x1375d2;this[_0x261f62(0xd2)][_0x261f62(0x114)]=this[_0x261f62(0xd7)],this['_threadCommentDataSourceService'][_0x261f62(0x10d)]=!0x1;}};function _0x4f66(_0x1a794e,_0x163598){const _0xb92cb3=_0xb92c();return _0x4f66=function(_0x4f6620,_0x409fad){_0x4f6620=_0x4f6620-0xc7;let _0x512f43=_0xb92cb3[_0x4f6620];return _0x512f43;},_0x4f66(_0x1a794e,_0x163598);}g=J([y(0x0,M[_0x1375d2(0x124)]),y(0x1,c[_0x1375d2(0xdb)](p))],g);var F=Object[_0x1375d2(0xc8)],L=Object[_0x1375d2(0x12f)],Z=(_0x589ab7,_0x454bf0,_0x1133d3)=>_0x454bf0 in _0x589ab7?F(_0x589ab7,_0x454bf0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1133d3}):_0x589ab7[_0x454bf0]=_0x1133d3,W=(_0x2cd9a1,_0xfb63fa,_0x26c8d7,_0x457ba9)=>{const _0x430003=_0x1375d2;for(var _0x581c17=_0x457ba9>0x1?void 0x0:_0x457ba9?L(_0xfb63fa,_0x26c8d7):_0xfb63fa,_0x3e4499=_0x2cd9a1[_0x430003(0x140)]-0x1,_0x5c0371;_0x3e4499>=0x0;_0x3e4499--)(_0x5c0371=_0x2cd9a1[_0x3e4499])&&(_0x581c17=_0x5c0371(_0x581c17)||_0x581c17);return _0x581c17;},O=(_0x282e56,_0x1dcba9)=>(_0x581b03,_0x5ec76a)=>_0x1dcba9(_0x581b03,_0x5ec76a,_0x282e56),N=(_0x3f69d1,_0x5b4ff4,_0x1cf845)=>Z(_0x3f69d1,typeof _0x5b4ff4!=_0x1375d2(0x143)?_0x5b4ff4+'':_0x5b4ff4,_0x1cf845);exports[_0x1375d2(0x123)]=class extends c['Plugin']{constructor(_0x3fff28=D,_0x43a471,_0x2094ed){const _0x8a2572=_0x1375d2;super(),this['_config']=_0x3fff28,this['_injector']=_0x43a471,this[_0x8a2572(0xc7)]=_0x2094ed;const {..._0xdafcfe}=c['merge']({},D,this[_0x8a2572(0xe4)]);this[_0x8a2572(0xc7)][_0x8a2572(0xe0)](q,_0xdafcfe);}['onStarting'](){const _0x1c8090=_0x1375d2;[[p],[g],[_]][_0x1c8090(0xc9)](_0x50f073=>{const _0x432af3=_0x1c8090;this['_injector'][_0x432af3(0xf7)](_0x50f073);});}['onReady'](){const _0x328d5b=_0x1375d2;this[_0x328d5b(0x103)]['get'](g),this[_0x328d5b(0x103)][_0x328d5b(0x106)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x1375d2(0xf4),U),N(exports[_0x1375d2(0x123)],_0x1375d2(0x11f),c[_0x1375d2(0x136)][_0x1375d2(0x11e)]),exports[_0x1375d2(0x123)]=W([c[_0x1375d2(0xd6)](w[_0x1375d2(0xf9)],b[_0x1375d2(0x10b)],T[_0x1375d2(0x11d)]),O(0x1,c[_0x1375d2(0xdb)](c[_0x1375d2(0x116)])),O(0x2,c[_0x1375d2(0xe2)])],exports[_0x1375d2(0x123)]);
1
+ 'use strict';const _0xc4c393=_0x6404;(function(_0x3590c5,_0x475a8b){const _0x102308=_0x6404,_0x22ec82=_0x3590c5();while(!![]){try{const _0x17e93e=-parseInt(_0x102308(0x105))/0x1*(parseInt(_0x102308(0x113))/0x2)+-parseInt(_0x102308(0xcc))/0x3+-parseInt(_0x102308(0x11e))/0x4+-parseInt(_0x102308(0x10c))/0x5+parseInt(_0x102308(0x104))/0x6+parseInt(_0x102308(0xe8))/0x7*(parseInt(_0x102308(0x115))/0x8)+-parseInt(_0x102308(0xc3))/0x9*(-parseInt(_0x102308(0xf2))/0xa);if(_0x17e93e===_0x475a8b)break;else _0x22ec82['push'](_0x22ec82['shift']());}catch(_0x426570){_0x22ec82['push'](_0x22ec82['shift']());}}}(_0x4f94,0x25474));function _0x4f94(){const _0x5a6b02=['pluginName','147uoNUDL','symbol','deleteComment','toStringTag','_commentService','bufferTime','length','_threadCommentDataSource','YYYY/MM/DD\x20HH:mm','personId','181120jfzAzt','commentUpdate$','/universer-api/comment/unit/','UserManagerService','user','add','solved','reply','dayjs','customRanges','_configService','delete','IThreadCommentDataSourceService','userId','format','body','resolved','Delete','1674294QtsMiz','1NnrsIF','COMMENT','OpenOrReOpen','Injector','replyId','resolveComment','DependentOn','365995QykihG','Solved','ThreadCommentModel','onStarting','UNIVER_UNKNOWN','Edit','_httpService','174164HewLRt','get','39120dEnCVO','CustomRangeType','threadId','stringify','UniverThreadCommentDataSourcePlugin','code','updateComment','createTimestamp','getCurrentUser','364680FZUEFu','root','values','syncUpdateMutationToColla','/universer-api/user/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UNRECOGNIZED','filter','_threadCommentModel','_injector','addComment','HTTPService','parse','UniverCollaborationClientPlugin','requireSession','error','ref','_init','addUser','content','Disposable','getMemberID','IConfigService','userID','/solved','_userService','rangeId','listComments','comment','_sessionService','size','72pKLXHj','/reply','_initDataSource','disposeWithMe','Solve','replies','_initUserSync','/list','forEach','367476lpafDm','Unknown','map','find','merge','type','onReady','UniverLicensePlugin','CollaborationSessionService','defineProperty','comments','getOwnPropertyDescriptor','Plugin','payload','Add','rangeType','Inject','CommentService','Reply','setConfig','_threadCommentDataSourceService','unitId','/edit','subscribe','post','thread-comment-data-source.config','getUnit'];_0x4f94=function(){return _0x5a6b02;};return _0x4f94();}Object['defineProperty'](exports,Symbol[_0xc4c393(0xeb)],{'value':'Module'});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=_0xc4c393(0x123);var I=(_0x78cf74=>(_0x78cf74[_0x78cf74['OpenOrReOpen']=0x0]=_0xc4c393(0x107),_0x78cf74[_0x78cf74[_0xc4c393(0x10d)]=0x1]='Solved',_0x78cf74[_0x78cf74[_0xc4c393(0x124)]=-0x1]='UNRECOGNIZED',_0x78cf74))(I||{}),v=(_0x46ea77=>(_0x46ea77[_0x46ea77[_0xc4c393(0xcd)]=0x0]='Unknown',_0x46ea77[_0x46ea77[_0xc4c393(0xda)]=0x1]=_0xc4c393(0xda),_0x46ea77[_0x46ea77[_0xc4c393(0xde)]=0x2]=_0xc4c393(0xde),_0x46ea77[_0x46ea77['Edit']=0x3]=_0xc4c393(0x111),_0x46ea77[_0x46ea77['Delete']=0x4]=_0xc4c393(0x103),_0x46ea77[_0x46ea77[_0xc4c393(0xc7)]=0x5]=_0xc4c393(0xc7),_0x46ea77[_0x46ea77[_0xc4c393(0x124)]=-0x1]=_0xc4c393(0x124),_0x46ea77))(v||{});const f=_0x349f1f=>c[_0xc4c393(0xfa)](new Date(+_0x349f1f))[_0xc4c393(0x100)](_0xc4c393(0xf0)),R=async(_0x4c83dd,_0x28189d)=>{const _0x551d23=_0xc4c393,_0x419820=_0x4c83dd[_0x551d23(0x114)](c[_0x551d23(0xf5)]),_0x332368=_0x4c83dd[_0x551d23(0x114)](P[_0x551d23(0x129)]);_0x28189d[_0x551d23(0xcb)](_0x70cede=>{const _0x46978f=_0x551d23;_0x419820['getUser'](_0x70cede)&&_0x28189d[_0x46978f(0xfd)](_0x70cede);}),_0x28189d[_0x551d23(0xc2)]&&(await _0x332368[_0x551d23(0x114)](_0x551d23(0x122),{'params':{'userIDs':[..._0x28189d]}}))[_0x551d23(0x101)]['users'][_0x551d23(0xcb)](_0x112266=>{const _0x249dd1=_0x551d23;_0x112266&&_0x419820[_0x249dd1(0x130)](_0x112266);});};var $=Object[_0xc4c393(0xd7)],E=(_0x5d11cd,_0x498b6d,_0xe3be7c,_0x5b9d1d)=>{const _0x1a13bc=_0xc4c393;for(var _0x96eb6b=_0x5b9d1d>0x1?void 0x0:_0x5b9d1d?$(_0x498b6d,_0xe3be7c):_0x498b6d,_0x30073e=_0x5d11cd[_0x1a13bc(0xee)]-0x1,_0x203667;_0x30073e>=0x0;_0x30073e--)(_0x203667=_0x5d11cd[_0x30073e])&&(_0x96eb6b=_0x203667(_0x96eb6b)||_0x96eb6b);return _0x96eb6b;},S=(_0x5b8f82,_0x27b4ab)=>(_0x52655e,_0x8e5616)=>_0x27b4ab(_0x52655e,_0x8e5616,_0x5b8f82);let _=class extends c[_0xc4c393(0x132)]{constructor(_0x29a8f0,_0x51862d,_0x14f0bf,_0x485bbc){const _0x10d1d8=_0xc4c393;super(),this[_0x10d1d8(0xec)]=_0x29a8f0,this['_threadCommentModel']=_0x51862d,this[_0x10d1d8(0xbd)]=_0x14f0bf,this[_0x10d1d8(0x127)]=_0x485bbc,this[_0x10d1d8(0x12f)](),this[_0x10d1d8(0xc9)]();}['_initUserSync'](){const _0x1201b6=_0xc4c393;this[_0x1201b6(0xc6)](this['_threadCommentModel'][_0x1201b6(0xf3)]['pipe'](j[_0x1201b6(0xed)](0x10))[_0x1201b6(0xe3)](_0x12f2d9=>{const _0x521ead=new Set();_0x12f2d9['forEach'](_0x4a68f0=>{const _0x3d7e0a=_0x6404;switch(_0x4a68f0['type']){case _0x3d7e0a(0xf7):{const _0x1a4ede=_0x4a68f0[_0x3d7e0a(0xd9)][_0x3d7e0a(0xf1)];_0x521ead[_0x3d7e0a(0xf7)](_0x1a4ede);break;}}}),R(this['_injector'],_0x521ead);}));}['_init'](){const _0xa0d18c=_0xc4c393;this['disposeWithMe'](this[_0xa0d18c(0xec)][_0xa0d18c(0xf3)][_0xa0d18c(0xe3)](async _0x50d48b=>{const _0x3102e5=_0xa0d18c;var _0xde50fe,_0x354371,_0x5413a2,_0x246b2a;const _0x2ee095=(_0xde50fe=this[_0x3102e5(0x126)][_0x3102e5(0xe6)](_0x50d48b[_0x3102e5(0xe1)])[_0x3102e5(0xcf)](_0x1dfdfd=>_0x1dfdfd[_0x3102e5(0x117)]===_0x50d48b[_0x3102e5(0x117)]))==null?void 0x0:_0xde50fe[_0x3102e5(0x11f)];if(!_0x2ee095)return;const {unitId:_0x56b96f,subUnitId:_0x4b8529}=_0x2ee095;switch(_0x50d48b[_0x3102e5(0xf6)]&&this[_0x3102e5(0xbd)][_0x3102e5(0x130)](_0x50d48b['user']),_0x50d48b['type']){case v[_0x3102e5(0xda)]:break;case v[_0x3102e5(0xde)]:{this[_0x3102e5(0x126)][_0x3102e5(0x128)](_0x56b96f,_0x4b8529,{'unitId':_0x56b96f,'subUnitId':_0x4b8529,'ref':'','id':_0x50d48b[_0x3102e5(0x109)],'dT':f(+_0x50d48b[_0x3102e5(0x11c)]),'threadId':_0x50d48b[_0x3102e5(0x117)],'personId':(_0x5413a2=(_0x354371=_0x50d48b['user'])==null?void 0x0:_0x354371[_0x3102e5(0xbb)])!=null?_0x5413a2:_0x50d48b[_0x3102e5(0xff)],'text':JSON[_0x3102e5(0x12a)](_0x50d48b['content']),'parentId':_0x2ee095['id']});break;}case v['Delete']:{const _0x55645c=this[_0x3102e5(0x126)]['getComment'](_0x56b96f,_0x4b8529,_0x50d48b[_0x3102e5(0x109)]);_0x55645c&&_0x55645c['parentId']&&this['_threadCommentModel'][_0x3102e5(0xea)](_0x56b96f,_0x4b8529,_0x50d48b[_0x3102e5(0x109)]);break;}case v[_0x3102e5(0x111)]:{this[_0x3102e5(0x126)][_0x3102e5(0x11b)](_0x56b96f,_0x4b8529,{'commentId':_0x50d48b['replyId'],'text':JSON[_0x3102e5(0x12a)](_0x50d48b[_0x3102e5(0x131)])});break;}case v[_0x3102e5(0xc7)]:{const _0x5809c9=(_0x246b2a=this[_0x3102e5(0x126)][_0x3102e5(0xe6)](_0x50d48b[_0x3102e5(0xe1)])[_0x3102e5(0xcf)](_0x5a99f0=>_0x5a99f0[_0x3102e5(0x117)]===_0x50d48b[_0x3102e5(0x117)]))==null?void 0x0:_0x246b2a[_0x3102e5(0x11f)];_0x5809c9&&this['_threadCommentModel'][_0x3102e5(0x10a)](_0x56b96f,_0x4b8529,_0x5809c9['id'],_0x50d48b[_0x3102e5(0xf8)]===I['Solved']);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0xc4c393(0xdd)])),S(0x1,c[_0xc4c393(0xdc)](M[_0xc4c393(0x10e)])),S(0x2,c[_0xc4c393(0xdc)](c[_0xc4c393(0xf5)])),S(0x3,c[_0xc4c393(0xdc)](c[_0xc4c393(0x108)]))],_);const q=_0xc4c393(0xe5),D={};var A=Object[_0xc4c393(0xd7)],x=(_0x5906b0,_0x3a6cb6,_0x18f979,_0x5ee20d)=>{const _0x4a9aa1=_0xc4c393;for(var _0x4419a5=_0x5ee20d>0x1?void 0x0:_0x5ee20d?A(_0x3a6cb6,_0x18f979):_0x3a6cb6,_0x53e899=_0x5906b0[_0x4a9aa1(0xee)]-0x1,_0x1badca;_0x53e899>=0x0;_0x53e899--)(_0x1badca=_0x5906b0[_0x53e899])&&(_0x4419a5=_0x1badca(_0x4419a5)||_0x4419a5);return _0x4419a5;},C=(_0x1a8455,_0xdcda70)=>(_0x19d97e,_0x49e19b)=>_0xdcda70(_0x19d97e,_0x49e19b,_0x1a8455);function Y(_0x136fcc,_0x533207){const _0x3e0871=_0xc4c393,_0xe4785d=_0x136fcc[_0x3e0871(0xc8)][0x0];return{..._0x533207,'id':_0xe4785d[_0x3e0871(0x109)],'resolved':_0x136fcc['solved']===0x1,'dT':f(_0xe4785d[_0x3e0871(0x11c)]),'personId':_0xe4785d['userId'],'threadId':_0xe4785d[_0x3e0871(0x117)]};}function G(_0x20b47b,_0x59fd61,_0x2d7856){const _0x5a3ebd=_0xc4c393;var _0xba83e2,_0x43386f;if(((_0x43386f=(_0xba83e2=_0x20b47b==null?void 0x0:_0x20b47b[_0x5a3ebd(0xc8)])==null?void 0x0:_0xba83e2[_0x5a3ebd(0xee)])!=null?_0x43386f:0x0)>0x0){const _0x457297=(_0x339780,_0x18f433)=>({'id':_0x339780[_0x5a3ebd(0x109)],'threadId':_0x339780[_0x5a3ebd(0x117)],'dT':f(_0x339780[_0x5a3ebd(0x11c)]),'personId':_0x339780[_0x5a3ebd(0xff)],'resolved':_0x20b47b[_0x5a3ebd(0xf8)]===I[_0x5a3ebd(0x10d)],'unitId':_0x59fd61,'subUnitId':_0x2d7856,'text':JSON[_0x5a3ebd(0x12a)](_0x339780[_0x5a3ebd(0x131)]),'parentId':_0x18f433}),_0x907b0=_0x457297(_0x20b47b[_0x5a3ebd(0xc8)][0x0]);return{..._0x907b0,'children':_0x20b47b[_0x5a3ebd(0xc8)]['slice'](0x1)[_0x5a3ebd(0xce)](_0x201e78=>_0x457297(_0x201e78,_0x907b0['id']))};}return null;}let p=class{constructor(_0x5d36ae,_0x1d4d27,_0x1b400d){const _0x1c3a6d=_0xc4c393;this[_0x1c3a6d(0x112)]=_0x5d36ae,this[_0x1c3a6d(0xbd)]=_0x1d4d27,this[_0x1c3a6d(0xc1)]=_0x1b400d;}async[_0xc4c393(0x128)](_0x208c5d){const _0x130852=_0xc4c393;var _0x3990b6,_0x45b1e3;const {parentId:_0x28e071,unitId:_0x514273,text:_0x28c42f,threadId:_0x40e070}=_0x208c5d,_0x23d29b=(_0x45b1e3=(_0x3990b6=_0x28c42f[_0x130852(0xfb)])==null?void 0x0:_0x3990b6[_0x130852(0x125)](_0x34274a=>_0x34274a[_0x130852(0xdb)]===c[_0x130852(0x116)][_0x130852(0x106)])[_0x130852(0xce)](_0x512c27=>_0x512c27[_0x130852(0xbe)]))!=null?_0x45b1e3:[],_0x3d1e68=JSON[_0x130852(0x118)](_0x28c42f),_0x2c537e=(await this[_0x130852(0xc1)][_0x130852(0x12c)](_0x514273))[_0x130852(0x133)]();if(_0x28e071){const _0x68eaee={'memberId':_0x2c537e,'unitId':_0x514273,'content':_0x3d1e68,'mention':_0x23d29b,'threadId':_0x40e070},_0x525a0d=(await this[_0x130852(0x112)][_0x130852(0xe4)]('/universer-api/comment/unit/'+_0x514273+_0x130852(0xc4),{'body':_0x68eaee}))[_0x130852(0x101)][_0x130852(0xf9)];return{..._0x208c5d,'id':_0x525a0d['replyId'],'dT':c[_0x130852(0xfa)](+_0x525a0d[_0x130852(0x11c)])['format'](_0x130852(0xf0)),'personId':_0x525a0d['userId']};}else{const _0x375d2b={'memberId':_0x2c537e,'unitId':_0x514273,'content':_0x3d1e68,'mention':_0x23d29b},_0x4f0793=await this[_0x130852(0x112)][_0x130852(0xe4)]('/universer-api/comment/unit/'+_0x514273+'/add',{'body':_0x375d2b});return Y(_0x4f0793[_0x130852(0x101)][_0x130852(0xc0)],_0x208c5d);}}async[_0xc4c393(0x11b)](_0x1d2972){const _0x5f438e=_0xc4c393;var _0x182796,_0x5c60f5;const {text:_0x11a5ea,unitId:_0x4f241f}=_0x1d2972,_0x28729b=(_0x5c60f5=(_0x182796=_0x11a5ea['customRanges'])==null?void 0x0:_0x182796[_0x5f438e(0x125)](_0x26e2ba=>_0x26e2ba[_0x5f438e(0xdb)]===c['CustomRangeType']['COMMENT'])[_0x5f438e(0xce)](_0x52f16b=>_0x52f16b[_0x5f438e(0xbe)]))!=null?_0x5c60f5:[],_0x2f24af=JSON[_0x5f438e(0x118)](_0x11a5ea),_0x38c04a=_0x1d2972['threadId'],_0x8dded7=_0x1d2972['id'],_0x366393={'memberId':(await this[_0x5f438e(0xc1)][_0x5f438e(0x12c)](_0x4f241f))['getMemberID'](),'unitId':_0x4f241f,'threadId':_0x38c04a,'mention':_0x28729b,'content':_0x2f24af,'replyId':_0x8dded7},_0x4c90f0=await this[_0x5f438e(0x112)][_0x5f438e(0xe4)](_0x5f438e(0xf4)+_0x4f241f+_0x5f438e(0xe2),{'body':_0x366393});return!_0x4c90f0[_0x5f438e(0x101)][_0x5f438e(0x12d)]||_0x4c90f0[_0x5f438e(0x101)][_0x5f438e(0x12d)]['code']===0x1;}async[_0xc4c393(0x10a)](_0x1269e6){const _0x207e9f=_0xc4c393,{unitId:_0x5ab29b}=_0x1269e6,_0x38e562=_0x1269e6['threadId'],_0x3509cb={'memberId':this[_0x207e9f(0xbd)][_0x207e9f(0x11d)]()[_0x207e9f(0xbb)],'unitId':_0x5ab29b,'threadId':_0x38e562,'solved':_0x1269e6[_0x207e9f(0x102)]?I[_0x207e9f(0x10d)]:I[_0x207e9f(0x107)]},_0x1ee939=await this[_0x207e9f(0x112)][_0x207e9f(0xe4)](_0x207e9f(0xf4)+_0x5ab29b+_0x207e9f(0xbc),{'body':_0x3509cb});return!_0x1ee939[_0x207e9f(0x101)]['error']||_0x1ee939['body'][_0x207e9f(0x12d)]['code']===0x1;}async[_0xc4c393(0xea)](_0x2c86c6,_0x524ee4,_0x5ece2d,_0x4bb7a4){const _0x2bfb65=_0xc4c393,_0x504074={'memberId':(await this[_0x2bfb65(0xc1)][_0x2bfb65(0x12c)](_0x2c86c6))[_0x2bfb65(0x133)](),'threadId':_0x5ece2d,'replyId':_0x4bb7a4,'unitId':_0x2c86c6},_0x2fe6a8=await this['_httpService'][_0x2bfb65(0xe4)](_0x2bfb65(0xf4)+_0x2c86c6+'/delete',{'body':_0x504074});return!_0x2fe6a8['body'][_0x2bfb65(0x12d)]||_0x2fe6a8[_0x2bfb65(0x101)][_0x2bfb65(0x12d)][_0x2bfb65(0x11a)]===0x1;}async[_0xc4c393(0xbf)](_0x38ebf4,_0x315b2e,_0x5e33f6){const _0x491741=_0xc4c393,_0x3e62bc={'unitId':_0x38ebf4,'threadId':_0x5e33f6},_0x2735ac=await this[_0x491741(0x112)][_0x491741(0xe4)]('/universer-api/comment/unit/'+_0x38ebf4+_0x491741(0xca),{'body':_0x3e62bc}),_0x5630ef=_0x5e33f6['map'](_0x15f325=>G(_0x2735ac[_0x491741(0x101)][_0x491741(0xd6)][_0x15f325],_0x38ebf4,_0x315b2e))[_0x491741(0x125)](Boolean);return Object[_0x491741(0x120)](_0x2735ac[_0x491741(0x101)]['users'])[_0x491741(0xcb)](_0x2cb915=>{this['_userService']['addUser'](_0x2cb915);}),_0x5630ef;}['saveCommentToSnapshot'](_0x26d7ad){const _0x473c7d=_0xc4c393;return{'id':_0x26d7ad['id'],'threadId':_0x26d7ad['threadId'],'ref':_0x26d7ad[_0x473c7d(0x12e)]};}};function _0x6404(_0x2f2c71,_0x40ef5b){const _0x4f94d0=_0x4f94();return _0x6404=function(_0x640497,_0x150a60){_0x640497=_0x640497-0xbb;let _0x25564b=_0x4f94d0[_0x640497];return _0x25564b;},_0x6404(_0x2f2c71,_0x40ef5b);}p=x([C(0x0,c[_0xc4c393(0xdc)](P['HTTPService'])),C(0x1,c[_0xc4c393(0xdc)](c['UserManagerService'])),C(0x2,c[_0xc4c393(0xdc)](b[_0xc4c393(0xd4)]))],p);var H=Object[_0xc4c393(0xd7)],J=(_0x1052c6,_0x8fd1f0,_0x2cb2c2,_0x4f84e6)=>{const _0x383fc6=_0xc4c393;for(var _0x1cec16=_0x4f84e6>0x1?void 0x0:_0x4f84e6?H(_0x8fd1f0,_0x2cb2c2):_0x8fd1f0,_0x1ac821=_0x1052c6[_0x383fc6(0xee)]-0x1,_0x459331;_0x1ac821>=0x0;_0x1ac821--)(_0x459331=_0x1052c6[_0x1ac821])&&(_0x1cec16=_0x459331(_0x1cec16)||_0x1cec16);return _0x1cec16;},y=(_0x5c4ad3,_0x47936d)=>(_0x485c89,_0x37d582)=>_0x47936d(_0x485c89,_0x37d582,_0x5c4ad3);let g=class extends c[_0xc4c393(0x132)]{constructor(_0x4b5527,_0x393e8a){const _0x1a8a8f=_0xc4c393;super(),this[_0x1a8a8f(0xe0)]=_0x4b5527,this[_0x1a8a8f(0xef)]=_0x393e8a,this[_0x1a8a8f(0xc5)]();}[_0xc4c393(0xc5)](){const _0x2d5f68=_0xc4c393;this[_0x2d5f68(0xe0)]['dataSource']=this['_threadCommentDataSource'],this[_0x2d5f68(0xe0)][_0x2d5f68(0x121)]=!0x1;}};g=J([y(0x0,M[_0xc4c393(0xfe)]),y(0x1,c[_0xc4c393(0xdc)](p))],g);var F=Object[_0xc4c393(0xd5)],L=Object['getOwnPropertyDescriptor'],Z=(_0x5c8780,_0x1ac2a2,_0x476e94)=>_0x1ac2a2 in _0x5c8780?F(_0x5c8780,_0x1ac2a2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x476e94}):_0x5c8780[_0x1ac2a2]=_0x476e94,W=(_0x589432,_0x76d5b9,_0x2b4a17,_0x4fa77a)=>{const _0x11e460=_0xc4c393;for(var _0x52d011=_0x4fa77a>0x1?void 0x0:_0x4fa77a?L(_0x76d5b9,_0x2b4a17):_0x76d5b9,_0x4f4879=_0x589432[_0x11e460(0xee)]-0x1,_0x561142;_0x4f4879>=0x0;_0x4f4879--)(_0x561142=_0x589432[_0x4f4879])&&(_0x52d011=_0x561142(_0x52d011)||_0x52d011);return _0x52d011;},O=(_0x33f871,_0x561998)=>(_0x3d61a1,_0x9c3475)=>_0x561998(_0x3d61a1,_0x9c3475,_0x33f871),N=(_0x3f5c7a,_0x57eb21,_0x2d70e9)=>Z(_0x3f5c7a,typeof _0x57eb21!=_0xc4c393(0xe9)?_0x57eb21+'':_0x57eb21,_0x2d70e9);exports[_0xc4c393(0x119)]=class extends c[_0xc4c393(0xd8)]{constructor(_0x1982a5=D,_0x4328db,_0x286728){const _0x239658=_0xc4c393;super(),this['_config']=_0x1982a5,this[_0x239658(0x127)]=_0x4328db,this['_configService']=_0x286728;const {..._0x394ef9}=c[_0x239658(0xd0)]({},D,this['_config']);this[_0x239658(0xfc)][_0x239658(0xdf)](q,_0x394ef9);}[_0xc4c393(0x10f)](){const _0x17b6ea=_0xc4c393;[[p],[g],[_]][_0x17b6ea(0xcb)](_0x3da3f9=>{const _0x4361c8=_0x17b6ea;this[_0x4361c8(0x127)][_0x4361c8(0xf7)](_0x3da3f9);});}[_0xc4c393(0xd2)](){const _0x11a948=_0xc4c393;this[_0x11a948(0x127)][_0x11a948(0x114)](g),this[_0x11a948(0x127)][_0x11a948(0x114)](_);}},N(exports[_0xc4c393(0x119)],_0xc4c393(0xe7),U),N(exports[_0xc4c393(0x119)],_0xc4c393(0xd1),c['UniverInstanceType'][_0xc4c393(0x110)]),exports[_0xc4c393(0x119)]=W([c[_0xc4c393(0x10b)](w['UniverThreadCommentUIPlugin'],b[_0xc4c393(0x12b)],T[_0xc4c393(0xd3)]),O(0x1,c[_0xc4c393(0xdc)](c['Injector'])),O(0x2,c[_0xc4c393(0x134)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3f9f96=_0x35bf;(function(_0x2c79a1,_0x26fb1c){const _0x3921f6=_0x35bf,_0x15a4cd=_0x2c79a1();while(!![]){try{const _0x486d8a=parseInt(_0x3921f6(0x12e))/0x1+parseInt(_0x3921f6(0x101))/0x2+-parseInt(_0x3921f6(0x15b))/0x3*(-parseInt(_0x3921f6(0x115))/0x4)+parseInt(_0x3921f6(0x15c))/0x5*(-parseInt(_0x3921f6(0x144))/0x6)+parseInt(_0x3921f6(0x151))/0x7*(parseInt(_0x3921f6(0x100))/0x8)+parseInt(_0x3921f6(0x10a))/0x9*(-parseInt(_0x3921f6(0x163))/0xa)+parseInt(_0x3921f6(0x107))/0xb*(-parseInt(_0x3921f6(0x158))/0xc);if(_0x486d8a===_0x26fb1c)break;else _0x15a4cd['push'](_0x15a4cd['shift']());}catch(_0x128b30){_0x15a4cd['push'](_0x15a4cd['shift']());}}}(_0x4b6f,0x906c5));import{CommentService as _0x1ef5d3,CollaborationSessionService as _0x47a7e9,UniverCollaborationClientPlugin as _0x4f29e8}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2c7508}from'@univerjs-pro/license';import{dayjs as _0x2d795a,UserManagerService as _0xfa36f5,Inject as _0x106498,Injector as _0x6af6db,Disposable as _0x4eb02a,CustomRangeType as _0x131a19,UniverInstanceType as _0x3c5c89,DependentOn as _0x4910a4,IConfigService as _0x451b01,Plugin as _0xa28747,merge as _0x2356f8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e08b1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x575b16,IThreadCommentDataSourceService as _0x437863}from'@univerjs/thread-comment';import{bufferTime as _0x55611a}from'rxjs';import{HTTPService as _0x4158c8}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x327e96=>(_0x327e96[_0x327e96[_0x3f9f96(0x139)]=0x0]=_0x3f9f96(0x139),_0x327e96[_0x327e96[_0x3f9f96(0x124)]=0x1]=_0x3f9f96(0x124),_0x327e96[_0x327e96['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x327e96))(I||{}),v=(_0x4fd123=>(_0x4fd123[_0x4fd123[_0x3f9f96(0x125)]=0x0]=_0x3f9f96(0x125),_0x4fd123[_0x4fd123[_0x3f9f96(0x10e)]=0x1]=_0x3f9f96(0x10e),_0x4fd123[_0x4fd123[_0x3f9f96(0x133)]=0x2]=_0x3f9f96(0x133),_0x4fd123[_0x4fd123[_0x3f9f96(0x14b)]=0x3]=_0x3f9f96(0x14b),_0x4fd123[_0x4fd123['Delete']=0x4]=_0x3f9f96(0x155),_0x4fd123[_0x4fd123[_0x3f9f96(0x108)]=0x5]='Solve',_0x4fd123[_0x4fd123[_0x3f9f96(0x154)]=-0x1]=_0x3f9f96(0x154),_0x4fd123))(v||{});const y=_0x130229=>_0x2d795a(new Date(+_0x130229))[_0x3f9f96(0xfe)](_0x3f9f96(0x143)),B=async(_0x485c11,_0x3d2c24)=>{const _0x20ab77=_0x3f9f96,_0x2dd0fb=_0x485c11['get'](_0xfa36f5),_0x215b63=_0x485c11[_0x20ab77(0x13f)](_0x4158c8);_0x3d2c24[_0x20ab77(0x145)](_0x11817d=>{const _0x589f09=_0x20ab77;_0x2dd0fb[_0x589f09(0x114)](_0x11817d)&&_0x3d2c24[_0x589f09(0x111)](_0x11817d);}),_0x3d2c24['size']&&(await _0x215b63[_0x20ab77(0x13f)](_0x20ab77(0xfb),{'params':{'userIDs':[..._0x3d2c24]}}))[_0x20ab77(0x14f)]['users']['forEach'](_0x1a8394=>{_0x1a8394&&_0x2dd0fb['addUser'](_0x1a8394);});};var K=Object[_0x3f9f96(0x156)],V=(_0xf265f1,_0x39e342,_0x1bca90,_0x11184f)=>{const _0x122c25=_0x3f9f96;for(var _0x2e9922=_0x11184f>0x1?void 0x0:_0x11184f?K(_0x39e342,_0x1bca90):_0x39e342,_0x1db8b7=_0xf265f1[_0x122c25(0x149)]-0x1,_0x4e9818;_0x1db8b7>=0x0;_0x1db8b7--)(_0x4e9818=_0xf265f1[_0x1db8b7])&&(_0x2e9922=_0x4e9818(_0x2e9922)||_0x2e9922);return _0x2e9922;},p=(_0x5697b2,_0x486d58)=>(_0x33209d,_0x5904af)=>_0x486d58(_0x33209d,_0x5904af,_0x5697b2);let _=class extends _0x4eb02a{constructor(_0x571173,_0x1da147,_0x5eb1ca,_0x3807c2){const _0x220135=_0x3f9f96;super(),this[_0x220135(0x13c)]=_0x571173,this[_0x220135(0x129)]=_0x1da147,this['_userService']=_0x5eb1ca,this[_0x220135(0x13e)]=_0x3807c2,this[_0x220135(0x147)](),this['_initUserSync']();}[_0x3f9f96(0x15d)](){const _0x36c140=_0x3f9f96;this['disposeWithMe'](this[_0x36c140(0x129)][_0x36c140(0x12b)][_0x36c140(0x153)](_0x55611a(0x10))['subscribe'](_0x88faff=>{const _0x3a4e96=_0x36c140,_0xeff9f5=new Set();_0x88faff[_0x3a4e96(0x145)](_0x366578=>{const _0x1794d5=_0x3a4e96;switch(_0x366578[_0x1794d5(0x110)]){case _0x1794d5(0x12f):{const _0x422f14=_0x366578[_0x1794d5(0x141)][_0x1794d5(0x11a)];_0xeff9f5['add'](_0x422f14);break;}}}),B(this[_0x3a4e96(0x13e)],_0xeff9f5);}));}[_0x3f9f96(0x147)](){const _0x393365=_0x3f9f96;this[_0x393365(0x116)](this['_commentService']['commentUpdate$'][_0x393365(0x103)](async _0x17e56c=>{const _0x4b208e=_0x393365;var _0x34a7c2,_0x594bb9,_0x332337,_0x52bfad;const _0x692bbe=(_0x34a7c2=this[_0x4b208e(0x129)][_0x4b208e(0x123)](_0x17e56c[_0x4b208e(0x132)])[_0x4b208e(0x131)](_0x292047=>_0x292047['threadId']===_0x17e56c[_0x4b208e(0x10f)]))==null?void 0x0:_0x34a7c2[_0x4b208e(0x104)];if(!_0x692bbe)return;const {unitId:_0x6e28a9,subUnitId:_0x5d8741}=_0x692bbe;switch(_0x17e56c[_0x4b208e(0x135)]&&this[_0x4b208e(0x162)][_0x4b208e(0xfc)](_0x17e56c[_0x4b208e(0x135)]),_0x17e56c[_0x4b208e(0x110)]){case v[_0x4b208e(0x10e)]:break;case v[_0x4b208e(0x133)]:{this[_0x4b208e(0x129)][_0x4b208e(0x148)](_0x6e28a9,_0x5d8741,{'unitId':_0x6e28a9,'subUnitId':_0x5d8741,'ref':'','id':_0x17e56c[_0x4b208e(0x12a)],'dT':y(+_0x17e56c[_0x4b208e(0x13d)]),'threadId':_0x17e56c[_0x4b208e(0x10f)],'personId':(_0x332337=(_0x594bb9=_0x17e56c[_0x4b208e(0x135)])==null?void 0x0:_0x594bb9[_0x4b208e(0x15e)])!=null?_0x332337:_0x17e56c[_0x4b208e(0x137)],'text':JSON[_0x4b208e(0x14a)](_0x17e56c['content']),'parentId':_0x692bbe['id']});break;}case v[_0x4b208e(0x155)]:{const _0x24a3dd=this[_0x4b208e(0x129)][_0x4b208e(0x13a)](_0x6e28a9,_0x5d8741,_0x17e56c[_0x4b208e(0x12a)]);_0x24a3dd&&_0x24a3dd[_0x4b208e(0x11f)]&&this[_0x4b208e(0x129)][_0x4b208e(0x126)](_0x6e28a9,_0x5d8741,_0x17e56c[_0x4b208e(0x12a)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x4b208e(0x120)](_0x6e28a9,_0x5d8741,{'commentId':_0x17e56c['replyId'],'text':JSON[_0x4b208e(0x14a)](_0x17e56c[_0x4b208e(0xff)])});break;}case v[_0x4b208e(0x108)]:{const _0x35fba2=(_0x52bfad=this[_0x4b208e(0x129)]['getUnit'](_0x17e56c['unitId'])[_0x4b208e(0x131)](_0x34b7cd=>_0x34b7cd[_0x4b208e(0x10f)]===_0x17e56c['threadId']))==null?void 0x0:_0x52bfad['root'];_0x35fba2&&this[_0x4b208e(0x129)]['resolveComment'](_0x6e28a9,_0x5d8741,_0x35fba2['id'],_0x17e56c[_0x4b208e(0x160)]===I[_0x4b208e(0x124)]);break;}}}));}};_=V([p(0x0,_0x106498(_0x1ef5d3)),p(0x1,_0x106498(_0x575b16)),p(0x2,_0x106498(_0xfa36f5)),p(0x3,_0x106498(_0x6af6db))],_);const z=_0x3f9f96(0x127),O={};function _0x35bf(_0x519cf0,_0x3aaeb3){const _0x4b6fa7=_0x4b6f();return _0x35bf=function(_0x35bfc9,_0x10ee73){_0x35bfc9=_0x35bfc9-0xfb;let _0x1bdde5=_0x4b6fa7[_0x35bfc9];return _0x1bdde5;},_0x35bf(_0x519cf0,_0x3aaeb3);}var k=Object[_0x3f9f96(0x156)],Q=(_0x4f0afe,_0x478101,_0x11aa72,_0x2a7ff8)=>{for(var _0x5f1415=_0x2a7ff8>0x1?void 0x0:_0x2a7ff8?k(_0x478101,_0x11aa72):_0x478101,_0x4f5d51=_0x4f0afe['length']-0x1,_0x5d35ec;_0x4f5d51>=0x0;_0x4f5d51--)(_0x5d35ec=_0x4f0afe[_0x4f5d51])&&(_0x5f1415=_0x5d35ec(_0x5f1415)||_0x5f1415);return _0x5f1415;},b=(_0x604f68,_0x17af1b)=>(_0x305b1a,_0xad1443)=>_0x17af1b(_0x305b1a,_0xad1443,_0x604f68);function X(_0x4aff59,_0x2bb473){const _0x430678=_0x3f9f96,_0x323ed7=_0x4aff59[_0x430678(0x138)][0x0];return{..._0x2bb473,'id':_0x323ed7[_0x430678(0x12a)],'resolved':_0x4aff59['solved']===0x1,'dT':y(_0x323ed7['createTimestamp']),'personId':_0x323ed7[_0x430678(0x137)],'threadId':_0x323ed7[_0x430678(0x10f)]};}function ee(_0x1a14f2,_0x270291,_0x222bb6){const _0x84ff88=_0x3f9f96;var _0x3a354e,_0x51a195;if(((_0x51a195=(_0x3a354e=_0x1a14f2==null?void 0x0:_0x1a14f2['replies'])==null?void 0x0:_0x3a354e[_0x84ff88(0x149)])!=null?_0x51a195:0x0)>0x0){const _0x21fe27=(_0x5761ac,_0x4e313d)=>({'id':_0x5761ac[_0x84ff88(0x12a)],'threadId':_0x5761ac[_0x84ff88(0x10f)],'dT':y(_0x5761ac['createTimestamp']),'personId':_0x5761ac[_0x84ff88(0x137)],'resolved':_0x1a14f2[_0x84ff88(0x160)]===I[_0x84ff88(0x124)],'unitId':_0x270291,'subUnitId':_0x222bb6,'text':JSON[_0x84ff88(0x14a)](_0x5761ac[_0x84ff88(0xff)]),'parentId':_0x4e313d}),_0xc2c5b8=_0x21fe27(_0x1a14f2[_0x84ff88(0x138)][0x0]);return{..._0xc2c5b8,'children':_0x1a14f2[_0x84ff88(0x138)]['slice'](0x1)[_0x84ff88(0x157)](_0x177817=>_0x21fe27(_0x177817,_0xc2c5b8['id']))};}return null;}let S=class{constructor(_0x120c89,_0x3f9b7b,_0x54df27){const _0x416dfd=_0x3f9f96;this['_httpService']=_0x120c89,this[_0x416dfd(0x162)]=_0x3f9b7b,this[_0x416dfd(0x14c)]=_0x54df27;}async['addComment'](_0x2b887a){const _0x5c41d6=_0x3f9f96;var _0x1f0f75,_0x573e74;const {parentId:_0x466186,unitId:_0x20b29f,text:_0x52db9e,threadId:_0x512bd6}=_0x2b887a,_0x2bb83e=(_0x573e74=(_0x1f0f75=_0x52db9e[_0x5c41d6(0x15a)])==null?void 0x0:_0x1f0f75[_0x5c41d6(0x10d)](_0x18ad90=>_0x18ad90[_0x5c41d6(0x12d)]===_0x131a19['COMMENT'])['map'](_0x252ce4=>_0x252ce4['rangeId']))!=null?_0x573e74:[],_0x311710=JSON['stringify'](_0x52db9e),_0x1404e6=(await this[_0x5c41d6(0x14c)]['requireSession'](_0x20b29f))[_0x5c41d6(0xfd)]();if(_0x466186){const _0x2a5aa2={'memberId':_0x1404e6,'unitId':_0x20b29f,'content':_0x311710,'mention':_0x2bb83e,'threadId':_0x512bd6},_0x206387=(await this['_httpService'][_0x5c41d6(0x159)](_0x5c41d6(0x112)+_0x20b29f+_0x5c41d6(0x146),{'body':_0x2a5aa2}))[_0x5c41d6(0x14f)][_0x5c41d6(0x11c)];return{..._0x2b887a,'id':_0x206387[_0x5c41d6(0x12a)],'dT':_0x2d795a(+_0x206387[_0x5c41d6(0x13d)])[_0x5c41d6(0xfe)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x206387[_0x5c41d6(0x137)]};}else{const _0x55e077={'memberId':_0x1404e6,'unitId':_0x20b29f,'content':_0x311710,'mention':_0x2bb83e},_0xffd0f1=await this[_0x5c41d6(0x12c)][_0x5c41d6(0x159)](_0x5c41d6(0x112)+_0x20b29f+_0x5c41d6(0x14e),{'body':_0x55e077});return X(_0xffd0f1[_0x5c41d6(0x14f)][_0x5c41d6(0x119)],_0x2b887a);}}async[_0x3f9f96(0x120)](_0x4d7588){const _0x4f6402=_0x3f9f96;var _0x2ee8cb,_0x3d5109;const {text:_0x8861fa,unitId:_0x47bd2e}=_0x4d7588,_0x14648d=(_0x3d5109=(_0x2ee8cb=_0x8861fa[_0x4f6402(0x15a)])==null?void 0x0:_0x2ee8cb[_0x4f6402(0x10d)](_0xaf7ab0=>_0xaf7ab0['rangeType']===_0x131a19[_0x4f6402(0x130)])[_0x4f6402(0x157)](_0x4855e9=>_0x4855e9[_0x4f6402(0x152)]))!=null?_0x3d5109:[],_0x1640d1=JSON[_0x4f6402(0x140)](_0x8861fa),_0x59f3df=_0x4d7588[_0x4f6402(0x10f)],_0x1de97b=_0x4d7588['id'],_0x257fd5={'memberId':(await this[_0x4f6402(0x14c)]['requireSession'](_0x47bd2e))[_0x4f6402(0xfd)](),'unitId':_0x47bd2e,'threadId':_0x59f3df,'mention':_0x14648d,'content':_0x1640d1,'replyId':_0x1de97b},_0x29dd12=await this[_0x4f6402(0x12c)][_0x4f6402(0x159)](_0x4f6402(0x112)+_0x47bd2e+_0x4f6402(0x15f),{'body':_0x257fd5});return!_0x29dd12['body'][_0x4f6402(0x109)]||_0x29dd12[_0x4f6402(0x14f)]['error']['code']===0x1;}async[_0x3f9f96(0x10c)](_0x4a2e34){const _0x2b3cc6=_0x3f9f96,{unitId:_0x1ad85f}=_0x4a2e34,_0x1ed428=_0x4a2e34[_0x2b3cc6(0x10f)],_0x266974={'memberId':this['_userService']['getCurrentUser']()[_0x2b3cc6(0x15e)],'unitId':_0x1ad85f,'threadId':_0x1ed428,'solved':_0x4a2e34[_0x2b3cc6(0x10b)]?I[_0x2b3cc6(0x124)]:I[_0x2b3cc6(0x139)]},_0x443f8c=await this[_0x2b3cc6(0x12c)][_0x2b3cc6(0x159)](_0x2b3cc6(0x112)+_0x1ad85f+_0x2b3cc6(0x118),{'body':_0x266974});return!_0x443f8c[_0x2b3cc6(0x14f)][_0x2b3cc6(0x109)]||_0x443f8c[_0x2b3cc6(0x14f)][_0x2b3cc6(0x109)][_0x2b3cc6(0x105)]===0x1;}async['deleteComment'](_0x942dc7,_0x497d65,_0x491ad3,_0x584d23){const _0x2dbb32=_0x3f9f96,_0x2ee9ab={'memberId':(await this[_0x2dbb32(0x14c)][_0x2dbb32(0x117)](_0x942dc7))['getMemberID'](),'threadId':_0x491ad3,'replyId':_0x584d23,'unitId':_0x942dc7},_0x383688=await this[_0x2dbb32(0x12c)][_0x2dbb32(0x159)](_0x2dbb32(0x112)+_0x942dc7+'/delete',{'body':_0x2ee9ab});return!_0x383688[_0x2dbb32(0x14f)]['error']||_0x383688[_0x2dbb32(0x14f)][_0x2dbb32(0x109)][_0x2dbb32(0x105)]===0x1;}async[_0x3f9f96(0x150)](_0x5f188c,_0x4739ec,_0x2094eb){const _0x2d5a8d=_0x3f9f96,_0x3db022={'unitId':_0x5f188c,'threadId':_0x2094eb},_0x5aa689=await this[_0x2d5a8d(0x12c)][_0x2d5a8d(0x159)](_0x2d5a8d(0x112)+_0x5f188c+'/list',{'body':_0x3db022}),_0x2ad918=_0x2094eb[_0x2d5a8d(0x157)](_0x3beb70=>ee(_0x5aa689[_0x2d5a8d(0x14f)][_0x2d5a8d(0x142)][_0x3beb70],_0x5f188c,_0x4739ec))[_0x2d5a8d(0x10d)](Boolean);return Object[_0x2d5a8d(0x11b)](_0x5aa689[_0x2d5a8d(0x14f)][_0x2d5a8d(0x106)])['forEach'](_0x1e05eb=>{const _0x10e2ab=_0x2d5a8d;this[_0x10e2ab(0x162)][_0x10e2ab(0xfc)](_0x1e05eb);}),_0x2ad918;}['saveCommentToSnapshot'](_0x1e9932){const _0x22fe60=_0x3f9f96;return{'id':_0x1e9932['id'],'threadId':_0x1e9932[_0x22fe60(0x10f)],'ref':_0x1e9932[_0x22fe60(0x134)]};}};S=Q([b(0x0,_0x106498(_0x4158c8)),b(0x1,_0x106498(_0xfa36f5)),b(0x2,_0x106498(_0x47a7e9))],S);var re=Object[_0x3f9f96(0x156)],te=(_0x4f2066,_0x45df4d,_0x2dd190,_0x133929)=>{const _0x16c0db=_0x3f9f96;for(var _0x59424c=_0x133929>0x1?void 0x0:_0x133929?re(_0x45df4d,_0x2dd190):_0x45df4d,_0x11e328=_0x4f2066[_0x16c0db(0x149)]-0x1,_0x35f23d;_0x11e328>=0x0;_0x11e328--)(_0x35f23d=_0x4f2066[_0x11e328])&&(_0x59424c=_0x35f23d(_0x59424c)||_0x59424c);return _0x59424c;},M=(_0x7c4f2a,_0x424246)=>(_0x2fe2ca,_0x3e5092)=>_0x424246(_0x2fe2ca,_0x3e5092,_0x7c4f2a);function _0x4b6f(){const _0x167859=['resolved','resolveComment','filter','Add','threadId','type','delete','/universer-api/comment/unit/','syncUpdateMutationToColla','getUser','4xmyNkg','disposeWithMe','requireSession','/solved','comment','personId','values','reply','UNIVER_UNKNOWN','onStarting','parentId','updateComment','_threadCommentDataSourceService','_config','getUnit','Solved','Unknown','deleteComment','thread-comment-data-source.config','defineProperty','_threadCommentModel','replyId','commentUpdate$','_httpService','rangeType','1103273hKNkqS','add','COMMENT','find','unitId','Reply','ref','user','_threadCommentDataSource','userId','replies','OpenOrReOpen','getComment','_configService','_commentService','createTimestamp','_injector','get','stringify','payload','comments','YYYY/MM/DD\x20HH:mm','866688vLLiYS','forEach','/reply','_init','addComment','length','parse','Edit','_sessionService','setConfig','/add','body','listComments','26383MgJYkS','rangeId','pipe','UNRECOGNIZED','Delete','getOwnPropertyDescriptor','map','756kRnsdI','post','customRanges','1833099dKnhOF','15NFgOtZ','_initUserSync','userID','/edit','solved','dataSource','_userService','300aiwELH','/universer-api/user/list','addUser','getMemberID','format','content','2248KSAOPb','1627780EYmikn','_initDataSource','subscribe','root','code','users','356378PLzKKa','Solve','error','156393hdCxpz'];_0x4b6f=function(){return _0x167859;};return _0x4b6f();}let f=class extends _0x4eb02a{constructor(_0x543b9c,_0x4585b9){const _0x11dd97=_0x3f9f96;super(),this[_0x11dd97(0x121)]=_0x543b9c,this['_threadCommentDataSource']=_0x4585b9,this['_initDataSource']();}[_0x3f9f96(0x102)](){const _0x572ae6=_0x3f9f96;this[_0x572ae6(0x121)][_0x572ae6(0x161)]=this[_0x572ae6(0x136)],this[_0x572ae6(0x121)][_0x572ae6(0x113)]=!0x1;}};f=te([M(0x0,_0x437863),M(0x1,_0x106498(S))],f);var se=Object[_0x3f9f96(0x128)],oe=Object[_0x3f9f96(0x156)],ne=(_0x1dad90,_0x625bd5,_0x786d3a)=>_0x625bd5 in _0x1dad90?se(_0x1dad90,_0x625bd5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x786d3a}):_0x1dad90[_0x625bd5]=_0x786d3a,ie=(_0x3d3db7,_0x57b2d4,_0x49df4b,_0x381f46)=>{for(var _0x1adcb6=_0x381f46>0x1?void 0x0:_0x381f46?oe(_0x57b2d4,_0x49df4b):_0x57b2d4,_0xc46f1=_0x3d3db7['length']-0x1,_0x1c0e29;_0xc46f1>=0x0;_0xc46f1--)(_0x1c0e29=_0x3d3db7[_0xc46f1])&&(_0x1adcb6=_0x1c0e29(_0x1adcb6)||_0x1adcb6);return _0x1adcb6;},N=(_0x405ea8,_0x245d32)=>(_0x4dfe64,_0x903518)=>_0x245d32(_0x4dfe64,_0x903518,_0x405ea8),$=(_0x314c4f,_0x3eedd5,_0x401af9)=>ne(_0x314c4f,typeof _0x3eedd5!='symbol'?_0x3eedd5+'':_0x3eedd5,_0x401af9);let g=class extends _0xa28747{constructor(_0x3eaea6=O,_0x58454d,_0x288dfe){const _0x43837d=_0x3f9f96;super(),this[_0x43837d(0x122)]=_0x3eaea6,this['_injector']=_0x58454d,this[_0x43837d(0x13b)]=_0x288dfe;const {..._0x152b24}=_0x2356f8({},O,this['_config']);this[_0x43837d(0x13b)][_0x43837d(0x14d)](z,_0x152b24);}[_0x3f9f96(0x11e)](){const _0x182246=_0x3f9f96;[[S],[f],[_]][_0x182246(0x145)](_0x26e1ec=>{const _0x27b561=_0x182246;this['_injector'][_0x27b561(0x12f)](_0x26e1ec);});}['onReady'](){const _0x1b22ff=_0x3f9f96;this[_0x1b22ff(0x13e)][_0x1b22ff(0x13f)](f),this[_0x1b22ff(0x13e)][_0x1b22ff(0x13f)](_);}};$(g,'pluginName',W),$(g,_0x3f9f96(0x110),_0x3c5c89[_0x3f9f96(0x11d)]),g=ie([_0x4910a4(_0x5e08b1,_0x4f29e8,_0x2c7508),N(0x1,_0x106498(_0x6af6db)),N(0x2,_0x451b01)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3fdbf4=_0x591c;function _0xa937(){const _0x30f2e5=['threadId','map','_httpService','unitId','post','dataSource','_commentService','UNIVER_UNKNOWN','createTimestamp','_threadCommentDataSource','get','getUnit','Reply','Solve','error','user','getCurrentUser','/edit','onStarting','replyId','3563436dYhEFt','getOwnPropertyDescriptor','_userService','2039568XZDXOq','getUser','_configService','thread-comment-data-source.config','addUser','payload','reply','resolved','/list','_initDataSource','UNRECOGNIZED','slice','values','/universer-api/comment/unit/','348376wPiOyN','code','pipe','/delete','Add','find','content','symbol','stringify','type','users','getMemberID','Edit','2183979qABWSI','YYYY/MM/DD\x20HH:mm','COMMENT','getComment','length','_threadCommentModel','saveCommentToSnapshot','listComments','OpenOrReOpen','_threadCommentDataSourceService','personId','rangeId','userId','updateComment','body','_config','onReady','solved','_initUserSync','Solved','disposeWithMe','userID','343534LsSYIh','requireSession','commentUpdate$','root','subscribe','_injector','35691430nmpayH','replies','addComment','/solved','deleteComment','add','syncUpdateMutationToColla','size','filter','parse','_sessionService','15nGUoNd','resolveComment','1141572KKqdFo','81ITEKpz','_init','/reply','parentId','4DwvbVZ','rangeType','format','forEach','Unknown','customRanges','/universer-api/user/list'];_0xa937=function(){return _0x30f2e5;};return _0xa937();}(function(_0x376a1e,_0x1bd829){const _0x538fd3=_0x591c,_0x2a33ae=_0x376a1e();while(!![]){try{const _0x4dc41e=-parseInt(_0x538fd3(0x1d6))/0x1*(parseInt(_0x538fd3(0x1be))/0x2)+-parseInt(_0x538fd3(0x1f4))/0x3+-parseInt(_0x538fd3(0x1f1))/0x4+parseInt(_0x538fd3(0x1cf))/0x5*(-parseInt(_0x538fd3(0x1d1))/0x6)+-parseInt(_0x538fd3(0x20f))/0x7+parseInt(_0x538fd3(0x202))/0x8*(parseInt(_0x538fd3(0x1d2))/0x9)+parseInt(_0x538fd3(0x1c4))/0xa;if(_0x4dc41e===_0x1bd829)break;else _0x2a33ae['push'](_0x2a33ae['shift']());}catch(_0x2d45c4){_0x2a33ae['push'](_0x2a33ae['shift']());}}}(_0xa937,0xc8514));import{CommentService as _0x423886,CollaborationSessionService as _0x584824,UniverCollaborationClientPlugin as _0x59a7bd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x12f89e}from'@univerjs-pro/license';import{dayjs as _0x499dcf,UserManagerService as _0x491003,Inject as _0x4a8915,Injector as _0x5f5a29,Disposable as _0x29773c,CustomRangeType as _0x3b6502,UniverInstanceType as _0x92db82,DependentOn as _0x5c6104,IConfigService as _0x30e542,Plugin as _0x17e99d,merge as _0x27e97d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x33e2b4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3ba925,IThreadCommentDataSourceService as _0x11a2cb}from'@univerjs/thread-comment';import{bufferTime as _0x77704c}from'rxjs';import{HTTPService as _0x392871}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xedb8ec=>(_0xedb8ec[_0xedb8ec['OpenOrReOpen']=0x0]=_0x3fdbf4(0x1b0),_0xedb8ec[_0xedb8ec['Solved']=0x1]=_0x3fdbf4(0x1bb),_0xedb8ec[_0xedb8ec[_0x3fdbf4(0x1fe)]=-0x1]=_0x3fdbf4(0x1fe),_0xedb8ec))(I||{}),v=(_0x2da46f=>(_0x2da46f[_0x2da46f[_0x3fdbf4(0x1da)]=0x0]='Unknown',_0x2da46f[_0x2da46f[_0x3fdbf4(0x206)]=0x1]=_0x3fdbf4(0x206),_0x2da46f[_0x2da46f['Reply']=0x2]=_0x3fdbf4(0x1e9),_0x2da46f[_0x2da46f['Edit']=0x3]='Edit',_0x2da46f[_0x2da46f['Delete']=0x4]='Delete',_0x2da46f[_0x2da46f[_0x3fdbf4(0x1ea)]=0x5]=_0x3fdbf4(0x1ea),_0x2da46f[_0x2da46f[_0x3fdbf4(0x1fe)]=-0x1]=_0x3fdbf4(0x1fe),_0x2da46f))(v||{});const y=_0x4a4aba=>_0x499dcf(new Date(+_0x4a4aba))[_0x3fdbf4(0x1d8)](_0x3fdbf4(0x210)),B=async(_0x270e33,_0x585956)=>{const _0x2330ff=_0x3fdbf4,_0x22e1e2=_0x270e33[_0x2330ff(0x1e7)](_0x491003),_0x59985a=_0x270e33[_0x2330ff(0x1e7)](_0x392871);_0x585956[_0x2330ff(0x1d9)](_0x287544=>{const _0x4087c1=_0x2330ff;_0x22e1e2[_0x4087c1(0x1f5)](_0x287544)&&_0x585956['delete'](_0x287544);}),_0x585956[_0x2330ff(0x1cb)]&&(await _0x59985a['get'](_0x2330ff(0x1dc),{'params':{'userIDs':[..._0x585956]}}))[_0x2330ff(0x1b6)][_0x2330ff(0x20c)][_0x2330ff(0x1d9)](_0x5cdf46=>{const _0x70c017=_0x2330ff;_0x5cdf46&&_0x22e1e2[_0x70c017(0x1f8)](_0x5cdf46);});};var K=Object[_0x3fdbf4(0x1f2)],V=(_0x590513,_0x8db757,_0x2a4132,_0x2c6906)=>{const _0x579c61=_0x3fdbf4;for(var _0xb00ce5=_0x2c6906>0x1?void 0x0:_0x2c6906?K(_0x8db757,_0x2a4132):_0x8db757,_0x210a04=_0x590513[_0x579c61(0x1ac)]-0x1,_0x354ba8;_0x210a04>=0x0;_0x210a04--)(_0x354ba8=_0x590513[_0x210a04])&&(_0xb00ce5=_0x354ba8(_0xb00ce5)||_0xb00ce5);return _0xb00ce5;},p=(_0xed501d,_0x4466a2)=>(_0x18fb04,_0xef34e)=>_0x4466a2(_0x18fb04,_0xef34e,_0xed501d);let _=class extends _0x29773c{constructor(_0x16e2b0,_0x2778e4,_0x383585,_0x13d08a){const _0xfc7bfe=_0x3fdbf4;super(),this[_0xfc7bfe(0x1e3)]=_0x16e2b0,this[_0xfc7bfe(0x1ad)]=_0x2778e4,this['_userService']=_0x383585,this['_injector']=_0x13d08a,this[_0xfc7bfe(0x1d3)](),this[_0xfc7bfe(0x1ba)]();}[_0x3fdbf4(0x1ba)](){const _0x23a1e0=_0x3fdbf4;this[_0x23a1e0(0x1bc)](this['_threadCommentModel'][_0x23a1e0(0x1c0)][_0x23a1e0(0x204)](_0x77704c(0x10))[_0x23a1e0(0x1c2)](_0x4f9d26=>{const _0x6eab14=_0x23a1e0,_0x3c8e9f=new Set();_0x4f9d26[_0x6eab14(0x1d9)](_0x58d36f=>{const _0x5bbffd=_0x6eab14;switch(_0x58d36f[_0x5bbffd(0x20b)]){case _0x5bbffd(0x1c9):{const _0x1fb314=_0x58d36f[_0x5bbffd(0x1f9)][_0x5bbffd(0x1b2)];_0x3c8e9f[_0x5bbffd(0x1c9)](_0x1fb314);break;}}}),B(this[_0x6eab14(0x1c3)],_0x3c8e9f);}));}[_0x3fdbf4(0x1d3)](){const _0x46de1e=_0x3fdbf4;this[_0x46de1e(0x1bc)](this[_0x46de1e(0x1e3)]['commentUpdate$']['subscribe'](async _0x41a645=>{const _0x1dd613=_0x46de1e;var _0x254a25,_0x150430,_0x4e591c,_0x51a832;const _0x4b88f2=(_0x254a25=this[_0x1dd613(0x1ad)][_0x1dd613(0x1e8)](_0x41a645[_0x1dd613(0x1e0)])[_0x1dd613(0x207)](_0x4615e8=>_0x4615e8['threadId']===_0x41a645[_0x1dd613(0x1dd)]))==null?void 0x0:_0x254a25[_0x1dd613(0x1c1)];if(!_0x4b88f2)return;const {unitId:_0x4e34e0,subUnitId:_0x2107b6}=_0x4b88f2;switch(_0x41a645[_0x1dd613(0x1ec)]&&this[_0x1dd613(0x1f3)]['addUser'](_0x41a645['user']),_0x41a645['type']){case v['Add']:break;case v[_0x1dd613(0x1e9)]:{this[_0x1dd613(0x1ad)]['addComment'](_0x4e34e0,_0x2107b6,{'unitId':_0x4e34e0,'subUnitId':_0x2107b6,'ref':'','id':_0x41a645['replyId'],'dT':y(+_0x41a645[_0x1dd613(0x1e5)]),'threadId':_0x41a645[_0x1dd613(0x1dd)],'personId':(_0x4e591c=(_0x150430=_0x41a645[_0x1dd613(0x1ec)])==null?void 0x0:_0x150430[_0x1dd613(0x1bd)])!=null?_0x4e591c:_0x41a645['userId'],'text':JSON[_0x1dd613(0x1cd)](_0x41a645[_0x1dd613(0x208)]),'parentId':_0x4b88f2['id']});break;}case v['Delete']:{const _0x15d821=this[_0x1dd613(0x1ad)][_0x1dd613(0x1ab)](_0x4e34e0,_0x2107b6,_0x41a645[_0x1dd613(0x1f0)]);_0x15d821&&_0x15d821[_0x1dd613(0x1d5)]&&this[_0x1dd613(0x1ad)][_0x1dd613(0x1c8)](_0x4e34e0,_0x2107b6,_0x41a645[_0x1dd613(0x1f0)]);break;}case v[_0x1dd613(0x20e)]:{this['_threadCommentModel']['updateComment'](_0x4e34e0,_0x2107b6,{'commentId':_0x41a645[_0x1dd613(0x1f0)],'text':JSON['parse'](_0x41a645['content'])});break;}case v['Solve']:{const _0x2732cc=(_0x51a832=this[_0x1dd613(0x1ad)][_0x1dd613(0x1e8)](_0x41a645[_0x1dd613(0x1e0)])[_0x1dd613(0x207)](_0x5643c2=>_0x5643c2[_0x1dd613(0x1dd)]===_0x41a645['threadId']))==null?void 0x0:_0x51a832[_0x1dd613(0x1c1)];_0x2732cc&&this['_threadCommentModel'][_0x1dd613(0x1d0)](_0x4e34e0,_0x2107b6,_0x2732cc['id'],_0x41a645[_0x1dd613(0x1b9)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4a8915(_0x423886)),p(0x1,_0x4a8915(_0x3ba925)),p(0x2,_0x4a8915(_0x491003)),p(0x3,_0x4a8915(_0x5f5a29))],_);const z=_0x3fdbf4(0x1f7),O={};var k=Object[_0x3fdbf4(0x1f2)],Q=(_0x30aa55,_0x5340aa,_0x12f267,_0x54e750)=>{const _0x41bcfb=_0x3fdbf4;for(var _0x2e5f9c=_0x54e750>0x1?void 0x0:_0x54e750?k(_0x5340aa,_0x12f267):_0x5340aa,_0x529dc2=_0x30aa55[_0x41bcfb(0x1ac)]-0x1,_0x1e04ec;_0x529dc2>=0x0;_0x529dc2--)(_0x1e04ec=_0x30aa55[_0x529dc2])&&(_0x2e5f9c=_0x1e04ec(_0x2e5f9c)||_0x2e5f9c);return _0x2e5f9c;},b=(_0x986ed5,_0x2b2591)=>(_0x1e4ddc,_0xdaf155)=>_0x2b2591(_0x1e4ddc,_0xdaf155,_0x986ed5);function X(_0x28420a,_0x54218a){const _0x5c0154=_0x3fdbf4,_0x581ce3=_0x28420a[_0x5c0154(0x1c5)][0x0];return{..._0x54218a,'id':_0x581ce3[_0x5c0154(0x1f0)],'resolved':_0x28420a[_0x5c0154(0x1b9)]===0x1,'dT':y(_0x581ce3['createTimestamp']),'personId':_0x581ce3[_0x5c0154(0x1b4)],'threadId':_0x581ce3['threadId']};}function ee(_0x19b9e0,_0x3eefcf,_0x54e5fd){const _0x18a8c4=_0x3fdbf4;var _0x7a71fc,_0x4425e3;if(((_0x4425e3=(_0x7a71fc=_0x19b9e0==null?void 0x0:_0x19b9e0[_0x18a8c4(0x1c5)])==null?void 0x0:_0x7a71fc[_0x18a8c4(0x1ac)])!=null?_0x4425e3:0x0)>0x0){const _0xf46f5e=(_0x502c18,_0x3976e8)=>({'id':_0x502c18[_0x18a8c4(0x1f0)],'threadId':_0x502c18[_0x18a8c4(0x1dd)],'dT':y(_0x502c18[_0x18a8c4(0x1e5)]),'personId':_0x502c18['userId'],'resolved':_0x19b9e0[_0x18a8c4(0x1b9)]===I['Solved'],'unitId':_0x3eefcf,'subUnitId':_0x54e5fd,'text':JSON[_0x18a8c4(0x1cd)](_0x502c18[_0x18a8c4(0x208)]),'parentId':_0x3976e8}),_0x2a469d=_0xf46f5e(_0x19b9e0[_0x18a8c4(0x1c5)][0x0]);return{..._0x2a469d,'children':_0x19b9e0['replies'][_0x18a8c4(0x1ff)](0x1)[_0x18a8c4(0x1de)](_0x3c2945=>_0xf46f5e(_0x3c2945,_0x2a469d['id']))};}return null;}function _0x591c(_0x2200a4,_0x1ec02f){const _0xa93747=_0xa937();return _0x591c=function(_0x591c8e,_0x55fcfc){_0x591c8e=_0x591c8e-0x1ab;let _0x2f0868=_0xa93747[_0x591c8e];return _0x2f0868;},_0x591c(_0x2200a4,_0x1ec02f);}let S=class{constructor(_0x5b7197,_0x31737f,_0x2f84b3){const _0xe71de9=_0x3fdbf4;this[_0xe71de9(0x1df)]=_0x5b7197,this[_0xe71de9(0x1f3)]=_0x31737f,this['_sessionService']=_0x2f84b3;}async[_0x3fdbf4(0x1c6)](_0x2fb20a){const _0x26bc96=_0x3fdbf4;var _0x47724b,_0x503b30;const {parentId:_0x110232,unitId:_0x3a5d1,text:_0x41b667,threadId:_0x1fa69}=_0x2fb20a,_0x4a3b00=(_0x503b30=(_0x47724b=_0x41b667[_0x26bc96(0x1db)])==null?void 0x0:_0x47724b['filter'](_0x20d9ea=>_0x20d9ea[_0x26bc96(0x1d7)]===_0x3b6502[_0x26bc96(0x211)])['map'](_0x2e3083=>_0x2e3083['rangeId']))!=null?_0x503b30:[],_0x3d2953=JSON[_0x26bc96(0x20a)](_0x41b667),_0x5b361c=(await this[_0x26bc96(0x1ce)][_0x26bc96(0x1bf)](_0x3a5d1))[_0x26bc96(0x20d)]();if(_0x110232){const _0x52942d={'memberId':_0x5b361c,'unitId':_0x3a5d1,'content':_0x3d2953,'mention':_0x4a3b00,'threadId':_0x1fa69},_0x552faa=(await this[_0x26bc96(0x1df)][_0x26bc96(0x1e1)]('/universer-api/comment/unit/'+_0x3a5d1+_0x26bc96(0x1d4),{'body':_0x52942d}))[_0x26bc96(0x1b6)][_0x26bc96(0x1fa)];return{..._0x2fb20a,'id':_0x552faa[_0x26bc96(0x1f0)],'dT':_0x499dcf(+_0x552faa[_0x26bc96(0x1e5)])[_0x26bc96(0x1d8)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x552faa[_0x26bc96(0x1b4)]};}else{const _0x21a244={'memberId':_0x5b361c,'unitId':_0x3a5d1,'content':_0x3d2953,'mention':_0x4a3b00},_0x3af97b=await this['_httpService'][_0x26bc96(0x1e1)](_0x26bc96(0x201)+_0x3a5d1+'/add',{'body':_0x21a244});return X(_0x3af97b[_0x26bc96(0x1b6)]['comment'],_0x2fb20a);}}async[_0x3fdbf4(0x1b5)](_0x2d6455){const _0x4a4aae=_0x3fdbf4;var _0x3242c2,_0x19adf7;const {text:_0x465de1,unitId:_0x562774}=_0x2d6455,_0x4ea753=(_0x19adf7=(_0x3242c2=_0x465de1[_0x4a4aae(0x1db)])==null?void 0x0:_0x3242c2[_0x4a4aae(0x1cc)](_0xf57f7=>_0xf57f7[_0x4a4aae(0x1d7)]===_0x3b6502[_0x4a4aae(0x211)])['map'](_0x1333ed=>_0x1333ed[_0x4a4aae(0x1b3)]))!=null?_0x19adf7:[],_0x20f3d2=JSON['stringify'](_0x465de1),_0x209613=_0x2d6455[_0x4a4aae(0x1dd)],_0x30f44c=_0x2d6455['id'],_0x4a979c={'memberId':(await this[_0x4a4aae(0x1ce)]['requireSession'](_0x562774))[_0x4a4aae(0x20d)](),'unitId':_0x562774,'threadId':_0x209613,'mention':_0x4ea753,'content':_0x20f3d2,'replyId':_0x30f44c},_0x14e57d=await this[_0x4a4aae(0x1df)][_0x4a4aae(0x1e1)](_0x4a4aae(0x201)+_0x562774+_0x4a4aae(0x1ee),{'body':_0x4a979c});return!_0x14e57d[_0x4a4aae(0x1b6)]['error']||_0x14e57d[_0x4a4aae(0x1b6)][_0x4a4aae(0x1eb)][_0x4a4aae(0x203)]===0x1;}async['resolveComment'](_0x19d26e){const _0x572f93=_0x3fdbf4,{unitId:_0x139aeb}=_0x19d26e,_0x241675=_0x19d26e[_0x572f93(0x1dd)],_0x1379db={'memberId':this[_0x572f93(0x1f3)][_0x572f93(0x1ed)]()[_0x572f93(0x1bd)],'unitId':_0x139aeb,'threadId':_0x241675,'solved':_0x19d26e[_0x572f93(0x1fb)]?I[_0x572f93(0x1bb)]:I['OpenOrReOpen']},_0x26c54a=await this[_0x572f93(0x1df)][_0x572f93(0x1e1)](_0x572f93(0x201)+_0x139aeb+_0x572f93(0x1c7),{'body':_0x1379db});return!_0x26c54a[_0x572f93(0x1b6)]['error']||_0x26c54a[_0x572f93(0x1b6)][_0x572f93(0x1eb)][_0x572f93(0x203)]===0x1;}async[_0x3fdbf4(0x1c8)](_0x139342,_0x29d3f5,_0xc6c70c,_0x46898b){const _0x512d24=_0x3fdbf4,_0x28bb64={'memberId':(await this['_sessionService']['requireSession'](_0x139342))[_0x512d24(0x20d)](),'threadId':_0xc6c70c,'replyId':_0x46898b,'unitId':_0x139342},_0x4488a0=await this[_0x512d24(0x1df)][_0x512d24(0x1e1)](_0x512d24(0x201)+_0x139342+_0x512d24(0x205),{'body':_0x28bb64});return!_0x4488a0[_0x512d24(0x1b6)][_0x512d24(0x1eb)]||_0x4488a0[_0x512d24(0x1b6)]['error'][_0x512d24(0x203)]===0x1;}async[_0x3fdbf4(0x1af)](_0x28710f,_0x5ad1ee,_0x1db4a5){const _0x3e80dd=_0x3fdbf4,_0x567f4b={'unitId':_0x28710f,'threadId':_0x1db4a5},_0x41ccb4=await this[_0x3e80dd(0x1df)][_0x3e80dd(0x1e1)](_0x3e80dd(0x201)+_0x28710f+_0x3e80dd(0x1fc),{'body':_0x567f4b}),_0x123a72=_0x1db4a5[_0x3e80dd(0x1de)](_0xbbf441=>ee(_0x41ccb4['body']['comments'][_0xbbf441],_0x28710f,_0x5ad1ee))[_0x3e80dd(0x1cc)](Boolean);return Object[_0x3e80dd(0x200)](_0x41ccb4[_0x3e80dd(0x1b6)][_0x3e80dd(0x20c)])[_0x3e80dd(0x1d9)](_0x2d8783=>{const _0x2acd51=_0x3e80dd;this[_0x2acd51(0x1f3)]['addUser'](_0x2d8783);}),_0x123a72;}[_0x3fdbf4(0x1ae)](_0x173d9c){const _0x3e1679=_0x3fdbf4;return{'id':_0x173d9c['id'],'threadId':_0x173d9c[_0x3e1679(0x1dd)],'ref':_0x173d9c['ref']};}};S=Q([b(0x0,_0x4a8915(_0x392871)),b(0x1,_0x4a8915(_0x491003)),b(0x2,_0x4a8915(_0x584824))],S);var re=Object[_0x3fdbf4(0x1f2)],te=(_0x453eb6,_0x52bcf7,_0x255927,_0x35e85d)=>{const _0x134588=_0x3fdbf4;for(var _0x441d5e=_0x35e85d>0x1?void 0x0:_0x35e85d?re(_0x52bcf7,_0x255927):_0x52bcf7,_0x39e132=_0x453eb6[_0x134588(0x1ac)]-0x1,_0x3191e2;_0x39e132>=0x0;_0x39e132--)(_0x3191e2=_0x453eb6[_0x39e132])&&(_0x441d5e=_0x3191e2(_0x441d5e)||_0x441d5e);return _0x441d5e;},M=(_0x32086a,_0x37c50c)=>(_0x36d05c,_0x592e9c)=>_0x37c50c(_0x36d05c,_0x592e9c,_0x32086a);let f=class extends _0x29773c{constructor(_0x2c1b0d,_0x26b1e0){const _0x20de65=_0x3fdbf4;super(),this[_0x20de65(0x1b1)]=_0x2c1b0d,this[_0x20de65(0x1e6)]=_0x26b1e0,this[_0x20de65(0x1fd)]();}['_initDataSource'](){const _0x1f87e6=_0x3fdbf4;this[_0x1f87e6(0x1b1)][_0x1f87e6(0x1e2)]=this['_threadCommentDataSource'],this[_0x1f87e6(0x1b1)][_0x1f87e6(0x1ca)]=!0x1;}};f=te([M(0x0,_0x11a2cb),M(0x1,_0x4a8915(S))],f);var se=Object['defineProperty'],oe=Object[_0x3fdbf4(0x1f2)],ne=(_0x4d966d,_0x32313a,_0x5abf6f)=>_0x32313a in _0x4d966d?se(_0x4d966d,_0x32313a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5abf6f}):_0x4d966d[_0x32313a]=_0x5abf6f,ie=(_0x58792d,_0x5cf664,_0x42c451,_0x3dfeae)=>{const _0x34b711=_0x3fdbf4;for(var _0x5f2182=_0x3dfeae>0x1?void 0x0:_0x3dfeae?oe(_0x5cf664,_0x42c451):_0x5cf664,_0x1d4458=_0x58792d[_0x34b711(0x1ac)]-0x1,_0x5bcbac;_0x1d4458>=0x0;_0x1d4458--)(_0x5bcbac=_0x58792d[_0x1d4458])&&(_0x5f2182=_0x5bcbac(_0x5f2182)||_0x5f2182);return _0x5f2182;},N=(_0x5f3fd7,_0x40dbce)=>(_0x18d94b,_0x5529fd)=>_0x40dbce(_0x18d94b,_0x5529fd,_0x5f3fd7),$=(_0x46cf7f,_0x33ab18,_0x5a9a20)=>ne(_0x46cf7f,typeof _0x33ab18!=_0x3fdbf4(0x209)?_0x33ab18+'':_0x33ab18,_0x5a9a20);let g=class extends _0x17e99d{constructor(_0x1290d6=O,_0x4d0760,_0x2d05b3){const _0x417e39=_0x3fdbf4;super(),this[_0x417e39(0x1b7)]=_0x1290d6,this[_0x417e39(0x1c3)]=_0x4d0760,this[_0x417e39(0x1f6)]=_0x2d05b3;const {..._0x355247}=_0x27e97d({},O,this[_0x417e39(0x1b7)]);this[_0x417e39(0x1f6)]['setConfig'](z,_0x355247);}[_0x3fdbf4(0x1ef)](){[[S],[f],[_]]['forEach'](_0x30029e=>{const _0x2cb28e=_0x591c;this['_injector'][_0x2cb28e(0x1c9)](_0x30029e);});}[_0x3fdbf4(0x1b8)](){const _0x32d5dc=_0x3fdbf4;this[_0x32d5dc(0x1c3)][_0x32d5dc(0x1e7)](f),this[_0x32d5dc(0x1c3)][_0x32d5dc(0x1e7)](_);}};$(g,'pluginName',W),$(g,_0x3fdbf4(0x20b),_0x92db82[_0x3fdbf4(0x1e4)]),g=ie([_0x5c6104(_0x33e2b4,_0x59a7bd,_0x12f89e),N(0x1,_0x4a8915(_0x5f5a29)),N(0x2,_0x30e542)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3f9f96=_0x35bf;(function(_0x2c79a1,_0x26fb1c){const _0x3921f6=_0x35bf,_0x15a4cd=_0x2c79a1();while(!![]){try{const _0x486d8a=parseInt(_0x3921f6(0x12e))/0x1+parseInt(_0x3921f6(0x101))/0x2+-parseInt(_0x3921f6(0x15b))/0x3*(-parseInt(_0x3921f6(0x115))/0x4)+parseInt(_0x3921f6(0x15c))/0x5*(-parseInt(_0x3921f6(0x144))/0x6)+parseInt(_0x3921f6(0x151))/0x7*(parseInt(_0x3921f6(0x100))/0x8)+parseInt(_0x3921f6(0x10a))/0x9*(-parseInt(_0x3921f6(0x163))/0xa)+parseInt(_0x3921f6(0x107))/0xb*(-parseInt(_0x3921f6(0x158))/0xc);if(_0x486d8a===_0x26fb1c)break;else _0x15a4cd['push'](_0x15a4cd['shift']());}catch(_0x128b30){_0x15a4cd['push'](_0x15a4cd['shift']());}}}(_0x4b6f,0x906c5));import{CommentService as _0x1ef5d3,CollaborationSessionService as _0x47a7e9,UniverCollaborationClientPlugin as _0x4f29e8}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2c7508}from'@univerjs-pro/license';import{dayjs as _0x2d795a,UserManagerService as _0xfa36f5,Inject as _0x106498,Injector as _0x6af6db,Disposable as _0x4eb02a,CustomRangeType as _0x131a19,UniverInstanceType as _0x3c5c89,DependentOn as _0x4910a4,IConfigService as _0x451b01,Plugin as _0xa28747,merge as _0x2356f8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e08b1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x575b16,IThreadCommentDataSourceService as _0x437863}from'@univerjs/thread-comment';import{bufferTime as _0x55611a}from'rxjs';import{HTTPService as _0x4158c8}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x327e96=>(_0x327e96[_0x327e96[_0x3f9f96(0x139)]=0x0]=_0x3f9f96(0x139),_0x327e96[_0x327e96[_0x3f9f96(0x124)]=0x1]=_0x3f9f96(0x124),_0x327e96[_0x327e96['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x327e96))(I||{}),v=(_0x4fd123=>(_0x4fd123[_0x4fd123[_0x3f9f96(0x125)]=0x0]=_0x3f9f96(0x125),_0x4fd123[_0x4fd123[_0x3f9f96(0x10e)]=0x1]=_0x3f9f96(0x10e),_0x4fd123[_0x4fd123[_0x3f9f96(0x133)]=0x2]=_0x3f9f96(0x133),_0x4fd123[_0x4fd123[_0x3f9f96(0x14b)]=0x3]=_0x3f9f96(0x14b),_0x4fd123[_0x4fd123['Delete']=0x4]=_0x3f9f96(0x155),_0x4fd123[_0x4fd123[_0x3f9f96(0x108)]=0x5]='Solve',_0x4fd123[_0x4fd123[_0x3f9f96(0x154)]=-0x1]=_0x3f9f96(0x154),_0x4fd123))(v||{});const y=_0x130229=>_0x2d795a(new Date(+_0x130229))[_0x3f9f96(0xfe)](_0x3f9f96(0x143)),B=async(_0x485c11,_0x3d2c24)=>{const _0x20ab77=_0x3f9f96,_0x2dd0fb=_0x485c11['get'](_0xfa36f5),_0x215b63=_0x485c11[_0x20ab77(0x13f)](_0x4158c8);_0x3d2c24[_0x20ab77(0x145)](_0x11817d=>{const _0x589f09=_0x20ab77;_0x2dd0fb[_0x589f09(0x114)](_0x11817d)&&_0x3d2c24[_0x589f09(0x111)](_0x11817d);}),_0x3d2c24['size']&&(await _0x215b63[_0x20ab77(0x13f)](_0x20ab77(0xfb),{'params':{'userIDs':[..._0x3d2c24]}}))[_0x20ab77(0x14f)]['users']['forEach'](_0x1a8394=>{_0x1a8394&&_0x2dd0fb['addUser'](_0x1a8394);});};var K=Object[_0x3f9f96(0x156)],V=(_0xf265f1,_0x39e342,_0x1bca90,_0x11184f)=>{const _0x122c25=_0x3f9f96;for(var _0x2e9922=_0x11184f>0x1?void 0x0:_0x11184f?K(_0x39e342,_0x1bca90):_0x39e342,_0x1db8b7=_0xf265f1[_0x122c25(0x149)]-0x1,_0x4e9818;_0x1db8b7>=0x0;_0x1db8b7--)(_0x4e9818=_0xf265f1[_0x1db8b7])&&(_0x2e9922=_0x4e9818(_0x2e9922)||_0x2e9922);return _0x2e9922;},p=(_0x5697b2,_0x486d58)=>(_0x33209d,_0x5904af)=>_0x486d58(_0x33209d,_0x5904af,_0x5697b2);let _=class extends _0x4eb02a{constructor(_0x571173,_0x1da147,_0x5eb1ca,_0x3807c2){const _0x220135=_0x3f9f96;super(),this[_0x220135(0x13c)]=_0x571173,this[_0x220135(0x129)]=_0x1da147,this['_userService']=_0x5eb1ca,this[_0x220135(0x13e)]=_0x3807c2,this[_0x220135(0x147)](),this['_initUserSync']();}[_0x3f9f96(0x15d)](){const _0x36c140=_0x3f9f96;this['disposeWithMe'](this[_0x36c140(0x129)][_0x36c140(0x12b)][_0x36c140(0x153)](_0x55611a(0x10))['subscribe'](_0x88faff=>{const _0x3a4e96=_0x36c140,_0xeff9f5=new Set();_0x88faff[_0x3a4e96(0x145)](_0x366578=>{const _0x1794d5=_0x3a4e96;switch(_0x366578[_0x1794d5(0x110)]){case _0x1794d5(0x12f):{const _0x422f14=_0x366578[_0x1794d5(0x141)][_0x1794d5(0x11a)];_0xeff9f5['add'](_0x422f14);break;}}}),B(this[_0x3a4e96(0x13e)],_0xeff9f5);}));}[_0x3f9f96(0x147)](){const _0x393365=_0x3f9f96;this[_0x393365(0x116)](this['_commentService']['commentUpdate$'][_0x393365(0x103)](async _0x17e56c=>{const _0x4b208e=_0x393365;var _0x34a7c2,_0x594bb9,_0x332337,_0x52bfad;const _0x692bbe=(_0x34a7c2=this[_0x4b208e(0x129)][_0x4b208e(0x123)](_0x17e56c[_0x4b208e(0x132)])[_0x4b208e(0x131)](_0x292047=>_0x292047['threadId']===_0x17e56c[_0x4b208e(0x10f)]))==null?void 0x0:_0x34a7c2[_0x4b208e(0x104)];if(!_0x692bbe)return;const {unitId:_0x6e28a9,subUnitId:_0x5d8741}=_0x692bbe;switch(_0x17e56c[_0x4b208e(0x135)]&&this[_0x4b208e(0x162)][_0x4b208e(0xfc)](_0x17e56c[_0x4b208e(0x135)]),_0x17e56c[_0x4b208e(0x110)]){case v[_0x4b208e(0x10e)]:break;case v[_0x4b208e(0x133)]:{this[_0x4b208e(0x129)][_0x4b208e(0x148)](_0x6e28a9,_0x5d8741,{'unitId':_0x6e28a9,'subUnitId':_0x5d8741,'ref':'','id':_0x17e56c[_0x4b208e(0x12a)],'dT':y(+_0x17e56c[_0x4b208e(0x13d)]),'threadId':_0x17e56c[_0x4b208e(0x10f)],'personId':(_0x332337=(_0x594bb9=_0x17e56c[_0x4b208e(0x135)])==null?void 0x0:_0x594bb9[_0x4b208e(0x15e)])!=null?_0x332337:_0x17e56c[_0x4b208e(0x137)],'text':JSON[_0x4b208e(0x14a)](_0x17e56c['content']),'parentId':_0x692bbe['id']});break;}case v[_0x4b208e(0x155)]:{const _0x24a3dd=this[_0x4b208e(0x129)][_0x4b208e(0x13a)](_0x6e28a9,_0x5d8741,_0x17e56c[_0x4b208e(0x12a)]);_0x24a3dd&&_0x24a3dd[_0x4b208e(0x11f)]&&this[_0x4b208e(0x129)][_0x4b208e(0x126)](_0x6e28a9,_0x5d8741,_0x17e56c[_0x4b208e(0x12a)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x4b208e(0x120)](_0x6e28a9,_0x5d8741,{'commentId':_0x17e56c['replyId'],'text':JSON[_0x4b208e(0x14a)](_0x17e56c[_0x4b208e(0xff)])});break;}case v[_0x4b208e(0x108)]:{const _0x35fba2=(_0x52bfad=this[_0x4b208e(0x129)]['getUnit'](_0x17e56c['unitId'])[_0x4b208e(0x131)](_0x34b7cd=>_0x34b7cd[_0x4b208e(0x10f)]===_0x17e56c['threadId']))==null?void 0x0:_0x52bfad['root'];_0x35fba2&&this[_0x4b208e(0x129)]['resolveComment'](_0x6e28a9,_0x5d8741,_0x35fba2['id'],_0x17e56c[_0x4b208e(0x160)]===I[_0x4b208e(0x124)]);break;}}}));}};_=V([p(0x0,_0x106498(_0x1ef5d3)),p(0x1,_0x106498(_0x575b16)),p(0x2,_0x106498(_0xfa36f5)),p(0x3,_0x106498(_0x6af6db))],_);const z=_0x3f9f96(0x127),O={};function _0x35bf(_0x519cf0,_0x3aaeb3){const _0x4b6fa7=_0x4b6f();return _0x35bf=function(_0x35bfc9,_0x10ee73){_0x35bfc9=_0x35bfc9-0xfb;let _0x1bdde5=_0x4b6fa7[_0x35bfc9];return _0x1bdde5;},_0x35bf(_0x519cf0,_0x3aaeb3);}var k=Object[_0x3f9f96(0x156)],Q=(_0x4f0afe,_0x478101,_0x11aa72,_0x2a7ff8)=>{for(var _0x5f1415=_0x2a7ff8>0x1?void 0x0:_0x2a7ff8?k(_0x478101,_0x11aa72):_0x478101,_0x4f5d51=_0x4f0afe['length']-0x1,_0x5d35ec;_0x4f5d51>=0x0;_0x4f5d51--)(_0x5d35ec=_0x4f0afe[_0x4f5d51])&&(_0x5f1415=_0x5d35ec(_0x5f1415)||_0x5f1415);return _0x5f1415;},b=(_0x604f68,_0x17af1b)=>(_0x305b1a,_0xad1443)=>_0x17af1b(_0x305b1a,_0xad1443,_0x604f68);function X(_0x4aff59,_0x2bb473){const _0x430678=_0x3f9f96,_0x323ed7=_0x4aff59[_0x430678(0x138)][0x0];return{..._0x2bb473,'id':_0x323ed7[_0x430678(0x12a)],'resolved':_0x4aff59['solved']===0x1,'dT':y(_0x323ed7['createTimestamp']),'personId':_0x323ed7[_0x430678(0x137)],'threadId':_0x323ed7[_0x430678(0x10f)]};}function ee(_0x1a14f2,_0x270291,_0x222bb6){const _0x84ff88=_0x3f9f96;var _0x3a354e,_0x51a195;if(((_0x51a195=(_0x3a354e=_0x1a14f2==null?void 0x0:_0x1a14f2['replies'])==null?void 0x0:_0x3a354e[_0x84ff88(0x149)])!=null?_0x51a195:0x0)>0x0){const _0x21fe27=(_0x5761ac,_0x4e313d)=>({'id':_0x5761ac[_0x84ff88(0x12a)],'threadId':_0x5761ac[_0x84ff88(0x10f)],'dT':y(_0x5761ac['createTimestamp']),'personId':_0x5761ac[_0x84ff88(0x137)],'resolved':_0x1a14f2[_0x84ff88(0x160)]===I[_0x84ff88(0x124)],'unitId':_0x270291,'subUnitId':_0x222bb6,'text':JSON[_0x84ff88(0x14a)](_0x5761ac[_0x84ff88(0xff)]),'parentId':_0x4e313d}),_0xc2c5b8=_0x21fe27(_0x1a14f2[_0x84ff88(0x138)][0x0]);return{..._0xc2c5b8,'children':_0x1a14f2[_0x84ff88(0x138)]['slice'](0x1)[_0x84ff88(0x157)](_0x177817=>_0x21fe27(_0x177817,_0xc2c5b8['id']))};}return null;}let S=class{constructor(_0x120c89,_0x3f9b7b,_0x54df27){const _0x416dfd=_0x3f9f96;this['_httpService']=_0x120c89,this[_0x416dfd(0x162)]=_0x3f9b7b,this[_0x416dfd(0x14c)]=_0x54df27;}async['addComment'](_0x2b887a){const _0x5c41d6=_0x3f9f96;var _0x1f0f75,_0x573e74;const {parentId:_0x466186,unitId:_0x20b29f,text:_0x52db9e,threadId:_0x512bd6}=_0x2b887a,_0x2bb83e=(_0x573e74=(_0x1f0f75=_0x52db9e[_0x5c41d6(0x15a)])==null?void 0x0:_0x1f0f75[_0x5c41d6(0x10d)](_0x18ad90=>_0x18ad90[_0x5c41d6(0x12d)]===_0x131a19['COMMENT'])['map'](_0x252ce4=>_0x252ce4['rangeId']))!=null?_0x573e74:[],_0x311710=JSON['stringify'](_0x52db9e),_0x1404e6=(await this[_0x5c41d6(0x14c)]['requireSession'](_0x20b29f))[_0x5c41d6(0xfd)]();if(_0x466186){const _0x2a5aa2={'memberId':_0x1404e6,'unitId':_0x20b29f,'content':_0x311710,'mention':_0x2bb83e,'threadId':_0x512bd6},_0x206387=(await this['_httpService'][_0x5c41d6(0x159)](_0x5c41d6(0x112)+_0x20b29f+_0x5c41d6(0x146),{'body':_0x2a5aa2}))[_0x5c41d6(0x14f)][_0x5c41d6(0x11c)];return{..._0x2b887a,'id':_0x206387[_0x5c41d6(0x12a)],'dT':_0x2d795a(+_0x206387[_0x5c41d6(0x13d)])[_0x5c41d6(0xfe)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x206387[_0x5c41d6(0x137)]};}else{const _0x55e077={'memberId':_0x1404e6,'unitId':_0x20b29f,'content':_0x311710,'mention':_0x2bb83e},_0xffd0f1=await this[_0x5c41d6(0x12c)][_0x5c41d6(0x159)](_0x5c41d6(0x112)+_0x20b29f+_0x5c41d6(0x14e),{'body':_0x55e077});return X(_0xffd0f1[_0x5c41d6(0x14f)][_0x5c41d6(0x119)],_0x2b887a);}}async[_0x3f9f96(0x120)](_0x4d7588){const _0x4f6402=_0x3f9f96;var _0x2ee8cb,_0x3d5109;const {text:_0x8861fa,unitId:_0x47bd2e}=_0x4d7588,_0x14648d=(_0x3d5109=(_0x2ee8cb=_0x8861fa[_0x4f6402(0x15a)])==null?void 0x0:_0x2ee8cb[_0x4f6402(0x10d)](_0xaf7ab0=>_0xaf7ab0['rangeType']===_0x131a19[_0x4f6402(0x130)])[_0x4f6402(0x157)](_0x4855e9=>_0x4855e9[_0x4f6402(0x152)]))!=null?_0x3d5109:[],_0x1640d1=JSON[_0x4f6402(0x140)](_0x8861fa),_0x59f3df=_0x4d7588[_0x4f6402(0x10f)],_0x1de97b=_0x4d7588['id'],_0x257fd5={'memberId':(await this[_0x4f6402(0x14c)]['requireSession'](_0x47bd2e))[_0x4f6402(0xfd)](),'unitId':_0x47bd2e,'threadId':_0x59f3df,'mention':_0x14648d,'content':_0x1640d1,'replyId':_0x1de97b},_0x29dd12=await this[_0x4f6402(0x12c)][_0x4f6402(0x159)](_0x4f6402(0x112)+_0x47bd2e+_0x4f6402(0x15f),{'body':_0x257fd5});return!_0x29dd12['body'][_0x4f6402(0x109)]||_0x29dd12[_0x4f6402(0x14f)]['error']['code']===0x1;}async[_0x3f9f96(0x10c)](_0x4a2e34){const _0x2b3cc6=_0x3f9f96,{unitId:_0x1ad85f}=_0x4a2e34,_0x1ed428=_0x4a2e34[_0x2b3cc6(0x10f)],_0x266974={'memberId':this['_userService']['getCurrentUser']()[_0x2b3cc6(0x15e)],'unitId':_0x1ad85f,'threadId':_0x1ed428,'solved':_0x4a2e34[_0x2b3cc6(0x10b)]?I[_0x2b3cc6(0x124)]:I[_0x2b3cc6(0x139)]},_0x443f8c=await this[_0x2b3cc6(0x12c)][_0x2b3cc6(0x159)](_0x2b3cc6(0x112)+_0x1ad85f+_0x2b3cc6(0x118),{'body':_0x266974});return!_0x443f8c[_0x2b3cc6(0x14f)][_0x2b3cc6(0x109)]||_0x443f8c[_0x2b3cc6(0x14f)][_0x2b3cc6(0x109)][_0x2b3cc6(0x105)]===0x1;}async['deleteComment'](_0x942dc7,_0x497d65,_0x491ad3,_0x584d23){const _0x2dbb32=_0x3f9f96,_0x2ee9ab={'memberId':(await this[_0x2dbb32(0x14c)][_0x2dbb32(0x117)](_0x942dc7))['getMemberID'](),'threadId':_0x491ad3,'replyId':_0x584d23,'unitId':_0x942dc7},_0x383688=await this[_0x2dbb32(0x12c)][_0x2dbb32(0x159)](_0x2dbb32(0x112)+_0x942dc7+'/delete',{'body':_0x2ee9ab});return!_0x383688[_0x2dbb32(0x14f)]['error']||_0x383688[_0x2dbb32(0x14f)][_0x2dbb32(0x109)][_0x2dbb32(0x105)]===0x1;}async[_0x3f9f96(0x150)](_0x5f188c,_0x4739ec,_0x2094eb){const _0x2d5a8d=_0x3f9f96,_0x3db022={'unitId':_0x5f188c,'threadId':_0x2094eb},_0x5aa689=await this[_0x2d5a8d(0x12c)][_0x2d5a8d(0x159)](_0x2d5a8d(0x112)+_0x5f188c+'/list',{'body':_0x3db022}),_0x2ad918=_0x2094eb[_0x2d5a8d(0x157)](_0x3beb70=>ee(_0x5aa689[_0x2d5a8d(0x14f)][_0x2d5a8d(0x142)][_0x3beb70],_0x5f188c,_0x4739ec))[_0x2d5a8d(0x10d)](Boolean);return Object[_0x2d5a8d(0x11b)](_0x5aa689[_0x2d5a8d(0x14f)][_0x2d5a8d(0x106)])['forEach'](_0x1e05eb=>{const _0x10e2ab=_0x2d5a8d;this[_0x10e2ab(0x162)][_0x10e2ab(0xfc)](_0x1e05eb);}),_0x2ad918;}['saveCommentToSnapshot'](_0x1e9932){const _0x22fe60=_0x3f9f96;return{'id':_0x1e9932['id'],'threadId':_0x1e9932[_0x22fe60(0x10f)],'ref':_0x1e9932[_0x22fe60(0x134)]};}};S=Q([b(0x0,_0x106498(_0x4158c8)),b(0x1,_0x106498(_0xfa36f5)),b(0x2,_0x106498(_0x47a7e9))],S);var re=Object[_0x3f9f96(0x156)],te=(_0x4f2066,_0x45df4d,_0x2dd190,_0x133929)=>{const _0x16c0db=_0x3f9f96;for(var _0x59424c=_0x133929>0x1?void 0x0:_0x133929?re(_0x45df4d,_0x2dd190):_0x45df4d,_0x11e328=_0x4f2066[_0x16c0db(0x149)]-0x1,_0x35f23d;_0x11e328>=0x0;_0x11e328--)(_0x35f23d=_0x4f2066[_0x11e328])&&(_0x59424c=_0x35f23d(_0x59424c)||_0x59424c);return _0x59424c;},M=(_0x7c4f2a,_0x424246)=>(_0x2fe2ca,_0x3e5092)=>_0x424246(_0x2fe2ca,_0x3e5092,_0x7c4f2a);function _0x4b6f(){const _0x167859=['resolved','resolveComment','filter','Add','threadId','type','delete','/universer-api/comment/unit/','syncUpdateMutationToColla','getUser','4xmyNkg','disposeWithMe','requireSession','/solved','comment','personId','values','reply','UNIVER_UNKNOWN','onStarting','parentId','updateComment','_threadCommentDataSourceService','_config','getUnit','Solved','Unknown','deleteComment','thread-comment-data-source.config','defineProperty','_threadCommentModel','replyId','commentUpdate$','_httpService','rangeType','1103273hKNkqS','add','COMMENT','find','unitId','Reply','ref','user','_threadCommentDataSource','userId','replies','OpenOrReOpen','getComment','_configService','_commentService','createTimestamp','_injector','get','stringify','payload','comments','YYYY/MM/DD\x20HH:mm','866688vLLiYS','forEach','/reply','_init','addComment','length','parse','Edit','_sessionService','setConfig','/add','body','listComments','26383MgJYkS','rangeId','pipe','UNRECOGNIZED','Delete','getOwnPropertyDescriptor','map','756kRnsdI','post','customRanges','1833099dKnhOF','15NFgOtZ','_initUserSync','userID','/edit','solved','dataSource','_userService','300aiwELH','/universer-api/user/list','addUser','getMemberID','format','content','2248KSAOPb','1627780EYmikn','_initDataSource','subscribe','root','code','users','356378PLzKKa','Solve','error','156393hdCxpz'];_0x4b6f=function(){return _0x167859;};return _0x4b6f();}let f=class extends _0x4eb02a{constructor(_0x543b9c,_0x4585b9){const _0x11dd97=_0x3f9f96;super(),this[_0x11dd97(0x121)]=_0x543b9c,this['_threadCommentDataSource']=_0x4585b9,this['_initDataSource']();}[_0x3f9f96(0x102)](){const _0x572ae6=_0x3f9f96;this[_0x572ae6(0x121)][_0x572ae6(0x161)]=this[_0x572ae6(0x136)],this[_0x572ae6(0x121)][_0x572ae6(0x113)]=!0x1;}};f=te([M(0x0,_0x437863),M(0x1,_0x106498(S))],f);var se=Object[_0x3f9f96(0x128)],oe=Object[_0x3f9f96(0x156)],ne=(_0x1dad90,_0x625bd5,_0x786d3a)=>_0x625bd5 in _0x1dad90?se(_0x1dad90,_0x625bd5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x786d3a}):_0x1dad90[_0x625bd5]=_0x786d3a,ie=(_0x3d3db7,_0x57b2d4,_0x49df4b,_0x381f46)=>{for(var _0x1adcb6=_0x381f46>0x1?void 0x0:_0x381f46?oe(_0x57b2d4,_0x49df4b):_0x57b2d4,_0xc46f1=_0x3d3db7['length']-0x1,_0x1c0e29;_0xc46f1>=0x0;_0xc46f1--)(_0x1c0e29=_0x3d3db7[_0xc46f1])&&(_0x1adcb6=_0x1c0e29(_0x1adcb6)||_0x1adcb6);return _0x1adcb6;},N=(_0x405ea8,_0x245d32)=>(_0x4dfe64,_0x903518)=>_0x245d32(_0x4dfe64,_0x903518,_0x405ea8),$=(_0x314c4f,_0x3eedd5,_0x401af9)=>ne(_0x314c4f,typeof _0x3eedd5!='symbol'?_0x3eedd5+'':_0x3eedd5,_0x401af9);let g=class extends _0xa28747{constructor(_0x3eaea6=O,_0x58454d,_0x288dfe){const _0x43837d=_0x3f9f96;super(),this[_0x43837d(0x122)]=_0x3eaea6,this['_injector']=_0x58454d,this[_0x43837d(0x13b)]=_0x288dfe;const {..._0x152b24}=_0x2356f8({},O,this['_config']);this[_0x43837d(0x13b)][_0x43837d(0x14d)](z,_0x152b24);}[_0x3f9f96(0x11e)](){const _0x182246=_0x3f9f96;[[S],[f],[_]][_0x182246(0x145)](_0x26e1ec=>{const _0x27b561=_0x182246;this['_injector'][_0x27b561(0x12f)](_0x26e1ec);});}['onReady'](){const _0x1b22ff=_0x3f9f96;this[_0x1b22ff(0x13e)][_0x1b22ff(0x13f)](f),this[_0x1b22ff(0x13e)][_0x1b22ff(0x13f)](_);}};$(g,'pluginName',W),$(g,_0x3f9f96(0x110),_0x3c5c89[_0x3f9f96(0x11d)]),g=ie([_0x4910a4(_0x5e08b1,_0x4f29e8,_0x2c7508),N(0x1,_0x106498(_0x6af6db)),N(0x2,_0x451b01)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3fdbf4=_0x591c;function _0xa937(){const _0x30f2e5=['threadId','map','_httpService','unitId','post','dataSource','_commentService','UNIVER_UNKNOWN','createTimestamp','_threadCommentDataSource','get','getUnit','Reply','Solve','error','user','getCurrentUser','/edit','onStarting','replyId','3563436dYhEFt','getOwnPropertyDescriptor','_userService','2039568XZDXOq','getUser','_configService','thread-comment-data-source.config','addUser','payload','reply','resolved','/list','_initDataSource','UNRECOGNIZED','slice','values','/universer-api/comment/unit/','348376wPiOyN','code','pipe','/delete','Add','find','content','symbol','stringify','type','users','getMemberID','Edit','2183979qABWSI','YYYY/MM/DD\x20HH:mm','COMMENT','getComment','length','_threadCommentModel','saveCommentToSnapshot','listComments','OpenOrReOpen','_threadCommentDataSourceService','personId','rangeId','userId','updateComment','body','_config','onReady','solved','_initUserSync','Solved','disposeWithMe','userID','343534LsSYIh','requireSession','commentUpdate$','root','subscribe','_injector','35691430nmpayH','replies','addComment','/solved','deleteComment','add','syncUpdateMutationToColla','size','filter','parse','_sessionService','15nGUoNd','resolveComment','1141572KKqdFo','81ITEKpz','_init','/reply','parentId','4DwvbVZ','rangeType','format','forEach','Unknown','customRanges','/universer-api/user/list'];_0xa937=function(){return _0x30f2e5;};return _0xa937();}(function(_0x376a1e,_0x1bd829){const _0x538fd3=_0x591c,_0x2a33ae=_0x376a1e();while(!![]){try{const _0x4dc41e=-parseInt(_0x538fd3(0x1d6))/0x1*(parseInt(_0x538fd3(0x1be))/0x2)+-parseInt(_0x538fd3(0x1f4))/0x3+-parseInt(_0x538fd3(0x1f1))/0x4+parseInt(_0x538fd3(0x1cf))/0x5*(-parseInt(_0x538fd3(0x1d1))/0x6)+-parseInt(_0x538fd3(0x20f))/0x7+parseInt(_0x538fd3(0x202))/0x8*(parseInt(_0x538fd3(0x1d2))/0x9)+parseInt(_0x538fd3(0x1c4))/0xa;if(_0x4dc41e===_0x1bd829)break;else _0x2a33ae['push'](_0x2a33ae['shift']());}catch(_0x2d45c4){_0x2a33ae['push'](_0x2a33ae['shift']());}}}(_0xa937,0xc8514));import{CommentService as _0x423886,CollaborationSessionService as _0x584824,UniverCollaborationClientPlugin as _0x59a7bd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x12f89e}from'@univerjs-pro/license';import{dayjs as _0x499dcf,UserManagerService as _0x491003,Inject as _0x4a8915,Injector as _0x5f5a29,Disposable as _0x29773c,CustomRangeType as _0x3b6502,UniverInstanceType as _0x92db82,DependentOn as _0x5c6104,IConfigService as _0x30e542,Plugin as _0x17e99d,merge as _0x27e97d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x33e2b4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3ba925,IThreadCommentDataSourceService as _0x11a2cb}from'@univerjs/thread-comment';import{bufferTime as _0x77704c}from'rxjs';import{HTTPService as _0x392871}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xedb8ec=>(_0xedb8ec[_0xedb8ec['OpenOrReOpen']=0x0]=_0x3fdbf4(0x1b0),_0xedb8ec[_0xedb8ec['Solved']=0x1]=_0x3fdbf4(0x1bb),_0xedb8ec[_0xedb8ec[_0x3fdbf4(0x1fe)]=-0x1]=_0x3fdbf4(0x1fe),_0xedb8ec))(I||{}),v=(_0x2da46f=>(_0x2da46f[_0x2da46f[_0x3fdbf4(0x1da)]=0x0]='Unknown',_0x2da46f[_0x2da46f[_0x3fdbf4(0x206)]=0x1]=_0x3fdbf4(0x206),_0x2da46f[_0x2da46f['Reply']=0x2]=_0x3fdbf4(0x1e9),_0x2da46f[_0x2da46f['Edit']=0x3]='Edit',_0x2da46f[_0x2da46f['Delete']=0x4]='Delete',_0x2da46f[_0x2da46f[_0x3fdbf4(0x1ea)]=0x5]=_0x3fdbf4(0x1ea),_0x2da46f[_0x2da46f[_0x3fdbf4(0x1fe)]=-0x1]=_0x3fdbf4(0x1fe),_0x2da46f))(v||{});const y=_0x4a4aba=>_0x499dcf(new Date(+_0x4a4aba))[_0x3fdbf4(0x1d8)](_0x3fdbf4(0x210)),B=async(_0x270e33,_0x585956)=>{const _0x2330ff=_0x3fdbf4,_0x22e1e2=_0x270e33[_0x2330ff(0x1e7)](_0x491003),_0x59985a=_0x270e33[_0x2330ff(0x1e7)](_0x392871);_0x585956[_0x2330ff(0x1d9)](_0x287544=>{const _0x4087c1=_0x2330ff;_0x22e1e2[_0x4087c1(0x1f5)](_0x287544)&&_0x585956['delete'](_0x287544);}),_0x585956[_0x2330ff(0x1cb)]&&(await _0x59985a['get'](_0x2330ff(0x1dc),{'params':{'userIDs':[..._0x585956]}}))[_0x2330ff(0x1b6)][_0x2330ff(0x20c)][_0x2330ff(0x1d9)](_0x5cdf46=>{const _0x70c017=_0x2330ff;_0x5cdf46&&_0x22e1e2[_0x70c017(0x1f8)](_0x5cdf46);});};var K=Object[_0x3fdbf4(0x1f2)],V=(_0x590513,_0x8db757,_0x2a4132,_0x2c6906)=>{const _0x579c61=_0x3fdbf4;for(var _0xb00ce5=_0x2c6906>0x1?void 0x0:_0x2c6906?K(_0x8db757,_0x2a4132):_0x8db757,_0x210a04=_0x590513[_0x579c61(0x1ac)]-0x1,_0x354ba8;_0x210a04>=0x0;_0x210a04--)(_0x354ba8=_0x590513[_0x210a04])&&(_0xb00ce5=_0x354ba8(_0xb00ce5)||_0xb00ce5);return _0xb00ce5;},p=(_0xed501d,_0x4466a2)=>(_0x18fb04,_0xef34e)=>_0x4466a2(_0x18fb04,_0xef34e,_0xed501d);let _=class extends _0x29773c{constructor(_0x16e2b0,_0x2778e4,_0x383585,_0x13d08a){const _0xfc7bfe=_0x3fdbf4;super(),this[_0xfc7bfe(0x1e3)]=_0x16e2b0,this[_0xfc7bfe(0x1ad)]=_0x2778e4,this['_userService']=_0x383585,this['_injector']=_0x13d08a,this[_0xfc7bfe(0x1d3)](),this[_0xfc7bfe(0x1ba)]();}[_0x3fdbf4(0x1ba)](){const _0x23a1e0=_0x3fdbf4;this[_0x23a1e0(0x1bc)](this['_threadCommentModel'][_0x23a1e0(0x1c0)][_0x23a1e0(0x204)](_0x77704c(0x10))[_0x23a1e0(0x1c2)](_0x4f9d26=>{const _0x6eab14=_0x23a1e0,_0x3c8e9f=new Set();_0x4f9d26[_0x6eab14(0x1d9)](_0x58d36f=>{const _0x5bbffd=_0x6eab14;switch(_0x58d36f[_0x5bbffd(0x20b)]){case _0x5bbffd(0x1c9):{const _0x1fb314=_0x58d36f[_0x5bbffd(0x1f9)][_0x5bbffd(0x1b2)];_0x3c8e9f[_0x5bbffd(0x1c9)](_0x1fb314);break;}}}),B(this[_0x6eab14(0x1c3)],_0x3c8e9f);}));}[_0x3fdbf4(0x1d3)](){const _0x46de1e=_0x3fdbf4;this[_0x46de1e(0x1bc)](this[_0x46de1e(0x1e3)]['commentUpdate$']['subscribe'](async _0x41a645=>{const _0x1dd613=_0x46de1e;var _0x254a25,_0x150430,_0x4e591c,_0x51a832;const _0x4b88f2=(_0x254a25=this[_0x1dd613(0x1ad)][_0x1dd613(0x1e8)](_0x41a645[_0x1dd613(0x1e0)])[_0x1dd613(0x207)](_0x4615e8=>_0x4615e8['threadId']===_0x41a645[_0x1dd613(0x1dd)]))==null?void 0x0:_0x254a25[_0x1dd613(0x1c1)];if(!_0x4b88f2)return;const {unitId:_0x4e34e0,subUnitId:_0x2107b6}=_0x4b88f2;switch(_0x41a645[_0x1dd613(0x1ec)]&&this[_0x1dd613(0x1f3)]['addUser'](_0x41a645['user']),_0x41a645['type']){case v['Add']:break;case v[_0x1dd613(0x1e9)]:{this[_0x1dd613(0x1ad)]['addComment'](_0x4e34e0,_0x2107b6,{'unitId':_0x4e34e0,'subUnitId':_0x2107b6,'ref':'','id':_0x41a645['replyId'],'dT':y(+_0x41a645[_0x1dd613(0x1e5)]),'threadId':_0x41a645[_0x1dd613(0x1dd)],'personId':(_0x4e591c=(_0x150430=_0x41a645[_0x1dd613(0x1ec)])==null?void 0x0:_0x150430[_0x1dd613(0x1bd)])!=null?_0x4e591c:_0x41a645['userId'],'text':JSON[_0x1dd613(0x1cd)](_0x41a645[_0x1dd613(0x208)]),'parentId':_0x4b88f2['id']});break;}case v['Delete']:{const _0x15d821=this[_0x1dd613(0x1ad)][_0x1dd613(0x1ab)](_0x4e34e0,_0x2107b6,_0x41a645[_0x1dd613(0x1f0)]);_0x15d821&&_0x15d821[_0x1dd613(0x1d5)]&&this[_0x1dd613(0x1ad)][_0x1dd613(0x1c8)](_0x4e34e0,_0x2107b6,_0x41a645[_0x1dd613(0x1f0)]);break;}case v[_0x1dd613(0x20e)]:{this['_threadCommentModel']['updateComment'](_0x4e34e0,_0x2107b6,{'commentId':_0x41a645[_0x1dd613(0x1f0)],'text':JSON['parse'](_0x41a645['content'])});break;}case v['Solve']:{const _0x2732cc=(_0x51a832=this[_0x1dd613(0x1ad)][_0x1dd613(0x1e8)](_0x41a645[_0x1dd613(0x1e0)])[_0x1dd613(0x207)](_0x5643c2=>_0x5643c2[_0x1dd613(0x1dd)]===_0x41a645['threadId']))==null?void 0x0:_0x51a832[_0x1dd613(0x1c1)];_0x2732cc&&this['_threadCommentModel'][_0x1dd613(0x1d0)](_0x4e34e0,_0x2107b6,_0x2732cc['id'],_0x41a645[_0x1dd613(0x1b9)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4a8915(_0x423886)),p(0x1,_0x4a8915(_0x3ba925)),p(0x2,_0x4a8915(_0x491003)),p(0x3,_0x4a8915(_0x5f5a29))],_);const z=_0x3fdbf4(0x1f7),O={};var k=Object[_0x3fdbf4(0x1f2)],Q=(_0x30aa55,_0x5340aa,_0x12f267,_0x54e750)=>{const _0x41bcfb=_0x3fdbf4;for(var _0x2e5f9c=_0x54e750>0x1?void 0x0:_0x54e750?k(_0x5340aa,_0x12f267):_0x5340aa,_0x529dc2=_0x30aa55[_0x41bcfb(0x1ac)]-0x1,_0x1e04ec;_0x529dc2>=0x0;_0x529dc2--)(_0x1e04ec=_0x30aa55[_0x529dc2])&&(_0x2e5f9c=_0x1e04ec(_0x2e5f9c)||_0x2e5f9c);return _0x2e5f9c;},b=(_0x986ed5,_0x2b2591)=>(_0x1e4ddc,_0xdaf155)=>_0x2b2591(_0x1e4ddc,_0xdaf155,_0x986ed5);function X(_0x28420a,_0x54218a){const _0x5c0154=_0x3fdbf4,_0x581ce3=_0x28420a[_0x5c0154(0x1c5)][0x0];return{..._0x54218a,'id':_0x581ce3[_0x5c0154(0x1f0)],'resolved':_0x28420a[_0x5c0154(0x1b9)]===0x1,'dT':y(_0x581ce3['createTimestamp']),'personId':_0x581ce3[_0x5c0154(0x1b4)],'threadId':_0x581ce3['threadId']};}function ee(_0x19b9e0,_0x3eefcf,_0x54e5fd){const _0x18a8c4=_0x3fdbf4;var _0x7a71fc,_0x4425e3;if(((_0x4425e3=(_0x7a71fc=_0x19b9e0==null?void 0x0:_0x19b9e0[_0x18a8c4(0x1c5)])==null?void 0x0:_0x7a71fc[_0x18a8c4(0x1ac)])!=null?_0x4425e3:0x0)>0x0){const _0xf46f5e=(_0x502c18,_0x3976e8)=>({'id':_0x502c18[_0x18a8c4(0x1f0)],'threadId':_0x502c18[_0x18a8c4(0x1dd)],'dT':y(_0x502c18[_0x18a8c4(0x1e5)]),'personId':_0x502c18['userId'],'resolved':_0x19b9e0[_0x18a8c4(0x1b9)]===I['Solved'],'unitId':_0x3eefcf,'subUnitId':_0x54e5fd,'text':JSON[_0x18a8c4(0x1cd)](_0x502c18[_0x18a8c4(0x208)]),'parentId':_0x3976e8}),_0x2a469d=_0xf46f5e(_0x19b9e0[_0x18a8c4(0x1c5)][0x0]);return{..._0x2a469d,'children':_0x19b9e0['replies'][_0x18a8c4(0x1ff)](0x1)[_0x18a8c4(0x1de)](_0x3c2945=>_0xf46f5e(_0x3c2945,_0x2a469d['id']))};}return null;}function _0x591c(_0x2200a4,_0x1ec02f){const _0xa93747=_0xa937();return _0x591c=function(_0x591c8e,_0x55fcfc){_0x591c8e=_0x591c8e-0x1ab;let _0x2f0868=_0xa93747[_0x591c8e];return _0x2f0868;},_0x591c(_0x2200a4,_0x1ec02f);}let S=class{constructor(_0x5b7197,_0x31737f,_0x2f84b3){const _0xe71de9=_0x3fdbf4;this[_0xe71de9(0x1df)]=_0x5b7197,this[_0xe71de9(0x1f3)]=_0x31737f,this['_sessionService']=_0x2f84b3;}async[_0x3fdbf4(0x1c6)](_0x2fb20a){const _0x26bc96=_0x3fdbf4;var _0x47724b,_0x503b30;const {parentId:_0x110232,unitId:_0x3a5d1,text:_0x41b667,threadId:_0x1fa69}=_0x2fb20a,_0x4a3b00=(_0x503b30=(_0x47724b=_0x41b667[_0x26bc96(0x1db)])==null?void 0x0:_0x47724b['filter'](_0x20d9ea=>_0x20d9ea[_0x26bc96(0x1d7)]===_0x3b6502[_0x26bc96(0x211)])['map'](_0x2e3083=>_0x2e3083['rangeId']))!=null?_0x503b30:[],_0x3d2953=JSON[_0x26bc96(0x20a)](_0x41b667),_0x5b361c=(await this[_0x26bc96(0x1ce)][_0x26bc96(0x1bf)](_0x3a5d1))[_0x26bc96(0x20d)]();if(_0x110232){const _0x52942d={'memberId':_0x5b361c,'unitId':_0x3a5d1,'content':_0x3d2953,'mention':_0x4a3b00,'threadId':_0x1fa69},_0x552faa=(await this[_0x26bc96(0x1df)][_0x26bc96(0x1e1)]('/universer-api/comment/unit/'+_0x3a5d1+_0x26bc96(0x1d4),{'body':_0x52942d}))[_0x26bc96(0x1b6)][_0x26bc96(0x1fa)];return{..._0x2fb20a,'id':_0x552faa[_0x26bc96(0x1f0)],'dT':_0x499dcf(+_0x552faa[_0x26bc96(0x1e5)])[_0x26bc96(0x1d8)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x552faa[_0x26bc96(0x1b4)]};}else{const _0x21a244={'memberId':_0x5b361c,'unitId':_0x3a5d1,'content':_0x3d2953,'mention':_0x4a3b00},_0x3af97b=await this['_httpService'][_0x26bc96(0x1e1)](_0x26bc96(0x201)+_0x3a5d1+'/add',{'body':_0x21a244});return X(_0x3af97b[_0x26bc96(0x1b6)]['comment'],_0x2fb20a);}}async[_0x3fdbf4(0x1b5)](_0x2d6455){const _0x4a4aae=_0x3fdbf4;var _0x3242c2,_0x19adf7;const {text:_0x465de1,unitId:_0x562774}=_0x2d6455,_0x4ea753=(_0x19adf7=(_0x3242c2=_0x465de1[_0x4a4aae(0x1db)])==null?void 0x0:_0x3242c2[_0x4a4aae(0x1cc)](_0xf57f7=>_0xf57f7[_0x4a4aae(0x1d7)]===_0x3b6502[_0x4a4aae(0x211)])['map'](_0x1333ed=>_0x1333ed[_0x4a4aae(0x1b3)]))!=null?_0x19adf7:[],_0x20f3d2=JSON['stringify'](_0x465de1),_0x209613=_0x2d6455[_0x4a4aae(0x1dd)],_0x30f44c=_0x2d6455['id'],_0x4a979c={'memberId':(await this[_0x4a4aae(0x1ce)]['requireSession'](_0x562774))[_0x4a4aae(0x20d)](),'unitId':_0x562774,'threadId':_0x209613,'mention':_0x4ea753,'content':_0x20f3d2,'replyId':_0x30f44c},_0x14e57d=await this[_0x4a4aae(0x1df)][_0x4a4aae(0x1e1)](_0x4a4aae(0x201)+_0x562774+_0x4a4aae(0x1ee),{'body':_0x4a979c});return!_0x14e57d[_0x4a4aae(0x1b6)]['error']||_0x14e57d[_0x4a4aae(0x1b6)][_0x4a4aae(0x1eb)][_0x4a4aae(0x203)]===0x1;}async['resolveComment'](_0x19d26e){const _0x572f93=_0x3fdbf4,{unitId:_0x139aeb}=_0x19d26e,_0x241675=_0x19d26e[_0x572f93(0x1dd)],_0x1379db={'memberId':this[_0x572f93(0x1f3)][_0x572f93(0x1ed)]()[_0x572f93(0x1bd)],'unitId':_0x139aeb,'threadId':_0x241675,'solved':_0x19d26e[_0x572f93(0x1fb)]?I[_0x572f93(0x1bb)]:I['OpenOrReOpen']},_0x26c54a=await this[_0x572f93(0x1df)][_0x572f93(0x1e1)](_0x572f93(0x201)+_0x139aeb+_0x572f93(0x1c7),{'body':_0x1379db});return!_0x26c54a[_0x572f93(0x1b6)]['error']||_0x26c54a[_0x572f93(0x1b6)][_0x572f93(0x1eb)][_0x572f93(0x203)]===0x1;}async[_0x3fdbf4(0x1c8)](_0x139342,_0x29d3f5,_0xc6c70c,_0x46898b){const _0x512d24=_0x3fdbf4,_0x28bb64={'memberId':(await this['_sessionService']['requireSession'](_0x139342))[_0x512d24(0x20d)](),'threadId':_0xc6c70c,'replyId':_0x46898b,'unitId':_0x139342},_0x4488a0=await this[_0x512d24(0x1df)][_0x512d24(0x1e1)](_0x512d24(0x201)+_0x139342+_0x512d24(0x205),{'body':_0x28bb64});return!_0x4488a0[_0x512d24(0x1b6)][_0x512d24(0x1eb)]||_0x4488a0[_0x512d24(0x1b6)]['error'][_0x512d24(0x203)]===0x1;}async[_0x3fdbf4(0x1af)](_0x28710f,_0x5ad1ee,_0x1db4a5){const _0x3e80dd=_0x3fdbf4,_0x567f4b={'unitId':_0x28710f,'threadId':_0x1db4a5},_0x41ccb4=await this[_0x3e80dd(0x1df)][_0x3e80dd(0x1e1)](_0x3e80dd(0x201)+_0x28710f+_0x3e80dd(0x1fc),{'body':_0x567f4b}),_0x123a72=_0x1db4a5[_0x3e80dd(0x1de)](_0xbbf441=>ee(_0x41ccb4['body']['comments'][_0xbbf441],_0x28710f,_0x5ad1ee))[_0x3e80dd(0x1cc)](Boolean);return Object[_0x3e80dd(0x200)](_0x41ccb4[_0x3e80dd(0x1b6)][_0x3e80dd(0x20c)])[_0x3e80dd(0x1d9)](_0x2d8783=>{const _0x2acd51=_0x3e80dd;this[_0x2acd51(0x1f3)]['addUser'](_0x2d8783);}),_0x123a72;}[_0x3fdbf4(0x1ae)](_0x173d9c){const _0x3e1679=_0x3fdbf4;return{'id':_0x173d9c['id'],'threadId':_0x173d9c[_0x3e1679(0x1dd)],'ref':_0x173d9c['ref']};}};S=Q([b(0x0,_0x4a8915(_0x392871)),b(0x1,_0x4a8915(_0x491003)),b(0x2,_0x4a8915(_0x584824))],S);var re=Object[_0x3fdbf4(0x1f2)],te=(_0x453eb6,_0x52bcf7,_0x255927,_0x35e85d)=>{const _0x134588=_0x3fdbf4;for(var _0x441d5e=_0x35e85d>0x1?void 0x0:_0x35e85d?re(_0x52bcf7,_0x255927):_0x52bcf7,_0x39e132=_0x453eb6[_0x134588(0x1ac)]-0x1,_0x3191e2;_0x39e132>=0x0;_0x39e132--)(_0x3191e2=_0x453eb6[_0x39e132])&&(_0x441d5e=_0x3191e2(_0x441d5e)||_0x441d5e);return _0x441d5e;},M=(_0x32086a,_0x37c50c)=>(_0x36d05c,_0x592e9c)=>_0x37c50c(_0x36d05c,_0x592e9c,_0x32086a);let f=class extends _0x29773c{constructor(_0x2c1b0d,_0x26b1e0){const _0x20de65=_0x3fdbf4;super(),this[_0x20de65(0x1b1)]=_0x2c1b0d,this[_0x20de65(0x1e6)]=_0x26b1e0,this[_0x20de65(0x1fd)]();}['_initDataSource'](){const _0x1f87e6=_0x3fdbf4;this[_0x1f87e6(0x1b1)][_0x1f87e6(0x1e2)]=this['_threadCommentDataSource'],this[_0x1f87e6(0x1b1)][_0x1f87e6(0x1ca)]=!0x1;}};f=te([M(0x0,_0x11a2cb),M(0x1,_0x4a8915(S))],f);var se=Object['defineProperty'],oe=Object[_0x3fdbf4(0x1f2)],ne=(_0x4d966d,_0x32313a,_0x5abf6f)=>_0x32313a in _0x4d966d?se(_0x4d966d,_0x32313a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5abf6f}):_0x4d966d[_0x32313a]=_0x5abf6f,ie=(_0x58792d,_0x5cf664,_0x42c451,_0x3dfeae)=>{const _0x34b711=_0x3fdbf4;for(var _0x5f2182=_0x3dfeae>0x1?void 0x0:_0x3dfeae?oe(_0x5cf664,_0x42c451):_0x5cf664,_0x1d4458=_0x58792d[_0x34b711(0x1ac)]-0x1,_0x5bcbac;_0x1d4458>=0x0;_0x1d4458--)(_0x5bcbac=_0x58792d[_0x1d4458])&&(_0x5f2182=_0x5bcbac(_0x5f2182)||_0x5f2182);return _0x5f2182;},N=(_0x5f3fd7,_0x40dbce)=>(_0x18d94b,_0x5529fd)=>_0x40dbce(_0x18d94b,_0x5529fd,_0x5f3fd7),$=(_0x46cf7f,_0x33ab18,_0x5a9a20)=>ne(_0x46cf7f,typeof _0x33ab18!=_0x3fdbf4(0x209)?_0x33ab18+'':_0x33ab18,_0x5a9a20);let g=class extends _0x17e99d{constructor(_0x1290d6=O,_0x4d0760,_0x2d05b3){const _0x417e39=_0x3fdbf4;super(),this[_0x417e39(0x1b7)]=_0x1290d6,this[_0x417e39(0x1c3)]=_0x4d0760,this[_0x417e39(0x1f6)]=_0x2d05b3;const {..._0x355247}=_0x27e97d({},O,this[_0x417e39(0x1b7)]);this[_0x417e39(0x1f6)]['setConfig'](z,_0x355247);}[_0x3fdbf4(0x1ef)](){[[S],[f],[_]]['forEach'](_0x30029e=>{const _0x2cb28e=_0x591c;this['_injector'][_0x2cb28e(0x1c9)](_0x30029e);});}[_0x3fdbf4(0x1b8)](){const _0x32d5dc=_0x3fdbf4;this[_0x32d5dc(0x1c3)][_0x32d5dc(0x1e7)](f),this[_0x32d5dc(0x1c3)][_0x32d5dc(0x1e7)](_);}};$(g,'pluginName',W),$(g,_0x3fdbf4(0x20b),_0x92db82[_0x3fdbf4(0x1e4)]),g=ie([_0x5c6104(_0x33e2b4,_0x59a7bd,_0x12f89e),N(0x1,_0x4a8915(_0x5f5a29)),N(0x2,_0x30e542)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x45af(_0x2324c5,_0x57909e){const _0x32dcb0=_0x32dc();return _0x45af=function(_0x45afcc,_0x217edf){_0x45afcc=_0x45afcc-0x9e;let _0x451abd=_0x32dcb0[_0x45afcc];return _0x451abd;},_0x45af(_0x2324c5,_0x57909e);}function _0x32dc(){const _0x135802=['318668kKCFGW','Disposable','stringify','UniverCollaborationClientPlugin','3174597sMuMmc','/edit','reply','personId','1465756pTgwMG','ref','YYYY/MM/DD\x20HH:mm','Add','HTTPService','UniverProThreadCommentDatasource','unitId','resolveComment','exports','addComment','434580PTWQlT','forEach','size','CollaborationSessionService','2702208NXgaFa','thread-comment-data-source.config','merge','code','UniverProLicense','map','createTimestamp','values','@univerjs/network','UniverProCollaborationClient','_initDataSource','find','_httpService','saveCommentToSnapshot','body','userID','format','syncUpdateMutationToColla','UniverThreadCommentDataSourcePlugin','UserManagerService','_threadCommentModel','_userService','CustomRangeType','slice','disposeWithMe','/list','Plugin','COMMENT','user','/add','15208280xbKpwn','OpenOrReOpen','setConfig','Edit','_commentService','post','add','_configService','UniverThreadCommentUIPlugin','UniverCore','filter','Inject','payload','userId','toStringTag','onReady','comment','/reply','ThreadCommentModel','UniverLicensePlugin','_threadCommentDataSource','content','users','delete','UniverInstanceType','threadId','solved','parse','function','updateComment','IConfigService','parentId','DependentOn','deleteComment','UniverNetwork','Module','amd','getCurrentUser','root','resolved','rxjs','_sessionService','CommentService','Delete','8EQAXNX','bufferTime','subscribe','/delete','@univerjs/thread-comment','36xLpltF','pluginName','Unknown','858823GQQdlW','requireSession','_config','_initUserSync','customRanges','error','type','UniverThreadCommentUi','rangeId','length','getOwnPropertyDescriptor','_init','Reply','listComments','Solve','Solved','dayjs','/solved','_threadCommentDataSourceService','1BjbOka','getMemberID','addUser','UNRECOGNIZED','get','@univerjs/core','replies','/universer-api/comment/unit/','commentUpdate$','defineProperty','rangeType','_injector','replyId'];_0x32dc=function(){return _0x135802;};return _0x32dc();}(function(_0x405607,_0x9e59d8){const _0x251925=_0x45af,_0x14f6ed=_0x405607();while(!![]){try{const _0x1387c0=-parseInt(_0x251925(0xd8))/0x1*(parseInt(_0x251925(0xed))/0x2)+-parseInt(_0x251925(0xfb))/0x3+-parseInt(_0x251925(0xe5))/0x4+parseInt(_0x251925(0xf7))/0x5*(parseInt(_0x251925(0xc2))/0x6)+parseInt(_0x251925(0xc5))/0x7+parseInt(_0x251925(0xbd))/0x8*(parseInt(_0x251925(0xe9))/0x9)+parseInt(_0x251925(0x119))/0xa;if(_0x1387c0===_0x9e59d8)break;else _0x14f6ed['push'](_0x14f6ed['shift']());}catch(_0x50de24){_0x14f6ed['push'](_0x14f6ed['shift']());}}}(_0x32dc,0xc4671),function(_0x1549bc,_0x1b1d53){const _0x587348=_0x45af;typeof exports=='object'&&typeof module<'u'?_0x1b1d53(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==_0x587348(0xad)&&define[_0x587348(0xb5)]?define([_0x587348(0xf5),'@univerjs-pro/collaboration-client','@univerjs-pro/license',_0x587348(0xdd),'@univerjs/thread-comment-ui',_0x587348(0xc1),_0x587348(0xb9),_0x587348(0x103)],_0x1b1d53):(_0x1549bc=typeof globalThis<'u'?globalThis:_0x1549bc||self,_0x1b1d53(_0x1549bc[_0x587348(0xf2)]={},_0x1549bc[_0x587348(0x104)],_0x1549bc[_0x587348(0xff)],_0x1549bc[_0x587348(0x122)],_0x1549bc[_0x587348(0xcc)],_0x1549bc['UniverThreadComment'],_0x1549bc['rxjs'],_0x1549bc[_0x587348(0xb3)]));}(this,function(_0x3241c7,_0x20dfb9,_0x4ddca5,_0x3e7491,_0x8102ab,_0x2679b8,_0x782355,_0x12a47f){'use strict';const _0x63d315=_0x45af;const _0x3a37d7='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x35344c=(_0xd0fc96=>(_0xd0fc96[_0xd0fc96[_0x63d315(0x11a)]=0x0]=_0x63d315(0x11a),_0xd0fc96[_0xd0fc96[_0x63d315(0xd4)]=0x1]='Solved',_0xd0fc96[_0xd0fc96['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xd0fc96))(_0x35344c||{}),_0x20b2d9=(_0x422f52=>(_0x422f52[_0x422f52[_0x63d315(0xc4)]=0x0]=_0x63d315(0xc4),_0x422f52[_0x422f52[_0x63d315(0xf0)]=0x1]=_0x63d315(0xf0),_0x422f52[_0x422f52[_0x63d315(0xd1)]=0x2]=_0x63d315(0xd1),_0x422f52[_0x422f52[_0x63d315(0x11c)]=0x3]=_0x63d315(0x11c),_0x422f52[_0x422f52[_0x63d315(0xbc)]=0x4]=_0x63d315(0xbc),_0x422f52[_0x422f52[_0x63d315(0xd3)]=0x5]=_0x63d315(0xd3),_0x422f52[_0x422f52[_0x63d315(0xdb)]=-0x1]=_0x63d315(0xdb),_0x422f52))(_0x20b2d9||{});const _0x44db12=_0x3b9a35=>_0x3e7491[_0x63d315(0xd5)](new Date(+_0x3b9a35))[_0x63d315(0x10b)](_0x63d315(0xef)),_0x555eef=async(_0x53f0a8,_0x4ba2f0)=>{const _0x4dce4e=_0x63d315,_0x273dc6=_0x53f0a8['get'](_0x3e7491[_0x4dce4e(0x10e)]),_0x465e85=_0x53f0a8[_0x4dce4e(0xdc)](_0x12a47f[_0x4dce4e(0xf1)]);_0x4ba2f0['forEach'](_0x4fe606=>{const _0x1b19ce=_0x4dce4e;_0x273dc6['getUser'](_0x4fe606)&&_0x4ba2f0[_0x1b19ce(0xa8)](_0x4fe606);}),_0x4ba2f0[_0x4dce4e(0xf9)]&&(await _0x465e85[_0x4dce4e(0xdc)]('/universer-api/user/list',{'params':{'userIDs':[..._0x4ba2f0]}}))[_0x4dce4e(0x109)][_0x4dce4e(0xa7)][_0x4dce4e(0xf8)](_0x41d805=>{const _0x1ff58a=_0x4dce4e;_0x41d805&&_0x273dc6[_0x1ff58a(0xda)](_0x41d805);});};var _0x5a62c8=Object['getOwnPropertyDescriptor'],_0x3545f8=(_0x1cd4f0,_0x594354,_0x5b5b57,_0x3c0c25)=>{for(var _0x35a85c=_0x3c0c25>0x1?void 0x0:_0x3c0c25?_0x5a62c8(_0x594354,_0x5b5b57):_0x594354,_0x431feb=_0x1cd4f0['length']-0x1,_0xeb174b;_0x431feb>=0x0;_0x431feb--)(_0xeb174b=_0x1cd4f0[_0x431feb])&&(_0x35a85c=_0xeb174b(_0x35a85c)||_0x35a85c);return _0x35a85c;},_0x27d7d1=(_0xe3324a,_0x877267)=>(_0x1e8636,_0x1e13ad)=>_0x877267(_0x1e8636,_0x1e13ad,_0xe3324a);let _0x17876b=class extends _0x3e7491[_0x63d315(0xe6)]{constructor(_0x13f494,_0x31bcfc,_0x5722ba,_0x42f0e5){const _0x2f52db=_0x63d315;super(),this['_commentService']=_0x13f494,this[_0x2f52db(0x10f)]=_0x31bcfc,this[_0x2f52db(0x110)]=_0x5722ba,this[_0x2f52db(0xe3)]=_0x42f0e5,this[_0x2f52db(0xd0)](),this[_0x2f52db(0xc8)]();}[_0x63d315(0xc8)](){const _0x23a23a=_0x63d315;this[_0x23a23a(0x113)](this[_0x23a23a(0x10f)][_0x23a23a(0xe0)]['pipe'](_0x782355[_0x23a23a(0xbe)](0x10))[_0x23a23a(0xbf)](_0x316b70=>{const _0x57881a=_0x23a23a,_0x546c22=new Set();_0x316b70[_0x57881a(0xf8)](_0x436a6b=>{const _0x5788cc=_0x57881a;switch(_0x436a6b[_0x5788cc(0xcb)]){case _0x5788cc(0x11f):{const _0x55093d=_0x436a6b[_0x5788cc(0x125)][_0x5788cc(0xec)];_0x546c22[_0x5788cc(0x11f)](_0x55093d);break;}}}),_0x555eef(this[_0x57881a(0xe3)],_0x546c22);}));}['_init'](){const _0x287c85=_0x63d315;this[_0x287c85(0x113)](this[_0x287c85(0x11d)][_0x287c85(0xe0)][_0x287c85(0xbf)](async _0x24f3c7=>{const _0xdd2725=_0x287c85;var _0xf0a2d5,_0x28fb10,_0x349e1a,_0x1a6974;const _0x2a03be=(_0xf0a2d5=this[_0xdd2725(0x10f)]['getUnit'](_0x24f3c7[_0xdd2725(0xf3)])[_0xdd2725(0x106)](_0x5aa74b=>_0x5aa74b[_0xdd2725(0xaa)]===_0x24f3c7['threadId']))==null?void 0x0:_0xf0a2d5[_0xdd2725(0xb7)];if(!_0x2a03be)return;const {unitId:_0x5a5048,subUnitId:_0x130e47}=_0x2a03be;switch(_0x24f3c7[_0xdd2725(0x117)]&&this[_0xdd2725(0x110)]['addUser'](_0x24f3c7[_0xdd2725(0x117)]),_0x24f3c7[_0xdd2725(0xcb)]){case _0x20b2d9[_0xdd2725(0xf0)]:break;case _0x20b2d9[_0xdd2725(0xd1)]:{this[_0xdd2725(0x10f)][_0xdd2725(0xf6)](_0x5a5048,_0x130e47,{'unitId':_0x5a5048,'subUnitId':_0x130e47,'ref':'','id':_0x24f3c7['replyId'],'dT':_0x44db12(+_0x24f3c7[_0xdd2725(0x101)]),'threadId':_0x24f3c7[_0xdd2725(0xaa)],'personId':(_0x349e1a=(_0x28fb10=_0x24f3c7[_0xdd2725(0x117)])==null?void 0x0:_0x28fb10[_0xdd2725(0x10a)])!=null?_0x349e1a:_0x24f3c7[_0xdd2725(0x9e)],'text':JSON[_0xdd2725(0xac)](_0x24f3c7[_0xdd2725(0xa6)]),'parentId':_0x2a03be['id']});break;}case _0x20b2d9[_0xdd2725(0xbc)]:{const _0x4c5807=this[_0xdd2725(0x10f)]['getComment'](_0x5a5048,_0x130e47,_0x24f3c7[_0xdd2725(0xe4)]);_0x4c5807&&_0x4c5807[_0xdd2725(0xb0)]&&this[_0xdd2725(0x10f)][_0xdd2725(0xb2)](_0x5a5048,_0x130e47,_0x24f3c7[_0xdd2725(0xe4)]);break;}case _0x20b2d9['Edit']:{this['_threadCommentModel'][_0xdd2725(0xae)](_0x5a5048,_0x130e47,{'commentId':_0x24f3c7['replyId'],'text':JSON['parse'](_0x24f3c7['content'])});break;}case _0x20b2d9[_0xdd2725(0xd3)]:{const _0x2513e3=(_0x1a6974=this[_0xdd2725(0x10f)]['getUnit'](_0x24f3c7[_0xdd2725(0xf3)])[_0xdd2725(0x106)](_0x178dfe=>_0x178dfe[_0xdd2725(0xaa)]===_0x24f3c7['threadId']))==null?void 0x0:_0x1a6974[_0xdd2725(0xb7)];_0x2513e3&&this[_0xdd2725(0x10f)][_0xdd2725(0xf4)](_0x5a5048,_0x130e47,_0x2513e3['id'],_0x24f3c7[_0xdd2725(0xab)]===_0x35344c[_0xdd2725(0xd4)]);break;}}}));}};_0x17876b=_0x3545f8([_0x27d7d1(0x0,_0x3e7491[_0x63d315(0x124)](_0x20dfb9[_0x63d315(0xbb)])),_0x27d7d1(0x1,_0x3e7491[_0x63d315(0x124)](_0x2679b8[_0x63d315(0xa3)])),_0x27d7d1(0x2,_0x3e7491[_0x63d315(0x124)](_0x3e7491[_0x63d315(0x10e)])),_0x27d7d1(0x3,_0x3e7491[_0x63d315(0x124)](_0x3e7491['Injector']))],_0x17876b);const _0x55bd91=_0x63d315(0xfc),_0x5eb45f={};var _0xc5a255=Object[_0x63d315(0xcf)],_0x2b3093=(_0x5f4431,_0x5802bf,_0x5b017a,_0x118b3b)=>{for(var _0xede531=_0x118b3b>0x1?void 0x0:_0x118b3b?_0xc5a255(_0x5802bf,_0x5b017a):_0x5802bf,_0x3c3bf2=_0x5f4431['length']-0x1,_0x3b44ec;_0x3c3bf2>=0x0;_0x3c3bf2--)(_0x3b44ec=_0x5f4431[_0x3c3bf2])&&(_0xede531=_0x3b44ec(_0xede531)||_0xede531);return _0xede531;},_0x2128da=(_0x5e80c4,_0x1b2751)=>(_0x3b9af2,_0x153e1d)=>_0x1b2751(_0x3b9af2,_0x153e1d,_0x5e80c4);function _0x5784b4(_0x5c3204,_0x206fb5){const _0x429739=_0x63d315,_0x21dc96=_0x5c3204[_0x429739(0xde)][0x0];return{..._0x206fb5,'id':_0x21dc96[_0x429739(0xe4)],'resolved':_0x5c3204[_0x429739(0xab)]===0x1,'dT':_0x44db12(_0x21dc96[_0x429739(0x101)]),'personId':_0x21dc96[_0x429739(0x9e)],'threadId':_0x21dc96[_0x429739(0xaa)]};}function _0x4f6855(_0x44b8f6,_0x2bef8b,_0x3114a1){const _0x16d0f3=_0x63d315;var _0x3c8633,_0x13efb6;if(((_0x13efb6=(_0x3c8633=_0x44b8f6==null?void 0x0:_0x44b8f6[_0x16d0f3(0xde)])==null?void 0x0:_0x3c8633[_0x16d0f3(0xce)])!=null?_0x13efb6:0x0)>0x0){const _0x4da823=(_0x29f4ab,_0x551ac8)=>({'id':_0x29f4ab[_0x16d0f3(0xe4)],'threadId':_0x29f4ab[_0x16d0f3(0xaa)],'dT':_0x44db12(_0x29f4ab[_0x16d0f3(0x101)]),'personId':_0x29f4ab['userId'],'resolved':_0x44b8f6[_0x16d0f3(0xab)]===_0x35344c[_0x16d0f3(0xd4)],'unitId':_0x2bef8b,'subUnitId':_0x3114a1,'text':JSON[_0x16d0f3(0xac)](_0x29f4ab[_0x16d0f3(0xa6)]),'parentId':_0x551ac8}),_0x19e248=_0x4da823(_0x44b8f6[_0x16d0f3(0xde)][0x0]);return{..._0x19e248,'children':_0x44b8f6[_0x16d0f3(0xde)][_0x16d0f3(0x112)](0x1)['map'](_0x430565=>_0x4da823(_0x430565,_0x19e248['id']))};}return null;}let _0x5c8c4d=class{constructor(_0x2fbe2a,_0x36bf03,_0x4bf6db){const _0x84ec00=_0x63d315;this[_0x84ec00(0x107)]=_0x2fbe2a,this[_0x84ec00(0x110)]=_0x36bf03,this[_0x84ec00(0xba)]=_0x4bf6db;}async[_0x63d315(0xf6)](_0x12ad75){const _0xed754=_0x63d315;var _0x3431d2,_0x4a3e3c;const {parentId:_0x247407,unitId:_0x2ed109,text:_0x1749c5,threadId:_0xda5724}=_0x12ad75,_0x40513c=(_0x4a3e3c=(_0x3431d2=_0x1749c5[_0xed754(0xc9)])==null?void 0x0:_0x3431d2[_0xed754(0x123)](_0x2faf4c=>_0x2faf4c[_0xed754(0xe2)]===_0x3e7491['CustomRangeType'][_0xed754(0x116)])['map'](_0x366569=>_0x366569[_0xed754(0xcd)]))!=null?_0x4a3e3c:[],_0x444bfa=JSON[_0xed754(0xe7)](_0x1749c5),_0x33b0ca=(await this[_0xed754(0xba)][_0xed754(0xc6)](_0x2ed109))[_0xed754(0xd9)]();if(_0x247407){const _0x3c9df8={'memberId':_0x33b0ca,'unitId':_0x2ed109,'content':_0x444bfa,'mention':_0x40513c,'threadId':_0xda5724},_0x5d7d5b=(await this[_0xed754(0x107)][_0xed754(0x11e)](_0xed754(0xdf)+_0x2ed109+_0xed754(0xa2),{'body':_0x3c9df8}))[_0xed754(0x109)][_0xed754(0xeb)];return{..._0x12ad75,'id':_0x5d7d5b[_0xed754(0xe4)],'dT':_0x3e7491[_0xed754(0xd5)](+_0x5d7d5b[_0xed754(0x101)])['format'](_0xed754(0xef)),'personId':_0x5d7d5b[_0xed754(0x9e)]};}else{const _0x1a9840={'memberId':_0x33b0ca,'unitId':_0x2ed109,'content':_0x444bfa,'mention':_0x40513c},_0x5bdb41=await this[_0xed754(0x107)][_0xed754(0x11e)](_0xed754(0xdf)+_0x2ed109+_0xed754(0x118),{'body':_0x1a9840});return _0x5784b4(_0x5bdb41['body'][_0xed754(0xa1)],_0x12ad75);}}async[_0x63d315(0xae)](_0x175348){const _0x136ef6=_0x63d315;var _0xbc0a4f,_0x1d98ba;const {text:_0x8c384a,unitId:_0x3b8ac8}=_0x175348,_0x55cd5e=(_0x1d98ba=(_0xbc0a4f=_0x8c384a[_0x136ef6(0xc9)])==null?void 0x0:_0xbc0a4f[_0x136ef6(0x123)](_0x2ecce7=>_0x2ecce7[_0x136ef6(0xe2)]===_0x3e7491[_0x136ef6(0x111)]['COMMENT'])[_0x136ef6(0x100)](_0x32b097=>_0x32b097[_0x136ef6(0xcd)]))!=null?_0x1d98ba:[],_0x43aede=JSON[_0x136ef6(0xe7)](_0x8c384a),_0x3d5b5e=_0x175348['threadId'],_0x162651=_0x175348['id'],_0x1ede53={'memberId':(await this[_0x136ef6(0xba)][_0x136ef6(0xc6)](_0x3b8ac8))[_0x136ef6(0xd9)](),'unitId':_0x3b8ac8,'threadId':_0x3d5b5e,'mention':_0x55cd5e,'content':_0x43aede,'replyId':_0x162651},_0x3ba94d=await this[_0x136ef6(0x107)][_0x136ef6(0x11e)](_0x136ef6(0xdf)+_0x3b8ac8+_0x136ef6(0xea),{'body':_0x1ede53});return!_0x3ba94d['body'][_0x136ef6(0xca)]||_0x3ba94d[_0x136ef6(0x109)][_0x136ef6(0xca)][_0x136ef6(0xfe)]===0x1;}async['resolveComment'](_0x54847b){const _0x4502be=_0x63d315,{unitId:_0x366af0}=_0x54847b,_0x495369=_0x54847b[_0x4502be(0xaa)],_0x548aa5={'memberId':this['_userService'][_0x4502be(0xb6)]()['userID'],'unitId':_0x366af0,'threadId':_0x495369,'solved':_0x54847b[_0x4502be(0xb8)]?_0x35344c[_0x4502be(0xd4)]:_0x35344c[_0x4502be(0x11a)]},_0x2d95a2=await this[_0x4502be(0x107)][_0x4502be(0x11e)](_0x4502be(0xdf)+_0x366af0+_0x4502be(0xd6),{'body':_0x548aa5});return!_0x2d95a2['body'][_0x4502be(0xca)]||_0x2d95a2[_0x4502be(0x109)][_0x4502be(0xca)][_0x4502be(0xfe)]===0x1;}async[_0x63d315(0xb2)](_0x33e137,_0x464fcc,_0x3259a2,_0x19f8a2){const _0xacc755=_0x63d315,_0x44f817={'memberId':(await this[_0xacc755(0xba)][_0xacc755(0xc6)](_0x33e137))[_0xacc755(0xd9)](),'threadId':_0x3259a2,'replyId':_0x19f8a2,'unitId':_0x33e137},_0x454a82=await this['_httpService'][_0xacc755(0x11e)](_0xacc755(0xdf)+_0x33e137+_0xacc755(0xc0),{'body':_0x44f817});return!_0x454a82[_0xacc755(0x109)]['error']||_0x454a82[_0xacc755(0x109)]['error']['code']===0x1;}async[_0x63d315(0xd2)](_0x2b996c,_0x79d030,_0x10eb9f){const _0x4f4c13=_0x63d315,_0x32f987={'unitId':_0x2b996c,'threadId':_0x10eb9f},_0x36524a=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2b996c+_0x4f4c13(0x114),{'body':_0x32f987}),_0x4afa65=_0x10eb9f[_0x4f4c13(0x100)](_0x47dbbb=>_0x4f6855(_0x36524a['body']['comments'][_0x47dbbb],_0x2b996c,_0x79d030))[_0x4f4c13(0x123)](Boolean);return Object[_0x4f4c13(0x102)](_0x36524a[_0x4f4c13(0x109)][_0x4f4c13(0xa7)])['forEach'](_0x175f76=>{const _0x300f1a=_0x4f4c13;this[_0x300f1a(0x110)]['addUser'](_0x175f76);}),_0x4afa65;}[_0x63d315(0x108)](_0x188057){const _0x39a976=_0x63d315;return{'id':_0x188057['id'],'threadId':_0x188057['threadId'],'ref':_0x188057[_0x39a976(0xee)]};}};_0x5c8c4d=_0x2b3093([_0x2128da(0x0,_0x3e7491[_0x63d315(0x124)](_0x12a47f['HTTPService'])),_0x2128da(0x1,_0x3e7491[_0x63d315(0x124)](_0x3e7491['UserManagerService'])),_0x2128da(0x2,_0x3e7491['Inject'](_0x20dfb9[_0x63d315(0xfa)]))],_0x5c8c4d);var _0x94dfd2=Object[_0x63d315(0xcf)],_0x58e606=(_0x5631ff,_0x5e5087,_0x4c6174,_0x4ff87c)=>{const _0x151cf4=_0x63d315;for(var _0x12b65a=_0x4ff87c>0x1?void 0x0:_0x4ff87c?_0x94dfd2(_0x5e5087,_0x4c6174):_0x5e5087,_0x65bb1f=_0x5631ff[_0x151cf4(0xce)]-0x1,_0x45468c;_0x65bb1f>=0x0;_0x65bb1f--)(_0x45468c=_0x5631ff[_0x65bb1f])&&(_0x12b65a=_0x45468c(_0x12b65a)||_0x12b65a);return _0x12b65a;},_0x5e30a1=(_0x4e8840,_0x1e0747)=>(_0x14e640,_0x6a75d1)=>_0x1e0747(_0x14e640,_0x6a75d1,_0x4e8840);let _0x8f2f23=class extends _0x3e7491['Disposable']{constructor(_0x1edbef,_0xd35d9c){const _0x200346=_0x63d315;super(),this['_threadCommentDataSourceService']=_0x1edbef,this[_0x200346(0xa5)]=_0xd35d9c,this[_0x200346(0x105)]();}[_0x63d315(0x105)](){const _0x100099=_0x63d315;this[_0x100099(0xd7)]['dataSource']=this['_threadCommentDataSource'],this[_0x100099(0xd7)][_0x100099(0x10c)]=!0x1;}};_0x8f2f23=_0x58e606([_0x5e30a1(0x0,_0x2679b8['IThreadCommentDataSourceService']),_0x5e30a1(0x1,_0x3e7491['Inject'](_0x5c8c4d))],_0x8f2f23);var _0x54cda6=Object[_0x63d315(0xe1)],_0x1fa165=Object[_0x63d315(0xcf)],_0x557ee0=(_0x17a5a3,_0x3b9715,_0x13afed)=>_0x3b9715 in _0x17a5a3?_0x54cda6(_0x17a5a3,_0x3b9715,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x13afed}):_0x17a5a3[_0x3b9715]=_0x13afed,_0x576c9c=(_0x2b4607,_0x206334,_0x4b6175,_0x559d6d)=>{for(var _0x9b78=_0x559d6d>0x1?void 0x0:_0x559d6d?_0x1fa165(_0x206334,_0x4b6175):_0x206334,_0x533daa=_0x2b4607['length']-0x1,_0x553066;_0x533daa>=0x0;_0x533daa--)(_0x553066=_0x2b4607[_0x533daa])&&(_0x9b78=_0x553066(_0x9b78)||_0x9b78);return _0x9b78;},_0x3f5840=(_0x55950a,_0x19850e)=>(_0xe1186d,_0x18a2ee)=>_0x19850e(_0xe1186d,_0x18a2ee,_0x55950a),_0x5b42a4=(_0x135e09,_0x313945,_0x2fe803)=>_0x557ee0(_0x135e09,typeof _0x313945!='symbol'?_0x313945+'':_0x313945,_0x2fe803);_0x3241c7[_0x63d315(0x10d)]=class extends _0x3e7491[_0x63d315(0x115)]{constructor(_0x49324a=_0x5eb45f,_0x4b4873,_0x3d0036){const _0x3ea8f1=_0x63d315;super(),this['_config']=_0x49324a,this[_0x3ea8f1(0xe3)]=_0x4b4873,this[_0x3ea8f1(0x120)]=_0x3d0036;const {..._0x401466}=_0x3e7491[_0x3ea8f1(0xfd)]({},_0x5eb45f,this[_0x3ea8f1(0xc7)]);this[_0x3ea8f1(0x120)][_0x3ea8f1(0x11b)](_0x55bd91,_0x401466);}['onStarting'](){const _0x496c50=_0x63d315;[[_0x5c8c4d],[_0x8f2f23],[_0x17876b]][_0x496c50(0xf8)](_0x3e3f08=>{const _0x36d09f=_0x496c50;this[_0x36d09f(0xe3)][_0x36d09f(0x11f)](_0x3e3f08);});}[_0x63d315(0xa0)](){const _0x242d78=_0x63d315;this[_0x242d78(0xe3)][_0x242d78(0xdc)](_0x8f2f23),this[_0x242d78(0xe3)]['get'](_0x17876b);}},_0x5b42a4(_0x3241c7[_0x63d315(0x10d)],_0x63d315(0xc3),_0x3a37d7),_0x5b42a4(_0x3241c7[_0x63d315(0x10d)],_0x63d315(0xcb),_0x3e7491[_0x63d315(0xa9)]['UNIVER_UNKNOWN']),_0x3241c7['UniverThreadCommentDataSourcePlugin']=_0x576c9c([_0x3e7491[_0x63d315(0xb1)](_0x8102ab[_0x63d315(0x121)],_0x20dfb9[_0x63d315(0xe8)],_0x4ddca5[_0x63d315(0xa4)]),_0x3f5840(0x1,_0x3e7491[_0x63d315(0x124)](_0x3e7491['Injector'])),_0x3f5840(0x2,_0x3e7491[_0x63d315(0xaf)])],_0x3241c7[_0x63d315(0x10d)]),Object[_0x63d315(0xe1)](_0x3241c7,Symbol[_0x63d315(0x9f)],{'value':_0x63d315(0xb4)});}));
1
+ function _0x734a(_0x348521,_0x161956){const _0xeb17d=_0xeb17();return _0x734a=function(_0x734a44,_0x1afb5d){_0x734a44=_0x734a44-0xf5;let _0x26b6e5=_0xeb17d[_0x734a44];return _0x26b6e5;},_0x734a(_0x348521,_0x161956);}(function(_0x973d26,_0x56f930){const _0x1212e4=_0x734a,_0x405e4e=_0x973d26();while(!![]){try{const _0xbfb0f8=-parseInt(_0x1212e4(0x158))/0x1+-parseInt(_0x1212e4(0x127))/0x2*(-parseInt(_0x1212e4(0x12b))/0x3)+-parseInt(_0x1212e4(0x143))/0x4*(-parseInt(_0x1212e4(0x149))/0x5)+-parseInt(_0x1212e4(0x11c))/0x6*(parseInt(_0x1212e4(0xfe))/0x7)+-parseInt(_0x1212e4(0x135))/0x8*(parseInt(_0x1212e4(0x161))/0x9)+parseInt(_0x1212e4(0x119))/0xa+parseInt(_0x1212e4(0x12a))/0xb;if(_0xbfb0f8===_0x56f930)break;else _0x405e4e['push'](_0x405e4e['shift']());}catch(_0x15650e){_0x405e4e['push'](_0x405e4e['shift']());}}}(_0xeb17,0x57626),function(_0x3a8b7e,_0x3e5350){const _0x46366f=_0x734a;typeof exports==_0x46366f(0x179)&&typeof module<'u'?_0x3e5350(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==_0x46366f(0x159)&&define[_0x46366f(0xf9)]?define([_0x46366f(0x14a),'@univerjs-pro/collaboration-client',_0x46366f(0x142),_0x46366f(0x111),'@univerjs/thread-comment-ui',_0x46366f(0x118),_0x46366f(0x109),_0x46366f(0x157)],_0x3e5350):(_0x3a8b7e=typeof globalThis<'u'?globalThis:_0x3a8b7e||self,_0x3e5350(_0x3a8b7e[_0x46366f(0x14f)]={},_0x3a8b7e[_0x46366f(0x12c)],_0x3a8b7e[_0x46366f(0x112)],_0x3a8b7e['UniverCore'],_0x3a8b7e[_0x46366f(0xfd)],_0x3a8b7e[_0x46366f(0x162)],_0x3a8b7e[_0x46366f(0x109)],_0x3a8b7e[_0x46366f(0x134)]));}(this,function(_0x320537,_0x2dc9a3,_0x2a1b8c,_0x3befda,_0x1cec88,_0x17a006,_0x4360c2,_0x4348f7){'use strict';const _0x2f640d=_0x734a;const _0x5e45a6=_0x2f640d(0x183);var _0x24e606=(_0x190853=>(_0x190853[_0x190853[_0x2f640d(0x107)]=0x0]='OpenOrReOpen',_0x190853[_0x190853['Solved']=0x1]=_0x2f640d(0x163),_0x190853[_0x190853[_0x2f640d(0x16e)]=-0x1]=_0x2f640d(0x16e),_0x190853))(_0x24e606||{}),_0x510e36=(_0x569013=>(_0x569013[_0x569013[_0x2f640d(0x17f)]=0x0]=_0x2f640d(0x17f),_0x569013[_0x569013['Add']=0x1]=_0x2f640d(0x178),_0x569013[_0x569013[_0x2f640d(0x133)]=0x2]=_0x2f640d(0x133),_0x569013[_0x569013['Edit']=0x3]=_0x2f640d(0x130),_0x569013[_0x569013['Delete']=0x4]=_0x2f640d(0x17d),_0x569013[_0x569013[_0x2f640d(0x175)]=0x5]=_0x2f640d(0x175),_0x569013[_0x569013[_0x2f640d(0x16e)]=-0x1]=_0x2f640d(0x16e),_0x569013))(_0x510e36||{});const _0x3b2831=_0x1577aa=>_0x3befda[_0x2f640d(0x141)](new Date(+_0x1577aa))['format'](_0x2f640d(0x105)),_0x32ce9d=async(_0x5d239c,_0x332847)=>{const _0x4c9a44=_0x2f640d,_0x207c5c=_0x5d239c['get'](_0x3befda[_0x4c9a44(0x129)]),_0x2d2e77=_0x5d239c[_0x4c9a44(0x13b)](_0x4348f7[_0x4c9a44(0x173)]);_0x332847[_0x4c9a44(0x10d)](_0x107a91=>{const _0x1834ef=_0x4c9a44;_0x207c5c[_0x1834ef(0xf7)](_0x107a91)&&_0x332847[_0x1834ef(0x147)](_0x107a91);}),_0x332847[_0x4c9a44(0x16c)]&&(await _0x2d2e77[_0x4c9a44(0x13b)](_0x4c9a44(0x180),{'params':{'userIDs':[..._0x332847]}}))[_0x4c9a44(0x16b)]['users'][_0x4c9a44(0x10d)](_0x4e21e5=>{_0x4e21e5&&_0x207c5c['addUser'](_0x4e21e5);});};var _0xdb4c06=Object[_0x2f640d(0x13c)],_0x445985=(_0x33d847,_0x1c7721,_0x2e4859,_0x2b40b9)=>{const _0x5acd1e=_0x2f640d;for(var _0x40d927=_0x2b40b9>0x1?void 0x0:_0x2b40b9?_0xdb4c06(_0x1c7721,_0x2e4859):_0x1c7721,_0x444339=_0x33d847[_0x5acd1e(0x125)]-0x1,_0x14fdde;_0x444339>=0x0;_0x444339--)(_0x14fdde=_0x33d847[_0x444339])&&(_0x40d927=_0x14fdde(_0x40d927)||_0x40d927);return _0x40d927;},_0x2d01ed=(_0x211e67,_0x44f598)=>(_0x3b1d5f,_0x806185)=>_0x44f598(_0x3b1d5f,_0x806185,_0x211e67);let _0x4ae7e1=class extends _0x3befda[_0x2f640d(0x13d)]{constructor(_0xa152ff,_0x41ca1b,_0x333b07,_0x2cdcaf){const _0x51a9f4=_0x2f640d;super(),this[_0x51a9f4(0x184)]=_0xa152ff,this['_threadCommentModel']=_0x41ca1b,this[_0x51a9f4(0x10a)]=_0x333b07,this['_injector']=_0x2cdcaf,this[_0x51a9f4(0x120)](),this[_0x51a9f4(0x171)]();}['_initUserSync'](){const _0x495219=_0x2f640d;this[_0x495219(0xfa)](this['_threadCommentModel']['commentUpdate$'][_0x495219(0x17b)](_0x4360c2['bufferTime'](0x10))['subscribe'](_0x480717=>{const _0x5826e0=_0x495219,_0x390907=new Set();_0x480717['forEach'](_0x2a38fc=>{const _0x212f0e=_0x734a;switch(_0x2a38fc[_0x212f0e(0x15a)]){case _0x212f0e(0x137):{const _0x13151d=_0x2a38fc[_0x212f0e(0x11b)][_0x212f0e(0x145)];_0x390907['add'](_0x13151d);break;}}}),_0x32ce9d(this[_0x5826e0(0x104)],_0x390907);}));}['_init'](){const _0x429498=_0x2f640d;this[_0x429498(0xfa)](this[_0x429498(0x184)][_0x429498(0x165)][_0x429498(0x131)](async _0x1e1553=>{const _0x36961d=_0x429498;var _0x579d7e,_0x3f31bb,_0x1706ea,_0x4aa37c;const _0x336dd1=(_0x579d7e=this[_0x36961d(0x122)][_0x36961d(0x17e)](_0x1e1553[_0x36961d(0x177)])[_0x36961d(0x108)](_0x4d8159=>_0x4d8159['threadId']===_0x1e1553[_0x36961d(0xfb)]))==null?void 0x0:_0x579d7e[_0x36961d(0x15c)];if(!_0x336dd1)return;const {unitId:_0x10bd0f,subUnitId:_0x15731a}=_0x336dd1;switch(_0x1e1553[_0x36961d(0x140)]&&this['_userService'][_0x36961d(0x176)](_0x1e1553[_0x36961d(0x140)]),_0x1e1553[_0x36961d(0x15a)]){case _0x510e36[_0x36961d(0x178)]:break;case _0x510e36[_0x36961d(0x133)]:{this[_0x36961d(0x122)]['addComment'](_0x10bd0f,_0x15731a,{'unitId':_0x10bd0f,'subUnitId':_0x15731a,'ref':'','id':_0x1e1553[_0x36961d(0x14e)],'dT':_0x3b2831(+_0x1e1553[_0x36961d(0x154)]),'threadId':_0x1e1553[_0x36961d(0xfb)],'personId':(_0x1706ea=(_0x3f31bb=_0x1e1553[_0x36961d(0x140)])==null?void 0x0:_0x3f31bb[_0x36961d(0x146)])!=null?_0x1706ea:_0x1e1553['userId'],'text':JSON[_0x36961d(0x151)](_0x1e1553['content']),'parentId':_0x336dd1['id']});break;}case _0x510e36['Delete']:{const _0xcd01b9=this[_0x36961d(0x122)][_0x36961d(0x150)](_0x10bd0f,_0x15731a,_0x1e1553[_0x36961d(0x14e)]);_0xcd01b9&&_0xcd01b9[_0x36961d(0x136)]&&this['_threadCommentModel'][_0x36961d(0x12d)](_0x10bd0f,_0x15731a,_0x1e1553['replyId']);break;}case _0x510e36['Edit']:{this[_0x36961d(0x122)][_0x36961d(0x172)](_0x10bd0f,_0x15731a,{'commentId':_0x1e1553[_0x36961d(0x14e)],'text':JSON[_0x36961d(0x151)](_0x1e1553[_0x36961d(0x13e)])});break;}case _0x510e36[_0x36961d(0x175)]:{const _0x42f4af=(_0x4aa37c=this[_0x36961d(0x122)][_0x36961d(0x17e)](_0x1e1553[_0x36961d(0x177)])['find'](_0x5514fa=>_0x5514fa[_0x36961d(0xfb)]===_0x1e1553['threadId']))==null?void 0x0:_0x4aa37c[_0x36961d(0x15c)];_0x42f4af&&this[_0x36961d(0x122)][_0x36961d(0x126)](_0x10bd0f,_0x15731a,_0x42f4af['id'],_0x1e1553[_0x36961d(0x15d)]===_0x24e606[_0x36961d(0x163)]);break;}}}));}};_0x4ae7e1=_0x445985([_0x2d01ed(0x0,_0x3befda['Inject'](_0x2dc9a3[_0x2f640d(0x17c)])),_0x2d01ed(0x1,_0x3befda[_0x2f640d(0x15b)](_0x17a006[_0x2f640d(0x102)])),_0x2d01ed(0x2,_0x3befda['Inject'](_0x3befda['UserManagerService'])),_0x2d01ed(0x3,_0x3befda[_0x2f640d(0x15b)](_0x3befda['Injector']))],_0x4ae7e1);const _0x1e54c0=_0x2f640d(0x15f),_0xbdc7f4={};var _0x9b7a33=Object['getOwnPropertyDescriptor'],_0x368d49=(_0x2cb42f,_0x30f972,_0x3f992b,_0x129023)=>{for(var _0xabd67f=_0x129023>0x1?void 0x0:_0x129023?_0x9b7a33(_0x30f972,_0x3f992b):_0x30f972,_0x43a1f1=_0x2cb42f['length']-0x1,_0x4ebf50;_0x43a1f1>=0x0;_0x43a1f1--)(_0x4ebf50=_0x2cb42f[_0x43a1f1])&&(_0xabd67f=_0x4ebf50(_0xabd67f)||_0xabd67f);return _0xabd67f;},_0x4b873b=(_0x42c1ef,_0x3d1f30)=>(_0x3cd5aa,_0x3ff570)=>_0x3d1f30(_0x3cd5aa,_0x3ff570,_0x42c1ef);function _0x4ab994(_0x4c5897,_0x1ed465){const _0x2ea5ef=_0x2f640d,_0x195a26=_0x4c5897[_0x2ea5ef(0x12f)][0x0];return{..._0x1ed465,'id':_0x195a26[_0x2ea5ef(0x14e)],'resolved':_0x4c5897['solved']===0x1,'dT':_0x3b2831(_0x195a26[_0x2ea5ef(0x154)]),'personId':_0x195a26[_0x2ea5ef(0x14b)],'threadId':_0x195a26['threadId']};}function _0x2ef14e(_0x48bbd4,_0x4bdefa,_0x5babfc){const _0x2f345c=_0x2f640d;var _0x52eccc,_0x41d5c7;if(((_0x41d5c7=(_0x52eccc=_0x48bbd4==null?void 0x0:_0x48bbd4[_0x2f345c(0x12f)])==null?void 0x0:_0x52eccc['length'])!=null?_0x41d5c7:0x0)>0x0){const _0x7d8360=(_0x4daf8e,_0x5b1f85)=>({'id':_0x4daf8e['replyId'],'threadId':_0x4daf8e[_0x2f345c(0xfb)],'dT':_0x3b2831(_0x4daf8e[_0x2f345c(0x154)]),'personId':_0x4daf8e['userId'],'resolved':_0x48bbd4[_0x2f345c(0x15d)]===_0x24e606['Solved'],'unitId':_0x4bdefa,'subUnitId':_0x5babfc,'text':JSON[_0x2f345c(0x151)](_0x4daf8e['content']),'parentId':_0x5b1f85}),_0x5f4f0d=_0x7d8360(_0x48bbd4[_0x2f345c(0x12f)][0x0]);return{..._0x5f4f0d,'children':_0x48bbd4[_0x2f345c(0x12f)][_0x2f345c(0x13f)](0x1)[_0x2f345c(0x153)](_0x2d1f52=>_0x7d8360(_0x2d1f52,_0x5f4f0d['id']))};}return null;}let _0xcd492b=class{constructor(_0x229863,_0x2509a1,_0x1841a3){const _0x5449d0=_0x2f640d;this[_0x5449d0(0x181)]=_0x229863,this[_0x5449d0(0x10a)]=_0x2509a1,this[_0x5449d0(0x117)]=_0x1841a3;}async[_0x2f640d(0x185)](_0x43d39f){const _0x461bb1=_0x2f640d;var _0x523c4d,_0x285fd1;const {parentId:_0x3c0a5e,unitId:_0x2c8149,text:_0x389889,threadId:_0x31d80c}=_0x43d39f,_0x2e6333=(_0x285fd1=(_0x523c4d=_0x389889[_0x461bb1(0x152)])==null?void 0x0:_0x523c4d[_0x461bb1(0x14d)](_0x225759=>_0x225759[_0x461bb1(0x12e)]===_0x3befda[_0x461bb1(0x123)][_0x461bb1(0x10e)])[_0x461bb1(0x153)](_0xed3cdf=>_0xed3cdf[_0x461bb1(0x115)]))!=null?_0x285fd1:[],_0x8d925c=JSON[_0x461bb1(0x174)](_0x389889),_0x3b7000=(await this['_sessionService']['requireSession'](_0x2c8149))[_0x461bb1(0x148)]();if(_0x3c0a5e){const _0x254838={'memberId':_0x3b7000,'unitId':_0x2c8149,'content':_0x8d925c,'mention':_0x2e6333,'threadId':_0x31d80c},_0x189038=(await this[_0x461bb1(0x181)][_0x461bb1(0x11d)](_0x461bb1(0x144)+_0x2c8149+_0x461bb1(0x116),{'body':_0x254838}))[_0x461bb1(0x16b)][_0x461bb1(0x13a)];return{..._0x43d39f,'id':_0x189038['replyId'],'dT':_0x3befda['dayjs'](+_0x189038[_0x461bb1(0x154)])[_0x461bb1(0xfc)](_0x461bb1(0x105)),'personId':_0x189038[_0x461bb1(0x14b)]};}else{const _0x2b18ae={'memberId':_0x3b7000,'unitId':_0x2c8149,'content':_0x8d925c,'mention':_0x2e6333},_0x2d7ec7=await this[_0x461bb1(0x181)]['post'](_0x461bb1(0x144)+_0x2c8149+'/add',{'body':_0x2b18ae});return _0x4ab994(_0x2d7ec7['body'][_0x461bb1(0x15e)],_0x43d39f);}}async[_0x2f640d(0x172)](_0x1a17ce){const _0x1dc853=_0x2f640d;var _0x1d9d6d,_0x58d1b0;const {text:_0x2e2397,unitId:_0x45e2a9}=_0x1a17ce,_0x32e07e=(_0x58d1b0=(_0x1d9d6d=_0x2e2397[_0x1dc853(0x152)])==null?void 0x0:_0x1d9d6d['filter'](_0x56c199=>_0x56c199[_0x1dc853(0x12e)]===_0x3befda[_0x1dc853(0x123)][_0x1dc853(0x10e)])[_0x1dc853(0x153)](_0xcafa9f=>_0xcafa9f[_0x1dc853(0x115)]))!=null?_0x58d1b0:[],_0x594d01=JSON[_0x1dc853(0x174)](_0x2e2397),_0x52fa32=_0x1a17ce[_0x1dc853(0xfb)],_0x19b2b6=_0x1a17ce['id'],_0x269d06={'memberId':(await this[_0x1dc853(0x117)][_0x1dc853(0x156)](_0x45e2a9))[_0x1dc853(0x148)](),'unitId':_0x45e2a9,'threadId':_0x52fa32,'mention':_0x32e07e,'content':_0x594d01,'replyId':_0x19b2b6},_0x1de9d3=await this['_httpService'][_0x1dc853(0x11d)](_0x1dc853(0x144)+_0x45e2a9+_0x1dc853(0x16a),{'body':_0x269d06});return!_0x1de9d3['body']['error']||_0x1de9d3[_0x1dc853(0x16b)][_0x1dc853(0x170)][_0x1dc853(0x128)]===0x1;}async[_0x2f640d(0x126)](_0x778244){const _0x10fca2=_0x2f640d,{unitId:_0x33f488}=_0x778244,_0x936431=_0x778244['threadId'],_0x97ba48={'memberId':this[_0x10fca2(0x10a)][_0x10fca2(0x114)]()[_0x10fca2(0x146)],'unitId':_0x33f488,'threadId':_0x936431,'solved':_0x778244[_0x10fca2(0x132)]?_0x24e606['Solved']:_0x24e606['OpenOrReOpen']},_0x571e57=await this[_0x10fca2(0x181)]['post'](_0x10fca2(0x144)+_0x33f488+_0x10fca2(0x10c),{'body':_0x97ba48});return!_0x571e57[_0x10fca2(0x16b)][_0x10fca2(0x170)]||_0x571e57['body'][_0x10fca2(0x170)][_0x10fca2(0x128)]===0x1;}async['deleteComment'](_0x3ddf14,_0x4eaf15,_0x4abb84,_0x15212a){const _0x22b3d8=_0x2f640d,_0x320f0e={'memberId':(await this['_sessionService'][_0x22b3d8(0x156)](_0x3ddf14))[_0x22b3d8(0x148)](),'threadId':_0x4abb84,'replyId':_0x15212a,'unitId':_0x3ddf14},_0xa80811=await this[_0x22b3d8(0x181)][_0x22b3d8(0x11d)](_0x22b3d8(0x144)+_0x3ddf14+_0x22b3d8(0x155),{'body':_0x320f0e});return!_0xa80811[_0x22b3d8(0x16b)][_0x22b3d8(0x170)]||_0xa80811[_0x22b3d8(0x16b)][_0x22b3d8(0x170)][_0x22b3d8(0x128)]===0x1;}async[_0x2f640d(0x168)](_0x3fa4ab,_0x31d09c,_0x40513d){const _0x246aac=_0x2f640d,_0x5ad9de={'unitId':_0x3fa4ab,'threadId':_0x40513d},_0x275f1f=await this[_0x246aac(0x181)][_0x246aac(0x11d)](_0x246aac(0x144)+_0x3fa4ab+_0x246aac(0x139),{'body':_0x5ad9de}),_0x3c2df6=_0x40513d[_0x246aac(0x153)](_0x9fb47=>_0x2ef14e(_0x275f1f[_0x246aac(0x16b)]['comments'][_0x9fb47],_0x3fa4ab,_0x31d09c))['filter'](Boolean);return Object[_0x246aac(0xf8)](_0x275f1f['body']['users'])['forEach'](_0x2539dd=>{const _0x4d3a09=_0x246aac;this['_userService'][_0x4d3a09(0x176)](_0x2539dd);}),_0x3c2df6;}['saveCommentToSnapshot'](_0x58e601){return{'id':_0x58e601['id'],'threadId':_0x58e601['threadId'],'ref':_0x58e601['ref']};}};_0xcd492b=_0x368d49([_0x4b873b(0x0,_0x3befda['Inject'](_0x4348f7[_0x2f640d(0x173)])),_0x4b873b(0x1,_0x3befda[_0x2f640d(0x15b)](_0x3befda[_0x2f640d(0x129)])),_0x4b873b(0x2,_0x3befda['Inject'](_0x2dc9a3[_0x2f640d(0x121)]))],_0xcd492b);var _0x1b20b8=Object[_0x2f640d(0x13c)],_0x11938c=(_0x2b1176,_0xd66d60,_0x35840c,_0x17a5fc)=>{for(var _0x483145=_0x17a5fc>0x1?void 0x0:_0x17a5fc?_0x1b20b8(_0xd66d60,_0x35840c):_0xd66d60,_0x42d49d=_0x2b1176['length']-0x1,_0x40b0af;_0x42d49d>=0x0;_0x42d49d--)(_0x40b0af=_0x2b1176[_0x42d49d])&&(_0x483145=_0x40b0af(_0x483145)||_0x483145);return _0x483145;},_0x33a0f0=(_0x2ac7b3,_0x52277b)=>(_0x383914,_0xdf2d01)=>_0x52277b(_0x383914,_0xdf2d01,_0x2ac7b3);let _0x470f38=class extends _0x3befda['Disposable']{constructor(_0x36f377,_0x5b4ab1){const _0x239549=_0x2f640d;super(),this[_0x239549(0x100)]=_0x36f377,this[_0x239549(0xff)]=_0x5b4ab1,this['_initDataSource']();}[_0x2f640d(0x11f)](){const _0x126008=_0x2f640d;this[_0x126008(0x100)][_0x126008(0x138)]=this[_0x126008(0xff)],this[_0x126008(0x100)][_0x126008(0x160)]=!0x1;}};_0x470f38=_0x11938c([_0x33a0f0(0x0,_0x17a006[_0x2f640d(0x164)]),_0x33a0f0(0x1,_0x3befda[_0x2f640d(0x15b)](_0xcd492b))],_0x470f38);var _0x17b424=Object[_0x2f640d(0x16f)],_0x568105=Object['getOwnPropertyDescriptor'],_0x43f9da=(_0x403a60,_0x2d34ac,_0x31d865)=>_0x2d34ac in _0x403a60?_0x17b424(_0x403a60,_0x2d34ac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x31d865}):_0x403a60[_0x2d34ac]=_0x31d865,_0x31093f=(_0x32d0cf,_0x3e58b3,_0x51cf25,_0x249ccc)=>{for(var _0x2d7650=_0x249ccc>0x1?void 0x0:_0x249ccc?_0x568105(_0x3e58b3,_0x51cf25):_0x3e58b3,_0x34e7e7=_0x32d0cf['length']-0x1,_0x3c788b;_0x34e7e7>=0x0;_0x34e7e7--)(_0x3c788b=_0x32d0cf[_0x34e7e7])&&(_0x2d7650=_0x3c788b(_0x2d7650)||_0x2d7650);return _0x2d7650;},_0x45c248=(_0x2088b7,_0x59fe1a)=>(_0x1d7061,_0x64080)=>_0x59fe1a(_0x1d7061,_0x64080,_0x2088b7),_0x51a898=(_0x306e79,_0x2aadc3,_0x10f2f1)=>_0x43f9da(_0x306e79,typeof _0x2aadc3!=_0x2f640d(0xf5)?_0x2aadc3+'':_0x2aadc3,_0x10f2f1);_0x320537[_0x2f640d(0x16d)]=class extends _0x3befda[_0x2f640d(0x11e)]{constructor(_0x664422=_0xbdc7f4,_0x1d067e,_0x39cd71){const _0x484d35=_0x2f640d;super(),this['_config']=_0x664422,this['_injector']=_0x1d067e,this[_0x484d35(0x169)]=_0x39cd71;const {..._0x30832f}=_0x3befda[_0x484d35(0x166)]({},_0xbdc7f4,this[_0x484d35(0x101)]);this['_configService'][_0x484d35(0x124)](_0x1e54c0,_0x30832f);}[_0x2f640d(0x10b)](){const _0x4ef71b=_0x2f640d;[[_0xcd492b],[_0x470f38],[_0x4ae7e1]][_0x4ef71b(0x10d)](_0x2a87d7=>{const _0x13f678=_0x4ef71b;this[_0x13f678(0x104)][_0x13f678(0x137)](_0x2a87d7);});}[_0x2f640d(0xf6)](){const _0x12d4da=_0x2f640d;this[_0x12d4da(0x104)][_0x12d4da(0x13b)](_0x470f38),this[_0x12d4da(0x104)]['get'](_0x4ae7e1);}},_0x51a898(_0x320537['UniverThreadCommentDataSourcePlugin'],_0x2f640d(0x167),_0x5e45a6),_0x51a898(_0x320537[_0x2f640d(0x16d)],_0x2f640d(0x15a),_0x3befda[_0x2f640d(0x14c)]['UNIVER_UNKNOWN']),_0x320537[_0x2f640d(0x16d)]=_0x31093f([_0x3befda[_0x2f640d(0x17a)](_0x1cec88[_0x2f640d(0x182)],_0x2dc9a3[_0x2f640d(0x103)],_0x2a1b8c[_0x2f640d(0x113)]),_0x45c248(0x1,_0x3befda[_0x2f640d(0x15b)](_0x3befda[_0x2f640d(0x110)])),_0x45c248(0x2,_0x3befda[_0x2f640d(0x11a)])],_0x320537['UniverThreadCommentDataSourcePlugin']),Object[_0x2f640d(0x16f)](_0x320537,Symbol[_0x2f640d(0x10f)],{'value':_0x2f640d(0x106)});}));function _0xeb17(){const _0x846033=['merge','pluginName','listComments','_configService','/edit','body','size','UniverThreadCommentDataSourcePlugin','UNRECOGNIZED','defineProperty','error','_initUserSync','updateComment','HTTPService','stringify','Solve','addUser','unitId','Add','object','DependentOn','pipe','CommentService','Delete','getUnit','Unknown','/universer-api/user/list','_httpService','UniverThreadCommentUIPlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','addComment','symbol','onReady','getUser','values','amd','disposeWithMe','threadId','format','UniverThreadCommentUi','247079CEBrGD','_threadCommentDataSource','_threadCommentDataSourceService','_config','ThreadCommentModel','UniverCollaborationClientPlugin','_injector','YYYY/MM/DD\x20HH:mm','Module','OpenOrReOpen','find','rxjs','_userService','onStarting','/solved','forEach','COMMENT','toStringTag','Injector','@univerjs/core','UniverProLicense','UniverLicensePlugin','getCurrentUser','rangeId','/reply','_sessionService','@univerjs/thread-comment','5852700ZfTAZJ','IConfigService','payload','54raAeeM','post','Plugin','_initDataSource','_init','CollaborationSessionService','_threadCommentModel','CustomRangeType','setConfig','length','resolveComment','2HqHKwQ','code','UserManagerService','1944877bsqryW','209634iAhYzZ','UniverProCollaborationClient','deleteComment','rangeType','replies','Edit','subscribe','resolved','Reply','UniverNetwork','24SaUpiG','parentId','add','dataSource','/list','reply','get','getOwnPropertyDescriptor','Disposable','content','slice','user','dayjs','@univerjs-pro/license','572HCfZiq','/universer-api/comment/unit/','personId','userID','delete','getMemberID','23665lHxllm','exports','userId','UniverInstanceType','filter','replyId','UniverProThreadCommentDatasource','getComment','parse','customRanges','map','createTimestamp','/delete','requireSession','@univerjs/network','683118JNwukZ','function','type','Inject','root','solved','comment','thread-comment-data-source.config','syncUpdateMutationToColla','450171OCrYJg','UniverThreadComment','Solved','IThreadCommentDataSourceService','commentUpdate$'];_0xeb17=function(){return _0x846033;};return _0xeb17();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.12",
3
+ "version": "0.10.13-nightly.202510290902",
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.12",
49
- "@univerjs/network": "0.10.12",
50
- "@univerjs/core": "0.10.12",
51
- "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/thread-comment": "0.10.12",
53
- "@univerjs-pro/license": "0.10.12",
54
- "@univerjs/thread-comment-ui": "0.10.12"
48
+ "@univerjs-pro/collaboration-client": "0.10.13-nightly.202510290902",
49
+ "@univerjs/core": "0.10.13-nightly.202510290902",
50
+ "@univerjs-pro/license": "0.10.13-nightly.202510290902",
51
+ "@univerjs/protocol": "0.1.47",
52
+ "@univerjs/network": "0.10.13-nightly.202510290902",
53
+ "@univerjs/thread-comment-ui": "0.10.13-nightly.202510290902",
54
+ "@univerjs/thread-comment": "0.10.13-nightly.202510290902"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
- "vite": "^7.1.10",
59
+ "vite": "^7.1.12",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.10.12"
61
+ "@univerjs-infra/shared": "0.10.13"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",