@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505021607 → 0.7.0-nightly.202505041606
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x3ed0e1=_0x1c58;(function(_0x46db32,_0x4e1edd){const _0x4e0390=_0x1c58,_0xc34431=_0x46db32();while(!![]){try{const _0x38e436=parseInt(_0x4e0390(0x182))/0x1*(parseInt(_0x4e0390(0x14b))/0x2)+-parseInt(_0x4e0390(0x19d))/0x3*(parseInt(_0x4e0390(0x176))/0x4)+-parseInt(_0x4e0390(0x14f))/0x5*(parseInt(_0x4e0390(0x174))/0x6)+-parseInt(_0x4e0390(0x16c))/0x7+parseInt(_0x4e0390(0x1ba))/0x8*(-parseInt(_0x4e0390(0x1c5))/0x9)+parseInt(_0x4e0390(0x1be))/0xa*(parseInt(_0x4e0390(0x17d))/0xb)+parseInt(_0x4e0390(0x153))/0xc;if(_0x38e436===_0x4e1edd)break;else _0xc34431['push'](_0xc34431['shift']());}catch(_0x277f5a){_0xc34431['push'](_0xc34431['shift']());}}}(_0x436c,0xbdf6e));Object[_0x3ed0e1(0x1a5)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require(_0x3ed0e1(0x151)),T=require(_0x3ed0e1(0x18b)),c=require(_0x3ed0e1(0x152)),j=require(_0x3ed0e1(0x16b)),M=require(_0x3ed0e1(0x166)),w=require(_0x3ed0e1(0x1bb)),P=require(_0x3ed0e1(0x16d)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x245d99=>(_0x245d99[_0x245d99[_0x3ed0e1(0x15f)]=0x0]=_0x3ed0e1(0x15f),_0x245d99[_0x245d99[_0x3ed0e1(0x1b9)]=0x1]=_0x3ed0e1(0x1b9),_0x245d99[_0x245d99['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x245d99))(I||{}),v=(_0x4bbab2=>(_0x4bbab2[_0x4bbab2['Unknown']=0x0]=_0x3ed0e1(0x197),_0x4bbab2[_0x4bbab2[_0x3ed0e1(0x184)]=0x1]=_0x3ed0e1(0x184),_0x4bbab2[_0x4bbab2[_0x3ed0e1(0x1a2)]=0x2]='Reply',_0x4bbab2[_0x4bbab2[_0x3ed0e1(0x15c)]=0x3]=_0x3ed0e1(0x15c),_0x4bbab2[_0x4bbab2[_0x3ed0e1(0x175)]=0x4]='Delete',_0x4bbab2[_0x4bbab2[_0x3ed0e1(0x178)]=0x5]=_0x3ed0e1(0x178),_0x4bbab2[_0x4bbab2[_0x3ed0e1(0x17a)]=-0x1]=_0x3ed0e1(0x17a),_0x4bbab2))(v||{});const f=_0x1f2329=>c[_0x3ed0e1(0x159)](new Date(+_0x1f2329))[_0x3ed0e1(0x183)](_0x3ed0e1(0x148)),R=async(_0x5f0d27,_0x1f6541)=>{const _0x77272f=_0x3ed0e1,_0x10d01c=_0x5f0d27[_0x77272f(0x19e)](c[_0x77272f(0x179)]),_0x4b78bb=_0x5f0d27['get'](P[_0x77272f(0x1b0)]);_0x1f6541['forEach'](_0x398320=>{const _0x2dbb75=_0x77272f;_0x10d01c['getUser'](_0x398320)&&_0x1f6541[_0x2dbb75(0x1b5)](_0x398320);}),_0x1f6541['size']&&(await _0x4b78bb[_0x77272f(0x19e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x1f6541]}}))['body']['users'][_0x77272f(0x198)](_0x9b0847=>{_0x9b0847&&_0x10d01c['addUser'](_0x9b0847);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x2fec3d,_0x4986b7,_0x566c84,_0x31c4cd)=>{const _0x1a23f5=_0x3ed0e1;for(var _0x5e08b4=_0x31c4cd>0x1?void 0x0:_0x31c4cd?$(_0x4986b7,_0x566c84):_0x4986b7,_0x1dc188=_0x2fec3d[_0x1a23f5(0x1ad)]-0x1,_0x333ae0;_0x1dc188>=0x0;_0x1dc188--)(_0x333ae0=_0x2fec3d[_0x1dc188])&&(_0x5e08b4=_0x333ae0(_0x5e08b4)||_0x5e08b4);return _0x5e08b4;},S=(_0x21442d,_0x1d9404)=>(_0x5cfd14,_0x2d211e)=>_0x1d9404(_0x5cfd14,_0x2d211e,_0x21442d);let p=class extends c[_0x3ed0e1(0x167)]{constructor(_0x56e152,_0x445c16,_0x5a69cb,_0x3b70e7){const _0x21c28b=_0x3ed0e1;super(),this[_0x21c28b(0x19a)]=_0x56e152,this[_0x21c28b(0x1a7)]=_0x445c16,this[_0x21c28b(0x18f)]=_0x5a69cb,this['_injector']=_0x3b70e7,this[_0x21c28b(0x155)](),this[_0x21c28b(0x165)]();}['_initUserSync'](){const _0x5db32a=_0x3ed0e1;this['disposeWithMe'](this[_0x5db32a(0x1a7)][_0x5db32a(0x147)][_0x5db32a(0x149)](w['bufferTime'](0x10))[_0x5db32a(0x156)](_0x4edded=>{const _0x187e61=_0x5db32a,_0x3693f9=new Set();_0x4edded['forEach'](_0x111282=>{const _0xbd5c8d=_0x1c58;switch(_0x111282[_0xbd5c8d(0x1aa)]){case _0xbd5c8d(0x18c):{const _0x27ecee=_0x111282[_0xbd5c8d(0x188)][_0xbd5c8d(0x171)];_0x3693f9[_0xbd5c8d(0x18c)](_0x27ecee);break;}}}),R(this[_0x187e61(0x1b6)],_0x3693f9);}));}[_0x3ed0e1(0x155)](){const _0x31e9c9=_0x3ed0e1;this[_0x31e9c9(0x160)](this['_commentService']['commentUpdate$'][_0x31e9c9(0x156)](async _0x3f98af=>{const _0x1a2e12=_0x31e9c9;var _0x56bcce,_0x530086,_0xe4551a,_0x58ddcd;const _0x1b39ac=(_0x56bcce=this[_0x1a2e12(0x1a7)][_0x1a2e12(0x14d)](_0x3f98af[_0x1a2e12(0x1ab)])[_0x1a2e12(0x187)](_0x2daa38=>_0x2daa38[_0x1a2e12(0x1c0)]===_0x3f98af[_0x1a2e12(0x1c0)]))==null?void 0x0:_0x56bcce[_0x1a2e12(0x1bd)];if(!_0x1b39ac)return;const {unitId:_0x5c0b1d,subUnitId:_0x50427e}=_0x1b39ac;switch(_0x3f98af[_0x1a2e12(0x177)]&&this['_userService'][_0x1a2e12(0x1b3)](_0x3f98af[_0x1a2e12(0x177)]),_0x3f98af['type']){case v[_0x1a2e12(0x184)]:break;case v[_0x1a2e12(0x1a2)]:{this[_0x1a2e12(0x1a7)][_0x1a2e12(0x15d)](_0x5c0b1d,_0x50427e,{'unitId':_0x5c0b1d,'subUnitId':_0x50427e,'ref':'','id':_0x3f98af[_0x1a2e12(0x157)],'dT':f(+_0x3f98af[_0x1a2e12(0x18d)]),'threadId':_0x3f98af[_0x1a2e12(0x1c0)],'personId':(_0xe4551a=(_0x530086=_0x3f98af[_0x1a2e12(0x177)])==null?void 0x0:_0x530086[_0x1a2e12(0x1c9)])!=null?_0xe4551a:_0x3f98af[_0x1a2e12(0x1a8)],'text':JSON['parse'](_0x3f98af[_0x1a2e12(0x15b)]),'parentId':_0x1b39ac['id']});break;}case v[_0x1a2e12(0x175)]:{const _0x564cfd=this[_0x1a2e12(0x1a7)][_0x1a2e12(0x181)](_0x5c0b1d,_0x50427e,_0x3f98af[_0x1a2e12(0x157)]);_0x564cfd&&_0x564cfd['parentId']&&this['_threadCommentModel'][_0x1a2e12(0x1c8)](_0x5c0b1d,_0x50427e,_0x3f98af[_0x1a2e12(0x157)]);break;}case v[_0x1a2e12(0x15c)]:{this[_0x1a2e12(0x1a7)]['updateComment'](_0x5c0b1d,_0x50427e,{'commentId':_0x3f98af['replyId'],'text':JSON[_0x1a2e12(0x16a)](_0x3f98af[_0x1a2e12(0x15b)])});break;}case v[_0x1a2e12(0x178)]:{const _0x4098ba=(_0x58ddcd=this[_0x1a2e12(0x1a7)][_0x1a2e12(0x14d)](_0x3f98af[_0x1a2e12(0x1ab)])['find'](_0x357e9d=>_0x357e9d[_0x1a2e12(0x1c0)]===_0x3f98af[_0x1a2e12(0x1c0)]))==null?void 0x0:_0x58ddcd[_0x1a2e12(0x1bd)];_0x4098ba&&this[_0x1a2e12(0x1a7)][_0x1a2e12(0x196)](_0x5c0b1d,_0x50427e,_0x4098ba['id'],_0x3f98af[_0x1a2e12(0x164)]===I[_0x1a2e12(0x1b9)]);break;}}}));}};p=E([S(0x0,c[_0x3ed0e1(0x1a3)](b[_0x3ed0e1(0x1c2)])),S(0x1,c[_0x3ed0e1(0x1a3)](M[_0x3ed0e1(0x161)])),S(0x2,c[_0x3ed0e1(0x1a3)](c[_0x3ed0e1(0x179)])),S(0x3,c['Inject'](c[_0x3ed0e1(0x1c7)]))],p);const q=_0x3ed0e1(0x1c4),D={};var A=Object[_0x3ed0e1(0x1bc)],x=(_0xaa4aab,_0x516053,_0x5b794d,_0x101aec)=>{for(var _0x4c1b49=_0x101aec>0x1?void 0x0:_0x101aec?A(_0x516053,_0x5b794d):_0x516053,_0x2e0c92=_0xaa4aab['length']-0x1,_0x3cdf5a;_0x2e0c92>=0x0;_0x2e0c92--)(_0x3cdf5a=_0xaa4aab[_0x2e0c92])&&(_0x4c1b49=_0x3cdf5a(_0x4c1b49)||_0x4c1b49);return _0x4c1b49;},_=(_0xd45d4c,_0x13043b)=>(_0x2c6fe2,_0x1314e4)=>_0x13043b(_0x2c6fe2,_0x1314e4,_0xd45d4c);function Y(_0x14d9c6,_0x204c97){const _0xeb97f0=_0x3ed0e1,_0x1d75f3=_0x14d9c6[_0xeb97f0(0x168)][0x0];return{..._0x204c97,'id':_0x1d75f3[_0xeb97f0(0x157)],'resolved':_0x14d9c6['solved']===0x1,'dT':f(_0x1d75f3[_0xeb97f0(0x18d)]),'personId':_0x1d75f3['userId'],'threadId':_0x1d75f3[_0xeb97f0(0x1c0)]};}function G(_0x3547c5,_0x37ee8c,_0x303b4b){const _0x1e2b90=_0x3ed0e1;var _0x53bb2b,_0x1810e4;if(((_0x1810e4=(_0x53bb2b=_0x3547c5==null?void 0x0:_0x3547c5[_0x1e2b90(0x168)])==null?void 0x0:_0x53bb2b[_0x1e2b90(0x1ad)])!=null?_0x1810e4:0x0)>0x0){const _0x3ec478=(_0x32c14f,_0x4982a9)=>({'id':_0x32c14f[_0x1e2b90(0x157)],'threadId':_0x32c14f[_0x1e2b90(0x1c0)],'dT':f(_0x32c14f[_0x1e2b90(0x18d)]),'personId':_0x32c14f['userId'],'resolved':_0x3547c5[_0x1e2b90(0x164)]===I[_0x1e2b90(0x1b9)],'unitId':_0x37ee8c,'subUnitId':_0x303b4b,'text':JSON[_0x1e2b90(0x16a)](_0x32c14f[_0x1e2b90(0x15b)]),'parentId':_0x4982a9}),_0x9ff4df=_0x3ec478(_0x3547c5[_0x1e2b90(0x168)][0x0]);return{..._0x9ff4df,'children':_0x3547c5['replies'][_0x1e2b90(0x17f)](0x1)[_0x1e2b90(0x1b2)](_0x143688=>_0x3ec478(_0x143688,_0x9ff4df['id']))};}return null;}let g=class{constructor(_0x4fc172,_0x4e6787,_0x3a55c1,_0xb378dc){const _0x4c2277=_0x3ed0e1;this[_0x4c2277(0x180)]=_0x4fc172,this['_userService']=_0x4e6787,this['_sessionService']=_0x3a55c1,this[_0x4c2277(0x1b6)]=_0xb378dc;}async['addComment'](_0x581c70){const _0x46aa34=_0x3ed0e1;var _0x418ed2,_0x493888;const {parentId:_0x42d9aa,unitId:_0x4bc1a9,text:_0x53297a,threadId:_0x876243}=_0x581c70,_0x5bc3b0=(_0x493888=(_0x418ed2=_0x53297a[_0x46aa34(0x16f)])==null?void 0x0:_0x418ed2[_0x46aa34(0x15e)](_0x7b419f=>_0x7b419f[_0x46aa34(0x192)]===c[_0x46aa34(0x17e)][_0x46aa34(0x195)])[_0x46aa34(0x1b2)](_0x3cb5ce=>_0x3cb5ce['rangeId']))!=null?_0x493888:[],_0x3fd067=JSON['stringify'](_0x53297a),_0x137edd=(await this[_0x46aa34(0x17c)][_0x46aa34(0x14e)](_0x4bc1a9))[_0x46aa34(0x146)]();if(_0x42d9aa){const _0x181a99={'memberId':_0x137edd,'unitId':_0x4bc1a9,'content':_0x3fd067,'mention':_0x5bc3b0,'threadId':_0x876243},_0x57a3b4=(await this[_0x46aa34(0x180)][_0x46aa34(0x158)]('/universer-api/comment/unit/'+_0x4bc1a9+_0x46aa34(0x1b7),{'body':_0x181a99}))[_0x46aa34(0x185)]['reply'];return{..._0x581c70,'id':_0x57a3b4[_0x46aa34(0x157)],'dT':c[_0x46aa34(0x159)](+_0x57a3b4[_0x46aa34(0x18d)])[_0x46aa34(0x183)](_0x46aa34(0x148)),'personId':_0x57a3b4[_0x46aa34(0x1a8)]};}else{const _0x1640e5={'memberId':_0x137edd,'unitId':_0x4bc1a9,'content':_0x3fd067,'mention':_0x5bc3b0},_0x381324=await this['_httpService'][_0x46aa34(0x158)](_0x46aa34(0x190)+_0x4bc1a9+_0x46aa34(0x1c1),{'body':_0x1640e5});return Y(_0x381324['body']['comment'],_0x581c70);}}async[_0x3ed0e1(0x1ae)](_0xa6b27){const _0x28b3e8=_0x3ed0e1;var _0x36617b,_0x3955b6;const {text:_0x525eba,unitId:_0x3b02ee}=_0xa6b27,_0x50a7ab=(_0x3955b6=(_0x36617b=_0x525eba[_0x28b3e8(0x16f)])==null?void 0x0:_0x36617b[_0x28b3e8(0x15e)](_0x3ad0f4=>_0x3ad0f4[_0x28b3e8(0x192)]===c[_0x28b3e8(0x17e)][_0x28b3e8(0x195)])['map'](_0x11191e=>_0x11191e[_0x28b3e8(0x19c)]))!=null?_0x3955b6:[],_0x4a05d2=JSON[_0x28b3e8(0x1a6)](_0x525eba),_0x2cc556=_0xa6b27[_0x28b3e8(0x1c0)],_0x1f2bb6=_0xa6b27['id'],_0x55c1bf={'memberId':(await this['_sessionService'][_0x28b3e8(0x14e)](_0x3b02ee))[_0x28b3e8(0x146)](),'unitId':_0x3b02ee,'threadId':_0x2cc556,'mention':_0x50a7ab,'content':_0x4a05d2,'replyId':_0x1f2bb6},_0x144990=await this['_httpService'][_0x28b3e8(0x158)](_0x28b3e8(0x190)+_0x3b02ee+_0x28b3e8(0x1b1),{'body':_0x55c1bf});return!_0x144990[_0x28b3e8(0x185)][_0x28b3e8(0x1a1)]||_0x144990['body'][_0x28b3e8(0x1a1)][_0x28b3e8(0x150)]===0x1;}async[_0x3ed0e1(0x196)](_0x5e5e4c){const _0x5e0074=_0x3ed0e1,{unitId:_0x236c88}=_0x5e5e4c,_0x580924=_0x5e5e4c[_0x5e0074(0x1c0)],_0xa4fe65={'memberId':this[_0x5e0074(0x18f)][_0x5e0074(0x1c6)]()[_0x5e0074(0x1c9)],'unitId':_0x236c88,'threadId':_0x580924,'solved':_0x5e5e4c[_0x5e0074(0x172)]?I['Solved']:I[_0x5e0074(0x15f)]},_0xdbee80=await this[_0x5e0074(0x180)][_0x5e0074(0x158)]('/universer-api/comment/unit/'+_0x236c88+'/solved',{'body':_0xa4fe65});return!_0xdbee80[_0x5e0074(0x185)][_0x5e0074(0x1a1)]||_0xdbee80[_0x5e0074(0x185)][_0x5e0074(0x1a1)][_0x5e0074(0x150)]===0x1;}async[_0x3ed0e1(0x1c8)](_0x13b5ee,_0xd88afc,_0x5d37c8,_0x7f90ef){const _0xfe8f6a=_0x3ed0e1,_0x5ecf4a={'memberId':(await this[_0xfe8f6a(0x17c)]['requireSession'](_0x13b5ee))[_0xfe8f6a(0x146)](),'threadId':_0x5d37c8,'replyId':_0x7f90ef,'unitId':_0x13b5ee},_0x1fdaf7=await this[_0xfe8f6a(0x180)][_0xfe8f6a(0x158)](_0xfe8f6a(0x190)+_0x13b5ee+_0xfe8f6a(0x1a9),{'body':_0x5ecf4a});return!_0x1fdaf7[_0xfe8f6a(0x185)][_0xfe8f6a(0x1a1)]||_0x1fdaf7[_0xfe8f6a(0x185)][_0xfe8f6a(0x1a1)][_0xfe8f6a(0x150)]===0x1;}async[_0x3ed0e1(0x1b8)](_0x267814,_0x47e6de,_0x4ceaff){const _0x2c9ce8=_0x3ed0e1,_0x1ea6d0={'unitId':_0x267814,'threadId':_0x4ceaff},_0x4f7712=await this[_0x2c9ce8(0x180)][_0x2c9ce8(0x158)](_0x2c9ce8(0x190)+_0x267814+_0x2c9ce8(0x194),{'body':_0x1ea6d0}),_0x3001e5=_0x4ceaff['map'](_0x1c4482=>G(_0x4f7712[_0x2c9ce8(0x185)][_0x2c9ce8(0x193)][_0x1c4482],_0x267814,_0x47e6de))[_0x2c9ce8(0x15e)](Boolean);return Object[_0x2c9ce8(0x14c)](_0x4f7712[_0x2c9ce8(0x185)][_0x2c9ce8(0x1af)])['forEach'](_0x308f5e=>{const _0x4bb702=_0x2c9ce8;this[_0x4bb702(0x18f)]['addUser'](_0x308f5e);}),_0x3001e5;}['saveCommentToSnapshot'](_0x52a16a){const _0x5ba25a=_0x3ed0e1;return{'id':_0x52a16a['id'],'threadId':_0x52a16a[_0x5ba25a(0x1c0)],'ref':_0x52a16a[_0x5ba25a(0x16e)]};}};g=x([_(0x0,c[_0x3ed0e1(0x1a3)](P['HTTPService'])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x3ed0e1(0x162)])),_(0x3,c[_0x3ed0e1(0x1a3)](c[_0x3ed0e1(0x1c7)]))],g);var H=Object[_0x3ed0e1(0x1bc)],J=(_0x5bf4d9,_0x40e22d,_0x4ce978,_0x33197f)=>{const _0x31ff74=_0x3ed0e1;for(var _0xc8e53d=_0x33197f>0x1?void 0x0:_0x33197f?H(_0x40e22d,_0x4ce978):_0x40e22d,_0xa79031=_0x5bf4d9[_0x31ff74(0x1ad)]-0x1,_0x21b3c2;_0xa79031>=0x0;_0xa79031--)(_0x21b3c2=_0x5bf4d9[_0xa79031])&&(_0xc8e53d=_0x21b3c2(_0xc8e53d)||_0xc8e53d);return _0xc8e53d;},y=(_0xb3ff02,_0x2dd5f8)=>(_0x2857d6,_0x452f5c)=>_0x2dd5f8(_0x2857d6,_0x452f5c,_0xb3ff02);let C=class extends c[_0x3ed0e1(0x167)]{constructor(_0x363f00,_0x20090a){const _0xd2a6a3=_0x3ed0e1;super(),this['_threadCommentDataSourceService']=_0x363f00,this[_0xd2a6a3(0x1b4)]=_0x20090a,this[_0xd2a6a3(0x199)]();}['_initDataSource'](){const _0x361678=_0x3ed0e1;this['_threadCommentDataSourceService'][_0x361678(0x169)]=this[_0x361678(0x1b4)],this['_threadCommentDataSourceService'][_0x361678(0x18a)]=!0x1;}};function _0x1c58(_0x1188d6,_0x26357e){const _0x436c6f=_0x436c();return _0x1c58=function(_0x1c581c,_0x348c1a){_0x1c581c=_0x1c581c-0x146;let _0x3bdc26=_0x436c6f[_0x1c581c];return _0x3bdc26;},_0x1c58(_0x1188d6,_0x26357e);}C=J([y(0x0,M[_0x3ed0e1(0x189)]),y(0x1,c[_0x3ed0e1(0x1a3)](g))],C);var F=Object[_0x3ed0e1(0x1a5)],L=Object[_0x3ed0e1(0x1bc)],Z=(_0x221d2a,_0xbf73f7,_0xf3daf2)=>_0xbf73f7 in _0x221d2a?F(_0x221d2a,_0xbf73f7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf3daf2}):_0x221d2a[_0xbf73f7]=_0xf3daf2,W=(_0x342011,_0x33161e,_0x556b24,_0x432072)=>{const _0x3cf3c8=_0x3ed0e1;for(var _0x527883=_0x432072>0x1?void 0x0:_0x432072?L(_0x33161e,_0x556b24):_0x33161e,_0x2cc72f=_0x342011[_0x3cf3c8(0x1ad)]-0x1,_0x3b0466;_0x2cc72f>=0x0;_0x2cc72f--)(_0x3b0466=_0x342011[_0x2cc72f])&&(_0x527883=_0x3b0466(_0x527883)||_0x527883);return _0x527883;},O=(_0xd5c228,_0x451b26)=>(_0x53b717,_0x1ebcf8)=>_0x451b26(_0x53b717,_0x1ebcf8,_0xd5c228),N=(_0x12f26b,_0xd2c6fe,_0x2f7a92)=>Z(_0x12f26b,typeof _0xd2c6fe!=_0x3ed0e1(0x19b)?_0xd2c6fe+'':_0xd2c6fe,_0x2f7a92);exports[_0x3ed0e1(0x17b)]=class extends c[_0x3ed0e1(0x191)]{constructor(_0xedef1c=D,_0x29722d,_0x8eefa5){const _0x588ee2=_0x3ed0e1;super(),this[_0x588ee2(0x1c3)]=_0xedef1c,this[_0x588ee2(0x1b6)]=_0x29722d,this[_0x588ee2(0x173)]=_0x8eefa5;const {..._0x2c4bd8}=c[_0x588ee2(0x1bf)]({},D,this['_config']);this[_0x588ee2(0x173)][_0x588ee2(0x15a)](q,_0x2c4bd8);}[_0x3ed0e1(0x19f)](){const _0x24c772=_0x3ed0e1;[[g],[C],[p]][_0x24c772(0x198)](_0x56c892=>{const _0x3ecc33=_0x24c772;this[_0x3ecc33(0x1b6)][_0x3ecc33(0x18c)](_0x56c892);});}[_0x3ed0e1(0x18e)](){const _0x2305c1=_0x3ed0e1;this[_0x2305c1(0x1b6)]['get'](C),this[_0x2305c1(0x1b6)][_0x2305c1(0x19e)](p);}},N(exports[_0x3ed0e1(0x17b)],_0x3ed0e1(0x14a),U),N(exports[_0x3ed0e1(0x17b)],_0x3ed0e1(0x1aa),c[_0x3ed0e1(0x186)][_0x3ed0e1(0x163)]),exports[_0x3ed0e1(0x17b)]=W([c[_0x3ed0e1(0x1a4)](j[_0x3ed0e1(0x1a0)],b[_0x3ed0e1(0x1ac)],T[_0x3ed0e1(0x154)]),O(0x1,c['Inject'](c[_0x3ed0e1(0x1c7)])),O(0x2,c[_0x3ed0e1(0x170)])],exports[_0x3ed0e1(0x17b)]);function _0x436c(){const _0x24b50d=['userID','getMemberID','commentUpdate$','YYYY/MM/DD\x20HH:mm','pipe','pluginName','666080CSWUXD','values','getUnit','requireSession','8900fYYzuf','code','@univerjs-pro/collaboration-client','@univerjs/core','32348580ReHSFt','UniverLicensePlugin','_init','subscribe','replyId','post','dayjs','setConfig','content','Edit','addComment','filter','OpenOrReOpen','disposeWithMe','ThreadCommentModel','CollaborationSessionService','UNIVER_UNKNOWN','solved','_initUserSync','@univerjs/thread-comment','Disposable','replies','dataSource','parse','@univerjs/thread-comment-ui','10455879HdMlkH','@univerjs/network','ref','customRanges','IConfigService','personId','resolved','_configService','18icwPPG','Delete','1844ZrUNlo','user','Solve','UserManagerService','UNRECOGNIZED','UniverThreadCommentDataSourcePlugin','_sessionService','764390unOWpe','CustomRangeType','slice','_httpService','getComment','2VVNpqo','format','Add','body','UniverInstanceType','find','payload','IThreadCommentDataSourceService','syncUpdateMutationToColla','@univerjs-pro/license','add','createTimestamp','onReady','_userService','/universer-api/comment/unit/','Plugin','rangeType','comments','/list','COMMENT','resolveComment','Unknown','forEach','_initDataSource','_commentService','symbol','rangeId','4137nXgCZO','get','onStarting','UniverThreadCommentUIPlugin','error','Reply','Inject','DependentOn','defineProperty','stringify','_threadCommentModel','userId','/delete','type','unitId','UniverCollaborationClientPlugin','length','updateComment','users','HTTPService','/edit','map','addUser','_threadCommentDataSource','delete','_injector','/reply','listComments','Solved','8PmsXer','rxjs','getOwnPropertyDescriptor','root','130rrlTMl','merge','threadId','/add','CommentService','_config','thread-comment-data-source.config','12170835BHTxdr','getCurrentUser','Injector','deleteComment'];_0x436c=function(){return _0x24b50d;};return _0x436c();}
|
|
1
|
+
'use strict';const _0xe1aefe=_0x1394;(function(_0x37c717,_0x383a6b){const _0x40b432=_0x1394,_0x1ce269=_0x37c717();while(!![]){try{const _0x4c3bbc=parseInt(_0x40b432(0x1d9))/0x1*(-parseInt(_0x40b432(0x1ad))/0x2)+parseInt(_0x40b432(0x205))/0x3*(parseInt(_0x40b432(0x1ae))/0x4)+parseInt(_0x40b432(0x1da))/0x5*(parseInt(_0x40b432(0x1cf))/0x6)+parseInt(_0x40b432(0x201))/0x7+-parseInt(_0x40b432(0x1c1))/0x8*(-parseInt(_0x40b432(0x1ac))/0x9)+parseInt(_0x40b432(0x1e5))/0xa*(parseInt(_0x40b432(0x20e))/0xb)+parseInt(_0x40b432(0x1e3))/0xc*(-parseInt(_0x40b432(0x1bb))/0xd);if(_0x4c3bbc===_0x383a6b)break;else _0x1ce269['push'](_0x1ce269['shift']());}catch(_0x483dd5){_0x1ce269['push'](_0x1ce269['shift']());}}}(_0x14c2,0x2879c));Object[_0xe1aefe(0x212)](exports,Symbol[_0xe1aefe(0x1ef)],{'value':_0xe1aefe(0x1fa)});const b=require(_0xe1aefe(0x1a7)),T=require('@univerjs-pro/license'),c=require(_0xe1aefe(0x1bf)),j=require('@univerjs/thread-comment-ui'),M=require(_0xe1aefe(0x1d5)),w=require('rxjs'),P=require(_0xe1aefe(0x200)),U=_0xe1aefe(0x1d8);function _0x1394(_0x464168,_0x46e550){const _0x14c210=_0x14c2();return _0x1394=function(_0x1394d0,_0x2025e9){_0x1394d0=_0x1394d0-0x1a0;let _0x24a771=_0x14c210[_0x1394d0];return _0x24a771;},_0x1394(_0x464168,_0x46e550);}var I=(_0x50fe0f=>(_0x50fe0f[_0x50fe0f['OpenOrReOpen']=0x0]=_0xe1aefe(0x1ec),_0x50fe0f[_0x50fe0f['Solved']=0x1]=_0xe1aefe(0x1b1),_0x50fe0f[_0x50fe0f[_0xe1aefe(0x1d2)]=-0x1]=_0xe1aefe(0x1d2),_0x50fe0f))(I||{}),v=(_0x100286=>(_0x100286[_0x100286[_0xe1aefe(0x1f6)]=0x0]='Unknown',_0x100286[_0x100286[_0xe1aefe(0x1f5)]=0x1]=_0xe1aefe(0x1f5),_0x100286[_0x100286[_0xe1aefe(0x1ed)]=0x2]='Reply',_0x100286[_0x100286['Edit']=0x3]=_0xe1aefe(0x1f8),_0x100286[_0x100286[_0xe1aefe(0x1d3)]=0x4]=_0xe1aefe(0x1d3),_0x100286[_0x100286[_0xe1aefe(0x1b2)]=0x5]=_0xe1aefe(0x1b2),_0x100286[_0x100286[_0xe1aefe(0x1d2)]=-0x1]=_0xe1aefe(0x1d2),_0x100286))(v||{});const f=_0x191129=>c['dayjs'](new Date(+_0x191129))[_0xe1aefe(0x218)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x223901,_0x48f1ad)=>{const _0x49fd36=_0xe1aefe,_0xaa4b72=_0x223901[_0x49fd36(0x1dd)](c[_0x49fd36(0x1cc)]),_0x47647c=_0x223901['get'](P[_0x49fd36(0x1c5)]);_0x48f1ad['forEach'](_0x179025=>{const _0x43cc33=_0x49fd36;_0xaa4b72[_0x43cc33(0x1ca)](_0x179025)&&_0x48f1ad[_0x43cc33(0x1f7)](_0x179025);}),_0x48f1ad[_0x49fd36(0x207)]&&(await _0x47647c['get'](_0x49fd36(0x1fb),{'params':{'userIDs':[..._0x48f1ad]}}))[_0x49fd36(0x209)][_0x49fd36(0x1ce)][_0x49fd36(0x20a)](_0x2222e7=>{const _0x12a470=_0x49fd36;_0x2222e7&&_0xaa4b72[_0x12a470(0x1c3)](_0x2222e7);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x7ed44d,_0x5daa4c,_0x445ec1,_0x36e809)=>{const _0x48d1ee=_0xe1aefe;for(var _0x54a611=_0x36e809>0x1?void 0x0:_0x36e809?$(_0x5daa4c,_0x445ec1):_0x5daa4c,_0x3105d4=_0x7ed44d[_0x48d1ee(0x1b5)]-0x1,_0x19aff9;_0x3105d4>=0x0;_0x3105d4--)(_0x19aff9=_0x7ed44d[_0x3105d4])&&(_0x54a611=_0x19aff9(_0x54a611)||_0x54a611);return _0x54a611;},S=(_0x3e987a,_0x2df285)=>(_0x2a50d7,_0x57174f)=>_0x2df285(_0x2a50d7,_0x57174f,_0x3e987a);let p=class extends c[_0xe1aefe(0x1db)]{constructor(_0x2edaec,_0x225ff8,_0x4cebfa,_0x195d81){const _0x31fcce=_0xe1aefe;super(),this[_0x31fcce(0x210)]=_0x2edaec,this['_threadCommentModel']=_0x225ff8,this[_0x31fcce(0x219)]=_0x4cebfa,this[_0x31fcce(0x1f3)]=_0x195d81,this['_init'](),this[_0x31fcce(0x1c8)]();}['_initUserSync'](){const _0x3e93bf=_0xe1aefe;this['disposeWithMe'](this[_0x3e93bf(0x1d6)][_0x3e93bf(0x1a4)]['pipe'](w[_0x3e93bf(0x202)](0x10))[_0x3e93bf(0x1df)](_0x2de6be=>{const _0x55fb74=_0x3e93bf,_0x1f7b5b=new Set();_0x2de6be[_0x55fb74(0x20a)](_0x57ead4=>{const _0x10161b=_0x55fb74;switch(_0x57ead4[_0x10161b(0x1ee)]){case _0x10161b(0x1b3):{const _0x2550b7=_0x57ead4['payload']['personId'];_0x1f7b5b['add'](_0x2550b7);break;}}}),R(this[_0x55fb74(0x1f3)],_0x1f7b5b);}));}[_0xe1aefe(0x20d)](){const _0x5e988f=_0xe1aefe;this[_0x5e988f(0x1a6)](this[_0x5e988f(0x210)][_0x5e988f(0x1a4)]['subscribe'](async _0x193701=>{const _0x3f33b0=_0x5e988f;var _0x25e79c,_0x3aa59f,_0x21dec5,_0xa6f1a8;const _0x337025=(_0x25e79c=this['_threadCommentModel']['getUnit'](_0x193701[_0x3f33b0(0x1d4)])[_0x3f33b0(0x1e0)](_0x5edd73=>_0x5edd73[_0x3f33b0(0x1b4)]===_0x193701[_0x3f33b0(0x1b4)]))==null?void 0x0:_0x25e79c[_0x3f33b0(0x1fd)];if(!_0x337025)return;const {unitId:_0x1f9186,subUnitId:_0x33ada7}=_0x337025;switch(_0x193701[_0x3f33b0(0x213)]&&this['_userService'][_0x3f33b0(0x1c3)](_0x193701[_0x3f33b0(0x213)]),_0x193701[_0x3f33b0(0x1ee)]){case v['Add']:break;case v[_0x3f33b0(0x1ed)]:{this[_0x3f33b0(0x1d6)][_0x3f33b0(0x1be)](_0x1f9186,_0x33ada7,{'unitId':_0x1f9186,'subUnitId':_0x33ada7,'ref':'','id':_0x193701[_0x3f33b0(0x1c6)],'dT':f(+_0x193701[_0x3f33b0(0x1c7)]),'threadId':_0x193701[_0x3f33b0(0x1b4)],'personId':(_0x21dec5=(_0x3aa59f=_0x193701[_0x3f33b0(0x213)])==null?void 0x0:_0x3aa59f[_0x3f33b0(0x1e4)])!=null?_0x21dec5:_0x193701[_0x3f33b0(0x1cd)],'text':JSON[_0x3f33b0(0x21b)](_0x193701[_0x3f33b0(0x20b)]),'parentId':_0x337025['id']});break;}case v[_0x3f33b0(0x1d3)]:{const _0xc0adb3=this['_threadCommentModel'][_0x3f33b0(0x203)](_0x1f9186,_0x33ada7,_0x193701[_0x3f33b0(0x1c6)]);_0xc0adb3&&_0xc0adb3['parentId']&&this[_0x3f33b0(0x1d6)]['deleteComment'](_0x1f9186,_0x33ada7,_0x193701[_0x3f33b0(0x1c6)]);break;}case v['Edit']:{this[_0x3f33b0(0x1d6)]['updateComment'](_0x1f9186,_0x33ada7,{'commentId':_0x193701[_0x3f33b0(0x1c6)],'text':JSON[_0x3f33b0(0x21b)](_0x193701[_0x3f33b0(0x20b)])});break;}case v[_0x3f33b0(0x1b2)]:{const _0x34a697=(_0xa6f1a8=this['_threadCommentModel'][_0x3f33b0(0x1ea)](_0x193701[_0x3f33b0(0x1d4)])[_0x3f33b0(0x1e0)](_0x1a1c2b=>_0x1a1c2b[_0x3f33b0(0x1b4)]===_0x193701[_0x3f33b0(0x1b4)]))==null?void 0x0:_0xa6f1a8[_0x3f33b0(0x1fd)];_0x34a697&&this['_threadCommentModel']['resolveComment'](_0x1f9186,_0x33ada7,_0x34a697['id'],_0x193701[_0x3f33b0(0x1de)]===I[_0x3f33b0(0x1b1)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0xe1aefe(0x1a3)])),S(0x1,c[_0xe1aefe(0x1ba)](M['ThreadCommentModel'])),S(0x2,c[_0xe1aefe(0x1ba)](c[_0xe1aefe(0x1cc)])),S(0x3,c[_0xe1aefe(0x1ba)](c[_0xe1aefe(0x21a)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0xe1aefe(0x1d0)],x=(_0x5f2976,_0x2417b3,_0x325a04,_0x4af8fa)=>{const _0x38cd95=_0xe1aefe;for(var _0x3aa20e=_0x4af8fa>0x1?void 0x0:_0x4af8fa?A(_0x2417b3,_0x325a04):_0x2417b3,_0x433d05=_0x5f2976[_0x38cd95(0x1b5)]-0x1,_0xc62b48;_0x433d05>=0x0;_0x433d05--)(_0xc62b48=_0x5f2976[_0x433d05])&&(_0x3aa20e=_0xc62b48(_0x3aa20e)||_0x3aa20e);return _0x3aa20e;},_=(_0x56f058,_0x5472de)=>(_0x21d136,_0x1c1bcf)=>_0x5472de(_0x21d136,_0x1c1bcf,_0x56f058);function Y(_0x58bece,_0x3be2a5){const _0x56c291=_0xe1aefe,_0x2c6473=_0x58bece[_0x56c291(0x216)][0x0];return{..._0x3be2a5,'id':_0x2c6473[_0x56c291(0x1c6)],'resolved':_0x58bece['solved']===0x1,'dT':f(_0x2c6473[_0x56c291(0x1c7)]),'personId':_0x2c6473[_0x56c291(0x1cd)],'threadId':_0x2c6473[_0x56c291(0x1b4)]};}function G(_0x50afd9,_0x8f8a3c,_0x372736){const _0xee59da=_0xe1aefe;var _0x2b4a62,_0x4d7fdc;if(((_0x4d7fdc=(_0x2b4a62=_0x50afd9==null?void 0x0:_0x50afd9[_0xee59da(0x216)])==null?void 0x0:_0x2b4a62[_0xee59da(0x1b5)])!=null?_0x4d7fdc:0x0)>0x0){const _0x2751c2=(_0x3fec09,_0x282433)=>({'id':_0x3fec09[_0xee59da(0x1c6)],'threadId':_0x3fec09[_0xee59da(0x1b4)],'dT':f(_0x3fec09['createTimestamp']),'personId':_0x3fec09[_0xee59da(0x1cd)],'resolved':_0x50afd9[_0xee59da(0x1de)]===I[_0xee59da(0x1b1)],'unitId':_0x8f8a3c,'subUnitId':_0x372736,'text':JSON['parse'](_0x3fec09['content']),'parentId':_0x282433}),_0x3e38f0=_0x2751c2(_0x50afd9[_0xee59da(0x216)][0x0]);return{..._0x3e38f0,'children':_0x50afd9[_0xee59da(0x216)][_0xee59da(0x1f9)](0x1)['map'](_0x337be0=>_0x2751c2(_0x337be0,_0x3e38f0['id']))};}return null;}let g=class{constructor(_0x365d19,_0x22b212,_0x23347a,_0x23af9c){const _0x59a160=_0xe1aefe;this[_0x59a160(0x1cb)]=_0x365d19,this['_userService']=_0x22b212,this[_0x59a160(0x1b7)]=_0x23347a,this['_injector']=_0x23af9c;}async[_0xe1aefe(0x1be)](_0xf5d0d2){const _0x392dcc=_0xe1aefe;var _0x9605bd,_0x579523;const {parentId:_0x68723a,unitId:_0x3be9cc,text:_0x242a39,threadId:_0x1bc435}=_0xf5d0d2,_0xb96b84=(_0x579523=(_0x9605bd=_0x242a39[_0x392dcc(0x1dc)])==null?void 0x0:_0x9605bd['filter'](_0x59a454=>_0x59a454['rangeType']===c[_0x392dcc(0x1eb)]['COMMENT'])[_0x392dcc(0x1af)](_0x26d3a4=>_0x26d3a4[_0x392dcc(0x217)]))!=null?_0x579523:[],_0xa6b75b=JSON['stringify'](_0x242a39),_0x547c69=(await this[_0x392dcc(0x1b7)][_0x392dcc(0x206)](_0x3be9cc))[_0x392dcc(0x1a8)]();if(_0x68723a){const _0x3123ac={'memberId':_0x547c69,'unitId':_0x3be9cc,'content':_0xa6b75b,'mention':_0xb96b84,'threadId':_0x1bc435},_0x3f29e7=(await this[_0x392dcc(0x1cb)][_0x392dcc(0x1fe)](_0x392dcc(0x1a1)+_0x3be9cc+_0x392dcc(0x1f4),{'body':_0x3123ac}))[_0x392dcc(0x209)]['reply'];return{..._0xf5d0d2,'id':_0x3f29e7[_0x392dcc(0x1c6)],'dT':c[_0x392dcc(0x1e7)](+_0x3f29e7[_0x392dcc(0x1c7)])[_0x392dcc(0x218)](_0x392dcc(0x1b0)),'personId':_0x3f29e7[_0x392dcc(0x1cd)]};}else{const _0xdde6ec={'memberId':_0x547c69,'unitId':_0x3be9cc,'content':_0xa6b75b,'mention':_0xb96b84},_0x550da7=await this[_0x392dcc(0x1cb)]['post'](_0x392dcc(0x1a1)+_0x3be9cc+_0x392dcc(0x20f),{'body':_0xdde6ec});return Y(_0x550da7[_0x392dcc(0x209)]['comment'],_0xf5d0d2);}}async[_0xe1aefe(0x1e1)](_0x34065a){const _0xce3689=_0xe1aefe;var _0x1d2e1d,_0x3a9006;const {text:_0x295aff,unitId:_0x464042}=_0x34065a,_0x161804=(_0x3a9006=(_0x1d2e1d=_0x295aff[_0xce3689(0x1dc)])==null?void 0x0:_0x1d2e1d[_0xce3689(0x1fc)](_0x3c9db3=>_0x3c9db3[_0xce3689(0x1f2)]===c[_0xce3689(0x1eb)][_0xce3689(0x1ab)])[_0xce3689(0x1af)](_0x3bc769=>_0x3bc769['rangeId']))!=null?_0x3a9006:[],_0x2b9adb=JSON[_0xce3689(0x1aa)](_0x295aff),_0x10bf1b=_0x34065a[_0xce3689(0x1b4)],_0x54e323=_0x34065a['id'],_0x4bb5d0={'memberId':(await this[_0xce3689(0x1b7)][_0xce3689(0x206)](_0x464042))[_0xce3689(0x1a8)](),'unitId':_0x464042,'threadId':_0x10bf1b,'mention':_0x161804,'content':_0x2b9adb,'replyId':_0x54e323},_0x3c0093=await this[_0xce3689(0x1cb)][_0xce3689(0x1fe)](_0xce3689(0x1a1)+_0x464042+'/edit',{'body':_0x4bb5d0});return!_0x3c0093[_0xce3689(0x209)][_0xce3689(0x204)]||_0x3c0093[_0xce3689(0x209)][_0xce3689(0x204)][_0xce3689(0x1a9)]===0x1;}async[_0xe1aefe(0x1f1)](_0x42058c){const _0xb0c81a=_0xe1aefe,{unitId:_0x521d76}=_0x42058c,_0x3b2b8e=_0x42058c['threadId'],_0x9a9a27={'memberId':this[_0xb0c81a(0x219)][_0xb0c81a(0x1b9)]()['userID'],'unitId':_0x521d76,'threadId':_0x3b2b8e,'solved':_0x42058c[_0xb0c81a(0x1bc)]?I[_0xb0c81a(0x1b1)]:I['OpenOrReOpen']},_0x1bca30=await this[_0xb0c81a(0x1cb)][_0xb0c81a(0x1fe)](_0xb0c81a(0x1a1)+_0x521d76+_0xb0c81a(0x1c2),{'body':_0x9a9a27});return!_0x1bca30[_0xb0c81a(0x209)]['error']||_0x1bca30[_0xb0c81a(0x209)][_0xb0c81a(0x204)][_0xb0c81a(0x1a9)]===0x1;}async[_0xe1aefe(0x1d7)](_0x20de65,_0x4aff21,_0x28630f,_0x34d482){const _0x526689=_0xe1aefe,_0x20e75e={'memberId':(await this[_0x526689(0x1b7)][_0x526689(0x206)](_0x20de65))[_0x526689(0x1a8)](),'threadId':_0x28630f,'replyId':_0x34d482,'unitId':_0x20de65},_0x104e58=await this[_0x526689(0x1cb)]['post'](_0x526689(0x1a1)+_0x20de65+_0x526689(0x1a2),{'body':_0x20e75e});return!_0x104e58[_0x526689(0x209)][_0x526689(0x204)]||_0x104e58[_0x526689(0x209)][_0x526689(0x204)][_0x526689(0x1a9)]===0x1;}async[_0xe1aefe(0x1a5)](_0x4d2eed,_0x4a1ae8,_0xd35450){const _0x56ac29=_0xe1aefe,_0x391357={'unitId':_0x4d2eed,'threadId':_0xd35450},_0x14f780=await this[_0x56ac29(0x1cb)][_0x56ac29(0x1fe)](_0x56ac29(0x1a1)+_0x4d2eed+'/list',{'body':_0x391357}),_0x442f94=_0xd35450[_0x56ac29(0x1af)](_0x52f89a=>G(_0x14f780[_0x56ac29(0x209)][_0x56ac29(0x214)][_0x52f89a],_0x4d2eed,_0x4a1ae8))[_0x56ac29(0x1fc)](Boolean);return Object['values'](_0x14f780[_0x56ac29(0x209)]['users'])[_0x56ac29(0x20a)](_0x3ff0ed=>{const _0x2e6611=_0x56ac29;this[_0x2e6611(0x219)][_0x2e6611(0x1c3)](_0x3ff0ed);}),_0x442f94;}['saveCommentToSnapshot'](_0x2caca4){const _0x39ee8a=_0xe1aefe;return{'id':_0x2caca4['id'],'threadId':_0x2caca4[_0x39ee8a(0x1b4)],'ref':_0x2caca4[_0x39ee8a(0x1a0)]};}};g=x([_(0x0,c[_0xe1aefe(0x1ba)](P[_0xe1aefe(0x1c5)])),_(0x1,c[_0xe1aefe(0x1ba)](c[_0xe1aefe(0x1cc)])),_(0x2,c[_0xe1aefe(0x1ba)](b[_0xe1aefe(0x1e8)])),_(0x3,c[_0xe1aefe(0x1ba)](c['Injector']))],g);var H=Object[_0xe1aefe(0x1d0)],J=(_0x3716ea,_0x5a199b,_0x5d1021,_0xce1911)=>{for(var _0x3b2ff3=_0xce1911>0x1?void 0x0:_0xce1911?H(_0x5a199b,_0x5d1021):_0x5a199b,_0xd3c4a2=_0x3716ea['length']-0x1,_0x48f1b6;_0xd3c4a2>=0x0;_0xd3c4a2--)(_0x48f1b6=_0x3716ea[_0xd3c4a2])&&(_0x3b2ff3=_0x48f1b6(_0x3b2ff3)||_0x3b2ff3);return _0x3b2ff3;},y=(_0x113c6f,_0x317f4d)=>(_0x272f4c,_0x182110)=>_0x317f4d(_0x272f4c,_0x182110,_0x113c6f);let C=class extends c[_0xe1aefe(0x1db)]{constructor(_0x1284b8,_0x5b4e85){const _0x2496cf=_0xe1aefe;super(),this[_0x2496cf(0x1b8)]=_0x1284b8,this['_threadCommentDataSource']=_0x5b4e85,this['_initDataSource']();}['_initDataSource'](){const _0xe332a=_0xe1aefe;this[_0xe332a(0x1b8)]['dataSource']=this['_threadCommentDataSource'],this[_0xe332a(0x1b8)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0xe1aefe(0x1bd)]),y(0x1,c[_0xe1aefe(0x1ba)](g))],C);var F=Object[_0xe1aefe(0x212)],L=Object[_0xe1aefe(0x1d0)],Z=(_0x4423b3,_0x3acba7,_0x3166f0)=>_0x3acba7 in _0x4423b3?F(_0x4423b3,_0x3acba7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3166f0}):_0x4423b3[_0x3acba7]=_0x3166f0,W=(_0x128521,_0x5d47f9,_0xc1731c,_0x4ddcb0)=>{for(var _0x2935ee=_0x4ddcb0>0x1?void 0x0:_0x4ddcb0?L(_0x5d47f9,_0xc1731c):_0x5d47f9,_0x5d9fb0=_0x128521['length']-0x1,_0x24ec9d;_0x5d9fb0>=0x0;_0x5d9fb0--)(_0x24ec9d=_0x128521[_0x5d9fb0])&&(_0x2935ee=_0x24ec9d(_0x2935ee)||_0x2935ee);return _0x2935ee;},O=(_0xa924fd,_0x2be91c)=>(_0x1c61ec,_0x4b8fb0)=>_0x2be91c(_0x1c61ec,_0x4b8fb0,_0xa924fd),N=(_0x5b1c03,_0x3f86be,_0x84325e)=>Z(_0x5b1c03,typeof _0x3f86be!=_0xe1aefe(0x1c9)?_0x3f86be+'':_0x3f86be,_0x84325e);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0xe1aefe(0x1e9)]{constructor(_0x5d1dfb=D,_0x57020a,_0x596e27){const _0x56ac47=_0xe1aefe;super(),this[_0x56ac47(0x1c4)]=_0x5d1dfb,this['_injector']=_0x57020a,this['_configService']=_0x596e27;const {..._0x417497}=c[_0x56ac47(0x1e6)]({},D,this[_0x56ac47(0x1c4)]);this[_0x56ac47(0x1f0)][_0x56ac47(0x1c0)](q,_0x417497);}[_0xe1aefe(0x1e2)](){const _0x1976a7=_0xe1aefe;[[g],[C],[p]][_0x1976a7(0x20a)](_0x5ef98e=>{const _0x493e1f=_0x1976a7;this[_0x493e1f(0x1f3)][_0x493e1f(0x1b3)](_0x5ef98e);});}['onReady'](){const _0x16c515=_0xe1aefe;this[_0x16c515(0x1f3)]['get'](C),this[_0x16c515(0x1f3)][_0x16c515(0x1dd)](p);}},N(exports[_0xe1aefe(0x211)],_0xe1aefe(0x20c),U),N(exports[_0xe1aefe(0x211)],_0xe1aefe(0x1ee),c[_0xe1aefe(0x1ff)][_0xe1aefe(0x1b6)]),exports[_0xe1aefe(0x211)]=W([c['DependentOn'](j[_0xe1aefe(0x1d1)],b['UniverCollaborationClientPlugin'],T[_0xe1aefe(0x208)]),O(0x1,c[_0xe1aefe(0x1ba)](c['Injector'])),O(0x2,c[_0xe1aefe(0x215)])],exports['UniverThreadCommentDataSourcePlugin']);function _0x14c2(){const _0x44fd7c=['Solve','add','threadId','length','UNIVER_UNKNOWN','_sessionService','_threadCommentDataSourceService','getCurrentUser','Inject','403RCaNFn','resolved','IThreadCommentDataSourceService','addComment','@univerjs/core','setConfig','276384QEwepn','/solved','addUser','_config','HTTPService','replyId','createTimestamp','_initUserSync','symbol','getUser','_httpService','UserManagerService','userId','users','1032kBfUtw','getOwnPropertyDescriptor','UniverThreadCommentUIPlugin','UNRECOGNIZED','Delete','unitId','@univerjs/thread-comment','_threadCommentModel','deleteComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','5442cMCaBr','2715ptkqKk','Disposable','customRanges','get','solved','subscribe','find','updateComment','onStarting','258972oCNEgI','userID','19330EGCvRG','merge','dayjs','CollaborationSessionService','Plugin','getUnit','CustomRangeType','OpenOrReOpen','Reply','type','toStringTag','_configService','resolveComment','rangeType','_injector','/reply','Add','Unknown','delete','Edit','slice','Module','/universer-api/user/list','filter','root','post','UniverInstanceType','@univerjs/network','2000803bySzUq','bufferTime','getComment','error','12DHnQAl','requireSession','size','UniverLicensePlugin','body','forEach','content','pluginName','_init','638brQNOC','/add','_commentService','UniverThreadCommentDataSourcePlugin','defineProperty','user','comments','IConfigService','replies','rangeId','format','_userService','Injector','parse','ref','/universer-api/comment/unit/','/delete','CommentService','commentUpdate$','listComments','disposeWithMe','@univerjs-pro/collaboration-client','getMemberID','code','stringify','COMMENT','63BlyExk','84cMBugn','330188aCzRnE','map','YYYY/MM/DD\x20HH:mm','Solved'];_0x14c2=function(){return _0x44fd7c;};return _0x14c2();}
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x8eb16d=_0xa644;(function(_0x26f565,_0x4a5003){const _0x54cbc0=_0xa644,_0x11892c=_0x26f565();while(!![]){try{const _0x4e8a81=-parseInt(_0x54cbc0(0x181))/0x1*(parseInt(_0x54cbc0(0x1c4))/0x2)+-parseInt(_0x54cbc0(0x19a))/0x3*(-parseInt(_0x54cbc0(0x16b))/0x4)+parseInt(_0x54cbc0(0x176))/0x5+parseInt(_0x54cbc0(0x16e))/0x6*(-parseInt(_0x54cbc0(0x1a9))/0x7)+parseInt(_0x54cbc0(0x194))/0x8+-parseInt(_0x54cbc0(0x177))/0x9+parseInt(_0x54cbc0(0x1a7))/0xa;if(_0x4e8a81===_0x4a5003)break;else _0x11892c['push'](_0x11892c['shift']());}catch(_0x47526e){_0x11892c['push'](_0x11892c['shift']());}}}(_0x118a,0x2f9ea));import{CommentService as _0x1ccc3b,CollaborationSessionService as _0x3d3196,UniverCollaborationClientPlugin as _0x2caa97}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xe51017}from'@univerjs-pro/license';import{dayjs as _0x5eb8ae,UserManagerService as _0x4ba4f5,Inject as _0xdc24c4,Injector as _0x446729,Disposable as _0x4f817d,CustomRangeType as _0x19605a,UniverInstanceType as _0x20c5bd,DependentOn as _0x5aa5bd,IConfigService as _0x17f2a0,Plugin as _0x1d9dc9,merge as _0x147312}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x24bb62}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5c51a6,IThreadCommentDataSourceService as _0x1004f0}from'@univerjs/thread-comment';import{bufferTime as _0x200bd8}from'rxjs';import{HTTPService as _0x40e085}from'@univerjs/network';const W=_0x8eb16d(0x180);var I=(_0x4ed037=>(_0x4ed037[_0x4ed037[_0x8eb16d(0x1a2)]=0x0]='OpenOrReOpen',_0x4ed037[_0x4ed037[_0x8eb16d(0x1ce)]=0x1]=_0x8eb16d(0x1ce),_0x4ed037[_0x4ed037[_0x8eb16d(0x191)]=-0x1]='UNRECOGNIZED',_0x4ed037))(I||{}),v=(_0x4bf901=>(_0x4bf901[_0x4bf901[_0x8eb16d(0x192)]=0x0]=_0x8eb16d(0x192),_0x4bf901[_0x4bf901[_0x8eb16d(0x17e)]=0x1]=_0x8eb16d(0x17e),_0x4bf901[_0x4bf901['Reply']=0x2]='Reply',_0x4bf901[_0x4bf901[_0x8eb16d(0x17d)]=0x3]=_0x8eb16d(0x17d),_0x4bf901[_0x4bf901['Delete']=0x4]=_0x8eb16d(0x1b7),_0x4bf901[_0x4bf901[_0x8eb16d(0x197)]=0x5]=_0x8eb16d(0x197),_0x4bf901[_0x4bf901[_0x8eb16d(0x191)]=-0x1]=_0x8eb16d(0x191),_0x4bf901))(v||{});function _0x118a(){const _0x46d758=['6329fRKInW','syncUpdateMutationToColla','solved','parentId','customRanges','getMemberID','get','ref','saveCommentToSnapshot','_initUserSync','error','replyId','COMMENT','size','_threadCommentDataSource','length','UNRECOGNIZED','Unknown','userId','1711568NOOgTA','pipe','dataSource','Solve','getUser','content','3RcYeMr','_init','commentUpdate$','subscribe','/add','_config','setConfig','updateComment','OpenOrReOpen','user','getComment','symbol','add','4622420jpGjrG','body','1059730qnvOdn','payload','type','_httpService','createTimestamp','onStarting','userID','filter','root','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','_initDataSource','unitId','find','Delete','deleteComment','pluginName','reply','parse','Reply','defineProperty','_sessionService','_injector','UNIVER_UNKNOWN','post','/delete','/universer-api/user/list','56oJQoaw','threadId','/universer-api/comment/unit/','/list','forEach','listComments','users','_userService','map','values','Solved','replies','116868tYUBEI','_threadCommentModel','getCurrentUser','6dqmWOu','resolveComment','rangeId','addComment','_commentService','stringify','/solved','addUser','1028480wZfnXW','3487041OtjmXa','requireSession','getOwnPropertyDescriptor','getUnit','disposeWithMe','code','Edit','Add','onReady','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x118a=function(){return _0x46d758;};return _0x118a();}const D=_0x142eb4=>_0x5eb8ae(new Date(+_0x142eb4))['format'](_0x8eb16d(0x1b2)),B=async(_0x342391,_0x1ee11b)=>{const _0x3a57ee=_0x8eb16d,_0x30d120=_0x342391[_0x3a57ee(0x187)](_0x4ba4f5),_0xa4e10e=_0x342391[_0x3a57ee(0x187)](_0x40e085);_0x1ee11b[_0x3a57ee(0x1c8)](_0xf2ed1d=>{const _0x25ad56=_0x3a57ee;_0x30d120[_0x25ad56(0x198)](_0xf2ed1d)&&_0x1ee11b['delete'](_0xf2ed1d);}),_0x1ee11b[_0x3a57ee(0x18e)]&&(await _0xa4e10e[_0x3a57ee(0x187)](_0x3a57ee(0x1c3),{'params':{'userIDs':[..._0x1ee11b]}}))[_0x3a57ee(0x1a8)][_0x3a57ee(0x1ca)]['forEach'](_0x3019f4=>{const _0x281dd2=_0x3a57ee;_0x3019f4&&_0x30d120[_0x281dd2(0x175)](_0x3019f4);});};var K=Object[_0x8eb16d(0x179)],V=(_0x3c5927,_0x5460f6,_0x354784,_0x17d86c)=>{for(var _0x58200e=_0x17d86c>0x1?void 0x0:_0x17d86c?K(_0x5460f6,_0x354784):_0x5460f6,_0x5be380=_0x3c5927['length']-0x1,_0x4f4b0b;_0x5be380>=0x0;_0x5be380--)(_0x4f4b0b=_0x3c5927[_0x5be380])&&(_0x58200e=_0x4f4b0b(_0x58200e)||_0x58200e);return _0x58200e;},p=(_0x404226,_0x10b535)=>(_0x5efc4f,_0x5a6ec1)=>_0x10b535(_0x5efc4f,_0x5a6ec1,_0x404226);let S=class extends _0x4f817d{constructor(_0x3cb562,_0x2ffe30,_0x1dd3ff,_0x57a9dc){const _0x206d68=_0x8eb16d;super(),this['_commentService']=_0x3cb562,this[_0x206d68(0x16c)]=_0x2ffe30,this['_userService']=_0x1dd3ff,this['_injector']=_0x57a9dc,this[_0x206d68(0x19b)](),this[_0x206d68(0x18a)]();}[_0x8eb16d(0x18a)](){const _0x389b82=_0x8eb16d;this[_0x389b82(0x17b)](this[_0x389b82(0x16c)]['commentUpdate$'][_0x389b82(0x195)](_0x200bd8(0x10))[_0x389b82(0x19d)](_0x1eff56=>{const _0x486510=_0x389b82,_0xa1cf08=new Set();_0x1eff56[_0x486510(0x1c8)](_0x377008=>{const _0x1c4306=_0x486510;switch(_0x377008[_0x1c4306(0x1ab)]){case _0x1c4306(0x1a6):{const _0x5e5b80=_0x377008[_0x1c4306(0x1aa)]['personId'];_0xa1cf08[_0x1c4306(0x1a6)](_0x5e5b80);break;}}}),B(this[_0x486510(0x1bf)],_0xa1cf08);}));}['_init'](){const _0x4cb971=_0x8eb16d;this['disposeWithMe'](this[_0x4cb971(0x172)][_0x4cb971(0x19c)][_0x4cb971(0x19d)](async _0x80891f=>{const _0x27846d=_0x4cb971;var _0x2c0708,_0x16aaed,_0x1dbd4f,_0x479cc1;const _0xe01919=(_0x2c0708=this[_0x27846d(0x16c)][_0x27846d(0x17a)](_0x80891f['unitId'])[_0x27846d(0x1b6)](_0x17b8ca=>_0x17b8ca[_0x27846d(0x1c5)]===_0x80891f[_0x27846d(0x1c5)]))==null?void 0x0:_0x2c0708[_0x27846d(0x1b1)];if(!_0xe01919)return;const {unitId:_0x24c545,subUnitId:_0x506b4d}=_0xe01919;switch(_0x80891f['user']&&this[_0x27846d(0x1cb)]['addUser'](_0x80891f[_0x27846d(0x1a3)]),_0x80891f[_0x27846d(0x1ab)]){case v[_0x27846d(0x17e)]:break;case v[_0x27846d(0x1bc)]:{this[_0x27846d(0x16c)][_0x27846d(0x171)](_0x24c545,_0x506b4d,{'unitId':_0x24c545,'subUnitId':_0x506b4d,'ref':'','id':_0x80891f[_0x27846d(0x18c)],'dT':D(+_0x80891f[_0x27846d(0x1ad)]),'threadId':_0x80891f[_0x27846d(0x1c5)],'personId':(_0x1dbd4f=(_0x16aaed=_0x80891f[_0x27846d(0x1a3)])==null?void 0x0:_0x16aaed['userID'])!=null?_0x1dbd4f:_0x80891f['userId'],'text':JSON[_0x27846d(0x1bb)](_0x80891f['content']),'parentId':_0xe01919['id']});break;}case v[_0x27846d(0x1b7)]:{const _0x121518=this['_threadCommentModel'][_0x27846d(0x1a4)](_0x24c545,_0x506b4d,_0x80891f[_0x27846d(0x18c)]);_0x121518&&_0x121518[_0x27846d(0x184)]&&this[_0x27846d(0x16c)][_0x27846d(0x1b8)](_0x24c545,_0x506b4d,_0x80891f[_0x27846d(0x18c)]);break;}case v[_0x27846d(0x17d)]:{this[_0x27846d(0x16c)][_0x27846d(0x1a1)](_0x24c545,_0x506b4d,{'commentId':_0x80891f[_0x27846d(0x18c)],'text':JSON['parse'](_0x80891f[_0x27846d(0x199)])});break;}case v[_0x27846d(0x197)]:{const _0x52d86e=(_0x479cc1=this[_0x27846d(0x16c)]['getUnit'](_0x80891f[_0x27846d(0x1b5)])[_0x27846d(0x1b6)](_0x3f9878=>_0x3f9878[_0x27846d(0x1c5)]===_0x80891f[_0x27846d(0x1c5)]))==null?void 0x0:_0x479cc1[_0x27846d(0x1b1)];_0x52d86e&&this[_0x27846d(0x16c)]['resolveComment'](_0x24c545,_0x506b4d,_0x52d86e['id'],_0x80891f[_0x27846d(0x183)]===I[_0x27846d(0x1ce)]);break;}}}));}};S=V([p(0x0,_0xdc24c4(_0x1ccc3b)),p(0x1,_0xdc24c4(_0x5c51a6)),p(0x2,_0xdc24c4(_0x4ba4f5)),p(0x3,_0xdc24c4(_0x446729))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x17c693,_0x4d23a6,_0x2984df,_0xa31c13)=>{for(var _0xdc3e2d=_0xa31c13>0x1?void 0x0:_0xa31c13?k(_0x4d23a6,_0x2984df):_0x4d23a6,_0x36cdd9=_0x17c693['length']-0x1,_0x54f304;_0x36cdd9>=0x0;_0x36cdd9--)(_0x54f304=_0x17c693[_0x36cdd9])&&(_0xdc3e2d=_0x54f304(_0xdc3e2d)||_0xdc3e2d);return _0xdc3e2d;},_=(_0xe4c82f,_0x57f10e)=>(_0x16a164,_0x55a361)=>_0x57f10e(_0x16a164,_0x55a361,_0xe4c82f);function X(_0x5d0474,_0x1f2072){const _0x1b1af5=_0x8eb16d,_0x4ec919=_0x5d0474[_0x1b1af5(0x16a)][0x0];return{..._0x1f2072,'id':_0x4ec919['replyId'],'resolved':_0x5d0474[_0x1b1af5(0x183)]===0x1,'dT':D(_0x4ec919[_0x1b1af5(0x1ad)]),'personId':_0x4ec919['userId'],'threadId':_0x4ec919[_0x1b1af5(0x1c5)]};}function ee(_0x1dc058,_0x1d33a1,_0x4a29b8){const _0x3e4429=_0x8eb16d;var _0x16905e,_0x380e3e;if(((_0x380e3e=(_0x16905e=_0x1dc058==null?void 0x0:_0x1dc058[_0x3e4429(0x16a)])==null?void 0x0:_0x16905e[_0x3e4429(0x190)])!=null?_0x380e3e:0x0)>0x0){const _0x12a6fc=(_0x26be21,_0x102ff0)=>({'id':_0x26be21[_0x3e4429(0x18c)],'threadId':_0x26be21[_0x3e4429(0x1c5)],'dT':D(_0x26be21['createTimestamp']),'personId':_0x26be21[_0x3e4429(0x193)],'resolved':_0x1dc058[_0x3e4429(0x183)]===I['Solved'],'unitId':_0x1d33a1,'subUnitId':_0x4a29b8,'text':JSON[_0x3e4429(0x1bb)](_0x26be21[_0x3e4429(0x199)]),'parentId':_0x102ff0}),_0xa1c339=_0x12a6fc(_0x1dc058[_0x3e4429(0x16a)][0x0]);return{..._0xa1c339,'children':_0x1dc058[_0x3e4429(0x16a)]['slice'](0x1)['map'](_0x4353c8=>_0x12a6fc(_0x4353c8,_0xa1c339['id']))};}return null;}let f=class{constructor(_0xd527d1,_0x7b2f99,_0x5854ac,_0x43c529){const _0x16cda7=_0x8eb16d;this[_0x16cda7(0x1ac)]=_0xd527d1,this['_userService']=_0x7b2f99,this[_0x16cda7(0x1be)]=_0x5854ac,this[_0x16cda7(0x1bf)]=_0x43c529;}async['addComment'](_0x4e7085){const _0x3cabd4=_0x8eb16d;var _0x3d1b7c,_0x559fb9;const {parentId:_0x2ba49e,unitId:_0x460949,text:_0x1deed3,threadId:_0x96e33}=_0x4e7085,_0x3a2114=(_0x559fb9=(_0x3d1b7c=_0x1deed3[_0x3cabd4(0x185)])==null?void 0x0:_0x3d1b7c['filter'](_0x3cee94=>_0x3cee94['rangeType']===_0x19605a[_0x3cabd4(0x18d)])[_0x3cabd4(0x1cc)](_0x570fe8=>_0x570fe8['rangeId']))!=null?_0x559fb9:[],_0x4e9bb1=JSON[_0x3cabd4(0x173)](_0x1deed3),_0xaf8c4=(await this['_sessionService'][_0x3cabd4(0x178)](_0x460949))[_0x3cabd4(0x186)]();if(_0x2ba49e){const _0x3c9c5e={'memberId':_0xaf8c4,'unitId':_0x460949,'content':_0x4e9bb1,'mention':_0x3a2114,'threadId':_0x96e33},_0x7d3202=(await this[_0x3cabd4(0x1ac)][_0x3cabd4(0x1c1)](_0x3cabd4(0x1c6)+_0x460949+'/reply',{'body':_0x3c9c5e}))['body'][_0x3cabd4(0x1ba)];return{..._0x4e7085,'id':_0x7d3202[_0x3cabd4(0x18c)],'dT':_0x5eb8ae(+_0x7d3202[_0x3cabd4(0x1ad)])['format'](_0x3cabd4(0x1b2)),'personId':_0x7d3202['userId']};}else{const _0x4f2575={'memberId':_0xaf8c4,'unitId':_0x460949,'content':_0x4e9bb1,'mention':_0x3a2114},_0x5d5519=await this[_0x3cabd4(0x1ac)]['post'](_0x3cabd4(0x1c6)+_0x460949+_0x3cabd4(0x19e),{'body':_0x4f2575});return X(_0x5d5519[_0x3cabd4(0x1a8)]['comment'],_0x4e7085);}}async[_0x8eb16d(0x1a1)](_0x1d395f){const _0x31ebd5=_0x8eb16d;var _0x68d19,_0x45e08e;const {text:_0x16f826,unitId:_0x3aa872}=_0x1d395f,_0x47db8e=(_0x45e08e=(_0x68d19=_0x16f826[_0x31ebd5(0x185)])==null?void 0x0:_0x68d19[_0x31ebd5(0x1b0)](_0x28b20f=>_0x28b20f['rangeType']===_0x19605a[_0x31ebd5(0x18d)])[_0x31ebd5(0x1cc)](_0x31cdbd=>_0x31cdbd[_0x31ebd5(0x170)]))!=null?_0x45e08e:[],_0x65d2a2=JSON[_0x31ebd5(0x173)](_0x16f826),_0x2bdbe0=_0x1d395f[_0x31ebd5(0x1c5)],_0xfbdfbc=_0x1d395f['id'],_0x51b782={'memberId':(await this[_0x31ebd5(0x1be)][_0x31ebd5(0x178)](_0x3aa872))[_0x31ebd5(0x186)](),'unitId':_0x3aa872,'threadId':_0x2bdbe0,'mention':_0x47db8e,'content':_0x65d2a2,'replyId':_0xfbdfbc},_0x42177c=await this[_0x31ebd5(0x1ac)][_0x31ebd5(0x1c1)](_0x31ebd5(0x1c6)+_0x3aa872+'/edit',{'body':_0x51b782});return!_0x42177c[_0x31ebd5(0x1a8)]['error']||_0x42177c[_0x31ebd5(0x1a8)][_0x31ebd5(0x18b)][_0x31ebd5(0x17c)]===0x1;}async[_0x8eb16d(0x16f)](_0xc6e78){const _0x2cf62b=_0x8eb16d,{unitId:_0x1094dc}=_0xc6e78,_0x3577a6=_0xc6e78[_0x2cf62b(0x1c5)],_0x52d09a={'memberId':this['_userService'][_0x2cf62b(0x16d)]()[_0x2cf62b(0x1af)],'unitId':_0x1094dc,'threadId':_0x3577a6,'solved':_0xc6e78['resolved']?I['Solved']:I[_0x2cf62b(0x1a2)]},_0x4e9c2e=await this[_0x2cf62b(0x1ac)]['post']('/universer-api/comment/unit/'+_0x1094dc+_0x2cf62b(0x174),{'body':_0x52d09a});return!_0x4e9c2e[_0x2cf62b(0x1a8)][_0x2cf62b(0x18b)]||_0x4e9c2e['body'][_0x2cf62b(0x18b)][_0x2cf62b(0x17c)]===0x1;}async[_0x8eb16d(0x1b8)](_0x33b212,_0x495a01,_0x267a16,_0x418271){const _0x8964af=_0x8eb16d,_0x22d066={'memberId':(await this[_0x8964af(0x1be)]['requireSession'](_0x33b212))[_0x8964af(0x186)](),'threadId':_0x267a16,'replyId':_0x418271,'unitId':_0x33b212},_0x1d20bb=await this[_0x8964af(0x1ac)]['post']('/universer-api/comment/unit/'+_0x33b212+_0x8964af(0x1c2),{'body':_0x22d066});return!_0x1d20bb[_0x8964af(0x1a8)][_0x8964af(0x18b)]||_0x1d20bb[_0x8964af(0x1a8)][_0x8964af(0x18b)][_0x8964af(0x17c)]===0x1;}async[_0x8eb16d(0x1c9)](_0x27fe30,_0x4c6d96,_0xfce698){const _0x323c5f=_0x8eb16d,_0x2f967c={'unitId':_0x27fe30,'threadId':_0xfce698},_0xbcffa5=await this[_0x323c5f(0x1ac)][_0x323c5f(0x1c1)](_0x323c5f(0x1c6)+_0x27fe30+_0x323c5f(0x1c7),{'body':_0x2f967c}),_0x245734=_0xfce698['map'](_0x1092d9=>ee(_0xbcffa5[_0x323c5f(0x1a8)]['comments'][_0x1092d9],_0x27fe30,_0x4c6d96))[_0x323c5f(0x1b0)](Boolean);return Object[_0x323c5f(0x1cd)](_0xbcffa5[_0x323c5f(0x1a8)][_0x323c5f(0x1ca)])[_0x323c5f(0x1c8)](_0x1d3b4f=>{const _0x263c53=_0x323c5f;this['_userService'][_0x263c53(0x175)](_0x1d3b4f);}),_0x245734;}[_0x8eb16d(0x189)](_0x471f37){const _0xa6d548=_0x8eb16d;return{'id':_0x471f37['id'],'threadId':_0x471f37['threadId'],'ref':_0x471f37[_0xa6d548(0x188)]};}};f=Q([_(0x0,_0xdc24c4(_0x40e085)),_(0x1,_0xdc24c4(_0x4ba4f5)),_(0x2,_0xdc24c4(_0x3d3196)),_(0x3,_0xdc24c4(_0x446729))],f);function _0xa644(_0x4637c9,_0x265c74){const _0x118a90=_0x118a();return _0xa644=function(_0xa64400,_0x274b13){_0xa64400=_0xa64400-0x16a;let _0x3234dd=_0x118a90[_0xa64400];return _0x3234dd;},_0xa644(_0x4637c9,_0x265c74);}var re=Object[_0x8eb16d(0x179)],te=(_0x303b71,_0x52317d,_0x3de470,_0x264898)=>{for(var _0x2d7bfe=_0x264898>0x1?void 0x0:_0x264898?re(_0x52317d,_0x3de470):_0x52317d,_0x58bd3d=_0x303b71['length']-0x1,_0x1a17c3;_0x58bd3d>=0x0;_0x58bd3d--)(_0x1a17c3=_0x303b71[_0x58bd3d])&&(_0x2d7bfe=_0x1a17c3(_0x2d7bfe)||_0x2d7bfe);return _0x2d7bfe;},N=(_0x1ba854,_0x260363)=>(_0x42d615,_0x95e093)=>_0x260363(_0x42d615,_0x95e093,_0x1ba854);let g=class extends _0x4f817d{constructor(_0x248f39,_0x16617b){const _0x2dac32=_0x8eb16d;super(),this[_0x2dac32(0x1b3)]=_0x248f39,this['_threadCommentDataSource']=_0x16617b,this[_0x2dac32(0x1b4)]();}[_0x8eb16d(0x1b4)](){const _0x52ad67=_0x8eb16d;this['_threadCommentDataSourceService'][_0x52ad67(0x196)]=this[_0x52ad67(0x18f)],this['_threadCommentDataSourceService'][_0x52ad67(0x182)]=!0x1;}};g=te([N(0x0,_0x1004f0),N(0x1,_0xdc24c4(f))],g);var se=Object[_0x8eb16d(0x1bd)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x19bb16,_0x95b4f1,_0x3fbb49)=>_0x95b4f1 in _0x19bb16?se(_0x19bb16,_0x95b4f1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3fbb49}):_0x19bb16[_0x95b4f1]=_0x3fbb49,ie=(_0x3402be,_0x5b174a,_0x42d9bb,_0x28c724)=>{const _0x3c25d5=_0x8eb16d;for(var _0x48d123=_0x28c724>0x1?void 0x0:_0x28c724?oe(_0x5b174a,_0x42d9bb):_0x5b174a,_0x1b8a30=_0x3402be[_0x3c25d5(0x190)]-0x1,_0x28e325;_0x1b8a30>=0x0;_0x1b8a30--)(_0x28e325=_0x3402be[_0x1b8a30])&&(_0x48d123=_0x28e325(_0x48d123)||_0x48d123);return _0x48d123;},w=(_0x1724c1,_0x44ebcd)=>(_0x21969d,_0x194b4d)=>_0x44ebcd(_0x21969d,_0x194b4d,_0x1724c1),$=(_0x1fef6b,_0x57c003,_0x17f93f)=>ne(_0x1fef6b,typeof _0x57c003!=_0x8eb16d(0x1a5)?_0x57c003+'':_0x57c003,_0x17f93f);let b=class extends _0x1d9dc9{constructor(_0x210702=M,_0x227bab,_0x2a3f5a){const _0x3d47bc=_0x8eb16d;super(),this[_0x3d47bc(0x19f)]=_0x210702,this['_injector']=_0x227bab,this['_configService']=_0x2a3f5a;const {..._0x3fc915}=_0x147312({},M,this[_0x3d47bc(0x19f)]);this['_configService'][_0x3d47bc(0x1a0)](z,_0x3fc915);}[_0x8eb16d(0x1ae)](){const _0x46d7bd=_0x8eb16d;[[f],[g],[S]][_0x46d7bd(0x1c8)](_0xb809a5=>{const _0x4f1008=_0x46d7bd;this[_0x4f1008(0x1bf)]['add'](_0xb809a5);});}[_0x8eb16d(0x17f)](){const _0x19a14d=_0x8eb16d;this[_0x19a14d(0x1bf)][_0x19a14d(0x187)](g),this[_0x19a14d(0x1bf)][_0x19a14d(0x187)](S);}};$(b,_0x8eb16d(0x1b9),W),$(b,'type',_0x20c5bd[_0x8eb16d(0x1c0)]),b=ie([_0x5aa5bd(_0x24bb62,_0x2caa97,_0xe51017),w(0x1,_0xdc24c4(_0x446729)),w(0x2,_0x17f2a0)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x42f6fb=_0xa86b;(function(_0xada8a3,_0x3cb5da){const _0x3e8981=_0xa86b,_0x33a935=_0xada8a3();while(!![]){try{const _0x2edc59=parseInt(_0x3e8981(0xba))/0x1*(parseInt(_0x3e8981(0xa7))/0x2)+parseInt(_0x3e8981(0xb9))/0x3+parseInt(_0x3e8981(0xe6))/0x4+parseInt(_0x3e8981(0xaa))/0x5+parseInt(_0x3e8981(0xaf))/0x6+parseInt(_0x3e8981(0xe9))/0x7+-parseInt(_0x3e8981(0x98))/0x8;if(_0x2edc59===_0x3cb5da)break;else _0x33a935['push'](_0x33a935['shift']());}catch(_0x18b3f7){_0x33a935['push'](_0x33a935['shift']());}}}(_0x30c4,0xa3d73));import{CommentService as _0x288b4d,CollaborationSessionService as _0x42b2d6,UniverCollaborationClientPlugin as _0x19fa55}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5baa77}from'@univerjs-pro/license';import{dayjs as _0x3d3be7,UserManagerService as _0x2109a7,Inject as _0x5a005b,Injector as _0x17d388,Disposable as _0x526a3b,CustomRangeType as _0x2b2a81,UniverInstanceType as _0x10977d,DependentOn as _0x8d6d07,IConfigService as _0x596994,Plugin as _0x1dca16,merge as _0x57d01d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x53546b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1b10a3,IThreadCommentDataSourceService as _0x2275a6}from'@univerjs/thread-comment';import{bufferTime as _0x4e5ac2}from'rxjs';import{HTTPService as _0x55c384}from'@univerjs/network';const W=_0x42f6fb(0xc5);var I=(_0x51d246=>(_0x51d246[_0x51d246[_0x42f6fb(0xa3)]=0x0]='OpenOrReOpen',_0x51d246[_0x51d246[_0x42f6fb(0xe2)]=0x1]=_0x42f6fb(0xe2),_0x51d246[_0x51d246[_0x42f6fb(0x99)]=-0x1]=_0x42f6fb(0x99),_0x51d246))(I||{}),v=(_0x5ea62d=>(_0x5ea62d[_0x5ea62d[_0x42f6fb(0x9f)]=0x0]=_0x42f6fb(0x9f),_0x5ea62d[_0x5ea62d[_0x42f6fb(0xa0)]=0x1]=_0x42f6fb(0xa0),_0x5ea62d[_0x5ea62d[_0x42f6fb(0xa6)]=0x2]=_0x42f6fb(0xa6),_0x5ea62d[_0x5ea62d[_0x42f6fb(0xce)]=0x3]=_0x42f6fb(0xce),_0x5ea62d[_0x5ea62d[_0x42f6fb(0xc2)]=0x4]=_0x42f6fb(0xc2),_0x5ea62d[_0x5ea62d[_0x42f6fb(0xd4)]=0x5]=_0x42f6fb(0xd4),_0x5ea62d[_0x5ea62d[_0x42f6fb(0x99)]=-0x1]='UNRECOGNIZED',_0x5ea62d))(v||{});const D=_0x1e5299=>_0x3d3be7(new Date(+_0x1e5299))['format'](_0x42f6fb(0x92)),B=async(_0x39f05f,_0x11ec79)=>{const _0x2d08bc=_0x42f6fb,_0x5405e3=_0x39f05f[_0x2d08bc(0x8f)](_0x2109a7),_0x565c5f=_0x39f05f[_0x2d08bc(0x8f)](_0x55c384);_0x11ec79[_0x2d08bc(0x8a)](_0x11e0d6=>{const _0x3c24b5=_0x2d08bc;_0x5405e3[_0x3c24b5(0xa5)](_0x11e0d6)&&_0x11ec79[_0x3c24b5(0xd0)](_0x11e0d6);}),_0x11ec79['size']&&(await _0x565c5f[_0x2d08bc(0x8f)](_0x2d08bc(0xe7),{'params':{'userIDs':[..._0x11ec79]}}))[_0x2d08bc(0xd6)][_0x2d08bc(0x96)]['forEach'](_0x3a4d0c=>{const _0x1fab50=_0x2d08bc;_0x3a4d0c&&_0x5405e3[_0x1fab50(0xb1)](_0x3a4d0c);});};var K=Object[_0x42f6fb(0xd5)],V=(_0x317942,_0x1710a6,_0x190cd1,_0x4e9a5f)=>{const _0x3eb13a=_0x42f6fb;for(var _0x4735ab=_0x4e9a5f>0x1?void 0x0:_0x4e9a5f?K(_0x1710a6,_0x190cd1):_0x1710a6,_0x2f3b94=_0x317942[_0x3eb13a(0xc1)]-0x1,_0x22c1cf;_0x2f3b94>=0x0;_0x2f3b94--)(_0x22c1cf=_0x317942[_0x2f3b94])&&(_0x4735ab=_0x22c1cf(_0x4735ab)||_0x4735ab);return _0x4735ab;},p=(_0xa43416,_0x536e1c)=>(_0x567c04,_0x309ff0)=>_0x536e1c(_0x567c04,_0x309ff0,_0xa43416);let S=class extends _0x526a3b{constructor(_0x924928,_0x36c379,_0x18b52c,_0x2991f0){const _0xb32472=_0x42f6fb;super(),this[_0xb32472(0x9a)]=_0x924928,this[_0xb32472(0x91)]=_0x36c379,this[_0xb32472(0xd3)]=_0x18b52c,this[_0xb32472(0xbe)]=_0x2991f0,this['_init'](),this[_0xb32472(0xcc)]();}[_0x42f6fb(0xcc)](){const _0x1f7ddf=_0x42f6fb;this[_0x1f7ddf(0xc6)](this['_threadCommentModel'][_0x1f7ddf(0x97)][_0x1f7ddf(0xdd)](_0x4e5ac2(0x10))[_0x1f7ddf(0x9c)](_0x48de03=>{const _0x5785e8=_0x1f7ddf,_0x416d5b=new Set();_0x48de03['forEach'](_0x3f6387=>{const _0xf401e5=_0xa86b;switch(_0x3f6387['type']){case'add':{const _0x5eda6c=_0x3f6387[_0xf401e5(0xe5)][_0xf401e5(0xed)];_0x416d5b['add'](_0x5eda6c);break;}}}),B(this[_0x5785e8(0xbe)],_0x416d5b);}));}[_0x42f6fb(0x9b)](){const _0x110355=_0x42f6fb;this[_0x110355(0xc6)](this[_0x110355(0x9a)][_0x110355(0x97)][_0x110355(0x9c)](async _0x41a12b=>{const _0xb313bf=_0x110355;var _0x15071,_0xc623b3,_0x10ddfe,_0x428526;const _0x663102=(_0x15071=this['_threadCommentModel'][_0xb313bf(0xd9)](_0x41a12b[_0xb313bf(0xd2)])[_0xb313bf(0xac)](_0x3f66ee=>_0x3f66ee[_0xb313bf(0xb5)]===_0x41a12b[_0xb313bf(0xb5)]))==null?void 0x0:_0x15071[_0xb313bf(0xc9)];if(!_0x663102)return;const {unitId:_0x4a0153,subUnitId:_0x199371}=_0x663102;switch(_0x41a12b[_0xb313bf(0xbc)]&&this['_userService'][_0xb313bf(0xb1)](_0x41a12b[_0xb313bf(0xbc)]),_0x41a12b['type']){case v['Add']:break;case v['Reply']:{this[_0xb313bf(0x91)][_0xb313bf(0xad)](_0x4a0153,_0x199371,{'unitId':_0x4a0153,'subUnitId':_0x199371,'ref':'','id':_0x41a12b[_0xb313bf(0xa2)],'dT':D(+_0x41a12b[_0xb313bf(0xbf)]),'threadId':_0x41a12b[_0xb313bf(0xb5)],'personId':(_0x10ddfe=(_0xc623b3=_0x41a12b[_0xb313bf(0xbc)])==null?void 0x0:_0xc623b3[_0xb313bf(0xa4)])!=null?_0x10ddfe:_0x41a12b[_0xb313bf(0xab)],'text':JSON['parse'](_0x41a12b[_0xb313bf(0xee)]),'parentId':_0x663102['id']});break;}case v[_0xb313bf(0xc2)]:{const _0x3301e2=this[_0xb313bf(0x91)][_0xb313bf(0xc8)](_0x4a0153,_0x199371,_0x41a12b[_0xb313bf(0xa2)]);_0x3301e2&&_0x3301e2[_0xb313bf(0xc0)]&&this[_0xb313bf(0x91)][_0xb313bf(0xe3)](_0x4a0153,_0x199371,_0x41a12b[_0xb313bf(0xa2)]);break;}case v['Edit']:{this[_0xb313bf(0x91)][_0xb313bf(0x93)](_0x4a0153,_0x199371,{'commentId':_0x41a12b[_0xb313bf(0xa2)],'text':JSON['parse'](_0x41a12b[_0xb313bf(0xee)])});break;}case v[_0xb313bf(0xd4)]:{const _0x16263c=(_0x428526=this[_0xb313bf(0x91)]['getUnit'](_0x41a12b['unitId'])[_0xb313bf(0xac)](_0x1012b3=>_0x1012b3[_0xb313bf(0xb5)]===_0x41a12b[_0xb313bf(0xb5)]))==null?void 0x0:_0x428526['root'];_0x16263c&&this[_0xb313bf(0x91)]['resolveComment'](_0x4a0153,_0x199371,_0x16263c['id'],_0x41a12b['solved']===I[_0xb313bf(0xe2)]);break;}}}));}};function _0xa86b(_0x2fd0b3,_0x2c4bea){const _0x30c472=_0x30c4();return _0xa86b=function(_0xa86b5e,_0x2be9cf){_0xa86b5e=_0xa86b5e-0x8a;let _0x928f69=_0x30c472[_0xa86b5e];return _0x928f69;},_0xa86b(_0x2fd0b3,_0x2c4bea);}S=V([p(0x0,_0x5a005b(_0x288b4d)),p(0x1,_0x5a005b(_0x1b10a3)),p(0x2,_0x5a005b(_0x2109a7)),p(0x3,_0x5a005b(_0x17d388))],S);const z=_0x42f6fb(0xbd),M={};var k=Object[_0x42f6fb(0xd5)],Q=(_0x518570,_0x2c0afb,_0x5770c6,_0x522666)=>{for(var _0x4e2539=_0x522666>0x1?void 0x0:_0x522666?k(_0x2c0afb,_0x5770c6):_0x2c0afb,_0x45310c=_0x518570['length']-0x1,_0x5ae72d;_0x45310c>=0x0;_0x45310c--)(_0x5ae72d=_0x518570[_0x45310c])&&(_0x4e2539=_0x5ae72d(_0x4e2539)||_0x4e2539);return _0x4e2539;},_=(_0x40c7db,_0x2edd3b)=>(_0x1cbfed,_0x522256)=>_0x2edd3b(_0x1cbfed,_0x522256,_0x40c7db);function X(_0x55ea99,_0x5afca3){const _0x26cf12=_0x42f6fb,_0xd2d858=_0x55ea99['replies'][0x0];return{..._0x5afca3,'id':_0xd2d858[_0x26cf12(0xa2)],'resolved':_0x55ea99[_0x26cf12(0x95)]===0x1,'dT':D(_0xd2d858['createTimestamp']),'personId':_0xd2d858[_0x26cf12(0xab)],'threadId':_0xd2d858[_0x26cf12(0xb5)]};}function ee(_0x4cf7fd,_0x5cf003,_0x294bfe){const _0x10aa1b=_0x42f6fb;var _0x577dfa,_0x37ac29;if(((_0x37ac29=(_0x577dfa=_0x4cf7fd==null?void 0x0:_0x4cf7fd[_0x10aa1b(0xb6)])==null?void 0x0:_0x577dfa[_0x10aa1b(0xc1)])!=null?_0x37ac29:0x0)>0x0){const _0x4230a9=(_0x25b639,_0x58b51f)=>({'id':_0x25b639['replyId'],'threadId':_0x25b639[_0x10aa1b(0xb5)],'dT':D(_0x25b639[_0x10aa1b(0xbf)]),'personId':_0x25b639[_0x10aa1b(0xab)],'resolved':_0x4cf7fd['solved']===I[_0x10aa1b(0xe2)],'unitId':_0x5cf003,'subUnitId':_0x294bfe,'text':JSON[_0x10aa1b(0xb3)](_0x25b639['content']),'parentId':_0x58b51f}),_0x351923=_0x4230a9(_0x4cf7fd[_0x10aa1b(0xb6)][0x0]);return{..._0x351923,'children':_0x4cf7fd['replies'][_0x10aa1b(0x8e)](0x1)[_0x10aa1b(0xcd)](_0x2f32af=>_0x4230a9(_0x2f32af,_0x351923['id']))};}return null;}let f=class{constructor(_0x1daf67,_0x21b225,_0x306701,_0x1bf310){const _0x5a5b26=_0x42f6fb;this[_0x5a5b26(0xca)]=_0x1daf67,this[_0x5a5b26(0xd3)]=_0x21b225,this['_sessionService']=_0x306701,this['_injector']=_0x1bf310;}async['addComment'](_0x3c0d41){const _0xaeeebf=_0x42f6fb;var _0x4f1715,_0xd0ccdc;const {parentId:_0x475f9,unitId:_0x537abd,text:_0x5db703,threadId:_0x595cc3}=_0x3c0d41,_0x17a8e7=(_0xd0ccdc=(_0x4f1715=_0x5db703[_0xaeeebf(0xdc)])==null?void 0x0:_0x4f1715[_0xaeeebf(0xa9)](_0x407415=>_0x407415[_0xaeeebf(0xbb)]===_0x2b2a81[_0xaeeebf(0xa8)])[_0xaeeebf(0xcd)](_0x1e5859=>_0x1e5859[_0xaeeebf(0xdf)]))!=null?_0xd0ccdc:[],_0x4e0cdc=JSON['stringify'](_0x5db703),_0x20bf84=(await this[_0xaeeebf(0xeb)][_0xaeeebf(0xa1)](_0x537abd))[_0xaeeebf(0xe0)]();if(_0x475f9){const _0x3bdb77={'memberId':_0x20bf84,'unitId':_0x537abd,'content':_0x4e0cdc,'mention':_0x17a8e7,'threadId':_0x595cc3},_0xa24480=(await this['_httpService'][_0xaeeebf(0xb2)]('/universer-api/comment/unit/'+_0x537abd+_0xaeeebf(0xea),{'body':_0x3bdb77}))[_0xaeeebf(0xd6)][_0xaeeebf(0x9d)];return{..._0x3c0d41,'id':_0xa24480[_0xaeeebf(0xa2)],'dT':_0x3d3be7(+_0xa24480[_0xaeeebf(0xbf)])[_0xaeeebf(0xef)](_0xaeeebf(0x92)),'personId':_0xa24480[_0xaeeebf(0xab)]};}else{const _0x4dcb82={'memberId':_0x20bf84,'unitId':_0x537abd,'content':_0x4e0cdc,'mention':_0x17a8e7},_0x5369a8=await this['_httpService'][_0xaeeebf(0xb2)](_0xaeeebf(0xda)+_0x537abd+_0xaeeebf(0x94),{'body':_0x4dcb82});return X(_0x5369a8['body'][_0xaeeebf(0x8b)],_0x3c0d41);}}async['updateComment'](_0xb361c2){const _0x432fe9=_0x42f6fb;var _0x53f53f,_0x348731;const {text:_0x27ace6,unitId:_0x3edb0a}=_0xb361c2,_0x5605d9=(_0x348731=(_0x53f53f=_0x27ace6[_0x432fe9(0xdc)])==null?void 0x0:_0x53f53f['filter'](_0x39e5e0=>_0x39e5e0['rangeType']===_0x2b2a81[_0x432fe9(0xa8)])[_0x432fe9(0xcd)](_0x356805=>_0x356805[_0x432fe9(0xdf)]))!=null?_0x348731:[],_0x468bb8=JSON[_0x432fe9(0xec)](_0x27ace6),_0x3638b8=_0xb361c2['threadId'],_0x106837=_0xb361c2['id'],_0x3b4985={'memberId':(await this[_0x432fe9(0xeb)][_0x432fe9(0xa1)](_0x3edb0a))[_0x432fe9(0xe0)](),'unitId':_0x3edb0a,'threadId':_0x3638b8,'mention':_0x5605d9,'content':_0x468bb8,'replyId':_0x106837},_0x8cf83=await this[_0x432fe9(0xca)][_0x432fe9(0xb2)](_0x432fe9(0xda)+_0x3edb0a+_0x432fe9(0x9e),{'body':_0x3b4985});return!_0x8cf83[_0x432fe9(0xd6)][_0x432fe9(0xb8)]||_0x8cf83[_0x432fe9(0xd6)][_0x432fe9(0xb8)][_0x432fe9(0xc4)]===0x1;}async[_0x42f6fb(0x8c)](_0xbaa733){const _0xfb7a54=_0x42f6fb,{unitId:_0x18f88c}=_0xbaa733,_0x15afda=_0xbaa733['threadId'],_0xd08f4={'memberId':this[_0xfb7a54(0xd3)]['getCurrentUser']()[_0xfb7a54(0xa4)],'unitId':_0x18f88c,'threadId':_0x15afda,'solved':_0xbaa733[_0xfb7a54(0xe4)]?I['Solved']:I[_0xfb7a54(0xa3)]},_0x54e383=await this['_httpService'][_0xfb7a54(0xb2)](_0xfb7a54(0xda)+_0x18f88c+_0xfb7a54(0xd1),{'body':_0xd08f4});return!_0x54e383[_0xfb7a54(0xd6)][_0xfb7a54(0xb8)]||_0x54e383[_0xfb7a54(0xd6)][_0xfb7a54(0xb8)]['code']===0x1;}async[_0x42f6fb(0xe3)](_0x6bf69a,_0xf1e11d,_0x56fe6f,_0x2e8764){const _0x2eb59a=_0x42f6fb,_0x2493a7={'memberId':(await this[_0x2eb59a(0xeb)]['requireSession'](_0x6bf69a))[_0x2eb59a(0xe0)](),'threadId':_0x56fe6f,'replyId':_0x2e8764,'unitId':_0x6bf69a},_0x3a0139=await this[_0x2eb59a(0xca)]['post'](_0x2eb59a(0xda)+_0x6bf69a+_0x2eb59a(0xde),{'body':_0x2493a7});return!_0x3a0139[_0x2eb59a(0xd6)][_0x2eb59a(0xb8)]||_0x3a0139['body'][_0x2eb59a(0xb8)][_0x2eb59a(0xc4)]===0x1;}async['listComments'](_0x290f92,_0x4e5d6e,_0x2f7c22){const _0xa1aa88=_0x42f6fb,_0x149806={'unitId':_0x290f92,'threadId':_0x2f7c22},_0x492466=await this[_0xa1aa88(0xca)][_0xa1aa88(0xb2)](_0xa1aa88(0xda)+_0x290f92+_0xa1aa88(0x8d),{'body':_0x149806}),_0x4f3cd7=_0x2f7c22['map'](_0x279c51=>ee(_0x492466[_0xa1aa88(0xd6)]['comments'][_0x279c51],_0x290f92,_0x4e5d6e))[_0xa1aa88(0xa9)](Boolean);return Object[_0xa1aa88(0x90)](_0x492466[_0xa1aa88(0xd6)]['users'])['forEach'](_0x1194f4=>{const _0x55ac9b=_0xa1aa88;this[_0x55ac9b(0xd3)][_0x55ac9b(0xb1)](_0x1194f4);}),_0x4f3cd7;}[_0x42f6fb(0xd8)](_0x2353fc){const _0x47a3a2=_0x42f6fb;return{'id':_0x2353fc['id'],'threadId':_0x2353fc[_0x47a3a2(0xb5)],'ref':_0x2353fc[_0x47a3a2(0xcf)]};}};f=Q([_(0x0,_0x5a005b(_0x55c384)),_(0x1,_0x5a005b(_0x2109a7)),_(0x2,_0x5a005b(_0x42b2d6)),_(0x3,_0x5a005b(_0x17d388))],f);var re=Object[_0x42f6fb(0xd5)],te=(_0x19e8c7,_0xf8457c,_0x19c17c,_0x1154f3)=>{for(var _0x3dd6ce=_0x1154f3>0x1?void 0x0:_0x1154f3?re(_0xf8457c,_0x19c17c):_0xf8457c,_0x18dc7b=_0x19e8c7['length']-0x1,_0x5921de;_0x18dc7b>=0x0;_0x18dc7b--)(_0x5921de=_0x19e8c7[_0x18dc7b])&&(_0x3dd6ce=_0x5921de(_0x3dd6ce)||_0x3dd6ce);return _0x3dd6ce;},N=(_0x110009,_0x598541)=>(_0x4b2d01,_0x1129f0)=>_0x598541(_0x4b2d01,_0x1129f0,_0x110009);let g=class extends _0x526a3b{constructor(_0x206397,_0x55b510){const _0x184598=_0x42f6fb;super(),this[_0x184598(0xae)]=_0x206397,this[_0x184598(0xe1)]=_0x55b510,this[_0x184598(0xb7)]();}[_0x42f6fb(0xb7)](){const _0x303db0=_0x42f6fb;this[_0x303db0(0xae)][_0x303db0(0xb4)]=this['_threadCommentDataSource'],this[_0x303db0(0xae)][_0x303db0(0xc3)]=!0x1;}};g=te([N(0x0,_0x2275a6),N(0x1,_0x5a005b(f))],g);function _0x30c4(){const _0x479656=['updateComment','/add','solved','users','commentUpdate$','27376288AwOdWg','UNRECOGNIZED','_commentService','_init','subscribe','reply','/edit','Unknown','Add','requireSession','replyId','OpenOrReOpen','userID','getUser','Reply','3702nCUUkn','COMMENT','filter','3751155gHVcxs','userId','find','addComment','_threadCommentDataSourceService','2470164yNRJwl','setConfig','addUser','post','parse','dataSource','threadId','replies','_initDataSource','error','3616248hqRAVl','233QuRiOM','rangeType','user','thread-comment-data-source.config','_injector','createTimestamp','parentId','length','Delete','syncUpdateMutationToColla','code','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','disposeWithMe','defineProperty','getComment','root','_httpService','UNIVER_UNKNOWN','_initUserSync','map','Edit','ref','delete','/solved','unitId','_userService','Solve','getOwnPropertyDescriptor','body','_config','saveCommentToSnapshot','getUnit','/universer-api/comment/unit/','onStarting','customRanges','pipe','/delete','rangeId','getMemberID','_threadCommentDataSource','Solved','deleteComment','resolved','payload','4889376xYREoM','/universer-api/user/list','_configService','505113TGpjkT','/reply','_sessionService','stringify','personId','content','format','forEach','comment','resolveComment','/list','slice','get','values','_threadCommentModel','YYYY/MM/DD\x20HH:mm'];_0x30c4=function(){return _0x479656;};return _0x30c4();}var se=Object[_0x42f6fb(0xc7)],oe=Object[_0x42f6fb(0xd5)],ne=(_0x317d83,_0x101d3d,_0x5a3b54)=>_0x101d3d in _0x317d83?se(_0x317d83,_0x101d3d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5a3b54}):_0x317d83[_0x101d3d]=_0x5a3b54,ie=(_0x2f1f52,_0x22a76c,_0x3616c2,_0x2abc5e)=>{for(var _0x321719=_0x2abc5e>0x1?void 0x0:_0x2abc5e?oe(_0x22a76c,_0x3616c2):_0x22a76c,_0x3b4867=_0x2f1f52['length']-0x1,_0x2c0e8b;_0x3b4867>=0x0;_0x3b4867--)(_0x2c0e8b=_0x2f1f52[_0x3b4867])&&(_0x321719=_0x2c0e8b(_0x321719)||_0x321719);return _0x321719;},w=(_0x2a526b,_0x212c6e)=>(_0x148cc9,_0x143383)=>_0x212c6e(_0x148cc9,_0x143383,_0x2a526b),$=(_0xe8165c,_0x25614d,_0x21ee7a)=>ne(_0xe8165c,typeof _0x25614d!='symbol'?_0x25614d+'':_0x25614d,_0x21ee7a);let b=class extends _0x1dca16{constructor(_0x1766a4=M,_0x3d4572,_0x11aae7){const _0x1b3cec=_0x42f6fb;super(),this[_0x1b3cec(0xd7)]=_0x1766a4,this[_0x1b3cec(0xbe)]=_0x3d4572,this[_0x1b3cec(0xe8)]=_0x11aae7;const {..._0x426d1c}=_0x57d01d({},M,this['_config']);this[_0x1b3cec(0xe8)][_0x1b3cec(0xb0)](z,_0x426d1c);}[_0x42f6fb(0xdb)](){const _0x26ee01=_0x42f6fb;[[f],[g],[S]][_0x26ee01(0x8a)](_0xc2795a=>{this['_injector']['add'](_0xc2795a);});}['onReady'](){const _0x4bdf0b=_0x42f6fb;this[_0x4bdf0b(0xbe)][_0x4bdf0b(0x8f)](g),this[_0x4bdf0b(0xbe)]['get'](S);}};$(b,'pluginName',W),$(b,'type',_0x10977d[_0x42f6fb(0xcb)]),b=ie([_0x8d6d07(_0x53546b,_0x19fa55,_0x5baa77),w(0x1,_0x5a005b(_0x17d388)),w(0x2,_0x596994)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x8eb16d=_0xa644;(function(_0x26f565,_0x4a5003){const _0x54cbc0=_0xa644,_0x11892c=_0x26f565();while(!![]){try{const _0x4e8a81=-parseInt(_0x54cbc0(0x181))/0x1*(parseInt(_0x54cbc0(0x1c4))/0x2)+-parseInt(_0x54cbc0(0x19a))/0x3*(-parseInt(_0x54cbc0(0x16b))/0x4)+parseInt(_0x54cbc0(0x176))/0x5+parseInt(_0x54cbc0(0x16e))/0x6*(-parseInt(_0x54cbc0(0x1a9))/0x7)+parseInt(_0x54cbc0(0x194))/0x8+-parseInt(_0x54cbc0(0x177))/0x9+parseInt(_0x54cbc0(0x1a7))/0xa;if(_0x4e8a81===_0x4a5003)break;else _0x11892c['push'](_0x11892c['shift']());}catch(_0x47526e){_0x11892c['push'](_0x11892c['shift']());}}}(_0x118a,0x2f9ea));import{CommentService as _0x1ccc3b,CollaborationSessionService as _0x3d3196,UniverCollaborationClientPlugin as _0x2caa97}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xe51017}from'@univerjs-pro/license';import{dayjs as _0x5eb8ae,UserManagerService as _0x4ba4f5,Inject as _0xdc24c4,Injector as _0x446729,Disposable as _0x4f817d,CustomRangeType as _0x19605a,UniverInstanceType as _0x20c5bd,DependentOn as _0x5aa5bd,IConfigService as _0x17f2a0,Plugin as _0x1d9dc9,merge as _0x147312}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x24bb62}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5c51a6,IThreadCommentDataSourceService as _0x1004f0}from'@univerjs/thread-comment';import{bufferTime as _0x200bd8}from'rxjs';import{HTTPService as _0x40e085}from'@univerjs/network';const W=_0x8eb16d(0x180);var I=(_0x4ed037=>(_0x4ed037[_0x4ed037[_0x8eb16d(0x1a2)]=0x0]='OpenOrReOpen',_0x4ed037[_0x4ed037[_0x8eb16d(0x1ce)]=0x1]=_0x8eb16d(0x1ce),_0x4ed037[_0x4ed037[_0x8eb16d(0x191)]=-0x1]='UNRECOGNIZED',_0x4ed037))(I||{}),v=(_0x4bf901=>(_0x4bf901[_0x4bf901[_0x8eb16d(0x192)]=0x0]=_0x8eb16d(0x192),_0x4bf901[_0x4bf901[_0x8eb16d(0x17e)]=0x1]=_0x8eb16d(0x17e),_0x4bf901[_0x4bf901['Reply']=0x2]='Reply',_0x4bf901[_0x4bf901[_0x8eb16d(0x17d)]=0x3]=_0x8eb16d(0x17d),_0x4bf901[_0x4bf901['Delete']=0x4]=_0x8eb16d(0x1b7),_0x4bf901[_0x4bf901[_0x8eb16d(0x197)]=0x5]=_0x8eb16d(0x197),_0x4bf901[_0x4bf901[_0x8eb16d(0x191)]=-0x1]=_0x8eb16d(0x191),_0x4bf901))(v||{});function _0x118a(){const _0x46d758=['6329fRKInW','syncUpdateMutationToColla','solved','parentId','customRanges','getMemberID','get','ref','saveCommentToSnapshot','_initUserSync','error','replyId','COMMENT','size','_threadCommentDataSource','length','UNRECOGNIZED','Unknown','userId','1711568NOOgTA','pipe','dataSource','Solve','getUser','content','3RcYeMr','_init','commentUpdate$','subscribe','/add','_config','setConfig','updateComment','OpenOrReOpen','user','getComment','symbol','add','4622420jpGjrG','body','1059730qnvOdn','payload','type','_httpService','createTimestamp','onStarting','userID','filter','root','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','_initDataSource','unitId','find','Delete','deleteComment','pluginName','reply','parse','Reply','defineProperty','_sessionService','_injector','UNIVER_UNKNOWN','post','/delete','/universer-api/user/list','56oJQoaw','threadId','/universer-api/comment/unit/','/list','forEach','listComments','users','_userService','map','values','Solved','replies','116868tYUBEI','_threadCommentModel','getCurrentUser','6dqmWOu','resolveComment','rangeId','addComment','_commentService','stringify','/solved','addUser','1028480wZfnXW','3487041OtjmXa','requireSession','getOwnPropertyDescriptor','getUnit','disposeWithMe','code','Edit','Add','onReady','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x118a=function(){return _0x46d758;};return _0x118a();}const D=_0x142eb4=>_0x5eb8ae(new Date(+_0x142eb4))['format'](_0x8eb16d(0x1b2)),B=async(_0x342391,_0x1ee11b)=>{const _0x3a57ee=_0x8eb16d,_0x30d120=_0x342391[_0x3a57ee(0x187)](_0x4ba4f5),_0xa4e10e=_0x342391[_0x3a57ee(0x187)](_0x40e085);_0x1ee11b[_0x3a57ee(0x1c8)](_0xf2ed1d=>{const _0x25ad56=_0x3a57ee;_0x30d120[_0x25ad56(0x198)](_0xf2ed1d)&&_0x1ee11b['delete'](_0xf2ed1d);}),_0x1ee11b[_0x3a57ee(0x18e)]&&(await _0xa4e10e[_0x3a57ee(0x187)](_0x3a57ee(0x1c3),{'params':{'userIDs':[..._0x1ee11b]}}))[_0x3a57ee(0x1a8)][_0x3a57ee(0x1ca)]['forEach'](_0x3019f4=>{const _0x281dd2=_0x3a57ee;_0x3019f4&&_0x30d120[_0x281dd2(0x175)](_0x3019f4);});};var K=Object[_0x8eb16d(0x179)],V=(_0x3c5927,_0x5460f6,_0x354784,_0x17d86c)=>{for(var _0x58200e=_0x17d86c>0x1?void 0x0:_0x17d86c?K(_0x5460f6,_0x354784):_0x5460f6,_0x5be380=_0x3c5927['length']-0x1,_0x4f4b0b;_0x5be380>=0x0;_0x5be380--)(_0x4f4b0b=_0x3c5927[_0x5be380])&&(_0x58200e=_0x4f4b0b(_0x58200e)||_0x58200e);return _0x58200e;},p=(_0x404226,_0x10b535)=>(_0x5efc4f,_0x5a6ec1)=>_0x10b535(_0x5efc4f,_0x5a6ec1,_0x404226);let S=class extends _0x4f817d{constructor(_0x3cb562,_0x2ffe30,_0x1dd3ff,_0x57a9dc){const _0x206d68=_0x8eb16d;super(),this['_commentService']=_0x3cb562,this[_0x206d68(0x16c)]=_0x2ffe30,this['_userService']=_0x1dd3ff,this['_injector']=_0x57a9dc,this[_0x206d68(0x19b)](),this[_0x206d68(0x18a)]();}[_0x8eb16d(0x18a)](){const _0x389b82=_0x8eb16d;this[_0x389b82(0x17b)](this[_0x389b82(0x16c)]['commentUpdate$'][_0x389b82(0x195)](_0x200bd8(0x10))[_0x389b82(0x19d)](_0x1eff56=>{const _0x486510=_0x389b82,_0xa1cf08=new Set();_0x1eff56[_0x486510(0x1c8)](_0x377008=>{const _0x1c4306=_0x486510;switch(_0x377008[_0x1c4306(0x1ab)]){case _0x1c4306(0x1a6):{const _0x5e5b80=_0x377008[_0x1c4306(0x1aa)]['personId'];_0xa1cf08[_0x1c4306(0x1a6)](_0x5e5b80);break;}}}),B(this[_0x486510(0x1bf)],_0xa1cf08);}));}['_init'](){const _0x4cb971=_0x8eb16d;this['disposeWithMe'](this[_0x4cb971(0x172)][_0x4cb971(0x19c)][_0x4cb971(0x19d)](async _0x80891f=>{const _0x27846d=_0x4cb971;var _0x2c0708,_0x16aaed,_0x1dbd4f,_0x479cc1;const _0xe01919=(_0x2c0708=this[_0x27846d(0x16c)][_0x27846d(0x17a)](_0x80891f['unitId'])[_0x27846d(0x1b6)](_0x17b8ca=>_0x17b8ca[_0x27846d(0x1c5)]===_0x80891f[_0x27846d(0x1c5)]))==null?void 0x0:_0x2c0708[_0x27846d(0x1b1)];if(!_0xe01919)return;const {unitId:_0x24c545,subUnitId:_0x506b4d}=_0xe01919;switch(_0x80891f['user']&&this[_0x27846d(0x1cb)]['addUser'](_0x80891f[_0x27846d(0x1a3)]),_0x80891f[_0x27846d(0x1ab)]){case v[_0x27846d(0x17e)]:break;case v[_0x27846d(0x1bc)]:{this[_0x27846d(0x16c)][_0x27846d(0x171)](_0x24c545,_0x506b4d,{'unitId':_0x24c545,'subUnitId':_0x506b4d,'ref':'','id':_0x80891f[_0x27846d(0x18c)],'dT':D(+_0x80891f[_0x27846d(0x1ad)]),'threadId':_0x80891f[_0x27846d(0x1c5)],'personId':(_0x1dbd4f=(_0x16aaed=_0x80891f[_0x27846d(0x1a3)])==null?void 0x0:_0x16aaed['userID'])!=null?_0x1dbd4f:_0x80891f['userId'],'text':JSON[_0x27846d(0x1bb)](_0x80891f['content']),'parentId':_0xe01919['id']});break;}case v[_0x27846d(0x1b7)]:{const _0x121518=this['_threadCommentModel'][_0x27846d(0x1a4)](_0x24c545,_0x506b4d,_0x80891f[_0x27846d(0x18c)]);_0x121518&&_0x121518[_0x27846d(0x184)]&&this[_0x27846d(0x16c)][_0x27846d(0x1b8)](_0x24c545,_0x506b4d,_0x80891f[_0x27846d(0x18c)]);break;}case v[_0x27846d(0x17d)]:{this[_0x27846d(0x16c)][_0x27846d(0x1a1)](_0x24c545,_0x506b4d,{'commentId':_0x80891f[_0x27846d(0x18c)],'text':JSON['parse'](_0x80891f[_0x27846d(0x199)])});break;}case v[_0x27846d(0x197)]:{const _0x52d86e=(_0x479cc1=this[_0x27846d(0x16c)]['getUnit'](_0x80891f[_0x27846d(0x1b5)])[_0x27846d(0x1b6)](_0x3f9878=>_0x3f9878[_0x27846d(0x1c5)]===_0x80891f[_0x27846d(0x1c5)]))==null?void 0x0:_0x479cc1[_0x27846d(0x1b1)];_0x52d86e&&this[_0x27846d(0x16c)]['resolveComment'](_0x24c545,_0x506b4d,_0x52d86e['id'],_0x80891f[_0x27846d(0x183)]===I[_0x27846d(0x1ce)]);break;}}}));}};S=V([p(0x0,_0xdc24c4(_0x1ccc3b)),p(0x1,_0xdc24c4(_0x5c51a6)),p(0x2,_0xdc24c4(_0x4ba4f5)),p(0x3,_0xdc24c4(_0x446729))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x17c693,_0x4d23a6,_0x2984df,_0xa31c13)=>{for(var _0xdc3e2d=_0xa31c13>0x1?void 0x0:_0xa31c13?k(_0x4d23a6,_0x2984df):_0x4d23a6,_0x36cdd9=_0x17c693['length']-0x1,_0x54f304;_0x36cdd9>=0x0;_0x36cdd9--)(_0x54f304=_0x17c693[_0x36cdd9])&&(_0xdc3e2d=_0x54f304(_0xdc3e2d)||_0xdc3e2d);return _0xdc3e2d;},_=(_0xe4c82f,_0x57f10e)=>(_0x16a164,_0x55a361)=>_0x57f10e(_0x16a164,_0x55a361,_0xe4c82f);function X(_0x5d0474,_0x1f2072){const _0x1b1af5=_0x8eb16d,_0x4ec919=_0x5d0474[_0x1b1af5(0x16a)][0x0];return{..._0x1f2072,'id':_0x4ec919['replyId'],'resolved':_0x5d0474[_0x1b1af5(0x183)]===0x1,'dT':D(_0x4ec919[_0x1b1af5(0x1ad)]),'personId':_0x4ec919['userId'],'threadId':_0x4ec919[_0x1b1af5(0x1c5)]};}function ee(_0x1dc058,_0x1d33a1,_0x4a29b8){const _0x3e4429=_0x8eb16d;var _0x16905e,_0x380e3e;if(((_0x380e3e=(_0x16905e=_0x1dc058==null?void 0x0:_0x1dc058[_0x3e4429(0x16a)])==null?void 0x0:_0x16905e[_0x3e4429(0x190)])!=null?_0x380e3e:0x0)>0x0){const _0x12a6fc=(_0x26be21,_0x102ff0)=>({'id':_0x26be21[_0x3e4429(0x18c)],'threadId':_0x26be21[_0x3e4429(0x1c5)],'dT':D(_0x26be21['createTimestamp']),'personId':_0x26be21[_0x3e4429(0x193)],'resolved':_0x1dc058[_0x3e4429(0x183)]===I['Solved'],'unitId':_0x1d33a1,'subUnitId':_0x4a29b8,'text':JSON[_0x3e4429(0x1bb)](_0x26be21[_0x3e4429(0x199)]),'parentId':_0x102ff0}),_0xa1c339=_0x12a6fc(_0x1dc058[_0x3e4429(0x16a)][0x0]);return{..._0xa1c339,'children':_0x1dc058[_0x3e4429(0x16a)]['slice'](0x1)['map'](_0x4353c8=>_0x12a6fc(_0x4353c8,_0xa1c339['id']))};}return null;}let f=class{constructor(_0xd527d1,_0x7b2f99,_0x5854ac,_0x43c529){const _0x16cda7=_0x8eb16d;this[_0x16cda7(0x1ac)]=_0xd527d1,this['_userService']=_0x7b2f99,this[_0x16cda7(0x1be)]=_0x5854ac,this[_0x16cda7(0x1bf)]=_0x43c529;}async['addComment'](_0x4e7085){const _0x3cabd4=_0x8eb16d;var _0x3d1b7c,_0x559fb9;const {parentId:_0x2ba49e,unitId:_0x460949,text:_0x1deed3,threadId:_0x96e33}=_0x4e7085,_0x3a2114=(_0x559fb9=(_0x3d1b7c=_0x1deed3[_0x3cabd4(0x185)])==null?void 0x0:_0x3d1b7c['filter'](_0x3cee94=>_0x3cee94['rangeType']===_0x19605a[_0x3cabd4(0x18d)])[_0x3cabd4(0x1cc)](_0x570fe8=>_0x570fe8['rangeId']))!=null?_0x559fb9:[],_0x4e9bb1=JSON[_0x3cabd4(0x173)](_0x1deed3),_0xaf8c4=(await this['_sessionService'][_0x3cabd4(0x178)](_0x460949))[_0x3cabd4(0x186)]();if(_0x2ba49e){const _0x3c9c5e={'memberId':_0xaf8c4,'unitId':_0x460949,'content':_0x4e9bb1,'mention':_0x3a2114,'threadId':_0x96e33},_0x7d3202=(await this[_0x3cabd4(0x1ac)][_0x3cabd4(0x1c1)](_0x3cabd4(0x1c6)+_0x460949+'/reply',{'body':_0x3c9c5e}))['body'][_0x3cabd4(0x1ba)];return{..._0x4e7085,'id':_0x7d3202[_0x3cabd4(0x18c)],'dT':_0x5eb8ae(+_0x7d3202[_0x3cabd4(0x1ad)])['format'](_0x3cabd4(0x1b2)),'personId':_0x7d3202['userId']};}else{const _0x4f2575={'memberId':_0xaf8c4,'unitId':_0x460949,'content':_0x4e9bb1,'mention':_0x3a2114},_0x5d5519=await this[_0x3cabd4(0x1ac)]['post'](_0x3cabd4(0x1c6)+_0x460949+_0x3cabd4(0x19e),{'body':_0x4f2575});return X(_0x5d5519[_0x3cabd4(0x1a8)]['comment'],_0x4e7085);}}async[_0x8eb16d(0x1a1)](_0x1d395f){const _0x31ebd5=_0x8eb16d;var _0x68d19,_0x45e08e;const {text:_0x16f826,unitId:_0x3aa872}=_0x1d395f,_0x47db8e=(_0x45e08e=(_0x68d19=_0x16f826[_0x31ebd5(0x185)])==null?void 0x0:_0x68d19[_0x31ebd5(0x1b0)](_0x28b20f=>_0x28b20f['rangeType']===_0x19605a[_0x31ebd5(0x18d)])[_0x31ebd5(0x1cc)](_0x31cdbd=>_0x31cdbd[_0x31ebd5(0x170)]))!=null?_0x45e08e:[],_0x65d2a2=JSON[_0x31ebd5(0x173)](_0x16f826),_0x2bdbe0=_0x1d395f[_0x31ebd5(0x1c5)],_0xfbdfbc=_0x1d395f['id'],_0x51b782={'memberId':(await this[_0x31ebd5(0x1be)][_0x31ebd5(0x178)](_0x3aa872))[_0x31ebd5(0x186)](),'unitId':_0x3aa872,'threadId':_0x2bdbe0,'mention':_0x47db8e,'content':_0x65d2a2,'replyId':_0xfbdfbc},_0x42177c=await this[_0x31ebd5(0x1ac)][_0x31ebd5(0x1c1)](_0x31ebd5(0x1c6)+_0x3aa872+'/edit',{'body':_0x51b782});return!_0x42177c[_0x31ebd5(0x1a8)]['error']||_0x42177c[_0x31ebd5(0x1a8)][_0x31ebd5(0x18b)][_0x31ebd5(0x17c)]===0x1;}async[_0x8eb16d(0x16f)](_0xc6e78){const _0x2cf62b=_0x8eb16d,{unitId:_0x1094dc}=_0xc6e78,_0x3577a6=_0xc6e78[_0x2cf62b(0x1c5)],_0x52d09a={'memberId':this['_userService'][_0x2cf62b(0x16d)]()[_0x2cf62b(0x1af)],'unitId':_0x1094dc,'threadId':_0x3577a6,'solved':_0xc6e78['resolved']?I['Solved']:I[_0x2cf62b(0x1a2)]},_0x4e9c2e=await this[_0x2cf62b(0x1ac)]['post']('/universer-api/comment/unit/'+_0x1094dc+_0x2cf62b(0x174),{'body':_0x52d09a});return!_0x4e9c2e[_0x2cf62b(0x1a8)][_0x2cf62b(0x18b)]||_0x4e9c2e['body'][_0x2cf62b(0x18b)][_0x2cf62b(0x17c)]===0x1;}async[_0x8eb16d(0x1b8)](_0x33b212,_0x495a01,_0x267a16,_0x418271){const _0x8964af=_0x8eb16d,_0x22d066={'memberId':(await this[_0x8964af(0x1be)]['requireSession'](_0x33b212))[_0x8964af(0x186)](),'threadId':_0x267a16,'replyId':_0x418271,'unitId':_0x33b212},_0x1d20bb=await this[_0x8964af(0x1ac)]['post']('/universer-api/comment/unit/'+_0x33b212+_0x8964af(0x1c2),{'body':_0x22d066});return!_0x1d20bb[_0x8964af(0x1a8)][_0x8964af(0x18b)]||_0x1d20bb[_0x8964af(0x1a8)][_0x8964af(0x18b)][_0x8964af(0x17c)]===0x1;}async[_0x8eb16d(0x1c9)](_0x27fe30,_0x4c6d96,_0xfce698){const _0x323c5f=_0x8eb16d,_0x2f967c={'unitId':_0x27fe30,'threadId':_0xfce698},_0xbcffa5=await this[_0x323c5f(0x1ac)][_0x323c5f(0x1c1)](_0x323c5f(0x1c6)+_0x27fe30+_0x323c5f(0x1c7),{'body':_0x2f967c}),_0x245734=_0xfce698['map'](_0x1092d9=>ee(_0xbcffa5[_0x323c5f(0x1a8)]['comments'][_0x1092d9],_0x27fe30,_0x4c6d96))[_0x323c5f(0x1b0)](Boolean);return Object[_0x323c5f(0x1cd)](_0xbcffa5[_0x323c5f(0x1a8)][_0x323c5f(0x1ca)])[_0x323c5f(0x1c8)](_0x1d3b4f=>{const _0x263c53=_0x323c5f;this['_userService'][_0x263c53(0x175)](_0x1d3b4f);}),_0x245734;}[_0x8eb16d(0x189)](_0x471f37){const _0xa6d548=_0x8eb16d;return{'id':_0x471f37['id'],'threadId':_0x471f37['threadId'],'ref':_0x471f37[_0xa6d548(0x188)]};}};f=Q([_(0x0,_0xdc24c4(_0x40e085)),_(0x1,_0xdc24c4(_0x4ba4f5)),_(0x2,_0xdc24c4(_0x3d3196)),_(0x3,_0xdc24c4(_0x446729))],f);function _0xa644(_0x4637c9,_0x265c74){const _0x118a90=_0x118a();return _0xa644=function(_0xa64400,_0x274b13){_0xa64400=_0xa64400-0x16a;let _0x3234dd=_0x118a90[_0xa64400];return _0x3234dd;},_0xa644(_0x4637c9,_0x265c74);}var re=Object[_0x8eb16d(0x179)],te=(_0x303b71,_0x52317d,_0x3de470,_0x264898)=>{for(var _0x2d7bfe=_0x264898>0x1?void 0x0:_0x264898?re(_0x52317d,_0x3de470):_0x52317d,_0x58bd3d=_0x303b71['length']-0x1,_0x1a17c3;_0x58bd3d>=0x0;_0x58bd3d--)(_0x1a17c3=_0x303b71[_0x58bd3d])&&(_0x2d7bfe=_0x1a17c3(_0x2d7bfe)||_0x2d7bfe);return _0x2d7bfe;},N=(_0x1ba854,_0x260363)=>(_0x42d615,_0x95e093)=>_0x260363(_0x42d615,_0x95e093,_0x1ba854);let g=class extends _0x4f817d{constructor(_0x248f39,_0x16617b){const _0x2dac32=_0x8eb16d;super(),this[_0x2dac32(0x1b3)]=_0x248f39,this['_threadCommentDataSource']=_0x16617b,this[_0x2dac32(0x1b4)]();}[_0x8eb16d(0x1b4)](){const _0x52ad67=_0x8eb16d;this['_threadCommentDataSourceService'][_0x52ad67(0x196)]=this[_0x52ad67(0x18f)],this['_threadCommentDataSourceService'][_0x52ad67(0x182)]=!0x1;}};g=te([N(0x0,_0x1004f0),N(0x1,_0xdc24c4(f))],g);var se=Object[_0x8eb16d(0x1bd)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x19bb16,_0x95b4f1,_0x3fbb49)=>_0x95b4f1 in _0x19bb16?se(_0x19bb16,_0x95b4f1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3fbb49}):_0x19bb16[_0x95b4f1]=_0x3fbb49,ie=(_0x3402be,_0x5b174a,_0x42d9bb,_0x28c724)=>{const _0x3c25d5=_0x8eb16d;for(var _0x48d123=_0x28c724>0x1?void 0x0:_0x28c724?oe(_0x5b174a,_0x42d9bb):_0x5b174a,_0x1b8a30=_0x3402be[_0x3c25d5(0x190)]-0x1,_0x28e325;_0x1b8a30>=0x0;_0x1b8a30--)(_0x28e325=_0x3402be[_0x1b8a30])&&(_0x48d123=_0x28e325(_0x48d123)||_0x48d123);return _0x48d123;},w=(_0x1724c1,_0x44ebcd)=>(_0x21969d,_0x194b4d)=>_0x44ebcd(_0x21969d,_0x194b4d,_0x1724c1),$=(_0x1fef6b,_0x57c003,_0x17f93f)=>ne(_0x1fef6b,typeof _0x57c003!=_0x8eb16d(0x1a5)?_0x57c003+'':_0x57c003,_0x17f93f);let b=class extends _0x1d9dc9{constructor(_0x210702=M,_0x227bab,_0x2a3f5a){const _0x3d47bc=_0x8eb16d;super(),this[_0x3d47bc(0x19f)]=_0x210702,this['_injector']=_0x227bab,this['_configService']=_0x2a3f5a;const {..._0x3fc915}=_0x147312({},M,this[_0x3d47bc(0x19f)]);this['_configService'][_0x3d47bc(0x1a0)](z,_0x3fc915);}[_0x8eb16d(0x1ae)](){const _0x46d7bd=_0x8eb16d;[[f],[g],[S]][_0x46d7bd(0x1c8)](_0xb809a5=>{const _0x4f1008=_0x46d7bd;this[_0x4f1008(0x1bf)]['add'](_0xb809a5);});}[_0x8eb16d(0x17f)](){const _0x19a14d=_0x8eb16d;this[_0x19a14d(0x1bf)][_0x19a14d(0x187)](g),this[_0x19a14d(0x1bf)][_0x19a14d(0x187)](S);}};$(b,_0x8eb16d(0x1b9),W),$(b,'type',_0x20c5bd[_0x8eb16d(0x1c0)]),b=ie([_0x5aa5bd(_0x24bb62,_0x2caa97,_0xe51017),w(0x1,_0xdc24c4(_0x446729)),w(0x2,_0x17f2a0)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x42f6fb=_0xa86b;(function(_0xada8a3,_0x3cb5da){const _0x3e8981=_0xa86b,_0x33a935=_0xada8a3();while(!![]){try{const _0x2edc59=parseInt(_0x3e8981(0xba))/0x1*(parseInt(_0x3e8981(0xa7))/0x2)+parseInt(_0x3e8981(0xb9))/0x3+parseInt(_0x3e8981(0xe6))/0x4+parseInt(_0x3e8981(0xaa))/0x5+parseInt(_0x3e8981(0xaf))/0x6+parseInt(_0x3e8981(0xe9))/0x7+-parseInt(_0x3e8981(0x98))/0x8;if(_0x2edc59===_0x3cb5da)break;else _0x33a935['push'](_0x33a935['shift']());}catch(_0x18b3f7){_0x33a935['push'](_0x33a935['shift']());}}}(_0x30c4,0xa3d73));import{CommentService as _0x288b4d,CollaborationSessionService as _0x42b2d6,UniverCollaborationClientPlugin as _0x19fa55}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5baa77}from'@univerjs-pro/license';import{dayjs as _0x3d3be7,UserManagerService as _0x2109a7,Inject as _0x5a005b,Injector as _0x17d388,Disposable as _0x526a3b,CustomRangeType as _0x2b2a81,UniverInstanceType as _0x10977d,DependentOn as _0x8d6d07,IConfigService as _0x596994,Plugin as _0x1dca16,merge as _0x57d01d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x53546b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1b10a3,IThreadCommentDataSourceService as _0x2275a6}from'@univerjs/thread-comment';import{bufferTime as _0x4e5ac2}from'rxjs';import{HTTPService as _0x55c384}from'@univerjs/network';const W=_0x42f6fb(0xc5);var I=(_0x51d246=>(_0x51d246[_0x51d246[_0x42f6fb(0xa3)]=0x0]='OpenOrReOpen',_0x51d246[_0x51d246[_0x42f6fb(0xe2)]=0x1]=_0x42f6fb(0xe2),_0x51d246[_0x51d246[_0x42f6fb(0x99)]=-0x1]=_0x42f6fb(0x99),_0x51d246))(I||{}),v=(_0x5ea62d=>(_0x5ea62d[_0x5ea62d[_0x42f6fb(0x9f)]=0x0]=_0x42f6fb(0x9f),_0x5ea62d[_0x5ea62d[_0x42f6fb(0xa0)]=0x1]=_0x42f6fb(0xa0),_0x5ea62d[_0x5ea62d[_0x42f6fb(0xa6)]=0x2]=_0x42f6fb(0xa6),_0x5ea62d[_0x5ea62d[_0x42f6fb(0xce)]=0x3]=_0x42f6fb(0xce),_0x5ea62d[_0x5ea62d[_0x42f6fb(0xc2)]=0x4]=_0x42f6fb(0xc2),_0x5ea62d[_0x5ea62d[_0x42f6fb(0xd4)]=0x5]=_0x42f6fb(0xd4),_0x5ea62d[_0x5ea62d[_0x42f6fb(0x99)]=-0x1]='UNRECOGNIZED',_0x5ea62d))(v||{});const D=_0x1e5299=>_0x3d3be7(new Date(+_0x1e5299))['format'](_0x42f6fb(0x92)),B=async(_0x39f05f,_0x11ec79)=>{const _0x2d08bc=_0x42f6fb,_0x5405e3=_0x39f05f[_0x2d08bc(0x8f)](_0x2109a7),_0x565c5f=_0x39f05f[_0x2d08bc(0x8f)](_0x55c384);_0x11ec79[_0x2d08bc(0x8a)](_0x11e0d6=>{const _0x3c24b5=_0x2d08bc;_0x5405e3[_0x3c24b5(0xa5)](_0x11e0d6)&&_0x11ec79[_0x3c24b5(0xd0)](_0x11e0d6);}),_0x11ec79['size']&&(await _0x565c5f[_0x2d08bc(0x8f)](_0x2d08bc(0xe7),{'params':{'userIDs':[..._0x11ec79]}}))[_0x2d08bc(0xd6)][_0x2d08bc(0x96)]['forEach'](_0x3a4d0c=>{const _0x1fab50=_0x2d08bc;_0x3a4d0c&&_0x5405e3[_0x1fab50(0xb1)](_0x3a4d0c);});};var K=Object[_0x42f6fb(0xd5)],V=(_0x317942,_0x1710a6,_0x190cd1,_0x4e9a5f)=>{const _0x3eb13a=_0x42f6fb;for(var _0x4735ab=_0x4e9a5f>0x1?void 0x0:_0x4e9a5f?K(_0x1710a6,_0x190cd1):_0x1710a6,_0x2f3b94=_0x317942[_0x3eb13a(0xc1)]-0x1,_0x22c1cf;_0x2f3b94>=0x0;_0x2f3b94--)(_0x22c1cf=_0x317942[_0x2f3b94])&&(_0x4735ab=_0x22c1cf(_0x4735ab)||_0x4735ab);return _0x4735ab;},p=(_0xa43416,_0x536e1c)=>(_0x567c04,_0x309ff0)=>_0x536e1c(_0x567c04,_0x309ff0,_0xa43416);let S=class extends _0x526a3b{constructor(_0x924928,_0x36c379,_0x18b52c,_0x2991f0){const _0xb32472=_0x42f6fb;super(),this[_0xb32472(0x9a)]=_0x924928,this[_0xb32472(0x91)]=_0x36c379,this[_0xb32472(0xd3)]=_0x18b52c,this[_0xb32472(0xbe)]=_0x2991f0,this['_init'](),this[_0xb32472(0xcc)]();}[_0x42f6fb(0xcc)](){const _0x1f7ddf=_0x42f6fb;this[_0x1f7ddf(0xc6)](this['_threadCommentModel'][_0x1f7ddf(0x97)][_0x1f7ddf(0xdd)](_0x4e5ac2(0x10))[_0x1f7ddf(0x9c)](_0x48de03=>{const _0x5785e8=_0x1f7ddf,_0x416d5b=new Set();_0x48de03['forEach'](_0x3f6387=>{const _0xf401e5=_0xa86b;switch(_0x3f6387['type']){case'add':{const _0x5eda6c=_0x3f6387[_0xf401e5(0xe5)][_0xf401e5(0xed)];_0x416d5b['add'](_0x5eda6c);break;}}}),B(this[_0x5785e8(0xbe)],_0x416d5b);}));}[_0x42f6fb(0x9b)](){const _0x110355=_0x42f6fb;this[_0x110355(0xc6)](this[_0x110355(0x9a)][_0x110355(0x97)][_0x110355(0x9c)](async _0x41a12b=>{const _0xb313bf=_0x110355;var _0x15071,_0xc623b3,_0x10ddfe,_0x428526;const _0x663102=(_0x15071=this['_threadCommentModel'][_0xb313bf(0xd9)](_0x41a12b[_0xb313bf(0xd2)])[_0xb313bf(0xac)](_0x3f66ee=>_0x3f66ee[_0xb313bf(0xb5)]===_0x41a12b[_0xb313bf(0xb5)]))==null?void 0x0:_0x15071[_0xb313bf(0xc9)];if(!_0x663102)return;const {unitId:_0x4a0153,subUnitId:_0x199371}=_0x663102;switch(_0x41a12b[_0xb313bf(0xbc)]&&this['_userService'][_0xb313bf(0xb1)](_0x41a12b[_0xb313bf(0xbc)]),_0x41a12b['type']){case v['Add']:break;case v['Reply']:{this[_0xb313bf(0x91)][_0xb313bf(0xad)](_0x4a0153,_0x199371,{'unitId':_0x4a0153,'subUnitId':_0x199371,'ref':'','id':_0x41a12b[_0xb313bf(0xa2)],'dT':D(+_0x41a12b[_0xb313bf(0xbf)]),'threadId':_0x41a12b[_0xb313bf(0xb5)],'personId':(_0x10ddfe=(_0xc623b3=_0x41a12b[_0xb313bf(0xbc)])==null?void 0x0:_0xc623b3[_0xb313bf(0xa4)])!=null?_0x10ddfe:_0x41a12b[_0xb313bf(0xab)],'text':JSON['parse'](_0x41a12b[_0xb313bf(0xee)]),'parentId':_0x663102['id']});break;}case v[_0xb313bf(0xc2)]:{const _0x3301e2=this[_0xb313bf(0x91)][_0xb313bf(0xc8)](_0x4a0153,_0x199371,_0x41a12b[_0xb313bf(0xa2)]);_0x3301e2&&_0x3301e2[_0xb313bf(0xc0)]&&this[_0xb313bf(0x91)][_0xb313bf(0xe3)](_0x4a0153,_0x199371,_0x41a12b[_0xb313bf(0xa2)]);break;}case v['Edit']:{this[_0xb313bf(0x91)][_0xb313bf(0x93)](_0x4a0153,_0x199371,{'commentId':_0x41a12b[_0xb313bf(0xa2)],'text':JSON['parse'](_0x41a12b[_0xb313bf(0xee)])});break;}case v[_0xb313bf(0xd4)]:{const _0x16263c=(_0x428526=this[_0xb313bf(0x91)]['getUnit'](_0x41a12b['unitId'])[_0xb313bf(0xac)](_0x1012b3=>_0x1012b3[_0xb313bf(0xb5)]===_0x41a12b[_0xb313bf(0xb5)]))==null?void 0x0:_0x428526['root'];_0x16263c&&this[_0xb313bf(0x91)]['resolveComment'](_0x4a0153,_0x199371,_0x16263c['id'],_0x41a12b['solved']===I[_0xb313bf(0xe2)]);break;}}}));}};function _0xa86b(_0x2fd0b3,_0x2c4bea){const _0x30c472=_0x30c4();return _0xa86b=function(_0xa86b5e,_0x2be9cf){_0xa86b5e=_0xa86b5e-0x8a;let _0x928f69=_0x30c472[_0xa86b5e];return _0x928f69;},_0xa86b(_0x2fd0b3,_0x2c4bea);}S=V([p(0x0,_0x5a005b(_0x288b4d)),p(0x1,_0x5a005b(_0x1b10a3)),p(0x2,_0x5a005b(_0x2109a7)),p(0x3,_0x5a005b(_0x17d388))],S);const z=_0x42f6fb(0xbd),M={};var k=Object[_0x42f6fb(0xd5)],Q=(_0x518570,_0x2c0afb,_0x5770c6,_0x522666)=>{for(var _0x4e2539=_0x522666>0x1?void 0x0:_0x522666?k(_0x2c0afb,_0x5770c6):_0x2c0afb,_0x45310c=_0x518570['length']-0x1,_0x5ae72d;_0x45310c>=0x0;_0x45310c--)(_0x5ae72d=_0x518570[_0x45310c])&&(_0x4e2539=_0x5ae72d(_0x4e2539)||_0x4e2539);return _0x4e2539;},_=(_0x40c7db,_0x2edd3b)=>(_0x1cbfed,_0x522256)=>_0x2edd3b(_0x1cbfed,_0x522256,_0x40c7db);function X(_0x55ea99,_0x5afca3){const _0x26cf12=_0x42f6fb,_0xd2d858=_0x55ea99['replies'][0x0];return{..._0x5afca3,'id':_0xd2d858[_0x26cf12(0xa2)],'resolved':_0x55ea99[_0x26cf12(0x95)]===0x1,'dT':D(_0xd2d858['createTimestamp']),'personId':_0xd2d858[_0x26cf12(0xab)],'threadId':_0xd2d858[_0x26cf12(0xb5)]};}function ee(_0x4cf7fd,_0x5cf003,_0x294bfe){const _0x10aa1b=_0x42f6fb;var _0x577dfa,_0x37ac29;if(((_0x37ac29=(_0x577dfa=_0x4cf7fd==null?void 0x0:_0x4cf7fd[_0x10aa1b(0xb6)])==null?void 0x0:_0x577dfa[_0x10aa1b(0xc1)])!=null?_0x37ac29:0x0)>0x0){const _0x4230a9=(_0x25b639,_0x58b51f)=>({'id':_0x25b639['replyId'],'threadId':_0x25b639[_0x10aa1b(0xb5)],'dT':D(_0x25b639[_0x10aa1b(0xbf)]),'personId':_0x25b639[_0x10aa1b(0xab)],'resolved':_0x4cf7fd['solved']===I[_0x10aa1b(0xe2)],'unitId':_0x5cf003,'subUnitId':_0x294bfe,'text':JSON[_0x10aa1b(0xb3)](_0x25b639['content']),'parentId':_0x58b51f}),_0x351923=_0x4230a9(_0x4cf7fd[_0x10aa1b(0xb6)][0x0]);return{..._0x351923,'children':_0x4cf7fd['replies'][_0x10aa1b(0x8e)](0x1)[_0x10aa1b(0xcd)](_0x2f32af=>_0x4230a9(_0x2f32af,_0x351923['id']))};}return null;}let f=class{constructor(_0x1daf67,_0x21b225,_0x306701,_0x1bf310){const _0x5a5b26=_0x42f6fb;this[_0x5a5b26(0xca)]=_0x1daf67,this[_0x5a5b26(0xd3)]=_0x21b225,this['_sessionService']=_0x306701,this['_injector']=_0x1bf310;}async['addComment'](_0x3c0d41){const _0xaeeebf=_0x42f6fb;var _0x4f1715,_0xd0ccdc;const {parentId:_0x475f9,unitId:_0x537abd,text:_0x5db703,threadId:_0x595cc3}=_0x3c0d41,_0x17a8e7=(_0xd0ccdc=(_0x4f1715=_0x5db703[_0xaeeebf(0xdc)])==null?void 0x0:_0x4f1715[_0xaeeebf(0xa9)](_0x407415=>_0x407415[_0xaeeebf(0xbb)]===_0x2b2a81[_0xaeeebf(0xa8)])[_0xaeeebf(0xcd)](_0x1e5859=>_0x1e5859[_0xaeeebf(0xdf)]))!=null?_0xd0ccdc:[],_0x4e0cdc=JSON['stringify'](_0x5db703),_0x20bf84=(await this[_0xaeeebf(0xeb)][_0xaeeebf(0xa1)](_0x537abd))[_0xaeeebf(0xe0)]();if(_0x475f9){const _0x3bdb77={'memberId':_0x20bf84,'unitId':_0x537abd,'content':_0x4e0cdc,'mention':_0x17a8e7,'threadId':_0x595cc3},_0xa24480=(await this['_httpService'][_0xaeeebf(0xb2)]('/universer-api/comment/unit/'+_0x537abd+_0xaeeebf(0xea),{'body':_0x3bdb77}))[_0xaeeebf(0xd6)][_0xaeeebf(0x9d)];return{..._0x3c0d41,'id':_0xa24480[_0xaeeebf(0xa2)],'dT':_0x3d3be7(+_0xa24480[_0xaeeebf(0xbf)])[_0xaeeebf(0xef)](_0xaeeebf(0x92)),'personId':_0xa24480[_0xaeeebf(0xab)]};}else{const _0x4dcb82={'memberId':_0x20bf84,'unitId':_0x537abd,'content':_0x4e0cdc,'mention':_0x17a8e7},_0x5369a8=await this['_httpService'][_0xaeeebf(0xb2)](_0xaeeebf(0xda)+_0x537abd+_0xaeeebf(0x94),{'body':_0x4dcb82});return X(_0x5369a8['body'][_0xaeeebf(0x8b)],_0x3c0d41);}}async['updateComment'](_0xb361c2){const _0x432fe9=_0x42f6fb;var _0x53f53f,_0x348731;const {text:_0x27ace6,unitId:_0x3edb0a}=_0xb361c2,_0x5605d9=(_0x348731=(_0x53f53f=_0x27ace6[_0x432fe9(0xdc)])==null?void 0x0:_0x53f53f['filter'](_0x39e5e0=>_0x39e5e0['rangeType']===_0x2b2a81[_0x432fe9(0xa8)])[_0x432fe9(0xcd)](_0x356805=>_0x356805[_0x432fe9(0xdf)]))!=null?_0x348731:[],_0x468bb8=JSON[_0x432fe9(0xec)](_0x27ace6),_0x3638b8=_0xb361c2['threadId'],_0x106837=_0xb361c2['id'],_0x3b4985={'memberId':(await this[_0x432fe9(0xeb)][_0x432fe9(0xa1)](_0x3edb0a))[_0x432fe9(0xe0)](),'unitId':_0x3edb0a,'threadId':_0x3638b8,'mention':_0x5605d9,'content':_0x468bb8,'replyId':_0x106837},_0x8cf83=await this[_0x432fe9(0xca)][_0x432fe9(0xb2)](_0x432fe9(0xda)+_0x3edb0a+_0x432fe9(0x9e),{'body':_0x3b4985});return!_0x8cf83[_0x432fe9(0xd6)][_0x432fe9(0xb8)]||_0x8cf83[_0x432fe9(0xd6)][_0x432fe9(0xb8)][_0x432fe9(0xc4)]===0x1;}async[_0x42f6fb(0x8c)](_0xbaa733){const _0xfb7a54=_0x42f6fb,{unitId:_0x18f88c}=_0xbaa733,_0x15afda=_0xbaa733['threadId'],_0xd08f4={'memberId':this[_0xfb7a54(0xd3)]['getCurrentUser']()[_0xfb7a54(0xa4)],'unitId':_0x18f88c,'threadId':_0x15afda,'solved':_0xbaa733[_0xfb7a54(0xe4)]?I['Solved']:I[_0xfb7a54(0xa3)]},_0x54e383=await this['_httpService'][_0xfb7a54(0xb2)](_0xfb7a54(0xda)+_0x18f88c+_0xfb7a54(0xd1),{'body':_0xd08f4});return!_0x54e383[_0xfb7a54(0xd6)][_0xfb7a54(0xb8)]||_0x54e383[_0xfb7a54(0xd6)][_0xfb7a54(0xb8)]['code']===0x1;}async[_0x42f6fb(0xe3)](_0x6bf69a,_0xf1e11d,_0x56fe6f,_0x2e8764){const _0x2eb59a=_0x42f6fb,_0x2493a7={'memberId':(await this[_0x2eb59a(0xeb)]['requireSession'](_0x6bf69a))[_0x2eb59a(0xe0)](),'threadId':_0x56fe6f,'replyId':_0x2e8764,'unitId':_0x6bf69a},_0x3a0139=await this[_0x2eb59a(0xca)]['post'](_0x2eb59a(0xda)+_0x6bf69a+_0x2eb59a(0xde),{'body':_0x2493a7});return!_0x3a0139[_0x2eb59a(0xd6)][_0x2eb59a(0xb8)]||_0x3a0139['body'][_0x2eb59a(0xb8)][_0x2eb59a(0xc4)]===0x1;}async['listComments'](_0x290f92,_0x4e5d6e,_0x2f7c22){const _0xa1aa88=_0x42f6fb,_0x149806={'unitId':_0x290f92,'threadId':_0x2f7c22},_0x492466=await this[_0xa1aa88(0xca)][_0xa1aa88(0xb2)](_0xa1aa88(0xda)+_0x290f92+_0xa1aa88(0x8d),{'body':_0x149806}),_0x4f3cd7=_0x2f7c22['map'](_0x279c51=>ee(_0x492466[_0xa1aa88(0xd6)]['comments'][_0x279c51],_0x290f92,_0x4e5d6e))[_0xa1aa88(0xa9)](Boolean);return Object[_0xa1aa88(0x90)](_0x492466[_0xa1aa88(0xd6)]['users'])['forEach'](_0x1194f4=>{const _0x55ac9b=_0xa1aa88;this[_0x55ac9b(0xd3)][_0x55ac9b(0xb1)](_0x1194f4);}),_0x4f3cd7;}[_0x42f6fb(0xd8)](_0x2353fc){const _0x47a3a2=_0x42f6fb;return{'id':_0x2353fc['id'],'threadId':_0x2353fc[_0x47a3a2(0xb5)],'ref':_0x2353fc[_0x47a3a2(0xcf)]};}};f=Q([_(0x0,_0x5a005b(_0x55c384)),_(0x1,_0x5a005b(_0x2109a7)),_(0x2,_0x5a005b(_0x42b2d6)),_(0x3,_0x5a005b(_0x17d388))],f);var re=Object[_0x42f6fb(0xd5)],te=(_0x19e8c7,_0xf8457c,_0x19c17c,_0x1154f3)=>{for(var _0x3dd6ce=_0x1154f3>0x1?void 0x0:_0x1154f3?re(_0xf8457c,_0x19c17c):_0xf8457c,_0x18dc7b=_0x19e8c7['length']-0x1,_0x5921de;_0x18dc7b>=0x0;_0x18dc7b--)(_0x5921de=_0x19e8c7[_0x18dc7b])&&(_0x3dd6ce=_0x5921de(_0x3dd6ce)||_0x3dd6ce);return _0x3dd6ce;},N=(_0x110009,_0x598541)=>(_0x4b2d01,_0x1129f0)=>_0x598541(_0x4b2d01,_0x1129f0,_0x110009);let g=class extends _0x526a3b{constructor(_0x206397,_0x55b510){const _0x184598=_0x42f6fb;super(),this[_0x184598(0xae)]=_0x206397,this[_0x184598(0xe1)]=_0x55b510,this[_0x184598(0xb7)]();}[_0x42f6fb(0xb7)](){const _0x303db0=_0x42f6fb;this[_0x303db0(0xae)][_0x303db0(0xb4)]=this['_threadCommentDataSource'],this[_0x303db0(0xae)][_0x303db0(0xc3)]=!0x1;}};g=te([N(0x0,_0x2275a6),N(0x1,_0x5a005b(f))],g);function _0x30c4(){const _0x479656=['updateComment','/add','solved','users','commentUpdate$','27376288AwOdWg','UNRECOGNIZED','_commentService','_init','subscribe','reply','/edit','Unknown','Add','requireSession','replyId','OpenOrReOpen','userID','getUser','Reply','3702nCUUkn','COMMENT','filter','3751155gHVcxs','userId','find','addComment','_threadCommentDataSourceService','2470164yNRJwl','setConfig','addUser','post','parse','dataSource','threadId','replies','_initDataSource','error','3616248hqRAVl','233QuRiOM','rangeType','user','thread-comment-data-source.config','_injector','createTimestamp','parentId','length','Delete','syncUpdateMutationToColla','code','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','disposeWithMe','defineProperty','getComment','root','_httpService','UNIVER_UNKNOWN','_initUserSync','map','Edit','ref','delete','/solved','unitId','_userService','Solve','getOwnPropertyDescriptor','body','_config','saveCommentToSnapshot','getUnit','/universer-api/comment/unit/','onStarting','customRanges','pipe','/delete','rangeId','getMemberID','_threadCommentDataSource','Solved','deleteComment','resolved','payload','4889376xYREoM','/universer-api/user/list','_configService','505113TGpjkT','/reply','_sessionService','stringify','personId','content','format','forEach','comment','resolveComment','/list','slice','get','values','_threadCommentModel','YYYY/MM/DD\x20HH:mm'];_0x30c4=function(){return _0x479656;};return _0x30c4();}var se=Object[_0x42f6fb(0xc7)],oe=Object[_0x42f6fb(0xd5)],ne=(_0x317d83,_0x101d3d,_0x5a3b54)=>_0x101d3d in _0x317d83?se(_0x317d83,_0x101d3d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5a3b54}):_0x317d83[_0x101d3d]=_0x5a3b54,ie=(_0x2f1f52,_0x22a76c,_0x3616c2,_0x2abc5e)=>{for(var _0x321719=_0x2abc5e>0x1?void 0x0:_0x2abc5e?oe(_0x22a76c,_0x3616c2):_0x22a76c,_0x3b4867=_0x2f1f52['length']-0x1,_0x2c0e8b;_0x3b4867>=0x0;_0x3b4867--)(_0x2c0e8b=_0x2f1f52[_0x3b4867])&&(_0x321719=_0x2c0e8b(_0x321719)||_0x321719);return _0x321719;},w=(_0x2a526b,_0x212c6e)=>(_0x148cc9,_0x143383)=>_0x212c6e(_0x148cc9,_0x143383,_0x2a526b),$=(_0xe8165c,_0x25614d,_0x21ee7a)=>ne(_0xe8165c,typeof _0x25614d!='symbol'?_0x25614d+'':_0x25614d,_0x21ee7a);let b=class extends _0x1dca16{constructor(_0x1766a4=M,_0x3d4572,_0x11aae7){const _0x1b3cec=_0x42f6fb;super(),this[_0x1b3cec(0xd7)]=_0x1766a4,this[_0x1b3cec(0xbe)]=_0x3d4572,this[_0x1b3cec(0xe8)]=_0x11aae7;const {..._0x426d1c}=_0x57d01d({},M,this['_config']);this[_0x1b3cec(0xe8)][_0x1b3cec(0xb0)](z,_0x426d1c);}[_0x42f6fb(0xdb)](){const _0x26ee01=_0x42f6fb;[[f],[g],[S]][_0x26ee01(0x8a)](_0xc2795a=>{this['_injector']['add'](_0xc2795a);});}['onReady'](){const _0x4bdf0b=_0x42f6fb;this[_0x4bdf0b(0xbe)][_0x4bdf0b(0x8f)](g),this[_0x4bdf0b(0xbe)]['get'](S);}};$(b,'pluginName',W),$(b,'type',_0x10977d[_0x42f6fb(0xcb)]),b=ie([_0x8d6d07(_0x53546b,_0x19fa55,_0x5baa77),w(0x1,_0x5a005b(_0x17d388)),w(0x2,_0x596994)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3e85c4,_0x3de6e6){const _0xef7b96=_0x28a8,_0x580c=_0x3e85c4();while(!![]){try{const _0x1b8774=parseInt(_0xef7b96(0x19e))/0x1+parseInt(_0xef7b96(0x1c3))/0x2+parseInt(_0xef7b96(0x1d7))/0x3*(parseInt(_0xef7b96(0x159))/0x4)+-parseInt(_0xef7b96(0x16f))/0x5+parseInt(_0xef7b96(0x1b0))/0x6+parseInt(_0xef7b96(0x1a2))/0x7*(-parseInt(_0xef7b96(0x16a))/0x8)+-parseInt(_0xef7b96(0x1b9))/0x9;if(_0x1b8774===_0x3de6e6)break;else _0x580c['push'](_0x580c['shift']());}catch(_0x302887){_0x580c['push'](_0x580c['shift']());}}}(_0x33c2,0x7905b),function(_0x2f7f4e,_0x5c76c9){const _0x5c74f3=_0x28a8;typeof exports==_0x5c74f3(0x1d1)&&typeof module<'u'?_0x5c76c9(exports,require('@univerjs-pro/collaboration-client'),require(_0x5c74f3(0x192)),require(_0x5c74f3(0x1c8)),require(_0x5c74f3(0x188)),require(_0x5c74f3(0x1ac)),require(_0x5c74f3(0x15a)),require(_0x5c74f3(0x184))):typeof define==_0x5c74f3(0x1ce)&&define[_0x5c74f3(0x16b)]?define([_0x5c74f3(0x197),_0x5c74f3(0x196),_0x5c74f3(0x192),_0x5c74f3(0x1c8),_0x5c74f3(0x188),'@univerjs/thread-comment',_0x5c74f3(0x15a),_0x5c74f3(0x184)],_0x5c76c9):(_0x2f7f4e=typeof globalThis<'u'?globalThis:_0x2f7f4e||self,_0x5c76c9(_0x2f7f4e[_0x5c74f3(0x15c)]={},_0x2f7f4e[_0x5c74f3(0x1d4)],_0x2f7f4e[_0x5c74f3(0x17b)],_0x2f7f4e[_0x5c74f3(0x1b6)],_0x2f7f4e[_0x5c74f3(0x1c2)],_0x2f7f4e[_0x5c74f3(0x16c)],_0x2f7f4e['rxjs'],_0x2f7f4e['UniverNetwork']));}(this,function(_0x5aef6a,_0x4b7c90,_0x4ce647,_0xc82365,_0x3aebb4,_0x435464,_0x23220a,_0x481c25){'use strict';const _0x3f3b9e=_0x28a8;const _0x3b43ae='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x218ff7=(_0x3795d4=>(_0x3795d4[_0x3795d4['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x3795d4[_0x3795d4[_0x3f3b9e(0x1cf)]=0x1]='Solved',_0x3795d4[_0x3795d4[_0x3f3b9e(0x19d)]=-0x1]=_0x3f3b9e(0x19d),_0x3795d4))(_0x218ff7||{}),_0x3d72d3=(_0x397a5b=>(_0x397a5b[_0x397a5b[_0x3f3b9e(0x18a)]=0x0]=_0x3f3b9e(0x18a),_0x397a5b[_0x397a5b['Add']=0x1]='Add',_0x397a5b[_0x397a5b[_0x3f3b9e(0x18b)]=0x2]=_0x3f3b9e(0x18b),_0x397a5b[_0x397a5b[_0x3f3b9e(0x17f)]=0x3]=_0x3f3b9e(0x17f),_0x397a5b[_0x397a5b['Delete']=0x4]=_0x3f3b9e(0x183),_0x397a5b[_0x397a5b[_0x3f3b9e(0x1b3)]=0x5]=_0x3f3b9e(0x1b3),_0x397a5b[_0x397a5b['UNRECOGNIZED']=-0x1]=_0x3f3b9e(0x19d),_0x397a5b))(_0x3d72d3||{});const _0x459464=_0x2fd0ef=>_0xc82365[_0x3f3b9e(0x165)](new Date(+_0x2fd0ef))[_0x3f3b9e(0x1c7)]('YYYY/MM/DD\x20HH:mm'),_0x4e28a8=async(_0x531bc8,_0xb67f52)=>{const _0x44393e=_0x3f3b9e,_0x45a7d6=_0x531bc8[_0x44393e(0x1b4)](_0xc82365[_0x44393e(0x176)]),_0x21e21b=_0x531bc8[_0x44393e(0x1b4)](_0x481c25['HTTPService']);_0xb67f52[_0x44393e(0x168)](_0x3a8aa9=>{const _0x10bc45=_0x44393e;_0x45a7d6[_0x10bc45(0x15d)](_0x3a8aa9)&&_0xb67f52[_0x10bc45(0x1b5)](_0x3a8aa9);}),_0xb67f52[_0x44393e(0x1b7)]&&(await _0x21e21b[_0x44393e(0x1b4)](_0x44393e(0x171),{'params':{'userIDs':[..._0xb67f52]}}))[_0x44393e(0x1ab)][_0x44393e(0x18d)][_0x44393e(0x168)](_0x5c9ea0=>{const _0x4535dc=_0x44393e;_0x5c9ea0&&_0x45a7d6[_0x4535dc(0x160)](_0x5c9ea0);});};var _0x355be8=Object['getOwnPropertyDescriptor'],_0x4b6d93=(_0x393446,_0x504de5,_0x71356f,_0xcb97ec)=>{const _0x2005ef=_0x3f3b9e;for(var _0x511071=_0xcb97ec>0x1?void 0x0:_0xcb97ec?_0x355be8(_0x504de5,_0x71356f):_0x504de5,_0xe6daee=_0x393446[_0x2005ef(0x1ca)]-0x1,_0x3bff48;_0xe6daee>=0x0;_0xe6daee--)(_0x3bff48=_0x393446[_0xe6daee])&&(_0x511071=_0x3bff48(_0x511071)||_0x511071);return _0x511071;},_0x1d6953=(_0x1fd698,_0x135ae5)=>(_0x41b58a,_0x401ae0)=>_0x135ae5(_0x41b58a,_0x401ae0,_0x1fd698);let _0x19aef7=class extends _0xc82365[_0x3f3b9e(0x174)]{constructor(_0x99e13e,_0x482823,_0x8cae33,_0x4a6ec7){const _0x363f16=_0x3f3b9e;super(),this[_0x363f16(0x1c6)]=_0x99e13e,this[_0x363f16(0x179)]=_0x482823,this[_0x363f16(0x1c5)]=_0x8cae33,this[_0x363f16(0x186)]=_0x4a6ec7,this[_0x363f16(0x177)](),this[_0x363f16(0x181)]();}[_0x3f3b9e(0x181)](){const _0x34c16f=_0x3f3b9e;this[_0x34c16f(0x1a9)](this['_threadCommentModel'][_0x34c16f(0x17d)][_0x34c16f(0x17a)](_0x23220a['bufferTime'](0x10))[_0x34c16f(0x175)](_0x226139=>{const _0xa8fdbb=_0x34c16f,_0x2ec085=new Set();_0x226139['forEach'](_0x1e117f=>{const _0x3486db=_0x28a8;switch(_0x1e117f[_0x3486db(0x1a8)]){case'add':{const _0x3cad25=_0x1e117f[_0x3486db(0x19a)][_0x3486db(0x16d)];_0x2ec085['add'](_0x3cad25);break;}}}),_0x4e28a8(this[_0xa8fdbb(0x186)],_0x2ec085);}));}[_0x3f3b9e(0x177)](){const _0xbd0cc6=_0x3f3b9e;this[_0xbd0cc6(0x1a9)](this['_commentService'][_0xbd0cc6(0x17d)][_0xbd0cc6(0x175)](async _0x5e67df=>{const _0x3d1a1e=_0xbd0cc6;var _0x2b4670,_0x5bb884,_0x4c3843,_0x2a07bf;const _0x27e400=(_0x2b4670=this['_threadCommentModel'][_0x3d1a1e(0x1c0)](_0x5e67df[_0x3d1a1e(0x1b1)])['find'](_0x4b7d00=>_0x4b7d00[_0x3d1a1e(0x1d2)]===_0x5e67df['threadId']))==null?void 0x0:_0x2b4670[_0x3d1a1e(0x178)];if(!_0x27e400)return;const {unitId:_0x1a08ef,subUnitId:_0x22ca85}=_0x27e400;switch(_0x5e67df['user']&&this[_0x3d1a1e(0x1c5)]['addUser'](_0x5e67df['user']),_0x5e67df[_0x3d1a1e(0x1a8)]){case _0x3d72d3[_0x3d1a1e(0x17e)]:break;case _0x3d72d3[_0x3d1a1e(0x18b)]:{this[_0x3d1a1e(0x179)]['addComment'](_0x1a08ef,_0x22ca85,{'unitId':_0x1a08ef,'subUnitId':_0x22ca85,'ref':'','id':_0x5e67df[_0x3d1a1e(0x18e)],'dT':_0x459464(+_0x5e67df[_0x3d1a1e(0x163)]),'threadId':_0x5e67df[_0x3d1a1e(0x1d2)],'personId':(_0x4c3843=(_0x5bb884=_0x5e67df[_0x3d1a1e(0x1a0)])==null?void 0x0:_0x5bb884['userID'])!=null?_0x4c3843:_0x5e67df[_0x3d1a1e(0x18f)],'text':JSON['parse'](_0x5e67df[_0x3d1a1e(0x1a3)]),'parentId':_0x27e400['id']});break;}case _0x3d72d3['Delete']:{const _0x232450=this['_threadCommentModel'][_0x3d1a1e(0x15e)](_0x1a08ef,_0x22ca85,_0x5e67df[_0x3d1a1e(0x18e)]);_0x232450&&_0x232450[_0x3d1a1e(0x189)]&&this['_threadCommentModel']['deleteComment'](_0x1a08ef,_0x22ca85,_0x5e67df['replyId']);break;}case _0x3d72d3['Edit']:{this[_0x3d1a1e(0x179)]['updateComment'](_0x1a08ef,_0x22ca85,{'commentId':_0x5e67df['replyId'],'text':JSON[_0x3d1a1e(0x1cb)](_0x5e67df['content'])});break;}case _0x3d72d3[_0x3d1a1e(0x1b3)]:{const _0x1489c2=(_0x2a07bf=this[_0x3d1a1e(0x179)][_0x3d1a1e(0x1c0)](_0x5e67df[_0x3d1a1e(0x1b1)])[_0x3d1a1e(0x1d3)](_0x506095=>_0x506095['threadId']===_0x5e67df[_0x3d1a1e(0x1d2)]))==null?void 0x0:_0x2a07bf[_0x3d1a1e(0x178)];_0x1489c2&&this['_threadCommentModel']['resolveComment'](_0x1a08ef,_0x22ca85,_0x1489c2['id'],_0x5e67df[_0x3d1a1e(0x1ba)]===_0x218ff7[_0x3d1a1e(0x1cf)]);break;}}}));}};_0x19aef7=_0x4b6d93([_0x1d6953(0x0,_0xc82365[_0x3f3b9e(0x1bf)](_0x4b7c90['CommentService'])),_0x1d6953(0x1,_0xc82365[_0x3f3b9e(0x1bf)](_0x435464[_0x3f3b9e(0x1b2)])),_0x1d6953(0x2,_0xc82365[_0x3f3b9e(0x1bf)](_0xc82365[_0x3f3b9e(0x176)])),_0x1d6953(0x3,_0xc82365[_0x3f3b9e(0x1bf)](_0xc82365['Injector']))],_0x19aef7);const _0x18bcdf=_0x3f3b9e(0x166),_0x13396e={};var _0x40ea8d=Object['getOwnPropertyDescriptor'],_0x491e56=(_0x34730e,_0x457988,_0x5f345b,_0x248e55)=>{for(var _0x3b4d9b=_0x248e55>0x1?void 0x0:_0x248e55?_0x40ea8d(_0x457988,_0x5f345b):_0x457988,_0x27ca2e=_0x34730e['length']-0x1,_0x390415;_0x27ca2e>=0x0;_0x27ca2e--)(_0x390415=_0x34730e[_0x27ca2e])&&(_0x3b4d9b=_0x390415(_0x3b4d9b)||_0x3b4d9b);return _0x3b4d9b;},_0xce3454=(_0x4635f3,_0x40fddd)=>(_0x8ef1a8,_0x1010c5)=>_0x40fddd(_0x8ef1a8,_0x1010c5,_0x4635f3);function _0x253b60(_0x28cb3d,_0x3de7e8){const _0x530142=_0x3f3b9e,_0x4539ce=_0x28cb3d['replies'][0x0];return{..._0x3de7e8,'id':_0x4539ce[_0x530142(0x18e)],'resolved':_0x28cb3d[_0x530142(0x1ba)]===0x1,'dT':_0x459464(_0x4539ce[_0x530142(0x163)]),'personId':_0x4539ce[_0x530142(0x18f)],'threadId':_0x4539ce[_0x530142(0x1d2)]};}function _0x28bd6c(_0x4b8cf1,_0x3cd23f,_0x5efa1b){const _0xa1184b=_0x3f3b9e;var _0x1f91ab,_0x2e77c9;if(((_0x2e77c9=(_0x1f91ab=_0x4b8cf1==null?void 0x0:_0x4b8cf1['replies'])==null?void 0x0:_0x1f91ab['length'])!=null?_0x2e77c9:0x0)>0x0){const _0xf30381=(_0x26eb60,_0x5af123)=>({'id':_0x26eb60[_0xa1184b(0x18e)],'threadId':_0x26eb60[_0xa1184b(0x1d2)],'dT':_0x459464(_0x26eb60[_0xa1184b(0x163)]),'personId':_0x26eb60['userId'],'resolved':_0x4b8cf1[_0xa1184b(0x1ba)]===_0x218ff7[_0xa1184b(0x1cf)],'unitId':_0x3cd23f,'subUnitId':_0x5efa1b,'text':JSON[_0xa1184b(0x1cb)](_0x26eb60[_0xa1184b(0x1a3)]),'parentId':_0x5af123}),_0x3df7f5=_0xf30381(_0x4b8cf1[_0xa1184b(0x1c1)][0x0]);return{..._0x3df7f5,'children':_0x4b8cf1['replies'][_0xa1184b(0x164)](0x1)[_0xa1184b(0x1d6)](_0x354af2=>_0xf30381(_0x354af2,_0x3df7f5['id']))};}return null;}let _0x1ee8ec=class{constructor(_0x32acde,_0x3af678,_0x97b383,_0x5cdeb2){const _0x25cabb=_0x3f3b9e;this[_0x25cabb(0x1cc)]=_0x32acde,this[_0x25cabb(0x1c5)]=_0x3af678,this['_sessionService']=_0x97b383,this[_0x25cabb(0x186)]=_0x5cdeb2;}async['addComment'](_0x1053b2){const _0x439a09=_0x3f3b9e;var _0x577abc,_0x2b47a3;const {parentId:_0x401a07,unitId:_0x292e06,text:_0x427d19,threadId:_0x1576e6}=_0x1053b2,_0xa08641=(_0x2b47a3=(_0x577abc=_0x427d19[_0x439a09(0x1a7)])==null?void 0x0:_0x577abc['filter'](_0x48b17a=>_0x48b17a['rangeType']===_0xc82365[_0x439a09(0x1a1)][_0x439a09(0x1cd)])['map'](_0x1ac5df=>_0x1ac5df[_0x439a09(0x172)]))!=null?_0x2b47a3:[],_0x738c3=JSON[_0x439a09(0x17c)](_0x427d19),_0x52bf9e=(await this[_0x439a09(0x180)][_0x439a09(0x199)](_0x292e06))['getMemberID']();if(_0x401a07){const _0xd4d376={'memberId':_0x52bf9e,'unitId':_0x292e06,'content':_0x738c3,'mention':_0xa08641,'threadId':_0x1576e6},_0x1afd2d=(await this[_0x439a09(0x1cc)][_0x439a09(0x1a6)]('/universer-api/comment/unit/'+_0x292e06+_0x439a09(0x1b8),{'body':_0xd4d376}))[_0x439a09(0x1ab)][_0x439a09(0x1a5)];return{..._0x1053b2,'id':_0x1afd2d[_0x439a09(0x18e)],'dT':_0xc82365['dayjs'](+_0x1afd2d[_0x439a09(0x163)])[_0x439a09(0x1c7)](_0x439a09(0x1bd)),'personId':_0x1afd2d[_0x439a09(0x18f)]};}else{const _0x41609b={'memberId':_0x52bf9e,'unitId':_0x292e06,'content':_0x738c3,'mention':_0xa08641},_0x2bb7c0=await this['_httpService'][_0x439a09(0x1a6)](_0x439a09(0x19f)+_0x292e06+_0x439a09(0x1a4),{'body':_0x41609b});return _0x253b60(_0x2bb7c0[_0x439a09(0x1ab)]['comment'],_0x1053b2);}}async[_0x3f3b9e(0x18c)](_0x4c1ac0){const _0x164a6d=_0x3f3b9e;var _0x5bca94,_0x21852f;const {text:_0x2f9d28,unitId:_0x523c00}=_0x4c1ac0,_0x2c4ec2=(_0x21852f=(_0x5bca94=_0x2f9d28[_0x164a6d(0x1a7)])==null?void 0x0:_0x5bca94['filter'](_0x26094b=>_0x26094b[_0x164a6d(0x173)]===_0xc82365[_0x164a6d(0x1a1)][_0x164a6d(0x1cd)])[_0x164a6d(0x1d6)](_0x4d8949=>_0x4d8949['rangeId']))!=null?_0x21852f:[],_0x2b81fa=JSON[_0x164a6d(0x17c)](_0x2f9d28),_0x1cd74b=_0x4c1ac0['threadId'],_0x54f288=_0x4c1ac0['id'],_0x2e6f75={'memberId':(await this[_0x164a6d(0x180)]['requireSession'](_0x523c00))[_0x164a6d(0x169)](),'unitId':_0x523c00,'threadId':_0x1cd74b,'mention':_0x2c4ec2,'content':_0x2b81fa,'replyId':_0x54f288},_0x1ad429=await this[_0x164a6d(0x1cc)][_0x164a6d(0x1a6)](_0x164a6d(0x19f)+_0x523c00+_0x164a6d(0x16e),{'body':_0x2e6f75});return!_0x1ad429[_0x164a6d(0x1ab)]['error']||_0x1ad429['body'][_0x164a6d(0x1bb)][_0x164a6d(0x1aa)]===0x1;}async[_0x3f3b9e(0x162)](_0x126a55){const _0x415973=_0x3f3b9e,{unitId:_0x4edce6}=_0x126a55,_0x545032=_0x126a55[_0x415973(0x1d2)],_0x3c5b44={'memberId':this[_0x415973(0x1c5)]['getCurrentUser']()['userID'],'unitId':_0x4edce6,'threadId':_0x545032,'solved':_0x126a55['resolved']?_0x218ff7[_0x415973(0x1cf)]:_0x218ff7['OpenOrReOpen']},_0x5cbd0e=await this[_0x415973(0x1cc)][_0x415973(0x1a6)](_0x415973(0x19f)+_0x4edce6+_0x415973(0x167),{'body':_0x3c5b44});return!_0x5cbd0e[_0x415973(0x1ab)]['error']||_0x5cbd0e[_0x415973(0x1ab)]['error'][_0x415973(0x1aa)]===0x1;}async['deleteComment'](_0x4a98f4,_0xdb2860,_0x50c03e,_0x3a45f7){const _0x9dfb51=_0x3f3b9e,_0xc164b8={'memberId':(await this[_0x9dfb51(0x180)][_0x9dfb51(0x199)](_0x4a98f4))[_0x9dfb51(0x169)](),'threadId':_0x50c03e,'replyId':_0x3a45f7,'unitId':_0x4a98f4},_0x2b19ac=await this[_0x9dfb51(0x1cc)][_0x9dfb51(0x1a6)](_0x9dfb51(0x19f)+_0x4a98f4+'/delete',{'body':_0xc164b8});return!_0x2b19ac[_0x9dfb51(0x1ab)][_0x9dfb51(0x1bb)]||_0x2b19ac[_0x9dfb51(0x1ab)][_0x9dfb51(0x1bb)][_0x9dfb51(0x1aa)]===0x1;}async[_0x3f3b9e(0x1c9)](_0x569fe5,_0xd3a4a1,_0x2eec93){const _0x4770b3=_0x3f3b9e,_0x4029b1={'unitId':_0x569fe5,'threadId':_0x2eec93},_0x2b931d=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x569fe5+_0x4770b3(0x198),{'body':_0x4029b1}),_0x4f4664=_0x2eec93['map'](_0x2f08a7=>_0x28bd6c(_0x2b931d[_0x4770b3(0x1ab)][_0x4770b3(0x194)][_0x2f08a7],_0x569fe5,_0xd3a4a1))[_0x4770b3(0x187)](Boolean);return Object[_0x4770b3(0x170)](_0x2b931d[_0x4770b3(0x1ab)][_0x4770b3(0x18d)])['forEach'](_0x4a0d10=>{const _0x519539=_0x4770b3;this['_userService'][_0x519539(0x160)](_0x4a0d10);}),_0x4f4664;}['saveCommentToSnapshot'](_0x4bd6bb){const _0x574855=_0x3f3b9e;return{'id':_0x4bd6bb['id'],'threadId':_0x4bd6bb[_0x574855(0x1d2)],'ref':_0x4bd6bb['ref']};}};_0x1ee8ec=_0x491e56([_0xce3454(0x0,_0xc82365[_0x3f3b9e(0x1bf)](_0x481c25[_0x3f3b9e(0x1d5)])),_0xce3454(0x1,_0xc82365['Inject'](_0xc82365[_0x3f3b9e(0x176)])),_0xce3454(0x2,_0xc82365[_0x3f3b9e(0x1bf)](_0x4b7c90[_0x3f3b9e(0x190)])),_0xce3454(0x3,_0xc82365[_0x3f3b9e(0x1bf)](_0xc82365[_0x3f3b9e(0x15f)]))],_0x1ee8ec);var _0x180f3a=Object['getOwnPropertyDescriptor'],_0x343863=(_0x348e90,_0x3d654e,_0x59482a,_0x1ba828)=>{for(var _0x504ec2=_0x1ba828>0x1?void 0x0:_0x1ba828?_0x180f3a(_0x3d654e,_0x59482a):_0x3d654e,_0x1820a7=_0x348e90['length']-0x1,_0x414143;_0x1820a7>=0x0;_0x1820a7--)(_0x414143=_0x348e90[_0x1820a7])&&(_0x504ec2=_0x414143(_0x504ec2)||_0x504ec2);return _0x504ec2;},_0x55713f=(_0x4f6ef3,_0x54613f)=>(_0x40241a,_0x3a3f66)=>_0x54613f(_0x40241a,_0x3a3f66,_0x4f6ef3);let _0x4ce67b=class extends _0xc82365['Disposable']{constructor(_0x41b1a7,_0x17b06f){const _0x4d3625=_0x3f3b9e;super(),this['_threadCommentDataSourceService']=_0x41b1a7,this['_threadCommentDataSource']=_0x17b06f,this[_0x4d3625(0x1be)]();}[_0x3f3b9e(0x1be)](){const _0x53edf5=_0x3f3b9e;this[_0x53edf5(0x1af)]['dataSource']=this['_threadCommentDataSource'],this[_0x53edf5(0x1af)][_0x53edf5(0x1ae)]=!0x1;}};_0x4ce67b=_0x343863([_0x55713f(0x0,_0x435464[_0x3f3b9e(0x193)]),_0x55713f(0x1,_0xc82365[_0x3f3b9e(0x1bf)](_0x1ee8ec))],_0x4ce67b);var _0x88c4ae=Object[_0x3f3b9e(0x1c4)],_0x54ebfc=Object[_0x3f3b9e(0x185)],_0x1972d4=(_0x1ba96b,_0x3770d5,_0x22cd4c)=>_0x3770d5 in _0x1ba96b?_0x88c4ae(_0x1ba96b,_0x3770d5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x22cd4c}):_0x1ba96b[_0x3770d5]=_0x22cd4c,_0x32ec8a=(_0x11230d,_0x44e3c7,_0x272320,_0x4196da)=>{for(var _0x5bf3f6=_0x4196da>0x1?void 0x0:_0x4196da?_0x54ebfc(_0x44e3c7,_0x272320):_0x44e3c7,_0x4ed622=_0x11230d['length']-0x1,_0x182eb9;_0x4ed622>=0x0;_0x4ed622--)(_0x182eb9=_0x11230d[_0x4ed622])&&(_0x5bf3f6=_0x182eb9(_0x5bf3f6)||_0x5bf3f6);return _0x5bf3f6;},_0x1d369f=(_0x58c766,_0x36d79)=>(_0x460bd3,_0x3cdce3)=>_0x36d79(_0x460bd3,_0x3cdce3,_0x58c766),_0x2d65b0=(_0x7cc5e6,_0x3fb421,_0x5834cc)=>_0x1972d4(_0x7cc5e6,typeof _0x3fb421!='symbol'?_0x3fb421+'':_0x3fb421,_0x5834cc);_0x5aef6a[_0x3f3b9e(0x1bc)]=class extends _0xc82365['Plugin']{constructor(_0x100ff7=_0x13396e,_0x2a858a,_0x58553b){const _0x7af5ca=_0x3f3b9e;super(),this['_config']=_0x100ff7,this[_0x7af5ca(0x186)]=_0x2a858a,this['_configService']=_0x58553b;const {..._0x1bf34f}=_0xc82365[_0x7af5ca(0x1d0)]({},_0x13396e,this[_0x7af5ca(0x182)]);this[_0x7af5ca(0x191)][_0x7af5ca(0x161)](_0x18bcdf,_0x1bf34f);}['onStarting'](){[[_0x1ee8ec],[_0x4ce67b],[_0x19aef7]]['forEach'](_0x20aeb8=>{const _0xaceafa=_0x28a8;this[_0xaceafa(0x186)]['add'](_0x20aeb8);});}['onReady'](){const _0x691d06=_0x3f3b9e;this['_injector'][_0x691d06(0x1b4)](_0x4ce67b),this[_0x691d06(0x186)][_0x691d06(0x1b4)](_0x19aef7);}},_0x2d65b0(_0x5aef6a[_0x3f3b9e(0x1bc)],'pluginName',_0x3b43ae),_0x2d65b0(_0x5aef6a[_0x3f3b9e(0x1bc)],_0x3f3b9e(0x1a8),_0xc82365[_0x3f3b9e(0x195)]['UNIVER_UNKNOWN']),_0x5aef6a['UniverThreadCommentDataSourcePlugin']=_0x32ec8a([_0xc82365[_0x3f3b9e(0x15b)](_0x3aebb4[_0x3f3b9e(0x19b)],_0x4b7c90[_0x3f3b9e(0x158)],_0x4ce647[_0x3f3b9e(0x1ad)]),_0x1d369f(0x1,_0xc82365[_0x3f3b9e(0x1bf)](_0xc82365[_0x3f3b9e(0x15f)])),_0x1d369f(0x2,_0xc82365['IConfigService'])],_0x5aef6a[_0x3f3b9e(0x1bc)]),Object['defineProperty'](_0x5aef6a,Symbol[_0x3f3b9e(0x19c)],{'value':'Module'});}));function _0x28a8(_0x2a4037,_0x1b3767){const _0x33c242=_0x33c2();return _0x28a8=function(_0x28a88e,_0x1edbf0){_0x28a88e=_0x28a88e-0x158;let _0x103393=_0x33c242[_0x28a88e];return _0x103393;},_0x28a8(_0x2a4037,_0x1b3767);}function _0x33c2(){const _0x7089a0=['UniverCollaborationClientPlugin','28rBbWbe','rxjs','DependentOn','UniverProThreadCommentDatasource','getUser','getComment','Injector','addUser','setConfig','resolveComment','createTimestamp','slice','dayjs','thread-comment-data-source.config','/solved','forEach','getMemberID','3856sERCJM','amd','UniverThreadComment','personId','/edit','2356045LIMyPx','values','/universer-api/user/list','rangeId','rangeType','Disposable','subscribe','UserManagerService','_init','root','_threadCommentModel','pipe','UniverProLicense','stringify','commentUpdate$','Add','Edit','_sessionService','_initUserSync','_config','Delete','@univerjs/network','getOwnPropertyDescriptor','_injector','filter','@univerjs/thread-comment-ui','parentId','Unknown','Reply','updateComment','users','replyId','userId','CollaborationSessionService','_configService','@univerjs-pro/license','IThreadCommentDataSourceService','comments','UniverInstanceType','@univerjs-pro/collaboration-client','exports','/list','requireSession','payload','UniverThreadCommentUIPlugin','toStringTag','UNRECOGNIZED','640381xqOyQV','/universer-api/comment/unit/','user','CustomRangeType','10297EoTNGs','content','/add','reply','post','customRanges','type','disposeWithMe','code','body','@univerjs/thread-comment','UniverLicensePlugin','syncUpdateMutationToColla','_threadCommentDataSourceService','5785986JZWXHf','unitId','ThreadCommentModel','Solve','get','delete','UniverCore','size','/reply','6577938HiGudu','solved','error','UniverThreadCommentDataSourcePlugin','YYYY/MM/DD\x20HH:mm','_initDataSource','Inject','getUnit','replies','UniverThreadCommentUi','757202oKHMsj','defineProperty','_userService','_commentService','format','@univerjs/core','listComments','length','parse','_httpService','COMMENT','function','Solved','merge','object','threadId','find','UniverProCollaborationClient','HTTPService','map','181503MUrHEJ'];_0x33c2=function(){return _0x7089a0;};return _0x33c2();}
|
|
1
|
+
function _0x5f03(){const _0x26ed98=['Delete','_sessionService','delete','getCurrentUser','defineProperty','addUser','570yPbIVZ','post','_userService','userId','Reply','dataSource','583880YuKsvi','@univerjs-pro/license','getMemberID','_init','parentId','_injector','_initUserSync','comment','Solved','root','user','1JVdLma','deleteComment','forEach','content','replyId','Injector','add','_threadCommentDataSource','stringify','resolveComment','Inject','/universer-api/user/list','replies','syncUpdateMutationToColla','UniverCollaborationClientPlugin','UniverThreadCommentUi','payload','/delete','saveCommentToSnapshot','listComments','2241441gncHZL','dayjs','comments','355598uhvuSX','rangeId','_configService','symbol','920104HwBYQM','_config','OpenOrReOpen','639300kToVYm','Disposable','addComment','/edit','Add','resolved','amd','get','UniverCore','UNRECOGNIZED','Edit','Solve','updateComment','CollaborationSessionService','UNIVER_UNKNOWN','/list','customRanges','IThreadCommentDataSourceService','users','createTimestamp','commentUpdate$','UniverLicensePlugin','_initDataSource','3395SxiCDX','find','UniverThreadCommentUIPlugin','format','UserManagerService','getOwnPropertyDescriptor','type','toStringTag','disposeWithMe','function','pluginName','@univerjs-pro/collaboration-client','size','slice','userID','code','IConfigService','YYYY/MM/DD\x20HH:mm','CustomRangeType','_commentService','_httpService','HTTPService','body','UniverThreadCommentDataSourcePlugin','parse','threadId','@univerjs/core','/universer-api/comment/unit/','pipe','unitId','error','thread-comment-data-source.config','@univerjs/thread-comment','1206345qSAlTo','UniverProThreadCommentDatasource','filter','DependentOn','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','exports','reply','UniverNetwork','map','_threadCommentModel','merge','bufferTime','onStarting','requireSession','Unknown','subscribe','setConfig','_threadCommentDataSourceService','getUser','rangeType','rxjs'];_0x5f03=function(){return _0x26ed98;};return _0x5f03();}function _0x26ec(_0x53f284,_0x52f1bc){const _0x5f039b=_0x5f03();return _0x26ec=function(_0x26ec00,_0x413c25){_0x26ec00=_0x26ec00-0xa2;let _0x505c5a=_0x5f039b[_0x26ec00];return _0x505c5a;},_0x26ec(_0x53f284,_0x52f1bc);}(function(_0x350b5c,_0x34d8f7){const _0x5de79c=_0x26ec,_0x4acc80=_0x350b5c();while(!![]){try{const _0x189bdf=parseInt(_0x5de79c(0x106))/0x1*(parseInt(_0x5de79c(0x11d))/0x2)+-parseInt(_0x5de79c(0x124))/0x3+-parseInt(_0x5de79c(0xfb))/0x4+parseInt(_0x5de79c(0xd9))/0x5+parseInt(_0x5de79c(0xf5))/0x6*(-parseInt(_0x5de79c(0xb8))/0x7)+-parseInt(_0x5de79c(0x121))/0x8+parseInt(_0x5de79c(0x11a))/0x9;if(_0x189bdf===_0x34d8f7)break;else _0x4acc80['push'](_0x4acc80['shift']());}catch(_0x13f734){_0x4acc80['push'](_0x4acc80['shift']());}}}(_0x5f03,0x241f7),function(_0x3d5f0b,_0x2bdf87){const _0xba1594=_0x26ec;typeof exports=='object'&&typeof module<'u'?_0x2bdf87(exports,require(_0xba1594(0xc3)),require('@univerjs-pro/license'),require(_0xba1594(0xd2)),require('@univerjs/thread-comment-ui'),require(_0xba1594(0xd8)),require('rxjs'),require('@univerjs/network')):typeof define==_0xba1594(0xc1)&&define[_0xba1594(0xa7)]?define([_0xba1594(0xdf),'@univerjs-pro/collaboration-client',_0xba1594(0xfc),_0xba1594(0xd2),'@univerjs/thread-comment-ui',_0xba1594(0xd8),_0xba1594(0xee),'@univerjs/network'],_0x2bdf87):(_0x3d5f0b=typeof globalThis<'u'?globalThis:_0x3d5f0b||self,_0x2bdf87(_0x3d5f0b[_0xba1594(0xda)]={},_0x3d5f0b['UniverProCollaborationClient'],_0x3d5f0b['UniverProLicense'],_0x3d5f0b[_0xba1594(0xa9)],_0x3d5f0b[_0xba1594(0x115)],_0x3d5f0b['UniverThreadComment'],_0x3d5f0b[_0xba1594(0xee)],_0x3d5f0b[_0xba1594(0xe1)]));}(this,function(_0x294fe3,_0x5b9f5f,_0x1da767,_0x29f5da,_0x18c145,_0x255210,_0xb12c34,_0x202d6b){'use strict';const _0x32fc23=_0x26ec;const _0x4c0562=_0x32fc23(0xdd);var _0x3ab50f=(_0x3d8b79=>(_0x3d8b79[_0x3d8b79[_0x32fc23(0x123)]=0x0]='OpenOrReOpen',_0x3d8b79[_0x3d8b79[_0x32fc23(0x103)]=0x1]=_0x32fc23(0x103),_0x3d8b79[_0x3d8b79[_0x32fc23(0xaa)]=-0x1]=_0x32fc23(0xaa),_0x3d8b79))(_0x3ab50f||{}),_0x2feb99=(_0x986dea=>(_0x986dea[_0x986dea[_0x32fc23(0xe8)]=0x0]=_0x32fc23(0xe8),_0x986dea[_0x986dea['Add']=0x1]=_0x32fc23(0xa5),_0x986dea[_0x986dea[_0x32fc23(0xf9)]=0x2]=_0x32fc23(0xf9),_0x986dea[_0x986dea[_0x32fc23(0xab)]=0x3]=_0x32fc23(0xab),_0x986dea[_0x986dea[_0x32fc23(0xef)]=0x4]=_0x32fc23(0xef),_0x986dea[_0x986dea[_0x32fc23(0xac)]=0x5]='Solve',_0x986dea[_0x986dea[_0x32fc23(0xaa)]=-0x1]='UNRECOGNIZED',_0x986dea))(_0x2feb99||{});const _0x51e067=_0x52e455=>_0x29f5da[_0x32fc23(0x11b)](new Date(+_0x52e455))[_0x32fc23(0xbb)](_0x32fc23(0xc9)),_0x524de5=async(_0x52ded0,_0x34bb5a)=>{const _0x14f058=_0x32fc23,_0x51131e=_0x52ded0['get'](_0x29f5da[_0x14f058(0xbc)]),_0xf06d05=_0x52ded0[_0x14f058(0xa8)](_0x202d6b['HTTPService']);_0x34bb5a['forEach'](_0x443dc4=>{const _0x21636e=_0x14f058;_0x51131e[_0x21636e(0xec)](_0x443dc4)&&_0x34bb5a[_0x21636e(0xf1)](_0x443dc4);}),_0x34bb5a[_0x14f058(0xc4)]&&(await _0xf06d05[_0x14f058(0xa8)](_0x14f058(0x111),{'params':{'userIDs':[..._0x34bb5a]}}))[_0x14f058(0xce)][_0x14f058(0xb3)]['forEach'](_0x58dccd=>{_0x58dccd&&_0x51131e['addUser'](_0x58dccd);});};var _0x570391=Object[_0x32fc23(0xbd)],_0x418277=(_0x9b316f,_0x504098,_0x2816d7,_0x286886)=>{const _0x5f0438=_0x32fc23;for(var _0x54f07d=_0x286886>0x1?void 0x0:_0x286886?_0x570391(_0x504098,_0x2816d7):_0x504098,_0x59bdfd=_0x9b316f[_0x5f0438(0xde)]-0x1,_0x2d9e10;_0x59bdfd>=0x0;_0x59bdfd--)(_0x2d9e10=_0x9b316f[_0x59bdfd])&&(_0x54f07d=_0x2d9e10(_0x54f07d)||_0x54f07d);return _0x54f07d;},_0xc537b5=(_0x5b0d65,_0x4e9b4e)=>(_0x8d1b0c,_0x34dfec)=>_0x4e9b4e(_0x8d1b0c,_0x34dfec,_0x5b0d65);let _0x314f8c=class extends _0x29f5da[_0x32fc23(0xa2)]{constructor(_0x44889f,_0x49a89e,_0x50287a,_0x315e9e){const _0x5a49fd=_0x32fc23;super(),this[_0x5a49fd(0xcb)]=_0x44889f,this[_0x5a49fd(0xe3)]=_0x49a89e,this[_0x5a49fd(0xf7)]=_0x50287a,this['_injector']=_0x315e9e,this[_0x5a49fd(0xfe)](),this[_0x5a49fd(0x101)]();}['_initUserSync'](){const _0x4d600e=_0x32fc23;this[_0x4d600e(0xc0)](this[_0x4d600e(0xe3)][_0x4d600e(0xb5)][_0x4d600e(0xd4)](_0xb12c34[_0x4d600e(0xe5)](0x10))[_0x4d600e(0xe9)](_0x498bb5=>{const _0x1de771=_0x4d600e,_0x18b724=new Set();_0x498bb5[_0x1de771(0x108)](_0x53d4a4=>{const _0x4bfae1=_0x1de771;switch(_0x53d4a4[_0x4bfae1(0xbe)]){case _0x4bfae1(0x10c):{const _0x32e676=_0x53d4a4[_0x4bfae1(0x116)]['personId'];_0x18b724['add'](_0x32e676);break;}}}),_0x524de5(this[_0x1de771(0x100)],_0x18b724);}));}[_0x32fc23(0xfe)](){const _0x9a99fc=_0x32fc23;this[_0x9a99fc(0xc0)](this[_0x9a99fc(0xcb)][_0x9a99fc(0xb5)][_0x9a99fc(0xe9)](async _0x54eb63=>{const _0x34d599=_0x9a99fc;var _0x2ec066,_0x92f5,_0x165877,_0x554491;const _0x216f30=(_0x2ec066=this[_0x34d599(0xe3)]['getUnit'](_0x54eb63['unitId'])[_0x34d599(0xb9)](_0x253a48=>_0x253a48[_0x34d599(0xd1)]===_0x54eb63[_0x34d599(0xd1)]))==null?void 0x0:_0x2ec066[_0x34d599(0x104)];if(!_0x216f30)return;const {unitId:_0x36df9c,subUnitId:_0x14edc7}=_0x216f30;switch(_0x54eb63[_0x34d599(0x105)]&&this[_0x34d599(0xf7)][_0x34d599(0xf4)](_0x54eb63['user']),_0x54eb63[_0x34d599(0xbe)]){case _0x2feb99[_0x34d599(0xa5)]:break;case _0x2feb99[_0x34d599(0xf9)]:{this[_0x34d599(0xe3)][_0x34d599(0xa3)](_0x36df9c,_0x14edc7,{'unitId':_0x36df9c,'subUnitId':_0x14edc7,'ref':'','id':_0x54eb63[_0x34d599(0x10a)],'dT':_0x51e067(+_0x54eb63[_0x34d599(0xb4)]),'threadId':_0x54eb63[_0x34d599(0xd1)],'personId':(_0x165877=(_0x92f5=_0x54eb63[_0x34d599(0x105)])==null?void 0x0:_0x92f5[_0x34d599(0xc6)])!=null?_0x165877:_0x54eb63[_0x34d599(0xf8)],'text':JSON['parse'](_0x54eb63['content']),'parentId':_0x216f30['id']});break;}case _0x2feb99['Delete']:{const _0x39d9ef=this[_0x34d599(0xe3)]['getComment'](_0x36df9c,_0x14edc7,_0x54eb63[_0x34d599(0x10a)]);_0x39d9ef&&_0x39d9ef[_0x34d599(0xff)]&&this[_0x34d599(0xe3)]['deleteComment'](_0x36df9c,_0x14edc7,_0x54eb63[_0x34d599(0x10a)]);break;}case _0x2feb99[_0x34d599(0xab)]:{this[_0x34d599(0xe3)][_0x34d599(0xad)](_0x36df9c,_0x14edc7,{'commentId':_0x54eb63['replyId'],'text':JSON['parse'](_0x54eb63[_0x34d599(0x109)])});break;}case _0x2feb99[_0x34d599(0xac)]:{const _0x345410=(_0x554491=this[_0x34d599(0xe3)]['getUnit'](_0x54eb63[_0x34d599(0xd5)])[_0x34d599(0xb9)](_0x54abaa=>_0x54abaa[_0x34d599(0xd1)]===_0x54eb63[_0x34d599(0xd1)]))==null?void 0x0:_0x554491[_0x34d599(0x104)];_0x345410&&this[_0x34d599(0xe3)][_0x34d599(0x10f)](_0x36df9c,_0x14edc7,_0x345410['id'],_0x54eb63['solved']===_0x3ab50f[_0x34d599(0x103)]);break;}}}));}};_0x314f8c=_0x418277([_0xc537b5(0x0,_0x29f5da[_0x32fc23(0x110)](_0x5b9f5f['CommentService'])),_0xc537b5(0x1,_0x29f5da[_0x32fc23(0x110)](_0x255210['ThreadCommentModel'])),_0xc537b5(0x2,_0x29f5da['Inject'](_0x29f5da[_0x32fc23(0xbc)])),_0xc537b5(0x3,_0x29f5da[_0x32fc23(0x110)](_0x29f5da['Injector']))],_0x314f8c);const _0x2a7fb4=_0x32fc23(0xd7),_0x15fe85={};var _0x2a8d83=Object['getOwnPropertyDescriptor'],_0x4a41e3=(_0x28b34e,_0x239801,_0x43880b,_0x1b5fae)=>{const _0xa39ae8=_0x32fc23;for(var _0x4e7f9b=_0x1b5fae>0x1?void 0x0:_0x1b5fae?_0x2a8d83(_0x239801,_0x43880b):_0x239801,_0x12cb25=_0x28b34e[_0xa39ae8(0xde)]-0x1,_0x30f4d9;_0x12cb25>=0x0;_0x12cb25--)(_0x30f4d9=_0x28b34e[_0x12cb25])&&(_0x4e7f9b=_0x30f4d9(_0x4e7f9b)||_0x4e7f9b);return _0x4e7f9b;},_0x4cd2ca=(_0x2925da,_0x3bc702)=>(_0x4c52a5,_0xa39f6)=>_0x3bc702(_0x4c52a5,_0xa39f6,_0x2925da);function _0x459abb(_0x3d0121,_0x354802){const _0x8946d0=_0x32fc23,_0x469bd9=_0x3d0121['replies'][0x0];return{..._0x354802,'id':_0x469bd9[_0x8946d0(0x10a)],'resolved':_0x3d0121['solved']===0x1,'dT':_0x51e067(_0x469bd9[_0x8946d0(0xb4)]),'personId':_0x469bd9[_0x8946d0(0xf8)],'threadId':_0x469bd9['threadId']};}function _0x497aea(_0x486eb8,_0x48a59a,_0x4c344d){const _0x4b746f=_0x32fc23;var _0x16534e,_0x506cb8;if(((_0x506cb8=(_0x16534e=_0x486eb8==null?void 0x0:_0x486eb8[_0x4b746f(0x112)])==null?void 0x0:_0x16534e[_0x4b746f(0xde)])!=null?_0x506cb8:0x0)>0x0){const _0x4ba4fc=(_0x283f47,_0x155bae)=>({'id':_0x283f47[_0x4b746f(0x10a)],'threadId':_0x283f47[_0x4b746f(0xd1)],'dT':_0x51e067(_0x283f47[_0x4b746f(0xb4)]),'personId':_0x283f47[_0x4b746f(0xf8)],'resolved':_0x486eb8['solved']===_0x3ab50f[_0x4b746f(0x103)],'unitId':_0x48a59a,'subUnitId':_0x4c344d,'text':JSON[_0x4b746f(0xd0)](_0x283f47[_0x4b746f(0x109)]),'parentId':_0x155bae}),_0x21895b=_0x4ba4fc(_0x486eb8['replies'][0x0]);return{..._0x21895b,'children':_0x486eb8[_0x4b746f(0x112)][_0x4b746f(0xc5)](0x1)[_0x4b746f(0xe2)](_0x39a1db=>_0x4ba4fc(_0x39a1db,_0x21895b['id']))};}return null;}let _0x44295c=class{constructor(_0x4db490,_0x18d606,_0xb39e8,_0x29c63b){const _0x25a27f=_0x32fc23;this[_0x25a27f(0xcc)]=_0x4db490,this[_0x25a27f(0xf7)]=_0x18d606,this[_0x25a27f(0xf0)]=_0xb39e8,this[_0x25a27f(0x100)]=_0x29c63b;}async['addComment'](_0x23b97c){const _0x59b4c1=_0x32fc23;var _0x59481d,_0x4b8e76;const {parentId:_0x1c29da,unitId:_0x3e83c7,text:_0x49e1bd,threadId:_0x4110eb}=_0x23b97c,_0x5d8420=(_0x4b8e76=(_0x59481d=_0x49e1bd[_0x59b4c1(0xb1)])==null?void 0x0:_0x59481d['filter'](_0x19451b=>_0x19451b[_0x59b4c1(0xed)]===_0x29f5da[_0x59b4c1(0xca)]['COMMENT'])[_0x59b4c1(0xe2)](_0x36b9e2=>_0x36b9e2[_0x59b4c1(0x11e)]))!=null?_0x4b8e76:[],_0x581d90=JSON[_0x59b4c1(0x10e)](_0x49e1bd),_0x3e7488=(await this['_sessionService']['requireSession'](_0x3e83c7))['getMemberID']();if(_0x1c29da){const _0x3d0425={'memberId':_0x3e7488,'unitId':_0x3e83c7,'content':_0x581d90,'mention':_0x5d8420,'threadId':_0x4110eb},_0xdca1f1=(await this[_0x59b4c1(0xcc)][_0x59b4c1(0xf6)](_0x59b4c1(0xd3)+_0x3e83c7+'/reply',{'body':_0x3d0425}))['body'][_0x59b4c1(0xe0)];return{..._0x23b97c,'id':_0xdca1f1['replyId'],'dT':_0x29f5da[_0x59b4c1(0x11b)](+_0xdca1f1[_0x59b4c1(0xb4)])[_0x59b4c1(0xbb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xdca1f1[_0x59b4c1(0xf8)]};}else{const _0x2904f9={'memberId':_0x3e7488,'unitId':_0x3e83c7,'content':_0x581d90,'mention':_0x5d8420},_0x5b5b22=await this[_0x59b4c1(0xcc)][_0x59b4c1(0xf6)](_0x59b4c1(0xd3)+_0x3e83c7+'/add',{'body':_0x2904f9});return _0x459abb(_0x5b5b22['body'][_0x59b4c1(0x102)],_0x23b97c);}}async[_0x32fc23(0xad)](_0x337867){const _0x2ef9e8=_0x32fc23;var _0x5471e6,_0x3e98ae;const {text:_0x4d5d04,unitId:_0x17d651}=_0x337867,_0x5c4e6b=(_0x3e98ae=(_0x5471e6=_0x4d5d04[_0x2ef9e8(0xb1)])==null?void 0x0:_0x5471e6[_0x2ef9e8(0xdb)](_0x590b85=>_0x590b85['rangeType']===_0x29f5da[_0x2ef9e8(0xca)]['COMMENT'])[_0x2ef9e8(0xe2)](_0x3cb270=>_0x3cb270[_0x2ef9e8(0x11e)]))!=null?_0x3e98ae:[],_0x48b172=JSON[_0x2ef9e8(0x10e)](_0x4d5d04),_0x5e63f6=_0x337867[_0x2ef9e8(0xd1)],_0x4fe5ef=_0x337867['id'],_0x58d0c2={'memberId':(await this[_0x2ef9e8(0xf0)][_0x2ef9e8(0xe7)](_0x17d651))[_0x2ef9e8(0xfd)](),'unitId':_0x17d651,'threadId':_0x5e63f6,'mention':_0x5c4e6b,'content':_0x48b172,'replyId':_0x4fe5ef},_0x636dbb=await this[_0x2ef9e8(0xcc)][_0x2ef9e8(0xf6)](_0x2ef9e8(0xd3)+_0x17d651+_0x2ef9e8(0xa4),{'body':_0x58d0c2});return!_0x636dbb[_0x2ef9e8(0xce)]['error']||_0x636dbb['body'][_0x2ef9e8(0xd6)][_0x2ef9e8(0xc7)]===0x1;}async['resolveComment'](_0x5dabad){const _0x39d7d5=_0x32fc23,{unitId:_0x33f229}=_0x5dabad,_0x2934eb=_0x5dabad[_0x39d7d5(0xd1)],_0x7f5cea={'memberId':this[_0x39d7d5(0xf7)][_0x39d7d5(0xf2)]()['userID'],'unitId':_0x33f229,'threadId':_0x2934eb,'solved':_0x5dabad[_0x39d7d5(0xa6)]?_0x3ab50f[_0x39d7d5(0x103)]:_0x3ab50f[_0x39d7d5(0x123)]},_0x19a934=await this['_httpService'][_0x39d7d5(0xf6)](_0x39d7d5(0xd3)+_0x33f229+'/solved',{'body':_0x7f5cea});return!_0x19a934[_0x39d7d5(0xce)][_0x39d7d5(0xd6)]||_0x19a934[_0x39d7d5(0xce)][_0x39d7d5(0xd6)][_0x39d7d5(0xc7)]===0x1;}async[_0x32fc23(0x107)](_0x112f43,_0xdcffbf,_0x4206ad,_0x5c9ce3){const _0xf51404=_0x32fc23,_0x5ae68a={'memberId':(await this[_0xf51404(0xf0)][_0xf51404(0xe7)](_0x112f43))[_0xf51404(0xfd)](),'threadId':_0x4206ad,'replyId':_0x5c9ce3,'unitId':_0x112f43},_0xe185a6=await this[_0xf51404(0xcc)][_0xf51404(0xf6)]('/universer-api/comment/unit/'+_0x112f43+_0xf51404(0x117),{'body':_0x5ae68a});return!_0xe185a6[_0xf51404(0xce)][_0xf51404(0xd6)]||_0xe185a6[_0xf51404(0xce)]['error'][_0xf51404(0xc7)]===0x1;}async[_0x32fc23(0x119)](_0xe9e92b,_0x39170d,_0x261524){const _0xfe5c10=_0x32fc23,_0x113580={'unitId':_0xe9e92b,'threadId':_0x261524},_0x1c2b2=await this[_0xfe5c10(0xcc)]['post'](_0xfe5c10(0xd3)+_0xe9e92b+_0xfe5c10(0xb0),{'body':_0x113580}),_0x45b78d=_0x261524['map'](_0x305ff3=>_0x497aea(_0x1c2b2['body'][_0xfe5c10(0x11c)][_0x305ff3],_0xe9e92b,_0x39170d))['filter'](Boolean);return Object['values'](_0x1c2b2[_0xfe5c10(0xce)][_0xfe5c10(0xb3)])[_0xfe5c10(0x108)](_0x28f475=>{const _0x4b6847=_0xfe5c10;this['_userService'][_0x4b6847(0xf4)](_0x28f475);}),_0x45b78d;}[_0x32fc23(0x118)](_0x36ca64){const _0x291756=_0x32fc23;return{'id':_0x36ca64['id'],'threadId':_0x36ca64[_0x291756(0xd1)],'ref':_0x36ca64['ref']};}};_0x44295c=_0x4a41e3([_0x4cd2ca(0x0,_0x29f5da[_0x32fc23(0x110)](_0x202d6b[_0x32fc23(0xcd)])),_0x4cd2ca(0x1,_0x29f5da['Inject'](_0x29f5da['UserManagerService'])),_0x4cd2ca(0x2,_0x29f5da[_0x32fc23(0x110)](_0x5b9f5f[_0x32fc23(0xae)])),_0x4cd2ca(0x3,_0x29f5da[_0x32fc23(0x110)](_0x29f5da[_0x32fc23(0x10b)]))],_0x44295c);var _0x959e3a=Object[_0x32fc23(0xbd)],_0x227fb7=(_0xa2c430,_0x274a61,_0x46abcb,_0x4ab416)=>{const _0x23b47e=_0x32fc23;for(var _0x20970d=_0x4ab416>0x1?void 0x0:_0x4ab416?_0x959e3a(_0x274a61,_0x46abcb):_0x274a61,_0x1480f0=_0xa2c430[_0x23b47e(0xde)]-0x1,_0x3422f1;_0x1480f0>=0x0;_0x1480f0--)(_0x3422f1=_0xa2c430[_0x1480f0])&&(_0x20970d=_0x3422f1(_0x20970d)||_0x20970d);return _0x20970d;},_0x5d3624=(_0x3abd57,_0x53135c)=>(_0x395841,_0x411236)=>_0x53135c(_0x395841,_0x411236,_0x3abd57);let _0x2393dc=class extends _0x29f5da[_0x32fc23(0xa2)]{constructor(_0x2d9cf2,_0x18d6f6){const _0xd677f1=_0x32fc23;super(),this['_threadCommentDataSourceService']=_0x2d9cf2,this[_0xd677f1(0x10d)]=_0x18d6f6,this[_0xd677f1(0xb7)]();}[_0x32fc23(0xb7)](){const _0x47b38f=_0x32fc23;this[_0x47b38f(0xeb)][_0x47b38f(0xfa)]=this[_0x47b38f(0x10d)],this[_0x47b38f(0xeb)][_0x47b38f(0x113)]=!0x1;}};_0x2393dc=_0x227fb7([_0x5d3624(0x0,_0x255210[_0x32fc23(0xb2)]),_0x5d3624(0x1,_0x29f5da[_0x32fc23(0x110)](_0x44295c))],_0x2393dc);var _0x42bd42=Object[_0x32fc23(0xf3)],_0x21590a=Object[_0x32fc23(0xbd)],_0x42874c=(_0x2b8e79,_0x3c0160,_0x5b062d)=>_0x3c0160 in _0x2b8e79?_0x42bd42(_0x2b8e79,_0x3c0160,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5b062d}):_0x2b8e79[_0x3c0160]=_0x5b062d,_0x13fb1c=(_0x99441f,_0x88ef0d,_0x4ac2f4,_0x1212ce)=>{for(var _0x2b782b=_0x1212ce>0x1?void 0x0:_0x1212ce?_0x21590a(_0x88ef0d,_0x4ac2f4):_0x88ef0d,_0x1c2b9e=_0x99441f['length']-0x1,_0x47917f;_0x1c2b9e>=0x0;_0x1c2b9e--)(_0x47917f=_0x99441f[_0x1c2b9e])&&(_0x2b782b=_0x47917f(_0x2b782b)||_0x2b782b);return _0x2b782b;},_0xd094ea=(_0x442fe3,_0x4aadca)=>(_0x3d8882,_0x137012)=>_0x4aadca(_0x3d8882,_0x137012,_0x442fe3),_0x88fcc0=(_0x5826c7,_0x396a41,_0x5a5d9a)=>_0x42874c(_0x5826c7,typeof _0x396a41!=_0x32fc23(0x120)?_0x396a41+'':_0x396a41,_0x5a5d9a);_0x294fe3[_0x32fc23(0xcf)]=class extends _0x29f5da['Plugin']{constructor(_0x13693b=_0x15fe85,_0x2a6185,_0x37abc7){const _0x58ea0d=_0x32fc23;super(),this[_0x58ea0d(0x122)]=_0x13693b,this[_0x58ea0d(0x100)]=_0x2a6185,this[_0x58ea0d(0x11f)]=_0x37abc7;const {..._0x2ef9c5}=_0x29f5da[_0x58ea0d(0xe4)]({},_0x15fe85,this[_0x58ea0d(0x122)]);this['_configService'][_0x58ea0d(0xea)](_0x2a7fb4,_0x2ef9c5);}[_0x32fc23(0xe6)](){const _0x38f4b3=_0x32fc23;[[_0x44295c],[_0x2393dc],[_0x314f8c]][_0x38f4b3(0x108)](_0x5495eb=>{const _0x147109=_0x38f4b3;this['_injector'][_0x147109(0x10c)](_0x5495eb);});}['onReady'](){const _0x4f59e2=_0x32fc23;this[_0x4f59e2(0x100)][_0x4f59e2(0xa8)](_0x2393dc),this[_0x4f59e2(0x100)][_0x4f59e2(0xa8)](_0x314f8c);}},_0x88fcc0(_0x294fe3[_0x32fc23(0xcf)],_0x32fc23(0xc2),_0x4c0562),_0x88fcc0(_0x294fe3['UniverThreadCommentDataSourcePlugin'],_0x32fc23(0xbe),_0x29f5da['UniverInstanceType'][_0x32fc23(0xaf)]),_0x294fe3[_0x32fc23(0xcf)]=_0x13fb1c([_0x29f5da[_0x32fc23(0xdc)](_0x18c145[_0x32fc23(0xba)],_0x5b9f5f[_0x32fc23(0x114)],_0x1da767[_0x32fc23(0xb6)]),_0xd094ea(0x1,_0x29f5da[_0x32fc23(0x110)](_0x29f5da[_0x32fc23(0x10b)])),_0xd094ea(0x2,_0x29f5da[_0x32fc23(0xc8)])],_0x294fe3['UniverThreadCommentDataSourcePlugin']),Object[_0x32fc23(0xf3)](_0x294fe3,Symbol[_0x32fc23(0xbf)],{'value':'Module'});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.7.0-nightly.
|
|
3
|
+
"version": "0.7.0-nightly.202505041606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.7.0-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.7.0-nightly.
|
|
50
|
-
"@univerjs/core": "0.7.0-nightly.
|
|
51
|
-
"@univerjs/network": "0.7.0-nightly.
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment": "0.7.0-nightly.
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.7.0-nightly.202505041606",
|
|
49
|
+
"@univerjs-pro/license": "0.7.0-nightly.202505041606",
|
|
50
|
+
"@univerjs/core": "0.7.0-nightly.202505041606",
|
|
51
|
+
"@univerjs/network": "0.7.0-nightly.202505041606",
|
|
52
|
+
"@univerjs/thread-comment": "0.7.0-nightly.202505041606",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.7.0-nightly.202505041606",
|
|
54
|
+
"@univerjs/protocol": "0.1.46-alpha.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|