@univerjs-pro/thread-comment-datasource 0.8.0-nightly.202505281606 → 0.8.0-nightly.202505291607
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 _0x43de35=_0x10b0;(function(_0x2ced00,_0x4d1f91){const _0xab217=_0x10b0,_0x127535=_0x2ced00();while(!![]){try{const _0x1858be=parseInt(_0xab217(0x154))/0x1*(parseInt(_0xab217(0x14b))/0x2)+-parseInt(_0xab217(0x13e))/0x3+-parseInt(_0xab217(0x14d))/0x4*(parseInt(_0xab217(0x151))/0x5)+-parseInt(_0xab217(0x129))/0x6*(parseInt(_0xab217(0x13f))/0x7)+parseInt(_0xab217(0x14a))/0x8+parseInt(_0xab217(0x144))/0x9+-parseInt(_0xab217(0x16c))/0xa*(-parseInt(_0xab217(0x187))/0xb);if(_0x1858be===_0x4d1f91)break;else _0x127535['push'](_0x127535['shift']());}catch(_0x10ffb7){_0x127535['push'](_0x127535['shift']());}}}(_0x6249,0x990a1));function _0x10b0(_0x7a39dd,_0x49df73){const _0x624927=_0x6249();return _0x10b0=function(_0x10b0ac,_0x55d462){_0x10b0ac=_0x10b0ac-0x10f;let _0x5b8419=_0x624927[_0x10b0ac];return _0x5b8419;},_0x10b0(_0x7a39dd,_0x49df73);}function _0x6249(){const _0x3b0eef=['/solved','length','pipe','Reply','users','filter','@univerjs/network','@univerjs/thread-comment-ui','parse','forEach','Module','UniverCollaborationClientPlugin','userId','Solve','delete','subscribe','resolved','UNIVER_UNKNOWN','_threadCommentDataSourceService','/universer-api/comment/unit/','content','thread-comment-data-source.config','_sessionService','COMMENT','saveCommentToSnapshot','/delete','308622OwSHRR','HTTPService','user','Unknown','comment','disposeWithMe','Injector','/list','getUnit','onReady','ThreadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','@univerjs/core','replies','_commentService','parentId','_threadCommentDataSource','defineProperty','createTimestamp','solved','3031197YpxXUI','161tFKjsH','YYYY/MM/DD\x20HH:mm','get','UNRECOGNIZED','replyId','9091692zGuMwt','dayjs','@univerjs-pro/collaboration-client','root','Disposable','getMemberID','8268216kvyqUk','128sHKrUg','getOwnPropertyDescriptor','476vCMFsn','error','_initUserSync','_configService','23035iRcRkG','post','_config','13297SQpoaS','find','updateComment','userID','addUser','getUser','body','_injector','merge','_threadCommentModel','code','payload','getCurrentUser','comments','dataSource','symbol','requireSession','@univerjs-pro/license','UniverLicensePlugin','rangeId','type','resolveComment','_httpService','Solved','5990ZHMADs','customRanges','ref','_initDataSource','unitId','slice','CustomRangeType','onStarting','threadId','_userService','rxjs','format','map','personId','Delete','Inject','reply','bufferTime','setConfig','UniverThreadCommentDataSourcePlugin','rangeType','UserManagerService','Edit','@univerjs/thread-comment','syncUpdateMutationToColla','commentUpdate$','_init','8701MyKioS','Add','OpenOrReOpen','getComment','stringify'];_0x6249=function(){return _0x3b0eef;};return _0x6249();}Object[_0x43de35(0x13b)](exports,Symbol['toStringTag'],{'value':_0x43de35(0x119)});const b=require(_0x43de35(0x146)),T=require(_0x43de35(0x165)),c=require(_0x43de35(0x136)),j=require(_0x43de35(0x116)),M=require(_0x43de35(0x183)),w=require(_0x43de35(0x176)),P=require(_0x43de35(0x115)),U=_0x43de35(0x134);var I=(_0x1e1611=>(_0x1e1611[_0x1e1611['OpenOrReOpen']=0x0]=_0x43de35(0x189),_0x1e1611[_0x1e1611[_0x43de35(0x16b)]=0x1]=_0x43de35(0x16b),_0x1e1611[_0x1e1611[_0x43de35(0x142)]=-0x1]='UNRECOGNIZED',_0x1e1611))(I||{}),v=(_0x5c1321=>(_0x5c1321[_0x5c1321[_0x43de35(0x12c)]=0x0]='Unknown',_0x5c1321[_0x5c1321[_0x43de35(0x188)]=0x1]=_0x43de35(0x188),_0x5c1321[_0x5c1321['Reply']=0x2]=_0x43de35(0x112),_0x5c1321[_0x5c1321[_0x43de35(0x182)]=0x3]=_0x43de35(0x182),_0x5c1321[_0x5c1321[_0x43de35(0x17a)]=0x4]='Delete',_0x5c1321[_0x5c1321[_0x43de35(0x11c)]=0x5]=_0x43de35(0x11c),_0x5c1321[_0x5c1321[_0x43de35(0x142)]=-0x1]='UNRECOGNIZED',_0x5c1321))(v||{});const f=_0x22e58d=>c[_0x43de35(0x145)](new Date(+_0x22e58d))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x44bba2,_0x46e97c)=>{const _0x197888=_0x43de35,_0x3d5a0a=_0x44bba2[_0x197888(0x141)](c[_0x197888(0x181)]),_0x74770a=_0x44bba2[_0x197888(0x141)](P[_0x197888(0x12a)]);_0x46e97c[_0x197888(0x118)](_0x4adf10=>{const _0xf7a6f9=_0x197888;_0x3d5a0a[_0xf7a6f9(0x159)](_0x4adf10)&&_0x46e97c[_0xf7a6f9(0x11d)](_0x4adf10);}),_0x46e97c['size']&&(await _0x74770a[_0x197888(0x141)]('/universer-api/user/list',{'params':{'userIDs':[..._0x46e97c]}}))[_0x197888(0x15a)][_0x197888(0x113)][_0x197888(0x118)](_0x89a715=>{const _0x375094=_0x197888;_0x89a715&&_0x3d5a0a[_0x375094(0x158)](_0x89a715);});};var $=Object[_0x43de35(0x14c)],E=(_0x44f086,_0x346e0c,_0x22528a,_0x2851f8)=>{const _0x8aa1ab=_0x43de35;for(var _0x37834a=_0x2851f8>0x1?void 0x0:_0x2851f8?$(_0x346e0c,_0x22528a):_0x346e0c,_0x32b22a=_0x44f086[_0x8aa1ab(0x110)]-0x1,_0x33344b;_0x32b22a>=0x0;_0x32b22a--)(_0x33344b=_0x44f086[_0x32b22a])&&(_0x37834a=_0x33344b(_0x37834a)||_0x37834a);return _0x37834a;},S=(_0x4a8cb0,_0x385ca5)=>(_0xa509f1,_0x59a2c4)=>_0x385ca5(_0xa509f1,_0x59a2c4,_0x4a8cb0);let p=class extends c[_0x43de35(0x148)]{constructor(_0x1b78ae,_0x199780,_0x4ee5ad,_0x2da136){const _0x446129=_0x43de35;super(),this[_0x446129(0x138)]=_0x1b78ae,this[_0x446129(0x15d)]=_0x199780,this[_0x446129(0x175)]=_0x4ee5ad,this['_injector']=_0x2da136,this[_0x446129(0x186)](),this[_0x446129(0x14f)]();}['_initUserSync'](){const _0x1f3188=_0x43de35;this[_0x1f3188(0x12e)](this['_threadCommentModel']['commentUpdate$'][_0x1f3188(0x111)](w[_0x1f3188(0x17d)](0x10))[_0x1f3188(0x11e)](_0x2673e8=>{const _0x4a88b8=_0x1f3188,_0x41880c=new Set();_0x2673e8[_0x4a88b8(0x118)](_0x3be270=>{const _0x44af95=_0x4a88b8;switch(_0x3be270[_0x44af95(0x168)]){case'add':{const _0x10711f=_0x3be270[_0x44af95(0x15f)][_0x44af95(0x179)];_0x41880c['add'](_0x10711f);break;}}}),R(this[_0x4a88b8(0x15b)],_0x41880c);}));}[_0x43de35(0x186)](){const _0x5766ea=_0x43de35;this[_0x5766ea(0x12e)](this['_commentService'][_0x5766ea(0x185)]['subscribe'](async _0x3bd977=>{const _0x13b4f8=_0x5766ea;var _0x261e1b,_0x2890eb,_0x3c8b21,_0x358ecd;const _0xa37f53=(_0x261e1b=this[_0x13b4f8(0x15d)][_0x13b4f8(0x131)](_0x3bd977[_0x13b4f8(0x170)])['find'](_0x1ce041=>_0x1ce041[_0x13b4f8(0x174)]===_0x3bd977['threadId']))==null?void 0x0:_0x261e1b[_0x13b4f8(0x147)];if(!_0xa37f53)return;const {unitId:_0x2b7186,subUnitId:_0x3be203}=_0xa37f53;switch(_0x3bd977['user']&&this[_0x13b4f8(0x175)][_0x13b4f8(0x158)](_0x3bd977[_0x13b4f8(0x12b)]),_0x3bd977[_0x13b4f8(0x168)]){case v[_0x13b4f8(0x188)]:break;case v[_0x13b4f8(0x112)]:{this[_0x13b4f8(0x15d)]['addComment'](_0x2b7186,_0x3be203,{'unitId':_0x2b7186,'subUnitId':_0x3be203,'ref':'','id':_0x3bd977[_0x13b4f8(0x143)],'dT':f(+_0x3bd977[_0x13b4f8(0x13c)]),'threadId':_0x3bd977[_0x13b4f8(0x174)],'personId':(_0x3c8b21=(_0x2890eb=_0x3bd977['user'])==null?void 0x0:_0x2890eb[_0x13b4f8(0x157)])!=null?_0x3c8b21:_0x3bd977[_0x13b4f8(0x11b)],'text':JSON[_0x13b4f8(0x117)](_0x3bd977['content']),'parentId':_0xa37f53['id']});break;}case v['Delete']:{const _0x3ccda7=this[_0x13b4f8(0x15d)][_0x13b4f8(0x18a)](_0x2b7186,_0x3be203,_0x3bd977[_0x13b4f8(0x143)]);_0x3ccda7&&_0x3ccda7[_0x13b4f8(0x139)]&&this[_0x13b4f8(0x15d)]['deleteComment'](_0x2b7186,_0x3be203,_0x3bd977[_0x13b4f8(0x143)]);break;}case v[_0x13b4f8(0x182)]:{this[_0x13b4f8(0x15d)][_0x13b4f8(0x156)](_0x2b7186,_0x3be203,{'commentId':_0x3bd977[_0x13b4f8(0x143)],'text':JSON['parse'](_0x3bd977[_0x13b4f8(0x123)])});break;}case v['Solve']:{const _0xf6d96e=(_0x358ecd=this['_threadCommentModel']['getUnit'](_0x3bd977[_0x13b4f8(0x170)])[_0x13b4f8(0x155)](_0x33977a=>_0x33977a['threadId']===_0x3bd977[_0x13b4f8(0x174)]))==null?void 0x0:_0x358ecd[_0x13b4f8(0x147)];_0xf6d96e&&this[_0x13b4f8(0x15d)][_0x13b4f8(0x169)](_0x2b7186,_0x3be203,_0xf6d96e['id'],_0x3bd977[_0x13b4f8(0x13d)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x43de35(0x17b)](b['CommentService'])),S(0x1,c['Inject'](M[_0x43de35(0x133)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c['Inject'](c['Injector']))],p);const q=_0x43de35(0x124),D={};var A=Object[_0x43de35(0x14c)],x=(_0x14a1da,_0x17ed2a,_0x3bef6f,_0x31c20b)=>{for(var _0x4b2800=_0x31c20b>0x1?void 0x0:_0x31c20b?A(_0x17ed2a,_0x3bef6f):_0x17ed2a,_0x412d0e=_0x14a1da['length']-0x1,_0x47ee31;_0x412d0e>=0x0;_0x412d0e--)(_0x47ee31=_0x14a1da[_0x412d0e])&&(_0x4b2800=_0x47ee31(_0x4b2800)||_0x4b2800);return _0x4b2800;},_=(_0x310fd6,_0x115947)=>(_0xb64e59,_0x3ac44c)=>_0x115947(_0xb64e59,_0x3ac44c,_0x310fd6);function Y(_0x2f7b96,_0x1ffff8){const _0x393b7c=_0x43de35,_0xbc4b2e=_0x2f7b96[_0x393b7c(0x137)][0x0];return{..._0x1ffff8,'id':_0xbc4b2e[_0x393b7c(0x143)],'resolved':_0x2f7b96['solved']===0x1,'dT':f(_0xbc4b2e[_0x393b7c(0x13c)]),'personId':_0xbc4b2e[_0x393b7c(0x11b)],'threadId':_0xbc4b2e['threadId']};}function G(_0x50174a,_0x362d93,_0x40d628){const _0x6e5845=_0x43de35;var _0x56823f,_0x7ae6df;if(((_0x7ae6df=(_0x56823f=_0x50174a==null?void 0x0:_0x50174a[_0x6e5845(0x137)])==null?void 0x0:_0x56823f[_0x6e5845(0x110)])!=null?_0x7ae6df:0x0)>0x0){const _0x327f1c=(_0x4818e1,_0x4cdab2)=>({'id':_0x4818e1[_0x6e5845(0x143)],'threadId':_0x4818e1[_0x6e5845(0x174)],'dT':f(_0x4818e1['createTimestamp']),'personId':_0x4818e1[_0x6e5845(0x11b)],'resolved':_0x50174a[_0x6e5845(0x13d)]===I[_0x6e5845(0x16b)],'unitId':_0x362d93,'subUnitId':_0x40d628,'text':JSON[_0x6e5845(0x117)](_0x4818e1['content']),'parentId':_0x4cdab2}),_0x18538b=_0x327f1c(_0x50174a[_0x6e5845(0x137)][0x0]);return{..._0x18538b,'children':_0x50174a['replies'][_0x6e5845(0x171)](0x1)[_0x6e5845(0x178)](_0x21fc77=>_0x327f1c(_0x21fc77,_0x18538b['id']))};}return null;}let g=class{constructor(_0x2b1a67,_0x22dac5,_0x12cb3a,_0x16aaac){const _0x3bd87e=_0x43de35;this[_0x3bd87e(0x16a)]=_0x2b1a67,this[_0x3bd87e(0x175)]=_0x22dac5,this[_0x3bd87e(0x125)]=_0x12cb3a,this[_0x3bd87e(0x15b)]=_0x16aaac;}async['addComment'](_0x347a61){const _0x49d7b4=_0x43de35;var _0x4bd876,_0x5c5b86;const {parentId:_0x160738,unitId:_0x2f9f07,text:_0x336b04,threadId:_0x45e330}=_0x347a61,_0x2be1b0=(_0x5c5b86=(_0x4bd876=_0x336b04[_0x49d7b4(0x16d)])==null?void 0x0:_0x4bd876[_0x49d7b4(0x114)](_0xd77708=>_0xd77708[_0x49d7b4(0x180)]===c[_0x49d7b4(0x172)]['COMMENT'])[_0x49d7b4(0x178)](_0x23ea0c=>_0x23ea0c[_0x49d7b4(0x167)]))!=null?_0x5c5b86:[],_0x41fcc5=JSON[_0x49d7b4(0x18b)](_0x336b04),_0x5a7337=(await this[_0x49d7b4(0x125)][_0x49d7b4(0x164)](_0x2f9f07))[_0x49d7b4(0x149)]();if(_0x160738){const _0x59e4f9={'memberId':_0x5a7337,'unitId':_0x2f9f07,'content':_0x41fcc5,'mention':_0x2be1b0,'threadId':_0x45e330},_0x342285=(await this['_httpService'][_0x49d7b4(0x152)](_0x49d7b4(0x122)+_0x2f9f07+'/reply',{'body':_0x59e4f9}))[_0x49d7b4(0x15a)][_0x49d7b4(0x17c)];return{..._0x347a61,'id':_0x342285[_0x49d7b4(0x143)],'dT':c['dayjs'](+_0x342285['createTimestamp'])[_0x49d7b4(0x177)](_0x49d7b4(0x140)),'personId':_0x342285[_0x49d7b4(0x11b)]};}else{const _0x4c60d6={'memberId':_0x5a7337,'unitId':_0x2f9f07,'content':_0x41fcc5,'mention':_0x2be1b0},_0x3b6108=await this[_0x49d7b4(0x16a)][_0x49d7b4(0x152)](_0x49d7b4(0x122)+_0x2f9f07+'/add',{'body':_0x4c60d6});return Y(_0x3b6108[_0x49d7b4(0x15a)][_0x49d7b4(0x12d)],_0x347a61);}}async[_0x43de35(0x156)](_0x390504){const _0x185a27=_0x43de35;var _0x12eea8,_0x2e15ad;const {text:_0x3b902a,unitId:_0x8077bd}=_0x390504,_0x38db2f=(_0x2e15ad=(_0x12eea8=_0x3b902a[_0x185a27(0x16d)])==null?void 0x0:_0x12eea8[_0x185a27(0x114)](_0x49687c=>_0x49687c[_0x185a27(0x180)]===c[_0x185a27(0x172)][_0x185a27(0x126)])[_0x185a27(0x178)](_0xaeab52=>_0xaeab52[_0x185a27(0x167)]))!=null?_0x2e15ad:[],_0x4ff87e=JSON['stringify'](_0x3b902a),_0x35da7e=_0x390504[_0x185a27(0x174)],_0x31a902=_0x390504['id'],_0x1f87b2={'memberId':(await this[_0x185a27(0x125)][_0x185a27(0x164)](_0x8077bd))['getMemberID'](),'unitId':_0x8077bd,'threadId':_0x35da7e,'mention':_0x38db2f,'content':_0x4ff87e,'replyId':_0x31a902},_0xb7c8de=await this[_0x185a27(0x16a)]['post'](_0x185a27(0x122)+_0x8077bd+'/edit',{'body':_0x1f87b2});return!_0xb7c8de[_0x185a27(0x15a)][_0x185a27(0x14e)]||_0xb7c8de[_0x185a27(0x15a)][_0x185a27(0x14e)][_0x185a27(0x15e)]===0x1;}async[_0x43de35(0x169)](_0x1acc67){const _0x421b93=_0x43de35,{unitId:_0x121e3f}=_0x1acc67,_0x8a77cc=_0x1acc67['threadId'],_0x172a6a={'memberId':this[_0x421b93(0x175)][_0x421b93(0x160)]()[_0x421b93(0x157)],'unitId':_0x121e3f,'threadId':_0x8a77cc,'solved':_0x1acc67[_0x421b93(0x11f)]?I[_0x421b93(0x16b)]:I[_0x421b93(0x189)]},_0x3537af=await this[_0x421b93(0x16a)][_0x421b93(0x152)](_0x421b93(0x122)+_0x121e3f+_0x421b93(0x10f),{'body':_0x172a6a});return!_0x3537af[_0x421b93(0x15a)]['error']||_0x3537af['body'][_0x421b93(0x14e)]['code']===0x1;}async['deleteComment'](_0x2ca15f,_0x93a9a7,_0x56e06c,_0x5ec476){const _0x3d37d5=_0x43de35,_0x14dc0f={'memberId':(await this[_0x3d37d5(0x125)][_0x3d37d5(0x164)](_0x2ca15f))[_0x3d37d5(0x149)](),'threadId':_0x56e06c,'replyId':_0x5ec476,'unitId':_0x2ca15f},_0x31461d=await this[_0x3d37d5(0x16a)][_0x3d37d5(0x152)](_0x3d37d5(0x122)+_0x2ca15f+_0x3d37d5(0x128),{'body':_0x14dc0f});return!_0x31461d[_0x3d37d5(0x15a)][_0x3d37d5(0x14e)]||_0x31461d['body'][_0x3d37d5(0x14e)][_0x3d37d5(0x15e)]===0x1;}async['listComments'](_0x45a9c6,_0x3975ef,_0x38076d){const _0x44d2da=_0x43de35,_0x2e32a8={'unitId':_0x45a9c6,'threadId':_0x38076d},_0x416c3e=await this[_0x44d2da(0x16a)][_0x44d2da(0x152)]('/universer-api/comment/unit/'+_0x45a9c6+_0x44d2da(0x130),{'body':_0x2e32a8}),_0x44cb77=_0x38076d[_0x44d2da(0x178)](_0x48ca98=>G(_0x416c3e[_0x44d2da(0x15a)][_0x44d2da(0x161)][_0x48ca98],_0x45a9c6,_0x3975ef))[_0x44d2da(0x114)](Boolean);return Object['values'](_0x416c3e[_0x44d2da(0x15a)][_0x44d2da(0x113)])[_0x44d2da(0x118)](_0x15298d=>{const _0x4bfdfc=_0x44d2da;this['_userService'][_0x4bfdfc(0x158)](_0x15298d);}),_0x44cb77;}[_0x43de35(0x127)](_0x21e434){const _0x3f09f7=_0x43de35;return{'id':_0x21e434['id'],'threadId':_0x21e434[_0x3f09f7(0x174)],'ref':_0x21e434[_0x3f09f7(0x16e)]};}};g=x([_(0x0,c['Inject'](P[_0x43de35(0x12a)])),_(0x1,c[_0x43de35(0x17b)](c[_0x43de35(0x181)])),_(0x2,c['Inject'](b['CollaborationSessionService'])),_(0x3,c[_0x43de35(0x17b)](c['Injector']))],g);var H=Object[_0x43de35(0x14c)],J=(_0x3dbb62,_0x203685,_0x49635e,_0x123d2e)=>{const _0x481484=_0x43de35;for(var _0x396774=_0x123d2e>0x1?void 0x0:_0x123d2e?H(_0x203685,_0x49635e):_0x203685,_0x2dcda8=_0x3dbb62[_0x481484(0x110)]-0x1,_0x1818bd;_0x2dcda8>=0x0;_0x2dcda8--)(_0x1818bd=_0x3dbb62[_0x2dcda8])&&(_0x396774=_0x1818bd(_0x396774)||_0x396774);return _0x396774;},y=(_0x685009,_0x52f722)=>(_0xdb7663,_0x2f89d4)=>_0x52f722(_0xdb7663,_0x2f89d4,_0x685009);let C=class extends c[_0x43de35(0x148)]{constructor(_0x20fcb5,_0x5993b6){const _0x23250e=_0x43de35;super(),this['_threadCommentDataSourceService']=_0x20fcb5,this[_0x23250e(0x13a)]=_0x5993b6,this[_0x23250e(0x16f)]();}[_0x43de35(0x16f)](){const _0x4d8f7a=_0x43de35;this['_threadCommentDataSourceService'][_0x4d8f7a(0x162)]=this[_0x4d8f7a(0x13a)],this[_0x4d8f7a(0x121)][_0x4d8f7a(0x184)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x43de35(0x17b)](g))],C);var F=Object['defineProperty'],L=Object[_0x43de35(0x14c)],Z=(_0xa3b8b3,_0x3fc9ac,_0xd4b2fc)=>_0x3fc9ac in _0xa3b8b3?F(_0xa3b8b3,_0x3fc9ac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd4b2fc}):_0xa3b8b3[_0x3fc9ac]=_0xd4b2fc,W=(_0x196dec,_0x5c817f,_0x2e80d4,_0x465333)=>{const _0x5ca863=_0x43de35;for(var _0x126ae5=_0x465333>0x1?void 0x0:_0x465333?L(_0x5c817f,_0x2e80d4):_0x5c817f,_0x4e0a39=_0x196dec[_0x5ca863(0x110)]-0x1,_0x1c731c;_0x4e0a39>=0x0;_0x4e0a39--)(_0x1c731c=_0x196dec[_0x4e0a39])&&(_0x126ae5=_0x1c731c(_0x126ae5)||_0x126ae5);return _0x126ae5;},O=(_0x3f69d6,_0x32e0d1)=>(_0x38166b,_0x364ce)=>_0x32e0d1(_0x38166b,_0x364ce,_0x3f69d6),N=(_0x3467db,_0x210b33,_0x535088)=>Z(_0x3467db,typeof _0x210b33!=_0x43de35(0x163)?_0x210b33+'':_0x210b33,_0x535088);exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x93110f=D,_0x565451,_0x178654){const _0x9a58cc=_0x43de35;super(),this[_0x9a58cc(0x153)]=_0x93110f,this['_injector']=_0x565451,this['_configService']=_0x178654;const {..._0x59b7da}=c[_0x9a58cc(0x15c)]({},D,this[_0x9a58cc(0x153)]);this[_0x9a58cc(0x150)][_0x9a58cc(0x17e)](q,_0x59b7da);}[_0x43de35(0x173)](){const _0x47edca=_0x43de35;[[g],[C],[p]][_0x47edca(0x118)](_0x562525=>{const _0x3614de=_0x47edca;this[_0x3614de(0x15b)]['add'](_0x562525);});}[_0x43de35(0x132)](){const _0x2fb36a=_0x43de35;this['_injector']['get'](C),this[_0x2fb36a(0x15b)][_0x2fb36a(0x141)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x43de35(0x17f)],'type',c['UniverInstanceType'][_0x43de35(0x120)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b[_0x43de35(0x11a)],T[_0x43de35(0x166)]),O(0x1,c[_0x43de35(0x17b)](c[_0x43de35(0x12f)])),O(0x2,c[_0x43de35(0x135)])],exports[_0x43de35(0x17f)]);
|
|
1
|
+
'use strict';const _0x41c014=_0x22d0;(function(_0x1e37d4,_0x26ccfa){const _0x1d0e6a=_0x22d0,_0x4317f3=_0x1e37d4();while(!![]){try{const _0x4f29d7=parseInt(_0x1d0e6a(0x1bb))/0x1+-parseInt(_0x1d0e6a(0x192))/0x2+parseInt(_0x1d0e6a(0x173))/0x3*(parseInt(_0x1d0e6a(0x16b))/0x4)+parseInt(_0x1d0e6a(0x18b))/0x5+parseInt(_0x1d0e6a(0x155))/0x6*(-parseInt(_0x1d0e6a(0x19b))/0x7)+-parseInt(_0x1d0e6a(0x1b0))/0x8+parseInt(_0x1d0e6a(0x1b2))/0x9;if(_0x4f29d7===_0x26ccfa)break;else _0x4317f3['push'](_0x4317f3['shift']());}catch(_0x4f55d4){_0x4317f3['push'](_0x4317f3['shift']());}}}(_0x125a,0xccd48));function _0x22d0(_0x481412,_0x24ba67){const _0x125aa7=_0x125a();return _0x22d0=function(_0x22d0e4,_0x17f954){_0x22d0e4=_0x22d0e4-0x14a;let _0x383db2=_0x125aa7[_0x22d0e4];return _0x383db2;},_0x22d0(_0x481412,_0x24ba67);}Object[_0x41c014(0x1ac)](exports,Symbol[_0x41c014(0x171)],{'value':_0x41c014(0x1c2)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x41c014(0x16d)),c=require(_0x41c014(0x16f)),j=require(_0x41c014(0x150)),M=require(_0x41c014(0x194)),w=require(_0x41c014(0x163)),P=require('@univerjs/network'),U=_0x41c014(0x1a2);function _0x125a(){const _0x200251=['filter','/universer-api/user/list','Disposable','forEach','solved','content','code','UniverLicensePlugin','commentUpdate$','length','get','rxjs','parentId','Injector','rangeType','pluginName','type','updateComment','reply','236FhVwTU','CollaborationSessionService','@univerjs-pro/license','Reply','@univerjs/core','Add','toStringTag','_threadCommentModel','6354YCZkWV','post','parse','error','_init','_sessionService','pipe','ThreadCommentModel','personId','Delete','getUnit','syncUpdateMutationToColla','requireSession','Edit','CustomRangeType','_initDataSource','onReady','UserManagerService','customRanges','getCurrentUser','/reply','/delete','createTimestamp','setConfig','3539455OgCRUt','dataSource','YYYY/MM/DD\x20HH:mm','rangeId','Inject','root','subscribe','1583086eIndCs','_commentService','@univerjs/thread-comment','addUser','comments','replyId','UNRECOGNIZED','Solve','Solved','35VssbSX','_httpService','_initUserSync','/solved','getOwnPropertyDescriptor','merge','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverInstanceType','_threadCommentDataSourceService','users','_userService','disposeWithMe','threadId','symbol','format','HTTPService','defineProperty','payload','dayjs','OpenOrReOpen','9860760NmzBRJ','getMemberID','19298070IPDPZC','userID','UniverThreadCommentDataSourcePlugin','stringify','size','_threadCommentDataSource','onStarting','CommentService','slice','624364cAldct','_injector','userId','getComment','IThreadCommentDataSourceService','COMMENT','map','Module','add','comment','user','resolved','Unknown','_config','/universer-api/comment/unit/','resolveComment','@univerjs/thread-comment-ui','body','values','/add','_configService','885990YImPae','replies','find'];_0x125a=function(){return _0x200251;};return _0x125a();}var I=(_0x199818=>(_0x199818[_0x199818[_0x41c014(0x1af)]=0x0]='OpenOrReOpen',_0x199818[_0x199818[_0x41c014(0x19a)]=0x1]=_0x41c014(0x19a),_0x199818[_0x199818[_0x41c014(0x198)]=-0x1]=_0x41c014(0x198),_0x199818))(I||{}),v=(_0x7c0828=>(_0x7c0828[_0x7c0828[_0x41c014(0x14c)]=0x0]=_0x41c014(0x14c),_0x7c0828[_0x7c0828[_0x41c014(0x170)]=0x1]=_0x41c014(0x170),_0x7c0828[_0x7c0828[_0x41c014(0x16e)]=0x2]='Reply',_0x7c0828[_0x7c0828[_0x41c014(0x180)]=0x3]=_0x41c014(0x180),_0x7c0828[_0x7c0828[_0x41c014(0x17c)]=0x4]='Delete',_0x7c0828[_0x7c0828['Solve']=0x5]='Solve',_0x7c0828[_0x7c0828[_0x41c014(0x198)]=-0x1]=_0x41c014(0x198),_0x7c0828))(v||{});const f=_0x507f62=>c[_0x41c014(0x1ae)](new Date(+_0x507f62))[_0x41c014(0x1aa)](_0x41c014(0x18d)),R=async(_0x51bbae,_0x15bf2b)=>{const _0x21bdb8=_0x41c014,_0x342bf2=_0x51bbae['get'](c[_0x21bdb8(0x184)]),_0x1f76d8=_0x51bbae[_0x21bdb8(0x162)](P[_0x21bdb8(0x1ab)]);_0x15bf2b[_0x21bdb8(0x15b)](_0x22d1c5=>{const _0x1906b7=_0x21bdb8;_0x342bf2[_0x1906b7(0x1a1)](_0x22d1c5)&&_0x15bf2b['delete'](_0x22d1c5);}),_0x15bf2b[_0x21bdb8(0x1b6)]&&(await _0x1f76d8[_0x21bdb8(0x162)](_0x21bdb8(0x159),{'params':{'userIDs':[..._0x15bf2b]}}))[_0x21bdb8(0x151)][_0x21bdb8(0x1a5)]['forEach'](_0xae23fc=>{const _0x42cdf9=_0x21bdb8;_0xae23fc&&_0x342bf2[_0x42cdf9(0x195)](_0xae23fc);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x3ce909,_0x22ba62,_0x51fa83,_0x2cca21)=>{const _0x5c4362=_0x41c014;for(var _0x16a84e=_0x2cca21>0x1?void 0x0:_0x2cca21?$(_0x22ba62,_0x51fa83):_0x22ba62,_0x22c8a3=_0x3ce909[_0x5c4362(0x161)]-0x1,_0x1a2549;_0x22c8a3>=0x0;_0x22c8a3--)(_0x1a2549=_0x3ce909[_0x22c8a3])&&(_0x16a84e=_0x1a2549(_0x16a84e)||_0x16a84e);return _0x16a84e;},S=(_0x3abc32,_0x21cfc9)=>(_0x5a8014,_0x282a24)=>_0x21cfc9(_0x5a8014,_0x282a24,_0x3abc32);let p=class extends c[_0x41c014(0x15a)]{constructor(_0x3216c1,_0x3f929f,_0x3d5ad8,_0x28c2ae){const _0x144949=_0x41c014;super(),this[_0x144949(0x193)]=_0x3216c1,this[_0x144949(0x172)]=_0x3f929f,this[_0x144949(0x1a6)]=_0x3d5ad8,this[_0x144949(0x1bc)]=_0x28c2ae,this['_init'](),this[_0x144949(0x19d)]();}[_0x41c014(0x19d)](){const _0x232e4f=_0x41c014;this[_0x232e4f(0x1a7)](this[_0x232e4f(0x172)]['commentUpdate$'][_0x232e4f(0x179)](w['bufferTime'](0x10))['subscribe'](_0x2a541e=>{const _0x5e3d51=_0x232e4f,_0x1648e6=new Set();_0x2a541e[_0x5e3d51(0x15b)](_0x5c5000=>{const _0x5d95c6=_0x5e3d51;switch(_0x5c5000['type']){case _0x5d95c6(0x1c3):{const _0x578f08=_0x5c5000[_0x5d95c6(0x1ad)][_0x5d95c6(0x17b)];_0x1648e6[_0x5d95c6(0x1c3)](_0x578f08);break;}}}),R(this['_injector'],_0x1648e6);}));}[_0x41c014(0x177)](){const _0x3d5904=_0x41c014;this[_0x3d5904(0x1a7)](this[_0x3d5904(0x193)][_0x3d5904(0x160)][_0x3d5904(0x191)](async _0x529000=>{const _0x1bcaff=_0x3d5904;var _0x23d59d,_0x1ed73d,_0x1ce810,_0x1dc357;const _0x3fa509=(_0x23d59d=this[_0x1bcaff(0x172)][_0x1bcaff(0x17d)](_0x529000['unitId'])['find'](_0x5e8046=>_0x5e8046[_0x1bcaff(0x1a8)]===_0x529000[_0x1bcaff(0x1a8)]))==null?void 0x0:_0x23d59d[_0x1bcaff(0x190)];if(!_0x3fa509)return;const {unitId:_0x543b2f,subUnitId:_0x5713db}=_0x3fa509;switch(_0x529000[_0x1bcaff(0x14a)]&&this[_0x1bcaff(0x1a6)][_0x1bcaff(0x195)](_0x529000[_0x1bcaff(0x14a)]),_0x529000[_0x1bcaff(0x168)]){case v[_0x1bcaff(0x170)]:break;case v['Reply']:{this[_0x1bcaff(0x172)]['addComment'](_0x543b2f,_0x5713db,{'unitId':_0x543b2f,'subUnitId':_0x5713db,'ref':'','id':_0x529000[_0x1bcaff(0x197)],'dT':f(+_0x529000[_0x1bcaff(0x189)]),'threadId':_0x529000[_0x1bcaff(0x1a8)],'personId':(_0x1ce810=(_0x1ed73d=_0x529000[_0x1bcaff(0x14a)])==null?void 0x0:_0x1ed73d['userID'])!=null?_0x1ce810:_0x529000[_0x1bcaff(0x1bd)],'text':JSON['parse'](_0x529000[_0x1bcaff(0x15d)]),'parentId':_0x3fa509['id']});break;}case v['Delete']:{const _0x496354=this[_0x1bcaff(0x172)][_0x1bcaff(0x1be)](_0x543b2f,_0x5713db,_0x529000[_0x1bcaff(0x197)]);_0x496354&&_0x496354[_0x1bcaff(0x164)]&&this[_0x1bcaff(0x172)]['deleteComment'](_0x543b2f,_0x5713db,_0x529000[_0x1bcaff(0x197)]);break;}case v[_0x1bcaff(0x180)]:{this[_0x1bcaff(0x172)][_0x1bcaff(0x169)](_0x543b2f,_0x5713db,{'commentId':_0x529000['replyId'],'text':JSON[_0x1bcaff(0x175)](_0x529000['content'])});break;}case v[_0x1bcaff(0x199)]:{const _0x310b45=(_0x1dc357=this[_0x1bcaff(0x172)][_0x1bcaff(0x17d)](_0x529000['unitId'])[_0x1bcaff(0x157)](_0x48d63b=>_0x48d63b[_0x1bcaff(0x1a8)]===_0x529000[_0x1bcaff(0x1a8)]))==null?void 0x0:_0x1dc357[_0x1bcaff(0x190)];_0x310b45&&this[_0x1bcaff(0x172)][_0x1bcaff(0x14f)](_0x543b2f,_0x5713db,_0x310b45['id'],_0x529000['solved']===I[_0x1bcaff(0x19a)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x41c014(0x1b9)])),S(0x1,c[_0x41c014(0x18f)](M[_0x41c014(0x17a)])),S(0x2,c[_0x41c014(0x18f)](c[_0x41c014(0x184)])),S(0x3,c['Inject'](c[_0x41c014(0x165)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x41c014(0x19f)],x=(_0x498ca5,_0x204027,_0x1239af,_0x3650d8)=>{const _0x5248d8=_0x41c014;for(var _0x3450e1=_0x3650d8>0x1?void 0x0:_0x3650d8?A(_0x204027,_0x1239af):_0x204027,_0x5691d3=_0x498ca5[_0x5248d8(0x161)]-0x1,_0x133df5;_0x5691d3>=0x0;_0x5691d3--)(_0x133df5=_0x498ca5[_0x5691d3])&&(_0x3450e1=_0x133df5(_0x3450e1)||_0x3450e1);return _0x3450e1;},_=(_0x5d2e36,_0x2318ae)=>(_0x40495b,_0x4d378b)=>_0x2318ae(_0x40495b,_0x4d378b,_0x5d2e36);function Y(_0xa084c3,_0x1d4697){const _0x4c0e05=_0x41c014,_0xd82745=_0xa084c3[_0x4c0e05(0x156)][0x0];return{..._0x1d4697,'id':_0xd82745[_0x4c0e05(0x197)],'resolved':_0xa084c3['solved']===0x1,'dT':f(_0xd82745['createTimestamp']),'personId':_0xd82745['userId'],'threadId':_0xd82745['threadId']};}function G(_0x1f2033,_0x25816d,_0x2bb63b){const _0x116f8c=_0x41c014;var _0x3b1e08,_0x3fccb0;if(((_0x3fccb0=(_0x3b1e08=_0x1f2033==null?void 0x0:_0x1f2033['replies'])==null?void 0x0:_0x3b1e08[_0x116f8c(0x161)])!=null?_0x3fccb0:0x0)>0x0){const _0x99ee81=(_0x455770,_0xf02e1e)=>({'id':_0x455770[_0x116f8c(0x197)],'threadId':_0x455770[_0x116f8c(0x1a8)],'dT':f(_0x455770[_0x116f8c(0x189)]),'personId':_0x455770[_0x116f8c(0x1bd)],'resolved':_0x1f2033[_0x116f8c(0x15c)]===I[_0x116f8c(0x19a)],'unitId':_0x25816d,'subUnitId':_0x2bb63b,'text':JSON['parse'](_0x455770['content']),'parentId':_0xf02e1e}),_0x2a00a3=_0x99ee81(_0x1f2033[_0x116f8c(0x156)][0x0]);return{..._0x2a00a3,'children':_0x1f2033['replies'][_0x116f8c(0x1ba)](0x1)[_0x116f8c(0x1c1)](_0x4f0423=>_0x99ee81(_0x4f0423,_0x2a00a3['id']))};}return null;}let g=class{constructor(_0x10abf9,_0x252f9b,_0x169191,_0x56f9d2){const _0x5859e5=_0x41c014;this['_httpService']=_0x10abf9,this[_0x5859e5(0x1a6)]=_0x252f9b,this[_0x5859e5(0x178)]=_0x169191,this[_0x5859e5(0x1bc)]=_0x56f9d2;}async['addComment'](_0x36d9be){const _0x37c665=_0x41c014;var _0xbaf894,_0x19cb44;const {parentId:_0x3295f2,unitId:_0x119fc0,text:_0x2c3149,threadId:_0x2324aa}=_0x36d9be,_0x15accc=(_0x19cb44=(_0xbaf894=_0x2c3149[_0x37c665(0x185)])==null?void 0x0:_0xbaf894[_0x37c665(0x158)](_0xa3886c=>_0xa3886c[_0x37c665(0x166)]===c[_0x37c665(0x181)]['COMMENT'])['map'](_0xab8841=>_0xab8841[_0x37c665(0x18e)]))!=null?_0x19cb44:[],_0x3a5d1b=JSON[_0x37c665(0x1b5)](_0x2c3149),_0x599ef0=(await this[_0x37c665(0x178)][_0x37c665(0x17f)](_0x119fc0))[_0x37c665(0x1b1)]();if(_0x3295f2){const _0x56fe28={'memberId':_0x599ef0,'unitId':_0x119fc0,'content':_0x3a5d1b,'mention':_0x15accc,'threadId':_0x2324aa},_0x1b6e07=(await this['_httpService'][_0x37c665(0x174)](_0x37c665(0x14e)+_0x119fc0+_0x37c665(0x187),{'body':_0x56fe28}))['body'][_0x37c665(0x16a)];return{..._0x36d9be,'id':_0x1b6e07[_0x37c665(0x197)],'dT':c[_0x37c665(0x1ae)](+_0x1b6e07['createTimestamp'])[_0x37c665(0x1aa)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1b6e07['userId']};}else{const _0x36b3a4={'memberId':_0x599ef0,'unitId':_0x119fc0,'content':_0x3a5d1b,'mention':_0x15accc},_0x33dd74=await this[_0x37c665(0x19c)][_0x37c665(0x174)](_0x37c665(0x14e)+_0x119fc0+_0x37c665(0x153),{'body':_0x36b3a4});return Y(_0x33dd74[_0x37c665(0x151)][_0x37c665(0x1c4)],_0x36d9be);}}async[_0x41c014(0x169)](_0x4a8bcf){const _0x3c49b9=_0x41c014;var _0x4e4795,_0x12727b;const {text:_0x1607b4,unitId:_0x4f8449}=_0x4a8bcf,_0x58b6d1=(_0x12727b=(_0x4e4795=_0x1607b4[_0x3c49b9(0x185)])==null?void 0x0:_0x4e4795[_0x3c49b9(0x158)](_0x4a0a23=>_0x4a0a23[_0x3c49b9(0x166)]===c['CustomRangeType'][_0x3c49b9(0x1c0)])[_0x3c49b9(0x1c1)](_0xa331ed=>_0xa331ed[_0x3c49b9(0x18e)]))!=null?_0x12727b:[],_0x5be65c=JSON[_0x3c49b9(0x1b5)](_0x1607b4),_0x1fd60c=_0x4a8bcf[_0x3c49b9(0x1a8)],_0x5211b7=_0x4a8bcf['id'],_0x512e19={'memberId':(await this[_0x3c49b9(0x178)]['requireSession'](_0x4f8449))[_0x3c49b9(0x1b1)](),'unitId':_0x4f8449,'threadId':_0x1fd60c,'mention':_0x58b6d1,'content':_0x5be65c,'replyId':_0x5211b7},_0x4bfc8f=await this[_0x3c49b9(0x19c)][_0x3c49b9(0x174)](_0x3c49b9(0x14e)+_0x4f8449+'/edit',{'body':_0x512e19});return!_0x4bfc8f[_0x3c49b9(0x151)][_0x3c49b9(0x176)]||_0x4bfc8f[_0x3c49b9(0x151)][_0x3c49b9(0x176)]['code']===0x1;}async[_0x41c014(0x14f)](_0x2c619c){const _0x46f3ed=_0x41c014,{unitId:_0x3a36ca}=_0x2c619c,_0x599406=_0x2c619c[_0x46f3ed(0x1a8)],_0x2ec666={'memberId':this[_0x46f3ed(0x1a6)][_0x46f3ed(0x186)]()[_0x46f3ed(0x1b3)],'unitId':_0x3a36ca,'threadId':_0x599406,'solved':_0x2c619c[_0x46f3ed(0x14b)]?I[_0x46f3ed(0x19a)]:I[_0x46f3ed(0x1af)]},_0x1a279f=await this['_httpService'][_0x46f3ed(0x174)](_0x46f3ed(0x14e)+_0x3a36ca+_0x46f3ed(0x19e),{'body':_0x2ec666});return!_0x1a279f[_0x46f3ed(0x151)][_0x46f3ed(0x176)]||_0x1a279f[_0x46f3ed(0x151)]['error'][_0x46f3ed(0x15e)]===0x1;}async['deleteComment'](_0x2eb298,_0x1ee570,_0x3acc18,_0x480f6b){const _0xf6156f=_0x41c014,_0x413bd7={'memberId':(await this[_0xf6156f(0x178)]['requireSession'](_0x2eb298))['getMemberID'](),'threadId':_0x3acc18,'replyId':_0x480f6b,'unitId':_0x2eb298},_0xc04d11=await this[_0xf6156f(0x19c)]['post'](_0xf6156f(0x14e)+_0x2eb298+_0xf6156f(0x188),{'body':_0x413bd7});return!_0xc04d11['body'][_0xf6156f(0x176)]||_0xc04d11[_0xf6156f(0x151)][_0xf6156f(0x176)][_0xf6156f(0x15e)]===0x1;}async['listComments'](_0x3d7782,_0x433308,_0x21a6de){const _0x5cfe3a=_0x41c014,_0x20172b={'unitId':_0x3d7782,'threadId':_0x21a6de},_0x1f89b1=await this[_0x5cfe3a(0x19c)][_0x5cfe3a(0x174)](_0x5cfe3a(0x14e)+_0x3d7782+'/list',{'body':_0x20172b}),_0x160adb=_0x21a6de['map'](_0x17143c=>G(_0x1f89b1[_0x5cfe3a(0x151)][_0x5cfe3a(0x196)][_0x17143c],_0x3d7782,_0x433308))[_0x5cfe3a(0x158)](Boolean);return Object[_0x5cfe3a(0x152)](_0x1f89b1['body']['users'])[_0x5cfe3a(0x15b)](_0x39ee05=>{const _0x1c2d2b=_0x5cfe3a;this[_0x1c2d2b(0x1a6)][_0x1c2d2b(0x195)](_0x39ee05);}),_0x160adb;}['saveCommentToSnapshot'](_0x5783ad){const _0x45ef28=_0x41c014;return{'id':_0x5783ad['id'],'threadId':_0x5783ad[_0x45ef28(0x1a8)],'ref':_0x5783ad['ref']};}};g=x([_(0x0,c[_0x41c014(0x18f)](P[_0x41c014(0x1ab)])),_(0x1,c['Inject'](c[_0x41c014(0x184)])),_(0x2,c[_0x41c014(0x18f)](b[_0x41c014(0x16c)])),_(0x3,c[_0x41c014(0x18f)](c[_0x41c014(0x165)]))],g);var H=Object[_0x41c014(0x19f)],J=(_0x1a03ed,_0x55dcef,_0x1c2107,_0x23db9c)=>{for(var _0x78db90=_0x23db9c>0x1?void 0x0:_0x23db9c?H(_0x55dcef,_0x1c2107):_0x55dcef,_0x5ef9d0=_0x1a03ed['length']-0x1,_0x56402f;_0x5ef9d0>=0x0;_0x5ef9d0--)(_0x56402f=_0x1a03ed[_0x5ef9d0])&&(_0x78db90=_0x56402f(_0x78db90)||_0x78db90);return _0x78db90;},y=(_0x5192f2,_0x1f106a)=>(_0x3d05f4,_0x1435a8)=>_0x1f106a(_0x3d05f4,_0x1435a8,_0x5192f2);let C=class extends c[_0x41c014(0x15a)]{constructor(_0x52a629,_0x59e22a){const _0x544cb2=_0x41c014;super(),this[_0x544cb2(0x1a4)]=_0x52a629,this[_0x544cb2(0x1b7)]=_0x59e22a,this[_0x544cb2(0x182)]();}[_0x41c014(0x182)](){const _0xbe1c3a=_0x41c014;this['_threadCommentDataSourceService'][_0xbe1c3a(0x18c)]=this[_0xbe1c3a(0x1b7)],this[_0xbe1c3a(0x1a4)][_0xbe1c3a(0x17e)]=!0x1;}};C=J([y(0x0,M[_0x41c014(0x1bf)]),y(0x1,c[_0x41c014(0x18f)](g))],C);var F=Object[_0x41c014(0x1ac)],L=Object[_0x41c014(0x19f)],Z=(_0x2c9cde,_0x5e414e,_0x1ce9c9)=>_0x5e414e in _0x2c9cde?F(_0x2c9cde,_0x5e414e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1ce9c9}):_0x2c9cde[_0x5e414e]=_0x1ce9c9,W=(_0xdeb7f6,_0xbeba82,_0x21fad7,_0x93be8a)=>{for(var _0x5c1bea=_0x93be8a>0x1?void 0x0:_0x93be8a?L(_0xbeba82,_0x21fad7):_0xbeba82,_0x322f91=_0xdeb7f6['length']-0x1,_0x235dc2;_0x322f91>=0x0;_0x322f91--)(_0x235dc2=_0xdeb7f6[_0x322f91])&&(_0x5c1bea=_0x235dc2(_0x5c1bea)||_0x5c1bea);return _0x5c1bea;},O=(_0x25785c,_0x3c455f)=>(_0x312a4c,_0x44985c)=>_0x3c455f(_0x312a4c,_0x44985c,_0x25785c),N=(_0x3abfdc,_0x2495d2,_0x2451b4)=>Z(_0x3abfdc,typeof _0x2495d2!=_0x41c014(0x1a9)?_0x2495d2+'':_0x2495d2,_0x2451b4);exports[_0x41c014(0x1b4)]=class extends c['Plugin']{constructor(_0x55a6e7=D,_0x161fb7,_0x19eacb){const _0x575335=_0x41c014;super(),this[_0x575335(0x14d)]=_0x55a6e7,this['_injector']=_0x161fb7,this[_0x575335(0x154)]=_0x19eacb;const {..._0x3104a9}=c[_0x575335(0x1a0)]({},D,this['_config']);this[_0x575335(0x154)][_0x575335(0x18a)](q,_0x3104a9);}[_0x41c014(0x1b8)](){[[g],[C],[p]]['forEach'](_0x4c9ae0=>{this['_injector']['add'](_0x4c9ae0);});}[_0x41c014(0x183)](){const _0x3a2a53=_0x41c014;this[_0x3a2a53(0x1bc)][_0x3a2a53(0x162)](C),this[_0x3a2a53(0x1bc)][_0x3a2a53(0x162)](p);}},N(exports[_0x41c014(0x1b4)],_0x41c014(0x167),U),N(exports[_0x41c014(0x1b4)],'type',c[_0x41c014(0x1a3)]['UNIVER_UNKNOWN']),exports[_0x41c014(0x1b4)]=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x41c014(0x15f)]),O(0x1,c[_0x41c014(0x18f)](c['Injector'])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x13c3d9=_0x1f7a;(function(_0x4ed8d7,_0x1548a6){const _0x431f6b=_0x1f7a,_0x15e302=_0x4ed8d7();while(!![]){try{const _0x5afb94=parseInt(_0x431f6b(0x18a))/0x1+-parseInt(_0x431f6b(0x161))/0x2*(-parseInt(_0x431f6b(0x1ae))/0x3)+-parseInt(_0x431f6b(0x1b9))/0x4+parseInt(_0x431f6b(0x1b7))/0x5+-parseInt(_0x431f6b(0x1aa))/0x6+parseInt(_0x431f6b(0x19c))/0x7*(-parseInt(_0x431f6b(0x1ab))/0x8)+parseInt(_0x431f6b(0x173))/0x9;if(_0x5afb94===_0x1548a6)break;else _0x15e302['push'](_0x15e302['shift']());}catch(_0x340034){_0x15e302['push'](_0x15e302['shift']());}}}(_0x47de,0xc8e49));import{CommentService as _0x2c934f,CollaborationSessionService as _0x1a8f5d,UniverCollaborationClientPlugin as _0x16df65}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x237eea}from'@univerjs-pro/license';import{dayjs as _0x557c68,UserManagerService as _0x583a05,Inject as _0x2e04ee,Injector as _0x11dcec,Disposable as _0x9427da,CustomRangeType as _0x547673,UniverInstanceType as _0x13aaa0,DependentOn as _0x3f4f9d,IConfigService as _0x194b3f,Plugin as _0x292764,merge as _0x3b1dff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3910bf}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1dc95e,IThreadCommentDataSourceService as _0x4366cf}from'@univerjs/thread-comment';import{bufferTime as _0x4c388f}from'rxjs';import{HTTPService as _0x468171}from'@univerjs/network';const W=_0x13c3d9(0x189);var I=(_0x28569d=>(_0x28569d[_0x28569d[_0x13c3d9(0x17e)]=0x0]=_0x13c3d9(0x17e),_0x28569d[_0x28569d[_0x13c3d9(0x191)]=0x1]=_0x13c3d9(0x191),_0x28569d[_0x28569d[_0x13c3d9(0x1a6)]=-0x1]='UNRECOGNIZED',_0x28569d))(I||{}),v=(_0x4dcb82=>(_0x4dcb82[_0x4dcb82[_0x13c3d9(0x19b)]=0x0]=_0x13c3d9(0x19b),_0x4dcb82[_0x4dcb82[_0x13c3d9(0x194)]=0x1]='Add',_0x4dcb82[_0x4dcb82['Reply']=0x2]=_0x13c3d9(0x18c),_0x4dcb82[_0x4dcb82[_0x13c3d9(0x19a)]=0x3]=_0x13c3d9(0x19a),_0x4dcb82[_0x4dcb82[_0x13c3d9(0x174)]=0x4]='Delete',_0x4dcb82[_0x4dcb82[_0x13c3d9(0x15e)]=0x5]=_0x13c3d9(0x15e),_0x4dcb82[_0x4dcb82[_0x13c3d9(0x1a6)]=-0x1]=_0x13c3d9(0x1a6),_0x4dcb82))(v||{});const D=_0xbd4eb3=>_0x557c68(new Date(+_0xbd4eb3))['format'](_0x13c3d9(0x18d)),B=async(_0xa60b83,_0x25b454)=>{const _0x151990=_0x13c3d9,_0x58cd82=_0xa60b83['get'](_0x583a05),_0x5c0441=_0xa60b83[_0x151990(0x180)](_0x468171);_0x25b454[_0x151990(0x1b8)](_0x13c772=>{const _0x10379d=_0x151990;_0x58cd82[_0x10379d(0x179)](_0x13c772)&&_0x25b454[_0x10379d(0x169)](_0x13c772);}),_0x25b454[_0x151990(0x1b5)]&&(await _0x5c0441['get'](_0x151990(0x1a0),{'params':{'userIDs':[..._0x25b454]}}))[_0x151990(0x1bb)][_0x151990(0x1a4)][_0x151990(0x1b8)](_0x3fc04c=>{const _0x582281=_0x151990;_0x3fc04c&&_0x58cd82[_0x582281(0x1b6)](_0x3fc04c);});};function _0x1f7a(_0x26020b,_0x1fa16d){const _0x47defc=_0x47de();return _0x1f7a=function(_0x1f7a0f,_0x47af48){_0x1f7a0f=_0x1f7a0f-0x159;let _0x5e88db=_0x47defc[_0x1f7a0f];return _0x5e88db;},_0x1f7a(_0x26020b,_0x1fa16d);}var K=Object[_0x13c3d9(0x16b)],V=(_0x3951aa,_0x6cee0,_0x325766,_0x26b0b2)=>{const _0x52cc57=_0x13c3d9;for(var _0xf82e1b=_0x26b0b2>0x1?void 0x0:_0x26b0b2?K(_0x6cee0,_0x325766):_0x6cee0,_0x4a0f80=_0x3951aa[_0x52cc57(0x15f)]-0x1,_0xf85993;_0x4a0f80>=0x0;_0x4a0f80--)(_0xf85993=_0x3951aa[_0x4a0f80])&&(_0xf82e1b=_0xf85993(_0xf82e1b)||_0xf82e1b);return _0xf82e1b;},p=(_0x46eac1,_0x24c6c7)=>(_0x5ca751,_0x1cc803)=>_0x24c6c7(_0x5ca751,_0x1cc803,_0x46eac1);let S=class extends _0x9427da{constructor(_0x4ab9f9,_0x24d719,_0x2115f4,_0x4bb72b){const _0x20155a=_0x13c3d9;super(),this[_0x20155a(0x159)]=_0x4ab9f9,this[_0x20155a(0x17c)]=_0x24d719,this['_userService']=_0x2115f4,this[_0x20155a(0x193)]=_0x4bb72b,this[_0x20155a(0x16a)](),this[_0x20155a(0x19d)]();}[_0x13c3d9(0x19d)](){const _0x16a772=_0x13c3d9;this[_0x16a772(0x1a2)](this[_0x16a772(0x17c)]['commentUpdate$']['pipe'](_0x4c388f(0x10))[_0x16a772(0x175)](_0x5444bc=>{const _0x4c064e=_0x16a772,_0x4d260f=new Set();_0x5444bc[_0x4c064e(0x1b8)](_0x36efa7=>{const _0xdee37c=_0x4c064e;switch(_0x36efa7['type']){case _0xdee37c(0x186):{const _0x2452e4=_0x36efa7[_0xdee37c(0x1b0)][_0xdee37c(0x188)];_0x4d260f['add'](_0x2452e4);break;}}}),B(this['_injector'],_0x4d260f);}));}[_0x13c3d9(0x16a)](){const _0x128840=_0x13c3d9;this[_0x128840(0x1a2)](this[_0x128840(0x159)][_0x128840(0x1bc)][_0x128840(0x175)](async _0xcccfed=>{const _0xb50b5e=_0x128840;var _0x22030b,_0x4fd26e,_0x15e64c,_0x2845a2;const _0x18e939=(_0x22030b=this[_0xb50b5e(0x17c)][_0xb50b5e(0x18b)](_0xcccfed['unitId'])[_0xb50b5e(0x160)](_0xfd24d3=>_0xfd24d3[_0xb50b5e(0x162)]===_0xcccfed['threadId']))==null?void 0x0:_0x22030b[_0xb50b5e(0x167)];if(!_0x18e939)return;const {unitId:_0x45ac15,subUnitId:_0x5c6377}=_0x18e939;switch(_0xcccfed['user']&&this[_0xb50b5e(0x192)][_0xb50b5e(0x1b6)](_0xcccfed[_0xb50b5e(0x170)]),_0xcccfed[_0xb50b5e(0x164)]){case v[_0xb50b5e(0x194)]:break;case v[_0xb50b5e(0x18c)]:{this[_0xb50b5e(0x17c)][_0xb50b5e(0x16f)](_0x45ac15,_0x5c6377,{'unitId':_0x45ac15,'subUnitId':_0x5c6377,'ref':'','id':_0xcccfed[_0xb50b5e(0x1ba)],'dT':D(+_0xcccfed[_0xb50b5e(0x172)]),'threadId':_0xcccfed[_0xb50b5e(0x162)],'personId':(_0x15e64c=(_0x4fd26e=_0xcccfed[_0xb50b5e(0x170)])==null?void 0x0:_0x4fd26e['userID'])!=null?_0x15e64c:_0xcccfed[_0xb50b5e(0x17d)],'text':JSON[_0xb50b5e(0x166)](_0xcccfed[_0xb50b5e(0x1a8)]),'parentId':_0x18e939['id']});break;}case v['Delete']:{const _0x297496=this[_0xb50b5e(0x17c)]['getComment'](_0x45ac15,_0x5c6377,_0xcccfed['replyId']);_0x297496&&_0x297496['parentId']&&this[_0xb50b5e(0x17c)][_0xb50b5e(0x182)](_0x45ac15,_0x5c6377,_0xcccfed['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0xb50b5e(0x19f)](_0x45ac15,_0x5c6377,{'commentId':_0xcccfed[_0xb50b5e(0x1ba)],'text':JSON[_0xb50b5e(0x166)](_0xcccfed[_0xb50b5e(0x1a8)])});break;}case v['Solve']:{const _0x4da2fb=(_0x2845a2=this[_0xb50b5e(0x17c)][_0xb50b5e(0x18b)](_0xcccfed['unitId'])[_0xb50b5e(0x160)](_0x29fc1a=>_0x29fc1a['threadId']===_0xcccfed['threadId']))==null?void 0x0:_0x2845a2['root'];_0x4da2fb&&this[_0xb50b5e(0x17c)][_0xb50b5e(0x187)](_0x45ac15,_0x5c6377,_0x4da2fb['id'],_0xcccfed[_0xb50b5e(0x171)]===I[_0xb50b5e(0x191)]);break;}}}));}};S=V([p(0x0,_0x2e04ee(_0x2c934f)),p(0x1,_0x2e04ee(_0x1dc95e)),p(0x2,_0x2e04ee(_0x583a05)),p(0x3,_0x2e04ee(_0x11dcec))],S);const z=_0x13c3d9(0x16d),M={};var k=Object[_0x13c3d9(0x16b)],Q=(_0xdb34a9,_0x536a52,_0x2fa342,_0xff8b96)=>{const _0x4c7e7e=_0x13c3d9;for(var _0x47262f=_0xff8b96>0x1?void 0x0:_0xff8b96?k(_0x536a52,_0x2fa342):_0x536a52,_0x5bac06=_0xdb34a9[_0x4c7e7e(0x15f)]-0x1,_0x401592;_0x5bac06>=0x0;_0x5bac06--)(_0x401592=_0xdb34a9[_0x5bac06])&&(_0x47262f=_0x401592(_0x47262f)||_0x47262f);return _0x47262f;},_=(_0x52befc,_0x186154)=>(_0x21e84a,_0x206526)=>_0x186154(_0x21e84a,_0x206526,_0x52befc);function _0x47de(){const _0x5a6842=['/list','size','addUser','5896755vDkePv','forEach','6409424uGZcnb','replyId','body','commentUpdate$','getCurrentUser','ref','_commentService','/edit','resolved','symbol','COMMENT','Solve','length','find','23558KxZbWm','threadId','reply','type','userID','parse','root','/add','delete','_init','getOwnPropertyDescriptor','_configService','thread-comment-data-source.config','replies','addComment','user','solved','createTimestamp','21122352tEvcRL','Delete','subscribe','pluginName','_threadCommentDataSource','filter','getUser','map','/reply','_threadCommentModel','userId','OpenOrReOpen','/universer-api/comment/unit/','get','_sessionService','deleteComment','saveCommentToSnapshot','listComments','_httpService','add','resolveComment','personId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','855490ljkGKX','getUnit','Reply','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','dataSource','onStarting','Solved','_userService','_injector','Add','requireSession','syncUpdateMutationToColla','onReady','comments','rangeId','Edit','Unknown','217DAtJwE','_initUserSync','stringify','updateComment','/universer-api/user/list','code','disposeWithMe','post','users','rangeType','UNRECOGNIZED','defineProperty','content','slice','5228742sTOkEP','298264jxDHzF','format','getMemberID','18UPYafB','/delete','payload','customRanges','error','_initDataSource'];_0x47de=function(){return _0x5a6842;};return _0x47de();}function X(_0x24ce99,_0x25cec6){const _0x4bb7f0=_0x13c3d9,_0x5b4d6a=_0x24ce99[_0x4bb7f0(0x16e)][0x0];return{..._0x25cec6,'id':_0x5b4d6a[_0x4bb7f0(0x1ba)],'resolved':_0x24ce99['solved']===0x1,'dT':D(_0x5b4d6a[_0x4bb7f0(0x172)]),'personId':_0x5b4d6a[_0x4bb7f0(0x17d)],'threadId':_0x5b4d6a['threadId']};}function ee(_0x20e1e3,_0x590ef1,_0x556137){const _0x4cbfc8=_0x13c3d9;var _0x4ef7fe,_0x538691;if(((_0x538691=(_0x4ef7fe=_0x20e1e3==null?void 0x0:_0x20e1e3['replies'])==null?void 0x0:_0x4ef7fe['length'])!=null?_0x538691:0x0)>0x0){const _0x501990=(_0x305557,_0x27fc88)=>({'id':_0x305557[_0x4cbfc8(0x1ba)],'threadId':_0x305557[_0x4cbfc8(0x162)],'dT':D(_0x305557[_0x4cbfc8(0x172)]),'personId':_0x305557[_0x4cbfc8(0x17d)],'resolved':_0x20e1e3[_0x4cbfc8(0x171)]===I[_0x4cbfc8(0x191)],'unitId':_0x590ef1,'subUnitId':_0x556137,'text':JSON['parse'](_0x305557['content']),'parentId':_0x27fc88}),_0x432053=_0x501990(_0x20e1e3[_0x4cbfc8(0x16e)][0x0]);return{..._0x432053,'children':_0x20e1e3['replies'][_0x4cbfc8(0x1a9)](0x1)[_0x4cbfc8(0x17a)](_0x33448f=>_0x501990(_0x33448f,_0x432053['id']))};}return null;}let f=class{constructor(_0x4e8625,_0x5c246a,_0x5d9300,_0x554242){const _0xc244fe=_0x13c3d9;this['_httpService']=_0x4e8625,this['_userService']=_0x5c246a,this[_0xc244fe(0x181)]=_0x5d9300,this[_0xc244fe(0x193)]=_0x554242;}async[_0x13c3d9(0x16f)](_0x3f7f59){const _0x55e224=_0x13c3d9;var _0x28d8f6,_0x40dec9;const {parentId:_0x34a06f,unitId:_0x2d38e8,text:_0x128f83,threadId:_0x2c6625}=_0x3f7f59,_0x5bd4f7=(_0x40dec9=(_0x28d8f6=_0x128f83[_0x55e224(0x1b1)])==null?void 0x0:_0x28d8f6['filter'](_0x265f3d=>_0x265f3d['rangeType']===_0x547673['COMMENT'])[_0x55e224(0x17a)](_0x34e026=>_0x34e026[_0x55e224(0x199)]))!=null?_0x40dec9:[],_0x5a82a4=JSON[_0x55e224(0x19e)](_0x128f83),_0x48437e=(await this[_0x55e224(0x181)]['requireSession'](_0x2d38e8))[_0x55e224(0x1ad)]();if(_0x34a06f){const _0x99bc31={'memberId':_0x48437e,'unitId':_0x2d38e8,'content':_0x5a82a4,'mention':_0x5bd4f7,'threadId':_0x2c6625},_0x250919=(await this[_0x55e224(0x185)][_0x55e224(0x1a3)](_0x55e224(0x17f)+_0x2d38e8+_0x55e224(0x17b),{'body':_0x99bc31}))[_0x55e224(0x1bb)][_0x55e224(0x163)];return{..._0x3f7f59,'id':_0x250919[_0x55e224(0x1ba)],'dT':_0x557c68(+_0x250919[_0x55e224(0x172)])[_0x55e224(0x1ac)](_0x55e224(0x18d)),'personId':_0x250919[_0x55e224(0x17d)]};}else{const _0x3b11eb={'memberId':_0x48437e,'unitId':_0x2d38e8,'content':_0x5a82a4,'mention':_0x5bd4f7},_0x5a385c=await this[_0x55e224(0x185)][_0x55e224(0x1a3)](_0x55e224(0x17f)+_0x2d38e8+_0x55e224(0x168),{'body':_0x3b11eb});return X(_0x5a385c[_0x55e224(0x1bb)]['comment'],_0x3f7f59);}}async[_0x13c3d9(0x19f)](_0x149dbb){const _0x3169bb=_0x13c3d9;var _0x16bce0,_0x85e0fa;const {text:_0x1626f1,unitId:_0x2ccf66}=_0x149dbb,_0x2afb95=(_0x85e0fa=(_0x16bce0=_0x1626f1[_0x3169bb(0x1b1)])==null?void 0x0:_0x16bce0[_0x3169bb(0x178)](_0x5a1939=>_0x5a1939[_0x3169bb(0x1a5)]===_0x547673[_0x3169bb(0x15d)])[_0x3169bb(0x17a)](_0x1be393=>_0x1be393[_0x3169bb(0x199)]))!=null?_0x85e0fa:[],_0x295e13=JSON[_0x3169bb(0x19e)](_0x1626f1),_0x47b53a=_0x149dbb[_0x3169bb(0x162)],_0x549837=_0x149dbb['id'],_0x5d7fb3={'memberId':(await this[_0x3169bb(0x181)][_0x3169bb(0x195)](_0x2ccf66))[_0x3169bb(0x1ad)](),'unitId':_0x2ccf66,'threadId':_0x47b53a,'mention':_0x2afb95,'content':_0x295e13,'replyId':_0x549837},_0x255e1e=await this[_0x3169bb(0x185)][_0x3169bb(0x1a3)]('/universer-api/comment/unit/'+_0x2ccf66+_0x3169bb(0x15a),{'body':_0x5d7fb3});return!_0x255e1e['body'][_0x3169bb(0x1b2)]||_0x255e1e['body']['error']['code']===0x1;}async[_0x13c3d9(0x187)](_0x5034b2){const _0x549165=_0x13c3d9,{unitId:_0x555eab}=_0x5034b2,_0x2b91b5=_0x5034b2[_0x549165(0x162)],_0x1083a4={'memberId':this[_0x549165(0x192)][_0x549165(0x1bd)]()[_0x549165(0x165)],'unitId':_0x555eab,'threadId':_0x2b91b5,'solved':_0x5034b2[_0x549165(0x15b)]?I[_0x549165(0x191)]:I['OpenOrReOpen']},_0x1edcc8=await this[_0x549165(0x185)][_0x549165(0x1a3)](_0x549165(0x17f)+_0x555eab+'/solved',{'body':_0x1083a4});return!_0x1edcc8[_0x549165(0x1bb)]['error']||_0x1edcc8[_0x549165(0x1bb)][_0x549165(0x1b2)][_0x549165(0x1a1)]===0x1;}async[_0x13c3d9(0x182)](_0x564d19,_0x20bd13,_0x4ae960,_0x546cc2){const _0x1e5c1e=_0x13c3d9,_0x3704ce={'memberId':(await this[_0x1e5c1e(0x181)][_0x1e5c1e(0x195)](_0x564d19))[_0x1e5c1e(0x1ad)](),'threadId':_0x4ae960,'replyId':_0x546cc2,'unitId':_0x564d19},_0x2ee176=await this[_0x1e5c1e(0x185)]['post'](_0x1e5c1e(0x17f)+_0x564d19+_0x1e5c1e(0x1af),{'body':_0x3704ce});return!_0x2ee176['body'][_0x1e5c1e(0x1b2)]||_0x2ee176[_0x1e5c1e(0x1bb)][_0x1e5c1e(0x1b2)][_0x1e5c1e(0x1a1)]===0x1;}async[_0x13c3d9(0x184)](_0x30643d,_0x2afaf5,_0xbb66e0){const _0xa6e8be=_0x13c3d9,_0x38dcbe={'unitId':_0x30643d,'threadId':_0xbb66e0},_0x16d47f=await this[_0xa6e8be(0x185)][_0xa6e8be(0x1a3)](_0xa6e8be(0x17f)+_0x30643d+_0xa6e8be(0x1b4),{'body':_0x38dcbe}),_0x1d1054=_0xbb66e0['map'](_0x4a6116=>ee(_0x16d47f['body'][_0xa6e8be(0x198)][_0x4a6116],_0x30643d,_0x2afaf5))[_0xa6e8be(0x178)](Boolean);return Object['values'](_0x16d47f['body'][_0xa6e8be(0x1a4)])[_0xa6e8be(0x1b8)](_0x55a5e8=>{const _0x20affa=_0xa6e8be;this['_userService'][_0x20affa(0x1b6)](_0x55a5e8);}),_0x1d1054;}[_0x13c3d9(0x183)](_0x78275e){const _0x405ced=_0x13c3d9;return{'id':_0x78275e['id'],'threadId':_0x78275e['threadId'],'ref':_0x78275e[_0x405ced(0x1be)]};}};f=Q([_(0x0,_0x2e04ee(_0x468171)),_(0x1,_0x2e04ee(_0x583a05)),_(0x2,_0x2e04ee(_0x1a8f5d)),_(0x3,_0x2e04ee(_0x11dcec))],f);var re=Object[_0x13c3d9(0x16b)],te=(_0x28bd81,_0xa5147a,_0x2f2566,_0x16ac68)=>{const _0x480083=_0x13c3d9;for(var _0x35d15b=_0x16ac68>0x1?void 0x0:_0x16ac68?re(_0xa5147a,_0x2f2566):_0xa5147a,_0x5aadb1=_0x28bd81[_0x480083(0x15f)]-0x1,_0x420851;_0x5aadb1>=0x0;_0x5aadb1--)(_0x420851=_0x28bd81[_0x5aadb1])&&(_0x35d15b=_0x420851(_0x35d15b)||_0x35d15b);return _0x35d15b;},N=(_0x10d84d,_0x38d699)=>(_0x3d3604,_0x2a265b)=>_0x38d699(_0x3d3604,_0x2a265b,_0x10d84d);let g=class extends _0x9427da{constructor(_0x1139ec,_0x41f04c){const _0x3b5c8c=_0x13c3d9;super(),this[_0x3b5c8c(0x18e)]=_0x1139ec,this['_threadCommentDataSource']=_0x41f04c,this[_0x3b5c8c(0x1b3)]();}[_0x13c3d9(0x1b3)](){const _0x25e838=_0x13c3d9;this['_threadCommentDataSourceService'][_0x25e838(0x18f)]=this[_0x25e838(0x177)],this[_0x25e838(0x18e)][_0x25e838(0x196)]=!0x1;}};g=te([N(0x0,_0x4366cf),N(0x1,_0x2e04ee(f))],g);var se=Object[_0x13c3d9(0x1a7)],oe=Object[_0x13c3d9(0x16b)],ne=(_0x5ad281,_0x2f1b6e,_0x4c2f12)=>_0x2f1b6e in _0x5ad281?se(_0x5ad281,_0x2f1b6e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c2f12}):_0x5ad281[_0x2f1b6e]=_0x4c2f12,ie=(_0x22ef7f,_0x499d25,_0x44cf9a,_0x60f26)=>{for(var _0x1c08ca=_0x60f26>0x1?void 0x0:_0x60f26?oe(_0x499d25,_0x44cf9a):_0x499d25,_0x1b190b=_0x22ef7f['length']-0x1,_0x30f278;_0x1b190b>=0x0;_0x1b190b--)(_0x30f278=_0x22ef7f[_0x1b190b])&&(_0x1c08ca=_0x30f278(_0x1c08ca)||_0x1c08ca);return _0x1c08ca;},w=(_0x1121f4,_0x55e0eb)=>(_0x43d869,_0x429b4a)=>_0x55e0eb(_0x43d869,_0x429b4a,_0x1121f4),$=(_0x8a6448,_0x4493d2,_0x5998b7)=>ne(_0x8a6448,typeof _0x4493d2!=_0x13c3d9(0x15c)?_0x4493d2+'':_0x4493d2,_0x5998b7);let b=class extends _0x292764{constructor(_0x530d2f=M,_0xe03b19,_0x2cb324){const _0x50d2aa=_0x13c3d9;super(),this['_config']=_0x530d2f,this['_injector']=_0xe03b19,this[_0x50d2aa(0x16c)]=_0x2cb324;const {..._0x4dcfc8}=_0x3b1dff({},M,this['_config']);this[_0x50d2aa(0x16c)]['setConfig'](z,_0x4dcfc8);}[_0x13c3d9(0x190)](){[[f],[g],[S]]['forEach'](_0x1373f8=>{const _0x5746a5=_0x1f7a;this['_injector'][_0x5746a5(0x186)](_0x1373f8);});}[_0x13c3d9(0x197)](){const _0x3f6b4f=_0x13c3d9;this['_injector']['get'](g),this[_0x3f6b4f(0x193)][_0x3f6b4f(0x180)](S);}};$(b,_0x13c3d9(0x176),W),$(b,'type',_0x13aaa0['UNIVER_UNKNOWN']),b=ie([_0x3f4f9d(_0x3910bf,_0x16df65,_0x237eea),w(0x1,_0x2e04ee(_0x11dcec)),w(0x2,_0x194b3f)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x33fa(_0x1c886e,_0x452e28){const _0x49c217=_0x49c2();return _0x33fa=function(_0x33faa4,_0x321e0d){_0x33faa4=_0x33faa4-0x1d1;let _0x16ee20=_0x49c217[_0x33faa4];return _0x16ee20;},_0x33fa(_0x1c886e,_0x452e28);}const _0x30aa2c=_0x33fa;(function(_0xea9769,_0x395bf9){const _0x148eef=_0x33fa,_0x2cbc20=_0xea9769();while(!![]){try{const _0x198c31=-parseInt(_0x148eef(0x1f7))/0x1+-parseInt(_0x148eef(0x237))/0x2+-parseInt(_0x148eef(0x1ef))/0x3+parseInt(_0x148eef(0x203))/0x4+parseInt(_0x148eef(0x1da))/0x5*(parseInt(_0x148eef(0x1e5))/0x6)+-parseInt(_0x148eef(0x211))/0x7*(-parseInt(_0x148eef(0x228))/0x8)+-parseInt(_0x148eef(0x22e))/0x9*(-parseInt(_0x148eef(0x21b))/0xa);if(_0x198c31===_0x395bf9)break;else _0x2cbc20['push'](_0x2cbc20['shift']());}catch(_0x1b9a59){_0x2cbc20['push'](_0x2cbc20['shift']());}}}(_0x49c2,0x1c280));import{CommentService as _0x5b8e09,CollaborationSessionService as _0xd8c8d1,UniverCollaborationClientPlugin as _0x3ba722}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x8b69f9}from'@univerjs-pro/license';import{dayjs as _0x5bd086,UserManagerService as _0x3af105,Inject as _0x1fd388,Injector as _0x5b06f7,Disposable as _0x4634a6,CustomRangeType as _0x5e13de,UniverInstanceType as _0xf35a65,DependentOn as _0x47bcf7,IConfigService as _0x1b3fdc,Plugin as _0x4d1e38,merge as _0x5c5bd8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x558701}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x13192f,IThreadCommentDataSourceService as _0x5b38d7}from'@univerjs/thread-comment';import{bufferTime as _0x21e75e}from'rxjs';import{HTTPService as _0x1bc482}from'@univerjs/network';const W=_0x30aa2c(0x21a);var I=(_0x328aec=>(_0x328aec[_0x328aec['OpenOrReOpen']=0x0]=_0x30aa2c(0x216),_0x328aec[_0x328aec[_0x30aa2c(0x1e9)]=0x1]=_0x30aa2c(0x1e9),_0x328aec[_0x328aec[_0x30aa2c(0x213)]=-0x1]='UNRECOGNIZED',_0x328aec))(I||{}),v=(_0x159cd4=>(_0x159cd4[_0x159cd4['Unknown']=0x0]=_0x30aa2c(0x1d9),_0x159cd4[_0x159cd4['Add']=0x1]='Add',_0x159cd4[_0x159cd4[_0x30aa2c(0x1f6)]=0x2]=_0x30aa2c(0x1f6),_0x159cd4[_0x159cd4['Edit']=0x3]=_0x30aa2c(0x1e3),_0x159cd4[_0x159cd4[_0x30aa2c(0x1e7)]=0x4]=_0x30aa2c(0x1e7),_0x159cd4[_0x159cd4[_0x30aa2c(0x225)]=0x5]=_0x30aa2c(0x225),_0x159cd4[_0x159cd4['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x159cd4))(v||{});const D=_0x18fd5f=>_0x5bd086(new Date(+_0x18fd5f))[_0x30aa2c(0x226)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4b36eb,_0x25b7fa)=>{const _0x266432=_0x30aa2c,_0x3ed367=_0x4b36eb[_0x266432(0x202)](_0x3af105),_0x3cff21=_0x4b36eb['get'](_0x1bc482);_0x25b7fa[_0x266432(0x1f9)](_0x2041c5=>{const _0x3f01bd=_0x266432;_0x3ed367[_0x3f01bd(0x1e6)](_0x2041c5)&&_0x25b7fa[_0x3f01bd(0x1e2)](_0x2041c5);}),_0x25b7fa[_0x266432(0x232)]&&(await _0x3cff21[_0x266432(0x202)](_0x266432(0x222),{'params':{'userIDs':[..._0x25b7fa]}}))['body'][_0x266432(0x1de)]['forEach'](_0x3e0516=>{const _0x3f7c8e=_0x266432;_0x3e0516&&_0x3ed367[_0x3f7c8e(0x1f1)](_0x3e0516);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x229ad4,_0x38ad6c,_0x26058e,_0xd45ed1)=>{const _0xa4202f=_0x30aa2c;for(var _0x15866d=_0xd45ed1>0x1?void 0x0:_0xd45ed1?K(_0x38ad6c,_0x26058e):_0x38ad6c,_0x59acf3=_0x229ad4[_0xa4202f(0x227)]-0x1,_0xd39bc8;_0x59acf3>=0x0;_0x59acf3--)(_0xd39bc8=_0x229ad4[_0x59acf3])&&(_0x15866d=_0xd39bc8(_0x15866d)||_0x15866d);return _0x15866d;},p=(_0x37d7c9,_0x2cf06a)=>(_0x45782b,_0x7eddf1)=>_0x2cf06a(_0x45782b,_0x7eddf1,_0x37d7c9);let S=class extends _0x4634a6{constructor(_0x4f5b40,_0x28294e,_0x283e22,_0x278f8f){const _0x55c073=_0x30aa2c;super(),this[_0x55c073(0x235)]=_0x4f5b40,this[_0x55c073(0x20a)]=_0x28294e,this['_userService']=_0x283e22,this[_0x55c073(0x208)]=_0x278f8f,this[_0x55c073(0x1fb)](),this[_0x55c073(0x1d3)]();}[_0x30aa2c(0x1d3)](){const _0x137ef2=_0x30aa2c;this[_0x137ef2(0x1d7)](this[_0x137ef2(0x20a)]['commentUpdate$'][_0x137ef2(0x200)](_0x21e75e(0x10))[_0x137ef2(0x1e0)](_0x14a702=>{const _0x516aac=_0x137ef2,_0x9b35eb=new Set();_0x14a702['forEach'](_0x74f992=>{const _0xfaa96b=_0x33fa;switch(_0x74f992[_0xfaa96b(0x1fe)]){case _0xfaa96b(0x22d):{const _0x5df6b9=_0x74f992['payload'][_0xfaa96b(0x210)];_0x9b35eb[_0xfaa96b(0x22d)](_0x5df6b9);break;}}}),B(this[_0x516aac(0x208)],_0x9b35eb);}));}['_init'](){const _0x49f994=_0x30aa2c;this[_0x49f994(0x1d7)](this[_0x49f994(0x235)][_0x49f994(0x209)]['subscribe'](async _0x8e2ed2=>{const _0x1e3118=_0x49f994;var _0x4f5545,_0x38d98e,_0x279ae2,_0x204ab7;const _0x1ef2ef=(_0x4f5545=this[_0x1e3118(0x20a)][_0x1e3118(0x20b)](_0x8e2ed2[_0x1e3118(0x207)])['find'](_0x294019=>_0x294019['threadId']===_0x8e2ed2[_0x1e3118(0x1dd)]))==null?void 0x0:_0x4f5545[_0x1e3118(0x214)];if(!_0x1ef2ef)return;const {unitId:_0x2d248f,subUnitId:_0x38ffb8}=_0x1ef2ef;switch(_0x8e2ed2[_0x1e3118(0x20c)]&&this[_0x1e3118(0x236)][_0x1e3118(0x1f1)](_0x8e2ed2['user']),_0x8e2ed2[_0x1e3118(0x1fe)]){case v[_0x1e3118(0x218)]:break;case v[_0x1e3118(0x1f6)]:{this[_0x1e3118(0x20a)][_0x1e3118(0x206)](_0x2d248f,_0x38ffb8,{'unitId':_0x2d248f,'subUnitId':_0x38ffb8,'ref':'','id':_0x8e2ed2[_0x1e3118(0x233)],'dT':D(+_0x8e2ed2[_0x1e3118(0x230)]),'threadId':_0x8e2ed2[_0x1e3118(0x1dd)],'personId':(_0x279ae2=(_0x38d98e=_0x8e2ed2['user'])==null?void 0x0:_0x38d98e[_0x1e3118(0x1e1)])!=null?_0x279ae2:_0x8e2ed2['userId'],'text':JSON['parse'](_0x8e2ed2['content']),'parentId':_0x1ef2ef['id']});break;}case v[_0x1e3118(0x1e7)]:{const _0x4094dc=this['_threadCommentModel'][_0x1e3118(0x1ee)](_0x2d248f,_0x38ffb8,_0x8e2ed2['replyId']);_0x4094dc&&_0x4094dc[_0x1e3118(0x21c)]&&this['_threadCommentModel'][_0x1e3118(0x1f0)](_0x2d248f,_0x38ffb8,_0x8e2ed2[_0x1e3118(0x233)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x2d248f,_0x38ffb8,{'commentId':_0x8e2ed2['replyId'],'text':JSON[_0x1e3118(0x1e8)](_0x8e2ed2[_0x1e3118(0x1fd)])});break;}case v[_0x1e3118(0x225)]:{const _0x3e64cb=(_0x204ab7=this[_0x1e3118(0x20a)][_0x1e3118(0x20b)](_0x8e2ed2[_0x1e3118(0x207)])['find'](_0x4cc301=>_0x4cc301[_0x1e3118(0x1dd)]===_0x8e2ed2[_0x1e3118(0x1dd)]))==null?void 0x0:_0x204ab7[_0x1e3118(0x214)];_0x3e64cb&&this[_0x1e3118(0x20a)][_0x1e3118(0x1d5)](_0x2d248f,_0x38ffb8,_0x3e64cb['id'],_0x8e2ed2[_0x1e3118(0x224)]===I['Solved']);break;}}}));}};function _0x49c2(){const _0x3e4d8c=['setConfig','36MBqhEh','getUser','Delete','parse','Solved','customRanges','requireSession','syncUpdateMutationToColla','dataSource','getComment','508095QTzfWw','deleteComment','addUser','_sessionService','getOwnPropertyDescriptor','pluginName','getMemberID','Reply','7605ZlRMNG','filter','forEach','/add','_init','error','content','type','/reply','pipe','/edit','get','309716lcNqIX','updateComment','comments','addComment','unitId','_injector','commentUpdate$','_threadCommentModel','getUnit','user','post','_threadCommentDataSourceService','COMMENT','personId','63007xniidS','body','UNRECOGNIZED','root','/solved','OpenOrReOpen','userId','Add','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','870OlNaja','parentId','resolved','stringify','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','reply','/universer-api/user/list','/delete','solved','Solve','format','length','184PCXqFt','ref','code','slice','_httpService','add','9Cnehpw','_initDataSource','createTimestamp','getCurrentUser','size','replyId','_config','_commentService','_userService','81214sgLcyk','saveCommentToSnapshot','replies','_initUserSync','_configService','resolveComment','comment','disposeWithMe','onStarting','Unknown','40305Thmsbb','map','rangeId','threadId','users','/list','subscribe','userID','delete','Edit'];_0x49c2=function(){return _0x3e4d8c;};return _0x49c2();}S=V([p(0x0,_0x1fd388(_0x5b8e09)),p(0x1,_0x1fd388(_0x13192f)),p(0x2,_0x1fd388(_0x3af105)),p(0x3,_0x1fd388(_0x5b06f7))],S);const z=_0x30aa2c(0x219),M={};var k=Object[_0x30aa2c(0x1f3)],Q=(_0x3bef0a,_0x5948c2,_0x28126e,_0x20e286)=>{const _0x190324=_0x30aa2c;for(var _0xf30e92=_0x20e286>0x1?void 0x0:_0x20e286?k(_0x5948c2,_0x28126e):_0x5948c2,_0x64c676=_0x3bef0a[_0x190324(0x227)]-0x1,_0x2dc079;_0x64c676>=0x0;_0x64c676--)(_0x2dc079=_0x3bef0a[_0x64c676])&&(_0xf30e92=_0x2dc079(_0xf30e92)||_0xf30e92);return _0xf30e92;},_=(_0x24df89,_0x43b634)=>(_0xf077cc,_0x1f7a25)=>_0x43b634(_0xf077cc,_0x1f7a25,_0x24df89);function X(_0x12d678,_0x1a1cbc){const _0x56a841=_0x30aa2c,_0x23d881=_0x12d678[_0x56a841(0x1d2)][0x0];return{..._0x1a1cbc,'id':_0x23d881[_0x56a841(0x233)],'resolved':_0x12d678[_0x56a841(0x224)]===0x1,'dT':D(_0x23d881[_0x56a841(0x230)]),'personId':_0x23d881[_0x56a841(0x217)],'threadId':_0x23d881[_0x56a841(0x1dd)]};}function ee(_0x574e4a,_0x500a84,_0x31b910){const _0x5357e8=_0x30aa2c;var _0xeb5dc5,_0x4fc02b;if(((_0x4fc02b=(_0xeb5dc5=_0x574e4a==null?void 0x0:_0x574e4a['replies'])==null?void 0x0:_0xeb5dc5[_0x5357e8(0x227)])!=null?_0x4fc02b:0x0)>0x0){const _0x493e94=(_0x2b4474,_0xfc4b76)=>({'id':_0x2b4474[_0x5357e8(0x233)],'threadId':_0x2b4474[_0x5357e8(0x1dd)],'dT':D(_0x2b4474[_0x5357e8(0x230)]),'personId':_0x2b4474['userId'],'resolved':_0x574e4a[_0x5357e8(0x224)]===I[_0x5357e8(0x1e9)],'unitId':_0x500a84,'subUnitId':_0x31b910,'text':JSON['parse'](_0x2b4474['content']),'parentId':_0xfc4b76}),_0x461879=_0x493e94(_0x574e4a[_0x5357e8(0x1d2)][0x0]);return{..._0x461879,'children':_0x574e4a[_0x5357e8(0x1d2)][_0x5357e8(0x22b)](0x1)['map'](_0x238aac=>_0x493e94(_0x238aac,_0x461879['id']))};}return null;}let f=class{constructor(_0x45ab42,_0x35539b,_0x561e2f,_0x21ea1f){const _0x178cac=_0x30aa2c;this[_0x178cac(0x22c)]=_0x45ab42,this[_0x178cac(0x236)]=_0x35539b,this[_0x178cac(0x1f2)]=_0x561e2f,this[_0x178cac(0x208)]=_0x21ea1f;}async[_0x30aa2c(0x206)](_0x5f068c){const _0x5a09d5=_0x30aa2c;var _0x503ef4,_0x21d2f4;const {parentId:_0x5e1f4d,unitId:_0x15f9f1,text:_0x1dcfa5,threadId:_0x3bc39e}=_0x5f068c,_0x2604b3=(_0x21d2f4=(_0x503ef4=_0x1dcfa5[_0x5a09d5(0x1ea)])==null?void 0x0:_0x503ef4['filter'](_0x1ecaf1=>_0x1ecaf1['rangeType']===_0x5e13de[_0x5a09d5(0x20f)])[_0x5a09d5(0x1db)](_0x4958a6=>_0x4958a6['rangeId']))!=null?_0x21d2f4:[],_0x5d17cb=JSON[_0x5a09d5(0x21e)](_0x1dcfa5),_0x284656=(await this[_0x5a09d5(0x1f2)][_0x5a09d5(0x1eb)](_0x15f9f1))[_0x5a09d5(0x1f5)]();if(_0x5e1f4d){const _0x2e7cda={'memberId':_0x284656,'unitId':_0x15f9f1,'content':_0x5d17cb,'mention':_0x2604b3,'threadId':_0x3bc39e},_0x198404=(await this[_0x5a09d5(0x22c)][_0x5a09d5(0x20d)](_0x5a09d5(0x21f)+_0x15f9f1+_0x5a09d5(0x1ff),{'body':_0x2e7cda}))[_0x5a09d5(0x212)][_0x5a09d5(0x221)];return{..._0x5f068c,'id':_0x198404['replyId'],'dT':_0x5bd086(+_0x198404[_0x5a09d5(0x230)])[_0x5a09d5(0x226)](_0x5a09d5(0x220)),'personId':_0x198404['userId']};}else{const _0x551ac2={'memberId':_0x284656,'unitId':_0x15f9f1,'content':_0x5d17cb,'mention':_0x2604b3},_0x1304a4=await this['_httpService'][_0x5a09d5(0x20d)](_0x5a09d5(0x21f)+_0x15f9f1+_0x5a09d5(0x1fa),{'body':_0x551ac2});return X(_0x1304a4[_0x5a09d5(0x212)][_0x5a09d5(0x1d6)],_0x5f068c);}}async[_0x30aa2c(0x204)](_0x470dbc){const _0x151804=_0x30aa2c;var _0x297ec0,_0x5c12bf;const {text:_0xdf3d4e,unitId:_0x403ddd}=_0x470dbc,_0x5dd241=(_0x5c12bf=(_0x297ec0=_0xdf3d4e[_0x151804(0x1ea)])==null?void 0x0:_0x297ec0[_0x151804(0x1f8)](_0x191e9a=>_0x191e9a['rangeType']===_0x5e13de['COMMENT'])[_0x151804(0x1db)](_0x54fdc2=>_0x54fdc2[_0x151804(0x1dc)]))!=null?_0x5c12bf:[],_0x2dd41f=JSON[_0x151804(0x21e)](_0xdf3d4e),_0x3a2fa1=_0x470dbc['threadId'],_0x2eaf43=_0x470dbc['id'],_0xc13804={'memberId':(await this[_0x151804(0x1f2)][_0x151804(0x1eb)](_0x403ddd))[_0x151804(0x1f5)](),'unitId':_0x403ddd,'threadId':_0x3a2fa1,'mention':_0x5dd241,'content':_0x2dd41f,'replyId':_0x2eaf43},_0x490816=await this['_httpService']['post'](_0x151804(0x21f)+_0x403ddd+_0x151804(0x201),{'body':_0xc13804});return!_0x490816[_0x151804(0x212)][_0x151804(0x1fc)]||_0x490816[_0x151804(0x212)][_0x151804(0x1fc)][_0x151804(0x22a)]===0x1;}async[_0x30aa2c(0x1d5)](_0x23ea3b){const _0xf79bf3=_0x30aa2c,{unitId:_0x16fd6d}=_0x23ea3b,_0x4817ab=_0x23ea3b['threadId'],_0xe12318={'memberId':this[_0xf79bf3(0x236)][_0xf79bf3(0x231)]()['userID'],'unitId':_0x16fd6d,'threadId':_0x4817ab,'solved':_0x23ea3b[_0xf79bf3(0x21d)]?I[_0xf79bf3(0x1e9)]:I[_0xf79bf3(0x216)]},_0x36f6f8=await this[_0xf79bf3(0x22c)][_0xf79bf3(0x20d)](_0xf79bf3(0x21f)+_0x16fd6d+_0xf79bf3(0x215),{'body':_0xe12318});return!_0x36f6f8['body'][_0xf79bf3(0x1fc)]||_0x36f6f8[_0xf79bf3(0x212)][_0xf79bf3(0x1fc)][_0xf79bf3(0x22a)]===0x1;}async[_0x30aa2c(0x1f0)](_0x621db4,_0x1ed848,_0x31a6b9,_0x486d75){const _0x225c26=_0x30aa2c,_0xeca5e={'memberId':(await this[_0x225c26(0x1f2)][_0x225c26(0x1eb)](_0x621db4))[_0x225c26(0x1f5)](),'threadId':_0x31a6b9,'replyId':_0x486d75,'unitId':_0x621db4},_0x295acb=await this[_0x225c26(0x22c)][_0x225c26(0x20d)](_0x225c26(0x21f)+_0x621db4+_0x225c26(0x223),{'body':_0xeca5e});return!_0x295acb[_0x225c26(0x212)]['error']||_0x295acb[_0x225c26(0x212)][_0x225c26(0x1fc)][_0x225c26(0x22a)]===0x1;}async['listComments'](_0x47a15a,_0x43e008,_0x43b3e9){const _0x5c1d61=_0x30aa2c,_0x32706d={'unitId':_0x47a15a,'threadId':_0x43b3e9},_0x417385=await this['_httpService'][_0x5c1d61(0x20d)](_0x5c1d61(0x21f)+_0x47a15a+_0x5c1d61(0x1df),{'body':_0x32706d}),_0x2ec702=_0x43b3e9[_0x5c1d61(0x1db)](_0xb61162=>ee(_0x417385[_0x5c1d61(0x212)][_0x5c1d61(0x205)][_0xb61162],_0x47a15a,_0x43e008))['filter'](Boolean);return Object['values'](_0x417385[_0x5c1d61(0x212)][_0x5c1d61(0x1de)])[_0x5c1d61(0x1f9)](_0xf754c6=>{const _0x4d6f6a=_0x5c1d61;this[_0x4d6f6a(0x236)][_0x4d6f6a(0x1f1)](_0xf754c6);}),_0x2ec702;}[_0x30aa2c(0x1d1)](_0x14e26c){const _0x59677e=_0x30aa2c;return{'id':_0x14e26c['id'],'threadId':_0x14e26c[_0x59677e(0x1dd)],'ref':_0x14e26c[_0x59677e(0x229)]};}};f=Q([_(0x0,_0x1fd388(_0x1bc482)),_(0x1,_0x1fd388(_0x3af105)),_(0x2,_0x1fd388(_0xd8c8d1)),_(0x3,_0x1fd388(_0x5b06f7))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x269ac6,_0xbb9e2e,_0x345a1b,_0x389966)=>{for(var _0x2b9a4e=_0x389966>0x1?void 0x0:_0x389966?re(_0xbb9e2e,_0x345a1b):_0xbb9e2e,_0x2962c2=_0x269ac6['length']-0x1,_0x1dc49b;_0x2962c2>=0x0;_0x2962c2--)(_0x1dc49b=_0x269ac6[_0x2962c2])&&(_0x2b9a4e=_0x1dc49b(_0x2b9a4e)||_0x2b9a4e);return _0x2b9a4e;},N=(_0x4a54f0,_0x304681)=>(_0x116c6e,_0x10e270)=>_0x304681(_0x116c6e,_0x10e270,_0x4a54f0);let g=class extends _0x4634a6{constructor(_0x1f5bb9,_0x2fc8e8){const _0x469073=_0x30aa2c;super(),this[_0x469073(0x20e)]=_0x1f5bb9,this['_threadCommentDataSource']=_0x2fc8e8,this[_0x469073(0x22f)]();}[_0x30aa2c(0x22f)](){const _0x94e3c2=_0x30aa2c;this['_threadCommentDataSourceService'][_0x94e3c2(0x1ed)]=this['_threadCommentDataSource'],this[_0x94e3c2(0x20e)][_0x94e3c2(0x1ec)]=!0x1;}};g=te([N(0x0,_0x5b38d7),N(0x1,_0x1fd388(f))],g);var se=Object['defineProperty'],oe=Object[_0x30aa2c(0x1f3)],ne=(_0x8cf9da,_0x42aaac,_0x5c7ad6)=>_0x42aaac in _0x8cf9da?se(_0x8cf9da,_0x42aaac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c7ad6}):_0x8cf9da[_0x42aaac]=_0x5c7ad6,ie=(_0x49fd1d,_0x5e7145,_0x302bb4,_0xca21f2)=>{const _0x33482a=_0x30aa2c;for(var _0x1dc53e=_0xca21f2>0x1?void 0x0:_0xca21f2?oe(_0x5e7145,_0x302bb4):_0x5e7145,_0x24f16f=_0x49fd1d[_0x33482a(0x227)]-0x1,_0x26ab18;_0x24f16f>=0x0;_0x24f16f--)(_0x26ab18=_0x49fd1d[_0x24f16f])&&(_0x1dc53e=_0x26ab18(_0x1dc53e)||_0x1dc53e);return _0x1dc53e;},w=(_0x545fa4,_0x111657)=>(_0x5dbc8f,_0x634620)=>_0x111657(_0x5dbc8f,_0x634620,_0x545fa4),$=(_0x20c701,_0x43285c,_0x2dcfe7)=>ne(_0x20c701,typeof _0x43285c!='symbol'?_0x43285c+'':_0x43285c,_0x2dcfe7);let b=class extends _0x4d1e38{constructor(_0x160139=M,_0x180f6b,_0x44b581){const _0x4ce134=_0x30aa2c;super(),this['_config']=_0x160139,this['_injector']=_0x180f6b,this[_0x4ce134(0x1d4)]=_0x44b581;const {..._0xf7f72a}=_0x5c5bd8({},M,this[_0x4ce134(0x234)]);this[_0x4ce134(0x1d4)][_0x4ce134(0x1e4)](z,_0xf7f72a);}[_0x30aa2c(0x1d8)](){[[f],[g],[S]]['forEach'](_0x1c82fb=>{const _0x2acab6=_0x33fa;this[_0x2acab6(0x208)][_0x2acab6(0x22d)](_0x1c82fb);});}['onReady'](){const _0x39d8dc=_0x30aa2c;this[_0x39d8dc(0x208)][_0x39d8dc(0x202)](g),this[_0x39d8dc(0x208)][_0x39d8dc(0x202)](S);}};$(b,_0x30aa2c(0x1f4),W),$(b,_0x30aa2c(0x1fe),_0xf35a65['UNIVER_UNKNOWN']),b=ie([_0x47bcf7(_0x558701,_0x3ba722,_0x8b69f9),w(0x1,_0x1fd388(_0x5b06f7)),w(0x2,_0x1b3fdc)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x13c3d9=_0x1f7a;(function(_0x4ed8d7,_0x1548a6){const _0x431f6b=_0x1f7a,_0x15e302=_0x4ed8d7();while(!![]){try{const _0x5afb94=parseInt(_0x431f6b(0x18a))/0x1+-parseInt(_0x431f6b(0x161))/0x2*(-parseInt(_0x431f6b(0x1ae))/0x3)+-parseInt(_0x431f6b(0x1b9))/0x4+parseInt(_0x431f6b(0x1b7))/0x5+-parseInt(_0x431f6b(0x1aa))/0x6+parseInt(_0x431f6b(0x19c))/0x7*(-parseInt(_0x431f6b(0x1ab))/0x8)+parseInt(_0x431f6b(0x173))/0x9;if(_0x5afb94===_0x1548a6)break;else _0x15e302['push'](_0x15e302['shift']());}catch(_0x340034){_0x15e302['push'](_0x15e302['shift']());}}}(_0x47de,0xc8e49));import{CommentService as _0x2c934f,CollaborationSessionService as _0x1a8f5d,UniverCollaborationClientPlugin as _0x16df65}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x237eea}from'@univerjs-pro/license';import{dayjs as _0x557c68,UserManagerService as _0x583a05,Inject as _0x2e04ee,Injector as _0x11dcec,Disposable as _0x9427da,CustomRangeType as _0x547673,UniverInstanceType as _0x13aaa0,DependentOn as _0x3f4f9d,IConfigService as _0x194b3f,Plugin as _0x292764,merge as _0x3b1dff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3910bf}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1dc95e,IThreadCommentDataSourceService as _0x4366cf}from'@univerjs/thread-comment';import{bufferTime as _0x4c388f}from'rxjs';import{HTTPService as _0x468171}from'@univerjs/network';const W=_0x13c3d9(0x189);var I=(_0x28569d=>(_0x28569d[_0x28569d[_0x13c3d9(0x17e)]=0x0]=_0x13c3d9(0x17e),_0x28569d[_0x28569d[_0x13c3d9(0x191)]=0x1]=_0x13c3d9(0x191),_0x28569d[_0x28569d[_0x13c3d9(0x1a6)]=-0x1]='UNRECOGNIZED',_0x28569d))(I||{}),v=(_0x4dcb82=>(_0x4dcb82[_0x4dcb82[_0x13c3d9(0x19b)]=0x0]=_0x13c3d9(0x19b),_0x4dcb82[_0x4dcb82[_0x13c3d9(0x194)]=0x1]='Add',_0x4dcb82[_0x4dcb82['Reply']=0x2]=_0x13c3d9(0x18c),_0x4dcb82[_0x4dcb82[_0x13c3d9(0x19a)]=0x3]=_0x13c3d9(0x19a),_0x4dcb82[_0x4dcb82[_0x13c3d9(0x174)]=0x4]='Delete',_0x4dcb82[_0x4dcb82[_0x13c3d9(0x15e)]=0x5]=_0x13c3d9(0x15e),_0x4dcb82[_0x4dcb82[_0x13c3d9(0x1a6)]=-0x1]=_0x13c3d9(0x1a6),_0x4dcb82))(v||{});const D=_0xbd4eb3=>_0x557c68(new Date(+_0xbd4eb3))['format'](_0x13c3d9(0x18d)),B=async(_0xa60b83,_0x25b454)=>{const _0x151990=_0x13c3d9,_0x58cd82=_0xa60b83['get'](_0x583a05),_0x5c0441=_0xa60b83[_0x151990(0x180)](_0x468171);_0x25b454[_0x151990(0x1b8)](_0x13c772=>{const _0x10379d=_0x151990;_0x58cd82[_0x10379d(0x179)](_0x13c772)&&_0x25b454[_0x10379d(0x169)](_0x13c772);}),_0x25b454[_0x151990(0x1b5)]&&(await _0x5c0441['get'](_0x151990(0x1a0),{'params':{'userIDs':[..._0x25b454]}}))[_0x151990(0x1bb)][_0x151990(0x1a4)][_0x151990(0x1b8)](_0x3fc04c=>{const _0x582281=_0x151990;_0x3fc04c&&_0x58cd82[_0x582281(0x1b6)](_0x3fc04c);});};function _0x1f7a(_0x26020b,_0x1fa16d){const _0x47defc=_0x47de();return _0x1f7a=function(_0x1f7a0f,_0x47af48){_0x1f7a0f=_0x1f7a0f-0x159;let _0x5e88db=_0x47defc[_0x1f7a0f];return _0x5e88db;},_0x1f7a(_0x26020b,_0x1fa16d);}var K=Object[_0x13c3d9(0x16b)],V=(_0x3951aa,_0x6cee0,_0x325766,_0x26b0b2)=>{const _0x52cc57=_0x13c3d9;for(var _0xf82e1b=_0x26b0b2>0x1?void 0x0:_0x26b0b2?K(_0x6cee0,_0x325766):_0x6cee0,_0x4a0f80=_0x3951aa[_0x52cc57(0x15f)]-0x1,_0xf85993;_0x4a0f80>=0x0;_0x4a0f80--)(_0xf85993=_0x3951aa[_0x4a0f80])&&(_0xf82e1b=_0xf85993(_0xf82e1b)||_0xf82e1b);return _0xf82e1b;},p=(_0x46eac1,_0x24c6c7)=>(_0x5ca751,_0x1cc803)=>_0x24c6c7(_0x5ca751,_0x1cc803,_0x46eac1);let S=class extends _0x9427da{constructor(_0x4ab9f9,_0x24d719,_0x2115f4,_0x4bb72b){const _0x20155a=_0x13c3d9;super(),this[_0x20155a(0x159)]=_0x4ab9f9,this[_0x20155a(0x17c)]=_0x24d719,this['_userService']=_0x2115f4,this[_0x20155a(0x193)]=_0x4bb72b,this[_0x20155a(0x16a)](),this[_0x20155a(0x19d)]();}[_0x13c3d9(0x19d)](){const _0x16a772=_0x13c3d9;this[_0x16a772(0x1a2)](this[_0x16a772(0x17c)]['commentUpdate$']['pipe'](_0x4c388f(0x10))[_0x16a772(0x175)](_0x5444bc=>{const _0x4c064e=_0x16a772,_0x4d260f=new Set();_0x5444bc[_0x4c064e(0x1b8)](_0x36efa7=>{const _0xdee37c=_0x4c064e;switch(_0x36efa7['type']){case _0xdee37c(0x186):{const _0x2452e4=_0x36efa7[_0xdee37c(0x1b0)][_0xdee37c(0x188)];_0x4d260f['add'](_0x2452e4);break;}}}),B(this['_injector'],_0x4d260f);}));}[_0x13c3d9(0x16a)](){const _0x128840=_0x13c3d9;this[_0x128840(0x1a2)](this[_0x128840(0x159)][_0x128840(0x1bc)][_0x128840(0x175)](async _0xcccfed=>{const _0xb50b5e=_0x128840;var _0x22030b,_0x4fd26e,_0x15e64c,_0x2845a2;const _0x18e939=(_0x22030b=this[_0xb50b5e(0x17c)][_0xb50b5e(0x18b)](_0xcccfed['unitId'])[_0xb50b5e(0x160)](_0xfd24d3=>_0xfd24d3[_0xb50b5e(0x162)]===_0xcccfed['threadId']))==null?void 0x0:_0x22030b[_0xb50b5e(0x167)];if(!_0x18e939)return;const {unitId:_0x45ac15,subUnitId:_0x5c6377}=_0x18e939;switch(_0xcccfed['user']&&this[_0xb50b5e(0x192)][_0xb50b5e(0x1b6)](_0xcccfed[_0xb50b5e(0x170)]),_0xcccfed[_0xb50b5e(0x164)]){case v[_0xb50b5e(0x194)]:break;case v[_0xb50b5e(0x18c)]:{this[_0xb50b5e(0x17c)][_0xb50b5e(0x16f)](_0x45ac15,_0x5c6377,{'unitId':_0x45ac15,'subUnitId':_0x5c6377,'ref':'','id':_0xcccfed[_0xb50b5e(0x1ba)],'dT':D(+_0xcccfed[_0xb50b5e(0x172)]),'threadId':_0xcccfed[_0xb50b5e(0x162)],'personId':(_0x15e64c=(_0x4fd26e=_0xcccfed[_0xb50b5e(0x170)])==null?void 0x0:_0x4fd26e['userID'])!=null?_0x15e64c:_0xcccfed[_0xb50b5e(0x17d)],'text':JSON[_0xb50b5e(0x166)](_0xcccfed[_0xb50b5e(0x1a8)]),'parentId':_0x18e939['id']});break;}case v['Delete']:{const _0x297496=this[_0xb50b5e(0x17c)]['getComment'](_0x45ac15,_0x5c6377,_0xcccfed['replyId']);_0x297496&&_0x297496['parentId']&&this[_0xb50b5e(0x17c)][_0xb50b5e(0x182)](_0x45ac15,_0x5c6377,_0xcccfed['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0xb50b5e(0x19f)](_0x45ac15,_0x5c6377,{'commentId':_0xcccfed[_0xb50b5e(0x1ba)],'text':JSON[_0xb50b5e(0x166)](_0xcccfed[_0xb50b5e(0x1a8)])});break;}case v['Solve']:{const _0x4da2fb=(_0x2845a2=this[_0xb50b5e(0x17c)][_0xb50b5e(0x18b)](_0xcccfed['unitId'])[_0xb50b5e(0x160)](_0x29fc1a=>_0x29fc1a['threadId']===_0xcccfed['threadId']))==null?void 0x0:_0x2845a2['root'];_0x4da2fb&&this[_0xb50b5e(0x17c)][_0xb50b5e(0x187)](_0x45ac15,_0x5c6377,_0x4da2fb['id'],_0xcccfed[_0xb50b5e(0x171)]===I[_0xb50b5e(0x191)]);break;}}}));}};S=V([p(0x0,_0x2e04ee(_0x2c934f)),p(0x1,_0x2e04ee(_0x1dc95e)),p(0x2,_0x2e04ee(_0x583a05)),p(0x3,_0x2e04ee(_0x11dcec))],S);const z=_0x13c3d9(0x16d),M={};var k=Object[_0x13c3d9(0x16b)],Q=(_0xdb34a9,_0x536a52,_0x2fa342,_0xff8b96)=>{const _0x4c7e7e=_0x13c3d9;for(var _0x47262f=_0xff8b96>0x1?void 0x0:_0xff8b96?k(_0x536a52,_0x2fa342):_0x536a52,_0x5bac06=_0xdb34a9[_0x4c7e7e(0x15f)]-0x1,_0x401592;_0x5bac06>=0x0;_0x5bac06--)(_0x401592=_0xdb34a9[_0x5bac06])&&(_0x47262f=_0x401592(_0x47262f)||_0x47262f);return _0x47262f;},_=(_0x52befc,_0x186154)=>(_0x21e84a,_0x206526)=>_0x186154(_0x21e84a,_0x206526,_0x52befc);function _0x47de(){const _0x5a6842=['/list','size','addUser','5896755vDkePv','forEach','6409424uGZcnb','replyId','body','commentUpdate$','getCurrentUser','ref','_commentService','/edit','resolved','symbol','COMMENT','Solve','length','find','23558KxZbWm','threadId','reply','type','userID','parse','root','/add','delete','_init','getOwnPropertyDescriptor','_configService','thread-comment-data-source.config','replies','addComment','user','solved','createTimestamp','21122352tEvcRL','Delete','subscribe','pluginName','_threadCommentDataSource','filter','getUser','map','/reply','_threadCommentModel','userId','OpenOrReOpen','/universer-api/comment/unit/','get','_sessionService','deleteComment','saveCommentToSnapshot','listComments','_httpService','add','resolveComment','personId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','855490ljkGKX','getUnit','Reply','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','dataSource','onStarting','Solved','_userService','_injector','Add','requireSession','syncUpdateMutationToColla','onReady','comments','rangeId','Edit','Unknown','217DAtJwE','_initUserSync','stringify','updateComment','/universer-api/user/list','code','disposeWithMe','post','users','rangeType','UNRECOGNIZED','defineProperty','content','slice','5228742sTOkEP','298264jxDHzF','format','getMemberID','18UPYafB','/delete','payload','customRanges','error','_initDataSource'];_0x47de=function(){return _0x5a6842;};return _0x47de();}function X(_0x24ce99,_0x25cec6){const _0x4bb7f0=_0x13c3d9,_0x5b4d6a=_0x24ce99[_0x4bb7f0(0x16e)][0x0];return{..._0x25cec6,'id':_0x5b4d6a[_0x4bb7f0(0x1ba)],'resolved':_0x24ce99['solved']===0x1,'dT':D(_0x5b4d6a[_0x4bb7f0(0x172)]),'personId':_0x5b4d6a[_0x4bb7f0(0x17d)],'threadId':_0x5b4d6a['threadId']};}function ee(_0x20e1e3,_0x590ef1,_0x556137){const _0x4cbfc8=_0x13c3d9;var _0x4ef7fe,_0x538691;if(((_0x538691=(_0x4ef7fe=_0x20e1e3==null?void 0x0:_0x20e1e3['replies'])==null?void 0x0:_0x4ef7fe['length'])!=null?_0x538691:0x0)>0x0){const _0x501990=(_0x305557,_0x27fc88)=>({'id':_0x305557[_0x4cbfc8(0x1ba)],'threadId':_0x305557[_0x4cbfc8(0x162)],'dT':D(_0x305557[_0x4cbfc8(0x172)]),'personId':_0x305557[_0x4cbfc8(0x17d)],'resolved':_0x20e1e3[_0x4cbfc8(0x171)]===I[_0x4cbfc8(0x191)],'unitId':_0x590ef1,'subUnitId':_0x556137,'text':JSON['parse'](_0x305557['content']),'parentId':_0x27fc88}),_0x432053=_0x501990(_0x20e1e3[_0x4cbfc8(0x16e)][0x0]);return{..._0x432053,'children':_0x20e1e3['replies'][_0x4cbfc8(0x1a9)](0x1)[_0x4cbfc8(0x17a)](_0x33448f=>_0x501990(_0x33448f,_0x432053['id']))};}return null;}let f=class{constructor(_0x4e8625,_0x5c246a,_0x5d9300,_0x554242){const _0xc244fe=_0x13c3d9;this['_httpService']=_0x4e8625,this['_userService']=_0x5c246a,this[_0xc244fe(0x181)]=_0x5d9300,this[_0xc244fe(0x193)]=_0x554242;}async[_0x13c3d9(0x16f)](_0x3f7f59){const _0x55e224=_0x13c3d9;var _0x28d8f6,_0x40dec9;const {parentId:_0x34a06f,unitId:_0x2d38e8,text:_0x128f83,threadId:_0x2c6625}=_0x3f7f59,_0x5bd4f7=(_0x40dec9=(_0x28d8f6=_0x128f83[_0x55e224(0x1b1)])==null?void 0x0:_0x28d8f6['filter'](_0x265f3d=>_0x265f3d['rangeType']===_0x547673['COMMENT'])[_0x55e224(0x17a)](_0x34e026=>_0x34e026[_0x55e224(0x199)]))!=null?_0x40dec9:[],_0x5a82a4=JSON[_0x55e224(0x19e)](_0x128f83),_0x48437e=(await this[_0x55e224(0x181)]['requireSession'](_0x2d38e8))[_0x55e224(0x1ad)]();if(_0x34a06f){const _0x99bc31={'memberId':_0x48437e,'unitId':_0x2d38e8,'content':_0x5a82a4,'mention':_0x5bd4f7,'threadId':_0x2c6625},_0x250919=(await this[_0x55e224(0x185)][_0x55e224(0x1a3)](_0x55e224(0x17f)+_0x2d38e8+_0x55e224(0x17b),{'body':_0x99bc31}))[_0x55e224(0x1bb)][_0x55e224(0x163)];return{..._0x3f7f59,'id':_0x250919[_0x55e224(0x1ba)],'dT':_0x557c68(+_0x250919[_0x55e224(0x172)])[_0x55e224(0x1ac)](_0x55e224(0x18d)),'personId':_0x250919[_0x55e224(0x17d)]};}else{const _0x3b11eb={'memberId':_0x48437e,'unitId':_0x2d38e8,'content':_0x5a82a4,'mention':_0x5bd4f7},_0x5a385c=await this[_0x55e224(0x185)][_0x55e224(0x1a3)](_0x55e224(0x17f)+_0x2d38e8+_0x55e224(0x168),{'body':_0x3b11eb});return X(_0x5a385c[_0x55e224(0x1bb)]['comment'],_0x3f7f59);}}async[_0x13c3d9(0x19f)](_0x149dbb){const _0x3169bb=_0x13c3d9;var _0x16bce0,_0x85e0fa;const {text:_0x1626f1,unitId:_0x2ccf66}=_0x149dbb,_0x2afb95=(_0x85e0fa=(_0x16bce0=_0x1626f1[_0x3169bb(0x1b1)])==null?void 0x0:_0x16bce0[_0x3169bb(0x178)](_0x5a1939=>_0x5a1939[_0x3169bb(0x1a5)]===_0x547673[_0x3169bb(0x15d)])[_0x3169bb(0x17a)](_0x1be393=>_0x1be393[_0x3169bb(0x199)]))!=null?_0x85e0fa:[],_0x295e13=JSON[_0x3169bb(0x19e)](_0x1626f1),_0x47b53a=_0x149dbb[_0x3169bb(0x162)],_0x549837=_0x149dbb['id'],_0x5d7fb3={'memberId':(await this[_0x3169bb(0x181)][_0x3169bb(0x195)](_0x2ccf66))[_0x3169bb(0x1ad)](),'unitId':_0x2ccf66,'threadId':_0x47b53a,'mention':_0x2afb95,'content':_0x295e13,'replyId':_0x549837},_0x255e1e=await this[_0x3169bb(0x185)][_0x3169bb(0x1a3)]('/universer-api/comment/unit/'+_0x2ccf66+_0x3169bb(0x15a),{'body':_0x5d7fb3});return!_0x255e1e['body'][_0x3169bb(0x1b2)]||_0x255e1e['body']['error']['code']===0x1;}async[_0x13c3d9(0x187)](_0x5034b2){const _0x549165=_0x13c3d9,{unitId:_0x555eab}=_0x5034b2,_0x2b91b5=_0x5034b2[_0x549165(0x162)],_0x1083a4={'memberId':this[_0x549165(0x192)][_0x549165(0x1bd)]()[_0x549165(0x165)],'unitId':_0x555eab,'threadId':_0x2b91b5,'solved':_0x5034b2[_0x549165(0x15b)]?I[_0x549165(0x191)]:I['OpenOrReOpen']},_0x1edcc8=await this[_0x549165(0x185)][_0x549165(0x1a3)](_0x549165(0x17f)+_0x555eab+'/solved',{'body':_0x1083a4});return!_0x1edcc8[_0x549165(0x1bb)]['error']||_0x1edcc8[_0x549165(0x1bb)][_0x549165(0x1b2)][_0x549165(0x1a1)]===0x1;}async[_0x13c3d9(0x182)](_0x564d19,_0x20bd13,_0x4ae960,_0x546cc2){const _0x1e5c1e=_0x13c3d9,_0x3704ce={'memberId':(await this[_0x1e5c1e(0x181)][_0x1e5c1e(0x195)](_0x564d19))[_0x1e5c1e(0x1ad)](),'threadId':_0x4ae960,'replyId':_0x546cc2,'unitId':_0x564d19},_0x2ee176=await this[_0x1e5c1e(0x185)]['post'](_0x1e5c1e(0x17f)+_0x564d19+_0x1e5c1e(0x1af),{'body':_0x3704ce});return!_0x2ee176['body'][_0x1e5c1e(0x1b2)]||_0x2ee176[_0x1e5c1e(0x1bb)][_0x1e5c1e(0x1b2)][_0x1e5c1e(0x1a1)]===0x1;}async[_0x13c3d9(0x184)](_0x30643d,_0x2afaf5,_0xbb66e0){const _0xa6e8be=_0x13c3d9,_0x38dcbe={'unitId':_0x30643d,'threadId':_0xbb66e0},_0x16d47f=await this[_0xa6e8be(0x185)][_0xa6e8be(0x1a3)](_0xa6e8be(0x17f)+_0x30643d+_0xa6e8be(0x1b4),{'body':_0x38dcbe}),_0x1d1054=_0xbb66e0['map'](_0x4a6116=>ee(_0x16d47f['body'][_0xa6e8be(0x198)][_0x4a6116],_0x30643d,_0x2afaf5))[_0xa6e8be(0x178)](Boolean);return Object['values'](_0x16d47f['body'][_0xa6e8be(0x1a4)])[_0xa6e8be(0x1b8)](_0x55a5e8=>{const _0x20affa=_0xa6e8be;this['_userService'][_0x20affa(0x1b6)](_0x55a5e8);}),_0x1d1054;}[_0x13c3d9(0x183)](_0x78275e){const _0x405ced=_0x13c3d9;return{'id':_0x78275e['id'],'threadId':_0x78275e['threadId'],'ref':_0x78275e[_0x405ced(0x1be)]};}};f=Q([_(0x0,_0x2e04ee(_0x468171)),_(0x1,_0x2e04ee(_0x583a05)),_(0x2,_0x2e04ee(_0x1a8f5d)),_(0x3,_0x2e04ee(_0x11dcec))],f);var re=Object[_0x13c3d9(0x16b)],te=(_0x28bd81,_0xa5147a,_0x2f2566,_0x16ac68)=>{const _0x480083=_0x13c3d9;for(var _0x35d15b=_0x16ac68>0x1?void 0x0:_0x16ac68?re(_0xa5147a,_0x2f2566):_0xa5147a,_0x5aadb1=_0x28bd81[_0x480083(0x15f)]-0x1,_0x420851;_0x5aadb1>=0x0;_0x5aadb1--)(_0x420851=_0x28bd81[_0x5aadb1])&&(_0x35d15b=_0x420851(_0x35d15b)||_0x35d15b);return _0x35d15b;},N=(_0x10d84d,_0x38d699)=>(_0x3d3604,_0x2a265b)=>_0x38d699(_0x3d3604,_0x2a265b,_0x10d84d);let g=class extends _0x9427da{constructor(_0x1139ec,_0x41f04c){const _0x3b5c8c=_0x13c3d9;super(),this[_0x3b5c8c(0x18e)]=_0x1139ec,this['_threadCommentDataSource']=_0x41f04c,this[_0x3b5c8c(0x1b3)]();}[_0x13c3d9(0x1b3)](){const _0x25e838=_0x13c3d9;this['_threadCommentDataSourceService'][_0x25e838(0x18f)]=this[_0x25e838(0x177)],this[_0x25e838(0x18e)][_0x25e838(0x196)]=!0x1;}};g=te([N(0x0,_0x4366cf),N(0x1,_0x2e04ee(f))],g);var se=Object[_0x13c3d9(0x1a7)],oe=Object[_0x13c3d9(0x16b)],ne=(_0x5ad281,_0x2f1b6e,_0x4c2f12)=>_0x2f1b6e in _0x5ad281?se(_0x5ad281,_0x2f1b6e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c2f12}):_0x5ad281[_0x2f1b6e]=_0x4c2f12,ie=(_0x22ef7f,_0x499d25,_0x44cf9a,_0x60f26)=>{for(var _0x1c08ca=_0x60f26>0x1?void 0x0:_0x60f26?oe(_0x499d25,_0x44cf9a):_0x499d25,_0x1b190b=_0x22ef7f['length']-0x1,_0x30f278;_0x1b190b>=0x0;_0x1b190b--)(_0x30f278=_0x22ef7f[_0x1b190b])&&(_0x1c08ca=_0x30f278(_0x1c08ca)||_0x1c08ca);return _0x1c08ca;},w=(_0x1121f4,_0x55e0eb)=>(_0x43d869,_0x429b4a)=>_0x55e0eb(_0x43d869,_0x429b4a,_0x1121f4),$=(_0x8a6448,_0x4493d2,_0x5998b7)=>ne(_0x8a6448,typeof _0x4493d2!=_0x13c3d9(0x15c)?_0x4493d2+'':_0x4493d2,_0x5998b7);let b=class extends _0x292764{constructor(_0x530d2f=M,_0xe03b19,_0x2cb324){const _0x50d2aa=_0x13c3d9;super(),this['_config']=_0x530d2f,this['_injector']=_0xe03b19,this[_0x50d2aa(0x16c)]=_0x2cb324;const {..._0x4dcfc8}=_0x3b1dff({},M,this['_config']);this[_0x50d2aa(0x16c)]['setConfig'](z,_0x4dcfc8);}[_0x13c3d9(0x190)](){[[f],[g],[S]]['forEach'](_0x1373f8=>{const _0x5746a5=_0x1f7a;this['_injector'][_0x5746a5(0x186)](_0x1373f8);});}[_0x13c3d9(0x197)](){const _0x3f6b4f=_0x13c3d9;this['_injector']['get'](g),this[_0x3f6b4f(0x193)][_0x3f6b4f(0x180)](S);}};$(b,_0x13c3d9(0x176),W),$(b,'type',_0x13aaa0['UNIVER_UNKNOWN']),b=ie([_0x3f4f9d(_0x3910bf,_0x16df65,_0x237eea),w(0x1,_0x2e04ee(_0x11dcec)),w(0x2,_0x194b3f)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x33fa(_0x1c886e,_0x452e28){const _0x49c217=_0x49c2();return _0x33fa=function(_0x33faa4,_0x321e0d){_0x33faa4=_0x33faa4-0x1d1;let _0x16ee20=_0x49c217[_0x33faa4];return _0x16ee20;},_0x33fa(_0x1c886e,_0x452e28);}const _0x30aa2c=_0x33fa;(function(_0xea9769,_0x395bf9){const _0x148eef=_0x33fa,_0x2cbc20=_0xea9769();while(!![]){try{const _0x198c31=-parseInt(_0x148eef(0x1f7))/0x1+-parseInt(_0x148eef(0x237))/0x2+-parseInt(_0x148eef(0x1ef))/0x3+parseInt(_0x148eef(0x203))/0x4+parseInt(_0x148eef(0x1da))/0x5*(parseInt(_0x148eef(0x1e5))/0x6)+-parseInt(_0x148eef(0x211))/0x7*(-parseInt(_0x148eef(0x228))/0x8)+-parseInt(_0x148eef(0x22e))/0x9*(-parseInt(_0x148eef(0x21b))/0xa);if(_0x198c31===_0x395bf9)break;else _0x2cbc20['push'](_0x2cbc20['shift']());}catch(_0x1b9a59){_0x2cbc20['push'](_0x2cbc20['shift']());}}}(_0x49c2,0x1c280));import{CommentService as _0x5b8e09,CollaborationSessionService as _0xd8c8d1,UniverCollaborationClientPlugin as _0x3ba722}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x8b69f9}from'@univerjs-pro/license';import{dayjs as _0x5bd086,UserManagerService as _0x3af105,Inject as _0x1fd388,Injector as _0x5b06f7,Disposable as _0x4634a6,CustomRangeType as _0x5e13de,UniverInstanceType as _0xf35a65,DependentOn as _0x47bcf7,IConfigService as _0x1b3fdc,Plugin as _0x4d1e38,merge as _0x5c5bd8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x558701}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x13192f,IThreadCommentDataSourceService as _0x5b38d7}from'@univerjs/thread-comment';import{bufferTime as _0x21e75e}from'rxjs';import{HTTPService as _0x1bc482}from'@univerjs/network';const W=_0x30aa2c(0x21a);var I=(_0x328aec=>(_0x328aec[_0x328aec['OpenOrReOpen']=0x0]=_0x30aa2c(0x216),_0x328aec[_0x328aec[_0x30aa2c(0x1e9)]=0x1]=_0x30aa2c(0x1e9),_0x328aec[_0x328aec[_0x30aa2c(0x213)]=-0x1]='UNRECOGNIZED',_0x328aec))(I||{}),v=(_0x159cd4=>(_0x159cd4[_0x159cd4['Unknown']=0x0]=_0x30aa2c(0x1d9),_0x159cd4[_0x159cd4['Add']=0x1]='Add',_0x159cd4[_0x159cd4[_0x30aa2c(0x1f6)]=0x2]=_0x30aa2c(0x1f6),_0x159cd4[_0x159cd4['Edit']=0x3]=_0x30aa2c(0x1e3),_0x159cd4[_0x159cd4[_0x30aa2c(0x1e7)]=0x4]=_0x30aa2c(0x1e7),_0x159cd4[_0x159cd4[_0x30aa2c(0x225)]=0x5]=_0x30aa2c(0x225),_0x159cd4[_0x159cd4['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x159cd4))(v||{});const D=_0x18fd5f=>_0x5bd086(new Date(+_0x18fd5f))[_0x30aa2c(0x226)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4b36eb,_0x25b7fa)=>{const _0x266432=_0x30aa2c,_0x3ed367=_0x4b36eb[_0x266432(0x202)](_0x3af105),_0x3cff21=_0x4b36eb['get'](_0x1bc482);_0x25b7fa[_0x266432(0x1f9)](_0x2041c5=>{const _0x3f01bd=_0x266432;_0x3ed367[_0x3f01bd(0x1e6)](_0x2041c5)&&_0x25b7fa[_0x3f01bd(0x1e2)](_0x2041c5);}),_0x25b7fa[_0x266432(0x232)]&&(await _0x3cff21[_0x266432(0x202)](_0x266432(0x222),{'params':{'userIDs':[..._0x25b7fa]}}))['body'][_0x266432(0x1de)]['forEach'](_0x3e0516=>{const _0x3f7c8e=_0x266432;_0x3e0516&&_0x3ed367[_0x3f7c8e(0x1f1)](_0x3e0516);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x229ad4,_0x38ad6c,_0x26058e,_0xd45ed1)=>{const _0xa4202f=_0x30aa2c;for(var _0x15866d=_0xd45ed1>0x1?void 0x0:_0xd45ed1?K(_0x38ad6c,_0x26058e):_0x38ad6c,_0x59acf3=_0x229ad4[_0xa4202f(0x227)]-0x1,_0xd39bc8;_0x59acf3>=0x0;_0x59acf3--)(_0xd39bc8=_0x229ad4[_0x59acf3])&&(_0x15866d=_0xd39bc8(_0x15866d)||_0x15866d);return _0x15866d;},p=(_0x37d7c9,_0x2cf06a)=>(_0x45782b,_0x7eddf1)=>_0x2cf06a(_0x45782b,_0x7eddf1,_0x37d7c9);let S=class extends _0x4634a6{constructor(_0x4f5b40,_0x28294e,_0x283e22,_0x278f8f){const _0x55c073=_0x30aa2c;super(),this[_0x55c073(0x235)]=_0x4f5b40,this[_0x55c073(0x20a)]=_0x28294e,this['_userService']=_0x283e22,this[_0x55c073(0x208)]=_0x278f8f,this[_0x55c073(0x1fb)](),this[_0x55c073(0x1d3)]();}[_0x30aa2c(0x1d3)](){const _0x137ef2=_0x30aa2c;this[_0x137ef2(0x1d7)](this[_0x137ef2(0x20a)]['commentUpdate$'][_0x137ef2(0x200)](_0x21e75e(0x10))[_0x137ef2(0x1e0)](_0x14a702=>{const _0x516aac=_0x137ef2,_0x9b35eb=new Set();_0x14a702['forEach'](_0x74f992=>{const _0xfaa96b=_0x33fa;switch(_0x74f992[_0xfaa96b(0x1fe)]){case _0xfaa96b(0x22d):{const _0x5df6b9=_0x74f992['payload'][_0xfaa96b(0x210)];_0x9b35eb[_0xfaa96b(0x22d)](_0x5df6b9);break;}}}),B(this[_0x516aac(0x208)],_0x9b35eb);}));}['_init'](){const _0x49f994=_0x30aa2c;this[_0x49f994(0x1d7)](this[_0x49f994(0x235)][_0x49f994(0x209)]['subscribe'](async _0x8e2ed2=>{const _0x1e3118=_0x49f994;var _0x4f5545,_0x38d98e,_0x279ae2,_0x204ab7;const _0x1ef2ef=(_0x4f5545=this[_0x1e3118(0x20a)][_0x1e3118(0x20b)](_0x8e2ed2[_0x1e3118(0x207)])['find'](_0x294019=>_0x294019['threadId']===_0x8e2ed2[_0x1e3118(0x1dd)]))==null?void 0x0:_0x4f5545[_0x1e3118(0x214)];if(!_0x1ef2ef)return;const {unitId:_0x2d248f,subUnitId:_0x38ffb8}=_0x1ef2ef;switch(_0x8e2ed2[_0x1e3118(0x20c)]&&this[_0x1e3118(0x236)][_0x1e3118(0x1f1)](_0x8e2ed2['user']),_0x8e2ed2[_0x1e3118(0x1fe)]){case v[_0x1e3118(0x218)]:break;case v[_0x1e3118(0x1f6)]:{this[_0x1e3118(0x20a)][_0x1e3118(0x206)](_0x2d248f,_0x38ffb8,{'unitId':_0x2d248f,'subUnitId':_0x38ffb8,'ref':'','id':_0x8e2ed2[_0x1e3118(0x233)],'dT':D(+_0x8e2ed2[_0x1e3118(0x230)]),'threadId':_0x8e2ed2[_0x1e3118(0x1dd)],'personId':(_0x279ae2=(_0x38d98e=_0x8e2ed2['user'])==null?void 0x0:_0x38d98e[_0x1e3118(0x1e1)])!=null?_0x279ae2:_0x8e2ed2['userId'],'text':JSON['parse'](_0x8e2ed2['content']),'parentId':_0x1ef2ef['id']});break;}case v[_0x1e3118(0x1e7)]:{const _0x4094dc=this['_threadCommentModel'][_0x1e3118(0x1ee)](_0x2d248f,_0x38ffb8,_0x8e2ed2['replyId']);_0x4094dc&&_0x4094dc[_0x1e3118(0x21c)]&&this['_threadCommentModel'][_0x1e3118(0x1f0)](_0x2d248f,_0x38ffb8,_0x8e2ed2[_0x1e3118(0x233)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x2d248f,_0x38ffb8,{'commentId':_0x8e2ed2['replyId'],'text':JSON[_0x1e3118(0x1e8)](_0x8e2ed2[_0x1e3118(0x1fd)])});break;}case v[_0x1e3118(0x225)]:{const _0x3e64cb=(_0x204ab7=this[_0x1e3118(0x20a)][_0x1e3118(0x20b)](_0x8e2ed2[_0x1e3118(0x207)])['find'](_0x4cc301=>_0x4cc301[_0x1e3118(0x1dd)]===_0x8e2ed2[_0x1e3118(0x1dd)]))==null?void 0x0:_0x204ab7[_0x1e3118(0x214)];_0x3e64cb&&this[_0x1e3118(0x20a)][_0x1e3118(0x1d5)](_0x2d248f,_0x38ffb8,_0x3e64cb['id'],_0x8e2ed2[_0x1e3118(0x224)]===I['Solved']);break;}}}));}};function _0x49c2(){const _0x3e4d8c=['setConfig','36MBqhEh','getUser','Delete','parse','Solved','customRanges','requireSession','syncUpdateMutationToColla','dataSource','getComment','508095QTzfWw','deleteComment','addUser','_sessionService','getOwnPropertyDescriptor','pluginName','getMemberID','Reply','7605ZlRMNG','filter','forEach','/add','_init','error','content','type','/reply','pipe','/edit','get','309716lcNqIX','updateComment','comments','addComment','unitId','_injector','commentUpdate$','_threadCommentModel','getUnit','user','post','_threadCommentDataSourceService','COMMENT','personId','63007xniidS','body','UNRECOGNIZED','root','/solved','OpenOrReOpen','userId','Add','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','870OlNaja','parentId','resolved','stringify','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','reply','/universer-api/user/list','/delete','solved','Solve','format','length','184PCXqFt','ref','code','slice','_httpService','add','9Cnehpw','_initDataSource','createTimestamp','getCurrentUser','size','replyId','_config','_commentService','_userService','81214sgLcyk','saveCommentToSnapshot','replies','_initUserSync','_configService','resolveComment','comment','disposeWithMe','onStarting','Unknown','40305Thmsbb','map','rangeId','threadId','users','/list','subscribe','userID','delete','Edit'];_0x49c2=function(){return _0x3e4d8c;};return _0x49c2();}S=V([p(0x0,_0x1fd388(_0x5b8e09)),p(0x1,_0x1fd388(_0x13192f)),p(0x2,_0x1fd388(_0x3af105)),p(0x3,_0x1fd388(_0x5b06f7))],S);const z=_0x30aa2c(0x219),M={};var k=Object[_0x30aa2c(0x1f3)],Q=(_0x3bef0a,_0x5948c2,_0x28126e,_0x20e286)=>{const _0x190324=_0x30aa2c;for(var _0xf30e92=_0x20e286>0x1?void 0x0:_0x20e286?k(_0x5948c2,_0x28126e):_0x5948c2,_0x64c676=_0x3bef0a[_0x190324(0x227)]-0x1,_0x2dc079;_0x64c676>=0x0;_0x64c676--)(_0x2dc079=_0x3bef0a[_0x64c676])&&(_0xf30e92=_0x2dc079(_0xf30e92)||_0xf30e92);return _0xf30e92;},_=(_0x24df89,_0x43b634)=>(_0xf077cc,_0x1f7a25)=>_0x43b634(_0xf077cc,_0x1f7a25,_0x24df89);function X(_0x12d678,_0x1a1cbc){const _0x56a841=_0x30aa2c,_0x23d881=_0x12d678[_0x56a841(0x1d2)][0x0];return{..._0x1a1cbc,'id':_0x23d881[_0x56a841(0x233)],'resolved':_0x12d678[_0x56a841(0x224)]===0x1,'dT':D(_0x23d881[_0x56a841(0x230)]),'personId':_0x23d881[_0x56a841(0x217)],'threadId':_0x23d881[_0x56a841(0x1dd)]};}function ee(_0x574e4a,_0x500a84,_0x31b910){const _0x5357e8=_0x30aa2c;var _0xeb5dc5,_0x4fc02b;if(((_0x4fc02b=(_0xeb5dc5=_0x574e4a==null?void 0x0:_0x574e4a['replies'])==null?void 0x0:_0xeb5dc5[_0x5357e8(0x227)])!=null?_0x4fc02b:0x0)>0x0){const _0x493e94=(_0x2b4474,_0xfc4b76)=>({'id':_0x2b4474[_0x5357e8(0x233)],'threadId':_0x2b4474[_0x5357e8(0x1dd)],'dT':D(_0x2b4474[_0x5357e8(0x230)]),'personId':_0x2b4474['userId'],'resolved':_0x574e4a[_0x5357e8(0x224)]===I[_0x5357e8(0x1e9)],'unitId':_0x500a84,'subUnitId':_0x31b910,'text':JSON['parse'](_0x2b4474['content']),'parentId':_0xfc4b76}),_0x461879=_0x493e94(_0x574e4a[_0x5357e8(0x1d2)][0x0]);return{..._0x461879,'children':_0x574e4a[_0x5357e8(0x1d2)][_0x5357e8(0x22b)](0x1)['map'](_0x238aac=>_0x493e94(_0x238aac,_0x461879['id']))};}return null;}let f=class{constructor(_0x45ab42,_0x35539b,_0x561e2f,_0x21ea1f){const _0x178cac=_0x30aa2c;this[_0x178cac(0x22c)]=_0x45ab42,this[_0x178cac(0x236)]=_0x35539b,this[_0x178cac(0x1f2)]=_0x561e2f,this[_0x178cac(0x208)]=_0x21ea1f;}async[_0x30aa2c(0x206)](_0x5f068c){const _0x5a09d5=_0x30aa2c;var _0x503ef4,_0x21d2f4;const {parentId:_0x5e1f4d,unitId:_0x15f9f1,text:_0x1dcfa5,threadId:_0x3bc39e}=_0x5f068c,_0x2604b3=(_0x21d2f4=(_0x503ef4=_0x1dcfa5[_0x5a09d5(0x1ea)])==null?void 0x0:_0x503ef4['filter'](_0x1ecaf1=>_0x1ecaf1['rangeType']===_0x5e13de[_0x5a09d5(0x20f)])[_0x5a09d5(0x1db)](_0x4958a6=>_0x4958a6['rangeId']))!=null?_0x21d2f4:[],_0x5d17cb=JSON[_0x5a09d5(0x21e)](_0x1dcfa5),_0x284656=(await this[_0x5a09d5(0x1f2)][_0x5a09d5(0x1eb)](_0x15f9f1))[_0x5a09d5(0x1f5)]();if(_0x5e1f4d){const _0x2e7cda={'memberId':_0x284656,'unitId':_0x15f9f1,'content':_0x5d17cb,'mention':_0x2604b3,'threadId':_0x3bc39e},_0x198404=(await this[_0x5a09d5(0x22c)][_0x5a09d5(0x20d)](_0x5a09d5(0x21f)+_0x15f9f1+_0x5a09d5(0x1ff),{'body':_0x2e7cda}))[_0x5a09d5(0x212)][_0x5a09d5(0x221)];return{..._0x5f068c,'id':_0x198404['replyId'],'dT':_0x5bd086(+_0x198404[_0x5a09d5(0x230)])[_0x5a09d5(0x226)](_0x5a09d5(0x220)),'personId':_0x198404['userId']};}else{const _0x551ac2={'memberId':_0x284656,'unitId':_0x15f9f1,'content':_0x5d17cb,'mention':_0x2604b3},_0x1304a4=await this['_httpService'][_0x5a09d5(0x20d)](_0x5a09d5(0x21f)+_0x15f9f1+_0x5a09d5(0x1fa),{'body':_0x551ac2});return X(_0x1304a4[_0x5a09d5(0x212)][_0x5a09d5(0x1d6)],_0x5f068c);}}async[_0x30aa2c(0x204)](_0x470dbc){const _0x151804=_0x30aa2c;var _0x297ec0,_0x5c12bf;const {text:_0xdf3d4e,unitId:_0x403ddd}=_0x470dbc,_0x5dd241=(_0x5c12bf=(_0x297ec0=_0xdf3d4e[_0x151804(0x1ea)])==null?void 0x0:_0x297ec0[_0x151804(0x1f8)](_0x191e9a=>_0x191e9a['rangeType']===_0x5e13de['COMMENT'])[_0x151804(0x1db)](_0x54fdc2=>_0x54fdc2[_0x151804(0x1dc)]))!=null?_0x5c12bf:[],_0x2dd41f=JSON[_0x151804(0x21e)](_0xdf3d4e),_0x3a2fa1=_0x470dbc['threadId'],_0x2eaf43=_0x470dbc['id'],_0xc13804={'memberId':(await this[_0x151804(0x1f2)][_0x151804(0x1eb)](_0x403ddd))[_0x151804(0x1f5)](),'unitId':_0x403ddd,'threadId':_0x3a2fa1,'mention':_0x5dd241,'content':_0x2dd41f,'replyId':_0x2eaf43},_0x490816=await this['_httpService']['post'](_0x151804(0x21f)+_0x403ddd+_0x151804(0x201),{'body':_0xc13804});return!_0x490816[_0x151804(0x212)][_0x151804(0x1fc)]||_0x490816[_0x151804(0x212)][_0x151804(0x1fc)][_0x151804(0x22a)]===0x1;}async[_0x30aa2c(0x1d5)](_0x23ea3b){const _0xf79bf3=_0x30aa2c,{unitId:_0x16fd6d}=_0x23ea3b,_0x4817ab=_0x23ea3b['threadId'],_0xe12318={'memberId':this[_0xf79bf3(0x236)][_0xf79bf3(0x231)]()['userID'],'unitId':_0x16fd6d,'threadId':_0x4817ab,'solved':_0x23ea3b[_0xf79bf3(0x21d)]?I[_0xf79bf3(0x1e9)]:I[_0xf79bf3(0x216)]},_0x36f6f8=await this[_0xf79bf3(0x22c)][_0xf79bf3(0x20d)](_0xf79bf3(0x21f)+_0x16fd6d+_0xf79bf3(0x215),{'body':_0xe12318});return!_0x36f6f8['body'][_0xf79bf3(0x1fc)]||_0x36f6f8[_0xf79bf3(0x212)][_0xf79bf3(0x1fc)][_0xf79bf3(0x22a)]===0x1;}async[_0x30aa2c(0x1f0)](_0x621db4,_0x1ed848,_0x31a6b9,_0x486d75){const _0x225c26=_0x30aa2c,_0xeca5e={'memberId':(await this[_0x225c26(0x1f2)][_0x225c26(0x1eb)](_0x621db4))[_0x225c26(0x1f5)](),'threadId':_0x31a6b9,'replyId':_0x486d75,'unitId':_0x621db4},_0x295acb=await this[_0x225c26(0x22c)][_0x225c26(0x20d)](_0x225c26(0x21f)+_0x621db4+_0x225c26(0x223),{'body':_0xeca5e});return!_0x295acb[_0x225c26(0x212)]['error']||_0x295acb[_0x225c26(0x212)][_0x225c26(0x1fc)][_0x225c26(0x22a)]===0x1;}async['listComments'](_0x47a15a,_0x43e008,_0x43b3e9){const _0x5c1d61=_0x30aa2c,_0x32706d={'unitId':_0x47a15a,'threadId':_0x43b3e9},_0x417385=await this['_httpService'][_0x5c1d61(0x20d)](_0x5c1d61(0x21f)+_0x47a15a+_0x5c1d61(0x1df),{'body':_0x32706d}),_0x2ec702=_0x43b3e9[_0x5c1d61(0x1db)](_0xb61162=>ee(_0x417385[_0x5c1d61(0x212)][_0x5c1d61(0x205)][_0xb61162],_0x47a15a,_0x43e008))['filter'](Boolean);return Object['values'](_0x417385[_0x5c1d61(0x212)][_0x5c1d61(0x1de)])[_0x5c1d61(0x1f9)](_0xf754c6=>{const _0x4d6f6a=_0x5c1d61;this[_0x4d6f6a(0x236)][_0x4d6f6a(0x1f1)](_0xf754c6);}),_0x2ec702;}[_0x30aa2c(0x1d1)](_0x14e26c){const _0x59677e=_0x30aa2c;return{'id':_0x14e26c['id'],'threadId':_0x14e26c[_0x59677e(0x1dd)],'ref':_0x14e26c[_0x59677e(0x229)]};}};f=Q([_(0x0,_0x1fd388(_0x1bc482)),_(0x1,_0x1fd388(_0x3af105)),_(0x2,_0x1fd388(_0xd8c8d1)),_(0x3,_0x1fd388(_0x5b06f7))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x269ac6,_0xbb9e2e,_0x345a1b,_0x389966)=>{for(var _0x2b9a4e=_0x389966>0x1?void 0x0:_0x389966?re(_0xbb9e2e,_0x345a1b):_0xbb9e2e,_0x2962c2=_0x269ac6['length']-0x1,_0x1dc49b;_0x2962c2>=0x0;_0x2962c2--)(_0x1dc49b=_0x269ac6[_0x2962c2])&&(_0x2b9a4e=_0x1dc49b(_0x2b9a4e)||_0x2b9a4e);return _0x2b9a4e;},N=(_0x4a54f0,_0x304681)=>(_0x116c6e,_0x10e270)=>_0x304681(_0x116c6e,_0x10e270,_0x4a54f0);let g=class extends _0x4634a6{constructor(_0x1f5bb9,_0x2fc8e8){const _0x469073=_0x30aa2c;super(),this[_0x469073(0x20e)]=_0x1f5bb9,this['_threadCommentDataSource']=_0x2fc8e8,this[_0x469073(0x22f)]();}[_0x30aa2c(0x22f)](){const _0x94e3c2=_0x30aa2c;this['_threadCommentDataSourceService'][_0x94e3c2(0x1ed)]=this['_threadCommentDataSource'],this[_0x94e3c2(0x20e)][_0x94e3c2(0x1ec)]=!0x1;}};g=te([N(0x0,_0x5b38d7),N(0x1,_0x1fd388(f))],g);var se=Object['defineProperty'],oe=Object[_0x30aa2c(0x1f3)],ne=(_0x8cf9da,_0x42aaac,_0x5c7ad6)=>_0x42aaac in _0x8cf9da?se(_0x8cf9da,_0x42aaac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c7ad6}):_0x8cf9da[_0x42aaac]=_0x5c7ad6,ie=(_0x49fd1d,_0x5e7145,_0x302bb4,_0xca21f2)=>{const _0x33482a=_0x30aa2c;for(var _0x1dc53e=_0xca21f2>0x1?void 0x0:_0xca21f2?oe(_0x5e7145,_0x302bb4):_0x5e7145,_0x24f16f=_0x49fd1d[_0x33482a(0x227)]-0x1,_0x26ab18;_0x24f16f>=0x0;_0x24f16f--)(_0x26ab18=_0x49fd1d[_0x24f16f])&&(_0x1dc53e=_0x26ab18(_0x1dc53e)||_0x1dc53e);return _0x1dc53e;},w=(_0x545fa4,_0x111657)=>(_0x5dbc8f,_0x634620)=>_0x111657(_0x5dbc8f,_0x634620,_0x545fa4),$=(_0x20c701,_0x43285c,_0x2dcfe7)=>ne(_0x20c701,typeof _0x43285c!='symbol'?_0x43285c+'':_0x43285c,_0x2dcfe7);let b=class extends _0x4d1e38{constructor(_0x160139=M,_0x180f6b,_0x44b581){const _0x4ce134=_0x30aa2c;super(),this['_config']=_0x160139,this['_injector']=_0x180f6b,this[_0x4ce134(0x1d4)]=_0x44b581;const {..._0xf7f72a}=_0x5c5bd8({},M,this[_0x4ce134(0x234)]);this[_0x4ce134(0x1d4)][_0x4ce134(0x1e4)](z,_0xf7f72a);}[_0x30aa2c(0x1d8)](){[[f],[g],[S]]['forEach'](_0x1c82fb=>{const _0x2acab6=_0x33fa;this[_0x2acab6(0x208)][_0x2acab6(0x22d)](_0x1c82fb);});}['onReady'](){const _0x39d8dc=_0x30aa2c;this[_0x39d8dc(0x208)][_0x39d8dc(0x202)](g),this[_0x39d8dc(0x208)][_0x39d8dc(0x202)](S);}};$(b,_0x30aa2c(0x1f4),W),$(b,_0x30aa2c(0x1fe),_0xf35a65['UNIVER_UNKNOWN']),b=ie([_0x47bcf7(_0x558701,_0x3ba722,_0x8b69f9),w(0x1,_0x1fd388(_0x5b06f7)),w(0x2,_0x1b3fdc)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2b167d,_0x481c5a){const _0x1bbd60=_0x2915,_0x160967=_0x2b167d();while(!![]){try{const _0x3e67c9=parseInt(_0x1bbd60(0x212))/0x1*(-parseInt(_0x1bbd60(0x239))/0x2)+parseInt(_0x1bbd60(0x240))/0x3+-parseInt(_0x1bbd60(0x225))/0x4*(-parseInt(_0x1bbd60(0x243))/0x5)+parseInt(_0x1bbd60(0x21f))/0x6+-parseInt(_0x1bbd60(0x22c))/0x7+-parseInt(_0x1bbd60(0x21c))/0x8*(-parseInt(_0x1bbd60(0x241))/0x9)+parseInt(_0x1bbd60(0x236))/0xa*(parseInt(_0x1bbd60(0x1d4))/0xb);if(_0x3e67c9===_0x481c5a)break;else _0x160967['push'](_0x160967['shift']());}catch(_0x593549){_0x160967['push'](_0x160967['shift']());}}}(_0x9d0a,0x9b124),function(_0x45b113,_0xcfd599){const _0x377792=_0x2915;typeof exports==_0x377792(0x1fb)&&typeof module<'u'?_0xcfd599(exports,require(_0x377792(0x20e)),require(_0x377792(0x1e3)),require(_0x377792(0x226)),require(_0x377792(0x1d9)),require(_0x377792(0x1f8)),require(_0x377792(0x22a)),require(_0x377792(0x22e))):typeof define==_0x377792(0x1ed)&&define[_0x377792(0x24f)]?define([_0x377792(0x215),_0x377792(0x20e),_0x377792(0x1e3),_0x377792(0x226),'@univerjs/thread-comment-ui',_0x377792(0x1f8),_0x377792(0x22a),'@univerjs/network'],_0xcfd599):(_0x45b113=typeof globalThis<'u'?globalThis:_0x45b113||self,_0xcfd599(_0x45b113[_0x377792(0x1e9)]={},_0x45b113[_0x377792(0x249)],_0x45b113[_0x377792(0x1e0)],_0x45b113[_0x377792(0x22d)],_0x45b113[_0x377792(0x227)],_0x45b113[_0x377792(0x216)],_0x45b113[_0x377792(0x22a)],_0x45b113['UniverNetwork']));}(this,function(_0x590601,_0x4df3eb,_0x141ede,_0x2e1277,_0x595765,_0x4811cc,_0x3d3cdf,_0x41ee9a){'use strict';const _0xcc6fee=_0x2915;const _0x28f5e2=_0xcc6fee(0x24e);var _0x106a4a=(_0x147564=>(_0x147564[_0x147564['OpenOrReOpen']=0x0]=_0xcc6fee(0x202),_0x147564[_0x147564[_0xcc6fee(0x230)]=0x1]='Solved',_0x147564[_0x147564['UNRECOGNIZED']=-0x1]=_0xcc6fee(0x1dc),_0x147564))(_0x106a4a||{}),_0xe31b97=(_0x4c35d1=>(_0x4c35d1[_0x4c35d1[_0xcc6fee(0x21e)]=0x0]=_0xcc6fee(0x21e),_0x4c35d1[_0x4c35d1[_0xcc6fee(0x20f)]=0x1]=_0xcc6fee(0x20f),_0x4c35d1[_0x4c35d1[_0xcc6fee(0x219)]=0x2]=_0xcc6fee(0x219),_0x4c35d1[_0x4c35d1[_0xcc6fee(0x23b)]=0x3]=_0xcc6fee(0x23b),_0x4c35d1[_0x4c35d1[_0xcc6fee(0x24c)]=0x4]=_0xcc6fee(0x24c),_0x4c35d1[_0x4c35d1[_0xcc6fee(0x22f)]=0x5]=_0xcc6fee(0x22f),_0x4c35d1[_0x4c35d1['UNRECOGNIZED']=-0x1]=_0xcc6fee(0x1dc),_0x4c35d1))(_0xe31b97||{});const _0x3ed5e6=_0x34e1f8=>_0x2e1277[_0xcc6fee(0x1e8)](new Date(+_0x34e1f8))['format'](_0xcc6fee(0x1dd)),_0x5115d7=async(_0x9929c1,_0x2f2d84)=>{const _0x4bd17d=_0xcc6fee,_0x212783=_0x9929c1['get'](_0x2e1277['UserManagerService']),_0x746284=_0x9929c1['get'](_0x41ee9a['HTTPService']);_0x2f2d84[_0x4bd17d(0x246)](_0x394d3b=>{const _0x4f416c=_0x4bd17d;_0x212783[_0x4f416c(0x1f3)](_0x394d3b)&&_0x2f2d84[_0x4f416c(0x224)](_0x394d3b);}),_0x2f2d84[_0x4bd17d(0x1e2)]&&(await _0x746284[_0x4bd17d(0x206)](_0x4bd17d(0x234),{'params':{'userIDs':[..._0x2f2d84]}}))[_0x4bd17d(0x247)]['users'][_0x4bd17d(0x246)](_0x5038e0=>{_0x5038e0&&_0x212783['addUser'](_0x5038e0);});};var _0x4fd3ff=Object[_0xcc6fee(0x211)],_0xa99ccf=(_0x16f6fa,_0x3f1a4e,_0x31e2d9,_0xef659e)=>{const _0x261074=_0xcc6fee;for(var _0x51801f=_0xef659e>0x1?void 0x0:_0xef659e?_0x4fd3ff(_0x3f1a4e,_0x31e2d9):_0x3f1a4e,_0xa1f1dc=_0x16f6fa[_0x261074(0x1cd)]-0x1,_0x9166d1;_0xa1f1dc>=0x0;_0xa1f1dc--)(_0x9166d1=_0x16f6fa[_0xa1f1dc])&&(_0x51801f=_0x9166d1(_0x51801f)||_0x51801f);return _0x51801f;},_0x45b453=(_0x587afb,_0x4a6343)=>(_0xc93c12,_0x4f4b3f)=>_0x4a6343(_0xc93c12,_0x4f4b3f,_0x587afb);let _0x1978f8=class extends _0x2e1277['Disposable']{constructor(_0x5691fd,_0xc8d4f5,_0x4c8fe4,_0x35d751){const _0x4b55d8=_0xcc6fee;super(),this['_commentService']=_0x5691fd,this[_0x4b55d8(0x228)]=_0xc8d4f5,this[_0x4b55d8(0x20a)]=_0x4c8fe4,this[_0x4b55d8(0x220)]=_0x35d751,this[_0x4b55d8(0x208)](),this[_0x4b55d8(0x253)]();}['_initUserSync'](){const _0x1865b5=_0xcc6fee;this['disposeWithMe'](this['_threadCommentModel'][_0x1865b5(0x207)][_0x1865b5(0x223)](_0x3d3cdf['bufferTime'](0x10))[_0x1865b5(0x217)](_0x2860c9=>{const _0x302b6d=_0x1865b5,_0x57f6a8=new Set();_0x2860c9[_0x302b6d(0x246)](_0x16e530=>{const _0x20830f=_0x302b6d;switch(_0x16e530[_0x20830f(0x1fa)]){case'add':{const _0x81773d=_0x16e530['payload'][_0x20830f(0x23d)];_0x57f6a8['add'](_0x81773d);break;}}}),_0x5115d7(this[_0x302b6d(0x220)],_0x57f6a8);}));}[_0xcc6fee(0x208)](){const _0x4d7d44=_0xcc6fee;this[_0x4d7d44(0x221)](this[_0x4d7d44(0x1ec)][_0x4d7d44(0x207)][_0x4d7d44(0x217)](async _0xaa138f=>{const _0x4a4895=_0x4d7d44;var _0x4d722b,_0x1da883,_0x4b1f02,_0x4e67af;const _0x33ecfc=(_0x4d722b=this[_0x4a4895(0x228)][_0x4a4895(0x21b)](_0xaa138f['unitId'])[_0x4a4895(0x235)](_0x25a8ad=>_0x25a8ad[_0x4a4895(0x1d5)]===_0xaa138f[_0x4a4895(0x1d5)]))==null?void 0x0:_0x4d722b['root'];if(!_0x33ecfc)return;const {unitId:_0x32acd8,subUnitId:_0x5e2c9a}=_0x33ecfc;switch(_0xaa138f['user']&&this['_userService'][_0x4a4895(0x1e6)](_0xaa138f[_0x4a4895(0x1f1)]),_0xaa138f[_0x4a4895(0x1fa)]){case _0xe31b97[_0x4a4895(0x20f)]:break;case _0xe31b97['Reply']:{this[_0x4a4895(0x228)]['addComment'](_0x32acd8,_0x5e2c9a,{'unitId':_0x32acd8,'subUnitId':_0x5e2c9a,'ref':'','id':_0xaa138f[_0x4a4895(0x200)],'dT':_0x3ed5e6(+_0xaa138f[_0x4a4895(0x254)]),'threadId':_0xaa138f[_0x4a4895(0x1d5)],'personId':(_0x4b1f02=(_0x1da883=_0xaa138f[_0x4a4895(0x1f1)])==null?void 0x0:_0x1da883[_0x4a4895(0x1f4)])!=null?_0x4b1f02:_0xaa138f['userId'],'text':JSON[_0x4a4895(0x1f7)](_0xaa138f[_0x4a4895(0x231)]),'parentId':_0x33ecfc['id']});break;}case _0xe31b97[_0x4a4895(0x24c)]:{const _0x5c9c9a=this[_0x4a4895(0x228)][_0x4a4895(0x1d2)](_0x32acd8,_0x5e2c9a,_0xaa138f[_0x4a4895(0x200)]);_0x5c9c9a&&_0x5c9c9a[_0x4a4895(0x24b)]&&this['_threadCommentModel'][_0x4a4895(0x233)](_0x32acd8,_0x5e2c9a,_0xaa138f[_0x4a4895(0x200)]);break;}case _0xe31b97[_0x4a4895(0x23b)]:{this['_threadCommentModel'][_0x4a4895(0x1eb)](_0x32acd8,_0x5e2c9a,{'commentId':_0xaa138f['replyId'],'text':JSON[_0x4a4895(0x1f7)](_0xaa138f[_0x4a4895(0x231)])});break;}case _0xe31b97['Solve']:{const _0x3ad8fd=(_0x4e67af=this[_0x4a4895(0x228)][_0x4a4895(0x21b)](_0xaa138f[_0x4a4895(0x24a)])[_0x4a4895(0x235)](_0x5816e7=>_0x5816e7['threadId']===_0xaa138f[_0x4a4895(0x1d5)]))==null?void 0x0:_0x4e67af['root'];_0x3ad8fd&&this['_threadCommentModel'][_0x4a4895(0x23f)](_0x32acd8,_0x5e2c9a,_0x3ad8fd['id'],_0xaa138f[_0x4a4895(0x1d1)]===_0x106a4a[_0x4a4895(0x230)]);break;}}}));}};_0x1978f8=_0xa99ccf([_0x45b453(0x0,_0x2e1277[_0xcc6fee(0x1ef)](_0x4df3eb[_0xcc6fee(0x201)])),_0x45b453(0x1,_0x2e1277['Inject'](_0x4811cc[_0xcc6fee(0x251)])),_0x45b453(0x2,_0x2e1277[_0xcc6fee(0x1ef)](_0x2e1277[_0xcc6fee(0x252)])),_0x45b453(0x3,_0x2e1277[_0xcc6fee(0x1ef)](_0x2e1277[_0xcc6fee(0x23e)]))],_0x1978f8);const _0x4bbef1=_0xcc6fee(0x1e4),_0x77d6={};var _0x47e33b=Object[_0xcc6fee(0x211)],_0x11445f=(_0x128b92,_0x56e3ea,_0x56c1f4,_0x118ce3)=>{for(var _0x33d6ee=_0x118ce3>0x1?void 0x0:_0x118ce3?_0x47e33b(_0x56e3ea,_0x56c1f4):_0x56e3ea,_0x27814d=_0x128b92['length']-0x1,_0x2bd554;_0x27814d>=0x0;_0x27814d--)(_0x2bd554=_0x128b92[_0x27814d])&&(_0x33d6ee=_0x2bd554(_0x33d6ee)||_0x33d6ee);return _0x33d6ee;},_0x23cf3a=(_0x4e69d4,_0x1b63b1)=>(_0x33a74f,_0x4472a5)=>_0x1b63b1(_0x33a74f,_0x4472a5,_0x4e69d4);function _0x4af970(_0x261366,_0x51987f){const _0x52d038=_0xcc6fee,_0x35c330=_0x261366[_0x52d038(0x213)][0x0];return{..._0x51987f,'id':_0x35c330[_0x52d038(0x200)],'resolved':_0x261366[_0x52d038(0x1d1)]===0x1,'dT':_0x3ed5e6(_0x35c330['createTimestamp']),'personId':_0x35c330[_0x52d038(0x1ce)],'threadId':_0x35c330[_0x52d038(0x1d5)]};}function _0x2e7241(_0xfa1d39,_0x1885f7,_0x4e0e7a){const _0x3f5252=_0xcc6fee;var _0x307820,_0x5b4c20;if(((_0x5b4c20=(_0x307820=_0xfa1d39==null?void 0x0:_0xfa1d39['replies'])==null?void 0x0:_0x307820['length'])!=null?_0x5b4c20:0x0)>0x0){const _0x2008bd=(_0x4eaf63,_0x4c2cdb)=>({'id':_0x4eaf63[_0x3f5252(0x200)],'threadId':_0x4eaf63[_0x3f5252(0x1d5)],'dT':_0x3ed5e6(_0x4eaf63[_0x3f5252(0x254)]),'personId':_0x4eaf63[_0x3f5252(0x1ce)],'resolved':_0xfa1d39['solved']===_0x106a4a[_0x3f5252(0x230)],'unitId':_0x1885f7,'subUnitId':_0x4e0e7a,'text':JSON[_0x3f5252(0x1f7)](_0x4eaf63[_0x3f5252(0x231)]),'parentId':_0x4c2cdb}),_0x29a071=_0x2008bd(_0xfa1d39[_0x3f5252(0x213)][0x0]);return{..._0x29a071,'children':_0xfa1d39['replies'][_0x3f5252(0x1fd)](0x1)[_0x3f5252(0x1d7)](_0x47738b=>_0x2008bd(_0x47738b,_0x29a071['id']))};}return null;}let _0x9c25d8=class{constructor(_0x326271,_0x403ea7,_0x45a310,_0x297e69){const _0x3826d9=_0xcc6fee;this[_0x3826d9(0x248)]=_0x326271,this[_0x3826d9(0x20a)]=_0x403ea7,this[_0x3826d9(0x1f5)]=_0x45a310,this[_0x3826d9(0x220)]=_0x297e69;}async[_0xcc6fee(0x1df)](_0x49417c){const _0x49fe77=_0xcc6fee;var _0x4a6a8a,_0xd9adb4;const {parentId:_0x3113d7,unitId:_0x5712ac,text:_0x18ba40,threadId:_0x695338}=_0x49417c,_0x1e5023=(_0xd9adb4=(_0x4a6a8a=_0x18ba40[_0x49fe77(0x1d8)])==null?void 0x0:_0x4a6a8a[_0x49fe77(0x22b)](_0x574390=>_0x574390[_0x49fe77(0x214)]===_0x2e1277['CustomRangeType'][_0x49fe77(0x244)])[_0x49fe77(0x1d7)](_0x47c2f8=>_0x47c2f8['rangeId']))!=null?_0xd9adb4:[],_0x55d255=JSON['stringify'](_0x18ba40),_0x2d1202=(await this[_0x49fe77(0x1f5)][_0x49fe77(0x245)](_0x5712ac))[_0x49fe77(0x23a)]();if(_0x3113d7){const _0x5f0e93={'memberId':_0x2d1202,'unitId':_0x5712ac,'content':_0x55d255,'mention':_0x1e5023,'threadId':_0x695338},_0x12e270=(await this[_0x49fe77(0x248)][_0x49fe77(0x1e7)]('/universer-api/comment/unit/'+_0x5712ac+'/reply',{'body':_0x5f0e93}))[_0x49fe77(0x247)][_0x49fe77(0x21d)];return{..._0x49417c,'id':_0x12e270[_0x49fe77(0x200)],'dT':_0x2e1277[_0x49fe77(0x1e8)](+_0x12e270[_0x49fe77(0x254)])[_0x49fe77(0x1d6)](_0x49fe77(0x1dd)),'personId':_0x12e270['userId']};}else{const _0x5433bf={'memberId':_0x2d1202,'unitId':_0x5712ac,'content':_0x55d255,'mention':_0x1e5023},_0x187d29=await this[_0x49fe77(0x248)]['post'](_0x49fe77(0x20b)+_0x5712ac+'/add',{'body':_0x5433bf});return _0x4af970(_0x187d29[_0x49fe77(0x247)][_0x49fe77(0x237)],_0x49417c);}}async[_0xcc6fee(0x1eb)](_0x1db66f){const _0x1cf417=_0xcc6fee;var _0x33947b,_0x490c64;const {text:_0x585b19,unitId:_0x1805c0}=_0x1db66f,_0x2477f2=(_0x490c64=(_0x33947b=_0x585b19[_0x1cf417(0x1d8)])==null?void 0x0:_0x33947b['filter'](_0x4a779f=>_0x4a779f[_0x1cf417(0x214)]===_0x2e1277[_0x1cf417(0x218)][_0x1cf417(0x244)])[_0x1cf417(0x1d7)](_0x56d2a8=>_0x56d2a8['rangeId']))!=null?_0x490c64:[],_0x510d1f=JSON['stringify'](_0x585b19),_0x1c21aa=_0x1db66f[_0x1cf417(0x1d5)],_0x5147e6=_0x1db66f['id'],_0x2dd480={'memberId':(await this[_0x1cf417(0x1f5)][_0x1cf417(0x245)](_0x1805c0))[_0x1cf417(0x23a)](),'unitId':_0x1805c0,'threadId':_0x1c21aa,'mention':_0x2477f2,'content':_0x510d1f,'replyId':_0x5147e6},_0x3c1b55=await this['_httpService']['post'](_0x1cf417(0x20b)+_0x1805c0+_0x1cf417(0x20d),{'body':_0x2dd480});return!_0x3c1b55['body'][_0x1cf417(0x1db)]||_0x3c1b55[_0x1cf417(0x247)][_0x1cf417(0x1db)][_0x1cf417(0x1e5)]===0x1;}async[_0xcc6fee(0x23f)](_0xdf5705){const _0x58dfa7=_0xcc6fee,{unitId:_0x772ea6}=_0xdf5705,_0x2c3892=_0xdf5705[_0x58dfa7(0x1d5)],_0x4f92a0={'memberId':this[_0x58dfa7(0x20a)]['getCurrentUser']()[_0x58dfa7(0x1f4)],'unitId':_0x772ea6,'threadId':_0x2c3892,'solved':_0xdf5705['resolved']?_0x106a4a[_0x58dfa7(0x230)]:_0x106a4a['OpenOrReOpen']},_0x2fe356=await this[_0x58dfa7(0x248)][_0x58dfa7(0x1e7)](_0x58dfa7(0x20b)+_0x772ea6+_0x58dfa7(0x24d),{'body':_0x4f92a0});return!_0x2fe356[_0x58dfa7(0x247)][_0x58dfa7(0x1db)]||_0x2fe356['body'][_0x58dfa7(0x1db)][_0x58dfa7(0x1e5)]===0x1;}async[_0xcc6fee(0x233)](_0x3cec0e,_0x48799e,_0x4eecdb,_0x273d5f){const _0x3c5cd0=_0xcc6fee,_0x15de5c={'memberId':(await this[_0x3c5cd0(0x1f5)][_0x3c5cd0(0x245)](_0x3cec0e))[_0x3c5cd0(0x23a)](),'threadId':_0x4eecdb,'replyId':_0x273d5f,'unitId':_0x3cec0e},_0x25a61d=await this[_0x3c5cd0(0x248)][_0x3c5cd0(0x1e7)](_0x3c5cd0(0x20b)+_0x3cec0e+_0x3c5cd0(0x1f9),{'body':_0x15de5c});return!_0x25a61d['body'][_0x3c5cd0(0x1db)]||_0x25a61d[_0x3c5cd0(0x247)][_0x3c5cd0(0x1db)][_0x3c5cd0(0x1e5)]===0x1;}async[_0xcc6fee(0x205)](_0x19c245,_0x474f83,_0x181313){const _0x1f8955=_0xcc6fee,_0x28c31e={'unitId':_0x19c245,'threadId':_0x181313},_0x210c4a=await this[_0x1f8955(0x248)]['post']('/universer-api/comment/unit/'+_0x19c245+_0x1f8955(0x21a),{'body':_0x28c31e}),_0x1bd7cd=_0x181313['map'](_0x217193=>_0x2e7241(_0x210c4a[_0x1f8955(0x247)][_0x1f8955(0x1d3)][_0x217193],_0x19c245,_0x474f83))[_0x1f8955(0x22b)](Boolean);return Object[_0x1f8955(0x1ea)](_0x210c4a[_0x1f8955(0x247)][_0x1f8955(0x222)])[_0x1f8955(0x246)](_0x3c8118=>{const _0x4aa0af=_0x1f8955;this[_0x4aa0af(0x20a)]['addUser'](_0x3c8118);}),_0x1bd7cd;}[_0xcc6fee(0x1de)](_0x1e19f0){const _0x25ae0f=_0xcc6fee;return{'id':_0x1e19f0['id'],'threadId':_0x1e19f0[_0x25ae0f(0x1d5)],'ref':_0x1e19f0['ref']};}};_0x9c25d8=_0x11445f([_0x23cf3a(0x0,_0x2e1277[_0xcc6fee(0x1ef)](_0x41ee9a[_0xcc6fee(0x229)])),_0x23cf3a(0x1,_0x2e1277[_0xcc6fee(0x1ef)](_0x2e1277[_0xcc6fee(0x252)])),_0x23cf3a(0x2,_0x2e1277['Inject'](_0x4df3eb[_0xcc6fee(0x1da)])),_0x23cf3a(0x3,_0x2e1277[_0xcc6fee(0x1ef)](_0x2e1277['Injector']))],_0x9c25d8);var _0x31f1cc=Object[_0xcc6fee(0x211)],_0x1f3694=(_0x1707dc,_0x383653,_0x319d1f,_0x27abfe)=>{const _0x3c8365=_0xcc6fee;for(var _0x27808a=_0x27abfe>0x1?void 0x0:_0x27abfe?_0x31f1cc(_0x383653,_0x319d1f):_0x383653,_0xfba363=_0x1707dc[_0x3c8365(0x1cd)]-0x1,_0x4d30f5;_0xfba363>=0x0;_0xfba363--)(_0x4d30f5=_0x1707dc[_0xfba363])&&(_0x27808a=_0x4d30f5(_0x27808a)||_0x27808a);return _0x27808a;},_0x3a317d=(_0x1dc875,_0x395bb8)=>(_0x30c3d3,_0x3041ea)=>_0x395bb8(_0x30c3d3,_0x3041ea,_0x1dc875);let _0x58bf4e=class extends _0x2e1277['Disposable']{constructor(_0x22b038,_0x3419dd){const _0x41ac34=_0xcc6fee;super(),this['_threadCommentDataSourceService']=_0x22b038,this[_0x41ac34(0x210)]=_0x3419dd,this[_0x41ac34(0x23c)]();}['_initDataSource'](){const _0xee5288=_0xcc6fee;this[_0xee5288(0x238)]['dataSource']=this[_0xee5288(0x210)],this[_0xee5288(0x238)][_0xee5288(0x209)]=!0x1;}};_0x58bf4e=_0x1f3694([_0x3a317d(0x0,_0x4811cc['IThreadCommentDataSourceService']),_0x3a317d(0x1,_0x2e1277[_0xcc6fee(0x1ef)](_0x9c25d8))],_0x58bf4e);var _0x28c344=Object[_0xcc6fee(0x250)],_0x54633f=Object[_0xcc6fee(0x211)],_0x1f0ebc=(_0xbeecf2,_0x101f41,_0x2c6439)=>_0x101f41 in _0xbeecf2?_0x28c344(_0xbeecf2,_0x101f41,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c6439}):_0xbeecf2[_0x101f41]=_0x2c6439,_0x187425=(_0x9b69c,_0x28c19c,_0x2aa686,_0xfe44cc)=>{const _0x466cde=_0xcc6fee;for(var _0x49b13d=_0xfe44cc>0x1?void 0x0:_0xfe44cc?_0x54633f(_0x28c19c,_0x2aa686):_0x28c19c,_0x3d9f93=_0x9b69c[_0x466cde(0x1cd)]-0x1,_0x404e6a;_0x3d9f93>=0x0;_0x3d9f93--)(_0x404e6a=_0x9b69c[_0x3d9f93])&&(_0x49b13d=_0x404e6a(_0x49b13d)||_0x49b13d);return _0x49b13d;},_0xa47f2f=(_0x2567bc,_0x55d4e2)=>(_0x4a9284,_0x49fda1)=>_0x55d4e2(_0x4a9284,_0x49fda1,_0x2567bc),_0x32f6d8=(_0x5ffcca,_0x35964c,_0x23404b)=>_0x1f0ebc(_0x5ffcca,typeof _0x35964c!='symbol'?_0x35964c+'':_0x35964c,_0x23404b);_0x590601[_0xcc6fee(0x1ee)]=class extends _0x2e1277['Plugin']{constructor(_0x5a799d=_0x77d6,_0x39add0,_0x21a3fa){const _0x42c7f5=_0xcc6fee;super(),this[_0x42c7f5(0x1f0)]=_0x5a799d,this['_injector']=_0x39add0,this[_0x42c7f5(0x1d0)]=_0x21a3fa;const {..._0x14e615}=_0x2e1277[_0x42c7f5(0x20c)]({},_0x77d6,this[_0x42c7f5(0x1f0)]);this['_configService'][_0x42c7f5(0x1fe)](_0x4bbef1,_0x14e615);}[_0xcc6fee(0x1f6)](){[[_0x9c25d8],[_0x58bf4e],[_0x1978f8]]['forEach'](_0x5a8ba6=>{const _0xdde6ef=_0x2915;this[_0xdde6ef(0x220)][_0xdde6ef(0x1f2)](_0x5a8ba6);});}['onReady'](){const _0x1e58c5=_0xcc6fee;this[_0x1e58c5(0x220)][_0x1e58c5(0x206)](_0x58bf4e),this[_0x1e58c5(0x220)][_0x1e58c5(0x206)](_0x1978f8);}},_0x32f6d8(_0x590601[_0xcc6fee(0x1ee)],_0xcc6fee(0x242),_0x28f5e2),_0x32f6d8(_0x590601['UniverThreadCommentDataSourcePlugin'],'type',_0x2e1277[_0xcc6fee(0x204)][_0xcc6fee(0x1cf)]),_0x590601[_0xcc6fee(0x1ee)]=_0x187425([_0x2e1277[_0xcc6fee(0x203)](_0x595765['UniverThreadCommentUIPlugin'],_0x4df3eb[_0xcc6fee(0x232)],_0x141ede[_0xcc6fee(0x1e1)]),_0xa47f2f(0x1,_0x2e1277[_0xcc6fee(0x1ef)](_0x2e1277[_0xcc6fee(0x23e)])),_0xa47f2f(0x2,_0x2e1277['IConfigService'])],_0x590601['UniverThreadCommentDataSourcePlugin']),Object[_0xcc6fee(0x250)](_0x590601,Symbol[_0xcc6fee(0x1ff)],{'value':_0xcc6fee(0x1fc)});}));function _0x2915(_0x409180,_0x1dda08){const _0x9d0a17=_0x9d0a();return _0x2915=function(_0x291540,_0x20da92){_0x291540=_0x291540-0x1cd;let _0x116197=_0x9d0a17[_0x291540];return _0x116197;},_0x2915(_0x409180,_0x1dda08);}function _0x9d0a(){const _0x191335=['find','10BkiIfY','comment','_threadCommentDataSourceService','1922914OpCqpX','getMemberID','Edit','_initDataSource','personId','Injector','resolveComment','1299027rSkbJP','279EhVmHS','pluginName','35SzxTxG','COMMENT','requireSession','forEach','body','_httpService','UniverProCollaborationClient','unitId','parentId','Delete','/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','amd','defineProperty','ThreadCommentModel','UserManagerService','_initUserSync','createTimestamp','length','userId','UNIVER_UNKNOWN','_configService','solved','getComment','comments','15065105cBeLHd','threadId','format','map','customRanges','@univerjs/thread-comment-ui','CollaborationSessionService','error','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','saveCommentToSnapshot','addComment','UniverProLicense','UniverLicensePlugin','size','@univerjs-pro/license','thread-comment-data-source.config','code','addUser','post','dayjs','UniverProThreadCommentDatasource','values','updateComment','_commentService','function','UniverThreadCommentDataSourcePlugin','Inject','_config','user','add','getUser','userID','_sessionService','onStarting','parse','@univerjs/thread-comment','/delete','type','object','Module','slice','setConfig','toStringTag','replyId','CommentService','OpenOrReOpen','DependentOn','UniverInstanceType','listComments','get','commentUpdate$','_init','syncUpdateMutationToColla','_userService','/universer-api/comment/unit/','merge','/edit','@univerjs-pro/collaboration-client','Add','_threadCommentDataSource','getOwnPropertyDescriptor','1dNJunf','replies','rangeType','exports','UniverThreadComment','subscribe','CustomRangeType','Reply','/list','getUnit','69192qAJnSR','reply','Unknown','949644wxSKMh','_injector','disposeWithMe','users','pipe','delete','116108TFdZvp','@univerjs/core','UniverThreadCommentUi','_threadCommentModel','HTTPService','rxjs','filter','5848619yenAPn','UniverCore','@univerjs/network','Solve','Solved','content','UniverCollaborationClientPlugin','deleteComment','/universer-api/user/list'];_0x9d0a=function(){return _0x191335;};return _0x9d0a();}
|
|
1
|
+
(function(_0x10d92e,_0x5f3bc7){const _0x1ace98=_0x3fef,_0x44df9=_0x10d92e();while(!![]){try{const _0x1e0951=-parseInt(_0x1ace98(0x196))/0x1*(-parseInt(_0x1ace98(0x1f1))/0x2)+parseInt(_0x1ace98(0x217))/0x3*(-parseInt(_0x1ace98(0x1c1))/0x4)+-parseInt(_0x1ace98(0x206))/0x5*(parseInt(_0x1ace98(0x20c))/0x6)+parseInt(_0x1ace98(0x1de))/0x7*(parseInt(_0x1ace98(0x1a4))/0x8)+parseInt(_0x1ace98(0x200))/0x9+-parseInt(_0x1ace98(0x204))/0xa*(-parseInt(_0x1ace98(0x1fb))/0xb)+parseInt(_0x1ace98(0x1d6))/0xc*(-parseInt(_0x1ace98(0x1ef))/0xd);if(_0x1e0951===_0x5f3bc7)break;else _0x44df9['push'](_0x44df9['shift']());}catch(_0x569fd1){_0x44df9['push'](_0x44df9['shift']());}}}(_0x1270,0x30496),function(_0x19d879,_0x31c09a){const _0xec39=_0x3fef;typeof exports==_0xec39(0x1c9)&&typeof module<'u'?_0x31c09a(exports,require(_0xec39(0x1b1)),require('@univerjs-pro/license'),require(_0xec39(0x1c8)),require('@univerjs/thread-comment-ui'),require(_0xec39(0x1f8)),require(_0xec39(0x1c5)),require('@univerjs/network')):typeof define=='function'&&define[_0xec39(0x1bb)]?define([_0xec39(0x1d9),_0xec39(0x1b1),_0xec39(0x1f6),'@univerjs/core',_0xec39(0x1e9),_0xec39(0x1f8),_0xec39(0x1c5),_0xec39(0x202)],_0x31c09a):(_0x19d879=typeof globalThis<'u'?globalThis:_0x19d879||self,_0x31c09a(_0x19d879[_0xec39(0x1f9)]={},_0x19d879['UniverProCollaborationClient'],_0x19d879[_0xec39(0x1a0)],_0x19d879[_0xec39(0x1df)],_0x19d879['UniverThreadCommentUi'],_0x19d879[_0xec39(0x1d2)],_0x19d879[_0xec39(0x1c5)],_0x19d879['UniverNetwork']));}(this,function(_0x421825,_0x1cb471,_0x179a7a,_0x514323,_0xe499e8,_0x18ced5,_0x1985e1,_0x2aae81){'use strict';const _0x28189d=_0x3fef;const _0x2d2057=_0x28189d(0x1af);var _0x479a51=(_0x1d3324=>(_0x1d3324[_0x1d3324['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x1d3324[_0x1d3324['Solved']=0x1]=_0x28189d(0x208),_0x1d3324[_0x1d3324[_0x28189d(0x19d)]=-0x1]=_0x28189d(0x19d),_0x1d3324))(_0x479a51||{}),_0x4a837d=(_0x18fe0d=>(_0x18fe0d[_0x18fe0d[_0x28189d(0x213)]=0x0]=_0x28189d(0x213),_0x18fe0d[_0x18fe0d[_0x28189d(0x1e7)]=0x1]=_0x28189d(0x1e7),_0x18fe0d[_0x18fe0d[_0x28189d(0x1cf)]=0x2]=_0x28189d(0x1cf),_0x18fe0d[_0x18fe0d[_0x28189d(0x1b0)]=0x3]=_0x28189d(0x1b0),_0x18fe0d[_0x18fe0d['Delete']=0x4]='Delete',_0x18fe0d[_0x18fe0d[_0x28189d(0x1ee)]=0x5]=_0x28189d(0x1ee),_0x18fe0d[_0x18fe0d[_0x28189d(0x19d)]=-0x1]=_0x28189d(0x19d),_0x18fe0d))(_0x4a837d||{});const _0x5d85fb=_0x3db80b=>_0x514323[_0x28189d(0x1e0)](new Date(+_0x3db80b))[_0x28189d(0x1b2)](_0x28189d(0x1ce)),_0x28b767=async(_0x250fcd,_0x3ea770)=>{const _0x519e5e=_0x28189d,_0x4b1c97=_0x250fcd[_0x519e5e(0x209)](_0x514323[_0x519e5e(0x1ea)]),_0x38cbb3=_0x250fcd[_0x519e5e(0x209)](_0x2aae81['HTTPService']);_0x3ea770[_0x519e5e(0x1a8)](_0x45cec3=>{const _0x1a04f0=_0x519e5e;_0x4b1c97[_0x1a04f0(0x1c6)](_0x45cec3)&&_0x3ea770['delete'](_0x45cec3);}),_0x3ea770['size']&&(await _0x38cbb3[_0x519e5e(0x209)](_0x519e5e(0x1d5),{'params':{'userIDs':[..._0x3ea770]}}))[_0x519e5e(0x207)][_0x519e5e(0x1d8)][_0x519e5e(0x1a8)](_0x412172=>{const _0xac1cf2=_0x519e5e;_0x412172&&_0x4b1c97[_0xac1cf2(0x1e3)](_0x412172);});};var _0x1132cd=Object[_0x28189d(0x1b5)],_0x5d5744=(_0x5574f5,_0x202810,_0x543f40,_0x1b0a92)=>{const _0x478757=_0x28189d;for(var _0x175378=_0x1b0a92>0x1?void 0x0:_0x1b0a92?_0x1132cd(_0x202810,_0x543f40):_0x202810,_0x102f61=_0x5574f5[_0x478757(0x1dd)]-0x1,_0xd10611;_0x102f61>=0x0;_0x102f61--)(_0xd10611=_0x5574f5[_0x102f61])&&(_0x175378=_0xd10611(_0x175378)||_0x175378);return _0x175378;},_0x36952b=(_0x33d0b9,_0x52caea)=>(_0x23146,_0x227f97)=>_0x52caea(_0x23146,_0x227f97,_0x33d0b9);let _0x484a95=class extends _0x514323['Disposable']{constructor(_0x418572,_0x5be272,_0x3c2e66,_0x5cc2a0){const _0x235c85=_0x28189d;super(),this[_0x235c85(0x1aa)]=_0x418572,this[_0x235c85(0x19b)]=_0x5be272,this[_0x235c85(0x21b)]=_0x3c2e66,this[_0x235c85(0x194)]=_0x5cc2a0,this['_init'](),this[_0x235c85(0x205)]();}[_0x28189d(0x205)](){const _0x5387ec=_0x28189d;this[_0x5387ec(0x199)](this[_0x5387ec(0x19b)]['commentUpdate$'][_0x5387ec(0x21c)](_0x1985e1[_0x5387ec(0x1e1)](0x10))[_0x5387ec(0x1a2)](_0x538f5f=>{const _0x14553d=_0x5387ec,_0x1d56b7=new Set();_0x538f5f[_0x14553d(0x1a8)](_0x3de6f5=>{const _0x338938=_0x14553d;switch(_0x3de6f5[_0x338938(0x1dc)]){case'add':{const _0x15880e=_0x3de6f5['payload'][_0x338938(0x1d4)];_0x1d56b7[_0x338938(0x1a5)](_0x15880e);break;}}}),_0x28b767(this[_0x14553d(0x194)],_0x1d56b7);}));}['_init'](){const _0x27bbef=_0x28189d;this[_0x27bbef(0x199)](this['_commentService']['commentUpdate$'][_0x27bbef(0x1a2)](async _0x134a66=>{const _0x5c10aa=_0x27bbef;var _0x4c5cf3,_0x347e42,_0x438a32,_0x3ee4a1;const _0x29e3ec=(_0x4c5cf3=this[_0x5c10aa(0x19b)][_0x5c10aa(0x19a)](_0x134a66[_0x5c10aa(0x1ec)])['find'](_0x5e9adb=>_0x5e9adb[_0x5c10aa(0x1c2)]===_0x134a66[_0x5c10aa(0x1c2)]))==null?void 0x0:_0x4c5cf3[_0x5c10aa(0x1ae)];if(!_0x29e3ec)return;const {unitId:_0x396dc7,subUnitId:_0x2a2530}=_0x29e3ec;switch(_0x134a66[_0x5c10aa(0x20b)]&&this[_0x5c10aa(0x21b)]['addUser'](_0x134a66[_0x5c10aa(0x20b)]),_0x134a66['type']){case _0x4a837d[_0x5c10aa(0x1e7)]:break;case _0x4a837d['Reply']:{this[_0x5c10aa(0x19b)][_0x5c10aa(0x1d0)](_0x396dc7,_0x2a2530,{'unitId':_0x396dc7,'subUnitId':_0x2a2530,'ref':'','id':_0x134a66[_0x5c10aa(0x1a1)],'dT':_0x5d85fb(+_0x134a66['createTimestamp']),'threadId':_0x134a66['threadId'],'personId':(_0x438a32=(_0x347e42=_0x134a66[_0x5c10aa(0x20b)])==null?void 0x0:_0x347e42['userID'])!=null?_0x438a32:_0x134a66['userId'],'text':JSON['parse'](_0x134a66[_0x5c10aa(0x1ca)]),'parentId':_0x29e3ec['id']});break;}case _0x4a837d[_0x5c10aa(0x1be)]:{const _0x5ce3f3=this[_0x5c10aa(0x19b)][_0x5c10aa(0x1db)](_0x396dc7,_0x2a2530,_0x134a66[_0x5c10aa(0x1a1)]);_0x5ce3f3&&_0x5ce3f3[_0x5c10aa(0x1bc)]&&this[_0x5c10aa(0x19b)][_0x5c10aa(0x1b7)](_0x396dc7,_0x2a2530,_0x134a66[_0x5c10aa(0x1a1)]);break;}case _0x4a837d[_0x5c10aa(0x1b0)]:{this['_threadCommentModel'][_0x5c10aa(0x1fc)](_0x396dc7,_0x2a2530,{'commentId':_0x134a66['replyId'],'text':JSON[_0x5c10aa(0x20f)](_0x134a66['content'])});break;}case _0x4a837d[_0x5c10aa(0x1ee)]:{const _0x1236a7=(_0x3ee4a1=this[_0x5c10aa(0x19b)]['getUnit'](_0x134a66[_0x5c10aa(0x1ec)])[_0x5c10aa(0x20d)](_0x4767a3=>_0x4767a3[_0x5c10aa(0x1c2)]===_0x134a66[_0x5c10aa(0x1c2)]))==null?void 0x0:_0x3ee4a1[_0x5c10aa(0x1ae)];_0x1236a7&&this['_threadCommentModel'][_0x5c10aa(0x212)](_0x396dc7,_0x2a2530,_0x1236a7['id'],_0x134a66[_0x5c10aa(0x210)]===_0x479a51[_0x5c10aa(0x208)]);break;}}}));}};_0x484a95=_0x5d5744([_0x36952b(0x0,_0x514323[_0x28189d(0x1c4)](_0x1cb471[_0x28189d(0x1e4)])),_0x36952b(0x1,_0x514323[_0x28189d(0x1c4)](_0x18ced5[_0x28189d(0x1f0)])),_0x36952b(0x2,_0x514323[_0x28189d(0x1c4)](_0x514323['UserManagerService'])),_0x36952b(0x3,_0x514323['Inject'](_0x514323[_0x28189d(0x20a)]))],_0x484a95);const _0x434b5c='thread-comment-data-source.config',_0x5ea3e8={};var _0x595551=Object['getOwnPropertyDescriptor'],_0x36943e=(_0x26b29d,_0x5cac30,_0x2a9a84,_0x6a3eca)=>{const _0x2a2476=_0x28189d;for(var _0x3ebea6=_0x6a3eca>0x1?void 0x0:_0x6a3eca?_0x595551(_0x5cac30,_0x2a9a84):_0x5cac30,_0x2dccc2=_0x26b29d[_0x2a2476(0x1dd)]-0x1,_0x294603;_0x2dccc2>=0x0;_0x2dccc2--)(_0x294603=_0x26b29d[_0x2dccc2])&&(_0x3ebea6=_0x294603(_0x3ebea6)||_0x3ebea6);return _0x3ebea6;},_0x1ae31c=(_0x27bb1e,_0x36e48e)=>(_0x1c9bb9,_0x277383)=>_0x36e48e(_0x1c9bb9,_0x277383,_0x27bb1e);function _0xfb3db4(_0x2c17fd,_0x5db41a){const _0x58d3b5=_0x28189d,_0x190958=_0x2c17fd['replies'][0x0];return{..._0x5db41a,'id':_0x190958[_0x58d3b5(0x1a1)],'resolved':_0x2c17fd[_0x58d3b5(0x210)]===0x1,'dT':_0x5d85fb(_0x190958[_0x58d3b5(0x1ad)]),'personId':_0x190958[_0x58d3b5(0x1c0)],'threadId':_0x190958[_0x58d3b5(0x1c2)]};}function _0xd9e2c4(_0x22eb61,_0x3a29b9,_0x16e489){const _0x4b3217=_0x28189d;var _0x23b5c4,_0x3b8806;if(((_0x3b8806=(_0x23b5c4=_0x22eb61==null?void 0x0:_0x22eb61['replies'])==null?void 0x0:_0x23b5c4['length'])!=null?_0x3b8806:0x0)>0x0){const _0x7142e6=(_0x2fc685,_0x5913dc)=>({'id':_0x2fc685[_0x4b3217(0x1a1)],'threadId':_0x2fc685['threadId'],'dT':_0x5d85fb(_0x2fc685['createTimestamp']),'personId':_0x2fc685[_0x4b3217(0x1c0)],'resolved':_0x22eb61[_0x4b3217(0x210)]===_0x479a51[_0x4b3217(0x208)],'unitId':_0x3a29b9,'subUnitId':_0x16e489,'text':JSON[_0x4b3217(0x20f)](_0x2fc685[_0x4b3217(0x1ca)]),'parentId':_0x5913dc}),_0x1a7cf4=_0x7142e6(_0x22eb61[_0x4b3217(0x203)][0x0]);return{..._0x1a7cf4,'children':_0x22eb61[_0x4b3217(0x203)]['slice'](0x1)['map'](_0x1417ff=>_0x7142e6(_0x1417ff,_0x1a7cf4['id']))};}return null;}let _0x368b4e=class{constructor(_0x2995c6,_0x19f702,_0x3a8b05,_0xcbf3d7){const _0x352b5b=_0x28189d;this['_httpService']=_0x2995c6,this[_0x352b5b(0x21b)]=_0x19f702,this[_0x352b5b(0x219)]=_0x3a8b05,this[_0x352b5b(0x194)]=_0xcbf3d7;}async[_0x28189d(0x1d0)](_0xbc0805){const _0x11b9d4=_0x28189d;var _0x308db7,_0x2f2afe;const {parentId:_0x3f4443,unitId:_0x1f73b5,text:_0x255b0d,threadId:_0x52919e}=_0xbc0805,_0x4b1087=(_0x2f2afe=(_0x308db7=_0x255b0d[_0x11b9d4(0x1d1)])==null?void 0x0:_0x308db7[_0x11b9d4(0x1c3)](_0x5c8708=>_0x5c8708[_0x11b9d4(0x1b3)]===_0x514323[_0x11b9d4(0x1ba)]['COMMENT'])[_0x11b9d4(0x21e)](_0x4bef50=>_0x4bef50['rangeId']))!=null?_0x2f2afe:[],_0x5f4a52=JSON[_0x11b9d4(0x218)](_0x255b0d),_0x4a1747=(await this[_0x11b9d4(0x219)]['requireSession'](_0x1f73b5))['getMemberID']();if(_0x3f4443){const _0x26e388={'memberId':_0x4a1747,'unitId':_0x1f73b5,'content':_0x5f4a52,'mention':_0x4b1087,'threadId':_0x52919e},_0x5920b1=(await this['_httpService'][_0x11b9d4(0x1f7)](_0x11b9d4(0x1a7)+_0x1f73b5+_0x11b9d4(0x1a3),{'body':_0x26e388}))[_0x11b9d4(0x207)][_0x11b9d4(0x1ab)];return{..._0xbc0805,'id':_0x5920b1[_0x11b9d4(0x1a1)],'dT':_0x514323[_0x11b9d4(0x1e0)](+_0x5920b1[_0x11b9d4(0x1ad)])[_0x11b9d4(0x1b2)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5920b1[_0x11b9d4(0x1c0)]};}else{const _0x230193={'memberId':_0x4a1747,'unitId':_0x1f73b5,'content':_0x5f4a52,'mention':_0x4b1087},_0x2027de=await this['_httpService'][_0x11b9d4(0x1f7)](_0x11b9d4(0x1a7)+_0x1f73b5+'/add',{'body':_0x230193});return _0xfb3db4(_0x2027de['body'][_0x11b9d4(0x215)],_0xbc0805);}}async['updateComment'](_0x429b2f){const _0x4b20c7=_0x28189d;var _0x32c279,_0x5ca74b;const {text:_0xaa25ab,unitId:_0x15f5aa}=_0x429b2f,_0x4abebf=(_0x5ca74b=(_0x32c279=_0xaa25ab[_0x4b20c7(0x1d1)])==null?void 0x0:_0x32c279[_0x4b20c7(0x1c3)](_0x5e6182=>_0x5e6182[_0x4b20c7(0x1b3)]===_0x514323[_0x4b20c7(0x1ba)][_0x4b20c7(0x1fd)])[_0x4b20c7(0x21e)](_0x553122=>_0x553122[_0x4b20c7(0x1c7)]))!=null?_0x5ca74b:[],_0x49b27e=JSON[_0x4b20c7(0x218)](_0xaa25ab),_0x282f2f=_0x429b2f[_0x4b20c7(0x1c2)],_0x2c5703=_0x429b2f['id'],_0x3dd1f2={'memberId':(await this[_0x4b20c7(0x219)][_0x4b20c7(0x1f5)](_0x15f5aa))[_0x4b20c7(0x1da)](),'unitId':_0x15f5aa,'threadId':_0x282f2f,'mention':_0x4abebf,'content':_0x49b27e,'replyId':_0x2c5703},_0xeeac28=await this[_0x4b20c7(0x1bf)][_0x4b20c7(0x1f7)](_0x4b20c7(0x1a7)+_0x15f5aa+_0x4b20c7(0x1bd),{'body':_0x3dd1f2});return!_0xeeac28[_0x4b20c7(0x207)]['error']||_0xeeac28[_0x4b20c7(0x207)][_0x4b20c7(0x1a6)][_0x4b20c7(0x211)]===0x1;}async['resolveComment'](_0x3a601f){const _0x3947d3=_0x28189d,{unitId:_0x21cc05}=_0x3a601f,_0x351086=_0x3a601f['threadId'],_0x5e6b54={'memberId':this[_0x3947d3(0x21b)][_0x3947d3(0x21a)]()[_0x3947d3(0x1cb)],'unitId':_0x21cc05,'threadId':_0x351086,'solved':_0x3a601f[_0x3947d3(0x1ff)]?_0x479a51[_0x3947d3(0x208)]:_0x479a51[_0x3947d3(0x1e2)]},_0x30e977=await this[_0x3947d3(0x1bf)][_0x3947d3(0x1f7)](_0x3947d3(0x1a7)+_0x21cc05+_0x3947d3(0x1d3),{'body':_0x5e6b54});return!_0x30e977[_0x3947d3(0x207)][_0x3947d3(0x1a6)]||_0x30e977['body']['error']['code']===0x1;}async[_0x28189d(0x1b7)](_0x9cf93b,_0x154f2a,_0x4a145b,_0x2ea039){const _0x58673f=_0x28189d,_0x2b5ffe={'memberId':(await this[_0x58673f(0x219)][_0x58673f(0x1f5)](_0x9cf93b))['getMemberID'](),'threadId':_0x4a145b,'replyId':_0x2ea039,'unitId':_0x9cf93b},_0x553091=await this[_0x58673f(0x1bf)][_0x58673f(0x1f7)]('/universer-api/comment/unit/'+_0x9cf93b+_0x58673f(0x1ed),{'body':_0x2b5ffe});return!_0x553091[_0x58673f(0x207)]['error']||_0x553091['body'][_0x58673f(0x1a6)][_0x58673f(0x211)]===0x1;}async[_0x28189d(0x1f3)](_0x49d825,_0x270d98,_0x3b8848){const _0x1d5e2b=_0x28189d,_0x2c74b9={'unitId':_0x49d825,'threadId':_0x3b8848},_0x464fc=await this[_0x1d5e2b(0x1bf)][_0x1d5e2b(0x1f7)](_0x1d5e2b(0x1a7)+_0x49d825+'/list',{'body':_0x2c74b9}),_0x501ccf=_0x3b8848['map'](_0x3c36bb=>_0xd9e2c4(_0x464fc[_0x1d5e2b(0x207)][_0x1d5e2b(0x19e)][_0x3c36bb],_0x49d825,_0x270d98))[_0x1d5e2b(0x1c3)](Boolean);return Object[_0x1d5e2b(0x201)](_0x464fc['body'][_0x1d5e2b(0x1d8)])[_0x1d5e2b(0x1a8)](_0x756690=>{const _0x4f735a=_0x1d5e2b;this[_0x4f735a(0x21b)]['addUser'](_0x756690);}),_0x501ccf;}[_0x28189d(0x1f4)](_0x5c4762){const _0x48d70c=_0x28189d;return{'id':_0x5c4762['id'],'threadId':_0x5c4762[_0x48d70c(0x1c2)],'ref':_0x5c4762[_0x48d70c(0x1f2)]};}};_0x368b4e=_0x36943e([_0x1ae31c(0x0,_0x514323[_0x28189d(0x1c4)](_0x2aae81[_0x28189d(0x1a9)])),_0x1ae31c(0x1,_0x514323[_0x28189d(0x1c4)](_0x514323[_0x28189d(0x1ea)])),_0x1ae31c(0x2,_0x514323[_0x28189d(0x1c4)](_0x1cb471[_0x28189d(0x1b6)])),_0x1ae31c(0x3,_0x514323['Inject'](_0x514323['Injector']))],_0x368b4e);var _0x5211c6=Object['getOwnPropertyDescriptor'],_0x1a741d=(_0x226182,_0x38d2ca,_0x4d4d26,_0x46f64c)=>{for(var _0x377cd9=_0x46f64c>0x1?void 0x0:_0x46f64c?_0x5211c6(_0x38d2ca,_0x4d4d26):_0x38d2ca,_0x384997=_0x226182['length']-0x1,_0x2f6865;_0x384997>=0x0;_0x384997--)(_0x2f6865=_0x226182[_0x384997])&&(_0x377cd9=_0x2f6865(_0x377cd9)||_0x377cd9);return _0x377cd9;},_0x27cb81=(_0x13902a,_0x3d1c56)=>(_0x3665bd,_0x21685c)=>_0x3d1c56(_0x3665bd,_0x21685c,_0x13902a);let _0xaf8918=class extends _0x514323[_0x28189d(0x1eb)]{constructor(_0x2880fc,_0x1f2437){const _0x4980eb=_0x28189d;super(),this[_0x4980eb(0x198)]=_0x2880fc,this[_0x4980eb(0x19f)]=_0x1f2437,this['_initDataSource']();}[_0x28189d(0x1cc)](){const _0x4b87cc=_0x28189d;this[_0x4b87cc(0x198)][_0x4b87cc(0x1fa)]=this[_0x4b87cc(0x19f)],this[_0x4b87cc(0x198)][_0x4b87cc(0x20e)]=!0x1;}};_0xaf8918=_0x1a741d([_0x27cb81(0x0,_0x18ced5[_0x28189d(0x214)]),_0x27cb81(0x1,_0x514323[_0x28189d(0x1c4)](_0x368b4e))],_0xaf8918);var _0x5ca07e=Object['defineProperty'],_0x3521ae=Object['getOwnPropertyDescriptor'],_0x209b12=(_0x286349,_0xbcb4d3,_0x25e96e)=>_0xbcb4d3 in _0x286349?_0x5ca07e(_0x286349,_0xbcb4d3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x25e96e}):_0x286349[_0xbcb4d3]=_0x25e96e,_0x43f026=(_0x210834,_0x2fd51e,_0x47e1f1,_0x4c40c1)=>{const _0x5812c6=_0x28189d;for(var _0x205932=_0x4c40c1>0x1?void 0x0:_0x4c40c1?_0x3521ae(_0x2fd51e,_0x47e1f1):_0x2fd51e,_0x353781=_0x210834[_0x5812c6(0x1dd)]-0x1,_0xe496b9;_0x353781>=0x0;_0x353781--)(_0xe496b9=_0x210834[_0x353781])&&(_0x205932=_0xe496b9(_0x205932)||_0x205932);return _0x205932;},_0x2e5afe=(_0x11e490,_0x23544f)=>(_0x4ed19b,_0x3da69c)=>_0x23544f(_0x4ed19b,_0x3da69c,_0x11e490),_0x2e4e97=(_0x17cc6c,_0x701f4a,_0x2fd8f2)=>_0x209b12(_0x17cc6c,typeof _0x701f4a!='symbol'?_0x701f4a+'':_0x701f4a,_0x2fd8f2);_0x421825[_0x28189d(0x1d7)]=class extends _0x514323[_0x28189d(0x1cd)]{constructor(_0x39ae02=_0x5ea3e8,_0x264db9,_0x1c7d8b){const _0x37aef5=_0x28189d;super(),this[_0x37aef5(0x216)]=_0x39ae02,this[_0x37aef5(0x194)]=_0x264db9,this['_configService']=_0x1c7d8b;const {..._0x5c1dba}=_0x514323[_0x37aef5(0x1b8)]({},_0x5ea3e8,this[_0x37aef5(0x216)]);this[_0x37aef5(0x1e5)][_0x37aef5(0x1ac)](_0x434b5c,_0x5c1dba);}[_0x28189d(0x195)](){const _0x26975b=_0x28189d;[[_0x368b4e],[_0xaf8918],[_0x484a95]][_0x26975b(0x1a8)](_0x2a8e41=>{const _0x445af3=_0x26975b;this['_injector'][_0x445af3(0x1a5)](_0x2a8e41);});}['onReady'](){const _0x48d018=_0x28189d;this[_0x48d018(0x194)][_0x48d018(0x209)](_0xaf8918),this[_0x48d018(0x194)]['get'](_0x484a95);}},_0x2e4e97(_0x421825['UniverThreadCommentDataSourcePlugin'],_0x28189d(0x1e8),_0x2d2057),_0x2e4e97(_0x421825[_0x28189d(0x1d7)],_0x28189d(0x1dc),_0x514323[_0x28189d(0x19c)][_0x28189d(0x1fe)]),_0x421825[_0x28189d(0x1d7)]=_0x43f026([_0x514323['DependentOn'](_0xe499e8[_0x28189d(0x1b4)],_0x1cb471[_0x28189d(0x1e6)],_0x179a7a['UniverLicensePlugin']),_0x2e5afe(0x1,_0x514323['Inject'](_0x514323['Injector'])),_0x2e5afe(0x2,_0x514323[_0x28189d(0x197)])],_0x421825[_0x28189d(0x1d7)]),Object[_0x28189d(0x1b9)](_0x421825,Symbol[_0x28189d(0x21d)],{'value':'Module'});}));function _0x3fef(_0x1e648e,_0x708da0){const _0x127084=_0x1270();return _0x3fef=function(_0x3fefe3,_0x13c347){_0x3fefe3=_0x3fefe3-0x194;let _0x41598f=_0x127084[_0x3fefe3];return _0x41598f;},_0x3fef(_0x1e648e,_0x708da0);}function _0x1270(){const _0x368cc7=['/reply','48zxhbCA','add','error','/universer-api/comment/unit/','forEach','HTTPService','_commentService','reply','setConfig','createTimestamp','root','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','@univerjs-pro/collaboration-client','format','rangeType','UniverThreadCommentUIPlugin','getOwnPropertyDescriptor','CollaborationSessionService','deleteComment','merge','defineProperty','CustomRangeType','amd','parentId','/edit','Delete','_httpService','userId','1258540FNUnzo','threadId','filter','Inject','rxjs','getUser','rangeId','@univerjs/core','object','content','userID','_initDataSource','Plugin','YYYY/MM/DD\x20HH:mm','Reply','addComment','customRanges','UniverThreadComment','/solved','personId','/universer-api/user/list','8148LLHEad','UniverThreadCommentDataSourcePlugin','users','exports','getMemberID','getComment','type','length','107093Vvoeky','UniverCore','dayjs','bufferTime','OpenOrReOpen','addUser','CommentService','_configService','UniverCollaborationClientPlugin','Add','pluginName','@univerjs/thread-comment-ui','UserManagerService','Disposable','unitId','/delete','Solve','3627RUUHVD','ThreadCommentModel','38JnfAro','ref','listComments','saveCommentToSnapshot','requireSession','@univerjs-pro/license','post','@univerjs/thread-comment','UniverProThreadCommentDatasource','dataSource','352913IhyNZA','updateComment','COMMENT','UNIVER_UNKNOWN','resolved','1495242jJKxjg','values','@univerjs/network','replies','40OyHQPo','_initUserSync','290775IXfAqJ','body','Solved','get','Injector','user','6bqsDET','find','syncUpdateMutationToColla','parse','solved','code','resolveComment','Unknown','IThreadCommentDataSourceService','comment','_config','3FmJywy','stringify','_sessionService','getCurrentUser','_userService','pipe','toStringTag','map','_injector','onStarting','19671OXilXb','IConfigService','_threadCommentDataSourceService','disposeWithMe','getUnit','_threadCommentModel','UniverInstanceType','UNRECOGNIZED','comments','_threadCommentDataSource','UniverProLicense','replyId','subscribe'];_0x1270=function(){return _0x368cc7;};return _0x1270();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.0-nightly.
|
|
3
|
+
"version": "0.8.0-nightly.202505291607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.8.0-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.8.0-nightly.
|
|
50
|
-
"@univerjs/core": "0.8.0-nightly.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.8.0-nightly.202505291607",
|
|
49
|
+
"@univerjs-pro/license": "0.8.0-nightly.202505291607",
|
|
50
|
+
"@univerjs/core": "0.8.0-nightly.202505291607",
|
|
51
51
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
52
|
-
"@univerjs/thread-comment": "0.8.0-nightly.
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/
|
|
52
|
+
"@univerjs/thread-comment": "0.8.0-nightly.202505291607",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.8.0-nightly.202505291607",
|
|
54
|
+
"@univerjs/network": "0.8.0-nightly.202505291607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vite": "^6.3.5",
|
|
60
60
|
"vitest": "^3.1.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.8.0-beta.
|
|
61
|
+
"@univerjs-infra/shared": "0.8.0-beta.1"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|