@univerjs-pro/thread-comment-datasource 0.15.2 → 0.15.3-insiders.20260131-b9b8805
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 +9 -9
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x8cd178=_0x4922;(function(_0x4d6641,_0x3ef7ff){const _0x16d886=_0x4922,_0x3d50fb=_0x4d6641();while(!![]){try{const _0x595e37=parseInt(_0x16d886(0x1ea))/0x1+parseInt(_0x16d886(0x1b6))/0x2+parseInt(_0x16d886(0x18b))/0x3*(-parseInt(_0x16d886(0x1c1))/0x4)+-parseInt(_0x16d886(0x17a))/0x5*(-parseInt(_0x16d886(0x193))/0x6)+-parseInt(_0x16d886(0x1cd))/0x7*(-parseInt(_0x16d886(0x1c0))/0x8)+-parseInt(_0x16d886(0x1d4))/0x9*(parseInt(_0x16d886(0x1b0))/0xa)+-parseInt(_0x16d886(0x1d3))/0xb;if(_0x595e37===_0x3ef7ff)break;else _0x3d50fb['push'](_0x3d50fb['shift']());}catch(_0x260069){_0x3d50fb['push'](_0x3d50fb['shift']());}}}(_0x30df,0x5508b));function _0x30df(){const _0x3b4576=['code','resolveComment','length','CollaborationSessionService','rangeId','updateComment','body','disposeWithMe','/universer-api/comment/unit/','73510kaCSdO','/add','Plugin','users','_configService','UniverCollaborationClientPlugin','690114CbbrDF','add','onReady','_threadCommentDataSource','getComment','deleteComment','delete','_initUserSync','addComment','map','3509768QMEYBp','192OYVAkf','symbol','ThreadCommentModel','getUnit','customRanges','UNRECOGNIZED','parse','Module','commentUpdate$','merge','content','CustomRangeType','7akpaQu','userId','format','toStringTag','solved','UniverThreadCommentDataSourcePlugin','4833994uXWJHu','144QkeTHF','threadId','Reply','_sessionService','thread-comment-data-source.config','dayjs','find','UniverInstanceType','requireSession','forEach','CommentService','Edit','Solved','YYYY/MM/DD\x20HH:mm','_injector','Injector','getCurrentUser','dataSource','Disposable','COMMENT','setConfig','rangeType','239004ePqmLu','replyId','onStarting','comment','_config','_threadCommentModel','UserManagerService','filter','Delete','saveCommentToSnapshot','type','Inject','root','1209815cieXYu','/list','userID','pluginName','subscribe','UniverLicensePlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','Add','_commentService','replies','user','createTimestamp','_httpService','personId','/edit','_initDataSource','22461bawxPo','payload','HTTPService','comments','_threadCommentDataSourceService','values','error','UniverThreadCommentUIPlugin','6AMTSXq','Unknown','getUser','Solve','/solved','stringify','_init','ref','OpenOrReOpen','/universer-api/user/list','UNIVER_UNKNOWN','bufferTime','getMemberID','get','listComments','defineProperty','addUser','getOwnPropertyDescriptor','post','size'];_0x30df=function(){return _0x3b4576;};return _0x30df();}Object[_0x8cd178(0x1a2)](exports,Symbol[_0x8cd178(0x1d0)],{'value':_0x8cd178(0x1c8)});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=_0x8cd178(0x180);var I=(_0xe10d25=>(_0xe10d25[_0xe10d25[_0x8cd178(0x19b)]=0x0]=_0x8cd178(0x19b),_0xe10d25[_0xe10d25[_0x8cd178(0x1e0)]=0x1]='Solved',_0xe10d25[_0xe10d25['UNRECOGNIZED']=-0x1]=_0x8cd178(0x1c6),_0xe10d25))(I||{}),v=(_0x4b9c88=>(_0x4b9c88[_0x4b9c88[_0x8cd178(0x194)]=0x0]=_0x8cd178(0x194),_0x4b9c88[_0x4b9c88[_0x8cd178(0x182)]=0x1]='Add',_0x4b9c88[_0x4b9c88['Reply']=0x2]=_0x8cd178(0x1d6),_0x4b9c88[_0x4b9c88[_0x8cd178(0x1df)]=0x3]=_0x8cd178(0x1df),_0x4b9c88[_0x4b9c88[_0x8cd178(0x1f2)]=0x4]=_0x8cd178(0x1f2),_0x4b9c88[_0x4b9c88[_0x8cd178(0x196)]=0x5]=_0x8cd178(0x196),_0x4b9c88[_0x4b9c88[_0x8cd178(0x1c6)]=-0x1]=_0x8cd178(0x1c6),_0x4b9c88))(v||{});const f=_0x302a46=>c[_0x8cd178(0x1d9)](new Date(+_0x302a46))[_0x8cd178(0x1cf)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x15ceb5,_0x175be0)=>{const _0x1b864a=_0x8cd178,_0x2bccd8=_0x15ceb5[_0x1b864a(0x1a0)](c[_0x1b864a(0x1f0)]),_0x9f8997=_0x15ceb5[_0x1b864a(0x1a0)](P[_0x1b864a(0x18d)]);_0x175be0['forEach'](_0x16da71=>{const _0x3cdfe5=_0x1b864a;_0x2bccd8[_0x3cdfe5(0x195)](_0x16da71)&&_0x175be0[_0x3cdfe5(0x1bc)](_0x16da71);}),_0x175be0[_0x1b864a(0x1a6)]&&(await _0x9f8997['get'](_0x1b864a(0x19c),{'params':{'userIDs':[..._0x175be0]}}))[_0x1b864a(0x1ad)][_0x1b864a(0x1b3)][_0x1b864a(0x1dd)](_0x4f1522=>{const _0x356c66=_0x1b864a;_0x4f1522&&_0x2bccd8[_0x356c66(0x1a3)](_0x4f1522);});};var $=Object[_0x8cd178(0x1a4)],E=(_0xb692c0,_0x49202e,_0x3aae3d,_0x261bbf)=>{const _0x14778f=_0x8cd178;for(var _0x1ac03c=_0x261bbf>0x1?void 0x0:_0x261bbf?$(_0x49202e,_0x3aae3d):_0x49202e,_0x449b29=_0xb692c0[_0x14778f(0x1a9)]-0x1,_0x18686f;_0x449b29>=0x0;_0x449b29--)(_0x18686f=_0xb692c0[_0x449b29])&&(_0x1ac03c=_0x18686f(_0x1ac03c)||_0x1ac03c);return _0x1ac03c;},S=(_0x884b1a,_0x47cad6)=>(_0x3ad7f1,_0x247d74)=>_0x47cad6(_0x3ad7f1,_0x247d74,_0x884b1a);let _=class extends c[_0x8cd178(0x1e6)]{constructor(_0x4dac6e,_0x33612b,_0x5073a8,_0xac51fe){const _0x5b94aa=_0x8cd178;super(),this[_0x5b94aa(0x183)]=_0x4dac6e,this[_0x5b94aa(0x1ef)]=_0x33612b,this['_userService']=_0x5073a8,this[_0x5b94aa(0x1e2)]=_0xac51fe,this[_0x5b94aa(0x199)](),this[_0x5b94aa(0x1bd)]();}[_0x8cd178(0x1bd)](){const _0x16c29e=_0x8cd178;this[_0x16c29e(0x1ae)](this['_threadCommentModel'][_0x16c29e(0x1c9)]['pipe'](j[_0x16c29e(0x19e)](0x10))['subscribe'](_0x2c2873=>{const _0x1d34ed=_0x16c29e,_0x18acbe=new Set();_0x2c2873[_0x1d34ed(0x1dd)](_0x51b410=>{const _0xbb17a1=_0x1d34ed;if(_0x51b410[_0xbb17a1(0x177)]===_0xbb17a1(0x1b7)){const _0x14729f=_0x51b410[_0xbb17a1(0x18c)][_0xbb17a1(0x188)];_0x18acbe[_0xbb17a1(0x1b7)](_0x14729f);}}),R(this['_injector'],_0x18acbe);}));}['_init'](){const _0x24320b=_0x8cd178;this[_0x24320b(0x1ae)](this[_0x24320b(0x183)][_0x24320b(0x1c9)][_0x24320b(0x17e)](async _0x27b196=>{const _0x5909dc=_0x24320b;var _0x63cd58,_0x41ec0f,_0x2e7dbc,_0x52358a;const _0xe40662=(_0x63cd58=this[_0x5909dc(0x1ef)][_0x5909dc(0x1c4)](_0x27b196['unitId'])[_0x5909dc(0x1da)](_0xc86749=>_0xc86749[_0x5909dc(0x1d5)]===_0x27b196[_0x5909dc(0x1d5)]))==null?void 0x0:_0x63cd58[_0x5909dc(0x179)];if(!_0xe40662)return;const {unitId:_0x72b606,subUnitId:_0x5b141d}=_0xe40662;switch(_0x27b196[_0x5909dc(0x185)]&&this[_0x5909dc(0x181)][_0x5909dc(0x1a3)](_0x27b196[_0x5909dc(0x185)]),_0x27b196[_0x5909dc(0x177)]){case v[_0x5909dc(0x182)]:break;case v['Reply']:{this[_0x5909dc(0x1ef)][_0x5909dc(0x1be)](_0x72b606,_0x5b141d,{'unitId':_0x72b606,'subUnitId':_0x5b141d,'ref':'','id':_0x27b196[_0x5909dc(0x1eb)],'dT':f(+_0x27b196[_0x5909dc(0x186)]),'threadId':_0x27b196[_0x5909dc(0x1d5)],'personId':(_0x2e7dbc=(_0x41ec0f=_0x27b196['user'])==null?void 0x0:_0x41ec0f['userID'])!=null?_0x2e7dbc:_0x27b196[_0x5909dc(0x1ce)],'text':JSON['parse'](_0x27b196[_0x5909dc(0x1cb)]),'parentId':_0xe40662['id']});break;}case v[_0x5909dc(0x1f2)]:{const _0xf606be=this[_0x5909dc(0x1ef)][_0x5909dc(0x1ba)](_0x72b606,_0x5b141d,_0x27b196['replyId']);_0xf606be&&_0xf606be['parentId']&&this['_threadCommentModel'][_0x5909dc(0x1bb)](_0x72b606,_0x5b141d,_0x27b196[_0x5909dc(0x1eb)]);break;}case v[_0x5909dc(0x1df)]:{this[_0x5909dc(0x1ef)][_0x5909dc(0x1ac)](_0x72b606,_0x5b141d,{'commentId':_0x27b196[_0x5909dc(0x1eb)],'text':JSON[_0x5909dc(0x1c7)](_0x27b196[_0x5909dc(0x1cb)])});break;}case v[_0x5909dc(0x196)]:{const _0x54ad45=(_0x52358a=this[_0x5909dc(0x1ef)][_0x5909dc(0x1c4)](_0x27b196['unitId'])['find'](_0x3de66c=>_0x3de66c[_0x5909dc(0x1d5)]===_0x27b196['threadId']))==null?void 0x0:_0x52358a[_0x5909dc(0x179)];_0x54ad45&&this[_0x5909dc(0x1ef)][_0x5909dc(0x1a8)](_0x72b606,_0x5b141d,_0x54ad45['id'],_0x27b196[_0x5909dc(0x1d1)]===I[_0x5909dc(0x1e0)]);break;}}}));}};function _0x4922(_0x2c181f,_0x2be650){_0x2c181f=_0x2c181f-0x176;const _0x30df98=_0x30df();let _0x4922fc=_0x30df98[_0x2c181f];return _0x4922fc;}_=E([S(0x0,c['Inject'](b[_0x8cd178(0x1de)])),S(0x1,c[_0x8cd178(0x178)](M[_0x8cd178(0x1c3)])),S(0x2,c['Inject'](c[_0x8cd178(0x1f0)])),S(0x3,c[_0x8cd178(0x178)](c['Injector']))],_);const q=_0x8cd178(0x1d8),D={};var A=Object[_0x8cd178(0x1a4)],x=(_0x437ff0,_0x3ab07c,_0x665455,_0x23946e)=>{for(var _0x5c6272=_0x23946e>0x1?void 0x0:_0x23946e?A(_0x3ab07c,_0x665455):_0x3ab07c,_0x7ccf46=_0x437ff0['length']-0x1,_0x155620;_0x7ccf46>=0x0;_0x7ccf46--)(_0x155620=_0x437ff0[_0x7ccf46])&&(_0x5c6272=_0x155620(_0x5c6272)||_0x5c6272);return _0x5c6272;},C=(_0x48b2de,_0x22e297)=>(_0x2b8002,_0x2bf1c3)=>_0x22e297(_0x2b8002,_0x2bf1c3,_0x48b2de);function Y(_0x4f38c7,_0x27c484){const _0x105a85=_0x8cd178,_0x18580d=_0x4f38c7[_0x105a85(0x184)][0x0];return{..._0x27c484,'id':_0x18580d[_0x105a85(0x1eb)],'resolved':_0x4f38c7[_0x105a85(0x1d1)]===0x1,'dT':f(_0x18580d[_0x105a85(0x186)]),'personId':_0x18580d['userId'],'threadId':_0x18580d['threadId']};}function G(_0x2796b1,_0xe01ac7,_0x168137){const _0x602fe4=_0x8cd178;var _0x518cf8,_0x30bc1f;if(((_0x30bc1f=(_0x518cf8=_0x2796b1==null?void 0x0:_0x2796b1[_0x602fe4(0x184)])==null?void 0x0:_0x518cf8['length'])!=null?_0x30bc1f:0x0)>0x0){const _0x2242b1=(_0x4d3c25,_0x2fd831)=>({'id':_0x4d3c25['replyId'],'threadId':_0x4d3c25[_0x602fe4(0x1d5)],'dT':f(_0x4d3c25[_0x602fe4(0x186)]),'personId':_0x4d3c25[_0x602fe4(0x1ce)],'resolved':_0x2796b1[_0x602fe4(0x1d1)]===I['Solved'],'unitId':_0xe01ac7,'subUnitId':_0x168137,'text':JSON['parse'](_0x4d3c25[_0x602fe4(0x1cb)]),'parentId':_0x2fd831}),_0xb1b3ec=_0x2242b1(_0x2796b1[_0x602fe4(0x184)][0x0]);return{..._0xb1b3ec,'children':_0x2796b1[_0x602fe4(0x184)]['slice'](0x1)[_0x602fe4(0x1bf)](_0x28a723=>_0x2242b1(_0x28a723,_0xb1b3ec['id']))};}return null;}let p=class{constructor(_0x4bf3c8,_0x203b63,_0x21c986){const _0x53256e=_0x8cd178;this['_httpService']=_0x4bf3c8,this[_0x53256e(0x181)]=_0x203b63,this['_sessionService']=_0x21c986;}async[_0x8cd178(0x1be)](_0x592102){const _0x3358ee=_0x8cd178;var _0x2ce32a,_0x396dd8;const {parentId:_0x3c0d2c,unitId:_0x21686e,text:_0x5a1c1e,threadId:_0x514fc7}=_0x592102,_0x4a5192=(_0x396dd8=(_0x2ce32a=_0x5a1c1e[_0x3358ee(0x1c5)])==null?void 0x0:_0x2ce32a[_0x3358ee(0x1f1)](_0x48e146=>_0x48e146[_0x3358ee(0x1e9)]===c['CustomRangeType'][_0x3358ee(0x1e7)])[_0x3358ee(0x1bf)](_0x4851c9=>_0x4851c9[_0x3358ee(0x1ab)]))!=null?_0x396dd8:[],_0x22fd92=JSON[_0x3358ee(0x198)](_0x5a1c1e),_0x56d145=(await this[_0x3358ee(0x1d7)]['requireSession'](_0x21686e))['getMemberID']();if(_0x3c0d2c){const _0x4cf076={'memberId':_0x56d145,'unitId':_0x21686e,'content':_0x22fd92,'mention':_0x4a5192,'threadId':_0x514fc7},_0x4ed914=(await this[_0x3358ee(0x187)]['post'](_0x3358ee(0x1af)+_0x21686e+'/reply',{'body':_0x4cf076}))[_0x3358ee(0x1ad)]['reply'];return{..._0x592102,'id':_0x4ed914[_0x3358ee(0x1eb)],'dT':c['dayjs'](+_0x4ed914['createTimestamp'])[_0x3358ee(0x1cf)](_0x3358ee(0x1e1)),'personId':_0x4ed914[_0x3358ee(0x1ce)]};}else{const _0xcdd1e0={'memberId':_0x56d145,'unitId':_0x21686e,'content':_0x22fd92,'mention':_0x4a5192},_0x3e8f1a=await this['_httpService'][_0x3358ee(0x1a5)]('/universer-api/comment/unit/'+_0x21686e+_0x3358ee(0x1b1),{'body':_0xcdd1e0});return Y(_0x3e8f1a[_0x3358ee(0x1ad)][_0x3358ee(0x1ed)],_0x592102);}}async[_0x8cd178(0x1ac)](_0x2b76ee){const _0x365c91=_0x8cd178;var _0x3ff1bf,_0x21e609;const {text:_0x465ddf,unitId:_0x50bc99}=_0x2b76ee,_0x509d5d=(_0x21e609=(_0x3ff1bf=_0x465ddf[_0x365c91(0x1c5)])==null?void 0x0:_0x3ff1bf[_0x365c91(0x1f1)](_0x1adf6b=>_0x1adf6b[_0x365c91(0x1e9)]===c[_0x365c91(0x1cc)][_0x365c91(0x1e7)])['map'](_0x5874d8=>_0x5874d8[_0x365c91(0x1ab)]))!=null?_0x21e609:[],_0x1be442=JSON[_0x365c91(0x198)](_0x465ddf),_0x87a922=_0x2b76ee['threadId'],_0x310407=_0x2b76ee['id'],_0x4bf9f9={'memberId':(await this['_sessionService'][_0x365c91(0x1dc)](_0x50bc99))[_0x365c91(0x19f)](),'unitId':_0x50bc99,'threadId':_0x87a922,'mention':_0x509d5d,'content':_0x1be442,'replyId':_0x310407},_0x3cf45c=await this['_httpService'][_0x365c91(0x1a5)](_0x365c91(0x1af)+_0x50bc99+_0x365c91(0x189),{'body':_0x4bf9f9});return!_0x3cf45c[_0x365c91(0x1ad)][_0x365c91(0x191)]||_0x3cf45c[_0x365c91(0x1ad)][_0x365c91(0x191)]['code']===0x1;}async['resolveComment'](_0x33367d){const _0x1ad690=_0x8cd178,{unitId:_0x217d07}=_0x33367d,_0xc7d59a=_0x33367d['threadId'],_0x34aa45={'memberId':this['_userService'][_0x1ad690(0x1e4)]()[_0x1ad690(0x17c)],'unitId':_0x217d07,'threadId':_0xc7d59a,'solved':_0x33367d['resolved']?I['Solved']:I['OpenOrReOpen']},_0x390e08=await this[_0x1ad690(0x187)][_0x1ad690(0x1a5)](_0x1ad690(0x1af)+_0x217d07+_0x1ad690(0x197),{'body':_0x34aa45});return!_0x390e08[_0x1ad690(0x1ad)][_0x1ad690(0x191)]||_0x390e08[_0x1ad690(0x1ad)]['error'][_0x1ad690(0x1a7)]===0x1;}async['deleteComment'](_0x2b9e0b,_0x1c3c68,_0x823c8a,_0x5868fc){const _0x16448d=_0x8cd178,_0x3732c4={'memberId':(await this[_0x16448d(0x1d7)][_0x16448d(0x1dc)](_0x2b9e0b))['getMemberID'](),'threadId':_0x823c8a,'replyId':_0x5868fc,'unitId':_0x2b9e0b},_0xe39c08=await this['_httpService'][_0x16448d(0x1a5)](_0x16448d(0x1af)+_0x2b9e0b+'/delete',{'body':_0x3732c4});return!_0xe39c08[_0x16448d(0x1ad)]['error']||_0xe39c08[_0x16448d(0x1ad)][_0x16448d(0x191)]['code']===0x1;}async[_0x8cd178(0x1a1)](_0x37c917,_0x181872,_0x4b9ad8){const _0x593ae0=_0x8cd178,_0xb307d7={'unitId':_0x37c917,'threadId':_0x4b9ad8},_0x59f4ef=await this[_0x593ae0(0x187)][_0x593ae0(0x1a5)](_0x593ae0(0x1af)+_0x37c917+_0x593ae0(0x17b),{'body':_0xb307d7}),_0x254361=_0x4b9ad8[_0x593ae0(0x1bf)](_0x1068c5=>G(_0x59f4ef[_0x593ae0(0x1ad)][_0x593ae0(0x18e)][_0x1068c5],_0x37c917,_0x181872))['filter'](Boolean);return Object[_0x593ae0(0x190)](_0x59f4ef[_0x593ae0(0x1ad)]['users'])[_0x593ae0(0x1dd)](_0x4268d2=>{const _0x5cf475=_0x593ae0;this[_0x5cf475(0x181)][_0x5cf475(0x1a3)](_0x4268d2);}),_0x254361;}[_0x8cd178(0x176)](_0x14bd06){const _0x28817d=_0x8cd178;return{'id':_0x14bd06['id'],'threadId':_0x14bd06[_0x28817d(0x1d5)],'ref':_0x14bd06[_0x28817d(0x19a)]};}};p=x([C(0x0,c[_0x8cd178(0x178)](P[_0x8cd178(0x18d)])),C(0x1,c[_0x8cd178(0x178)](c[_0x8cd178(0x1f0)])),C(0x2,c[_0x8cd178(0x178)](b[_0x8cd178(0x1aa)]))],p);var H=Object[_0x8cd178(0x1a4)],J=(_0x511f77,_0x41e109,_0x33238a,_0x56d579)=>{const _0xe51137=_0x8cd178;for(var _0x176679=_0x56d579>0x1?void 0x0:_0x56d579?H(_0x41e109,_0x33238a):_0x41e109,_0x21e59d=_0x511f77[_0xe51137(0x1a9)]-0x1,_0x437d01;_0x21e59d>=0x0;_0x21e59d--)(_0x437d01=_0x511f77[_0x21e59d])&&(_0x176679=_0x437d01(_0x176679)||_0x176679);return _0x176679;},y=(_0x4047d2,_0x88d563)=>(_0x3b6dc1,_0x498164)=>_0x88d563(_0x3b6dc1,_0x498164,_0x4047d2);let g=class extends c['Disposable']{constructor(_0x230551,_0x4d44e1){const _0x1267af=_0x8cd178;super(),this[_0x1267af(0x18f)]=_0x230551,this[_0x1267af(0x1b9)]=_0x4d44e1,this[_0x1267af(0x18a)]();}['_initDataSource'](){const _0x1e56ee=_0x8cd178;this[_0x1e56ee(0x18f)][_0x1e56ee(0x1e5)]=this[_0x1e56ee(0x1b9)],this[_0x1e56ee(0x18f)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x8cd178(0x178)](p))],g);var F=Object['defineProperty'],L=Object[_0x8cd178(0x1a4)],Z=(_0x34f656,_0x864655,_0xcf292c)=>_0x864655 in _0x34f656?F(_0x34f656,_0x864655,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xcf292c}):_0x34f656[_0x864655]=_0xcf292c,W=(_0x505cce,_0xe6a79,_0x29e441,_0x57aad3)=>{for(var _0x25d4d0=_0x57aad3>0x1?void 0x0:_0x57aad3?L(_0xe6a79,_0x29e441):_0xe6a79,_0x155c7c=_0x505cce['length']-0x1,_0x3dc7f2;_0x155c7c>=0x0;_0x155c7c--)(_0x3dc7f2=_0x505cce[_0x155c7c])&&(_0x25d4d0=_0x3dc7f2(_0x25d4d0)||_0x25d4d0);return _0x25d4d0;},O=(_0x2c8bfb,_0x5694ca)=>(_0xa24161,_0x513b56)=>_0x5694ca(_0xa24161,_0x513b56,_0x2c8bfb),N=(_0x38aeb2,_0x4f3287,_0x4a7620)=>Z(_0x38aeb2,typeof _0x4f3287!=_0x8cd178(0x1c2)?_0x4f3287+'':_0x4f3287,_0x4a7620);exports[_0x8cd178(0x1d2)]=class extends c[_0x8cd178(0x1b2)]{constructor(_0x4274bc=D,_0x229480,_0x1b0e34){const _0x6f2f70=_0x8cd178;super(),this[_0x6f2f70(0x1ee)]=_0x4274bc,this[_0x6f2f70(0x1e2)]=_0x229480,this[_0x6f2f70(0x1b4)]=_0x1b0e34;const {..._0x112e4e}=c[_0x6f2f70(0x1ca)]({},D,this[_0x6f2f70(0x1ee)]);this[_0x6f2f70(0x1b4)][_0x6f2f70(0x1e8)](q,_0x112e4e);}[_0x8cd178(0x1ec)](){[[p],[g],[_]]['forEach'](_0x5570ff=>{this['_injector']['add'](_0x5570ff);});}[_0x8cd178(0x1b8)](){const _0x1381fb=_0x8cd178;this[_0x1381fb(0x1e2)][_0x1381fb(0x1a0)](g),this[_0x1381fb(0x1e2)]['get'](_);}},N(exports[_0x8cd178(0x1d2)],_0x8cd178(0x17d),U),N(exports[_0x8cd178(0x1d2)],_0x8cd178(0x177),c[_0x8cd178(0x1db)][_0x8cd178(0x19d)]),exports[_0x8cd178(0x1d2)]=W([c['DependentOn'](w[_0x8cd178(0x192)],b[_0x8cd178(0x1b5)],T[_0x8cd178(0x17f)]),O(0x1,c[_0x8cd178(0x178)](c[_0x8cd178(0x1e3)])),O(0x2,c['IConfigService'])],exports[_0x8cd178(0x1d2)]);
|
|
1
|
+
'use strict';const _0x5a5865=_0x4d8d;(function(_0x1d6ef5,_0x4f7139){const _0x49960c=_0x4d8d,_0x33edfd=_0x1d6ef5();while(!![]){try{const _0x2baba9=-parseInt(_0x49960c(0x1fb))/0x1*(-parseInt(_0x49960c(0x1d6))/0x2)+-parseInt(_0x49960c(0x21a))/0x3*(-parseInt(_0x49960c(0x1fa))/0x4)+-parseInt(_0x49960c(0x230))/0x5+parseInt(_0x49960c(0x1f1))/0x6+parseInt(_0x49960c(0x224))/0x7*(-parseInt(_0x49960c(0x1c2))/0x8)+-parseInt(_0x49960c(0x1d7))/0x9*(parseInt(_0x49960c(0x1e0))/0xa)+-parseInt(_0x49960c(0x1d9))/0xb;if(_0x2baba9===_0x4f7139)break;else _0x33edfd['push'](_0x33edfd['shift']());}catch(_0x45a658){_0x33edfd['push'](_0x33edfd['shift']());}}}(_0x2cf6,0x6b6bc));Object[_0x5a5865(0x202)](exports,Symbol[_0x5a5865(0x231)],{'value':_0x5a5865(0x222)});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=_0x5a5865(0x227);var I=(_0x5a9749=>(_0x5a9749[_0x5a9749[_0x5a5865(0x1bb)]=0x0]=_0x5a5865(0x1bb),_0x5a9749[_0x5a9749['Solved']=0x1]='Solved',_0x5a9749[_0x5a9749['UNRECOGNIZED']=-0x1]=_0x5a5865(0x1d4),_0x5a9749))(I||{}),v=(_0x1ba871=>(_0x1ba871[_0x1ba871['Unknown']=0x0]=_0x5a5865(0x1d3),_0x1ba871[_0x1ba871[_0x5a5865(0x223)]=0x1]=_0x5a5865(0x223),_0x1ba871[_0x1ba871[_0x5a5865(0x204)]=0x2]=_0x5a5865(0x204),_0x1ba871[_0x1ba871[_0x5a5865(0x218)]=0x3]='Edit',_0x1ba871[_0x1ba871[_0x5a5865(0x213)]=0x4]=_0x5a5865(0x213),_0x1ba871[_0x1ba871[_0x5a5865(0x1e8)]=0x5]='Solve',_0x1ba871[_0x1ba871[_0x5a5865(0x1d4)]=-0x1]='UNRECOGNIZED',_0x1ba871))(v||{});const f=_0x979a7=>c[_0x5a5865(0x1ff)](new Date(+_0x979a7))[_0x5a5865(0x1bc)](_0x5a5865(0x203)),R=async(_0x4de789,_0x29c8a4)=>{const _0x37e6d5=_0x5a5865,_0x4500bf=_0x4de789[_0x37e6d5(0x21e)](c[_0x37e6d5(0x1ce)]),_0x1553a5=_0x4de789[_0x37e6d5(0x21e)](P['HTTPService']);_0x29c8a4[_0x37e6d5(0x1c6)](_0x16cfbf=>{const _0x8d2be8=_0x37e6d5;_0x4500bf['getUser'](_0x16cfbf)&&_0x29c8a4[_0x8d2be8(0x20f)](_0x16cfbf);}),_0x29c8a4[_0x37e6d5(0x22c)]&&(await _0x1553a5[_0x37e6d5(0x21e)](_0x37e6d5(0x209),{'params':{'userIDs':[..._0x29c8a4]}}))[_0x37e6d5(0x1ed)][_0x37e6d5(0x1f4)][_0x37e6d5(0x1c6)](_0x2be773=>{_0x2be773&&_0x4500bf['addUser'](_0x2be773);});};var $=Object[_0x5a5865(0x20d)],E=(_0x14b37d,_0x5c16e7,_0x5d3138,_0x9af5b1)=>{const _0x146b8a=_0x5a5865;for(var _0xb5c027=_0x9af5b1>0x1?void 0x0:_0x9af5b1?$(_0x5c16e7,_0x5d3138):_0x5c16e7,_0x38321b=_0x14b37d[_0x146b8a(0x1c4)]-0x1,_0xfbafe7;_0x38321b>=0x0;_0x38321b--)(_0xfbafe7=_0x14b37d[_0x38321b])&&(_0xb5c027=_0xfbafe7(_0xb5c027)||_0xb5c027);return _0xb5c027;},S=(_0x3537a7,_0x2f6c31)=>(_0x54fb07,_0x3fbc02)=>_0x2f6c31(_0x54fb07,_0x3fbc02,_0x3537a7);let _=class extends c['Disposable']{constructor(_0x18f6ee,_0x59869c,_0x4ac8b6,_0x40a66a){const _0x46eb81=_0x5a5865;super(),this[_0x46eb81(0x1e9)]=_0x18f6ee,this['_threadCommentModel']=_0x59869c,this['_userService']=_0x4ac8b6,this[_0x46eb81(0x219)]=_0x40a66a,this[_0x46eb81(0x1e3)](),this[_0x46eb81(0x1f9)]();}['_initUserSync'](){const _0x3508de=_0x5a5865;this['disposeWithMe'](this[_0x3508de(0x20c)][_0x3508de(0x1fd)][_0x3508de(0x221)](j['bufferTime'](0x10))['subscribe'](_0x75a4f8=>{const _0x5f18cf=_0x3508de,_0x19ef7f=new Set();_0x75a4f8[_0x5f18cf(0x1c6)](_0xe91f6d=>{const _0x46913f=_0x5f18cf;if(_0xe91f6d[_0x46913f(0x200)]===_0x46913f(0x1ef)){const _0x80bbf8=_0xe91f6d[_0x46913f(0x1bf)][_0x46913f(0x1df)];_0x19ef7f[_0x46913f(0x1ef)](_0x80bbf8);}}),R(this[_0x5f18cf(0x219)],_0x19ef7f);}));}['_init'](){const _0x2e0369=_0x5a5865;this[_0x2e0369(0x1c3)](this[_0x2e0369(0x1e9)][_0x2e0369(0x1fd)]['subscribe'](async _0x4b7148=>{const _0x240ed2=_0x2e0369;var _0x419865,_0x541f49,_0x3f36ce,_0xfa7ca3;const _0x2afdc3=(_0x419865=this[_0x240ed2(0x20c)][_0x240ed2(0x21b)](_0x4b7148['unitId'])[_0x240ed2(0x1d1)](_0x87c9c4=>_0x87c9c4[_0x240ed2(0x1cb)]===_0x4b7148[_0x240ed2(0x1cb)]))==null?void 0x0:_0x419865['root'];if(!_0x2afdc3)return;const {unitId:_0x5aeb4d,subUnitId:_0x3b10ae}=_0x2afdc3;switch(_0x4b7148[_0x240ed2(0x1d0)]&&this[_0x240ed2(0x1f8)][_0x240ed2(0x228)](_0x4b7148[_0x240ed2(0x1d0)]),_0x4b7148[_0x240ed2(0x200)]){case v[_0x240ed2(0x223)]:break;case v[_0x240ed2(0x204)]:{this['_threadCommentModel'][_0x240ed2(0x21d)](_0x5aeb4d,_0x3b10ae,{'unitId':_0x5aeb4d,'subUnitId':_0x3b10ae,'ref':'','id':_0x4b7148[_0x240ed2(0x205)],'dT':f(+_0x4b7148[_0x240ed2(0x1c8)]),'threadId':_0x4b7148[_0x240ed2(0x1cb)],'personId':(_0x3f36ce=(_0x541f49=_0x4b7148[_0x240ed2(0x1d0)])==null?void 0x0:_0x541f49[_0x240ed2(0x1c9)])!=null?_0x3f36ce:_0x4b7148['userId'],'text':JSON[_0x240ed2(0x20a)](_0x4b7148[_0x240ed2(0x1cc)]),'parentId':_0x2afdc3['id']});break;}case v[_0x240ed2(0x213)]:{const _0x3ace51=this[_0x240ed2(0x20c)]['getComment'](_0x5aeb4d,_0x3b10ae,_0x4b7148['replyId']);_0x3ace51&&_0x3ace51['parentId']&&this[_0x240ed2(0x20c)][_0x240ed2(0x1cd)](_0x5aeb4d,_0x3b10ae,_0x4b7148['replyId']);break;}case v['Edit']:{this[_0x240ed2(0x20c)][_0x240ed2(0x1e2)](_0x5aeb4d,_0x3b10ae,{'commentId':_0x4b7148[_0x240ed2(0x205)],'text':JSON[_0x240ed2(0x20a)](_0x4b7148[_0x240ed2(0x1cc)])});break;}case v[_0x240ed2(0x1e8)]:{const _0x3d181=(_0xfa7ca3=this[_0x240ed2(0x20c)][_0x240ed2(0x21b)](_0x4b7148[_0x240ed2(0x1fe)])['find'](_0x2c05a2=>_0x2c05a2[_0x240ed2(0x1cb)]===_0x4b7148[_0x240ed2(0x1cb)]))==null?void 0x0:_0xfa7ca3[_0x240ed2(0x217)];_0x3d181&&this['_threadCommentModel']['resolveComment'](_0x5aeb4d,_0x3b10ae,_0x3d181['id'],_0x4b7148[_0x240ed2(0x1eb)]===I[_0x240ed2(0x1cf)]);break;}}}));}};_=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0x5a5865(0x1e4)](M[_0x5a5865(0x1be)])),S(0x2,c[_0x5a5865(0x1e4)](c[_0x5a5865(0x1ce)])),S(0x3,c[_0x5a5865(0x1e4)](c['Injector']))],_);const q=_0x5a5865(0x207),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x3d5c74,_0xadfcfe,_0x1411f0,_0x4dc0ce)=>{for(var _0x27ff01=_0x4dc0ce>0x1?void 0x0:_0x4dc0ce?A(_0xadfcfe,_0x1411f0):_0xadfcfe,_0x358f82=_0x3d5c74['length']-0x1,_0x524a61;_0x358f82>=0x0;_0x358f82--)(_0x524a61=_0x3d5c74[_0x358f82])&&(_0x27ff01=_0x524a61(_0x27ff01)||_0x27ff01);return _0x27ff01;},C=(_0x52633b,_0xd4211d)=>(_0x84a3f3,_0x1e4cee)=>_0xd4211d(_0x84a3f3,_0x1e4cee,_0x52633b);function Y(_0x3139c0,_0x2999d7){const _0x559478=_0x5a5865,_0x4207f8=_0x3139c0['replies'][0x0];return{..._0x2999d7,'id':_0x4207f8[_0x559478(0x205)],'resolved':_0x3139c0['solved']===0x1,'dT':f(_0x4207f8[_0x559478(0x1c8)]),'personId':_0x4207f8[_0x559478(0x1f2)],'threadId':_0x4207f8[_0x559478(0x1cb)]};}function G(_0x479b72,_0x30aff5,_0x486f20){const _0x6ef22a=_0x5a5865;var _0x1c002c,_0x5aa48f;if(((_0x5aa48f=(_0x1c002c=_0x479b72==null?void 0x0:_0x479b72[_0x6ef22a(0x1f5)])==null?void 0x0:_0x1c002c[_0x6ef22a(0x1c4)])!=null?_0x5aa48f:0x0)>0x0){const _0xa1da5b=(_0x55a219,_0x47de6b)=>({'id':_0x55a219[_0x6ef22a(0x205)],'threadId':_0x55a219[_0x6ef22a(0x1cb)],'dT':f(_0x55a219['createTimestamp']),'personId':_0x55a219['userId'],'resolved':_0x479b72[_0x6ef22a(0x1eb)]===I[_0x6ef22a(0x1cf)],'unitId':_0x30aff5,'subUnitId':_0x486f20,'text':JSON[_0x6ef22a(0x20a)](_0x55a219[_0x6ef22a(0x1cc)]),'parentId':_0x47de6b}),_0x38c17d=_0xa1da5b(_0x479b72[_0x6ef22a(0x1f5)][0x0]);return{..._0x38c17d,'children':_0x479b72[_0x6ef22a(0x1f5)]['slice'](0x1)[_0x6ef22a(0x208)](_0x38f43a=>_0xa1da5b(_0x38f43a,_0x38c17d['id']))};}return null;}let p=class{constructor(_0x22cde7,_0x140d2b,_0x139389){const _0x3a5b7d=_0x5a5865;this[_0x3a5b7d(0x1d8)]=_0x22cde7,this[_0x3a5b7d(0x1f8)]=_0x140d2b,this[_0x3a5b7d(0x206)]=_0x139389;}async[_0x5a5865(0x21d)](_0x1266ff){const _0x140ba5=_0x5a5865;var _0x4cbeb6,_0x5b1238;const {parentId:_0x3cd6e2,unitId:_0x51c32c,text:_0x43e2c8,threadId:_0x1e8c3c}=_0x1266ff,_0x272212=(_0x5b1238=(_0x4cbeb6=_0x43e2c8['customRanges'])==null?void 0x0:_0x4cbeb6[_0x140ba5(0x1c0)](_0xe01ebc=>_0xe01ebc[_0x140ba5(0x1ca)]===c[_0x140ba5(0x1ec)][_0x140ba5(0x1f6)])['map'](_0x4ade29=>_0x4ade29[_0x140ba5(0x214)]))!=null?_0x5b1238:[],_0x4471c3=JSON[_0x140ba5(0x22d)](_0x43e2c8),_0x3fff50=(await this[_0x140ba5(0x206)]['requireSession'](_0x51c32c))[_0x140ba5(0x1e5)]();if(_0x3cd6e2){const _0x2ba4b6={'memberId':_0x3fff50,'unitId':_0x51c32c,'content':_0x4471c3,'mention':_0x272212,'threadId':_0x1e8c3c},_0x2b1fcb=(await this['_httpService'][_0x140ba5(0x1d5)](_0x140ba5(0x225)+_0x51c32c+_0x140ba5(0x1de),{'body':_0x2ba4b6}))['body'][_0x140ba5(0x232)];return{..._0x1266ff,'id':_0x2b1fcb[_0x140ba5(0x205)],'dT':c[_0x140ba5(0x1ff)](+_0x2b1fcb[_0x140ba5(0x1c8)])[_0x140ba5(0x1bc)](_0x140ba5(0x203)),'personId':_0x2b1fcb[_0x140ba5(0x1f2)]};}else{const _0x415e63={'memberId':_0x3fff50,'unitId':_0x51c32c,'content':_0x4471c3,'mention':_0x272212},_0x72a939=await this[_0x140ba5(0x1d8)][_0x140ba5(0x1d5)](_0x140ba5(0x225)+_0x51c32c+'/add',{'body':_0x415e63});return Y(_0x72a939[_0x140ba5(0x1ed)][_0x140ba5(0x22e)],_0x1266ff);}}async[_0x5a5865(0x1e2)](_0x1ce372){const _0x4f561e=_0x5a5865;var _0x239f7b,_0x329a04;const {text:_0x407e7a,unitId:_0x1ac760}=_0x1ce372,_0x1433bd=(_0x329a04=(_0x239f7b=_0x407e7a['customRanges'])==null?void 0x0:_0x239f7b[_0x4f561e(0x1c0)](_0x24c7a6=>_0x24c7a6[_0x4f561e(0x1ca)]===c[_0x4f561e(0x1ec)][_0x4f561e(0x1f6)])[_0x4f561e(0x208)](_0x2ec654=>_0x2ec654[_0x4f561e(0x214)]))!=null?_0x329a04:[],_0x150ae1=JSON[_0x4f561e(0x22d)](_0x407e7a),_0x527f69=_0x1ce372['threadId'],_0x46905c=_0x1ce372['id'],_0x12f423={'memberId':(await this[_0x4f561e(0x206)][_0x4f561e(0x1dd)](_0x1ac760))['getMemberID'](),'unitId':_0x1ac760,'threadId':_0x527f69,'mention':_0x1433bd,'content':_0x150ae1,'replyId':_0x46905c},_0x5d322e=await this['_httpService'][_0x4f561e(0x1d5)]('/universer-api/comment/unit/'+_0x1ac760+_0x4f561e(0x1c1),{'body':_0x12f423});return!_0x5d322e['body'][_0x4f561e(0x212)]||_0x5d322e[_0x4f561e(0x1ed)][_0x4f561e(0x212)][_0x4f561e(0x229)]===0x1;}async[_0x5a5865(0x1fc)](_0x99bef9){const _0x7188bd=_0x5a5865,{unitId:_0x23cd91}=_0x99bef9,_0x1762df=_0x99bef9[_0x7188bd(0x1cb)],_0x95a16e={'memberId':this['_userService'][_0x7188bd(0x20b)]()[_0x7188bd(0x1c9)],'unitId':_0x23cd91,'threadId':_0x1762df,'solved':_0x99bef9['resolved']?I['Solved']:I[_0x7188bd(0x1bb)]},_0x54e4e8=await this['_httpService'][_0x7188bd(0x1d5)](_0x7188bd(0x225)+_0x23cd91+'/solved',{'body':_0x95a16e});return!_0x54e4e8[_0x7188bd(0x1ed)][_0x7188bd(0x212)]||_0x54e4e8[_0x7188bd(0x1ed)][_0x7188bd(0x212)][_0x7188bd(0x229)]===0x1;}async[_0x5a5865(0x1cd)](_0x51267f,_0x337641,_0x446473,_0xc65c9a){const _0x295a21=_0x5a5865,_0x1fadbe={'memberId':(await this[_0x295a21(0x206)]['requireSession'](_0x51267f))[_0x295a21(0x1e5)](),'threadId':_0x446473,'replyId':_0xc65c9a,'unitId':_0x51267f},_0x26c03b=await this['_httpService'][_0x295a21(0x1d5)](_0x295a21(0x225)+_0x51267f+_0x295a21(0x22b),{'body':_0x1fadbe});return!_0x26c03b[_0x295a21(0x1ed)][_0x295a21(0x212)]||_0x26c03b[_0x295a21(0x1ed)][_0x295a21(0x212)][_0x295a21(0x229)]===0x1;}async[_0x5a5865(0x1da)](_0x4af64a,_0x17f08d,_0x317e61){const _0x3dd162=_0x5a5865,_0x41f2ef={'unitId':_0x4af64a,'threadId':_0x317e61},_0x122a76=await this[_0x3dd162(0x1d8)][_0x3dd162(0x1d5)](_0x3dd162(0x225)+_0x4af64a+_0x3dd162(0x1e6),{'body':_0x41f2ef}),_0xecef8e=_0x317e61['map'](_0x5c1c62=>G(_0x122a76['body'][_0x3dd162(0x1d2)][_0x5c1c62],_0x4af64a,_0x17f08d))['filter'](Boolean);return Object[_0x3dd162(0x1dc)](_0x122a76[_0x3dd162(0x1ed)][_0x3dd162(0x1f4)])[_0x3dd162(0x1c6)](_0x6641dd=>{const _0x21a36d=_0x3dd162;this[_0x21a36d(0x1f8)][_0x21a36d(0x228)](_0x6641dd);}),_0xecef8e;}[_0x5a5865(0x1f0)](_0xa98793){const _0x5cfb45=_0x5a5865;return{'id':_0xa98793['id'],'threadId':_0xa98793['threadId'],'ref':_0xa98793[_0x5cfb45(0x21f)]};}};p=x([C(0x0,c[_0x5a5865(0x1e4)](P[_0x5a5865(0x20e)])),C(0x1,c[_0x5a5865(0x1e4)](c['UserManagerService'])),C(0x2,c[_0x5a5865(0x1e4)](b[_0x5a5865(0x211)]))],p);var H=Object[_0x5a5865(0x20d)],J=(_0x50b559,_0x16b1c1,_0x17792f,_0x3760f5)=>{const _0x27d083=_0x5a5865;for(var _0x50dae5=_0x3760f5>0x1?void 0x0:_0x3760f5?H(_0x16b1c1,_0x17792f):_0x16b1c1,_0x93efdd=_0x50b559[_0x27d083(0x1c4)]-0x1,_0x3b9592;_0x93efdd>=0x0;_0x93efdd--)(_0x3b9592=_0x50b559[_0x93efdd])&&(_0x50dae5=_0x3b9592(_0x50dae5)||_0x50dae5);return _0x50dae5;},y=(_0x359dee,_0x5066e5)=>(_0x69dfba,_0x5e790b)=>_0x5066e5(_0x69dfba,_0x5e790b,_0x359dee);let g=class extends c[_0x5a5865(0x1c5)]{constructor(_0x379089,_0x3e6eeb){const _0x52628e=_0x5a5865;super(),this[_0x52628e(0x226)]=_0x379089,this['_threadCommentDataSource']=_0x3e6eeb,this[_0x52628e(0x216)]();}[_0x5a5865(0x216)](){const _0x230db8=_0x5a5865;this[_0x230db8(0x226)]['dataSource']=this['_threadCommentDataSource'],this[_0x230db8(0x226)][_0x230db8(0x22f)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x5a5865(0x1e4)](p))],g);var F=Object[_0x5a5865(0x202)],L=Object['getOwnPropertyDescriptor'],Z=(_0x1741b6,_0x447da7,_0x5d1ac8)=>_0x447da7 in _0x1741b6?F(_0x1741b6,_0x447da7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5d1ac8}):_0x1741b6[_0x447da7]=_0x5d1ac8,W=(_0x2ac3b2,_0x7df7ad,_0x1357c0,_0x4f4b11)=>{for(var _0x19f48b=_0x4f4b11>0x1?void 0x0:_0x4f4b11?L(_0x7df7ad,_0x1357c0):_0x7df7ad,_0x4eaa0c=_0x2ac3b2['length']-0x1,_0x33ffbb;_0x4eaa0c>=0x0;_0x4eaa0c--)(_0x33ffbb=_0x2ac3b2[_0x4eaa0c])&&(_0x19f48b=_0x33ffbb(_0x19f48b)||_0x19f48b);return _0x19f48b;},O=(_0x2c0d7b,_0x151ce8)=>(_0x372d78,_0x5313cb)=>_0x151ce8(_0x372d78,_0x5313cb,_0x2c0d7b),N=(_0x21db52,_0x319182,_0x311a67)=>Z(_0x21db52,typeof _0x319182!=_0x5a5865(0x1ba)?_0x319182+'':_0x319182,_0x311a67);function _0x4d8d(_0x33d546,_0x2a867b){_0x33d546=_0x33d546-0x1ba;const _0x2cf674=_0x2cf6();let _0x4d8d3d=_0x2cf674[_0x33d546];return _0x4d8d3d;}function _0x2cf6(){const _0x36bc5a=['replyId','_sessionService','thread-comment-data-source.config','map','/universer-api/user/list','parse','getCurrentUser','_threadCommentModel','getOwnPropertyDescriptor','HTTPService','delete','_configService','CollaborationSessionService','error','Delete','rangeId','UniverCollaborationClientPlugin','_initDataSource','root','Edit','_injector','161817pGOdLY','getUnit','_config','addComment','get','ref','UniverLicensePlugin','pipe','Module','Add','18641RyKTAo','/universer-api/comment/unit/','_threadCommentDataSourceService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','addUser','code','setConfig','/delete','size','stringify','comment','syncUpdateMutationToColla','527135iDyZPt','toStringTag','reply','symbol','OpenOrReOpen','format','Injector','ThreadCommentModel','payload','filter','/edit','56otxWFv','disposeWithMe','length','Disposable','forEach','Plugin','createTimestamp','userID','rangeType','threadId','content','deleteComment','UserManagerService','Solved','user','find','comments','Unknown','UNRECOGNIZED','post','124JGySjF','6221637tQKrsu','_httpService','688974aNkIBJ','listComments','UniverThreadCommentDataSourcePlugin','values','requireSession','/reply','personId','10oqtGtA','UniverInstanceType','updateComment','_init','Inject','getMemberID','/list','onReady','Solve','_commentService','merge','solved','CustomRangeType','body','onStarting','add','saveCommentToSnapshot','3299676wjMhBi','userId','UniverThreadCommentUIPlugin','users','replies','COMMENT','pluginName','_userService','_initUserSync','44PmTHQB','2818tgEjSM','resolveComment','commentUpdate$','unitId','dayjs','type','DependentOn','defineProperty','YYYY/MM/DD\x20HH:mm','Reply'];_0x2cf6=function(){return _0x36bc5a;};return _0x2cf6();}exports[_0x5a5865(0x1db)]=class extends c[_0x5a5865(0x1c7)]{constructor(_0x48407a=D,_0x282387,_0x257072){const _0x11b602=_0x5a5865;super(),this[_0x11b602(0x21c)]=_0x48407a,this[_0x11b602(0x219)]=_0x282387,this[_0x11b602(0x210)]=_0x257072;const {..._0x1583a9}=c[_0x11b602(0x1ea)]({},D,this[_0x11b602(0x21c)]);this['_configService'][_0x11b602(0x22a)](q,_0x1583a9);}[_0x5a5865(0x1ee)](){const _0x155995=_0x5a5865;[[p],[g],[_]][_0x155995(0x1c6)](_0x189336=>{const _0x5d91bb=_0x155995;this[_0x5d91bb(0x219)]['add'](_0x189336);});}[_0x5a5865(0x1e7)](){const _0x4bca31=_0x5a5865;this[_0x4bca31(0x219)][_0x4bca31(0x21e)](g),this[_0x4bca31(0x219)][_0x4bca31(0x21e)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x5a5865(0x1f7),U),N(exports[_0x5a5865(0x1db)],_0x5a5865(0x200),c[_0x5a5865(0x1e1)]['UNIVER_UNKNOWN']),exports[_0x5a5865(0x1db)]=W([c[_0x5a5865(0x201)](w[_0x5a5865(0x1f3)],b[_0x5a5865(0x215)],T[_0x5a5865(0x220)]),O(0x1,c[_0x5a5865(0x1e4)](c[_0x5a5865(0x1bd)])),O(0x2,c['IConfigService'])],exports[_0x5a5865(0x1db)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x36cf26=_0x14cc;function _0x14cc(_0x58ea9f,_0x239878){_0x58ea9f=_0x58ea9f-0x1a1;const _0x216faf=_0x216f();let _0x14cc17=_0x216faf[_0x58ea9f];return _0x14cc17;}(function(_0x726610,_0x5ac411){const _0xb0c06d=_0x14cc,_0x104eea=_0x726610();while(!![]){try{const _0x18b4c5=-parseInt(_0xb0c06d(0x1e9))/0x1*(-parseInt(_0xb0c06d(0x1a8))/0x2)+-parseInt(_0xb0c06d(0x1d2))/0x3+-parseInt(_0xb0c06d(0x1cf))/0x4*(parseInt(_0xb0c06d(0x1de))/0x5)+-parseInt(_0xb0c06d(0x1b1))/0x6+parseInt(_0xb0c06d(0x1e4))/0x7+-parseInt(_0xb0c06d(0x1aa))/0x8+parseInt(_0xb0c06d(0x1ac))/0x9;if(_0x18b4c5===_0x5ac411)break;else _0x104eea['push'](_0x104eea['shift']());}catch(_0x485782){_0x104eea['push'](_0x104eea['shift']());}}}(_0x216f,0xbd8d1));import{CommentService as _0x447352,CollaborationSessionService as _0x2c5c35,UniverCollaborationClientPlugin as _0x25931d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x22a647}from'@univerjs-pro/license';import{dayjs as _0x8e0352,UserManagerService as _0x58c1c8,Inject as _0x198cd5,Injector as _0x1cb825,Disposable as _0x307552,CustomRangeType as _0x1c6580,UniverInstanceType as _0xe103b3,DependentOn as _0x574e8a,IConfigService as _0x3e8e81,Plugin as _0x31d320,merge as _0x38f854}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2e2bfc}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3d52ec,IThreadCommentDataSourceService as _0x1850ce}from'@univerjs/thread-comment';import{bufferTime as _0x31fefb}from'rxjs';import{HTTPService as _0x3fc487}from'@univerjs/network';const W=_0x36cf26(0x205);var I=(_0x46f1eb=>(_0x46f1eb[_0x46f1eb[_0x36cf26(0x1dd)]=0x0]='OpenOrReOpen',_0x46f1eb[_0x46f1eb['Solved']=0x1]=_0x36cf26(0x1d9),_0x46f1eb[_0x46f1eb['UNRECOGNIZED']=-0x1]=_0x36cf26(0x1ff),_0x46f1eb))(I||{}),v=(_0x366877=>(_0x366877[_0x366877[_0x36cf26(0x1ba)]=0x0]='Unknown',_0x366877[_0x366877['Add']=0x1]='Add',_0x366877[_0x366877['Reply']=0x2]=_0x36cf26(0x1d5),_0x366877[_0x366877[_0x36cf26(0x1cb)]=0x3]=_0x36cf26(0x1cb),_0x366877[_0x366877[_0x36cf26(0x1c5)]=0x4]=_0x36cf26(0x1c5),_0x366877[_0x366877[_0x36cf26(0x1c7)]=0x5]='Solve',_0x366877[_0x366877[_0x36cf26(0x1ff)]=-0x1]=_0x36cf26(0x1ff),_0x366877))(v||{});const y=_0x2c9e2e=>_0x8e0352(new Date(+_0x2c9e2e))[_0x36cf26(0x202)](_0x36cf26(0x1d4)),B=async(_0x317dac,_0x5c079c)=>{const _0x269c17=_0x36cf26,_0x3f568a=_0x317dac[_0x269c17(0x1bf)](_0x58c1c8),_0x5521ea=_0x317dac[_0x269c17(0x1bf)](_0x3fc487);_0x5c079c[_0x269c17(0x1ab)](_0x265c0f=>{const _0x23812d=_0x269c17;_0x3f568a[_0x23812d(0x1e2)](_0x265c0f)&&_0x5c079c['delete'](_0x265c0f);}),_0x5c079c[_0x269c17(0x1df)]&&(await _0x5521ea[_0x269c17(0x1bf)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5c079c]}}))[_0x269c17(0x1b2)][_0x269c17(0x203)]['forEach'](_0x2b8dbd=>{const _0x52be3c=_0x269c17;_0x2b8dbd&&_0x3f568a[_0x52be3c(0x1c9)](_0x2b8dbd);});};var K=Object[_0x36cf26(0x1fb)],V=(_0x2f4a83,_0x2594f6,_0x46fa24,_0x2a0b16)=>{for(var _0x1812da=_0x2a0b16>0x1?void 0x0:_0x2a0b16?K(_0x2594f6,_0x46fa24):_0x2594f6,_0x3b5ace=_0x2f4a83['length']-0x1,_0x56d4da;_0x3b5ace>=0x0;_0x3b5ace--)(_0x56d4da=_0x2f4a83[_0x3b5ace])&&(_0x1812da=_0x56d4da(_0x1812da)||_0x1812da);return _0x1812da;},p=(_0x211937,_0x2e7498)=>(_0x1bd517,_0x2e47c2)=>_0x2e7498(_0x1bd517,_0x2e47c2,_0x211937);let _=class extends _0x307552{constructor(_0x8ee7ca,_0x1df3d5,_0xb48c0,_0x54bb5c){const _0x3d0173=_0x36cf26;super(),this['_commentService']=_0x8ee7ca,this['_threadCommentModel']=_0x1df3d5,this[_0x3d0173(0x1f1)]=_0xb48c0,this[_0x3d0173(0x1d7)]=_0x54bb5c,this[_0x3d0173(0x1a3)](),this[_0x3d0173(0x1fe)]();}['_initUserSync'](){const _0x3a652c=_0x36cf26;this[_0x3a652c(0x1c6)](this[_0x3a652c(0x1f4)][_0x3a652c(0x1f3)][_0x3a652c(0x1db)](_0x31fefb(0x10))[_0x3a652c(0x1c8)](_0x19aa2c=>{const _0x10d940=_0x3a652c,_0x4c5f47=new Set();_0x19aa2c[_0x10d940(0x1ab)](_0x4a14dd=>{const _0x3f06f2=_0x10d940;if(_0x4a14dd[_0x3f06f2(0x1c4)]==='add'){const _0x115f1d=_0x4a14dd[_0x3f06f2(0x1bd)][_0x3f06f2(0x1ad)];_0x4c5f47[_0x3f06f2(0x1c0)](_0x115f1d);}}),B(this[_0x10d940(0x1d7)],_0x4c5f47);}));}[_0x36cf26(0x1a3)](){const _0x54c596=_0x36cf26;this['disposeWithMe'](this['_commentService'][_0x54c596(0x1f3)][_0x54c596(0x1c8)](async _0x22d5cb=>{const _0x420aa2=_0x54c596;var _0x29b3d2,_0x5399ce,_0x21b023,_0x4a6fb0;const _0x521912=(_0x29b3d2=this[_0x420aa2(0x1f4)][_0x420aa2(0x1f7)](_0x22d5cb['unitId'])[_0x420aa2(0x1cc)](_0x45b81f=>_0x45b81f[_0x420aa2(0x1ed)]===_0x22d5cb[_0x420aa2(0x1ed)]))==null?void 0x0:_0x29b3d2[_0x420aa2(0x1eb)];if(!_0x521912)return;const {unitId:_0x1d066c,subUnitId:_0x26ebf7}=_0x521912;switch(_0x22d5cb[_0x420aa2(0x1a4)]&&this[_0x420aa2(0x1f1)][_0x420aa2(0x1c9)](_0x22d5cb[_0x420aa2(0x1a4)]),_0x22d5cb[_0x420aa2(0x1c4)]){case v[_0x420aa2(0x1b9)]:break;case v['Reply']:{this[_0x420aa2(0x1f4)]['addComment'](_0x1d066c,_0x26ebf7,{'unitId':_0x1d066c,'subUnitId':_0x26ebf7,'ref':'','id':_0x22d5cb[_0x420aa2(0x1c1)],'dT':y(+_0x22d5cb[_0x420aa2(0x1b3)]),'threadId':_0x22d5cb[_0x420aa2(0x1ed)],'personId':(_0x21b023=(_0x5399ce=_0x22d5cb[_0x420aa2(0x1a4)])==null?void 0x0:_0x5399ce[_0x420aa2(0x1d3)])!=null?_0x21b023:_0x22d5cb['userId'],'text':JSON['parse'](_0x22d5cb[_0x420aa2(0x1a7)]),'parentId':_0x521912['id']});break;}case v[_0x420aa2(0x1c5)]:{const _0x5bcc35=this[_0x420aa2(0x1f4)][_0x420aa2(0x1b0)](_0x1d066c,_0x26ebf7,_0x22d5cb['replyId']);_0x5bcc35&&_0x5bcc35[_0x420aa2(0x201)]&&this[_0x420aa2(0x1f4)]['deleteComment'](_0x1d066c,_0x26ebf7,_0x22d5cb[_0x420aa2(0x1c1)]);break;}case v[_0x420aa2(0x1cb)]:{this[_0x420aa2(0x1f4)][_0x420aa2(0x1fd)](_0x1d066c,_0x26ebf7,{'commentId':_0x22d5cb[_0x420aa2(0x1c1)],'text':JSON[_0x420aa2(0x1da)](_0x22d5cb['content'])});break;}case v['Solve']:{const _0x360b49=(_0x4a6fb0=this['_threadCommentModel'][_0x420aa2(0x1f7)](_0x22d5cb[_0x420aa2(0x1b5)])[_0x420aa2(0x1cc)](_0x564b5f=>_0x564b5f[_0x420aa2(0x1ed)]===_0x22d5cb[_0x420aa2(0x1ed)]))==null?void 0x0:_0x4a6fb0[_0x420aa2(0x1eb)];_0x360b49&&this['_threadCommentModel'][_0x420aa2(0x1f8)](_0x1d066c,_0x26ebf7,_0x360b49['id'],_0x22d5cb['solved']===I[_0x420aa2(0x1d9)]);break;}}}));}};_=V([p(0x0,_0x198cd5(_0x447352)),p(0x1,_0x198cd5(_0x3d52ec)),p(0x2,_0x198cd5(_0x58c1c8)),p(0x3,_0x198cd5(_0x1cb825))],_);const z=_0x36cf26(0x1ef),O={};var k=Object[_0x36cf26(0x1fb)],Q=(_0x2e5ba5,_0x1320fc,_0x5cf073,_0x4ff179)=>{const _0x303b4d=_0x36cf26;for(var _0x5c516b=_0x4ff179>0x1?void 0x0:_0x4ff179?k(_0x1320fc,_0x5cf073):_0x1320fc,_0x3c12d6=_0x2e5ba5[_0x303b4d(0x1f0)]-0x1,_0x569194;_0x3c12d6>=0x0;_0x3c12d6--)(_0x569194=_0x2e5ba5[_0x3c12d6])&&(_0x5c516b=_0x569194(_0x5c516b)||_0x5c516b);return _0x5c516b;},b=(_0x4ab7bc,_0x53f9fc)=>(_0x5d80c4,_0x110a27)=>_0x53f9fc(_0x5d80c4,_0x110a27,_0x4ab7bc);function X(_0x3373c0,_0x5c2cb5){const _0x27a95e=_0x36cf26,_0xb6c0e9=_0x3373c0[_0x27a95e(0x1be)][0x0];return{..._0x5c2cb5,'id':_0xb6c0e9[_0x27a95e(0x1c1)],'resolved':_0x3373c0[_0x27a95e(0x1f5)]===0x1,'dT':y(_0xb6c0e9[_0x27a95e(0x1b3)]),'personId':_0xb6c0e9[_0x27a95e(0x1f2)],'threadId':_0xb6c0e9[_0x27a95e(0x1ed)]};}function _0x216f(){const _0x3b0b30=['OpenOrReOpen','15NuURaS','size','_config','COMMENT','getUser','_sessionService','8292592CNnLXw','pluginName','filter','addComment','ref','1396963wkwXjW','slice','root','customRanges','threadId','getCurrentUser','thread-comment-data-source.config','length','_userService','userId','commentUpdate$','_threadCommentModel','solved','map','getUnit','resolveComment','getMemberID','_initDataSource','getOwnPropertyDescriptor','_configService','updateComment','_initUserSync','UNRECOGNIZED','_threadCommentDataSource','parentId','format','users','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_httpService','saveCommentToSnapshot','rangeType','_init','user','values','defineProperty','content','2dMyclV','post','9469184FnTYIe','forEach','9261585fQzyJS','personId','comment','code','getComment','3192282vUoLjp','body','createTimestamp','UNIVER_UNKNOWN','unitId','rangeId','setConfig','error','Add','Unknown','deleteComment','stringify','payload','replies','get','add','replyId','/edit','onStarting','type','Delete','disposeWithMe','Solve','subscribe','addUser','reply','Edit','find','/add','/solved','304840kKUULW','listComments','/delete','2669874HjrlQP','userID','YYYY/MM/DD\x20HH:mm','Reply','/universer-api/comment/unit/','_injector','_threadCommentDataSourceService','Solved','parse','pipe','resolved'];_0x216f=function(){return _0x3b0b30;};return _0x216f();}function ee(_0x284771,_0xbb1ec0,_0x5060cc){const _0x2cd6fc=_0x36cf26;var _0x43feed,_0x81eb8d;if(((_0x81eb8d=(_0x43feed=_0x284771==null?void 0x0:_0x284771[_0x2cd6fc(0x1be)])==null?void 0x0:_0x43feed[_0x2cd6fc(0x1f0)])!=null?_0x81eb8d:0x0)>0x0){const _0x24d5f5=(_0x4707d7,_0x33953d)=>({'id':_0x4707d7[_0x2cd6fc(0x1c1)],'threadId':_0x4707d7['threadId'],'dT':y(_0x4707d7[_0x2cd6fc(0x1b3)]),'personId':_0x4707d7[_0x2cd6fc(0x1f2)],'resolved':_0x284771[_0x2cd6fc(0x1f5)]===I[_0x2cd6fc(0x1d9)],'unitId':_0xbb1ec0,'subUnitId':_0x5060cc,'text':JSON[_0x2cd6fc(0x1da)](_0x4707d7[_0x2cd6fc(0x1a7)]),'parentId':_0x33953d}),_0x591a68=_0x24d5f5(_0x284771[_0x2cd6fc(0x1be)][0x0]);return{..._0x591a68,'children':_0x284771['replies'][_0x2cd6fc(0x1ea)](0x1)[_0x2cd6fc(0x1f6)](_0x5d2a27=>_0x24d5f5(_0x5d2a27,_0x591a68['id']))};}return null;}let S=class{constructor(_0x52a9e1,_0xd0a8e2,_0x365ed1){const _0x152ebd=_0x36cf26;this[_0x152ebd(0x206)]=_0x52a9e1,this[_0x152ebd(0x1f1)]=_0xd0a8e2,this[_0x152ebd(0x1e3)]=_0x365ed1;}async[_0x36cf26(0x1e7)](_0x4d1935){const _0x59a866=_0x36cf26;var _0x26954f,_0x417839;const {parentId:_0x439241,unitId:_0x10f754,text:_0x2086dc,threadId:_0xac721c}=_0x4d1935,_0x43c2f0=(_0x417839=(_0x26954f=_0x2086dc[_0x59a866(0x1ec)])==null?void 0x0:_0x26954f[_0x59a866(0x1e6)](_0x27a119=>_0x27a119[_0x59a866(0x1a2)]===_0x1c6580['COMMENT'])['map'](_0x5e2c43=>_0x5e2c43[_0x59a866(0x1b6)]))!=null?_0x417839:[],_0x8ec671=JSON[_0x59a866(0x1bc)](_0x2086dc),_0x5978c4=(await this['_sessionService']['requireSession'](_0x10f754))[_0x59a866(0x1f9)]();if(_0x439241){const _0x45bc67={'memberId':_0x5978c4,'unitId':_0x10f754,'content':_0x8ec671,'mention':_0x43c2f0,'threadId':_0xac721c},_0x9aa019=(await this[_0x59a866(0x206)][_0x59a866(0x1a9)](_0x59a866(0x1d6)+_0x10f754+'/reply',{'body':_0x45bc67}))[_0x59a866(0x1b2)][_0x59a866(0x1ca)];return{..._0x4d1935,'id':_0x9aa019[_0x59a866(0x1c1)],'dT':_0x8e0352(+_0x9aa019[_0x59a866(0x1b3)])[_0x59a866(0x202)](_0x59a866(0x1d4)),'personId':_0x9aa019[_0x59a866(0x1f2)]};}else{const _0x57a16a={'memberId':_0x5978c4,'unitId':_0x10f754,'content':_0x8ec671,'mention':_0x43c2f0},_0x5842eb=await this[_0x59a866(0x206)][_0x59a866(0x1a9)](_0x59a866(0x1d6)+_0x10f754+_0x59a866(0x1cd),{'body':_0x57a16a});return X(_0x5842eb[_0x59a866(0x1b2)][_0x59a866(0x1ae)],_0x4d1935);}}async[_0x36cf26(0x1fd)](_0x5c0f65){const _0x5d197c=_0x36cf26;var _0xb613f9,_0x1fed17;const {text:_0x317e6e,unitId:_0x31e7e6}=_0x5c0f65,_0x2559ba=(_0x1fed17=(_0xb613f9=_0x317e6e[_0x5d197c(0x1ec)])==null?void 0x0:_0xb613f9['filter'](_0x335bc3=>_0x335bc3[_0x5d197c(0x1a2)]===_0x1c6580[_0x5d197c(0x1e1)])[_0x5d197c(0x1f6)](_0x301ce3=>_0x301ce3['rangeId']))!=null?_0x1fed17:[],_0x37931a=JSON[_0x5d197c(0x1bc)](_0x317e6e),_0x35faaa=_0x5c0f65['threadId'],_0x40e206=_0x5c0f65['id'],_0x34ea47={'memberId':(await this['_sessionService']['requireSession'](_0x31e7e6))[_0x5d197c(0x1f9)](),'unitId':_0x31e7e6,'threadId':_0x35faaa,'mention':_0x2559ba,'content':_0x37931a,'replyId':_0x40e206},_0x1ade5f=await this[_0x5d197c(0x206)][_0x5d197c(0x1a9)]('/universer-api/comment/unit/'+_0x31e7e6+_0x5d197c(0x1c2),{'body':_0x34ea47});return!_0x1ade5f[_0x5d197c(0x1b2)][_0x5d197c(0x1b8)]||_0x1ade5f[_0x5d197c(0x1b2)]['error'][_0x5d197c(0x1af)]===0x1;}async[_0x36cf26(0x1f8)](_0x354d5b){const _0x364b24=_0x36cf26,{unitId:_0x1a7c57}=_0x354d5b,_0x5de33f=_0x354d5b[_0x364b24(0x1ed)],_0x236caf={'memberId':this[_0x364b24(0x1f1)][_0x364b24(0x1ee)]()['userID'],'unitId':_0x1a7c57,'threadId':_0x5de33f,'solved':_0x354d5b[_0x364b24(0x1dc)]?I['Solved']:I['OpenOrReOpen']},_0x250bb5=await this[_0x364b24(0x206)][_0x364b24(0x1a9)](_0x364b24(0x1d6)+_0x1a7c57+_0x364b24(0x1ce),{'body':_0x236caf});return!_0x250bb5['body'][_0x364b24(0x1b8)]||_0x250bb5[_0x364b24(0x1b2)][_0x364b24(0x1b8)][_0x364b24(0x1af)]===0x1;}async[_0x36cf26(0x1bb)](_0x4274be,_0x5ca0e5,_0x4b5ca0,_0x10d540){const _0x3c4c1f=_0x36cf26,_0x21aaab={'memberId':(await this[_0x3c4c1f(0x1e3)]['requireSession'](_0x4274be))[_0x3c4c1f(0x1f9)](),'threadId':_0x4b5ca0,'replyId':_0x10d540,'unitId':_0x4274be},_0x3fa3ec=await this['_httpService'][_0x3c4c1f(0x1a9)](_0x3c4c1f(0x1d6)+_0x4274be+_0x3c4c1f(0x1d1),{'body':_0x21aaab});return!_0x3fa3ec[_0x3c4c1f(0x1b2)][_0x3c4c1f(0x1b8)]||_0x3fa3ec[_0x3c4c1f(0x1b2)]['error'][_0x3c4c1f(0x1af)]===0x1;}async[_0x36cf26(0x1d0)](_0x784645,_0x760559,_0x42608f){const _0x21d655=_0x36cf26,_0x245e52={'unitId':_0x784645,'threadId':_0x42608f},_0x3b042d=await this['_httpService'][_0x21d655(0x1a9)]('/universer-api/comment/unit/'+_0x784645+_0x21d655(0x204),{'body':_0x245e52}),_0x3ed959=_0x42608f[_0x21d655(0x1f6)](_0x2e84b8=>ee(_0x3b042d[_0x21d655(0x1b2)]['comments'][_0x2e84b8],_0x784645,_0x760559))[_0x21d655(0x1e6)](Boolean);return Object[_0x21d655(0x1a5)](_0x3b042d[_0x21d655(0x1b2)][_0x21d655(0x203)])[_0x21d655(0x1ab)](_0x3863f0=>{const _0x257e78=_0x21d655;this[_0x257e78(0x1f1)][_0x257e78(0x1c9)](_0x3863f0);}),_0x3ed959;}[_0x36cf26(0x1a1)](_0x2b843f){const _0x20e88b=_0x36cf26;return{'id':_0x2b843f['id'],'threadId':_0x2b843f['threadId'],'ref':_0x2b843f[_0x20e88b(0x1e8)]};}};S=Q([b(0x0,_0x198cd5(_0x3fc487)),b(0x1,_0x198cd5(_0x58c1c8)),b(0x2,_0x198cd5(_0x2c5c35))],S);var re=Object[_0x36cf26(0x1fb)],te=(_0xee185,_0x2f99d3,_0x2cfd1f,_0x84bf89)=>{const _0x3fd391=_0x36cf26;for(var _0xf067bf=_0x84bf89>0x1?void 0x0:_0x84bf89?re(_0x2f99d3,_0x2cfd1f):_0x2f99d3,_0x5f3759=_0xee185[_0x3fd391(0x1f0)]-0x1,_0x4b396a;_0x5f3759>=0x0;_0x5f3759--)(_0x4b396a=_0xee185[_0x5f3759])&&(_0xf067bf=_0x4b396a(_0xf067bf)||_0xf067bf);return _0xf067bf;},M=(_0x2b4370,_0x31d5ad)=>(_0xd63ca1,_0x1b7b25)=>_0x31d5ad(_0xd63ca1,_0x1b7b25,_0x2b4370);let f=class extends _0x307552{constructor(_0x197aa1,_0x3cfaaf){const _0x1ffa8f=_0x36cf26;super(),this[_0x1ffa8f(0x1d8)]=_0x197aa1,this[_0x1ffa8f(0x200)]=_0x3cfaaf,this[_0x1ffa8f(0x1fa)]();}[_0x36cf26(0x1fa)](){const _0x519aad=_0x36cf26;this[_0x519aad(0x1d8)]['dataSource']=this[_0x519aad(0x200)],this[_0x519aad(0x1d8)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x1850ce),M(0x1,_0x198cd5(S))],f);var se=Object[_0x36cf26(0x1a6)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x231bbf,_0x1275e4,_0x199d57)=>_0x1275e4 in _0x231bbf?se(_0x231bbf,_0x1275e4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x199d57}):_0x231bbf[_0x1275e4]=_0x199d57,ie=(_0x3a79ba,_0x18423f,_0x3e40ee,_0x1ebeae)=>{const _0x2c5ff0=_0x36cf26;for(var _0x26c2cf=_0x1ebeae>0x1?void 0x0:_0x1ebeae?oe(_0x18423f,_0x3e40ee):_0x18423f,_0x4bd729=_0x3a79ba[_0x2c5ff0(0x1f0)]-0x1,_0x500696;_0x4bd729>=0x0;_0x4bd729--)(_0x500696=_0x3a79ba[_0x4bd729])&&(_0x26c2cf=_0x500696(_0x26c2cf)||_0x26c2cf);return _0x26c2cf;},N=(_0x66c31e,_0x6f7bd0)=>(_0x4e60f4,_0x525aff)=>_0x6f7bd0(_0x4e60f4,_0x525aff,_0x66c31e),$=(_0x9ac0d5,_0x518b53,_0x4cc8f5)=>ne(_0x9ac0d5,typeof _0x518b53!='symbol'?_0x518b53+'':_0x518b53,_0x4cc8f5);let g=class extends _0x31d320{constructor(_0x23a878=O,_0x1c9f45,_0x3179dc){const _0xd5987a=_0x36cf26;super(),this[_0xd5987a(0x1e0)]=_0x23a878,this[_0xd5987a(0x1d7)]=_0x1c9f45,this['_configService']=_0x3179dc;const {..._0x7d090c}=_0x38f854({},O,this[_0xd5987a(0x1e0)]);this[_0xd5987a(0x1fc)][_0xd5987a(0x1b7)](z,_0x7d090c);}[_0x36cf26(0x1c3)](){[[S],[f],[_]]['forEach'](_0x2801c7=>{const _0x52a294=_0x14cc;this[_0x52a294(0x1d7)][_0x52a294(0x1c0)](_0x2801c7);});}['onReady'](){const _0x4c7b08=_0x36cf26;this[_0x4c7b08(0x1d7)]['get'](f),this[_0x4c7b08(0x1d7)]['get'](_);}};$(g,_0x36cf26(0x1e5),W),$(g,_0x36cf26(0x1c4),_0xe103b3[_0x36cf26(0x1b4)]),g=ie([_0x574e8a(_0x2e2bfc,_0x25931d,_0x22a647),N(0x1,_0x198cd5(_0x1cb825)),N(0x2,_0x3e8e81)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x86cbf5=_0x5d7f;(function(_0x117666,_0x4b58f0){const _0x2a811a=_0x5d7f,_0x23cc3a=_0x117666();while(!![]){try{const _0x5a1677=-parseInt(_0x2a811a(0xe5))/0x1+-parseInt(_0x2a811a(0xdf))/0x2+parseInt(_0x2a811a(0xf5))/0x3+-parseInt(_0x2a811a(0xee))/0x4*(parseInt(_0x2a811a(0x101))/0x5)+-parseInt(_0x2a811a(0xdd))/0x6*(parseInt(_0x2a811a(0x103))/0x7)+-parseInt(_0x2a811a(0xc8))/0x8+parseInt(_0x2a811a(0x108))/0x9*(parseInt(_0x2a811a(0x105))/0xa);if(_0x5a1677===_0x4b58f0)break;else _0x23cc3a['push'](_0x23cc3a['shift']());}catch(_0x4aaf55){_0x23cc3a['push'](_0x23cc3a['shift']());}}}(_0x56ef,0x72c00));import{CommentService as _0x52eb93,CollaborationSessionService as _0x37c9b3,UniverCollaborationClientPlugin as _0x341643}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2e99e7}from'@univerjs-pro/license';import{dayjs as _0xf6a523,UserManagerService as _0x19b7d2,Inject as _0x391d25,Injector as _0x16d21e,Disposable as _0xac9089,CustomRangeType as _0x30218b,UniverInstanceType as _0x151aad,DependentOn as _0x53e780,Plugin as _0xcdf00d,merge as _0x5297c7,IConfigService as _0x34235b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x9b63b3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x78788c,IThreadCommentDataSourceService as _0x4ff8e3}from'@univerjs/thread-comment';import{bufferTime as _0x515bb3}from'rxjs';import{HTTPService as _0x6eed4a}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1d6073=>(_0x1d6073[_0x1d6073[_0x86cbf5(0xbf)]=0x0]='OpenOrReOpen',_0x1d6073[_0x1d6073[_0x86cbf5(0x100)]=0x1]=_0x86cbf5(0x100),_0x1d6073[_0x1d6073['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1d6073))(I||{}),v=(_0xc37026=>(_0xc37026[_0xc37026[_0x86cbf5(0xe6)]=0x0]=_0x86cbf5(0xe6),_0xc37026[_0xc37026[_0x86cbf5(0x10c)]=0x1]='Add',_0xc37026[_0xc37026[_0x86cbf5(0xfd)]=0x2]=_0x86cbf5(0xfd),_0xc37026[_0xc37026[_0x86cbf5(0xfa)]=0x3]=_0x86cbf5(0xfa),_0xc37026[_0xc37026['Delete']=0x4]=_0x86cbf5(0xf8),_0xc37026[_0xc37026[_0x86cbf5(0xca)]=0x5]=_0x86cbf5(0xca),_0xc37026[_0xc37026['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xc37026))(v||{});const y=_0xa584ed=>_0xf6a523(new Date(+_0xa584ed))[_0x86cbf5(0x11a)](_0x86cbf5(0xdc)),B=async(_0x200004,_0x1db96d)=>{const _0x3d2181=_0x86cbf5,_0x209b92=_0x200004[_0x3d2181(0x110)](_0x19b7d2),_0x32e102=_0x200004[_0x3d2181(0x110)](_0x6eed4a);_0x1db96d[_0x3d2181(0xf6)](_0xe9545c=>{const _0x32ac35=_0x3d2181;_0x209b92['getUser'](_0xe9545c)&&_0x1db96d[_0x32ac35(0x113)](_0xe9545c);}),_0x1db96d['size']&&(await _0x32e102['get'](_0x3d2181(0xd6),{'params':{'userIDs':[..._0x1db96d]}}))[_0x3d2181(0x10d)]['users'][_0x3d2181(0xf6)](_0x219388=>{const _0x43c80a=_0x3d2181;_0x219388&&_0x209b92[_0x43c80a(0xe0)](_0x219388);});};var K=Object[_0x86cbf5(0xcd)],V=(_0x3a7b3b,_0x137716,_0x46749a,_0x4075a5)=>{const _0x39be8e=_0x86cbf5;for(var _0x1f7dcc=_0x4075a5>0x1?void 0x0:_0x4075a5?K(_0x137716,_0x46749a):_0x137716,_0x1dc2d1=_0x3a7b3b[_0x39be8e(0xd8)]-0x1,_0xabde4;_0x1dc2d1>=0x0;_0x1dc2d1--)(_0xabde4=_0x3a7b3b[_0x1dc2d1])&&(_0x1f7dcc=_0xabde4(_0x1f7dcc)||_0x1f7dcc);return _0x1f7dcc;},p=(_0x20be10,_0x658855)=>(_0x546dd2,_0x229000)=>_0x658855(_0x546dd2,_0x229000,_0x20be10);let _=class extends _0xac9089{constructor(_0x195fed,_0x164b59,_0x27fabf,_0x1e0508){const _0x22bbe4=_0x86cbf5;super(),this[_0x22bbe4(0xd7)]=_0x195fed,this[_0x22bbe4(0xbd)]=_0x164b59,this[_0x22bbe4(0xeb)]=_0x27fabf,this[_0x22bbe4(0x10b)]=_0x1e0508,this[_0x22bbe4(0xe8)](),this[_0x22bbe4(0xe4)]();}[_0x86cbf5(0xe4)](){const _0xa15162=_0x86cbf5;this[_0xa15162(0xc2)](this['_threadCommentModel'][_0xa15162(0xd3)][_0xa15162(0xd9)](_0x515bb3(0x10))[_0xa15162(0x109)](_0x25000f=>{const _0x15be72=_0xa15162,_0x5e686c=new Set();_0x25000f[_0x15be72(0xf6)](_0x2246f8=>{const _0x21b388=_0x15be72;if(_0x2246f8[_0x21b388(0x114)]===_0x21b388(0xbe)){const _0x5ec18d=_0x2246f8[_0x21b388(0xdb)][_0x21b388(0xbc)];_0x5e686c[_0x21b388(0xbe)](_0x5ec18d);}}),B(this[_0x15be72(0x10b)],_0x5e686c);}));}[_0x86cbf5(0xe8)](){const _0x145842=_0x86cbf5;this[_0x145842(0xc2)](this[_0x145842(0xd7)]['commentUpdate$'][_0x145842(0x109)](async _0x31891e=>{const _0x32ef84=_0x145842;var _0x391bd4,_0x5cc79c,_0x1fda0c,_0x4baf2f;const _0x329d52=(_0x391bd4=this['_threadCommentModel']['getUnit'](_0x31891e[_0x32ef84(0x118)])[_0x32ef84(0xf2)](_0x4b0482=>_0x4b0482[_0x32ef84(0x10f)]===_0x31891e[_0x32ef84(0x10f)]))==null?void 0x0:_0x391bd4['root'];if(!_0x329d52)return;const {unitId:_0x39dfee,subUnitId:_0x26dab7}=_0x329d52;switch(_0x31891e[_0x32ef84(0xc0)]&&this[_0x32ef84(0xeb)][_0x32ef84(0xe0)](_0x31891e[_0x32ef84(0xc0)]),_0x31891e[_0x32ef84(0x114)]){case v['Add']:break;case v[_0x32ef84(0xfd)]:{this['_threadCommentModel'][_0x32ef84(0x107)](_0x39dfee,_0x26dab7,{'unitId':_0x39dfee,'subUnitId':_0x26dab7,'ref':'','id':_0x31891e[_0x32ef84(0x11e)],'dT':y(+_0x31891e[_0x32ef84(0x11b)]),'threadId':_0x31891e[_0x32ef84(0x10f)],'personId':(_0x1fda0c=(_0x5cc79c=_0x31891e[_0x32ef84(0xc0)])==null?void 0x0:_0x5cc79c[_0x32ef84(0x111)])!=null?_0x1fda0c:_0x31891e['userId'],'text':JSON['parse'](_0x31891e[_0x32ef84(0xed)]),'parentId':_0x329d52['id']});break;}case v[_0x32ef84(0xf8)]:{const _0x558b89=this['_threadCommentModel']['getComment'](_0x39dfee,_0x26dab7,_0x31891e['replyId']);_0x558b89&&_0x558b89[_0x32ef84(0xcf)]&&this[_0x32ef84(0xbd)][_0x32ef84(0xd2)](_0x39dfee,_0x26dab7,_0x31891e['replyId']);break;}case v['Edit']:{this[_0x32ef84(0xbd)][_0x32ef84(0xe2)](_0x39dfee,_0x26dab7,{'commentId':_0x31891e[_0x32ef84(0x11e)],'text':JSON[_0x32ef84(0xc1)](_0x31891e[_0x32ef84(0xed)])});break;}case v[_0x32ef84(0xca)]:{const _0x3a2822=(_0x4baf2f=this[_0x32ef84(0xbd)][_0x32ef84(0xda)](_0x31891e[_0x32ef84(0x118)])[_0x32ef84(0xf2)](_0x538c6b=>_0x538c6b[_0x32ef84(0x10f)]===_0x31891e[_0x32ef84(0x10f)]))==null?void 0x0:_0x4baf2f[_0x32ef84(0xe9)];_0x3a2822&&this[_0x32ef84(0xbd)]['resolveComment'](_0x39dfee,_0x26dab7,_0x3a2822['id'],_0x31891e[_0x32ef84(0x117)]===I[_0x32ef84(0x100)]);break;}}}));}};_=V([p(0x0,_0x391d25(_0x52eb93)),p(0x1,_0x391d25(_0x78788c)),p(0x2,_0x391d25(_0x19b7d2)),p(0x3,_0x391d25(_0x16d21e))],_);const z=_0x86cbf5(0xff),O={};var k=Object[_0x86cbf5(0xcd)],Q=(_0x34a864,_0x1ca008,_0x4ccbb3,_0xabd10)=>{for(var _0x188529=_0xabd10>0x1?void 0x0:_0xabd10?k(_0x1ca008,_0x4ccbb3):_0x1ca008,_0x419583=_0x34a864['length']-0x1,_0x6d8932;_0x419583>=0x0;_0x419583--)(_0x6d8932=_0x34a864[_0x419583])&&(_0x188529=_0x6d8932(_0x188529)||_0x188529);return _0x188529;},b=(_0x33cdb5,_0x342c6b)=>(_0x488288,_0xdf9a4d)=>_0x342c6b(_0x488288,_0xdf9a4d,_0x33cdb5);function _0x5d7f(_0x5bbca9,_0x2334e9){_0x5bbca9=_0x5bbca9-0xbc;const _0x56efce=_0x56ef();let _0x5d7fb8=_0x56efce[_0x5bbca9];return _0x5d7fb8;}function X(_0x129440,_0x441261){const _0x142c8c=_0x86cbf5,_0x538a69=_0x129440['replies'][0x0];return{..._0x441261,'id':_0x538a69[_0x142c8c(0x11e)],'resolved':_0x129440[_0x142c8c(0x117)]===0x1,'dT':y(_0x538a69[_0x142c8c(0x11b)]),'personId':_0x538a69[_0x142c8c(0x112)],'threadId':_0x538a69[_0x142c8c(0x10f)]};}function ee(_0x3b40ef,_0x5394c8,_0x493c3c){const _0x20d362=_0x86cbf5;var _0x329340,_0x193743;if(((_0x193743=(_0x329340=_0x3b40ef==null?void 0x0:_0x3b40ef[_0x20d362(0xf9)])==null?void 0x0:_0x329340['length'])!=null?_0x193743:0x0)>0x0){const _0x135404=(_0x21ce35,_0x3d4e32)=>({'id':_0x21ce35['replyId'],'threadId':_0x21ce35[_0x20d362(0x10f)],'dT':y(_0x21ce35['createTimestamp']),'personId':_0x21ce35['userId'],'resolved':_0x3b40ef[_0x20d362(0x117)]===I[_0x20d362(0x100)],'unitId':_0x5394c8,'subUnitId':_0x493c3c,'text':JSON[_0x20d362(0xc1)](_0x21ce35[_0x20d362(0xed)]),'parentId':_0x3d4e32}),_0x2a3983=_0x135404(_0x3b40ef[_0x20d362(0xf9)][0x0]);return{..._0x2a3983,'children':_0x3b40ef['replies'][_0x20d362(0x11c)](0x1)[_0x20d362(0x11f)](_0x57456f=>_0x135404(_0x57456f,_0x2a3983['id']))};}return null;}let S=class{constructor(_0x30a9a3,_0x245ba8,_0x43c75e){const _0x3be8b2=_0x86cbf5;this[_0x3be8b2(0xce)]=_0x30a9a3,this['_userService']=_0x245ba8,this['_sessionService']=_0x43c75e;}async[_0x86cbf5(0x107)](_0x487568){const _0x100bf7=_0x86cbf5;var _0x2f7bb9,_0x34e5f8;const {parentId:_0x1c44df,unitId:_0x40fc53,text:_0x157fa8,threadId:_0x23d0a0}=_0x487568,_0x5569fb=(_0x34e5f8=(_0x2f7bb9=_0x157fa8[_0x100bf7(0x10a)])==null?void 0x0:_0x2f7bb9[_0x100bf7(0xf1)](_0x2e9fe4=>_0x2e9fe4['rangeType']===_0x30218b[_0x100bf7(0xf0)])[_0x100bf7(0x11f)](_0x3c1b67=>_0x3c1b67[_0x100bf7(0x106)]))!=null?_0x34e5f8:[],_0x1e8919=JSON[_0x100bf7(0xef)](_0x157fa8),_0x327015=(await this[_0x100bf7(0xd0)]['requireSession'](_0x40fc53))[_0x100bf7(0xc7)]();if(_0x1c44df){const _0x2c7e33={'memberId':_0x327015,'unitId':_0x40fc53,'content':_0x1e8919,'mention':_0x5569fb,'threadId':_0x23d0a0},_0x2bd3cf=(await this[_0x100bf7(0xce)][_0x100bf7(0xea)](_0x100bf7(0xc3)+_0x40fc53+_0x100bf7(0xc4),{'body':_0x2c7e33}))[_0x100bf7(0x10d)][_0x100bf7(0x11d)];return{..._0x487568,'id':_0x2bd3cf[_0x100bf7(0x11e)],'dT':_0xf6a523(+_0x2bd3cf[_0x100bf7(0x11b)])['format'](_0x100bf7(0xdc)),'personId':_0x2bd3cf['userId']};}else{const _0xfb9099={'memberId':_0x327015,'unitId':_0x40fc53,'content':_0x1e8919,'mention':_0x5569fb},_0x35e7e1=await this[_0x100bf7(0xce)]['post']('/universer-api/comment/unit/'+_0x40fc53+'/add',{'body':_0xfb9099});return X(_0x35e7e1[_0x100bf7(0x10d)][_0x100bf7(0xc5)],_0x487568);}}async['updateComment'](_0x318b4e){const _0x2ba6ad=_0x86cbf5;var _0x4463f2,_0x266363;const {text:_0x322158,unitId:_0x290682}=_0x318b4e,_0x1ddca7=(_0x266363=(_0x4463f2=_0x322158[_0x2ba6ad(0x10a)])==null?void 0x0:_0x4463f2[_0x2ba6ad(0xf1)](_0x1d7e80=>_0x1d7e80[_0x2ba6ad(0x104)]===_0x30218b[_0x2ba6ad(0xf0)])[_0x2ba6ad(0x11f)](_0x3d8988=>_0x3d8988[_0x2ba6ad(0x106)]))!=null?_0x266363:[],_0x5b81a4=JSON[_0x2ba6ad(0xef)](_0x322158),_0x5e0d8a=_0x318b4e[_0x2ba6ad(0x10f)],_0x5855c8=_0x318b4e['id'],_0x49e85a={'memberId':(await this[_0x2ba6ad(0xd0)]['requireSession'](_0x290682))[_0x2ba6ad(0xc7)](),'unitId':_0x290682,'threadId':_0x5e0d8a,'mention':_0x1ddca7,'content':_0x5b81a4,'replyId':_0x5855c8},_0x2a2a6e=await this[_0x2ba6ad(0xce)][_0x2ba6ad(0xea)](_0x2ba6ad(0xc3)+_0x290682+_0x2ba6ad(0xf3),{'body':_0x49e85a});return!_0x2a2a6e[_0x2ba6ad(0x10d)][_0x2ba6ad(0xfb)]||_0x2a2a6e[_0x2ba6ad(0x10d)][_0x2ba6ad(0xfb)]['code']===0x1;}async[_0x86cbf5(0xcb)](_0x5d2048){const _0x1d7a33=_0x86cbf5,{unitId:_0x56f537}=_0x5d2048,_0x281e31=_0x5d2048['threadId'],_0x3a2c01={'memberId':this[_0x1d7a33(0xeb)][_0x1d7a33(0xec)]()['userID'],'unitId':_0x56f537,'threadId':_0x281e31,'solved':_0x5d2048[_0x1d7a33(0xe7)]?I[_0x1d7a33(0x100)]:I['OpenOrReOpen']},_0xbbe77c=await this[_0x1d7a33(0xce)][_0x1d7a33(0xea)](_0x1d7a33(0xc3)+_0x56f537+'/solved',{'body':_0x3a2c01});return!_0xbbe77c[_0x1d7a33(0x10d)][_0x1d7a33(0xfb)]||_0xbbe77c[_0x1d7a33(0x10d)][_0x1d7a33(0xfb)]['code']===0x1;}async[_0x86cbf5(0xd2)](_0x4ca655,_0x4df0e7,_0xc9bb44,_0x1b8aae){const _0x37ec2e=_0x86cbf5,_0x4ef762={'memberId':(await this['_sessionService'][_0x37ec2e(0xf4)](_0x4ca655))['getMemberID'](),'threadId':_0xc9bb44,'replyId':_0x1b8aae,'unitId':_0x4ca655},_0x51e637=await this[_0x37ec2e(0xce)]['post']('/universer-api/comment/unit/'+_0x4ca655+_0x37ec2e(0xd5),{'body':_0x4ef762});return!_0x51e637[_0x37ec2e(0x10d)][_0x37ec2e(0xfb)]||_0x51e637['body'][_0x37ec2e(0xfb)][_0x37ec2e(0xc9)]===0x1;}async[_0x86cbf5(0x102)](_0x58839b,_0x3c865a,_0x2c3357){const _0x43ab00=_0x86cbf5,_0x58fda5={'unitId':_0x58839b,'threadId':_0x2c3357},_0x1c5c31=await this[_0x43ab00(0xce)][_0x43ab00(0xea)](_0x43ab00(0xc3)+_0x58839b+_0x43ab00(0xfc),{'body':_0x58fda5}),_0x5e2024=_0x2c3357[_0x43ab00(0x11f)](_0x5db052=>ee(_0x1c5c31[_0x43ab00(0x10d)][_0x43ab00(0xfe)][_0x5db052],_0x58839b,_0x3c865a))[_0x43ab00(0xf1)](Boolean);return Object['values'](_0x1c5c31[_0x43ab00(0x10d)][_0x43ab00(0x116)])[_0x43ab00(0xf6)](_0x4378eb=>{const _0x483abc=_0x43ab00;this[_0x483abc(0xeb)][_0x483abc(0xe0)](_0x4378eb);}),_0x5e2024;}['saveCommentToSnapshot'](_0x2345fb){const _0x553c14=_0x86cbf5;return{'id':_0x2345fb['id'],'threadId':_0x2345fb[_0x553c14(0x10f)],'ref':_0x2345fb['ref']};}};S=Q([b(0x0,_0x391d25(_0x6eed4a)),b(0x1,_0x391d25(_0x19b7d2)),b(0x2,_0x391d25(_0x37c9b3))],S);var re=Object[_0x86cbf5(0xcd)],te=(_0x2a8943,_0x129db3,_0x102a78,_0xea53)=>{const _0x551127=_0x86cbf5;for(var _0x1235d2=_0xea53>0x1?void 0x0:_0xea53?re(_0x129db3,_0x102a78):_0x129db3,_0xf70ae0=_0x2a8943[_0x551127(0xd8)]-0x1,_0x2443dd;_0xf70ae0>=0x0;_0xf70ae0--)(_0x2443dd=_0x2a8943[_0xf70ae0])&&(_0x1235d2=_0x2443dd(_0x1235d2)||_0x1235d2);return _0x1235d2;},M=(_0x7dda8b,_0x162e36)=>(_0x3d5aec,_0x3adafd)=>_0x162e36(_0x3d5aec,_0x3adafd,_0x7dda8b);let f=class extends _0xac9089{constructor(_0x197a95,_0x32a56d){const _0x582e3c=_0x86cbf5;super(),this[_0x582e3c(0xd1)]=_0x197a95,this[_0x582e3c(0x115)]=_0x32a56d,this[_0x582e3c(0x120)]();}[_0x86cbf5(0x120)](){const _0x5dcae2=_0x86cbf5;this[_0x5dcae2(0xd1)][_0x5dcae2(0xde)]=this[_0x5dcae2(0x115)],this[_0x5dcae2(0xd1)][_0x5dcae2(0xf7)]=!0x1;}};f=te([M(0x0,_0x4ff8e3),M(0x1,_0x391d25(S))],f);var se=Object[_0x86cbf5(0xe1)],oe=Object[_0x86cbf5(0xcd)],ne=(_0x4fde1e,_0x5478e3,_0x5ea69c)=>_0x5478e3 in _0x4fde1e?se(_0x4fde1e,_0x5478e3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5ea69c}):_0x4fde1e[_0x5478e3]=_0x5ea69c,ie=(_0x453a60,_0x1aa6d8,_0x53301c,_0x15732b)=>{for(var _0x3964fe=_0x15732b>0x1?void 0x0:_0x15732b?oe(_0x1aa6d8,_0x53301c):_0x1aa6d8,_0x487fa7=_0x453a60['length']-0x1,_0x64db12;_0x487fa7>=0x0;_0x487fa7--)(_0x64db12=_0x453a60[_0x487fa7])&&(_0x3964fe=_0x64db12(_0x3964fe)||_0x3964fe);return _0x3964fe;},N=(_0x2654b5,_0x37157c)=>(_0x419c50,_0xa7832)=>_0x37157c(_0x419c50,_0xa7832,_0x2654b5),$=(_0x2984bc,_0x4704b8,_0x499fcb)=>ne(_0x2984bc,typeof _0x4704b8!='symbol'?_0x4704b8+'':_0x4704b8,_0x499fcb);let g=class extends _0xcdf00d{constructor(_0x15df1a=O,_0x49ecbb,_0x105724){const _0x4c36dc=_0x86cbf5;super(),this[_0x4c36dc(0xe3)]=_0x15df1a,this['_injector']=_0x49ecbb,this['_configService']=_0x105724;const {..._0x11e1bd}=_0x5297c7({},O,this[_0x4c36dc(0xe3)]);this[_0x4c36dc(0xd4)][_0x4c36dc(0x10e)](z,_0x11e1bd);}[_0x86cbf5(0xc6)](){[[S],[f],[_]]['forEach'](_0x9dd983=>{const _0xf8c799=_0x5d7f;this['_injector'][_0xf8c799(0xbe)](_0x9dd983);});}[_0x86cbf5(0xcc)](){const _0x14fdcc=_0x86cbf5;this[_0x14fdcc(0x10b)][_0x14fdcc(0x110)](f),this[_0x14fdcc(0x10b)][_0x14fdcc(0x110)](_);}};function _0x56ef(){const _0x534b2f=['Delete','replies','Edit','error','/list','Reply','comments','thread-comment-data-source.config','Solved','531840KvHpfi','listComments','12845yFRDtM','rangeType','2050460SYNXlU','rangeId','addComment','153lVhnbc','subscribe','customRanges','_injector','Add','body','setConfig','threadId','get','userID','userId','delete','type','_threadCommentDataSource','users','solved','unitId','pluginName','format','createTimestamp','slice','reply','replyId','map','_initDataSource','personId','_threadCommentModel','add','OpenOrReOpen','user','parse','disposeWithMe','/universer-api/comment/unit/','/reply','comment','onStarting','getMemberID','4838848vvMCAn','code','Solve','resolveComment','onReady','getOwnPropertyDescriptor','_httpService','parentId','_sessionService','_threadCommentDataSourceService','deleteComment','commentUpdate$','_configService','/delete','/universer-api/user/list','_commentService','length','pipe','getUnit','payload','YYYY/MM/DD\x20HH:mm','2724vxCQQH','dataSource','1731912jLakjX','addUser','defineProperty','updateComment','_config','_initUserSync','502416qSyZXW','Unknown','resolved','_init','root','post','_userService','getCurrentUser','content','12vKXJKF','stringify','COMMENT','filter','find','/edit','requireSession','328968kZdiHK','forEach','syncUpdateMutationToColla'];_0x56ef=function(){return _0x534b2f;};return _0x56ef();}$(g,_0x86cbf5(0x119),W),$(g,'type',_0x151aad['UNIVER_UNKNOWN']),g=ie([_0x53e780(_0x9b63b3,_0x341643,_0x2e99e7),N(0x1,_0x391d25(_0x16d21e)),N(0x2,_0x34235b)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x36cf26=_0x14cc;function _0x14cc(_0x58ea9f,_0x239878){_0x58ea9f=_0x58ea9f-0x1a1;const _0x216faf=_0x216f();let _0x14cc17=_0x216faf[_0x58ea9f];return _0x14cc17;}(function(_0x726610,_0x5ac411){const _0xb0c06d=_0x14cc,_0x104eea=_0x726610();while(!![]){try{const _0x18b4c5=-parseInt(_0xb0c06d(0x1e9))/0x1*(-parseInt(_0xb0c06d(0x1a8))/0x2)+-parseInt(_0xb0c06d(0x1d2))/0x3+-parseInt(_0xb0c06d(0x1cf))/0x4*(parseInt(_0xb0c06d(0x1de))/0x5)+-parseInt(_0xb0c06d(0x1b1))/0x6+parseInt(_0xb0c06d(0x1e4))/0x7+-parseInt(_0xb0c06d(0x1aa))/0x8+parseInt(_0xb0c06d(0x1ac))/0x9;if(_0x18b4c5===_0x5ac411)break;else _0x104eea['push'](_0x104eea['shift']());}catch(_0x485782){_0x104eea['push'](_0x104eea['shift']());}}}(_0x216f,0xbd8d1));import{CommentService as _0x447352,CollaborationSessionService as _0x2c5c35,UniverCollaborationClientPlugin as _0x25931d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x22a647}from'@univerjs-pro/license';import{dayjs as _0x8e0352,UserManagerService as _0x58c1c8,Inject as _0x198cd5,Injector as _0x1cb825,Disposable as _0x307552,CustomRangeType as _0x1c6580,UniverInstanceType as _0xe103b3,DependentOn as _0x574e8a,IConfigService as _0x3e8e81,Plugin as _0x31d320,merge as _0x38f854}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2e2bfc}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3d52ec,IThreadCommentDataSourceService as _0x1850ce}from'@univerjs/thread-comment';import{bufferTime as _0x31fefb}from'rxjs';import{HTTPService as _0x3fc487}from'@univerjs/network';const W=_0x36cf26(0x205);var I=(_0x46f1eb=>(_0x46f1eb[_0x46f1eb[_0x36cf26(0x1dd)]=0x0]='OpenOrReOpen',_0x46f1eb[_0x46f1eb['Solved']=0x1]=_0x36cf26(0x1d9),_0x46f1eb[_0x46f1eb['UNRECOGNIZED']=-0x1]=_0x36cf26(0x1ff),_0x46f1eb))(I||{}),v=(_0x366877=>(_0x366877[_0x366877[_0x36cf26(0x1ba)]=0x0]='Unknown',_0x366877[_0x366877['Add']=0x1]='Add',_0x366877[_0x366877['Reply']=0x2]=_0x36cf26(0x1d5),_0x366877[_0x366877[_0x36cf26(0x1cb)]=0x3]=_0x36cf26(0x1cb),_0x366877[_0x366877[_0x36cf26(0x1c5)]=0x4]=_0x36cf26(0x1c5),_0x366877[_0x366877[_0x36cf26(0x1c7)]=0x5]='Solve',_0x366877[_0x366877[_0x36cf26(0x1ff)]=-0x1]=_0x36cf26(0x1ff),_0x366877))(v||{});const y=_0x2c9e2e=>_0x8e0352(new Date(+_0x2c9e2e))[_0x36cf26(0x202)](_0x36cf26(0x1d4)),B=async(_0x317dac,_0x5c079c)=>{const _0x269c17=_0x36cf26,_0x3f568a=_0x317dac[_0x269c17(0x1bf)](_0x58c1c8),_0x5521ea=_0x317dac[_0x269c17(0x1bf)](_0x3fc487);_0x5c079c[_0x269c17(0x1ab)](_0x265c0f=>{const _0x23812d=_0x269c17;_0x3f568a[_0x23812d(0x1e2)](_0x265c0f)&&_0x5c079c['delete'](_0x265c0f);}),_0x5c079c[_0x269c17(0x1df)]&&(await _0x5521ea[_0x269c17(0x1bf)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5c079c]}}))[_0x269c17(0x1b2)][_0x269c17(0x203)]['forEach'](_0x2b8dbd=>{const _0x52be3c=_0x269c17;_0x2b8dbd&&_0x3f568a[_0x52be3c(0x1c9)](_0x2b8dbd);});};var K=Object[_0x36cf26(0x1fb)],V=(_0x2f4a83,_0x2594f6,_0x46fa24,_0x2a0b16)=>{for(var _0x1812da=_0x2a0b16>0x1?void 0x0:_0x2a0b16?K(_0x2594f6,_0x46fa24):_0x2594f6,_0x3b5ace=_0x2f4a83['length']-0x1,_0x56d4da;_0x3b5ace>=0x0;_0x3b5ace--)(_0x56d4da=_0x2f4a83[_0x3b5ace])&&(_0x1812da=_0x56d4da(_0x1812da)||_0x1812da);return _0x1812da;},p=(_0x211937,_0x2e7498)=>(_0x1bd517,_0x2e47c2)=>_0x2e7498(_0x1bd517,_0x2e47c2,_0x211937);let _=class extends _0x307552{constructor(_0x8ee7ca,_0x1df3d5,_0xb48c0,_0x54bb5c){const _0x3d0173=_0x36cf26;super(),this['_commentService']=_0x8ee7ca,this['_threadCommentModel']=_0x1df3d5,this[_0x3d0173(0x1f1)]=_0xb48c0,this[_0x3d0173(0x1d7)]=_0x54bb5c,this[_0x3d0173(0x1a3)](),this[_0x3d0173(0x1fe)]();}['_initUserSync'](){const _0x3a652c=_0x36cf26;this[_0x3a652c(0x1c6)](this[_0x3a652c(0x1f4)][_0x3a652c(0x1f3)][_0x3a652c(0x1db)](_0x31fefb(0x10))[_0x3a652c(0x1c8)](_0x19aa2c=>{const _0x10d940=_0x3a652c,_0x4c5f47=new Set();_0x19aa2c[_0x10d940(0x1ab)](_0x4a14dd=>{const _0x3f06f2=_0x10d940;if(_0x4a14dd[_0x3f06f2(0x1c4)]==='add'){const _0x115f1d=_0x4a14dd[_0x3f06f2(0x1bd)][_0x3f06f2(0x1ad)];_0x4c5f47[_0x3f06f2(0x1c0)](_0x115f1d);}}),B(this[_0x10d940(0x1d7)],_0x4c5f47);}));}[_0x36cf26(0x1a3)](){const _0x54c596=_0x36cf26;this['disposeWithMe'](this['_commentService'][_0x54c596(0x1f3)][_0x54c596(0x1c8)](async _0x22d5cb=>{const _0x420aa2=_0x54c596;var _0x29b3d2,_0x5399ce,_0x21b023,_0x4a6fb0;const _0x521912=(_0x29b3d2=this[_0x420aa2(0x1f4)][_0x420aa2(0x1f7)](_0x22d5cb['unitId'])[_0x420aa2(0x1cc)](_0x45b81f=>_0x45b81f[_0x420aa2(0x1ed)]===_0x22d5cb[_0x420aa2(0x1ed)]))==null?void 0x0:_0x29b3d2[_0x420aa2(0x1eb)];if(!_0x521912)return;const {unitId:_0x1d066c,subUnitId:_0x26ebf7}=_0x521912;switch(_0x22d5cb[_0x420aa2(0x1a4)]&&this[_0x420aa2(0x1f1)][_0x420aa2(0x1c9)](_0x22d5cb[_0x420aa2(0x1a4)]),_0x22d5cb[_0x420aa2(0x1c4)]){case v[_0x420aa2(0x1b9)]:break;case v['Reply']:{this[_0x420aa2(0x1f4)]['addComment'](_0x1d066c,_0x26ebf7,{'unitId':_0x1d066c,'subUnitId':_0x26ebf7,'ref':'','id':_0x22d5cb[_0x420aa2(0x1c1)],'dT':y(+_0x22d5cb[_0x420aa2(0x1b3)]),'threadId':_0x22d5cb[_0x420aa2(0x1ed)],'personId':(_0x21b023=(_0x5399ce=_0x22d5cb[_0x420aa2(0x1a4)])==null?void 0x0:_0x5399ce[_0x420aa2(0x1d3)])!=null?_0x21b023:_0x22d5cb['userId'],'text':JSON['parse'](_0x22d5cb[_0x420aa2(0x1a7)]),'parentId':_0x521912['id']});break;}case v[_0x420aa2(0x1c5)]:{const _0x5bcc35=this[_0x420aa2(0x1f4)][_0x420aa2(0x1b0)](_0x1d066c,_0x26ebf7,_0x22d5cb['replyId']);_0x5bcc35&&_0x5bcc35[_0x420aa2(0x201)]&&this[_0x420aa2(0x1f4)]['deleteComment'](_0x1d066c,_0x26ebf7,_0x22d5cb[_0x420aa2(0x1c1)]);break;}case v[_0x420aa2(0x1cb)]:{this[_0x420aa2(0x1f4)][_0x420aa2(0x1fd)](_0x1d066c,_0x26ebf7,{'commentId':_0x22d5cb[_0x420aa2(0x1c1)],'text':JSON[_0x420aa2(0x1da)](_0x22d5cb['content'])});break;}case v['Solve']:{const _0x360b49=(_0x4a6fb0=this['_threadCommentModel'][_0x420aa2(0x1f7)](_0x22d5cb[_0x420aa2(0x1b5)])[_0x420aa2(0x1cc)](_0x564b5f=>_0x564b5f[_0x420aa2(0x1ed)]===_0x22d5cb[_0x420aa2(0x1ed)]))==null?void 0x0:_0x4a6fb0[_0x420aa2(0x1eb)];_0x360b49&&this['_threadCommentModel'][_0x420aa2(0x1f8)](_0x1d066c,_0x26ebf7,_0x360b49['id'],_0x22d5cb['solved']===I[_0x420aa2(0x1d9)]);break;}}}));}};_=V([p(0x0,_0x198cd5(_0x447352)),p(0x1,_0x198cd5(_0x3d52ec)),p(0x2,_0x198cd5(_0x58c1c8)),p(0x3,_0x198cd5(_0x1cb825))],_);const z=_0x36cf26(0x1ef),O={};var k=Object[_0x36cf26(0x1fb)],Q=(_0x2e5ba5,_0x1320fc,_0x5cf073,_0x4ff179)=>{const _0x303b4d=_0x36cf26;for(var _0x5c516b=_0x4ff179>0x1?void 0x0:_0x4ff179?k(_0x1320fc,_0x5cf073):_0x1320fc,_0x3c12d6=_0x2e5ba5[_0x303b4d(0x1f0)]-0x1,_0x569194;_0x3c12d6>=0x0;_0x3c12d6--)(_0x569194=_0x2e5ba5[_0x3c12d6])&&(_0x5c516b=_0x569194(_0x5c516b)||_0x5c516b);return _0x5c516b;},b=(_0x4ab7bc,_0x53f9fc)=>(_0x5d80c4,_0x110a27)=>_0x53f9fc(_0x5d80c4,_0x110a27,_0x4ab7bc);function X(_0x3373c0,_0x5c2cb5){const _0x27a95e=_0x36cf26,_0xb6c0e9=_0x3373c0[_0x27a95e(0x1be)][0x0];return{..._0x5c2cb5,'id':_0xb6c0e9[_0x27a95e(0x1c1)],'resolved':_0x3373c0[_0x27a95e(0x1f5)]===0x1,'dT':y(_0xb6c0e9[_0x27a95e(0x1b3)]),'personId':_0xb6c0e9[_0x27a95e(0x1f2)],'threadId':_0xb6c0e9[_0x27a95e(0x1ed)]};}function _0x216f(){const _0x3b0b30=['OpenOrReOpen','15NuURaS','size','_config','COMMENT','getUser','_sessionService','8292592CNnLXw','pluginName','filter','addComment','ref','1396963wkwXjW','slice','root','customRanges','threadId','getCurrentUser','thread-comment-data-source.config','length','_userService','userId','commentUpdate$','_threadCommentModel','solved','map','getUnit','resolveComment','getMemberID','_initDataSource','getOwnPropertyDescriptor','_configService','updateComment','_initUserSync','UNRECOGNIZED','_threadCommentDataSource','parentId','format','users','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_httpService','saveCommentToSnapshot','rangeType','_init','user','values','defineProperty','content','2dMyclV','post','9469184FnTYIe','forEach','9261585fQzyJS','personId','comment','code','getComment','3192282vUoLjp','body','createTimestamp','UNIVER_UNKNOWN','unitId','rangeId','setConfig','error','Add','Unknown','deleteComment','stringify','payload','replies','get','add','replyId','/edit','onStarting','type','Delete','disposeWithMe','Solve','subscribe','addUser','reply','Edit','find','/add','/solved','304840kKUULW','listComments','/delete','2669874HjrlQP','userID','YYYY/MM/DD\x20HH:mm','Reply','/universer-api/comment/unit/','_injector','_threadCommentDataSourceService','Solved','parse','pipe','resolved'];_0x216f=function(){return _0x3b0b30;};return _0x216f();}function ee(_0x284771,_0xbb1ec0,_0x5060cc){const _0x2cd6fc=_0x36cf26;var _0x43feed,_0x81eb8d;if(((_0x81eb8d=(_0x43feed=_0x284771==null?void 0x0:_0x284771[_0x2cd6fc(0x1be)])==null?void 0x0:_0x43feed[_0x2cd6fc(0x1f0)])!=null?_0x81eb8d:0x0)>0x0){const _0x24d5f5=(_0x4707d7,_0x33953d)=>({'id':_0x4707d7[_0x2cd6fc(0x1c1)],'threadId':_0x4707d7['threadId'],'dT':y(_0x4707d7[_0x2cd6fc(0x1b3)]),'personId':_0x4707d7[_0x2cd6fc(0x1f2)],'resolved':_0x284771[_0x2cd6fc(0x1f5)]===I[_0x2cd6fc(0x1d9)],'unitId':_0xbb1ec0,'subUnitId':_0x5060cc,'text':JSON[_0x2cd6fc(0x1da)](_0x4707d7[_0x2cd6fc(0x1a7)]),'parentId':_0x33953d}),_0x591a68=_0x24d5f5(_0x284771[_0x2cd6fc(0x1be)][0x0]);return{..._0x591a68,'children':_0x284771['replies'][_0x2cd6fc(0x1ea)](0x1)[_0x2cd6fc(0x1f6)](_0x5d2a27=>_0x24d5f5(_0x5d2a27,_0x591a68['id']))};}return null;}let S=class{constructor(_0x52a9e1,_0xd0a8e2,_0x365ed1){const _0x152ebd=_0x36cf26;this[_0x152ebd(0x206)]=_0x52a9e1,this[_0x152ebd(0x1f1)]=_0xd0a8e2,this[_0x152ebd(0x1e3)]=_0x365ed1;}async[_0x36cf26(0x1e7)](_0x4d1935){const _0x59a866=_0x36cf26;var _0x26954f,_0x417839;const {parentId:_0x439241,unitId:_0x10f754,text:_0x2086dc,threadId:_0xac721c}=_0x4d1935,_0x43c2f0=(_0x417839=(_0x26954f=_0x2086dc[_0x59a866(0x1ec)])==null?void 0x0:_0x26954f[_0x59a866(0x1e6)](_0x27a119=>_0x27a119[_0x59a866(0x1a2)]===_0x1c6580['COMMENT'])['map'](_0x5e2c43=>_0x5e2c43[_0x59a866(0x1b6)]))!=null?_0x417839:[],_0x8ec671=JSON[_0x59a866(0x1bc)](_0x2086dc),_0x5978c4=(await this['_sessionService']['requireSession'](_0x10f754))[_0x59a866(0x1f9)]();if(_0x439241){const _0x45bc67={'memberId':_0x5978c4,'unitId':_0x10f754,'content':_0x8ec671,'mention':_0x43c2f0,'threadId':_0xac721c},_0x9aa019=(await this[_0x59a866(0x206)][_0x59a866(0x1a9)](_0x59a866(0x1d6)+_0x10f754+'/reply',{'body':_0x45bc67}))[_0x59a866(0x1b2)][_0x59a866(0x1ca)];return{..._0x4d1935,'id':_0x9aa019[_0x59a866(0x1c1)],'dT':_0x8e0352(+_0x9aa019[_0x59a866(0x1b3)])[_0x59a866(0x202)](_0x59a866(0x1d4)),'personId':_0x9aa019[_0x59a866(0x1f2)]};}else{const _0x57a16a={'memberId':_0x5978c4,'unitId':_0x10f754,'content':_0x8ec671,'mention':_0x43c2f0},_0x5842eb=await this[_0x59a866(0x206)][_0x59a866(0x1a9)](_0x59a866(0x1d6)+_0x10f754+_0x59a866(0x1cd),{'body':_0x57a16a});return X(_0x5842eb[_0x59a866(0x1b2)][_0x59a866(0x1ae)],_0x4d1935);}}async[_0x36cf26(0x1fd)](_0x5c0f65){const _0x5d197c=_0x36cf26;var _0xb613f9,_0x1fed17;const {text:_0x317e6e,unitId:_0x31e7e6}=_0x5c0f65,_0x2559ba=(_0x1fed17=(_0xb613f9=_0x317e6e[_0x5d197c(0x1ec)])==null?void 0x0:_0xb613f9['filter'](_0x335bc3=>_0x335bc3[_0x5d197c(0x1a2)]===_0x1c6580[_0x5d197c(0x1e1)])[_0x5d197c(0x1f6)](_0x301ce3=>_0x301ce3['rangeId']))!=null?_0x1fed17:[],_0x37931a=JSON[_0x5d197c(0x1bc)](_0x317e6e),_0x35faaa=_0x5c0f65['threadId'],_0x40e206=_0x5c0f65['id'],_0x34ea47={'memberId':(await this['_sessionService']['requireSession'](_0x31e7e6))[_0x5d197c(0x1f9)](),'unitId':_0x31e7e6,'threadId':_0x35faaa,'mention':_0x2559ba,'content':_0x37931a,'replyId':_0x40e206},_0x1ade5f=await this[_0x5d197c(0x206)][_0x5d197c(0x1a9)]('/universer-api/comment/unit/'+_0x31e7e6+_0x5d197c(0x1c2),{'body':_0x34ea47});return!_0x1ade5f[_0x5d197c(0x1b2)][_0x5d197c(0x1b8)]||_0x1ade5f[_0x5d197c(0x1b2)]['error'][_0x5d197c(0x1af)]===0x1;}async[_0x36cf26(0x1f8)](_0x354d5b){const _0x364b24=_0x36cf26,{unitId:_0x1a7c57}=_0x354d5b,_0x5de33f=_0x354d5b[_0x364b24(0x1ed)],_0x236caf={'memberId':this[_0x364b24(0x1f1)][_0x364b24(0x1ee)]()['userID'],'unitId':_0x1a7c57,'threadId':_0x5de33f,'solved':_0x354d5b[_0x364b24(0x1dc)]?I['Solved']:I['OpenOrReOpen']},_0x250bb5=await this[_0x364b24(0x206)][_0x364b24(0x1a9)](_0x364b24(0x1d6)+_0x1a7c57+_0x364b24(0x1ce),{'body':_0x236caf});return!_0x250bb5['body'][_0x364b24(0x1b8)]||_0x250bb5[_0x364b24(0x1b2)][_0x364b24(0x1b8)][_0x364b24(0x1af)]===0x1;}async[_0x36cf26(0x1bb)](_0x4274be,_0x5ca0e5,_0x4b5ca0,_0x10d540){const _0x3c4c1f=_0x36cf26,_0x21aaab={'memberId':(await this[_0x3c4c1f(0x1e3)]['requireSession'](_0x4274be))[_0x3c4c1f(0x1f9)](),'threadId':_0x4b5ca0,'replyId':_0x10d540,'unitId':_0x4274be},_0x3fa3ec=await this['_httpService'][_0x3c4c1f(0x1a9)](_0x3c4c1f(0x1d6)+_0x4274be+_0x3c4c1f(0x1d1),{'body':_0x21aaab});return!_0x3fa3ec[_0x3c4c1f(0x1b2)][_0x3c4c1f(0x1b8)]||_0x3fa3ec[_0x3c4c1f(0x1b2)]['error'][_0x3c4c1f(0x1af)]===0x1;}async[_0x36cf26(0x1d0)](_0x784645,_0x760559,_0x42608f){const _0x21d655=_0x36cf26,_0x245e52={'unitId':_0x784645,'threadId':_0x42608f},_0x3b042d=await this['_httpService'][_0x21d655(0x1a9)]('/universer-api/comment/unit/'+_0x784645+_0x21d655(0x204),{'body':_0x245e52}),_0x3ed959=_0x42608f[_0x21d655(0x1f6)](_0x2e84b8=>ee(_0x3b042d[_0x21d655(0x1b2)]['comments'][_0x2e84b8],_0x784645,_0x760559))[_0x21d655(0x1e6)](Boolean);return Object[_0x21d655(0x1a5)](_0x3b042d[_0x21d655(0x1b2)][_0x21d655(0x203)])[_0x21d655(0x1ab)](_0x3863f0=>{const _0x257e78=_0x21d655;this[_0x257e78(0x1f1)][_0x257e78(0x1c9)](_0x3863f0);}),_0x3ed959;}[_0x36cf26(0x1a1)](_0x2b843f){const _0x20e88b=_0x36cf26;return{'id':_0x2b843f['id'],'threadId':_0x2b843f['threadId'],'ref':_0x2b843f[_0x20e88b(0x1e8)]};}};S=Q([b(0x0,_0x198cd5(_0x3fc487)),b(0x1,_0x198cd5(_0x58c1c8)),b(0x2,_0x198cd5(_0x2c5c35))],S);var re=Object[_0x36cf26(0x1fb)],te=(_0xee185,_0x2f99d3,_0x2cfd1f,_0x84bf89)=>{const _0x3fd391=_0x36cf26;for(var _0xf067bf=_0x84bf89>0x1?void 0x0:_0x84bf89?re(_0x2f99d3,_0x2cfd1f):_0x2f99d3,_0x5f3759=_0xee185[_0x3fd391(0x1f0)]-0x1,_0x4b396a;_0x5f3759>=0x0;_0x5f3759--)(_0x4b396a=_0xee185[_0x5f3759])&&(_0xf067bf=_0x4b396a(_0xf067bf)||_0xf067bf);return _0xf067bf;},M=(_0x2b4370,_0x31d5ad)=>(_0xd63ca1,_0x1b7b25)=>_0x31d5ad(_0xd63ca1,_0x1b7b25,_0x2b4370);let f=class extends _0x307552{constructor(_0x197aa1,_0x3cfaaf){const _0x1ffa8f=_0x36cf26;super(),this[_0x1ffa8f(0x1d8)]=_0x197aa1,this[_0x1ffa8f(0x200)]=_0x3cfaaf,this[_0x1ffa8f(0x1fa)]();}[_0x36cf26(0x1fa)](){const _0x519aad=_0x36cf26;this[_0x519aad(0x1d8)]['dataSource']=this[_0x519aad(0x200)],this[_0x519aad(0x1d8)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x1850ce),M(0x1,_0x198cd5(S))],f);var se=Object[_0x36cf26(0x1a6)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x231bbf,_0x1275e4,_0x199d57)=>_0x1275e4 in _0x231bbf?se(_0x231bbf,_0x1275e4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x199d57}):_0x231bbf[_0x1275e4]=_0x199d57,ie=(_0x3a79ba,_0x18423f,_0x3e40ee,_0x1ebeae)=>{const _0x2c5ff0=_0x36cf26;for(var _0x26c2cf=_0x1ebeae>0x1?void 0x0:_0x1ebeae?oe(_0x18423f,_0x3e40ee):_0x18423f,_0x4bd729=_0x3a79ba[_0x2c5ff0(0x1f0)]-0x1,_0x500696;_0x4bd729>=0x0;_0x4bd729--)(_0x500696=_0x3a79ba[_0x4bd729])&&(_0x26c2cf=_0x500696(_0x26c2cf)||_0x26c2cf);return _0x26c2cf;},N=(_0x66c31e,_0x6f7bd0)=>(_0x4e60f4,_0x525aff)=>_0x6f7bd0(_0x4e60f4,_0x525aff,_0x66c31e),$=(_0x9ac0d5,_0x518b53,_0x4cc8f5)=>ne(_0x9ac0d5,typeof _0x518b53!='symbol'?_0x518b53+'':_0x518b53,_0x4cc8f5);let g=class extends _0x31d320{constructor(_0x23a878=O,_0x1c9f45,_0x3179dc){const _0xd5987a=_0x36cf26;super(),this[_0xd5987a(0x1e0)]=_0x23a878,this[_0xd5987a(0x1d7)]=_0x1c9f45,this['_configService']=_0x3179dc;const {..._0x7d090c}=_0x38f854({},O,this[_0xd5987a(0x1e0)]);this[_0xd5987a(0x1fc)][_0xd5987a(0x1b7)](z,_0x7d090c);}[_0x36cf26(0x1c3)](){[[S],[f],[_]]['forEach'](_0x2801c7=>{const _0x52a294=_0x14cc;this[_0x52a294(0x1d7)][_0x52a294(0x1c0)](_0x2801c7);});}['onReady'](){const _0x4c7b08=_0x36cf26;this[_0x4c7b08(0x1d7)]['get'](f),this[_0x4c7b08(0x1d7)]['get'](_);}};$(g,_0x36cf26(0x1e5),W),$(g,_0x36cf26(0x1c4),_0xe103b3[_0x36cf26(0x1b4)]),g=ie([_0x574e8a(_0x2e2bfc,_0x25931d,_0x22a647),N(0x1,_0x198cd5(_0x1cb825)),N(0x2,_0x3e8e81)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x86cbf5=_0x5d7f;(function(_0x117666,_0x4b58f0){const _0x2a811a=_0x5d7f,_0x23cc3a=_0x117666();while(!![]){try{const _0x5a1677=-parseInt(_0x2a811a(0xe5))/0x1+-parseInt(_0x2a811a(0xdf))/0x2+parseInt(_0x2a811a(0xf5))/0x3+-parseInt(_0x2a811a(0xee))/0x4*(parseInt(_0x2a811a(0x101))/0x5)+-parseInt(_0x2a811a(0xdd))/0x6*(parseInt(_0x2a811a(0x103))/0x7)+-parseInt(_0x2a811a(0xc8))/0x8+parseInt(_0x2a811a(0x108))/0x9*(parseInt(_0x2a811a(0x105))/0xa);if(_0x5a1677===_0x4b58f0)break;else _0x23cc3a['push'](_0x23cc3a['shift']());}catch(_0x4aaf55){_0x23cc3a['push'](_0x23cc3a['shift']());}}}(_0x56ef,0x72c00));import{CommentService as _0x52eb93,CollaborationSessionService as _0x37c9b3,UniverCollaborationClientPlugin as _0x341643}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2e99e7}from'@univerjs-pro/license';import{dayjs as _0xf6a523,UserManagerService as _0x19b7d2,Inject as _0x391d25,Injector as _0x16d21e,Disposable as _0xac9089,CustomRangeType as _0x30218b,UniverInstanceType as _0x151aad,DependentOn as _0x53e780,Plugin as _0xcdf00d,merge as _0x5297c7,IConfigService as _0x34235b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x9b63b3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x78788c,IThreadCommentDataSourceService as _0x4ff8e3}from'@univerjs/thread-comment';import{bufferTime as _0x515bb3}from'rxjs';import{HTTPService as _0x6eed4a}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1d6073=>(_0x1d6073[_0x1d6073[_0x86cbf5(0xbf)]=0x0]='OpenOrReOpen',_0x1d6073[_0x1d6073[_0x86cbf5(0x100)]=0x1]=_0x86cbf5(0x100),_0x1d6073[_0x1d6073['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1d6073))(I||{}),v=(_0xc37026=>(_0xc37026[_0xc37026[_0x86cbf5(0xe6)]=0x0]=_0x86cbf5(0xe6),_0xc37026[_0xc37026[_0x86cbf5(0x10c)]=0x1]='Add',_0xc37026[_0xc37026[_0x86cbf5(0xfd)]=0x2]=_0x86cbf5(0xfd),_0xc37026[_0xc37026[_0x86cbf5(0xfa)]=0x3]=_0x86cbf5(0xfa),_0xc37026[_0xc37026['Delete']=0x4]=_0x86cbf5(0xf8),_0xc37026[_0xc37026[_0x86cbf5(0xca)]=0x5]=_0x86cbf5(0xca),_0xc37026[_0xc37026['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xc37026))(v||{});const y=_0xa584ed=>_0xf6a523(new Date(+_0xa584ed))[_0x86cbf5(0x11a)](_0x86cbf5(0xdc)),B=async(_0x200004,_0x1db96d)=>{const _0x3d2181=_0x86cbf5,_0x209b92=_0x200004[_0x3d2181(0x110)](_0x19b7d2),_0x32e102=_0x200004[_0x3d2181(0x110)](_0x6eed4a);_0x1db96d[_0x3d2181(0xf6)](_0xe9545c=>{const _0x32ac35=_0x3d2181;_0x209b92['getUser'](_0xe9545c)&&_0x1db96d[_0x32ac35(0x113)](_0xe9545c);}),_0x1db96d['size']&&(await _0x32e102['get'](_0x3d2181(0xd6),{'params':{'userIDs':[..._0x1db96d]}}))[_0x3d2181(0x10d)]['users'][_0x3d2181(0xf6)](_0x219388=>{const _0x43c80a=_0x3d2181;_0x219388&&_0x209b92[_0x43c80a(0xe0)](_0x219388);});};var K=Object[_0x86cbf5(0xcd)],V=(_0x3a7b3b,_0x137716,_0x46749a,_0x4075a5)=>{const _0x39be8e=_0x86cbf5;for(var _0x1f7dcc=_0x4075a5>0x1?void 0x0:_0x4075a5?K(_0x137716,_0x46749a):_0x137716,_0x1dc2d1=_0x3a7b3b[_0x39be8e(0xd8)]-0x1,_0xabde4;_0x1dc2d1>=0x0;_0x1dc2d1--)(_0xabde4=_0x3a7b3b[_0x1dc2d1])&&(_0x1f7dcc=_0xabde4(_0x1f7dcc)||_0x1f7dcc);return _0x1f7dcc;},p=(_0x20be10,_0x658855)=>(_0x546dd2,_0x229000)=>_0x658855(_0x546dd2,_0x229000,_0x20be10);let _=class extends _0xac9089{constructor(_0x195fed,_0x164b59,_0x27fabf,_0x1e0508){const _0x22bbe4=_0x86cbf5;super(),this[_0x22bbe4(0xd7)]=_0x195fed,this[_0x22bbe4(0xbd)]=_0x164b59,this[_0x22bbe4(0xeb)]=_0x27fabf,this[_0x22bbe4(0x10b)]=_0x1e0508,this[_0x22bbe4(0xe8)](),this[_0x22bbe4(0xe4)]();}[_0x86cbf5(0xe4)](){const _0xa15162=_0x86cbf5;this[_0xa15162(0xc2)](this['_threadCommentModel'][_0xa15162(0xd3)][_0xa15162(0xd9)](_0x515bb3(0x10))[_0xa15162(0x109)](_0x25000f=>{const _0x15be72=_0xa15162,_0x5e686c=new Set();_0x25000f[_0x15be72(0xf6)](_0x2246f8=>{const _0x21b388=_0x15be72;if(_0x2246f8[_0x21b388(0x114)]===_0x21b388(0xbe)){const _0x5ec18d=_0x2246f8[_0x21b388(0xdb)][_0x21b388(0xbc)];_0x5e686c[_0x21b388(0xbe)](_0x5ec18d);}}),B(this[_0x15be72(0x10b)],_0x5e686c);}));}[_0x86cbf5(0xe8)](){const _0x145842=_0x86cbf5;this[_0x145842(0xc2)](this[_0x145842(0xd7)]['commentUpdate$'][_0x145842(0x109)](async _0x31891e=>{const _0x32ef84=_0x145842;var _0x391bd4,_0x5cc79c,_0x1fda0c,_0x4baf2f;const _0x329d52=(_0x391bd4=this['_threadCommentModel']['getUnit'](_0x31891e[_0x32ef84(0x118)])[_0x32ef84(0xf2)](_0x4b0482=>_0x4b0482[_0x32ef84(0x10f)]===_0x31891e[_0x32ef84(0x10f)]))==null?void 0x0:_0x391bd4['root'];if(!_0x329d52)return;const {unitId:_0x39dfee,subUnitId:_0x26dab7}=_0x329d52;switch(_0x31891e[_0x32ef84(0xc0)]&&this[_0x32ef84(0xeb)][_0x32ef84(0xe0)](_0x31891e[_0x32ef84(0xc0)]),_0x31891e[_0x32ef84(0x114)]){case v['Add']:break;case v[_0x32ef84(0xfd)]:{this['_threadCommentModel'][_0x32ef84(0x107)](_0x39dfee,_0x26dab7,{'unitId':_0x39dfee,'subUnitId':_0x26dab7,'ref':'','id':_0x31891e[_0x32ef84(0x11e)],'dT':y(+_0x31891e[_0x32ef84(0x11b)]),'threadId':_0x31891e[_0x32ef84(0x10f)],'personId':(_0x1fda0c=(_0x5cc79c=_0x31891e[_0x32ef84(0xc0)])==null?void 0x0:_0x5cc79c[_0x32ef84(0x111)])!=null?_0x1fda0c:_0x31891e['userId'],'text':JSON['parse'](_0x31891e[_0x32ef84(0xed)]),'parentId':_0x329d52['id']});break;}case v[_0x32ef84(0xf8)]:{const _0x558b89=this['_threadCommentModel']['getComment'](_0x39dfee,_0x26dab7,_0x31891e['replyId']);_0x558b89&&_0x558b89[_0x32ef84(0xcf)]&&this[_0x32ef84(0xbd)][_0x32ef84(0xd2)](_0x39dfee,_0x26dab7,_0x31891e['replyId']);break;}case v['Edit']:{this[_0x32ef84(0xbd)][_0x32ef84(0xe2)](_0x39dfee,_0x26dab7,{'commentId':_0x31891e[_0x32ef84(0x11e)],'text':JSON[_0x32ef84(0xc1)](_0x31891e[_0x32ef84(0xed)])});break;}case v[_0x32ef84(0xca)]:{const _0x3a2822=(_0x4baf2f=this[_0x32ef84(0xbd)][_0x32ef84(0xda)](_0x31891e[_0x32ef84(0x118)])[_0x32ef84(0xf2)](_0x538c6b=>_0x538c6b[_0x32ef84(0x10f)]===_0x31891e[_0x32ef84(0x10f)]))==null?void 0x0:_0x4baf2f[_0x32ef84(0xe9)];_0x3a2822&&this[_0x32ef84(0xbd)]['resolveComment'](_0x39dfee,_0x26dab7,_0x3a2822['id'],_0x31891e[_0x32ef84(0x117)]===I[_0x32ef84(0x100)]);break;}}}));}};_=V([p(0x0,_0x391d25(_0x52eb93)),p(0x1,_0x391d25(_0x78788c)),p(0x2,_0x391d25(_0x19b7d2)),p(0x3,_0x391d25(_0x16d21e))],_);const z=_0x86cbf5(0xff),O={};var k=Object[_0x86cbf5(0xcd)],Q=(_0x34a864,_0x1ca008,_0x4ccbb3,_0xabd10)=>{for(var _0x188529=_0xabd10>0x1?void 0x0:_0xabd10?k(_0x1ca008,_0x4ccbb3):_0x1ca008,_0x419583=_0x34a864['length']-0x1,_0x6d8932;_0x419583>=0x0;_0x419583--)(_0x6d8932=_0x34a864[_0x419583])&&(_0x188529=_0x6d8932(_0x188529)||_0x188529);return _0x188529;},b=(_0x33cdb5,_0x342c6b)=>(_0x488288,_0xdf9a4d)=>_0x342c6b(_0x488288,_0xdf9a4d,_0x33cdb5);function _0x5d7f(_0x5bbca9,_0x2334e9){_0x5bbca9=_0x5bbca9-0xbc;const _0x56efce=_0x56ef();let _0x5d7fb8=_0x56efce[_0x5bbca9];return _0x5d7fb8;}function X(_0x129440,_0x441261){const _0x142c8c=_0x86cbf5,_0x538a69=_0x129440['replies'][0x0];return{..._0x441261,'id':_0x538a69[_0x142c8c(0x11e)],'resolved':_0x129440[_0x142c8c(0x117)]===0x1,'dT':y(_0x538a69[_0x142c8c(0x11b)]),'personId':_0x538a69[_0x142c8c(0x112)],'threadId':_0x538a69[_0x142c8c(0x10f)]};}function ee(_0x3b40ef,_0x5394c8,_0x493c3c){const _0x20d362=_0x86cbf5;var _0x329340,_0x193743;if(((_0x193743=(_0x329340=_0x3b40ef==null?void 0x0:_0x3b40ef[_0x20d362(0xf9)])==null?void 0x0:_0x329340['length'])!=null?_0x193743:0x0)>0x0){const _0x135404=(_0x21ce35,_0x3d4e32)=>({'id':_0x21ce35['replyId'],'threadId':_0x21ce35[_0x20d362(0x10f)],'dT':y(_0x21ce35['createTimestamp']),'personId':_0x21ce35['userId'],'resolved':_0x3b40ef[_0x20d362(0x117)]===I[_0x20d362(0x100)],'unitId':_0x5394c8,'subUnitId':_0x493c3c,'text':JSON[_0x20d362(0xc1)](_0x21ce35[_0x20d362(0xed)]),'parentId':_0x3d4e32}),_0x2a3983=_0x135404(_0x3b40ef[_0x20d362(0xf9)][0x0]);return{..._0x2a3983,'children':_0x3b40ef['replies'][_0x20d362(0x11c)](0x1)[_0x20d362(0x11f)](_0x57456f=>_0x135404(_0x57456f,_0x2a3983['id']))};}return null;}let S=class{constructor(_0x30a9a3,_0x245ba8,_0x43c75e){const _0x3be8b2=_0x86cbf5;this[_0x3be8b2(0xce)]=_0x30a9a3,this['_userService']=_0x245ba8,this['_sessionService']=_0x43c75e;}async[_0x86cbf5(0x107)](_0x487568){const _0x100bf7=_0x86cbf5;var _0x2f7bb9,_0x34e5f8;const {parentId:_0x1c44df,unitId:_0x40fc53,text:_0x157fa8,threadId:_0x23d0a0}=_0x487568,_0x5569fb=(_0x34e5f8=(_0x2f7bb9=_0x157fa8[_0x100bf7(0x10a)])==null?void 0x0:_0x2f7bb9[_0x100bf7(0xf1)](_0x2e9fe4=>_0x2e9fe4['rangeType']===_0x30218b[_0x100bf7(0xf0)])[_0x100bf7(0x11f)](_0x3c1b67=>_0x3c1b67[_0x100bf7(0x106)]))!=null?_0x34e5f8:[],_0x1e8919=JSON[_0x100bf7(0xef)](_0x157fa8),_0x327015=(await this[_0x100bf7(0xd0)]['requireSession'](_0x40fc53))[_0x100bf7(0xc7)]();if(_0x1c44df){const _0x2c7e33={'memberId':_0x327015,'unitId':_0x40fc53,'content':_0x1e8919,'mention':_0x5569fb,'threadId':_0x23d0a0},_0x2bd3cf=(await this[_0x100bf7(0xce)][_0x100bf7(0xea)](_0x100bf7(0xc3)+_0x40fc53+_0x100bf7(0xc4),{'body':_0x2c7e33}))[_0x100bf7(0x10d)][_0x100bf7(0x11d)];return{..._0x487568,'id':_0x2bd3cf[_0x100bf7(0x11e)],'dT':_0xf6a523(+_0x2bd3cf[_0x100bf7(0x11b)])['format'](_0x100bf7(0xdc)),'personId':_0x2bd3cf['userId']};}else{const _0xfb9099={'memberId':_0x327015,'unitId':_0x40fc53,'content':_0x1e8919,'mention':_0x5569fb},_0x35e7e1=await this[_0x100bf7(0xce)]['post']('/universer-api/comment/unit/'+_0x40fc53+'/add',{'body':_0xfb9099});return X(_0x35e7e1[_0x100bf7(0x10d)][_0x100bf7(0xc5)],_0x487568);}}async['updateComment'](_0x318b4e){const _0x2ba6ad=_0x86cbf5;var _0x4463f2,_0x266363;const {text:_0x322158,unitId:_0x290682}=_0x318b4e,_0x1ddca7=(_0x266363=(_0x4463f2=_0x322158[_0x2ba6ad(0x10a)])==null?void 0x0:_0x4463f2[_0x2ba6ad(0xf1)](_0x1d7e80=>_0x1d7e80[_0x2ba6ad(0x104)]===_0x30218b[_0x2ba6ad(0xf0)])[_0x2ba6ad(0x11f)](_0x3d8988=>_0x3d8988[_0x2ba6ad(0x106)]))!=null?_0x266363:[],_0x5b81a4=JSON[_0x2ba6ad(0xef)](_0x322158),_0x5e0d8a=_0x318b4e[_0x2ba6ad(0x10f)],_0x5855c8=_0x318b4e['id'],_0x49e85a={'memberId':(await this[_0x2ba6ad(0xd0)]['requireSession'](_0x290682))[_0x2ba6ad(0xc7)](),'unitId':_0x290682,'threadId':_0x5e0d8a,'mention':_0x1ddca7,'content':_0x5b81a4,'replyId':_0x5855c8},_0x2a2a6e=await this[_0x2ba6ad(0xce)][_0x2ba6ad(0xea)](_0x2ba6ad(0xc3)+_0x290682+_0x2ba6ad(0xf3),{'body':_0x49e85a});return!_0x2a2a6e[_0x2ba6ad(0x10d)][_0x2ba6ad(0xfb)]||_0x2a2a6e[_0x2ba6ad(0x10d)][_0x2ba6ad(0xfb)]['code']===0x1;}async[_0x86cbf5(0xcb)](_0x5d2048){const _0x1d7a33=_0x86cbf5,{unitId:_0x56f537}=_0x5d2048,_0x281e31=_0x5d2048['threadId'],_0x3a2c01={'memberId':this[_0x1d7a33(0xeb)][_0x1d7a33(0xec)]()['userID'],'unitId':_0x56f537,'threadId':_0x281e31,'solved':_0x5d2048[_0x1d7a33(0xe7)]?I[_0x1d7a33(0x100)]:I['OpenOrReOpen']},_0xbbe77c=await this[_0x1d7a33(0xce)][_0x1d7a33(0xea)](_0x1d7a33(0xc3)+_0x56f537+'/solved',{'body':_0x3a2c01});return!_0xbbe77c[_0x1d7a33(0x10d)][_0x1d7a33(0xfb)]||_0xbbe77c[_0x1d7a33(0x10d)][_0x1d7a33(0xfb)]['code']===0x1;}async[_0x86cbf5(0xd2)](_0x4ca655,_0x4df0e7,_0xc9bb44,_0x1b8aae){const _0x37ec2e=_0x86cbf5,_0x4ef762={'memberId':(await this['_sessionService'][_0x37ec2e(0xf4)](_0x4ca655))['getMemberID'](),'threadId':_0xc9bb44,'replyId':_0x1b8aae,'unitId':_0x4ca655},_0x51e637=await this[_0x37ec2e(0xce)]['post']('/universer-api/comment/unit/'+_0x4ca655+_0x37ec2e(0xd5),{'body':_0x4ef762});return!_0x51e637[_0x37ec2e(0x10d)][_0x37ec2e(0xfb)]||_0x51e637['body'][_0x37ec2e(0xfb)][_0x37ec2e(0xc9)]===0x1;}async[_0x86cbf5(0x102)](_0x58839b,_0x3c865a,_0x2c3357){const _0x43ab00=_0x86cbf5,_0x58fda5={'unitId':_0x58839b,'threadId':_0x2c3357},_0x1c5c31=await this[_0x43ab00(0xce)][_0x43ab00(0xea)](_0x43ab00(0xc3)+_0x58839b+_0x43ab00(0xfc),{'body':_0x58fda5}),_0x5e2024=_0x2c3357[_0x43ab00(0x11f)](_0x5db052=>ee(_0x1c5c31[_0x43ab00(0x10d)][_0x43ab00(0xfe)][_0x5db052],_0x58839b,_0x3c865a))[_0x43ab00(0xf1)](Boolean);return Object['values'](_0x1c5c31[_0x43ab00(0x10d)][_0x43ab00(0x116)])[_0x43ab00(0xf6)](_0x4378eb=>{const _0x483abc=_0x43ab00;this[_0x483abc(0xeb)][_0x483abc(0xe0)](_0x4378eb);}),_0x5e2024;}['saveCommentToSnapshot'](_0x2345fb){const _0x553c14=_0x86cbf5;return{'id':_0x2345fb['id'],'threadId':_0x2345fb[_0x553c14(0x10f)],'ref':_0x2345fb['ref']};}};S=Q([b(0x0,_0x391d25(_0x6eed4a)),b(0x1,_0x391d25(_0x19b7d2)),b(0x2,_0x391d25(_0x37c9b3))],S);var re=Object[_0x86cbf5(0xcd)],te=(_0x2a8943,_0x129db3,_0x102a78,_0xea53)=>{const _0x551127=_0x86cbf5;for(var _0x1235d2=_0xea53>0x1?void 0x0:_0xea53?re(_0x129db3,_0x102a78):_0x129db3,_0xf70ae0=_0x2a8943[_0x551127(0xd8)]-0x1,_0x2443dd;_0xf70ae0>=0x0;_0xf70ae0--)(_0x2443dd=_0x2a8943[_0xf70ae0])&&(_0x1235d2=_0x2443dd(_0x1235d2)||_0x1235d2);return _0x1235d2;},M=(_0x7dda8b,_0x162e36)=>(_0x3d5aec,_0x3adafd)=>_0x162e36(_0x3d5aec,_0x3adafd,_0x7dda8b);let f=class extends _0xac9089{constructor(_0x197a95,_0x32a56d){const _0x582e3c=_0x86cbf5;super(),this[_0x582e3c(0xd1)]=_0x197a95,this[_0x582e3c(0x115)]=_0x32a56d,this[_0x582e3c(0x120)]();}[_0x86cbf5(0x120)](){const _0x5dcae2=_0x86cbf5;this[_0x5dcae2(0xd1)][_0x5dcae2(0xde)]=this[_0x5dcae2(0x115)],this[_0x5dcae2(0xd1)][_0x5dcae2(0xf7)]=!0x1;}};f=te([M(0x0,_0x4ff8e3),M(0x1,_0x391d25(S))],f);var se=Object[_0x86cbf5(0xe1)],oe=Object[_0x86cbf5(0xcd)],ne=(_0x4fde1e,_0x5478e3,_0x5ea69c)=>_0x5478e3 in _0x4fde1e?se(_0x4fde1e,_0x5478e3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5ea69c}):_0x4fde1e[_0x5478e3]=_0x5ea69c,ie=(_0x453a60,_0x1aa6d8,_0x53301c,_0x15732b)=>{for(var _0x3964fe=_0x15732b>0x1?void 0x0:_0x15732b?oe(_0x1aa6d8,_0x53301c):_0x1aa6d8,_0x487fa7=_0x453a60['length']-0x1,_0x64db12;_0x487fa7>=0x0;_0x487fa7--)(_0x64db12=_0x453a60[_0x487fa7])&&(_0x3964fe=_0x64db12(_0x3964fe)||_0x3964fe);return _0x3964fe;},N=(_0x2654b5,_0x37157c)=>(_0x419c50,_0xa7832)=>_0x37157c(_0x419c50,_0xa7832,_0x2654b5),$=(_0x2984bc,_0x4704b8,_0x499fcb)=>ne(_0x2984bc,typeof _0x4704b8!='symbol'?_0x4704b8+'':_0x4704b8,_0x499fcb);let g=class extends _0xcdf00d{constructor(_0x15df1a=O,_0x49ecbb,_0x105724){const _0x4c36dc=_0x86cbf5;super(),this[_0x4c36dc(0xe3)]=_0x15df1a,this['_injector']=_0x49ecbb,this['_configService']=_0x105724;const {..._0x11e1bd}=_0x5297c7({},O,this[_0x4c36dc(0xe3)]);this[_0x4c36dc(0xd4)][_0x4c36dc(0x10e)](z,_0x11e1bd);}[_0x86cbf5(0xc6)](){[[S],[f],[_]]['forEach'](_0x9dd983=>{const _0xf8c799=_0x5d7f;this['_injector'][_0xf8c799(0xbe)](_0x9dd983);});}[_0x86cbf5(0xcc)](){const _0x14fdcc=_0x86cbf5;this[_0x14fdcc(0x10b)][_0x14fdcc(0x110)](f),this[_0x14fdcc(0x10b)][_0x14fdcc(0x110)](_);}};function _0x56ef(){const _0x534b2f=['Delete','replies','Edit','error','/list','Reply','comments','thread-comment-data-source.config','Solved','531840KvHpfi','listComments','12845yFRDtM','rangeType','2050460SYNXlU','rangeId','addComment','153lVhnbc','subscribe','customRanges','_injector','Add','body','setConfig','threadId','get','userID','userId','delete','type','_threadCommentDataSource','users','solved','unitId','pluginName','format','createTimestamp','slice','reply','replyId','map','_initDataSource','personId','_threadCommentModel','add','OpenOrReOpen','user','parse','disposeWithMe','/universer-api/comment/unit/','/reply','comment','onStarting','getMemberID','4838848vvMCAn','code','Solve','resolveComment','onReady','getOwnPropertyDescriptor','_httpService','parentId','_sessionService','_threadCommentDataSourceService','deleteComment','commentUpdate$','_configService','/delete','/universer-api/user/list','_commentService','length','pipe','getUnit','payload','YYYY/MM/DD\x20HH:mm','2724vxCQQH','dataSource','1731912jLakjX','addUser','defineProperty','updateComment','_config','_initUserSync','502416qSyZXW','Unknown','resolved','_init','root','post','_userService','getCurrentUser','content','12vKXJKF','stringify','COMMENT','filter','find','/edit','requireSession','328968kZdiHK','forEach','syncUpdateMutationToColla'];_0x56ef=function(){return _0x534b2f;};return _0x56ef();}$(g,_0x86cbf5(0x119),W),$(g,'type',_0x151aad['UNIVER_UNKNOWN']),g=ie([_0x53e780(_0x9b63b3,_0x341643,_0x2e99e7),N(0x1,_0x391d25(_0x16d21e)),N(0x2,_0x34235b)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1068(_0x5c47e2,_0x104ab3){_0x5c47e2=_0x5c47e2-0x16b;const _0x1deb6d=_0x1deb();let _0x1068ec=_0x1deb6d[_0x5c47e2];return _0x1068ec;}(function(_0xbb264a,_0x333679){const _0x5e8e36=_0x1068,_0x1e50e2=_0xbb264a();while(!![]){try{const _0x5dfe26=parseInt(_0x5e8e36(0x1f1))/0x1+parseInt(_0x5e8e36(0x1a1))/0x2+-parseInt(_0x5e8e36(0x1cf))/0x3*(parseInt(_0x5e8e36(0x1c1))/0x4)+-parseInt(_0x5e8e36(0x195))/0x5*(parseInt(_0x5e8e36(0x16e))/0x6)+parseInt(_0x5e8e36(0x18e))/0x7*(parseInt(_0x5e8e36(0x1d5))/0x8)+parseInt(_0x5e8e36(0x184))/0x9+parseInt(_0x5e8e36(0x193))/0xa*(-parseInt(_0x5e8e36(0x1c5))/0xb);if(_0x5dfe26===_0x333679)break;else _0x1e50e2['push'](_0x1e50e2['shift']());}catch(_0x49c61d){_0x1e50e2['push'](_0x1e50e2['shift']());}}}(_0x1deb,0x306dc),function(_0x26b9b2,_0x4e8fe2){const _0x52e026=_0x1068;typeof exports==_0x52e026(0x16d)&&typeof module<'u'?_0x4e8fe2(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==_0x52e026(0x18a)&&define[_0x52e026(0x1b4)]?define([_0x52e026(0x1c3),'@univerjs-pro/collaboration-client',_0x52e026(0x18c),'@univerjs/core',_0x52e026(0x1bb),_0x52e026(0x1c4),_0x52e026(0x1be),_0x52e026(0x1e6)],_0x4e8fe2):(_0x26b9b2=typeof globalThis<'u'?globalThis:_0x26b9b2||self,_0x4e8fe2(_0x26b9b2[_0x52e026(0x186)]={},_0x26b9b2[_0x52e026(0x1e1)],_0x26b9b2[_0x52e026(0x1e8)],_0x26b9b2['UniverCore'],_0x26b9b2[_0x52e026(0x1ce)],_0x26b9b2[_0x52e026(0x17e)],_0x26b9b2[_0x52e026(0x1be)],_0x26b9b2['UniverNetwork']));}(this,function(_0x18595e,_0x259e13,_0x5e1cd1,_0x557eb8,_0x22fd3d,_0x5d20e1,_0x286f37,_0xc86999){'use strict';const _0x273874=_0x1068;const _0x398ac2=_0x273874(0x192);var _0x68b241=(_0x30d653=>(_0x30d653[_0x30d653['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x30d653[_0x30d653[_0x273874(0x1a0)]=0x1]='Solved',_0x30d653[_0x30d653[_0x273874(0x1b0)]=-0x1]='UNRECOGNIZED',_0x30d653))(_0x68b241||{}),_0x5105e0=(_0x166ab6=>(_0x166ab6[_0x166ab6[_0x273874(0x17b)]=0x0]=_0x273874(0x17b),_0x166ab6[_0x166ab6['Add']=0x1]=_0x273874(0x190),_0x166ab6[_0x166ab6[_0x273874(0x1e4)]=0x2]=_0x273874(0x1e4),_0x166ab6[_0x166ab6[_0x273874(0x1f2)]=0x3]=_0x273874(0x1f2),_0x166ab6[_0x166ab6[_0x273874(0x1b8)]=0x4]='Delete',_0x166ab6[_0x166ab6[_0x273874(0x1d8)]=0x5]=_0x273874(0x1d8),_0x166ab6[_0x166ab6[_0x273874(0x1b0)]=-0x1]='UNRECOGNIZED',_0x166ab6))(_0x5105e0||{});const _0x497fc3=_0x250860=>_0x557eb8[_0x273874(0x18f)](new Date(+_0x250860))[_0x273874(0x188)](_0x273874(0x19e)),_0x32a0db=async(_0x55bcfa,_0x2d6f1f)=>{const _0x1614f8=_0x273874,_0x57a10e=_0x55bcfa[_0x1614f8(0x1df)](_0x557eb8[_0x1614f8(0x1c9)]),_0x366d91=_0x55bcfa[_0x1614f8(0x1df)](_0xc86999[_0x1614f8(0x1da)]);_0x2d6f1f[_0x1614f8(0x1b2)](_0x1c17a5=>{const _0x1cf0f4=_0x1614f8;_0x57a10e[_0x1cf0f4(0x16b)](_0x1c17a5)&&_0x2d6f1f[_0x1cf0f4(0x1a4)](_0x1c17a5);}),_0x2d6f1f['size']&&(await _0x366d91[_0x1614f8(0x1df)](_0x1614f8(0x1a5),{'params':{'userIDs':[..._0x2d6f1f]}}))['body'][_0x1614f8(0x182)][_0x1614f8(0x1b2)](_0x266a79=>{const _0x4e90ab=_0x1614f8;_0x266a79&&_0x57a10e[_0x4e90ab(0x18d)](_0x266a79);});};var _0x497dc4=Object[_0x273874(0x175)],_0x38d9f6=(_0x59d3ee,_0x430498,_0x2c3c74,_0x16217a)=>{for(var _0x1399ca=_0x16217a>0x1?void 0x0:_0x16217a?_0x497dc4(_0x430498,_0x2c3c74):_0x430498,_0x1b60b3=_0x59d3ee['length']-0x1,_0x557a36;_0x1b60b3>=0x0;_0x1b60b3--)(_0x557a36=_0x59d3ee[_0x1b60b3])&&(_0x1399ca=_0x557a36(_0x1399ca)||_0x1399ca);return _0x1399ca;},_0x11a110=(_0xf5387,_0xc88fb8)=>(_0x1e736f,_0x4380e4)=>_0xc88fb8(_0x1e736f,_0x4380e4,_0xf5387);let _0x16917b=class extends _0x557eb8[_0x273874(0x1d4)]{constructor(_0x90a5a1,_0x1725c3,_0x27607a,_0x33b3b9){const _0x54c70a=_0x273874;super(),this['_commentService']=_0x90a5a1,this[_0x54c70a(0x1ab)]=_0x1725c3,this['_userService']=_0x27607a,this[_0x54c70a(0x1f3)]=_0x33b3b9,this[_0x54c70a(0x19f)](),this[_0x54c70a(0x18b)]();}[_0x273874(0x18b)](){const _0x21308f=_0x273874;this[_0x21308f(0x1ef)](this['_threadCommentModel'][_0x21308f(0x1e9)][_0x21308f(0x171)](_0x286f37[_0x21308f(0x19b)](0x10))[_0x21308f(0x1d7)](_0x4f290e=>{const _0x5c58a3=_0x21308f,_0x2edd21=new Set();_0x4f290e[_0x5c58a3(0x1b2)](_0x53ec5b=>{const _0x428f60=_0x5c58a3;if(_0x53ec5b[_0x428f60(0x1b1)]==='add'){const _0x57411b=_0x53ec5b[_0x428f60(0x197)][_0x428f60(0x1f0)];_0x2edd21[_0x428f60(0x1c8)](_0x57411b);}}),_0x32a0db(this[_0x5c58a3(0x1f3)],_0x2edd21);}));}[_0x273874(0x19f)](){const _0x5e768f=_0x273874;this[_0x5e768f(0x1ef)](this[_0x5e768f(0x17c)][_0x5e768f(0x1e9)][_0x5e768f(0x1d7)](async _0x2cbb8a=>{const _0x1afff1=_0x5e768f;var _0x5278c5,_0x44e694,_0x567c02,_0x1c378a;const _0x4361e0=(_0x5278c5=this[_0x1afff1(0x1ab)][_0x1afff1(0x1e5)](_0x2cbb8a[_0x1afff1(0x1ae)])[_0x1afff1(0x1cb)](_0x426ca1=>_0x426ca1[_0x1afff1(0x17d)]===_0x2cbb8a[_0x1afff1(0x17d)]))==null?void 0x0:_0x5278c5[_0x1afff1(0x172)];if(!_0x4361e0)return;const {unitId:_0xa7302a,subUnitId:_0x337fe4}=_0x4361e0;switch(_0x2cbb8a['user']&&this[_0x1afff1(0x1e2)][_0x1afff1(0x18d)](_0x2cbb8a[_0x1afff1(0x17f)]),_0x2cbb8a[_0x1afff1(0x1b1)]){case _0x5105e0[_0x1afff1(0x190)]:break;case _0x5105e0[_0x1afff1(0x1e4)]:{this['_threadCommentModel'][_0x1afff1(0x1b3)](_0xa7302a,_0x337fe4,{'unitId':_0xa7302a,'subUnitId':_0x337fe4,'ref':'','id':_0x2cbb8a['replyId'],'dT':_0x497fc3(+_0x2cbb8a[_0x1afff1(0x198)]),'threadId':_0x2cbb8a[_0x1afff1(0x17d)],'personId':(_0x567c02=(_0x44e694=_0x2cbb8a['user'])==null?void 0x0:_0x44e694[_0x1afff1(0x1d6)])!=null?_0x567c02:_0x2cbb8a[_0x1afff1(0x1e0)],'text':JSON[_0x1afff1(0x1dd)](_0x2cbb8a['content']),'parentId':_0x4361e0['id']});break;}case _0x5105e0['Delete']:{const _0x32974c=this[_0x1afff1(0x1ab)][_0x1afff1(0x179)](_0xa7302a,_0x337fe4,_0x2cbb8a[_0x1afff1(0x19d)]);_0x32974c&&_0x32974c['parentId']&&this['_threadCommentModel'][_0x1afff1(0x1c0)](_0xa7302a,_0x337fe4,_0x2cbb8a[_0x1afff1(0x19d)]);break;}case _0x5105e0[_0x1afff1(0x1f2)]:{this[_0x1afff1(0x1ab)][_0x1afff1(0x1c7)](_0xa7302a,_0x337fe4,{'commentId':_0x2cbb8a['replyId'],'text':JSON[_0x1afff1(0x1dd)](_0x2cbb8a[_0x1afff1(0x1e7)])});break;}case _0x5105e0['Solve']:{const _0x4ed3e6=(_0x1c378a=this[_0x1afff1(0x1ab)][_0x1afff1(0x1e5)](_0x2cbb8a[_0x1afff1(0x1ae)])[_0x1afff1(0x1cb)](_0x9dcd6a=>_0x9dcd6a[_0x1afff1(0x17d)]===_0x2cbb8a['threadId']))==null?void 0x0:_0x1c378a[_0x1afff1(0x172)];_0x4ed3e6&&this['_threadCommentModel']['resolveComment'](_0xa7302a,_0x337fe4,_0x4ed3e6['id'],_0x2cbb8a[_0x1afff1(0x183)]===_0x68b241[_0x1afff1(0x1a0)]);break;}}}));}};_0x16917b=_0x38d9f6([_0x11a110(0x0,_0x557eb8[_0x273874(0x1c6)](_0x259e13['CommentService'])),_0x11a110(0x1,_0x557eb8['Inject'](_0x5d20e1[_0x273874(0x1c2)])),_0x11a110(0x2,_0x557eb8['Inject'](_0x557eb8['UserManagerService'])),_0x11a110(0x3,_0x557eb8[_0x273874(0x1c6)](_0x557eb8[_0x273874(0x199)]))],_0x16917b);const _0x454e53=_0x273874(0x1db),_0xa3686b={};var _0x5b0d02=Object[_0x273874(0x175)],_0x2199f4=(_0x50c8a8,_0x42d4cf,_0x2f98e0,_0x436f31)=>{const _0x349357=_0x273874;for(var _0x4342df=_0x436f31>0x1?void 0x0:_0x436f31?_0x5b0d02(_0x42d4cf,_0x2f98e0):_0x42d4cf,_0x3bd632=_0x50c8a8[_0x349357(0x177)]-0x1,_0x2b0909;_0x3bd632>=0x0;_0x3bd632--)(_0x2b0909=_0x50c8a8[_0x3bd632])&&(_0x4342df=_0x2b0909(_0x4342df)||_0x4342df);return _0x4342df;},_0x13e649=(_0x378603,_0x15284c)=>(_0x588aa5,_0x3e8d14)=>_0x15284c(_0x588aa5,_0x3e8d14,_0x378603);function _0x36f5e1(_0x935f1e,_0x7d3804){const _0x9fd5d3=_0x273874,_0x171a75=_0x935f1e[_0x9fd5d3(0x194)][0x0];return{..._0x7d3804,'id':_0x171a75['replyId'],'resolved':_0x935f1e[_0x9fd5d3(0x183)]===0x1,'dT':_0x497fc3(_0x171a75[_0x9fd5d3(0x198)]),'personId':_0x171a75[_0x9fd5d3(0x1e0)],'threadId':_0x171a75['threadId']};}function _0x56ecca(_0x5c1035,_0x29a5a5,_0x1aef2c){const _0x3806b5=_0x273874;var _0x5e39df,_0x3198b7;if(((_0x3198b7=(_0x5e39df=_0x5c1035==null?void 0x0:_0x5c1035[_0x3806b5(0x194)])==null?void 0x0:_0x5e39df[_0x3806b5(0x177)])!=null?_0x3198b7:0x0)>0x0){const _0x2e6706=(_0x3f8560,_0x4552ac)=>({'id':_0x3f8560[_0x3806b5(0x19d)],'threadId':_0x3f8560[_0x3806b5(0x17d)],'dT':_0x497fc3(_0x3f8560['createTimestamp']),'personId':_0x3f8560['userId'],'resolved':_0x5c1035[_0x3806b5(0x183)]===_0x68b241[_0x3806b5(0x1a0)],'unitId':_0x29a5a5,'subUnitId':_0x1aef2c,'text':JSON[_0x3806b5(0x1dd)](_0x3f8560[_0x3806b5(0x1e7)]),'parentId':_0x4552ac}),_0xa6d09a=_0x2e6706(_0x5c1035[_0x3806b5(0x194)][0x0]);return{..._0xa6d09a,'children':_0x5c1035[_0x3806b5(0x194)][_0x3806b5(0x191)](0x1)[_0x3806b5(0x17a)](_0x1b9674=>_0x2e6706(_0x1b9674,_0xa6d09a['id']))};}return null;}let _0x2fdd5d=class{constructor(_0x40b369,_0x128d63,_0x508dc9){const _0xcdfd4a=_0x273874;this[_0xcdfd4a(0x1de)]=_0x40b369,this[_0xcdfd4a(0x1e2)]=_0x128d63,this[_0xcdfd4a(0x1d1)]=_0x508dc9;}async['addComment'](_0x589153){const _0x54bef6=_0x273874;var _0x3319ba,_0x22e0bb;const {parentId:_0x1445d0,unitId:_0x2358d0,text:_0x3c417f,threadId:_0x1a2f22}=_0x589153,_0x29cae8=(_0x22e0bb=(_0x3319ba=_0x3c417f[_0x54bef6(0x181)])==null?void 0x0:_0x3319ba['filter'](_0x58eb57=>_0x58eb57[_0x54bef6(0x1e3)]===_0x557eb8['CustomRangeType'][_0x54bef6(0x1b6)])[_0x54bef6(0x17a)](_0x5a4d67=>_0x5a4d67[_0x54bef6(0x1aa)]))!=null?_0x22e0bb:[],_0x29ab06=JSON[_0x54bef6(0x1d2)](_0x3c417f),_0x5dffcf=(await this[_0x54bef6(0x1d1)][_0x54bef6(0x1d0)](_0x2358d0))[_0x54bef6(0x1ec)]();if(_0x1445d0){const _0x483ce1={'memberId':_0x5dffcf,'unitId':_0x2358d0,'content':_0x29ab06,'mention':_0x29cae8,'threadId':_0x1a2f22},_0x339536=(await this[_0x54bef6(0x1de)][_0x54bef6(0x1eb)](_0x54bef6(0x1ca)+_0x2358d0+_0x54bef6(0x170),{'body':_0x483ce1}))[_0x54bef6(0x189)][_0x54bef6(0x196)];return{..._0x589153,'id':_0x339536[_0x54bef6(0x19d)],'dT':_0x557eb8[_0x54bef6(0x18f)](+_0x339536['createTimestamp'])['format'](_0x54bef6(0x19e)),'personId':_0x339536[_0x54bef6(0x1e0)]};}else{const _0x2d2f78={'memberId':_0x5dffcf,'unitId':_0x2358d0,'content':_0x29ab06,'mention':_0x29cae8},_0x596752=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2358d0+_0x54bef6(0x1af),{'body':_0x2d2f78});return _0x36f5e1(_0x596752[_0x54bef6(0x189)]['comment'],_0x589153);}}async[_0x273874(0x1c7)](_0x428b8c){const _0xc1f7e2=_0x273874;var _0x1596c4,_0x133efb;const {text:_0x167903,unitId:_0x3deab3}=_0x428b8c,_0x245206=(_0x133efb=(_0x1596c4=_0x167903[_0xc1f7e2(0x181)])==null?void 0x0:_0x1596c4[_0xc1f7e2(0x1a3)](_0x129ef4=>_0x129ef4[_0xc1f7e2(0x1e3)]===_0x557eb8[_0xc1f7e2(0x1bf)][_0xc1f7e2(0x1b6)])[_0xc1f7e2(0x17a)](_0x273306=>_0x273306[_0xc1f7e2(0x1aa)]))!=null?_0x133efb:[],_0x17f21a=JSON[_0xc1f7e2(0x1d2)](_0x167903),_0x3e6976=_0x428b8c[_0xc1f7e2(0x17d)],_0x36cc28=_0x428b8c['id'],_0x43cc83={'memberId':(await this[_0xc1f7e2(0x1d1)][_0xc1f7e2(0x1d0)](_0x3deab3))['getMemberID'](),'unitId':_0x3deab3,'threadId':_0x3e6976,'mention':_0x245206,'content':_0x17f21a,'replyId':_0x36cc28},_0xf5fc87=await this[_0xc1f7e2(0x1de)][_0xc1f7e2(0x1eb)](_0xc1f7e2(0x1ca)+_0x3deab3+_0xc1f7e2(0x1ea),{'body':_0x43cc83});return!_0xf5fc87['body'][_0xc1f7e2(0x1a2)]||_0xf5fc87['body'][_0xc1f7e2(0x1a2)][_0xc1f7e2(0x1d3)]===0x1;}async[_0x273874(0x1a9)](_0x1d461b){const _0x2406e3=_0x273874,{unitId:_0x375ba1}=_0x1d461b,_0x449a7d=_0x1d461b[_0x2406e3(0x17d)],_0x3ec698={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x375ba1,'threadId':_0x449a7d,'solved':_0x1d461b[_0x2406e3(0x16c)]?_0x68b241[_0x2406e3(0x1a0)]:_0x68b241[_0x2406e3(0x174)]},_0x569c94=await this[_0x2406e3(0x1de)][_0x2406e3(0x1eb)]('/universer-api/comment/unit/'+_0x375ba1+_0x2406e3(0x16f),{'body':_0x3ec698});return!_0x569c94[_0x2406e3(0x189)][_0x2406e3(0x1a2)]||_0x569c94[_0x2406e3(0x189)][_0x2406e3(0x1a2)]['code']===0x1;}async['deleteComment'](_0x51f608,_0x41b7c2,_0x3080ca,_0x4c3753){const _0x270ba4=_0x273874,_0x131362={'memberId':(await this[_0x270ba4(0x1d1)]['requireSession'](_0x51f608))['getMemberID'](),'threadId':_0x3080ca,'replyId':_0x4c3753,'unitId':_0x51f608},_0xe9786c=await this['_httpService']['post'](_0x270ba4(0x1ca)+_0x51f608+'/delete',{'body':_0x131362});return!_0xe9786c[_0x270ba4(0x189)]['error']||_0xe9786c[_0x270ba4(0x189)][_0x270ba4(0x1a2)][_0x270ba4(0x1d3)]===0x1;}async[_0x273874(0x19a)](_0x198487,_0xd74f2a,_0x323d11){const _0x468902=_0x273874,_0x558b71={'unitId':_0x198487,'threadId':_0x323d11},_0x34c72d=await this['_httpService']['post'](_0x468902(0x1ca)+_0x198487+_0x468902(0x1dc),{'body':_0x558b71}),_0xd766b6=_0x323d11['map'](_0x1ddf31=>_0x56ecca(_0x34c72d[_0x468902(0x189)][_0x468902(0x1cd)][_0x1ddf31],_0x198487,_0xd74f2a))[_0x468902(0x1a3)](Boolean);return Object[_0x468902(0x1a8)](_0x34c72d[_0x468902(0x189)][_0x468902(0x182)])['forEach'](_0x128366=>{const _0x28b9d1=_0x468902;this['_userService'][_0x28b9d1(0x18d)](_0x128366);}),_0xd766b6;}[_0x273874(0x1d9)](_0x46e8c9){const _0x3ca442=_0x273874;return{'id':_0x46e8c9['id'],'threadId':_0x46e8c9[_0x3ca442(0x17d)],'ref':_0x46e8c9['ref']};}};_0x2fdd5d=_0x2199f4([_0x13e649(0x0,_0x557eb8['Inject'](_0xc86999[_0x273874(0x1da)])),_0x13e649(0x1,_0x557eb8[_0x273874(0x1c6)](_0x557eb8[_0x273874(0x1c9)])),_0x13e649(0x2,_0x557eb8['Inject'](_0x259e13['CollaborationSessionService']))],_0x2fdd5d);var _0x42f408=Object[_0x273874(0x175)],_0x3b839c=(_0x45030e,_0x37bdd2,_0x3572b5,_0x62a11d)=>{const _0xf5c70e=_0x273874;for(var _0x5afa77=_0x62a11d>0x1?void 0x0:_0x62a11d?_0x42f408(_0x37bdd2,_0x3572b5):_0x37bdd2,_0x236de2=_0x45030e[_0xf5c70e(0x177)]-0x1,_0x47ce1d;_0x236de2>=0x0;_0x236de2--)(_0x47ce1d=_0x45030e[_0x236de2])&&(_0x5afa77=_0x47ce1d(_0x5afa77)||_0x5afa77);return _0x5afa77;},_0x8415cd=(_0xee2029,_0x105c41)=>(_0x5291ed,_0x51a377)=>_0x105c41(_0x5291ed,_0x51a377,_0xee2029);let _0x32d9bc=class extends _0x557eb8[_0x273874(0x1d4)]{constructor(_0x411a5b,_0x19280e){const _0x5a1142=_0x273874;super(),this[_0x5a1142(0x1cc)]=_0x411a5b,this['_threadCommentDataSource']=_0x19280e,this[_0x5a1142(0x180)]();}[_0x273874(0x180)](){const _0x5afebc=_0x273874;this[_0x5afebc(0x1cc)][_0x5afebc(0x1ba)]=this[_0x5afebc(0x1a7)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x32d9bc=_0x3b839c([_0x8415cd(0x0,_0x5d20e1[_0x273874(0x178)]),_0x8415cd(0x1,_0x557eb8['Inject'](_0x2fdd5d))],_0x32d9bc);var _0x1280af=Object[_0x273874(0x187)],_0x22a270=Object['getOwnPropertyDescriptor'],_0x4b6f7a=(_0x384d89,_0x408bae,_0x599c55)=>_0x408bae in _0x384d89?_0x1280af(_0x384d89,_0x408bae,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x599c55}):_0x384d89[_0x408bae]=_0x599c55,_0x1b12be=(_0x480134,_0x48896d,_0x47a8dc,_0x2b044c)=>{const _0x37e0ed=_0x273874;for(var _0x3ea76a=_0x2b044c>0x1?void 0x0:_0x2b044c?_0x22a270(_0x48896d,_0x47a8dc):_0x48896d,_0x3245a4=_0x480134[_0x37e0ed(0x177)]-0x1,_0x4e8109;_0x3245a4>=0x0;_0x3245a4--)(_0x4e8109=_0x480134[_0x3245a4])&&(_0x3ea76a=_0x4e8109(_0x3ea76a)||_0x3ea76a);return _0x3ea76a;},_0x4bfd89=(_0xf4ca4f,_0x151a80)=>(_0x22de0e,_0x2863e0)=>_0x151a80(_0x22de0e,_0x2863e0,_0xf4ca4f),_0x1e4ab6=(_0x40a861,_0x434431,_0x529b47)=>_0x4b6f7a(_0x40a861,typeof _0x434431!=_0x273874(0x1a6)?_0x434431+'':_0x434431,_0x529b47);_0x18595e['UniverThreadCommentDataSourcePlugin']=class extends _0x557eb8[_0x273874(0x1b9)]{constructor(_0x5a24db=_0xa3686b,_0x42d596,_0x4d7618){const _0x544cd6=_0x273874;super(),this[_0x544cd6(0x1ac)]=_0x5a24db,this[_0x544cd6(0x1f3)]=_0x42d596,this[_0x544cd6(0x1ad)]=_0x4d7618;const {..._0x33f505}=_0x557eb8[_0x544cd6(0x1ed)]({},_0xa3686b,this[_0x544cd6(0x1ac)]);this[_0x544cd6(0x1ad)][_0x544cd6(0x1bc)](_0x454e53,_0x33f505);}[_0x273874(0x1b5)](){[[_0x2fdd5d],[_0x32d9bc],[_0x16917b]]['forEach'](_0x109492=>{const _0x1a2196=_0x1068;this['_injector'][_0x1a2196(0x1c8)](_0x109492);});}[_0x273874(0x1ee)](){const _0x50f977=_0x273874;this[_0x50f977(0x1f3)][_0x50f977(0x1df)](_0x32d9bc),this[_0x50f977(0x1f3)][_0x50f977(0x1df)](_0x16917b);}},_0x1e4ab6(_0x18595e[_0x273874(0x1b7)],'pluginName',_0x398ac2),_0x1e4ab6(_0x18595e[_0x273874(0x1b7)],'type',_0x557eb8[_0x273874(0x176)][_0x273874(0x173)]),_0x18595e[_0x273874(0x1b7)]=_0x1b12be([_0x557eb8[_0x273874(0x1bd)](_0x22fd3d['UniverThreadCommentUIPlugin'],_0x259e13['UniverCollaborationClientPlugin'],_0x5e1cd1[_0x273874(0x19c)]),_0x4bfd89(0x1,_0x557eb8[_0x273874(0x1c6)](_0x557eb8[_0x273874(0x199)])),_0x4bfd89(0x2,_0x557eb8['IConfigService'])],_0x18595e['UniverThreadCommentDataSourcePlugin']),Object[_0x273874(0x187)](_0x18595e,Symbol['toStringTag'],{'value':_0x273874(0x185)});}));function _0x1deb(){const _0x21a943=['@univerjs/thread-comment','16148TzhWqN','Inject','updateComment','add','UserManagerService','/universer-api/comment/unit/','find','_threadCommentDataSourceService','comments','UniverThreadCommentUi','6vRoHYV','requireSession','_sessionService','stringify','code','Disposable','482720PvSnlB','userID','subscribe','Solve','saveCommentToSnapshot','HTTPService','thread-comment-data-source.config','/list','parse','_httpService','get','userId','UniverProCollaborationClient','_userService','rangeType','Reply','getUnit','@univerjs/network','content','UniverProLicense','commentUpdate$','/edit','post','getMemberID','merge','onReady','disposeWithMe','personId','242201gskNxG','Edit','_injector','getUser','resolved','object','6SCWixc','/solved','/reply','pipe','root','UNIVER_UNKNOWN','OpenOrReOpen','getOwnPropertyDescriptor','UniverInstanceType','length','IThreadCommentDataSourceService','getComment','map','Unknown','_commentService','threadId','UniverThreadComment','user','_initDataSource','customRanges','users','solved','3062574vjTGnr','Module','UniverProThreadCommentDatasource','defineProperty','format','body','function','_initUserSync','@univerjs-pro/license','addUser','7MlMmsN','dayjs','Add','slice','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','140CLCbQv','replies','1635395qtMHWX','reply','payload','createTimestamp','Injector','listComments','bufferTime','UniverLicensePlugin','replyId','YYYY/MM/DD\x20HH:mm','_init','Solved','247268TlGJUk','error','filter','delete','/universer-api/user/list','symbol','_threadCommentDataSource','values','resolveComment','rangeId','_threadCommentModel','_config','_configService','unitId','/add','UNRECOGNIZED','type','forEach','addComment','amd','onStarting','COMMENT','UniverThreadCommentDataSourcePlugin','Delete','Plugin','dataSource','@univerjs/thread-comment-ui','setConfig','DependentOn','rxjs','CustomRangeType','deleteComment','440932biyuvG','ThreadCommentModel','exports'];_0x1deb=function(){return _0x21a943;};return _0x1deb();}
|
|
1
|
+
function _0x4fc1(_0x5d6968,_0x1a016e){_0x5d6968=_0x5d6968-0x99;const _0x275932=_0x2759();let _0x4fc19a=_0x275932[_0x5d6968];return _0x4fc19a;}function _0x2759(){const _0x185be8=['onReady','_commentService','_injector','values','find','UNIVER_UNKNOWN','_threadCommentDataSource','userID','COMMENT','dayjs','users','defineProperty','UserManagerService','_threadCommentDataSourceService','UNRECOGNIZED','length','Unknown','thread-comment-data-source.config','228LpBFYm','add','@univerjs-pro/license','requireSession','getUser','Solved','solved','Inject','Edit','type','getComment','_initDataSource','error','listComments','UniverCollaborationClientPlugin','pluginName','customRanges','slice','DependentOn','object','getOwnPropertyDescriptor','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','YYYY/MM/DD\x20HH:mm','exports','@univerjs/core','9jLmBhY','650429SuxmoG','rangeType','user','OpenOrReOpen','/reply','CollaborationSessionService','setConfig','forEach','resolved','UniverProCollaborationClient','1654070UlTYYz','62RNbByq','UniverThreadCommentUi','size','/universer-api/comment/unit/','11773256IuqmGR','post','pipe','get','Disposable','getMemberID','symbol','_threadCommentModel','UniverThreadCommentUIPlugin','addComment','529716CGUKBo','UniverLicensePlugin','IConfigService','UniverThreadCommentDataSourcePlugin','100ZJqOpE','2931488IRvlef','bufferTime','createTimestamp','IThreadCommentDataSourceService','body','amd','rangeId','syncUpdateMutationToColla','_userService','_httpService','@univerjs/thread-comment-ui','updateComment','Solve','subscribe','parse','userId','Add','getUnit','UniverProThreadCommentDatasource','resolveComment','code','UniverCore','deleteComment','disposeWithMe','threadId','25yBYTdv','content','18tqUmWd','Reply','addUser','CustomRangeType','_configService','saveCommentToSnapshot','commentUpdate$','477332sEaMWp','Delete','map','@univerjs/network','/solved','/edit','root','_sessionService','reply','HTTPService','/add','@univerjs-pro/collaboration-client','Injector','parentId','filter','UniverProLicense','_initUserSync','_config','delete','UniverNetwork','personId','toStringTag','_init','replyId','comment','30894XgCily','UniverInstanceType','rxjs','replies','merge'];_0x2759=function(){return _0x185be8;};return _0x2759();}(function(_0x238c7e,_0x404d76){const _0x4b089a=_0x4fc1,_0x4ce29a=_0x238c7e();while(!![]){try{const _0x5b5a27=parseInt(_0x4b089a(0x111))/0x1*(-parseInt(_0x4b089a(0xc3))/0x2)+parseInt(_0x4b089a(0xd1))/0x3+parseInt(_0x4b089a(0xf8))/0x4*(-parseInt(_0x4b089a(0xef))/0x5)+-parseInt(_0x4b089a(0xf1))/0x6*(-parseInt(_0x4b089a(0xd6))/0x7)+parseInt(_0x4b089a(0xc7))/0x8*(-parseInt(_0x4b089a(0xb7))/0x9)+parseInt(_0x4b089a(0xd5))/0xa*(parseInt(_0x4b089a(0xc2))/0xb)+-parseInt(_0x4b089a(0x9e))/0xc*(-parseInt(_0x4b089a(0xb8))/0xd);if(_0x5b5a27===_0x404d76)break;else _0x4ce29a['push'](_0x4ce29a['shift']());}catch(_0x5d0450){_0x4ce29a['push'](_0x4ce29a['shift']());}}}(_0x2759,0xd241f),function(_0x543e33,_0x37f35d){const _0x1565dd=_0x4fc1;typeof exports==_0x1565dd(0xb1)&&typeof module<'u'?_0x37f35d(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[_0x1565dd(0xdb)]?define([_0x1565dd(0xb5),_0x1565dd(0x103),_0x1565dd(0xa0),_0x1565dd(0xb6),_0x1565dd(0xe0),'@univerjs/thread-comment',_0x1565dd(0x113),_0x1565dd(0xfb)],_0x37f35d):(_0x543e33=typeof globalThis<'u'?globalThis:_0x543e33||self,_0x37f35d(_0x543e33[_0x1565dd(0xe8)]={},_0x543e33[_0x1565dd(0xc1)],_0x543e33[_0x1565dd(0x107)],_0x543e33[_0x1565dd(0xeb)],_0x543e33[_0x1565dd(0xc4)],_0x543e33['UniverThreadComment'],_0x543e33[_0x1565dd(0x113)],_0x543e33[_0x1565dd(0x10b)]));}(this,function(_0x516af5,_0x51f5d2,_0x510c03,_0x4ce256,_0x29c832,_0x49d2c9,_0x4065d9,_0x387da3){'use strict';const _0x37ea4f=_0x4fc1;const _0x34150e=_0x37ea4f(0xb3);var _0x155c68=(_0x1f58fb=>(_0x1f58fb[_0x1f58fb[_0x37ea4f(0xbb)]=0x0]=_0x37ea4f(0xbb),_0x1f58fb[_0x1f58fb[_0x37ea4f(0xa3)]=0x1]=_0x37ea4f(0xa3),_0x1f58fb[_0x1f58fb[_0x37ea4f(0x9a)]=-0x1]='UNRECOGNIZED',_0x1f58fb))(_0x155c68||{}),_0x236599=(_0x5444f6=>(_0x5444f6[_0x5444f6[_0x37ea4f(0x9c)]=0x0]=_0x37ea4f(0x9c),_0x5444f6[_0x5444f6[_0x37ea4f(0xe6)]=0x1]='Add',_0x5444f6[_0x5444f6[_0x37ea4f(0xf2)]=0x2]=_0x37ea4f(0xf2),_0x5444f6[_0x5444f6[_0x37ea4f(0xa6)]=0x3]=_0x37ea4f(0xa6),_0x5444f6[_0x5444f6[_0x37ea4f(0xf9)]=0x4]=_0x37ea4f(0xf9),_0x5444f6[_0x5444f6[_0x37ea4f(0xe2)]=0x5]='Solve',_0x5444f6[_0x5444f6[_0x37ea4f(0x9a)]=-0x1]=_0x37ea4f(0x9a),_0x5444f6))(_0x236599||{});const _0x3eb4e5=_0x2e20bc=>_0x4ce256[_0x37ea4f(0x11f)](new Date(+_0x2e20bc))['format'](_0x37ea4f(0xb4)),_0x343f27=async(_0x139df6,_0x281d54)=>{const _0x269ad4=_0x37ea4f,_0x3f6add=_0x139df6[_0x269ad4(0xca)](_0x4ce256[_0x269ad4(0x122)]),_0x4f6068=_0x139df6[_0x269ad4(0xca)](_0x387da3[_0x269ad4(0x101)]);_0x281d54['forEach'](_0x2fe755=>{const _0x151cf1=_0x269ad4;_0x3f6add[_0x151cf1(0xa2)](_0x2fe755)&&_0x281d54[_0x151cf1(0x10a)](_0x2fe755);}),_0x281d54[_0x269ad4(0xc5)]&&(await _0x4f6068['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x281d54]}}))[_0x269ad4(0xda)]['users'][_0x269ad4(0xbf)](_0x1028e1=>{_0x1028e1&&_0x3f6add['addUser'](_0x1028e1);});};var _0x3f0d8d=Object['getOwnPropertyDescriptor'],_0x3c29d4=(_0x4b13c2,_0x55c5cc,_0x49e8fb,_0x2c90f5)=>{for(var _0x428d80=_0x2c90f5>0x1?void 0x0:_0x2c90f5?_0x3f0d8d(_0x55c5cc,_0x49e8fb):_0x55c5cc,_0x4492bd=_0x4b13c2['length']-0x1,_0x74ad8d;_0x4492bd>=0x0;_0x4492bd--)(_0x74ad8d=_0x4b13c2[_0x4492bd])&&(_0x428d80=_0x74ad8d(_0x428d80)||_0x428d80);return _0x428d80;},_0xf68162=(_0x1515d9,_0x2e9343)=>(_0x3665e0,_0x5148c6)=>_0x2e9343(_0x3665e0,_0x5148c6,_0x1515d9);let _0x26e6b0=class extends _0x4ce256[_0x37ea4f(0xcb)]{constructor(_0x579203,_0x3c69f0,_0x2d8829,_0x27033d){const _0x6c2a7c=_0x37ea4f;super(),this[_0x6c2a7c(0x117)]=_0x579203,this[_0x6c2a7c(0xce)]=_0x3c69f0,this[_0x6c2a7c(0xde)]=_0x2d8829,this[_0x6c2a7c(0x118)]=_0x27033d,this[_0x6c2a7c(0x10e)](),this[_0x6c2a7c(0x108)]();}['_initUserSync'](){const _0x5e03c5=_0x37ea4f;this[_0x5e03c5(0xed)](this[_0x5e03c5(0xce)][_0x5e03c5(0xf7)][_0x5e03c5(0xc9)](_0x4065d9[_0x5e03c5(0xd7)](0x10))['subscribe'](_0x2fd4b0=>{const _0x35c304=_0x5e03c5,_0x63096=new Set();_0x2fd4b0['forEach'](_0x4fe285=>{const _0x2f803d=_0x4fc1;if(_0x4fe285[_0x2f803d(0xa7)]===_0x2f803d(0x9f)){const _0x3b58c5=_0x4fe285['payload'][_0x2f803d(0x10c)];_0x63096['add'](_0x3b58c5);}}),_0x343f27(this[_0x35c304(0x118)],_0x63096);}));}[_0x37ea4f(0x10e)](){const _0xc7b7c5=_0x37ea4f;this[_0xc7b7c5(0xed)](this[_0xc7b7c5(0x117)][_0xc7b7c5(0xf7)][_0xc7b7c5(0xe3)](async _0x5c0f05=>{const _0x33806d=_0xc7b7c5;var _0x4830a2,_0x117c0a,_0x363158,_0x58c8d2;const _0x56e55e=(_0x4830a2=this[_0x33806d(0xce)][_0x33806d(0xe7)](_0x5c0f05['unitId'])[_0x33806d(0x11a)](_0x26704c=>_0x26704c[_0x33806d(0xee)]===_0x5c0f05[_0x33806d(0xee)]))==null?void 0x0:_0x4830a2['root'];if(!_0x56e55e)return;const {unitId:_0x132b42,subUnitId:_0xceb18b}=_0x56e55e;switch(_0x5c0f05[_0x33806d(0xba)]&&this['_userService'][_0x33806d(0xf3)](_0x5c0f05['user']),_0x5c0f05[_0x33806d(0xa7)]){case _0x236599[_0x33806d(0xe6)]:break;case _0x236599[_0x33806d(0xf2)]:{this[_0x33806d(0xce)][_0x33806d(0xd0)](_0x132b42,_0xceb18b,{'unitId':_0x132b42,'subUnitId':_0xceb18b,'ref':'','id':_0x5c0f05['replyId'],'dT':_0x3eb4e5(+_0x5c0f05['createTimestamp']),'threadId':_0x5c0f05[_0x33806d(0xee)],'personId':(_0x363158=(_0x117c0a=_0x5c0f05[_0x33806d(0xba)])==null?void 0x0:_0x117c0a[_0x33806d(0x11d)])!=null?_0x363158:_0x5c0f05[_0x33806d(0xe5)],'text':JSON[_0x33806d(0xe4)](_0x5c0f05[_0x33806d(0xf0)]),'parentId':_0x56e55e['id']});break;}case _0x236599[_0x33806d(0xf9)]:{const _0x2d802d=this[_0x33806d(0xce)][_0x33806d(0xa8)](_0x132b42,_0xceb18b,_0x5c0f05['replyId']);_0x2d802d&&_0x2d802d[_0x33806d(0x105)]&&this[_0x33806d(0xce)][_0x33806d(0xec)](_0x132b42,_0xceb18b,_0x5c0f05['replyId']);break;}case _0x236599['Edit']:{this['_threadCommentModel'][_0x33806d(0xe1)](_0x132b42,_0xceb18b,{'commentId':_0x5c0f05[_0x33806d(0x10f)],'text':JSON['parse'](_0x5c0f05[_0x33806d(0xf0)])});break;}case _0x236599[_0x33806d(0xe2)]:{const _0x43c872=(_0x58c8d2=this['_threadCommentModel'][_0x33806d(0xe7)](_0x5c0f05['unitId'])[_0x33806d(0x11a)](_0x6f1a58=>_0x6f1a58[_0x33806d(0xee)]===_0x5c0f05[_0x33806d(0xee)]))==null?void 0x0:_0x58c8d2[_0x33806d(0xfe)];_0x43c872&&this[_0x33806d(0xce)][_0x33806d(0xe9)](_0x132b42,_0xceb18b,_0x43c872['id'],_0x5c0f05['solved']===_0x155c68[_0x33806d(0xa3)]);break;}}}));}};_0x26e6b0=_0x3c29d4([_0xf68162(0x0,_0x4ce256['Inject'](_0x51f5d2['CommentService'])),_0xf68162(0x1,_0x4ce256[_0x37ea4f(0xa5)](_0x49d2c9['ThreadCommentModel'])),_0xf68162(0x2,_0x4ce256[_0x37ea4f(0xa5)](_0x4ce256[_0x37ea4f(0x122)])),_0xf68162(0x3,_0x4ce256[_0x37ea4f(0xa5)](_0x4ce256[_0x37ea4f(0x104)]))],_0x26e6b0);const _0x580a78=_0x37ea4f(0x9d),_0x37d64c={};var _0x57e98b=Object[_0x37ea4f(0xb2)],_0x6a96ca=(_0x523315,_0x15e13d,_0x459813,_0x20acb9)=>{const _0x560055=_0x37ea4f;for(var _0x58290e=_0x20acb9>0x1?void 0x0:_0x20acb9?_0x57e98b(_0x15e13d,_0x459813):_0x15e13d,_0x388795=_0x523315[_0x560055(0x9b)]-0x1,_0xdf1b25;_0x388795>=0x0;_0x388795--)(_0xdf1b25=_0x523315[_0x388795])&&(_0x58290e=_0xdf1b25(_0x58290e)||_0x58290e);return _0x58290e;},_0x5e2716=(_0x555545,_0x3fab07)=>(_0x49e4a4,_0x52b85a)=>_0x3fab07(_0x49e4a4,_0x52b85a,_0x555545);function _0x30fced(_0x46ae84,_0x87ea5b){const _0x56e83f=_0x37ea4f,_0x5a23a6=_0x46ae84[_0x56e83f(0x114)][0x0];return{..._0x87ea5b,'id':_0x5a23a6['replyId'],'resolved':_0x46ae84[_0x56e83f(0xa4)]===0x1,'dT':_0x3eb4e5(_0x5a23a6[_0x56e83f(0xd8)]),'personId':_0x5a23a6[_0x56e83f(0xe5)],'threadId':_0x5a23a6[_0x56e83f(0xee)]};}function _0x369def(_0x164578,_0x518ea2,_0x4084d3){const _0x2d08a7=_0x37ea4f;var _0x589ead,_0xfad0cf;if(((_0xfad0cf=(_0x589ead=_0x164578==null?void 0x0:_0x164578[_0x2d08a7(0x114)])==null?void 0x0:_0x589ead[_0x2d08a7(0x9b)])!=null?_0xfad0cf:0x0)>0x0){const _0x208b33=(_0x475bb7,_0x739b25)=>({'id':_0x475bb7[_0x2d08a7(0x10f)],'threadId':_0x475bb7[_0x2d08a7(0xee)],'dT':_0x3eb4e5(_0x475bb7['createTimestamp']),'personId':_0x475bb7['userId'],'resolved':_0x164578[_0x2d08a7(0xa4)]===_0x155c68[_0x2d08a7(0xa3)],'unitId':_0x518ea2,'subUnitId':_0x4084d3,'text':JSON[_0x2d08a7(0xe4)](_0x475bb7[_0x2d08a7(0xf0)]),'parentId':_0x739b25}),_0xf2bf5b=_0x208b33(_0x164578[_0x2d08a7(0x114)][0x0]);return{..._0xf2bf5b,'children':_0x164578[_0x2d08a7(0x114)][_0x2d08a7(0xaf)](0x1)['map'](_0x258a87=>_0x208b33(_0x258a87,_0xf2bf5b['id']))};}return null;}let _0x4053b8=class{constructor(_0x3e52f9,_0x29bbd4,_0x4ddc7a){const _0xe25b96=_0x37ea4f;this['_httpService']=_0x3e52f9,this[_0xe25b96(0xde)]=_0x29bbd4,this[_0xe25b96(0xff)]=_0x4ddc7a;}async[_0x37ea4f(0xd0)](_0x340b9a){const _0x5eeb7b=_0x37ea4f;var _0x3fc2d4,_0x819e66;const {parentId:_0x574289,unitId:_0x524cf9,text:_0x3c24ed,threadId:_0xd3a7bf}=_0x340b9a,_0x1c687c=(_0x819e66=(_0x3fc2d4=_0x3c24ed[_0x5eeb7b(0xae)])==null?void 0x0:_0x3fc2d4['filter'](_0x119cc6=>_0x119cc6[_0x5eeb7b(0xb9)]===_0x4ce256[_0x5eeb7b(0xf4)][_0x5eeb7b(0x11e)])[_0x5eeb7b(0xfa)](_0x3be7b3=>_0x3be7b3[_0x5eeb7b(0xdc)]))!=null?_0x819e66:[],_0x2fb561=JSON['stringify'](_0x3c24ed),_0x5be694=(await this[_0x5eeb7b(0xff)][_0x5eeb7b(0xa1)](_0x524cf9))[_0x5eeb7b(0xcc)]();if(_0x574289){const _0x762d35={'memberId':_0x5be694,'unitId':_0x524cf9,'content':_0x2fb561,'mention':_0x1c687c,'threadId':_0xd3a7bf},_0x79cf0f=(await this[_0x5eeb7b(0xdf)][_0x5eeb7b(0xc8)]('/universer-api/comment/unit/'+_0x524cf9+_0x5eeb7b(0xbc),{'body':_0x762d35}))[_0x5eeb7b(0xda)][_0x5eeb7b(0x100)];return{..._0x340b9a,'id':_0x79cf0f[_0x5eeb7b(0x10f)],'dT':_0x4ce256[_0x5eeb7b(0x11f)](+_0x79cf0f[_0x5eeb7b(0xd8)])['format'](_0x5eeb7b(0xb4)),'personId':_0x79cf0f[_0x5eeb7b(0xe5)]};}else{const _0x5441fa={'memberId':_0x5be694,'unitId':_0x524cf9,'content':_0x2fb561,'mention':_0x1c687c},_0x571883=await this[_0x5eeb7b(0xdf)][_0x5eeb7b(0xc8)](_0x5eeb7b(0xc6)+_0x524cf9+_0x5eeb7b(0x102),{'body':_0x5441fa});return _0x30fced(_0x571883[_0x5eeb7b(0xda)][_0x5eeb7b(0x110)],_0x340b9a);}}async[_0x37ea4f(0xe1)](_0x107d41){const _0x4b1443=_0x37ea4f;var _0x24d404,_0x217c6d;const {text:_0x48828e,unitId:_0x11e28b}=_0x107d41,_0x166fad=(_0x217c6d=(_0x24d404=_0x48828e[_0x4b1443(0xae)])==null?void 0x0:_0x24d404[_0x4b1443(0x106)](_0x51e84b=>_0x51e84b[_0x4b1443(0xb9)]===_0x4ce256[_0x4b1443(0xf4)][_0x4b1443(0x11e)])[_0x4b1443(0xfa)](_0x3ef1b2=>_0x3ef1b2[_0x4b1443(0xdc)]))!=null?_0x217c6d:[],_0xd5c04c=JSON['stringify'](_0x48828e),_0x15670b=_0x107d41[_0x4b1443(0xee)],_0x4667b1=_0x107d41['id'],_0x17f130={'memberId':(await this[_0x4b1443(0xff)]['requireSession'](_0x11e28b))[_0x4b1443(0xcc)](),'unitId':_0x11e28b,'threadId':_0x15670b,'mention':_0x166fad,'content':_0xd5c04c,'replyId':_0x4667b1},_0x312441=await this['_httpService'][_0x4b1443(0xc8)](_0x4b1443(0xc6)+_0x11e28b+_0x4b1443(0xfd),{'body':_0x17f130});return!_0x312441[_0x4b1443(0xda)][_0x4b1443(0xaa)]||_0x312441[_0x4b1443(0xda)]['error'][_0x4b1443(0xea)]===0x1;}async[_0x37ea4f(0xe9)](_0x591ec5){const _0x35d622=_0x37ea4f,{unitId:_0x2f08b7}=_0x591ec5,_0x21b103=_0x591ec5['threadId'],_0xc5456f={'memberId':this[_0x35d622(0xde)]['getCurrentUser']()['userID'],'unitId':_0x2f08b7,'threadId':_0x21b103,'solved':_0x591ec5[_0x35d622(0xc0)]?_0x155c68[_0x35d622(0xa3)]:_0x155c68['OpenOrReOpen']},_0x402679=await this['_httpService'][_0x35d622(0xc8)](_0x35d622(0xc6)+_0x2f08b7+_0x35d622(0xfc),{'body':_0xc5456f});return!_0x402679[_0x35d622(0xda)][_0x35d622(0xaa)]||_0x402679[_0x35d622(0xda)]['error'][_0x35d622(0xea)]===0x1;}async[_0x37ea4f(0xec)](_0x910d52,_0xacdec1,_0x15a141,_0x7f2675){const _0x187a28=_0x37ea4f,_0x52b1e7={'memberId':(await this[_0x187a28(0xff)][_0x187a28(0xa1)](_0x910d52))[_0x187a28(0xcc)](),'threadId':_0x15a141,'replyId':_0x7f2675,'unitId':_0x910d52},_0x3bb2ac=await this[_0x187a28(0xdf)][_0x187a28(0xc8)](_0x187a28(0xc6)+_0x910d52+'/delete',{'body':_0x52b1e7});return!_0x3bb2ac['body'][_0x187a28(0xaa)]||_0x3bb2ac['body'][_0x187a28(0xaa)]['code']===0x1;}async[_0x37ea4f(0xab)](_0xd93a2,_0x5decac,_0x59f64a){const _0x581666=_0x37ea4f,_0x4befd8={'unitId':_0xd93a2,'threadId':_0x59f64a},_0x53faa7=await this[_0x581666(0xdf)][_0x581666(0xc8)](_0x581666(0xc6)+_0xd93a2+'/list',{'body':_0x4befd8}),_0xc9ed05=_0x59f64a[_0x581666(0xfa)](_0x3d5e77=>_0x369def(_0x53faa7['body']['comments'][_0x3d5e77],_0xd93a2,_0x5decac))[_0x581666(0x106)](Boolean);return Object[_0x581666(0x119)](_0x53faa7[_0x581666(0xda)][_0x581666(0x120)])['forEach'](_0x15ae1b=>{const _0x3ed8d5=_0x581666;this['_userService'][_0x3ed8d5(0xf3)](_0x15ae1b);}),_0xc9ed05;}[_0x37ea4f(0xf6)](_0x4dbc7b){return{'id':_0x4dbc7b['id'],'threadId':_0x4dbc7b['threadId'],'ref':_0x4dbc7b['ref']};}};_0x4053b8=_0x6a96ca([_0x5e2716(0x0,_0x4ce256[_0x37ea4f(0xa5)](_0x387da3[_0x37ea4f(0x101)])),_0x5e2716(0x1,_0x4ce256[_0x37ea4f(0xa5)](_0x4ce256['UserManagerService'])),_0x5e2716(0x2,_0x4ce256[_0x37ea4f(0xa5)](_0x51f5d2[_0x37ea4f(0xbd)]))],_0x4053b8);var _0x37fb3a=Object[_0x37ea4f(0xb2)],_0x10d955=(_0x2b6d32,_0x1408da,_0x3fbb21,_0x529bc0)=>{for(var _0x2b6f3c=_0x529bc0>0x1?void 0x0:_0x529bc0?_0x37fb3a(_0x1408da,_0x3fbb21):_0x1408da,_0x739980=_0x2b6d32['length']-0x1,_0x2938fd;_0x739980>=0x0;_0x739980--)(_0x2938fd=_0x2b6d32[_0x739980])&&(_0x2b6f3c=_0x2938fd(_0x2b6f3c)||_0x2b6f3c);return _0x2b6f3c;},_0x5276a7=(_0x5c3cc9,_0xc5f69f)=>(_0x340763,_0x4968f3)=>_0xc5f69f(_0x340763,_0x4968f3,_0x5c3cc9);let _0x2a24cb=class extends _0x4ce256[_0x37ea4f(0xcb)]{constructor(_0xad4cd2,_0x39901c){const _0x115244=_0x37ea4f;super(),this[_0x115244(0x99)]=_0xad4cd2,this[_0x115244(0x11c)]=_0x39901c,this[_0x115244(0xa9)]();}[_0x37ea4f(0xa9)](){const _0x1a8e75=_0x37ea4f;this[_0x1a8e75(0x99)]['dataSource']=this[_0x1a8e75(0x11c)],this[_0x1a8e75(0x99)][_0x1a8e75(0xdd)]=!0x1;}};_0x2a24cb=_0x10d955([_0x5276a7(0x0,_0x49d2c9[_0x37ea4f(0xd9)]),_0x5276a7(0x1,_0x4ce256['Inject'](_0x4053b8))],_0x2a24cb);var _0x64b0f1=Object[_0x37ea4f(0x121)],_0x1dfc3a=Object[_0x37ea4f(0xb2)],_0xa26552=(_0x5a22fa,_0x21ba51,_0x48659b)=>_0x21ba51 in _0x5a22fa?_0x64b0f1(_0x5a22fa,_0x21ba51,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x48659b}):_0x5a22fa[_0x21ba51]=_0x48659b,_0x333fb1=(_0x32a523,_0x4640fe,_0x39123b,_0x91f368)=>{const _0x3f7a44=_0x37ea4f;for(var _0x587985=_0x91f368>0x1?void 0x0:_0x91f368?_0x1dfc3a(_0x4640fe,_0x39123b):_0x4640fe,_0x1120f9=_0x32a523[_0x3f7a44(0x9b)]-0x1,_0x411686;_0x1120f9>=0x0;_0x1120f9--)(_0x411686=_0x32a523[_0x1120f9])&&(_0x587985=_0x411686(_0x587985)||_0x587985);return _0x587985;},_0x14e06e=(_0x2fdb88,_0x20ef31)=>(_0x4f9633,_0x6150c)=>_0x20ef31(_0x4f9633,_0x6150c,_0x2fdb88),_0x146dfb=(_0x5762bc,_0x1fd021,_0x24627f)=>_0xa26552(_0x5762bc,typeof _0x1fd021!=_0x37ea4f(0xcd)?_0x1fd021+'':_0x1fd021,_0x24627f);_0x516af5['UniverThreadCommentDataSourcePlugin']=class extends _0x4ce256['Plugin']{constructor(_0x7efeae=_0x37d64c,_0x5a19b7,_0x420b89){const _0x3fc89e=_0x37ea4f;super(),this[_0x3fc89e(0x109)]=_0x7efeae,this[_0x3fc89e(0x118)]=_0x5a19b7,this['_configService']=_0x420b89;const {..._0x41c07c}=_0x4ce256[_0x3fc89e(0x115)]({},_0x37d64c,this['_config']);this[_0x3fc89e(0xf5)][_0x3fc89e(0xbe)](_0x580a78,_0x41c07c);}['onStarting'](){const _0x5b1990=_0x37ea4f;[[_0x4053b8],[_0x2a24cb],[_0x26e6b0]][_0x5b1990(0xbf)](_0x4fe094=>{this['_injector']['add'](_0x4fe094);});}[_0x37ea4f(0x116)](){const _0x29bc7c=_0x37ea4f;this['_injector'][_0x29bc7c(0xca)](_0x2a24cb),this[_0x29bc7c(0x118)][_0x29bc7c(0xca)](_0x26e6b0);}},_0x146dfb(_0x516af5[_0x37ea4f(0xd4)],_0x37ea4f(0xad),_0x34150e),_0x146dfb(_0x516af5[_0x37ea4f(0xd4)],_0x37ea4f(0xa7),_0x4ce256[_0x37ea4f(0x112)][_0x37ea4f(0x11b)]),_0x516af5[_0x37ea4f(0xd4)]=_0x333fb1([_0x4ce256[_0x37ea4f(0xb0)](_0x29c832[_0x37ea4f(0xcf)],_0x51f5d2[_0x37ea4f(0xac)],_0x510c03[_0x37ea4f(0xd2)]),_0x14e06e(0x1,_0x4ce256[_0x37ea4f(0xa5)](_0x4ce256[_0x37ea4f(0x104)])),_0x14e06e(0x2,_0x4ce256[_0x37ea4f(0xd3)])],_0x516af5[_0x37ea4f(0xd4)]),Object[_0x37ea4f(0x121)](_0x516af5,Symbol[_0x37ea4f(0x10d)],{'value':'Module'});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.3-insiders.20260131-b9b8805",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.15.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/thread-comment": "0.15.2",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.15.3-insiders.20260131-b9b8805",
|
|
49
|
+
"@univerjs-pro/license": "0.15.3-insiders.20260131-b9b8805",
|
|
50
|
+
"@univerjs/core": "0.15.3-insiders.20260131-b9b8805",
|
|
51
|
+
"@univerjs/thread-comment": "0.15.3-insiders.20260131-b9b8805",
|
|
53
52
|
"@univerjs/protocol": "0.1.48",
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.15.
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.15.3-insiders.20260131-b9b8805",
|
|
54
|
+
"@univerjs/network": "0.15.3-insiders.20260131-b9b8805"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
59
|
"vite": "^7.3.1",
|
|
60
|
-
"vitest": "^4.0.
|
|
61
|
-
"@univerjs-infra/shared": "0.15.
|
|
60
|
+
"vitest": "^4.0.18",
|
|
61
|
+
"@univerjs-infra/shared": "0.15.3"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|