@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505041606 → 0.7.0-nightly.202505061607

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 CHANGED
@@ -1 +1 @@
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();}
1
+ 'use strict';function _0x4252(_0x3e8f12,_0x5bd4f9){const _0x1a0787=_0x1a07();return _0x4252=function(_0x42522e,_0x5d7013){_0x42522e=_0x42522e-0x160;let _0x593c16=_0x1a0787[_0x42522e];return _0x593c16;},_0x4252(_0x3e8f12,_0x5bd4f9);}const _0x5c5821=_0x4252;(function(_0x1e054b,_0x5b8930){const _0x3f8a25=_0x4252,_0x3f1b56=_0x1e054b();while(!![]){try{const _0x2a855d=-parseInt(_0x3f8a25(0x1d4))/0x1*(parseInt(_0x3f8a25(0x1d5))/0x2)+-parseInt(_0x3f8a25(0x18a))/0x3+-parseInt(_0x3f8a25(0x1b6))/0x4*(-parseInt(_0x3f8a25(0x186))/0x5)+parseInt(_0x3f8a25(0x18b))/0x6+parseInt(_0x3f8a25(0x1df))/0x7+parseInt(_0x3f8a25(0x166))/0x8*(-parseInt(_0x3f8a25(0x1e3))/0x9)+parseInt(_0x3f8a25(0x1e0))/0xa;if(_0x2a855d===_0x5b8930)break;else _0x3f1b56['push'](_0x3f1b56['shift']());}catch(_0x515f80){_0x3f1b56['push'](_0x3f1b56['shift']());}}}(_0x1a07,0x8ec54));Object[_0x5c5821(0x1b4)](exports,Symbol[_0x5c5821(0x1ae)],{'value':_0x5c5821(0x185)});const b=require(_0x5c5821(0x1ac)),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require(_0x5c5821(0x19b)),M=require(_0x5c5821(0x188)),w=require(_0x5c5821(0x1bd)),P=require(_0x5c5821(0x18e)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3542c3=>(_0x3542c3[_0x3542c3[_0x5c5821(0x183)]=0x0]='OpenOrReOpen',_0x3542c3[_0x3542c3['Solved']=0x1]='Solved',_0x3542c3[_0x3542c3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3542c3))(I||{}),v=(_0x5ca57a=>(_0x5ca57a[_0x5ca57a[_0x5c5821(0x181)]=0x0]=_0x5c5821(0x181),_0x5ca57a[_0x5ca57a[_0x5c5821(0x1b7)]=0x1]=_0x5c5821(0x1b7),_0x5ca57a[_0x5ca57a['Reply']=0x2]='Reply',_0x5ca57a[_0x5ca57a['Edit']=0x3]=_0x5c5821(0x1af),_0x5ca57a[_0x5ca57a['Delete']=0x4]=_0x5c5821(0x1a8),_0x5ca57a[_0x5ca57a[_0x5c5821(0x1b3)]=0x5]='Solve',_0x5ca57a[_0x5ca57a[_0x5c5821(0x184)]=-0x1]=_0x5c5821(0x184),_0x5ca57a))(v||{});const f=_0x55f01d=>c[_0x5c5821(0x1a4)](new Date(+_0x55f01d))[_0x5c5821(0x1c4)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x209c1c,_0x4ac234)=>{const _0x17e926=_0x5c5821,_0x56543f=_0x209c1c[_0x17e926(0x169)](c[_0x17e926(0x171)]),_0x1ee905=_0x209c1c[_0x17e926(0x169)](P[_0x17e926(0x19d)]);_0x4ac234[_0x17e926(0x17b)](_0x279db4=>{const _0x27094b=_0x17e926;_0x56543f[_0x27094b(0x191)](_0x279db4)&&_0x4ac234[_0x27094b(0x1db)](_0x279db4);}),_0x4ac234[_0x17e926(0x1d8)]&&(await _0x1ee905[_0x17e926(0x169)](_0x17e926(0x1b0),{'params':{'userIDs':[..._0x4ac234]}}))[_0x17e926(0x179)]['users'][_0x17e926(0x17b)](_0x2a2f0f=>{const _0x8aaf58=_0x17e926;_0x2a2f0f&&_0x56543f[_0x8aaf58(0x1ab)](_0x2a2f0f);});};var $=Object[_0x5c5821(0x196)],E=(_0xf8b4c7,_0x24755e,_0x3f7014,_0x1cf293)=>{const _0x5b228e=_0x5c5821;for(var _0x4891eb=_0x1cf293>0x1?void 0x0:_0x1cf293?$(_0x24755e,_0x3f7014):_0x24755e,_0x550159=_0xf8b4c7[_0x5b228e(0x1be)]-0x1,_0x522d88;_0x550159>=0x0;_0x550159--)(_0x522d88=_0xf8b4c7[_0x550159])&&(_0x4891eb=_0x522d88(_0x4891eb)||_0x4891eb);return _0x4891eb;},S=(_0x576619,_0x16b570)=>(_0x18c145,_0x161b38)=>_0x16b570(_0x18c145,_0x161b38,_0x576619);let p=class extends c[_0x5c5821(0x190)]{constructor(_0x277eed,_0x1254b3,_0x1cc20a,_0x4f315e){const _0x363dfb=_0x5c5821;super(),this[_0x363dfb(0x161)]=_0x277eed,this['_threadCommentModel']=_0x1254b3,this[_0x363dfb(0x176)]=_0x1cc20a,this[_0x363dfb(0x182)]=_0x4f315e,this[_0x363dfb(0x163)](),this['_initUserSync']();}[_0x5c5821(0x1bf)](){const _0xc136ae=_0x5c5821;this['disposeWithMe'](this['_threadCommentModel'][_0xc136ae(0x195)][_0xc136ae(0x1cb)](w[_0xc136ae(0x178)](0x10))[_0xc136ae(0x1b2)](_0x39346d=>{const _0x2e547f=_0xc136ae,_0x570875=new Set();_0x39346d[_0x2e547f(0x17b)](_0x571c64=>{const _0x2e95df=_0x2e547f;switch(_0x571c64[_0x2e95df(0x1ca)]){case _0x2e95df(0x189):{const _0x51328d=_0x571c64[_0x2e95df(0x1b9)][_0x2e95df(0x1cf)];_0x570875[_0x2e95df(0x189)](_0x51328d);break;}}}),R(this[_0x2e547f(0x182)],_0x570875);}));}[_0x5c5821(0x163)](){const _0x2a802a=_0x5c5821;this[_0x2a802a(0x1c2)](this[_0x2a802a(0x161)]['commentUpdate$'][_0x2a802a(0x1b2)](async _0x219574=>{const _0x554d50=_0x2a802a;var _0x4b6165,_0x1b891e,_0x760f90,_0x52e7e5;const _0x436a85=(_0x4b6165=this[_0x554d50(0x1ad)][_0x554d50(0x193)](_0x219574[_0x554d50(0x17d)])['find'](_0x7d40d6=>_0x7d40d6[_0x554d50(0x180)]===_0x219574['threadId']))==null?void 0x0:_0x4b6165[_0x554d50(0x1a6)];if(!_0x436a85)return;const {unitId:_0x4916b1,subUnitId:_0x4d4cbe}=_0x436a85;switch(_0x219574[_0x554d50(0x164)]&&this[_0x554d50(0x176)][_0x554d50(0x1ab)](_0x219574[_0x554d50(0x164)]),_0x219574[_0x554d50(0x1ca)]){case v[_0x554d50(0x1b7)]:break;case v[_0x554d50(0x1aa)]:{this[_0x554d50(0x1ad)][_0x554d50(0x1b5)](_0x4916b1,_0x4d4cbe,{'unitId':_0x4916b1,'subUnitId':_0x4d4cbe,'ref':'','id':_0x219574[_0x554d50(0x18f)],'dT':f(+_0x219574[_0x554d50(0x1d3)]),'threadId':_0x219574[_0x554d50(0x180)],'personId':(_0x760f90=(_0x1b891e=_0x219574[_0x554d50(0x164)])==null?void 0x0:_0x1b891e[_0x554d50(0x1c0)])!=null?_0x760f90:_0x219574[_0x554d50(0x197)],'text':JSON[_0x554d50(0x1dd)](_0x219574[_0x554d50(0x16d)]),'parentId':_0x436a85['id']});break;}case v[_0x554d50(0x1a8)]:{const _0x494ff2=this[_0x554d50(0x1ad)][_0x554d50(0x16a)](_0x4916b1,_0x4d4cbe,_0x219574[_0x554d50(0x18f)]);_0x494ff2&&_0x494ff2['parentId']&&this[_0x554d50(0x1ad)][_0x554d50(0x194)](_0x4916b1,_0x4d4cbe,_0x219574[_0x554d50(0x18f)]);break;}case v[_0x554d50(0x1af)]:{this[_0x554d50(0x1ad)]['updateComment'](_0x4916b1,_0x4d4cbe,{'commentId':_0x219574[_0x554d50(0x18f)],'text':JSON[_0x554d50(0x1dd)](_0x219574['content'])});break;}case v['Solve']:{const _0x358d91=(_0x52e7e5=this[_0x554d50(0x1ad)]['getUnit'](_0x219574[_0x554d50(0x17d)])[_0x554d50(0x16e)](_0x3a696a=>_0x3a696a[_0x554d50(0x180)]===_0x219574[_0x554d50(0x180)]))==null?void 0x0:_0x52e7e5['root'];_0x358d91&&this[_0x554d50(0x1ad)][_0x554d50(0x160)](_0x4916b1,_0x4d4cbe,_0x358d91['id'],_0x219574[_0x554d50(0x17c)]===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x5c5821(0x162)])),S(0x1,c[_0x5c5821(0x17a)](M[_0x5c5821(0x1a0)])),S(0x2,c[_0x5c5821(0x17a)](c[_0x5c5821(0x171)])),S(0x3,c[_0x5c5821(0x17a)](c[_0x5c5821(0x1bb)]))],p);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x1ed0a2,_0x260da3,_0x148111,_0x352da5)=>{const _0x51d31a=_0x5c5821;for(var _0x271aad=_0x352da5>0x1?void 0x0:_0x352da5?A(_0x260da3,_0x148111):_0x260da3,_0x19515e=_0x1ed0a2[_0x51d31a(0x1be)]-0x1,_0x1cfcf5;_0x19515e>=0x0;_0x19515e--)(_0x1cfcf5=_0x1ed0a2[_0x19515e])&&(_0x271aad=_0x1cfcf5(_0x271aad)||_0x271aad);return _0x271aad;},_=(_0x5c77b2,_0x30fe29)=>(_0x7f8418,_0x2093af)=>_0x30fe29(_0x7f8418,_0x2093af,_0x5c77b2);function Y(_0x415c04,_0xdef6a3){const _0x27f31b=_0x5c5821,_0x3639eb=_0x415c04['replies'][0x0];return{..._0xdef6a3,'id':_0x3639eb[_0x27f31b(0x18f)],'resolved':_0x415c04[_0x27f31b(0x17c)]===0x1,'dT':f(_0x3639eb[_0x27f31b(0x1d3)]),'personId':_0x3639eb[_0x27f31b(0x197)],'threadId':_0x3639eb[_0x27f31b(0x180)]};}function G(_0xa616fb,_0x44bd8d,_0x5c606b){const _0x5e4518=_0x5c5821;var _0x88e8a0,_0x157797;if(((_0x157797=(_0x88e8a0=_0xa616fb==null?void 0x0:_0xa616fb[_0x5e4518(0x1e1)])==null?void 0x0:_0x88e8a0['length'])!=null?_0x157797:0x0)>0x0){const _0x488fa8=(_0x362634,_0x3de9bf)=>({'id':_0x362634[_0x5e4518(0x18f)],'threadId':_0x362634[_0x5e4518(0x180)],'dT':f(_0x362634['createTimestamp']),'personId':_0x362634[_0x5e4518(0x197)],'resolved':_0xa616fb[_0x5e4518(0x17c)]===I['Solved'],'unitId':_0x44bd8d,'subUnitId':_0x5c606b,'text':JSON[_0x5e4518(0x1dd)](_0x362634[_0x5e4518(0x16d)]),'parentId':_0x3de9bf}),_0x4c8359=_0x488fa8(_0xa616fb[_0x5e4518(0x1e1)][0x0]);return{..._0x4c8359,'children':_0xa616fb['replies']['slice'](0x1)[_0x5e4518(0x1cc)](_0x70bf16=>_0x488fa8(_0x70bf16,_0x4c8359['id']))};}return null;}let g=class{constructor(_0x9033a9,_0x3607f9,_0x185642,_0x5ef25c){const _0x3b0f8e=_0x5c5821;this[_0x3b0f8e(0x1c5)]=_0x9033a9,this[_0x3b0f8e(0x176)]=_0x3607f9,this[_0x3b0f8e(0x1d9)]=_0x185642,this[_0x3b0f8e(0x182)]=_0x5ef25c;}async[_0x5c5821(0x1b5)](_0x4a35c3){const _0x7e947e=_0x5c5821;var _0x40b905,_0x512cec;const {parentId:_0x1c52f0,unitId:_0x3f2184,text:_0x413bb9,threadId:_0x1be4a8}=_0x4a35c3,_0x3a78c0=(_0x512cec=(_0x40b905=_0x413bb9[_0x7e947e(0x1a7)])==null?void 0x0:_0x40b905[_0x7e947e(0x1c8)](_0x43d2c2=>_0x43d2c2[_0x7e947e(0x198)]===c['CustomRangeType'][_0x7e947e(0x1d2)])[_0x7e947e(0x1cc)](_0x517edb=>_0x517edb[_0x7e947e(0x167)]))!=null?_0x512cec:[],_0x2de600=JSON[_0x7e947e(0x1b8)](_0x413bb9),_0x2c2a2d=(await this[_0x7e947e(0x1d9)][_0x7e947e(0x177)](_0x3f2184))['getMemberID']();if(_0x1c52f0){const _0xdbac6d={'memberId':_0x2c2a2d,'unitId':_0x3f2184,'content':_0x2de600,'mention':_0x3a78c0,'threadId':_0x1be4a8},_0x2abf92=(await this[_0x7e947e(0x1c5)][_0x7e947e(0x1d7)](_0x7e947e(0x17f)+_0x3f2184+_0x7e947e(0x1b1),{'body':_0xdbac6d}))[_0x7e947e(0x179)][_0x7e947e(0x168)];return{..._0x4a35c3,'id':_0x2abf92[_0x7e947e(0x18f)],'dT':c[_0x7e947e(0x1a4)](+_0x2abf92['createTimestamp'])[_0x7e947e(0x1c4)](_0x7e947e(0x1c3)),'personId':_0x2abf92[_0x7e947e(0x197)]};}else{const _0x81f9ea={'memberId':_0x2c2a2d,'unitId':_0x3f2184,'content':_0x2de600,'mention':_0x3a78c0},_0x2546aa=await this['_httpService'][_0x7e947e(0x1d7)]('/universer-api/comment/unit/'+_0x3f2184+'/add',{'body':_0x81f9ea});return Y(_0x2546aa[_0x7e947e(0x179)][_0x7e947e(0x18c)],_0x4a35c3);}}async[_0x5c5821(0x199)](_0x2fcfd0){const _0x3651cb=_0x5c5821;var _0x1b6fe6,_0x246d59;const {text:_0x547009,unitId:_0x5d3ecb}=_0x2fcfd0,_0x38eded=(_0x246d59=(_0x1b6fe6=_0x547009[_0x3651cb(0x1a7)])==null?void 0x0:_0x1b6fe6[_0x3651cb(0x1c8)](_0x1f23d8=>_0x1f23d8[_0x3651cb(0x198)]===c[_0x3651cb(0x1d1)][_0x3651cb(0x1d2)])[_0x3651cb(0x1cc)](_0x2df4d4=>_0x2df4d4['rangeId']))!=null?_0x246d59:[],_0x1d571c=JSON[_0x3651cb(0x1b8)](_0x547009),_0x595004=_0x2fcfd0[_0x3651cb(0x180)],_0x4488e6=_0x2fcfd0['id'],_0x4836fa={'memberId':(await this[_0x3651cb(0x1d9)][_0x3651cb(0x177)](_0x5d3ecb))[_0x3651cb(0x1e2)](),'unitId':_0x5d3ecb,'threadId':_0x595004,'mention':_0x38eded,'content':_0x1d571c,'replyId':_0x4488e6},_0x135940=await this[_0x3651cb(0x1c5)]['post'](_0x3651cb(0x17f)+_0x5d3ecb+_0x3651cb(0x1de),{'body':_0x4836fa});return!_0x135940['body'][_0x3651cb(0x174)]||_0x135940[_0x3651cb(0x179)][_0x3651cb(0x174)][_0x3651cb(0x16c)]===0x1;}async[_0x5c5821(0x160)](_0x168d69){const _0x1d0348=_0x5c5821,{unitId:_0x58f598}=_0x168d69,_0x454849=_0x168d69[_0x1d0348(0x180)],_0x16b810={'memberId':this['_userService'][_0x1d0348(0x1c1)]()[_0x1d0348(0x1c0)],'unitId':_0x58f598,'threadId':_0x454849,'solved':_0x168d69[_0x1d0348(0x170)]?I[_0x1d0348(0x1a3)]:I[_0x1d0348(0x183)]},_0x3d7baf=await this[_0x1d0348(0x1c5)]['post'](_0x1d0348(0x17f)+_0x58f598+_0x1d0348(0x187),{'body':_0x16b810});return!_0x3d7baf[_0x1d0348(0x179)]['error']||_0x3d7baf['body'][_0x1d0348(0x174)][_0x1d0348(0x16c)]===0x1;}async[_0x5c5821(0x194)](_0x121988,_0x18b5bb,_0x20a890,_0x3f1a69){const _0x1e7827=_0x5c5821,_0x4e5505={'memberId':(await this[_0x1e7827(0x1d9)][_0x1e7827(0x177)](_0x121988))[_0x1e7827(0x1e2)](),'threadId':_0x20a890,'replyId':_0x3f1a69,'unitId':_0x121988},_0x32586d=await this[_0x1e7827(0x1c5)][_0x1e7827(0x1d7)](_0x1e7827(0x17f)+_0x121988+_0x1e7827(0x1d6),{'body':_0x4e5505});return!_0x32586d[_0x1e7827(0x179)]['error']||_0x32586d[_0x1e7827(0x179)]['error']['code']===0x1;}async[_0x5c5821(0x16f)](_0xd4f3d1,_0x2ca29c,_0x18e7b0){const _0x17a04c=_0x5c5821,_0x23ec22={'unitId':_0xd4f3d1,'threadId':_0x18e7b0},_0x14e1f6=await this[_0x17a04c(0x1c5)][_0x17a04c(0x1d7)](_0x17a04c(0x17f)+_0xd4f3d1+_0x17a04c(0x1c9),{'body':_0x23ec22}),_0x3966bb=_0x18e7b0['map'](_0x28fcfd=>G(_0x14e1f6[_0x17a04c(0x179)][_0x17a04c(0x172)][_0x28fcfd],_0xd4f3d1,_0x2ca29c))[_0x17a04c(0x1c8)](Boolean);return Object[_0x17a04c(0x175)](_0x14e1f6[_0x17a04c(0x179)][_0x17a04c(0x17e)])['forEach'](_0x40758c=>{const _0x5471a8=_0x17a04c;this[_0x5471a8(0x176)][_0x5471a8(0x1ab)](_0x40758c);}),_0x3966bb;}[_0x5c5821(0x1ba)](_0x3c619a){const _0x18452f=_0x5c5821;return{'id':_0x3c619a['id'],'threadId':_0x3c619a['threadId'],'ref':_0x3c619a[_0x18452f(0x19a)]};}};g=x([_(0x0,c[_0x5c5821(0x17a)](P[_0x5c5821(0x19d)])),_(0x1,c[_0x5c5821(0x17a)](c[_0x5c5821(0x171)])),_(0x2,c[_0x5c5821(0x17a)](b[_0x5c5821(0x1a1)])),_(0x3,c[_0x5c5821(0x17a)](c[_0x5c5821(0x1bb)]))],g);var H=Object[_0x5c5821(0x196)],J=(_0x5d4fee,_0x4b997a,_0x1206b5,_0x1e95ff)=>{const _0x247aed=_0x5c5821;for(var _0x1bab69=_0x1e95ff>0x1?void 0x0:_0x1e95ff?H(_0x4b997a,_0x1206b5):_0x4b997a,_0xfa1fae=_0x5d4fee[_0x247aed(0x1be)]-0x1,_0x5a1b31;_0xfa1fae>=0x0;_0xfa1fae--)(_0x5a1b31=_0x5d4fee[_0xfa1fae])&&(_0x1bab69=_0x5a1b31(_0x1bab69)||_0x1bab69);return _0x1bab69;},y=(_0x28a718,_0x53c374)=>(_0x3b901f,_0x19e2e5)=>_0x53c374(_0x3b901f,_0x19e2e5,_0x28a718);let C=class extends c[_0x5c5821(0x190)]{constructor(_0x2ef3bb,_0x44a57d){const _0x4a0839=_0x5c5821;super(),this[_0x4a0839(0x1c7)]=_0x2ef3bb,this[_0x4a0839(0x18d)]=_0x44a57d,this[_0x4a0839(0x165)]();}[_0x5c5821(0x165)](){const _0x245729=_0x5c5821;this[_0x245729(0x1c7)][_0x245729(0x1e5)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x5c5821(0x1e4)]),y(0x1,c[_0x5c5821(0x17a)](g))],C);function _0x1a07(){const _0x4b465a=['/solved','@univerjs/thread-comment','add','3040248KfFEVX','6607314mJgdAr','comment','_threadCommentDataSource','@univerjs/network','replyId','Disposable','getUser','UniverInstanceType','getUnit','deleteComment','commentUpdate$','getOwnPropertyDescriptor','userId','rangeType','updateComment','ref','@univerjs/thread-comment-ui','UniverThreadCommentUIPlugin','HTTPService','onStarting','pluginName','ThreadCommentModel','CollaborationSessionService','UniverLicensePlugin','Solved','dayjs','symbol','root','customRanges','Delete','UNIVER_UNKNOWN','Reply','addUser','@univerjs-pro/collaboration-client','_threadCommentModel','toStringTag','Edit','/universer-api/user/list','/reply','subscribe','Solve','defineProperty','addComment','44972wftiap','Add','stringify','payload','saveCommentToSnapshot','Injector','UniverCollaborationClientPlugin','rxjs','length','_initUserSync','userID','getCurrentUser','disposeWithMe','YYYY/MM/DD\x20HH:mm','format','_httpService','onReady','_threadCommentDataSourceService','filter','/list','type','pipe','map','Plugin','_configService','personId','UniverThreadCommentDataSourcePlugin','CustomRangeType','COMMENT','createTimestamp','326503gSGcBk','6rXrrax','/delete','post','size','_sessionService','_config','delete','merge','parse','/edit','3649653Ujkcdb','9500060BqJaZJ','replies','getMemberID','18dTTciM','IThreadCommentDataSourceService','dataSource','resolveComment','_commentService','CommentService','_init','user','_initDataSource','2003304EcDtYD','rangeId','reply','get','getComment','setConfig','code','content','find','listComments','resolved','UserManagerService','comments','IConfigService','error','values','_userService','requireSession','bufferTime','body','Inject','forEach','solved','unitId','users','/universer-api/comment/unit/','threadId','Unknown','_injector','OpenOrReOpen','UNRECOGNIZED','Module','225recBAu'];_0x1a07=function(){return _0x4b465a;};return _0x1a07();}var F=Object['defineProperty'],L=Object[_0x5c5821(0x196)],Z=(_0x192b33,_0x3b0912,_0x514dc4)=>_0x3b0912 in _0x192b33?F(_0x192b33,_0x3b0912,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x514dc4}):_0x192b33[_0x3b0912]=_0x514dc4,W=(_0x496ada,_0x1760f3,_0x5c83ed,_0x62b9fb)=>{for(var _0x797f70=_0x62b9fb>0x1?void 0x0:_0x62b9fb?L(_0x1760f3,_0x5c83ed):_0x1760f3,_0xde5710=_0x496ada['length']-0x1,_0x1fe7dc;_0xde5710>=0x0;_0xde5710--)(_0x1fe7dc=_0x496ada[_0xde5710])&&(_0x797f70=_0x1fe7dc(_0x797f70)||_0x797f70);return _0x797f70;},O=(_0x2ce591,_0x208861)=>(_0x5c0bce,_0x3c17bf)=>_0x208861(_0x5c0bce,_0x3c17bf,_0x2ce591),N=(_0xb2c2e9,_0x1757a0,_0x49307a)=>Z(_0xb2c2e9,typeof _0x1757a0!=_0x5c5821(0x1a5)?_0x1757a0+'':_0x1757a0,_0x49307a);exports[_0x5c5821(0x1d0)]=class extends c[_0x5c5821(0x1cd)]{constructor(_0x214ed2=D,_0x551061,_0x334165){const _0x4054e4=_0x5c5821;super(),this[_0x4054e4(0x1da)]=_0x214ed2,this[_0x4054e4(0x182)]=_0x551061,this[_0x4054e4(0x1ce)]=_0x334165;const {..._0x28ba54}=c[_0x4054e4(0x1dc)]({},D,this['_config']);this[_0x4054e4(0x1ce)][_0x4054e4(0x16b)](q,_0x28ba54);}[_0x5c5821(0x19e)](){[[g],[C],[p]]['forEach'](_0x220ca5=>{const _0x548c8f=_0x4252;this[_0x548c8f(0x182)][_0x548c8f(0x189)](_0x220ca5);});}[_0x5c5821(0x1c6)](){const _0x108138=_0x5c5821;this['_injector'][_0x108138(0x169)](C),this[_0x108138(0x182)]['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x5c5821(0x19f),U),N(exports[_0x5c5821(0x1d0)],_0x5c5821(0x1ca),c[_0x5c5821(0x192)][_0x5c5821(0x1a9)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0x5c5821(0x19c)],b[_0x5c5821(0x1bc)],T[_0x5c5821(0x1a2)]),O(0x1,c[_0x5c5821(0x17a)](c[_0x5c5821(0x1bb)])),O(0x2,c[_0x5c5821(0x173)])],exports[_0x5c5821(0x1d0)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
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};
1
+ const _0x4845ea=_0x6940;(function(_0x5f0ece,_0x1e40ae){const _0x4543ff=_0x6940,_0x5bee79=_0x5f0ece();while(!![]){try{const _0x351067=-parseInt(_0x4543ff(0xd3))/0x1+-parseInt(_0x4543ff(0xd1))/0x2+-parseInt(_0x4543ff(0xad))/0x3+parseInt(_0x4543ff(0xc1))/0x4*(-parseInt(_0x4543ff(0x82))/0x5)+parseInt(_0x4543ff(0x8c))/0x6+parseInt(_0x4543ff(0xc3))/0x7+parseInt(_0x4543ff(0x98))/0x8;if(_0x351067===_0x1e40ae)break;else _0x5bee79['push'](_0x5bee79['shift']());}catch(_0x59cde1){_0x5bee79['push'](_0x5bee79['shift']());}}}(_0x76c9,0x39135));import{CommentService as _0x5f1bda,CollaborationSessionService as _0x1a3d82,UniverCollaborationClientPlugin as _0x6a2fba}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x45810e}from'@univerjs-pro/license';function _0x6940(_0x267a78,_0x1a1310){const _0x76c91d=_0x76c9();return _0x6940=function(_0x694028,_0x4b6dca){_0x694028=_0x694028-0x80;let _0x50c51c=_0x76c91d[_0x694028];return _0x50c51c;},_0x6940(_0x267a78,_0x1a1310);}import{dayjs as _0x4d3e30,UserManagerService as _0x56ea55,Inject as _0x4173d0,Injector as _0x5905e3,Disposable as _0x17feda,CustomRangeType as _0x5f5740,UniverInstanceType as _0x161e92,DependentOn as _0x1ce5fd,IConfigService as _0x22d314,Plugin as _0x42140b,merge as _0x50b81b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1d3295}from'@univerjs/thread-comment-ui';function _0x76c9(){const _0x2f52d4=['_init','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dataSource','disposeWithMe','addUser','1148208dEOcEb','values','getUser','body','root','post','UNIVER_UNKNOWN','_initDataSource','_initUserSync','getCurrentUser','/edit','onStarting','8204536mYPrEN','stringify','OpenOrReOpen','/reply','replyId','createTimestamp','Edit','/add','delete','/universer-api/user/list','_config','solved','format','subscribe','ref','payload','UNRECOGNIZED','size','commentUpdate$','parentId','COMMENT','1199736nVskTc','_sessionService','length','_injector','Solved','parse','threadId','customRanges','add','symbol','userId','type','pipe','/list','_httpService','deleteComment','Delete','replies','_threadCommentDataSourceService','personId','148844VxrTan','content','1914857EWEtXv','user','addComment','saveCommentToSnapshot','Reply','getOwnPropertyDescriptor','forEach','updateComment','_threadCommentDataSource','Solve','Unknown','code','users','rangeId','897812FPUagR','/universer-api/comment/unit/','110199VoKgsT','getMemberID','setConfig','thread-comment-data-source.config','reply','find','syncUpdateMutationToColla','_userService','comment','getComment','/solved','userID','get','getUnit','error','Add','slice','resolved','comments','map','onReady','YYYY/MM/DD\x20HH:mm','40GlGJvf','_configService','unitId','_threadCommentModel'];_0x76c9=function(){return _0x2f52d4;};return _0x76c9();}import{ThreadCommentModel as _0x13d21d,IThreadCommentDataSourceService as _0xf1e621}from'@univerjs/thread-comment';import{bufferTime as _0x597e0a}from'rxjs';import{HTTPService as _0x4088a0}from'@univerjs/network';const W=_0x4845ea(0x88);var I=(_0xea19a1=>(_0xea19a1[_0xea19a1[_0x4845ea(0x9a)]=0x0]=_0x4845ea(0x9a),_0xea19a1[_0xea19a1['Solved']=0x1]=_0x4845ea(0xb1),_0xea19a1[_0xea19a1[_0x4845ea(0xa8)]=-0x1]=_0x4845ea(0xa8),_0xea19a1))(I||{}),v=(_0x13843a=>(_0x13843a[_0x13843a[_0x4845ea(0xcd)]=0x0]=_0x4845ea(0xcd),_0x13843a[_0x13843a['Add']=0x1]=_0x4845ea(0xe2),_0x13843a[_0x13843a[_0x4845ea(0xc7)]=0x2]='Reply',_0x13843a[_0x13843a[_0x4845ea(0x9e)]=0x3]='Edit',_0x13843a[_0x13843a[_0x4845ea(0xbd)]=0x4]=_0x4845ea(0xbd),_0x13843a[_0x13843a[_0x4845ea(0xcc)]=0x5]='Solve',_0x13843a[_0x13843a[_0x4845ea(0xa8)]=-0x1]=_0x4845ea(0xa8),_0x13843a))(v||{});const D=_0x1af597=>_0x4d3e30(new Date(+_0x1af597))[_0x4845ea(0xa4)](_0x4845ea(0x81)),B=async(_0xc7505c,_0x18be95)=>{const _0x14897e=_0x4845ea,_0x547536=_0xc7505c['get'](_0x56ea55),_0x2fedb8=_0xc7505c[_0x14897e(0xdf)](_0x4088a0);_0x18be95[_0x14897e(0xc9)](_0x5844b9=>{const _0x5096f9=_0x14897e;_0x547536[_0x5096f9(0x8e)](_0x5844b9)&&_0x18be95[_0x5096f9(0xa0)](_0x5844b9);}),_0x18be95[_0x14897e(0xa9)]&&(await _0x2fedb8[_0x14897e(0xdf)](_0x14897e(0xa1),{'params':{'userIDs':[..._0x18be95]}}))['body'][_0x14897e(0xcf)][_0x14897e(0xc9)](_0xb5ffc6=>{const _0x40dd74=_0x14897e;_0xb5ffc6&&_0x547536[_0x40dd74(0x8b)](_0xb5ffc6);});};var K=Object[_0x4845ea(0xc8)],V=(_0xff959,_0x4b0699,_0x222fb4,_0x5e2ed4)=>{const _0x33c36d=_0x4845ea;for(var _0x379c57=_0x5e2ed4>0x1?void 0x0:_0x5e2ed4?K(_0x4b0699,_0x222fb4):_0x4b0699,_0x4237f6=_0xff959[_0x33c36d(0xaf)]-0x1,_0x1fc8c6;_0x4237f6>=0x0;_0x4237f6--)(_0x1fc8c6=_0xff959[_0x4237f6])&&(_0x379c57=_0x1fc8c6(_0x379c57)||_0x379c57);return _0x379c57;},p=(_0x4335aa,_0x18f2be)=>(_0x4bdf72,_0x4c3c11)=>_0x18f2be(_0x4bdf72,_0x4c3c11,_0x4335aa);let S=class extends _0x17feda{constructor(_0x46b013,_0x304864,_0x160435,_0x81eb89){const _0x320c1a=_0x4845ea;super(),this['_commentService']=_0x46b013,this['_threadCommentModel']=_0x304864,this[_0x320c1a(0xda)]=_0x160435,this['_injector']=_0x81eb89,this[_0x320c1a(0x86)](),this[_0x320c1a(0x94)]();}[_0x4845ea(0x94)](){const _0x26d3ec=_0x4845ea;this[_0x26d3ec(0x8a)](this['_threadCommentModel'][_0x26d3ec(0xaa)][_0x26d3ec(0xb9)](_0x597e0a(0x10))[_0x26d3ec(0xa5)](_0x245f5f=>{const _0x515f45=_0x26d3ec,_0x22cec2=new Set();_0x245f5f[_0x515f45(0xc9)](_0x535ba8=>{const _0x2313b8=_0x515f45;switch(_0x535ba8[_0x2313b8(0xb8)]){case _0x2313b8(0xb5):{const _0x48aac9=_0x535ba8[_0x2313b8(0xa7)][_0x2313b8(0xc0)];_0x22cec2['add'](_0x48aac9);break;}}}),B(this[_0x515f45(0xb0)],_0x22cec2);}));}['_init'](){const _0x1ab718=_0x4845ea;this[_0x1ab718(0x8a)](this['_commentService'][_0x1ab718(0xaa)]['subscribe'](async _0x2a1da5=>{const _0x3963d3=_0x1ab718;var _0x45f1cd,_0x15acca,_0x50723b,_0x1ec352;const _0x2bb2d7=(_0x45f1cd=this['_threadCommentModel']['getUnit'](_0x2a1da5[_0x3963d3(0x84)])[_0x3963d3(0xd8)](_0xf82b0b=>_0xf82b0b[_0x3963d3(0xb3)]===_0x2a1da5[_0x3963d3(0xb3)]))==null?void 0x0:_0x45f1cd[_0x3963d3(0x90)];if(!_0x2bb2d7)return;const {unitId:_0x237b14,subUnitId:_0x9853c4}=_0x2bb2d7;switch(_0x2a1da5[_0x3963d3(0xc4)]&&this[_0x3963d3(0xda)][_0x3963d3(0x8b)](_0x2a1da5[_0x3963d3(0xc4)]),_0x2a1da5[_0x3963d3(0xb8)]){case v['Add']:break;case v['Reply']:{this[_0x3963d3(0x85)]['addComment'](_0x237b14,_0x9853c4,{'unitId':_0x237b14,'subUnitId':_0x9853c4,'ref':'','id':_0x2a1da5[_0x3963d3(0x9c)],'dT':D(+_0x2a1da5[_0x3963d3(0x9d)]),'threadId':_0x2a1da5[_0x3963d3(0xb3)],'personId':(_0x50723b=(_0x15acca=_0x2a1da5[_0x3963d3(0xc4)])==null?void 0x0:_0x15acca[_0x3963d3(0xde)])!=null?_0x50723b:_0x2a1da5[_0x3963d3(0xb7)],'text':JSON[_0x3963d3(0xb2)](_0x2a1da5[_0x3963d3(0xc2)]),'parentId':_0x2bb2d7['id']});break;}case v[_0x3963d3(0xbd)]:{const _0x13f4ec=this[_0x3963d3(0x85)][_0x3963d3(0xdc)](_0x237b14,_0x9853c4,_0x2a1da5[_0x3963d3(0x9c)]);_0x13f4ec&&_0x13f4ec[_0x3963d3(0xab)]&&this['_threadCommentModel'][_0x3963d3(0xbc)](_0x237b14,_0x9853c4,_0x2a1da5[_0x3963d3(0x9c)]);break;}case v[_0x3963d3(0x9e)]:{this[_0x3963d3(0x85)][_0x3963d3(0xca)](_0x237b14,_0x9853c4,{'commentId':_0x2a1da5['replyId'],'text':JSON[_0x3963d3(0xb2)](_0x2a1da5[_0x3963d3(0xc2)])});break;}case v[_0x3963d3(0xcc)]:{const _0x476ca2=(_0x1ec352=this['_threadCommentModel'][_0x3963d3(0xe0)](_0x2a1da5[_0x3963d3(0x84)])[_0x3963d3(0xd8)](_0x230a8e=>_0x230a8e['threadId']===_0x2a1da5[_0x3963d3(0xb3)]))==null?void 0x0:_0x1ec352[_0x3963d3(0x90)];_0x476ca2&&this['_threadCommentModel']['resolveComment'](_0x237b14,_0x9853c4,_0x476ca2['id'],_0x2a1da5['solved']===I[_0x3963d3(0xb1)]);break;}}}));}};S=V([p(0x0,_0x4173d0(_0x5f1bda)),p(0x1,_0x4173d0(_0x13d21d)),p(0x2,_0x4173d0(_0x56ea55)),p(0x3,_0x4173d0(_0x5905e3))],S);const z=_0x4845ea(0xd6),M={};var k=Object[_0x4845ea(0xc8)],Q=(_0x1f560e,_0xc19d7c,_0x952527,_0x13224c)=>{const _0x5e8920=_0x4845ea;for(var _0x6a3795=_0x13224c>0x1?void 0x0:_0x13224c?k(_0xc19d7c,_0x952527):_0xc19d7c,_0x59293f=_0x1f560e[_0x5e8920(0xaf)]-0x1,_0x5f22ad;_0x59293f>=0x0;_0x59293f--)(_0x5f22ad=_0x1f560e[_0x59293f])&&(_0x6a3795=_0x5f22ad(_0x6a3795)||_0x6a3795);return _0x6a3795;},_=(_0x316bc3,_0x335540)=>(_0x53a774,_0x3359dc)=>_0x335540(_0x53a774,_0x3359dc,_0x316bc3);function X(_0x572a31,_0x374096){const _0x2cfaea=_0x4845ea,_0x1098f5=_0x572a31[_0x2cfaea(0xbe)][0x0];return{..._0x374096,'id':_0x1098f5[_0x2cfaea(0x9c)],'resolved':_0x572a31[_0x2cfaea(0xa3)]===0x1,'dT':D(_0x1098f5[_0x2cfaea(0x9d)]),'personId':_0x1098f5[_0x2cfaea(0xb7)],'threadId':_0x1098f5[_0x2cfaea(0xb3)]};}function ee(_0x4eb297,_0x25e238,_0x2d6065){const _0x53b67d=_0x4845ea;var _0x2cca9d,_0x309ae8;if(((_0x309ae8=(_0x2cca9d=_0x4eb297==null?void 0x0:_0x4eb297[_0x53b67d(0xbe)])==null?void 0x0:_0x2cca9d['length'])!=null?_0x309ae8:0x0)>0x0){const _0x1bdca4=(_0x4fa42e,_0x1c9b18)=>({'id':_0x4fa42e[_0x53b67d(0x9c)],'threadId':_0x4fa42e['threadId'],'dT':D(_0x4fa42e[_0x53b67d(0x9d)]),'personId':_0x4fa42e['userId'],'resolved':_0x4eb297[_0x53b67d(0xa3)]===I[_0x53b67d(0xb1)],'unitId':_0x25e238,'subUnitId':_0x2d6065,'text':JSON[_0x53b67d(0xb2)](_0x4fa42e['content']),'parentId':_0x1c9b18}),_0x255065=_0x1bdca4(_0x4eb297[_0x53b67d(0xbe)][0x0]);return{..._0x255065,'children':_0x4eb297[_0x53b67d(0xbe)][_0x53b67d(0xe3)](0x1)['map'](_0x1a5f49=>_0x1bdca4(_0x1a5f49,_0x255065['id']))};}return null;}let f=class{constructor(_0x42702a,_0x67dfd1,_0x492144,_0x24686c){const _0x382e90=_0x4845ea;this[_0x382e90(0xbb)]=_0x42702a,this[_0x382e90(0xda)]=_0x67dfd1,this[_0x382e90(0xae)]=_0x492144,this['_injector']=_0x24686c;}async[_0x4845ea(0xc5)](_0x18c2fb){const _0x276b96=_0x4845ea;var _0x50c8a2,_0x2901b8;const {parentId:_0x567987,unitId:_0x19fccc,text:_0x2d4351,threadId:_0x941d03}=_0x18c2fb,_0x22f711=(_0x2901b8=(_0x50c8a2=_0x2d4351['customRanges'])==null?void 0x0:_0x50c8a2['filter'](_0x282ecc=>_0x282ecc['rangeType']===_0x5f5740['COMMENT'])['map'](_0x258529=>_0x258529[_0x276b96(0xd0)]))!=null?_0x2901b8:[],_0x5a25eb=JSON[_0x276b96(0x99)](_0x2d4351),_0x214e44=(await this[_0x276b96(0xae)]['requireSession'](_0x19fccc))[_0x276b96(0xd4)]();if(_0x567987){const _0x3ab599={'memberId':_0x214e44,'unitId':_0x19fccc,'content':_0x5a25eb,'mention':_0x22f711,'threadId':_0x941d03},_0x4bddaa=(await this[_0x276b96(0xbb)][_0x276b96(0x91)]('/universer-api/comment/unit/'+_0x19fccc+_0x276b96(0x9b),{'body':_0x3ab599}))[_0x276b96(0x8f)][_0x276b96(0xd7)];return{..._0x18c2fb,'id':_0x4bddaa[_0x276b96(0x9c)],'dT':_0x4d3e30(+_0x4bddaa[_0x276b96(0x9d)])['format'](_0x276b96(0x81)),'personId':_0x4bddaa['userId']};}else{const _0x1a9e39={'memberId':_0x214e44,'unitId':_0x19fccc,'content':_0x5a25eb,'mention':_0x22f711},_0xb493a9=await this[_0x276b96(0xbb)][_0x276b96(0x91)]('/universer-api/comment/unit/'+_0x19fccc+_0x276b96(0x9f),{'body':_0x1a9e39});return X(_0xb493a9['body'][_0x276b96(0xdb)],_0x18c2fb);}}async[_0x4845ea(0xca)](_0x952a77){const _0x16ce0e=_0x4845ea;var _0x169034,_0x28bfff;const {text:_0x2750b1,unitId:_0x3b2ff2}=_0x952a77,_0x13eae3=(_0x28bfff=(_0x169034=_0x2750b1[_0x16ce0e(0xb4)])==null?void 0x0:_0x169034['filter'](_0x1fa310=>_0x1fa310['rangeType']===_0x5f5740[_0x16ce0e(0xac)])[_0x16ce0e(0xe6)](_0x5a003d=>_0x5a003d['rangeId']))!=null?_0x28bfff:[],_0x2a0676=JSON[_0x16ce0e(0x99)](_0x2750b1),_0x54dd8b=_0x952a77[_0x16ce0e(0xb3)],_0x2d57d7=_0x952a77['id'],_0x202b9e={'memberId':(await this['_sessionService']['requireSession'](_0x3b2ff2))['getMemberID'](),'unitId':_0x3b2ff2,'threadId':_0x54dd8b,'mention':_0x13eae3,'content':_0x2a0676,'replyId':_0x2d57d7},_0xd9ec75=await this['_httpService'][_0x16ce0e(0x91)](_0x16ce0e(0xd2)+_0x3b2ff2+_0x16ce0e(0x96),{'body':_0x202b9e});return!_0xd9ec75[_0x16ce0e(0x8f)]['error']||_0xd9ec75[_0x16ce0e(0x8f)][_0x16ce0e(0xe1)][_0x16ce0e(0xce)]===0x1;}async['resolveComment'](_0x4ce925){const _0x5dab6d=_0x4845ea,{unitId:_0x5b2407}=_0x4ce925,_0x4c8d16=_0x4ce925[_0x5dab6d(0xb3)],_0x3b6cd1={'memberId':this[_0x5dab6d(0xda)][_0x5dab6d(0x95)]()[_0x5dab6d(0xde)],'unitId':_0x5b2407,'threadId':_0x4c8d16,'solved':_0x4ce925[_0x5dab6d(0xe4)]?I['Solved']:I[_0x5dab6d(0x9a)]},_0x2f4050=await this[_0x5dab6d(0xbb)][_0x5dab6d(0x91)](_0x5dab6d(0xd2)+_0x5b2407+_0x5dab6d(0xdd),{'body':_0x3b6cd1});return!_0x2f4050[_0x5dab6d(0x8f)][_0x5dab6d(0xe1)]||_0x2f4050[_0x5dab6d(0x8f)][_0x5dab6d(0xe1)][_0x5dab6d(0xce)]===0x1;}async['deleteComment'](_0x51acda,_0x1491ee,_0x856ccb,_0x293a42){const _0x11c9b2=_0x4845ea,_0x5bbd7d={'memberId':(await this[_0x11c9b2(0xae)][_0x11c9b2(0x87)](_0x51acda))[_0x11c9b2(0xd4)](),'threadId':_0x856ccb,'replyId':_0x293a42,'unitId':_0x51acda},_0x479635=await this[_0x11c9b2(0xbb)][_0x11c9b2(0x91)](_0x11c9b2(0xd2)+_0x51acda+'/delete',{'body':_0x5bbd7d});return!_0x479635[_0x11c9b2(0x8f)]['error']||_0x479635[_0x11c9b2(0x8f)][_0x11c9b2(0xe1)]['code']===0x1;}async['listComments'](_0x449999,_0x35654d,_0x1af0a8){const _0x4c30e7=_0x4845ea,_0xfda1fc={'unitId':_0x449999,'threadId':_0x1af0a8},_0x515648=await this[_0x4c30e7(0xbb)]['post']('/universer-api/comment/unit/'+_0x449999+_0x4c30e7(0xba),{'body':_0xfda1fc}),_0x60286=_0x1af0a8[_0x4c30e7(0xe6)](_0x19c797=>ee(_0x515648[_0x4c30e7(0x8f)][_0x4c30e7(0xe5)][_0x19c797],_0x449999,_0x35654d))['filter'](Boolean);return Object[_0x4c30e7(0x8d)](_0x515648['body'][_0x4c30e7(0xcf)])[_0x4c30e7(0xc9)](_0x1de0a8=>{const _0x2e4eec=_0x4c30e7;this['_userService'][_0x2e4eec(0x8b)](_0x1de0a8);}),_0x60286;}[_0x4845ea(0xc6)](_0x27ab0e){const _0x52d172=_0x4845ea;return{'id':_0x27ab0e['id'],'threadId':_0x27ab0e[_0x52d172(0xb3)],'ref':_0x27ab0e[_0x52d172(0xa6)]};}};f=Q([_(0x0,_0x4173d0(_0x4088a0)),_(0x1,_0x4173d0(_0x56ea55)),_(0x2,_0x4173d0(_0x1a3d82)),_(0x3,_0x4173d0(_0x5905e3))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x69e504,_0xa85112,_0x6c1d91,_0x30e476)=>{const _0x5ade0a=_0x4845ea;for(var _0x4a8c97=_0x30e476>0x1?void 0x0:_0x30e476?re(_0xa85112,_0x6c1d91):_0xa85112,_0x39e210=_0x69e504[_0x5ade0a(0xaf)]-0x1,_0x1815e0;_0x39e210>=0x0;_0x39e210--)(_0x1815e0=_0x69e504[_0x39e210])&&(_0x4a8c97=_0x1815e0(_0x4a8c97)||_0x4a8c97);return _0x4a8c97;},N=(_0x3c42d7,_0x2dd4f0)=>(_0x4abb01,_0x5bea90)=>_0x2dd4f0(_0x4abb01,_0x5bea90,_0x3c42d7);let g=class extends _0x17feda{constructor(_0x4f07ff,_0x3ec5b8){const _0x5929fe=_0x4845ea;super(),this['_threadCommentDataSourceService']=_0x4f07ff,this['_threadCommentDataSource']=_0x3ec5b8,this[_0x5929fe(0x93)]();}[_0x4845ea(0x93)](){const _0x836c37=_0x4845ea;this[_0x836c37(0xbf)][_0x836c37(0x89)]=this[_0x836c37(0xcb)],this[_0x836c37(0xbf)][_0x836c37(0xd9)]=!0x1;}};g=te([N(0x0,_0xf1e621),N(0x1,_0x4173d0(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3353ff,_0x190b64,_0x8b1c37)=>_0x190b64 in _0x3353ff?se(_0x3353ff,_0x190b64,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8b1c37}):_0x3353ff[_0x190b64]=_0x8b1c37,ie=(_0x55178a,_0x494d8c,_0x15357b,_0x12cbd8)=>{for(var _0x59ef3a=_0x12cbd8>0x1?void 0x0:_0x12cbd8?oe(_0x494d8c,_0x15357b):_0x494d8c,_0x573c15=_0x55178a['length']-0x1,_0x1f76e3;_0x573c15>=0x0;_0x573c15--)(_0x1f76e3=_0x55178a[_0x573c15])&&(_0x59ef3a=_0x1f76e3(_0x59ef3a)||_0x59ef3a);return _0x59ef3a;},w=(_0x508dc8,_0x46b04e)=>(_0x1046ee,_0x210144)=>_0x46b04e(_0x1046ee,_0x210144,_0x508dc8),$=(_0x27b07f,_0xabc664,_0x17b6d5)=>ne(_0x27b07f,typeof _0xabc664!=_0x4845ea(0xb6)?_0xabc664+'':_0xabc664,_0x17b6d5);let b=class extends _0x42140b{constructor(_0x1e74ad=M,_0x43d0de,_0x48e9ea){const _0x2b90b3=_0x4845ea;super(),this['_config']=_0x1e74ad,this[_0x2b90b3(0xb0)]=_0x43d0de,this[_0x2b90b3(0x83)]=_0x48e9ea;const {..._0x1fbd50}=_0x50b81b({},M,this[_0x2b90b3(0xa2)]);this['_configService'][_0x2b90b3(0xd5)](z,_0x1fbd50);}[_0x4845ea(0x97)](){[[f],[g],[S]]['forEach'](_0x24e0dd=>{const _0x4d71f6=_0x6940;this[_0x4d71f6(0xb0)][_0x4d71f6(0xb5)](_0x24e0dd);});}[_0x4845ea(0x80)](){const _0x1363af=_0x4845ea;this[_0x1363af(0xb0)]['get'](g),this['_injector'][_0x1363af(0xdf)](S);}};$(b,'pluginName',W),$(b,_0x4845ea(0xb8),_0x161e92[_0x4845ea(0x92)]),b=ie([_0x1ce5fd(_0x1d3295,_0x6a2fba,_0x45810e),w(0x1,_0x4173d0(_0x5905e3)),w(0x2,_0x22d314)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
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};
1
+ const _0x4845ea=_0x6940;(function(_0x5f0ece,_0x1e40ae){const _0x4543ff=_0x6940,_0x5bee79=_0x5f0ece();while(!![]){try{const _0x351067=-parseInt(_0x4543ff(0xd3))/0x1+-parseInt(_0x4543ff(0xd1))/0x2+-parseInt(_0x4543ff(0xad))/0x3+parseInt(_0x4543ff(0xc1))/0x4*(-parseInt(_0x4543ff(0x82))/0x5)+parseInt(_0x4543ff(0x8c))/0x6+parseInt(_0x4543ff(0xc3))/0x7+parseInt(_0x4543ff(0x98))/0x8;if(_0x351067===_0x1e40ae)break;else _0x5bee79['push'](_0x5bee79['shift']());}catch(_0x59cde1){_0x5bee79['push'](_0x5bee79['shift']());}}}(_0x76c9,0x39135));import{CommentService as _0x5f1bda,CollaborationSessionService as _0x1a3d82,UniverCollaborationClientPlugin as _0x6a2fba}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x45810e}from'@univerjs-pro/license';function _0x6940(_0x267a78,_0x1a1310){const _0x76c91d=_0x76c9();return _0x6940=function(_0x694028,_0x4b6dca){_0x694028=_0x694028-0x80;let _0x50c51c=_0x76c91d[_0x694028];return _0x50c51c;},_0x6940(_0x267a78,_0x1a1310);}import{dayjs as _0x4d3e30,UserManagerService as _0x56ea55,Inject as _0x4173d0,Injector as _0x5905e3,Disposable as _0x17feda,CustomRangeType as _0x5f5740,UniverInstanceType as _0x161e92,DependentOn as _0x1ce5fd,IConfigService as _0x22d314,Plugin as _0x42140b,merge as _0x50b81b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1d3295}from'@univerjs/thread-comment-ui';function _0x76c9(){const _0x2f52d4=['_init','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dataSource','disposeWithMe','addUser','1148208dEOcEb','values','getUser','body','root','post','UNIVER_UNKNOWN','_initDataSource','_initUserSync','getCurrentUser','/edit','onStarting','8204536mYPrEN','stringify','OpenOrReOpen','/reply','replyId','createTimestamp','Edit','/add','delete','/universer-api/user/list','_config','solved','format','subscribe','ref','payload','UNRECOGNIZED','size','commentUpdate$','parentId','COMMENT','1199736nVskTc','_sessionService','length','_injector','Solved','parse','threadId','customRanges','add','symbol','userId','type','pipe','/list','_httpService','deleteComment','Delete','replies','_threadCommentDataSourceService','personId','148844VxrTan','content','1914857EWEtXv','user','addComment','saveCommentToSnapshot','Reply','getOwnPropertyDescriptor','forEach','updateComment','_threadCommentDataSource','Solve','Unknown','code','users','rangeId','897812FPUagR','/universer-api/comment/unit/','110199VoKgsT','getMemberID','setConfig','thread-comment-data-source.config','reply','find','syncUpdateMutationToColla','_userService','comment','getComment','/solved','userID','get','getUnit','error','Add','slice','resolved','comments','map','onReady','YYYY/MM/DD\x20HH:mm','40GlGJvf','_configService','unitId','_threadCommentModel'];_0x76c9=function(){return _0x2f52d4;};return _0x76c9();}import{ThreadCommentModel as _0x13d21d,IThreadCommentDataSourceService as _0xf1e621}from'@univerjs/thread-comment';import{bufferTime as _0x597e0a}from'rxjs';import{HTTPService as _0x4088a0}from'@univerjs/network';const W=_0x4845ea(0x88);var I=(_0xea19a1=>(_0xea19a1[_0xea19a1[_0x4845ea(0x9a)]=0x0]=_0x4845ea(0x9a),_0xea19a1[_0xea19a1['Solved']=0x1]=_0x4845ea(0xb1),_0xea19a1[_0xea19a1[_0x4845ea(0xa8)]=-0x1]=_0x4845ea(0xa8),_0xea19a1))(I||{}),v=(_0x13843a=>(_0x13843a[_0x13843a[_0x4845ea(0xcd)]=0x0]=_0x4845ea(0xcd),_0x13843a[_0x13843a['Add']=0x1]=_0x4845ea(0xe2),_0x13843a[_0x13843a[_0x4845ea(0xc7)]=0x2]='Reply',_0x13843a[_0x13843a[_0x4845ea(0x9e)]=0x3]='Edit',_0x13843a[_0x13843a[_0x4845ea(0xbd)]=0x4]=_0x4845ea(0xbd),_0x13843a[_0x13843a[_0x4845ea(0xcc)]=0x5]='Solve',_0x13843a[_0x13843a[_0x4845ea(0xa8)]=-0x1]=_0x4845ea(0xa8),_0x13843a))(v||{});const D=_0x1af597=>_0x4d3e30(new Date(+_0x1af597))[_0x4845ea(0xa4)](_0x4845ea(0x81)),B=async(_0xc7505c,_0x18be95)=>{const _0x14897e=_0x4845ea,_0x547536=_0xc7505c['get'](_0x56ea55),_0x2fedb8=_0xc7505c[_0x14897e(0xdf)](_0x4088a0);_0x18be95[_0x14897e(0xc9)](_0x5844b9=>{const _0x5096f9=_0x14897e;_0x547536[_0x5096f9(0x8e)](_0x5844b9)&&_0x18be95[_0x5096f9(0xa0)](_0x5844b9);}),_0x18be95[_0x14897e(0xa9)]&&(await _0x2fedb8[_0x14897e(0xdf)](_0x14897e(0xa1),{'params':{'userIDs':[..._0x18be95]}}))['body'][_0x14897e(0xcf)][_0x14897e(0xc9)](_0xb5ffc6=>{const _0x40dd74=_0x14897e;_0xb5ffc6&&_0x547536[_0x40dd74(0x8b)](_0xb5ffc6);});};var K=Object[_0x4845ea(0xc8)],V=(_0xff959,_0x4b0699,_0x222fb4,_0x5e2ed4)=>{const _0x33c36d=_0x4845ea;for(var _0x379c57=_0x5e2ed4>0x1?void 0x0:_0x5e2ed4?K(_0x4b0699,_0x222fb4):_0x4b0699,_0x4237f6=_0xff959[_0x33c36d(0xaf)]-0x1,_0x1fc8c6;_0x4237f6>=0x0;_0x4237f6--)(_0x1fc8c6=_0xff959[_0x4237f6])&&(_0x379c57=_0x1fc8c6(_0x379c57)||_0x379c57);return _0x379c57;},p=(_0x4335aa,_0x18f2be)=>(_0x4bdf72,_0x4c3c11)=>_0x18f2be(_0x4bdf72,_0x4c3c11,_0x4335aa);let S=class extends _0x17feda{constructor(_0x46b013,_0x304864,_0x160435,_0x81eb89){const _0x320c1a=_0x4845ea;super(),this['_commentService']=_0x46b013,this['_threadCommentModel']=_0x304864,this[_0x320c1a(0xda)]=_0x160435,this['_injector']=_0x81eb89,this[_0x320c1a(0x86)](),this[_0x320c1a(0x94)]();}[_0x4845ea(0x94)](){const _0x26d3ec=_0x4845ea;this[_0x26d3ec(0x8a)](this['_threadCommentModel'][_0x26d3ec(0xaa)][_0x26d3ec(0xb9)](_0x597e0a(0x10))[_0x26d3ec(0xa5)](_0x245f5f=>{const _0x515f45=_0x26d3ec,_0x22cec2=new Set();_0x245f5f[_0x515f45(0xc9)](_0x535ba8=>{const _0x2313b8=_0x515f45;switch(_0x535ba8[_0x2313b8(0xb8)]){case _0x2313b8(0xb5):{const _0x48aac9=_0x535ba8[_0x2313b8(0xa7)][_0x2313b8(0xc0)];_0x22cec2['add'](_0x48aac9);break;}}}),B(this[_0x515f45(0xb0)],_0x22cec2);}));}['_init'](){const _0x1ab718=_0x4845ea;this[_0x1ab718(0x8a)](this['_commentService'][_0x1ab718(0xaa)]['subscribe'](async _0x2a1da5=>{const _0x3963d3=_0x1ab718;var _0x45f1cd,_0x15acca,_0x50723b,_0x1ec352;const _0x2bb2d7=(_0x45f1cd=this['_threadCommentModel']['getUnit'](_0x2a1da5[_0x3963d3(0x84)])[_0x3963d3(0xd8)](_0xf82b0b=>_0xf82b0b[_0x3963d3(0xb3)]===_0x2a1da5[_0x3963d3(0xb3)]))==null?void 0x0:_0x45f1cd[_0x3963d3(0x90)];if(!_0x2bb2d7)return;const {unitId:_0x237b14,subUnitId:_0x9853c4}=_0x2bb2d7;switch(_0x2a1da5[_0x3963d3(0xc4)]&&this[_0x3963d3(0xda)][_0x3963d3(0x8b)](_0x2a1da5[_0x3963d3(0xc4)]),_0x2a1da5[_0x3963d3(0xb8)]){case v['Add']:break;case v['Reply']:{this[_0x3963d3(0x85)]['addComment'](_0x237b14,_0x9853c4,{'unitId':_0x237b14,'subUnitId':_0x9853c4,'ref':'','id':_0x2a1da5[_0x3963d3(0x9c)],'dT':D(+_0x2a1da5[_0x3963d3(0x9d)]),'threadId':_0x2a1da5[_0x3963d3(0xb3)],'personId':(_0x50723b=(_0x15acca=_0x2a1da5[_0x3963d3(0xc4)])==null?void 0x0:_0x15acca[_0x3963d3(0xde)])!=null?_0x50723b:_0x2a1da5[_0x3963d3(0xb7)],'text':JSON[_0x3963d3(0xb2)](_0x2a1da5[_0x3963d3(0xc2)]),'parentId':_0x2bb2d7['id']});break;}case v[_0x3963d3(0xbd)]:{const _0x13f4ec=this[_0x3963d3(0x85)][_0x3963d3(0xdc)](_0x237b14,_0x9853c4,_0x2a1da5[_0x3963d3(0x9c)]);_0x13f4ec&&_0x13f4ec[_0x3963d3(0xab)]&&this['_threadCommentModel'][_0x3963d3(0xbc)](_0x237b14,_0x9853c4,_0x2a1da5[_0x3963d3(0x9c)]);break;}case v[_0x3963d3(0x9e)]:{this[_0x3963d3(0x85)][_0x3963d3(0xca)](_0x237b14,_0x9853c4,{'commentId':_0x2a1da5['replyId'],'text':JSON[_0x3963d3(0xb2)](_0x2a1da5[_0x3963d3(0xc2)])});break;}case v[_0x3963d3(0xcc)]:{const _0x476ca2=(_0x1ec352=this['_threadCommentModel'][_0x3963d3(0xe0)](_0x2a1da5[_0x3963d3(0x84)])[_0x3963d3(0xd8)](_0x230a8e=>_0x230a8e['threadId']===_0x2a1da5[_0x3963d3(0xb3)]))==null?void 0x0:_0x1ec352[_0x3963d3(0x90)];_0x476ca2&&this['_threadCommentModel']['resolveComment'](_0x237b14,_0x9853c4,_0x476ca2['id'],_0x2a1da5['solved']===I[_0x3963d3(0xb1)]);break;}}}));}};S=V([p(0x0,_0x4173d0(_0x5f1bda)),p(0x1,_0x4173d0(_0x13d21d)),p(0x2,_0x4173d0(_0x56ea55)),p(0x3,_0x4173d0(_0x5905e3))],S);const z=_0x4845ea(0xd6),M={};var k=Object[_0x4845ea(0xc8)],Q=(_0x1f560e,_0xc19d7c,_0x952527,_0x13224c)=>{const _0x5e8920=_0x4845ea;for(var _0x6a3795=_0x13224c>0x1?void 0x0:_0x13224c?k(_0xc19d7c,_0x952527):_0xc19d7c,_0x59293f=_0x1f560e[_0x5e8920(0xaf)]-0x1,_0x5f22ad;_0x59293f>=0x0;_0x59293f--)(_0x5f22ad=_0x1f560e[_0x59293f])&&(_0x6a3795=_0x5f22ad(_0x6a3795)||_0x6a3795);return _0x6a3795;},_=(_0x316bc3,_0x335540)=>(_0x53a774,_0x3359dc)=>_0x335540(_0x53a774,_0x3359dc,_0x316bc3);function X(_0x572a31,_0x374096){const _0x2cfaea=_0x4845ea,_0x1098f5=_0x572a31[_0x2cfaea(0xbe)][0x0];return{..._0x374096,'id':_0x1098f5[_0x2cfaea(0x9c)],'resolved':_0x572a31[_0x2cfaea(0xa3)]===0x1,'dT':D(_0x1098f5[_0x2cfaea(0x9d)]),'personId':_0x1098f5[_0x2cfaea(0xb7)],'threadId':_0x1098f5[_0x2cfaea(0xb3)]};}function ee(_0x4eb297,_0x25e238,_0x2d6065){const _0x53b67d=_0x4845ea;var _0x2cca9d,_0x309ae8;if(((_0x309ae8=(_0x2cca9d=_0x4eb297==null?void 0x0:_0x4eb297[_0x53b67d(0xbe)])==null?void 0x0:_0x2cca9d['length'])!=null?_0x309ae8:0x0)>0x0){const _0x1bdca4=(_0x4fa42e,_0x1c9b18)=>({'id':_0x4fa42e[_0x53b67d(0x9c)],'threadId':_0x4fa42e['threadId'],'dT':D(_0x4fa42e[_0x53b67d(0x9d)]),'personId':_0x4fa42e['userId'],'resolved':_0x4eb297[_0x53b67d(0xa3)]===I[_0x53b67d(0xb1)],'unitId':_0x25e238,'subUnitId':_0x2d6065,'text':JSON[_0x53b67d(0xb2)](_0x4fa42e['content']),'parentId':_0x1c9b18}),_0x255065=_0x1bdca4(_0x4eb297[_0x53b67d(0xbe)][0x0]);return{..._0x255065,'children':_0x4eb297[_0x53b67d(0xbe)][_0x53b67d(0xe3)](0x1)['map'](_0x1a5f49=>_0x1bdca4(_0x1a5f49,_0x255065['id']))};}return null;}let f=class{constructor(_0x42702a,_0x67dfd1,_0x492144,_0x24686c){const _0x382e90=_0x4845ea;this[_0x382e90(0xbb)]=_0x42702a,this[_0x382e90(0xda)]=_0x67dfd1,this[_0x382e90(0xae)]=_0x492144,this['_injector']=_0x24686c;}async[_0x4845ea(0xc5)](_0x18c2fb){const _0x276b96=_0x4845ea;var _0x50c8a2,_0x2901b8;const {parentId:_0x567987,unitId:_0x19fccc,text:_0x2d4351,threadId:_0x941d03}=_0x18c2fb,_0x22f711=(_0x2901b8=(_0x50c8a2=_0x2d4351['customRanges'])==null?void 0x0:_0x50c8a2['filter'](_0x282ecc=>_0x282ecc['rangeType']===_0x5f5740['COMMENT'])['map'](_0x258529=>_0x258529[_0x276b96(0xd0)]))!=null?_0x2901b8:[],_0x5a25eb=JSON[_0x276b96(0x99)](_0x2d4351),_0x214e44=(await this[_0x276b96(0xae)]['requireSession'](_0x19fccc))[_0x276b96(0xd4)]();if(_0x567987){const _0x3ab599={'memberId':_0x214e44,'unitId':_0x19fccc,'content':_0x5a25eb,'mention':_0x22f711,'threadId':_0x941d03},_0x4bddaa=(await this[_0x276b96(0xbb)][_0x276b96(0x91)]('/universer-api/comment/unit/'+_0x19fccc+_0x276b96(0x9b),{'body':_0x3ab599}))[_0x276b96(0x8f)][_0x276b96(0xd7)];return{..._0x18c2fb,'id':_0x4bddaa[_0x276b96(0x9c)],'dT':_0x4d3e30(+_0x4bddaa[_0x276b96(0x9d)])['format'](_0x276b96(0x81)),'personId':_0x4bddaa['userId']};}else{const _0x1a9e39={'memberId':_0x214e44,'unitId':_0x19fccc,'content':_0x5a25eb,'mention':_0x22f711},_0xb493a9=await this[_0x276b96(0xbb)][_0x276b96(0x91)]('/universer-api/comment/unit/'+_0x19fccc+_0x276b96(0x9f),{'body':_0x1a9e39});return X(_0xb493a9['body'][_0x276b96(0xdb)],_0x18c2fb);}}async[_0x4845ea(0xca)](_0x952a77){const _0x16ce0e=_0x4845ea;var _0x169034,_0x28bfff;const {text:_0x2750b1,unitId:_0x3b2ff2}=_0x952a77,_0x13eae3=(_0x28bfff=(_0x169034=_0x2750b1[_0x16ce0e(0xb4)])==null?void 0x0:_0x169034['filter'](_0x1fa310=>_0x1fa310['rangeType']===_0x5f5740[_0x16ce0e(0xac)])[_0x16ce0e(0xe6)](_0x5a003d=>_0x5a003d['rangeId']))!=null?_0x28bfff:[],_0x2a0676=JSON[_0x16ce0e(0x99)](_0x2750b1),_0x54dd8b=_0x952a77[_0x16ce0e(0xb3)],_0x2d57d7=_0x952a77['id'],_0x202b9e={'memberId':(await this['_sessionService']['requireSession'](_0x3b2ff2))['getMemberID'](),'unitId':_0x3b2ff2,'threadId':_0x54dd8b,'mention':_0x13eae3,'content':_0x2a0676,'replyId':_0x2d57d7},_0xd9ec75=await this['_httpService'][_0x16ce0e(0x91)](_0x16ce0e(0xd2)+_0x3b2ff2+_0x16ce0e(0x96),{'body':_0x202b9e});return!_0xd9ec75[_0x16ce0e(0x8f)]['error']||_0xd9ec75[_0x16ce0e(0x8f)][_0x16ce0e(0xe1)][_0x16ce0e(0xce)]===0x1;}async['resolveComment'](_0x4ce925){const _0x5dab6d=_0x4845ea,{unitId:_0x5b2407}=_0x4ce925,_0x4c8d16=_0x4ce925[_0x5dab6d(0xb3)],_0x3b6cd1={'memberId':this[_0x5dab6d(0xda)][_0x5dab6d(0x95)]()[_0x5dab6d(0xde)],'unitId':_0x5b2407,'threadId':_0x4c8d16,'solved':_0x4ce925[_0x5dab6d(0xe4)]?I['Solved']:I[_0x5dab6d(0x9a)]},_0x2f4050=await this[_0x5dab6d(0xbb)][_0x5dab6d(0x91)](_0x5dab6d(0xd2)+_0x5b2407+_0x5dab6d(0xdd),{'body':_0x3b6cd1});return!_0x2f4050[_0x5dab6d(0x8f)][_0x5dab6d(0xe1)]||_0x2f4050[_0x5dab6d(0x8f)][_0x5dab6d(0xe1)][_0x5dab6d(0xce)]===0x1;}async['deleteComment'](_0x51acda,_0x1491ee,_0x856ccb,_0x293a42){const _0x11c9b2=_0x4845ea,_0x5bbd7d={'memberId':(await this[_0x11c9b2(0xae)][_0x11c9b2(0x87)](_0x51acda))[_0x11c9b2(0xd4)](),'threadId':_0x856ccb,'replyId':_0x293a42,'unitId':_0x51acda},_0x479635=await this[_0x11c9b2(0xbb)][_0x11c9b2(0x91)](_0x11c9b2(0xd2)+_0x51acda+'/delete',{'body':_0x5bbd7d});return!_0x479635[_0x11c9b2(0x8f)]['error']||_0x479635[_0x11c9b2(0x8f)][_0x11c9b2(0xe1)]['code']===0x1;}async['listComments'](_0x449999,_0x35654d,_0x1af0a8){const _0x4c30e7=_0x4845ea,_0xfda1fc={'unitId':_0x449999,'threadId':_0x1af0a8},_0x515648=await this[_0x4c30e7(0xbb)]['post']('/universer-api/comment/unit/'+_0x449999+_0x4c30e7(0xba),{'body':_0xfda1fc}),_0x60286=_0x1af0a8[_0x4c30e7(0xe6)](_0x19c797=>ee(_0x515648[_0x4c30e7(0x8f)][_0x4c30e7(0xe5)][_0x19c797],_0x449999,_0x35654d))['filter'](Boolean);return Object[_0x4c30e7(0x8d)](_0x515648['body'][_0x4c30e7(0xcf)])[_0x4c30e7(0xc9)](_0x1de0a8=>{const _0x2e4eec=_0x4c30e7;this['_userService'][_0x2e4eec(0x8b)](_0x1de0a8);}),_0x60286;}[_0x4845ea(0xc6)](_0x27ab0e){const _0x52d172=_0x4845ea;return{'id':_0x27ab0e['id'],'threadId':_0x27ab0e[_0x52d172(0xb3)],'ref':_0x27ab0e[_0x52d172(0xa6)]};}};f=Q([_(0x0,_0x4173d0(_0x4088a0)),_(0x1,_0x4173d0(_0x56ea55)),_(0x2,_0x4173d0(_0x1a3d82)),_(0x3,_0x4173d0(_0x5905e3))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x69e504,_0xa85112,_0x6c1d91,_0x30e476)=>{const _0x5ade0a=_0x4845ea;for(var _0x4a8c97=_0x30e476>0x1?void 0x0:_0x30e476?re(_0xa85112,_0x6c1d91):_0xa85112,_0x39e210=_0x69e504[_0x5ade0a(0xaf)]-0x1,_0x1815e0;_0x39e210>=0x0;_0x39e210--)(_0x1815e0=_0x69e504[_0x39e210])&&(_0x4a8c97=_0x1815e0(_0x4a8c97)||_0x4a8c97);return _0x4a8c97;},N=(_0x3c42d7,_0x2dd4f0)=>(_0x4abb01,_0x5bea90)=>_0x2dd4f0(_0x4abb01,_0x5bea90,_0x3c42d7);let g=class extends _0x17feda{constructor(_0x4f07ff,_0x3ec5b8){const _0x5929fe=_0x4845ea;super(),this['_threadCommentDataSourceService']=_0x4f07ff,this['_threadCommentDataSource']=_0x3ec5b8,this[_0x5929fe(0x93)]();}[_0x4845ea(0x93)](){const _0x836c37=_0x4845ea;this[_0x836c37(0xbf)][_0x836c37(0x89)]=this[_0x836c37(0xcb)],this[_0x836c37(0xbf)][_0x836c37(0xd9)]=!0x1;}};g=te([N(0x0,_0xf1e621),N(0x1,_0x4173d0(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3353ff,_0x190b64,_0x8b1c37)=>_0x190b64 in _0x3353ff?se(_0x3353ff,_0x190b64,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8b1c37}):_0x3353ff[_0x190b64]=_0x8b1c37,ie=(_0x55178a,_0x494d8c,_0x15357b,_0x12cbd8)=>{for(var _0x59ef3a=_0x12cbd8>0x1?void 0x0:_0x12cbd8?oe(_0x494d8c,_0x15357b):_0x494d8c,_0x573c15=_0x55178a['length']-0x1,_0x1f76e3;_0x573c15>=0x0;_0x573c15--)(_0x1f76e3=_0x55178a[_0x573c15])&&(_0x59ef3a=_0x1f76e3(_0x59ef3a)||_0x59ef3a);return _0x59ef3a;},w=(_0x508dc8,_0x46b04e)=>(_0x1046ee,_0x210144)=>_0x46b04e(_0x1046ee,_0x210144,_0x508dc8),$=(_0x27b07f,_0xabc664,_0x17b6d5)=>ne(_0x27b07f,typeof _0xabc664!=_0x4845ea(0xb6)?_0xabc664+'':_0xabc664,_0x17b6d5);let b=class extends _0x42140b{constructor(_0x1e74ad=M,_0x43d0de,_0x48e9ea){const _0x2b90b3=_0x4845ea;super(),this['_config']=_0x1e74ad,this[_0x2b90b3(0xb0)]=_0x43d0de,this[_0x2b90b3(0x83)]=_0x48e9ea;const {..._0x1fbd50}=_0x50b81b({},M,this[_0x2b90b3(0xa2)]);this['_configService'][_0x2b90b3(0xd5)](z,_0x1fbd50);}[_0x4845ea(0x97)](){[[f],[g],[S]]['forEach'](_0x24e0dd=>{const _0x4d71f6=_0x6940;this[_0x4d71f6(0xb0)][_0x4d71f6(0xb5)](_0x24e0dd);});}[_0x4845ea(0x80)](){const _0x1363af=_0x4845ea;this[_0x1363af(0xb0)]['get'](g),this['_injector'][_0x1363af(0xdf)](S);}};$(b,'pluginName',W),$(b,_0x4845ea(0xb8),_0x161e92[_0x4845ea(0x92)]),b=ie([_0x1ce5fd(_0x1d3295,_0x6a2fba,_0x45810e),w(0x1,_0x4173d0(_0x5905e3)),w(0x2,_0x22d314)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
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'});}));
1
+ function _0x2cbb(){const _0x5b5fec=['/list','668730IszTps','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','user','addUser','code','/universer-api/comment/unit/','UniverThreadComment','body','_initUserSync','personId','defineProperty','error','dataSource','content','UniverInstanceType','@univerjs/network','add','threadId','_userService','createTimestamp','CommentService','_injector','Disposable','commentUpdate$','get','OpenOrReOpen','pluginName','Edit','_config','solved','rangeType','UniverThreadCommentUi','HTTPService','UniverLicensePlugin','_sessionService','getOwnPropertyDescriptor','listComments','map','Delete','users','size','COMMENT','_threadCommentDataSource','261Pligqj','Solve','UNIVER_UNKNOWN','_threadCommentDataSourceService','requireSession','UniverProThreadCommentDatasource','subscribe','UniverCollaborationClientPlugin','stringify','merge','Module','rangeId','Add','@univerjs-pro/license','getUser','UniverThreadCommentDataSourcePlugin','disposeWithMe','4023344UDczeV','pipe','length','function','1071846zZJzdC','Unknown','unitId','_httpService','_initDataSource','resolved','@univerjs/thread-comment-ui','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replyId','@univerjs/thread-comment','parentId','UniverCore','10PzImfl','root','filter','slice','userId','replies','ThreadCommentModel','UniverProCollaborationClient','updateComment','post','_threadCommentModel','Injector','thread-comment-data-source.config','object','@univerjs/core','comments','bufferTime','20256bYMhUV','format','deleteComment','/add','delete','_commentService','exports','toStringTag','comment','reply','resolveComment','addComment','Reply','@univerjs-pro/collaboration-client','Inject','IThreadCommentDataSourceService','/universer-api/user/list','_init','/reply','forEach','UniverNetwork','type','onReady','getMemberID','3326176HyWDQC','498486GYcgnO','dayjs','184695njdXYP','onStarting','rxjs','values','Solved','/edit','CustomRangeType','UserManagerService','parse','DependentOn','customRanges','getUnit','getCurrentUser'];_0x2cbb=function(){return _0x5b5fec;};return _0x2cbb();}function _0x94d4(_0x59dfd9,_0x179fff){const _0x2cbb83=_0x2cbb();return _0x94d4=function(_0x94d43c,_0x164eee){_0x94d43c=_0x94d43c-0x171;let _0x4c2c49=_0x2cbb83[_0x94d43c];return _0x4c2c49;},_0x94d4(_0x59dfd9,_0x179fff);}(function(_0x45a3b7,_0x4b7819){const _0x14f741=_0x94d4,_0x537b63=_0x45a3b7();while(!![]){try{const _0x3c32c3=-parseInt(_0x14f741(0x17c))/0x1+parseInt(_0x14f741(0x17a))/0x2+parseInt(_0x14f741(0x1b6))/0x3*(-parseInt(_0x14f741(0x1e8))/0x4)+parseInt(_0x14f741(0x1d7))/0x5*(-parseInt(_0x14f741(0x18a))/0x6)+parseInt(_0x14f741(0x179))/0x7+parseInt(_0x14f741(0x1c7))/0x8+-parseInt(_0x14f741(0x1cb))/0x9;if(_0x3c32c3===_0x4b7819)break;else _0x537b63['push'](_0x537b63['shift']());}catch(_0x194337){_0x537b63['push'](_0x537b63['shift']());}}}(_0x2cbb,0x3f7de),function(_0x3fe759,_0x214b95){const _0x13b56b=_0x94d4;typeof exports==_0x13b56b(0x1e4)&&typeof module<'u'?_0x214b95(exports,require('@univerjs-pro/collaboration-client'),require(_0x13b56b(0x1c3)),require(_0x13b56b(0x1e5)),require(_0x13b56b(0x1d1)),require('@univerjs/thread-comment'),require(_0x13b56b(0x17e)),require('@univerjs/network')):typeof define==_0x13b56b(0x1ca)&&define['amd']?define([_0x13b56b(0x1ee),_0x13b56b(0x1f5),_0x13b56b(0x1c3),_0x13b56b(0x1e5),_0x13b56b(0x1d1),_0x13b56b(0x1d4),_0x13b56b(0x17e),_0x13b56b(0x19a)],_0x214b95):(_0x3fe759=typeof globalThis<'u'?globalThis:_0x3fe759||self,_0x214b95(_0x3fe759[_0x13b56b(0x1bb)]={},_0x3fe759[_0x13b56b(0x1de)],_0x3fe759['UniverProLicense'],_0x3fe759[_0x13b56b(0x1d6)],_0x3fe759[_0x13b56b(0x1aa)],_0x3fe759[_0x13b56b(0x191)],_0x3fe759[_0x13b56b(0x17e)],_0x3fe759[_0x13b56b(0x175)]));}(this,function(_0x2db18a,_0x2cec26,_0x3420cd,_0x1507f4,_0x153d8a,_0xdfdb70,_0x3426de,_0x436b9f){'use strict';const _0x40ab6b=_0x94d4;const _0x4630c9=_0x40ab6b(0x1d2);var _0x346e18=(_0x55b143=>(_0x55b143[_0x55b143[_0x40ab6b(0x1a4)]=0x0]=_0x40ab6b(0x1a4),_0x55b143[_0x55b143[_0x40ab6b(0x180)]=0x1]=_0x40ab6b(0x180),_0x55b143[_0x55b143[_0x40ab6b(0x18c)]=-0x1]='UNRECOGNIZED',_0x55b143))(_0x346e18||{}),_0xb8f1a7=(_0x554590=>(_0x554590[_0x554590['Unknown']=0x0]=_0x40ab6b(0x1cc),_0x554590[_0x554590['Add']=0x1]=_0x40ab6b(0x1c2),_0x554590[_0x554590[_0x40ab6b(0x1f4)]=0x2]='Reply',_0x554590[_0x554590[_0x40ab6b(0x1a6)]=0x3]=_0x40ab6b(0x1a6),_0x554590[_0x554590[_0x40ab6b(0x1b1)]=0x4]=_0x40ab6b(0x1b1),_0x554590[_0x554590['Solve']=0x5]=_0x40ab6b(0x1b7),_0x554590[_0x554590[_0x40ab6b(0x18c)]=-0x1]=_0x40ab6b(0x18c),_0x554590))(_0xb8f1a7||{});const _0x5e3a40=_0x1d68ec=>_0x1507f4[_0x40ab6b(0x17b)](new Date(+_0x1d68ec))[_0x40ab6b(0x1e9)]('YYYY/MM/DD\x20HH:mm'),_0x68d72a=async(_0xc7d0a0,_0x319964)=>{const _0x36e44c=_0x40ab6b,_0x4b04fe=_0xc7d0a0[_0x36e44c(0x1a3)](_0x1507f4[_0x36e44c(0x183)]),_0x2e31d9=_0xc7d0a0[_0x36e44c(0x1a3)](_0x436b9f[_0x36e44c(0x1ab)]);_0x319964[_0x36e44c(0x174)](_0x307b9f=>{const _0x30ee57=_0x36e44c;_0x4b04fe[_0x30ee57(0x1c4)](_0x307b9f)&&_0x319964[_0x30ee57(0x1ec)](_0x307b9f);}),_0x319964[_0x36e44c(0x1b3)]&&(await _0x2e31d9[_0x36e44c(0x1a3)](_0x36e44c(0x171),{'params':{'userIDs':[..._0x319964]}}))[_0x36e44c(0x192)]['users'][_0x36e44c(0x174)](_0x5e2a7f=>{_0x5e2a7f&&_0x4b04fe['addUser'](_0x5e2a7f);});};var _0x5bc92b=Object[_0x40ab6b(0x1ae)],_0x455b6e=(_0x3d9429,_0x35d479,_0x467f78,_0x29a8f9)=>{const _0x5a7b01=_0x40ab6b;for(var _0x2d176d=_0x29a8f9>0x1?void 0x0:_0x29a8f9?_0x5bc92b(_0x35d479,_0x467f78):_0x35d479,_0x4395be=_0x3d9429[_0x5a7b01(0x1c9)]-0x1,_0x34df2f;_0x4395be>=0x0;_0x4395be--)(_0x34df2f=_0x3d9429[_0x4395be])&&(_0x2d176d=_0x34df2f(_0x2d176d)||_0x2d176d);return _0x2d176d;},_0x1bbf24=(_0x3d8749,_0x17bba0)=>(_0x24e318,_0x388599)=>_0x17bba0(_0x24e318,_0x388599,_0x3d8749);let _0x458505=class extends _0x1507f4[_0x40ab6b(0x1a1)]{constructor(_0x28b61b,_0x397f98,_0x509371,_0xd7cfad){const _0x4b7b71=_0x40ab6b;super(),this['_commentService']=_0x28b61b,this[_0x4b7b71(0x1e1)]=_0x397f98,this[_0x4b7b71(0x19d)]=_0x509371,this[_0x4b7b71(0x1a0)]=_0xd7cfad,this[_0x4b7b71(0x172)](),this['_initUserSync']();}[_0x40ab6b(0x193)](){const _0x341f53=_0x40ab6b;this[_0x341f53(0x1c6)](this['_threadCommentModel'][_0x341f53(0x1a2)][_0x341f53(0x1c8)](_0x3426de[_0x341f53(0x1e7)](0x10))[_0x341f53(0x1bc)](_0x18bc22=>{const _0x55e7ca=_0x341f53,_0x3de4ab=new Set();_0x18bc22[_0x55e7ca(0x174)](_0xd8ffaa=>{const _0x30ef4e=_0x55e7ca;switch(_0xd8ffaa[_0x30ef4e(0x176)]){case _0x30ef4e(0x19b):{const _0x1e1410=_0xd8ffaa['payload'][_0x30ef4e(0x194)];_0x3de4ab[_0x30ef4e(0x19b)](_0x1e1410);break;}}}),_0x68d72a(this['_injector'],_0x3de4ab);}));}[_0x40ab6b(0x172)](){const _0x346a4d=_0x40ab6b;this[_0x346a4d(0x1c6)](this[_0x346a4d(0x1ed)][_0x346a4d(0x1a2)][_0x346a4d(0x1bc)](async _0x266d1b=>{const _0xda54d6=_0x346a4d;var _0x23a62b,_0x5145b8,_0x41106a,_0x1a2d8a;const _0x37a72d=(_0x23a62b=this[_0xda54d6(0x1e1)][_0xda54d6(0x187)](_0x266d1b[_0xda54d6(0x1cd)])['find'](_0x4a7a76=>_0x4a7a76[_0xda54d6(0x19c)]===_0x266d1b[_0xda54d6(0x19c)]))==null?void 0x0:_0x23a62b[_0xda54d6(0x1d8)];if(!_0x37a72d)return;const {unitId:_0x5f3bd6,subUnitId:_0x5b771b}=_0x37a72d;switch(_0x266d1b['user']&&this[_0xda54d6(0x19d)][_0xda54d6(0x18e)](_0x266d1b[_0xda54d6(0x18d)]),_0x266d1b[_0xda54d6(0x176)]){case _0xb8f1a7[_0xda54d6(0x1c2)]:break;case _0xb8f1a7['Reply']:{this[_0xda54d6(0x1e1)][_0xda54d6(0x1f3)](_0x5f3bd6,_0x5b771b,{'unitId':_0x5f3bd6,'subUnitId':_0x5b771b,'ref':'','id':_0x266d1b[_0xda54d6(0x1d3)],'dT':_0x5e3a40(+_0x266d1b[_0xda54d6(0x19e)]),'threadId':_0x266d1b[_0xda54d6(0x19c)],'personId':(_0x41106a=(_0x5145b8=_0x266d1b[_0xda54d6(0x18d)])==null?void 0x0:_0x5145b8['userID'])!=null?_0x41106a:_0x266d1b[_0xda54d6(0x1db)],'text':JSON[_0xda54d6(0x184)](_0x266d1b['content']),'parentId':_0x37a72d['id']});break;}case _0xb8f1a7[_0xda54d6(0x1b1)]:{const _0x41e550=this[_0xda54d6(0x1e1)]['getComment'](_0x5f3bd6,_0x5b771b,_0x266d1b['replyId']);_0x41e550&&_0x41e550[_0xda54d6(0x1d5)]&&this[_0xda54d6(0x1e1)][_0xda54d6(0x1ea)](_0x5f3bd6,_0x5b771b,_0x266d1b[_0xda54d6(0x1d3)]);break;}case _0xb8f1a7[_0xda54d6(0x1a6)]:{this[_0xda54d6(0x1e1)][_0xda54d6(0x1df)](_0x5f3bd6,_0x5b771b,{'commentId':_0x266d1b[_0xda54d6(0x1d3)],'text':JSON[_0xda54d6(0x184)](_0x266d1b[_0xda54d6(0x198)])});break;}case _0xb8f1a7[_0xda54d6(0x1b7)]:{const _0x2431b1=(_0x1a2d8a=this[_0xda54d6(0x1e1)]['getUnit'](_0x266d1b[_0xda54d6(0x1cd)])['find'](_0x46c22b=>_0x46c22b[_0xda54d6(0x19c)]===_0x266d1b[_0xda54d6(0x19c)]))==null?void 0x0:_0x1a2d8a['root'];_0x2431b1&&this[_0xda54d6(0x1e1)][_0xda54d6(0x1f2)](_0x5f3bd6,_0x5b771b,_0x2431b1['id'],_0x266d1b[_0xda54d6(0x1a8)]===_0x346e18[_0xda54d6(0x180)]);break;}}}));}};_0x458505=_0x455b6e([_0x1bbf24(0x0,_0x1507f4[_0x40ab6b(0x1f6)](_0x2cec26[_0x40ab6b(0x19f)])),_0x1bbf24(0x1,_0x1507f4[_0x40ab6b(0x1f6)](_0xdfdb70[_0x40ab6b(0x1dd)])),_0x1bbf24(0x2,_0x1507f4[_0x40ab6b(0x1f6)](_0x1507f4[_0x40ab6b(0x183)])),_0x1bbf24(0x3,_0x1507f4[_0x40ab6b(0x1f6)](_0x1507f4[_0x40ab6b(0x1e2)]))],_0x458505);const _0x5ded37=_0x40ab6b(0x1e3),_0x3be81e={};var _0x4d3a17=Object[_0x40ab6b(0x1ae)],_0x13cffd=(_0x56172e,_0x59fbef,_0x4e36a9,_0x12b609)=>{const _0x5a8613=_0x40ab6b;for(var _0x5c8c2c=_0x12b609>0x1?void 0x0:_0x12b609?_0x4d3a17(_0x59fbef,_0x4e36a9):_0x59fbef,_0x10fd9f=_0x56172e[_0x5a8613(0x1c9)]-0x1,_0xcc6a45;_0x10fd9f>=0x0;_0x10fd9f--)(_0xcc6a45=_0x56172e[_0x10fd9f])&&(_0x5c8c2c=_0xcc6a45(_0x5c8c2c)||_0x5c8c2c);return _0x5c8c2c;},_0x4389af=(_0x450878,_0x59fd2)=>(_0x317d8d,_0x2d0cc4)=>_0x59fd2(_0x317d8d,_0x2d0cc4,_0x450878);function _0x2e90c4(_0x2a0bd6,_0x4f82cd){const _0x3c93d9=_0x40ab6b,_0x23bdcd=_0x2a0bd6[_0x3c93d9(0x1dc)][0x0];return{..._0x4f82cd,'id':_0x23bdcd[_0x3c93d9(0x1d3)],'resolved':_0x2a0bd6[_0x3c93d9(0x1a8)]===0x1,'dT':_0x5e3a40(_0x23bdcd[_0x3c93d9(0x19e)]),'personId':_0x23bdcd[_0x3c93d9(0x1db)],'threadId':_0x23bdcd['threadId']};}function _0x659624(_0x4e7f51,_0xce56d2,_0x16a954){const _0x351eb4=_0x40ab6b;var _0x5243ac,_0x4cbecc;if(((_0x4cbecc=(_0x5243ac=_0x4e7f51==null?void 0x0:_0x4e7f51[_0x351eb4(0x1dc)])==null?void 0x0:_0x5243ac[_0x351eb4(0x1c9)])!=null?_0x4cbecc:0x0)>0x0){const _0x46511=(_0xac9170,_0x97f345)=>({'id':_0xac9170[_0x351eb4(0x1d3)],'threadId':_0xac9170[_0x351eb4(0x19c)],'dT':_0x5e3a40(_0xac9170[_0x351eb4(0x19e)]),'personId':_0xac9170[_0x351eb4(0x1db)],'resolved':_0x4e7f51['solved']===_0x346e18[_0x351eb4(0x180)],'unitId':_0xce56d2,'subUnitId':_0x16a954,'text':JSON[_0x351eb4(0x184)](_0xac9170['content']),'parentId':_0x97f345}),_0x1736c2=_0x46511(_0x4e7f51['replies'][0x0]);return{..._0x1736c2,'children':_0x4e7f51[_0x351eb4(0x1dc)][_0x351eb4(0x1da)](0x1)['map'](_0x3a4f34=>_0x46511(_0x3a4f34,_0x1736c2['id']))};}return null;}let _0x10675f=class{constructor(_0xf6355e,_0x96a53c,_0x55d714,_0x108cee){const _0x1595ac=_0x40ab6b;this['_httpService']=_0xf6355e,this[_0x1595ac(0x19d)]=_0x96a53c,this['_sessionService']=_0x55d714,this[_0x1595ac(0x1a0)]=_0x108cee;}async[_0x40ab6b(0x1f3)](_0x5b700b){const _0x373a4c=_0x40ab6b;var _0x54cf1e,_0x1cfa12;const {parentId:_0x103544,unitId:_0x4e7957,text:_0x4015ea,threadId:_0x17dd77}=_0x5b700b,_0x517250=(_0x1cfa12=(_0x54cf1e=_0x4015ea[_0x373a4c(0x186)])==null?void 0x0:_0x54cf1e['filter'](_0x56ac94=>_0x56ac94[_0x373a4c(0x1a9)]===_0x1507f4['CustomRangeType'][_0x373a4c(0x1b4)])[_0x373a4c(0x1b0)](_0x72e3c3=>_0x72e3c3[_0x373a4c(0x1c1)]))!=null?_0x1cfa12:[],_0x5ce7d5=JSON[_0x373a4c(0x1be)](_0x4015ea),_0x2eed59=(await this['_sessionService'][_0x373a4c(0x1ba)](_0x4e7957))['getMemberID']();if(_0x103544){const _0x222363={'memberId':_0x2eed59,'unitId':_0x4e7957,'content':_0x5ce7d5,'mention':_0x517250,'threadId':_0x17dd77},_0x37ae08=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x4e7957+_0x373a4c(0x173),{'body':_0x222363}))[_0x373a4c(0x192)][_0x373a4c(0x1f1)];return{..._0x5b700b,'id':_0x37ae08[_0x373a4c(0x1d3)],'dT':_0x1507f4[_0x373a4c(0x17b)](+_0x37ae08[_0x373a4c(0x19e)])['format'](_0x373a4c(0x18b)),'personId':_0x37ae08['userId']};}else{const _0x119f1e={'memberId':_0x2eed59,'unitId':_0x4e7957,'content':_0x5ce7d5,'mention':_0x517250},_0x2a7a1c=await this['_httpService'][_0x373a4c(0x1e0)](_0x373a4c(0x190)+_0x4e7957+_0x373a4c(0x1eb),{'body':_0x119f1e});return _0x2e90c4(_0x2a7a1c['body'][_0x373a4c(0x1f0)],_0x5b700b);}}async[_0x40ab6b(0x1df)](_0x516729){const _0x10223a=_0x40ab6b;var _0x1d384c,_0x597041;const {text:_0x5b16ac,unitId:_0x3f302f}=_0x516729,_0x450291=(_0x597041=(_0x1d384c=_0x5b16ac[_0x10223a(0x186)])==null?void 0x0:_0x1d384c[_0x10223a(0x1d9)](_0x394cf2=>_0x394cf2[_0x10223a(0x1a9)]===_0x1507f4[_0x10223a(0x182)]['COMMENT'])[_0x10223a(0x1b0)](_0x7fcbdc=>_0x7fcbdc[_0x10223a(0x1c1)]))!=null?_0x597041:[],_0x589634=JSON[_0x10223a(0x1be)](_0x5b16ac),_0xcc4edb=_0x516729[_0x10223a(0x19c)],_0x4a2cad=_0x516729['id'],_0x5215e5={'memberId':(await this[_0x10223a(0x1ad)]['requireSession'](_0x3f302f))[_0x10223a(0x178)](),'unitId':_0x3f302f,'threadId':_0xcc4edb,'mention':_0x450291,'content':_0x589634,'replyId':_0x4a2cad},_0xb6c87=await this[_0x10223a(0x1ce)]['post'](_0x10223a(0x190)+_0x3f302f+_0x10223a(0x181),{'body':_0x5215e5});return!_0xb6c87[_0x10223a(0x192)]['error']||_0xb6c87['body'][_0x10223a(0x196)]['code']===0x1;}async[_0x40ab6b(0x1f2)](_0xf4438a){const _0x53683f=_0x40ab6b,{unitId:_0x50bc19}=_0xf4438a,_0x368f9a=_0xf4438a['threadId'],_0x9134e={'memberId':this[_0x53683f(0x19d)][_0x53683f(0x188)]()['userID'],'unitId':_0x50bc19,'threadId':_0x368f9a,'solved':_0xf4438a[_0x53683f(0x1d0)]?_0x346e18[_0x53683f(0x180)]:_0x346e18[_0x53683f(0x1a4)]},_0x492275=await this['_httpService'][_0x53683f(0x1e0)]('/universer-api/comment/unit/'+_0x50bc19+'/solved',{'body':_0x9134e});return!_0x492275[_0x53683f(0x192)]['error']||_0x492275['body']['error']['code']===0x1;}async['deleteComment'](_0x2efa5d,_0x4c6072,_0x127731,_0x481216){const _0x507cf3=_0x40ab6b,_0x1271df={'memberId':(await this[_0x507cf3(0x1ad)][_0x507cf3(0x1ba)](_0x2efa5d))[_0x507cf3(0x178)](),'threadId':_0x127731,'replyId':_0x481216,'unitId':_0x2efa5d},_0x5b3852=await this[_0x507cf3(0x1ce)][_0x507cf3(0x1e0)](_0x507cf3(0x190)+_0x2efa5d+'/delete',{'body':_0x1271df});return!_0x5b3852['body'][_0x507cf3(0x196)]||_0x5b3852['body'][_0x507cf3(0x196)][_0x507cf3(0x18f)]===0x1;}async[_0x40ab6b(0x1af)](_0x1e2a09,_0x33cf39,_0x4b2508){const _0x2c16a6=_0x40ab6b,_0x79ba3={'unitId':_0x1e2a09,'threadId':_0x4b2508},_0x3f1c16=await this[_0x2c16a6(0x1ce)][_0x2c16a6(0x1e0)]('/universer-api/comment/unit/'+_0x1e2a09+_0x2c16a6(0x189),{'body':_0x79ba3}),_0x31f5bf=_0x4b2508[_0x2c16a6(0x1b0)](_0x1ce670=>_0x659624(_0x3f1c16[_0x2c16a6(0x192)][_0x2c16a6(0x1e6)][_0x1ce670],_0x1e2a09,_0x33cf39))[_0x2c16a6(0x1d9)](Boolean);return Object[_0x2c16a6(0x17f)](_0x3f1c16['body'][_0x2c16a6(0x1b2)])[_0x2c16a6(0x174)](_0x284cad=>{const _0x3f72d2=_0x2c16a6;this[_0x3f72d2(0x19d)]['addUser'](_0x284cad);}),_0x31f5bf;}['saveCommentToSnapshot'](_0x1255f8){const _0x3a14be=_0x40ab6b;return{'id':_0x1255f8['id'],'threadId':_0x1255f8[_0x3a14be(0x19c)],'ref':_0x1255f8['ref']};}};_0x10675f=_0x13cffd([_0x4389af(0x0,_0x1507f4[_0x40ab6b(0x1f6)](_0x436b9f[_0x40ab6b(0x1ab)])),_0x4389af(0x1,_0x1507f4['Inject'](_0x1507f4[_0x40ab6b(0x183)])),_0x4389af(0x2,_0x1507f4[_0x40ab6b(0x1f6)](_0x2cec26['CollaborationSessionService'])),_0x4389af(0x3,_0x1507f4[_0x40ab6b(0x1f6)](_0x1507f4[_0x40ab6b(0x1e2)]))],_0x10675f);var _0x6cd102=Object[_0x40ab6b(0x1ae)],_0x3d8222=(_0x11db3c,_0x4b6d25,_0x5b4948,_0x140f29)=>{const _0x83122=_0x40ab6b;for(var _0x1085f5=_0x140f29>0x1?void 0x0:_0x140f29?_0x6cd102(_0x4b6d25,_0x5b4948):_0x4b6d25,_0x2718a3=_0x11db3c[_0x83122(0x1c9)]-0x1,_0x4be286;_0x2718a3>=0x0;_0x2718a3--)(_0x4be286=_0x11db3c[_0x2718a3])&&(_0x1085f5=_0x4be286(_0x1085f5)||_0x1085f5);return _0x1085f5;},_0x45aa7c=(_0x1649c2,_0x331c46)=>(_0x28dfcd,_0x57d414)=>_0x331c46(_0x28dfcd,_0x57d414,_0x1649c2);let _0x1e00bb=class extends _0x1507f4['Disposable']{constructor(_0x3416ab,_0x121cf8){const _0x118a40=_0x40ab6b;super(),this[_0x118a40(0x1b9)]=_0x3416ab,this['_threadCommentDataSource']=_0x121cf8,this[_0x118a40(0x1cf)]();}['_initDataSource'](){const _0x18e3bf=_0x40ab6b;this[_0x18e3bf(0x1b9)][_0x18e3bf(0x197)]=this[_0x18e3bf(0x1b5)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x1e00bb=_0x3d8222([_0x45aa7c(0x0,_0xdfdb70[_0x40ab6b(0x1f7)]),_0x45aa7c(0x1,_0x1507f4[_0x40ab6b(0x1f6)](_0x10675f))],_0x1e00bb);var _0x55cdf7=Object[_0x40ab6b(0x195)],_0x1f2649=Object[_0x40ab6b(0x1ae)],_0x1e93f7=(_0xb02da0,_0x2491aa,_0x29d1d4)=>_0x2491aa in _0xb02da0?_0x55cdf7(_0xb02da0,_0x2491aa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29d1d4}):_0xb02da0[_0x2491aa]=_0x29d1d4,_0x3ec012=(_0x248e6a,_0x5368fe,_0xf95de7,_0x7ff1ac)=>{for(var _0x378265=_0x7ff1ac>0x1?void 0x0:_0x7ff1ac?_0x1f2649(_0x5368fe,_0xf95de7):_0x5368fe,_0x2ff997=_0x248e6a['length']-0x1,_0x1718c7;_0x2ff997>=0x0;_0x2ff997--)(_0x1718c7=_0x248e6a[_0x2ff997])&&(_0x378265=_0x1718c7(_0x378265)||_0x378265);return _0x378265;},_0x398e3c=(_0x448e07,_0x1222ad)=>(_0x61fbb,_0x1f66f2)=>_0x1222ad(_0x61fbb,_0x1f66f2,_0x448e07),_0x5bf771=(_0x446ea9,_0x4d1c52,_0x446750)=>_0x1e93f7(_0x446ea9,typeof _0x4d1c52!='symbol'?_0x4d1c52+'':_0x4d1c52,_0x446750);_0x2db18a[_0x40ab6b(0x1c5)]=class extends _0x1507f4['Plugin']{constructor(_0x1528c8=_0x3be81e,_0x1f8977,_0x5a88df){const _0x37b19a=_0x40ab6b;super(),this[_0x37b19a(0x1a7)]=_0x1528c8,this[_0x37b19a(0x1a0)]=_0x1f8977,this['_configService']=_0x5a88df;const {..._0x58daba}=_0x1507f4[_0x37b19a(0x1bf)]({},_0x3be81e,this[_0x37b19a(0x1a7)]);this['_configService']['setConfig'](_0x5ded37,_0x58daba);}[_0x40ab6b(0x17d)](){[[_0x10675f],[_0x1e00bb],[_0x458505]]['forEach'](_0x304535=>{const _0x9a1841=_0x94d4;this['_injector'][_0x9a1841(0x19b)](_0x304535);});}[_0x40ab6b(0x177)](){const _0x515d1c=_0x40ab6b;this[_0x515d1c(0x1a0)][_0x515d1c(0x1a3)](_0x1e00bb),this[_0x515d1c(0x1a0)][_0x515d1c(0x1a3)](_0x458505);}},_0x5bf771(_0x2db18a[_0x40ab6b(0x1c5)],_0x40ab6b(0x1a5),_0x4630c9),_0x5bf771(_0x2db18a[_0x40ab6b(0x1c5)],_0x40ab6b(0x176),_0x1507f4[_0x40ab6b(0x199)][_0x40ab6b(0x1b8)]),_0x2db18a[_0x40ab6b(0x1c5)]=_0x3ec012([_0x1507f4[_0x40ab6b(0x185)](_0x153d8a['UniverThreadCommentUIPlugin'],_0x2cec26[_0x40ab6b(0x1bd)],_0x3420cd[_0x40ab6b(0x1ac)]),_0x398e3c(0x1,_0x1507f4[_0x40ab6b(0x1f6)](_0x1507f4[_0x40ab6b(0x1e2)])),_0x398e3c(0x2,_0x1507f4['IConfigService'])],_0x2db18a['UniverThreadCommentDataSourcePlugin']),Object[_0x40ab6b(0x195)](_0x2db18a,Symbol[_0x40ab6b(0x1ef)],{'value':_0x40ab6b(0x1c0)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202505041606",
3
+ "version": "0.7.0-nightly.202505061607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,19 +45,19 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
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"
48
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505061607",
49
+ "@univerjs-pro/license": "0.7.0-nightly.202505061607",
50
+ "@univerjs/protocol": "0.1.46-alpha.3",
51
+ "@univerjs/network": "0.7.0-nightly.202505061607",
52
+ "@univerjs/thread-comment": "0.7.0-nightly.202505061607",
53
+ "@univerjs/core": "0.7.0-nightly.202505061607",
54
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202505061607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.3",
59
- "vite": "^6.3.4",
60
- "vitest": "^3.1.2",
59
+ "vite": "^6.3.5",
60
+ "vitest": "^3.1.3",
61
61
  "@univerjs-infra/shared": "0.7.0-beta.0"
62
62
  },
63
63
  "scripts": {