@univerjs-pro/thread-comment-datasource 0.15.0-insiders.20260107-3d1cfdf → 0.15.0-insiders.20260108-7b9120d
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 _0x1285b7=_0x4f1e;(function(_0x3f41c5,_0x5e4b7d){const _0x1dc83e=_0x4f1e,_0x3622ba=_0x3f41c5();while(!![]){try{const _0x238823=parseInt(_0x1dc83e(0x1eb))/0x1*(-parseInt(_0x1dc83e(0x195))/0x2)+-parseInt(_0x1dc83e(0x1d5))/0x3+parseInt(_0x1dc83e(0x185))/0x4*(parseInt(_0x1dc83e(0x1a3))/0x5)+parseInt(_0x1dc83e(0x193))/0x6*(-parseInt(_0x1dc83e(0x1d2))/0x7)+parseInt(_0x1dc83e(0x1ca))/0x8*(-parseInt(_0x1dc83e(0x1b7))/0x9)+-parseInt(_0x1dc83e(0x1aa))/0xa+-parseInt(_0x1dc83e(0x19f))/0xb*(-parseInt(_0x1dc83e(0x1c1))/0xc);if(_0x238823===_0x5e4b7d)break;else _0x3622ba['push'](_0x3622ba['shift']());}catch(_0x26adf3){_0x3622ba['push'](_0x3622ba['shift']());}}}(_0x19a6,0x3a624));Object['defineProperty'](exports,Symbol[_0x1285b7(0x187)],{'value':_0x1285b7(0x1c0)});function _0x4f1e(_0x541fc4,_0x4500dd){_0x541fc4=_0x541fc4-0x185;const _0x19a6f1=_0x19a6();let _0x4f1eab=_0x19a6f1[_0x541fc4];return _0x4f1eab;}const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x1285b7(0x1ed);var I=(_0x1c3b2f=>(_0x1c3b2f[_0x1c3b2f[_0x1285b7(0x1a2)]=0x0]=_0x1285b7(0x1a2),_0x1c3b2f[_0x1c3b2f['Solved']=0x1]=_0x1285b7(0x1e8),_0x1c3b2f[_0x1c3b2f['UNRECOGNIZED']=-0x1]=_0x1285b7(0x188),_0x1c3b2f))(I||{}),v=(_0x410df1=>(_0x410df1[_0x410df1[_0x1285b7(0x1ec)]=0x0]=_0x1285b7(0x1ec),_0x410df1[_0x410df1[_0x1285b7(0x1d7)]=0x1]=_0x1285b7(0x1d7),_0x410df1[_0x410df1['Reply']=0x2]=_0x1285b7(0x1e0),_0x410df1[_0x410df1[_0x1285b7(0x1f8)]=0x3]=_0x1285b7(0x1f8),_0x410df1[_0x410df1[_0x1285b7(0x1bf)]=0x4]='Delete',_0x410df1[_0x410df1[_0x1285b7(0x1c8)]=0x5]=_0x1285b7(0x1c8),_0x410df1[_0x410df1[_0x1285b7(0x188)]=-0x1]=_0x1285b7(0x188),_0x410df1))(v||{});const f=_0x51e7fc=>c[_0x1285b7(0x1d3)](new Date(+_0x51e7fc))[_0x1285b7(0x1c3)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x2beac8,_0x4c7257)=>{const _0x2fc94c=_0x1285b7,_0x405bed=_0x2beac8[_0x2fc94c(0x1d9)](c[_0x2fc94c(0x190)]),_0x5a672e=_0x2beac8['get'](P[_0x2fc94c(0x18c)]);_0x4c7257[_0x2fc94c(0x1e2)](_0x40d3d2=>{const _0x479f52=_0x2fc94c;_0x405bed[_0x479f52(0x19e)](_0x40d3d2)&&_0x4c7257[_0x479f52(0x1bb)](_0x40d3d2);}),_0x4c7257[_0x2fc94c(0x1fe)]&&(await _0x5a672e[_0x2fc94c(0x1d9)](_0x2fc94c(0x1de),{'params':{'userIDs':[..._0x4c7257]}}))[_0x2fc94c(0x186)][_0x2fc94c(0x1f2)][_0x2fc94c(0x1e2)](_0x3da2dc=>{const _0x312cec=_0x2fc94c;_0x3da2dc&&_0x405bed[_0x312cec(0x18f)](_0x3da2dc);});};var $=Object[_0x1285b7(0x194)],E=(_0x3f95e4,_0x5245d2,_0x2e366b,_0x284291)=>{const _0x21b8ef=_0x1285b7;for(var _0x4e9974=_0x284291>0x1?void 0x0:_0x284291?$(_0x5245d2,_0x2e366b):_0x5245d2,_0x4c061c=_0x3f95e4[_0x21b8ef(0x1a4)]-0x1,_0x5dd783;_0x4c061c>=0x0;_0x4c061c--)(_0x5dd783=_0x3f95e4[_0x4c061c])&&(_0x4e9974=_0x5dd783(_0x4e9974)||_0x4e9974);return _0x4e9974;},S=(_0x4f5777,_0x31f03a)=>(_0x2d4c7b,_0xa97ab6)=>_0x31f03a(_0x2d4c7b,_0xa97ab6,_0x4f5777);let _=class extends c['Disposable']{constructor(_0x19eaf1,_0x1e973d,_0x2d14ef,_0x56e4aa){const _0x74cd06=_0x1285b7;super(),this[_0x74cd06(0x1b5)]=_0x19eaf1,this[_0x74cd06(0x19d)]=_0x1e973d,this[_0x74cd06(0x1b9)]=_0x2d14ef,this[_0x74cd06(0x1c6)]=_0x56e4aa,this[_0x74cd06(0x1e4)](),this['_initUserSync']();}['_initUserSync'](){const _0x2130f0=_0x1285b7;this['disposeWithMe'](this['_threadCommentModel'][_0x2130f0(0x18b)][_0x2130f0(0x1da)](j[_0x2130f0(0x1fb)](0x10))[_0x2130f0(0x1cf)](_0x2bbe88=>{const _0x24c1b8=_0x2130f0,_0x5a5eb3=new Set();_0x2bbe88[_0x24c1b8(0x1e2)](_0xebe33c=>{const _0x5b2e4b=_0x24c1b8;if(_0xebe33c['type']===_0x5b2e4b(0x1f1)){const _0x23f03a=_0xebe33c[_0x5b2e4b(0x1cd)][_0x5b2e4b(0x191)];_0x5a5eb3[_0x5b2e4b(0x1f1)](_0x23f03a);}}),R(this[_0x24c1b8(0x1c6)],_0x5a5eb3);}));}[_0x1285b7(0x1e4)](){const _0x4346c7=_0x1285b7;this[_0x4346c7(0x18d)](this[_0x4346c7(0x1b5)][_0x4346c7(0x18b)][_0x4346c7(0x1cf)](async _0x2f161c=>{const _0x5d1232=_0x4346c7;var _0x533621,_0x27fd5c,_0x574e87,_0xda5792;const _0x21f623=(_0x533621=this[_0x5d1232(0x19d)][_0x5d1232(0x19a)](_0x2f161c[_0x5d1232(0x1a7)])[_0x5d1232(0x1b4)](_0x1df881=>_0x1df881[_0x5d1232(0x1ea)]===_0x2f161c[_0x5d1232(0x1ea)]))==null?void 0x0:_0x533621[_0x5d1232(0x199)];if(!_0x21f623)return;const {unitId:_0x5c66e0,subUnitId:_0xed946b}=_0x21f623;switch(_0x2f161c[_0x5d1232(0x1a9)]&&this[_0x5d1232(0x1b9)][_0x5d1232(0x18f)](_0x2f161c['user']),_0x2f161c[_0x5d1232(0x1b8)]){case v['Add']:break;case v[_0x5d1232(0x1e0)]:{this[_0x5d1232(0x19d)][_0x5d1232(0x1e1)](_0x5c66e0,_0xed946b,{'unitId':_0x5c66e0,'subUnitId':_0xed946b,'ref':'','id':_0x2f161c[_0x5d1232(0x1d1)],'dT':f(+_0x2f161c[_0x5d1232(0x1e7)]),'threadId':_0x2f161c['threadId'],'personId':(_0x574e87=(_0x27fd5c=_0x2f161c[_0x5d1232(0x1a9)])==null?void 0x0:_0x27fd5c[_0x5d1232(0x1a8)])!=null?_0x574e87:_0x2f161c['userId'],'text':JSON['parse'](_0x2f161c[_0x5d1232(0x1ce)]),'parentId':_0x21f623['id']});break;}case v[_0x5d1232(0x1bf)]:{const _0x61c167=this[_0x5d1232(0x19d)]['getComment'](_0x5c66e0,_0xed946b,_0x2f161c[_0x5d1232(0x1d1)]);_0x61c167&&_0x61c167['parentId']&&this['_threadCommentModel'][_0x5d1232(0x1be)](_0x5c66e0,_0xed946b,_0x2f161c['replyId']);break;}case v[_0x5d1232(0x1f8)]:{this[_0x5d1232(0x19d)][_0x5d1232(0x1b2)](_0x5c66e0,_0xed946b,{'commentId':_0x2f161c['replyId'],'text':JSON[_0x5d1232(0x1ef)](_0x2f161c[_0x5d1232(0x1ce)])});break;}case v[_0x5d1232(0x1c8)]:{const _0x4d09f6=(_0xda5792=this[_0x5d1232(0x19d)][_0x5d1232(0x19a)](_0x2f161c['unitId'])[_0x5d1232(0x1b4)](_0x3bb13d=>_0x3bb13d[_0x5d1232(0x1ea)]===_0x2f161c[_0x5d1232(0x1ea)]))==null?void 0x0:_0xda5792[_0x5d1232(0x199)];_0x4d09f6&&this[_0x5d1232(0x19d)][_0x5d1232(0x1dc)](_0x5c66e0,_0xed946b,_0x4d09f6['id'],_0x2f161c['solved']===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x1285b7(0x1fa)](b[_0x1285b7(0x1f3)])),S(0x1,c['Inject'](M[_0x1285b7(0x1ae)])),S(0x2,c[_0x1285b7(0x1fa)](c[_0x1285b7(0x190)])),S(0x3,c[_0x1285b7(0x1fa)](c['Injector']))],_);const q=_0x1285b7(0x1d0),D={};var A=Object[_0x1285b7(0x194)],x=(_0x282a6,_0x2e95eb,_0x3c4e7f,_0x1d6d0a)=>{const _0x12f80c=_0x1285b7;for(var _0x196597=_0x1d6d0a>0x1?void 0x0:_0x1d6d0a?A(_0x2e95eb,_0x3c4e7f):_0x2e95eb,_0x1fcd45=_0x282a6[_0x12f80c(0x1a4)]-0x1,_0x56c2cf;_0x1fcd45>=0x0;_0x1fcd45--)(_0x56c2cf=_0x282a6[_0x1fcd45])&&(_0x196597=_0x56c2cf(_0x196597)||_0x196597);return _0x196597;},C=(_0xa784dd,_0x40904f)=>(_0x51c5cf,_0x52b659)=>_0x40904f(_0x51c5cf,_0x52b659,_0xa784dd);function Y(_0x42a731,_0x15448e){const _0x110d68=_0x1285b7,_0x28c66a=_0x42a731[_0x110d68(0x1e5)][0x0];return{..._0x15448e,'id':_0x28c66a['replyId'],'resolved':_0x42a731[_0x110d68(0x1d6)]===0x1,'dT':f(_0x28c66a['createTimestamp']),'personId':_0x28c66a[_0x110d68(0x1b6)],'threadId':_0x28c66a[_0x110d68(0x1ea)]};}function _0x19a6(){const _0x3e1ae8=['UserManagerService','personId','error','6LbAilk','getOwnPropertyDescriptor','1646WoBuno','_config','UniverCollaborationClientPlugin','resolved','root','getUnit','comment','values','_threadCommentModel','getUser','4596053WIFDNi','customRanges','symbol','OpenOrReOpen','76025yoLane','length','UniverThreadCommentUIPlugin','UniverLicensePlugin','unitId','userID','user','3697860KKnBmt','listComments','/reply','UniverThreadCommentDataSourcePlugin','ThreadCommentModel','_threadCommentDataSourceService','slice','_sessionService','updateComment','onReady','find','_commentService','userId','3555GNIQhw','type','_userService','onStarting','delete','comments','_initDataSource','deleteComment','Delete','Module','24fsJnjt','code','format','rangeId','rangeType','_injector','COMMENT','Solve','post','6392lyhLUl','defineProperty','getMemberID','payload','content','subscribe','thread-comment-data-source.config','replyId','570668LUfxNA','dayjs','Plugin','759759OomktW','solved','Add','Disposable','get','pipe','_threadCommentDataSource','resolveComment','/edit','/universer-api/user/list','/solved','Reply','addComment','forEach','CollaborationSessionService','_init','replies','stringify','createTimestamp','Solved','IConfigService','threadId','21kojnKi','Unknown','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Injector','parse','requireSession','add','users','CommentService','pluginName','dataSource','/universer-api/comment/unit/','filter','Edit','_httpService','Inject','bufferTime','map','ref','size','116RlXWoK','body','toStringTag','UNRECOGNIZED','CustomRangeType','reply','commentUpdate$','HTTPService','disposeWithMe','/list','addUser'];_0x19a6=function(){return _0x3e1ae8;};return _0x19a6();}function G(_0x48a08a,_0x94056,_0x29e911){const _0x476b92=_0x1285b7;var _0x138bde,_0x7c1bf8;if(((_0x7c1bf8=(_0x138bde=_0x48a08a==null?void 0x0:_0x48a08a[_0x476b92(0x1e5)])==null?void 0x0:_0x138bde['length'])!=null?_0x7c1bf8:0x0)>0x0){const _0x42170=(_0x1cd5fd,_0x4a7efa)=>({'id':_0x1cd5fd[_0x476b92(0x1d1)],'threadId':_0x1cd5fd[_0x476b92(0x1ea)],'dT':f(_0x1cd5fd[_0x476b92(0x1e7)]),'personId':_0x1cd5fd[_0x476b92(0x1b6)],'resolved':_0x48a08a[_0x476b92(0x1d6)]===I[_0x476b92(0x1e8)],'unitId':_0x94056,'subUnitId':_0x29e911,'text':JSON[_0x476b92(0x1ef)](_0x1cd5fd[_0x476b92(0x1ce)]),'parentId':_0x4a7efa}),_0x5d18d1=_0x42170(_0x48a08a['replies'][0x0]);return{..._0x5d18d1,'children':_0x48a08a[_0x476b92(0x1e5)][_0x476b92(0x1b0)](0x1)['map'](_0x2b4c9a=>_0x42170(_0x2b4c9a,_0x5d18d1['id']))};}return null;}let p=class{constructor(_0xd219b6,_0x11c23a,_0x24d565){const _0xd84f2=_0x1285b7;this[_0xd84f2(0x1f9)]=_0xd219b6,this[_0xd84f2(0x1b9)]=_0x11c23a,this[_0xd84f2(0x1b1)]=_0x24d565;}async['addComment'](_0x117e12){const _0x3eb687=_0x1285b7;var _0x1246d6,_0x282df9;const {parentId:_0x2bcd22,unitId:_0x5366b9,text:_0x1c018f,threadId:_0x47a434}=_0x117e12,_0x48d825=(_0x282df9=(_0x1246d6=_0x1c018f[_0x3eb687(0x1a0)])==null?void 0x0:_0x1246d6[_0x3eb687(0x1f7)](_0x8a3da7=>_0x8a3da7[_0x3eb687(0x1c5)]===c['CustomRangeType']['COMMENT'])[_0x3eb687(0x1fc)](_0x143d0b=>_0x143d0b[_0x3eb687(0x1c4)]))!=null?_0x282df9:[],_0x43128d=JSON[_0x3eb687(0x1e6)](_0x1c018f),_0x3ee6f9=(await this[_0x3eb687(0x1b1)]['requireSession'](_0x5366b9))['getMemberID']();if(_0x2bcd22){const _0x33d66e={'memberId':_0x3ee6f9,'unitId':_0x5366b9,'content':_0x43128d,'mention':_0x48d825,'threadId':_0x47a434},_0x53bbc7=(await this[_0x3eb687(0x1f9)][_0x3eb687(0x1c9)]('/universer-api/comment/unit/'+_0x5366b9+_0x3eb687(0x1ac),{'body':_0x33d66e}))['body'][_0x3eb687(0x18a)];return{..._0x117e12,'id':_0x53bbc7['replyId'],'dT':c[_0x3eb687(0x1d3)](+_0x53bbc7[_0x3eb687(0x1e7)])[_0x3eb687(0x1c3)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x53bbc7[_0x3eb687(0x1b6)]};}else{const _0x207682={'memberId':_0x3ee6f9,'unitId':_0x5366b9,'content':_0x43128d,'mention':_0x48d825},_0x10a243=await this['_httpService']['post'](_0x3eb687(0x1f6)+_0x5366b9+'/add',{'body':_0x207682});return Y(_0x10a243[_0x3eb687(0x186)][_0x3eb687(0x19b)],_0x117e12);}}async[_0x1285b7(0x1b2)](_0x70a3eb){const _0x50c3e9=_0x1285b7;var _0x4217fb,_0x5577d3;const {text:_0x24de69,unitId:_0x2b23ee}=_0x70a3eb,_0x50d482=(_0x5577d3=(_0x4217fb=_0x24de69[_0x50c3e9(0x1a0)])==null?void 0x0:_0x4217fb[_0x50c3e9(0x1f7)](_0x4d9fb4=>_0x4d9fb4[_0x50c3e9(0x1c5)]===c[_0x50c3e9(0x189)][_0x50c3e9(0x1c7)])[_0x50c3e9(0x1fc)](_0x49dc65=>_0x49dc65['rangeId']))!=null?_0x5577d3:[],_0x47f631=JSON[_0x50c3e9(0x1e6)](_0x24de69),_0x5aa76a=_0x70a3eb['threadId'],_0x1021f6=_0x70a3eb['id'],_0x1d11d4={'memberId':(await this[_0x50c3e9(0x1b1)][_0x50c3e9(0x1f0)](_0x2b23ee))[_0x50c3e9(0x1cc)](),'unitId':_0x2b23ee,'threadId':_0x5aa76a,'mention':_0x50d482,'content':_0x47f631,'replyId':_0x1021f6},_0x52757a=await this[_0x50c3e9(0x1f9)]['post']('/universer-api/comment/unit/'+_0x2b23ee+_0x50c3e9(0x1dd),{'body':_0x1d11d4});return!_0x52757a[_0x50c3e9(0x186)]['error']||_0x52757a['body'][_0x50c3e9(0x192)][_0x50c3e9(0x1c2)]===0x1;}async[_0x1285b7(0x1dc)](_0x362b3a){const _0x29a50e=_0x1285b7,{unitId:_0x118f9a}=_0x362b3a,_0x19c831=_0x362b3a['threadId'],_0x16d5dd={'memberId':this[_0x29a50e(0x1b9)]['getCurrentUser']()['userID'],'unitId':_0x118f9a,'threadId':_0x19c831,'solved':_0x362b3a[_0x29a50e(0x198)]?I[_0x29a50e(0x1e8)]:I['OpenOrReOpen']},_0x3207eb=await this['_httpService'][_0x29a50e(0x1c9)](_0x29a50e(0x1f6)+_0x118f9a+_0x29a50e(0x1df),{'body':_0x16d5dd});return!_0x3207eb[_0x29a50e(0x186)][_0x29a50e(0x192)]||_0x3207eb[_0x29a50e(0x186)][_0x29a50e(0x192)][_0x29a50e(0x1c2)]===0x1;}async['deleteComment'](_0x5e3c21,_0x3994f5,_0x364039,_0x12291f){const _0x420e95=_0x1285b7,_0x5317d5={'memberId':(await this[_0x420e95(0x1b1)]['requireSession'](_0x5e3c21))[_0x420e95(0x1cc)](),'threadId':_0x364039,'replyId':_0x12291f,'unitId':_0x5e3c21},_0x153ee0=await this['_httpService'][_0x420e95(0x1c9)]('/universer-api/comment/unit/'+_0x5e3c21+'/delete',{'body':_0x5317d5});return!_0x153ee0[_0x420e95(0x186)][_0x420e95(0x192)]||_0x153ee0['body']['error']['code']===0x1;}async[_0x1285b7(0x1ab)](_0x36a93f,_0x55c5fa,_0x1d70c0){const _0xe2298a=_0x1285b7,_0x188fab={'unitId':_0x36a93f,'threadId':_0x1d70c0},_0x1193a0=await this[_0xe2298a(0x1f9)][_0xe2298a(0x1c9)]('/universer-api/comment/unit/'+_0x36a93f+_0xe2298a(0x18e),{'body':_0x188fab}),_0x28b100=_0x1d70c0['map'](_0xafa276=>G(_0x1193a0[_0xe2298a(0x186)][_0xe2298a(0x1bc)][_0xafa276],_0x36a93f,_0x55c5fa))['filter'](Boolean);return Object[_0xe2298a(0x19c)](_0x1193a0[_0xe2298a(0x186)][_0xe2298a(0x1f2)])[_0xe2298a(0x1e2)](_0x59e9b0=>{const _0x2fe6cf=_0xe2298a;this['_userService'][_0x2fe6cf(0x18f)](_0x59e9b0);}),_0x28b100;}['saveCommentToSnapshot'](_0x1587e7){const _0x37207d=_0x1285b7;return{'id':_0x1587e7['id'],'threadId':_0x1587e7[_0x37207d(0x1ea)],'ref':_0x1587e7[_0x37207d(0x1fd)]};}};p=x([C(0x0,c[_0x1285b7(0x1fa)](P[_0x1285b7(0x18c)])),C(0x1,c[_0x1285b7(0x1fa)](c[_0x1285b7(0x190)])),C(0x2,c['Inject'](b[_0x1285b7(0x1e3)]))],p);var H=Object[_0x1285b7(0x194)],J=(_0x331bc9,_0x50349b,_0x53014c,_0x4144bf)=>{const _0x5391b1=_0x1285b7;for(var _0x4ef144=_0x4144bf>0x1?void 0x0:_0x4144bf?H(_0x50349b,_0x53014c):_0x50349b,_0x62e444=_0x331bc9[_0x5391b1(0x1a4)]-0x1,_0x47ff4d;_0x62e444>=0x0;_0x62e444--)(_0x47ff4d=_0x331bc9[_0x62e444])&&(_0x4ef144=_0x47ff4d(_0x4ef144)||_0x4ef144);return _0x4ef144;},y=(_0x34aa06,_0x392df5)=>(_0xc2ee07,_0x3f66ee)=>_0x392df5(_0xc2ee07,_0x3f66ee,_0x34aa06);let g=class extends c[_0x1285b7(0x1d8)]{constructor(_0x6c8cd6,_0x40dc7e){const _0x5db3bd=_0x1285b7;super(),this[_0x5db3bd(0x1af)]=_0x6c8cd6,this['_threadCommentDataSource']=_0x40dc7e,this[_0x5db3bd(0x1bd)]();}[_0x1285b7(0x1bd)](){const _0x432bb5=_0x1285b7;this['_threadCommentDataSourceService'][_0x432bb5(0x1f5)]=this[_0x432bb5(0x1db)],this[_0x432bb5(0x1af)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x1285b7(0x1fa)](p))],g);var F=Object[_0x1285b7(0x1cb)],L=Object[_0x1285b7(0x194)],Z=(_0x247c84,_0x20cc16,_0x2f0638)=>_0x20cc16 in _0x247c84?F(_0x247c84,_0x20cc16,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2f0638}):_0x247c84[_0x20cc16]=_0x2f0638,W=(_0x4b3f64,_0x206fe6,_0x3e4eb7,_0x51276c)=>{const _0x3c2753=_0x1285b7;for(var _0x4e39ac=_0x51276c>0x1?void 0x0:_0x51276c?L(_0x206fe6,_0x3e4eb7):_0x206fe6,_0x86737=_0x4b3f64[_0x3c2753(0x1a4)]-0x1,_0x3f245c;_0x86737>=0x0;_0x86737--)(_0x3f245c=_0x4b3f64[_0x86737])&&(_0x4e39ac=_0x3f245c(_0x4e39ac)||_0x4e39ac);return _0x4e39ac;},O=(_0x30de0d,_0x52af1b)=>(_0x2bf752,_0x385c5c)=>_0x52af1b(_0x2bf752,_0x385c5c,_0x30de0d),N=(_0x3404ab,_0x52c37f,_0xe84539)=>Z(_0x3404ab,typeof _0x52c37f!=_0x1285b7(0x1a1)?_0x52c37f+'':_0x52c37f,_0xe84539);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1285b7(0x1d4)]{constructor(_0x5b8f7f=D,_0x38c328,_0xe35801){const _0x2d238f=_0x1285b7;super(),this[_0x2d238f(0x196)]=_0x5b8f7f,this['_injector']=_0x38c328,this['_configService']=_0xe35801;const {..._0x5ac34b}=c['merge']({},D,this[_0x2d238f(0x196)]);this['_configService']['setConfig'](q,_0x5ac34b);}[_0x1285b7(0x1ba)](){[[p],[g],[_]]['forEach'](_0xf520f9=>{const _0x356c27=_0x4f1e;this[_0x356c27(0x1c6)]['add'](_0xf520f9);});}[_0x1285b7(0x1b3)](){const _0x275d11=_0x1285b7;this[_0x275d11(0x1c6)][_0x275d11(0x1d9)](g),this[_0x275d11(0x1c6)][_0x275d11(0x1d9)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x1285b7(0x1f4),U),N(exports[_0x1285b7(0x1ad)],_0x1285b7(0x1b8),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x1285b7(0x1ad)]=W([c['DependentOn'](w[_0x1285b7(0x1a5)],b[_0x1285b7(0x197)],T[_0x1285b7(0x1a6)]),O(0x1,c[_0x1285b7(0x1fa)](c[_0x1285b7(0x1ee)])),O(0x2,c[_0x1285b7(0x1e9)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x4d9893=_0x407f;(function(_0x2db744,_0x5a0601){const _0x35927b=_0x407f,_0x2caa14=_0x2db744();while(!![]){try{const _0x297afa=-parseInt(_0x35927b(0xe4))/0x1*(parseInt(_0x35927b(0xa4))/0x2)+-parseInt(_0x35927b(0xb7))/0x3*(parseInt(_0x35927b(0xbf))/0x4)+-parseInt(_0x35927b(0xa6))/0x5*(-parseInt(_0x35927b(0xc5))/0x6)+parseInt(_0x35927b(0xb1))/0x7+parseInt(_0x35927b(0xef))/0x8*(-parseInt(_0x35927b(0xc7))/0x9)+parseInt(_0x35927b(0x9c))/0xa*(parseInt(_0x35927b(0x8b))/0xb)+-parseInt(_0x35927b(0x9f))/0xc*(-parseInt(_0x35927b(0x98))/0xd);if(_0x297afa===_0x5a0601)break;else _0x2caa14['push'](_0x2caa14['shift']());}catch(_0x542340){_0x2caa14['push'](_0x2caa14['shift']());}}}(_0x921f,0x3a3de));Object[_0x4d9893(0x90)](exports,Symbol[_0x4d9893(0xbd)],{'value':_0x4d9893(0x102)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4d9893(0xd8);var I=(_0x4e79c8=>(_0x4e79c8[_0x4e79c8[_0x4d9893(0xdd)]=0x0]=_0x4d9893(0xdd),_0x4e79c8[_0x4e79c8[_0x4d9893(0xda)]=0x1]=_0x4d9893(0xda),_0x4e79c8[_0x4e79c8[_0x4d9893(0xd7)]=-0x1]=_0x4d9893(0xd7),_0x4e79c8))(I||{}),v=(_0x351327=>(_0x351327[_0x351327[_0x4d9893(0xdf)]=0x0]=_0x4d9893(0xdf),_0x351327[_0x351327[_0x4d9893(0xd1)]=0x1]=_0x4d9893(0xd1),_0x351327[_0x351327['Reply']=0x2]=_0x4d9893(0xe7),_0x351327[_0x351327[_0x4d9893(0xc6)]=0x3]='Edit',_0x351327[_0x351327[_0x4d9893(0x8f)]=0x4]=_0x4d9893(0x8f),_0x351327[_0x351327['Solve']=0x5]=_0x4d9893(0xf3),_0x351327[_0x351327[_0x4d9893(0xd7)]=-0x1]=_0x4d9893(0xd7),_0x351327))(v||{});const f=_0x4d5ffd=>c[_0x4d9893(0xff)](new Date(+_0x4d5ffd))[_0x4d9893(0xa0)](_0x4d9893(0xf9)),R=async(_0x3f046a,_0x3aa57b)=>{const _0x430cef=_0x4d9893,_0x14728c=_0x3f046a[_0x430cef(0xec)](c[_0x430cef(0xce)]),_0x1726e0=_0x3f046a['get'](P[_0x430cef(0xc8)]);_0x3aa57b[_0x430cef(0x96)](_0x1dc39d=>{const _0x99a700=_0x430cef;_0x14728c['getUser'](_0x1dc39d)&&_0x3aa57b[_0x99a700(0xd5)](_0x1dc39d);}),_0x3aa57b['size']&&(await _0x1726e0[_0x430cef(0xec)](_0x430cef(0xfb),{'params':{'userIDs':[..._0x3aa57b]}}))[_0x430cef(0xe5)][_0x430cef(0xfe)][_0x430cef(0x96)](_0x4da15a=>{const _0x4bcdeb=_0x430cef;_0x4da15a&&_0x14728c[_0x4bcdeb(0x9b)](_0x4da15a);});};var $=Object[_0x4d9893(0xac)],E=(_0x3fba8f,_0x4e47de,_0x5f52d4,_0x24ac4f)=>{const _0x192cc5=_0x4d9893;for(var _0x1151bd=_0x24ac4f>0x1?void 0x0:_0x24ac4f?$(_0x4e47de,_0x5f52d4):_0x4e47de,_0x48a210=_0x3fba8f[_0x192cc5(0xfa)]-0x1,_0x17725b;_0x48a210>=0x0;_0x48a210--)(_0x17725b=_0x3fba8f[_0x48a210])&&(_0x1151bd=_0x17725b(_0x1151bd)||_0x1151bd);return _0x1151bd;},S=(_0x2f102c,_0x387088)=>(_0xff1df9,_0x149e5a)=>_0x387088(_0xff1df9,_0x149e5a,_0x2f102c);function _0x921f(){const _0x5d1b2b=['11kQFiOt','UNIVER_UNKNOWN','map','CollaborationSessionService','Delete','defineProperty','DependentOn','onReady','COMMENT','createTimestamp','/add','forEach','IThreadCommentDataSourceService','39wADHmi','customRanges','setConfig','addUser','2389190kxMcFk','merge','/reply','1906584VIhPDS','format','_sessionService','_config','_threadCommentDataSourceService','591410JuelGh','/edit','55FMjDZp','Disposable','_injector','type','commentUpdate$','parse','getOwnPropertyDescriptor','addComment','find','post','_threadCommentModel','641263YUuhGA','payload','rangeType','Injector','userId','requireSession','145785PLMJpy','_commentService','resolveComment','personId','subscribe','_userService','toStringTag','unitId','16VRxnIN','pluginName','ref','getMemberID','slice','bufferTime','8322JukZym','Edit','18YHUapA','HTTPService','_httpService','CustomRangeType','Plugin','replies','/list','UserManagerService','/delete','getUnit','Add','user','getComment','updateComment','delete','UniverInstanceType','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initUserSync','Solved','add','disposeWithMe','OpenOrReOpen','userID','Unknown','UniverThreadCommentUIPlugin','_init','/universer-api/comment/unit/','Inject','1RFdoyD','body','onStarting','Reply','root','saveCommentToSnapshot','comment','stringify','get','resolved','solved','375152NwBBJS','rangeId','reply','replyId','Solve','filter','UniverThreadCommentDataSourcePlugin','code','_initDataSource','content','YYYY/MM/DD\x20HH:mm','length','/universer-api/user/list','_configService','syncUpdateMutationToColla','users','dayjs','CommentService','/solved','Module','threadId','ThreadCommentModel','error','_threadCommentDataSource'];_0x921f=function(){return _0x5d1b2b;};return _0x921f();}let _=class extends c[_0x4d9893(0xa7)]{constructor(_0x44759e,_0x387b7e,_0x348ac1,_0x5d6a2f){const _0x43380a=_0x4d9893;super(),this[_0x43380a(0xb8)]=_0x44759e,this[_0x43380a(0xb0)]=_0x387b7e,this[_0x43380a(0xbc)]=_0x348ac1,this['_injector']=_0x5d6a2f,this[_0x43380a(0xe1)](),this[_0x43380a(0xd9)]();}[_0x4d9893(0xd9)](){const _0x9fab5a=_0x4d9893;this[_0x9fab5a(0xdc)](this[_0x9fab5a(0xb0)][_0x9fab5a(0xaa)]['pipe'](j[_0x9fab5a(0xc4)](0x10))[_0x9fab5a(0xbb)](_0x471725=>{const _0xde650b=_0x9fab5a,_0x196b88=new Set();_0x471725[_0xde650b(0x96)](_0x48d556=>{const _0x19d077=_0xde650b;if(_0x48d556['type']===_0x19d077(0xdb)){const _0x176226=_0x48d556[_0x19d077(0xb2)][_0x19d077(0xba)];_0x196b88[_0x19d077(0xdb)](_0x176226);}}),R(this[_0xde650b(0xa8)],_0x196b88);}));}[_0x4d9893(0xe1)](){const _0xd4feb7=_0x4d9893;this[_0xd4feb7(0xdc)](this[_0xd4feb7(0xb8)][_0xd4feb7(0xaa)][_0xd4feb7(0xbb)](async _0x52b5e7=>{const _0x4ed3dc=_0xd4feb7;var _0x246e1e,_0x139422,_0x5e4f3f,_0x365713;const _0x3c242e=(_0x246e1e=this[_0x4ed3dc(0xb0)]['getUnit'](_0x52b5e7[_0x4ed3dc(0xbe)])[_0x4ed3dc(0xae)](_0x5daeab=>_0x5daeab['threadId']===_0x52b5e7[_0x4ed3dc(0x103)]))==null?void 0x0:_0x246e1e['root'];if(!_0x3c242e)return;const {unitId:_0x3be60c,subUnitId:_0x9b6069}=_0x3c242e;switch(_0x52b5e7[_0x4ed3dc(0xd2)]&&this[_0x4ed3dc(0xbc)][_0x4ed3dc(0x9b)](_0x52b5e7[_0x4ed3dc(0xd2)]),_0x52b5e7[_0x4ed3dc(0xa9)]){case v[_0x4ed3dc(0xd1)]:break;case v[_0x4ed3dc(0xe7)]:{this[_0x4ed3dc(0xb0)][_0x4ed3dc(0xad)](_0x3be60c,_0x9b6069,{'unitId':_0x3be60c,'subUnitId':_0x9b6069,'ref':'','id':_0x52b5e7[_0x4ed3dc(0xf2)],'dT':f(+_0x52b5e7[_0x4ed3dc(0x94)]),'threadId':_0x52b5e7['threadId'],'personId':(_0x5e4f3f=(_0x139422=_0x52b5e7[_0x4ed3dc(0xd2)])==null?void 0x0:_0x139422[_0x4ed3dc(0xde)])!=null?_0x5e4f3f:_0x52b5e7[_0x4ed3dc(0xb5)],'text':JSON['parse'](_0x52b5e7[_0x4ed3dc(0xf8)]),'parentId':_0x3c242e['id']});break;}case v[_0x4ed3dc(0x8f)]:{const _0x38fbfe=this['_threadCommentModel'][_0x4ed3dc(0xd3)](_0x3be60c,_0x9b6069,_0x52b5e7[_0x4ed3dc(0xf2)]);_0x38fbfe&&_0x38fbfe['parentId']&&this['_threadCommentModel']['deleteComment'](_0x3be60c,_0x9b6069,_0x52b5e7[_0x4ed3dc(0xf2)]);break;}case v[_0x4ed3dc(0xc6)]:{this['_threadCommentModel'][_0x4ed3dc(0xd4)](_0x3be60c,_0x9b6069,{'commentId':_0x52b5e7['replyId'],'text':JSON[_0x4ed3dc(0xab)](_0x52b5e7[_0x4ed3dc(0xf8)])});break;}case v[_0x4ed3dc(0xf3)]:{const _0x119d25=(_0x365713=this[_0x4ed3dc(0xb0)][_0x4ed3dc(0xd0)](_0x52b5e7['unitId'])[_0x4ed3dc(0xae)](_0x3d4071=>_0x3d4071[_0x4ed3dc(0x103)]===_0x52b5e7[_0x4ed3dc(0x103)]))==null?void 0x0:_0x365713[_0x4ed3dc(0xe8)];_0x119d25&&this[_0x4ed3dc(0xb0)][_0x4ed3dc(0xb9)](_0x3be60c,_0x9b6069,_0x119d25['id'],_0x52b5e7['solved']===I[_0x4ed3dc(0xda)]);break;}}}));}};_=E([S(0x0,c[_0x4d9893(0xe3)](b[_0x4d9893(0x100)])),S(0x1,c[_0x4d9893(0xe3)](M[_0x4d9893(0x104)])),S(0x2,c[_0x4d9893(0xe3)](c['UserManagerService'])),S(0x3,c[_0x4d9893(0xe3)](c[_0x4d9893(0xb4)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x4d9893(0xac)],x=(_0xb4f27,_0x176743,_0x1e6580,_0x1a631a)=>{const _0x31b142=_0x4d9893;for(var _0x823a17=_0x1a631a>0x1?void 0x0:_0x1a631a?A(_0x176743,_0x1e6580):_0x176743,_0x5f92b6=_0xb4f27[_0x31b142(0xfa)]-0x1,_0x499f40;_0x5f92b6>=0x0;_0x5f92b6--)(_0x499f40=_0xb4f27[_0x5f92b6])&&(_0x823a17=_0x499f40(_0x823a17)||_0x823a17);return _0x823a17;},C=(_0x2e273b,_0xc84b20)=>(_0x1c5206,_0x4150a3)=>_0xc84b20(_0x1c5206,_0x4150a3,_0x2e273b);function Y(_0x2b3d36,_0x34f3c0){const _0x18baff=_0x4d9893,_0x2963f1=_0x2b3d36[_0x18baff(0xcc)][0x0];return{..._0x34f3c0,'id':_0x2963f1[_0x18baff(0xf2)],'resolved':_0x2b3d36[_0x18baff(0xee)]===0x1,'dT':f(_0x2963f1['createTimestamp']),'personId':_0x2963f1[_0x18baff(0xb5)],'threadId':_0x2963f1[_0x18baff(0x103)]};}function G(_0x1ce70a,_0x4a624d,_0x37d2b7){const _0x4dc731=_0x4d9893;var _0x13856e,_0x428fb4;if(((_0x428fb4=(_0x13856e=_0x1ce70a==null?void 0x0:_0x1ce70a[_0x4dc731(0xcc)])==null?void 0x0:_0x13856e[_0x4dc731(0xfa)])!=null?_0x428fb4:0x0)>0x0){const _0x183633=(_0x13a4c8,_0x2cfd87)=>({'id':_0x13a4c8[_0x4dc731(0xf2)],'threadId':_0x13a4c8['threadId'],'dT':f(_0x13a4c8[_0x4dc731(0x94)]),'personId':_0x13a4c8[_0x4dc731(0xb5)],'resolved':_0x1ce70a[_0x4dc731(0xee)]===I['Solved'],'unitId':_0x4a624d,'subUnitId':_0x37d2b7,'text':JSON[_0x4dc731(0xab)](_0x13a4c8[_0x4dc731(0xf8)]),'parentId':_0x2cfd87}),_0xa8d8b=_0x183633(_0x1ce70a[_0x4dc731(0xcc)][0x0]);return{..._0xa8d8b,'children':_0x1ce70a['replies'][_0x4dc731(0xc3)](0x1)['map'](_0x5bcf61=>_0x183633(_0x5bcf61,_0xa8d8b['id']))};}return null;}let p=class{constructor(_0x23a115,_0x469d62,_0x58dfe8){const _0x5a855e=_0x4d9893;this[_0x5a855e(0xc9)]=_0x23a115,this[_0x5a855e(0xbc)]=_0x469d62,this[_0x5a855e(0xa1)]=_0x58dfe8;}async[_0x4d9893(0xad)](_0xe90edb){const _0x104126=_0x4d9893;var _0x41252e,_0x4e750a;const {parentId:_0x4993e8,unitId:_0xe68ae,text:_0x42f2cf,threadId:_0x480deb}=_0xe90edb,_0x4a17d4=(_0x4e750a=(_0x41252e=_0x42f2cf[_0x104126(0x99)])==null?void 0x0:_0x41252e[_0x104126(0xf4)](_0x22910a=>_0x22910a[_0x104126(0xb3)]===c[_0x104126(0xca)][_0x104126(0x93)])[_0x104126(0x8d)](_0x2219ba=>_0x2219ba[_0x104126(0xf0)]))!=null?_0x4e750a:[],_0x558257=JSON[_0x104126(0xeb)](_0x42f2cf),_0x31edc4=(await this['_sessionService'][_0x104126(0xb6)](_0xe68ae))[_0x104126(0xc2)]();if(_0x4993e8){const _0x22ce4f={'memberId':_0x31edc4,'unitId':_0xe68ae,'content':_0x558257,'mention':_0x4a17d4,'threadId':_0x480deb},_0x153804=(await this[_0x104126(0xc9)][_0x104126(0xaf)]('/universer-api/comment/unit/'+_0xe68ae+_0x104126(0x9e),{'body':_0x22ce4f}))['body'][_0x104126(0xf1)];return{..._0xe90edb,'id':_0x153804[_0x104126(0xf2)],'dT':c[_0x104126(0xff)](+_0x153804['createTimestamp'])[_0x104126(0xa0)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x153804['userId']};}else{const _0x3d70d7={'memberId':_0x31edc4,'unitId':_0xe68ae,'content':_0x558257,'mention':_0x4a17d4},_0xd674a3=await this['_httpService']['post'](_0x104126(0xe2)+_0xe68ae+_0x104126(0x95),{'body':_0x3d70d7});return Y(_0xd674a3[_0x104126(0xe5)][_0x104126(0xea)],_0xe90edb);}}async[_0x4d9893(0xd4)](_0x5deba7){const _0x4951a0=_0x4d9893;var _0x220723,_0x103887;const {text:_0x149e3e,unitId:_0x18162b}=_0x5deba7,_0x35526c=(_0x103887=(_0x220723=_0x149e3e[_0x4951a0(0x99)])==null?void 0x0:_0x220723[_0x4951a0(0xf4)](_0x3aca50=>_0x3aca50[_0x4951a0(0xb3)]===c[_0x4951a0(0xca)][_0x4951a0(0x93)])['map'](_0x5a3aac=>_0x5a3aac[_0x4951a0(0xf0)]))!=null?_0x103887:[],_0x12fd05=JSON[_0x4951a0(0xeb)](_0x149e3e),_0x455a2d=_0x5deba7[_0x4951a0(0x103)],_0x351a33=_0x5deba7['id'],_0xc454f9={'memberId':(await this[_0x4951a0(0xa1)]['requireSession'](_0x18162b))[_0x4951a0(0xc2)](),'unitId':_0x18162b,'threadId':_0x455a2d,'mention':_0x35526c,'content':_0x12fd05,'replyId':_0x351a33},_0x269bd1=await this[_0x4951a0(0xc9)][_0x4951a0(0xaf)]('/universer-api/comment/unit/'+_0x18162b+_0x4951a0(0xa5),{'body':_0xc454f9});return!_0x269bd1[_0x4951a0(0xe5)][_0x4951a0(0x105)]||_0x269bd1[_0x4951a0(0xe5)][_0x4951a0(0x105)][_0x4951a0(0xf6)]===0x1;}async[_0x4d9893(0xb9)](_0x2cdd35){const _0x4d532d=_0x4d9893,{unitId:_0x575162}=_0x2cdd35,_0x33bcfe=_0x2cdd35[_0x4d532d(0x103)],_0x1fca14={'memberId':this[_0x4d532d(0xbc)]['getCurrentUser']()[_0x4d532d(0xde)],'unitId':_0x575162,'threadId':_0x33bcfe,'solved':_0x2cdd35[_0x4d532d(0xed)]?I[_0x4d532d(0xda)]:I['OpenOrReOpen']},_0x30238c=await this['_httpService'][_0x4d532d(0xaf)](_0x4d532d(0xe2)+_0x575162+_0x4d532d(0x101),{'body':_0x1fca14});return!_0x30238c[_0x4d532d(0xe5)][_0x4d532d(0x105)]||_0x30238c['body']['error']['code']===0x1;}async['deleteComment'](_0x135afc,_0x58b731,_0xcbd6d,_0x5de782){const _0xf19fd1=_0x4d9893,_0xb6c32f={'memberId':(await this[_0xf19fd1(0xa1)][_0xf19fd1(0xb6)](_0x135afc))[_0xf19fd1(0xc2)](),'threadId':_0xcbd6d,'replyId':_0x5de782,'unitId':_0x135afc},_0x254ffe=await this[_0xf19fd1(0xc9)][_0xf19fd1(0xaf)](_0xf19fd1(0xe2)+_0x135afc+_0xf19fd1(0xcf),{'body':_0xb6c32f});return!_0x254ffe['body'][_0xf19fd1(0x105)]||_0x254ffe[_0xf19fd1(0xe5)][_0xf19fd1(0x105)]['code']===0x1;}async['listComments'](_0x56ce51,_0x34936d,_0x233ba7){const _0x1a3374=_0x4d9893,_0x4381b8={'unitId':_0x56ce51,'threadId':_0x233ba7},_0x4f77cf=await this[_0x1a3374(0xc9)][_0x1a3374(0xaf)](_0x1a3374(0xe2)+_0x56ce51+_0x1a3374(0xcd),{'body':_0x4381b8}),_0x106c1f=_0x233ba7[_0x1a3374(0x8d)](_0x1ed7ca=>G(_0x4f77cf[_0x1a3374(0xe5)]['comments'][_0x1ed7ca],_0x56ce51,_0x34936d))[_0x1a3374(0xf4)](Boolean);return Object['values'](_0x4f77cf[_0x1a3374(0xe5)]['users'])[_0x1a3374(0x96)](_0x57f93d=>{const _0x474b77=_0x1a3374;this[_0x474b77(0xbc)][_0x474b77(0x9b)](_0x57f93d);}),_0x106c1f;}[_0x4d9893(0xe9)](_0x53c864){const _0x264a9b=_0x4d9893;return{'id':_0x53c864['id'],'threadId':_0x53c864[_0x264a9b(0x103)],'ref':_0x53c864[_0x264a9b(0xc1)]};}};p=x([C(0x0,c[_0x4d9893(0xe3)](P['HTTPService'])),C(0x1,c[_0x4d9893(0xe3)](c[_0x4d9893(0xce)])),C(0x2,c[_0x4d9893(0xe3)](b[_0x4d9893(0x8e)]))],p);var H=Object[_0x4d9893(0xac)],J=(_0xb2e016,_0x28ccb5,_0x30b31a,_0x18cf60)=>{for(var _0x337311=_0x18cf60>0x1?void 0x0:_0x18cf60?H(_0x28ccb5,_0x30b31a):_0x28ccb5,_0x84fc9d=_0xb2e016['length']-0x1,_0x53d6bd;_0x84fc9d>=0x0;_0x84fc9d--)(_0x53d6bd=_0xb2e016[_0x84fc9d])&&(_0x337311=_0x53d6bd(_0x337311)||_0x337311);return _0x337311;},y=(_0x22d07a,_0x17de8b)=>(_0x451ecf,_0x214645)=>_0x17de8b(_0x451ecf,_0x214645,_0x22d07a);let g=class extends c['Disposable']{constructor(_0x1ac588,_0x537c11){const _0x2f87cb=_0x4d9893;super(),this[_0x2f87cb(0xa3)]=_0x1ac588,this[_0x2f87cb(0x8a)]=_0x537c11,this[_0x2f87cb(0xf7)]();}[_0x4d9893(0xf7)](){const _0x59b1b2=_0x4d9893;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x59b1b2(0xa3)][_0x59b1b2(0xfd)]=!0x1;}};g=J([y(0x0,M[_0x4d9893(0x97)]),y(0x1,c[_0x4d9893(0xe3)](p))],g);var F=Object['defineProperty'],L=Object[_0x4d9893(0xac)],Z=(_0x2a47a6,_0x31d8f9,_0x317c98)=>_0x31d8f9 in _0x2a47a6?F(_0x2a47a6,_0x31d8f9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x317c98}):_0x2a47a6[_0x31d8f9]=_0x317c98,W=(_0x2ceab3,_0x28bd59,_0x17c8a4,_0x24fc32)=>{const _0x558aaa=_0x4d9893;for(var _0x5c38ae=_0x24fc32>0x1?void 0x0:_0x24fc32?L(_0x28bd59,_0x17c8a4):_0x28bd59,_0x4f995b=_0x2ceab3[_0x558aaa(0xfa)]-0x1,_0x54fdf8;_0x4f995b>=0x0;_0x4f995b--)(_0x54fdf8=_0x2ceab3[_0x4f995b])&&(_0x5c38ae=_0x54fdf8(_0x5c38ae)||_0x5c38ae);return _0x5c38ae;},O=(_0x462731,_0x2b18c3)=>(_0x1a2e56,_0x2038cc)=>_0x2b18c3(_0x1a2e56,_0x2038cc,_0x462731),N=(_0x1a88ae,_0x118b64,_0x213e65)=>Z(_0x1a88ae,typeof _0x118b64!='symbol'?_0x118b64+'':_0x118b64,_0x213e65);function _0x407f(_0x1bf611,_0x4a5ccf){_0x1bf611=_0x1bf611-0x8a;const _0x921fea=_0x921f();let _0x407f39=_0x921fea[_0x1bf611];return _0x407f39;}exports[_0x4d9893(0xf5)]=class extends c[_0x4d9893(0xcb)]{constructor(_0x47a1e2=D,_0x3f3adb,_0x4d9de7){const _0x4ecd55=_0x4d9893;super(),this[_0x4ecd55(0xa2)]=_0x47a1e2,this['_injector']=_0x3f3adb,this['_configService']=_0x4d9de7;const {..._0x37a6f6}=c[_0x4ecd55(0x9d)]({},D,this[_0x4ecd55(0xa2)]);this[_0x4ecd55(0xfc)][_0x4ecd55(0x9a)](q,_0x37a6f6);}[_0x4d9893(0xe6)](){[[p],[g],[_]]['forEach'](_0x4b0da5=>{const _0x2a58fe=_0x407f;this[_0x2a58fe(0xa8)]['add'](_0x4b0da5);});}[_0x4d9893(0x92)](){const _0x5a07aa=_0x4d9893;this['_injector']['get'](g),this[_0x5a07aa(0xa8)][_0x5a07aa(0xec)](_);}},N(exports[_0x4d9893(0xf5)],_0x4d9893(0xc0),U),N(exports[_0x4d9893(0xf5)],'type',c[_0x4d9893(0xd6)][_0x4d9893(0x8c)]),exports[_0x4d9893(0xf5)]=W([c[_0x4d9893(0x91)](w[_0x4d9893(0xe0)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x4d9893(0xe3)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x4d9893(0xf5)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x30f0a8=_0x4237;(function(_0x22d320,_0x2f0368){const _0x52bd35=_0x4237,_0x3af3d5=_0x22d320();while(!![]){try{const _0x5b3c62=parseInt(_0x52bd35(0x1ab))/0x1*(parseInt(_0x52bd35(0x1c2))/0x2)+parseInt(_0x52bd35(0x1ce))/0x3*(-parseInt(_0x52bd35(0x1f1))/0x4)+parseInt(_0x52bd35(0x1e0))/0x5*(-parseInt(_0x52bd35(0x1fe))/0x6)+parseInt(_0x52bd35(0x1ad))/0x7+-parseInt(_0x52bd35(0x1ac))/0x8+parseInt(_0x52bd35(0x1ca))/0x9*(-parseInt(_0x52bd35(0x1cf))/0xa)+parseInt(_0x52bd35(0x1be))/0xb;if(_0x5b3c62===_0x2f0368)break;else _0x3af3d5['push'](_0x3af3d5['shift']());}catch(_0x240cba){_0x3af3d5['push'](_0x3af3d5['shift']());}}}(_0x32be,0x8c230));import{CommentService as _0x46763f,CollaborationSessionService as _0x1c6583,UniverCollaborationClientPlugin as _0x1bac31}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x11e776}from'@univerjs-pro/license';import{dayjs as _0x195604,UserManagerService as _0x1b8ddd,Inject as _0x55050b,Injector as _0x32158c,Disposable as _0x214298,CustomRangeType as _0x30c81c,UniverInstanceType as _0x57d252,DependentOn as _0x2f745a,IConfigService as _0x3d811e,Plugin as _0x37af55,merge as _0x522ad0}from'@univerjs/core';function _0x32be(){const _0x43294f=['_injector','UNRECOGNIZED','commentUpdate$','updateComment','getOwnPropertyDescriptor','dataSource','Unknown','replyId','solved','personId','root','getUnit','Reply','length','getMemberID','reply','userId','2ypqZGJ','4764032isNECI','679224UpiuhV','replies','delete','_config','user','userID','_threadCommentDataSourceService','OpenOrReOpen','threadId','Edit','rangeType','createTimestamp','Delete','pluginName','_sessionService','_httpService','users','10097934VudKrl','/list','add','_init','808664OfudHA','_userService','_threadCommentModel','parse','symbol','slice','map','/delete','738TaymGO','setConfig','type','onReady','3iVFCXW','72880ZuCOqt','getComment','post','payload','forEach','Solved','disposeWithMe','body','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','rangeId','/reply','YYYY/MM/DD\x20HH:mm','get','stringify','format','deleteComment','555loLODe','subscribe','saveCommentToSnapshot','Add','size','comment','comments','thread-comment-data-source.config','/universer-api/comment/unit/','content','values','listComments','_initDataSource','find','addComment','customRanges','parentId','58892zFHRUb','_commentService','/add','filter','_threadCommentDataSource','UNIVER_UNKNOWN','addUser','COMMENT','resolved','Solve','_initUserSync','requireSession','resolveComment','2262lVvdab','_configService','unitId'];_0x32be=function(){return _0x43294f;};return _0x32be();}import{UniverThreadCommentUIPlugin as _0x1c5da8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x10a242,IThreadCommentDataSourceService as _0x2dfa35}from'@univerjs/thread-comment';import{bufferTime as _0x40b52a}from'rxjs';import{HTTPService as _0x3f867}from'@univerjs/network';const W=_0x30f0a8(0x1d8);var I=(_0x168d6b=>(_0x168d6b[_0x168d6b[_0x30f0a8(0x1b4)]=0x0]=_0x30f0a8(0x1b4),_0x168d6b[_0x168d6b[_0x30f0a8(0x1d4)]=0x1]='Solved',_0x168d6b[_0x168d6b[_0x30f0a8(0x202)]=-0x1]=_0x30f0a8(0x202),_0x168d6b))(I||{}),v=(_0x2bbf6f=>(_0x2bbf6f[_0x2bbf6f['Unknown']=0x0]=_0x30f0a8(0x207),_0x2bbf6f[_0x2bbf6f[_0x30f0a8(0x1e3)]=0x1]=_0x30f0a8(0x1e3),_0x2bbf6f[_0x2bbf6f['Reply']=0x2]=_0x30f0a8(0x1a6),_0x2bbf6f[_0x2bbf6f[_0x30f0a8(0x1b6)]=0x3]='Edit',_0x2bbf6f[_0x2bbf6f['Delete']=0x4]=_0x30f0a8(0x1b9),_0x2bbf6f[_0x2bbf6f[_0x30f0a8(0x1fa)]=0x5]='Solve',_0x2bbf6f[_0x2bbf6f[_0x30f0a8(0x202)]=-0x1]=_0x30f0a8(0x202),_0x2bbf6f))(v||{});const y=_0x370e07=>_0x195604(new Date(+_0x370e07))[_0x30f0a8(0x1de)](_0x30f0a8(0x1db)),B=async(_0x27c79a,_0xe1d543)=>{const _0x368757=_0x30f0a8,_0x3545e0=_0x27c79a[_0x368757(0x1dc)](_0x1b8ddd),_0x124dd0=_0x27c79a[_0x368757(0x1dc)](_0x3f867);_0xe1d543[_0x368757(0x1d3)](_0x24eaf5=>{const _0x40c848=_0x368757;_0x3545e0['getUser'](_0x24eaf5)&&_0xe1d543[_0x40c848(0x1af)](_0x24eaf5);}),_0xe1d543[_0x368757(0x1e4)]&&(await _0x124dd0[_0x368757(0x1dc)]('/universer-api/user/list',{'params':{'userIDs':[..._0xe1d543]}}))[_0x368757(0x1d6)]['users'][_0x368757(0x1d3)](_0x14a845=>{_0x14a845&&_0x3545e0['addUser'](_0x14a845);});};var K=Object[_0x30f0a8(0x205)],V=(_0x27df89,_0xf619d1,_0x12cb55,_0x3d084c)=>{const _0x2cae8b=_0x30f0a8;for(var _0xf36819=_0x3d084c>0x1?void 0x0:_0x3d084c?K(_0xf619d1,_0x12cb55):_0xf619d1,_0xa48798=_0x27df89[_0x2cae8b(0x1a7)]-0x1,_0x19c99b;_0xa48798>=0x0;_0xa48798--)(_0x19c99b=_0x27df89[_0xa48798])&&(_0xf36819=_0x19c99b(_0xf36819)||_0xf36819);return _0xf36819;},p=(_0x169112,_0x4eabc1)=>(_0x297079,_0x209377)=>_0x4eabc1(_0x297079,_0x209377,_0x169112);let _=class extends _0x214298{constructor(_0x5074cb,_0x5f06bc,_0x49ad29,_0x56cc92){const _0x8e99f1=_0x30f0a8;super(),this[_0x8e99f1(0x1f2)]=_0x5074cb,this['_threadCommentModel']=_0x5f06bc,this[_0x8e99f1(0x1c3)]=_0x49ad29,this[_0x8e99f1(0x201)]=_0x56cc92,this['_init'](),this[_0x8e99f1(0x1fb)]();}[_0x30f0a8(0x1fb)](){const _0x3ab467=_0x30f0a8;this[_0x3ab467(0x1d5)](this['_threadCommentModel'][_0x3ab467(0x203)]['pipe'](_0x40b52a(0x10))[_0x3ab467(0x1e1)](_0x1abcbf=>{const _0xf26588=_0x3ab467,_0x1f2749=new Set();_0x1abcbf[_0xf26588(0x1d3)](_0x4053c0=>{const _0x4e7053=_0xf26588;if(_0x4053c0[_0x4e7053(0x1cc)]===_0x4e7053(0x1c0)){const _0x2d9b48=_0x4053c0[_0x4e7053(0x1d2)][_0x4e7053(0x20a)];_0x1f2749['add'](_0x2d9b48);}}),B(this[_0xf26588(0x201)],_0x1f2749);}));}[_0x30f0a8(0x1c1)](){const _0x10fa06=_0x30f0a8;this[_0x10fa06(0x1d5)](this['_commentService'][_0x10fa06(0x203)][_0x10fa06(0x1e1)](async _0x174376=>{const _0x53c931=_0x10fa06;var _0xbeed10,_0x3429ad,_0x273d57,_0x168091;const _0x481f1c=(_0xbeed10=this[_0x53c931(0x1c4)]['getUnit'](_0x174376[_0x53c931(0x200)])[_0x53c931(0x1ed)](_0x593308=>_0x593308[_0x53c931(0x1b5)]===_0x174376[_0x53c931(0x1b5)]))==null?void 0x0:_0xbeed10[_0x53c931(0x1a4)];if(!_0x481f1c)return;const {unitId:_0x1d6718,subUnitId:_0x301dc2}=_0x481f1c;switch(_0x174376[_0x53c931(0x1b1)]&&this['_userService'][_0x53c931(0x1f7)](_0x174376[_0x53c931(0x1b1)]),_0x174376['type']){case v[_0x53c931(0x1e3)]:break;case v[_0x53c931(0x1a6)]:{this[_0x53c931(0x1c4)][_0x53c931(0x1ee)](_0x1d6718,_0x301dc2,{'unitId':_0x1d6718,'subUnitId':_0x301dc2,'ref':'','id':_0x174376[_0x53c931(0x208)],'dT':y(+_0x174376['createTimestamp']),'threadId':_0x174376[_0x53c931(0x1b5)],'personId':(_0x273d57=(_0x3429ad=_0x174376['user'])==null?void 0x0:_0x3429ad[_0x53c931(0x1b2)])!=null?_0x273d57:_0x174376[_0x53c931(0x1aa)],'text':JSON[_0x53c931(0x1c5)](_0x174376[_0x53c931(0x1e9)]),'parentId':_0x481f1c['id']});break;}case v[_0x53c931(0x1b9)]:{const _0x375f7c=this[_0x53c931(0x1c4)][_0x53c931(0x1d0)](_0x1d6718,_0x301dc2,_0x174376[_0x53c931(0x208)]);_0x375f7c&&_0x375f7c[_0x53c931(0x1f0)]&&this[_0x53c931(0x1c4)][_0x53c931(0x1df)](_0x1d6718,_0x301dc2,_0x174376[_0x53c931(0x208)]);break;}case v[_0x53c931(0x1b6)]:{this[_0x53c931(0x1c4)][_0x53c931(0x204)](_0x1d6718,_0x301dc2,{'commentId':_0x174376[_0x53c931(0x208)],'text':JSON[_0x53c931(0x1c5)](_0x174376[_0x53c931(0x1e9)])});break;}case v[_0x53c931(0x1fa)]:{const _0x233ccf=(_0x168091=this[_0x53c931(0x1c4)][_0x53c931(0x1a5)](_0x174376[_0x53c931(0x200)])[_0x53c931(0x1ed)](_0x115029=>_0x115029[_0x53c931(0x1b5)]===_0x174376[_0x53c931(0x1b5)]))==null?void 0x0:_0x168091[_0x53c931(0x1a4)];_0x233ccf&&this[_0x53c931(0x1c4)][_0x53c931(0x1fd)](_0x1d6718,_0x301dc2,_0x233ccf['id'],_0x174376[_0x53c931(0x209)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x55050b(_0x46763f)),p(0x1,_0x55050b(_0x10a242)),p(0x2,_0x55050b(_0x1b8ddd)),p(0x3,_0x55050b(_0x32158c))],_);const z=_0x30f0a8(0x1e7),O={};var k=Object[_0x30f0a8(0x205)],Q=(_0x4e0f6f,_0x2bfe01,_0x3f35e9,_0xb2e3c3)=>{const _0x518af0=_0x30f0a8;for(var _0x4dd363=_0xb2e3c3>0x1?void 0x0:_0xb2e3c3?k(_0x2bfe01,_0x3f35e9):_0x2bfe01,_0x5366de=_0x4e0f6f[_0x518af0(0x1a7)]-0x1,_0x1849a3;_0x5366de>=0x0;_0x5366de--)(_0x1849a3=_0x4e0f6f[_0x5366de])&&(_0x4dd363=_0x1849a3(_0x4dd363)||_0x4dd363);return _0x4dd363;},b=(_0x3b12a6,_0x3b9f69)=>(_0x26f417,_0x672114)=>_0x3b9f69(_0x26f417,_0x672114,_0x3b12a6);function X(_0xc109ff,_0xd8cd3b){const _0x34f004=_0x30f0a8,_0x22b966=_0xc109ff[_0x34f004(0x1ae)][0x0];return{..._0xd8cd3b,'id':_0x22b966[_0x34f004(0x208)],'resolved':_0xc109ff[_0x34f004(0x209)]===0x1,'dT':y(_0x22b966[_0x34f004(0x1b8)]),'personId':_0x22b966[_0x34f004(0x1aa)],'threadId':_0x22b966[_0x34f004(0x1b5)]};}function ee(_0x253eb5,_0x189b64,_0x5dfb10){const _0x5927bf=_0x30f0a8;var _0x4554bb,_0x2c22f2;if(((_0x2c22f2=(_0x4554bb=_0x253eb5==null?void 0x0:_0x253eb5[_0x5927bf(0x1ae)])==null?void 0x0:_0x4554bb[_0x5927bf(0x1a7)])!=null?_0x2c22f2:0x0)>0x0){const _0x2dfb10=(_0x33cb18,_0x544887)=>({'id':_0x33cb18[_0x5927bf(0x208)],'threadId':_0x33cb18['threadId'],'dT':y(_0x33cb18[_0x5927bf(0x1b8)]),'personId':_0x33cb18[_0x5927bf(0x1aa)],'resolved':_0x253eb5[_0x5927bf(0x209)]===I[_0x5927bf(0x1d4)],'unitId':_0x189b64,'subUnitId':_0x5dfb10,'text':JSON[_0x5927bf(0x1c5)](_0x33cb18[_0x5927bf(0x1e9)]),'parentId':_0x544887}),_0x523607=_0x2dfb10(_0x253eb5[_0x5927bf(0x1ae)][0x0]);return{..._0x523607,'children':_0x253eb5[_0x5927bf(0x1ae)][_0x5927bf(0x1c7)](0x1)[_0x5927bf(0x1c8)](_0x111d23=>_0x2dfb10(_0x111d23,_0x523607['id']))};}return null;}let S=class{constructor(_0x5b456f,_0x4de251,_0x38cf95){const _0x3d19d1=_0x30f0a8;this[_0x3d19d1(0x1bc)]=_0x5b456f,this[_0x3d19d1(0x1c3)]=_0x4de251,this[_0x3d19d1(0x1bb)]=_0x38cf95;}async[_0x30f0a8(0x1ee)](_0x1973bd){const _0x4dc71b=_0x30f0a8;var _0x5c9408,_0x1d5294;const {parentId:_0x83a250,unitId:_0x4f6654,text:_0x598eef,threadId:_0x2fba83}=_0x1973bd,_0x4e43dd=(_0x1d5294=(_0x5c9408=_0x598eef[_0x4dc71b(0x1ef)])==null?void 0x0:_0x5c9408[_0x4dc71b(0x1f4)](_0x1553fd=>_0x1553fd['rangeType']===_0x30c81c['COMMENT'])['map'](_0x3d7767=>_0x3d7767[_0x4dc71b(0x1d9)]))!=null?_0x1d5294:[],_0x41afd1=JSON[_0x4dc71b(0x1dd)](_0x598eef),_0x1d0f51=(await this[_0x4dc71b(0x1bb)]['requireSession'](_0x4f6654))['getMemberID']();if(_0x83a250){const _0x4887b2={'memberId':_0x1d0f51,'unitId':_0x4f6654,'content':_0x41afd1,'mention':_0x4e43dd,'threadId':_0x2fba83},_0x5ec48a=(await this[_0x4dc71b(0x1bc)][_0x4dc71b(0x1d1)](_0x4dc71b(0x1e8)+_0x4f6654+_0x4dc71b(0x1da),{'body':_0x4887b2}))[_0x4dc71b(0x1d6)][_0x4dc71b(0x1a9)];return{..._0x1973bd,'id':_0x5ec48a['replyId'],'dT':_0x195604(+_0x5ec48a[_0x4dc71b(0x1b8)])[_0x4dc71b(0x1de)](_0x4dc71b(0x1db)),'personId':_0x5ec48a[_0x4dc71b(0x1aa)]};}else{const _0x4cb695={'memberId':_0x1d0f51,'unitId':_0x4f6654,'content':_0x41afd1,'mention':_0x4e43dd},_0x111748=await this[_0x4dc71b(0x1bc)][_0x4dc71b(0x1d1)]('/universer-api/comment/unit/'+_0x4f6654+_0x4dc71b(0x1f3),{'body':_0x4cb695});return X(_0x111748[_0x4dc71b(0x1d6)][_0x4dc71b(0x1e5)],_0x1973bd);}}async[_0x30f0a8(0x204)](_0x3fd30b){const _0x5cc2e3=_0x30f0a8;var _0x3f6615,_0x3bc192;const {text:_0x19f479,unitId:_0x2c5cc9}=_0x3fd30b,_0x221204=(_0x3bc192=(_0x3f6615=_0x19f479['customRanges'])==null?void 0x0:_0x3f6615[_0x5cc2e3(0x1f4)](_0x3c62fb=>_0x3c62fb[_0x5cc2e3(0x1b7)]===_0x30c81c[_0x5cc2e3(0x1f8)])[_0x5cc2e3(0x1c8)](_0x37cebc=>_0x37cebc['rangeId']))!=null?_0x3bc192:[],_0x3298f2=JSON['stringify'](_0x19f479),_0x255348=_0x3fd30b[_0x5cc2e3(0x1b5)],_0x49c528=_0x3fd30b['id'],_0x37121b={'memberId':(await this['_sessionService']['requireSession'](_0x2c5cc9))[_0x5cc2e3(0x1a8)](),'unitId':_0x2c5cc9,'threadId':_0x255348,'mention':_0x221204,'content':_0x3298f2,'replyId':_0x49c528},_0x2357bc=await this[_0x5cc2e3(0x1bc)][_0x5cc2e3(0x1d1)](_0x5cc2e3(0x1e8)+_0x2c5cc9+'/edit',{'body':_0x37121b});return!_0x2357bc[_0x5cc2e3(0x1d6)][_0x5cc2e3(0x1d7)]||_0x2357bc[_0x5cc2e3(0x1d6)][_0x5cc2e3(0x1d7)]['code']===0x1;}async[_0x30f0a8(0x1fd)](_0x80a3dd){const _0x54b8b9=_0x30f0a8,{unitId:_0x4bf594}=_0x80a3dd,_0x21be83=_0x80a3dd[_0x54b8b9(0x1b5)],_0x54c515={'memberId':this[_0x54b8b9(0x1c3)]['getCurrentUser']()[_0x54b8b9(0x1b2)],'unitId':_0x4bf594,'threadId':_0x21be83,'solved':_0x80a3dd[_0x54b8b9(0x1f9)]?I[_0x54b8b9(0x1d4)]:I[_0x54b8b9(0x1b4)]},_0x1a725a=await this[_0x54b8b9(0x1bc)][_0x54b8b9(0x1d1)]('/universer-api/comment/unit/'+_0x4bf594+'/solved',{'body':_0x54c515});return!_0x1a725a[_0x54b8b9(0x1d6)]['error']||_0x1a725a[_0x54b8b9(0x1d6)]['error']['code']===0x1;}async[_0x30f0a8(0x1df)](_0x4cade8,_0x345545,_0x1c3659,_0x4aa1ff){const _0x33a048=_0x30f0a8,_0x4d9db4={'memberId':(await this['_sessionService'][_0x33a048(0x1fc)](_0x4cade8))['getMemberID'](),'threadId':_0x1c3659,'replyId':_0x4aa1ff,'unitId':_0x4cade8},_0x884d6=await this['_httpService'][_0x33a048(0x1d1)]('/universer-api/comment/unit/'+_0x4cade8+_0x33a048(0x1c9),{'body':_0x4d9db4});return!_0x884d6[_0x33a048(0x1d6)][_0x33a048(0x1d7)]||_0x884d6[_0x33a048(0x1d6)][_0x33a048(0x1d7)]['code']===0x1;}async[_0x30f0a8(0x1eb)](_0x1afb36,_0x1c43f7,_0x5827d9){const _0x1541d7=_0x30f0a8,_0x281460={'unitId':_0x1afb36,'threadId':_0x5827d9},_0x2ac879=await this[_0x1541d7(0x1bc)][_0x1541d7(0x1d1)](_0x1541d7(0x1e8)+_0x1afb36+_0x1541d7(0x1bf),{'body':_0x281460}),_0x3455c7=_0x5827d9[_0x1541d7(0x1c8)](_0x2b335e=>ee(_0x2ac879[_0x1541d7(0x1d6)][_0x1541d7(0x1e6)][_0x2b335e],_0x1afb36,_0x1c43f7))[_0x1541d7(0x1f4)](Boolean);return Object[_0x1541d7(0x1ea)](_0x2ac879[_0x1541d7(0x1d6)][_0x1541d7(0x1bd)])[_0x1541d7(0x1d3)](_0x31e699=>{this['_userService']['addUser'](_0x31e699);}),_0x3455c7;}[_0x30f0a8(0x1e2)](_0x2f4e1f){return{'id':_0x2f4e1f['id'],'threadId':_0x2f4e1f['threadId'],'ref':_0x2f4e1f['ref']};}};S=Q([b(0x0,_0x55050b(_0x3f867)),b(0x1,_0x55050b(_0x1b8ddd)),b(0x2,_0x55050b(_0x1c6583))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x2bd257,_0x2f742b,_0x30713f,_0x53bb55)=>{const _0x7b0d3b=_0x30f0a8;for(var _0x2b9406=_0x53bb55>0x1?void 0x0:_0x53bb55?re(_0x2f742b,_0x30713f):_0x2f742b,_0x46b2d9=_0x2bd257[_0x7b0d3b(0x1a7)]-0x1,_0x5154f8;_0x46b2d9>=0x0;_0x46b2d9--)(_0x5154f8=_0x2bd257[_0x46b2d9])&&(_0x2b9406=_0x5154f8(_0x2b9406)||_0x2b9406);return _0x2b9406;},M=(_0x3690bc,_0x3b7ea8)=>(_0x3af179,_0x3d5751)=>_0x3b7ea8(_0x3af179,_0x3d5751,_0x3690bc);let f=class extends _0x214298{constructor(_0x2846ef,_0x5eb479){const _0x23eac0=_0x30f0a8;super(),this['_threadCommentDataSourceService']=_0x2846ef,this[_0x23eac0(0x1f5)]=_0x5eb479,this[_0x23eac0(0x1ec)]();}[_0x30f0a8(0x1ec)](){const _0x9fb0df=_0x30f0a8;this[_0x9fb0df(0x1b3)][_0x9fb0df(0x206)]=this[_0x9fb0df(0x1f5)],this[_0x9fb0df(0x1b3)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x2dfa35),M(0x1,_0x55050b(S))],f);var se=Object['defineProperty'],oe=Object[_0x30f0a8(0x205)],ne=(_0x296719,_0x2c42c7,_0x271e2a)=>_0x2c42c7 in _0x296719?se(_0x296719,_0x2c42c7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x271e2a}):_0x296719[_0x2c42c7]=_0x271e2a,ie=(_0x16b848,_0x3428f1,_0x5854e0,_0x4cf7b5)=>{const _0x42f1ed=_0x30f0a8;for(var _0x2449b5=_0x4cf7b5>0x1?void 0x0:_0x4cf7b5?oe(_0x3428f1,_0x5854e0):_0x3428f1,_0x2f4bc7=_0x16b848[_0x42f1ed(0x1a7)]-0x1,_0x41af97;_0x2f4bc7>=0x0;_0x2f4bc7--)(_0x41af97=_0x16b848[_0x2f4bc7])&&(_0x2449b5=_0x41af97(_0x2449b5)||_0x2449b5);return _0x2449b5;},N=(_0x2afab6,_0x39bec5)=>(_0x1b7e1a,_0x4851fb)=>_0x39bec5(_0x1b7e1a,_0x4851fb,_0x2afab6),$=(_0x46da9a,_0x28443f,_0x209868)=>ne(_0x46da9a,typeof _0x28443f!=_0x30f0a8(0x1c6)?_0x28443f+'':_0x28443f,_0x209868);let g=class extends _0x37af55{constructor(_0x5a3b4e=O,_0x576990,_0xb98a64){const _0x5cce40=_0x30f0a8;super(),this[_0x5cce40(0x1b0)]=_0x5a3b4e,this[_0x5cce40(0x201)]=_0x576990,this[_0x5cce40(0x1ff)]=_0xb98a64;const {..._0x581983}=_0x522ad0({},O,this['_config']);this['_configService'][_0x5cce40(0x1cb)](z,_0x581983);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x4f34cb=>{const _0x36fa89=_0x4237;this[_0x36fa89(0x201)]['add'](_0x4f34cb);});}[_0x30f0a8(0x1cd)](){const _0x512a55=_0x30f0a8;this[_0x512a55(0x201)]['get'](f),this[_0x512a55(0x201)][_0x512a55(0x1dc)](_);}};$(g,_0x30f0a8(0x1ba),W),$(g,_0x30f0a8(0x1cc),_0x57d252[_0x30f0a8(0x1f6)]),g=ie([_0x2f745a(_0x1c5da8,_0x1bac31,_0x11e776),N(0x1,_0x55050b(_0x32158c)),N(0x2,_0x3d811e)],g);function _0x4237(_0x43a8f8,_0x1fde3a){_0x43a8f8=_0x43a8f8-0x1a4;const _0x32be22=_0x32be();let _0x423759=_0x32be22[_0x43a8f8];return _0x423759;}export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x5502ef=_0x6c3d;(function(_0x19a02a,_0x3148c0){const _0x3b5673=_0x6c3d,_0x32203f=_0x19a02a();while(!![]){try{const _0xeea4f4=parseInt(_0x3b5673(0xf4))/0x1*(-parseInt(_0x3b5673(0x109))/0x2)+-parseInt(_0x3b5673(0x108))/0x3*(parseInt(_0x3b5673(0x130))/0x4)+parseInt(_0x3b5673(0xff))/0x5+parseInt(_0x3b5673(0xeb))/0x6*(-parseInt(_0x3b5673(0xf5))/0x7)+-parseInt(_0x3b5673(0x11e))/0x8+parseInt(_0x3b5673(0xd7))/0x9+parseInt(_0x3b5673(0xf7))/0xa*(parseInt(_0x3b5673(0xef))/0xb);if(_0xeea4f4===_0x3148c0)break;else _0x32203f['push'](_0x32203f['shift']());}catch(_0x3a312f){_0x32203f['push'](_0x32203f['shift']());}}}(_0x4c9d,0x1fca8));import{CommentService as _0x384589,CollaborationSessionService as _0x4648a7,UniverCollaborationClientPlugin as _0xbacb1d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4273b7}from'@univerjs-pro/license';import{dayjs as _0x46326d,UserManagerService as _0x27db51,Inject as _0x4bcd01,Injector as _0x3fde1a,Disposable as _0x57944e,CustomRangeType as _0x486a80,UniverInstanceType as _0x486682,DependentOn as _0x56a696,IConfigService as _0x2e8d6c,Plugin as _0x2cdc95,merge as _0x1425e8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x11d26e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x82c273,IThreadCommentDataSourceService as _0x49bb57}from'@univerjs/thread-comment';function _0x6c3d(_0x37e9de,_0x2cddf4){_0x37e9de=_0x37e9de-0xd3;const _0x4c9d6f=_0x4c9d();let _0x6c3d0f=_0x4c9d6f[_0x37e9de];return _0x6c3d0f;}import{bufferTime as _0x30b318}from'rxjs';function _0x4c9d(){const _0x15b6e7=['dataSource','resolved','_httpService','thread-comment-data-source.config','Solve','_config','rangeId','threadId','comment','_sessionService','_threadCommentDataSourceService','OpenOrReOpen','personId','replies','users','6vBTVin','commentUpdate$','code','_initUserSync','6798ibJrAG','userID','createTimestamp','map','solved','75930itfKTx','1306613ydaNvL','customRanges','4730VfOyJz','pipe','content','filter','Delete','pluginName','Edit','addUser','716215fHxlLQ','forEach','root','values','body','updateComment','Add','find','/add','12CGkRVB','2MKkafv','disposeWithMe','_threadCommentDataSource','_threadCommentModel','rangeType','unitId','size','replyId','reply','parentId','/list','slice','YYYY/MM/DD\x20HH:mm','Reply','getCurrentUser','/universer-api/comment/unit/','_injector','/solved','Unknown','Solved','format','1813040rVTUOU','addComment','defineProperty','getComment','deleteComment','_initDataSource','userId','getMemberID','UNRECOGNIZED','user','requireSession','resolveComment','COMMENT','post','add','get','_init','getOwnPropertyDescriptor','17552hYYdbV','/universer-api/user/list','onReady','subscribe','_configService','_userService','/edit','error','saveCommentToSnapshot','1812870MuZphA','syncUpdateMutationToColla','parse','type','length'];_0x4c9d=function(){return _0x15b6e7;};return _0x4c9d();}import{HTTPService as _0x4487a0}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5b6a11=>(_0x5b6a11[_0x5b6a11[_0x5502ef(0xe7)]=0x0]=_0x5502ef(0xe7),_0x5b6a11[_0x5b6a11[_0x5502ef(0x11c)]=0x1]=_0x5502ef(0x11c),_0x5b6a11[_0x5b6a11[_0x5502ef(0x126)]=-0x1]=_0x5502ef(0x126),_0x5b6a11))(I||{}),v=(_0x18381d=>(_0x18381d[_0x18381d['Unknown']=0x0]=_0x5502ef(0x11b),_0x18381d[_0x18381d[_0x5502ef(0x105)]=0x1]=_0x5502ef(0x105),_0x18381d[_0x18381d['Reply']=0x2]=_0x5502ef(0x116),_0x18381d[_0x18381d[_0x5502ef(0xfd)]=0x3]=_0x5502ef(0xfd),_0x18381d[_0x18381d[_0x5502ef(0xfb)]=0x4]=_0x5502ef(0xfb),_0x18381d[_0x18381d[_0x5502ef(0xe0)]=0x5]=_0x5502ef(0xe0),_0x18381d[_0x18381d[_0x5502ef(0x126)]=-0x1]=_0x5502ef(0x126),_0x18381d))(v||{});const y=_0x2c1584=>_0x46326d(new Date(+_0x2c1584))[_0x5502ef(0x11d)](_0x5502ef(0x115)),B=async(_0x657c59,_0x1db819)=>{const _0x4cfbaa=_0x5502ef,_0x27bcdb=_0x657c59[_0x4cfbaa(0x12d)](_0x27db51),_0x1680cc=_0x657c59[_0x4cfbaa(0x12d)](_0x4487a0);_0x1db819[_0x4cfbaa(0x100)](_0x156408=>{_0x27bcdb['getUser'](_0x156408)&&_0x1db819['delete'](_0x156408);}),_0x1db819[_0x4cfbaa(0x10f)]&&(await _0x1680cc[_0x4cfbaa(0x12d)](_0x4cfbaa(0x131),{'params':{'userIDs':[..._0x1db819]}}))[_0x4cfbaa(0x103)][_0x4cfbaa(0xea)][_0x4cfbaa(0x100)](_0x1edb5f=>{const _0x2b0e2e=_0x4cfbaa;_0x1edb5f&&_0x27bcdb[_0x2b0e2e(0xfe)](_0x1edb5f);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3d0357,_0x1f97d5,_0x38f3c8,_0xcd4924)=>{const _0x9ede38=_0x5502ef;for(var _0x580322=_0xcd4924>0x1?void 0x0:_0xcd4924?K(_0x1f97d5,_0x38f3c8):_0x1f97d5,_0x5ce02e=_0x3d0357[_0x9ede38(0xdb)]-0x1,_0x20cd4b;_0x5ce02e>=0x0;_0x5ce02e--)(_0x20cd4b=_0x3d0357[_0x5ce02e])&&(_0x580322=_0x20cd4b(_0x580322)||_0x580322);return _0x580322;},p=(_0x3be05e,_0x1c1942)=>(_0x55356e,_0x3166af)=>_0x1c1942(_0x55356e,_0x3166af,_0x3be05e);let _=class extends _0x57944e{constructor(_0x26567a,_0x253629,_0x1923ca,_0x347c33){const _0x2d40d5=_0x5502ef;super(),this['_commentService']=_0x26567a,this[_0x2d40d5(0x10c)]=_0x253629,this['_userService']=_0x1923ca,this[_0x2d40d5(0x119)]=_0x347c33,this[_0x2d40d5(0x12e)](),this[_0x2d40d5(0xee)]();}[_0x5502ef(0xee)](){const _0x4c71d0=_0x5502ef;this[_0x4c71d0(0x10a)](this[_0x4c71d0(0x10c)][_0x4c71d0(0xec)][_0x4c71d0(0xf8)](_0x30b318(0x10))[_0x4c71d0(0x133)](_0x1ba8b2=>{const _0x533292=new Set();_0x1ba8b2['forEach'](_0xf9b475=>{const _0xb3b3cf=_0x6c3d;if(_0xf9b475[_0xb3b3cf(0xda)]===_0xb3b3cf(0x12c)){const _0x5ac8dd=_0xf9b475['payload'][_0xb3b3cf(0xe8)];_0x533292[_0xb3b3cf(0x12c)](_0x5ac8dd);}}),B(this['_injector'],_0x533292);}));}[_0x5502ef(0x12e)](){const _0x113680=_0x5502ef;this[_0x113680(0x10a)](this['_commentService'][_0x113680(0xec)][_0x113680(0x133)](async _0x54feed=>{const _0x15d514=_0x113680;var _0x501ab7,_0x3af9f0,_0xac0b7b,_0x43d864;const _0x1cc4a0=(_0x501ab7=this[_0x15d514(0x10c)]['getUnit'](_0x54feed['unitId'])[_0x15d514(0x106)](_0xc4bc9e=>_0xc4bc9e[_0x15d514(0xe3)]===_0x54feed[_0x15d514(0xe3)]))==null?void 0x0:_0x501ab7[_0x15d514(0x101)];if(!_0x1cc4a0)return;const {unitId:_0x296b6e,subUnitId:_0x4879cf}=_0x1cc4a0;switch(_0x54feed[_0x15d514(0x127)]&&this['_userService'][_0x15d514(0xfe)](_0x54feed[_0x15d514(0x127)]),_0x54feed['type']){case v[_0x15d514(0x105)]:break;case v[_0x15d514(0x116)]:{this[_0x15d514(0x10c)][_0x15d514(0x11f)](_0x296b6e,_0x4879cf,{'unitId':_0x296b6e,'subUnitId':_0x4879cf,'ref':'','id':_0x54feed[_0x15d514(0x110)],'dT':y(+_0x54feed[_0x15d514(0xf1)]),'threadId':_0x54feed[_0x15d514(0xe3)],'personId':(_0xac0b7b=(_0x3af9f0=_0x54feed[_0x15d514(0x127)])==null?void 0x0:_0x3af9f0[_0x15d514(0xf0)])!=null?_0xac0b7b:_0x54feed[_0x15d514(0x124)],'text':JSON[_0x15d514(0xd9)](_0x54feed['content']),'parentId':_0x1cc4a0['id']});break;}case v[_0x15d514(0xfb)]:{const _0x5c5bff=this[_0x15d514(0x10c)][_0x15d514(0x121)](_0x296b6e,_0x4879cf,_0x54feed['replyId']);_0x5c5bff&&_0x5c5bff[_0x15d514(0x112)]&&this[_0x15d514(0x10c)][_0x15d514(0x122)](_0x296b6e,_0x4879cf,_0x54feed[_0x15d514(0x110)]);break;}case v[_0x15d514(0xfd)]:{this['_threadCommentModel'][_0x15d514(0x104)](_0x296b6e,_0x4879cf,{'commentId':_0x54feed['replyId'],'text':JSON[_0x15d514(0xd9)](_0x54feed['content'])});break;}case v[_0x15d514(0xe0)]:{const _0x417757=(_0x43d864=this['_threadCommentModel']['getUnit'](_0x54feed[_0x15d514(0x10e)])[_0x15d514(0x106)](_0x45d009=>_0x45d009[_0x15d514(0xe3)]===_0x54feed[_0x15d514(0xe3)]))==null?void 0x0:_0x43d864[_0x15d514(0x101)];_0x417757&&this[_0x15d514(0x10c)][_0x15d514(0x129)](_0x296b6e,_0x4879cf,_0x417757['id'],_0x54feed[_0x15d514(0xf3)]===I[_0x15d514(0x11c)]);break;}}}));}};_=V([p(0x0,_0x4bcd01(_0x384589)),p(0x1,_0x4bcd01(_0x82c273)),p(0x2,_0x4bcd01(_0x27db51)),p(0x3,_0x4bcd01(_0x3fde1a))],_);const z=_0x5502ef(0xdf),O={};var k=Object[_0x5502ef(0x12f)],Q=(_0x1115d8,_0x2b2626,_0x81fe15,_0x21201c)=>{const _0x5c29ad=_0x5502ef;for(var _0x43afe1=_0x21201c>0x1?void 0x0:_0x21201c?k(_0x2b2626,_0x81fe15):_0x2b2626,_0x396ed7=_0x1115d8[_0x5c29ad(0xdb)]-0x1,_0x2d5ddb;_0x396ed7>=0x0;_0x396ed7--)(_0x2d5ddb=_0x1115d8[_0x396ed7])&&(_0x43afe1=_0x2d5ddb(_0x43afe1)||_0x43afe1);return _0x43afe1;},b=(_0x53fa4b,_0xd2d989)=>(_0x1948ef,_0x1ab021)=>_0xd2d989(_0x1948ef,_0x1ab021,_0x53fa4b);function X(_0x27783f,_0x55f584){const _0x5d6b52=_0x5502ef,_0x126ec8=_0x27783f[_0x5d6b52(0xe9)][0x0];return{..._0x55f584,'id':_0x126ec8[_0x5d6b52(0x110)],'resolved':_0x27783f['solved']===0x1,'dT':y(_0x126ec8[_0x5d6b52(0xf1)]),'personId':_0x126ec8[_0x5d6b52(0x124)],'threadId':_0x126ec8[_0x5d6b52(0xe3)]};}function ee(_0x3cd999,_0x416f6d,_0x143aba){const _0x9db4b=_0x5502ef;var _0x31695b,_0x219fa7;if(((_0x219fa7=(_0x31695b=_0x3cd999==null?void 0x0:_0x3cd999[_0x9db4b(0xe9)])==null?void 0x0:_0x31695b[_0x9db4b(0xdb)])!=null?_0x219fa7:0x0)>0x0){const _0x40d3b5=(_0x34abc9,_0x4b6350)=>({'id':_0x34abc9[_0x9db4b(0x110)],'threadId':_0x34abc9['threadId'],'dT':y(_0x34abc9[_0x9db4b(0xf1)]),'personId':_0x34abc9['userId'],'resolved':_0x3cd999[_0x9db4b(0xf3)]===I[_0x9db4b(0x11c)],'unitId':_0x416f6d,'subUnitId':_0x143aba,'text':JSON['parse'](_0x34abc9[_0x9db4b(0xf9)]),'parentId':_0x4b6350}),_0x314cc4=_0x40d3b5(_0x3cd999[_0x9db4b(0xe9)][0x0]);return{..._0x314cc4,'children':_0x3cd999['replies'][_0x9db4b(0x114)](0x1)[_0x9db4b(0xf2)](_0xd26377=>_0x40d3b5(_0xd26377,_0x314cc4['id']))};}return null;}let S=class{constructor(_0x25b219,_0x279756,_0x4a54b6){const _0x4e93a9=_0x5502ef;this[_0x4e93a9(0xde)]=_0x25b219,this[_0x4e93a9(0xd3)]=_0x279756,this[_0x4e93a9(0xe5)]=_0x4a54b6;}async[_0x5502ef(0x11f)](_0x2198b3){const _0x2d5ec8=_0x5502ef;var _0xd23009,_0x15427d;const {parentId:_0x25a4e2,unitId:_0x3acb94,text:_0x41ec0b,threadId:_0x276f2a}=_0x2198b3,_0x596727=(_0x15427d=(_0xd23009=_0x41ec0b[_0x2d5ec8(0xf6)])==null?void 0x0:_0xd23009[_0x2d5ec8(0xfa)](_0x4148b3=>_0x4148b3[_0x2d5ec8(0x10d)]===_0x486a80[_0x2d5ec8(0x12a)])[_0x2d5ec8(0xf2)](_0x496d93=>_0x496d93['rangeId']))!=null?_0x15427d:[],_0x667b60=JSON['stringify'](_0x41ec0b),_0x4d26d3=(await this[_0x2d5ec8(0xe5)]['requireSession'](_0x3acb94))['getMemberID']();if(_0x25a4e2){const _0x25f7e4={'memberId':_0x4d26d3,'unitId':_0x3acb94,'content':_0x667b60,'mention':_0x596727,'threadId':_0x276f2a},_0x41eeac=(await this[_0x2d5ec8(0xde)][_0x2d5ec8(0x12b)](_0x2d5ec8(0x118)+_0x3acb94+'/reply',{'body':_0x25f7e4}))[_0x2d5ec8(0x103)][_0x2d5ec8(0x111)];return{..._0x2198b3,'id':_0x41eeac[_0x2d5ec8(0x110)],'dT':_0x46326d(+_0x41eeac[_0x2d5ec8(0xf1)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x41eeac[_0x2d5ec8(0x124)]};}else{const _0x5a2af4={'memberId':_0x4d26d3,'unitId':_0x3acb94,'content':_0x667b60,'mention':_0x596727},_0x46c442=await this[_0x2d5ec8(0xde)][_0x2d5ec8(0x12b)](_0x2d5ec8(0x118)+_0x3acb94+_0x2d5ec8(0x107),{'body':_0x5a2af4});return X(_0x46c442[_0x2d5ec8(0x103)][_0x2d5ec8(0xe4)],_0x2198b3);}}async['updateComment'](_0x2d15d4){const _0x1cb45b=_0x5502ef;var _0x21da22,_0x38e3a1;const {text:_0x18b35a,unitId:_0x3a3216}=_0x2d15d4,_0x2dd3d7=(_0x38e3a1=(_0x21da22=_0x18b35a['customRanges'])==null?void 0x0:_0x21da22[_0x1cb45b(0xfa)](_0x49c750=>_0x49c750[_0x1cb45b(0x10d)]===_0x486a80[_0x1cb45b(0x12a)])[_0x1cb45b(0xf2)](_0x5a9771=>_0x5a9771[_0x1cb45b(0xe2)]))!=null?_0x38e3a1:[],_0x77ccb4=JSON['stringify'](_0x18b35a),_0x1e8672=_0x2d15d4[_0x1cb45b(0xe3)],_0x43e31c=_0x2d15d4['id'],_0x33c30d={'memberId':(await this[_0x1cb45b(0xe5)][_0x1cb45b(0x128)](_0x3a3216))['getMemberID'](),'unitId':_0x3a3216,'threadId':_0x1e8672,'mention':_0x2dd3d7,'content':_0x77ccb4,'replyId':_0x43e31c},_0x3954f5=await this[_0x1cb45b(0xde)][_0x1cb45b(0x12b)](_0x1cb45b(0x118)+_0x3a3216+_0x1cb45b(0xd4),{'body':_0x33c30d});return!_0x3954f5[_0x1cb45b(0x103)][_0x1cb45b(0xd5)]||_0x3954f5[_0x1cb45b(0x103)][_0x1cb45b(0xd5)][_0x1cb45b(0xed)]===0x1;}async[_0x5502ef(0x129)](_0x42cf16){const _0x134633=_0x5502ef,{unitId:_0x1011b6}=_0x42cf16,_0x741f78=_0x42cf16['threadId'],_0xf28209={'memberId':this[_0x134633(0xd3)][_0x134633(0x117)]()[_0x134633(0xf0)],'unitId':_0x1011b6,'threadId':_0x741f78,'solved':_0x42cf16[_0x134633(0xdd)]?I[_0x134633(0x11c)]:I['OpenOrReOpen']},_0x2cb7f5=await this[_0x134633(0xde)][_0x134633(0x12b)]('/universer-api/comment/unit/'+_0x1011b6+_0x134633(0x11a),{'body':_0xf28209});return!_0x2cb7f5['body'][_0x134633(0xd5)]||_0x2cb7f5[_0x134633(0x103)][_0x134633(0xd5)][_0x134633(0xed)]===0x1;}async[_0x5502ef(0x122)](_0x199ca0,_0x3ffdfe,_0x4a3a36,_0x77629f){const _0x392413=_0x5502ef,_0x4f2ac3={'memberId':(await this[_0x392413(0xe5)][_0x392413(0x128)](_0x199ca0))[_0x392413(0x125)](),'threadId':_0x4a3a36,'replyId':_0x77629f,'unitId':_0x199ca0},_0x57f60f=await this['_httpService'][_0x392413(0x12b)](_0x392413(0x118)+_0x199ca0+'/delete',{'body':_0x4f2ac3});return!_0x57f60f['body'][_0x392413(0xd5)]||_0x57f60f[_0x392413(0x103)]['error'][_0x392413(0xed)]===0x1;}async['listComments'](_0x1cf0e6,_0x549585,_0x5e5a69){const _0x2f1732=_0x5502ef,_0x4d5a9a={'unitId':_0x1cf0e6,'threadId':_0x5e5a69},_0x416232=await this[_0x2f1732(0xde)][_0x2f1732(0x12b)](_0x2f1732(0x118)+_0x1cf0e6+_0x2f1732(0x113),{'body':_0x4d5a9a}),_0x412e8=_0x5e5a69[_0x2f1732(0xf2)](_0x3095d7=>ee(_0x416232[_0x2f1732(0x103)]['comments'][_0x3095d7],_0x1cf0e6,_0x549585))[_0x2f1732(0xfa)](Boolean);return Object[_0x2f1732(0x102)](_0x416232[_0x2f1732(0x103)][_0x2f1732(0xea)])[_0x2f1732(0x100)](_0x507473=>{const _0x4dd1fa=_0x2f1732;this['_userService'][_0x4dd1fa(0xfe)](_0x507473);}),_0x412e8;}[_0x5502ef(0xd6)](_0xd406e){const _0x1a094f=_0x5502ef;return{'id':_0xd406e['id'],'threadId':_0xd406e[_0x1a094f(0xe3)],'ref':_0xd406e['ref']};}};S=Q([b(0x0,_0x4bcd01(_0x4487a0)),b(0x1,_0x4bcd01(_0x27db51)),b(0x2,_0x4bcd01(_0x4648a7))],S);var re=Object[_0x5502ef(0x12f)],te=(_0x4fe564,_0x305496,_0x494da1,_0x523969)=>{const _0x5da8ff=_0x5502ef;for(var _0x5b9584=_0x523969>0x1?void 0x0:_0x523969?re(_0x305496,_0x494da1):_0x305496,_0x1a059a=_0x4fe564[_0x5da8ff(0xdb)]-0x1,_0x2fc531;_0x1a059a>=0x0;_0x1a059a--)(_0x2fc531=_0x4fe564[_0x1a059a])&&(_0x5b9584=_0x2fc531(_0x5b9584)||_0x5b9584);return _0x5b9584;},M=(_0x438c9b,_0xa6f0f6)=>(_0x41f0ff,_0x27bac4)=>_0xa6f0f6(_0x41f0ff,_0x27bac4,_0x438c9b);let f=class extends _0x57944e{constructor(_0x1c140a,_0x2a37df){const _0x400922=_0x5502ef;super(),this[_0x400922(0xe6)]=_0x1c140a,this[_0x400922(0x10b)]=_0x2a37df,this['_initDataSource']();}[_0x5502ef(0x123)](){const _0x295691=_0x5502ef;this[_0x295691(0xe6)][_0x295691(0xdc)]=this['_threadCommentDataSource'],this[_0x295691(0xe6)][_0x295691(0xd8)]=!0x1;}};f=te([M(0x0,_0x49bb57),M(0x1,_0x4bcd01(S))],f);var se=Object[_0x5502ef(0x120)],oe=Object[_0x5502ef(0x12f)],ne=(_0x2b2d8a,_0x490009,_0x446ff8)=>_0x490009 in _0x2b2d8a?se(_0x2b2d8a,_0x490009,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x446ff8}):_0x2b2d8a[_0x490009]=_0x446ff8,ie=(_0x2cfb48,_0x4d72e5,_0x2ca01f,_0x1df935)=>{for(var _0x5c1628=_0x1df935>0x1?void 0x0:_0x1df935?oe(_0x4d72e5,_0x2ca01f):_0x4d72e5,_0x4765db=_0x2cfb48['length']-0x1,_0x28be5e;_0x4765db>=0x0;_0x4765db--)(_0x28be5e=_0x2cfb48[_0x4765db])&&(_0x5c1628=_0x28be5e(_0x5c1628)||_0x5c1628);return _0x5c1628;},N=(_0xa8815c,_0x157fe2)=>(_0x4400e0,_0x59cee3)=>_0x157fe2(_0x4400e0,_0x59cee3,_0xa8815c),$=(_0x30c66c,_0x30f413,_0x1ea869)=>ne(_0x30c66c,typeof _0x30f413!='symbol'?_0x30f413+'':_0x30f413,_0x1ea869);let g=class extends _0x2cdc95{constructor(_0x1df3a3=O,_0x77e181,_0x2fd41e){const _0x6b2442=_0x5502ef;super(),this[_0x6b2442(0xe1)]=_0x1df3a3,this[_0x6b2442(0x119)]=_0x77e181,this[_0x6b2442(0x134)]=_0x2fd41e;const {..._0x50a352}=_0x1425e8({},O,this[_0x6b2442(0xe1)]);this[_0x6b2442(0x134)]['setConfig'](z,_0x50a352);}['onStarting'](){const _0x11dcc8=_0x5502ef;[[S],[f],[_]][_0x11dcc8(0x100)](_0x461bc1=>{const _0xdd882d=_0x11dcc8;this[_0xdd882d(0x119)]['add'](_0x461bc1);});}[_0x5502ef(0x132)](){const _0xe778b5=_0x5502ef;this[_0xe778b5(0x119)]['get'](f),this[_0xe778b5(0x119)][_0xe778b5(0x12d)](_);}};$(g,_0x5502ef(0xfc),W),$(g,_0x5502ef(0xda),_0x486682['UNIVER_UNKNOWN']),g=ie([_0x56a696(_0x11d26e,_0xbacb1d,_0x4273b7),N(0x1,_0x4bcd01(_0x3fde1a)),N(0x2,_0x2e8d6c)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x30f0a8=_0x4237;(function(_0x22d320,_0x2f0368){const _0x52bd35=_0x4237,_0x3af3d5=_0x22d320();while(!![]){try{const _0x5b3c62=parseInt(_0x52bd35(0x1ab))/0x1*(parseInt(_0x52bd35(0x1c2))/0x2)+parseInt(_0x52bd35(0x1ce))/0x3*(-parseInt(_0x52bd35(0x1f1))/0x4)+parseInt(_0x52bd35(0x1e0))/0x5*(-parseInt(_0x52bd35(0x1fe))/0x6)+parseInt(_0x52bd35(0x1ad))/0x7+-parseInt(_0x52bd35(0x1ac))/0x8+parseInt(_0x52bd35(0x1ca))/0x9*(-parseInt(_0x52bd35(0x1cf))/0xa)+parseInt(_0x52bd35(0x1be))/0xb;if(_0x5b3c62===_0x2f0368)break;else _0x3af3d5['push'](_0x3af3d5['shift']());}catch(_0x240cba){_0x3af3d5['push'](_0x3af3d5['shift']());}}}(_0x32be,0x8c230));import{CommentService as _0x46763f,CollaborationSessionService as _0x1c6583,UniverCollaborationClientPlugin as _0x1bac31}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x11e776}from'@univerjs-pro/license';import{dayjs as _0x195604,UserManagerService as _0x1b8ddd,Inject as _0x55050b,Injector as _0x32158c,Disposable as _0x214298,CustomRangeType as _0x30c81c,UniverInstanceType as _0x57d252,DependentOn as _0x2f745a,IConfigService as _0x3d811e,Plugin as _0x37af55,merge as _0x522ad0}from'@univerjs/core';function _0x32be(){const _0x43294f=['_injector','UNRECOGNIZED','commentUpdate$','updateComment','getOwnPropertyDescriptor','dataSource','Unknown','replyId','solved','personId','root','getUnit','Reply','length','getMemberID','reply','userId','2ypqZGJ','4764032isNECI','679224UpiuhV','replies','delete','_config','user','userID','_threadCommentDataSourceService','OpenOrReOpen','threadId','Edit','rangeType','createTimestamp','Delete','pluginName','_sessionService','_httpService','users','10097934VudKrl','/list','add','_init','808664OfudHA','_userService','_threadCommentModel','parse','symbol','slice','map','/delete','738TaymGO','setConfig','type','onReady','3iVFCXW','72880ZuCOqt','getComment','post','payload','forEach','Solved','disposeWithMe','body','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','rangeId','/reply','YYYY/MM/DD\x20HH:mm','get','stringify','format','deleteComment','555loLODe','subscribe','saveCommentToSnapshot','Add','size','comment','comments','thread-comment-data-source.config','/universer-api/comment/unit/','content','values','listComments','_initDataSource','find','addComment','customRanges','parentId','58892zFHRUb','_commentService','/add','filter','_threadCommentDataSource','UNIVER_UNKNOWN','addUser','COMMENT','resolved','Solve','_initUserSync','requireSession','resolveComment','2262lVvdab','_configService','unitId'];_0x32be=function(){return _0x43294f;};return _0x32be();}import{UniverThreadCommentUIPlugin as _0x1c5da8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x10a242,IThreadCommentDataSourceService as _0x2dfa35}from'@univerjs/thread-comment';import{bufferTime as _0x40b52a}from'rxjs';import{HTTPService as _0x3f867}from'@univerjs/network';const W=_0x30f0a8(0x1d8);var I=(_0x168d6b=>(_0x168d6b[_0x168d6b[_0x30f0a8(0x1b4)]=0x0]=_0x30f0a8(0x1b4),_0x168d6b[_0x168d6b[_0x30f0a8(0x1d4)]=0x1]='Solved',_0x168d6b[_0x168d6b[_0x30f0a8(0x202)]=-0x1]=_0x30f0a8(0x202),_0x168d6b))(I||{}),v=(_0x2bbf6f=>(_0x2bbf6f[_0x2bbf6f['Unknown']=0x0]=_0x30f0a8(0x207),_0x2bbf6f[_0x2bbf6f[_0x30f0a8(0x1e3)]=0x1]=_0x30f0a8(0x1e3),_0x2bbf6f[_0x2bbf6f['Reply']=0x2]=_0x30f0a8(0x1a6),_0x2bbf6f[_0x2bbf6f[_0x30f0a8(0x1b6)]=0x3]='Edit',_0x2bbf6f[_0x2bbf6f['Delete']=0x4]=_0x30f0a8(0x1b9),_0x2bbf6f[_0x2bbf6f[_0x30f0a8(0x1fa)]=0x5]='Solve',_0x2bbf6f[_0x2bbf6f[_0x30f0a8(0x202)]=-0x1]=_0x30f0a8(0x202),_0x2bbf6f))(v||{});const y=_0x370e07=>_0x195604(new Date(+_0x370e07))[_0x30f0a8(0x1de)](_0x30f0a8(0x1db)),B=async(_0x27c79a,_0xe1d543)=>{const _0x368757=_0x30f0a8,_0x3545e0=_0x27c79a[_0x368757(0x1dc)](_0x1b8ddd),_0x124dd0=_0x27c79a[_0x368757(0x1dc)](_0x3f867);_0xe1d543[_0x368757(0x1d3)](_0x24eaf5=>{const _0x40c848=_0x368757;_0x3545e0['getUser'](_0x24eaf5)&&_0xe1d543[_0x40c848(0x1af)](_0x24eaf5);}),_0xe1d543[_0x368757(0x1e4)]&&(await _0x124dd0[_0x368757(0x1dc)]('/universer-api/user/list',{'params':{'userIDs':[..._0xe1d543]}}))[_0x368757(0x1d6)]['users'][_0x368757(0x1d3)](_0x14a845=>{_0x14a845&&_0x3545e0['addUser'](_0x14a845);});};var K=Object[_0x30f0a8(0x205)],V=(_0x27df89,_0xf619d1,_0x12cb55,_0x3d084c)=>{const _0x2cae8b=_0x30f0a8;for(var _0xf36819=_0x3d084c>0x1?void 0x0:_0x3d084c?K(_0xf619d1,_0x12cb55):_0xf619d1,_0xa48798=_0x27df89[_0x2cae8b(0x1a7)]-0x1,_0x19c99b;_0xa48798>=0x0;_0xa48798--)(_0x19c99b=_0x27df89[_0xa48798])&&(_0xf36819=_0x19c99b(_0xf36819)||_0xf36819);return _0xf36819;},p=(_0x169112,_0x4eabc1)=>(_0x297079,_0x209377)=>_0x4eabc1(_0x297079,_0x209377,_0x169112);let _=class extends _0x214298{constructor(_0x5074cb,_0x5f06bc,_0x49ad29,_0x56cc92){const _0x8e99f1=_0x30f0a8;super(),this[_0x8e99f1(0x1f2)]=_0x5074cb,this['_threadCommentModel']=_0x5f06bc,this[_0x8e99f1(0x1c3)]=_0x49ad29,this[_0x8e99f1(0x201)]=_0x56cc92,this['_init'](),this[_0x8e99f1(0x1fb)]();}[_0x30f0a8(0x1fb)](){const _0x3ab467=_0x30f0a8;this[_0x3ab467(0x1d5)](this['_threadCommentModel'][_0x3ab467(0x203)]['pipe'](_0x40b52a(0x10))[_0x3ab467(0x1e1)](_0x1abcbf=>{const _0xf26588=_0x3ab467,_0x1f2749=new Set();_0x1abcbf[_0xf26588(0x1d3)](_0x4053c0=>{const _0x4e7053=_0xf26588;if(_0x4053c0[_0x4e7053(0x1cc)]===_0x4e7053(0x1c0)){const _0x2d9b48=_0x4053c0[_0x4e7053(0x1d2)][_0x4e7053(0x20a)];_0x1f2749['add'](_0x2d9b48);}}),B(this[_0xf26588(0x201)],_0x1f2749);}));}[_0x30f0a8(0x1c1)](){const _0x10fa06=_0x30f0a8;this[_0x10fa06(0x1d5)](this['_commentService'][_0x10fa06(0x203)][_0x10fa06(0x1e1)](async _0x174376=>{const _0x53c931=_0x10fa06;var _0xbeed10,_0x3429ad,_0x273d57,_0x168091;const _0x481f1c=(_0xbeed10=this[_0x53c931(0x1c4)]['getUnit'](_0x174376[_0x53c931(0x200)])[_0x53c931(0x1ed)](_0x593308=>_0x593308[_0x53c931(0x1b5)]===_0x174376[_0x53c931(0x1b5)]))==null?void 0x0:_0xbeed10[_0x53c931(0x1a4)];if(!_0x481f1c)return;const {unitId:_0x1d6718,subUnitId:_0x301dc2}=_0x481f1c;switch(_0x174376[_0x53c931(0x1b1)]&&this['_userService'][_0x53c931(0x1f7)](_0x174376[_0x53c931(0x1b1)]),_0x174376['type']){case v[_0x53c931(0x1e3)]:break;case v[_0x53c931(0x1a6)]:{this[_0x53c931(0x1c4)][_0x53c931(0x1ee)](_0x1d6718,_0x301dc2,{'unitId':_0x1d6718,'subUnitId':_0x301dc2,'ref':'','id':_0x174376[_0x53c931(0x208)],'dT':y(+_0x174376['createTimestamp']),'threadId':_0x174376[_0x53c931(0x1b5)],'personId':(_0x273d57=(_0x3429ad=_0x174376['user'])==null?void 0x0:_0x3429ad[_0x53c931(0x1b2)])!=null?_0x273d57:_0x174376[_0x53c931(0x1aa)],'text':JSON[_0x53c931(0x1c5)](_0x174376[_0x53c931(0x1e9)]),'parentId':_0x481f1c['id']});break;}case v[_0x53c931(0x1b9)]:{const _0x375f7c=this[_0x53c931(0x1c4)][_0x53c931(0x1d0)](_0x1d6718,_0x301dc2,_0x174376[_0x53c931(0x208)]);_0x375f7c&&_0x375f7c[_0x53c931(0x1f0)]&&this[_0x53c931(0x1c4)][_0x53c931(0x1df)](_0x1d6718,_0x301dc2,_0x174376[_0x53c931(0x208)]);break;}case v[_0x53c931(0x1b6)]:{this[_0x53c931(0x1c4)][_0x53c931(0x204)](_0x1d6718,_0x301dc2,{'commentId':_0x174376[_0x53c931(0x208)],'text':JSON[_0x53c931(0x1c5)](_0x174376[_0x53c931(0x1e9)])});break;}case v[_0x53c931(0x1fa)]:{const _0x233ccf=(_0x168091=this[_0x53c931(0x1c4)][_0x53c931(0x1a5)](_0x174376[_0x53c931(0x200)])[_0x53c931(0x1ed)](_0x115029=>_0x115029[_0x53c931(0x1b5)]===_0x174376[_0x53c931(0x1b5)]))==null?void 0x0:_0x168091[_0x53c931(0x1a4)];_0x233ccf&&this[_0x53c931(0x1c4)][_0x53c931(0x1fd)](_0x1d6718,_0x301dc2,_0x233ccf['id'],_0x174376[_0x53c931(0x209)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x55050b(_0x46763f)),p(0x1,_0x55050b(_0x10a242)),p(0x2,_0x55050b(_0x1b8ddd)),p(0x3,_0x55050b(_0x32158c))],_);const z=_0x30f0a8(0x1e7),O={};var k=Object[_0x30f0a8(0x205)],Q=(_0x4e0f6f,_0x2bfe01,_0x3f35e9,_0xb2e3c3)=>{const _0x518af0=_0x30f0a8;for(var _0x4dd363=_0xb2e3c3>0x1?void 0x0:_0xb2e3c3?k(_0x2bfe01,_0x3f35e9):_0x2bfe01,_0x5366de=_0x4e0f6f[_0x518af0(0x1a7)]-0x1,_0x1849a3;_0x5366de>=0x0;_0x5366de--)(_0x1849a3=_0x4e0f6f[_0x5366de])&&(_0x4dd363=_0x1849a3(_0x4dd363)||_0x4dd363);return _0x4dd363;},b=(_0x3b12a6,_0x3b9f69)=>(_0x26f417,_0x672114)=>_0x3b9f69(_0x26f417,_0x672114,_0x3b12a6);function X(_0xc109ff,_0xd8cd3b){const _0x34f004=_0x30f0a8,_0x22b966=_0xc109ff[_0x34f004(0x1ae)][0x0];return{..._0xd8cd3b,'id':_0x22b966[_0x34f004(0x208)],'resolved':_0xc109ff[_0x34f004(0x209)]===0x1,'dT':y(_0x22b966[_0x34f004(0x1b8)]),'personId':_0x22b966[_0x34f004(0x1aa)],'threadId':_0x22b966[_0x34f004(0x1b5)]};}function ee(_0x253eb5,_0x189b64,_0x5dfb10){const _0x5927bf=_0x30f0a8;var _0x4554bb,_0x2c22f2;if(((_0x2c22f2=(_0x4554bb=_0x253eb5==null?void 0x0:_0x253eb5[_0x5927bf(0x1ae)])==null?void 0x0:_0x4554bb[_0x5927bf(0x1a7)])!=null?_0x2c22f2:0x0)>0x0){const _0x2dfb10=(_0x33cb18,_0x544887)=>({'id':_0x33cb18[_0x5927bf(0x208)],'threadId':_0x33cb18['threadId'],'dT':y(_0x33cb18[_0x5927bf(0x1b8)]),'personId':_0x33cb18[_0x5927bf(0x1aa)],'resolved':_0x253eb5[_0x5927bf(0x209)]===I[_0x5927bf(0x1d4)],'unitId':_0x189b64,'subUnitId':_0x5dfb10,'text':JSON[_0x5927bf(0x1c5)](_0x33cb18[_0x5927bf(0x1e9)]),'parentId':_0x544887}),_0x523607=_0x2dfb10(_0x253eb5[_0x5927bf(0x1ae)][0x0]);return{..._0x523607,'children':_0x253eb5[_0x5927bf(0x1ae)][_0x5927bf(0x1c7)](0x1)[_0x5927bf(0x1c8)](_0x111d23=>_0x2dfb10(_0x111d23,_0x523607['id']))};}return null;}let S=class{constructor(_0x5b456f,_0x4de251,_0x38cf95){const _0x3d19d1=_0x30f0a8;this[_0x3d19d1(0x1bc)]=_0x5b456f,this[_0x3d19d1(0x1c3)]=_0x4de251,this[_0x3d19d1(0x1bb)]=_0x38cf95;}async[_0x30f0a8(0x1ee)](_0x1973bd){const _0x4dc71b=_0x30f0a8;var _0x5c9408,_0x1d5294;const {parentId:_0x83a250,unitId:_0x4f6654,text:_0x598eef,threadId:_0x2fba83}=_0x1973bd,_0x4e43dd=(_0x1d5294=(_0x5c9408=_0x598eef[_0x4dc71b(0x1ef)])==null?void 0x0:_0x5c9408[_0x4dc71b(0x1f4)](_0x1553fd=>_0x1553fd['rangeType']===_0x30c81c['COMMENT'])['map'](_0x3d7767=>_0x3d7767[_0x4dc71b(0x1d9)]))!=null?_0x1d5294:[],_0x41afd1=JSON[_0x4dc71b(0x1dd)](_0x598eef),_0x1d0f51=(await this[_0x4dc71b(0x1bb)]['requireSession'](_0x4f6654))['getMemberID']();if(_0x83a250){const _0x4887b2={'memberId':_0x1d0f51,'unitId':_0x4f6654,'content':_0x41afd1,'mention':_0x4e43dd,'threadId':_0x2fba83},_0x5ec48a=(await this[_0x4dc71b(0x1bc)][_0x4dc71b(0x1d1)](_0x4dc71b(0x1e8)+_0x4f6654+_0x4dc71b(0x1da),{'body':_0x4887b2}))[_0x4dc71b(0x1d6)][_0x4dc71b(0x1a9)];return{..._0x1973bd,'id':_0x5ec48a['replyId'],'dT':_0x195604(+_0x5ec48a[_0x4dc71b(0x1b8)])[_0x4dc71b(0x1de)](_0x4dc71b(0x1db)),'personId':_0x5ec48a[_0x4dc71b(0x1aa)]};}else{const _0x4cb695={'memberId':_0x1d0f51,'unitId':_0x4f6654,'content':_0x41afd1,'mention':_0x4e43dd},_0x111748=await this[_0x4dc71b(0x1bc)][_0x4dc71b(0x1d1)]('/universer-api/comment/unit/'+_0x4f6654+_0x4dc71b(0x1f3),{'body':_0x4cb695});return X(_0x111748[_0x4dc71b(0x1d6)][_0x4dc71b(0x1e5)],_0x1973bd);}}async[_0x30f0a8(0x204)](_0x3fd30b){const _0x5cc2e3=_0x30f0a8;var _0x3f6615,_0x3bc192;const {text:_0x19f479,unitId:_0x2c5cc9}=_0x3fd30b,_0x221204=(_0x3bc192=(_0x3f6615=_0x19f479['customRanges'])==null?void 0x0:_0x3f6615[_0x5cc2e3(0x1f4)](_0x3c62fb=>_0x3c62fb[_0x5cc2e3(0x1b7)]===_0x30c81c[_0x5cc2e3(0x1f8)])[_0x5cc2e3(0x1c8)](_0x37cebc=>_0x37cebc['rangeId']))!=null?_0x3bc192:[],_0x3298f2=JSON['stringify'](_0x19f479),_0x255348=_0x3fd30b[_0x5cc2e3(0x1b5)],_0x49c528=_0x3fd30b['id'],_0x37121b={'memberId':(await this['_sessionService']['requireSession'](_0x2c5cc9))[_0x5cc2e3(0x1a8)](),'unitId':_0x2c5cc9,'threadId':_0x255348,'mention':_0x221204,'content':_0x3298f2,'replyId':_0x49c528},_0x2357bc=await this[_0x5cc2e3(0x1bc)][_0x5cc2e3(0x1d1)](_0x5cc2e3(0x1e8)+_0x2c5cc9+'/edit',{'body':_0x37121b});return!_0x2357bc[_0x5cc2e3(0x1d6)][_0x5cc2e3(0x1d7)]||_0x2357bc[_0x5cc2e3(0x1d6)][_0x5cc2e3(0x1d7)]['code']===0x1;}async[_0x30f0a8(0x1fd)](_0x80a3dd){const _0x54b8b9=_0x30f0a8,{unitId:_0x4bf594}=_0x80a3dd,_0x21be83=_0x80a3dd[_0x54b8b9(0x1b5)],_0x54c515={'memberId':this[_0x54b8b9(0x1c3)]['getCurrentUser']()[_0x54b8b9(0x1b2)],'unitId':_0x4bf594,'threadId':_0x21be83,'solved':_0x80a3dd[_0x54b8b9(0x1f9)]?I[_0x54b8b9(0x1d4)]:I[_0x54b8b9(0x1b4)]},_0x1a725a=await this[_0x54b8b9(0x1bc)][_0x54b8b9(0x1d1)]('/universer-api/comment/unit/'+_0x4bf594+'/solved',{'body':_0x54c515});return!_0x1a725a[_0x54b8b9(0x1d6)]['error']||_0x1a725a[_0x54b8b9(0x1d6)]['error']['code']===0x1;}async[_0x30f0a8(0x1df)](_0x4cade8,_0x345545,_0x1c3659,_0x4aa1ff){const _0x33a048=_0x30f0a8,_0x4d9db4={'memberId':(await this['_sessionService'][_0x33a048(0x1fc)](_0x4cade8))['getMemberID'](),'threadId':_0x1c3659,'replyId':_0x4aa1ff,'unitId':_0x4cade8},_0x884d6=await this['_httpService'][_0x33a048(0x1d1)]('/universer-api/comment/unit/'+_0x4cade8+_0x33a048(0x1c9),{'body':_0x4d9db4});return!_0x884d6[_0x33a048(0x1d6)][_0x33a048(0x1d7)]||_0x884d6[_0x33a048(0x1d6)][_0x33a048(0x1d7)]['code']===0x1;}async[_0x30f0a8(0x1eb)](_0x1afb36,_0x1c43f7,_0x5827d9){const _0x1541d7=_0x30f0a8,_0x281460={'unitId':_0x1afb36,'threadId':_0x5827d9},_0x2ac879=await this[_0x1541d7(0x1bc)][_0x1541d7(0x1d1)](_0x1541d7(0x1e8)+_0x1afb36+_0x1541d7(0x1bf),{'body':_0x281460}),_0x3455c7=_0x5827d9[_0x1541d7(0x1c8)](_0x2b335e=>ee(_0x2ac879[_0x1541d7(0x1d6)][_0x1541d7(0x1e6)][_0x2b335e],_0x1afb36,_0x1c43f7))[_0x1541d7(0x1f4)](Boolean);return Object[_0x1541d7(0x1ea)](_0x2ac879[_0x1541d7(0x1d6)][_0x1541d7(0x1bd)])[_0x1541d7(0x1d3)](_0x31e699=>{this['_userService']['addUser'](_0x31e699);}),_0x3455c7;}[_0x30f0a8(0x1e2)](_0x2f4e1f){return{'id':_0x2f4e1f['id'],'threadId':_0x2f4e1f['threadId'],'ref':_0x2f4e1f['ref']};}};S=Q([b(0x0,_0x55050b(_0x3f867)),b(0x1,_0x55050b(_0x1b8ddd)),b(0x2,_0x55050b(_0x1c6583))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x2bd257,_0x2f742b,_0x30713f,_0x53bb55)=>{const _0x7b0d3b=_0x30f0a8;for(var _0x2b9406=_0x53bb55>0x1?void 0x0:_0x53bb55?re(_0x2f742b,_0x30713f):_0x2f742b,_0x46b2d9=_0x2bd257[_0x7b0d3b(0x1a7)]-0x1,_0x5154f8;_0x46b2d9>=0x0;_0x46b2d9--)(_0x5154f8=_0x2bd257[_0x46b2d9])&&(_0x2b9406=_0x5154f8(_0x2b9406)||_0x2b9406);return _0x2b9406;},M=(_0x3690bc,_0x3b7ea8)=>(_0x3af179,_0x3d5751)=>_0x3b7ea8(_0x3af179,_0x3d5751,_0x3690bc);let f=class extends _0x214298{constructor(_0x2846ef,_0x5eb479){const _0x23eac0=_0x30f0a8;super(),this['_threadCommentDataSourceService']=_0x2846ef,this[_0x23eac0(0x1f5)]=_0x5eb479,this[_0x23eac0(0x1ec)]();}[_0x30f0a8(0x1ec)](){const _0x9fb0df=_0x30f0a8;this[_0x9fb0df(0x1b3)][_0x9fb0df(0x206)]=this[_0x9fb0df(0x1f5)],this[_0x9fb0df(0x1b3)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x2dfa35),M(0x1,_0x55050b(S))],f);var se=Object['defineProperty'],oe=Object[_0x30f0a8(0x205)],ne=(_0x296719,_0x2c42c7,_0x271e2a)=>_0x2c42c7 in _0x296719?se(_0x296719,_0x2c42c7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x271e2a}):_0x296719[_0x2c42c7]=_0x271e2a,ie=(_0x16b848,_0x3428f1,_0x5854e0,_0x4cf7b5)=>{const _0x42f1ed=_0x30f0a8;for(var _0x2449b5=_0x4cf7b5>0x1?void 0x0:_0x4cf7b5?oe(_0x3428f1,_0x5854e0):_0x3428f1,_0x2f4bc7=_0x16b848[_0x42f1ed(0x1a7)]-0x1,_0x41af97;_0x2f4bc7>=0x0;_0x2f4bc7--)(_0x41af97=_0x16b848[_0x2f4bc7])&&(_0x2449b5=_0x41af97(_0x2449b5)||_0x2449b5);return _0x2449b5;},N=(_0x2afab6,_0x39bec5)=>(_0x1b7e1a,_0x4851fb)=>_0x39bec5(_0x1b7e1a,_0x4851fb,_0x2afab6),$=(_0x46da9a,_0x28443f,_0x209868)=>ne(_0x46da9a,typeof _0x28443f!=_0x30f0a8(0x1c6)?_0x28443f+'':_0x28443f,_0x209868);let g=class extends _0x37af55{constructor(_0x5a3b4e=O,_0x576990,_0xb98a64){const _0x5cce40=_0x30f0a8;super(),this[_0x5cce40(0x1b0)]=_0x5a3b4e,this[_0x5cce40(0x201)]=_0x576990,this[_0x5cce40(0x1ff)]=_0xb98a64;const {..._0x581983}=_0x522ad0({},O,this['_config']);this['_configService'][_0x5cce40(0x1cb)](z,_0x581983);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x4f34cb=>{const _0x36fa89=_0x4237;this[_0x36fa89(0x201)]['add'](_0x4f34cb);});}[_0x30f0a8(0x1cd)](){const _0x512a55=_0x30f0a8;this[_0x512a55(0x201)]['get'](f),this[_0x512a55(0x201)][_0x512a55(0x1dc)](_);}};$(g,_0x30f0a8(0x1ba),W),$(g,_0x30f0a8(0x1cc),_0x57d252[_0x30f0a8(0x1f6)]),g=ie([_0x2f745a(_0x1c5da8,_0x1bac31,_0x11e776),N(0x1,_0x55050b(_0x32158c)),N(0x2,_0x3d811e)],g);function _0x4237(_0x43a8f8,_0x1fde3a){_0x43a8f8=_0x43a8f8-0x1a4;const _0x32be22=_0x32be();let _0x423759=_0x32be22[_0x43a8f8];return _0x423759;}export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x5502ef=_0x6c3d;(function(_0x19a02a,_0x3148c0){const _0x3b5673=_0x6c3d,_0x32203f=_0x19a02a();while(!![]){try{const _0xeea4f4=parseInt(_0x3b5673(0xf4))/0x1*(-parseInt(_0x3b5673(0x109))/0x2)+-parseInt(_0x3b5673(0x108))/0x3*(parseInt(_0x3b5673(0x130))/0x4)+parseInt(_0x3b5673(0xff))/0x5+parseInt(_0x3b5673(0xeb))/0x6*(-parseInt(_0x3b5673(0xf5))/0x7)+-parseInt(_0x3b5673(0x11e))/0x8+parseInt(_0x3b5673(0xd7))/0x9+parseInt(_0x3b5673(0xf7))/0xa*(parseInt(_0x3b5673(0xef))/0xb);if(_0xeea4f4===_0x3148c0)break;else _0x32203f['push'](_0x32203f['shift']());}catch(_0x3a312f){_0x32203f['push'](_0x32203f['shift']());}}}(_0x4c9d,0x1fca8));import{CommentService as _0x384589,CollaborationSessionService as _0x4648a7,UniverCollaborationClientPlugin as _0xbacb1d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4273b7}from'@univerjs-pro/license';import{dayjs as _0x46326d,UserManagerService as _0x27db51,Inject as _0x4bcd01,Injector as _0x3fde1a,Disposable as _0x57944e,CustomRangeType as _0x486a80,UniverInstanceType as _0x486682,DependentOn as _0x56a696,IConfigService as _0x2e8d6c,Plugin as _0x2cdc95,merge as _0x1425e8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x11d26e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x82c273,IThreadCommentDataSourceService as _0x49bb57}from'@univerjs/thread-comment';function _0x6c3d(_0x37e9de,_0x2cddf4){_0x37e9de=_0x37e9de-0xd3;const _0x4c9d6f=_0x4c9d();let _0x6c3d0f=_0x4c9d6f[_0x37e9de];return _0x6c3d0f;}import{bufferTime as _0x30b318}from'rxjs';function _0x4c9d(){const _0x15b6e7=['dataSource','resolved','_httpService','thread-comment-data-source.config','Solve','_config','rangeId','threadId','comment','_sessionService','_threadCommentDataSourceService','OpenOrReOpen','personId','replies','users','6vBTVin','commentUpdate$','code','_initUserSync','6798ibJrAG','userID','createTimestamp','map','solved','75930itfKTx','1306613ydaNvL','customRanges','4730VfOyJz','pipe','content','filter','Delete','pluginName','Edit','addUser','716215fHxlLQ','forEach','root','values','body','updateComment','Add','find','/add','12CGkRVB','2MKkafv','disposeWithMe','_threadCommentDataSource','_threadCommentModel','rangeType','unitId','size','replyId','reply','parentId','/list','slice','YYYY/MM/DD\x20HH:mm','Reply','getCurrentUser','/universer-api/comment/unit/','_injector','/solved','Unknown','Solved','format','1813040rVTUOU','addComment','defineProperty','getComment','deleteComment','_initDataSource','userId','getMemberID','UNRECOGNIZED','user','requireSession','resolveComment','COMMENT','post','add','get','_init','getOwnPropertyDescriptor','17552hYYdbV','/universer-api/user/list','onReady','subscribe','_configService','_userService','/edit','error','saveCommentToSnapshot','1812870MuZphA','syncUpdateMutationToColla','parse','type','length'];_0x4c9d=function(){return _0x15b6e7;};return _0x4c9d();}import{HTTPService as _0x4487a0}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5b6a11=>(_0x5b6a11[_0x5b6a11[_0x5502ef(0xe7)]=0x0]=_0x5502ef(0xe7),_0x5b6a11[_0x5b6a11[_0x5502ef(0x11c)]=0x1]=_0x5502ef(0x11c),_0x5b6a11[_0x5b6a11[_0x5502ef(0x126)]=-0x1]=_0x5502ef(0x126),_0x5b6a11))(I||{}),v=(_0x18381d=>(_0x18381d[_0x18381d['Unknown']=0x0]=_0x5502ef(0x11b),_0x18381d[_0x18381d[_0x5502ef(0x105)]=0x1]=_0x5502ef(0x105),_0x18381d[_0x18381d['Reply']=0x2]=_0x5502ef(0x116),_0x18381d[_0x18381d[_0x5502ef(0xfd)]=0x3]=_0x5502ef(0xfd),_0x18381d[_0x18381d[_0x5502ef(0xfb)]=0x4]=_0x5502ef(0xfb),_0x18381d[_0x18381d[_0x5502ef(0xe0)]=0x5]=_0x5502ef(0xe0),_0x18381d[_0x18381d[_0x5502ef(0x126)]=-0x1]=_0x5502ef(0x126),_0x18381d))(v||{});const y=_0x2c1584=>_0x46326d(new Date(+_0x2c1584))[_0x5502ef(0x11d)](_0x5502ef(0x115)),B=async(_0x657c59,_0x1db819)=>{const _0x4cfbaa=_0x5502ef,_0x27bcdb=_0x657c59[_0x4cfbaa(0x12d)](_0x27db51),_0x1680cc=_0x657c59[_0x4cfbaa(0x12d)](_0x4487a0);_0x1db819[_0x4cfbaa(0x100)](_0x156408=>{_0x27bcdb['getUser'](_0x156408)&&_0x1db819['delete'](_0x156408);}),_0x1db819[_0x4cfbaa(0x10f)]&&(await _0x1680cc[_0x4cfbaa(0x12d)](_0x4cfbaa(0x131),{'params':{'userIDs':[..._0x1db819]}}))[_0x4cfbaa(0x103)][_0x4cfbaa(0xea)][_0x4cfbaa(0x100)](_0x1edb5f=>{const _0x2b0e2e=_0x4cfbaa;_0x1edb5f&&_0x27bcdb[_0x2b0e2e(0xfe)](_0x1edb5f);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3d0357,_0x1f97d5,_0x38f3c8,_0xcd4924)=>{const _0x9ede38=_0x5502ef;for(var _0x580322=_0xcd4924>0x1?void 0x0:_0xcd4924?K(_0x1f97d5,_0x38f3c8):_0x1f97d5,_0x5ce02e=_0x3d0357[_0x9ede38(0xdb)]-0x1,_0x20cd4b;_0x5ce02e>=0x0;_0x5ce02e--)(_0x20cd4b=_0x3d0357[_0x5ce02e])&&(_0x580322=_0x20cd4b(_0x580322)||_0x580322);return _0x580322;},p=(_0x3be05e,_0x1c1942)=>(_0x55356e,_0x3166af)=>_0x1c1942(_0x55356e,_0x3166af,_0x3be05e);let _=class extends _0x57944e{constructor(_0x26567a,_0x253629,_0x1923ca,_0x347c33){const _0x2d40d5=_0x5502ef;super(),this['_commentService']=_0x26567a,this[_0x2d40d5(0x10c)]=_0x253629,this['_userService']=_0x1923ca,this[_0x2d40d5(0x119)]=_0x347c33,this[_0x2d40d5(0x12e)](),this[_0x2d40d5(0xee)]();}[_0x5502ef(0xee)](){const _0x4c71d0=_0x5502ef;this[_0x4c71d0(0x10a)](this[_0x4c71d0(0x10c)][_0x4c71d0(0xec)][_0x4c71d0(0xf8)](_0x30b318(0x10))[_0x4c71d0(0x133)](_0x1ba8b2=>{const _0x533292=new Set();_0x1ba8b2['forEach'](_0xf9b475=>{const _0xb3b3cf=_0x6c3d;if(_0xf9b475[_0xb3b3cf(0xda)]===_0xb3b3cf(0x12c)){const _0x5ac8dd=_0xf9b475['payload'][_0xb3b3cf(0xe8)];_0x533292[_0xb3b3cf(0x12c)](_0x5ac8dd);}}),B(this['_injector'],_0x533292);}));}[_0x5502ef(0x12e)](){const _0x113680=_0x5502ef;this[_0x113680(0x10a)](this['_commentService'][_0x113680(0xec)][_0x113680(0x133)](async _0x54feed=>{const _0x15d514=_0x113680;var _0x501ab7,_0x3af9f0,_0xac0b7b,_0x43d864;const _0x1cc4a0=(_0x501ab7=this[_0x15d514(0x10c)]['getUnit'](_0x54feed['unitId'])[_0x15d514(0x106)](_0xc4bc9e=>_0xc4bc9e[_0x15d514(0xe3)]===_0x54feed[_0x15d514(0xe3)]))==null?void 0x0:_0x501ab7[_0x15d514(0x101)];if(!_0x1cc4a0)return;const {unitId:_0x296b6e,subUnitId:_0x4879cf}=_0x1cc4a0;switch(_0x54feed[_0x15d514(0x127)]&&this['_userService'][_0x15d514(0xfe)](_0x54feed[_0x15d514(0x127)]),_0x54feed['type']){case v[_0x15d514(0x105)]:break;case v[_0x15d514(0x116)]:{this[_0x15d514(0x10c)][_0x15d514(0x11f)](_0x296b6e,_0x4879cf,{'unitId':_0x296b6e,'subUnitId':_0x4879cf,'ref':'','id':_0x54feed[_0x15d514(0x110)],'dT':y(+_0x54feed[_0x15d514(0xf1)]),'threadId':_0x54feed[_0x15d514(0xe3)],'personId':(_0xac0b7b=(_0x3af9f0=_0x54feed[_0x15d514(0x127)])==null?void 0x0:_0x3af9f0[_0x15d514(0xf0)])!=null?_0xac0b7b:_0x54feed[_0x15d514(0x124)],'text':JSON[_0x15d514(0xd9)](_0x54feed['content']),'parentId':_0x1cc4a0['id']});break;}case v[_0x15d514(0xfb)]:{const _0x5c5bff=this[_0x15d514(0x10c)][_0x15d514(0x121)](_0x296b6e,_0x4879cf,_0x54feed['replyId']);_0x5c5bff&&_0x5c5bff[_0x15d514(0x112)]&&this[_0x15d514(0x10c)][_0x15d514(0x122)](_0x296b6e,_0x4879cf,_0x54feed[_0x15d514(0x110)]);break;}case v[_0x15d514(0xfd)]:{this['_threadCommentModel'][_0x15d514(0x104)](_0x296b6e,_0x4879cf,{'commentId':_0x54feed['replyId'],'text':JSON[_0x15d514(0xd9)](_0x54feed['content'])});break;}case v[_0x15d514(0xe0)]:{const _0x417757=(_0x43d864=this['_threadCommentModel']['getUnit'](_0x54feed[_0x15d514(0x10e)])[_0x15d514(0x106)](_0x45d009=>_0x45d009[_0x15d514(0xe3)]===_0x54feed[_0x15d514(0xe3)]))==null?void 0x0:_0x43d864[_0x15d514(0x101)];_0x417757&&this[_0x15d514(0x10c)][_0x15d514(0x129)](_0x296b6e,_0x4879cf,_0x417757['id'],_0x54feed[_0x15d514(0xf3)]===I[_0x15d514(0x11c)]);break;}}}));}};_=V([p(0x0,_0x4bcd01(_0x384589)),p(0x1,_0x4bcd01(_0x82c273)),p(0x2,_0x4bcd01(_0x27db51)),p(0x3,_0x4bcd01(_0x3fde1a))],_);const z=_0x5502ef(0xdf),O={};var k=Object[_0x5502ef(0x12f)],Q=(_0x1115d8,_0x2b2626,_0x81fe15,_0x21201c)=>{const _0x5c29ad=_0x5502ef;for(var _0x43afe1=_0x21201c>0x1?void 0x0:_0x21201c?k(_0x2b2626,_0x81fe15):_0x2b2626,_0x396ed7=_0x1115d8[_0x5c29ad(0xdb)]-0x1,_0x2d5ddb;_0x396ed7>=0x0;_0x396ed7--)(_0x2d5ddb=_0x1115d8[_0x396ed7])&&(_0x43afe1=_0x2d5ddb(_0x43afe1)||_0x43afe1);return _0x43afe1;},b=(_0x53fa4b,_0xd2d989)=>(_0x1948ef,_0x1ab021)=>_0xd2d989(_0x1948ef,_0x1ab021,_0x53fa4b);function X(_0x27783f,_0x55f584){const _0x5d6b52=_0x5502ef,_0x126ec8=_0x27783f[_0x5d6b52(0xe9)][0x0];return{..._0x55f584,'id':_0x126ec8[_0x5d6b52(0x110)],'resolved':_0x27783f['solved']===0x1,'dT':y(_0x126ec8[_0x5d6b52(0xf1)]),'personId':_0x126ec8[_0x5d6b52(0x124)],'threadId':_0x126ec8[_0x5d6b52(0xe3)]};}function ee(_0x3cd999,_0x416f6d,_0x143aba){const _0x9db4b=_0x5502ef;var _0x31695b,_0x219fa7;if(((_0x219fa7=(_0x31695b=_0x3cd999==null?void 0x0:_0x3cd999[_0x9db4b(0xe9)])==null?void 0x0:_0x31695b[_0x9db4b(0xdb)])!=null?_0x219fa7:0x0)>0x0){const _0x40d3b5=(_0x34abc9,_0x4b6350)=>({'id':_0x34abc9[_0x9db4b(0x110)],'threadId':_0x34abc9['threadId'],'dT':y(_0x34abc9[_0x9db4b(0xf1)]),'personId':_0x34abc9['userId'],'resolved':_0x3cd999[_0x9db4b(0xf3)]===I[_0x9db4b(0x11c)],'unitId':_0x416f6d,'subUnitId':_0x143aba,'text':JSON['parse'](_0x34abc9[_0x9db4b(0xf9)]),'parentId':_0x4b6350}),_0x314cc4=_0x40d3b5(_0x3cd999[_0x9db4b(0xe9)][0x0]);return{..._0x314cc4,'children':_0x3cd999['replies'][_0x9db4b(0x114)](0x1)[_0x9db4b(0xf2)](_0xd26377=>_0x40d3b5(_0xd26377,_0x314cc4['id']))};}return null;}let S=class{constructor(_0x25b219,_0x279756,_0x4a54b6){const _0x4e93a9=_0x5502ef;this[_0x4e93a9(0xde)]=_0x25b219,this[_0x4e93a9(0xd3)]=_0x279756,this[_0x4e93a9(0xe5)]=_0x4a54b6;}async[_0x5502ef(0x11f)](_0x2198b3){const _0x2d5ec8=_0x5502ef;var _0xd23009,_0x15427d;const {parentId:_0x25a4e2,unitId:_0x3acb94,text:_0x41ec0b,threadId:_0x276f2a}=_0x2198b3,_0x596727=(_0x15427d=(_0xd23009=_0x41ec0b[_0x2d5ec8(0xf6)])==null?void 0x0:_0xd23009[_0x2d5ec8(0xfa)](_0x4148b3=>_0x4148b3[_0x2d5ec8(0x10d)]===_0x486a80[_0x2d5ec8(0x12a)])[_0x2d5ec8(0xf2)](_0x496d93=>_0x496d93['rangeId']))!=null?_0x15427d:[],_0x667b60=JSON['stringify'](_0x41ec0b),_0x4d26d3=(await this[_0x2d5ec8(0xe5)]['requireSession'](_0x3acb94))['getMemberID']();if(_0x25a4e2){const _0x25f7e4={'memberId':_0x4d26d3,'unitId':_0x3acb94,'content':_0x667b60,'mention':_0x596727,'threadId':_0x276f2a},_0x41eeac=(await this[_0x2d5ec8(0xde)][_0x2d5ec8(0x12b)](_0x2d5ec8(0x118)+_0x3acb94+'/reply',{'body':_0x25f7e4}))[_0x2d5ec8(0x103)][_0x2d5ec8(0x111)];return{..._0x2198b3,'id':_0x41eeac[_0x2d5ec8(0x110)],'dT':_0x46326d(+_0x41eeac[_0x2d5ec8(0xf1)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x41eeac[_0x2d5ec8(0x124)]};}else{const _0x5a2af4={'memberId':_0x4d26d3,'unitId':_0x3acb94,'content':_0x667b60,'mention':_0x596727},_0x46c442=await this[_0x2d5ec8(0xde)][_0x2d5ec8(0x12b)](_0x2d5ec8(0x118)+_0x3acb94+_0x2d5ec8(0x107),{'body':_0x5a2af4});return X(_0x46c442[_0x2d5ec8(0x103)][_0x2d5ec8(0xe4)],_0x2198b3);}}async['updateComment'](_0x2d15d4){const _0x1cb45b=_0x5502ef;var _0x21da22,_0x38e3a1;const {text:_0x18b35a,unitId:_0x3a3216}=_0x2d15d4,_0x2dd3d7=(_0x38e3a1=(_0x21da22=_0x18b35a['customRanges'])==null?void 0x0:_0x21da22[_0x1cb45b(0xfa)](_0x49c750=>_0x49c750[_0x1cb45b(0x10d)]===_0x486a80[_0x1cb45b(0x12a)])[_0x1cb45b(0xf2)](_0x5a9771=>_0x5a9771[_0x1cb45b(0xe2)]))!=null?_0x38e3a1:[],_0x77ccb4=JSON['stringify'](_0x18b35a),_0x1e8672=_0x2d15d4[_0x1cb45b(0xe3)],_0x43e31c=_0x2d15d4['id'],_0x33c30d={'memberId':(await this[_0x1cb45b(0xe5)][_0x1cb45b(0x128)](_0x3a3216))['getMemberID'](),'unitId':_0x3a3216,'threadId':_0x1e8672,'mention':_0x2dd3d7,'content':_0x77ccb4,'replyId':_0x43e31c},_0x3954f5=await this[_0x1cb45b(0xde)][_0x1cb45b(0x12b)](_0x1cb45b(0x118)+_0x3a3216+_0x1cb45b(0xd4),{'body':_0x33c30d});return!_0x3954f5[_0x1cb45b(0x103)][_0x1cb45b(0xd5)]||_0x3954f5[_0x1cb45b(0x103)][_0x1cb45b(0xd5)][_0x1cb45b(0xed)]===0x1;}async[_0x5502ef(0x129)](_0x42cf16){const _0x134633=_0x5502ef,{unitId:_0x1011b6}=_0x42cf16,_0x741f78=_0x42cf16['threadId'],_0xf28209={'memberId':this[_0x134633(0xd3)][_0x134633(0x117)]()[_0x134633(0xf0)],'unitId':_0x1011b6,'threadId':_0x741f78,'solved':_0x42cf16[_0x134633(0xdd)]?I[_0x134633(0x11c)]:I['OpenOrReOpen']},_0x2cb7f5=await this[_0x134633(0xde)][_0x134633(0x12b)]('/universer-api/comment/unit/'+_0x1011b6+_0x134633(0x11a),{'body':_0xf28209});return!_0x2cb7f5['body'][_0x134633(0xd5)]||_0x2cb7f5[_0x134633(0x103)][_0x134633(0xd5)][_0x134633(0xed)]===0x1;}async[_0x5502ef(0x122)](_0x199ca0,_0x3ffdfe,_0x4a3a36,_0x77629f){const _0x392413=_0x5502ef,_0x4f2ac3={'memberId':(await this[_0x392413(0xe5)][_0x392413(0x128)](_0x199ca0))[_0x392413(0x125)](),'threadId':_0x4a3a36,'replyId':_0x77629f,'unitId':_0x199ca0},_0x57f60f=await this['_httpService'][_0x392413(0x12b)](_0x392413(0x118)+_0x199ca0+'/delete',{'body':_0x4f2ac3});return!_0x57f60f['body'][_0x392413(0xd5)]||_0x57f60f[_0x392413(0x103)]['error'][_0x392413(0xed)]===0x1;}async['listComments'](_0x1cf0e6,_0x549585,_0x5e5a69){const _0x2f1732=_0x5502ef,_0x4d5a9a={'unitId':_0x1cf0e6,'threadId':_0x5e5a69},_0x416232=await this[_0x2f1732(0xde)][_0x2f1732(0x12b)](_0x2f1732(0x118)+_0x1cf0e6+_0x2f1732(0x113),{'body':_0x4d5a9a}),_0x412e8=_0x5e5a69[_0x2f1732(0xf2)](_0x3095d7=>ee(_0x416232[_0x2f1732(0x103)]['comments'][_0x3095d7],_0x1cf0e6,_0x549585))[_0x2f1732(0xfa)](Boolean);return Object[_0x2f1732(0x102)](_0x416232[_0x2f1732(0x103)][_0x2f1732(0xea)])[_0x2f1732(0x100)](_0x507473=>{const _0x4dd1fa=_0x2f1732;this['_userService'][_0x4dd1fa(0xfe)](_0x507473);}),_0x412e8;}[_0x5502ef(0xd6)](_0xd406e){const _0x1a094f=_0x5502ef;return{'id':_0xd406e['id'],'threadId':_0xd406e[_0x1a094f(0xe3)],'ref':_0xd406e['ref']};}};S=Q([b(0x0,_0x4bcd01(_0x4487a0)),b(0x1,_0x4bcd01(_0x27db51)),b(0x2,_0x4bcd01(_0x4648a7))],S);var re=Object[_0x5502ef(0x12f)],te=(_0x4fe564,_0x305496,_0x494da1,_0x523969)=>{const _0x5da8ff=_0x5502ef;for(var _0x5b9584=_0x523969>0x1?void 0x0:_0x523969?re(_0x305496,_0x494da1):_0x305496,_0x1a059a=_0x4fe564[_0x5da8ff(0xdb)]-0x1,_0x2fc531;_0x1a059a>=0x0;_0x1a059a--)(_0x2fc531=_0x4fe564[_0x1a059a])&&(_0x5b9584=_0x2fc531(_0x5b9584)||_0x5b9584);return _0x5b9584;},M=(_0x438c9b,_0xa6f0f6)=>(_0x41f0ff,_0x27bac4)=>_0xa6f0f6(_0x41f0ff,_0x27bac4,_0x438c9b);let f=class extends _0x57944e{constructor(_0x1c140a,_0x2a37df){const _0x400922=_0x5502ef;super(),this[_0x400922(0xe6)]=_0x1c140a,this[_0x400922(0x10b)]=_0x2a37df,this['_initDataSource']();}[_0x5502ef(0x123)](){const _0x295691=_0x5502ef;this[_0x295691(0xe6)][_0x295691(0xdc)]=this['_threadCommentDataSource'],this[_0x295691(0xe6)][_0x295691(0xd8)]=!0x1;}};f=te([M(0x0,_0x49bb57),M(0x1,_0x4bcd01(S))],f);var se=Object[_0x5502ef(0x120)],oe=Object[_0x5502ef(0x12f)],ne=(_0x2b2d8a,_0x490009,_0x446ff8)=>_0x490009 in _0x2b2d8a?se(_0x2b2d8a,_0x490009,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x446ff8}):_0x2b2d8a[_0x490009]=_0x446ff8,ie=(_0x2cfb48,_0x4d72e5,_0x2ca01f,_0x1df935)=>{for(var _0x5c1628=_0x1df935>0x1?void 0x0:_0x1df935?oe(_0x4d72e5,_0x2ca01f):_0x4d72e5,_0x4765db=_0x2cfb48['length']-0x1,_0x28be5e;_0x4765db>=0x0;_0x4765db--)(_0x28be5e=_0x2cfb48[_0x4765db])&&(_0x5c1628=_0x28be5e(_0x5c1628)||_0x5c1628);return _0x5c1628;},N=(_0xa8815c,_0x157fe2)=>(_0x4400e0,_0x59cee3)=>_0x157fe2(_0x4400e0,_0x59cee3,_0xa8815c),$=(_0x30c66c,_0x30f413,_0x1ea869)=>ne(_0x30c66c,typeof _0x30f413!='symbol'?_0x30f413+'':_0x30f413,_0x1ea869);let g=class extends _0x2cdc95{constructor(_0x1df3a3=O,_0x77e181,_0x2fd41e){const _0x6b2442=_0x5502ef;super(),this[_0x6b2442(0xe1)]=_0x1df3a3,this[_0x6b2442(0x119)]=_0x77e181,this[_0x6b2442(0x134)]=_0x2fd41e;const {..._0x50a352}=_0x1425e8({},O,this[_0x6b2442(0xe1)]);this[_0x6b2442(0x134)]['setConfig'](z,_0x50a352);}['onStarting'](){const _0x11dcc8=_0x5502ef;[[S],[f],[_]][_0x11dcc8(0x100)](_0x461bc1=>{const _0xdd882d=_0x11dcc8;this[_0xdd882d(0x119)]['add'](_0x461bc1);});}[_0x5502ef(0x132)](){const _0xe778b5=_0x5502ef;this[_0xe778b5(0x119)]['get'](f),this[_0xe778b5(0x119)][_0xe778b5(0x12d)](_);}};$(g,_0x5502ef(0xfc),W),$(g,_0x5502ef(0xda),_0x486682['UNIVER_UNKNOWN']),g=ie([_0x56a696(_0x11d26e,_0xbacb1d,_0x4273b7),N(0x1,_0x4bcd01(_0x3fde1a)),N(0x2,_0x2e8d6c)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x5494(_0x2da943,_0x4c4b59){_0x2da943=_0x2da943-0x178;const _0xcde168=_0xcde1();let _0x5494b9=_0xcde168[_0x2da943];return _0x5494b9;}(function(_0x8547df,_0x2ff8a2){const _0x296aff=_0x5494,_0xaab348=_0x8547df();while(!![]){try{const _0x66d31d=-parseInt(_0x296aff(0x1ba))/0x1+-parseInt(_0x296aff(0x187))/0x2+-parseInt(_0x296aff(0x17b))/0x3+parseInt(_0x296aff(0x18d))/0x4+parseInt(_0x296aff(0x1f1))/0x5*(parseInt(_0x296aff(0x191))/0x6)+parseInt(_0x296aff(0x1dd))/0x7*(parseInt(_0x296aff(0x197))/0x8)+-parseInt(_0x296aff(0x193))/0x9*(parseInt(_0x296aff(0x17c))/0xa);if(_0x66d31d===_0x2ff8a2)break;else _0xaab348['push'](_0xaab348['shift']());}catch(_0x54a8bd){_0xaab348['push'](_0xaab348['shift']());}}}(_0xcde1,0x71723),function(_0x7e153,_0x238e7a){const _0x251611=_0x5494;typeof exports==_0x251611(0x1a3)&&typeof module<'u'?_0x238e7a(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x251611(0x1c7)&&define[_0x251611(0x1d3)]?define([_0x251611(0x19e),'@univerjs-pro/collaboration-client',_0x251611(0x1ea),'@univerjs/core',_0x251611(0x1ee),'@univerjs/thread-comment',_0x251611(0x1b9),'@univerjs/network'],_0x238e7a):(_0x7e153=typeof globalThis<'u'?globalThis:_0x7e153||self,_0x238e7a(_0x7e153[_0x251611(0x1ac)]={},_0x7e153[_0x251611(0x17a)],_0x7e153[_0x251611(0x1d8)],_0x7e153[_0x251611(0x198)],_0x7e153['UniverThreadCommentUi'],_0x7e153[_0x251611(0x1e9)],_0x7e153[_0x251611(0x1b9)],_0x7e153[_0x251611(0x178)]));}(this,function(_0x2858e6,_0x5d4d54,_0x15a3a5,_0x52c03a,_0xc56e17,_0x145bf2,_0x1c3753,_0x1e3975){'use strict';const _0x2ff827=_0x5494;const _0xa588b=_0x2ff827(0x1b6);var _0x50ef57=(_0x20d56f=>(_0x20d56f[_0x20d56f['OpenOrReOpen']=0x0]=_0x2ff827(0x1d2),_0x20d56f[_0x20d56f[_0x2ff827(0x1db)]=0x1]=_0x2ff827(0x1db),_0x20d56f[_0x20d56f['UNRECOGNIZED']=-0x1]=_0x2ff827(0x1a0),_0x20d56f))(_0x50ef57||{}),_0x1f227d=(_0x4bd4ed=>(_0x4bd4ed[_0x4bd4ed['Unknown']=0x0]=_0x2ff827(0x183),_0x4bd4ed[_0x4bd4ed[_0x2ff827(0x19b)]=0x1]=_0x2ff827(0x19b),_0x4bd4ed[_0x4bd4ed[_0x2ff827(0x1bd)]=0x2]=_0x2ff827(0x1bd),_0x4bd4ed[_0x4bd4ed[_0x2ff827(0x1ad)]=0x3]=_0x2ff827(0x1ad),_0x4bd4ed[_0x4bd4ed[_0x2ff827(0x1cb)]=0x4]=_0x2ff827(0x1cb),_0x4bd4ed[_0x4bd4ed[_0x2ff827(0x1ab)]=0x5]=_0x2ff827(0x1ab),_0x4bd4ed[_0x4bd4ed['UNRECOGNIZED']=-0x1]=_0x2ff827(0x1a0),_0x4bd4ed))(_0x1f227d||{});const _0x9e6462=_0x3dfca1=>_0x52c03a[_0x2ff827(0x18e)](new Date(+_0x3dfca1))[_0x2ff827(0x1f5)](_0x2ff827(0x1b3)),_0x2d1ece=async(_0x14ccba,_0x43ab90)=>{const _0x1bc2b0=_0x2ff827,_0xeb5bba=_0x14ccba['get'](_0x52c03a['UserManagerService']),_0x56607e=_0x14ccba[_0x1bc2b0(0x1e7)](_0x1e3975[_0x1bc2b0(0x182)]);_0x43ab90[_0x1bc2b0(0x1a9)](_0x14028c=>{const _0x23a665=_0x1bc2b0;_0xeb5bba[_0x23a665(0x1b2)](_0x14028c)&&_0x43ab90[_0x23a665(0x19f)](_0x14028c);}),_0x43ab90[_0x1bc2b0(0x17f)]&&(await _0x56607e[_0x1bc2b0(0x1e7)]('/universer-api/user/list',{'params':{'userIDs':[..._0x43ab90]}}))['body'][_0x1bc2b0(0x189)][_0x1bc2b0(0x1a9)](_0x52a978=>{_0x52a978&&_0xeb5bba['addUser'](_0x52a978);});};var _0x581cfe=Object['getOwnPropertyDescriptor'],_0x37469d=(_0x327957,_0x4c86bd,_0xa4186,_0x746712)=>{for(var _0xdadb24=_0x746712>0x1?void 0x0:_0x746712?_0x581cfe(_0x4c86bd,_0xa4186):_0x4c86bd,_0x150691=_0x327957['length']-0x1,_0x82b322;_0x150691>=0x0;_0x150691--)(_0x82b322=_0x327957[_0x150691])&&(_0xdadb24=_0x82b322(_0xdadb24)||_0xdadb24);return _0xdadb24;},_0x160ad5=(_0x27242a,_0x383a29)=>(_0x533d6f,_0x579608)=>_0x383a29(_0x533d6f,_0x579608,_0x27242a);let _0x1404e9=class extends _0x52c03a['Disposable']{constructor(_0x6edd8c,_0x48b745,_0x571d8a,_0x32a05c){const _0x2078a0=_0x2ff827;super(),this['_commentService']=_0x6edd8c,this[_0x2078a0(0x1f3)]=_0x48b745,this[_0x2078a0(0x1c0)]=_0x571d8a,this[_0x2078a0(0x1d9)]=_0x32a05c,this['_init'](),this[_0x2078a0(0x1eb)]();}[_0x2ff827(0x1eb)](){const _0x2a05d5=_0x2ff827;this[_0x2a05d5(0x1a4)](this['_threadCommentModel'][_0x2a05d5(0x1fb)][_0x2a05d5(0x1e4)](_0x1c3753[_0x2a05d5(0x1b5)](0x10))['subscribe'](_0x45b059=>{const _0x7bc7d7=_0x2a05d5,_0xa2e2f4=new Set();_0x45b059[_0x7bc7d7(0x1a9)](_0xec2e34=>{const _0x287134=_0x7bc7d7;if(_0xec2e34['type']==='add'){const _0x150eee=_0xec2e34[_0x287134(0x1f0)][_0x287134(0x19d)];_0xa2e2f4[_0x287134(0x1f2)](_0x150eee);}}),_0x2d1ece(this[_0x7bc7d7(0x1d9)],_0xa2e2f4);}));}[_0x2ff827(0x1a7)](){const _0x5d17ea=_0x2ff827;this['disposeWithMe'](this['_commentService'][_0x5d17ea(0x1fb)]['subscribe'](async _0x4947e8=>{const _0x46b9c6=_0x5d17ea;var _0x537dda,_0x13d6d6,_0x111d0b,_0x40630e;const _0x2499ae=(_0x537dda=this[_0x46b9c6(0x1f3)][_0x46b9c6(0x1cc)](_0x4947e8['unitId'])['find'](_0x10324f=>_0x10324f[_0x46b9c6(0x1e2)]===_0x4947e8[_0x46b9c6(0x1e2)]))==null?void 0x0:_0x537dda[_0x46b9c6(0x1aa)];if(!_0x2499ae)return;const {unitId:_0xafa2a7,subUnitId:_0x115621}=_0x2499ae;switch(_0x4947e8[_0x46b9c6(0x1d6)]&&this[_0x46b9c6(0x1c0)][_0x46b9c6(0x1cd)](_0x4947e8['user']),_0x4947e8[_0x46b9c6(0x1bf)]){case _0x1f227d[_0x46b9c6(0x19b)]:break;case _0x1f227d[_0x46b9c6(0x1bd)]:{this[_0x46b9c6(0x1f3)][_0x46b9c6(0x1c2)](_0xafa2a7,_0x115621,{'unitId':_0xafa2a7,'subUnitId':_0x115621,'ref':'','id':_0x4947e8[_0x46b9c6(0x18b)],'dT':_0x9e6462(+_0x4947e8['createTimestamp']),'threadId':_0x4947e8['threadId'],'personId':(_0x111d0b=(_0x13d6d6=_0x4947e8[_0x46b9c6(0x1d6)])==null?void 0x0:_0x13d6d6[_0x46b9c6(0x1d4)])!=null?_0x111d0b:_0x4947e8[_0x46b9c6(0x1f7)],'text':JSON[_0x46b9c6(0x1e5)](_0x4947e8['content']),'parentId':_0x2499ae['id']});break;}case _0x1f227d[_0x46b9c6(0x1cb)]:{const _0x2b72c1=this[_0x46b9c6(0x1f3)]['getComment'](_0xafa2a7,_0x115621,_0x4947e8[_0x46b9c6(0x18b)]);_0x2b72c1&&_0x2b72c1[_0x46b9c6(0x1fd)]&&this[_0x46b9c6(0x1f3)][_0x46b9c6(0x19a)](_0xafa2a7,_0x115621,_0x4947e8[_0x46b9c6(0x18b)]);break;}case _0x1f227d[_0x46b9c6(0x1ad)]:{this[_0x46b9c6(0x1f3)][_0x46b9c6(0x1b1)](_0xafa2a7,_0x115621,{'commentId':_0x4947e8[_0x46b9c6(0x18b)],'text':JSON['parse'](_0x4947e8[_0x46b9c6(0x1e8)])});break;}case _0x1f227d['Solve']:{const _0x2f4b26=(_0x40630e=this[_0x46b9c6(0x1f3)][_0x46b9c6(0x1cc)](_0x4947e8[_0x46b9c6(0x1d5)])[_0x46b9c6(0x181)](_0x4a3979=>_0x4a3979[_0x46b9c6(0x1e2)]===_0x4947e8[_0x46b9c6(0x1e2)]))==null?void 0x0:_0x40630e[_0x46b9c6(0x1aa)];_0x2f4b26&&this[_0x46b9c6(0x1f3)][_0x46b9c6(0x1af)](_0xafa2a7,_0x115621,_0x2f4b26['id'],_0x4947e8['solved']===_0x50ef57[_0x46b9c6(0x1db)]);break;}}}));}};_0x1404e9=_0x37469d([_0x160ad5(0x0,_0x52c03a['Inject'](_0x5d4d54[_0x2ff827(0x196)])),_0x160ad5(0x1,_0x52c03a[_0x2ff827(0x17d)](_0x145bf2[_0x2ff827(0x1f9)])),_0x160ad5(0x2,_0x52c03a[_0x2ff827(0x17d)](_0x52c03a[_0x2ff827(0x1b0)])),_0x160ad5(0x3,_0x52c03a[_0x2ff827(0x17d)](_0x52c03a[_0x2ff827(0x1c4)]))],_0x1404e9);const _0x45275b=_0x2ff827(0x18f),_0x58e418={};var _0x10aa1f=Object[_0x2ff827(0x1a1)],_0xef3d6d=(_0x30f272,_0x36016f,_0x3e4c1b,_0xb970da)=>{for(var _0x1fce80=_0xb970da>0x1?void 0x0:_0xb970da?_0x10aa1f(_0x36016f,_0x3e4c1b):_0x36016f,_0x5dc51f=_0x30f272['length']-0x1,_0x429236;_0x5dc51f>=0x0;_0x5dc51f--)(_0x429236=_0x30f272[_0x5dc51f])&&(_0x1fce80=_0x429236(_0x1fce80)||_0x1fce80);return _0x1fce80;},_0x106443=(_0x3c3160,_0x702c3d)=>(_0x26519a,_0x26e1a0)=>_0x702c3d(_0x26519a,_0x26e1a0,_0x3c3160);function _0x125548(_0x4e2840,_0xa4db0b){const _0x52eb5d=_0x2ff827,_0x5f0048=_0x4e2840[_0x52eb5d(0x199)][0x0];return{..._0xa4db0b,'id':_0x5f0048[_0x52eb5d(0x18b)],'resolved':_0x4e2840[_0x52eb5d(0x188)]===0x1,'dT':_0x9e6462(_0x5f0048['createTimestamp']),'personId':_0x5f0048[_0x52eb5d(0x1f7)],'threadId':_0x5f0048[_0x52eb5d(0x1e2)]};}function _0x14b53d(_0x178b55,_0x56c5c0,_0x328928){const _0x20482a=_0x2ff827;var _0x3e7e2b,_0x416285;if(((_0x416285=(_0x3e7e2b=_0x178b55==null?void 0x0:_0x178b55['replies'])==null?void 0x0:_0x3e7e2b['length'])!=null?_0x416285:0x0)>0x0){const _0x5e88e3=(_0x13b963,_0x39fdbe)=>({'id':_0x13b963[_0x20482a(0x18b)],'threadId':_0x13b963['threadId'],'dT':_0x9e6462(_0x13b963[_0x20482a(0x1fc)]),'personId':_0x13b963[_0x20482a(0x1f7)],'resolved':_0x178b55[_0x20482a(0x188)]===_0x50ef57[_0x20482a(0x1db)],'unitId':_0x56c5c0,'subUnitId':_0x328928,'text':JSON[_0x20482a(0x1e5)](_0x13b963[_0x20482a(0x1e8)]),'parentId':_0x39fdbe}),_0x3916e0=_0x5e88e3(_0x178b55['replies'][0x0]);return{..._0x3916e0,'children':_0x178b55['replies']['slice'](0x1)[_0x20482a(0x185)](_0x5bd917=>_0x5e88e3(_0x5bd917,_0x3916e0['id']))};}return null;}let _0x324652=class{constructor(_0x42fe0c,_0x3034a8,_0x337398){const _0x229ba7=_0x2ff827;this['_httpService']=_0x42fe0c,this[_0x229ba7(0x1c0)]=_0x3034a8,this[_0x229ba7(0x1df)]=_0x337398;}async[_0x2ff827(0x1c2)](_0xafd77a){const _0x926feb=_0x2ff827;var _0x30487e,_0x8b192e;const {parentId:_0x42d32e,unitId:_0x39eedc,text:_0x415621,threadId:_0x1bf2fe}=_0xafd77a,_0x4d29a1=(_0x8b192e=(_0x30487e=_0x415621[_0x926feb(0x1f8)])==null?void 0x0:_0x30487e[_0x926feb(0x1e1)](_0x1c5972=>_0x1c5972[_0x926feb(0x1de)]===_0x52c03a[_0x926feb(0x1b8)][_0x926feb(0x195)])[_0x926feb(0x185)](_0x47d8cb=>_0x47d8cb[_0x926feb(0x1ff)]))!=null?_0x8b192e:[],_0x242546=JSON[_0x926feb(0x1a6)](_0x415621),_0x2f9312=(await this[_0x926feb(0x1df)][_0x926feb(0x1e3)](_0x39eedc))[_0x926feb(0x1e6)]();if(_0x42d32e){const _0x703251={'memberId':_0x2f9312,'unitId':_0x39eedc,'content':_0x242546,'mention':_0x4d29a1,'threadId':_0x1bf2fe},_0x24c23d=(await this[_0x926feb(0x18c)][_0x926feb(0x18a)](_0x926feb(0x1bc)+_0x39eedc+_0x926feb(0x186),{'body':_0x703251}))[_0x926feb(0x1c6)]['reply'];return{..._0xafd77a,'id':_0x24c23d[_0x926feb(0x18b)],'dT':_0x52c03a[_0x926feb(0x18e)](+_0x24c23d[_0x926feb(0x1fc)])[_0x926feb(0x1f5)](_0x926feb(0x1b3)),'personId':_0x24c23d[_0x926feb(0x1f7)]};}else{const _0x5deba={'memberId':_0x2f9312,'unitId':_0x39eedc,'content':_0x242546,'mention':_0x4d29a1},_0x40731a=await this[_0x926feb(0x18c)][_0x926feb(0x18a)](_0x926feb(0x1bc)+_0x39eedc+'/add',{'body':_0x5deba});return _0x125548(_0x40731a[_0x926feb(0x1c6)]['comment'],_0xafd77a);}}async[_0x2ff827(0x1b1)](_0x35d9f2){const _0x116620=_0x2ff827;var _0x4e4bb1,_0x55c1fe;const {text:_0x2f59be,unitId:_0x140fc1}=_0x35d9f2,_0x5d6739=(_0x55c1fe=(_0x4e4bb1=_0x2f59be['customRanges'])==null?void 0x0:_0x4e4bb1[_0x116620(0x1e1)](_0x2d6efc=>_0x2d6efc[_0x116620(0x1de)]===_0x52c03a[_0x116620(0x1b8)]['COMMENT'])[_0x116620(0x185)](_0x161a6e=>_0x161a6e['rangeId']))!=null?_0x55c1fe:[],_0x425735=JSON['stringify'](_0x2f59be),_0x235e0d=_0x35d9f2['threadId'],_0x246e3b=_0x35d9f2['id'],_0x1f97b6={'memberId':(await this[_0x116620(0x1df)][_0x116620(0x1e3)](_0x140fc1))[_0x116620(0x1e6)](),'unitId':_0x140fc1,'threadId':_0x235e0d,'mention':_0x5d6739,'content':_0x425735,'replyId':_0x246e3b},_0x154cb0=await this[_0x116620(0x18c)]['post'](_0x116620(0x1bc)+_0x140fc1+_0x116620(0x1ec),{'body':_0x1f97b6});return!_0x154cb0[_0x116620(0x1c6)][_0x116620(0x1ef)]||_0x154cb0[_0x116620(0x1c6)]['error']['code']===0x1;}async['resolveComment'](_0xaa50bf){const _0x57106a=_0x2ff827,{unitId:_0x40a945}=_0xaa50bf,_0x45dd50=_0xaa50bf['threadId'],_0x130e12={'memberId':this[_0x57106a(0x1c0)][_0x57106a(0x1f4)]()['userID'],'unitId':_0x40a945,'threadId':_0x45dd50,'solved':_0xaa50bf[_0x57106a(0x1cf)]?_0x50ef57[_0x57106a(0x1db)]:_0x50ef57[_0x57106a(0x1d2)]},_0x1843ae=await this['_httpService'][_0x57106a(0x18a)](_0x57106a(0x1bc)+_0x40a945+_0x57106a(0x1c8),{'body':_0x130e12});return!_0x1843ae[_0x57106a(0x1c6)][_0x57106a(0x1ef)]||_0x1843ae['body'][_0x57106a(0x1ef)][_0x57106a(0x1b7)]===0x1;}async[_0x2ff827(0x19a)](_0x438f36,_0x1671eb,_0x786f6e,_0x56bc72){const _0x16eca6=_0x2ff827,_0x1de31f={'memberId':(await this[_0x16eca6(0x1df)][_0x16eca6(0x1e3)](_0x438f36))[_0x16eca6(0x1e6)](),'threadId':_0x786f6e,'replyId':_0x56bc72,'unitId':_0x438f36},_0x226afa=await this[_0x16eca6(0x18c)][_0x16eca6(0x18a)](_0x16eca6(0x1bc)+_0x438f36+_0x16eca6(0x1a2),{'body':_0x1de31f});return!_0x226afa[_0x16eca6(0x1c6)]['error']||_0x226afa['body'][_0x16eca6(0x1ef)][_0x16eca6(0x1b7)]===0x1;}async[_0x2ff827(0x184)](_0x389557,_0x4e3d61,_0x35bc6c){const _0x5d42c9=_0x2ff827,_0x2752c1={'unitId':_0x389557,'threadId':_0x35bc6c},_0x1e2ae8=await this[_0x5d42c9(0x18c)][_0x5d42c9(0x18a)](_0x5d42c9(0x1bc)+_0x389557+_0x5d42c9(0x1ce),{'body':_0x2752c1}),_0x95033b=_0x35bc6c[_0x5d42c9(0x185)](_0x28a74e=>_0x14b53d(_0x1e2ae8[_0x5d42c9(0x1c6)][_0x5d42c9(0x1a5)][_0x28a74e],_0x389557,_0x4e3d61))['filter'](Boolean);return Object[_0x5d42c9(0x1f6)](_0x1e2ae8[_0x5d42c9(0x1c6)][_0x5d42c9(0x189)])[_0x5d42c9(0x1a9)](_0x2f3b81=>{const _0x1a253b=_0x5d42c9;this[_0x1a253b(0x1c0)][_0x1a253b(0x1cd)](_0x2f3b81);}),_0x95033b;}[_0x2ff827(0x1c3)](_0x58668f){const _0x94a523=_0x2ff827;return{'id':_0x58668f['id'],'threadId':_0x58668f[_0x94a523(0x1e2)],'ref':_0x58668f[_0x94a523(0x1a8)]};}};_0x324652=_0xef3d6d([_0x106443(0x0,_0x52c03a[_0x2ff827(0x17d)](_0x1e3975[_0x2ff827(0x182)])),_0x106443(0x1,_0x52c03a['Inject'](_0x52c03a[_0x2ff827(0x1b0)])),_0x106443(0x2,_0x52c03a[_0x2ff827(0x17d)](_0x5d4d54[_0x2ff827(0x1ae)]))],_0x324652);var _0x4674a9=Object['getOwnPropertyDescriptor'],_0xb7c442=(_0x180826,_0x1956db,_0x3c747e,_0x10e2e6)=>{const _0x1a4422=_0x2ff827;for(var _0x279f4b=_0x10e2e6>0x1?void 0x0:_0x10e2e6?_0x4674a9(_0x1956db,_0x3c747e):_0x1956db,_0x95674b=_0x180826[_0x1a4422(0x190)]-0x1,_0x21d269;_0x95674b>=0x0;_0x95674b--)(_0x21d269=_0x180826[_0x95674b])&&(_0x279f4b=_0x21d269(_0x279f4b)||_0x279f4b);return _0x279f4b;},_0x6e2c95=(_0x1aa42f,_0x3755b7)=>(_0x188abb,_0x30d7f5)=>_0x3755b7(_0x188abb,_0x30d7f5,_0x1aa42f);let _0x2de520=class extends _0x52c03a[_0x2ff827(0x1d7)]{constructor(_0x42d223,_0x4581c5){const _0x20d49a=_0x2ff827;super(),this[_0x20d49a(0x1be)]=_0x42d223,this[_0x20d49a(0x1dc)]=_0x4581c5,this['_initDataSource']();}[_0x2ff827(0x1fa)](){const _0x4817b9=_0x2ff827;this['_threadCommentDataSourceService'][_0x4817b9(0x1c5)]=this[_0x4817b9(0x1dc)],this[_0x4817b9(0x1be)][_0x4817b9(0x1bb)]=!0x1;}};_0x2de520=_0xb7c442([_0x6e2c95(0x0,_0x145bf2[_0x2ff827(0x1c9)]),_0x6e2c95(0x1,_0x52c03a[_0x2ff827(0x17d)](_0x324652))],_0x2de520);var _0x56bc5a=Object['defineProperty'],_0x38453d=Object[_0x2ff827(0x1a1)],_0xbfd37=(_0x59d714,_0x3a4dd1,_0xc8018d)=>_0x3a4dd1 in _0x59d714?_0x56bc5a(_0x59d714,_0x3a4dd1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xc8018d}):_0x59d714[_0x3a4dd1]=_0xc8018d,_0x397687=(_0x5e9b3c,_0x4f2da8,_0x20c44f,_0x2e57cf)=>{const _0x1e91ae=_0x2ff827;for(var _0x3da5f5=_0x2e57cf>0x1?void 0x0:_0x2e57cf?_0x38453d(_0x4f2da8,_0x20c44f):_0x4f2da8,_0x2917c5=_0x5e9b3c[_0x1e91ae(0x190)]-0x1,_0x32a78e;_0x2917c5>=0x0;_0x2917c5--)(_0x32a78e=_0x5e9b3c[_0x2917c5])&&(_0x3da5f5=_0x32a78e(_0x3da5f5)||_0x3da5f5);return _0x3da5f5;},_0x2f6136=(_0x102368,_0x1ff961)=>(_0x352117,_0x3c8af0)=>_0x1ff961(_0x352117,_0x3c8af0,_0x102368),_0x30b006=(_0x47156f,_0x39970d,_0x54522)=>_0xbfd37(_0x47156f,typeof _0x39970d!=_0x2ff827(0x1b4)?_0x39970d+'':_0x39970d,_0x54522);_0x2858e6[_0x2ff827(0x1fe)]=class extends _0x52c03a[_0x2ff827(0x194)]{constructor(_0x6478fd=_0x58e418,_0x411613,_0x38b6a9){const _0x58c25a=_0x2ff827;super(),this[_0x58c25a(0x180)]=_0x6478fd,this[_0x58c25a(0x1d9)]=_0x411613,this[_0x58c25a(0x1da)]=_0x38b6a9;const {..._0x316430}=_0x52c03a['merge']({},_0x58e418,this[_0x58c25a(0x180)]);this['_configService'][_0x58c25a(0x19c)](_0x45275b,_0x316430);}['onStarting'](){const _0x20924d=_0x2ff827;[[_0x324652],[_0x2de520],[_0x1404e9]][_0x20924d(0x1a9)](_0x226f38=>{const _0x9357b2=_0x20924d;this['_injector'][_0x9357b2(0x1f2)](_0x226f38);});}[_0x2ff827(0x1c1)](){const _0x51a2cc=_0x2ff827;this['_injector'][_0x51a2cc(0x1e7)](_0x2de520),this[_0x51a2cc(0x1d9)][_0x51a2cc(0x1e7)](_0x1404e9);}},_0x30b006(_0x2858e6['UniverThreadCommentDataSourcePlugin'],_0x2ff827(0x1e0),_0xa588b),_0x30b006(_0x2858e6[_0x2ff827(0x1fe)],_0x2ff827(0x1bf),_0x52c03a['UniverInstanceType']['UNIVER_UNKNOWN']),_0x2858e6[_0x2ff827(0x1fe)]=_0x397687([_0x52c03a[_0x2ff827(0x17e)](_0xc56e17[_0x2ff827(0x1ed)],_0x5d4d54[_0x2ff827(0x1ca)],_0x15a3a5[_0x2ff827(0x179)]),_0x2f6136(0x1,_0x52c03a[_0x2ff827(0x17d)](_0x52c03a[_0x2ff827(0x1c4)])),_0x2f6136(0x2,_0x52c03a[_0x2ff827(0x1d1)])],_0x2858e6[_0x2ff827(0x1fe)]),Object['defineProperty'](_0x2858e6,Symbol[_0x2ff827(0x192)],{'value':_0x2ff827(0x1d0)});}));function _0xcde1(){const _0x731c3f=['rangeId','UniverNetwork','UniverLicensePlugin','UniverProCollaborationClient','1533684WOKvcG','513610qEYyvY','Inject','DependentOn','size','_config','find','HTTPService','Unknown','listComments','map','/reply','1068218BwGBuV','solved','users','post','replyId','_httpService','2734232RLhLAC','dayjs','thread-comment-data-source.config','length','23676Jnpxfs','toStringTag','9yqbjse','Plugin','COMMENT','CommentService','85288iXaiLZ','UniverCore','replies','deleteComment','Add','setConfig','personId','exports','delete','UNRECOGNIZED','getOwnPropertyDescriptor','/delete','object','disposeWithMe','comments','stringify','_init','ref','forEach','root','Solve','UniverProThreadCommentDatasource','Edit','CollaborationSessionService','resolveComment','UserManagerService','updateComment','getUser','YYYY/MM/DD\x20HH:mm','symbol','bufferTime','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','code','CustomRangeType','rxjs','17022eHJMqh','syncUpdateMutationToColla','/universer-api/comment/unit/','Reply','_threadCommentDataSourceService','type','_userService','onReady','addComment','saveCommentToSnapshot','Injector','dataSource','body','function','/solved','IThreadCommentDataSourceService','UniverCollaborationClientPlugin','Delete','getUnit','addUser','/list','resolved','Module','IConfigService','OpenOrReOpen','amd','userID','unitId','user','Disposable','UniverProLicense','_injector','_configService','Solved','_threadCommentDataSource','287FUXqXx','rangeType','_sessionService','pluginName','filter','threadId','requireSession','pipe','parse','getMemberID','get','content','UniverThreadComment','@univerjs-pro/license','_initUserSync','/edit','UniverThreadCommentUIPlugin','@univerjs/thread-comment-ui','error','payload','580EgRvgB','add','_threadCommentModel','getCurrentUser','format','values','userId','customRanges','ThreadCommentModel','_initDataSource','commentUpdate$','createTimestamp','parentId','UniverThreadCommentDataSourcePlugin'];_0xcde1=function(){return _0x731c3f;};return _0xcde1();}
|
|
1
|
+
(function(_0x1f52f5,_0x3d9e5f){const _0x42616d=_0x3960,_0x171adc=_0x1f52f5();while(!![]){try{const _0x4b393f=parseInt(_0x42616d(0x1b1))/0x1+parseInt(_0x42616d(0x1cb))/0x2*(-parseInt(_0x42616d(0x1c3))/0x3)+parseInt(_0x42616d(0x16e))/0x4+parseInt(_0x42616d(0x18a))/0x5+-parseInt(_0x42616d(0x18e))/0x6+parseInt(_0x42616d(0x162))/0x7*(parseInt(_0x42616d(0x19c))/0x8)+-parseInt(_0x42616d(0x172))/0x9;if(_0x4b393f===_0x3d9e5f)break;else _0x171adc['push'](_0x171adc['shift']());}catch(_0x5c365a){_0x171adc['push'](_0x171adc['shift']());}}}(_0x3d7c,0x5b6a0),function(_0x2a9e4f,_0x270940){const _0xfb450a=_0x3960;typeof exports=='object'&&typeof module<'u'?_0x270940(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0xfb450a(0x1cd)&&define[_0xfb450a(0x17d)]?define([_0xfb450a(0x1d5),_0xfb450a(0x17f),_0xfb450a(0x17e),_0xfb450a(0x18b),'@univerjs/thread-comment-ui',_0xfb450a(0x1ce),_0xfb450a(0x1b2),'@univerjs/network'],_0x270940):(_0x2a9e4f=typeof globalThis<'u'?globalThis:_0x2a9e4f||self,_0x270940(_0x2a9e4f[_0xfb450a(0x1b4)]={},_0x2a9e4f[_0xfb450a(0x1b3)],_0x2a9e4f[_0xfb450a(0x15c)],_0x2a9e4f['UniverCore'],_0x2a9e4f[_0xfb450a(0x1c2)],_0x2a9e4f[_0xfb450a(0x198)],_0x2a9e4f[_0xfb450a(0x1b2)],_0x2a9e4f['UniverNetwork']));}(this,function(_0x498946,_0x50192b,_0x54c7b5,_0xd19589,_0x47ef7c,_0xf14448,_0x505807,_0x3a4598){'use strict';const _0xfcf55d=_0x3960;const _0x12c6bd=_0xfcf55d(0x1d8);var _0xa67b23=(_0x228496=>(_0x228496[_0x228496[_0xfcf55d(0x1c9)]=0x0]=_0xfcf55d(0x1c9),_0x228496[_0x228496[_0xfcf55d(0x164)]=0x1]=_0xfcf55d(0x164),_0x228496[_0x228496[_0xfcf55d(0x165)]=-0x1]=_0xfcf55d(0x165),_0x228496))(_0xa67b23||{}),_0x2f9f97=(_0x58c0a0=>(_0x58c0a0[_0x58c0a0[_0xfcf55d(0x186)]=0x0]='Unknown',_0x58c0a0[_0x58c0a0[_0xfcf55d(0x1ba)]=0x1]=_0xfcf55d(0x1ba),_0x58c0a0[_0x58c0a0[_0xfcf55d(0x1d9)]=0x2]='Reply',_0x58c0a0[_0x58c0a0[_0xfcf55d(0x187)]=0x3]=_0xfcf55d(0x187),_0x58c0a0[_0x58c0a0[_0xfcf55d(0x1db)]=0x4]=_0xfcf55d(0x1db),_0x58c0a0[_0x58c0a0[_0xfcf55d(0x17b)]=0x5]=_0xfcf55d(0x17b),_0x58c0a0[_0x58c0a0['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x58c0a0))(_0x2f9f97||{});const _0x4211b3=_0x5f2993=>_0xd19589[_0xfcf55d(0x1c0)](new Date(+_0x5f2993))[_0xfcf55d(0x197)](_0xfcf55d(0x1ae)),_0x17d597=async(_0x47ab1e,_0x1b7606)=>{const _0x3ef546=_0xfcf55d,_0x18a070=_0x47ab1e['get'](_0xd19589[_0x3ef546(0x1d4)]),_0x584e56=_0x47ab1e['get'](_0x3a4598[_0x3ef546(0x1be)]);_0x1b7606[_0x3ef546(0x1bf)](_0x250a77=>{const _0x4040f9=_0x3ef546;_0x18a070['getUser'](_0x250a77)&&_0x1b7606[_0x4040f9(0x1bb)](_0x250a77);}),_0x1b7606['size']&&(await _0x584e56['get'](_0x3ef546(0x1a7),{'params':{'userIDs':[..._0x1b7606]}}))[_0x3ef546(0x1b5)]['users'][_0x3ef546(0x1bf)](_0x585d0e=>{const _0x42110c=_0x3ef546;_0x585d0e&&_0x18a070[_0x42110c(0x1a2)](_0x585d0e);});};var _0x3a78c3=Object[_0xfcf55d(0x185)],_0x62b0d3=(_0x4d798c,_0x31d490,_0x3a4ffa,_0x37e4a5)=>{const _0x3773d1=_0xfcf55d;for(var _0x2a7d94=_0x37e4a5>0x1?void 0x0:_0x37e4a5?_0x3a78c3(_0x31d490,_0x3a4ffa):_0x31d490,_0x4f44e5=_0x4d798c[_0x3773d1(0x16b)]-0x1,_0x1aa333;_0x4f44e5>=0x0;_0x4f44e5--)(_0x1aa333=_0x4d798c[_0x4f44e5])&&(_0x2a7d94=_0x1aa333(_0x2a7d94)||_0x2a7d94);return _0x2a7d94;},_0xf156e5=(_0x2205f4,_0x285d89)=>(_0x3c56bf,_0xf264ce)=>_0x285d89(_0x3c56bf,_0xf264ce,_0x2205f4);let _0x496ab1=class extends _0xd19589[_0xfcf55d(0x1d2)]{constructor(_0x14dec3,_0x5c982b,_0x1924cb,_0x16bc93){const _0x48e37f=_0xfcf55d;super(),this[_0x48e37f(0x188)]=_0x14dec3,this['_threadCommentModel']=_0x5c982b,this['_userService']=_0x1924cb,this[_0x48e37f(0x1b6)]=_0x16bc93,this[_0x48e37f(0x180)](),this['_initUserSync']();}[_0xfcf55d(0x1c7)](){const _0x4161dd=_0xfcf55d;this[_0x4161dd(0x1ab)](this[_0x4161dd(0x196)][_0x4161dd(0x193)]['pipe'](_0x505807[_0x4161dd(0x19b)](0x10))[_0x4161dd(0x161)](_0x34f599=>{const _0x4602f3=_0x4161dd,_0x28f8f7=new Set();_0x34f599[_0x4602f3(0x1bf)](_0x1a7006=>{const _0x2d2f46=_0x4602f3;if(_0x1a7006[_0x2d2f46(0x19e)]==='add'){const _0x39230a=_0x1a7006[_0x2d2f46(0x184)]['personId'];_0x28f8f7[_0x2d2f46(0x1d7)](_0x39230a);}}),_0x17d597(this[_0x4602f3(0x1b6)],_0x28f8f7);}));}[_0xfcf55d(0x180)](){const _0x135740=_0xfcf55d;this[_0x135740(0x1ab)](this[_0x135740(0x188)][_0x135740(0x193)][_0x135740(0x161)](async _0x43dcdb=>{const _0x3bf6a9=_0x135740;var _0x356a9d,_0x59e9b1,_0x49cfac,_0x4f676f;const _0x50e5ee=(_0x356a9d=this[_0x3bf6a9(0x196)]['getUnit'](_0x43dcdb[_0x3bf6a9(0x170)])[_0x3bf6a9(0x15e)](_0x3cdf11=>_0x3cdf11[_0x3bf6a9(0x15a)]===_0x43dcdb[_0x3bf6a9(0x15a)]))==null?void 0x0:_0x356a9d[_0x3bf6a9(0x17c)];if(!_0x50e5ee)return;const {unitId:_0x23fca2,subUnitId:_0x59efba}=_0x50e5ee;switch(_0x43dcdb[_0x3bf6a9(0x1c5)]&&this[_0x3bf6a9(0x1a6)][_0x3bf6a9(0x1a2)](_0x43dcdb['user']),_0x43dcdb[_0x3bf6a9(0x19e)]){case _0x2f9f97[_0x3bf6a9(0x1ba)]:break;case _0x2f9f97[_0x3bf6a9(0x1d9)]:{this[_0x3bf6a9(0x196)]['addComment'](_0x23fca2,_0x59efba,{'unitId':_0x23fca2,'subUnitId':_0x59efba,'ref':'','id':_0x43dcdb[_0x3bf6a9(0x1b7)],'dT':_0x4211b3(+_0x43dcdb[_0x3bf6a9(0x16a)]),'threadId':_0x43dcdb[_0x3bf6a9(0x15a)],'personId':(_0x49cfac=(_0x59e9b1=_0x43dcdb[_0x3bf6a9(0x1c5)])==null?void 0x0:_0x59e9b1['userID'])!=null?_0x49cfac:_0x43dcdb['userId'],'text':JSON[_0x3bf6a9(0x18d)](_0x43dcdb[_0x3bf6a9(0x192)]),'parentId':_0x50e5ee['id']});break;}case _0x2f9f97[_0x3bf6a9(0x1db)]:{const _0x237356=this['_threadCommentModel'][_0x3bf6a9(0x178)](_0x23fca2,_0x59efba,_0x43dcdb[_0x3bf6a9(0x1b7)]);_0x237356&&_0x237356[_0x3bf6a9(0x191)]&&this[_0x3bf6a9(0x196)][_0x3bf6a9(0x166)](_0x23fca2,_0x59efba,_0x43dcdb[_0x3bf6a9(0x1b7)]);break;}case _0x2f9f97[_0x3bf6a9(0x187)]:{this[_0x3bf6a9(0x196)][_0x3bf6a9(0x1dc)](_0x23fca2,_0x59efba,{'commentId':_0x43dcdb['replyId'],'text':JSON['parse'](_0x43dcdb[_0x3bf6a9(0x192)])});break;}case _0x2f9f97['Solve']:{const _0x2d99f2=(_0x4f676f=this[_0x3bf6a9(0x196)][_0x3bf6a9(0x1bc)](_0x43dcdb[_0x3bf6a9(0x170)])[_0x3bf6a9(0x15e)](_0x4dba37=>_0x4dba37['threadId']===_0x43dcdb[_0x3bf6a9(0x15a)]))==null?void 0x0:_0x4f676f[_0x3bf6a9(0x17c)];_0x2d99f2&&this[_0x3bf6a9(0x196)][_0x3bf6a9(0x1a9)](_0x23fca2,_0x59efba,_0x2d99f2['id'],_0x43dcdb[_0x3bf6a9(0x1a4)]===_0xa67b23['Solved']);break;}}}));}};_0x496ab1=_0x62b0d3([_0xf156e5(0x0,_0xd19589[_0xfcf55d(0x183)](_0x50192b[_0xfcf55d(0x1bd)])),_0xf156e5(0x1,_0xd19589[_0xfcf55d(0x183)](_0xf14448['ThreadCommentModel'])),_0xf156e5(0x2,_0xd19589[_0xfcf55d(0x183)](_0xd19589[_0xfcf55d(0x1d4)])),_0xf156e5(0x3,_0xd19589['Inject'](_0xd19589[_0xfcf55d(0x1aa)]))],_0x496ab1);const _0x5ee21c=_0xfcf55d(0x1da),_0x1e6a65={};var _0x537144=Object[_0xfcf55d(0x185)],_0x144496=(_0x17c3ee,_0xb7f796,_0x39f4d4,_0x1899ad)=>{for(var _0x349baa=_0x1899ad>0x1?void 0x0:_0x1899ad?_0x537144(_0xb7f796,_0x39f4d4):_0xb7f796,_0x31ca6d=_0x17c3ee['length']-0x1,_0x1bcc9b;_0x31ca6d>=0x0;_0x31ca6d--)(_0x1bcc9b=_0x17c3ee[_0x31ca6d])&&(_0x349baa=_0x1bcc9b(_0x349baa)||_0x349baa);return _0x349baa;},_0x406750=(_0x4d43f5,_0x4c0d6a)=>(_0x15f70a,_0x12ce64)=>_0x4c0d6a(_0x15f70a,_0x12ce64,_0x4d43f5);function _0x4bf53f(_0x459b4c,_0x4a9667){const _0xbfc9d8=_0xfcf55d,_0x95d346=_0x459b4c[_0xbfc9d8(0x194)][0x0];return{..._0x4a9667,'id':_0x95d346[_0xbfc9d8(0x1b7)],'resolved':_0x459b4c[_0xbfc9d8(0x1a4)]===0x1,'dT':_0x4211b3(_0x95d346['createTimestamp']),'personId':_0x95d346[_0xbfc9d8(0x16d)],'threadId':_0x95d346[_0xbfc9d8(0x15a)]};}function _0x47d274(_0x3eb4c1,_0x2492bd,_0x241db7){const _0xda18ff=_0xfcf55d;var _0x115e52,_0xbdb76f;if(((_0xbdb76f=(_0x115e52=_0x3eb4c1==null?void 0x0:_0x3eb4c1[_0xda18ff(0x194)])==null?void 0x0:_0x115e52[_0xda18ff(0x16b)])!=null?_0xbdb76f:0x0)>0x0){const _0x44d5de=(_0x133123,_0x2193d7)=>({'id':_0x133123[_0xda18ff(0x1b7)],'threadId':_0x133123[_0xda18ff(0x15a)],'dT':_0x4211b3(_0x133123[_0xda18ff(0x16a)]),'personId':_0x133123['userId'],'resolved':_0x3eb4c1[_0xda18ff(0x1a4)]===_0xa67b23['Solved'],'unitId':_0x2492bd,'subUnitId':_0x241db7,'text':JSON[_0xda18ff(0x18d)](_0x133123[_0xda18ff(0x192)]),'parentId':_0x2193d7}),_0x110b80=_0x44d5de(_0x3eb4c1['replies'][0x0]);return{..._0x110b80,'children':_0x3eb4c1['replies']['slice'](0x1)[_0xda18ff(0x1a0)](_0xb74aa=>_0x44d5de(_0xb74aa,_0x110b80['id']))};}return null;}let _0x4e6efe=class{constructor(_0x268fe9,_0x9dbb3c,_0x435b33){const _0x2576b7=_0xfcf55d;this[_0x2576b7(0x1ad)]=_0x268fe9,this[_0x2576b7(0x1a6)]=_0x9dbb3c,this['_sessionService']=_0x435b33;}async['addComment'](_0x4b4536){const _0x3d6465=_0xfcf55d;var _0x5d5528,_0x40f24c;const {parentId:_0x484ebe,unitId:_0x49ec91,text:_0xc20f9b,threadId:_0x490aee}=_0x4b4536,_0x53cc86=(_0x40f24c=(_0x5d5528=_0xc20f9b[_0x3d6465(0x167)])==null?void 0x0:_0x5d5528['filter'](_0x3e06dc=>_0x3e06dc['rangeType']===_0xd19589['CustomRangeType'][_0x3d6465(0x17a)])['map'](_0x1f010a=>_0x1f010a[_0x3d6465(0x1ca)]))!=null?_0x40f24c:[],_0xb89b88=JSON[_0x3d6465(0x19d)](_0xc20f9b),_0x78cea3=(await this[_0x3d6465(0x163)][_0x3d6465(0x1a5)](_0x49ec91))[_0x3d6465(0x1b8)]();if(_0x484ebe){const _0x4e6c35={'memberId':_0x78cea3,'unitId':_0x49ec91,'content':_0xb89b88,'mention':_0x53cc86,'threadId':_0x490aee},_0xeee47e=(await this[_0x3d6465(0x1ad)]['post'](_0x3d6465(0x16f)+_0x49ec91+_0x3d6465(0x1ac),{'body':_0x4e6c35}))[_0x3d6465(0x1b5)][_0x3d6465(0x16c)];return{..._0x4b4536,'id':_0xeee47e[_0x3d6465(0x1b7)],'dT':_0xd19589['dayjs'](+_0xeee47e['createTimestamp'])[_0x3d6465(0x197)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xeee47e[_0x3d6465(0x16d)]};}else{const _0x5d2ea1={'memberId':_0x78cea3,'unitId':_0x49ec91,'content':_0xb89b88,'mention':_0x53cc86},_0x295f49=await this[_0x3d6465(0x1ad)][_0x3d6465(0x1b0)](_0x3d6465(0x16f)+_0x49ec91+_0x3d6465(0x169),{'body':_0x5d2ea1});return _0x4bf53f(_0x295f49[_0x3d6465(0x1b5)]['comment'],_0x4b4536);}}async[_0xfcf55d(0x1dc)](_0x410686){const _0x467f70=_0xfcf55d;var _0xbe61fc,_0x26e82e;const {text:_0xedb227,unitId:_0xf608f9}=_0x410686,_0x9b3a5=(_0x26e82e=(_0xbe61fc=_0xedb227[_0x467f70(0x167)])==null?void 0x0:_0xbe61fc['filter'](_0x33eaca=>_0x33eaca[_0x467f70(0x1d3)]===_0xd19589['CustomRangeType']['COMMENT'])['map'](_0x524053=>_0x524053[_0x467f70(0x1ca)]))!=null?_0x26e82e:[],_0x2c0132=JSON[_0x467f70(0x19d)](_0xedb227),_0x3db96e=_0x410686[_0x467f70(0x15a)],_0x40cc12=_0x410686['id'],_0x2e7910={'memberId':(await this['_sessionService'][_0x467f70(0x1a5)](_0xf608f9))[_0x467f70(0x1b8)](),'unitId':_0xf608f9,'threadId':_0x3db96e,'mention':_0x9b3a5,'content':_0x2c0132,'replyId':_0x40cc12},_0x255aef=await this['_httpService'][_0x467f70(0x1b0)](_0x467f70(0x16f)+_0xf608f9+'/edit',{'body':_0x2e7910});return!_0x255aef['body']['error']||_0x255aef[_0x467f70(0x1b5)][_0x467f70(0x1c6)]['code']===0x1;}async[_0xfcf55d(0x1a9)](_0x34c2db){const _0x5220c4=_0xfcf55d,{unitId:_0x134437}=_0x34c2db,_0x1eac8b=_0x34c2db[_0x5220c4(0x15a)],_0x35f0c7={'memberId':this['_userService'][_0x5220c4(0x1cf)]()[_0x5220c4(0x177)],'unitId':_0x134437,'threadId':_0x1eac8b,'solved':_0x34c2db[_0x5220c4(0x1a8)]?_0xa67b23[_0x5220c4(0x164)]:_0xa67b23[_0x5220c4(0x1c9)]},_0x4d0bd4=await this[_0x5220c4(0x1ad)][_0x5220c4(0x1b0)]('/universer-api/comment/unit/'+_0x134437+_0x5220c4(0x1c1),{'body':_0x35f0c7});return!_0x4d0bd4['body'][_0x5220c4(0x1c6)]||_0x4d0bd4[_0x5220c4(0x1b5)]['error'][_0x5220c4(0x160)]===0x1;}async['deleteComment'](_0x4db55c,_0x20c560,_0x2189bc,_0x54aa66){const _0x15e535=_0xfcf55d,_0x57b319={'memberId':(await this[_0x15e535(0x163)]['requireSession'](_0x4db55c))['getMemberID'](),'threadId':_0x2189bc,'replyId':_0x54aa66,'unitId':_0x4db55c},_0x35e2fb=await this[_0x15e535(0x1ad)][_0x15e535(0x1b0)]('/universer-api/comment/unit/'+_0x4db55c+_0x15e535(0x173),{'body':_0x57b319});return!_0x35e2fb['body'][_0x15e535(0x1c6)]||_0x35e2fb['body'][_0x15e535(0x1c6)][_0x15e535(0x160)]===0x1;}async[_0xfcf55d(0x18c)](_0x5ab79c,_0x49c689,_0x168910){const _0x38466c=_0xfcf55d,_0x7c33b5={'unitId':_0x5ab79c,'threadId':_0x168910},_0x4d25d2=await this[_0x38466c(0x1ad)][_0x38466c(0x1b0)](_0x38466c(0x16f)+_0x5ab79c+_0x38466c(0x1a1),{'body':_0x7c33b5}),_0x4e10a2=_0x168910['map'](_0x3858c6=>_0x47d274(_0x4d25d2['body']['comments'][_0x3858c6],_0x5ab79c,_0x49c689))[_0x38466c(0x15b)](Boolean);return Object[_0x38466c(0x181)](_0x4d25d2['body'][_0x38466c(0x171)])['forEach'](_0x17c864=>{const _0x1e5459=_0x38466c;this[_0x1e5459(0x1a6)][_0x1e5459(0x1a2)](_0x17c864);}),_0x4e10a2;}[_0xfcf55d(0x189)](_0x4f1eaf){const _0x159aea=_0xfcf55d;return{'id':_0x4f1eaf['id'],'threadId':_0x4f1eaf[_0x159aea(0x15a)],'ref':_0x4f1eaf[_0x159aea(0x176)]};}};_0x4e6efe=_0x144496([_0x406750(0x0,_0xd19589[_0xfcf55d(0x183)](_0x3a4598[_0xfcf55d(0x1be)])),_0x406750(0x1,_0xd19589[_0xfcf55d(0x183)](_0xd19589[_0xfcf55d(0x1d4)])),_0x406750(0x2,_0xd19589[_0xfcf55d(0x183)](_0x50192b[_0xfcf55d(0x19f)]))],_0x4e6efe);var _0x3d7009=Object['getOwnPropertyDescriptor'],_0x44f3c4=(_0x55ece0,_0x11b5c0,_0x5221f3,_0x3e4cc6)=>{for(var _0x34de91=_0x3e4cc6>0x1?void 0x0:_0x3e4cc6?_0x3d7009(_0x11b5c0,_0x5221f3):_0x11b5c0,_0x49ac18=_0x55ece0['length']-0x1,_0x36b61c;_0x49ac18>=0x0;_0x49ac18--)(_0x36b61c=_0x55ece0[_0x49ac18])&&(_0x34de91=_0x36b61c(_0x34de91)||_0x34de91);return _0x34de91;},_0x21eb5f=(_0x14a501,_0x250d68)=>(_0x22a682,_0x5d9711)=>_0x250d68(_0x22a682,_0x5d9711,_0x14a501);let _0x4e316c=class extends _0xd19589[_0xfcf55d(0x1d2)]{constructor(_0x341908,_0x17f5b8){const _0x575838=_0xfcf55d;super(),this[_0x575838(0x15f)]=_0x341908,this[_0x575838(0x179)]=_0x17f5b8,this['_initDataSource']();}[_0xfcf55d(0x190)](){const _0x2dc6ac=_0xfcf55d;this[_0x2dc6ac(0x15f)]['dataSource']=this['_threadCommentDataSource'],this[_0x2dc6ac(0x15f)]['syncUpdateMutationToColla']=!0x1;}};_0x4e316c=_0x44f3c4([_0x21eb5f(0x0,_0xf14448[_0xfcf55d(0x195)]),_0x21eb5f(0x1,_0xd19589[_0xfcf55d(0x183)](_0x4e6efe))],_0x4e316c);var _0x442aba=Object[_0xfcf55d(0x1c8)],_0x4d4302=Object[_0xfcf55d(0x185)],_0x1ce4c0=(_0x2a6bac,_0x27e4d7,_0x38aad3)=>_0x27e4d7 in _0x2a6bac?_0x442aba(_0x2a6bac,_0x27e4d7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x38aad3}):_0x2a6bac[_0x27e4d7]=_0x38aad3,_0x5a4ad2=(_0xd5df8e,_0x4acab5,_0x1c5d5f,_0x7a790d)=>{for(var _0x18f887=_0x7a790d>0x1?void 0x0:_0x7a790d?_0x4d4302(_0x4acab5,_0x1c5d5f):_0x4acab5,_0x5c5336=_0xd5df8e['length']-0x1,_0x1e1584;_0x5c5336>=0x0;_0x5c5336--)(_0x1e1584=_0xd5df8e[_0x5c5336])&&(_0x18f887=_0x1e1584(_0x18f887)||_0x18f887);return _0x18f887;},_0xdb5df0=(_0x5b982f,_0x244341)=>(_0x47caa1,_0x238a19)=>_0x244341(_0x47caa1,_0x238a19,_0x5b982f),_0x4a35ae=(_0x4c5399,_0x1d47e2,_0x340b5d)=>_0x1ce4c0(_0x4c5399,typeof _0x1d47e2!=_0xfcf55d(0x1d0)?_0x1d47e2+'':_0x1d47e2,_0x340b5d);_0x498946[_0xfcf55d(0x1b9)]=class extends _0xd19589[_0xfcf55d(0x19a)]{constructor(_0x3da852=_0x1e6a65,_0x437775,_0x3dbe58){const _0x4cf8b0=_0xfcf55d;super(),this['_config']=_0x3da852,this[_0x4cf8b0(0x1b6)]=_0x437775,this[_0x4cf8b0(0x1d1)]=_0x3dbe58;const {..._0x3fa239}=_0xd19589[_0x4cf8b0(0x15d)]({},_0x1e6a65,this[_0x4cf8b0(0x182)]);this[_0x4cf8b0(0x1d1)][_0x4cf8b0(0x1c4)](_0x5ee21c,_0x3fa239);}[_0xfcf55d(0x1af)](){const _0x2be5c0=_0xfcf55d;[[_0x4e6efe],[_0x4e316c],[_0x496ab1]][_0x2be5c0(0x1bf)](_0x22021d=>{const _0x28831c=_0x2be5c0;this[_0x28831c(0x1b6)]['add'](_0x22021d);});}['onReady'](){const _0x3a7a49=_0xfcf55d;this[_0x3a7a49(0x1b6)]['get'](_0x4e316c),this[_0x3a7a49(0x1b6)]['get'](_0x496ab1);}},_0x4a35ae(_0x498946[_0xfcf55d(0x1b9)],_0xfcf55d(0x1cc),_0x12c6bd),_0x4a35ae(_0x498946[_0xfcf55d(0x1b9)],_0xfcf55d(0x19e),_0xd19589[_0xfcf55d(0x199)][_0xfcf55d(0x168)]),_0x498946[_0xfcf55d(0x1b9)]=_0x5a4ad2([_0xd19589[_0xfcf55d(0x1a3)](_0x47ef7c['UniverThreadCommentUIPlugin'],_0x50192b['UniverCollaborationClientPlugin'],_0x54c7b5[_0xfcf55d(0x174)]),_0xdb5df0(0x1,_0xd19589[_0xfcf55d(0x183)](_0xd19589[_0xfcf55d(0x1aa)])),_0xdb5df0(0x2,_0xd19589[_0xfcf55d(0x18f)])],_0x498946[_0xfcf55d(0x1b9)]),Object[_0xfcf55d(0x1c8)](_0x498946,Symbol[_0xfcf55d(0x175)],{'value':_0xfcf55d(0x1d6)});}));function _0x3960(_0x30b5d9,_0x5b6936){_0x30b5d9=_0x30b5d9-0x15a;const _0x3d7ced=_0x3d7c();let _0x396072=_0x3d7ced[_0x30b5d9];return _0x396072;}function _0x3d7c(){const _0x4c0843=['15xxgRpE','setConfig','user','error','_initUserSync','defineProperty','OpenOrReOpen','rangeId','197038qbQecU','pluginName','function','@univerjs/thread-comment','getCurrentUser','symbol','_configService','Disposable','rangeType','UserManagerService','exports','Module','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Reply','thread-comment-data-source.config','Delete','updateComment','threadId','filter','UniverProLicense','merge','find','_threadCommentDataSourceService','code','subscribe','111853hPFHPc','_sessionService','Solved','UNRECOGNIZED','deleteComment','customRanges','UNIVER_UNKNOWN','/add','createTimestamp','length','reply','userId','1809068QtGhfa','/universer-api/comment/unit/','unitId','users','5948568ibVTqg','/delete','UniverLicensePlugin','toStringTag','ref','userID','getComment','_threadCommentDataSource','COMMENT','Solve','root','amd','@univerjs-pro/license','@univerjs-pro/collaboration-client','_init','values','_config','Inject','payload','getOwnPropertyDescriptor','Unknown','Edit','_commentService','saveCommentToSnapshot','2942510xRepFK','@univerjs/core','listComments','parse','1493370kOXYTr','IConfigService','_initDataSource','parentId','content','commentUpdate$','replies','IThreadCommentDataSourceService','_threadCommentModel','format','UniverThreadComment','UniverInstanceType','Plugin','bufferTime','256oSKjdW','stringify','type','CollaborationSessionService','map','/list','addUser','DependentOn','solved','requireSession','_userService','/universer-api/user/list','resolved','resolveComment','Injector','disposeWithMe','/reply','_httpService','YYYY/MM/DD\x20HH:mm','onStarting','post','224777Tbopsk','rxjs','UniverProCollaborationClient','UniverProThreadCommentDatasource','body','_injector','replyId','getMemberID','UniverThreadCommentDataSourcePlugin','Add','delete','getUnit','CommentService','HTTPService','forEach','dayjs','/solved','UniverThreadCommentUi'];_0x3d7c=function(){return _0x4c0843;};return _0x3d7c();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.15.0-insiders.
|
|
3
|
+
"version": "0.15.0-insiders.20260108-7b9120d",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,18 +45,18 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs/
|
|
49
|
-
"@univerjs-pro/license": "0.15.0-insiders.
|
|
50
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.15.0-insiders.20260108-7b9120d",
|
|
49
|
+
"@univerjs-pro/license": "0.15.0-insiders.20260108-7b9120d",
|
|
50
|
+
"@univerjs/core": "0.15.0-insiders.20260108-7b9120d",
|
|
51
|
+
"@univerjs/network": "0.15.0-insiders.20260108-7b9120d",
|
|
51
52
|
"@univerjs/protocol": "0.1.48",
|
|
52
|
-
"@univerjs/thread-comment": "0.15.0-insiders.
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.15.0-insiders.
|
|
54
|
-
"@univerjs-pro/collaboration-client": "0.15.0-insiders.20260107-3d1cfdf"
|
|
53
|
+
"@univerjs/thread-comment": "0.15.0-insiders.20260108-7b9120d",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.15.0-insiders.20260108-7b9120d"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
|
-
"vite": "^7.3.
|
|
59
|
+
"vite": "^7.3.1",
|
|
60
60
|
"vitest": "^4.0.16",
|
|
61
61
|
"@univerjs-infra/shared": "0.15.0"
|
|
62
62
|
},
|