@univerjs-pro/thread-comment-datasource 0.10.7-nightly.202509130640 → 0.10.7-nightly.202509130703
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x49849a=_0x1b25;(function(_0x17097c,_0x5949ad){const _0x234dd9=_0x1b25,_0x524c25=_0x17097c();while(!![]){try{const _0x5e18a2=parseInt(_0x234dd9(0xf2))/0x1*(parseInt(_0x234dd9(0xd0))/0x2)+-parseInt(_0x234dd9(0xc5))/0x3*(parseInt(_0x234dd9(0xc4))/0x4)+-parseInt(_0x234dd9(0xdb))/0x5+-parseInt(_0x234dd9(0xfc))/0x6*(-parseInt(_0x234dd9(0xce))/0x7)+-parseInt(_0x234dd9(0xde))/0x8*(-parseInt(_0x234dd9(0xc7))/0x9)+-parseInt(_0x234dd9(0xd4))/0xa*(-parseInt(_0x234dd9(0xf0))/0xb)+parseInt(_0x234dd9(0xc2))/0xc;if(_0x5e18a2===_0x5949ad)break;else _0x524c25['push'](_0x524c25['shift']());}catch(_0x327095){_0x524c25['push'](_0x524c25['shift']());}}}(_0x1839,0x9fdd4));Object[_0x49849a(0xbb)](exports,Symbol[_0x49849a(0xb7)],{'value':_0x49849a(0x10c)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x49849a(0xa5);var I=(_0x312a05=>(_0x312a05[_0x312a05[_0x49849a(0xfa)]=0x0]=_0x49849a(0xfa),_0x312a05[_0x312a05[_0x49849a(0x101)]=0x1]=_0x49849a(0x101),_0x312a05[_0x312a05['UNRECOGNIZED']=-0x1]=_0x49849a(0xcb),_0x312a05))(I||{}),v=(_0x1ae531=>(_0x1ae531[_0x1ae531[_0x49849a(0xed)]=0x0]=_0x49849a(0xed),_0x1ae531[_0x1ae531[_0x49849a(0xff)]=0x1]=_0x49849a(0xff),_0x1ae531[_0x1ae531['Reply']=0x2]=_0x49849a(0xe7),_0x1ae531[_0x1ae531[_0x49849a(0x9d)]=0x3]=_0x49849a(0x9d),_0x1ae531[_0x1ae531[_0x49849a(0xa6)]=0x4]=_0x49849a(0xa6),_0x1ae531[_0x1ae531[_0x49849a(0xe8)]=0x5]=_0x49849a(0xe8),_0x1ae531[_0x1ae531['UNRECOGNIZED']=-0x1]=_0x49849a(0xcb),_0x1ae531))(v||{});const f=_0xaffd06=>c['dayjs'](new Date(+_0xaffd06))[_0x49849a(0xaa)]('YYYY/MM/DD\x20HH:mm'),R=async(_0xd4fa1e,_0x57b9e7)=>{const _0x1c1de2=_0x49849a,_0x1daa1a=_0xd4fa1e[_0x1c1de2(0xd8)](c[_0x1c1de2(0x10d)]),_0xa0d3ca=_0xd4fa1e[_0x1c1de2(0xd8)](P[_0x1c1de2(0x10a)]);_0x57b9e7[_0x1c1de2(0xe2)](_0x5e54c4=>{const _0x33a6cf=_0x1c1de2;_0x1daa1a['getUser'](_0x5e54c4)&&_0x57b9e7[_0x33a6cf(0xad)](_0x5e54c4);}),_0x57b9e7[_0x1c1de2(0x9e)]&&(await _0xa0d3ca['get'](_0x1c1de2(0xf4),{'params':{'userIDs':[..._0x57b9e7]}}))[_0x1c1de2(0xb8)][_0x1c1de2(0xfe)]['forEach'](_0x889a6d=>{const _0x41ea46=_0x1c1de2;_0x889a6d&&_0x1daa1a[_0x41ea46(0xc0)](_0x889a6d);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x46cf74,_0x4d573c,_0x1be50f,_0x2cbe3e)=>{const _0x38fd78=_0x49849a;for(var _0x4ce09e=_0x2cbe3e>0x1?void 0x0:_0x2cbe3e?$(_0x4d573c,_0x1be50f):_0x4d573c,_0x40b36b=_0x46cf74[_0x38fd78(0xf1)]-0x1,_0x2e1cea;_0x40b36b>=0x0;_0x40b36b--)(_0x2e1cea=_0x46cf74[_0x40b36b])&&(_0x4ce09e=_0x2e1cea(_0x4ce09e)||_0x4ce09e);return _0x4ce09e;},S=(_0x364aa3,_0x39835f)=>(_0x1e4f48,_0x1a7725)=>_0x39835f(_0x1e4f48,_0x1a7725,_0x364aa3);let _=class extends c[_0x49849a(0xe6)]{constructor(_0x134a4e,_0xd58ec8,_0x58705b,_0x38d45b){const _0xbbdb00=_0x49849a;super(),this['_commentService']=_0x134a4e,this[_0xbbdb00(0xa2)]=_0xd58ec8,this[_0xbbdb00(0x109)]=_0x58705b,this[_0xbbdb00(0xdf)]=_0x38d45b,this[_0xbbdb00(0xa9)](),this[_0xbbdb00(0x104)]();}['_initUserSync'](){const _0x3c0e24=_0x49849a;this['disposeWithMe'](this['_threadCommentModel'][_0x3c0e24(0xb2)]['pipe'](j[_0x3c0e24(0x102)](0x10))['subscribe'](_0x432b7d=>{const _0x19e386=new Set();_0x432b7d['forEach'](_0x245074=>{const _0x1f5bd5=_0x1b25;switch(_0x245074[_0x1f5bd5(0x100)]){case _0x1f5bd5(0x108):{const _0x5d6bac=_0x245074[_0x1f5bd5(0xe1)][_0x1f5bd5(0xcd)];_0x19e386[_0x1f5bd5(0x108)](_0x5d6bac);break;}}}),R(this['_injector'],_0x19e386);}));}[_0x49849a(0xa9)](){const _0x10926c=_0x49849a;this['disposeWithMe'](this['_commentService'][_0x10926c(0xb2)][_0x10926c(0xee)](async _0x3ee7f1=>{const _0x525cc=_0x10926c;var _0x247e3b,_0x3e5776,_0x39b69a,_0x481261;const _0xf6ddea=(_0x247e3b=this[_0x525cc(0xa2)][_0x525cc(0xae)](_0x3ee7f1[_0x525cc(0xb3)])[_0x525cc(0xf3)](_0x3e7110=>_0x3e7110[_0x525cc(0x98)]===_0x3ee7f1['threadId']))==null?void 0x0:_0x247e3b[_0x525cc(0xe9)];if(!_0xf6ddea)return;const {unitId:_0x1f708f,subUnitId:_0x941e44}=_0xf6ddea;switch(_0x3ee7f1[_0x525cc(0xdd)]&&this[_0x525cc(0x109)][_0x525cc(0xc0)](_0x3ee7f1['user']),_0x3ee7f1[_0x525cc(0x100)]){case v['Add']:break;case v[_0x525cc(0xe7)]:{this[_0x525cc(0xa2)][_0x525cc(0xc6)](_0x1f708f,_0x941e44,{'unitId':_0x1f708f,'subUnitId':_0x941e44,'ref':'','id':_0x3ee7f1['replyId'],'dT':f(+_0x3ee7f1[_0x525cc(0xa0)]),'threadId':_0x3ee7f1['threadId'],'personId':(_0x39b69a=(_0x3e5776=_0x3ee7f1[_0x525cc(0xdd)])==null?void 0x0:_0x3e5776[_0x525cc(0x105)])!=null?_0x39b69a:_0x3ee7f1[_0x525cc(0x10b)],'text':JSON[_0x525cc(0xca)](_0x3ee7f1['content']),'parentId':_0xf6ddea['id']});break;}case v[_0x525cc(0xa6)]:{const _0x3da445=this[_0x525cc(0xa2)][_0x525cc(0xec)](_0x1f708f,_0x941e44,_0x3ee7f1[_0x525cc(0x97)]);_0x3da445&&_0x3da445[_0x525cc(0xfd)]&&this[_0x525cc(0xa2)][_0x525cc(0xc8)](_0x1f708f,_0x941e44,_0x3ee7f1[_0x525cc(0x97)]);break;}case v[_0x525cc(0x9d)]:{this[_0x525cc(0xa2)][_0x525cc(0xcf)](_0x1f708f,_0x941e44,{'commentId':_0x3ee7f1[_0x525cc(0x97)],'text':JSON['parse'](_0x3ee7f1[_0x525cc(0x107)])});break;}case v[_0x525cc(0xe8)]:{const _0x4946bf=(_0x481261=this[_0x525cc(0xa2)][_0x525cc(0xae)](_0x3ee7f1[_0x525cc(0xb3)])[_0x525cc(0xf3)](_0x1b6483=>_0x1b6483[_0x525cc(0x98)]===_0x3ee7f1[_0x525cc(0x98)]))==null?void 0x0:_0x481261[_0x525cc(0xe9)];_0x4946bf&&this[_0x525cc(0xa2)][_0x525cc(0xd7)](_0x1f708f,_0x941e44,_0x4946bf['id'],_0x3ee7f1[_0x525cc(0x9b)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x49849a(0x9a)](b[_0x49849a(0xc3)])),S(0x1,c[_0x49849a(0x9a)](M[_0x49849a(0xda)])),S(0x2,c[_0x49849a(0x9a)](c[_0x49849a(0x10d)])),S(0x3,c['Inject'](c[_0x49849a(0x106)]))],_);const q=_0x49849a(0xaf),D={};var A=Object[_0x49849a(0xe4)],x=(_0x28acd5,_0x3c3297,_0x1237d6,_0xcb3979)=>{const _0x35ab1a=_0x49849a;for(var _0x221137=_0xcb3979>0x1?void 0x0:_0xcb3979?A(_0x3c3297,_0x1237d6):_0x3c3297,_0xf17d99=_0x28acd5[_0x35ab1a(0xf1)]-0x1,_0x1b3a6a;_0xf17d99>=0x0;_0xf17d99--)(_0x1b3a6a=_0x28acd5[_0xf17d99])&&(_0x221137=_0x1b3a6a(_0x221137)||_0x221137);return _0x221137;},C=(_0x47ae62,_0x3085cc)=>(_0x1c5de8,_0x4cb897)=>_0x3085cc(_0x1c5de8,_0x4cb897,_0x47ae62);function _0x1839(){const _0x47b387=['getMemberID','OpenOrReOpen','UniverLicensePlugin','6vQLOUx','parentId','users','Add','type','Solved','bufferTime','_configService','_initUserSync','userID','Injector','content','add','_userService','HTTPService','userId','Module','UserManagerService','replyId','threadId','DependentOn','Inject','solved','comments','Edit','size','slice','createTimestamp','onReady','_threadCommentModel','CustomRangeType','getCurrentUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','reply','rangeId','_init','format','comment','UniverThreadCommentDataSourcePlugin','delete','getUnit','thread-comment-data-source.config','replies','customRanges','commentUpdate$','unitId','post','_threadCommentDataSourceService','syncUpdateMutationToColla','toStringTag','body','COMMENT','_initDataSource','defineProperty','onStarting','_config','/delete','dayjs','addUser','UniverThreadCommentUIPlugin','7660956AENmyF','CommentService','97876VTuntm','57NkvNlX','addComment','8712iAoBUN','deleteComment','requireSession','parse','UNRECOGNIZED','merge','personId','139573HKcXXc','updateComment','282FfZuQl','_threadCommentDataSource','map','listComments','30maknyU','/universer-api/comment/unit/','filter','resolveComment','get','setConfig','ThreadCommentModel','4462755CiQrsY','_httpService','user','680tpPxdc','_injector','dataSource','payload','forEach','ref','getOwnPropertyDescriptor','IThreadCommentDataSourceService','Disposable','Reply','Solve','root','code','error','getComment','Unknown','subscribe','UniverCollaborationClientPlugin','3329832TWHdsb','length','2578jaTHMa','find','/universer-api/user/list','rangeType','stringify','IConfigService','YYYY/MM/DD\x20HH:mm'];_0x1839=function(){return _0x47b387;};return _0x1839();}function Y(_0x4a8510,_0x5bed3b){const _0x2916a1=_0x49849a,_0x1ade84=_0x4a8510['replies'][0x0];return{..._0x5bed3b,'id':_0x1ade84['replyId'],'resolved':_0x4a8510[_0x2916a1(0x9b)]===0x1,'dT':f(_0x1ade84[_0x2916a1(0xa0)]),'personId':_0x1ade84[_0x2916a1(0x10b)],'threadId':_0x1ade84[_0x2916a1(0x98)]};}function G(_0x2d649c,_0xcbf474,_0x233a8c){const _0x2596de=_0x49849a;var _0x1688a2,_0x126139;if(((_0x126139=(_0x1688a2=_0x2d649c==null?void 0x0:_0x2d649c[_0x2596de(0xb0)])==null?void 0x0:_0x1688a2[_0x2596de(0xf1)])!=null?_0x126139:0x0)>0x0){const _0x29e902=(_0xda353d,_0x369e68)=>({'id':_0xda353d[_0x2596de(0x97)],'threadId':_0xda353d[_0x2596de(0x98)],'dT':f(_0xda353d['createTimestamp']),'personId':_0xda353d[_0x2596de(0x10b)],'resolved':_0x2d649c[_0x2596de(0x9b)]===I[_0x2596de(0x101)],'unitId':_0xcbf474,'subUnitId':_0x233a8c,'text':JSON['parse'](_0xda353d[_0x2596de(0x107)]),'parentId':_0x369e68}),_0x1da4cd=_0x29e902(_0x2d649c[_0x2596de(0xb0)][0x0]);return{..._0x1da4cd,'children':_0x2d649c[_0x2596de(0xb0)][_0x2596de(0x9f)](0x1)['map'](_0x24207b=>_0x29e902(_0x24207b,_0x1da4cd['id']))};}return null;}function _0x1b25(_0x5eec79,_0x58c0a9){const _0x1839ec=_0x1839();return _0x1b25=function(_0x1b2596,_0x3f07b3){_0x1b2596=_0x1b2596-0x97;let _0x55b4a6=_0x1839ec[_0x1b2596];return _0x55b4a6;},_0x1b25(_0x5eec79,_0x58c0a9);}let p=class{constructor(_0x48e75f,_0x2dfbf4,_0xac536b){const _0x41e2bb=_0x49849a;this['_httpService']=_0x48e75f,this[_0x41e2bb(0x109)]=_0x2dfbf4,this['_sessionService']=_0xac536b;}async[_0x49849a(0xc6)](_0x1ee7a7){const _0xa8cc94=_0x49849a;var _0x4d389a,_0x1a9b2a;const {parentId:_0xaa053a,unitId:_0x39bf24,text:_0x5a0221,threadId:_0x57ae52}=_0x1ee7a7,_0xae0c70=(_0x1a9b2a=(_0x4d389a=_0x5a0221[_0xa8cc94(0xb1)])==null?void 0x0:_0x4d389a['filter'](_0x4b1fa4=>_0x4b1fa4[_0xa8cc94(0xf5)]===c[_0xa8cc94(0xa3)]['COMMENT'])[_0xa8cc94(0xd2)](_0x384124=>_0x384124[_0xa8cc94(0xa8)]))!=null?_0x1a9b2a:[],_0x294ff5=JSON[_0xa8cc94(0xf6)](_0x5a0221),_0xd0a4b=(await this['_sessionService'][_0xa8cc94(0xc9)](_0x39bf24))['getMemberID']();if(_0xaa053a){const _0x186ba8={'memberId':_0xd0a4b,'unitId':_0x39bf24,'content':_0x294ff5,'mention':_0xae0c70,'threadId':_0x57ae52},_0x35d198=(await this[_0xa8cc94(0xdc)][_0xa8cc94(0xb4)](_0xa8cc94(0xd5)+_0x39bf24+'/reply',{'body':_0x186ba8}))[_0xa8cc94(0xb8)][_0xa8cc94(0xa7)];return{..._0x1ee7a7,'id':_0x35d198[_0xa8cc94(0x97)],'dT':c[_0xa8cc94(0xbf)](+_0x35d198[_0xa8cc94(0xa0)])[_0xa8cc94(0xaa)](_0xa8cc94(0xf8)),'personId':_0x35d198[_0xa8cc94(0x10b)]};}else{const _0x57020a={'memberId':_0xd0a4b,'unitId':_0x39bf24,'content':_0x294ff5,'mention':_0xae0c70},_0x47ae2e=await this['_httpService'][_0xa8cc94(0xb4)](_0xa8cc94(0xd5)+_0x39bf24+'/add',{'body':_0x57020a});return Y(_0x47ae2e[_0xa8cc94(0xb8)][_0xa8cc94(0xab)],_0x1ee7a7);}}async['updateComment'](_0x1a8086){const _0x92aecd=_0x49849a;var _0x57dc0a,_0x25ee45;const {text:_0x233f98,unitId:_0x2e49c7}=_0x1a8086,_0x1ffec2=(_0x25ee45=(_0x57dc0a=_0x233f98[_0x92aecd(0xb1)])==null?void 0x0:_0x57dc0a[_0x92aecd(0xd6)](_0x6e2f40=>_0x6e2f40[_0x92aecd(0xf5)]===c[_0x92aecd(0xa3)][_0x92aecd(0xb9)])[_0x92aecd(0xd2)](_0x49d312=>_0x49d312[_0x92aecd(0xa8)]))!=null?_0x25ee45:[],_0x80d7b0=JSON[_0x92aecd(0xf6)](_0x233f98),_0x40d9bd=_0x1a8086['threadId'],_0x340ba6=_0x1a8086['id'],_0x25896f={'memberId':(await this['_sessionService'][_0x92aecd(0xc9)](_0x2e49c7))['getMemberID'](),'unitId':_0x2e49c7,'threadId':_0x40d9bd,'mention':_0x1ffec2,'content':_0x80d7b0,'replyId':_0x340ba6},_0x164cce=await this[_0x92aecd(0xdc)]['post'](_0x92aecd(0xd5)+_0x2e49c7+'/edit',{'body':_0x25896f});return!_0x164cce[_0x92aecd(0xb8)]['error']||_0x164cce['body']['error'][_0x92aecd(0xea)]===0x1;}async['resolveComment'](_0x398697){const _0x47e287=_0x49849a,{unitId:_0x360442}=_0x398697,_0x47f84d=_0x398697[_0x47e287(0x98)],_0x368f62={'memberId':this['_userService'][_0x47e287(0xa4)]()['userID'],'unitId':_0x360442,'threadId':_0x47f84d,'solved':_0x398697['resolved']?I[_0x47e287(0x101)]:I[_0x47e287(0xfa)]},_0x3ec6c6=await this[_0x47e287(0xdc)]['post'](_0x47e287(0xd5)+_0x360442+'/solved',{'body':_0x368f62});return!_0x3ec6c6[_0x47e287(0xb8)][_0x47e287(0xeb)]||_0x3ec6c6[_0x47e287(0xb8)][_0x47e287(0xeb)][_0x47e287(0xea)]===0x1;}async[_0x49849a(0xc8)](_0x222255,_0x398185,_0x33aaa1,_0x48da19){const _0x5ec98a=_0x49849a,_0x317c17={'memberId':(await this['_sessionService'][_0x5ec98a(0xc9)](_0x222255))[_0x5ec98a(0xf9)](),'threadId':_0x33aaa1,'replyId':_0x48da19,'unitId':_0x222255},_0xdfc739=await this[_0x5ec98a(0xdc)][_0x5ec98a(0xb4)](_0x5ec98a(0xd5)+_0x222255+_0x5ec98a(0xbe),{'body':_0x317c17});return!_0xdfc739[_0x5ec98a(0xb8)][_0x5ec98a(0xeb)]||_0xdfc739[_0x5ec98a(0xb8)][_0x5ec98a(0xeb)][_0x5ec98a(0xea)]===0x1;}async[_0x49849a(0xd3)](_0x1a5f90,_0x4b3361,_0x25af2e){const _0x5d9143=_0x49849a,_0x39aa6={'unitId':_0x1a5f90,'threadId':_0x25af2e},_0x43c4b1=await this[_0x5d9143(0xdc)][_0x5d9143(0xb4)](_0x5d9143(0xd5)+_0x1a5f90+'/list',{'body':_0x39aa6}),_0x2d62d8=_0x25af2e[_0x5d9143(0xd2)](_0x1691d3=>G(_0x43c4b1[_0x5d9143(0xb8)][_0x5d9143(0x9c)][_0x1691d3],_0x1a5f90,_0x4b3361))[_0x5d9143(0xd6)](Boolean);return Object['values'](_0x43c4b1[_0x5d9143(0xb8)][_0x5d9143(0xfe)])[_0x5d9143(0xe2)](_0x596c59=>{const _0x2005f6=_0x5d9143;this[_0x2005f6(0x109)][_0x2005f6(0xc0)](_0x596c59);}),_0x2d62d8;}['saveCommentToSnapshot'](_0xa23ad3){const _0x3b3339=_0x49849a;return{'id':_0xa23ad3['id'],'threadId':_0xa23ad3['threadId'],'ref':_0xa23ad3[_0x3b3339(0xe3)]};}};p=x([C(0x0,c[_0x49849a(0x9a)](P[_0x49849a(0x10a)])),C(0x1,c['Inject'](c[_0x49849a(0x10d)])),C(0x2,c[_0x49849a(0x9a)](b['CollaborationSessionService']))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x304088,_0x1e80e5,_0x2293ac,_0x25119f)=>{const _0x53ebfa=_0x49849a;for(var _0x165bef=_0x25119f>0x1?void 0x0:_0x25119f?H(_0x1e80e5,_0x2293ac):_0x1e80e5,_0x57d192=_0x304088[_0x53ebfa(0xf1)]-0x1,_0x56f873;_0x57d192>=0x0;_0x57d192--)(_0x56f873=_0x304088[_0x57d192])&&(_0x165bef=_0x56f873(_0x165bef)||_0x165bef);return _0x165bef;},y=(_0x389415,_0x31b75a)=>(_0x42f9b1,_0x143d6a)=>_0x31b75a(_0x42f9b1,_0x143d6a,_0x389415);let g=class extends c[_0x49849a(0xe6)]{constructor(_0x230bb8,_0x2907dd){const _0x1ae40a=_0x49849a;super(),this['_threadCommentDataSourceService']=_0x230bb8,this[_0x1ae40a(0xd1)]=_0x2907dd,this[_0x1ae40a(0xba)]();}[_0x49849a(0xba)](){const _0x2f583c=_0x49849a;this['_threadCommentDataSourceService'][_0x2f583c(0xe0)]=this[_0x2f583c(0xd1)],this[_0x2f583c(0xb5)][_0x2f583c(0xb6)]=!0x1;}};g=J([y(0x0,M[_0x49849a(0xe5)]),y(0x1,c[_0x49849a(0x9a)](p))],g);var F=Object[_0x49849a(0xbb)],L=Object[_0x49849a(0xe4)],Z=(_0x1a1974,_0x1a44d7,_0x3b4e52)=>_0x1a44d7 in _0x1a1974?F(_0x1a1974,_0x1a44d7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b4e52}):_0x1a1974[_0x1a44d7]=_0x3b4e52,W=(_0x5db762,_0x44506d,_0x4b2ba5,_0x5bed5)=>{const _0x51f9a1=_0x49849a;for(var _0x39f63a=_0x5bed5>0x1?void 0x0:_0x5bed5?L(_0x44506d,_0x4b2ba5):_0x44506d,_0x590ebe=_0x5db762[_0x51f9a1(0xf1)]-0x1,_0x30796f;_0x590ebe>=0x0;_0x590ebe--)(_0x30796f=_0x5db762[_0x590ebe])&&(_0x39f63a=_0x30796f(_0x39f63a)||_0x39f63a);return _0x39f63a;},O=(_0x363b7d,_0x50b8ab)=>(_0x543329,_0x27ccb0)=>_0x50b8ab(_0x543329,_0x27ccb0,_0x363b7d),N=(_0x14db5a,_0x2bfcfe,_0x3098f8)=>Z(_0x14db5a,typeof _0x2bfcfe!='symbol'?_0x2bfcfe+'':_0x2bfcfe,_0x3098f8);exports[_0x49849a(0xac)]=class extends c['Plugin']{constructor(_0x463f92=D,_0xbca383,_0x4d1096){const _0x274119=_0x49849a;super(),this[_0x274119(0xbd)]=_0x463f92,this['_injector']=_0xbca383,this[_0x274119(0x103)]=_0x4d1096;const {..._0x4ca1c9}=c[_0x274119(0xcc)]({},D,this[_0x274119(0xbd)]);this[_0x274119(0x103)][_0x274119(0xd9)](q,_0x4ca1c9);}[_0x49849a(0xbc)](){[[p],[g],[_]]['forEach'](_0x55168d=>{const _0x18940d=_0x1b25;this[_0x18940d(0xdf)][_0x18940d(0x108)](_0x55168d);});}[_0x49849a(0xa1)](){const _0x437a69=_0x49849a;this['_injector'][_0x437a69(0xd8)](g),this[_0x437a69(0xdf)][_0x437a69(0xd8)](_);}},N(exports[_0x49849a(0xac)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x49849a(0x100),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x49849a(0x99)](w[_0x49849a(0xc1)],b[_0x49849a(0xef)],T[_0x49849a(0xfb)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x49849a(0xf7)])],exports[_0x49849a(0xac)]);
|
|
1
|
+
'use strict';const _0x55a94b=_0x54de;(function(_0x779c3,_0x1c84f8){const _0x25f57e=_0x54de,_0x1a98d8=_0x779c3();while(!![]){try{const _0x4c6160=parseInt(_0x25f57e(0x1dd))/0x1+-parseInt(_0x25f57e(0x189))/0x2*(parseInt(_0x25f57e(0x1a2))/0x3)+parseInt(_0x25f57e(0x1b6))/0x4+-parseInt(_0x25f57e(0x1cc))/0x5+parseInt(_0x25f57e(0x1f9))/0x6+-parseInt(_0x25f57e(0x19b))/0x7*(parseInt(_0x25f57e(0x195))/0x8)+-parseInt(_0x25f57e(0x191))/0x9*(-parseInt(_0x25f57e(0x1e0))/0xa);if(_0x4c6160===_0x1c84f8)break;else _0x1a98d8['push'](_0x1a98d8['shift']());}catch(_0x504a52){_0x1a98d8['push'](_0x1a98d8['shift']());}}}(_0x33cc,0x1f3b3));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x55a94b(0x1d6);var I=(_0x195761=>(_0x195761[_0x195761[_0x55a94b(0x1a1)]=0x0]='OpenOrReOpen',_0x195761[_0x195761[_0x55a94b(0x183)]=0x1]=_0x55a94b(0x183),_0x195761[_0x195761['UNRECOGNIZED']=-0x1]=_0x55a94b(0x1ee),_0x195761))(I||{}),v=(_0x92eb4e=>(_0x92eb4e[_0x92eb4e[_0x55a94b(0x1e1)]=0x0]=_0x55a94b(0x1e1),_0x92eb4e[_0x92eb4e[_0x55a94b(0x18e)]=0x1]=_0x55a94b(0x18e),_0x92eb4e[_0x92eb4e['Reply']=0x2]=_0x55a94b(0x1e2),_0x92eb4e[_0x92eb4e[_0x55a94b(0x1ed)]=0x3]=_0x55a94b(0x1ed),_0x92eb4e[_0x92eb4e[_0x55a94b(0x182)]=0x4]=_0x55a94b(0x182),_0x92eb4e[_0x92eb4e[_0x55a94b(0x197)]=0x5]='Solve',_0x92eb4e[_0x92eb4e['UNRECOGNIZED']=-0x1]=_0x55a94b(0x1ee),_0x92eb4e))(v||{});const f=_0x172109=>c['dayjs'](new Date(+_0x172109))[_0x55a94b(0x1a3)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x3dea13,_0x5db893)=>{const _0x4caaa9=_0x55a94b,_0x571e70=_0x3dea13[_0x4caaa9(0x1cd)](c[_0x4caaa9(0x1ec)]),_0x4c2895=_0x3dea13[_0x4caaa9(0x1cd)](P[_0x4caaa9(0x1e4)]);_0x5db893['forEach'](_0x53fd9e=>{const _0xa02853=_0x4caaa9;_0x571e70[_0xa02853(0x18f)](_0x53fd9e)&&_0x5db893[_0xa02853(0x1ef)](_0x53fd9e);}),_0x5db893['size']&&(await _0x4c2895[_0x4caaa9(0x1cd)](_0x4caaa9(0x1f3),{'params':{'userIDs':[..._0x5db893]}}))[_0x4caaa9(0x1e8)][_0x4caaa9(0x1a6)][_0x4caaa9(0x18d)](_0x3bebb8=>{const _0x511db8=_0x4caaa9;_0x3bebb8&&_0x571e70[_0x511db8(0x1ab)](_0x3bebb8);});};var $=Object[_0x55a94b(0x1ac)],E=(_0x27683a,_0x21fce1,_0xaa306b,_0x1989bb)=>{for(var _0x423dfc=_0x1989bb>0x1?void 0x0:_0x1989bb?$(_0x21fce1,_0xaa306b):_0x21fce1,_0x2398c0=_0x27683a['length']-0x1,_0x8e87e3;_0x2398c0>=0x0;_0x2398c0--)(_0x8e87e3=_0x27683a[_0x2398c0])&&(_0x423dfc=_0x8e87e3(_0x423dfc)||_0x423dfc);return _0x423dfc;},S=(_0x778437,_0x5d4a7c)=>(_0xbe4541,_0x388d4c)=>_0x5d4a7c(_0xbe4541,_0x388d4c,_0x778437);let _=class extends c[_0x55a94b(0x1c0)]{constructor(_0x46dba6,_0xb7d97b,_0x144857,_0x40a0f4){const _0x525427=_0x55a94b;super(),this['_commentService']=_0x46dba6,this['_threadCommentModel']=_0xb7d97b,this[_0x525427(0x1d2)]=_0x144857,this['_injector']=_0x40a0f4,this['_init'](),this['_initUserSync']();}[_0x55a94b(0x1b1)](){const _0x4389bc=_0x55a94b;this[_0x4389bc(0x1e3)](this['_threadCommentModel']['commentUpdate$']['pipe'](j[_0x4389bc(0x1a8)](0x10))[_0x4389bc(0x1d7)](_0x2c1f15=>{const _0x2bde30=_0x4389bc,_0x5efa28=new Set();_0x2c1f15[_0x2bde30(0x18d)](_0x3432a6=>{const _0x41bc3b=_0x2bde30;switch(_0x3432a6['type']){case _0x41bc3b(0x1f6):{const _0x4e3c46=_0x3432a6['payload'][_0x41bc3b(0x1da)];_0x5efa28['add'](_0x4e3c46);break;}}}),R(this[_0x2bde30(0x1df)],_0x5efa28);}));}[_0x55a94b(0x186)](){const _0x1d54b3=_0x55a94b;this[_0x1d54b3(0x1e3)](this[_0x1d54b3(0x1aa)][_0x1d54b3(0x1d3)][_0x1d54b3(0x1d7)](async _0xe1e18d=>{const _0x5b2e51=_0x1d54b3;var _0x1a4b4e,_0x57a2be,_0x5983c9,_0x4f01a0;const _0x1b22bf=(_0x1a4b4e=this[_0x5b2e51(0x1b0)][_0x5b2e51(0x1c8)](_0xe1e18d[_0x5b2e51(0x1d5)])[_0x5b2e51(0x193)](_0x1eee10=>_0x1eee10['threadId']===_0xe1e18d[_0x5b2e51(0x1c2)]))==null?void 0x0:_0x1a4b4e[_0x5b2e51(0x1de)];if(!_0x1b22bf)return;const {unitId:_0x58e188,subUnitId:_0x48a8d8}=_0x1b22bf;switch(_0xe1e18d['user']&&this['_userService'][_0x5b2e51(0x1ab)](_0xe1e18d[_0x5b2e51(0x1fa)]),_0xe1e18d[_0x5b2e51(0x1c5)]){case v[_0x5b2e51(0x18e)]:break;case v['Reply']:{this[_0x5b2e51(0x1b0)]['addComment'](_0x58e188,_0x48a8d8,{'unitId':_0x58e188,'subUnitId':_0x48a8d8,'ref':'','id':_0xe1e18d['replyId'],'dT':f(+_0xe1e18d['createTimestamp']),'threadId':_0xe1e18d[_0x5b2e51(0x1c2)],'personId':(_0x5983c9=(_0x57a2be=_0xe1e18d[_0x5b2e51(0x1fa)])==null?void 0x0:_0x57a2be[_0x5b2e51(0x1d9)])!=null?_0x5983c9:_0xe1e18d[_0x5b2e51(0x196)],'text':JSON['parse'](_0xe1e18d['content']),'parentId':_0x1b22bf['id']});break;}case v[_0x5b2e51(0x182)]:{const _0x508dda=this['_threadCommentModel'][_0x5b2e51(0x1ba)](_0x58e188,_0x48a8d8,_0xe1e18d[_0x5b2e51(0x1db)]);_0x508dda&&_0x508dda[_0x5b2e51(0x192)]&&this[_0x5b2e51(0x1b0)][_0x5b2e51(0x1f4)](_0x58e188,_0x48a8d8,_0xe1e18d[_0x5b2e51(0x1db)]);break;}case v[_0x5b2e51(0x1ed)]:{this[_0x5b2e51(0x1b0)]['updateComment'](_0x58e188,_0x48a8d8,{'commentId':_0xe1e18d[_0x5b2e51(0x1db)],'text':JSON[_0x5b2e51(0x1c4)](_0xe1e18d['content'])});break;}case v['Solve']:{const _0x247778=(_0x4f01a0=this[_0x5b2e51(0x1b0)][_0x5b2e51(0x1c8)](_0xe1e18d['unitId'])[_0x5b2e51(0x193)](_0xd46e4f=>_0xd46e4f[_0x5b2e51(0x1c2)]===_0xe1e18d[_0x5b2e51(0x1c2)]))==null?void 0x0:_0x4f01a0[_0x5b2e51(0x1de)];_0x247778&&this['_threadCommentModel'][_0x5b2e51(0x1e9)](_0x58e188,_0x48a8d8,_0x247778['id'],_0xe1e18d[_0x5b2e51(0x1ae)]===I[_0x5b2e51(0x183)]);break;}}}));}};_=E([S(0x0,c[_0x55a94b(0x1a0)](b['CommentService'])),S(0x1,c[_0x55a94b(0x1a0)](M['ThreadCommentModel'])),S(0x2,c[_0x55a94b(0x1a0)](c[_0x55a94b(0x1ec)])),S(0x3,c[_0x55a94b(0x1a0)](c[_0x55a94b(0x18b)]))],_);const q=_0x55a94b(0x194),D={};var A=Object[_0x55a94b(0x1ac)],x=(_0x3b6462,_0x3bb5bb,_0x265340,_0x191b26)=>{const _0x19120d=_0x55a94b;for(var _0x37ca69=_0x191b26>0x1?void 0x0:_0x191b26?A(_0x3bb5bb,_0x265340):_0x3bb5bb,_0x1478d3=_0x3b6462[_0x19120d(0x198)]-0x1,_0x18fcca;_0x1478d3>=0x0;_0x1478d3--)(_0x18fcca=_0x3b6462[_0x1478d3])&&(_0x37ca69=_0x18fcca(_0x37ca69)||_0x37ca69);return _0x37ca69;},C=(_0x1fb7e0,_0x114bef)=>(_0x1f3895,_0x15045f)=>_0x114bef(_0x1f3895,_0x15045f,_0x1fb7e0);function Y(_0x4ac46e,_0x27e53b){const _0x756e07=_0x55a94b,_0x2506be=_0x4ac46e[_0x756e07(0x1cb)][0x0];return{..._0x27e53b,'id':_0x2506be['replyId'],'resolved':_0x4ac46e['solved']===0x1,'dT':f(_0x2506be[_0x756e07(0x1dc)]),'personId':_0x2506be[_0x756e07(0x196)],'threadId':_0x2506be[_0x756e07(0x1c2)]};}function G(_0x1c7126,_0x4066d9,_0x3b3e7d){const _0x2b7afc=_0x55a94b;var _0x50b09a,_0x420e01;if(((_0x420e01=(_0x50b09a=_0x1c7126==null?void 0x0:_0x1c7126[_0x2b7afc(0x1cb)])==null?void 0x0:_0x50b09a[_0x2b7afc(0x198)])!=null?_0x420e01:0x0)>0x0){const _0x2afa18=(_0x2f349c,_0x5cc918)=>({'id':_0x2f349c['replyId'],'threadId':_0x2f349c[_0x2b7afc(0x1c2)],'dT':f(_0x2f349c[_0x2b7afc(0x1dc)]),'personId':_0x2f349c[_0x2b7afc(0x196)],'resolved':_0x1c7126['solved']===I[_0x2b7afc(0x183)],'unitId':_0x4066d9,'subUnitId':_0x3b3e7d,'text':JSON[_0x2b7afc(0x1c4)](_0x2f349c[_0x2b7afc(0x1b7)]),'parentId':_0x5cc918}),_0x37c0f1=_0x2afa18(_0x1c7126[_0x2b7afc(0x1cb)][0x0]);return{..._0x37c0f1,'children':_0x1c7126[_0x2b7afc(0x1cb)][_0x2b7afc(0x184)](0x1)[_0x2b7afc(0x19e)](_0x1a90bf=>_0x2afa18(_0x1a90bf,_0x37c0f1['id']))};}return null;}let p=class{constructor(_0x2ee2b6,_0x384f2c,_0x5d4e50){const _0x54ac7c=_0x55a94b;this['_httpService']=_0x2ee2b6,this[_0x54ac7c(0x1d2)]=_0x384f2c,this[_0x54ac7c(0x188)]=_0x5d4e50;}async['addComment'](_0x12af66){const _0x3b2bd3=_0x55a94b;var _0x34ab0d,_0x134c4d;const {parentId:_0x59755c,unitId:_0x2dd079,text:_0x4ec01f,threadId:_0xfe74ae}=_0x12af66,_0x528d78=(_0x134c4d=(_0x34ab0d=_0x4ec01f[_0x3b2bd3(0x1b4)])==null?void 0x0:_0x34ab0d[_0x3b2bd3(0x1c1)](_0x6ed3d2=>_0x6ed3d2[_0x3b2bd3(0x1be)]===c[_0x3b2bd3(0x1b9)][_0x3b2bd3(0x1e7)])[_0x3b2bd3(0x19e)](_0x1aeb20=>_0x1aeb20[_0x3b2bd3(0x1b3)]))!=null?_0x134c4d:[],_0x2285e8=JSON['stringify'](_0x4ec01f),_0x43ab54=(await this[_0x3b2bd3(0x188)]['requireSession'](_0x2dd079))[_0x3b2bd3(0x185)]();if(_0x59755c){const _0x608ff2={'memberId':_0x43ab54,'unitId':_0x2dd079,'content':_0x2285e8,'mention':_0x528d78,'threadId':_0xfe74ae},_0xf47c52=(await this[_0x3b2bd3(0x1ca)][_0x3b2bd3(0x1af)](_0x3b2bd3(0x1bb)+_0x2dd079+_0x3b2bd3(0x1a9),{'body':_0x608ff2}))[_0x3b2bd3(0x1e8)]['reply'];return{..._0x12af66,'id':_0xf47c52[_0x3b2bd3(0x1db)],'dT':c[_0x3b2bd3(0x1e6)](+_0xf47c52[_0x3b2bd3(0x1dc)])['format'](_0x3b2bd3(0x1f2)),'personId':_0xf47c52[_0x3b2bd3(0x196)]};}else{const _0x2ac460={'memberId':_0x43ab54,'unitId':_0x2dd079,'content':_0x2285e8,'mention':_0x528d78},_0x8dcc20=await this['_httpService'][_0x3b2bd3(0x1af)](_0x3b2bd3(0x1bb)+_0x2dd079+_0x3b2bd3(0x1bd),{'body':_0x2ac460});return Y(_0x8dcc20[_0x3b2bd3(0x1e8)][_0x3b2bd3(0x199)],_0x12af66);}}async[_0x55a94b(0x1a4)](_0x5a70f5){const _0x2dd672=_0x55a94b;var _0x331cfa,_0x44d2bb;const {text:_0x3fbb9a,unitId:_0x256ee0}=_0x5a70f5,_0x13e4c9=(_0x44d2bb=(_0x331cfa=_0x3fbb9a[_0x2dd672(0x1b4)])==null?void 0x0:_0x331cfa[_0x2dd672(0x1c1)](_0x298853=>_0x298853['rangeType']===c[_0x2dd672(0x1b9)][_0x2dd672(0x1e7)])[_0x2dd672(0x19e)](_0x334274=>_0x334274[_0x2dd672(0x1b3)]))!=null?_0x44d2bb:[],_0x59bf10=JSON[_0x2dd672(0x18a)](_0x3fbb9a),_0x368633=_0x5a70f5['threadId'],_0x13f3fd=_0x5a70f5['id'],_0x5d1686={'memberId':(await this[_0x2dd672(0x188)][_0x2dd672(0x1f0)](_0x256ee0))[_0x2dd672(0x185)](),'unitId':_0x256ee0,'threadId':_0x368633,'mention':_0x13e4c9,'content':_0x59bf10,'replyId':_0x13f3fd},_0x59e74a=await this[_0x2dd672(0x1ca)][_0x2dd672(0x1af)]('/universer-api/comment/unit/'+_0x256ee0+_0x2dd672(0x1c6),{'body':_0x5d1686});return!_0x59e74a[_0x2dd672(0x1e8)][_0x2dd672(0x1b2)]||_0x59e74a[_0x2dd672(0x1e8)][_0x2dd672(0x1b2)][_0x2dd672(0x1ce)]===0x1;}async[_0x55a94b(0x1e9)](_0x5c143e){const _0x4062cc=_0x55a94b,{unitId:_0xc41f1e}=_0x5c143e,_0x64a631=_0x5c143e['threadId'],_0x18d71c={'memberId':this['_userService'][_0x4062cc(0x19a)]()[_0x4062cc(0x1d9)],'unitId':_0xc41f1e,'threadId':_0x64a631,'solved':_0x5c143e['resolved']?I[_0x4062cc(0x183)]:I[_0x4062cc(0x1a1)]},_0x161489=await this[_0x4062cc(0x1ca)][_0x4062cc(0x1af)](_0x4062cc(0x1bb)+_0xc41f1e+'/solved',{'body':_0x18d71c});return!_0x161489[_0x4062cc(0x1e8)][_0x4062cc(0x1b2)]||_0x161489['body'][_0x4062cc(0x1b2)][_0x4062cc(0x1ce)]===0x1;}async['deleteComment'](_0x279b13,_0x3823b0,_0x3d985b,_0x2c3d3e){const _0x5054a1=_0x55a94b,_0xcec117={'memberId':(await this[_0x5054a1(0x188)][_0x5054a1(0x1f0)](_0x279b13))[_0x5054a1(0x185)](),'threadId':_0x3d985b,'replyId':_0x2c3d3e,'unitId':_0x279b13},_0x4ca8a2=await this[_0x5054a1(0x1ca)][_0x5054a1(0x1af)](_0x5054a1(0x1bb)+_0x279b13+_0x5054a1(0x1eb),{'body':_0xcec117});return!_0x4ca8a2[_0x5054a1(0x1e8)][_0x5054a1(0x1b2)]||_0x4ca8a2['body'][_0x5054a1(0x1b2)][_0x5054a1(0x1ce)]===0x1;}async[_0x55a94b(0x1d8)](_0x2799b0,_0x19e132,_0x1506da){const _0x34fa87=_0x55a94b,_0x1fbb66={'unitId':_0x2799b0,'threadId':_0x1506da},_0x330c72=await this['_httpService'][_0x34fa87(0x1af)](_0x34fa87(0x1bb)+_0x2799b0+_0x34fa87(0x1f1),{'body':_0x1fbb66}),_0x4bfc1a=_0x1506da['map'](_0x248990=>G(_0x330c72[_0x34fa87(0x1e8)][_0x34fa87(0x1f5)][_0x248990],_0x2799b0,_0x19e132))['filter'](Boolean);return Object[_0x34fa87(0x1ad)](_0x330c72[_0x34fa87(0x1e8)][_0x34fa87(0x1a6)])['forEach'](_0x21f3ed=>{this['_userService']['addUser'](_0x21f3ed);}),_0x4bfc1a;}[_0x55a94b(0x1bf)](_0x3503fd){const _0x444d33=_0x55a94b;return{'id':_0x3503fd['id'],'threadId':_0x3503fd[_0x444d33(0x1c2)],'ref':_0x3503fd[_0x444d33(0x187)]};}};p=x([C(0x0,c[_0x55a94b(0x1a0)](P[_0x55a94b(0x1e4)])),C(0x1,c[_0x55a94b(0x1a0)](c[_0x55a94b(0x1ec)])),C(0x2,c[_0x55a94b(0x1a0)](b['CollaborationSessionService']))],p);var H=Object[_0x55a94b(0x1ac)],J=(_0x36fa31,_0x483ec5,_0x4682ee,_0x2a3fb5)=>{const _0x2f6be7=_0x55a94b;for(var _0x28d2ac=_0x2a3fb5>0x1?void 0x0:_0x2a3fb5?H(_0x483ec5,_0x4682ee):_0x483ec5,_0x229314=_0x36fa31[_0x2f6be7(0x198)]-0x1,_0x193cce;_0x229314>=0x0;_0x229314--)(_0x193cce=_0x36fa31[_0x229314])&&(_0x28d2ac=_0x193cce(_0x28d2ac)||_0x28d2ac);return _0x28d2ac;},y=(_0x2e0374,_0x58a984)=>(_0x3c9689,_0x1cce14)=>_0x58a984(_0x3c9689,_0x1cce14,_0x2e0374);function _0x54de(_0x123aa1,_0x3a3b7b){const _0x33cc0a=_0x33cc();return _0x54de=function(_0x54decf,_0x30a3c8){_0x54decf=_0x54decf-0x182;let _0x157de3=_0x33cc0a[_0x54decf];return _0x157de3;},_0x54de(_0x123aa1,_0x3a3b7b);}let g=class extends c[_0x55a94b(0x1c0)]{constructor(_0x406129,_0x3e732e){const _0x354fc2=_0x55a94b;super(),this[_0x354fc2(0x1d0)]=_0x406129,this[_0x354fc2(0x190)]=_0x3e732e,this[_0x354fc2(0x1a7)]();}[_0x55a94b(0x1a7)](){const _0x413919=_0x55a94b;this[_0x413919(0x1d0)]['dataSource']=this[_0x413919(0x190)],this[_0x413919(0x1d0)][_0x413919(0x18c)]=!0x1;}};g=J([y(0x0,M[_0x55a94b(0x1c7)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x55a94b(0x19d)],L=Object['getOwnPropertyDescriptor'],Z=(_0x9de6fa,_0x33202b,_0x5af61a)=>_0x33202b in _0x9de6fa?F(_0x9de6fa,_0x33202b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5af61a}):_0x9de6fa[_0x33202b]=_0x5af61a,W=(_0x2afe23,_0x53d7fd,_0x4b2b3c,_0x27676f)=>{for(var _0x371a0d=_0x27676f>0x1?void 0x0:_0x27676f?L(_0x53d7fd,_0x4b2b3c):_0x53d7fd,_0x513f2b=_0x2afe23['length']-0x1,_0x491649;_0x513f2b>=0x0;_0x513f2b--)(_0x491649=_0x2afe23[_0x513f2b])&&(_0x371a0d=_0x491649(_0x371a0d)||_0x371a0d);return _0x371a0d;},O=(_0x594187,_0x299c78)=>(_0x54171e,_0x1ef037)=>_0x299c78(_0x54171e,_0x1ef037,_0x594187),N=(_0x21a138,_0x49a20c,_0xc06c57)=>Z(_0x21a138,typeof _0x49a20c!='symbol'?_0x49a20c+'':_0x49a20c,_0xc06c57);exports[_0x55a94b(0x1bc)]=class extends c[_0x55a94b(0x1a5)]{constructor(_0x4ade27=D,_0xa32a14,_0x32e9f5){const _0x14b714=_0x55a94b;super(),this[_0x14b714(0x19f)]=_0x4ade27,this[_0x14b714(0x1df)]=_0xa32a14,this[_0x14b714(0x1b5)]=_0x32e9f5;const {..._0x4b4c02}=c[_0x14b714(0x1c9)]({},D,this['_config']);this[_0x14b714(0x1b5)][_0x14b714(0x1ea)](q,_0x4b4c02);}[_0x55a94b(0x19c)](){const _0x32cc2e=_0x55a94b;[[p],[g],[_]][_0x32cc2e(0x18d)](_0x5d1701=>{const _0x40b091=_0x32cc2e;this[_0x40b091(0x1df)][_0x40b091(0x1f6)](_0x5d1701);});}[_0x55a94b(0x1c3)](){const _0xb08d87=_0x55a94b;this[_0xb08d87(0x1df)][_0xb08d87(0x1cd)](g),this[_0xb08d87(0x1df)]['get'](_);}},N(exports[_0x55a94b(0x1bc)],_0x55a94b(0x1d1),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x55a94b(0x1c5),c[_0x55a94b(0x1e5)][_0x55a94b(0x1d4)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](w[_0x55a94b(0x1cf)],b[_0x55a94b(0x1b8)],T[_0x55a94b(0x1f8)]),O(0x1,c[_0x55a94b(0x1a0)](c[_0x55a94b(0x18b)])),O(0x2,c[_0x55a94b(0x1f7)])],exports[_0x55a94b(0x1bc)]);function _0x33cc(){const _0x3f71f2=['delete','requireSession','/list','YYYY/MM/DD\x20HH:mm','/universer-api/user/list','deleteComment','comments','add','IConfigService','UniverLicensePlugin','348204gxnyUA','user','Delete','Solved','slice','getMemberID','_init','ref','_sessionService','118dEzGeO','stringify','Injector','syncUpdateMutationToColla','forEach','Add','getUser','_threadCommentDataSource','9lYSKZa','parentId','find','thread-comment-data-source.config','7512ylTqum','userId','Solve','length','comment','getCurrentUser','1295XHsBop','onStarting','defineProperty','map','_config','Inject','OpenOrReOpen','8784xjiuCf','format','updateComment','Plugin','users','_initDataSource','bufferTime','/reply','_commentService','addUser','getOwnPropertyDescriptor','values','solved','post','_threadCommentModel','_initUserSync','error','rangeId','customRanges','_configService','957768oVaIRX','content','UniverCollaborationClientPlugin','CustomRangeType','getComment','/universer-api/comment/unit/','UniverThreadCommentDataSourcePlugin','/add','rangeType','saveCommentToSnapshot','Disposable','filter','threadId','onReady','parse','type','/edit','IThreadCommentDataSourceService','getUnit','merge','_httpService','replies','1169805qbVhau','get','code','UniverThreadCommentUIPlugin','_threadCommentDataSourceService','pluginName','_userService','commentUpdate$','UNIVER_UNKNOWN','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','listComments','userID','personId','replyId','createTimestamp','117657JuXBLd','root','_injector','2932180uXbeMn','Unknown','Reply','disposeWithMe','HTTPService','UniverInstanceType','dayjs','COMMENT','body','resolveComment','setConfig','/delete','UserManagerService','Edit','UNRECOGNIZED'];_0x33cc=function(){return _0x3f71f2;};return _0x33cc();}
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5bf11d=_0x5c98;(function(_0x2e1a9f,_0x30be59){const _0x36f4ce=_0x5c98,_0x340a84=_0x2e1a9f();while(!![]){try{const _0x4b898f=parseInt(_0x36f4ce(0xdd))/0x1+-parseInt(_0x36f4ce(0xf1))/0x2*(-parseInt(_0x36f4ce(0xd6))/0x3)+parseInt(_0x36f4ce(0xe3))/0x4+-parseInt(_0x36f4ce(0xdb))/0x5*(-parseInt(_0x36f4ce(0xd0))/0x6)+-parseInt(_0x36f4ce(0xc9))/0x7*(parseInt(_0x36f4ce(0xf6))/0x8)+parseInt(_0x36f4ce(0xaf))/0x9*(-parseInt(_0x36f4ce(0xa7))/0xa)+parseInt(_0x36f4ce(0xe1))/0xb;if(_0x4b898f===_0x30be59)break;else _0x340a84['push'](_0x340a84['shift']());}catch(_0x326e6d){_0x340a84['push'](_0x340a84['shift']());}}}(_0x13a5,0x32c10));import{CommentService as _0x3e033d,CollaborationSessionService as _0x55d10c,UniverCollaborationClientPlugin as _0x42a23e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2436a8}from'@univerjs-pro/license';import{dayjs as _0x406095,UserManagerService as _0x370dc1,Inject as _0x139489,Injector as _0x353baa,Disposable as _0x3ad743,CustomRangeType as _0x2abdd2,UniverInstanceType as _0xae0343,DependentOn as _0x13c419,IConfigService as _0x33ac58,Plugin as _0x57b30b,merge as _0x1ae59a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x134544}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xfaeaef,IThreadCommentDataSourceService as _0x31dc00}from'@univerjs/thread-comment';import{bufferTime as _0x1b3cbd}from'rxjs';import{HTTPService as _0x4acda9}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xa5a42e=>(_0xa5a42e[_0xa5a42e[_0x5bf11d(0xda)]=0x0]='OpenOrReOpen',_0xa5a42e[_0xa5a42e[_0x5bf11d(0xa9)]=0x1]=_0x5bf11d(0xa9),_0xa5a42e[_0xa5a42e[_0x5bf11d(0xc6)]=-0x1]=_0x5bf11d(0xc6),_0xa5a42e))(I||{}),v=(_0x465061=>(_0x465061[_0x465061[_0x5bf11d(0xd1)]=0x0]=_0x5bf11d(0xd1),_0x465061[_0x465061['Add']=0x1]=_0x5bf11d(0xb0),_0x465061[_0x465061[_0x5bf11d(0xe0)]=0x2]=_0x5bf11d(0xe0),_0x465061[_0x465061[_0x5bf11d(0xae)]=0x3]='Edit',_0x465061[_0x465061[_0x5bf11d(0xbe)]=0x4]='Delete',_0x465061[_0x465061[_0x5bf11d(0xac)]=0x5]='Solve',_0x465061[_0x465061[_0x5bf11d(0xc6)]=-0x1]=_0x5bf11d(0xc6),_0x465061))(v||{});const y=_0x354b69=>_0x406095(new Date(+_0x354b69))[_0x5bf11d(0xe4)](_0x5bf11d(0xf3)),B=async(_0x59c066,_0x265859)=>{const _0x23d640=_0x5bf11d,_0x7cf6a3=_0x59c066[_0x23d640(0xc0)](_0x370dc1),_0xe02f44=_0x59c066[_0x23d640(0xc0)](_0x4acda9);_0x265859[_0x23d640(0xe5)](_0x45aff2=>{const _0x4ffe44=_0x23d640;_0x7cf6a3[_0x4ffe44(0xf7)](_0x45aff2)&&_0x265859[_0x4ffe44(0xdc)](_0x45aff2);}),_0x265859[_0x23d640(0xb6)]&&(await _0xe02f44['get'](_0x23d640(0xb5),{'params':{'userIDs':[..._0x265859]}}))['body'][_0x23d640(0xde)][_0x23d640(0xe5)](_0x3653d2=>{const _0x518695=_0x23d640;_0x3653d2&&_0x7cf6a3[_0x518695(0xc1)](_0x3653d2);});};var K=Object[_0x5bf11d(0xe6)],V=(_0x3bfb34,_0x36803c,_0x2f7419,_0x352174)=>{const _0x28378b=_0x5bf11d;for(var _0x291a75=_0x352174>0x1?void 0x0:_0x352174?K(_0x36803c,_0x2f7419):_0x36803c,_0x23c6c2=_0x3bfb34[_0x28378b(0xc8)]-0x1,_0x3de3bf;_0x23c6c2>=0x0;_0x23c6c2--)(_0x3de3bf=_0x3bfb34[_0x23c6c2])&&(_0x291a75=_0x3de3bf(_0x291a75)||_0x291a75);return _0x291a75;},p=(_0xdb68c,_0x55b200)=>(_0x16f280,_0x1a89d0)=>_0x55b200(_0x16f280,_0x1a89d0,_0xdb68c);let _=class extends _0x3ad743{constructor(_0x4567e3,_0x1cb9ac,_0xc9fcd0,_0x58aecc){const _0x1c15ef=_0x5bf11d;super(),this['_commentService']=_0x4567e3,this[_0x1c15ef(0xba)]=_0x1cb9ac,this['_userService']=_0xc9fcd0,this[_0x1c15ef(0xb7)]=_0x58aecc,this[_0x1c15ef(0xfb)](),this[_0x1c15ef(0xa8)]();}[_0x5bf11d(0xa8)](){const _0x234f5a=_0x5bf11d;this[_0x234f5a(0xe8)](this[_0x234f5a(0xba)][_0x234f5a(0xc3)][_0x234f5a(0x102)](_0x1b3cbd(0x10))[_0x234f5a(0xd7)](_0x4923b1=>{const _0x2026f8=_0x234f5a,_0xf55b68=new Set();_0x4923b1[_0x2026f8(0xe5)](_0x319820=>{const _0x1055b7=_0x2026f8;switch(_0x319820[_0x1055b7(0xcd)]){case _0x1055b7(0xce):{const _0x1e1ce4=_0x319820[_0x1055b7(0xdf)][_0x1055b7(0xef)];_0xf55b68[_0x1055b7(0xce)](_0x1e1ce4);break;}}}),B(this[_0x2026f8(0xb7)],_0xf55b68);}));}[_0x5bf11d(0xfb)](){const _0x3c0edb=_0x5bf11d;this['disposeWithMe'](this[_0x3c0edb(0xfe)][_0x3c0edb(0xc3)][_0x3c0edb(0xd7)](async _0x4027c4=>{const _0x2beaf9=_0x3c0edb;var _0x38148c,_0x5e62cb,_0x2e3854,_0x45f066;const _0x346856=(_0x38148c=this[_0x2beaf9(0xba)][_0x2beaf9(0xb4)](_0x4027c4[_0x2beaf9(0xc4)])[_0x2beaf9(0x101)](_0x22cdba=>_0x22cdba['threadId']===_0x4027c4['threadId']))==null?void 0x0:_0x38148c[_0x2beaf9(0xcf)];if(!_0x346856)return;const {unitId:_0x37c898,subUnitId:_0x2f743d}=_0x346856;switch(_0x4027c4[_0x2beaf9(0xea)]&&this[_0x2beaf9(0xf4)][_0x2beaf9(0xc1)](_0x4027c4[_0x2beaf9(0xea)]),_0x4027c4[_0x2beaf9(0xcd)]){case v[_0x2beaf9(0xb0)]:break;case v['Reply']:{this[_0x2beaf9(0xba)][_0x2beaf9(0xf9)](_0x37c898,_0x2f743d,{'unitId':_0x37c898,'subUnitId':_0x2f743d,'ref':'','id':_0x4027c4[_0x2beaf9(0x108)],'dT':y(+_0x4027c4[_0x2beaf9(0xf2)]),'threadId':_0x4027c4[_0x2beaf9(0x10b)],'personId':(_0x2e3854=(_0x5e62cb=_0x4027c4['user'])==null?void 0x0:_0x5e62cb[_0x2beaf9(0xbb)])!=null?_0x2e3854:_0x4027c4[_0x2beaf9(0xeb)],'text':JSON[_0x2beaf9(0x103)](_0x4027c4['content']),'parentId':_0x346856['id']});break;}case v[_0x2beaf9(0xbe)]:{const _0x38620f=this['_threadCommentModel']['getComment'](_0x37c898,_0x2f743d,_0x4027c4[_0x2beaf9(0x108)]);_0x38620f&&_0x38620f['parentId']&&this[_0x2beaf9(0xba)][_0x2beaf9(0xa5)](_0x37c898,_0x2f743d,_0x4027c4[_0x2beaf9(0x108)]);break;}case v[_0x2beaf9(0xae)]:{this[_0x2beaf9(0xba)][_0x2beaf9(0x109)](_0x37c898,_0x2f743d,{'commentId':_0x4027c4[_0x2beaf9(0x108)],'text':JSON[_0x2beaf9(0x103)](_0x4027c4[_0x2beaf9(0x100)])});break;}case v[_0x2beaf9(0xac)]:{const _0x1317ca=(_0x45f066=this[_0x2beaf9(0xba)][_0x2beaf9(0xb4)](_0x4027c4[_0x2beaf9(0xc4)])[_0x2beaf9(0x101)](_0x5732d5=>_0x5732d5[_0x2beaf9(0x10b)]===_0x4027c4[_0x2beaf9(0x10b)]))==null?void 0x0:_0x45f066[_0x2beaf9(0xcf)];_0x1317ca&&this[_0x2beaf9(0xba)][_0x2beaf9(0xca)](_0x37c898,_0x2f743d,_0x1317ca['id'],_0x4027c4[_0x2beaf9(0xe7)]===I[_0x2beaf9(0xa9)]);break;}}}));}};_=V([p(0x0,_0x139489(_0x3e033d)),p(0x1,_0x139489(_0xfaeaef)),p(0x2,_0x139489(_0x370dc1)),p(0x3,_0x139489(_0x353baa))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x5bf11d(0xe6)],Q=(_0x24661e,_0x4297bf,_0x3af404,_0x1dbed9)=>{const _0x176d9b=_0x5bf11d;for(var _0x128f88=_0x1dbed9>0x1?void 0x0:_0x1dbed9?k(_0x4297bf,_0x3af404):_0x4297bf,_0x585f99=_0x24661e[_0x176d9b(0xc8)]-0x1,_0x3ab8c4;_0x585f99>=0x0;_0x585f99--)(_0x3ab8c4=_0x24661e[_0x585f99])&&(_0x128f88=_0x3ab8c4(_0x128f88)||_0x128f88);return _0x128f88;},b=(_0x1428f6,_0x598794)=>(_0x5b2621,_0x55982e)=>_0x598794(_0x5b2621,_0x55982e,_0x1428f6);function X(_0x73df2,_0x1e4ea3){const _0xb53790=_0x5bf11d,_0x28a9e0=_0x73df2[_0xb53790(0xcb)][0x0];return{..._0x1e4ea3,'id':_0x28a9e0[_0xb53790(0x108)],'resolved':_0x73df2[_0xb53790(0xe7)]===0x1,'dT':y(_0x28a9e0[_0xb53790(0xf2)]),'personId':_0x28a9e0[_0xb53790(0xeb)],'threadId':_0x28a9e0['threadId']};}function ee(_0x105610,_0x5e8c31,_0x141a18){const _0x56050c=_0x5bf11d;var _0x50f0ef,_0xdcf5d9;if(((_0xdcf5d9=(_0x50f0ef=_0x105610==null?void 0x0:_0x105610[_0x56050c(0xcb)])==null?void 0x0:_0x50f0ef[_0x56050c(0xc8)])!=null?_0xdcf5d9:0x0)>0x0){const _0x10d295=(_0xc7e1b7,_0x26cf67)=>({'id':_0xc7e1b7[_0x56050c(0x108)],'threadId':_0xc7e1b7['threadId'],'dT':y(_0xc7e1b7[_0x56050c(0xf2)]),'personId':_0xc7e1b7[_0x56050c(0xeb)],'resolved':_0x105610[_0x56050c(0xe7)]===I[_0x56050c(0xa9)],'unitId':_0x5e8c31,'subUnitId':_0x141a18,'text':JSON[_0x56050c(0x103)](_0xc7e1b7[_0x56050c(0x100)]),'parentId':_0x26cf67}),_0x3da65e=_0x10d295(_0x105610['replies'][0x0]);return{..._0x3da65e,'children':_0x105610[_0x56050c(0xcb)][_0x56050c(0xad)](0x1)[_0x56050c(0x106)](_0x5ec665=>_0x10d295(_0x5ec665,_0x3da65e['id']))};}return null;}let S=class{constructor(_0x1839ec,_0x13413f,_0x338f6b){const _0x53ee56=_0x5bf11d;this[_0x53ee56(0xd5)]=_0x1839ec,this[_0x53ee56(0xf4)]=_0x13413f,this[_0x53ee56(0xfd)]=_0x338f6b;}async[_0x5bf11d(0xf9)](_0x45270a){const _0x3f0d07=_0x5bf11d;var _0x2e3882,_0xbf5c4a;const {parentId:_0x2be2b5,unitId:_0x146327,text:_0x49f1df,threadId:_0x11d063}=_0x45270a,_0x444d32=(_0xbf5c4a=(_0x2e3882=_0x49f1df[_0x3f0d07(0xec)])==null?void 0x0:_0x2e3882['filter'](_0x52638a=>_0x52638a[_0x3f0d07(0xb3)]===_0x2abdd2[_0x3f0d07(0xfa)])[_0x3f0d07(0x106)](_0x576472=>_0x576472[_0x3f0d07(0xc2)]))!=null?_0xbf5c4a:[],_0x4fa583=JSON[_0x3f0d07(0xbf)](_0x49f1df),_0xefe1cf=(await this[_0x3f0d07(0xfd)]['requireSession'](_0x146327))['getMemberID']();if(_0x2be2b5){const _0x5b81d6={'memberId':_0xefe1cf,'unitId':_0x146327,'content':_0x4fa583,'mention':_0x444d32,'threadId':_0x11d063},_0x35f7b8=(await this['_httpService']['post'](_0x3f0d07(0xb2)+_0x146327+_0x3f0d07(0xe9),{'body':_0x5b81d6}))[_0x3f0d07(0x104)][_0x3f0d07(0xee)];return{..._0x45270a,'id':_0x35f7b8[_0x3f0d07(0x108)],'dT':_0x406095(+_0x35f7b8[_0x3f0d07(0xf2)])[_0x3f0d07(0xe4)](_0x3f0d07(0xf3)),'personId':_0x35f7b8[_0x3f0d07(0xeb)]};}else{const _0x3a702d={'memberId':_0xefe1cf,'unitId':_0x146327,'content':_0x4fa583,'mention':_0x444d32},_0x5ccff7=await this[_0x3f0d07(0xd5)]['post']('/universer-api/comment/unit/'+_0x146327+_0x3f0d07(0xc5),{'body':_0x3a702d});return X(_0x5ccff7[_0x3f0d07(0x104)][_0x3f0d07(0xfc)],_0x45270a);}}async[_0x5bf11d(0x109)](_0x1ad167){const _0x442f2f=_0x5bf11d;var _0x5ab67b,_0x11ed83;const {text:_0x51b466,unitId:_0x5ec047}=_0x1ad167,_0x575b41=(_0x11ed83=(_0x5ab67b=_0x51b466['customRanges'])==null?void 0x0:_0x5ab67b['filter'](_0x56a241=>_0x56a241['rangeType']===_0x2abdd2[_0x442f2f(0xfa)])[_0x442f2f(0x106)](_0x506958=>_0x506958['rangeId']))!=null?_0x11ed83:[],_0x320c1c=JSON[_0x442f2f(0xbf)](_0x51b466),_0x4c66e7=_0x1ad167[_0x442f2f(0x10b)],_0x19170e=_0x1ad167['id'],_0xa7bd21={'memberId':(await this[_0x442f2f(0xfd)][_0x442f2f(0xa6)](_0x5ec047))['getMemberID'](),'unitId':_0x5ec047,'threadId':_0x4c66e7,'mention':_0x575b41,'content':_0x320c1c,'replyId':_0x19170e},_0x40277b=await this[_0x442f2f(0xd5)][_0x442f2f(0xd3)](_0x442f2f(0xb2)+_0x5ec047+_0x442f2f(0xe2),{'body':_0xa7bd21});return!_0x40277b[_0x442f2f(0x104)]['error']||_0x40277b[_0x442f2f(0x104)][_0x442f2f(0x107)]['code']===0x1;}async[_0x5bf11d(0xca)](_0x4a2da7){const _0x317f0c=_0x5bf11d,{unitId:_0x316b80}=_0x4a2da7,_0xcff4a8=_0x4a2da7['threadId'],_0x41c37d={'memberId':this['_userService']['getCurrentUser']()[_0x317f0c(0xbb)],'unitId':_0x316b80,'threadId':_0xcff4a8,'solved':_0x4a2da7[_0x317f0c(0xd2)]?I['Solved']:I['OpenOrReOpen']},_0x17dcc6=await this[_0x317f0c(0xd5)][_0x317f0c(0xd3)]('/universer-api/comment/unit/'+_0x316b80+'/solved',{'body':_0x41c37d});return!_0x17dcc6['body'][_0x317f0c(0x107)]||_0x17dcc6[_0x317f0c(0x104)]['error']['code']===0x1;}async[_0x5bf11d(0xa5)](_0x1669fd,_0xdf954d,_0x21fcd4,_0x40cc3e){const _0x2d7b44=_0x5bf11d,_0x145fcb={'memberId':(await this['_sessionService'][_0x2d7b44(0xa6)](_0x1669fd))[_0x2d7b44(0xd4)](),'threadId':_0x21fcd4,'replyId':_0x40cc3e,'unitId':_0x1669fd},_0x2c31f8=await this[_0x2d7b44(0xd5)][_0x2d7b44(0xd3)](_0x2d7b44(0xb2)+_0x1669fd+'/delete',{'body':_0x145fcb});return!_0x2c31f8['body'][_0x2d7b44(0x107)]||_0x2c31f8[_0x2d7b44(0x104)][_0x2d7b44(0x107)]['code']===0x1;}async[_0x5bf11d(0xb1)](_0x4086fa,_0x236b49,_0x56d668){const _0x443b4b=_0x5bf11d,_0x216b2a={'unitId':_0x4086fa,'threadId':_0x56d668},_0x25a709=await this[_0x443b4b(0xd5)][_0x443b4b(0xd3)](_0x443b4b(0xb2)+_0x4086fa+'/list',{'body':_0x216b2a}),_0x8721ad=_0x56d668[_0x443b4b(0x106)](_0x371ab5=>ee(_0x25a709['body'][_0x443b4b(0x105)][_0x371ab5],_0x4086fa,_0x236b49))[_0x443b4b(0xf5)](Boolean);return Object[_0x443b4b(0xbc)](_0x25a709['body'][_0x443b4b(0xde)])[_0x443b4b(0xe5)](_0x287315=>{const _0x4e7811=_0x443b4b;this[_0x4e7811(0xf4)]['addUser'](_0x287315);}),_0x8721ad;}[_0x5bf11d(0xd9)](_0x38d009){const _0x17c816=_0x5bf11d;return{'id':_0x38d009['id'],'threadId':_0x38d009[_0x17c816(0x10b)],'ref':_0x38d009[_0x17c816(0xbd)]};}};S=Q([b(0x0,_0x139489(_0x4acda9)),b(0x1,_0x139489(_0x370dc1)),b(0x2,_0x139489(_0x55d10c))],S);var re=Object[_0x5bf11d(0xe6)],te=(_0x281ea2,_0x17e6ed,_0x2f813a,_0xcdad0e)=>{const _0x22c2a4=_0x5bf11d;for(var _0x3a9061=_0xcdad0e>0x1?void 0x0:_0xcdad0e?re(_0x17e6ed,_0x2f813a):_0x17e6ed,_0x4ee619=_0x281ea2[_0x22c2a4(0xc8)]-0x1,_0x38f483;_0x4ee619>=0x0;_0x4ee619--)(_0x38f483=_0x281ea2[_0x4ee619])&&(_0x3a9061=_0x38f483(_0x3a9061)||_0x3a9061);return _0x3a9061;},M=(_0x58a15e,_0x5dfceb)=>(_0x48230e,_0x221d62)=>_0x5dfceb(_0x48230e,_0x221d62,_0x58a15e);let f=class extends _0x3ad743{constructor(_0x1e1287,_0x333ecf){const _0x5a4e20=_0x5bf11d;super(),this[_0x5a4e20(0x10a)]=_0x1e1287,this['_threadCommentDataSource']=_0x333ecf,this[_0x5a4e20(0xcc)]();}[_0x5bf11d(0xcc)](){const _0xbbc3e4=_0x5bf11d;this[_0xbbc3e4(0x10a)][_0xbbc3e4(0xc7)]=this[_0xbbc3e4(0xa4)],this[_0xbbc3e4(0x10a)][_0xbbc3e4(0xed)]=!0x1;}};f=te([M(0x0,_0x31dc00),M(0x1,_0x139489(S))],f);var se=Object[_0x5bf11d(0xb9)],oe=Object[_0x5bf11d(0xe6)],ne=(_0x3b2842,_0x47248f,_0x1fbeae)=>_0x47248f in _0x3b2842?se(_0x3b2842,_0x47248f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fbeae}):_0x3b2842[_0x47248f]=_0x1fbeae,ie=(_0x3f7c99,_0x18db66,_0x3834f1,_0x49e30c)=>{const _0x416ee1=_0x5bf11d;for(var _0x2b7297=_0x49e30c>0x1?void 0x0:_0x49e30c?oe(_0x18db66,_0x3834f1):_0x18db66,_0x1b7f42=_0x3f7c99[_0x416ee1(0xc8)]-0x1,_0x44c4fc;_0x1b7f42>=0x0;_0x1b7f42--)(_0x44c4fc=_0x3f7c99[_0x1b7f42])&&(_0x2b7297=_0x44c4fc(_0x2b7297)||_0x2b7297);return _0x2b7297;},N=(_0x22ed37,_0x390191)=>(_0x505d01,_0x4a07e5)=>_0x390191(_0x505d01,_0x4a07e5,_0x22ed37),$=(_0x190ed5,_0x4585cc,_0x6972f6)=>ne(_0x190ed5,typeof _0x4585cc!='symbol'?_0x4585cc+'':_0x4585cc,_0x6972f6);let g=class extends _0x57b30b{constructor(_0x3f4ee8=O,_0xc21555,_0x2f17ad){const _0xf7f1b4=_0x5bf11d;super(),this[_0xf7f1b4(0xd8)]=_0x3f4ee8,this[_0xf7f1b4(0xb7)]=_0xc21555,this[_0xf7f1b4(0xab)]=_0x2f17ad;const {..._0x5aa886}=_0x1ae59a({},O,this[_0xf7f1b4(0xd8)]);this[_0xf7f1b4(0xab)][_0xf7f1b4(0xaa)](z,_0x5aa886);}[_0x5bf11d(0xb8)](){[[S],[f],[_]]['forEach'](_0x152f8a=>{this['_injector']['add'](_0x152f8a);});}[_0x5bf11d(0xff)](){const _0x11a33f=_0x5bf11d;this[_0x11a33f(0xb7)][_0x11a33f(0xc0)](f),this[_0x11a33f(0xb7)][_0x11a33f(0xc0)](_);}};$(g,_0x5bf11d(0xf0),W),$(g,_0x5bf11d(0xcd),_0xae0343[_0x5bf11d(0xf8)]),g=ie([_0x13c419(_0x134544,_0x42a23e,_0x2436a8),N(0x1,_0x139489(_0x353baa)),N(0x2,_0x33ac58)],g);export{g as UniverThreadCommentDataSourcePlugin};function _0x5c98(_0x37660f,_0x46c7d4){const _0x13a5fa=_0x13a5();return _0x5c98=function(_0x5c9884,_0x508eff){_0x5c9884=_0x5c9884-0xa4;let _0x14dfa3=_0x13a5fa[_0x5c9884];return _0x14dfa3;},_0x5c98(_0x37660f,_0x46c7d4);}function _0x13a5(){const _0x4599c3=['_configService','Solve','slice','Edit','1722834Aelhmc','Add','listComments','/universer-api/comment/unit/','rangeType','getUnit','/universer-api/user/list','size','_injector','onStarting','defineProperty','_threadCommentModel','userID','values','ref','Delete','stringify','get','addUser','rangeId','commentUpdate$','unitId','/add','UNRECOGNIZED','dataSource','length','1081276IdqyQq','resolveComment','replies','_initDataSource','type','add','root','6Unnzsy','Unknown','resolved','post','getMemberID','_httpService','3uAqxVm','subscribe','_config','saveCommentToSnapshot','OpenOrReOpen','671095ProWqz','delete','83216OEcflq','users','payload','Reply','1039830BowSAD','/edit','728104pWlPOg','format','forEach','getOwnPropertyDescriptor','solved','disposeWithMe','/reply','user','userId','customRanges','syncUpdateMutationToColla','reply','personId','pluginName','428518XmUQtY','createTimestamp','YYYY/MM/DD\x20HH:mm','_userService','filter','16IYopTa','getUser','UNIVER_UNKNOWN','addComment','COMMENT','_init','comment','_sessionService','_commentService','onReady','content','find','pipe','parse','body','comments','map','error','replyId','updateComment','_threadCommentDataSourceService','threadId','_threadCommentDataSource','deleteComment','requireSession','10KkPTVV','_initUserSync','Solved','setConfig'];_0x13a5=function(){return _0x4599c3;};return _0x13a5();}
|
|
1
|
+
const _0x4b08f6=_0x381c;(function(_0x1a1802,_0x58703d){const _0x1f5d02=_0x381c,_0x11f7ef=_0x1a1802();while(!![]){try{const _0x25d3d1=parseInt(_0x1f5d02(0x22d))/0x1+parseInt(_0x1f5d02(0x242))/0x2+parseInt(_0x1f5d02(0x214))/0x3+parseInt(_0x1f5d02(0x237))/0x4+-parseInt(_0x1f5d02(0x236))/0x5+-parseInt(_0x1f5d02(0x1fb))/0x6+parseInt(_0x1f5d02(0x1f7))/0x7*(parseInt(_0x1f5d02(0x238))/0x8);if(_0x25d3d1===_0x58703d)break;else _0x11f7ef['push'](_0x11f7ef['shift']());}catch(_0xca3c9b){_0x11f7ef['push'](_0x11f7ef['shift']());}}}(_0x4e29,0xf19aa));import{CommentService as _0x3fd2fc,CollaborationSessionService as _0x12bcca,UniverCollaborationClientPlugin as _0x3ab8c5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3e3ea1}from'@univerjs-pro/license';import{dayjs as _0x1f5eeb,UserManagerService as _0x229c9b,Inject as _0x33eaaf,Injector as _0x2b41cd,Disposable as _0x22017b,CustomRangeType as _0x2a62af,UniverInstanceType as _0x52cebc,DependentOn as _0x4925bc,IConfigService as _0x4a913c,Plugin as _0x45a9df,merge as _0x59e53c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x341ce2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4adb5b,IThreadCommentDataSourceService as _0x44c2d7}from'@univerjs/thread-comment';import{bufferTime as _0x250720}from'rxjs';import{HTTPService as _0x3fadc1}from'@univerjs/network';const W=_0x4b08f6(0x205);var I=(_0x2c0f1b=>(_0x2c0f1b[_0x2c0f1b[_0x4b08f6(0x1fc)]=0x0]=_0x4b08f6(0x1fc),_0x2c0f1b[_0x2c0f1b['Solved']=0x1]=_0x4b08f6(0x241),_0x2c0f1b[_0x2c0f1b[_0x4b08f6(0x213)]=-0x1]=_0x4b08f6(0x213),_0x2c0f1b))(I||{}),v=(_0x15443b=>(_0x15443b[_0x15443b[_0x4b08f6(0x223)]=0x0]=_0x4b08f6(0x223),_0x15443b[_0x15443b[_0x4b08f6(0x246)]=0x1]=_0x4b08f6(0x246),_0x15443b[_0x15443b[_0x4b08f6(0x1f3)]=0x2]=_0x4b08f6(0x1f3),_0x15443b[_0x15443b[_0x4b08f6(0x201)]=0x3]=_0x4b08f6(0x201),_0x15443b[_0x15443b[_0x4b08f6(0x1ff)]=0x4]=_0x4b08f6(0x1ff),_0x15443b[_0x15443b[_0x4b08f6(0x232)]=0x5]='Solve',_0x15443b[_0x15443b['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x15443b))(v||{});const y=_0x47d6cb=>_0x1f5eeb(new Date(+_0x47d6cb))[_0x4b08f6(0x208)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x344108,_0x2bcc6a)=>{const _0x4a8820=_0x4b08f6,_0x27ce93=_0x344108['get'](_0x229c9b),_0x2213dc=_0x344108['get'](_0x3fadc1);_0x2bcc6a[_0x4a8820(0x24c)](_0x38f3a6=>{const _0x514a27=_0x4a8820;_0x27ce93['getUser'](_0x38f3a6)&&_0x2bcc6a[_0x514a27(0x202)](_0x38f3a6);}),_0x2bcc6a[_0x4a8820(0x233)]&&(await _0x2213dc['get'](_0x4a8820(0x253),{'params':{'userIDs':[..._0x2bcc6a]}}))['body'][_0x4a8820(0x247)][_0x4a8820(0x24c)](_0x2cdec8=>{const _0x5e3604=_0x4a8820;_0x2cdec8&&_0x27ce93[_0x5e3604(0x21f)](_0x2cdec8);});};var K=Object[_0x4b08f6(0x20b)],V=(_0x5b99c2,_0x33ee89,_0x2f33c1,_0x239cf2)=>{const _0x230da9=_0x4b08f6;for(var _0x47df6e=_0x239cf2>0x1?void 0x0:_0x239cf2?K(_0x33ee89,_0x2f33c1):_0x33ee89,_0x131464=_0x5b99c2[_0x230da9(0x203)]-0x1,_0x268999;_0x131464>=0x0;_0x131464--)(_0x268999=_0x5b99c2[_0x131464])&&(_0x47df6e=_0x268999(_0x47df6e)||_0x47df6e);return _0x47df6e;},p=(_0x16a3fa,_0x3dec0f)=>(_0x328608,_0x27e4e3)=>_0x3dec0f(_0x328608,_0x27e4e3,_0x16a3fa);let _=class extends _0x22017b{constructor(_0x3c2990,_0x71bcfc,_0xdab49d,_0x2661da){const _0x1dc93b=_0x4b08f6;super(),this[_0x1dc93b(0x20f)]=_0x3c2990,this['_threadCommentModel']=_0x71bcfc,this[_0x1dc93b(0x24a)]=_0xdab49d,this[_0x1dc93b(0x20e)]=_0x2661da,this[_0x1dc93b(0x20a)](),this[_0x1dc93b(0x230)]();}[_0x4b08f6(0x230)](){const _0x12537b=_0x4b08f6;this[_0x12537b(0x224)](this['_threadCommentModel'][_0x12537b(0x227)]['pipe'](_0x250720(0x10))[_0x12537b(0x221)](_0x146eac=>{const _0x522a8b=_0x12537b,_0x1e65a9=new Set();_0x146eac[_0x522a8b(0x24c)](_0x39566c=>{const _0x56c8e5=_0x522a8b;switch(_0x39566c[_0x56c8e5(0x239)]){case _0x56c8e5(0x252):{const _0x4585e5=_0x39566c[_0x56c8e5(0x21b)][_0x56c8e5(0x1f8)];_0x1e65a9[_0x56c8e5(0x252)](_0x4585e5);break;}}}),B(this[_0x522a8b(0x20e)],_0x1e65a9);}));}[_0x4b08f6(0x20a)](){const _0x4f48c1=_0x4b08f6;this[_0x4f48c1(0x224)](this[_0x4f48c1(0x20f)][_0x4f48c1(0x227)][_0x4f48c1(0x221)](async _0x5677ef=>{const _0xf18cf2=_0x4f48c1;var _0x57000e,_0x51cc66,_0x3797cf,_0x2050e5;const _0x311cf8=(_0x57000e=this[_0xf18cf2(0x1fe)][_0xf18cf2(0x21a)](_0x5677ef[_0xf18cf2(0x234)])['find'](_0x2b9494=>_0x2b9494[_0xf18cf2(0x21c)]===_0x5677ef[_0xf18cf2(0x21c)]))==null?void 0x0:_0x57000e[_0xf18cf2(0x211)];if(!_0x311cf8)return;const {unitId:_0x2d553b,subUnitId:_0x2023ae}=_0x311cf8;switch(_0x5677ef[_0xf18cf2(0x20c)]&&this[_0xf18cf2(0x24a)][_0xf18cf2(0x21f)](_0x5677ef[_0xf18cf2(0x20c)]),_0x5677ef[_0xf18cf2(0x239)]){case v[_0xf18cf2(0x246)]:break;case v['Reply']:{this[_0xf18cf2(0x1fe)]['addComment'](_0x2d553b,_0x2023ae,{'unitId':_0x2d553b,'subUnitId':_0x2023ae,'ref':'','id':_0x5677ef['replyId'],'dT':y(+_0x5677ef['createTimestamp']),'threadId':_0x5677ef[_0xf18cf2(0x21c)],'personId':(_0x3797cf=(_0x51cc66=_0x5677ef['user'])==null?void 0x0:_0x51cc66[_0xf18cf2(0x1f4)])!=null?_0x3797cf:_0x5677ef[_0xf18cf2(0x231)],'text':JSON[_0xf18cf2(0x24d)](_0x5677ef['content']),'parentId':_0x311cf8['id']});break;}case v[_0xf18cf2(0x1ff)]:{const _0x28db1c=this[_0xf18cf2(0x1fe)][_0xf18cf2(0x244)](_0x2d553b,_0x2023ae,_0x5677ef[_0xf18cf2(0x218)]);_0x28db1c&&_0x28db1c[_0xf18cf2(0x212)]&&this[_0xf18cf2(0x1fe)][_0xf18cf2(0x22a)](_0x2d553b,_0x2023ae,_0x5677ef[_0xf18cf2(0x218)]);break;}case v[_0xf18cf2(0x201)]:{this['_threadCommentModel'][_0xf18cf2(0x1f5)](_0x2d553b,_0x2023ae,{'commentId':_0x5677ef[_0xf18cf2(0x218)],'text':JSON[_0xf18cf2(0x24d)](_0x5677ef[_0xf18cf2(0x219)])});break;}case v['Solve']:{const _0x9944f7=(_0x2050e5=this[_0xf18cf2(0x1fe)][_0xf18cf2(0x21a)](_0x5677ef[_0xf18cf2(0x234)])[_0xf18cf2(0x1f9)](_0x5a5df7=>_0x5a5df7[_0xf18cf2(0x21c)]===_0x5677ef[_0xf18cf2(0x21c)]))==null?void 0x0:_0x2050e5['root'];_0x9944f7&&this['_threadCommentModel']['resolveComment'](_0x2d553b,_0x2023ae,_0x9944f7['id'],_0x5677ef[_0xf18cf2(0x215)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x33eaaf(_0x3fd2fc)),p(0x1,_0x33eaaf(_0x4adb5b)),p(0x2,_0x33eaaf(_0x229c9b)),p(0x3,_0x33eaaf(_0x2b41cd))],_);const z=_0x4b08f6(0x23a),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1f9cba,_0x30b390,_0x58775e,_0x285341)=>{for(var _0x41e215=_0x285341>0x1?void 0x0:_0x285341?k(_0x30b390,_0x58775e):_0x30b390,_0x381f2f=_0x1f9cba['length']-0x1,_0x536bdf;_0x381f2f>=0x0;_0x381f2f--)(_0x536bdf=_0x1f9cba[_0x381f2f])&&(_0x41e215=_0x536bdf(_0x41e215)||_0x41e215);return _0x41e215;},b=(_0x32b930,_0x12e711)=>(_0x3900b9,_0x3f0049)=>_0x12e711(_0x3900b9,_0x3f0049,_0x32b930);function X(_0x5a0567,_0x12ddc2){const _0x10ebba=_0x4b08f6,_0x149a22=_0x5a0567[_0x10ebba(0x245)][0x0];return{..._0x12ddc2,'id':_0x149a22[_0x10ebba(0x218)],'resolved':_0x5a0567[_0x10ebba(0x215)]===0x1,'dT':y(_0x149a22[_0x10ebba(0x249)]),'personId':_0x149a22['userId'],'threadId':_0x149a22[_0x10ebba(0x21c)]};}function ee(_0x156f85,_0x3b256e,_0x291eb3){const _0x19807a=_0x4b08f6;var _0x8fc2a1,_0x1e806b;if(((_0x1e806b=(_0x8fc2a1=_0x156f85==null?void 0x0:_0x156f85[_0x19807a(0x245)])==null?void 0x0:_0x8fc2a1[_0x19807a(0x203)])!=null?_0x1e806b:0x0)>0x0){const _0x265580=(_0x11c671,_0x4f4b6c)=>({'id':_0x11c671[_0x19807a(0x218)],'threadId':_0x11c671[_0x19807a(0x21c)],'dT':y(_0x11c671[_0x19807a(0x249)]),'personId':_0x11c671[_0x19807a(0x231)],'resolved':_0x156f85[_0x19807a(0x215)]===I[_0x19807a(0x241)],'unitId':_0x3b256e,'subUnitId':_0x291eb3,'text':JSON[_0x19807a(0x24d)](_0x11c671[_0x19807a(0x219)]),'parentId':_0x4f4b6c}),_0xb4faa2=_0x265580(_0x156f85[_0x19807a(0x245)][0x0]);return{..._0xb4faa2,'children':_0x156f85[_0x19807a(0x245)]['slice'](0x1)[_0x19807a(0x216)](_0xe41fd3=>_0x265580(_0xe41fd3,_0xb4faa2['id']))};}return null;}let S=class{constructor(_0x25f47e,_0x1d012d,_0xcfdefb){const _0x5ac7cc=_0x4b08f6;this['_httpService']=_0x25f47e,this['_userService']=_0x1d012d,this[_0x5ac7cc(0x24e)]=_0xcfdefb;}async[_0x4b08f6(0x220)](_0x2282b6){const _0x5e4268=_0x4b08f6;var _0x8d0f8b,_0x4a960d;const {parentId:_0x5454c7,unitId:_0x271553,text:_0xd65e98,threadId:_0x217a21}=_0x2282b6,_0x50e771=(_0x4a960d=(_0x8d0f8b=_0xd65e98['customRanges'])==null?void 0x0:_0x8d0f8b['filter'](_0x54baf5=>_0x54baf5[_0x5e4268(0x248)]===_0x2a62af['COMMENT'])['map'](_0x1ee8c6=>_0x1ee8c6[_0x5e4268(0x1fa)]))!=null?_0x4a960d:[],_0x440ec1=JSON[_0x5e4268(0x23e)](_0xd65e98),_0x346b0a=(await this[_0x5e4268(0x24e)][_0x5e4268(0x251)](_0x271553))[_0x5e4268(0x225)]();if(_0x5454c7){const _0x19ad5f={'memberId':_0x346b0a,'unitId':_0x271553,'content':_0x440ec1,'mention':_0x50e771,'threadId':_0x217a21},_0x24ddd1=(await this['_httpService'][_0x5e4268(0x240)]('/universer-api/comment/unit/'+_0x271553+_0x5e4268(0x254),{'body':_0x19ad5f}))[_0x5e4268(0x23d)][_0x5e4268(0x23f)];return{..._0x2282b6,'id':_0x24ddd1[_0x5e4268(0x218)],'dT':_0x1f5eeb(+_0x24ddd1[_0x5e4268(0x249)])[_0x5e4268(0x208)](_0x5e4268(0x22b)),'personId':_0x24ddd1[_0x5e4268(0x231)]};}else{const _0x2bfe10={'memberId':_0x346b0a,'unitId':_0x271553,'content':_0x440ec1,'mention':_0x50e771},_0x4340f8=await this[_0x5e4268(0x235)]['post'](_0x5e4268(0x250)+_0x271553+_0x5e4268(0x24b),{'body':_0x2bfe10});return X(_0x4340f8['body']['comment'],_0x2282b6);}}async[_0x4b08f6(0x1f5)](_0x36a96b){const _0x392471=_0x4b08f6;var _0x262350,_0xbe9b08;const {text:_0x3ff051,unitId:_0x49170a}=_0x36a96b,_0x2fabaa=(_0xbe9b08=(_0x262350=_0x3ff051['customRanges'])==null?void 0x0:_0x262350[_0x392471(0x21d)](_0x57cda1=>_0x57cda1[_0x392471(0x248)]===_0x2a62af[_0x392471(0x22c)])[_0x392471(0x216)](_0x5ee5b4=>_0x5ee5b4[_0x392471(0x1fa)]))!=null?_0xbe9b08:[],_0x9f318c=JSON[_0x392471(0x23e)](_0x3ff051),_0xeecf9=_0x36a96b[_0x392471(0x21c)],_0x3e066e=_0x36a96b['id'],_0x189b9c={'memberId':(await this[_0x392471(0x24e)][_0x392471(0x251)](_0x49170a))[_0x392471(0x225)](),'unitId':_0x49170a,'threadId':_0xeecf9,'mention':_0x2fabaa,'content':_0x9f318c,'replyId':_0x3e066e},_0x2f8021=await this[_0x392471(0x235)]['post'](_0x392471(0x250)+_0x49170a+_0x392471(0x222),{'body':_0x189b9c});return!_0x2f8021[_0x392471(0x23d)][_0x392471(0x228)]||_0x2f8021[_0x392471(0x23d)][_0x392471(0x228)][_0x392471(0x217)]===0x1;}async[_0x4b08f6(0x22e)](_0x53ab06){const _0x2ef211=_0x4b08f6,{unitId:_0x2cfb62}=_0x53ab06,_0x2655c6=_0x53ab06[_0x2ef211(0x21c)],_0xd363e8={'memberId':this[_0x2ef211(0x24a)][_0x2ef211(0x21e)]()[_0x2ef211(0x1f4)],'unitId':_0x2cfb62,'threadId':_0x2655c6,'solved':_0x53ab06['resolved']?I['Solved']:I[_0x2ef211(0x1fc)]},_0x4c8d88=await this[_0x2ef211(0x235)][_0x2ef211(0x240)](_0x2ef211(0x250)+_0x2cfb62+_0x2ef211(0x243),{'body':_0xd363e8});return!_0x4c8d88[_0x2ef211(0x23d)][_0x2ef211(0x228)]||_0x4c8d88[_0x2ef211(0x23d)]['error'][_0x2ef211(0x217)]===0x1;}async[_0x4b08f6(0x22a)](_0x1c516a,_0xc04e78,_0xa14884,_0x1e63fd){const _0x157122=_0x4b08f6,_0x545857={'memberId':(await this['_sessionService'][_0x157122(0x251)](_0x1c516a))[_0x157122(0x225)](),'threadId':_0xa14884,'replyId':_0x1e63fd,'unitId':_0x1c516a},_0x43ea47=await this['_httpService'][_0x157122(0x240)](_0x157122(0x250)+_0x1c516a+_0x157122(0x226),{'body':_0x545857});return!_0x43ea47['body'][_0x157122(0x228)]||_0x43ea47[_0x157122(0x23d)][_0x157122(0x228)]['code']===0x1;}async['listComments'](_0x434bc,_0x302d82,_0x172f4f){const _0x8af3f7=_0x4b08f6,_0x4adfdd={'unitId':_0x434bc,'threadId':_0x172f4f},_0x145006=await this['_httpService'][_0x8af3f7(0x240)](_0x8af3f7(0x250)+_0x434bc+_0x8af3f7(0x24f),{'body':_0x4adfdd}),_0x567911=_0x172f4f['map'](_0x1e2373=>ee(_0x145006[_0x8af3f7(0x23d)][_0x8af3f7(0x1fd)][_0x1e2373],_0x434bc,_0x302d82))[_0x8af3f7(0x21d)](Boolean);return Object[_0x8af3f7(0x209)](_0x145006[_0x8af3f7(0x23d)][_0x8af3f7(0x247)])[_0x8af3f7(0x24c)](_0x5763e9=>{const _0x124be9=_0x8af3f7;this[_0x124be9(0x24a)][_0x124be9(0x21f)](_0x5763e9);}),_0x567911;}['saveCommentToSnapshot'](_0x4a24c7){return{'id':_0x4a24c7['id'],'threadId':_0x4a24c7['threadId'],'ref':_0x4a24c7['ref']};}};function _0x381c(_0x3f7cc3,_0x2c96f6){const _0x4e29cf=_0x4e29();return _0x381c=function(_0x381c4e,_0x462b14){_0x381c4e=_0x381c4e-0x1f3;let _0x38e225=_0x4e29cf[_0x381c4e];return _0x38e225;},_0x381c(_0x3f7cc3,_0x2c96f6);}S=Q([b(0x0,_0x33eaaf(_0x3fadc1)),b(0x1,_0x33eaaf(_0x229c9b)),b(0x2,_0x33eaaf(_0x12bcca))],S);var re=Object[_0x4b08f6(0x20b)],te=(_0x252623,_0x1bf283,_0x5b35f7,_0x4c1d65)=>{const _0x8d8ea4=_0x4b08f6;for(var _0x630a01=_0x4c1d65>0x1?void 0x0:_0x4c1d65?re(_0x1bf283,_0x5b35f7):_0x1bf283,_0x3a0ed7=_0x252623[_0x8d8ea4(0x203)]-0x1,_0x1bfa19;_0x3a0ed7>=0x0;_0x3a0ed7--)(_0x1bfa19=_0x252623[_0x3a0ed7])&&(_0x630a01=_0x1bfa19(_0x630a01)||_0x630a01);return _0x630a01;},M=(_0x21c651,_0x45bb1a)=>(_0x3a54fa,_0x1e2364)=>_0x45bb1a(_0x3a54fa,_0x1e2364,_0x21c651);function _0x4e29(){const _0x585bac=['1094967usSBuy','resolveComment','dataSource','_initUserSync','userId','Solve','size','unitId','_httpService','8614295JIhLsD','588932pDloOn','160VRHUoP','type','thread-comment-data-source.config','onReady','onStarting','body','stringify','reply','post','Solved','665360hafJzi','/solved','getComment','replies','Add','users','rangeType','createTimestamp','_userService','/add','forEach','parse','_sessionService','/list','/universer-api/comment/unit/','requireSession','add','/universer-api/user/list','/reply','syncUpdateMutationToColla','Reply','userID','updateComment','_threadCommentDataSource','202748MLtGBD','personId','find','rangeId','916902qWQYUw','OpenOrReOpen','comments','_threadCommentModel','Delete','_configService','Edit','delete','length','setConfig','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','pluginName','format','values','_init','getOwnPropertyDescriptor','user','_initDataSource','_injector','_commentService','_threadCommentDataSourceService','root','parentId','UNRECOGNIZED','2133378hRNyIo','solved','map','code','replyId','content','getUnit','payload','threadId','filter','getCurrentUser','addUser','addComment','subscribe','/edit','Unknown','disposeWithMe','getMemberID','/delete','commentUpdate$','error','_config','deleteComment','YYYY/MM/DD\x20HH:mm','COMMENT'];_0x4e29=function(){return _0x585bac;};return _0x4e29();}let f=class extends _0x22017b{constructor(_0x1fbce7,_0x4aef7f){const _0x5f1cb9=_0x4b08f6;super(),this[_0x5f1cb9(0x210)]=_0x1fbce7,this['_threadCommentDataSource']=_0x4aef7f,this[_0x5f1cb9(0x20d)]();}[_0x4b08f6(0x20d)](){const _0x39bd99=_0x4b08f6;this[_0x39bd99(0x210)][_0x39bd99(0x22f)]=this[_0x39bd99(0x1f6)],this[_0x39bd99(0x210)][_0x39bd99(0x255)]=!0x1;}};f=te([M(0x0,_0x44c2d7),M(0x1,_0x33eaaf(S))],f);var se=Object[_0x4b08f6(0x206)],oe=Object[_0x4b08f6(0x20b)],ne=(_0x5ddfcd,_0x2cba70,_0x3450f2)=>_0x2cba70 in _0x5ddfcd?se(_0x5ddfcd,_0x2cba70,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3450f2}):_0x5ddfcd[_0x2cba70]=_0x3450f2,ie=(_0x240900,_0x3a6d81,_0x175be9,_0x1bbd9d)=>{const _0x2a7aab=_0x4b08f6;for(var _0x41f05f=_0x1bbd9d>0x1?void 0x0:_0x1bbd9d?oe(_0x3a6d81,_0x175be9):_0x3a6d81,_0x37d7ea=_0x240900[_0x2a7aab(0x203)]-0x1,_0x460391;_0x37d7ea>=0x0;_0x37d7ea--)(_0x460391=_0x240900[_0x37d7ea])&&(_0x41f05f=_0x460391(_0x41f05f)||_0x41f05f);return _0x41f05f;},N=(_0x43b8be,_0x4cd569)=>(_0x3ca44b,_0x15e210)=>_0x4cd569(_0x3ca44b,_0x15e210,_0x43b8be),$=(_0x31d1cc,_0x54acf3,_0x8c279f)=>ne(_0x31d1cc,typeof _0x54acf3!='symbol'?_0x54acf3+'':_0x54acf3,_0x8c279f);let g=class extends _0x45a9df{constructor(_0x2b5b1a=O,_0x5703f0,_0xc3bc18){const _0x3d3b28=_0x4b08f6;super(),this['_config']=_0x2b5b1a,this['_injector']=_0x5703f0,this[_0x3d3b28(0x200)]=_0xc3bc18;const {..._0x67b588}=_0x59e53c({},O,this[_0x3d3b28(0x229)]);this['_configService'][_0x3d3b28(0x204)](z,_0x67b588);}[_0x4b08f6(0x23c)](){const _0x58203a=_0x4b08f6;[[S],[f],[_]][_0x58203a(0x24c)](_0x1f486d=>{const _0x58d8d3=_0x58203a;this[_0x58d8d3(0x20e)][_0x58d8d3(0x252)](_0x1f486d);});}[_0x4b08f6(0x23b)](){const _0x235f92=_0x4b08f6;this[_0x235f92(0x20e)]['get'](f),this[_0x235f92(0x20e)]['get'](_);}};$(g,_0x4b08f6(0x207),W),$(g,_0x4b08f6(0x239),_0x52cebc['UNIVER_UNKNOWN']),g=ie([_0x4925bc(_0x341ce2,_0x3ab8c5,_0x3e3ea1),N(0x1,_0x33eaaf(_0x2b41cd)),N(0x2,_0x4a913c)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5bf11d=_0x5c98;(function(_0x2e1a9f,_0x30be59){const _0x36f4ce=_0x5c98,_0x340a84=_0x2e1a9f();while(!![]){try{const _0x4b898f=parseInt(_0x36f4ce(0xdd))/0x1+-parseInt(_0x36f4ce(0xf1))/0x2*(-parseInt(_0x36f4ce(0xd6))/0x3)+parseInt(_0x36f4ce(0xe3))/0x4+-parseInt(_0x36f4ce(0xdb))/0x5*(-parseInt(_0x36f4ce(0xd0))/0x6)+-parseInt(_0x36f4ce(0xc9))/0x7*(parseInt(_0x36f4ce(0xf6))/0x8)+parseInt(_0x36f4ce(0xaf))/0x9*(-parseInt(_0x36f4ce(0xa7))/0xa)+parseInt(_0x36f4ce(0xe1))/0xb;if(_0x4b898f===_0x30be59)break;else _0x340a84['push'](_0x340a84['shift']());}catch(_0x326e6d){_0x340a84['push'](_0x340a84['shift']());}}}(_0x13a5,0x32c10));import{CommentService as _0x3e033d,CollaborationSessionService as _0x55d10c,UniverCollaborationClientPlugin as _0x42a23e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2436a8}from'@univerjs-pro/license';import{dayjs as _0x406095,UserManagerService as _0x370dc1,Inject as _0x139489,Injector as _0x353baa,Disposable as _0x3ad743,CustomRangeType as _0x2abdd2,UniverInstanceType as _0xae0343,DependentOn as _0x13c419,IConfigService as _0x33ac58,Plugin as _0x57b30b,merge as _0x1ae59a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x134544}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xfaeaef,IThreadCommentDataSourceService as _0x31dc00}from'@univerjs/thread-comment';import{bufferTime as _0x1b3cbd}from'rxjs';import{HTTPService as _0x4acda9}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xa5a42e=>(_0xa5a42e[_0xa5a42e[_0x5bf11d(0xda)]=0x0]='OpenOrReOpen',_0xa5a42e[_0xa5a42e[_0x5bf11d(0xa9)]=0x1]=_0x5bf11d(0xa9),_0xa5a42e[_0xa5a42e[_0x5bf11d(0xc6)]=-0x1]=_0x5bf11d(0xc6),_0xa5a42e))(I||{}),v=(_0x465061=>(_0x465061[_0x465061[_0x5bf11d(0xd1)]=0x0]=_0x5bf11d(0xd1),_0x465061[_0x465061['Add']=0x1]=_0x5bf11d(0xb0),_0x465061[_0x465061[_0x5bf11d(0xe0)]=0x2]=_0x5bf11d(0xe0),_0x465061[_0x465061[_0x5bf11d(0xae)]=0x3]='Edit',_0x465061[_0x465061[_0x5bf11d(0xbe)]=0x4]='Delete',_0x465061[_0x465061[_0x5bf11d(0xac)]=0x5]='Solve',_0x465061[_0x465061[_0x5bf11d(0xc6)]=-0x1]=_0x5bf11d(0xc6),_0x465061))(v||{});const y=_0x354b69=>_0x406095(new Date(+_0x354b69))[_0x5bf11d(0xe4)](_0x5bf11d(0xf3)),B=async(_0x59c066,_0x265859)=>{const _0x23d640=_0x5bf11d,_0x7cf6a3=_0x59c066[_0x23d640(0xc0)](_0x370dc1),_0xe02f44=_0x59c066[_0x23d640(0xc0)](_0x4acda9);_0x265859[_0x23d640(0xe5)](_0x45aff2=>{const _0x4ffe44=_0x23d640;_0x7cf6a3[_0x4ffe44(0xf7)](_0x45aff2)&&_0x265859[_0x4ffe44(0xdc)](_0x45aff2);}),_0x265859[_0x23d640(0xb6)]&&(await _0xe02f44['get'](_0x23d640(0xb5),{'params':{'userIDs':[..._0x265859]}}))['body'][_0x23d640(0xde)][_0x23d640(0xe5)](_0x3653d2=>{const _0x518695=_0x23d640;_0x3653d2&&_0x7cf6a3[_0x518695(0xc1)](_0x3653d2);});};var K=Object[_0x5bf11d(0xe6)],V=(_0x3bfb34,_0x36803c,_0x2f7419,_0x352174)=>{const _0x28378b=_0x5bf11d;for(var _0x291a75=_0x352174>0x1?void 0x0:_0x352174?K(_0x36803c,_0x2f7419):_0x36803c,_0x23c6c2=_0x3bfb34[_0x28378b(0xc8)]-0x1,_0x3de3bf;_0x23c6c2>=0x0;_0x23c6c2--)(_0x3de3bf=_0x3bfb34[_0x23c6c2])&&(_0x291a75=_0x3de3bf(_0x291a75)||_0x291a75);return _0x291a75;},p=(_0xdb68c,_0x55b200)=>(_0x16f280,_0x1a89d0)=>_0x55b200(_0x16f280,_0x1a89d0,_0xdb68c);let _=class extends _0x3ad743{constructor(_0x4567e3,_0x1cb9ac,_0xc9fcd0,_0x58aecc){const _0x1c15ef=_0x5bf11d;super(),this['_commentService']=_0x4567e3,this[_0x1c15ef(0xba)]=_0x1cb9ac,this['_userService']=_0xc9fcd0,this[_0x1c15ef(0xb7)]=_0x58aecc,this[_0x1c15ef(0xfb)](),this[_0x1c15ef(0xa8)]();}[_0x5bf11d(0xa8)](){const _0x234f5a=_0x5bf11d;this[_0x234f5a(0xe8)](this[_0x234f5a(0xba)][_0x234f5a(0xc3)][_0x234f5a(0x102)](_0x1b3cbd(0x10))[_0x234f5a(0xd7)](_0x4923b1=>{const _0x2026f8=_0x234f5a,_0xf55b68=new Set();_0x4923b1[_0x2026f8(0xe5)](_0x319820=>{const _0x1055b7=_0x2026f8;switch(_0x319820[_0x1055b7(0xcd)]){case _0x1055b7(0xce):{const _0x1e1ce4=_0x319820[_0x1055b7(0xdf)][_0x1055b7(0xef)];_0xf55b68[_0x1055b7(0xce)](_0x1e1ce4);break;}}}),B(this[_0x2026f8(0xb7)],_0xf55b68);}));}[_0x5bf11d(0xfb)](){const _0x3c0edb=_0x5bf11d;this['disposeWithMe'](this[_0x3c0edb(0xfe)][_0x3c0edb(0xc3)][_0x3c0edb(0xd7)](async _0x4027c4=>{const _0x2beaf9=_0x3c0edb;var _0x38148c,_0x5e62cb,_0x2e3854,_0x45f066;const _0x346856=(_0x38148c=this[_0x2beaf9(0xba)][_0x2beaf9(0xb4)](_0x4027c4[_0x2beaf9(0xc4)])[_0x2beaf9(0x101)](_0x22cdba=>_0x22cdba['threadId']===_0x4027c4['threadId']))==null?void 0x0:_0x38148c[_0x2beaf9(0xcf)];if(!_0x346856)return;const {unitId:_0x37c898,subUnitId:_0x2f743d}=_0x346856;switch(_0x4027c4[_0x2beaf9(0xea)]&&this[_0x2beaf9(0xf4)][_0x2beaf9(0xc1)](_0x4027c4[_0x2beaf9(0xea)]),_0x4027c4[_0x2beaf9(0xcd)]){case v[_0x2beaf9(0xb0)]:break;case v['Reply']:{this[_0x2beaf9(0xba)][_0x2beaf9(0xf9)](_0x37c898,_0x2f743d,{'unitId':_0x37c898,'subUnitId':_0x2f743d,'ref':'','id':_0x4027c4[_0x2beaf9(0x108)],'dT':y(+_0x4027c4[_0x2beaf9(0xf2)]),'threadId':_0x4027c4[_0x2beaf9(0x10b)],'personId':(_0x2e3854=(_0x5e62cb=_0x4027c4['user'])==null?void 0x0:_0x5e62cb[_0x2beaf9(0xbb)])!=null?_0x2e3854:_0x4027c4[_0x2beaf9(0xeb)],'text':JSON[_0x2beaf9(0x103)](_0x4027c4['content']),'parentId':_0x346856['id']});break;}case v[_0x2beaf9(0xbe)]:{const _0x38620f=this['_threadCommentModel']['getComment'](_0x37c898,_0x2f743d,_0x4027c4[_0x2beaf9(0x108)]);_0x38620f&&_0x38620f['parentId']&&this[_0x2beaf9(0xba)][_0x2beaf9(0xa5)](_0x37c898,_0x2f743d,_0x4027c4[_0x2beaf9(0x108)]);break;}case v[_0x2beaf9(0xae)]:{this[_0x2beaf9(0xba)][_0x2beaf9(0x109)](_0x37c898,_0x2f743d,{'commentId':_0x4027c4[_0x2beaf9(0x108)],'text':JSON[_0x2beaf9(0x103)](_0x4027c4[_0x2beaf9(0x100)])});break;}case v[_0x2beaf9(0xac)]:{const _0x1317ca=(_0x45f066=this[_0x2beaf9(0xba)][_0x2beaf9(0xb4)](_0x4027c4[_0x2beaf9(0xc4)])[_0x2beaf9(0x101)](_0x5732d5=>_0x5732d5[_0x2beaf9(0x10b)]===_0x4027c4[_0x2beaf9(0x10b)]))==null?void 0x0:_0x45f066[_0x2beaf9(0xcf)];_0x1317ca&&this[_0x2beaf9(0xba)][_0x2beaf9(0xca)](_0x37c898,_0x2f743d,_0x1317ca['id'],_0x4027c4[_0x2beaf9(0xe7)]===I[_0x2beaf9(0xa9)]);break;}}}));}};_=V([p(0x0,_0x139489(_0x3e033d)),p(0x1,_0x139489(_0xfaeaef)),p(0x2,_0x139489(_0x370dc1)),p(0x3,_0x139489(_0x353baa))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x5bf11d(0xe6)],Q=(_0x24661e,_0x4297bf,_0x3af404,_0x1dbed9)=>{const _0x176d9b=_0x5bf11d;for(var _0x128f88=_0x1dbed9>0x1?void 0x0:_0x1dbed9?k(_0x4297bf,_0x3af404):_0x4297bf,_0x585f99=_0x24661e[_0x176d9b(0xc8)]-0x1,_0x3ab8c4;_0x585f99>=0x0;_0x585f99--)(_0x3ab8c4=_0x24661e[_0x585f99])&&(_0x128f88=_0x3ab8c4(_0x128f88)||_0x128f88);return _0x128f88;},b=(_0x1428f6,_0x598794)=>(_0x5b2621,_0x55982e)=>_0x598794(_0x5b2621,_0x55982e,_0x1428f6);function X(_0x73df2,_0x1e4ea3){const _0xb53790=_0x5bf11d,_0x28a9e0=_0x73df2[_0xb53790(0xcb)][0x0];return{..._0x1e4ea3,'id':_0x28a9e0[_0xb53790(0x108)],'resolved':_0x73df2[_0xb53790(0xe7)]===0x1,'dT':y(_0x28a9e0[_0xb53790(0xf2)]),'personId':_0x28a9e0[_0xb53790(0xeb)],'threadId':_0x28a9e0['threadId']};}function ee(_0x105610,_0x5e8c31,_0x141a18){const _0x56050c=_0x5bf11d;var _0x50f0ef,_0xdcf5d9;if(((_0xdcf5d9=(_0x50f0ef=_0x105610==null?void 0x0:_0x105610[_0x56050c(0xcb)])==null?void 0x0:_0x50f0ef[_0x56050c(0xc8)])!=null?_0xdcf5d9:0x0)>0x0){const _0x10d295=(_0xc7e1b7,_0x26cf67)=>({'id':_0xc7e1b7[_0x56050c(0x108)],'threadId':_0xc7e1b7['threadId'],'dT':y(_0xc7e1b7[_0x56050c(0xf2)]),'personId':_0xc7e1b7[_0x56050c(0xeb)],'resolved':_0x105610[_0x56050c(0xe7)]===I[_0x56050c(0xa9)],'unitId':_0x5e8c31,'subUnitId':_0x141a18,'text':JSON[_0x56050c(0x103)](_0xc7e1b7[_0x56050c(0x100)]),'parentId':_0x26cf67}),_0x3da65e=_0x10d295(_0x105610['replies'][0x0]);return{..._0x3da65e,'children':_0x105610[_0x56050c(0xcb)][_0x56050c(0xad)](0x1)[_0x56050c(0x106)](_0x5ec665=>_0x10d295(_0x5ec665,_0x3da65e['id']))};}return null;}let S=class{constructor(_0x1839ec,_0x13413f,_0x338f6b){const _0x53ee56=_0x5bf11d;this[_0x53ee56(0xd5)]=_0x1839ec,this[_0x53ee56(0xf4)]=_0x13413f,this[_0x53ee56(0xfd)]=_0x338f6b;}async[_0x5bf11d(0xf9)](_0x45270a){const _0x3f0d07=_0x5bf11d;var _0x2e3882,_0xbf5c4a;const {parentId:_0x2be2b5,unitId:_0x146327,text:_0x49f1df,threadId:_0x11d063}=_0x45270a,_0x444d32=(_0xbf5c4a=(_0x2e3882=_0x49f1df[_0x3f0d07(0xec)])==null?void 0x0:_0x2e3882['filter'](_0x52638a=>_0x52638a[_0x3f0d07(0xb3)]===_0x2abdd2[_0x3f0d07(0xfa)])[_0x3f0d07(0x106)](_0x576472=>_0x576472[_0x3f0d07(0xc2)]))!=null?_0xbf5c4a:[],_0x4fa583=JSON[_0x3f0d07(0xbf)](_0x49f1df),_0xefe1cf=(await this[_0x3f0d07(0xfd)]['requireSession'](_0x146327))['getMemberID']();if(_0x2be2b5){const _0x5b81d6={'memberId':_0xefe1cf,'unitId':_0x146327,'content':_0x4fa583,'mention':_0x444d32,'threadId':_0x11d063},_0x35f7b8=(await this['_httpService']['post'](_0x3f0d07(0xb2)+_0x146327+_0x3f0d07(0xe9),{'body':_0x5b81d6}))[_0x3f0d07(0x104)][_0x3f0d07(0xee)];return{..._0x45270a,'id':_0x35f7b8[_0x3f0d07(0x108)],'dT':_0x406095(+_0x35f7b8[_0x3f0d07(0xf2)])[_0x3f0d07(0xe4)](_0x3f0d07(0xf3)),'personId':_0x35f7b8[_0x3f0d07(0xeb)]};}else{const _0x3a702d={'memberId':_0xefe1cf,'unitId':_0x146327,'content':_0x4fa583,'mention':_0x444d32},_0x5ccff7=await this[_0x3f0d07(0xd5)]['post']('/universer-api/comment/unit/'+_0x146327+_0x3f0d07(0xc5),{'body':_0x3a702d});return X(_0x5ccff7[_0x3f0d07(0x104)][_0x3f0d07(0xfc)],_0x45270a);}}async[_0x5bf11d(0x109)](_0x1ad167){const _0x442f2f=_0x5bf11d;var _0x5ab67b,_0x11ed83;const {text:_0x51b466,unitId:_0x5ec047}=_0x1ad167,_0x575b41=(_0x11ed83=(_0x5ab67b=_0x51b466['customRanges'])==null?void 0x0:_0x5ab67b['filter'](_0x56a241=>_0x56a241['rangeType']===_0x2abdd2[_0x442f2f(0xfa)])[_0x442f2f(0x106)](_0x506958=>_0x506958['rangeId']))!=null?_0x11ed83:[],_0x320c1c=JSON[_0x442f2f(0xbf)](_0x51b466),_0x4c66e7=_0x1ad167[_0x442f2f(0x10b)],_0x19170e=_0x1ad167['id'],_0xa7bd21={'memberId':(await this[_0x442f2f(0xfd)][_0x442f2f(0xa6)](_0x5ec047))['getMemberID'](),'unitId':_0x5ec047,'threadId':_0x4c66e7,'mention':_0x575b41,'content':_0x320c1c,'replyId':_0x19170e},_0x40277b=await this[_0x442f2f(0xd5)][_0x442f2f(0xd3)](_0x442f2f(0xb2)+_0x5ec047+_0x442f2f(0xe2),{'body':_0xa7bd21});return!_0x40277b[_0x442f2f(0x104)]['error']||_0x40277b[_0x442f2f(0x104)][_0x442f2f(0x107)]['code']===0x1;}async[_0x5bf11d(0xca)](_0x4a2da7){const _0x317f0c=_0x5bf11d,{unitId:_0x316b80}=_0x4a2da7,_0xcff4a8=_0x4a2da7['threadId'],_0x41c37d={'memberId':this['_userService']['getCurrentUser']()[_0x317f0c(0xbb)],'unitId':_0x316b80,'threadId':_0xcff4a8,'solved':_0x4a2da7[_0x317f0c(0xd2)]?I['Solved']:I['OpenOrReOpen']},_0x17dcc6=await this[_0x317f0c(0xd5)][_0x317f0c(0xd3)]('/universer-api/comment/unit/'+_0x316b80+'/solved',{'body':_0x41c37d});return!_0x17dcc6['body'][_0x317f0c(0x107)]||_0x17dcc6[_0x317f0c(0x104)]['error']['code']===0x1;}async[_0x5bf11d(0xa5)](_0x1669fd,_0xdf954d,_0x21fcd4,_0x40cc3e){const _0x2d7b44=_0x5bf11d,_0x145fcb={'memberId':(await this['_sessionService'][_0x2d7b44(0xa6)](_0x1669fd))[_0x2d7b44(0xd4)](),'threadId':_0x21fcd4,'replyId':_0x40cc3e,'unitId':_0x1669fd},_0x2c31f8=await this[_0x2d7b44(0xd5)][_0x2d7b44(0xd3)](_0x2d7b44(0xb2)+_0x1669fd+'/delete',{'body':_0x145fcb});return!_0x2c31f8['body'][_0x2d7b44(0x107)]||_0x2c31f8[_0x2d7b44(0x104)][_0x2d7b44(0x107)]['code']===0x1;}async[_0x5bf11d(0xb1)](_0x4086fa,_0x236b49,_0x56d668){const _0x443b4b=_0x5bf11d,_0x216b2a={'unitId':_0x4086fa,'threadId':_0x56d668},_0x25a709=await this[_0x443b4b(0xd5)][_0x443b4b(0xd3)](_0x443b4b(0xb2)+_0x4086fa+'/list',{'body':_0x216b2a}),_0x8721ad=_0x56d668[_0x443b4b(0x106)](_0x371ab5=>ee(_0x25a709['body'][_0x443b4b(0x105)][_0x371ab5],_0x4086fa,_0x236b49))[_0x443b4b(0xf5)](Boolean);return Object[_0x443b4b(0xbc)](_0x25a709['body'][_0x443b4b(0xde)])[_0x443b4b(0xe5)](_0x287315=>{const _0x4e7811=_0x443b4b;this[_0x4e7811(0xf4)]['addUser'](_0x287315);}),_0x8721ad;}[_0x5bf11d(0xd9)](_0x38d009){const _0x17c816=_0x5bf11d;return{'id':_0x38d009['id'],'threadId':_0x38d009[_0x17c816(0x10b)],'ref':_0x38d009[_0x17c816(0xbd)]};}};S=Q([b(0x0,_0x139489(_0x4acda9)),b(0x1,_0x139489(_0x370dc1)),b(0x2,_0x139489(_0x55d10c))],S);var re=Object[_0x5bf11d(0xe6)],te=(_0x281ea2,_0x17e6ed,_0x2f813a,_0xcdad0e)=>{const _0x22c2a4=_0x5bf11d;for(var _0x3a9061=_0xcdad0e>0x1?void 0x0:_0xcdad0e?re(_0x17e6ed,_0x2f813a):_0x17e6ed,_0x4ee619=_0x281ea2[_0x22c2a4(0xc8)]-0x1,_0x38f483;_0x4ee619>=0x0;_0x4ee619--)(_0x38f483=_0x281ea2[_0x4ee619])&&(_0x3a9061=_0x38f483(_0x3a9061)||_0x3a9061);return _0x3a9061;},M=(_0x58a15e,_0x5dfceb)=>(_0x48230e,_0x221d62)=>_0x5dfceb(_0x48230e,_0x221d62,_0x58a15e);let f=class extends _0x3ad743{constructor(_0x1e1287,_0x333ecf){const _0x5a4e20=_0x5bf11d;super(),this[_0x5a4e20(0x10a)]=_0x1e1287,this['_threadCommentDataSource']=_0x333ecf,this[_0x5a4e20(0xcc)]();}[_0x5bf11d(0xcc)](){const _0xbbc3e4=_0x5bf11d;this[_0xbbc3e4(0x10a)][_0xbbc3e4(0xc7)]=this[_0xbbc3e4(0xa4)],this[_0xbbc3e4(0x10a)][_0xbbc3e4(0xed)]=!0x1;}};f=te([M(0x0,_0x31dc00),M(0x1,_0x139489(S))],f);var se=Object[_0x5bf11d(0xb9)],oe=Object[_0x5bf11d(0xe6)],ne=(_0x3b2842,_0x47248f,_0x1fbeae)=>_0x47248f in _0x3b2842?se(_0x3b2842,_0x47248f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fbeae}):_0x3b2842[_0x47248f]=_0x1fbeae,ie=(_0x3f7c99,_0x18db66,_0x3834f1,_0x49e30c)=>{const _0x416ee1=_0x5bf11d;for(var _0x2b7297=_0x49e30c>0x1?void 0x0:_0x49e30c?oe(_0x18db66,_0x3834f1):_0x18db66,_0x1b7f42=_0x3f7c99[_0x416ee1(0xc8)]-0x1,_0x44c4fc;_0x1b7f42>=0x0;_0x1b7f42--)(_0x44c4fc=_0x3f7c99[_0x1b7f42])&&(_0x2b7297=_0x44c4fc(_0x2b7297)||_0x2b7297);return _0x2b7297;},N=(_0x22ed37,_0x390191)=>(_0x505d01,_0x4a07e5)=>_0x390191(_0x505d01,_0x4a07e5,_0x22ed37),$=(_0x190ed5,_0x4585cc,_0x6972f6)=>ne(_0x190ed5,typeof _0x4585cc!='symbol'?_0x4585cc+'':_0x4585cc,_0x6972f6);let g=class extends _0x57b30b{constructor(_0x3f4ee8=O,_0xc21555,_0x2f17ad){const _0xf7f1b4=_0x5bf11d;super(),this[_0xf7f1b4(0xd8)]=_0x3f4ee8,this[_0xf7f1b4(0xb7)]=_0xc21555,this[_0xf7f1b4(0xab)]=_0x2f17ad;const {..._0x5aa886}=_0x1ae59a({},O,this[_0xf7f1b4(0xd8)]);this[_0xf7f1b4(0xab)][_0xf7f1b4(0xaa)](z,_0x5aa886);}[_0x5bf11d(0xb8)](){[[S],[f],[_]]['forEach'](_0x152f8a=>{this['_injector']['add'](_0x152f8a);});}[_0x5bf11d(0xff)](){const _0x11a33f=_0x5bf11d;this[_0x11a33f(0xb7)][_0x11a33f(0xc0)](f),this[_0x11a33f(0xb7)][_0x11a33f(0xc0)](_);}};$(g,_0x5bf11d(0xf0),W),$(g,_0x5bf11d(0xcd),_0xae0343[_0x5bf11d(0xf8)]),g=ie([_0x13c419(_0x134544,_0x42a23e,_0x2436a8),N(0x1,_0x139489(_0x353baa)),N(0x2,_0x33ac58)],g);export{g as UniverThreadCommentDataSourcePlugin};function _0x5c98(_0x37660f,_0x46c7d4){const _0x13a5fa=_0x13a5();return _0x5c98=function(_0x5c9884,_0x508eff){_0x5c9884=_0x5c9884-0xa4;let _0x14dfa3=_0x13a5fa[_0x5c9884];return _0x14dfa3;},_0x5c98(_0x37660f,_0x46c7d4);}function _0x13a5(){const _0x4599c3=['_configService','Solve','slice','Edit','1722834Aelhmc','Add','listComments','/universer-api/comment/unit/','rangeType','getUnit','/universer-api/user/list','size','_injector','onStarting','defineProperty','_threadCommentModel','userID','values','ref','Delete','stringify','get','addUser','rangeId','commentUpdate$','unitId','/add','UNRECOGNIZED','dataSource','length','1081276IdqyQq','resolveComment','replies','_initDataSource','type','add','root','6Unnzsy','Unknown','resolved','post','getMemberID','_httpService','3uAqxVm','subscribe','_config','saveCommentToSnapshot','OpenOrReOpen','671095ProWqz','delete','83216OEcflq','users','payload','Reply','1039830BowSAD','/edit','728104pWlPOg','format','forEach','getOwnPropertyDescriptor','solved','disposeWithMe','/reply','user','userId','customRanges','syncUpdateMutationToColla','reply','personId','pluginName','428518XmUQtY','createTimestamp','YYYY/MM/DD\x20HH:mm','_userService','filter','16IYopTa','getUser','UNIVER_UNKNOWN','addComment','COMMENT','_init','comment','_sessionService','_commentService','onReady','content','find','pipe','parse','body','comments','map','error','replyId','updateComment','_threadCommentDataSourceService','threadId','_threadCommentDataSource','deleteComment','requireSession','10KkPTVV','_initUserSync','Solved','setConfig'];_0x13a5=function(){return _0x4599c3;};return _0x13a5();}
|
|
1
|
+
const _0x4b08f6=_0x381c;(function(_0x1a1802,_0x58703d){const _0x1f5d02=_0x381c,_0x11f7ef=_0x1a1802();while(!![]){try{const _0x25d3d1=parseInt(_0x1f5d02(0x22d))/0x1+parseInt(_0x1f5d02(0x242))/0x2+parseInt(_0x1f5d02(0x214))/0x3+parseInt(_0x1f5d02(0x237))/0x4+-parseInt(_0x1f5d02(0x236))/0x5+-parseInt(_0x1f5d02(0x1fb))/0x6+parseInt(_0x1f5d02(0x1f7))/0x7*(parseInt(_0x1f5d02(0x238))/0x8);if(_0x25d3d1===_0x58703d)break;else _0x11f7ef['push'](_0x11f7ef['shift']());}catch(_0xca3c9b){_0x11f7ef['push'](_0x11f7ef['shift']());}}}(_0x4e29,0xf19aa));import{CommentService as _0x3fd2fc,CollaborationSessionService as _0x12bcca,UniverCollaborationClientPlugin as _0x3ab8c5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3e3ea1}from'@univerjs-pro/license';import{dayjs as _0x1f5eeb,UserManagerService as _0x229c9b,Inject as _0x33eaaf,Injector as _0x2b41cd,Disposable as _0x22017b,CustomRangeType as _0x2a62af,UniverInstanceType as _0x52cebc,DependentOn as _0x4925bc,IConfigService as _0x4a913c,Plugin as _0x45a9df,merge as _0x59e53c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x341ce2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4adb5b,IThreadCommentDataSourceService as _0x44c2d7}from'@univerjs/thread-comment';import{bufferTime as _0x250720}from'rxjs';import{HTTPService as _0x3fadc1}from'@univerjs/network';const W=_0x4b08f6(0x205);var I=(_0x2c0f1b=>(_0x2c0f1b[_0x2c0f1b[_0x4b08f6(0x1fc)]=0x0]=_0x4b08f6(0x1fc),_0x2c0f1b[_0x2c0f1b['Solved']=0x1]=_0x4b08f6(0x241),_0x2c0f1b[_0x2c0f1b[_0x4b08f6(0x213)]=-0x1]=_0x4b08f6(0x213),_0x2c0f1b))(I||{}),v=(_0x15443b=>(_0x15443b[_0x15443b[_0x4b08f6(0x223)]=0x0]=_0x4b08f6(0x223),_0x15443b[_0x15443b[_0x4b08f6(0x246)]=0x1]=_0x4b08f6(0x246),_0x15443b[_0x15443b[_0x4b08f6(0x1f3)]=0x2]=_0x4b08f6(0x1f3),_0x15443b[_0x15443b[_0x4b08f6(0x201)]=0x3]=_0x4b08f6(0x201),_0x15443b[_0x15443b[_0x4b08f6(0x1ff)]=0x4]=_0x4b08f6(0x1ff),_0x15443b[_0x15443b[_0x4b08f6(0x232)]=0x5]='Solve',_0x15443b[_0x15443b['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x15443b))(v||{});const y=_0x47d6cb=>_0x1f5eeb(new Date(+_0x47d6cb))[_0x4b08f6(0x208)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x344108,_0x2bcc6a)=>{const _0x4a8820=_0x4b08f6,_0x27ce93=_0x344108['get'](_0x229c9b),_0x2213dc=_0x344108['get'](_0x3fadc1);_0x2bcc6a[_0x4a8820(0x24c)](_0x38f3a6=>{const _0x514a27=_0x4a8820;_0x27ce93['getUser'](_0x38f3a6)&&_0x2bcc6a[_0x514a27(0x202)](_0x38f3a6);}),_0x2bcc6a[_0x4a8820(0x233)]&&(await _0x2213dc['get'](_0x4a8820(0x253),{'params':{'userIDs':[..._0x2bcc6a]}}))['body'][_0x4a8820(0x247)][_0x4a8820(0x24c)](_0x2cdec8=>{const _0x5e3604=_0x4a8820;_0x2cdec8&&_0x27ce93[_0x5e3604(0x21f)](_0x2cdec8);});};var K=Object[_0x4b08f6(0x20b)],V=(_0x5b99c2,_0x33ee89,_0x2f33c1,_0x239cf2)=>{const _0x230da9=_0x4b08f6;for(var _0x47df6e=_0x239cf2>0x1?void 0x0:_0x239cf2?K(_0x33ee89,_0x2f33c1):_0x33ee89,_0x131464=_0x5b99c2[_0x230da9(0x203)]-0x1,_0x268999;_0x131464>=0x0;_0x131464--)(_0x268999=_0x5b99c2[_0x131464])&&(_0x47df6e=_0x268999(_0x47df6e)||_0x47df6e);return _0x47df6e;},p=(_0x16a3fa,_0x3dec0f)=>(_0x328608,_0x27e4e3)=>_0x3dec0f(_0x328608,_0x27e4e3,_0x16a3fa);let _=class extends _0x22017b{constructor(_0x3c2990,_0x71bcfc,_0xdab49d,_0x2661da){const _0x1dc93b=_0x4b08f6;super(),this[_0x1dc93b(0x20f)]=_0x3c2990,this['_threadCommentModel']=_0x71bcfc,this[_0x1dc93b(0x24a)]=_0xdab49d,this[_0x1dc93b(0x20e)]=_0x2661da,this[_0x1dc93b(0x20a)](),this[_0x1dc93b(0x230)]();}[_0x4b08f6(0x230)](){const _0x12537b=_0x4b08f6;this[_0x12537b(0x224)](this['_threadCommentModel'][_0x12537b(0x227)]['pipe'](_0x250720(0x10))[_0x12537b(0x221)](_0x146eac=>{const _0x522a8b=_0x12537b,_0x1e65a9=new Set();_0x146eac[_0x522a8b(0x24c)](_0x39566c=>{const _0x56c8e5=_0x522a8b;switch(_0x39566c[_0x56c8e5(0x239)]){case _0x56c8e5(0x252):{const _0x4585e5=_0x39566c[_0x56c8e5(0x21b)][_0x56c8e5(0x1f8)];_0x1e65a9[_0x56c8e5(0x252)](_0x4585e5);break;}}}),B(this[_0x522a8b(0x20e)],_0x1e65a9);}));}[_0x4b08f6(0x20a)](){const _0x4f48c1=_0x4b08f6;this[_0x4f48c1(0x224)](this[_0x4f48c1(0x20f)][_0x4f48c1(0x227)][_0x4f48c1(0x221)](async _0x5677ef=>{const _0xf18cf2=_0x4f48c1;var _0x57000e,_0x51cc66,_0x3797cf,_0x2050e5;const _0x311cf8=(_0x57000e=this[_0xf18cf2(0x1fe)][_0xf18cf2(0x21a)](_0x5677ef[_0xf18cf2(0x234)])['find'](_0x2b9494=>_0x2b9494[_0xf18cf2(0x21c)]===_0x5677ef[_0xf18cf2(0x21c)]))==null?void 0x0:_0x57000e[_0xf18cf2(0x211)];if(!_0x311cf8)return;const {unitId:_0x2d553b,subUnitId:_0x2023ae}=_0x311cf8;switch(_0x5677ef[_0xf18cf2(0x20c)]&&this[_0xf18cf2(0x24a)][_0xf18cf2(0x21f)](_0x5677ef[_0xf18cf2(0x20c)]),_0x5677ef[_0xf18cf2(0x239)]){case v[_0xf18cf2(0x246)]:break;case v['Reply']:{this[_0xf18cf2(0x1fe)]['addComment'](_0x2d553b,_0x2023ae,{'unitId':_0x2d553b,'subUnitId':_0x2023ae,'ref':'','id':_0x5677ef['replyId'],'dT':y(+_0x5677ef['createTimestamp']),'threadId':_0x5677ef[_0xf18cf2(0x21c)],'personId':(_0x3797cf=(_0x51cc66=_0x5677ef['user'])==null?void 0x0:_0x51cc66[_0xf18cf2(0x1f4)])!=null?_0x3797cf:_0x5677ef[_0xf18cf2(0x231)],'text':JSON[_0xf18cf2(0x24d)](_0x5677ef['content']),'parentId':_0x311cf8['id']});break;}case v[_0xf18cf2(0x1ff)]:{const _0x28db1c=this[_0xf18cf2(0x1fe)][_0xf18cf2(0x244)](_0x2d553b,_0x2023ae,_0x5677ef[_0xf18cf2(0x218)]);_0x28db1c&&_0x28db1c[_0xf18cf2(0x212)]&&this[_0xf18cf2(0x1fe)][_0xf18cf2(0x22a)](_0x2d553b,_0x2023ae,_0x5677ef[_0xf18cf2(0x218)]);break;}case v[_0xf18cf2(0x201)]:{this['_threadCommentModel'][_0xf18cf2(0x1f5)](_0x2d553b,_0x2023ae,{'commentId':_0x5677ef[_0xf18cf2(0x218)],'text':JSON[_0xf18cf2(0x24d)](_0x5677ef[_0xf18cf2(0x219)])});break;}case v['Solve']:{const _0x9944f7=(_0x2050e5=this[_0xf18cf2(0x1fe)][_0xf18cf2(0x21a)](_0x5677ef[_0xf18cf2(0x234)])[_0xf18cf2(0x1f9)](_0x5a5df7=>_0x5a5df7[_0xf18cf2(0x21c)]===_0x5677ef[_0xf18cf2(0x21c)]))==null?void 0x0:_0x2050e5['root'];_0x9944f7&&this['_threadCommentModel']['resolveComment'](_0x2d553b,_0x2023ae,_0x9944f7['id'],_0x5677ef[_0xf18cf2(0x215)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x33eaaf(_0x3fd2fc)),p(0x1,_0x33eaaf(_0x4adb5b)),p(0x2,_0x33eaaf(_0x229c9b)),p(0x3,_0x33eaaf(_0x2b41cd))],_);const z=_0x4b08f6(0x23a),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1f9cba,_0x30b390,_0x58775e,_0x285341)=>{for(var _0x41e215=_0x285341>0x1?void 0x0:_0x285341?k(_0x30b390,_0x58775e):_0x30b390,_0x381f2f=_0x1f9cba['length']-0x1,_0x536bdf;_0x381f2f>=0x0;_0x381f2f--)(_0x536bdf=_0x1f9cba[_0x381f2f])&&(_0x41e215=_0x536bdf(_0x41e215)||_0x41e215);return _0x41e215;},b=(_0x32b930,_0x12e711)=>(_0x3900b9,_0x3f0049)=>_0x12e711(_0x3900b9,_0x3f0049,_0x32b930);function X(_0x5a0567,_0x12ddc2){const _0x10ebba=_0x4b08f6,_0x149a22=_0x5a0567[_0x10ebba(0x245)][0x0];return{..._0x12ddc2,'id':_0x149a22[_0x10ebba(0x218)],'resolved':_0x5a0567[_0x10ebba(0x215)]===0x1,'dT':y(_0x149a22[_0x10ebba(0x249)]),'personId':_0x149a22['userId'],'threadId':_0x149a22[_0x10ebba(0x21c)]};}function ee(_0x156f85,_0x3b256e,_0x291eb3){const _0x19807a=_0x4b08f6;var _0x8fc2a1,_0x1e806b;if(((_0x1e806b=(_0x8fc2a1=_0x156f85==null?void 0x0:_0x156f85[_0x19807a(0x245)])==null?void 0x0:_0x8fc2a1[_0x19807a(0x203)])!=null?_0x1e806b:0x0)>0x0){const _0x265580=(_0x11c671,_0x4f4b6c)=>({'id':_0x11c671[_0x19807a(0x218)],'threadId':_0x11c671[_0x19807a(0x21c)],'dT':y(_0x11c671[_0x19807a(0x249)]),'personId':_0x11c671[_0x19807a(0x231)],'resolved':_0x156f85[_0x19807a(0x215)]===I[_0x19807a(0x241)],'unitId':_0x3b256e,'subUnitId':_0x291eb3,'text':JSON[_0x19807a(0x24d)](_0x11c671[_0x19807a(0x219)]),'parentId':_0x4f4b6c}),_0xb4faa2=_0x265580(_0x156f85[_0x19807a(0x245)][0x0]);return{..._0xb4faa2,'children':_0x156f85[_0x19807a(0x245)]['slice'](0x1)[_0x19807a(0x216)](_0xe41fd3=>_0x265580(_0xe41fd3,_0xb4faa2['id']))};}return null;}let S=class{constructor(_0x25f47e,_0x1d012d,_0xcfdefb){const _0x5ac7cc=_0x4b08f6;this['_httpService']=_0x25f47e,this['_userService']=_0x1d012d,this[_0x5ac7cc(0x24e)]=_0xcfdefb;}async[_0x4b08f6(0x220)](_0x2282b6){const _0x5e4268=_0x4b08f6;var _0x8d0f8b,_0x4a960d;const {parentId:_0x5454c7,unitId:_0x271553,text:_0xd65e98,threadId:_0x217a21}=_0x2282b6,_0x50e771=(_0x4a960d=(_0x8d0f8b=_0xd65e98['customRanges'])==null?void 0x0:_0x8d0f8b['filter'](_0x54baf5=>_0x54baf5[_0x5e4268(0x248)]===_0x2a62af['COMMENT'])['map'](_0x1ee8c6=>_0x1ee8c6[_0x5e4268(0x1fa)]))!=null?_0x4a960d:[],_0x440ec1=JSON[_0x5e4268(0x23e)](_0xd65e98),_0x346b0a=(await this[_0x5e4268(0x24e)][_0x5e4268(0x251)](_0x271553))[_0x5e4268(0x225)]();if(_0x5454c7){const _0x19ad5f={'memberId':_0x346b0a,'unitId':_0x271553,'content':_0x440ec1,'mention':_0x50e771,'threadId':_0x217a21},_0x24ddd1=(await this['_httpService'][_0x5e4268(0x240)]('/universer-api/comment/unit/'+_0x271553+_0x5e4268(0x254),{'body':_0x19ad5f}))[_0x5e4268(0x23d)][_0x5e4268(0x23f)];return{..._0x2282b6,'id':_0x24ddd1[_0x5e4268(0x218)],'dT':_0x1f5eeb(+_0x24ddd1[_0x5e4268(0x249)])[_0x5e4268(0x208)](_0x5e4268(0x22b)),'personId':_0x24ddd1[_0x5e4268(0x231)]};}else{const _0x2bfe10={'memberId':_0x346b0a,'unitId':_0x271553,'content':_0x440ec1,'mention':_0x50e771},_0x4340f8=await this[_0x5e4268(0x235)]['post'](_0x5e4268(0x250)+_0x271553+_0x5e4268(0x24b),{'body':_0x2bfe10});return X(_0x4340f8['body']['comment'],_0x2282b6);}}async[_0x4b08f6(0x1f5)](_0x36a96b){const _0x392471=_0x4b08f6;var _0x262350,_0xbe9b08;const {text:_0x3ff051,unitId:_0x49170a}=_0x36a96b,_0x2fabaa=(_0xbe9b08=(_0x262350=_0x3ff051['customRanges'])==null?void 0x0:_0x262350[_0x392471(0x21d)](_0x57cda1=>_0x57cda1[_0x392471(0x248)]===_0x2a62af[_0x392471(0x22c)])[_0x392471(0x216)](_0x5ee5b4=>_0x5ee5b4[_0x392471(0x1fa)]))!=null?_0xbe9b08:[],_0x9f318c=JSON[_0x392471(0x23e)](_0x3ff051),_0xeecf9=_0x36a96b[_0x392471(0x21c)],_0x3e066e=_0x36a96b['id'],_0x189b9c={'memberId':(await this[_0x392471(0x24e)][_0x392471(0x251)](_0x49170a))[_0x392471(0x225)](),'unitId':_0x49170a,'threadId':_0xeecf9,'mention':_0x2fabaa,'content':_0x9f318c,'replyId':_0x3e066e},_0x2f8021=await this[_0x392471(0x235)]['post'](_0x392471(0x250)+_0x49170a+_0x392471(0x222),{'body':_0x189b9c});return!_0x2f8021[_0x392471(0x23d)][_0x392471(0x228)]||_0x2f8021[_0x392471(0x23d)][_0x392471(0x228)][_0x392471(0x217)]===0x1;}async[_0x4b08f6(0x22e)](_0x53ab06){const _0x2ef211=_0x4b08f6,{unitId:_0x2cfb62}=_0x53ab06,_0x2655c6=_0x53ab06[_0x2ef211(0x21c)],_0xd363e8={'memberId':this[_0x2ef211(0x24a)][_0x2ef211(0x21e)]()[_0x2ef211(0x1f4)],'unitId':_0x2cfb62,'threadId':_0x2655c6,'solved':_0x53ab06['resolved']?I['Solved']:I[_0x2ef211(0x1fc)]},_0x4c8d88=await this[_0x2ef211(0x235)][_0x2ef211(0x240)](_0x2ef211(0x250)+_0x2cfb62+_0x2ef211(0x243),{'body':_0xd363e8});return!_0x4c8d88[_0x2ef211(0x23d)][_0x2ef211(0x228)]||_0x4c8d88[_0x2ef211(0x23d)]['error'][_0x2ef211(0x217)]===0x1;}async[_0x4b08f6(0x22a)](_0x1c516a,_0xc04e78,_0xa14884,_0x1e63fd){const _0x157122=_0x4b08f6,_0x545857={'memberId':(await this['_sessionService'][_0x157122(0x251)](_0x1c516a))[_0x157122(0x225)](),'threadId':_0xa14884,'replyId':_0x1e63fd,'unitId':_0x1c516a},_0x43ea47=await this['_httpService'][_0x157122(0x240)](_0x157122(0x250)+_0x1c516a+_0x157122(0x226),{'body':_0x545857});return!_0x43ea47['body'][_0x157122(0x228)]||_0x43ea47[_0x157122(0x23d)][_0x157122(0x228)]['code']===0x1;}async['listComments'](_0x434bc,_0x302d82,_0x172f4f){const _0x8af3f7=_0x4b08f6,_0x4adfdd={'unitId':_0x434bc,'threadId':_0x172f4f},_0x145006=await this['_httpService'][_0x8af3f7(0x240)](_0x8af3f7(0x250)+_0x434bc+_0x8af3f7(0x24f),{'body':_0x4adfdd}),_0x567911=_0x172f4f['map'](_0x1e2373=>ee(_0x145006[_0x8af3f7(0x23d)][_0x8af3f7(0x1fd)][_0x1e2373],_0x434bc,_0x302d82))[_0x8af3f7(0x21d)](Boolean);return Object[_0x8af3f7(0x209)](_0x145006[_0x8af3f7(0x23d)][_0x8af3f7(0x247)])[_0x8af3f7(0x24c)](_0x5763e9=>{const _0x124be9=_0x8af3f7;this[_0x124be9(0x24a)][_0x124be9(0x21f)](_0x5763e9);}),_0x567911;}['saveCommentToSnapshot'](_0x4a24c7){return{'id':_0x4a24c7['id'],'threadId':_0x4a24c7['threadId'],'ref':_0x4a24c7['ref']};}};function _0x381c(_0x3f7cc3,_0x2c96f6){const _0x4e29cf=_0x4e29();return _0x381c=function(_0x381c4e,_0x462b14){_0x381c4e=_0x381c4e-0x1f3;let _0x38e225=_0x4e29cf[_0x381c4e];return _0x38e225;},_0x381c(_0x3f7cc3,_0x2c96f6);}S=Q([b(0x0,_0x33eaaf(_0x3fadc1)),b(0x1,_0x33eaaf(_0x229c9b)),b(0x2,_0x33eaaf(_0x12bcca))],S);var re=Object[_0x4b08f6(0x20b)],te=(_0x252623,_0x1bf283,_0x5b35f7,_0x4c1d65)=>{const _0x8d8ea4=_0x4b08f6;for(var _0x630a01=_0x4c1d65>0x1?void 0x0:_0x4c1d65?re(_0x1bf283,_0x5b35f7):_0x1bf283,_0x3a0ed7=_0x252623[_0x8d8ea4(0x203)]-0x1,_0x1bfa19;_0x3a0ed7>=0x0;_0x3a0ed7--)(_0x1bfa19=_0x252623[_0x3a0ed7])&&(_0x630a01=_0x1bfa19(_0x630a01)||_0x630a01);return _0x630a01;},M=(_0x21c651,_0x45bb1a)=>(_0x3a54fa,_0x1e2364)=>_0x45bb1a(_0x3a54fa,_0x1e2364,_0x21c651);function _0x4e29(){const _0x585bac=['1094967usSBuy','resolveComment','dataSource','_initUserSync','userId','Solve','size','unitId','_httpService','8614295JIhLsD','588932pDloOn','160VRHUoP','type','thread-comment-data-source.config','onReady','onStarting','body','stringify','reply','post','Solved','665360hafJzi','/solved','getComment','replies','Add','users','rangeType','createTimestamp','_userService','/add','forEach','parse','_sessionService','/list','/universer-api/comment/unit/','requireSession','add','/universer-api/user/list','/reply','syncUpdateMutationToColla','Reply','userID','updateComment','_threadCommentDataSource','202748MLtGBD','personId','find','rangeId','916902qWQYUw','OpenOrReOpen','comments','_threadCommentModel','Delete','_configService','Edit','delete','length','setConfig','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','pluginName','format','values','_init','getOwnPropertyDescriptor','user','_initDataSource','_injector','_commentService','_threadCommentDataSourceService','root','parentId','UNRECOGNIZED','2133378hRNyIo','solved','map','code','replyId','content','getUnit','payload','threadId','filter','getCurrentUser','addUser','addComment','subscribe','/edit','Unknown','disposeWithMe','getMemberID','/delete','commentUpdate$','error','_config','deleteComment','YYYY/MM/DD\x20HH:mm','COMMENT'];_0x4e29=function(){return _0x585bac;};return _0x4e29();}let f=class extends _0x22017b{constructor(_0x1fbce7,_0x4aef7f){const _0x5f1cb9=_0x4b08f6;super(),this[_0x5f1cb9(0x210)]=_0x1fbce7,this['_threadCommentDataSource']=_0x4aef7f,this[_0x5f1cb9(0x20d)]();}[_0x4b08f6(0x20d)](){const _0x39bd99=_0x4b08f6;this[_0x39bd99(0x210)][_0x39bd99(0x22f)]=this[_0x39bd99(0x1f6)],this[_0x39bd99(0x210)][_0x39bd99(0x255)]=!0x1;}};f=te([M(0x0,_0x44c2d7),M(0x1,_0x33eaaf(S))],f);var se=Object[_0x4b08f6(0x206)],oe=Object[_0x4b08f6(0x20b)],ne=(_0x5ddfcd,_0x2cba70,_0x3450f2)=>_0x2cba70 in _0x5ddfcd?se(_0x5ddfcd,_0x2cba70,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3450f2}):_0x5ddfcd[_0x2cba70]=_0x3450f2,ie=(_0x240900,_0x3a6d81,_0x175be9,_0x1bbd9d)=>{const _0x2a7aab=_0x4b08f6;for(var _0x41f05f=_0x1bbd9d>0x1?void 0x0:_0x1bbd9d?oe(_0x3a6d81,_0x175be9):_0x3a6d81,_0x37d7ea=_0x240900[_0x2a7aab(0x203)]-0x1,_0x460391;_0x37d7ea>=0x0;_0x37d7ea--)(_0x460391=_0x240900[_0x37d7ea])&&(_0x41f05f=_0x460391(_0x41f05f)||_0x41f05f);return _0x41f05f;},N=(_0x43b8be,_0x4cd569)=>(_0x3ca44b,_0x15e210)=>_0x4cd569(_0x3ca44b,_0x15e210,_0x43b8be),$=(_0x31d1cc,_0x54acf3,_0x8c279f)=>ne(_0x31d1cc,typeof _0x54acf3!='symbol'?_0x54acf3+'':_0x54acf3,_0x8c279f);let g=class extends _0x45a9df{constructor(_0x2b5b1a=O,_0x5703f0,_0xc3bc18){const _0x3d3b28=_0x4b08f6;super(),this['_config']=_0x2b5b1a,this['_injector']=_0x5703f0,this[_0x3d3b28(0x200)]=_0xc3bc18;const {..._0x67b588}=_0x59e53c({},O,this[_0x3d3b28(0x229)]);this['_configService'][_0x3d3b28(0x204)](z,_0x67b588);}[_0x4b08f6(0x23c)](){const _0x58203a=_0x4b08f6;[[S],[f],[_]][_0x58203a(0x24c)](_0x1f486d=>{const _0x58d8d3=_0x58203a;this[_0x58d8d3(0x20e)][_0x58d8d3(0x252)](_0x1f486d);});}[_0x4b08f6(0x23b)](){const _0x235f92=_0x4b08f6;this[_0x235f92(0x20e)]['get'](f),this[_0x235f92(0x20e)]['get'](_);}};$(g,_0x4b08f6(0x207),W),$(g,_0x4b08f6(0x239),_0x52cebc['UNIVER_UNKNOWN']),g=ie([_0x4925bc(_0x341ce2,_0x3ab8c5,_0x3e3ea1),N(0x1,_0x33eaaf(_0x2b41cd)),N(0x2,_0x4a913c)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1d8798,_0x28aea5){const _0x5ae101=_0x40ee,_0xa9b065=_0x1d8798();while(!![]){try{const _0x167d95=-parseInt(_0x5ae101(0x105))/0x1+-parseInt(_0x5ae101(0x11c))/0x2*(-parseInt(_0x5ae101(0x143))/0x3)+parseInt(_0x5ae101(0x10a))/0x4+-parseInt(_0x5ae101(0x11a))/0x5+-parseInt(_0x5ae101(0xd9))/0x6*(-parseInt(_0x5ae101(0x134))/0x7)+-parseInt(_0x5ae101(0x121))/0x8+parseInt(_0x5ae101(0x103))/0x9;if(_0x167d95===_0x28aea5)break;else _0xa9b065['push'](_0xa9b065['shift']());}catch(_0x5024b5){_0xa9b065['push'](_0xa9b065['shift']());}}}(_0x20fa,0xb9f4b),function(_0x34f2bd,_0x1724d8){const _0x2170da=_0x40ee;typeof exports==_0x2170da(0x100)&&typeof module<'u'?_0x1724d8(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define['amd']?define([_0x2170da(0xe9),_0x2170da(0x11d),'@univerjs-pro/license','@univerjs/core',_0x2170da(0xff),_0x2170da(0xf8),_0x2170da(0x130),_0x2170da(0xe5)],_0x1724d8):(_0x34f2bd=typeof globalThis<'u'?globalThis:_0x34f2bd||self,_0x1724d8(_0x34f2bd[_0x2170da(0xe1)]={},_0x34f2bd['UniverProCollaborationClient'],_0x34f2bd['UniverProLicense'],_0x34f2bd[_0x2170da(0xda)],_0x34f2bd['UniverThreadCommentUi'],_0x34f2bd[_0x2170da(0x114)],_0x34f2bd[_0x2170da(0x130)],_0x34f2bd['UniverNetwork']));}(this,function(_0x4c7cd7,_0x2d5994,_0x5bcd5c,_0x35dc7d,_0x564085,_0x5f4c25,_0x4d2593,_0x16bd52){'use strict';const _0x15015b=_0x40ee;const _0x3d9bb4=_0x15015b(0xe2);var _0x3fcd43=(_0x484ae5=>(_0x484ae5[_0x484ae5[_0x15015b(0x144)]=0x0]='OpenOrReOpen',_0x484ae5[_0x484ae5['Solved']=0x1]=_0x15015b(0x135),_0x484ae5[_0x484ae5[_0x15015b(0x104)]=-0x1]=_0x15015b(0x104),_0x484ae5))(_0x3fcd43||{}),_0x17088c=(_0x5b58f9=>(_0x5b58f9[_0x5b58f9['Unknown']=0x0]=_0x15015b(0xf2),_0x5b58f9[_0x5b58f9[_0x15015b(0xd7)]=0x1]=_0x15015b(0xd7),_0x5b58f9[_0x5b58f9['Reply']=0x2]=_0x15015b(0xf4),_0x5b58f9[_0x5b58f9[_0x15015b(0x14c)]=0x3]=_0x15015b(0x14c),_0x5b58f9[_0x5b58f9['Delete']=0x4]=_0x15015b(0x116),_0x5b58f9[_0x5b58f9[_0x15015b(0x137)]=0x5]=_0x15015b(0x137),_0x5b58f9[_0x5b58f9[_0x15015b(0x104)]=-0x1]=_0x15015b(0x104),_0x5b58f9))(_0x17088c||{});const _0x3c4352=_0x291c2e=>_0x35dc7d['dayjs'](new Date(+_0x291c2e))[_0x15015b(0x14a)](_0x15015b(0x123)),_0x29cc28=async(_0x3aae23,_0x239ce2)=>{const _0x544198=_0x15015b,_0x15e460=_0x3aae23[_0x544198(0xdf)](_0x35dc7d[_0x544198(0xdd)]),_0x2323d0=_0x3aae23[_0x544198(0xdf)](_0x16bd52[_0x544198(0xfa)]);_0x239ce2[_0x544198(0xf3)](_0xc2a973=>{const _0x3544a=_0x544198;_0x15e460['getUser'](_0xc2a973)&&_0x239ce2[_0x3544a(0xf1)](_0xc2a973);}),_0x239ce2[_0x544198(0x10c)]&&(await _0x2323d0[_0x544198(0xdf)](_0x544198(0x112),{'params':{'userIDs':[..._0x239ce2]}}))[_0x544198(0xfc)][_0x544198(0x10e)]['forEach'](_0x3f2140=>{const _0x4ec464=_0x544198;_0x3f2140&&_0x15e460[_0x4ec464(0xf0)](_0x3f2140);});};var _0x1593d1=Object[_0x15015b(0xd4)],_0x4a9f54=(_0x17280a,_0x52d324,_0x308252,_0x133035)=>{const _0x3a1486=_0x15015b;for(var _0x33216c=_0x133035>0x1?void 0x0:_0x133035?_0x1593d1(_0x52d324,_0x308252):_0x52d324,_0xf9cf3b=_0x17280a[_0x3a1486(0x11e)]-0x1,_0x5d7f3b;_0xf9cf3b>=0x0;_0xf9cf3b--)(_0x5d7f3b=_0x17280a[_0xf9cf3b])&&(_0x33216c=_0x5d7f3b(_0x33216c)||_0x33216c);return _0x33216c;},_0x2abb1e=(_0x1899e2,_0x3d755a)=>(_0x1e84e1,_0x161f69)=>_0x3d755a(_0x1e84e1,_0x161f69,_0x1899e2);let _0x516e59=class extends _0x35dc7d[_0x15015b(0x10f)]{constructor(_0x2fd134,_0x46b857,_0x3c9230,_0x59d966){const _0x4e3277=_0x15015b;super(),this[_0x4e3277(0x12f)]=_0x2fd134,this['_threadCommentModel']=_0x46b857,this[_0x4e3277(0xea)]=_0x3c9230,this['_injector']=_0x59d966,this[_0x4e3277(0xd5)](),this['_initUserSync']();}[_0x15015b(0xd2)](){const _0x4bbf2b=_0x15015b;this['disposeWithMe'](this[_0x4bbf2b(0x133)][_0x4bbf2b(0xdc)]['pipe'](_0x4d2593[_0x4bbf2b(0x129)](0x10))['subscribe'](_0x5c4313=>{const _0x266960=_0x4bbf2b,_0x874bf4=new Set();_0x5c4313[_0x266960(0xf3)](_0x3742b6=>{const _0x5dda26=_0x266960;switch(_0x3742b6[_0x5dda26(0xd3)]){case _0x5dda26(0xd6):{const _0x493ee7=_0x3742b6[_0x5dda26(0x136)][_0x5dda26(0x145)];_0x874bf4[_0x5dda26(0xd6)](_0x493ee7);break;}}}),_0x29cc28(this[_0x266960(0x119)],_0x874bf4);}));}[_0x15015b(0xd5)](){const _0x4694fa=_0x15015b;this[_0x4694fa(0x14e)](this[_0x4694fa(0x12f)][_0x4694fa(0xdc)][_0x4694fa(0x110)](async _0x2be083=>{const _0x1d624f=_0x4694fa;var _0x452611,_0x31fb94,_0x28e4a3,_0x2f2cd0;const _0x1275b1=(_0x452611=this[_0x1d624f(0x133)][_0x1d624f(0x111)](_0x2be083[_0x1d624f(0x13e)])[_0x1d624f(0x118)](_0x398f02=>_0x398f02[_0x1d624f(0x13a)]===_0x2be083['threadId']))==null?void 0x0:_0x452611['root'];if(!_0x1275b1)return;const {unitId:_0x3ca67c,subUnitId:_0x31e06d}=_0x1275b1;switch(_0x2be083['user']&&this[_0x1d624f(0xea)][_0x1d624f(0xf0)](_0x2be083[_0x1d624f(0x12d)]),_0x2be083[_0x1d624f(0xd3)]){case _0x17088c['Add']:break;case _0x17088c[_0x1d624f(0xf4)]:{this[_0x1d624f(0x133)][_0x1d624f(0x125)](_0x3ca67c,_0x31e06d,{'unitId':_0x3ca67c,'subUnitId':_0x31e06d,'ref':'','id':_0x2be083[_0x1d624f(0x107)],'dT':_0x3c4352(+_0x2be083[_0x1d624f(0x127)]),'threadId':_0x2be083[_0x1d624f(0x13a)],'personId':(_0x28e4a3=(_0x31fb94=_0x2be083[_0x1d624f(0x12d)])==null?void 0x0:_0x31fb94[_0x1d624f(0xe6)])!=null?_0x28e4a3:_0x2be083[_0x1d624f(0xfb)],'text':JSON[_0x1d624f(0x12b)](_0x2be083[_0x1d624f(0x148)]),'parentId':_0x1275b1['id']});break;}case _0x17088c[_0x1d624f(0x116)]:{const _0x462d38=this['_threadCommentModel'][_0x1d624f(0x131)](_0x3ca67c,_0x31e06d,_0x2be083[_0x1d624f(0x107)]);_0x462d38&&_0x462d38[_0x1d624f(0xd8)]&&this[_0x1d624f(0x133)]['deleteComment'](_0x3ca67c,_0x31e06d,_0x2be083[_0x1d624f(0x107)]);break;}case _0x17088c[_0x1d624f(0x14c)]:{this['_threadCommentModel'][_0x1d624f(0x120)](_0x3ca67c,_0x31e06d,{'commentId':_0x2be083[_0x1d624f(0x107)],'text':JSON[_0x1d624f(0x12b)](_0x2be083[_0x1d624f(0x148)])});break;}case _0x17088c[_0x1d624f(0x137)]:{const _0x59f7aa=(_0x2f2cd0=this[_0x1d624f(0x133)][_0x1d624f(0x111)](_0x2be083[_0x1d624f(0x13e)])[_0x1d624f(0x118)](_0x41a484=>_0x41a484[_0x1d624f(0x13a)]===_0x2be083[_0x1d624f(0x13a)]))==null?void 0x0:_0x2f2cd0[_0x1d624f(0x141)];_0x59f7aa&&this[_0x1d624f(0x133)][_0x1d624f(0x13b)](_0x3ca67c,_0x31e06d,_0x59f7aa['id'],_0x2be083[_0x1d624f(0x13d)]===_0x3fcd43[_0x1d624f(0x135)]);break;}}}));}};_0x516e59=_0x4a9f54([_0x2abb1e(0x0,_0x35dc7d['Inject'](_0x2d5994[_0x15015b(0x12c)])),_0x2abb1e(0x1,_0x35dc7d[_0x15015b(0x101)](_0x5f4c25[_0x15015b(0xec)])),_0x2abb1e(0x2,_0x35dc7d['Inject'](_0x35dc7d[_0x15015b(0xdd)])),_0x2abb1e(0x3,_0x35dc7d['Inject'](_0x35dc7d[_0x15015b(0x140)]))],_0x516e59);const _0x260143=_0x15015b(0x14b),_0xa24d8={};var _0x1b3816=Object['getOwnPropertyDescriptor'],_0x240f12=(_0x3c8a91,_0x50ceb3,_0x175f6a,_0x45495d)=>{const _0x1c282d=_0x15015b;for(var _0x89cddf=_0x45495d>0x1?void 0x0:_0x45495d?_0x1b3816(_0x50ceb3,_0x175f6a):_0x50ceb3,_0x18b19d=_0x3c8a91[_0x1c282d(0x11e)]-0x1,_0x5bf163;_0x18b19d>=0x0;_0x18b19d--)(_0x5bf163=_0x3c8a91[_0x18b19d])&&(_0x89cddf=_0x5bf163(_0x89cddf)||_0x89cddf);return _0x89cddf;},_0x51564c=(_0x5e969d,_0x5a9755)=>(_0x1aee62,_0x2bc3f4)=>_0x5a9755(_0x1aee62,_0x2bc3f4,_0x5e969d);function _0x3232be(_0x241ad2,_0x3db7e2){const _0x3ead38=_0x15015b,_0x397b47=_0x241ad2[_0x3ead38(0x142)][0x0];return{..._0x3db7e2,'id':_0x397b47[_0x3ead38(0x107)],'resolved':_0x241ad2[_0x3ead38(0x13d)]===0x1,'dT':_0x3c4352(_0x397b47[_0x3ead38(0x127)]),'personId':_0x397b47['userId'],'threadId':_0x397b47[_0x3ead38(0x13a)]};}function _0x265f9f(_0xc6bfb2,_0xbc977f,_0x4892f1){const _0x14908b=_0x15015b;var _0x30223b,_0x2527ce;if(((_0x2527ce=(_0x30223b=_0xc6bfb2==null?void 0x0:_0xc6bfb2[_0x14908b(0x142)])==null?void 0x0:_0x30223b[_0x14908b(0x11e)])!=null?_0x2527ce:0x0)>0x0){const _0x3887ef=(_0x495355,_0x4af366)=>({'id':_0x495355[_0x14908b(0x107)],'threadId':_0x495355[_0x14908b(0x13a)],'dT':_0x3c4352(_0x495355['createTimestamp']),'personId':_0x495355[_0x14908b(0xfb)],'resolved':_0xc6bfb2['solved']===_0x3fcd43[_0x14908b(0x135)],'unitId':_0xbc977f,'subUnitId':_0x4892f1,'text':JSON[_0x14908b(0x12b)](_0x495355[_0x14908b(0x148)]),'parentId':_0x4af366}),_0x3a8309=_0x3887ef(_0xc6bfb2[_0x14908b(0x142)][0x0]);return{..._0x3a8309,'children':_0xc6bfb2[_0x14908b(0x142)]['slice'](0x1)[_0x14908b(0xef)](_0x5c062d=>_0x3887ef(_0x5c062d,_0x3a8309['id']))};}return null;}let _0x36f2f2=class{constructor(_0x5da468,_0x1745d7,_0x1615b8){const _0x4b4726=_0x15015b;this['_httpService']=_0x5da468,this[_0x4b4726(0xea)]=_0x1745d7,this[_0x4b4726(0xfd)]=_0x1615b8;}async[_0x15015b(0x125)](_0x49b8fd){const _0xcf72b9=_0x15015b;var _0x4284e2,_0x5d148f;const {parentId:_0x3e6a9e,unitId:_0x2970f3,text:_0x3628df,threadId:_0x414fdc}=_0x49b8fd,_0x1a9153=(_0x5d148f=(_0x4284e2=_0x3628df['customRanges'])==null?void 0x0:_0x4284e2[_0xcf72b9(0xee)](_0x2a0c5c=>_0x2a0c5c[_0xcf72b9(0x122)]===_0x35dc7d[_0xcf72b9(0x124)]['COMMENT'])['map'](_0x50d4d8=>_0x50d4d8[_0xcf72b9(0xd1)]))!=null?_0x5d148f:[],_0x4fb88a=JSON[_0xcf72b9(0x13c)](_0x3628df),_0x168990=(await this['_sessionService'][_0xcf72b9(0x12e)](_0x2970f3))[_0xcf72b9(0x11f)]();if(_0x3e6a9e){const _0xd228ef={'memberId':_0x168990,'unitId':_0x2970f3,'content':_0x4fb88a,'mention':_0x1a9153,'threadId':_0x414fdc},_0x2181ec=(await this[_0xcf72b9(0xde)][_0xcf72b9(0xeb)]('/universer-api/comment/unit/'+_0x2970f3+_0xcf72b9(0xe8),{'body':_0xd228ef}))[_0xcf72b9(0xfc)]['reply'];return{..._0x49b8fd,'id':_0x2181ec[_0xcf72b9(0x107)],'dT':_0x35dc7d[_0xcf72b9(0x10b)](+_0x2181ec[_0xcf72b9(0x127)])[_0xcf72b9(0x14a)](_0xcf72b9(0x123)),'personId':_0x2181ec[_0xcf72b9(0xfb)]};}else{const _0x3dd9ee={'memberId':_0x168990,'unitId':_0x2970f3,'content':_0x4fb88a,'mention':_0x1a9153},_0x4dcb9d=await this['_httpService'][_0xcf72b9(0xeb)](_0xcf72b9(0x13f)+_0x2970f3+_0xcf72b9(0x128),{'body':_0x3dd9ee});return _0x3232be(_0x4dcb9d['body'][_0xcf72b9(0x139)],_0x49b8fd);}}async[_0x15015b(0x120)](_0x4d5a87){const _0x1d339d=_0x15015b;var _0x2ab6b4,_0x27bdbd;const {text:_0x1c8f10,unitId:_0x47a094}=_0x4d5a87,_0x5689b4=(_0x27bdbd=(_0x2ab6b4=_0x1c8f10['customRanges'])==null?void 0x0:_0x2ab6b4[_0x1d339d(0xee)](_0xf67312=>_0xf67312[_0x1d339d(0x122)]===_0x35dc7d[_0x1d339d(0x124)][_0x1d339d(0xf7)])[_0x1d339d(0xef)](_0x15cd69=>_0x15cd69[_0x1d339d(0xd1)]))!=null?_0x27bdbd:[],_0x25af08=JSON[_0x1d339d(0x13c)](_0x1c8f10),_0x371cda=_0x4d5a87[_0x1d339d(0x13a)],_0x522bea=_0x4d5a87['id'],_0x3456db={'memberId':(await this[_0x1d339d(0xfd)][_0x1d339d(0x12e)](_0x47a094))[_0x1d339d(0x11f)](),'unitId':_0x47a094,'threadId':_0x371cda,'mention':_0x5689b4,'content':_0x25af08,'replyId':_0x522bea},_0x125769=await this[_0x1d339d(0xde)][_0x1d339d(0xeb)]('/universer-api/comment/unit/'+_0x47a094+_0x1d339d(0x12a),{'body':_0x3456db});return!_0x125769['body'][_0x1d339d(0x106)]||_0x125769[_0x1d339d(0xfc)]['error'][_0x1d339d(0xed)]===0x1;}async[_0x15015b(0x13b)](_0x1a173b){const _0x6e6663=_0x15015b,{unitId:_0x5d1f13}=_0x1a173b,_0x21733f=_0x1a173b[_0x6e6663(0x13a)],_0xaab5ca={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x5d1f13,'threadId':_0x21733f,'solved':_0x1a173b['resolved']?_0x3fcd43[_0x6e6663(0x135)]:_0x3fcd43[_0x6e6663(0x144)]},_0x397ce4=await this[_0x6e6663(0xde)][_0x6e6663(0xeb)](_0x6e6663(0x13f)+_0x5d1f13+_0x6e6663(0xe3),{'body':_0xaab5ca});return!_0x397ce4[_0x6e6663(0xfc)][_0x6e6663(0x106)]||_0x397ce4[_0x6e6663(0xfc)][_0x6e6663(0x106)][_0x6e6663(0xed)]===0x1;}async[_0x15015b(0x147)](_0x5d1a6d,_0x55c6c4,_0x44471b,_0x205517){const _0x4e40e9=_0x15015b,_0xf73b64={'memberId':(await this[_0x4e40e9(0xfd)]['requireSession'](_0x5d1a6d))[_0x4e40e9(0x11f)](),'threadId':_0x44471b,'replyId':_0x205517,'unitId':_0x5d1a6d},_0xcc5e79=await this[_0x4e40e9(0xde)][_0x4e40e9(0xeb)](_0x4e40e9(0x13f)+_0x5d1a6d+_0x4e40e9(0xdb),{'body':_0xf73b64});return!_0xcc5e79['body'][_0x4e40e9(0x106)]||_0xcc5e79[_0x4e40e9(0xfc)][_0x4e40e9(0x106)][_0x4e40e9(0xed)]===0x1;}async['listComments'](_0x50d5bb,_0x33c7b2,_0x12e6af){const _0xe9ce3f=_0x15015b,_0x190ea7={'unitId':_0x50d5bb,'threadId':_0x12e6af},_0x3fc1be=await this['_httpService'][_0xe9ce3f(0xeb)](_0xe9ce3f(0x13f)+_0x50d5bb+'/list',{'body':_0x190ea7}),_0x251b65=_0x12e6af[_0xe9ce3f(0xef)](_0x59b9ec=>_0x265f9f(_0x3fc1be[_0xe9ce3f(0xfc)][_0xe9ce3f(0x146)][_0x59b9ec],_0x50d5bb,_0x33c7b2))[_0xe9ce3f(0xee)](Boolean);return Object[_0xe9ce3f(0x14d)](_0x3fc1be[_0xe9ce3f(0xfc)][_0xe9ce3f(0x10e)])[_0xe9ce3f(0xf3)](_0x3ee570=>{const _0x2ebb25=_0xe9ce3f;this[_0x2ebb25(0xea)][_0x2ebb25(0xf0)](_0x3ee570);}),_0x251b65;}[_0x15015b(0x102)](_0x140654){const _0x1f4375=_0x15015b;return{'id':_0x140654['id'],'threadId':_0x140654[_0x1f4375(0x13a)],'ref':_0x140654['ref']};}};_0x36f2f2=_0x240f12([_0x51564c(0x0,_0x35dc7d[_0x15015b(0x101)](_0x16bd52[_0x15015b(0xfa)])),_0x51564c(0x1,_0x35dc7d['Inject'](_0x35dc7d[_0x15015b(0xdd)])),_0x51564c(0x2,_0x35dc7d[_0x15015b(0x101)](_0x2d5994['CollaborationSessionService']))],_0x36f2f2);var _0x4224f1=Object[_0x15015b(0xd4)],_0x558249=(_0x3c2f4b,_0x286f7b,_0x54c5b3,_0x4de0e7)=>{const _0x38f2a3=_0x15015b;for(var _0x34c497=_0x4de0e7>0x1?void 0x0:_0x4de0e7?_0x4224f1(_0x286f7b,_0x54c5b3):_0x286f7b,_0x174e7b=_0x3c2f4b[_0x38f2a3(0x11e)]-0x1,_0x15ee0f;_0x174e7b>=0x0;_0x174e7b--)(_0x15ee0f=_0x3c2f4b[_0x174e7b])&&(_0x34c497=_0x15ee0f(_0x34c497)||_0x34c497);return _0x34c497;},_0x4dc30b=(_0x18817b,_0x418121)=>(_0x31731a,_0x366727)=>_0x418121(_0x31731a,_0x366727,_0x18817b);let _0x49d7cd=class extends _0x35dc7d[_0x15015b(0x10f)]{constructor(_0x83f409,_0x50ec50){const _0x8029c7=_0x15015b;super(),this[_0x8029c7(0x109)]=_0x83f409,this[_0x8029c7(0x149)]=_0x50ec50,this[_0x8029c7(0x11b)]();}[_0x15015b(0x11b)](){const _0x465f3e=_0x15015b;this[_0x465f3e(0x109)]['dataSource']=this[_0x465f3e(0x149)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x49d7cd=_0x558249([_0x4dc30b(0x0,_0x5f4c25['IThreadCommentDataSourceService']),_0x4dc30b(0x1,_0x35dc7d['Inject'](_0x36f2f2))],_0x49d7cd);var _0x4cf2c1=Object['defineProperty'],_0x24f466=Object[_0x15015b(0xd4)],_0x3300b2=(_0x3bce12,_0x5edaa1,_0x92b56f)=>_0x5edaa1 in _0x3bce12?_0x4cf2c1(_0x3bce12,_0x5edaa1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x92b56f}):_0x3bce12[_0x5edaa1]=_0x92b56f,_0x54f16f=(_0x1ff9f0,_0x4b09b4,_0x18604d,_0x1fbfa8)=>{const _0x479930=_0x15015b;for(var _0x50a84c=_0x1fbfa8>0x1?void 0x0:_0x1fbfa8?_0x24f466(_0x4b09b4,_0x18604d):_0x4b09b4,_0x1cd747=_0x1ff9f0[_0x479930(0x11e)]-0x1,_0x3f22cf;_0x1cd747>=0x0;_0x1cd747--)(_0x3f22cf=_0x1ff9f0[_0x1cd747])&&(_0x50a84c=_0x3f22cf(_0x50a84c)||_0x50a84c);return _0x50a84c;},_0x30b072=(_0x3e795c,_0x2d3670)=>(_0x5ecf0b,_0x5c9dc4)=>_0x2d3670(_0x5ecf0b,_0x5c9dc4,_0x3e795c),_0x4f482f=(_0x4c069e,_0x47ef09,_0x54ba97)=>_0x3300b2(_0x4c069e,typeof _0x47ef09!=_0x15015b(0x138)?_0x47ef09+'':_0x47ef09,_0x54ba97);_0x4c7cd7[_0x15015b(0xe0)]=class extends _0x35dc7d[_0x15015b(0xf6)]{constructor(_0x499924=_0xa24d8,_0x294384,_0x29e110){const _0x3deb1=_0x15015b;super(),this[_0x3deb1(0xf9)]=_0x499924,this['_injector']=_0x294384,this[_0x3deb1(0x113)]=_0x29e110;const {..._0x292125}=_0x35dc7d['merge']({},_0xa24d8,this[_0x3deb1(0xf9)]);this['_configService'][_0x3deb1(0x115)](_0x260143,_0x292125);}[_0x15015b(0x10d)](){const _0x18bf93=_0x15015b;[[_0x36f2f2],[_0x49d7cd],[_0x516e59]][_0x18bf93(0xf3)](_0x3c35ed=>{const _0x25896e=_0x18bf93;this[_0x25896e(0x119)]['add'](_0x3c35ed);});}['onReady'](){const _0x5c3919=_0x15015b;this['_injector']['get'](_0x49d7cd),this[_0x5c3919(0x119)]['get'](_0x516e59);}},_0x4f482f(_0x4c7cd7[_0x15015b(0xe0)],'pluginName',_0x3d9bb4),_0x4f482f(_0x4c7cd7[_0x15015b(0xe0)],_0x15015b(0xd3),_0x35dc7d['UniverInstanceType'][_0x15015b(0x117)]),_0x4c7cd7[_0x15015b(0xe0)]=_0x54f16f([_0x35dc7d[_0x15015b(0xe4)](_0x564085[_0x15015b(0x132)],_0x2d5994['UniverCollaborationClientPlugin'],_0x5bcd5c[_0x15015b(0x126)]),_0x30b072(0x1,_0x35dc7d['Inject'](_0x35dc7d[_0x15015b(0x140)])),_0x30b072(0x2,_0x35dc7d[_0x15015b(0x108)])],_0x4c7cd7[_0x15015b(0xe0)]),Object[_0x15015b(0xe7)](_0x4c7cd7,Symbol[_0x15015b(0xf5)],{'value':_0x15015b(0xfe)});}));function _0x40ee(_0x22a5ee,_0x499ca3){const _0x20fa16=_0x20fa();return _0x40ee=function(_0x40eeb1,_0x2b44fc){_0x40eeb1=_0x40eeb1-0xd1;let _0x680306=_0x20fa16[_0x40eeb1];return _0x680306;},_0x40ee(_0x22a5ee,_0x499ca3);}function _0x20fa(){const _0x444878=['COMMENT','@univerjs/thread-comment','_config','HTTPService','userId','body','_sessionService','Module','@univerjs/thread-comment-ui','object','Inject','saveCommentToSnapshot','2117628GpJLji','UNRECOGNIZED','533564NNnqkw','error','replyId','IConfigService','_threadCommentDataSourceService','3136324LYRpSa','dayjs','size','onStarting','users','Disposable','subscribe','getUnit','/universer-api/user/list','_configService','UniverThreadComment','setConfig','Delete','UNIVER_UNKNOWN','find','_injector','1962940WlkeqY','_initDataSource','1220wkqlvw','@univerjs-pro/collaboration-client','length','getMemberID','updateComment','8884208ESbWYi','rangeType','YYYY/MM/DD\x20HH:mm','CustomRangeType','addComment','UniverLicensePlugin','createTimestamp','/add','bufferTime','/edit','parse','CommentService','user','requireSession','_commentService','rxjs','getComment','UniverThreadCommentUIPlugin','_threadCommentModel','7VlZRvd','Solved','payload','Solve','symbol','comment','threadId','resolveComment','stringify','solved','unitId','/universer-api/comment/unit/','Injector','root','replies','4509xBQtsX','OpenOrReOpen','personId','comments','deleteComment','content','_threadCommentDataSource','format','thread-comment-data-source.config','Edit','values','disposeWithMe','rangeId','_initUserSync','type','getOwnPropertyDescriptor','_init','add','Add','parentId','5172900mktqnj','UniverCore','/delete','commentUpdate$','UserManagerService','_httpService','get','UniverThreadCommentDataSourcePlugin','UniverProThreadCommentDatasource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/solved','DependentOn','@univerjs/network','userID','defineProperty','/reply','exports','_userService','post','ThreadCommentModel','code','filter','map','addUser','delete','Unknown','forEach','Reply','toStringTag','Plugin'];_0x20fa=function(){return _0x444878;};return _0x20fa();}
|
|
1
|
+
function _0xf14b(_0x4f1e45,_0x1e8300){const _0xc4d386=_0xc4d3();return _0xf14b=function(_0xf14b67,_0x253dda){_0xf14b67=_0xf14b67-0x12c;let _0x4534f7=_0xc4d386[_0xf14b67];return _0x4534f7;},_0xf14b(_0x4f1e45,_0x1e8300);}(function(_0x28dbe3,_0x5a87e8){const _0x1ebd6f=_0xf14b,_0x17c83a=_0x28dbe3();while(!![]){try{const _0x2bbd51=-parseInt(_0x1ebd6f(0x154))/0x1*(-parseInt(_0x1ebd6f(0x153))/0x2)+parseInt(_0x1ebd6f(0x18e))/0x3*(parseInt(_0x1ebd6f(0x16d))/0x4)+parseInt(_0x1ebd6f(0x189))/0x5+parseInt(_0x1ebd6f(0x14d))/0x6+parseInt(_0x1ebd6f(0x1aa))/0x7+parseInt(_0x1ebd6f(0x19b))/0x8*(parseInt(_0x1ebd6f(0x161))/0x9)+-parseInt(_0x1ebd6f(0x180))/0xa;if(_0x2bbd51===_0x5a87e8)break;else _0x17c83a['push'](_0x17c83a['shift']());}catch(_0x191704){_0x17c83a['push'](_0x17c83a['shift']());}}}(_0xc4d3,0xb99ac),function(_0x14e5ea,_0x47f183){const _0x448cb4=_0xf14b;typeof exports==_0x448cb4(0x19c)&&typeof module<'u'?_0x47f183(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x448cb4(0x17c)&&define['amd']?define(['exports',_0x448cb4(0x199),_0x448cb4(0x169),_0x448cb4(0x16b),_0x448cb4(0x17b),_0x448cb4(0x16e),'rxjs',_0x448cb4(0x160)],_0x47f183):(_0x14e5ea=typeof globalThis<'u'?globalThis:_0x14e5ea||self,_0x47f183(_0x14e5ea['UniverProThreadCommentDatasource']={},_0x14e5ea[_0x448cb4(0x172)],_0x14e5ea[_0x448cb4(0x141)],_0x14e5ea['UniverCore'],_0x14e5ea[_0x448cb4(0x175)],_0x14e5ea[_0x448cb4(0x14e)],_0x14e5ea['rxjs'],_0x14e5ea[_0x448cb4(0x1ab)]));}(this,function(_0x2c1112,_0xac7b5f,_0x589023,_0x5dbbbf,_0x428aaa,_0x366a66,_0x3848c4,_0x27ea21){'use strict';const _0x419903=_0xf14b;const _0x20280e=_0x419903(0x131);var _0x5dddc3=(_0xc8dfe3=>(_0xc8dfe3[_0xc8dfe3[_0x419903(0x162)]=0x0]=_0x419903(0x162),_0xc8dfe3[_0xc8dfe3[_0x419903(0x19f)]=0x1]=_0x419903(0x19f),_0xc8dfe3[_0xc8dfe3[_0x419903(0x185)]=-0x1]='UNRECOGNIZED',_0xc8dfe3))(_0x5dddc3||{}),_0x597688=(_0x654986=>(_0x654986[_0x654986['Unknown']=0x0]=_0x419903(0x19e),_0x654986[_0x654986[_0x419903(0x12c)]=0x1]=_0x419903(0x12c),_0x654986[_0x654986[_0x419903(0x1ac)]=0x2]=_0x419903(0x1ac),_0x654986[_0x654986['Edit']=0x3]=_0x419903(0x186),_0x654986[_0x654986[_0x419903(0x170)]=0x4]=_0x419903(0x170),_0x654986[_0x654986[_0x419903(0x192)]=0x5]='Solve',_0x654986[_0x654986['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x654986))(_0x597688||{});const _0x3af8fb=_0x1152fe=>_0x5dbbbf[_0x419903(0x12f)](new Date(+_0x1152fe))['format']('YYYY/MM/DD\x20HH:mm'),_0x290075=async(_0x5f206d,_0x2315bc)=>{const _0x457bad=_0x419903,_0x988a24=_0x5f206d[_0x457bad(0x14a)](_0x5dbbbf[_0x457bad(0x158)]),_0x5baf6d=_0x5f206d[_0x457bad(0x14a)](_0x27ea21[_0x457bad(0x14c)]);_0x2315bc['forEach'](_0x17daaa=>{const _0x2ea8da=_0x457bad;_0x988a24[_0x2ea8da(0x181)](_0x17daaa)&&_0x2315bc['delete'](_0x17daaa);}),_0x2315bc[_0x457bad(0x138)]&&(await _0x5baf6d['get'](_0x457bad(0x166),{'params':{'userIDs':[..._0x2315bc]}}))[_0x457bad(0x184)][_0x457bad(0x1a6)][_0x457bad(0x159)](_0x453644=>{const _0x184685=_0x457bad;_0x453644&&_0x988a24[_0x184685(0x171)](_0x453644);});};var _0x2e61de=Object['getOwnPropertyDescriptor'],_0x57a7cb=(_0x36ba10,_0x5ddae8,_0x1d79a4,_0x459e2d)=>{const _0x4f8a6a=_0x419903;for(var _0x134559=_0x459e2d>0x1?void 0x0:_0x459e2d?_0x2e61de(_0x5ddae8,_0x1d79a4):_0x5ddae8,_0x147bcd=_0x36ba10[_0x4f8a6a(0x13f)]-0x1,_0x2060cb;_0x147bcd>=0x0;_0x147bcd--)(_0x2060cb=_0x36ba10[_0x147bcd])&&(_0x134559=_0x2060cb(_0x134559)||_0x134559);return _0x134559;},_0x32dacb=(_0x345c74,_0x2e8b6d)=>(_0x5493ff,_0xd3e953)=>_0x2e8b6d(_0x5493ff,_0xd3e953,_0x345c74);let _0x126863=class extends _0x5dbbbf[_0x419903(0x1a2)]{constructor(_0x2520b2,_0x3f4a51,_0x4374ed,_0x37377e){const _0x4b1c53=_0x419903;super(),this['_commentService']=_0x2520b2,this[_0x4b1c53(0x14f)]=_0x3f4a51,this[_0x4b1c53(0x1a0)]=_0x4374ed,this['_injector']=_0x37377e,this[_0x4b1c53(0x15e)](),this['_initUserSync']();}[_0x419903(0x16c)](){const _0x5f3578=_0x419903;this[_0x5f3578(0x17a)](this[_0x5f3578(0x14f)][_0x5f3578(0x17f)][_0x5f3578(0x1b0)](_0x3848c4[_0x5f3578(0x13c)](0x10))[_0x5f3578(0x182)](_0x56d42f=>{const _0x361bc1=_0x5f3578,_0x576981=new Set();_0x56d42f['forEach'](_0x52bd5e=>{const _0x5a7c2b=_0xf14b;switch(_0x52bd5e['type']){case _0x5a7c2b(0x134):{const _0x34c35c=_0x52bd5e[_0x5a7c2b(0x17d)][_0x5a7c2b(0x163)];_0x576981[_0x5a7c2b(0x134)](_0x34c35c);break;}}}),_0x290075(this[_0x361bc1(0x155)],_0x576981);}));}[_0x419903(0x15e)](){const _0x2fc639=_0x419903;this[_0x2fc639(0x17a)](this[_0x2fc639(0x1a8)][_0x2fc639(0x17f)][_0x2fc639(0x182)](async _0xfe384=>{const _0x252dd8=_0x2fc639;var _0x14411d,_0xa92e3d,_0x19d1c2,_0x3e09f7;const _0x39e229=(_0x14411d=this['_threadCommentModel'][_0x252dd8(0x12d)](_0xfe384[_0x252dd8(0x147)])['find'](_0x19c60d=>_0x19c60d[_0x252dd8(0x142)]===_0xfe384['threadId']))==null?void 0x0:_0x14411d[_0x252dd8(0x164)];if(!_0x39e229)return;const {unitId:_0x4d40a2,subUnitId:_0x539bfa}=_0x39e229;switch(_0xfe384[_0x252dd8(0x191)]&&this[_0x252dd8(0x1a0)]['addUser'](_0xfe384[_0x252dd8(0x191)]),_0xfe384['type']){case _0x597688[_0x252dd8(0x12c)]:break;case _0x597688[_0x252dd8(0x1ac)]:{this['_threadCommentModel'][_0x252dd8(0x16a)](_0x4d40a2,_0x539bfa,{'unitId':_0x4d40a2,'subUnitId':_0x539bfa,'ref':'','id':_0xfe384['replyId'],'dT':_0x3af8fb(+_0xfe384['createTimestamp']),'threadId':_0xfe384[_0x252dd8(0x142)],'personId':(_0x19d1c2=(_0xa92e3d=_0xfe384[_0x252dd8(0x191)])==null?void 0x0:_0xa92e3d['userID'])!=null?_0x19d1c2:_0xfe384['userId'],'text':JSON[_0x252dd8(0x188)](_0xfe384[_0x252dd8(0x18a)]),'parentId':_0x39e229['id']});break;}case _0x597688[_0x252dd8(0x170)]:{const _0x3e8fbc=this[_0x252dd8(0x14f)]['getComment'](_0x4d40a2,_0x539bfa,_0xfe384[_0x252dd8(0x18d)]);_0x3e8fbc&&_0x3e8fbc[_0x252dd8(0x195)]&&this['_threadCommentModel'][_0x252dd8(0x156)](_0x4d40a2,_0x539bfa,_0xfe384[_0x252dd8(0x18d)]);break;}case _0x597688[_0x252dd8(0x186)]:{this[_0x252dd8(0x14f)]['updateComment'](_0x4d40a2,_0x539bfa,{'commentId':_0xfe384[_0x252dd8(0x18d)],'text':JSON['parse'](_0xfe384[_0x252dd8(0x18a)])});break;}case _0x597688[_0x252dd8(0x192)]:{const _0x2d467b=(_0x3e09f7=this[_0x252dd8(0x14f)][_0x252dd8(0x12d)](_0xfe384[_0x252dd8(0x147)])[_0x252dd8(0x18f)](_0x47e272=>_0x47e272[_0x252dd8(0x142)]===_0xfe384[_0x252dd8(0x142)]))==null?void 0x0:_0x3e09f7[_0x252dd8(0x164)];_0x2d467b&&this[_0x252dd8(0x14f)][_0x252dd8(0x18b)](_0x4d40a2,_0x539bfa,_0x2d467b['id'],_0xfe384['solved']===_0x5dddc3['Solved']);break;}}}));}};_0x126863=_0x57a7cb([_0x32dacb(0x0,_0x5dbbbf[_0x419903(0x167)](_0xac7b5f[_0x419903(0x146)])),_0x32dacb(0x1,_0x5dbbbf[_0x419903(0x167)](_0x366a66[_0x419903(0x15d)])),_0x32dacb(0x2,_0x5dbbbf[_0x419903(0x167)](_0x5dbbbf[_0x419903(0x158)])),_0x32dacb(0x3,_0x5dbbbf['Inject'](_0x5dbbbf[_0x419903(0x178)]))],_0x126863);const _0x16777d='thread-comment-data-source.config',_0x3d8e93={};var _0x52111f=Object['getOwnPropertyDescriptor'],_0x4f1674=(_0x183882,_0x20f2a0,_0xd9f299,_0x52bbb7)=>{const _0x124c0e=_0x419903;for(var _0x55ad12=_0x52bbb7>0x1?void 0x0:_0x52bbb7?_0x52111f(_0x20f2a0,_0xd9f299):_0x20f2a0,_0x406f9d=_0x183882[_0x124c0e(0x13f)]-0x1,_0x274f9f;_0x406f9d>=0x0;_0x406f9d--)(_0x274f9f=_0x183882[_0x406f9d])&&(_0x55ad12=_0x274f9f(_0x55ad12)||_0x55ad12);return _0x55ad12;},_0x460a70=(_0x187cc9,_0x5f0cb5)=>(_0x25e299,_0x558497)=>_0x5f0cb5(_0x25e299,_0x558497,_0x187cc9);function _0x517cb8(_0x2fcfc7,_0x412d7a){const _0x48b1bd=_0x419903,_0x248e51=_0x2fcfc7[_0x48b1bd(0x1a7)][0x0];return{..._0x412d7a,'id':_0x248e51['replyId'],'resolved':_0x2fcfc7[_0x48b1bd(0x149)]===0x1,'dT':_0x3af8fb(_0x248e51['createTimestamp']),'personId':_0x248e51['userId'],'threadId':_0x248e51[_0x48b1bd(0x142)]};}function _0x253dcc(_0x297d91,_0xbf0018,_0x12d4ae){const _0x2eac06=_0x419903;var _0xb1e3a1,_0x236b43;if(((_0x236b43=(_0xb1e3a1=_0x297d91==null?void 0x0:_0x297d91[_0x2eac06(0x1a7)])==null?void 0x0:_0xb1e3a1[_0x2eac06(0x13f)])!=null?_0x236b43:0x0)>0x0){const _0x238f7e=(_0x2605f3,_0x30ec00)=>({'id':_0x2605f3['replyId'],'threadId':_0x2605f3['threadId'],'dT':_0x3af8fb(_0x2605f3[_0x2eac06(0x1b1)]),'personId':_0x2605f3[_0x2eac06(0x13b)],'resolved':_0x297d91[_0x2eac06(0x149)]===_0x5dddc3[_0x2eac06(0x19f)],'unitId':_0xbf0018,'subUnitId':_0x12d4ae,'text':JSON['parse'](_0x2605f3[_0x2eac06(0x18a)]),'parentId':_0x30ec00}),_0x1cc23b=_0x238f7e(_0x297d91[_0x2eac06(0x1a7)][0x0]);return{..._0x1cc23b,'children':_0x297d91[_0x2eac06(0x1a7)][_0x2eac06(0x137)](0x1)['map'](_0x477ec8=>_0x238f7e(_0x477ec8,_0x1cc23b['id']))};}return null;}let _0x34da40=class{constructor(_0x34d94a,_0x4464fb,_0x163508){const _0x54519b=_0x419903;this[_0x54519b(0x130)]=_0x34d94a,this[_0x54519b(0x1a0)]=_0x4464fb,this[_0x54519b(0x150)]=_0x163508;}async['addComment'](_0x1ec698){const _0x5c6970=_0x419903;var _0x4f2340,_0x3bf274;const {parentId:_0x33aac3,unitId:_0x31db15,text:_0x2c119b,threadId:_0x39ab69}=_0x1ec698,_0xd7629b=(_0x3bf274=(_0x4f2340=_0x2c119b['customRanges'])==null?void 0x0:_0x4f2340[_0x5c6970(0x1a5)](_0x4eed3a=>_0x4eed3a[_0x5c6970(0x177)]===_0x5dbbbf[_0x5c6970(0x17e)][_0x5c6970(0x13a)])[_0x5c6970(0x179)](_0x444465=>_0x444465['rangeId']))!=null?_0x3bf274:[],_0x4666d1=JSON[_0x5c6970(0x14b)](_0x2c119b),_0x3d5bc3=(await this[_0x5c6970(0x150)]['requireSession'](_0x31db15))[_0x5c6970(0x13d)]();if(_0x33aac3){const _0xa8097b={'memberId':_0x3d5bc3,'unitId':_0x31db15,'content':_0x4666d1,'mention':_0xd7629b,'threadId':_0x39ab69},_0x60130=(await this[_0x5c6970(0x130)][_0x5c6970(0x1af)](_0x5c6970(0x12e)+_0x31db15+'/reply',{'body':_0xa8097b}))[_0x5c6970(0x184)][_0x5c6970(0x1a3)];return{..._0x1ec698,'id':_0x60130['replyId'],'dT':_0x5dbbbf[_0x5c6970(0x12f)](+_0x60130[_0x5c6970(0x1b1)])[_0x5c6970(0x19d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x60130[_0x5c6970(0x13b)]};}else{const _0x361231={'memberId':_0x3d5bc3,'unitId':_0x31db15,'content':_0x4666d1,'mention':_0xd7629b},_0x14747f=await this[_0x5c6970(0x130)][_0x5c6970(0x1af)](_0x5c6970(0x12e)+_0x31db15+'/add',{'body':_0x361231});return _0x517cb8(_0x14747f[_0x5c6970(0x184)][_0x5c6970(0x183)],_0x1ec698);}}async[_0x419903(0x1ad)](_0x5b80ce){const _0x2c5cc4=_0x419903;var _0x16d236,_0x1aab81;const {text:_0x4e60ac,unitId:_0x5b84f6}=_0x5b80ce,_0x2b106a=(_0x1aab81=(_0x16d236=_0x4e60ac[_0x2c5cc4(0x16f)])==null?void 0x0:_0x16d236['filter'](_0x13cd86=>_0x13cd86[_0x2c5cc4(0x177)]===_0x5dbbbf[_0x2c5cc4(0x17e)][_0x2c5cc4(0x13a)])[_0x2c5cc4(0x179)](_0x12d039=>_0x12d039[_0x2c5cc4(0x132)]))!=null?_0x1aab81:[],_0x182527=JSON[_0x2c5cc4(0x14b)](_0x4e60ac),_0x20d9cf=_0x5b80ce[_0x2c5cc4(0x142)],_0x5bd445=_0x5b80ce['id'],_0x300dc3={'memberId':(await this[_0x2c5cc4(0x150)][_0x2c5cc4(0x197)](_0x5b84f6))['getMemberID'](),'unitId':_0x5b84f6,'threadId':_0x20d9cf,'mention':_0x2b106a,'content':_0x182527,'replyId':_0x5bd445},_0x19ca0a=await this[_0x2c5cc4(0x130)][_0x2c5cc4(0x1af)](_0x2c5cc4(0x12e)+_0x5b84f6+_0x2c5cc4(0x194),{'body':_0x300dc3});return!_0x19ca0a[_0x2c5cc4(0x184)]['error']||_0x19ca0a[_0x2c5cc4(0x184)][_0x2c5cc4(0x198)][_0x2c5cc4(0x176)]===0x1;}async[_0x419903(0x18b)](_0x3e684e){const _0x3cabf3=_0x419903,{unitId:_0x2624b0}=_0x3e684e,_0x37bdf7=_0x3e684e['threadId'],_0x59a763={'memberId':this[_0x3cabf3(0x1a0)][_0x3cabf3(0x190)]()['userID'],'unitId':_0x2624b0,'threadId':_0x37bdf7,'solved':_0x3e684e[_0x3cabf3(0x19a)]?_0x5dddc3['Solved']:_0x5dddc3[_0x3cabf3(0x162)]},_0xb96a2b=await this[_0x3cabf3(0x130)]['post'](_0x3cabf3(0x12e)+_0x2624b0+_0x3cabf3(0x173),{'body':_0x59a763});return!_0xb96a2b[_0x3cabf3(0x184)]['error']||_0xb96a2b[_0x3cabf3(0x184)]['error'][_0x3cabf3(0x176)]===0x1;}async[_0x419903(0x156)](_0x461f80,_0x59fe39,_0x54d346,_0x14e657){const _0x146c27=_0x419903,_0x510011={'memberId':(await this['_sessionService'][_0x146c27(0x197)](_0x461f80))[_0x146c27(0x13d)](),'threadId':_0x54d346,'replyId':_0x14e657,'unitId':_0x461f80},_0x23474b=await this[_0x146c27(0x130)]['post'](_0x146c27(0x12e)+_0x461f80+_0x146c27(0x143),{'body':_0x510011});return!_0x23474b[_0x146c27(0x184)][_0x146c27(0x198)]||_0x23474b['body'][_0x146c27(0x198)][_0x146c27(0x176)]===0x1;}async[_0x419903(0x174)](_0x41a495,_0x352719,_0x340a60){const _0x31a861=_0x419903,_0x26b54e={'unitId':_0x41a495,'threadId':_0x340a60},_0x2d47eb=await this[_0x31a861(0x130)][_0x31a861(0x1af)](_0x31a861(0x12e)+_0x41a495+_0x31a861(0x18c),{'body':_0x26b54e}),_0x50d154=_0x340a60[_0x31a861(0x179)](_0x57b055=>_0x253dcc(_0x2d47eb['body'][_0x31a861(0x15c)][_0x57b055],_0x41a495,_0x352719))[_0x31a861(0x1a5)](Boolean);return Object[_0x31a861(0x15b)](_0x2d47eb[_0x31a861(0x184)][_0x31a861(0x1a6)])[_0x31a861(0x159)](_0x541b5a=>{const _0x7a9a16=_0x31a861;this['_userService'][_0x7a9a16(0x171)](_0x541b5a);}),_0x50d154;}[_0x419903(0x1a1)](_0x177560){const _0x57948c=_0x419903;return{'id':_0x177560['id'],'threadId':_0x177560[_0x57948c(0x142)],'ref':_0x177560[_0x57948c(0x1a9)]};}};_0x34da40=_0x4f1674([_0x460a70(0x0,_0x5dbbbf[_0x419903(0x167)](_0x27ea21[_0x419903(0x14c)])),_0x460a70(0x1,_0x5dbbbf[_0x419903(0x167)](_0x5dbbbf['UserManagerService'])),_0x460a70(0x2,_0x5dbbbf[_0x419903(0x167)](_0xac7b5f[_0x419903(0x165)]))],_0x34da40);var _0x31b1aa=Object['getOwnPropertyDescriptor'],_0x25394d=(_0x23341e,_0xec003,_0x20d953,_0x54bbb4)=>{const _0x1a8ca1=_0x419903;for(var _0xdf674f=_0x54bbb4>0x1?void 0x0:_0x54bbb4?_0x31b1aa(_0xec003,_0x20d953):_0xec003,_0x5c9726=_0x23341e[_0x1a8ca1(0x13f)]-0x1,_0x357eea;_0x5c9726>=0x0;_0x5c9726--)(_0x357eea=_0x23341e[_0x5c9726])&&(_0xdf674f=_0x357eea(_0xdf674f)||_0xdf674f);return _0xdf674f;},_0x50f2c2=(_0x2a9457,_0x6b2531)=>(_0x256aca,_0x3b5de2)=>_0x6b2531(_0x256aca,_0x3b5de2,_0x2a9457);let _0x3720ab=class extends _0x5dbbbf['Disposable']{constructor(_0x3b1224,_0x15925f){const _0x4c9948=_0x419903;super(),this[_0x4c9948(0x148)]=_0x3b1224,this[_0x4c9948(0x139)]=_0x15925f,this[_0x4c9948(0x136)]();}[_0x419903(0x136)](){const _0x90007f=_0x419903;this[_0x90007f(0x148)]['dataSource']=this['_threadCommentDataSource'],this[_0x90007f(0x148)][_0x90007f(0x151)]=!0x1;}};_0x3720ab=_0x25394d([_0x50f2c2(0x0,_0x366a66[_0x419903(0x152)]),_0x50f2c2(0x1,_0x5dbbbf[_0x419903(0x167)](_0x34da40))],_0x3720ab);var _0x98bad2=Object[_0x419903(0x193)],_0x205afd=Object['getOwnPropertyDescriptor'],_0x137086=(_0x5bb1a3,_0x273b31,_0x3dc07a)=>_0x273b31 in _0x5bb1a3?_0x98bad2(_0x5bb1a3,_0x273b31,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3dc07a}):_0x5bb1a3[_0x273b31]=_0x3dc07a,_0xf2d9c=(_0x381d16,_0x33f65a,_0x438c0e,_0x2499cb)=>{for(var _0xcf962d=_0x2499cb>0x1?void 0x0:_0x2499cb?_0x205afd(_0x33f65a,_0x438c0e):_0x33f65a,_0x579125=_0x381d16['length']-0x1,_0x5e40b1;_0x579125>=0x0;_0x579125--)(_0x5e40b1=_0x381d16[_0x579125])&&(_0xcf962d=_0x5e40b1(_0xcf962d)||_0xcf962d);return _0xcf962d;},_0x88052d=(_0x209c9c,_0xb9adc0)=>(_0xc06741,_0x3533f4)=>_0xb9adc0(_0xc06741,_0x3533f4,_0x209c9c),_0x377474=(_0x758f20,_0xf940a9,_0x59207b)=>_0x137086(_0x758f20,typeof _0xf940a9!=_0x419903(0x187)?_0xf940a9+'':_0xf940a9,_0x59207b);_0x2c1112[_0x419903(0x1ae)]=class extends _0x5dbbbf[_0x419903(0x140)]{constructor(_0x19e6c5=_0x3d8e93,_0xe9a6bc,_0x131055){const _0x5ed188=_0x419903;super(),this[_0x5ed188(0x1a4)]=_0x19e6c5,this[_0x5ed188(0x155)]=_0xe9a6bc,this['_configService']=_0x131055;const {..._0x23bcdf}=_0x5dbbbf['merge']({},_0x3d8e93,this[_0x5ed188(0x1a4)]);this[_0x5ed188(0x135)][_0x5ed188(0x145)](_0x16777d,_0x23bcdf);}['onStarting'](){const _0x475049=_0x419903;[[_0x34da40],[_0x3720ab],[_0x126863]][_0x475049(0x159)](_0x23e318=>{const _0x320703=_0x475049;this[_0x320703(0x155)][_0x320703(0x134)](_0x23e318);});}['onReady'](){const _0x3d64f4=_0x419903;this[_0x3d64f4(0x155)][_0x3d64f4(0x14a)](_0x3720ab),this['_injector'][_0x3d64f4(0x14a)](_0x126863);}},_0x377474(_0x2c1112[_0x419903(0x1ae)],_0x419903(0x15a),_0x20280e),_0x377474(_0x2c1112[_0x419903(0x1ae)],_0x419903(0x157),_0x5dbbbf['UniverInstanceType'][_0x419903(0x15f)]),_0x2c1112[_0x419903(0x1ae)]=_0xf2d9c([_0x5dbbbf['DependentOn'](_0x428aaa[_0x419903(0x196)],_0xac7b5f[_0x419903(0x144)],_0x589023[_0x419903(0x133)]),_0x88052d(0x1,_0x5dbbbf[_0x419903(0x167)](_0x5dbbbf[_0x419903(0x178)])),_0x88052d(0x2,_0x5dbbbf[_0x419903(0x13e)])],_0x2c1112[_0x419903(0x1ae)]),Object[_0x419903(0x193)](_0x2c1112,Symbol['toStringTag'],{'value':_0x419903(0x168)});}));function _0xc4d3(){const _0x12d957=['IThreadCommentDataSourceService','967462aqGKCn','1DQbtWs','_injector','deleteComment','type','UserManagerService','forEach','pluginName','values','comments','ThreadCommentModel','_init','UNIVER_UNKNOWN','@univerjs/network','590859SSKIpT','OpenOrReOpen','personId','root','CollaborationSessionService','/universer-api/user/list','Inject','Module','@univerjs-pro/license','addComment','@univerjs/core','_initUserSync','8PByDry','@univerjs/thread-comment','customRanges','Delete','addUser','UniverProCollaborationClient','/solved','listComments','UniverThreadCommentUi','code','rangeType','Injector','map','disposeWithMe','@univerjs/thread-comment-ui','function','payload','CustomRangeType','commentUpdate$','25438480bAsbWL','getUser','subscribe','comment','body','UNRECOGNIZED','Edit','symbol','parse','5810125pAjVuy','content','resolveComment','/list','replyId','1078071iwOYyR','find','getCurrentUser','user','Solve','defineProperty','/edit','parentId','UniverThreadCommentUIPlugin','requireSession','error','@univerjs-pro/collaboration-client','resolved','8TkYINy','object','format','Unknown','Solved','_userService','saveCommentToSnapshot','Disposable','reply','_config','filter','users','replies','_commentService','ref','600320EtIhrG','UniverNetwork','Reply','updateComment','UniverThreadCommentDataSourcePlugin','post','pipe','createTimestamp','Add','getUnit','/universer-api/comment/unit/','dayjs','_httpService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','rangeId','UniverLicensePlugin','add','_configService','_initDataSource','slice','size','_threadCommentDataSource','COMMENT','userId','bufferTime','getMemberID','IConfigService','length','Plugin','UniverProLicense','threadId','/delete','UniverCollaborationClientPlugin','setConfig','CommentService','unitId','_threadCommentDataSourceService','solved','get','stringify','HTTPService','4729218tPbMVO','UniverThreadComment','_threadCommentModel','_sessionService','syncUpdateMutationToColla'];_0xc4d3=function(){return _0x12d957;};return _0xc4d3();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.7-nightly.
|
|
3
|
+
"version": "0.10.7-nightly.202509130703",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.10.7-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.10.7-nightly.
|
|
50
|
-
"@univerjs/core": "0.10.7-nightly.202509130640",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.7-nightly.202509130703",
|
|
49
|
+
"@univerjs-pro/license": "0.10.7-nightly.202509130703",
|
|
51
50
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
52
|
-
"@univerjs/network": "0.10.7-nightly.
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.10.7-nightly.
|
|
54
|
-
"@univerjs/
|
|
51
|
+
"@univerjs/network": "0.10.7-nightly.202509130703",
|
|
52
|
+
"@univerjs/thread-comment-ui": "0.10.7-nightly.202509130703",
|
|
53
|
+
"@univerjs/core": "0.10.7-nightly.202509130703",
|
|
54
|
+
"@univerjs/thread-comment": "0.10.7-nightly.202509130703"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|