@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505141607 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/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 _0x32bf24=_0x28ba;(function(_0xc1044d,_0x421445){const _0x552ffb=_0x28ba,_0x4a4327=_0xc1044d();while(!![]){try{const _0xd7be0b=parseInt(_0x552ffb(0x25d))/0x1*(-parseInt(_0x552ffb(0x204))/0x2)+-parseInt(_0x552ffb(0x257))/0x3+-parseInt(_0x552ffb(0x221))/0x4+parseInt(_0x552ffb(0x1e9))/0x5+parseInt(_0x552ffb(0x1f0))/0x6*(-parseInt(_0x552ffb(0x1f5))/0x7)+-parseInt(_0x552ffb(0x1fc))/0x8*(parseInt(_0x552ffb(0x26b))/0x9)+parseInt(_0x552ffb(0x1ec))/0xa;if(_0xd7be0b===_0x421445)break;else _0x4a4327['push'](_0x4a4327['shift']());}catch(_0x3e83bb){_0x4a4327['push'](_0x4a4327['shift']());}}}(_0x28eb,0x9f9f3));function _0x28ba(_0x2bb994,_0x69103c){const _0x28eb3e=_0x28eb();return _0x28ba=function(_0x28ba12,_0x2cb552){_0x28ba12=_0x28ba12-0x1e8;let _0x212b15=_0x28eb3e[_0x28ba12];return _0x212b15;},_0x28ba(_0x2bb994,_0x69103c);}Object['defineProperty'](exports,Symbol[_0x32bf24(0x232)],{'value':_0x32bf24(0x1ff)});const b=require(_0x32bf24(0x1ea)),T=require(_0x32bf24(0x235)),c=require('@univerjs/core'),j=require(_0x32bf24(0x1f1)),M=require(_0x32bf24(0x234)),w=require(_0x32bf24(0x1ef)),P=require(_0x32bf24(0x20d)),U=_0x32bf24(0x1e8);var I=(_0x4ca070=>(_0x4ca070[_0x4ca070[_0x32bf24(0x253)]=0x0]=_0x32bf24(0x253),_0x4ca070[_0x4ca070[_0x32bf24(0x1f6)]=0x1]=_0x32bf24(0x1f6),_0x4ca070[_0x4ca070[_0x32bf24(0x23a)]=-0x1]=_0x32bf24(0x23a),_0x4ca070))(I||{}),v=(_0x39a7f9=>(_0x39a7f9[_0x39a7f9[_0x32bf24(0x24c)]=0x0]=_0x32bf24(0x24c),_0x39a7f9[_0x39a7f9[_0x32bf24(0x207)]=0x1]='Add',_0x39a7f9[_0x39a7f9[_0x32bf24(0x1fd)]=0x2]=_0x32bf24(0x1fd),_0x39a7f9[_0x39a7f9[_0x32bf24(0x241)]=0x3]=_0x32bf24(0x241),_0x39a7f9[_0x39a7f9['Delete']=0x4]='Delete',_0x39a7f9[_0x39a7f9[_0x32bf24(0x242)]=0x5]=_0x32bf24(0x242),_0x39a7f9[_0x39a7f9[_0x32bf24(0x23a)]=-0x1]='UNRECOGNIZED',_0x39a7f9))(v||{});const f=_0x1cad2=>c['dayjs'](new Date(+_0x1cad2))[_0x32bf24(0x21e)](_0x32bf24(0x267)),R=async(_0xbc68bf,_0x1aec37)=>{const _0x5a0c2f=_0x32bf24,_0x3c9cab=_0xbc68bf[_0x5a0c2f(0x26a)](c[_0x5a0c2f(0x226)]),_0x4b5e7b=_0xbc68bf[_0x5a0c2f(0x26a)](P['HTTPService']);_0x1aec37[_0x5a0c2f(0x211)](_0x301176=>{const _0x5b899c=_0x5a0c2f;_0x3c9cab[_0x5b899c(0x247)](_0x301176)&&_0x1aec37['delete'](_0x301176);}),_0x1aec37[_0x5a0c2f(0x24b)]&&(await _0x4b5e7b[_0x5a0c2f(0x26a)](_0x5a0c2f(0x209),{'params':{'userIDs':[..._0x1aec37]}}))[_0x5a0c2f(0x260)]['users'][_0x5a0c2f(0x211)](_0x1fccfd=>{const _0x2b9b7d=_0x5a0c2f;_0x1fccfd&&_0x3c9cab[_0x2b9b7d(0x210)](_0x1fccfd);});};var $=Object[_0x32bf24(0x21f)],E=(_0x3f4843,_0x49449e,_0x36ff1a,_0x555636)=>{const _0x3fe3f1=_0x32bf24;for(var _0x21354c=_0x555636>0x1?void 0x0:_0x555636?$(_0x49449e,_0x36ff1a):_0x49449e,_0x28ed06=_0x3f4843[_0x3fe3f1(0x259)]-0x1,_0x2845f6;_0x28ed06>=0x0;_0x28ed06--)(_0x2845f6=_0x3f4843[_0x28ed06])&&(_0x21354c=_0x2845f6(_0x21354c)||_0x21354c);return _0x21354c;},S=(_0x3b9d0e,_0x13a873)=>(_0x25584b,_0x47a235)=>_0x13a873(_0x25584b,_0x47a235,_0x3b9d0e);let p=class extends c['Disposable']{constructor(_0xdaf727,_0x218bd1,_0x3e1d60,_0xdbbd48){const _0x11cca4=_0x32bf24;super(),this[_0x11cca4(0x224)]=_0xdaf727,this[_0x11cca4(0x22f)]=_0x218bd1,this['_userService']=_0x3e1d60,this[_0x11cca4(0x246)]=_0xdbbd48,this[_0x11cca4(0x24e)](),this[_0x11cca4(0x1fa)]();}[_0x32bf24(0x1fa)](){const _0x18b669=_0x32bf24;this['disposeWithMe'](this['_threadCommentModel'][_0x18b669(0x236)][_0x18b669(0x21c)](w[_0x18b669(0x217)](0x10))[_0x18b669(0x20e)](_0x266e2a=>{const _0x4b8af9=new Set();_0x266e2a['forEach'](_0x579fbd=>{const _0x2e37f0=_0x28ba;switch(_0x579fbd[_0x2e37f0(0x249)]){case _0x2e37f0(0x23f):{const _0x438029=_0x579fbd[_0x2e37f0(0x213)][_0x2e37f0(0x205)];_0x4b8af9[_0x2e37f0(0x23f)](_0x438029);break;}}}),R(this['_injector'],_0x4b8af9);}));}['_init'](){const _0x1b44d8=_0x32bf24;this[_0x1b44d8(0x248)](this['_commentService'][_0x1b44d8(0x236)][_0x1b44d8(0x20e)](async _0x54c955=>{const _0x4350cc=_0x1b44d8;var _0x59dff3,_0x577ec4,_0x3076f4,_0x1e4692;const _0x38e56e=(_0x59dff3=this[_0x4350cc(0x22f)]['getUnit'](_0x54c955['unitId'])[_0x4350cc(0x1ee)](_0x42ea23=>_0x42ea23[_0x4350cc(0x222)]===_0x54c955[_0x4350cc(0x222)]))==null?void 0x0:_0x59dff3[_0x4350cc(0x200)];if(!_0x38e56e)return;const {unitId:_0x312a15,subUnitId:_0x2d7d0f}=_0x38e56e;switch(_0x54c955[_0x4350cc(0x22c)]&&this['_userService'][_0x4350cc(0x210)](_0x54c955[_0x4350cc(0x22c)]),_0x54c955['type']){case v[_0x4350cc(0x207)]:break;case v[_0x4350cc(0x1fd)]:{this[_0x4350cc(0x22f)][_0x4350cc(0x1f3)](_0x312a15,_0x2d7d0f,{'unitId':_0x312a15,'subUnitId':_0x2d7d0f,'ref':'','id':_0x54c955['replyId'],'dT':f(+_0x54c955[_0x4350cc(0x25e)]),'threadId':_0x54c955[_0x4350cc(0x222)],'personId':(_0x3076f4=(_0x577ec4=_0x54c955['user'])==null?void 0x0:_0x577ec4[_0x4350cc(0x24d)])!=null?_0x3076f4:_0x54c955[_0x4350cc(0x254)],'text':JSON[_0x4350cc(0x261)](_0x54c955[_0x4350cc(0x266)]),'parentId':_0x38e56e['id']});break;}case v[_0x4350cc(0x25f)]:{const _0x15a9d9=this[_0x4350cc(0x22f)][_0x4350cc(0x225)](_0x312a15,_0x2d7d0f,_0x54c955[_0x4350cc(0x1f9)]);_0x15a9d9&&_0x15a9d9[_0x4350cc(0x1fe)]&&this['_threadCommentModel'][_0x4350cc(0x20c)](_0x312a15,_0x2d7d0f,_0x54c955['replyId']);break;}case v[_0x4350cc(0x241)]:{this[_0x4350cc(0x22f)][_0x4350cc(0x25c)](_0x312a15,_0x2d7d0f,{'commentId':_0x54c955[_0x4350cc(0x1f9)],'text':JSON['parse'](_0x54c955[_0x4350cc(0x266)])});break;}case v[_0x4350cc(0x242)]:{const _0x277da1=(_0x1e4692=this[_0x4350cc(0x22f)][_0x4350cc(0x258)](_0x54c955[_0x4350cc(0x269)])[_0x4350cc(0x1ee)](_0x259866=>_0x259866[_0x4350cc(0x222)]===_0x54c955['threadId']))==null?void 0x0:_0x1e4692[_0x4350cc(0x200)];_0x277da1&&this[_0x4350cc(0x22f)][_0x4350cc(0x22d)](_0x312a15,_0x2d7d0f,_0x277da1['id'],_0x54c955['solved']===I[_0x4350cc(0x1f6)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x32bf24(0x231)])),S(0x1,c[_0x32bf24(0x1ed)](M[_0x32bf24(0x22e)])),S(0x2,c[_0x32bf24(0x1ed)](c[_0x32bf24(0x226)])),S(0x3,c[_0x32bf24(0x1ed)](c['Injector']))],p);const q=_0x32bf24(0x250),D={};function _0x28eb(){const _0x288c5e=['bufferTime','UniverThreadCommentUIPlugin','error','DependentOn','onStarting','pipe','/universer-api/comment/unit/','format','getOwnPropertyDescriptor','code','4316140CJzZob','threadId','comments','_commentService','getComment','UserManagerService','users','_httpService','Injector','/reply','Disposable','user','resolveComment','ThreadCommentModel','_threadCommentModel','defineProperty','CommentService','toStringTag','post','@univerjs/thread-comment','@univerjs-pro/license','commentUpdate$','reply','pluginName','getMemberID','UNRECOGNIZED','_config','requireSession','comment','UniverCollaborationClientPlugin','add','dataSource','Edit','Solve','/add','UNIVER_UNKNOWN','dayjs','_injector','getUser','disposeWithMe','type','rangeId','size','Unknown','userID','_init','_userService','thread-comment-data-source.config','stringify','CollaborationSessionService','OpenOrReOpen','userId','ref','/list','3598539EXusPZ','getUnit','length','_sessionService','HTTPService','updateComment','211384RGiLLF','createTimestamp','Delete','body','parse','values','COMMENT','onReady','_initDataSource','content','YYYY/MM/DD\x20HH:mm','IThreadCommentDataSourceService','unitId','get','3724029DYVkZz','UniverThreadCommentDataSourcePlugin','merge','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','474135PzUKKL','@univerjs-pro/collaboration-client','replies','62861720nILUVE','Inject','find','rxjs','6902262CDaXYd','@univerjs/thread-comment-ui','/edit','addComment','symbol','7jasVfu','Solved','syncUpdateMutationToColla','resolved','replyId','_initUserSync','/solved','24sNryiW','Reply','parentId','Module','root','solved','CustomRangeType','UniverInstanceType','10hrFdna','personId','getCurrentUser','Add','_threadCommentDataSourceService','/universer-api/user/list','rangeType','saveCommentToSnapshot','deleteComment','@univerjs/network','subscribe','map','addUser','forEach','filter','payload','_configService','listComments','_threadCommentDataSource'];_0x28eb=function(){return _0x288c5e;};return _0x28eb();}var A=Object[_0x32bf24(0x21f)],x=(_0xab5f43,_0x516de3,_0x508b1d,_0x2a35df)=>{const _0x5c69f6=_0x32bf24;for(var _0x272d20=_0x2a35df>0x1?void 0x0:_0x2a35df?A(_0x516de3,_0x508b1d):_0x516de3,_0x7651f1=_0xab5f43[_0x5c69f6(0x259)]-0x1,_0x5a1a84;_0x7651f1>=0x0;_0x7651f1--)(_0x5a1a84=_0xab5f43[_0x7651f1])&&(_0x272d20=_0x5a1a84(_0x272d20)||_0x272d20);return _0x272d20;},_=(_0xad6636,_0x1033b2)=>(_0x24b6b2,_0x31bda6)=>_0x1033b2(_0x24b6b2,_0x31bda6,_0xad6636);function Y(_0xceb71f,_0x1411a9){const _0x4cd374=_0x32bf24,_0x21da1c=_0xceb71f[_0x4cd374(0x1eb)][0x0];return{..._0x1411a9,'id':_0x21da1c['replyId'],'resolved':_0xceb71f[_0x4cd374(0x201)]===0x1,'dT':f(_0x21da1c['createTimestamp']),'personId':_0x21da1c[_0x4cd374(0x254)],'threadId':_0x21da1c[_0x4cd374(0x222)]};}function G(_0x2735ef,_0x53a45c,_0x277187){const _0x4b6ce5=_0x32bf24;var _0x4542c4,_0x2426cc;if(((_0x2426cc=(_0x4542c4=_0x2735ef==null?void 0x0:_0x2735ef[_0x4b6ce5(0x1eb)])==null?void 0x0:_0x4542c4['length'])!=null?_0x2426cc:0x0)>0x0){const _0x367cb2=(_0x45ffe4,_0x2ea1c2)=>({'id':_0x45ffe4['replyId'],'threadId':_0x45ffe4[_0x4b6ce5(0x222)],'dT':f(_0x45ffe4[_0x4b6ce5(0x25e)]),'personId':_0x45ffe4[_0x4b6ce5(0x254)],'resolved':_0x2735ef[_0x4b6ce5(0x201)]===I['Solved'],'unitId':_0x53a45c,'subUnitId':_0x277187,'text':JSON[_0x4b6ce5(0x261)](_0x45ffe4[_0x4b6ce5(0x266)]),'parentId':_0x2ea1c2}),_0x2a9e30=_0x367cb2(_0x2735ef['replies'][0x0]);return{..._0x2a9e30,'children':_0x2735ef['replies']['slice'](0x1)['map'](_0xabd79f=>_0x367cb2(_0xabd79f,_0x2a9e30['id']))};}return null;}let g=class{constructor(_0x2ab868,_0x1ad747,_0x1abc77,_0x33c090){const _0x2f4d3d=_0x32bf24;this[_0x2f4d3d(0x228)]=_0x2ab868,this[_0x2f4d3d(0x24f)]=_0x1ad747,this['_sessionService']=_0x1abc77,this[_0x2f4d3d(0x246)]=_0x33c090;}async[_0x32bf24(0x1f3)](_0x57d36c){const _0x40cff3=_0x32bf24;var _0x483af0,_0x4c3150;const {parentId:_0x46240c,unitId:_0x591126,text:_0x460228,threadId:_0x2bb440}=_0x57d36c,_0x2052bd=(_0x4c3150=(_0x483af0=_0x460228['customRanges'])==null?void 0x0:_0x483af0[_0x40cff3(0x212)](_0x8b7540=>_0x8b7540[_0x40cff3(0x20a)]===c['CustomRangeType'][_0x40cff3(0x263)])[_0x40cff3(0x20f)](_0x183287=>_0x183287[_0x40cff3(0x24a)]))!=null?_0x4c3150:[],_0x3be949=JSON[_0x40cff3(0x251)](_0x460228),_0x213c0d=(await this[_0x40cff3(0x25a)]['requireSession'](_0x591126))['getMemberID']();if(_0x46240c){const _0x1a1464={'memberId':_0x213c0d,'unitId':_0x591126,'content':_0x3be949,'mention':_0x2052bd,'threadId':_0x2bb440},_0x47c28f=(await this[_0x40cff3(0x228)][_0x40cff3(0x233)]('/universer-api/comment/unit/'+_0x591126+_0x40cff3(0x22a),{'body':_0x1a1464}))['body'][_0x40cff3(0x237)];return{..._0x57d36c,'id':_0x47c28f[_0x40cff3(0x1f9)],'dT':c[_0x40cff3(0x245)](+_0x47c28f['createTimestamp'])[_0x40cff3(0x21e)](_0x40cff3(0x267)),'personId':_0x47c28f[_0x40cff3(0x254)]};}else{const _0x11fe77={'memberId':_0x213c0d,'unitId':_0x591126,'content':_0x3be949,'mention':_0x2052bd},_0x3c6c27=await this['_httpService']['post'](_0x40cff3(0x21d)+_0x591126+_0x40cff3(0x243),{'body':_0x11fe77});return Y(_0x3c6c27[_0x40cff3(0x260)][_0x40cff3(0x23d)],_0x57d36c);}}async[_0x32bf24(0x25c)](_0x118e1f){const _0x1a5dab=_0x32bf24;var _0x4e2bd6,_0x342783;const {text:_0x2e24c2,unitId:_0x4a5320}=_0x118e1f,_0x1bb527=(_0x342783=(_0x4e2bd6=_0x2e24c2['customRanges'])==null?void 0x0:_0x4e2bd6['filter'](_0x2d4b82=>_0x2d4b82[_0x1a5dab(0x20a)]===c[_0x1a5dab(0x202)][_0x1a5dab(0x263)])[_0x1a5dab(0x20f)](_0x1f52d6=>_0x1f52d6['rangeId']))!=null?_0x342783:[],_0x2a9552=JSON['stringify'](_0x2e24c2),_0x2faaab=_0x118e1f['threadId'],_0x328801=_0x118e1f['id'],_0x4d668f={'memberId':(await this['_sessionService'][_0x1a5dab(0x23c)](_0x4a5320))['getMemberID'](),'unitId':_0x4a5320,'threadId':_0x2faaab,'mention':_0x1bb527,'content':_0x2a9552,'replyId':_0x328801},_0x14903f=await this[_0x1a5dab(0x228)]['post'](_0x1a5dab(0x21d)+_0x4a5320+_0x1a5dab(0x1f2),{'body':_0x4d668f});return!_0x14903f[_0x1a5dab(0x260)][_0x1a5dab(0x219)]||_0x14903f['body']['error'][_0x1a5dab(0x220)]===0x1;}async[_0x32bf24(0x22d)](_0x37f8fd){const _0x35abb9=_0x32bf24,{unitId:_0x296e9a}=_0x37f8fd,_0x3974c9=_0x37f8fd[_0x35abb9(0x222)],_0x1190c5={'memberId':this[_0x35abb9(0x24f)][_0x35abb9(0x206)]()[_0x35abb9(0x24d)],'unitId':_0x296e9a,'threadId':_0x3974c9,'solved':_0x37f8fd[_0x35abb9(0x1f8)]?I['Solved']:I['OpenOrReOpen']},_0x88c3f4=await this[_0x35abb9(0x228)][_0x35abb9(0x233)](_0x35abb9(0x21d)+_0x296e9a+_0x35abb9(0x1fb),{'body':_0x1190c5});return!_0x88c3f4['body']['error']||_0x88c3f4[_0x35abb9(0x260)][_0x35abb9(0x219)][_0x35abb9(0x220)]===0x1;}async[_0x32bf24(0x20c)](_0xbe1276,_0x59c941,_0x3450df,_0x4a8c6f){const _0x49d824=_0x32bf24,_0x4f928d={'memberId':(await this['_sessionService'][_0x49d824(0x23c)](_0xbe1276))[_0x49d824(0x239)](),'threadId':_0x3450df,'replyId':_0x4a8c6f,'unitId':_0xbe1276},_0x525073=await this['_httpService']['post'](_0x49d824(0x21d)+_0xbe1276+'/delete',{'body':_0x4f928d});return!_0x525073[_0x49d824(0x260)][_0x49d824(0x219)]||_0x525073[_0x49d824(0x260)]['error']['code']===0x1;}async[_0x32bf24(0x215)](_0x479f51,_0x4f3a5d,_0x41d3d8){const _0x35e738=_0x32bf24,_0x402a90={'unitId':_0x479f51,'threadId':_0x41d3d8},_0x240b44=await this['_httpService'][_0x35e738(0x233)](_0x35e738(0x21d)+_0x479f51+_0x35e738(0x256),{'body':_0x402a90}),_0x7ee5de=_0x41d3d8['map'](_0x592aff=>G(_0x240b44[_0x35e738(0x260)][_0x35e738(0x223)][_0x592aff],_0x479f51,_0x4f3a5d))[_0x35e738(0x212)](Boolean);return Object[_0x35e738(0x262)](_0x240b44[_0x35e738(0x260)][_0x35e738(0x227)])[_0x35e738(0x211)](_0x94c6b2=>{const _0x1eaa89=_0x35e738;this[_0x1eaa89(0x24f)]['addUser'](_0x94c6b2);}),_0x7ee5de;}[_0x32bf24(0x20b)](_0x49b265){const _0x3aa705=_0x32bf24;return{'id':_0x49b265['id'],'threadId':_0x49b265[_0x3aa705(0x222)],'ref':_0x49b265[_0x3aa705(0x255)]};}};g=x([_(0x0,c[_0x32bf24(0x1ed)](P[_0x32bf24(0x25b)])),_(0x1,c[_0x32bf24(0x1ed)](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x32bf24(0x252)])),_(0x3,c['Inject'](c[_0x32bf24(0x229)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x3b3e4e,_0xa03f4f,_0x296124,_0x59987c)=>{for(var _0x2bac5e=_0x59987c>0x1?void 0x0:_0x59987c?H(_0xa03f4f,_0x296124):_0xa03f4f,_0x77cff4=_0x3b3e4e['length']-0x1,_0x179712;_0x77cff4>=0x0;_0x77cff4--)(_0x179712=_0x3b3e4e[_0x77cff4])&&(_0x2bac5e=_0x179712(_0x2bac5e)||_0x2bac5e);return _0x2bac5e;},y=(_0xa86682,_0x2526f6)=>(_0xdab616,_0x1569e2)=>_0x2526f6(_0xdab616,_0x1569e2,_0xa86682);let C=class extends c[_0x32bf24(0x22b)]{constructor(_0x55838f,_0x401ca2){const _0x1d85cb=_0x32bf24;super(),this[_0x1d85cb(0x208)]=_0x55838f,this[_0x1d85cb(0x216)]=_0x401ca2,this[_0x1d85cb(0x265)]();}['_initDataSource'](){const _0x57e909=_0x32bf24;this[_0x57e909(0x208)][_0x57e909(0x240)]=this[_0x57e909(0x216)],this[_0x57e909(0x208)][_0x57e909(0x1f7)]=!0x1;}};C=J([y(0x0,M[_0x32bf24(0x268)]),y(0x1,c[_0x32bf24(0x1ed)](g))],C);var F=Object[_0x32bf24(0x230)],L=Object[_0x32bf24(0x21f)],Z=(_0x44400c,_0x3b724e,_0x13d384)=>_0x3b724e in _0x44400c?F(_0x44400c,_0x3b724e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x13d384}):_0x44400c[_0x3b724e]=_0x13d384,W=(_0x25c230,_0x32cd07,_0x260495,_0x23acde)=>{const _0x8eeb21=_0x32bf24;for(var _0xc3b646=_0x23acde>0x1?void 0x0:_0x23acde?L(_0x32cd07,_0x260495):_0x32cd07,_0x38c613=_0x25c230[_0x8eeb21(0x259)]-0x1,_0x5d4ef7;_0x38c613>=0x0;_0x38c613--)(_0x5d4ef7=_0x25c230[_0x38c613])&&(_0xc3b646=_0x5d4ef7(_0xc3b646)||_0xc3b646);return _0xc3b646;},O=(_0x40c00d,_0xf7af8a)=>(_0x36fc8e,_0xe10767)=>_0xf7af8a(_0x36fc8e,_0xe10767,_0x40c00d),N=(_0x20e3e8,_0x4bd495,_0x3917da)=>Z(_0x20e3e8,typeof _0x4bd495!=_0x32bf24(0x1f4)?_0x4bd495+'':_0x4bd495,_0x3917da);exports[_0x32bf24(0x26c)]=class extends c['Plugin']{constructor(_0x487a69=D,_0x2b1133,_0x3e3150){const _0x2dd4db=_0x32bf24;super(),this['_config']=_0x487a69,this['_injector']=_0x2b1133,this[_0x2dd4db(0x214)]=_0x3e3150;const {..._0x3ea356}=c[_0x2dd4db(0x26d)]({},D,this[_0x2dd4db(0x23b)]);this[_0x2dd4db(0x214)]['setConfig'](q,_0x3ea356);}[_0x32bf24(0x21b)](){const _0x1e6f0d=_0x32bf24;[[g],[C],[p]][_0x1e6f0d(0x211)](_0x253ab1=>{const _0xe6bd58=_0x1e6f0d;this[_0xe6bd58(0x246)][_0xe6bd58(0x23f)](_0x253ab1);});}[_0x32bf24(0x264)](){const _0x41cfff=_0x32bf24;this[_0x41cfff(0x246)]['get'](C),this[_0x41cfff(0x246)][_0x41cfff(0x26a)](p);}},N(exports[_0x32bf24(0x26c)],_0x32bf24(0x238),U),N(exports[_0x32bf24(0x26c)],_0x32bf24(0x249),c[_0x32bf24(0x203)][_0x32bf24(0x244)]),exports[_0x32bf24(0x26c)]=W([c[_0x32bf24(0x21a)](j[_0x32bf24(0x218)],b[_0x32bf24(0x23e)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x32bf24(0x26c)]);
|
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
|
+
const _0x361ff7=_0x2b3d;(function(_0x3b8dfd,_0x23b7d1){const _0x2726bb=_0x2b3d,_0x2a2d8a=_0x3b8dfd();while(!![]){try{const _0x3bc8a1=-parseInt(_0x2726bb(0x14f))/0x1+parseInt(_0x2726bb(0x11c))/0x2+parseInt(_0x2726bb(0x123))/0x3*(-parseInt(_0x2726bb(0x178))/0x4)+-parseInt(_0x2726bb(0x13d))/0x5+parseInt(_0x2726bb(0x144))/0x6+-parseInt(_0x2726bb(0x127))/0x7+parseInt(_0x2726bb(0x17a))/0x8*(parseInt(_0x2726bb(0x126))/0x9);if(_0x3bc8a1===_0x23b7d1)break;else _0x2a2d8a['push'](_0x2a2d8a['shift']());}catch(_0x16e457){_0x2a2d8a['push'](_0x2a2d8a['shift']());}}}(_0x1ab1,0x60da5));import{CommentService as _0x550980,CollaborationSessionService as _0xed4b95,UniverCollaborationClientPlugin as _0x1f4157}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x50fae2}from'@univerjs-pro/license';import{dayjs as _0x453ba2,UserManagerService as _0x230923,Inject as _0x4c9cd9,Injector as _0x1592aa,Disposable as _0xaf25f7,CustomRangeType as _0x32fdec,UniverInstanceType as _0x5015d6,DependentOn as _0x434b14,IConfigService as _0x2808c2,Plugin as _0x375e34,merge as _0x3bd94e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4bca2b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x51ac0f,IThreadCommentDataSourceService as _0x38d4a8}from'@univerjs/thread-comment';import{bufferTime as _0x2c3f39}from'rxjs';import{HTTPService as _0x13c39a}from'@univerjs/network';const W=_0x361ff7(0x15c);var I=(_0x43eb89=>(_0x43eb89[_0x43eb89[_0x361ff7(0x15b)]=0x0]=_0x361ff7(0x15b),_0x43eb89[_0x43eb89[_0x361ff7(0x12e)]=0x1]=_0x361ff7(0x12e),_0x43eb89[_0x43eb89[_0x361ff7(0x164)]=-0x1]=_0x361ff7(0x164),_0x43eb89))(I||{}),v=(_0x6d47e4=>(_0x6d47e4[_0x6d47e4['Unknown']=0x0]=_0x361ff7(0x175),_0x6d47e4[_0x6d47e4[_0x361ff7(0x13f)]=0x1]=_0x361ff7(0x13f),_0x6d47e4[_0x6d47e4[_0x361ff7(0x180)]=0x2]=_0x361ff7(0x180),_0x6d47e4[_0x6d47e4[_0x361ff7(0x16b)]=0x3]='Edit',_0x6d47e4[_0x6d47e4[_0x361ff7(0x17b)]=0x4]='Delete',_0x6d47e4[_0x6d47e4[_0x361ff7(0x12d)]=0x5]=_0x361ff7(0x12d),_0x6d47e4[_0x6d47e4[_0x361ff7(0x164)]=-0x1]=_0x361ff7(0x164),_0x6d47e4))(v||{});const D=_0x2ad013=>_0x453ba2(new Date(+_0x2ad013))[_0x361ff7(0x16c)](_0x361ff7(0x13a)),B=async(_0x1bc43e,_0x333760)=>{const _0x37d30e=_0x361ff7,_0x4799ba=_0x1bc43e[_0x37d30e(0x176)](_0x230923),_0x5acad5=_0x1bc43e['get'](_0x13c39a);_0x333760[_0x37d30e(0x136)](_0x25ad47=>{const _0x3ec9dc=_0x37d30e;_0x4799ba[_0x3ec9dc(0x16e)](_0x25ad47)&&_0x333760[_0x3ec9dc(0x13b)](_0x25ad47);}),_0x333760[_0x37d30e(0x125)]&&(await _0x5acad5[_0x37d30e(0x176)](_0x37d30e(0x12b),{'params':{'userIDs':[..._0x333760]}}))[_0x37d30e(0x119)]['users'][_0x37d30e(0x136)](_0xdb7fd5=>{_0xdb7fd5&&_0x4799ba['addUser'](_0xdb7fd5);});};var K=Object[_0x361ff7(0x121)],V=(_0xa4a34c,_0x75f4ba,_0x12ff7f,_0x670346)=>{const _0x3a553c=_0x361ff7;for(var _0x40cfa9=_0x670346>0x1?void 0x0:_0x670346?K(_0x75f4ba,_0x12ff7f):_0x75f4ba,_0x2dd1f0=_0xa4a34c[_0x3a553c(0x11d)]-0x1,_0x1d9674;_0x2dd1f0>=0x0;_0x2dd1f0--)(_0x1d9674=_0xa4a34c[_0x2dd1f0])&&(_0x40cfa9=_0x1d9674(_0x40cfa9)||_0x40cfa9);return _0x40cfa9;},p=(_0x17e6e4,_0xe04232)=>(_0x3b1e38,_0x2bf4bf)=>_0xe04232(_0x3b1e38,_0x2bf4bf,_0x17e6e4);function _0x2b3d(_0x38e0cb,_0x3d6b74){const _0x1ab131=_0x1ab1();return _0x2b3d=function(_0x2b3d77,_0x2ed7e1){_0x2b3d77=_0x2b3d77-0x119;let _0x3962fd=_0x1ab131[_0x2b3d77];return _0x3962fd;},_0x2b3d(_0x38e0cb,_0x3d6b74);}let S=class extends _0xaf25f7{constructor(_0x32a74d,_0x4cbcd9,_0x5edc86,_0x298108){const _0x37a336=_0x361ff7;super(),this[_0x37a336(0x122)]=_0x32a74d,this[_0x37a336(0x147)]=_0x4cbcd9,this[_0x37a336(0x165)]=_0x5edc86,this[_0x37a336(0x128)]=_0x298108,this[_0x37a336(0x168)](),this[_0x37a336(0x140)]();}[_0x361ff7(0x140)](){const _0x104cbb=_0x361ff7;this[_0x104cbb(0x120)](this[_0x104cbb(0x147)][_0x104cbb(0x15a)][_0x104cbb(0x14d)](_0x2c3f39(0x10))['subscribe'](_0xb9ee1f=>{const _0x3c7d97=_0x104cbb,_0x29ed2e=new Set();_0xb9ee1f[_0x3c7d97(0x136)](_0x53b36e=>{const _0x38de08=_0x3c7d97;switch(_0x53b36e[_0x38de08(0x172)]){case _0x38de08(0x14c):{const _0x9c8192=_0x53b36e[_0x38de08(0x16d)]['personId'];_0x29ed2e[_0x38de08(0x14c)](_0x9c8192);break;}}}),B(this[_0x3c7d97(0x128)],_0x29ed2e);}));}['_init'](){const _0x51ac85=_0x361ff7;this[_0x51ac85(0x120)](this[_0x51ac85(0x122)][_0x51ac85(0x15a)][_0x51ac85(0x163)](async _0x17de44=>{const _0x358862=_0x51ac85;var _0x1a5e8a,_0xb4a3a9,_0x333f70,_0x538181;const _0x36a951=(_0x1a5e8a=this[_0x358862(0x147)]['getUnit'](_0x17de44[_0x358862(0x142)])[_0x358862(0x170)](_0x451c5e=>_0x451c5e['threadId']===_0x17de44['threadId']))==null?void 0x0:_0x1a5e8a['root'];if(!_0x36a951)return;const {unitId:_0x4004bd,subUnitId:_0x17d3bf}=_0x36a951;switch(_0x17de44[_0x358862(0x12a)]&&this[_0x358862(0x165)][_0x358862(0x130)](_0x17de44[_0x358862(0x12a)]),_0x17de44['type']){case v['Add']:break;case v[_0x358862(0x180)]:{this[_0x358862(0x147)][_0x358862(0x153)](_0x4004bd,_0x17d3bf,{'unitId':_0x4004bd,'subUnitId':_0x17d3bf,'ref':'','id':_0x17de44[_0x358862(0x17c)],'dT':D(+_0x17de44[_0x358862(0x138)]),'threadId':_0x17de44['threadId'],'personId':(_0x333f70=(_0xb4a3a9=_0x17de44[_0x358862(0x12a)])==null?void 0x0:_0xb4a3a9['userID'])!=null?_0x333f70:_0x17de44[_0x358862(0x146)],'text':JSON[_0x358862(0x177)](_0x17de44[_0x358862(0x135)]),'parentId':_0x36a951['id']});break;}case v[_0x358862(0x17b)]:{const _0x594598=this[_0x358862(0x147)]['getComment'](_0x4004bd,_0x17d3bf,_0x17de44['replyId']);_0x594598&&_0x594598[_0x358862(0x13c)]&&this[_0x358862(0x147)][_0x358862(0x14e)](_0x4004bd,_0x17d3bf,_0x17de44[_0x358862(0x17c)]);break;}case v[_0x358862(0x16b)]:{this['_threadCommentModel']['updateComment'](_0x4004bd,_0x17d3bf,{'commentId':_0x17de44[_0x358862(0x17c)],'text':JSON[_0x358862(0x177)](_0x17de44['content'])});break;}case v[_0x358862(0x12d)]:{const _0x5adef5=(_0x538181=this[_0x358862(0x147)][_0x358862(0x141)](_0x17de44['unitId'])[_0x358862(0x170)](_0x523fc8=>_0x523fc8[_0x358862(0x145)]===_0x17de44[_0x358862(0x145)]))==null?void 0x0:_0x538181[_0x358862(0x134)];_0x5adef5&&this[_0x358862(0x147)]['resolveComment'](_0x4004bd,_0x17d3bf,_0x5adef5['id'],_0x17de44[_0x358862(0x173)]===I[_0x358862(0x12e)]);break;}}}));}};S=V([p(0x0,_0x4c9cd9(_0x550980)),p(0x1,_0x4c9cd9(_0x51ac0f)),p(0x2,_0x4c9cd9(_0x230923)),p(0x3,_0x4c9cd9(_0x1592aa))],S);const z=_0x361ff7(0x154),M={};function _0x1ab1(){const _0xb90c2c=['Solved','dataSource','addUser','replies','ref','getMemberID','root','content','forEach','setConfig','createTimestamp','_initDataSource','YYYY/MM/DD\x20HH:mm','delete','parentId','1861005ZxZnHv','rangeId','Add','_initUserSync','getUnit','unitId','UNIVER_UNKNOWN','2834496hEMLOf','threadId','userId','_threadCommentModel','userID','_configService','comment','/reply','add','pipe','deleteComment','85830ovYLdY','/delete','_sessionService','filter','addComment','thread-comment-data-source.config','reply','defineProperty','resolveComment','symbol','code','commentUpdate$','OpenOrReOpen','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/edit','post','comments','/list','_threadCommentDataSource','stringify','subscribe','UNRECOGNIZED','_userService','_config','_threadCommentDataSourceService','_init','/universer-api/comment/unit/','requireSession','Edit','format','payload','getUser','COMMENT','find','pluginName','type','solved','syncUpdateMutationToColla','Unknown','get','parse','4UTFVrR','onReady','71048JiKkRL','Delete','replyId','listComments','customRanges','getCurrentUser','Reply','map','body','/solved','users','1368642uIDPiw','length','rangeType','_httpService','disposeWithMe','getOwnPropertyDescriptor','_commentService','987741EYoUbe','error','size','351RRFTME','2233763tTHEqj','_injector','slice','user','/universer-api/user/list','/add','Solve'];_0x1ab1=function(){return _0xb90c2c;};return _0x1ab1();}var k=Object[_0x361ff7(0x121)],Q=(_0x1ff86c,_0xb0fb5f,_0x169f2a,_0x24bf4b)=>{for(var _0x18079d=_0x24bf4b>0x1?void 0x0:_0x24bf4b?k(_0xb0fb5f,_0x169f2a):_0xb0fb5f,_0x3e9778=_0x1ff86c['length']-0x1,_0x49cef4;_0x3e9778>=0x0;_0x3e9778--)(_0x49cef4=_0x1ff86c[_0x3e9778])&&(_0x18079d=_0x49cef4(_0x18079d)||_0x18079d);return _0x18079d;},_=(_0x596ad6,_0x449f02)=>(_0x310cd7,_0x4cf512)=>_0x449f02(_0x310cd7,_0x4cf512,_0x596ad6);function X(_0x598a7f,_0x3e3b3c){const _0x60820d=_0x361ff7,_0x21b693=_0x598a7f[_0x60820d(0x131)][0x0];return{..._0x3e3b3c,'id':_0x21b693[_0x60820d(0x17c)],'resolved':_0x598a7f[_0x60820d(0x173)]===0x1,'dT':D(_0x21b693[_0x60820d(0x138)]),'personId':_0x21b693[_0x60820d(0x146)],'threadId':_0x21b693['threadId']};}function ee(_0x4b1d5b,_0x3502d3,_0x151f3c){const _0x13ff7d=_0x361ff7;var _0x17a31a,_0x1f24dc;if(((_0x1f24dc=(_0x17a31a=_0x4b1d5b==null?void 0x0:_0x4b1d5b['replies'])==null?void 0x0:_0x17a31a[_0x13ff7d(0x11d)])!=null?_0x1f24dc:0x0)>0x0){const _0x33940f=(_0x219e26,_0x1c170f)=>({'id':_0x219e26[_0x13ff7d(0x17c)],'threadId':_0x219e26[_0x13ff7d(0x145)],'dT':D(_0x219e26[_0x13ff7d(0x138)]),'personId':_0x219e26[_0x13ff7d(0x146)],'resolved':_0x4b1d5b['solved']===I[_0x13ff7d(0x12e)],'unitId':_0x3502d3,'subUnitId':_0x151f3c,'text':JSON[_0x13ff7d(0x177)](_0x219e26['content']),'parentId':_0x1c170f}),_0x3dbeb8=_0x33940f(_0x4b1d5b[_0x13ff7d(0x131)][0x0]);return{..._0x3dbeb8,'children':_0x4b1d5b[_0x13ff7d(0x131)][_0x13ff7d(0x129)](0x1)['map'](_0xcaab3e=>_0x33940f(_0xcaab3e,_0x3dbeb8['id']))};}return null;}let f=class{constructor(_0x36b86b,_0x59304f,_0x102033,_0x55d464){const _0x5ae170=_0x361ff7;this['_httpService']=_0x36b86b,this[_0x5ae170(0x165)]=_0x59304f,this[_0x5ae170(0x151)]=_0x102033,this['_injector']=_0x55d464;}async['addComment'](_0x4f94bc){const _0x2c7dd2=_0x361ff7;var _0x2a0c30,_0x22d5e2;const {parentId:_0x520163,unitId:_0x5d1eb2,text:_0xfbc3db,threadId:_0x1ea3ab}=_0x4f94bc,_0xd6ae0c=(_0x22d5e2=(_0x2a0c30=_0xfbc3db[_0x2c7dd2(0x17e)])==null?void 0x0:_0x2a0c30[_0x2c7dd2(0x152)](_0x5e0a86=>_0x5e0a86[_0x2c7dd2(0x11e)]===_0x32fdec[_0x2c7dd2(0x16f)])[_0x2c7dd2(0x181)](_0x1eb04a=>_0x1eb04a[_0x2c7dd2(0x13e)]))!=null?_0x22d5e2:[],_0x1a3539=JSON[_0x2c7dd2(0x162)](_0xfbc3db),_0x573dac=(await this['_sessionService'][_0x2c7dd2(0x16a)](_0x5d1eb2))[_0x2c7dd2(0x133)]();if(_0x520163){const _0x440989={'memberId':_0x573dac,'unitId':_0x5d1eb2,'content':_0x1a3539,'mention':_0xd6ae0c,'threadId':_0x1ea3ab},_0x1d3075=(await this[_0x2c7dd2(0x11f)][_0x2c7dd2(0x15e)](_0x2c7dd2(0x169)+_0x5d1eb2+_0x2c7dd2(0x14b),{'body':_0x440989}))[_0x2c7dd2(0x119)][_0x2c7dd2(0x155)];return{..._0x4f94bc,'id':_0x1d3075['replyId'],'dT':_0x453ba2(+_0x1d3075[_0x2c7dd2(0x138)])[_0x2c7dd2(0x16c)](_0x2c7dd2(0x13a)),'personId':_0x1d3075['userId']};}else{const _0x4bb6ce={'memberId':_0x573dac,'unitId':_0x5d1eb2,'content':_0x1a3539,'mention':_0xd6ae0c},_0x175faa=await this[_0x2c7dd2(0x11f)][_0x2c7dd2(0x15e)](_0x2c7dd2(0x169)+_0x5d1eb2+_0x2c7dd2(0x12c),{'body':_0x4bb6ce});return X(_0x175faa[_0x2c7dd2(0x119)][_0x2c7dd2(0x14a)],_0x4f94bc);}}async['updateComment'](_0x205399){const _0x481f7b=_0x361ff7;var _0x41e766,_0x227547;const {text:_0x2d957f,unitId:_0x24ce9d}=_0x205399,_0x1dddaa=(_0x227547=(_0x41e766=_0x2d957f['customRanges'])==null?void 0x0:_0x41e766[_0x481f7b(0x152)](_0x523bdc=>_0x523bdc[_0x481f7b(0x11e)]===_0x32fdec['COMMENT'])[_0x481f7b(0x181)](_0x5e718e=>_0x5e718e['rangeId']))!=null?_0x227547:[],_0x4d5791=JSON[_0x481f7b(0x162)](_0x2d957f),_0x5aa590=_0x205399['threadId'],_0x3136b7=_0x205399['id'],_0x1eb828={'memberId':(await this[_0x481f7b(0x151)][_0x481f7b(0x16a)](_0x24ce9d))[_0x481f7b(0x133)](),'unitId':_0x24ce9d,'threadId':_0x5aa590,'mention':_0x1dddaa,'content':_0x4d5791,'replyId':_0x3136b7},_0x2d4a77=await this[_0x481f7b(0x11f)][_0x481f7b(0x15e)](_0x481f7b(0x169)+_0x24ce9d+_0x481f7b(0x15d),{'body':_0x1eb828});return!_0x2d4a77[_0x481f7b(0x119)][_0x481f7b(0x124)]||_0x2d4a77['body'][_0x481f7b(0x124)]['code']===0x1;}async[_0x361ff7(0x157)](_0x32702d){const _0x8b7020=_0x361ff7,{unitId:_0x2517f5}=_0x32702d,_0x3b236e=_0x32702d[_0x8b7020(0x145)],_0x297efb={'memberId':this[_0x8b7020(0x165)][_0x8b7020(0x17f)]()[_0x8b7020(0x148)],'unitId':_0x2517f5,'threadId':_0x3b236e,'solved':_0x32702d['resolved']?I['Solved']:I[_0x8b7020(0x15b)]},_0xfafc82=await this[_0x8b7020(0x11f)][_0x8b7020(0x15e)](_0x8b7020(0x169)+_0x2517f5+_0x8b7020(0x11a),{'body':_0x297efb});return!_0xfafc82[_0x8b7020(0x119)][_0x8b7020(0x124)]||_0xfafc82['body'][_0x8b7020(0x124)][_0x8b7020(0x159)]===0x1;}async[_0x361ff7(0x14e)](_0x188e6e,_0x3c74ec,_0x378f98,_0x34705b){const _0x24a3f9=_0x361ff7,_0x408ad2={'memberId':(await this[_0x24a3f9(0x151)]['requireSession'](_0x188e6e))[_0x24a3f9(0x133)](),'threadId':_0x378f98,'replyId':_0x34705b,'unitId':_0x188e6e},_0x4eb936=await this[_0x24a3f9(0x11f)][_0x24a3f9(0x15e)]('/universer-api/comment/unit/'+_0x188e6e+_0x24a3f9(0x150),{'body':_0x408ad2});return!_0x4eb936['body']['error']||_0x4eb936[_0x24a3f9(0x119)][_0x24a3f9(0x124)][_0x24a3f9(0x159)]===0x1;}async[_0x361ff7(0x17d)](_0x3c84ba,_0x354e92,_0x58b9f1){const _0x50371b=_0x361ff7,_0x5c3e62={'unitId':_0x3c84ba,'threadId':_0x58b9f1},_0x7f5e91=await this['_httpService'][_0x50371b(0x15e)](_0x50371b(0x169)+_0x3c84ba+_0x50371b(0x160),{'body':_0x5c3e62}),_0x204345=_0x58b9f1[_0x50371b(0x181)](_0x23e6aa=>ee(_0x7f5e91[_0x50371b(0x119)][_0x50371b(0x15f)][_0x23e6aa],_0x3c84ba,_0x354e92))[_0x50371b(0x152)](Boolean);return Object['values'](_0x7f5e91['body'][_0x50371b(0x11b)])[_0x50371b(0x136)](_0x2e7ccf=>{const _0x2486c8=_0x50371b;this['_userService'][_0x2486c8(0x130)](_0x2e7ccf);}),_0x204345;}['saveCommentToSnapshot'](_0x209869){const _0x193b09=_0x361ff7;return{'id':_0x209869['id'],'threadId':_0x209869[_0x193b09(0x145)],'ref':_0x209869[_0x193b09(0x132)]};}};f=Q([_(0x0,_0x4c9cd9(_0x13c39a)),_(0x1,_0x4c9cd9(_0x230923)),_(0x2,_0x4c9cd9(_0xed4b95)),_(0x3,_0x4c9cd9(_0x1592aa))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x162788,_0x3318da,_0x11107e,_0x4af0d8)=>{for(var _0x35984d=_0x4af0d8>0x1?void 0x0:_0x4af0d8?re(_0x3318da,_0x11107e):_0x3318da,_0x5085f8=_0x162788['length']-0x1,_0x9e599c;_0x5085f8>=0x0;_0x5085f8--)(_0x9e599c=_0x162788[_0x5085f8])&&(_0x35984d=_0x9e599c(_0x35984d)||_0x35984d);return _0x35984d;},N=(_0x49076c,_0x4333b2)=>(_0xab9dd3,_0x1b4a13)=>_0x4333b2(_0xab9dd3,_0x1b4a13,_0x49076c);let g=class extends _0xaf25f7{constructor(_0x1dca2e,_0x23297d){const _0x43b1e2=_0x361ff7;super(),this[_0x43b1e2(0x167)]=_0x1dca2e,this[_0x43b1e2(0x161)]=_0x23297d,this[_0x43b1e2(0x139)]();}[_0x361ff7(0x139)](){const _0x322152=_0x361ff7;this[_0x322152(0x167)][_0x322152(0x12f)]=this[_0x322152(0x161)],this['_threadCommentDataSourceService'][_0x322152(0x174)]=!0x1;}};g=te([N(0x0,_0x38d4a8),N(0x1,_0x4c9cd9(f))],g);var se=Object[_0x361ff7(0x156)],oe=Object[_0x361ff7(0x121)],ne=(_0xc6012a,_0x2e4070,_0xf4e055)=>_0x2e4070 in _0xc6012a?se(_0xc6012a,_0x2e4070,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf4e055}):_0xc6012a[_0x2e4070]=_0xf4e055,ie=(_0xf60cff,_0x19f739,_0x4b71c0,_0x46ad65)=>{const _0x1a8c32=_0x361ff7;for(var _0x442c0e=_0x46ad65>0x1?void 0x0:_0x46ad65?oe(_0x19f739,_0x4b71c0):_0x19f739,_0x950c48=_0xf60cff[_0x1a8c32(0x11d)]-0x1,_0x5485e2;_0x950c48>=0x0;_0x950c48--)(_0x5485e2=_0xf60cff[_0x950c48])&&(_0x442c0e=_0x5485e2(_0x442c0e)||_0x442c0e);return _0x442c0e;},w=(_0x48d74e,_0x332cbe)=>(_0x16fb5f,_0x2a157f)=>_0x332cbe(_0x16fb5f,_0x2a157f,_0x48d74e),$=(_0x2158cb,_0x58cdbc,_0x174bac)=>ne(_0x2158cb,typeof _0x58cdbc!=_0x361ff7(0x158)?_0x58cdbc+'':_0x58cdbc,_0x174bac);let b=class extends _0x375e34{constructor(_0x5d6040=M,_0x30b201,_0x161b3a){const _0x316b89=_0x361ff7;super(),this['_config']=_0x5d6040,this['_injector']=_0x30b201,this[_0x316b89(0x149)]=_0x161b3a;const {..._0x45947b}=_0x3bd94e({},M,this[_0x316b89(0x166)]);this['_configService'][_0x316b89(0x137)](z,_0x45947b);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x3ee509=>{const _0x1254ce=_0x2b3d;this[_0x1254ce(0x128)][_0x1254ce(0x14c)](_0x3ee509);});}[_0x361ff7(0x179)](){const _0x338fb9=_0x361ff7;this[_0x338fb9(0x128)]['get'](g),this[_0x338fb9(0x128)][_0x338fb9(0x176)](S);}};$(b,_0x361ff7(0x171),W),$(b,_0x361ff7(0x172),_0x5015d6[_0x361ff7(0x143)]),b=ie([_0x434b14(_0x4bca2b,_0x1f4157,_0x50fae2),w(0x1,_0x4c9cd9(_0x1592aa)),w(0x2,_0x2808c2)],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
|
+
const _0x361ff7=_0x2b3d;(function(_0x3b8dfd,_0x23b7d1){const _0x2726bb=_0x2b3d,_0x2a2d8a=_0x3b8dfd();while(!![]){try{const _0x3bc8a1=-parseInt(_0x2726bb(0x14f))/0x1+parseInt(_0x2726bb(0x11c))/0x2+parseInt(_0x2726bb(0x123))/0x3*(-parseInt(_0x2726bb(0x178))/0x4)+-parseInt(_0x2726bb(0x13d))/0x5+parseInt(_0x2726bb(0x144))/0x6+-parseInt(_0x2726bb(0x127))/0x7+parseInt(_0x2726bb(0x17a))/0x8*(parseInt(_0x2726bb(0x126))/0x9);if(_0x3bc8a1===_0x23b7d1)break;else _0x2a2d8a['push'](_0x2a2d8a['shift']());}catch(_0x16e457){_0x2a2d8a['push'](_0x2a2d8a['shift']());}}}(_0x1ab1,0x60da5));import{CommentService as _0x550980,CollaborationSessionService as _0xed4b95,UniverCollaborationClientPlugin as _0x1f4157}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x50fae2}from'@univerjs-pro/license';import{dayjs as _0x453ba2,UserManagerService as _0x230923,Inject as _0x4c9cd9,Injector as _0x1592aa,Disposable as _0xaf25f7,CustomRangeType as _0x32fdec,UniverInstanceType as _0x5015d6,DependentOn as _0x434b14,IConfigService as _0x2808c2,Plugin as _0x375e34,merge as _0x3bd94e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4bca2b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x51ac0f,IThreadCommentDataSourceService as _0x38d4a8}from'@univerjs/thread-comment';import{bufferTime as _0x2c3f39}from'rxjs';import{HTTPService as _0x13c39a}from'@univerjs/network';const W=_0x361ff7(0x15c);var I=(_0x43eb89=>(_0x43eb89[_0x43eb89[_0x361ff7(0x15b)]=0x0]=_0x361ff7(0x15b),_0x43eb89[_0x43eb89[_0x361ff7(0x12e)]=0x1]=_0x361ff7(0x12e),_0x43eb89[_0x43eb89[_0x361ff7(0x164)]=-0x1]=_0x361ff7(0x164),_0x43eb89))(I||{}),v=(_0x6d47e4=>(_0x6d47e4[_0x6d47e4['Unknown']=0x0]=_0x361ff7(0x175),_0x6d47e4[_0x6d47e4[_0x361ff7(0x13f)]=0x1]=_0x361ff7(0x13f),_0x6d47e4[_0x6d47e4[_0x361ff7(0x180)]=0x2]=_0x361ff7(0x180),_0x6d47e4[_0x6d47e4[_0x361ff7(0x16b)]=0x3]='Edit',_0x6d47e4[_0x6d47e4[_0x361ff7(0x17b)]=0x4]='Delete',_0x6d47e4[_0x6d47e4[_0x361ff7(0x12d)]=0x5]=_0x361ff7(0x12d),_0x6d47e4[_0x6d47e4[_0x361ff7(0x164)]=-0x1]=_0x361ff7(0x164),_0x6d47e4))(v||{});const D=_0x2ad013=>_0x453ba2(new Date(+_0x2ad013))[_0x361ff7(0x16c)](_0x361ff7(0x13a)),B=async(_0x1bc43e,_0x333760)=>{const _0x37d30e=_0x361ff7,_0x4799ba=_0x1bc43e[_0x37d30e(0x176)](_0x230923),_0x5acad5=_0x1bc43e['get'](_0x13c39a);_0x333760[_0x37d30e(0x136)](_0x25ad47=>{const _0x3ec9dc=_0x37d30e;_0x4799ba[_0x3ec9dc(0x16e)](_0x25ad47)&&_0x333760[_0x3ec9dc(0x13b)](_0x25ad47);}),_0x333760[_0x37d30e(0x125)]&&(await _0x5acad5[_0x37d30e(0x176)](_0x37d30e(0x12b),{'params':{'userIDs':[..._0x333760]}}))[_0x37d30e(0x119)]['users'][_0x37d30e(0x136)](_0xdb7fd5=>{_0xdb7fd5&&_0x4799ba['addUser'](_0xdb7fd5);});};var K=Object[_0x361ff7(0x121)],V=(_0xa4a34c,_0x75f4ba,_0x12ff7f,_0x670346)=>{const _0x3a553c=_0x361ff7;for(var _0x40cfa9=_0x670346>0x1?void 0x0:_0x670346?K(_0x75f4ba,_0x12ff7f):_0x75f4ba,_0x2dd1f0=_0xa4a34c[_0x3a553c(0x11d)]-0x1,_0x1d9674;_0x2dd1f0>=0x0;_0x2dd1f0--)(_0x1d9674=_0xa4a34c[_0x2dd1f0])&&(_0x40cfa9=_0x1d9674(_0x40cfa9)||_0x40cfa9);return _0x40cfa9;},p=(_0x17e6e4,_0xe04232)=>(_0x3b1e38,_0x2bf4bf)=>_0xe04232(_0x3b1e38,_0x2bf4bf,_0x17e6e4);function _0x2b3d(_0x38e0cb,_0x3d6b74){const _0x1ab131=_0x1ab1();return _0x2b3d=function(_0x2b3d77,_0x2ed7e1){_0x2b3d77=_0x2b3d77-0x119;let _0x3962fd=_0x1ab131[_0x2b3d77];return _0x3962fd;},_0x2b3d(_0x38e0cb,_0x3d6b74);}let S=class extends _0xaf25f7{constructor(_0x32a74d,_0x4cbcd9,_0x5edc86,_0x298108){const _0x37a336=_0x361ff7;super(),this[_0x37a336(0x122)]=_0x32a74d,this[_0x37a336(0x147)]=_0x4cbcd9,this[_0x37a336(0x165)]=_0x5edc86,this[_0x37a336(0x128)]=_0x298108,this[_0x37a336(0x168)](),this[_0x37a336(0x140)]();}[_0x361ff7(0x140)](){const _0x104cbb=_0x361ff7;this[_0x104cbb(0x120)](this[_0x104cbb(0x147)][_0x104cbb(0x15a)][_0x104cbb(0x14d)](_0x2c3f39(0x10))['subscribe'](_0xb9ee1f=>{const _0x3c7d97=_0x104cbb,_0x29ed2e=new Set();_0xb9ee1f[_0x3c7d97(0x136)](_0x53b36e=>{const _0x38de08=_0x3c7d97;switch(_0x53b36e[_0x38de08(0x172)]){case _0x38de08(0x14c):{const _0x9c8192=_0x53b36e[_0x38de08(0x16d)]['personId'];_0x29ed2e[_0x38de08(0x14c)](_0x9c8192);break;}}}),B(this[_0x3c7d97(0x128)],_0x29ed2e);}));}['_init'](){const _0x51ac85=_0x361ff7;this[_0x51ac85(0x120)](this[_0x51ac85(0x122)][_0x51ac85(0x15a)][_0x51ac85(0x163)](async _0x17de44=>{const _0x358862=_0x51ac85;var _0x1a5e8a,_0xb4a3a9,_0x333f70,_0x538181;const _0x36a951=(_0x1a5e8a=this[_0x358862(0x147)]['getUnit'](_0x17de44[_0x358862(0x142)])[_0x358862(0x170)](_0x451c5e=>_0x451c5e['threadId']===_0x17de44['threadId']))==null?void 0x0:_0x1a5e8a['root'];if(!_0x36a951)return;const {unitId:_0x4004bd,subUnitId:_0x17d3bf}=_0x36a951;switch(_0x17de44[_0x358862(0x12a)]&&this[_0x358862(0x165)][_0x358862(0x130)](_0x17de44[_0x358862(0x12a)]),_0x17de44['type']){case v['Add']:break;case v[_0x358862(0x180)]:{this[_0x358862(0x147)][_0x358862(0x153)](_0x4004bd,_0x17d3bf,{'unitId':_0x4004bd,'subUnitId':_0x17d3bf,'ref':'','id':_0x17de44[_0x358862(0x17c)],'dT':D(+_0x17de44[_0x358862(0x138)]),'threadId':_0x17de44['threadId'],'personId':(_0x333f70=(_0xb4a3a9=_0x17de44[_0x358862(0x12a)])==null?void 0x0:_0xb4a3a9['userID'])!=null?_0x333f70:_0x17de44[_0x358862(0x146)],'text':JSON[_0x358862(0x177)](_0x17de44[_0x358862(0x135)]),'parentId':_0x36a951['id']});break;}case v[_0x358862(0x17b)]:{const _0x594598=this[_0x358862(0x147)]['getComment'](_0x4004bd,_0x17d3bf,_0x17de44['replyId']);_0x594598&&_0x594598[_0x358862(0x13c)]&&this[_0x358862(0x147)][_0x358862(0x14e)](_0x4004bd,_0x17d3bf,_0x17de44[_0x358862(0x17c)]);break;}case v[_0x358862(0x16b)]:{this['_threadCommentModel']['updateComment'](_0x4004bd,_0x17d3bf,{'commentId':_0x17de44[_0x358862(0x17c)],'text':JSON[_0x358862(0x177)](_0x17de44['content'])});break;}case v[_0x358862(0x12d)]:{const _0x5adef5=(_0x538181=this[_0x358862(0x147)][_0x358862(0x141)](_0x17de44['unitId'])[_0x358862(0x170)](_0x523fc8=>_0x523fc8[_0x358862(0x145)]===_0x17de44[_0x358862(0x145)]))==null?void 0x0:_0x538181[_0x358862(0x134)];_0x5adef5&&this[_0x358862(0x147)]['resolveComment'](_0x4004bd,_0x17d3bf,_0x5adef5['id'],_0x17de44[_0x358862(0x173)]===I[_0x358862(0x12e)]);break;}}}));}};S=V([p(0x0,_0x4c9cd9(_0x550980)),p(0x1,_0x4c9cd9(_0x51ac0f)),p(0x2,_0x4c9cd9(_0x230923)),p(0x3,_0x4c9cd9(_0x1592aa))],S);const z=_0x361ff7(0x154),M={};function _0x1ab1(){const _0xb90c2c=['Solved','dataSource','addUser','replies','ref','getMemberID','root','content','forEach','setConfig','createTimestamp','_initDataSource','YYYY/MM/DD\x20HH:mm','delete','parentId','1861005ZxZnHv','rangeId','Add','_initUserSync','getUnit','unitId','UNIVER_UNKNOWN','2834496hEMLOf','threadId','userId','_threadCommentModel','userID','_configService','comment','/reply','add','pipe','deleteComment','85830ovYLdY','/delete','_sessionService','filter','addComment','thread-comment-data-source.config','reply','defineProperty','resolveComment','symbol','code','commentUpdate$','OpenOrReOpen','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/edit','post','comments','/list','_threadCommentDataSource','stringify','subscribe','UNRECOGNIZED','_userService','_config','_threadCommentDataSourceService','_init','/universer-api/comment/unit/','requireSession','Edit','format','payload','getUser','COMMENT','find','pluginName','type','solved','syncUpdateMutationToColla','Unknown','get','parse','4UTFVrR','onReady','71048JiKkRL','Delete','replyId','listComments','customRanges','getCurrentUser','Reply','map','body','/solved','users','1368642uIDPiw','length','rangeType','_httpService','disposeWithMe','getOwnPropertyDescriptor','_commentService','987741EYoUbe','error','size','351RRFTME','2233763tTHEqj','_injector','slice','user','/universer-api/user/list','/add','Solve'];_0x1ab1=function(){return _0xb90c2c;};return _0x1ab1();}var k=Object[_0x361ff7(0x121)],Q=(_0x1ff86c,_0xb0fb5f,_0x169f2a,_0x24bf4b)=>{for(var _0x18079d=_0x24bf4b>0x1?void 0x0:_0x24bf4b?k(_0xb0fb5f,_0x169f2a):_0xb0fb5f,_0x3e9778=_0x1ff86c['length']-0x1,_0x49cef4;_0x3e9778>=0x0;_0x3e9778--)(_0x49cef4=_0x1ff86c[_0x3e9778])&&(_0x18079d=_0x49cef4(_0x18079d)||_0x18079d);return _0x18079d;},_=(_0x596ad6,_0x449f02)=>(_0x310cd7,_0x4cf512)=>_0x449f02(_0x310cd7,_0x4cf512,_0x596ad6);function X(_0x598a7f,_0x3e3b3c){const _0x60820d=_0x361ff7,_0x21b693=_0x598a7f[_0x60820d(0x131)][0x0];return{..._0x3e3b3c,'id':_0x21b693[_0x60820d(0x17c)],'resolved':_0x598a7f[_0x60820d(0x173)]===0x1,'dT':D(_0x21b693[_0x60820d(0x138)]),'personId':_0x21b693[_0x60820d(0x146)],'threadId':_0x21b693['threadId']};}function ee(_0x4b1d5b,_0x3502d3,_0x151f3c){const _0x13ff7d=_0x361ff7;var _0x17a31a,_0x1f24dc;if(((_0x1f24dc=(_0x17a31a=_0x4b1d5b==null?void 0x0:_0x4b1d5b['replies'])==null?void 0x0:_0x17a31a[_0x13ff7d(0x11d)])!=null?_0x1f24dc:0x0)>0x0){const _0x33940f=(_0x219e26,_0x1c170f)=>({'id':_0x219e26[_0x13ff7d(0x17c)],'threadId':_0x219e26[_0x13ff7d(0x145)],'dT':D(_0x219e26[_0x13ff7d(0x138)]),'personId':_0x219e26[_0x13ff7d(0x146)],'resolved':_0x4b1d5b['solved']===I[_0x13ff7d(0x12e)],'unitId':_0x3502d3,'subUnitId':_0x151f3c,'text':JSON[_0x13ff7d(0x177)](_0x219e26['content']),'parentId':_0x1c170f}),_0x3dbeb8=_0x33940f(_0x4b1d5b[_0x13ff7d(0x131)][0x0]);return{..._0x3dbeb8,'children':_0x4b1d5b[_0x13ff7d(0x131)][_0x13ff7d(0x129)](0x1)['map'](_0xcaab3e=>_0x33940f(_0xcaab3e,_0x3dbeb8['id']))};}return null;}let f=class{constructor(_0x36b86b,_0x59304f,_0x102033,_0x55d464){const _0x5ae170=_0x361ff7;this['_httpService']=_0x36b86b,this[_0x5ae170(0x165)]=_0x59304f,this[_0x5ae170(0x151)]=_0x102033,this['_injector']=_0x55d464;}async['addComment'](_0x4f94bc){const _0x2c7dd2=_0x361ff7;var _0x2a0c30,_0x22d5e2;const {parentId:_0x520163,unitId:_0x5d1eb2,text:_0xfbc3db,threadId:_0x1ea3ab}=_0x4f94bc,_0xd6ae0c=(_0x22d5e2=(_0x2a0c30=_0xfbc3db[_0x2c7dd2(0x17e)])==null?void 0x0:_0x2a0c30[_0x2c7dd2(0x152)](_0x5e0a86=>_0x5e0a86[_0x2c7dd2(0x11e)]===_0x32fdec[_0x2c7dd2(0x16f)])[_0x2c7dd2(0x181)](_0x1eb04a=>_0x1eb04a[_0x2c7dd2(0x13e)]))!=null?_0x22d5e2:[],_0x1a3539=JSON[_0x2c7dd2(0x162)](_0xfbc3db),_0x573dac=(await this['_sessionService'][_0x2c7dd2(0x16a)](_0x5d1eb2))[_0x2c7dd2(0x133)]();if(_0x520163){const _0x440989={'memberId':_0x573dac,'unitId':_0x5d1eb2,'content':_0x1a3539,'mention':_0xd6ae0c,'threadId':_0x1ea3ab},_0x1d3075=(await this[_0x2c7dd2(0x11f)][_0x2c7dd2(0x15e)](_0x2c7dd2(0x169)+_0x5d1eb2+_0x2c7dd2(0x14b),{'body':_0x440989}))[_0x2c7dd2(0x119)][_0x2c7dd2(0x155)];return{..._0x4f94bc,'id':_0x1d3075['replyId'],'dT':_0x453ba2(+_0x1d3075[_0x2c7dd2(0x138)])[_0x2c7dd2(0x16c)](_0x2c7dd2(0x13a)),'personId':_0x1d3075['userId']};}else{const _0x4bb6ce={'memberId':_0x573dac,'unitId':_0x5d1eb2,'content':_0x1a3539,'mention':_0xd6ae0c},_0x175faa=await this[_0x2c7dd2(0x11f)][_0x2c7dd2(0x15e)](_0x2c7dd2(0x169)+_0x5d1eb2+_0x2c7dd2(0x12c),{'body':_0x4bb6ce});return X(_0x175faa[_0x2c7dd2(0x119)][_0x2c7dd2(0x14a)],_0x4f94bc);}}async['updateComment'](_0x205399){const _0x481f7b=_0x361ff7;var _0x41e766,_0x227547;const {text:_0x2d957f,unitId:_0x24ce9d}=_0x205399,_0x1dddaa=(_0x227547=(_0x41e766=_0x2d957f['customRanges'])==null?void 0x0:_0x41e766[_0x481f7b(0x152)](_0x523bdc=>_0x523bdc[_0x481f7b(0x11e)]===_0x32fdec['COMMENT'])[_0x481f7b(0x181)](_0x5e718e=>_0x5e718e['rangeId']))!=null?_0x227547:[],_0x4d5791=JSON[_0x481f7b(0x162)](_0x2d957f),_0x5aa590=_0x205399['threadId'],_0x3136b7=_0x205399['id'],_0x1eb828={'memberId':(await this[_0x481f7b(0x151)][_0x481f7b(0x16a)](_0x24ce9d))[_0x481f7b(0x133)](),'unitId':_0x24ce9d,'threadId':_0x5aa590,'mention':_0x1dddaa,'content':_0x4d5791,'replyId':_0x3136b7},_0x2d4a77=await this[_0x481f7b(0x11f)][_0x481f7b(0x15e)](_0x481f7b(0x169)+_0x24ce9d+_0x481f7b(0x15d),{'body':_0x1eb828});return!_0x2d4a77[_0x481f7b(0x119)][_0x481f7b(0x124)]||_0x2d4a77['body'][_0x481f7b(0x124)]['code']===0x1;}async[_0x361ff7(0x157)](_0x32702d){const _0x8b7020=_0x361ff7,{unitId:_0x2517f5}=_0x32702d,_0x3b236e=_0x32702d[_0x8b7020(0x145)],_0x297efb={'memberId':this[_0x8b7020(0x165)][_0x8b7020(0x17f)]()[_0x8b7020(0x148)],'unitId':_0x2517f5,'threadId':_0x3b236e,'solved':_0x32702d['resolved']?I['Solved']:I[_0x8b7020(0x15b)]},_0xfafc82=await this[_0x8b7020(0x11f)][_0x8b7020(0x15e)](_0x8b7020(0x169)+_0x2517f5+_0x8b7020(0x11a),{'body':_0x297efb});return!_0xfafc82[_0x8b7020(0x119)][_0x8b7020(0x124)]||_0xfafc82['body'][_0x8b7020(0x124)][_0x8b7020(0x159)]===0x1;}async[_0x361ff7(0x14e)](_0x188e6e,_0x3c74ec,_0x378f98,_0x34705b){const _0x24a3f9=_0x361ff7,_0x408ad2={'memberId':(await this[_0x24a3f9(0x151)]['requireSession'](_0x188e6e))[_0x24a3f9(0x133)](),'threadId':_0x378f98,'replyId':_0x34705b,'unitId':_0x188e6e},_0x4eb936=await this[_0x24a3f9(0x11f)][_0x24a3f9(0x15e)]('/universer-api/comment/unit/'+_0x188e6e+_0x24a3f9(0x150),{'body':_0x408ad2});return!_0x4eb936['body']['error']||_0x4eb936[_0x24a3f9(0x119)][_0x24a3f9(0x124)][_0x24a3f9(0x159)]===0x1;}async[_0x361ff7(0x17d)](_0x3c84ba,_0x354e92,_0x58b9f1){const _0x50371b=_0x361ff7,_0x5c3e62={'unitId':_0x3c84ba,'threadId':_0x58b9f1},_0x7f5e91=await this['_httpService'][_0x50371b(0x15e)](_0x50371b(0x169)+_0x3c84ba+_0x50371b(0x160),{'body':_0x5c3e62}),_0x204345=_0x58b9f1[_0x50371b(0x181)](_0x23e6aa=>ee(_0x7f5e91[_0x50371b(0x119)][_0x50371b(0x15f)][_0x23e6aa],_0x3c84ba,_0x354e92))[_0x50371b(0x152)](Boolean);return Object['values'](_0x7f5e91['body'][_0x50371b(0x11b)])[_0x50371b(0x136)](_0x2e7ccf=>{const _0x2486c8=_0x50371b;this['_userService'][_0x2486c8(0x130)](_0x2e7ccf);}),_0x204345;}['saveCommentToSnapshot'](_0x209869){const _0x193b09=_0x361ff7;return{'id':_0x209869['id'],'threadId':_0x209869[_0x193b09(0x145)],'ref':_0x209869[_0x193b09(0x132)]};}};f=Q([_(0x0,_0x4c9cd9(_0x13c39a)),_(0x1,_0x4c9cd9(_0x230923)),_(0x2,_0x4c9cd9(_0xed4b95)),_(0x3,_0x4c9cd9(_0x1592aa))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x162788,_0x3318da,_0x11107e,_0x4af0d8)=>{for(var _0x35984d=_0x4af0d8>0x1?void 0x0:_0x4af0d8?re(_0x3318da,_0x11107e):_0x3318da,_0x5085f8=_0x162788['length']-0x1,_0x9e599c;_0x5085f8>=0x0;_0x5085f8--)(_0x9e599c=_0x162788[_0x5085f8])&&(_0x35984d=_0x9e599c(_0x35984d)||_0x35984d);return _0x35984d;},N=(_0x49076c,_0x4333b2)=>(_0xab9dd3,_0x1b4a13)=>_0x4333b2(_0xab9dd3,_0x1b4a13,_0x49076c);let g=class extends _0xaf25f7{constructor(_0x1dca2e,_0x23297d){const _0x43b1e2=_0x361ff7;super(),this[_0x43b1e2(0x167)]=_0x1dca2e,this[_0x43b1e2(0x161)]=_0x23297d,this[_0x43b1e2(0x139)]();}[_0x361ff7(0x139)](){const _0x322152=_0x361ff7;this[_0x322152(0x167)][_0x322152(0x12f)]=this[_0x322152(0x161)],this['_threadCommentDataSourceService'][_0x322152(0x174)]=!0x1;}};g=te([N(0x0,_0x38d4a8),N(0x1,_0x4c9cd9(f))],g);var se=Object[_0x361ff7(0x156)],oe=Object[_0x361ff7(0x121)],ne=(_0xc6012a,_0x2e4070,_0xf4e055)=>_0x2e4070 in _0xc6012a?se(_0xc6012a,_0x2e4070,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf4e055}):_0xc6012a[_0x2e4070]=_0xf4e055,ie=(_0xf60cff,_0x19f739,_0x4b71c0,_0x46ad65)=>{const _0x1a8c32=_0x361ff7;for(var _0x442c0e=_0x46ad65>0x1?void 0x0:_0x46ad65?oe(_0x19f739,_0x4b71c0):_0x19f739,_0x950c48=_0xf60cff[_0x1a8c32(0x11d)]-0x1,_0x5485e2;_0x950c48>=0x0;_0x950c48--)(_0x5485e2=_0xf60cff[_0x950c48])&&(_0x442c0e=_0x5485e2(_0x442c0e)||_0x442c0e);return _0x442c0e;},w=(_0x48d74e,_0x332cbe)=>(_0x16fb5f,_0x2a157f)=>_0x332cbe(_0x16fb5f,_0x2a157f,_0x48d74e),$=(_0x2158cb,_0x58cdbc,_0x174bac)=>ne(_0x2158cb,typeof _0x58cdbc!=_0x361ff7(0x158)?_0x58cdbc+'':_0x58cdbc,_0x174bac);let b=class extends _0x375e34{constructor(_0x5d6040=M,_0x30b201,_0x161b3a){const _0x316b89=_0x361ff7;super(),this['_config']=_0x5d6040,this['_injector']=_0x30b201,this[_0x316b89(0x149)]=_0x161b3a;const {..._0x45947b}=_0x3bd94e({},M,this[_0x316b89(0x166)]);this['_configService'][_0x316b89(0x137)](z,_0x45947b);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x3ee509=>{const _0x1254ce=_0x2b3d;this[_0x1254ce(0x128)][_0x1254ce(0x14c)](_0x3ee509);});}[_0x361ff7(0x179)](){const _0x338fb9=_0x361ff7;this[_0x338fb9(0x128)]['get'](g),this[_0x338fb9(0x128)][_0x338fb9(0x176)](S);}};$(b,_0x361ff7(0x171),W),$(b,_0x361ff7(0x172),_0x5015d6[_0x361ff7(0x143)]),b=ie([_0x434b14(_0x4bca2b,_0x1f4157,_0x50fae2),w(0x1,_0x4c9cd9(_0x1592aa)),w(0x2,_0x2808c2)],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 _0x2e59(){const _0x1de1a4=['_injector','root','649176CNfwrc','Reply','UniverCore','Add','disposeWithMe','UniverThreadCommentUIPlugin','_userService','64842Mregox','size','comment','IThreadCommentDataSourceService','1486405mAoIJo','Edit','length','1038bFfTrO','CustomRangeType','rangeType','deleteComment','Unknown','personId','IConfigService','/reply','type','get','DependentOn','dataSource','parse','UniverInstanceType','saveCommentToSnapshot','forEach','function','resolveComment','Inject','Injector','payload','add','solved','1361099ofHQnQ','requireSession','body','_initDataSource','getUser','getMemberID','10520700lcdeGo','@univerjs/thread-comment-ui','code','onStarting','defineProperty','ref','rangeId','merge','addUser','OpenOrReOpen','userID','483hPdBmy','/add','object','8206KhwXuy','getCurrentUser','_sessionService','customRanges','content','pluginName','_commentService','values','UniverCollaborationClientPlugin','/universer-api/user/list','135iaFBgH','_init','_threadCommentModel','UniverProCollaborationClient','exports','post','user','_threadCommentDataSource','@univerjs-pro/license','Solve','getUnit','UniverThreadCommentUi','replies','Delete','YYYY/MM/DD\x20HH:mm','UniverProLicense','_configService','dayjs','_initUserSync','@univerjs/network','CollaborationSessionService','COMMENT','/list','subscribe','UniverProThreadCommentDatasource','listComments','2568665ERSPmB','UserManagerService','/universer-api/comment/unit/','replyId','Module','filter','@univerjs/core','addComment','Solved','bufferTime','thread-comment-data-source.config','createTimestamp','reply','commentUpdate$','find','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','updateComment','_threadCommentDataSourceService','UniverNetwork','error','UNRECOGNIZED','HTTPService','/delete','UniverThreadCommentDataSourcePlugin','threadId','4wVfQFs','delete','resolved','toStringTag','_config','slice','getComment','_httpService','Disposable','format','comments','userId','rxjs','map','setConfig','@univerjs/thread-comment'];_0x2e59=function(){return _0x1de1a4;};return _0x2e59();}function _0x110d(_0x28f4bb,_0x1fc91d){const _0x2e59d5=_0x2e59();return _0x110d=function(_0x110d3e,_0x51545f){_0x110d3e=_0x110d3e-0x7e;let _0x577268=_0x2e59d5[_0x110d3e];return _0x577268;},_0x110d(_0x28f4bb,_0x1fc91d);}(function(_0x4612b1,_0x265f85){const _0xd80ef0=_0x110d,_0x1d66a7=_0x4612b1();while(!![]){try{const _0x1c27a4=-parseInt(_0xd80ef0(0x98))/0x1+parseInt(_0xd80ef0(0xac))/0x2*(parseInt(_0xd80ef0(0x81))/0x3)+parseInt(_0xd80ef0(0xea))/0x4*(-parseInt(_0xd80ef0(0x7e))/0x5)+-parseInt(_0xd80ef0(0x103))/0x6*(-parseInt(_0xd80ef0(0xa9))/0x7)+-parseInt(_0xd80ef0(0xfc))/0x8*(-parseInt(_0xd80ef0(0xb6))/0x9)+-parseInt(_0xd80ef0(0x9e))/0xa+parseInt(_0xd80ef0(0xd0))/0xb;if(_0x1c27a4===_0x265f85)break;else _0x1d66a7['push'](_0x1d66a7['shift']());}catch(_0x4e2af2){_0x1d66a7['push'](_0x1d66a7['shift']());}}}(_0x2e59,0xdd177),function(_0x576453,_0x3e43d2){const _0x5e04fb=_0x110d;typeof exports==_0x5e04fb(0xab)&&typeof module<'u'?_0x3e43d2(exports,require('@univerjs-pro/collaboration-client'),require(_0x5e04fb(0xbe)),require(_0x5e04fb(0xd6)),require(_0x5e04fb(0x9f)),require(_0x5e04fb(0xf9)),require('rxjs'),require(_0x5e04fb(0xc9))):typeof define==_0x5e04fb(0x91)&&define['amd']?define([_0x5e04fb(0xba),'@univerjs-pro/collaboration-client','@univerjs-pro/license',_0x5e04fb(0xd6),_0x5e04fb(0x9f),_0x5e04fb(0xf9),_0x5e04fb(0xf6),_0x5e04fb(0xc9)],_0x3e43d2):(_0x576453=typeof globalThis<'u'?globalThis:_0x576453||self,_0x3e43d2(_0x576453[_0x5e04fb(0xce)]={},_0x576453[_0x5e04fb(0xb9)],_0x576453[_0x5e04fb(0xc5)],_0x576453[_0x5e04fb(0xfe)],_0x576453[_0x5e04fb(0xc1)],_0x576453['UniverThreadComment'],_0x576453[_0x5e04fb(0xf6)],_0x576453[_0x5e04fb(0xe3)]));}(this,function(_0x46e8a4,_0x22466d,_0x3ab69a,_0x433b27,_0x2f04bb,_0x158d2c,_0x232b85,_0x314ea6){'use strict';const _0x1d4772=_0x110d;const _0x188ebf=_0x1d4772(0xdf);var _0x32d80a=(_0x4370f9=>(_0x4370f9[_0x4370f9[_0x1d4772(0xa7)]=0x0]=_0x1d4772(0xa7),_0x4370f9[_0x4370f9[_0x1d4772(0xd8)]=0x1]='Solved',_0x4370f9[_0x4370f9[_0x1d4772(0xe5)]=-0x1]=_0x1d4772(0xe5),_0x4370f9))(_0x32d80a||{}),_0x594ec7=(_0x189fcd=>(_0x189fcd[_0x189fcd[_0x1d4772(0x85)]=0x0]=_0x1d4772(0x85),_0x189fcd[_0x189fcd[_0x1d4772(0xff)]=0x1]=_0x1d4772(0xff),_0x189fcd[_0x189fcd[_0x1d4772(0xfd)]=0x2]='Reply',_0x189fcd[_0x189fcd[_0x1d4772(0x7f)]=0x3]=_0x1d4772(0x7f),_0x189fcd[_0x189fcd[_0x1d4772(0xc3)]=0x4]=_0x1d4772(0xc3),_0x189fcd[_0x189fcd[_0x1d4772(0xbf)]=0x5]='Solve',_0x189fcd[_0x189fcd[_0x1d4772(0xe5)]=-0x1]=_0x1d4772(0xe5),_0x189fcd))(_0x594ec7||{});const _0x3bc9ef=_0x58940e=>_0x433b27[_0x1d4772(0xc7)](new Date(+_0x58940e))[_0x1d4772(0xf3)](_0x1d4772(0xc4)),_0x3f4c98=async(_0x129496,_0x121628)=>{const _0x1eba46=_0x1d4772,_0xea4e69=_0x129496[_0x1eba46(0x8a)](_0x433b27[_0x1eba46(0xd1)]),_0x64eb58=_0x129496['get'](_0x314ea6[_0x1eba46(0xe6)]);_0x121628[_0x1eba46(0x90)](_0x506380=>{const _0x1b43f7=_0x1eba46;_0xea4e69[_0x1b43f7(0x9c)](_0x506380)&&_0x121628[_0x1b43f7(0xeb)](_0x506380);}),_0x121628[_0x1eba46(0x104)]&&(await _0x64eb58[_0x1eba46(0x8a)](_0x1eba46(0xb5),{'params':{'userIDs':[..._0x121628]}}))[_0x1eba46(0x9a)]['users']['forEach'](_0xf47aeb=>{_0xf47aeb&&_0xea4e69['addUser'](_0xf47aeb);});};var _0x1970e3=Object[_0x1d4772(0xe0)],_0x1dd895=(_0x412698,_0x59c071,_0x31151b,_0x4e6c33)=>{const _0x4e7587=_0x1d4772;for(var _0x4885dd=_0x4e6c33>0x1?void 0x0:_0x4e6c33?_0x1970e3(_0x59c071,_0x31151b):_0x59c071,_0x5b6d80=_0x412698[_0x4e7587(0x80)]-0x1,_0x3638c1;_0x5b6d80>=0x0;_0x5b6d80--)(_0x3638c1=_0x412698[_0x5b6d80])&&(_0x4885dd=_0x3638c1(_0x4885dd)||_0x4885dd);return _0x4885dd;},_0x2a846a=(_0x297f66,_0x56bb97)=>(_0x279d75,_0x4c87c3)=>_0x56bb97(_0x279d75,_0x4c87c3,_0x297f66);let _0x1ef2cb=class extends _0x433b27['Disposable']{constructor(_0x216cd8,_0x2c6626,_0x235a97,_0x253fc8){const _0xd822fc=_0x1d4772;super(),this['_commentService']=_0x216cd8,this[_0xd822fc(0xb8)]=_0x2c6626,this[_0xd822fc(0x102)]=_0x235a97,this[_0xd822fc(0xfa)]=_0x253fc8,this['_init'](),this['_initUserSync']();}[_0x1d4772(0xc8)](){const _0x43f72=_0x1d4772;this[_0x43f72(0x100)](this[_0x43f72(0xb8)][_0x43f72(0xdd)]['pipe'](_0x232b85[_0x43f72(0xd9)](0x10))[_0x43f72(0xcd)](_0x1aed4a=>{const _0x146c87=_0x43f72,_0x315fe1=new Set();_0x1aed4a[_0x146c87(0x90)](_0x36295d=>{const _0x47c168=_0x146c87;switch(_0x36295d[_0x47c168(0x89)]){case _0x47c168(0x96):{const _0x48b8d0=_0x36295d[_0x47c168(0x95)][_0x47c168(0x86)];_0x315fe1['add'](_0x48b8d0);break;}}}),_0x3f4c98(this[_0x146c87(0xfa)],_0x315fe1);}));}[_0x1d4772(0xb7)](){const _0x2dac06=_0x1d4772;this[_0x2dac06(0x100)](this[_0x2dac06(0xb2)]['commentUpdate$'][_0x2dac06(0xcd)](async _0x1151f5=>{const _0x153595=_0x2dac06;var _0x4b6419,_0x5b2d95,_0x538bcc,_0x18b0dd;const _0x1a262d=(_0x4b6419=this[_0x153595(0xb8)][_0x153595(0xc0)](_0x1151f5['unitId'])[_0x153595(0xde)](_0x193184=>_0x193184['threadId']===_0x1151f5[_0x153595(0xe9)]))==null?void 0x0:_0x4b6419[_0x153595(0xfb)];if(!_0x1a262d)return;const {unitId:_0x3e4abb,subUnitId:_0x38eab4}=_0x1a262d;switch(_0x1151f5[_0x153595(0xbc)]&&this['_userService'][_0x153595(0xa6)](_0x1151f5[_0x153595(0xbc)]),_0x1151f5['type']){case _0x594ec7[_0x153595(0xff)]:break;case _0x594ec7['Reply']:{this[_0x153595(0xb8)][_0x153595(0xd7)](_0x3e4abb,_0x38eab4,{'unitId':_0x3e4abb,'subUnitId':_0x38eab4,'ref':'','id':_0x1151f5['replyId'],'dT':_0x3bc9ef(+_0x1151f5[_0x153595(0xdb)]),'threadId':_0x1151f5[_0x153595(0xe9)],'personId':(_0x538bcc=(_0x5b2d95=_0x1151f5[_0x153595(0xbc)])==null?void 0x0:_0x5b2d95[_0x153595(0xa8)])!=null?_0x538bcc:_0x1151f5[_0x153595(0xf5)],'text':JSON[_0x153595(0x8d)](_0x1151f5['content']),'parentId':_0x1a262d['id']});break;}case _0x594ec7[_0x153595(0xc3)]:{const _0x5d5dbd=this[_0x153595(0xb8)][_0x153595(0xf0)](_0x3e4abb,_0x38eab4,_0x1151f5[_0x153595(0xd3)]);_0x5d5dbd&&_0x5d5dbd['parentId']&&this[_0x153595(0xb8)][_0x153595(0x84)](_0x3e4abb,_0x38eab4,_0x1151f5[_0x153595(0xd3)]);break;}case _0x594ec7['Edit']:{this['_threadCommentModel'][_0x153595(0xe1)](_0x3e4abb,_0x38eab4,{'commentId':_0x1151f5[_0x153595(0xd3)],'text':JSON['parse'](_0x1151f5[_0x153595(0xb0)])});break;}case _0x594ec7[_0x153595(0xbf)]:{const _0x2ce26d=(_0x18b0dd=this[_0x153595(0xb8)][_0x153595(0xc0)](_0x1151f5['unitId'])['find'](_0x986bb0=>_0x986bb0['threadId']===_0x1151f5[_0x153595(0xe9)]))==null?void 0x0:_0x18b0dd[_0x153595(0xfb)];_0x2ce26d&&this['_threadCommentModel'][_0x153595(0x92)](_0x3e4abb,_0x38eab4,_0x2ce26d['id'],_0x1151f5[_0x153595(0x97)]===_0x32d80a[_0x153595(0xd8)]);break;}}}));}};_0x1ef2cb=_0x1dd895([_0x2a846a(0x0,_0x433b27[_0x1d4772(0x93)](_0x22466d['CommentService'])),_0x2a846a(0x1,_0x433b27[_0x1d4772(0x93)](_0x158d2c['ThreadCommentModel'])),_0x2a846a(0x2,_0x433b27[_0x1d4772(0x93)](_0x433b27[_0x1d4772(0xd1)])),_0x2a846a(0x3,_0x433b27[_0x1d4772(0x93)](_0x433b27[_0x1d4772(0x94)]))],_0x1ef2cb);const _0x14a81b=_0x1d4772(0xda),_0x4b4cba={};var _0x4b4807=Object['getOwnPropertyDescriptor'],_0x23d3f5=(_0x4cdfa0,_0x3b787c,_0x34cd98,_0xa161bf)=>{for(var _0x2aab18=_0xa161bf>0x1?void 0x0:_0xa161bf?_0x4b4807(_0x3b787c,_0x34cd98):_0x3b787c,_0x3fe52d=_0x4cdfa0['length']-0x1,_0x37b6c3;_0x3fe52d>=0x0;_0x3fe52d--)(_0x37b6c3=_0x4cdfa0[_0x3fe52d])&&(_0x2aab18=_0x37b6c3(_0x2aab18)||_0x2aab18);return _0x2aab18;},_0x3b7792=(_0x5ec054,_0x421886)=>(_0x3857e5,_0x272619)=>_0x421886(_0x3857e5,_0x272619,_0x5ec054);function _0x370122(_0x2796f1,_0xc3a9d3){const _0x889210=_0x1d4772,_0x11d7cb=_0x2796f1[_0x889210(0xc2)][0x0];return{..._0xc3a9d3,'id':_0x11d7cb[_0x889210(0xd3)],'resolved':_0x2796f1[_0x889210(0x97)]===0x1,'dT':_0x3bc9ef(_0x11d7cb[_0x889210(0xdb)]),'personId':_0x11d7cb[_0x889210(0xf5)],'threadId':_0x11d7cb['threadId']};}function _0x204357(_0x134154,_0x3d6b74,_0x245db1){const _0x32bb58=_0x1d4772;var _0x365ad6,_0x4a59ce;if(((_0x4a59ce=(_0x365ad6=_0x134154==null?void 0x0:_0x134154[_0x32bb58(0xc2)])==null?void 0x0:_0x365ad6[_0x32bb58(0x80)])!=null?_0x4a59ce:0x0)>0x0){const _0x2d57b6=(_0x17fa51,_0x4c5690)=>({'id':_0x17fa51[_0x32bb58(0xd3)],'threadId':_0x17fa51['threadId'],'dT':_0x3bc9ef(_0x17fa51[_0x32bb58(0xdb)]),'personId':_0x17fa51[_0x32bb58(0xf5)],'resolved':_0x134154[_0x32bb58(0x97)]===_0x32d80a[_0x32bb58(0xd8)],'unitId':_0x3d6b74,'subUnitId':_0x245db1,'text':JSON[_0x32bb58(0x8d)](_0x17fa51[_0x32bb58(0xb0)]),'parentId':_0x4c5690}),_0x569586=_0x2d57b6(_0x134154['replies'][0x0]);return{..._0x569586,'children':_0x134154[_0x32bb58(0xc2)][_0x32bb58(0xef)](0x1)[_0x32bb58(0xf7)](_0x179f63=>_0x2d57b6(_0x179f63,_0x569586['id']))};}return null;}let _0x410124=class{constructor(_0x4f68f2,_0x3497f4,_0xe48bb7,_0x24d40e){const _0x30e08c=_0x1d4772;this['_httpService']=_0x4f68f2,this[_0x30e08c(0x102)]=_0x3497f4,this['_sessionService']=_0xe48bb7,this[_0x30e08c(0xfa)]=_0x24d40e;}async[_0x1d4772(0xd7)](_0x23f0b0){const _0x548e51=_0x1d4772;var _0x8884a5,_0x272e40;const {parentId:_0x3f2ee6,unitId:_0x52620d,text:_0x56c212,threadId:_0x347eb4}=_0x23f0b0,_0xba724c=(_0x272e40=(_0x8884a5=_0x56c212[_0x548e51(0xaf)])==null?void 0x0:_0x8884a5[_0x548e51(0xd5)](_0x1e1776=>_0x1e1776[_0x548e51(0x83)]===_0x433b27[_0x548e51(0x82)][_0x548e51(0xcb)])[_0x548e51(0xf7)](_0x3fdea4=>_0x3fdea4[_0x548e51(0xa4)]))!=null?_0x272e40:[],_0x481077=JSON['stringify'](_0x56c212),_0x5b3059=(await this[_0x548e51(0xae)][_0x548e51(0x99)](_0x52620d))[_0x548e51(0x9d)]();if(_0x3f2ee6){const _0x39266b={'memberId':_0x5b3059,'unitId':_0x52620d,'content':_0x481077,'mention':_0xba724c,'threadId':_0x347eb4},_0x279f18=(await this[_0x548e51(0xf1)][_0x548e51(0xbb)](_0x548e51(0xd2)+_0x52620d+_0x548e51(0x88),{'body':_0x39266b}))[_0x548e51(0x9a)][_0x548e51(0xdc)];return{..._0x23f0b0,'id':_0x279f18[_0x548e51(0xd3)],'dT':_0x433b27[_0x548e51(0xc7)](+_0x279f18[_0x548e51(0xdb)])['format'](_0x548e51(0xc4)),'personId':_0x279f18[_0x548e51(0xf5)]};}else{const _0x6f0151={'memberId':_0x5b3059,'unitId':_0x52620d,'content':_0x481077,'mention':_0xba724c},_0x375194=await this[_0x548e51(0xf1)]['post']('/universer-api/comment/unit/'+_0x52620d+_0x548e51(0xaa),{'body':_0x6f0151});return _0x370122(_0x375194[_0x548e51(0x9a)][_0x548e51(0x105)],_0x23f0b0);}}async[_0x1d4772(0xe1)](_0x1548f0){const _0x20dc79=_0x1d4772;var _0x2b68d9,_0x59e52e;const {text:_0x53cc89,unitId:_0xfe669c}=_0x1548f0,_0xa0e11=(_0x59e52e=(_0x2b68d9=_0x53cc89['customRanges'])==null?void 0x0:_0x2b68d9[_0x20dc79(0xd5)](_0x9cfd72=>_0x9cfd72[_0x20dc79(0x83)]===_0x433b27[_0x20dc79(0x82)]['COMMENT'])[_0x20dc79(0xf7)](_0x5af48a=>_0x5af48a[_0x20dc79(0xa4)]))!=null?_0x59e52e:[],_0x1c52f3=JSON['stringify'](_0x53cc89),_0x4fd9ca=_0x1548f0['threadId'],_0xbd54b8=_0x1548f0['id'],_0x43fafd={'memberId':(await this['_sessionService'][_0x20dc79(0x99)](_0xfe669c))[_0x20dc79(0x9d)](),'unitId':_0xfe669c,'threadId':_0x4fd9ca,'mention':_0xa0e11,'content':_0x1c52f3,'replyId':_0xbd54b8},_0x141724=await this['_httpService'][_0x20dc79(0xbb)](_0x20dc79(0xd2)+_0xfe669c+'/edit',{'body':_0x43fafd});return!_0x141724[_0x20dc79(0x9a)][_0x20dc79(0xe4)]||_0x141724['body']['error']['code']===0x1;}async['resolveComment'](_0x273963){const _0x9acd07=_0x1d4772,{unitId:_0x4d1644}=_0x273963,_0x39cf0e=_0x273963['threadId'],_0x279e86={'memberId':this[_0x9acd07(0x102)][_0x9acd07(0xad)]()['userID'],'unitId':_0x4d1644,'threadId':_0x39cf0e,'solved':_0x273963[_0x9acd07(0xec)]?_0x32d80a[_0x9acd07(0xd8)]:_0x32d80a[_0x9acd07(0xa7)]},_0x49aeeb=await this[_0x9acd07(0xf1)][_0x9acd07(0xbb)](_0x9acd07(0xd2)+_0x4d1644+'/solved',{'body':_0x279e86});return!_0x49aeeb[_0x9acd07(0x9a)][_0x9acd07(0xe4)]||_0x49aeeb[_0x9acd07(0x9a)]['error'][_0x9acd07(0xa0)]===0x1;}async[_0x1d4772(0x84)](_0x3fe813,_0x429c98,_0x5c3b92,_0x2d093b){const _0xc5af5f=_0x1d4772,_0x1f1277={'memberId':(await this['_sessionService'][_0xc5af5f(0x99)](_0x3fe813))[_0xc5af5f(0x9d)](),'threadId':_0x5c3b92,'replyId':_0x2d093b,'unitId':_0x3fe813},_0x37b135=await this['_httpService'][_0xc5af5f(0xbb)](_0xc5af5f(0xd2)+_0x3fe813+_0xc5af5f(0xe7),{'body':_0x1f1277});return!_0x37b135[_0xc5af5f(0x9a)][_0xc5af5f(0xe4)]||_0x37b135[_0xc5af5f(0x9a)][_0xc5af5f(0xe4)]['code']===0x1;}async[_0x1d4772(0xcf)](_0x512f23,_0x34147d,_0x46d443){const _0x590bf0=_0x1d4772,_0x37d998={'unitId':_0x512f23,'threadId':_0x46d443},_0x55c93d=await this[_0x590bf0(0xf1)][_0x590bf0(0xbb)](_0x590bf0(0xd2)+_0x512f23+_0x590bf0(0xcc),{'body':_0x37d998}),_0x37eba3=_0x46d443[_0x590bf0(0xf7)](_0x32e9eb=>_0x204357(_0x55c93d[_0x590bf0(0x9a)][_0x590bf0(0xf4)][_0x32e9eb],_0x512f23,_0x34147d))[_0x590bf0(0xd5)](Boolean);return Object[_0x590bf0(0xb3)](_0x55c93d[_0x590bf0(0x9a)]['users'])[_0x590bf0(0x90)](_0x3f746b=>{const _0x360eab=_0x590bf0;this[_0x360eab(0x102)][_0x360eab(0xa6)](_0x3f746b);}),_0x37eba3;}[_0x1d4772(0x8f)](_0x1f2216){const _0x558f6f=_0x1d4772;return{'id':_0x1f2216['id'],'threadId':_0x1f2216[_0x558f6f(0xe9)],'ref':_0x1f2216[_0x558f6f(0xa3)]};}};_0x410124=_0x23d3f5([_0x3b7792(0x0,_0x433b27[_0x1d4772(0x93)](_0x314ea6['HTTPService'])),_0x3b7792(0x1,_0x433b27[_0x1d4772(0x93)](_0x433b27[_0x1d4772(0xd1)])),_0x3b7792(0x2,_0x433b27['Inject'](_0x22466d[_0x1d4772(0xca)])),_0x3b7792(0x3,_0x433b27['Inject'](_0x433b27[_0x1d4772(0x94)]))],_0x410124);var _0x50909f=Object['getOwnPropertyDescriptor'],_0x3088a7=(_0x3c0320,_0x4124cc,_0x6f197f,_0x4eb43f)=>{for(var _0x146d78=_0x4eb43f>0x1?void 0x0:_0x4eb43f?_0x50909f(_0x4124cc,_0x6f197f):_0x4124cc,_0x11d0bb=_0x3c0320['length']-0x1,_0x146b70;_0x11d0bb>=0x0;_0x11d0bb--)(_0x146b70=_0x3c0320[_0x11d0bb])&&(_0x146d78=_0x146b70(_0x146d78)||_0x146d78);return _0x146d78;},_0x11bb19=(_0x4875d7,_0x1fc6b0)=>(_0xada19e,_0x46ac86)=>_0x1fc6b0(_0xada19e,_0x46ac86,_0x4875d7);let _0x5b2df6=class extends _0x433b27[_0x1d4772(0xf2)]{constructor(_0x3fea78,_0x582fe6){const _0x11c099=_0x1d4772;super(),this[_0x11c099(0xe2)]=_0x3fea78,this[_0x11c099(0xbd)]=_0x582fe6,this[_0x11c099(0x9b)]();}[_0x1d4772(0x9b)](){const _0x47315e=_0x1d4772;this[_0x47315e(0xe2)][_0x47315e(0x8c)]=this[_0x47315e(0xbd)],this[_0x47315e(0xe2)]['syncUpdateMutationToColla']=!0x1;}};_0x5b2df6=_0x3088a7([_0x11bb19(0x0,_0x158d2c[_0x1d4772(0x106)]),_0x11bb19(0x1,_0x433b27[_0x1d4772(0x93)](_0x410124))],_0x5b2df6);var _0x3e8add=Object[_0x1d4772(0xa2)],_0x4d9646=Object[_0x1d4772(0xe0)],_0x181827=(_0x47ac88,_0x51f313,_0x228741)=>_0x51f313 in _0x47ac88?_0x3e8add(_0x47ac88,_0x51f313,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x228741}):_0x47ac88[_0x51f313]=_0x228741,_0x5600a8=(_0x3279c0,_0x56b366,_0x4fe542,_0xc9d5e4)=>{const _0x1833f2=_0x1d4772;for(var _0x4b4d61=_0xc9d5e4>0x1?void 0x0:_0xc9d5e4?_0x4d9646(_0x56b366,_0x4fe542):_0x56b366,_0x14a4b4=_0x3279c0[_0x1833f2(0x80)]-0x1,_0x42ba16;_0x14a4b4>=0x0;_0x14a4b4--)(_0x42ba16=_0x3279c0[_0x14a4b4])&&(_0x4b4d61=_0x42ba16(_0x4b4d61)||_0x4b4d61);return _0x4b4d61;},_0x365b26=(_0xd6324c,_0x24d3e7)=>(_0xc4fead,_0x2adba3)=>_0x24d3e7(_0xc4fead,_0x2adba3,_0xd6324c),_0x80cd08=(_0x5a1b5e,_0x5ae52a,_0x2b247a)=>_0x181827(_0x5a1b5e,typeof _0x5ae52a!='symbol'?_0x5ae52a+'':_0x5ae52a,_0x2b247a);_0x46e8a4[_0x1d4772(0xe8)]=class extends _0x433b27['Plugin']{constructor(_0x43f9e8=_0x4b4cba,_0x290b9f,_0x156280){const _0x263bdc=_0x1d4772;super(),this[_0x263bdc(0xee)]=_0x43f9e8,this['_injector']=_0x290b9f,this[_0x263bdc(0xc6)]=_0x156280;const {..._0x48c9d7}=_0x433b27[_0x263bdc(0xa5)]({},_0x4b4cba,this[_0x263bdc(0xee)]);this[_0x263bdc(0xc6)][_0x263bdc(0xf8)](_0x14a81b,_0x48c9d7);}[_0x1d4772(0xa1)](){const _0x17dca5=_0x1d4772;[[_0x410124],[_0x5b2df6],[_0x1ef2cb]][_0x17dca5(0x90)](_0x2cedcf=>{const _0x13359c=_0x17dca5;this[_0x13359c(0xfa)][_0x13359c(0x96)](_0x2cedcf);});}['onReady'](){const _0x166c23=_0x1d4772;this[_0x166c23(0xfa)][_0x166c23(0x8a)](_0x5b2df6),this[_0x166c23(0xfa)][_0x166c23(0x8a)](_0x1ef2cb);}},_0x80cd08(_0x46e8a4[_0x1d4772(0xe8)],_0x1d4772(0xb1),_0x188ebf),_0x80cd08(_0x46e8a4['UniverThreadCommentDataSourcePlugin'],_0x1d4772(0x89),_0x433b27[_0x1d4772(0x8e)]['UNIVER_UNKNOWN']),_0x46e8a4[_0x1d4772(0xe8)]=_0x5600a8([_0x433b27[_0x1d4772(0x8b)](_0x2f04bb[_0x1d4772(0x101)],_0x22466d[_0x1d4772(0xb4)],_0x3ab69a['UniverLicensePlugin']),_0x365b26(0x1,_0x433b27['Inject'](_0x433b27[_0x1d4772(0x94)])),_0x365b26(0x2,_0x433b27[_0x1d4772(0x87)])],_0x46e8a4[_0x1d4772(0xe8)]),Object[_0x1d4772(0xa2)](_0x46e8a4,Symbol[_0x1d4772(0xed)],{'value':_0x1d4772(0xd4)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.7.0
|
|
3
|
+
"version": "0.7.0",
|
|
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
|
|
49
|
-
"@univerjs-pro/license": "0.7.0
|
|
50
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.7.0",
|
|
49
|
+
"@univerjs-pro/license": "0.7.0",
|
|
50
|
+
"@univerjs/network": "0.7.0",
|
|
51
51
|
"@univerjs/protocol": "0.1.46-alpha.3",
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment": "0.7.0
|
|
54
|
-
"@univerjs/
|
|
52
|
+
"@univerjs/thread-comment-ui": "0.7.0",
|
|
53
|
+
"@univerjs/thread-comment": "0.7.0",
|
|
54
|
+
"@univerjs/core": "0.7.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|