@univerjs-pro/thread-comment-datasource 0.6.10-experimental.20250421-e4eb9bc → 0.6.10-experimental.20250424-9e348ed
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x588ebe=_0x4453;(function(_0x1b26e3,_0x282bcf){const _0x5a62c5=_0x4453,_0x4ea96e=_0x1b26e3();while(!![]){try{const _0x5819dc=-parseInt(_0x5a62c5(0xc7))/0x1+parseInt(_0x5a62c5(0xd2))/0x2+parseInt(_0x5a62c5(0xe7))/0x3+parseInt(_0x5a62c5(0xc9))/0x4+parseInt(_0x5a62c5(0x95))/0x5+parseInt(_0x5a62c5(0x74))/0x6*(-parseInt(_0x5a62c5(0xa5))/0x7)+parseInt(_0x5a62c5(0xb0))/0x8*(-parseInt(_0x5a62c5(0xbb))/0x9);if(_0x5819dc===_0x282bcf)break;else _0x4ea96e['push'](_0x4ea96e['shift']());}catch(_0x546a4d){_0x4ea96e['push'](_0x4ea96e['shift']());}}}(_0x38b1,0xa32cf));Object[_0x588ebe(0xcd)](exports,Symbol['toStringTag'],{'value':_0x588ebe(0xd6)});const b=require(_0x588ebe(0xa8)),T=require(_0x588ebe(0x7b)),c=require(_0x588ebe(0x76)),j=require(_0x588ebe(0xbe)),M=require(_0x588ebe(0xe5)),w=require(_0x588ebe(0xa7)),P=require(_0x588ebe(0xcc)),U=_0x588ebe(0x77);function _0x4453(_0x5c3ccf,_0x7e319f){const _0x38b17b=_0x38b1();return _0x4453=function(_0x44536,_0xac7f3b){_0x44536=_0x44536-0x66;let _0x52845c=_0x38b17b[_0x44536];return _0x52845c;},_0x4453(_0x5c3ccf,_0x7e319f);}var I=(_0x4e2ba8=>(_0x4e2ba8[_0x4e2ba8[_0x588ebe(0x97)]=0x0]=_0x588ebe(0x97),_0x4e2ba8[_0x4e2ba8[_0x588ebe(0x84)]=0x1]=_0x588ebe(0x84),_0x4e2ba8[_0x4e2ba8['UNRECOGNIZED']=-0x1]=_0x588ebe(0x70),_0x4e2ba8))(I||{}),v=(_0x26f3d6=>(_0x26f3d6[_0x26f3d6[_0x588ebe(0x69)]=0x0]=_0x588ebe(0x69),_0x26f3d6[_0x26f3d6['Add']=0x1]=_0x588ebe(0xdc),_0x26f3d6[_0x26f3d6['Reply']=0x2]='Reply',_0x26f3d6[_0x26f3d6[_0x588ebe(0xc2)]=0x3]=_0x588ebe(0xc2),_0x26f3d6[_0x26f3d6[_0x588ebe(0xb1)]=0x4]='Delete',_0x26f3d6[_0x26f3d6[_0x588ebe(0x86)]=0x5]='Solve',_0x26f3d6[_0x26f3d6[_0x588ebe(0x70)]=-0x1]=_0x588ebe(0x70),_0x26f3d6))(v||{});const f=_0x415986=>c[_0x588ebe(0xba)](new Date(+_0x415986))['format'](_0x588ebe(0xdb)),R=async(_0x165d8e,_0x3a9554)=>{const _0x296b1f=_0x588ebe,_0x37acbb=_0x165d8e['get'](c[_0x296b1f(0x9b)]),_0x34c100=_0x165d8e[_0x296b1f(0xca)](P[_0x296b1f(0xc1)]);_0x3a9554[_0x296b1f(0x6f)](_0x4ba3d4=>{const _0x423f7c=_0x296b1f;_0x37acbb['getUser'](_0x4ba3d4)&&_0x3a9554[_0x423f7c(0xa3)](_0x4ba3d4);}),_0x3a9554[_0x296b1f(0xd0)]&&(await _0x34c100[_0x296b1f(0xca)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3a9554]}}))[_0x296b1f(0xce)][_0x296b1f(0xb5)][_0x296b1f(0x6f)](_0x209b07=>{const _0x9cb877=_0x296b1f;_0x209b07&&_0x37acbb[_0x9cb877(0x96)](_0x209b07);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x4b75cf,_0x14cdf9,_0x18924a,_0x2a5351)=>{for(var _0x400ee4=_0x2a5351>0x1?void 0x0:_0x2a5351?$(_0x14cdf9,_0x18924a):_0x14cdf9,_0x3acf77=_0x4b75cf['length']-0x1,_0x488b88;_0x3acf77>=0x0;_0x3acf77--)(_0x488b88=_0x4b75cf[_0x3acf77])&&(_0x400ee4=_0x488b88(_0x400ee4)||_0x400ee4);return _0x400ee4;},S=(_0x535a50,_0x1263bc)=>(_0x22b249,_0x4e416e)=>_0x1263bc(_0x22b249,_0x4e416e,_0x535a50);let p=class extends c[_0x588ebe(0xc8)]{constructor(_0x87bdaa,_0x416a42,_0xd8c281,_0x2bfa25){const _0x318912=_0x588ebe;super(),this['_commentService']=_0x87bdaa,this[_0x318912(0xa1)]=_0x416a42,this[_0x318912(0xd9)]=_0xd8c281,this[_0x318912(0x9d)]=_0x2bfa25,this[_0x318912(0xc6)](),this['_initUserSync']();}[_0x588ebe(0x7e)](){const _0x1132b1=_0x588ebe;this[_0x1132b1(0xd5)](this[_0x1132b1(0xa1)]['commentUpdate$'][_0x1132b1(0x9f)](w[_0x1132b1(0x88)](0x10))['subscribe'](_0x53b44d=>{const _0x4a163c=_0x1132b1,_0x34d77d=new Set();_0x53b44d[_0x4a163c(0x6f)](_0x17fdc2=>{const _0x53f26b=_0x4a163c;switch(_0x17fdc2[_0x53f26b(0x90)]){case'add':{const _0x2c64e7=_0x17fdc2[_0x53f26b(0x8e)][_0x53f26b(0xa2)];_0x34d77d[_0x53f26b(0x83)](_0x2c64e7);break;}}}),R(this['_injector'],_0x34d77d);}));}[_0x588ebe(0xc6)](){const _0x1dc675=_0x588ebe;this[_0x1dc675(0xd5)](this[_0x1dc675(0x6b)][_0x1dc675(0x8b)][_0x1dc675(0x9c)](async _0x36faea=>{const _0x5e3fbf=_0x1dc675;var _0x5b7388,_0x22626d,_0x5bc60e,_0x540c08;const _0x47469e=(_0x5b7388=this[_0x5e3fbf(0xa1)][_0x5e3fbf(0x85)](_0x36faea[_0x5e3fbf(0xac)])[_0x5e3fbf(0xc4)](_0x4e0b9d=>_0x4e0b9d[_0x5e3fbf(0x9e)]===_0x36faea['threadId']))==null?void 0x0:_0x5b7388[_0x5e3fbf(0xb6)];if(!_0x47469e)return;const {unitId:_0x70bea8,subUnitId:_0x40f93a}=_0x47469e;switch(_0x36faea[_0x5e3fbf(0xaf)]&&this[_0x5e3fbf(0xd9)][_0x5e3fbf(0x96)](_0x36faea[_0x5e3fbf(0xaf)]),_0x36faea[_0x5e3fbf(0x90)]){case v['Add']:break;case v[_0x5e3fbf(0xd8)]:{this[_0x5e3fbf(0xa1)][_0x5e3fbf(0xd1)](_0x70bea8,_0x40f93a,{'unitId':_0x70bea8,'subUnitId':_0x40f93a,'ref':'','id':_0x36faea[_0x5e3fbf(0x94)],'dT':f(+_0x36faea[_0x5e3fbf(0xd4)]),'threadId':_0x36faea[_0x5e3fbf(0x9e)],'personId':(_0x5bc60e=(_0x22626d=_0x36faea[_0x5e3fbf(0xaf)])==null?void 0x0:_0x22626d[_0x5e3fbf(0xbf)])!=null?_0x5bc60e:_0x36faea[_0x5e3fbf(0xdd)],'text':JSON['parse'](_0x36faea[_0x5e3fbf(0xbd)]),'parentId':_0x47469e['id']});break;}case v[_0x5e3fbf(0xb1)]:{const _0x48163b=this[_0x5e3fbf(0xa1)][_0x5e3fbf(0xcf)](_0x70bea8,_0x40f93a,_0x36faea['replyId']);_0x48163b&&_0x48163b[_0x5e3fbf(0x87)]&&this[_0x5e3fbf(0xa1)][_0x5e3fbf(0xe1)](_0x70bea8,_0x40f93a,_0x36faea[_0x5e3fbf(0x94)]);break;}case v[_0x5e3fbf(0xc2)]:{this[_0x5e3fbf(0xa1)]['updateComment'](_0x70bea8,_0x40f93a,{'commentId':_0x36faea[_0x5e3fbf(0x94)],'text':JSON[_0x5e3fbf(0x92)](_0x36faea[_0x5e3fbf(0xbd)])});break;}case v[_0x5e3fbf(0x86)]:{const _0x1fdcb6=(_0x540c08=this[_0x5e3fbf(0xa1)]['getUnit'](_0x36faea['unitId'])[_0x5e3fbf(0xc4)](_0x1dd8ff=>_0x1dd8ff[_0x5e3fbf(0x9e)]===_0x36faea[_0x5e3fbf(0x9e)]))==null?void 0x0:_0x540c08[_0x5e3fbf(0xb6)];_0x1fdcb6&&this['_threadCommentModel'][_0x5e3fbf(0x73)](_0x70bea8,_0x40f93a,_0x1fdcb6['id'],_0x36faea['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x588ebe(0x79)])),S(0x1,c[_0x588ebe(0xb8)](M[_0x588ebe(0xbc)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c[_0x588ebe(0xb8)](c[_0x588ebe(0xa4)]))],p);const q=_0x588ebe(0x99),D={};function _0x38b1(){const _0x3aaf74=['unitId','_httpService','ref','user','460632wjyioD','Delete','map','reply','length','users','root','saveCommentToSnapshot','Inject','_threadCommentDataSourceService','dayjs','126RbdQHh','ThreadCommentModel','content','@univerjs/thread-comment-ui','userID','syncUpdateMutationToColla','HTTPService','Edit','stringify','find','/solved','_init','861183jQynnH','Disposable','2879476WaxIAd','get','getOwnPropertyDescriptor','@univerjs/network','defineProperty','body','getComment','size','addComment','1346760DjbxQU','setConfig','createTimestamp','disposeWithMe','Module','code','Reply','_userService','UniverLicensePlugin','YYYY/MM/DD\x20HH:mm','Add','userId','filter','error','customRanges','deleteComment','UniverThreadCommentUIPlugin','resolved','slice','@univerjs/thread-comment','_sessionService','283113cgRkoV','UNIVER_UNKNOWN','updateComment','merge','onReady','Unknown','/list','_commentService','getMemberID','replies','UniverThreadCommentDataSourcePlugin','forEach','UNRECOGNIZED','CustomRangeType','dataSource','resolveComment','390YpBZkJ','solved','@univerjs/core','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getCurrentUser','CommentService','_config','@univerjs-pro/license','_threadCommentDataSource','onStarting','_initUserSync','/universer-api/comment/unit/','_initDataSource','UniverInstanceType','Plugin','add','Solved','getUnit','Solve','parentId','bufferTime','DependentOn','rangeType','commentUpdate$','IConfigService','comments','payload','_configService','type','IThreadCommentDataSourceService','parse','/reply','replyId','5027005HpwUCi','addUser','OpenOrReOpen','comment','thread-comment-data-source.config','COMMENT','UserManagerService','subscribe','_injector','threadId','pipe','pluginName','_threadCommentModel','personId','delete','Injector','16947dohZQk','UniverCollaborationClientPlugin','rxjs','@univerjs-pro/collaboration-client','format','/add','post'];_0x38b1=function(){return _0x3aaf74;};return _0x38b1();}var A=Object[_0x588ebe(0xcb)],x=(_0x3add89,_0x28e5df,_0x3a29c6,_0x3529ed)=>{for(var _0x569efb=_0x3529ed>0x1?void 0x0:_0x3529ed?A(_0x28e5df,_0x3a29c6):_0x28e5df,_0x3feb76=_0x3add89['length']-0x1,_0x588548;_0x3feb76>=0x0;_0x3feb76--)(_0x588548=_0x3add89[_0x3feb76])&&(_0x569efb=_0x588548(_0x569efb)||_0x569efb);return _0x569efb;},_=(_0x496b09,_0xc9157b)=>(_0x43f90f,_0x4bf5c0)=>_0xc9157b(_0x43f90f,_0x4bf5c0,_0x496b09);function Y(_0x5c1752,_0x262721){const _0x309f2d=_0x588ebe,_0x20dd18=_0x5c1752['replies'][0x0];return{..._0x262721,'id':_0x20dd18[_0x309f2d(0x94)],'resolved':_0x5c1752[_0x309f2d(0x75)]===0x1,'dT':f(_0x20dd18[_0x309f2d(0xd4)]),'personId':_0x20dd18[_0x309f2d(0xdd)],'threadId':_0x20dd18['threadId']};}function G(_0x26aa7b,_0x594217,_0x49e656){const _0xb292e0=_0x588ebe;var _0x2a9b78,_0x935e43;if(((_0x935e43=(_0x2a9b78=_0x26aa7b==null?void 0x0:_0x26aa7b[_0xb292e0(0x6d)])==null?void 0x0:_0x2a9b78[_0xb292e0(0xb4)])!=null?_0x935e43:0x0)>0x0){const _0x4fc694=(_0x10aa47,_0x49c4e5)=>({'id':_0x10aa47[_0xb292e0(0x94)],'threadId':_0x10aa47[_0xb292e0(0x9e)],'dT':f(_0x10aa47[_0xb292e0(0xd4)]),'personId':_0x10aa47[_0xb292e0(0xdd)],'resolved':_0x26aa7b['solved']===I['Solved'],'unitId':_0x594217,'subUnitId':_0x49e656,'text':JSON[_0xb292e0(0x92)](_0x10aa47['content']),'parentId':_0x49c4e5}),_0x4ae3d0=_0x4fc694(_0x26aa7b[_0xb292e0(0x6d)][0x0]);return{..._0x4ae3d0,'children':_0x26aa7b[_0xb292e0(0x6d)][_0xb292e0(0xe4)](0x1)[_0xb292e0(0xb2)](_0x252c5e=>_0x4fc694(_0x252c5e,_0x4ae3d0['id']))};}return null;}let g=class{constructor(_0x532c7f,_0x4c5e2a,_0x3a069f,_0x5e0f6e){const _0x3faaa1=_0x588ebe;this[_0x3faaa1(0xad)]=_0x532c7f,this[_0x3faaa1(0xd9)]=_0x4c5e2a,this[_0x3faaa1(0xe6)]=_0x3a069f,this[_0x3faaa1(0x9d)]=_0x5e0f6e;}async[_0x588ebe(0xd1)](_0x105458){const _0x20578f=_0x588ebe;var _0x26062f,_0x1b67d0;const {parentId:_0x3f21d3,unitId:_0x18bdf2,text:_0x230829,threadId:_0x4936fc}=_0x105458,_0x359f1c=(_0x1b67d0=(_0x26062f=_0x230829['customRanges'])==null?void 0x0:_0x26062f[_0x20578f(0xde)](_0xee861b=>_0xee861b[_0x20578f(0x8a)]===c['CustomRangeType'][_0x20578f(0x9a)])[_0x20578f(0xb2)](_0x1daa85=>_0x1daa85['rangeId']))!=null?_0x1b67d0:[],_0x3ec544=JSON[_0x20578f(0xc3)](_0x230829),_0x494ce2=(await this['_sessionService']['requireSession'](_0x18bdf2))[_0x20578f(0x6c)]();if(_0x3f21d3){const _0x37a387={'memberId':_0x494ce2,'unitId':_0x18bdf2,'content':_0x3ec544,'mention':_0x359f1c,'threadId':_0x4936fc},_0x52e5bc=(await this['_httpService']['post'](_0x20578f(0x7f)+_0x18bdf2+_0x20578f(0x93),{'body':_0x37a387}))[_0x20578f(0xce)][_0x20578f(0xb3)];return{..._0x105458,'id':_0x52e5bc['replyId'],'dT':c[_0x20578f(0xba)](+_0x52e5bc[_0x20578f(0xd4)])[_0x20578f(0xa9)](_0x20578f(0xdb)),'personId':_0x52e5bc['userId']};}else{const _0x3f29c2={'memberId':_0x494ce2,'unitId':_0x18bdf2,'content':_0x3ec544,'mention':_0x359f1c},_0x25b6f0=await this[_0x20578f(0xad)][_0x20578f(0xab)](_0x20578f(0x7f)+_0x18bdf2+_0x20578f(0xaa),{'body':_0x3f29c2});return Y(_0x25b6f0[_0x20578f(0xce)][_0x20578f(0x98)],_0x105458);}}async[_0x588ebe(0x66)](_0x16c6e1){const _0x38bf09=_0x588ebe;var _0x485c7a,_0x2c29f6;const {text:_0x1fcac6,unitId:_0x30c0c8}=_0x16c6e1,_0x52bfeb=(_0x2c29f6=(_0x485c7a=_0x1fcac6[_0x38bf09(0xe0)])==null?void 0x0:_0x485c7a['filter'](_0x2d1998=>_0x2d1998[_0x38bf09(0x8a)]===c[_0x38bf09(0x71)][_0x38bf09(0x9a)])[_0x38bf09(0xb2)](_0x2f8744=>_0x2f8744['rangeId']))!=null?_0x2c29f6:[],_0x9cba72=JSON['stringify'](_0x1fcac6),_0x144b21=_0x16c6e1[_0x38bf09(0x9e)],_0x440eb8=_0x16c6e1['id'],_0x4791d1={'memberId':(await this[_0x38bf09(0xe6)]['requireSession'](_0x30c0c8))[_0x38bf09(0x6c)](),'unitId':_0x30c0c8,'threadId':_0x144b21,'mention':_0x52bfeb,'content':_0x9cba72,'replyId':_0x440eb8},_0x3a7c11=await this['_httpService'][_0x38bf09(0xab)](_0x38bf09(0x7f)+_0x30c0c8+'/edit',{'body':_0x4791d1});return!_0x3a7c11[_0x38bf09(0xce)][_0x38bf09(0xdf)]||_0x3a7c11['body'][_0x38bf09(0xdf)][_0x38bf09(0xd7)]===0x1;}async[_0x588ebe(0x73)](_0x431c33){const _0x9a293c=_0x588ebe,{unitId:_0x462d41}=_0x431c33,_0x59cf0a=_0x431c33[_0x9a293c(0x9e)],_0x4e2c8d={'memberId':this[_0x9a293c(0xd9)][_0x9a293c(0x78)]()['userID'],'unitId':_0x462d41,'threadId':_0x59cf0a,'solved':_0x431c33[_0x9a293c(0xe3)]?I['Solved']:I[_0x9a293c(0x97)]},_0x5857bd=await this[_0x9a293c(0xad)][_0x9a293c(0xab)](_0x9a293c(0x7f)+_0x462d41+_0x9a293c(0xc5),{'body':_0x4e2c8d});return!_0x5857bd[_0x9a293c(0xce)][_0x9a293c(0xdf)]||_0x5857bd[_0x9a293c(0xce)]['error'][_0x9a293c(0xd7)]===0x1;}async[_0x588ebe(0xe1)](_0x1f3267,_0x384497,_0x555856,_0x2693c9){const _0x413ca2=_0x588ebe,_0x4e2cea={'memberId':(await this[_0x413ca2(0xe6)]['requireSession'](_0x1f3267))[_0x413ca2(0x6c)](),'threadId':_0x555856,'replyId':_0x2693c9,'unitId':_0x1f3267},_0x26a223=await this[_0x413ca2(0xad)][_0x413ca2(0xab)]('/universer-api/comment/unit/'+_0x1f3267+'/delete',{'body':_0x4e2cea});return!_0x26a223[_0x413ca2(0xce)][_0x413ca2(0xdf)]||_0x26a223[_0x413ca2(0xce)][_0x413ca2(0xdf)][_0x413ca2(0xd7)]===0x1;}async['listComments'](_0x1ff5dd,_0xa70cf8,_0x48bb25){const _0xbe0e05=_0x588ebe,_0x481894={'unitId':_0x1ff5dd,'threadId':_0x48bb25},_0x10aa69=await this[_0xbe0e05(0xad)][_0xbe0e05(0xab)](_0xbe0e05(0x7f)+_0x1ff5dd+_0xbe0e05(0x6a),{'body':_0x481894}),_0x4691ad=_0x48bb25['map'](_0x37d9d0=>G(_0x10aa69[_0xbe0e05(0xce)][_0xbe0e05(0x8d)][_0x37d9d0],_0x1ff5dd,_0xa70cf8))['filter'](Boolean);return Object['values'](_0x10aa69['body'][_0xbe0e05(0xb5)])[_0xbe0e05(0x6f)](_0x197c04=>{const _0x5e1978=_0xbe0e05;this[_0x5e1978(0xd9)][_0x5e1978(0x96)](_0x197c04);}),_0x4691ad;}[_0x588ebe(0xb7)](_0x3f225f){const _0x31d037=_0x588ebe;return{'id':_0x3f225f['id'],'threadId':_0x3f225f[_0x31d037(0x9e)],'ref':_0x3f225f[_0x31d037(0xae)]};}};g=x([_(0x0,c[_0x588ebe(0xb8)](P['HTTPService'])),_(0x1,c[_0x588ebe(0xb8)](c[_0x588ebe(0x9b)])),_(0x2,c[_0x588ebe(0xb8)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x588ebe(0xcb)],J=(_0xa9998e,_0x5ad9ff,_0x316dd1,_0x5b71b2)=>{const _0xb31b5=_0x588ebe;for(var _0x300de9=_0x5b71b2>0x1?void 0x0:_0x5b71b2?H(_0x5ad9ff,_0x316dd1):_0x5ad9ff,_0x58dfd3=_0xa9998e[_0xb31b5(0xb4)]-0x1,_0xd978a8;_0x58dfd3>=0x0;_0x58dfd3--)(_0xd978a8=_0xa9998e[_0x58dfd3])&&(_0x300de9=_0xd978a8(_0x300de9)||_0x300de9);return _0x300de9;},y=(_0x19d6ab,_0x3a5426)=>(_0x404c4e,_0x201ba4)=>_0x3a5426(_0x404c4e,_0x201ba4,_0x19d6ab);let C=class extends c['Disposable']{constructor(_0x1b7e14,_0x10de43){const _0x2e0736=_0x588ebe;super(),this['_threadCommentDataSourceService']=_0x1b7e14,this[_0x2e0736(0x7c)]=_0x10de43,this[_0x2e0736(0x80)]();}[_0x588ebe(0x80)](){const _0xe4d7b6=_0x588ebe;this[_0xe4d7b6(0xb9)][_0xe4d7b6(0x72)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0xe4d7b6(0xc0)]=!0x1;}};C=J([y(0x0,M[_0x588ebe(0x91)]),y(0x1,c['Inject'](g))],C);var F=Object['defineProperty'],L=Object[_0x588ebe(0xcb)],Z=(_0x343ad8,_0x354d76,_0x46ad6a)=>_0x354d76 in _0x343ad8?F(_0x343ad8,_0x354d76,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46ad6a}):_0x343ad8[_0x354d76]=_0x46ad6a,W=(_0x16cc39,_0x501cc8,_0x340f30,_0x28bc83)=>{for(var _0x67d02=_0x28bc83>0x1?void 0x0:_0x28bc83?L(_0x501cc8,_0x340f30):_0x501cc8,_0x304ade=_0x16cc39['length']-0x1,_0x535761;_0x304ade>=0x0;_0x304ade--)(_0x535761=_0x16cc39[_0x304ade])&&(_0x67d02=_0x535761(_0x67d02)||_0x67d02);return _0x67d02;},O=(_0x83089c,_0x2835ed)=>(_0x39a071,_0x3c4ab3)=>_0x2835ed(_0x39a071,_0x3c4ab3,_0x83089c),N=(_0x4c224b,_0xcae11,_0x49fbe2)=>Z(_0x4c224b,typeof _0xcae11!='symbol'?_0xcae11+'':_0xcae11,_0x49fbe2);exports[_0x588ebe(0x6e)]=class extends c[_0x588ebe(0x82)]{constructor(_0x9ec111=D,_0x2fc8f4,_0x256fe7){const _0x5986e4=_0x588ebe;super(),this[_0x5986e4(0x7a)]=_0x9ec111,this[_0x5986e4(0x9d)]=_0x2fc8f4,this['_configService']=_0x256fe7;const {..._0x475427}=c[_0x5986e4(0x67)]({},D,this[_0x5986e4(0x7a)]);this[_0x5986e4(0x8f)][_0x5986e4(0xd3)](q,_0x475427);}[_0x588ebe(0x7d)](){const _0x12d6ab=_0x588ebe;[[g],[C],[p]][_0x12d6ab(0x6f)](_0x1997a5=>{const _0x214cd8=_0x12d6ab;this[_0x214cd8(0x9d)][_0x214cd8(0x83)](_0x1997a5);});}[_0x588ebe(0x68)](){const _0x27c84f=_0x588ebe;this[_0x27c84f(0x9d)][_0x27c84f(0xca)](C),this[_0x27c84f(0x9d)]['get'](p);}},N(exports[_0x588ebe(0x6e)],_0x588ebe(0xa0),U),N(exports[_0x588ebe(0x6e)],_0x588ebe(0x90),c[_0x588ebe(0x81)][_0x588ebe(0xe8)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x588ebe(0x89)](j[_0x588ebe(0xe2)],b[_0x588ebe(0xa6)],T[_0x588ebe(0xda)]),O(0x1,c[_0x588ebe(0xb8)](c[_0x588ebe(0xa4)])),O(0x2,c[_0x588ebe(0x8c)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x4de704=_0x4547;(function(_0x2fe451,_0x370325){const _0x50a34b=_0x4547,_0x50bc10=_0x2fe451();while(!![]){try{const _0xd599f=-parseInt(_0x50a34b(0x120))/0x1*(-parseInt(_0x50a34b(0x186))/0x2)+parseInt(_0x50a34b(0x188))/0x3+-parseInt(_0x50a34b(0x17a))/0x4+-parseInt(_0x50a34b(0x150))/0x5*(-parseInt(_0x50a34b(0x12b))/0x6)+-parseInt(_0x50a34b(0x11d))/0x7+parseInt(_0x50a34b(0x149))/0x8*(-parseInt(_0x50a34b(0x128))/0x9)+parseInt(_0x50a34b(0x11a))/0xa*(parseInt(_0x50a34b(0x154))/0xb);if(_0xd599f===_0x370325)break;else _0x50bc10['push'](_0x50bc10['shift']());}catch(_0x3b5827){_0x50bc10['push'](_0x50bc10['shift']());}}}(_0x1696,0x5220b));function _0x1696(){const _0xd7a826=['disposeWithMe','addUser','values','UNIVER_UNKNOWN','@univerjs-pro/collaboration-client','dayjs','/universer-api/comment/unit/','userID','@univerjs/network','code','Unknown','_configService','forEach','userId','addComment','setConfig','Solve','onStarting','HTTPService','stringify','Edit','IThreadCommentDataSourceService','getMemberID','UniverThreadCommentDataSourcePlugin','getUnit','2244264HcCCiS','/universer-api/user/list','Inject','_userService','resolved','replies','getCurrentUser','parentId','user','YYYY/MM/DD\x20HH:mm','root','rxjs','1088314kEvbjf','find','1721487FdAjTv','Injector','UniverCollaborationClientPlugin','Disposable','listComments','CollaborationSessionService','dataSource','@univerjs/core','solved','post','_config','content','UserManagerService','_threadCommentDataSource','error','customRanges','requireSession','saveCommentToSnapshot','format','CustomRangeType','deleteComment','30JTykXR','get','_initUserSync','1127406IvxJfJ','_commentService','Module','1hHQJLG','COMMENT','_threadCommentDataSourceService','_init','body','_httpService','symbol','payload','810XlytOy','threadId','personId','435738MNyJCK','type','DependentOn','/delete','Plugin','_sessionService','defineProperty','UniverInstanceType','add','length','toStringTag','UniverLicensePlugin','Delete','ThreadCommentModel','Solved','rangeId','resolveComment','UNRECOGNIZED','reply','Reply','replyId','/edit','/list','createTimestamp','delete','_initDataSource','ref','Add','getOwnPropertyDescriptor','pluginName','34304cdEfQw','subscribe','syncUpdateMutationToColla','users','map','unitId','comment','20aHnHeF','UniverThreadCommentUIPlugin','filter','@univerjs/thread-comment','131857MnwyWs','rangeType','slice','comments','_injector','/reply','parse','OpenOrReOpen','updateComment','_threadCommentModel','getComment','onReady','size'];_0x1696=function(){return _0xd7a826;};return _0x1696();}Object[_0x4de704(0x131)](exports,Symbol[_0x4de704(0x135)],{'value':_0x4de704(0x11f)});const b=require(_0x4de704(0x165)),T=require('@univerjs-pro/license'),c=require(_0x4de704(0x10c)),j=require('@univerjs/thread-comment-ui'),M=require(_0x4de704(0x153)),w=require(_0x4de704(0x185)),P=require(_0x4de704(0x169)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2a32a4=>(_0x2a32a4[_0x2a32a4[_0x4de704(0x15b)]=0x0]=_0x4de704(0x15b),_0x2a32a4[_0x2a32a4[_0x4de704(0x139)]=0x1]=_0x4de704(0x139),_0x2a32a4[_0x2a32a4[_0x4de704(0x13c)]=-0x1]=_0x4de704(0x13c),_0x2a32a4))(I||{}),v=(_0x1b87c6=>(_0x1b87c6[_0x1b87c6[_0x4de704(0x16b)]=0x0]='Unknown',_0x1b87c6[_0x1b87c6[_0x4de704(0x146)]=0x1]=_0x4de704(0x146),_0x1b87c6[_0x1b87c6['Reply']=0x2]=_0x4de704(0x13e),_0x1b87c6[_0x1b87c6[_0x4de704(0x175)]=0x3]=_0x4de704(0x175),_0x1b87c6[_0x1b87c6[_0x4de704(0x137)]=0x4]=_0x4de704(0x137),_0x1b87c6[_0x1b87c6[_0x4de704(0x171)]=0x5]='Solve',_0x1b87c6[_0x1b87c6[_0x4de704(0x13c)]=-0x1]=_0x4de704(0x13c),_0x1b87c6))(v||{});const f=_0x40a571=>c[_0x4de704(0x166)](new Date(+_0x40a571))[_0x4de704(0x117)](_0x4de704(0x183)),R=async(_0x5f9a8d,_0xfd08b0)=>{const _0x13b2f4=_0x4de704,_0x18b482=_0x5f9a8d[_0x13b2f4(0x11b)](c['UserManagerService']),_0x2fdcf8=_0x5f9a8d[_0x13b2f4(0x11b)](P[_0x13b2f4(0x173)]);_0xfd08b0[_0x13b2f4(0x16d)](_0x2722ac=>{const _0x5e0c65=_0x13b2f4;_0x18b482['getUser'](_0x2722ac)&&_0xfd08b0[_0x5e0c65(0x143)](_0x2722ac);}),_0xfd08b0[_0x13b2f4(0x160)]&&(await _0x2fdcf8[_0x13b2f4(0x11b)](_0x13b2f4(0x17b),{'params':{'userIDs':[..._0xfd08b0]}}))['body'][_0x13b2f4(0x14c)][_0x13b2f4(0x16d)](_0x21462f=>{const _0x141042=_0x13b2f4;_0x21462f&&_0x18b482[_0x141042(0x162)](_0x21462f);});};var $=Object[_0x4de704(0x147)],E=(_0x2989a7,_0x3021ab,_0x4e2dd6,_0x51013a)=>{for(var _0x429255=_0x51013a>0x1?void 0x0:_0x51013a?$(_0x3021ab,_0x4e2dd6):_0x3021ab,_0x10027c=_0x2989a7['length']-0x1,_0x63f8e1;_0x10027c>=0x0;_0x10027c--)(_0x63f8e1=_0x2989a7[_0x10027c])&&(_0x429255=_0x63f8e1(_0x429255)||_0x429255);return _0x429255;},S=(_0x191d3c,_0x387b76)=>(_0x53e326,_0x43e00a)=>_0x387b76(_0x53e326,_0x43e00a,_0x191d3c);let p=class extends c[_0x4de704(0x18b)]{constructor(_0x25b3f4,_0x528f15,_0x2fe6bf,_0x6e4aa8){const _0xb6ae5e=_0x4de704;super(),this[_0xb6ae5e(0x11e)]=_0x25b3f4,this[_0xb6ae5e(0x15d)]=_0x528f15,this['_userService']=_0x2fe6bf,this[_0xb6ae5e(0x158)]=_0x6e4aa8,this['_init'](),this[_0xb6ae5e(0x11c)]();}['_initUserSync'](){const _0x239bcc=_0x4de704;this[_0x239bcc(0x161)](this[_0x239bcc(0x15d)]['commentUpdate$']['pipe'](w['bufferTime'](0x10))[_0x239bcc(0x14a)](_0x3821cb=>{const _0x38e3e1=_0x239bcc,_0x3eeac3=new Set();_0x3821cb[_0x38e3e1(0x16d)](_0x427d7c=>{const _0x413f73=_0x38e3e1;switch(_0x427d7c[_0x413f73(0x12c)]){case'add':{const _0x3a54d5=_0x427d7c[_0x413f73(0x127)][_0x413f73(0x12a)];_0x3eeac3[_0x413f73(0x133)](_0x3a54d5);break;}}}),R(this['_injector'],_0x3eeac3);}));}[_0x4de704(0x123)](){const _0x33dc8d=_0x4de704;this[_0x33dc8d(0x161)](this[_0x33dc8d(0x11e)]['commentUpdate$'][_0x33dc8d(0x14a)](async _0x2152a7=>{const _0x22815a=_0x33dc8d;var _0x50b818,_0x59fe51,_0xc5991c,_0x28a66b;const _0xe9482f=(_0x50b818=this[_0x22815a(0x15d)][_0x22815a(0x179)](_0x2152a7[_0x22815a(0x14e)])['find'](_0x408e34=>_0x408e34[_0x22815a(0x129)]===_0x2152a7[_0x22815a(0x129)]))==null?void 0x0:_0x50b818['root'];if(!_0xe9482f)return;const {unitId:_0x10ae34,subUnitId:_0x2174e2}=_0xe9482f;switch(_0x2152a7[_0x22815a(0x182)]&&this[_0x22815a(0x17d)][_0x22815a(0x162)](_0x2152a7[_0x22815a(0x182)]),_0x2152a7[_0x22815a(0x12c)]){case v[_0x22815a(0x146)]:break;case v['Reply']:{this['_threadCommentModel'][_0x22815a(0x16f)](_0x10ae34,_0x2174e2,{'unitId':_0x10ae34,'subUnitId':_0x2174e2,'ref':'','id':_0x2152a7[_0x22815a(0x13f)],'dT':f(+_0x2152a7[_0x22815a(0x142)]),'threadId':_0x2152a7[_0x22815a(0x129)],'personId':(_0xc5991c=(_0x59fe51=_0x2152a7[_0x22815a(0x182)])==null?void 0x0:_0x59fe51[_0x22815a(0x168)])!=null?_0xc5991c:_0x2152a7['userId'],'text':JSON['parse'](_0x2152a7[_0x22815a(0x110)]),'parentId':_0xe9482f['id']});break;}case v['Delete']:{const _0x3e5f77=this[_0x22815a(0x15d)][_0x22815a(0x15e)](_0x10ae34,_0x2174e2,_0x2152a7['replyId']);_0x3e5f77&&_0x3e5f77[_0x22815a(0x181)]&&this[_0x22815a(0x15d)][_0x22815a(0x119)](_0x10ae34,_0x2174e2,_0x2152a7[_0x22815a(0x13f)]);break;}case v[_0x22815a(0x175)]:{this[_0x22815a(0x15d)]['updateComment'](_0x10ae34,_0x2174e2,{'commentId':_0x2152a7['replyId'],'text':JSON['parse'](_0x2152a7[_0x22815a(0x110)])});break;}case v[_0x22815a(0x171)]:{const _0x2ccb88=(_0x28a66b=this[_0x22815a(0x15d)][_0x22815a(0x179)](_0x2152a7[_0x22815a(0x14e)])[_0x22815a(0x187)](_0x4dce93=>_0x4dce93['threadId']===_0x2152a7[_0x22815a(0x129)]))==null?void 0x0:_0x28a66b[_0x22815a(0x184)];_0x2ccb88&&this[_0x22815a(0x15d)]['resolveComment'](_0x10ae34,_0x2174e2,_0x2ccb88['id'],_0x2152a7[_0x22815a(0x10d)]===I[_0x22815a(0x139)]);break;}}}));}};p=E([S(0x0,c[_0x4de704(0x17c)](b['CommentService'])),S(0x1,c[_0x4de704(0x17c)](M[_0x4de704(0x138)])),S(0x2,c[_0x4de704(0x17c)](c[_0x4de704(0x111)])),S(0x3,c[_0x4de704(0x17c)](c[_0x4de704(0x189)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x4de704(0x147)],x=(_0x36290e,_0x178f92,_0x5a0a0b,_0x513731)=>{for(var _0x3155b7=_0x513731>0x1?void 0x0:_0x513731?A(_0x178f92,_0x5a0a0b):_0x178f92,_0xa3d9d4=_0x36290e['length']-0x1,_0x48d7d0;_0xa3d9d4>=0x0;_0xa3d9d4--)(_0x48d7d0=_0x36290e[_0xa3d9d4])&&(_0x3155b7=_0x48d7d0(_0x3155b7)||_0x3155b7);return _0x3155b7;},_=(_0x39cfa4,_0x3366fa)=>(_0x38fe4d,_0x2fb00b)=>_0x3366fa(_0x38fe4d,_0x2fb00b,_0x39cfa4);function Y(_0x40e602,_0x105d2a){const _0x56fb07=_0x4de704,_0x59a14f=_0x40e602[_0x56fb07(0x17f)][0x0];return{..._0x105d2a,'id':_0x59a14f['replyId'],'resolved':_0x40e602['solved']===0x1,'dT':f(_0x59a14f[_0x56fb07(0x142)]),'personId':_0x59a14f[_0x56fb07(0x16e)],'threadId':_0x59a14f[_0x56fb07(0x129)]};}function G(_0x4959eb,_0x10d2e0,_0x45ec6d){const _0x40f667=_0x4de704;var _0x5c666c,_0x4e7f9d;if(((_0x4e7f9d=(_0x5c666c=_0x4959eb==null?void 0x0:_0x4959eb[_0x40f667(0x17f)])==null?void 0x0:_0x5c666c[_0x40f667(0x134)])!=null?_0x4e7f9d:0x0)>0x0){const _0x51c5da=(_0x93f9da,_0x304ce4)=>({'id':_0x93f9da[_0x40f667(0x13f)],'threadId':_0x93f9da[_0x40f667(0x129)],'dT':f(_0x93f9da['createTimestamp']),'personId':_0x93f9da[_0x40f667(0x16e)],'resolved':_0x4959eb[_0x40f667(0x10d)]===I['Solved'],'unitId':_0x10d2e0,'subUnitId':_0x45ec6d,'text':JSON[_0x40f667(0x15a)](_0x93f9da[_0x40f667(0x110)]),'parentId':_0x304ce4}),_0x3b73ae=_0x51c5da(_0x4959eb[_0x40f667(0x17f)][0x0]);return{..._0x3b73ae,'children':_0x4959eb[_0x40f667(0x17f)][_0x40f667(0x156)](0x1)[_0x40f667(0x14d)](_0x1228cf=>_0x51c5da(_0x1228cf,_0x3b73ae['id']))};}return null;}let g=class{constructor(_0x271bfa,_0x17f785,_0x1b0804,_0x1283bc){const _0x5e4ad9=_0x4de704;this['_httpService']=_0x271bfa,this[_0x5e4ad9(0x17d)]=_0x17f785,this[_0x5e4ad9(0x130)]=_0x1b0804,this[_0x5e4ad9(0x158)]=_0x1283bc;}async[_0x4de704(0x16f)](_0x556734){const _0x5039e2=_0x4de704;var _0xac5c23,_0x10707a;const {parentId:_0x596aef,unitId:_0x56f97c,text:_0x13167d,threadId:_0x20198e}=_0x556734,_0x53b690=(_0x10707a=(_0xac5c23=_0x13167d[_0x5039e2(0x114)])==null?void 0x0:_0xac5c23[_0x5039e2(0x152)](_0x4129d5=>_0x4129d5[_0x5039e2(0x155)]===c[_0x5039e2(0x118)][_0x5039e2(0x121)])[_0x5039e2(0x14d)](_0x23d0b7=>_0x23d0b7[_0x5039e2(0x13a)]))!=null?_0x10707a:[],_0x30d891=JSON[_0x5039e2(0x174)](_0x13167d),_0x4d7279=(await this[_0x5039e2(0x130)]['requireSession'](_0x56f97c))[_0x5039e2(0x177)]();if(_0x596aef){const _0xc2945f={'memberId':_0x4d7279,'unitId':_0x56f97c,'content':_0x30d891,'mention':_0x53b690,'threadId':_0x20198e},_0x2eaec7=(await this[_0x5039e2(0x125)][_0x5039e2(0x10e)](_0x5039e2(0x167)+_0x56f97c+_0x5039e2(0x159),{'body':_0xc2945f}))['body'][_0x5039e2(0x13d)];return{..._0x556734,'id':_0x2eaec7[_0x5039e2(0x13f)],'dT':c['dayjs'](+_0x2eaec7[_0x5039e2(0x142)])[_0x5039e2(0x117)](_0x5039e2(0x183)),'personId':_0x2eaec7[_0x5039e2(0x16e)]};}else{const _0x362f8a={'memberId':_0x4d7279,'unitId':_0x56f97c,'content':_0x30d891,'mention':_0x53b690},_0x42aa27=await this[_0x5039e2(0x125)][_0x5039e2(0x10e)](_0x5039e2(0x167)+_0x56f97c+'/add',{'body':_0x362f8a});return Y(_0x42aa27[_0x5039e2(0x124)][_0x5039e2(0x14f)],_0x556734);}}async[_0x4de704(0x15c)](_0x4f9d35){const _0x2026c4=_0x4de704;var _0x54c222,_0x22ef59;const {text:_0x55829e,unitId:_0x44c0e1}=_0x4f9d35,_0x29cc35=(_0x22ef59=(_0x54c222=_0x55829e[_0x2026c4(0x114)])==null?void 0x0:_0x54c222[_0x2026c4(0x152)](_0x286f3b=>_0x286f3b[_0x2026c4(0x155)]===c['CustomRangeType'][_0x2026c4(0x121)])['map'](_0x52a995=>_0x52a995[_0x2026c4(0x13a)]))!=null?_0x22ef59:[],_0x383ade=JSON[_0x2026c4(0x174)](_0x55829e),_0x2c31ff=_0x4f9d35[_0x2026c4(0x129)],_0x37f2d8=_0x4f9d35['id'],_0x5298f9={'memberId':(await this[_0x2026c4(0x130)]['requireSession'](_0x44c0e1))['getMemberID'](),'unitId':_0x44c0e1,'threadId':_0x2c31ff,'mention':_0x29cc35,'content':_0x383ade,'replyId':_0x37f2d8},_0x581296=await this['_httpService'][_0x2026c4(0x10e)]('/universer-api/comment/unit/'+_0x44c0e1+_0x2026c4(0x140),{'body':_0x5298f9});return!_0x581296[_0x2026c4(0x124)]['error']||_0x581296[_0x2026c4(0x124)][_0x2026c4(0x113)][_0x2026c4(0x16a)]===0x1;}async[_0x4de704(0x13b)](_0x4fff38){const _0x39d7f8=_0x4de704,{unitId:_0x232e3f}=_0x4fff38,_0x21c7ab=_0x4fff38[_0x39d7f8(0x129)],_0x3514b4={'memberId':this[_0x39d7f8(0x17d)][_0x39d7f8(0x180)]()['userID'],'unitId':_0x232e3f,'threadId':_0x21c7ab,'solved':_0x4fff38[_0x39d7f8(0x17e)]?I[_0x39d7f8(0x139)]:I[_0x39d7f8(0x15b)]},_0x9bba52=await this[_0x39d7f8(0x125)][_0x39d7f8(0x10e)](_0x39d7f8(0x167)+_0x232e3f+'/solved',{'body':_0x3514b4});return!_0x9bba52[_0x39d7f8(0x124)][_0x39d7f8(0x113)]||_0x9bba52[_0x39d7f8(0x124)][_0x39d7f8(0x113)][_0x39d7f8(0x16a)]===0x1;}async[_0x4de704(0x119)](_0xe59818,_0x383cd5,_0x2da2a4,_0x10f9e4){const _0x44221f=_0x4de704,_0x1a43d0={'memberId':(await this[_0x44221f(0x130)][_0x44221f(0x115)](_0xe59818))[_0x44221f(0x177)](),'threadId':_0x2da2a4,'replyId':_0x10f9e4,'unitId':_0xe59818},_0x36c0ab=await this[_0x44221f(0x125)][_0x44221f(0x10e)]('/universer-api/comment/unit/'+_0xe59818+_0x44221f(0x12e),{'body':_0x1a43d0});return!_0x36c0ab[_0x44221f(0x124)]['error']||_0x36c0ab['body'][_0x44221f(0x113)]['code']===0x1;}async[_0x4de704(0x18c)](_0x3c5dbc,_0x281989,_0x187c9a){const _0x3b03a1=_0x4de704,_0x1c4255={'unitId':_0x3c5dbc,'threadId':_0x187c9a},_0x9ed4c2=await this[_0x3b03a1(0x125)][_0x3b03a1(0x10e)](_0x3b03a1(0x167)+_0x3c5dbc+_0x3b03a1(0x141),{'body':_0x1c4255}),_0x1020e9=_0x187c9a['map'](_0x1094ad=>G(_0x9ed4c2[_0x3b03a1(0x124)][_0x3b03a1(0x157)][_0x1094ad],_0x3c5dbc,_0x281989))[_0x3b03a1(0x152)](Boolean);return Object[_0x3b03a1(0x163)](_0x9ed4c2[_0x3b03a1(0x124)][_0x3b03a1(0x14c)])[_0x3b03a1(0x16d)](_0x3f12f1=>{const _0x49dbb2=_0x3b03a1;this[_0x49dbb2(0x17d)][_0x49dbb2(0x162)](_0x3f12f1);}),_0x1020e9;}[_0x4de704(0x116)](_0x1972ce){const _0x5e8332=_0x4de704;return{'id':_0x1972ce['id'],'threadId':_0x1972ce[_0x5e8332(0x129)],'ref':_0x1972ce[_0x5e8332(0x145)]};}};g=x([_(0x0,c[_0x4de704(0x17c)](P[_0x4de704(0x173)])),_(0x1,c[_0x4de704(0x17c)](c[_0x4de704(0x111)])),_(0x2,c[_0x4de704(0x17c)](b[_0x4de704(0x10a)])),_(0x3,c[_0x4de704(0x17c)](c[_0x4de704(0x189)]))],g);var H=Object[_0x4de704(0x147)],J=(_0x3829be,_0x3c08d6,_0x2ed896,_0x1d5b64)=>{const _0x56cffd=_0x4de704;for(var _0x1664b0=_0x1d5b64>0x1?void 0x0:_0x1d5b64?H(_0x3c08d6,_0x2ed896):_0x3c08d6,_0x118d3b=_0x3829be[_0x56cffd(0x134)]-0x1,_0x48999b;_0x118d3b>=0x0;_0x118d3b--)(_0x48999b=_0x3829be[_0x118d3b])&&(_0x1664b0=_0x48999b(_0x1664b0)||_0x1664b0);return _0x1664b0;},y=(_0x36d780,_0x31980f)=>(_0x9bb28c,_0x21bdf7)=>_0x31980f(_0x9bb28c,_0x21bdf7,_0x36d780);let C=class extends c[_0x4de704(0x18b)]{constructor(_0x19bd3c,_0x28bf2a){const _0x3b862a=_0x4de704;super(),this[_0x3b862a(0x122)]=_0x19bd3c,this[_0x3b862a(0x112)]=_0x28bf2a,this[_0x3b862a(0x144)]();}['_initDataSource'](){const _0x1358f6=_0x4de704;this[_0x1358f6(0x122)][_0x1358f6(0x10b)]=this[_0x1358f6(0x112)],this[_0x1358f6(0x122)][_0x1358f6(0x14b)]=!0x1;}};C=J([y(0x0,M[_0x4de704(0x176)]),y(0x1,c[_0x4de704(0x17c)](g))],C);var F=Object[_0x4de704(0x131)],L=Object[_0x4de704(0x147)],Z=(_0x278614,_0x1c2209,_0x56b680)=>_0x1c2209 in _0x278614?F(_0x278614,_0x1c2209,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x56b680}):_0x278614[_0x1c2209]=_0x56b680,W=(_0xf3258,_0x5dd6ac,_0x3049ce,_0x11b70a)=>{const _0x47aad9=_0x4de704;for(var _0x1147d8=_0x11b70a>0x1?void 0x0:_0x11b70a?L(_0x5dd6ac,_0x3049ce):_0x5dd6ac,_0x5f0950=_0xf3258[_0x47aad9(0x134)]-0x1,_0x4ca4bd;_0x5f0950>=0x0;_0x5f0950--)(_0x4ca4bd=_0xf3258[_0x5f0950])&&(_0x1147d8=_0x4ca4bd(_0x1147d8)||_0x1147d8);return _0x1147d8;},O=(_0x2a4833,_0x5e4cc6)=>(_0x323e92,_0x398755)=>_0x5e4cc6(_0x323e92,_0x398755,_0x2a4833),N=(_0x3652d2,_0x143a46,_0x58fc6d)=>Z(_0x3652d2,typeof _0x143a46!=_0x4de704(0x126)?_0x143a46+'':_0x143a46,_0x58fc6d);function _0x4547(_0xdf76f0,_0x4c0250){const _0x169678=_0x1696();return _0x4547=function(_0x45478c,_0x287b4c){_0x45478c=_0x45478c-0x10a;let _0x48e357=_0x169678[_0x45478c];return _0x48e357;},_0x4547(_0xdf76f0,_0x4c0250);}exports[_0x4de704(0x178)]=class extends c[_0x4de704(0x12f)]{constructor(_0x2a5841=D,_0x32b99a,_0x4c01a6){const _0x114fc5=_0x4de704;super(),this[_0x114fc5(0x10f)]=_0x2a5841,this['_injector']=_0x32b99a,this['_configService']=_0x4c01a6;const {..._0x38a55c}=c['merge']({},D,this[_0x114fc5(0x10f)]);this[_0x114fc5(0x16c)][_0x114fc5(0x170)](q,_0x38a55c);}[_0x4de704(0x172)](){[[g],[C],[p]]['forEach'](_0x4aa1ef=>{const _0xe6e25e=_0x4547;this['_injector'][_0xe6e25e(0x133)](_0x4aa1ef);});}[_0x4de704(0x15f)](){const _0x492467=_0x4de704;this[_0x492467(0x158)][_0x492467(0x11b)](C),this['_injector'][_0x492467(0x11b)](p);}},N(exports[_0x4de704(0x178)],_0x4de704(0x148),U),N(exports[_0x4de704(0x178)],_0x4de704(0x12c),c[_0x4de704(0x132)][_0x4de704(0x164)]),exports[_0x4de704(0x178)]=W([c[_0x4de704(0x12d)](j[_0x4de704(0x151)],b[_0x4de704(0x18a)],T[_0x4de704(0x136)]),O(0x1,c[_0x4de704(0x17c)](c[_0x4de704(0x189)])),O(0x2,c['IConfigService'])],exports[_0x4de704(0x178)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x166c12=_0x10f6;(function(_0x1a6a5e,_0x24319e){const _0x2e1f0c=_0x10f6,_0xdc54c=_0x1a6a5e();while(!![]){try{const _0x30adae=-parseInt(_0x2e1f0c(0x196))/0x1+parseInt(_0x2e1f0c(0x1f3))/0x2*(parseInt(_0x2e1f0c(0x19a))/0x3)+-parseInt(_0x2e1f0c(0x1ce))/0x4+-parseInt(_0x2e1f0c(0x1a6))/0x5+parseInt(_0x2e1f0c(0x1aa))/0x6+-parseInt(_0x2e1f0c(0x19b))/0x7*(-parseInt(_0x2e1f0c(0x1e7))/0x8)+parseInt(_0x2e1f0c(0x1de))/0x9;if(_0x30adae===_0x24319e)break;else _0xdc54c['push'](_0xdc54c['shift']());}catch(_0x5e5e95){_0xdc54c['push'](_0xdc54c['shift']());}}}(_0x3b23,0xacab1));import{CommentService as _0x25df25,CollaborationSessionService as _0x1cbde6,UniverCollaborationClientPlugin as _0x4b2720}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1bfdd1}from'@univerjs-pro/license';import{dayjs as _0x3cecb5,UserManagerService as _0xc83dbe,Inject as _0x8fdc81,Injector as _0x37caba,Disposable as _0x18908b,CustomRangeType as _0xf7bfe6,UniverInstanceType as _0x4acfe4,DependentOn as _0x648336,IConfigService as _0x4f6915,Plugin as _0x2b8ea1,merge as _0x984593}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3a2862}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2fa9d4,IThreadCommentDataSourceService as _0x360ed4}from'@univerjs/thread-comment';function _0x3b23(){const _0x11dc9c=['onReady','user','/universer-api/comment/unit/','addComment','254682RxgyPF','getOwnPropertyDescriptor','Unknown','Solved','18boxwqC','105oewPtB','deleteComment','saveCommentToSnapshot','/solved','comments','error','Edit','slice','customRanges','filter','_sessionService','4760075PzwSIl','_userService','setConfig','find','251904PJVoka','replies','reply','length','addUser','Solve','syncUpdateMutationToColla','Reply','defineProperty','COMMENT','resolved','_threadCommentDataSource','pluginName','_configService','userID','thread-comment-data-source.config','parse','replyId','forEach','_httpService','pipe','subscribe','users','_init','dataSource','unitId','symbol','_threadCommentModel','Delete','_initUserSync','content','/list','get','parentId','Add','threadId','4843388LFUyRx','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getComment','values','root','body','requireSession','rangeId','solved','_injector','type','code','_threadCommentDataSourceService','getUser','format','OpenOrReOpen','11679363tWsTKq','getUnit','stringify','listComments','_config','_commentService','delete','updateComment','/reply','488416kMvqye','onStarting','post','userId','/universer-api/user/list','personId','map','resolveComment','ref','getMemberID','commentUpdate$','getCurrentUser','289774kogfea','createTimestamp','disposeWithMe','size','rangeType','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','_initDataSource'];_0x3b23=function(){return _0x11dc9c;};return _0x3b23();}import{bufferTime as _0x51f2cb}from'rxjs';import{HTTPService as _0x57fadc}from'@univerjs/network';const W=_0x166c12(0x1cf);var I=(_0x3b6987=>(_0x3b6987[_0x3b6987[_0x166c12(0x1dd)]=0x0]=_0x166c12(0x1dd),_0x3b6987[_0x3b6987['Solved']=0x1]=_0x166c12(0x199),_0x3b6987[_0x3b6987[_0x166c12(0x1f8)]=-0x1]=_0x166c12(0x1f8),_0x3b6987))(I||{}),v=(_0x5855b0=>(_0x5855b0[_0x5855b0[_0x166c12(0x198)]=0x0]=_0x166c12(0x198),_0x5855b0[_0x5855b0['Add']=0x1]=_0x166c12(0x1cc),_0x5855b0[_0x5855b0[_0x166c12(0x1b1)]=0x2]=_0x166c12(0x1b1),_0x5855b0[_0x5855b0[_0x166c12(0x1a1)]=0x3]='Edit',_0x5855b0[_0x5855b0[_0x166c12(0x1c6)]=0x4]=_0x166c12(0x1c6),_0x5855b0[_0x5855b0['Solve']=0x5]=_0x166c12(0x1af),_0x5855b0[_0x5855b0[_0x166c12(0x1f8)]=-0x1]=_0x166c12(0x1f8),_0x5855b0))(v||{});const D=_0x3cd454=>_0x3cecb5(new Date(+_0x3cd454))[_0x166c12(0x1dc)](_0x166c12(0x1f9)),B=async(_0x36e145,_0xb19bb2)=>{const _0x43792d=_0x166c12,_0x4553f7=_0x36e145[_0x43792d(0x1ca)](_0xc83dbe),_0x5a2ed8=_0x36e145[_0x43792d(0x1ca)](_0x57fadc);_0xb19bb2[_0x43792d(0x1bc)](_0x9aba20=>{const _0x2c17f0=_0x43792d;_0x4553f7[_0x2c17f0(0x1db)](_0x9aba20)&&_0xb19bb2[_0x2c17f0(0x1e4)](_0x9aba20);}),_0xb19bb2[_0x43792d(0x1f6)]&&(await _0x5a2ed8[_0x43792d(0x1ca)](_0x43792d(0x1eb),{'params':{'userIDs':[..._0xb19bb2]}}))['body'][_0x43792d(0x1c0)][_0x43792d(0x1bc)](_0x1fa17e=>{const _0x2c68b1=_0x43792d;_0x1fa17e&&_0x4553f7[_0x2c68b1(0x1ae)](_0x1fa17e);});};var K=Object[_0x166c12(0x197)],V=(_0x4d23cd,_0xa427dc,_0x48082a,_0x1c2e22)=>{const _0x2d02d5=_0x166c12;for(var _0x21a7ca=_0x1c2e22>0x1?void 0x0:_0x1c2e22?K(_0xa427dc,_0x48082a):_0xa427dc,_0x10936c=_0x4d23cd[_0x2d02d5(0x1ad)]-0x1,_0x453bbb;_0x10936c>=0x0;_0x10936c--)(_0x453bbb=_0x4d23cd[_0x10936c])&&(_0x21a7ca=_0x453bbb(_0x21a7ca)||_0x21a7ca);return _0x21a7ca;},p=(_0x55630d,_0x37a088)=>(_0x155671,_0x396802)=>_0x37a088(_0x155671,_0x396802,_0x55630d);let S=class extends _0x18908b{constructor(_0x29a138,_0x2106e2,_0x4fcc7e,_0x251864){const _0x3e0b62=_0x166c12;super(),this[_0x3e0b62(0x1e3)]=_0x29a138,this[_0x3e0b62(0x1c5)]=_0x2106e2,this[_0x3e0b62(0x1a7)]=_0x4fcc7e,this[_0x3e0b62(0x1d7)]=_0x251864,this[_0x3e0b62(0x1c1)](),this[_0x3e0b62(0x1c7)]();}[_0x166c12(0x1c7)](){const _0x2c8663=_0x166c12;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x2c8663(0x1be)](_0x51f2cb(0x10))[_0x2c8663(0x1bf)](_0x50bb92=>{const _0x38242d=_0x2c8663,_0x3b47f0=new Set();_0x50bb92[_0x38242d(0x1bc)](_0x7709b4=>{const _0x43aef5=_0x38242d;switch(_0x7709b4[_0x43aef5(0x1d8)]){case'add':{const _0x3f9fa3=_0x7709b4['payload'][_0x43aef5(0x1ec)];_0x3b47f0['add'](_0x3f9fa3);break;}}}),B(this[_0x38242d(0x1d7)],_0x3b47f0);}));}[_0x166c12(0x1c1)](){const _0x24e48e=_0x166c12;this[_0x24e48e(0x1f5)](this[_0x24e48e(0x1e3)][_0x24e48e(0x1f1)][_0x24e48e(0x1bf)](async _0x4f670f=>{const _0x2b94df=_0x24e48e;var _0x46d6ed,_0x5cd8a7,_0x3e5c43,_0x63985b;const _0x887d46=(_0x46d6ed=this[_0x2b94df(0x1c5)][_0x2b94df(0x1df)](_0x4f670f[_0x2b94df(0x1c3)])[_0x2b94df(0x1a9)](_0x47934d=>_0x47934d[_0x2b94df(0x1cd)]===_0x4f670f[_0x2b94df(0x1cd)]))==null?void 0x0:_0x46d6ed[_0x2b94df(0x1d2)];if(!_0x887d46)return;const {unitId:_0x30791d,subUnitId:_0x11c418}=_0x887d46;switch(_0x4f670f['user']&&this['_userService'][_0x2b94df(0x1ae)](_0x4f670f['user']),_0x4f670f['type']){case v[_0x2b94df(0x1cc)]:break;case v['Reply']:{this[_0x2b94df(0x1c5)]['addComment'](_0x30791d,_0x11c418,{'unitId':_0x30791d,'subUnitId':_0x11c418,'ref':'','id':_0x4f670f[_0x2b94df(0x1bb)],'dT':D(+_0x4f670f[_0x2b94df(0x1f4)]),'threadId':_0x4f670f[_0x2b94df(0x1cd)],'personId':(_0x3e5c43=(_0x5cd8a7=_0x4f670f[_0x2b94df(0x193)])==null?void 0x0:_0x5cd8a7[_0x2b94df(0x1b8)])!=null?_0x3e5c43:_0x4f670f['userId'],'text':JSON[_0x2b94df(0x1ba)](_0x4f670f[_0x2b94df(0x1c8)]),'parentId':_0x887d46['id']});break;}case v['Delete']:{const _0x352c5b=this[_0x2b94df(0x1c5)][_0x2b94df(0x1d0)](_0x30791d,_0x11c418,_0x4f670f[_0x2b94df(0x1bb)]);_0x352c5b&&_0x352c5b[_0x2b94df(0x1cb)]&&this[_0x2b94df(0x1c5)][_0x2b94df(0x19c)](_0x30791d,_0x11c418,_0x4f670f[_0x2b94df(0x1bb)]);break;}case v[_0x2b94df(0x1a1)]:{this['_threadCommentModel'][_0x2b94df(0x1e5)](_0x30791d,_0x11c418,{'commentId':_0x4f670f[_0x2b94df(0x1bb)],'text':JSON[_0x2b94df(0x1ba)](_0x4f670f['content'])});break;}case v['Solve']:{const _0x349091=(_0x63985b=this[_0x2b94df(0x1c5)]['getUnit'](_0x4f670f[_0x2b94df(0x1c3)])[_0x2b94df(0x1a9)](_0x2e22bd=>_0x2e22bd[_0x2b94df(0x1cd)]===_0x4f670f['threadId']))==null?void 0x0:_0x63985b[_0x2b94df(0x1d2)];_0x349091&&this['_threadCommentModel']['resolveComment'](_0x30791d,_0x11c418,_0x349091['id'],_0x4f670f[_0x2b94df(0x1d6)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x8fdc81(_0x25df25)),p(0x1,_0x8fdc81(_0x2fa9d4)),p(0x2,_0x8fdc81(_0xc83dbe)),p(0x3,_0x8fdc81(_0x37caba))],S);const z=_0x166c12(0x1b9),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x236902,_0x351f7f,_0x1e3934,_0x4045e9)=>{const _0x5c55fa=_0x166c12;for(var _0x25ab4e=_0x4045e9>0x1?void 0x0:_0x4045e9?k(_0x351f7f,_0x1e3934):_0x351f7f,_0x2683be=_0x236902[_0x5c55fa(0x1ad)]-0x1,_0x31e114;_0x2683be>=0x0;_0x2683be--)(_0x31e114=_0x236902[_0x2683be])&&(_0x25ab4e=_0x31e114(_0x25ab4e)||_0x25ab4e);return _0x25ab4e;},_=(_0x125859,_0x5f2eb7)=>(_0x2f76a9,_0x281263)=>_0x5f2eb7(_0x2f76a9,_0x281263,_0x125859);function X(_0x3b08f7,_0x13f5a3){const _0x3183d8=_0x166c12,_0x37241b=_0x3b08f7['replies'][0x0];return{..._0x13f5a3,'id':_0x37241b[_0x3183d8(0x1bb)],'resolved':_0x3b08f7[_0x3183d8(0x1d6)]===0x1,'dT':D(_0x37241b['createTimestamp']),'personId':_0x37241b['userId'],'threadId':_0x37241b[_0x3183d8(0x1cd)]};}function ee(_0x39875d,_0x446a43,_0x730daf){const _0x196f1b=_0x166c12;var _0x4b5366,_0x5b39d7;if(((_0x5b39d7=(_0x4b5366=_0x39875d==null?void 0x0:_0x39875d[_0x196f1b(0x1ab)])==null?void 0x0:_0x4b5366[_0x196f1b(0x1ad)])!=null?_0x5b39d7:0x0)>0x0){const _0x3aaf1a=(_0x3fdef4,_0x1f6668)=>({'id':_0x3fdef4[_0x196f1b(0x1bb)],'threadId':_0x3fdef4[_0x196f1b(0x1cd)],'dT':D(_0x3fdef4[_0x196f1b(0x1f4)]),'personId':_0x3fdef4[_0x196f1b(0x1ea)],'resolved':_0x39875d[_0x196f1b(0x1d6)]===I[_0x196f1b(0x199)],'unitId':_0x446a43,'subUnitId':_0x730daf,'text':JSON[_0x196f1b(0x1ba)](_0x3fdef4[_0x196f1b(0x1c8)]),'parentId':_0x1f6668}),_0x4de25=_0x3aaf1a(_0x39875d[_0x196f1b(0x1ab)][0x0]);return{..._0x4de25,'children':_0x39875d[_0x196f1b(0x1ab)][_0x196f1b(0x1a2)](0x1)[_0x196f1b(0x1ed)](_0x2bda2d=>_0x3aaf1a(_0x2bda2d,_0x4de25['id']))};}return null;}let f=class{constructor(_0x7acca5,_0x3cc23d,_0x252b3e,_0x3160aa){this['_httpService']=_0x7acca5,this['_userService']=_0x3cc23d,this['_sessionService']=_0x252b3e,this['_injector']=_0x3160aa;}async[_0x166c12(0x195)](_0x13047e){const _0x3e8564=_0x166c12;var _0x295c93,_0x223f4f;const {parentId:_0x593255,unitId:_0x404c6d,text:_0x4134fe,threadId:_0xf7c514}=_0x13047e,_0x2f09a9=(_0x223f4f=(_0x295c93=_0x4134fe['customRanges'])==null?void 0x0:_0x295c93[_0x3e8564(0x1a4)](_0x1462bd=>_0x1462bd[_0x3e8564(0x1f7)]===_0xf7bfe6[_0x3e8564(0x1b3)])['map'](_0x4e0a3c=>_0x4e0a3c[_0x3e8564(0x1d5)]))!=null?_0x223f4f:[],_0x2338d5=JSON['stringify'](_0x4134fe),_0x42ad00=(await this[_0x3e8564(0x1a5)][_0x3e8564(0x1d4)](_0x404c6d))[_0x3e8564(0x1f0)]();if(_0x593255){const _0x88937f={'memberId':_0x42ad00,'unitId':_0x404c6d,'content':_0x2338d5,'mention':_0x2f09a9,'threadId':_0xf7c514},_0x46636e=(await this[_0x3e8564(0x1bd)]['post'](_0x3e8564(0x194)+_0x404c6d+_0x3e8564(0x1e6),{'body':_0x88937f}))[_0x3e8564(0x1d3)][_0x3e8564(0x1ac)];return{..._0x13047e,'id':_0x46636e[_0x3e8564(0x1bb)],'dT':_0x3cecb5(+_0x46636e[_0x3e8564(0x1f4)])[_0x3e8564(0x1dc)](_0x3e8564(0x1f9)),'personId':_0x46636e['userId']};}else{const _0x3484fa={'memberId':_0x42ad00,'unitId':_0x404c6d,'content':_0x2338d5,'mention':_0x2f09a9},_0x359bdb=await this[_0x3e8564(0x1bd)][_0x3e8564(0x1e9)](_0x3e8564(0x194)+_0x404c6d+'/add',{'body':_0x3484fa});return X(_0x359bdb[_0x3e8564(0x1d3)]['comment'],_0x13047e);}}async[_0x166c12(0x1e5)](_0xb7e253){const _0x1d18a8=_0x166c12;var _0x2a10f0,_0x41f84c;const {text:_0x261ae8,unitId:_0x2c0912}=_0xb7e253,_0x4e98b7=(_0x41f84c=(_0x2a10f0=_0x261ae8[_0x1d18a8(0x1a3)])==null?void 0x0:_0x2a10f0[_0x1d18a8(0x1a4)](_0x4b9621=>_0x4b9621[_0x1d18a8(0x1f7)]===_0xf7bfe6[_0x1d18a8(0x1b3)])[_0x1d18a8(0x1ed)](_0x51d2ef=>_0x51d2ef[_0x1d18a8(0x1d5)]))!=null?_0x41f84c:[],_0x1a323f=JSON[_0x1d18a8(0x1e0)](_0x261ae8),_0x2f4aa7=_0xb7e253[_0x1d18a8(0x1cd)],_0xf016b6=_0xb7e253['id'],_0xaab2ff={'memberId':(await this[_0x1d18a8(0x1a5)][_0x1d18a8(0x1d4)](_0x2c0912))['getMemberID'](),'unitId':_0x2c0912,'threadId':_0x2f4aa7,'mention':_0x4e98b7,'content':_0x1a323f,'replyId':_0xf016b6},_0x451c78=await this[_0x1d18a8(0x1bd)]['post'](_0x1d18a8(0x194)+_0x2c0912+'/edit',{'body':_0xaab2ff});return!_0x451c78[_0x1d18a8(0x1d3)][_0x1d18a8(0x1a0)]||_0x451c78[_0x1d18a8(0x1d3)]['error']['code']===0x1;}async[_0x166c12(0x1ee)](_0x2406e4){const _0x20bb96=_0x166c12,{unitId:_0x35fd9b}=_0x2406e4,_0x20540d=_0x2406e4[_0x20bb96(0x1cd)],_0x402c96={'memberId':this[_0x20bb96(0x1a7)][_0x20bb96(0x1f2)]()['userID'],'unitId':_0x35fd9b,'threadId':_0x20540d,'solved':_0x2406e4[_0x20bb96(0x1b4)]?I[_0x20bb96(0x199)]:I[_0x20bb96(0x1dd)]},_0x4cb16d=await this['_httpService'][_0x20bb96(0x1e9)]('/universer-api/comment/unit/'+_0x35fd9b+_0x20bb96(0x19e),{'body':_0x402c96});return!_0x4cb16d[_0x20bb96(0x1d3)][_0x20bb96(0x1a0)]||_0x4cb16d[_0x20bb96(0x1d3)][_0x20bb96(0x1a0)]['code']===0x1;}async[_0x166c12(0x19c)](_0x4124e3,_0x28a65b,_0xe062f3,_0x5548bd){const _0x57a811=_0x166c12,_0x47a5a0={'memberId':(await this[_0x57a811(0x1a5)][_0x57a811(0x1d4)](_0x4124e3))[_0x57a811(0x1f0)](),'threadId':_0xe062f3,'replyId':_0x5548bd,'unitId':_0x4124e3},_0x16c1c5=await this[_0x57a811(0x1bd)][_0x57a811(0x1e9)](_0x57a811(0x194)+_0x4124e3+'/delete',{'body':_0x47a5a0});return!_0x16c1c5[_0x57a811(0x1d3)]['error']||_0x16c1c5[_0x57a811(0x1d3)][_0x57a811(0x1a0)][_0x57a811(0x1d9)]===0x1;}async[_0x166c12(0x1e1)](_0x3ade55,_0x2746f5,_0x40018a){const _0x35bb43=_0x166c12,_0x18ff18={'unitId':_0x3ade55,'threadId':_0x40018a},_0x599aef=await this[_0x35bb43(0x1bd)][_0x35bb43(0x1e9)](_0x35bb43(0x194)+_0x3ade55+_0x35bb43(0x1c9),{'body':_0x18ff18}),_0x5485d8=_0x40018a['map'](_0x5a5e72=>ee(_0x599aef[_0x35bb43(0x1d3)][_0x35bb43(0x19f)][_0x5a5e72],_0x3ade55,_0x2746f5))[_0x35bb43(0x1a4)](Boolean);return Object[_0x35bb43(0x1d1)](_0x599aef['body'][_0x35bb43(0x1c0)])[_0x35bb43(0x1bc)](_0x649fec=>{const _0x1748d4=_0x35bb43;this[_0x1748d4(0x1a7)]['addUser'](_0x649fec);}),_0x5485d8;}[_0x166c12(0x19d)](_0x26b0fb){const _0xc11efc=_0x166c12;return{'id':_0x26b0fb['id'],'threadId':_0x26b0fb['threadId'],'ref':_0x26b0fb[_0xc11efc(0x1ef)]};}};f=Q([_(0x0,_0x8fdc81(_0x57fadc)),_(0x1,_0x8fdc81(_0xc83dbe)),_(0x2,_0x8fdc81(_0x1cbde6)),_(0x3,_0x8fdc81(_0x37caba))],f);function _0x10f6(_0x2bd15d,_0x137b0f){const _0x3b23c0=_0x3b23();return _0x10f6=function(_0x10f67c,_0xbc0d10){_0x10f67c=_0x10f67c-0x191;let _0x50d7b3=_0x3b23c0[_0x10f67c];return _0x50d7b3;},_0x10f6(_0x2bd15d,_0x137b0f);}var re=Object[_0x166c12(0x197)],te=(_0x291ffd,_0x10ef46,_0x2a468e,_0x1bbc9a)=>{const _0x5b87ed=_0x166c12;for(var _0xd0ef29=_0x1bbc9a>0x1?void 0x0:_0x1bbc9a?re(_0x10ef46,_0x2a468e):_0x10ef46,_0x14e5f6=_0x291ffd[_0x5b87ed(0x1ad)]-0x1,_0x33050f;_0x14e5f6>=0x0;_0x14e5f6--)(_0x33050f=_0x291ffd[_0x14e5f6])&&(_0xd0ef29=_0x33050f(_0xd0ef29)||_0xd0ef29);return _0xd0ef29;},N=(_0x4d2f7b,_0x19b1f8)=>(_0x12a140,_0x38bb8e)=>_0x19b1f8(_0x12a140,_0x38bb8e,_0x4d2f7b);let g=class extends _0x18908b{constructor(_0x3028cd,_0xb3add5){const _0x35c5df=_0x166c12;super(),this['_threadCommentDataSourceService']=_0x3028cd,this['_threadCommentDataSource']=_0xb3add5,this[_0x35c5df(0x191)]();}[_0x166c12(0x191)](){const _0x54824e=_0x166c12;this[_0x54824e(0x1da)][_0x54824e(0x1c2)]=this[_0x54824e(0x1b5)],this[_0x54824e(0x1da)][_0x54824e(0x1b0)]=!0x1;}};g=te([N(0x0,_0x360ed4),N(0x1,_0x8fdc81(f))],g);var se=Object[_0x166c12(0x1b2)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x382198,_0x385d53,_0x504c66)=>_0x385d53 in _0x382198?se(_0x382198,_0x385d53,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x504c66}):_0x382198[_0x385d53]=_0x504c66,ie=(_0x5618b5,_0x4abda7,_0x3b5b9a,_0x4315cf)=>{const _0x4ec47e=_0x166c12;for(var _0x534d0f=_0x4315cf>0x1?void 0x0:_0x4315cf?oe(_0x4abda7,_0x3b5b9a):_0x4abda7,_0x45acdc=_0x5618b5[_0x4ec47e(0x1ad)]-0x1,_0xd5032d;_0x45acdc>=0x0;_0x45acdc--)(_0xd5032d=_0x5618b5[_0x45acdc])&&(_0x534d0f=_0xd5032d(_0x534d0f)||_0x534d0f);return _0x534d0f;},w=(_0x36e1f1,_0x1a0080)=>(_0x14349a,_0xa97861)=>_0x1a0080(_0x14349a,_0xa97861,_0x36e1f1),$=(_0x561fa8,_0x4efdc5,_0x1e05d7)=>ne(_0x561fa8,typeof _0x4efdc5!=_0x166c12(0x1c4)?_0x4efdc5+'':_0x4efdc5,_0x1e05d7);let b=class extends _0x2b8ea1{constructor(_0x114f27=M,_0x560757,_0x133b78){const _0x538311=_0x166c12;super(),this[_0x538311(0x1e2)]=_0x114f27,this[_0x538311(0x1d7)]=_0x560757,this[_0x538311(0x1b7)]=_0x133b78;const {..._0x339ec6}=_0x984593({},M,this[_0x538311(0x1e2)]);this[_0x538311(0x1b7)][_0x538311(0x1a8)](z,_0x339ec6);}[_0x166c12(0x1e8)](){const _0x265e7d=_0x166c12;[[f],[g],[S]][_0x265e7d(0x1bc)](_0x4d52c6=>{const _0x31f9a9=_0x265e7d;this[_0x31f9a9(0x1d7)]['add'](_0x4d52c6);});}[_0x166c12(0x192)](){const _0x45d4c6=_0x166c12;this[_0x45d4c6(0x1d7)][_0x45d4c6(0x1ca)](g),this[_0x45d4c6(0x1d7)]['get'](S);}};$(b,_0x166c12(0x1b6),W),$(b,_0x166c12(0x1d8),_0x4acfe4['UNIVER_UNKNOWN']),b=ie([_0x648336(_0x3a2862,_0x4b2720,_0x1bfdd1),w(0x1,_0x8fdc81(_0x37caba)),w(0x2,_0x4f6915)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3249fa=_0x438f;(function(_0x31cec6,_0x42c7f9){const _0x49cc29=_0x438f,_0x1701ba=_0x31cec6();while(!![]){try{const _0x1cca01=-parseInt(_0x49cc29(0x195))/0x1+parseInt(_0x49cc29(0x19c))/0x2*(parseInt(_0x49cc29(0x140))/0x3)+parseInt(_0x49cc29(0x171))/0x4*(parseInt(_0x49cc29(0x14f))/0x5)+parseInt(_0x49cc29(0x19d))/0x6+parseInt(_0x49cc29(0x15a))/0x7*(parseInt(_0x49cc29(0x178))/0x8)+parseInt(_0x49cc29(0x13e))/0x9+parseInt(_0x49cc29(0x179))/0xa;if(_0x1cca01===_0x42c7f9)break;else _0x1701ba['push'](_0x1701ba['shift']());}catch(_0x5ee163){_0x1701ba['push'](_0x1701ba['shift']());}}}(_0x4cfe,0xd9225));import{CommentService as _0xd7b4e4,CollaborationSessionService as _0x1dd18a,UniverCollaborationClientPlugin as _0x40809b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x18f493}from'@univerjs-pro/license';import{dayjs as _0x4aa9f0,UserManagerService as _0x3ca25c,Inject as _0x3d0824,Injector as _0x1c104d,Disposable as _0x374870,CustomRangeType as _0xf78c46,UniverInstanceType as _0x2bf989,DependentOn as _0x339a9c,IConfigService as _0x50abf7,Plugin as _0x847ca8,merge as _0x5382cd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x103916}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5f5c33,IThreadCommentDataSourceService as _0x4f89eb}from'@univerjs/thread-comment';import{bufferTime as _0x50b0f3}from'rxjs';import{HTTPService as _0x2adda5}from'@univerjs/network';const W=_0x3249fa(0x17f);var I=(_0x46d344=>(_0x46d344[_0x46d344[_0x3249fa(0x196)]=0x0]='OpenOrReOpen',_0x46d344[_0x46d344[_0x3249fa(0x19e)]=0x1]=_0x3249fa(0x19e),_0x46d344[_0x46d344[_0x3249fa(0x17e)]=-0x1]=_0x3249fa(0x17e),_0x46d344))(I||{}),v=(_0x1e5a63=>(_0x1e5a63[_0x1e5a63['Unknown']=0x0]=_0x3249fa(0x194),_0x1e5a63[_0x1e5a63['Add']=0x1]=_0x3249fa(0x16f),_0x1e5a63[_0x1e5a63[_0x3249fa(0x150)]=0x2]='Reply',_0x1e5a63[_0x1e5a63[_0x3249fa(0x149)]=0x3]=_0x3249fa(0x149),_0x1e5a63[_0x1e5a63[_0x3249fa(0x15e)]=0x4]=_0x3249fa(0x15e),_0x1e5a63[_0x1e5a63[_0x3249fa(0x17d)]=0x5]=_0x3249fa(0x17d),_0x1e5a63[_0x1e5a63['UNRECOGNIZED']=-0x1]=_0x3249fa(0x17e),_0x1e5a63))(v||{});function _0x4cfe(){const _0x28e039=['Reply','_init','parentId','_configService','length','subscribe','/universer-api/comment/unit/','deleteComment','content','/edit','7FeRMEe','syncUpdateMutationToColla','_threadCommentDataSourceService','_httpService','Delete','threadId','_commentService','/delete','users','requireSession','post','_threadCommentDataSource','userId','thread-comment-data-source.config','error','getUnit','replyId','solved','getOwnPropertyDescriptor','payload','format','Add','_threadCommentModel','12IbjBLW','disposeWithMe','UNIVER_UNKNOWN','unitId','pipe','addComment','/add','2469816LgnJkE','1115760ythigr','/solved','getUser','body','Solve','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/reply','createTimestamp','_initDataSource','stringify','customRanges','onReady','delete','defineProperty','_config','_injector','YYYY/MM/DD\x20HH:mm','commentUpdate$','user','_sessionService','rangeType','size','add','personId','COMMENT','resolved','Unknown','1614311FoQWEG','OpenOrReOpen','addUser','replies','code','_initUserSync','type','6MDbFmz','3415320URsvby','Solved','resolveComment','map','userID','10868877ioBpAj','forEach','8727QIajlU','slice','pluginName','/list','setConfig','get','getCurrentUser','root','find','Edit','comments','updateComment','_userService','comment','parse','496315sqMaKA'];_0x4cfe=function(){return _0x28e039;};return _0x4cfe();}const D=_0x58d3f7=>_0x4aa9f0(new Date(+_0x58d3f7))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x332892,_0x183667)=>{const _0x320804=_0x3249fa,_0x163163=_0x332892[_0x320804(0x145)](_0x3ca25c),_0x39972f=_0x332892[_0x320804(0x145)](_0x2adda5);_0x183667['forEach'](_0x1b8820=>{const _0xfab23=_0x320804;_0x163163[_0xfab23(0x17b)](_0x1b8820)&&_0x183667[_0xfab23(0x186)](_0x1b8820);}),_0x183667[_0x320804(0x18f)]&&(await _0x39972f[_0x320804(0x145)]('/universer-api/user/list',{'params':{'userIDs':[..._0x183667]}}))[_0x320804(0x17c)][_0x320804(0x162)]['forEach'](_0x4d53c9=>{const _0x221cf4=_0x320804;_0x4d53c9&&_0x163163[_0x221cf4(0x197)](_0x4d53c9);});};var K=Object[_0x3249fa(0x16c)],V=(_0x2c902f,_0x13a01b,_0x513399,_0x2d0c4a)=>{const _0x171d4c=_0x3249fa;for(var _0x48340d=_0x2d0c4a>0x1?void 0x0:_0x2d0c4a?K(_0x13a01b,_0x513399):_0x13a01b,_0x3a7445=_0x2c902f[_0x171d4c(0x154)]-0x1,_0x283f85;_0x3a7445>=0x0;_0x3a7445--)(_0x283f85=_0x2c902f[_0x3a7445])&&(_0x48340d=_0x283f85(_0x48340d)||_0x48340d);return _0x48340d;},p=(_0x4d0bfc,_0x2497b3)=>(_0x4512fd,_0x3eb90f)=>_0x2497b3(_0x4512fd,_0x3eb90f,_0x4d0bfc);let S=class extends _0x374870{constructor(_0x328903,_0x4a4f64,_0x1bc0a6,_0x4a57cc){const _0x5be9e2=_0x3249fa;super(),this[_0x5be9e2(0x160)]=_0x328903,this['_threadCommentModel']=_0x4a4f64,this[_0x5be9e2(0x14c)]=_0x1bc0a6,this[_0x5be9e2(0x189)]=_0x4a57cc,this[_0x5be9e2(0x151)](),this[_0x5be9e2(0x19a)]();}[_0x3249fa(0x19a)](){const _0x56f246=_0x3249fa;this[_0x56f246(0x172)](this[_0x56f246(0x170)][_0x56f246(0x18b)][_0x56f246(0x175)](_0x50b0f3(0x10))[_0x56f246(0x155)](_0x31b3fc=>{const _0x2d0b35=_0x56f246,_0x2d0345=new Set();_0x31b3fc[_0x2d0b35(0x13f)](_0x3e27b4=>{const _0x5e57e7=_0x2d0b35;switch(_0x3e27b4[_0x5e57e7(0x19b)]){case _0x5e57e7(0x190):{const _0x44b4b1=_0x3e27b4[_0x5e57e7(0x16d)][_0x5e57e7(0x191)];_0x2d0345[_0x5e57e7(0x190)](_0x44b4b1);break;}}}),B(this['_injector'],_0x2d0345);}));}[_0x3249fa(0x151)](){const _0x5d5b13=_0x3249fa;this[_0x5d5b13(0x172)](this[_0x5d5b13(0x160)][_0x5d5b13(0x18b)][_0x5d5b13(0x155)](async _0x4e64a2=>{const _0xefef64=_0x5d5b13;var _0x47733f,_0xf9fdf0,_0x323dd7,_0x314706;const _0x3c867f=(_0x47733f=this[_0xefef64(0x170)][_0xefef64(0x169)](_0x4e64a2[_0xefef64(0x174)])[_0xefef64(0x148)](_0x361b79=>_0x361b79['threadId']===_0x4e64a2['threadId']))==null?void 0x0:_0x47733f[_0xefef64(0x147)];if(!_0x3c867f)return;const {unitId:_0x299f78,subUnitId:_0x2080a0}=_0x3c867f;switch(_0x4e64a2[_0xefef64(0x18c)]&&this[_0xefef64(0x14c)][_0xefef64(0x197)](_0x4e64a2['user']),_0x4e64a2[_0xefef64(0x19b)]){case v[_0xefef64(0x16f)]:break;case v[_0xefef64(0x150)]:{this[_0xefef64(0x170)][_0xefef64(0x176)](_0x299f78,_0x2080a0,{'unitId':_0x299f78,'subUnitId':_0x2080a0,'ref':'','id':_0x4e64a2[_0xefef64(0x16a)],'dT':D(+_0x4e64a2[_0xefef64(0x181)]),'threadId':_0x4e64a2[_0xefef64(0x15f)],'personId':(_0x323dd7=(_0xf9fdf0=_0x4e64a2['user'])==null?void 0x0:_0xf9fdf0['userID'])!=null?_0x323dd7:_0x4e64a2[_0xefef64(0x166)],'text':JSON['parse'](_0x4e64a2['content']),'parentId':_0x3c867f['id']});break;}case v[_0xefef64(0x15e)]:{const _0x11e70c=this[_0xefef64(0x170)]['getComment'](_0x299f78,_0x2080a0,_0x4e64a2[_0xefef64(0x16a)]);_0x11e70c&&_0x11e70c[_0xefef64(0x152)]&&this[_0xefef64(0x170)][_0xefef64(0x157)](_0x299f78,_0x2080a0,_0x4e64a2[_0xefef64(0x16a)]);break;}case v['Edit']:{this[_0xefef64(0x170)][_0xefef64(0x14b)](_0x299f78,_0x2080a0,{'commentId':_0x4e64a2[_0xefef64(0x16a)],'text':JSON[_0xefef64(0x14e)](_0x4e64a2['content'])});break;}case v[_0xefef64(0x17d)]:{const _0x3dbf8b=(_0x314706=this['_threadCommentModel']['getUnit'](_0x4e64a2[_0xefef64(0x174)])[_0xefef64(0x148)](_0x47a707=>_0x47a707[_0xefef64(0x15f)]===_0x4e64a2[_0xefef64(0x15f)]))==null?void 0x0:_0x314706[_0xefef64(0x147)];_0x3dbf8b&&this['_threadCommentModel'][_0xefef64(0x19f)](_0x299f78,_0x2080a0,_0x3dbf8b['id'],_0x4e64a2['solved']===I[_0xefef64(0x19e)]);break;}}}));}};S=V([p(0x0,_0x3d0824(_0xd7b4e4)),p(0x1,_0x3d0824(_0x5f5c33)),p(0x2,_0x3d0824(_0x3ca25c)),p(0x3,_0x3d0824(_0x1c104d))],S);function _0x438f(_0x4f09ed,_0x25641b){const _0x4cfec8=_0x4cfe();return _0x438f=function(_0x438fab,_0x18d0dd){_0x438fab=_0x438fab-0x13e;let _0x2a2798=_0x4cfec8[_0x438fab];return _0x2a2798;},_0x438f(_0x4f09ed,_0x25641b);}const z=_0x3249fa(0x167),M={};var k=Object[_0x3249fa(0x16c)],Q=(_0x2e446b,_0x5c5316,_0x2344a9,_0x1e6046)=>{const _0x33bc38=_0x3249fa;for(var _0x56d5ee=_0x1e6046>0x1?void 0x0:_0x1e6046?k(_0x5c5316,_0x2344a9):_0x5c5316,_0x4dffb7=_0x2e446b[_0x33bc38(0x154)]-0x1,_0x18b0a8;_0x4dffb7>=0x0;_0x4dffb7--)(_0x18b0a8=_0x2e446b[_0x4dffb7])&&(_0x56d5ee=_0x18b0a8(_0x56d5ee)||_0x56d5ee);return _0x56d5ee;},_=(_0x23ef07,_0x5c4c62)=>(_0x4d0087,_0x41ad80)=>_0x5c4c62(_0x4d0087,_0x41ad80,_0x23ef07);function X(_0x1d4e22,_0x214be2){const _0xba360d=_0x3249fa,_0x42977d=_0x1d4e22['replies'][0x0];return{..._0x214be2,'id':_0x42977d[_0xba360d(0x16a)],'resolved':_0x1d4e22[_0xba360d(0x16b)]===0x1,'dT':D(_0x42977d['createTimestamp']),'personId':_0x42977d['userId'],'threadId':_0x42977d[_0xba360d(0x15f)]};}function ee(_0x3002a6,_0x2e65a3,_0x13befa){const _0x388553=_0x3249fa;var _0xa82bd,_0x5b5ff0;if(((_0x5b5ff0=(_0xa82bd=_0x3002a6==null?void 0x0:_0x3002a6[_0x388553(0x198)])==null?void 0x0:_0xa82bd[_0x388553(0x154)])!=null?_0x5b5ff0:0x0)>0x0){const _0x2d8e97=(_0x1f313d,_0xda51ec)=>({'id':_0x1f313d['replyId'],'threadId':_0x1f313d[_0x388553(0x15f)],'dT':D(_0x1f313d[_0x388553(0x181)]),'personId':_0x1f313d[_0x388553(0x166)],'resolved':_0x3002a6['solved']===I[_0x388553(0x19e)],'unitId':_0x2e65a3,'subUnitId':_0x13befa,'text':JSON['parse'](_0x1f313d[_0x388553(0x158)]),'parentId':_0xda51ec}),_0x59bae4=_0x2d8e97(_0x3002a6[_0x388553(0x198)][0x0]);return{..._0x59bae4,'children':_0x3002a6[_0x388553(0x198)][_0x388553(0x141)](0x1)[_0x388553(0x1a0)](_0x2d7da8=>_0x2d8e97(_0x2d7da8,_0x59bae4['id']))};}return null;}let f=class{constructor(_0x9ed331,_0x16c0c6,_0x179bca,_0x4989a5){const _0x40d38a=_0x3249fa;this[_0x40d38a(0x15d)]=_0x9ed331,this[_0x40d38a(0x14c)]=_0x16c0c6,this[_0x40d38a(0x18d)]=_0x179bca,this[_0x40d38a(0x189)]=_0x4989a5;}async[_0x3249fa(0x176)](_0x5e5f7d){const _0x2dda3f=_0x3249fa;var _0x318575,_0x3593a4;const {parentId:_0x34ac16,unitId:_0x16fef1,text:_0x164986,threadId:_0x4c248f}=_0x5e5f7d,_0x4284e6=(_0x3593a4=(_0x318575=_0x164986[_0x2dda3f(0x184)])==null?void 0x0:_0x318575['filter'](_0x5d1181=>_0x5d1181[_0x2dda3f(0x18e)]===_0xf78c46['COMMENT'])[_0x2dda3f(0x1a0)](_0x517255=>_0x517255['rangeId']))!=null?_0x3593a4:[],_0x120be1=JSON[_0x2dda3f(0x183)](_0x164986),_0x4fd260=(await this[_0x2dda3f(0x18d)][_0x2dda3f(0x163)](_0x16fef1))['getMemberID']();if(_0x34ac16){const _0xf33ed7={'memberId':_0x4fd260,'unitId':_0x16fef1,'content':_0x120be1,'mention':_0x4284e6,'threadId':_0x4c248f},_0x261b00=(await this[_0x2dda3f(0x15d)][_0x2dda3f(0x164)]('/universer-api/comment/unit/'+_0x16fef1+_0x2dda3f(0x180),{'body':_0xf33ed7}))[_0x2dda3f(0x17c)]['reply'];return{..._0x5e5f7d,'id':_0x261b00[_0x2dda3f(0x16a)],'dT':_0x4aa9f0(+_0x261b00[_0x2dda3f(0x181)])[_0x2dda3f(0x16e)](_0x2dda3f(0x18a)),'personId':_0x261b00[_0x2dda3f(0x166)]};}else{const _0x2c0ceb={'memberId':_0x4fd260,'unitId':_0x16fef1,'content':_0x120be1,'mention':_0x4284e6},_0x4d2da6=await this[_0x2dda3f(0x15d)][_0x2dda3f(0x164)](_0x2dda3f(0x156)+_0x16fef1+_0x2dda3f(0x177),{'body':_0x2c0ceb});return X(_0x4d2da6['body'][_0x2dda3f(0x14d)],_0x5e5f7d);}}async[_0x3249fa(0x14b)](_0x4835d4){const _0x41f765=_0x3249fa;var _0x3c349e,_0x26b462;const {text:_0x1e9d7e,unitId:_0x1929f3}=_0x4835d4,_0x4018fe=(_0x26b462=(_0x3c349e=_0x1e9d7e['customRanges'])==null?void 0x0:_0x3c349e['filter'](_0x2da423=>_0x2da423[_0x41f765(0x18e)]===_0xf78c46[_0x41f765(0x192)])[_0x41f765(0x1a0)](_0x404abb=>_0x404abb['rangeId']))!=null?_0x26b462:[],_0x424a8c=JSON[_0x41f765(0x183)](_0x1e9d7e),_0x1fcd14=_0x4835d4[_0x41f765(0x15f)],_0x23e007=_0x4835d4['id'],_0x5f416a={'memberId':(await this[_0x41f765(0x18d)][_0x41f765(0x163)](_0x1929f3))['getMemberID'](),'unitId':_0x1929f3,'threadId':_0x1fcd14,'mention':_0x4018fe,'content':_0x424a8c,'replyId':_0x23e007},_0xe0c858=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x1929f3+_0x41f765(0x159),{'body':_0x5f416a});return!_0xe0c858[_0x41f765(0x17c)][_0x41f765(0x168)]||_0xe0c858[_0x41f765(0x17c)][_0x41f765(0x168)][_0x41f765(0x199)]===0x1;}async['resolveComment'](_0xb84e84){const _0xf3be77=_0x3249fa,{unitId:_0x2f9b60}=_0xb84e84,_0x4cce3e=_0xb84e84[_0xf3be77(0x15f)],_0x592824={'memberId':this['_userService'][_0xf3be77(0x146)]()[_0xf3be77(0x1a1)],'unitId':_0x2f9b60,'threadId':_0x4cce3e,'solved':_0xb84e84[_0xf3be77(0x193)]?I[_0xf3be77(0x19e)]:I[_0xf3be77(0x196)]},_0x126957=await this[_0xf3be77(0x15d)]['post']('/universer-api/comment/unit/'+_0x2f9b60+_0xf3be77(0x17a),{'body':_0x592824});return!_0x126957[_0xf3be77(0x17c)][_0xf3be77(0x168)]||_0x126957['body']['error']['code']===0x1;}async[_0x3249fa(0x157)](_0x42910c,_0x278cde,_0x4f7299,_0x2bb48c){const _0x180a20=_0x3249fa,_0x311160={'memberId':(await this[_0x180a20(0x18d)][_0x180a20(0x163)](_0x42910c))['getMemberID'](),'threadId':_0x4f7299,'replyId':_0x2bb48c,'unitId':_0x42910c},_0x1ac1e0=await this[_0x180a20(0x15d)][_0x180a20(0x164)](_0x180a20(0x156)+_0x42910c+_0x180a20(0x161),{'body':_0x311160});return!_0x1ac1e0['body'][_0x180a20(0x168)]||_0x1ac1e0[_0x180a20(0x17c)]['error']['code']===0x1;}async['listComments'](_0x12ce2a,_0x4c4be2,_0x4bbd66){const _0x173663=_0x3249fa,_0x44be3d={'unitId':_0x12ce2a,'threadId':_0x4bbd66},_0x6ccef1=await this[_0x173663(0x15d)][_0x173663(0x164)]('/universer-api/comment/unit/'+_0x12ce2a+_0x173663(0x143),{'body':_0x44be3d}),_0x5a6f3a=_0x4bbd66['map'](_0x164b1d=>ee(_0x6ccef1[_0x173663(0x17c)][_0x173663(0x14a)][_0x164b1d],_0x12ce2a,_0x4c4be2))['filter'](Boolean);return Object['values'](_0x6ccef1[_0x173663(0x17c)][_0x173663(0x162)])['forEach'](_0x50e3b9=>{const _0x18dc8a=_0x173663;this[_0x18dc8a(0x14c)][_0x18dc8a(0x197)](_0x50e3b9);}),_0x5a6f3a;}['saveCommentToSnapshot'](_0x410952){return{'id':_0x410952['id'],'threadId':_0x410952['threadId'],'ref':_0x410952['ref']};}};f=Q([_(0x0,_0x3d0824(_0x2adda5)),_(0x1,_0x3d0824(_0x3ca25c)),_(0x2,_0x3d0824(_0x1dd18a)),_(0x3,_0x3d0824(_0x1c104d))],f);var re=Object[_0x3249fa(0x16c)],te=(_0x47cdb7,_0x18e44e,_0x362779,_0x28976a)=>{for(var _0x4d3eba=_0x28976a>0x1?void 0x0:_0x28976a?re(_0x18e44e,_0x362779):_0x18e44e,_0x1334de=_0x47cdb7['length']-0x1,_0x311730;_0x1334de>=0x0;_0x1334de--)(_0x311730=_0x47cdb7[_0x1334de])&&(_0x4d3eba=_0x311730(_0x4d3eba)||_0x4d3eba);return _0x4d3eba;},N=(_0x1e723a,_0x1e320e)=>(_0x36289f,_0x1a7bb7)=>_0x1e320e(_0x36289f,_0x1a7bb7,_0x1e723a);let g=class extends _0x374870{constructor(_0x587732,_0x2ecf1f){const _0x4f812a=_0x3249fa;super(),this[_0x4f812a(0x15c)]=_0x587732,this[_0x4f812a(0x165)]=_0x2ecf1f,this[_0x4f812a(0x182)]();}[_0x3249fa(0x182)](){const _0x4fcf95=_0x3249fa;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x4fcf95(0x15c)][_0x4fcf95(0x15b)]=!0x1;}};g=te([N(0x0,_0x4f89eb),N(0x1,_0x3d0824(f))],g);var se=Object[_0x3249fa(0x187)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3d2257,_0x431aa4,_0x350aaf)=>_0x431aa4 in _0x3d2257?se(_0x3d2257,_0x431aa4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x350aaf}):_0x3d2257[_0x431aa4]=_0x350aaf,ie=(_0x884f9f,_0x1b63fe,_0x9fd74b,_0x1eafba)=>{const _0x4e7c9b=_0x3249fa;for(var _0xa4cd48=_0x1eafba>0x1?void 0x0:_0x1eafba?oe(_0x1b63fe,_0x9fd74b):_0x1b63fe,_0x5c2e6a=_0x884f9f[_0x4e7c9b(0x154)]-0x1,_0x456011;_0x5c2e6a>=0x0;_0x5c2e6a--)(_0x456011=_0x884f9f[_0x5c2e6a])&&(_0xa4cd48=_0x456011(_0xa4cd48)||_0xa4cd48);return _0xa4cd48;},w=(_0x50da81,_0x5516e2)=>(_0x3315d1,_0x629505)=>_0x5516e2(_0x3315d1,_0x629505,_0x50da81),$=(_0x320125,_0x4d9aa8,_0x20f645)=>ne(_0x320125,typeof _0x4d9aa8!='symbol'?_0x4d9aa8+'':_0x4d9aa8,_0x20f645);let b=class extends _0x847ca8{constructor(_0x271cf4=M,_0x58fc7b,_0x39f1b9){const _0xd65d7f=_0x3249fa;super(),this['_config']=_0x271cf4,this['_injector']=_0x58fc7b,this[_0xd65d7f(0x153)]=_0x39f1b9;const {..._0xdb7ce2}=_0x5382cd({},M,this[_0xd65d7f(0x188)]);this[_0xd65d7f(0x153)][_0xd65d7f(0x144)](z,_0xdb7ce2);}['onStarting'](){const _0x51c922=_0x3249fa;[[f],[g],[S]][_0x51c922(0x13f)](_0x51c174=>{const _0x76f3be=_0x51c922;this[_0x76f3be(0x189)]['add'](_0x51c174);});}[_0x3249fa(0x185)](){const _0x225977=_0x3249fa;this[_0x225977(0x189)][_0x225977(0x145)](g),this[_0x225977(0x189)][_0x225977(0x145)](S);}};$(b,_0x3249fa(0x142),W),$(b,_0x3249fa(0x19b),_0x2bf989[_0x3249fa(0x173)]),b=ie([_0x339a9c(_0x103916,_0x40809b,_0x18f493),w(0x1,_0x3d0824(_0x1c104d)),w(0x2,_0x50abf7)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x166c12=_0x10f6;(function(_0x1a6a5e,_0x24319e){const _0x2e1f0c=_0x10f6,_0xdc54c=_0x1a6a5e();while(!![]){try{const _0x30adae=-parseInt(_0x2e1f0c(0x196))/0x1+parseInt(_0x2e1f0c(0x1f3))/0x2*(parseInt(_0x2e1f0c(0x19a))/0x3)+-parseInt(_0x2e1f0c(0x1ce))/0x4+-parseInt(_0x2e1f0c(0x1a6))/0x5+parseInt(_0x2e1f0c(0x1aa))/0x6+-parseInt(_0x2e1f0c(0x19b))/0x7*(-parseInt(_0x2e1f0c(0x1e7))/0x8)+parseInt(_0x2e1f0c(0x1de))/0x9;if(_0x30adae===_0x24319e)break;else _0xdc54c['push'](_0xdc54c['shift']());}catch(_0x5e5e95){_0xdc54c['push'](_0xdc54c['shift']());}}}(_0x3b23,0xacab1));import{CommentService as _0x25df25,CollaborationSessionService as _0x1cbde6,UniverCollaborationClientPlugin as _0x4b2720}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1bfdd1}from'@univerjs-pro/license';import{dayjs as _0x3cecb5,UserManagerService as _0xc83dbe,Inject as _0x8fdc81,Injector as _0x37caba,Disposable as _0x18908b,CustomRangeType as _0xf7bfe6,UniverInstanceType as _0x4acfe4,DependentOn as _0x648336,IConfigService as _0x4f6915,Plugin as _0x2b8ea1,merge as _0x984593}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3a2862}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2fa9d4,IThreadCommentDataSourceService as _0x360ed4}from'@univerjs/thread-comment';function _0x3b23(){const _0x11dc9c=['onReady','user','/universer-api/comment/unit/','addComment','254682RxgyPF','getOwnPropertyDescriptor','Unknown','Solved','18boxwqC','105oewPtB','deleteComment','saveCommentToSnapshot','/solved','comments','error','Edit','slice','customRanges','filter','_sessionService','4760075PzwSIl','_userService','setConfig','find','251904PJVoka','replies','reply','length','addUser','Solve','syncUpdateMutationToColla','Reply','defineProperty','COMMENT','resolved','_threadCommentDataSource','pluginName','_configService','userID','thread-comment-data-source.config','parse','replyId','forEach','_httpService','pipe','subscribe','users','_init','dataSource','unitId','symbol','_threadCommentModel','Delete','_initUserSync','content','/list','get','parentId','Add','threadId','4843388LFUyRx','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getComment','values','root','body','requireSession','rangeId','solved','_injector','type','code','_threadCommentDataSourceService','getUser','format','OpenOrReOpen','11679363tWsTKq','getUnit','stringify','listComments','_config','_commentService','delete','updateComment','/reply','488416kMvqye','onStarting','post','userId','/universer-api/user/list','personId','map','resolveComment','ref','getMemberID','commentUpdate$','getCurrentUser','289774kogfea','createTimestamp','disposeWithMe','size','rangeType','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','_initDataSource'];_0x3b23=function(){return _0x11dc9c;};return _0x3b23();}import{bufferTime as _0x51f2cb}from'rxjs';import{HTTPService as _0x57fadc}from'@univerjs/network';const W=_0x166c12(0x1cf);var I=(_0x3b6987=>(_0x3b6987[_0x3b6987[_0x166c12(0x1dd)]=0x0]=_0x166c12(0x1dd),_0x3b6987[_0x3b6987['Solved']=0x1]=_0x166c12(0x199),_0x3b6987[_0x3b6987[_0x166c12(0x1f8)]=-0x1]=_0x166c12(0x1f8),_0x3b6987))(I||{}),v=(_0x5855b0=>(_0x5855b0[_0x5855b0[_0x166c12(0x198)]=0x0]=_0x166c12(0x198),_0x5855b0[_0x5855b0['Add']=0x1]=_0x166c12(0x1cc),_0x5855b0[_0x5855b0[_0x166c12(0x1b1)]=0x2]=_0x166c12(0x1b1),_0x5855b0[_0x5855b0[_0x166c12(0x1a1)]=0x3]='Edit',_0x5855b0[_0x5855b0[_0x166c12(0x1c6)]=0x4]=_0x166c12(0x1c6),_0x5855b0[_0x5855b0['Solve']=0x5]=_0x166c12(0x1af),_0x5855b0[_0x5855b0[_0x166c12(0x1f8)]=-0x1]=_0x166c12(0x1f8),_0x5855b0))(v||{});const D=_0x3cd454=>_0x3cecb5(new Date(+_0x3cd454))[_0x166c12(0x1dc)](_0x166c12(0x1f9)),B=async(_0x36e145,_0xb19bb2)=>{const _0x43792d=_0x166c12,_0x4553f7=_0x36e145[_0x43792d(0x1ca)](_0xc83dbe),_0x5a2ed8=_0x36e145[_0x43792d(0x1ca)](_0x57fadc);_0xb19bb2[_0x43792d(0x1bc)](_0x9aba20=>{const _0x2c17f0=_0x43792d;_0x4553f7[_0x2c17f0(0x1db)](_0x9aba20)&&_0xb19bb2[_0x2c17f0(0x1e4)](_0x9aba20);}),_0xb19bb2[_0x43792d(0x1f6)]&&(await _0x5a2ed8[_0x43792d(0x1ca)](_0x43792d(0x1eb),{'params':{'userIDs':[..._0xb19bb2]}}))['body'][_0x43792d(0x1c0)][_0x43792d(0x1bc)](_0x1fa17e=>{const _0x2c68b1=_0x43792d;_0x1fa17e&&_0x4553f7[_0x2c68b1(0x1ae)](_0x1fa17e);});};var K=Object[_0x166c12(0x197)],V=(_0x4d23cd,_0xa427dc,_0x48082a,_0x1c2e22)=>{const _0x2d02d5=_0x166c12;for(var _0x21a7ca=_0x1c2e22>0x1?void 0x0:_0x1c2e22?K(_0xa427dc,_0x48082a):_0xa427dc,_0x10936c=_0x4d23cd[_0x2d02d5(0x1ad)]-0x1,_0x453bbb;_0x10936c>=0x0;_0x10936c--)(_0x453bbb=_0x4d23cd[_0x10936c])&&(_0x21a7ca=_0x453bbb(_0x21a7ca)||_0x21a7ca);return _0x21a7ca;},p=(_0x55630d,_0x37a088)=>(_0x155671,_0x396802)=>_0x37a088(_0x155671,_0x396802,_0x55630d);let S=class extends _0x18908b{constructor(_0x29a138,_0x2106e2,_0x4fcc7e,_0x251864){const _0x3e0b62=_0x166c12;super(),this[_0x3e0b62(0x1e3)]=_0x29a138,this[_0x3e0b62(0x1c5)]=_0x2106e2,this[_0x3e0b62(0x1a7)]=_0x4fcc7e,this[_0x3e0b62(0x1d7)]=_0x251864,this[_0x3e0b62(0x1c1)](),this[_0x3e0b62(0x1c7)]();}[_0x166c12(0x1c7)](){const _0x2c8663=_0x166c12;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x2c8663(0x1be)](_0x51f2cb(0x10))[_0x2c8663(0x1bf)](_0x50bb92=>{const _0x38242d=_0x2c8663,_0x3b47f0=new Set();_0x50bb92[_0x38242d(0x1bc)](_0x7709b4=>{const _0x43aef5=_0x38242d;switch(_0x7709b4[_0x43aef5(0x1d8)]){case'add':{const _0x3f9fa3=_0x7709b4['payload'][_0x43aef5(0x1ec)];_0x3b47f0['add'](_0x3f9fa3);break;}}}),B(this[_0x38242d(0x1d7)],_0x3b47f0);}));}[_0x166c12(0x1c1)](){const _0x24e48e=_0x166c12;this[_0x24e48e(0x1f5)](this[_0x24e48e(0x1e3)][_0x24e48e(0x1f1)][_0x24e48e(0x1bf)](async _0x4f670f=>{const _0x2b94df=_0x24e48e;var _0x46d6ed,_0x5cd8a7,_0x3e5c43,_0x63985b;const _0x887d46=(_0x46d6ed=this[_0x2b94df(0x1c5)][_0x2b94df(0x1df)](_0x4f670f[_0x2b94df(0x1c3)])[_0x2b94df(0x1a9)](_0x47934d=>_0x47934d[_0x2b94df(0x1cd)]===_0x4f670f[_0x2b94df(0x1cd)]))==null?void 0x0:_0x46d6ed[_0x2b94df(0x1d2)];if(!_0x887d46)return;const {unitId:_0x30791d,subUnitId:_0x11c418}=_0x887d46;switch(_0x4f670f['user']&&this['_userService'][_0x2b94df(0x1ae)](_0x4f670f['user']),_0x4f670f['type']){case v[_0x2b94df(0x1cc)]:break;case v['Reply']:{this[_0x2b94df(0x1c5)]['addComment'](_0x30791d,_0x11c418,{'unitId':_0x30791d,'subUnitId':_0x11c418,'ref':'','id':_0x4f670f[_0x2b94df(0x1bb)],'dT':D(+_0x4f670f[_0x2b94df(0x1f4)]),'threadId':_0x4f670f[_0x2b94df(0x1cd)],'personId':(_0x3e5c43=(_0x5cd8a7=_0x4f670f[_0x2b94df(0x193)])==null?void 0x0:_0x5cd8a7[_0x2b94df(0x1b8)])!=null?_0x3e5c43:_0x4f670f['userId'],'text':JSON[_0x2b94df(0x1ba)](_0x4f670f[_0x2b94df(0x1c8)]),'parentId':_0x887d46['id']});break;}case v['Delete']:{const _0x352c5b=this[_0x2b94df(0x1c5)][_0x2b94df(0x1d0)](_0x30791d,_0x11c418,_0x4f670f[_0x2b94df(0x1bb)]);_0x352c5b&&_0x352c5b[_0x2b94df(0x1cb)]&&this[_0x2b94df(0x1c5)][_0x2b94df(0x19c)](_0x30791d,_0x11c418,_0x4f670f[_0x2b94df(0x1bb)]);break;}case v[_0x2b94df(0x1a1)]:{this['_threadCommentModel'][_0x2b94df(0x1e5)](_0x30791d,_0x11c418,{'commentId':_0x4f670f[_0x2b94df(0x1bb)],'text':JSON[_0x2b94df(0x1ba)](_0x4f670f['content'])});break;}case v['Solve']:{const _0x349091=(_0x63985b=this[_0x2b94df(0x1c5)]['getUnit'](_0x4f670f[_0x2b94df(0x1c3)])[_0x2b94df(0x1a9)](_0x2e22bd=>_0x2e22bd[_0x2b94df(0x1cd)]===_0x4f670f['threadId']))==null?void 0x0:_0x63985b[_0x2b94df(0x1d2)];_0x349091&&this['_threadCommentModel']['resolveComment'](_0x30791d,_0x11c418,_0x349091['id'],_0x4f670f[_0x2b94df(0x1d6)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x8fdc81(_0x25df25)),p(0x1,_0x8fdc81(_0x2fa9d4)),p(0x2,_0x8fdc81(_0xc83dbe)),p(0x3,_0x8fdc81(_0x37caba))],S);const z=_0x166c12(0x1b9),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x236902,_0x351f7f,_0x1e3934,_0x4045e9)=>{const _0x5c55fa=_0x166c12;for(var _0x25ab4e=_0x4045e9>0x1?void 0x0:_0x4045e9?k(_0x351f7f,_0x1e3934):_0x351f7f,_0x2683be=_0x236902[_0x5c55fa(0x1ad)]-0x1,_0x31e114;_0x2683be>=0x0;_0x2683be--)(_0x31e114=_0x236902[_0x2683be])&&(_0x25ab4e=_0x31e114(_0x25ab4e)||_0x25ab4e);return _0x25ab4e;},_=(_0x125859,_0x5f2eb7)=>(_0x2f76a9,_0x281263)=>_0x5f2eb7(_0x2f76a9,_0x281263,_0x125859);function X(_0x3b08f7,_0x13f5a3){const _0x3183d8=_0x166c12,_0x37241b=_0x3b08f7['replies'][0x0];return{..._0x13f5a3,'id':_0x37241b[_0x3183d8(0x1bb)],'resolved':_0x3b08f7[_0x3183d8(0x1d6)]===0x1,'dT':D(_0x37241b['createTimestamp']),'personId':_0x37241b['userId'],'threadId':_0x37241b[_0x3183d8(0x1cd)]};}function ee(_0x39875d,_0x446a43,_0x730daf){const _0x196f1b=_0x166c12;var _0x4b5366,_0x5b39d7;if(((_0x5b39d7=(_0x4b5366=_0x39875d==null?void 0x0:_0x39875d[_0x196f1b(0x1ab)])==null?void 0x0:_0x4b5366[_0x196f1b(0x1ad)])!=null?_0x5b39d7:0x0)>0x0){const _0x3aaf1a=(_0x3fdef4,_0x1f6668)=>({'id':_0x3fdef4[_0x196f1b(0x1bb)],'threadId':_0x3fdef4[_0x196f1b(0x1cd)],'dT':D(_0x3fdef4[_0x196f1b(0x1f4)]),'personId':_0x3fdef4[_0x196f1b(0x1ea)],'resolved':_0x39875d[_0x196f1b(0x1d6)]===I[_0x196f1b(0x199)],'unitId':_0x446a43,'subUnitId':_0x730daf,'text':JSON[_0x196f1b(0x1ba)](_0x3fdef4[_0x196f1b(0x1c8)]),'parentId':_0x1f6668}),_0x4de25=_0x3aaf1a(_0x39875d[_0x196f1b(0x1ab)][0x0]);return{..._0x4de25,'children':_0x39875d[_0x196f1b(0x1ab)][_0x196f1b(0x1a2)](0x1)[_0x196f1b(0x1ed)](_0x2bda2d=>_0x3aaf1a(_0x2bda2d,_0x4de25['id']))};}return null;}let f=class{constructor(_0x7acca5,_0x3cc23d,_0x252b3e,_0x3160aa){this['_httpService']=_0x7acca5,this['_userService']=_0x3cc23d,this['_sessionService']=_0x252b3e,this['_injector']=_0x3160aa;}async[_0x166c12(0x195)](_0x13047e){const _0x3e8564=_0x166c12;var _0x295c93,_0x223f4f;const {parentId:_0x593255,unitId:_0x404c6d,text:_0x4134fe,threadId:_0xf7c514}=_0x13047e,_0x2f09a9=(_0x223f4f=(_0x295c93=_0x4134fe['customRanges'])==null?void 0x0:_0x295c93[_0x3e8564(0x1a4)](_0x1462bd=>_0x1462bd[_0x3e8564(0x1f7)]===_0xf7bfe6[_0x3e8564(0x1b3)])['map'](_0x4e0a3c=>_0x4e0a3c[_0x3e8564(0x1d5)]))!=null?_0x223f4f:[],_0x2338d5=JSON['stringify'](_0x4134fe),_0x42ad00=(await this[_0x3e8564(0x1a5)][_0x3e8564(0x1d4)](_0x404c6d))[_0x3e8564(0x1f0)]();if(_0x593255){const _0x88937f={'memberId':_0x42ad00,'unitId':_0x404c6d,'content':_0x2338d5,'mention':_0x2f09a9,'threadId':_0xf7c514},_0x46636e=(await this[_0x3e8564(0x1bd)]['post'](_0x3e8564(0x194)+_0x404c6d+_0x3e8564(0x1e6),{'body':_0x88937f}))[_0x3e8564(0x1d3)][_0x3e8564(0x1ac)];return{..._0x13047e,'id':_0x46636e[_0x3e8564(0x1bb)],'dT':_0x3cecb5(+_0x46636e[_0x3e8564(0x1f4)])[_0x3e8564(0x1dc)](_0x3e8564(0x1f9)),'personId':_0x46636e['userId']};}else{const _0x3484fa={'memberId':_0x42ad00,'unitId':_0x404c6d,'content':_0x2338d5,'mention':_0x2f09a9},_0x359bdb=await this[_0x3e8564(0x1bd)][_0x3e8564(0x1e9)](_0x3e8564(0x194)+_0x404c6d+'/add',{'body':_0x3484fa});return X(_0x359bdb[_0x3e8564(0x1d3)]['comment'],_0x13047e);}}async[_0x166c12(0x1e5)](_0xb7e253){const _0x1d18a8=_0x166c12;var _0x2a10f0,_0x41f84c;const {text:_0x261ae8,unitId:_0x2c0912}=_0xb7e253,_0x4e98b7=(_0x41f84c=(_0x2a10f0=_0x261ae8[_0x1d18a8(0x1a3)])==null?void 0x0:_0x2a10f0[_0x1d18a8(0x1a4)](_0x4b9621=>_0x4b9621[_0x1d18a8(0x1f7)]===_0xf7bfe6[_0x1d18a8(0x1b3)])[_0x1d18a8(0x1ed)](_0x51d2ef=>_0x51d2ef[_0x1d18a8(0x1d5)]))!=null?_0x41f84c:[],_0x1a323f=JSON[_0x1d18a8(0x1e0)](_0x261ae8),_0x2f4aa7=_0xb7e253[_0x1d18a8(0x1cd)],_0xf016b6=_0xb7e253['id'],_0xaab2ff={'memberId':(await this[_0x1d18a8(0x1a5)][_0x1d18a8(0x1d4)](_0x2c0912))['getMemberID'](),'unitId':_0x2c0912,'threadId':_0x2f4aa7,'mention':_0x4e98b7,'content':_0x1a323f,'replyId':_0xf016b6},_0x451c78=await this[_0x1d18a8(0x1bd)]['post'](_0x1d18a8(0x194)+_0x2c0912+'/edit',{'body':_0xaab2ff});return!_0x451c78[_0x1d18a8(0x1d3)][_0x1d18a8(0x1a0)]||_0x451c78[_0x1d18a8(0x1d3)]['error']['code']===0x1;}async[_0x166c12(0x1ee)](_0x2406e4){const _0x20bb96=_0x166c12,{unitId:_0x35fd9b}=_0x2406e4,_0x20540d=_0x2406e4[_0x20bb96(0x1cd)],_0x402c96={'memberId':this[_0x20bb96(0x1a7)][_0x20bb96(0x1f2)]()['userID'],'unitId':_0x35fd9b,'threadId':_0x20540d,'solved':_0x2406e4[_0x20bb96(0x1b4)]?I[_0x20bb96(0x199)]:I[_0x20bb96(0x1dd)]},_0x4cb16d=await this['_httpService'][_0x20bb96(0x1e9)]('/universer-api/comment/unit/'+_0x35fd9b+_0x20bb96(0x19e),{'body':_0x402c96});return!_0x4cb16d[_0x20bb96(0x1d3)][_0x20bb96(0x1a0)]||_0x4cb16d[_0x20bb96(0x1d3)][_0x20bb96(0x1a0)]['code']===0x1;}async[_0x166c12(0x19c)](_0x4124e3,_0x28a65b,_0xe062f3,_0x5548bd){const _0x57a811=_0x166c12,_0x47a5a0={'memberId':(await this[_0x57a811(0x1a5)][_0x57a811(0x1d4)](_0x4124e3))[_0x57a811(0x1f0)](),'threadId':_0xe062f3,'replyId':_0x5548bd,'unitId':_0x4124e3},_0x16c1c5=await this[_0x57a811(0x1bd)][_0x57a811(0x1e9)](_0x57a811(0x194)+_0x4124e3+'/delete',{'body':_0x47a5a0});return!_0x16c1c5[_0x57a811(0x1d3)]['error']||_0x16c1c5[_0x57a811(0x1d3)][_0x57a811(0x1a0)][_0x57a811(0x1d9)]===0x1;}async[_0x166c12(0x1e1)](_0x3ade55,_0x2746f5,_0x40018a){const _0x35bb43=_0x166c12,_0x18ff18={'unitId':_0x3ade55,'threadId':_0x40018a},_0x599aef=await this[_0x35bb43(0x1bd)][_0x35bb43(0x1e9)](_0x35bb43(0x194)+_0x3ade55+_0x35bb43(0x1c9),{'body':_0x18ff18}),_0x5485d8=_0x40018a['map'](_0x5a5e72=>ee(_0x599aef[_0x35bb43(0x1d3)][_0x35bb43(0x19f)][_0x5a5e72],_0x3ade55,_0x2746f5))[_0x35bb43(0x1a4)](Boolean);return Object[_0x35bb43(0x1d1)](_0x599aef['body'][_0x35bb43(0x1c0)])[_0x35bb43(0x1bc)](_0x649fec=>{const _0x1748d4=_0x35bb43;this[_0x1748d4(0x1a7)]['addUser'](_0x649fec);}),_0x5485d8;}[_0x166c12(0x19d)](_0x26b0fb){const _0xc11efc=_0x166c12;return{'id':_0x26b0fb['id'],'threadId':_0x26b0fb['threadId'],'ref':_0x26b0fb[_0xc11efc(0x1ef)]};}};f=Q([_(0x0,_0x8fdc81(_0x57fadc)),_(0x1,_0x8fdc81(_0xc83dbe)),_(0x2,_0x8fdc81(_0x1cbde6)),_(0x3,_0x8fdc81(_0x37caba))],f);function _0x10f6(_0x2bd15d,_0x137b0f){const _0x3b23c0=_0x3b23();return _0x10f6=function(_0x10f67c,_0xbc0d10){_0x10f67c=_0x10f67c-0x191;let _0x50d7b3=_0x3b23c0[_0x10f67c];return _0x50d7b3;},_0x10f6(_0x2bd15d,_0x137b0f);}var re=Object[_0x166c12(0x197)],te=(_0x291ffd,_0x10ef46,_0x2a468e,_0x1bbc9a)=>{const _0x5b87ed=_0x166c12;for(var _0xd0ef29=_0x1bbc9a>0x1?void 0x0:_0x1bbc9a?re(_0x10ef46,_0x2a468e):_0x10ef46,_0x14e5f6=_0x291ffd[_0x5b87ed(0x1ad)]-0x1,_0x33050f;_0x14e5f6>=0x0;_0x14e5f6--)(_0x33050f=_0x291ffd[_0x14e5f6])&&(_0xd0ef29=_0x33050f(_0xd0ef29)||_0xd0ef29);return _0xd0ef29;},N=(_0x4d2f7b,_0x19b1f8)=>(_0x12a140,_0x38bb8e)=>_0x19b1f8(_0x12a140,_0x38bb8e,_0x4d2f7b);let g=class extends _0x18908b{constructor(_0x3028cd,_0xb3add5){const _0x35c5df=_0x166c12;super(),this['_threadCommentDataSourceService']=_0x3028cd,this['_threadCommentDataSource']=_0xb3add5,this[_0x35c5df(0x191)]();}[_0x166c12(0x191)](){const _0x54824e=_0x166c12;this[_0x54824e(0x1da)][_0x54824e(0x1c2)]=this[_0x54824e(0x1b5)],this[_0x54824e(0x1da)][_0x54824e(0x1b0)]=!0x1;}};g=te([N(0x0,_0x360ed4),N(0x1,_0x8fdc81(f))],g);var se=Object[_0x166c12(0x1b2)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x382198,_0x385d53,_0x504c66)=>_0x385d53 in _0x382198?se(_0x382198,_0x385d53,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x504c66}):_0x382198[_0x385d53]=_0x504c66,ie=(_0x5618b5,_0x4abda7,_0x3b5b9a,_0x4315cf)=>{const _0x4ec47e=_0x166c12;for(var _0x534d0f=_0x4315cf>0x1?void 0x0:_0x4315cf?oe(_0x4abda7,_0x3b5b9a):_0x4abda7,_0x45acdc=_0x5618b5[_0x4ec47e(0x1ad)]-0x1,_0xd5032d;_0x45acdc>=0x0;_0x45acdc--)(_0xd5032d=_0x5618b5[_0x45acdc])&&(_0x534d0f=_0xd5032d(_0x534d0f)||_0x534d0f);return _0x534d0f;},w=(_0x36e1f1,_0x1a0080)=>(_0x14349a,_0xa97861)=>_0x1a0080(_0x14349a,_0xa97861,_0x36e1f1),$=(_0x561fa8,_0x4efdc5,_0x1e05d7)=>ne(_0x561fa8,typeof _0x4efdc5!=_0x166c12(0x1c4)?_0x4efdc5+'':_0x4efdc5,_0x1e05d7);let b=class extends _0x2b8ea1{constructor(_0x114f27=M,_0x560757,_0x133b78){const _0x538311=_0x166c12;super(),this[_0x538311(0x1e2)]=_0x114f27,this[_0x538311(0x1d7)]=_0x560757,this[_0x538311(0x1b7)]=_0x133b78;const {..._0x339ec6}=_0x984593({},M,this[_0x538311(0x1e2)]);this[_0x538311(0x1b7)][_0x538311(0x1a8)](z,_0x339ec6);}[_0x166c12(0x1e8)](){const _0x265e7d=_0x166c12;[[f],[g],[S]][_0x265e7d(0x1bc)](_0x4d52c6=>{const _0x31f9a9=_0x265e7d;this[_0x31f9a9(0x1d7)]['add'](_0x4d52c6);});}[_0x166c12(0x192)](){const _0x45d4c6=_0x166c12;this[_0x45d4c6(0x1d7)][_0x45d4c6(0x1ca)](g),this[_0x45d4c6(0x1d7)]['get'](S);}};$(b,_0x166c12(0x1b6),W),$(b,_0x166c12(0x1d8),_0x4acfe4['UNIVER_UNKNOWN']),b=ie([_0x648336(_0x3a2862,_0x4b2720,_0x1bfdd1),w(0x1,_0x8fdc81(_0x37caba)),w(0x2,_0x4f6915)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3249fa=_0x438f;(function(_0x31cec6,_0x42c7f9){const _0x49cc29=_0x438f,_0x1701ba=_0x31cec6();while(!![]){try{const _0x1cca01=-parseInt(_0x49cc29(0x195))/0x1+parseInt(_0x49cc29(0x19c))/0x2*(parseInt(_0x49cc29(0x140))/0x3)+parseInt(_0x49cc29(0x171))/0x4*(parseInt(_0x49cc29(0x14f))/0x5)+parseInt(_0x49cc29(0x19d))/0x6+parseInt(_0x49cc29(0x15a))/0x7*(parseInt(_0x49cc29(0x178))/0x8)+parseInt(_0x49cc29(0x13e))/0x9+parseInt(_0x49cc29(0x179))/0xa;if(_0x1cca01===_0x42c7f9)break;else _0x1701ba['push'](_0x1701ba['shift']());}catch(_0x5ee163){_0x1701ba['push'](_0x1701ba['shift']());}}}(_0x4cfe,0xd9225));import{CommentService as _0xd7b4e4,CollaborationSessionService as _0x1dd18a,UniverCollaborationClientPlugin as _0x40809b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x18f493}from'@univerjs-pro/license';import{dayjs as _0x4aa9f0,UserManagerService as _0x3ca25c,Inject as _0x3d0824,Injector as _0x1c104d,Disposable as _0x374870,CustomRangeType as _0xf78c46,UniverInstanceType as _0x2bf989,DependentOn as _0x339a9c,IConfigService as _0x50abf7,Plugin as _0x847ca8,merge as _0x5382cd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x103916}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5f5c33,IThreadCommentDataSourceService as _0x4f89eb}from'@univerjs/thread-comment';import{bufferTime as _0x50b0f3}from'rxjs';import{HTTPService as _0x2adda5}from'@univerjs/network';const W=_0x3249fa(0x17f);var I=(_0x46d344=>(_0x46d344[_0x46d344[_0x3249fa(0x196)]=0x0]='OpenOrReOpen',_0x46d344[_0x46d344[_0x3249fa(0x19e)]=0x1]=_0x3249fa(0x19e),_0x46d344[_0x46d344[_0x3249fa(0x17e)]=-0x1]=_0x3249fa(0x17e),_0x46d344))(I||{}),v=(_0x1e5a63=>(_0x1e5a63[_0x1e5a63['Unknown']=0x0]=_0x3249fa(0x194),_0x1e5a63[_0x1e5a63['Add']=0x1]=_0x3249fa(0x16f),_0x1e5a63[_0x1e5a63[_0x3249fa(0x150)]=0x2]='Reply',_0x1e5a63[_0x1e5a63[_0x3249fa(0x149)]=0x3]=_0x3249fa(0x149),_0x1e5a63[_0x1e5a63[_0x3249fa(0x15e)]=0x4]=_0x3249fa(0x15e),_0x1e5a63[_0x1e5a63[_0x3249fa(0x17d)]=0x5]=_0x3249fa(0x17d),_0x1e5a63[_0x1e5a63['UNRECOGNIZED']=-0x1]=_0x3249fa(0x17e),_0x1e5a63))(v||{});function _0x4cfe(){const _0x28e039=['Reply','_init','parentId','_configService','length','subscribe','/universer-api/comment/unit/','deleteComment','content','/edit','7FeRMEe','syncUpdateMutationToColla','_threadCommentDataSourceService','_httpService','Delete','threadId','_commentService','/delete','users','requireSession','post','_threadCommentDataSource','userId','thread-comment-data-source.config','error','getUnit','replyId','solved','getOwnPropertyDescriptor','payload','format','Add','_threadCommentModel','12IbjBLW','disposeWithMe','UNIVER_UNKNOWN','unitId','pipe','addComment','/add','2469816LgnJkE','1115760ythigr','/solved','getUser','body','Solve','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/reply','createTimestamp','_initDataSource','stringify','customRanges','onReady','delete','defineProperty','_config','_injector','YYYY/MM/DD\x20HH:mm','commentUpdate$','user','_sessionService','rangeType','size','add','personId','COMMENT','resolved','Unknown','1614311FoQWEG','OpenOrReOpen','addUser','replies','code','_initUserSync','type','6MDbFmz','3415320URsvby','Solved','resolveComment','map','userID','10868877ioBpAj','forEach','8727QIajlU','slice','pluginName','/list','setConfig','get','getCurrentUser','root','find','Edit','comments','updateComment','_userService','comment','parse','496315sqMaKA'];_0x4cfe=function(){return _0x28e039;};return _0x4cfe();}const D=_0x58d3f7=>_0x4aa9f0(new Date(+_0x58d3f7))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x332892,_0x183667)=>{const _0x320804=_0x3249fa,_0x163163=_0x332892[_0x320804(0x145)](_0x3ca25c),_0x39972f=_0x332892[_0x320804(0x145)](_0x2adda5);_0x183667['forEach'](_0x1b8820=>{const _0xfab23=_0x320804;_0x163163[_0xfab23(0x17b)](_0x1b8820)&&_0x183667[_0xfab23(0x186)](_0x1b8820);}),_0x183667[_0x320804(0x18f)]&&(await _0x39972f[_0x320804(0x145)]('/universer-api/user/list',{'params':{'userIDs':[..._0x183667]}}))[_0x320804(0x17c)][_0x320804(0x162)]['forEach'](_0x4d53c9=>{const _0x221cf4=_0x320804;_0x4d53c9&&_0x163163[_0x221cf4(0x197)](_0x4d53c9);});};var K=Object[_0x3249fa(0x16c)],V=(_0x2c902f,_0x13a01b,_0x513399,_0x2d0c4a)=>{const _0x171d4c=_0x3249fa;for(var _0x48340d=_0x2d0c4a>0x1?void 0x0:_0x2d0c4a?K(_0x13a01b,_0x513399):_0x13a01b,_0x3a7445=_0x2c902f[_0x171d4c(0x154)]-0x1,_0x283f85;_0x3a7445>=0x0;_0x3a7445--)(_0x283f85=_0x2c902f[_0x3a7445])&&(_0x48340d=_0x283f85(_0x48340d)||_0x48340d);return _0x48340d;},p=(_0x4d0bfc,_0x2497b3)=>(_0x4512fd,_0x3eb90f)=>_0x2497b3(_0x4512fd,_0x3eb90f,_0x4d0bfc);let S=class extends _0x374870{constructor(_0x328903,_0x4a4f64,_0x1bc0a6,_0x4a57cc){const _0x5be9e2=_0x3249fa;super(),this[_0x5be9e2(0x160)]=_0x328903,this['_threadCommentModel']=_0x4a4f64,this[_0x5be9e2(0x14c)]=_0x1bc0a6,this[_0x5be9e2(0x189)]=_0x4a57cc,this[_0x5be9e2(0x151)](),this[_0x5be9e2(0x19a)]();}[_0x3249fa(0x19a)](){const _0x56f246=_0x3249fa;this[_0x56f246(0x172)](this[_0x56f246(0x170)][_0x56f246(0x18b)][_0x56f246(0x175)](_0x50b0f3(0x10))[_0x56f246(0x155)](_0x31b3fc=>{const _0x2d0b35=_0x56f246,_0x2d0345=new Set();_0x31b3fc[_0x2d0b35(0x13f)](_0x3e27b4=>{const _0x5e57e7=_0x2d0b35;switch(_0x3e27b4[_0x5e57e7(0x19b)]){case _0x5e57e7(0x190):{const _0x44b4b1=_0x3e27b4[_0x5e57e7(0x16d)][_0x5e57e7(0x191)];_0x2d0345[_0x5e57e7(0x190)](_0x44b4b1);break;}}}),B(this['_injector'],_0x2d0345);}));}[_0x3249fa(0x151)](){const _0x5d5b13=_0x3249fa;this[_0x5d5b13(0x172)](this[_0x5d5b13(0x160)][_0x5d5b13(0x18b)][_0x5d5b13(0x155)](async _0x4e64a2=>{const _0xefef64=_0x5d5b13;var _0x47733f,_0xf9fdf0,_0x323dd7,_0x314706;const _0x3c867f=(_0x47733f=this[_0xefef64(0x170)][_0xefef64(0x169)](_0x4e64a2[_0xefef64(0x174)])[_0xefef64(0x148)](_0x361b79=>_0x361b79['threadId']===_0x4e64a2['threadId']))==null?void 0x0:_0x47733f[_0xefef64(0x147)];if(!_0x3c867f)return;const {unitId:_0x299f78,subUnitId:_0x2080a0}=_0x3c867f;switch(_0x4e64a2[_0xefef64(0x18c)]&&this[_0xefef64(0x14c)][_0xefef64(0x197)](_0x4e64a2['user']),_0x4e64a2[_0xefef64(0x19b)]){case v[_0xefef64(0x16f)]:break;case v[_0xefef64(0x150)]:{this[_0xefef64(0x170)][_0xefef64(0x176)](_0x299f78,_0x2080a0,{'unitId':_0x299f78,'subUnitId':_0x2080a0,'ref':'','id':_0x4e64a2[_0xefef64(0x16a)],'dT':D(+_0x4e64a2[_0xefef64(0x181)]),'threadId':_0x4e64a2[_0xefef64(0x15f)],'personId':(_0x323dd7=(_0xf9fdf0=_0x4e64a2['user'])==null?void 0x0:_0xf9fdf0['userID'])!=null?_0x323dd7:_0x4e64a2[_0xefef64(0x166)],'text':JSON['parse'](_0x4e64a2['content']),'parentId':_0x3c867f['id']});break;}case v[_0xefef64(0x15e)]:{const _0x11e70c=this[_0xefef64(0x170)]['getComment'](_0x299f78,_0x2080a0,_0x4e64a2[_0xefef64(0x16a)]);_0x11e70c&&_0x11e70c[_0xefef64(0x152)]&&this[_0xefef64(0x170)][_0xefef64(0x157)](_0x299f78,_0x2080a0,_0x4e64a2[_0xefef64(0x16a)]);break;}case v['Edit']:{this[_0xefef64(0x170)][_0xefef64(0x14b)](_0x299f78,_0x2080a0,{'commentId':_0x4e64a2[_0xefef64(0x16a)],'text':JSON[_0xefef64(0x14e)](_0x4e64a2['content'])});break;}case v[_0xefef64(0x17d)]:{const _0x3dbf8b=(_0x314706=this['_threadCommentModel']['getUnit'](_0x4e64a2[_0xefef64(0x174)])[_0xefef64(0x148)](_0x47a707=>_0x47a707[_0xefef64(0x15f)]===_0x4e64a2[_0xefef64(0x15f)]))==null?void 0x0:_0x314706[_0xefef64(0x147)];_0x3dbf8b&&this['_threadCommentModel'][_0xefef64(0x19f)](_0x299f78,_0x2080a0,_0x3dbf8b['id'],_0x4e64a2['solved']===I[_0xefef64(0x19e)]);break;}}}));}};S=V([p(0x0,_0x3d0824(_0xd7b4e4)),p(0x1,_0x3d0824(_0x5f5c33)),p(0x2,_0x3d0824(_0x3ca25c)),p(0x3,_0x3d0824(_0x1c104d))],S);function _0x438f(_0x4f09ed,_0x25641b){const _0x4cfec8=_0x4cfe();return _0x438f=function(_0x438fab,_0x18d0dd){_0x438fab=_0x438fab-0x13e;let _0x2a2798=_0x4cfec8[_0x438fab];return _0x2a2798;},_0x438f(_0x4f09ed,_0x25641b);}const z=_0x3249fa(0x167),M={};var k=Object[_0x3249fa(0x16c)],Q=(_0x2e446b,_0x5c5316,_0x2344a9,_0x1e6046)=>{const _0x33bc38=_0x3249fa;for(var _0x56d5ee=_0x1e6046>0x1?void 0x0:_0x1e6046?k(_0x5c5316,_0x2344a9):_0x5c5316,_0x4dffb7=_0x2e446b[_0x33bc38(0x154)]-0x1,_0x18b0a8;_0x4dffb7>=0x0;_0x4dffb7--)(_0x18b0a8=_0x2e446b[_0x4dffb7])&&(_0x56d5ee=_0x18b0a8(_0x56d5ee)||_0x56d5ee);return _0x56d5ee;},_=(_0x23ef07,_0x5c4c62)=>(_0x4d0087,_0x41ad80)=>_0x5c4c62(_0x4d0087,_0x41ad80,_0x23ef07);function X(_0x1d4e22,_0x214be2){const _0xba360d=_0x3249fa,_0x42977d=_0x1d4e22['replies'][0x0];return{..._0x214be2,'id':_0x42977d[_0xba360d(0x16a)],'resolved':_0x1d4e22[_0xba360d(0x16b)]===0x1,'dT':D(_0x42977d['createTimestamp']),'personId':_0x42977d['userId'],'threadId':_0x42977d[_0xba360d(0x15f)]};}function ee(_0x3002a6,_0x2e65a3,_0x13befa){const _0x388553=_0x3249fa;var _0xa82bd,_0x5b5ff0;if(((_0x5b5ff0=(_0xa82bd=_0x3002a6==null?void 0x0:_0x3002a6[_0x388553(0x198)])==null?void 0x0:_0xa82bd[_0x388553(0x154)])!=null?_0x5b5ff0:0x0)>0x0){const _0x2d8e97=(_0x1f313d,_0xda51ec)=>({'id':_0x1f313d['replyId'],'threadId':_0x1f313d[_0x388553(0x15f)],'dT':D(_0x1f313d[_0x388553(0x181)]),'personId':_0x1f313d[_0x388553(0x166)],'resolved':_0x3002a6['solved']===I[_0x388553(0x19e)],'unitId':_0x2e65a3,'subUnitId':_0x13befa,'text':JSON['parse'](_0x1f313d[_0x388553(0x158)]),'parentId':_0xda51ec}),_0x59bae4=_0x2d8e97(_0x3002a6[_0x388553(0x198)][0x0]);return{..._0x59bae4,'children':_0x3002a6[_0x388553(0x198)][_0x388553(0x141)](0x1)[_0x388553(0x1a0)](_0x2d7da8=>_0x2d8e97(_0x2d7da8,_0x59bae4['id']))};}return null;}let f=class{constructor(_0x9ed331,_0x16c0c6,_0x179bca,_0x4989a5){const _0x40d38a=_0x3249fa;this[_0x40d38a(0x15d)]=_0x9ed331,this[_0x40d38a(0x14c)]=_0x16c0c6,this[_0x40d38a(0x18d)]=_0x179bca,this[_0x40d38a(0x189)]=_0x4989a5;}async[_0x3249fa(0x176)](_0x5e5f7d){const _0x2dda3f=_0x3249fa;var _0x318575,_0x3593a4;const {parentId:_0x34ac16,unitId:_0x16fef1,text:_0x164986,threadId:_0x4c248f}=_0x5e5f7d,_0x4284e6=(_0x3593a4=(_0x318575=_0x164986[_0x2dda3f(0x184)])==null?void 0x0:_0x318575['filter'](_0x5d1181=>_0x5d1181[_0x2dda3f(0x18e)]===_0xf78c46['COMMENT'])[_0x2dda3f(0x1a0)](_0x517255=>_0x517255['rangeId']))!=null?_0x3593a4:[],_0x120be1=JSON[_0x2dda3f(0x183)](_0x164986),_0x4fd260=(await this[_0x2dda3f(0x18d)][_0x2dda3f(0x163)](_0x16fef1))['getMemberID']();if(_0x34ac16){const _0xf33ed7={'memberId':_0x4fd260,'unitId':_0x16fef1,'content':_0x120be1,'mention':_0x4284e6,'threadId':_0x4c248f},_0x261b00=(await this[_0x2dda3f(0x15d)][_0x2dda3f(0x164)]('/universer-api/comment/unit/'+_0x16fef1+_0x2dda3f(0x180),{'body':_0xf33ed7}))[_0x2dda3f(0x17c)]['reply'];return{..._0x5e5f7d,'id':_0x261b00[_0x2dda3f(0x16a)],'dT':_0x4aa9f0(+_0x261b00[_0x2dda3f(0x181)])[_0x2dda3f(0x16e)](_0x2dda3f(0x18a)),'personId':_0x261b00[_0x2dda3f(0x166)]};}else{const _0x2c0ceb={'memberId':_0x4fd260,'unitId':_0x16fef1,'content':_0x120be1,'mention':_0x4284e6},_0x4d2da6=await this[_0x2dda3f(0x15d)][_0x2dda3f(0x164)](_0x2dda3f(0x156)+_0x16fef1+_0x2dda3f(0x177),{'body':_0x2c0ceb});return X(_0x4d2da6['body'][_0x2dda3f(0x14d)],_0x5e5f7d);}}async[_0x3249fa(0x14b)](_0x4835d4){const _0x41f765=_0x3249fa;var _0x3c349e,_0x26b462;const {text:_0x1e9d7e,unitId:_0x1929f3}=_0x4835d4,_0x4018fe=(_0x26b462=(_0x3c349e=_0x1e9d7e['customRanges'])==null?void 0x0:_0x3c349e['filter'](_0x2da423=>_0x2da423[_0x41f765(0x18e)]===_0xf78c46[_0x41f765(0x192)])[_0x41f765(0x1a0)](_0x404abb=>_0x404abb['rangeId']))!=null?_0x26b462:[],_0x424a8c=JSON[_0x41f765(0x183)](_0x1e9d7e),_0x1fcd14=_0x4835d4[_0x41f765(0x15f)],_0x23e007=_0x4835d4['id'],_0x5f416a={'memberId':(await this[_0x41f765(0x18d)][_0x41f765(0x163)](_0x1929f3))['getMemberID'](),'unitId':_0x1929f3,'threadId':_0x1fcd14,'mention':_0x4018fe,'content':_0x424a8c,'replyId':_0x23e007},_0xe0c858=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x1929f3+_0x41f765(0x159),{'body':_0x5f416a});return!_0xe0c858[_0x41f765(0x17c)][_0x41f765(0x168)]||_0xe0c858[_0x41f765(0x17c)][_0x41f765(0x168)][_0x41f765(0x199)]===0x1;}async['resolveComment'](_0xb84e84){const _0xf3be77=_0x3249fa,{unitId:_0x2f9b60}=_0xb84e84,_0x4cce3e=_0xb84e84[_0xf3be77(0x15f)],_0x592824={'memberId':this['_userService'][_0xf3be77(0x146)]()[_0xf3be77(0x1a1)],'unitId':_0x2f9b60,'threadId':_0x4cce3e,'solved':_0xb84e84[_0xf3be77(0x193)]?I[_0xf3be77(0x19e)]:I[_0xf3be77(0x196)]},_0x126957=await this[_0xf3be77(0x15d)]['post']('/universer-api/comment/unit/'+_0x2f9b60+_0xf3be77(0x17a),{'body':_0x592824});return!_0x126957[_0xf3be77(0x17c)][_0xf3be77(0x168)]||_0x126957['body']['error']['code']===0x1;}async[_0x3249fa(0x157)](_0x42910c,_0x278cde,_0x4f7299,_0x2bb48c){const _0x180a20=_0x3249fa,_0x311160={'memberId':(await this[_0x180a20(0x18d)][_0x180a20(0x163)](_0x42910c))['getMemberID'](),'threadId':_0x4f7299,'replyId':_0x2bb48c,'unitId':_0x42910c},_0x1ac1e0=await this[_0x180a20(0x15d)][_0x180a20(0x164)](_0x180a20(0x156)+_0x42910c+_0x180a20(0x161),{'body':_0x311160});return!_0x1ac1e0['body'][_0x180a20(0x168)]||_0x1ac1e0[_0x180a20(0x17c)]['error']['code']===0x1;}async['listComments'](_0x12ce2a,_0x4c4be2,_0x4bbd66){const _0x173663=_0x3249fa,_0x44be3d={'unitId':_0x12ce2a,'threadId':_0x4bbd66},_0x6ccef1=await this[_0x173663(0x15d)][_0x173663(0x164)]('/universer-api/comment/unit/'+_0x12ce2a+_0x173663(0x143),{'body':_0x44be3d}),_0x5a6f3a=_0x4bbd66['map'](_0x164b1d=>ee(_0x6ccef1[_0x173663(0x17c)][_0x173663(0x14a)][_0x164b1d],_0x12ce2a,_0x4c4be2))['filter'](Boolean);return Object['values'](_0x6ccef1[_0x173663(0x17c)][_0x173663(0x162)])['forEach'](_0x50e3b9=>{const _0x18dc8a=_0x173663;this[_0x18dc8a(0x14c)][_0x18dc8a(0x197)](_0x50e3b9);}),_0x5a6f3a;}['saveCommentToSnapshot'](_0x410952){return{'id':_0x410952['id'],'threadId':_0x410952['threadId'],'ref':_0x410952['ref']};}};f=Q([_(0x0,_0x3d0824(_0x2adda5)),_(0x1,_0x3d0824(_0x3ca25c)),_(0x2,_0x3d0824(_0x1dd18a)),_(0x3,_0x3d0824(_0x1c104d))],f);var re=Object[_0x3249fa(0x16c)],te=(_0x47cdb7,_0x18e44e,_0x362779,_0x28976a)=>{for(var _0x4d3eba=_0x28976a>0x1?void 0x0:_0x28976a?re(_0x18e44e,_0x362779):_0x18e44e,_0x1334de=_0x47cdb7['length']-0x1,_0x311730;_0x1334de>=0x0;_0x1334de--)(_0x311730=_0x47cdb7[_0x1334de])&&(_0x4d3eba=_0x311730(_0x4d3eba)||_0x4d3eba);return _0x4d3eba;},N=(_0x1e723a,_0x1e320e)=>(_0x36289f,_0x1a7bb7)=>_0x1e320e(_0x36289f,_0x1a7bb7,_0x1e723a);let g=class extends _0x374870{constructor(_0x587732,_0x2ecf1f){const _0x4f812a=_0x3249fa;super(),this[_0x4f812a(0x15c)]=_0x587732,this[_0x4f812a(0x165)]=_0x2ecf1f,this[_0x4f812a(0x182)]();}[_0x3249fa(0x182)](){const _0x4fcf95=_0x3249fa;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x4fcf95(0x15c)][_0x4fcf95(0x15b)]=!0x1;}};g=te([N(0x0,_0x4f89eb),N(0x1,_0x3d0824(f))],g);var se=Object[_0x3249fa(0x187)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3d2257,_0x431aa4,_0x350aaf)=>_0x431aa4 in _0x3d2257?se(_0x3d2257,_0x431aa4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x350aaf}):_0x3d2257[_0x431aa4]=_0x350aaf,ie=(_0x884f9f,_0x1b63fe,_0x9fd74b,_0x1eafba)=>{const _0x4e7c9b=_0x3249fa;for(var _0xa4cd48=_0x1eafba>0x1?void 0x0:_0x1eafba?oe(_0x1b63fe,_0x9fd74b):_0x1b63fe,_0x5c2e6a=_0x884f9f[_0x4e7c9b(0x154)]-0x1,_0x456011;_0x5c2e6a>=0x0;_0x5c2e6a--)(_0x456011=_0x884f9f[_0x5c2e6a])&&(_0xa4cd48=_0x456011(_0xa4cd48)||_0xa4cd48);return _0xa4cd48;},w=(_0x50da81,_0x5516e2)=>(_0x3315d1,_0x629505)=>_0x5516e2(_0x3315d1,_0x629505,_0x50da81),$=(_0x320125,_0x4d9aa8,_0x20f645)=>ne(_0x320125,typeof _0x4d9aa8!='symbol'?_0x4d9aa8+'':_0x4d9aa8,_0x20f645);let b=class extends _0x847ca8{constructor(_0x271cf4=M,_0x58fc7b,_0x39f1b9){const _0xd65d7f=_0x3249fa;super(),this['_config']=_0x271cf4,this['_injector']=_0x58fc7b,this[_0xd65d7f(0x153)]=_0x39f1b9;const {..._0xdb7ce2}=_0x5382cd({},M,this[_0xd65d7f(0x188)]);this[_0xd65d7f(0x153)][_0xd65d7f(0x144)](z,_0xdb7ce2);}['onStarting'](){const _0x51c922=_0x3249fa;[[f],[g],[S]][_0x51c922(0x13f)](_0x51c174=>{const _0x76f3be=_0x51c922;this[_0x76f3be(0x189)]['add'](_0x51c174);});}[_0x3249fa(0x185)](){const _0x225977=_0x3249fa;this[_0x225977(0x189)][_0x225977(0x145)](g),this[_0x225977(0x189)][_0x225977(0x145)](S);}};$(b,_0x3249fa(0x142),W),$(b,_0x3249fa(0x19b),_0x2bf989[_0x3249fa(0x173)]),b=ie([_0x339a9c(_0x103916,_0x40809b,_0x18f493),w(0x1,_0x3d0824(_0x1c104d)),w(0x2,_0x50abf7)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x372f(){const _0x590e33=['Solved','commentUpdate$','disposeWithMe','UniverThreadCommentUIPlugin','_threadCommentModel','getComment','object','dataSource','5042828quSwyU','COMMENT','forEach','find','rxjs','UNRECOGNIZED','userID','_sessionService','/solved','UniverNetwork','92287wmeItZ','_httpService','2680948QdMEQU','_threadCommentDataSource','UserManagerService','@univerjs-pro/collaboration-client','rangeType','OpenOrReOpen','UniverProCollaborationClient','add','thread-comment-data-source.config','resolveComment','subscribe','5351255SuSdJK','length','@univerjs/thread-comment-ui','Inject','onStarting','root','getUser','syncUpdateMutationToColla','getCurrentUser','/universer-api/comment/unit/','map','toStringTag','Injector','addComment','addUser','comments','Module','rangeId','@univerjs/network','error','createTimestamp','Plugin','updateComment','Solve','Edit','ThreadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','UniverInstanceType','personId','_injector','exports','content','27959712jqOiYs','get','IThreadCommentDataSourceService','body','3008460FzIMrj','Unknown','_init','CollaborationSessionService','saveCommentToSnapshot','Delete','UniverCollaborationClientPlugin','resolved','format','UniverProThreadCommentDatasource','user','UniverCore','Reply','getOwnPropertyDescriptor','_userService','filter','replies','getUnit','requireSession','HTTPService','394854XQylbt','parse','users','replyId','/reply','reply','code','dayjs','_commentService','post','_configService','UniverThreadCommentDataSourcePlugin','CustomRangeType','pluginName','/delete','_threadCommentDataSourceService','@univerjs/thread-comment','defineProperty','userId','getMemberID','_config','@univerjs-pro/license','_initDataSource','/universer-api/user/list','bufferTime','parentId','onReady','size','@univerjs/core','CommentService','Add','/edit','listComments','/list','customRanges','function','UniverProLicense','stringify','6WgahoO','threadId','deleteComment','type','pipe','YYYY/MM/DD\x20HH:mm'];_0x372f=function(){return _0x590e33;};return _0x372f();}function _0x2a14(_0x33dc94,_0x2b2f88){const _0x372fcc=_0x372f();return _0x2a14=function(_0x2a14f5,_0x557e30){_0x2a14f5=_0x2a14f5-0x9a;let _0x55e630=_0x372fcc[_0x2a14f5];return _0x55e630;},_0x2a14(_0x33dc94,_0x2b2f88);}(function(_0x1b3363,_0x560d02){const _0x55eb81=_0x2a14,_0x8d180=_0x1b3363();while(!![]){try{const _0x1ae9b0=parseInt(_0x55eb81(0x10c))/0x1*(parseInt(_0x55eb81(0xf4))/0x2)+-parseInt(_0x55eb81(0xce))/0x3+-parseInt(_0x55eb81(0x10e))/0x4+-parseInt(_0x55eb81(0x119))/0x5+-parseInt(_0x55eb81(0xba))/0x6+-parseInt(_0x55eb81(0x102))/0x7+parseInt(_0x55eb81(0xb6))/0x8;if(_0x1ae9b0===_0x560d02)break;else _0x8d180['push'](_0x8d180['shift']());}catch(_0x49633a){_0x8d180['push'](_0x8d180['shift']());}}}(_0x372f,0xa5811),function(_0x2496d8,_0x3384ba){const _0x346e50=_0x2a14;typeof exports==_0x346e50(0x100)&&typeof module<'u'?_0x3384ba(exports,require(_0x346e50(0x111)),require('@univerjs-pro/license'),require(_0x346e50(0xea)),require(_0x346e50(0x11b)),require(_0x346e50(0xde)),require(_0x346e50(0x106)),require(_0x346e50(0xa7))):typeof define==_0x346e50(0xf1)&&define['amd']?define([_0x346e50(0xb4),_0x346e50(0x111),_0x346e50(0xe3),_0x346e50(0xea),'@univerjs/thread-comment-ui',_0x346e50(0xde),_0x346e50(0x106),_0x346e50(0xa7)],_0x3384ba):(_0x2496d8=typeof globalThis<'u'?globalThis:_0x2496d8||self,_0x3384ba(_0x2496d8[_0x346e50(0xc3)]={},_0x2496d8[_0x346e50(0x114)],_0x2496d8[_0x346e50(0xf2)],_0x2496d8[_0x346e50(0xc5)],_0x2496d8['UniverThreadCommentUi'],_0x2496d8['UniverThreadComment'],_0x2496d8['rxjs'],_0x2496d8[_0x346e50(0x10b)]));}(this,function(_0x2b4972,_0x153186,_0x1b4088,_0xf0a7f9,_0x56cf0c,_0x37eabe,_0x7a0ece,_0x5e599c){'use strict';const _0x3d86cd=_0x2a14;const _0x3399c7=_0x3d86cd(0xaf);var _0x5b6eb6=(_0x3aa485=>(_0x3aa485[_0x3aa485[_0x3d86cd(0x113)]=0x0]=_0x3d86cd(0x113),_0x3aa485[_0x3aa485[_0x3d86cd(0xfa)]=0x1]=_0x3d86cd(0xfa),_0x3aa485[_0x3aa485[_0x3d86cd(0x107)]=-0x1]=_0x3d86cd(0x107),_0x3aa485))(_0x5b6eb6||{}),_0x33bd75=(_0x3921ad=>(_0x3921ad[_0x3921ad['Unknown']=0x0]=_0x3d86cd(0xbb),_0x3921ad[_0x3921ad['Add']=0x1]=_0x3d86cd(0xec),_0x3921ad[_0x3921ad[_0x3d86cd(0xc6)]=0x2]='Reply',_0x3921ad[_0x3921ad[_0x3d86cd(0xad)]=0x3]=_0x3d86cd(0xad),_0x3921ad[_0x3921ad['Delete']=0x4]=_0x3d86cd(0xbf),_0x3921ad[_0x3921ad[_0x3d86cd(0xac)]=0x5]=_0x3d86cd(0xac),_0x3921ad[_0x3921ad[_0x3d86cd(0x107)]=-0x1]=_0x3d86cd(0x107),_0x3921ad))(_0x33bd75||{});const _0x20ca0e=_0x25d397=>_0xf0a7f9['dayjs'](new Date(+_0x25d397))[_0x3d86cd(0xc2)](_0x3d86cd(0xf9)),_0x4c1372=async(_0x509cf1,_0x42709a)=>{const _0x455a3c=_0x3d86cd,_0x11499d=_0x509cf1[_0x455a3c(0xb7)](_0xf0a7f9['UserManagerService']),_0x19eba2=_0x509cf1[_0x455a3c(0xb7)](_0x5e599c[_0x455a3c(0xcd)]);_0x42709a[_0x455a3c(0x104)](_0x380394=>{const _0x40b87f=_0x455a3c;_0x11499d[_0x40b87f(0x9b)](_0x380394)&&_0x42709a['delete'](_0x380394);}),_0x42709a[_0x455a3c(0xe9)]&&(await _0x19eba2['get'](_0x455a3c(0xe5),{'params':{'userIDs':[..._0x42709a]}}))[_0x455a3c(0xb9)][_0x455a3c(0xd0)]['forEach'](_0x426edb=>{_0x426edb&&_0x11499d['addUser'](_0x426edb);});};var _0x14eec8=Object[_0x3d86cd(0xc7)],_0x29e126=(_0x34d875,_0x28c33c,_0x55e814,_0x55e996)=>{const _0x18a99e=_0x3d86cd;for(var _0x4acb32=_0x55e996>0x1?void 0x0:_0x55e996?_0x14eec8(_0x28c33c,_0x55e814):_0x28c33c,_0x1604db=_0x34d875[_0x18a99e(0x11a)]-0x1,_0x37b7ed;_0x1604db>=0x0;_0x1604db--)(_0x37b7ed=_0x34d875[_0x1604db])&&(_0x4acb32=_0x37b7ed(_0x4acb32)||_0x4acb32);return _0x4acb32;},_0x35aace=(_0x158e64,_0x33f52f)=>(_0x1aac22,_0xf24474)=>_0x33f52f(_0x1aac22,_0xf24474,_0x158e64);let _0x1e2814=class extends _0xf0a7f9['Disposable']{constructor(_0x2d07fa,_0x10a8cb,_0x32728a,_0x505b9c){const _0x2b420f=_0x3d86cd;super(),this['_commentService']=_0x2d07fa,this[_0x2b420f(0xfe)]=_0x10a8cb,this[_0x2b420f(0xc8)]=_0x32728a,this['_injector']=_0x505b9c,this[_0x2b420f(0xbc)](),this['_initUserSync']();}['_initUserSync'](){const _0x3f9b27=_0x3d86cd;this['disposeWithMe'](this['_threadCommentModel'][_0x3f9b27(0xfb)][_0x3f9b27(0xf8)](_0x7a0ece[_0x3f9b27(0xe6)](0x10))[_0x3f9b27(0x118)](_0x516c42=>{const _0x375199=_0x3f9b27,_0x55f854=new Set();_0x516c42[_0x375199(0x104)](_0x502f40=>{const _0x27e027=_0x375199;switch(_0x502f40[_0x27e027(0xf7)]){case _0x27e027(0x115):{const _0x246af=_0x502f40['payload'][_0x27e027(0xb2)];_0x55f854[_0x27e027(0x115)](_0x246af);break;}}}),_0x4c1372(this[_0x375199(0xb3)],_0x55f854);}));}[_0x3d86cd(0xbc)](){const _0x1a96a9=_0x3d86cd;this[_0x1a96a9(0xfc)](this[_0x1a96a9(0xd6)][_0x1a96a9(0xfb)][_0x1a96a9(0x118)](async _0x438949=>{const _0x5d7087=_0x1a96a9;var _0x503679,_0x6b4dc6,_0x7dd254,_0xc98db2;const _0x16520a=(_0x503679=this[_0x5d7087(0xfe)][_0x5d7087(0xcb)](_0x438949['unitId'])['find'](_0x549b8b=>_0x549b8b['threadId']===_0x438949[_0x5d7087(0xf5)]))==null?void 0x0:_0x503679[_0x5d7087(0x9a)];if(!_0x16520a)return;const {unitId:_0x4fe338,subUnitId:_0x36b010}=_0x16520a;switch(_0x438949[_0x5d7087(0xc4)]&&this[_0x5d7087(0xc8)]['addUser'](_0x438949[_0x5d7087(0xc4)]),_0x438949['type']){case _0x33bd75['Add']:break;case _0x33bd75[_0x5d7087(0xc6)]:{this[_0x5d7087(0xfe)][_0x5d7087(0xa2)](_0x4fe338,_0x36b010,{'unitId':_0x4fe338,'subUnitId':_0x36b010,'ref':'','id':_0x438949[_0x5d7087(0xd1)],'dT':_0x20ca0e(+_0x438949['createTimestamp']),'threadId':_0x438949[_0x5d7087(0xf5)],'personId':(_0x7dd254=(_0x6b4dc6=_0x438949[_0x5d7087(0xc4)])==null?void 0x0:_0x6b4dc6[_0x5d7087(0x108)])!=null?_0x7dd254:_0x438949[_0x5d7087(0xe0)],'text':JSON['parse'](_0x438949[_0x5d7087(0xb5)]),'parentId':_0x16520a['id']});break;}case _0x33bd75[_0x5d7087(0xbf)]:{const _0x117af7=this[_0x5d7087(0xfe)][_0x5d7087(0xff)](_0x4fe338,_0x36b010,_0x438949['replyId']);_0x117af7&&_0x117af7[_0x5d7087(0xe7)]&&this[_0x5d7087(0xfe)][_0x5d7087(0xf6)](_0x4fe338,_0x36b010,_0x438949[_0x5d7087(0xd1)]);break;}case _0x33bd75[_0x5d7087(0xad)]:{this[_0x5d7087(0xfe)][_0x5d7087(0xab)](_0x4fe338,_0x36b010,{'commentId':_0x438949['replyId'],'text':JSON[_0x5d7087(0xcf)](_0x438949[_0x5d7087(0xb5)])});break;}case _0x33bd75[_0x5d7087(0xac)]:{const _0x492a5f=(_0xc98db2=this[_0x5d7087(0xfe)][_0x5d7087(0xcb)](_0x438949['unitId'])[_0x5d7087(0x105)](_0xcd27fc=>_0xcd27fc[_0x5d7087(0xf5)]===_0x438949[_0x5d7087(0xf5)]))==null?void 0x0:_0xc98db2['root'];_0x492a5f&&this[_0x5d7087(0xfe)][_0x5d7087(0x117)](_0x4fe338,_0x36b010,_0x492a5f['id'],_0x438949[_0x5d7087(0xb0)]===_0x5b6eb6[_0x5d7087(0xfa)]);break;}}}));}};_0x1e2814=_0x29e126([_0x35aace(0x0,_0xf0a7f9[_0x3d86cd(0x11c)](_0x153186[_0x3d86cd(0xeb)])),_0x35aace(0x1,_0xf0a7f9[_0x3d86cd(0x11c)](_0x37eabe[_0x3d86cd(0xae)])),_0x35aace(0x2,_0xf0a7f9[_0x3d86cd(0x11c)](_0xf0a7f9[_0x3d86cd(0x110)])),_0x35aace(0x3,_0xf0a7f9['Inject'](_0xf0a7f9['Injector']))],_0x1e2814);const _0x3bf006=_0x3d86cd(0x116),_0x402ac2={};var _0x4667ab=Object[_0x3d86cd(0xc7)],_0x4ea974=(_0x5b5222,_0x4b2e6c,_0x2ee8ca,_0x358616)=>{const _0x550c56=_0x3d86cd;for(var _0x11a6a7=_0x358616>0x1?void 0x0:_0x358616?_0x4667ab(_0x4b2e6c,_0x2ee8ca):_0x4b2e6c,_0x19932d=_0x5b5222[_0x550c56(0x11a)]-0x1,_0x51fe66;_0x19932d>=0x0;_0x19932d--)(_0x51fe66=_0x5b5222[_0x19932d])&&(_0x11a6a7=_0x51fe66(_0x11a6a7)||_0x11a6a7);return _0x11a6a7;},_0x146181=(_0x50793d,_0x4d0d64)=>(_0x5499df,_0x30573c)=>_0x4d0d64(_0x5499df,_0x30573c,_0x50793d);function _0x5b3df(_0x25fd8a,_0x4c01e5){const _0x449767=_0x3d86cd,_0x35f691=_0x25fd8a[_0x449767(0xca)][0x0];return{..._0x4c01e5,'id':_0x35f691['replyId'],'resolved':_0x25fd8a[_0x449767(0xb0)]===0x1,'dT':_0x20ca0e(_0x35f691['createTimestamp']),'personId':_0x35f691[_0x449767(0xe0)],'threadId':_0x35f691[_0x449767(0xf5)]};}function _0x1b50fd(_0x5cab63,_0x4233de,_0x3d4381){const _0x459306=_0x3d86cd;var _0x2b7e1b,_0x271e9d;if(((_0x271e9d=(_0x2b7e1b=_0x5cab63==null?void 0x0:_0x5cab63[_0x459306(0xca)])==null?void 0x0:_0x2b7e1b[_0x459306(0x11a)])!=null?_0x271e9d:0x0)>0x0){const _0x26659a=(_0x30018a,_0x1e736f)=>({'id':_0x30018a['replyId'],'threadId':_0x30018a[_0x459306(0xf5)],'dT':_0x20ca0e(_0x30018a['createTimestamp']),'personId':_0x30018a[_0x459306(0xe0)],'resolved':_0x5cab63['solved']===_0x5b6eb6[_0x459306(0xfa)],'unitId':_0x4233de,'subUnitId':_0x3d4381,'text':JSON['parse'](_0x30018a[_0x459306(0xb5)]),'parentId':_0x1e736f}),_0x4adcf4=_0x26659a(_0x5cab63[_0x459306(0xca)][0x0]);return{..._0x4adcf4,'children':_0x5cab63[_0x459306(0xca)]['slice'](0x1)[_0x459306(0x9f)](_0x18e4a4=>_0x26659a(_0x18e4a4,_0x4adcf4['id']))};}return null;}let _0x3f497e=class{constructor(_0xc9e66a,_0xe5ca1a,_0x573e5,_0x38c9c0){const _0x419c04=_0x3d86cd;this['_httpService']=_0xc9e66a,this[_0x419c04(0xc8)]=_0xe5ca1a,this[_0x419c04(0x109)]=_0x573e5,this['_injector']=_0x38c9c0;}async[_0x3d86cd(0xa2)](_0x5d8c69){const _0x4b338e=_0x3d86cd;var _0x54dc35,_0xa9dcf4;const {parentId:_0x2c27b7,unitId:_0x142643,text:_0x3c53d6,threadId:_0x493157}=_0x5d8c69,_0x5fd3b1=(_0xa9dcf4=(_0x54dc35=_0x3c53d6['customRanges'])==null?void 0x0:_0x54dc35[_0x4b338e(0xc9)](_0x2bc785=>_0x2bc785[_0x4b338e(0x112)]===_0xf0a7f9['CustomRangeType'][_0x4b338e(0x103)])['map'](_0x46475f=>_0x46475f[_0x4b338e(0xa6)]))!=null?_0xa9dcf4:[],_0x573a7c=JSON[_0x4b338e(0xf3)](_0x3c53d6),_0x19d95d=(await this['_sessionService']['requireSession'](_0x142643))['getMemberID']();if(_0x2c27b7){const _0xfed5ea={'memberId':_0x19d95d,'unitId':_0x142643,'content':_0x573a7c,'mention':_0x5fd3b1,'threadId':_0x493157},_0xfc6870=(await this[_0x4b338e(0x10d)][_0x4b338e(0xd7)](_0x4b338e(0x9e)+_0x142643+_0x4b338e(0xd2),{'body':_0xfed5ea}))[_0x4b338e(0xb9)][_0x4b338e(0xd3)];return{..._0x5d8c69,'id':_0xfc6870[_0x4b338e(0xd1)],'dT':_0xf0a7f9[_0x4b338e(0xd5)](+_0xfc6870[_0x4b338e(0xa9)])[_0x4b338e(0xc2)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xfc6870[_0x4b338e(0xe0)]};}else{const _0x3cf0d3={'memberId':_0x19d95d,'unitId':_0x142643,'content':_0x573a7c,'mention':_0x5fd3b1},_0x589b86=await this['_httpService'][_0x4b338e(0xd7)](_0x4b338e(0x9e)+_0x142643+'/add',{'body':_0x3cf0d3});return _0x5b3df(_0x589b86['body']['comment'],_0x5d8c69);}}async[_0x3d86cd(0xab)](_0x1ca750){const _0x4ecc68=_0x3d86cd;var _0x468908,_0x36528a;const {text:_0x1fe948,unitId:_0x26ae73}=_0x1ca750,_0x4276a4=(_0x36528a=(_0x468908=_0x1fe948[_0x4ecc68(0xf0)])==null?void 0x0:_0x468908[_0x4ecc68(0xc9)](_0x3c99cd=>_0x3c99cd[_0x4ecc68(0x112)]===_0xf0a7f9[_0x4ecc68(0xda)][_0x4ecc68(0x103)])[_0x4ecc68(0x9f)](_0x37cb3a=>_0x37cb3a[_0x4ecc68(0xa6)]))!=null?_0x36528a:[],_0x362617=JSON[_0x4ecc68(0xf3)](_0x1fe948),_0x2fe78a=_0x1ca750[_0x4ecc68(0xf5)],_0x48197b=_0x1ca750['id'],_0x3056a7={'memberId':(await this['_sessionService'][_0x4ecc68(0xcc)](_0x26ae73))[_0x4ecc68(0xe1)](),'unitId':_0x26ae73,'threadId':_0x2fe78a,'mention':_0x4276a4,'content':_0x362617,'replyId':_0x48197b},_0x102b76=await this[_0x4ecc68(0x10d)][_0x4ecc68(0xd7)](_0x4ecc68(0x9e)+_0x26ae73+_0x4ecc68(0xed),{'body':_0x3056a7});return!_0x102b76[_0x4ecc68(0xb9)][_0x4ecc68(0xa8)]||_0x102b76[_0x4ecc68(0xb9)][_0x4ecc68(0xa8)][_0x4ecc68(0xd4)]===0x1;}async[_0x3d86cd(0x117)](_0x2b4462){const _0x622d38=_0x3d86cd,{unitId:_0x23d565}=_0x2b4462,_0x1dd722=_0x2b4462['threadId'],_0x31429={'memberId':this[_0x622d38(0xc8)][_0x622d38(0x9d)]()[_0x622d38(0x108)],'unitId':_0x23d565,'threadId':_0x1dd722,'solved':_0x2b4462[_0x622d38(0xc1)]?_0x5b6eb6[_0x622d38(0xfa)]:_0x5b6eb6[_0x622d38(0x113)]},_0x544c18=await this[_0x622d38(0x10d)][_0x622d38(0xd7)](_0x622d38(0x9e)+_0x23d565+_0x622d38(0x10a),{'body':_0x31429});return!_0x544c18[_0x622d38(0xb9)][_0x622d38(0xa8)]||_0x544c18[_0x622d38(0xb9)][_0x622d38(0xa8)][_0x622d38(0xd4)]===0x1;}async['deleteComment'](_0x35c070,_0x2bf17f,_0x244851,_0x34b591){const _0x38ba82=_0x3d86cd,_0x53b487={'memberId':(await this[_0x38ba82(0x109)]['requireSession'](_0x35c070))[_0x38ba82(0xe1)](),'threadId':_0x244851,'replyId':_0x34b591,'unitId':_0x35c070},_0x458674=await this[_0x38ba82(0x10d)][_0x38ba82(0xd7)](_0x38ba82(0x9e)+_0x35c070+_0x38ba82(0xdc),{'body':_0x53b487});return!_0x458674[_0x38ba82(0xb9)][_0x38ba82(0xa8)]||_0x458674[_0x38ba82(0xb9)][_0x38ba82(0xa8)][_0x38ba82(0xd4)]===0x1;}async[_0x3d86cd(0xee)](_0x121a30,_0xabb2e3,_0x25f6aa){const _0x1fb4c4=_0x3d86cd,_0x2f6026={'unitId':_0x121a30,'threadId':_0x25f6aa},_0x4e2f21=await this[_0x1fb4c4(0x10d)][_0x1fb4c4(0xd7)](_0x1fb4c4(0x9e)+_0x121a30+_0x1fb4c4(0xef),{'body':_0x2f6026}),_0x5dc5a9=_0x25f6aa[_0x1fb4c4(0x9f)](_0x4b8982=>_0x1b50fd(_0x4e2f21['body'][_0x1fb4c4(0xa4)][_0x4b8982],_0x121a30,_0xabb2e3))[_0x1fb4c4(0xc9)](Boolean);return Object['values'](_0x4e2f21[_0x1fb4c4(0xb9)]['users'])[_0x1fb4c4(0x104)](_0x29ab4d=>{const _0x16b03e=_0x1fb4c4;this[_0x16b03e(0xc8)][_0x16b03e(0xa3)](_0x29ab4d);}),_0x5dc5a9;}[_0x3d86cd(0xbe)](_0x26ed38){const _0x3c514e=_0x3d86cd;return{'id':_0x26ed38['id'],'threadId':_0x26ed38[_0x3c514e(0xf5)],'ref':_0x26ed38['ref']};}};_0x3f497e=_0x4ea974([_0x146181(0x0,_0xf0a7f9['Inject'](_0x5e599c['HTTPService'])),_0x146181(0x1,_0xf0a7f9['Inject'](_0xf0a7f9[_0x3d86cd(0x110)])),_0x146181(0x2,_0xf0a7f9['Inject'](_0x153186[_0x3d86cd(0xbd)])),_0x146181(0x3,_0xf0a7f9[_0x3d86cd(0x11c)](_0xf0a7f9[_0x3d86cd(0xa1)]))],_0x3f497e);var _0x1e29e8=Object[_0x3d86cd(0xc7)],_0x3b5ad9=(_0x1e2374,_0x3f9146,_0x4b49f5,_0x3fec1c)=>{const _0x62f8c9=_0x3d86cd;for(var _0x62be45=_0x3fec1c>0x1?void 0x0:_0x3fec1c?_0x1e29e8(_0x3f9146,_0x4b49f5):_0x3f9146,_0x185969=_0x1e2374[_0x62f8c9(0x11a)]-0x1,_0x433971;_0x185969>=0x0;_0x185969--)(_0x433971=_0x1e2374[_0x185969])&&(_0x62be45=_0x433971(_0x62be45)||_0x62be45);return _0x62be45;},_0x495dbf=(_0x2deb35,_0x51dc29)=>(_0x18e373,_0x1a6a96)=>_0x51dc29(_0x18e373,_0x1a6a96,_0x2deb35);let _0x32f0ff=class extends _0xf0a7f9['Disposable']{constructor(_0x21fc35,_0x38e540){const _0x2a2a67=_0x3d86cd;super(),this['_threadCommentDataSourceService']=_0x21fc35,this[_0x2a2a67(0x10f)]=_0x38e540,this[_0x2a2a67(0xe4)]();}[_0x3d86cd(0xe4)](){const _0x51503a=_0x3d86cd;this[_0x51503a(0xdd)][_0x51503a(0x101)]=this[_0x51503a(0x10f)],this[_0x51503a(0xdd)][_0x51503a(0x9c)]=!0x1;}};_0x32f0ff=_0x3b5ad9([_0x495dbf(0x0,_0x37eabe[_0x3d86cd(0xb8)]),_0x495dbf(0x1,_0xf0a7f9[_0x3d86cd(0x11c)](_0x3f497e))],_0x32f0ff);var _0x2d7605=Object[_0x3d86cd(0xdf)],_0x547fa0=Object[_0x3d86cd(0xc7)],_0x24a756=(_0x4d58e1,_0x27856a,_0x52ec5f)=>_0x27856a in _0x4d58e1?_0x2d7605(_0x4d58e1,_0x27856a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x52ec5f}):_0x4d58e1[_0x27856a]=_0x52ec5f,_0x3e8b14=(_0x3c40cc,_0x5627fe,_0x41db16,_0x2371d4)=>{const _0x50dcfb=_0x3d86cd;for(var _0x2a1fdf=_0x2371d4>0x1?void 0x0:_0x2371d4?_0x547fa0(_0x5627fe,_0x41db16):_0x5627fe,_0x3c8c53=_0x3c40cc[_0x50dcfb(0x11a)]-0x1,_0x2c3f12;_0x3c8c53>=0x0;_0x3c8c53--)(_0x2c3f12=_0x3c40cc[_0x3c8c53])&&(_0x2a1fdf=_0x2c3f12(_0x2a1fdf)||_0x2a1fdf);return _0x2a1fdf;},_0x5c866c=(_0x44c042,_0x14eeba)=>(_0x1c0148,_0x55c8e6)=>_0x14eeba(_0x1c0148,_0x55c8e6,_0x44c042),_0x533b80=(_0x2bce90,_0x4ceeab,_0x3e1ffc)=>_0x24a756(_0x2bce90,typeof _0x4ceeab!='symbol'?_0x4ceeab+'':_0x4ceeab,_0x3e1ffc);_0x2b4972['UniverThreadCommentDataSourcePlugin']=class extends _0xf0a7f9[_0x3d86cd(0xaa)]{constructor(_0x54dcd6=_0x402ac2,_0x4f4fab,_0x16d95e){const _0x2bb48b=_0x3d86cd;super(),this[_0x2bb48b(0xe2)]=_0x54dcd6,this[_0x2bb48b(0xb3)]=_0x4f4fab,this[_0x2bb48b(0xd8)]=_0x16d95e;const {..._0x32238f}=_0xf0a7f9['merge']({},_0x402ac2,this[_0x2bb48b(0xe2)]);this[_0x2bb48b(0xd8)]['setConfig'](_0x3bf006,_0x32238f);}[_0x3d86cd(0x11d)](){const _0x94bd36=_0x3d86cd;[[_0x3f497e],[_0x32f0ff],[_0x1e2814]][_0x94bd36(0x104)](_0x19b09c=>{this['_injector']['add'](_0x19b09c);});}[_0x3d86cd(0xe8)](){const _0x56fb42=_0x3d86cd;this[_0x56fb42(0xb3)][_0x56fb42(0xb7)](_0x32f0ff),this[_0x56fb42(0xb3)]['get'](_0x1e2814);}},_0x533b80(_0x2b4972['UniverThreadCommentDataSourcePlugin'],_0x3d86cd(0xdb),_0x3399c7),_0x533b80(_0x2b4972[_0x3d86cd(0xd9)],_0x3d86cd(0xf7),_0xf0a7f9[_0x3d86cd(0xb1)]['UNIVER_UNKNOWN']),_0x2b4972['UniverThreadCommentDataSourcePlugin']=_0x3e8b14([_0xf0a7f9['DependentOn'](_0x56cf0c[_0x3d86cd(0xfd)],_0x153186[_0x3d86cd(0xc0)],_0x1b4088['UniverLicensePlugin']),_0x5c866c(0x1,_0xf0a7f9[_0x3d86cd(0x11c)](_0xf0a7f9[_0x3d86cd(0xa1)])),_0x5c866c(0x2,_0xf0a7f9['IConfigService'])],_0x2b4972[_0x3d86cd(0xd9)]),Object['defineProperty'](_0x2b4972,Symbol[_0x3d86cd(0xa0)],{'value':_0x3d86cd(0xa5)});}));
|
|
1
|
+
function _0x403c(_0x89368f,_0x3b3b5a){const _0x4efd40=_0x4efd();return _0x403c=function(_0x403c16,_0x391753){_0x403c16=_0x403c16-0x184;let _0x32a6a2=_0x4efd40[_0x403c16];return _0x32a6a2;},_0x403c(_0x89368f,_0x3b3b5a);}function _0x4efd(){const _0x26aa38=['_threadCommentDataSource','rangeType','userId','dayjs','HTTPService','syncUpdateMutationToColla','_httpService','DependentOn','addUser','body','thread-comment-data-source.config','OpenOrReOpen','UniverProCollaborationClient','pluginName','length','toStringTag','Disposable','forEach','error','100512XqfrBL','getComment','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverCore','/solved','onStarting','rangeId','/universer-api/comment/unit/','/list','rxjs','solved','1224695xMKLld','function','onReady','_initDataSource','customRanges','type','_sessionService','setConfig','UniverInstanceType','UniverThreadCommentUi','/delete','_configService','Delete','_threadCommentDataSourceService','disposeWithMe','content','slice','amd','subscribe','Unknown','addComment','_init','map','Injector','find','5398936AsnRGI','root','replies','133074SgLZdd','_commentService','resolved','Edit','UniverThreadCommentUIPlugin','filter','3809134HMkJeO','_threadCommentModel','post','getCurrentUser','Solved','userID','/edit','getMemberID','UniverCollaborationClientPlugin','_config','CommentService','UniverLicensePlugin','@univerjs/core','unitId','Inject','code','defineProperty','requireSession','@univerjs-pro/collaboration-client','format','@univerjs/thread-comment-ui','parse','Solve','/universer-api/user/list','UniverProLicense','UniverThreadCommentDataSourcePlugin','values','IConfigService','size','symbol','replyId','reply','COMMENT','UniverNetwork','@univerjs-pro/license','exports','6682761UjKjTU','IThreadCommentDataSourceService','UNRECOGNIZED','updateComment','threadId','_initUserSync','UserManagerService','get','CustomRangeType','173uigtlN','add','getOwnPropertyDescriptor','payload','commentUpdate$','YYYY/MM/DD\x20HH:mm','deleteComment','getUnit','createTimestamp','@univerjs/thread-comment','4nzPQyM','users','@univerjs/network','Reply','user','876DlRbMn','bufferTime','ref','Add','_injector','resolveComment','comment'];_0x4efd=function(){return _0x26aa38;};return _0x4efd();}(function(_0x2b5960,_0x1bd07d){const _0x48633f=_0x403c,_0x35c694=_0x2b5960();while(!![]){try{const _0x4ee89f=-parseInt(_0x48633f(0x185))/0x1*(-parseInt(_0x48633f(0x194))/0x2)+parseInt(_0x48633f(0x1ae))/0x3*(-parseInt(_0x48633f(0x18f))/0x4)+-parseInt(_0x48633f(0x1ba))/0x5+-parseInt(_0x48633f(0x1d6))/0x6+parseInt(_0x48633f(0x1dc))/0x7+-parseInt(_0x48633f(0x1d3))/0x8+parseInt(_0x48633f(0x200))/0x9;if(_0x4ee89f===_0x1bd07d)break;else _0x35c694['push'](_0x35c694['shift']());}catch(_0x2cc698){_0x35c694['push'](_0x35c694['shift']());}}}(_0x4efd,0x5e7a0),function(_0x22e395,_0x81af69){const _0x366be0=_0x403c;typeof exports=='object'&&typeof module<'u'?_0x81af69(exports,require(_0x366be0(0x1ee)),require(_0x366be0(0x1fe)),require(_0x366be0(0x1e8)),require('@univerjs/thread-comment-ui'),require(_0x366be0(0x18e)),require('rxjs'),require(_0x366be0(0x191))):typeof define==_0x366be0(0x1bb)&&define[_0x366be0(0x1cb)]?define([_0x366be0(0x1ff),'@univerjs-pro/collaboration-client',_0x366be0(0x1fe),_0x366be0(0x1e8),_0x366be0(0x1f0),_0x366be0(0x18e),_0x366be0(0x1b8),'@univerjs/network'],_0x81af69):(_0x22e395=typeof globalThis<'u'?globalThis:_0x22e395||self,_0x81af69(_0x22e395['UniverProThreadCommentDatasource']={},_0x22e395[_0x366be0(0x1a7)],_0x22e395[_0x366be0(0x1f4)],_0x22e395[_0x366be0(0x1b2)],_0x22e395[_0x366be0(0x1c3)],_0x22e395['UniverThreadComment'],_0x22e395['rxjs'],_0x22e395[_0x366be0(0x1fd)]));}(this,function(_0x18180c,_0x34731b,_0x13f45b,_0x2b8796,_0x598d23,_0x5a0b5d,_0x561f32,_0x27c7ca){'use strict';const _0x4327cd=_0x403c;const _0x1d2fd5=_0x4327cd(0x1b1);var _0x6ad076=(_0x38b944=>(_0x38b944[_0x38b944[_0x4327cd(0x1a6)]=0x0]=_0x4327cd(0x1a6),_0x38b944[_0x38b944[_0x4327cd(0x1e0)]=0x1]='Solved',_0x38b944[_0x38b944[_0x4327cd(0x202)]=-0x1]=_0x4327cd(0x202),_0x38b944))(_0x6ad076||{}),_0x388ad2=(_0x1f694e=>(_0x1f694e[_0x1f694e['Unknown']=0x0]=_0x4327cd(0x1cd),_0x1f694e[_0x1f694e[_0x4327cd(0x197)]=0x1]=_0x4327cd(0x197),_0x1f694e[_0x1f694e[_0x4327cd(0x192)]=0x2]=_0x4327cd(0x192),_0x1f694e[_0x1f694e['Edit']=0x3]=_0x4327cd(0x1d9),_0x1f694e[_0x1f694e[_0x4327cd(0x1c6)]=0x4]='Delete',_0x1f694e[_0x1f694e[_0x4327cd(0x1f2)]=0x5]='Solve',_0x1f694e[_0x1f694e[_0x4327cd(0x202)]=-0x1]=_0x4327cd(0x202),_0x1f694e))(_0x388ad2||{});const _0x2d48e6=_0x2ae562=>_0x2b8796['dayjs'](new Date(+_0x2ae562))[_0x4327cd(0x1ef)]('YYYY/MM/DD\x20HH:mm'),_0x78d22a=async(_0x32cce6,_0x1ce2f5)=>{const _0x5ac318=_0x4327cd,_0x41c92a=_0x32cce6[_0x5ac318(0x207)](_0x2b8796[_0x5ac318(0x206)]),_0x2c0b29=_0x32cce6[_0x5ac318(0x207)](_0x27c7ca[_0x5ac318(0x19f)]);_0x1ce2f5[_0x5ac318(0x1ac)](_0x4d5978=>{_0x41c92a['getUser'](_0x4d5978)&&_0x1ce2f5['delete'](_0x4d5978);}),_0x1ce2f5[_0x5ac318(0x1f8)]&&(await _0x2c0b29[_0x5ac318(0x207)](_0x5ac318(0x1f3),{'params':{'userIDs':[..._0x1ce2f5]}}))[_0x5ac318(0x1a4)][_0x5ac318(0x190)][_0x5ac318(0x1ac)](_0x11f31f=>{const _0x996f53=_0x5ac318;_0x11f31f&&_0x41c92a[_0x996f53(0x1a3)](_0x11f31f);});};var _0x3766e9=Object['getOwnPropertyDescriptor'],_0x2b52be=(_0xfbeac7,_0x48c3f1,_0x540b64,_0x4ce856)=>{for(var _0x200b7a=_0x4ce856>0x1?void 0x0:_0x4ce856?_0x3766e9(_0x48c3f1,_0x540b64):_0x48c3f1,_0x4fc202=_0xfbeac7['length']-0x1,_0x248533;_0x4fc202>=0x0;_0x4fc202--)(_0x248533=_0xfbeac7[_0x4fc202])&&(_0x200b7a=_0x248533(_0x200b7a)||_0x200b7a);return _0x200b7a;},_0x6ba73f=(_0x55c223,_0x1914e6)=>(_0xbe59a3,_0x3d432a)=>_0x1914e6(_0xbe59a3,_0x3d432a,_0x55c223);let _0x3f39e9=class extends _0x2b8796[_0x4327cd(0x1ab)]{constructor(_0xe9e448,_0x2afe3e,_0x551ac0,_0x23ce42){const _0x4d022e=_0x4327cd;super(),this['_commentService']=_0xe9e448,this[_0x4d022e(0x1dd)]=_0x2afe3e,this[_0x4d022e(0x1b0)]=_0x551ac0,this[_0x4d022e(0x198)]=_0x23ce42,this[_0x4d022e(0x1cf)](),this[_0x4d022e(0x205)]();}[_0x4327cd(0x205)](){const _0x4cc015=_0x4327cd;this[_0x4cc015(0x1c8)](this[_0x4cc015(0x1dd)][_0x4cc015(0x189)]['pipe'](_0x561f32[_0x4cc015(0x195)](0x10))[_0x4cc015(0x1cc)](_0x2e3651=>{const _0x297678=new Set();_0x2e3651['forEach'](_0x4b99bf=>{const _0x19ca9a=_0x403c;switch(_0x4b99bf[_0x19ca9a(0x1bf)]){case _0x19ca9a(0x186):{const _0x148dbc=_0x4b99bf[_0x19ca9a(0x188)]['personId'];_0x297678['add'](_0x148dbc);break;}}}),_0x78d22a(this['_injector'],_0x297678);}));}['_init'](){const _0x176061=_0x4327cd;this[_0x176061(0x1c8)](this[_0x176061(0x1d7)][_0x176061(0x189)]['subscribe'](async _0x4aca07=>{const _0x269068=_0x176061;var _0x4087b8,_0x3ec758,_0xeb1cab,_0x61a057;const _0x21e1f4=(_0x4087b8=this[_0x269068(0x1dd)]['getUnit'](_0x4aca07[_0x269068(0x1e9)])[_0x269068(0x1d2)](_0x2f50e7=>_0x2f50e7[_0x269068(0x204)]===_0x4aca07[_0x269068(0x204)]))==null?void 0x0:_0x4087b8[_0x269068(0x1d4)];if(!_0x21e1f4)return;const {unitId:_0xfe205f,subUnitId:_0xe83050}=_0x21e1f4;switch(_0x4aca07[_0x269068(0x193)]&&this[_0x269068(0x1b0)][_0x269068(0x1a3)](_0x4aca07[_0x269068(0x193)]),_0x4aca07[_0x269068(0x1bf)]){case _0x388ad2[_0x269068(0x197)]:break;case _0x388ad2[_0x269068(0x192)]:{this[_0x269068(0x1dd)][_0x269068(0x1ce)](_0xfe205f,_0xe83050,{'unitId':_0xfe205f,'subUnitId':_0xe83050,'ref':'','id':_0x4aca07['replyId'],'dT':_0x2d48e6(+_0x4aca07['createTimestamp']),'threadId':_0x4aca07[_0x269068(0x204)],'personId':(_0xeb1cab=(_0x3ec758=_0x4aca07[_0x269068(0x193)])==null?void 0x0:_0x3ec758[_0x269068(0x1e1)])!=null?_0xeb1cab:_0x4aca07[_0x269068(0x19d)],'text':JSON[_0x269068(0x1f1)](_0x4aca07[_0x269068(0x1c9)]),'parentId':_0x21e1f4['id']});break;}case _0x388ad2[_0x269068(0x1c6)]:{const _0x80d5c7=this[_0x269068(0x1dd)][_0x269068(0x1af)](_0xfe205f,_0xe83050,_0x4aca07[_0x269068(0x1fa)]);_0x80d5c7&&_0x80d5c7['parentId']&&this[_0x269068(0x1dd)][_0x269068(0x18b)](_0xfe205f,_0xe83050,_0x4aca07[_0x269068(0x1fa)]);break;}case _0x388ad2['Edit']:{this[_0x269068(0x1dd)][_0x269068(0x203)](_0xfe205f,_0xe83050,{'commentId':_0x4aca07[_0x269068(0x1fa)],'text':JSON[_0x269068(0x1f1)](_0x4aca07[_0x269068(0x1c9)])});break;}case _0x388ad2[_0x269068(0x1f2)]:{const _0x199802=(_0x61a057=this['_threadCommentModel'][_0x269068(0x18c)](_0x4aca07[_0x269068(0x1e9)])[_0x269068(0x1d2)](_0x13884b=>_0x13884b['threadId']===_0x4aca07[_0x269068(0x204)]))==null?void 0x0:_0x61a057[_0x269068(0x1d4)];_0x199802&&this[_0x269068(0x1dd)][_0x269068(0x199)](_0xfe205f,_0xe83050,_0x199802['id'],_0x4aca07[_0x269068(0x1b9)]===_0x6ad076[_0x269068(0x1e0)]);break;}}}));}};_0x3f39e9=_0x2b52be([_0x6ba73f(0x0,_0x2b8796['Inject'](_0x34731b[_0x4327cd(0x1e6)])),_0x6ba73f(0x1,_0x2b8796['Inject'](_0x5a0b5d['ThreadCommentModel'])),_0x6ba73f(0x2,_0x2b8796[_0x4327cd(0x1ea)](_0x2b8796[_0x4327cd(0x206)])),_0x6ba73f(0x3,_0x2b8796[_0x4327cd(0x1ea)](_0x2b8796['Injector']))],_0x3f39e9);const _0x5e571e=_0x4327cd(0x1a5),_0x4befd2={};var _0x46318e=Object[_0x4327cd(0x187)],_0x18acbe=(_0x51926c,_0xb17ee9,_0x2dc02e,_0x403bd3)=>{const _0x1dd0a9=_0x4327cd;for(var _0x5e78ea=_0x403bd3>0x1?void 0x0:_0x403bd3?_0x46318e(_0xb17ee9,_0x2dc02e):_0xb17ee9,_0x1c65a2=_0x51926c[_0x1dd0a9(0x1a9)]-0x1,_0xc1b1da;_0x1c65a2>=0x0;_0x1c65a2--)(_0xc1b1da=_0x51926c[_0x1c65a2])&&(_0x5e78ea=_0xc1b1da(_0x5e78ea)||_0x5e78ea);return _0x5e78ea;},_0x493168=(_0x1177ec,_0x553a60)=>(_0x120c27,_0x3b0271)=>_0x553a60(_0x120c27,_0x3b0271,_0x1177ec);function _0x4a3b20(_0x5d5379,_0x48596c){const _0x4d3dcd=_0x4327cd,_0x2c070a=_0x5d5379[_0x4d3dcd(0x1d5)][0x0];return{..._0x48596c,'id':_0x2c070a[_0x4d3dcd(0x1fa)],'resolved':_0x5d5379[_0x4d3dcd(0x1b9)]===0x1,'dT':_0x2d48e6(_0x2c070a[_0x4d3dcd(0x18d)]),'personId':_0x2c070a[_0x4d3dcd(0x19d)],'threadId':_0x2c070a[_0x4d3dcd(0x204)]};}function _0x1a071c(_0xcace04,_0x4a78f0,_0x3c88af){const _0x41977a=_0x4327cd;var _0x13685b,_0x4a586f;if(((_0x4a586f=(_0x13685b=_0xcace04==null?void 0x0:_0xcace04[_0x41977a(0x1d5)])==null?void 0x0:_0x13685b['length'])!=null?_0x4a586f:0x0)>0x0){const _0x52b3b8=(_0xb66ae9,_0x58babd)=>({'id':_0xb66ae9[_0x41977a(0x1fa)],'threadId':_0xb66ae9['threadId'],'dT':_0x2d48e6(_0xb66ae9[_0x41977a(0x18d)]),'personId':_0xb66ae9[_0x41977a(0x19d)],'resolved':_0xcace04['solved']===_0x6ad076['Solved'],'unitId':_0x4a78f0,'subUnitId':_0x3c88af,'text':JSON[_0x41977a(0x1f1)](_0xb66ae9[_0x41977a(0x1c9)]),'parentId':_0x58babd}),_0x55a97=_0x52b3b8(_0xcace04[_0x41977a(0x1d5)][0x0]);return{..._0x55a97,'children':_0xcace04[_0x41977a(0x1d5)][_0x41977a(0x1ca)](0x1)[_0x41977a(0x1d0)](_0x1e5464=>_0x52b3b8(_0x1e5464,_0x55a97['id']))};}return null;}let _0xd9eb84=class{constructor(_0x2475b3,_0x5c35b8,_0x55af77,_0x46d0c8){const _0x12e527=_0x4327cd;this[_0x12e527(0x1a1)]=_0x2475b3,this['_userService']=_0x5c35b8,this[_0x12e527(0x1c0)]=_0x55af77,this['_injector']=_0x46d0c8;}async[_0x4327cd(0x1ce)](_0xbba59c){const _0x24748b=_0x4327cd;var _0x1a004c,_0x49a02e;const {parentId:_0x2c29cc,unitId:_0x5040ca,text:_0x268d54,threadId:_0x4c6e87}=_0xbba59c,_0x5913f9=(_0x49a02e=(_0x1a004c=_0x268d54[_0x24748b(0x1be)])==null?void 0x0:_0x1a004c[_0x24748b(0x1db)](_0x3f2f4e=>_0x3f2f4e[_0x24748b(0x19c)]===_0x2b8796[_0x24748b(0x184)][_0x24748b(0x1fc)])[_0x24748b(0x1d0)](_0xb4307=>_0xb4307[_0x24748b(0x1b5)]))!=null?_0x49a02e:[],_0x531e82=JSON['stringify'](_0x268d54),_0x79f90d=(await this['_sessionService'][_0x24748b(0x1ed)](_0x5040ca))[_0x24748b(0x1e3)]();if(_0x2c29cc){const _0x3ab414={'memberId':_0x79f90d,'unitId':_0x5040ca,'content':_0x531e82,'mention':_0x5913f9,'threadId':_0x4c6e87},_0x22ea70=(await this['_httpService'][_0x24748b(0x1de)](_0x24748b(0x1b6)+_0x5040ca+'/reply',{'body':_0x3ab414}))[_0x24748b(0x1a4)][_0x24748b(0x1fb)];return{..._0xbba59c,'id':_0x22ea70[_0x24748b(0x1fa)],'dT':_0x2b8796[_0x24748b(0x19e)](+_0x22ea70[_0x24748b(0x18d)])['format'](_0x24748b(0x18a)),'personId':_0x22ea70[_0x24748b(0x19d)]};}else{const _0x1a346d={'memberId':_0x79f90d,'unitId':_0x5040ca,'content':_0x531e82,'mention':_0x5913f9},_0x29049e=await this[_0x24748b(0x1a1)][_0x24748b(0x1de)](_0x24748b(0x1b6)+_0x5040ca+'/add',{'body':_0x1a346d});return _0x4a3b20(_0x29049e[_0x24748b(0x1a4)][_0x24748b(0x19a)],_0xbba59c);}}async[_0x4327cd(0x203)](_0x1e6277){const _0x2dbda4=_0x4327cd;var _0x51ee88,_0x3f72f9;const {text:_0x3a5d6a,unitId:_0x3c875c}=_0x1e6277,_0x3db5a9=(_0x3f72f9=(_0x51ee88=_0x3a5d6a['customRanges'])==null?void 0x0:_0x51ee88[_0x2dbda4(0x1db)](_0x5d8cbf=>_0x5d8cbf['rangeType']===_0x2b8796[_0x2dbda4(0x184)][_0x2dbda4(0x1fc)])[_0x2dbda4(0x1d0)](_0x4685da=>_0x4685da[_0x2dbda4(0x1b5)]))!=null?_0x3f72f9:[],_0x4d2b22=JSON['stringify'](_0x3a5d6a),_0x329ae3=_0x1e6277[_0x2dbda4(0x204)],_0x4ae3b1=_0x1e6277['id'],_0x3b8cd8={'memberId':(await this[_0x2dbda4(0x1c0)][_0x2dbda4(0x1ed)](_0x3c875c))[_0x2dbda4(0x1e3)](),'unitId':_0x3c875c,'threadId':_0x329ae3,'mention':_0x3db5a9,'content':_0x4d2b22,'replyId':_0x4ae3b1},_0x68f4ab=await this[_0x2dbda4(0x1a1)][_0x2dbda4(0x1de)](_0x2dbda4(0x1b6)+_0x3c875c+_0x2dbda4(0x1e2),{'body':_0x3b8cd8});return!_0x68f4ab[_0x2dbda4(0x1a4)][_0x2dbda4(0x1ad)]||_0x68f4ab[_0x2dbda4(0x1a4)][_0x2dbda4(0x1ad)][_0x2dbda4(0x1eb)]===0x1;}async[_0x4327cd(0x199)](_0x57802c){const _0x5bfab2=_0x4327cd,{unitId:_0xc963b}=_0x57802c,_0x2bb12b=_0x57802c[_0x5bfab2(0x204)],_0x5ec642={'memberId':this[_0x5bfab2(0x1b0)][_0x5bfab2(0x1df)]()[_0x5bfab2(0x1e1)],'unitId':_0xc963b,'threadId':_0x2bb12b,'solved':_0x57802c[_0x5bfab2(0x1d8)]?_0x6ad076[_0x5bfab2(0x1e0)]:_0x6ad076[_0x5bfab2(0x1a6)]},_0x5a9975=await this[_0x5bfab2(0x1a1)][_0x5bfab2(0x1de)](_0x5bfab2(0x1b6)+_0xc963b+_0x5bfab2(0x1b3),{'body':_0x5ec642});return!_0x5a9975[_0x5bfab2(0x1a4)][_0x5bfab2(0x1ad)]||_0x5a9975[_0x5bfab2(0x1a4)]['error'][_0x5bfab2(0x1eb)]===0x1;}async[_0x4327cd(0x18b)](_0x3e5931,_0x5458b5,_0x4a7625,_0x12e002){const _0x43983c=_0x4327cd,_0x1964e9={'memberId':(await this[_0x43983c(0x1c0)][_0x43983c(0x1ed)](_0x3e5931))[_0x43983c(0x1e3)](),'threadId':_0x4a7625,'replyId':_0x12e002,'unitId':_0x3e5931},_0x48f3f1=await this[_0x43983c(0x1a1)]['post'](_0x43983c(0x1b6)+_0x3e5931+_0x43983c(0x1c4),{'body':_0x1964e9});return!_0x48f3f1[_0x43983c(0x1a4)][_0x43983c(0x1ad)]||_0x48f3f1[_0x43983c(0x1a4)][_0x43983c(0x1ad)][_0x43983c(0x1eb)]===0x1;}async['listComments'](_0x1e645c,_0x4bcfb3,_0x2bbcae){const _0x3504c5=_0x4327cd,_0x417f1e={'unitId':_0x1e645c,'threadId':_0x2bbcae},_0x380606=await this[_0x3504c5(0x1a1)][_0x3504c5(0x1de)](_0x3504c5(0x1b6)+_0x1e645c+_0x3504c5(0x1b7),{'body':_0x417f1e}),_0x3ed5ae=_0x2bbcae[_0x3504c5(0x1d0)](_0xb0d76=>_0x1a071c(_0x380606[_0x3504c5(0x1a4)]['comments'][_0xb0d76],_0x1e645c,_0x4bcfb3))[_0x3504c5(0x1db)](Boolean);return Object[_0x3504c5(0x1f6)](_0x380606[_0x3504c5(0x1a4)][_0x3504c5(0x190)])[_0x3504c5(0x1ac)](_0x15bab0=>{const _0x1a0ecc=_0x3504c5;this[_0x1a0ecc(0x1b0)][_0x1a0ecc(0x1a3)](_0x15bab0);}),_0x3ed5ae;}['saveCommentToSnapshot'](_0x2265e3){const _0x3d5999=_0x4327cd;return{'id':_0x2265e3['id'],'threadId':_0x2265e3['threadId'],'ref':_0x2265e3[_0x3d5999(0x196)]};}};_0xd9eb84=_0x18acbe([_0x493168(0x0,_0x2b8796['Inject'](_0x27c7ca['HTTPService'])),_0x493168(0x1,_0x2b8796[_0x4327cd(0x1ea)](_0x2b8796[_0x4327cd(0x206)])),_0x493168(0x2,_0x2b8796[_0x4327cd(0x1ea)](_0x34731b['CollaborationSessionService'])),_0x493168(0x3,_0x2b8796['Inject'](_0x2b8796[_0x4327cd(0x1d1)]))],_0xd9eb84);var _0x4f8f74=Object[_0x4327cd(0x187)],_0x43e14d=(_0x333aec,_0x23b4e2,_0x5b503a,_0x333566)=>{const _0x5f8e3=_0x4327cd;for(var _0x215fdd=_0x333566>0x1?void 0x0:_0x333566?_0x4f8f74(_0x23b4e2,_0x5b503a):_0x23b4e2,_0x58cf90=_0x333aec[_0x5f8e3(0x1a9)]-0x1,_0x30838f;_0x58cf90>=0x0;_0x58cf90--)(_0x30838f=_0x333aec[_0x58cf90])&&(_0x215fdd=_0x30838f(_0x215fdd)||_0x215fdd);return _0x215fdd;},_0x757d7=(_0x1dc0f2,_0x2e7ffb)=>(_0x3832ef,_0x4a6c76)=>_0x2e7ffb(_0x3832ef,_0x4a6c76,_0x1dc0f2);let _0x8c5311=class extends _0x2b8796[_0x4327cd(0x1ab)]{constructor(_0x4cc5dc,_0x5568de){const _0x1ad59d=_0x4327cd;super(),this[_0x1ad59d(0x1c7)]=_0x4cc5dc,this[_0x1ad59d(0x19b)]=_0x5568de,this[_0x1ad59d(0x1bd)]();}['_initDataSource'](){const _0x3cd0b2=_0x4327cd;this[_0x3cd0b2(0x1c7)]['dataSource']=this[_0x3cd0b2(0x19b)],this[_0x3cd0b2(0x1c7)][_0x3cd0b2(0x1a0)]=!0x1;}};_0x8c5311=_0x43e14d([_0x757d7(0x0,_0x5a0b5d[_0x4327cd(0x201)]),_0x757d7(0x1,_0x2b8796['Inject'](_0xd9eb84))],_0x8c5311);var _0x78a45a=Object[_0x4327cd(0x1ec)],_0xc995e0=Object['getOwnPropertyDescriptor'],_0x51c48d=(_0x27a363,_0x59e2c4,_0x50c59a)=>_0x59e2c4 in _0x27a363?_0x78a45a(_0x27a363,_0x59e2c4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x50c59a}):_0x27a363[_0x59e2c4]=_0x50c59a,_0x24d6fe=(_0x5bcc56,_0x188136,_0x5ccae1,_0xffb98c)=>{const _0x3e12d4=_0x4327cd;for(var _0x2ed9ee=_0xffb98c>0x1?void 0x0:_0xffb98c?_0xc995e0(_0x188136,_0x5ccae1):_0x188136,_0x4033d8=_0x5bcc56[_0x3e12d4(0x1a9)]-0x1,_0x5d2f61;_0x4033d8>=0x0;_0x4033d8--)(_0x5d2f61=_0x5bcc56[_0x4033d8])&&(_0x2ed9ee=_0x5d2f61(_0x2ed9ee)||_0x2ed9ee);return _0x2ed9ee;},_0x3c0661=(_0x3c36f0,_0x3b646c)=>(_0x236c4d,_0xa1d395)=>_0x3b646c(_0x236c4d,_0xa1d395,_0x3c36f0),_0x14f545=(_0x29719f,_0x35669b,_0x5d52e0)=>_0x51c48d(_0x29719f,typeof _0x35669b!=_0x4327cd(0x1f9)?_0x35669b+'':_0x35669b,_0x5d52e0);_0x18180c[_0x4327cd(0x1f5)]=class extends _0x2b8796['Plugin']{constructor(_0x58e082=_0x4befd2,_0x434cce,_0x38c875){const _0x507a07=_0x4327cd;super(),this[_0x507a07(0x1e5)]=_0x58e082,this[_0x507a07(0x198)]=_0x434cce,this[_0x507a07(0x1c5)]=_0x38c875;const {..._0x1af7a4}=_0x2b8796['merge']({},_0x4befd2,this[_0x507a07(0x1e5)]);this['_configService'][_0x507a07(0x1c1)](_0x5e571e,_0x1af7a4);}[_0x4327cd(0x1b4)](){[[_0xd9eb84],[_0x8c5311],[_0x3f39e9]]['forEach'](_0x3a258a=>{const _0x140e37=_0x403c;this[_0x140e37(0x198)][_0x140e37(0x186)](_0x3a258a);});}[_0x4327cd(0x1bc)](){const _0x516e87=_0x4327cd;this[_0x516e87(0x198)]['get'](_0x8c5311),this[_0x516e87(0x198)]['get'](_0x3f39e9);}},_0x14f545(_0x18180c['UniverThreadCommentDataSourcePlugin'],_0x4327cd(0x1a8),_0x1d2fd5),_0x14f545(_0x18180c[_0x4327cd(0x1f5)],_0x4327cd(0x1bf),_0x2b8796[_0x4327cd(0x1c2)]['UNIVER_UNKNOWN']),_0x18180c[_0x4327cd(0x1f5)]=_0x24d6fe([_0x2b8796[_0x4327cd(0x1a2)](_0x598d23[_0x4327cd(0x1da)],_0x34731b[_0x4327cd(0x1e4)],_0x13f45b[_0x4327cd(0x1e7)]),_0x3c0661(0x1,_0x2b8796[_0x4327cd(0x1ea)](_0x2b8796[_0x4327cd(0x1d1)])),_0x3c0661(0x2,_0x2b8796[_0x4327cd(0x1f7)])],_0x18180c[_0x4327cd(0x1f5)]),Object[_0x4327cd(0x1ec)](_0x18180c,Symbol[_0x4327cd(0x1aa)],{'value':'Module'});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.10-experimental.
|
|
3
|
+
"version": "0.6.10-experimental.20250424-9e348ed",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,19 +45,19 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.6.10-experimental.
|
|
49
|
-
"@univerjs-pro/license": "0.6.10-experimental.
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/core": "0.6.10-experimental.20250421-e4eb9bc",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.10-experimental.20250424-9e348ed",
|
|
49
|
+
"@univerjs-pro/license": "0.6.10-experimental.20250424-9e348ed",
|
|
50
|
+
"@univerjs/core": "0.6.10-experimental.20250424-9e348ed",
|
|
52
51
|
"@univerjs/protocol": "0.1.46-alpha.3",
|
|
53
|
-
"@univerjs/thread-comment": "0.6.10-experimental.
|
|
54
|
-
"@univerjs/
|
|
52
|
+
"@univerjs/thread-comment-ui": "0.6.10-experimental.20250424-9e348ed",
|
|
53
|
+
"@univerjs/network": "0.6.10-experimental.20250424-9e348ed",
|
|
54
|
+
"@univerjs/thread-comment": "0.6.10-experimental.20250424-9e348ed"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vite": "^6.3.0",
|
|
60
|
-
"vitest": "^3.1.
|
|
60
|
+
"vitest": "^3.1.2",
|
|
61
61
|
"@univerjs-infra/shared": "0.6.10"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|