@univerjs-pro/thread-comment-datasource 0.10.14-nightly.202511031023 → 0.10.14-nightly.202511070640
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x15b9b=_0x4a85;(function(_0x4c3cb3,_0x227c0d){const _0x168e70=_0x4a85,_0x43fb31=_0x4c3cb3();while(!![]){try{const _0x23be81=parseInt(_0x168e70(0xe0))/0x1+-parseInt(_0x168e70(0x9a))/0x2+parseInt(_0x168e70(0xdd))/0x3+-parseInt(_0x168e70(0xe1))/0x4*(parseInt(_0x168e70(0xd7))/0x5)+-parseInt(_0x168e70(0x8f))/0x6+-parseInt(_0x168e70(0xb2))/0x7+-parseInt(_0x168e70(0xd3))/0x8*(-parseInt(_0x168e70(0xdb))/0x9);if(_0x23be81===_0x227c0d)break;else _0x43fb31['push'](_0x43fb31['shift']());}catch(_0x45387f){_0x43fb31['push'](_0x43fb31['shift']());}}}(_0x2341,0xc48df));function _0x4a85(_0x3b1787,_0x3c382d){const _0x2341f4=_0x2341();return _0x4a85=function(_0x4a8504,_0x11b554){_0x4a8504=_0x4a8504-0x86;let _0x146be7=_0x2341f4[_0x4a8504];return _0x146be7;},_0x4a85(_0x3b1787,_0x3c382d);}Object[_0x15b9b(0xde)](exports,Symbol['toStringTag'],{'value':_0x15b9b(0xa7)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x15b9b(0xca);var I=(_0x4dff67=>(_0x4dff67[_0x4dff67['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x4dff67[_0x4dff67['Solved']=0x1]='Solved',_0x4dff67[_0x4dff67[_0x15b9b(0xfc)]=-0x1]='UNRECOGNIZED',_0x4dff67))(I||{}),v=(_0x374be8=>(_0x374be8[_0x374be8[_0x15b9b(0xb4)]=0x0]='Unknown',_0x374be8[_0x374be8[_0x15b9b(0xee)]=0x1]='Add',_0x374be8[_0x374be8[_0x15b9b(0x90)]=0x2]=_0x15b9b(0x90),_0x374be8[_0x374be8[_0x15b9b(0xe6)]=0x3]='Edit',_0x374be8[_0x374be8['Delete']=0x4]=_0x15b9b(0xd4),_0x374be8[_0x374be8[_0x15b9b(0xac)]=0x5]=_0x15b9b(0xac),_0x374be8[_0x374be8[_0x15b9b(0xfc)]=-0x1]='UNRECOGNIZED',_0x374be8))(v||{});const f=_0x427a6c=>c['dayjs'](new Date(+_0x427a6c))[_0x15b9b(0xe2)](_0x15b9b(0xeb)),R=async(_0x4f366b,_0x27c272)=>{const _0x2a440e=_0x15b9b,_0x5201ef=_0x4f366b['get'](c[_0x2a440e(0xb8)]),_0xf0f2bb=_0x4f366b['get'](P[_0x2a440e(0xd0)]);_0x27c272['forEach'](_0x1e2872=>{const _0x48c61d=_0x2a440e;_0x5201ef['getUser'](_0x1e2872)&&_0x27c272[_0x48c61d(0xf4)](_0x1e2872);}),_0x27c272[_0x2a440e(0xf0)]&&(await _0xf0f2bb[_0x2a440e(0xe9)](_0x2a440e(0xa9),{'params':{'userIDs':[..._0x27c272]}}))[_0x2a440e(0xfb)][_0x2a440e(0x8a)][_0x2a440e(0x9d)](_0x417172=>{const _0x424db1=_0x2a440e;_0x417172&&_0x5201ef[_0x424db1(0xcb)](_0x417172);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x5c2657,_0x52215f,_0x59d2ba,_0x310c72)=>{const _0x16421f=_0x15b9b;for(var _0x355267=_0x310c72>0x1?void 0x0:_0x310c72?$(_0x52215f,_0x59d2ba):_0x52215f,_0x1c1c86=_0x5c2657[_0x16421f(0x89)]-0x1,_0x621f51;_0x1c1c86>=0x0;_0x1c1c86--)(_0x621f51=_0x5c2657[_0x1c1c86])&&(_0x355267=_0x621f51(_0x355267)||_0x355267);return _0x355267;},S=(_0x56fbac,_0x31d263)=>(_0x18c60b,_0x116bee)=>_0x31d263(_0x18c60b,_0x116bee,_0x56fbac);let _=class extends c[_0x15b9b(0xf5)]{constructor(_0x25bffa,_0x154bb6,_0x383346,_0x2bb78c){const _0x5b673c=_0x15b9b;super(),this['_commentService']=_0x25bffa,this[_0x5b673c(0x8d)]=_0x154bb6,this[_0x5b673c(0xd5)]=_0x383346,this[_0x5b673c(0xdf)]=_0x2bb78c,this[_0x5b673c(0xa3)](),this[_0x5b673c(0xf9)]();}[_0x15b9b(0xf9)](){const _0x301a22=_0x15b9b;this[_0x301a22(0xaf)](this[_0x301a22(0x8d)]['commentUpdate$'][_0x301a22(0xd1)](j[_0x301a22(0x8c)](0x10))[_0x301a22(0x91)](_0x932ce=>{const _0xe5c60b=_0x301a22,_0x530265=new Set();_0x932ce[_0xe5c60b(0x9d)](_0x477a6f=>{const _0x5ed81a=_0xe5c60b;switch(_0x477a6f[_0x5ed81a(0xef)]){case _0x5ed81a(0xe7):{const _0x591d9f=_0x477a6f[_0x5ed81a(0x96)]['personId'];_0x530265[_0x5ed81a(0xe7)](_0x591d9f);break;}}}),R(this[_0xe5c60b(0xdf)],_0x530265);}));}[_0x15b9b(0xa3)](){const _0x111493=_0x15b9b;this[_0x111493(0xaf)](this[_0x111493(0xf3)][_0x111493(0xb3)][_0x111493(0x91)](async _0x38e9a9=>{const _0x441576=_0x111493;var _0x37a802,_0xfd35a2,_0xa29160,_0x262058;const _0x46bd0e=(_0x37a802=this[_0x441576(0x8d)][_0x441576(0xc5)](_0x38e9a9['unitId'])[_0x441576(0xb9)](_0x24f139=>_0x24f139[_0x441576(0x8e)]===_0x38e9a9[_0x441576(0x8e)]))==null?void 0x0:_0x37a802[_0x441576(0xd8)];if(!_0x46bd0e)return;const {unitId:_0xee3bda,subUnitId:_0x395f42}=_0x46bd0e;switch(_0x38e9a9[_0x441576(0xe3)]&&this[_0x441576(0xd5)]['addUser'](_0x38e9a9[_0x441576(0xe3)]),_0x38e9a9[_0x441576(0xef)]){case v['Add']:break;case v[_0x441576(0x90)]:{this['_threadCommentModel'][_0x441576(0xe4)](_0xee3bda,_0x395f42,{'unitId':_0xee3bda,'subUnitId':_0x395f42,'ref':'','id':_0x38e9a9[_0x441576(0xa5)],'dT':f(+_0x38e9a9[_0x441576(0xd2)]),'threadId':_0x38e9a9[_0x441576(0x8e)],'personId':(_0xa29160=(_0xfd35a2=_0x38e9a9[_0x441576(0xe3)])==null?void 0x0:_0xfd35a2[_0x441576(0xaa)])!=null?_0xa29160:_0x38e9a9['userId'],'text':JSON[_0x441576(0xf6)](_0x38e9a9[_0x441576(0xbf)]),'parentId':_0x46bd0e['id']});break;}case v[_0x441576(0xd4)]:{const _0x2a43ef=this[_0x441576(0x8d)]['getComment'](_0xee3bda,_0x395f42,_0x38e9a9['replyId']);_0x2a43ef&&_0x2a43ef[_0x441576(0xc7)]&&this['_threadCommentModel'][_0x441576(0xad)](_0xee3bda,_0x395f42,_0x38e9a9[_0x441576(0xa5)]);break;}case v[_0x441576(0xe6)]:{this[_0x441576(0x8d)][_0x441576(0xa0)](_0xee3bda,_0x395f42,{'commentId':_0x38e9a9[_0x441576(0xa5)],'text':JSON[_0x441576(0xf6)](_0x38e9a9[_0x441576(0xbf)])});break;}case v[_0x441576(0xac)]:{const _0x9d5e37=(_0x262058=this[_0x441576(0x8d)][_0x441576(0xc5)](_0x38e9a9[_0x441576(0x9b)])[_0x441576(0xb9)](_0x319323=>_0x319323[_0x441576(0x8e)]===_0x38e9a9[_0x441576(0x8e)]))==null?void 0x0:_0x262058['root'];_0x9d5e37&&this[_0x441576(0x8d)][_0x441576(0xdc)](_0xee3bda,_0x395f42,_0x9d5e37['id'],_0x38e9a9[_0x441576(0xa4)]===I[_0x441576(0x88)]);break;}}}));}};_=E([S(0x0,c[_0x15b9b(0xb5)](b[_0x15b9b(0xa2)])),S(0x1,c[_0x15b9b(0xb5)](M[_0x15b9b(0x93)])),S(0x2,c[_0x15b9b(0xb5)](c['UserManagerService'])),S(0x3,c[_0x15b9b(0xb5)](c[_0x15b9b(0xfa)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x15b9b(0xcf)],x=(_0x5b8313,_0x2a1109,_0x92a24c,_0x54291e)=>{for(var _0x5d201b=_0x54291e>0x1?void 0x0:_0x54291e?A(_0x2a1109,_0x92a24c):_0x2a1109,_0x53655c=_0x5b8313['length']-0x1,_0x238430;_0x53655c>=0x0;_0x53655c--)(_0x238430=_0x5b8313[_0x53655c])&&(_0x5d201b=_0x238430(_0x5d201b)||_0x5d201b);return _0x5d201b;},C=(_0x1e672c,_0x39f138)=>(_0x21c14e,_0x10263e)=>_0x39f138(_0x21c14e,_0x10263e,_0x1e672c);function Y(_0x45abeb,_0x2f442e){const _0x28c45d=_0x15b9b,_0xd5990d=_0x45abeb[_0x28c45d(0xa6)][0x0];return{..._0x2f442e,'id':_0xd5990d[_0x28c45d(0xa5)],'resolved':_0x45abeb[_0x28c45d(0xa4)]===0x1,'dT':f(_0xd5990d['createTimestamp']),'personId':_0xd5990d[_0x28c45d(0xf1)],'threadId':_0xd5990d[_0x28c45d(0x8e)]};}function G(_0x4991a2,_0x1f493c,_0x32863e){const _0x18cfa4=_0x15b9b;var _0x1328ec,_0x6e73c5;if(((_0x6e73c5=(_0x1328ec=_0x4991a2==null?void 0x0:_0x4991a2[_0x18cfa4(0xa6)])==null?void 0x0:_0x1328ec['length'])!=null?_0x6e73c5:0x0)>0x0){const _0x29fc78=(_0x5b25d1,_0x3c3261)=>({'id':_0x5b25d1[_0x18cfa4(0xa5)],'threadId':_0x5b25d1[_0x18cfa4(0x8e)],'dT':f(_0x5b25d1[_0x18cfa4(0xd2)]),'personId':_0x5b25d1[_0x18cfa4(0xf1)],'resolved':_0x4991a2[_0x18cfa4(0xa4)]===I[_0x18cfa4(0x88)],'unitId':_0x1f493c,'subUnitId':_0x32863e,'text':JSON['parse'](_0x5b25d1[_0x18cfa4(0xbf)]),'parentId':_0x3c3261}),_0x8328=_0x29fc78(_0x4991a2[_0x18cfa4(0xa6)][0x0]);return{..._0x8328,'children':_0x4991a2[_0x18cfa4(0xa6)][_0x18cfa4(0x86)](0x1)[_0x18cfa4(0xb7)](_0x2bc51a=>_0x29fc78(_0x2bc51a,_0x8328['id']))};}return null;}let p=class{constructor(_0x1954d7,_0xc83714,_0x1e1d12){const _0x4c8aae=_0x15b9b;this['_httpService']=_0x1954d7,this[_0x4c8aae(0xd5)]=_0xc83714,this[_0x4c8aae(0xb0)]=_0x1e1d12;}async[_0x15b9b(0xe4)](_0x14862b){const _0x290bb4=_0x15b9b;var _0x55c9f3,_0x31223b;const {parentId:_0x1cbee6,unitId:_0x397bf3,text:_0xfe79d,threadId:_0x30c0e8}=_0x14862b,_0x30519c=(_0x31223b=(_0x55c9f3=_0xfe79d['customRanges'])==null?void 0x0:_0x55c9f3[_0x290bb4(0xf8)](_0x447ae8=>_0x447ae8[_0x290bb4(0x98)]===c['CustomRangeType']['COMMENT'])[_0x290bb4(0xb7)](_0x21cc8a=>_0x21cc8a['rangeId']))!=null?_0x31223b:[],_0x4a2731=JSON[_0x290bb4(0xcc)](_0xfe79d),_0x4eadb4=(await this[_0x290bb4(0xb0)][_0x290bb4(0xd9)](_0x397bf3))[_0x290bb4(0xbe)]();if(_0x1cbee6){const _0x284ac4={'memberId':_0x4eadb4,'unitId':_0x397bf3,'content':_0x4a2731,'mention':_0x30519c,'threadId':_0x30c0e8},_0x358c4d=(await this[_0x290bb4(0xc0)]['post']('/universer-api/comment/unit/'+_0x397bf3+'/reply',{'body':_0x284ac4}))['body'][_0x290bb4(0xc6)];return{..._0x14862b,'id':_0x358c4d[_0x290bb4(0xa5)],'dT':c['dayjs'](+_0x358c4d[_0x290bb4(0xd2)])[_0x290bb4(0xe2)](_0x290bb4(0xeb)),'personId':_0x358c4d[_0x290bb4(0xf1)]};}else{const _0x259870={'memberId':_0x4eadb4,'unitId':_0x397bf3,'content':_0x4a2731,'mention':_0x30519c},_0xc19c8b=await this[_0x290bb4(0xc0)][_0x290bb4(0xc8)]('/universer-api/comment/unit/'+_0x397bf3+_0x290bb4(0xec),{'body':_0x259870});return Y(_0xc19c8b[_0x290bb4(0xfb)]['comment'],_0x14862b);}}async['updateComment'](_0x3a87d3){const _0x100b26=_0x15b9b;var _0x3549bf,_0x5cded1;const {text:_0x25f562,unitId:_0x2cbe56}=_0x3a87d3,_0x10074f=(_0x5cded1=(_0x3549bf=_0x25f562[_0x100b26(0xa1)])==null?void 0x0:_0x3549bf[_0x100b26(0xf8)](_0x1468e3=>_0x1468e3[_0x100b26(0x98)]===c[_0x100b26(0xc1)][_0x100b26(0xbc)])[_0x100b26(0xb7)](_0xbfbba=>_0xbfbba[_0x100b26(0xc3)]))!=null?_0x5cded1:[],_0x464dbd=JSON[_0x100b26(0xcc)](_0x25f562),_0x3105a8=_0x3a87d3[_0x100b26(0x8e)],_0x17b18c=_0x3a87d3['id'],_0x234d49={'memberId':(await this['_sessionService'][_0x100b26(0xd9)](_0x2cbe56))[_0x100b26(0xbe)](),'unitId':_0x2cbe56,'threadId':_0x3105a8,'mention':_0x10074f,'content':_0x464dbd,'replyId':_0x17b18c},_0x5a92b4=await this[_0x100b26(0xc0)][_0x100b26(0xc8)](_0x100b26(0x8b)+_0x2cbe56+_0x100b26(0x87),{'body':_0x234d49});return!_0x5a92b4[_0x100b26(0xfb)][_0x100b26(0x94)]||_0x5a92b4[_0x100b26(0xfb)][_0x100b26(0x94)][_0x100b26(0x9e)]===0x1;}async[_0x15b9b(0xdc)](_0x571b6f){const _0x3cca69=_0x15b9b,{unitId:_0x268727}=_0x571b6f,_0x58d404=_0x571b6f['threadId'],_0x5c76db={'memberId':this['_userService'][_0x3cca69(0xfd)]()[_0x3cca69(0xaa)],'unitId':_0x268727,'threadId':_0x58d404,'solved':_0x571b6f[_0x3cca69(0xba)]?I[_0x3cca69(0x88)]:I[_0x3cca69(0xc2)]},_0x30c7db=await this['_httpService']['post'](_0x3cca69(0x8b)+_0x268727+_0x3cca69(0xbd),{'body':_0x5c76db});return!_0x30c7db[_0x3cca69(0xfb)][_0x3cca69(0x94)]||_0x30c7db[_0x3cca69(0xfb)][_0x3cca69(0x94)]['code']===0x1;}async['deleteComment'](_0xf8ec3,_0x54c810,_0x195352,_0x1a7896){const _0x6343a3=_0x15b9b,_0x2408fd={'memberId':(await this[_0x6343a3(0xb0)][_0x6343a3(0xd9)](_0xf8ec3))[_0x6343a3(0xbe)](),'threadId':_0x195352,'replyId':_0x1a7896,'unitId':_0xf8ec3},_0x2528d9=await this[_0x6343a3(0xc0)][_0x6343a3(0xc8)]('/universer-api/comment/unit/'+_0xf8ec3+_0x6343a3(0xcd),{'body':_0x2408fd});return!_0x2528d9[_0x6343a3(0xfb)][_0x6343a3(0x94)]||_0x2528d9[_0x6343a3(0xfb)][_0x6343a3(0x94)][_0x6343a3(0x9e)]===0x1;}async['listComments'](_0x7ce9bc,_0x55c43a,_0x3480ae){const _0x20145f=_0x15b9b,_0x3b4ee9={'unitId':_0x7ce9bc,'threadId':_0x3480ae},_0xf77cb8=await this[_0x20145f(0xc0)][_0x20145f(0xc8)]('/universer-api/comment/unit/'+_0x7ce9bc+_0x20145f(0xda),{'body':_0x3b4ee9}),_0x83f84c=_0x3480ae[_0x20145f(0xb7)](_0x5f38d5=>G(_0xf77cb8[_0x20145f(0xfb)][_0x20145f(0xa8)][_0x5f38d5],_0x7ce9bc,_0x55c43a))[_0x20145f(0xf8)](Boolean);return Object[_0x20145f(0x97)](_0xf77cb8[_0x20145f(0xfb)][_0x20145f(0x8a)])[_0x20145f(0x9d)](_0x37108a=>{const _0x489ef3=_0x20145f;this[_0x489ef3(0xd5)]['addUser'](_0x37108a);}),_0x83f84c;}[_0x15b9b(0x95)](_0x377ad4){const _0xb82de4=_0x15b9b;return{'id':_0x377ad4['id'],'threadId':_0x377ad4[_0xb82de4(0x8e)],'ref':_0x377ad4[_0xb82de4(0xe5)]};}};p=x([C(0x0,c[_0x15b9b(0xb5)](P['HTTPService'])),C(0x1,c['Inject'](c[_0x15b9b(0xb8)])),C(0x2,c[_0x15b9b(0xb5)](b[_0x15b9b(0xce)]))],p);var H=Object[_0x15b9b(0xcf)],J=(_0xc84b0d,_0x3ae1c3,_0x1de8d7,_0x12bef5)=>{const _0x3bd7de=_0x15b9b;for(var _0x172d9c=_0x12bef5>0x1?void 0x0:_0x12bef5?H(_0x3ae1c3,_0x1de8d7):_0x3ae1c3,_0x364b3c=_0xc84b0d[_0x3bd7de(0x89)]-0x1,_0x407de2;_0x364b3c>=0x0;_0x364b3c--)(_0x407de2=_0xc84b0d[_0x364b3c])&&(_0x172d9c=_0x407de2(_0x172d9c)||_0x172d9c);return _0x172d9c;},y=(_0x3737de,_0x2c57b5)=>(_0x5dc008,_0x5e5f47)=>_0x2c57b5(_0x5dc008,_0x5e5f47,_0x3737de);let g=class extends c[_0x15b9b(0xf5)]{constructor(_0x435a96,_0x4ec96c){const _0x53d277=_0x15b9b;super(),this['_threadCommentDataSourceService']=_0x435a96,this[_0x53d277(0xc9)]=_0x4ec96c,this[_0x53d277(0xd6)]();}['_initDataSource'](){const _0x8b03e2=_0x15b9b;this['_threadCommentDataSourceService']['dataSource']=this[_0x8b03e2(0xc9)],this[_0x8b03e2(0xea)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x15b9b(0x99)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x15b9b(0xde)],L=Object[_0x15b9b(0xcf)],Z=(_0x3e01ff,_0x177cef,_0x334ed7)=>_0x177cef in _0x3e01ff?F(_0x3e01ff,_0x177cef,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x334ed7}):_0x3e01ff[_0x177cef]=_0x334ed7,W=(_0x4039b8,_0x41d1cb,_0x5ed1ce,_0x3d9c9a)=>{for(var _0x5404a9=_0x3d9c9a>0x1?void 0x0:_0x3d9c9a?L(_0x41d1cb,_0x5ed1ce):_0x41d1cb,_0x4f2532=_0x4039b8['length']-0x1,_0x12f6c9;_0x4f2532>=0x0;_0x4f2532--)(_0x12f6c9=_0x4039b8[_0x4f2532])&&(_0x5404a9=_0x12f6c9(_0x5404a9)||_0x5404a9);return _0x5404a9;},O=(_0x5e3df8,_0x189f34)=>(_0x43200b,_0x5c407b)=>_0x189f34(_0x43200b,_0x5c407b,_0x5e3df8),N=(_0xb76e23,_0x17779b,_0x5f1bab)=>Z(_0xb76e23,typeof _0x17779b!='symbol'?_0x17779b+'':_0x17779b,_0x5f1bab);exports[_0x15b9b(0xb6)]=class extends c['Plugin']{constructor(_0x1adb21=D,_0x19332c,_0x55c81c){const _0x83b769=_0x15b9b;super(),this[_0x83b769(0x92)]=_0x1adb21,this[_0x83b769(0xdf)]=_0x19332c,this['_configService']=_0x55c81c;const {..._0x168696}=c['merge']({},D,this[_0x83b769(0x92)]);this[_0x83b769(0xe8)][_0x83b769(0xae)](q,_0x168696);}[_0x15b9b(0xf2)](){[[p],[g],[_]]['forEach'](_0x13243a=>{const _0x3a8ca5=_0x4a85;this[_0x3a8ca5(0xdf)][_0x3a8ca5(0xe7)](_0x13243a);});}[_0x15b9b(0xc4)](){const _0x594201=_0x15b9b;this['_injector'][_0x594201(0xe9)](g),this['_injector'][_0x594201(0xe9)](_);}},N(exports[_0x15b9b(0xb6)],_0x15b9b(0x9c),U),N(exports[_0x15b9b(0xb6)],_0x15b9b(0xef),c[_0x15b9b(0x9f)][_0x15b9b(0xb1)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x15b9b(0xf7)](w[_0x15b9b(0xab)],b[_0x15b9b(0xbb)],T[_0x15b9b(0xed)]),O(0x1,c[_0x15b9b(0xb5)](c[_0x15b9b(0xfa)])),O(0x2,c['IConfigService'])],exports[_0x15b9b(0xb6)]);function _0x2341(){const _0x240c03=['bufferTime','_threadCommentModel','threadId','3068646pMOcWg','Reply','subscribe','_config','ThreadCommentModel','error','saveCommentToSnapshot','payload','values','rangeType','IThreadCommentDataSourceService','1627184nrHaeg','unitId','pluginName','forEach','code','UniverInstanceType','updateComment','customRanges','CommentService','_init','solved','replyId','replies','Module','comments','/universer-api/user/list','userID','UniverThreadCommentUIPlugin','Solve','deleteComment','setConfig','disposeWithMe','_sessionService','UNIVER_UNKNOWN','654227tiQEYU','commentUpdate$','Unknown','Inject','UniverThreadCommentDataSourcePlugin','map','UserManagerService','find','resolved','UniverCollaborationClientPlugin','COMMENT','/solved','getMemberID','content','_httpService','CustomRangeType','OpenOrReOpen','rangeId','onReady','getUnit','reply','parentId','post','_threadCommentDataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','addUser','stringify','/delete','CollaborationSessionService','getOwnPropertyDescriptor','HTTPService','pipe','createTimestamp','1240BibvSt','Delete','_userService','_initDataSource','199685QNcQSJ','root','requireSession','/list','65115pPbBKl','resolveComment','1452687QDArQP','defineProperty','_injector','737738BeMYJy','12vhfLTv','format','user','addComment','ref','Edit','add','_configService','get','_threadCommentDataSourceService','YYYY/MM/DD\x20HH:mm','/add','UniverLicensePlugin','Add','type','size','userId','onStarting','_commentService','delete','Disposable','parse','DependentOn','filter','_initUserSync','Injector','body','UNRECOGNIZED','getCurrentUser','slice','/edit','Solved','length','users','/universer-api/comment/unit/'];_0x2341=function(){return _0x240c03;};return _0x2341();}
|
|
1
|
+
'use strict';function _0xeebf(){const _0x571f90=['parse','code','requireSession','symbol','_sessionService','_threadCommentModel','addUser','ThreadCommentModel','/list','/add','/universer-api/comment/unit/','commentUpdate$','UNIVER_UNKNOWN','Injector','_injector','saveCommentToSnapshot','createTimestamp','stringify','format','subscribe','CustomRangeType','dayjs','Solve','CommentService','replies','pluginName','delete','IThreadCommentDataSourceService','getMemberID','deleteComment','216egMSgq','disposeWithMe','UniverThreadCommentDataSourcePlugin','_config','Edit','getOwnPropertyDescriptor','Module','UNRECOGNIZED','UniverCollaborationClientPlugin','replyId','/edit','onReady','length','userId','users','getCurrentUser','COMMENT','comments','_initUserSync','_userService','_initDataSource','unitId','_httpService','UniverInstanceType','syncUpdateMutationToColla','userID','5qVZMjy','175740TtaFKF','Disposable','UniverThreadCommentUIPlugin','85041aZUAzz','error','merge','dataSource','toStringTag','threadId','4675180ZQwaUU','payload','Unknown','forEach','map','1619548qLFovl','Reply','_threadCommentDataSource','HTTPService','add','_configService','Delete','get','CollaborationSessionService','filter','378888cftDHQ','customRanges','_threadCommentDataSourceService','getComment','size','type','post','/universer-api/user/list','3UuvXuO','_commentService','defineProperty','549396Pzgyni','Add','user','content','_init','addComment','values','UserManagerService','Solved','comment','/solved','root','reply','find','solved','394564BIqpBh','parentId','Inject','updateComment','resolveComment','body','YYYY/MM/DD\x20HH:mm','rangeId','thread-comment-data-source.config','UniverLicensePlugin','listComments','/reply','OpenOrReOpen','rangeType','personId','resolved'];_0xeebf=function(){return _0x571f90;};return _0xeebf();}const _0x343277=_0x1e16;(function(_0x253fe7,_0x2830ac){const _0x50a770=_0x1e16,_0x33b538=_0x253fe7();while(!![]){try{const _0x5add5b=parseInt(_0x50a770(0x185))/0x1+parseInt(_0x50a770(0x1b7))/0x2*(parseInt(_0x50a770(0x1a5))/0x3)+parseInt(_0x50a770(0x19d))/0x4*(-parseInt(_0x50a770(0x184))/0x5)+-parseInt(_0x50a770(0x1a8))/0x6+-parseInt(_0x50a770(0x193))/0x7+-parseInt(_0x50a770(0x1e5))/0x8*(parseInt(_0x50a770(0x188))/0x9)+parseInt(_0x50a770(0x18e))/0xa;if(_0x5add5b===_0x2830ac)break;else _0x33b538['push'](_0x33b538['shift']());}catch(_0x49459e){_0x33b538['push'](_0x33b538['shift']());}}}(_0xeebf,0x28f55));Object[_0x343277(0x1a7)](exports,Symbol[_0x343277(0x18c)],{'value':_0x343277(0x1eb)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x543549=>(_0x543549[_0x543549[_0x343277(0x1c3)]=0x0]=_0x343277(0x1c3),_0x543549[_0x543549['Solved']=0x1]=_0x343277(0x1b0),_0x543549[_0x543549[_0x343277(0x1ec)]=-0x1]=_0x343277(0x1ec),_0x543549))(I||{}),v=(_0x1c095f=>(_0x1c095f[_0x1c095f[_0x343277(0x190)]=0x0]=_0x343277(0x190),_0x1c095f[_0x1c095f[_0x343277(0x1a9)]=0x1]=_0x343277(0x1a9),_0x1c095f[_0x1c095f[_0x343277(0x194)]=0x2]='Reply',_0x1c095f[_0x1c095f[_0x343277(0x1e9)]=0x3]=_0x343277(0x1e9),_0x1c095f[_0x1c095f[_0x343277(0x199)]=0x4]='Delete',_0x1c095f[_0x1c095f[_0x343277(0x1dd)]=0x5]=_0x343277(0x1dd),_0x1c095f[_0x1c095f[_0x343277(0x1ec)]=-0x1]=_0x343277(0x1ec),_0x1c095f))(v||{});const f=_0x5cc7b8=>c[_0x343277(0x1dc)](new Date(+_0x5cc7b8))['format'](_0x343277(0x1bd)),R=async(_0x1e8863,_0x2f8f6e)=>{const _0x278a82=_0x343277,_0x2a201a=_0x1e8863['get'](c[_0x278a82(0x1af)]),_0x2dc413=_0x1e8863[_0x278a82(0x19a)](P[_0x278a82(0x196)]);_0x2f8f6e['forEach'](_0xdb69bb=>{const _0x4bf723=_0x278a82;_0x2a201a['getUser'](_0xdb69bb)&&_0x2f8f6e[_0x4bf723(0x1e1)](_0xdb69bb);}),_0x2f8f6e[_0x278a82(0x1a1)]&&(await _0x2dc413['get'](_0x278a82(0x1a4),{'params':{'userIDs':[..._0x2f8f6e]}}))[_0x278a82(0x1bc)][_0x278a82(0x178)][_0x278a82(0x191)](_0x5cd1eb=>{const _0x1b88ea=_0x278a82;_0x5cd1eb&&_0x2a201a[_0x1b88ea(0x1cd)](_0x5cd1eb);});};var $=Object[_0x343277(0x1ea)],E=(_0x3049d0,_0x3e2ad6,_0x14e003,_0x5c8bb9)=>{const _0x4085a6=_0x343277;for(var _0x592e34=_0x5c8bb9>0x1?void 0x0:_0x5c8bb9?$(_0x3e2ad6,_0x14e003):_0x3e2ad6,_0x3408af=_0x3049d0[_0x4085a6(0x176)]-0x1,_0x4eafdd;_0x3408af>=0x0;_0x3408af--)(_0x4eafdd=_0x3049d0[_0x3408af])&&(_0x592e34=_0x4eafdd(_0x592e34)||_0x592e34);return _0x592e34;},S=(_0x5034f3,_0x4d8d85)=>(_0x3f3739,_0x4b5992)=>_0x4d8d85(_0x3f3739,_0x4b5992,_0x5034f3);let _=class extends c[_0x343277(0x186)]{constructor(_0x28cc22,_0x45cc9e,_0x2a18ac,_0x276156){const _0x40c795=_0x343277;super(),this[_0x40c795(0x1a6)]=_0x28cc22,this[_0x40c795(0x1cc)]=_0x45cc9e,this[_0x40c795(0x17d)]=_0x2a18ac,this[_0x40c795(0x1d5)]=_0x276156,this[_0x40c795(0x1ac)](),this[_0x40c795(0x17c)]();}[_0x343277(0x17c)](){const _0x531d3e=_0x343277;this['disposeWithMe'](this['_threadCommentModel'][_0x531d3e(0x1d2)]['pipe'](j['bufferTime'](0x10))[_0x531d3e(0x1da)](_0x1f9fe8=>{const _0x2a1c47=_0x531d3e,_0x2f8933=new Set();_0x1f9fe8[_0x2a1c47(0x191)](_0x49c74d=>{const _0x4dd2a2=_0x2a1c47;switch(_0x49c74d['type']){case _0x4dd2a2(0x197):{const _0x337b09=_0x49c74d[_0x4dd2a2(0x18f)][_0x4dd2a2(0x1c5)];_0x2f8933[_0x4dd2a2(0x197)](_0x337b09);break;}}}),R(this[_0x2a1c47(0x1d5)],_0x2f8933);}));}[_0x343277(0x1ac)](){const _0x418cf2=_0x343277;this[_0x418cf2(0x1e6)](this[_0x418cf2(0x1a6)]['commentUpdate$']['subscribe'](async _0x2607ab=>{const _0x3b8392=_0x418cf2;var _0x35b83e,_0x58df92,_0x33ce5f,_0x22421c;const _0x2595bf=(_0x35b83e=this[_0x3b8392(0x1cc)]['getUnit'](_0x2607ab[_0x3b8392(0x17f)])[_0x3b8392(0x1b5)](_0xf2cd3a=>_0xf2cd3a[_0x3b8392(0x18d)]===_0x2607ab[_0x3b8392(0x18d)]))==null?void 0x0:_0x35b83e[_0x3b8392(0x1b3)];if(!_0x2595bf)return;const {unitId:_0x3cb9f5,subUnitId:_0x5f06ba}=_0x2595bf;switch(_0x2607ab[_0x3b8392(0x1aa)]&&this[_0x3b8392(0x17d)][_0x3b8392(0x1cd)](_0x2607ab['user']),_0x2607ab['type']){case v['Add']:break;case v['Reply']:{this[_0x3b8392(0x1cc)]['addComment'](_0x3cb9f5,_0x5f06ba,{'unitId':_0x3cb9f5,'subUnitId':_0x5f06ba,'ref':'','id':_0x2607ab[_0x3b8392(0x1ee)],'dT':f(+_0x2607ab['createTimestamp']),'threadId':_0x2607ab['threadId'],'personId':(_0x33ce5f=(_0x58df92=_0x2607ab['user'])==null?void 0x0:_0x58df92['userID'])!=null?_0x33ce5f:_0x2607ab[_0x3b8392(0x177)],'text':JSON['parse'](_0x2607ab['content']),'parentId':_0x2595bf['id']});break;}case v[_0x3b8392(0x199)]:{const _0x577316=this[_0x3b8392(0x1cc)][_0x3b8392(0x1a0)](_0x3cb9f5,_0x5f06ba,_0x2607ab[_0x3b8392(0x1ee)]);_0x577316&&_0x577316[_0x3b8392(0x1b8)]&&this[_0x3b8392(0x1cc)]['deleteComment'](_0x3cb9f5,_0x5f06ba,_0x2607ab[_0x3b8392(0x1ee)]);break;}case v[_0x3b8392(0x1e9)]:{this[_0x3b8392(0x1cc)]['updateComment'](_0x3cb9f5,_0x5f06ba,{'commentId':_0x2607ab['replyId'],'text':JSON[_0x3b8392(0x1c7)](_0x2607ab[_0x3b8392(0x1ab)])});break;}case v['Solve']:{const _0x7847de=(_0x22421c=this[_0x3b8392(0x1cc)]['getUnit'](_0x2607ab['unitId'])[_0x3b8392(0x1b5)](_0x4cf7ec=>_0x4cf7ec[_0x3b8392(0x18d)]===_0x2607ab[_0x3b8392(0x18d)]))==null?void 0x0:_0x22421c[_0x3b8392(0x1b3)];_0x7847de&&this[_0x3b8392(0x1cc)][_0x3b8392(0x1bb)](_0x3cb9f5,_0x5f06ba,_0x7847de['id'],_0x2607ab[_0x3b8392(0x1b6)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x343277(0x1b9)](b[_0x343277(0x1de)])),S(0x1,c[_0x343277(0x1b9)](M[_0x343277(0x1ce)])),S(0x2,c['Inject'](c[_0x343277(0x1af)])),S(0x3,c[_0x343277(0x1b9)](c['Injector']))],_);const q=_0x343277(0x1bf),D={};var A=Object[_0x343277(0x1ea)],x=(_0x544170,_0x2231f4,_0x3340af,_0x938d7)=>{const _0x114875=_0x343277;for(var _0x2fc965=_0x938d7>0x1?void 0x0:_0x938d7?A(_0x2231f4,_0x3340af):_0x2231f4,_0x5477d4=_0x544170[_0x114875(0x176)]-0x1,_0x2c63fa;_0x5477d4>=0x0;_0x5477d4--)(_0x2c63fa=_0x544170[_0x5477d4])&&(_0x2fc965=_0x2c63fa(_0x2fc965)||_0x2fc965);return _0x2fc965;},C=(_0x728044,_0x49f86d)=>(_0x306ab8,_0x233d6b)=>_0x49f86d(_0x306ab8,_0x233d6b,_0x728044);function Y(_0x2e9565,_0x33f623){const _0x34258f=_0x343277,_0x39b164=_0x2e9565['replies'][0x0];return{..._0x33f623,'id':_0x39b164['replyId'],'resolved':_0x2e9565[_0x34258f(0x1b6)]===0x1,'dT':f(_0x39b164[_0x34258f(0x1d7)]),'personId':_0x39b164['userId'],'threadId':_0x39b164['threadId']};}function G(_0x4fb167,_0x53f968,_0x160d5b){const _0x4f74b6=_0x343277;var _0x3ccd20,_0x241c12;if(((_0x241c12=(_0x3ccd20=_0x4fb167==null?void 0x0:_0x4fb167[_0x4f74b6(0x1df)])==null?void 0x0:_0x3ccd20[_0x4f74b6(0x176)])!=null?_0x241c12:0x0)>0x0){const _0x31dae8=(_0x2db5a3,_0x2300a3)=>({'id':_0x2db5a3[_0x4f74b6(0x1ee)],'threadId':_0x2db5a3[_0x4f74b6(0x18d)],'dT':f(_0x2db5a3['createTimestamp']),'personId':_0x2db5a3[_0x4f74b6(0x177)],'resolved':_0x4fb167[_0x4f74b6(0x1b6)]===I[_0x4f74b6(0x1b0)],'unitId':_0x53f968,'subUnitId':_0x160d5b,'text':JSON[_0x4f74b6(0x1c7)](_0x2db5a3[_0x4f74b6(0x1ab)]),'parentId':_0x2300a3}),_0x41ada5=_0x31dae8(_0x4fb167['replies'][0x0]);return{..._0x41ada5,'children':_0x4fb167[_0x4f74b6(0x1df)]['slice'](0x1)[_0x4f74b6(0x192)](_0x1ea079=>_0x31dae8(_0x1ea079,_0x41ada5['id']))};}return null;}let p=class{constructor(_0x103b13,_0x5a34e6,_0x21be92){const _0x712b1d=_0x343277;this[_0x712b1d(0x180)]=_0x103b13,this[_0x712b1d(0x17d)]=_0x5a34e6,this['_sessionService']=_0x21be92;}async[_0x343277(0x1ad)](_0x550185){const _0x3fa8e0=_0x343277;var _0xc6a894,_0x5bf9cb;const {parentId:_0x1fe7b3,unitId:_0x213a19,text:_0x2ce286,threadId:_0x3bbb97}=_0x550185,_0x185b6f=(_0x5bf9cb=(_0xc6a894=_0x2ce286[_0x3fa8e0(0x19e)])==null?void 0x0:_0xc6a894[_0x3fa8e0(0x19c)](_0x39a279=>_0x39a279['rangeType']===c['CustomRangeType'][_0x3fa8e0(0x17a)])['map'](_0x5cd10c=>_0x5cd10c[_0x3fa8e0(0x1be)]))!=null?_0x5bf9cb:[],_0x4cd6b5=JSON[_0x3fa8e0(0x1d8)](_0x2ce286),_0x20fab7=(await this[_0x3fa8e0(0x1cb)][_0x3fa8e0(0x1c9)](_0x213a19))[_0x3fa8e0(0x1e3)]();if(_0x1fe7b3){const _0x459c0d={'memberId':_0x20fab7,'unitId':_0x213a19,'content':_0x4cd6b5,'mention':_0x185b6f,'threadId':_0x3bbb97},_0x207ff2=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x213a19+_0x3fa8e0(0x1c2),{'body':_0x459c0d}))['body'][_0x3fa8e0(0x1b4)];return{..._0x550185,'id':_0x207ff2[_0x3fa8e0(0x1ee)],'dT':c[_0x3fa8e0(0x1dc)](+_0x207ff2[_0x3fa8e0(0x1d7)])[_0x3fa8e0(0x1d9)](_0x3fa8e0(0x1bd)),'personId':_0x207ff2[_0x3fa8e0(0x177)]};}else{const _0x1dbbfd={'memberId':_0x20fab7,'unitId':_0x213a19,'content':_0x4cd6b5,'mention':_0x185b6f},_0x267f6e=await this[_0x3fa8e0(0x180)][_0x3fa8e0(0x1a3)]('/universer-api/comment/unit/'+_0x213a19+_0x3fa8e0(0x1d0),{'body':_0x1dbbfd});return Y(_0x267f6e[_0x3fa8e0(0x1bc)][_0x3fa8e0(0x1b1)],_0x550185);}}async[_0x343277(0x1ba)](_0x3c1a2d){const _0x4cf655=_0x343277;var _0x257cfa,_0x4f4e49;const {text:_0x39c906,unitId:_0x8d856d}=_0x3c1a2d,_0xb395d9=(_0x4f4e49=(_0x257cfa=_0x39c906[_0x4cf655(0x19e)])==null?void 0x0:_0x257cfa[_0x4cf655(0x19c)](_0x58c8a0=>_0x58c8a0[_0x4cf655(0x1c4)]===c[_0x4cf655(0x1db)]['COMMENT'])[_0x4cf655(0x192)](_0x8974ac=>_0x8974ac[_0x4cf655(0x1be)]))!=null?_0x4f4e49:[],_0xaea036=JSON[_0x4cf655(0x1d8)](_0x39c906),_0x168574=_0x3c1a2d[_0x4cf655(0x18d)],_0x51d246=_0x3c1a2d['id'],_0x20134b={'memberId':(await this[_0x4cf655(0x1cb)][_0x4cf655(0x1c9)](_0x8d856d))[_0x4cf655(0x1e3)](),'unitId':_0x8d856d,'threadId':_0x168574,'mention':_0xb395d9,'content':_0xaea036,'replyId':_0x51d246},_0x513fcf=await this[_0x4cf655(0x180)][_0x4cf655(0x1a3)](_0x4cf655(0x1d1)+_0x8d856d+_0x4cf655(0x1ef),{'body':_0x20134b});return!_0x513fcf[_0x4cf655(0x1bc)][_0x4cf655(0x189)]||_0x513fcf[_0x4cf655(0x1bc)][_0x4cf655(0x189)][_0x4cf655(0x1c8)]===0x1;}async[_0x343277(0x1bb)](_0x2483f9){const _0x4c0a50=_0x343277,{unitId:_0x14b36e}=_0x2483f9,_0x3f1e1d=_0x2483f9[_0x4c0a50(0x18d)],_0x28b2d2={'memberId':this[_0x4c0a50(0x17d)][_0x4c0a50(0x179)]()[_0x4c0a50(0x183)],'unitId':_0x14b36e,'threadId':_0x3f1e1d,'solved':_0x2483f9[_0x4c0a50(0x1c6)]?I[_0x4c0a50(0x1b0)]:I[_0x4c0a50(0x1c3)]},_0xaf4aad=await this[_0x4c0a50(0x180)][_0x4c0a50(0x1a3)](_0x4c0a50(0x1d1)+_0x14b36e+_0x4c0a50(0x1b2),{'body':_0x28b2d2});return!_0xaf4aad['body']['error']||_0xaf4aad[_0x4c0a50(0x1bc)][_0x4c0a50(0x189)][_0x4c0a50(0x1c8)]===0x1;}async[_0x343277(0x1e4)](_0x57bd4b,_0x22b8bb,_0x4433ec,_0x25b20e){const _0x3cc841=_0x343277,_0x488665={'memberId':(await this[_0x3cc841(0x1cb)]['requireSession'](_0x57bd4b))['getMemberID'](),'threadId':_0x4433ec,'replyId':_0x25b20e,'unitId':_0x57bd4b},_0x3e94f1=await this[_0x3cc841(0x180)][_0x3cc841(0x1a3)](_0x3cc841(0x1d1)+_0x57bd4b+'/delete',{'body':_0x488665});return!_0x3e94f1[_0x3cc841(0x1bc)][_0x3cc841(0x189)]||_0x3e94f1[_0x3cc841(0x1bc)][_0x3cc841(0x189)][_0x3cc841(0x1c8)]===0x1;}async[_0x343277(0x1c1)](_0x44c0fa,_0x21e513,_0x153997){const _0x316190=_0x343277,_0x5079d3={'unitId':_0x44c0fa,'threadId':_0x153997},_0x1b8594=await this[_0x316190(0x180)][_0x316190(0x1a3)]('/universer-api/comment/unit/'+_0x44c0fa+_0x316190(0x1cf),{'body':_0x5079d3}),_0x47f2ea=_0x153997['map'](_0x2b60c0=>G(_0x1b8594[_0x316190(0x1bc)][_0x316190(0x17b)][_0x2b60c0],_0x44c0fa,_0x21e513))[_0x316190(0x19c)](Boolean);return Object[_0x316190(0x1ae)](_0x1b8594[_0x316190(0x1bc)][_0x316190(0x178)])[_0x316190(0x191)](_0x697836=>{const _0xfa3978=_0x316190;this[_0xfa3978(0x17d)][_0xfa3978(0x1cd)](_0x697836);}),_0x47f2ea;}[_0x343277(0x1d6)](_0x1b4ec9){const _0x437636=_0x343277;return{'id':_0x1b4ec9['id'],'threadId':_0x1b4ec9[_0x437636(0x18d)],'ref':_0x1b4ec9['ref']};}};p=x([C(0x0,c[_0x343277(0x1b9)](P['HTTPService'])),C(0x1,c['Inject'](c[_0x343277(0x1af)])),C(0x2,c[_0x343277(0x1b9)](b[_0x343277(0x19b)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x1cef70,_0x2216fc,_0x5be4c6,_0x378d7f)=>{const _0x4e6573=_0x343277;for(var _0x4b8a97=_0x378d7f>0x1?void 0x0:_0x378d7f?H(_0x2216fc,_0x5be4c6):_0x2216fc,_0x5f56fc=_0x1cef70[_0x4e6573(0x176)]-0x1,_0x39aa2e;_0x5f56fc>=0x0;_0x5f56fc--)(_0x39aa2e=_0x1cef70[_0x5f56fc])&&(_0x4b8a97=_0x39aa2e(_0x4b8a97)||_0x4b8a97);return _0x4b8a97;},y=(_0x187aec,_0x112785)=>(_0x1f4bbf,_0x996a4d)=>_0x112785(_0x1f4bbf,_0x996a4d,_0x187aec);let g=class extends c[_0x343277(0x186)]{constructor(_0xff1d42,_0x2819e9){const _0x830f97=_0x343277;super(),this['_threadCommentDataSourceService']=_0xff1d42,this[_0x830f97(0x195)]=_0x2819e9,this[_0x830f97(0x17e)]();}['_initDataSource'](){const _0x3520fc=_0x343277;this['_threadCommentDataSourceService'][_0x3520fc(0x18b)]=this['_threadCommentDataSource'],this[_0x3520fc(0x19f)][_0x3520fc(0x182)]=!0x1;}};function _0x1e16(_0x3701c3,_0x51a83b){const _0xeebf9c=_0xeebf();return _0x1e16=function(_0x1e1638,_0x30674b){_0x1e1638=_0x1e1638-0x175;let _0x1831fb=_0xeebf9c[_0x1e1638];return _0x1831fb;},_0x1e16(_0x3701c3,_0x51a83b);}g=J([y(0x0,M[_0x343277(0x1e2)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x343277(0x1a7)],L=Object['getOwnPropertyDescriptor'],Z=(_0x4fbbb0,_0x14deaa,_0x14a2c7)=>_0x14deaa in _0x4fbbb0?F(_0x4fbbb0,_0x14deaa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14a2c7}):_0x4fbbb0[_0x14deaa]=_0x14a2c7,W=(_0x10c2fa,_0x41444b,_0x3be036,_0x3b5be8)=>{const _0x12192e=_0x343277;for(var _0x3db597=_0x3b5be8>0x1?void 0x0:_0x3b5be8?L(_0x41444b,_0x3be036):_0x41444b,_0x55f01f=_0x10c2fa[_0x12192e(0x176)]-0x1,_0x349c68;_0x55f01f>=0x0;_0x55f01f--)(_0x349c68=_0x10c2fa[_0x55f01f])&&(_0x3db597=_0x349c68(_0x3db597)||_0x3db597);return _0x3db597;},O=(_0x54dcac,_0x5a0a87)=>(_0x204c55,_0xf363ba)=>_0x5a0a87(_0x204c55,_0xf363ba,_0x54dcac),N=(_0x252faf,_0x18d33f,_0x4b8c23)=>Z(_0x252faf,typeof _0x18d33f!=_0x343277(0x1ca)?_0x18d33f+'':_0x18d33f,_0x4b8c23);exports[_0x343277(0x1e7)]=class extends c['Plugin']{constructor(_0x5a2fcd=D,_0x203d03,_0xa81f46){const _0x53f8e=_0x343277;super(),this[_0x53f8e(0x1e8)]=_0x5a2fcd,this[_0x53f8e(0x1d5)]=_0x203d03,this[_0x53f8e(0x198)]=_0xa81f46;const {..._0xd3836d}=c[_0x53f8e(0x18a)]({},D,this['_config']);this[_0x53f8e(0x198)]['setConfig'](q,_0xd3836d);}['onStarting'](){const _0x2ef9d6=_0x343277;[[p],[g],[_]][_0x2ef9d6(0x191)](_0x8db7a=>{const _0x569310=_0x2ef9d6;this[_0x569310(0x1d5)][_0x569310(0x197)](_0x8db7a);});}[_0x343277(0x175)](){const _0x2bc8b4=_0x343277;this['_injector'][_0x2bc8b4(0x19a)](g),this[_0x2bc8b4(0x1d5)][_0x2bc8b4(0x19a)](_);}},N(exports[_0x343277(0x1e7)],_0x343277(0x1e0),U),N(exports[_0x343277(0x1e7)],_0x343277(0x1a2),c[_0x343277(0x181)][_0x343277(0x1d3)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](w[_0x343277(0x187)],b[_0x343277(0x1ed)],T[_0x343277(0x1c0)]),O(0x1,c[_0x343277(0x1b9)](c[_0x343277(0x1d4)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5e32a6=_0x1527;(function(_0x576f75,_0x597d5c){const _0xbbb47=_0x1527,_0x51a384=_0x576f75();while(!![]){try{const _0x28747e=-parseInt(_0xbbb47(0x158))/0x1+-parseInt(_0xbbb47(0x15b))/0x2*(-parseInt(_0xbbb47(0x149))/0x3)+parseInt(_0xbbb47(0x12a))/0x4+-parseInt(_0xbbb47(0x124))/0x5+-parseInt(_0xbbb47(0x140))/0x6+parseInt(_0xbbb47(0x134))/0x7*(parseInt(_0xbbb47(0x166))/0x8)+-parseInt(_0xbbb47(0x14b))/0x9;if(_0x28747e===_0x597d5c)break;else _0x51a384['push'](_0x51a384['shift']());}catch(_0x49908f){_0x51a384['push'](_0x51a384['shift']());}}}(_0x5744,0x8962e));import{CommentService as _0x25684e,CollaborationSessionService as _0x2bbd11,UniverCollaborationClientPlugin as _0x1b6345}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x46806d}from'@univerjs-pro/license';import{dayjs as _0x2edf0d,UserManagerService as _0x5aa83d,Inject as _0x8aec6c,Injector as _0x420fd5,Disposable as _0x3b1f59,CustomRangeType as _0x174598,UniverInstanceType as _0x32f188,DependentOn as _0xde6bbc,IConfigService as _0x5457f3,Plugin as _0x154e10,merge as _0x58cf97}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x40ed92}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x28c6d4,IThreadCommentDataSourceService as _0x10cad0}from'@univerjs/thread-comment';function _0x5744(){const _0xc65ce1=['get','rangeId','UNIVER_UNKNOWN','4936854iyprYn','replies','/solved','UNRECOGNIZED','_initUserSync','stringify','_threadCommentDataSourceService','map','content','6WdOCQj','_sessionService','80991ivKRnW','Reply','getUnit','threadId','userID','subscribe','requireSession','pipe','Add','unitId','comments','/universer-api/comment/unit/','personId','412548DNPYxH','addComment','customRanges','580518ofzqmj','payload','_threadCommentDataSource','pluginName','deleteComment','_initDataSource','updateComment','ref','Solve','setConfig','_threadCommentModel','3863752rphgZd','/universer-api/user/list','length','_configService','_commentService','parse','createTimestamp','type','disposeWithMe','rangeType','_config','forEach','filter','symbol','solved','parentId','Delete','resolveComment','Edit','getMemberID','error','addUser','userId','/reply','thread-comment-data-source.config','_init','40685KOzWbe','getComment','post','replyId','Solved','onStarting','3006960QngLPk','dataSource','code','_httpService','root','getOwnPropertyDescriptor','COMMENT','_injector','reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','7VxxVPZ','getCurrentUser','_userService','users','find','/delete','YYYY/MM/DD\x20HH:mm','resolved','body'];_0x5744=function(){return _0xc65ce1;};return _0x5744();}import{bufferTime as _0x1604bb}from'rxjs';import{HTTPService as _0x45a61b}from'@univerjs/network';const W=_0x5e32a6(0x133);var I=(_0x295eca=>(_0x295eca[_0x295eca['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x295eca[_0x295eca[_0x5e32a6(0x128)]=0x1]=_0x5e32a6(0x128),_0x295eca[_0x295eca['UNRECOGNIZED']=-0x1]=_0x5e32a6(0x143),_0x295eca))(I||{}),v=(_0x69ded0=>(_0x69ded0[_0x69ded0['Unknown']=0x0]='Unknown',_0x69ded0[_0x69ded0['Add']=0x1]=_0x5e32a6(0x153),_0x69ded0[_0x69ded0['Reply']=0x2]='Reply',_0x69ded0[_0x69ded0[_0x5e32a6(0x178)]=0x3]='Edit',_0x69ded0[_0x69ded0[_0x5e32a6(0x176)]=0x4]=_0x5e32a6(0x176),_0x69ded0[_0x69ded0['Solve']=0x5]=_0x5e32a6(0x163),_0x69ded0[_0x69ded0[_0x5e32a6(0x143)]=-0x1]=_0x5e32a6(0x143),_0x69ded0))(v||{});const y=_0x889282=>_0x2edf0d(new Date(+_0x889282))['format'](_0x5e32a6(0x13a)),B=async(_0x19f1f5,_0x4f2b4d)=>{const _0x40bb14=_0x5e32a6,_0x532d9d=_0x19f1f5[_0x40bb14(0x13d)](_0x5aa83d),_0x5966b8=_0x19f1f5[_0x40bb14(0x13d)](_0x45a61b);_0x4f2b4d['forEach'](_0x321241=>{_0x532d9d['getUser'](_0x321241)&&_0x4f2b4d['delete'](_0x321241);}),_0x4f2b4d['size']&&(await _0x5966b8[_0x40bb14(0x13d)](_0x40bb14(0x167),{'params':{'userIDs':[..._0x4f2b4d]}}))[_0x40bb14(0x13c)][_0x40bb14(0x137)][_0x40bb14(0x171)](_0x4b71d9=>{const _0xcbe019=_0x40bb14;_0x4b71d9&&_0x532d9d[_0xcbe019(0x17b)](_0x4b71d9);});};var K=Object[_0x5e32a6(0x12f)],V=(_0x42be3f,_0x26c26c,_0x438ce0,_0x1042eb)=>{for(var _0x68bff4=_0x1042eb>0x1?void 0x0:_0x1042eb?K(_0x26c26c,_0x438ce0):_0x26c26c,_0x3d6a4f=_0x42be3f['length']-0x1,_0x48086a;_0x3d6a4f>=0x0;_0x3d6a4f--)(_0x48086a=_0x42be3f[_0x3d6a4f])&&(_0x68bff4=_0x48086a(_0x68bff4)||_0x68bff4);return _0x68bff4;},p=(_0x1362be,_0x511fd5)=>(_0x3bb22f,_0x1c9d7c)=>_0x511fd5(_0x3bb22f,_0x1c9d7c,_0x1362be);let _=class extends _0x3b1f59{constructor(_0x39ba44,_0x9a3566,_0x342bd1,_0x2b13f1){const _0x48a700=_0x5e32a6;super(),this['_commentService']=_0x39ba44,this[_0x48a700(0x165)]=_0x9a3566,this[_0x48a700(0x136)]=_0x342bd1,this[_0x48a700(0x131)]=_0x2b13f1,this[_0x48a700(0x17f)](),this[_0x48a700(0x144)]();}[_0x5e32a6(0x144)](){const _0xb98ddb=_0x5e32a6;this[_0xb98ddb(0x16e)](this[_0xb98ddb(0x165)]['commentUpdate$'][_0xb98ddb(0x152)](_0x1604bb(0x10))['subscribe'](_0x5616cb=>{const _0x46ff7e=_0xb98ddb,_0xdcc87d=new Set();_0x5616cb[_0x46ff7e(0x171)](_0x39229b=>{const _0x1c05b1=_0x46ff7e;switch(_0x39229b['type']){case'add':{const _0x299bdb=_0x39229b[_0x1c05b1(0x15c)][_0x1c05b1(0x157)];_0xdcc87d['add'](_0x299bdb);break;}}}),B(this[_0x46ff7e(0x131)],_0xdcc87d);}));}[_0x5e32a6(0x17f)](){const _0x4a2190=_0x5e32a6;this[_0x4a2190(0x16e)](this[_0x4a2190(0x16a)]['commentUpdate$'][_0x4a2190(0x150)](async _0x523b79=>{const _0x3322b3=_0x4a2190;var _0x51e1c5,_0x3b775e,_0x2e7f18,_0x3288b3;const _0x30c7d8=(_0x51e1c5=this['_threadCommentModel'][_0x3322b3(0x14d)](_0x523b79[_0x3322b3(0x154)])[_0x3322b3(0x138)](_0x5405e8=>_0x5405e8['threadId']===_0x523b79[_0x3322b3(0x14e)]))==null?void 0x0:_0x51e1c5[_0x3322b3(0x12e)];if(!_0x30c7d8)return;const {unitId:_0x3da1c2,subUnitId:_0x5e04c7}=_0x30c7d8;switch(_0x523b79['user']&&this[_0x3322b3(0x136)][_0x3322b3(0x17b)](_0x523b79['user']),_0x523b79[_0x3322b3(0x16d)]){case v[_0x3322b3(0x153)]:break;case v[_0x3322b3(0x14c)]:{this['_threadCommentModel'][_0x3322b3(0x159)](_0x3da1c2,_0x5e04c7,{'unitId':_0x3da1c2,'subUnitId':_0x5e04c7,'ref':'','id':_0x523b79[_0x3322b3(0x127)],'dT':y(+_0x523b79[_0x3322b3(0x16c)]),'threadId':_0x523b79[_0x3322b3(0x14e)],'personId':(_0x2e7f18=(_0x3b775e=_0x523b79['user'])==null?void 0x0:_0x3b775e[_0x3322b3(0x14f)])!=null?_0x2e7f18:_0x523b79[_0x3322b3(0x17c)],'text':JSON[_0x3322b3(0x16b)](_0x523b79['content']),'parentId':_0x30c7d8['id']});break;}case v[_0x3322b3(0x176)]:{const _0x392871=this['_threadCommentModel'][_0x3322b3(0x125)](_0x3da1c2,_0x5e04c7,_0x523b79[_0x3322b3(0x127)]);_0x392871&&_0x392871[_0x3322b3(0x175)]&&this['_threadCommentModel'][_0x3322b3(0x15f)](_0x3da1c2,_0x5e04c7,_0x523b79['replyId']);break;}case v[_0x3322b3(0x178)]:{this[_0x3322b3(0x165)]['updateComment'](_0x3da1c2,_0x5e04c7,{'commentId':_0x523b79['replyId'],'text':JSON[_0x3322b3(0x16b)](_0x523b79[_0x3322b3(0x148)])});break;}case v[_0x3322b3(0x163)]:{const _0x5650f9=(_0x3288b3=this['_threadCommentModel'][_0x3322b3(0x14d)](_0x523b79[_0x3322b3(0x154)])['find'](_0x3234fb=>_0x3234fb[_0x3322b3(0x14e)]===_0x523b79['threadId']))==null?void 0x0:_0x3288b3[_0x3322b3(0x12e)];_0x5650f9&&this[_0x3322b3(0x165)][_0x3322b3(0x177)](_0x3da1c2,_0x5e04c7,_0x5650f9['id'],_0x523b79[_0x3322b3(0x174)]===I['Solved']);break;}}}));}};function _0x1527(_0x1f3476,_0x4afaac){const _0x57447b=_0x5744();return _0x1527=function(_0x15279a,_0x5df83e){_0x15279a=_0x15279a-0x124;let _0x2ce626=_0x57447b[_0x15279a];return _0x2ce626;},_0x1527(_0x1f3476,_0x4afaac);}_=V([p(0x0,_0x8aec6c(_0x25684e)),p(0x1,_0x8aec6c(_0x28c6d4)),p(0x2,_0x8aec6c(_0x5aa83d)),p(0x3,_0x8aec6c(_0x420fd5))],_);const z=_0x5e32a6(0x17e),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x37fbf3,_0xf94518,_0x547663,_0x4505c3)=>{const _0x17919b=_0x5e32a6;for(var _0x26948a=_0x4505c3>0x1?void 0x0:_0x4505c3?k(_0xf94518,_0x547663):_0xf94518,_0x1da55f=_0x37fbf3[_0x17919b(0x168)]-0x1,_0x5367b3;_0x1da55f>=0x0;_0x1da55f--)(_0x5367b3=_0x37fbf3[_0x1da55f])&&(_0x26948a=_0x5367b3(_0x26948a)||_0x26948a);return _0x26948a;},b=(_0x2ff711,_0x161673)=>(_0x3b5f35,_0x483f37)=>_0x161673(_0x3b5f35,_0x483f37,_0x2ff711);function X(_0x3f5d1a,_0x33a645){const _0x3cf677=_0x5e32a6,_0x16cb49=_0x3f5d1a[_0x3cf677(0x141)][0x0];return{..._0x33a645,'id':_0x16cb49[_0x3cf677(0x127)],'resolved':_0x3f5d1a[_0x3cf677(0x174)]===0x1,'dT':y(_0x16cb49[_0x3cf677(0x16c)]),'personId':_0x16cb49[_0x3cf677(0x17c)],'threadId':_0x16cb49[_0x3cf677(0x14e)]};}function ee(_0x58e7b5,_0x485195,_0x3ef9b2){const _0x21539b=_0x5e32a6;var _0x7094ff,_0x11792a;if(((_0x11792a=(_0x7094ff=_0x58e7b5==null?void 0x0:_0x58e7b5[_0x21539b(0x141)])==null?void 0x0:_0x7094ff[_0x21539b(0x168)])!=null?_0x11792a:0x0)>0x0){const _0x43aadb=(_0x37f35d,_0x1a6c94)=>({'id':_0x37f35d[_0x21539b(0x127)],'threadId':_0x37f35d[_0x21539b(0x14e)],'dT':y(_0x37f35d['createTimestamp']),'personId':_0x37f35d[_0x21539b(0x17c)],'resolved':_0x58e7b5[_0x21539b(0x174)]===I[_0x21539b(0x128)],'unitId':_0x485195,'subUnitId':_0x3ef9b2,'text':JSON[_0x21539b(0x16b)](_0x37f35d[_0x21539b(0x148)]),'parentId':_0x1a6c94}),_0x3b2690=_0x43aadb(_0x58e7b5[_0x21539b(0x141)][0x0]);return{..._0x3b2690,'children':_0x58e7b5[_0x21539b(0x141)]['slice'](0x1)['map'](_0x2c9d8e=>_0x43aadb(_0x2c9d8e,_0x3b2690['id']))};}return null;}let S=class{constructor(_0x301656,_0xd6e9d8,_0x1a3b69){const _0x3c5450=_0x5e32a6;this[_0x3c5450(0x12d)]=_0x301656,this[_0x3c5450(0x136)]=_0xd6e9d8,this[_0x3c5450(0x14a)]=_0x1a3b69;}async[_0x5e32a6(0x159)](_0x37bd9f){const _0x25339e=_0x5e32a6;var _0x2c584e,_0x3a776e;const {parentId:_0x3ccaf3,unitId:_0x5bdf04,text:_0x5b49b2,threadId:_0x49c1d1}=_0x37bd9f,_0x474828=(_0x3a776e=(_0x2c584e=_0x5b49b2[_0x25339e(0x15a)])==null?void 0x0:_0x2c584e['filter'](_0x3d3268=>_0x3d3268[_0x25339e(0x16f)]===_0x174598[_0x25339e(0x130)])[_0x25339e(0x147)](_0x13d08a=>_0x13d08a[_0x25339e(0x13e)]))!=null?_0x3a776e:[],_0x1cff83=JSON[_0x25339e(0x145)](_0x5b49b2),_0x41274d=(await this['_sessionService'][_0x25339e(0x151)](_0x5bdf04))['getMemberID']();if(_0x3ccaf3){const _0x1ca8da={'memberId':_0x41274d,'unitId':_0x5bdf04,'content':_0x1cff83,'mention':_0x474828,'threadId':_0x49c1d1},_0x2c57ac=(await this['_httpService'][_0x25339e(0x126)](_0x25339e(0x156)+_0x5bdf04+_0x25339e(0x17d),{'body':_0x1ca8da}))[_0x25339e(0x13c)][_0x25339e(0x132)];return{..._0x37bd9f,'id':_0x2c57ac[_0x25339e(0x127)],'dT':_0x2edf0d(+_0x2c57ac[_0x25339e(0x16c)])['format'](_0x25339e(0x13a)),'personId':_0x2c57ac[_0x25339e(0x17c)]};}else{const _0x4764d1={'memberId':_0x41274d,'unitId':_0x5bdf04,'content':_0x1cff83,'mention':_0x474828},_0x4c0bf9=await this['_httpService'][_0x25339e(0x126)]('/universer-api/comment/unit/'+_0x5bdf04+'/add',{'body':_0x4764d1});return X(_0x4c0bf9[_0x25339e(0x13c)]['comment'],_0x37bd9f);}}async[_0x5e32a6(0x161)](_0x2d53e8){const _0x25b168=_0x5e32a6;var _0x291a71,_0x130e6c;const {text:_0x5911e8,unitId:_0x32d139}=_0x2d53e8,_0x260f0c=(_0x130e6c=(_0x291a71=_0x5911e8['customRanges'])==null?void 0x0:_0x291a71[_0x25b168(0x172)](_0x451842=>_0x451842[_0x25b168(0x16f)]===_0x174598['COMMENT'])[_0x25b168(0x147)](_0x4795ac=>_0x4795ac[_0x25b168(0x13e)]))!=null?_0x130e6c:[],_0x2c8165=JSON[_0x25b168(0x145)](_0x5911e8),_0x545c09=_0x2d53e8['threadId'],_0x3a3427=_0x2d53e8['id'],_0x53deb8={'memberId':(await this['_sessionService'][_0x25b168(0x151)](_0x32d139))[_0x25b168(0x179)](),'unitId':_0x32d139,'threadId':_0x545c09,'mention':_0x260f0c,'content':_0x2c8165,'replyId':_0x3a3427},_0xce7a15=await this['_httpService'][_0x25b168(0x126)](_0x25b168(0x156)+_0x32d139+'/edit',{'body':_0x53deb8});return!_0xce7a15['body'][_0x25b168(0x17a)]||_0xce7a15[_0x25b168(0x13c)][_0x25b168(0x17a)][_0x25b168(0x12c)]===0x1;}async[_0x5e32a6(0x177)](_0x5edac0){const _0x255d78=_0x5e32a6,{unitId:_0x3d716c}=_0x5edac0,_0x2548b1=_0x5edac0[_0x255d78(0x14e)],_0x4b2ed5={'memberId':this[_0x255d78(0x136)][_0x255d78(0x135)]()[_0x255d78(0x14f)],'unitId':_0x3d716c,'threadId':_0x2548b1,'solved':_0x5edac0[_0x255d78(0x13b)]?I[_0x255d78(0x128)]:I['OpenOrReOpen']},_0x166857=await this[_0x255d78(0x12d)][_0x255d78(0x126)](_0x255d78(0x156)+_0x3d716c+_0x255d78(0x142),{'body':_0x4b2ed5});return!_0x166857[_0x255d78(0x13c)][_0x255d78(0x17a)]||_0x166857[_0x255d78(0x13c)][_0x255d78(0x17a)][_0x255d78(0x12c)]===0x1;}async[_0x5e32a6(0x15f)](_0x285f78,_0x17a31b,_0xbc3c93,_0x24f27e){const _0x22d218=_0x5e32a6,_0x56c1ca={'memberId':(await this[_0x22d218(0x14a)]['requireSession'](_0x285f78))['getMemberID'](),'threadId':_0xbc3c93,'replyId':_0x24f27e,'unitId':_0x285f78},_0x45ef9b=await this[_0x22d218(0x12d)][_0x22d218(0x126)](_0x22d218(0x156)+_0x285f78+_0x22d218(0x139),{'body':_0x56c1ca});return!_0x45ef9b[_0x22d218(0x13c)]['error']||_0x45ef9b[_0x22d218(0x13c)][_0x22d218(0x17a)][_0x22d218(0x12c)]===0x1;}async['listComments'](_0x5e148b,_0x30ff39,_0x1dc3f3){const _0x25d90b=_0x5e32a6,_0x111a67={'unitId':_0x5e148b,'threadId':_0x1dc3f3},_0x3c0f91=await this[_0x25d90b(0x12d)][_0x25d90b(0x126)](_0x25d90b(0x156)+_0x5e148b+'/list',{'body':_0x111a67}),_0x1d97c2=_0x1dc3f3['map'](_0xf0818a=>ee(_0x3c0f91[_0x25d90b(0x13c)][_0x25d90b(0x155)][_0xf0818a],_0x5e148b,_0x30ff39))[_0x25d90b(0x172)](Boolean);return Object['values'](_0x3c0f91[_0x25d90b(0x13c)][_0x25d90b(0x137)])['forEach'](_0x4e4889=>{const _0xa9c5f=_0x25d90b;this[_0xa9c5f(0x136)][_0xa9c5f(0x17b)](_0x4e4889);}),_0x1d97c2;}['saveCommentToSnapshot'](_0x5d4d57){const _0x269138=_0x5e32a6;return{'id':_0x5d4d57['id'],'threadId':_0x5d4d57['threadId'],'ref':_0x5d4d57[_0x269138(0x162)]};}};S=Q([b(0x0,_0x8aec6c(_0x45a61b)),b(0x1,_0x8aec6c(_0x5aa83d)),b(0x2,_0x8aec6c(_0x2bbd11))],S);var re=Object[_0x5e32a6(0x12f)],te=(_0x24808f,_0x22912c,_0x503c8d,_0xe6c737)=>{const _0x10318c=_0x5e32a6;for(var _0x156fa6=_0xe6c737>0x1?void 0x0:_0xe6c737?re(_0x22912c,_0x503c8d):_0x22912c,_0x34d903=_0x24808f[_0x10318c(0x168)]-0x1,_0x489b63;_0x34d903>=0x0;_0x34d903--)(_0x489b63=_0x24808f[_0x34d903])&&(_0x156fa6=_0x489b63(_0x156fa6)||_0x156fa6);return _0x156fa6;},M=(_0x37f381,_0x8667e8)=>(_0x12aa6d,_0x3cb248)=>_0x8667e8(_0x12aa6d,_0x3cb248,_0x37f381);let f=class extends _0x3b1f59{constructor(_0x1ba95a,_0x2015da){const _0x5c6e04=_0x5e32a6;super(),this[_0x5c6e04(0x146)]=_0x1ba95a,this[_0x5c6e04(0x15d)]=_0x2015da,this[_0x5c6e04(0x160)]();}['_initDataSource'](){const _0x17c27a=_0x5e32a6;this[_0x17c27a(0x146)][_0x17c27a(0x12b)]=this['_threadCommentDataSource'],this[_0x17c27a(0x146)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x10cad0),M(0x1,_0x8aec6c(S))],f);var se=Object['defineProperty'],oe=Object[_0x5e32a6(0x12f)],ne=(_0x21baf0,_0x5ecae1,_0x190a53)=>_0x5ecae1 in _0x21baf0?se(_0x21baf0,_0x5ecae1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x190a53}):_0x21baf0[_0x5ecae1]=_0x190a53,ie=(_0x47e1cb,_0x5aa15a,_0x871f02,_0x3ba956)=>{for(var _0x21417c=_0x3ba956>0x1?void 0x0:_0x3ba956?oe(_0x5aa15a,_0x871f02):_0x5aa15a,_0x224b58=_0x47e1cb['length']-0x1,_0x9de8d1;_0x224b58>=0x0;_0x224b58--)(_0x9de8d1=_0x47e1cb[_0x224b58])&&(_0x21417c=_0x9de8d1(_0x21417c)||_0x21417c);return _0x21417c;},N=(_0x36d118,_0x46e7ef)=>(_0x7006f8,_0x1fdbb7)=>_0x46e7ef(_0x7006f8,_0x1fdbb7,_0x36d118),$=(_0x27cb2d,_0x363a7e,_0x3568df)=>ne(_0x27cb2d,typeof _0x363a7e!=_0x5e32a6(0x173)?_0x363a7e+'':_0x363a7e,_0x3568df);let g=class extends _0x154e10{constructor(_0x189189=O,_0xdff84,_0x5d9eeb){const _0x2ecc0e=_0x5e32a6;super(),this[_0x2ecc0e(0x170)]=_0x189189,this[_0x2ecc0e(0x131)]=_0xdff84,this['_configService']=_0x5d9eeb;const {..._0x1b01b8}=_0x58cf97({},O,this[_0x2ecc0e(0x170)]);this[_0x2ecc0e(0x169)][_0x2ecc0e(0x164)](z,_0x1b01b8);}[_0x5e32a6(0x129)](){const _0x3a4041=_0x5e32a6;[[S],[f],[_]][_0x3a4041(0x171)](_0x109297=>{this['_injector']['add'](_0x109297);});}['onReady'](){const _0x3e3f37=_0x5e32a6;this[_0x3e3f37(0x131)][_0x3e3f37(0x13d)](f),this[_0x3e3f37(0x131)][_0x3e3f37(0x13d)](_);}};$(g,_0x5e32a6(0x15e),W),$(g,_0x5e32a6(0x16d),_0x32f188[_0x5e32a6(0x13f)]),g=ie([_0xde6bbc(_0x40ed92,_0x1b6345,_0x46806d),N(0x1,_0x8aec6c(_0x420fd5)),N(0x2,_0x5457f3)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2c6192=_0x20aa;(function(_0x4ba2b4,_0x231167){const _0x493961=_0x20aa,_0x3fa76b=_0x4ba2b4();while(!![]){try{const _0x57146a=parseInt(_0x493961(0x138))/0x1+parseInt(_0x493961(0x100))/0x2*(parseInt(_0x493961(0x12e))/0x3)+parseInt(_0x493961(0x145))/0x4*(parseInt(_0x493961(0xe7))/0x5)+parseInt(_0x493961(0xfe))/0x6*(parseInt(_0x493961(0x139))/0x7)+-parseInt(_0x493961(0xf3))/0x8*(parseInt(_0x493961(0xfa))/0x9)+-parseInt(_0x493961(0x130))/0xa*(-parseInt(_0x493961(0xf1))/0xb)+parseInt(_0x493961(0x12c))/0xc*(-parseInt(_0x493961(0x124))/0xd);if(_0x57146a===_0x231167)break;else _0x3fa76b['push'](_0x3fa76b['shift']());}catch(_0x1010a3){_0x3fa76b['push'](_0x3fa76b['shift']());}}}(_0x4376,0xbfd71));import{CommentService as _0x41b3b3,CollaborationSessionService as _0x383878,UniverCollaborationClientPlugin as _0x381338}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x57d8a2}from'@univerjs-pro/license';import{dayjs as _0x467eaf,UserManagerService as _0x4a7b0a,Inject as _0x456bc0,Injector as _0x3ea938,Disposable as _0x1d3d60,CustomRangeType as _0x4ea2eb,UniverInstanceType as _0x59ce6a,DependentOn as _0x382d7b,IConfigService as _0x1b12f1,Plugin as _0xe039a3,merge as _0x5c49b5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5af108}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x8816bb,IThreadCommentDataSourceService as _0x2e8119}from'@univerjs/thread-comment';import{bufferTime as _0x325882}from'rxjs';import{HTTPService as _0x75c698}from'@univerjs/network';const W=_0x2c6192(0xfc);var I=(_0x5e53c0=>(_0x5e53c0[_0x5e53c0[_0x2c6192(0x125)]=0x0]=_0x2c6192(0x125),_0x5e53c0[_0x5e53c0[_0x2c6192(0xf2)]=0x1]=_0x2c6192(0xf2),_0x5e53c0[_0x5e53c0[_0x2c6192(0x133)]=-0x1]=_0x2c6192(0x133),_0x5e53c0))(I||{}),v=(_0x233151=>(_0x233151[_0x233151['Unknown']=0x0]=_0x2c6192(0xea),_0x233151[_0x233151[_0x2c6192(0x126)]=0x1]=_0x2c6192(0x126),_0x233151[_0x233151['Reply']=0x2]=_0x2c6192(0x12d),_0x233151[_0x233151[_0x2c6192(0x143)]=0x3]=_0x2c6192(0x143),_0x233151[_0x233151[_0x2c6192(0x11f)]=0x4]=_0x2c6192(0x11f),_0x233151[_0x233151[_0x2c6192(0x114)]=0x5]=_0x2c6192(0x114),_0x233151[_0x233151[_0x2c6192(0x133)]=-0x1]=_0x2c6192(0x133),_0x233151))(v||{});const y=_0x439d06=>_0x467eaf(new Date(+_0x439d06))[_0x2c6192(0x10b)](_0x2c6192(0x147)),B=async(_0x2a42b0,_0x3799a7)=>{const _0x26959d=_0x2c6192,_0x1184b6=_0x2a42b0['get'](_0x4a7b0a),_0x29dc02=_0x2a42b0['get'](_0x75c698);_0x3799a7[_0x26959d(0x136)](_0xe88892=>{const _0x4cd617=_0x26959d;_0x1184b6[_0x4cd617(0x105)](_0xe88892)&&_0x3799a7[_0x4cd617(0xee)](_0xe88892);}),_0x3799a7['size']&&(await _0x29dc02[_0x26959d(0x10f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3799a7]}}))[_0x26959d(0xe6)][_0x26959d(0x146)][_0x26959d(0x136)](_0x425d25=>{const _0x1dc57d=_0x26959d;_0x425d25&&_0x1184b6[_0x1dc57d(0x132)](_0x425d25);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5dde4b,_0x4f576c,_0x997ff3,_0x6d4fd)=>{const _0x437ff9=_0x2c6192;for(var _0x22352c=_0x6d4fd>0x1?void 0x0:_0x6d4fd?K(_0x4f576c,_0x997ff3):_0x4f576c,_0x274a15=_0x5dde4b[_0x437ff9(0xf4)]-0x1,_0x30b816;_0x274a15>=0x0;_0x274a15--)(_0x30b816=_0x5dde4b[_0x274a15])&&(_0x22352c=_0x30b816(_0x22352c)||_0x22352c);return _0x22352c;},p=(_0x6ddc67,_0x50d158)=>(_0x480fa5,_0x10a9b6)=>_0x50d158(_0x480fa5,_0x10a9b6,_0x6ddc67);function _0x20aa(_0x5e8bda,_0x281d53){const _0x43768d=_0x4376();return _0x20aa=function(_0x20aaee,_0x2d9bd3){_0x20aaee=_0x20aaee-0xe6;let _0x3abc9f=_0x43768d[_0x20aaee];return _0x3abc9f;},_0x20aa(_0x5e8bda,_0x281d53);}let _=class extends _0x1d3d60{constructor(_0x1f5b0b,_0x2519bc,_0x5f6c25,_0x5a7ea7){const _0x259f15=_0x2c6192;super(),this[_0x259f15(0x113)]=_0x1f5b0b,this[_0x259f15(0x120)]=_0x2519bc,this['_userService']=_0x5f6c25,this[_0x259f15(0x14a)]=_0x5a7ea7,this[_0x259f15(0x134)](),this[_0x259f15(0x12f)]();}[_0x2c6192(0x12f)](){const _0x789e91=_0x2c6192;this['disposeWithMe'](this[_0x789e91(0x120)][_0x789e91(0x111)][_0x789e91(0x110)](_0x325882(0x10))[_0x789e91(0x122)](_0x308897=>{const _0x478a98=_0x789e91,_0xd88602=new Set();_0x308897[_0x478a98(0x136)](_0x398e79=>{const _0x4b127e=_0x478a98;switch(_0x398e79[_0x4b127e(0xff)]){case'add':{const _0x55bbaa=_0x398e79['payload'][_0x4b127e(0x10d)];_0xd88602[_0x4b127e(0x11d)](_0x55bbaa);break;}}}),B(this[_0x478a98(0x14a)],_0xd88602);}));}['_init'](){const _0x291468=_0x2c6192;this['disposeWithMe'](this['_commentService'][_0x291468(0x111)][_0x291468(0x122)](async _0x4220ac=>{const _0x3d40ab=_0x291468;var _0x434088,_0x5573ef,_0x430ec1,_0x4cb245;const _0x4d8cbc=(_0x434088=this[_0x3d40ab(0x120)][_0x3d40ab(0x129)](_0x4220ac[_0x3d40ab(0x10a)])[_0x3d40ab(0xe8)](_0x262d37=>_0x262d37[_0x3d40ab(0xf5)]===_0x4220ac[_0x3d40ab(0xf5)]))==null?void 0x0:_0x434088[_0x3d40ab(0x13e)];if(!_0x4d8cbc)return;const {unitId:_0x3343c7,subUnitId:_0xc3c71c}=_0x4d8cbc;switch(_0x4220ac[_0x3d40ab(0x131)]&&this[_0x3d40ab(0x10c)][_0x3d40ab(0x132)](_0x4220ac[_0x3d40ab(0x131)]),_0x4220ac[_0x3d40ab(0xff)]){case v['Add']:break;case v['Reply']:{this[_0x3d40ab(0x120)][_0x3d40ab(0xed)](_0x3343c7,_0xc3c71c,{'unitId':_0x3343c7,'subUnitId':_0xc3c71c,'ref':'','id':_0x4220ac[_0x3d40ab(0x116)],'dT':y(+_0x4220ac[_0x3d40ab(0x106)]),'threadId':_0x4220ac['threadId'],'personId':(_0x430ec1=(_0x5573ef=_0x4220ac[_0x3d40ab(0x131)])==null?void 0x0:_0x5573ef[_0x3d40ab(0x104)])!=null?_0x430ec1:_0x4220ac[_0x3d40ab(0x119)],'text':JSON[_0x3d40ab(0x10e)](_0x4220ac[_0x3d40ab(0x144)]),'parentId':_0x4d8cbc['id']});break;}case v[_0x3d40ab(0x11f)]:{const _0x443f15=this['_threadCommentModel'][_0x3d40ab(0x103)](_0x3343c7,_0xc3c71c,_0x4220ac[_0x3d40ab(0x116)]);_0x443f15&&_0x443f15[_0x3d40ab(0x117)]&&this['_threadCommentModel'][_0x3d40ab(0x11a)](_0x3343c7,_0xc3c71c,_0x4220ac['replyId']);break;}case v[_0x3d40ab(0x143)]:{this[_0x3d40ab(0x120)][_0x3d40ab(0xec)](_0x3343c7,_0xc3c71c,{'commentId':_0x4220ac[_0x3d40ab(0x116)],'text':JSON[_0x3d40ab(0x10e)](_0x4220ac[_0x3d40ab(0x144)])});break;}case v[_0x3d40ab(0x114)]:{const _0x4e1a98=(_0x4cb245=this['_threadCommentModel'][_0x3d40ab(0x129)](_0x4220ac[_0x3d40ab(0x10a)])[_0x3d40ab(0xe8)](_0x456ba5=>_0x456ba5[_0x3d40ab(0xf5)]===_0x4220ac[_0x3d40ab(0xf5)]))==null?void 0x0:_0x4cb245[_0x3d40ab(0x13e)];_0x4e1a98&&this['_threadCommentModel']['resolveComment'](_0x3343c7,_0xc3c71c,_0x4e1a98['id'],_0x4220ac[_0x3d40ab(0xfd)]===I[_0x3d40ab(0xf2)]);break;}}}));}};_=V([p(0x0,_0x456bc0(_0x41b3b3)),p(0x1,_0x456bc0(_0x8816bb)),p(0x2,_0x456bc0(_0x4a7b0a)),p(0x3,_0x456bc0(_0x3ea938))],_);const z=_0x2c6192(0x112),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1d9e33,_0x42949c,_0xcaf546,_0x12acea)=>{const _0x1969f7=_0x2c6192;for(var _0x1b13b5=_0x12acea>0x1?void 0x0:_0x12acea?k(_0x42949c,_0xcaf546):_0x42949c,_0x3fc7ca=_0x1d9e33[_0x1969f7(0xf4)]-0x1,_0x5d3752;_0x3fc7ca>=0x0;_0x3fc7ca--)(_0x5d3752=_0x1d9e33[_0x3fc7ca])&&(_0x1b13b5=_0x5d3752(_0x1b13b5)||_0x1b13b5);return _0x1b13b5;},b=(_0x24c94a,_0x1e6b2f)=>(_0x5186e8,_0x55185d)=>_0x1e6b2f(_0x5186e8,_0x55185d,_0x24c94a);function X(_0x34b79b,_0x38d265){const _0x6b32f7=_0x2c6192,_0x548fa8=_0x34b79b[_0x6b32f7(0x127)][0x0];return{..._0x38d265,'id':_0x548fa8[_0x6b32f7(0x116)],'resolved':_0x34b79b[_0x6b32f7(0xfd)]===0x1,'dT':y(_0x548fa8[_0x6b32f7(0x106)]),'personId':_0x548fa8[_0x6b32f7(0x119)],'threadId':_0x548fa8[_0x6b32f7(0xf5)]};}function ee(_0x4ac389,_0x29471f,_0x1f6156){const _0x2068d9=_0x2c6192;var _0x56c8d7,_0x3248f6;if(((_0x3248f6=(_0x56c8d7=_0x4ac389==null?void 0x0:_0x4ac389[_0x2068d9(0x127)])==null?void 0x0:_0x56c8d7[_0x2068d9(0xf4)])!=null?_0x3248f6:0x0)>0x0){const _0x5066d6=(_0xf096fc,_0x203f09)=>({'id':_0xf096fc[_0x2068d9(0x116)],'threadId':_0xf096fc[_0x2068d9(0xf5)],'dT':y(_0xf096fc[_0x2068d9(0x106)]),'personId':_0xf096fc[_0x2068d9(0x119)],'resolved':_0x4ac389[_0x2068d9(0xfd)]===I[_0x2068d9(0xf2)],'unitId':_0x29471f,'subUnitId':_0x1f6156,'text':JSON[_0x2068d9(0x10e)](_0xf096fc[_0x2068d9(0x144)]),'parentId':_0x203f09}),_0x4d5b0c=_0x5066d6(_0x4ac389[_0x2068d9(0x127)][0x0]);return{..._0x4d5b0c,'children':_0x4ac389[_0x2068d9(0x127)][_0x2068d9(0x11c)](0x1)['map'](_0x2102d5=>_0x5066d6(_0x2102d5,_0x4d5b0c['id']))};}return null;}let S=class{constructor(_0x94668e,_0x6e30b,_0x5507b7){const _0x3310d4=_0x2c6192;this[_0x3310d4(0xeb)]=_0x94668e,this[_0x3310d4(0x10c)]=_0x6e30b,this['_sessionService']=_0x5507b7;}async[_0x2c6192(0xed)](_0x2d871c){const _0x1efe27=_0x2c6192;var _0x26e8e3,_0x18578c;const {parentId:_0x439026,unitId:_0x4de833,text:_0x10487e,threadId:_0x3141fe}=_0x2d871c,_0x599310=(_0x18578c=(_0x26e8e3=_0x10487e[_0x1efe27(0x11b)])==null?void 0x0:_0x26e8e3[_0x1efe27(0x13f)](_0x5af6b0=>_0x5af6b0[_0x1efe27(0x14c)]===_0x4ea2eb[_0x1efe27(0x107)])[_0x1efe27(0x101)](_0x4e95a3=>_0x4e95a3[_0x1efe27(0xe9)]))!=null?_0x18578c:[],_0x5ade3f=JSON[_0x1efe27(0x140)](_0x10487e),_0x225012=(await this[_0x1efe27(0xfb)][_0x1efe27(0x149)](_0x4de833))[_0x1efe27(0x121)]();if(_0x439026){const _0x50f06b={'memberId':_0x225012,'unitId':_0x4de833,'content':_0x5ade3f,'mention':_0x599310,'threadId':_0x3141fe},_0x2b99ea=(await this[_0x1efe27(0xeb)][_0x1efe27(0xf9)](_0x1efe27(0x148)+_0x4de833+_0x1efe27(0x108),{'body':_0x50f06b}))[_0x1efe27(0xe6)]['reply'];return{..._0x2d871c,'id':_0x2b99ea[_0x1efe27(0x116)],'dT':_0x467eaf(+_0x2b99ea['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x2b99ea['userId']};}else{const _0x17997c={'memberId':_0x225012,'unitId':_0x4de833,'content':_0x5ade3f,'mention':_0x599310},_0x52166a=await this[_0x1efe27(0xeb)][_0x1efe27(0xf9)](_0x1efe27(0x148)+_0x4de833+_0x1efe27(0xf7),{'body':_0x17997c});return X(_0x52166a['body'][_0x1efe27(0xef)],_0x2d871c);}}async['updateComment'](_0x170f0e){const _0x52f2ab=_0x2c6192;var _0x14dabc,_0x20c4ea;const {text:_0x32163e,unitId:_0x676789}=_0x170f0e,_0x238a20=(_0x20c4ea=(_0x14dabc=_0x32163e['customRanges'])==null?void 0x0:_0x14dabc[_0x52f2ab(0x13f)](_0xad761=>_0xad761[_0x52f2ab(0x14c)]===_0x4ea2eb[_0x52f2ab(0x107)])['map'](_0x3c9667=>_0x3c9667[_0x52f2ab(0xe9)]))!=null?_0x20c4ea:[],_0x15b254=JSON[_0x52f2ab(0x140)](_0x32163e),_0x5aa8ba=_0x170f0e[_0x52f2ab(0xf5)],_0x1af6e5=_0x170f0e['id'],_0x591e13={'memberId':(await this['_sessionService'][_0x52f2ab(0x149)](_0x676789))[_0x52f2ab(0x121)](),'unitId':_0x676789,'threadId':_0x5aa8ba,'mention':_0x238a20,'content':_0x15b254,'replyId':_0x1af6e5},_0x4728e4=await this[_0x52f2ab(0xeb)][_0x52f2ab(0xf9)]('/universer-api/comment/unit/'+_0x676789+_0x52f2ab(0x115),{'body':_0x591e13});return!_0x4728e4[_0x52f2ab(0xe6)][_0x52f2ab(0x118)]||_0x4728e4[_0x52f2ab(0xe6)][_0x52f2ab(0x118)][_0x52f2ab(0x109)]===0x1;}async[_0x2c6192(0x11e)](_0x3c87a1){const _0x17fbb8=_0x2c6192,{unitId:_0x29b19c}=_0x3c87a1,_0x46c644=_0x3c87a1[_0x17fbb8(0xf5)],_0x18a29f={'memberId':this[_0x17fbb8(0x10c)][_0x17fbb8(0xf6)]()[_0x17fbb8(0x104)],'unitId':_0x29b19c,'threadId':_0x46c644,'solved':_0x3c87a1[_0x17fbb8(0xf8)]?I['Solved']:I[_0x17fbb8(0x125)]},_0x242433=await this['_httpService'][_0x17fbb8(0xf9)]('/universer-api/comment/unit/'+_0x29b19c+_0x17fbb8(0x135),{'body':_0x18a29f});return!_0x242433[_0x17fbb8(0xe6)][_0x17fbb8(0x118)]||_0x242433[_0x17fbb8(0xe6)][_0x17fbb8(0x118)]['code']===0x1;}async['deleteComment'](_0x38c03e,_0x2302c5,_0x2ed212,_0x55e9b1){const _0x3f9769=_0x2c6192,_0x4c1017={'memberId':(await this[_0x3f9769(0xfb)][_0x3f9769(0x149)](_0x38c03e))['getMemberID'](),'threadId':_0x2ed212,'replyId':_0x55e9b1,'unitId':_0x38c03e},_0x22bfcd=await this[_0x3f9769(0xeb)][_0x3f9769(0xf9)](_0x3f9769(0x148)+_0x38c03e+_0x3f9769(0x137),{'body':_0x4c1017});return!_0x22bfcd['body'][_0x3f9769(0x118)]||_0x22bfcd[_0x3f9769(0xe6)][_0x3f9769(0x118)][_0x3f9769(0x109)]===0x1;}async['listComments'](_0x3a9339,_0x2f40e1,_0xbd02c1){const _0x269639=_0x2c6192,_0x4c06e4={'unitId':_0x3a9339,'threadId':_0xbd02c1},_0x2232b3=await this[_0x269639(0xeb)]['post']('/universer-api/comment/unit/'+_0x3a9339+_0x269639(0x12a),{'body':_0x4c06e4}),_0x72e265=_0xbd02c1[_0x269639(0x101)](_0x5e9da1=>ee(_0x2232b3[_0x269639(0xe6)]['comments'][_0x5e9da1],_0x3a9339,_0x2f40e1))[_0x269639(0x13f)](Boolean);return Object['values'](_0x2232b3[_0x269639(0xe6)]['users'])['forEach'](_0x374944=>{const _0x5adf7b=_0x269639;this[_0x5adf7b(0x10c)][_0x5adf7b(0x132)](_0x374944);}),_0x72e265;}[_0x2c6192(0x13c)](_0x36259c){return{'id':_0x36259c['id'],'threadId':_0x36259c['threadId'],'ref':_0x36259c['ref']};}};S=Q([b(0x0,_0x456bc0(_0x75c698)),b(0x1,_0x456bc0(_0x4a7b0a)),b(0x2,_0x456bc0(_0x383878))],S);var re=Object[_0x2c6192(0x14b)],te=(_0x13ab35,_0x295903,_0x42a7f5,_0x2c3d6e)=>{for(var _0x5bcc98=_0x2c3d6e>0x1?void 0x0:_0x2c3d6e?re(_0x295903,_0x42a7f5):_0x295903,_0x1e39d5=_0x13ab35['length']-0x1,_0x510ba0;_0x1e39d5>=0x0;_0x1e39d5--)(_0x510ba0=_0x13ab35[_0x1e39d5])&&(_0x5bcc98=_0x510ba0(_0x5bcc98)||_0x5bcc98);return _0x5bcc98;},M=(_0x21d752,_0x40e211)=>(_0x196a8d,_0x5f0eb7)=>_0x40e211(_0x196a8d,_0x5f0eb7,_0x21d752);let f=class extends _0x1d3d60{constructor(_0x45342f,_0xfa11ec){const _0x3a7fc4=_0x2c6192;super(),this[_0x3a7fc4(0x12b)]=_0x45342f,this[_0x3a7fc4(0x14d)]=_0xfa11ec,this['_initDataSource']();}[_0x2c6192(0x142)](){const _0x22589e=_0x2c6192;this[_0x22589e(0x12b)][_0x22589e(0xf0)]=this[_0x22589e(0x14d)],this[_0x22589e(0x12b)][_0x22589e(0x141)]=!0x1;}};f=te([M(0x0,_0x2e8119),M(0x1,_0x456bc0(S))],f);var se=Object['defineProperty'],oe=Object[_0x2c6192(0x14b)],ne=(_0xb20337,_0x7d5553,_0x21ee0e)=>_0x7d5553 in _0xb20337?se(_0xb20337,_0x7d5553,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x21ee0e}):_0xb20337[_0x7d5553]=_0x21ee0e,ie=(_0x226092,_0xf4bef2,_0x64a980,_0x2ae7d5)=>{const _0x153b5b=_0x2c6192;for(var _0x42a8c2=_0x2ae7d5>0x1?void 0x0:_0x2ae7d5?oe(_0xf4bef2,_0x64a980):_0xf4bef2,_0x4f368e=_0x226092[_0x153b5b(0xf4)]-0x1,_0x345cb1;_0x4f368e>=0x0;_0x4f368e--)(_0x345cb1=_0x226092[_0x4f368e])&&(_0x42a8c2=_0x345cb1(_0x42a8c2)||_0x42a8c2);return _0x42a8c2;},N=(_0x2721ba,_0x152e1c)=>(_0x40bd89,_0x252b4c)=>_0x152e1c(_0x40bd89,_0x252b4c,_0x2721ba),$=(_0x4a041d,_0x52a9c0,_0x4e19ae)=>ne(_0x4a041d,typeof _0x52a9c0!=_0x2c6192(0x128)?_0x52a9c0+'':_0x52a9c0,_0x4e19ae);let g=class extends _0xe039a3{constructor(_0x4e2929=O,_0x51dd18,_0x245b5c){const _0x594f3c=_0x2c6192;super(),this[_0x594f3c(0x102)]=_0x4e2929,this[_0x594f3c(0x14a)]=_0x51dd18,this[_0x594f3c(0x13a)]=_0x245b5c;const {..._0x195f0a}=_0x5c49b5({},O,this[_0x594f3c(0x102)]);this[_0x594f3c(0x13a)][_0x594f3c(0x13b)](z,_0x195f0a);}['onStarting'](){const _0x44b3af=_0x2c6192;[[S],[f],[_]][_0x44b3af(0x136)](_0x5abfde=>{const _0x47fc87=_0x44b3af;this[_0x47fc87(0x14a)][_0x47fc87(0x11d)](_0x5abfde);});}[_0x2c6192(0x123)](){const _0x2cd597=_0x2c6192;this[_0x2cd597(0x14a)][_0x2cd597(0x10f)](f),this[_0x2cd597(0x14a)]['get'](_);}};$(g,'pluginName',W),$(g,_0x2c6192(0xff),_0x59ce6a[_0x2c6192(0x13d)]),g=ie([_0x382d7b(_0x5af108,_0x381338,_0x57d8a2),N(0x1,_0x456bc0(_0x3ea938)),N(0x2,_0x1b12f1)],g);export{g as UniverThreadCommentDataSourcePlugin};function _0x4376(){const _0x50f6a0=['users','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','requireSession','_injector','getOwnPropertyDescriptor','rangeType','_threadCommentDataSource','body','1140OKkdcQ','find','rangeId','Unknown','_httpService','updateComment','addComment','delete','comment','dataSource','4066843mQEscJ','Solved','592kCMtHe','length','threadId','getCurrentUser','/add','resolved','post','109692YksFTw','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','750270BbsWMn','type','38432qrgzeD','map','_config','getComment','userID','getUser','createTimestamp','COMMENT','/reply','code','unitId','format','_userService','personId','parse','get','pipe','commentUpdate$','thread-comment-data-source.config','_commentService','Solve','/edit','replyId','parentId','error','userId','deleteComment','customRanges','slice','add','resolveComment','Delete','_threadCommentModel','getMemberID','subscribe','onReady','28085434aqIrCM','OpenOrReOpen','Add','replies','symbol','getUnit','/list','_threadCommentDataSourceService','12ykPgzg','Reply','228cYeZlx','_initUserSync','30gnSfPQ','user','addUser','UNRECOGNIZED','_init','/solved','forEach','/delete','26936UaCPPA','56klzanT','_configService','setConfig','saveCommentToSnapshot','UNIVER_UNKNOWN','root','filter','stringify','syncUpdateMutationToColla','_initDataSource','Edit','content','4408dyaCMk'];_0x4376=function(){return _0x50f6a0;};return _0x4376();}
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5e32a6=_0x1527;(function(_0x576f75,_0x597d5c){const _0xbbb47=_0x1527,_0x51a384=_0x576f75();while(!![]){try{const _0x28747e=-parseInt(_0xbbb47(0x158))/0x1+-parseInt(_0xbbb47(0x15b))/0x2*(-parseInt(_0xbbb47(0x149))/0x3)+parseInt(_0xbbb47(0x12a))/0x4+-parseInt(_0xbbb47(0x124))/0x5+-parseInt(_0xbbb47(0x140))/0x6+parseInt(_0xbbb47(0x134))/0x7*(parseInt(_0xbbb47(0x166))/0x8)+-parseInt(_0xbbb47(0x14b))/0x9;if(_0x28747e===_0x597d5c)break;else _0x51a384['push'](_0x51a384['shift']());}catch(_0x49908f){_0x51a384['push'](_0x51a384['shift']());}}}(_0x5744,0x8962e));import{CommentService as _0x25684e,CollaborationSessionService as _0x2bbd11,UniverCollaborationClientPlugin as _0x1b6345}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x46806d}from'@univerjs-pro/license';import{dayjs as _0x2edf0d,UserManagerService as _0x5aa83d,Inject as _0x8aec6c,Injector as _0x420fd5,Disposable as _0x3b1f59,CustomRangeType as _0x174598,UniverInstanceType as _0x32f188,DependentOn as _0xde6bbc,IConfigService as _0x5457f3,Plugin as _0x154e10,merge as _0x58cf97}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x40ed92}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x28c6d4,IThreadCommentDataSourceService as _0x10cad0}from'@univerjs/thread-comment';function _0x5744(){const _0xc65ce1=['get','rangeId','UNIVER_UNKNOWN','4936854iyprYn','replies','/solved','UNRECOGNIZED','_initUserSync','stringify','_threadCommentDataSourceService','map','content','6WdOCQj','_sessionService','80991ivKRnW','Reply','getUnit','threadId','userID','subscribe','requireSession','pipe','Add','unitId','comments','/universer-api/comment/unit/','personId','412548DNPYxH','addComment','customRanges','580518ofzqmj','payload','_threadCommentDataSource','pluginName','deleteComment','_initDataSource','updateComment','ref','Solve','setConfig','_threadCommentModel','3863752rphgZd','/universer-api/user/list','length','_configService','_commentService','parse','createTimestamp','type','disposeWithMe','rangeType','_config','forEach','filter','symbol','solved','parentId','Delete','resolveComment','Edit','getMemberID','error','addUser','userId','/reply','thread-comment-data-source.config','_init','40685KOzWbe','getComment','post','replyId','Solved','onStarting','3006960QngLPk','dataSource','code','_httpService','root','getOwnPropertyDescriptor','COMMENT','_injector','reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','7VxxVPZ','getCurrentUser','_userService','users','find','/delete','YYYY/MM/DD\x20HH:mm','resolved','body'];_0x5744=function(){return _0xc65ce1;};return _0x5744();}import{bufferTime as _0x1604bb}from'rxjs';import{HTTPService as _0x45a61b}from'@univerjs/network';const W=_0x5e32a6(0x133);var I=(_0x295eca=>(_0x295eca[_0x295eca['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x295eca[_0x295eca[_0x5e32a6(0x128)]=0x1]=_0x5e32a6(0x128),_0x295eca[_0x295eca['UNRECOGNIZED']=-0x1]=_0x5e32a6(0x143),_0x295eca))(I||{}),v=(_0x69ded0=>(_0x69ded0[_0x69ded0['Unknown']=0x0]='Unknown',_0x69ded0[_0x69ded0['Add']=0x1]=_0x5e32a6(0x153),_0x69ded0[_0x69ded0['Reply']=0x2]='Reply',_0x69ded0[_0x69ded0[_0x5e32a6(0x178)]=0x3]='Edit',_0x69ded0[_0x69ded0[_0x5e32a6(0x176)]=0x4]=_0x5e32a6(0x176),_0x69ded0[_0x69ded0['Solve']=0x5]=_0x5e32a6(0x163),_0x69ded0[_0x69ded0[_0x5e32a6(0x143)]=-0x1]=_0x5e32a6(0x143),_0x69ded0))(v||{});const y=_0x889282=>_0x2edf0d(new Date(+_0x889282))['format'](_0x5e32a6(0x13a)),B=async(_0x19f1f5,_0x4f2b4d)=>{const _0x40bb14=_0x5e32a6,_0x532d9d=_0x19f1f5[_0x40bb14(0x13d)](_0x5aa83d),_0x5966b8=_0x19f1f5[_0x40bb14(0x13d)](_0x45a61b);_0x4f2b4d['forEach'](_0x321241=>{_0x532d9d['getUser'](_0x321241)&&_0x4f2b4d['delete'](_0x321241);}),_0x4f2b4d['size']&&(await _0x5966b8[_0x40bb14(0x13d)](_0x40bb14(0x167),{'params':{'userIDs':[..._0x4f2b4d]}}))[_0x40bb14(0x13c)][_0x40bb14(0x137)][_0x40bb14(0x171)](_0x4b71d9=>{const _0xcbe019=_0x40bb14;_0x4b71d9&&_0x532d9d[_0xcbe019(0x17b)](_0x4b71d9);});};var K=Object[_0x5e32a6(0x12f)],V=(_0x42be3f,_0x26c26c,_0x438ce0,_0x1042eb)=>{for(var _0x68bff4=_0x1042eb>0x1?void 0x0:_0x1042eb?K(_0x26c26c,_0x438ce0):_0x26c26c,_0x3d6a4f=_0x42be3f['length']-0x1,_0x48086a;_0x3d6a4f>=0x0;_0x3d6a4f--)(_0x48086a=_0x42be3f[_0x3d6a4f])&&(_0x68bff4=_0x48086a(_0x68bff4)||_0x68bff4);return _0x68bff4;},p=(_0x1362be,_0x511fd5)=>(_0x3bb22f,_0x1c9d7c)=>_0x511fd5(_0x3bb22f,_0x1c9d7c,_0x1362be);let _=class extends _0x3b1f59{constructor(_0x39ba44,_0x9a3566,_0x342bd1,_0x2b13f1){const _0x48a700=_0x5e32a6;super(),this['_commentService']=_0x39ba44,this[_0x48a700(0x165)]=_0x9a3566,this[_0x48a700(0x136)]=_0x342bd1,this[_0x48a700(0x131)]=_0x2b13f1,this[_0x48a700(0x17f)](),this[_0x48a700(0x144)]();}[_0x5e32a6(0x144)](){const _0xb98ddb=_0x5e32a6;this[_0xb98ddb(0x16e)](this[_0xb98ddb(0x165)]['commentUpdate$'][_0xb98ddb(0x152)](_0x1604bb(0x10))['subscribe'](_0x5616cb=>{const _0x46ff7e=_0xb98ddb,_0xdcc87d=new Set();_0x5616cb[_0x46ff7e(0x171)](_0x39229b=>{const _0x1c05b1=_0x46ff7e;switch(_0x39229b['type']){case'add':{const _0x299bdb=_0x39229b[_0x1c05b1(0x15c)][_0x1c05b1(0x157)];_0xdcc87d['add'](_0x299bdb);break;}}}),B(this[_0x46ff7e(0x131)],_0xdcc87d);}));}[_0x5e32a6(0x17f)](){const _0x4a2190=_0x5e32a6;this[_0x4a2190(0x16e)](this[_0x4a2190(0x16a)]['commentUpdate$'][_0x4a2190(0x150)](async _0x523b79=>{const _0x3322b3=_0x4a2190;var _0x51e1c5,_0x3b775e,_0x2e7f18,_0x3288b3;const _0x30c7d8=(_0x51e1c5=this['_threadCommentModel'][_0x3322b3(0x14d)](_0x523b79[_0x3322b3(0x154)])[_0x3322b3(0x138)](_0x5405e8=>_0x5405e8['threadId']===_0x523b79[_0x3322b3(0x14e)]))==null?void 0x0:_0x51e1c5[_0x3322b3(0x12e)];if(!_0x30c7d8)return;const {unitId:_0x3da1c2,subUnitId:_0x5e04c7}=_0x30c7d8;switch(_0x523b79['user']&&this[_0x3322b3(0x136)][_0x3322b3(0x17b)](_0x523b79['user']),_0x523b79[_0x3322b3(0x16d)]){case v[_0x3322b3(0x153)]:break;case v[_0x3322b3(0x14c)]:{this['_threadCommentModel'][_0x3322b3(0x159)](_0x3da1c2,_0x5e04c7,{'unitId':_0x3da1c2,'subUnitId':_0x5e04c7,'ref':'','id':_0x523b79[_0x3322b3(0x127)],'dT':y(+_0x523b79[_0x3322b3(0x16c)]),'threadId':_0x523b79[_0x3322b3(0x14e)],'personId':(_0x2e7f18=(_0x3b775e=_0x523b79['user'])==null?void 0x0:_0x3b775e[_0x3322b3(0x14f)])!=null?_0x2e7f18:_0x523b79[_0x3322b3(0x17c)],'text':JSON[_0x3322b3(0x16b)](_0x523b79['content']),'parentId':_0x30c7d8['id']});break;}case v[_0x3322b3(0x176)]:{const _0x392871=this['_threadCommentModel'][_0x3322b3(0x125)](_0x3da1c2,_0x5e04c7,_0x523b79[_0x3322b3(0x127)]);_0x392871&&_0x392871[_0x3322b3(0x175)]&&this['_threadCommentModel'][_0x3322b3(0x15f)](_0x3da1c2,_0x5e04c7,_0x523b79['replyId']);break;}case v[_0x3322b3(0x178)]:{this[_0x3322b3(0x165)]['updateComment'](_0x3da1c2,_0x5e04c7,{'commentId':_0x523b79['replyId'],'text':JSON[_0x3322b3(0x16b)](_0x523b79[_0x3322b3(0x148)])});break;}case v[_0x3322b3(0x163)]:{const _0x5650f9=(_0x3288b3=this['_threadCommentModel'][_0x3322b3(0x14d)](_0x523b79[_0x3322b3(0x154)])['find'](_0x3234fb=>_0x3234fb[_0x3322b3(0x14e)]===_0x523b79['threadId']))==null?void 0x0:_0x3288b3[_0x3322b3(0x12e)];_0x5650f9&&this[_0x3322b3(0x165)][_0x3322b3(0x177)](_0x3da1c2,_0x5e04c7,_0x5650f9['id'],_0x523b79[_0x3322b3(0x174)]===I['Solved']);break;}}}));}};function _0x1527(_0x1f3476,_0x4afaac){const _0x57447b=_0x5744();return _0x1527=function(_0x15279a,_0x5df83e){_0x15279a=_0x15279a-0x124;let _0x2ce626=_0x57447b[_0x15279a];return _0x2ce626;},_0x1527(_0x1f3476,_0x4afaac);}_=V([p(0x0,_0x8aec6c(_0x25684e)),p(0x1,_0x8aec6c(_0x28c6d4)),p(0x2,_0x8aec6c(_0x5aa83d)),p(0x3,_0x8aec6c(_0x420fd5))],_);const z=_0x5e32a6(0x17e),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x37fbf3,_0xf94518,_0x547663,_0x4505c3)=>{const _0x17919b=_0x5e32a6;for(var _0x26948a=_0x4505c3>0x1?void 0x0:_0x4505c3?k(_0xf94518,_0x547663):_0xf94518,_0x1da55f=_0x37fbf3[_0x17919b(0x168)]-0x1,_0x5367b3;_0x1da55f>=0x0;_0x1da55f--)(_0x5367b3=_0x37fbf3[_0x1da55f])&&(_0x26948a=_0x5367b3(_0x26948a)||_0x26948a);return _0x26948a;},b=(_0x2ff711,_0x161673)=>(_0x3b5f35,_0x483f37)=>_0x161673(_0x3b5f35,_0x483f37,_0x2ff711);function X(_0x3f5d1a,_0x33a645){const _0x3cf677=_0x5e32a6,_0x16cb49=_0x3f5d1a[_0x3cf677(0x141)][0x0];return{..._0x33a645,'id':_0x16cb49[_0x3cf677(0x127)],'resolved':_0x3f5d1a[_0x3cf677(0x174)]===0x1,'dT':y(_0x16cb49[_0x3cf677(0x16c)]),'personId':_0x16cb49[_0x3cf677(0x17c)],'threadId':_0x16cb49[_0x3cf677(0x14e)]};}function ee(_0x58e7b5,_0x485195,_0x3ef9b2){const _0x21539b=_0x5e32a6;var _0x7094ff,_0x11792a;if(((_0x11792a=(_0x7094ff=_0x58e7b5==null?void 0x0:_0x58e7b5[_0x21539b(0x141)])==null?void 0x0:_0x7094ff[_0x21539b(0x168)])!=null?_0x11792a:0x0)>0x0){const _0x43aadb=(_0x37f35d,_0x1a6c94)=>({'id':_0x37f35d[_0x21539b(0x127)],'threadId':_0x37f35d[_0x21539b(0x14e)],'dT':y(_0x37f35d['createTimestamp']),'personId':_0x37f35d[_0x21539b(0x17c)],'resolved':_0x58e7b5[_0x21539b(0x174)]===I[_0x21539b(0x128)],'unitId':_0x485195,'subUnitId':_0x3ef9b2,'text':JSON[_0x21539b(0x16b)](_0x37f35d[_0x21539b(0x148)]),'parentId':_0x1a6c94}),_0x3b2690=_0x43aadb(_0x58e7b5[_0x21539b(0x141)][0x0]);return{..._0x3b2690,'children':_0x58e7b5[_0x21539b(0x141)]['slice'](0x1)['map'](_0x2c9d8e=>_0x43aadb(_0x2c9d8e,_0x3b2690['id']))};}return null;}let S=class{constructor(_0x301656,_0xd6e9d8,_0x1a3b69){const _0x3c5450=_0x5e32a6;this[_0x3c5450(0x12d)]=_0x301656,this[_0x3c5450(0x136)]=_0xd6e9d8,this[_0x3c5450(0x14a)]=_0x1a3b69;}async[_0x5e32a6(0x159)](_0x37bd9f){const _0x25339e=_0x5e32a6;var _0x2c584e,_0x3a776e;const {parentId:_0x3ccaf3,unitId:_0x5bdf04,text:_0x5b49b2,threadId:_0x49c1d1}=_0x37bd9f,_0x474828=(_0x3a776e=(_0x2c584e=_0x5b49b2[_0x25339e(0x15a)])==null?void 0x0:_0x2c584e['filter'](_0x3d3268=>_0x3d3268[_0x25339e(0x16f)]===_0x174598[_0x25339e(0x130)])[_0x25339e(0x147)](_0x13d08a=>_0x13d08a[_0x25339e(0x13e)]))!=null?_0x3a776e:[],_0x1cff83=JSON[_0x25339e(0x145)](_0x5b49b2),_0x41274d=(await this['_sessionService'][_0x25339e(0x151)](_0x5bdf04))['getMemberID']();if(_0x3ccaf3){const _0x1ca8da={'memberId':_0x41274d,'unitId':_0x5bdf04,'content':_0x1cff83,'mention':_0x474828,'threadId':_0x49c1d1},_0x2c57ac=(await this['_httpService'][_0x25339e(0x126)](_0x25339e(0x156)+_0x5bdf04+_0x25339e(0x17d),{'body':_0x1ca8da}))[_0x25339e(0x13c)][_0x25339e(0x132)];return{..._0x37bd9f,'id':_0x2c57ac[_0x25339e(0x127)],'dT':_0x2edf0d(+_0x2c57ac[_0x25339e(0x16c)])['format'](_0x25339e(0x13a)),'personId':_0x2c57ac[_0x25339e(0x17c)]};}else{const _0x4764d1={'memberId':_0x41274d,'unitId':_0x5bdf04,'content':_0x1cff83,'mention':_0x474828},_0x4c0bf9=await this['_httpService'][_0x25339e(0x126)]('/universer-api/comment/unit/'+_0x5bdf04+'/add',{'body':_0x4764d1});return X(_0x4c0bf9[_0x25339e(0x13c)]['comment'],_0x37bd9f);}}async[_0x5e32a6(0x161)](_0x2d53e8){const _0x25b168=_0x5e32a6;var _0x291a71,_0x130e6c;const {text:_0x5911e8,unitId:_0x32d139}=_0x2d53e8,_0x260f0c=(_0x130e6c=(_0x291a71=_0x5911e8['customRanges'])==null?void 0x0:_0x291a71[_0x25b168(0x172)](_0x451842=>_0x451842[_0x25b168(0x16f)]===_0x174598['COMMENT'])[_0x25b168(0x147)](_0x4795ac=>_0x4795ac[_0x25b168(0x13e)]))!=null?_0x130e6c:[],_0x2c8165=JSON[_0x25b168(0x145)](_0x5911e8),_0x545c09=_0x2d53e8['threadId'],_0x3a3427=_0x2d53e8['id'],_0x53deb8={'memberId':(await this['_sessionService'][_0x25b168(0x151)](_0x32d139))[_0x25b168(0x179)](),'unitId':_0x32d139,'threadId':_0x545c09,'mention':_0x260f0c,'content':_0x2c8165,'replyId':_0x3a3427},_0xce7a15=await this['_httpService'][_0x25b168(0x126)](_0x25b168(0x156)+_0x32d139+'/edit',{'body':_0x53deb8});return!_0xce7a15['body'][_0x25b168(0x17a)]||_0xce7a15[_0x25b168(0x13c)][_0x25b168(0x17a)][_0x25b168(0x12c)]===0x1;}async[_0x5e32a6(0x177)](_0x5edac0){const _0x255d78=_0x5e32a6,{unitId:_0x3d716c}=_0x5edac0,_0x2548b1=_0x5edac0[_0x255d78(0x14e)],_0x4b2ed5={'memberId':this[_0x255d78(0x136)][_0x255d78(0x135)]()[_0x255d78(0x14f)],'unitId':_0x3d716c,'threadId':_0x2548b1,'solved':_0x5edac0[_0x255d78(0x13b)]?I[_0x255d78(0x128)]:I['OpenOrReOpen']},_0x166857=await this[_0x255d78(0x12d)][_0x255d78(0x126)](_0x255d78(0x156)+_0x3d716c+_0x255d78(0x142),{'body':_0x4b2ed5});return!_0x166857[_0x255d78(0x13c)][_0x255d78(0x17a)]||_0x166857[_0x255d78(0x13c)][_0x255d78(0x17a)][_0x255d78(0x12c)]===0x1;}async[_0x5e32a6(0x15f)](_0x285f78,_0x17a31b,_0xbc3c93,_0x24f27e){const _0x22d218=_0x5e32a6,_0x56c1ca={'memberId':(await this[_0x22d218(0x14a)]['requireSession'](_0x285f78))['getMemberID'](),'threadId':_0xbc3c93,'replyId':_0x24f27e,'unitId':_0x285f78},_0x45ef9b=await this[_0x22d218(0x12d)][_0x22d218(0x126)](_0x22d218(0x156)+_0x285f78+_0x22d218(0x139),{'body':_0x56c1ca});return!_0x45ef9b[_0x22d218(0x13c)]['error']||_0x45ef9b[_0x22d218(0x13c)][_0x22d218(0x17a)][_0x22d218(0x12c)]===0x1;}async['listComments'](_0x5e148b,_0x30ff39,_0x1dc3f3){const _0x25d90b=_0x5e32a6,_0x111a67={'unitId':_0x5e148b,'threadId':_0x1dc3f3},_0x3c0f91=await this[_0x25d90b(0x12d)][_0x25d90b(0x126)](_0x25d90b(0x156)+_0x5e148b+'/list',{'body':_0x111a67}),_0x1d97c2=_0x1dc3f3['map'](_0xf0818a=>ee(_0x3c0f91[_0x25d90b(0x13c)][_0x25d90b(0x155)][_0xf0818a],_0x5e148b,_0x30ff39))[_0x25d90b(0x172)](Boolean);return Object['values'](_0x3c0f91[_0x25d90b(0x13c)][_0x25d90b(0x137)])['forEach'](_0x4e4889=>{const _0xa9c5f=_0x25d90b;this[_0xa9c5f(0x136)][_0xa9c5f(0x17b)](_0x4e4889);}),_0x1d97c2;}['saveCommentToSnapshot'](_0x5d4d57){const _0x269138=_0x5e32a6;return{'id':_0x5d4d57['id'],'threadId':_0x5d4d57['threadId'],'ref':_0x5d4d57[_0x269138(0x162)]};}};S=Q([b(0x0,_0x8aec6c(_0x45a61b)),b(0x1,_0x8aec6c(_0x5aa83d)),b(0x2,_0x8aec6c(_0x2bbd11))],S);var re=Object[_0x5e32a6(0x12f)],te=(_0x24808f,_0x22912c,_0x503c8d,_0xe6c737)=>{const _0x10318c=_0x5e32a6;for(var _0x156fa6=_0xe6c737>0x1?void 0x0:_0xe6c737?re(_0x22912c,_0x503c8d):_0x22912c,_0x34d903=_0x24808f[_0x10318c(0x168)]-0x1,_0x489b63;_0x34d903>=0x0;_0x34d903--)(_0x489b63=_0x24808f[_0x34d903])&&(_0x156fa6=_0x489b63(_0x156fa6)||_0x156fa6);return _0x156fa6;},M=(_0x37f381,_0x8667e8)=>(_0x12aa6d,_0x3cb248)=>_0x8667e8(_0x12aa6d,_0x3cb248,_0x37f381);let f=class extends _0x3b1f59{constructor(_0x1ba95a,_0x2015da){const _0x5c6e04=_0x5e32a6;super(),this[_0x5c6e04(0x146)]=_0x1ba95a,this[_0x5c6e04(0x15d)]=_0x2015da,this[_0x5c6e04(0x160)]();}['_initDataSource'](){const _0x17c27a=_0x5e32a6;this[_0x17c27a(0x146)][_0x17c27a(0x12b)]=this['_threadCommentDataSource'],this[_0x17c27a(0x146)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x10cad0),M(0x1,_0x8aec6c(S))],f);var se=Object['defineProperty'],oe=Object[_0x5e32a6(0x12f)],ne=(_0x21baf0,_0x5ecae1,_0x190a53)=>_0x5ecae1 in _0x21baf0?se(_0x21baf0,_0x5ecae1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x190a53}):_0x21baf0[_0x5ecae1]=_0x190a53,ie=(_0x47e1cb,_0x5aa15a,_0x871f02,_0x3ba956)=>{for(var _0x21417c=_0x3ba956>0x1?void 0x0:_0x3ba956?oe(_0x5aa15a,_0x871f02):_0x5aa15a,_0x224b58=_0x47e1cb['length']-0x1,_0x9de8d1;_0x224b58>=0x0;_0x224b58--)(_0x9de8d1=_0x47e1cb[_0x224b58])&&(_0x21417c=_0x9de8d1(_0x21417c)||_0x21417c);return _0x21417c;},N=(_0x36d118,_0x46e7ef)=>(_0x7006f8,_0x1fdbb7)=>_0x46e7ef(_0x7006f8,_0x1fdbb7,_0x36d118),$=(_0x27cb2d,_0x363a7e,_0x3568df)=>ne(_0x27cb2d,typeof _0x363a7e!=_0x5e32a6(0x173)?_0x363a7e+'':_0x363a7e,_0x3568df);let g=class extends _0x154e10{constructor(_0x189189=O,_0xdff84,_0x5d9eeb){const _0x2ecc0e=_0x5e32a6;super(),this[_0x2ecc0e(0x170)]=_0x189189,this[_0x2ecc0e(0x131)]=_0xdff84,this['_configService']=_0x5d9eeb;const {..._0x1b01b8}=_0x58cf97({},O,this[_0x2ecc0e(0x170)]);this[_0x2ecc0e(0x169)][_0x2ecc0e(0x164)](z,_0x1b01b8);}[_0x5e32a6(0x129)](){const _0x3a4041=_0x5e32a6;[[S],[f],[_]][_0x3a4041(0x171)](_0x109297=>{this['_injector']['add'](_0x109297);});}['onReady'](){const _0x3e3f37=_0x5e32a6;this[_0x3e3f37(0x131)][_0x3e3f37(0x13d)](f),this[_0x3e3f37(0x131)][_0x3e3f37(0x13d)](_);}};$(g,_0x5e32a6(0x15e),W),$(g,_0x5e32a6(0x16d),_0x32f188[_0x5e32a6(0x13f)]),g=ie([_0xde6bbc(_0x40ed92,_0x1b6345,_0x46806d),N(0x1,_0x8aec6c(_0x420fd5)),N(0x2,_0x5457f3)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2c6192=_0x20aa;(function(_0x4ba2b4,_0x231167){const _0x493961=_0x20aa,_0x3fa76b=_0x4ba2b4();while(!![]){try{const _0x57146a=parseInt(_0x493961(0x138))/0x1+parseInt(_0x493961(0x100))/0x2*(parseInt(_0x493961(0x12e))/0x3)+parseInt(_0x493961(0x145))/0x4*(parseInt(_0x493961(0xe7))/0x5)+parseInt(_0x493961(0xfe))/0x6*(parseInt(_0x493961(0x139))/0x7)+-parseInt(_0x493961(0xf3))/0x8*(parseInt(_0x493961(0xfa))/0x9)+-parseInt(_0x493961(0x130))/0xa*(-parseInt(_0x493961(0xf1))/0xb)+parseInt(_0x493961(0x12c))/0xc*(-parseInt(_0x493961(0x124))/0xd);if(_0x57146a===_0x231167)break;else _0x3fa76b['push'](_0x3fa76b['shift']());}catch(_0x1010a3){_0x3fa76b['push'](_0x3fa76b['shift']());}}}(_0x4376,0xbfd71));import{CommentService as _0x41b3b3,CollaborationSessionService as _0x383878,UniverCollaborationClientPlugin as _0x381338}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x57d8a2}from'@univerjs-pro/license';import{dayjs as _0x467eaf,UserManagerService as _0x4a7b0a,Inject as _0x456bc0,Injector as _0x3ea938,Disposable as _0x1d3d60,CustomRangeType as _0x4ea2eb,UniverInstanceType as _0x59ce6a,DependentOn as _0x382d7b,IConfigService as _0x1b12f1,Plugin as _0xe039a3,merge as _0x5c49b5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5af108}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x8816bb,IThreadCommentDataSourceService as _0x2e8119}from'@univerjs/thread-comment';import{bufferTime as _0x325882}from'rxjs';import{HTTPService as _0x75c698}from'@univerjs/network';const W=_0x2c6192(0xfc);var I=(_0x5e53c0=>(_0x5e53c0[_0x5e53c0[_0x2c6192(0x125)]=0x0]=_0x2c6192(0x125),_0x5e53c0[_0x5e53c0[_0x2c6192(0xf2)]=0x1]=_0x2c6192(0xf2),_0x5e53c0[_0x5e53c0[_0x2c6192(0x133)]=-0x1]=_0x2c6192(0x133),_0x5e53c0))(I||{}),v=(_0x233151=>(_0x233151[_0x233151['Unknown']=0x0]=_0x2c6192(0xea),_0x233151[_0x233151[_0x2c6192(0x126)]=0x1]=_0x2c6192(0x126),_0x233151[_0x233151['Reply']=0x2]=_0x2c6192(0x12d),_0x233151[_0x233151[_0x2c6192(0x143)]=0x3]=_0x2c6192(0x143),_0x233151[_0x233151[_0x2c6192(0x11f)]=0x4]=_0x2c6192(0x11f),_0x233151[_0x233151[_0x2c6192(0x114)]=0x5]=_0x2c6192(0x114),_0x233151[_0x233151[_0x2c6192(0x133)]=-0x1]=_0x2c6192(0x133),_0x233151))(v||{});const y=_0x439d06=>_0x467eaf(new Date(+_0x439d06))[_0x2c6192(0x10b)](_0x2c6192(0x147)),B=async(_0x2a42b0,_0x3799a7)=>{const _0x26959d=_0x2c6192,_0x1184b6=_0x2a42b0['get'](_0x4a7b0a),_0x29dc02=_0x2a42b0['get'](_0x75c698);_0x3799a7[_0x26959d(0x136)](_0xe88892=>{const _0x4cd617=_0x26959d;_0x1184b6[_0x4cd617(0x105)](_0xe88892)&&_0x3799a7[_0x4cd617(0xee)](_0xe88892);}),_0x3799a7['size']&&(await _0x29dc02[_0x26959d(0x10f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3799a7]}}))[_0x26959d(0xe6)][_0x26959d(0x146)][_0x26959d(0x136)](_0x425d25=>{const _0x1dc57d=_0x26959d;_0x425d25&&_0x1184b6[_0x1dc57d(0x132)](_0x425d25);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5dde4b,_0x4f576c,_0x997ff3,_0x6d4fd)=>{const _0x437ff9=_0x2c6192;for(var _0x22352c=_0x6d4fd>0x1?void 0x0:_0x6d4fd?K(_0x4f576c,_0x997ff3):_0x4f576c,_0x274a15=_0x5dde4b[_0x437ff9(0xf4)]-0x1,_0x30b816;_0x274a15>=0x0;_0x274a15--)(_0x30b816=_0x5dde4b[_0x274a15])&&(_0x22352c=_0x30b816(_0x22352c)||_0x22352c);return _0x22352c;},p=(_0x6ddc67,_0x50d158)=>(_0x480fa5,_0x10a9b6)=>_0x50d158(_0x480fa5,_0x10a9b6,_0x6ddc67);function _0x20aa(_0x5e8bda,_0x281d53){const _0x43768d=_0x4376();return _0x20aa=function(_0x20aaee,_0x2d9bd3){_0x20aaee=_0x20aaee-0xe6;let _0x3abc9f=_0x43768d[_0x20aaee];return _0x3abc9f;},_0x20aa(_0x5e8bda,_0x281d53);}let _=class extends _0x1d3d60{constructor(_0x1f5b0b,_0x2519bc,_0x5f6c25,_0x5a7ea7){const _0x259f15=_0x2c6192;super(),this[_0x259f15(0x113)]=_0x1f5b0b,this[_0x259f15(0x120)]=_0x2519bc,this['_userService']=_0x5f6c25,this[_0x259f15(0x14a)]=_0x5a7ea7,this[_0x259f15(0x134)](),this[_0x259f15(0x12f)]();}[_0x2c6192(0x12f)](){const _0x789e91=_0x2c6192;this['disposeWithMe'](this[_0x789e91(0x120)][_0x789e91(0x111)][_0x789e91(0x110)](_0x325882(0x10))[_0x789e91(0x122)](_0x308897=>{const _0x478a98=_0x789e91,_0xd88602=new Set();_0x308897[_0x478a98(0x136)](_0x398e79=>{const _0x4b127e=_0x478a98;switch(_0x398e79[_0x4b127e(0xff)]){case'add':{const _0x55bbaa=_0x398e79['payload'][_0x4b127e(0x10d)];_0xd88602[_0x4b127e(0x11d)](_0x55bbaa);break;}}}),B(this[_0x478a98(0x14a)],_0xd88602);}));}['_init'](){const _0x291468=_0x2c6192;this['disposeWithMe'](this['_commentService'][_0x291468(0x111)][_0x291468(0x122)](async _0x4220ac=>{const _0x3d40ab=_0x291468;var _0x434088,_0x5573ef,_0x430ec1,_0x4cb245;const _0x4d8cbc=(_0x434088=this[_0x3d40ab(0x120)][_0x3d40ab(0x129)](_0x4220ac[_0x3d40ab(0x10a)])[_0x3d40ab(0xe8)](_0x262d37=>_0x262d37[_0x3d40ab(0xf5)]===_0x4220ac[_0x3d40ab(0xf5)]))==null?void 0x0:_0x434088[_0x3d40ab(0x13e)];if(!_0x4d8cbc)return;const {unitId:_0x3343c7,subUnitId:_0xc3c71c}=_0x4d8cbc;switch(_0x4220ac[_0x3d40ab(0x131)]&&this[_0x3d40ab(0x10c)][_0x3d40ab(0x132)](_0x4220ac[_0x3d40ab(0x131)]),_0x4220ac[_0x3d40ab(0xff)]){case v['Add']:break;case v['Reply']:{this[_0x3d40ab(0x120)][_0x3d40ab(0xed)](_0x3343c7,_0xc3c71c,{'unitId':_0x3343c7,'subUnitId':_0xc3c71c,'ref':'','id':_0x4220ac[_0x3d40ab(0x116)],'dT':y(+_0x4220ac[_0x3d40ab(0x106)]),'threadId':_0x4220ac['threadId'],'personId':(_0x430ec1=(_0x5573ef=_0x4220ac[_0x3d40ab(0x131)])==null?void 0x0:_0x5573ef[_0x3d40ab(0x104)])!=null?_0x430ec1:_0x4220ac[_0x3d40ab(0x119)],'text':JSON[_0x3d40ab(0x10e)](_0x4220ac[_0x3d40ab(0x144)]),'parentId':_0x4d8cbc['id']});break;}case v[_0x3d40ab(0x11f)]:{const _0x443f15=this['_threadCommentModel'][_0x3d40ab(0x103)](_0x3343c7,_0xc3c71c,_0x4220ac[_0x3d40ab(0x116)]);_0x443f15&&_0x443f15[_0x3d40ab(0x117)]&&this['_threadCommentModel'][_0x3d40ab(0x11a)](_0x3343c7,_0xc3c71c,_0x4220ac['replyId']);break;}case v[_0x3d40ab(0x143)]:{this[_0x3d40ab(0x120)][_0x3d40ab(0xec)](_0x3343c7,_0xc3c71c,{'commentId':_0x4220ac[_0x3d40ab(0x116)],'text':JSON[_0x3d40ab(0x10e)](_0x4220ac[_0x3d40ab(0x144)])});break;}case v[_0x3d40ab(0x114)]:{const _0x4e1a98=(_0x4cb245=this['_threadCommentModel'][_0x3d40ab(0x129)](_0x4220ac[_0x3d40ab(0x10a)])[_0x3d40ab(0xe8)](_0x456ba5=>_0x456ba5[_0x3d40ab(0xf5)]===_0x4220ac[_0x3d40ab(0xf5)]))==null?void 0x0:_0x4cb245[_0x3d40ab(0x13e)];_0x4e1a98&&this['_threadCommentModel']['resolveComment'](_0x3343c7,_0xc3c71c,_0x4e1a98['id'],_0x4220ac[_0x3d40ab(0xfd)]===I[_0x3d40ab(0xf2)]);break;}}}));}};_=V([p(0x0,_0x456bc0(_0x41b3b3)),p(0x1,_0x456bc0(_0x8816bb)),p(0x2,_0x456bc0(_0x4a7b0a)),p(0x3,_0x456bc0(_0x3ea938))],_);const z=_0x2c6192(0x112),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1d9e33,_0x42949c,_0xcaf546,_0x12acea)=>{const _0x1969f7=_0x2c6192;for(var _0x1b13b5=_0x12acea>0x1?void 0x0:_0x12acea?k(_0x42949c,_0xcaf546):_0x42949c,_0x3fc7ca=_0x1d9e33[_0x1969f7(0xf4)]-0x1,_0x5d3752;_0x3fc7ca>=0x0;_0x3fc7ca--)(_0x5d3752=_0x1d9e33[_0x3fc7ca])&&(_0x1b13b5=_0x5d3752(_0x1b13b5)||_0x1b13b5);return _0x1b13b5;},b=(_0x24c94a,_0x1e6b2f)=>(_0x5186e8,_0x55185d)=>_0x1e6b2f(_0x5186e8,_0x55185d,_0x24c94a);function X(_0x34b79b,_0x38d265){const _0x6b32f7=_0x2c6192,_0x548fa8=_0x34b79b[_0x6b32f7(0x127)][0x0];return{..._0x38d265,'id':_0x548fa8[_0x6b32f7(0x116)],'resolved':_0x34b79b[_0x6b32f7(0xfd)]===0x1,'dT':y(_0x548fa8[_0x6b32f7(0x106)]),'personId':_0x548fa8[_0x6b32f7(0x119)],'threadId':_0x548fa8[_0x6b32f7(0xf5)]};}function ee(_0x4ac389,_0x29471f,_0x1f6156){const _0x2068d9=_0x2c6192;var _0x56c8d7,_0x3248f6;if(((_0x3248f6=(_0x56c8d7=_0x4ac389==null?void 0x0:_0x4ac389[_0x2068d9(0x127)])==null?void 0x0:_0x56c8d7[_0x2068d9(0xf4)])!=null?_0x3248f6:0x0)>0x0){const _0x5066d6=(_0xf096fc,_0x203f09)=>({'id':_0xf096fc[_0x2068d9(0x116)],'threadId':_0xf096fc[_0x2068d9(0xf5)],'dT':y(_0xf096fc[_0x2068d9(0x106)]),'personId':_0xf096fc[_0x2068d9(0x119)],'resolved':_0x4ac389[_0x2068d9(0xfd)]===I[_0x2068d9(0xf2)],'unitId':_0x29471f,'subUnitId':_0x1f6156,'text':JSON[_0x2068d9(0x10e)](_0xf096fc[_0x2068d9(0x144)]),'parentId':_0x203f09}),_0x4d5b0c=_0x5066d6(_0x4ac389[_0x2068d9(0x127)][0x0]);return{..._0x4d5b0c,'children':_0x4ac389[_0x2068d9(0x127)][_0x2068d9(0x11c)](0x1)['map'](_0x2102d5=>_0x5066d6(_0x2102d5,_0x4d5b0c['id']))};}return null;}let S=class{constructor(_0x94668e,_0x6e30b,_0x5507b7){const _0x3310d4=_0x2c6192;this[_0x3310d4(0xeb)]=_0x94668e,this[_0x3310d4(0x10c)]=_0x6e30b,this['_sessionService']=_0x5507b7;}async[_0x2c6192(0xed)](_0x2d871c){const _0x1efe27=_0x2c6192;var _0x26e8e3,_0x18578c;const {parentId:_0x439026,unitId:_0x4de833,text:_0x10487e,threadId:_0x3141fe}=_0x2d871c,_0x599310=(_0x18578c=(_0x26e8e3=_0x10487e[_0x1efe27(0x11b)])==null?void 0x0:_0x26e8e3[_0x1efe27(0x13f)](_0x5af6b0=>_0x5af6b0[_0x1efe27(0x14c)]===_0x4ea2eb[_0x1efe27(0x107)])[_0x1efe27(0x101)](_0x4e95a3=>_0x4e95a3[_0x1efe27(0xe9)]))!=null?_0x18578c:[],_0x5ade3f=JSON[_0x1efe27(0x140)](_0x10487e),_0x225012=(await this[_0x1efe27(0xfb)][_0x1efe27(0x149)](_0x4de833))[_0x1efe27(0x121)]();if(_0x439026){const _0x50f06b={'memberId':_0x225012,'unitId':_0x4de833,'content':_0x5ade3f,'mention':_0x599310,'threadId':_0x3141fe},_0x2b99ea=(await this[_0x1efe27(0xeb)][_0x1efe27(0xf9)](_0x1efe27(0x148)+_0x4de833+_0x1efe27(0x108),{'body':_0x50f06b}))[_0x1efe27(0xe6)]['reply'];return{..._0x2d871c,'id':_0x2b99ea[_0x1efe27(0x116)],'dT':_0x467eaf(+_0x2b99ea['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x2b99ea['userId']};}else{const _0x17997c={'memberId':_0x225012,'unitId':_0x4de833,'content':_0x5ade3f,'mention':_0x599310},_0x52166a=await this[_0x1efe27(0xeb)][_0x1efe27(0xf9)](_0x1efe27(0x148)+_0x4de833+_0x1efe27(0xf7),{'body':_0x17997c});return X(_0x52166a['body'][_0x1efe27(0xef)],_0x2d871c);}}async['updateComment'](_0x170f0e){const _0x52f2ab=_0x2c6192;var _0x14dabc,_0x20c4ea;const {text:_0x32163e,unitId:_0x676789}=_0x170f0e,_0x238a20=(_0x20c4ea=(_0x14dabc=_0x32163e['customRanges'])==null?void 0x0:_0x14dabc[_0x52f2ab(0x13f)](_0xad761=>_0xad761[_0x52f2ab(0x14c)]===_0x4ea2eb[_0x52f2ab(0x107)])['map'](_0x3c9667=>_0x3c9667[_0x52f2ab(0xe9)]))!=null?_0x20c4ea:[],_0x15b254=JSON[_0x52f2ab(0x140)](_0x32163e),_0x5aa8ba=_0x170f0e[_0x52f2ab(0xf5)],_0x1af6e5=_0x170f0e['id'],_0x591e13={'memberId':(await this['_sessionService'][_0x52f2ab(0x149)](_0x676789))[_0x52f2ab(0x121)](),'unitId':_0x676789,'threadId':_0x5aa8ba,'mention':_0x238a20,'content':_0x15b254,'replyId':_0x1af6e5},_0x4728e4=await this[_0x52f2ab(0xeb)][_0x52f2ab(0xf9)]('/universer-api/comment/unit/'+_0x676789+_0x52f2ab(0x115),{'body':_0x591e13});return!_0x4728e4[_0x52f2ab(0xe6)][_0x52f2ab(0x118)]||_0x4728e4[_0x52f2ab(0xe6)][_0x52f2ab(0x118)][_0x52f2ab(0x109)]===0x1;}async[_0x2c6192(0x11e)](_0x3c87a1){const _0x17fbb8=_0x2c6192,{unitId:_0x29b19c}=_0x3c87a1,_0x46c644=_0x3c87a1[_0x17fbb8(0xf5)],_0x18a29f={'memberId':this[_0x17fbb8(0x10c)][_0x17fbb8(0xf6)]()[_0x17fbb8(0x104)],'unitId':_0x29b19c,'threadId':_0x46c644,'solved':_0x3c87a1[_0x17fbb8(0xf8)]?I['Solved']:I[_0x17fbb8(0x125)]},_0x242433=await this['_httpService'][_0x17fbb8(0xf9)]('/universer-api/comment/unit/'+_0x29b19c+_0x17fbb8(0x135),{'body':_0x18a29f});return!_0x242433[_0x17fbb8(0xe6)][_0x17fbb8(0x118)]||_0x242433[_0x17fbb8(0xe6)][_0x17fbb8(0x118)]['code']===0x1;}async['deleteComment'](_0x38c03e,_0x2302c5,_0x2ed212,_0x55e9b1){const _0x3f9769=_0x2c6192,_0x4c1017={'memberId':(await this[_0x3f9769(0xfb)][_0x3f9769(0x149)](_0x38c03e))['getMemberID'](),'threadId':_0x2ed212,'replyId':_0x55e9b1,'unitId':_0x38c03e},_0x22bfcd=await this[_0x3f9769(0xeb)][_0x3f9769(0xf9)](_0x3f9769(0x148)+_0x38c03e+_0x3f9769(0x137),{'body':_0x4c1017});return!_0x22bfcd['body'][_0x3f9769(0x118)]||_0x22bfcd[_0x3f9769(0xe6)][_0x3f9769(0x118)][_0x3f9769(0x109)]===0x1;}async['listComments'](_0x3a9339,_0x2f40e1,_0xbd02c1){const _0x269639=_0x2c6192,_0x4c06e4={'unitId':_0x3a9339,'threadId':_0xbd02c1},_0x2232b3=await this[_0x269639(0xeb)]['post']('/universer-api/comment/unit/'+_0x3a9339+_0x269639(0x12a),{'body':_0x4c06e4}),_0x72e265=_0xbd02c1[_0x269639(0x101)](_0x5e9da1=>ee(_0x2232b3[_0x269639(0xe6)]['comments'][_0x5e9da1],_0x3a9339,_0x2f40e1))[_0x269639(0x13f)](Boolean);return Object['values'](_0x2232b3[_0x269639(0xe6)]['users'])['forEach'](_0x374944=>{const _0x5adf7b=_0x269639;this[_0x5adf7b(0x10c)][_0x5adf7b(0x132)](_0x374944);}),_0x72e265;}[_0x2c6192(0x13c)](_0x36259c){return{'id':_0x36259c['id'],'threadId':_0x36259c['threadId'],'ref':_0x36259c['ref']};}};S=Q([b(0x0,_0x456bc0(_0x75c698)),b(0x1,_0x456bc0(_0x4a7b0a)),b(0x2,_0x456bc0(_0x383878))],S);var re=Object[_0x2c6192(0x14b)],te=(_0x13ab35,_0x295903,_0x42a7f5,_0x2c3d6e)=>{for(var _0x5bcc98=_0x2c3d6e>0x1?void 0x0:_0x2c3d6e?re(_0x295903,_0x42a7f5):_0x295903,_0x1e39d5=_0x13ab35['length']-0x1,_0x510ba0;_0x1e39d5>=0x0;_0x1e39d5--)(_0x510ba0=_0x13ab35[_0x1e39d5])&&(_0x5bcc98=_0x510ba0(_0x5bcc98)||_0x5bcc98);return _0x5bcc98;},M=(_0x21d752,_0x40e211)=>(_0x196a8d,_0x5f0eb7)=>_0x40e211(_0x196a8d,_0x5f0eb7,_0x21d752);let f=class extends _0x1d3d60{constructor(_0x45342f,_0xfa11ec){const _0x3a7fc4=_0x2c6192;super(),this[_0x3a7fc4(0x12b)]=_0x45342f,this[_0x3a7fc4(0x14d)]=_0xfa11ec,this['_initDataSource']();}[_0x2c6192(0x142)](){const _0x22589e=_0x2c6192;this[_0x22589e(0x12b)][_0x22589e(0xf0)]=this[_0x22589e(0x14d)],this[_0x22589e(0x12b)][_0x22589e(0x141)]=!0x1;}};f=te([M(0x0,_0x2e8119),M(0x1,_0x456bc0(S))],f);var se=Object['defineProperty'],oe=Object[_0x2c6192(0x14b)],ne=(_0xb20337,_0x7d5553,_0x21ee0e)=>_0x7d5553 in _0xb20337?se(_0xb20337,_0x7d5553,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x21ee0e}):_0xb20337[_0x7d5553]=_0x21ee0e,ie=(_0x226092,_0xf4bef2,_0x64a980,_0x2ae7d5)=>{const _0x153b5b=_0x2c6192;for(var _0x42a8c2=_0x2ae7d5>0x1?void 0x0:_0x2ae7d5?oe(_0xf4bef2,_0x64a980):_0xf4bef2,_0x4f368e=_0x226092[_0x153b5b(0xf4)]-0x1,_0x345cb1;_0x4f368e>=0x0;_0x4f368e--)(_0x345cb1=_0x226092[_0x4f368e])&&(_0x42a8c2=_0x345cb1(_0x42a8c2)||_0x42a8c2);return _0x42a8c2;},N=(_0x2721ba,_0x152e1c)=>(_0x40bd89,_0x252b4c)=>_0x152e1c(_0x40bd89,_0x252b4c,_0x2721ba),$=(_0x4a041d,_0x52a9c0,_0x4e19ae)=>ne(_0x4a041d,typeof _0x52a9c0!=_0x2c6192(0x128)?_0x52a9c0+'':_0x52a9c0,_0x4e19ae);let g=class extends _0xe039a3{constructor(_0x4e2929=O,_0x51dd18,_0x245b5c){const _0x594f3c=_0x2c6192;super(),this[_0x594f3c(0x102)]=_0x4e2929,this[_0x594f3c(0x14a)]=_0x51dd18,this[_0x594f3c(0x13a)]=_0x245b5c;const {..._0x195f0a}=_0x5c49b5({},O,this[_0x594f3c(0x102)]);this[_0x594f3c(0x13a)][_0x594f3c(0x13b)](z,_0x195f0a);}['onStarting'](){const _0x44b3af=_0x2c6192;[[S],[f],[_]][_0x44b3af(0x136)](_0x5abfde=>{const _0x47fc87=_0x44b3af;this[_0x47fc87(0x14a)][_0x47fc87(0x11d)](_0x5abfde);});}[_0x2c6192(0x123)](){const _0x2cd597=_0x2c6192;this[_0x2cd597(0x14a)][_0x2cd597(0x10f)](f),this[_0x2cd597(0x14a)]['get'](_);}};$(g,'pluginName',W),$(g,_0x2c6192(0xff),_0x59ce6a[_0x2c6192(0x13d)]),g=ie([_0x382d7b(_0x5af108,_0x381338,_0x57d8a2),N(0x1,_0x456bc0(_0x3ea938)),N(0x2,_0x1b12f1)],g);export{g as UniverThreadCommentDataSourcePlugin};function _0x4376(){const _0x50f6a0=['users','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','requireSession','_injector','getOwnPropertyDescriptor','rangeType','_threadCommentDataSource','body','1140OKkdcQ','find','rangeId','Unknown','_httpService','updateComment','addComment','delete','comment','dataSource','4066843mQEscJ','Solved','592kCMtHe','length','threadId','getCurrentUser','/add','resolved','post','109692YksFTw','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','750270BbsWMn','type','38432qrgzeD','map','_config','getComment','userID','getUser','createTimestamp','COMMENT','/reply','code','unitId','format','_userService','personId','parse','get','pipe','commentUpdate$','thread-comment-data-source.config','_commentService','Solve','/edit','replyId','parentId','error','userId','deleteComment','customRanges','slice','add','resolveComment','Delete','_threadCommentModel','getMemberID','subscribe','onReady','28085434aqIrCM','OpenOrReOpen','Add','replies','symbol','getUnit','/list','_threadCommentDataSourceService','12ykPgzg','Reply','228cYeZlx','_initUserSync','30gnSfPQ','user','addUser','UNRECOGNIZED','_init','/solved','forEach','/delete','26936UaCPPA','56klzanT','_configService','setConfig','saveCommentToSnapshot','UNIVER_UNKNOWN','root','filter','stringify','syncUpdateMutationToColla','_initDataSource','Edit','content','4408dyaCMk'];_0x4376=function(){return _0x50f6a0;};return _0x4376();}
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x531e(_0x11f09a,_0x1c2815){const _0x31f2a5=_0x31f2();return _0x531e=function(_0x531e6f,_0x2cf021){_0x531e6f=_0x531e6f-0x164;let _0x267329=_0x31f2a5[_0x531e6f];return _0x267329;},_0x531e(_0x11f09a,_0x1c2815);}function _0x31f2(){const _0x148c2f=['Disposable','Reply','values','userId','delete','_init','rangeType','stringify','82110fzyBQw','UniverProCollaborationClient','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','pluginName','@univerjs/thread-comment','_injector','content','addUser','replies','thread-comment-data-source.config','rxjs','COMMENT','toStringTag','symbol','amd','/edit','syncUpdateMutationToColla','6435304ocKvyU','UniverThreadComment','function','3654189xOfFcl','get','getMemberID','threadId','type','_threadCommentDataSourceService','parse','dayjs','disposeWithMe','customRanges','saveCommentToSnapshot','getCurrentUser','4208118fmDJmf','6033935UgBFlq','UniverThreadCommentUIPlugin','UniverProThreadCommentDatasource','createTimestamp','UniverThreadCommentDataSourcePlugin','root','CustomRangeType','getUser','unitId','ThreadCommentModel','replyId','Plugin','UNRECOGNIZED','IThreadCommentDataSourceService','commentUpdate$','Unknown','_userService','users','IConfigService','user','Solve','listComments','solved','personId','/universer-api/comment/unit/','setConfig','/add','deleteComment','onReady','Add','userID','14228262Giappk','map','YYYY/MM/DD\x20HH:mm','post','subscribe','add','ref','Edit','forEach','4STaVSJ','/reply','OpenOrReOpen','HTTPService','/universer-api/user/list','_threadCommentModel','@univerjs-pro/collaboration-client','resolved','addComment','pipe','UniverLicensePlugin','_config','_httpService','12XZZefn','UserManagerService','_initUserSync','@univerjs-pro/license','defineProperty','/solved','_threadCommentDataSource','Solved','filter','_commentService','1249523dAfPSt','format','UniverNetwork','getUnit','resolveComment','length','reply','size','rangeId','comment','merge','bufferTime','UNIVER_UNKNOWN','CommentService','code','@univerjs/core','parentId','object','CollaborationSessionService','_configService','find','error','getOwnPropertyDescriptor','onStarting','_sessionService','_initDataSource','requireSession','DependentOn','Injector','Inject','UniverInstanceType','body','slice','updateComment'];_0x31f2=function(){return _0x148c2f;};return _0x31f2();}(function(_0x3580a0,_0x5ebb89){const _0x3ab3e5=_0x531e,_0x5e791e=_0x3580a0();while(!![]){try{const _0x59ed77=parseInt(_0x3ab3e5(0x1b0))/0x1+-parseInt(_0x3ab3e5(0x1da))/0x2+-parseInt(_0x3ab3e5(0x170))/0x3*(parseInt(_0x3ab3e5(0x199))/0x4)+parseInt(_0x3ab3e5(0x171))/0x5+-parseInt(_0x3ab3e5(0x1a6))/0x6*(parseInt(_0x3ab3e5(0x164))/0x7)+-parseInt(_0x3ab3e5(0x1ec))/0x8+parseInt(_0x3ab3e5(0x190))/0x9;if(_0x59ed77===_0x5ebb89)break;else _0x5e791e['push'](_0x5e791e['shift']());}catch(_0x579d5c){_0x5e791e['push'](_0x5e791e['shift']());}}}(_0x31f2,0xb5e28),function(_0x2f98bd,_0x4bc9cd){const _0x56475a=_0x531e;typeof exports==_0x56475a(0x1c1)&&typeof module<'u'?_0x4bc9cd(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x56475a(0x1ee)&&define[_0x56475a(0x1e9)]?define(['exports',_0x56475a(0x19f),_0x56475a(0x1a9),_0x56475a(0x1bf),'@univerjs/thread-comment-ui',_0x56475a(0x1df),_0x56475a(0x1e5),'@univerjs/network'],_0x4bc9cd):(_0x2f98bd=typeof globalThis<'u'?globalThis:_0x2f98bd||self,_0x4bc9cd(_0x2f98bd[_0x56475a(0x173)]={},_0x2f98bd[_0x56475a(0x1db)],_0x2f98bd['UniverProLicense'],_0x2f98bd['UniverCore'],_0x2f98bd['UniverThreadCommentUi'],_0x2f98bd[_0x56475a(0x1ed)],_0x2f98bd['rxjs'],_0x2f98bd[_0x56475a(0x1b2)]));}(this,function(_0x5b48c7,_0x470d10,_0x1ed3ec,_0x5e7100,_0x383fea,_0x4c2b6e,_0x5475ba,_0x407610){'use strict';const _0xf3c7d4=_0x531e;const _0xaafc86=_0xf3c7d4(0x1dc);var _0x2b17c2=(_0x5907a1=>(_0x5907a1[_0x5907a1[_0xf3c7d4(0x19b)]=0x0]='OpenOrReOpen',_0x5907a1[_0x5907a1[_0xf3c7d4(0x1ad)]=0x1]='Solved',_0x5907a1[_0x5907a1['UNRECOGNIZED']=-0x1]=_0xf3c7d4(0x17d),_0x5907a1))(_0x2b17c2||{}),_0x2c2130=(_0x50f800=>(_0x50f800[_0x50f800[_0xf3c7d4(0x180)]=0x0]=_0xf3c7d4(0x180),_0x50f800[_0x50f800[_0xf3c7d4(0x18e)]=0x1]=_0xf3c7d4(0x18e),_0x50f800[_0x50f800['Reply']=0x2]='Reply',_0x50f800[_0x50f800['Edit']=0x3]=_0xf3c7d4(0x197),_0x50f800[_0x50f800[_0xf3c7d4(0x1dd)]=0x4]='Delete',_0x50f800[_0x50f800[_0xf3c7d4(0x185)]=0x5]=_0xf3c7d4(0x185),_0x50f800[_0x50f800[_0xf3c7d4(0x17d)]=-0x1]='UNRECOGNIZED',_0x50f800))(_0x2c2130||{});const _0x40551a=_0xa49850=>_0x5e7100['dayjs'](new Date(+_0xa49850))[_0xf3c7d4(0x1b1)]('YYYY/MM/DD\x20HH:mm'),_0x49e072=async(_0xccce41,_0x43fd96)=>{const _0x2e0f1a=_0xf3c7d4,_0x4019f4=_0xccce41[_0x2e0f1a(0x165)](_0x5e7100['UserManagerService']),_0x3b9918=_0xccce41[_0x2e0f1a(0x165)](_0x407610['HTTPService']);_0x43fd96[_0x2e0f1a(0x198)](_0x395de1=>{const _0x4ba982=_0x2e0f1a;_0x4019f4[_0x4ba982(0x178)](_0x395de1)&&_0x43fd96[_0x4ba982(0x1d6)](_0x395de1);}),_0x43fd96[_0x2e0f1a(0x1b7)]&&(await _0x3b9918[_0x2e0f1a(0x165)](_0x2e0f1a(0x19d),{'params':{'userIDs':[..._0x43fd96]}}))['body']['users']['forEach'](_0x40b26b=>{_0x40b26b&&_0x4019f4['addUser'](_0x40b26b);});};var _0x1aadea=Object[_0xf3c7d4(0x1c6)],_0x40d312=(_0x3c8d19,_0x1b0eeb,_0x59357a,_0x57d297)=>{const _0x251c48=_0xf3c7d4;for(var _0x2da6fc=_0x57d297>0x1?void 0x0:_0x57d297?_0x1aadea(_0x1b0eeb,_0x59357a):_0x1b0eeb,_0x2ae512=_0x3c8d19[_0x251c48(0x1b5)]-0x1,_0x34eef1;_0x2ae512>=0x0;_0x2ae512--)(_0x34eef1=_0x3c8d19[_0x2ae512])&&(_0x2da6fc=_0x34eef1(_0x2da6fc)||_0x2da6fc);return _0x2da6fc;},_0x1a9ad0=(_0x33d87d,_0x5052dd)=>(_0x50540f,_0x122908)=>_0x5052dd(_0x50540f,_0x122908,_0x33d87d);let _0x6554da=class extends _0x5e7100[_0xf3c7d4(0x1d2)]{constructor(_0x45b31c,_0x4f531c,_0x1979d6,_0x2f165d){const _0x5f141f=_0xf3c7d4;super(),this[_0x5f141f(0x1af)]=_0x45b31c,this['_threadCommentModel']=_0x4f531c,this[_0x5f141f(0x181)]=_0x1979d6,this[_0x5f141f(0x1e0)]=_0x2f165d,this[_0x5f141f(0x1d7)](),this[_0x5f141f(0x1a8)]();}['_initUserSync'](){const _0x61c896=_0xf3c7d4;this[_0x61c896(0x16c)](this['_threadCommentModel'][_0x61c896(0x17f)][_0x61c896(0x1a2)](_0x5475ba[_0x61c896(0x1bb)](0x10))[_0x61c896(0x194)](_0x2d896b=>{const _0x495cee=_0x61c896,_0x10f326=new Set();_0x2d896b['forEach'](_0x1fd75c=>{const _0x1ff142=_0x531e;switch(_0x1fd75c[_0x1ff142(0x168)]){case'add':{const _0x396edc=_0x1fd75c['payload'][_0x1ff142(0x188)];_0x10f326[_0x1ff142(0x195)](_0x396edc);break;}}}),_0x49e072(this[_0x495cee(0x1e0)],_0x10f326);}));}[_0xf3c7d4(0x1d7)](){const _0xeb5798=_0xf3c7d4;this[_0xeb5798(0x16c)](this[_0xeb5798(0x1af)][_0xeb5798(0x17f)][_0xeb5798(0x194)](async _0x27b9ee=>{const _0x4ec71d=_0xeb5798;var _0x12ca04,_0x4542a7,_0x3d3061,_0x2907e8;const _0x461e08=(_0x12ca04=this[_0x4ec71d(0x19e)][_0x4ec71d(0x1b3)](_0x27b9ee[_0x4ec71d(0x179)])[_0x4ec71d(0x1c4)](_0x4ee6d1=>_0x4ee6d1[_0x4ec71d(0x167)]===_0x27b9ee[_0x4ec71d(0x167)]))==null?void 0x0:_0x12ca04['root'];if(!_0x461e08)return;const {unitId:_0x437311,subUnitId:_0x169f0a}=_0x461e08;switch(_0x27b9ee[_0x4ec71d(0x184)]&&this[_0x4ec71d(0x181)][_0x4ec71d(0x1e2)](_0x27b9ee[_0x4ec71d(0x184)]),_0x27b9ee[_0x4ec71d(0x168)]){case _0x2c2130[_0x4ec71d(0x18e)]:break;case _0x2c2130[_0x4ec71d(0x1d3)]:{this[_0x4ec71d(0x19e)]['addComment'](_0x437311,_0x169f0a,{'unitId':_0x437311,'subUnitId':_0x169f0a,'ref':'','id':_0x27b9ee[_0x4ec71d(0x17b)],'dT':_0x40551a(+_0x27b9ee['createTimestamp']),'threadId':_0x27b9ee[_0x4ec71d(0x167)],'personId':(_0x3d3061=(_0x4542a7=_0x27b9ee[_0x4ec71d(0x184)])==null?void 0x0:_0x4542a7[_0x4ec71d(0x18f)])!=null?_0x3d3061:_0x27b9ee[_0x4ec71d(0x1d5)],'text':JSON['parse'](_0x27b9ee[_0x4ec71d(0x1e1)]),'parentId':_0x461e08['id']});break;}case _0x2c2130[_0x4ec71d(0x1dd)]:{const _0x6af85c=this[_0x4ec71d(0x19e)]['getComment'](_0x437311,_0x169f0a,_0x27b9ee[_0x4ec71d(0x17b)]);_0x6af85c&&_0x6af85c[_0x4ec71d(0x1c0)]&&this[_0x4ec71d(0x19e)][_0x4ec71d(0x18c)](_0x437311,_0x169f0a,_0x27b9ee['replyId']);break;}case _0x2c2130[_0x4ec71d(0x197)]:{this[_0x4ec71d(0x19e)][_0x4ec71d(0x1d1)](_0x437311,_0x169f0a,{'commentId':_0x27b9ee['replyId'],'text':JSON[_0x4ec71d(0x16a)](_0x27b9ee[_0x4ec71d(0x1e1)])});break;}case _0x2c2130[_0x4ec71d(0x185)]:{const _0x166ca7=(_0x2907e8=this[_0x4ec71d(0x19e)][_0x4ec71d(0x1b3)](_0x27b9ee[_0x4ec71d(0x179)])[_0x4ec71d(0x1c4)](_0x20adcf=>_0x20adcf[_0x4ec71d(0x167)]===_0x27b9ee[_0x4ec71d(0x167)]))==null?void 0x0:_0x2907e8[_0x4ec71d(0x176)];_0x166ca7&&this[_0x4ec71d(0x19e)]['resolveComment'](_0x437311,_0x169f0a,_0x166ca7['id'],_0x27b9ee['solved']===_0x2b17c2[_0x4ec71d(0x1ad)]);break;}}}));}};_0x6554da=_0x40d312([_0x1a9ad0(0x0,_0x5e7100[_0xf3c7d4(0x1cd)](_0x470d10[_0xf3c7d4(0x1bd)])),_0x1a9ad0(0x1,_0x5e7100[_0xf3c7d4(0x1cd)](_0x4c2b6e[_0xf3c7d4(0x17a)])),_0x1a9ad0(0x2,_0x5e7100[_0xf3c7d4(0x1cd)](_0x5e7100[_0xf3c7d4(0x1a7)])),_0x1a9ad0(0x3,_0x5e7100['Inject'](_0x5e7100[_0xf3c7d4(0x1cc)]))],_0x6554da);const _0x219bc2=_0xf3c7d4(0x1e4),_0x4fc848={};var _0x318725=Object['getOwnPropertyDescriptor'],_0x1bb774=(_0x4bfcbf,_0x1ee5ca,_0x26b75f,_0x370100)=>{const _0xde1b31=_0xf3c7d4;for(var _0x5a9051=_0x370100>0x1?void 0x0:_0x370100?_0x318725(_0x1ee5ca,_0x26b75f):_0x1ee5ca,_0x2c10d2=_0x4bfcbf[_0xde1b31(0x1b5)]-0x1,_0x26ba28;_0x2c10d2>=0x0;_0x2c10d2--)(_0x26ba28=_0x4bfcbf[_0x2c10d2])&&(_0x5a9051=_0x26ba28(_0x5a9051)||_0x5a9051);return _0x5a9051;},_0x1e4f59=(_0x2eea14,_0x11d3d2)=>(_0xc7abfb,_0x54747e)=>_0x11d3d2(_0xc7abfb,_0x54747e,_0x2eea14);function _0x58c8a1(_0x2ca804,_0x479009){const _0xd77a84=_0xf3c7d4,_0x1a3f26=_0x2ca804['replies'][0x0];return{..._0x479009,'id':_0x1a3f26['replyId'],'resolved':_0x2ca804[_0xd77a84(0x187)]===0x1,'dT':_0x40551a(_0x1a3f26[_0xd77a84(0x174)]),'personId':_0x1a3f26['userId'],'threadId':_0x1a3f26[_0xd77a84(0x167)]};}function _0x337c7d(_0x1b7738,_0x458be8,_0x455e18){const _0x132e8a=_0xf3c7d4;var _0x1ab6db,_0x312559;if(((_0x312559=(_0x1ab6db=_0x1b7738==null?void 0x0:_0x1b7738['replies'])==null?void 0x0:_0x1ab6db[_0x132e8a(0x1b5)])!=null?_0x312559:0x0)>0x0){const _0x2a9c4e=(_0x1fbd0b,_0x59a172)=>({'id':_0x1fbd0b[_0x132e8a(0x17b)],'threadId':_0x1fbd0b[_0x132e8a(0x167)],'dT':_0x40551a(_0x1fbd0b[_0x132e8a(0x174)]),'personId':_0x1fbd0b[_0x132e8a(0x1d5)],'resolved':_0x1b7738[_0x132e8a(0x187)]===_0x2b17c2[_0x132e8a(0x1ad)],'unitId':_0x458be8,'subUnitId':_0x455e18,'text':JSON['parse'](_0x1fbd0b[_0x132e8a(0x1e1)]),'parentId':_0x59a172}),_0x5739dc=_0x2a9c4e(_0x1b7738['replies'][0x0]);return{..._0x5739dc,'children':_0x1b7738[_0x132e8a(0x1e3)][_0x132e8a(0x1d0)](0x1)[_0x132e8a(0x191)](_0x5b73b9=>_0x2a9c4e(_0x5b73b9,_0x5739dc['id']))};}return null;}let _0x42bb4d=class{constructor(_0x194449,_0x2b1b88,_0x190827){const _0x209a96=_0xf3c7d4;this['_httpService']=_0x194449,this['_userService']=_0x2b1b88,this[_0x209a96(0x1c8)]=_0x190827;}async[_0xf3c7d4(0x1a1)](_0x280407){const _0x28d1b7=_0xf3c7d4;var _0x4b15ad,_0x237154;const {parentId:_0x2261d7,unitId:_0x525d49,text:_0x474ee1,threadId:_0x2c3fcd}=_0x280407,_0xb820b=(_0x237154=(_0x4b15ad=_0x474ee1[_0x28d1b7(0x16d)])==null?void 0x0:_0x4b15ad[_0x28d1b7(0x1ae)](_0x3f60a5=>_0x3f60a5[_0x28d1b7(0x1d8)]===_0x5e7100[_0x28d1b7(0x177)][_0x28d1b7(0x1e6)])[_0x28d1b7(0x191)](_0x40b87f=>_0x40b87f[_0x28d1b7(0x1b8)]))!=null?_0x237154:[],_0xf21d57=JSON[_0x28d1b7(0x1d9)](_0x474ee1),_0x15ec1c=(await this[_0x28d1b7(0x1c8)][_0x28d1b7(0x1ca)](_0x525d49))['getMemberID']();if(_0x2261d7){const _0x41489b={'memberId':_0x15ec1c,'unitId':_0x525d49,'content':_0xf21d57,'mention':_0xb820b,'threadId':_0x2c3fcd},_0x96e282=(await this[_0x28d1b7(0x1a5)]['post'](_0x28d1b7(0x189)+_0x525d49+_0x28d1b7(0x19a),{'body':_0x41489b}))[_0x28d1b7(0x1cf)][_0x28d1b7(0x1b6)];return{..._0x280407,'id':_0x96e282['replyId'],'dT':_0x5e7100[_0x28d1b7(0x16b)](+_0x96e282['createTimestamp'])[_0x28d1b7(0x1b1)](_0x28d1b7(0x192)),'personId':_0x96e282[_0x28d1b7(0x1d5)]};}else{const _0x3cd8d6={'memberId':_0x15ec1c,'unitId':_0x525d49,'content':_0xf21d57,'mention':_0xb820b},_0x4deb82=await this[_0x28d1b7(0x1a5)][_0x28d1b7(0x193)](_0x28d1b7(0x189)+_0x525d49+_0x28d1b7(0x18b),{'body':_0x3cd8d6});return _0x58c8a1(_0x4deb82[_0x28d1b7(0x1cf)][_0x28d1b7(0x1b9)],_0x280407);}}async[_0xf3c7d4(0x1d1)](_0x598c73){const _0x4a1564=_0xf3c7d4;var _0x15b336,_0x153afa;const {text:_0x972aa6,unitId:_0x1ad2a3}=_0x598c73,_0x6d66f7=(_0x153afa=(_0x15b336=_0x972aa6['customRanges'])==null?void 0x0:_0x15b336[_0x4a1564(0x1ae)](_0x141919=>_0x141919[_0x4a1564(0x1d8)]===_0x5e7100['CustomRangeType']['COMMENT'])[_0x4a1564(0x191)](_0x331791=>_0x331791[_0x4a1564(0x1b8)]))!=null?_0x153afa:[],_0x302e8f=JSON[_0x4a1564(0x1d9)](_0x972aa6),_0x3a437b=_0x598c73[_0x4a1564(0x167)],_0x262cc7=_0x598c73['id'],_0x58e24d={'memberId':(await this[_0x4a1564(0x1c8)]['requireSession'](_0x1ad2a3))[_0x4a1564(0x166)](),'unitId':_0x1ad2a3,'threadId':_0x3a437b,'mention':_0x6d66f7,'content':_0x302e8f,'replyId':_0x262cc7},_0x203487=await this[_0x4a1564(0x1a5)][_0x4a1564(0x193)]('/universer-api/comment/unit/'+_0x1ad2a3+_0x4a1564(0x1ea),{'body':_0x58e24d});return!_0x203487[_0x4a1564(0x1cf)]['error']||_0x203487[_0x4a1564(0x1cf)]['error'][_0x4a1564(0x1be)]===0x1;}async[_0xf3c7d4(0x1b4)](_0x44bf3){const _0x55ce98=_0xf3c7d4,{unitId:_0x1fba46}=_0x44bf3,_0x3019db=_0x44bf3['threadId'],_0x2948da={'memberId':this['_userService'][_0x55ce98(0x16f)]()[_0x55ce98(0x18f)],'unitId':_0x1fba46,'threadId':_0x3019db,'solved':_0x44bf3[_0x55ce98(0x1a0)]?_0x2b17c2['Solved']:_0x2b17c2[_0x55ce98(0x19b)]},_0x5cf8be=await this[_0x55ce98(0x1a5)][_0x55ce98(0x193)]('/universer-api/comment/unit/'+_0x1fba46+_0x55ce98(0x1ab),{'body':_0x2948da});return!_0x5cf8be[_0x55ce98(0x1cf)][_0x55ce98(0x1c5)]||_0x5cf8be[_0x55ce98(0x1cf)]['error'][_0x55ce98(0x1be)]===0x1;}async['deleteComment'](_0x5b8580,_0x2ed8f6,_0x39120c,_0x133a2e){const _0x5c5a3d=_0xf3c7d4,_0x9a2806={'memberId':(await this[_0x5c5a3d(0x1c8)]['requireSession'](_0x5b8580))[_0x5c5a3d(0x166)](),'threadId':_0x39120c,'replyId':_0x133a2e,'unitId':_0x5b8580},_0x2951eb=await this['_httpService'][_0x5c5a3d(0x193)](_0x5c5a3d(0x189)+_0x5b8580+'/delete',{'body':_0x9a2806});return!_0x2951eb[_0x5c5a3d(0x1cf)][_0x5c5a3d(0x1c5)]||_0x2951eb[_0x5c5a3d(0x1cf)]['error'][_0x5c5a3d(0x1be)]===0x1;}async[_0xf3c7d4(0x186)](_0x51821c,_0x25c947,_0x20e82f){const _0x5735e9=_0xf3c7d4,_0x39fe88={'unitId':_0x51821c,'threadId':_0x20e82f},_0x49ab25=await this[_0x5735e9(0x1a5)]['post']('/universer-api/comment/unit/'+_0x51821c+'/list',{'body':_0x39fe88}),_0x48ae00=_0x20e82f[_0x5735e9(0x191)](_0x26f163=>_0x337c7d(_0x49ab25[_0x5735e9(0x1cf)]['comments'][_0x26f163],_0x51821c,_0x25c947))[_0x5735e9(0x1ae)](Boolean);return Object[_0x5735e9(0x1d4)](_0x49ab25[_0x5735e9(0x1cf)][_0x5735e9(0x182)])['forEach'](_0x49967=>{const _0x19cfc6=_0x5735e9;this[_0x19cfc6(0x181)][_0x19cfc6(0x1e2)](_0x49967);}),_0x48ae00;}[_0xf3c7d4(0x16e)](_0x39c69c){const _0x5a14a9=_0xf3c7d4;return{'id':_0x39c69c['id'],'threadId':_0x39c69c[_0x5a14a9(0x167)],'ref':_0x39c69c[_0x5a14a9(0x196)]};}};_0x42bb4d=_0x1bb774([_0x1e4f59(0x0,_0x5e7100[_0xf3c7d4(0x1cd)](_0x407610[_0xf3c7d4(0x19c)])),_0x1e4f59(0x1,_0x5e7100['Inject'](_0x5e7100[_0xf3c7d4(0x1a7)])),_0x1e4f59(0x2,_0x5e7100[_0xf3c7d4(0x1cd)](_0x470d10[_0xf3c7d4(0x1c2)]))],_0x42bb4d);var _0x41fa43=Object[_0xf3c7d4(0x1c6)],_0xedbf09=(_0x40183d,_0x49dc06,_0x5edaf5,_0x1876b6)=>{const _0x270c30=_0xf3c7d4;for(var _0x173ad8=_0x1876b6>0x1?void 0x0:_0x1876b6?_0x41fa43(_0x49dc06,_0x5edaf5):_0x49dc06,_0x59a8c2=_0x40183d[_0x270c30(0x1b5)]-0x1,_0x23485f;_0x59a8c2>=0x0;_0x59a8c2--)(_0x23485f=_0x40183d[_0x59a8c2])&&(_0x173ad8=_0x23485f(_0x173ad8)||_0x173ad8);return _0x173ad8;},_0x314d24=(_0x3099ea,_0x378db6)=>(_0x5b3cc6,_0x28aee3)=>_0x378db6(_0x5b3cc6,_0x28aee3,_0x3099ea);let _0x160a28=class extends _0x5e7100[_0xf3c7d4(0x1d2)]{constructor(_0x2920af,_0x3e3135){const _0x74d45=_0xf3c7d4;super(),this[_0x74d45(0x169)]=_0x2920af,this[_0x74d45(0x1ac)]=_0x3e3135,this['_initDataSource']();}[_0xf3c7d4(0x1c9)](){const _0xad33b9=_0xf3c7d4;this[_0xad33b9(0x169)]['dataSource']=this[_0xad33b9(0x1ac)],this[_0xad33b9(0x169)][_0xad33b9(0x1eb)]=!0x1;}};_0x160a28=_0xedbf09([_0x314d24(0x0,_0x4c2b6e[_0xf3c7d4(0x17e)]),_0x314d24(0x1,_0x5e7100[_0xf3c7d4(0x1cd)](_0x42bb4d))],_0x160a28);var _0x31f8a1=Object['defineProperty'],_0x23a549=Object[_0xf3c7d4(0x1c6)],_0x5520c6=(_0x4ed928,_0x190503,_0xf98845)=>_0x190503 in _0x4ed928?_0x31f8a1(_0x4ed928,_0x190503,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf98845}):_0x4ed928[_0x190503]=_0xf98845,_0x8c300b=(_0x57b3b0,_0x40aa22,_0x2702fa,_0x2a340d)=>{const _0x179ad1=_0xf3c7d4;for(var _0x3823ff=_0x2a340d>0x1?void 0x0:_0x2a340d?_0x23a549(_0x40aa22,_0x2702fa):_0x40aa22,_0x43f75f=_0x57b3b0[_0x179ad1(0x1b5)]-0x1,_0x4c665c;_0x43f75f>=0x0;_0x43f75f--)(_0x4c665c=_0x57b3b0[_0x43f75f])&&(_0x3823ff=_0x4c665c(_0x3823ff)||_0x3823ff);return _0x3823ff;},_0x562052=(_0x2e86fb,_0x413577)=>(_0x1d8f72,_0x4da1eb)=>_0x413577(_0x1d8f72,_0x4da1eb,_0x2e86fb),_0x2507fa=(_0x48a3f0,_0x386b57,_0x1a188b)=>_0x5520c6(_0x48a3f0,typeof _0x386b57!=_0xf3c7d4(0x1e8)?_0x386b57+'':_0x386b57,_0x1a188b);_0x5b48c7[_0xf3c7d4(0x175)]=class extends _0x5e7100[_0xf3c7d4(0x17c)]{constructor(_0xba9962=_0x4fc848,_0x89cb44,_0x557549){const _0x366640=_0xf3c7d4;super(),this[_0x366640(0x1a4)]=_0xba9962,this[_0x366640(0x1e0)]=_0x89cb44,this[_0x366640(0x1c3)]=_0x557549;const {..._0x4e054f}=_0x5e7100[_0x366640(0x1ba)]({},_0x4fc848,this['_config']);this[_0x366640(0x1c3)][_0x366640(0x18a)](_0x219bc2,_0x4e054f);}[_0xf3c7d4(0x1c7)](){const _0xa724ad=_0xf3c7d4;[[_0x42bb4d],[_0x160a28],[_0x6554da]][_0xa724ad(0x198)](_0x33df5a=>{const _0x4e0dfa=_0xa724ad;this[_0x4e0dfa(0x1e0)][_0x4e0dfa(0x195)](_0x33df5a);});}[_0xf3c7d4(0x18d)](){const _0x36364e=_0xf3c7d4;this[_0x36364e(0x1e0)][_0x36364e(0x165)](_0x160a28),this[_0x36364e(0x1e0)]['get'](_0x6554da);}},_0x2507fa(_0x5b48c7['UniverThreadCommentDataSourcePlugin'],_0xf3c7d4(0x1de),_0xaafc86),_0x2507fa(_0x5b48c7['UniverThreadCommentDataSourcePlugin'],_0xf3c7d4(0x168),_0x5e7100[_0xf3c7d4(0x1ce)][_0xf3c7d4(0x1bc)]),_0x5b48c7[_0xf3c7d4(0x175)]=_0x8c300b([_0x5e7100[_0xf3c7d4(0x1cb)](_0x383fea[_0xf3c7d4(0x172)],_0x470d10['UniverCollaborationClientPlugin'],_0x1ed3ec[_0xf3c7d4(0x1a3)]),_0x562052(0x1,_0x5e7100[_0xf3c7d4(0x1cd)](_0x5e7100[_0xf3c7d4(0x1cc)])),_0x562052(0x2,_0x5e7100[_0xf3c7d4(0x183)])],_0x5b48c7[_0xf3c7d4(0x175)]),Object[_0xf3c7d4(0x1aa)](_0x5b48c7,Symbol[_0xf3c7d4(0x1e7)],{'value':'Module'});}));
|
|
1
|
+
function _0x22a6(_0x419804,_0xdee646){const _0x31cc1a=_0x31cc();return _0x22a6=function(_0x22a686,_0x304ef3){_0x22a686=_0x22a686-0xbf;let _0x5c7ff7=_0x31cc1a[_0x22a686];return _0x5c7ff7;},_0x22a6(_0x419804,_0xdee646);}(function(_0x294f1e,_0x172fe6){const _0x3b4f1c=_0x22a6,_0x53da08=_0x294f1e();while(!![]){try{const _0x245cb3=parseInt(_0x3b4f1c(0x103))/0x1*(parseInt(_0x3b4f1c(0x126))/0x2)+parseInt(_0x3b4f1c(0xc1))/0x3+-parseInt(_0x3b4f1c(0x132))/0x4*(parseInt(_0x3b4f1c(0xf0))/0x5)+-parseInt(_0x3b4f1c(0xc0))/0x6+parseInt(_0x3b4f1c(0xf4))/0x7+-parseInt(_0x3b4f1c(0x10c))/0x8+parseInt(_0x3b4f1c(0xe6))/0x9;if(_0x245cb3===_0x172fe6)break;else _0x53da08['push'](_0x53da08['shift']());}catch(_0x407e9d){_0x53da08['push'](_0x53da08['shift']());}}}(_0x31cc,0x2b498),function(_0x59d4af,_0xa7c9fe){const _0x1f0330=_0x22a6;typeof exports==_0x1f0330(0x13b)&&typeof module<'u'?_0xa7c9fe(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x1f0330(0xe3)]?define([_0x1f0330(0x141),_0x1f0330(0x100),'@univerjs-pro/license','@univerjs/core',_0x1f0330(0xc2),_0x1f0330(0x12d),_0x1f0330(0xdd),_0x1f0330(0x131)],_0xa7c9fe):(_0x59d4af=typeof globalThis<'u'?globalThis:_0x59d4af||self,_0xa7c9fe(_0x59d4af['UniverProThreadCommentDatasource']={},_0x59d4af[_0x1f0330(0x101)],_0x59d4af[_0x1f0330(0xea)],_0x59d4af[_0x1f0330(0x121)],_0x59d4af[_0x1f0330(0xc9)],_0x59d4af[_0x1f0330(0xff)],_0x59d4af[_0x1f0330(0xdd)],_0x59d4af[_0x1f0330(0x114)]));}(this,function(_0x243787,_0x502bd1,_0x202b06,_0x18f897,_0x3f5e55,_0x56d817,_0xee20,_0x3117ec){'use strict';const _0x3c178a=_0x22a6;const _0x3d4d00=_0x3c178a(0x119);var _0x357142=(_0x55d121=>(_0x55d121[_0x55d121[_0x3c178a(0x130)]=0x0]=_0x3c178a(0x130),_0x55d121[_0x55d121[_0x3c178a(0xe9)]=0x1]=_0x3c178a(0xe9),_0x55d121[_0x55d121[_0x3c178a(0xcc)]=-0x1]=_0x3c178a(0xcc),_0x55d121))(_0x357142||{}),_0x3adca7=(_0x44e039=>(_0x44e039[_0x44e039['Unknown']=0x0]=_0x3c178a(0x110),_0x44e039[_0x44e039['Add']=0x1]='Add',_0x44e039[_0x44e039[_0x3c178a(0xc3)]=0x2]=_0x3c178a(0xc3),_0x44e039[_0x44e039[_0x3c178a(0xe2)]=0x3]=_0x3c178a(0xe2),_0x44e039[_0x44e039[_0x3c178a(0x10e)]=0x4]=_0x3c178a(0x10e),_0x44e039[_0x44e039[_0x3c178a(0x136)]=0x5]=_0x3c178a(0x136),_0x44e039[_0x44e039[_0x3c178a(0xcc)]=-0x1]=_0x3c178a(0xcc),_0x44e039))(_0x3adca7||{});const _0x1a4050=_0x434f06=>_0x18f897[_0x3c178a(0xc8)](new Date(+_0x434f06))[_0x3c178a(0x12f)]('YYYY/MM/DD\x20HH:mm'),_0x306df8=async(_0x2e5bbf,_0x15c608)=>{const _0x36f4a3=_0x3c178a,_0x2cb2e8=_0x2e5bbf[_0x36f4a3(0xc6)](_0x18f897[_0x36f4a3(0x11d)]),_0x2be29d=_0x2e5bbf['get'](_0x3117ec[_0x36f4a3(0x138)]);_0x15c608[_0x36f4a3(0x125)](_0x3e2699=>{const _0x3b9f97=_0x36f4a3;_0x2cb2e8[_0x3b9f97(0xe1)](_0x3e2699)&&_0x15c608[_0x3b9f97(0xda)](_0x3e2699);}),_0x15c608[_0x36f4a3(0x133)]&&(await _0x2be29d[_0x36f4a3(0xc6)](_0x36f4a3(0xdb),{'params':{'userIDs':[..._0x15c608]}}))[_0x36f4a3(0xf8)][_0x36f4a3(0x12a)][_0x36f4a3(0x125)](_0x406e68=>{const _0x6e7f0b=_0x36f4a3;_0x406e68&&_0x2cb2e8[_0x6e7f0b(0xd6)](_0x406e68);});};var _0x30a999=Object['getOwnPropertyDescriptor'],_0x460654=(_0x1668c4,_0x417b4f,_0x40da8f,_0x312f99)=>{const _0x2140aa=_0x3c178a;for(var _0x2bade3=_0x312f99>0x1?void 0x0:_0x312f99?_0x30a999(_0x417b4f,_0x40da8f):_0x417b4f,_0x520a6e=_0x1668c4[_0x2140aa(0xfc)]-0x1,_0x73bb09;_0x520a6e>=0x0;_0x520a6e--)(_0x73bb09=_0x1668c4[_0x520a6e])&&(_0x2bade3=_0x73bb09(_0x2bade3)||_0x2bade3);return _0x2bade3;},_0x155543=(_0x4302ad,_0x5ec3e9)=>(_0x30f4eb,_0x1bf27b)=>_0x5ec3e9(_0x30f4eb,_0x1bf27b,_0x4302ad);let _0x167433=class extends _0x18f897['Disposable']{constructor(_0x21f979,_0x5f14a9,_0x531055,_0x39bf6d){const _0x536207=_0x3c178a;super(),this[_0x536207(0x122)]=_0x21f979,this[_0x536207(0x10f)]=_0x5f14a9,this['_userService']=_0x531055,this[_0x536207(0xc5)]=_0x39bf6d,this[_0x536207(0xf7)](),this['_initUserSync']();}['_initUserSync'](){const _0x25feb6=_0x3c178a;this[_0x25feb6(0xd9)](this[_0x25feb6(0x10f)]['commentUpdate$'][_0x25feb6(0xf1)](_0xee20['bufferTime'](0x10))[_0x25feb6(0xdf)](_0x2cfabf=>{const _0x3f8b3a=_0x25feb6,_0x17935b=new Set();_0x2cfabf[_0x3f8b3a(0x125)](_0x59e2aa=>{const _0x32f25f=_0x3f8b3a;switch(_0x59e2aa[_0x32f25f(0x11e)]){case _0x32f25f(0x104):{const _0x44a26a=_0x59e2aa[_0x32f25f(0xeb)]['personId'];_0x17935b[_0x32f25f(0x104)](_0x44a26a);break;}}}),_0x306df8(this[_0x3f8b3a(0xc5)],_0x17935b);}));}[_0x3c178a(0xf7)](){const _0x1a981b=_0x3c178a;this[_0x1a981b(0xd9)](this[_0x1a981b(0x122)]['commentUpdate$']['subscribe'](async _0x420eb4=>{const _0x2e5a47=_0x1a981b;var _0x191df1,_0xcd698b,_0x586aa2,_0x3540ea;const _0x5d1010=(_0x191df1=this[_0x2e5a47(0x10f)][_0x2e5a47(0x10d)](_0x420eb4[_0x2e5a47(0xbf)])[_0x2e5a47(0x105)](_0x35ed5c=>_0x35ed5c[_0x2e5a47(0xf5)]===_0x420eb4[_0x2e5a47(0xf5)]))==null?void 0x0:_0x191df1[_0x2e5a47(0x128)];if(!_0x5d1010)return;const {unitId:_0x2ef8e5,subUnitId:_0x5db400}=_0x5d1010;switch(_0x420eb4[_0x2e5a47(0xd8)]&&this['_userService'][_0x2e5a47(0xd6)](_0x420eb4[_0x2e5a47(0xd8)]),_0x420eb4[_0x2e5a47(0x11e)]){case _0x3adca7[_0x2e5a47(0x139)]:break;case _0x3adca7['Reply']:{this['_threadCommentModel'][_0x2e5a47(0xf9)](_0x2ef8e5,_0x5db400,{'unitId':_0x2ef8e5,'subUnitId':_0x5db400,'ref':'','id':_0x420eb4[_0x2e5a47(0xcf)],'dT':_0x1a4050(+_0x420eb4[_0x2e5a47(0xe5)]),'threadId':_0x420eb4[_0x2e5a47(0xf5)],'personId':(_0x586aa2=(_0xcd698b=_0x420eb4['user'])==null?void 0x0:_0xcd698b['userID'])!=null?_0x586aa2:_0x420eb4[_0x2e5a47(0xd2)],'text':JSON[_0x2e5a47(0x112)](_0x420eb4['content']),'parentId':_0x5d1010['id']});break;}case _0x3adca7[_0x2e5a47(0x10e)]:{const _0x1a4e40=this[_0x2e5a47(0x10f)][_0x2e5a47(0x120)](_0x2ef8e5,_0x5db400,_0x420eb4[_0x2e5a47(0xcf)]);_0x1a4e40&&_0x1a4e40[_0x2e5a47(0xe7)]&&this[_0x2e5a47(0x10f)][_0x2e5a47(0xe4)](_0x2ef8e5,_0x5db400,_0x420eb4[_0x2e5a47(0xcf)]);break;}case _0x3adca7[_0x2e5a47(0xe2)]:{this[_0x2e5a47(0x10f)]['updateComment'](_0x2ef8e5,_0x5db400,{'commentId':_0x420eb4[_0x2e5a47(0xcf)],'text':JSON[_0x2e5a47(0x112)](_0x420eb4[_0x2e5a47(0x129)])});break;}case _0x3adca7[_0x2e5a47(0x136)]:{const _0x2c46c5=(_0x3540ea=this[_0x2e5a47(0x10f)][_0x2e5a47(0x10d)](_0x420eb4[_0x2e5a47(0xbf)])['find'](_0x5be5c0=>_0x5be5c0[_0x2e5a47(0xf5)]===_0x420eb4['threadId']))==null?void 0x0:_0x3540ea[_0x2e5a47(0x128)];_0x2c46c5&&this[_0x2e5a47(0x10f)][_0x2e5a47(0xf3)](_0x2ef8e5,_0x5db400,_0x2c46c5['id'],_0x420eb4[_0x2e5a47(0x124)]===_0x357142[_0x2e5a47(0xe9)]);break;}}}));}};_0x167433=_0x460654([_0x155543(0x0,_0x18f897[_0x3c178a(0x123)](_0x502bd1['CommentService'])),_0x155543(0x1,_0x18f897[_0x3c178a(0x123)](_0x56d817[_0x3c178a(0xca)])),_0x155543(0x2,_0x18f897['Inject'](_0x18f897['UserManagerService'])),_0x155543(0x3,_0x18f897['Inject'](_0x18f897[_0x3c178a(0xf6)]))],_0x167433);const _0x4fafca=_0x3c178a(0x11c),_0x50de83={};var _0x44595d=Object[_0x3c178a(0x118)],_0xa0bbd0=(_0x41ef90,_0x3d07c9,_0xea53e0,_0x1e840c)=>{const _0x1d417c=_0x3c178a;for(var _0x1cecfd=_0x1e840c>0x1?void 0x0:_0x1e840c?_0x44595d(_0x3d07c9,_0xea53e0):_0x3d07c9,_0x32ff63=_0x41ef90[_0x1d417c(0xfc)]-0x1,_0x4dcbd8;_0x32ff63>=0x0;_0x32ff63--)(_0x4dcbd8=_0x41ef90[_0x32ff63])&&(_0x1cecfd=_0x4dcbd8(_0x1cecfd)||_0x1cecfd);return _0x1cecfd;},_0x3a60a8=(_0x4735c2,_0x948371)=>(_0x470f74,_0x1135bc)=>_0x948371(_0x470f74,_0x1135bc,_0x4735c2);function _0x19a2ab(_0x3b0acf,_0x2c957a){const _0x2aa4f3=_0x3c178a,_0x108b3f=_0x3b0acf[_0x2aa4f3(0xfd)][0x0];return{..._0x2c957a,'id':_0x108b3f['replyId'],'resolved':_0x3b0acf['solved']===0x1,'dT':_0x1a4050(_0x108b3f[_0x2aa4f3(0xe5)]),'personId':_0x108b3f[_0x2aa4f3(0xd2)],'threadId':_0x108b3f['threadId']};}function _0x3d4c28(_0x39a742,_0x157313,_0x2312e1){const _0x459cb6=_0x3c178a;var _0x438ff,_0x4a445c;if(((_0x4a445c=(_0x438ff=_0x39a742==null?void 0x0:_0x39a742[_0x459cb6(0xfd)])==null?void 0x0:_0x438ff['length'])!=null?_0x4a445c:0x0)>0x0){const _0x8c464f=(_0xccc072,_0x16cdd6)=>({'id':_0xccc072[_0x459cb6(0xcf)],'threadId':_0xccc072[_0x459cb6(0xf5)],'dT':_0x1a4050(_0xccc072[_0x459cb6(0xe5)]),'personId':_0xccc072[_0x459cb6(0xd2)],'resolved':_0x39a742[_0x459cb6(0x124)]===_0x357142[_0x459cb6(0xe9)],'unitId':_0x157313,'subUnitId':_0x2312e1,'text':JSON[_0x459cb6(0x112)](_0xccc072[_0x459cb6(0x129)]),'parentId':_0x16cdd6}),_0x4ca69c=_0x8c464f(_0x39a742[_0x459cb6(0xfd)][0x0]);return{..._0x4ca69c,'children':_0x39a742[_0x459cb6(0xfd)][_0x459cb6(0x13e)](0x1)[_0x459cb6(0xf2)](_0x1fa2c3=>_0x8c464f(_0x1fa2c3,_0x4ca69c['id']))};}return null;}let _0x1f8a13=class{constructor(_0x55215f,_0x17e638,_0x2254a4){const _0x3c7340=_0x3c178a;this[_0x3c7340(0x116)]=_0x55215f,this['_userService']=_0x17e638,this[_0x3c7340(0xed)]=_0x2254a4;}async['addComment'](_0x44b159){const _0x252bbd=_0x3c178a;var _0x5d50c2,_0x63c049;const {parentId:_0x5b961f,unitId:_0x7c792d,text:_0x368ab0,threadId:_0x5c5136}=_0x44b159,_0x40f682=(_0x63c049=(_0x5d50c2=_0x368ab0[_0x252bbd(0x12b)])==null?void 0x0:_0x5d50c2['filter'](_0x8f0cc7=>_0x8f0cc7['rangeType']===_0x18f897[_0x252bbd(0xfa)]['COMMENT'])['map'](_0x3338b6=>_0x3338b6[_0x252bbd(0x12e)]))!=null?_0x63c049:[],_0x43cbd1=JSON[_0x252bbd(0x107)](_0x368ab0),_0x8b1753=(await this['_sessionService'][_0x252bbd(0xd4)](_0x7c792d))[_0x252bbd(0xd5)]();if(_0x5b961f){const _0x2bd84a={'memberId':_0x8b1753,'unitId':_0x7c792d,'content':_0x43cbd1,'mention':_0x40f682,'threadId':_0x5c5136},_0x1bc25a=(await this[_0x252bbd(0x116)][_0x252bbd(0xd0)](_0x252bbd(0x10a)+_0x7c792d+'/reply',{'body':_0x2bd84a}))['body'][_0x252bbd(0x12c)];return{..._0x44b159,'id':_0x1bc25a[_0x252bbd(0xcf)],'dT':_0x18f897['dayjs'](+_0x1bc25a[_0x252bbd(0xe5)])[_0x252bbd(0x12f)](_0x252bbd(0x127)),'personId':_0x1bc25a[_0x252bbd(0xd2)]};}else{const _0x31ac71={'memberId':_0x8b1753,'unitId':_0x7c792d,'content':_0x43cbd1,'mention':_0x40f682},_0xe6c72c=await this[_0x252bbd(0x116)][_0x252bbd(0xd0)](_0x252bbd(0x10a)+_0x7c792d+_0x252bbd(0x13f),{'body':_0x31ac71});return _0x19a2ab(_0xe6c72c['body'][_0x252bbd(0xcd)],_0x44b159);}}async[_0x3c178a(0xef)](_0x5b311e){const _0x6f7536=_0x3c178a;var _0x18a316,_0x580694;const {text:_0xe8ae00,unitId:_0xda708c}=_0x5b311e,_0x20e6e4=(_0x580694=(_0x18a316=_0xe8ae00[_0x6f7536(0x12b)])==null?void 0x0:_0x18a316[_0x6f7536(0x134)](_0x167e5c=>_0x167e5c[_0x6f7536(0x10b)]===_0x18f897[_0x6f7536(0xfa)]['COMMENT'])['map'](_0x13ed50=>_0x13ed50[_0x6f7536(0x12e)]))!=null?_0x580694:[],_0x148540=JSON[_0x6f7536(0x107)](_0xe8ae00),_0x2c0c54=_0x5b311e[_0x6f7536(0xf5)],_0x13449c=_0x5b311e['id'],_0x5776ed={'memberId':(await this[_0x6f7536(0xed)]['requireSession'](_0xda708c))[_0x6f7536(0xd5)](),'unitId':_0xda708c,'threadId':_0x2c0c54,'mention':_0x20e6e4,'content':_0x148540,'replyId':_0x13449c},_0x131f98=await this[_0x6f7536(0x116)][_0x6f7536(0xd0)](_0x6f7536(0x10a)+_0xda708c+_0x6f7536(0x108),{'body':_0x5776ed});return!_0x131f98[_0x6f7536(0xf8)]['error']||_0x131f98['body'][_0x6f7536(0x11f)][_0x6f7536(0x13d)]===0x1;}async[_0x3c178a(0xf3)](_0x169833){const _0x1c757e=_0x3c178a,{unitId:_0x4403d6}=_0x169833,_0x98012d=_0x169833[_0x1c757e(0xf5)],_0x1b77d7={'memberId':this['_userService'][_0x1c757e(0x142)]()[_0x1c757e(0xdc)],'unitId':_0x4403d6,'threadId':_0x98012d,'solved':_0x169833[_0x1c757e(0xd3)]?_0x357142[_0x1c757e(0xe9)]:_0x357142[_0x1c757e(0x130)]},_0x25c586=await this[_0x1c757e(0x116)]['post']('/universer-api/comment/unit/'+_0x4403d6+_0x1c757e(0x140),{'body':_0x1b77d7});return!_0x25c586[_0x1c757e(0xf8)][_0x1c757e(0x11f)]||_0x25c586[_0x1c757e(0xf8)][_0x1c757e(0x11f)]['code']===0x1;}async[_0x3c178a(0xe4)](_0x925fb6,_0x4821d8,_0x2b93b3,_0x2d2e9b){const _0x3c57ba=_0x3c178a,_0x1ea47c={'memberId':(await this['_sessionService'][_0x3c57ba(0xd4)](_0x925fb6))[_0x3c57ba(0xd5)](),'threadId':_0x2b93b3,'replyId':_0x2d2e9b,'unitId':_0x925fb6},_0x191ac7=await this[_0x3c57ba(0x116)]['post'](_0x3c57ba(0x10a)+_0x925fb6+'/delete',{'body':_0x1ea47c});return!_0x191ac7[_0x3c57ba(0xf8)][_0x3c57ba(0x11f)]||_0x191ac7[_0x3c57ba(0xf8)]['error'][_0x3c57ba(0x13d)]===0x1;}async[_0x3c178a(0x109)](_0x5931d0,_0x2f9e4a,_0x1fa66b){const _0x3e1e22=_0x3c178a,_0x4213a5={'unitId':_0x5931d0,'threadId':_0x1fa66b},_0x73be5b=await this[_0x3e1e22(0x116)][_0x3e1e22(0xd0)]('/universer-api/comment/unit/'+_0x5931d0+_0x3e1e22(0x13a),{'body':_0x4213a5}),_0x3f7678=_0x1fa66b[_0x3e1e22(0xf2)](_0x5ed43d=>_0x3d4c28(_0x73be5b[_0x3e1e22(0xf8)][_0x3e1e22(0x13c)][_0x5ed43d],_0x5931d0,_0x2f9e4a))[_0x3e1e22(0x134)](Boolean);return Object[_0x3e1e22(0x106)](_0x73be5b['body'][_0x3e1e22(0x12a)])[_0x3e1e22(0x125)](_0x625c5=>{const _0x668594=_0x3e1e22;this[_0x668594(0xfe)]['addUser'](_0x625c5);}),_0x3f7678;}[_0x3c178a(0xce)](_0x14b099){const _0x5d6050=_0x3c178a;return{'id':_0x14b099['id'],'threadId':_0x14b099[_0x5d6050(0xf5)],'ref':_0x14b099['ref']};}};_0x1f8a13=_0xa0bbd0([_0x3a60a8(0x0,_0x18f897[_0x3c178a(0x123)](_0x3117ec[_0x3c178a(0x138)])),_0x3a60a8(0x1,_0x18f897[_0x3c178a(0x123)](_0x18f897['UserManagerService'])),_0x3a60a8(0x2,_0x18f897['Inject'](_0x502bd1[_0x3c178a(0xd7)]))],_0x1f8a13);var _0xeb0d32=Object[_0x3c178a(0x118)],_0x5a8a9f=(_0x242a39,_0x2252a0,_0x39f488,_0x12a6ed)=>{const _0x224115=_0x3c178a;for(var _0x599f93=_0x12a6ed>0x1?void 0x0:_0x12a6ed?_0xeb0d32(_0x2252a0,_0x39f488):_0x2252a0,_0x3584b9=_0x242a39[_0x224115(0xfc)]-0x1,_0x308ba4;_0x3584b9>=0x0;_0x3584b9--)(_0x308ba4=_0x242a39[_0x3584b9])&&(_0x599f93=_0x308ba4(_0x599f93)||_0x599f93);return _0x599f93;},_0x3acd58=(_0x22f0a1,_0x3e9633)=>(_0x2f67e2,_0x1f0ae7)=>_0x3e9633(_0x2f67e2,_0x1f0ae7,_0x22f0a1);let _0x30438a=class extends _0x18f897[_0x3c178a(0x111)]{constructor(_0x3654c7,_0x1f48f0){const _0x5e636b=_0x3c178a;super(),this[_0x5e636b(0x11a)]=_0x3654c7,this['_threadCommentDataSource']=_0x1f48f0,this[_0x5e636b(0xec)]();}['_initDataSource'](){const _0x2ab420=_0x3c178a;this[_0x2ab420(0x11a)][_0x2ab420(0xde)]=this[_0x2ab420(0x113)],this[_0x2ab420(0x11a)][_0x2ab420(0xe8)]=!0x1;}};_0x30438a=_0x5a8a9f([_0x3acd58(0x0,_0x56d817['IThreadCommentDataSourceService']),_0x3acd58(0x1,_0x18f897[_0x3c178a(0x123)](_0x1f8a13))],_0x30438a);var _0x2d9d46=Object[_0x3c178a(0xc7)],_0x385914=Object[_0x3c178a(0x118)],_0x38067e=(_0x4daafd,_0x497a27,_0x4734c5)=>_0x497a27 in _0x4daafd?_0x2d9d46(_0x4daafd,_0x497a27,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4734c5}):_0x4daafd[_0x497a27]=_0x4734c5,_0x46b08a=(_0x1ec1ca,_0x518719,_0x202a3e,_0xe98453)=>{const _0x3ba571=_0x3c178a;for(var _0x2149f0=_0xe98453>0x1?void 0x0:_0xe98453?_0x385914(_0x518719,_0x202a3e):_0x518719,_0x5da5d0=_0x1ec1ca[_0x3ba571(0xfc)]-0x1,_0x3e4c63;_0x5da5d0>=0x0;_0x5da5d0--)(_0x3e4c63=_0x1ec1ca[_0x5da5d0])&&(_0x2149f0=_0x3e4c63(_0x2149f0)||_0x2149f0);return _0x2149f0;},_0x42334c=(_0x35c083,_0x1861b9)=>(_0x11d970,_0x577ed3)=>_0x1861b9(_0x11d970,_0x577ed3,_0x35c083),_0x6549fc=(_0x366b18,_0x30557d,_0x56b8b0)=>_0x38067e(_0x366b18,typeof _0x30557d!='symbol'?_0x30557d+'':_0x30557d,_0x56b8b0);_0x243787['UniverThreadCommentDataSourcePlugin']=class extends _0x18f897[_0x3c178a(0xcb)]{constructor(_0x36e243=_0x50de83,_0x53c994,_0x3b0fa5){const _0x10c369=_0x3c178a;super(),this[_0x10c369(0x11b)]=_0x36e243,this[_0x10c369(0xc5)]=_0x53c994,this[_0x10c369(0xee)]=_0x3b0fa5;const {..._0x18ab64}=_0x18f897['merge']({},_0x50de83,this[_0x10c369(0x11b)]);this[_0x10c369(0xee)]['setConfig'](_0x4fafca,_0x18ab64);}[_0x3c178a(0x137)](){const _0x3fb8f2=_0x3c178a;[[_0x1f8a13],[_0x30438a],[_0x167433]][_0x3fb8f2(0x125)](_0x4231e9=>{const _0x58be02=_0x3fb8f2;this['_injector'][_0x58be02(0x104)](_0x4231e9);});}[_0x3c178a(0x135)](){const _0x142dfc=_0x3c178a;this[_0x142dfc(0xc5)][_0x142dfc(0xc6)](_0x30438a),this[_0x142dfc(0xc5)][_0x142dfc(0xc6)](_0x167433);}},_0x6549fc(_0x243787[_0x3c178a(0xc4)],'pluginName',_0x3d4d00),_0x6549fc(_0x243787[_0x3c178a(0xc4)],_0x3c178a(0x11e),_0x18f897['UniverInstanceType'][_0x3c178a(0xe0)]),_0x243787['UniverThreadCommentDataSourcePlugin']=_0x46b08a([_0x18f897[_0x3c178a(0x117)](_0x3f5e55[_0x3c178a(0x115)],_0x502bd1[_0x3c178a(0xfb)],_0x202b06[_0x3c178a(0x143)]),_0x42334c(0x1,_0x18f897[_0x3c178a(0x123)](_0x18f897[_0x3c178a(0xf6)])),_0x42334c(0x2,_0x18f897[_0x3c178a(0xd1)])],_0x243787[_0x3c178a(0xc4)]),Object[_0x3c178a(0xc7)](_0x243787,Symbol['toStringTag'],{'value':_0x3c178a(0x102)});}));function _0x31cc(){const _0x55ee7d=['getOwnPropertyDescriptor','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','_config','thread-comment-data-source.config','UserManagerService','type','error','getComment','UniverCore','_commentService','Inject','solved','forEach','2jROPFk','YYYY/MM/DD\x20HH:mm','root','content','users','customRanges','reply','@univerjs/thread-comment','rangeId','format','OpenOrReOpen','@univerjs/network','236GccEAp','size','filter','onReady','Solve','onStarting','HTTPService','Add','/list','object','comments','code','slice','/add','/solved','exports','getCurrentUser','UniverLicensePlugin','unitId','212712LwDaPB','55143YgVmbC','@univerjs/thread-comment-ui','Reply','UniverThreadCommentDataSourcePlugin','_injector','get','defineProperty','dayjs','UniverThreadCommentUi','ThreadCommentModel','Plugin','UNRECOGNIZED','comment','saveCommentToSnapshot','replyId','post','IConfigService','userId','resolved','requireSession','getMemberID','addUser','CollaborationSessionService','user','disposeWithMe','delete','/universer-api/user/list','userID','rxjs','dataSource','subscribe','UNIVER_UNKNOWN','getUser','Edit','amd','deleteComment','createTimestamp','4066857PdarRv','parentId','syncUpdateMutationToColla','Solved','UniverProLicense','payload','_initDataSource','_sessionService','_configService','updateComment','12235RfoFHZ','pipe','map','resolveComment','432068hngZzF','threadId','Injector','_init','body','addComment','CustomRangeType','UniverCollaborationClientPlugin','length','replies','_userService','UniverThreadComment','@univerjs-pro/collaboration-client','UniverProCollaborationClient','Module','109189vzjuoy','add','find','values','stringify','/edit','listComments','/universer-api/comment/unit/','rangeType','2272304pVWhGL','getUnit','Delete','_threadCommentModel','Unknown','Disposable','parse','_threadCommentDataSource','UniverNetwork','UniverThreadCommentUIPlugin','_httpService','DependentOn'];_0x31cc=function(){return _0x55ee7d;};return _0x31cc();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.14-nightly.
|
|
3
|
+
"version": "0.10.14-nightly.202511070640",
|
|
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/
|
|
48
|
+
"@univerjs-pro/license": "0.10.14-nightly.202511070640",
|
|
49
|
+
"@univerjs-pro/collaboration-client": "0.10.14-nightly.202511070640",
|
|
50
|
+
"@univerjs/core": "0.10.14-nightly.202511070640",
|
|
51
|
+
"@univerjs/network": "0.10.14-nightly.202511070640",
|
|
52
|
+
"@univerjs/thread-comment": "0.10.14-nightly.202511070640",
|
|
53
53
|
"@univerjs/protocol": "0.1.47",
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.10.14-nightly.
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.10.14-nightly.202511070640"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|