@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505091607 → 0.7.0-nightly.202505111606
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 +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x30cd26=_0x1c7d;(function(_0x565df1,_0x149dd3){const _0x3b6e75=_0x1c7d,_0x50f536=_0x565df1();while(!![]){try{const _0x280626=-parseInt(_0x3b6e75(0x16e))/0x1+parseInt(_0x3b6e75(0x1ca))/0x2+-parseInt(_0x3b6e75(0x1c8))/0x3+-parseInt(_0x3b6e75(0x1bb))/0x4+parseInt(_0x3b6e75(0x1a7))/0x5*(-parseInt(_0x3b6e75(0x1af))/0x6)+parseInt(_0x3b6e75(0x187))/0x7*(parseInt(_0x3b6e75(0x16a))/0x8)+parseInt(_0x3b6e75(0x1cc))/0x9;if(_0x280626===_0x149dd3)break;else _0x50f536['push'](_0x50f536['shift']());}catch(_0x41e2ea){_0x50f536['push'](_0x50f536['shift']());}}}(_0x4690,0x6cf58));Object[_0x30cd26(0x1b8)](exports,Symbol[_0x30cd26(0x181)],{'value':_0x30cd26(0x199)});const b=require(_0x30cd26(0x1c2)),T=require(_0x30cd26(0x1cf)),c=require(_0x30cd26(0x1df)),j=require(_0x30cd26(0x179)),M=require(_0x30cd26(0x1c5)),w=require(_0x30cd26(0x18d)),P=require(_0x30cd26(0x17e)),U=_0x30cd26(0x1ac);var I=(_0x3237aa=>(_0x3237aa[_0x3237aa['OpenOrReOpen']=0x0]=_0x30cd26(0x1b1),_0x3237aa[_0x3237aa['Solved']=0x1]=_0x30cd26(0x171),_0x3237aa[_0x3237aa[_0x30cd26(0x1da)]=-0x1]='UNRECOGNIZED',_0x3237aa))(I||{}),v=(_0x196f45=>(_0x196f45[_0x196f45[_0x30cd26(0x188)]=0x0]=_0x30cd26(0x188),_0x196f45[_0x196f45[_0x30cd26(0x1d8)]=0x1]='Add',_0x196f45[_0x196f45['Reply']=0x2]=_0x30cd26(0x18c),_0x196f45[_0x196f45['Edit']=0x3]=_0x30cd26(0x1d7),_0x196f45[_0x196f45[_0x30cd26(0x1b3)]=0x4]=_0x30cd26(0x1b3),_0x196f45[_0x196f45[_0x30cd26(0x1be)]=0x5]='Solve',_0x196f45[_0x196f45[_0x30cd26(0x1da)]=-0x1]=_0x30cd26(0x1da),_0x196f45))(v||{});const f=_0x3365ca=>c[_0x30cd26(0x1c6)](new Date(+_0x3365ca))[_0x30cd26(0x1bd)](_0x30cd26(0x1c0)),R=async(_0x4c51b6,_0x59cfe2)=>{const _0x4d1a78=_0x30cd26,_0x2621ab=_0x4c51b6[_0x4d1a78(0x1a4)](c['UserManagerService']),_0x44b102=_0x4c51b6[_0x4d1a78(0x1a4)](P['HTTPService']);_0x59cfe2[_0x4d1a78(0x1d6)](_0x1e63ac=>{_0x2621ab['getUser'](_0x1e63ac)&&_0x59cfe2['delete'](_0x1e63ac);}),_0x59cfe2[_0x4d1a78(0x180)]&&(await _0x44b102[_0x4d1a78(0x1a4)](_0x4d1a78(0x19d),{'params':{'userIDs':[..._0x59cfe2]}}))[_0x4d1a78(0x19c)][_0x4d1a78(0x192)]['forEach'](_0x1326cf=>{const _0x2004ac=_0x4d1a78;_0x1326cf&&_0x2621ab[_0x2004ac(0x19e)](_0x1326cf);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x117d20,_0x3dcbe7,_0x1593d1,_0x299827)=>{const _0x347834=_0x30cd26;for(var _0xfaa55e=_0x299827>0x1?void 0x0:_0x299827?$(_0x3dcbe7,_0x1593d1):_0x3dcbe7,_0x57a01c=_0x117d20[_0x347834(0x161)]-0x1,_0x5b6449;_0x57a01c>=0x0;_0x57a01c--)(_0x5b6449=_0x117d20[_0x57a01c])&&(_0xfaa55e=_0x5b6449(_0xfaa55e)||_0xfaa55e);return _0xfaa55e;},S=(_0xd57901,_0x4766f6)=>(_0x13e635,_0x5c7e84)=>_0x4766f6(_0x13e635,_0x5c7e84,_0xd57901);function _0x1c7d(_0x12d405,_0x11aaf2){const _0x4690ef=_0x4690();return _0x1c7d=function(_0x1c7d58,_0x22c36c){_0x1c7d58=_0x1c7d58-0x160;let _0x3cc8e9=_0x4690ef[_0x1c7d58];return _0x3cc8e9;},_0x1c7d(_0x12d405,_0x11aaf2);}let p=class extends c[_0x30cd26(0x1a8)]{constructor(_0x26ae39,_0x13fe5f,_0x36356f,_0x28ce6b){const _0x56e983=_0x30cd26;super(),this[_0x56e983(0x1e0)]=_0x26ae39,this['_threadCommentModel']=_0x13fe5f,this['_userService']=_0x36356f,this[_0x56e983(0x18e)]=_0x28ce6b,this[_0x56e983(0x1c4)](),this[_0x56e983(0x1bf)]();}[_0x30cd26(0x1bf)](){const _0x2d1ff9=_0x30cd26;this[_0x2d1ff9(0x163)](this['_threadCommentModel'][_0x2d1ff9(0x1a0)][_0x2d1ff9(0x1b5)](w[_0x2d1ff9(0x1cd)](0x10))[_0x2d1ff9(0x183)](_0x49d741=>{const _0xe72ce0=_0x2d1ff9,_0x1d567c=new Set();_0x49d741[_0xe72ce0(0x1d6)](_0x596871=>{const _0x38a62d=_0xe72ce0;switch(_0x596871[_0x38a62d(0x189)]){case _0x38a62d(0x172):{const _0x4bda80=_0x596871[_0x38a62d(0x1e1)][_0x38a62d(0x16b)];_0x1d567c['add'](_0x4bda80);break;}}}),R(this[_0xe72ce0(0x18e)],_0x1d567c);}));}[_0x30cd26(0x1c4)](){const _0x13147a=_0x30cd26;this[_0x13147a(0x163)](this['_commentService'][_0x13147a(0x1a0)][_0x13147a(0x183)](async _0x5bf622=>{const _0x57ad11=_0x13147a;var _0xdc88d3,_0x1109fa,_0x4c415f,_0x5a2c22;const _0x5c7d4e=(_0xdc88d3=this[_0x57ad11(0x173)]['getUnit'](_0x5bf622[_0x57ad11(0x196)])['find'](_0x12f4c3=>_0x12f4c3['threadId']===_0x5bf622[_0x57ad11(0x170)]))==null?void 0x0:_0xdc88d3['root'];if(!_0x5c7d4e)return;const {unitId:_0x40655c,subUnitId:_0x55b96f}=_0x5c7d4e;switch(_0x5bf622[_0x57ad11(0x1d2)]&&this[_0x57ad11(0x1d1)]['addUser'](_0x5bf622['user']),_0x5bf622['type']){case v['Add']:break;case v[_0x57ad11(0x18c)]:{this[_0x57ad11(0x173)]['addComment'](_0x40655c,_0x55b96f,{'unitId':_0x40655c,'subUnitId':_0x55b96f,'ref':'','id':_0x5bf622[_0x57ad11(0x1b9)],'dT':f(+_0x5bf622['createTimestamp']),'threadId':_0x5bf622['threadId'],'personId':(_0x4c415f=(_0x1109fa=_0x5bf622[_0x57ad11(0x1d2)])==null?void 0x0:_0x1109fa['userID'])!=null?_0x4c415f:_0x5bf622[_0x57ad11(0x198)],'text':JSON[_0x57ad11(0x17a)](_0x5bf622[_0x57ad11(0x175)]),'parentId':_0x5c7d4e['id']});break;}case v['Delete']:{const _0x377e22=this[_0x57ad11(0x173)][_0x57ad11(0x197)](_0x40655c,_0x55b96f,_0x5bf622[_0x57ad11(0x1b9)]);_0x377e22&&_0x377e22[_0x57ad11(0x1dc)]&&this[_0x57ad11(0x173)][_0x57ad11(0x1aa)](_0x40655c,_0x55b96f,_0x5bf622[_0x57ad11(0x1b9)]);break;}case v[_0x57ad11(0x1d7)]:{this[_0x57ad11(0x173)][_0x57ad11(0x1bc)](_0x40655c,_0x55b96f,{'commentId':_0x5bf622[_0x57ad11(0x1b9)],'text':JSON[_0x57ad11(0x17a)](_0x5bf622[_0x57ad11(0x175)])});break;}case v[_0x57ad11(0x1be)]:{const _0x3057ff=(_0x5a2c22=this['_threadCommentModel'][_0x57ad11(0x1a2)](_0x5bf622['unitId'])[_0x57ad11(0x165)](_0x1b9840=>_0x1b9840['threadId']===_0x5bf622[_0x57ad11(0x170)]))==null?void 0x0:_0x5a2c22[_0x57ad11(0x1a6)];_0x3057ff&&this[_0x57ad11(0x173)][_0x57ad11(0x164)](_0x40655c,_0x55b96f,_0x3057ff['id'],_0x5bf622[_0x57ad11(0x1b2)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x30cd26(0x1a1)](b[_0x30cd26(0x166)])),S(0x1,c[_0x30cd26(0x1a1)](M[_0x30cd26(0x1c9)])),S(0x2,c[_0x30cd26(0x1a1)](c['UserManagerService'])),S(0x3,c[_0x30cd26(0x1a1)](c[_0x30cd26(0x185)]))],p);const q=_0x30cd26(0x1dd),D={};var A=Object[_0x30cd26(0x195)],x=(_0x6064ec,_0x5c2f2e,_0x431713,_0x1657b7)=>{const _0x212579=_0x30cd26;for(var _0x1a1c5e=_0x1657b7>0x1?void 0x0:_0x1657b7?A(_0x5c2f2e,_0x431713):_0x5c2f2e,_0x447df0=_0x6064ec[_0x212579(0x161)]-0x1,_0x6da1e;_0x447df0>=0x0;_0x447df0--)(_0x6da1e=_0x6064ec[_0x447df0])&&(_0x1a1c5e=_0x6da1e(_0x1a1c5e)||_0x1a1c5e);return _0x1a1c5e;},_=(_0xaf6d24,_0x145a71)=>(_0x5527f1,_0x512622)=>_0x145a71(_0x5527f1,_0x512622,_0xaf6d24);function Y(_0x2ea7bc,_0x47ecdf){const _0x188c24=_0x30cd26,_0x10ad6d=_0x2ea7bc[_0x188c24(0x169)][0x0];return{..._0x47ecdf,'id':_0x10ad6d[_0x188c24(0x1b9)],'resolved':_0x2ea7bc[_0x188c24(0x1b2)]===0x1,'dT':f(_0x10ad6d[_0x188c24(0x1b0)]),'personId':_0x10ad6d[_0x188c24(0x198)],'threadId':_0x10ad6d[_0x188c24(0x170)]};}function G(_0x2be311,_0x2335d6,_0x13d896){const _0x1c2166=_0x30cd26;var _0x4938d7,_0x54d7de;if(((_0x54d7de=(_0x4938d7=_0x2be311==null?void 0x0:_0x2be311['replies'])==null?void 0x0:_0x4938d7[_0x1c2166(0x161)])!=null?_0x54d7de:0x0)>0x0){const _0x1e1fec=(_0x2a8b19,_0x590405)=>({'id':_0x2a8b19['replyId'],'threadId':_0x2a8b19['threadId'],'dT':f(_0x2a8b19[_0x1c2166(0x1b0)]),'personId':_0x2a8b19[_0x1c2166(0x198)],'resolved':_0x2be311['solved']===I['Solved'],'unitId':_0x2335d6,'subUnitId':_0x13d896,'text':JSON[_0x1c2166(0x17a)](_0x2a8b19[_0x1c2166(0x175)]),'parentId':_0x590405}),_0x4036d0=_0x1e1fec(_0x2be311[_0x1c2166(0x169)][0x0]);return{..._0x4036d0,'children':_0x2be311['replies']['slice'](0x1)[_0x1c2166(0x19a)](_0x59b294=>_0x1e1fec(_0x59b294,_0x4036d0['id']))};}return null;}let g=class{constructor(_0x48dc46,_0x191903,_0x4da51c,_0x2b850a){const _0x12b89c=_0x30cd26;this['_httpService']=_0x48dc46,this[_0x12b89c(0x1d1)]=_0x191903,this[_0x12b89c(0x1a3)]=_0x4da51c,this[_0x12b89c(0x18e)]=_0x2b850a;}async['addComment'](_0x3a0fd8){const _0x44ca1b=_0x30cd26;var _0x349959,_0x2810ce;const {parentId:_0x51ec4d,unitId:_0x57aa42,text:_0x2438e2,threadId:_0x21e5e7}=_0x3a0fd8,_0x360023=(_0x2810ce=(_0x349959=_0x2438e2[_0x44ca1b(0x1ae)])==null?void 0x0:_0x349959[_0x44ca1b(0x18a)](_0x1fa900=>_0x1fa900[_0x44ca1b(0x178)]===c[_0x44ca1b(0x184)]['COMMENT'])[_0x44ca1b(0x19a)](_0x303d21=>_0x303d21[_0x44ca1b(0x1d5)]))!=null?_0x2810ce:[],_0x336dc1=JSON[_0x44ca1b(0x160)](_0x2438e2),_0x899a80=(await this[_0x44ca1b(0x1a3)]['requireSession'](_0x57aa42))[_0x44ca1b(0x17c)]();if(_0x51ec4d){const _0x1441fc={'memberId':_0x899a80,'unitId':_0x57aa42,'content':_0x336dc1,'mention':_0x360023,'threadId':_0x21e5e7},_0x22d9d1=(await this[_0x44ca1b(0x1b7)][_0x44ca1b(0x1d0)](_0x44ca1b(0x168)+_0x57aa42+_0x44ca1b(0x1ce),{'body':_0x1441fc}))[_0x44ca1b(0x19c)]['reply'];return{..._0x3a0fd8,'id':_0x22d9d1[_0x44ca1b(0x1b9)],'dT':c[_0x44ca1b(0x1c6)](+_0x22d9d1[_0x44ca1b(0x1b0)])[_0x44ca1b(0x1bd)](_0x44ca1b(0x1c0)),'personId':_0x22d9d1[_0x44ca1b(0x198)]};}else{const _0x384678={'memberId':_0x899a80,'unitId':_0x57aa42,'content':_0x336dc1,'mention':_0x360023},_0x5f5c15=await this['_httpService'][_0x44ca1b(0x1d0)](_0x44ca1b(0x168)+_0x57aa42+_0x44ca1b(0x1d9),{'body':_0x384678});return Y(_0x5f5c15[_0x44ca1b(0x19c)]['comment'],_0x3a0fd8);}}async[_0x30cd26(0x1bc)](_0x13b212){const _0x33e816=_0x30cd26;var _0xbcfa8,_0x30716c;const {text:_0x3629b6,unitId:_0x48e2ae}=_0x13b212,_0x1df643=(_0x30716c=(_0xbcfa8=_0x3629b6['customRanges'])==null?void 0x0:_0xbcfa8[_0x33e816(0x18a)](_0x3ce110=>_0x3ce110[_0x33e816(0x178)]===c[_0x33e816(0x184)][_0x33e816(0x17d)])['map'](_0x53dcae=>_0x53dcae[_0x33e816(0x1d5)]))!=null?_0x30716c:[],_0x566823=JSON['stringify'](_0x3629b6),_0x309dbe=_0x13b212[_0x33e816(0x170)],_0x2fb104=_0x13b212['id'],_0x517261={'memberId':(await this['_sessionService']['requireSession'](_0x48e2ae))[_0x33e816(0x17c)](),'unitId':_0x48e2ae,'threadId':_0x309dbe,'mention':_0x1df643,'content':_0x566823,'replyId':_0x2fb104},_0x56e023=await this[_0x33e816(0x1b7)]['post']('/universer-api/comment/unit/'+_0x48e2ae+'/edit',{'body':_0x517261});return!_0x56e023[_0x33e816(0x19c)][_0x33e816(0x18b)]||_0x56e023[_0x33e816(0x19c)]['error'][_0x33e816(0x16f)]===0x1;}async[_0x30cd26(0x164)](_0x5e49c9){const _0x1c6d4b=_0x30cd26,{unitId:_0x4b480c}=_0x5e49c9,_0x1f0f72=_0x5e49c9[_0x1c6d4b(0x170)],_0x2c1a7f={'memberId':this[_0x1c6d4b(0x1d1)][_0x1c6d4b(0x17b)]()[_0x1c6d4b(0x1d3)],'unitId':_0x4b480c,'threadId':_0x1f0f72,'solved':_0x5e49c9[_0x1c6d4b(0x177)]?I[_0x1c6d4b(0x171)]:I['OpenOrReOpen']},_0x20b34c=await this[_0x1c6d4b(0x1b7)][_0x1c6d4b(0x1d0)](_0x1c6d4b(0x168)+_0x4b480c+_0x1c6d4b(0x1cb),{'body':_0x2c1a7f});return!_0x20b34c[_0x1c6d4b(0x19c)][_0x1c6d4b(0x18b)]||_0x20b34c[_0x1c6d4b(0x19c)][_0x1c6d4b(0x18b)][_0x1c6d4b(0x16f)]===0x1;}async['deleteComment'](_0x52b489,_0x49fd05,_0x243fee,_0x5847fb){const _0x5ece00=_0x30cd26,_0x17100d={'memberId':(await this['_sessionService'][_0x5ece00(0x194)](_0x52b489))[_0x5ece00(0x17c)](),'threadId':_0x243fee,'replyId':_0x5847fb,'unitId':_0x52b489},_0x243760=await this[_0x5ece00(0x1b7)][_0x5ece00(0x1d0)](_0x5ece00(0x168)+_0x52b489+_0x5ece00(0x17f),{'body':_0x17100d});return!_0x243760[_0x5ece00(0x19c)][_0x5ece00(0x18b)]||_0x243760[_0x5ece00(0x19c)]['error']['code']===0x1;}async['listComments'](_0x544dac,_0x37327b,_0x2bba40){const _0xc3a720=_0x30cd26,_0xb79003={'unitId':_0x544dac,'threadId':_0x2bba40},_0x1a2bd7=await this[_0xc3a720(0x1b7)]['post'](_0xc3a720(0x168)+_0x544dac+_0xc3a720(0x1ab),{'body':_0xb79003}),_0x27b7af=_0x2bba40[_0xc3a720(0x19a)](_0x498c58=>G(_0x1a2bd7['body']['comments'][_0x498c58],_0x544dac,_0x37327b))[_0xc3a720(0x18a)](Boolean);return Object[_0xc3a720(0x1c7)](_0x1a2bd7[_0xc3a720(0x19c)][_0xc3a720(0x192)])[_0xc3a720(0x1d6)](_0x2e9256=>{const _0x3bd834=_0xc3a720;this[_0x3bd834(0x1d1)]['addUser'](_0x2e9256);}),_0x27b7af;}[_0x30cd26(0x174)](_0x8a90b2){return{'id':_0x8a90b2['id'],'threadId':_0x8a90b2['threadId'],'ref':_0x8a90b2['ref']};}};g=x([_(0x0,c['Inject'](P[_0x30cd26(0x1ad)])),_(0x1,c[_0x30cd26(0x1a1)](c[_0x30cd26(0x186)])),_(0x2,c[_0x30cd26(0x1a1)](b[_0x30cd26(0x19f)])),_(0x3,c[_0x30cd26(0x1a1)](c[_0x30cd26(0x185)]))],g);var H=Object[_0x30cd26(0x195)],J=(_0x162238,_0x1d0780,_0x5332a9,_0x2aa5ab)=>{const _0x4d715f=_0x30cd26;for(var _0x5851e9=_0x2aa5ab>0x1?void 0x0:_0x2aa5ab?H(_0x1d0780,_0x5332a9):_0x1d0780,_0x4377b3=_0x162238[_0x4d715f(0x161)]-0x1,_0x1ecdef;_0x4377b3>=0x0;_0x4377b3--)(_0x1ecdef=_0x162238[_0x4377b3])&&(_0x5851e9=_0x1ecdef(_0x5851e9)||_0x5851e9);return _0x5851e9;},y=(_0x21913c,_0x3254a0)=>(_0x3592a2,_0x3d060d)=>_0x3254a0(_0x3592a2,_0x3d060d,_0x21913c);let C=class extends c[_0x30cd26(0x1a8)]{constructor(_0x51570e,_0xfa69b6){const _0x5220b6=_0x30cd26;super(),this['_threadCommentDataSourceService']=_0x51570e,this['_threadCommentDataSource']=_0xfa69b6,this[_0x5220b6(0x16d)]();}[_0x30cd26(0x16d)](){const _0x3ab2ce=_0x30cd26;this[_0x3ab2ce(0x193)][_0x3ab2ce(0x182)]=this[_0x3ab2ce(0x16c)],this['_threadCommentDataSourceService'][_0x3ab2ce(0x1b6)]=!0x1;}};C=J([y(0x0,M[_0x30cd26(0x162)]),y(0x1,c[_0x30cd26(0x1a1)](g))],C);var F=Object[_0x30cd26(0x1b8)],L=Object[_0x30cd26(0x195)],Z=(_0x397d5f,_0x1ac877,_0x314435)=>_0x1ac877 in _0x397d5f?F(_0x397d5f,_0x1ac877,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x314435}):_0x397d5f[_0x1ac877]=_0x314435,W=(_0x51073d,_0x122d88,_0x23f6c7,_0x29a753)=>{const _0x140739=_0x30cd26;for(var _0x1ed6b7=_0x29a753>0x1?void 0x0:_0x29a753?L(_0x122d88,_0x23f6c7):_0x122d88,_0x25c601=_0x51073d[_0x140739(0x161)]-0x1,_0x4d6f9b;_0x25c601>=0x0;_0x25c601--)(_0x4d6f9b=_0x51073d[_0x25c601])&&(_0x1ed6b7=_0x4d6f9b(_0x1ed6b7)||_0x1ed6b7);return _0x1ed6b7;},O=(_0x2c9e45,_0x4b1b20)=>(_0x5deee5,_0x4c9b6a)=>_0x4b1b20(_0x5deee5,_0x4c9b6a,_0x2c9e45),N=(_0x218633,_0x19cdc0,_0x1d0f45)=>Z(_0x218633,typeof _0x19cdc0!=_0x30cd26(0x1db)?_0x19cdc0+'':_0x19cdc0,_0x1d0f45);function _0x4690(){const _0x4ad64b=['users','_threadCommentDataSourceService','requireSession','getOwnPropertyDescriptor','unitId','getComment','userId','Module','map','UniverThreadCommentDataSourcePlugin','body','/universer-api/user/list','addUser','CollaborationSessionService','commentUpdate$','Inject','getUnit','_sessionService','get','onStarting','root','25OmhZIT','Disposable','setConfig','deleteComment','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','HTTPService','customRanges','540546jTPMUk','createTimestamp','OpenOrReOpen','solved','Delete','UniverCollaborationClientPlugin','pipe','syncUpdateMutationToColla','_httpService','defineProperty','replyId','Plugin','2729556JKpdRb','updateComment','format','Solve','_initUserSync','YYYY/MM/DD\x20HH:mm','DependentOn','@univerjs-pro/collaboration-client','UniverThreadCommentUIPlugin','_init','@univerjs/thread-comment','dayjs','values','1194417NoFvUd','ThreadCommentModel','856670muPLIt','/solved','16124868WDrdtF','bufferTime','/reply','@univerjs-pro/license','post','_userService','user','userID','_config','rangeId','forEach','Edit','Add','/add','UNRECOGNIZED','symbol','parentId','thread-comment-data-source.config','UniverInstanceType','@univerjs/core','_commentService','payload','stringify','length','IThreadCommentDataSourceService','disposeWithMe','resolveComment','find','CommentService','onReady','/universer-api/comment/unit/','replies','104AmbHkY','personId','_threadCommentDataSource','_initDataSource','473601FLaUbL','code','threadId','Solved','add','_threadCommentModel','saveCommentToSnapshot','content','UNIVER_UNKNOWN','resolved','rangeType','@univerjs/thread-comment-ui','parse','getCurrentUser','getMemberID','COMMENT','@univerjs/network','/delete','size','toStringTag','dataSource','subscribe','CustomRangeType','Injector','UserManagerService','124327dcxRLU','Unknown','type','filter','error','Reply','rxjs','_injector','merge','pluginName','_configService'];_0x4690=function(){return _0x4ad64b;};return _0x4690();}exports[_0x30cd26(0x19b)]=class extends c[_0x30cd26(0x1ba)]{constructor(_0x2c6ed0=D,_0x578323,_0x599aca){const _0x3176b5=_0x30cd26;super(),this[_0x3176b5(0x1d4)]=_0x2c6ed0,this['_injector']=_0x578323,this[_0x3176b5(0x191)]=_0x599aca;const {..._0x2de1be}=c[_0x3176b5(0x18f)]({},D,this[_0x3176b5(0x1d4)]);this[_0x3176b5(0x191)][_0x3176b5(0x1a9)](q,_0x2de1be);}[_0x30cd26(0x1a5)](){[[g],[C],[p]]['forEach'](_0x3e422e=>{const _0x1b7307=_0x1c7d;this['_injector'][_0x1b7307(0x172)](_0x3e422e);});}[_0x30cd26(0x167)](){const _0x2b9c5a=_0x30cd26;this[_0x2b9c5a(0x18e)][_0x2b9c5a(0x1a4)](C),this[_0x2b9c5a(0x18e)]['get'](p);}},N(exports[_0x30cd26(0x19b)],_0x30cd26(0x190),U),N(exports[_0x30cd26(0x19b)],'type',c[_0x30cd26(0x1de)][_0x30cd26(0x176)]),exports[_0x30cd26(0x19b)]=W([c[_0x30cd26(0x1c1)](j[_0x30cd26(0x1c3)],b[_0x30cd26(0x1b4)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x30cd26(0x185)])),O(0x2,c['IConfigService'])],exports[_0x30cd26(0x19b)]);
|
|
1
|
+
'use strict';function _0x289b(_0xdef441,_0x5c452b){const _0x536247=_0x5362();return _0x289b=function(_0x289b50,_0x3dbebd){_0x289b50=_0x289b50-0x9e;let _0x5e1721=_0x536247[_0x289b50];return _0x5e1721;},_0x289b(_0xdef441,_0x5c452b);}const _0x4ae273=_0x289b;(function(_0x40e0d5,_0x31b299){const _0x156586=_0x289b,_0x16ff4a=_0x40e0d5();while(!![]){try{const _0x44f9ec=-parseInt(_0x156586(0xf2))/0x1*(-parseInt(_0x156586(0xf8))/0x2)+parseInt(_0x156586(0xdc))/0x3+-parseInt(_0x156586(0x101))/0x4+parseInt(_0x156586(0xe2))/0x5*(parseInt(_0x156586(0xe3))/0x6)+-parseInt(_0x156586(0x103))/0x7*(-parseInt(_0x156586(0xd1))/0x8)+parseInt(_0x156586(0xe9))/0x9+-parseInt(_0x156586(0xe5))/0xa;if(_0x44f9ec===_0x31b299)break;else _0x16ff4a['push'](_0x16ff4a['shift']());}catch(_0x412dae){_0x16ff4a['push'](_0x16ff4a['shift']());}}}(_0x5362,0x1e98f));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x4ae273(0xa1)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require(_0x4ae273(0x106)),j=require(_0x4ae273(0xa3)),M=require(_0x4ae273(0xc9)),w=require(_0x4ae273(0xb0)),P=require('@univerjs/network'),U=_0x4ae273(0xa7);var I=(_0x14366c=>(_0x14366c[_0x14366c[_0x4ae273(0x109)]=0x0]='OpenOrReOpen',_0x14366c[_0x14366c[_0x4ae273(0xd5)]=0x1]=_0x4ae273(0xd5),_0x14366c[_0x14366c['UNRECOGNIZED']=-0x1]=_0x4ae273(0x10b),_0x14366c))(I||{}),v=(_0x47bd2e=>(_0x47bd2e[_0x47bd2e[_0x4ae273(0xf6)]=0x0]='Unknown',_0x47bd2e[_0x47bd2e[_0x4ae273(0xeb)]=0x1]=_0x4ae273(0xeb),_0x47bd2e[_0x47bd2e[_0x4ae273(0x10a)]=0x2]=_0x4ae273(0x10a),_0x47bd2e[_0x47bd2e[_0x4ae273(0xd9)]=0x3]=_0x4ae273(0xd9),_0x47bd2e[_0x47bd2e[_0x4ae273(0x105)]=0x4]=_0x4ae273(0x105),_0x47bd2e[_0x47bd2e[_0x4ae273(0xe7)]=0x5]=_0x4ae273(0xe7),_0x47bd2e[_0x47bd2e[_0x4ae273(0x10b)]=-0x1]='UNRECOGNIZED',_0x47bd2e))(v||{});const f=_0x3d7cd3=>c[_0x4ae273(0xf7)](new Date(+_0x3d7cd3))[_0x4ae273(0xe6)](_0x4ae273(0x10d)),R=async(_0x14d822,_0x4efd3f)=>{const _0x303ef8=_0x4ae273,_0x2bd209=_0x14d822[_0x303ef8(0xbd)](c[_0x303ef8(0xa4)]),_0x2a7e8d=_0x14d822['get'](P[_0x303ef8(0xd0)]);_0x4efd3f[_0x303ef8(0xbc)](_0x22af8d=>{const _0x398a0b=_0x303ef8;_0x2bd209[_0x398a0b(0xba)](_0x22af8d)&&_0x4efd3f['delete'](_0x22af8d);}),_0x4efd3f[_0x303ef8(0xff)]&&(await _0x2a7e8d[_0x303ef8(0xbd)](_0x303ef8(0xb4),{'params':{'userIDs':[..._0x4efd3f]}}))[_0x303ef8(0xaa)][_0x303ef8(0xb7)][_0x303ef8(0xbc)](_0x3413eb=>{const _0x1451e9=_0x303ef8;_0x3413eb&&_0x2bd209[_0x1451e9(0x108)](_0x3413eb);});};var $=Object[_0x4ae273(0x9e)],E=(_0x3b3def,_0x162768,_0x372acc,_0x120bb4)=>{for(var _0x11bec5=_0x120bb4>0x1?void 0x0:_0x120bb4?$(_0x162768,_0x372acc):_0x162768,_0x58e9e0=_0x3b3def['length']-0x1,_0xa1d518;_0x58e9e0>=0x0;_0x58e9e0--)(_0xa1d518=_0x3b3def[_0x58e9e0])&&(_0x11bec5=_0xa1d518(_0x11bec5)||_0x11bec5);return _0x11bec5;},S=(_0x4cc93f,_0x5a8fcd)=>(_0x320472,_0x4dfdf9)=>_0x5a8fcd(_0x320472,_0x4dfdf9,_0x4cc93f);let p=class extends c['Disposable']{constructor(_0x5b966c,_0xbc726c,_0x17e5ab,_0x4e225b){const _0x2e1c1d=_0x4ae273;super(),this['_commentService']=_0x5b966c,this['_threadCommentModel']=_0xbc726c,this[_0x2e1c1d(0xef)]=_0x17e5ab,this[_0x2e1c1d(0xda)]=_0x4e225b,this[_0x2e1c1d(0x100)](),this[_0x2e1c1d(0x10c)]();}[_0x4ae273(0x10c)](){const _0x349348=_0x4ae273;this['disposeWithMe'](this[_0x349348(0xee)]['commentUpdate$']['pipe'](w[_0x349348(0x113)](0x10))[_0x349348(0x10e)](_0x4520d4=>{const _0x53da15=_0x349348,_0x5cd53b=new Set();_0x4520d4['forEach'](_0xcc70a5=>{const _0xed8d0f=_0x289b;switch(_0xcc70a5[_0xed8d0f(0xcc)]){case _0xed8d0f(0xdb):{const _0x1503bd=_0xcc70a5[_0xed8d0f(0xf4)][_0xed8d0f(0xb3)];_0x5cd53b[_0xed8d0f(0xdb)](_0x1503bd);break;}}}),R(this[_0x53da15(0xda)],_0x5cd53b);}));}[_0x4ae273(0x100)](){const _0x461ee1=_0x4ae273;this[_0x461ee1(0xd7)](this[_0x461ee1(0x115)]['commentUpdate$'][_0x461ee1(0x10e)](async _0x57a8a1=>{const _0x3d86cf=_0x461ee1;var _0x57cd02,_0x3da038,_0x359928,_0x39ddb7;const _0x47ce09=(_0x57cd02=this[_0x3d86cf(0xee)]['getUnit'](_0x57a8a1[_0x3d86cf(0xfc)])[_0x3d86cf(0xf0)](_0x3351f6=>_0x3351f6[_0x3d86cf(0xb9)]===_0x57a8a1['threadId']))==null?void 0x0:_0x57cd02[_0x3d86cf(0xa5)];if(!_0x47ce09)return;const {unitId:_0x287414,subUnitId:_0x17135a}=_0x47ce09;switch(_0x57a8a1[_0x3d86cf(0x111)]&&this[_0x3d86cf(0xef)][_0x3d86cf(0x108)](_0x57a8a1[_0x3d86cf(0x111)]),_0x57a8a1[_0x3d86cf(0xcc)]){case v[_0x3d86cf(0xeb)]:break;case v[_0x3d86cf(0x10a)]:{this[_0x3d86cf(0xee)][_0x3d86cf(0xfa)](_0x287414,_0x17135a,{'unitId':_0x287414,'subUnitId':_0x17135a,'ref':'','id':_0x57a8a1[_0x3d86cf(0xad)],'dT':f(+_0x57a8a1['createTimestamp']),'threadId':_0x57a8a1[_0x3d86cf(0xb9)],'personId':(_0x359928=(_0x3da038=_0x57a8a1[_0x3d86cf(0x111)])==null?void 0x0:_0x3da038['userID'])!=null?_0x359928:_0x57a8a1['userId'],'text':JSON[_0x3d86cf(0xea)](_0x57a8a1[_0x3d86cf(0xc1)]),'parentId':_0x47ce09['id']});break;}case v[_0x3d86cf(0x105)]:{const _0x163684=this[_0x3d86cf(0xee)]['getComment'](_0x287414,_0x17135a,_0x57a8a1[_0x3d86cf(0xad)]);_0x163684&&_0x163684['parentId']&&this[_0x3d86cf(0xee)]['deleteComment'](_0x287414,_0x17135a,_0x57a8a1[_0x3d86cf(0xad)]);break;}case v['Edit']:{this[_0x3d86cf(0xee)][_0x3d86cf(0xa2)](_0x287414,_0x17135a,{'commentId':_0x57a8a1[_0x3d86cf(0xad)],'text':JSON[_0x3d86cf(0xea)](_0x57a8a1[_0x3d86cf(0xc1)])});break;}case v[_0x3d86cf(0xe7)]:{const _0x260cc1=(_0x39ddb7=this['_threadCommentModel'][_0x3d86cf(0xfb)](_0x57a8a1[_0x3d86cf(0xfc)])['find'](_0x2fab45=>_0x2fab45['threadId']===_0x57a8a1[_0x3d86cf(0xb9)]))==null?void 0x0:_0x39ddb7[_0x3d86cf(0xa5)];_0x260cc1&&this[_0x3d86cf(0xee)][_0x3d86cf(0xbb)](_0x287414,_0x17135a,_0x260cc1['id'],_0x57a8a1[_0x3d86cf(0xf3)]===I[_0x3d86cf(0xd5)]);break;}}}));}};p=E([S(0x0,c[_0x4ae273(0xd4)](b['CommentService'])),S(0x1,c[_0x4ae273(0xd4)](M[_0x4ae273(0xc3)])),S(0x2,c['Inject'](c[_0x4ae273(0xa4)])),S(0x3,c[_0x4ae273(0xd4)](c[_0x4ae273(0xd2)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x4ae273(0x9e)],x=(_0x557b62,_0x4bb138,_0x3048f9,_0x30a09a)=>{const _0x3b5526=_0x4ae273;for(var _0x4fb52a=_0x30a09a>0x1?void 0x0:_0x30a09a?A(_0x4bb138,_0x3048f9):_0x4bb138,_0x5d35dd=_0x557b62[_0x3b5526(0xf1)]-0x1,_0x4ee223;_0x5d35dd>=0x0;_0x5d35dd--)(_0x4ee223=_0x557b62[_0x5d35dd])&&(_0x4fb52a=_0x4ee223(_0x4fb52a)||_0x4fb52a);return _0x4fb52a;},_=(_0x3f2c5a,_0x339fa4)=>(_0x562bc1,_0x4b6035)=>_0x339fa4(_0x562bc1,_0x4b6035,_0x3f2c5a);function Y(_0x599be2,_0x3d591c){const _0x517ab9=_0x4ae273,_0x32bafc=_0x599be2[_0x517ab9(0xd3)][0x0];return{..._0x3d591c,'id':_0x32bafc[_0x517ab9(0xad)],'resolved':_0x599be2[_0x517ab9(0xf3)]===0x1,'dT':f(_0x32bafc[_0x517ab9(0x114)]),'personId':_0x32bafc['userId'],'threadId':_0x32bafc[_0x517ab9(0xb9)]};}function G(_0x2eef40,_0x316c3d,_0xf244a7){const _0x6d9f25=_0x4ae273;var _0x39664e,_0xb6c3b2;if(((_0xb6c3b2=(_0x39664e=_0x2eef40==null?void 0x0:_0x2eef40['replies'])==null?void 0x0:_0x39664e[_0x6d9f25(0xf1)])!=null?_0xb6c3b2:0x0)>0x0){const _0x42cd59=(_0xee327,_0x1219e6)=>({'id':_0xee327[_0x6d9f25(0xad)],'threadId':_0xee327[_0x6d9f25(0xb9)],'dT':f(_0xee327[_0x6d9f25(0x114)]),'personId':_0xee327[_0x6d9f25(0xc5)],'resolved':_0x2eef40[_0x6d9f25(0xf3)]===I[_0x6d9f25(0xd5)],'unitId':_0x316c3d,'subUnitId':_0xf244a7,'text':JSON['parse'](_0xee327[_0x6d9f25(0xc1)]),'parentId':_0x1219e6}),_0x193094=_0x42cd59(_0x2eef40[_0x6d9f25(0xd3)][0x0]);return{..._0x193094,'children':_0x2eef40[_0x6d9f25(0xd3)][_0x6d9f25(0xec)](0x1)[_0x6d9f25(0xb8)](_0x24c438=>_0x42cd59(_0x24c438,_0x193094['id']))};}return null;}let g=class{constructor(_0x2086de,_0x6b104e,_0x563a4e,_0x36fa48){const _0x4bd995=_0x4ae273;this[_0x4bd995(0xb1)]=_0x2086de,this[_0x4bd995(0xef)]=_0x6b104e,this[_0x4bd995(0xde)]=_0x563a4e,this[_0x4bd995(0xda)]=_0x36fa48;}async['addComment'](_0x5b007b){const _0x587902=_0x4ae273;var _0x5e86f3,_0x18ea34;const {parentId:_0x1e51f3,unitId:_0x42e85b,text:_0x2daa9d,threadId:_0x5aafa4}=_0x5b007b,_0x424365=(_0x18ea34=(_0x5e86f3=_0x2daa9d[_0x587902(0xa0)])==null?void 0x0:_0x5e86f3['filter'](_0x57d348=>_0x57d348[_0x587902(0xbf)]===c[_0x587902(0xe8)]['COMMENT'])[_0x587902(0xb8)](_0x19e3d1=>_0x19e3d1['rangeId']))!=null?_0x18ea34:[],_0x37f82d=JSON[_0x587902(0xce)](_0x2daa9d),_0xf70449=(await this[_0x587902(0xde)][_0x587902(0xcf)](_0x42e85b))['getMemberID']();if(_0x1e51f3){const _0x54ce1f={'memberId':_0xf70449,'unitId':_0x42e85b,'content':_0x37f82d,'mention':_0x424365,'threadId':_0x5aafa4},_0x1107ab=(await this['_httpService'][_0x587902(0x102)](_0x587902(0xe1)+_0x42e85b+_0x587902(0xb5),{'body':_0x54ce1f}))[_0x587902(0xaa)]['reply'];return{..._0x5b007b,'id':_0x1107ab[_0x587902(0xad)],'dT':c['dayjs'](+_0x1107ab[_0x587902(0x114)])['format'](_0x587902(0x10d)),'personId':_0x1107ab['userId']};}else{const _0x1278a9={'memberId':_0xf70449,'unitId':_0x42e85b,'content':_0x37f82d,'mention':_0x424365},_0x12f60d=await this['_httpService'][_0x587902(0x102)](_0x587902(0xe1)+_0x42e85b+_0x587902(0xc6),{'body':_0x1278a9});return Y(_0x12f60d[_0x587902(0xaa)]['comment'],_0x5b007b);}}async['updateComment'](_0x443ace){const _0x553436=_0x4ae273;var _0x322648,_0x356f58;const {text:_0x435409,unitId:_0x432ce8}=_0x443ace,_0x14d13d=(_0x356f58=(_0x322648=_0x435409[_0x553436(0xa0)])==null?void 0x0:_0x322648['filter'](_0x365578=>_0x365578[_0x553436(0xbf)]===c[_0x553436(0xe8)]['COMMENT'])[_0x553436(0xb8)](_0x1cd0cd=>_0x1cd0cd[_0x553436(0xaf)]))!=null?_0x356f58:[],_0x27c085=JSON[_0x553436(0xce)](_0x435409),_0x1c57c7=_0x443ace[_0x553436(0xb9)],_0x105e15=_0x443ace['id'],_0x3c24f2={'memberId':(await this[_0x553436(0xde)]['requireSession'](_0x432ce8))[_0x553436(0xab)](),'unitId':_0x432ce8,'threadId':_0x1c57c7,'mention':_0x14d13d,'content':_0x27c085,'replyId':_0x105e15},_0x5f3a9e=await this[_0x553436(0xb1)]['post'](_0x553436(0xe1)+_0x432ce8+_0x553436(0xfe),{'body':_0x3c24f2});return!_0x5f3a9e['body'][_0x553436(0xcd)]||_0x5f3a9e[_0x553436(0xaa)][_0x553436(0xcd)][_0x553436(0xca)]===0x1;}async[_0x4ae273(0xbb)](_0x5a5145){const _0x1735f5=_0x4ae273,{unitId:_0x175ff9}=_0x5a5145,_0x5e6672=_0x5a5145[_0x1735f5(0xb9)],_0xc1d84f={'memberId':this[_0x1735f5(0xef)]['getCurrentUser']()[_0x1735f5(0xf5)],'unitId':_0x175ff9,'threadId':_0x5e6672,'solved':_0x5a5145[_0x1735f5(0xc4)]?I['Solved']:I[_0x1735f5(0x109)]},_0x4abd92=await this[_0x1735f5(0xb1)][_0x1735f5(0x102)](_0x1735f5(0xe1)+_0x175ff9+'/solved',{'body':_0xc1d84f});return!_0x4abd92[_0x1735f5(0xaa)][_0x1735f5(0xcd)]||_0x4abd92[_0x1735f5(0xaa)][_0x1735f5(0xcd)][_0x1735f5(0xca)]===0x1;}async[_0x4ae273(0xc0)](_0x1fea3a,_0x49b0a0,_0x42822f,_0x472fb3){const _0x2c59d6=_0x4ae273,_0x3edafd={'memberId':(await this[_0x2c59d6(0xde)][_0x2c59d6(0xcf)](_0x1fea3a))[_0x2c59d6(0xab)](),'threadId':_0x42822f,'replyId':_0x472fb3,'unitId':_0x1fea3a},_0x2838ce=await this['_httpService']['post'](_0x2c59d6(0xe1)+_0x1fea3a+_0x2c59d6(0x10f),{'body':_0x3edafd});return!_0x2838ce[_0x2c59d6(0xaa)][_0x2c59d6(0xcd)]||_0x2838ce[_0x2c59d6(0xaa)][_0x2c59d6(0xcd)][_0x2c59d6(0xca)]===0x1;}async[_0x4ae273(0xb2)](_0x1999ec,_0x23cca6,_0x48d901){const _0x3cbb66=_0x4ae273,_0x2e0c4d={'unitId':_0x1999ec,'threadId':_0x48d901},_0x329240=await this[_0x3cbb66(0xb1)][_0x3cbb66(0x102)]('/universer-api/comment/unit/'+_0x1999ec+'/list',{'body':_0x2e0c4d}),_0xd05bb4=_0x48d901[_0x3cbb66(0xb8)](_0x36f14e=>G(_0x329240[_0x3cbb66(0xaa)]['comments'][_0x36f14e],_0x1999ec,_0x23cca6))[_0x3cbb66(0xdd)](Boolean);return Object[_0x3cbb66(0xac)](_0x329240[_0x3cbb66(0xaa)]['users'])[_0x3cbb66(0xbc)](_0x2d1d98=>{const _0x28d078=_0x3cbb66;this[_0x28d078(0xef)]['addUser'](_0x2d1d98);}),_0xd05bb4;}[_0x4ae273(0xc7)](_0x326a1a){const _0x2e52f9=_0x4ae273;return{'id':_0x326a1a['id'],'threadId':_0x326a1a[_0x2e52f9(0xb9)],'ref':_0x326a1a[_0x2e52f9(0xf9)]};}};g=x([_(0x0,c[_0x4ae273(0xd4)](P[_0x4ae273(0xd0)])),_(0x1,c[_0x4ae273(0xd4)](c[_0x4ae273(0xa4)])),_(0x2,c['Inject'](b[_0x4ae273(0xa6)])),_(0x3,c[_0x4ae273(0xd4)](c[_0x4ae273(0xd2)]))],g);var H=Object[_0x4ae273(0x9e)],J=(_0x11affa,_0x319600,_0x56da34,_0x7e95cf)=>{for(var _0x4e4b13=_0x7e95cf>0x1?void 0x0:_0x7e95cf?H(_0x319600,_0x56da34):_0x319600,_0x5a2cdb=_0x11affa['length']-0x1,_0x7ec729;_0x5a2cdb>=0x0;_0x5a2cdb--)(_0x7ec729=_0x11affa[_0x5a2cdb])&&(_0x4e4b13=_0x7ec729(_0x4e4b13)||_0x4e4b13);return _0x4e4b13;},y=(_0x41dc77,_0x1d646a)=>(_0x3cad87,_0x22b838)=>_0x1d646a(_0x3cad87,_0x22b838,_0x41dc77);let C=class extends c[_0x4ae273(0xa8)]{constructor(_0x296d7e,_0x142f85){const _0x159b04=_0x4ae273;super(),this[_0x159b04(0x9f)]=_0x296d7e,this['_threadCommentDataSource']=_0x142f85,this['_initDataSource']();}[_0x4ae273(0x112)](){const _0x376b59=_0x4ae273;this[_0x376b59(0x9f)][_0x376b59(0xae)]=this[_0x376b59(0xcb)],this[_0x376b59(0x9f)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x4ae273(0x110)]),y(0x1,c['Inject'](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x1acbc4,_0x229cd3,_0xe77459)=>_0x229cd3 in _0x1acbc4?F(_0x1acbc4,_0x229cd3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe77459}):_0x1acbc4[_0x229cd3]=_0xe77459,W=(_0x374bb6,_0x2599d6,_0x8e2233,_0x41a544)=>{const _0x1d1ada=_0x4ae273;for(var _0x2207d2=_0x41a544>0x1?void 0x0:_0x41a544?L(_0x2599d6,_0x8e2233):_0x2599d6,_0x58f111=_0x374bb6[_0x1d1ada(0xf1)]-0x1,_0x2adbfa;_0x58f111>=0x0;_0x58f111--)(_0x2adbfa=_0x374bb6[_0x58f111])&&(_0x2207d2=_0x2adbfa(_0x2207d2)||_0x2207d2);return _0x2207d2;},O=(_0xf7647b,_0x41af70)=>(_0x3c0eb0,_0x4d7767)=>_0x41af70(_0x3c0eb0,_0x4d7767,_0xf7647b),N=(_0x5a611c,_0x370a00,_0x188303)=>Z(_0x5a611c,typeof _0x370a00!=_0x4ae273(0xc8)?_0x370a00+'':_0x370a00,_0x188303);function _0x5362(){const _0x3fe95b=['dataSource','rangeId','rxjs','_httpService','listComments','personId','/universer-api/user/list','/reply','UNIVER_UNKNOWN','users','map','threadId','getUser','resolveComment','forEach','get','_configService','rangeType','deleteComment','content','setConfig','ThreadCommentModel','resolved','userId','/add','saveCommentToSnapshot','symbol','@univerjs/thread-comment','code','_threadCommentDataSource','type','error','stringify','requireSession','HTTPService','177736QKiIJD','Injector','replies','Inject','Solved','_config','disposeWithMe','UniverThreadCommentUIPlugin','Edit','_injector','add','743034nsfklO','filter','_sessionService','UniverCollaborationClientPlugin','merge','/universer-api/comment/unit/','10JyIgnE','416328nQhHXD','DependentOn','6823580Febkeo','format','Solve','CustomRangeType','2181834RlBCQl','parse','Add','slice','onStarting','_threadCommentModel','_userService','find','length','1HSXRNy','solved','payload','userID','Unknown','dayjs','350722OLpUpx','ref','addComment','getUnit','unitId','UniverThreadCommentDataSourcePlugin','/edit','size','_init','252828hMPtMt','post','21mVqokA','UniverLicensePlugin','Delete','@univerjs/core','onReady','addUser','OpenOrReOpen','Reply','UNRECOGNIZED','_initUserSync','YYYY/MM/DD\x20HH:mm','subscribe','/delete','IThreadCommentDataSourceService','user','_initDataSource','bufferTime','createTimestamp','_commentService','getOwnPropertyDescriptor','_threadCommentDataSourceService','customRanges','Module','updateComment','@univerjs/thread-comment-ui','UserManagerService','root','CollaborationSessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Disposable','Plugin','body','getMemberID','values','replyId'];_0x5362=function(){return _0x3fe95b;};return _0x5362();}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4ae273(0xa9)]{constructor(_0x44ca0e=D,_0x2baa3f,_0x2e18f9){const _0x2c7611=_0x4ae273;super(),this[_0x2c7611(0xd6)]=_0x44ca0e,this['_injector']=_0x2baa3f,this[_0x2c7611(0xbe)]=_0x2e18f9;const {..._0x747ce5}=c[_0x2c7611(0xe0)]({},D,this[_0x2c7611(0xd6)]);this[_0x2c7611(0xbe)][_0x2c7611(0xc2)](q,_0x747ce5);}[_0x4ae273(0xed)](){const _0x51e99c=_0x4ae273;[[g],[C],[p]][_0x51e99c(0xbc)](_0x1859cc=>{const _0x3da4dc=_0x51e99c;this[_0x3da4dc(0xda)][_0x3da4dc(0xdb)](_0x1859cc);});}[_0x4ae273(0x107)](){const _0x16827e=_0x4ae273;this[_0x16827e(0xda)][_0x16827e(0xbd)](C),this[_0x16827e(0xda)][_0x16827e(0xbd)](p);}},N(exports[_0x4ae273(0xfd)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x4ae273(0xcc),c['UniverInstanceType'][_0x4ae273(0xb6)]),exports[_0x4ae273(0xfd)]=W([c[_0x4ae273(0xe4)](j[_0x4ae273(0xd8)],b[_0x4ae273(0xdf)],T[_0x4ae273(0x104)]),O(0x1,c[_0x4ae273(0xd4)](c[_0x4ae273(0xd2)])),O(0x2,c['IConfigService'])],exports[_0x4ae273(0xfd)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x228950=_0x496a;(function(_0x2e629a,_0x238f1f){const _0x3b6c98=_0x496a,_0x2be1d7=_0x2e629a();while(!![]){try{const _0x24f24e=parseInt(_0x3b6c98(0x13b))/0x1*(parseInt(_0x3b6c98(0x10b))/0x2)+-parseInt(_0x3b6c98(0x108))/0x3*(parseInt(_0x3b6c98(0x11c))/0x4)+-parseInt(_0x3b6c98(0xfb))/0x5+parseInt(_0x3b6c98(0x11d))/0x6+parseInt(_0x3b6c98(0x153))/0x7+parseInt(_0x3b6c98(0x13e))/0x8*(-parseInt(_0x3b6c98(0x156))/0x9)+-parseInt(_0x3b6c98(0x128))/0xa*(-parseInt(_0x3b6c98(0x11f))/0xb);if(_0x24f24e===_0x238f1f)break;else _0x2be1d7['push'](_0x2be1d7['shift']());}catch(_0x57b745){_0x2be1d7['push'](_0x2be1d7['shift']());}}}(_0x1add,0x5aa94));import{CommentService as _0x775931,CollaborationSessionService as _0x625313,UniverCollaborationClientPlugin as _0x4ce1bf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1f5fb3}from'@univerjs-pro/license';import{dayjs as _0x2552d3,UserManagerService as _0x44d1fc,Inject as _0xee2d6d,Injector as _0x4801df,Disposable as _0x48bbe7,CustomRangeType as _0x2cf451,UniverInstanceType as _0x45a423,DependentOn as _0x1fb97b,IConfigService as _0x415962,Plugin as _0x1ef7b8,merge as _0x1ce58b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3e15e4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x24ff45,IThreadCommentDataSourceService as _0x2e0912}from'@univerjs/thread-comment';import{bufferTime as _0x3eb001}from'rxjs';import{HTTPService as _0x490830}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4f936b=>(_0x4f936b[_0x4f936b[_0x228950(0x102)]=0x0]=_0x228950(0x102),_0x4f936b[_0x4f936b[_0x228950(0x157)]=0x1]=_0x228950(0x157),_0x4f936b[_0x4f936b[_0x228950(0x140)]=-0x1]=_0x228950(0x140),_0x4f936b))(I||{}),v=(_0x5252ec=>(_0x5252ec[_0x5252ec['Unknown']=0x0]=_0x228950(0x11e),_0x5252ec[_0x5252ec['Add']=0x1]=_0x228950(0x13c),_0x5252ec[_0x5252ec['Reply']=0x2]=_0x228950(0x12d),_0x5252ec[_0x5252ec['Edit']=0x3]=_0x228950(0x111),_0x5252ec[_0x5252ec[_0x228950(0x13a)]=0x4]=_0x228950(0x13a),_0x5252ec[_0x5252ec[_0x228950(0x107)]=0x5]=_0x228950(0x107),_0x5252ec[_0x5252ec['UNRECOGNIZED']=-0x1]=_0x228950(0x140),_0x5252ec))(v||{});const D=_0x227c78=>_0x2552d3(new Date(+_0x227c78))[_0x228950(0x117)](_0x228950(0x12b)),B=async(_0x130a41,_0xc131f9)=>{const _0x1c2f2b=_0x228950,_0x217d33=_0x130a41[_0x1c2f2b(0x121)](_0x44d1fc),_0x390e52=_0x130a41['get'](_0x490830);_0xc131f9[_0x1c2f2b(0x144)](_0x15a4fe=>{const _0x3add9e=_0x1c2f2b;_0x217d33[_0x3add9e(0x131)](_0x15a4fe)&&_0xc131f9[_0x3add9e(0x10f)](_0x15a4fe);}),_0xc131f9['size']&&(await _0x390e52[_0x1c2f2b(0x121)]('/universer-api/user/list',{'params':{'userIDs':[..._0xc131f9]}}))[_0x1c2f2b(0x136)][_0x1c2f2b(0xf3)]['forEach'](_0x294e4e=>{const _0x163187=_0x1c2f2b;_0x294e4e&&_0x217d33[_0x163187(0x118)](_0x294e4e);});};var K=Object[_0x228950(0x130)],V=(_0x39a52b,_0x410db0,_0xa1c7a7,_0x490309)=>{const _0x736133=_0x228950;for(var _0x23f9d8=_0x490309>0x1?void 0x0:_0x490309?K(_0x410db0,_0xa1c7a7):_0x410db0,_0xc15c2b=_0x39a52b[_0x736133(0x137)]-0x1,_0x23f585;_0xc15c2b>=0x0;_0xc15c2b--)(_0x23f585=_0x39a52b[_0xc15c2b])&&(_0x23f9d8=_0x23f585(_0x23f9d8)||_0x23f9d8);return _0x23f9d8;},p=(_0x3864d6,_0xc9cd8f)=>(_0x3ceb27,_0x4df8d5)=>_0xc9cd8f(_0x3ceb27,_0x4df8d5,_0x3864d6);let S=class extends _0x48bbe7{constructor(_0x5ca55d,_0x6a3c64,_0x13c37c,_0x10b2e3){const _0x590ff7=_0x228950;super(),this['_commentService']=_0x5ca55d,this['_threadCommentModel']=_0x6a3c64,this[_0x590ff7(0x110)]=_0x13c37c,this[_0x590ff7(0x112)]=_0x10b2e3,this[_0x590ff7(0x100)](),this[_0x590ff7(0x14f)]();}[_0x228950(0x14f)](){const _0x1d303c=_0x228950;this[_0x1d303c(0x132)](this[_0x1d303c(0x10c)][_0x1d303c(0x10d)]['pipe'](_0x3eb001(0x10))['subscribe'](_0xfbfa45=>{const _0x30213f=_0x1d303c,_0x1c89da=new Set();_0xfbfa45['forEach'](_0x35532d=>{const _0x41539f=_0x496a;switch(_0x35532d[_0x41539f(0x151)]){case'add':{const _0x513d6a=_0x35532d['payload'][_0x41539f(0xff)];_0x1c89da[_0x41539f(0xf2)](_0x513d6a);break;}}}),B(this[_0x30213f(0x112)],_0x1c89da);}));}['_init'](){const _0x224126=_0x228950;this[_0x224126(0x132)](this[_0x224126(0x139)][_0x224126(0x10d)]['subscribe'](async _0x4155a2=>{const _0x9be0da=_0x224126;var _0x44bb25,_0x55532a,_0x4cb58f,_0x42e6eb;const _0xba405b=(_0x44bb25=this['_threadCommentModel'][_0x9be0da(0x115)](_0x4155a2['unitId'])[_0x9be0da(0x109)](_0x4c34f6=>_0x4c34f6['threadId']===_0x4155a2[_0x9be0da(0x105)]))==null?void 0x0:_0x44bb25['root'];if(!_0xba405b)return;const {unitId:_0x3c4cfd,subUnitId:_0x5e3e5f}=_0xba405b;switch(_0x4155a2[_0x9be0da(0x116)]&&this[_0x9be0da(0x110)]['addUser'](_0x4155a2[_0x9be0da(0x116)]),_0x4155a2[_0x9be0da(0x151)]){case v[_0x9be0da(0x13c)]:break;case v['Reply']:{this[_0x9be0da(0x10c)]['addComment'](_0x3c4cfd,_0x5e3e5f,{'unitId':_0x3c4cfd,'subUnitId':_0x5e3e5f,'ref':'','id':_0x4155a2['replyId'],'dT':D(+_0x4155a2[_0x9be0da(0xfe)]),'threadId':_0x4155a2[_0x9be0da(0x105)],'personId':(_0x4cb58f=(_0x55532a=_0x4155a2[_0x9be0da(0x116)])==null?void 0x0:_0x55532a[_0x9be0da(0x14c)])!=null?_0x4cb58f:_0x4155a2[_0x9be0da(0x10a)],'text':JSON['parse'](_0x4155a2[_0x9be0da(0x10e)]),'parentId':_0xba405b['id']});break;}case v['Delete']:{const _0xa3ce9b=this['_threadCommentModel']['getComment'](_0x3c4cfd,_0x5e3e5f,_0x4155a2[_0x9be0da(0x129)]);_0xa3ce9b&&_0xa3ce9b[_0x9be0da(0x12f)]&&this[_0x9be0da(0x10c)][_0x9be0da(0x124)](_0x3c4cfd,_0x5e3e5f,_0x4155a2[_0x9be0da(0x129)]);break;}case v[_0x9be0da(0x111)]:{this[_0x9be0da(0x10c)][_0x9be0da(0x145)](_0x3c4cfd,_0x5e3e5f,{'commentId':_0x4155a2[_0x9be0da(0x129)],'text':JSON[_0x9be0da(0x104)](_0x4155a2['content'])});break;}case v[_0x9be0da(0x107)]:{const _0x588d31=(_0x42e6eb=this[_0x9be0da(0x10c)][_0x9be0da(0x115)](_0x4155a2[_0x9be0da(0x103)])[_0x9be0da(0x109)](_0x16f52a=>_0x16f52a[_0x9be0da(0x105)]===_0x4155a2['threadId']))==null?void 0x0:_0x42e6eb['root'];_0x588d31&&this[_0x9be0da(0x10c)][_0x9be0da(0x147)](_0x3c4cfd,_0x5e3e5f,_0x588d31['id'],_0x4155a2[_0x9be0da(0xfa)]===I[_0x9be0da(0x157)]);break;}}}));}};S=V([p(0x0,_0xee2d6d(_0x775931)),p(0x1,_0xee2d6d(_0x24ff45)),p(0x2,_0xee2d6d(_0x44d1fc)),p(0x3,_0xee2d6d(_0x4801df))],S);const z=_0x228950(0x154),M={};var k=Object[_0x228950(0x130)],Q=(_0x4c91e6,_0x515286,_0x2373d4,_0x1c6c0f)=>{const _0x96f1ec=_0x228950;for(var _0x1ff295=_0x1c6c0f>0x1?void 0x0:_0x1c6c0f?k(_0x515286,_0x2373d4):_0x515286,_0x391cc8=_0x4c91e6[_0x96f1ec(0x137)]-0x1,_0x14f2b3;_0x391cc8>=0x0;_0x391cc8--)(_0x14f2b3=_0x4c91e6[_0x391cc8])&&(_0x1ff295=_0x14f2b3(_0x1ff295)||_0x1ff295);return _0x1ff295;},_=(_0x595682,_0x4c8830)=>(_0x299328,_0x4751ab)=>_0x4c8830(_0x299328,_0x4751ab,_0x595682);function _0x496a(_0x4545c7,_0x1e6c0b){const _0x1add72=_0x1add();return _0x496a=function(_0x496abd,_0x189fd3){_0x496abd=_0x496abd-0xf2;let _0x265e62=_0x1add72[_0x496abd];return _0x265e62;},_0x496a(_0x4545c7,_0x1e6c0b);}function X(_0x1efdd8,_0xb834a6){const _0x33ba88=_0x228950,_0x26bf13=_0x1efdd8[_0x33ba88(0x148)][0x0];return{..._0xb834a6,'id':_0x26bf13[_0x33ba88(0x129)],'resolved':_0x1efdd8[_0x33ba88(0xfa)]===0x1,'dT':D(_0x26bf13[_0x33ba88(0xfe)]),'personId':_0x26bf13[_0x33ba88(0x10a)],'threadId':_0x26bf13[_0x33ba88(0x105)]};}function ee(_0x244ee3,_0x3da754,_0x537f44){const _0x172bbe=_0x228950;var _0x298f30,_0x521264;if(((_0x521264=(_0x298f30=_0x244ee3==null?void 0x0:_0x244ee3[_0x172bbe(0x148)])==null?void 0x0:_0x298f30[_0x172bbe(0x137)])!=null?_0x521264:0x0)>0x0){const _0x22e68e=(_0x3e9766,_0x7f5a4d)=>({'id':_0x3e9766[_0x172bbe(0x129)],'threadId':_0x3e9766[_0x172bbe(0x105)],'dT':D(_0x3e9766[_0x172bbe(0xfe)]),'personId':_0x3e9766[_0x172bbe(0x10a)],'resolved':_0x244ee3[_0x172bbe(0xfa)]===I[_0x172bbe(0x157)],'unitId':_0x3da754,'subUnitId':_0x537f44,'text':JSON['parse'](_0x3e9766[_0x172bbe(0x10e)]),'parentId':_0x7f5a4d}),_0x10c944=_0x22e68e(_0x244ee3['replies'][0x0]);return{..._0x10c944,'children':_0x244ee3[_0x172bbe(0x148)]['slice'](0x1)[_0x172bbe(0x135)](_0x220860=>_0x22e68e(_0x220860,_0x10c944['id']))};}return null;}function _0x1add(){const _0x5e61f3=['customRanges','UNRECOGNIZED','_threadCommentDataSourceService','/add','addComment','forEach','updateComment','code','resolveComment','replies','listComments','/solved','_config','userID','comments','error','_initUserSync','getCurrentUser','type','values','100100GmvaBu','thread-comment-data-source.config','comment','244017qzflvp','Solved','add','users','onReady','post','onStarting','_sessionService','saveCommentToSnapshot','/reply','solved','1435230ArYezi','_httpService','pluginName','createTimestamp','personId','_init','/universer-api/comment/unit/','OpenOrReOpen','unitId','parse','threadId','filter','Solve','3FNSrok','find','userId','1234XDTRny','_threadCommentModel','commentUpdate$','content','delete','_userService','Edit','_injector','stringify','syncUpdateMutationToColla','getUnit','user','format','addUser','requireSession','_configService','_threadCommentDataSource','148408QsJWKg','748602dmtJyg','Unknown','11QdavXu','/delete','get','resolved','COMMENT','deleteComment','getMemberID','ref','symbol','5038790bOoWVe','replyId','rangeType','YYYY/MM/DD\x20HH:mm','rangeId','Reply','defineProperty','parentId','getOwnPropertyDescriptor','getUser','disposeWithMe','_initDataSource','dataSource','map','body','length','UNIVER_UNKNOWN','_commentService','Delete','217GnPAOE','Add','/edit','24GrmAmp'];_0x1add=function(){return _0x5e61f3;};return _0x1add();}let f=class{constructor(_0x255cc5,_0x286240,_0x29f518,_0x5768cf){const _0x4542bb=_0x228950;this[_0x4542bb(0xfc)]=_0x255cc5,this['_userService']=_0x286240,this['_sessionService']=_0x29f518,this[_0x4542bb(0x112)]=_0x5768cf;}async[_0x228950(0x143)](_0x5a71ed){const _0x21922e=_0x228950;var _0x4cbdd3,_0x1d247f;const {parentId:_0x50965d,unitId:_0x2aa2d3,text:_0x238da3,threadId:_0x33ab66}=_0x5a71ed,_0x352eea=(_0x1d247f=(_0x4cbdd3=_0x238da3[_0x21922e(0x13f)])==null?void 0x0:_0x4cbdd3[_0x21922e(0x106)](_0x5aff46=>_0x5aff46[_0x21922e(0x12a)]===_0x2cf451[_0x21922e(0x123)])[_0x21922e(0x135)](_0x22d0a4=>_0x22d0a4[_0x21922e(0x12c)]))!=null?_0x1d247f:[],_0x57ffaa=JSON['stringify'](_0x238da3),_0x10eb68=(await this['_sessionService'][_0x21922e(0x119)](_0x2aa2d3))[_0x21922e(0x125)]();if(_0x50965d){const _0x133bbe={'memberId':_0x10eb68,'unitId':_0x2aa2d3,'content':_0x57ffaa,'mention':_0x352eea,'threadId':_0x33ab66},_0x13bcb0=(await this['_httpService']['post'](_0x21922e(0x101)+_0x2aa2d3+_0x21922e(0xf9),{'body':_0x133bbe}))['body']['reply'];return{..._0x5a71ed,'id':_0x13bcb0[_0x21922e(0x129)],'dT':_0x2552d3(+_0x13bcb0['createTimestamp'])['format'](_0x21922e(0x12b)),'personId':_0x13bcb0[_0x21922e(0x10a)]};}else{const _0x43a603={'memberId':_0x10eb68,'unitId':_0x2aa2d3,'content':_0x57ffaa,'mention':_0x352eea},_0x464142=await this['_httpService'][_0x21922e(0xf5)](_0x21922e(0x101)+_0x2aa2d3+_0x21922e(0x142),{'body':_0x43a603});return X(_0x464142[_0x21922e(0x136)][_0x21922e(0x155)],_0x5a71ed);}}async[_0x228950(0x145)](_0x92cc7e){const _0x4712b2=_0x228950;var _0x7c326e,_0x2fd128;const {text:_0x8cd053,unitId:_0x4b9120}=_0x92cc7e,_0x5e58e0=(_0x2fd128=(_0x7c326e=_0x8cd053['customRanges'])==null?void 0x0:_0x7c326e[_0x4712b2(0x106)](_0x5be89e=>_0x5be89e['rangeType']===_0x2cf451['COMMENT'])['map'](_0x2067e0=>_0x2067e0[_0x4712b2(0x12c)]))!=null?_0x2fd128:[],_0x28db7e=JSON[_0x4712b2(0x113)](_0x8cd053),_0x8b8ef1=_0x92cc7e[_0x4712b2(0x105)],_0x9eac1b=_0x92cc7e['id'],_0x51ff1e={'memberId':(await this[_0x4712b2(0xf7)]['requireSession'](_0x4b9120))[_0x4712b2(0x125)](),'unitId':_0x4b9120,'threadId':_0x8b8ef1,'mention':_0x5e58e0,'content':_0x28db7e,'replyId':_0x9eac1b},_0x562b35=await this[_0x4712b2(0xfc)]['post'](_0x4712b2(0x101)+_0x4b9120+_0x4712b2(0x13d),{'body':_0x51ff1e});return!_0x562b35[_0x4712b2(0x136)][_0x4712b2(0x14e)]||_0x562b35[_0x4712b2(0x136)][_0x4712b2(0x14e)][_0x4712b2(0x146)]===0x1;}async[_0x228950(0x147)](_0x28d2d6){const _0x28a32c=_0x228950,{unitId:_0xe9e900}=_0x28d2d6,_0x1ec037=_0x28d2d6[_0x28a32c(0x105)],_0x100020={'memberId':this[_0x28a32c(0x110)][_0x28a32c(0x150)]()['userID'],'unitId':_0xe9e900,'threadId':_0x1ec037,'solved':_0x28d2d6[_0x28a32c(0x122)]?I[_0x28a32c(0x157)]:I['OpenOrReOpen']},_0x4676a4=await this['_httpService'][_0x28a32c(0xf5)](_0x28a32c(0x101)+_0xe9e900+_0x28a32c(0x14a),{'body':_0x100020});return!_0x4676a4[_0x28a32c(0x136)][_0x28a32c(0x14e)]||_0x4676a4['body'][_0x28a32c(0x14e)][_0x28a32c(0x146)]===0x1;}async[_0x228950(0x124)](_0xf1b468,_0x396f5c,_0x14ba5b,_0x46cbbd){const _0x41517d=_0x228950,_0x53451d={'memberId':(await this[_0x41517d(0xf7)][_0x41517d(0x119)](_0xf1b468))[_0x41517d(0x125)](),'threadId':_0x14ba5b,'replyId':_0x46cbbd,'unitId':_0xf1b468},_0x4ee1cd=await this['_httpService']['post'](_0x41517d(0x101)+_0xf1b468+_0x41517d(0x120),{'body':_0x53451d});return!_0x4ee1cd['body'][_0x41517d(0x14e)]||_0x4ee1cd[_0x41517d(0x136)][_0x41517d(0x14e)][_0x41517d(0x146)]===0x1;}async[_0x228950(0x149)](_0x508540,_0x45e3eb,_0xfaba8d){const _0x2e6ffb=_0x228950,_0x3cc724={'unitId':_0x508540,'threadId':_0xfaba8d},_0x481081=await this['_httpService'][_0x2e6ffb(0xf5)](_0x2e6ffb(0x101)+_0x508540+'/list',{'body':_0x3cc724}),_0x396594=_0xfaba8d['map'](_0x14f6b0=>ee(_0x481081[_0x2e6ffb(0x136)][_0x2e6ffb(0x14d)][_0x14f6b0],_0x508540,_0x45e3eb))[_0x2e6ffb(0x106)](Boolean);return Object[_0x2e6ffb(0x152)](_0x481081[_0x2e6ffb(0x136)]['users'])[_0x2e6ffb(0x144)](_0x120757=>{const _0x20ece8=_0x2e6ffb;this[_0x20ece8(0x110)][_0x20ece8(0x118)](_0x120757);}),_0x396594;}[_0x228950(0xf8)](_0xfb3659){const _0x1124c4=_0x228950;return{'id':_0xfb3659['id'],'threadId':_0xfb3659[_0x1124c4(0x105)],'ref':_0xfb3659[_0x1124c4(0x126)]};}};f=Q([_(0x0,_0xee2d6d(_0x490830)),_(0x1,_0xee2d6d(_0x44d1fc)),_(0x2,_0xee2d6d(_0x625313)),_(0x3,_0xee2d6d(_0x4801df))],f);var re=Object[_0x228950(0x130)],te=(_0x3fec26,_0x576a0e,_0x143167,_0x22f35f)=>{for(var _0x4b61d2=_0x22f35f>0x1?void 0x0:_0x22f35f?re(_0x576a0e,_0x143167):_0x576a0e,_0x129c2c=_0x3fec26['length']-0x1,_0x150035;_0x129c2c>=0x0;_0x129c2c--)(_0x150035=_0x3fec26[_0x129c2c])&&(_0x4b61d2=_0x150035(_0x4b61d2)||_0x4b61d2);return _0x4b61d2;},N=(_0x49e23d,_0x12d7ca)=>(_0x68a343,_0x2a9bcc)=>_0x12d7ca(_0x68a343,_0x2a9bcc,_0x49e23d);let g=class extends _0x48bbe7{constructor(_0x2313b0,_0x5626d5){const _0x3e0a29=_0x228950;super(),this[_0x3e0a29(0x141)]=_0x2313b0,this[_0x3e0a29(0x11b)]=_0x5626d5,this[_0x3e0a29(0x133)]();}[_0x228950(0x133)](){const _0x90c8cb=_0x228950;this[_0x90c8cb(0x141)][_0x90c8cb(0x134)]=this[_0x90c8cb(0x11b)],this['_threadCommentDataSourceService'][_0x90c8cb(0x114)]=!0x1;}};g=te([N(0x0,_0x2e0912),N(0x1,_0xee2d6d(f))],g);var se=Object[_0x228950(0x12e)],oe=Object[_0x228950(0x130)],ne=(_0xbd62b0,_0x2f8557,_0x220a3f)=>_0x2f8557 in _0xbd62b0?se(_0xbd62b0,_0x2f8557,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x220a3f}):_0xbd62b0[_0x2f8557]=_0x220a3f,ie=(_0x3f58f2,_0x18272a,_0x8ea51e,_0x1bf23e)=>{const _0x1b8aa4=_0x228950;for(var _0x32245a=_0x1bf23e>0x1?void 0x0:_0x1bf23e?oe(_0x18272a,_0x8ea51e):_0x18272a,_0xd447d5=_0x3f58f2[_0x1b8aa4(0x137)]-0x1,_0x2158dc;_0xd447d5>=0x0;_0xd447d5--)(_0x2158dc=_0x3f58f2[_0xd447d5])&&(_0x32245a=_0x2158dc(_0x32245a)||_0x32245a);return _0x32245a;},w=(_0x211b06,_0x5480c9)=>(_0x49ddd9,_0x467914)=>_0x5480c9(_0x49ddd9,_0x467914,_0x211b06),$=(_0x22eb36,_0x5a74e7,_0x2e82e9)=>ne(_0x22eb36,typeof _0x5a74e7!=_0x228950(0x127)?_0x5a74e7+'':_0x5a74e7,_0x2e82e9);let b=class extends _0x1ef7b8{constructor(_0xd6ce28=M,_0x524328,_0x87170a){const _0x44cfe2=_0x228950;super(),this[_0x44cfe2(0x14b)]=_0xd6ce28,this['_injector']=_0x524328,this[_0x44cfe2(0x11a)]=_0x87170a;const {..._0x3f8c4d}=_0x1ce58b({},M,this[_0x44cfe2(0x14b)]);this[_0x44cfe2(0x11a)]['setConfig'](z,_0x3f8c4d);}[_0x228950(0xf6)](){[[f],[g],[S]]['forEach'](_0x56009f=>{const _0x22e651=_0x496a;this[_0x22e651(0x112)][_0x22e651(0xf2)](_0x56009f);});}[_0x228950(0xf4)](){const _0x295f2a=_0x228950;this[_0x295f2a(0x112)][_0x295f2a(0x121)](g),this[_0x295f2a(0x112)][_0x295f2a(0x121)](S);}};$(b,_0x228950(0xfd),W),$(b,_0x228950(0x151),_0x45a423[_0x228950(0x138)]),b=ie([_0x1fb97b(_0x3e15e4,_0x4ce1bf,_0x1f5fb3),w(0x1,_0xee2d6d(_0x4801df)),w(0x2,_0x415962)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2069b1=_0x43de;(function(_0x380a17,_0x180abc){const _0x512c22=_0x43de,_0xf23808=_0x380a17();while(!![]){try{const _0x23b653=-parseInt(_0x512c22(0x202))/0x1*(-parseInt(_0x512c22(0x211))/0x2)+parseInt(_0x512c22(0x212))/0x3*(parseInt(_0x512c22(0x1f7))/0x4)+parseInt(_0x512c22(0x204))/0x5*(-parseInt(_0x512c22(0x235))/0x6)+-parseInt(_0x512c22(0x20f))/0x7+parseInt(_0x512c22(0x231))/0x8*(-parseInt(_0x512c22(0x1ed))/0x9)+-parseInt(_0x512c22(0x1f1))/0xa+parseInt(_0x512c22(0x249))/0xb;if(_0x23b653===_0x180abc)break;else _0xf23808['push'](_0xf23808['shift']());}catch(_0x4008b3){_0xf23808['push'](_0xf23808['shift']());}}}(_0x5a9a,0xc9b63));import{CommentService as _0x13b92b,CollaborationSessionService as _0x497b32,UniverCollaborationClientPlugin as _0x293a48}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x177d79}from'@univerjs-pro/license';import{dayjs as _0x3db8db,UserManagerService as _0x4a0daf,Inject as _0x29435d,Injector as _0x4a982a,Disposable as _0xcf5e6a,CustomRangeType as _0x20a37b,UniverInstanceType as _0x388da4,DependentOn as _0x4bdd65,IConfigService as _0x10e4b8,Plugin as _0x336457,merge as _0x29ae8d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x40bc7d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x307483,IThreadCommentDataSourceService as _0x50d99d}from'@univerjs/thread-comment';import{bufferTime as _0x2cdc2a}from'rxjs';import{HTTPService as _0x28bbac}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2869f4=>(_0x2869f4[_0x2869f4['OpenOrReOpen']=0x0]=_0x2069b1(0x246),_0x2869f4[_0x2869f4[_0x2069b1(0x23a)]=0x1]='Solved',_0x2869f4[_0x2869f4[_0x2069b1(0x208)]=-0x1]='UNRECOGNIZED',_0x2869f4))(I||{}),v=(_0x4886b4=>(_0x4886b4[_0x4886b4[_0x2069b1(0x22a)]=0x0]=_0x2069b1(0x22a),_0x4886b4[_0x4886b4['Add']=0x1]=_0x2069b1(0x1ec),_0x4886b4[_0x4886b4[_0x2069b1(0x245)]=0x2]=_0x2069b1(0x245),_0x4886b4[_0x4886b4[_0x2069b1(0x244)]=0x3]=_0x2069b1(0x244),_0x4886b4[_0x4886b4[_0x2069b1(0x20d)]=0x4]=_0x2069b1(0x20d),_0x4886b4[_0x4886b4[_0x2069b1(0x241)]=0x5]=_0x2069b1(0x241),_0x4886b4[_0x4886b4[_0x2069b1(0x208)]=-0x1]=_0x2069b1(0x208),_0x4886b4))(v||{});const D=_0x370191=>_0x3db8db(new Date(+_0x370191))[_0x2069b1(0x210)](_0x2069b1(0x232)),B=async(_0x191f0d,_0x23776b)=>{const _0x187ad9=_0x2069b1,_0x3ecd4a=_0x191f0d[_0x187ad9(0x1f8)](_0x4a0daf),_0x478deb=_0x191f0d[_0x187ad9(0x1f8)](_0x28bbac);_0x23776b[_0x187ad9(0x206)](_0x3b836a=>{_0x3ecd4a['getUser'](_0x3b836a)&&_0x23776b['delete'](_0x3b836a);}),_0x23776b['size']&&(await _0x478deb[_0x187ad9(0x1f8)](_0x187ad9(0x1f3),{'params':{'userIDs':[..._0x23776b]}}))[_0x187ad9(0x1eb)][_0x187ad9(0x236)][_0x187ad9(0x206)](_0x2ab20f=>{const _0x28dba8=_0x187ad9;_0x2ab20f&&_0x3ecd4a[_0x28dba8(0x1fd)](_0x2ab20f);});};var K=Object[_0x2069b1(0x1f0)],V=(_0xc1efc,_0x23a962,_0x2f879a,_0x39b1b5)=>{const _0x48ea24=_0x2069b1;for(var _0x2271cc=_0x39b1b5>0x1?void 0x0:_0x39b1b5?K(_0x23a962,_0x2f879a):_0x23a962,_0x442cad=_0xc1efc[_0x48ea24(0x243)]-0x1,_0x140cdf;_0x442cad>=0x0;_0x442cad--)(_0x140cdf=_0xc1efc[_0x442cad])&&(_0x2271cc=_0x140cdf(_0x2271cc)||_0x2271cc);return _0x2271cc;},p=(_0x20cc3e,_0x213cb1)=>(_0x4562f0,_0x36ca17)=>_0x213cb1(_0x4562f0,_0x36ca17,_0x20cc3e);let S=class extends _0xcf5e6a{constructor(_0x5e4639,_0x4ad17a,_0x1df9ef,_0x43e464){const _0x592c51=_0x2069b1;super(),this[_0x592c51(0x1f2)]=_0x5e4639,this[_0x592c51(0x201)]=_0x4ad17a,this['_userService']=_0x1df9ef,this['_injector']=_0x43e464,this['_init'](),this[_0x592c51(0x217)]();}['_initUserSync'](){const _0x1bb593=_0x2069b1;this['disposeWithMe'](this[_0x1bb593(0x201)][_0x1bb593(0x21a)][_0x1bb593(0x1e6)](_0x2cdc2a(0x10))[_0x1bb593(0x242)](_0x14c196=>{const _0x5196a3=_0x1bb593,_0x1ac635=new Set();_0x14c196[_0x5196a3(0x206)](_0x5f3b47=>{const _0x8685af=_0x5196a3;switch(_0x5f3b47[_0x8685af(0x229)]){case _0x8685af(0x226):{const _0x3eb9ac=_0x5f3b47[_0x8685af(0x239)]['personId'];_0x1ac635[_0x8685af(0x226)](_0x3eb9ac);break;}}}),B(this[_0x5196a3(0x20e)],_0x1ac635);}));}['_init'](){const _0x191103=_0x2069b1;this['disposeWithMe'](this[_0x191103(0x1f2)][_0x191103(0x21a)]['subscribe'](async _0x576bff=>{const _0x54e210=_0x191103;var _0x1e86ed,_0x513627,_0x562641,_0x5c215c;const _0x3fe2bf=(_0x1e86ed=this['_threadCommentModel'][_0x54e210(0x22d)](_0x576bff[_0x54e210(0x21d)])[_0x54e210(0x21c)](_0xc814d3=>_0xc814d3[_0x54e210(0x233)]===_0x576bff[_0x54e210(0x233)]))==null?void 0x0:_0x1e86ed[_0x54e210(0x1fb)];if(!_0x3fe2bf)return;const {unitId:_0x38e42b,subUnitId:_0x32a05e}=_0x3fe2bf;switch(_0x576bff[_0x54e210(0x22b)]&&this[_0x54e210(0x224)][_0x54e210(0x1fd)](_0x576bff['user']),_0x576bff[_0x54e210(0x229)]){case v[_0x54e210(0x1ec)]:break;case v['Reply']:{this['_threadCommentModel'][_0x54e210(0x1e8)](_0x38e42b,_0x32a05e,{'unitId':_0x38e42b,'subUnitId':_0x32a05e,'ref':'','id':_0x576bff[_0x54e210(0x23e)],'dT':D(+_0x576bff[_0x54e210(0x23c)]),'threadId':_0x576bff[_0x54e210(0x233)],'personId':(_0x562641=(_0x513627=_0x576bff[_0x54e210(0x22b)])==null?void 0x0:_0x513627[_0x54e210(0x214)])!=null?_0x562641:_0x576bff[_0x54e210(0x223)],'text':JSON[_0x54e210(0x216)](_0x576bff[_0x54e210(0x238)]),'parentId':_0x3fe2bf['id']});break;}case v[_0x54e210(0x20d)]:{const _0x15bd4d=this[_0x54e210(0x201)][_0x54e210(0x215)](_0x38e42b,_0x32a05e,_0x576bff[_0x54e210(0x23e)]);_0x15bd4d&&_0x15bd4d[_0x54e210(0x209)]&&this[_0x54e210(0x201)]['deleteComment'](_0x38e42b,_0x32a05e,_0x576bff[_0x54e210(0x23e)]);break;}case v[_0x54e210(0x244)]:{this[_0x54e210(0x201)][_0x54e210(0x22c)](_0x38e42b,_0x32a05e,{'commentId':_0x576bff['replyId'],'text':JSON['parse'](_0x576bff[_0x54e210(0x238)])});break;}case v['Solve']:{const _0x50c2c4=(_0x5c215c=this[_0x54e210(0x201)][_0x54e210(0x22d)](_0x576bff[_0x54e210(0x21d)])[_0x54e210(0x21c)](_0x107d79=>_0x107d79[_0x54e210(0x233)]===_0x576bff['threadId']))==null?void 0x0:_0x5c215c[_0x54e210(0x1fb)];_0x50c2c4&&this[_0x54e210(0x201)][_0x54e210(0x1f6)](_0x38e42b,_0x32a05e,_0x50c2c4['id'],_0x576bff['solved']===I[_0x54e210(0x23a)]);break;}}}));}};function _0x5a9a(){const _0x5366f2=['commentUpdate$','replies','find','unitId','saveCommentToSnapshot','_httpService','dataSource','stringify','solved','userId','_userService','/solved','add','_configService','setConfig','type','Unknown','user','updateComment','getUnit','/edit','/reply','filter','69256DAIiqt','YYYY/MM/DD\x20HH:mm','threadId','pluginName','2082jCSCpC','users','symbol','content','payload','Solved','_threadCommentDataSource','createTimestamp','getMemberID','replyId','_sessionService','post','Solve','subscribe','length','Edit','Reply','OpenOrReOpen','rangeType','syncUpdateMutationToColla','31023069BMRycz','reply','pipe','customRanges','addComment','map','_threadCommentDataSourceService','body','Add','1629QhDmIA','onStarting','error','getOwnPropertyDescriptor','7244530jbqmzq','_commentService','/universer-api/user/list','COMMENT','values','resolveComment','36YvsnLp','get','/add','ref','root','requireSession','addUser','_config','UNIVER_UNKNOWN','comment','_threadCommentModel','424AGAVSP','listComments','10655TPPakK','rangeId','forEach','getCurrentUser','UNRECOGNIZED','parentId','code','/universer-api/comment/unit/','/delete','Delete','_injector','3187954BAQHAN','format','844drDleX','437751EsPYEn','thread-comment-data-source.config','userID','getComment','parse','_initUserSync','_initDataSource','defineProperty'];_0x5a9a=function(){return _0x5366f2;};return _0x5a9a();}function _0x43de(_0x266f57,_0xd09ba3){const _0x5a9a09=_0x5a9a();return _0x43de=function(_0x43de40,_0x5853ef){_0x43de40=_0x43de40-0x1e6;let _0x3a8bd3=_0x5a9a09[_0x43de40];return _0x3a8bd3;},_0x43de(_0x266f57,_0xd09ba3);}S=V([p(0x0,_0x29435d(_0x13b92b)),p(0x1,_0x29435d(_0x307483)),p(0x2,_0x29435d(_0x4a0daf)),p(0x3,_0x29435d(_0x4a982a))],S);const z=_0x2069b1(0x213),M={};var k=Object[_0x2069b1(0x1f0)],Q=(_0x4b650e,_0x2d1575,_0x32a1f4,_0x254d33)=>{for(var _0x4ff3c5=_0x254d33>0x1?void 0x0:_0x254d33?k(_0x2d1575,_0x32a1f4):_0x2d1575,_0xcc5436=_0x4b650e['length']-0x1,_0x3c0264;_0xcc5436>=0x0;_0xcc5436--)(_0x3c0264=_0x4b650e[_0xcc5436])&&(_0x4ff3c5=_0x3c0264(_0x4ff3c5)||_0x4ff3c5);return _0x4ff3c5;},_=(_0x2bd5f4,_0x32c032)=>(_0x28a6e4,_0x3e8e36)=>_0x32c032(_0x28a6e4,_0x3e8e36,_0x2bd5f4);function X(_0x2f4f42,_0x2b125f){const _0x51c332=_0x2069b1,_0x5056fc=_0x2f4f42[_0x51c332(0x21b)][0x0];return{..._0x2b125f,'id':_0x5056fc['replyId'],'resolved':_0x2f4f42[_0x51c332(0x222)]===0x1,'dT':D(_0x5056fc[_0x51c332(0x23c)]),'personId':_0x5056fc[_0x51c332(0x223)],'threadId':_0x5056fc[_0x51c332(0x233)]};}function ee(_0x300d9d,_0x1645fb,_0x3e6823){const _0x1e4b94=_0x2069b1;var _0x395378,_0x3d0378;if(((_0x3d0378=(_0x395378=_0x300d9d==null?void 0x0:_0x300d9d[_0x1e4b94(0x21b)])==null?void 0x0:_0x395378[_0x1e4b94(0x243)])!=null?_0x3d0378:0x0)>0x0){const _0x2be729=(_0x1fe7c3,_0x22b6aa)=>({'id':_0x1fe7c3[_0x1e4b94(0x23e)],'threadId':_0x1fe7c3['threadId'],'dT':D(_0x1fe7c3[_0x1e4b94(0x23c)]),'personId':_0x1fe7c3[_0x1e4b94(0x223)],'resolved':_0x300d9d[_0x1e4b94(0x222)]===I[_0x1e4b94(0x23a)],'unitId':_0x1645fb,'subUnitId':_0x3e6823,'text':JSON[_0x1e4b94(0x216)](_0x1fe7c3['content']),'parentId':_0x22b6aa}),_0x25549e=_0x2be729(_0x300d9d['replies'][0x0]);return{..._0x25549e,'children':_0x300d9d['replies']['slice'](0x1)[_0x1e4b94(0x1e9)](_0x42081c=>_0x2be729(_0x42081c,_0x25549e['id']))};}return null;}let f=class{constructor(_0x2973e1,_0x4c581d,_0x4112ae,_0x3c713d){const _0x4f683f=_0x2069b1;this[_0x4f683f(0x21f)]=_0x2973e1,this[_0x4f683f(0x224)]=_0x4c581d,this[_0x4f683f(0x23f)]=_0x4112ae,this['_injector']=_0x3c713d;}async[_0x2069b1(0x1e8)](_0x57ba0c){const _0xc74b=_0x2069b1;var _0x260f16,_0x3aec62;const {parentId:_0x37b97d,unitId:_0x25ebf1,text:_0x5881ae,threadId:_0x208bba}=_0x57ba0c,_0x22a188=(_0x3aec62=(_0x260f16=_0x5881ae['customRanges'])==null?void 0x0:_0x260f16['filter'](_0x4cf826=>_0x4cf826['rangeType']===_0x20a37b[_0xc74b(0x1f4)])[_0xc74b(0x1e9)](_0x4947a6=>_0x4947a6[_0xc74b(0x205)]))!=null?_0x3aec62:[],_0x53dc8e=JSON['stringify'](_0x5881ae),_0x2893aa=(await this[_0xc74b(0x23f)][_0xc74b(0x1fc)](_0x25ebf1))[_0xc74b(0x23d)]();if(_0x37b97d){const _0x447f4c={'memberId':_0x2893aa,'unitId':_0x25ebf1,'content':_0x53dc8e,'mention':_0x22a188,'threadId':_0x208bba},_0x8537e3=(await this[_0xc74b(0x21f)][_0xc74b(0x240)](_0xc74b(0x20b)+_0x25ebf1+_0xc74b(0x22f),{'body':_0x447f4c}))[_0xc74b(0x1eb)][_0xc74b(0x24a)];return{..._0x57ba0c,'id':_0x8537e3[_0xc74b(0x23e)],'dT':_0x3db8db(+_0x8537e3['createTimestamp'])[_0xc74b(0x210)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x8537e3['userId']};}else{const _0xbaf400={'memberId':_0x2893aa,'unitId':_0x25ebf1,'content':_0x53dc8e,'mention':_0x22a188},_0x3beb00=await this[_0xc74b(0x21f)][_0xc74b(0x240)]('/universer-api/comment/unit/'+_0x25ebf1+_0xc74b(0x1f9),{'body':_0xbaf400});return X(_0x3beb00['body'][_0xc74b(0x200)],_0x57ba0c);}}async['updateComment'](_0x33469c){const _0x2bb8dd=_0x2069b1;var _0x57cd8f,_0x326866;const {text:_0x3d2d88,unitId:_0x484fbb}=_0x33469c,_0x23435a=(_0x326866=(_0x57cd8f=_0x3d2d88[_0x2bb8dd(0x1e7)])==null?void 0x0:_0x57cd8f[_0x2bb8dd(0x230)](_0x52c847=>_0x52c847[_0x2bb8dd(0x247)]===_0x20a37b['COMMENT'])[_0x2bb8dd(0x1e9)](_0x24efd7=>_0x24efd7['rangeId']))!=null?_0x326866:[],_0x136a5a=JSON[_0x2bb8dd(0x221)](_0x3d2d88),_0x161502=_0x33469c[_0x2bb8dd(0x233)],_0x100d9b=_0x33469c['id'],_0x504d21={'memberId':(await this[_0x2bb8dd(0x23f)][_0x2bb8dd(0x1fc)](_0x484fbb))['getMemberID'](),'unitId':_0x484fbb,'threadId':_0x161502,'mention':_0x23435a,'content':_0x136a5a,'replyId':_0x100d9b},_0x54da1f=await this[_0x2bb8dd(0x21f)][_0x2bb8dd(0x240)](_0x2bb8dd(0x20b)+_0x484fbb+_0x2bb8dd(0x22e),{'body':_0x504d21});return!_0x54da1f[_0x2bb8dd(0x1eb)][_0x2bb8dd(0x1ef)]||_0x54da1f[_0x2bb8dd(0x1eb)][_0x2bb8dd(0x1ef)][_0x2bb8dd(0x20a)]===0x1;}async[_0x2069b1(0x1f6)](_0x526be0){const _0x2c8d26=_0x2069b1,{unitId:_0x3222c2}=_0x526be0,_0x4d38e0=_0x526be0[_0x2c8d26(0x233)],_0x2d0a68={'memberId':this[_0x2c8d26(0x224)][_0x2c8d26(0x207)]()[_0x2c8d26(0x214)],'unitId':_0x3222c2,'threadId':_0x4d38e0,'solved':_0x526be0['resolved']?I['Solved']:I[_0x2c8d26(0x246)]},_0x36fd32=await this['_httpService'][_0x2c8d26(0x240)](_0x2c8d26(0x20b)+_0x3222c2+_0x2c8d26(0x225),{'body':_0x2d0a68});return!_0x36fd32[_0x2c8d26(0x1eb)]['error']||_0x36fd32[_0x2c8d26(0x1eb)][_0x2c8d26(0x1ef)][_0x2c8d26(0x20a)]===0x1;}async['deleteComment'](_0x23cc3f,_0x570924,_0x20daa7,_0x2c124e){const _0x5168ef=_0x2069b1,_0x406cea={'memberId':(await this[_0x5168ef(0x23f)][_0x5168ef(0x1fc)](_0x23cc3f))[_0x5168ef(0x23d)](),'threadId':_0x20daa7,'replyId':_0x2c124e,'unitId':_0x23cc3f},_0x575c63=await this[_0x5168ef(0x21f)]['post']('/universer-api/comment/unit/'+_0x23cc3f+_0x5168ef(0x20c),{'body':_0x406cea});return!_0x575c63['body'][_0x5168ef(0x1ef)]||_0x575c63[_0x5168ef(0x1eb)][_0x5168ef(0x1ef)]['code']===0x1;}async[_0x2069b1(0x203)](_0x5bf68c,_0x1da9d9,_0x13095e){const _0x5f1305=_0x2069b1,_0x917eb7={'unitId':_0x5bf68c,'threadId':_0x13095e},_0x1de068=await this[_0x5f1305(0x21f)][_0x5f1305(0x240)](_0x5f1305(0x20b)+_0x5bf68c+'/list',{'body':_0x917eb7}),_0x58a87f=_0x13095e['map'](_0x38c997=>ee(_0x1de068[_0x5f1305(0x1eb)]['comments'][_0x38c997],_0x5bf68c,_0x1da9d9))[_0x5f1305(0x230)](Boolean);return Object[_0x5f1305(0x1f5)](_0x1de068[_0x5f1305(0x1eb)][_0x5f1305(0x236)])[_0x5f1305(0x206)](_0x1a2e90=>{const _0x29c53b=_0x5f1305;this[_0x29c53b(0x224)][_0x29c53b(0x1fd)](_0x1a2e90);}),_0x58a87f;}[_0x2069b1(0x21e)](_0x5b685d){const _0x35c709=_0x2069b1;return{'id':_0x5b685d['id'],'threadId':_0x5b685d['threadId'],'ref':_0x5b685d[_0x35c709(0x1fa)]};}};f=Q([_(0x0,_0x29435d(_0x28bbac)),_(0x1,_0x29435d(_0x4a0daf)),_(0x2,_0x29435d(_0x497b32)),_(0x3,_0x29435d(_0x4a982a))],f);var re=Object[_0x2069b1(0x1f0)],te=(_0x53a279,_0x1e8bf8,_0x5da0b2,_0x41acd3)=>{const _0x4f0473=_0x2069b1;for(var _0x402979=_0x41acd3>0x1?void 0x0:_0x41acd3?re(_0x1e8bf8,_0x5da0b2):_0x1e8bf8,_0x8614a8=_0x53a279[_0x4f0473(0x243)]-0x1,_0x3993e3;_0x8614a8>=0x0;_0x8614a8--)(_0x3993e3=_0x53a279[_0x8614a8])&&(_0x402979=_0x3993e3(_0x402979)||_0x402979);return _0x402979;},N=(_0x3edf70,_0x404ed6)=>(_0x342394,_0x2ea15a)=>_0x404ed6(_0x342394,_0x2ea15a,_0x3edf70);let g=class extends _0xcf5e6a{constructor(_0x10394d,_0x3d1afd){const _0x31a5c4=_0x2069b1;super(),this[_0x31a5c4(0x1ea)]=_0x10394d,this[_0x31a5c4(0x23b)]=_0x3d1afd,this['_initDataSource']();}[_0x2069b1(0x218)](){const _0x3ee648=_0x2069b1;this['_threadCommentDataSourceService'][_0x3ee648(0x220)]=this['_threadCommentDataSource'],this[_0x3ee648(0x1ea)][_0x3ee648(0x248)]=!0x1;}};g=te([N(0x0,_0x50d99d),N(0x1,_0x29435d(f))],g);var se=Object[_0x2069b1(0x219)],oe=Object[_0x2069b1(0x1f0)],ne=(_0x145b1f,_0x1d1939,_0x483275)=>_0x1d1939 in _0x145b1f?se(_0x145b1f,_0x1d1939,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x483275}):_0x145b1f[_0x1d1939]=_0x483275,ie=(_0x5c0722,_0x1a2999,_0x186fe8,_0x27cb6)=>{for(var _0x23c14e=_0x27cb6>0x1?void 0x0:_0x27cb6?oe(_0x1a2999,_0x186fe8):_0x1a2999,_0x3aa58f=_0x5c0722['length']-0x1,_0x296568;_0x3aa58f>=0x0;_0x3aa58f--)(_0x296568=_0x5c0722[_0x3aa58f])&&(_0x23c14e=_0x296568(_0x23c14e)||_0x23c14e);return _0x23c14e;},w=(_0x9c69e8,_0x3e5640)=>(_0x5c9264,_0x5b91d0)=>_0x3e5640(_0x5c9264,_0x5b91d0,_0x9c69e8),$=(_0x1188fa,_0xecfa3c,_0x3f0e32)=>ne(_0x1188fa,typeof _0xecfa3c!=_0x2069b1(0x237)?_0xecfa3c+'':_0xecfa3c,_0x3f0e32);let b=class extends _0x336457{constructor(_0x5b7b71=M,_0x54a116,_0x232ede){const _0x4a7efd=_0x2069b1;super(),this[_0x4a7efd(0x1fe)]=_0x5b7b71,this['_injector']=_0x54a116,this[_0x4a7efd(0x227)]=_0x232ede;const {..._0x55939b}=_0x29ae8d({},M,this[_0x4a7efd(0x1fe)]);this[_0x4a7efd(0x227)][_0x4a7efd(0x228)](z,_0x55939b);}[_0x2069b1(0x1ee)](){[[f],[g],[S]]['forEach'](_0x53b308=>{const _0x125688=_0x43de;this[_0x125688(0x20e)]['add'](_0x53b308);});}['onReady'](){const _0x828de8=_0x2069b1;this['_injector'][_0x828de8(0x1f8)](g),this[_0x828de8(0x20e)][_0x828de8(0x1f8)](S);}};$(b,_0x2069b1(0x234),W),$(b,_0x2069b1(0x229),_0x388da4[_0x2069b1(0x1ff)]),b=ie([_0x4bdd65(_0x40bc7d,_0x293a48,_0x177d79),w(0x1,_0x29435d(_0x4a982a)),w(0x2,_0x10e4b8)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x228950=_0x496a;(function(_0x2e629a,_0x238f1f){const _0x3b6c98=_0x496a,_0x2be1d7=_0x2e629a();while(!![]){try{const _0x24f24e=parseInt(_0x3b6c98(0x13b))/0x1*(parseInt(_0x3b6c98(0x10b))/0x2)+-parseInt(_0x3b6c98(0x108))/0x3*(parseInt(_0x3b6c98(0x11c))/0x4)+-parseInt(_0x3b6c98(0xfb))/0x5+parseInt(_0x3b6c98(0x11d))/0x6+parseInt(_0x3b6c98(0x153))/0x7+parseInt(_0x3b6c98(0x13e))/0x8*(-parseInt(_0x3b6c98(0x156))/0x9)+-parseInt(_0x3b6c98(0x128))/0xa*(-parseInt(_0x3b6c98(0x11f))/0xb);if(_0x24f24e===_0x238f1f)break;else _0x2be1d7['push'](_0x2be1d7['shift']());}catch(_0x57b745){_0x2be1d7['push'](_0x2be1d7['shift']());}}}(_0x1add,0x5aa94));import{CommentService as _0x775931,CollaborationSessionService as _0x625313,UniverCollaborationClientPlugin as _0x4ce1bf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1f5fb3}from'@univerjs-pro/license';import{dayjs as _0x2552d3,UserManagerService as _0x44d1fc,Inject as _0xee2d6d,Injector as _0x4801df,Disposable as _0x48bbe7,CustomRangeType as _0x2cf451,UniverInstanceType as _0x45a423,DependentOn as _0x1fb97b,IConfigService as _0x415962,Plugin as _0x1ef7b8,merge as _0x1ce58b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3e15e4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x24ff45,IThreadCommentDataSourceService as _0x2e0912}from'@univerjs/thread-comment';import{bufferTime as _0x3eb001}from'rxjs';import{HTTPService as _0x490830}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4f936b=>(_0x4f936b[_0x4f936b[_0x228950(0x102)]=0x0]=_0x228950(0x102),_0x4f936b[_0x4f936b[_0x228950(0x157)]=0x1]=_0x228950(0x157),_0x4f936b[_0x4f936b[_0x228950(0x140)]=-0x1]=_0x228950(0x140),_0x4f936b))(I||{}),v=(_0x5252ec=>(_0x5252ec[_0x5252ec['Unknown']=0x0]=_0x228950(0x11e),_0x5252ec[_0x5252ec['Add']=0x1]=_0x228950(0x13c),_0x5252ec[_0x5252ec['Reply']=0x2]=_0x228950(0x12d),_0x5252ec[_0x5252ec['Edit']=0x3]=_0x228950(0x111),_0x5252ec[_0x5252ec[_0x228950(0x13a)]=0x4]=_0x228950(0x13a),_0x5252ec[_0x5252ec[_0x228950(0x107)]=0x5]=_0x228950(0x107),_0x5252ec[_0x5252ec['UNRECOGNIZED']=-0x1]=_0x228950(0x140),_0x5252ec))(v||{});const D=_0x227c78=>_0x2552d3(new Date(+_0x227c78))[_0x228950(0x117)](_0x228950(0x12b)),B=async(_0x130a41,_0xc131f9)=>{const _0x1c2f2b=_0x228950,_0x217d33=_0x130a41[_0x1c2f2b(0x121)](_0x44d1fc),_0x390e52=_0x130a41['get'](_0x490830);_0xc131f9[_0x1c2f2b(0x144)](_0x15a4fe=>{const _0x3add9e=_0x1c2f2b;_0x217d33[_0x3add9e(0x131)](_0x15a4fe)&&_0xc131f9[_0x3add9e(0x10f)](_0x15a4fe);}),_0xc131f9['size']&&(await _0x390e52[_0x1c2f2b(0x121)]('/universer-api/user/list',{'params':{'userIDs':[..._0xc131f9]}}))[_0x1c2f2b(0x136)][_0x1c2f2b(0xf3)]['forEach'](_0x294e4e=>{const _0x163187=_0x1c2f2b;_0x294e4e&&_0x217d33[_0x163187(0x118)](_0x294e4e);});};var K=Object[_0x228950(0x130)],V=(_0x39a52b,_0x410db0,_0xa1c7a7,_0x490309)=>{const _0x736133=_0x228950;for(var _0x23f9d8=_0x490309>0x1?void 0x0:_0x490309?K(_0x410db0,_0xa1c7a7):_0x410db0,_0xc15c2b=_0x39a52b[_0x736133(0x137)]-0x1,_0x23f585;_0xc15c2b>=0x0;_0xc15c2b--)(_0x23f585=_0x39a52b[_0xc15c2b])&&(_0x23f9d8=_0x23f585(_0x23f9d8)||_0x23f9d8);return _0x23f9d8;},p=(_0x3864d6,_0xc9cd8f)=>(_0x3ceb27,_0x4df8d5)=>_0xc9cd8f(_0x3ceb27,_0x4df8d5,_0x3864d6);let S=class extends _0x48bbe7{constructor(_0x5ca55d,_0x6a3c64,_0x13c37c,_0x10b2e3){const _0x590ff7=_0x228950;super(),this['_commentService']=_0x5ca55d,this['_threadCommentModel']=_0x6a3c64,this[_0x590ff7(0x110)]=_0x13c37c,this[_0x590ff7(0x112)]=_0x10b2e3,this[_0x590ff7(0x100)](),this[_0x590ff7(0x14f)]();}[_0x228950(0x14f)](){const _0x1d303c=_0x228950;this[_0x1d303c(0x132)](this[_0x1d303c(0x10c)][_0x1d303c(0x10d)]['pipe'](_0x3eb001(0x10))['subscribe'](_0xfbfa45=>{const _0x30213f=_0x1d303c,_0x1c89da=new Set();_0xfbfa45['forEach'](_0x35532d=>{const _0x41539f=_0x496a;switch(_0x35532d[_0x41539f(0x151)]){case'add':{const _0x513d6a=_0x35532d['payload'][_0x41539f(0xff)];_0x1c89da[_0x41539f(0xf2)](_0x513d6a);break;}}}),B(this[_0x30213f(0x112)],_0x1c89da);}));}['_init'](){const _0x224126=_0x228950;this[_0x224126(0x132)](this[_0x224126(0x139)][_0x224126(0x10d)]['subscribe'](async _0x4155a2=>{const _0x9be0da=_0x224126;var _0x44bb25,_0x55532a,_0x4cb58f,_0x42e6eb;const _0xba405b=(_0x44bb25=this['_threadCommentModel'][_0x9be0da(0x115)](_0x4155a2['unitId'])[_0x9be0da(0x109)](_0x4c34f6=>_0x4c34f6['threadId']===_0x4155a2[_0x9be0da(0x105)]))==null?void 0x0:_0x44bb25['root'];if(!_0xba405b)return;const {unitId:_0x3c4cfd,subUnitId:_0x5e3e5f}=_0xba405b;switch(_0x4155a2[_0x9be0da(0x116)]&&this[_0x9be0da(0x110)]['addUser'](_0x4155a2[_0x9be0da(0x116)]),_0x4155a2[_0x9be0da(0x151)]){case v[_0x9be0da(0x13c)]:break;case v['Reply']:{this[_0x9be0da(0x10c)]['addComment'](_0x3c4cfd,_0x5e3e5f,{'unitId':_0x3c4cfd,'subUnitId':_0x5e3e5f,'ref':'','id':_0x4155a2['replyId'],'dT':D(+_0x4155a2[_0x9be0da(0xfe)]),'threadId':_0x4155a2[_0x9be0da(0x105)],'personId':(_0x4cb58f=(_0x55532a=_0x4155a2[_0x9be0da(0x116)])==null?void 0x0:_0x55532a[_0x9be0da(0x14c)])!=null?_0x4cb58f:_0x4155a2[_0x9be0da(0x10a)],'text':JSON['parse'](_0x4155a2[_0x9be0da(0x10e)]),'parentId':_0xba405b['id']});break;}case v['Delete']:{const _0xa3ce9b=this['_threadCommentModel']['getComment'](_0x3c4cfd,_0x5e3e5f,_0x4155a2[_0x9be0da(0x129)]);_0xa3ce9b&&_0xa3ce9b[_0x9be0da(0x12f)]&&this[_0x9be0da(0x10c)][_0x9be0da(0x124)](_0x3c4cfd,_0x5e3e5f,_0x4155a2[_0x9be0da(0x129)]);break;}case v[_0x9be0da(0x111)]:{this[_0x9be0da(0x10c)][_0x9be0da(0x145)](_0x3c4cfd,_0x5e3e5f,{'commentId':_0x4155a2[_0x9be0da(0x129)],'text':JSON[_0x9be0da(0x104)](_0x4155a2['content'])});break;}case v[_0x9be0da(0x107)]:{const _0x588d31=(_0x42e6eb=this[_0x9be0da(0x10c)][_0x9be0da(0x115)](_0x4155a2[_0x9be0da(0x103)])[_0x9be0da(0x109)](_0x16f52a=>_0x16f52a[_0x9be0da(0x105)]===_0x4155a2['threadId']))==null?void 0x0:_0x42e6eb['root'];_0x588d31&&this[_0x9be0da(0x10c)][_0x9be0da(0x147)](_0x3c4cfd,_0x5e3e5f,_0x588d31['id'],_0x4155a2[_0x9be0da(0xfa)]===I[_0x9be0da(0x157)]);break;}}}));}};S=V([p(0x0,_0xee2d6d(_0x775931)),p(0x1,_0xee2d6d(_0x24ff45)),p(0x2,_0xee2d6d(_0x44d1fc)),p(0x3,_0xee2d6d(_0x4801df))],S);const z=_0x228950(0x154),M={};var k=Object[_0x228950(0x130)],Q=(_0x4c91e6,_0x515286,_0x2373d4,_0x1c6c0f)=>{const _0x96f1ec=_0x228950;for(var _0x1ff295=_0x1c6c0f>0x1?void 0x0:_0x1c6c0f?k(_0x515286,_0x2373d4):_0x515286,_0x391cc8=_0x4c91e6[_0x96f1ec(0x137)]-0x1,_0x14f2b3;_0x391cc8>=0x0;_0x391cc8--)(_0x14f2b3=_0x4c91e6[_0x391cc8])&&(_0x1ff295=_0x14f2b3(_0x1ff295)||_0x1ff295);return _0x1ff295;},_=(_0x595682,_0x4c8830)=>(_0x299328,_0x4751ab)=>_0x4c8830(_0x299328,_0x4751ab,_0x595682);function _0x496a(_0x4545c7,_0x1e6c0b){const _0x1add72=_0x1add();return _0x496a=function(_0x496abd,_0x189fd3){_0x496abd=_0x496abd-0xf2;let _0x265e62=_0x1add72[_0x496abd];return _0x265e62;},_0x496a(_0x4545c7,_0x1e6c0b);}function X(_0x1efdd8,_0xb834a6){const _0x33ba88=_0x228950,_0x26bf13=_0x1efdd8[_0x33ba88(0x148)][0x0];return{..._0xb834a6,'id':_0x26bf13[_0x33ba88(0x129)],'resolved':_0x1efdd8[_0x33ba88(0xfa)]===0x1,'dT':D(_0x26bf13[_0x33ba88(0xfe)]),'personId':_0x26bf13[_0x33ba88(0x10a)],'threadId':_0x26bf13[_0x33ba88(0x105)]};}function ee(_0x244ee3,_0x3da754,_0x537f44){const _0x172bbe=_0x228950;var _0x298f30,_0x521264;if(((_0x521264=(_0x298f30=_0x244ee3==null?void 0x0:_0x244ee3[_0x172bbe(0x148)])==null?void 0x0:_0x298f30[_0x172bbe(0x137)])!=null?_0x521264:0x0)>0x0){const _0x22e68e=(_0x3e9766,_0x7f5a4d)=>({'id':_0x3e9766[_0x172bbe(0x129)],'threadId':_0x3e9766[_0x172bbe(0x105)],'dT':D(_0x3e9766[_0x172bbe(0xfe)]),'personId':_0x3e9766[_0x172bbe(0x10a)],'resolved':_0x244ee3[_0x172bbe(0xfa)]===I[_0x172bbe(0x157)],'unitId':_0x3da754,'subUnitId':_0x537f44,'text':JSON['parse'](_0x3e9766[_0x172bbe(0x10e)]),'parentId':_0x7f5a4d}),_0x10c944=_0x22e68e(_0x244ee3['replies'][0x0]);return{..._0x10c944,'children':_0x244ee3[_0x172bbe(0x148)]['slice'](0x1)[_0x172bbe(0x135)](_0x220860=>_0x22e68e(_0x220860,_0x10c944['id']))};}return null;}function _0x1add(){const _0x5e61f3=['customRanges','UNRECOGNIZED','_threadCommentDataSourceService','/add','addComment','forEach','updateComment','code','resolveComment','replies','listComments','/solved','_config','userID','comments','error','_initUserSync','getCurrentUser','type','values','100100GmvaBu','thread-comment-data-source.config','comment','244017qzflvp','Solved','add','users','onReady','post','onStarting','_sessionService','saveCommentToSnapshot','/reply','solved','1435230ArYezi','_httpService','pluginName','createTimestamp','personId','_init','/universer-api/comment/unit/','OpenOrReOpen','unitId','parse','threadId','filter','Solve','3FNSrok','find','userId','1234XDTRny','_threadCommentModel','commentUpdate$','content','delete','_userService','Edit','_injector','stringify','syncUpdateMutationToColla','getUnit','user','format','addUser','requireSession','_configService','_threadCommentDataSource','148408QsJWKg','748602dmtJyg','Unknown','11QdavXu','/delete','get','resolved','COMMENT','deleteComment','getMemberID','ref','symbol','5038790bOoWVe','replyId','rangeType','YYYY/MM/DD\x20HH:mm','rangeId','Reply','defineProperty','parentId','getOwnPropertyDescriptor','getUser','disposeWithMe','_initDataSource','dataSource','map','body','length','UNIVER_UNKNOWN','_commentService','Delete','217GnPAOE','Add','/edit','24GrmAmp'];_0x1add=function(){return _0x5e61f3;};return _0x1add();}let f=class{constructor(_0x255cc5,_0x286240,_0x29f518,_0x5768cf){const _0x4542bb=_0x228950;this[_0x4542bb(0xfc)]=_0x255cc5,this['_userService']=_0x286240,this['_sessionService']=_0x29f518,this[_0x4542bb(0x112)]=_0x5768cf;}async[_0x228950(0x143)](_0x5a71ed){const _0x21922e=_0x228950;var _0x4cbdd3,_0x1d247f;const {parentId:_0x50965d,unitId:_0x2aa2d3,text:_0x238da3,threadId:_0x33ab66}=_0x5a71ed,_0x352eea=(_0x1d247f=(_0x4cbdd3=_0x238da3[_0x21922e(0x13f)])==null?void 0x0:_0x4cbdd3[_0x21922e(0x106)](_0x5aff46=>_0x5aff46[_0x21922e(0x12a)]===_0x2cf451[_0x21922e(0x123)])[_0x21922e(0x135)](_0x22d0a4=>_0x22d0a4[_0x21922e(0x12c)]))!=null?_0x1d247f:[],_0x57ffaa=JSON['stringify'](_0x238da3),_0x10eb68=(await this['_sessionService'][_0x21922e(0x119)](_0x2aa2d3))[_0x21922e(0x125)]();if(_0x50965d){const _0x133bbe={'memberId':_0x10eb68,'unitId':_0x2aa2d3,'content':_0x57ffaa,'mention':_0x352eea,'threadId':_0x33ab66},_0x13bcb0=(await this['_httpService']['post'](_0x21922e(0x101)+_0x2aa2d3+_0x21922e(0xf9),{'body':_0x133bbe}))['body']['reply'];return{..._0x5a71ed,'id':_0x13bcb0[_0x21922e(0x129)],'dT':_0x2552d3(+_0x13bcb0['createTimestamp'])['format'](_0x21922e(0x12b)),'personId':_0x13bcb0[_0x21922e(0x10a)]};}else{const _0x43a603={'memberId':_0x10eb68,'unitId':_0x2aa2d3,'content':_0x57ffaa,'mention':_0x352eea},_0x464142=await this['_httpService'][_0x21922e(0xf5)](_0x21922e(0x101)+_0x2aa2d3+_0x21922e(0x142),{'body':_0x43a603});return X(_0x464142[_0x21922e(0x136)][_0x21922e(0x155)],_0x5a71ed);}}async[_0x228950(0x145)](_0x92cc7e){const _0x4712b2=_0x228950;var _0x7c326e,_0x2fd128;const {text:_0x8cd053,unitId:_0x4b9120}=_0x92cc7e,_0x5e58e0=(_0x2fd128=(_0x7c326e=_0x8cd053['customRanges'])==null?void 0x0:_0x7c326e[_0x4712b2(0x106)](_0x5be89e=>_0x5be89e['rangeType']===_0x2cf451['COMMENT'])['map'](_0x2067e0=>_0x2067e0[_0x4712b2(0x12c)]))!=null?_0x2fd128:[],_0x28db7e=JSON[_0x4712b2(0x113)](_0x8cd053),_0x8b8ef1=_0x92cc7e[_0x4712b2(0x105)],_0x9eac1b=_0x92cc7e['id'],_0x51ff1e={'memberId':(await this[_0x4712b2(0xf7)]['requireSession'](_0x4b9120))[_0x4712b2(0x125)](),'unitId':_0x4b9120,'threadId':_0x8b8ef1,'mention':_0x5e58e0,'content':_0x28db7e,'replyId':_0x9eac1b},_0x562b35=await this[_0x4712b2(0xfc)]['post'](_0x4712b2(0x101)+_0x4b9120+_0x4712b2(0x13d),{'body':_0x51ff1e});return!_0x562b35[_0x4712b2(0x136)][_0x4712b2(0x14e)]||_0x562b35[_0x4712b2(0x136)][_0x4712b2(0x14e)][_0x4712b2(0x146)]===0x1;}async[_0x228950(0x147)](_0x28d2d6){const _0x28a32c=_0x228950,{unitId:_0xe9e900}=_0x28d2d6,_0x1ec037=_0x28d2d6[_0x28a32c(0x105)],_0x100020={'memberId':this[_0x28a32c(0x110)][_0x28a32c(0x150)]()['userID'],'unitId':_0xe9e900,'threadId':_0x1ec037,'solved':_0x28d2d6[_0x28a32c(0x122)]?I[_0x28a32c(0x157)]:I['OpenOrReOpen']},_0x4676a4=await this['_httpService'][_0x28a32c(0xf5)](_0x28a32c(0x101)+_0xe9e900+_0x28a32c(0x14a),{'body':_0x100020});return!_0x4676a4[_0x28a32c(0x136)][_0x28a32c(0x14e)]||_0x4676a4['body'][_0x28a32c(0x14e)][_0x28a32c(0x146)]===0x1;}async[_0x228950(0x124)](_0xf1b468,_0x396f5c,_0x14ba5b,_0x46cbbd){const _0x41517d=_0x228950,_0x53451d={'memberId':(await this[_0x41517d(0xf7)][_0x41517d(0x119)](_0xf1b468))[_0x41517d(0x125)](),'threadId':_0x14ba5b,'replyId':_0x46cbbd,'unitId':_0xf1b468},_0x4ee1cd=await this['_httpService']['post'](_0x41517d(0x101)+_0xf1b468+_0x41517d(0x120),{'body':_0x53451d});return!_0x4ee1cd['body'][_0x41517d(0x14e)]||_0x4ee1cd[_0x41517d(0x136)][_0x41517d(0x14e)][_0x41517d(0x146)]===0x1;}async[_0x228950(0x149)](_0x508540,_0x45e3eb,_0xfaba8d){const _0x2e6ffb=_0x228950,_0x3cc724={'unitId':_0x508540,'threadId':_0xfaba8d},_0x481081=await this['_httpService'][_0x2e6ffb(0xf5)](_0x2e6ffb(0x101)+_0x508540+'/list',{'body':_0x3cc724}),_0x396594=_0xfaba8d['map'](_0x14f6b0=>ee(_0x481081[_0x2e6ffb(0x136)][_0x2e6ffb(0x14d)][_0x14f6b0],_0x508540,_0x45e3eb))[_0x2e6ffb(0x106)](Boolean);return Object[_0x2e6ffb(0x152)](_0x481081[_0x2e6ffb(0x136)]['users'])[_0x2e6ffb(0x144)](_0x120757=>{const _0x20ece8=_0x2e6ffb;this[_0x20ece8(0x110)][_0x20ece8(0x118)](_0x120757);}),_0x396594;}[_0x228950(0xf8)](_0xfb3659){const _0x1124c4=_0x228950;return{'id':_0xfb3659['id'],'threadId':_0xfb3659[_0x1124c4(0x105)],'ref':_0xfb3659[_0x1124c4(0x126)]};}};f=Q([_(0x0,_0xee2d6d(_0x490830)),_(0x1,_0xee2d6d(_0x44d1fc)),_(0x2,_0xee2d6d(_0x625313)),_(0x3,_0xee2d6d(_0x4801df))],f);var re=Object[_0x228950(0x130)],te=(_0x3fec26,_0x576a0e,_0x143167,_0x22f35f)=>{for(var _0x4b61d2=_0x22f35f>0x1?void 0x0:_0x22f35f?re(_0x576a0e,_0x143167):_0x576a0e,_0x129c2c=_0x3fec26['length']-0x1,_0x150035;_0x129c2c>=0x0;_0x129c2c--)(_0x150035=_0x3fec26[_0x129c2c])&&(_0x4b61d2=_0x150035(_0x4b61d2)||_0x4b61d2);return _0x4b61d2;},N=(_0x49e23d,_0x12d7ca)=>(_0x68a343,_0x2a9bcc)=>_0x12d7ca(_0x68a343,_0x2a9bcc,_0x49e23d);let g=class extends _0x48bbe7{constructor(_0x2313b0,_0x5626d5){const _0x3e0a29=_0x228950;super(),this[_0x3e0a29(0x141)]=_0x2313b0,this[_0x3e0a29(0x11b)]=_0x5626d5,this[_0x3e0a29(0x133)]();}[_0x228950(0x133)](){const _0x90c8cb=_0x228950;this[_0x90c8cb(0x141)][_0x90c8cb(0x134)]=this[_0x90c8cb(0x11b)],this['_threadCommentDataSourceService'][_0x90c8cb(0x114)]=!0x1;}};g=te([N(0x0,_0x2e0912),N(0x1,_0xee2d6d(f))],g);var se=Object[_0x228950(0x12e)],oe=Object[_0x228950(0x130)],ne=(_0xbd62b0,_0x2f8557,_0x220a3f)=>_0x2f8557 in _0xbd62b0?se(_0xbd62b0,_0x2f8557,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x220a3f}):_0xbd62b0[_0x2f8557]=_0x220a3f,ie=(_0x3f58f2,_0x18272a,_0x8ea51e,_0x1bf23e)=>{const _0x1b8aa4=_0x228950;for(var _0x32245a=_0x1bf23e>0x1?void 0x0:_0x1bf23e?oe(_0x18272a,_0x8ea51e):_0x18272a,_0xd447d5=_0x3f58f2[_0x1b8aa4(0x137)]-0x1,_0x2158dc;_0xd447d5>=0x0;_0xd447d5--)(_0x2158dc=_0x3f58f2[_0xd447d5])&&(_0x32245a=_0x2158dc(_0x32245a)||_0x32245a);return _0x32245a;},w=(_0x211b06,_0x5480c9)=>(_0x49ddd9,_0x467914)=>_0x5480c9(_0x49ddd9,_0x467914,_0x211b06),$=(_0x22eb36,_0x5a74e7,_0x2e82e9)=>ne(_0x22eb36,typeof _0x5a74e7!=_0x228950(0x127)?_0x5a74e7+'':_0x5a74e7,_0x2e82e9);let b=class extends _0x1ef7b8{constructor(_0xd6ce28=M,_0x524328,_0x87170a){const _0x44cfe2=_0x228950;super(),this[_0x44cfe2(0x14b)]=_0xd6ce28,this['_injector']=_0x524328,this[_0x44cfe2(0x11a)]=_0x87170a;const {..._0x3f8c4d}=_0x1ce58b({},M,this[_0x44cfe2(0x14b)]);this[_0x44cfe2(0x11a)]['setConfig'](z,_0x3f8c4d);}[_0x228950(0xf6)](){[[f],[g],[S]]['forEach'](_0x56009f=>{const _0x22e651=_0x496a;this[_0x22e651(0x112)][_0x22e651(0xf2)](_0x56009f);});}[_0x228950(0xf4)](){const _0x295f2a=_0x228950;this[_0x295f2a(0x112)][_0x295f2a(0x121)](g),this[_0x295f2a(0x112)][_0x295f2a(0x121)](S);}};$(b,_0x228950(0xfd),W),$(b,_0x228950(0x151),_0x45a423[_0x228950(0x138)]),b=ie([_0x1fb97b(_0x3e15e4,_0x4ce1bf,_0x1f5fb3),w(0x1,_0xee2d6d(_0x4801df)),w(0x2,_0x415962)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2069b1=_0x43de;(function(_0x380a17,_0x180abc){const _0x512c22=_0x43de,_0xf23808=_0x380a17();while(!![]){try{const _0x23b653=-parseInt(_0x512c22(0x202))/0x1*(-parseInt(_0x512c22(0x211))/0x2)+parseInt(_0x512c22(0x212))/0x3*(parseInt(_0x512c22(0x1f7))/0x4)+parseInt(_0x512c22(0x204))/0x5*(-parseInt(_0x512c22(0x235))/0x6)+-parseInt(_0x512c22(0x20f))/0x7+parseInt(_0x512c22(0x231))/0x8*(-parseInt(_0x512c22(0x1ed))/0x9)+-parseInt(_0x512c22(0x1f1))/0xa+parseInt(_0x512c22(0x249))/0xb;if(_0x23b653===_0x180abc)break;else _0xf23808['push'](_0xf23808['shift']());}catch(_0x4008b3){_0xf23808['push'](_0xf23808['shift']());}}}(_0x5a9a,0xc9b63));import{CommentService as _0x13b92b,CollaborationSessionService as _0x497b32,UniverCollaborationClientPlugin as _0x293a48}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x177d79}from'@univerjs-pro/license';import{dayjs as _0x3db8db,UserManagerService as _0x4a0daf,Inject as _0x29435d,Injector as _0x4a982a,Disposable as _0xcf5e6a,CustomRangeType as _0x20a37b,UniverInstanceType as _0x388da4,DependentOn as _0x4bdd65,IConfigService as _0x10e4b8,Plugin as _0x336457,merge as _0x29ae8d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x40bc7d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x307483,IThreadCommentDataSourceService as _0x50d99d}from'@univerjs/thread-comment';import{bufferTime as _0x2cdc2a}from'rxjs';import{HTTPService as _0x28bbac}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2869f4=>(_0x2869f4[_0x2869f4['OpenOrReOpen']=0x0]=_0x2069b1(0x246),_0x2869f4[_0x2869f4[_0x2069b1(0x23a)]=0x1]='Solved',_0x2869f4[_0x2869f4[_0x2069b1(0x208)]=-0x1]='UNRECOGNIZED',_0x2869f4))(I||{}),v=(_0x4886b4=>(_0x4886b4[_0x4886b4[_0x2069b1(0x22a)]=0x0]=_0x2069b1(0x22a),_0x4886b4[_0x4886b4['Add']=0x1]=_0x2069b1(0x1ec),_0x4886b4[_0x4886b4[_0x2069b1(0x245)]=0x2]=_0x2069b1(0x245),_0x4886b4[_0x4886b4[_0x2069b1(0x244)]=0x3]=_0x2069b1(0x244),_0x4886b4[_0x4886b4[_0x2069b1(0x20d)]=0x4]=_0x2069b1(0x20d),_0x4886b4[_0x4886b4[_0x2069b1(0x241)]=0x5]=_0x2069b1(0x241),_0x4886b4[_0x4886b4[_0x2069b1(0x208)]=-0x1]=_0x2069b1(0x208),_0x4886b4))(v||{});const D=_0x370191=>_0x3db8db(new Date(+_0x370191))[_0x2069b1(0x210)](_0x2069b1(0x232)),B=async(_0x191f0d,_0x23776b)=>{const _0x187ad9=_0x2069b1,_0x3ecd4a=_0x191f0d[_0x187ad9(0x1f8)](_0x4a0daf),_0x478deb=_0x191f0d[_0x187ad9(0x1f8)](_0x28bbac);_0x23776b[_0x187ad9(0x206)](_0x3b836a=>{_0x3ecd4a['getUser'](_0x3b836a)&&_0x23776b['delete'](_0x3b836a);}),_0x23776b['size']&&(await _0x478deb[_0x187ad9(0x1f8)](_0x187ad9(0x1f3),{'params':{'userIDs':[..._0x23776b]}}))[_0x187ad9(0x1eb)][_0x187ad9(0x236)][_0x187ad9(0x206)](_0x2ab20f=>{const _0x28dba8=_0x187ad9;_0x2ab20f&&_0x3ecd4a[_0x28dba8(0x1fd)](_0x2ab20f);});};var K=Object[_0x2069b1(0x1f0)],V=(_0xc1efc,_0x23a962,_0x2f879a,_0x39b1b5)=>{const _0x48ea24=_0x2069b1;for(var _0x2271cc=_0x39b1b5>0x1?void 0x0:_0x39b1b5?K(_0x23a962,_0x2f879a):_0x23a962,_0x442cad=_0xc1efc[_0x48ea24(0x243)]-0x1,_0x140cdf;_0x442cad>=0x0;_0x442cad--)(_0x140cdf=_0xc1efc[_0x442cad])&&(_0x2271cc=_0x140cdf(_0x2271cc)||_0x2271cc);return _0x2271cc;},p=(_0x20cc3e,_0x213cb1)=>(_0x4562f0,_0x36ca17)=>_0x213cb1(_0x4562f0,_0x36ca17,_0x20cc3e);let S=class extends _0xcf5e6a{constructor(_0x5e4639,_0x4ad17a,_0x1df9ef,_0x43e464){const _0x592c51=_0x2069b1;super(),this[_0x592c51(0x1f2)]=_0x5e4639,this[_0x592c51(0x201)]=_0x4ad17a,this['_userService']=_0x1df9ef,this['_injector']=_0x43e464,this['_init'](),this[_0x592c51(0x217)]();}['_initUserSync'](){const _0x1bb593=_0x2069b1;this['disposeWithMe'](this[_0x1bb593(0x201)][_0x1bb593(0x21a)][_0x1bb593(0x1e6)](_0x2cdc2a(0x10))[_0x1bb593(0x242)](_0x14c196=>{const _0x5196a3=_0x1bb593,_0x1ac635=new Set();_0x14c196[_0x5196a3(0x206)](_0x5f3b47=>{const _0x8685af=_0x5196a3;switch(_0x5f3b47[_0x8685af(0x229)]){case _0x8685af(0x226):{const _0x3eb9ac=_0x5f3b47[_0x8685af(0x239)]['personId'];_0x1ac635[_0x8685af(0x226)](_0x3eb9ac);break;}}}),B(this[_0x5196a3(0x20e)],_0x1ac635);}));}['_init'](){const _0x191103=_0x2069b1;this['disposeWithMe'](this[_0x191103(0x1f2)][_0x191103(0x21a)]['subscribe'](async _0x576bff=>{const _0x54e210=_0x191103;var _0x1e86ed,_0x513627,_0x562641,_0x5c215c;const _0x3fe2bf=(_0x1e86ed=this['_threadCommentModel'][_0x54e210(0x22d)](_0x576bff[_0x54e210(0x21d)])[_0x54e210(0x21c)](_0xc814d3=>_0xc814d3[_0x54e210(0x233)]===_0x576bff[_0x54e210(0x233)]))==null?void 0x0:_0x1e86ed[_0x54e210(0x1fb)];if(!_0x3fe2bf)return;const {unitId:_0x38e42b,subUnitId:_0x32a05e}=_0x3fe2bf;switch(_0x576bff[_0x54e210(0x22b)]&&this[_0x54e210(0x224)][_0x54e210(0x1fd)](_0x576bff['user']),_0x576bff[_0x54e210(0x229)]){case v[_0x54e210(0x1ec)]:break;case v['Reply']:{this['_threadCommentModel'][_0x54e210(0x1e8)](_0x38e42b,_0x32a05e,{'unitId':_0x38e42b,'subUnitId':_0x32a05e,'ref':'','id':_0x576bff[_0x54e210(0x23e)],'dT':D(+_0x576bff[_0x54e210(0x23c)]),'threadId':_0x576bff[_0x54e210(0x233)],'personId':(_0x562641=(_0x513627=_0x576bff[_0x54e210(0x22b)])==null?void 0x0:_0x513627[_0x54e210(0x214)])!=null?_0x562641:_0x576bff[_0x54e210(0x223)],'text':JSON[_0x54e210(0x216)](_0x576bff[_0x54e210(0x238)]),'parentId':_0x3fe2bf['id']});break;}case v[_0x54e210(0x20d)]:{const _0x15bd4d=this[_0x54e210(0x201)][_0x54e210(0x215)](_0x38e42b,_0x32a05e,_0x576bff[_0x54e210(0x23e)]);_0x15bd4d&&_0x15bd4d[_0x54e210(0x209)]&&this[_0x54e210(0x201)]['deleteComment'](_0x38e42b,_0x32a05e,_0x576bff[_0x54e210(0x23e)]);break;}case v[_0x54e210(0x244)]:{this[_0x54e210(0x201)][_0x54e210(0x22c)](_0x38e42b,_0x32a05e,{'commentId':_0x576bff['replyId'],'text':JSON['parse'](_0x576bff[_0x54e210(0x238)])});break;}case v['Solve']:{const _0x50c2c4=(_0x5c215c=this[_0x54e210(0x201)][_0x54e210(0x22d)](_0x576bff[_0x54e210(0x21d)])[_0x54e210(0x21c)](_0x107d79=>_0x107d79[_0x54e210(0x233)]===_0x576bff['threadId']))==null?void 0x0:_0x5c215c[_0x54e210(0x1fb)];_0x50c2c4&&this[_0x54e210(0x201)][_0x54e210(0x1f6)](_0x38e42b,_0x32a05e,_0x50c2c4['id'],_0x576bff['solved']===I[_0x54e210(0x23a)]);break;}}}));}};function _0x5a9a(){const _0x5366f2=['commentUpdate$','replies','find','unitId','saveCommentToSnapshot','_httpService','dataSource','stringify','solved','userId','_userService','/solved','add','_configService','setConfig','type','Unknown','user','updateComment','getUnit','/edit','/reply','filter','69256DAIiqt','YYYY/MM/DD\x20HH:mm','threadId','pluginName','2082jCSCpC','users','symbol','content','payload','Solved','_threadCommentDataSource','createTimestamp','getMemberID','replyId','_sessionService','post','Solve','subscribe','length','Edit','Reply','OpenOrReOpen','rangeType','syncUpdateMutationToColla','31023069BMRycz','reply','pipe','customRanges','addComment','map','_threadCommentDataSourceService','body','Add','1629QhDmIA','onStarting','error','getOwnPropertyDescriptor','7244530jbqmzq','_commentService','/universer-api/user/list','COMMENT','values','resolveComment','36YvsnLp','get','/add','ref','root','requireSession','addUser','_config','UNIVER_UNKNOWN','comment','_threadCommentModel','424AGAVSP','listComments','10655TPPakK','rangeId','forEach','getCurrentUser','UNRECOGNIZED','parentId','code','/universer-api/comment/unit/','/delete','Delete','_injector','3187954BAQHAN','format','844drDleX','437751EsPYEn','thread-comment-data-source.config','userID','getComment','parse','_initUserSync','_initDataSource','defineProperty'];_0x5a9a=function(){return _0x5366f2;};return _0x5a9a();}function _0x43de(_0x266f57,_0xd09ba3){const _0x5a9a09=_0x5a9a();return _0x43de=function(_0x43de40,_0x5853ef){_0x43de40=_0x43de40-0x1e6;let _0x3a8bd3=_0x5a9a09[_0x43de40];return _0x3a8bd3;},_0x43de(_0x266f57,_0xd09ba3);}S=V([p(0x0,_0x29435d(_0x13b92b)),p(0x1,_0x29435d(_0x307483)),p(0x2,_0x29435d(_0x4a0daf)),p(0x3,_0x29435d(_0x4a982a))],S);const z=_0x2069b1(0x213),M={};var k=Object[_0x2069b1(0x1f0)],Q=(_0x4b650e,_0x2d1575,_0x32a1f4,_0x254d33)=>{for(var _0x4ff3c5=_0x254d33>0x1?void 0x0:_0x254d33?k(_0x2d1575,_0x32a1f4):_0x2d1575,_0xcc5436=_0x4b650e['length']-0x1,_0x3c0264;_0xcc5436>=0x0;_0xcc5436--)(_0x3c0264=_0x4b650e[_0xcc5436])&&(_0x4ff3c5=_0x3c0264(_0x4ff3c5)||_0x4ff3c5);return _0x4ff3c5;},_=(_0x2bd5f4,_0x32c032)=>(_0x28a6e4,_0x3e8e36)=>_0x32c032(_0x28a6e4,_0x3e8e36,_0x2bd5f4);function X(_0x2f4f42,_0x2b125f){const _0x51c332=_0x2069b1,_0x5056fc=_0x2f4f42[_0x51c332(0x21b)][0x0];return{..._0x2b125f,'id':_0x5056fc['replyId'],'resolved':_0x2f4f42[_0x51c332(0x222)]===0x1,'dT':D(_0x5056fc[_0x51c332(0x23c)]),'personId':_0x5056fc[_0x51c332(0x223)],'threadId':_0x5056fc[_0x51c332(0x233)]};}function ee(_0x300d9d,_0x1645fb,_0x3e6823){const _0x1e4b94=_0x2069b1;var _0x395378,_0x3d0378;if(((_0x3d0378=(_0x395378=_0x300d9d==null?void 0x0:_0x300d9d[_0x1e4b94(0x21b)])==null?void 0x0:_0x395378[_0x1e4b94(0x243)])!=null?_0x3d0378:0x0)>0x0){const _0x2be729=(_0x1fe7c3,_0x22b6aa)=>({'id':_0x1fe7c3[_0x1e4b94(0x23e)],'threadId':_0x1fe7c3['threadId'],'dT':D(_0x1fe7c3[_0x1e4b94(0x23c)]),'personId':_0x1fe7c3[_0x1e4b94(0x223)],'resolved':_0x300d9d[_0x1e4b94(0x222)]===I[_0x1e4b94(0x23a)],'unitId':_0x1645fb,'subUnitId':_0x3e6823,'text':JSON[_0x1e4b94(0x216)](_0x1fe7c3['content']),'parentId':_0x22b6aa}),_0x25549e=_0x2be729(_0x300d9d['replies'][0x0]);return{..._0x25549e,'children':_0x300d9d['replies']['slice'](0x1)[_0x1e4b94(0x1e9)](_0x42081c=>_0x2be729(_0x42081c,_0x25549e['id']))};}return null;}let f=class{constructor(_0x2973e1,_0x4c581d,_0x4112ae,_0x3c713d){const _0x4f683f=_0x2069b1;this[_0x4f683f(0x21f)]=_0x2973e1,this[_0x4f683f(0x224)]=_0x4c581d,this[_0x4f683f(0x23f)]=_0x4112ae,this['_injector']=_0x3c713d;}async[_0x2069b1(0x1e8)](_0x57ba0c){const _0xc74b=_0x2069b1;var _0x260f16,_0x3aec62;const {parentId:_0x37b97d,unitId:_0x25ebf1,text:_0x5881ae,threadId:_0x208bba}=_0x57ba0c,_0x22a188=(_0x3aec62=(_0x260f16=_0x5881ae['customRanges'])==null?void 0x0:_0x260f16['filter'](_0x4cf826=>_0x4cf826['rangeType']===_0x20a37b[_0xc74b(0x1f4)])[_0xc74b(0x1e9)](_0x4947a6=>_0x4947a6[_0xc74b(0x205)]))!=null?_0x3aec62:[],_0x53dc8e=JSON['stringify'](_0x5881ae),_0x2893aa=(await this[_0xc74b(0x23f)][_0xc74b(0x1fc)](_0x25ebf1))[_0xc74b(0x23d)]();if(_0x37b97d){const _0x447f4c={'memberId':_0x2893aa,'unitId':_0x25ebf1,'content':_0x53dc8e,'mention':_0x22a188,'threadId':_0x208bba},_0x8537e3=(await this[_0xc74b(0x21f)][_0xc74b(0x240)](_0xc74b(0x20b)+_0x25ebf1+_0xc74b(0x22f),{'body':_0x447f4c}))[_0xc74b(0x1eb)][_0xc74b(0x24a)];return{..._0x57ba0c,'id':_0x8537e3[_0xc74b(0x23e)],'dT':_0x3db8db(+_0x8537e3['createTimestamp'])[_0xc74b(0x210)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x8537e3['userId']};}else{const _0xbaf400={'memberId':_0x2893aa,'unitId':_0x25ebf1,'content':_0x53dc8e,'mention':_0x22a188},_0x3beb00=await this[_0xc74b(0x21f)][_0xc74b(0x240)]('/universer-api/comment/unit/'+_0x25ebf1+_0xc74b(0x1f9),{'body':_0xbaf400});return X(_0x3beb00['body'][_0xc74b(0x200)],_0x57ba0c);}}async['updateComment'](_0x33469c){const _0x2bb8dd=_0x2069b1;var _0x57cd8f,_0x326866;const {text:_0x3d2d88,unitId:_0x484fbb}=_0x33469c,_0x23435a=(_0x326866=(_0x57cd8f=_0x3d2d88[_0x2bb8dd(0x1e7)])==null?void 0x0:_0x57cd8f[_0x2bb8dd(0x230)](_0x52c847=>_0x52c847[_0x2bb8dd(0x247)]===_0x20a37b['COMMENT'])[_0x2bb8dd(0x1e9)](_0x24efd7=>_0x24efd7['rangeId']))!=null?_0x326866:[],_0x136a5a=JSON[_0x2bb8dd(0x221)](_0x3d2d88),_0x161502=_0x33469c[_0x2bb8dd(0x233)],_0x100d9b=_0x33469c['id'],_0x504d21={'memberId':(await this[_0x2bb8dd(0x23f)][_0x2bb8dd(0x1fc)](_0x484fbb))['getMemberID'](),'unitId':_0x484fbb,'threadId':_0x161502,'mention':_0x23435a,'content':_0x136a5a,'replyId':_0x100d9b},_0x54da1f=await this[_0x2bb8dd(0x21f)][_0x2bb8dd(0x240)](_0x2bb8dd(0x20b)+_0x484fbb+_0x2bb8dd(0x22e),{'body':_0x504d21});return!_0x54da1f[_0x2bb8dd(0x1eb)][_0x2bb8dd(0x1ef)]||_0x54da1f[_0x2bb8dd(0x1eb)][_0x2bb8dd(0x1ef)][_0x2bb8dd(0x20a)]===0x1;}async[_0x2069b1(0x1f6)](_0x526be0){const _0x2c8d26=_0x2069b1,{unitId:_0x3222c2}=_0x526be0,_0x4d38e0=_0x526be0[_0x2c8d26(0x233)],_0x2d0a68={'memberId':this[_0x2c8d26(0x224)][_0x2c8d26(0x207)]()[_0x2c8d26(0x214)],'unitId':_0x3222c2,'threadId':_0x4d38e0,'solved':_0x526be0['resolved']?I['Solved']:I[_0x2c8d26(0x246)]},_0x36fd32=await this['_httpService'][_0x2c8d26(0x240)](_0x2c8d26(0x20b)+_0x3222c2+_0x2c8d26(0x225),{'body':_0x2d0a68});return!_0x36fd32[_0x2c8d26(0x1eb)]['error']||_0x36fd32[_0x2c8d26(0x1eb)][_0x2c8d26(0x1ef)][_0x2c8d26(0x20a)]===0x1;}async['deleteComment'](_0x23cc3f,_0x570924,_0x20daa7,_0x2c124e){const _0x5168ef=_0x2069b1,_0x406cea={'memberId':(await this[_0x5168ef(0x23f)][_0x5168ef(0x1fc)](_0x23cc3f))[_0x5168ef(0x23d)](),'threadId':_0x20daa7,'replyId':_0x2c124e,'unitId':_0x23cc3f},_0x575c63=await this[_0x5168ef(0x21f)]['post']('/universer-api/comment/unit/'+_0x23cc3f+_0x5168ef(0x20c),{'body':_0x406cea});return!_0x575c63['body'][_0x5168ef(0x1ef)]||_0x575c63[_0x5168ef(0x1eb)][_0x5168ef(0x1ef)]['code']===0x1;}async[_0x2069b1(0x203)](_0x5bf68c,_0x1da9d9,_0x13095e){const _0x5f1305=_0x2069b1,_0x917eb7={'unitId':_0x5bf68c,'threadId':_0x13095e},_0x1de068=await this[_0x5f1305(0x21f)][_0x5f1305(0x240)](_0x5f1305(0x20b)+_0x5bf68c+'/list',{'body':_0x917eb7}),_0x58a87f=_0x13095e['map'](_0x38c997=>ee(_0x1de068[_0x5f1305(0x1eb)]['comments'][_0x38c997],_0x5bf68c,_0x1da9d9))[_0x5f1305(0x230)](Boolean);return Object[_0x5f1305(0x1f5)](_0x1de068[_0x5f1305(0x1eb)][_0x5f1305(0x236)])[_0x5f1305(0x206)](_0x1a2e90=>{const _0x29c53b=_0x5f1305;this[_0x29c53b(0x224)][_0x29c53b(0x1fd)](_0x1a2e90);}),_0x58a87f;}[_0x2069b1(0x21e)](_0x5b685d){const _0x35c709=_0x2069b1;return{'id':_0x5b685d['id'],'threadId':_0x5b685d['threadId'],'ref':_0x5b685d[_0x35c709(0x1fa)]};}};f=Q([_(0x0,_0x29435d(_0x28bbac)),_(0x1,_0x29435d(_0x4a0daf)),_(0x2,_0x29435d(_0x497b32)),_(0x3,_0x29435d(_0x4a982a))],f);var re=Object[_0x2069b1(0x1f0)],te=(_0x53a279,_0x1e8bf8,_0x5da0b2,_0x41acd3)=>{const _0x4f0473=_0x2069b1;for(var _0x402979=_0x41acd3>0x1?void 0x0:_0x41acd3?re(_0x1e8bf8,_0x5da0b2):_0x1e8bf8,_0x8614a8=_0x53a279[_0x4f0473(0x243)]-0x1,_0x3993e3;_0x8614a8>=0x0;_0x8614a8--)(_0x3993e3=_0x53a279[_0x8614a8])&&(_0x402979=_0x3993e3(_0x402979)||_0x402979);return _0x402979;},N=(_0x3edf70,_0x404ed6)=>(_0x342394,_0x2ea15a)=>_0x404ed6(_0x342394,_0x2ea15a,_0x3edf70);let g=class extends _0xcf5e6a{constructor(_0x10394d,_0x3d1afd){const _0x31a5c4=_0x2069b1;super(),this[_0x31a5c4(0x1ea)]=_0x10394d,this[_0x31a5c4(0x23b)]=_0x3d1afd,this['_initDataSource']();}[_0x2069b1(0x218)](){const _0x3ee648=_0x2069b1;this['_threadCommentDataSourceService'][_0x3ee648(0x220)]=this['_threadCommentDataSource'],this[_0x3ee648(0x1ea)][_0x3ee648(0x248)]=!0x1;}};g=te([N(0x0,_0x50d99d),N(0x1,_0x29435d(f))],g);var se=Object[_0x2069b1(0x219)],oe=Object[_0x2069b1(0x1f0)],ne=(_0x145b1f,_0x1d1939,_0x483275)=>_0x1d1939 in _0x145b1f?se(_0x145b1f,_0x1d1939,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x483275}):_0x145b1f[_0x1d1939]=_0x483275,ie=(_0x5c0722,_0x1a2999,_0x186fe8,_0x27cb6)=>{for(var _0x23c14e=_0x27cb6>0x1?void 0x0:_0x27cb6?oe(_0x1a2999,_0x186fe8):_0x1a2999,_0x3aa58f=_0x5c0722['length']-0x1,_0x296568;_0x3aa58f>=0x0;_0x3aa58f--)(_0x296568=_0x5c0722[_0x3aa58f])&&(_0x23c14e=_0x296568(_0x23c14e)||_0x23c14e);return _0x23c14e;},w=(_0x9c69e8,_0x3e5640)=>(_0x5c9264,_0x5b91d0)=>_0x3e5640(_0x5c9264,_0x5b91d0,_0x9c69e8),$=(_0x1188fa,_0xecfa3c,_0x3f0e32)=>ne(_0x1188fa,typeof _0xecfa3c!=_0x2069b1(0x237)?_0xecfa3c+'':_0xecfa3c,_0x3f0e32);let b=class extends _0x336457{constructor(_0x5b7b71=M,_0x54a116,_0x232ede){const _0x4a7efd=_0x2069b1;super(),this[_0x4a7efd(0x1fe)]=_0x5b7b71,this['_injector']=_0x54a116,this[_0x4a7efd(0x227)]=_0x232ede;const {..._0x55939b}=_0x29ae8d({},M,this[_0x4a7efd(0x1fe)]);this[_0x4a7efd(0x227)][_0x4a7efd(0x228)](z,_0x55939b);}[_0x2069b1(0x1ee)](){[[f],[g],[S]]['forEach'](_0x53b308=>{const _0x125688=_0x43de;this[_0x125688(0x20e)]['add'](_0x53b308);});}['onReady'](){const _0x828de8=_0x2069b1;this['_injector'][_0x828de8(0x1f8)](g),this[_0x828de8(0x20e)][_0x828de8(0x1f8)](S);}};$(b,_0x2069b1(0x234),W),$(b,_0x2069b1(0x229),_0x388da4[_0x2069b1(0x1ff)]),b=ie([_0x4bdd65(_0x40bc7d,_0x293a48,_0x177d79),w(0x1,_0x29435d(_0x4a982a)),w(0x2,_0x10e4b8)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1927(_0x4a24cb,_0xcf9027){const _0x3bd8af=_0x3bd8();return _0x1927=function(_0x192784,_0xb53684){_0x192784=_0x192784-0x1ea;let _0xb3e5f4=_0x3bd8af[_0x192784];return _0xb3e5f4;},_0x1927(_0x4a24cb,_0xcf9027);}function _0x3bd8(){const _0x23badb=['parentId','filter','userId','DependentOn','_threadCommentDataSourceService','payload','IThreadCommentDataSourceService','Disposable','/reply','user','stringify','_httpService','UniverProThreadCommentDatasource','3346aNEemi','ThreadCommentModel','slice','function','@univerjs/thread-comment-ui','1191645eeDCYF','UniverThreadCommentUIPlugin','@univerjs/network','_initDataSource','amd','listComments','defineProperty','8136fFRgWH','@univerjs-pro/license','subscribe','UniverCollaborationClientPlugin','forEach','userID','getUnit','/add','Edit','Add','syncUpdateMutationToColla','setConfig','comment','format','_userService','CustomRangeType','_init','CollaborationSessionService','onReady','disposeWithMe','/edit','Solve','get','content','_injector','customRanges','getUser','map','deleteComment','pipe','79256gviBIv','rangeType','1382LvmXKz','UniverThreadCommentDataSourcePlugin','values','parse','replies','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','commentUpdate$','UserManagerService','rangeId','Inject','updateComment','dayjs','HTTPService','8ZgQdGR','dataSource','replyId','8552502aTrOvb','getCurrentUser','8076180uIGBWW','_threadCommentDataSource','Delete','CommentService','UNIVER_UNKNOWN','_commentService','body','getMemberID','IConfigService','85yVUbUc','code','UniverProLicense','type','Injector','Solved','93313wWPjlp','root','UniverProCollaborationClient','/universer-api/comment/unit/','toStringTag','resolved','_config','comments','_threadCommentModel','users','object','1980OpvdGc','getComment','post','UNRECOGNIZED','Unknown','add','find','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs/core','createTimestamp','addComment','_sessionService','bufferTime','rxjs','addUser','Reply','resolveComment','UniverNetwork','Plugin','length','_configService','error','/solved','requireSession','getOwnPropertyDescriptor','/delete','threadId','exports','334LmTlIT','onStarting'];_0x3bd8=function(){return _0x23badb;};return _0x3bd8();}(function(_0x4033e3,_0x540bb3){const _0x1df9e6=_0x1927,_0x4794f3=_0x4033e3();while(!![]){try{const _0x4db19b=-parseInt(_0x1df9e6(0x25f))/0x1*(parseInt(_0x1df9e6(0x216))/0x2)+parseInt(_0x1df9e6(0x1ef))/0x3+-parseInt(_0x1df9e6(0x214))/0x4*(parseInt(_0x1df9e6(0x232))/0x5)+-parseInt(_0x1df9e6(0x1f6))/0x6*(parseInt(_0x1df9e6(0x1ea))/0x7)+parseInt(_0x1df9e6(0x224))/0x8*(parseInt(_0x1df9e6(0x227))/0x9)+-parseInt(_0x1df9e6(0x229))/0xa+parseInt(_0x1df9e6(0x238))/0xb*(parseInt(_0x1df9e6(0x243))/0xc);if(_0x4db19b===_0x540bb3)break;else _0x4794f3['push'](_0x4794f3['shift']());}catch(_0x11dc93){_0x4794f3['push'](_0x4794f3['shift']());}}}(_0x3bd8,0xb0b3a),function(_0x3194d2,_0x1d4326){const _0x22d588=_0x1927;typeof exports==_0x22d588(0x242)&&typeof module<'u'?_0x1d4326(exports,require('@univerjs-pro/collaboration-client'),require(_0x22d588(0x1f7)),require(_0x22d588(0x24b)),require(_0x22d588(0x1ee)),require('@univerjs/thread-comment'),require(_0x22d588(0x250)),require('@univerjs/network')):typeof define==_0x22d588(0x1ed)&&define[_0x22d588(0x1f3)]?define([_0x22d588(0x25e),'@univerjs-pro/collaboration-client',_0x22d588(0x1f7),_0x22d588(0x24b),_0x22d588(0x1ee),'@univerjs/thread-comment','rxjs',_0x22d588(0x1f1)],_0x1d4326):(_0x3194d2=typeof globalThis<'u'?globalThis:_0x3194d2||self,_0x1d4326(_0x3194d2[_0x22d588(0x26d)]={},_0x3194d2[_0x22d588(0x23a)],_0x3194d2[_0x22d588(0x234)],_0x3194d2['UniverCore'],_0x3194d2['UniverThreadCommentUi'],_0x3194d2['UniverThreadComment'],_0x3194d2[_0x22d588(0x250)],_0x3194d2[_0x22d588(0x254)]));}(this,function(_0x4b8500,_0x410ab3,_0x3913ca,_0x43ff14,_0x315cc2,_0x293da4,_0x135669,_0xa198f5){'use strict';const _0x68cbcb=_0x1927;const _0x47759d=_0x68cbcb(0x24a);var _0xd2dbd0=(_0x4350d4=>(_0x4350d4[_0x4350d4[_0x68cbcb(0x21c)]=0x0]='OpenOrReOpen',_0x4350d4[_0x4350d4[_0x68cbcb(0x237)]=0x1]=_0x68cbcb(0x237),_0x4350d4[_0x4350d4['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x4350d4))(_0xd2dbd0||{}),_0x2a6a07=(_0x1a5220=>(_0x1a5220[_0x1a5220[_0x68cbcb(0x247)]=0x0]='Unknown',_0x1a5220[_0x1a5220[_0x68cbcb(0x1ff)]=0x1]='Add',_0x1a5220[_0x1a5220[_0x68cbcb(0x252)]=0x2]=_0x68cbcb(0x252),_0x1a5220[_0x1a5220['Edit']=0x3]=_0x68cbcb(0x1fe),_0x1a5220[_0x1a5220[_0x68cbcb(0x22b)]=0x4]=_0x68cbcb(0x22b),_0x1a5220[_0x1a5220[_0x68cbcb(0x20b)]=0x5]=_0x68cbcb(0x20b),_0x1a5220[_0x1a5220[_0x68cbcb(0x246)]=-0x1]=_0x68cbcb(0x246),_0x1a5220))(_0x2a6a07||{});const _0x33033b=_0x5b8813=>_0x43ff14['dayjs'](new Date(+_0x5b8813))['format'](_0x68cbcb(0x21b)),_0x188cd1=async(_0x228e71,_0x5d105f)=>{const _0x28c1b8=_0x68cbcb,_0x3548f6=_0x228e71[_0x28c1b8(0x20c)](_0x43ff14['UserManagerService']),_0x44c9ef=_0x228e71['get'](_0xa198f5[_0x28c1b8(0x223)]);_0x5d105f['forEach'](_0xacf965=>{const _0x40d408=_0x28c1b8;_0x3548f6[_0x40d408(0x210)](_0xacf965)&&_0x5d105f['delete'](_0xacf965);}),_0x5d105f['size']&&(await _0x44c9ef[_0x28c1b8(0x20c)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5d105f]}}))[_0x28c1b8(0x22f)][_0x28c1b8(0x241)]['forEach'](_0x420340=>{const _0x4ab6d8=_0x28c1b8;_0x420340&&_0x3548f6[_0x4ab6d8(0x251)](_0x420340);});};var _0x38f1f5=Object[_0x68cbcb(0x25b)],_0x22be8c=(_0x409293,_0x15e06f,_0x1886cc,_0x4505f8)=>{for(var _0x45d19e=_0x4505f8>0x1?void 0x0:_0x4505f8?_0x38f1f5(_0x15e06f,_0x1886cc):_0x15e06f,_0x2a8890=_0x409293['length']-0x1,_0x41575a;_0x2a8890>=0x0;_0x2a8890--)(_0x41575a=_0x409293[_0x2a8890])&&(_0x45d19e=_0x41575a(_0x45d19e)||_0x45d19e);return _0x45d19e;},_0x4ad2e9=(_0x44ee1c,_0x539633)=>(_0xd767a7,_0x3e18d6)=>_0x539633(_0xd767a7,_0x3e18d6,_0x44ee1c);let _0x3c98ab=class extends _0x43ff14[_0x68cbcb(0x268)]{constructor(_0xe47e05,_0x34718a,_0x2acedb,_0x3a7f5a){const _0x22812d=_0x68cbcb;super(),this[_0x22812d(0x22e)]=_0xe47e05,this[_0x22812d(0x240)]=_0x34718a,this['_userService']=_0x2acedb,this[_0x22812d(0x20e)]=_0x3a7f5a,this[_0x22812d(0x206)](),this['_initUserSync']();}['_initUserSync'](){const _0x1c99b3=_0x68cbcb;this[_0x1c99b3(0x209)](this[_0x1c99b3(0x240)][_0x1c99b3(0x21d)][_0x1c99b3(0x213)](_0x135669[_0x1c99b3(0x24f)](0x10))[_0x1c99b3(0x1f8)](_0x3904a1=>{const _0x48b5b3=_0x1c99b3,_0x294eab=new Set();_0x3904a1[_0x48b5b3(0x1fa)](_0x9db516=>{const _0x5dd85c=_0x48b5b3;switch(_0x9db516[_0x5dd85c(0x235)]){case _0x5dd85c(0x248):{const _0x1a2495=_0x9db516[_0x5dd85c(0x266)]['personId'];_0x294eab['add'](_0x1a2495);break;}}}),_0x188cd1(this[_0x48b5b3(0x20e)],_0x294eab);}));}[_0x68cbcb(0x206)](){const _0x91717f=_0x68cbcb;this['disposeWithMe'](this[_0x91717f(0x22e)]['commentUpdate$']['subscribe'](async _0x36ffac=>{const _0x4940b4=_0x91717f;var _0x474631,_0x171cac,_0x3749dc,_0xdc93ee;const _0x556af3=(_0x474631=this[_0x4940b4(0x240)]['getUnit'](_0x36ffac['unitId'])[_0x4940b4(0x249)](_0x512828=>_0x512828[_0x4940b4(0x25d)]===_0x36ffac[_0x4940b4(0x25d)]))==null?void 0x0:_0x474631[_0x4940b4(0x239)];if(!_0x556af3)return;const {unitId:_0x5d779a,subUnitId:_0x914646}=_0x556af3;switch(_0x36ffac[_0x4940b4(0x26a)]&&this[_0x4940b4(0x204)][_0x4940b4(0x251)](_0x36ffac[_0x4940b4(0x26a)]),_0x36ffac[_0x4940b4(0x235)]){case _0x2a6a07['Add']:break;case _0x2a6a07[_0x4940b4(0x252)]:{this[_0x4940b4(0x240)][_0x4940b4(0x24d)](_0x5d779a,_0x914646,{'unitId':_0x5d779a,'subUnitId':_0x914646,'ref':'','id':_0x36ffac[_0x4940b4(0x226)],'dT':_0x33033b(+_0x36ffac['createTimestamp']),'threadId':_0x36ffac[_0x4940b4(0x25d)],'personId':(_0x3749dc=(_0x171cac=_0x36ffac[_0x4940b4(0x26a)])==null?void 0x0:_0x171cac['userID'])!=null?_0x3749dc:_0x36ffac[_0x4940b4(0x263)],'text':JSON[_0x4940b4(0x219)](_0x36ffac[_0x4940b4(0x20d)]),'parentId':_0x556af3['id']});break;}case _0x2a6a07[_0x4940b4(0x22b)]:{const _0x607cdc=this[_0x4940b4(0x240)][_0x4940b4(0x244)](_0x5d779a,_0x914646,_0x36ffac[_0x4940b4(0x226)]);_0x607cdc&&_0x607cdc[_0x4940b4(0x261)]&&this[_0x4940b4(0x240)][_0x4940b4(0x212)](_0x5d779a,_0x914646,_0x36ffac['replyId']);break;}case _0x2a6a07['Edit']:{this[_0x4940b4(0x240)][_0x4940b4(0x221)](_0x5d779a,_0x914646,{'commentId':_0x36ffac[_0x4940b4(0x226)],'text':JSON['parse'](_0x36ffac[_0x4940b4(0x20d)])});break;}case _0x2a6a07[_0x4940b4(0x20b)]:{const _0x50f4fb=(_0xdc93ee=this[_0x4940b4(0x240)][_0x4940b4(0x1fc)](_0x36ffac['unitId'])['find'](_0x2c3cf5=>_0x2c3cf5[_0x4940b4(0x25d)]===_0x36ffac[_0x4940b4(0x25d)]))==null?void 0x0:_0xdc93ee[_0x4940b4(0x239)];_0x50f4fb&&this['_threadCommentModel'][_0x4940b4(0x253)](_0x5d779a,_0x914646,_0x50f4fb['id'],_0x36ffac['solved']===_0xd2dbd0[_0x4940b4(0x237)]);break;}}}));}};_0x3c98ab=_0x22be8c([_0x4ad2e9(0x0,_0x43ff14['Inject'](_0x410ab3[_0x68cbcb(0x22c)])),_0x4ad2e9(0x1,_0x43ff14['Inject'](_0x293da4[_0x68cbcb(0x1eb)])),_0x4ad2e9(0x2,_0x43ff14[_0x68cbcb(0x220)](_0x43ff14[_0x68cbcb(0x21e)])),_0x4ad2e9(0x3,_0x43ff14['Inject'](_0x43ff14[_0x68cbcb(0x236)]))],_0x3c98ab);const _0x160666='thread-comment-data-source.config',_0x5dcb9d={};var _0x39dc30=Object[_0x68cbcb(0x25b)],_0x5ea355=(_0x1d9b05,_0x59e427,_0x2ec891,_0x58eb04)=>{for(var _0x397815=_0x58eb04>0x1?void 0x0:_0x58eb04?_0x39dc30(_0x59e427,_0x2ec891):_0x59e427,_0x327d6b=_0x1d9b05['length']-0x1,_0x49a82a;_0x327d6b>=0x0;_0x327d6b--)(_0x49a82a=_0x1d9b05[_0x327d6b])&&(_0x397815=_0x49a82a(_0x397815)||_0x397815);return _0x397815;},_0x3d193d=(_0x2b72ef,_0x2085f4)=>(_0x125f9b,_0x3d1d44)=>_0x2085f4(_0x125f9b,_0x3d1d44,_0x2b72ef);function _0x54ae88(_0x417b68,_0x5a926d){const _0x24b2d4=_0x68cbcb,_0x87ae98=_0x417b68['replies'][0x0];return{..._0x5a926d,'id':_0x87ae98['replyId'],'resolved':_0x417b68['solved']===0x1,'dT':_0x33033b(_0x87ae98[_0x24b2d4(0x24c)]),'personId':_0x87ae98[_0x24b2d4(0x263)],'threadId':_0x87ae98[_0x24b2d4(0x25d)]};}function _0x3091e0(_0x108c86,_0x12b6ec,_0x27dadb){const _0x299a81=_0x68cbcb;var _0x52e9cd,_0x10f404;if(((_0x10f404=(_0x52e9cd=_0x108c86==null?void 0x0:_0x108c86['replies'])==null?void 0x0:_0x52e9cd[_0x299a81(0x256)])!=null?_0x10f404:0x0)>0x0){const _0x7dd90b=(_0x39a54d,_0x26d5c2)=>({'id':_0x39a54d[_0x299a81(0x226)],'threadId':_0x39a54d[_0x299a81(0x25d)],'dT':_0x33033b(_0x39a54d[_0x299a81(0x24c)]),'personId':_0x39a54d[_0x299a81(0x263)],'resolved':_0x108c86['solved']===_0xd2dbd0[_0x299a81(0x237)],'unitId':_0x12b6ec,'subUnitId':_0x27dadb,'text':JSON[_0x299a81(0x219)](_0x39a54d['content']),'parentId':_0x26d5c2}),_0xdcb6b2=_0x7dd90b(_0x108c86[_0x299a81(0x21a)][0x0]);return{..._0xdcb6b2,'children':_0x108c86[_0x299a81(0x21a)][_0x299a81(0x1ec)](0x1)['map'](_0x46d9c1=>_0x7dd90b(_0x46d9c1,_0xdcb6b2['id']))};}return null;}let _0x34fd15=class{constructor(_0x4239b2,_0x55846b,_0x300515,_0xbc1cc3){const _0x457d52=_0x68cbcb;this[_0x457d52(0x26c)]=_0x4239b2,this[_0x457d52(0x204)]=_0x55846b,this[_0x457d52(0x24e)]=_0x300515,this['_injector']=_0xbc1cc3;}async[_0x68cbcb(0x24d)](_0xd8605b){const _0x3603cd=_0x68cbcb;var _0x284831,_0x48714f;const {parentId:_0x3dc4be,unitId:_0x71b2f8,text:_0x1f946f,threadId:_0x173990}=_0xd8605b,_0x5c93ee=(_0x48714f=(_0x284831=_0x1f946f[_0x3603cd(0x20f)])==null?void 0x0:_0x284831[_0x3603cd(0x262)](_0x9afc9d=>_0x9afc9d[_0x3603cd(0x215)]===_0x43ff14[_0x3603cd(0x205)]['COMMENT'])[_0x3603cd(0x211)](_0x3648fe=>_0x3648fe[_0x3603cd(0x21f)]))!=null?_0x48714f:[],_0x4b0582=JSON[_0x3603cd(0x26b)](_0x1f946f),_0x242036=(await this[_0x3603cd(0x24e)][_0x3603cd(0x25a)](_0x71b2f8))['getMemberID']();if(_0x3dc4be){const _0x19c367={'memberId':_0x242036,'unitId':_0x71b2f8,'content':_0x4b0582,'mention':_0x5c93ee,'threadId':_0x173990},_0x316036=(await this['_httpService'][_0x3603cd(0x245)](_0x3603cd(0x23b)+_0x71b2f8+_0x3603cd(0x269),{'body':_0x19c367}))[_0x3603cd(0x22f)]['reply'];return{..._0xd8605b,'id':_0x316036[_0x3603cd(0x226)],'dT':_0x43ff14[_0x3603cd(0x222)](+_0x316036[_0x3603cd(0x24c)])[_0x3603cd(0x203)](_0x3603cd(0x21b)),'personId':_0x316036[_0x3603cd(0x263)]};}else{const _0x1addb2={'memberId':_0x242036,'unitId':_0x71b2f8,'content':_0x4b0582,'mention':_0x5c93ee},_0x18f399=await this[_0x3603cd(0x26c)][_0x3603cd(0x245)](_0x3603cd(0x23b)+_0x71b2f8+_0x3603cd(0x1fd),{'body':_0x1addb2});return _0x54ae88(_0x18f399['body'][_0x3603cd(0x202)],_0xd8605b);}}async[_0x68cbcb(0x221)](_0x482f98){const _0x5c85fc=_0x68cbcb;var _0x34ee89,_0x10d9ac;const {text:_0x4e1900,unitId:_0x2a4154}=_0x482f98,_0x770e8=(_0x10d9ac=(_0x34ee89=_0x4e1900[_0x5c85fc(0x20f)])==null?void 0x0:_0x34ee89[_0x5c85fc(0x262)](_0x3d004c=>_0x3d004c[_0x5c85fc(0x215)]===_0x43ff14[_0x5c85fc(0x205)]['COMMENT'])[_0x5c85fc(0x211)](_0x8d6c66=>_0x8d6c66['rangeId']))!=null?_0x10d9ac:[],_0x56e6c4=JSON['stringify'](_0x4e1900),_0xfb8188=_0x482f98[_0x5c85fc(0x25d)],_0x4aa1eb=_0x482f98['id'],_0x2bb96a={'memberId':(await this['_sessionService'][_0x5c85fc(0x25a)](_0x2a4154))['getMemberID'](),'unitId':_0x2a4154,'threadId':_0xfb8188,'mention':_0x770e8,'content':_0x56e6c4,'replyId':_0x4aa1eb},_0x40ba5c=await this[_0x5c85fc(0x26c)][_0x5c85fc(0x245)](_0x5c85fc(0x23b)+_0x2a4154+_0x5c85fc(0x20a),{'body':_0x2bb96a});return!_0x40ba5c[_0x5c85fc(0x22f)][_0x5c85fc(0x258)]||_0x40ba5c['body'][_0x5c85fc(0x258)][_0x5c85fc(0x233)]===0x1;}async[_0x68cbcb(0x253)](_0x4d2965){const _0x233905=_0x68cbcb,{unitId:_0x2690c6}=_0x4d2965,_0x2bcc70=_0x4d2965[_0x233905(0x25d)],_0x34f353={'memberId':this[_0x233905(0x204)][_0x233905(0x228)]()[_0x233905(0x1fb)],'unitId':_0x2690c6,'threadId':_0x2bcc70,'solved':_0x4d2965[_0x233905(0x23d)]?_0xd2dbd0[_0x233905(0x237)]:_0xd2dbd0['OpenOrReOpen']},_0x2e8c71=await this[_0x233905(0x26c)][_0x233905(0x245)](_0x233905(0x23b)+_0x2690c6+_0x233905(0x259),{'body':_0x34f353});return!_0x2e8c71[_0x233905(0x22f)]['error']||_0x2e8c71[_0x233905(0x22f)][_0x233905(0x258)]['code']===0x1;}async[_0x68cbcb(0x212)](_0x565edc,_0x540feb,_0x3890f0,_0x1a9b4f){const _0x287ee9=_0x68cbcb,_0x357358={'memberId':(await this[_0x287ee9(0x24e)][_0x287ee9(0x25a)](_0x565edc))[_0x287ee9(0x230)](),'threadId':_0x3890f0,'replyId':_0x1a9b4f,'unitId':_0x565edc},_0x1bac0b=await this[_0x287ee9(0x26c)][_0x287ee9(0x245)](_0x287ee9(0x23b)+_0x565edc+_0x287ee9(0x25c),{'body':_0x357358});return!_0x1bac0b[_0x287ee9(0x22f)][_0x287ee9(0x258)]||_0x1bac0b[_0x287ee9(0x22f)][_0x287ee9(0x258)][_0x287ee9(0x233)]===0x1;}async[_0x68cbcb(0x1f4)](_0x17df38,_0x253cec,_0x18a050){const _0x445fae=_0x68cbcb,_0xa58a59={'unitId':_0x17df38,'threadId':_0x18a050},_0x4325f0=await this[_0x445fae(0x26c)][_0x445fae(0x245)]('/universer-api/comment/unit/'+_0x17df38+'/list',{'body':_0xa58a59}),_0x18477d=_0x18a050[_0x445fae(0x211)](_0x266002=>_0x3091e0(_0x4325f0[_0x445fae(0x22f)][_0x445fae(0x23f)][_0x266002],_0x17df38,_0x253cec))[_0x445fae(0x262)](Boolean);return Object[_0x445fae(0x218)](_0x4325f0[_0x445fae(0x22f)][_0x445fae(0x241)])['forEach'](_0x2a202d=>{const _0x343242=_0x445fae;this[_0x343242(0x204)]['addUser'](_0x2a202d);}),_0x18477d;}['saveCommentToSnapshot'](_0x5f0af6){return{'id':_0x5f0af6['id'],'threadId':_0x5f0af6['threadId'],'ref':_0x5f0af6['ref']};}};_0x34fd15=_0x5ea355([_0x3d193d(0x0,_0x43ff14['Inject'](_0xa198f5[_0x68cbcb(0x223)])),_0x3d193d(0x1,_0x43ff14[_0x68cbcb(0x220)](_0x43ff14[_0x68cbcb(0x21e)])),_0x3d193d(0x2,_0x43ff14['Inject'](_0x410ab3[_0x68cbcb(0x207)])),_0x3d193d(0x3,_0x43ff14[_0x68cbcb(0x220)](_0x43ff14[_0x68cbcb(0x236)]))],_0x34fd15);var _0x758866=Object[_0x68cbcb(0x25b)],_0x2f145d=(_0x9db884,_0x1fc576,_0x337198,_0x3366c1)=>{const _0x50a8be=_0x68cbcb;for(var _0x566b4b=_0x3366c1>0x1?void 0x0:_0x3366c1?_0x758866(_0x1fc576,_0x337198):_0x1fc576,_0xf87754=_0x9db884[_0x50a8be(0x256)]-0x1,_0x22ac67;_0xf87754>=0x0;_0xf87754--)(_0x22ac67=_0x9db884[_0xf87754])&&(_0x566b4b=_0x22ac67(_0x566b4b)||_0x566b4b);return _0x566b4b;},_0x4797b3=(_0x45a0bb,_0xfa7aa9)=>(_0x110e3a,_0x4cdd16)=>_0xfa7aa9(_0x110e3a,_0x4cdd16,_0x45a0bb);let _0x5c4d1b=class extends _0x43ff14[_0x68cbcb(0x268)]{constructor(_0x582949,_0x534909){const _0x129a93=_0x68cbcb;super(),this[_0x129a93(0x265)]=_0x582949,this[_0x129a93(0x22a)]=_0x534909,this[_0x129a93(0x1f2)]();}['_initDataSource'](){const _0x5f094d=_0x68cbcb;this['_threadCommentDataSourceService'][_0x5f094d(0x225)]=this['_threadCommentDataSource'],this[_0x5f094d(0x265)][_0x5f094d(0x200)]=!0x1;}};_0x5c4d1b=_0x2f145d([_0x4797b3(0x0,_0x293da4[_0x68cbcb(0x267)]),_0x4797b3(0x1,_0x43ff14[_0x68cbcb(0x220)](_0x34fd15))],_0x5c4d1b);var _0x4d45ec=Object[_0x68cbcb(0x1f5)],_0x508a28=Object[_0x68cbcb(0x25b)],_0x578682=(_0x4af109,_0x2c688f,_0x15c657)=>_0x2c688f in _0x4af109?_0x4d45ec(_0x4af109,_0x2c688f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x15c657}):_0x4af109[_0x2c688f]=_0x15c657,_0x283ca0=(_0xd6187d,_0x3f43ab,_0x26ac37,_0x3ebbfe)=>{const _0x3c6327=_0x68cbcb;for(var _0x1bb187=_0x3ebbfe>0x1?void 0x0:_0x3ebbfe?_0x508a28(_0x3f43ab,_0x26ac37):_0x3f43ab,_0x4da1a6=_0xd6187d[_0x3c6327(0x256)]-0x1,_0x3d7615;_0x4da1a6>=0x0;_0x4da1a6--)(_0x3d7615=_0xd6187d[_0x4da1a6])&&(_0x1bb187=_0x3d7615(_0x1bb187)||_0x1bb187);return _0x1bb187;},_0x474611=(_0x28411a,_0x106dca)=>(_0x6ed0a5,_0x19c98d)=>_0x106dca(_0x6ed0a5,_0x19c98d,_0x28411a),_0x49841d=(_0x23e2fa,_0x32ee1a,_0x3dbd94)=>_0x578682(_0x23e2fa,typeof _0x32ee1a!='symbol'?_0x32ee1a+'':_0x32ee1a,_0x3dbd94);_0x4b8500['UniverThreadCommentDataSourcePlugin']=class extends _0x43ff14[_0x68cbcb(0x255)]{constructor(_0x57d416=_0x5dcb9d,_0x8094b3,_0x334860){const _0x21b420=_0x68cbcb;super(),this[_0x21b420(0x23e)]=_0x57d416,this['_injector']=_0x8094b3,this[_0x21b420(0x257)]=_0x334860;const {..._0x5001d3}=_0x43ff14['merge']({},_0x5dcb9d,this[_0x21b420(0x23e)]);this['_configService'][_0x21b420(0x201)](_0x160666,_0x5001d3);}[_0x68cbcb(0x260)](){const _0x4d1fa2=_0x68cbcb;[[_0x34fd15],[_0x5c4d1b],[_0x3c98ab]][_0x4d1fa2(0x1fa)](_0x517118=>{const _0x378f8c=_0x4d1fa2;this['_injector'][_0x378f8c(0x248)](_0x517118);});}[_0x68cbcb(0x208)](){const _0x3112bd=_0x68cbcb;this[_0x3112bd(0x20e)]['get'](_0x5c4d1b),this['_injector'][_0x3112bd(0x20c)](_0x3c98ab);}},_0x49841d(_0x4b8500['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x47759d),_0x49841d(_0x4b8500[_0x68cbcb(0x217)],_0x68cbcb(0x235),_0x43ff14['UniverInstanceType'][_0x68cbcb(0x22d)]),_0x4b8500['UniverThreadCommentDataSourcePlugin']=_0x283ca0([_0x43ff14[_0x68cbcb(0x264)](_0x315cc2[_0x68cbcb(0x1f0)],_0x410ab3[_0x68cbcb(0x1f9)],_0x3913ca['UniverLicensePlugin']),_0x474611(0x1,_0x43ff14['Inject'](_0x43ff14['Injector'])),_0x474611(0x2,_0x43ff14[_0x68cbcb(0x231)])],_0x4b8500[_0x68cbcb(0x217)]),Object[_0x68cbcb(0x1f5)](_0x4b8500,Symbol[_0x68cbcb(0x23c)],{'value':'Module'});}));
|
|
1
|
+
function _0x583c(_0x448ca6,_0x43c3b5){const _0x4372d5=_0x4372();return _0x583c=function(_0x583cc9,_0x564864){_0x583cc9=_0x583cc9-0xe9;let _0x4b6854=_0x4372d5[_0x583cc9];return _0x4b6854;},_0x583c(_0x448ca6,_0x43c3b5);}function _0x4372(){const _0x17ea52=['replies','payload','Disposable','unitId','parse','addComment','Injector','onStarting','replyId','dataSource','ref','rangeType','5641480ODDsKa','_sessionService','OpenOrReOpen','Reply','addUser','_injector','426JrNbJl','thread-comment-data-source.config','YYYY/MM/DD\x20HH:mm','70eGtqvj','Solved','/universer-api/user/list','CustomRangeType','ThreadCommentModel','comments','2513vaCMhY','Solve','solved','@univerjs/core','_configService','UniverProLicense','/universer-api/comment/unit/','_initDataSource','getUnit','_userService','Add','Plugin','disposeWithMe','createTimestamp','4458FcyKrD','userId','4035361QwfyBM','dayjs','error','/delete','2087120AXdMEk','syncUpdateMutationToColla','post','UniverThreadCommentDataSourcePlugin','add','COMMENT','@univerjs/thread-comment','11478qqZZJE','delete','getUser','UNIVER_UNKNOWN','_httpService','format','pipe','object','/reply','toStringTag','_config','1570167vfSmmT','root','user','comment','updateComment','size','_commentService','customRanges','_threadCommentDataSource','IThreadCommentDataSourceService','Edit','content','@univerjs/thread-comment-ui','resolveComment','defineProperty','filter','/solved','Unknown','merge','@univerjs-pro/collaboration-client','getOwnPropertyDescriptor','stringify','commentUpdate$','DependentOn','8MrJhIq','find','personId','CollaborationSessionService','forEach','UNRECOGNIZED','@univerjs-pro/license','exports','_initUserSync','_init','/list','length','getMemberID','_threadCommentModel','478134deHNxF','body','_threadCommentDataSourceService','Delete','rangeId','getCurrentUser','UniverThreadCommentUIPlugin','values','code','UniverCore','reply','bufferTime','users','Module','UniverProThreadCommentDatasource','UniverInstanceType','map','deleteComment','IConfigService','UniverThreadCommentUi','function','threadId','UniverCollaborationClientPlugin','rxjs','HTTPService','Inject','get','requireSession','subscribe','parentId','@univerjs/network','UniverNetwork','/edit','userID','setConfig','UserManagerService'];_0x4372=function(){return _0x17ea52;};return _0x4372();}(function(_0x42e37a,_0x5b650d){const _0x2bf550=_0x583c,_0x316d48=_0x42e37a();while(!![]){try{const _0x27fa08=parseInt(_0x2bf550(0xf4))/0x1*(parseInt(_0x2bf550(0x10b))/0x2)+parseInt(_0x2bf550(0x149))/0x3+-parseInt(_0x2bf550(0x13b))/0x4*(-parseInt(_0x2bf550(0x111))/0x5)+parseInt(_0x2bf550(0x118))/0x6*(parseInt(_0x2bf550(0xfd))/0x7)+parseInt(_0x2bf550(0xee))/0x8+-parseInt(_0x2bf550(0x123))/0x9+parseInt(_0x2bf550(0xf7))/0xa*(-parseInt(_0x2bf550(0x10d))/0xb);if(_0x27fa08===_0x5b650d)break;else _0x316d48['push'](_0x316d48['shift']());}catch(_0x103e61){_0x316d48['push'](_0x316d48['shift']());}}}(_0x4372,0x90da0),function(_0x3712fb,_0xc64564){const _0x23e2e0=_0x583c;typeof exports==_0x23e2e0(0x11f)&&typeof module<'u'?_0xc64564(exports,require(_0x23e2e0(0x136)),require(_0x23e2e0(0x141)),require(_0x23e2e0(0x100)),require('@univerjs/thread-comment-ui'),require(_0x23e2e0(0x117)),require(_0x23e2e0(0x160)),require(_0x23e2e0(0x167))):typeof define==_0x23e2e0(0x15d)&&define['amd']?define([_0x23e2e0(0x142),_0x23e2e0(0x136),_0x23e2e0(0x141),_0x23e2e0(0x100),_0x23e2e0(0x12f),_0x23e2e0(0x117),_0x23e2e0(0x160),_0x23e2e0(0x167)],_0xc64564):(_0x3712fb=typeof globalThis<'u'?globalThis:_0x3712fb||self,_0xc64564(_0x3712fb[_0x23e2e0(0x157)]={},_0x3712fb['UniverProCollaborationClient'],_0x3712fb[_0x23e2e0(0x102)],_0x3712fb[_0x23e2e0(0x152)],_0x3712fb[_0x23e2e0(0x15c)],_0x3712fb['UniverThreadComment'],_0x3712fb[_0x23e2e0(0x160)],_0x3712fb[_0x23e2e0(0x168)]));}(this,function(_0x6a332c,_0x5ed8c0,_0x3750e3,_0x575f15,_0x4a658b,_0x254c84,_0x211f0d,_0x2daee6){'use strict';const _0x239848=_0x583c;const _0x5902bc='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x3af9f5=(_0x4a6fa3=>(_0x4a6fa3[_0x4a6fa3[_0x239848(0xf0)]=0x0]=_0x239848(0xf0),_0x4a6fa3[_0x4a6fa3['Solved']=0x1]=_0x239848(0xf8),_0x4a6fa3[_0x4a6fa3[_0x239848(0x140)]=-0x1]=_0x239848(0x140),_0x4a6fa3))(_0x3af9f5||{}),_0x1b4ca8=(_0x576bd7=>(_0x576bd7[_0x576bd7[_0x239848(0x134)]=0x0]=_0x239848(0x134),_0x576bd7[_0x576bd7[_0x239848(0x107)]=0x1]=_0x239848(0x107),_0x576bd7[_0x576bd7[_0x239848(0xf1)]=0x2]=_0x239848(0xf1),_0x576bd7[_0x576bd7[_0x239848(0x12d)]=0x3]=_0x239848(0x12d),_0x576bd7[_0x576bd7[_0x239848(0x14c)]=0x4]=_0x239848(0x14c),_0x576bd7[_0x576bd7[_0x239848(0xfe)]=0x5]=_0x239848(0xfe),_0x576bd7[_0x576bd7[_0x239848(0x140)]=-0x1]='UNRECOGNIZED',_0x576bd7))(_0x1b4ca8||{});const _0x1aed35=_0x3d6807=>_0x575f15[_0x239848(0x10e)](new Date(+_0x3d6807))[_0x239848(0x11d)](_0x239848(0xf6)),_0x24af04=async(_0x6d4a36,_0x1ced8e)=>{const _0x1527eb=_0x239848,_0x345032=_0x6d4a36['get'](_0x575f15[_0x1527eb(0x16c)]),_0x5f5452=_0x6d4a36[_0x1527eb(0x163)](_0x2daee6[_0x1527eb(0x161)]);_0x1ced8e[_0x1527eb(0x13f)](_0x3ad163=>{const _0x14d846=_0x1527eb;_0x345032[_0x14d846(0x11a)](_0x3ad163)&&_0x1ced8e[_0x14d846(0x119)](_0x3ad163);}),_0x1ced8e[_0x1527eb(0x128)]&&(await _0x5f5452[_0x1527eb(0x163)](_0x1527eb(0xf9),{'params':{'userIDs':[..._0x1ced8e]}}))[_0x1527eb(0x14a)][_0x1527eb(0x155)][_0x1527eb(0x13f)](_0x2c89ca=>{const _0x2e143e=_0x1527eb;_0x2c89ca&&_0x345032[_0x2e143e(0xf2)](_0x2c89ca);});};var _0x28c919=Object['getOwnPropertyDescriptor'],_0x4faf2b=(_0x3b0835,_0x2e6b16,_0x412557,_0x3f645b)=>{const _0x460452=_0x239848;for(var _0x3b7c8a=_0x3f645b>0x1?void 0x0:_0x3f645b?_0x28c919(_0x2e6b16,_0x412557):_0x2e6b16,_0x7c31a2=_0x3b0835[_0x460452(0x146)]-0x1,_0x4dc9c9;_0x7c31a2>=0x0;_0x7c31a2--)(_0x4dc9c9=_0x3b0835[_0x7c31a2])&&(_0x3b7c8a=_0x4dc9c9(_0x3b7c8a)||_0x3b7c8a);return _0x3b7c8a;},_0x28c0d4=(_0x4f852f,_0x48ebab)=>(_0x75d321,_0x9d5c6f)=>_0x48ebab(_0x75d321,_0x9d5c6f,_0x4f852f);let _0x2a7b45=class extends _0x575f15[_0x239848(0x16f)]{constructor(_0x2cbb2e,_0x4777c8,_0x41ba7a,_0x3dd1f9){const _0x535eda=_0x239848;super(),this[_0x535eda(0x129)]=_0x2cbb2e,this[_0x535eda(0x148)]=_0x4777c8,this['_userService']=_0x41ba7a,this[_0x535eda(0xf3)]=_0x3dd1f9,this['_init'](),this['_initUserSync']();}[_0x239848(0x143)](){const _0x4a2ca2=_0x239848;this[_0x4a2ca2(0x109)](this['_threadCommentModel'][_0x4a2ca2(0x139)][_0x4a2ca2(0x11e)](_0x211f0d[_0x4a2ca2(0x154)](0x10))[_0x4a2ca2(0x165)](_0x5c99da=>{const _0x308905=_0x4a2ca2,_0x5da793=new Set();_0x5c99da[_0x308905(0x13f)](_0x289e45=>{const _0x275902=_0x308905;switch(_0x289e45['type']){case'add':{const _0x4bb9cf=_0x289e45[_0x275902(0x16e)][_0x275902(0x13d)];_0x5da793[_0x275902(0x115)](_0x4bb9cf);break;}}}),_0x24af04(this[_0x308905(0xf3)],_0x5da793);}));}[_0x239848(0x144)](){const _0x132b08=_0x239848;this['disposeWithMe'](this[_0x132b08(0x129)]['commentUpdate$'][_0x132b08(0x165)](async _0x55c948=>{const _0x2c8dc8=_0x132b08;var _0x3e186c,_0x18a275,_0x246f5a,_0x14f9cf;const _0x3c8284=(_0x3e186c=this[_0x2c8dc8(0x148)][_0x2c8dc8(0x105)](_0x55c948[_0x2c8dc8(0x170)])[_0x2c8dc8(0x13c)](_0x53a8ab=>_0x53a8ab[_0x2c8dc8(0x15e)]===_0x55c948['threadId']))==null?void 0x0:_0x3e186c[_0x2c8dc8(0x124)];if(!_0x3c8284)return;const {unitId:_0x362d42,subUnitId:_0x61ac69}=_0x3c8284;switch(_0x55c948[_0x2c8dc8(0x125)]&&this[_0x2c8dc8(0x106)][_0x2c8dc8(0xf2)](_0x55c948[_0x2c8dc8(0x125)]),_0x55c948['type']){case _0x1b4ca8[_0x2c8dc8(0x107)]:break;case _0x1b4ca8[_0x2c8dc8(0xf1)]:{this[_0x2c8dc8(0x148)][_0x2c8dc8(0x172)](_0x362d42,_0x61ac69,{'unitId':_0x362d42,'subUnitId':_0x61ac69,'ref':'','id':_0x55c948[_0x2c8dc8(0xea)],'dT':_0x1aed35(+_0x55c948[_0x2c8dc8(0x10a)]),'threadId':_0x55c948['threadId'],'personId':(_0x246f5a=(_0x18a275=_0x55c948[_0x2c8dc8(0x125)])==null?void 0x0:_0x18a275[_0x2c8dc8(0x16a)])!=null?_0x246f5a:_0x55c948['userId'],'text':JSON[_0x2c8dc8(0x171)](_0x55c948['content']),'parentId':_0x3c8284['id']});break;}case _0x1b4ca8['Delete']:{const _0x30d789=this[_0x2c8dc8(0x148)]['getComment'](_0x362d42,_0x61ac69,_0x55c948['replyId']);_0x30d789&&_0x30d789[_0x2c8dc8(0x166)]&&this[_0x2c8dc8(0x148)][_0x2c8dc8(0x15a)](_0x362d42,_0x61ac69,_0x55c948['replyId']);break;}case _0x1b4ca8['Edit']:{this[_0x2c8dc8(0x148)][_0x2c8dc8(0x127)](_0x362d42,_0x61ac69,{'commentId':_0x55c948[_0x2c8dc8(0xea)],'text':JSON[_0x2c8dc8(0x171)](_0x55c948[_0x2c8dc8(0x12e)])});break;}case _0x1b4ca8[_0x2c8dc8(0xfe)]:{const _0x9f7010=(_0x14f9cf=this[_0x2c8dc8(0x148)][_0x2c8dc8(0x105)](_0x55c948[_0x2c8dc8(0x170)])['find'](_0x261594=>_0x261594['threadId']===_0x55c948[_0x2c8dc8(0x15e)]))==null?void 0x0:_0x14f9cf[_0x2c8dc8(0x124)];_0x9f7010&&this['_threadCommentModel']['resolveComment'](_0x362d42,_0x61ac69,_0x9f7010['id'],_0x55c948[_0x2c8dc8(0xff)]===_0x3af9f5['Solved']);break;}}}));}};_0x2a7b45=_0x4faf2b([_0x28c0d4(0x0,_0x575f15[_0x239848(0x162)](_0x5ed8c0['CommentService'])),_0x28c0d4(0x1,_0x575f15['Inject'](_0x254c84[_0x239848(0xfb)])),_0x28c0d4(0x2,_0x575f15[_0x239848(0x162)](_0x575f15[_0x239848(0x16c)])),_0x28c0d4(0x3,_0x575f15[_0x239848(0x162)](_0x575f15[_0x239848(0x173)]))],_0x2a7b45);const _0x5d5fcb=_0x239848(0xf5),_0x3c7908={};var _0x5e0987=Object[_0x239848(0x137)],_0x548227=(_0x230faf,_0x4b5bf2,_0x7fe616,_0x3fae5b)=>{for(var _0x58efa0=_0x3fae5b>0x1?void 0x0:_0x3fae5b?_0x5e0987(_0x4b5bf2,_0x7fe616):_0x4b5bf2,_0x1a2f57=_0x230faf['length']-0x1,_0x215b48;_0x1a2f57>=0x0;_0x1a2f57--)(_0x215b48=_0x230faf[_0x1a2f57])&&(_0x58efa0=_0x215b48(_0x58efa0)||_0x58efa0);return _0x58efa0;},_0x44d073=(_0x4386d7,_0x3d3d02)=>(_0x5cc2d9,_0x438af7)=>_0x3d3d02(_0x5cc2d9,_0x438af7,_0x4386d7);function _0x474a87(_0x556243,_0x9fe308){const _0x19290e=_0x239848,_0x582d55=_0x556243['replies'][0x0];return{..._0x9fe308,'id':_0x582d55[_0x19290e(0xea)],'resolved':_0x556243[_0x19290e(0xff)]===0x1,'dT':_0x1aed35(_0x582d55[_0x19290e(0x10a)]),'personId':_0x582d55[_0x19290e(0x10c)],'threadId':_0x582d55[_0x19290e(0x15e)]};}function _0xde0284(_0x77f13f,_0x102563,_0x46d7a7){const _0x3d9d4e=_0x239848;var _0x43ae80,_0x118c7d;if(((_0x118c7d=(_0x43ae80=_0x77f13f==null?void 0x0:_0x77f13f[_0x3d9d4e(0x16d)])==null?void 0x0:_0x43ae80[_0x3d9d4e(0x146)])!=null?_0x118c7d:0x0)>0x0){const _0x49eaf6=(_0x59c2e1,_0x21354a)=>({'id':_0x59c2e1[_0x3d9d4e(0xea)],'threadId':_0x59c2e1[_0x3d9d4e(0x15e)],'dT':_0x1aed35(_0x59c2e1[_0x3d9d4e(0x10a)]),'personId':_0x59c2e1['userId'],'resolved':_0x77f13f['solved']===_0x3af9f5[_0x3d9d4e(0xf8)],'unitId':_0x102563,'subUnitId':_0x46d7a7,'text':JSON['parse'](_0x59c2e1[_0x3d9d4e(0x12e)]),'parentId':_0x21354a}),_0x498fb9=_0x49eaf6(_0x77f13f[_0x3d9d4e(0x16d)][0x0]);return{..._0x498fb9,'children':_0x77f13f[_0x3d9d4e(0x16d)]['slice'](0x1)[_0x3d9d4e(0x159)](_0x2c317f=>_0x49eaf6(_0x2c317f,_0x498fb9['id']))};}return null;}let _0x3476f6=class{constructor(_0x43e627,_0x14173d,_0x328d92,_0x1c2fe7){const _0x36be8c=_0x239848;this[_0x36be8c(0x11c)]=_0x43e627,this[_0x36be8c(0x106)]=_0x14173d,this[_0x36be8c(0xef)]=_0x328d92,this[_0x36be8c(0xf3)]=_0x1c2fe7;}async[_0x239848(0x172)](_0x376dd5){const _0x487659=_0x239848;var _0x336521,_0x5bd9b2;const {parentId:_0x41e3f7,unitId:_0x245607,text:_0x5136b2,threadId:_0x14214e}=_0x376dd5,_0x112ef9=(_0x5bd9b2=(_0x336521=_0x5136b2[_0x487659(0x12a)])==null?void 0x0:_0x336521[_0x487659(0x132)](_0x3022a8=>_0x3022a8[_0x487659(0xed)]===_0x575f15[_0x487659(0xfa)][_0x487659(0x116)])[_0x487659(0x159)](_0x311131=>_0x311131[_0x487659(0x14d)]))!=null?_0x5bd9b2:[],_0x157c45=JSON['stringify'](_0x5136b2),_0x36d97a=(await this[_0x487659(0xef)][_0x487659(0x164)](_0x245607))[_0x487659(0x147)]();if(_0x41e3f7){const _0x2036a7={'memberId':_0x36d97a,'unitId':_0x245607,'content':_0x157c45,'mention':_0x112ef9,'threadId':_0x14214e},_0x5931f3=(await this[_0x487659(0x11c)][_0x487659(0x113)]('/universer-api/comment/unit/'+_0x245607+_0x487659(0x120),{'body':_0x2036a7}))[_0x487659(0x14a)][_0x487659(0x153)];return{..._0x376dd5,'id':_0x5931f3[_0x487659(0xea)],'dT':_0x575f15[_0x487659(0x10e)](+_0x5931f3['createTimestamp'])[_0x487659(0x11d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5931f3[_0x487659(0x10c)]};}else{const _0x6928ca={'memberId':_0x36d97a,'unitId':_0x245607,'content':_0x157c45,'mention':_0x112ef9},_0x3c9198=await this[_0x487659(0x11c)][_0x487659(0x113)](_0x487659(0x103)+_0x245607+'/add',{'body':_0x6928ca});return _0x474a87(_0x3c9198['body'][_0x487659(0x126)],_0x376dd5);}}async['updateComment'](_0x46aeb9){const _0x1f40ac=_0x239848;var _0x272c4f,_0x358791;const {text:_0x23420a,unitId:_0x552a69}=_0x46aeb9,_0x11c2a3=(_0x358791=(_0x272c4f=_0x23420a['customRanges'])==null?void 0x0:_0x272c4f[_0x1f40ac(0x132)](_0x305076=>_0x305076[_0x1f40ac(0xed)]===_0x575f15[_0x1f40ac(0xfa)][_0x1f40ac(0x116)])['map'](_0x5c2d8e=>_0x5c2d8e[_0x1f40ac(0x14d)]))!=null?_0x358791:[],_0x405748=JSON[_0x1f40ac(0x138)](_0x23420a),_0x98cbe1=_0x46aeb9['threadId'],_0x4793e5=_0x46aeb9['id'],_0x4a5dc7={'memberId':(await this[_0x1f40ac(0xef)][_0x1f40ac(0x164)](_0x552a69))[_0x1f40ac(0x147)](),'unitId':_0x552a69,'threadId':_0x98cbe1,'mention':_0x11c2a3,'content':_0x405748,'replyId':_0x4793e5},_0x144f91=await this[_0x1f40ac(0x11c)][_0x1f40ac(0x113)](_0x1f40ac(0x103)+_0x552a69+_0x1f40ac(0x169),{'body':_0x4a5dc7});return!_0x144f91[_0x1f40ac(0x14a)]['error']||_0x144f91[_0x1f40ac(0x14a)]['error'][_0x1f40ac(0x151)]===0x1;}async[_0x239848(0x130)](_0xd52baa){const _0x305033=_0x239848,{unitId:_0x33eab6}=_0xd52baa,_0x4a7e29=_0xd52baa[_0x305033(0x15e)],_0x15d8b1={'memberId':this[_0x305033(0x106)][_0x305033(0x14e)]()[_0x305033(0x16a)],'unitId':_0x33eab6,'threadId':_0x4a7e29,'solved':_0xd52baa['resolved']?_0x3af9f5[_0x305033(0xf8)]:_0x3af9f5[_0x305033(0xf0)]},_0x5b51e2=await this[_0x305033(0x11c)][_0x305033(0x113)](_0x305033(0x103)+_0x33eab6+_0x305033(0x133),{'body':_0x15d8b1});return!_0x5b51e2[_0x305033(0x14a)][_0x305033(0x10f)]||_0x5b51e2[_0x305033(0x14a)][_0x305033(0x10f)][_0x305033(0x151)]===0x1;}async[_0x239848(0x15a)](_0x55e9c7,_0xa77323,_0x4babf3,_0x14157c){const _0x2bb11a=_0x239848,_0x456b3b={'memberId':(await this['_sessionService'][_0x2bb11a(0x164)](_0x55e9c7))[_0x2bb11a(0x147)](),'threadId':_0x4babf3,'replyId':_0x14157c,'unitId':_0x55e9c7},_0x303020=await this[_0x2bb11a(0x11c)][_0x2bb11a(0x113)]('/universer-api/comment/unit/'+_0x55e9c7+_0x2bb11a(0x110),{'body':_0x456b3b});return!_0x303020[_0x2bb11a(0x14a)][_0x2bb11a(0x10f)]||_0x303020[_0x2bb11a(0x14a)][_0x2bb11a(0x10f)]['code']===0x1;}async['listComments'](_0x5baf61,_0x1bdb8b,_0x4be464){const _0x5116bb=_0x239848,_0x40396f={'unitId':_0x5baf61,'threadId':_0x4be464},_0x2f50c6=await this[_0x5116bb(0x11c)][_0x5116bb(0x113)]('/universer-api/comment/unit/'+_0x5baf61+_0x5116bb(0x145),{'body':_0x40396f}),_0x23179a=_0x4be464['map'](_0x1a8042=>_0xde0284(_0x2f50c6[_0x5116bb(0x14a)][_0x5116bb(0xfc)][_0x1a8042],_0x5baf61,_0x1bdb8b))['filter'](Boolean);return Object[_0x5116bb(0x150)](_0x2f50c6[_0x5116bb(0x14a)][_0x5116bb(0x155)])['forEach'](_0xc4978b=>{const _0x350a23=_0x5116bb;this[_0x350a23(0x106)][_0x350a23(0xf2)](_0xc4978b);}),_0x23179a;}['saveCommentToSnapshot'](_0x60b7c){const _0x1a44e9=_0x239848;return{'id':_0x60b7c['id'],'threadId':_0x60b7c[_0x1a44e9(0x15e)],'ref':_0x60b7c[_0x1a44e9(0xec)]};}};_0x3476f6=_0x548227([_0x44d073(0x0,_0x575f15[_0x239848(0x162)](_0x2daee6[_0x239848(0x161)])),_0x44d073(0x1,_0x575f15[_0x239848(0x162)](_0x575f15[_0x239848(0x16c)])),_0x44d073(0x2,_0x575f15[_0x239848(0x162)](_0x5ed8c0[_0x239848(0x13e)])),_0x44d073(0x3,_0x575f15['Inject'](_0x575f15[_0x239848(0x173)]))],_0x3476f6);var _0x1490a1=Object[_0x239848(0x137)],_0x84035a=(_0x3d2720,_0x3a949b,_0x54a797,_0x1712d2)=>{const _0x4a753e=_0x239848;for(var _0x24cf1c=_0x1712d2>0x1?void 0x0:_0x1712d2?_0x1490a1(_0x3a949b,_0x54a797):_0x3a949b,_0x5118a8=_0x3d2720[_0x4a753e(0x146)]-0x1,_0x1bb2d2;_0x5118a8>=0x0;_0x5118a8--)(_0x1bb2d2=_0x3d2720[_0x5118a8])&&(_0x24cf1c=_0x1bb2d2(_0x24cf1c)||_0x24cf1c);return _0x24cf1c;},_0x2bf312=(_0x8c54c4,_0x5d9bb1)=>(_0x52d04c,_0x2f17e9)=>_0x5d9bb1(_0x52d04c,_0x2f17e9,_0x8c54c4);let _0x24dbfc=class extends _0x575f15[_0x239848(0x16f)]{constructor(_0x1f0cdd,_0x544a83){const _0x24df9e=_0x239848;super(),this['_threadCommentDataSourceService']=_0x1f0cdd,this['_threadCommentDataSource']=_0x544a83,this[_0x24df9e(0x104)]();}[_0x239848(0x104)](){const _0xba6664=_0x239848;this[_0xba6664(0x14b)][_0xba6664(0xeb)]=this[_0xba6664(0x12b)],this[_0xba6664(0x14b)][_0xba6664(0x112)]=!0x1;}};_0x24dbfc=_0x84035a([_0x2bf312(0x0,_0x254c84[_0x239848(0x12c)]),_0x2bf312(0x1,_0x575f15['Inject'](_0x3476f6))],_0x24dbfc);var _0x17f487=Object[_0x239848(0x131)],_0xe44086=Object[_0x239848(0x137)],_0x261cdc=(_0x4d6a2c,_0x55f7b5,_0x246ac7)=>_0x55f7b5 in _0x4d6a2c?_0x17f487(_0x4d6a2c,_0x55f7b5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x246ac7}):_0x4d6a2c[_0x55f7b5]=_0x246ac7,_0x124413=(_0x24d9c9,_0x3773e1,_0x2b77c5,_0x5227b5)=>{const _0x16b290=_0x239848;for(var _0x1e1512=_0x5227b5>0x1?void 0x0:_0x5227b5?_0xe44086(_0x3773e1,_0x2b77c5):_0x3773e1,_0x38017b=_0x24d9c9[_0x16b290(0x146)]-0x1,_0x11d34f;_0x38017b>=0x0;_0x38017b--)(_0x11d34f=_0x24d9c9[_0x38017b])&&(_0x1e1512=_0x11d34f(_0x1e1512)||_0x1e1512);return _0x1e1512;},_0x15bec8=(_0x18d74d,_0x379dff)=>(_0x2a84dc,_0x3a3db4)=>_0x379dff(_0x2a84dc,_0x3a3db4,_0x18d74d),_0x13025c=(_0xea726c,_0x5cd399,_0x257adb)=>_0x261cdc(_0xea726c,typeof _0x5cd399!='symbol'?_0x5cd399+'':_0x5cd399,_0x257adb);_0x6a332c[_0x239848(0x114)]=class extends _0x575f15[_0x239848(0x108)]{constructor(_0x6eaf9c=_0x3c7908,_0x513f2b,_0x25107a){const _0xea7218=_0x239848;super(),this[_0xea7218(0x122)]=_0x6eaf9c,this[_0xea7218(0xf3)]=_0x513f2b,this[_0xea7218(0x101)]=_0x25107a;const {..._0x2477b0}=_0x575f15[_0xea7218(0x135)]({},_0x3c7908,this[_0xea7218(0x122)]);this[_0xea7218(0x101)][_0xea7218(0x16b)](_0x5d5fcb,_0x2477b0);}[_0x239848(0xe9)](){const _0x4aba69=_0x239848;[[_0x3476f6],[_0x24dbfc],[_0x2a7b45]][_0x4aba69(0x13f)](_0x38a5db=>{const _0x21eb6b=_0x4aba69;this['_injector'][_0x21eb6b(0x115)](_0x38a5db);});}['onReady'](){const _0x5c4dfb=_0x239848;this[_0x5c4dfb(0xf3)][_0x5c4dfb(0x163)](_0x24dbfc),this['_injector'][_0x5c4dfb(0x163)](_0x2a7b45);}},_0x13025c(_0x6a332c[_0x239848(0x114)],'pluginName',_0x5902bc),_0x13025c(_0x6a332c[_0x239848(0x114)],'type',_0x575f15[_0x239848(0x158)][_0x239848(0x11b)]),_0x6a332c[_0x239848(0x114)]=_0x124413([_0x575f15[_0x239848(0x13a)](_0x4a658b[_0x239848(0x14f)],_0x5ed8c0[_0x239848(0x15f)],_0x3750e3['UniverLicensePlugin']),_0x15bec8(0x1,_0x575f15['Inject'](_0x575f15['Injector'])),_0x15bec8(0x2,_0x575f15[_0x239848(0x15b)])],_0x6a332c[_0x239848(0x114)]),Object[_0x239848(0x131)](_0x6a332c,Symbol[_0x239848(0x121)],{'value':_0x239848(0x156)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.7.0-nightly.
|
|
3
|
+
"version": "0.7.0-nightly.202505111606",
|
|
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/
|
|
49
|
-
"@univerjs-pro/
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.7.0-nightly.
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/license": "0.7.0-nightly.202505111606",
|
|
49
|
+
"@univerjs-pro/collaboration-client": "0.7.0-nightly.202505111606",
|
|
50
|
+
"@univerjs/thread-comment": "0.7.0-nightly.202505111606",
|
|
51
|
+
"@univerjs/core": "0.7.0-nightly.202505111606",
|
|
52
|
+
"@univerjs/network": "0.7.0-nightly.202505111606",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.7.0-nightly.202505111606",
|
|
54
|
+
"@univerjs/protocol": "0.1.46-alpha.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|