@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505071607 → 0.7.0-nightly.202505101606

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 _0x367232=_0x4df4;(function(_0xd779eb,_0x252f9d){const _0x3f7aa4=_0x4df4,_0x12478=_0xd779eb();while(!![]){try{const _0x3b00bd=-parseInt(_0x3f7aa4(0x1e1))/0x1+parseInt(_0x3f7aa4(0x1b4))/0x2*(-parseInt(_0x3f7aa4(0x1b8))/0x3)+-parseInt(_0x3f7aa4(0x1ab))/0x4*(parseInt(_0x3f7aa4(0x1e5))/0x5)+parseInt(_0x3f7aa4(0x1aa))/0x6*(parseInt(_0x3f7aa4(0x1b5))/0x7)+parseInt(_0x3f7aa4(0x17c))/0x8+parseInt(_0x3f7aa4(0x196))/0x9+parseInt(_0x3f7aa4(0x19a))/0xa*(-parseInt(_0x3f7aa4(0x1dd))/0xb);if(_0x3b00bd===_0x252f9d)break;else _0x12478['push'](_0x12478['shift']());}catch(_0x525dd7){_0x12478['push'](_0x12478['shift']());}}}(_0x450c,0x720d3));Object[_0x367232(0x191)](exports,Symbol[_0x367232(0x16e)],{'value':_0x367232(0x1c8)});const b=require(_0x367232(0x176)),T=require(_0x367232(0x182)),c=require('@univerjs/core'),j=require(_0x367232(0x1c1)),M=require(_0x367232(0x17f)),w=require(_0x367232(0x192)),P=require('@univerjs/network'),U=_0x367232(0x16b);var I=(_0x10cf79=>(_0x10cf79[_0x10cf79[_0x367232(0x1a8)]=0x0]=_0x367232(0x1a8),_0x10cf79[_0x10cf79[_0x367232(0x1c9)]=0x1]='Solved',_0x10cf79[_0x10cf79[_0x367232(0x184)]=-0x1]=_0x367232(0x184),_0x10cf79))(I||{}),v=(_0x5e795c=>(_0x5e795c[_0x5e795c[_0x367232(0x1cd)]=0x0]=_0x367232(0x1cd),_0x5e795c[_0x5e795c[_0x367232(0x16c)]=0x1]='Add',_0x5e795c[_0x5e795c[_0x367232(0x1ad)]=0x2]='Reply',_0x5e795c[_0x5e795c[_0x367232(0x1cb)]=0x3]=_0x367232(0x1cb),_0x5e795c[_0x5e795c['Delete']=0x4]=_0x367232(0x1e0),_0x5e795c[_0x5e795c['Solve']=0x5]=_0x367232(0x1a9),_0x5e795c[_0x5e795c['UNRECOGNIZED']=-0x1]=_0x367232(0x184),_0x5e795c))(v||{});const f=_0xf78c50=>c['dayjs'](new Date(+_0xf78c50))[_0x367232(0x1bd)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x2f9629,_0x433fcb)=>{const _0x552865=_0x367232,_0x5dee73=_0x2f9629['get'](c[_0x552865(0x1bc)]),_0x4c792d=_0x2f9629['get'](P['HTTPService']);_0x433fcb[_0x552865(0x1cf)](_0xfb84a5=>{const _0x3cf832=_0x552865;_0x5dee73[_0x3cf832(0x183)](_0xfb84a5)&&_0x433fcb['delete'](_0xfb84a5);}),_0x433fcb['size']&&(await _0x4c792d[_0x552865(0x1bf)](_0x552865(0x1b7),{'params':{'userIDs':[..._0x433fcb]}}))[_0x552865(0x1a0)]['users']['forEach'](_0x155f38=>{const _0x26639b=_0x552865;_0x155f38&&_0x5dee73[_0x26639b(0x1db)](_0x155f38);});};var $=Object[_0x367232(0x1d9)],E=(_0x32bbd9,_0x2a9b0a,_0x87baaf,_0x38eef9)=>{const _0x396d57=_0x367232;for(var _0x278eb5=_0x38eef9>0x1?void 0x0:_0x38eef9?$(_0x2a9b0a,_0x87baaf):_0x2a9b0a,_0x93c396=_0x32bbd9[_0x396d57(0x19f)]-0x1,_0x5f334b;_0x93c396>=0x0;_0x93c396--)(_0x5f334b=_0x32bbd9[_0x93c396])&&(_0x278eb5=_0x5f334b(_0x278eb5)||_0x278eb5);return _0x278eb5;},S=(_0x548bd8,_0x3a51a3)=>(_0x5a542c,_0x3356e0)=>_0x3a51a3(_0x5a542c,_0x3356e0,_0x548bd8);let p=class extends c[_0x367232(0x1ae)]{constructor(_0x33aff1,_0x4c0329,_0x5be9d7,_0x486542){const _0x88a054=_0x367232;super(),this['_commentService']=_0x33aff1,this[_0x88a054(0x175)]=_0x4c0329,this['_userService']=_0x5be9d7,this[_0x88a054(0x17d)]=_0x486542,this[_0x88a054(0x1dc)](),this[_0x88a054(0x1d5)]();}[_0x367232(0x1d5)](){const _0x4e0641=_0x367232;this[_0x4e0641(0x1e4)](this['_threadCommentModel'][_0x4e0641(0x1bb)][_0x4e0641(0x1a7)](w['bufferTime'](0x10))[_0x4e0641(0x1d0)](_0x397734=>{const _0x38657b=_0x4e0641,_0x33eaf7=new Set();_0x397734[_0x38657b(0x1cf)](_0x245203=>{const _0x4c39e3=_0x38657b;switch(_0x245203[_0x4c39e3(0x195)]){case _0x4c39e3(0x1da):{const _0x156d7c=_0x245203[_0x4c39e3(0x190)]['personId'];_0x33eaf7['add'](_0x156d7c);break;}}}),R(this[_0x38657b(0x17d)],_0x33eaf7);}));}[_0x367232(0x1dc)](){const _0x3cdf32=_0x367232;this[_0x3cdf32(0x1e4)](this['_commentService'][_0x3cdf32(0x1bb)][_0x3cdf32(0x1d0)](async _0x50c80a=>{const _0x4d7d2f=_0x3cdf32;var _0x5b725a,_0x5e65a5,_0x2f8222,_0x4e75e3;const _0x3d8d71=(_0x5b725a=this[_0x4d7d2f(0x175)]['getUnit'](_0x50c80a['unitId'])[_0x4d7d2f(0x199)](_0x40ccd1=>_0x40ccd1[_0x4d7d2f(0x1ce)]===_0x50c80a[_0x4d7d2f(0x1ce)]))==null?void 0x0:_0x5b725a[_0x4d7d2f(0x169)];if(!_0x3d8d71)return;const {unitId:_0x31c8c7,subUnitId:_0x4beba0}=_0x3d8d71;switch(_0x50c80a[_0x4d7d2f(0x1c5)]&&this[_0x4d7d2f(0x186)]['addUser'](_0x50c80a['user']),_0x50c80a[_0x4d7d2f(0x195)]){case v[_0x4d7d2f(0x16c)]:break;case v[_0x4d7d2f(0x1ad)]:{this[_0x4d7d2f(0x175)][_0x4d7d2f(0x1a3)](_0x31c8c7,_0x4beba0,{'unitId':_0x31c8c7,'subUnitId':_0x4beba0,'ref':'','id':_0x50c80a[_0x4d7d2f(0x170)],'dT':f(+_0x50c80a[_0x4d7d2f(0x1e6)]),'threadId':_0x50c80a[_0x4d7d2f(0x1ce)],'personId':(_0x2f8222=(_0x5e65a5=_0x50c80a['user'])==null?void 0x0:_0x5e65a5[_0x4d7d2f(0x19d)])!=null?_0x2f8222:_0x50c80a[_0x4d7d2f(0x1cc)],'text':JSON[_0x4d7d2f(0x1ac)](_0x50c80a[_0x4d7d2f(0x1c7)]),'parentId':_0x3d8d71['id']});break;}case v[_0x4d7d2f(0x1e0)]:{const _0x19a54b=this[_0x4d7d2f(0x175)][_0x4d7d2f(0x1d3)](_0x31c8c7,_0x4beba0,_0x50c80a['replyId']);_0x19a54b&&_0x19a54b['parentId']&&this[_0x4d7d2f(0x175)][_0x4d7d2f(0x1b6)](_0x31c8c7,_0x4beba0,_0x50c80a['replyId']);break;}case v[_0x4d7d2f(0x1cb)]:{this[_0x4d7d2f(0x175)][_0x4d7d2f(0x1a2)](_0x31c8c7,_0x4beba0,{'commentId':_0x50c80a[_0x4d7d2f(0x170)],'text':JSON[_0x4d7d2f(0x1ac)](_0x50c80a[_0x4d7d2f(0x1c7)])});break;}case v['Solve']:{const _0x49df2c=(_0x4e75e3=this['_threadCommentModel'][_0x4d7d2f(0x1de)](_0x50c80a['unitId'])[_0x4d7d2f(0x199)](_0x37ec67=>_0x37ec67[_0x4d7d2f(0x1ce)]===_0x50c80a[_0x4d7d2f(0x1ce)]))==null?void 0x0:_0x4e75e3[_0x4d7d2f(0x169)];_0x49df2c&&this[_0x4d7d2f(0x175)][_0x4d7d2f(0x17a)](_0x31c8c7,_0x4beba0,_0x49df2c['id'],_0x50c80a['solved']===I[_0x4d7d2f(0x1c9)]);break;}}}));}};p=E([S(0x0,c[_0x367232(0x173)](b[_0x367232(0x16a)])),S(0x1,c[_0x367232(0x173)](M[_0x367232(0x172)])),S(0x2,c['Inject'](c[_0x367232(0x1bc)])),S(0x3,c['Inject'](c[_0x367232(0x188)]))],p);const q=_0x367232(0x1d8),D={};var A=Object[_0x367232(0x1d9)],x=(_0x46ab0a,_0x4f14c6,_0x33d409,_0x34d104)=>{const _0x4fba65=_0x367232;for(var _0x4fe326=_0x34d104>0x1?void 0x0:_0x34d104?A(_0x4f14c6,_0x33d409):_0x4f14c6,_0x182a6a=_0x46ab0a[_0x4fba65(0x19f)]-0x1,_0x1f8842;_0x182a6a>=0x0;_0x182a6a--)(_0x1f8842=_0x46ab0a[_0x182a6a])&&(_0x4fe326=_0x1f8842(_0x4fe326)||_0x4fe326);return _0x4fe326;},_=(_0x1811fd,_0x10379d)=>(_0x4688b7,_0x35aaef)=>_0x10379d(_0x4688b7,_0x35aaef,_0x1811fd);function Y(_0x18f434,_0x80f676){const _0x4f8b15=_0x367232,_0x49ab0e=_0x18f434[_0x4f8b15(0x1ba)][0x0];return{..._0x80f676,'id':_0x49ab0e[_0x4f8b15(0x170)],'resolved':_0x18f434[_0x4f8b15(0x1ca)]===0x1,'dT':f(_0x49ab0e[_0x4f8b15(0x1e6)]),'personId':_0x49ab0e[_0x4f8b15(0x1cc)],'threadId':_0x49ab0e[_0x4f8b15(0x1ce)]};}function G(_0x2c4374,_0x51abb5,_0xcd3e69){const _0x26b9e7=_0x367232;var _0x11fbc1,_0x4088d1;if(((_0x4088d1=(_0x11fbc1=_0x2c4374==null?void 0x0:_0x2c4374['replies'])==null?void 0x0:_0x11fbc1['length'])!=null?_0x4088d1:0x0)>0x0){const _0x5a8b7b=(_0x3bf35a,_0x22dd5a)=>({'id':_0x3bf35a[_0x26b9e7(0x170)],'threadId':_0x3bf35a[_0x26b9e7(0x1ce)],'dT':f(_0x3bf35a[_0x26b9e7(0x1e6)]),'personId':_0x3bf35a[_0x26b9e7(0x1cc)],'resolved':_0x2c4374['solved']===I[_0x26b9e7(0x1c9)],'unitId':_0x51abb5,'subUnitId':_0xcd3e69,'text':JSON[_0x26b9e7(0x1ac)](_0x3bf35a[_0x26b9e7(0x1c7)]),'parentId':_0x22dd5a}),_0x52b059=_0x5a8b7b(_0x2c4374['replies'][0x0]);return{..._0x52b059,'children':_0x2c4374['replies'][_0x26b9e7(0x198)](0x1)[_0x26b9e7(0x18b)](_0x2eac46=>_0x5a8b7b(_0x2eac46,_0x52b059['id']))};}return null;}let g=class{constructor(_0x34e766,_0x2f96ee,_0x553378,_0x155a29){const _0x241f72=_0x367232;this[_0x241f72(0x1b2)]=_0x34e766,this[_0x241f72(0x186)]=_0x2f96ee,this[_0x241f72(0x1df)]=_0x553378,this['_injector']=_0x155a29;}async[_0x367232(0x1a3)](_0x5564a2){const _0x1a9e03=_0x367232;var _0x1250a5,_0x7bffd4;const {parentId:_0x2daf3d,unitId:_0x1a3909,text:_0x359fcd,threadId:_0x5a5333}=_0x5564a2,_0x2f8a1a=(_0x7bffd4=(_0x1250a5=_0x359fcd[_0x1a9e03(0x1a1)])==null?void 0x0:_0x1250a5[_0x1a9e03(0x1d6)](_0xaa2cc0=>_0xaa2cc0['rangeType']===c[_0x1a9e03(0x19b)][_0x1a9e03(0x1d4)])['map'](_0x3e5099=>_0x3e5099['rangeId']))!=null?_0x7bffd4:[],_0x1c99fa=JSON[_0x1a9e03(0x16d)](_0x359fcd),_0x15a88f=(await this[_0x1a9e03(0x1df)]['requireSession'](_0x1a3909))['getMemberID']();if(_0x2daf3d){const _0x2b9a9e={'memberId':_0x15a88f,'unitId':_0x1a3909,'content':_0x1c99fa,'mention':_0x2f8a1a,'threadId':_0x5a5333},_0x4eaeb3=(await this[_0x1a9e03(0x1b2)][_0x1a9e03(0x179)](_0x1a9e03(0x1e2)+_0x1a3909+_0x1a9e03(0x1c3),{'body':_0x2b9a9e}))[_0x1a9e03(0x1a0)][_0x1a9e03(0x17b)];return{..._0x5564a2,'id':_0x4eaeb3[_0x1a9e03(0x170)],'dT':c[_0x1a9e03(0x1d7)](+_0x4eaeb3['createTimestamp'])[_0x1a9e03(0x1bd)](_0x1a9e03(0x1b1)),'personId':_0x4eaeb3['userId']};}else{const _0x2398c0={'memberId':_0x15a88f,'unitId':_0x1a3909,'content':_0x1c99fa,'mention':_0x2f8a1a},_0x4fe46=await this[_0x1a9e03(0x1b2)][_0x1a9e03(0x179)]('/universer-api/comment/unit/'+_0x1a3909+_0x1a9e03(0x18a),{'body':_0x2398c0});return Y(_0x4fe46[_0x1a9e03(0x1a0)]['comment'],_0x5564a2);}}async[_0x367232(0x1a2)](_0x50b88c){const _0xdaf4bf=_0x367232;var _0x295940,_0x301745;const {text:_0x579139,unitId:_0x2dbaff}=_0x50b88c,_0x3ec79c=(_0x301745=(_0x295940=_0x579139[_0xdaf4bf(0x1a1)])==null?void 0x0:_0x295940[_0xdaf4bf(0x1d6)](_0x59e453=>_0x59e453[_0xdaf4bf(0x19e)]===c[_0xdaf4bf(0x19b)][_0xdaf4bf(0x1d4)])['map'](_0x450c1e=>_0x450c1e['rangeId']))!=null?_0x301745:[],_0x171587=JSON[_0xdaf4bf(0x16d)](_0x579139),_0x2e0ebd=_0x50b88c['threadId'],_0x2139c7=_0x50b88c['id'],_0x294a0d={'memberId':(await this[_0xdaf4bf(0x1df)][_0xdaf4bf(0x178)](_0x2dbaff))[_0xdaf4bf(0x1c6)](),'unitId':_0x2dbaff,'threadId':_0x2e0ebd,'mention':_0x3ec79c,'content':_0x171587,'replyId':_0x2139c7},_0x37ce02=await this['_httpService'][_0xdaf4bf(0x179)](_0xdaf4bf(0x1e2)+_0x2dbaff+_0xdaf4bf(0x197),{'body':_0x294a0d});return!_0x37ce02['body'][_0xdaf4bf(0x193)]||_0x37ce02[_0xdaf4bf(0x1a0)][_0xdaf4bf(0x193)]['code']===0x1;}async[_0x367232(0x17a)](_0x7d1ca8){const _0x29e058=_0x367232,{unitId:_0x23c431}=_0x7d1ca8,_0x307c5e=_0x7d1ca8[_0x29e058(0x1ce)],_0x19eaa3={'memberId':this[_0x29e058(0x186)]['getCurrentUser']()[_0x29e058(0x19d)],'unitId':_0x23c431,'threadId':_0x307c5e,'solved':_0x7d1ca8[_0x29e058(0x185)]?I['Solved']:I[_0x29e058(0x1a8)]},_0x41a8b5=await this[_0x29e058(0x1b2)]['post']('/universer-api/comment/unit/'+_0x23c431+'/solved',{'body':_0x19eaa3});return!_0x41a8b5[_0x29e058(0x1a0)][_0x29e058(0x193)]||_0x41a8b5['body'][_0x29e058(0x193)][_0x29e058(0x18f)]===0x1;}async['deleteComment'](_0x287ca4,_0x27b070,_0x2b611e,_0x44f3a9){const _0x331e72=_0x367232,_0x14fbda={'memberId':(await this[_0x331e72(0x1df)][_0x331e72(0x178)](_0x287ca4))[_0x331e72(0x1c6)](),'threadId':_0x2b611e,'replyId':_0x44f3a9,'unitId':_0x287ca4},_0x219f61=await this[_0x331e72(0x1b2)][_0x331e72(0x179)](_0x331e72(0x1e2)+_0x287ca4+_0x331e72(0x1e3),{'body':_0x14fbda});return!_0x219f61[_0x331e72(0x1a0)]['error']||_0x219f61[_0x331e72(0x1a0)][_0x331e72(0x193)][_0x331e72(0x18f)]===0x1;}async['listComments'](_0x150692,_0x30bd69,_0x53c191){const _0x1e46d4=_0x367232,_0x12cdff={'unitId':_0x150692,'threadId':_0x53c191},_0x4a3321=await this[_0x1e46d4(0x1b2)][_0x1e46d4(0x179)]('/universer-api/comment/unit/'+_0x150692+_0x1e46d4(0x171),{'body':_0x12cdff}),_0x16a2f4=_0x53c191[_0x1e46d4(0x18b)](_0x51ab6d=>G(_0x4a3321['body'][_0x1e46d4(0x174)][_0x51ab6d],_0x150692,_0x30bd69))['filter'](Boolean);return Object[_0x1e46d4(0x1a5)](_0x4a3321[_0x1e46d4(0x1a0)][_0x1e46d4(0x1af)])[_0x1e46d4(0x1cf)](_0x5d6e58=>{const _0x3bd19b=_0x1e46d4;this[_0x3bd19b(0x186)][_0x3bd19b(0x1db)](_0x5d6e58);}),_0x16a2f4;}[_0x367232(0x18c)](_0x4f9dbe){const _0x5b2736=_0x367232;return{'id':_0x4f9dbe['id'],'threadId':_0x4f9dbe['threadId'],'ref':_0x4f9dbe[_0x5b2736(0x1be)]};}};g=x([_(0x0,c[_0x367232(0x173)](P[_0x367232(0x187)])),_(0x1,c[_0x367232(0x173)](c[_0x367232(0x1bc)])),_(0x2,c[_0x367232(0x173)](b[_0x367232(0x1b0)])),_(0x3,c[_0x367232(0x173)](c[_0x367232(0x188)]))],g);var H=Object[_0x367232(0x1d9)],J=(_0x2fc280,_0x261b27,_0x54d2f4,_0x53fcff)=>{const _0x1b746b=_0x367232;for(var _0x280d01=_0x53fcff>0x1?void 0x0:_0x53fcff?H(_0x261b27,_0x54d2f4):_0x261b27,_0x5d46bb=_0x2fc280[_0x1b746b(0x19f)]-0x1,_0x1dc319;_0x5d46bb>=0x0;_0x5d46bb--)(_0x1dc319=_0x2fc280[_0x5d46bb])&&(_0x280d01=_0x1dc319(_0x280d01)||_0x280d01);return _0x280d01;},y=(_0x1d96ae,_0x3a825b)=>(_0x46d80e,_0x27cc00)=>_0x3a825b(_0x46d80e,_0x27cc00,_0x1d96ae);let C=class extends c[_0x367232(0x1ae)]{constructor(_0x5a9de0,_0x3385bd){const _0x55c606=_0x367232;super(),this[_0x55c606(0x189)]=_0x5a9de0,this[_0x55c606(0x19c)]=_0x3385bd,this[_0x55c606(0x177)]();}[_0x367232(0x177)](){const _0x1bde51=_0x367232;this[_0x1bde51(0x189)]['dataSource']=this['_threadCommentDataSource'],this[_0x1bde51(0x189)][_0x1bde51(0x1d2)]=!0x1;}};C=J([y(0x0,M[_0x367232(0x1c4)]),y(0x1,c[_0x367232(0x173)](g))],C);function _0x4df4(_0x3b5c,_0x151c53){const _0x450c85=_0x450c();return _0x4df4=function(_0x4df499,_0x24f296){_0x4df499=_0x4df499-0x169;let _0x45c2d9=_0x450c85[_0x4df499];return _0x45c2d9;},_0x4df4(_0x3b5c,_0x151c53);}var F=Object[_0x367232(0x191)],L=Object['getOwnPropertyDescriptor'],Z=(_0x1e259b,_0xeb17b6,_0x228973)=>_0xeb17b6 in _0x1e259b?F(_0x1e259b,_0xeb17b6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x228973}):_0x1e259b[_0xeb17b6]=_0x228973,W=(_0x5935a5,_0x5059f3,_0x5a8cd1,_0x4d5912)=>{const _0x1d3291=_0x367232;for(var _0x2720c5=_0x4d5912>0x1?void 0x0:_0x4d5912?L(_0x5059f3,_0x5a8cd1):_0x5059f3,_0x270789=_0x5935a5[_0x1d3291(0x19f)]-0x1,_0x23e82d;_0x270789>=0x0;_0x270789--)(_0x23e82d=_0x5935a5[_0x270789])&&(_0x2720c5=_0x23e82d(_0x2720c5)||_0x2720c5);return _0x2720c5;},O=(_0x2d0980,_0x1d1bf5)=>(_0x2e1606,_0x4c8a9d)=>_0x1d1bf5(_0x2e1606,_0x4c8a9d,_0x2d0980),N=(_0x4c539a,_0x438c06,_0x38f44a)=>Z(_0x4c539a,typeof _0x438c06!=_0x367232(0x180)?_0x438c06+'':_0x438c06,_0x38f44a);function _0x450c(){const _0x46f1d2=['@univerjs-pro/collaboration-client','_initDataSource','requireSession','post','resolveComment','reply','5937424SxOccx','_injector','_config','@univerjs/thread-comment','symbol','UniverCollaborationClientPlugin','@univerjs-pro/license','getUser','UNRECOGNIZED','resolved','_userService','HTTPService','Injector','_threadCommentDataSourceService','/add','map','saveCommentToSnapshot','pluginName','UniverThreadCommentUIPlugin','code','payload','defineProperty','rxjs','error','merge','type','3933198ezbhkc','/edit','slice','find','116890diYOvf','CustomRangeType','_threadCommentDataSource','userID','rangeType','length','body','customRanges','updateComment','addComment','setConfig','values','UniverLicensePlugin','pipe','OpenOrReOpen','Solve','12InTdQn','569684WXiHiy','parse','Reply','Disposable','users','CollaborationSessionService','YYYY/MM/DD\x20HH:mm','_httpService','UniverThreadCommentDataSourcePlugin','2uyETmo','2239531KDaknz','deleteComment','/universer-api/user/list','527997ERGHRt','UniverInstanceType','replies','commentUpdate$','UserManagerService','format','ref','get','IConfigService','@univerjs/thread-comment-ui','_configService','/reply','IThreadCommentDataSourceService','user','getMemberID','content','Module','Solved','solved','Edit','userId','Unknown','threadId','forEach','subscribe','Plugin','syncUpdateMutationToColla','getComment','COMMENT','_initUserSync','filter','dayjs','thread-comment-data-source.config','getOwnPropertyDescriptor','add','addUser','_init','275MbHFay','getUnit','_sessionService','Delete','741266feTEPI','/universer-api/comment/unit/','/delete','disposeWithMe','5jaSmib','createTimestamp','root','CommentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Add','stringify','toStringTag','UNIVER_UNKNOWN','replyId','/list','ThreadCommentModel','Inject','comments','_threadCommentModel'];_0x450c=function(){return _0x46f1d2;};return _0x450c();}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x367232(0x1d1)]{constructor(_0x3b7606=D,_0x1152ca,_0x3c736e){const _0x5c9dff=_0x367232;super(),this[_0x5c9dff(0x17e)]=_0x3b7606,this[_0x5c9dff(0x17d)]=_0x1152ca,this[_0x5c9dff(0x1c2)]=_0x3c736e;const {..._0x2a21aa}=c[_0x5c9dff(0x194)]({},D,this[_0x5c9dff(0x17e)]);this['_configService'][_0x5c9dff(0x1a4)](q,_0x2a21aa);}['onStarting'](){const _0x57b935=_0x367232;[[g],[C],[p]][_0x57b935(0x1cf)](_0x43b0d8=>{const _0x497ab3=_0x57b935;this[_0x497ab3(0x17d)][_0x497ab3(0x1da)](_0x43b0d8);});}['onReady'](){const _0x28ec21=_0x367232;this['_injector'][_0x28ec21(0x1bf)](C),this[_0x28ec21(0x17d)]['get'](p);}},N(exports[_0x367232(0x1b3)],_0x367232(0x18d),U),N(exports[_0x367232(0x1b3)],_0x367232(0x195),c[_0x367232(0x1b9)][_0x367232(0x16f)]),exports[_0x367232(0x1b3)]=W([c['DependentOn'](j[_0x367232(0x18e)],b[_0x367232(0x181)],T[_0x367232(0x1a6)]),O(0x1,c[_0x367232(0x173)](c[_0x367232(0x188)])),O(0x2,c[_0x367232(0x1c0)])],exports[_0x367232(0x1b3)]);
1
+ 'use strict';const _0x3478b9=_0x8a9a;(function(_0x3026bd,_0x2c0299){const _0x2f6fb9=_0x8a9a,_0x22065d=_0x3026bd();while(!![]){try{const _0x519c03=parseInt(_0x2f6fb9(0x19e))/0x1*(parseInt(_0x2f6fb9(0x1e9))/0x2)+parseInt(_0x2f6fb9(0x1a8))/0x3+-parseInt(_0x2f6fb9(0x1c5))/0x4*(-parseInt(_0x2f6fb9(0x17b))/0x5)+-parseInt(_0x2f6fb9(0x16e))/0x6+-parseInt(_0x2f6fb9(0x177))/0x7+parseInt(_0x2f6fb9(0x189))/0x8+-parseInt(_0x2f6fb9(0x1c0))/0x9*(-parseInt(_0x2f6fb9(0x1e0))/0xa);if(_0x519c03===_0x2c0299)break;else _0x22065d['push'](_0x22065d['shift']());}catch(_0x3393ee){_0x22065d['push'](_0x22065d['shift']());}}}(_0x8019,0xeda54));Object[_0x3478b9(0x1c4)](exports,Symbol[_0x3478b9(0x1da)],{'value':_0x3478b9(0x1c6)});const b=require(_0x3478b9(0x181)),T=require(_0x3478b9(0x1a2)),c=require(_0x3478b9(0x18f)),j=require(_0x3478b9(0x180)),M=require('@univerjs/thread-comment'),w=require(_0x3478b9(0x182)),P=require(_0x3478b9(0x1b9)),U=_0x3478b9(0x173);var I=(_0x3e63f0=>(_0x3e63f0[_0x3e63f0[_0x3478b9(0x1b7)]=0x0]=_0x3478b9(0x1b7),_0x3e63f0[_0x3e63f0[_0x3478b9(0x196)]=0x1]=_0x3478b9(0x196),_0x3e63f0[_0x3e63f0[_0x3478b9(0x195)]=-0x1]=_0x3478b9(0x195),_0x3e63f0))(I||{}),v=(_0x77330d=>(_0x77330d[_0x77330d[_0x3478b9(0x1df)]=0x0]=_0x3478b9(0x1df),_0x77330d[_0x77330d[_0x3478b9(0x170)]=0x1]='Add',_0x77330d[_0x77330d[_0x3478b9(0x1c7)]=0x2]=_0x3478b9(0x1c7),_0x77330d[_0x77330d[_0x3478b9(0x1d8)]=0x3]=_0x3478b9(0x1d8),_0x77330d[_0x77330d[_0x3478b9(0x1ce)]=0x4]=_0x3478b9(0x1ce),_0x77330d[_0x77330d[_0x3478b9(0x1a9)]=0x5]=_0x3478b9(0x1a9),_0x77330d[_0x77330d[_0x3478b9(0x195)]=-0x1]=_0x3478b9(0x195),_0x77330d))(v||{});const f=_0x22b919=>c[_0x3478b9(0x1bf)](new Date(+_0x22b919))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x5e324d,_0x212912)=>{const _0x46950a=_0x3478b9,_0x11149c=_0x5e324d[_0x46950a(0x187)](c['UserManagerService']),_0x4c1a9a=_0x5e324d[_0x46950a(0x187)](P[_0x46950a(0x19d)]);_0x212912[_0x46950a(0x174)](_0x35e1a7=>{const _0x51e679=_0x46950a;_0x11149c[_0x51e679(0x1d4)](_0x35e1a7)&&_0x212912[_0x51e679(0x1e4)](_0x35e1a7);}),_0x212912[_0x46950a(0x1b3)]&&(await _0x4c1a9a['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x212912]}}))[_0x46950a(0x1ad)][_0x46950a(0x16f)][_0x46950a(0x174)](_0xc21689=>{_0xc21689&&_0x11149c['addUser'](_0xc21689);});};function _0x8a9a(_0x44ef8c,_0x3bf356){const _0x80190=_0x8019();return _0x8a9a=function(_0x8a9aa1,_0x343b89){_0x8a9aa1=_0x8a9aa1-0x16d;let _0x29c6a9=_0x80190[_0x8a9aa1];return _0x29c6a9;},_0x8a9a(_0x44ef8c,_0x3bf356);}var $=Object[_0x3478b9(0x1af)],E=(_0x28f6d7,_0x513959,_0x1c2a4a,_0x967956)=>{for(var _0x23e45f=_0x967956>0x1?void 0x0:_0x967956?$(_0x513959,_0x1c2a4a):_0x513959,_0x3b8993=_0x28f6d7['length']-0x1,_0x3e223e;_0x3b8993>=0x0;_0x3b8993--)(_0x3e223e=_0x28f6d7[_0x3b8993])&&(_0x23e45f=_0x3e223e(_0x23e45f)||_0x23e45f);return _0x23e45f;},S=(_0x1c8fe5,_0x593feb)=>(_0x87453e,_0x399d94)=>_0x593feb(_0x87453e,_0x399d94,_0x1c8fe5);let p=class extends c[_0x3478b9(0x191)]{constructor(_0x219c72,_0x2f5baf,_0x5ee0df,_0x5c76c7){const _0x23f1a7=_0x3478b9;super(),this[_0x23f1a7(0x1cd)]=_0x219c72,this['_threadCommentModel']=_0x2f5baf,this[_0x23f1a7(0x1a1)]=_0x5ee0df,this[_0x23f1a7(0x1ba)]=_0x5c76c7,this[_0x23f1a7(0x18e)](),this['_initUserSync']();}[_0x3478b9(0x1d7)](){const _0x2aca22=_0x3478b9;this['disposeWithMe'](this[_0x2aca22(0x1e5)][_0x2aca22(0x188)][_0x2aca22(0x1e1)](w[_0x2aca22(0x1ae)](0x10))['subscribe'](_0x5bae9e=>{const _0x2bbddc=_0x2aca22,_0x2ad42=new Set();_0x5bae9e['forEach'](_0x5e232b=>{const _0x149ecf=_0x8a9a;switch(_0x5e232b[_0x149ecf(0x178)]){case'add':{const _0x4eb01e=_0x5e232b['payload']['personId'];_0x2ad42[_0x149ecf(0x179)](_0x4eb01e);break;}}}),R(this[_0x2bbddc(0x1ba)],_0x2ad42);}));}[_0x3478b9(0x18e)](){const _0x2ba9d8=_0x3478b9;this[_0x2ba9d8(0x1ed)](this[_0x2ba9d8(0x1cd)][_0x2ba9d8(0x188)][_0x2ba9d8(0x199)](async _0x2b0d89=>{const _0x5cd72f=_0x2ba9d8;var _0x3a4ce5,_0x58837e,_0x32db6b,_0x4a7949;const _0x58869b=(_0x3a4ce5=this[_0x5cd72f(0x1e5)][_0x5cd72f(0x1b5)](_0x2b0d89[_0x5cd72f(0x1ca)])[_0x5cd72f(0x1dd)](_0x4a65a0=>_0x4a65a0[_0x5cd72f(0x184)]===_0x2b0d89['threadId']))==null?void 0x0:_0x3a4ce5[_0x5cd72f(0x18d)];if(!_0x58869b)return;const {unitId:_0x342ef4,subUnitId:_0xdc78a9}=_0x58869b;switch(_0x2b0d89['user']&&this['_userService'][_0x5cd72f(0x175)](_0x2b0d89[_0x5cd72f(0x1db)]),_0x2b0d89[_0x5cd72f(0x178)]){case v[_0x5cd72f(0x170)]:break;case v[_0x5cd72f(0x1c7)]:{this[_0x5cd72f(0x1e5)][_0x5cd72f(0x1c8)](_0x342ef4,_0xdc78a9,{'unitId':_0x342ef4,'subUnitId':_0xdc78a9,'ref':'','id':_0x2b0d89[_0x5cd72f(0x171)],'dT':f(+_0x2b0d89[_0x5cd72f(0x1aa)]),'threadId':_0x2b0d89[_0x5cd72f(0x184)],'personId':(_0x32db6b=(_0x58837e=_0x2b0d89[_0x5cd72f(0x1db)])==null?void 0x0:_0x58837e[_0x5cd72f(0x1e8)])!=null?_0x32db6b:_0x2b0d89[_0x5cd72f(0x1d1)],'text':JSON[_0x5cd72f(0x1eb)](_0x2b0d89[_0x5cd72f(0x176)]),'parentId':_0x58869b['id']});break;}case v[_0x5cd72f(0x1ce)]:{const _0x2d85f3=this[_0x5cd72f(0x1e5)][_0x5cd72f(0x1cb)](_0x342ef4,_0xdc78a9,_0x2b0d89[_0x5cd72f(0x171)]);_0x2d85f3&&_0x2d85f3[_0x5cd72f(0x16d)]&&this[_0x5cd72f(0x1e5)]['deleteComment'](_0x342ef4,_0xdc78a9,_0x2b0d89[_0x5cd72f(0x171)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x5cd72f(0x1d9)](_0x342ef4,_0xdc78a9,{'commentId':_0x2b0d89[_0x5cd72f(0x171)],'text':JSON[_0x5cd72f(0x1eb)](_0x2b0d89[_0x5cd72f(0x176)])});break;}case v[_0x5cd72f(0x1a9)]:{const _0x36b727=(_0x4a7949=this[_0x5cd72f(0x1e5)][_0x5cd72f(0x1b5)](_0x2b0d89[_0x5cd72f(0x1ca)])[_0x5cd72f(0x1dd)](_0x518ddd=>_0x518ddd['threadId']===_0x2b0d89[_0x5cd72f(0x184)]))==null?void 0x0:_0x4a7949[_0x5cd72f(0x18d)];_0x36b727&&this[_0x5cd72f(0x1e5)][_0x5cd72f(0x1d2)](_0x342ef4,_0xdc78a9,_0x36b727['id'],_0x2b0d89[_0x5cd72f(0x1c9)]===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x3478b9(0x1e7)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x3478b9(0x1b0)])),S(0x3,c[_0x3478b9(0x1a5)](c[_0x3478b9(0x1ec)]))],p);const q=_0x3478b9(0x1de),D={};var A=Object[_0x3478b9(0x1af)],x=(_0x520a53,_0x3a7bce,_0x30f83e,_0xc4fed1)=>{const _0x5340e5=_0x3478b9;for(var _0x59ba07=_0xc4fed1>0x1?void 0x0:_0xc4fed1?A(_0x3a7bce,_0x30f83e):_0x3a7bce,_0x39e542=_0x520a53[_0x5340e5(0x1a4)]-0x1,_0x4807e3;_0x39e542>=0x0;_0x39e542--)(_0x4807e3=_0x520a53[_0x39e542])&&(_0x59ba07=_0x4807e3(_0x59ba07)||_0x59ba07);return _0x59ba07;},_=(_0x3e01a0,_0x5b6758)=>(_0x255259,_0x3fb10a)=>_0x5b6758(_0x255259,_0x3fb10a,_0x3e01a0);function Y(_0x101e64,_0x22d75c){const _0x489838=_0x3478b9,_0x4309f7=_0x101e64[_0x489838(0x1be)][0x0];return{..._0x22d75c,'id':_0x4309f7[_0x489838(0x171)],'resolved':_0x101e64[_0x489838(0x1c9)]===0x1,'dT':f(_0x4309f7['createTimestamp']),'personId':_0x4309f7[_0x489838(0x1d1)],'threadId':_0x4309f7['threadId']};}function G(_0x20605d,_0x44c58b,_0x1587ae){const _0x4cd102=_0x3478b9;var _0x2d0568,_0x285bd8;if(((_0x285bd8=(_0x2d0568=_0x20605d==null?void 0x0:_0x20605d[_0x4cd102(0x1be)])==null?void 0x0:_0x2d0568[_0x4cd102(0x1a4)])!=null?_0x285bd8:0x0)>0x0){const _0x224fcc=(_0x4c77d0,_0x41d7ca)=>({'id':_0x4c77d0['replyId'],'threadId':_0x4c77d0[_0x4cd102(0x184)],'dT':f(_0x4c77d0['createTimestamp']),'personId':_0x4c77d0['userId'],'resolved':_0x20605d[_0x4cd102(0x1c9)]===I['Solved'],'unitId':_0x44c58b,'subUnitId':_0x1587ae,'text':JSON[_0x4cd102(0x1eb)](_0x4c77d0[_0x4cd102(0x176)]),'parentId':_0x41d7ca}),_0x4072be=_0x224fcc(_0x20605d['replies'][0x0]);return{..._0x4072be,'children':_0x20605d[_0x4cd102(0x1be)][_0x4cd102(0x1d0)](0x1)[_0x4cd102(0x1bc)](_0x4f7233=>_0x224fcc(_0x4f7233,_0x4072be['id']))};}return null;}let g=class{constructor(_0x1da2e6,_0x6aed5c,_0x312703,_0x3024c9){const _0x411eef=_0x3478b9;this['_httpService']=_0x1da2e6,this[_0x411eef(0x1a1)]=_0x6aed5c,this[_0x411eef(0x193)]=_0x312703,this[_0x411eef(0x1ba)]=_0x3024c9;}async['addComment'](_0x1d04d9){const _0x1a40a1=_0x3478b9;var _0x1973f2,_0xab018b;const {parentId:_0x3847fc,unitId:_0x5c7a54,text:_0x4b6991,threadId:_0x1b451a}=_0x1d04d9,_0x13b4d9=(_0xab018b=(_0x1973f2=_0x4b6991[_0x1a40a1(0x197)])==null?void 0x0:_0x1973f2['filter'](_0xdedc67=>_0xdedc67['rangeType']===c['CustomRangeType']['COMMENT'])[_0x1a40a1(0x1bc)](_0x3d6d9f=>_0x3d6d9f[_0x1a40a1(0x1e2)]))!=null?_0xab018b:[],_0x5b06aa=JSON[_0x1a40a1(0x1b1)](_0x4b6991),_0x1995b4=(await this[_0x1a40a1(0x193)][_0x1a40a1(0x1ee)](_0x5c7a54))[_0x1a40a1(0x18a)]();if(_0x3847fc){const _0x7c5c49={'memberId':_0x1995b4,'unitId':_0x5c7a54,'content':_0x5b06aa,'mention':_0x13b4d9,'threadId':_0x1b451a},_0x34c41=(await this[_0x1a40a1(0x19c)]['post'](_0x1a40a1(0x1b6)+_0x5c7a54+_0x1a40a1(0x1e6),{'body':_0x7c5c49}))['body'][_0x1a40a1(0x1dc)];return{..._0x1d04d9,'id':_0x34c41[_0x1a40a1(0x171)],'dT':c['dayjs'](+_0x34c41[_0x1a40a1(0x1aa)])[_0x1a40a1(0x17c)](_0x1a40a1(0x1a6)),'personId':_0x34c41[_0x1a40a1(0x1d1)]};}else{const _0x229c8b={'memberId':_0x1995b4,'unitId':_0x5c7a54,'content':_0x5b06aa,'mention':_0x13b4d9},_0x5106f3=await this[_0x1a40a1(0x19c)]['post'](_0x1a40a1(0x1b6)+_0x5c7a54+_0x1a40a1(0x1a0),{'body':_0x229c8b});return Y(_0x5106f3['body'][_0x1a40a1(0x183)],_0x1d04d9);}}async[_0x3478b9(0x1d9)](_0x171701){const _0x14f089=_0x3478b9;var _0x8255a9,_0x4d56aa;const {text:_0x2d4071,unitId:_0x319084}=_0x171701,_0x69e51=(_0x4d56aa=(_0x8255a9=_0x2d4071[_0x14f089(0x197)])==null?void 0x0:_0x8255a9[_0x14f089(0x19f)](_0xad042d=>_0xad042d[_0x14f089(0x1b2)]===c[_0x14f089(0x185)][_0x14f089(0x18c)])[_0x14f089(0x1bc)](_0x259494=>_0x259494[_0x14f089(0x1e2)]))!=null?_0x4d56aa:[],_0x5f14d8=JSON[_0x14f089(0x1b1)](_0x2d4071),_0x5a8c7b=_0x171701[_0x14f089(0x184)],_0xd90b3b=_0x171701['id'],_0x40720c={'memberId':(await this[_0x14f089(0x193)][_0x14f089(0x1ee)](_0x319084))[_0x14f089(0x18a)](),'unitId':_0x319084,'threadId':_0x5a8c7b,'mention':_0x69e51,'content':_0x5f14d8,'replyId':_0xd90b3b},_0x293620=await this[_0x14f089(0x19c)]['post']('/universer-api/comment/unit/'+_0x319084+_0x14f089(0x17a),{'body':_0x40720c});return!_0x293620[_0x14f089(0x1ad)][_0x14f089(0x186)]||_0x293620[_0x14f089(0x1ad)][_0x14f089(0x186)]['code']===0x1;}async[_0x3478b9(0x1d2)](_0x439c61){const _0x5f0e67=_0x3478b9,{unitId:_0x30ee71}=_0x439c61,_0x1aef72=_0x439c61['threadId'],_0x2ea9cc={'memberId':this[_0x5f0e67(0x1a1)][_0x5f0e67(0x1ea)]()[_0x5f0e67(0x1e8)],'unitId':_0x30ee71,'threadId':_0x1aef72,'solved':_0x439c61[_0x5f0e67(0x18b)]?I[_0x5f0e67(0x196)]:I['OpenOrReOpen']},_0x5c0660=await this[_0x5f0e67(0x19c)][_0x5f0e67(0x1cf)](_0x5f0e67(0x1b6)+_0x30ee71+_0x5f0e67(0x1c2),{'body':_0x2ea9cc});return!_0x5c0660[_0x5f0e67(0x1ad)][_0x5f0e67(0x186)]||_0x5c0660[_0x5f0e67(0x1ad)]['error'][_0x5f0e67(0x198)]===0x1;}async[_0x3478b9(0x172)](_0x2f859a,_0x20b005,_0x46f82b,_0x185c92){const _0x29b07e=_0x3478b9,_0x509235={'memberId':(await this[_0x29b07e(0x193)][_0x29b07e(0x1ee)](_0x2f859a))[_0x29b07e(0x18a)](),'threadId':_0x46f82b,'replyId':_0x185c92,'unitId':_0x2f859a},_0xe2246e=await this[_0x29b07e(0x19c)][_0x29b07e(0x1cf)](_0x29b07e(0x1b6)+_0x2f859a+'/delete',{'body':_0x509235});return!_0xe2246e[_0x29b07e(0x1ad)][_0x29b07e(0x186)]||_0xe2246e[_0x29b07e(0x1ad)][_0x29b07e(0x186)]['code']===0x1;}async[_0x3478b9(0x1b8)](_0x1b367b,_0xc129c,_0x2c3f8e){const _0x37e4dd=_0x3478b9,_0x3d76bf={'unitId':_0x1b367b,'threadId':_0x2c3f8e},_0x270cf5=await this[_0x37e4dd(0x19c)][_0x37e4dd(0x1cf)](_0x37e4dd(0x1b6)+_0x1b367b+_0x37e4dd(0x190),{'body':_0x3d76bf}),_0x4a63da=_0x2c3f8e[_0x37e4dd(0x1bc)](_0x46c9f1=>G(_0x270cf5[_0x37e4dd(0x1ad)][_0x37e4dd(0x17f)][_0x46c9f1],_0x1b367b,_0xc129c))[_0x37e4dd(0x19f)](Boolean);return Object[_0x37e4dd(0x1ab)](_0x270cf5['body'][_0x37e4dd(0x16f)])[_0x37e4dd(0x174)](_0x54dad1=>{this['_userService']['addUser'](_0x54dad1);}),_0x4a63da;}['saveCommentToSnapshot'](_0x4f45da){return{'id':_0x4f45da['id'],'threadId':_0x4f45da['threadId'],'ref':_0x4f45da['ref']};}};g=x([_(0x0,c[_0x3478b9(0x1a5)](P[_0x3478b9(0x19d)])),_(0x1,c['Inject'](c[_0x3478b9(0x1b0)])),_(0x2,c['Inject'](b['CollaborationSessionService'])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x3478b9(0x1af)],J=(_0x30d4c2,_0x46ca5e,_0x3304e1,_0x216738)=>{const _0x8b33d1=_0x3478b9;for(var _0x198de7=_0x216738>0x1?void 0x0:_0x216738?H(_0x46ca5e,_0x3304e1):_0x46ca5e,_0x3d3999=_0x30d4c2[_0x8b33d1(0x1a4)]-0x1,_0x5af5a4;_0x3d3999>=0x0;_0x3d3999--)(_0x5af5a4=_0x30d4c2[_0x3d3999])&&(_0x198de7=_0x5af5a4(_0x198de7)||_0x198de7);return _0x198de7;},y=(_0x4d3b17,_0x1cd678)=>(_0x424b9e,_0x8348d2)=>_0x1cd678(_0x424b9e,_0x8348d2,_0x4d3b17);function _0x8019(){const _0x3a62e3=['UniverLicensePlugin','getUser','_threadCommentDataSourceService','_threadCommentDataSource','_initUserSync','Edit','updateComment','toStringTag','user','reply','find','thread-comment-data-source.config','Unknown','10149860tixchb','pipe','rangeId','DependentOn','delete','_threadCommentModel','/reply','CommentService','userID','13142QPDItm','getCurrentUser','parse','Injector','disposeWithMe','requireSession','parentId','3301836VgzCpZ','users','Add','replyId','deleteComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','forEach','addUser','content','11549881UwjOGM','type','add','/edit','3394355ulKFEG','format','IConfigService','UniverThreadCommentDataSourcePlugin','comments','@univerjs/thread-comment-ui','@univerjs-pro/collaboration-client','rxjs','comment','threadId','CustomRangeType','error','get','commentUpdate$','1786576OQErKl','getMemberID','resolved','COMMENT','root','_init','@univerjs/core','/list','Disposable','_configService','_sessionService','pluginName','UNRECOGNIZED','Solved','customRanges','code','subscribe','_initDataSource','setConfig','_httpService','HTTPService','33NxFBtg','filter','/add','_userService','@univerjs-pro/license','syncUpdateMutationToColla','length','Inject','YYYY/MM/DD\x20HH:mm','IThreadCommentDataSourceService','1082376eOUWzV','Solve','createTimestamp','values','_config','body','bufferTime','getOwnPropertyDescriptor','UserManagerService','stringify','rangeType','size','UniverInstanceType','getUnit','/universer-api/comment/unit/','OpenOrReOpen','listComments','@univerjs/network','_injector','symbol','map','dataSource','replies','dayjs','9VGeNMS','onReady','/solved','Plugin','defineProperty','8IRBGAB','Module','Reply','addComment','solved','unitId','getComment','UniverThreadCommentUIPlugin','_commentService','Delete','post','slice','userId','resolveComment'];_0x8019=function(){return _0x3a62e3;};return _0x8019();}let C=class extends c['Disposable']{constructor(_0x42036c,_0xb26637){const _0x4e25b5=_0x3478b9;super(),this[_0x4e25b5(0x1d5)]=_0x42036c,this[_0x4e25b5(0x1d6)]=_0xb26637,this[_0x4e25b5(0x19a)]();}[_0x3478b9(0x19a)](){const _0x3f58db=_0x3478b9;this[_0x3f58db(0x1d5)][_0x3f58db(0x1bd)]=this[_0x3f58db(0x1d6)],this['_threadCommentDataSourceService'][_0x3f58db(0x1a3)]=!0x1;}};C=J([y(0x0,M[_0x3478b9(0x1a7)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x3478b9(0x1c4)],L=Object[_0x3478b9(0x1af)],Z=(_0x43c548,_0x4c4da7,_0x54fbbc)=>_0x4c4da7 in _0x43c548?F(_0x43c548,_0x4c4da7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x54fbbc}):_0x43c548[_0x4c4da7]=_0x54fbbc,W=(_0x1d6222,_0x54214a,_0x33270a,_0x32b8e3)=>{const _0x12998d=_0x3478b9;for(var _0x5d20a5=_0x32b8e3>0x1?void 0x0:_0x32b8e3?L(_0x54214a,_0x33270a):_0x54214a,_0x30c3c8=_0x1d6222[_0x12998d(0x1a4)]-0x1,_0x27db2f;_0x30c3c8>=0x0;_0x30c3c8--)(_0x27db2f=_0x1d6222[_0x30c3c8])&&(_0x5d20a5=_0x27db2f(_0x5d20a5)||_0x5d20a5);return _0x5d20a5;},O=(_0x471d1d,_0x26747c)=>(_0xa26d93,_0xc6f820)=>_0x26747c(_0xa26d93,_0xc6f820,_0x471d1d),N=(_0xef5320,_0x31402a,_0x4bb0f3)=>Z(_0xef5320,typeof _0x31402a!=_0x3478b9(0x1bb)?_0x31402a+'':_0x31402a,_0x4bb0f3);exports[_0x3478b9(0x17e)]=class extends c[_0x3478b9(0x1c3)]{constructor(_0xbbe300=D,_0x8b2d1b,_0x2942c1){const _0x30fd2b=_0x3478b9;super(),this['_config']=_0xbbe300,this[_0x30fd2b(0x1ba)]=_0x8b2d1b,this[_0x30fd2b(0x192)]=_0x2942c1;const {..._0x320289}=c['merge']({},D,this[_0x30fd2b(0x1ac)]);this[_0x30fd2b(0x192)][_0x30fd2b(0x19b)](q,_0x320289);}['onStarting'](){const _0x40c44d=_0x3478b9;[[g],[C],[p]][_0x40c44d(0x174)](_0x4231a1=>{const _0x2c1154=_0x40c44d;this[_0x2c1154(0x1ba)][_0x2c1154(0x179)](_0x4231a1);});}[_0x3478b9(0x1c1)](){const _0x11b83b=_0x3478b9;this[_0x11b83b(0x1ba)][_0x11b83b(0x187)](C),this[_0x11b83b(0x1ba)]['get'](p);}},N(exports[_0x3478b9(0x17e)],_0x3478b9(0x194),U),N(exports[_0x3478b9(0x17e)],_0x3478b9(0x178),c[_0x3478b9(0x1b4)]['UNIVER_UNKNOWN']),exports[_0x3478b9(0x17e)]=W([c[_0x3478b9(0x1e3)](j[_0x3478b9(0x1cc)],b['UniverCollaborationClientPlugin'],T[_0x3478b9(0x1d3)]),O(0x1,c[_0x3478b9(0x1a5)](c[_0x3478b9(0x1ec)])),O(0x2,c[_0x3478b9(0x17d)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x14e8f6=_0x31ff;(function(_0x2481d2,_0x5e0d93){const _0x474d7a=_0x31ff,_0x45e3ad=_0x2481d2();while(!![]){try{const _0x759750=-parseInt(_0x474d7a(0xcc))/0x1*(-parseInt(_0x474d7a(0x118))/0x2)+parseInt(_0x474d7a(0xe9))/0x3*(parseInt(_0x474d7a(0x115))/0x4)+-parseInt(_0x474d7a(0x111))/0x5*(-parseInt(_0x474d7a(0x107))/0x6)+parseInt(_0x474d7a(0xd4))/0x7+parseInt(_0x474d7a(0xf2))/0x8+-parseInt(_0x474d7a(0x123))/0x9+parseInt(_0x474d7a(0xc5))/0xa*(-parseInt(_0x474d7a(0xf4))/0xb);if(_0x759750===_0x5e0d93)break;else _0x45e3ad['push'](_0x45e3ad['shift']());}catch(_0x3b2381){_0x45e3ad['push'](_0x45e3ad['shift']());}}}(_0x2411,0x2c294));import{CommentService as _0x6346bf,CollaborationSessionService as _0x6db0c8,UniverCollaborationClientPlugin as _0x281d67}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2fa253}from'@univerjs-pro/license';import{dayjs as _0x47e258,UserManagerService as _0x44233a,Inject as _0x59bc1b,Injector as _0x5ee519,Disposable as _0x4a90c9,CustomRangeType as _0x3d1118,UniverInstanceType as _0x454a2c,DependentOn as _0x4be0bf,IConfigService as _0x38206b,Plugin as _0x41398f,merge as _0xdfd847}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xce439}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x23d8a0,IThreadCommentDataSourceService as _0x1f38fa}from'@univerjs/thread-comment';function _0x31ff(_0x2aeb82,_0xbec4c){const _0x2411a4=_0x2411();return _0x31ff=function(_0x31ffb0,_0x2e9983){_0x31ffb0=_0x31ffb0-0xbe;let _0x595ea8=_0x2411a4[_0x31ffb0];return _0x595ea8;},_0x31ff(_0x2aeb82,_0xbec4c);}import{bufferTime as _0x390860}from'rxjs';import{HTTPService as _0x5ae147}from'@univerjs/network';const W=_0x14e8f6(0xee);var I=(_0x541df3=>(_0x541df3[_0x541df3['OpenOrReOpen']=0x0]=_0x14e8f6(0xe3),_0x541df3[_0x541df3[_0x14e8f6(0x104)]=0x1]=_0x14e8f6(0x104),_0x541df3[_0x541df3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x541df3))(I||{}),v=(_0x189f28=>(_0x189f28[_0x189f28[_0x14e8f6(0xf3)]=0x0]=_0x14e8f6(0xf3),_0x189f28[_0x189f28['Add']=0x1]=_0x14e8f6(0xcf),_0x189f28[_0x189f28[_0x14e8f6(0x101)]=0x2]=_0x14e8f6(0x101),_0x189f28[_0x189f28['Edit']=0x3]=_0x14e8f6(0xc1),_0x189f28[_0x189f28[_0x14e8f6(0xfd)]=0x4]=_0x14e8f6(0xfd),_0x189f28[_0x189f28[_0x14e8f6(0xbf)]=0x5]=_0x14e8f6(0xbf),_0x189f28[_0x189f28[_0x14e8f6(0xdd)]=-0x1]=_0x14e8f6(0xdd),_0x189f28))(v||{});const D=_0x5ce6cd=>_0x47e258(new Date(+_0x5ce6cd))[_0x14e8f6(0x109)](_0x14e8f6(0x119)),B=async(_0x1f5dc3,_0x59284a)=>{const _0x3f6c43=_0x14e8f6,_0x19e75=_0x1f5dc3[_0x3f6c43(0xd7)](_0x44233a),_0x4804f3=_0x1f5dc3[_0x3f6c43(0xd7)](_0x5ae147);_0x59284a[_0x3f6c43(0xc4)](_0x5d03ee=>{const _0x417b0c=_0x3f6c43;_0x19e75['getUser'](_0x5d03ee)&&_0x59284a[_0x417b0c(0xd2)](_0x5d03ee);}),_0x59284a[_0x3f6c43(0xd8)]&&(await _0x4804f3[_0x3f6c43(0xd7)](_0x3f6c43(0x116),{'params':{'userIDs':[..._0x59284a]}}))['body'][_0x3f6c43(0xe8)][_0x3f6c43(0xc4)](_0x1c410a=>{const _0x55bced=_0x3f6c43;_0x1c410a&&_0x19e75[_0x55bced(0xff)](_0x1c410a);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x27fa48,_0x26bbfa,_0x68ac5e,_0x726e5a)=>{const _0x3e9f77=_0x14e8f6;for(var _0x233cf1=_0x726e5a>0x1?void 0x0:_0x726e5a?K(_0x26bbfa,_0x68ac5e):_0x26bbfa,_0x1bc118=_0x27fa48[_0x3e9f77(0xd6)]-0x1,_0xd74061;_0x1bc118>=0x0;_0x1bc118--)(_0xd74061=_0x27fa48[_0x1bc118])&&(_0x233cf1=_0xd74061(_0x233cf1)||_0x233cf1);return _0x233cf1;},p=(_0x439f04,_0x4a7d14)=>(_0x5509cd,_0xfd9dc8)=>_0x4a7d14(_0x5509cd,_0xfd9dc8,_0x439f04);let S=class extends _0x4a90c9{constructor(_0x42cbd0,_0x24ed3d,_0x5ce4e4,_0x2e3f9f){const _0x1dd1ff=_0x14e8f6;super(),this[_0x1dd1ff(0xc9)]=_0x42cbd0,this['_threadCommentModel']=_0x24ed3d,this['_userService']=_0x5ce4e4,this[_0x1dd1ff(0xef)]=_0x2e3f9f,this[_0x1dd1ff(0xf5)](),this[_0x1dd1ff(0x11d)]();}['_initUserSync'](){const _0xa92790=_0x14e8f6;this['disposeWithMe'](this[_0xa92790(0x126)][_0xa92790(0xf8)][_0xa92790(0xf1)](_0x390860(0x10))[_0xa92790(0xe1)](_0x50acd0=>{const _0xd46a63=_0xa92790,_0x341e26=new Set();_0x50acd0[_0xd46a63(0xc4)](_0x217e8d=>{const _0x40f8ae=_0xd46a63;switch(_0x217e8d[_0x40f8ae(0xca)]){case _0x40f8ae(0xc2):{const _0x41827d=_0x217e8d[_0x40f8ae(0xdc)][_0x40f8ae(0xeb)];_0x341e26[_0x40f8ae(0xc2)](_0x41827d);break;}}}),B(this[_0xd46a63(0xef)],_0x341e26);}));}[_0x14e8f6(0xf5)](){const _0x38fe3f=_0x14e8f6;this[_0x38fe3f(0x103)](this[_0x38fe3f(0xc9)][_0x38fe3f(0xf8)][_0x38fe3f(0xe1)](async _0x4fd38f=>{const _0x2afcbc=_0x38fe3f;var _0x4fa83d,_0x26eeb6,_0x2aa72e,_0x354d6d;const _0x601859=(_0x4fa83d=this[_0x2afcbc(0x126)][_0x2afcbc(0xdb)](_0x4fd38f[_0x2afcbc(0x117)])['find'](_0x446e5d=>_0x446e5d[_0x2afcbc(0x10e)]===_0x4fd38f[_0x2afcbc(0x10e)]))==null?void 0x0:_0x4fa83d[_0x2afcbc(0xd9)];if(!_0x601859)return;const {unitId:_0x221cd1,subUnitId:_0xee5ada}=_0x601859;switch(_0x4fd38f[_0x2afcbc(0x113)]&&this[_0x2afcbc(0x122)]['addUser'](_0x4fd38f['user']),_0x4fd38f[_0x2afcbc(0xca)]){case v['Add']:break;case v[_0x2afcbc(0x101)]:{this[_0x2afcbc(0x126)][_0x2afcbc(0x128)](_0x221cd1,_0xee5ada,{'unitId':_0x221cd1,'subUnitId':_0xee5ada,'ref':'','id':_0x4fd38f[_0x2afcbc(0xd3)],'dT':D(+_0x4fd38f['createTimestamp']),'threadId':_0x4fd38f[_0x2afcbc(0x10e)],'personId':(_0x2aa72e=(_0x26eeb6=_0x4fd38f[_0x2afcbc(0x113)])==null?void 0x0:_0x26eeb6['userID'])!=null?_0x2aa72e:_0x4fd38f[_0x2afcbc(0xcd)],'text':JSON[_0x2afcbc(0xed)](_0x4fd38f[_0x2afcbc(0xfb)]),'parentId':_0x601859['id']});break;}case v['Delete']:{const _0x318e51=this['_threadCommentModel']['getComment'](_0x221cd1,_0xee5ada,_0x4fd38f['replyId']);_0x318e51&&_0x318e51[_0x2afcbc(0x10c)]&&this[_0x2afcbc(0x126)][_0x2afcbc(0xe2)](_0x221cd1,_0xee5ada,_0x4fd38f[_0x2afcbc(0xd3)]);break;}case v[_0x2afcbc(0xc1)]:{this[_0x2afcbc(0x126)][_0x2afcbc(0xbe)](_0x221cd1,_0xee5ada,{'commentId':_0x4fd38f[_0x2afcbc(0xd3)],'text':JSON[_0x2afcbc(0xed)](_0x4fd38f['content'])});break;}case v[_0x2afcbc(0xbf)]:{const _0x458ba9=(_0x354d6d=this[_0x2afcbc(0x126)][_0x2afcbc(0xdb)](_0x4fd38f[_0x2afcbc(0x117)])[_0x2afcbc(0xd1)](_0x2d0026=>_0x2d0026['threadId']===_0x4fd38f['threadId']))==null?void 0x0:_0x354d6d[_0x2afcbc(0xd9)];_0x458ba9&&this[_0x2afcbc(0x126)][_0x2afcbc(0xc8)](_0x221cd1,_0xee5ada,_0x458ba9['id'],_0x4fd38f[_0x2afcbc(0xcb)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x59bc1b(_0x6346bf)),p(0x1,_0x59bc1b(_0x23d8a0)),p(0x2,_0x59bc1b(_0x44233a)),p(0x3,_0x59bc1b(_0x5ee519))],S);const z=_0x14e8f6(0xe0),M={};var k=Object[_0x14e8f6(0x10b)],Q=(_0x20ed71,_0x572fad,_0x49abcf,_0x3f6fbc)=>{for(var _0x13b9c8=_0x3f6fbc>0x1?void 0x0:_0x3f6fbc?k(_0x572fad,_0x49abcf):_0x572fad,_0x31dcc7=_0x20ed71['length']-0x1,_0x1bb3d6;_0x31dcc7>=0x0;_0x31dcc7--)(_0x1bb3d6=_0x20ed71[_0x31dcc7])&&(_0x13b9c8=_0x1bb3d6(_0x13b9c8)||_0x13b9c8);return _0x13b9c8;},_=(_0x3aced9,_0x2dc6c8)=>(_0x408e82,_0x1093c6)=>_0x2dc6c8(_0x408e82,_0x1093c6,_0x3aced9);function X(_0xe2cbb8,_0x14addc){const _0x427158=_0x14e8f6,_0x1c3b6b=_0xe2cbb8[_0x427158(0xf7)][0x0];return{..._0x14addc,'id':_0x1c3b6b[_0x427158(0xd3)],'resolved':_0xe2cbb8[_0x427158(0xcb)]===0x1,'dT':D(_0x1c3b6b[_0x427158(0x102)]),'personId':_0x1c3b6b[_0x427158(0xcd)],'threadId':_0x1c3b6b[_0x427158(0x10e)]};}function ee(_0x305687,_0x5ea6ba,_0x29aff7){const _0x9554fe=_0x14e8f6;var _0x110feb,_0x22a35e;if(((_0x22a35e=(_0x110feb=_0x305687==null?void 0x0:_0x305687['replies'])==null?void 0x0:_0x110feb[_0x9554fe(0xd6)])!=null?_0x22a35e:0x0)>0x0){const _0xc2ce31=(_0x4cb2dd,_0x3995bb)=>({'id':_0x4cb2dd['replyId'],'threadId':_0x4cb2dd[_0x9554fe(0x10e)],'dT':D(_0x4cb2dd[_0x9554fe(0x102)]),'personId':_0x4cb2dd[_0x9554fe(0xcd)],'resolved':_0x305687['solved']===I[_0x9554fe(0x104)],'unitId':_0x5ea6ba,'subUnitId':_0x29aff7,'text':JSON[_0x9554fe(0xed)](_0x4cb2dd['content']),'parentId':_0x3995bb}),_0x464e0b=_0xc2ce31(_0x305687[_0x9554fe(0xf7)][0x0]);return{..._0x464e0b,'children':_0x305687[_0x9554fe(0xf7)][_0x9554fe(0x110)](0x1)[_0x9554fe(0x105)](_0xf966cc=>_0xc2ce31(_0xf966cc,_0x464e0b['id']))};}return null;}let f=class{constructor(_0x20fce9,_0x11385d,_0x46f32b,_0x4854b4){const _0x3bc21f=_0x14e8f6;this[_0x3bc21f(0xc0)]=_0x20fce9,this[_0x3bc21f(0x122)]=_0x11385d,this[_0x3bc21f(0x124)]=_0x46f32b,this[_0x3bc21f(0xef)]=_0x4854b4;}async[_0x14e8f6(0x128)](_0x1851e4){const _0x1e6f03=_0x14e8f6;var _0x3ef62f,_0xb6fb58;const {parentId:_0x328a95,unitId:_0x468f6c,text:_0x25e55f,threadId:_0x558da0}=_0x1851e4,_0x309e67=(_0xb6fb58=(_0x3ef62f=_0x25e55f[_0x1e6f03(0x11b)])==null?void 0x0:_0x3ef62f[_0x1e6f03(0xc7)](_0x245dac=>_0x245dac[_0x1e6f03(0x114)]===_0x3d1118[_0x1e6f03(0x129)])[_0x1e6f03(0x105)](_0x457ca8=>_0x457ca8[_0x1e6f03(0xf6)]))!=null?_0xb6fb58:[],_0x326c60=JSON[_0x1e6f03(0xe6)](_0x25e55f),_0x512e66=(await this['_sessionService'][_0x1e6f03(0xde)](_0x468f6c))[_0x1e6f03(0xfe)]();if(_0x328a95){const _0x475578={'memberId':_0x512e66,'unitId':_0x468f6c,'content':_0x326c60,'mention':_0x309e67,'threadId':_0x558da0},_0x4172a6=(await this[_0x1e6f03(0xc0)][_0x1e6f03(0xd5)]('/universer-api/comment/unit/'+_0x468f6c+_0x1e6f03(0x121),{'body':_0x475578}))[_0x1e6f03(0xdf)][_0x1e6f03(0xf0)];return{..._0x1851e4,'id':_0x4172a6['replyId'],'dT':_0x47e258(+_0x4172a6['createTimestamp'])[_0x1e6f03(0x109)](_0x1e6f03(0x119)),'personId':_0x4172a6[_0x1e6f03(0xcd)]};}else{const _0x3b7587={'memberId':_0x512e66,'unitId':_0x468f6c,'content':_0x326c60,'mention':_0x309e67},_0x2d686b=await this['_httpService']['post'](_0x1e6f03(0xfa)+_0x468f6c+_0x1e6f03(0xda),{'body':_0x3b7587});return X(_0x2d686b[_0x1e6f03(0xdf)][_0x1e6f03(0x11c)],_0x1851e4);}}async['updateComment'](_0x4d0efc){const _0x3779b0=_0x14e8f6;var _0x4e2acc,_0xe849d6;const {text:_0x32c058,unitId:_0x184b7a}=_0x4d0efc,_0x166c3f=(_0xe849d6=(_0x4e2acc=_0x32c058['customRanges'])==null?void 0x0:_0x4e2acc[_0x3779b0(0xc7)](_0x6a6db2=>_0x6a6db2[_0x3779b0(0x114)]===_0x3d1118[_0x3779b0(0x129)])[_0x3779b0(0x105)](_0x5db9f5=>_0x5db9f5[_0x3779b0(0xf6)]))!=null?_0xe849d6:[],_0x50c451=JSON['stringify'](_0x32c058),_0x4e9ee4=_0x4d0efc[_0x3779b0(0x10e)],_0xada142=_0x4d0efc['id'],_0x423454={'memberId':(await this[_0x3779b0(0x124)]['requireSession'](_0x184b7a))[_0x3779b0(0xfe)](),'unitId':_0x184b7a,'threadId':_0x4e9ee4,'mention':_0x166c3f,'content':_0x50c451,'replyId':_0xada142},_0x4c3a38=await this[_0x3779b0(0xc0)][_0x3779b0(0xd5)](_0x3779b0(0xfa)+_0x184b7a+_0x3779b0(0xea),{'body':_0x423454});return!_0x4c3a38['body'][_0x3779b0(0xfc)]||_0x4c3a38['body'][_0x3779b0(0xfc)]['code']===0x1;}async[_0x14e8f6(0xc8)](_0x2a0fda){const _0x2a1630=_0x14e8f6,{unitId:_0x338ee6}=_0x2a0fda,_0x59efe2=_0x2a0fda['threadId'],_0x1c0d87={'memberId':this['_userService'][_0x2a1630(0x10d)]()[_0x2a1630(0x11e)],'unitId':_0x338ee6,'threadId':_0x59efe2,'solved':_0x2a0fda[_0x2a1630(0xe7)]?I['Solved']:I[_0x2a1630(0xe3)]},_0x160403=await this['_httpService'][_0x2a1630(0xd5)](_0x2a1630(0xfa)+_0x338ee6+_0x2a1630(0xce),{'body':_0x1c0d87});return!_0x160403['body']['error']||_0x160403['body'][_0x2a1630(0xfc)][_0x2a1630(0xf9)]===0x1;}async[_0x14e8f6(0xe2)](_0x4bbe02,_0x1f000e,_0x43eaa0,_0x41aa8c){const _0x2547b1=_0x14e8f6,_0xf17f68={'memberId':(await this[_0x2547b1(0x124)][_0x2547b1(0xde)](_0x4bbe02))['getMemberID'](),'threadId':_0x43eaa0,'replyId':_0x41aa8c,'unitId':_0x4bbe02},_0xa47529=await this[_0x2547b1(0xc0)][_0x2547b1(0xd5)](_0x2547b1(0xfa)+_0x4bbe02+'/delete',{'body':_0xf17f68});return!_0xa47529[_0x2547b1(0xdf)][_0x2547b1(0xfc)]||_0xa47529[_0x2547b1(0xdf)][_0x2547b1(0xfc)][_0x2547b1(0xf9)]===0x1;}async[_0x14e8f6(0x10f)](_0x1ad2ba,_0x1f4692,_0x15ea54){const _0x15e753=_0x14e8f6,_0x7829de={'unitId':_0x1ad2ba,'threadId':_0x15ea54},_0x36450b=await this['_httpService'][_0x15e753(0xd5)](_0x15e753(0xfa)+_0x1ad2ba+_0x15e753(0x106),{'body':_0x7829de}),_0x5e05a3=_0x15ea54[_0x15e753(0x105)](_0x5ab93c=>ee(_0x36450b[_0x15e753(0xdf)][_0x15e753(0x125)][_0x5ab93c],_0x1ad2ba,_0x1f4692))[_0x15e753(0xc7)](Boolean);return Object[_0x15e753(0xd0)](_0x36450b[_0x15e753(0xdf)][_0x15e753(0xe8)])[_0x15e753(0xc4)](_0x15d45e=>{const _0x54c674=_0x15e753;this[_0x54c674(0x122)][_0x54c674(0xff)](_0x15d45e);}),_0x5e05a3;}['saveCommentToSnapshot'](_0x4ed038){const _0x144f34=_0x14e8f6;return{'id':_0x4ed038['id'],'threadId':_0x4ed038[_0x144f34(0x10e)],'ref':_0x4ed038[_0x144f34(0x100)]};}};f=Q([_(0x0,_0x59bc1b(_0x5ae147)),_(0x1,_0x59bc1b(_0x44233a)),_(0x2,_0x59bc1b(_0x6db0c8)),_(0x3,_0x59bc1b(_0x5ee519))],f);var re=Object[_0x14e8f6(0x10b)],te=(_0x35451d,_0x25aa9b,_0x4eb219,_0x40a5b3)=>{const _0x2cefac=_0x14e8f6;for(var _0x2042e4=_0x40a5b3>0x1?void 0x0:_0x40a5b3?re(_0x25aa9b,_0x4eb219):_0x25aa9b,_0x5d4b81=_0x35451d[_0x2cefac(0xd6)]-0x1,_0x5efc5a;_0x5d4b81>=0x0;_0x5d4b81--)(_0x5efc5a=_0x35451d[_0x5d4b81])&&(_0x2042e4=_0x5efc5a(_0x2042e4)||_0x2042e4);return _0x2042e4;},N=(_0x53ef74,_0x2f595b)=>(_0x1d4661,_0x590e98)=>_0x2f595b(_0x1d4661,_0x590e98,_0x53ef74);let g=class extends _0x4a90c9{constructor(_0x1197db,_0x3b81d4){const _0x9ce958=_0x14e8f6;super(),this[_0x9ce958(0x11a)]=_0x1197db,this[_0x9ce958(0x127)]=_0x3b81d4,this[_0x9ce958(0x12a)]();}[_0x14e8f6(0x12a)](){const _0x179475=_0x14e8f6;this[_0x179475(0x11a)][_0x179475(0x10a)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x179475(0xc3)]=!0x1;}};function _0x2411(){const _0x1a0e82=['dataSource','getOwnPropertyDescriptor','parentId','getCurrentUser','threadId','listComments','slice','955NRmKPp','_config','user','rangeType','156YECbnn','/universer-api/user/list','unitId','2hXAWdx','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','customRanges','comment','_initUserSync','userID','onStarting','UNIVER_UNKNOWN','/reply','_userService','2743866aybfYS','_sessionService','comments','_threadCommentModel','_threadCommentDataSource','addComment','COMMENT','_initDataSource','updateComment','Solve','_httpService','Edit','add','syncUpdateMutationToColla','forEach','22960BkdIzD','onReady','filter','resolveComment','_commentService','type','solved','12218aLEqco','userId','/solved','Add','values','find','delete','replyId','478170JPEEaa','post','length','get','size','root','/add','getUnit','payload','UNRECOGNIZED','requireSession','body','thread-comment-data-source.config','subscribe','deleteComment','OpenOrReOpen','defineProperty','setConfig','stringify','resolved','users','12387XioJrk','/edit','personId','symbol','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','reply','pipe','2627376ltFMWH','Unknown','2079eJtcOz','_init','rangeId','replies','commentUpdate$','code','/universer-api/comment/unit/','content','error','Delete','getMemberID','addUser','ref','Reply','createTimestamp','disposeWithMe','Solved','map','/list','10986hLOMHH','_configService','format'];_0x2411=function(){return _0x1a0e82;};return _0x2411();}g=te([N(0x0,_0x1f38fa),N(0x1,_0x59bc1b(f))],g);var se=Object[_0x14e8f6(0xe4)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x43cb38,_0x1f3646,_0x42ea57)=>_0x1f3646 in _0x43cb38?se(_0x43cb38,_0x1f3646,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x42ea57}):_0x43cb38[_0x1f3646]=_0x42ea57,ie=(_0x375564,_0x1c0104,_0x51397b,_0x108c4f)=>{for(var _0x4d036e=_0x108c4f>0x1?void 0x0:_0x108c4f?oe(_0x1c0104,_0x51397b):_0x1c0104,_0x4a1f92=_0x375564['length']-0x1,_0x14238c;_0x4a1f92>=0x0;_0x4a1f92--)(_0x14238c=_0x375564[_0x4a1f92])&&(_0x4d036e=_0x14238c(_0x4d036e)||_0x4d036e);return _0x4d036e;},w=(_0x179abf,_0x153d70)=>(_0x16f650,_0x46cccf)=>_0x153d70(_0x16f650,_0x46cccf,_0x179abf),$=(_0x3ecd5,_0x2350f5,_0x4ace5b)=>ne(_0x3ecd5,typeof _0x2350f5!=_0x14e8f6(0xec)?_0x2350f5+'':_0x2350f5,_0x4ace5b);let b=class extends _0x41398f{constructor(_0x342318=M,_0x1801b8,_0x150ec8){const _0xc3e8ac=_0x14e8f6;super(),this[_0xc3e8ac(0x112)]=_0x342318,this['_injector']=_0x1801b8,this['_configService']=_0x150ec8;const {..._0x14cfbf}=_0xdfd847({},M,this['_config']);this[_0xc3e8ac(0x108)][_0xc3e8ac(0xe5)](z,_0x14cfbf);}[_0x14e8f6(0x11f)](){const _0x5cb8e6=_0x14e8f6;[[f],[g],[S]][_0x5cb8e6(0xc4)](_0x5459d8=>{const _0x297049=_0x5cb8e6;this[_0x297049(0xef)][_0x297049(0xc2)](_0x5459d8);});}[_0x14e8f6(0xc6)](){const _0xf28336=_0x14e8f6;this[_0xf28336(0xef)][_0xf28336(0xd7)](g),this['_injector'][_0xf28336(0xd7)](S);}};$(b,'pluginName',W),$(b,_0x14e8f6(0xca),_0x454a2c[_0x14e8f6(0x120)]),b=ie([_0x4be0bf(_0xce439,_0x281d67,_0x2fa253),w(0x1,_0x59bc1b(_0x5ee519)),w(0x2,_0x38206b)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4be095=_0x46ea;(function(_0x45e5b3,_0x4fb667){const _0x23c293=_0x46ea,_0xba98f1=_0x45e5b3();while(!![]){try{const _0x11a11c=parseInt(_0x23c293(0x14d))/0x1*(-parseInt(_0x23c293(0x12a))/0x2)+-parseInt(_0x23c293(0x158))/0x3+-parseInt(_0x23c293(0x155))/0x4+parseInt(_0x23c293(0x135))/0x5*(-parseInt(_0x23c293(0x12d))/0x6)+-parseInt(_0x23c293(0x114))/0x7+-parseInt(_0x23c293(0x11c))/0x8*(-parseInt(_0x23c293(0x134))/0x9)+-parseInt(_0x23c293(0x157))/0xa*(-parseInt(_0x23c293(0x10c))/0xb);if(_0x11a11c===_0x4fb667)break;else _0xba98f1['push'](_0xba98f1['shift']());}catch(_0x164068){_0xba98f1['push'](_0xba98f1['shift']());}}}(_0x2140,0xe8b73));import{CommentService as _0x560a2f,CollaborationSessionService as _0x211d73,UniverCollaborationClientPlugin as _0x1dff39}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xea7e1c}from'@univerjs-pro/license';import{dayjs as _0x13f57c,UserManagerService as _0x57bf20,Inject as _0x397f67,Injector as _0xc959e6,Disposable as _0x3714c3,CustomRangeType as _0x32b452,UniverInstanceType as _0x15cbc2,DependentOn as _0x5f982,IConfigService as _0x129d4e,Plugin as _0x29b97b,merge as _0x596754}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5c16f9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4bce87,IThreadCommentDataSourceService as _0x3222e2}from'@univerjs/thread-comment';import{bufferTime as _0x1c1e04}from'rxjs';import{HTTPService as _0x2e19d5}from'@univerjs/network';const W=_0x4be095(0x14f);var I=(_0x4c7dcd=>(_0x4c7dcd[_0x4c7dcd[_0x4be095(0x113)]=0x0]='OpenOrReOpen',_0x4c7dcd[_0x4c7dcd[_0x4be095(0x154)]=0x1]=_0x4be095(0x154),_0x4c7dcd[_0x4c7dcd['UNRECOGNIZED']=-0x1]=_0x4be095(0x13f),_0x4c7dcd))(I||{}),v=(_0x810411=>(_0x810411[_0x810411[_0x4be095(0x148)]=0x0]=_0x4be095(0x148),_0x810411[_0x810411['Add']=0x1]='Add',_0x810411[_0x810411[_0x4be095(0x11d)]=0x2]=_0x4be095(0x11d),_0x810411[_0x810411[_0x4be095(0x117)]=0x3]=_0x4be095(0x117),_0x810411[_0x810411[_0x4be095(0x123)]=0x4]=_0x4be095(0x123),_0x810411[_0x810411[_0x4be095(0x139)]=0x5]='Solve',_0x810411[_0x810411['UNRECOGNIZED']=-0x1]=_0x4be095(0x13f),_0x810411))(v||{});const D=_0x38968f=>_0x13f57c(new Date(+_0x38968f))[_0x4be095(0x119)](_0x4be095(0x12e)),B=async(_0x1cb238,_0x4c95f7)=>{const _0x265463=_0x4be095,_0x426a8e=_0x1cb238[_0x265463(0x153)](_0x57bf20),_0x5d1acb=_0x1cb238[_0x265463(0x153)](_0x2e19d5);_0x4c95f7[_0x265463(0x107)](_0x2e621c=>{_0x426a8e['getUser'](_0x2e621c)&&_0x4c95f7['delete'](_0x2e621c);}),_0x4c95f7[_0x265463(0x142)]&&(await _0x5d1acb[_0x265463(0x153)](_0x265463(0x120),{'params':{'userIDs':[..._0x4c95f7]}}))[_0x265463(0x138)]['users'][_0x265463(0x107)](_0x3df401=>{const _0x2b7804=_0x265463;_0x3df401&&_0x426a8e[_0x2b7804(0x133)](_0x3df401);});};var K=Object[_0x4be095(0x100)],V=(_0x5e3472,_0x22337f,_0x887530,_0x5869d1)=>{for(var _0x5346d6=_0x5869d1>0x1?void 0x0:_0x5869d1?K(_0x22337f,_0x887530):_0x22337f,_0x25b942=_0x5e3472['length']-0x1,_0x4073b5;_0x25b942>=0x0;_0x25b942--)(_0x4073b5=_0x5e3472[_0x25b942])&&(_0x5346d6=_0x4073b5(_0x5346d6)||_0x5346d6);return _0x5346d6;},p=(_0x1e3c23,_0x5f31bd)=>(_0x4a2bc7,_0x4acfcd)=>_0x5f31bd(_0x4a2bc7,_0x4acfcd,_0x1e3c23);let S=class extends _0x3714c3{constructor(_0x251b8b,_0x296f2f,_0x26f7a4,_0x22b262){const _0xbb1f4c=_0x4be095;super(),this[_0xbb1f4c(0x101)]=_0x251b8b,this[_0xbb1f4c(0x13d)]=_0x296f2f,this[_0xbb1f4c(0x13a)]=_0x26f7a4,this[_0xbb1f4c(0x10f)]=_0x22b262,this[_0xbb1f4c(0x146)](),this['_initUserSync']();}['_initUserSync'](){const _0x330dae=_0x4be095;this[_0x330dae(0x121)](this[_0x330dae(0x13d)][_0x330dae(0x125)][_0x330dae(0x105)](_0x1c1e04(0x10))[_0x330dae(0x122)](_0x1f35d0=>{const _0x371aca=_0x330dae,_0x119497=new Set();_0x1f35d0[_0x371aca(0x107)](_0x3f4878=>{const _0x4440b1=_0x371aca;switch(_0x3f4878[_0x4440b1(0x129)]){case'add':{const _0x1c797a=_0x3f4878['payload']['personId'];_0x119497['add'](_0x1c797a);break;}}}),B(this['_injector'],_0x119497);}));}['_init'](){const _0x1bb09e=_0x4be095;this['disposeWithMe'](this[_0x1bb09e(0x101)][_0x1bb09e(0x125)][_0x1bb09e(0x122)](async _0x46bb1a=>{const _0x25f2bc=_0x1bb09e;var _0x3ddfb4,_0x10ad86,_0xc279d3,_0x4c6832;const _0x44e216=(_0x3ddfb4=this[_0x25f2bc(0x13d)][_0x25f2bc(0x149)](_0x46bb1a['unitId'])['find'](_0x93c4b7=>_0x93c4b7[_0x25f2bc(0x109)]===_0x46bb1a[_0x25f2bc(0x109)]))==null?void 0x0:_0x3ddfb4[_0x25f2bc(0x130)];if(!_0x44e216)return;const {unitId:_0x47ab1f,subUnitId:_0x378aea}=_0x44e216;switch(_0x46bb1a[_0x25f2bc(0x13e)]&&this['_userService'][_0x25f2bc(0x133)](_0x46bb1a[_0x25f2bc(0x13e)]),_0x46bb1a[_0x25f2bc(0x129)]){case v['Add']:break;case v[_0x25f2bc(0x11d)]:{this[_0x25f2bc(0x13d)][_0x25f2bc(0x144)](_0x47ab1f,_0x378aea,{'unitId':_0x47ab1f,'subUnitId':_0x378aea,'ref':'','id':_0x46bb1a['replyId'],'dT':D(+_0x46bb1a['createTimestamp']),'threadId':_0x46bb1a[_0x25f2bc(0x109)],'personId':(_0xc279d3=(_0x10ad86=_0x46bb1a[_0x25f2bc(0x13e)])==null?void 0x0:_0x10ad86[_0x25f2bc(0x124)])!=null?_0xc279d3:_0x46bb1a[_0x25f2bc(0x12f)],'text':JSON[_0x25f2bc(0x140)](_0x46bb1a[_0x25f2bc(0x102)]),'parentId':_0x44e216['id']});break;}case v[_0x25f2bc(0x123)]:{const _0x1b5ce1=this['_threadCommentModel']['getComment'](_0x47ab1f,_0x378aea,_0x46bb1a[_0x25f2bc(0x128)]);_0x1b5ce1&&_0x1b5ce1[_0x25f2bc(0x108)]&&this[_0x25f2bc(0x13d)][_0x25f2bc(0x136)](_0x47ab1f,_0x378aea,_0x46bb1a[_0x25f2bc(0x128)]);break;}case v[_0x25f2bc(0x117)]:{this[_0x25f2bc(0x13d)][_0x25f2bc(0x152)](_0x47ab1f,_0x378aea,{'commentId':_0x46bb1a[_0x25f2bc(0x128)],'text':JSON[_0x25f2bc(0x140)](_0x46bb1a[_0x25f2bc(0x102)])});break;}case v[_0x25f2bc(0x139)]:{const _0xa362c0=(_0x4c6832=this[_0x25f2bc(0x13d)][_0x25f2bc(0x149)](_0x46bb1a['unitId'])['find'](_0x475a8b=>_0x475a8b['threadId']===_0x46bb1a[_0x25f2bc(0x109)]))==null?void 0x0:_0x4c6832[_0x25f2bc(0x130)];_0xa362c0&&this['_threadCommentModel'][_0x25f2bc(0x151)](_0x47ab1f,_0x378aea,_0xa362c0['id'],_0x46bb1a[_0x25f2bc(0x13b)]===I[_0x25f2bc(0x154)]);break;}}}));}};S=V([p(0x0,_0x397f67(_0x560a2f)),p(0x1,_0x397f67(_0x4bce87)),p(0x2,_0x397f67(_0x57bf20)),p(0x3,_0x397f67(_0xc959e6))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2cbff2,_0x4714ee,_0x53d45e,_0x6ff2c4)=>{const _0x499be7=_0x4be095;for(var _0x37e8fc=_0x6ff2c4>0x1?void 0x0:_0x6ff2c4?k(_0x4714ee,_0x53d45e):_0x4714ee,_0x453551=_0x2cbff2[_0x499be7(0x14b)]-0x1,_0x3e7ce2;_0x453551>=0x0;_0x453551--)(_0x3e7ce2=_0x2cbff2[_0x453551])&&(_0x37e8fc=_0x3e7ce2(_0x37e8fc)||_0x37e8fc);return _0x37e8fc;},_=(_0x26619b,_0xd94b76)=>(_0x415ac1,_0x29d130)=>_0xd94b76(_0x415ac1,_0x29d130,_0x26619b);function X(_0x33f314,_0x15e9f8){const _0x37095a=_0x4be095,_0x58e2f1=_0x33f314[_0x37095a(0x104)][0x0];return{..._0x15e9f8,'id':_0x58e2f1[_0x37095a(0x128)],'resolved':_0x33f314['solved']===0x1,'dT':D(_0x58e2f1[_0x37095a(0x11f)]),'personId':_0x58e2f1[_0x37095a(0x12f)],'threadId':_0x58e2f1[_0x37095a(0x109)]};}function ee(_0x421d9c,_0x14134,_0x255509){const _0x4c76ce=_0x4be095;var _0xe0dc1d,_0x53fae1;if(((_0x53fae1=(_0xe0dc1d=_0x421d9c==null?void 0x0:_0x421d9c[_0x4c76ce(0x104)])==null?void 0x0:_0xe0dc1d[_0x4c76ce(0x14b)])!=null?_0x53fae1:0x0)>0x0){const _0x35b8d3=(_0x5a4e43,_0x1655b5)=>({'id':_0x5a4e43['replyId'],'threadId':_0x5a4e43[_0x4c76ce(0x109)],'dT':D(_0x5a4e43[_0x4c76ce(0x11f)]),'personId':_0x5a4e43[_0x4c76ce(0x12f)],'resolved':_0x421d9c[_0x4c76ce(0x13b)]===I[_0x4c76ce(0x154)],'unitId':_0x14134,'subUnitId':_0x255509,'text':JSON[_0x4c76ce(0x140)](_0x5a4e43['content']),'parentId':_0x1655b5}),_0x4b5ffe=_0x35b8d3(_0x421d9c[_0x4c76ce(0x104)][0x0]);return{..._0x4b5ffe,'children':_0x421d9c[_0x4c76ce(0x104)][_0x4c76ce(0x10a)](0x1)[_0x4c76ce(0x116)](_0x100257=>_0x35b8d3(_0x100257,_0x4b5ffe['id']))};}return null;}let f=class{constructor(_0x2a34d9,_0x10788d,_0x463dc1,_0x16d5dc){const _0xb52375=_0x4be095;this['_httpService']=_0x2a34d9,this[_0xb52375(0x13a)]=_0x10788d,this[_0xb52375(0x15c)]=_0x463dc1,this[_0xb52375(0x10f)]=_0x16d5dc;}async[_0x4be095(0x144)](_0x5c4552){const _0xbc9bab=_0x4be095;var _0x155c41,_0x5cbe85;const {parentId:_0x2516e6,unitId:_0x1c00ac,text:_0xcb792a,threadId:_0x4c6716}=_0x5c4552,_0x4afe34=(_0x5cbe85=(_0x155c41=_0xcb792a[_0xbc9bab(0x15a)])==null?void 0x0:_0x155c41['filter'](_0xf3d5c3=>_0xf3d5c3['rangeType']===_0x32b452[_0xbc9bab(0x110)])[_0xbc9bab(0x116)](_0x4e5082=>_0x4e5082[_0xbc9bab(0x13c)]))!=null?_0x5cbe85:[],_0x405e3a=JSON[_0xbc9bab(0x106)](_0xcb792a),_0x18d6f9=(await this[_0xbc9bab(0x15c)]['requireSession'](_0x1c00ac))['getMemberID']();if(_0x2516e6){const _0x5b4168={'memberId':_0x18d6f9,'unitId':_0x1c00ac,'content':_0x405e3a,'mention':_0x4afe34,'threadId':_0x4c6716},_0x4babb5=(await this[_0xbc9bab(0x127)]['post']('/universer-api/comment/unit/'+_0x1c00ac+_0xbc9bab(0x112),{'body':_0x5b4168}))['body'][_0xbc9bab(0x131)];return{..._0x5c4552,'id':_0x4babb5['replyId'],'dT':_0x13f57c(+_0x4babb5[_0xbc9bab(0x11f)])[_0xbc9bab(0x119)](_0xbc9bab(0x12e)),'personId':_0x4babb5[_0xbc9bab(0x12f)]};}else{const _0xb4f414={'memberId':_0x18d6f9,'unitId':_0x1c00ac,'content':_0x405e3a,'mention':_0x4afe34},_0x4bb7d8=await this[_0xbc9bab(0x127)]['post'](_0xbc9bab(0x147)+_0x1c00ac+_0xbc9bab(0x14c),{'body':_0xb4f414});return X(_0x4bb7d8[_0xbc9bab(0x138)][_0xbc9bab(0x118)],_0x5c4552);}}async[_0x4be095(0x152)](_0x4fb029){const _0x4ae3db=_0x4be095;var _0x501d8e,_0x106657;const {text:_0x53400b,unitId:_0x2fb1ea}=_0x4fb029,_0x2c0804=(_0x106657=(_0x501d8e=_0x53400b[_0x4ae3db(0x15a)])==null?void 0x0:_0x501d8e['filter'](_0x2c8247=>_0x2c8247[_0x4ae3db(0x12b)]===_0x32b452['COMMENT'])[_0x4ae3db(0x116)](_0x3a85d7=>_0x3a85d7['rangeId']))!=null?_0x106657:[],_0x5becd9=JSON[_0x4ae3db(0x106)](_0x53400b),_0x9d06cd=_0x4fb029[_0x4ae3db(0x109)],_0x5c582c=_0x4fb029['id'],_0x20f04c={'memberId':(await this['_sessionService'][_0x4ae3db(0x11e)](_0x2fb1ea))[_0x4ae3db(0x126)](),'unitId':_0x2fb1ea,'threadId':_0x9d06cd,'mention':_0x2c0804,'content':_0x5becd9,'replyId':_0x5c582c},_0x207485=await this[_0x4ae3db(0x127)][_0x4ae3db(0x137)](_0x4ae3db(0x147)+_0x2fb1ea+_0x4ae3db(0x145),{'body':_0x20f04c});return!_0x207485[_0x4ae3db(0x138)][_0x4ae3db(0x15b)]||_0x207485[_0x4ae3db(0x138)][_0x4ae3db(0x15b)][_0x4ae3db(0x156)]===0x1;}async[_0x4be095(0x151)](_0x199cc7){const _0x3271ce=_0x4be095,{unitId:_0x219814}=_0x199cc7,_0x7828d9=_0x199cc7[_0x3271ce(0x109)],_0x3e6204={'memberId':this[_0x3271ce(0x13a)]['getCurrentUser']()['userID'],'unitId':_0x219814,'threadId':_0x7828d9,'solved':_0x199cc7['resolved']?I[_0x3271ce(0x154)]:I[_0x3271ce(0x113)]},_0x44137f=await this['_httpService'][_0x3271ce(0x137)](_0x3271ce(0x147)+_0x219814+'/solved',{'body':_0x3e6204});return!_0x44137f['body'][_0x3271ce(0x15b)]||_0x44137f[_0x3271ce(0x138)]['error']['code']===0x1;}async['deleteComment'](_0x1f8a57,_0x186baf,_0x4c5f29,_0x158777){const _0x48dd08=_0x4be095,_0x2a7747={'memberId':(await this['_sessionService']['requireSession'](_0x1f8a57))[_0x48dd08(0x126)](),'threadId':_0x4c5f29,'replyId':_0x158777,'unitId':_0x1f8a57},_0x3c7f1c=await this[_0x48dd08(0x127)][_0x48dd08(0x137)](_0x48dd08(0x147)+_0x1f8a57+_0x48dd08(0x14e),{'body':_0x2a7747});return!_0x3c7f1c['body']['error']||_0x3c7f1c[_0x48dd08(0x138)][_0x48dd08(0x15b)][_0x48dd08(0x156)]===0x1;}async['listComments'](_0x3fd2e8,_0x2ca23a,_0x44dbf3){const _0x20fbeb=_0x4be095,_0x3780de={'unitId':_0x3fd2e8,'threadId':_0x44dbf3},_0x10c092=await this[_0x20fbeb(0x127)][_0x20fbeb(0x137)](_0x20fbeb(0x147)+_0x3fd2e8+_0x20fbeb(0x11a),{'body':_0x3780de}),_0x4d6e95=_0x44dbf3[_0x20fbeb(0x116)](_0x27b28a=>ee(_0x10c092['body']['comments'][_0x27b28a],_0x3fd2e8,_0x2ca23a))[_0x20fbeb(0x10b)](Boolean);return Object[_0x20fbeb(0x143)](_0x10c092[_0x20fbeb(0x138)]['users'])[_0x20fbeb(0x107)](_0x43543e=>{const _0x547a95=_0x20fbeb;this[_0x547a95(0x13a)][_0x547a95(0x133)](_0x43543e);}),_0x4d6e95;}[_0x4be095(0x10e)](_0x2803ab){const _0x5b4993=_0x4be095;return{'id':_0x2803ab['id'],'threadId':_0x2803ab[_0x5b4993(0x109)],'ref':_0x2803ab[_0x5b4993(0x14a)]};}};function _0x2140(){const _0x2adab7=['values','addComment','/edit','_init','/universer-api/comment/unit/','Unknown','getUnit','ref','length','/add','1DsbBNd','/delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','resolveComment','updateComment','get','Solved','1849212eaZzcN','code','50803570HQnFoL','1332279BTtIWs','_initDataSource','customRanges','error','_sessionService','getOwnPropertyDescriptor','_commentService','content','syncUpdateMutationToColla','replies','pipe','stringify','forEach','parentId','threadId','slice','filter','11akaRPe','pluginName','saveCommentToSnapshot','_injector','COMMENT','_configService','/reply','OpenOrReOpen','1267385bifqvC','_threadCommentDataSourceService','map','Edit','comment','format','/list','dataSource','24qWZdoP','Reply','requireSession','createTimestamp','/universer-api/user/list','disposeWithMe','subscribe','Delete','userID','commentUpdate$','getMemberID','_httpService','replyId','type','3437744iDfKNK','rangeType','onReady','62754YZTMol','YYYY/MM/DD\x20HH:mm','userId','root','reply','_threadCommentDataSource','addUser','649926GqKXwc','735cOeuNc','deleteComment','post','body','Solve','_userService','solved','rangeId','_threadCommentModel','user','UNRECOGNIZED','parse','_config','size'];_0x2140=function(){return _0x2adab7;};return _0x2140();}f=Q([_(0x0,_0x397f67(_0x2e19d5)),_(0x1,_0x397f67(_0x57bf20)),_(0x2,_0x397f67(_0x211d73)),_(0x3,_0x397f67(_0xc959e6))],f);var re=Object[_0x4be095(0x100)],te=(_0x5a4a3c,_0x45b7aa,_0x313bb7,_0x428ae2)=>{const _0x5dad5c=_0x4be095;for(var _0x4203e9=_0x428ae2>0x1?void 0x0:_0x428ae2?re(_0x45b7aa,_0x313bb7):_0x45b7aa,_0x1209ca=_0x5a4a3c[_0x5dad5c(0x14b)]-0x1,_0x26f574;_0x1209ca>=0x0;_0x1209ca--)(_0x26f574=_0x5a4a3c[_0x1209ca])&&(_0x4203e9=_0x26f574(_0x4203e9)||_0x4203e9);return _0x4203e9;},N=(_0x4fd238,_0x199b12)=>(_0x2d1e47,_0x2c4ffc)=>_0x199b12(_0x2d1e47,_0x2c4ffc,_0x4fd238);let g=class extends _0x3714c3{constructor(_0x30440c,_0x54fe54){const _0x5af7ed=_0x4be095;super(),this[_0x5af7ed(0x115)]=_0x30440c,this[_0x5af7ed(0x132)]=_0x54fe54,this[_0x5af7ed(0x159)]();}[_0x4be095(0x159)](){const _0x4c805c=_0x4be095;this[_0x4c805c(0x115)][_0x4c805c(0x11b)]=this[_0x4c805c(0x132)],this[_0x4c805c(0x115)][_0x4c805c(0x103)]=!0x1;}};g=te([N(0x0,_0x3222e2),N(0x1,_0x397f67(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x2a86e2,_0x3f721d,_0x3e1fd5)=>_0x3f721d in _0x2a86e2?se(_0x2a86e2,_0x3f721d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e1fd5}):_0x2a86e2[_0x3f721d]=_0x3e1fd5,ie=(_0x5b733f,_0x74d5,_0x51f4ec,_0x9ffcc1)=>{const _0x457dc5=_0x4be095;for(var _0x1edd34=_0x9ffcc1>0x1?void 0x0:_0x9ffcc1?oe(_0x74d5,_0x51f4ec):_0x74d5,_0x3c5226=_0x5b733f[_0x457dc5(0x14b)]-0x1,_0x5ad2f1;_0x3c5226>=0x0;_0x3c5226--)(_0x5ad2f1=_0x5b733f[_0x3c5226])&&(_0x1edd34=_0x5ad2f1(_0x1edd34)||_0x1edd34);return _0x1edd34;},w=(_0x365af3,_0x2cadd7)=>(_0x5f4afc,_0xc0a57a)=>_0x2cadd7(_0x5f4afc,_0xc0a57a,_0x365af3),$=(_0x48dbe7,_0x265459,_0x57b22a)=>ne(_0x48dbe7,typeof _0x265459!='symbol'?_0x265459+'':_0x265459,_0x57b22a);let b=class extends _0x29b97b{constructor(_0x5323fc=M,_0x3877fe,_0x5e38e0){const _0xc73e41=_0x4be095;super(),this[_0xc73e41(0x141)]=_0x5323fc,this['_injector']=_0x3877fe,this[_0xc73e41(0x111)]=_0x5e38e0;const {..._0x1c1163}=_0x596754({},M,this[_0xc73e41(0x141)]);this[_0xc73e41(0x111)][_0xc73e41(0x150)](z,_0x1c1163);}['onStarting'](){const _0x24cd04=_0x4be095;[[f],[g],[S]][_0x24cd04(0x107)](_0x3fca81=>{const _0x4480c5=_0x24cd04;this[_0x4480c5(0x10f)]['add'](_0x3fca81);});}[_0x4be095(0x12c)](){const _0x3e06bb=_0x4be095;this[_0x3e06bb(0x10f)]['get'](g),this[_0x3e06bb(0x10f)][_0x3e06bb(0x153)](S);}};function _0x46ea(_0x24dd1f,_0x5d9bc0){const _0x21405a=_0x2140();return _0x46ea=function(_0x46eabc,_0x481a1a){_0x46eabc=_0x46eabc-0x100;let _0x30d7c9=_0x21405a[_0x46eabc];return _0x30d7c9;},_0x46ea(_0x24dd1f,_0x5d9bc0);}$(b,_0x4be095(0x10d),W),$(b,_0x4be095(0x129),_0x15cbc2['UNIVER_UNKNOWN']),b=ie([_0x5f982(_0x5c16f9,_0x1dff39,_0xea7e1c),w(0x1,_0x397f67(_0xc959e6)),w(0x2,_0x129d4e)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x14e8f6=_0x31ff;(function(_0x2481d2,_0x5e0d93){const _0x474d7a=_0x31ff,_0x45e3ad=_0x2481d2();while(!![]){try{const _0x759750=-parseInt(_0x474d7a(0xcc))/0x1*(-parseInt(_0x474d7a(0x118))/0x2)+parseInt(_0x474d7a(0xe9))/0x3*(parseInt(_0x474d7a(0x115))/0x4)+-parseInt(_0x474d7a(0x111))/0x5*(-parseInt(_0x474d7a(0x107))/0x6)+parseInt(_0x474d7a(0xd4))/0x7+parseInt(_0x474d7a(0xf2))/0x8+-parseInt(_0x474d7a(0x123))/0x9+parseInt(_0x474d7a(0xc5))/0xa*(-parseInt(_0x474d7a(0xf4))/0xb);if(_0x759750===_0x5e0d93)break;else _0x45e3ad['push'](_0x45e3ad['shift']());}catch(_0x3b2381){_0x45e3ad['push'](_0x45e3ad['shift']());}}}(_0x2411,0x2c294));import{CommentService as _0x6346bf,CollaborationSessionService as _0x6db0c8,UniverCollaborationClientPlugin as _0x281d67}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2fa253}from'@univerjs-pro/license';import{dayjs as _0x47e258,UserManagerService as _0x44233a,Inject as _0x59bc1b,Injector as _0x5ee519,Disposable as _0x4a90c9,CustomRangeType as _0x3d1118,UniverInstanceType as _0x454a2c,DependentOn as _0x4be0bf,IConfigService as _0x38206b,Plugin as _0x41398f,merge as _0xdfd847}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xce439}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x23d8a0,IThreadCommentDataSourceService as _0x1f38fa}from'@univerjs/thread-comment';function _0x31ff(_0x2aeb82,_0xbec4c){const _0x2411a4=_0x2411();return _0x31ff=function(_0x31ffb0,_0x2e9983){_0x31ffb0=_0x31ffb0-0xbe;let _0x595ea8=_0x2411a4[_0x31ffb0];return _0x595ea8;},_0x31ff(_0x2aeb82,_0xbec4c);}import{bufferTime as _0x390860}from'rxjs';import{HTTPService as _0x5ae147}from'@univerjs/network';const W=_0x14e8f6(0xee);var I=(_0x541df3=>(_0x541df3[_0x541df3['OpenOrReOpen']=0x0]=_0x14e8f6(0xe3),_0x541df3[_0x541df3[_0x14e8f6(0x104)]=0x1]=_0x14e8f6(0x104),_0x541df3[_0x541df3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x541df3))(I||{}),v=(_0x189f28=>(_0x189f28[_0x189f28[_0x14e8f6(0xf3)]=0x0]=_0x14e8f6(0xf3),_0x189f28[_0x189f28['Add']=0x1]=_0x14e8f6(0xcf),_0x189f28[_0x189f28[_0x14e8f6(0x101)]=0x2]=_0x14e8f6(0x101),_0x189f28[_0x189f28['Edit']=0x3]=_0x14e8f6(0xc1),_0x189f28[_0x189f28[_0x14e8f6(0xfd)]=0x4]=_0x14e8f6(0xfd),_0x189f28[_0x189f28[_0x14e8f6(0xbf)]=0x5]=_0x14e8f6(0xbf),_0x189f28[_0x189f28[_0x14e8f6(0xdd)]=-0x1]=_0x14e8f6(0xdd),_0x189f28))(v||{});const D=_0x5ce6cd=>_0x47e258(new Date(+_0x5ce6cd))[_0x14e8f6(0x109)](_0x14e8f6(0x119)),B=async(_0x1f5dc3,_0x59284a)=>{const _0x3f6c43=_0x14e8f6,_0x19e75=_0x1f5dc3[_0x3f6c43(0xd7)](_0x44233a),_0x4804f3=_0x1f5dc3[_0x3f6c43(0xd7)](_0x5ae147);_0x59284a[_0x3f6c43(0xc4)](_0x5d03ee=>{const _0x417b0c=_0x3f6c43;_0x19e75['getUser'](_0x5d03ee)&&_0x59284a[_0x417b0c(0xd2)](_0x5d03ee);}),_0x59284a[_0x3f6c43(0xd8)]&&(await _0x4804f3[_0x3f6c43(0xd7)](_0x3f6c43(0x116),{'params':{'userIDs':[..._0x59284a]}}))['body'][_0x3f6c43(0xe8)][_0x3f6c43(0xc4)](_0x1c410a=>{const _0x55bced=_0x3f6c43;_0x1c410a&&_0x19e75[_0x55bced(0xff)](_0x1c410a);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x27fa48,_0x26bbfa,_0x68ac5e,_0x726e5a)=>{const _0x3e9f77=_0x14e8f6;for(var _0x233cf1=_0x726e5a>0x1?void 0x0:_0x726e5a?K(_0x26bbfa,_0x68ac5e):_0x26bbfa,_0x1bc118=_0x27fa48[_0x3e9f77(0xd6)]-0x1,_0xd74061;_0x1bc118>=0x0;_0x1bc118--)(_0xd74061=_0x27fa48[_0x1bc118])&&(_0x233cf1=_0xd74061(_0x233cf1)||_0x233cf1);return _0x233cf1;},p=(_0x439f04,_0x4a7d14)=>(_0x5509cd,_0xfd9dc8)=>_0x4a7d14(_0x5509cd,_0xfd9dc8,_0x439f04);let S=class extends _0x4a90c9{constructor(_0x42cbd0,_0x24ed3d,_0x5ce4e4,_0x2e3f9f){const _0x1dd1ff=_0x14e8f6;super(),this[_0x1dd1ff(0xc9)]=_0x42cbd0,this['_threadCommentModel']=_0x24ed3d,this['_userService']=_0x5ce4e4,this[_0x1dd1ff(0xef)]=_0x2e3f9f,this[_0x1dd1ff(0xf5)](),this[_0x1dd1ff(0x11d)]();}['_initUserSync'](){const _0xa92790=_0x14e8f6;this['disposeWithMe'](this[_0xa92790(0x126)][_0xa92790(0xf8)][_0xa92790(0xf1)](_0x390860(0x10))[_0xa92790(0xe1)](_0x50acd0=>{const _0xd46a63=_0xa92790,_0x341e26=new Set();_0x50acd0[_0xd46a63(0xc4)](_0x217e8d=>{const _0x40f8ae=_0xd46a63;switch(_0x217e8d[_0x40f8ae(0xca)]){case _0x40f8ae(0xc2):{const _0x41827d=_0x217e8d[_0x40f8ae(0xdc)][_0x40f8ae(0xeb)];_0x341e26[_0x40f8ae(0xc2)](_0x41827d);break;}}}),B(this[_0xd46a63(0xef)],_0x341e26);}));}[_0x14e8f6(0xf5)](){const _0x38fe3f=_0x14e8f6;this[_0x38fe3f(0x103)](this[_0x38fe3f(0xc9)][_0x38fe3f(0xf8)][_0x38fe3f(0xe1)](async _0x4fd38f=>{const _0x2afcbc=_0x38fe3f;var _0x4fa83d,_0x26eeb6,_0x2aa72e,_0x354d6d;const _0x601859=(_0x4fa83d=this[_0x2afcbc(0x126)][_0x2afcbc(0xdb)](_0x4fd38f[_0x2afcbc(0x117)])['find'](_0x446e5d=>_0x446e5d[_0x2afcbc(0x10e)]===_0x4fd38f[_0x2afcbc(0x10e)]))==null?void 0x0:_0x4fa83d[_0x2afcbc(0xd9)];if(!_0x601859)return;const {unitId:_0x221cd1,subUnitId:_0xee5ada}=_0x601859;switch(_0x4fd38f[_0x2afcbc(0x113)]&&this[_0x2afcbc(0x122)]['addUser'](_0x4fd38f['user']),_0x4fd38f[_0x2afcbc(0xca)]){case v['Add']:break;case v[_0x2afcbc(0x101)]:{this[_0x2afcbc(0x126)][_0x2afcbc(0x128)](_0x221cd1,_0xee5ada,{'unitId':_0x221cd1,'subUnitId':_0xee5ada,'ref':'','id':_0x4fd38f[_0x2afcbc(0xd3)],'dT':D(+_0x4fd38f['createTimestamp']),'threadId':_0x4fd38f[_0x2afcbc(0x10e)],'personId':(_0x2aa72e=(_0x26eeb6=_0x4fd38f[_0x2afcbc(0x113)])==null?void 0x0:_0x26eeb6['userID'])!=null?_0x2aa72e:_0x4fd38f[_0x2afcbc(0xcd)],'text':JSON[_0x2afcbc(0xed)](_0x4fd38f[_0x2afcbc(0xfb)]),'parentId':_0x601859['id']});break;}case v['Delete']:{const _0x318e51=this['_threadCommentModel']['getComment'](_0x221cd1,_0xee5ada,_0x4fd38f['replyId']);_0x318e51&&_0x318e51[_0x2afcbc(0x10c)]&&this[_0x2afcbc(0x126)][_0x2afcbc(0xe2)](_0x221cd1,_0xee5ada,_0x4fd38f[_0x2afcbc(0xd3)]);break;}case v[_0x2afcbc(0xc1)]:{this[_0x2afcbc(0x126)][_0x2afcbc(0xbe)](_0x221cd1,_0xee5ada,{'commentId':_0x4fd38f[_0x2afcbc(0xd3)],'text':JSON[_0x2afcbc(0xed)](_0x4fd38f['content'])});break;}case v[_0x2afcbc(0xbf)]:{const _0x458ba9=(_0x354d6d=this[_0x2afcbc(0x126)][_0x2afcbc(0xdb)](_0x4fd38f[_0x2afcbc(0x117)])[_0x2afcbc(0xd1)](_0x2d0026=>_0x2d0026['threadId']===_0x4fd38f['threadId']))==null?void 0x0:_0x354d6d[_0x2afcbc(0xd9)];_0x458ba9&&this[_0x2afcbc(0x126)][_0x2afcbc(0xc8)](_0x221cd1,_0xee5ada,_0x458ba9['id'],_0x4fd38f[_0x2afcbc(0xcb)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x59bc1b(_0x6346bf)),p(0x1,_0x59bc1b(_0x23d8a0)),p(0x2,_0x59bc1b(_0x44233a)),p(0x3,_0x59bc1b(_0x5ee519))],S);const z=_0x14e8f6(0xe0),M={};var k=Object[_0x14e8f6(0x10b)],Q=(_0x20ed71,_0x572fad,_0x49abcf,_0x3f6fbc)=>{for(var _0x13b9c8=_0x3f6fbc>0x1?void 0x0:_0x3f6fbc?k(_0x572fad,_0x49abcf):_0x572fad,_0x31dcc7=_0x20ed71['length']-0x1,_0x1bb3d6;_0x31dcc7>=0x0;_0x31dcc7--)(_0x1bb3d6=_0x20ed71[_0x31dcc7])&&(_0x13b9c8=_0x1bb3d6(_0x13b9c8)||_0x13b9c8);return _0x13b9c8;},_=(_0x3aced9,_0x2dc6c8)=>(_0x408e82,_0x1093c6)=>_0x2dc6c8(_0x408e82,_0x1093c6,_0x3aced9);function X(_0xe2cbb8,_0x14addc){const _0x427158=_0x14e8f6,_0x1c3b6b=_0xe2cbb8[_0x427158(0xf7)][0x0];return{..._0x14addc,'id':_0x1c3b6b[_0x427158(0xd3)],'resolved':_0xe2cbb8[_0x427158(0xcb)]===0x1,'dT':D(_0x1c3b6b[_0x427158(0x102)]),'personId':_0x1c3b6b[_0x427158(0xcd)],'threadId':_0x1c3b6b[_0x427158(0x10e)]};}function ee(_0x305687,_0x5ea6ba,_0x29aff7){const _0x9554fe=_0x14e8f6;var _0x110feb,_0x22a35e;if(((_0x22a35e=(_0x110feb=_0x305687==null?void 0x0:_0x305687['replies'])==null?void 0x0:_0x110feb[_0x9554fe(0xd6)])!=null?_0x22a35e:0x0)>0x0){const _0xc2ce31=(_0x4cb2dd,_0x3995bb)=>({'id':_0x4cb2dd['replyId'],'threadId':_0x4cb2dd[_0x9554fe(0x10e)],'dT':D(_0x4cb2dd[_0x9554fe(0x102)]),'personId':_0x4cb2dd[_0x9554fe(0xcd)],'resolved':_0x305687['solved']===I[_0x9554fe(0x104)],'unitId':_0x5ea6ba,'subUnitId':_0x29aff7,'text':JSON[_0x9554fe(0xed)](_0x4cb2dd['content']),'parentId':_0x3995bb}),_0x464e0b=_0xc2ce31(_0x305687[_0x9554fe(0xf7)][0x0]);return{..._0x464e0b,'children':_0x305687[_0x9554fe(0xf7)][_0x9554fe(0x110)](0x1)[_0x9554fe(0x105)](_0xf966cc=>_0xc2ce31(_0xf966cc,_0x464e0b['id']))};}return null;}let f=class{constructor(_0x20fce9,_0x11385d,_0x46f32b,_0x4854b4){const _0x3bc21f=_0x14e8f6;this[_0x3bc21f(0xc0)]=_0x20fce9,this[_0x3bc21f(0x122)]=_0x11385d,this[_0x3bc21f(0x124)]=_0x46f32b,this[_0x3bc21f(0xef)]=_0x4854b4;}async[_0x14e8f6(0x128)](_0x1851e4){const _0x1e6f03=_0x14e8f6;var _0x3ef62f,_0xb6fb58;const {parentId:_0x328a95,unitId:_0x468f6c,text:_0x25e55f,threadId:_0x558da0}=_0x1851e4,_0x309e67=(_0xb6fb58=(_0x3ef62f=_0x25e55f[_0x1e6f03(0x11b)])==null?void 0x0:_0x3ef62f[_0x1e6f03(0xc7)](_0x245dac=>_0x245dac[_0x1e6f03(0x114)]===_0x3d1118[_0x1e6f03(0x129)])[_0x1e6f03(0x105)](_0x457ca8=>_0x457ca8[_0x1e6f03(0xf6)]))!=null?_0xb6fb58:[],_0x326c60=JSON[_0x1e6f03(0xe6)](_0x25e55f),_0x512e66=(await this['_sessionService'][_0x1e6f03(0xde)](_0x468f6c))[_0x1e6f03(0xfe)]();if(_0x328a95){const _0x475578={'memberId':_0x512e66,'unitId':_0x468f6c,'content':_0x326c60,'mention':_0x309e67,'threadId':_0x558da0},_0x4172a6=(await this[_0x1e6f03(0xc0)][_0x1e6f03(0xd5)]('/universer-api/comment/unit/'+_0x468f6c+_0x1e6f03(0x121),{'body':_0x475578}))[_0x1e6f03(0xdf)][_0x1e6f03(0xf0)];return{..._0x1851e4,'id':_0x4172a6['replyId'],'dT':_0x47e258(+_0x4172a6['createTimestamp'])[_0x1e6f03(0x109)](_0x1e6f03(0x119)),'personId':_0x4172a6[_0x1e6f03(0xcd)]};}else{const _0x3b7587={'memberId':_0x512e66,'unitId':_0x468f6c,'content':_0x326c60,'mention':_0x309e67},_0x2d686b=await this['_httpService']['post'](_0x1e6f03(0xfa)+_0x468f6c+_0x1e6f03(0xda),{'body':_0x3b7587});return X(_0x2d686b[_0x1e6f03(0xdf)][_0x1e6f03(0x11c)],_0x1851e4);}}async['updateComment'](_0x4d0efc){const _0x3779b0=_0x14e8f6;var _0x4e2acc,_0xe849d6;const {text:_0x32c058,unitId:_0x184b7a}=_0x4d0efc,_0x166c3f=(_0xe849d6=(_0x4e2acc=_0x32c058['customRanges'])==null?void 0x0:_0x4e2acc[_0x3779b0(0xc7)](_0x6a6db2=>_0x6a6db2[_0x3779b0(0x114)]===_0x3d1118[_0x3779b0(0x129)])[_0x3779b0(0x105)](_0x5db9f5=>_0x5db9f5[_0x3779b0(0xf6)]))!=null?_0xe849d6:[],_0x50c451=JSON['stringify'](_0x32c058),_0x4e9ee4=_0x4d0efc[_0x3779b0(0x10e)],_0xada142=_0x4d0efc['id'],_0x423454={'memberId':(await this[_0x3779b0(0x124)]['requireSession'](_0x184b7a))[_0x3779b0(0xfe)](),'unitId':_0x184b7a,'threadId':_0x4e9ee4,'mention':_0x166c3f,'content':_0x50c451,'replyId':_0xada142},_0x4c3a38=await this[_0x3779b0(0xc0)][_0x3779b0(0xd5)](_0x3779b0(0xfa)+_0x184b7a+_0x3779b0(0xea),{'body':_0x423454});return!_0x4c3a38['body'][_0x3779b0(0xfc)]||_0x4c3a38['body'][_0x3779b0(0xfc)]['code']===0x1;}async[_0x14e8f6(0xc8)](_0x2a0fda){const _0x2a1630=_0x14e8f6,{unitId:_0x338ee6}=_0x2a0fda,_0x59efe2=_0x2a0fda['threadId'],_0x1c0d87={'memberId':this['_userService'][_0x2a1630(0x10d)]()[_0x2a1630(0x11e)],'unitId':_0x338ee6,'threadId':_0x59efe2,'solved':_0x2a0fda[_0x2a1630(0xe7)]?I['Solved']:I[_0x2a1630(0xe3)]},_0x160403=await this['_httpService'][_0x2a1630(0xd5)](_0x2a1630(0xfa)+_0x338ee6+_0x2a1630(0xce),{'body':_0x1c0d87});return!_0x160403['body']['error']||_0x160403['body'][_0x2a1630(0xfc)][_0x2a1630(0xf9)]===0x1;}async[_0x14e8f6(0xe2)](_0x4bbe02,_0x1f000e,_0x43eaa0,_0x41aa8c){const _0x2547b1=_0x14e8f6,_0xf17f68={'memberId':(await this[_0x2547b1(0x124)][_0x2547b1(0xde)](_0x4bbe02))['getMemberID'](),'threadId':_0x43eaa0,'replyId':_0x41aa8c,'unitId':_0x4bbe02},_0xa47529=await this[_0x2547b1(0xc0)][_0x2547b1(0xd5)](_0x2547b1(0xfa)+_0x4bbe02+'/delete',{'body':_0xf17f68});return!_0xa47529[_0x2547b1(0xdf)][_0x2547b1(0xfc)]||_0xa47529[_0x2547b1(0xdf)][_0x2547b1(0xfc)][_0x2547b1(0xf9)]===0x1;}async[_0x14e8f6(0x10f)](_0x1ad2ba,_0x1f4692,_0x15ea54){const _0x15e753=_0x14e8f6,_0x7829de={'unitId':_0x1ad2ba,'threadId':_0x15ea54},_0x36450b=await this['_httpService'][_0x15e753(0xd5)](_0x15e753(0xfa)+_0x1ad2ba+_0x15e753(0x106),{'body':_0x7829de}),_0x5e05a3=_0x15ea54[_0x15e753(0x105)](_0x5ab93c=>ee(_0x36450b[_0x15e753(0xdf)][_0x15e753(0x125)][_0x5ab93c],_0x1ad2ba,_0x1f4692))[_0x15e753(0xc7)](Boolean);return Object[_0x15e753(0xd0)](_0x36450b[_0x15e753(0xdf)][_0x15e753(0xe8)])[_0x15e753(0xc4)](_0x15d45e=>{const _0x54c674=_0x15e753;this[_0x54c674(0x122)][_0x54c674(0xff)](_0x15d45e);}),_0x5e05a3;}['saveCommentToSnapshot'](_0x4ed038){const _0x144f34=_0x14e8f6;return{'id':_0x4ed038['id'],'threadId':_0x4ed038[_0x144f34(0x10e)],'ref':_0x4ed038[_0x144f34(0x100)]};}};f=Q([_(0x0,_0x59bc1b(_0x5ae147)),_(0x1,_0x59bc1b(_0x44233a)),_(0x2,_0x59bc1b(_0x6db0c8)),_(0x3,_0x59bc1b(_0x5ee519))],f);var re=Object[_0x14e8f6(0x10b)],te=(_0x35451d,_0x25aa9b,_0x4eb219,_0x40a5b3)=>{const _0x2cefac=_0x14e8f6;for(var _0x2042e4=_0x40a5b3>0x1?void 0x0:_0x40a5b3?re(_0x25aa9b,_0x4eb219):_0x25aa9b,_0x5d4b81=_0x35451d[_0x2cefac(0xd6)]-0x1,_0x5efc5a;_0x5d4b81>=0x0;_0x5d4b81--)(_0x5efc5a=_0x35451d[_0x5d4b81])&&(_0x2042e4=_0x5efc5a(_0x2042e4)||_0x2042e4);return _0x2042e4;},N=(_0x53ef74,_0x2f595b)=>(_0x1d4661,_0x590e98)=>_0x2f595b(_0x1d4661,_0x590e98,_0x53ef74);let g=class extends _0x4a90c9{constructor(_0x1197db,_0x3b81d4){const _0x9ce958=_0x14e8f6;super(),this[_0x9ce958(0x11a)]=_0x1197db,this[_0x9ce958(0x127)]=_0x3b81d4,this[_0x9ce958(0x12a)]();}[_0x14e8f6(0x12a)](){const _0x179475=_0x14e8f6;this[_0x179475(0x11a)][_0x179475(0x10a)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x179475(0xc3)]=!0x1;}};function _0x2411(){const _0x1a0e82=['dataSource','getOwnPropertyDescriptor','parentId','getCurrentUser','threadId','listComments','slice','955NRmKPp','_config','user','rangeType','156YECbnn','/universer-api/user/list','unitId','2hXAWdx','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','customRanges','comment','_initUserSync','userID','onStarting','UNIVER_UNKNOWN','/reply','_userService','2743866aybfYS','_sessionService','comments','_threadCommentModel','_threadCommentDataSource','addComment','COMMENT','_initDataSource','updateComment','Solve','_httpService','Edit','add','syncUpdateMutationToColla','forEach','22960BkdIzD','onReady','filter','resolveComment','_commentService','type','solved','12218aLEqco','userId','/solved','Add','values','find','delete','replyId','478170JPEEaa','post','length','get','size','root','/add','getUnit','payload','UNRECOGNIZED','requireSession','body','thread-comment-data-source.config','subscribe','deleteComment','OpenOrReOpen','defineProperty','setConfig','stringify','resolved','users','12387XioJrk','/edit','personId','symbol','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','reply','pipe','2627376ltFMWH','Unknown','2079eJtcOz','_init','rangeId','replies','commentUpdate$','code','/universer-api/comment/unit/','content','error','Delete','getMemberID','addUser','ref','Reply','createTimestamp','disposeWithMe','Solved','map','/list','10986hLOMHH','_configService','format'];_0x2411=function(){return _0x1a0e82;};return _0x2411();}g=te([N(0x0,_0x1f38fa),N(0x1,_0x59bc1b(f))],g);var se=Object[_0x14e8f6(0xe4)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x43cb38,_0x1f3646,_0x42ea57)=>_0x1f3646 in _0x43cb38?se(_0x43cb38,_0x1f3646,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x42ea57}):_0x43cb38[_0x1f3646]=_0x42ea57,ie=(_0x375564,_0x1c0104,_0x51397b,_0x108c4f)=>{for(var _0x4d036e=_0x108c4f>0x1?void 0x0:_0x108c4f?oe(_0x1c0104,_0x51397b):_0x1c0104,_0x4a1f92=_0x375564['length']-0x1,_0x14238c;_0x4a1f92>=0x0;_0x4a1f92--)(_0x14238c=_0x375564[_0x4a1f92])&&(_0x4d036e=_0x14238c(_0x4d036e)||_0x4d036e);return _0x4d036e;},w=(_0x179abf,_0x153d70)=>(_0x16f650,_0x46cccf)=>_0x153d70(_0x16f650,_0x46cccf,_0x179abf),$=(_0x3ecd5,_0x2350f5,_0x4ace5b)=>ne(_0x3ecd5,typeof _0x2350f5!=_0x14e8f6(0xec)?_0x2350f5+'':_0x2350f5,_0x4ace5b);let b=class extends _0x41398f{constructor(_0x342318=M,_0x1801b8,_0x150ec8){const _0xc3e8ac=_0x14e8f6;super(),this[_0xc3e8ac(0x112)]=_0x342318,this['_injector']=_0x1801b8,this['_configService']=_0x150ec8;const {..._0x14cfbf}=_0xdfd847({},M,this['_config']);this[_0xc3e8ac(0x108)][_0xc3e8ac(0xe5)](z,_0x14cfbf);}[_0x14e8f6(0x11f)](){const _0x5cb8e6=_0x14e8f6;[[f],[g],[S]][_0x5cb8e6(0xc4)](_0x5459d8=>{const _0x297049=_0x5cb8e6;this[_0x297049(0xef)][_0x297049(0xc2)](_0x5459d8);});}[_0x14e8f6(0xc6)](){const _0xf28336=_0x14e8f6;this[_0xf28336(0xef)][_0xf28336(0xd7)](g),this['_injector'][_0xf28336(0xd7)](S);}};$(b,'pluginName',W),$(b,_0x14e8f6(0xca),_0x454a2c[_0x14e8f6(0x120)]),b=ie([_0x4be0bf(_0xce439,_0x281d67,_0x2fa253),w(0x1,_0x59bc1b(_0x5ee519)),w(0x2,_0x38206b)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4be095=_0x46ea;(function(_0x45e5b3,_0x4fb667){const _0x23c293=_0x46ea,_0xba98f1=_0x45e5b3();while(!![]){try{const _0x11a11c=parseInt(_0x23c293(0x14d))/0x1*(-parseInt(_0x23c293(0x12a))/0x2)+-parseInt(_0x23c293(0x158))/0x3+-parseInt(_0x23c293(0x155))/0x4+parseInt(_0x23c293(0x135))/0x5*(-parseInt(_0x23c293(0x12d))/0x6)+-parseInt(_0x23c293(0x114))/0x7+-parseInt(_0x23c293(0x11c))/0x8*(-parseInt(_0x23c293(0x134))/0x9)+-parseInt(_0x23c293(0x157))/0xa*(-parseInt(_0x23c293(0x10c))/0xb);if(_0x11a11c===_0x4fb667)break;else _0xba98f1['push'](_0xba98f1['shift']());}catch(_0x164068){_0xba98f1['push'](_0xba98f1['shift']());}}}(_0x2140,0xe8b73));import{CommentService as _0x560a2f,CollaborationSessionService as _0x211d73,UniverCollaborationClientPlugin as _0x1dff39}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xea7e1c}from'@univerjs-pro/license';import{dayjs as _0x13f57c,UserManagerService as _0x57bf20,Inject as _0x397f67,Injector as _0xc959e6,Disposable as _0x3714c3,CustomRangeType as _0x32b452,UniverInstanceType as _0x15cbc2,DependentOn as _0x5f982,IConfigService as _0x129d4e,Plugin as _0x29b97b,merge as _0x596754}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5c16f9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4bce87,IThreadCommentDataSourceService as _0x3222e2}from'@univerjs/thread-comment';import{bufferTime as _0x1c1e04}from'rxjs';import{HTTPService as _0x2e19d5}from'@univerjs/network';const W=_0x4be095(0x14f);var I=(_0x4c7dcd=>(_0x4c7dcd[_0x4c7dcd[_0x4be095(0x113)]=0x0]='OpenOrReOpen',_0x4c7dcd[_0x4c7dcd[_0x4be095(0x154)]=0x1]=_0x4be095(0x154),_0x4c7dcd[_0x4c7dcd['UNRECOGNIZED']=-0x1]=_0x4be095(0x13f),_0x4c7dcd))(I||{}),v=(_0x810411=>(_0x810411[_0x810411[_0x4be095(0x148)]=0x0]=_0x4be095(0x148),_0x810411[_0x810411['Add']=0x1]='Add',_0x810411[_0x810411[_0x4be095(0x11d)]=0x2]=_0x4be095(0x11d),_0x810411[_0x810411[_0x4be095(0x117)]=0x3]=_0x4be095(0x117),_0x810411[_0x810411[_0x4be095(0x123)]=0x4]=_0x4be095(0x123),_0x810411[_0x810411[_0x4be095(0x139)]=0x5]='Solve',_0x810411[_0x810411['UNRECOGNIZED']=-0x1]=_0x4be095(0x13f),_0x810411))(v||{});const D=_0x38968f=>_0x13f57c(new Date(+_0x38968f))[_0x4be095(0x119)](_0x4be095(0x12e)),B=async(_0x1cb238,_0x4c95f7)=>{const _0x265463=_0x4be095,_0x426a8e=_0x1cb238[_0x265463(0x153)](_0x57bf20),_0x5d1acb=_0x1cb238[_0x265463(0x153)](_0x2e19d5);_0x4c95f7[_0x265463(0x107)](_0x2e621c=>{_0x426a8e['getUser'](_0x2e621c)&&_0x4c95f7['delete'](_0x2e621c);}),_0x4c95f7[_0x265463(0x142)]&&(await _0x5d1acb[_0x265463(0x153)](_0x265463(0x120),{'params':{'userIDs':[..._0x4c95f7]}}))[_0x265463(0x138)]['users'][_0x265463(0x107)](_0x3df401=>{const _0x2b7804=_0x265463;_0x3df401&&_0x426a8e[_0x2b7804(0x133)](_0x3df401);});};var K=Object[_0x4be095(0x100)],V=(_0x5e3472,_0x22337f,_0x887530,_0x5869d1)=>{for(var _0x5346d6=_0x5869d1>0x1?void 0x0:_0x5869d1?K(_0x22337f,_0x887530):_0x22337f,_0x25b942=_0x5e3472['length']-0x1,_0x4073b5;_0x25b942>=0x0;_0x25b942--)(_0x4073b5=_0x5e3472[_0x25b942])&&(_0x5346d6=_0x4073b5(_0x5346d6)||_0x5346d6);return _0x5346d6;},p=(_0x1e3c23,_0x5f31bd)=>(_0x4a2bc7,_0x4acfcd)=>_0x5f31bd(_0x4a2bc7,_0x4acfcd,_0x1e3c23);let S=class extends _0x3714c3{constructor(_0x251b8b,_0x296f2f,_0x26f7a4,_0x22b262){const _0xbb1f4c=_0x4be095;super(),this[_0xbb1f4c(0x101)]=_0x251b8b,this[_0xbb1f4c(0x13d)]=_0x296f2f,this[_0xbb1f4c(0x13a)]=_0x26f7a4,this[_0xbb1f4c(0x10f)]=_0x22b262,this[_0xbb1f4c(0x146)](),this['_initUserSync']();}['_initUserSync'](){const _0x330dae=_0x4be095;this[_0x330dae(0x121)](this[_0x330dae(0x13d)][_0x330dae(0x125)][_0x330dae(0x105)](_0x1c1e04(0x10))[_0x330dae(0x122)](_0x1f35d0=>{const _0x371aca=_0x330dae,_0x119497=new Set();_0x1f35d0[_0x371aca(0x107)](_0x3f4878=>{const _0x4440b1=_0x371aca;switch(_0x3f4878[_0x4440b1(0x129)]){case'add':{const _0x1c797a=_0x3f4878['payload']['personId'];_0x119497['add'](_0x1c797a);break;}}}),B(this['_injector'],_0x119497);}));}['_init'](){const _0x1bb09e=_0x4be095;this['disposeWithMe'](this[_0x1bb09e(0x101)][_0x1bb09e(0x125)][_0x1bb09e(0x122)](async _0x46bb1a=>{const _0x25f2bc=_0x1bb09e;var _0x3ddfb4,_0x10ad86,_0xc279d3,_0x4c6832;const _0x44e216=(_0x3ddfb4=this[_0x25f2bc(0x13d)][_0x25f2bc(0x149)](_0x46bb1a['unitId'])['find'](_0x93c4b7=>_0x93c4b7[_0x25f2bc(0x109)]===_0x46bb1a[_0x25f2bc(0x109)]))==null?void 0x0:_0x3ddfb4[_0x25f2bc(0x130)];if(!_0x44e216)return;const {unitId:_0x47ab1f,subUnitId:_0x378aea}=_0x44e216;switch(_0x46bb1a[_0x25f2bc(0x13e)]&&this['_userService'][_0x25f2bc(0x133)](_0x46bb1a[_0x25f2bc(0x13e)]),_0x46bb1a[_0x25f2bc(0x129)]){case v['Add']:break;case v[_0x25f2bc(0x11d)]:{this[_0x25f2bc(0x13d)][_0x25f2bc(0x144)](_0x47ab1f,_0x378aea,{'unitId':_0x47ab1f,'subUnitId':_0x378aea,'ref':'','id':_0x46bb1a['replyId'],'dT':D(+_0x46bb1a['createTimestamp']),'threadId':_0x46bb1a[_0x25f2bc(0x109)],'personId':(_0xc279d3=(_0x10ad86=_0x46bb1a[_0x25f2bc(0x13e)])==null?void 0x0:_0x10ad86[_0x25f2bc(0x124)])!=null?_0xc279d3:_0x46bb1a[_0x25f2bc(0x12f)],'text':JSON[_0x25f2bc(0x140)](_0x46bb1a[_0x25f2bc(0x102)]),'parentId':_0x44e216['id']});break;}case v[_0x25f2bc(0x123)]:{const _0x1b5ce1=this['_threadCommentModel']['getComment'](_0x47ab1f,_0x378aea,_0x46bb1a[_0x25f2bc(0x128)]);_0x1b5ce1&&_0x1b5ce1[_0x25f2bc(0x108)]&&this[_0x25f2bc(0x13d)][_0x25f2bc(0x136)](_0x47ab1f,_0x378aea,_0x46bb1a[_0x25f2bc(0x128)]);break;}case v[_0x25f2bc(0x117)]:{this[_0x25f2bc(0x13d)][_0x25f2bc(0x152)](_0x47ab1f,_0x378aea,{'commentId':_0x46bb1a[_0x25f2bc(0x128)],'text':JSON[_0x25f2bc(0x140)](_0x46bb1a[_0x25f2bc(0x102)])});break;}case v[_0x25f2bc(0x139)]:{const _0xa362c0=(_0x4c6832=this[_0x25f2bc(0x13d)][_0x25f2bc(0x149)](_0x46bb1a['unitId'])['find'](_0x475a8b=>_0x475a8b['threadId']===_0x46bb1a[_0x25f2bc(0x109)]))==null?void 0x0:_0x4c6832[_0x25f2bc(0x130)];_0xa362c0&&this['_threadCommentModel'][_0x25f2bc(0x151)](_0x47ab1f,_0x378aea,_0xa362c0['id'],_0x46bb1a[_0x25f2bc(0x13b)]===I[_0x25f2bc(0x154)]);break;}}}));}};S=V([p(0x0,_0x397f67(_0x560a2f)),p(0x1,_0x397f67(_0x4bce87)),p(0x2,_0x397f67(_0x57bf20)),p(0x3,_0x397f67(_0xc959e6))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2cbff2,_0x4714ee,_0x53d45e,_0x6ff2c4)=>{const _0x499be7=_0x4be095;for(var _0x37e8fc=_0x6ff2c4>0x1?void 0x0:_0x6ff2c4?k(_0x4714ee,_0x53d45e):_0x4714ee,_0x453551=_0x2cbff2[_0x499be7(0x14b)]-0x1,_0x3e7ce2;_0x453551>=0x0;_0x453551--)(_0x3e7ce2=_0x2cbff2[_0x453551])&&(_0x37e8fc=_0x3e7ce2(_0x37e8fc)||_0x37e8fc);return _0x37e8fc;},_=(_0x26619b,_0xd94b76)=>(_0x415ac1,_0x29d130)=>_0xd94b76(_0x415ac1,_0x29d130,_0x26619b);function X(_0x33f314,_0x15e9f8){const _0x37095a=_0x4be095,_0x58e2f1=_0x33f314[_0x37095a(0x104)][0x0];return{..._0x15e9f8,'id':_0x58e2f1[_0x37095a(0x128)],'resolved':_0x33f314['solved']===0x1,'dT':D(_0x58e2f1[_0x37095a(0x11f)]),'personId':_0x58e2f1[_0x37095a(0x12f)],'threadId':_0x58e2f1[_0x37095a(0x109)]};}function ee(_0x421d9c,_0x14134,_0x255509){const _0x4c76ce=_0x4be095;var _0xe0dc1d,_0x53fae1;if(((_0x53fae1=(_0xe0dc1d=_0x421d9c==null?void 0x0:_0x421d9c[_0x4c76ce(0x104)])==null?void 0x0:_0xe0dc1d[_0x4c76ce(0x14b)])!=null?_0x53fae1:0x0)>0x0){const _0x35b8d3=(_0x5a4e43,_0x1655b5)=>({'id':_0x5a4e43['replyId'],'threadId':_0x5a4e43[_0x4c76ce(0x109)],'dT':D(_0x5a4e43[_0x4c76ce(0x11f)]),'personId':_0x5a4e43[_0x4c76ce(0x12f)],'resolved':_0x421d9c[_0x4c76ce(0x13b)]===I[_0x4c76ce(0x154)],'unitId':_0x14134,'subUnitId':_0x255509,'text':JSON[_0x4c76ce(0x140)](_0x5a4e43['content']),'parentId':_0x1655b5}),_0x4b5ffe=_0x35b8d3(_0x421d9c[_0x4c76ce(0x104)][0x0]);return{..._0x4b5ffe,'children':_0x421d9c[_0x4c76ce(0x104)][_0x4c76ce(0x10a)](0x1)[_0x4c76ce(0x116)](_0x100257=>_0x35b8d3(_0x100257,_0x4b5ffe['id']))};}return null;}let f=class{constructor(_0x2a34d9,_0x10788d,_0x463dc1,_0x16d5dc){const _0xb52375=_0x4be095;this['_httpService']=_0x2a34d9,this[_0xb52375(0x13a)]=_0x10788d,this[_0xb52375(0x15c)]=_0x463dc1,this[_0xb52375(0x10f)]=_0x16d5dc;}async[_0x4be095(0x144)](_0x5c4552){const _0xbc9bab=_0x4be095;var _0x155c41,_0x5cbe85;const {parentId:_0x2516e6,unitId:_0x1c00ac,text:_0xcb792a,threadId:_0x4c6716}=_0x5c4552,_0x4afe34=(_0x5cbe85=(_0x155c41=_0xcb792a[_0xbc9bab(0x15a)])==null?void 0x0:_0x155c41['filter'](_0xf3d5c3=>_0xf3d5c3['rangeType']===_0x32b452[_0xbc9bab(0x110)])[_0xbc9bab(0x116)](_0x4e5082=>_0x4e5082[_0xbc9bab(0x13c)]))!=null?_0x5cbe85:[],_0x405e3a=JSON[_0xbc9bab(0x106)](_0xcb792a),_0x18d6f9=(await this[_0xbc9bab(0x15c)]['requireSession'](_0x1c00ac))['getMemberID']();if(_0x2516e6){const _0x5b4168={'memberId':_0x18d6f9,'unitId':_0x1c00ac,'content':_0x405e3a,'mention':_0x4afe34,'threadId':_0x4c6716},_0x4babb5=(await this[_0xbc9bab(0x127)]['post']('/universer-api/comment/unit/'+_0x1c00ac+_0xbc9bab(0x112),{'body':_0x5b4168}))['body'][_0xbc9bab(0x131)];return{..._0x5c4552,'id':_0x4babb5['replyId'],'dT':_0x13f57c(+_0x4babb5[_0xbc9bab(0x11f)])[_0xbc9bab(0x119)](_0xbc9bab(0x12e)),'personId':_0x4babb5[_0xbc9bab(0x12f)]};}else{const _0xb4f414={'memberId':_0x18d6f9,'unitId':_0x1c00ac,'content':_0x405e3a,'mention':_0x4afe34},_0x4bb7d8=await this[_0xbc9bab(0x127)]['post'](_0xbc9bab(0x147)+_0x1c00ac+_0xbc9bab(0x14c),{'body':_0xb4f414});return X(_0x4bb7d8[_0xbc9bab(0x138)][_0xbc9bab(0x118)],_0x5c4552);}}async[_0x4be095(0x152)](_0x4fb029){const _0x4ae3db=_0x4be095;var _0x501d8e,_0x106657;const {text:_0x53400b,unitId:_0x2fb1ea}=_0x4fb029,_0x2c0804=(_0x106657=(_0x501d8e=_0x53400b[_0x4ae3db(0x15a)])==null?void 0x0:_0x501d8e['filter'](_0x2c8247=>_0x2c8247[_0x4ae3db(0x12b)]===_0x32b452['COMMENT'])[_0x4ae3db(0x116)](_0x3a85d7=>_0x3a85d7['rangeId']))!=null?_0x106657:[],_0x5becd9=JSON[_0x4ae3db(0x106)](_0x53400b),_0x9d06cd=_0x4fb029[_0x4ae3db(0x109)],_0x5c582c=_0x4fb029['id'],_0x20f04c={'memberId':(await this['_sessionService'][_0x4ae3db(0x11e)](_0x2fb1ea))[_0x4ae3db(0x126)](),'unitId':_0x2fb1ea,'threadId':_0x9d06cd,'mention':_0x2c0804,'content':_0x5becd9,'replyId':_0x5c582c},_0x207485=await this[_0x4ae3db(0x127)][_0x4ae3db(0x137)](_0x4ae3db(0x147)+_0x2fb1ea+_0x4ae3db(0x145),{'body':_0x20f04c});return!_0x207485[_0x4ae3db(0x138)][_0x4ae3db(0x15b)]||_0x207485[_0x4ae3db(0x138)][_0x4ae3db(0x15b)][_0x4ae3db(0x156)]===0x1;}async[_0x4be095(0x151)](_0x199cc7){const _0x3271ce=_0x4be095,{unitId:_0x219814}=_0x199cc7,_0x7828d9=_0x199cc7[_0x3271ce(0x109)],_0x3e6204={'memberId':this[_0x3271ce(0x13a)]['getCurrentUser']()['userID'],'unitId':_0x219814,'threadId':_0x7828d9,'solved':_0x199cc7['resolved']?I[_0x3271ce(0x154)]:I[_0x3271ce(0x113)]},_0x44137f=await this['_httpService'][_0x3271ce(0x137)](_0x3271ce(0x147)+_0x219814+'/solved',{'body':_0x3e6204});return!_0x44137f['body'][_0x3271ce(0x15b)]||_0x44137f[_0x3271ce(0x138)]['error']['code']===0x1;}async['deleteComment'](_0x1f8a57,_0x186baf,_0x4c5f29,_0x158777){const _0x48dd08=_0x4be095,_0x2a7747={'memberId':(await this['_sessionService']['requireSession'](_0x1f8a57))[_0x48dd08(0x126)](),'threadId':_0x4c5f29,'replyId':_0x158777,'unitId':_0x1f8a57},_0x3c7f1c=await this[_0x48dd08(0x127)][_0x48dd08(0x137)](_0x48dd08(0x147)+_0x1f8a57+_0x48dd08(0x14e),{'body':_0x2a7747});return!_0x3c7f1c['body']['error']||_0x3c7f1c[_0x48dd08(0x138)][_0x48dd08(0x15b)][_0x48dd08(0x156)]===0x1;}async['listComments'](_0x3fd2e8,_0x2ca23a,_0x44dbf3){const _0x20fbeb=_0x4be095,_0x3780de={'unitId':_0x3fd2e8,'threadId':_0x44dbf3},_0x10c092=await this[_0x20fbeb(0x127)][_0x20fbeb(0x137)](_0x20fbeb(0x147)+_0x3fd2e8+_0x20fbeb(0x11a),{'body':_0x3780de}),_0x4d6e95=_0x44dbf3[_0x20fbeb(0x116)](_0x27b28a=>ee(_0x10c092['body']['comments'][_0x27b28a],_0x3fd2e8,_0x2ca23a))[_0x20fbeb(0x10b)](Boolean);return Object[_0x20fbeb(0x143)](_0x10c092[_0x20fbeb(0x138)]['users'])[_0x20fbeb(0x107)](_0x43543e=>{const _0x547a95=_0x20fbeb;this[_0x547a95(0x13a)][_0x547a95(0x133)](_0x43543e);}),_0x4d6e95;}[_0x4be095(0x10e)](_0x2803ab){const _0x5b4993=_0x4be095;return{'id':_0x2803ab['id'],'threadId':_0x2803ab[_0x5b4993(0x109)],'ref':_0x2803ab[_0x5b4993(0x14a)]};}};function _0x2140(){const _0x2adab7=['values','addComment','/edit','_init','/universer-api/comment/unit/','Unknown','getUnit','ref','length','/add','1DsbBNd','/delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','resolveComment','updateComment','get','Solved','1849212eaZzcN','code','50803570HQnFoL','1332279BTtIWs','_initDataSource','customRanges','error','_sessionService','getOwnPropertyDescriptor','_commentService','content','syncUpdateMutationToColla','replies','pipe','stringify','forEach','parentId','threadId','slice','filter','11akaRPe','pluginName','saveCommentToSnapshot','_injector','COMMENT','_configService','/reply','OpenOrReOpen','1267385bifqvC','_threadCommentDataSourceService','map','Edit','comment','format','/list','dataSource','24qWZdoP','Reply','requireSession','createTimestamp','/universer-api/user/list','disposeWithMe','subscribe','Delete','userID','commentUpdate$','getMemberID','_httpService','replyId','type','3437744iDfKNK','rangeType','onReady','62754YZTMol','YYYY/MM/DD\x20HH:mm','userId','root','reply','_threadCommentDataSource','addUser','649926GqKXwc','735cOeuNc','deleteComment','post','body','Solve','_userService','solved','rangeId','_threadCommentModel','user','UNRECOGNIZED','parse','_config','size'];_0x2140=function(){return _0x2adab7;};return _0x2140();}f=Q([_(0x0,_0x397f67(_0x2e19d5)),_(0x1,_0x397f67(_0x57bf20)),_(0x2,_0x397f67(_0x211d73)),_(0x3,_0x397f67(_0xc959e6))],f);var re=Object[_0x4be095(0x100)],te=(_0x5a4a3c,_0x45b7aa,_0x313bb7,_0x428ae2)=>{const _0x5dad5c=_0x4be095;for(var _0x4203e9=_0x428ae2>0x1?void 0x0:_0x428ae2?re(_0x45b7aa,_0x313bb7):_0x45b7aa,_0x1209ca=_0x5a4a3c[_0x5dad5c(0x14b)]-0x1,_0x26f574;_0x1209ca>=0x0;_0x1209ca--)(_0x26f574=_0x5a4a3c[_0x1209ca])&&(_0x4203e9=_0x26f574(_0x4203e9)||_0x4203e9);return _0x4203e9;},N=(_0x4fd238,_0x199b12)=>(_0x2d1e47,_0x2c4ffc)=>_0x199b12(_0x2d1e47,_0x2c4ffc,_0x4fd238);let g=class extends _0x3714c3{constructor(_0x30440c,_0x54fe54){const _0x5af7ed=_0x4be095;super(),this[_0x5af7ed(0x115)]=_0x30440c,this[_0x5af7ed(0x132)]=_0x54fe54,this[_0x5af7ed(0x159)]();}[_0x4be095(0x159)](){const _0x4c805c=_0x4be095;this[_0x4c805c(0x115)][_0x4c805c(0x11b)]=this[_0x4c805c(0x132)],this[_0x4c805c(0x115)][_0x4c805c(0x103)]=!0x1;}};g=te([N(0x0,_0x3222e2),N(0x1,_0x397f67(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x2a86e2,_0x3f721d,_0x3e1fd5)=>_0x3f721d in _0x2a86e2?se(_0x2a86e2,_0x3f721d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e1fd5}):_0x2a86e2[_0x3f721d]=_0x3e1fd5,ie=(_0x5b733f,_0x74d5,_0x51f4ec,_0x9ffcc1)=>{const _0x457dc5=_0x4be095;for(var _0x1edd34=_0x9ffcc1>0x1?void 0x0:_0x9ffcc1?oe(_0x74d5,_0x51f4ec):_0x74d5,_0x3c5226=_0x5b733f[_0x457dc5(0x14b)]-0x1,_0x5ad2f1;_0x3c5226>=0x0;_0x3c5226--)(_0x5ad2f1=_0x5b733f[_0x3c5226])&&(_0x1edd34=_0x5ad2f1(_0x1edd34)||_0x1edd34);return _0x1edd34;},w=(_0x365af3,_0x2cadd7)=>(_0x5f4afc,_0xc0a57a)=>_0x2cadd7(_0x5f4afc,_0xc0a57a,_0x365af3),$=(_0x48dbe7,_0x265459,_0x57b22a)=>ne(_0x48dbe7,typeof _0x265459!='symbol'?_0x265459+'':_0x265459,_0x57b22a);let b=class extends _0x29b97b{constructor(_0x5323fc=M,_0x3877fe,_0x5e38e0){const _0xc73e41=_0x4be095;super(),this[_0xc73e41(0x141)]=_0x5323fc,this['_injector']=_0x3877fe,this[_0xc73e41(0x111)]=_0x5e38e0;const {..._0x1c1163}=_0x596754({},M,this[_0xc73e41(0x141)]);this[_0xc73e41(0x111)][_0xc73e41(0x150)](z,_0x1c1163);}['onStarting'](){const _0x24cd04=_0x4be095;[[f],[g],[S]][_0x24cd04(0x107)](_0x3fca81=>{const _0x4480c5=_0x24cd04;this[_0x4480c5(0x10f)]['add'](_0x3fca81);});}[_0x4be095(0x12c)](){const _0x3e06bb=_0x4be095;this[_0x3e06bb(0x10f)]['get'](g),this[_0x3e06bb(0x10f)][_0x3e06bb(0x153)](S);}};function _0x46ea(_0x24dd1f,_0x5d9bc0){const _0x21405a=_0x2140();return _0x46ea=function(_0x46eabc,_0x481a1a){_0x46eabc=_0x46eabc-0x100;let _0x30d7c9=_0x21405a[_0x46eabc];return _0x30d7c9;},_0x46ea(_0x24dd1f,_0x5d9bc0);}$(b,_0x4be095(0x10d),W),$(b,_0x4be095(0x129),_0x15cbc2['UNIVER_UNKNOWN']),b=ie([_0x5f982(_0x5c16f9,_0x1dff39,_0xea7e1c),w(0x1,_0x397f67(_0xc959e6)),w(0x2,_0x129d4e)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x246c(_0x3defc2,_0x4afd9e){const _0x38da22=_0x38da();return _0x246c=function(_0x246c25,_0xccc5d3){_0x246c25=_0x246c25-0xe2;let _0x3c5cab=_0x38da22[_0x246c25];return _0x3c5cab;},_0x246c(_0x3defc2,_0x4afd9e);}function _0x38da(){const _0x1990a0=['UniverProCollaborationClient','UNIVER_UNKNOWN','/edit','Unknown','11FZpYVU','values','deleteComment','getComment','getUser','IThreadCommentDataSourceService','UniverInstanceType','bufferTime','49703GfHtRf','solved','5608cfhnji','27704724yNZnRc','@univerjs-pro/collaboration-client','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','8ziojMR','onReady','_threadCommentDataSource','DependentOn','getCurrentUser','dataSource','code','UniverThreadCommentUi','addUser','UniverProLicense','reply','_initUserSync','Plugin','_httpService','_threadCommentDataSourceService','resolveComment','object','pipe','disposeWithMe','/universer-api/user/list','ref','386406YyFrqM','OpenOrReOpen','ThreadCommentModel','forEach','personId','_sessionService','Delete','rxjs','/list','defineProperty','saveCommentToSnapshot','getMemberID','@univerjs/network','createTimestamp','delete','parse','syncUpdateMutationToColla','/solved','/universer-api/comment/unit/','content','UniverThreadCommentUIPlugin','map','UniverThreadCommentDataSourcePlugin','userId','symbol','_userService','threadId','COMMENT','Inject','filter','/add','CommentService','format','commentUpdate$','_threadCommentModel','UNRECOGNIZED','_configService','comment','Solved','merge','Module','amd','UniverThreadComment','resolved','6134330mgmwua','getUnit','payload','673830kOocEy','Add','HTTPService','@univerjs/thread-comment','slice','root','find','customRanges','YYYY/MM/DD\x20HH:mm','addComment','Disposable','listComments','Reply','UniverCore','length','userID','get','type','77VBSyME','body','stringify','CustomRangeType','_init','replyId','unitId','rangeType','Edit','user','/reply','comments','_injector','2612538HvFvIB','post','6cDLHqN','_commentService','exports','UserManagerService','UniverNetwork','Injector','rangeId','subscribe','dayjs','9783FetaTW','Solve','error','updateComment','@univerjs-pro/license','add','@univerjs/thread-comment-ui','requireSession','size','getOwnPropertyDescriptor','users'];_0x38da=function(){return _0x1990a0;};return _0x38da();}(function(_0x5bd4f0,_0x213df5){const _0x40218a=_0x246c,_0x4101b2=_0x5bd4f0();while(!![]){try{const _0x20b4c2=parseInt(_0x40218a(0x141))/0x1*(-parseInt(_0x40218a(0x121))/0x2)+-parseInt(_0x40218a(0x11f))/0x3+-parseInt(_0x40218a(0x148))/0x4*(parseInt(_0x40218a(0x100))/0x5)+parseInt(_0x40218a(0x15d))/0x6*(-parseInt(_0x40218a(0x112))/0x7)+-parseInt(_0x40218a(0x143))/0x8*(-parseInt(_0x40218a(0x12a))/0x9)+-parseInt(_0x40218a(0xfd))/0xa+parseInt(_0x40218a(0x139))/0xb*(parseInt(_0x40218a(0x144))/0xc);if(_0x20b4c2===_0x213df5)break;else _0x4101b2['push'](_0x4101b2['shift']());}catch(_0x510dae){_0x4101b2['push'](_0x4101b2['shift']());}}}(_0x38da,0x70277),function(_0x6043f9,_0x45fb63){const _0x48ec58=_0x246c;typeof exports==_0x48ec58(0x158)&&typeof module<'u'?_0x45fb63(exports,require('@univerjs-pro/collaboration-client'),require(_0x48ec58(0x12e)),require('@univerjs/core'),require(_0x48ec58(0x130)),require('@univerjs/thread-comment'),require(_0x48ec58(0x164)),require(_0x48ec58(0x169))):typeof define=='function'&&define[_0x48ec58(0xfa)]?define([_0x48ec58(0x123),_0x48ec58(0x145),_0x48ec58(0x12e),'@univerjs/core',_0x48ec58(0x130),_0x48ec58(0x103),_0x48ec58(0x164),_0x48ec58(0x169)],_0x45fb63):(_0x6043f9=typeof globalThis<'u'?globalThis:_0x6043f9||self,_0x45fb63(_0x6043f9['UniverProThreadCommentDatasource']={},_0x6043f9[_0x48ec58(0x135)],_0x6043f9[_0x48ec58(0x151)],_0x6043f9[_0x48ec58(0x10d)],_0x6043f9[_0x48ec58(0x14f)],_0x6043f9[_0x48ec58(0xfb)],_0x6043f9[_0x48ec58(0x164)],_0x6043f9[_0x48ec58(0x125)]));}(this,function(_0x583ef1,_0x2e266b,_0x11f360,_0x208443,_0x2f4e2e,_0x195a9a,_0x306e6b,_0x2e4d72){'use strict';const _0x1da00a=_0x246c;const _0x36ea8d=_0x1da00a(0x147);var _0x4ea4ca=(_0x172f68=>(_0x172f68[_0x172f68['OpenOrReOpen']=0x0]=_0x1da00a(0x15e),_0x172f68[_0x172f68[_0x1da00a(0xf7)]=0x1]=_0x1da00a(0xf7),_0x172f68[_0x172f68[_0x1da00a(0xf4)]=-0x1]=_0x1da00a(0xf4),_0x172f68))(_0x4ea4ca||{}),_0x45d2dd=(_0x317a96=>(_0x317a96[_0x317a96[_0x1da00a(0x138)]=0x0]='Unknown',_0x317a96[_0x317a96['Add']=0x1]=_0x1da00a(0x101),_0x317a96[_0x317a96[_0x1da00a(0x10c)]=0x2]=_0x1da00a(0x10c),_0x317a96[_0x317a96[_0x1da00a(0x11a)]=0x3]=_0x1da00a(0x11a),_0x317a96[_0x317a96[_0x1da00a(0x163)]=0x4]='Delete',_0x317a96[_0x317a96[_0x1da00a(0x12b)]=0x5]=_0x1da00a(0x12b),_0x317a96[_0x317a96[_0x1da00a(0xf4)]=-0x1]=_0x1da00a(0xf4),_0x317a96))(_0x45d2dd||{});const _0x5392f0=_0x215fc1=>_0x208443[_0x1da00a(0x129)](new Date(+_0x215fc1))[_0x1da00a(0xf1)]('YYYY/MM/DD\x20HH:mm'),_0x3e9aa4=async(_0x28c4fc,_0x1bbb77)=>{const _0x58977e=_0x1da00a,_0x3a3732=_0x28c4fc[_0x58977e(0x110)](_0x208443[_0x58977e(0x124)]),_0x34b877=_0x28c4fc[_0x58977e(0x110)](_0x2e4d72[_0x58977e(0x102)]);_0x1bbb77[_0x58977e(0x160)](_0x45a695=>{const _0x5c5b70=_0x58977e;_0x3a3732[_0x5c5b70(0x13d)](_0x45a695)&&_0x1bbb77[_0x5c5b70(0x16b)](_0x45a695);}),_0x1bbb77[_0x58977e(0x132)]&&(await _0x34b877[_0x58977e(0x110)](_0x58977e(0x15b),{'params':{'userIDs':[..._0x1bbb77]}}))['body'][_0x58977e(0x134)][_0x58977e(0x160)](_0x51a145=>{_0x51a145&&_0x3a3732['addUser'](_0x51a145);});};var _0x7b1aae=Object[_0x1da00a(0x133)],_0xab3793=(_0xb3df,_0x4ff128,_0x57275c,_0x16708c)=>{const _0x53db84=_0x1da00a;for(var _0x544424=_0x16708c>0x1?void 0x0:_0x16708c?_0x7b1aae(_0x4ff128,_0x57275c):_0x4ff128,_0x43ca07=_0xb3df[_0x53db84(0x10e)]-0x1,_0x3ad77b;_0x43ca07>=0x0;_0x43ca07--)(_0x3ad77b=_0xb3df[_0x43ca07])&&(_0x544424=_0x3ad77b(_0x544424)||_0x544424);return _0x544424;},_0x34a507=(_0x4941cb,_0x1cf498)=>(_0x4c13fe,_0x2240ac)=>_0x1cf498(_0x4c13fe,_0x2240ac,_0x4941cb);let _0x2dbee5=class extends _0x208443[_0x1da00a(0x10a)]{constructor(_0x40ba21,_0x143e54,_0x271992,_0x12fed0){const _0x270729=_0x1da00a;super(),this['_commentService']=_0x40ba21,this['_threadCommentModel']=_0x143e54,this[_0x270729(0xea)]=_0x271992,this['_injector']=_0x12fed0,this[_0x270729(0x116)](),this[_0x270729(0x153)]();}[_0x1da00a(0x153)](){const _0x46d136=_0x1da00a;this[_0x46d136(0x15a)](this[_0x46d136(0xf3)][_0x46d136(0xf2)][_0x46d136(0x159)](_0x306e6b[_0x46d136(0x140)](0x10))[_0x46d136(0x128)](_0x1eafca=>{const _0x427f8b=_0x46d136,_0x7e6443=new Set();_0x1eafca[_0x427f8b(0x160)](_0x269ca2=>{const _0x1c7430=_0x427f8b;switch(_0x269ca2[_0x1c7430(0x111)]){case'add':{const _0x538ee4=_0x269ca2[_0x1c7430(0xff)][_0x1c7430(0x161)];_0x7e6443[_0x1c7430(0x12f)](_0x538ee4);break;}}}),_0x3e9aa4(this[_0x427f8b(0x11e)],_0x7e6443);}));}[_0x1da00a(0x116)](){const _0x5f8f62=_0x1da00a;this[_0x5f8f62(0x15a)](this[_0x5f8f62(0x122)][_0x5f8f62(0xf2)][_0x5f8f62(0x128)](async _0x80c35c=>{const _0x1135fd=_0x5f8f62;var _0x56bcba,_0x4b1355,_0x22c527,_0x1f86b5;const _0x5ccd78=(_0x56bcba=this[_0x1135fd(0xf3)]['getUnit'](_0x80c35c[_0x1135fd(0x118)])[_0x1135fd(0x106)](_0x45ddc8=>_0x45ddc8[_0x1135fd(0xeb)]===_0x80c35c[_0x1135fd(0xeb)]))==null?void 0x0:_0x56bcba[_0x1135fd(0x105)];if(!_0x5ccd78)return;const {unitId:_0x4f29ad,subUnitId:_0x31702f}=_0x5ccd78;switch(_0x80c35c[_0x1135fd(0x11b)]&&this['_userService'][_0x1135fd(0x150)](_0x80c35c['user']),_0x80c35c[_0x1135fd(0x111)]){case _0x45d2dd[_0x1135fd(0x101)]:break;case _0x45d2dd[_0x1135fd(0x10c)]:{this[_0x1135fd(0xf3)][_0x1135fd(0x109)](_0x4f29ad,_0x31702f,{'unitId':_0x4f29ad,'subUnitId':_0x31702f,'ref':'','id':_0x80c35c[_0x1135fd(0x117)],'dT':_0x5392f0(+_0x80c35c['createTimestamp']),'threadId':_0x80c35c[_0x1135fd(0xeb)],'personId':(_0x22c527=(_0x4b1355=_0x80c35c[_0x1135fd(0x11b)])==null?void 0x0:_0x4b1355['userID'])!=null?_0x22c527:_0x80c35c['userId'],'text':JSON[_0x1135fd(0x16c)](_0x80c35c['content']),'parentId':_0x5ccd78['id']});break;}case _0x45d2dd[_0x1135fd(0x163)]:{const _0xdddbee=this[_0x1135fd(0xf3)][_0x1135fd(0x13c)](_0x4f29ad,_0x31702f,_0x80c35c['replyId']);_0xdddbee&&_0xdddbee['parentId']&&this[_0x1135fd(0xf3)][_0x1135fd(0x13b)](_0x4f29ad,_0x31702f,_0x80c35c[_0x1135fd(0x117)]);break;}case _0x45d2dd[_0x1135fd(0x11a)]:{this[_0x1135fd(0xf3)][_0x1135fd(0x12d)](_0x4f29ad,_0x31702f,{'commentId':_0x80c35c['replyId'],'text':JSON[_0x1135fd(0x16c)](_0x80c35c[_0x1135fd(0xe4)])});break;}case _0x45d2dd[_0x1135fd(0x12b)]:{const _0xd231d1=(_0x1f86b5=this['_threadCommentModel'][_0x1135fd(0xfe)](_0x80c35c['unitId'])[_0x1135fd(0x106)](_0x31e5cc=>_0x31e5cc['threadId']===_0x80c35c[_0x1135fd(0xeb)]))==null?void 0x0:_0x1f86b5[_0x1135fd(0x105)];_0xd231d1&&this['_threadCommentModel']['resolveComment'](_0x4f29ad,_0x31702f,_0xd231d1['id'],_0x80c35c[_0x1135fd(0x142)]===_0x4ea4ca['Solved']);break;}}}));}};_0x2dbee5=_0xab3793([_0x34a507(0x0,_0x208443[_0x1da00a(0xed)](_0x2e266b[_0x1da00a(0xf0)])),_0x34a507(0x1,_0x208443[_0x1da00a(0xed)](_0x195a9a[_0x1da00a(0x15f)])),_0x34a507(0x2,_0x208443[_0x1da00a(0xed)](_0x208443[_0x1da00a(0x124)])),_0x34a507(0x3,_0x208443[_0x1da00a(0xed)](_0x208443[_0x1da00a(0x126)]))],_0x2dbee5);const _0x2fe050='thread-comment-data-source.config',_0xa39fc1={};var _0x564dd1=Object[_0x1da00a(0x133)],_0xa5ac09=(_0x424059,_0x145cb7,_0x51973e,_0xc75961)=>{const _0x39df44=_0x1da00a;for(var _0x77f3c5=_0xc75961>0x1?void 0x0:_0xc75961?_0x564dd1(_0x145cb7,_0x51973e):_0x145cb7,_0x51e797=_0x424059[_0x39df44(0x10e)]-0x1,_0x21a28a;_0x51e797>=0x0;_0x51e797--)(_0x21a28a=_0x424059[_0x51e797])&&(_0x77f3c5=_0x21a28a(_0x77f3c5)||_0x77f3c5);return _0x77f3c5;},_0x362cd7=(_0x4ae2d6,_0x11168e)=>(_0x14c35d,_0xf53835)=>_0x11168e(_0x14c35d,_0xf53835,_0x4ae2d6);function _0xb291bc(_0x16aaf8,_0x4a5225){const _0x58ec10=_0x1da00a,_0x21132e=_0x16aaf8[_0x58ec10(0x146)][0x0];return{..._0x4a5225,'id':_0x21132e['replyId'],'resolved':_0x16aaf8[_0x58ec10(0x142)]===0x1,'dT':_0x5392f0(_0x21132e['createTimestamp']),'personId':_0x21132e[_0x58ec10(0xe8)],'threadId':_0x21132e[_0x58ec10(0xeb)]};}function _0x1d691f(_0x312501,_0x5806c2,_0x3f509e){const _0x2e97c3=_0x1da00a;var _0x4c7328,_0x369dca;if(((_0x369dca=(_0x4c7328=_0x312501==null?void 0x0:_0x312501[_0x2e97c3(0x146)])==null?void 0x0:_0x4c7328[_0x2e97c3(0x10e)])!=null?_0x369dca:0x0)>0x0){const _0x4d9a4a=(_0x2c03fb,_0x19efba)=>({'id':_0x2c03fb['replyId'],'threadId':_0x2c03fb[_0x2e97c3(0xeb)],'dT':_0x5392f0(_0x2c03fb[_0x2e97c3(0x16a)]),'personId':_0x2c03fb[_0x2e97c3(0xe8)],'resolved':_0x312501[_0x2e97c3(0x142)]===_0x4ea4ca[_0x2e97c3(0xf7)],'unitId':_0x5806c2,'subUnitId':_0x3f509e,'text':JSON['parse'](_0x2c03fb[_0x2e97c3(0xe4)]),'parentId':_0x19efba}),_0x413e9a=_0x4d9a4a(_0x312501[_0x2e97c3(0x146)][0x0]);return{..._0x413e9a,'children':_0x312501['replies'][_0x2e97c3(0x104)](0x1)['map'](_0x4f3ca5=>_0x4d9a4a(_0x4f3ca5,_0x413e9a['id']))};}return null;}let _0x22d406=class{constructor(_0x5576d3,_0x493dce,_0x31aa73,_0x5958be){const _0x5cb26d=_0x1da00a;this[_0x5cb26d(0x155)]=_0x5576d3,this['_userService']=_0x493dce,this[_0x5cb26d(0x162)]=_0x31aa73,this[_0x5cb26d(0x11e)]=_0x5958be;}async[_0x1da00a(0x109)](_0x21ec71){const _0x51ef98=_0x1da00a;var _0x5a113d,_0x4eb7b0;const {parentId:_0x4261ea,unitId:_0x28d799,text:_0x21e33c,threadId:_0x3a43ca}=_0x21ec71,_0x5a3c12=(_0x4eb7b0=(_0x5a113d=_0x21e33c[_0x51ef98(0x107)])==null?void 0x0:_0x5a113d['filter'](_0x325311=>_0x325311[_0x51ef98(0x119)]===_0x208443[_0x51ef98(0x115)][_0x51ef98(0xec)])[_0x51ef98(0xe6)](_0x34cce4=>_0x34cce4[_0x51ef98(0x127)]))!=null?_0x4eb7b0:[],_0x51c40d=JSON[_0x51ef98(0x114)](_0x21e33c),_0x115c92=(await this[_0x51ef98(0x162)][_0x51ef98(0x131)](_0x28d799))[_0x51ef98(0x168)]();if(_0x4261ea){const _0x4f771b={'memberId':_0x115c92,'unitId':_0x28d799,'content':_0x51c40d,'mention':_0x5a3c12,'threadId':_0x3a43ca},_0x140f11=(await this[_0x51ef98(0x155)][_0x51ef98(0x120)]('/universer-api/comment/unit/'+_0x28d799+_0x51ef98(0x11c),{'body':_0x4f771b}))[_0x51ef98(0x113)][_0x51ef98(0x152)];return{..._0x21ec71,'id':_0x140f11[_0x51ef98(0x117)],'dT':_0x208443['dayjs'](+_0x140f11[_0x51ef98(0x16a)])[_0x51ef98(0xf1)](_0x51ef98(0x108)),'personId':_0x140f11[_0x51ef98(0xe8)]};}else{const _0x4f7e8f={'memberId':_0x115c92,'unitId':_0x28d799,'content':_0x51c40d,'mention':_0x5a3c12},_0x40f1a5=await this[_0x51ef98(0x155)]['post'](_0x51ef98(0xe3)+_0x28d799+_0x51ef98(0xef),{'body':_0x4f7e8f});return _0xb291bc(_0x40f1a5[_0x51ef98(0x113)][_0x51ef98(0xf6)],_0x21ec71);}}async[_0x1da00a(0x12d)](_0x2fa0c2){const _0x6dd98f=_0x1da00a;var _0x2dc2da,_0x12f5b7;const {text:_0x378a7c,unitId:_0x3e2a42}=_0x2fa0c2,_0x443f83=(_0x12f5b7=(_0x2dc2da=_0x378a7c['customRanges'])==null?void 0x0:_0x2dc2da[_0x6dd98f(0xee)](_0x1dfb52=>_0x1dfb52[_0x6dd98f(0x119)]===_0x208443[_0x6dd98f(0x115)]['COMMENT'])['map'](_0x32d030=>_0x32d030[_0x6dd98f(0x127)]))!=null?_0x12f5b7:[],_0x35700c=JSON['stringify'](_0x378a7c),_0x3a3816=_0x2fa0c2[_0x6dd98f(0xeb)],_0x2c2667=_0x2fa0c2['id'],_0x492bac={'memberId':(await this[_0x6dd98f(0x162)][_0x6dd98f(0x131)](_0x3e2a42))['getMemberID'](),'unitId':_0x3e2a42,'threadId':_0x3a3816,'mention':_0x443f83,'content':_0x35700c,'replyId':_0x2c2667},_0x50b7e8=await this[_0x6dd98f(0x155)][_0x6dd98f(0x120)]('/universer-api/comment/unit/'+_0x3e2a42+_0x6dd98f(0x137),{'body':_0x492bac});return!_0x50b7e8[_0x6dd98f(0x113)]['error']||_0x50b7e8[_0x6dd98f(0x113)][_0x6dd98f(0x12c)][_0x6dd98f(0x14e)]===0x1;}async[_0x1da00a(0x157)](_0x348637){const _0x3269ad=_0x1da00a,{unitId:_0x31a797}=_0x348637,_0x4f83b6=_0x348637['threadId'],_0x6e9c8c={'memberId':this[_0x3269ad(0xea)][_0x3269ad(0x14c)]()[_0x3269ad(0x10f)],'unitId':_0x31a797,'threadId':_0x4f83b6,'solved':_0x348637[_0x3269ad(0xfc)]?_0x4ea4ca[_0x3269ad(0xf7)]:_0x4ea4ca[_0x3269ad(0x15e)]},_0x1555ca=await this[_0x3269ad(0x155)][_0x3269ad(0x120)](_0x3269ad(0xe3)+_0x31a797+_0x3269ad(0xe2),{'body':_0x6e9c8c});return!_0x1555ca[_0x3269ad(0x113)][_0x3269ad(0x12c)]||_0x1555ca[_0x3269ad(0x113)][_0x3269ad(0x12c)]['code']===0x1;}async[_0x1da00a(0x13b)](_0x3ab693,_0x2bde7d,_0xd77aaa,_0x1869d8){const _0x10eb2c=_0x1da00a,_0x35b09f={'memberId':(await this['_sessionService'][_0x10eb2c(0x131)](_0x3ab693))['getMemberID'](),'threadId':_0xd77aaa,'replyId':_0x1869d8,'unitId':_0x3ab693},_0x26bc1a=await this[_0x10eb2c(0x155)]['post'](_0x10eb2c(0xe3)+_0x3ab693+'/delete',{'body':_0x35b09f});return!_0x26bc1a[_0x10eb2c(0x113)][_0x10eb2c(0x12c)]||_0x26bc1a[_0x10eb2c(0x113)]['error'][_0x10eb2c(0x14e)]===0x1;}async[_0x1da00a(0x10b)](_0x3120dc,_0x120058,_0x273baa){const _0x4d9013=_0x1da00a,_0x442927={'unitId':_0x3120dc,'threadId':_0x273baa},_0x5450f5=await this['_httpService'][_0x4d9013(0x120)](_0x4d9013(0xe3)+_0x3120dc+_0x4d9013(0x165),{'body':_0x442927}),_0xd7807f=_0x273baa[_0x4d9013(0xe6)](_0x42c744=>_0x1d691f(_0x5450f5[_0x4d9013(0x113)][_0x4d9013(0x11d)][_0x42c744],_0x3120dc,_0x120058))[_0x4d9013(0xee)](Boolean);return Object[_0x4d9013(0x13a)](_0x5450f5[_0x4d9013(0x113)][_0x4d9013(0x134)])[_0x4d9013(0x160)](_0x3bdb8d=>{const _0x2d84a6=_0x4d9013;this[_0x2d84a6(0xea)][_0x2d84a6(0x150)](_0x3bdb8d);}),_0xd7807f;}[_0x1da00a(0x167)](_0x2a607f){const _0x1580dc=_0x1da00a;return{'id':_0x2a607f['id'],'threadId':_0x2a607f[_0x1580dc(0xeb)],'ref':_0x2a607f[_0x1580dc(0x15c)]};}};_0x22d406=_0xa5ac09([_0x362cd7(0x0,_0x208443[_0x1da00a(0xed)](_0x2e4d72[_0x1da00a(0x102)])),_0x362cd7(0x1,_0x208443[_0x1da00a(0xed)](_0x208443[_0x1da00a(0x124)])),_0x362cd7(0x2,_0x208443[_0x1da00a(0xed)](_0x2e266b['CollaborationSessionService'])),_0x362cd7(0x3,_0x208443['Inject'](_0x208443[_0x1da00a(0x126)]))],_0x22d406);var _0x3ec6d4=Object[_0x1da00a(0x133)],_0x418553=(_0x4a6bb3,_0x4e2cb1,_0x274f7b,_0x3684dc)=>{const _0x325e1d=_0x1da00a;for(var _0x897ae1=_0x3684dc>0x1?void 0x0:_0x3684dc?_0x3ec6d4(_0x4e2cb1,_0x274f7b):_0x4e2cb1,_0x1a9ebf=_0x4a6bb3[_0x325e1d(0x10e)]-0x1,_0x5d6253;_0x1a9ebf>=0x0;_0x1a9ebf--)(_0x5d6253=_0x4a6bb3[_0x1a9ebf])&&(_0x897ae1=_0x5d6253(_0x897ae1)||_0x897ae1);return _0x897ae1;},_0x138734=(_0x70f20d,_0x26b7a1)=>(_0x3b9d88,_0x55ad25)=>_0x26b7a1(_0x3b9d88,_0x55ad25,_0x70f20d);let _0x118433=class extends _0x208443['Disposable']{constructor(_0x2db7bf,_0x120be2){const _0x4467df=_0x1da00a;super(),this[_0x4467df(0x156)]=_0x2db7bf,this[_0x4467df(0x14a)]=_0x120be2,this['_initDataSource']();}['_initDataSource'](){const _0x410087=_0x1da00a;this['_threadCommentDataSourceService'][_0x410087(0x14d)]=this[_0x410087(0x14a)],this['_threadCommentDataSourceService'][_0x410087(0x16d)]=!0x1;}};_0x118433=_0x418553([_0x138734(0x0,_0x195a9a[_0x1da00a(0x13e)]),_0x138734(0x1,_0x208443[_0x1da00a(0xed)](_0x22d406))],_0x118433);var _0x5636cd=Object['defineProperty'],_0xdf0f0a=Object[_0x1da00a(0x133)],_0x4115d4=(_0x635056,_0xba623e,_0x30867c)=>_0xba623e in _0x635056?_0x5636cd(_0x635056,_0xba623e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x30867c}):_0x635056[_0xba623e]=_0x30867c,_0xb94089=(_0x28d185,_0x5e9c0b,_0x254f84,_0xabef6d)=>{const _0x253085=_0x1da00a;for(var _0x4998ad=_0xabef6d>0x1?void 0x0:_0xabef6d?_0xdf0f0a(_0x5e9c0b,_0x254f84):_0x5e9c0b,_0x354ace=_0x28d185[_0x253085(0x10e)]-0x1,_0x1a1759;_0x354ace>=0x0;_0x354ace--)(_0x1a1759=_0x28d185[_0x354ace])&&(_0x4998ad=_0x1a1759(_0x4998ad)||_0x4998ad);return _0x4998ad;},_0x1b2bde=(_0x18f252,_0xb3c80a)=>(_0x306e25,_0x2456ea)=>_0xb3c80a(_0x306e25,_0x2456ea,_0x18f252),_0x5cb5bb=(_0x8a50b8,_0x3746a1,_0x3eb035)=>_0x4115d4(_0x8a50b8,typeof _0x3746a1!=_0x1da00a(0xe9)?_0x3746a1+'':_0x3746a1,_0x3eb035);_0x583ef1['UniverThreadCommentDataSourcePlugin']=class extends _0x208443[_0x1da00a(0x154)]{constructor(_0x1d4c5d=_0xa39fc1,_0x1fd188,_0x57a4ab){const _0x5c9617=_0x1da00a;super(),this['_config']=_0x1d4c5d,this[_0x5c9617(0x11e)]=_0x1fd188,this[_0x5c9617(0xf5)]=_0x57a4ab;const {..._0x2ceaa8}=_0x208443[_0x5c9617(0xf8)]({},_0xa39fc1,this['_config']);this['_configService']['setConfig'](_0x2fe050,_0x2ceaa8);}['onStarting'](){const _0x2aec90=_0x1da00a;[[_0x22d406],[_0x118433],[_0x2dbee5]][_0x2aec90(0x160)](_0x50ff7e=>{const _0x2faaa1=_0x2aec90;this[_0x2faaa1(0x11e)][_0x2faaa1(0x12f)](_0x50ff7e);});}[_0x1da00a(0x149)](){const _0x13ebbc=_0x1da00a;this[_0x13ebbc(0x11e)]['get'](_0x118433),this['_injector']['get'](_0x2dbee5);}},_0x5cb5bb(_0x583ef1[_0x1da00a(0xe7)],'pluginName',_0x36ea8d),_0x5cb5bb(_0x583ef1[_0x1da00a(0xe7)],_0x1da00a(0x111),_0x208443[_0x1da00a(0x13f)][_0x1da00a(0x136)]),_0x583ef1['UniverThreadCommentDataSourcePlugin']=_0xb94089([_0x208443[_0x1da00a(0x14b)](_0x2f4e2e[_0x1da00a(0xe5)],_0x2e266b['UniverCollaborationClientPlugin'],_0x11f360['UniverLicensePlugin']),_0x1b2bde(0x1,_0x208443[_0x1da00a(0xed)](_0x208443[_0x1da00a(0x126)])),_0x1b2bde(0x2,_0x208443['IConfigService'])],_0x583ef1[_0x1da00a(0xe7)]),Object[_0x1da00a(0x166)](_0x583ef1,Symbol['toStringTag'],{'value':_0x1da00a(0xf9)});}));
1
+ (function(_0x294b03,_0x2c948f){const _0x120ea8=_0x4e91,_0x35d2cd=_0x294b03();while(!![]){try{const _0x373794=parseInt(_0x120ea8(0x1be))/0x1*(-parseInt(_0x120ea8(0x217))/0x2)+parseInt(_0x120ea8(0x213))/0x3*(parseInt(_0x120ea8(0x22d))/0x4)+-parseInt(_0x120ea8(0x1bb))/0x5*(-parseInt(_0x120ea8(0x1b4))/0x6)+-parseInt(_0x120ea8(0x1b6))/0x7*(parseInt(_0x120ea8(0x219))/0x8)+-parseInt(_0x120ea8(0x1fa))/0x9+parseInt(_0x120ea8(0x1f0))/0xa+-parseInt(_0x120ea8(0x1bc))/0xb;if(_0x373794===_0x2c948f)break;else _0x35d2cd['push'](_0x35d2cd['shift']());}catch(_0x57f8de){_0x35d2cd['push'](_0x35d2cd['shift']());}}}(_0x3fce,0x37f1b),function(_0x4aa942,_0x409506){const _0x55e99d=_0x4e91;typeof exports==_0x55e99d(0x1ef)&&typeof module<'u'?_0x409506(exports,require(_0x55e99d(0x1e3)),require(_0x55e99d(0x1e2)),require(_0x55e99d(0x1fb)),require('@univerjs/thread-comment-ui'),require(_0x55e99d(0x229)),require(_0x55e99d(0x1fe)),require(_0x55e99d(0x1d4))):typeof define==_0x55e99d(0x21f)&&define[_0x55e99d(0x238)]?define([_0x55e99d(0x1cd),_0x55e99d(0x1e3),_0x55e99d(0x1e2),_0x55e99d(0x1fb),_0x55e99d(0x212),'@univerjs/thread-comment',_0x55e99d(0x1fe),_0x55e99d(0x1d4)],_0x409506):(_0x4aa942=typeof globalThis<'u'?globalThis:_0x4aa942||self,_0x409506(_0x4aa942[_0x55e99d(0x20b)]={},_0x4aa942[_0x55e99d(0x237)],_0x4aa942[_0x55e99d(0x215)],_0x4aa942[_0x55e99d(0x1ed)],_0x4aa942['UniverThreadCommentUi'],_0x4aa942[_0x55e99d(0x226)],_0x4aa942['rxjs'],_0x4aa942['UniverNetwork']));}(this,function(_0x303efd,_0x2dc796,_0x2b3bb9,_0x546c0b,_0x24e492,_0x399ecb,_0x158e60,_0x48fe67){'use strict';const _0x4743e3=_0x4e91;const _0xb10e75=_0x4743e3(0x204);var _0x41926b=(_0x489a26=>(_0x489a26[_0x489a26['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x489a26[_0x489a26[_0x4743e3(0x1b2)]=0x1]=_0x4743e3(0x1b2),_0x489a26[_0x489a26[_0x4743e3(0x1b3)]=-0x1]=_0x4743e3(0x1b3),_0x489a26))(_0x41926b||{}),_0x5de992=(_0xa76209=>(_0xa76209[_0xa76209['Unknown']=0x0]='Unknown',_0xa76209[_0xa76209[_0x4743e3(0x20e)]=0x1]=_0x4743e3(0x20e),_0xa76209[_0xa76209['Reply']=0x2]=_0x4743e3(0x1d0),_0xa76209[_0xa76209[_0x4743e3(0x1eb)]=0x3]='Edit',_0xa76209[_0xa76209[_0x4743e3(0x211)]=0x4]=_0x4743e3(0x211),_0xa76209[_0xa76209[_0x4743e3(0x1b7)]=0x5]=_0x4743e3(0x1b7),_0xa76209[_0xa76209['UNRECOGNIZED']=-0x1]=_0x4743e3(0x1b3),_0xa76209))(_0x5de992||{});const _0x4ba732=_0x187a69=>_0x546c0b['dayjs'](new Date(+_0x187a69))[_0x4743e3(0x1b9)](_0x4743e3(0x21e)),_0x3eae6d=async(_0x319c01,_0x56bc74)=>{const _0x40e22f=_0x4743e3,_0x15c50c=_0x319c01[_0x40e22f(0x1c7)](_0x546c0b['UserManagerService']),_0x5bcad6=_0x319c01[_0x40e22f(0x1c7)](_0x48fe67[_0x40e22f(0x21d)]);_0x56bc74[_0x40e22f(0x1ce)](_0x267f0f=>{const _0x327b36=_0x40e22f;_0x15c50c[_0x327b36(0x1de)](_0x267f0f)&&_0x56bc74[_0x327b36(0x201)](_0x267f0f);}),_0x56bc74[_0x40e22f(0x206)]&&(await _0x5bcad6[_0x40e22f(0x1c7)](_0x40e22f(0x1c0),{'params':{'userIDs':[..._0x56bc74]}}))[_0x40e22f(0x1b5)]['users'][_0x40e22f(0x1ce)](_0x60b0bd=>{const _0x209f54=_0x40e22f;_0x60b0bd&&_0x15c50c[_0x209f54(0x1dd)](_0x60b0bd);});};var _0x2f903d=Object[_0x4743e3(0x214)],_0x275986=(_0x3bbf1b,_0x12dbf0,_0xd2fca0,_0x1e7769)=>{for(var _0x5b344d=_0x1e7769>0x1?void 0x0:_0x1e7769?_0x2f903d(_0x12dbf0,_0xd2fca0):_0x12dbf0,_0x2e3ca0=_0x3bbf1b['length']-0x1,_0x64f59;_0x2e3ca0>=0x0;_0x2e3ca0--)(_0x64f59=_0x3bbf1b[_0x2e3ca0])&&(_0x5b344d=_0x64f59(_0x5b344d)||_0x5b344d);return _0x5b344d;},_0x2be325=(_0x5d5634,_0x5c8646)=>(_0x2916d1,_0x57a36c)=>_0x5c8646(_0x2916d1,_0x57a36c,_0x5d5634);let _0x4dbf99=class extends _0x546c0b[_0x4743e3(0x1bf)]{constructor(_0x54dd78,_0x57ea9c,_0x23a1ec,_0x1d4f04){const _0x994d5=_0x4743e3;super(),this[_0x994d5(0x1f9)]=_0x54dd78,this[_0x994d5(0x1c4)]=_0x57ea9c,this[_0x994d5(0x20d)]=_0x23a1ec,this[_0x994d5(0x1cf)]=_0x1d4f04,this[_0x994d5(0x218)](),this[_0x994d5(0x21b)]();}[_0x4743e3(0x21b)](){const _0x2df520=_0x4743e3;this['disposeWithMe'](this[_0x2df520(0x1c4)][_0x2df520(0x1e7)][_0x2df520(0x1c1)](_0x158e60[_0x2df520(0x1fc)](0x10))[_0x2df520(0x232)](_0x2b3d51=>{const _0xbd6dc4=_0x2df520,_0x134db7=new Set();_0x2b3d51[_0xbd6dc4(0x1ce)](_0x193a44=>{const _0x4d49d2=_0xbd6dc4;switch(_0x193a44[_0x4d49d2(0x1e6)]){case _0x4d49d2(0x1f7):{const _0x3d0e75=_0x193a44[_0x4d49d2(0x221)][_0x4d49d2(0x1ca)];_0x134db7[_0x4d49d2(0x1f7)](_0x3d0e75);break;}}}),_0x3eae6d(this[_0xbd6dc4(0x1cf)],_0x134db7);}));}[_0x4743e3(0x218)](){const _0x5b229b=_0x4743e3;this[_0x5b229b(0x20a)](this['_commentService'][_0x5b229b(0x1e7)][_0x5b229b(0x232)](async _0x138326=>{const _0x2fc7a8=_0x5b229b;var _0x3e7fa9,_0x58bb1b,_0x25451f,_0x35a519;const _0x18c24c=(_0x3e7fa9=this[_0x2fc7a8(0x1c4)][_0x2fc7a8(0x234)](_0x138326[_0x2fc7a8(0x1fd)])['find'](_0xb17f10=>_0xb17f10[_0x2fc7a8(0x1af)]===_0x138326[_0x2fc7a8(0x1af)]))==null?void 0x0:_0x3e7fa9[_0x2fc7a8(0x1c8)];if(!_0x18c24c)return;const {unitId:_0x380aa4,subUnitId:_0x22a5ad}=_0x18c24c;switch(_0x138326[_0x2fc7a8(0x1da)]&&this[_0x2fc7a8(0x20d)]['addUser'](_0x138326[_0x2fc7a8(0x1da)]),_0x138326[_0x2fc7a8(0x1e6)]){case _0x5de992[_0x2fc7a8(0x20e)]:break;case _0x5de992[_0x2fc7a8(0x1d0)]:{this[_0x2fc7a8(0x1c4)][_0x2fc7a8(0x20f)](_0x380aa4,_0x22a5ad,{'unitId':_0x380aa4,'subUnitId':_0x22a5ad,'ref':'','id':_0x138326[_0x2fc7a8(0x1c3)],'dT':_0x4ba732(+_0x138326['createTimestamp']),'threadId':_0x138326['threadId'],'personId':(_0x25451f=(_0x58bb1b=_0x138326[_0x2fc7a8(0x1da)])==null?void 0x0:_0x58bb1b[_0x2fc7a8(0x1df)])!=null?_0x25451f:_0x138326[_0x2fc7a8(0x1c9)],'text':JSON[_0x2fc7a8(0x1f4)](_0x138326[_0x2fc7a8(0x203)]),'parentId':_0x18c24c['id']});break;}case _0x5de992[_0x2fc7a8(0x211)]:{const _0x402002=this[_0x2fc7a8(0x1c4)][_0x2fc7a8(0x224)](_0x380aa4,_0x22a5ad,_0x138326['replyId']);_0x402002&&_0x402002[_0x2fc7a8(0x222)]&&this[_0x2fc7a8(0x1c4)][_0x2fc7a8(0x208)](_0x380aa4,_0x22a5ad,_0x138326[_0x2fc7a8(0x1c3)]);break;}case _0x5de992[_0x2fc7a8(0x1eb)]:{this[_0x2fc7a8(0x1c4)]['updateComment'](_0x380aa4,_0x22a5ad,{'commentId':_0x138326[_0x2fc7a8(0x1c3)],'text':JSON[_0x2fc7a8(0x1f4)](_0x138326['content'])});break;}case _0x5de992['Solve']:{const _0x4a686a=(_0x35a519=this[_0x2fc7a8(0x1c4)][_0x2fc7a8(0x234)](_0x138326[_0x2fc7a8(0x1fd)])[_0x2fc7a8(0x1d8)](_0x5b35fe=>_0x5b35fe[_0x2fc7a8(0x1af)]===_0x138326[_0x2fc7a8(0x1af)]))==null?void 0x0:_0x35a519['root'];_0x4a686a&&this[_0x2fc7a8(0x1c4)][_0x2fc7a8(0x1f3)](_0x380aa4,_0x22a5ad,_0x4a686a['id'],_0x138326[_0x2fc7a8(0x22c)]===_0x41926b[_0x2fc7a8(0x1b2)]);break;}}}));}};_0x4dbf99=_0x275986([_0x2be325(0x0,_0x546c0b[_0x4743e3(0x1f6)](_0x2dc796[_0x4743e3(0x1ec)])),_0x2be325(0x1,_0x546c0b[_0x4743e3(0x1f6)](_0x399ecb[_0x4743e3(0x1e0)])),_0x2be325(0x2,_0x546c0b[_0x4743e3(0x1f6)](_0x546c0b[_0x4743e3(0x1bd)])),_0x2be325(0x3,_0x546c0b[_0x4743e3(0x1f6)](_0x546c0b[_0x4743e3(0x1e5)]))],_0x4dbf99);const _0x14adb6='thread-comment-data-source.config',_0x2ad507={};var _0x2ceaf3=Object[_0x4743e3(0x214)],_0x20a2e6=(_0x3179f0,_0x537791,_0x56619b,_0x463698)=>{const _0xd3d45e=_0x4743e3;for(var _0x4163e9=_0x463698>0x1?void 0x0:_0x463698?_0x2ceaf3(_0x537791,_0x56619b):_0x537791,_0x518f18=_0x3179f0[_0xd3d45e(0x210)]-0x1,_0x20a6c7;_0x518f18>=0x0;_0x518f18--)(_0x20a6c7=_0x3179f0[_0x518f18])&&(_0x4163e9=_0x20a6c7(_0x4163e9)||_0x4163e9);return _0x4163e9;},_0x221c50=(_0x2390c0,_0x452af6)=>(_0x3ac311,_0x1c2ca0)=>_0x452af6(_0x3ac311,_0x1c2ca0,_0x2390c0);function _0x422fbc(_0x56766a,_0x170a3a){const _0x587d4e=_0x4743e3,_0x33c19b=_0x56766a[_0x587d4e(0x22f)][0x0];return{..._0x170a3a,'id':_0x33c19b[_0x587d4e(0x1c3)],'resolved':_0x56766a[_0x587d4e(0x22c)]===0x1,'dT':_0x4ba732(_0x33c19b[_0x587d4e(0x216)]),'personId':_0x33c19b[_0x587d4e(0x1c9)],'threadId':_0x33c19b[_0x587d4e(0x1af)]};}function _0x3a22b9(_0x11118a,_0x4cc65d,_0x552901){const _0x12389e=_0x4743e3;var _0x466038,_0x32aa5f;if(((_0x32aa5f=(_0x466038=_0x11118a==null?void 0x0:_0x11118a[_0x12389e(0x22f)])==null?void 0x0:_0x466038[_0x12389e(0x210)])!=null?_0x32aa5f:0x0)>0x0){const _0x4b5722=(_0xaa63d9,_0x5e56e9)=>({'id':_0xaa63d9['replyId'],'threadId':_0xaa63d9['threadId'],'dT':_0x4ba732(_0xaa63d9[_0x12389e(0x216)]),'personId':_0xaa63d9[_0x12389e(0x1c9)],'resolved':_0x11118a[_0x12389e(0x22c)]===_0x41926b[_0x12389e(0x1b2)],'unitId':_0x4cc65d,'subUnitId':_0x552901,'text':JSON[_0x12389e(0x1f4)](_0xaa63d9['content']),'parentId':_0x5e56e9}),_0x98baf6=_0x4b5722(_0x11118a['replies'][0x0]);return{..._0x98baf6,'children':_0x11118a['replies'][_0x12389e(0x1e8)](0x1)[_0x12389e(0x22b)](_0x2f5445=>_0x4b5722(_0x2f5445,_0x98baf6['id']))};}return null;}let _0x54a193=class{constructor(_0x3b4d08,_0x3bc12d,_0x398fd6,_0x38681b){const _0x77453=_0x4743e3;this['_httpService']=_0x3b4d08,this[_0x77453(0x20d)]=_0x3bc12d,this[_0x77453(0x21a)]=_0x398fd6,this[_0x77453(0x1cf)]=_0x38681b;}async[_0x4743e3(0x20f)](_0x49998c){const _0x115e66=_0x4743e3;var _0x138061,_0x257a84;const {parentId:_0x5c17d9,unitId:_0x18cf22,text:_0x47e1a7,threadId:_0xbad013}=_0x49998c,_0x4d5a45=(_0x257a84=(_0x138061=_0x47e1a7[_0x115e66(0x1d2)])==null?void 0x0:_0x138061[_0x115e66(0x235)](_0x31e4e3=>_0x31e4e3[_0x115e66(0x22e)]===_0x546c0b['CustomRangeType'][_0x115e66(0x1f2)])[_0x115e66(0x22b)](_0x476848=>_0x476848[_0x115e66(0x1c5)]))!=null?_0x257a84:[],_0x41fac9=JSON[_0x115e66(0x21c)](_0x47e1a7),_0x2971ab=(await this[_0x115e66(0x21a)]['requireSession'](_0x18cf22))[_0x115e66(0x220)]();if(_0x5c17d9){const _0x20aba6={'memberId':_0x2971ab,'unitId':_0x18cf22,'content':_0x41fac9,'mention':_0x4d5a45,'threadId':_0xbad013},_0x34a6e=(await this[_0x115e66(0x230)]['post'](_0x115e66(0x1d3)+_0x18cf22+_0x115e66(0x207),{'body':_0x20aba6}))['body'][_0x115e66(0x223)];return{..._0x49998c,'id':_0x34a6e['replyId'],'dT':_0x546c0b[_0x115e66(0x1c6)](+_0x34a6e[_0x115e66(0x216)])[_0x115e66(0x1b9)](_0x115e66(0x21e)),'personId':_0x34a6e['userId']};}else{const _0x39ba3f={'memberId':_0x2971ab,'unitId':_0x18cf22,'content':_0x41fac9,'mention':_0x4d5a45},_0x247e02=await this['_httpService'][_0x115e66(0x23a)](_0x115e66(0x1d3)+_0x18cf22+_0x115e66(0x20c),{'body':_0x39ba3f});return _0x422fbc(_0x247e02[_0x115e66(0x1b5)]['comment'],_0x49998c);}}async['updateComment'](_0x2004a8){const _0x534277=_0x4743e3;var _0x1cb50f,_0x3b2394;const {text:_0x3b866b,unitId:_0x59e98b}=_0x2004a8,_0x20b318=(_0x3b2394=(_0x1cb50f=_0x3b866b[_0x534277(0x1d2)])==null?void 0x0:_0x1cb50f[_0x534277(0x235)](_0x7ab737=>_0x7ab737[_0x534277(0x22e)]===_0x546c0b['CustomRangeType'][_0x534277(0x1f2)])[_0x534277(0x22b)](_0x3e12db=>_0x3e12db[_0x534277(0x1c5)]))!=null?_0x3b2394:[],_0x2d7726=JSON[_0x534277(0x21c)](_0x3b866b),_0x523c1d=_0x2004a8[_0x534277(0x1af)],_0x199431=_0x2004a8['id'],_0x17280b={'memberId':(await this['_sessionService'][_0x534277(0x1b8)](_0x59e98b))[_0x534277(0x220)](),'unitId':_0x59e98b,'threadId':_0x523c1d,'mention':_0x20b318,'content':_0x2d7726,'replyId':_0x199431},_0x14b5e5=await this[_0x534277(0x230)][_0x534277(0x23a)](_0x534277(0x1d3)+_0x59e98b+'/edit',{'body':_0x17280b});return!_0x14b5e5['body'][_0x534277(0x1d1)]||_0x14b5e5['body'][_0x534277(0x1d1)][_0x534277(0x1d7)]===0x1;}async[_0x4743e3(0x1f3)](_0x386504){const _0x5a8aba=_0x4743e3,{unitId:_0x1d1f0b}=_0x386504,_0x5a4cfa=_0x386504['threadId'],_0xaf7f44={'memberId':this['_userService'][_0x5a8aba(0x202)]()[_0x5a8aba(0x1df)],'unitId':_0x1d1f0b,'threadId':_0x5a4cfa,'solved':_0x386504[_0x5a8aba(0x205)]?_0x41926b[_0x5a8aba(0x1b2)]:_0x41926b['OpenOrReOpen']},_0x50600a=await this[_0x5a8aba(0x230)]['post'](_0x5a8aba(0x1d3)+_0x1d1f0b+_0x5a8aba(0x1ee),{'body':_0xaf7f44});return!_0x50600a[_0x5a8aba(0x1b5)][_0x5a8aba(0x1d1)]||_0x50600a[_0x5a8aba(0x1b5)][_0x5a8aba(0x1d1)][_0x5a8aba(0x1d7)]===0x1;}async['deleteComment'](_0x574670,_0x361d97,_0xc8dded,_0x10d3bc){const _0x3a9fbe=_0x4743e3,_0x23324d={'memberId':(await this[_0x3a9fbe(0x21a)][_0x3a9fbe(0x1b8)](_0x574670))['getMemberID'](),'threadId':_0xc8dded,'replyId':_0x10d3bc,'unitId':_0x574670},_0x1fb64b=await this[_0x3a9fbe(0x230)]['post']('/universer-api/comment/unit/'+_0x574670+_0x3a9fbe(0x1d9),{'body':_0x23324d});return!_0x1fb64b['body']['error']||_0x1fb64b[_0x3a9fbe(0x1b5)][_0x3a9fbe(0x1d1)]['code']===0x1;}async[_0x4743e3(0x1d5)](_0x1b419a,_0x12c559,_0x2665eb){const _0x4d2841=_0x4743e3,_0x11477f={'unitId':_0x1b419a,'threadId':_0x2665eb},_0xbbe6a2=await this[_0x4d2841(0x230)][_0x4d2841(0x23a)](_0x4d2841(0x1d3)+_0x1b419a+_0x4d2841(0x1e4),{'body':_0x11477f}),_0x562a5d=_0x2665eb[_0x4d2841(0x22b)](_0xf5fc3=>_0x3a22b9(_0xbbe6a2[_0x4d2841(0x1b5)]['comments'][_0xf5fc3],_0x1b419a,_0x12c559))[_0x4d2841(0x235)](Boolean);return Object[_0x4d2841(0x1dc)](_0xbbe6a2[_0x4d2841(0x1b5)][_0x4d2841(0x227)])[_0x4d2841(0x1ce)](_0x3110a8=>{const _0x1c29e5=_0x4d2841;this[_0x1c29e5(0x20d)][_0x1c29e5(0x1dd)](_0x3110a8);}),_0x562a5d;}[_0x4743e3(0x22a)](_0x550254){const _0x492b10=_0x4743e3;return{'id':_0x550254['id'],'threadId':_0x550254[_0x492b10(0x1af)],'ref':_0x550254[_0x492b10(0x1e9)]};}};_0x54a193=_0x20a2e6([_0x221c50(0x0,_0x546c0b[_0x4743e3(0x1f6)](_0x48fe67[_0x4743e3(0x21d)])),_0x221c50(0x1,_0x546c0b['Inject'](_0x546c0b[_0x4743e3(0x1bd)])),_0x221c50(0x2,_0x546c0b[_0x4743e3(0x1f6)](_0x2dc796['CollaborationSessionService'])),_0x221c50(0x3,_0x546c0b[_0x4743e3(0x1f6)](_0x546c0b['Injector']))],_0x54a193);var _0x599ac3=Object[_0x4743e3(0x214)],_0x363031=(_0x48d531,_0x5065ed,_0x3176f2,_0x24c61e)=>{const _0x466a4c=_0x4743e3;for(var _0xc217b1=_0x24c61e>0x1?void 0x0:_0x24c61e?_0x599ac3(_0x5065ed,_0x3176f2):_0x5065ed,_0xf3b94f=_0x48d531[_0x466a4c(0x210)]-0x1,_0x552a3f;_0xf3b94f>=0x0;_0xf3b94f--)(_0x552a3f=_0x48d531[_0xf3b94f])&&(_0xc217b1=_0x552a3f(_0xc217b1)||_0xc217b1);return _0xc217b1;},_0x568259=(_0xcefece,_0x3a22f3)=>(_0x34b88a,_0x20c760)=>_0x3a22f3(_0x34b88a,_0x20c760,_0xcefece);let _0x1bb185=class extends _0x546c0b[_0x4743e3(0x1bf)]{constructor(_0x433a03,_0x2c434a){const _0x5c2620=_0x4743e3;super(),this[_0x5c2620(0x228)]=_0x433a03,this[_0x5c2620(0x1c2)]=_0x2c434a,this[_0x5c2620(0x1cc)]();}[_0x4743e3(0x1cc)](){const _0x2e51b8=_0x4743e3;this['_threadCommentDataSourceService'][_0x2e51b8(0x1f1)]=this[_0x2e51b8(0x1c2)],this[_0x2e51b8(0x228)][_0x2e51b8(0x231)]=!0x1;}};_0x1bb185=_0x363031([_0x568259(0x0,_0x399ecb[_0x4743e3(0x239)]),_0x568259(0x1,_0x546c0b[_0x4743e3(0x1f6)](_0x54a193))],_0x1bb185);var _0x24794d=Object[_0x4743e3(0x209)],_0x5450fa=Object[_0x4743e3(0x214)],_0x4d1e58=(_0x398847,_0x52401b,_0x1e8c95)=>_0x52401b in _0x398847?_0x24794d(_0x398847,_0x52401b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1e8c95}):_0x398847[_0x52401b]=_0x1e8c95,_0x189638=(_0x48b848,_0x77ad45,_0x1972d6,_0x2dabb1)=>{const _0x177b96=_0x4743e3;for(var _0x337a97=_0x2dabb1>0x1?void 0x0:_0x2dabb1?_0x5450fa(_0x77ad45,_0x1972d6):_0x77ad45,_0x383927=_0x48b848[_0x177b96(0x210)]-0x1,_0x19354e;_0x383927>=0x0;_0x383927--)(_0x19354e=_0x48b848[_0x383927])&&(_0x337a97=_0x19354e(_0x337a97)||_0x337a97);return _0x337a97;},_0xfc290c=(_0x4de1e1,_0xedfe13)=>(_0xc828f,_0x5c1a1f)=>_0xedfe13(_0xc828f,_0x5c1a1f,_0x4de1e1),_0x27f2e7=(_0x43e230,_0xa514be,_0x1cf57e)=>_0x4d1e58(_0x43e230,typeof _0xa514be!='symbol'?_0xa514be+'':_0xa514be,_0x1cf57e);_0x303efd['UniverThreadCommentDataSourcePlugin']=class extends _0x546c0b[_0x4743e3(0x1f8)]{constructor(_0x29b98e=_0x2ad507,_0x27c06b,_0x4ad817){const _0x33abd0=_0x4743e3;super(),this['_config']=_0x29b98e,this[_0x33abd0(0x1cf)]=_0x27c06b,this['_configService']=_0x4ad817;const {..._0x338ac0}=_0x546c0b[_0x33abd0(0x1ba)]({},_0x2ad507,this['_config']);this[_0x33abd0(0x233)][_0x33abd0(0x1d6)](_0x14adb6,_0x338ac0);}[_0x4743e3(0x1f5)](){[[_0x54a193],[_0x1bb185],[_0x4dbf99]]['forEach'](_0x1477d7=>{const _0x52e408=_0x4e91;this[_0x52e408(0x1cf)][_0x52e408(0x1f7)](_0x1477d7);});}['onReady'](){const _0x22e613=_0x4743e3;this['_injector']['get'](_0x1bb185),this[_0x22e613(0x1cf)][_0x22e613(0x1c7)](_0x4dbf99);}},_0x27f2e7(_0x303efd[_0x4743e3(0x236)],_0x4743e3(0x1ff),_0xb10e75),_0x27f2e7(_0x303efd['UniverThreadCommentDataSourcePlugin'],'type',_0x546c0b['UniverInstanceType'][_0x4743e3(0x1ea)]),_0x303efd[_0x4743e3(0x236)]=_0x189638([_0x546c0b[_0x4743e3(0x225)](_0x24e492[_0x4743e3(0x1e1)],_0x2dc796[_0x4743e3(0x1b1)],_0x2b3bb9[_0x4743e3(0x1b0)]),_0xfc290c(0x1,_0x546c0b[_0x4743e3(0x1f6)](_0x546c0b[_0x4743e3(0x1e5)])),_0xfc290c(0x2,_0x546c0b[_0x4743e3(0x1cb)])],_0x303efd[_0x4743e3(0x236)]),Object[_0x4743e3(0x209)](_0x303efd,Symbol[_0x4743e3(0x1db)],{'value':_0x4743e3(0x200)});}));function _0x4e91(_0x40a97f,_0x17d7be){const _0x3fce25=_0x3fce();return _0x4e91=function(_0x4e9133,_0x25e937){_0x4e9133=_0x4e9133-0x1af;let _0xd5fe6c=_0x3fce25[_0x4e9133];return _0xd5fe6c;},_0x4e91(_0x40a97f,_0x17d7be);}function _0x3fce(){const _0x290fa0=['HTTPService','YYYY/MM/DD\x20HH:mm','function','getMemberID','payload','parentId','reply','getComment','DependentOn','UniverThreadComment','users','_threadCommentDataSourceService','@univerjs/thread-comment','saveCommentToSnapshot','map','solved','6088NElocu','rangeType','replies','_httpService','syncUpdateMutationToColla','subscribe','_configService','getUnit','filter','UniverThreadCommentDataSourcePlugin','UniverProCollaborationClient','amd','IThreadCommentDataSourceService','post','threadId','UniverLicensePlugin','UniverCollaborationClientPlugin','Solved','UNRECOGNIZED','2447538SNzfUA','body','37702XaknuY','Solve','requireSession','format','merge','5YJOQEr','1110912hOivXn','UserManagerService','7wTdDDJ','Disposable','/universer-api/user/list','pipe','_threadCommentDataSource','replyId','_threadCommentModel','rangeId','dayjs','get','root','userId','personId','IConfigService','_initDataSource','exports','forEach','_injector','Reply','error','customRanges','/universer-api/comment/unit/','@univerjs/network','listComments','setConfig','code','find','/delete','user','toStringTag','values','addUser','getUser','userID','ThreadCommentModel','UniverThreadCommentUIPlugin','@univerjs-pro/license','@univerjs-pro/collaboration-client','/list','Injector','type','commentUpdate$','slice','ref','UNIVER_UNKNOWN','Edit','CommentService','UniverCore','/solved','object','1503720HzRxxW','dataSource','COMMENT','resolveComment','parse','onStarting','Inject','add','Plugin','_commentService','530253OfYLIE','@univerjs/core','bufferTime','unitId','rxjs','pluginName','Module','delete','getCurrentUser','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','size','/reply','deleteComment','defineProperty','disposeWithMe','UniverProThreadCommentDatasource','/add','_userService','Add','addComment','length','Delete','@univerjs/thread-comment-ui','276gEJwxe','getOwnPropertyDescriptor','UniverProLicense','createTimestamp','65278aReZsC','_init','120BlOGxe','_sessionService','_initUserSync','stringify'];_0x3fce=function(){return _0x290fa0;};return _0x3fce();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202505071607",
3
+ "version": "0.7.0-nightly.202505101606",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505071607",
49
- "@univerjs-pro/license": "0.7.0-nightly.202505071607",
50
- "@univerjs/core": "0.7.0-nightly.202505071607",
51
- "@univerjs/network": "0.7.0-nightly.202505071607",
48
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505101606",
49
+ "@univerjs/core": "0.7.0-nightly.202505101606",
50
+ "@univerjs/network": "0.7.0-nightly.202505101606",
52
51
  "@univerjs/protocol": "0.1.46-alpha.3",
53
- "@univerjs/thread-comment": "0.7.0-nightly.202505071607",
54
- "@univerjs/thread-comment-ui": "0.7.0-nightly.202505071607"
52
+ "@univerjs/thread-comment": "0.7.0-nightly.202505101606",
53
+ "@univerjs-pro/license": "0.7.0-nightly.202505101606",
54
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202505101606"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^6.3.5",
60
60
  "vitest": "^3.1.3",
61
- "@univerjs-infra/shared": "0.7.0-beta.0"
61
+ "@univerjs-infra/shared": "0.7.0-beta.1"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",