@univerjs-pro/thread-comment-datasource 0.15.2 → 0.15.3-insiders.20260131-cbd5fac
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 _0x515c7c=_0x52f0;(function(_0x55d15b,_0xcca2b2){const _0x285ef2=_0x52f0,_0x1b3e3c=_0x55d15b();while(!![]){try{const _0x189da8=parseInt(_0x285ef2(0x110))/0x1*(-parseInt(_0x285ef2(0xbf))/0x2)+-parseInt(_0x285ef2(0xdc))/0x3+-parseInt(_0x285ef2(0xc4))/0x4+parseInt(_0x285ef2(0xeb))/0x5+-parseInt(_0x285ef2(0xf2))/0x6*(parseInt(_0x285ef2(0x109))/0x7)+parseInt(_0x285ef2(0xc8))/0x8*(-parseInt(_0x285ef2(0x112))/0x9)+parseInt(_0x285ef2(0x105))/0xa;if(_0x189da8===_0xcca2b2)break;else _0x1b3e3c['push'](_0x1b3e3c['shift']());}catch(_0x2ae01d){_0x1b3e3c['push'](_0x1b3e3c['shift']());}}}(_0xc903,0x4f771));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x515c7c(0x12a);var I=(_0x49b38a=>(_0x49b38a[_0x49b38a['OpenOrReOpen']=0x0]=_0x515c7c(0xc7),_0x49b38a[_0x49b38a['Solved']=0x1]=_0x515c7c(0x11d),_0x49b38a[_0x49b38a[_0x515c7c(0x126)]=-0x1]=_0x515c7c(0x126),_0x49b38a))(I||{}),v=(_0x4583f7=>(_0x4583f7[_0x4583f7[_0x515c7c(0xf8)]=0x0]=_0x515c7c(0xf8),_0x4583f7[_0x4583f7[_0x515c7c(0xbc)]=0x1]='Add',_0x4583f7[_0x4583f7[_0x515c7c(0xf4)]=0x2]=_0x515c7c(0xf4),_0x4583f7[_0x4583f7[_0x515c7c(0xcf)]=0x3]=_0x515c7c(0xcf),_0x4583f7[_0x4583f7[_0x515c7c(0xf7)]=0x4]='Delete',_0x4583f7[_0x4583f7[_0x515c7c(0x124)]=0x5]=_0x515c7c(0x124),_0x4583f7[_0x4583f7['UNRECOGNIZED']=-0x1]=_0x515c7c(0x126),_0x4583f7))(v||{});const f=_0x22862e=>c[_0x515c7c(0xea)](new Date(+_0x22862e))[_0x515c7c(0xec)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x15709c,_0x13504d)=>{const _0x15a69e=_0x515c7c,_0x1740b2=_0x15709c[_0x15a69e(0x12c)](c[_0x15a69e(0x113)]),_0xb7924e=_0x15709c['get'](P[_0x15a69e(0xef)]);_0x13504d[_0x15a69e(0xe8)](_0x481e77=>{const _0x3100d7=_0x15a69e;_0x1740b2[_0x3100d7(0xf6)](_0x481e77)&&_0x13504d[_0x3100d7(0x101)](_0x481e77);}),_0x13504d[_0x15a69e(0x10b)]&&(await _0xb7924e[_0x15a69e(0x12c)](_0x15a69e(0xe5),{'params':{'userIDs':[..._0x13504d]}}))[_0x15a69e(0x115)][_0x15a69e(0xbe)][_0x15a69e(0xe8)](_0x1f2f87=>{const _0x459b7e=_0x15a69e;_0x1f2f87&&_0x1740b2[_0x459b7e(0x12f)](_0x1f2f87);});};var $=Object[_0x515c7c(0x12d)],E=(_0x20e9e4,_0x299435,_0x3096af,_0x5aa3ef)=>{const _0x4a7f24=_0x515c7c;for(var _0x38bc47=_0x5aa3ef>0x1?void 0x0:_0x5aa3ef?$(_0x299435,_0x3096af):_0x299435,_0x4919d1=_0x20e9e4[_0x4a7f24(0xf3)]-0x1,_0x36d579;_0x4919d1>=0x0;_0x4919d1--)(_0x36d579=_0x20e9e4[_0x4919d1])&&(_0x38bc47=_0x36d579(_0x38bc47)||_0x38bc47);return _0x38bc47;},S=(_0x25e3f5,_0x11c1bd)=>(_0x4983f0,_0xb218d4)=>_0x11c1bd(_0x4983f0,_0xb218d4,_0x25e3f5);let _=class extends c[_0x515c7c(0xc5)]{constructor(_0x517ac8,_0x5d443d,_0x3dbe27,_0x44fc46){const _0x264de3=_0x515c7c;super(),this[_0x264de3(0x11a)]=_0x517ac8,this[_0x264de3(0xc6)]=_0x5d443d,this['_userService']=_0x3dbe27,this[_0x264de3(0x127)]=_0x44fc46,this['_init'](),this['_initUserSync']();}['_initUserSync'](){const _0x59fd11=_0x515c7c;this[_0x59fd11(0xe0)](this['_threadCommentModel']['commentUpdate$']['pipe'](j[_0x59fd11(0x11c)](0x10))[_0x59fd11(0xe9)](_0x2a431f=>{const _0xd13d71=_0x59fd11,_0x1d5f4e=new Set();_0x2a431f[_0xd13d71(0xe8)](_0xb4a44b=>{const _0x42e068=_0xd13d71;if(_0xb4a44b['type']===_0x42e068(0xed)){const _0x43dd53=_0xb4a44b[_0x42e068(0x11f)][_0x42e068(0xe1)];_0x1d5f4e['add'](_0x43dd53);}}),R(this['_injector'],_0x1d5f4e);}));}[_0x515c7c(0x100)](){const _0x420fe7=_0x515c7c;this[_0x420fe7(0xe0)](this[_0x420fe7(0x11a)]['commentUpdate$'][_0x420fe7(0xe9)](async _0x44a0ec=>{const _0x2b8083=_0x420fe7;var _0x3dd865,_0x20d2e5,_0x2d5266,_0x430762;const _0x1d7337=(_0x3dd865=this[_0x2b8083(0xc6)][_0x2b8083(0xde)](_0x44a0ec[_0x2b8083(0x125)])[_0x2b8083(0xdd)](_0x11ca50=>_0x11ca50[_0x2b8083(0x11e)]===_0x44a0ec[_0x2b8083(0x11e)]))==null?void 0x0:_0x3dd865['root'];if(!_0x1d7337)return;const {unitId:_0x3de028,subUnitId:_0x43454f}=_0x1d7337;switch(_0x44a0ec['user']&&this[_0x2b8083(0x129)][_0x2b8083(0x12f)](_0x44a0ec[_0x2b8083(0x123)]),_0x44a0ec[_0x2b8083(0xd6)]){case v[_0x2b8083(0xbc)]:break;case v[_0x2b8083(0xf4)]:{this[_0x2b8083(0xc6)][_0x2b8083(0xce)](_0x3de028,_0x43454f,{'unitId':_0x3de028,'subUnitId':_0x43454f,'ref':'','id':_0x44a0ec[_0x2b8083(0xcb)],'dT':f(+_0x44a0ec[_0x2b8083(0xdb)]),'threadId':_0x44a0ec[_0x2b8083(0x11e)],'personId':(_0x2d5266=(_0x20d2e5=_0x44a0ec['user'])==null?void 0x0:_0x20d2e5[_0x2b8083(0xfd)])!=null?_0x2d5266:_0x44a0ec[_0x2b8083(0xd8)],'text':JSON[_0x2b8083(0x117)](_0x44a0ec[_0x2b8083(0xba)]),'parentId':_0x1d7337['id']});break;}case v[_0x2b8083(0xf7)]:{const _0x10c137=this[_0x2b8083(0xc6)][_0x2b8083(0xd9)](_0x3de028,_0x43454f,_0x44a0ec[_0x2b8083(0xcb)]);_0x10c137&&_0x10c137[_0x2b8083(0xc3)]&&this['_threadCommentModel'][_0x2b8083(0x130)](_0x3de028,_0x43454f,_0x44a0ec['replyId']);break;}case v[_0x2b8083(0xcf)]:{this['_threadCommentModel'][_0x2b8083(0xe7)](_0x3de028,_0x43454f,{'commentId':_0x44a0ec[_0x2b8083(0xcb)],'text':JSON[_0x2b8083(0x117)](_0x44a0ec[_0x2b8083(0xba)])});break;}case v[_0x2b8083(0x124)]:{const _0x5dacc1=(_0x430762=this[_0x2b8083(0xc6)][_0x2b8083(0xde)](_0x44a0ec[_0x2b8083(0x125)])['find'](_0x866a9c=>_0x866a9c[_0x2b8083(0x11e)]===_0x44a0ec[_0x2b8083(0x11e)]))==null?void 0x0:_0x430762[_0x2b8083(0x128)];_0x5dacc1&&this['_threadCommentModel']['resolveComment'](_0x3de028,_0x43454f,_0x5dacc1['id'],_0x44a0ec[_0x2b8083(0x116)]===I[_0x2b8083(0x11d)]);break;}}}));}};function _0x52f0(_0x1b37a2,_0x120604){_0x1b37a2=_0x1b37a2-0xb9;const _0xc9034f=_0xc903();let _0x52f0d6=_0xc9034f[_0x1b37a2];return _0x52f0d6;}_=E([S(0x0,c[_0x515c7c(0xf5)](b[_0x515c7c(0x10f)])),S(0x1,c[_0x515c7c(0xf5)](M[_0x515c7c(0xe6)])),S(0x2,c[_0x515c7c(0xf5)](c[_0x515c7c(0x113)])),S(0x3,c[_0x515c7c(0xf5)](c[_0x515c7c(0x10d)]))],_);const q=_0x515c7c(0x122),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x2fe1e0,_0x4b0c71,_0x39b7b2,_0x5dfc6f)=>{for(var _0x1671e6=_0x5dfc6f>0x1?void 0x0:_0x5dfc6f?A(_0x4b0c71,_0x39b7b2):_0x4b0c71,_0x5e0a4e=_0x2fe1e0['length']-0x1,_0x1eb6c5;_0x5e0a4e>=0x0;_0x5e0a4e--)(_0x1eb6c5=_0x2fe1e0[_0x5e0a4e])&&(_0x1671e6=_0x1eb6c5(_0x1671e6)||_0x1671e6);return _0x1671e6;},C=(_0xbfac69,_0x468923)=>(_0x772704,_0x49ded4)=>_0x468923(_0x772704,_0x49ded4,_0xbfac69);function Y(_0x12479b,_0x3c0be9){const _0x50673a=_0x515c7c,_0x21faf4=_0x12479b[_0x50673a(0xcc)][0x0];return{..._0x3c0be9,'id':_0x21faf4[_0x50673a(0xcb)],'resolved':_0x12479b['solved']===0x1,'dT':f(_0x21faf4[_0x50673a(0xdb)]),'personId':_0x21faf4[_0x50673a(0xd8)],'threadId':_0x21faf4[_0x50673a(0x11e)]};}function G(_0x422588,_0x42714d,_0x38bbef){const _0x8086ca=_0x515c7c;var _0x5655ce,_0x17aa96;if(((_0x17aa96=(_0x5655ce=_0x422588==null?void 0x0:_0x422588[_0x8086ca(0xcc)])==null?void 0x0:_0x5655ce[_0x8086ca(0xf3)])!=null?_0x17aa96:0x0)>0x0){const _0x53fcd7=(_0x2da55c,_0x35053e)=>({'id':_0x2da55c[_0x8086ca(0xcb)],'threadId':_0x2da55c[_0x8086ca(0x11e)],'dT':f(_0x2da55c[_0x8086ca(0xdb)]),'personId':_0x2da55c[_0x8086ca(0xd8)],'resolved':_0x422588[_0x8086ca(0x116)]===I[_0x8086ca(0x11d)],'unitId':_0x42714d,'subUnitId':_0x38bbef,'text':JSON[_0x8086ca(0x117)](_0x2da55c[_0x8086ca(0xba)]),'parentId':_0x35053e}),_0x39d6ae=_0x53fcd7(_0x422588[_0x8086ca(0xcc)][0x0]);return{..._0x39d6ae,'children':_0x422588['replies']['slice'](0x1)[_0x8086ca(0xd4)](_0x3e8bd6=>_0x53fcd7(_0x3e8bd6,_0x39d6ae['id']))};}return null;}let p=class{constructor(_0x108963,_0x33b1e4,_0x5abf8e){const _0x11be89=_0x515c7c;this[_0x11be89(0x12b)]=_0x108963,this['_userService']=_0x33b1e4,this[_0x11be89(0xd2)]=_0x5abf8e;}async['addComment'](_0x49691e){const _0x20cd13=_0x515c7c;var _0x8af404,_0x834332;const {parentId:_0x4f1a0d,unitId:_0x1a6497,text:_0x517b1a,threadId:_0x5f02fb}=_0x49691e,_0x553409=(_0x834332=(_0x8af404=_0x517b1a[_0x20cd13(0xd3)])==null?void 0x0:_0x8af404['filter'](_0x126ac7=>_0x126ac7[_0x20cd13(0x114)]===c['CustomRangeType']['COMMENT'])[_0x20cd13(0xd4)](_0x567b2e=>_0x567b2e[_0x20cd13(0xd0)]))!=null?_0x834332:[],_0x571c65=JSON[_0x20cd13(0xda)](_0x517b1a),_0x27929f=(await this[_0x20cd13(0xd2)]['requireSession'](_0x1a6497))['getMemberID']();if(_0x4f1a0d){const _0x1d992e={'memberId':_0x27929f,'unitId':_0x1a6497,'content':_0x571c65,'mention':_0x553409,'threadId':_0x5f02fb},_0x5a94e0=(await this[_0x20cd13(0x12b)][_0x20cd13(0x11b)](_0x20cd13(0x107)+_0x1a6497+_0x20cd13(0x10c),{'body':_0x1d992e}))[_0x20cd13(0x115)][_0x20cd13(0x111)];return{..._0x49691e,'id':_0x5a94e0[_0x20cd13(0xcb)],'dT':c[_0x20cd13(0xea)](+_0x5a94e0[_0x20cd13(0xdb)])[_0x20cd13(0xec)](_0x20cd13(0xfc)),'personId':_0x5a94e0[_0x20cd13(0xd8)]};}else{const _0x29f04a={'memberId':_0x27929f,'unitId':_0x1a6497,'content':_0x571c65,'mention':_0x553409},_0x2f29d3=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x1a6497+'/add',{'body':_0x29f04a});return Y(_0x2f29d3[_0x20cd13(0x115)][_0x20cd13(0xe2)],_0x49691e);}}async[_0x515c7c(0xe7)](_0x1762bc){const _0x44f883=_0x515c7c;var _0x41e377,_0x345f73;const {text:_0x552b11,unitId:_0x432a99}=_0x1762bc,_0x4b8bb1=(_0x345f73=(_0x41e377=_0x552b11['customRanges'])==null?void 0x0:_0x41e377['filter'](_0x5676c4=>_0x5676c4[_0x44f883(0x114)]===c['CustomRangeType'][_0x44f883(0xbb)])[_0x44f883(0xd4)](_0x43fe9c=>_0x43fe9c[_0x44f883(0xd0)]))!=null?_0x345f73:[],_0x3ec826=JSON[_0x44f883(0xda)](_0x552b11),_0x15a6c8=_0x1762bc[_0x44f883(0x11e)],_0x218e56=_0x1762bc['id'],_0x5ae202={'memberId':(await this['_sessionService']['requireSession'](_0x432a99))['getMemberID'](),'unitId':_0x432a99,'threadId':_0x15a6c8,'mention':_0x4b8bb1,'content':_0x3ec826,'replyId':_0x218e56},_0x241e37=await this[_0x44f883(0x12b)][_0x44f883(0x11b)](_0x44f883(0x107)+_0x432a99+_0x44f883(0xee),{'body':_0x5ae202});return!_0x241e37[_0x44f883(0x115)][_0x44f883(0x10a)]||_0x241e37['body'][_0x44f883(0x10a)][_0x44f883(0xfa)]===0x1;}async[_0x515c7c(0x131)](_0x12a9b2){const _0x32607b=_0x515c7c,{unitId:_0x4c2268}=_0x12a9b2,_0x276e42=_0x12a9b2[_0x32607b(0x11e)],_0x22d5d8={'memberId':this['_userService'][_0x32607b(0xe4)]()['userID'],'unitId':_0x4c2268,'threadId':_0x276e42,'solved':_0x12a9b2[_0x32607b(0x12e)]?I[_0x32607b(0x11d)]:I[_0x32607b(0xc7)]},_0x57f89d=await this[_0x32607b(0x12b)][_0x32607b(0x11b)](_0x32607b(0x107)+_0x4c2268+_0x32607b(0x121),{'body':_0x22d5d8});return!_0x57f89d['body'][_0x32607b(0x10a)]||_0x57f89d['body']['error'][_0x32607b(0xfa)]===0x1;}async[_0x515c7c(0x130)](_0x211939,_0x40ff5e,_0x42dc2c,_0x2517a4){const _0x81f4c=_0x515c7c,_0x122236={'memberId':(await this[_0x81f4c(0xd2)][_0x81f4c(0xd7)](_0x211939))['getMemberID'](),'threadId':_0x42dc2c,'replyId':_0x2517a4,'unitId':_0x211939},_0x5b6c89=await this['_httpService'][_0x81f4c(0x11b)](_0x81f4c(0x107)+_0x211939+'/delete',{'body':_0x122236});return!_0x5b6c89[_0x81f4c(0x115)][_0x81f4c(0x10a)]||_0x5b6c89[_0x81f4c(0x115)][_0x81f4c(0x10a)]['code']===0x1;}async['listComments'](_0x3f7f9a,_0x2de268,_0x449076){const _0x522848=_0x515c7c,_0x29d316={'unitId':_0x3f7f9a,'threadId':_0x449076},_0x1fdc81=await this[_0x522848(0x12b)][_0x522848(0x11b)](_0x522848(0x107)+_0x3f7f9a+_0x522848(0x104),{'body':_0x29d316}),_0x44a7d4=_0x449076['map'](_0x2b40b4=>G(_0x1fdc81[_0x522848(0x115)][_0x522848(0x120)][_0x2b40b4],_0x3f7f9a,_0x2de268))[_0x522848(0xff)](Boolean);return Object[_0x522848(0xbd)](_0x1fdc81[_0x522848(0x115)]['users'])[_0x522848(0xe8)](_0x3db631=>{const _0x5dce45=_0x522848;this[_0x5dce45(0x129)][_0x5dce45(0x12f)](_0x3db631);}),_0x44a7d4;}[_0x515c7c(0x103)](_0x3b19f8){const _0x10c512=_0x515c7c;return{'id':_0x3b19f8['id'],'threadId':_0x3b19f8[_0x10c512(0x11e)],'ref':_0x3b19f8[_0x10c512(0xd5)]};}};p=x([C(0x0,c[_0x515c7c(0xf5)](P[_0x515c7c(0xef)])),C(0x1,c[_0x515c7c(0xf5)](c[_0x515c7c(0x113)])),C(0x2,c['Inject'](b[_0x515c7c(0xc9)]))],p);var H=Object[_0x515c7c(0x12d)],J=(_0x584385,_0x47b3c5,_0x250ea7,_0x7a09f7)=>{const _0x47f934=_0x515c7c;for(var _0x4633d2=_0x7a09f7>0x1?void 0x0:_0x7a09f7?H(_0x47b3c5,_0x250ea7):_0x47b3c5,_0x29bd85=_0x584385[_0x47f934(0xf3)]-0x1,_0x1fb927;_0x29bd85>=0x0;_0x29bd85--)(_0x1fb927=_0x584385[_0x29bd85])&&(_0x4633d2=_0x1fb927(_0x4633d2)||_0x4633d2);return _0x4633d2;},y=(_0x1280b3,_0x562d9f)=>(_0x5ab117,_0x14b13b)=>_0x562d9f(_0x5ab117,_0x14b13b,_0x1280b3);let g=class extends c['Disposable']{constructor(_0x10c5f0,_0x4b6bc1){const _0x5abc81=_0x515c7c;super(),this[_0x5abc81(0xf0)]=_0x10c5f0,this[_0x5abc81(0x106)]=_0x4b6bc1,this[_0x5abc81(0xdf)]();}[_0x515c7c(0xdf)](){const _0x27e8a0=_0x515c7c;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x27e8a0(0xd1)]=!0x1;}};g=J([y(0x0,M[_0x515c7c(0xfb)]),y(0x1,c[_0x515c7c(0xf5)](p))],g);function _0xc903(){const _0x3e7251=['setConfig','filter','_init','delete','UniverInstanceType','saveCommentToSnapshot','/list','14046710oiQhUB','_threadCommentDataSource','/universer-api/comment/unit/','merge','3708061oeVfpa','error','size','/reply','Injector','UniverLicensePlugin','CommentService','67ButylB','reply','883107btFZVx','UserManagerService','rangeType','body','solved','parse','pluginName','UniverThreadCommentUIPlugin','_commentService','post','bufferTime','Solved','threadId','payload','comments','/solved','thread-comment-data-source.config','user','Solve','unitId','UNRECOGNIZED','_injector','root','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_httpService','get','getOwnPropertyDescriptor','resolved','addUser','deleteComment','resolveComment','DependentOn','content','COMMENT','Add','values','users','2006hIZbOd','_configService','onReady','_config','parentId','2363072PYvEln','Disposable','_threadCommentModel','OpenOrReOpen','16YzfMgw','CollaborationSessionService','UNIVER_UNKNOWN','replyId','replies','Plugin','addComment','Edit','rangeId','syncUpdateMutationToColla','_sessionService','customRanges','map','ref','type','requireSession','userId','getComment','stringify','createTimestamp','156315osrFJK','find','getUnit','_initDataSource','disposeWithMe','personId','comment','UniverCollaborationClientPlugin','getCurrentUser','/universer-api/user/list','ThreadCommentModel','updateComment','forEach','subscribe','dayjs','1784305MjQqTq','format','add','/edit','HTTPService','_threadCommentDataSourceService','onStarting','6ftyNIB','length','Reply','Inject','getUser','Delete','Unknown','IConfigService','code','IThreadCommentDataSourceService','YYYY/MM/DD\x20HH:mm','userID'];_0xc903=function(){return _0x3e7251;};return _0xc903();}var F=Object['defineProperty'],L=Object[_0x515c7c(0x12d)],Z=(_0x124257,_0x3a7b6e,_0x4ef931)=>_0x3a7b6e in _0x124257?F(_0x124257,_0x3a7b6e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ef931}):_0x124257[_0x3a7b6e]=_0x4ef931,W=(_0xac2ef4,_0x4a9ad8,_0x93561b,_0x5b26b5)=>{const _0x5d3ec6=_0x515c7c;for(var _0x5eeb6c=_0x5b26b5>0x1?void 0x0:_0x5b26b5?L(_0x4a9ad8,_0x93561b):_0x4a9ad8,_0x240fd0=_0xac2ef4[_0x5d3ec6(0xf3)]-0x1,_0x42c88b;_0x240fd0>=0x0;_0x240fd0--)(_0x42c88b=_0xac2ef4[_0x240fd0])&&(_0x5eeb6c=_0x42c88b(_0x5eeb6c)||_0x5eeb6c);return _0x5eeb6c;},O=(_0x1cf700,_0x25af57)=>(_0x203361,_0x5640bb)=>_0x25af57(_0x203361,_0x5640bb,_0x1cf700),N=(_0x2b0084,_0xfc04ee,_0x5b8fde)=>Z(_0x2b0084,typeof _0xfc04ee!='symbol'?_0xfc04ee+'':_0xfc04ee,_0x5b8fde);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x515c7c(0xcd)]{constructor(_0x5d8322=D,_0x107fba,_0x5222c2){const _0x3e1ffd=_0x515c7c;super(),this[_0x3e1ffd(0xc2)]=_0x5d8322,this[_0x3e1ffd(0x127)]=_0x107fba,this['_configService']=_0x5222c2;const {..._0x120c90}=c[_0x3e1ffd(0x108)]({},D,this[_0x3e1ffd(0xc2)]);this[_0x3e1ffd(0xc0)][_0x3e1ffd(0xfe)](q,_0x120c90);}[_0x515c7c(0xf1)](){const _0xb5c436=_0x515c7c;[[p],[g],[_]][_0xb5c436(0xe8)](_0x3434a7=>{const _0x52bdd5=_0xb5c436;this['_injector'][_0x52bdd5(0xed)](_0x3434a7);});}[_0x515c7c(0xc1)](){const _0x5882a7=_0x515c7c;this[_0x5882a7(0x127)][_0x5882a7(0x12c)](g),this[_0x5882a7(0x127)][_0x5882a7(0x12c)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x515c7c(0x118),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0x515c7c(0x102)][_0x515c7c(0xca)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x515c7c(0xb9)](w[_0x515c7c(0x119)],b[_0x515c7c(0xe3)],T[_0x515c7c(0x10e)]),O(0x1,c[_0x515c7c(0xf5)](c['Injector'])),O(0x2,c[_0x515c7c(0xf9)])],exports['UniverThreadCommentDataSourcePlugin']);
|
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 _0x53fb69=_0x1b34;(function(_0x31c01c,_0x5cfe25){const _0x5606e7=_0x1b34,_0x31ee08=_0x31c01c();while(!![]){try{const _0x4c580a=-parseInt(_0x5606e7(0x16c))/0x1*(parseInt(_0x5606e7(0x158))/0x2)+parseInt(_0x5606e7(0x157))/0x3*(parseInt(_0x5606e7(0x199))/0x4)+-parseInt(_0x5606e7(0x178))/0x5+-parseInt(_0x5606e7(0x1aa))/0x6*(-parseInt(_0x5606e7(0x171))/0x7)+parseInt(_0x5606e7(0x16f))/0x8+-parseInt(_0x5606e7(0x17e))/0x9+parseInt(_0x5606e7(0x15c))/0xa;if(_0x4c580a===_0x5cfe25)break;else _0x31ee08['push'](_0x31ee08['shift']());}catch(_0x53b728){_0x31ee08['push'](_0x31ee08['shift']());}}}(_0x4136,0xc2bed));import{CommentService as _0x41cd52,CollaborationSessionService as _0xe8e38a,UniverCollaborationClientPlugin as _0x16c5a0}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1f27c6}from'@univerjs-pro/license';import{dayjs as _0x3cf9cb,UserManagerService as _0x3b5625,Inject as _0x197d51,Injector as _0x4c9eab,Disposable as _0x3d7757,CustomRangeType as _0x35f28b,UniverInstanceType as _0x310494,DependentOn as _0xd936cb,Plugin as _0xd9e9c9,merge as _0x43e9ce,IConfigService as _0x5ab2f3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x355a86}from'@univerjs/thread-comment-ui';function _0x4136(){const _0x58aaad=['delete','Reply','subscribe','updateComment','/universer-api/comment/unit/','COMMENT','size','map','content','listComments','1713tCcFLd','users','resolveComment','5665776mbeeXd','symbol','1243907mEQTsg','unitId','code','_httpService','Solve','_init','stringify','3602275aNaZyr','_injector','add','replies','_initUserSync','UNRECOGNIZED','8421174LwNbGn','comments','_config','getOwnPropertyDescriptor','replyId','resolved','saveCommentToSnapshot','_threadCommentDataSourceService','reply','Unknown','disposeWithMe','get','error','onStarting','_commentService','rangeId','_initDataSource','_threadCommentModel','pluginName','defineProperty','UNIVER_UNKNOWN','_userService','syncUpdateMutationToColla','requireSession','threadId','parentId','customRanges','5158348OMgkVq','Solved','Edit','post','solved','payload','Delete','root','type','format','parse','getCurrentUser','userId','_configService','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','dataSource','30wRnXNl','getMemberID','user','find','_threadCommentDataSource','/reply','Add','commentUpdate$','slice','addComment','filter','/solved','addUser','onReady','_sessionService','/list','ref','3XKuqCL','1634xPMPOd','body','getComment','getUnit','9670250yJucXH','/add','userID','createTimestamp','length','forEach'];_0x4136=function(){return _0x58aaad;};return _0x4136();}import{ThreadCommentModel as _0x463a91,IThreadCommentDataSourceService as _0x33d8ea}from'@univerjs/thread-comment';import{bufferTime as _0x37f0b6}from'rxjs';import{HTTPService as _0x41276a}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x274d56=>(_0x274d56[_0x274d56[_0x53fb69(0x1a7)]=0x0]=_0x53fb69(0x1a7),_0x274d56[_0x274d56['Solved']=0x1]=_0x53fb69(0x19a),_0x274d56[_0x274d56[_0x53fb69(0x17d)]=-0x1]=_0x53fb69(0x17d),_0x274d56))(I||{}),v=(_0x139699=>(_0x139699[_0x139699[_0x53fb69(0x187)]=0x0]='Unknown',_0x139699[_0x139699[_0x53fb69(0x1b0)]=0x1]='Add',_0x139699[_0x139699['Reply']=0x2]=_0x53fb69(0x163),_0x139699[_0x139699[_0x53fb69(0x19b)]=0x3]=_0x53fb69(0x19b),_0x139699[_0x139699['Delete']=0x4]=_0x53fb69(0x19f),_0x139699[_0x139699[_0x53fb69(0x175)]=0x5]=_0x53fb69(0x175),_0x139699[_0x139699[_0x53fb69(0x17d)]=-0x1]=_0x53fb69(0x17d),_0x139699))(v||{});const y=_0x2c1c16=>_0x3cf9cb(new Date(+_0x2c1c16))[_0x53fb69(0x1a2)](_0x53fb69(0x1a8)),B=async(_0x4f1776,_0x1fa07f)=>{const _0x596aba=_0x53fb69,_0x6ea02=_0x4f1776[_0x596aba(0x189)](_0x3b5625),_0x3d07e7=_0x4f1776[_0x596aba(0x189)](_0x41276a);_0x1fa07f[_0x596aba(0x161)](_0x336477=>{const _0x58886d=_0x596aba;_0x6ea02['getUser'](_0x336477)&&_0x1fa07f[_0x58886d(0x162)](_0x336477);}),_0x1fa07f[_0x596aba(0x168)]&&(await _0x3d07e7[_0x596aba(0x189)]('/universer-api/user/list',{'params':{'userIDs':[..._0x1fa07f]}}))[_0x596aba(0x159)][_0x596aba(0x16d)][_0x596aba(0x161)](_0x1c6830=>{const _0x3e20f1=_0x596aba;_0x1c6830&&_0x6ea02[_0x3e20f1(0x1b6)](_0x1c6830);});};var K=Object[_0x53fb69(0x181)],V=(_0xe99f8a,_0x36fb3b,_0x192d75,_0x5e2f09)=>{for(var _0x40993d=_0x5e2f09>0x1?void 0x0:_0x5e2f09?K(_0x36fb3b,_0x192d75):_0x36fb3b,_0x107dfc=_0xe99f8a['length']-0x1,_0x6f7138;_0x107dfc>=0x0;_0x107dfc--)(_0x6f7138=_0xe99f8a[_0x107dfc])&&(_0x40993d=_0x6f7138(_0x40993d)||_0x40993d);return _0x40993d;},p=(_0x5b480e,_0x558f7e)=>(_0x26363d,_0x535152)=>_0x558f7e(_0x26363d,_0x535152,_0x5b480e);let _=class extends _0x3d7757{constructor(_0x3a0c52,_0x53e9d7,_0x130938,_0x4f9b65){const _0x2e4c58=_0x53fb69;super(),this[_0x2e4c58(0x18c)]=_0x3a0c52,this[_0x2e4c58(0x18f)]=_0x53e9d7,this['_userService']=_0x130938,this['_injector']=_0x4f9b65,this[_0x2e4c58(0x176)](),this[_0x2e4c58(0x17c)]();}[_0x53fb69(0x17c)](){const _0x42eaf8=_0x53fb69;this[_0x42eaf8(0x188)](this[_0x42eaf8(0x18f)][_0x42eaf8(0x1b1)]['pipe'](_0x37f0b6(0x10))[_0x42eaf8(0x164)](_0x1f34b5=>{const _0x2d030d=_0x42eaf8,_0x236a24=new Set();_0x1f34b5[_0x2d030d(0x161)](_0x4bf81a=>{const _0x2cb6f3=_0x2d030d;if(_0x4bf81a['type']===_0x2cb6f3(0x17a)){const _0x86eec7=_0x4bf81a[_0x2cb6f3(0x19e)]['personId'];_0x236a24['add'](_0x86eec7);}}),B(this[_0x2d030d(0x179)],_0x236a24);}));}[_0x53fb69(0x176)](){const _0x2d6e40=_0x53fb69;this[_0x2d6e40(0x188)](this[_0x2d6e40(0x18c)][_0x2d6e40(0x1b1)][_0x2d6e40(0x164)](async _0x14437e=>{const _0x13dcbc=_0x2d6e40;var _0x3ebfc5,_0x42dce9,_0x3885e3,_0x2395d7;const _0x144199=(_0x3ebfc5=this[_0x13dcbc(0x18f)][_0x13dcbc(0x15b)](_0x14437e['unitId'])['find'](_0xba3cd5=>_0xba3cd5[_0x13dcbc(0x196)]===_0x14437e[_0x13dcbc(0x196)]))==null?void 0x0:_0x3ebfc5['root'];if(!_0x144199)return;const {unitId:_0x1b0aba,subUnitId:_0x3e7ea7}=_0x144199;switch(_0x14437e[_0x13dcbc(0x1ac)]&&this[_0x13dcbc(0x193)][_0x13dcbc(0x1b6)](_0x14437e[_0x13dcbc(0x1ac)]),_0x14437e[_0x13dcbc(0x1a1)]){case v['Add']:break;case v['Reply']:{this[_0x13dcbc(0x18f)][_0x13dcbc(0x1b3)](_0x1b0aba,_0x3e7ea7,{'unitId':_0x1b0aba,'subUnitId':_0x3e7ea7,'ref':'','id':_0x14437e['replyId'],'dT':y(+_0x14437e[_0x13dcbc(0x15f)]),'threadId':_0x14437e['threadId'],'personId':(_0x3885e3=(_0x42dce9=_0x14437e[_0x13dcbc(0x1ac)])==null?void 0x0:_0x42dce9[_0x13dcbc(0x15e)])!=null?_0x3885e3:_0x14437e[_0x13dcbc(0x1a5)],'text':JSON['parse'](_0x14437e[_0x13dcbc(0x16a)]),'parentId':_0x144199['id']});break;}case v[_0x13dcbc(0x19f)]:{const _0x4fd2b9=this[_0x13dcbc(0x18f)][_0x13dcbc(0x15a)](_0x1b0aba,_0x3e7ea7,_0x14437e[_0x13dcbc(0x182)]);_0x4fd2b9&&_0x4fd2b9[_0x13dcbc(0x197)]&&this[_0x13dcbc(0x18f)]['deleteComment'](_0x1b0aba,_0x3e7ea7,_0x14437e[_0x13dcbc(0x182)]);break;}case v[_0x13dcbc(0x19b)]:{this[_0x13dcbc(0x18f)][_0x13dcbc(0x165)](_0x1b0aba,_0x3e7ea7,{'commentId':_0x14437e[_0x13dcbc(0x182)],'text':JSON[_0x13dcbc(0x1a3)](_0x14437e['content'])});break;}case v[_0x13dcbc(0x175)]:{const _0x48c1a7=(_0x2395d7=this['_threadCommentModel'][_0x13dcbc(0x15b)](_0x14437e[_0x13dcbc(0x172)])[_0x13dcbc(0x1ad)](_0x2f6a77=>_0x2f6a77[_0x13dcbc(0x196)]===_0x14437e[_0x13dcbc(0x196)]))==null?void 0x0:_0x2395d7[_0x13dcbc(0x1a0)];_0x48c1a7&&this[_0x13dcbc(0x18f)][_0x13dcbc(0x16e)](_0x1b0aba,_0x3e7ea7,_0x48c1a7['id'],_0x14437e['solved']===I[_0x13dcbc(0x19a)]);break;}}}));}};_=V([p(0x0,_0x197d51(_0x41cd52)),p(0x1,_0x197d51(_0x463a91)),p(0x2,_0x197d51(_0x3b5625)),p(0x3,_0x197d51(_0x4c9eab))],_);const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0xa89b99,_0x5f1f36,_0x54a761,_0x425b27)=>{const _0x54f5e6=_0x53fb69;for(var _0x47c082=_0x425b27>0x1?void 0x0:_0x425b27?k(_0x5f1f36,_0x54a761):_0x5f1f36,_0xcecdb3=_0xa89b99[_0x54f5e6(0x160)]-0x1,_0x51186f;_0xcecdb3>=0x0;_0xcecdb3--)(_0x51186f=_0xa89b99[_0xcecdb3])&&(_0x47c082=_0x51186f(_0x47c082)||_0x47c082);return _0x47c082;},b=(_0x504ba3,_0x1507d1)=>(_0x287f3e,_0x530ccb)=>_0x1507d1(_0x287f3e,_0x530ccb,_0x504ba3);function X(_0x46a9de,_0x1ca0be){const _0x4efa06=_0x53fb69,_0x18b6d2=_0x46a9de[_0x4efa06(0x17b)][0x0];return{..._0x1ca0be,'id':_0x18b6d2['replyId'],'resolved':_0x46a9de[_0x4efa06(0x19d)]===0x1,'dT':y(_0x18b6d2[_0x4efa06(0x15f)]),'personId':_0x18b6d2['userId'],'threadId':_0x18b6d2[_0x4efa06(0x196)]};}function ee(_0x4f5876,_0x451519,_0xc965e8){const _0x1e29a6=_0x53fb69;var _0x280c37,_0x2ea8ea;if(((_0x2ea8ea=(_0x280c37=_0x4f5876==null?void 0x0:_0x4f5876[_0x1e29a6(0x17b)])==null?void 0x0:_0x280c37[_0x1e29a6(0x160)])!=null?_0x2ea8ea:0x0)>0x0){const _0x30ca4e=(_0x4e4abb,_0x218cae)=>({'id':_0x4e4abb[_0x1e29a6(0x182)],'threadId':_0x4e4abb[_0x1e29a6(0x196)],'dT':y(_0x4e4abb[_0x1e29a6(0x15f)]),'personId':_0x4e4abb[_0x1e29a6(0x1a5)],'resolved':_0x4f5876[_0x1e29a6(0x19d)]===I[_0x1e29a6(0x19a)],'unitId':_0x451519,'subUnitId':_0xc965e8,'text':JSON[_0x1e29a6(0x1a3)](_0x4e4abb[_0x1e29a6(0x16a)]),'parentId':_0x218cae}),_0x1124ba=_0x30ca4e(_0x4f5876[_0x1e29a6(0x17b)][0x0]);return{..._0x1124ba,'children':_0x4f5876['replies'][_0x1e29a6(0x1b2)](0x1)[_0x1e29a6(0x169)](_0x1e8625=>_0x30ca4e(_0x1e8625,_0x1124ba['id']))};}return null;}let S=class{constructor(_0x4142bd,_0x81bf02,_0x4969f6){const _0x1446bb=_0x53fb69;this[_0x1446bb(0x174)]=_0x4142bd,this[_0x1446bb(0x193)]=_0x81bf02,this[_0x1446bb(0x154)]=_0x4969f6;}async[_0x53fb69(0x1b3)](_0xe169e7){const _0x5531f8=_0x53fb69;var _0x4440e5,_0x46d55b;const {parentId:_0x3068d8,unitId:_0x12676e,text:_0x3fd87c,threadId:_0x2e0030}=_0xe169e7,_0x2f11ab=(_0x46d55b=(_0x4440e5=_0x3fd87c['customRanges'])==null?void 0x0:_0x4440e5[_0x5531f8(0x1b4)](_0x1724f6=>_0x1724f6['rangeType']===_0x35f28b[_0x5531f8(0x167)])[_0x5531f8(0x169)](_0x44f10b=>_0x44f10b[_0x5531f8(0x18d)]))!=null?_0x46d55b:[],_0x20e558=JSON[_0x5531f8(0x177)](_0x3fd87c),_0x497a01=(await this[_0x5531f8(0x154)][_0x5531f8(0x195)](_0x12676e))[_0x5531f8(0x1ab)]();if(_0x3068d8){const _0x471502={'memberId':_0x497a01,'unitId':_0x12676e,'content':_0x20e558,'mention':_0x2f11ab,'threadId':_0x2e0030},_0x58a655=(await this[_0x5531f8(0x174)]['post'](_0x5531f8(0x166)+_0x12676e+_0x5531f8(0x1af),{'body':_0x471502}))[_0x5531f8(0x159)][_0x5531f8(0x186)];return{..._0xe169e7,'id':_0x58a655[_0x5531f8(0x182)],'dT':_0x3cf9cb(+_0x58a655[_0x5531f8(0x15f)])[_0x5531f8(0x1a2)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x58a655[_0x5531f8(0x1a5)]};}else{const _0x95d454={'memberId':_0x497a01,'unitId':_0x12676e,'content':_0x20e558,'mention':_0x2f11ab},_0x497d8a=await this[_0x5531f8(0x174)][_0x5531f8(0x19c)](_0x5531f8(0x166)+_0x12676e+_0x5531f8(0x15d),{'body':_0x95d454});return X(_0x497d8a[_0x5531f8(0x159)]['comment'],_0xe169e7);}}async[_0x53fb69(0x165)](_0x2795f3){const _0x28646c=_0x53fb69;var _0x292df2,_0x429615;const {text:_0x417df8,unitId:_0x44a928}=_0x2795f3,_0x18c257=(_0x429615=(_0x292df2=_0x417df8[_0x28646c(0x198)])==null?void 0x0:_0x292df2[_0x28646c(0x1b4)](_0x1f475d=>_0x1f475d['rangeType']===_0x35f28b[_0x28646c(0x167)])[_0x28646c(0x169)](_0x560880=>_0x560880['rangeId']))!=null?_0x429615:[],_0xdcca9f=JSON[_0x28646c(0x177)](_0x417df8),_0x3cd224=_0x2795f3[_0x28646c(0x196)],_0x467516=_0x2795f3['id'],_0x8b43e1={'memberId':(await this[_0x28646c(0x154)][_0x28646c(0x195)](_0x44a928))[_0x28646c(0x1ab)](),'unitId':_0x44a928,'threadId':_0x3cd224,'mention':_0x18c257,'content':_0xdcca9f,'replyId':_0x467516},_0xcff49c=await this['_httpService']['post'](_0x28646c(0x166)+_0x44a928+'/edit',{'body':_0x8b43e1});return!_0xcff49c[_0x28646c(0x159)][_0x28646c(0x18a)]||_0xcff49c[_0x28646c(0x159)][_0x28646c(0x18a)][_0x28646c(0x173)]===0x1;}async[_0x53fb69(0x16e)](_0x558c65){const _0x2335a8=_0x53fb69,{unitId:_0x4725d2}=_0x558c65,_0x4aad79=_0x558c65['threadId'],_0x401504={'memberId':this[_0x2335a8(0x193)][_0x2335a8(0x1a4)]()['userID'],'unitId':_0x4725d2,'threadId':_0x4aad79,'solved':_0x558c65[_0x2335a8(0x183)]?I[_0x2335a8(0x19a)]:I[_0x2335a8(0x1a7)]},_0x27fb64=await this[_0x2335a8(0x174)][_0x2335a8(0x19c)](_0x2335a8(0x166)+_0x4725d2+_0x2335a8(0x1b5),{'body':_0x401504});return!_0x27fb64[_0x2335a8(0x159)][_0x2335a8(0x18a)]||_0x27fb64[_0x2335a8(0x159)][_0x2335a8(0x18a)][_0x2335a8(0x173)]===0x1;}async['deleteComment'](_0xfbfb67,_0x2ab870,_0x128489,_0x392ca1){const _0x4a8ee2=_0x53fb69,_0x404cba={'memberId':(await this[_0x4a8ee2(0x154)][_0x4a8ee2(0x195)](_0xfbfb67))[_0x4a8ee2(0x1ab)](),'threadId':_0x128489,'replyId':_0x392ca1,'unitId':_0xfbfb67},_0x166533=await this['_httpService'][_0x4a8ee2(0x19c)](_0x4a8ee2(0x166)+_0xfbfb67+'/delete',{'body':_0x404cba});return!_0x166533[_0x4a8ee2(0x159)][_0x4a8ee2(0x18a)]||_0x166533[_0x4a8ee2(0x159)][_0x4a8ee2(0x18a)][_0x4a8ee2(0x173)]===0x1;}async[_0x53fb69(0x16b)](_0x20fc1c,_0x59b0d1,_0x5914c7){const _0x3dcbbc=_0x53fb69,_0x132af7={'unitId':_0x20fc1c,'threadId':_0x5914c7},_0x2619c3=await this['_httpService'][_0x3dcbbc(0x19c)](_0x3dcbbc(0x166)+_0x20fc1c+_0x3dcbbc(0x155),{'body':_0x132af7}),_0x96808e=_0x5914c7[_0x3dcbbc(0x169)](_0x15a176=>ee(_0x2619c3[_0x3dcbbc(0x159)][_0x3dcbbc(0x17f)][_0x15a176],_0x20fc1c,_0x59b0d1))[_0x3dcbbc(0x1b4)](Boolean);return Object['values'](_0x2619c3[_0x3dcbbc(0x159)]['users'])[_0x3dcbbc(0x161)](_0x37ec01=>{const _0x65b65b=_0x3dcbbc;this[_0x65b65b(0x193)][_0x65b65b(0x1b6)](_0x37ec01);}),_0x96808e;}[_0x53fb69(0x184)](_0x20bc81){const _0x33a01a=_0x53fb69;return{'id':_0x20bc81['id'],'threadId':_0x20bc81[_0x33a01a(0x196)],'ref':_0x20bc81[_0x33a01a(0x156)]};}};S=Q([b(0x0,_0x197d51(_0x41276a)),b(0x1,_0x197d51(_0x3b5625)),b(0x2,_0x197d51(_0xe8e38a))],S);var re=Object[_0x53fb69(0x181)],te=(_0x3349b7,_0x418f8f,_0x3fc69f,_0x2178da)=>{const _0x598bc1=_0x53fb69;for(var _0x27b281=_0x2178da>0x1?void 0x0:_0x2178da?re(_0x418f8f,_0x3fc69f):_0x418f8f,_0x37bd5c=_0x3349b7[_0x598bc1(0x160)]-0x1,_0x14fcb6;_0x37bd5c>=0x0;_0x37bd5c--)(_0x14fcb6=_0x3349b7[_0x37bd5c])&&(_0x27b281=_0x14fcb6(_0x27b281)||_0x27b281);return _0x27b281;},M=(_0x3af1f3,_0x4689a3)=>(_0x366b6e,_0x35b82f)=>_0x4689a3(_0x366b6e,_0x35b82f,_0x3af1f3);let f=class extends _0x3d7757{constructor(_0x46df99,_0x2ecad6){const _0x297eb1=_0x53fb69;super(),this[_0x297eb1(0x185)]=_0x46df99,this[_0x297eb1(0x1ae)]=_0x2ecad6,this[_0x297eb1(0x18e)]();}['_initDataSource'](){const _0x4f6002=_0x53fb69;this[_0x4f6002(0x185)][_0x4f6002(0x1a9)]=this[_0x4f6002(0x1ae)],this[_0x4f6002(0x185)][_0x4f6002(0x194)]=!0x1;}};f=te([M(0x0,_0x33d8ea),M(0x1,_0x197d51(S))],f);var se=Object[_0x53fb69(0x191)],oe=Object[_0x53fb69(0x181)],ne=(_0x3a7321,_0x202e8b,_0x37202b)=>_0x202e8b in _0x3a7321?se(_0x3a7321,_0x202e8b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37202b}):_0x3a7321[_0x202e8b]=_0x37202b,ie=(_0x3dccf8,_0x4ad6b1,_0x67ae4,_0x16dfe4)=>{const _0x5f230f=_0x53fb69;for(var _0x54b8b7=_0x16dfe4>0x1?void 0x0:_0x16dfe4?oe(_0x4ad6b1,_0x67ae4):_0x4ad6b1,_0x3f80f9=_0x3dccf8[_0x5f230f(0x160)]-0x1,_0x3c6c80;_0x3f80f9>=0x0;_0x3f80f9--)(_0x3c6c80=_0x3dccf8[_0x3f80f9])&&(_0x54b8b7=_0x3c6c80(_0x54b8b7)||_0x54b8b7);return _0x54b8b7;},N=(_0x5081ec,_0x145668)=>(_0x4760ab,_0x5da25c)=>_0x145668(_0x4760ab,_0x5da25c,_0x5081ec),$=(_0x537387,_0x5c9c62,_0x57d74d)=>ne(_0x537387,typeof _0x5c9c62!=_0x53fb69(0x170)?_0x5c9c62+'':_0x5c9c62,_0x57d74d);let g=class extends _0xd9e9c9{constructor(_0x3424f8=O,_0x521e7d,_0x4f128f){const _0x3869c7=_0x53fb69;super(),this[_0x3869c7(0x180)]=_0x3424f8,this[_0x3869c7(0x179)]=_0x521e7d,this[_0x3869c7(0x1a6)]=_0x4f128f;const {..._0x89fc9e}=_0x43e9ce({},O,this[_0x3869c7(0x180)]);this[_0x3869c7(0x1a6)]['setConfig'](z,_0x89fc9e);}[_0x53fb69(0x18b)](){const _0x27b9bd=_0x53fb69;[[S],[f],[_]][_0x27b9bd(0x161)](_0x3c0d74=>{const _0x24286d=_0x27b9bd;this['_injector'][_0x24286d(0x17a)](_0x3c0d74);});}[_0x53fb69(0x153)](){const _0xf5ec3b=_0x53fb69;this[_0xf5ec3b(0x179)]['get'](f),this['_injector'][_0xf5ec3b(0x189)](_);}};function _0x1b34(_0x1d1717,_0x233325){_0x1d1717=_0x1d1717-0x153;const _0x4136b0=_0x4136();let _0x1b3408=_0x4136b0[_0x1d1717];return _0x1b3408;}$(g,_0x53fb69(0x190),W),$(g,_0x53fb69(0x1a1),_0x310494[_0x53fb69(0x192)]),g=ie([_0xd936cb(_0x355a86,_0x16c5a0,_0x1f27c6),N(0x1,_0x197d51(_0x4c9eab)),N(0x2,_0x5ab2f3)],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 _0x53fb69=_0x1b34;(function(_0x31c01c,_0x5cfe25){const _0x5606e7=_0x1b34,_0x31ee08=_0x31c01c();while(!![]){try{const _0x4c580a=-parseInt(_0x5606e7(0x16c))/0x1*(parseInt(_0x5606e7(0x158))/0x2)+parseInt(_0x5606e7(0x157))/0x3*(parseInt(_0x5606e7(0x199))/0x4)+-parseInt(_0x5606e7(0x178))/0x5+-parseInt(_0x5606e7(0x1aa))/0x6*(-parseInt(_0x5606e7(0x171))/0x7)+parseInt(_0x5606e7(0x16f))/0x8+-parseInt(_0x5606e7(0x17e))/0x9+parseInt(_0x5606e7(0x15c))/0xa;if(_0x4c580a===_0x5cfe25)break;else _0x31ee08['push'](_0x31ee08['shift']());}catch(_0x53b728){_0x31ee08['push'](_0x31ee08['shift']());}}}(_0x4136,0xc2bed));import{CommentService as _0x41cd52,CollaborationSessionService as _0xe8e38a,UniverCollaborationClientPlugin as _0x16c5a0}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1f27c6}from'@univerjs-pro/license';import{dayjs as _0x3cf9cb,UserManagerService as _0x3b5625,Inject as _0x197d51,Injector as _0x4c9eab,Disposable as _0x3d7757,CustomRangeType as _0x35f28b,UniverInstanceType as _0x310494,DependentOn as _0xd936cb,Plugin as _0xd9e9c9,merge as _0x43e9ce,IConfigService as _0x5ab2f3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x355a86}from'@univerjs/thread-comment-ui';function _0x4136(){const _0x58aaad=['delete','Reply','subscribe','updateComment','/universer-api/comment/unit/','COMMENT','size','map','content','listComments','1713tCcFLd','users','resolveComment','5665776mbeeXd','symbol','1243907mEQTsg','unitId','code','_httpService','Solve','_init','stringify','3602275aNaZyr','_injector','add','replies','_initUserSync','UNRECOGNIZED','8421174LwNbGn','comments','_config','getOwnPropertyDescriptor','replyId','resolved','saveCommentToSnapshot','_threadCommentDataSourceService','reply','Unknown','disposeWithMe','get','error','onStarting','_commentService','rangeId','_initDataSource','_threadCommentModel','pluginName','defineProperty','UNIVER_UNKNOWN','_userService','syncUpdateMutationToColla','requireSession','threadId','parentId','customRanges','5158348OMgkVq','Solved','Edit','post','solved','payload','Delete','root','type','format','parse','getCurrentUser','userId','_configService','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','dataSource','30wRnXNl','getMemberID','user','find','_threadCommentDataSource','/reply','Add','commentUpdate$','slice','addComment','filter','/solved','addUser','onReady','_sessionService','/list','ref','3XKuqCL','1634xPMPOd','body','getComment','getUnit','9670250yJucXH','/add','userID','createTimestamp','length','forEach'];_0x4136=function(){return _0x58aaad;};return _0x4136();}import{ThreadCommentModel as _0x463a91,IThreadCommentDataSourceService as _0x33d8ea}from'@univerjs/thread-comment';import{bufferTime as _0x37f0b6}from'rxjs';import{HTTPService as _0x41276a}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x274d56=>(_0x274d56[_0x274d56[_0x53fb69(0x1a7)]=0x0]=_0x53fb69(0x1a7),_0x274d56[_0x274d56['Solved']=0x1]=_0x53fb69(0x19a),_0x274d56[_0x274d56[_0x53fb69(0x17d)]=-0x1]=_0x53fb69(0x17d),_0x274d56))(I||{}),v=(_0x139699=>(_0x139699[_0x139699[_0x53fb69(0x187)]=0x0]='Unknown',_0x139699[_0x139699[_0x53fb69(0x1b0)]=0x1]='Add',_0x139699[_0x139699['Reply']=0x2]=_0x53fb69(0x163),_0x139699[_0x139699[_0x53fb69(0x19b)]=0x3]=_0x53fb69(0x19b),_0x139699[_0x139699['Delete']=0x4]=_0x53fb69(0x19f),_0x139699[_0x139699[_0x53fb69(0x175)]=0x5]=_0x53fb69(0x175),_0x139699[_0x139699[_0x53fb69(0x17d)]=-0x1]=_0x53fb69(0x17d),_0x139699))(v||{});const y=_0x2c1c16=>_0x3cf9cb(new Date(+_0x2c1c16))[_0x53fb69(0x1a2)](_0x53fb69(0x1a8)),B=async(_0x4f1776,_0x1fa07f)=>{const _0x596aba=_0x53fb69,_0x6ea02=_0x4f1776[_0x596aba(0x189)](_0x3b5625),_0x3d07e7=_0x4f1776[_0x596aba(0x189)](_0x41276a);_0x1fa07f[_0x596aba(0x161)](_0x336477=>{const _0x58886d=_0x596aba;_0x6ea02['getUser'](_0x336477)&&_0x1fa07f[_0x58886d(0x162)](_0x336477);}),_0x1fa07f[_0x596aba(0x168)]&&(await _0x3d07e7[_0x596aba(0x189)]('/universer-api/user/list',{'params':{'userIDs':[..._0x1fa07f]}}))[_0x596aba(0x159)][_0x596aba(0x16d)][_0x596aba(0x161)](_0x1c6830=>{const _0x3e20f1=_0x596aba;_0x1c6830&&_0x6ea02[_0x3e20f1(0x1b6)](_0x1c6830);});};var K=Object[_0x53fb69(0x181)],V=(_0xe99f8a,_0x36fb3b,_0x192d75,_0x5e2f09)=>{for(var _0x40993d=_0x5e2f09>0x1?void 0x0:_0x5e2f09?K(_0x36fb3b,_0x192d75):_0x36fb3b,_0x107dfc=_0xe99f8a['length']-0x1,_0x6f7138;_0x107dfc>=0x0;_0x107dfc--)(_0x6f7138=_0xe99f8a[_0x107dfc])&&(_0x40993d=_0x6f7138(_0x40993d)||_0x40993d);return _0x40993d;},p=(_0x5b480e,_0x558f7e)=>(_0x26363d,_0x535152)=>_0x558f7e(_0x26363d,_0x535152,_0x5b480e);let _=class extends _0x3d7757{constructor(_0x3a0c52,_0x53e9d7,_0x130938,_0x4f9b65){const _0x2e4c58=_0x53fb69;super(),this[_0x2e4c58(0x18c)]=_0x3a0c52,this[_0x2e4c58(0x18f)]=_0x53e9d7,this['_userService']=_0x130938,this['_injector']=_0x4f9b65,this[_0x2e4c58(0x176)](),this[_0x2e4c58(0x17c)]();}[_0x53fb69(0x17c)](){const _0x42eaf8=_0x53fb69;this[_0x42eaf8(0x188)](this[_0x42eaf8(0x18f)][_0x42eaf8(0x1b1)]['pipe'](_0x37f0b6(0x10))[_0x42eaf8(0x164)](_0x1f34b5=>{const _0x2d030d=_0x42eaf8,_0x236a24=new Set();_0x1f34b5[_0x2d030d(0x161)](_0x4bf81a=>{const _0x2cb6f3=_0x2d030d;if(_0x4bf81a['type']===_0x2cb6f3(0x17a)){const _0x86eec7=_0x4bf81a[_0x2cb6f3(0x19e)]['personId'];_0x236a24['add'](_0x86eec7);}}),B(this[_0x2d030d(0x179)],_0x236a24);}));}[_0x53fb69(0x176)](){const _0x2d6e40=_0x53fb69;this[_0x2d6e40(0x188)](this[_0x2d6e40(0x18c)][_0x2d6e40(0x1b1)][_0x2d6e40(0x164)](async _0x14437e=>{const _0x13dcbc=_0x2d6e40;var _0x3ebfc5,_0x42dce9,_0x3885e3,_0x2395d7;const _0x144199=(_0x3ebfc5=this[_0x13dcbc(0x18f)][_0x13dcbc(0x15b)](_0x14437e['unitId'])['find'](_0xba3cd5=>_0xba3cd5[_0x13dcbc(0x196)]===_0x14437e[_0x13dcbc(0x196)]))==null?void 0x0:_0x3ebfc5['root'];if(!_0x144199)return;const {unitId:_0x1b0aba,subUnitId:_0x3e7ea7}=_0x144199;switch(_0x14437e[_0x13dcbc(0x1ac)]&&this[_0x13dcbc(0x193)][_0x13dcbc(0x1b6)](_0x14437e[_0x13dcbc(0x1ac)]),_0x14437e[_0x13dcbc(0x1a1)]){case v['Add']:break;case v['Reply']:{this[_0x13dcbc(0x18f)][_0x13dcbc(0x1b3)](_0x1b0aba,_0x3e7ea7,{'unitId':_0x1b0aba,'subUnitId':_0x3e7ea7,'ref':'','id':_0x14437e['replyId'],'dT':y(+_0x14437e[_0x13dcbc(0x15f)]),'threadId':_0x14437e['threadId'],'personId':(_0x3885e3=(_0x42dce9=_0x14437e[_0x13dcbc(0x1ac)])==null?void 0x0:_0x42dce9[_0x13dcbc(0x15e)])!=null?_0x3885e3:_0x14437e[_0x13dcbc(0x1a5)],'text':JSON['parse'](_0x14437e[_0x13dcbc(0x16a)]),'parentId':_0x144199['id']});break;}case v[_0x13dcbc(0x19f)]:{const _0x4fd2b9=this[_0x13dcbc(0x18f)][_0x13dcbc(0x15a)](_0x1b0aba,_0x3e7ea7,_0x14437e[_0x13dcbc(0x182)]);_0x4fd2b9&&_0x4fd2b9[_0x13dcbc(0x197)]&&this[_0x13dcbc(0x18f)]['deleteComment'](_0x1b0aba,_0x3e7ea7,_0x14437e[_0x13dcbc(0x182)]);break;}case v[_0x13dcbc(0x19b)]:{this[_0x13dcbc(0x18f)][_0x13dcbc(0x165)](_0x1b0aba,_0x3e7ea7,{'commentId':_0x14437e[_0x13dcbc(0x182)],'text':JSON[_0x13dcbc(0x1a3)](_0x14437e['content'])});break;}case v[_0x13dcbc(0x175)]:{const _0x48c1a7=(_0x2395d7=this['_threadCommentModel'][_0x13dcbc(0x15b)](_0x14437e[_0x13dcbc(0x172)])[_0x13dcbc(0x1ad)](_0x2f6a77=>_0x2f6a77[_0x13dcbc(0x196)]===_0x14437e[_0x13dcbc(0x196)]))==null?void 0x0:_0x2395d7[_0x13dcbc(0x1a0)];_0x48c1a7&&this[_0x13dcbc(0x18f)][_0x13dcbc(0x16e)](_0x1b0aba,_0x3e7ea7,_0x48c1a7['id'],_0x14437e['solved']===I[_0x13dcbc(0x19a)]);break;}}}));}};_=V([p(0x0,_0x197d51(_0x41cd52)),p(0x1,_0x197d51(_0x463a91)),p(0x2,_0x197d51(_0x3b5625)),p(0x3,_0x197d51(_0x4c9eab))],_);const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0xa89b99,_0x5f1f36,_0x54a761,_0x425b27)=>{const _0x54f5e6=_0x53fb69;for(var _0x47c082=_0x425b27>0x1?void 0x0:_0x425b27?k(_0x5f1f36,_0x54a761):_0x5f1f36,_0xcecdb3=_0xa89b99[_0x54f5e6(0x160)]-0x1,_0x51186f;_0xcecdb3>=0x0;_0xcecdb3--)(_0x51186f=_0xa89b99[_0xcecdb3])&&(_0x47c082=_0x51186f(_0x47c082)||_0x47c082);return _0x47c082;},b=(_0x504ba3,_0x1507d1)=>(_0x287f3e,_0x530ccb)=>_0x1507d1(_0x287f3e,_0x530ccb,_0x504ba3);function X(_0x46a9de,_0x1ca0be){const _0x4efa06=_0x53fb69,_0x18b6d2=_0x46a9de[_0x4efa06(0x17b)][0x0];return{..._0x1ca0be,'id':_0x18b6d2['replyId'],'resolved':_0x46a9de[_0x4efa06(0x19d)]===0x1,'dT':y(_0x18b6d2[_0x4efa06(0x15f)]),'personId':_0x18b6d2['userId'],'threadId':_0x18b6d2[_0x4efa06(0x196)]};}function ee(_0x4f5876,_0x451519,_0xc965e8){const _0x1e29a6=_0x53fb69;var _0x280c37,_0x2ea8ea;if(((_0x2ea8ea=(_0x280c37=_0x4f5876==null?void 0x0:_0x4f5876[_0x1e29a6(0x17b)])==null?void 0x0:_0x280c37[_0x1e29a6(0x160)])!=null?_0x2ea8ea:0x0)>0x0){const _0x30ca4e=(_0x4e4abb,_0x218cae)=>({'id':_0x4e4abb[_0x1e29a6(0x182)],'threadId':_0x4e4abb[_0x1e29a6(0x196)],'dT':y(_0x4e4abb[_0x1e29a6(0x15f)]),'personId':_0x4e4abb[_0x1e29a6(0x1a5)],'resolved':_0x4f5876[_0x1e29a6(0x19d)]===I[_0x1e29a6(0x19a)],'unitId':_0x451519,'subUnitId':_0xc965e8,'text':JSON[_0x1e29a6(0x1a3)](_0x4e4abb[_0x1e29a6(0x16a)]),'parentId':_0x218cae}),_0x1124ba=_0x30ca4e(_0x4f5876[_0x1e29a6(0x17b)][0x0]);return{..._0x1124ba,'children':_0x4f5876['replies'][_0x1e29a6(0x1b2)](0x1)[_0x1e29a6(0x169)](_0x1e8625=>_0x30ca4e(_0x1e8625,_0x1124ba['id']))};}return null;}let S=class{constructor(_0x4142bd,_0x81bf02,_0x4969f6){const _0x1446bb=_0x53fb69;this[_0x1446bb(0x174)]=_0x4142bd,this[_0x1446bb(0x193)]=_0x81bf02,this[_0x1446bb(0x154)]=_0x4969f6;}async[_0x53fb69(0x1b3)](_0xe169e7){const _0x5531f8=_0x53fb69;var _0x4440e5,_0x46d55b;const {parentId:_0x3068d8,unitId:_0x12676e,text:_0x3fd87c,threadId:_0x2e0030}=_0xe169e7,_0x2f11ab=(_0x46d55b=(_0x4440e5=_0x3fd87c['customRanges'])==null?void 0x0:_0x4440e5[_0x5531f8(0x1b4)](_0x1724f6=>_0x1724f6['rangeType']===_0x35f28b[_0x5531f8(0x167)])[_0x5531f8(0x169)](_0x44f10b=>_0x44f10b[_0x5531f8(0x18d)]))!=null?_0x46d55b:[],_0x20e558=JSON[_0x5531f8(0x177)](_0x3fd87c),_0x497a01=(await this[_0x5531f8(0x154)][_0x5531f8(0x195)](_0x12676e))[_0x5531f8(0x1ab)]();if(_0x3068d8){const _0x471502={'memberId':_0x497a01,'unitId':_0x12676e,'content':_0x20e558,'mention':_0x2f11ab,'threadId':_0x2e0030},_0x58a655=(await this[_0x5531f8(0x174)]['post'](_0x5531f8(0x166)+_0x12676e+_0x5531f8(0x1af),{'body':_0x471502}))[_0x5531f8(0x159)][_0x5531f8(0x186)];return{..._0xe169e7,'id':_0x58a655[_0x5531f8(0x182)],'dT':_0x3cf9cb(+_0x58a655[_0x5531f8(0x15f)])[_0x5531f8(0x1a2)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x58a655[_0x5531f8(0x1a5)]};}else{const _0x95d454={'memberId':_0x497a01,'unitId':_0x12676e,'content':_0x20e558,'mention':_0x2f11ab},_0x497d8a=await this[_0x5531f8(0x174)][_0x5531f8(0x19c)](_0x5531f8(0x166)+_0x12676e+_0x5531f8(0x15d),{'body':_0x95d454});return X(_0x497d8a[_0x5531f8(0x159)]['comment'],_0xe169e7);}}async[_0x53fb69(0x165)](_0x2795f3){const _0x28646c=_0x53fb69;var _0x292df2,_0x429615;const {text:_0x417df8,unitId:_0x44a928}=_0x2795f3,_0x18c257=(_0x429615=(_0x292df2=_0x417df8[_0x28646c(0x198)])==null?void 0x0:_0x292df2[_0x28646c(0x1b4)](_0x1f475d=>_0x1f475d['rangeType']===_0x35f28b[_0x28646c(0x167)])[_0x28646c(0x169)](_0x560880=>_0x560880['rangeId']))!=null?_0x429615:[],_0xdcca9f=JSON[_0x28646c(0x177)](_0x417df8),_0x3cd224=_0x2795f3[_0x28646c(0x196)],_0x467516=_0x2795f3['id'],_0x8b43e1={'memberId':(await this[_0x28646c(0x154)][_0x28646c(0x195)](_0x44a928))[_0x28646c(0x1ab)](),'unitId':_0x44a928,'threadId':_0x3cd224,'mention':_0x18c257,'content':_0xdcca9f,'replyId':_0x467516},_0xcff49c=await this['_httpService']['post'](_0x28646c(0x166)+_0x44a928+'/edit',{'body':_0x8b43e1});return!_0xcff49c[_0x28646c(0x159)][_0x28646c(0x18a)]||_0xcff49c[_0x28646c(0x159)][_0x28646c(0x18a)][_0x28646c(0x173)]===0x1;}async[_0x53fb69(0x16e)](_0x558c65){const _0x2335a8=_0x53fb69,{unitId:_0x4725d2}=_0x558c65,_0x4aad79=_0x558c65['threadId'],_0x401504={'memberId':this[_0x2335a8(0x193)][_0x2335a8(0x1a4)]()['userID'],'unitId':_0x4725d2,'threadId':_0x4aad79,'solved':_0x558c65[_0x2335a8(0x183)]?I[_0x2335a8(0x19a)]:I[_0x2335a8(0x1a7)]},_0x27fb64=await this[_0x2335a8(0x174)][_0x2335a8(0x19c)](_0x2335a8(0x166)+_0x4725d2+_0x2335a8(0x1b5),{'body':_0x401504});return!_0x27fb64[_0x2335a8(0x159)][_0x2335a8(0x18a)]||_0x27fb64[_0x2335a8(0x159)][_0x2335a8(0x18a)][_0x2335a8(0x173)]===0x1;}async['deleteComment'](_0xfbfb67,_0x2ab870,_0x128489,_0x392ca1){const _0x4a8ee2=_0x53fb69,_0x404cba={'memberId':(await this[_0x4a8ee2(0x154)][_0x4a8ee2(0x195)](_0xfbfb67))[_0x4a8ee2(0x1ab)](),'threadId':_0x128489,'replyId':_0x392ca1,'unitId':_0xfbfb67},_0x166533=await this['_httpService'][_0x4a8ee2(0x19c)](_0x4a8ee2(0x166)+_0xfbfb67+'/delete',{'body':_0x404cba});return!_0x166533[_0x4a8ee2(0x159)][_0x4a8ee2(0x18a)]||_0x166533[_0x4a8ee2(0x159)][_0x4a8ee2(0x18a)][_0x4a8ee2(0x173)]===0x1;}async[_0x53fb69(0x16b)](_0x20fc1c,_0x59b0d1,_0x5914c7){const _0x3dcbbc=_0x53fb69,_0x132af7={'unitId':_0x20fc1c,'threadId':_0x5914c7},_0x2619c3=await this['_httpService'][_0x3dcbbc(0x19c)](_0x3dcbbc(0x166)+_0x20fc1c+_0x3dcbbc(0x155),{'body':_0x132af7}),_0x96808e=_0x5914c7[_0x3dcbbc(0x169)](_0x15a176=>ee(_0x2619c3[_0x3dcbbc(0x159)][_0x3dcbbc(0x17f)][_0x15a176],_0x20fc1c,_0x59b0d1))[_0x3dcbbc(0x1b4)](Boolean);return Object['values'](_0x2619c3[_0x3dcbbc(0x159)]['users'])[_0x3dcbbc(0x161)](_0x37ec01=>{const _0x65b65b=_0x3dcbbc;this[_0x65b65b(0x193)][_0x65b65b(0x1b6)](_0x37ec01);}),_0x96808e;}[_0x53fb69(0x184)](_0x20bc81){const _0x33a01a=_0x53fb69;return{'id':_0x20bc81['id'],'threadId':_0x20bc81[_0x33a01a(0x196)],'ref':_0x20bc81[_0x33a01a(0x156)]};}};S=Q([b(0x0,_0x197d51(_0x41276a)),b(0x1,_0x197d51(_0x3b5625)),b(0x2,_0x197d51(_0xe8e38a))],S);var re=Object[_0x53fb69(0x181)],te=(_0x3349b7,_0x418f8f,_0x3fc69f,_0x2178da)=>{const _0x598bc1=_0x53fb69;for(var _0x27b281=_0x2178da>0x1?void 0x0:_0x2178da?re(_0x418f8f,_0x3fc69f):_0x418f8f,_0x37bd5c=_0x3349b7[_0x598bc1(0x160)]-0x1,_0x14fcb6;_0x37bd5c>=0x0;_0x37bd5c--)(_0x14fcb6=_0x3349b7[_0x37bd5c])&&(_0x27b281=_0x14fcb6(_0x27b281)||_0x27b281);return _0x27b281;},M=(_0x3af1f3,_0x4689a3)=>(_0x366b6e,_0x35b82f)=>_0x4689a3(_0x366b6e,_0x35b82f,_0x3af1f3);let f=class extends _0x3d7757{constructor(_0x46df99,_0x2ecad6){const _0x297eb1=_0x53fb69;super(),this[_0x297eb1(0x185)]=_0x46df99,this[_0x297eb1(0x1ae)]=_0x2ecad6,this[_0x297eb1(0x18e)]();}['_initDataSource'](){const _0x4f6002=_0x53fb69;this[_0x4f6002(0x185)][_0x4f6002(0x1a9)]=this[_0x4f6002(0x1ae)],this[_0x4f6002(0x185)][_0x4f6002(0x194)]=!0x1;}};f=te([M(0x0,_0x33d8ea),M(0x1,_0x197d51(S))],f);var se=Object[_0x53fb69(0x191)],oe=Object[_0x53fb69(0x181)],ne=(_0x3a7321,_0x202e8b,_0x37202b)=>_0x202e8b in _0x3a7321?se(_0x3a7321,_0x202e8b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37202b}):_0x3a7321[_0x202e8b]=_0x37202b,ie=(_0x3dccf8,_0x4ad6b1,_0x67ae4,_0x16dfe4)=>{const _0x5f230f=_0x53fb69;for(var _0x54b8b7=_0x16dfe4>0x1?void 0x0:_0x16dfe4?oe(_0x4ad6b1,_0x67ae4):_0x4ad6b1,_0x3f80f9=_0x3dccf8[_0x5f230f(0x160)]-0x1,_0x3c6c80;_0x3f80f9>=0x0;_0x3f80f9--)(_0x3c6c80=_0x3dccf8[_0x3f80f9])&&(_0x54b8b7=_0x3c6c80(_0x54b8b7)||_0x54b8b7);return _0x54b8b7;},N=(_0x5081ec,_0x145668)=>(_0x4760ab,_0x5da25c)=>_0x145668(_0x4760ab,_0x5da25c,_0x5081ec),$=(_0x537387,_0x5c9c62,_0x57d74d)=>ne(_0x537387,typeof _0x5c9c62!=_0x53fb69(0x170)?_0x5c9c62+'':_0x5c9c62,_0x57d74d);let g=class extends _0xd9e9c9{constructor(_0x3424f8=O,_0x521e7d,_0x4f128f){const _0x3869c7=_0x53fb69;super(),this[_0x3869c7(0x180)]=_0x3424f8,this[_0x3869c7(0x179)]=_0x521e7d,this[_0x3869c7(0x1a6)]=_0x4f128f;const {..._0x89fc9e}=_0x43e9ce({},O,this[_0x3869c7(0x180)]);this[_0x3869c7(0x1a6)]['setConfig'](z,_0x89fc9e);}[_0x53fb69(0x18b)](){const _0x27b9bd=_0x53fb69;[[S],[f],[_]][_0x27b9bd(0x161)](_0x3c0d74=>{const _0x24286d=_0x27b9bd;this['_injector'][_0x24286d(0x17a)](_0x3c0d74);});}[_0x53fb69(0x153)](){const _0xf5ec3b=_0x53fb69;this[_0xf5ec3b(0x179)]['get'](f),this['_injector'][_0xf5ec3b(0x189)](_);}};function _0x1b34(_0x1d1717,_0x233325){_0x1d1717=_0x1d1717-0x153;const _0x4136b0=_0x4136();let _0x1b3408=_0x4136b0[_0x1d1717];return _0x1b3408;}$(g,_0x53fb69(0x190),W),$(g,_0x53fb69(0x1a1),_0x310494[_0x53fb69(0x192)]),g=ie([_0xd936cb(_0x355a86,_0x16c5a0,_0x1f27c6),N(0x1,_0x197d51(_0x4c9eab)),N(0x2,_0x5ab2f3)],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 _0xfb95(){const _0x555dc4=['CommentService','root','UniverThreadCommentDataSourcePlugin','44062812uTjNZh','_threadCommentDataSourceService','9356424RaUNYi','setConfig','Injector','_config','DependentOn','UserManagerService','getComment','get','@univerjs/thread-comment','getUnit','merge','Reply','getOwnPropertyDescriptor','saveCommentToSnapshot','7564669tlvdaQ','length','disposeWithMe','replies','Inject','defineProperty','_httpService','stringify','threadId','userID','deleteComment','amd','UniverCollaborationClientPlugin','slice','symbol','IConfigService','7051544VADokD','object','filter','UniverThreadCommentUIPlugin','_threadCommentDataSource','rangeType','UNRECOGNIZED','map','136591mjhIsG','error','onStarting','replyId','resolveComment','parentId','/solved','Delete','getUser','_initDataSource','format','rxjs','payload','/delete','comments','Disposable','2316Jlakad','addUser','_injector','forEach','type','UniverThreadComment','getMemberID','Module','personId','OpenOrReOpen','/reply','UniverCore','dayjs','parse','resolved','/add','Unknown','CustomRangeType','subscribe','UniverProThreadCommentDatasource','/universer-api/user/list','Edit','rangeId','_userService','commentUpdate$','content','UNIVER_UNKNOWN','IThreadCommentDataSourceService','HTTPService','unitId','4661430GSmxvB','code','bufferTime','COMMENT','pipe','/list','5TsBJQP','ref','onReady','YYYY/MM/DD\x20HH:mm','function','listComments','/universer-api/comment/unit/','users','_sessionService','size','solved','@univerjs/network','2986YrRULg','body','user','reply','_init','UniverThreadCommentUi','toStringTag','requireSession','createTimestamp','@univerjs-pro/license','_threadCommentModel','pluginName','_configService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initUserSync','Plugin','Solved','post','find','addComment','syncUpdateMutationToColla','UniverInstanceType','UniverProCollaborationClient','ThreadCommentModel','customRanges'];_0xfb95=function(){return _0x555dc4;};return _0xfb95();}function _0x8e95(_0x411791,_0x31f63d){_0x411791=_0x411791-0x16a;const _0xfb957a=_0xfb95();let _0x8e95b5=_0xfb957a[_0x411791];return _0x8e95b5;}(function(_0x348a7a,_0x1f4ae3){const _0x13a337=_0x8e95,_0x1a0366=_0x348a7a();while(!![]){try{const _0x33b654=-parseInt(_0x13a337(0x170))/0x1+-parseInt(_0x13a337(0x1b0))/0x2*(parseInt(_0x13a337(0x180))/0x3)+-parseInt(_0x13a337(0x1ec))/0x4+parseInt(_0x13a337(0x1a4))/0x5*(-parseInt(_0x13a337(0x19e))/0x6)+parseInt(_0x13a337(0x1dc))/0x7+-parseInt(_0x13a337(0x1ce))/0x8+parseInt(_0x13a337(0x1cc))/0x9;if(_0x33b654===_0x1f4ae3)break;else _0x1a0366['push'](_0x1a0366['shift']());}catch(_0x13775e){_0x1a0366['push'](_0x1a0366['shift']());}}}(_0xfb95,0xeec54),function(_0x5b1f03,_0xace70b){const _0x60d137=_0x8e95;typeof exports==_0x60d137(0x1ed)&&typeof module<'u'?_0xace70b(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==_0x60d137(0x1a8)&&define[_0x60d137(0x1e7)]?define(['exports','@univerjs-pro/collaboration-client',_0x60d137(0x1b9),'@univerjs/core','@univerjs/thread-comment-ui',_0x60d137(0x1d6),_0x60d137(0x17b),_0x60d137(0x1af)],_0xace70b):(_0x5b1f03=typeof globalThis<'u'?globalThis:_0x5b1f03||self,_0xace70b(_0x5b1f03[_0x60d137(0x193)]={},_0x5b1f03[_0x60d137(0x1c6)],_0x5b1f03['UniverProLicense'],_0x5b1f03[_0x60d137(0x18b)],_0x5b1f03[_0x60d137(0x1b5)],_0x5b1f03[_0x60d137(0x185)],_0x5b1f03['rxjs'],_0x5b1f03['UniverNetwork']));}(this,function(_0x51937b,_0x43b60a,_0x5c078d,_0xbbdc41,_0x54b669,_0xc31abe,_0x1fe173,_0x5f11fa){'use strict';const _0x500be2=_0x8e95;const _0x13b5d3=_0x500be2(0x1bd);var _0x9364eb=(_0x4df11e=>(_0x4df11e[_0x4df11e[_0x500be2(0x189)]=0x0]=_0x500be2(0x189),_0x4df11e[_0x4df11e[_0x500be2(0x1c0)]=0x1]='Solved',_0x4df11e[_0x4df11e['UNRECOGNIZED']=-0x1]=_0x500be2(0x16e),_0x4df11e))(_0x9364eb||{}),_0x154c36=(_0x50cca7=>(_0x50cca7[_0x50cca7[_0x500be2(0x190)]=0x0]=_0x500be2(0x190),_0x50cca7[_0x50cca7['Add']=0x1]='Add',_0x50cca7[_0x50cca7[_0x500be2(0x1d9)]=0x2]=_0x500be2(0x1d9),_0x50cca7[_0x50cca7[_0x500be2(0x195)]=0x3]=_0x500be2(0x195),_0x50cca7[_0x50cca7[_0x500be2(0x177)]=0x4]=_0x500be2(0x177),_0x50cca7[_0x50cca7['Solve']=0x5]='Solve',_0x50cca7[_0x50cca7[_0x500be2(0x16e)]=-0x1]='UNRECOGNIZED',_0x50cca7))(_0x154c36||{});const _0x474764=_0xac6e0c=>_0xbbdc41['dayjs'](new Date(+_0xac6e0c))[_0x500be2(0x17a)](_0x500be2(0x1a7)),_0x591e1a=async(_0x303b7c,_0x504c2f)=>{const _0xbd2011=_0x500be2,_0x54abf2=_0x303b7c[_0xbd2011(0x1d5)](_0xbbdc41[_0xbd2011(0x1d3)]),_0x33dd20=_0x303b7c['get'](_0x5f11fa[_0xbd2011(0x19c)]);_0x504c2f[_0xbd2011(0x183)](_0x5e0837=>{const _0x1bbf7a=_0xbd2011;_0x54abf2[_0x1bbf7a(0x178)](_0x5e0837)&&_0x504c2f['delete'](_0x5e0837);}),_0x504c2f[_0xbd2011(0x1ad)]&&(await _0x33dd20[_0xbd2011(0x1d5)](_0xbd2011(0x194),{'params':{'userIDs':[..._0x504c2f]}}))[_0xbd2011(0x1b1)][_0xbd2011(0x1ab)][_0xbd2011(0x183)](_0x97b379=>{_0x97b379&&_0x54abf2['addUser'](_0x97b379);});};var _0x10dc66=Object['getOwnPropertyDescriptor'],_0x1567bf=(_0x529281,_0x51121e,_0x1cd8bd,_0x5dff14)=>{const _0x2d660d=_0x500be2;for(var _0x50b917=_0x5dff14>0x1?void 0x0:_0x5dff14?_0x10dc66(_0x51121e,_0x1cd8bd):_0x51121e,_0x2466f0=_0x529281[_0x2d660d(0x1dd)]-0x1,_0x52f273;_0x2466f0>=0x0;_0x2466f0--)(_0x52f273=_0x529281[_0x2466f0])&&(_0x50b917=_0x52f273(_0x50b917)||_0x50b917);return _0x50b917;},_0x18fdbc=(_0x5d1ef8,_0x187f59)=>(_0x340d12,_0x1cd456)=>_0x187f59(_0x340d12,_0x1cd456,_0x5d1ef8);let _0x3a0773=class extends _0xbbdc41[_0x500be2(0x17f)]{constructor(_0xa22251,_0x3f3bc4,_0x292dd2,_0x459651){const _0x1be2f3=_0x500be2;super(),this['_commentService']=_0xa22251,this['_threadCommentModel']=_0x3f3bc4,this[_0x1be2f3(0x197)]=_0x292dd2,this[_0x1be2f3(0x182)]=_0x459651,this[_0x1be2f3(0x1b4)](),this[_0x1be2f3(0x1be)]();}[_0x500be2(0x1be)](){const _0x4604ad=_0x500be2;this[_0x4604ad(0x1de)](this[_0x4604ad(0x1ba)][_0x4604ad(0x198)][_0x4604ad(0x1a2)](_0x1fe173[_0x4604ad(0x1a0)](0x10))['subscribe'](_0x5e07c5=>{const _0x38ad48=_0x4604ad,_0x1fa533=new Set();_0x5e07c5[_0x38ad48(0x183)](_0x15cba5=>{const _0x4f07de=_0x38ad48;if(_0x15cba5[_0x4f07de(0x184)]==='add'){const _0x59db0f=_0x15cba5[_0x4f07de(0x17c)][_0x4f07de(0x188)];_0x1fa533['add'](_0x59db0f);}}),_0x591e1a(this['_injector'],_0x1fa533);}));}['_init'](){const _0x5745a5=_0x500be2;this[_0x5745a5(0x1de)](this['_commentService']['commentUpdate$'][_0x5745a5(0x192)](async _0x593916=>{const _0x1e77f2=_0x5745a5;var _0x15c739,_0x2349d9,_0x55fbb0,_0x52d301;const _0x5e944d=(_0x15c739=this[_0x1e77f2(0x1ba)][_0x1e77f2(0x1d7)](_0x593916[_0x1e77f2(0x19d)])[_0x1e77f2(0x1c2)](_0x419e33=>_0x419e33[_0x1e77f2(0x1e4)]===_0x593916[_0x1e77f2(0x1e4)]))==null?void 0x0:_0x15c739[_0x1e77f2(0x1ca)];if(!_0x5e944d)return;const {unitId:_0x5c4556,subUnitId:_0x41a64e}=_0x5e944d;switch(_0x593916[_0x1e77f2(0x1b2)]&&this['_userService'][_0x1e77f2(0x181)](_0x593916[_0x1e77f2(0x1b2)]),_0x593916[_0x1e77f2(0x184)]){case _0x154c36['Add']:break;case _0x154c36[_0x1e77f2(0x1d9)]:{this[_0x1e77f2(0x1ba)][_0x1e77f2(0x1c3)](_0x5c4556,_0x41a64e,{'unitId':_0x5c4556,'subUnitId':_0x41a64e,'ref':'','id':_0x593916['replyId'],'dT':_0x474764(+_0x593916[_0x1e77f2(0x1b8)]),'threadId':_0x593916[_0x1e77f2(0x1e4)],'personId':(_0x55fbb0=(_0x2349d9=_0x593916['user'])==null?void 0x0:_0x2349d9['userID'])!=null?_0x55fbb0:_0x593916['userId'],'text':JSON[_0x1e77f2(0x18d)](_0x593916[_0x1e77f2(0x199)]),'parentId':_0x5e944d['id']});break;}case _0x154c36[_0x1e77f2(0x177)]:{const _0x523b34=this[_0x1e77f2(0x1ba)][_0x1e77f2(0x1d4)](_0x5c4556,_0x41a64e,_0x593916['replyId']);_0x523b34&&_0x523b34[_0x1e77f2(0x175)]&&this[_0x1e77f2(0x1ba)][_0x1e77f2(0x1e6)](_0x5c4556,_0x41a64e,_0x593916[_0x1e77f2(0x173)]);break;}case _0x154c36[_0x1e77f2(0x195)]:{this['_threadCommentModel']['updateComment'](_0x5c4556,_0x41a64e,{'commentId':_0x593916[_0x1e77f2(0x173)],'text':JSON[_0x1e77f2(0x18d)](_0x593916[_0x1e77f2(0x199)])});break;}case _0x154c36['Solve']:{const _0x3d6ef1=(_0x52d301=this['_threadCommentModel'][_0x1e77f2(0x1d7)](_0x593916[_0x1e77f2(0x19d)])[_0x1e77f2(0x1c2)](_0x73d309=>_0x73d309[_0x1e77f2(0x1e4)]===_0x593916[_0x1e77f2(0x1e4)]))==null?void 0x0:_0x52d301[_0x1e77f2(0x1ca)];_0x3d6ef1&&this[_0x1e77f2(0x1ba)][_0x1e77f2(0x174)](_0x5c4556,_0x41a64e,_0x3d6ef1['id'],_0x593916[_0x1e77f2(0x1ae)]===_0x9364eb['Solved']);break;}}}));}};_0x3a0773=_0x1567bf([_0x18fdbc(0x0,_0xbbdc41[_0x500be2(0x1e0)](_0x43b60a[_0x500be2(0x1c9)])),_0x18fdbc(0x1,_0xbbdc41[_0x500be2(0x1e0)](_0xc31abe[_0x500be2(0x1c7)])),_0x18fdbc(0x2,_0xbbdc41[_0x500be2(0x1e0)](_0xbbdc41[_0x500be2(0x1d3)])),_0x18fdbc(0x3,_0xbbdc41[_0x500be2(0x1e0)](_0xbbdc41[_0x500be2(0x1d0)]))],_0x3a0773);const _0x45a96b='thread-comment-data-source.config',_0x13f15e={};var _0xad5722=Object['getOwnPropertyDescriptor'],_0x41834c=(_0xb8e830,_0x3e596f,_0x48d7e8,_0x4d5a03)=>{for(var _0x3e8bde=_0x4d5a03>0x1?void 0x0:_0x4d5a03?_0xad5722(_0x3e596f,_0x48d7e8):_0x3e596f,_0x3320f3=_0xb8e830['length']-0x1,_0x3242ff;_0x3320f3>=0x0;_0x3320f3--)(_0x3242ff=_0xb8e830[_0x3320f3])&&(_0x3e8bde=_0x3242ff(_0x3e8bde)||_0x3e8bde);return _0x3e8bde;},_0x2ef8d3=(_0x4514ea,_0x173d4b)=>(_0x4134fe,_0x160d90)=>_0x173d4b(_0x4134fe,_0x160d90,_0x4514ea);function _0x109c33(_0x5d8bbf,_0x3bb6cb){const _0x3492d9=_0x500be2,_0xcaead4=_0x5d8bbf[_0x3492d9(0x1df)][0x0];return{..._0x3bb6cb,'id':_0xcaead4['replyId'],'resolved':_0x5d8bbf[_0x3492d9(0x1ae)]===0x1,'dT':_0x474764(_0xcaead4[_0x3492d9(0x1b8)]),'personId':_0xcaead4['userId'],'threadId':_0xcaead4[_0x3492d9(0x1e4)]};}function _0x51d43c(_0x2effbf,_0x3a51c4,_0x43d290){const _0x3b3e9e=_0x500be2;var _0x45d276,_0x2abd38;if(((_0x2abd38=(_0x45d276=_0x2effbf==null?void 0x0:_0x2effbf[_0x3b3e9e(0x1df)])==null?void 0x0:_0x45d276[_0x3b3e9e(0x1dd)])!=null?_0x2abd38:0x0)>0x0){const _0x4bd9ee=(_0x541115,_0x14ef68)=>({'id':_0x541115[_0x3b3e9e(0x173)],'threadId':_0x541115[_0x3b3e9e(0x1e4)],'dT':_0x474764(_0x541115[_0x3b3e9e(0x1b8)]),'personId':_0x541115['userId'],'resolved':_0x2effbf[_0x3b3e9e(0x1ae)]===_0x9364eb['Solved'],'unitId':_0x3a51c4,'subUnitId':_0x43d290,'text':JSON['parse'](_0x541115[_0x3b3e9e(0x199)]),'parentId':_0x14ef68}),_0x2e9896=_0x4bd9ee(_0x2effbf[_0x3b3e9e(0x1df)][0x0]);return{..._0x2e9896,'children':_0x2effbf[_0x3b3e9e(0x1df)][_0x3b3e9e(0x1e9)](0x1)[_0x3b3e9e(0x16f)](_0xb254ec=>_0x4bd9ee(_0xb254ec,_0x2e9896['id']))};}return null;}let _0xd17e27=class{constructor(_0x14060c,_0xd65c4a,_0x2759bc){const _0x3ffac4=_0x500be2;this[_0x3ffac4(0x1e2)]=_0x14060c,this['_userService']=_0xd65c4a,this[_0x3ffac4(0x1ac)]=_0x2759bc;}async['addComment'](_0x27e1de){const _0x19eb9a=_0x500be2;var _0x22812a,_0x48ee50;const {parentId:_0x250930,unitId:_0x213ad1,text:_0x45c94b,threadId:_0xdcf8a0}=_0x27e1de,_0x26c61a=(_0x48ee50=(_0x22812a=_0x45c94b[_0x19eb9a(0x1c8)])==null?void 0x0:_0x22812a[_0x19eb9a(0x16a)](_0x326578=>_0x326578[_0x19eb9a(0x16d)]===_0xbbdc41[_0x19eb9a(0x191)][_0x19eb9a(0x1a1)])[_0x19eb9a(0x16f)](_0x768396=>_0x768396[_0x19eb9a(0x196)]))!=null?_0x48ee50:[],_0x4d6b2a=JSON[_0x19eb9a(0x1e3)](_0x45c94b),_0x36dd47=(await this[_0x19eb9a(0x1ac)]['requireSession'](_0x213ad1))[_0x19eb9a(0x186)]();if(_0x250930){const _0x3f4960={'memberId':_0x36dd47,'unitId':_0x213ad1,'content':_0x4d6b2a,'mention':_0x26c61a,'threadId':_0xdcf8a0},_0x647ac=(await this[_0x19eb9a(0x1e2)]['post'](_0x19eb9a(0x1aa)+_0x213ad1+_0x19eb9a(0x18a),{'body':_0x3f4960}))['body'][_0x19eb9a(0x1b3)];return{..._0x27e1de,'id':_0x647ac['replyId'],'dT':_0xbbdc41[_0x19eb9a(0x18c)](+_0x647ac[_0x19eb9a(0x1b8)])['format'](_0x19eb9a(0x1a7)),'personId':_0x647ac['userId']};}else{const _0x3a0797={'memberId':_0x36dd47,'unitId':_0x213ad1,'content':_0x4d6b2a,'mention':_0x26c61a},_0x2ed196=await this[_0x19eb9a(0x1e2)][_0x19eb9a(0x1c1)]('/universer-api/comment/unit/'+_0x213ad1+_0x19eb9a(0x18f),{'body':_0x3a0797});return _0x109c33(_0x2ed196[_0x19eb9a(0x1b1)]['comment'],_0x27e1de);}}async['updateComment'](_0x2b6f4d){const _0xecaa94=_0x500be2;var _0x1e0c52,_0xd10c97;const {text:_0x1255fd,unitId:_0x26658d}=_0x2b6f4d,_0x4951e9=(_0xd10c97=(_0x1e0c52=_0x1255fd[_0xecaa94(0x1c8)])==null?void 0x0:_0x1e0c52[_0xecaa94(0x16a)](_0x11b3a4=>_0x11b3a4[_0xecaa94(0x16d)]===_0xbbdc41[_0xecaa94(0x191)][_0xecaa94(0x1a1)])[_0xecaa94(0x16f)](_0x2a7f54=>_0x2a7f54[_0xecaa94(0x196)]))!=null?_0xd10c97:[],_0x278219=JSON[_0xecaa94(0x1e3)](_0x1255fd),_0xf8b2c9=_0x2b6f4d['threadId'],_0x105798=_0x2b6f4d['id'],_0x50ba94={'memberId':(await this[_0xecaa94(0x1ac)][_0xecaa94(0x1b7)](_0x26658d))[_0xecaa94(0x186)](),'unitId':_0x26658d,'threadId':_0xf8b2c9,'mention':_0x4951e9,'content':_0x278219,'replyId':_0x105798},_0x1a425d=await this[_0xecaa94(0x1e2)][_0xecaa94(0x1c1)](_0xecaa94(0x1aa)+_0x26658d+'/edit',{'body':_0x50ba94});return!_0x1a425d[_0xecaa94(0x1b1)][_0xecaa94(0x171)]||_0x1a425d[_0xecaa94(0x1b1)][_0xecaa94(0x171)]['code']===0x1;}async[_0x500be2(0x174)](_0x1878dc){const _0x3b3f4a=_0x500be2,{unitId:_0x2abe24}=_0x1878dc,_0x16bd15=_0x1878dc[_0x3b3f4a(0x1e4)],_0x3fe000={'memberId':this[_0x3b3f4a(0x197)]['getCurrentUser']()[_0x3b3f4a(0x1e5)],'unitId':_0x2abe24,'threadId':_0x16bd15,'solved':_0x1878dc[_0x3b3f4a(0x18e)]?_0x9364eb[_0x3b3f4a(0x1c0)]:_0x9364eb['OpenOrReOpen']},_0x391c37=await this[_0x3b3f4a(0x1e2)][_0x3b3f4a(0x1c1)](_0x3b3f4a(0x1aa)+_0x2abe24+_0x3b3f4a(0x176),{'body':_0x3fe000});return!_0x391c37[_0x3b3f4a(0x1b1)][_0x3b3f4a(0x171)]||_0x391c37[_0x3b3f4a(0x1b1)][_0x3b3f4a(0x171)][_0x3b3f4a(0x19f)]===0x1;}async['deleteComment'](_0x173cc3,_0x2ced3a,_0x2b8686,_0x148275){const _0x1eb6b9=_0x500be2,_0x6b86b8={'memberId':(await this[_0x1eb6b9(0x1ac)]['requireSession'](_0x173cc3))[_0x1eb6b9(0x186)](),'threadId':_0x2b8686,'replyId':_0x148275,'unitId':_0x173cc3},_0x4e2232=await this['_httpService'][_0x1eb6b9(0x1c1)](_0x1eb6b9(0x1aa)+_0x173cc3+_0x1eb6b9(0x17d),{'body':_0x6b86b8});return!_0x4e2232[_0x1eb6b9(0x1b1)][_0x1eb6b9(0x171)]||_0x4e2232[_0x1eb6b9(0x1b1)][_0x1eb6b9(0x171)][_0x1eb6b9(0x19f)]===0x1;}async[_0x500be2(0x1a9)](_0x10cf8c,_0x257f35,_0x3ed9ba){const _0x6aadbf=_0x500be2,_0x4d60ae={'unitId':_0x10cf8c,'threadId':_0x3ed9ba},_0x225d80=await this[_0x6aadbf(0x1e2)][_0x6aadbf(0x1c1)](_0x6aadbf(0x1aa)+_0x10cf8c+_0x6aadbf(0x1a3),{'body':_0x4d60ae}),_0x4a5047=_0x3ed9ba['map'](_0x52e3c2=>_0x51d43c(_0x225d80[_0x6aadbf(0x1b1)][_0x6aadbf(0x17e)][_0x52e3c2],_0x10cf8c,_0x257f35))[_0x6aadbf(0x16a)](Boolean);return Object['values'](_0x225d80[_0x6aadbf(0x1b1)][_0x6aadbf(0x1ab)])[_0x6aadbf(0x183)](_0x5437c6=>{const _0x28ad4b=_0x6aadbf;this[_0x28ad4b(0x197)][_0x28ad4b(0x181)](_0x5437c6);}),_0x4a5047;}[_0x500be2(0x1db)](_0xe851){const _0x46c6e2=_0x500be2;return{'id':_0xe851['id'],'threadId':_0xe851[_0x46c6e2(0x1e4)],'ref':_0xe851[_0x46c6e2(0x1a5)]};}};_0xd17e27=_0x41834c([_0x2ef8d3(0x0,_0xbbdc41[_0x500be2(0x1e0)](_0x5f11fa[_0x500be2(0x19c)])),_0x2ef8d3(0x1,_0xbbdc41[_0x500be2(0x1e0)](_0xbbdc41['UserManagerService'])),_0x2ef8d3(0x2,_0xbbdc41[_0x500be2(0x1e0)](_0x43b60a['CollaborationSessionService']))],_0xd17e27);var _0x2a6dfe=Object['getOwnPropertyDescriptor'],_0x29f07b=(_0x2eed16,_0x207646,_0x1763e7,_0xd9ab02)=>{const _0x577c8f=_0x500be2;for(var _0x9ba029=_0xd9ab02>0x1?void 0x0:_0xd9ab02?_0x2a6dfe(_0x207646,_0x1763e7):_0x207646,_0x19d76a=_0x2eed16[_0x577c8f(0x1dd)]-0x1,_0x420daf;_0x19d76a>=0x0;_0x19d76a--)(_0x420daf=_0x2eed16[_0x19d76a])&&(_0x9ba029=_0x420daf(_0x9ba029)||_0x9ba029);return _0x9ba029;},_0x619bfb=(_0x4f4ca2,_0x1c3200)=>(_0x266af4,_0x547d3f)=>_0x1c3200(_0x266af4,_0x547d3f,_0x4f4ca2);let _0x13c404=class extends _0xbbdc41[_0x500be2(0x17f)]{constructor(_0x3df147,_0x3a1975){const _0x582616=_0x500be2;super(),this[_0x582616(0x1cd)]=_0x3df147,this[_0x582616(0x16c)]=_0x3a1975,this[_0x582616(0x179)]();}[_0x500be2(0x179)](){const _0x49b23b=_0x500be2;this[_0x49b23b(0x1cd)]['dataSource']=this['_threadCommentDataSource'],this[_0x49b23b(0x1cd)][_0x49b23b(0x1c4)]=!0x1;}};_0x13c404=_0x29f07b([_0x619bfb(0x0,_0xc31abe[_0x500be2(0x19b)]),_0x619bfb(0x1,_0xbbdc41[_0x500be2(0x1e0)](_0xd17e27))],_0x13c404);var _0x3104ee=Object[_0x500be2(0x1e1)],_0xaa5d0d=Object[_0x500be2(0x1da)],_0x1cb638=(_0x481049,_0x456d85,_0x179992)=>_0x456d85 in _0x481049?_0x3104ee(_0x481049,_0x456d85,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x179992}):_0x481049[_0x456d85]=_0x179992,_0x477214=(_0x36e9f0,_0x2ba203,_0x3a4d53,_0x220454)=>{const _0x34bded=_0x500be2;for(var _0x50368d=_0x220454>0x1?void 0x0:_0x220454?_0xaa5d0d(_0x2ba203,_0x3a4d53):_0x2ba203,_0x558949=_0x36e9f0[_0x34bded(0x1dd)]-0x1,_0x2bb6f8;_0x558949>=0x0;_0x558949--)(_0x2bb6f8=_0x36e9f0[_0x558949])&&(_0x50368d=_0x2bb6f8(_0x50368d)||_0x50368d);return _0x50368d;},_0x3c5b6f=(_0x41d9cc,_0x5340f7)=>(_0x243371,_0x4bd487)=>_0x5340f7(_0x243371,_0x4bd487,_0x41d9cc),_0x73c568=(_0x535c55,_0x497fad,_0x241d3b)=>_0x1cb638(_0x535c55,typeof _0x497fad!=_0x500be2(0x1ea)?_0x497fad+'':_0x497fad,_0x241d3b);_0x51937b[_0x500be2(0x1cb)]=class extends _0xbbdc41[_0x500be2(0x1bf)]{constructor(_0x54773f=_0x13f15e,_0x835a4f,_0x1ba598){const _0xb5631=_0x500be2;super(),this[_0xb5631(0x1d1)]=_0x54773f,this[_0xb5631(0x182)]=_0x835a4f,this[_0xb5631(0x1bc)]=_0x1ba598;const {..._0x3945cb}=_0xbbdc41[_0xb5631(0x1d8)]({},_0x13f15e,this[_0xb5631(0x1d1)]);this[_0xb5631(0x1bc)][_0xb5631(0x1cf)](_0x45a96b,_0x3945cb);}[_0x500be2(0x172)](){[[_0xd17e27],[_0x13c404],[_0x3a0773]]['forEach'](_0x5a8a02=>{const _0x9f0bb9=_0x8e95;this[_0x9f0bb9(0x182)]['add'](_0x5a8a02);});}[_0x500be2(0x1a6)](){const _0x15825b=_0x500be2;this[_0x15825b(0x182)][_0x15825b(0x1d5)](_0x13c404),this[_0x15825b(0x182)][_0x15825b(0x1d5)](_0x3a0773);}},_0x73c568(_0x51937b[_0x500be2(0x1cb)],_0x500be2(0x1bb),_0x13b5d3),_0x73c568(_0x51937b[_0x500be2(0x1cb)],_0x500be2(0x184),_0xbbdc41[_0x500be2(0x1c5)][_0x500be2(0x19a)]),_0x51937b['UniverThreadCommentDataSourcePlugin']=_0x477214([_0xbbdc41[_0x500be2(0x1d2)](_0x54b669[_0x500be2(0x16b)],_0x43b60a[_0x500be2(0x1e8)],_0x5c078d['UniverLicensePlugin']),_0x3c5b6f(0x1,_0xbbdc41[_0x500be2(0x1e0)](_0xbbdc41[_0x500be2(0x1d0)])),_0x3c5b6f(0x2,_0xbbdc41[_0x500be2(0x1eb)])],_0x51937b[_0x500be2(0x1cb)]),Object[_0x500be2(0x1e1)](_0x51937b,Symbol[_0x500be2(0x1b6)],{'value':_0x500be2(0x187)});}));
|
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-cbd5fac",
|
|
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/
|
|
49
|
-
"@univerjs/core": "0.15.
|
|
50
|
-
"@univerjs-pro/
|
|
51
|
-
"@univerjs/network": "0.15.2",
|
|
52
|
-
"@univerjs/thread-comment": "0.15.2",
|
|
48
|
+
"@univerjs-pro/license": "0.15.3-insiders.20260131-cbd5fac",
|
|
49
|
+
"@univerjs/core": "0.15.3-insiders.20260131-cbd5fac",
|
|
50
|
+
"@univerjs-pro/collaboration-client": "0.15.3-insiders.20260131-cbd5fac",
|
|
53
51
|
"@univerjs/protocol": "0.1.48",
|
|
54
|
-
"@univerjs/
|
|
52
|
+
"@univerjs/network": "0.15.3-insiders.20260131-cbd5fac",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.15.3-insiders.20260131-cbd5fac",
|
|
54
|
+
"@univerjs/thread-comment": "0.15.3-insiders.20260131-cbd5fac"
|
|
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",
|