@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505141607 → 0.7.0-nightly.202505151607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x46c713=_0x28d5;(function(_0x4ba4e3,_0x403e98){const _0x552bcf=_0x28d5,_0x203ada=_0x4ba4e3();while(!![]){try{const _0x493087=-parseInt(_0x552bcf(0x1c9))/0x1*(-parseInt(_0x552bcf(0x1ef))/0x2)+-parseInt(_0x552bcf(0x1a5))/0x3*(parseInt(_0x552bcf(0x1f2))/0x4)+parseInt(_0x552bcf(0x1a8))/0x5*(-parseInt(_0x552bcf(0x18b))/0x6)+-parseInt(_0x552bcf(0x1fe))/0x7+-parseInt(_0x552bcf(0x1df))/0x8+-parseInt(_0x552bcf(0x1ae))/0x9*(-parseInt(_0x552bcf(0x1e3))/0xa)+parseInt(_0x552bcf(0x1b9))/0xb*(parseInt(_0x552bcf(0x1e4))/0xc);if(_0x493087===_0x403e98)break;else _0x203ada['push'](_0x203ada['shift']());}catch(_0x2de66a){_0x203ada['push'](_0x203ada['shift']());}}}(_0x2031,0xc94de));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x46c713(0x1bc)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require(_0x46c713(0x202)),j=require(_0x46c713(0x1c5)),M=require(_0x46c713(0x1c4)),w=require('rxjs'),P=require(_0x46c713(0x1dd)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3bfd70=>(_0x3bfd70[_0x3bfd70['OpenOrReOpen']=0x0]=_0x46c713(0x1b2),_0x3bfd70[_0x3bfd70[_0x46c713(0x204)]=0x1]=_0x46c713(0x204),_0x3bfd70[_0x3bfd70['UNRECOGNIZED']=-0x1]=_0x46c713(0x19a),_0x3bfd70))(I||{}),v=(_0x413cb0=>(_0x413cb0[_0x413cb0[_0x46c713(0x1f9)]=0x0]=_0x46c713(0x1f9),_0x413cb0[_0x413cb0[_0x46c713(0x1b6)]=0x1]=_0x46c713(0x1b6),_0x413cb0[_0x413cb0[_0x46c713(0x190)]=0x2]='Reply',_0x413cb0[_0x413cb0['Edit']=0x3]=_0x46c713(0x194),_0x413cb0[_0x413cb0['Delete']=0x4]=_0x46c713(0x1d7),_0x413cb0[_0x413cb0[_0x46c713(0x1de)]=0x5]=_0x46c713(0x1de),_0x413cb0[_0x413cb0[_0x46c713(0x19a)]=-0x1]=_0x46c713(0x19a),_0x413cb0))(v||{});const f=_0x268dd6=>c['dayjs'](new Date(+_0x268dd6))[_0x46c713(0x196)](_0x46c713(0x1e9)),R=async(_0x5ba07b,_0x4ec5fb)=>{const _0x295717=_0x46c713,_0x26e70b=_0x5ba07b['get'](c['UserManagerService']),_0x521f34=_0x5ba07b['get'](P[_0x295717(0x1dc)]);_0x4ec5fb['forEach'](_0x555757=>{const _0x16de65=_0x295717;_0x26e70b[_0x16de65(0x1f4)](_0x555757)&&_0x4ec5fb[_0x16de65(0x1c8)](_0x555757);}),_0x4ec5fb[_0x295717(0x199)]&&(await _0x521f34['get'](_0x295717(0x1d9),{'params':{'userIDs':[..._0x4ec5fb]}}))[_0x295717(0x1e8)]['users'][_0x295717(0x1d1)](_0x28a319=>{const _0x131039=_0x295717;_0x28a319&&_0x26e70b[_0x131039(0x1b4)](_0x28a319);});};var $=Object['getOwnPropertyDescriptor'],E=(_0xa91494,_0x47c401,_0x541901,_0x574439)=>{const _0x2b0245=_0x46c713;for(var _0x2882e4=_0x574439>0x1?void 0x0:_0x574439?$(_0x47c401,_0x541901):_0x47c401,_0x596f2a=_0xa91494[_0x2b0245(0x1b5)]-0x1,_0x214d75;_0x596f2a>=0x0;_0x596f2a--)(_0x214d75=_0xa91494[_0x596f2a])&&(_0x2882e4=_0x214d75(_0x2882e4)||_0x2882e4);return _0x2882e4;},S=(_0x128fa4,_0x4391c8)=>(_0x5604a1,_0x57d907)=>_0x4391c8(_0x5604a1,_0x57d907,_0x128fa4);let p=class extends c[_0x46c713(0x1e6)]{constructor(_0x5353c9,_0x2478e9,_0xdbbcc4,_0x4cbaf8){const _0x2386c5=_0x46c713;super(),this['_commentService']=_0x5353c9,this[_0x2386c5(0x1ea)]=_0x2478e9,this[_0x2386c5(0x191)]=_0xdbbcc4,this['_injector']=_0x4cbaf8,this[_0x2386c5(0x1fc)](),this['_initUserSync']();}[_0x46c713(0x1a1)](){const _0x3b1b96=_0x46c713;this[_0x3b1b96(0x1f7)](this[_0x3b1b96(0x1ea)][_0x3b1b96(0x20b)][_0x3b1b96(0x1d6)](w[_0x3b1b96(0x1c0)](0x10))[_0x3b1b96(0x195)](_0x53dbc9=>{const _0x11124c=_0x3b1b96,_0x4b1ec0=new Set();_0x53dbc9[_0x11124c(0x1d1)](_0x18dbb7=>{const _0x1daf66=_0x11124c;switch(_0x18dbb7['type']){case _0x1daf66(0x201):{const _0xecb1e4=_0x18dbb7[_0x1daf66(0x1a3)]['personId'];_0x4b1ec0[_0x1daf66(0x201)](_0xecb1e4);break;}}}),R(this[_0x11124c(0x1b3)],_0x4b1ec0);}));}['_init'](){const _0x52a874=_0x46c713;this[_0x52a874(0x1f7)](this['_commentService']['commentUpdate$']['subscribe'](async _0x85d5bf=>{const _0x3f7029=_0x52a874;var _0x1b6474,_0x5e9602,_0x55bae7,_0x39ed10;const _0x37ae8c=(_0x1b6474=this[_0x3f7029(0x1ea)]['getUnit'](_0x85d5bf[_0x3f7029(0x1d8)])[_0x3f7029(0x1c3)](_0x332542=>_0x332542[_0x3f7029(0x1a4)]===_0x85d5bf[_0x3f7029(0x1a4)]))==null?void 0x0:_0x1b6474[_0x3f7029(0x1c6)];if(!_0x37ae8c)return;const {unitId:_0x492446,subUnitId:_0x5ae43f}=_0x37ae8c;switch(_0x85d5bf['user']&&this['_userService'][_0x3f7029(0x1b4)](_0x85d5bf[_0x3f7029(0x1be)]),_0x85d5bf[_0x3f7029(0x1f0)]){case v[_0x3f7029(0x1b6)]:break;case v[_0x3f7029(0x190)]:{this['_threadCommentModel'][_0x3f7029(0x209)](_0x492446,_0x5ae43f,{'unitId':_0x492446,'subUnitId':_0x5ae43f,'ref':'','id':_0x85d5bf[_0x3f7029(0x1c2)],'dT':f(+_0x85d5bf['createTimestamp']),'threadId':_0x85d5bf['threadId'],'personId':(_0x55bae7=(_0x5e9602=_0x85d5bf[_0x3f7029(0x1be)])==null?void 0x0:_0x5e9602[_0x3f7029(0x207)])!=null?_0x55bae7:_0x85d5bf[_0x3f7029(0x1b0)],'text':JSON[_0x3f7029(0x20c)](_0x85d5bf[_0x3f7029(0x1a2)]),'parentId':_0x37ae8c['id']});break;}case v['Delete']:{const _0x1e6956=this[_0x3f7029(0x1ea)][_0x3f7029(0x1e0)](_0x492446,_0x5ae43f,_0x85d5bf['replyId']);_0x1e6956&&_0x1e6956[_0x3f7029(0x200)]&&this[_0x3f7029(0x1ea)][_0x3f7029(0x208)](_0x492446,_0x5ae43f,_0x85d5bf['replyId']);break;}case v[_0x3f7029(0x194)]:{this[_0x3f7029(0x1ea)][_0x3f7029(0x18f)](_0x492446,_0x5ae43f,{'commentId':_0x85d5bf['replyId'],'text':JSON[_0x3f7029(0x20c)](_0x85d5bf[_0x3f7029(0x1a2)])});break;}case v['Solve']:{const _0xc3c6b4=(_0x39ed10=this[_0x3f7029(0x1ea)]['getUnit'](_0x85d5bf[_0x3f7029(0x1d8)])['find'](_0x547622=>_0x547622['threadId']===_0x85d5bf[_0x3f7029(0x1a4)]))==null?void 0x0:_0x39ed10[_0x3f7029(0x1c6)];_0xc3c6b4&&this[_0x3f7029(0x1ea)][_0x3f7029(0x1fb)](_0x492446,_0x5ae43f,_0xc3c6b4['id'],_0x85d5bf[_0x3f7029(0x1e7)]===I[_0x3f7029(0x204)]);break;}}}));}};p=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0x46c713(0x1cb)](M[_0x46c713(0x1e2)])),S(0x2,c['Inject'](c[_0x46c713(0x1ce)])),S(0x3,c[_0x46c713(0x1cb)](c['Injector']))],p);const q=_0x46c713(0x193),D={};var A=Object[_0x46c713(0x1ee)],x=(_0x35d6c6,_0x2c0dbf,_0x463c5f,_0x21e3ff)=>{const _0x1634f2=_0x46c713;for(var _0x4fe36f=_0x21e3ff>0x1?void 0x0:_0x21e3ff?A(_0x2c0dbf,_0x463c5f):_0x2c0dbf,_0x3bc71c=_0x35d6c6[_0x1634f2(0x1b5)]-0x1,_0x39362;_0x3bc71c>=0x0;_0x3bc71c--)(_0x39362=_0x35d6c6[_0x3bc71c])&&(_0x4fe36f=_0x39362(_0x4fe36f)||_0x4fe36f);return _0x4fe36f;},_=(_0x54847d,_0x5299d8)=>(_0x4a71a2,_0x130667)=>_0x5299d8(_0x4a71a2,_0x130667,_0x54847d);function Y(_0x2bdfbc,_0x41213){const _0x5ed997=_0x46c713,_0x5d974d=_0x2bdfbc['replies'][0x0];return{..._0x41213,'id':_0x5d974d[_0x5ed997(0x1c2)],'resolved':_0x2bdfbc['solved']===0x1,'dT':f(_0x5d974d[_0x5ed997(0x1cc)]),'personId':_0x5d974d[_0x5ed997(0x1b0)],'threadId':_0x5d974d[_0x5ed997(0x1a4)]};}function G(_0x19ede5,_0x1257c2,_0x16b1b0){const _0x5825e2=_0x46c713;var _0x4102cb,_0x55379a;if(((_0x55379a=(_0x4102cb=_0x19ede5==null?void 0x0:_0x19ede5[_0x5825e2(0x205)])==null?void 0x0:_0x4102cb[_0x5825e2(0x1b5)])!=null?_0x55379a:0x0)>0x0){const _0x4ac20b=(_0x547e1a,_0x573541)=>({'id':_0x547e1a[_0x5825e2(0x1c2)],'threadId':_0x547e1a[_0x5825e2(0x1a4)],'dT':f(_0x547e1a['createTimestamp']),'personId':_0x547e1a[_0x5825e2(0x1b0)],'resolved':_0x19ede5[_0x5825e2(0x1e7)]===I[_0x5825e2(0x204)],'unitId':_0x1257c2,'subUnitId':_0x16b1b0,'text':JSON[_0x5825e2(0x20c)](_0x547e1a['content']),'parentId':_0x573541}),_0x4163eb=_0x4ac20b(_0x19ede5[_0x5825e2(0x205)][0x0]);return{..._0x4163eb,'children':_0x19ede5['replies']['slice'](0x1)[_0x5825e2(0x19f)](_0x3e3093=>_0x4ac20b(_0x3e3093,_0x4163eb['id']))};}return null;}let g=class{constructor(_0x3de644,_0x397f4c,_0x502bdd,_0x36d59c){const _0x5f45d9=_0x46c713;this[_0x5f45d9(0x1ff)]=_0x3de644,this[_0x5f45d9(0x191)]=_0x397f4c,this[_0x5f45d9(0x1f6)]=_0x502bdd,this['_injector']=_0x36d59c;}async[_0x46c713(0x209)](_0x41833a){const _0x280a0d=_0x46c713;var _0x446ecd,_0x4ccc59;const {parentId:_0x3529c7,unitId:_0x4eb209,text:_0x43c267,threadId:_0x5c06fc}=_0x41833a,_0x16b365=(_0x4ccc59=(_0x446ecd=_0x43c267[_0x280a0d(0x19e)])==null?void 0x0:_0x446ecd[_0x280a0d(0x192)](_0x2ac561=>_0x2ac561[_0x280a0d(0x1b8)]===c['CustomRangeType']['COMMENT'])[_0x280a0d(0x19f)](_0x532259=>_0x532259[_0x280a0d(0x1ba)]))!=null?_0x4ccc59:[],_0x51c747=JSON[_0x280a0d(0x20a)](_0x43c267),_0x1da014=(await this['_sessionService'][_0x280a0d(0x1d2)](_0x4eb209))['getMemberID']();if(_0x3529c7){const _0x4bd421={'memberId':_0x1da014,'unitId':_0x4eb209,'content':_0x51c747,'mention':_0x16b365,'threadId':_0x5c06fc},_0x16694d=(await this[_0x280a0d(0x1ff)][_0x280a0d(0x1a9)](_0x280a0d(0x1f3)+_0x4eb209+_0x280a0d(0x197),{'body':_0x4bd421}))[_0x280a0d(0x1e8)][_0x280a0d(0x1da)];return{..._0x41833a,'id':_0x16694d['replyId'],'dT':c[_0x280a0d(0x1d0)](+_0x16694d[_0x280a0d(0x1cc)])[_0x280a0d(0x196)](_0x280a0d(0x1e9)),'personId':_0x16694d[_0x280a0d(0x1b0)]};}else{const _0x365557={'memberId':_0x1da014,'unitId':_0x4eb209,'content':_0x51c747,'mention':_0x16b365},_0x3687ef=await this[_0x280a0d(0x1ff)]['post'](_0x280a0d(0x1f3)+_0x4eb209+'/add',{'body':_0x365557});return Y(_0x3687ef['body']['comment'],_0x41833a);}}async[_0x46c713(0x18f)](_0x35b73b){const _0x1fc1cc=_0x46c713;var _0x198893,_0xe00cbb;const {text:_0x52376e,unitId:_0x289f66}=_0x35b73b,_0x1c910a=(_0xe00cbb=(_0x198893=_0x52376e[_0x1fc1cc(0x19e)])==null?void 0x0:_0x198893[_0x1fc1cc(0x192)](_0x2059a3=>_0x2059a3[_0x1fc1cc(0x1b8)]===c[_0x1fc1cc(0x1fa)][_0x1fc1cc(0x1d5)])['map'](_0x87d8f1=>_0x87d8f1[_0x1fc1cc(0x1ba)]))!=null?_0xe00cbb:[],_0x133fa9=JSON['stringify'](_0x52376e),_0x3b164e=_0x35b73b[_0x1fc1cc(0x1a4)],_0x289992=_0x35b73b['id'],_0xe40726={'memberId':(await this[_0x1fc1cc(0x1f6)]['requireSession'](_0x289f66))[_0x1fc1cc(0x1cf)](),'unitId':_0x289f66,'threadId':_0x3b164e,'mention':_0x1c910a,'content':_0x133fa9,'replyId':_0x289992},_0x4e16d1=await this[_0x1fc1cc(0x1ff)][_0x1fc1cc(0x1a9)]('/universer-api/comment/unit/'+_0x289f66+_0x1fc1cc(0x1d4),{'body':_0xe40726});return!_0x4e16d1[_0x1fc1cc(0x1e8)][_0x1fc1cc(0x18e)]||_0x4e16d1[_0x1fc1cc(0x1e8)][_0x1fc1cc(0x18e)][_0x1fc1cc(0x1a6)]===0x1;}async[_0x46c713(0x1fb)](_0x49f589){const _0x1c1046=_0x46c713,{unitId:_0x3c3227}=_0x49f589,_0x276061=_0x49f589['threadId'],_0x53cfc5={'memberId':this[_0x1c1046(0x191)][_0x1c1046(0x1db)]()['userID'],'unitId':_0x3c3227,'threadId':_0x276061,'solved':_0x49f589[_0x1c1046(0x1d3)]?I[_0x1c1046(0x204)]:I[_0x1c1046(0x1b2)]},_0x389e21=await this[_0x1c1046(0x1ff)][_0x1c1046(0x1a9)]('/universer-api/comment/unit/'+_0x3c3227+_0x1c1046(0x198),{'body':_0x53cfc5});return!_0x389e21[_0x1c1046(0x1e8)]['error']||_0x389e21[_0x1c1046(0x1e8)][_0x1c1046(0x18e)][_0x1c1046(0x1a6)]===0x1;}async['deleteComment'](_0x401a1e,_0x36b1d2,_0x48e476,_0x28c9c2){const _0x408cf1=_0x46c713,_0x13c109={'memberId':(await this[_0x408cf1(0x1f6)][_0x408cf1(0x1d2)](_0x401a1e))['getMemberID'](),'threadId':_0x48e476,'replyId':_0x28c9c2,'unitId':_0x401a1e},_0x3b9366=await this[_0x408cf1(0x1ff)][_0x408cf1(0x1a9)](_0x408cf1(0x1f3)+_0x401a1e+_0x408cf1(0x1af),{'body':_0x13c109});return!_0x3b9366[_0x408cf1(0x1e8)][_0x408cf1(0x18e)]||_0x3b9366[_0x408cf1(0x1e8)][_0x408cf1(0x18e)][_0x408cf1(0x1a6)]===0x1;}async[_0x46c713(0x1ac)](_0x5dcef6,_0x5be741,_0x2bfc80){const _0x59a10d=_0x46c713,_0x3be433={'unitId':_0x5dcef6,'threadId':_0x2bfc80},_0x25ef0d=await this[_0x59a10d(0x1ff)][_0x59a10d(0x1a9)](_0x59a10d(0x1f3)+_0x5dcef6+_0x59a10d(0x206),{'body':_0x3be433}),_0x235883=_0x2bfc80['map'](_0x407483=>G(_0x25ef0d[_0x59a10d(0x1e8)][_0x59a10d(0x1f1)][_0x407483],_0x5dcef6,_0x5be741))[_0x59a10d(0x192)](Boolean);return Object[_0x59a10d(0x1fd)](_0x25ef0d['body'][_0x59a10d(0x1ed)])[_0x59a10d(0x1d1)](_0xd4f862=>{const _0x4c4bb0=_0x59a10d;this[_0x4c4bb0(0x191)][_0x4c4bb0(0x1b4)](_0xd4f862);}),_0x235883;}[_0x46c713(0x1c7)](_0x49a53b){const _0x32bddc=_0x46c713;return{'id':_0x49a53b['id'],'threadId':_0x49a53b[_0x32bddc(0x1a4)],'ref':_0x49a53b[_0x32bddc(0x1cd)]};}};g=x([_(0x0,c[_0x46c713(0x1cb)](P[_0x46c713(0x1dc)])),_(0x1,c[_0x46c713(0x1cb)](c['UserManagerService'])),_(0x2,c[_0x46c713(0x1cb)](b[_0x46c713(0x1ab)])),_(0x3,c[_0x46c713(0x1cb)](c['Injector']))],g);var H=Object[_0x46c713(0x1ee)],J=(_0x48abcd,_0x48781a,_0x3773dc,_0x2059e9)=>{for(var _0x572ff=_0x2059e9>0x1?void 0x0:_0x2059e9?H(_0x48781a,_0x3773dc):_0x48781a,_0x11a8bf=_0x48abcd['length']-0x1,_0x5ba9a9;_0x11a8bf>=0x0;_0x11a8bf--)(_0x5ba9a9=_0x48abcd[_0x11a8bf])&&(_0x572ff=_0x5ba9a9(_0x572ff)||_0x572ff);return _0x572ff;},y=(_0x3a356c,_0xfe899a)=>(_0x2c9a30,_0x227abb)=>_0xfe899a(_0x2c9a30,_0x227abb,_0x3a356c);let C=class extends c[_0x46c713(0x1e6)]{constructor(_0x5bda51,_0x10bbec){const _0x4dafd6=_0x46c713;super(),this[_0x4dafd6(0x1e1)]=_0x5bda51,this[_0x4dafd6(0x1a0)]=_0x10bbec,this[_0x4dafd6(0x1aa)]();}[_0x46c713(0x1aa)](){const _0x4911e0=_0x46c713;this['_threadCommentDataSourceService'][_0x4911e0(0x1bb)]=this[_0x4911e0(0x1a0)],this[_0x4911e0(0x1e1)][_0x4911e0(0x1e5)]=!0x1;}};C=J([y(0x0,M[_0x46c713(0x18c)]),y(0x1,c[_0x46c713(0x1cb)](g))],C);function _0x28d5(_0x246c48,_0x589879){const _0x20315a=_0x2031();return _0x28d5=function(_0x28d556,_0x44ddb8){_0x28d556=_0x28d556-0x18b;let _0x502a8b=_0x20315a[_0x28d556];return _0x502a8b;},_0x28d5(_0x246c48,_0x589879);}var F=Object[_0x46c713(0x203)],L=Object[_0x46c713(0x1ee)],Z=(_0xd00cf,_0x410264,_0xec52bc)=>_0x410264 in _0xd00cf?F(_0xd00cf,_0x410264,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xec52bc}):_0xd00cf[_0x410264]=_0xec52bc,W=(_0x46a0ee,_0x58487d,_0x2235cb,_0x4ef758)=>{const _0x2020a5=_0x46c713;for(var _0x3a82a7=_0x4ef758>0x1?void 0x0:_0x4ef758?L(_0x58487d,_0x2235cb):_0x58487d,_0x454493=_0x46a0ee[_0x2020a5(0x1b5)]-0x1,_0x4d10a2;_0x454493>=0x0;_0x454493--)(_0x4d10a2=_0x46a0ee[_0x454493])&&(_0x3a82a7=_0x4d10a2(_0x3a82a7)||_0x3a82a7);return _0x3a82a7;},O=(_0x566455,_0xd73372)=>(_0x2ceb27,_0x95dc3c)=>_0xd73372(_0x2ceb27,_0x95dc3c,_0x566455),N=(_0x4321b4,_0x1d34b8,_0x653fd8)=>Z(_0x4321b4,typeof _0x1d34b8!='symbol'?_0x1d34b8+'':_0x1d34b8,_0x653fd8);function _0x2031(){const _0x16751f=['Unknown','CustomRangeType','resolveComment','_init','values','3043012mwbKbF','_httpService','parentId','add','@univerjs/core','defineProperty','Solved','replies','/list','userID','deleteComment','addComment','stringify','commentUpdate$','parse','264798hQKdDc','IThreadCommentDataSourceService','_configService','error','updateComment','Reply','_userService','filter','thread-comment-data-source.config','Edit','subscribe','format','/reply','/solved','size','UNRECOGNIZED','UniverInstanceType','pluginName','onStarting','customRanges','map','_threadCommentDataSource','_initUserSync','content','payload','threadId','9282oXgZnX','code','UNIVER_UNKNOWN','35YqvCSr','post','_initDataSource','CollaborationSessionService','listComments','IConfigService','9uGlNxh','/delete','userId','setConfig','OpenOrReOpen','_injector','addUser','length','Add','UniverLicensePlugin','rangeType','55uwYHcP','rangeId','dataSource','Module','UniverCollaborationClientPlugin','user','get','bufferTime','DependentOn','replyId','find','@univerjs/thread-comment','@univerjs/thread-comment-ui','root','saveCommentToSnapshot','delete','1292212MfXhfP','_config','Inject','createTimestamp','ref','UserManagerService','getMemberID','dayjs','forEach','requireSession','resolved','/edit','COMMENT','pipe','Delete','unitId','/universer-api/user/list','reply','getCurrentUser','HTTPService','@univerjs/network','Solve','6233064OyYvfP','getComment','_threadCommentDataSourceService','ThreadCommentModel','12456760wxvIDD','3025248vQgMrd','syncUpdateMutationToColla','Disposable','solved','body','YYYY/MM/DD\x20HH:mm','_threadCommentModel','UniverThreadCommentDataSourcePlugin','Injector','users','getOwnPropertyDescriptor','2OLKILC','type','comments','1876sjopmL','/universer-api/comment/unit/','getUser','onReady','_sessionService','disposeWithMe','UniverThreadCommentUIPlugin'];_0x2031=function(){return _0x16751f;};return _0x2031();}exports[_0x46c713(0x1eb)]=class extends c['Plugin']{constructor(_0x117487=D,_0x4ccdc3,_0x48d3a6){const _0x1d329e=_0x46c713;super(),this[_0x1d329e(0x1ca)]=_0x117487,this[_0x1d329e(0x1b3)]=_0x4ccdc3,this[_0x1d329e(0x18d)]=_0x48d3a6;const {..._0x45a2d6}=c['merge']({},D,this[_0x1d329e(0x1ca)]);this[_0x1d329e(0x18d)][_0x1d329e(0x1b1)](q,_0x45a2d6);}[_0x46c713(0x19d)](){[[g],[C],[p]]['forEach'](_0x271424=>{const _0x490710=_0x28d5;this[_0x490710(0x1b3)][_0x490710(0x201)](_0x271424);});}[_0x46c713(0x1f5)](){const _0xb4e60e=_0x46c713;this['_injector']['get'](C),this[_0xb4e60e(0x1b3)][_0xb4e60e(0x1bf)](p);}},N(exports[_0x46c713(0x1eb)],_0x46c713(0x19c),U),N(exports[_0x46c713(0x1eb)],_0x46c713(0x1f0),c[_0x46c713(0x19b)][_0x46c713(0x1a7)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x46c713(0x1c1)](j[_0x46c713(0x1f8)],b[_0x46c713(0x1bd)],T[_0x46c713(0x1b7)]),O(0x1,c['Inject'](c[_0x46c713(0x1ec)])),O(0x2,c[_0x46c713(0x1ad)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0xa0fa3b=_0x339d;(function(_0x3975f7,_0x145c70){const _0x4ca372=_0x339d,_0x336cec=_0x3975f7();while(!![]){try{const _0x142900=-parseInt(_0x4ca372(0x177))/0x1*(parseInt(_0x4ca372(0x178))/0x2)+parseInt(_0x4ca372(0x15f))/0x3+parseInt(_0x4ca372(0x190))/0x4*(-parseInt(_0x4ca372(0x186))/0x5)+-parseInt(_0x4ca372(0x1b6))/0x6+parseInt(_0x4ca372(0x17c))/0x7*(parseInt(_0x4ca372(0x1bd))/0x8)+-parseInt(_0x4ca372(0x1ad))/0x9+-parseInt(_0x4ca372(0x195))/0xa*(-parseInt(_0x4ca372(0x15d))/0xb);if(_0x142900===_0x145c70)break;else _0x336cec['push'](_0x336cec['shift']());}catch(_0x3ce330){_0x336cec['push'](_0x336cec['shift']());}}}(_0x373c,0xd335e));Object['defineProperty'](exports,Symbol[_0xa0fa3b(0x17d)],{'value':_0xa0fa3b(0x1a7)});const b=require(_0xa0fa3b(0x196)),T=require(_0xa0fa3b(0x188)),c=require(_0xa0fa3b(0x1a1)),j=require(_0xa0fa3b(0x16b)),M=require(_0xa0fa3b(0x1a2)),w=require(_0xa0fa3b(0x18f)),P=require(_0xa0fa3b(0x1ab)),U=_0xa0fa3b(0x19f);var I=(_0x163a9d=>(_0x163a9d[_0x163a9d[_0xa0fa3b(0x1b1)]=0x0]=_0xa0fa3b(0x1b1),_0x163a9d[_0x163a9d['Solved']=0x1]=_0xa0fa3b(0x194),_0x163a9d[_0x163a9d[_0xa0fa3b(0x1a5)]=-0x1]='UNRECOGNIZED',_0x163a9d))(I||{}),v=(_0x4b301f=>(_0x4b301f[_0x4b301f[_0xa0fa3b(0x18b)]=0x0]=_0xa0fa3b(0x18b),_0x4b301f[_0x4b301f[_0xa0fa3b(0x191)]=0x1]='Add',_0x4b301f[_0x4b301f[_0xa0fa3b(0x162)]=0x2]='Reply',_0x4b301f[_0x4b301f['Edit']=0x3]=_0xa0fa3b(0x1b0),_0x4b301f[_0x4b301f['Delete']=0x4]=_0xa0fa3b(0x1bb),_0x4b301f[_0x4b301f[_0xa0fa3b(0x1b2)]=0x5]=_0xa0fa3b(0x1b2),_0x4b301f[_0x4b301f[_0xa0fa3b(0x1a5)]=-0x1]=_0xa0fa3b(0x1a5),_0x4b301f))(v||{});const f=_0x54d32b=>c[_0xa0fa3b(0x154)](new Date(+_0x54d32b))[_0xa0fa3b(0x1c7)](_0xa0fa3b(0x1af)),R=async(_0x378057,_0x572d40)=>{const _0x11517=_0xa0fa3b,_0x55a1ab=_0x378057[_0x11517(0x179)](c['UserManagerService']),_0x2b8ea3=_0x378057[_0x11517(0x179)](P[_0x11517(0x187)]);_0x572d40[_0x11517(0x1a8)](_0x3dcac9=>{const _0x130785=_0x11517;_0x55a1ab[_0x130785(0x1a9)](_0x3dcac9)&&_0x572d40[_0x130785(0x15e)](_0x3dcac9);}),_0x572d40[_0x11517(0x197)]&&(await _0x2b8ea3[_0x11517(0x179)](_0x11517(0x19c),{'params':{'userIDs':[..._0x572d40]}}))[_0x11517(0x181)][_0x11517(0x1cd)]['forEach'](_0x8f2184=>{const _0x52ca30=_0x11517;_0x8f2184&&_0x55a1ab[_0x52ca30(0x1be)](_0x8f2184);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x32dd92,_0x4f0f59,_0x2a7f68,_0x2b081b)=>{const _0x6f8f1=_0xa0fa3b;for(var _0x1b9daf=_0x2b081b>0x1?void 0x0:_0x2b081b?$(_0x4f0f59,_0x2a7f68):_0x4f0f59,_0x3e7b83=_0x32dd92[_0x6f8f1(0x1c4)]-0x1,_0x266dc1;_0x3e7b83>=0x0;_0x3e7b83--)(_0x266dc1=_0x32dd92[_0x3e7b83])&&(_0x1b9daf=_0x266dc1(_0x1b9daf)||_0x1b9daf);return _0x1b9daf;},S=(_0x306c27,_0xab2978)=>(_0x26ebbb,_0x1b3611)=>_0xab2978(_0x26ebbb,_0x1b3611,_0x306c27);let p=class extends c[_0xa0fa3b(0x1a6)]{constructor(_0x1395d1,_0x9f8d7d,_0x293a38,_0x543f41){const _0x49d226=_0xa0fa3b;super(),this[_0x49d226(0x1cc)]=_0x1395d1,this[_0x49d226(0x193)]=_0x9f8d7d,this['_userService']=_0x293a38,this[_0x49d226(0x1c5)]=_0x543f41,this['_init'](),this[_0x49d226(0x170)]();}['_initUserSync'](){const _0x397f70=_0xa0fa3b;this['disposeWithMe'](this[_0x397f70(0x193)][_0x397f70(0x1c1)]['pipe'](w[_0x397f70(0x157)](0x10))['subscribe'](_0x2bb4cd=>{const _0x1e9f74=_0x397f70,_0x388f0f=new Set();_0x2bb4cd[_0x1e9f74(0x1a8)](_0x3c0908=>{const _0x4c5ec3=_0x1e9f74;switch(_0x3c0908[_0x4c5ec3(0x1ba)]){case _0x4c5ec3(0x1c2):{const _0x4eab73=_0x3c0908[_0x4c5ec3(0x164)][_0x4c5ec3(0x1b8)];_0x388f0f[_0x4c5ec3(0x1c2)](_0x4eab73);break;}}}),R(this[_0x1e9f74(0x1c5)],_0x388f0f);}));}[_0xa0fa3b(0x174)](){const _0x29dcf4=_0xa0fa3b;this[_0x29dcf4(0x1ce)](this[_0x29dcf4(0x1cc)][_0x29dcf4(0x1c1)]['subscribe'](async _0xf5ec0a=>{const _0x347551=_0x29dcf4;var _0x24fdf0,_0x49e96e,_0x148fdb,_0x3f3bd6;const _0x306463=(_0x24fdf0=this['_threadCommentModel'][_0x347551(0x19a)](_0xf5ec0a['unitId'])[_0x347551(0x185)](_0x5a3c64=>_0x5a3c64[_0x347551(0x1b5)]===_0xf5ec0a['threadId']))==null?void 0x0:_0x24fdf0['root'];if(!_0x306463)return;const {unitId:_0x4fceee,subUnitId:_0x2f56b2}=_0x306463;switch(_0xf5ec0a[_0x347551(0x184)]&&this[_0x347551(0x156)][_0x347551(0x1be)](_0xf5ec0a['user']),_0xf5ec0a[_0x347551(0x1ba)]){case v[_0x347551(0x191)]:break;case v[_0x347551(0x162)]:{this[_0x347551(0x193)][_0x347551(0x175)](_0x4fceee,_0x2f56b2,{'unitId':_0x4fceee,'subUnitId':_0x2f56b2,'ref':'','id':_0xf5ec0a[_0x347551(0x169)],'dT':f(+_0xf5ec0a[_0x347551(0x1ca)]),'threadId':_0xf5ec0a[_0x347551(0x1b5)],'personId':(_0x148fdb=(_0x49e96e=_0xf5ec0a[_0x347551(0x184)])==null?void 0x0:_0x49e96e['userID'])!=null?_0x148fdb:_0xf5ec0a['userId'],'text':JSON[_0x347551(0x161)](_0xf5ec0a[_0x347551(0x15c)]),'parentId':_0x306463['id']});break;}case v[_0x347551(0x1bb)]:{const _0x1b1969=this['_threadCommentModel'][_0x347551(0x189)](_0x4fceee,_0x2f56b2,_0xf5ec0a['replyId']);_0x1b1969&&_0x1b1969['parentId']&&this[_0x347551(0x193)][_0x347551(0x18c)](_0x4fceee,_0x2f56b2,_0xf5ec0a[_0x347551(0x169)]);break;}case v[_0x347551(0x1b0)]:{this[_0x347551(0x193)][_0x347551(0x1a4)](_0x4fceee,_0x2f56b2,{'commentId':_0xf5ec0a[_0x347551(0x169)],'text':JSON[_0x347551(0x161)](_0xf5ec0a[_0x347551(0x15c)])});break;}case v['Solve']:{const _0x20ffc5=(_0x3f3bd6=this[_0x347551(0x193)][_0x347551(0x19a)](_0xf5ec0a[_0x347551(0x17b)])[_0x347551(0x185)](_0x17fafb=>_0x17fafb[_0x347551(0x1b5)]===_0xf5ec0a[_0x347551(0x1b5)]))==null?void 0x0:_0x3f3bd6[_0x347551(0x18d)];_0x20ffc5&&this['_threadCommentModel'][_0x347551(0x1bc)](_0x4fceee,_0x2f56b2,_0x20ffc5['id'],_0xf5ec0a[_0x347551(0x17a)]===I[_0x347551(0x194)]);break;}}}));}};function _0x339d(_0x6aaa3f,_0x34a84c){const _0x373ccb=_0x373c();return _0x339d=function(_0x339d98,_0x1b010a){_0x339d98=_0x339d98-0x150;let _0x2280ac=_0x373ccb[_0x339d98];return _0x2280ac;},_0x339d(_0x6aaa3f,_0x34a84c);}p=E([S(0x0,c['Inject'](b[_0xa0fa3b(0x19e)])),S(0x1,c[_0xa0fa3b(0x150)](M[_0xa0fa3b(0x1b7)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c[_0xa0fa3b(0x150)](c[_0xa0fa3b(0x155)]))],p);const q=_0xa0fa3b(0x1c6),D={};function _0x373c(){const _0x50ba59=['get','solved','unitId','77ptIgQt','toStringTag','getMemberID','setConfig','UniverThreadCommentDataSourcePlugin','body','CustomRangeType','code','user','find','4896665dYbSaH','HTTPService','@univerjs-pro/license','getComment','COMMENT','Unknown','deleteComment','root','/delete','rxjs','4eUyGbm','Add','/solved','_threadCommentModel','Solved','20144710XpxoYb','@univerjs-pro/collaboration-client','size','userId','onStarting','getUnit','_threadCommentDataSourceService','/universer-api/user/list','userID','CommentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','filter','@univerjs/core','@univerjs/thread-comment','onReady','updateComment','UNRECOGNIZED','Disposable','Module','forEach','getUser','defineProperty','@univerjs/network','UniverLicensePlugin','368712ngVTcR','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','Edit','OpenOrReOpen','Solve','_config','CollaborationSessionService','threadId','7001724gHnLIP','ThreadCommentModel','personId','_configService','type','Delete','resolveComment','720152PdvONs','addUser','map','comments','commentUpdate$','add','values','length','_injector','thread-comment-data-source.config','format','stringify','rangeType','createTimestamp','merge','_commentService','users','disposeWithMe','error','Inject','dataSource','requireSession','ref','dayjs','Injector','_userService','bufferTime','saveCommentToSnapshot','/list','symbol','replies','content','11hXUGWa','delete','1597740CGSldc','getOwnPropertyDescriptor','parse','Reply','UniverInstanceType','payload','_threadCommentDataSource','_httpService','UniverCollaborationClientPlugin','post','replyId','_initDataSource','@univerjs/thread-comment-ui','listComments','IConfigService','_sessionService','/edit','_initUserSync','rangeId','customRanges','UniverThreadCommentUIPlugin','_init','addComment','getCurrentUser','484887niZgan','2qpSbTA'];_0x373c=function(){return _0x50ba59;};return _0x373c();}var A=Object['getOwnPropertyDescriptor'],x=(_0x907657,_0x400d34,_0x1f9232,_0x1f4bdc)=>{const _0x420433=_0xa0fa3b;for(var _0x48bf7b=_0x1f4bdc>0x1?void 0x0:_0x1f4bdc?A(_0x400d34,_0x1f9232):_0x400d34,_0x20ac40=_0x907657[_0x420433(0x1c4)]-0x1,_0x8b6f17;_0x20ac40>=0x0;_0x20ac40--)(_0x8b6f17=_0x907657[_0x20ac40])&&(_0x48bf7b=_0x8b6f17(_0x48bf7b)||_0x48bf7b);return _0x48bf7b;},_=(_0x1f2af6,_0x9c5661)=>(_0xa3a6ce,_0xe5677f)=>_0x9c5661(_0xa3a6ce,_0xe5677f,_0x1f2af6);function Y(_0x3e3d35,_0x125cfa){const _0x1a0da7=_0xa0fa3b,_0x294c91=_0x3e3d35[_0x1a0da7(0x15b)][0x0];return{..._0x125cfa,'id':_0x294c91[_0x1a0da7(0x169)],'resolved':_0x3e3d35[_0x1a0da7(0x17a)]===0x1,'dT':f(_0x294c91[_0x1a0da7(0x1ca)]),'personId':_0x294c91[_0x1a0da7(0x198)],'threadId':_0x294c91['threadId']};}function G(_0x542494,_0x591cd8,_0x5d475e){const _0x513e50=_0xa0fa3b;var _0x4fd4ab,_0x5e7ef1;if(((_0x5e7ef1=(_0x4fd4ab=_0x542494==null?void 0x0:_0x542494[_0x513e50(0x15b)])==null?void 0x0:_0x4fd4ab['length'])!=null?_0x5e7ef1:0x0)>0x0){const _0x279be6=(_0x47d089,_0x2d19af)=>({'id':_0x47d089[_0x513e50(0x169)],'threadId':_0x47d089['threadId'],'dT':f(_0x47d089[_0x513e50(0x1ca)]),'personId':_0x47d089[_0x513e50(0x198)],'resolved':_0x542494[_0x513e50(0x17a)]===I['Solved'],'unitId':_0x591cd8,'subUnitId':_0x5d475e,'text':JSON[_0x513e50(0x161)](_0x47d089[_0x513e50(0x15c)]),'parentId':_0x2d19af}),_0xaa1a76=_0x279be6(_0x542494[_0x513e50(0x15b)][0x0]);return{..._0xaa1a76,'children':_0x542494[_0x513e50(0x15b)]['slice'](0x1)['map'](_0x22aa2c=>_0x279be6(_0x22aa2c,_0xaa1a76['id']))};}return null;}let g=class{constructor(_0x1c6a55,_0x43cfff,_0x93c214,_0x3d0e2b){const _0x1d6316=_0xa0fa3b;this[_0x1d6316(0x166)]=_0x1c6a55,this[_0x1d6316(0x156)]=_0x43cfff,this[_0x1d6316(0x16e)]=_0x93c214,this['_injector']=_0x3d0e2b;}async[_0xa0fa3b(0x175)](_0x2ed79f){const _0xb0066a=_0xa0fa3b;var _0x12e5ea,_0x5da371;const {parentId:_0x38be63,unitId:_0xb81520,text:_0x1e40f1,threadId:_0x10aa18}=_0x2ed79f,_0x5d5def=(_0x5da371=(_0x12e5ea=_0x1e40f1[_0xb0066a(0x172)])==null?void 0x0:_0x12e5ea[_0xb0066a(0x1a0)](_0xa5797f=>_0xa5797f[_0xb0066a(0x1c9)]===c['CustomRangeType'][_0xb0066a(0x18a)])[_0xb0066a(0x1bf)](_0x17a958=>_0x17a958[_0xb0066a(0x171)]))!=null?_0x5da371:[],_0x3310f8=JSON[_0xb0066a(0x1c8)](_0x1e40f1),_0x15e0af=(await this[_0xb0066a(0x16e)][_0xb0066a(0x152)](_0xb81520))[_0xb0066a(0x17e)]();if(_0x38be63){const _0x4c58a1={'memberId':_0x15e0af,'unitId':_0xb81520,'content':_0x3310f8,'mention':_0x5d5def,'threadId':_0x10aa18},_0x49ee2e=(await this[_0xb0066a(0x166)][_0xb0066a(0x168)](_0xb0066a(0x1ae)+_0xb81520+'/reply',{'body':_0x4c58a1}))[_0xb0066a(0x181)]['reply'];return{..._0x2ed79f,'id':_0x49ee2e['replyId'],'dT':c[_0xb0066a(0x154)](+_0x49ee2e[_0xb0066a(0x1ca)])[_0xb0066a(0x1c7)](_0xb0066a(0x1af)),'personId':_0x49ee2e[_0xb0066a(0x198)]};}else{const _0x29dd9c={'memberId':_0x15e0af,'unitId':_0xb81520,'content':_0x3310f8,'mention':_0x5d5def},_0x209307=await this[_0xb0066a(0x166)]['post'](_0xb0066a(0x1ae)+_0xb81520+'/add',{'body':_0x29dd9c});return Y(_0x209307[_0xb0066a(0x181)]['comment'],_0x2ed79f);}}async[_0xa0fa3b(0x1a4)](_0x2312ac){const _0x20081b=_0xa0fa3b;var _0x587f2f,_0x4d51d3;const {text:_0x33ccf1,unitId:_0x5b8022}=_0x2312ac,_0x31ca88=(_0x4d51d3=(_0x587f2f=_0x33ccf1['customRanges'])==null?void 0x0:_0x587f2f[_0x20081b(0x1a0)](_0xbab391=>_0xbab391['rangeType']===c[_0x20081b(0x182)][_0x20081b(0x18a)])[_0x20081b(0x1bf)](_0x57f11b=>_0x57f11b[_0x20081b(0x171)]))!=null?_0x4d51d3:[],_0x1ec525=JSON['stringify'](_0x33ccf1),_0x3918af=_0x2312ac[_0x20081b(0x1b5)],_0x222a10=_0x2312ac['id'],_0x17c01f={'memberId':(await this['_sessionService']['requireSession'](_0x5b8022))[_0x20081b(0x17e)](),'unitId':_0x5b8022,'threadId':_0x3918af,'mention':_0x31ca88,'content':_0x1ec525,'replyId':_0x222a10},_0x592e57=await this[_0x20081b(0x166)][_0x20081b(0x168)](_0x20081b(0x1ae)+_0x5b8022+_0x20081b(0x16f),{'body':_0x17c01f});return!_0x592e57[_0x20081b(0x181)]['error']||_0x592e57[_0x20081b(0x181)]['error'][_0x20081b(0x183)]===0x1;}async['resolveComment'](_0x9d9653){const _0x2af040=_0xa0fa3b,{unitId:_0x76b739}=_0x9d9653,_0x42afd1=_0x9d9653[_0x2af040(0x1b5)],_0x7ec7f0={'memberId':this[_0x2af040(0x156)][_0x2af040(0x176)]()[_0x2af040(0x19d)],'unitId':_0x76b739,'threadId':_0x42afd1,'solved':_0x9d9653['resolved']?I[_0x2af040(0x194)]:I[_0x2af040(0x1b1)]},_0x219b86=await this[_0x2af040(0x166)][_0x2af040(0x168)](_0x2af040(0x1ae)+_0x76b739+_0x2af040(0x192),{'body':_0x7ec7f0});return!_0x219b86[_0x2af040(0x181)][_0x2af040(0x1cf)]||_0x219b86[_0x2af040(0x181)][_0x2af040(0x1cf)][_0x2af040(0x183)]===0x1;}async[_0xa0fa3b(0x18c)](_0x410e20,_0x479098,_0x28ed2d,_0x2de48f){const _0x48f258=_0xa0fa3b,_0x2cde6c={'memberId':(await this[_0x48f258(0x16e)][_0x48f258(0x152)](_0x410e20))[_0x48f258(0x17e)](),'threadId':_0x28ed2d,'replyId':_0x2de48f,'unitId':_0x410e20},_0x497ef6=await this[_0x48f258(0x166)][_0x48f258(0x168)]('/universer-api/comment/unit/'+_0x410e20+_0x48f258(0x18e),{'body':_0x2cde6c});return!_0x497ef6[_0x48f258(0x181)][_0x48f258(0x1cf)]||_0x497ef6[_0x48f258(0x181)][_0x48f258(0x1cf)][_0x48f258(0x183)]===0x1;}async[_0xa0fa3b(0x16c)](_0x366488,_0x2f1966,_0x3b98cf){const _0xf9cf79=_0xa0fa3b,_0x40df4e={'unitId':_0x366488,'threadId':_0x3b98cf},_0x2c22cb=await this['_httpService'][_0xf9cf79(0x168)](_0xf9cf79(0x1ae)+_0x366488+_0xf9cf79(0x159),{'body':_0x40df4e}),_0x53072c=_0x3b98cf['map'](_0x4afcaa=>G(_0x2c22cb[_0xf9cf79(0x181)][_0xf9cf79(0x1c0)][_0x4afcaa],_0x366488,_0x2f1966))['filter'](Boolean);return Object[_0xf9cf79(0x1c3)](_0x2c22cb['body'][_0xf9cf79(0x1cd)])[_0xf9cf79(0x1a8)](_0xbcc9de=>{const _0xa22538=_0xf9cf79;this['_userService'][_0xa22538(0x1be)](_0xbcc9de);}),_0x53072c;}[_0xa0fa3b(0x158)](_0xebbdaa){const _0x27c9f5=_0xa0fa3b;return{'id':_0xebbdaa['id'],'threadId':_0xebbdaa[_0x27c9f5(0x1b5)],'ref':_0xebbdaa[_0x27c9f5(0x153)]};}};g=x([_(0x0,c['Inject'](P[_0xa0fa3b(0x187)])),_(0x1,c[_0xa0fa3b(0x150)](c['UserManagerService'])),_(0x2,c[_0xa0fa3b(0x150)](b[_0xa0fa3b(0x1b4)])),_(0x3,c[_0xa0fa3b(0x150)](c[_0xa0fa3b(0x155)]))],g);var H=Object[_0xa0fa3b(0x160)],J=(_0x4ac583,_0xbc1bcc,_0xc091c2,_0x65c597)=>{const _0x46d984=_0xa0fa3b;for(var _0x8336d8=_0x65c597>0x1?void 0x0:_0x65c597?H(_0xbc1bcc,_0xc091c2):_0xbc1bcc,_0x3e94ed=_0x4ac583[_0x46d984(0x1c4)]-0x1,_0x3d9f01;_0x3e94ed>=0x0;_0x3e94ed--)(_0x3d9f01=_0x4ac583[_0x3e94ed])&&(_0x8336d8=_0x3d9f01(_0x8336d8)||_0x8336d8);return _0x8336d8;},y=(_0x55863d,_0x1fc6d0)=>(_0x4b2c71,_0x17c5a7)=>_0x1fc6d0(_0x4b2c71,_0x17c5a7,_0x55863d);let C=class extends c[_0xa0fa3b(0x1a6)]{constructor(_0x48dec3,_0x3427d0){const _0x198d7a=_0xa0fa3b;super(),this[_0x198d7a(0x19b)]=_0x48dec3,this[_0x198d7a(0x165)]=_0x3427d0,this[_0x198d7a(0x16a)]();}[_0xa0fa3b(0x16a)](){const _0x1f9483=_0xa0fa3b;this[_0x1f9483(0x19b)][_0x1f9483(0x151)]=this[_0x1f9483(0x165)],this[_0x1f9483(0x19b)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0xa0fa3b(0x150)](g))],C);var F=Object[_0xa0fa3b(0x1aa)],L=Object[_0xa0fa3b(0x160)],Z=(_0x57efcd,_0x47c3fb,_0x3d0e27)=>_0x47c3fb in _0x57efcd?F(_0x57efcd,_0x47c3fb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d0e27}):_0x57efcd[_0x47c3fb]=_0x3d0e27,W=(_0x58e867,_0x59a7db,_0x17b8af,_0x45b1d8)=>{for(var _0x575f77=_0x45b1d8>0x1?void 0x0:_0x45b1d8?L(_0x59a7db,_0x17b8af):_0x59a7db,_0x277ef3=_0x58e867['length']-0x1,_0x238556;_0x277ef3>=0x0;_0x277ef3--)(_0x238556=_0x58e867[_0x277ef3])&&(_0x575f77=_0x238556(_0x575f77)||_0x575f77);return _0x575f77;},O=(_0x22c9a8,_0x1f0be7)=>(_0x2c8b1d,_0x1f556b)=>_0x1f0be7(_0x2c8b1d,_0x1f556b,_0x22c9a8),N=(_0x205b14,_0x36ced0,_0x4ff549)=>Z(_0x205b14,typeof _0x36ced0!=_0xa0fa3b(0x15a)?_0x36ced0+'':_0x36ced0,_0x4ff549);exports[_0xa0fa3b(0x180)]=class extends c['Plugin']{constructor(_0x9543ce=D,_0x2c8610,_0x10bc5b){const _0x26e76a=_0xa0fa3b;super(),this[_0x26e76a(0x1b3)]=_0x9543ce,this['_injector']=_0x2c8610,this[_0x26e76a(0x1b9)]=_0x10bc5b;const {..._0x880a0b}=c[_0x26e76a(0x1cb)]({},D,this[_0x26e76a(0x1b3)]);this[_0x26e76a(0x1b9)][_0x26e76a(0x17f)](q,_0x880a0b);}[_0xa0fa3b(0x199)](){const _0x26c282=_0xa0fa3b;[[g],[C],[p]][_0x26c282(0x1a8)](_0x1558dc=>{const _0x493c6f=_0x26c282;this[_0x493c6f(0x1c5)][_0x493c6f(0x1c2)](_0x1558dc);});}[_0xa0fa3b(0x1a3)](){const _0x485aaa=_0xa0fa3b;this[_0x485aaa(0x1c5)][_0x485aaa(0x179)](C),this[_0x485aaa(0x1c5)][_0x485aaa(0x179)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0xa0fa3b(0x1ba),c[_0xa0fa3b(0x163)]['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0xa0fa3b(0x173)],b[_0xa0fa3b(0x167)],T[_0xa0fa3b(0x1ac)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0xa0fa3b(0x16d)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3d0222=_0x215d;(function(_0x3140fd,_0x3103e7){const _0xd8b334=_0x215d,_0x27c435=_0x3140fd();while(!![]){try{const _0xb05e11=parseInt(_0xd8b334(0x83))/0x1*(-parseInt(_0xd8b334(0xc8))/0x2)+parseInt(_0xd8b334(0xc3))/0x3*(-parseInt(_0xd8b334(0x9b))/0x4)+parseInt(_0xd8b334(0x90))/0x5*(parseInt(_0xd8b334(0xcb))/0x6)+-parseInt(_0xd8b334(0xb1))/0x7*(-parseInt(_0xd8b334(0xc5))/0x8)+-parseInt(_0xd8b334(0xdd))/0x9*(-parseInt(_0xd8b334(0x95))/0xa)+parseInt(_0xd8b334(0xd5))/0xb*(-parseInt(_0xd8b334(0x89))/0xc)+parseInt(_0xd8b334(0xd6))/0xd;if(_0xb05e11===_0x3103e7)break;else _0x27c435['push'](_0x27c435['shift']());}catch(_0x1c113e){_0x27c435['push'](_0x27c435['shift']());}}}(_0x1ae7,0xbc411));import{CommentService as _0x2eedbc,CollaborationSessionService as _0x331714,UniverCollaborationClientPlugin as _0x1d664a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xd9538b}from'@univerjs-pro/license';import{dayjs as _0x3b7c2,UserManagerService as _0x312b2f,Inject as _0xb50de1,Injector as _0xc1b344,Disposable as _0x4314bc,CustomRangeType as _0xfc942,UniverInstanceType as _0x3f182b,DependentOn as _0x19c23a,IConfigService as _0x4283b9,Plugin as _0x33f723,merge as _0x351827}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x554dd4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x20227f,IThreadCommentDataSourceService as _0x43c8d5}from'@univerjs/thread-comment';function _0x215d(_0x3539ee,_0x25e01d){const _0x1ae716=_0x1ae7();return _0x215d=function(_0x215db4,_0x555a45){_0x215db4=_0x215db4-0x80;let _0x3eb85c=_0x1ae716[_0x215db4];return _0x3eb85c;},_0x215d(_0x3539ee,_0x25e01d);}import{bufferTime as _0x45eeee}from'rxjs';import{HTTPService as _0x40ab69}from'@univerjs/network';const W=_0x3d0222(0x9e);var I=(_0x4af38=>(_0x4af38[_0x4af38['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x4af38[_0x4af38[_0x3d0222(0xd2)]=0x1]=_0x3d0222(0xd2),_0x4af38[_0x4af38[_0x3d0222(0x86)]=-0x1]=_0x3d0222(0x86),_0x4af38))(I||{}),v=(_0x16435d=>(_0x16435d[_0x16435d[_0x3d0222(0xad)]=0x0]=_0x3d0222(0xad),_0x16435d[_0x16435d[_0x3d0222(0x8f)]=0x1]='Add',_0x16435d[_0x16435d[_0x3d0222(0xb5)]=0x2]=_0x3d0222(0xb5),_0x16435d[_0x16435d['Edit']=0x3]=_0x3d0222(0x92),_0x16435d[_0x16435d[_0x3d0222(0x9a)]=0x4]=_0x3d0222(0x9a),_0x16435d[_0x16435d[_0x3d0222(0xba)]=0x5]=_0x3d0222(0xba),_0x16435d[_0x16435d[_0x3d0222(0x86)]=-0x1]=_0x3d0222(0x86),_0x16435d))(v||{});const D=_0x4f0219=>_0x3b7c2(new Date(+_0x4f0219))['format'](_0x3d0222(0xa3)),B=async(_0x2ef99f,_0x28bcc4)=>{const _0xc91faf=_0x3d0222,_0x1b53fd=_0x2ef99f[_0xc91faf(0xd0)](_0x312b2f),_0x4924d4=_0x2ef99f[_0xc91faf(0xd0)](_0x40ab69);_0x28bcc4[_0xc91faf(0xca)](_0x4e3d27=>{const _0x172a5e=_0xc91faf;_0x1b53fd['getUser'](_0x4e3d27)&&_0x28bcc4[_0x172a5e(0xbf)](_0x4e3d27);}),_0x28bcc4['size']&&(await _0x4924d4['get'](_0xc91faf(0xe8),{'params':{'userIDs':[..._0x28bcc4]}}))[_0xc91faf(0xcd)][_0xc91faf(0x88)]['forEach'](_0x2d7c80=>{const _0xe40bf2=_0xc91faf;_0x2d7c80&&_0x1b53fd[_0xe40bf2(0xa2)](_0x2d7c80);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x46a882,_0x6188d,_0x5756cb,_0x16af2c)=>{const _0x38ce41=_0x3d0222;for(var _0x4ea8b3=_0x16af2c>0x1?void 0x0:_0x16af2c?K(_0x6188d,_0x5756cb):_0x6188d,_0x3e4e30=_0x46a882[_0x38ce41(0xe5)]-0x1,_0x4357c5;_0x3e4e30>=0x0;_0x3e4e30--)(_0x4357c5=_0x46a882[_0x3e4e30])&&(_0x4ea8b3=_0x4357c5(_0x4ea8b3)||_0x4ea8b3);return _0x4ea8b3;},p=(_0x296b5b,_0x23b7ba)=>(_0xfe8ff4,_0x5447b8)=>_0x23b7ba(_0xfe8ff4,_0x5447b8,_0x296b5b);let S=class extends _0x4314bc{constructor(_0x1d4d95,_0x45eac5,_0x226d24,_0x1440a0){const _0xba2ced=_0x3d0222;super(),this[_0xba2ced(0xde)]=_0x1d4d95,this[_0xba2ced(0xd9)]=_0x45eac5,this[_0xba2ced(0x82)]=_0x226d24,this[_0xba2ced(0xb9)]=_0x1440a0,this[_0xba2ced(0xac)](),this['_initUserSync']();}[_0x3d0222(0x97)](){const _0x559dbb=_0x3d0222;this[_0x559dbb(0xe3)](this[_0x559dbb(0xd9)]['commentUpdate$'][_0x559dbb(0xdb)](_0x45eeee(0x10))['subscribe'](_0x181efb=>{const _0x2936e1=_0x559dbb,_0x4cee51=new Set();_0x181efb[_0x2936e1(0xca)](_0xda2af6=>{const _0x2b5b13=_0x2936e1;switch(_0xda2af6[_0x2b5b13(0xaa)]){case'add':{const _0x5e38ce=_0xda2af6[_0x2b5b13(0xa4)][_0x2b5b13(0xdc)];_0x4cee51[_0x2b5b13(0xda)](_0x5e38ce);break;}}}),B(this['_injector'],_0x4cee51);}));}[_0x3d0222(0xac)](){const _0x59be15=_0x3d0222;this['disposeWithMe'](this[_0x59be15(0xde)][_0x59be15(0x8e)]['subscribe'](async _0x506e81=>{const _0x22693b=_0x59be15;var _0x3e0df5,_0x25e85e,_0x39480b,_0xd01aa4;const _0x1a6164=(_0x3e0df5=this[_0x22693b(0xd9)]['getUnit'](_0x506e81['unitId'])[_0x22693b(0x96)](_0x3d35fe=>_0x3d35fe[_0x22693b(0x99)]===_0x506e81[_0x22693b(0x99)]))==null?void 0x0:_0x3e0df5[_0x22693b(0x9c)];if(!_0x1a6164)return;const {unitId:_0x82dfa1,subUnitId:_0x5d32a3}=_0x1a6164;switch(_0x506e81[_0x22693b(0xdf)]&&this['_userService'][_0x22693b(0xa2)](_0x506e81[_0x22693b(0xdf)]),_0x506e81[_0x22693b(0xaa)]){case v[_0x22693b(0x8f)]:break;case v[_0x22693b(0xb5)]:{this[_0x22693b(0xd9)][_0x22693b(0x8d)](_0x82dfa1,_0x5d32a3,{'unitId':_0x82dfa1,'subUnitId':_0x5d32a3,'ref':'','id':_0x506e81[_0x22693b(0x8c)],'dT':D(+_0x506e81[_0x22693b(0xbe)]),'threadId':_0x506e81[_0x22693b(0x99)],'personId':(_0x39480b=(_0x25e85e=_0x506e81[_0x22693b(0xdf)])==null?void 0x0:_0x25e85e[_0x22693b(0xa9)])!=null?_0x39480b:_0x506e81[_0x22693b(0x8a)],'text':JSON[_0x22693b(0xb4)](_0x506e81[_0x22693b(0xa7)]),'parentId':_0x1a6164['id']});break;}case v[_0x22693b(0x9a)]:{const _0x397d8a=this[_0x22693b(0xd9)][_0x22693b(0xc6)](_0x82dfa1,_0x5d32a3,_0x506e81[_0x22693b(0x8c)]);_0x397d8a&&_0x397d8a['parentId']&&this['_threadCommentModel']['deleteComment'](_0x82dfa1,_0x5d32a3,_0x506e81[_0x22693b(0x8c)]);break;}case v[_0x22693b(0x92)]:{this['_threadCommentModel'][_0x22693b(0xbb)](_0x82dfa1,_0x5d32a3,{'commentId':_0x506e81[_0x22693b(0x8c)],'text':JSON[_0x22693b(0xb4)](_0x506e81[_0x22693b(0xa7)])});break;}case v[_0x22693b(0xba)]:{const _0x4e576d=(_0xd01aa4=this['_threadCommentModel'][_0x22693b(0xc0)](_0x506e81[_0x22693b(0x9f)])[_0x22693b(0x96)](_0x49dc00=>_0x49dc00[_0x22693b(0x99)]===_0x506e81[_0x22693b(0x99)]))==null?void 0x0:_0xd01aa4[_0x22693b(0x9c)];_0x4e576d&&this[_0x22693b(0xd9)][_0x22693b(0xe6)](_0x82dfa1,_0x5d32a3,_0x4e576d['id'],_0x506e81[_0x22693b(0xe7)]===I[_0x22693b(0xd2)]);break;}}}));}};S=V([p(0x0,_0xb50de1(_0x2eedbc)),p(0x1,_0xb50de1(_0x20227f)),p(0x2,_0xb50de1(_0x312b2f)),p(0x3,_0xb50de1(_0xc1b344))],S);const z=_0x3d0222(0xaf),M={};var k=Object[_0x3d0222(0xcc)],Q=(_0x10058c,_0x1b9c24,_0x43394a,_0x11e3cf)=>{for(var _0x35138e=_0x11e3cf>0x1?void 0x0:_0x11e3cf?k(_0x1b9c24,_0x43394a):_0x1b9c24,_0x331af7=_0x10058c['length']-0x1,_0x3f93f2;_0x331af7>=0x0;_0x331af7--)(_0x3f93f2=_0x10058c[_0x331af7])&&(_0x35138e=_0x3f93f2(_0x35138e)||_0x35138e);return _0x35138e;},_=(_0x2791c3,_0x4c0229)=>(_0x4ac72c,_0x11e90e)=>_0x4c0229(_0x4ac72c,_0x11e90e,_0x2791c3);function X(_0x40c91b,_0x4d83db){const _0x5a4b1c=_0x3d0222,_0x59b46a=_0x40c91b['replies'][0x0];return{..._0x4d83db,'id':_0x59b46a[_0x5a4b1c(0x8c)],'resolved':_0x40c91b[_0x5a4b1c(0xe7)]===0x1,'dT':D(_0x59b46a[_0x5a4b1c(0xbe)]),'personId':_0x59b46a[_0x5a4b1c(0x8a)],'threadId':_0x59b46a[_0x5a4b1c(0x99)]};}function ee(_0x3b4b64,_0x2ac990,_0x729992){const _0x4cbfe7=_0x3d0222;var _0xa41e14,_0x2c182e;if(((_0x2c182e=(_0xa41e14=_0x3b4b64==null?void 0x0:_0x3b4b64[_0x4cbfe7(0xab)])==null?void 0x0:_0xa41e14['length'])!=null?_0x2c182e:0x0)>0x0){const _0x2e01a3=(_0x1b5e80,_0xe75e5d)=>({'id':_0x1b5e80['replyId'],'threadId':_0x1b5e80[_0x4cbfe7(0x99)],'dT':D(_0x1b5e80['createTimestamp']),'personId':_0x1b5e80[_0x4cbfe7(0x8a)],'resolved':_0x3b4b64[_0x4cbfe7(0xe7)]===I[_0x4cbfe7(0xd2)],'unitId':_0x2ac990,'subUnitId':_0x729992,'text':JSON[_0x4cbfe7(0xb4)](_0x1b5e80[_0x4cbfe7(0xa7)]),'parentId':_0xe75e5d}),_0x3e59d7=_0x2e01a3(_0x3b4b64[_0x4cbfe7(0xab)][0x0]);return{..._0x3e59d7,'children':_0x3b4b64['replies'][_0x4cbfe7(0xd3)](0x1)[_0x4cbfe7(0x84)](_0x5abc96=>_0x2e01a3(_0x5abc96,_0x3e59d7['id']))};}return null;}let f=class{constructor(_0x4d307b,_0x334e9f,_0x5d93ce,_0x3efa69){const _0x550a26=_0x3d0222;this[_0x550a26(0x8b)]=_0x4d307b,this[_0x550a26(0x82)]=_0x334e9f,this['_sessionService']=_0x5d93ce,this[_0x550a26(0xb9)]=_0x3efa69;}async[_0x3d0222(0x8d)](_0x64865a){const _0x1ec075=_0x3d0222;var _0x333129,_0x28205e;const {parentId:_0x1886c5,unitId:_0x3e28d7,text:_0x487b95,threadId:_0x1eb36c}=_0x64865a,_0x2172a1=(_0x28205e=(_0x333129=_0x487b95['customRanges'])==null?void 0x0:_0x333129['filter'](_0x2d4a13=>_0x2d4a13[_0x1ec075(0xae)]===_0xfc942[_0x1ec075(0xc7)])[_0x1ec075(0x84)](_0x223472=>_0x223472[_0x1ec075(0xb6)]))!=null?_0x28205e:[],_0x122f88=JSON[_0x1ec075(0xcf)](_0x487b95),_0x4f5e50=(await this[_0x1ec075(0xa0)][_0x1ec075(0x9d)](_0x3e28d7))['getMemberID']();if(_0x1886c5){const _0x534844={'memberId':_0x4f5e50,'unitId':_0x3e28d7,'content':_0x122f88,'mention':_0x2172a1,'threadId':_0x1eb36c},_0x4d9b53=(await this[_0x1ec075(0x8b)][_0x1ec075(0xb0)](_0x1ec075(0xe1)+_0x3e28d7+'/reply',{'body':_0x534844}))[_0x1ec075(0xcd)][_0x1ec075(0xb3)];return{..._0x64865a,'id':_0x4d9b53['replyId'],'dT':_0x3b7c2(+_0x4d9b53[_0x1ec075(0xbe)])[_0x1ec075(0xc1)](_0x1ec075(0xa3)),'personId':_0x4d9b53[_0x1ec075(0x8a)]};}else{const _0xd499b5={'memberId':_0x4f5e50,'unitId':_0x3e28d7,'content':_0x122f88,'mention':_0x2172a1},_0x14b436=await this[_0x1ec075(0x8b)][_0x1ec075(0xb0)](_0x1ec075(0xe1)+_0x3e28d7+'/add',{'body':_0xd499b5});return X(_0x14b436[_0x1ec075(0xcd)]['comment'],_0x64865a);}}async[_0x3d0222(0xbb)](_0x3720e5){const _0x5cd947=_0x3d0222;var _0x5ba954,_0x12fadd;const {text:_0xda9522,unitId:_0x45e44b}=_0x3720e5,_0xdc3f54=(_0x12fadd=(_0x5ba954=_0xda9522[_0x5cd947(0xc2)])==null?void 0x0:_0x5ba954[_0x5cd947(0xa1)](_0x80135c=>_0x80135c[_0x5cd947(0xae)]===_0xfc942['COMMENT'])[_0x5cd947(0x84)](_0x4b7208=>_0x4b7208[_0x5cd947(0xb6)]))!=null?_0x12fadd:[],_0x107725=JSON['stringify'](_0xda9522),_0x4a8eda=_0x3720e5[_0x5cd947(0x99)],_0x2f3a87=_0x3720e5['id'],_0xc1a49f={'memberId':(await this[_0x5cd947(0xa0)][_0x5cd947(0x9d)](_0x45e44b))[_0x5cd947(0xa6)](),'unitId':_0x45e44b,'threadId':_0x4a8eda,'mention':_0xdc3f54,'content':_0x107725,'replyId':_0x2f3a87},_0x2c39ee=await this[_0x5cd947(0x8b)][_0x5cd947(0xb0)](_0x5cd947(0xe1)+_0x45e44b+_0x5cd947(0x94),{'body':_0xc1a49f});return!_0x2c39ee['body']['error']||_0x2c39ee['body'][_0x5cd947(0xb8)][_0x5cd947(0xa5)]===0x1;}async['resolveComment'](_0x568d2f){const _0x144fd3=_0x3d0222,{unitId:_0x50b417}=_0x568d2f,_0x484fac=_0x568d2f[_0x144fd3(0x99)],_0x3d5fe8={'memberId':this[_0x144fd3(0x82)][_0x144fd3(0x81)]()[_0x144fd3(0xa9)],'unitId':_0x50b417,'threadId':_0x484fac,'solved':_0x568d2f[_0x144fd3(0xe4)]?I[_0x144fd3(0xd2)]:I[_0x144fd3(0x80)]},_0x3755e9=await this[_0x144fd3(0x8b)]['post'](_0x144fd3(0xe1)+_0x50b417+_0x144fd3(0x85),{'body':_0x3d5fe8});return!_0x3755e9[_0x144fd3(0xcd)]['error']||_0x3755e9[_0x144fd3(0xcd)]['error'][_0x144fd3(0xa5)]===0x1;}async[_0x3d0222(0xd1)](_0x4868f4,_0x5b36a4,_0x3d16b6,_0x1a19ad){const _0x3f5155=_0x3d0222,_0x41bea9={'memberId':(await this[_0x3f5155(0xa0)][_0x3f5155(0x9d)](_0x4868f4))['getMemberID'](),'threadId':_0x3d16b6,'replyId':_0x1a19ad,'unitId':_0x4868f4},_0x266303=await this['_httpService'][_0x3f5155(0xb0)](_0x3f5155(0xe1)+_0x4868f4+_0x3f5155(0x93),{'body':_0x41bea9});return!_0x266303[_0x3f5155(0xcd)][_0x3f5155(0xb8)]||_0x266303[_0x3f5155(0xcd)]['error'][_0x3f5155(0xa5)]===0x1;}async[_0x3d0222(0xb7)](_0x1c6340,_0x5b9171,_0xff73d9){const _0x3627ba=_0x3d0222,_0x4462cd={'unitId':_0x1c6340,'threadId':_0xff73d9},_0x2d2a71=await this[_0x3627ba(0x8b)][_0x3627ba(0xb0)]('/universer-api/comment/unit/'+_0x1c6340+_0x3627ba(0xce),{'body':_0x4462cd}),_0x31c03a=_0xff73d9[_0x3627ba(0x84)](_0x301d85=>ee(_0x2d2a71['body'][_0x3627ba(0xc9)][_0x301d85],_0x1c6340,_0x5b9171))[_0x3627ba(0xa1)](Boolean);return Object[_0x3627ba(0xd8)](_0x2d2a71['body'][_0x3627ba(0x88)])[_0x3627ba(0xca)](_0x2fe9aa=>{const _0x449b1a=_0x3627ba;this[_0x449b1a(0x82)][_0x449b1a(0xa2)](_0x2fe9aa);}),_0x31c03a;}[_0x3d0222(0xbd)](_0x3cecfc){const _0x49bf80=_0x3d0222;return{'id':_0x3cecfc['id'],'threadId':_0x3cecfc[_0x49bf80(0x99)],'ref':_0x3cecfc['ref']};}};f=Q([_(0x0,_0xb50de1(_0x40ab69)),_(0x1,_0xb50de1(_0x312b2f)),_(0x2,_0xb50de1(_0x331714)),_(0x3,_0xb50de1(_0xc1b344))],f);var re=Object[_0x3d0222(0xcc)],te=(_0x340c9,_0x4aa2ee,_0x49b161,_0x593a88)=>{const _0x50c0d1=_0x3d0222;for(var _0x420459=_0x593a88>0x1?void 0x0:_0x593a88?re(_0x4aa2ee,_0x49b161):_0x4aa2ee,_0x36a67d=_0x340c9[_0x50c0d1(0xe5)]-0x1,_0x1c4c42;_0x36a67d>=0x0;_0x36a67d--)(_0x1c4c42=_0x340c9[_0x36a67d])&&(_0x420459=_0x1c4c42(_0x420459)||_0x420459);return _0x420459;},N=(_0x32d9c6,_0x4bf623)=>(_0x5c2141,_0x2980b2)=>_0x4bf623(_0x5c2141,_0x2980b2,_0x32d9c6);let g=class extends _0x4314bc{constructor(_0x418de9,_0x32c23f){super(),this['_threadCommentDataSourceService']=_0x418de9,this['_threadCommentDataSource']=_0x32c23f,this['_initDataSource']();}[_0x3d0222(0xe0)](){const _0x2e3614=_0x3d0222;this[_0x2e3614(0xa8)][_0x2e3614(0x87)]=this[_0x2e3614(0xbc)],this[_0x2e3614(0xa8)][_0x2e3614(0x98)]=!0x1;}};function _0x1ae7(){const _0x52b082=['_userService','586dvCcgf','map','/solved','UNRECOGNIZED','dataSource','users','180aqdHGH','userId','_httpService','replyId','addComment','commentUpdate$','Add','395FstyHN','_configService','Edit','/delete','/edit','937000hkGEtP','find','_initUserSync','syncUpdateMutationToColla','threadId','Delete','5212OtbjqO','root','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','_sessionService','filter','addUser','YYYY/MM/DD\x20HH:mm','payload','code','getMemberID','content','_threadCommentDataSourceService','userID','type','replies','_init','Unknown','rangeType','thread-comment-data-source.config','post','7yFdsnJ','defineProperty','reply','parse','Reply','rangeId','listComments','error','_injector','Solve','updateComment','_threadCommentDataSource','saveCommentToSnapshot','createTimestamp','delete','getUnit','format','customRanges','1572OeylcM','UNIVER_UNKNOWN','12245936PqSczY','getComment','COMMENT','3590tHWYWd','comments','forEach','48390MLxJFA','getOwnPropertyDescriptor','body','/list','stringify','get','deleteComment','Solved','slice','onReady','4906ZPVrYh','3260972WvBiQu','_config','values','_threadCommentModel','add','pipe','personId','9QSphko','_commentService','user','_initDataSource','/universer-api/comment/unit/','symbol','disposeWithMe','resolved','length','resolveComment','solved','/universer-api/user/list','OpenOrReOpen','getCurrentUser'];_0x1ae7=function(){return _0x52b082;};return _0x1ae7();}g=te([N(0x0,_0x43c8d5),N(0x1,_0xb50de1(f))],g);var se=Object[_0x3d0222(0xb2)],oe=Object[_0x3d0222(0xcc)],ne=(_0x5e632d,_0x4d7829,_0xd5531a)=>_0x4d7829 in _0x5e632d?se(_0x5e632d,_0x4d7829,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd5531a}):_0x5e632d[_0x4d7829]=_0xd5531a,ie=(_0x55f43e,_0x24a442,_0x4c5758,_0x262485)=>{const _0x58e45f=_0x3d0222;for(var _0x2d7c02=_0x262485>0x1?void 0x0:_0x262485?oe(_0x24a442,_0x4c5758):_0x24a442,_0x48c0b4=_0x55f43e[_0x58e45f(0xe5)]-0x1,_0x43c453;_0x48c0b4>=0x0;_0x48c0b4--)(_0x43c453=_0x55f43e[_0x48c0b4])&&(_0x2d7c02=_0x43c453(_0x2d7c02)||_0x2d7c02);return _0x2d7c02;},w=(_0x6073e9,_0x595dcb)=>(_0x5e5eee,_0x528be8)=>_0x595dcb(_0x5e5eee,_0x528be8,_0x6073e9),$=(_0x3c32e1,_0x54998a,_0x3c99c7)=>ne(_0x3c32e1,typeof _0x54998a!=_0x3d0222(0xe2)?_0x54998a+'':_0x54998a,_0x3c99c7);let b=class extends _0x33f723{constructor(_0x78f431=M,_0xc87333,_0x2c062f){const _0x3c091b=_0x3d0222;super(),this[_0x3c091b(0xd7)]=_0x78f431,this[_0x3c091b(0xb9)]=_0xc87333,this['_configService']=_0x2c062f;const {..._0x582984}=_0x351827({},M,this[_0x3c091b(0xd7)]);this[_0x3c091b(0x91)]['setConfig'](z,_0x582984);}['onStarting'](){const _0x5d99fb=_0x3d0222;[[f],[g],[S]][_0x5d99fb(0xca)](_0x256598=>{const _0x3fd4c6=_0x5d99fb;this[_0x3fd4c6(0xb9)][_0x3fd4c6(0xda)](_0x256598);});}[_0x3d0222(0xd4)](){const _0x5aa9b8=_0x3d0222;this[_0x5aa9b8(0xb9)]['get'](g),this['_injector'][_0x5aa9b8(0xd0)](S);}};$(b,'pluginName',W),$(b,_0x3d0222(0xaa),_0x3f182b[_0x3d0222(0xc4)]),b=ie([_0x19c23a(_0x554dd4,_0x1d664a,_0xd9538b),w(0x1,_0xb50de1(_0xc1b344)),w(0x2,_0x4283b9)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x2690(_0x275a34,_0x3fc05c){const _0x331c48=_0x331c();return _0x2690=function(_0x2690f3,_0x74ad54){_0x2690f3=_0x2690f3-0x1e0;let _0xddce5d=_0x331c48[_0x2690f3];return _0xddce5d;},_0x2690(_0x275a34,_0x3fc05c);}const _0x5f512f=_0x2690;(function(_0x55dc9d,_0x286886){const _0x34393a=_0x2690,_0x138f78=_0x55dc9d();while(!![]){try{const _0xfb5746=parseInt(_0x34393a(0x20e))/0x1+-parseInt(_0x34393a(0x1fd))/0x2+-parseInt(_0x34393a(0x23e))/0x3*(parseInt(_0x34393a(0x215))/0x4)+parseInt(_0x34393a(0x1fa))/0x5*(-parseInt(_0x34393a(0x22d))/0x6)+parseInt(_0x34393a(0x21a))/0x7+-parseInt(_0x34393a(0x228))/0x8+-parseInt(_0x34393a(0x21e))/0x9*(-parseInt(_0x34393a(0x233))/0xa);if(_0xfb5746===_0x286886)break;else _0x138f78['push'](_0x138f78['shift']());}catch(_0x31f50e){_0x138f78['push'](_0x138f78['shift']());}}}(_0x331c,0xf1342));import{CommentService as _0x4a90e7,CollaborationSessionService as _0x3972dd,UniverCollaborationClientPlugin as _0x56fb88}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x178fe6}from'@univerjs-pro/license';import{dayjs as _0x367654,UserManagerService as _0x56b3c1,Inject as _0x4134b7,Injector as _0x49d01d,Disposable as _0x70aa62,CustomRangeType as _0xcd641e,UniverInstanceType as _0x481279,DependentOn as _0x12da24,IConfigService as _0x340ede,Plugin as _0x2729e6,merge as _0x5cb88c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xc44fe2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x9f961a,IThreadCommentDataSourceService as _0x4289de}from'@univerjs/thread-comment';import{bufferTime as _0x55e3f7}from'rxjs';import{HTTPService as _0x1c96c6}from'@univerjs/network';const W=_0x5f512f(0x241);var I=(_0x4c2cd1=>(_0x4c2cd1[_0x4c2cd1[_0x5f512f(0x23a)]=0x0]=_0x5f512f(0x23a),_0x4c2cd1[_0x4c2cd1[_0x5f512f(0x1e0)]=0x1]=_0x5f512f(0x1e0),_0x4c2cd1[_0x4c2cd1[_0x5f512f(0x20d)]=-0x1]='UNRECOGNIZED',_0x4c2cd1))(I||{}),v=(_0x2aeac3=>(_0x2aeac3[_0x2aeac3[_0x5f512f(0x23b)]=0x0]='Unknown',_0x2aeac3[_0x2aeac3[_0x5f512f(0x23d)]=0x1]=_0x5f512f(0x23d),_0x2aeac3[_0x2aeac3['Reply']=0x2]='Reply',_0x2aeac3[_0x2aeac3[_0x5f512f(0x1f4)]=0x3]='Edit',_0x2aeac3[_0x2aeac3[_0x5f512f(0x206)]=0x4]='Delete',_0x2aeac3[_0x2aeac3[_0x5f512f(0x238)]=0x5]='Solve',_0x2aeac3[_0x2aeac3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2aeac3))(v||{});const D=_0x2b6b8f=>_0x367654(new Date(+_0x2b6b8f))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x1a3d74,_0x167ee9)=>{const _0x16ce51=_0x5f512f,_0x3f7a68=_0x1a3d74[_0x16ce51(0x234)](_0x56b3c1),_0xcf6ca=_0x1a3d74[_0x16ce51(0x234)](_0x1c96c6);_0x167ee9[_0x16ce51(0x1e4)](_0x2b6f06=>{const _0x2d7d19=_0x16ce51;_0x3f7a68[_0x2d7d19(0x1e2)](_0x2b6f06)&&_0x167ee9['delete'](_0x2b6f06);}),_0x167ee9[_0x16ce51(0x21b)]&&(await _0xcf6ca[_0x16ce51(0x234)](_0x16ce51(0x207),{'params':{'userIDs':[..._0x167ee9]}}))[_0x16ce51(0x218)][_0x16ce51(0x23c)]['forEach'](_0x309d8c=>{const _0x5006a7=_0x16ce51;_0x309d8c&&_0x3f7a68[_0x5006a7(0x22e)](_0x309d8c);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x453a46,_0x2ec752,_0x13c8f1,_0x370670)=>{const _0x5b75c0=_0x5f512f;for(var _0x31b1e7=_0x370670>0x1?void 0x0:_0x370670?K(_0x2ec752,_0x13c8f1):_0x2ec752,_0x4715d7=_0x453a46[_0x5b75c0(0x21c)]-0x1,_0x2eb42b;_0x4715d7>=0x0;_0x4715d7--)(_0x2eb42b=_0x453a46[_0x4715d7])&&(_0x31b1e7=_0x2eb42b(_0x31b1e7)||_0x31b1e7);return _0x31b1e7;},p=(_0x4ed916,_0x2c56ae)=>(_0x96d4a1,_0x282a6e)=>_0x2c56ae(_0x96d4a1,_0x282a6e,_0x4ed916);let S=class extends _0x70aa62{constructor(_0x27d7a3,_0x4d403b,_0x1d5f7a,_0x5a2cd7){const _0x2a3afd=_0x5f512f;super(),this['_commentService']=_0x27d7a3,this[_0x2a3afd(0x20c)]=_0x4d403b,this[_0x2a3afd(0x230)]=_0x1d5f7a,this[_0x2a3afd(0x237)]=_0x5a2cd7,this[_0x2a3afd(0x232)](),this[_0x2a3afd(0x1f3)]();}[_0x5f512f(0x1f3)](){const _0x3f559a=_0x5f512f;this[_0x3f559a(0x1f1)](this['_threadCommentModel'][_0x3f559a(0x214)][_0x3f559a(0x1f5)](_0x55e3f7(0x10))[_0x3f559a(0x1f7)](_0x1d5704=>{const _0x2b2b07=_0x3f559a,_0xcc0146=new Set();_0x1d5704[_0x2b2b07(0x1e4)](_0x209dfc=>{const _0x4c7d7c=_0x2b2b07;switch(_0x209dfc[_0x4c7d7c(0x201)]){case _0x4c7d7c(0x227):{const _0x53c754=_0x209dfc[_0x4c7d7c(0x213)]['personId'];_0xcc0146[_0x4c7d7c(0x227)](_0x53c754);break;}}}),B(this['_injector'],_0xcc0146);}));}[_0x5f512f(0x232)](){const _0x43451a=_0x5f512f;this[_0x43451a(0x1f1)](this[_0x43451a(0x203)][_0x43451a(0x214)][_0x43451a(0x1f7)](async _0x5aa859=>{const _0x1f1ba0=_0x43451a;var _0x5ab4ed,_0x435963,_0x58ccef,_0x552987;const _0x2f931d=(_0x5ab4ed=this['_threadCommentModel']['getUnit'](_0x5aa859['unitId'])[_0x1f1ba0(0x1ec)](_0x121db5=>_0x121db5['threadId']===_0x5aa859['threadId']))==null?void 0x0:_0x5ab4ed['root'];if(!_0x2f931d)return;const {unitId:_0x3fc686,subUnitId:_0x116f72}=_0x2f931d;switch(_0x5aa859['user']&&this[_0x1f1ba0(0x230)][_0x1f1ba0(0x22e)](_0x5aa859[_0x1f1ba0(0x229)]),_0x5aa859[_0x1f1ba0(0x201)]){case v[_0x1f1ba0(0x23d)]:break;case v[_0x1f1ba0(0x22a)]:{this[_0x1f1ba0(0x20c)][_0x1f1ba0(0x208)](_0x3fc686,_0x116f72,{'unitId':_0x3fc686,'subUnitId':_0x116f72,'ref':'','id':_0x5aa859[_0x1f1ba0(0x202)],'dT':D(+_0x5aa859[_0x1f1ba0(0x239)]),'threadId':_0x5aa859[_0x1f1ba0(0x243)],'personId':(_0x58ccef=(_0x435963=_0x5aa859[_0x1f1ba0(0x229)])==null?void 0x0:_0x435963[_0x1f1ba0(0x22b)])!=null?_0x58ccef:_0x5aa859['userId'],'text':JSON['parse'](_0x5aa859[_0x1f1ba0(0x1ed)]),'parentId':_0x2f931d['id']});break;}case v[_0x1f1ba0(0x206)]:{const _0x1315e=this[_0x1f1ba0(0x20c)][_0x1f1ba0(0x244)](_0x3fc686,_0x116f72,_0x5aa859[_0x1f1ba0(0x202)]);_0x1315e&&_0x1315e[_0x1f1ba0(0x222)]&&this[_0x1f1ba0(0x20c)][_0x1f1ba0(0x1fc)](_0x3fc686,_0x116f72,_0x5aa859[_0x1f1ba0(0x202)]);break;}case v[_0x1f1ba0(0x1f4)]:{this[_0x1f1ba0(0x20c)]['updateComment'](_0x3fc686,_0x116f72,{'commentId':_0x5aa859['replyId'],'text':JSON[_0x1f1ba0(0x205)](_0x5aa859['content'])});break;}case v[_0x1f1ba0(0x238)]:{const _0x11af7e=(_0x552987=this[_0x1f1ba0(0x20c)][_0x1f1ba0(0x21f)](_0x5aa859['unitId'])['find'](_0x59a861=>_0x59a861['threadId']===_0x5aa859[_0x1f1ba0(0x243)]))==null?void 0x0:_0x552987[_0x1f1ba0(0x1f6)];_0x11af7e&&this['_threadCommentModel']['resolveComment'](_0x3fc686,_0x116f72,_0x11af7e['id'],_0x5aa859[_0x1f1ba0(0x224)]===I[_0x1f1ba0(0x1e0)]);break;}}}));}};S=V([p(0x0,_0x4134b7(_0x4a90e7)),p(0x1,_0x4134b7(_0x9f961a)),p(0x2,_0x4134b7(_0x56b3c1)),p(0x3,_0x4134b7(_0x49d01d))],S);const z=_0x5f512f(0x200),M={};var k=Object[_0x5f512f(0x235)],Q=(_0x12af47,_0x2e9fa3,_0x2970c2,_0x3f4336)=>{for(var _0x43079b=_0x3f4336>0x1?void 0x0:_0x3f4336?k(_0x2e9fa3,_0x2970c2):_0x2e9fa3,_0x3c4e8c=_0x12af47['length']-0x1,_0x302ec0;_0x3c4e8c>=0x0;_0x3c4e8c--)(_0x302ec0=_0x12af47[_0x3c4e8c])&&(_0x43079b=_0x302ec0(_0x43079b)||_0x43079b);return _0x43079b;},_=(_0x481cd1,_0x2edb55)=>(_0x3ae6eb,_0xa5f839)=>_0x2edb55(_0x3ae6eb,_0xa5f839,_0x481cd1);function X(_0x3736ca,_0x257494){const _0x3cd3af=_0x5f512f,_0x3afd22=_0x3736ca[_0x3cd3af(0x1e3)][0x0];return{..._0x257494,'id':_0x3afd22[_0x3cd3af(0x202)],'resolved':_0x3736ca[_0x3cd3af(0x224)]===0x1,'dT':D(_0x3afd22['createTimestamp']),'personId':_0x3afd22[_0x3cd3af(0x1fe)],'threadId':_0x3afd22[_0x3cd3af(0x243)]};}function ee(_0x5e1e64,_0x1341dc,_0x254677){const _0x474ae0=_0x5f512f;var _0x66e996,_0x57e595;if(((_0x57e595=(_0x66e996=_0x5e1e64==null?void 0x0:_0x5e1e64[_0x474ae0(0x1e3)])==null?void 0x0:_0x66e996[_0x474ae0(0x21c)])!=null?_0x57e595:0x0)>0x0){const _0x2bbf98=(_0x246322,_0x3d38df)=>({'id':_0x246322[_0x474ae0(0x202)],'threadId':_0x246322[_0x474ae0(0x243)],'dT':D(_0x246322[_0x474ae0(0x239)]),'personId':_0x246322['userId'],'resolved':_0x5e1e64['solved']===I[_0x474ae0(0x1e0)],'unitId':_0x1341dc,'subUnitId':_0x254677,'text':JSON[_0x474ae0(0x205)](_0x246322[_0x474ae0(0x1ed)]),'parentId':_0x3d38df}),_0x5c6e90=_0x2bbf98(_0x5e1e64[_0x474ae0(0x1e3)][0x0]);return{..._0x5c6e90,'children':_0x5e1e64[_0x474ae0(0x1e3)]['slice'](0x1)['map'](_0x49fe45=>_0x2bbf98(_0x49fe45,_0x5c6e90['id']))};}return null;}let f=class{constructor(_0x3b5361,_0xd08da4,_0x1ef7b1,_0x2e4a5b){const _0x477e6c=_0x5f512f;this['_httpService']=_0x3b5361,this[_0x477e6c(0x230)]=_0xd08da4,this['_sessionService']=_0x1ef7b1,this['_injector']=_0x2e4a5b;}async[_0x5f512f(0x208)](_0x537fe1){const _0x239360=_0x5f512f;var _0xadeeb6,_0x6df5d6;const {parentId:_0x4b650f,unitId:_0x58cdba,text:_0x1f2107,threadId:_0x5e615a}=_0x537fe1,_0x39f67f=(_0x6df5d6=(_0xadeeb6=_0x1f2107[_0x239360(0x1ea)])==null?void 0x0:_0xadeeb6[_0x239360(0x217)](_0x5a359d=>_0x5a359d['rangeType']===_0xcd641e['COMMENT'])[_0x239360(0x1ff)](_0x5af0e4=>_0x5af0e4[_0x239360(0x212)]))!=null?_0x6df5d6:[],_0x29870c=JSON[_0x239360(0x226)](_0x1f2107),_0x21f69c=(await this[_0x239360(0x211)][_0x239360(0x240)](_0x58cdba))['getMemberID']();if(_0x4b650f){const _0x36c57a={'memberId':_0x21f69c,'unitId':_0x58cdba,'content':_0x29870c,'mention':_0x39f67f,'threadId':_0x5e615a},_0x1639dd=(await this[_0x239360(0x236)][_0x239360(0x242)](_0x239360(0x1e1)+_0x58cdba+_0x239360(0x1f9),{'body':_0x36c57a}))[_0x239360(0x218)][_0x239360(0x220)];return{..._0x537fe1,'id':_0x1639dd[_0x239360(0x202)],'dT':_0x367654(+_0x1639dd['createTimestamp'])['format'](_0x239360(0x210)),'personId':_0x1639dd[_0x239360(0x1fe)]};}else{const _0x28f7b0={'memberId':_0x21f69c,'unitId':_0x58cdba,'content':_0x29870c,'mention':_0x39f67f},_0x3e314e=await this['_httpService'][_0x239360(0x242)]('/universer-api/comment/unit/'+_0x58cdba+_0x239360(0x20b),{'body':_0x28f7b0});return X(_0x3e314e[_0x239360(0x218)][_0x239360(0x1e7)],_0x537fe1);}}async[_0x5f512f(0x21d)](_0x2a6273){const _0x3e02b4=_0x5f512f;var _0x2a8364,_0x5822f3;const {text:_0x216c66,unitId:_0xcd70b6}=_0x2a6273,_0x4d32d8=(_0x5822f3=(_0x2a8364=_0x216c66['customRanges'])==null?void 0x0:_0x2a8364[_0x3e02b4(0x217)](_0x5c8722=>_0x5c8722[_0x3e02b4(0x1e6)]===_0xcd641e[_0x3e02b4(0x1eb)])[_0x3e02b4(0x1ff)](_0x39e0a9=>_0x39e0a9[_0x3e02b4(0x212)]))!=null?_0x5822f3:[],_0x2314c6=JSON[_0x3e02b4(0x226)](_0x216c66),_0x638294=_0x2a6273[_0x3e02b4(0x243)],_0x38171a=_0x2a6273['id'],_0x70dd23={'memberId':(await this['_sessionService']['requireSession'](_0xcd70b6))[_0x3e02b4(0x221)](),'unitId':_0xcd70b6,'threadId':_0x638294,'mention':_0x4d32d8,'content':_0x2314c6,'replyId':_0x38171a},_0x14c459=await this[_0x3e02b4(0x236)][_0x3e02b4(0x242)](_0x3e02b4(0x1e1)+_0xcd70b6+_0x3e02b4(0x219),{'body':_0x70dd23});return!_0x14c459[_0x3e02b4(0x218)][_0x3e02b4(0x1f8)]||_0x14c459[_0x3e02b4(0x218)][_0x3e02b4(0x1f8)][_0x3e02b4(0x1f2)]===0x1;}async[_0x5f512f(0x225)](_0x1e1a37){const _0x230fb8=_0x5f512f,{unitId:_0x2ec259}=_0x1e1a37,_0xce83ab=_0x1e1a37[_0x230fb8(0x243)],_0xacfe6={'memberId':this[_0x230fb8(0x230)][_0x230fb8(0x1e8)]()['userID'],'unitId':_0x2ec259,'threadId':_0xce83ab,'solved':_0x1e1a37[_0x230fb8(0x1ef)]?I['Solved']:I[_0x230fb8(0x23a)]},_0x340f6d=await this[_0x230fb8(0x236)][_0x230fb8(0x242)]('/universer-api/comment/unit/'+_0x2ec259+_0x230fb8(0x20f),{'body':_0xacfe6});return!_0x340f6d[_0x230fb8(0x218)][_0x230fb8(0x1f8)]||_0x340f6d[_0x230fb8(0x218)][_0x230fb8(0x1f8)]['code']===0x1;}async[_0x5f512f(0x1fc)](_0x1733dd,_0xa9d96d,_0xec82a4,_0x305a59){const _0x397ca0=_0x5f512f,_0x527c72={'memberId':(await this['_sessionService'][_0x397ca0(0x240)](_0x1733dd))['getMemberID'](),'threadId':_0xec82a4,'replyId':_0x305a59,'unitId':_0x1733dd},_0x3d37d4=await this[_0x397ca0(0x236)][_0x397ca0(0x242)](_0x397ca0(0x1e1)+_0x1733dd+_0x397ca0(0x216),{'body':_0x527c72});return!_0x3d37d4[_0x397ca0(0x218)][_0x397ca0(0x1f8)]||_0x3d37d4[_0x397ca0(0x218)][_0x397ca0(0x1f8)][_0x397ca0(0x1f2)]===0x1;}async[_0x5f512f(0x1ee)](_0x39c6e4,_0x29fb1c,_0x18edb7){const _0x207e3d=_0x5f512f,_0x13e022={'unitId':_0x39c6e4,'threadId':_0x18edb7},_0x4d6fa3=await this[_0x207e3d(0x236)][_0x207e3d(0x242)](_0x207e3d(0x1e1)+_0x39c6e4+_0x207e3d(0x23f),{'body':_0x13e022}),_0x6dea79=_0x18edb7[_0x207e3d(0x1ff)](_0x373315=>ee(_0x4d6fa3['body']['comments'][_0x373315],_0x39c6e4,_0x29fb1c))[_0x207e3d(0x217)](Boolean);return Object['values'](_0x4d6fa3[_0x207e3d(0x218)][_0x207e3d(0x23c)])[_0x207e3d(0x1e4)](_0x524e73=>{const _0x40a0b1=_0x207e3d;this[_0x40a0b1(0x230)][_0x40a0b1(0x22e)](_0x524e73);}),_0x6dea79;}['saveCommentToSnapshot'](_0x4f9ed5){return{'id':_0x4f9ed5['id'],'threadId':_0x4f9ed5['threadId'],'ref':_0x4f9ed5['ref']};}};f=Q([_(0x0,_0x4134b7(_0x1c96c6)),_(0x1,_0x4134b7(_0x56b3c1)),_(0x2,_0x4134b7(_0x3972dd)),_(0x3,_0x4134b7(_0x49d01d))],f);var re=Object[_0x5f512f(0x235)],te=(_0xafe116,_0x3f965e,_0x2723e8,_0x16cf5d)=>{for(var _0x35e1e8=_0x16cf5d>0x1?void 0x0:_0x16cf5d?re(_0x3f965e,_0x2723e8):_0x3f965e,_0x54d3d6=_0xafe116['length']-0x1,_0x533170;_0x54d3d6>=0x0;_0x54d3d6--)(_0x533170=_0xafe116[_0x54d3d6])&&(_0x35e1e8=_0x533170(_0x35e1e8)||_0x35e1e8);return _0x35e1e8;},N=(_0x21c5d4,_0x2acda2)=>(_0x3ce39e,_0x283832)=>_0x2acda2(_0x3ce39e,_0x283832,_0x21c5d4);function _0x331c(){const _0x2345a0=['YYYY/MM/DD\x20HH:mm','_sessionService','rangeId','payload','commentUpdate$','68oePUCK','/delete','filter','body','/edit','6157235iecjUm','size','length','updateComment','214713KinzKg','getUnit','reply','getMemberID','parentId','_initDataSource','solved','resolveComment','stringify','add','2537688ukPjoA','user','Reply','userID','syncUpdateMutationToColla','6JfghLa','addUser','onStarting','_userService','setConfig','_init','1960mETIYO','get','getOwnPropertyDescriptor','_httpService','_injector','Solve','createTimestamp','OpenOrReOpen','Unknown','users','Add','201483YTXGHj','/list','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','post','threadId','getComment','dataSource','Solved','/universer-api/comment/unit/','getUser','replies','forEach','defineProperty','rangeType','comment','getCurrentUser','_configService','customRanges','COMMENT','find','content','listComments','resolved','symbol','disposeWithMe','code','_initUserSync','Edit','pipe','root','subscribe','error','/reply','7636285cHptWi','_threadCommentDataSource','deleteComment','3245288KoPkKa','userId','map','thread-comment-data-source.config','type','replyId','_commentService','_threadCommentDataSourceService','parse','Delete','/universer-api/user/list','addComment','UNIVER_UNKNOWN','_config','/add','_threadCommentModel','UNRECOGNIZED','41242tkpxDV','/solved'];_0x331c=function(){return _0x2345a0;};return _0x331c();}let g=class extends _0x70aa62{constructor(_0x1e6a5d,_0x468038){const _0x48e122=_0x5f512f;super(),this[_0x48e122(0x204)]=_0x1e6a5d,this[_0x48e122(0x1fb)]=_0x468038,this['_initDataSource']();}[_0x5f512f(0x223)](){const _0xf33ab7=_0x5f512f;this['_threadCommentDataSourceService'][_0xf33ab7(0x245)]=this[_0xf33ab7(0x1fb)],this[_0xf33ab7(0x204)][_0xf33ab7(0x22c)]=!0x1;}};g=te([N(0x0,_0x4289de),N(0x1,_0x4134b7(f))],g);var se=Object[_0x5f512f(0x1e5)],oe=Object[_0x5f512f(0x235)],ne=(_0x6381b4,_0x5d062a,_0xe2daff)=>_0x5d062a in _0x6381b4?se(_0x6381b4,_0x5d062a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe2daff}):_0x6381b4[_0x5d062a]=_0xe2daff,ie=(_0x23453e,_0x57a033,_0x57748d,_0x154baa)=>{const _0x5163b9=_0x5f512f;for(var _0x580690=_0x154baa>0x1?void 0x0:_0x154baa?oe(_0x57a033,_0x57748d):_0x57a033,_0x5e0b3b=_0x23453e[_0x5163b9(0x21c)]-0x1,_0x1a5ddb;_0x5e0b3b>=0x0;_0x5e0b3b--)(_0x1a5ddb=_0x23453e[_0x5e0b3b])&&(_0x580690=_0x1a5ddb(_0x580690)||_0x580690);return _0x580690;},w=(_0x5957b5,_0x43e028)=>(_0x1f6ffa,_0x36a940)=>_0x43e028(_0x1f6ffa,_0x36a940,_0x5957b5),$=(_0x55c00c,_0x3c1a14,_0x316a6a)=>ne(_0x55c00c,typeof _0x3c1a14!=_0x5f512f(0x1f0)?_0x3c1a14+'':_0x3c1a14,_0x316a6a);let b=class extends _0x2729e6{constructor(_0x30f7d7=M,_0x1c1056,_0x176320){const _0x4151c6=_0x5f512f;super(),this[_0x4151c6(0x20a)]=_0x30f7d7,this['_injector']=_0x1c1056,this[_0x4151c6(0x1e9)]=_0x176320;const {..._0x21faec}=_0x5cb88c({},M,this[_0x4151c6(0x20a)]);this[_0x4151c6(0x1e9)][_0x4151c6(0x231)](z,_0x21faec);}[_0x5f512f(0x22f)](){[[f],[g],[S]]['forEach'](_0x26d077=>{this['_injector']['add'](_0x26d077);});}['onReady'](){const _0x4670f8=_0x5f512f;this[_0x4670f8(0x237)][_0x4670f8(0x234)](g),this[_0x4670f8(0x237)][_0x4670f8(0x234)](S);}};$(b,'pluginName',W),$(b,_0x5f512f(0x201),_0x481279[_0x5f512f(0x209)]),b=ie([_0x12da24(_0xc44fe2,_0x56fb88,_0x178fe6),w(0x1,_0x4134b7(_0x49d01d)),w(0x2,_0x340ede)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3d0222=_0x215d;(function(_0x3140fd,_0x3103e7){const _0xd8b334=_0x215d,_0x27c435=_0x3140fd();while(!![]){try{const _0xb05e11=parseInt(_0xd8b334(0x83))/0x1*(-parseInt(_0xd8b334(0xc8))/0x2)+parseInt(_0xd8b334(0xc3))/0x3*(-parseInt(_0xd8b334(0x9b))/0x4)+parseInt(_0xd8b334(0x90))/0x5*(parseInt(_0xd8b334(0xcb))/0x6)+-parseInt(_0xd8b334(0xb1))/0x7*(-parseInt(_0xd8b334(0xc5))/0x8)+-parseInt(_0xd8b334(0xdd))/0x9*(-parseInt(_0xd8b334(0x95))/0xa)+parseInt(_0xd8b334(0xd5))/0xb*(-parseInt(_0xd8b334(0x89))/0xc)+parseInt(_0xd8b334(0xd6))/0xd;if(_0xb05e11===_0x3103e7)break;else _0x27c435['push'](_0x27c435['shift']());}catch(_0x1c113e){_0x27c435['push'](_0x27c435['shift']());}}}(_0x1ae7,0xbc411));import{CommentService as _0x2eedbc,CollaborationSessionService as _0x331714,UniverCollaborationClientPlugin as _0x1d664a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xd9538b}from'@univerjs-pro/license';import{dayjs as _0x3b7c2,UserManagerService as _0x312b2f,Inject as _0xb50de1,Injector as _0xc1b344,Disposable as _0x4314bc,CustomRangeType as _0xfc942,UniverInstanceType as _0x3f182b,DependentOn as _0x19c23a,IConfigService as _0x4283b9,Plugin as _0x33f723,merge as _0x351827}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x554dd4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x20227f,IThreadCommentDataSourceService as _0x43c8d5}from'@univerjs/thread-comment';function _0x215d(_0x3539ee,_0x25e01d){const _0x1ae716=_0x1ae7();return _0x215d=function(_0x215db4,_0x555a45){_0x215db4=_0x215db4-0x80;let _0x3eb85c=_0x1ae716[_0x215db4];return _0x3eb85c;},_0x215d(_0x3539ee,_0x25e01d);}import{bufferTime as _0x45eeee}from'rxjs';import{HTTPService as _0x40ab69}from'@univerjs/network';const W=_0x3d0222(0x9e);var I=(_0x4af38=>(_0x4af38[_0x4af38['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x4af38[_0x4af38[_0x3d0222(0xd2)]=0x1]=_0x3d0222(0xd2),_0x4af38[_0x4af38[_0x3d0222(0x86)]=-0x1]=_0x3d0222(0x86),_0x4af38))(I||{}),v=(_0x16435d=>(_0x16435d[_0x16435d[_0x3d0222(0xad)]=0x0]=_0x3d0222(0xad),_0x16435d[_0x16435d[_0x3d0222(0x8f)]=0x1]='Add',_0x16435d[_0x16435d[_0x3d0222(0xb5)]=0x2]=_0x3d0222(0xb5),_0x16435d[_0x16435d['Edit']=0x3]=_0x3d0222(0x92),_0x16435d[_0x16435d[_0x3d0222(0x9a)]=0x4]=_0x3d0222(0x9a),_0x16435d[_0x16435d[_0x3d0222(0xba)]=0x5]=_0x3d0222(0xba),_0x16435d[_0x16435d[_0x3d0222(0x86)]=-0x1]=_0x3d0222(0x86),_0x16435d))(v||{});const D=_0x4f0219=>_0x3b7c2(new Date(+_0x4f0219))['format'](_0x3d0222(0xa3)),B=async(_0x2ef99f,_0x28bcc4)=>{const _0xc91faf=_0x3d0222,_0x1b53fd=_0x2ef99f[_0xc91faf(0xd0)](_0x312b2f),_0x4924d4=_0x2ef99f[_0xc91faf(0xd0)](_0x40ab69);_0x28bcc4[_0xc91faf(0xca)](_0x4e3d27=>{const _0x172a5e=_0xc91faf;_0x1b53fd['getUser'](_0x4e3d27)&&_0x28bcc4[_0x172a5e(0xbf)](_0x4e3d27);}),_0x28bcc4['size']&&(await _0x4924d4['get'](_0xc91faf(0xe8),{'params':{'userIDs':[..._0x28bcc4]}}))[_0xc91faf(0xcd)][_0xc91faf(0x88)]['forEach'](_0x2d7c80=>{const _0xe40bf2=_0xc91faf;_0x2d7c80&&_0x1b53fd[_0xe40bf2(0xa2)](_0x2d7c80);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x46a882,_0x6188d,_0x5756cb,_0x16af2c)=>{const _0x38ce41=_0x3d0222;for(var _0x4ea8b3=_0x16af2c>0x1?void 0x0:_0x16af2c?K(_0x6188d,_0x5756cb):_0x6188d,_0x3e4e30=_0x46a882[_0x38ce41(0xe5)]-0x1,_0x4357c5;_0x3e4e30>=0x0;_0x3e4e30--)(_0x4357c5=_0x46a882[_0x3e4e30])&&(_0x4ea8b3=_0x4357c5(_0x4ea8b3)||_0x4ea8b3);return _0x4ea8b3;},p=(_0x296b5b,_0x23b7ba)=>(_0xfe8ff4,_0x5447b8)=>_0x23b7ba(_0xfe8ff4,_0x5447b8,_0x296b5b);let S=class extends _0x4314bc{constructor(_0x1d4d95,_0x45eac5,_0x226d24,_0x1440a0){const _0xba2ced=_0x3d0222;super(),this[_0xba2ced(0xde)]=_0x1d4d95,this[_0xba2ced(0xd9)]=_0x45eac5,this[_0xba2ced(0x82)]=_0x226d24,this[_0xba2ced(0xb9)]=_0x1440a0,this[_0xba2ced(0xac)](),this['_initUserSync']();}[_0x3d0222(0x97)](){const _0x559dbb=_0x3d0222;this[_0x559dbb(0xe3)](this[_0x559dbb(0xd9)]['commentUpdate$'][_0x559dbb(0xdb)](_0x45eeee(0x10))['subscribe'](_0x181efb=>{const _0x2936e1=_0x559dbb,_0x4cee51=new Set();_0x181efb[_0x2936e1(0xca)](_0xda2af6=>{const _0x2b5b13=_0x2936e1;switch(_0xda2af6[_0x2b5b13(0xaa)]){case'add':{const _0x5e38ce=_0xda2af6[_0x2b5b13(0xa4)][_0x2b5b13(0xdc)];_0x4cee51[_0x2b5b13(0xda)](_0x5e38ce);break;}}}),B(this['_injector'],_0x4cee51);}));}[_0x3d0222(0xac)](){const _0x59be15=_0x3d0222;this['disposeWithMe'](this[_0x59be15(0xde)][_0x59be15(0x8e)]['subscribe'](async _0x506e81=>{const _0x22693b=_0x59be15;var _0x3e0df5,_0x25e85e,_0x39480b,_0xd01aa4;const _0x1a6164=(_0x3e0df5=this[_0x22693b(0xd9)]['getUnit'](_0x506e81['unitId'])[_0x22693b(0x96)](_0x3d35fe=>_0x3d35fe[_0x22693b(0x99)]===_0x506e81[_0x22693b(0x99)]))==null?void 0x0:_0x3e0df5[_0x22693b(0x9c)];if(!_0x1a6164)return;const {unitId:_0x82dfa1,subUnitId:_0x5d32a3}=_0x1a6164;switch(_0x506e81[_0x22693b(0xdf)]&&this['_userService'][_0x22693b(0xa2)](_0x506e81[_0x22693b(0xdf)]),_0x506e81[_0x22693b(0xaa)]){case v[_0x22693b(0x8f)]:break;case v[_0x22693b(0xb5)]:{this[_0x22693b(0xd9)][_0x22693b(0x8d)](_0x82dfa1,_0x5d32a3,{'unitId':_0x82dfa1,'subUnitId':_0x5d32a3,'ref':'','id':_0x506e81[_0x22693b(0x8c)],'dT':D(+_0x506e81[_0x22693b(0xbe)]),'threadId':_0x506e81[_0x22693b(0x99)],'personId':(_0x39480b=(_0x25e85e=_0x506e81[_0x22693b(0xdf)])==null?void 0x0:_0x25e85e[_0x22693b(0xa9)])!=null?_0x39480b:_0x506e81[_0x22693b(0x8a)],'text':JSON[_0x22693b(0xb4)](_0x506e81[_0x22693b(0xa7)]),'parentId':_0x1a6164['id']});break;}case v[_0x22693b(0x9a)]:{const _0x397d8a=this[_0x22693b(0xd9)][_0x22693b(0xc6)](_0x82dfa1,_0x5d32a3,_0x506e81[_0x22693b(0x8c)]);_0x397d8a&&_0x397d8a['parentId']&&this['_threadCommentModel']['deleteComment'](_0x82dfa1,_0x5d32a3,_0x506e81[_0x22693b(0x8c)]);break;}case v[_0x22693b(0x92)]:{this['_threadCommentModel'][_0x22693b(0xbb)](_0x82dfa1,_0x5d32a3,{'commentId':_0x506e81[_0x22693b(0x8c)],'text':JSON[_0x22693b(0xb4)](_0x506e81[_0x22693b(0xa7)])});break;}case v[_0x22693b(0xba)]:{const _0x4e576d=(_0xd01aa4=this['_threadCommentModel'][_0x22693b(0xc0)](_0x506e81[_0x22693b(0x9f)])[_0x22693b(0x96)](_0x49dc00=>_0x49dc00[_0x22693b(0x99)]===_0x506e81[_0x22693b(0x99)]))==null?void 0x0:_0xd01aa4[_0x22693b(0x9c)];_0x4e576d&&this[_0x22693b(0xd9)][_0x22693b(0xe6)](_0x82dfa1,_0x5d32a3,_0x4e576d['id'],_0x506e81[_0x22693b(0xe7)]===I[_0x22693b(0xd2)]);break;}}}));}};S=V([p(0x0,_0xb50de1(_0x2eedbc)),p(0x1,_0xb50de1(_0x20227f)),p(0x2,_0xb50de1(_0x312b2f)),p(0x3,_0xb50de1(_0xc1b344))],S);const z=_0x3d0222(0xaf),M={};var k=Object[_0x3d0222(0xcc)],Q=(_0x10058c,_0x1b9c24,_0x43394a,_0x11e3cf)=>{for(var _0x35138e=_0x11e3cf>0x1?void 0x0:_0x11e3cf?k(_0x1b9c24,_0x43394a):_0x1b9c24,_0x331af7=_0x10058c['length']-0x1,_0x3f93f2;_0x331af7>=0x0;_0x331af7--)(_0x3f93f2=_0x10058c[_0x331af7])&&(_0x35138e=_0x3f93f2(_0x35138e)||_0x35138e);return _0x35138e;},_=(_0x2791c3,_0x4c0229)=>(_0x4ac72c,_0x11e90e)=>_0x4c0229(_0x4ac72c,_0x11e90e,_0x2791c3);function X(_0x40c91b,_0x4d83db){const _0x5a4b1c=_0x3d0222,_0x59b46a=_0x40c91b['replies'][0x0];return{..._0x4d83db,'id':_0x59b46a[_0x5a4b1c(0x8c)],'resolved':_0x40c91b[_0x5a4b1c(0xe7)]===0x1,'dT':D(_0x59b46a[_0x5a4b1c(0xbe)]),'personId':_0x59b46a[_0x5a4b1c(0x8a)],'threadId':_0x59b46a[_0x5a4b1c(0x99)]};}function ee(_0x3b4b64,_0x2ac990,_0x729992){const _0x4cbfe7=_0x3d0222;var _0xa41e14,_0x2c182e;if(((_0x2c182e=(_0xa41e14=_0x3b4b64==null?void 0x0:_0x3b4b64[_0x4cbfe7(0xab)])==null?void 0x0:_0xa41e14['length'])!=null?_0x2c182e:0x0)>0x0){const _0x2e01a3=(_0x1b5e80,_0xe75e5d)=>({'id':_0x1b5e80['replyId'],'threadId':_0x1b5e80[_0x4cbfe7(0x99)],'dT':D(_0x1b5e80['createTimestamp']),'personId':_0x1b5e80[_0x4cbfe7(0x8a)],'resolved':_0x3b4b64[_0x4cbfe7(0xe7)]===I[_0x4cbfe7(0xd2)],'unitId':_0x2ac990,'subUnitId':_0x729992,'text':JSON[_0x4cbfe7(0xb4)](_0x1b5e80[_0x4cbfe7(0xa7)]),'parentId':_0xe75e5d}),_0x3e59d7=_0x2e01a3(_0x3b4b64[_0x4cbfe7(0xab)][0x0]);return{..._0x3e59d7,'children':_0x3b4b64['replies'][_0x4cbfe7(0xd3)](0x1)[_0x4cbfe7(0x84)](_0x5abc96=>_0x2e01a3(_0x5abc96,_0x3e59d7['id']))};}return null;}let f=class{constructor(_0x4d307b,_0x334e9f,_0x5d93ce,_0x3efa69){const _0x550a26=_0x3d0222;this[_0x550a26(0x8b)]=_0x4d307b,this[_0x550a26(0x82)]=_0x334e9f,this['_sessionService']=_0x5d93ce,this[_0x550a26(0xb9)]=_0x3efa69;}async[_0x3d0222(0x8d)](_0x64865a){const _0x1ec075=_0x3d0222;var _0x333129,_0x28205e;const {parentId:_0x1886c5,unitId:_0x3e28d7,text:_0x487b95,threadId:_0x1eb36c}=_0x64865a,_0x2172a1=(_0x28205e=(_0x333129=_0x487b95['customRanges'])==null?void 0x0:_0x333129['filter'](_0x2d4a13=>_0x2d4a13[_0x1ec075(0xae)]===_0xfc942[_0x1ec075(0xc7)])[_0x1ec075(0x84)](_0x223472=>_0x223472[_0x1ec075(0xb6)]))!=null?_0x28205e:[],_0x122f88=JSON[_0x1ec075(0xcf)](_0x487b95),_0x4f5e50=(await this[_0x1ec075(0xa0)][_0x1ec075(0x9d)](_0x3e28d7))['getMemberID']();if(_0x1886c5){const _0x534844={'memberId':_0x4f5e50,'unitId':_0x3e28d7,'content':_0x122f88,'mention':_0x2172a1,'threadId':_0x1eb36c},_0x4d9b53=(await this[_0x1ec075(0x8b)][_0x1ec075(0xb0)](_0x1ec075(0xe1)+_0x3e28d7+'/reply',{'body':_0x534844}))[_0x1ec075(0xcd)][_0x1ec075(0xb3)];return{..._0x64865a,'id':_0x4d9b53['replyId'],'dT':_0x3b7c2(+_0x4d9b53[_0x1ec075(0xbe)])[_0x1ec075(0xc1)](_0x1ec075(0xa3)),'personId':_0x4d9b53[_0x1ec075(0x8a)]};}else{const _0xd499b5={'memberId':_0x4f5e50,'unitId':_0x3e28d7,'content':_0x122f88,'mention':_0x2172a1},_0x14b436=await this[_0x1ec075(0x8b)][_0x1ec075(0xb0)](_0x1ec075(0xe1)+_0x3e28d7+'/add',{'body':_0xd499b5});return X(_0x14b436[_0x1ec075(0xcd)]['comment'],_0x64865a);}}async[_0x3d0222(0xbb)](_0x3720e5){const _0x5cd947=_0x3d0222;var _0x5ba954,_0x12fadd;const {text:_0xda9522,unitId:_0x45e44b}=_0x3720e5,_0xdc3f54=(_0x12fadd=(_0x5ba954=_0xda9522[_0x5cd947(0xc2)])==null?void 0x0:_0x5ba954[_0x5cd947(0xa1)](_0x80135c=>_0x80135c[_0x5cd947(0xae)]===_0xfc942['COMMENT'])[_0x5cd947(0x84)](_0x4b7208=>_0x4b7208[_0x5cd947(0xb6)]))!=null?_0x12fadd:[],_0x107725=JSON['stringify'](_0xda9522),_0x4a8eda=_0x3720e5[_0x5cd947(0x99)],_0x2f3a87=_0x3720e5['id'],_0xc1a49f={'memberId':(await this[_0x5cd947(0xa0)][_0x5cd947(0x9d)](_0x45e44b))[_0x5cd947(0xa6)](),'unitId':_0x45e44b,'threadId':_0x4a8eda,'mention':_0xdc3f54,'content':_0x107725,'replyId':_0x2f3a87},_0x2c39ee=await this[_0x5cd947(0x8b)][_0x5cd947(0xb0)](_0x5cd947(0xe1)+_0x45e44b+_0x5cd947(0x94),{'body':_0xc1a49f});return!_0x2c39ee['body']['error']||_0x2c39ee['body'][_0x5cd947(0xb8)][_0x5cd947(0xa5)]===0x1;}async['resolveComment'](_0x568d2f){const _0x144fd3=_0x3d0222,{unitId:_0x50b417}=_0x568d2f,_0x484fac=_0x568d2f[_0x144fd3(0x99)],_0x3d5fe8={'memberId':this[_0x144fd3(0x82)][_0x144fd3(0x81)]()[_0x144fd3(0xa9)],'unitId':_0x50b417,'threadId':_0x484fac,'solved':_0x568d2f[_0x144fd3(0xe4)]?I[_0x144fd3(0xd2)]:I[_0x144fd3(0x80)]},_0x3755e9=await this[_0x144fd3(0x8b)]['post'](_0x144fd3(0xe1)+_0x50b417+_0x144fd3(0x85),{'body':_0x3d5fe8});return!_0x3755e9[_0x144fd3(0xcd)]['error']||_0x3755e9[_0x144fd3(0xcd)]['error'][_0x144fd3(0xa5)]===0x1;}async[_0x3d0222(0xd1)](_0x4868f4,_0x5b36a4,_0x3d16b6,_0x1a19ad){const _0x3f5155=_0x3d0222,_0x41bea9={'memberId':(await this[_0x3f5155(0xa0)][_0x3f5155(0x9d)](_0x4868f4))['getMemberID'](),'threadId':_0x3d16b6,'replyId':_0x1a19ad,'unitId':_0x4868f4},_0x266303=await this['_httpService'][_0x3f5155(0xb0)](_0x3f5155(0xe1)+_0x4868f4+_0x3f5155(0x93),{'body':_0x41bea9});return!_0x266303[_0x3f5155(0xcd)][_0x3f5155(0xb8)]||_0x266303[_0x3f5155(0xcd)]['error'][_0x3f5155(0xa5)]===0x1;}async[_0x3d0222(0xb7)](_0x1c6340,_0x5b9171,_0xff73d9){const _0x3627ba=_0x3d0222,_0x4462cd={'unitId':_0x1c6340,'threadId':_0xff73d9},_0x2d2a71=await this[_0x3627ba(0x8b)][_0x3627ba(0xb0)]('/universer-api/comment/unit/'+_0x1c6340+_0x3627ba(0xce),{'body':_0x4462cd}),_0x31c03a=_0xff73d9[_0x3627ba(0x84)](_0x301d85=>ee(_0x2d2a71['body'][_0x3627ba(0xc9)][_0x301d85],_0x1c6340,_0x5b9171))[_0x3627ba(0xa1)](Boolean);return Object[_0x3627ba(0xd8)](_0x2d2a71['body'][_0x3627ba(0x88)])[_0x3627ba(0xca)](_0x2fe9aa=>{const _0x449b1a=_0x3627ba;this[_0x449b1a(0x82)][_0x449b1a(0xa2)](_0x2fe9aa);}),_0x31c03a;}[_0x3d0222(0xbd)](_0x3cecfc){const _0x49bf80=_0x3d0222;return{'id':_0x3cecfc['id'],'threadId':_0x3cecfc[_0x49bf80(0x99)],'ref':_0x3cecfc['ref']};}};f=Q([_(0x0,_0xb50de1(_0x40ab69)),_(0x1,_0xb50de1(_0x312b2f)),_(0x2,_0xb50de1(_0x331714)),_(0x3,_0xb50de1(_0xc1b344))],f);var re=Object[_0x3d0222(0xcc)],te=(_0x340c9,_0x4aa2ee,_0x49b161,_0x593a88)=>{const _0x50c0d1=_0x3d0222;for(var _0x420459=_0x593a88>0x1?void 0x0:_0x593a88?re(_0x4aa2ee,_0x49b161):_0x4aa2ee,_0x36a67d=_0x340c9[_0x50c0d1(0xe5)]-0x1,_0x1c4c42;_0x36a67d>=0x0;_0x36a67d--)(_0x1c4c42=_0x340c9[_0x36a67d])&&(_0x420459=_0x1c4c42(_0x420459)||_0x420459);return _0x420459;},N=(_0x32d9c6,_0x4bf623)=>(_0x5c2141,_0x2980b2)=>_0x4bf623(_0x5c2141,_0x2980b2,_0x32d9c6);let g=class extends _0x4314bc{constructor(_0x418de9,_0x32c23f){super(),this['_threadCommentDataSourceService']=_0x418de9,this['_threadCommentDataSource']=_0x32c23f,this['_initDataSource']();}[_0x3d0222(0xe0)](){const _0x2e3614=_0x3d0222;this[_0x2e3614(0xa8)][_0x2e3614(0x87)]=this[_0x2e3614(0xbc)],this[_0x2e3614(0xa8)][_0x2e3614(0x98)]=!0x1;}};function _0x1ae7(){const _0x52b082=['_userService','586dvCcgf','map','/solved','UNRECOGNIZED','dataSource','users','180aqdHGH','userId','_httpService','replyId','addComment','commentUpdate$','Add','395FstyHN','_configService','Edit','/delete','/edit','937000hkGEtP','find','_initUserSync','syncUpdateMutationToColla','threadId','Delete','5212OtbjqO','root','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','_sessionService','filter','addUser','YYYY/MM/DD\x20HH:mm','payload','code','getMemberID','content','_threadCommentDataSourceService','userID','type','replies','_init','Unknown','rangeType','thread-comment-data-source.config','post','7yFdsnJ','defineProperty','reply','parse','Reply','rangeId','listComments','error','_injector','Solve','updateComment','_threadCommentDataSource','saveCommentToSnapshot','createTimestamp','delete','getUnit','format','customRanges','1572OeylcM','UNIVER_UNKNOWN','12245936PqSczY','getComment','COMMENT','3590tHWYWd','comments','forEach','48390MLxJFA','getOwnPropertyDescriptor','body','/list','stringify','get','deleteComment','Solved','slice','onReady','4906ZPVrYh','3260972WvBiQu','_config','values','_threadCommentModel','add','pipe','personId','9QSphko','_commentService','user','_initDataSource','/universer-api/comment/unit/','symbol','disposeWithMe','resolved','length','resolveComment','solved','/universer-api/user/list','OpenOrReOpen','getCurrentUser'];_0x1ae7=function(){return _0x52b082;};return _0x1ae7();}g=te([N(0x0,_0x43c8d5),N(0x1,_0xb50de1(f))],g);var se=Object[_0x3d0222(0xb2)],oe=Object[_0x3d0222(0xcc)],ne=(_0x5e632d,_0x4d7829,_0xd5531a)=>_0x4d7829 in _0x5e632d?se(_0x5e632d,_0x4d7829,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd5531a}):_0x5e632d[_0x4d7829]=_0xd5531a,ie=(_0x55f43e,_0x24a442,_0x4c5758,_0x262485)=>{const _0x58e45f=_0x3d0222;for(var _0x2d7c02=_0x262485>0x1?void 0x0:_0x262485?oe(_0x24a442,_0x4c5758):_0x24a442,_0x48c0b4=_0x55f43e[_0x58e45f(0xe5)]-0x1,_0x43c453;_0x48c0b4>=0x0;_0x48c0b4--)(_0x43c453=_0x55f43e[_0x48c0b4])&&(_0x2d7c02=_0x43c453(_0x2d7c02)||_0x2d7c02);return _0x2d7c02;},w=(_0x6073e9,_0x595dcb)=>(_0x5e5eee,_0x528be8)=>_0x595dcb(_0x5e5eee,_0x528be8,_0x6073e9),$=(_0x3c32e1,_0x54998a,_0x3c99c7)=>ne(_0x3c32e1,typeof _0x54998a!=_0x3d0222(0xe2)?_0x54998a+'':_0x54998a,_0x3c99c7);let b=class extends _0x33f723{constructor(_0x78f431=M,_0xc87333,_0x2c062f){const _0x3c091b=_0x3d0222;super(),this[_0x3c091b(0xd7)]=_0x78f431,this[_0x3c091b(0xb9)]=_0xc87333,this['_configService']=_0x2c062f;const {..._0x582984}=_0x351827({},M,this[_0x3c091b(0xd7)]);this[_0x3c091b(0x91)]['setConfig'](z,_0x582984);}['onStarting'](){const _0x5d99fb=_0x3d0222;[[f],[g],[S]][_0x5d99fb(0xca)](_0x256598=>{const _0x3fd4c6=_0x5d99fb;this[_0x3fd4c6(0xb9)][_0x3fd4c6(0xda)](_0x256598);});}[_0x3d0222(0xd4)](){const _0x5aa9b8=_0x3d0222;this[_0x5aa9b8(0xb9)]['get'](g),this['_injector'][_0x5aa9b8(0xd0)](S);}};$(b,'pluginName',W),$(b,_0x3d0222(0xaa),_0x3f182b[_0x3d0222(0xc4)]),b=ie([_0x19c23a(_0x554dd4,_0x1d664a,_0xd9538b),w(0x1,_0xb50de1(_0xc1b344)),w(0x2,_0x4283b9)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x2690(_0x275a34,_0x3fc05c){const _0x331c48=_0x331c();return _0x2690=function(_0x2690f3,_0x74ad54){_0x2690f3=_0x2690f3-0x1e0;let _0xddce5d=_0x331c48[_0x2690f3];return _0xddce5d;},_0x2690(_0x275a34,_0x3fc05c);}const _0x5f512f=_0x2690;(function(_0x55dc9d,_0x286886){const _0x34393a=_0x2690,_0x138f78=_0x55dc9d();while(!![]){try{const _0xfb5746=parseInt(_0x34393a(0x20e))/0x1+-parseInt(_0x34393a(0x1fd))/0x2+-parseInt(_0x34393a(0x23e))/0x3*(parseInt(_0x34393a(0x215))/0x4)+parseInt(_0x34393a(0x1fa))/0x5*(-parseInt(_0x34393a(0x22d))/0x6)+parseInt(_0x34393a(0x21a))/0x7+-parseInt(_0x34393a(0x228))/0x8+-parseInt(_0x34393a(0x21e))/0x9*(-parseInt(_0x34393a(0x233))/0xa);if(_0xfb5746===_0x286886)break;else _0x138f78['push'](_0x138f78['shift']());}catch(_0x31f50e){_0x138f78['push'](_0x138f78['shift']());}}}(_0x331c,0xf1342));import{CommentService as _0x4a90e7,CollaborationSessionService as _0x3972dd,UniverCollaborationClientPlugin as _0x56fb88}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x178fe6}from'@univerjs-pro/license';import{dayjs as _0x367654,UserManagerService as _0x56b3c1,Inject as _0x4134b7,Injector as _0x49d01d,Disposable as _0x70aa62,CustomRangeType as _0xcd641e,UniverInstanceType as _0x481279,DependentOn as _0x12da24,IConfigService as _0x340ede,Plugin as _0x2729e6,merge as _0x5cb88c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xc44fe2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x9f961a,IThreadCommentDataSourceService as _0x4289de}from'@univerjs/thread-comment';import{bufferTime as _0x55e3f7}from'rxjs';import{HTTPService as _0x1c96c6}from'@univerjs/network';const W=_0x5f512f(0x241);var I=(_0x4c2cd1=>(_0x4c2cd1[_0x4c2cd1[_0x5f512f(0x23a)]=0x0]=_0x5f512f(0x23a),_0x4c2cd1[_0x4c2cd1[_0x5f512f(0x1e0)]=0x1]=_0x5f512f(0x1e0),_0x4c2cd1[_0x4c2cd1[_0x5f512f(0x20d)]=-0x1]='UNRECOGNIZED',_0x4c2cd1))(I||{}),v=(_0x2aeac3=>(_0x2aeac3[_0x2aeac3[_0x5f512f(0x23b)]=0x0]='Unknown',_0x2aeac3[_0x2aeac3[_0x5f512f(0x23d)]=0x1]=_0x5f512f(0x23d),_0x2aeac3[_0x2aeac3['Reply']=0x2]='Reply',_0x2aeac3[_0x2aeac3[_0x5f512f(0x1f4)]=0x3]='Edit',_0x2aeac3[_0x2aeac3[_0x5f512f(0x206)]=0x4]='Delete',_0x2aeac3[_0x2aeac3[_0x5f512f(0x238)]=0x5]='Solve',_0x2aeac3[_0x2aeac3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2aeac3))(v||{});const D=_0x2b6b8f=>_0x367654(new Date(+_0x2b6b8f))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x1a3d74,_0x167ee9)=>{const _0x16ce51=_0x5f512f,_0x3f7a68=_0x1a3d74[_0x16ce51(0x234)](_0x56b3c1),_0xcf6ca=_0x1a3d74[_0x16ce51(0x234)](_0x1c96c6);_0x167ee9[_0x16ce51(0x1e4)](_0x2b6f06=>{const _0x2d7d19=_0x16ce51;_0x3f7a68[_0x2d7d19(0x1e2)](_0x2b6f06)&&_0x167ee9['delete'](_0x2b6f06);}),_0x167ee9[_0x16ce51(0x21b)]&&(await _0xcf6ca[_0x16ce51(0x234)](_0x16ce51(0x207),{'params':{'userIDs':[..._0x167ee9]}}))[_0x16ce51(0x218)][_0x16ce51(0x23c)]['forEach'](_0x309d8c=>{const _0x5006a7=_0x16ce51;_0x309d8c&&_0x3f7a68[_0x5006a7(0x22e)](_0x309d8c);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x453a46,_0x2ec752,_0x13c8f1,_0x370670)=>{const _0x5b75c0=_0x5f512f;for(var _0x31b1e7=_0x370670>0x1?void 0x0:_0x370670?K(_0x2ec752,_0x13c8f1):_0x2ec752,_0x4715d7=_0x453a46[_0x5b75c0(0x21c)]-0x1,_0x2eb42b;_0x4715d7>=0x0;_0x4715d7--)(_0x2eb42b=_0x453a46[_0x4715d7])&&(_0x31b1e7=_0x2eb42b(_0x31b1e7)||_0x31b1e7);return _0x31b1e7;},p=(_0x4ed916,_0x2c56ae)=>(_0x96d4a1,_0x282a6e)=>_0x2c56ae(_0x96d4a1,_0x282a6e,_0x4ed916);let S=class extends _0x70aa62{constructor(_0x27d7a3,_0x4d403b,_0x1d5f7a,_0x5a2cd7){const _0x2a3afd=_0x5f512f;super(),this['_commentService']=_0x27d7a3,this[_0x2a3afd(0x20c)]=_0x4d403b,this[_0x2a3afd(0x230)]=_0x1d5f7a,this[_0x2a3afd(0x237)]=_0x5a2cd7,this[_0x2a3afd(0x232)](),this[_0x2a3afd(0x1f3)]();}[_0x5f512f(0x1f3)](){const _0x3f559a=_0x5f512f;this[_0x3f559a(0x1f1)](this['_threadCommentModel'][_0x3f559a(0x214)][_0x3f559a(0x1f5)](_0x55e3f7(0x10))[_0x3f559a(0x1f7)](_0x1d5704=>{const _0x2b2b07=_0x3f559a,_0xcc0146=new Set();_0x1d5704[_0x2b2b07(0x1e4)](_0x209dfc=>{const _0x4c7d7c=_0x2b2b07;switch(_0x209dfc[_0x4c7d7c(0x201)]){case _0x4c7d7c(0x227):{const _0x53c754=_0x209dfc[_0x4c7d7c(0x213)]['personId'];_0xcc0146[_0x4c7d7c(0x227)](_0x53c754);break;}}}),B(this['_injector'],_0xcc0146);}));}[_0x5f512f(0x232)](){const _0x43451a=_0x5f512f;this[_0x43451a(0x1f1)](this[_0x43451a(0x203)][_0x43451a(0x214)][_0x43451a(0x1f7)](async _0x5aa859=>{const _0x1f1ba0=_0x43451a;var _0x5ab4ed,_0x435963,_0x58ccef,_0x552987;const _0x2f931d=(_0x5ab4ed=this['_threadCommentModel']['getUnit'](_0x5aa859['unitId'])[_0x1f1ba0(0x1ec)](_0x121db5=>_0x121db5['threadId']===_0x5aa859['threadId']))==null?void 0x0:_0x5ab4ed['root'];if(!_0x2f931d)return;const {unitId:_0x3fc686,subUnitId:_0x116f72}=_0x2f931d;switch(_0x5aa859['user']&&this[_0x1f1ba0(0x230)][_0x1f1ba0(0x22e)](_0x5aa859[_0x1f1ba0(0x229)]),_0x5aa859[_0x1f1ba0(0x201)]){case v[_0x1f1ba0(0x23d)]:break;case v[_0x1f1ba0(0x22a)]:{this[_0x1f1ba0(0x20c)][_0x1f1ba0(0x208)](_0x3fc686,_0x116f72,{'unitId':_0x3fc686,'subUnitId':_0x116f72,'ref':'','id':_0x5aa859[_0x1f1ba0(0x202)],'dT':D(+_0x5aa859[_0x1f1ba0(0x239)]),'threadId':_0x5aa859[_0x1f1ba0(0x243)],'personId':(_0x58ccef=(_0x435963=_0x5aa859[_0x1f1ba0(0x229)])==null?void 0x0:_0x435963[_0x1f1ba0(0x22b)])!=null?_0x58ccef:_0x5aa859['userId'],'text':JSON['parse'](_0x5aa859[_0x1f1ba0(0x1ed)]),'parentId':_0x2f931d['id']});break;}case v[_0x1f1ba0(0x206)]:{const _0x1315e=this[_0x1f1ba0(0x20c)][_0x1f1ba0(0x244)](_0x3fc686,_0x116f72,_0x5aa859[_0x1f1ba0(0x202)]);_0x1315e&&_0x1315e[_0x1f1ba0(0x222)]&&this[_0x1f1ba0(0x20c)][_0x1f1ba0(0x1fc)](_0x3fc686,_0x116f72,_0x5aa859[_0x1f1ba0(0x202)]);break;}case v[_0x1f1ba0(0x1f4)]:{this[_0x1f1ba0(0x20c)]['updateComment'](_0x3fc686,_0x116f72,{'commentId':_0x5aa859['replyId'],'text':JSON[_0x1f1ba0(0x205)](_0x5aa859['content'])});break;}case v[_0x1f1ba0(0x238)]:{const _0x11af7e=(_0x552987=this[_0x1f1ba0(0x20c)][_0x1f1ba0(0x21f)](_0x5aa859['unitId'])['find'](_0x59a861=>_0x59a861['threadId']===_0x5aa859[_0x1f1ba0(0x243)]))==null?void 0x0:_0x552987[_0x1f1ba0(0x1f6)];_0x11af7e&&this['_threadCommentModel']['resolveComment'](_0x3fc686,_0x116f72,_0x11af7e['id'],_0x5aa859[_0x1f1ba0(0x224)]===I[_0x1f1ba0(0x1e0)]);break;}}}));}};S=V([p(0x0,_0x4134b7(_0x4a90e7)),p(0x1,_0x4134b7(_0x9f961a)),p(0x2,_0x4134b7(_0x56b3c1)),p(0x3,_0x4134b7(_0x49d01d))],S);const z=_0x5f512f(0x200),M={};var k=Object[_0x5f512f(0x235)],Q=(_0x12af47,_0x2e9fa3,_0x2970c2,_0x3f4336)=>{for(var _0x43079b=_0x3f4336>0x1?void 0x0:_0x3f4336?k(_0x2e9fa3,_0x2970c2):_0x2e9fa3,_0x3c4e8c=_0x12af47['length']-0x1,_0x302ec0;_0x3c4e8c>=0x0;_0x3c4e8c--)(_0x302ec0=_0x12af47[_0x3c4e8c])&&(_0x43079b=_0x302ec0(_0x43079b)||_0x43079b);return _0x43079b;},_=(_0x481cd1,_0x2edb55)=>(_0x3ae6eb,_0xa5f839)=>_0x2edb55(_0x3ae6eb,_0xa5f839,_0x481cd1);function X(_0x3736ca,_0x257494){const _0x3cd3af=_0x5f512f,_0x3afd22=_0x3736ca[_0x3cd3af(0x1e3)][0x0];return{..._0x257494,'id':_0x3afd22[_0x3cd3af(0x202)],'resolved':_0x3736ca[_0x3cd3af(0x224)]===0x1,'dT':D(_0x3afd22['createTimestamp']),'personId':_0x3afd22[_0x3cd3af(0x1fe)],'threadId':_0x3afd22[_0x3cd3af(0x243)]};}function ee(_0x5e1e64,_0x1341dc,_0x254677){const _0x474ae0=_0x5f512f;var _0x66e996,_0x57e595;if(((_0x57e595=(_0x66e996=_0x5e1e64==null?void 0x0:_0x5e1e64[_0x474ae0(0x1e3)])==null?void 0x0:_0x66e996[_0x474ae0(0x21c)])!=null?_0x57e595:0x0)>0x0){const _0x2bbf98=(_0x246322,_0x3d38df)=>({'id':_0x246322[_0x474ae0(0x202)],'threadId':_0x246322[_0x474ae0(0x243)],'dT':D(_0x246322[_0x474ae0(0x239)]),'personId':_0x246322['userId'],'resolved':_0x5e1e64['solved']===I[_0x474ae0(0x1e0)],'unitId':_0x1341dc,'subUnitId':_0x254677,'text':JSON[_0x474ae0(0x205)](_0x246322[_0x474ae0(0x1ed)]),'parentId':_0x3d38df}),_0x5c6e90=_0x2bbf98(_0x5e1e64[_0x474ae0(0x1e3)][0x0]);return{..._0x5c6e90,'children':_0x5e1e64[_0x474ae0(0x1e3)]['slice'](0x1)['map'](_0x49fe45=>_0x2bbf98(_0x49fe45,_0x5c6e90['id']))};}return null;}let f=class{constructor(_0x3b5361,_0xd08da4,_0x1ef7b1,_0x2e4a5b){const _0x477e6c=_0x5f512f;this['_httpService']=_0x3b5361,this[_0x477e6c(0x230)]=_0xd08da4,this['_sessionService']=_0x1ef7b1,this['_injector']=_0x2e4a5b;}async[_0x5f512f(0x208)](_0x537fe1){const _0x239360=_0x5f512f;var _0xadeeb6,_0x6df5d6;const {parentId:_0x4b650f,unitId:_0x58cdba,text:_0x1f2107,threadId:_0x5e615a}=_0x537fe1,_0x39f67f=(_0x6df5d6=(_0xadeeb6=_0x1f2107[_0x239360(0x1ea)])==null?void 0x0:_0xadeeb6[_0x239360(0x217)](_0x5a359d=>_0x5a359d['rangeType']===_0xcd641e['COMMENT'])[_0x239360(0x1ff)](_0x5af0e4=>_0x5af0e4[_0x239360(0x212)]))!=null?_0x6df5d6:[],_0x29870c=JSON[_0x239360(0x226)](_0x1f2107),_0x21f69c=(await this[_0x239360(0x211)][_0x239360(0x240)](_0x58cdba))['getMemberID']();if(_0x4b650f){const _0x36c57a={'memberId':_0x21f69c,'unitId':_0x58cdba,'content':_0x29870c,'mention':_0x39f67f,'threadId':_0x5e615a},_0x1639dd=(await this[_0x239360(0x236)][_0x239360(0x242)](_0x239360(0x1e1)+_0x58cdba+_0x239360(0x1f9),{'body':_0x36c57a}))[_0x239360(0x218)][_0x239360(0x220)];return{..._0x537fe1,'id':_0x1639dd[_0x239360(0x202)],'dT':_0x367654(+_0x1639dd['createTimestamp'])['format'](_0x239360(0x210)),'personId':_0x1639dd[_0x239360(0x1fe)]};}else{const _0x28f7b0={'memberId':_0x21f69c,'unitId':_0x58cdba,'content':_0x29870c,'mention':_0x39f67f},_0x3e314e=await this['_httpService'][_0x239360(0x242)]('/universer-api/comment/unit/'+_0x58cdba+_0x239360(0x20b),{'body':_0x28f7b0});return X(_0x3e314e[_0x239360(0x218)][_0x239360(0x1e7)],_0x537fe1);}}async[_0x5f512f(0x21d)](_0x2a6273){const _0x3e02b4=_0x5f512f;var _0x2a8364,_0x5822f3;const {text:_0x216c66,unitId:_0xcd70b6}=_0x2a6273,_0x4d32d8=(_0x5822f3=(_0x2a8364=_0x216c66['customRanges'])==null?void 0x0:_0x2a8364[_0x3e02b4(0x217)](_0x5c8722=>_0x5c8722[_0x3e02b4(0x1e6)]===_0xcd641e[_0x3e02b4(0x1eb)])[_0x3e02b4(0x1ff)](_0x39e0a9=>_0x39e0a9[_0x3e02b4(0x212)]))!=null?_0x5822f3:[],_0x2314c6=JSON[_0x3e02b4(0x226)](_0x216c66),_0x638294=_0x2a6273[_0x3e02b4(0x243)],_0x38171a=_0x2a6273['id'],_0x70dd23={'memberId':(await this['_sessionService']['requireSession'](_0xcd70b6))[_0x3e02b4(0x221)](),'unitId':_0xcd70b6,'threadId':_0x638294,'mention':_0x4d32d8,'content':_0x2314c6,'replyId':_0x38171a},_0x14c459=await this[_0x3e02b4(0x236)][_0x3e02b4(0x242)](_0x3e02b4(0x1e1)+_0xcd70b6+_0x3e02b4(0x219),{'body':_0x70dd23});return!_0x14c459[_0x3e02b4(0x218)][_0x3e02b4(0x1f8)]||_0x14c459[_0x3e02b4(0x218)][_0x3e02b4(0x1f8)][_0x3e02b4(0x1f2)]===0x1;}async[_0x5f512f(0x225)](_0x1e1a37){const _0x230fb8=_0x5f512f,{unitId:_0x2ec259}=_0x1e1a37,_0xce83ab=_0x1e1a37[_0x230fb8(0x243)],_0xacfe6={'memberId':this[_0x230fb8(0x230)][_0x230fb8(0x1e8)]()['userID'],'unitId':_0x2ec259,'threadId':_0xce83ab,'solved':_0x1e1a37[_0x230fb8(0x1ef)]?I['Solved']:I[_0x230fb8(0x23a)]},_0x340f6d=await this[_0x230fb8(0x236)][_0x230fb8(0x242)]('/universer-api/comment/unit/'+_0x2ec259+_0x230fb8(0x20f),{'body':_0xacfe6});return!_0x340f6d[_0x230fb8(0x218)][_0x230fb8(0x1f8)]||_0x340f6d[_0x230fb8(0x218)][_0x230fb8(0x1f8)]['code']===0x1;}async[_0x5f512f(0x1fc)](_0x1733dd,_0xa9d96d,_0xec82a4,_0x305a59){const _0x397ca0=_0x5f512f,_0x527c72={'memberId':(await this['_sessionService'][_0x397ca0(0x240)](_0x1733dd))['getMemberID'](),'threadId':_0xec82a4,'replyId':_0x305a59,'unitId':_0x1733dd},_0x3d37d4=await this[_0x397ca0(0x236)][_0x397ca0(0x242)](_0x397ca0(0x1e1)+_0x1733dd+_0x397ca0(0x216),{'body':_0x527c72});return!_0x3d37d4[_0x397ca0(0x218)][_0x397ca0(0x1f8)]||_0x3d37d4[_0x397ca0(0x218)][_0x397ca0(0x1f8)][_0x397ca0(0x1f2)]===0x1;}async[_0x5f512f(0x1ee)](_0x39c6e4,_0x29fb1c,_0x18edb7){const _0x207e3d=_0x5f512f,_0x13e022={'unitId':_0x39c6e4,'threadId':_0x18edb7},_0x4d6fa3=await this[_0x207e3d(0x236)][_0x207e3d(0x242)](_0x207e3d(0x1e1)+_0x39c6e4+_0x207e3d(0x23f),{'body':_0x13e022}),_0x6dea79=_0x18edb7[_0x207e3d(0x1ff)](_0x373315=>ee(_0x4d6fa3['body']['comments'][_0x373315],_0x39c6e4,_0x29fb1c))[_0x207e3d(0x217)](Boolean);return Object['values'](_0x4d6fa3[_0x207e3d(0x218)][_0x207e3d(0x23c)])[_0x207e3d(0x1e4)](_0x524e73=>{const _0x40a0b1=_0x207e3d;this[_0x40a0b1(0x230)][_0x40a0b1(0x22e)](_0x524e73);}),_0x6dea79;}['saveCommentToSnapshot'](_0x4f9ed5){return{'id':_0x4f9ed5['id'],'threadId':_0x4f9ed5['threadId'],'ref':_0x4f9ed5['ref']};}};f=Q([_(0x0,_0x4134b7(_0x1c96c6)),_(0x1,_0x4134b7(_0x56b3c1)),_(0x2,_0x4134b7(_0x3972dd)),_(0x3,_0x4134b7(_0x49d01d))],f);var re=Object[_0x5f512f(0x235)],te=(_0xafe116,_0x3f965e,_0x2723e8,_0x16cf5d)=>{for(var _0x35e1e8=_0x16cf5d>0x1?void 0x0:_0x16cf5d?re(_0x3f965e,_0x2723e8):_0x3f965e,_0x54d3d6=_0xafe116['length']-0x1,_0x533170;_0x54d3d6>=0x0;_0x54d3d6--)(_0x533170=_0xafe116[_0x54d3d6])&&(_0x35e1e8=_0x533170(_0x35e1e8)||_0x35e1e8);return _0x35e1e8;},N=(_0x21c5d4,_0x2acda2)=>(_0x3ce39e,_0x283832)=>_0x2acda2(_0x3ce39e,_0x283832,_0x21c5d4);function _0x331c(){const _0x2345a0=['YYYY/MM/DD\x20HH:mm','_sessionService','rangeId','payload','commentUpdate$','68oePUCK','/delete','filter','body','/edit','6157235iecjUm','size','length','updateComment','214713KinzKg','getUnit','reply','getMemberID','parentId','_initDataSource','solved','resolveComment','stringify','add','2537688ukPjoA','user','Reply','userID','syncUpdateMutationToColla','6JfghLa','addUser','onStarting','_userService','setConfig','_init','1960mETIYO','get','getOwnPropertyDescriptor','_httpService','_injector','Solve','createTimestamp','OpenOrReOpen','Unknown','users','Add','201483YTXGHj','/list','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','post','threadId','getComment','dataSource','Solved','/universer-api/comment/unit/','getUser','replies','forEach','defineProperty','rangeType','comment','getCurrentUser','_configService','customRanges','COMMENT','find','content','listComments','resolved','symbol','disposeWithMe','code','_initUserSync','Edit','pipe','root','subscribe','error','/reply','7636285cHptWi','_threadCommentDataSource','deleteComment','3245288KoPkKa','userId','map','thread-comment-data-source.config','type','replyId','_commentService','_threadCommentDataSourceService','parse','Delete','/universer-api/user/list','addComment','UNIVER_UNKNOWN','_config','/add','_threadCommentModel','UNRECOGNIZED','41242tkpxDV','/solved'];_0x331c=function(){return _0x2345a0;};return _0x331c();}let g=class extends _0x70aa62{constructor(_0x1e6a5d,_0x468038){const _0x48e122=_0x5f512f;super(),this[_0x48e122(0x204)]=_0x1e6a5d,this[_0x48e122(0x1fb)]=_0x468038,this['_initDataSource']();}[_0x5f512f(0x223)](){const _0xf33ab7=_0x5f512f;this['_threadCommentDataSourceService'][_0xf33ab7(0x245)]=this[_0xf33ab7(0x1fb)],this[_0xf33ab7(0x204)][_0xf33ab7(0x22c)]=!0x1;}};g=te([N(0x0,_0x4289de),N(0x1,_0x4134b7(f))],g);var se=Object[_0x5f512f(0x1e5)],oe=Object[_0x5f512f(0x235)],ne=(_0x6381b4,_0x5d062a,_0xe2daff)=>_0x5d062a in _0x6381b4?se(_0x6381b4,_0x5d062a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe2daff}):_0x6381b4[_0x5d062a]=_0xe2daff,ie=(_0x23453e,_0x57a033,_0x57748d,_0x154baa)=>{const _0x5163b9=_0x5f512f;for(var _0x580690=_0x154baa>0x1?void 0x0:_0x154baa?oe(_0x57a033,_0x57748d):_0x57a033,_0x5e0b3b=_0x23453e[_0x5163b9(0x21c)]-0x1,_0x1a5ddb;_0x5e0b3b>=0x0;_0x5e0b3b--)(_0x1a5ddb=_0x23453e[_0x5e0b3b])&&(_0x580690=_0x1a5ddb(_0x580690)||_0x580690);return _0x580690;},w=(_0x5957b5,_0x43e028)=>(_0x1f6ffa,_0x36a940)=>_0x43e028(_0x1f6ffa,_0x36a940,_0x5957b5),$=(_0x55c00c,_0x3c1a14,_0x316a6a)=>ne(_0x55c00c,typeof _0x3c1a14!=_0x5f512f(0x1f0)?_0x3c1a14+'':_0x3c1a14,_0x316a6a);let b=class extends _0x2729e6{constructor(_0x30f7d7=M,_0x1c1056,_0x176320){const _0x4151c6=_0x5f512f;super(),this[_0x4151c6(0x20a)]=_0x30f7d7,this['_injector']=_0x1c1056,this[_0x4151c6(0x1e9)]=_0x176320;const {..._0x21faec}=_0x5cb88c({},M,this[_0x4151c6(0x20a)]);this[_0x4151c6(0x1e9)][_0x4151c6(0x231)](z,_0x21faec);}[_0x5f512f(0x22f)](){[[f],[g],[S]]['forEach'](_0x26d077=>{this['_injector']['add'](_0x26d077);});}['onReady'](){const _0x4670f8=_0x5f512f;this[_0x4670f8(0x237)][_0x4670f8(0x234)](g),this[_0x4670f8(0x237)][_0x4670f8(0x234)](S);}};$(b,'pluginName',W),$(b,_0x5f512f(0x201),_0x481279[_0x5f512f(0x209)]),b=ie([_0x12da24(_0xc44fe2,_0x56fb88,_0x178fe6),w(0x1,_0x4134b7(_0x49d01d)),w(0x2,_0x340ede)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x555a(_0x236c41,_0x12adb6){const _0x2f8cb4=_0x2f8c();return _0x555a=function(_0x555a6c,_0x473654){_0x555a6c=_0x555a6c-0x1d1;let _0x231e7b=_0x2f8cb4[_0x555a6c];return _0x231e7b;},_0x555a(_0x236c41,_0x12adb6);}(function(_0x2d2c7e,_0x36e857){const _0x4da183=_0x555a,_0x1ab652=_0x2d2c7e();while(!![]){try{const _0x59603f=-parseInt(_0x4da183(0x1ec))/0x1*(parseInt(_0x4da183(0x20f))/0x2)+parseInt(_0x4da183(0x22e))/0x3*(-parseInt(_0x4da183(0x237))/0x4)+-parseInt(_0x4da183(0x1ff))/0x5+parseInt(_0x4da183(0x215))/0x6*(-parseInt(_0x4da183(0x223))/0x7)+-parseInt(_0x4da183(0x20e))/0x8+-parseInt(_0x4da183(0x22b))/0x9+parseInt(_0x4da183(0x1f2))/0xa;if(_0x59603f===_0x36e857)break;else _0x1ab652['push'](_0x1ab652['shift']());}catch(_0x1b904a){_0x1ab652['push'](_0x1ab652['shift']());}}}(_0x2f8c,0xc4022),function(_0x5b2ce3,_0x37ae6c){const _0x41a14d=_0x555a;typeof exports=='object'&&typeof module<'u'?_0x37ae6c(exports,require('@univerjs-pro/collaboration-client'),require(_0x41a14d(0x22d)),require('@univerjs/core'),require(_0x41a14d(0x1e1)),require(_0x41a14d(0x1f9)),require(_0x41a14d(0x211)),require(_0x41a14d(0x1ef))):typeof define==_0x41a14d(0x253)&&define[_0x41a14d(0x229)]?define([_0x41a14d(0x24b),_0x41a14d(0x256),_0x41a14d(0x22d),'@univerjs/core','@univerjs/thread-comment-ui',_0x41a14d(0x1f9),_0x41a14d(0x211),_0x41a14d(0x1ef)],_0x37ae6c):(_0x5b2ce3=typeof globalThis<'u'?globalThis:_0x5b2ce3||self,_0x37ae6c(_0x5b2ce3['UniverProThreadCommentDatasource']={},_0x5b2ce3[_0x41a14d(0x1e8)],_0x5b2ce3[_0x41a14d(0x202)],_0x5b2ce3[_0x41a14d(0x217)],_0x5b2ce3['UniverThreadCommentUi'],_0x5b2ce3['UniverThreadComment'],_0x5b2ce3[_0x41a14d(0x211)],_0x5b2ce3[_0x41a14d(0x254)]));}(this,function(_0x3a6cfc,_0x1ce484,_0x33deaf,_0x4332b8,_0x3a429e,_0xe1c387,_0x1ee6ef,_0x226f1a){'use strict';const _0x2e5523=_0x555a;const _0x499ff3=_0x2e5523(0x20c);var _0x5380fc=(_0x10299b=>(_0x10299b[_0x10299b[_0x2e5523(0x21b)]=0x0]='OpenOrReOpen',_0x10299b[_0x10299b[_0x2e5523(0x24d)]=0x1]=_0x2e5523(0x24d),_0x10299b[_0x10299b['UNRECOGNIZED']=-0x1]=_0x2e5523(0x20b),_0x10299b))(_0x5380fc||{}),_0x435fff=(_0x41bde3=>(_0x41bde3[_0x41bde3[_0x2e5523(0x206)]=0x0]=_0x2e5523(0x206),_0x41bde3[_0x41bde3[_0x2e5523(0x24c)]=0x1]=_0x2e5523(0x24c),_0x41bde3[_0x41bde3[_0x2e5523(0x1d2)]=0x2]=_0x2e5523(0x1d2),_0x41bde3[_0x41bde3[_0x2e5523(0x24f)]=0x3]=_0x2e5523(0x24f),_0x41bde3[_0x41bde3['Delete']=0x4]=_0x2e5523(0x21f),_0x41bde3[_0x41bde3[_0x2e5523(0x219)]=0x5]=_0x2e5523(0x219),_0x41bde3[_0x41bde3[_0x2e5523(0x20b)]=-0x1]='UNRECOGNIZED',_0x41bde3))(_0x435fff||{});const _0x3d91c9=_0x3160d5=>_0x4332b8[_0x2e5523(0x1d7)](new Date(+_0x3160d5))[_0x2e5523(0x225)](_0x2e5523(0x1e3)),_0x220f02=async(_0x4f3398,_0x24ff89)=>{const _0x5674f4=_0x2e5523,_0x40348d=_0x4f3398['get'](_0x4332b8[_0x5674f4(0x255)]),_0x17a4b8=_0x4f3398[_0x5674f4(0x1f0)](_0x226f1a[_0x5674f4(0x207)]);_0x24ff89[_0x5674f4(0x1e2)](_0x2222e9=>{const _0x1c5717=_0x5674f4;_0x40348d[_0x1c5717(0x234)](_0x2222e9)&&_0x24ff89[_0x1c5717(0x1fd)](_0x2222e9);}),_0x24ff89[_0x5674f4(0x251)]&&(await _0x17a4b8[_0x5674f4(0x1f0)]('/universer-api/user/list',{'params':{'userIDs':[..._0x24ff89]}}))[_0x5674f4(0x25b)][_0x5674f4(0x1db)][_0x5674f4(0x1e2)](_0x1200ec=>{const _0x432323=_0x5674f4;_0x1200ec&&_0x40348d[_0x432323(0x1fe)](_0x1200ec);});};var _0x22aae9=Object[_0x2e5523(0x1e5)],_0x5e6829=(_0x10f160,_0x3a249a,_0x3e12f4,_0x338111)=>{const _0xa8a278=_0x2e5523;for(var _0x39104f=_0x338111>0x1?void 0x0:_0x338111?_0x22aae9(_0x3a249a,_0x3e12f4):_0x3a249a,_0x467202=_0x10f160[_0xa8a278(0x238)]-0x1,_0x4f7b33;_0x467202>=0x0;_0x467202--)(_0x4f7b33=_0x10f160[_0x467202])&&(_0x39104f=_0x4f7b33(_0x39104f)||_0x39104f);return _0x39104f;},_0x5e804c=(_0x20680a,_0x99370c)=>(_0x4983f7,_0x3018a0)=>_0x99370c(_0x4983f7,_0x3018a0,_0x20680a);let _0x2f0683=class extends _0x4332b8[_0x2e5523(0x201)]{constructor(_0x470d61,_0x3ba4b3,_0x55bca6,_0x5e61d7){const _0x22403a=_0x2e5523;super(),this['_commentService']=_0x470d61,this[_0x22403a(0x228)]=_0x3ba4b3,this[_0x22403a(0x236)]=_0x55bca6,this[_0x22403a(0x1e6)]=_0x5e61d7,this[_0x22403a(0x1dd)](),this['_initUserSync']();}[_0x2e5523(0x1e7)](){const _0x7a7ed=_0x2e5523;this[_0x7a7ed(0x1fc)](this[_0x7a7ed(0x228)][_0x7a7ed(0x1ee)][_0x7a7ed(0x252)](_0x1ee6ef[_0x7a7ed(0x1ed)](0x10))[_0x7a7ed(0x22c)](_0x3e0aa1=>{const _0x55045e=_0x7a7ed,_0x53ec8b=new Set();_0x3e0aa1[_0x55045e(0x1e2)](_0x1dbf7d=>{const _0xdbf195=_0x55045e;switch(_0x1dbf7d[_0xdbf195(0x259)]){case'add':{const _0x3b17e4=_0x1dbf7d['payload'][_0xdbf195(0x226)];_0x53ec8b[_0xdbf195(0x203)](_0x3b17e4);break;}}}),_0x220f02(this[_0x55045e(0x1e6)],_0x53ec8b);}));}[_0x2e5523(0x1dd)](){const _0x4e3b1a=_0x2e5523;this[_0x4e3b1a(0x1fc)](this['_commentService'][_0x4e3b1a(0x1ee)][_0x4e3b1a(0x22c)](async _0x293d84=>{const _0x18a3b2=_0x4e3b1a;var _0x190c72,_0x3f02d2,_0x38d541,_0x543c87;const _0x3d3d71=(_0x190c72=this['_threadCommentModel'][_0x18a3b2(0x213)](_0x293d84['unitId'])[_0x18a3b2(0x247)](_0x29268b=>_0x29268b[_0x18a3b2(0x1f1)]===_0x293d84[_0x18a3b2(0x1f1)]))==null?void 0x0:_0x190c72['root'];if(!_0x3d3d71)return;const {unitId:_0x2afd9f,subUnitId:_0x19d50f}=_0x3d3d71;switch(_0x293d84[_0x18a3b2(0x1f8)]&&this[_0x18a3b2(0x236)][_0x18a3b2(0x1fe)](_0x293d84[_0x18a3b2(0x1f8)]),_0x293d84[_0x18a3b2(0x259)]){case _0x435fff[_0x18a3b2(0x24c)]:break;case _0x435fff[_0x18a3b2(0x1d2)]:{this[_0x18a3b2(0x228)][_0x18a3b2(0x20a)](_0x2afd9f,_0x19d50f,{'unitId':_0x2afd9f,'subUnitId':_0x19d50f,'ref':'','id':_0x293d84['replyId'],'dT':_0x3d91c9(+_0x293d84['createTimestamp']),'threadId':_0x293d84['threadId'],'personId':(_0x38d541=(_0x3f02d2=_0x293d84['user'])==null?void 0x0:_0x3f02d2['userID'])!=null?_0x38d541:_0x293d84['userId'],'text':JSON[_0x18a3b2(0x1d6)](_0x293d84[_0x18a3b2(0x204)]),'parentId':_0x3d3d71['id']});break;}case _0x435fff[_0x18a3b2(0x21f)]:{const _0x4a6ff5=this[_0x18a3b2(0x228)]['getComment'](_0x2afd9f,_0x19d50f,_0x293d84[_0x18a3b2(0x245)]);_0x4a6ff5&&_0x4a6ff5['parentId']&&this['_threadCommentModel'][_0x18a3b2(0x205)](_0x2afd9f,_0x19d50f,_0x293d84['replyId']);break;}case _0x435fff[_0x18a3b2(0x24f)]:{this['_threadCommentModel'][_0x18a3b2(0x235)](_0x2afd9f,_0x19d50f,{'commentId':_0x293d84[_0x18a3b2(0x245)],'text':JSON[_0x18a3b2(0x1d6)](_0x293d84[_0x18a3b2(0x204)])});break;}case _0x435fff[_0x18a3b2(0x219)]:{const _0x3fb25b=(_0x543c87=this[_0x18a3b2(0x228)][_0x18a3b2(0x213)](_0x293d84[_0x18a3b2(0x22f)])[_0x18a3b2(0x247)](_0x62c5c5=>_0x62c5c5[_0x18a3b2(0x1f1)]===_0x293d84['threadId']))==null?void 0x0:_0x543c87['root'];_0x3fb25b&&this[_0x18a3b2(0x228)][_0x18a3b2(0x24e)](_0x2afd9f,_0x19d50f,_0x3fb25b['id'],_0x293d84[_0x18a3b2(0x249)]===_0x5380fc[_0x18a3b2(0x24d)]);break;}}}));}};_0x2f0683=_0x5e6829([_0x5e804c(0x0,_0x4332b8[_0x2e5523(0x1de)](_0x1ce484[_0x2e5523(0x1d4)])),_0x5e804c(0x1,_0x4332b8[_0x2e5523(0x1de)](_0xe1c387['ThreadCommentModel'])),_0x5e804c(0x2,_0x4332b8[_0x2e5523(0x1de)](_0x4332b8[_0x2e5523(0x255)])),_0x5e804c(0x3,_0x4332b8[_0x2e5523(0x1de)](_0x4332b8[_0x2e5523(0x21d)]))],_0x2f0683);const _0x2545e5=_0x2e5523(0x1d5),_0x5d602c={};var _0x1fdee5=Object['getOwnPropertyDescriptor'],_0x33a533=(_0x1643db,_0x2b0339,_0x127b81,_0x2f1b19)=>{for(var _0x3a81ee=_0x2f1b19>0x1?void 0x0:_0x2f1b19?_0x1fdee5(_0x2b0339,_0x127b81):_0x2b0339,_0x4d4660=_0x1643db['length']-0x1,_0x2dcc01;_0x4d4660>=0x0;_0x4d4660--)(_0x2dcc01=_0x1643db[_0x4d4660])&&(_0x3a81ee=_0x2dcc01(_0x3a81ee)||_0x3a81ee);return _0x3a81ee;},_0x2193c1=(_0x3c0f55,_0x2535ce)=>(_0x56389e,_0x185228)=>_0x2535ce(_0x56389e,_0x185228,_0x3c0f55);function _0x48e7b8(_0x49cc1e,_0x2afa1d){const _0x1b5ee6=_0x2e5523,_0xf837ef=_0x49cc1e[_0x1b5ee6(0x1fb)][0x0];return{..._0x2afa1d,'id':_0xf837ef[_0x1b5ee6(0x245)],'resolved':_0x49cc1e[_0x1b5ee6(0x249)]===0x1,'dT':_0x3d91c9(_0xf837ef['createTimestamp']),'personId':_0xf837ef[_0x1b5ee6(0x241)],'threadId':_0xf837ef['threadId']};}function _0x3670d7(_0x4d15bf,_0x5210d5,_0x352630){const _0x9fa71d=_0x2e5523;var _0x266d88,_0x1efdff;if(((_0x1efdff=(_0x266d88=_0x4d15bf==null?void 0x0:_0x4d15bf[_0x9fa71d(0x1fb)])==null?void 0x0:_0x266d88[_0x9fa71d(0x238)])!=null?_0x1efdff:0x0)>0x0){const _0x2808e2=(_0x2b3be8,_0x12910a)=>({'id':_0x2b3be8[_0x9fa71d(0x245)],'threadId':_0x2b3be8[_0x9fa71d(0x1f1)],'dT':_0x3d91c9(_0x2b3be8[_0x9fa71d(0x1d1)]),'personId':_0x2b3be8[_0x9fa71d(0x241)],'resolved':_0x4d15bf[_0x9fa71d(0x249)]===_0x5380fc['Solved'],'unitId':_0x5210d5,'subUnitId':_0x352630,'text':JSON['parse'](_0x2b3be8['content']),'parentId':_0x12910a}),_0x3599da=_0x2808e2(_0x4d15bf['replies'][0x0]);return{..._0x3599da,'children':_0x4d15bf[_0x9fa71d(0x1fb)][_0x9fa71d(0x21c)](0x1)[_0x9fa71d(0x25c)](_0x3286af=>_0x2808e2(_0x3286af,_0x3599da['id']))};}return null;}let _0x443274=class{constructor(_0x2f385f,_0x1544bd,_0x113b14,_0xd1babc){const _0x363ec6=_0x2e5523;this['_httpService']=_0x2f385f,this[_0x363ec6(0x236)]=_0x1544bd,this[_0x363ec6(0x250)]=_0x113b14,this[_0x363ec6(0x1e6)]=_0xd1babc;}async[_0x2e5523(0x20a)](_0x45e4d7){const _0x1c1dec=_0x2e5523;var _0x504f46,_0x1902f1;const {parentId:_0x184ae9,unitId:_0x4df60b,text:_0x47ad08,threadId:_0x3fb808}=_0x45e4d7,_0x55947d=(_0x1902f1=(_0x504f46=_0x47ad08[_0x1c1dec(0x23d)])==null?void 0x0:_0x504f46[_0x1c1dec(0x1e4)](_0x3bf1fe=>_0x3bf1fe[_0x1c1dec(0x243)]===_0x4332b8[_0x1c1dec(0x1fa)]['COMMENT'])['map'](_0x1acfe1=>_0x1acfe1[_0x1c1dec(0x216)]))!=null?_0x1902f1:[],_0x59739b=JSON[_0x1c1dec(0x218)](_0x47ad08),_0x3d2284=(await this[_0x1c1dec(0x250)][_0x1c1dec(0x1e9)](_0x4df60b))['getMemberID']();if(_0x184ae9){const _0x60c5cf={'memberId':_0x3d2284,'unitId':_0x4df60b,'content':_0x59739b,'mention':_0x55947d,'threadId':_0x3fb808},_0x8c1caa=(await this['_httpService'][_0x1c1dec(0x212)](_0x1c1dec(0x22a)+_0x4df60b+_0x1c1dec(0x23c),{'body':_0x60c5cf}))[_0x1c1dec(0x25b)][_0x1c1dec(0x23e)];return{..._0x45e4d7,'id':_0x8c1caa[_0x1c1dec(0x245)],'dT':_0x4332b8[_0x1c1dec(0x1d7)](+_0x8c1caa['createTimestamp'])['format'](_0x1c1dec(0x1e3)),'personId':_0x8c1caa[_0x1c1dec(0x241)]};}else{const _0x381ed1={'memberId':_0x3d2284,'unitId':_0x4df60b,'content':_0x59739b,'mention':_0x55947d},_0x3e1307=await this[_0x1c1dec(0x258)][_0x1c1dec(0x212)](_0x1c1dec(0x22a)+_0x4df60b+_0x1c1dec(0x246),{'body':_0x381ed1});return _0x48e7b8(_0x3e1307[_0x1c1dec(0x25b)][_0x1c1dec(0x230)],_0x45e4d7);}}async[_0x2e5523(0x235)](_0x459dca){const _0x11efa5=_0x2e5523;var _0x5a18bf,_0x5961c4;const {text:_0x4be02b,unitId:_0x19437d}=_0x459dca,_0x4c6b68=(_0x5961c4=(_0x5a18bf=_0x4be02b[_0x11efa5(0x23d)])==null?void 0x0:_0x5a18bf[_0x11efa5(0x1e4)](_0x540fce=>_0x540fce['rangeType']===_0x4332b8['CustomRangeType'][_0x11efa5(0x224)])[_0x11efa5(0x25c)](_0x4281b4=>_0x4281b4[_0x11efa5(0x216)]))!=null?_0x5961c4:[],_0x9e5c3a=JSON[_0x11efa5(0x218)](_0x4be02b),_0x1233b8=_0x459dca['threadId'],_0x1cdae9=_0x459dca['id'],_0xde1cd={'memberId':(await this[_0x11efa5(0x250)][_0x11efa5(0x1e9)](_0x19437d))['getMemberID'](),'unitId':_0x19437d,'threadId':_0x1233b8,'mention':_0x4c6b68,'content':_0x9e5c3a,'replyId':_0x1cdae9},_0x30a2b7=await this[_0x11efa5(0x258)]['post']('/universer-api/comment/unit/'+_0x19437d+_0x11efa5(0x1f3),{'body':_0xde1cd});return!_0x30a2b7[_0x11efa5(0x25b)][_0x11efa5(0x239)]||_0x30a2b7[_0x11efa5(0x25b)][_0x11efa5(0x239)][_0x11efa5(0x1d3)]===0x1;}async['resolveComment'](_0x1117aa){const _0x16cf27=_0x2e5523,{unitId:_0x28b102}=_0x1117aa,_0x1d7109=_0x1117aa[_0x16cf27(0x1f1)],_0x85d7c3={'memberId':this[_0x16cf27(0x236)]['getCurrentUser']()[_0x16cf27(0x1f5)],'unitId':_0x28b102,'threadId':_0x1d7109,'solved':_0x1117aa[_0x16cf27(0x20d)]?_0x5380fc['Solved']:_0x5380fc[_0x16cf27(0x21b)]},_0x2ff781=await this[_0x16cf27(0x258)][_0x16cf27(0x212)](_0x16cf27(0x22a)+_0x28b102+_0x16cf27(0x242),{'body':_0x85d7c3});return!_0x2ff781[_0x16cf27(0x25b)][_0x16cf27(0x239)]||_0x2ff781['body'][_0x16cf27(0x239)][_0x16cf27(0x1d3)]===0x1;}async[_0x2e5523(0x205)](_0x51535b,_0x19a57f,_0x3df49b,_0x420a2d){const _0x1460b1=_0x2e5523,_0x2a06fb={'memberId':(await this[_0x1460b1(0x250)]['requireSession'](_0x51535b))[_0x1460b1(0x1e0)](),'threadId':_0x3df49b,'replyId':_0x420a2d,'unitId':_0x51535b},_0x3bda9c=await this[_0x1460b1(0x258)][_0x1460b1(0x212)](_0x1460b1(0x22a)+_0x51535b+_0x1460b1(0x248),{'body':_0x2a06fb});return!_0x3bda9c['body']['error']||_0x3bda9c[_0x1460b1(0x25b)][_0x1460b1(0x239)][_0x1460b1(0x1d3)]===0x1;}async[_0x2e5523(0x23a)](_0x3a38eb,_0x434cb5,_0x3e0132){const _0x3bb418=_0x2e5523,_0x4d7d0e={'unitId':_0x3a38eb,'threadId':_0x3e0132},_0x5176be=await this[_0x3bb418(0x258)][_0x3bb418(0x212)](_0x3bb418(0x22a)+_0x3a38eb+_0x3bb418(0x232),{'body':_0x4d7d0e}),_0x269953=_0x3e0132[_0x3bb418(0x25c)](_0x5144d1=>_0x3670d7(_0x5176be[_0x3bb418(0x25b)][_0x3bb418(0x244)][_0x5144d1],_0x3a38eb,_0x434cb5))[_0x3bb418(0x1e4)](Boolean);return Object[_0x3bb418(0x214)](_0x5176be['body'][_0x3bb418(0x1db)])[_0x3bb418(0x1e2)](_0x5632b0=>{const _0x107b59=_0x3bb418;this[_0x107b59(0x236)][_0x107b59(0x1fe)](_0x5632b0);}),_0x269953;}[_0x2e5523(0x1eb)](_0x2499db){const _0x2e446c=_0x2e5523;return{'id':_0x2499db['id'],'threadId':_0x2499db[_0x2e446c(0x1f1)],'ref':_0x2499db[_0x2e446c(0x1d8)]};}};_0x443274=_0x33a533([_0x2193c1(0x0,_0x4332b8[_0x2e5523(0x1de)](_0x226f1a[_0x2e5523(0x207)])),_0x2193c1(0x1,_0x4332b8[_0x2e5523(0x1de)](_0x4332b8['UserManagerService'])),_0x2193c1(0x2,_0x4332b8[_0x2e5523(0x1de)](_0x1ce484[_0x2e5523(0x210)])),_0x2193c1(0x3,_0x4332b8[_0x2e5523(0x1de)](_0x4332b8[_0x2e5523(0x21d)]))],_0x443274);var _0x4aa720=Object[_0x2e5523(0x1e5)],_0x582c88=(_0x1033cd,_0x1fed1d,_0x28c1d7,_0x263b65)=>{const _0x4c618c=_0x2e5523;for(var _0x1f9b08=_0x263b65>0x1?void 0x0:_0x263b65?_0x4aa720(_0x1fed1d,_0x28c1d7):_0x1fed1d,_0x55577d=_0x1033cd[_0x4c618c(0x238)]-0x1,_0x4b9999;_0x55577d>=0x0;_0x55577d--)(_0x4b9999=_0x1033cd[_0x55577d])&&(_0x1f9b08=_0x4b9999(_0x1f9b08)||_0x1f9b08);return _0x1f9b08;},_0x2af97d=(_0x3e69d0,_0xd992e)=>(_0x3f1863,_0x370fba)=>_0xd992e(_0x3f1863,_0x370fba,_0x3e69d0);let _0x5ddf11=class extends _0x4332b8[_0x2e5523(0x201)]{constructor(_0x4fead4,_0x3ef163){const _0x51556f=_0x2e5523;super(),this['_threadCommentDataSourceService']=_0x4fead4,this[_0x51556f(0x221)]=_0x3ef163,this[_0x51556f(0x209)]();}[_0x2e5523(0x209)](){const _0x25c4fe=_0x2e5523;this[_0x25c4fe(0x21e)]['dataSource']=this[_0x25c4fe(0x221)],this[_0x25c4fe(0x21e)][_0x25c4fe(0x1f6)]=!0x1;}};_0x5ddf11=_0x582c88([_0x2af97d(0x0,_0xe1c387[_0x2e5523(0x1f4)]),_0x2af97d(0x1,_0x4332b8['Inject'](_0x443274))],_0x5ddf11);var _0x4b310d=Object[_0x2e5523(0x231)],_0x22014a=Object[_0x2e5523(0x1e5)],_0xde7e94=(_0x588c7d,_0x256bd8,_0x1be3e9)=>_0x256bd8 in _0x588c7d?_0x4b310d(_0x588c7d,_0x256bd8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1be3e9}):_0x588c7d[_0x256bd8]=_0x1be3e9,_0x5247a9=(_0x23a542,_0x18468b,_0x202410,_0x11451f)=>{for(var _0x1edb97=_0x11451f>0x1?void 0x0:_0x11451f?_0x22014a(_0x18468b,_0x202410):_0x18468b,_0x40d16c=_0x23a542['length']-0x1,_0xc389b4;_0x40d16c>=0x0;_0x40d16c--)(_0xc389b4=_0x23a542[_0x40d16c])&&(_0x1edb97=_0xc389b4(_0x1edb97)||_0x1edb97);return _0x1edb97;},_0x5af191=(_0x23f431,_0x2e6f1b)=>(_0x4122db,_0xb3cad9)=>_0x2e6f1b(_0x4122db,_0xb3cad9,_0x23f431),_0x26a5af=(_0x38f95c,_0x114aad,_0x3bb971)=>_0xde7e94(_0x38f95c,typeof _0x114aad!=_0x2e5523(0x1d9)?_0x114aad+'':_0x114aad,_0x3bb971);_0x3a6cfc[_0x2e5523(0x25a)]=class extends _0x4332b8[_0x2e5523(0x21a)]{constructor(_0x436e89=_0x5d602c,_0x4a448d,_0x2578c6){const _0x4cf01c=_0x2e5523;super(),this[_0x4cf01c(0x23f)]=_0x436e89,this['_injector']=_0x4a448d,this[_0x4cf01c(0x1df)]=_0x2578c6;const {..._0x53bf39}=_0x4332b8[_0x4cf01c(0x233)]({},_0x5d602c,this[_0x4cf01c(0x23f)]);this[_0x4cf01c(0x1df)][_0x4cf01c(0x24a)](_0x2545e5,_0x53bf39);}[_0x2e5523(0x1f7)](){[[_0x443274],[_0x5ddf11],[_0x2f0683]]['forEach'](_0x1e80fe=>{const _0xa0df8e=_0x555a;this['_injector'][_0xa0df8e(0x203)](_0x1e80fe);});}[_0x2e5523(0x227)](){const _0x2d75c8=_0x2e5523;this[_0x2d75c8(0x1e6)][_0x2d75c8(0x1f0)](_0x5ddf11),this[_0x2d75c8(0x1e6)][_0x2d75c8(0x1f0)](_0x2f0683);}},_0x26a5af(_0x3a6cfc[_0x2e5523(0x25a)],_0x2e5523(0x1da),_0x499ff3),_0x26a5af(_0x3a6cfc['UniverThreadCommentDataSourcePlugin'],'type',_0x4332b8[_0x2e5523(0x208)][_0x2e5523(0x257)]),_0x3a6cfc[_0x2e5523(0x25a)]=_0x5247a9([_0x4332b8[_0x2e5523(0x222)](_0x3a429e[_0x2e5523(0x220)],_0x1ce484[_0x2e5523(0x1dc)],_0x33deaf[_0x2e5523(0x240)]),_0x5af191(0x1,_0x4332b8[_0x2e5523(0x1de)](_0x4332b8[_0x2e5523(0x21d)])),_0x5af191(0x2,_0x4332b8[_0x2e5523(0x1ea)])],_0x3a6cfc[_0x2e5523(0x25a)]),Object['defineProperty'](_0x3a6cfc,Symbol[_0x2e5523(0x23b)],{'value':_0x2e5523(0x200)});}));function _0x2f8c(){const _0x3abedd=['getUnit','values','6366tAiJLG','rangeId','UniverCore','stringify','Solve','Plugin','OpenOrReOpen','slice','Injector','_threadCommentDataSourceService','Delete','UniverThreadCommentUIPlugin','_threadCommentDataSource','DependentOn','133nGicem','COMMENT','format','personId','onReady','_threadCommentModel','amd','/universer-api/comment/unit/','14216463SIcsZM','subscribe','@univerjs-pro/license','66057FkiolB','unitId','comment','defineProperty','/list','merge','getUser','updateComment','_userService','200veIlvc','length','error','listComments','toStringTag','/reply','customRanges','reply','_config','UniverLicensePlugin','userId','/solved','rangeType','comments','replyId','/add','find','/delete','solved','setConfig','exports','Add','Solved','resolveComment','Edit','_sessionService','size','pipe','function','UniverNetwork','UserManagerService','@univerjs-pro/collaboration-client','UNIVER_UNKNOWN','_httpService','type','UniverThreadCommentDataSourcePlugin','body','map','createTimestamp','Reply','code','CommentService','thread-comment-data-source.config','parse','dayjs','ref','symbol','pluginName','users','UniverCollaborationClientPlugin','_init','Inject','_configService','getMemberID','@univerjs/thread-comment-ui','forEach','YYYY/MM/DD\x20HH:mm','filter','getOwnPropertyDescriptor','_injector','_initUserSync','UniverProCollaborationClient','requireSession','IConfigService','saveCommentToSnapshot','1447205OxQjCu','bufferTime','commentUpdate$','@univerjs/network','get','threadId','53619160JuDaTI','/edit','IThreadCommentDataSourceService','userID','syncUpdateMutationToColla','onStarting','user','@univerjs/thread-comment','CustomRangeType','replies','disposeWithMe','delete','addUser','1260905OFsfTI','Module','Disposable','UniverProLicense','add','content','deleteComment','Unknown','HTTPService','UniverInstanceType','_initDataSource','addComment','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','1271712CKSwVF','2JYcbbQ','CollaborationSessionService','rxjs','post'];_0x2f8c=function(){return _0x3abedd;};return _0x2f8c();}
|
|
1
|
+
(function(_0x536c7e,_0x38c772){const _0x157513=_0x4f8c,_0x40eea9=_0x536c7e();while(!![]){try{const _0x5576ab=parseInt(_0x157513(0x109))/0x1*(-parseInt(_0x157513(0x143))/0x2)+parseInt(_0x157513(0x11c))/0x3+parseInt(_0x157513(0x15d))/0x4*(parseInt(_0x157513(0xf0))/0x5)+-parseInt(_0x157513(0xe9))/0x6*(-parseInt(_0x157513(0x105))/0x7)+-parseInt(_0x157513(0x149))/0x8*(-parseInt(_0x157513(0x12e))/0x9)+-parseInt(_0x157513(0x138))/0xa*(-parseInt(_0x157513(0xf9))/0xb)+-parseInt(_0x157513(0xe0))/0xc;if(_0x5576ab===_0x38c772)break;else _0x40eea9['push'](_0x40eea9['shift']());}catch(_0x50cac7){_0x40eea9['push'](_0x40eea9['shift']());}}}(_0x1451,0x9e6fd),function(_0x22393a,_0x1dc2dc){const _0x1ad7e8=_0x4f8c;typeof exports=='object'&&typeof module<'u'?_0x1dc2dc(exports,require(_0x1ad7e8(0x13b)),require(_0x1ad7e8(0x12b)),require(_0x1ad7e8(0x150)),require('@univerjs/thread-comment-ui'),require(_0x1ad7e8(0x108)),require('rxjs'),require(_0x1ad7e8(0xfe))):typeof define==_0x1ad7e8(0xf2)&&define[_0x1ad7e8(0x128)]?define([_0x1ad7e8(0x158),_0x1ad7e8(0x13b),_0x1ad7e8(0x12b),'@univerjs/core',_0x1ad7e8(0x130),'@univerjs/thread-comment','rxjs',_0x1ad7e8(0xfe)],_0x1dc2dc):(_0x22393a=typeof globalThis<'u'?globalThis:_0x22393a||self,_0x1dc2dc(_0x22393a[_0x1ad7e8(0x114)]={},_0x22393a['UniverProCollaborationClient'],_0x22393a['UniverProLicense'],_0x22393a[_0x1ad7e8(0x14b)],_0x22393a['UniverThreadCommentUi'],_0x22393a[_0x1ad7e8(0xdd)],_0x22393a[_0x1ad7e8(0xd8)],_0x22393a[_0x1ad7e8(0x157)]));}(this,function(_0x44299d,_0x3eeda6,_0x1920d3,_0x4be09a,_0x4d0909,_0x1d9654,_0x6ad529,_0x29551a){'use strict';const _0x18460f=_0x4f8c;const _0x208a5e=_0x18460f(0xfa);var _0xa324b1=(_0x59e1ff=>(_0x59e1ff[_0x59e1ff[_0x18460f(0x135)]=0x0]=_0x18460f(0x135),_0x59e1ff[_0x59e1ff['Solved']=0x1]=_0x18460f(0x121),_0x59e1ff[_0x59e1ff['UNRECOGNIZED']=-0x1]=_0x18460f(0xf8),_0x59e1ff))(_0xa324b1||{}),_0x589ef9=(_0x2d51b5=>(_0x2d51b5[_0x2d51b5['Unknown']=0x0]=_0x18460f(0x10c),_0x2d51b5[_0x2d51b5[_0x18460f(0x120)]=0x1]='Add',_0x2d51b5[_0x2d51b5[_0x18460f(0x107)]=0x2]='Reply',_0x2d51b5[_0x2d51b5[_0x18460f(0x113)]=0x3]=_0x18460f(0x113),_0x2d51b5[_0x2d51b5[_0x18460f(0xf7)]=0x4]='Delete',_0x2d51b5[_0x2d51b5[_0x18460f(0x144)]=0x5]=_0x18460f(0x144),_0x2d51b5[_0x2d51b5[_0x18460f(0xf8)]=-0x1]=_0x18460f(0xf8),_0x2d51b5))(_0x589ef9||{});const _0x11921c=_0xb8081=>_0x4be09a['dayjs'](new Date(+_0xb8081))[_0x18460f(0x103)]('YYYY/MM/DD\x20HH:mm'),_0x1da3c9=async(_0x7daad1,_0x18615f)=>{const _0x2f627e=_0x18460f,_0x43b51b=_0x7daad1[_0x2f627e(0x10d)](_0x4be09a['UserManagerService']),_0x529411=_0x7daad1[_0x2f627e(0x10d)](_0x29551a[_0x2f627e(0xe5)]);_0x18615f['forEach'](_0x26b8de=>{const _0x1b3b70=_0x2f627e;_0x43b51b[_0x1b3b70(0xdb)](_0x26b8de)&&_0x18615f[_0x1b3b70(0x119)](_0x26b8de);}),_0x18615f['size']&&(await _0x529411[_0x2f627e(0x10d)]('/universer-api/user/list',{'params':{'userIDs':[..._0x18615f]}}))[_0x2f627e(0xf6)][_0x2f627e(0x126)][_0x2f627e(0xda)](_0xf9690c=>{const _0x1862ef=_0x2f627e;_0xf9690c&&_0x43b51b[_0x1862ef(0x112)](_0xf9690c);});};var _0x39cd81=Object[_0x18460f(0x133)],_0x1a18b7=(_0x4c966e,_0x476043,_0x2d4202,_0x3b0138)=>{for(var _0x4e7225=_0x3b0138>0x1?void 0x0:_0x3b0138?_0x39cd81(_0x476043,_0x2d4202):_0x476043,_0x115a27=_0x4c966e['length']-0x1,_0x72eedb;_0x115a27>=0x0;_0x115a27--)(_0x72eedb=_0x4c966e[_0x115a27])&&(_0x4e7225=_0x72eedb(_0x4e7225)||_0x4e7225);return _0x4e7225;},_0xa15a01=(_0x463d3c,_0x57e254)=>(_0x49c65a,_0x3dbe92)=>_0x57e254(_0x49c65a,_0x3dbe92,_0x463d3c);let _0x23f937=class extends _0x4be09a[_0x18460f(0x11f)]{constructor(_0xce1fd,_0xf67090,_0x337cb3,_0x3d8f8a){const _0x3644f6=_0x18460f;super(),this['_commentService']=_0xce1fd,this[_0x3644f6(0x132)]=_0xf67090,this[_0x3644f6(0x155)]=_0x337cb3,this[_0x3644f6(0x123)]=_0x3d8f8a,this[_0x3644f6(0xe2)](),this[_0x3644f6(0x152)]();}[_0x18460f(0x152)](){const _0x51f5e4=_0x18460f;this[_0x51f5e4(0x106)](this[_0x51f5e4(0x132)]['commentUpdate$'][_0x51f5e4(0x154)](_0x6ad529['bufferTime'](0x10))[_0x51f5e4(0x15a)](_0x2818ca=>{const _0x22e1ee=_0x51f5e4,_0x57bb84=new Set();_0x2818ca['forEach'](_0x11d7f2=>{const _0x500a13=_0x4f8c;switch(_0x11d7f2[_0x500a13(0x110)]){case _0x500a13(0xfb):{const _0x55b229=_0x11d7f2['payload']['personId'];_0x57bb84[_0x500a13(0xfb)](_0x55b229);break;}}}),_0x1da3c9(this[_0x22e1ee(0x123)],_0x57bb84);}));}[_0x18460f(0xe2)](){const _0x5c757d=_0x18460f;this[_0x5c757d(0x106)](this['_commentService'][_0x5c757d(0x13d)][_0x5c757d(0x15a)](async _0x5a01f2=>{const _0x201c87=_0x5c757d;var _0x4cb26c,_0x59f82b,_0xc8bd9a,_0x10ff72;const _0x21fd94=(_0x4cb26c=this['_threadCommentModel'][_0x201c87(0x12d)](_0x5a01f2['unitId'])[_0x201c87(0x156)](_0x5c2313=>_0x5c2313[_0x201c87(0xf1)]===_0x5a01f2[_0x201c87(0xf1)]))==null?void 0x0:_0x4cb26c[_0x201c87(0x14c)];if(!_0x21fd94)return;const {unitId:_0x578ec7,subUnitId:_0x559c66}=_0x21fd94;switch(_0x5a01f2[_0x201c87(0xec)]&&this['_userService'][_0x201c87(0x112)](_0x5a01f2['user']),_0x5a01f2[_0x201c87(0x110)]){case _0x589ef9[_0x201c87(0x120)]:break;case _0x589ef9[_0x201c87(0x107)]:{this[_0x201c87(0x132)][_0x201c87(0xeb)](_0x578ec7,_0x559c66,{'unitId':_0x578ec7,'subUnitId':_0x559c66,'ref':'','id':_0x5a01f2[_0x201c87(0xed)],'dT':_0x11921c(+_0x5a01f2[_0x201c87(0x131)]),'threadId':_0x5a01f2[_0x201c87(0xf1)],'personId':(_0xc8bd9a=(_0x59f82b=_0x5a01f2['user'])==null?void 0x0:_0x59f82b['userID'])!=null?_0xc8bd9a:_0x5a01f2[_0x201c87(0xff)],'text':JSON['parse'](_0x5a01f2['content']),'parentId':_0x21fd94['id']});break;}case _0x589ef9[_0x201c87(0xf7)]:{const _0x100d3d=this[_0x201c87(0x132)][_0x201c87(0x13f)](_0x578ec7,_0x559c66,_0x5a01f2[_0x201c87(0xed)]);_0x100d3d&&_0x100d3d[_0x201c87(0x13a)]&&this[_0x201c87(0x132)][_0x201c87(0xee)](_0x578ec7,_0x559c66,_0x5a01f2[_0x201c87(0xed)]);break;}case _0x589ef9[_0x201c87(0x113)]:{this[_0x201c87(0x132)]['updateComment'](_0x578ec7,_0x559c66,{'commentId':_0x5a01f2[_0x201c87(0xed)],'text':JSON[_0x201c87(0x11e)](_0x5a01f2['content'])});break;}case _0x589ef9['Solve']:{const _0x261d5a=(_0x10ff72=this[_0x201c87(0x132)][_0x201c87(0x12d)](_0x5a01f2[_0x201c87(0x116)])[_0x201c87(0x156)](_0x347293=>_0x347293[_0x201c87(0xf1)]===_0x5a01f2[_0x201c87(0xf1)]))==null?void 0x0:_0x10ff72[_0x201c87(0x14c)];_0x261d5a&&this[_0x201c87(0x132)][_0x201c87(0x102)](_0x578ec7,_0x559c66,_0x261d5a['id'],_0x5a01f2[_0x201c87(0x11d)]===_0xa324b1['Solved']);break;}}}));}};_0x23f937=_0x1a18b7([_0xa15a01(0x0,_0x4be09a['Inject'](_0x3eeda6[_0x18460f(0x136)])),_0xa15a01(0x1,_0x4be09a[_0x18460f(0x139)](_0x1d9654[_0x18460f(0x159)])),_0xa15a01(0x2,_0x4be09a['Inject'](_0x4be09a[_0x18460f(0xf3)])),_0xa15a01(0x3,_0x4be09a['Inject'](_0x4be09a[_0x18460f(0x101)]))],_0x23f937);const _0x22dcd4=_0x18460f(0x10a),_0x4ac3b0={};var _0x405c56=Object[_0x18460f(0x133)],_0x16dd08=(_0x19226a,_0x387d47,_0x418488,_0x58f396)=>{const _0x549dda=_0x18460f;for(var _0x48c0bb=_0x58f396>0x1?void 0x0:_0x58f396?_0x405c56(_0x387d47,_0x418488):_0x387d47,_0x283ad0=_0x19226a[_0x549dda(0x153)]-0x1,_0x2e8d3f;_0x283ad0>=0x0;_0x283ad0--)(_0x2e8d3f=_0x19226a[_0x283ad0])&&(_0x48c0bb=_0x2e8d3f(_0x48c0bb)||_0x48c0bb);return _0x48c0bb;},_0x58de65=(_0x3184ee,_0x12dcbd)=>(_0x1f332b,_0x222287)=>_0x12dcbd(_0x1f332b,_0x222287,_0x3184ee);function _0x478c57(_0x18dd2b,_0xfcb319){const _0x3220bd=_0x18460f,_0x2f15d4=_0x18dd2b[_0x3220bd(0x137)][0x0];return{..._0xfcb319,'id':_0x2f15d4[_0x3220bd(0xed)],'resolved':_0x18dd2b[_0x3220bd(0x11d)]===0x1,'dT':_0x11921c(_0x2f15d4[_0x3220bd(0x131)]),'personId':_0x2f15d4[_0x3220bd(0xff)],'threadId':_0x2f15d4[_0x3220bd(0xf1)]};}function _0x5952a2(_0x1f56a9,_0x448707,_0x120b02){const _0x3c5ba0=_0x18460f;var _0x4460f1,_0x442baf;if(((_0x442baf=(_0x4460f1=_0x1f56a9==null?void 0x0:_0x1f56a9[_0x3c5ba0(0x137)])==null?void 0x0:_0x4460f1[_0x3c5ba0(0x153)])!=null?_0x442baf:0x0)>0x0){const _0x3f5169=(_0x55fe3f,_0x5a104d)=>({'id':_0x55fe3f[_0x3c5ba0(0xed)],'threadId':_0x55fe3f[_0x3c5ba0(0xf1)],'dT':_0x11921c(_0x55fe3f[_0x3c5ba0(0x131)]),'personId':_0x55fe3f[_0x3c5ba0(0xff)],'resolved':_0x1f56a9['solved']===_0xa324b1[_0x3c5ba0(0x121)],'unitId':_0x448707,'subUnitId':_0x120b02,'text':JSON[_0x3c5ba0(0x11e)](_0x55fe3f[_0x3c5ba0(0x12a)]),'parentId':_0x5a104d}),_0x7495a0=_0x3f5169(_0x1f56a9['replies'][0x0]);return{..._0x7495a0,'children':_0x1f56a9['replies'][_0x3c5ba0(0x11b)](0x1)['map'](_0x37f13c=>_0x3f5169(_0x37f13c,_0x7495a0['id']))};}return null;}let _0x75b208=class{constructor(_0x40765a,_0x230614,_0x1028e1,_0x2a4f20){const _0x42fa75=_0x18460f;this[_0x42fa75(0xf4)]=_0x40765a,this[_0x42fa75(0x155)]=_0x230614,this[_0x42fa75(0xdf)]=_0x1028e1,this[_0x42fa75(0x123)]=_0x2a4f20;}async[_0x18460f(0xeb)](_0xccb0a){const _0x1e9c14=_0x18460f;var _0x2c6771,_0xefc3f0;const {parentId:_0x5c0f98,unitId:_0x5da079,text:_0x5668a4,threadId:_0x2fc376}=_0xccb0a,_0x257bfb=(_0xefc3f0=(_0x2c6771=_0x5668a4[_0x1e9c14(0xf5)])==null?void 0x0:_0x2c6771['filter'](_0x5ae58a=>_0x5ae58a['rangeType']===_0x4be09a['CustomRangeType'][_0x1e9c14(0x115)])[_0x1e9c14(0x124)](_0x50aff1=>_0x50aff1[_0x1e9c14(0x118)]))!=null?_0xefc3f0:[],_0xc17b8a=JSON[_0x1e9c14(0x142)](_0x5668a4),_0x520ff5=(await this[_0x1e9c14(0xdf)][_0x1e9c14(0x145)](_0x5da079))[_0x1e9c14(0xea)]();if(_0x5c0f98){const _0x2ff8e2={'memberId':_0x520ff5,'unitId':_0x5da079,'content':_0xc17b8a,'mention':_0x257bfb,'threadId':_0x2fc376},_0x743dd=(await this['_httpService'][_0x1e9c14(0x14e)](_0x1e9c14(0x140)+_0x5da079+_0x1e9c14(0x125),{'body':_0x2ff8e2}))[_0x1e9c14(0xf6)][_0x1e9c14(0x14f)];return{..._0xccb0a,'id':_0x743dd[_0x1e9c14(0xed)],'dT':_0x4be09a[_0x1e9c14(0x117)](+_0x743dd['createTimestamp'])[_0x1e9c14(0x103)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x743dd[_0x1e9c14(0xff)]};}else{const _0x3a382a={'memberId':_0x520ff5,'unitId':_0x5da079,'content':_0xc17b8a,'mention':_0x257bfb},_0x2a4a4d=await this[_0x1e9c14(0xf4)][_0x1e9c14(0x14e)](_0x1e9c14(0x140)+_0x5da079+_0x1e9c14(0x12f),{'body':_0x3a382a});return _0x478c57(_0x2a4a4d[_0x1e9c14(0xf6)]['comment'],_0xccb0a);}}async[_0x18460f(0xe8)](_0x2edd7c){const _0x4ba507=_0x18460f;var _0x369108,_0x42499e;const {text:_0x3613bd,unitId:_0x4cb646}=_0x2edd7c,_0x3d7e07=(_0x42499e=(_0x369108=_0x3613bd['customRanges'])==null?void 0x0:_0x369108[_0x4ba507(0xef)](_0x3025ef=>_0x3025ef['rangeType']===_0x4be09a[_0x4ba507(0xe3)][_0x4ba507(0x115)])[_0x4ba507(0x124)](_0x2192a3=>_0x2192a3[_0x4ba507(0x118)]))!=null?_0x42499e:[],_0x350575=JSON[_0x4ba507(0x142)](_0x3613bd),_0x37830c=_0x2edd7c[_0x4ba507(0xf1)],_0x148d4f=_0x2edd7c['id'],_0x3c8024={'memberId':(await this['_sessionService'][_0x4ba507(0x145)](_0x4cb646))['getMemberID'](),'unitId':_0x4cb646,'threadId':_0x37830c,'mention':_0x3d7e07,'content':_0x350575,'replyId':_0x148d4f},_0x35943f=await this[_0x4ba507(0xf4)][_0x4ba507(0x14e)](_0x4ba507(0x140)+_0x4cb646+_0x4ba507(0x10b),{'body':_0x3c8024});return!_0x35943f['body']['error']||_0x35943f[_0x4ba507(0xf6)]['error'][_0x4ba507(0x14d)]===0x1;}async[_0x18460f(0x102)](_0x2613af){const _0x226aa2=_0x18460f,{unitId:_0xaa88ec}=_0x2613af,_0x46c5fe=_0x2613af['threadId'],_0x588251={'memberId':this['_userService'][_0x226aa2(0x13c)]()[_0x226aa2(0xe1)],'unitId':_0xaa88ec,'threadId':_0x46c5fe,'solved':_0x2613af[_0x226aa2(0xfc)]?_0xa324b1[_0x226aa2(0x121)]:_0xa324b1['OpenOrReOpen']},_0x3f80f4=await this['_httpService'][_0x226aa2(0x14e)](_0x226aa2(0x140)+_0xaa88ec+_0x226aa2(0x151),{'body':_0x588251});return!_0x3f80f4[_0x226aa2(0xf6)]['error']||_0x3f80f4[_0x226aa2(0xf6)][_0x226aa2(0x12c)]['code']===0x1;}async['deleteComment'](_0x1220ee,_0x14742e,_0x22812b,_0x20c597){const _0x3120db=_0x18460f,_0x28875b={'memberId':(await this[_0x3120db(0xdf)][_0x3120db(0x145)](_0x1220ee))[_0x3120db(0xea)](),'threadId':_0x22812b,'replyId':_0x20c597,'unitId':_0x1220ee},_0x504ce3=await this[_0x3120db(0xf4)][_0x3120db(0x14e)]('/universer-api/comment/unit/'+_0x1220ee+_0x3120db(0x111),{'body':_0x28875b});return!_0x504ce3[_0x3120db(0xf6)][_0x3120db(0x12c)]||_0x504ce3[_0x3120db(0xf6)]['error'][_0x3120db(0x14d)]===0x1;}async[_0x18460f(0x148)](_0x5b4a94,_0x27838c,_0x382b48){const _0x21cb2e=_0x18460f,_0x4377d3={'unitId':_0x5b4a94,'threadId':_0x382b48},_0x1140aa=await this['_httpService'][_0x21cb2e(0x14e)](_0x21cb2e(0x140)+_0x5b4a94+_0x21cb2e(0x122),{'body':_0x4377d3}),_0x1e8de0=_0x382b48[_0x21cb2e(0x124)](_0x423191=>_0x5952a2(_0x1140aa[_0x21cb2e(0xf6)][_0x21cb2e(0xe6)][_0x423191],_0x5b4a94,_0x27838c))[_0x21cb2e(0xef)](Boolean);return Object['values'](_0x1140aa[_0x21cb2e(0xf6)]['users'])[_0x21cb2e(0xda)](_0x47f623=>{const _0x40f01f=_0x21cb2e;this[_0x40f01f(0x155)][_0x40f01f(0x112)](_0x47f623);}),_0x1e8de0;}['saveCommentToSnapshot'](_0x133917){const _0x1d39ee=_0x18460f;return{'id':_0x133917['id'],'threadId':_0x133917[_0x1d39ee(0xf1)],'ref':_0x133917[_0x1d39ee(0xdc)]};}};_0x75b208=_0x16dd08([_0x58de65(0x0,_0x4be09a[_0x18460f(0x139)](_0x29551a[_0x18460f(0xe5)])),_0x58de65(0x1,_0x4be09a['Inject'](_0x4be09a['UserManagerService'])),_0x58de65(0x2,_0x4be09a['Inject'](_0x3eeda6[_0x18460f(0x15c)])),_0x58de65(0x3,_0x4be09a[_0x18460f(0x139)](_0x4be09a['Injector']))],_0x75b208);var _0x3f523c=Object[_0x18460f(0x133)],_0x578462=(_0xb780be,_0x4f5980,_0x1fd2a6,_0xd7229)=>{const _0x20caf2=_0x18460f;for(var _0x5d1b0b=_0xd7229>0x1?void 0x0:_0xd7229?_0x3f523c(_0x4f5980,_0x1fd2a6):_0x4f5980,_0x3111e8=_0xb780be[_0x20caf2(0x153)]-0x1,_0x35acd1;_0x3111e8>=0x0;_0x3111e8--)(_0x35acd1=_0xb780be[_0x3111e8])&&(_0x5d1b0b=_0x35acd1(_0x5d1b0b)||_0x5d1b0b);return _0x5d1b0b;},_0x4241d9=(_0x28209c,_0x3cf66c)=>(_0x18ce09,_0x1a6dcf)=>_0x3cf66c(_0x18ce09,_0x1a6dcf,_0x28209c);let _0x2c7013=class extends _0x4be09a['Disposable']{constructor(_0x200e7c,_0x4fe6cb){const _0x196752=_0x18460f;super(),this['_threadCommentDataSourceService']=_0x200e7c,this[_0x196752(0x104)]=_0x4fe6cb,this[_0x196752(0x134)]();}['_initDataSource'](){const _0x5f0173=_0x18460f;this['_threadCommentDataSourceService'][_0x5f0173(0x11a)]=this[_0x5f0173(0x104)],this['_threadCommentDataSourceService'][_0x5f0173(0xe4)]=!0x1;}};_0x2c7013=_0x578462([_0x4241d9(0x0,_0x1d9654[_0x18460f(0x141)]),_0x4241d9(0x1,_0x4be09a[_0x18460f(0x139)](_0x75b208))],_0x2c7013);var _0x4782c7=Object[_0x18460f(0x15b)],_0x16cffa=Object[_0x18460f(0x133)],_0x1ac04e=(_0x4f01a1,_0x110190,_0x1e11be)=>_0x110190 in _0x4f01a1?_0x4782c7(_0x4f01a1,_0x110190,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1e11be}):_0x4f01a1[_0x110190]=_0x1e11be,_0x5ef195=(_0x4b712b,_0x549022,_0x23c121,_0x3e2919)=>{for(var _0x2b1080=_0x3e2919>0x1?void 0x0:_0x3e2919?_0x16cffa(_0x549022,_0x23c121):_0x549022,_0x10b2ae=_0x4b712b['length']-0x1,_0xd1e9a2;_0x10b2ae>=0x0;_0x10b2ae--)(_0xd1e9a2=_0x4b712b[_0x10b2ae])&&(_0x2b1080=_0xd1e9a2(_0x2b1080)||_0x2b1080);return _0x2b1080;},_0x5624ed=(_0x1009d5,_0xacea84)=>(_0x37f169,_0x1f2324)=>_0xacea84(_0x37f169,_0x1f2324,_0x1009d5),_0x35eaa5=(_0x45bb11,_0x1a8aa0,_0x29e4a3)=>_0x1ac04e(_0x45bb11,typeof _0x1a8aa0!=_0x18460f(0x147)?_0x1a8aa0+'':_0x1a8aa0,_0x29e4a3);_0x44299d[_0x18460f(0xfd)]=class extends _0x4be09a[_0x18460f(0x13e)]{constructor(_0x416558=_0x4ac3b0,_0x547585,_0x9eba62){const _0x321841=_0x18460f;super(),this[_0x321841(0xde)]=_0x416558,this[_0x321841(0x123)]=_0x547585,this[_0x321841(0x14a)]=_0x9eba62;const {..._0x8d2b83}=_0x4be09a[_0x321841(0x10e)]({},_0x4ac3b0,this[_0x321841(0xde)]);this[_0x321841(0x14a)]['setConfig'](_0x22dcd4,_0x8d2b83);}[_0x18460f(0xd7)](){const _0x2e912e=_0x18460f;[[_0x75b208],[_0x2c7013],[_0x23f937]][_0x2e912e(0xda)](_0x2108c8=>{const _0x3eb642=_0x2e912e;this[_0x3eb642(0x123)][_0x3eb642(0xfb)](_0x2108c8);});}['onReady'](){const _0xf95927=_0x18460f;this[_0xf95927(0x123)]['get'](_0x2c7013),this['_injector'][_0xf95927(0x10d)](_0x23f937);}},_0x35eaa5(_0x44299d[_0x18460f(0xfd)],_0x18460f(0x146),_0x208a5e),_0x35eaa5(_0x44299d[_0x18460f(0xfd)],_0x18460f(0x110),_0x4be09a[_0x18460f(0xd9)]['UNIVER_UNKNOWN']),_0x44299d['UniverThreadCommentDataSourcePlugin']=_0x5ef195([_0x4be09a[_0x18460f(0x129)](_0x4d0909[_0x18460f(0xe7)],_0x3eeda6[_0x18460f(0x127)],_0x1920d3[_0x18460f(0x10f)]),_0x5624ed(0x1,_0x4be09a['Inject'](_0x4be09a[_0x18460f(0x101)])),_0x5624ed(0x2,_0x4be09a['IConfigService'])],_0x44299d[_0x18460f(0xfd)]),Object[_0x18460f(0x15b)](_0x44299d,Symbol[_0x18460f(0x100)],{'value':'Module'});}));function _0x4f8c(_0x309c45,_0x2525bf){const _0x145147=_0x1451();return _0x4f8c=function(_0x4f8cf3,_0x23a8d0){_0x4f8cf3=_0x4f8cf3-0xd7;let _0x5e5468=_0x145147[_0x4f8cf3];return _0x5e5468;},_0x4f8c(_0x309c45,_0x2525bf);}function _0x1451(){const _0x401c28=['users','UniverCollaborationClientPlugin','amd','DependentOn','content','@univerjs-pro/license','error','getUnit','49392KKSidI','/add','@univerjs/thread-comment-ui','createTimestamp','_threadCommentModel','getOwnPropertyDescriptor','_initDataSource','OpenOrReOpen','CommentService','replies','30PKsLun','Inject','parentId','@univerjs-pro/collaboration-client','getCurrentUser','commentUpdate$','Plugin','getComment','/universer-api/comment/unit/','IThreadCommentDataSourceService','stringify','58rQBtgZ','Solve','requireSession','pluginName','symbol','listComments','1312TNyVjk','_configService','UniverCore','root','code','post','reply','@univerjs/core','/solved','_initUserSync','length','pipe','_userService','find','UniverNetwork','exports','ThreadCommentModel','subscribe','defineProperty','CollaborationSessionService','4XLKuAe','onStarting','rxjs','UniverInstanceType','forEach','getUser','ref','UniverThreadComment','_config','_sessionService','39555132GXMTNw','userID','_init','CustomRangeType','syncUpdateMutationToColla','HTTPService','comments','UniverThreadCommentUIPlugin','updateComment','505068ewQKDO','getMemberID','addComment','user','replyId','deleteComment','filter','1392410iRwbrK','threadId','function','UserManagerService','_httpService','customRanges','body','Delete','UNRECOGNIZED','4681061oRBJDW','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','add','resolved','UniverThreadCommentDataSourcePlugin','@univerjs/network','userId','toStringTag','Injector','resolveComment','format','_threadCommentDataSource','21Upgbij','disposeWithMe','Reply','@univerjs/thread-comment','647bdkYlN','thread-comment-data-source.config','/edit','Unknown','get','merge','UniverLicensePlugin','type','/delete','addUser','Edit','UniverProThreadCommentDatasource','COMMENT','unitId','dayjs','rangeId','delete','dataSource','slice','3768840cJMneR','solved','parse','Disposable','Add','Solved','/list','_injector','map','/reply'];_0x1451=function(){return _0x401c28;};return _0x1451();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.7.0-nightly.
|
|
3
|
+
"version": "0.7.0-nightly.202505151607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.7.0-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.7.0-nightly.
|
|
50
|
-
"@univerjs/core": "0.7.0-nightly.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.7.0-nightly.202505151607",
|
|
49
|
+
"@univerjs-pro/license": "0.7.0-nightly.202505151607",
|
|
50
|
+
"@univerjs/core": "0.7.0-nightly.202505151607",
|
|
51
|
+
"@univerjs/network": "0.7.0-nightly.202505151607",
|
|
52
|
+
"@univerjs/thread-comment": "0.7.0-nightly.202505151607",
|
|
51
53
|
"@univerjs/protocol": "0.1.46-alpha.3",
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment": "0.7.0-nightly.202505141607",
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.7.0-nightly.202505141607"
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.7.0-nightly.202505151607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|