@univerjs-pro/thread-comment-datasource 0.3.0-nightly.202410111606 → 0.4.0-alpha.0
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/umd/index.js +1 -1
- package/package.json +16 -16
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x14e1af=_0x17a2;(function(_0x32d0a8,_0x44a11a){const _0x3de674=_0x17a2,_0x29b8e4=_0x32d0a8();while(!![]){try{const _0x1724fa=parseInt(_0x3de674(0x1f3))/0x1+parseInt(_0x3de674(0x1db))/0x2+-parseInt(_0x3de674(0x223))/0x3+parseInt(_0x3de674(0x1c6))/0x4*(parseInt(_0x3de674(0x1fd))/0x5)+parseInt(_0x3de674(0x202))/0x6+-parseInt(_0x3de674(0x1ea))/0x7*(parseInt(_0x3de674(0x210))/0x8)+-parseInt(_0x3de674(0x1d6))/0x9*(-parseInt(_0x3de674(0x1cd))/0xa);if(_0x1724fa===_0x44a11a)break;else _0x29b8e4['push'](_0x29b8e4['shift']());}catch(_0x3357e6){_0x29b8e4['push'](_0x29b8e4['shift']());}}}(_0x9769,0xbb6af));Object[_0x14e1af(0x1d2)](exports,Symbol['toStringTag'],{'value':'Module'});const c=require(_0x14e1af(0x1e0)),g=require('@univerjs/thread-comment'),N=require(_0x14e1af(0x1d7)),O=require('@univerjs-pro/collaboration-client'),E=require(_0x14e1af(0x21e)),q=require(_0x14e1af(0x1c5)),P=require(_0x14e1af(0x1f4)),$=require(_0x14e1af(0x1ce)),x=_0x14e1af(0x1e9);var p=(_0x105048=>(_0x105048[_0x105048[_0x14e1af(0x212)]=0x0]='OpenOrReOpen',_0x105048[_0x105048[_0x14e1af(0x1ef)]=0x1]=_0x14e1af(0x1ef),_0x105048[_0x105048[_0x14e1af(0x20d)]=-0x1]=_0x14e1af(0x20d),_0x105048))(p||{}),v=(_0x2ffb75=>(_0x2ffb75[_0x2ffb75[_0x14e1af(0x215)]=0x0]=_0x14e1af(0x215),_0x2ffb75[_0x2ffb75[_0x14e1af(0x1d1)]=0x1]='Add',_0x2ffb75[_0x2ffb75['Reply']=0x2]='Reply',_0x2ffb75[_0x2ffb75[_0x14e1af(0x228)]=0x3]=_0x14e1af(0x228),_0x2ffb75[_0x2ffb75[_0x14e1af(0x1e2)]=0x4]=_0x14e1af(0x1e2),_0x2ffb75[_0x2ffb75['Solve']=0x5]=_0x14e1af(0x201),_0x2ffb75[_0x2ffb75[_0x14e1af(0x20d)]=-0x1]=_0x14e1af(0x20d),_0x2ffb75))(v||{});const y=_0x70ae20=>$(new Date(+_0x70ae20))[_0x14e1af(0x1cc)](_0x14e1af(0x1de)),Y=async(_0x5185d6,_0x2eb56f)=>{const _0x3e233f=_0x14e1af,_0x3eb6d9=_0x5185d6[_0x3e233f(0x1d5)](c[_0x3e233f(0x1b9)]),_0x20fc0c=_0x5185d6[_0x3e233f(0x1d5)](P[_0x3e233f(0x219)]);_0x2eb56f[_0x3e233f(0x1e3)](_0x3336c3=>{const _0x58eebc=_0x3e233f;_0x3eb6d9[_0x58eebc(0x1ba)](_0x3336c3)&&_0x2eb56f[_0x58eebc(0x20e)](_0x3336c3);}),_0x2eb56f[_0x3e233f(0x22d)]&&(await _0x20fc0c[_0x3e233f(0x1d5)](_0x3e233f(0x221),{'params':{'userIDs':[..._0x2eb56f]}}))[_0x3e233f(0x1f6)][_0x3e233f(0x1ed)][_0x3e233f(0x1e3)](_0x567853=>{const _0x27d111=_0x3e233f;_0x567853&&_0x3eb6d9[_0x27d111(0x20c)](_0x567853);});};function _0x9769(){const _0x5302c6=['get','657JySGLy','@univerjs/thread-comment-ui','Reply','user','DependentOn','1008240MYQRst','rangeType','type','YYYY/MM/DD\x20HH:mm','getThread','@univerjs/core','CustomRangeType','Delete','forEach','comments','_threadCommentDataSource','_userService','/add','UniverLicensePlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','811951TKaTZk','getComment','thread-comment-data-source.config','users','_init','Solved','/universer-api/comment/unit/','protocol','solved','344028Bialzr','@univerjs/network','_threadCommentMentionDataSource','body','getOwnPropertyDescriptor','/solved','disposeWithMe','resolved','onReady','listComments','35rzJLZI','setConfig','add','UniverThreadCommentUIPlugin','Solve','199962ORqSdl','UNIVER_UNKNOWN','host','replyId','post','error','slice','http','getMentions','Plugin','addUser','UNRECOGNIZED','delete','IThreadCommentDataSourceService','8jmImrM','IConfigService','OpenOrReOpen','bufferTime','subject','Unknown','_sessionService','location','subscribe','HTTPService','_initUserSync','customRanges','parentId','_injector','@univerjs-pro/license','_threadCommentModel','length','/universer-api/user/list','saveCommentToSnapshot','1269612qTIuEV','userID','addComment','_threadCommentMentionDataService','requireSession','Edit','_configService','/universer-api/authz/collaborator','_initDataSource','/reply','size','/edit','https','getMemberID','replies','resolveComment','UniverInstanceType','pluginName','_httpService','deleteComment','dataSource','pipe','userId','createTimestamp','updateComment','searchParams','Disposable','comment','code','threadId','UserManagerService','getUser','UniverThreadCommentDataSourcePlugin','UniverCollaborationClientPlugin','filter','content','CollaborationSessionService','COMMENT','_threadCommentDataSourceService','rangeId','CommentService','Inject','rxjs','46144iptovE','map','getCurrentUser','onStarting','avatar','Injector','format','47210ViUfRd','dayjs','parse','_commentService','Add','defineProperty','reply','stringify'];_0x9769=function(){return _0x5302c6;};return _0x9769();}function _0x17a2(_0x3d6b7c,_0x41550a){const _0x17a227=_0x9769();return _0x17a2=function(_0xfb9465,_0x24ef61){_0xfb9465=_0xfb9465-0x1b0;let _0x2b024a=_0x17a227[_0xfb9465];return _0x2b024a;},_0x17a2(_0x3d6b7c,_0x41550a);}var G=Object[_0x14e1af(0x1d2)],H=Object[_0x14e1af(0x1f7)],A=(_0xf42add,_0x27ea88,_0x44258f,_0x4c18ce)=>{const _0x395476=_0x14e1af;for(var _0x2bfedc=_0x4c18ce>0x1?void 0x0:_0x4c18ce?H(_0x27ea88,_0x44258f):_0x27ea88,_0x4c1047=_0xf42add[_0x395476(0x220)]-0x1,_0x30509f;_0x4c1047>=0x0;_0x4c1047--)(_0x30509f=_0xf42add[_0x4c1047])&&(_0x2bfedc=(_0x4c18ce?_0x30509f(_0x27ea88,_0x44258f,_0x2bfedc):_0x30509f(_0x2bfedc))||_0x2bfedc);return _0x4c18ce&&_0x2bfedc&&G(_0x27ea88,_0x44258f,_0x2bfedc),_0x2bfedc;},I=(_0x35a37d,_0x5b3479)=>(_0x2a6f59,_0x572bc2)=>_0x5b3479(_0x2a6f59,_0x572bc2,_0x35a37d);let f=class extends c[_0x14e1af(0x1b5)]{constructor(_0x52249c,_0x201383,_0xdd4560,_0x59ece5){const _0x2de77b=_0x14e1af;super(),this['_commentService']=_0x52249c,this[_0x2de77b(0x21f)]=_0x201383,this[_0x2de77b(0x1e6)]=_0xdd4560,this[_0x2de77b(0x21d)]=_0x59ece5,this[_0x2de77b(0x1ee)](),this[_0x2de77b(0x21a)]();}[_0x14e1af(0x21a)](){const _0x98360a=_0x14e1af;this[_0x98360a(0x1f9)](this[_0x98360a(0x21f)]['commentUpdate$'][_0x98360a(0x1b0)](q[_0x98360a(0x213)](0x10))[_0x98360a(0x218)](_0x33458d=>{const _0xdfeb1f=_0x98360a,_0x4ed383=new Set();_0x33458d[_0xdfeb1f(0x1e3)](_0x4887d9=>{const _0x3775da=_0xdfeb1f;switch(_0x4887d9[_0x3775da(0x1dd)]){case _0x3775da(0x1ff):{const _0x879512=_0x4887d9['payload']['personId'];_0x4ed383[_0x3775da(0x1ff)](_0x879512);break;}}}),Y(this[_0xdfeb1f(0x21d)],_0x4ed383);}));}[_0x14e1af(0x1ee)](){const _0x1e634d=_0x14e1af;this['disposeWithMe'](this[_0x1e634d(0x1d0)]['commentUpdate$'][_0x1e634d(0x218)](async _0x37e33e=>{const _0x2c07f6=_0x1e634d;var _0x43c84d,_0x5e39dd;const _0x2418dd=this[_0x2c07f6(0x21f)]['getThread'](_0x37e33e['unitId'],_0x37e33e[_0x2c07f6(0x1b8)]);if(!_0x2418dd)return;const {unitId:_0x453c6f,subUnitId:_0x183247}=_0x2418dd;switch(_0x37e33e[_0x2c07f6(0x1d9)]&&this[_0x2c07f6(0x1e6)][_0x2c07f6(0x20c)](_0x37e33e[_0x2c07f6(0x1d9)]),_0x37e33e[_0x2c07f6(0x1dd)]){case v[_0x2c07f6(0x1d1)]:break;case v[_0x2c07f6(0x1d8)]:{this[_0x2c07f6(0x21f)][_0x2c07f6(0x225)](_0x453c6f,_0x183247,{'unitId':_0x453c6f,'subUnitId':_0x183247,'ref':'','id':_0x37e33e['replyId'],'dT':y(+_0x37e33e['createTimestamp']),'threadId':_0x37e33e[_0x2c07f6(0x1b8)],'personId':(_0x5e39dd=(_0x43c84d=_0x37e33e[_0x2c07f6(0x1d9)])==null?void 0x0:_0x43c84d[_0x2c07f6(0x224)])!=null?_0x5e39dd:_0x37e33e[_0x2c07f6(0x1b1)],'text':JSON[_0x2c07f6(0x1cf)](_0x37e33e['content']),'parentId':_0x2418dd['id']});break;}case v[_0x2c07f6(0x1e2)]:{const _0x26e22f=this['_threadCommentModel'][_0x2c07f6(0x1eb)](_0x453c6f,_0x183247,_0x37e33e[_0x2c07f6(0x205)]);_0x26e22f&&_0x26e22f[_0x2c07f6(0x21c)]&&this[_0x2c07f6(0x21f)][_0x2c07f6(0x236)](_0x453c6f,_0x183247,_0x37e33e[_0x2c07f6(0x205)]);break;}case v['Edit']:{this[_0x2c07f6(0x21f)][_0x2c07f6(0x1b3)](_0x453c6f,_0x183247,{'commentId':_0x37e33e[_0x2c07f6(0x205)],'text':JSON[_0x2c07f6(0x1cf)](_0x37e33e['content'])});break;}case v[_0x2c07f6(0x201)]:{const _0x336ac0=this['_threadCommentModel'][_0x2c07f6(0x1df)](_0x453c6f,_0x37e33e[_0x2c07f6(0x1b8)]);_0x336ac0&&this[_0x2c07f6(0x21f)]['resolveComment'](_0x453c6f,_0x183247,_0x336ac0['id'],_0x37e33e['solved']===p[_0x2c07f6(0x1ef)]);break;}}}));}};f=A([I(0x0,c[_0x14e1af(0x1c4)](O[_0x14e1af(0x1c3)])),I(0x1,c[_0x14e1af(0x1c4)](g['ThreadCommentModel'])),I(0x2,c[_0x14e1af(0x1c4)](c[_0x14e1af(0x1b9)])),I(0x3,c['Inject'](c['Injector']))],f);const J=_0x14e1af(0x1ec),L={};var F=Object[_0x14e1af(0x1d2)],Z=Object[_0x14e1af(0x1f7)],W=(_0x675c2e,_0x1568a2,_0x34c044,_0x389f10)=>{const _0x53900f=_0x14e1af;for(var _0x2a190c=_0x389f10>0x1?void 0x0:_0x389f10?Z(_0x1568a2,_0x34c044):_0x1568a2,_0x18ad19=_0x675c2e[_0x53900f(0x220)]-0x1,_0x3d6f1e;_0x18ad19>=0x0;_0x18ad19--)(_0x3d6f1e=_0x675c2e[_0x18ad19])&&(_0x2a190c=(_0x389f10?_0x3d6f1e(_0x1568a2,_0x34c044,_0x2a190c):_0x3d6f1e(_0x2a190c))||_0x2a190c);return _0x389f10&&_0x2a190c&&F(_0x1568a2,_0x34c044,_0x2a190c),_0x2a190c;},_=(_0x4baf9c,_0x32d63f)=>(_0x146efd,_0x8c43fb)=>_0x32d63f(_0x146efd,_0x8c43fb,_0x4baf9c);function z(_0x16a50e,_0x1b8ec2){const _0x69fdb3=_0x14e1af,_0xc79f57=_0x16a50e[_0x69fdb3(0x231)][0x0];return{..._0x1b8ec2,'id':_0xc79f57['replyId'],'resolved':_0x16a50e[_0x69fdb3(0x1f2)]===0x1,'dT':y(_0xc79f57[_0x69fdb3(0x1b2)]),'personId':_0xc79f57[_0x69fdb3(0x1b1)],'threadId':_0xc79f57[_0x69fdb3(0x1b8)]};}function B(_0x54b507,_0x4d98e0,_0x217861){const _0x3a3a7=_0x14e1af;var _0x1bc722,_0x3abd39;if(((_0x3abd39=(_0x1bc722=_0x54b507==null?void 0x0:_0x54b507['replies'])==null?void 0x0:_0x1bc722[_0x3a3a7(0x220)])!=null?_0x3abd39:0x0)>0x0){const _0x286d5e=(_0x5da1bd,_0x5a2070)=>({'id':_0x5da1bd[_0x3a3a7(0x205)],'threadId':_0x5da1bd['threadId'],'dT':y(_0x5da1bd[_0x3a3a7(0x1b2)]),'personId':_0x5da1bd['userId'],'resolved':_0x54b507[_0x3a3a7(0x1f2)]===p[_0x3a3a7(0x1ef)],'unitId':_0x4d98e0,'subUnitId':_0x217861,'text':JSON[_0x3a3a7(0x1cf)](_0x5da1bd[_0x3a3a7(0x1be)]),'parentId':_0x5a2070}),_0x1a818f=_0x286d5e(_0x54b507['replies'][0x0]);return{..._0x1a818f,'children':_0x54b507['replies'][_0x3a3a7(0x208)](0x1)[_0x3a3a7(0x1c7)](_0x3261af=>_0x286d5e(_0x3261af,_0x1a818f['id']))};}return null;}let b=class{constructor(_0x182c4b,_0x394037,_0x3c865d,_0x305069){const _0x2bb5c7=_0x14e1af;this['_httpService']=_0x182c4b,this[_0x2bb5c7(0x1e6)]=_0x394037,this[_0x2bb5c7(0x216)]=_0x3c865d,this[_0x2bb5c7(0x21d)]=_0x305069;}async[_0x14e1af(0x225)](_0x291266){const _0x66a890=_0x14e1af;var _0x2c9630,_0x23d608;const {parentId:_0x9538d6,unitId:_0x3cb65d,text:_0x2b8fec,threadId:_0x2fa92a}=_0x291266,_0x1f083d=(_0x23d608=(_0x2c9630=_0x2b8fec[_0x66a890(0x21b)])==null?void 0x0:_0x2c9630[_0x66a890(0x1bd)](_0x377d46=>_0x377d46[_0x66a890(0x1dc)]===c[_0x66a890(0x1e1)][_0x66a890(0x1c0)])['map'](_0x430fc4=>_0x430fc4['rangeId']))!=null?_0x23d608:[],_0x49daf0=JSON[_0x66a890(0x1d4)](_0x2b8fec),_0xaaccfb=(await this[_0x66a890(0x216)][_0x66a890(0x227)](_0x3cb65d))[_0x66a890(0x230)]();if(_0x9538d6){const _0x16ef09={'memberId':_0xaaccfb,'unitId':_0x3cb65d,'content':_0x49daf0,'mention':_0x1f083d,'threadId':_0x2fa92a},_0x470508=(await this[_0x66a890(0x235)][_0x66a890(0x206)](_0x66a890(0x1f0)+_0x3cb65d+_0x66a890(0x22c),{'body':_0x16ef09}))[_0x66a890(0x1f6)][_0x66a890(0x1d3)];return{..._0x291266,'id':_0x470508[_0x66a890(0x205)],'dT':$(+_0x470508[_0x66a890(0x1b2)])[_0x66a890(0x1cc)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x470508[_0x66a890(0x1b1)]};}else{const _0x434786={'memberId':_0xaaccfb,'unitId':_0x3cb65d,'content':_0x49daf0,'mention':_0x1f083d},_0x22388f=await this['_httpService']['post'](_0x66a890(0x1f0)+_0x3cb65d+_0x66a890(0x1e7),{'body':_0x434786});return z(_0x22388f[_0x66a890(0x1f6)][_0x66a890(0x1b6)],_0x291266);}}async[_0x14e1af(0x1b3)](_0xbebcc5){const _0x14d583=_0x14e1af;var _0x24842a,_0x3d267e;const {text:_0x2584d4,unitId:_0x374c07}=_0xbebcc5,_0x10445e=(_0x3d267e=(_0x24842a=_0x2584d4[_0x14d583(0x21b)])==null?void 0x0:_0x24842a['filter'](_0x3f824a=>_0x3f824a[_0x14d583(0x1dc)]===c[_0x14d583(0x1e1)]['COMMENT'])[_0x14d583(0x1c7)](_0x159463=>_0x159463[_0x14d583(0x1c2)]))!=null?_0x3d267e:[],_0x1c5523=JSON[_0x14d583(0x1d4)](_0x2584d4),_0x3bf93e=_0xbebcc5['threadId'],_0x419178=_0xbebcc5['id'],_0x42e55d={'memberId':(await this[_0x14d583(0x216)][_0x14d583(0x227)](_0x374c07))['getMemberID'](),'unitId':_0x374c07,'threadId':_0x3bf93e,'mention':_0x10445e,'content':_0x1c5523,'replyId':_0x419178},_0x8c1c36=await this[_0x14d583(0x235)][_0x14d583(0x206)](_0x14d583(0x1f0)+_0x374c07+_0x14d583(0x22e),{'body':_0x42e55d});return!_0x8c1c36['body'][_0x14d583(0x207)]||_0x8c1c36['body'][_0x14d583(0x207)]['code']===0x1;}async[_0x14e1af(0x232)](_0x23480b){const _0x2fd152=_0x14e1af,{unitId:_0x1dc756}=_0x23480b,_0x10eb56=_0x23480b['threadId'],_0x9e69d7={'memberId':this['_userService'][_0x2fd152(0x1c8)]()['userID'],'unitId':_0x1dc756,'threadId':_0x10eb56,'solved':_0x23480b[_0x2fd152(0x1fa)]?p[_0x2fd152(0x1ef)]:p[_0x2fd152(0x212)]},_0x4f9772=await this[_0x2fd152(0x235)][_0x2fd152(0x206)]('/universer-api/comment/unit/'+_0x1dc756+_0x2fd152(0x1f8),{'body':_0x9e69d7});return!_0x4f9772[_0x2fd152(0x1f6)][_0x2fd152(0x207)]||_0x4f9772[_0x2fd152(0x1f6)]['error'][_0x2fd152(0x1b7)]===0x1;}async[_0x14e1af(0x236)](_0x5c1d24,_0x38f2be,_0x1b440d,_0x2a4ed3){const _0x39bfa0=_0x14e1af,_0xbe120={'memberId':(await this[_0x39bfa0(0x216)][_0x39bfa0(0x227)](_0x5c1d24))['getMemberID'](),'threadId':_0x1b440d,'replyId':_0x2a4ed3,'unitId':_0x5c1d24},_0x5b88ab=await this['_httpService'][_0x39bfa0(0x206)](_0x39bfa0(0x1f0)+_0x5c1d24+'/delete',{'body':_0xbe120});return!_0x5b88ab[_0x39bfa0(0x1f6)]['error']||_0x5b88ab['body']['error'][_0x39bfa0(0x1b7)]===0x1;}async[_0x14e1af(0x1fc)](_0x235e6b,_0x536da0,_0x2a5e1e){const _0x38acf0=_0x14e1af,_0x292298={'unitId':_0x235e6b,'threadId':_0x2a5e1e},_0x27f115=await this[_0x38acf0(0x235)]['post'](_0x38acf0(0x1f0)+_0x235e6b+'/list',{'body':_0x292298}),_0x121e0f=_0x2a5e1e[_0x38acf0(0x1c7)](_0x48cb70=>B(_0x27f115[_0x38acf0(0x1f6)][_0x38acf0(0x1e4)][_0x48cb70],_0x235e6b,_0x536da0))[_0x38acf0(0x1bd)](Boolean);return Object['values'](_0x27f115[_0x38acf0(0x1f6)][_0x38acf0(0x1ed)])[_0x38acf0(0x1e3)](_0x2a3ed5=>{const _0x10c941=_0x38acf0;this['_userService'][_0x10c941(0x20c)](_0x2a3ed5);}),_0x121e0f;}[_0x14e1af(0x222)](_0x257431){const _0x19a695=_0x14e1af;return{'id':_0x257431['id'],'threadId':_0x257431[_0x19a695(0x1b8)],'ref':_0x257431['ref']};}};b=W([_(0x0,c['Inject'](P[_0x14e1af(0x219)])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c['Inject'](O[_0x14e1af(0x1bf)])),_(0x3,c[_0x14e1af(0x1c4)](c[_0x14e1af(0x1cb)]))],b);var K=Object[_0x14e1af(0x1d2)],V=Object[_0x14e1af(0x1f7)],Q=(_0xf3e6eb,_0x4abd22,_0x268f5c,_0x55389c)=>{const _0x503aad=_0x14e1af;for(var _0x386412=_0x55389c>0x1?void 0x0:_0x55389c?V(_0x4abd22,_0x268f5c):_0x4abd22,_0x550838=_0xf3e6eb[_0x503aad(0x220)]-0x1,_0x5e53c5;_0x550838>=0x0;_0x550838--)(_0x5e53c5=_0xf3e6eb[_0x550838])&&(_0x386412=(_0x55389c?_0x5e53c5(_0x4abd22,_0x268f5c,_0x386412):_0x5e53c5(_0x386412))||_0x386412);return _0x55389c&&_0x386412&&K(_0x4abd22,_0x268f5c,_0x386412),_0x386412;},X=(_0x3126aa,_0x26defd)=>(_0x5a38e9,_0x2d5853)=>_0x26defd(_0x5a38e9,_0x2d5853,_0x3126aa);let C=class{constructor(_0x52329a){this['_httpService']=_0x52329a;}async[_0x14e1af(0x20a)](_0x274dc9,_0x1fc55c,_0x4fbf2f){const _0x4a0472=_0x14e1af,_0x148bc9=new URL(window[_0x4a0472(0x217)]['href'])[_0x4a0472(0x1b4)][_0x4a0472(0x1d5)]('unit');if(!_0x148bc9)return[];const _0x425b5e=window[_0x4a0472(0x217)][_0x4a0472(0x204)],_0x32cffb=window[_0x4a0472(0x217)][_0x4a0472(0x1f1)]==='https:'?_0x4a0472(0x22f):_0x4a0472(0x209);return(await this[_0x4a0472(0x235)][_0x4a0472(0x1d5)](_0x32cffb+'://'+_0x425b5e+_0x4a0472(0x22a),{'params':{'objectID':_0x148bc9,'unitID':_0x148bc9}}))[_0x4a0472(0x1f6)]['collaborators']['map'](_0xec1536=>{const _0x5c098d=_0x4a0472;var _0x30c742,_0x5d57f7,_0x2af975,_0x575774,_0xe0ba59,_0x4ecc52;return{'id':(_0x5d57f7=(_0x30c742=_0xec1536[_0x5c098d(0x214)])==null?void 0x0:_0x30c742[_0x5c098d(0x224)])!=null?_0x5d57f7:'','label':(_0x575774=(_0x2af975=_0xec1536['subject'])==null?void 0x0:_0x2af975['name'])!=null?_0x575774:'','icon':(_0x4ecc52=(_0xe0ba59=_0xec1536[_0x5c098d(0x214)])==null?void 0x0:_0xe0ba59[_0x5c098d(0x1ca)])!=null?_0x4ecc52:'','type':'user'};});}};C=Q([X(0x0,c[_0x14e1af(0x1c4)](P[_0x14e1af(0x219)]))],C);var k=Object[_0x14e1af(0x1d2)],ee=Object[_0x14e1af(0x1f7)],re=(_0x4b8322,_0x2cb96b,_0x13c485,_0x220258)=>{const _0x59a28a=_0x14e1af;for(var _0x27c8de=_0x220258>0x1?void 0x0:_0x220258?ee(_0x2cb96b,_0x13c485):_0x2cb96b,_0x323100=_0x4b8322[_0x59a28a(0x220)]-0x1,_0x46e3ef;_0x323100>=0x0;_0x323100--)(_0x46e3ef=_0x4b8322[_0x323100])&&(_0x27c8de=(_0x220258?_0x46e3ef(_0x2cb96b,_0x13c485,_0x27c8de):_0x46e3ef(_0x27c8de))||_0x27c8de);return _0x220258&&_0x27c8de&&k(_0x2cb96b,_0x13c485,_0x27c8de),_0x27c8de;},S=(_0x101bd5,_0x529034)=>(_0xe0ce34,_0x29f0f2)=>_0x529034(_0xe0ce34,_0x29f0f2,_0x101bd5);let D=class extends c['Disposable']{constructor(_0x5c3beb,_0x27c767,_0x4bfa3d,_0x2ebb7d){const _0x162ae4=_0x14e1af;super(),this[_0x162ae4(0x1c1)]=_0x5c3beb,this[_0x162ae4(0x1e5)]=_0x27c767,this[_0x162ae4(0x226)]=_0x4bfa3d,this[_0x162ae4(0x1f5)]=_0x2ebb7d,this[_0x162ae4(0x22b)]();}[_0x14e1af(0x22b)](){const _0x41e7c9=_0x14e1af;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1,this[_0x41e7c9(0x226)][_0x41e7c9(0x237)]=this[_0x41e7c9(0x1f5)];}};D=re([S(0x0,g[_0x14e1af(0x20f)]),S(0x1,c[_0x14e1af(0x1c4)](b)),S(0x2,N['IThreadCommentMentionDataService']),S(0x3,c[_0x14e1af(0x1c4)](C))],D);var U=Object[_0x14e1af(0x1d2)],te=Object[_0x14e1af(0x1f7)],se=(_0x25ef1e,_0x56db9a,_0x5acd03)=>_0x56db9a in _0x25ef1e?U(_0x25ef1e,_0x56db9a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5acd03}):_0x25ef1e[_0x56db9a]=_0x5acd03,ne=(_0x49b864,_0x277de9,_0x39ffba,_0x3c0384)=>{const _0xf46c42=_0x14e1af;for(var _0x3ca9e9=_0x3c0384>0x1?void 0x0:_0x3c0384?te(_0x277de9,_0x39ffba):_0x277de9,_0x53838e=_0x49b864[_0xf46c42(0x220)]-0x1,_0x5de808;_0x53838e>=0x0;_0x53838e--)(_0x5de808=_0x49b864[_0x53838e])&&(_0x3ca9e9=(_0x3c0384?_0x5de808(_0x277de9,_0x39ffba,_0x3ca9e9):_0x5de808(_0x3ca9e9))||_0x3ca9e9);return _0x3c0384&&_0x3ca9e9&&U(_0x277de9,_0x39ffba,_0x3ca9e9),_0x3ca9e9;},T=(_0x436054,_0x564122)=>(_0x451c03,_0x9c3860)=>_0x564122(_0x451c03,_0x9c3860,_0x436054),R=(_0x9789c7,_0x3419a0,_0x10a084)=>se(_0x9789c7,typeof _0x3419a0!='symbol'?_0x3419a0+'':_0x3419a0,_0x10a084);exports[_0x14e1af(0x1bb)]=class extends c[_0x14e1af(0x20b)]{constructor(_0x3ac106=L,_0x410ac7,_0x5b59c2){const _0x5d328a=_0x14e1af;super(),this['_config']=_0x3ac106,this[_0x5d328a(0x21d)]=_0x410ac7,this[_0x5d328a(0x229)]=_0x5b59c2;const {..._0x28966a}=this['_config'];this[_0x5d328a(0x229)][_0x5d328a(0x1fe)](J,_0x28966a);}[_0x14e1af(0x1c9)](){const _0x3b7b3f=_0x14e1af;[[C],[b],[D],[f]][_0x3b7b3f(0x1e3)](_0x45abf1=>{const _0x176946=_0x3b7b3f;this[_0x176946(0x21d)][_0x176946(0x1ff)](_0x45abf1);}),this[_0x3b7b3f(0x21d)]['get'](D);}[_0x14e1af(0x1fb)](){const _0x271531=_0x14e1af;this[_0x271531(0x21d)]['get'](f);}},R(exports['UniverThreadCommentDataSourcePlugin'],_0x14e1af(0x234),x),R(exports[_0x14e1af(0x1bb)],_0x14e1af(0x1dd),c[_0x14e1af(0x233)][_0x14e1af(0x203)]),exports['UniverThreadCommentDataSourcePlugin']=ne([c[_0x14e1af(0x1da)](g['UniverThreadCommentPlugin'],N[_0x14e1af(0x200)],O[_0x14e1af(0x1bc)],E[_0x14e1af(0x1e8)]),T(0x1,c[_0x14e1af(0x1c4)](c[_0x14e1af(0x1cb)])),T(0x2,c[_0x14e1af(0x211)])],exports[_0x14e1af(0x1bb)]);
|
|
1
|
+
'use strict';const _0x1d346f=_0x358c;function _0x358c(_0x50d094,_0x27217f){const _0x2ad7a7=_0x2ad7();return _0x358c=function(_0x358c2b,_0x20098a){_0x358c2b=_0x358c2b-0xb3;let _0x171e19=_0x2ad7a7[_0x358c2b];return _0x171e19;},_0x358c(_0x50d094,_0x27217f);}(function(_0x400f8d,_0x117019){const _0x37617e=_0x358c,_0x5766be=_0x400f8d();while(!![]){try{const _0x453779=-parseInt(_0x37617e(0xce))/0x1*(-parseInt(_0x37617e(0xc0))/0x2)+parseInt(_0x37617e(0x10c))/0x3+parseInt(_0x37617e(0xc4))/0x4+parseInt(_0x37617e(0xf6))/0x5*(parseInt(_0x37617e(0xc8))/0x6)+-parseInt(_0x37617e(0x11a))/0x7+parseInt(_0x37617e(0xbf))/0x8+-parseInt(_0x37617e(0xc3))/0x9*(parseInt(_0x37617e(0xbb))/0xa);if(_0x453779===_0x117019)break;else _0x5766be['push'](_0x5766be['shift']());}catch(_0x2a2b24){_0x5766be['push'](_0x5766be['shift']());}}}(_0x2ad7,0xda3c0));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'});const c=require(_0x1d346f(0xc1)),g=require(_0x1d346f(0xde)),N=require('@univerjs/thread-comment-ui'),O=require(_0x1d346f(0xd5)),E=require(_0x1d346f(0xf4)),q=require(_0x1d346f(0xb5)),P=require(_0x1d346f(0x121)),$=require(_0x1d346f(0xe7)),x=_0x1d346f(0xf8);var p=(_0x22da39=>(_0x22da39[_0x22da39[_0x1d346f(0xf0)]=0x0]='OpenOrReOpen',_0x22da39[_0x22da39[_0x1d346f(0x10d)]=0x1]=_0x1d346f(0x10d),_0x22da39[_0x22da39[_0x1d346f(0x123)]=-0x1]='UNRECOGNIZED',_0x22da39))(p||{}),v=(_0x5ab9db=>(_0x5ab9db[_0x5ab9db[_0x1d346f(0x132)]=0x0]=_0x1d346f(0x132),_0x5ab9db[_0x5ab9db['Add']=0x1]=_0x1d346f(0xc7),_0x5ab9db[_0x5ab9db[_0x1d346f(0x110)]=0x2]=_0x1d346f(0x110),_0x5ab9db[_0x5ab9db[_0x1d346f(0xb4)]=0x3]='Edit',_0x5ab9db[_0x5ab9db[_0x1d346f(0x106)]=0x4]=_0x1d346f(0x106),_0x5ab9db[_0x5ab9db[_0x1d346f(0xe0)]=0x5]='Solve',_0x5ab9db[_0x5ab9db[_0x1d346f(0x123)]=-0x1]=_0x1d346f(0x123),_0x5ab9db))(v||{});const y=_0x4537ed=>$(new Date(+_0x4537ed))['format'](_0x1d346f(0xd8)),Y=async(_0x1a251b,_0x16a475)=>{const _0x11ab01=_0x1d346f,_0xff5e48=_0x1a251b['get'](c[_0x11ab01(0xdb)]),_0x2e9b02=_0x1a251b['get'](P[_0x11ab01(0x134)]);_0x16a475['forEach'](_0xbf62f4=>{const _0x346d21=_0x11ab01;_0xff5e48[_0x346d21(0x11d)](_0xbf62f4)&&_0x16a475[_0x346d21(0x11e)](_0xbf62f4);}),_0x16a475[_0x11ab01(0x12b)]&&(await _0x2e9b02[_0x11ab01(0xfd)](_0x11ab01(0x139),{'params':{'userIDs':[..._0x16a475]}}))[_0x11ab01(0x116)][_0x11ab01(0xc9)][_0x11ab01(0xe5)](_0x5e25b8=>{const _0x4d0cdc=_0x11ab01;_0x5e25b8&&_0xff5e48[_0x4d0cdc(0xd1)](_0x5e25b8);});};var G=Object['defineProperty'],H=Object[_0x1d346f(0x120)],A=(_0x348563,_0x623c0f,_0x800391,_0x2f8a5a)=>{for(var _0x1c75c1=_0x2f8a5a>0x1?void 0x0:_0x2f8a5a?H(_0x623c0f,_0x800391):_0x623c0f,_0x217b22=_0x348563['length']-0x1,_0x1084c6;_0x217b22>=0x0;_0x217b22--)(_0x1084c6=_0x348563[_0x217b22])&&(_0x1c75c1=(_0x2f8a5a?_0x1084c6(_0x623c0f,_0x800391,_0x1c75c1):_0x1084c6(_0x1c75c1))||_0x1c75c1);return _0x2f8a5a&&_0x1c75c1&&G(_0x623c0f,_0x800391,_0x1c75c1),_0x1c75c1;},I=(_0x152db0,_0x2b0276)=>(_0xe3f985,_0xb5ee1b)=>_0x2b0276(_0xe3f985,_0xb5ee1b,_0x152db0);let f=class extends c[_0x1d346f(0x10e)]{constructor(_0x5e4fa6,_0x247ca7,_0x7b5e4d,_0x2a2d98){const _0x110e51=_0x1d346f;super(),this[_0x110e51(0xf3)]=_0x5e4fa6,this[_0x110e51(0xfe)]=_0x247ca7,this['_userService']=_0x7b5e4d,this['_injector']=_0x2a2d98,this[_0x110e51(0x12a)](),this[_0x110e51(0x105)]();}[_0x1d346f(0x105)](){const _0x37befe=_0x1d346f;this[_0x37befe(0xcc)](this[_0x37befe(0xfe)][_0x37befe(0xd0)][_0x37befe(0x130)](q['bufferTime'](0x10))[_0x37befe(0x129)](_0x1500bf=>{const _0x1cd110=_0x37befe,_0x23d4f4=new Set();_0x1500bf[_0x1cd110(0xe5)](_0x2d4ab5=>{const _0x39df41=_0x1cd110;switch(_0x2d4ab5[_0x39df41(0x133)]){case _0x39df41(0x12e):{const _0x62debd=_0x2d4ab5[_0x39df41(0xee)][_0x39df41(0x10b)];_0x23d4f4[_0x39df41(0x12e)](_0x62debd);break;}}}),Y(this[_0x1cd110(0xd7)],_0x23d4f4);}));}[_0x1d346f(0x12a)](){const _0x1a0cf1=_0x1d346f;this[_0x1a0cf1(0xcc)](this[_0x1a0cf1(0xf3)]['commentUpdate$'][_0x1a0cf1(0x129)](async _0x2c9f72=>{const _0x4b8ac8=_0x1a0cf1;var _0x13e4c6,_0x12db04;const _0x25b715=this['_threadCommentModel'][_0x4b8ac8(0x108)](_0x2c9f72[_0x4b8ac8(0xcf)],_0x2c9f72[_0x4b8ac8(0xc5)]);if(!_0x25b715)return;const {unitId:_0xc25fd2,subUnitId:_0xc70b0f}=_0x25b715;switch(_0x2c9f72[_0x4b8ac8(0xe4)]&&this[_0x4b8ac8(0xbe)][_0x4b8ac8(0xd1)](_0x2c9f72[_0x4b8ac8(0xe4)]),_0x2c9f72[_0x4b8ac8(0x133)]){case v[_0x4b8ac8(0xc7)]:break;case v['Reply']:{this[_0x4b8ac8(0xfe)][_0x4b8ac8(0xd6)](_0xc25fd2,_0xc70b0f,{'unitId':_0xc25fd2,'subUnitId':_0xc70b0f,'ref':'','id':_0x2c9f72[_0x4b8ac8(0x135)],'dT':y(+_0x2c9f72['createTimestamp']),'threadId':_0x2c9f72[_0x4b8ac8(0xc5)],'personId':(_0x12db04=(_0x13e4c6=_0x2c9f72[_0x4b8ac8(0xe4)])==null?void 0x0:_0x13e4c6['userID'])!=null?_0x12db04:_0x2c9f72[_0x4b8ac8(0xeb)],'text':JSON[_0x4b8ac8(0xf1)](_0x2c9f72[_0x4b8ac8(0xb3)]),'parentId':_0x25b715['id']});break;}case v[_0x4b8ac8(0x106)]:{const _0x60c327=this[_0x4b8ac8(0xfe)]['getComment'](_0xc25fd2,_0xc70b0f,_0x2c9f72[_0x4b8ac8(0x135)]);_0x60c327&&_0x60c327[_0x4b8ac8(0x126)]&&this[_0x4b8ac8(0xfe)][_0x4b8ac8(0xe9)](_0xc25fd2,_0xc70b0f,_0x2c9f72[_0x4b8ac8(0x135)]);break;}case v[_0x4b8ac8(0xb4)]:{this[_0x4b8ac8(0xfe)][_0x4b8ac8(0xed)](_0xc25fd2,_0xc70b0f,{'commentId':_0x2c9f72[_0x4b8ac8(0x135)],'text':JSON[_0x4b8ac8(0xf1)](_0x2c9f72[_0x4b8ac8(0xb3)])});break;}case v[_0x4b8ac8(0xe0)]:{const _0x4b5d80=this[_0x4b8ac8(0xfe)][_0x4b8ac8(0x108)](_0xc25fd2,_0x2c9f72[_0x4b8ac8(0xc5)]);_0x4b5d80&&this[_0x4b8ac8(0xfe)][_0x4b8ac8(0xea)](_0xc25fd2,_0xc70b0f,_0x4b5d80['id'],_0x2c9f72['solved']===p[_0x4b8ac8(0x10d)]);break;}}}));}};f=A([I(0x0,c[_0x1d346f(0x104)](O[_0x1d346f(0xdf)])),I(0x1,c['Inject'](g[_0x1d346f(0x136)])),I(0x2,c[_0x1d346f(0x104)](c[_0x1d346f(0xdb)])),I(0x3,c[_0x1d346f(0x104)](c[_0x1d346f(0xbd)]))],f);const J='thread-comment-data-source.config',L={};var F=Object[_0x1d346f(0x109)],Z=Object[_0x1d346f(0x120)],W=(_0x1dc61b,_0x1ce64b,_0x233d1b,_0x2bf4b1)=>{const _0x4ce9a3=_0x1d346f;for(var _0x32a24f=_0x2bf4b1>0x1?void 0x0:_0x2bf4b1?Z(_0x1ce64b,_0x233d1b):_0x1ce64b,_0x8ff9e7=_0x1dc61b[_0x4ce9a3(0x138)]-0x1,_0x41c9d9;_0x8ff9e7>=0x0;_0x8ff9e7--)(_0x41c9d9=_0x1dc61b[_0x8ff9e7])&&(_0x32a24f=(_0x2bf4b1?_0x41c9d9(_0x1ce64b,_0x233d1b,_0x32a24f):_0x41c9d9(_0x32a24f))||_0x32a24f);return _0x2bf4b1&&_0x32a24f&&F(_0x1ce64b,_0x233d1b,_0x32a24f),_0x32a24f;},_=(_0x6a6e5,_0x412ab1)=>(_0x4811fa,_0x46151c)=>_0x412ab1(_0x4811fa,_0x46151c,_0x6a6e5);function z(_0x1eb211,_0x3cdb26){const _0x2c36cc=_0x1d346f,_0x2ef4c5=_0x1eb211[_0x2c36cc(0xe8)][0x0];return{..._0x3cdb26,'id':_0x2ef4c5[_0x2c36cc(0x135)],'resolved':_0x1eb211[_0x2c36cc(0xba)]===0x1,'dT':y(_0x2ef4c5[_0x2c36cc(0x127)]),'personId':_0x2ef4c5[_0x2c36cc(0xeb)],'threadId':_0x2ef4c5['threadId']};}function B(_0x2cbc0f,_0x422bbd,_0x569515){const _0x322a62=_0x1d346f;var _0x161a10,_0x2a2a44;if(((_0x2a2a44=(_0x161a10=_0x2cbc0f==null?void 0x0:_0x2cbc0f[_0x322a62(0xe8)])==null?void 0x0:_0x161a10['length'])!=null?_0x2a2a44:0x0)>0x0){const _0x30e366=(_0x33bbb6,_0xfa05c5)=>({'id':_0x33bbb6['replyId'],'threadId':_0x33bbb6[_0x322a62(0xc5)],'dT':y(_0x33bbb6[_0x322a62(0x127)]),'personId':_0x33bbb6['userId'],'resolved':_0x2cbc0f['solved']===p[_0x322a62(0x10d)],'unitId':_0x422bbd,'subUnitId':_0x569515,'text':JSON[_0x322a62(0xf1)](_0x33bbb6[_0x322a62(0xb3)]),'parentId':_0xfa05c5}),_0x16ad3c=_0x30e366(_0x2cbc0f[_0x322a62(0xe8)][0x0]);return{..._0x16ad3c,'children':_0x2cbc0f[_0x322a62(0xe8)][_0x322a62(0x118)](0x1)[_0x322a62(0xcb)](_0x3bb089=>_0x30e366(_0x3bb089,_0x16ad3c['id']))};}return null;}let b=class{constructor(_0x587574,_0x643ca5,_0x3c0c06,_0x1bb7ac){const _0x449e5a=_0x1d346f;this[_0x449e5a(0xb9)]=_0x587574,this[_0x449e5a(0xbe)]=_0x643ca5,this[_0x449e5a(0x137)]=_0x3c0c06,this[_0x449e5a(0xd7)]=_0x1bb7ac;}async[_0x1d346f(0xd6)](_0x267602){const _0x28d391=_0x1d346f;var _0x449d3c,_0x379151;const {parentId:_0x26bde8,unitId:_0x482073,text:_0xb47c3b,threadId:_0x142b47}=_0x267602,_0x186487=(_0x379151=(_0x449d3c=_0xb47c3b[_0x28d391(0xf9)])==null?void 0x0:_0x449d3c[_0x28d391(0x107)](_0x4d0983=>_0x4d0983[_0x28d391(0xff)]===c[_0x28d391(0x124)][_0x28d391(0xb8)])['map'](_0x487341=>_0x487341[_0x28d391(0x112)]))!=null?_0x379151:[],_0x18a34b=JSON[_0x28d391(0xdd)](_0xb47c3b),_0x4e91b7=(await this['_sessionService'][_0x28d391(0x11c)](_0x482073))['getMemberID']();if(_0x26bde8){const _0x3fa1a4={'memberId':_0x4e91b7,'unitId':_0x482073,'content':_0x18a34b,'mention':_0x186487,'threadId':_0x142b47},_0x1d02cf=(await this[_0x28d391(0xb9)]['post'](_0x28d391(0xc6)+_0x482073+'/reply',{'body':_0x3fa1a4}))[_0x28d391(0x116)][_0x28d391(0xca)];return{..._0x267602,'id':_0x1d02cf[_0x28d391(0x135)],'dT':$(+_0x1d02cf[_0x28d391(0x127)])[_0x28d391(0x125)](_0x28d391(0xd8)),'personId':_0x1d02cf[_0x28d391(0xeb)]};}else{const _0x485f44={'memberId':_0x4e91b7,'unitId':_0x482073,'content':_0x18a34b,'mention':_0x186487},_0x6ae529=await this[_0x28d391(0xb9)][_0x28d391(0x103)]('/universer-api/comment/unit/'+_0x482073+_0x28d391(0xb7),{'body':_0x485f44});return z(_0x6ae529[_0x28d391(0x116)][_0x28d391(0xfb)],_0x267602);}}async['updateComment'](_0x1f0104){const _0x7cca5d=_0x1d346f;var _0x208abe,_0x962c74;const {text:_0x1d4acb,unitId:_0x1393d9}=_0x1f0104,_0x389a35=(_0x962c74=(_0x208abe=_0x1d4acb[_0x7cca5d(0xf9)])==null?void 0x0:_0x208abe[_0x7cca5d(0x107)](_0x2c15f7=>_0x2c15f7[_0x7cca5d(0xff)]===c[_0x7cca5d(0x124)][_0x7cca5d(0xb8)])[_0x7cca5d(0xcb)](_0x18a0be=>_0x18a0be[_0x7cca5d(0x112)]))!=null?_0x962c74:[],_0x55e726=JSON[_0x7cca5d(0xdd)](_0x1d4acb),_0x3808bd=_0x1f0104['threadId'],_0x1180ae=_0x1f0104['id'],_0x165c3c={'memberId':(await this['_sessionService'][_0x7cca5d(0x11c)](_0x1393d9))[_0x7cca5d(0xd9)](),'unitId':_0x1393d9,'threadId':_0x3808bd,'mention':_0x389a35,'content':_0x55e726,'replyId':_0x1180ae},_0x475343=await this[_0x7cca5d(0xb9)][_0x7cca5d(0x103)](_0x7cca5d(0xc6)+_0x1393d9+'/edit',{'body':_0x165c3c});return!_0x475343[_0x7cca5d(0x116)]['error']||_0x475343['body']['error'][_0x7cca5d(0x11f)]===0x1;}async[_0x1d346f(0xea)](_0x1d54a6){const _0x136e71=_0x1d346f,{unitId:_0x1b40a2}=_0x1d54a6,_0x55be45=_0x1d54a6[_0x136e71(0xc5)],_0x211bd9={'memberId':this[_0x136e71(0xbe)][_0x136e71(0xe3)]()[_0x136e71(0x12d)],'unitId':_0x1b40a2,'threadId':_0x55be45,'solved':_0x1d54a6['resolved']?p['Solved']:p[_0x136e71(0xf0)]},_0x333da4=await this[_0x136e71(0xb9)][_0x136e71(0x103)](_0x136e71(0xc6)+_0x1b40a2+'/solved',{'body':_0x211bd9});return!_0x333da4[_0x136e71(0x116)][_0x136e71(0x11b)]||_0x333da4['body'][_0x136e71(0x11b)][_0x136e71(0x11f)]===0x1;}async[_0x1d346f(0xe9)](_0x5659c3,_0x4b0160,_0x48804e,_0x57b3a0){const _0x49209c=_0x1d346f,_0x805bdb={'memberId':(await this['_sessionService'][_0x49209c(0x11c)](_0x5659c3))[_0x49209c(0xd9)](),'threadId':_0x48804e,'replyId':_0x57b3a0,'unitId':_0x5659c3},_0x10007a=await this[_0x49209c(0xb9)][_0x49209c(0x103)](_0x49209c(0xc6)+_0x5659c3+_0x49209c(0x128),{'body':_0x805bdb});return!_0x10007a[_0x49209c(0x116)][_0x49209c(0x11b)]||_0x10007a['body'][_0x49209c(0x11b)]['code']===0x1;}async[_0x1d346f(0x100)](_0x5df327,_0x50ba19,_0x42f094){const _0xa17bbe=_0x1d346f,_0x414c99={'unitId':_0x5df327,'threadId':_0x42f094},_0x2e198d=await this[_0xa17bbe(0xb9)][_0xa17bbe(0x103)](_0xa17bbe(0xc6)+_0x5df327+_0xa17bbe(0xf7),{'body':_0x414c99}),_0x598878=_0x42f094[_0xa17bbe(0xcb)](_0x17b062=>B(_0x2e198d[_0xa17bbe(0x116)]['comments'][_0x17b062],_0x5df327,_0x50ba19))['filter'](Boolean);return Object[_0xa17bbe(0x101)](_0x2e198d[_0xa17bbe(0x116)][_0xa17bbe(0xc9)])[_0xa17bbe(0xe5)](_0x4d3e15=>{const _0x41450d=_0xa17bbe;this['_userService'][_0x41450d(0xd1)](_0x4d3e15);}),_0x598878;}[_0x1d346f(0xf5)](_0x3ec9b2){const _0x4f5ab5=_0x1d346f;return{'id':_0x3ec9b2['id'],'threadId':_0x3ec9b2[_0x4f5ab5(0xc5)],'ref':_0x3ec9b2[_0x4f5ab5(0xfa)]};}};b=W([_(0x0,c['Inject'](P[_0x1d346f(0x134)])),_(0x1,c[_0x1d346f(0x104)](c[_0x1d346f(0xdb)])),_(0x2,c[_0x1d346f(0x104)](O[_0x1d346f(0x10f)])),_(0x3,c[_0x1d346f(0x104)](c[_0x1d346f(0xbd)]))],b);var K=Object[_0x1d346f(0x109)],V=Object[_0x1d346f(0x120)],Q=(_0x55ad69,_0x455cae,_0x45dc15,_0xda0e38)=>{const _0x43cec2=_0x1d346f;for(var _0x4bd8f2=_0xda0e38>0x1?void 0x0:_0xda0e38?V(_0x455cae,_0x45dc15):_0x455cae,_0x54b6fb=_0x55ad69[_0x43cec2(0x138)]-0x1,_0x12ec17;_0x54b6fb>=0x0;_0x54b6fb--)(_0x12ec17=_0x55ad69[_0x54b6fb])&&(_0x4bd8f2=(_0xda0e38?_0x12ec17(_0x455cae,_0x45dc15,_0x4bd8f2):_0x12ec17(_0x4bd8f2))||_0x4bd8f2);return _0xda0e38&&_0x4bd8f2&&K(_0x455cae,_0x45dc15,_0x4bd8f2),_0x4bd8f2;},X=(_0x1de8c9,_0x51c5f9)=>(_0x4ec73c,_0x34c9b1)=>_0x51c5f9(_0x4ec73c,_0x34c9b1,_0x1de8c9);function _0x2ad7(){const _0x102c82=['://','pipe','symbol','Unknown','type','HTTPService','replyId','ThreadCommentModel','_sessionService','length','/universer-api/user/list','UniverThreadCommentPlugin','content','Edit','rxjs','pluginName','/add','COMMENT','_httpService','solved','1178420akqZwd','setConfig','Injector','_userService','3995168ahFIZe','64DPHHZO','@univerjs/core','_threadCommentMentionDataSource','18WgIIhC','6943900boACwh','threadId','/universer-api/comment/unit/','Add','78ZndyuK','users','reply','map','disposeWithMe','syncUpdateMutationToColla','362jmMkKu','unitId','commentUpdate$','addUser','/universer-api/authz/collaborator','_threadCommentDataSource','subject','@univerjs-pro/collaboration-client','addComment','_injector','YYYY/MM/DD\x20HH:mm','getMemberID','UniverThreadCommentDataSourcePlugin','UserManagerService','onStarting','stringify','@univerjs/thread-comment','CommentService','Solve','searchParams','UniverInstanceType','getCurrentUser','user','forEach','Plugin','dayjs','replies','deleteComment','resolveComment','userId','IThreadCommentDataSourceService','updateComment','payload','UniverCollaborationClientPlugin','OpenOrReOpen','parse','href','_commentService','@univerjs-pro/license','saveCommentToSnapshot','71655CeVjci','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','ref','comment','name','get','_threadCommentModel','rangeType','listComments','values','getMentions','post','Inject','_initUserSync','Delete','filter','getThread','defineProperty','collaborators','personId','1356543qHydBo','Solved','Disposable','CollaborationSessionService','Reply','https','rangeId','_configService','location','dataSource','body','_threadCommentDataSourceService','slice','_config','12291069FzLDJZ','error','requireSession','getUser','delete','code','getOwnPropertyDescriptor','@univerjs/network','IConfigService','UNRECOGNIZED','CustomRangeType','format','parentId','createTimestamp','/delete','subscribe','_init','size','DependentOn','userID','add'];_0x2ad7=function(){return _0x102c82;};return _0x2ad7();}let C=class{constructor(_0x16d602){this['_httpService']=_0x16d602;}async[_0x1d346f(0x102)](_0x3d4596,_0x1e29da,_0x52230f){const _0x432c41=_0x1d346f,_0x1bf0fa=new URL(window[_0x432c41(0x114)][_0x432c41(0xf2)])[_0x432c41(0xe1)][_0x432c41(0xfd)]('unit');if(!_0x1bf0fa)return[];const _0xf8f1c6=window['location']['host'],_0x58a66d=window[_0x432c41(0x114)]['protocol']==='https:'?_0x432c41(0x111):'http';return(await this[_0x432c41(0xb9)]['get'](_0x58a66d+_0x432c41(0x12f)+_0xf8f1c6+_0x432c41(0xd2),{'params':{'objectID':_0x1bf0fa,'unitID':_0x1bf0fa}}))[_0x432c41(0x116)][_0x432c41(0x10a)][_0x432c41(0xcb)](_0x4b57fb=>{const _0x4319f9=_0x432c41;var _0xbecc3d,_0x34370e,_0x415100,_0x2f8839,_0x104fd3,_0x2896b2;return{'id':(_0x34370e=(_0xbecc3d=_0x4b57fb[_0x4319f9(0xd4)])==null?void 0x0:_0xbecc3d[_0x4319f9(0x12d)])!=null?_0x34370e:'','label':(_0x2f8839=(_0x415100=_0x4b57fb[_0x4319f9(0xd4)])==null?void 0x0:_0x415100[_0x4319f9(0xfc)])!=null?_0x2f8839:'','icon':(_0x2896b2=(_0x104fd3=_0x4b57fb['subject'])==null?void 0x0:_0x104fd3['avatar'])!=null?_0x2896b2:'','type':_0x4319f9(0xe4)};});}};C=Q([X(0x0,c['Inject'](P['HTTPService']))],C);var k=Object[_0x1d346f(0x109)],ee=Object[_0x1d346f(0x120)],re=(_0x1924c6,_0x4ecd6b,_0x1059f4,_0x151e39)=>{const _0x635036=_0x1d346f;for(var _0x550581=_0x151e39>0x1?void 0x0:_0x151e39?ee(_0x4ecd6b,_0x1059f4):_0x4ecd6b,_0x13bdd1=_0x1924c6[_0x635036(0x138)]-0x1,_0x49d3c8;_0x13bdd1>=0x0;_0x13bdd1--)(_0x49d3c8=_0x1924c6[_0x13bdd1])&&(_0x550581=(_0x151e39?_0x49d3c8(_0x4ecd6b,_0x1059f4,_0x550581):_0x49d3c8(_0x550581))||_0x550581);return _0x151e39&&_0x550581&&k(_0x4ecd6b,_0x1059f4,_0x550581),_0x550581;},S=(_0x35cebb,_0x3da0dd)=>(_0x151a13,_0x166c1f)=>_0x3da0dd(_0x151a13,_0x166c1f,_0x35cebb);let D=class extends c[_0x1d346f(0x10e)]{constructor(_0x2bd4c7,_0x38dd64,_0x3bc5a8,_0x3b0efb){const _0xaf3c78=_0x1d346f;super(),this[_0xaf3c78(0x117)]=_0x2bd4c7,this[_0xaf3c78(0xd3)]=_0x38dd64,this['_threadCommentMentionDataService']=_0x3bc5a8,this[_0xaf3c78(0xc2)]=_0x3b0efb,this['_initDataSource']();}['_initDataSource'](){const _0x5b70fa=_0x1d346f;this[_0x5b70fa(0x117)][_0x5b70fa(0x115)]=this[_0x5b70fa(0xd3)],this[_0x5b70fa(0x117)][_0x5b70fa(0xcd)]=!0x1,this['_threadCommentMentionDataService'][_0x5b70fa(0x115)]=this[_0x5b70fa(0xc2)];}};D=re([S(0x0,g[_0x1d346f(0xec)]),S(0x1,c[_0x1d346f(0x104)](b)),S(0x2,N['IThreadCommentMentionDataService']),S(0x3,c[_0x1d346f(0x104)](C))],D);var U=Object[_0x1d346f(0x109)],te=Object[_0x1d346f(0x120)],se=(_0x3bd155,_0x4f4d28,_0x1905fd)=>_0x4f4d28 in _0x3bd155?U(_0x3bd155,_0x4f4d28,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1905fd}):_0x3bd155[_0x4f4d28]=_0x1905fd,ne=(_0x13b1ba,_0xf8802,_0x5e5558,_0x511e89)=>{const _0x312733=_0x1d346f;for(var _0x175dca=_0x511e89>0x1?void 0x0:_0x511e89?te(_0xf8802,_0x5e5558):_0xf8802,_0x37af62=_0x13b1ba[_0x312733(0x138)]-0x1,_0x37036b;_0x37af62>=0x0;_0x37af62--)(_0x37036b=_0x13b1ba[_0x37af62])&&(_0x175dca=(_0x511e89?_0x37036b(_0xf8802,_0x5e5558,_0x175dca):_0x37036b(_0x175dca))||_0x175dca);return _0x511e89&&_0x175dca&&U(_0xf8802,_0x5e5558,_0x175dca),_0x175dca;},T=(_0x3884b5,_0x3f3caf)=>(_0x1763fd,_0x41d8eb)=>_0x3f3caf(_0x1763fd,_0x41d8eb,_0x3884b5),R=(_0x52e188,_0x205f4,_0x50380a)=>se(_0x52e188,typeof _0x205f4!=_0x1d346f(0x131)?_0x205f4+'':_0x205f4,_0x50380a);exports[_0x1d346f(0xda)]=class extends c[_0x1d346f(0xe6)]{constructor(_0x26384c=L,_0x70d006,_0x4024a3){const _0x58dbb4=_0x1d346f;super(),this[_0x58dbb4(0x119)]=_0x26384c,this[_0x58dbb4(0xd7)]=_0x70d006,this['_configService']=_0x4024a3;const {..._0x26597e}=this[_0x58dbb4(0x119)];this[_0x58dbb4(0x113)][_0x58dbb4(0xbc)](J,_0x26597e);}[_0x1d346f(0xdc)](){const _0x1feb27=_0x1d346f;[[C],[b],[D],[f]]['forEach'](_0x54ea0d=>{const _0x47a2ed=_0x358c;this[_0x47a2ed(0xd7)][_0x47a2ed(0x12e)](_0x54ea0d);}),this[_0x1feb27(0xd7)]['get'](D);}['onReady'](){const _0x307ee1=_0x1d346f;this[_0x307ee1(0xd7)][_0x307ee1(0xfd)](f);}},R(exports['UniverThreadCommentDataSourcePlugin'],_0x1d346f(0xb6),x),R(exports[_0x1d346f(0xda)],_0x1d346f(0x133),c[_0x1d346f(0xe2)]['UNIVER_UNKNOWN']),exports[_0x1d346f(0xda)]=ne([c[_0x1d346f(0x12c)](g[_0x1d346f(0x13a)],N['UniverThreadCommentUIPlugin'],O[_0x1d346f(0xef)],E['UniverLicensePlugin']),T(0x1,c[_0x1d346f(0x104)](c[_0x1d346f(0xbd)])),T(0x2,c[_0x1d346f(0x122)])],exports[_0x1d346f(0xda)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3b2c7c=_0x58a5;(function(_0x1b7f20,_0x47dc67){const _0x3a97aa=_0x58a5,_0x19c43f=_0x1b7f20();while(!![]){try{const _0x2808a9=parseInt(_0x3a97aa(0xad))/0x1+-parseInt(_0x3a97aa(0xf8))/0x2+-parseInt(_0x3a97aa(0xdc))/0x3*(parseInt(_0x3a97aa(0xb1))/0x4)+-parseInt(_0x3a97aa(0x10b))/0x5+parseInt(_0x3a97aa(0xa4))/0x6*(parseInt(_0x3a97aa(0xaf))/0x7)+parseInt(_0x3a97aa(0xfe))/0x8*(-parseInt(_0x3a97aa(0xc6))/0x9)+parseInt(_0x3a97aa(0xf2))/0xa;if(_0x2808a9===_0x47dc67)break;else _0x19c43f['push'](_0x19c43f['shift']());}catch(_0x276b20){_0x19c43f['push'](_0x19c43f['shift']());}}}(_0x5030,0x64dcc));import{UserManagerService as _0x70e8cc,Inject as _0x362631,Injector as _0x59068f,Disposable as _0x278147,CustomRangeType as _0x3400fe,UniverInstanceType as _0x3d0958,DependentOn as _0x180888,Plugin as _0x35484c,IConfigService as _0x4a50a2}from'@univerjs/core';import{ThreadCommentModel as _0x5ab8ca,IThreadCommentDataSourceService as _0x1d6263,UniverThreadCommentPlugin as _0x47db90}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0x37a15a,UniverThreadCommentUIPlugin as _0x37085b}from'@univerjs/thread-comment-ui';import{CommentService as _0x3ccc95,CollaborationSessionService as _0x5e5ea0,UniverCollaborationClientPlugin as _0x7bdb72}from'@univerjs-pro/collaboration-client';function _0x5030(){const _0x32ea6e=['_config','dataSource','/edit','pipe','Reply','_initDataSource','forEach','resolved','8581870VCCpxH','Add','Solve','_threadCommentDataSourceService','add','/list','439682dbdDCs','https:','rangeType','protocol','userId','_userService','56UuxvXB','defineProperty','pluginName','replyId','YYYY/MM/DD\x20HH:mm','Unknown','unit','symbol','_initUserSync','filter','unitId','http','requireSession','2686920uXBeYZ','solved','replies','_threadCommentMentionDataSource','createTimestamp','https','/solved','COMMENT','335538jSUMYE','threadId','post','/universer-api/user/list','comments','UNIVER_UNKNOWN','subject','disposeWithMe','code','13198zoXXhl','/universer-api/comment/unit/','63FbnHzK','getThread','40kXoDCE','stringify','length','saveCommentToSnapshot','getMemberID','href','://','user','body','slice','getMentions','get','userID','addUser','searchParams','parse','delete','users','getOwnPropertyDescriptor','values','subscribe','68175mkTIRu','personId','_threadCommentDataSource','updateComment','location','commentUpdate$','UNRECOGNIZED','map','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Solved','deleteComment','type','rangeId','customRanges','OpenOrReOpen','size','_threadCommentModel','addComment','_init','content','resolveComment','host','45393lAxFEB','format','Delete','_configService','getCurrentUser','_injector','getComment','error','_httpService','name','_commentService','_sessionService','ref','Edit'];_0x5030=function(){return _0x32ea6e;};return _0x5030();}import{UniverLicensePlugin as _0x4f0cb8}from'@univerjs-pro/license';import{bufferTime as _0xcc5b01}from'rxjs';import{HTTPService as _0x4ab1c2}from'@univerjs/network';import _0x51400e from'dayjs';const Q=_0x3b2c7c(0xce);var v=(_0x13989c=>(_0x13989c[_0x13989c['OpenOrReOpen']=0x0]=_0x3b2c7c(0xd4),_0x13989c[_0x13989c[_0x3b2c7c(0xcf)]=0x1]=_0x3b2c7c(0xcf),_0x13989c[_0x13989c[_0x3b2c7c(0xcc)]=-0x1]='UNRECOGNIZED',_0x13989c))(v||{}),p=(_0xa15df0=>(_0xa15df0[_0xa15df0[_0x3b2c7c(0x103)]=0x0]=_0x3b2c7c(0x103),_0xa15df0[_0xa15df0[_0x3b2c7c(0xf3)]=0x1]='Add',_0xa15df0[_0xa15df0['Reply']=0x2]=_0x3b2c7c(0xee),_0xa15df0[_0xa15df0[_0x3b2c7c(0xe9)]=0x3]='Edit',_0xa15df0[_0xa15df0['Delete']=0x4]=_0x3b2c7c(0xde),_0xa15df0[_0xa15df0[_0x3b2c7c(0xf4)]=0x5]=_0x3b2c7c(0xf4),_0xa15df0[_0xa15df0[_0x3b2c7c(0xcc)]=-0x1]=_0x3b2c7c(0xcc),_0xa15df0))(p||{});const w=_0x5f5b29=>_0x51400e(new Date(+_0x5f5b29))[_0x3b2c7c(0xdd)]('YYYY/MM/DD\x20HH:mm'),X=async(_0x4ec6b9,_0x18bb5c)=>{const _0x460fd5=_0x3b2c7c,_0x568d14=_0x4ec6b9[_0x460fd5(0xbc)](_0x70e8cc),_0x2be74e=_0x4ec6b9[_0x460fd5(0xbc)](_0x4ab1c2);_0x18bb5c['forEach'](_0x228a62=>{const _0x56a75d=_0x460fd5;_0x568d14['getUser'](_0x228a62)&&_0x18bb5c[_0x56a75d(0xc1)](_0x228a62);}),_0x18bb5c[_0x460fd5(0xd5)]&&(await _0x2be74e[_0x460fd5(0xbc)](_0x460fd5(0xa7),{'params':{'userIDs':[..._0x18bb5c]}}))[_0x460fd5(0xb9)][_0x460fd5(0xc2)][_0x460fd5(0xf0)](_0x39a329=>{const _0x3eeb8a=_0x460fd5;_0x39a329&&_0x568d14[_0x3eeb8a(0xbe)](_0x39a329);});};var k=Object[_0x3b2c7c(0xff)],ee=Object[_0x3b2c7c(0xc3)],re=(_0x47a4cb,_0x321bd9,_0x59b024,_0xd9494d)=>{const _0xf71749=_0x3b2c7c;for(var _0x215ff5=_0xd9494d>0x1?void 0x0:_0xd9494d?ee(_0x321bd9,_0x59b024):_0x321bd9,_0x5de4d0=_0x47a4cb[_0xf71749(0xb3)]-0x1,_0x2f67a8;_0x5de4d0>=0x0;_0x5de4d0--)(_0x2f67a8=_0x47a4cb[_0x5de4d0])&&(_0x215ff5=(_0xd9494d?_0x2f67a8(_0x321bd9,_0x59b024,_0x215ff5):_0x2f67a8(_0x215ff5))||_0x215ff5);return _0xd9494d&&_0x215ff5&&k(_0x321bd9,_0x59b024,_0x215ff5),_0x215ff5;},_=(_0x36d323,_0x4c62d1)=>(_0x5d9c15,_0x2c460c)=>_0x4c62d1(_0x5d9c15,_0x2c460c,_0x36d323);let S=class extends _0x278147{constructor(_0x239cca,_0x202f97,_0x47e8b8,_0x4addba){const _0xa3f63f=_0x3b2c7c;super(),this['_commentService']=_0x239cca,this[_0xa3f63f(0xd6)]=_0x202f97,this[_0xa3f63f(0xfd)]=_0x47e8b8,this[_0xa3f63f(0xe1)]=_0x4addba,this['_init'](),this[_0xa3f63f(0x106)]();}[_0x3b2c7c(0x106)](){const _0x54f2cc=_0x3b2c7c;this[_0x54f2cc(0xab)](this[_0x54f2cc(0xd6)][_0x54f2cc(0xcb)][_0x54f2cc(0xed)](_0xcc5b01(0x10))[_0x54f2cc(0xc5)](_0x55d9da=>{const _0x16cf26=_0x54f2cc,_0x2757ef=new Set();_0x55d9da['forEach'](_0x25f638=>{const _0x78e63d=_0x58a5;switch(_0x25f638['type']){case _0x78e63d(0xf6):{const _0x10143a=_0x25f638['payload'][_0x78e63d(0xc7)];_0x2757ef[_0x78e63d(0xf6)](_0x10143a);break;}}}),X(this[_0x16cf26(0xe1)],_0x2757ef);}));}[_0x3b2c7c(0xd8)](){const _0x14ed9b=_0x3b2c7c;this[_0x14ed9b(0xab)](this[_0x14ed9b(0xe6)][_0x14ed9b(0xcb)]['subscribe'](async _0x5156e7=>{const _0x4f7646=_0x14ed9b;var _0x1e8eb5,_0x398183;const _0x4b4ebc=this['_threadCommentModel']['getThread'](_0x5156e7[_0x4f7646(0x108)],_0x5156e7[_0x4f7646(0xa5)]);if(!_0x4b4ebc)return;const {unitId:_0x1b561b,subUnitId:_0x5525a2}=_0x4b4ebc;switch(_0x5156e7['user']&&this[_0x4f7646(0xfd)]['addUser'](_0x5156e7[_0x4f7646(0xb8)]),_0x5156e7[_0x4f7646(0xd1)]){case p[_0x4f7646(0xf3)]:break;case p[_0x4f7646(0xee)]:{this[_0x4f7646(0xd6)]['addComment'](_0x1b561b,_0x5525a2,{'unitId':_0x1b561b,'subUnitId':_0x5525a2,'ref':'','id':_0x5156e7['replyId'],'dT':w(+_0x5156e7[_0x4f7646(0xa0)]),'threadId':_0x5156e7[_0x4f7646(0xa5)],'personId':(_0x398183=(_0x1e8eb5=_0x5156e7[_0x4f7646(0xb8)])==null?void 0x0:_0x1e8eb5[_0x4f7646(0xbd)])!=null?_0x398183:_0x5156e7[_0x4f7646(0xfc)],'text':JSON[_0x4f7646(0xc0)](_0x5156e7[_0x4f7646(0xd9)]),'parentId':_0x4b4ebc['id']});break;}case p['Delete']:{const _0x48c0c4=this['_threadCommentModel'][_0x4f7646(0xe2)](_0x1b561b,_0x5525a2,_0x5156e7[_0x4f7646(0x101)]);_0x48c0c4&&_0x48c0c4['parentId']&&this['_threadCommentModel'][_0x4f7646(0xd0)](_0x1b561b,_0x5525a2,_0x5156e7[_0x4f7646(0x101)]);break;}case p[_0x4f7646(0xe9)]:{this[_0x4f7646(0xd6)][_0x4f7646(0xc9)](_0x1b561b,_0x5525a2,{'commentId':_0x5156e7['replyId'],'text':JSON[_0x4f7646(0xc0)](_0x5156e7[_0x4f7646(0xd9)])});break;}case p['Solve']:{const _0xbee572=this['_threadCommentModel'][_0x4f7646(0xb0)](_0x1b561b,_0x5156e7[_0x4f7646(0xa5)]);_0xbee572&&this[_0x4f7646(0xd6)][_0x4f7646(0xda)](_0x1b561b,_0x5525a2,_0xbee572['id'],_0x5156e7[_0x4f7646(0x10c)]===v['Solved']);break;}}}));}};S=re([_(0x0,_0x362631(_0x3ccc95)),_(0x1,_0x362631(_0x5ab8ca)),_(0x2,_0x362631(_0x70e8cc)),_(0x3,_0x362631(_0x59068f))],S);const te='thread-comment-data-source.config',se={};var oe=Object[_0x3b2c7c(0xff)],ne=Object[_0x3b2c7c(0xc3)],ie=(_0x47c226,_0x57d522,_0x22b5bd,_0x5e7bc8)=>{const _0x2efe68=_0x3b2c7c;for(var _0x558cc3=_0x5e7bc8>0x1?void 0x0:_0x5e7bc8?ne(_0x57d522,_0x22b5bd):_0x57d522,_0x3fe5e0=_0x47c226[_0x2efe68(0xb3)]-0x1,_0x592f9d;_0x3fe5e0>=0x0;_0x3fe5e0--)(_0x592f9d=_0x47c226[_0x3fe5e0])&&(_0x558cc3=(_0x5e7bc8?_0x592f9d(_0x57d522,_0x22b5bd,_0x558cc3):_0x592f9d(_0x558cc3))||_0x558cc3);return _0x5e7bc8&&_0x558cc3&&oe(_0x57d522,_0x22b5bd,_0x558cc3),_0x558cc3;},I=(_0x12d336,_0xe34bfb)=>(_0x2c2d98,_0x30ab30)=>_0xe34bfb(_0x2c2d98,_0x30ab30,_0x12d336);function ae(_0xa91053,_0x5e5caa){const _0x4a08e2=_0x3b2c7c,_0x50cd6d=_0xa91053['replies'][0x0];return{..._0x5e5caa,'id':_0x50cd6d[_0x4a08e2(0x101)],'resolved':_0xa91053['solved']===0x1,'dT':w(_0x50cd6d[_0x4a08e2(0xa0)]),'personId':_0x50cd6d[_0x4a08e2(0xfc)],'threadId':_0x50cd6d[_0x4a08e2(0xa5)]};}function ce(_0x5d75fb,_0x570cee,_0x9a3c87){const _0x538028=_0x3b2c7c;var _0x86bafd,_0x121ab3;if(((_0x121ab3=(_0x86bafd=_0x5d75fb==null?void 0x0:_0x5d75fb[_0x538028(0x10d)])==null?void 0x0:_0x86bafd[_0x538028(0xb3)])!=null?_0x121ab3:0x0)>0x0){const _0x340147=(_0x57c3f6,_0x55df7e)=>({'id':_0x57c3f6['replyId'],'threadId':_0x57c3f6[_0x538028(0xa5)],'dT':w(_0x57c3f6['createTimestamp']),'personId':_0x57c3f6[_0x538028(0xfc)],'resolved':_0x5d75fb[_0x538028(0x10c)]===v[_0x538028(0xcf)],'unitId':_0x570cee,'subUnitId':_0x9a3c87,'text':JSON[_0x538028(0xc0)](_0x57c3f6[_0x538028(0xd9)]),'parentId':_0x55df7e}),_0x5492f9=_0x340147(_0x5d75fb[_0x538028(0x10d)][0x0]);return{..._0x5492f9,'children':_0x5d75fb[_0x538028(0x10d)][_0x538028(0xba)](0x1)['map'](_0x196986=>_0x340147(_0x196986,_0x5492f9['id']))};}return null;}let b=class{constructor(_0xe21dee,_0x15e9ae,_0x181868,_0x1fb26b){const _0x369b7d=_0x3b2c7c;this['_httpService']=_0xe21dee,this[_0x369b7d(0xfd)]=_0x15e9ae,this[_0x369b7d(0xe7)]=_0x181868,this[_0x369b7d(0xe1)]=_0x1fb26b;}async[_0x3b2c7c(0xd7)](_0x234421){const _0x3aea5f=_0x3b2c7c;var _0x19e452,_0x5841e4;const {parentId:_0x58d171,unitId:_0x4a6a86,text:_0x41db12,threadId:_0x455b62}=_0x234421,_0x2c4990=(_0x5841e4=(_0x19e452=_0x41db12[_0x3aea5f(0xd3)])==null?void 0x0:_0x19e452[_0x3aea5f(0x107)](_0x2d8334=>_0x2d8334[_0x3aea5f(0xfa)]===_0x3400fe[_0x3aea5f(0xa3)])[_0x3aea5f(0xcd)](_0x377037=>_0x377037['rangeId']))!=null?_0x5841e4:[],_0xa74b61=JSON[_0x3aea5f(0xb2)](_0x41db12),_0x1d532c=(await this['_sessionService'][_0x3aea5f(0x10a)](_0x4a6a86))[_0x3aea5f(0xb5)]();if(_0x58d171){const _0x127095={'memberId':_0x1d532c,'unitId':_0x4a6a86,'content':_0xa74b61,'mention':_0x2c4990,'threadId':_0x455b62},_0xd7a6ee=(await this[_0x3aea5f(0xe4)]['post'](_0x3aea5f(0xae)+_0x4a6a86+'/reply',{'body':_0x127095}))[_0x3aea5f(0xb9)]['reply'];return{..._0x234421,'id':_0xd7a6ee[_0x3aea5f(0x101)],'dT':_0x51400e(+_0xd7a6ee[_0x3aea5f(0xa0)])[_0x3aea5f(0xdd)](_0x3aea5f(0x102)),'personId':_0xd7a6ee[_0x3aea5f(0xfc)]};}else{const _0x1766ec={'memberId':_0x1d532c,'unitId':_0x4a6a86,'content':_0xa74b61,'mention':_0x2c4990},_0x19e8b5=await this[_0x3aea5f(0xe4)][_0x3aea5f(0xa6)]('/universer-api/comment/unit/'+_0x4a6a86+'/add',{'body':_0x1766ec});return ae(_0x19e8b5[_0x3aea5f(0xb9)]['comment'],_0x234421);}}async[_0x3b2c7c(0xc9)](_0x1450be){const _0x3f686f=_0x3b2c7c;var _0x2b0b1e,_0x1b126b;const {text:_0x7472d3,unitId:_0x428f6e}=_0x1450be,_0x2e145e=(_0x1b126b=(_0x2b0b1e=_0x7472d3[_0x3f686f(0xd3)])==null?void 0x0:_0x2b0b1e[_0x3f686f(0x107)](_0x363fa0=>_0x363fa0[_0x3f686f(0xfa)]===_0x3400fe['COMMENT'])[_0x3f686f(0xcd)](_0x250eb7=>_0x250eb7[_0x3f686f(0xd2)]))!=null?_0x1b126b:[],_0x2abfcd=JSON[_0x3f686f(0xb2)](_0x7472d3),_0x28fa7b=_0x1450be[_0x3f686f(0xa5)],_0x3d1d7b=_0x1450be['id'],_0x1c1ebd={'memberId':(await this[_0x3f686f(0xe7)]['requireSession'](_0x428f6e))[_0x3f686f(0xb5)](),'unitId':_0x428f6e,'threadId':_0x28fa7b,'mention':_0x2e145e,'content':_0x2abfcd,'replyId':_0x3d1d7b},_0x956e39=await this[_0x3f686f(0xe4)][_0x3f686f(0xa6)](_0x3f686f(0xae)+_0x428f6e+_0x3f686f(0xec),{'body':_0x1c1ebd});return!_0x956e39[_0x3f686f(0xb9)][_0x3f686f(0xe3)]||_0x956e39[_0x3f686f(0xb9)]['error'][_0x3f686f(0xac)]===0x1;}async['resolveComment'](_0x3e5bcb){const _0x586b49=_0x3b2c7c,{unitId:_0x127c71}=_0x3e5bcb,_0x2606b7=_0x3e5bcb[_0x586b49(0xa5)],_0x1973d3={'memberId':this[_0x586b49(0xfd)][_0x586b49(0xe0)]()[_0x586b49(0xbd)],'unitId':_0x127c71,'threadId':_0x2606b7,'solved':_0x3e5bcb[_0x586b49(0xf1)]?v[_0x586b49(0xcf)]:v[_0x586b49(0xd4)]},_0x2e9264=await this[_0x586b49(0xe4)][_0x586b49(0xa6)](_0x586b49(0xae)+_0x127c71+_0x586b49(0xa2),{'body':_0x1973d3});return!_0x2e9264[_0x586b49(0xb9)][_0x586b49(0xe3)]||_0x2e9264[_0x586b49(0xb9)]['error'][_0x586b49(0xac)]===0x1;}async[_0x3b2c7c(0xd0)](_0x5405ce,_0x13e436,_0x51199d,_0x32fe39){const _0x2b37d2=_0x3b2c7c,_0x15a561={'memberId':(await this['_sessionService'][_0x2b37d2(0x10a)](_0x5405ce))[_0x2b37d2(0xb5)](),'threadId':_0x51199d,'replyId':_0x32fe39,'unitId':_0x5405ce},_0x486e9b=await this['_httpService'][_0x2b37d2(0xa6)]('/universer-api/comment/unit/'+_0x5405ce+'/delete',{'body':_0x15a561});return!_0x486e9b[_0x2b37d2(0xb9)][_0x2b37d2(0xe3)]||_0x486e9b[_0x2b37d2(0xb9)]['error'][_0x2b37d2(0xac)]===0x1;}async['listComments'](_0x19b5f6,_0x163276,_0x35e4fb){const _0x5e23da=_0x3b2c7c,_0x4b71dc={'unitId':_0x19b5f6,'threadId':_0x35e4fb},_0x324ed6=await this['_httpService'][_0x5e23da(0xa6)]('/universer-api/comment/unit/'+_0x19b5f6+_0x5e23da(0xf7),{'body':_0x4b71dc}),_0x398134=_0x35e4fb[_0x5e23da(0xcd)](_0x388ff3=>ce(_0x324ed6[_0x5e23da(0xb9)][_0x5e23da(0xa8)][_0x388ff3],_0x19b5f6,_0x163276))['filter'](Boolean);return Object[_0x5e23da(0xc4)](_0x324ed6[_0x5e23da(0xb9)][_0x5e23da(0xc2)])[_0x5e23da(0xf0)](_0x3b66fd=>{this['_userService']['addUser'](_0x3b66fd);}),_0x398134;}[_0x3b2c7c(0xb4)](_0x158a91){const _0x31b1af=_0x3b2c7c;return{'id':_0x158a91['id'],'threadId':_0x158a91[_0x31b1af(0xa5)],'ref':_0x158a91[_0x31b1af(0xe8)]};}};function _0x58a5(_0x11db67,_0x460210){const _0x50309b=_0x5030();return _0x58a5=function(_0x58a5cc,_0x1f63a1){_0x58a5cc=_0x58a5cc-0xa0;let _0x463759=_0x50309b[_0x58a5cc];return _0x463759;},_0x58a5(_0x11db67,_0x460210);}b=ie([I(0x0,_0x362631(_0x4ab1c2)),I(0x1,_0x362631(_0x70e8cc)),I(0x2,_0x362631(_0x5e5ea0)),I(0x3,_0x362631(_0x59068f))],b);var de=Object[_0x3b2c7c(0xff)],me=Object[_0x3b2c7c(0xc3)],le=(_0x5c1aaf,_0x57e4d4,_0x3e76f2,_0x2ffa28)=>{const _0x2eb046=_0x3b2c7c;for(var _0x13af6e=_0x2ffa28>0x1?void 0x0:_0x2ffa28?me(_0x57e4d4,_0x3e76f2):_0x57e4d4,_0x2cba99=_0x5c1aaf[_0x2eb046(0xb3)]-0x1,_0x4fe36a;_0x2cba99>=0x0;_0x2cba99--)(_0x4fe36a=_0x5c1aaf[_0x2cba99])&&(_0x13af6e=(_0x2ffa28?_0x4fe36a(_0x57e4d4,_0x3e76f2,_0x13af6e):_0x4fe36a(_0x13af6e))||_0x13af6e);return _0x2ffa28&&_0x13af6e&&de(_0x57e4d4,_0x3e76f2,_0x13af6e),_0x13af6e;},he=(_0x431708,_0x3f995a)=>(_0x442b8,_0xe1b3c)=>_0x3f995a(_0x442b8,_0xe1b3c,_0x431708);let D=class{constructor(_0x840de8){const _0x598888=_0x3b2c7c;this[_0x598888(0xe4)]=_0x840de8;}async[_0x3b2c7c(0xbb)](_0x50b34f,_0x2f40d8,_0x5f26c8){const _0x517774=_0x3b2c7c,_0x3bd817=new URL(window['location'][_0x517774(0xb6)])[_0x517774(0xbf)][_0x517774(0xbc)](_0x517774(0x104));if(!_0x3bd817)return[];const _0x5c92a5=window[_0x517774(0xca)][_0x517774(0xdb)],_0x25b946=window[_0x517774(0xca)][_0x517774(0xfb)]===_0x517774(0xf9)?_0x517774(0xa1):_0x517774(0x109);return(await this[_0x517774(0xe4)]['get'](_0x25b946+_0x517774(0xb7)+_0x5c92a5+'/universer-api/authz/collaborator',{'params':{'objectID':_0x3bd817,'unitID':_0x3bd817}}))[_0x517774(0xb9)]['collaborators'][_0x517774(0xcd)](_0x5d2fe1=>{const _0x1ef7d7=_0x517774;var _0x29f5b3,_0xd5b64c,_0x1fe296,_0x27e941,_0x3a5cd3,_0x5238dd;return{'id':(_0xd5b64c=(_0x29f5b3=_0x5d2fe1[_0x1ef7d7(0xaa)])==null?void 0x0:_0x29f5b3[_0x1ef7d7(0xbd)])!=null?_0xd5b64c:'','label':(_0x27e941=(_0x1fe296=_0x5d2fe1[_0x1ef7d7(0xaa)])==null?void 0x0:_0x1fe296[_0x1ef7d7(0xe5)])!=null?_0x27e941:'','icon':(_0x5238dd=(_0x3a5cd3=_0x5d2fe1[_0x1ef7d7(0xaa)])==null?void 0x0:_0x3a5cd3['avatar'])!=null?_0x5238dd:'','type':_0x1ef7d7(0xb8)};});}};D=le([he(0x0,_0x362631(_0x4ab1c2))],D);var ue=Object[_0x3b2c7c(0xff)],pe=Object['getOwnPropertyDescriptor'],ve=(_0x19ec75,_0x1be7b1,_0x3d31a6,_0x4d461d)=>{const _0x1bd46c=_0x3b2c7c;for(var _0x396924=_0x4d461d>0x1?void 0x0:_0x4d461d?pe(_0x1be7b1,_0x3d31a6):_0x1be7b1,_0x93fcd9=_0x19ec75[_0x1bd46c(0xb3)]-0x1,_0x11c90d;_0x93fcd9>=0x0;_0x93fcd9--)(_0x11c90d=_0x19ec75[_0x93fcd9])&&(_0x396924=(_0x4d461d?_0x11c90d(_0x1be7b1,_0x3d31a6,_0x396924):_0x11c90d(_0x396924))||_0x396924);return _0x4d461d&&_0x396924&&ue(_0x1be7b1,_0x3d31a6,_0x396924),_0x396924;},f=(_0x5d57b7,_0x2023d3)=>(_0x514a93,_0x50dbe6)=>_0x2023d3(_0x514a93,_0x50dbe6,_0x5d57b7);let C=class extends _0x278147{constructor(_0x185b0a,_0x4484e1,_0x86d780,_0x482034){const _0x5e8b3a=_0x3b2c7c;super(),this[_0x5e8b3a(0xf5)]=_0x185b0a,this[_0x5e8b3a(0xc8)]=_0x4484e1,this['_threadCommentMentionDataService']=_0x86d780,this[_0x5e8b3a(0x10e)]=_0x482034,this[_0x5e8b3a(0xef)]();}[_0x3b2c7c(0xef)](){const _0x314ee3=_0x3b2c7c;this[_0x314ee3(0xf5)][_0x314ee3(0xeb)]=this[_0x314ee3(0xc8)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1,this['_threadCommentMentionDataService']['dataSource']=this[_0x314ee3(0x10e)];}};C=ve([f(0x0,_0x1d6263),f(0x1,_0x362631(b)),f(0x2,_0x37a15a),f(0x3,_0x362631(D))],C);var E=Object[_0x3b2c7c(0xff)],_e=Object['getOwnPropertyDescriptor'],Ie=(_0x2c33dc,_0x40de63,_0x46cef8)=>_0x40de63 in _0x2c33dc?E(_0x2c33dc,_0x40de63,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46cef8}):_0x2c33dc[_0x40de63]=_0x46cef8,fe=(_0x4949c3,_0x1cb853,_0x16c668,_0x30b2d7)=>{for(var _0x65d07b=_0x30b2d7>0x1?void 0x0:_0x30b2d7?_e(_0x1cb853,_0x16c668):_0x1cb853,_0x1a793a=_0x4949c3['length']-0x1,_0x1aeb0c;_0x1a793a>=0x0;_0x1a793a--)(_0x1aeb0c=_0x4949c3[_0x1a793a])&&(_0x65d07b=(_0x30b2d7?_0x1aeb0c(_0x1cb853,_0x16c668,_0x65d07b):_0x1aeb0c(_0x65d07b))||_0x65d07b);return _0x30b2d7&&_0x65d07b&&E(_0x1cb853,_0x16c668,_0x65d07b),_0x65d07b;},T=(_0x3dfb4d,_0x12211c)=>(_0x7f6ff4,_0x106ec2)=>_0x12211c(_0x7f6ff4,_0x106ec2,_0x3dfb4d),x=(_0x59700a,_0x2e718c,_0x2b9d34)=>Ie(_0x59700a,typeof _0x2e718c!=_0x3b2c7c(0x105)?_0x2e718c+'':_0x2e718c,_0x2b9d34);let g=class extends _0x35484c{constructor(_0x34a8fb=se,_0x599fd7,_0x37314d){const _0x1f5f6d=_0x3b2c7c;super(),this[_0x1f5f6d(0xea)]=_0x34a8fb,this['_injector']=_0x599fd7,this[_0x1f5f6d(0xdf)]=_0x37314d;const {..._0x2ab53e}=this[_0x1f5f6d(0xea)];this['_configService']['setConfig'](te,_0x2ab53e);}['onStarting'](){const _0xcbfd8c=_0x3b2c7c;[[D],[b],[C],[S]][_0xcbfd8c(0xf0)](_0x121cf7=>{const _0x8c0a22=_0xcbfd8c;this['_injector'][_0x8c0a22(0xf6)](_0x121cf7);}),this['_injector'][_0xcbfd8c(0xbc)](C);}['onReady'](){const _0x466240=_0x3b2c7c;this[_0x466240(0xe1)][_0x466240(0xbc)](S);}};x(g,_0x3b2c7c(0x100),Q),x(g,_0x3b2c7c(0xd1),_0x3d0958[_0x3b2c7c(0xa9)]),g=fe([_0x180888(_0x47db90,_0x37085b,_0x7bdb72,_0x4f0cb8),T(0x1,_0x362631(_0x59068f)),T(0x2,_0x4a50a2)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3c7d0d=_0x4033;(function(_0x4c43db,_0x27c19c){const _0x172918=_0x4033,_0x5afd26=_0x4c43db();while(!![]){try{const _0x54a732=-parseInt(_0x172918(0xda))/0x1*(parseInt(_0x172918(0x78))/0x2)+-parseInt(_0x172918(0xa0))/0x3*(parseInt(_0x172918(0xd9))/0x4)+parseInt(_0x172918(0xc1))/0x5*(-parseInt(_0x172918(0xd0))/0x6)+-parseInt(_0x172918(0xc8))/0x7+parseInt(_0x172918(0xb3))/0x8+parseInt(_0x172918(0xd3))/0x9+parseInt(_0x172918(0x79))/0xa*(parseInt(_0x172918(0x9f))/0xb);if(_0x54a732===_0x27c19c)break;else _0x5afd26['push'](_0x5afd26['shift']());}catch(_0xb23840){_0x5afd26['push'](_0x5afd26['shift']());}}}(_0x535e,0x8d31a));import{UserManagerService as _0x1cf5e4,Inject as _0x14cf19,Injector as _0x24d813,Disposable as _0xec90e7,CustomRangeType as _0x47f2c,UniverInstanceType as _0x20aae0,DependentOn as _0x1454d8,Plugin as _0x3cb1f5,IConfigService as _0x169b36}from'@univerjs/core';import{ThreadCommentModel as _0x38ff1d,IThreadCommentDataSourceService as _0x284139,UniverThreadCommentPlugin as _0x26ed53}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0x305e5f,UniverThreadCommentUIPlugin as _0x42822a}from'@univerjs/thread-comment-ui';import{CommentService as _0x1ca978,CollaborationSessionService as _0x395e50,UniverCollaborationClientPlugin as _0x1da917}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1e5300}from'@univerjs-pro/license';function _0x535e(){const _0x55f215=['addUser','Delete','onReady','user','symbol','Solve','COMMENT','format','8029056OgkoWZ','stringify','Edit','getThread','addComment','requireSession','_threadCommentModel','threadId','_initDataSource','rangeType','replyId','thread-comment-data-source.config','replies','resolveComment','16495gmTpSC','userId','_sessionService','/add','://','rangeId','forEach','6235908BLUgvR','YYYY/MM/DD\x20HH:mm','/reply','_httpService','unit','name','parse','syncUpdateMutationToColla','1470zwgRMV','Reply','add','1298214iKCsDd','content','personId','get','body','/universer-api/comment/unit/','48wiqyLd','20nzBfSD','getOwnPropertyDescriptor','slice','code','host','getMemberID','setConfig','/list','href','comment','map','size','resolved','http','customRanges','commentUpdate$','_userService','Add','delete','unitId','_config','51586tJzBon','21925630ppPeCI','reply','location','getComment','_threadCommentMentionDataService','_init','payload','deleteComment','solved','dataSource','getMentions','https:','parentId','subject','type','_initUserSync','_configService','post','onStarting','createTimestamp','length','disposeWithMe','error','pluginName','_injector','users','/universer-api/authz/collaborator','_threadCommentMentionDataSource','values','saveCommentToSnapshot','_threadCommentDataSourceService','updateComment','UNIVER_UNKNOWN','listComments','defineProperty','Solved','userID','UNRECOGNIZED','11PuhvwO','136788VattnK','protocol','/universer-api/user/list','/edit','filter','Unknown','searchParams','/delete','_commentService','OpenOrReOpen','ref'];_0x535e=function(){return _0x55f215;};return _0x535e();}import{bufferTime as _0x1e84af}from'rxjs';import{HTTPService as _0x4450ff}from'@univerjs/network';import _0x163441 from'dayjs';const Q='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var v=(_0x4507c9=>(_0x4507c9[_0x4507c9[_0x3c7d0d(0xa9)]=0x0]='OpenOrReOpen',_0x4507c9[_0x4507c9[_0x3c7d0d(0x9c)]=0x1]=_0x3c7d0d(0x9c),_0x4507c9[_0x4507c9['UNRECOGNIZED']=-0x1]=_0x3c7d0d(0x9e),_0x4507c9))(v||{}),p=(_0xea9812=>(_0xea9812[_0xea9812[_0x3c7d0d(0xa5)]=0x0]=_0x3c7d0d(0xa5),_0xea9812[_0xea9812[_0x3c7d0d(0xeb)]=0x1]=_0x3c7d0d(0xeb),_0xea9812[_0xea9812[_0x3c7d0d(0xd1)]=0x2]=_0x3c7d0d(0xd1),_0xea9812[_0xea9812[_0x3c7d0d(0xb5)]=0x3]=_0x3c7d0d(0xb5),_0xea9812[_0xea9812[_0x3c7d0d(0xac)]=0x4]=_0x3c7d0d(0xac),_0xea9812[_0xea9812['Solve']=0x5]=_0x3c7d0d(0xb0),_0xea9812[_0xea9812['UNRECOGNIZED']=-0x1]=_0x3c7d0d(0x9e),_0xea9812))(p||{});const w=_0x1fd124=>_0x163441(new Date(+_0x1fd124))[_0x3c7d0d(0xb2)](_0x3c7d0d(0xc9)),X=async(_0x3b9345,_0x44c7c5)=>{const _0x1af994=_0x3c7d0d,_0x262671=_0x3b9345[_0x1af994(0xd6)](_0x1cf5e4),_0x41f3ad=_0x3b9345[_0x1af994(0xd6)](_0x4450ff);_0x44c7c5[_0x1af994(0xc7)](_0x529199=>{const _0x2b1a7c=_0x1af994;_0x262671['getUser'](_0x529199)&&_0x44c7c5[_0x2b1a7c(0xec)](_0x529199);}),_0x44c7c5[_0x1af994(0xe5)]&&(await _0x41f3ad[_0x1af994(0xd6)](_0x1af994(0xa2),{'params':{'userIDs':[..._0x44c7c5]}}))[_0x1af994(0xd7)][_0x1af994(0x92)][_0x1af994(0xc7)](_0x3ae067=>{const _0x40f4ca=_0x1af994;_0x3ae067&&_0x262671[_0x40f4ca(0xab)](_0x3ae067);});};var k=Object[_0x3c7d0d(0x9b)],ee=Object[_0x3c7d0d(0xdb)],re=(_0x50f283,_0x4056b7,_0x1e501d,_0x2e15e9)=>{const _0x374f72=_0x3c7d0d;for(var _0x1e851c=_0x2e15e9>0x1?void 0x0:_0x2e15e9?ee(_0x4056b7,_0x1e501d):_0x4056b7,_0x2fbc2e=_0x50f283[_0x374f72(0x8d)]-0x1,_0x2138e5;_0x2fbc2e>=0x0;_0x2fbc2e--)(_0x2138e5=_0x50f283[_0x2fbc2e])&&(_0x1e851c=(_0x2e15e9?_0x2138e5(_0x4056b7,_0x1e501d,_0x1e851c):_0x2138e5(_0x1e851c))||_0x1e851c);return _0x2e15e9&&_0x1e851c&&k(_0x4056b7,_0x1e501d,_0x1e851c),_0x1e851c;},_=(_0x33816a,_0x14636c)=>(_0x396ebd,_0x5cc9f3)=>_0x14636c(_0x396ebd,_0x5cc9f3,_0x33816a);let S=class extends _0xec90e7{constructor(_0x43bbcb,_0x121ffe,_0x21fa48,_0x26f65d){const _0x590fd8=_0x3c7d0d;super(),this[_0x590fd8(0xa8)]=_0x43bbcb,this[_0x590fd8(0xb9)]=_0x121ffe,this[_0x590fd8(0xea)]=_0x21fa48,this[_0x590fd8(0x91)]=_0x26f65d,this['_init'](),this['_initUserSync']();}[_0x3c7d0d(0x88)](){const _0x981630=_0x3c7d0d;this[_0x981630(0x8e)](this[_0x981630(0xb9)][_0x981630(0xe9)]['pipe'](_0x1e84af(0x10))['subscribe'](_0x521a1e=>{const _0x21bf1c=_0x981630,_0x2575dd=new Set();_0x521a1e['forEach'](_0x498bc0=>{const _0x4c652e=_0x4033;switch(_0x498bc0[_0x4c652e(0x87)]){case _0x4c652e(0xd2):{const _0x3e3df3=_0x498bc0[_0x4c652e(0x7f)][_0x4c652e(0xd5)];_0x2575dd[_0x4c652e(0xd2)](_0x3e3df3);break;}}}),X(this[_0x21bf1c(0x91)],_0x2575dd);}));}[_0x3c7d0d(0x7e)](){const _0x457d32=_0x3c7d0d;this['disposeWithMe'](this[_0x457d32(0xa8)][_0x457d32(0xe9)]['subscribe'](async _0x2e1f82=>{const _0x302d22=_0x457d32;var _0x343225,_0x11ad17;const _0x1d1db1=this[_0x302d22(0xb9)]['getThread'](_0x2e1f82[_0x302d22(0xed)],_0x2e1f82[_0x302d22(0xba)]);if(!_0x1d1db1)return;const {unitId:_0x3ed4f6,subUnitId:_0x1a60ed}=_0x1d1db1;switch(_0x2e1f82[_0x302d22(0xae)]&&this[_0x302d22(0xea)][_0x302d22(0xab)](_0x2e1f82[_0x302d22(0xae)]),_0x2e1f82[_0x302d22(0x87)]){case p[_0x302d22(0xeb)]:break;case p['Reply']:{this[_0x302d22(0xb9)][_0x302d22(0xb7)](_0x3ed4f6,_0x1a60ed,{'unitId':_0x3ed4f6,'subUnitId':_0x1a60ed,'ref':'','id':_0x2e1f82[_0x302d22(0xbd)],'dT':w(+_0x2e1f82['createTimestamp']),'threadId':_0x2e1f82[_0x302d22(0xba)],'personId':(_0x11ad17=(_0x343225=_0x2e1f82[_0x302d22(0xae)])==null?void 0x0:_0x343225[_0x302d22(0x9d)])!=null?_0x11ad17:_0x2e1f82['userId'],'text':JSON['parse'](_0x2e1f82[_0x302d22(0xd4)]),'parentId':_0x1d1db1['id']});break;}case p[_0x302d22(0xac)]:{const _0x5f473c=this[_0x302d22(0xb9)][_0x302d22(0x7c)](_0x3ed4f6,_0x1a60ed,_0x2e1f82['replyId']);_0x5f473c&&_0x5f473c[_0x302d22(0x85)]&&this['_threadCommentModel'][_0x302d22(0x80)](_0x3ed4f6,_0x1a60ed,_0x2e1f82[_0x302d22(0xbd)]);break;}case p[_0x302d22(0xb5)]:{this[_0x302d22(0xb9)][_0x302d22(0x98)](_0x3ed4f6,_0x1a60ed,{'commentId':_0x2e1f82[_0x302d22(0xbd)],'text':JSON[_0x302d22(0xce)](_0x2e1f82['content'])});break;}case p['Solve']:{const _0x56c54e=this[_0x302d22(0xb9)][_0x302d22(0xb6)](_0x3ed4f6,_0x2e1f82[_0x302d22(0xba)]);_0x56c54e&&this[_0x302d22(0xb9)][_0x302d22(0xc0)](_0x3ed4f6,_0x1a60ed,_0x56c54e['id'],_0x2e1f82[_0x302d22(0x81)]===v[_0x302d22(0x9c)]);break;}}}));}};S=re([_(0x0,_0x14cf19(_0x1ca978)),_(0x1,_0x14cf19(_0x38ff1d)),_(0x2,_0x14cf19(_0x1cf5e4)),_(0x3,_0x14cf19(_0x24d813))],S);function _0x4033(_0x2d2d0f,_0x5851d6){const _0x535e51=_0x535e();return _0x4033=function(_0x403310,_0x5b5416){_0x403310=_0x403310-0x77;let _0x6759f0=_0x535e51[_0x403310];return _0x6759f0;},_0x4033(_0x2d2d0f,_0x5851d6);}const te=_0x3c7d0d(0xbe),se={};var oe=Object['defineProperty'],ne=Object[_0x3c7d0d(0xdb)],ie=(_0x2d88f8,_0x56ed48,_0x3f389a,_0x1188c7)=>{for(var _0x58105e=_0x1188c7>0x1?void 0x0:_0x1188c7?ne(_0x56ed48,_0x3f389a):_0x56ed48,_0x4dffaa=_0x2d88f8['length']-0x1,_0x593595;_0x4dffaa>=0x0;_0x4dffaa--)(_0x593595=_0x2d88f8[_0x4dffaa])&&(_0x58105e=(_0x1188c7?_0x593595(_0x56ed48,_0x3f389a,_0x58105e):_0x593595(_0x58105e))||_0x58105e);return _0x1188c7&&_0x58105e&&oe(_0x56ed48,_0x3f389a,_0x58105e),_0x58105e;},I=(_0x284b09,_0x1624c9)=>(_0x41229e,_0x2327da)=>_0x1624c9(_0x41229e,_0x2327da,_0x284b09);function ae(_0x49c0da,_0x5f521e){const _0x30e486=_0x3c7d0d,_0x4e81fb=_0x49c0da['replies'][0x0];return{..._0x5f521e,'id':_0x4e81fb[_0x30e486(0xbd)],'resolved':_0x49c0da[_0x30e486(0x81)]===0x1,'dT':w(_0x4e81fb[_0x30e486(0x8c)]),'personId':_0x4e81fb['userId'],'threadId':_0x4e81fb[_0x30e486(0xba)]};}function ce(_0x1a69d9,_0x51439f,_0x85dc4c){const _0x3f2bf0=_0x3c7d0d;var _0x251c0b,_0x168fb0;if(((_0x168fb0=(_0x251c0b=_0x1a69d9==null?void 0x0:_0x1a69d9[_0x3f2bf0(0xbf)])==null?void 0x0:_0x251c0b[_0x3f2bf0(0x8d)])!=null?_0x168fb0:0x0)>0x0){const _0x1d66d0=(_0x3d7e23,_0x1aafbe)=>({'id':_0x3d7e23[_0x3f2bf0(0xbd)],'threadId':_0x3d7e23[_0x3f2bf0(0xba)],'dT':w(_0x3d7e23[_0x3f2bf0(0x8c)]),'personId':_0x3d7e23[_0x3f2bf0(0xc2)],'resolved':_0x1a69d9[_0x3f2bf0(0x81)]===v[_0x3f2bf0(0x9c)],'unitId':_0x51439f,'subUnitId':_0x85dc4c,'text':JSON[_0x3f2bf0(0xce)](_0x3d7e23[_0x3f2bf0(0xd4)]),'parentId':_0x1aafbe}),_0x1d4192=_0x1d66d0(_0x1a69d9[_0x3f2bf0(0xbf)][0x0]);return{..._0x1d4192,'children':_0x1a69d9[_0x3f2bf0(0xbf)][_0x3f2bf0(0xdc)](0x1)[_0x3f2bf0(0xe4)](_0x2791af=>_0x1d66d0(_0x2791af,_0x1d4192['id']))};}return null;}let b=class{constructor(_0xc8e280,_0x5759ed,_0x453c8,_0x28fd1c){const _0x1fb3db=_0x3c7d0d;this[_0x1fb3db(0xcb)]=_0xc8e280,this['_userService']=_0x5759ed,this['_sessionService']=_0x453c8,this[_0x1fb3db(0x91)]=_0x28fd1c;}async['addComment'](_0x33d608){const _0x92e2a=_0x3c7d0d;var _0x134da5,_0x4a8c31;const {parentId:_0x35c963,unitId:_0x5a288d,text:_0x38e37f,threadId:_0x5bced9}=_0x33d608,_0x4ac581=(_0x4a8c31=(_0x134da5=_0x38e37f['customRanges'])==null?void 0x0:_0x134da5[_0x92e2a(0xa4)](_0x1f3c53=>_0x1f3c53['rangeType']===_0x47f2c['COMMENT'])['map'](_0x1567cc=>_0x1567cc[_0x92e2a(0xc6)]))!=null?_0x4a8c31:[],_0x2548e1=JSON[_0x92e2a(0xb4)](_0x38e37f),_0x484db9=(await this[_0x92e2a(0xc3)][_0x92e2a(0xb8)](_0x5a288d))[_0x92e2a(0xdf)]();if(_0x35c963){const _0x2ca366={'memberId':_0x484db9,'unitId':_0x5a288d,'content':_0x2548e1,'mention':_0x4ac581,'threadId':_0x5bced9},_0x568336=(await this[_0x92e2a(0xcb)][_0x92e2a(0x8a)]('/universer-api/comment/unit/'+_0x5a288d+_0x92e2a(0xca),{'body':_0x2ca366}))[_0x92e2a(0xd7)][_0x92e2a(0x7a)];return{..._0x33d608,'id':_0x568336[_0x92e2a(0xbd)],'dT':_0x163441(+_0x568336['createTimestamp'])[_0x92e2a(0xb2)](_0x92e2a(0xc9)),'personId':_0x568336['userId']};}else{const _0x2b1fdd={'memberId':_0x484db9,'unitId':_0x5a288d,'content':_0x2548e1,'mention':_0x4ac581},_0x6ebdf9=await this[_0x92e2a(0xcb)][_0x92e2a(0x8a)](_0x92e2a(0xd8)+_0x5a288d+_0x92e2a(0xc4),{'body':_0x2b1fdd});return ae(_0x6ebdf9[_0x92e2a(0xd7)][_0x92e2a(0xe3)],_0x33d608);}}async[_0x3c7d0d(0x98)](_0x588dd0){const _0x311728=_0x3c7d0d;var _0x36077f,_0x58fa7f;const {text:_0x543d70,unitId:_0x449b56}=_0x588dd0,_0x246d91=(_0x58fa7f=(_0x36077f=_0x543d70[_0x311728(0xe8)])==null?void 0x0:_0x36077f[_0x311728(0xa4)](_0x33ad56=>_0x33ad56[_0x311728(0xbc)]===_0x47f2c[_0x311728(0xb1)])[_0x311728(0xe4)](_0x29dfa6=>_0x29dfa6[_0x311728(0xc6)]))!=null?_0x58fa7f:[],_0x5dbe84=JSON[_0x311728(0xb4)](_0x543d70),_0x442333=_0x588dd0[_0x311728(0xba)],_0x276ff1=_0x588dd0['id'],_0x2a8256={'memberId':(await this[_0x311728(0xc3)][_0x311728(0xb8)](_0x449b56))['getMemberID'](),'unitId':_0x449b56,'threadId':_0x442333,'mention':_0x246d91,'content':_0x5dbe84,'replyId':_0x276ff1},_0x2bb556=await this['_httpService']['post'](_0x311728(0xd8)+_0x449b56+_0x311728(0xa3),{'body':_0x2a8256});return!_0x2bb556[_0x311728(0xd7)][_0x311728(0x8f)]||_0x2bb556[_0x311728(0xd7)][_0x311728(0x8f)][_0x311728(0xdd)]===0x1;}async[_0x3c7d0d(0xc0)](_0x352013){const _0x4d310e=_0x3c7d0d,{unitId:_0x36768b}=_0x352013,_0x3baf7d=_0x352013[_0x4d310e(0xba)],_0x56a0ed={'memberId':this[_0x4d310e(0xea)]['getCurrentUser']()[_0x4d310e(0x9d)],'unitId':_0x36768b,'threadId':_0x3baf7d,'solved':_0x352013[_0x4d310e(0xe6)]?v[_0x4d310e(0x9c)]:v['OpenOrReOpen']},_0x919ddd=await this[_0x4d310e(0xcb)]['post'](_0x4d310e(0xd8)+_0x36768b+'/solved',{'body':_0x56a0ed});return!_0x919ddd[_0x4d310e(0xd7)][_0x4d310e(0x8f)]||_0x919ddd[_0x4d310e(0xd7)][_0x4d310e(0x8f)][_0x4d310e(0xdd)]===0x1;}async[_0x3c7d0d(0x80)](_0xa3d568,_0x595fdf,_0x7f44b4,_0x443ef5){const _0x1e8369=_0x3c7d0d,_0x41f098={'memberId':(await this[_0x1e8369(0xc3)]['requireSession'](_0xa3d568))['getMemberID'](),'threadId':_0x7f44b4,'replyId':_0x443ef5,'unitId':_0xa3d568},_0x4fc2f4=await this[_0x1e8369(0xcb)][_0x1e8369(0x8a)](_0x1e8369(0xd8)+_0xa3d568+_0x1e8369(0xa7),{'body':_0x41f098});return!_0x4fc2f4[_0x1e8369(0xd7)][_0x1e8369(0x8f)]||_0x4fc2f4[_0x1e8369(0xd7)]['error'][_0x1e8369(0xdd)]===0x1;}async[_0x3c7d0d(0x9a)](_0x50f703,_0x3dd040,_0x6ce7e){const _0x7f9742=_0x3c7d0d,_0x50e5ce={'unitId':_0x50f703,'threadId':_0x6ce7e},_0x10e58e=await this[_0x7f9742(0xcb)][_0x7f9742(0x8a)](_0x7f9742(0xd8)+_0x50f703+_0x7f9742(0xe1),{'body':_0x50e5ce}),_0x408b83=_0x6ce7e[_0x7f9742(0xe4)](_0x13782b=>ce(_0x10e58e[_0x7f9742(0xd7)]['comments'][_0x13782b],_0x50f703,_0x3dd040))['filter'](Boolean);return Object[_0x7f9742(0x95)](_0x10e58e['body'][_0x7f9742(0x92)])[_0x7f9742(0xc7)](_0x37ecc6=>{const _0x205cb9=_0x7f9742;this[_0x205cb9(0xea)][_0x205cb9(0xab)](_0x37ecc6);}),_0x408b83;}[_0x3c7d0d(0x96)](_0x2eb25e){const _0x2f698d=_0x3c7d0d;return{'id':_0x2eb25e['id'],'threadId':_0x2eb25e[_0x2f698d(0xba)],'ref':_0x2eb25e[_0x2f698d(0xaa)]};}};b=ie([I(0x0,_0x14cf19(_0x4450ff)),I(0x1,_0x14cf19(_0x1cf5e4)),I(0x2,_0x14cf19(_0x395e50)),I(0x3,_0x14cf19(_0x24d813))],b);var de=Object['defineProperty'],me=Object[_0x3c7d0d(0xdb)],le=(_0x23569c,_0x578c29,_0x4e34a5,_0x3fd6d5)=>{const _0x426cf6=_0x3c7d0d;for(var _0x3f2e7c=_0x3fd6d5>0x1?void 0x0:_0x3fd6d5?me(_0x578c29,_0x4e34a5):_0x578c29,_0x19a767=_0x23569c[_0x426cf6(0x8d)]-0x1,_0x2803ce;_0x19a767>=0x0;_0x19a767--)(_0x2803ce=_0x23569c[_0x19a767])&&(_0x3f2e7c=(_0x3fd6d5?_0x2803ce(_0x578c29,_0x4e34a5,_0x3f2e7c):_0x2803ce(_0x3f2e7c))||_0x3f2e7c);return _0x3fd6d5&&_0x3f2e7c&&de(_0x578c29,_0x4e34a5,_0x3f2e7c),_0x3f2e7c;},he=(_0x154e27,_0x45fe18)=>(_0x271b6f,_0x384c0b)=>_0x45fe18(_0x271b6f,_0x384c0b,_0x154e27);let D=class{constructor(_0x395d48){this['_httpService']=_0x395d48;}async[_0x3c7d0d(0x83)](_0x5e6ffc,_0x5c69c4,_0x5de8b3){const _0x53bc3b=_0x3c7d0d,_0x430500=new URL(window[_0x53bc3b(0x7b)][_0x53bc3b(0xe2)])[_0x53bc3b(0xa6)][_0x53bc3b(0xd6)](_0x53bc3b(0xcc));if(!_0x430500)return[];const _0x3291ed=window[_0x53bc3b(0x7b)][_0x53bc3b(0xde)],_0x35cefc=window['location'][_0x53bc3b(0xa1)]===_0x53bc3b(0x84)?'https':_0x53bc3b(0xe7);return(await this[_0x53bc3b(0xcb)][_0x53bc3b(0xd6)](_0x35cefc+_0x53bc3b(0xc5)+_0x3291ed+_0x53bc3b(0x93),{'params':{'objectID':_0x430500,'unitID':_0x430500}}))[_0x53bc3b(0xd7)]['collaborators']['map'](_0x2bcdf9=>{const _0x5eb306=_0x53bc3b;var _0x47fe67,_0x28b112,_0x49ce4d,_0x3670f8,_0x35181e,_0x2bd3bd;return{'id':(_0x28b112=(_0x47fe67=_0x2bcdf9[_0x5eb306(0x86)])==null?void 0x0:_0x47fe67[_0x5eb306(0x9d)])!=null?_0x28b112:'','label':(_0x3670f8=(_0x49ce4d=_0x2bcdf9[_0x5eb306(0x86)])==null?void 0x0:_0x49ce4d[_0x5eb306(0xcd)])!=null?_0x3670f8:'','icon':(_0x2bd3bd=(_0x35181e=_0x2bcdf9[_0x5eb306(0x86)])==null?void 0x0:_0x35181e['avatar'])!=null?_0x2bd3bd:'','type':'user'};});}};D=le([he(0x0,_0x14cf19(_0x4450ff))],D);var ue=Object[_0x3c7d0d(0x9b)],pe=Object[_0x3c7d0d(0xdb)],ve=(_0x415f16,_0x2da5fe,_0x38d747,_0x2f2b8c)=>{for(var _0x274200=_0x2f2b8c>0x1?void 0x0:_0x2f2b8c?pe(_0x2da5fe,_0x38d747):_0x2da5fe,_0x2a3345=_0x415f16['length']-0x1,_0x4efc3b;_0x2a3345>=0x0;_0x2a3345--)(_0x4efc3b=_0x415f16[_0x2a3345])&&(_0x274200=(_0x2f2b8c?_0x4efc3b(_0x2da5fe,_0x38d747,_0x274200):_0x4efc3b(_0x274200))||_0x274200);return _0x2f2b8c&&_0x274200&&ue(_0x2da5fe,_0x38d747,_0x274200),_0x274200;},f=(_0x185692,_0x34035b)=>(_0x51ede4,_0xf795bb)=>_0x34035b(_0x51ede4,_0xf795bb,_0x185692);let C=class extends _0xec90e7{constructor(_0x1b961c,_0x3f2926,_0x3d0a9f,_0x3549df){const _0x36432c=_0x3c7d0d;super(),this['_threadCommentDataSourceService']=_0x1b961c,this['_threadCommentDataSource']=_0x3f2926,this[_0x36432c(0x7d)]=_0x3d0a9f,this[_0x36432c(0x94)]=_0x3549df,this[_0x36432c(0xbb)]();}['_initDataSource'](){const _0x1b4608=_0x3c7d0d;this[_0x1b4608(0x97)]['dataSource']=this['_threadCommentDataSource'],this[_0x1b4608(0x97)][_0x1b4608(0xcf)]=!0x1,this['_threadCommentMentionDataService'][_0x1b4608(0x82)]=this[_0x1b4608(0x94)];}};C=ve([f(0x0,_0x284139),f(0x1,_0x14cf19(b)),f(0x2,_0x305e5f),f(0x3,_0x14cf19(D))],C);var E=Object[_0x3c7d0d(0x9b)],_e=Object[_0x3c7d0d(0xdb)],Ie=(_0x4b38a6,_0x319871,_0x76990c)=>_0x319871 in _0x4b38a6?E(_0x4b38a6,_0x319871,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x76990c}):_0x4b38a6[_0x319871]=_0x76990c,fe=(_0xec73b1,_0x59f518,_0x3c11db,_0x58ecfd)=>{const _0x1af15a=_0x3c7d0d;for(var _0x2b574f=_0x58ecfd>0x1?void 0x0:_0x58ecfd?_e(_0x59f518,_0x3c11db):_0x59f518,_0x128593=_0xec73b1[_0x1af15a(0x8d)]-0x1,_0x7ea948;_0x128593>=0x0;_0x128593--)(_0x7ea948=_0xec73b1[_0x128593])&&(_0x2b574f=(_0x58ecfd?_0x7ea948(_0x59f518,_0x3c11db,_0x2b574f):_0x7ea948(_0x2b574f))||_0x2b574f);return _0x58ecfd&&_0x2b574f&&E(_0x59f518,_0x3c11db,_0x2b574f),_0x2b574f;},T=(_0x5e06c3,_0x326eb1)=>(_0x520dab,_0x8ce339)=>_0x326eb1(_0x520dab,_0x8ce339,_0x5e06c3),x=(_0x323c0c,_0x167c18,_0x4ab8b1)=>Ie(_0x323c0c,typeof _0x167c18!=_0x3c7d0d(0xaf)?_0x167c18+'':_0x167c18,_0x4ab8b1);let g=class extends _0x3cb1f5{constructor(_0x481490=se,_0x5d6aa8,_0x32521c){const _0x7d4bc9=_0x3c7d0d;super(),this['_config']=_0x481490,this[_0x7d4bc9(0x91)]=_0x5d6aa8,this[_0x7d4bc9(0x89)]=_0x32521c;const {..._0x5816c8}=this[_0x7d4bc9(0x77)];this[_0x7d4bc9(0x89)][_0x7d4bc9(0xe0)](te,_0x5816c8);}[_0x3c7d0d(0x8b)](){const _0x2168c4=_0x3c7d0d;[[D],[b],[C],[S]][_0x2168c4(0xc7)](_0x1c066e=>{const _0x4158b8=_0x2168c4;this['_injector'][_0x4158b8(0xd2)](_0x1c066e);}),this[_0x2168c4(0x91)]['get'](C);}[_0x3c7d0d(0xad)](){this['_injector']['get'](S);}};x(g,_0x3c7d0d(0x90),Q),x(g,_0x3c7d0d(0x87),_0x20aae0[_0x3c7d0d(0x99)]),g=fe([_0x1454d8(_0x26ed53,_0x42822a,_0x1da917,_0x1e5300),T(0x1,_0x14cf19(_0x24d813)),T(0x2,_0x169b36)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x21ec(_0x5d316b,_0x2bf8ec){const _0x5bc171=_0x5bc1();return _0x21ec=function(_0x21ec0c,_0xa6e525){_0x21ec0c=_0x21ec0c-0x95;let _0x2d68ec=_0x5bc171[_0x21ec0c];return _0x2d68ec;},_0x21ec(_0x5d316b,_0x2bf8ec);}(function(_0x2ed356,_0x5e2840){const _0x2b30d5=_0x21ec,_0x3bad1a=_0x2ed356();while(!![]){try{const _0x89f577=-parseInt(_0x2b30d5(0xdb))/0x1+parseInt(_0x2b30d5(0xd3))/0x2*(parseInt(_0x2b30d5(0x118))/0x3)+-parseInt(_0x2b30d5(0xf1))/0x4*(parseInt(_0x2b30d5(0xbf))/0x5)+parseInt(_0x2b30d5(0xbd))/0x6+parseInt(_0x2b30d5(0xd8))/0x7+parseInt(_0x2b30d5(0x107))/0x8+parseInt(_0x2b30d5(0xd0))/0x9;if(_0x89f577===_0x5e2840)break;else _0x3bad1a['push'](_0x3bad1a['shift']());}catch(_0x3ad6cc){_0x3bad1a['push'](_0x3bad1a['shift']());}}}(_0x5bc1,0x4223d),function(_0x51b72c,_0x2f0c57){const _0xae17df=_0x21ec;typeof exports==_0xae17df(0x9f)&&typeof module<'u'?_0x2f0c57(exports,require(_0xae17df(0xe6)),require(_0xae17df(0xbe)),require(_0xae17df(0xd1)),require(_0xae17df(0xeb)),require(_0xae17df(0xb4)),require(_0xae17df(0xde)),require(_0xae17df(0x97)),require('dayjs')):typeof define==_0xae17df(0xac)&&define['amd']?define([_0xae17df(0xad),_0xae17df(0xe6),_0xae17df(0xbe),_0xae17df(0xd1),_0xae17df(0xeb),_0xae17df(0xb4),_0xae17df(0xde),_0xae17df(0x97),_0xae17df(0x121)],_0x2f0c57):(_0x51b72c=typeof globalThis<'u'?globalThis:_0x51b72c||self,_0x2f0c57(_0x51b72c[_0xae17df(0x113)]={},_0x51b72c[_0xae17df(0xed)],_0x51b72c[_0xae17df(0xa7)],_0x51b72c[_0xae17df(0xce)],_0x51b72c[_0xae17df(0x123)],_0x51b72c[_0xae17df(0xf0)],_0x51b72c['rxjs'],_0x51b72c[_0xae17df(0xb1)],_0x51b72c[_0xae17df(0x121)]));}(this,function(_0xab891b,_0xb14d49,_0x1c4f80,_0x35342a,_0xfeceb6,_0x26ab42,_0xbe2744,_0xccfc7e,_0x515941){'use strict';const _0x3132be=_0x21ec;const _0x27444f=_0x3132be(0xc9);var _0xdc2368=(_0x1d88c0=>(_0x1d88c0[_0x1d88c0[_0x3132be(0xc4)]=0x0]=_0x3132be(0xc4),_0x1d88c0[_0x1d88c0[_0x3132be(0xd7)]=0x1]=_0x3132be(0xd7),_0x1d88c0[_0x1d88c0[_0x3132be(0x106)]=-0x1]='UNRECOGNIZED',_0x1d88c0))(_0xdc2368||{}),_0x2654ac=(_0x1e0702=>(_0x1e0702[_0x1e0702[_0x3132be(0xfa)]=0x0]=_0x3132be(0xfa),_0x1e0702[_0x1e0702[_0x3132be(0x119)]=0x1]=_0x3132be(0x119),_0x1e0702[_0x1e0702[_0x3132be(0xa5)]=0x2]=_0x3132be(0xa5),_0x1e0702[_0x1e0702[_0x3132be(0xee)]=0x3]=_0x3132be(0xee),_0x1e0702[_0x1e0702[_0x3132be(0x9b)]=0x4]=_0x3132be(0x9b),_0x1e0702[_0x1e0702[_0x3132be(0x128)]=0x5]=_0x3132be(0x128),_0x1e0702[_0x1e0702['UNRECOGNIZED']=-0x1]=_0x3132be(0x106),_0x1e0702))(_0x2654ac||{});const _0x1a788e=_0x8e37bc=>_0x515941(new Date(+_0x8e37bc))[_0x3132be(0xcb)](_0x3132be(0xec)),_0x3898dc=async(_0x2728af,_0xa70789)=>{const _0x157bad=_0x3132be,_0x2f85fc=_0x2728af['get'](_0xb14d49[_0x157bad(0xcf)]),_0xa269aa=_0x2728af[_0x157bad(0x11a)](_0xccfc7e[_0x157bad(0xf9)]);_0xa70789[_0x157bad(0x129)](_0x2c99ba=>{const _0x28ddc6=_0x157bad;_0x2f85fc[_0x28ddc6(0x9e)](_0x2c99ba)&&_0xa70789['delete'](_0x2c99ba);}),_0xa70789[_0x157bad(0x126)]&&(await _0xa269aa['get'](_0x157bad(0xf5),{'params':{'userIDs':[..._0xa70789]}}))[_0x157bad(0xc2)][_0x157bad(0xd6)][_0x157bad(0x129)](_0x1b2d54=>{const _0x308700=_0x157bad;_0x1b2d54&&_0x2f85fc[_0x308700(0x95)](_0x1b2d54);});};var _0x74ef66=Object[_0x3132be(0xa3)],_0x120e60=Object['getOwnPropertyDescriptor'],_0x1d452b=(_0x279f63,_0x37809d,_0x5f5419,_0x3bd97f)=>{for(var _0xd2befa=_0x3bd97f>0x1?void 0x0:_0x3bd97f?_0x120e60(_0x37809d,_0x5f5419):_0x37809d,_0x5ab16a=_0x279f63['length']-0x1,_0x1d398a;_0x5ab16a>=0x0;_0x5ab16a--)(_0x1d398a=_0x279f63[_0x5ab16a])&&(_0xd2befa=(_0x3bd97f?_0x1d398a(_0x37809d,_0x5f5419,_0xd2befa):_0x1d398a(_0xd2befa))||_0xd2befa);return _0x3bd97f&&_0xd2befa&&_0x74ef66(_0x37809d,_0x5f5419,_0xd2befa),_0xd2befa;},_0x1713c6=(_0x51056f,_0x16508d)=>(_0x29e45a,_0x1274ce)=>_0x16508d(_0x29e45a,_0x1274ce,_0x51056f);let _0x10314a=class extends _0xb14d49[_0x3132be(0x115)]{constructor(_0xf8f5de,_0x75ee8c,_0x20f090,_0x52e7ed){const _0x4547b5=_0x3132be;super(),this[_0x4547b5(0xe3)]=_0xf8f5de,this[_0x4547b5(0x124)]=_0x75ee8c,this[_0x4547b5(0xf2)]=_0x20f090,this['_injector']=_0x52e7ed,this['_init'](),this[_0x4547b5(0xff)]();}[_0x3132be(0xff)](){const _0x114e0b=_0x3132be;this[_0x114e0b(0x103)](this[_0x114e0b(0x124)]['commentUpdate$'][_0x114e0b(0xb5)](_0xbe2744[_0x114e0b(0xbb)](0x10))[_0x114e0b(0xb0)](_0x535fbd=>{const _0x53a6d3=_0x114e0b,_0x2ba113=new Set();_0x535fbd[_0x53a6d3(0x129)](_0xd7318=>{const _0x1f017e=_0x53a6d3;switch(_0xd7318[_0x1f017e(0xe8)]){case _0x1f017e(0x109):{const _0x5724db=_0xd7318[_0x1f017e(0xc6)][_0x1f017e(0x10d)];_0x2ba113[_0x1f017e(0x109)](_0x5724db);break;}}}),_0x3898dc(this[_0x53a6d3(0xa6)],_0x2ba113);}));}['_init'](){const _0x5229b8=_0x3132be;this[_0x5229b8(0x103)](this[_0x5229b8(0xe3)][_0x5229b8(0xc0)]['subscribe'](async _0x1b8a8a=>{const _0x3e4749=_0x5229b8;var _0x5f31f4,_0x42098c;const _0x176e3b=this[_0x3e4749(0x124)][_0x3e4749(0xe0)](_0x1b8a8a[_0x3e4749(0x99)],_0x1b8a8a[_0x3e4749(0xe9)]);if(!_0x176e3b)return;const {unitId:_0x47bf7f,subUnitId:_0x3d4698}=_0x176e3b;switch(_0x1b8a8a[_0x3e4749(0xfb)]&&this[_0x3e4749(0xf2)][_0x3e4749(0x95)](_0x1b8a8a['user']),_0x1b8a8a[_0x3e4749(0xe8)]){case _0x2654ac['Add']:break;case _0x2654ac['Reply']:{this['_threadCommentModel'][_0x3e4749(0xcd)](_0x47bf7f,_0x3d4698,{'unitId':_0x47bf7f,'subUnitId':_0x3d4698,'ref':'','id':_0x1b8a8a[_0x3e4749(0x10f)],'dT':_0x1a788e(+_0x1b8a8a[_0x3e4749(0x120)]),'threadId':_0x1b8a8a[_0x3e4749(0xe9)],'personId':(_0x42098c=(_0x5f31f4=_0x1b8a8a[_0x3e4749(0xfb)])==null?void 0x0:_0x5f31f4[_0x3e4749(0xd4)])!=null?_0x42098c:_0x1b8a8a[_0x3e4749(0xf3)],'text':JSON[_0x3e4749(0xcc)](_0x1b8a8a['content']),'parentId':_0x176e3b['id']});break;}case _0x2654ac[_0x3e4749(0x9b)]:{const _0x34c3f4=this[_0x3e4749(0x124)][_0x3e4749(0xc3)](_0x47bf7f,_0x3d4698,_0x1b8a8a[_0x3e4749(0x10f)]);_0x34c3f4&&_0x34c3f4[_0x3e4749(0xaa)]&&this[_0x3e4749(0x124)][_0x3e4749(0x114)](_0x47bf7f,_0x3d4698,_0x1b8a8a[_0x3e4749(0x10f)]);break;}case _0x2654ac['Edit']:{this[_0x3e4749(0x124)][_0x3e4749(0x11f)](_0x47bf7f,_0x3d4698,{'commentId':_0x1b8a8a['replyId'],'text':JSON[_0x3e4749(0xcc)](_0x1b8a8a[_0x3e4749(0xb7)])});break;}case _0x2654ac[_0x3e4749(0x128)]:{const _0x2d1f67=this[_0x3e4749(0x124)][_0x3e4749(0xe0)](_0x47bf7f,_0x1b8a8a[_0x3e4749(0xe9)]);_0x2d1f67&&this[_0x3e4749(0x124)][_0x3e4749(0xb9)](_0x47bf7f,_0x3d4698,_0x2d1f67['id'],_0x1b8a8a[_0x3e4749(0xa4)]===_0xdc2368[_0x3e4749(0xd7)]);break;}}}));}};_0x10314a=_0x1d452b([_0x1713c6(0x0,_0xb14d49[_0x3132be(0xef)](_0xfeceb6['CommentService'])),_0x1713c6(0x1,_0xb14d49[_0x3132be(0xef)](_0x1c4f80[_0x3132be(0x116)])),_0x1713c6(0x2,_0xb14d49[_0x3132be(0xef)](_0xb14d49[_0x3132be(0xcf)])),_0x1713c6(0x3,_0xb14d49[_0x3132be(0xef)](_0xb14d49['Injector']))],_0x10314a);const _0x1077b2=_0x3132be(0xe2),_0x43d20a={};var _0x47f7d5=Object[_0x3132be(0xa3)],_0x3a42bf=Object[_0x3132be(0x96)],_0x413795=(_0x4da528,_0x42a631,_0x1b813b,_0x21c16f)=>{const _0x16c4c1=_0x3132be;for(var _0x2c6f1c=_0x21c16f>0x1?void 0x0:_0x21c16f?_0x3a42bf(_0x42a631,_0x1b813b):_0x42a631,_0x2eeeef=_0x4da528[_0x16c4c1(0xf7)]-0x1,_0x2cad28;_0x2eeeef>=0x0;_0x2eeeef--)(_0x2cad28=_0x4da528[_0x2eeeef])&&(_0x2c6f1c=(_0x21c16f?_0x2cad28(_0x42a631,_0x1b813b,_0x2c6f1c):_0x2cad28(_0x2c6f1c))||_0x2c6f1c);return _0x21c16f&&_0x2c6f1c&&_0x47f7d5(_0x42a631,_0x1b813b,_0x2c6f1c),_0x2c6f1c;},_0x24c92b=(_0x2d20b8,_0x2bb790)=>(_0x52a15f,_0x56b28e)=>_0x2bb790(_0x52a15f,_0x56b28e,_0x2d20b8);function _0x272326(_0x393986,_0xdb1de8){const _0x477552=_0x3132be,_0x3f9749=_0x393986[_0x477552(0xa1)][0x0];return{..._0xdb1de8,'id':_0x3f9749[_0x477552(0x10f)],'resolved':_0x393986['solved']===0x1,'dT':_0x1a788e(_0x3f9749['createTimestamp']),'personId':_0x3f9749[_0x477552(0xf3)],'threadId':_0x3f9749[_0x477552(0xe9)]};}function _0x39d58a(_0x44570c,_0x3b5648,_0x164c17){const _0x523af6=_0x3132be;var _0x1f3385,_0x2faa8d;if(((_0x2faa8d=(_0x1f3385=_0x44570c==null?void 0x0:_0x44570c[_0x523af6(0xa1)])==null?void 0x0:_0x1f3385[_0x523af6(0xf7)])!=null?_0x2faa8d:0x0)>0x0){const _0x1f337e=(_0x45b695,_0xba3cb0)=>({'id':_0x45b695[_0x523af6(0x10f)],'threadId':_0x45b695[_0x523af6(0xe9)],'dT':_0x1a788e(_0x45b695[_0x523af6(0x120)]),'personId':_0x45b695[_0x523af6(0xf3)],'resolved':_0x44570c['solved']===_0xdc2368[_0x523af6(0xd7)],'unitId':_0x3b5648,'subUnitId':_0x164c17,'text':JSON['parse'](_0x45b695[_0x523af6(0xb7)]),'parentId':_0xba3cb0}),_0x120e25=_0x1f337e(_0x44570c[_0x523af6(0xa1)][0x0]);return{..._0x120e25,'children':_0x44570c[_0x523af6(0xa1)][_0x523af6(0xb6)](0x1)['map'](_0x4e3ef7=>_0x1f337e(_0x4e3ef7,_0x120e25['id']))};}return null;}let _0xf8eafe=class{constructor(_0x2a50e0,_0x2dd998,_0x5e90b4,_0x1389e0){const _0x4396a4=_0x3132be;this[_0x4396a4(0x10c)]=_0x2a50e0,this[_0x4396a4(0xf2)]=_0x2dd998,this[_0x4396a4(0x10a)]=_0x5e90b4,this['_injector']=_0x1389e0;}async[_0x3132be(0xcd)](_0x52b726){const _0x28e835=_0x3132be;var _0x19572e,_0x3f57f0;const {parentId:_0x4195dd,unitId:_0x2c191e,text:_0x223149,threadId:_0x5efac3}=_0x52b726,_0x10bf63=(_0x3f57f0=(_0x19572e=_0x223149[_0x28e835(0x12a)])==null?void 0x0:_0x19572e['filter'](_0xce2253=>_0xce2253['rangeType']===_0xb14d49[_0x28e835(0xc1)][_0x28e835(0xa9)])[_0x28e835(0xd2)](_0x4efc2e=>_0x4efc2e[_0x28e835(0xe5)]))!=null?_0x3f57f0:[],_0x5996fc=JSON['stringify'](_0x223149),_0x5e6a01=(await this['_sessionService'][_0x28e835(0x112)](_0x2c191e))['getMemberID']();if(_0x4195dd){const _0xeee751={'memberId':_0x5e6a01,'unitId':_0x2c191e,'content':_0x5996fc,'mention':_0x10bf63,'threadId':_0x5efac3},_0x27faae=(await this['_httpService'][_0x28e835(0x11c)](_0x28e835(0x111)+_0x2c191e+_0x28e835(0xca),{'body':_0xeee751}))[_0x28e835(0xc2)][_0x28e835(0xe1)];return{..._0x52b726,'id':_0x27faae[_0x28e835(0x10f)],'dT':_0x515941(+_0x27faae[_0x28e835(0x120)])[_0x28e835(0xcb)](_0x28e835(0xec)),'personId':_0x27faae[_0x28e835(0xf3)]};}else{const _0x8aa610={'memberId':_0x5e6a01,'unitId':_0x2c191e,'content':_0x5996fc,'mention':_0x10bf63},_0x4e4731=await this[_0x28e835(0x10c)][_0x28e835(0x11c)]('/universer-api/comment/unit/'+_0x2c191e+_0x28e835(0xb8),{'body':_0x8aa610});return _0x272326(_0x4e4731[_0x28e835(0xc2)][_0x28e835(0x98)],_0x52b726);}}async[_0x3132be(0x11f)](_0x52b8b5){const _0x9626d=_0x3132be;var _0x353722,_0xb636ef;const {text:_0x43a59a,unitId:_0x2207ce}=_0x52b8b5,_0x5e6421=(_0xb636ef=(_0x353722=_0x43a59a['customRanges'])==null?void 0x0:_0x353722['filter'](_0x46836f=>_0x46836f[_0x9626d(0x9a)]===_0xb14d49['CustomRangeType'][_0x9626d(0xa9)])[_0x9626d(0xd2)](_0x5f5ba2=>_0x5f5ba2[_0x9626d(0xe5)]))!=null?_0xb636ef:[],_0x3f6926=JSON['stringify'](_0x43a59a),_0x43fca6=_0x52b8b5['threadId'],_0x38ed74=_0x52b8b5['id'],_0x278836={'memberId':(await this[_0x9626d(0x10a)][_0x9626d(0x112)](_0x2207ce))[_0x9626d(0xab)](),'unitId':_0x2207ce,'threadId':_0x43fca6,'mention':_0x5e6421,'content':_0x3f6926,'replyId':_0x38ed74},_0x2f016a=await this['_httpService'][_0x9626d(0x11c)](_0x9626d(0x111)+_0x2207ce+_0x9626d(0x100),{'body':_0x278836});return!_0x2f016a['body']['error']||_0x2f016a['body'][_0x9626d(0x117)][_0x9626d(0x104)]===0x1;}async[_0x3132be(0xb9)](_0x912590){const _0xfc2d6e=_0x3132be,{unitId:_0x327916}=_0x912590,_0x2f7ffd=_0x912590['threadId'],_0x31edd={'memberId':this[_0xfc2d6e(0xf2)][_0xfc2d6e(0x9c)]()[_0xfc2d6e(0xd4)],'unitId':_0x327916,'threadId':_0x2f7ffd,'solved':_0x912590['resolved']?_0xdc2368[_0xfc2d6e(0xd7)]:_0xdc2368[_0xfc2d6e(0xc4)]},_0x1f7d83=await this['_httpService'][_0xfc2d6e(0x11c)](_0xfc2d6e(0x111)+_0x327916+_0xfc2d6e(0xfc),{'body':_0x31edd});return!_0x1f7d83['body'][_0xfc2d6e(0x117)]||_0x1f7d83[_0xfc2d6e(0xc2)][_0xfc2d6e(0x117)][_0xfc2d6e(0x104)]===0x1;}async[_0x3132be(0x114)](_0x518a5a,_0x2fc5ec,_0x27c0ff,_0x541304){const _0x992f58=_0x3132be,_0x5a60da={'memberId':(await this[_0x992f58(0x10a)][_0x992f58(0x112)](_0x518a5a))['getMemberID'](),'threadId':_0x27c0ff,'replyId':_0x541304,'unitId':_0x518a5a},_0x13ed5f=await this[_0x992f58(0x10c)]['post'](_0x992f58(0x111)+_0x518a5a+_0x992f58(0xfe),{'body':_0x5a60da});return!_0x13ed5f[_0x992f58(0xc2)][_0x992f58(0x117)]||_0x13ed5f['body'][_0x992f58(0x117)][_0x992f58(0x104)]===0x1;}async['listComments'](_0xa69796,_0x5b1980,_0x5e76fc){const _0x3b35af=_0x3132be,_0x50723b={'unitId':_0xa69796,'threadId':_0x5e76fc},_0x4c4b7d=await this[_0x3b35af(0x10c)]['post'](_0x3b35af(0x111)+_0xa69796+_0x3b35af(0xbc),{'body':_0x50723b}),_0x337915=_0x5e76fc[_0x3b35af(0xd2)](_0x53cc1d=>_0x39d58a(_0x4c4b7d[_0x3b35af(0xc2)]['comments'][_0x53cc1d],_0xa69796,_0x5b1980))[_0x3b35af(0xa0)](Boolean);return Object[_0x3b35af(0x127)](_0x4c4b7d[_0x3b35af(0xc2)][_0x3b35af(0xd6)])[_0x3b35af(0x129)](_0x552868=>{const _0x1740e7=_0x3b35af;this['_userService'][_0x1740e7(0x95)](_0x552868);}),_0x337915;}['saveCommentToSnapshot'](_0x5138da){const _0x13e3eb=_0x3132be;return{'id':_0x5138da['id'],'threadId':_0x5138da[_0x13e3eb(0xe9)],'ref':_0x5138da[_0x13e3eb(0xf4)]};}};_0xf8eafe=_0x413795([_0x24c92b(0x0,_0xb14d49['Inject'](_0xccfc7e[_0x3132be(0xf9)])),_0x24c92b(0x1,_0xb14d49[_0x3132be(0xef)](_0xb14d49[_0x3132be(0xcf)])),_0x24c92b(0x2,_0xb14d49['Inject'](_0xfeceb6[_0x3132be(0xc7)])),_0x24c92b(0x3,_0xb14d49['Inject'](_0xb14d49[_0x3132be(0xf8)]))],_0xf8eafe);var _0x33c730=Object['defineProperty'],_0x5f7168=Object['getOwnPropertyDescriptor'],_0x4877f7=(_0x360b95,_0x57748f,_0x4bf71b,_0xb71aa7)=>{const _0x38cdba=_0x3132be;for(var _0x1e9589=_0xb71aa7>0x1?void 0x0:_0xb71aa7?_0x5f7168(_0x57748f,_0x4bf71b):_0x57748f,_0x215a9b=_0x360b95[_0x38cdba(0xf7)]-0x1,_0x4dcbc6;_0x215a9b>=0x0;_0x215a9b--)(_0x4dcbc6=_0x360b95[_0x215a9b])&&(_0x1e9589=(_0xb71aa7?_0x4dcbc6(_0x57748f,_0x4bf71b,_0x1e9589):_0x4dcbc6(_0x1e9589))||_0x1e9589);return _0xb71aa7&&_0x1e9589&&_0x33c730(_0x57748f,_0x4bf71b,_0x1e9589),_0x1e9589;},_0x3c8b68=(_0xaebe4f,_0x25ffc7)=>(_0x127860,_0x2eaed1)=>_0x25ffc7(_0x127860,_0x2eaed1,_0xaebe4f);let _0xf38a08=class{constructor(_0x51c9d6){const _0x4c2881=_0x3132be;this[_0x4c2881(0x10c)]=_0x51c9d6;}async[_0x3132be(0xe7)](_0x21ff04,_0x4beba1,_0x80e8e7){const _0x5adbf7=_0x3132be,_0x4333aa=new URL(window['location']['href'])[_0x5adbf7(0xae)]['get'](_0x5adbf7(0xf6));if(!_0x4333aa)return[];const _0x10e635=window[_0x5adbf7(0xea)]['host'],_0x3480f6=window[_0x5adbf7(0xea)][_0x5adbf7(0xe4)]==='https:'?_0x5adbf7(0xdc):_0x5adbf7(0xd5);return(await this[_0x5adbf7(0x10c)]['get'](_0x3480f6+_0x5adbf7(0xba)+_0x10e635+_0x5adbf7(0xdf),{'params':{'objectID':_0x4333aa,'unitID':_0x4333aa}}))[_0x5adbf7(0xc2)]['collaborators'][_0x5adbf7(0xd2)](_0x5870e6=>{const _0x2156f0=_0x5adbf7;var _0x33209a,_0xb6dc91,_0x4700ca,_0x53bcf8,_0x3c0261,_0x50f927;return{'id':(_0xb6dc91=(_0x33209a=_0x5870e6[_0x2156f0(0xc5)])==null?void 0x0:_0x33209a[_0x2156f0(0xd4)])!=null?_0xb6dc91:'','label':(_0x53bcf8=(_0x4700ca=_0x5870e6['subject'])==null?void 0x0:_0x4700ca[_0x2156f0(0x122)])!=null?_0x53bcf8:'','icon':(_0x50f927=(_0x3c0261=_0x5870e6[_0x2156f0(0xc5)])==null?void 0x0:_0x3c0261[_0x2156f0(0x102)])!=null?_0x50f927:'','type':_0x2156f0(0xfb)};});}};_0xf38a08=_0x4877f7([_0x3c8b68(0x0,_0xb14d49[_0x3132be(0xef)](_0xccfc7e[_0x3132be(0xf9)]))],_0xf38a08);var _0x1c9708=Object['defineProperty'],_0x58817a=Object['getOwnPropertyDescriptor'],_0x817959=(_0x39be46,_0x3f2b79,_0x20ea5c,_0x3f9eaf)=>{for(var _0x349922=_0x3f9eaf>0x1?void 0x0:_0x3f9eaf?_0x58817a(_0x3f2b79,_0x20ea5c):_0x3f2b79,_0x25dcb7=_0x39be46['length']-0x1,_0x362062;_0x25dcb7>=0x0;_0x25dcb7--)(_0x362062=_0x39be46[_0x25dcb7])&&(_0x349922=(_0x3f9eaf?_0x362062(_0x3f2b79,_0x20ea5c,_0x349922):_0x362062(_0x349922))||_0x349922);return _0x3f9eaf&&_0x349922&&_0x1c9708(_0x3f2b79,_0x20ea5c,_0x349922),_0x349922;},_0x11e3a7=(_0x241ef7,_0x4321dc)=>(_0x49950e,_0x525265)=>_0x4321dc(_0x49950e,_0x525265,_0x241ef7);let _0x3ea484=class extends _0xb14d49['Disposable']{constructor(_0x6863d0,_0x1fbb52,_0x115e00,_0x38e11f){const _0x29b867=_0x3132be;super(),this['_threadCommentDataSourceService']=_0x6863d0,this['_threadCommentDataSource']=_0x1fbb52,this['_threadCommentMentionDataService']=_0x115e00,this[_0x29b867(0x9d)]=_0x38e11f,this[_0x29b867(0xfd)]();}[_0x3132be(0xfd)](){const _0x5acc7c=_0x3132be;this['_threadCommentDataSourceService'][_0x5acc7c(0xdd)]=this[_0x5acc7c(0xda)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1,this[_0x5acc7c(0x11e)]['dataSource']=this[_0x5acc7c(0x9d)];}};_0x3ea484=_0x817959([_0x11e3a7(0x0,_0x1c4f80[_0x3132be(0x10b)]),_0x11e3a7(0x1,_0xb14d49['Inject'](_0xf8eafe)),_0x11e3a7(0x2,_0x35342a[_0x3132be(0x105)]),_0x11e3a7(0x3,_0xb14d49[_0x3132be(0xef)](_0xf38a08))],_0x3ea484);var _0x54830f=Object[_0x3132be(0xa3)],_0x1e9713=Object[_0x3132be(0x96)],_0x1f288c=(_0x8a535b,_0x43d7ab,_0x24004d)=>_0x43d7ab in _0x8a535b?_0x54830f(_0x8a535b,_0x43d7ab,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x24004d}):_0x8a535b[_0x43d7ab]=_0x24004d,_0x229748=(_0x4d3ca2,_0xd5f084,_0x187cda,_0x278448)=>{const _0x5d19a3=_0x3132be;for(var _0x59b0a9=_0x278448>0x1?void 0x0:_0x278448?_0x1e9713(_0xd5f084,_0x187cda):_0xd5f084,_0x3aa71e=_0x4d3ca2[_0x5d19a3(0xf7)]-0x1,_0x51008e;_0x3aa71e>=0x0;_0x3aa71e--)(_0x51008e=_0x4d3ca2[_0x3aa71e])&&(_0x59b0a9=(_0x278448?_0x51008e(_0xd5f084,_0x187cda,_0x59b0a9):_0x51008e(_0x59b0a9))||_0x59b0a9);return _0x278448&&_0x59b0a9&&_0x54830f(_0xd5f084,_0x187cda,_0x59b0a9),_0x59b0a9;},_0x1fbe67=(_0x538fb4,_0xe16c02)=>(_0xf964e,_0x3e4319)=>_0xe16c02(_0xf964e,_0x3e4319,_0x538fb4),_0x59efb2=(_0x37e57a,_0x255b72,_0x200588)=>_0x1f288c(_0x37e57a,typeof _0x255b72!=_0x3132be(0x110)?_0x255b72+'':_0x255b72,_0x200588);_0xab891b[_0x3132be(0x11d)]=class extends _0xb14d49['Plugin']{constructor(_0x4354c8=_0x43d20a,_0x421212,_0x1289a3){const _0x23fa62=_0x3132be;super(),this[_0x23fa62(0x10e)]=_0x4354c8,this['_injector']=_0x421212,this[_0x23fa62(0x11b)]=_0x1289a3;const {..._0x5454f7}=this[_0x23fa62(0x10e)];this[_0x23fa62(0x11b)][_0x23fa62(0xa2)](_0x1077b2,_0x5454f7);}['onStarting'](){const _0x389742=_0x3132be;[[_0xf38a08],[_0xf8eafe],[_0x3ea484],[_0x10314a]]['forEach'](_0x5d1ad7=>{const _0x5498c2=_0x21ec;this[_0x5498c2(0xa6)][_0x5498c2(0x109)](_0x5d1ad7);}),this[_0x389742(0xa6)][_0x389742(0x11a)](_0x3ea484);}[_0x3132be(0xd9)](){const _0x1840e6=_0x3132be;this[_0x1840e6(0xa6)]['get'](_0x10314a);}},_0x59efb2(_0xab891b[_0x3132be(0x11d)],_0x3132be(0x125),_0x27444f),_0x59efb2(_0xab891b[_0x3132be(0x11d)],_0x3132be(0xe8),_0xb14d49[_0x3132be(0xb3)][_0x3132be(0x108)]),_0xab891b[_0x3132be(0x11d)]=_0x229748([_0xb14d49[_0x3132be(0x101)](_0x1c4f80[_0x3132be(0xaf)],_0x35342a['UniverThreadCommentUIPlugin'],_0xfeceb6[_0x3132be(0xb2)],_0x26ab42['UniverLicensePlugin']),_0x1fbe67(0x1,_0xb14d49[_0x3132be(0xef)](_0xb14d49[_0x3132be(0xf8)])),_0x1fbe67(0x2,_0xb14d49[_0x3132be(0xc8)])],_0xab891b[_0x3132be(0x11d)]),Object['defineProperty'](_0xab891b,Symbol['toStringTag'],{'value':_0x3132be(0xa8)});}));function _0x5bc1(){const _0x54acf2=['pluginName','size','values','Solve','forEach','customRanges','addUser','getOwnPropertyDescriptor','@univerjs/network','comment','unitId','rangeType','Delete','getCurrentUser','_threadCommentMentionDataSource','getUser','object','filter','replies','setConfig','defineProperty','solved','Reply','_injector','UniverThreadComment','Module','COMMENT','parentId','getMemberID','function','exports','searchParams','UniverThreadCommentPlugin','subscribe','UniverNetwork','UniverCollaborationClientPlugin','UniverInstanceType','@univerjs-pro/license','pipe','slice','content','/add','resolveComment','://','bufferTime','/list','1399092zbLReW','@univerjs/thread-comment','505PQkrWS','commentUpdate$','CustomRangeType','body','getComment','OpenOrReOpen','subject','payload','CollaborationSessionService','IConfigService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/reply','format','parse','addComment','UniverThreadCommentUi','UserManagerService','3562695WgwljE','@univerjs/thread-comment-ui','map','292xaShos','userID','http','users','Solved','1089690fVfKPP','onReady','_threadCommentDataSource','536035tkbtZQ','https','dataSource','rxjs','/universer-api/authz/collaborator','getThread','reply','thread-comment-data-source.config','_commentService','protocol','rangeId','@univerjs/core','getMentions','type','threadId','location','@univerjs-pro/collaboration-client','YYYY/MM/DD\x20HH:mm','UniverCore','Edit','Inject','UniverLicense','16620EeXCto','_userService','userId','ref','/universer-api/user/list','unit','length','Injector','HTTPService','Unknown','user','/solved','_initDataSource','/delete','_initUserSync','/edit','DependentOn','avatar','disposeWithMe','code','IThreadCommentMentionDataService','UNRECOGNIZED','2698848ccKiwB','UNIVER_UNKNOWN','add','_sessionService','IThreadCommentDataSourceService','_httpService','personId','_config','replyId','symbol','/universer-api/comment/unit/','requireSession','UniverThreadCommentDatasource','deleteComment','Disposable','ThreadCommentModel','error','2148hqiWFR','Add','get','_configService','post','UniverThreadCommentDataSourcePlugin','_threadCommentMentionDataService','updateComment','createTimestamp','dayjs','name','UniverCollaborationClient','_threadCommentModel'];_0x5bc1=function(){return _0x54acf2;};return _0x5bc1();}
|
|
1
|
+
(function(_0x433d0b,_0x463c92){const _0x447fbe=_0x4a9b,_0x10b0a0=_0x433d0b();while(!![]){try{const _0x66042c=parseInt(_0x447fbe(0xfd))/0x1+-parseInt(_0x447fbe(0xe7))/0x2*(-parseInt(_0x447fbe(0xe5))/0x3)+parseInt(_0x447fbe(0x129))/0x4+parseInt(_0x447fbe(0xdf))/0x5+-parseInt(_0x447fbe(0x127))/0x6+parseInt(_0x447fbe(0x11d))/0x7*(parseInt(_0x447fbe(0xc1))/0x8)+parseInt(_0x447fbe(0xab))/0x9*(-parseInt(_0x447fbe(0x126))/0xa);if(_0x66042c===_0x463c92)break;else _0x10b0a0['push'](_0x10b0a0['shift']());}catch(_0x3bd3cd){_0x10b0a0['push'](_0x10b0a0['shift']());}}}(_0x340f,0x1bcad),function(_0x315a20,_0x539fa5){const _0x2392a2=_0x4a9b;typeof exports==_0x2392a2(0xdd)&&typeof module<'u'?_0x539fa5(exports,require(_0x2392a2(0xb5)),require(_0x2392a2(0x104)),require('@univerjs/thread-comment-ui'),require(_0x2392a2(0xd6)),require('@univerjs-pro/license'),require(_0x2392a2(0xb0)),require(_0x2392a2(0x12a)),require('dayjs')):typeof define==_0x2392a2(0x134)&&define['amd']?define(['exports',_0x2392a2(0xb5),'@univerjs/thread-comment','@univerjs/thread-comment-ui',_0x2392a2(0xd6),_0x2392a2(0x118),_0x2392a2(0xb0),'@univerjs/network',_0x2392a2(0x11c)],_0x539fa5):(_0x315a20=typeof globalThis<'u'?globalThis:_0x315a20||self,_0x539fa5(_0x315a20[_0x2392a2(0xbb)]={},_0x315a20['UniverCore'],_0x315a20['UniverThreadComment'],_0x315a20[_0x2392a2(0xfc)],_0x315a20[_0x2392a2(0xf2)],_0x315a20[_0x2392a2(0x11e)],_0x315a20[_0x2392a2(0xb0)],_0x315a20['UniverNetwork'],_0x315a20[_0x2392a2(0x11c)]));}(this,function(_0x4d006a,_0x27b004,_0x2adc5c,_0x35a6ea,_0x24a599,_0x49a6ca,_0x4dac87,_0x1127b3,_0x347198){'use strict';const _0x4381ea=_0x4a9b;const _0xe795ad=_0x4381ea(0x113);var _0x4f76c3=(_0x5b8822=>(_0x5b8822[_0x5b8822[_0x4381ea(0x106)]=0x0]=_0x4381ea(0x106),_0x5b8822[_0x5b8822[_0x4381ea(0xfa)]=0x1]=_0x4381ea(0xfa),_0x5b8822[_0x5b8822[_0x4381ea(0xb8)]=-0x1]=_0x4381ea(0xb8),_0x5b8822))(_0x4f76c3||{}),_0x70e94f=(_0x342429=>(_0x342429[_0x342429[_0x4381ea(0x139)]=0x0]=_0x4381ea(0x139),_0x342429[_0x342429['Add']=0x1]=_0x4381ea(0xf4),_0x342429[_0x342429[_0x4381ea(0x108)]=0x2]=_0x4381ea(0x108),_0x342429[_0x342429[_0x4381ea(0x100)]=0x3]=_0x4381ea(0x100),_0x342429[_0x342429['Delete']=0x4]=_0x4381ea(0x101),_0x342429[_0x342429[_0x4381ea(0xe9)]=0x5]=_0x4381ea(0xe9),_0x342429[_0x342429[_0x4381ea(0xb8)]=-0x1]=_0x4381ea(0xb8),_0x342429))(_0x70e94f||{});const _0x31581e=_0x3e037e=>_0x347198(new Date(+_0x3e037e))[_0x4381ea(0x130)](_0x4381ea(0x13f)),_0x1c2526=async(_0x267747,_0x1cd2b5)=>{const _0x4929c5=_0x4381ea,_0x1ca073=_0x267747[_0x4929c5(0xb3)](_0x27b004[_0x4929c5(0xd2)]),_0x5ad20e=_0x267747[_0x4929c5(0xb3)](_0x1127b3[_0x4929c5(0xed)]);_0x1cd2b5[_0x4929c5(0xb1)](_0x155de0=>{const _0xb8a62a=_0x4929c5;_0x1ca073[_0xb8a62a(0xf8)](_0x155de0)&&_0x1cd2b5[_0xb8a62a(0x10f)](_0x155de0);}),_0x1cd2b5[_0x4929c5(0x125)]&&(await _0x5ad20e[_0x4929c5(0xb3)](_0x4929c5(0xf1),{'params':{'userIDs':[..._0x1cd2b5]}}))[_0x4929c5(0xb9)][_0x4929c5(0x13a)][_0x4929c5(0xb1)](_0x3c9435=>{const _0x2ea5d5=_0x4929c5;_0x3c9435&&_0x1ca073[_0x2ea5d5(0xad)](_0x3c9435);});};var _0x5897e7=Object['defineProperty'],_0x2bbcf7=Object[_0x4381ea(0x105)],_0x5101e0=(_0x5bc001,_0x1fdf84,_0x118720,_0x127838)=>{const _0x1408a8=_0x4381ea;for(var _0x17cefc=_0x127838>0x1?void 0x0:_0x127838?_0x2bbcf7(_0x1fdf84,_0x118720):_0x1fdf84,_0x3ab97f=_0x5bc001[_0x1408a8(0xc6)]-0x1,_0x24d54b;_0x3ab97f>=0x0;_0x3ab97f--)(_0x24d54b=_0x5bc001[_0x3ab97f])&&(_0x17cefc=(_0x127838?_0x24d54b(_0x1fdf84,_0x118720,_0x17cefc):_0x24d54b(_0x17cefc))||_0x17cefc);return _0x127838&&_0x17cefc&&_0x5897e7(_0x1fdf84,_0x118720,_0x17cefc),_0x17cefc;},_0x81c46f=(_0x51d5ff,_0x2f3041)=>(_0x3ee960,_0x1c84cf)=>_0x2f3041(_0x3ee960,_0x1c84cf,_0x51d5ff);let _0x59a249=class extends _0x27b004[_0x4381ea(0x102)]{constructor(_0x3ba3cd,_0x1ad865,_0x565b73,_0x1cfd96){const _0x34dfd6=_0x4381ea;super(),this[_0x34dfd6(0xbe)]=_0x3ba3cd,this[_0x34dfd6(0xf3)]=_0x1ad865,this[_0x34dfd6(0xc9)]=_0x565b73,this[_0x34dfd6(0xe3)]=_0x1cfd96,this[_0x34dfd6(0x133)](),this[_0x34dfd6(0xaf)]();}[_0x4381ea(0xaf)](){const _0x5f3a90=_0x4381ea;this[_0x5f3a90(0xc3)](this[_0x5f3a90(0xf3)]['commentUpdate$']['pipe'](_0x4dac87[_0x5f3a90(0x12e)](0x10))[_0x5f3a90(0xae)](_0x43211f=>{const _0x169b2f=_0x5f3a90,_0x4bfeb0=new Set();_0x43211f[_0x169b2f(0xb1)](_0x5a6153=>{const _0x4abe8a=_0x169b2f;switch(_0x5a6153[_0x4abe8a(0x10c)]){case _0x4abe8a(0x123):{const _0x4e5efd=_0x5a6153[_0x4abe8a(0xb4)][_0x4abe8a(0xc5)];_0x4bfeb0[_0x4abe8a(0x123)](_0x4e5efd);break;}}}),_0x1c2526(this['_injector'],_0x4bfeb0);}));}['_init'](){const _0x543e96=_0x4381ea;this[_0x543e96(0xc3)](this[_0x543e96(0xbe)][_0x543e96(0x11f)][_0x543e96(0xae)](async _0x221f0f=>{const _0x3d4419=_0x543e96;var _0x51a630,_0x88a708;const _0x3e7627=this[_0x3d4419(0xf3)]['getThread'](_0x221f0f['unitId'],_0x221f0f[_0x3d4419(0xb2)]);if(!_0x3e7627)return;const {unitId:_0x39e6f1,subUnitId:_0x52ba24}=_0x3e7627;switch(_0x221f0f[_0x3d4419(0x11b)]&&this['_userService'][_0x3d4419(0xad)](_0x221f0f[_0x3d4419(0x11b)]),_0x221f0f[_0x3d4419(0x10c)]){case _0x70e94f[_0x3d4419(0xf4)]:break;case _0x70e94f[_0x3d4419(0x108)]:{this[_0x3d4419(0xf3)][_0x3d4419(0xcf)](_0x39e6f1,_0x52ba24,{'unitId':_0x39e6f1,'subUnitId':_0x52ba24,'ref':'','id':_0x221f0f['replyId'],'dT':_0x31581e(+_0x221f0f[_0x3d4419(0x128)]),'threadId':_0x221f0f[_0x3d4419(0xb2)],'personId':(_0x88a708=(_0x51a630=_0x221f0f[_0x3d4419(0x11b)])==null?void 0x0:_0x51a630['userID'])!=null?_0x88a708:_0x221f0f[_0x3d4419(0xf9)],'text':JSON[_0x3d4419(0xd0)](_0x221f0f[_0x3d4419(0xb6)]),'parentId':_0x3e7627['id']});break;}case _0x70e94f['Delete']:{const _0x47fae8=this[_0x3d4419(0xf3)]['getComment'](_0x39e6f1,_0x52ba24,_0x221f0f['replyId']);_0x47fae8&&_0x47fae8[_0x3d4419(0x115)]&&this[_0x3d4419(0xf3)]['deleteComment'](_0x39e6f1,_0x52ba24,_0x221f0f[_0x3d4419(0xd8)]);break;}case _0x70e94f['Edit']:{this[_0x3d4419(0xf3)][_0x3d4419(0x117)](_0x39e6f1,_0x52ba24,{'commentId':_0x221f0f[_0x3d4419(0xd8)],'text':JSON['parse'](_0x221f0f[_0x3d4419(0xb6)])});break;}case _0x70e94f[_0x3d4419(0xe9)]:{const _0x110c05=this[_0x3d4419(0xf3)][_0x3d4419(0xc0)](_0x39e6f1,_0x221f0f['threadId']);_0x110c05&&this['_threadCommentModel']['resolveComment'](_0x39e6f1,_0x52ba24,_0x110c05['id'],_0x221f0f[_0x3d4419(0xd1)]===_0x4f76c3[_0x3d4419(0xfa)]);break;}}}));}};_0x59a249=_0x5101e0([_0x81c46f(0x0,_0x27b004[_0x4381ea(0xbd)](_0x24a599[_0x4381ea(0xba)])),_0x81c46f(0x1,_0x27b004[_0x4381ea(0xbd)](_0x2adc5c[_0x4381ea(0xdb)])),_0x81c46f(0x2,_0x27b004[_0x4381ea(0xbd)](_0x27b004['UserManagerService'])),_0x81c46f(0x3,_0x27b004[_0x4381ea(0xbd)](_0x27b004[_0x4381ea(0xfe)]))],_0x59a249);const _0x242e2a=_0x4381ea(0x13e),_0x24efaf={};var _0x4c47ea=Object[_0x4381ea(0xff)],_0x10e044=Object['getOwnPropertyDescriptor'],_0x2f474d=(_0x169605,_0x22550e,_0x913c54,_0x323a83)=>{for(var _0x61c24b=_0x323a83>0x1?void 0x0:_0x323a83?_0x10e044(_0x22550e,_0x913c54):_0x22550e,_0x2fd4bb=_0x169605['length']-0x1,_0x164de6;_0x2fd4bb>=0x0;_0x2fd4bb--)(_0x164de6=_0x169605[_0x2fd4bb])&&(_0x61c24b=(_0x323a83?_0x164de6(_0x22550e,_0x913c54,_0x61c24b):_0x164de6(_0x61c24b))||_0x61c24b);return _0x323a83&&_0x61c24b&&_0x4c47ea(_0x22550e,_0x913c54,_0x61c24b),_0x61c24b;},_0x92d0d6=(_0x50dc4a,_0x542464)=>(_0xcb86ca,_0x494781)=>_0x542464(_0xcb86ca,_0x494781,_0x50dc4a);function _0x11f0b7(_0x3f5f1d,_0x2ce5ad){const _0x45c212=_0x4381ea,_0x105d11=_0x3f5f1d[_0x45c212(0x122)][0x0];return{..._0x2ce5ad,'id':_0x105d11[_0x45c212(0xd8)],'resolved':_0x3f5f1d[_0x45c212(0xd1)]===0x1,'dT':_0x31581e(_0x105d11['createTimestamp']),'personId':_0x105d11['userId'],'threadId':_0x105d11[_0x45c212(0xb2)]};}function _0x359430(_0x56c0f9,_0x147c0d,_0x4c5a02){const _0x147954=_0x4381ea;var _0x1359aa,_0x24ae03;if(((_0x24ae03=(_0x1359aa=_0x56c0f9==null?void 0x0:_0x56c0f9[_0x147954(0x122)])==null?void 0x0:_0x1359aa[_0x147954(0xc6)])!=null?_0x24ae03:0x0)>0x0){const _0x2789da=(_0x5266dd,_0x1bbbf5)=>({'id':_0x5266dd[_0x147954(0xd8)],'threadId':_0x5266dd[_0x147954(0xb2)],'dT':_0x31581e(_0x5266dd[_0x147954(0x128)]),'personId':_0x5266dd[_0x147954(0xf9)],'resolved':_0x56c0f9[_0x147954(0xd1)]===_0x4f76c3[_0x147954(0xfa)],'unitId':_0x147c0d,'subUnitId':_0x4c5a02,'text':JSON[_0x147954(0xd0)](_0x5266dd['content']),'parentId':_0x1bbbf5}),_0x25aa26=_0x2789da(_0x56c0f9[_0x147954(0x122)][0x0]);return{..._0x25aa26,'children':_0x56c0f9[_0x147954(0x122)][_0x147954(0x13c)](0x1)[_0x147954(0xc4)](_0x12b874=>_0x2789da(_0x12b874,_0x25aa26['id']))};}return null;}let _0x491fd7=class{constructor(_0x2b4b98,_0x123d13,_0xe065dc,_0x167c51){const _0x5265cc=_0x4381ea;this[_0x5265cc(0xd7)]=_0x2b4b98,this[_0x5265cc(0xc9)]=_0x123d13,this[_0x5265cc(0x12d)]=_0xe065dc,this[_0x5265cc(0xe3)]=_0x167c51;}async[_0x4381ea(0xcf)](_0x39eadf){const _0x9ade6d=_0x4381ea;var _0x37739e,_0x2e2126;const {parentId:_0x409a1a,unitId:_0x2f9a2b,text:_0x4c9eca,threadId:_0x954688}=_0x39eadf,_0x304615=(_0x2e2126=(_0x37739e=_0x4c9eca[_0x9ade6d(0xfb)])==null?void 0x0:_0x37739e[_0x9ade6d(0xb7)](_0x332366=>_0x332366[_0x9ade6d(0xcc)]===_0x27b004[_0x9ade6d(0x137)][_0x9ade6d(0x131)])[_0x9ade6d(0xc4)](_0xc04d06=>_0xc04d06[_0x9ade6d(0x12b)]))!=null?_0x2e2126:[],_0x90e21e=JSON['stringify'](_0x4c9eca),_0x298f35=(await this[_0x9ade6d(0x12d)][_0x9ade6d(0xe2)](_0x2f9a2b))[_0x9ade6d(0xf5)]();if(_0x409a1a){const _0x5934b2={'memberId':_0x298f35,'unitId':_0x2f9a2b,'content':_0x90e21e,'mention':_0x304615,'threadId':_0x954688},_0x420eaa=(await this[_0x9ade6d(0xd7)][_0x9ade6d(0xe6)]('/universer-api/comment/unit/'+_0x2f9a2b+_0x9ade6d(0xc7),{'body':_0x5934b2}))[_0x9ade6d(0xb9)]['reply'];return{..._0x39eadf,'id':_0x420eaa[_0x9ade6d(0xd8)],'dT':_0x347198(+_0x420eaa[_0x9ade6d(0x128)])['format'](_0x9ade6d(0x13f)),'personId':_0x420eaa[_0x9ade6d(0xf9)]};}else{const _0x3e5aa6={'memberId':_0x298f35,'unitId':_0x2f9a2b,'content':_0x90e21e,'mention':_0x304615},_0x2ee204=await this[_0x9ade6d(0xd7)][_0x9ade6d(0xe6)](_0x9ade6d(0xf7)+_0x2f9a2b+_0x9ade6d(0x121),{'body':_0x3e5aa6});return _0x11f0b7(_0x2ee204[_0x9ade6d(0xb9)][_0x9ade6d(0xde)],_0x39eadf);}}async[_0x4381ea(0x117)](_0x566599){const _0x436406=_0x4381ea;var _0x8176fa,_0x2727bf;const {text:_0x5d16d7,unitId:_0x3d4bba}=_0x566599,_0x1c4e87=(_0x2727bf=(_0x8176fa=_0x5d16d7[_0x436406(0xfb)])==null?void 0x0:_0x8176fa[_0x436406(0xb7)](_0x3c890b=>_0x3c890b['rangeType']===_0x27b004[_0x436406(0x137)][_0x436406(0x131)])['map'](_0x306295=>_0x306295['rangeId']))!=null?_0x2727bf:[],_0x1d0c40=JSON['stringify'](_0x5d16d7),_0x271347=_0x566599[_0x436406(0xb2)],_0x5087ea=_0x566599['id'],_0x3e5e75={'memberId':(await this['_sessionService'][_0x436406(0xe2)](_0x3d4bba))['getMemberID'](),'unitId':_0x3d4bba,'threadId':_0x271347,'mention':_0x1c4e87,'content':_0x1d0c40,'replyId':_0x5087ea},_0x975836=await this[_0x436406(0xd7)][_0x436406(0xe6)]('/universer-api/comment/unit/'+_0x3d4bba+_0x436406(0x114),{'body':_0x3e5e75});return!_0x975836[_0x436406(0xb9)]['error']||_0x975836[_0x436406(0xb9)][_0x436406(0xcd)][_0x436406(0x124)]===0x1;}async['resolveComment'](_0x1c8f3a){const _0x3dd964=_0x4381ea,{unitId:_0x189bda}=_0x1c8f3a,_0x3ba36d=_0x1c8f3a['threadId'],_0xbe731b={'memberId':this['_userService'][_0x3dd964(0x138)]()['userID'],'unitId':_0x189bda,'threadId':_0x3ba36d,'solved':_0x1c8f3a[_0x3dd964(0xe8)]?_0x4f76c3['Solved']:_0x4f76c3[_0x3dd964(0x106)]},_0x109539=await this['_httpService'][_0x3dd964(0xe6)](_0x3dd964(0xf7)+_0x189bda+'/solved',{'body':_0xbe731b});return!_0x109539[_0x3dd964(0xb9)][_0x3dd964(0xcd)]||_0x109539[_0x3dd964(0xb9)][_0x3dd964(0xcd)][_0x3dd964(0x124)]===0x1;}async[_0x4381ea(0xce)](_0x281375,_0x561383,_0xe3bae8,_0x48ed85){const _0x539fd6=_0x4381ea,_0x41c85b={'memberId':(await this[_0x539fd6(0x12d)][_0x539fd6(0xe2)](_0x281375))[_0x539fd6(0xf5)](),'threadId':_0xe3bae8,'replyId':_0x48ed85,'unitId':_0x281375},_0xc1e50a=await this[_0x539fd6(0xd7)][_0x539fd6(0xe6)](_0x539fd6(0xf7)+_0x281375+_0x539fd6(0x12f),{'body':_0x41c85b});return!_0xc1e50a[_0x539fd6(0xb9)][_0x539fd6(0xcd)]||_0xc1e50a[_0x539fd6(0xb9)][_0x539fd6(0xcd)][_0x539fd6(0x124)]===0x1;}async[_0x4381ea(0x132)](_0x2615a6,_0x58f42b,_0x2e3c6f){const _0xd51716=_0x4381ea,_0x4bcafe={'unitId':_0x2615a6,'threadId':_0x2e3c6f},_0x5cc8aa=await this[_0xd51716(0xd7)][_0xd51716(0xe6)]('/universer-api/comment/unit/'+_0x2615a6+_0xd51716(0xe1),{'body':_0x4bcafe}),_0x288247=_0x2e3c6f[_0xd51716(0xc4)](_0x4edb51=>_0x359430(_0x5cc8aa[_0xd51716(0xb9)][_0xd51716(0xcb)][_0x4edb51],_0x2615a6,_0x58f42b))[_0xd51716(0xb7)](Boolean);return Object[_0xd51716(0xd9)](_0x5cc8aa['body'][_0xd51716(0x13a)])['forEach'](_0xdc53e6=>{const _0x5119d2=_0xd51716;this[_0x5119d2(0xc9)][_0x5119d2(0xad)](_0xdc53e6);}),_0x288247;}[_0x4381ea(0x103)](_0x12919c){const _0x3b91e4=_0x4381ea;return{'id':_0x12919c['id'],'threadId':_0x12919c['threadId'],'ref':_0x12919c[_0x3b91e4(0xda)]};}};_0x491fd7=_0x2f474d([_0x92d0d6(0x0,_0x27b004['Inject'](_0x1127b3[_0x4381ea(0xed)])),_0x92d0d6(0x1,_0x27b004['Inject'](_0x27b004[_0x4381ea(0xd2)])),_0x92d0d6(0x2,_0x27b004[_0x4381ea(0xbd)](_0x24a599['CollaborationSessionService'])),_0x92d0d6(0x3,_0x27b004[_0x4381ea(0xbd)](_0x27b004['Injector']))],_0x491fd7);var _0x238b10=Object[_0x4381ea(0xff)],_0x3a8756=Object[_0x4381ea(0x105)],_0xd9ee09=(_0x15e3e1,_0x380c7b,_0x1c7f00,_0x19b7f6)=>{const _0x2ee752=_0x4381ea;for(var _0x4981a8=_0x19b7f6>0x1?void 0x0:_0x19b7f6?_0x3a8756(_0x380c7b,_0x1c7f00):_0x380c7b,_0x1d33bb=_0x15e3e1[_0x2ee752(0xc6)]-0x1,_0x42e69b;_0x1d33bb>=0x0;_0x1d33bb--)(_0x42e69b=_0x15e3e1[_0x1d33bb])&&(_0x4981a8=(_0x19b7f6?_0x42e69b(_0x380c7b,_0x1c7f00,_0x4981a8):_0x42e69b(_0x4981a8))||_0x4981a8);return _0x19b7f6&&_0x4981a8&&_0x238b10(_0x380c7b,_0x1c7f00,_0x4981a8),_0x4981a8;},_0x115cae=(_0x48fa67,_0x327d1e)=>(_0x14d25f,_0x3786a6)=>_0x327d1e(_0x14d25f,_0x3786a6,_0x48fa67);let _0x25b878=class{constructor(_0xb2816a){this['_httpService']=_0xb2816a;}async[_0x4381ea(0x13d)](_0x19292d,_0x5cd080,_0x46f2f4){const _0x20f090=_0x4381ea,_0xeed74e=new URL(window[_0x20f090(0x11a)][_0x20f090(0x107)])['searchParams'][_0x20f090(0xb3)]('unit');if(!_0xeed74e)return[];const _0x1b4991=window[_0x20f090(0x11a)][_0x20f090(0xbc)],_0x14150e=window[_0x20f090(0x11a)][_0x20f090(0x136)]==='https:'?_0x20f090(0x112):_0x20f090(0x120);return(await this[_0x20f090(0xd7)][_0x20f090(0xb3)](_0x14150e+_0x20f090(0x10b)+_0x1b4991+_0x20f090(0xf0),{'params':{'objectID':_0xeed74e,'unitID':_0xeed74e}}))['body'][_0x20f090(0xca)][_0x20f090(0xc4)](_0x4d4b33=>{const _0x4652a4=_0x20f090;var _0x49128d,_0x2d08e3,_0x5a58fb,_0x561bdc,_0xd845a7,_0x67f39;return{'id':(_0x2d08e3=(_0x49128d=_0x4d4b33['subject'])==null?void 0x0:_0x49128d[_0x4652a4(0xf6)])!=null?_0x2d08e3:'','label':(_0x561bdc=(_0x5a58fb=_0x4d4b33['subject'])==null?void 0x0:_0x5a58fb['name'])!=null?_0x561bdc:'','icon':(_0x67f39=(_0xd845a7=_0x4d4b33[_0x4652a4(0xd3)])==null?void 0x0:_0xd845a7['avatar'])!=null?_0x67f39:'','type':'user'};});}};_0x25b878=_0xd9ee09([_0x115cae(0x0,_0x27b004[_0x4381ea(0xbd)](_0x1127b3[_0x4381ea(0xed)]))],_0x25b878);var _0x298d3a=Object['defineProperty'],_0x561e11=Object[_0x4381ea(0x105)],_0x1ee0ad=(_0x2878ab,_0x4f7ecd,_0x2c294f,_0x22da17)=>{for(var _0x25af8b=_0x22da17>0x1?void 0x0:_0x22da17?_0x561e11(_0x4f7ecd,_0x2c294f):_0x4f7ecd,_0x3f3076=_0x2878ab['length']-0x1,_0x1f9ecc;_0x3f3076>=0x0;_0x3f3076--)(_0x1f9ecc=_0x2878ab[_0x3f3076])&&(_0x25af8b=(_0x22da17?_0x1f9ecc(_0x4f7ecd,_0x2c294f,_0x25af8b):_0x1f9ecc(_0x25af8b))||_0x25af8b);return _0x22da17&&_0x25af8b&&_0x298d3a(_0x4f7ecd,_0x2c294f,_0x25af8b),_0x25af8b;},_0x3d39a5=(_0x3e6c4e,_0x5a65b8)=>(_0x54f298,_0x4e949c)=>_0x5a65b8(_0x54f298,_0x4e949c,_0x3e6c4e);let _0x233a12=class extends _0x27b004['Disposable']{constructor(_0x37d2a1,_0x52aea8,_0x4e641c,_0x2eb796){const _0xb0730d=_0x4381ea;super(),this[_0xb0730d(0x110)]=_0x37d2a1,this[_0xb0730d(0x116)]=_0x52aea8,this['_threadCommentMentionDataService']=_0x4e641c,this[_0xb0730d(0x119)]=_0x2eb796,this[_0xb0730d(0xef)]();}['_initDataSource'](){const _0x459e3a=_0x4381ea;this[_0x459e3a(0x110)][_0x459e3a(0xac)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x459e3a(0x109)]=!0x1,this[_0x459e3a(0x12c)]['dataSource']=this[_0x459e3a(0x119)];}};_0x233a12=_0x1ee0ad([_0x3d39a5(0x0,_0x2adc5c[_0x4381ea(0x135)]),_0x3d39a5(0x1,_0x27b004[_0x4381ea(0xbd)](_0x491fd7)),_0x3d39a5(0x2,_0x35a6ea[_0x4381ea(0xc2)]),_0x3d39a5(0x3,_0x27b004[_0x4381ea(0xbd)](_0x25b878))],_0x233a12);var _0x8ef2b=Object['defineProperty'],_0x4dea50=Object[_0x4381ea(0x105)],_0xb19c21=(_0x4016b2,_0x554af8,_0x58109f)=>_0x554af8 in _0x4016b2?_0x8ef2b(_0x4016b2,_0x554af8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x58109f}):_0x4016b2[_0x554af8]=_0x58109f,_0x49fbec=(_0x187c25,_0x214e56,_0x203ce4,_0x216db7)=>{for(var _0x16bec4=_0x216db7>0x1?void 0x0:_0x216db7?_0x4dea50(_0x214e56,_0x203ce4):_0x214e56,_0x453296=_0x187c25['length']-0x1,_0x6f0c7f;_0x453296>=0x0;_0x453296--)(_0x6f0c7f=_0x187c25[_0x453296])&&(_0x16bec4=(_0x216db7?_0x6f0c7f(_0x214e56,_0x203ce4,_0x16bec4):_0x6f0c7f(_0x16bec4))||_0x16bec4);return _0x216db7&&_0x16bec4&&_0x8ef2b(_0x214e56,_0x203ce4,_0x16bec4),_0x16bec4;},_0x236b47=(_0x1c5ddc,_0x8fb32f)=>(_0xd12b1a,_0x3c3907)=>_0x8fb32f(_0xd12b1a,_0x3c3907,_0x1c5ddc),_0x212290=(_0x495dba,_0x257cb1,_0x2615d8)=>_0xb19c21(_0x495dba,typeof _0x257cb1!=_0x4381ea(0x13b)?_0x257cb1+'':_0x257cb1,_0x2615d8);_0x4d006a[_0x4381ea(0xee)]=class extends _0x27b004[_0x4381ea(0xc8)]{constructor(_0x12a5c0=_0x24efaf,_0x42ba7a,_0x55c14c){const _0x25b76a=_0x4381ea;super(),this[_0x25b76a(0xec)]=_0x12a5c0,this[_0x25b76a(0xe3)]=_0x42ba7a,this[_0x25b76a(0xd4)]=_0x55c14c;const {..._0x417c97}=this[_0x25b76a(0xec)];this['_configService']['setConfig'](_0x242e2a,_0x417c97);}[_0x4381ea(0x111)](){const _0x47f4cc=_0x4381ea;[[_0x25b878],[_0x491fd7],[_0x233a12],[_0x59a249]][_0x47f4cc(0xb1)](_0x387259=>{const _0x5af48c=_0x47f4cc;this[_0x5af48c(0xe3)][_0x5af48c(0x123)](_0x387259);}),this[_0x47f4cc(0xe3)][_0x47f4cc(0xb3)](_0x233a12);}['onReady'](){const _0x5cccad=_0x4381ea;this[_0x5cccad(0xe3)][_0x5cccad(0xb3)](_0x59a249);}},_0x212290(_0x4d006a[_0x4381ea(0xee)],_0x4381ea(0xbf),_0xe795ad),_0x212290(_0x4d006a['UniverThreadCommentDataSourcePlugin'],_0x4381ea(0x10c),_0x27b004[_0x4381ea(0x10a)]['UNIVER_UNKNOWN']),_0x4d006a['UniverThreadCommentDataSourcePlugin']=_0x49fbec([_0x27b004[_0x4381ea(0xeb)](_0x2adc5c[_0x4381ea(0xd5)],_0x35a6ea[_0x4381ea(0x10e)],_0x24a599[_0x4381ea(0xdc)],_0x49a6ca[_0x4381ea(0x10d)]),_0x236b47(0x1,_0x27b004[_0x4381ea(0xbd)](_0x27b004[_0x4381ea(0xfe)])),_0x236b47(0x2,_0x27b004[_0x4381ea(0xea)])],_0x4d006a['UniverThreadCommentDataSourcePlugin']),Object[_0x4381ea(0xff)](_0x4d006a,Symbol[_0x4381ea(0xe4)],{'value':_0x4381ea(0xe0)});}));function _0x4a9b(_0xb0167e,_0x238273){const _0x340fe0=_0x340f();return _0x4a9b=function(_0x4a9b7b,_0x1f4b5b){_0x4a9b7b=_0x4a9b7b-0xab;let _0x22ef63=_0x340fe0[_0x4a9b7b];return _0x22ef63;},_0x4a9b(_0xb0167e,_0x238273);}function _0x340f(){const _0x226318=['thread-comment-data-source.config','YYYY/MM/DD\x20HH:mm','18IddlIL','dataSource','addUser','subscribe','_initUserSync','rxjs','forEach','threadId','get','payload','@univerjs/core','content','filter','UNRECOGNIZED','body','CommentService','UniverThreadCommentDatasource','host','Inject','_commentService','pluginName','getThread','367112jtfmek','IThreadCommentMentionDataService','disposeWithMe','map','personId','length','/reply','Plugin','_userService','collaborators','comments','rangeType','error','deleteComment','addComment','parse','solved','UserManagerService','subject','_configService','UniverThreadCommentPlugin','@univerjs-pro/collaboration-client','_httpService','replyId','values','ref','ThreadCommentModel','UniverCollaborationClientPlugin','object','comment','293700upmOXI','Module','/list','requireSession','_injector','toStringTag','11439OnbQfA','post','68WAyctP','resolved','Solve','IConfigService','DependentOn','_config','HTTPService','UniverThreadCommentDataSourcePlugin','_initDataSource','/universer-api/authz/collaborator','/universer-api/user/list','UniverCollaborationClient','_threadCommentModel','Add','getMemberID','userID','/universer-api/comment/unit/','getUser','userId','Solved','customRanges','UniverThreadCommentUi','165924XXjZWu','Injector','defineProperty','Edit','Delete','Disposable','saveCommentToSnapshot','@univerjs/thread-comment','getOwnPropertyDescriptor','OpenOrReOpen','href','Reply','syncUpdateMutationToColla','UniverInstanceType','://','type','UniverLicensePlugin','UniverThreadCommentUIPlugin','delete','_threadCommentDataSourceService','onStarting','https','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/edit','parentId','_threadCommentDataSource','updateComment','@univerjs-pro/license','_threadCommentMentionDataSource','location','user','dayjs','7eosyxU','UniverLicense','commentUpdate$','http','/add','replies','add','code','size','971910UBvxav','1272390RSihgl','createTimestamp','480356eWgkom','@univerjs/network','rangeId','_threadCommentMentionDataService','_sessionService','bufferTime','/delete','format','COMMENT','listComments','_init','function','IThreadCommentDataSourceService','protocol','CustomRangeType','getCurrentUser','Unknown','users','symbol','slice','getMentions'];_0x340f=function(){return _0x226318;};return _0x340f();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0-alpha.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,31 +45,31 @@
|
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"dayjs": ">=1.11.0",
|
|
47
47
|
"rxjs": ">=7.0.0",
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.
|
|
49
|
-
"@univerjs-pro/license": "0.
|
|
50
|
-
"@univerjs/network": "0.
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.4.0-alpha.0",
|
|
49
|
+
"@univerjs-pro/license": "0.4.0-alpha.0",
|
|
50
|
+
"@univerjs/network": "0.4.0-alpha.0",
|
|
51
|
+
"@univerjs/core": "0.4.0-alpha.0",
|
|
52
|
+
"@univerjs/thread-comment-ui": "0.4.0-alpha.0",
|
|
53
|
+
"@univerjs/thread-comment": "0.4.0-alpha.0"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"dayjs": "^1.11.13",
|
|
57
|
-
"@univerjs-pro/collaboration-client": "0.
|
|
58
|
-
"@univerjs-pro/license": "0.
|
|
59
|
-
"@univerjs/
|
|
60
|
-
"@univerjs/core": "0.
|
|
61
|
-
"@univerjs-
|
|
62
|
-
"@univerjs/thread-comment": "0.3.0-nightly.202410111606",
|
|
57
|
+
"@univerjs-pro/collaboration-client": "0.4.0-alpha.0",
|
|
58
|
+
"@univerjs-pro/license": "0.4.0-alpha.0",
|
|
59
|
+
"@univerjs-pro/facade": "0.4.0-alpha.0",
|
|
60
|
+
"@univerjs/core": "0.4.0-alpha.0",
|
|
61
|
+
"@univerjs/thread-comment": "0.4.0-alpha.0",
|
|
63
62
|
"@univerjs/protocol": "0.1.39-alpha.24",
|
|
64
|
-
"@univerjs/
|
|
65
|
-
"@univerjs/uniscript": "0.
|
|
63
|
+
"@univerjs/network": "0.4.0-alpha.0",
|
|
64
|
+
"@univerjs/uniscript": "0.4.0-alpha.0",
|
|
65
|
+
"@univerjs/thread-comment-ui": "0.4.0-alpha.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"rxjs": "^7.8.1",
|
|
69
69
|
"typescript": "5.6.3",
|
|
70
70
|
"vite": "^5.4.8",
|
|
71
71
|
"vitest": "^2.1.2",
|
|
72
|
-
"@univerjs-infra/shared": "0.
|
|
72
|
+
"@univerjs-infra/shared": "0.4.0-alpha.0"
|
|
73
73
|
},
|
|
74
74
|
"univerSpace": {
|
|
75
75
|
".": {
|