@univerjs-pro/thread-comment-datasource 0.8.0-nightly.202505301607 → 0.8.0-nightly.202505311606

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 _0x51e18b=_0x553c;(function(_0x140f15,_0x292ca9){const _0x4e0245=_0x553c,_0x9b3899=_0x140f15();while(!![]){try{const _0x37143f=parseInt(_0x4e0245(0x1be))/0x1+parseInt(_0x4e0245(0x1dc))/0x2*(parseInt(_0x4e0245(0x1b9))/0x3)+-parseInt(_0x4e0245(0x1c3))/0x4*(-parseInt(_0x4e0245(0x1cd))/0x5)+parseInt(_0x4e0245(0x204))/0x6*(-parseInt(_0x4e0245(0x1e0))/0x7)+-parseInt(_0x4e0245(0x21f))/0x8*(-parseInt(_0x4e0245(0x1ca))/0x9)+-parseInt(_0x4e0245(0x1f1))/0xa*(-parseInt(_0x4e0245(0x1bd))/0xb)+parseInt(_0x4e0245(0x1ac))/0xc*(-parseInt(_0x4e0245(0x1b2))/0xd);if(_0x37143f===_0x292ca9)break;else _0x9b3899['push'](_0x9b3899['shift']());}catch(_0x2b6446){_0x9b3899['push'](_0x9b3899['shift']());}}}(_0x5c55,0xac592));Object[_0x51e18b(0x217)](exports,Symbol[_0x51e18b(0x1f2)],{'value':_0x51e18b(0x20f)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x51e18b(0x205)),c=require(_0x51e18b(0x202)),j=require(_0x51e18b(0x1c7)),M=require(_0x51e18b(0x1fa)),w=require('rxjs'),P=require(_0x51e18b(0x1f5)),U=_0x51e18b(0x225);var I=(_0x6bbf81=>(_0x6bbf81[_0x6bbf81[_0x51e18b(0x1bb)]=0x0]=_0x51e18b(0x1bb),_0x6bbf81[_0x6bbf81['Solved']=0x1]=_0x51e18b(0x1fb),_0x6bbf81[_0x6bbf81[_0x51e18b(0x1c0)]=-0x1]=_0x51e18b(0x1c0),_0x6bbf81))(I||{}),v=(_0x34eca6=>(_0x34eca6[_0x34eca6['Unknown']=0x0]=_0x51e18b(0x1df),_0x34eca6[_0x34eca6[_0x51e18b(0x224)]=0x1]=_0x51e18b(0x224),_0x34eca6[_0x34eca6[_0x51e18b(0x222)]=0x2]='Reply',_0x34eca6[_0x34eca6[_0x51e18b(0x1d3)]=0x3]=_0x51e18b(0x1d3),_0x34eca6[_0x34eca6['Delete']=0x4]=_0x51e18b(0x1de),_0x34eca6[_0x34eca6[_0x51e18b(0x21c)]=0x5]=_0x51e18b(0x21c),_0x34eca6[_0x34eca6[_0x51e18b(0x1c0)]=-0x1]=_0x51e18b(0x1c0),_0x34eca6))(v||{});const f=_0x4de08a=>c['dayjs'](new Date(+_0x4de08a))[_0x51e18b(0x1e8)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x3a631b,_0x361e77)=>{const _0x5ee538=_0x51e18b,_0x2b7fcb=_0x3a631b[_0x5ee538(0x1ce)](c[_0x5ee538(0x206)]),_0x10dd9b=_0x3a631b[_0x5ee538(0x1ce)](P['HTTPService']);_0x361e77[_0x5ee538(0x1f4)](_0x2749ee=>{const _0xf78ee4=_0x5ee538;_0x2b7fcb['getUser'](_0x2749ee)&&_0x361e77[_0xf78ee4(0x1f6)](_0x2749ee);}),_0x361e77[_0x5ee538(0x201)]&&(await _0x10dd9b[_0x5ee538(0x1ce)]('/universer-api/user/list',{'params':{'userIDs':[..._0x361e77]}}))[_0x5ee538(0x203)][_0x5ee538(0x215)][_0x5ee538(0x1f4)](_0x22b095=>{const _0x17a3b4=_0x5ee538;_0x22b095&&_0x2b7fcb[_0x17a3b4(0x213)](_0x22b095);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x2b89d0,_0x1174e3,_0x3c53ca,_0x2c1ee6)=>{const _0x44da19=_0x51e18b;for(var _0x4f2e1c=_0x2c1ee6>0x1?void 0x0:_0x2c1ee6?$(_0x1174e3,_0x3c53ca):_0x1174e3,_0x4bc7c3=_0x2b89d0[_0x44da19(0x211)]-0x1,_0x2c91bd;_0x4bc7c3>=0x0;_0x4bc7c3--)(_0x2c91bd=_0x2b89d0[_0x4bc7c3])&&(_0x4f2e1c=_0x2c91bd(_0x4f2e1c)||_0x4f2e1c);return _0x4f2e1c;},S=(_0x5711cd,_0x14a4c4)=>(_0x8eae0e,_0x575456)=>_0x14a4c4(_0x8eae0e,_0x575456,_0x5711cd);function _0x553c(_0x37e373,_0x1cae6a){const _0x5c5537=_0x5c55();return _0x553c=function(_0x553c7a,_0x2d9215){_0x553c7a=_0x553c7a-0x1a9;let _0x4da8db=_0x5c5537[_0x553c7a];return _0x4da8db;},_0x553c(_0x37e373,_0x1cae6a);}let p=class extends c[_0x51e18b(0x1ed)]{constructor(_0x58ee49,_0xcfaf60,_0x512363,_0x56ad88){const _0xdcda30=_0x51e18b;super(),this['_commentService']=_0x58ee49,this[_0xdcda30(0x1c2)]=_0xcfaf60,this[_0xdcda30(0x1ad)]=_0x512363,this[_0xdcda30(0x216)]=_0x56ad88,this[_0xdcda30(0x1b7)](),this['_initUserSync']();}[_0x51e18b(0x1e7)](){const _0x5492fe=_0x51e18b;this[_0x5492fe(0x20b)](this[_0x5492fe(0x1c2)][_0x5492fe(0x210)][_0x5492fe(0x1d0)](w['bufferTime'](0x10))[_0x5492fe(0x22a)](_0x24570c=>{const _0x3f0581=_0x5492fe,_0x39667d=new Set();_0x24570c[_0x3f0581(0x1f4)](_0x4cc855=>{const _0x116d46=_0x3f0581;switch(_0x4cc855['type']){case'add':{const _0x561ab7=_0x4cc855['payload'][_0x116d46(0x1e4)];_0x39667d[_0x116d46(0x214)](_0x561ab7);break;}}}),R(this['_injector'],_0x39667d);}));}[_0x51e18b(0x1b7)](){const _0x3eee44=_0x51e18b;this['disposeWithMe'](this[_0x3eee44(0x1e2)][_0x3eee44(0x210)][_0x3eee44(0x22a)](async _0x138bae=>{const _0x43f913=_0x3eee44;var _0x43962d,_0x26268f,_0x5a96a3,_0x225e03;const _0x404a6c=(_0x43962d=this[_0x43f913(0x1c2)][_0x43f913(0x209)](_0x138bae[_0x43f913(0x1f3)])[_0x43f913(0x1f7)](_0x457a42=>_0x457a42['threadId']===_0x138bae[_0x43f913(0x1ae)]))==null?void 0x0:_0x43962d['root'];if(!_0x404a6c)return;const {unitId:_0x313240,subUnitId:_0x49ad86}=_0x404a6c;switch(_0x138bae[_0x43f913(0x1d9)]&&this[_0x43f913(0x1ad)][_0x43f913(0x213)](_0x138bae['user']),_0x138bae[_0x43f913(0x1c6)]){case v[_0x43f913(0x224)]:break;case v[_0x43f913(0x222)]:{this[_0x43f913(0x1c2)]['addComment'](_0x313240,_0x49ad86,{'unitId':_0x313240,'subUnitId':_0x49ad86,'ref':'','id':_0x138bae[_0x43f913(0x1fd)],'dT':f(+_0x138bae['createTimestamp']),'threadId':_0x138bae[_0x43f913(0x1ae)],'personId':(_0x5a96a3=(_0x26268f=_0x138bae[_0x43f913(0x1d9)])==null?void 0x0:_0x26268f[_0x43f913(0x1d4)])!=null?_0x5a96a3:_0x138bae['userId'],'text':JSON[_0x43f913(0x1ab)](_0x138bae['content']),'parentId':_0x404a6c['id']});break;}case v[_0x43f913(0x1de)]:{const _0x5cc989=this[_0x43f913(0x1c2)]['getComment'](_0x313240,_0x49ad86,_0x138bae[_0x43f913(0x1fd)]);_0x5cc989&&_0x5cc989[_0x43f913(0x1eb)]&&this[_0x43f913(0x1c2)]['deleteComment'](_0x313240,_0x49ad86,_0x138bae[_0x43f913(0x1fd)]);break;}case v[_0x43f913(0x1d3)]:{this['_threadCommentModel'][_0x43f913(0x1fc)](_0x313240,_0x49ad86,{'commentId':_0x138bae[_0x43f913(0x1fd)],'text':JSON[_0x43f913(0x1ab)](_0x138bae[_0x43f913(0x212)])});break;}case v[_0x43f913(0x21c)]:{const _0xea1089=(_0x225e03=this[_0x43f913(0x1c2)]['getUnit'](_0x138bae[_0x43f913(0x1f3)])[_0x43f913(0x1f7)](_0x4dba29=>_0x4dba29['threadId']===_0x138bae['threadId']))==null?void 0x0:_0x225e03[_0x43f913(0x1da)];_0xea1089&&this[_0x43f913(0x1c2)][_0x43f913(0x1b4)](_0x313240,_0x49ad86,_0xea1089['id'],_0x138bae['solved']===I[_0x43f913(0x1fb)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x51e18b(0x1dd)])),S(0x1,c['Inject'](M[_0x51e18b(0x1d8)])),S(0x2,c[_0x51e18b(0x207)](c[_0x51e18b(0x206)])),S(0x3,c[_0x51e18b(0x207)](c[_0x51e18b(0x1cc)]))],p);const q=_0x51e18b(0x21a),D={};var A=Object[_0x51e18b(0x1e5)],x=(_0x1ae7fe,_0x266c43,_0x50a6b2,_0x2c7309)=>{for(var _0x45b66c=_0x2c7309>0x1?void 0x0:_0x2c7309?A(_0x266c43,_0x50a6b2):_0x266c43,_0x5618c7=_0x1ae7fe['length']-0x1,_0x1336a4;_0x5618c7>=0x0;_0x5618c7--)(_0x1336a4=_0x1ae7fe[_0x5618c7])&&(_0x45b66c=_0x1336a4(_0x45b66c)||_0x45b66c);return _0x45b66c;},_=(_0x4f1d8c,_0x245b4c)=>(_0x1c970b,_0x1329aa)=>_0x245b4c(_0x1c970b,_0x1329aa,_0x4f1d8c);function Y(_0x33defe,_0x2121e0){const _0x483b7e=_0x51e18b,_0x2d9e35=_0x33defe[_0x483b7e(0x1bf)][0x0];return{..._0x2121e0,'id':_0x2d9e35['replyId'],'resolved':_0x33defe['solved']===0x1,'dT':f(_0x2d9e35['createTimestamp']),'personId':_0x2d9e35[_0x483b7e(0x1f9)],'threadId':_0x2d9e35[_0x483b7e(0x1ae)]};}function G(_0x5748a3,_0x155dba,_0x1437cb){const _0x2d3a29=_0x51e18b;var _0x50d9ed,_0xcb84f8;if(((_0xcb84f8=(_0x50d9ed=_0x5748a3==null?void 0x0:_0x5748a3[_0x2d3a29(0x1bf)])==null?void 0x0:_0x50d9ed[_0x2d3a29(0x211)])!=null?_0xcb84f8:0x0)>0x0){const _0x42d81d=(_0x2b5bcf,_0x8ef10f)=>({'id':_0x2b5bcf[_0x2d3a29(0x1fd)],'threadId':_0x2b5bcf[_0x2d3a29(0x1ae)],'dT':f(_0x2b5bcf[_0x2d3a29(0x1af)]),'personId':_0x2b5bcf['userId'],'resolved':_0x5748a3[_0x2d3a29(0x1c5)]===I[_0x2d3a29(0x1fb)],'unitId':_0x155dba,'subUnitId':_0x1437cb,'text':JSON['parse'](_0x2b5bcf['content']),'parentId':_0x8ef10f}),_0x4f2e41=_0x42d81d(_0x5748a3[_0x2d3a29(0x1bf)][0x0]);return{..._0x4f2e41,'children':_0x5748a3[_0x2d3a29(0x1bf)][_0x2d3a29(0x1cb)](0x1)[_0x2d3a29(0x1ef)](_0x3aa5bf=>_0x42d81d(_0x3aa5bf,_0x4f2e41['id']))};}return null;}let g=class{constructor(_0x20ec7a,_0x4019ad,_0x3a43fb,_0x46a60b){const _0x116d11=_0x51e18b;this['_httpService']=_0x20ec7a,this['_userService']=_0x4019ad,this[_0x116d11(0x1c1)]=_0x3a43fb,this[_0x116d11(0x216)]=_0x46a60b;}async[_0x51e18b(0x229)](_0x5b376c){const _0x38cadf=_0x51e18b;var _0x1f4b85,_0xf458ee;const {parentId:_0x1830e6,unitId:_0x5e69cf,text:_0x47259c,threadId:_0x57cfd7}=_0x5b376c,_0x208416=(_0xf458ee=(_0x1f4b85=_0x47259c['customRanges'])==null?void 0x0:_0x1f4b85['filter'](_0x1f1182=>_0x1f1182['rangeType']===c['CustomRangeType']['COMMENT'])[_0x38cadf(0x1ef)](_0x32c701=>_0x32c701['rangeId']))!=null?_0xf458ee:[],_0x58a0aa=JSON[_0x38cadf(0x21d)](_0x47259c),_0x46bc48=(await this['_sessionService'][_0x38cadf(0x227)](_0x5e69cf))[_0x38cadf(0x200)]();if(_0x1830e6){const _0x1aeac6={'memberId':_0x46bc48,'unitId':_0x5e69cf,'content':_0x58a0aa,'mention':_0x208416,'threadId':_0x57cfd7},_0x17fbc0=(await this['_httpService'][_0x38cadf(0x1bc)](_0x38cadf(0x1b3)+_0x5e69cf+'/reply',{'body':_0x1aeac6}))[_0x38cadf(0x203)]['reply'];return{..._0x5b376c,'id':_0x17fbc0[_0x38cadf(0x1fd)],'dT':c[_0x38cadf(0x1b6)](+_0x17fbc0[_0x38cadf(0x1af)])[_0x38cadf(0x1e8)](_0x38cadf(0x1ec)),'personId':_0x17fbc0[_0x38cadf(0x1f9)]};}else{const _0x1127d4={'memberId':_0x46bc48,'unitId':_0x5e69cf,'content':_0x58a0aa,'mention':_0x208416},_0x4e4e7b=await this[_0x38cadf(0x208)][_0x38cadf(0x1bc)]('/universer-api/comment/unit/'+_0x5e69cf+_0x38cadf(0x1b1),{'body':_0x1127d4});return Y(_0x4e4e7b['body'][_0x38cadf(0x1ea)],_0x5b376c);}}async[_0x51e18b(0x1fc)](_0x472270){const _0x2a3641=_0x51e18b;var _0x21f2fb,_0x1c8ae8;const {text:_0x183406,unitId:_0x40d303}=_0x472270,_0x171681=(_0x1c8ae8=(_0x21f2fb=_0x183406['customRanges'])==null?void 0x0:_0x21f2fb['filter'](_0x3df2ae=>_0x3df2ae['rangeType']===c[_0x2a3641(0x1e3)][_0x2a3641(0x1c9)])[_0x2a3641(0x1ef)](_0x337ade=>_0x337ade[_0x2a3641(0x1d2)]))!=null?_0x1c8ae8:[],_0x4f6338=JSON[_0x2a3641(0x21d)](_0x183406),_0x380e8a=_0x472270['threadId'],_0x154481=_0x472270['id'],_0x5e4923={'memberId':(await this[_0x2a3641(0x1c1)][_0x2a3641(0x227)](_0x40d303))[_0x2a3641(0x200)](),'unitId':_0x40d303,'threadId':_0x380e8a,'mention':_0x171681,'content':_0x4f6338,'replyId':_0x154481},_0x2c3200=await this[_0x2a3641(0x208)]['post']('/universer-api/comment/unit/'+_0x40d303+_0x2a3641(0x1b8),{'body':_0x5e4923});return!_0x2c3200[_0x2a3641(0x203)][_0x2a3641(0x223)]||_0x2c3200[_0x2a3641(0x203)][_0x2a3641(0x223)]['code']===0x1;}async['resolveComment'](_0x1da78b){const _0x2d5057=_0x51e18b,{unitId:_0x1c7fa7}=_0x1da78b,_0x3d15d8=_0x1da78b['threadId'],_0x5ddeb9={'memberId':this[_0x2d5057(0x1ad)][_0x2d5057(0x1ff)]()[_0x2d5057(0x1d4)],'unitId':_0x1c7fa7,'threadId':_0x3d15d8,'solved':_0x1da78b[_0x2d5057(0x220)]?I['Solved']:I['OpenOrReOpen']},_0x39626c=await this['_httpService']['post'](_0x2d5057(0x1b3)+_0x1c7fa7+_0x2d5057(0x221),{'body':_0x5ddeb9});return!_0x39626c[_0x2d5057(0x203)][_0x2d5057(0x223)]||_0x39626c[_0x2d5057(0x203)]['error'][_0x2d5057(0x20d)]===0x1;}async[_0x51e18b(0x1ba)](_0x5e80a0,_0x18e95c,_0x19189f,_0x439562){const _0x53e44f=_0x51e18b,_0x543425={'memberId':(await this[_0x53e44f(0x1c1)][_0x53e44f(0x227)](_0x5e80a0))[_0x53e44f(0x200)](),'threadId':_0x19189f,'replyId':_0x439562,'unitId':_0x5e80a0},_0x331fae=await this['_httpService'][_0x53e44f(0x1bc)]('/universer-api/comment/unit/'+_0x5e80a0+_0x53e44f(0x1e1),{'body':_0x543425});return!_0x331fae['body']['error']||_0x331fae[_0x53e44f(0x203)][_0x53e44f(0x223)][_0x53e44f(0x20d)]===0x1;}async['listComments'](_0x4a5fd1,_0x264687,_0x1098d1){const _0x532ef5=_0x51e18b,_0x3e312b={'unitId':_0x4a5fd1,'threadId':_0x1098d1},_0x195114=await this[_0x532ef5(0x208)]['post']('/universer-api/comment/unit/'+_0x4a5fd1+_0x532ef5(0x21e),{'body':_0x3e312b}),_0x3c826a=_0x1098d1['map'](_0x3f0637=>G(_0x195114[_0x532ef5(0x203)][_0x532ef5(0x21b)][_0x3f0637],_0x4a5fd1,_0x264687))[_0x532ef5(0x1ee)](Boolean);return Object[_0x532ef5(0x1d5)](_0x195114[_0x532ef5(0x203)][_0x532ef5(0x215)])[_0x532ef5(0x1f4)](_0x593440=>{const _0x127230=_0x532ef5;this['_userService'][_0x127230(0x213)](_0x593440);}),_0x3c826a;}[_0x51e18b(0x1cf)](_0x18703e){const _0x57c8f4=_0x51e18b;return{'id':_0x18703e['id'],'threadId':_0x18703e[_0x57c8f4(0x1ae)],'ref':_0x18703e[_0x57c8f4(0x1fe)]};}};g=x([_(0x0,c[_0x51e18b(0x207)](P[_0x51e18b(0x20c)])),_(0x1,c['Inject'](c[_0x51e18b(0x206)])),_(0x2,c[_0x51e18b(0x207)](b[_0x51e18b(0x228)])),_(0x3,c['Inject'](c[_0x51e18b(0x1cc)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x498d27,_0x45b224,_0x2d8aee,_0x433058)=>{const _0x4346ea=_0x51e18b;for(var _0x23a286=_0x433058>0x1?void 0x0:_0x433058?H(_0x45b224,_0x2d8aee):_0x45b224,_0x5cb91a=_0x498d27[_0x4346ea(0x211)]-0x1,_0x399e86;_0x5cb91a>=0x0;_0x5cb91a--)(_0x399e86=_0x498d27[_0x5cb91a])&&(_0x23a286=_0x399e86(_0x23a286)||_0x23a286);return _0x23a286;},y=(_0x2b17f8,_0x4648f7)=>(_0x4fe6d9,_0x15ce76)=>_0x4648f7(_0x4fe6d9,_0x15ce76,_0x2b17f8);let C=class extends c[_0x51e18b(0x1ed)]{constructor(_0x4be4ef,_0x33b7d0){const _0x7a9052=_0x51e18b;super(),this[_0x7a9052(0x1d7)]=_0x4be4ef,this['_threadCommentDataSource']=_0x33b7d0,this[_0x7a9052(0x1d1)]();}[_0x51e18b(0x1d1)](){const _0x31c573=_0x51e18b;this['_threadCommentDataSourceService'][_0x31c573(0x1aa)]=this['_threadCommentDataSource'],this[_0x31c573(0x1d7)][_0x31c573(0x218)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x51e18b(0x207)](g))],C);var F=Object[_0x51e18b(0x217)],L=Object[_0x51e18b(0x1e5)],Z=(_0x45ca74,_0x4e825f,_0x258826)=>_0x4e825f in _0x45ca74?F(_0x45ca74,_0x4e825f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x258826}):_0x45ca74[_0x4e825f]=_0x258826,W=(_0x248349,_0xcfe3d8,_0x501cb9,_0x15f0d7)=>{const _0x48e5f2=_0x51e18b;for(var _0x170b32=_0x15f0d7>0x1?void 0x0:_0x15f0d7?L(_0xcfe3d8,_0x501cb9):_0xcfe3d8,_0x2e959c=_0x248349[_0x48e5f2(0x211)]-0x1,_0x1a5c40;_0x2e959c>=0x0;_0x2e959c--)(_0x1a5c40=_0x248349[_0x2e959c])&&(_0x170b32=_0x1a5c40(_0x170b32)||_0x170b32);return _0x170b32;},O=(_0x3fd18b,_0x3fbd45)=>(_0x15354f,_0x329f2b)=>_0x3fbd45(_0x15354f,_0x329f2b,_0x3fd18b),N=(_0x407bb5,_0x3f9d35,_0x2bcfaa)=>Z(_0x407bb5,typeof _0x3f9d35!=_0x51e18b(0x1e9)?_0x3f9d35+'':_0x3f9d35,_0x2bcfaa);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x51e18b(0x1a9)]{constructor(_0x1a101c=D,_0x584c92,_0xdd372b){const _0x81dc53=_0x51e18b;super(),this[_0x81dc53(0x1e6)]=_0x1a101c,this['_injector']=_0x584c92,this[_0x81dc53(0x1f8)]=_0xdd372b;const {..._0x54ef4e}=c[_0x81dc53(0x1c8)]({},D,this[_0x81dc53(0x1e6)]);this[_0x81dc53(0x1f8)]['setConfig'](q,_0x54ef4e);}[_0x51e18b(0x1d6)](){const _0x1427eb=_0x51e18b;[[g],[C],[p]][_0x1427eb(0x1f4)](_0x9bd52c=>{const _0x2e6e2b=_0x1427eb;this[_0x2e6e2b(0x216)][_0x2e6e2b(0x214)](_0x9bd52c);});}[_0x51e18b(0x1c4)](){const _0x794cd=_0x51e18b;this[_0x794cd(0x216)][_0x794cd(0x1ce)](C),this[_0x794cd(0x216)][_0x794cd(0x1ce)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x51e18b(0x1db),U),N(exports[_0x51e18b(0x226)],'type',c[_0x51e18b(0x20a)]['UNIVER_UNKNOWN']),exports[_0x51e18b(0x226)]=W([c[_0x51e18b(0x1f0)](j[_0x51e18b(0x1b5)],b[_0x51e18b(0x1b0)],T[_0x51e18b(0x20e)]),O(0x1,c['Inject'](c[_0x51e18b(0x1cc)])),O(0x2,c[_0x51e18b(0x219)])],exports[_0x51e18b(0x226)]);function _0x5c55(){const _0x18ed0e=['_userService','threadId','createTimestamp','UniverCollaborationClientPlugin','/add','20033aGsmAW','/universer-api/comment/unit/','resolveComment','UniverThreadCommentUIPlugin','dayjs','_init','/edit','3OXVFln','deleteComment','OpenOrReOpen','post','2101lwsNQg','420854NlpRFL','replies','UNRECOGNIZED','_sessionService','_threadCommentModel','1448940mtEGPr','onReady','solved','type','@univerjs/thread-comment-ui','merge','COMMENT','34803vrqUkD','slice','Injector','5dcmbDe','get','saveCommentToSnapshot','pipe','_initDataSource','rangeId','Edit','userID','values','onStarting','_threadCommentDataSourceService','ThreadCommentModel','user','root','pluginName','1154842TkOqmj','CommentService','Delete','Unknown','9507246TKgjip','/delete','_commentService','CustomRangeType','personId','getOwnPropertyDescriptor','_config','_initUserSync','format','symbol','comment','parentId','YYYY/MM/DD\x20HH:mm','Disposable','filter','map','DependentOn','13190lelSTO','toStringTag','unitId','forEach','@univerjs/network','delete','find','_configService','userId','@univerjs/thread-comment','Solved','updateComment','replyId','ref','getCurrentUser','getMemberID','size','@univerjs/core','body','6WOrqlN','@univerjs-pro/license','UserManagerService','Inject','_httpService','getUnit','UniverInstanceType','disposeWithMe','HTTPService','code','UniverLicensePlugin','Module','commentUpdate$','length','content','addUser','add','users','_injector','defineProperty','syncUpdateMutationToColla','IConfigService','thread-comment-data-source.config','comments','Solve','stringify','/list','2216xUuCWB','resolved','/solved','Reply','error','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentDataSourcePlugin','requireSession','CollaborationSessionService','addComment','subscribe','Plugin','dataSource','parse','4824cqwSNX'];_0x5c55=function(){return _0x18ed0e;};return _0x5c55();}
1
+ 'use strict';const _0x1cc326=_0x2488;(function(_0x1e7bf7,_0x76045){const _0x16b439=_0x2488,_0xcb3009=_0x1e7bf7();while(!![]){try{const _0x2d013c=parseInt(_0x16b439(0x225))/0x1+parseInt(_0x16b439(0x1fe))/0x2+-parseInt(_0x16b439(0x224))/0x3*(-parseInt(_0x16b439(0x222))/0x4)+parseInt(_0x16b439(0x1da))/0x5*(-parseInt(_0x16b439(0x226))/0x6)+-parseInt(_0x16b439(0x21b))/0x7*(parseInt(_0x16b439(0x1c1))/0x8)+-parseInt(_0x16b439(0x21e))/0x9*(parseInt(_0x16b439(0x1dc))/0xa)+-parseInt(_0x16b439(0x21d))/0xb;if(_0x2d013c===_0x76045)break;else _0xcb3009['push'](_0xcb3009['shift']());}catch(_0x1e1d3e){_0xcb3009['push'](_0xcb3009['shift']());}}}(_0x58c4,0xd0eda));Object['defineProperty'](exports,Symbol[_0x1cc326(0x22b)],{'value':_0x1cc326(0x1e8)});const b=require(_0x1cc326(0x206)),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require(_0x1cc326(0x1cb)),M=require(_0x1cc326(0x223)),w=require('rxjs'),P=require(_0x1cc326(0x22e)),U=_0x1cc326(0x1b6);var I=(_0xe1f0bf=>(_0xe1f0bf[_0xe1f0bf[_0x1cc326(0x1cf)]=0x0]=_0x1cc326(0x1cf),_0xe1f0bf[_0xe1f0bf['Solved']=0x1]=_0x1cc326(0x21a),_0xe1f0bf[_0xe1f0bf[_0x1cc326(0x201)]=-0x1]=_0x1cc326(0x201),_0xe1f0bf))(I||{}),v=(_0x3e1181=>(_0x3e1181[_0x3e1181['Unknown']=0x0]=_0x1cc326(0x1f5),_0x3e1181[_0x3e1181[_0x1cc326(0x1be)]=0x1]=_0x1cc326(0x1be),_0x3e1181[_0x3e1181[_0x1cc326(0x21f)]=0x2]=_0x1cc326(0x21f),_0x3e1181[_0x3e1181[_0x1cc326(0x1ca)]=0x3]=_0x1cc326(0x1ca),_0x3e1181[_0x3e1181['Delete']=0x4]=_0x1cc326(0x1f0),_0x3e1181[_0x3e1181['Solve']=0x5]=_0x1cc326(0x1ee),_0x3e1181[_0x3e1181['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3e1181))(v||{});const f=_0x44b55c=>c['dayjs'](new Date(+_0x44b55c))[_0x1cc326(0x1b2)](_0x1cc326(0x1f2)),R=async(_0x40aa30,_0x10f7c5)=>{const _0x1e067a=_0x1cc326,_0x4c205f=_0x40aa30['get'](c[_0x1e067a(0x1f3)]),_0x495dce=_0x40aa30[_0x1e067a(0x203)](P['HTTPService']);_0x10f7c5[_0x1e067a(0x1b5)](_0xd19aa3=>{const _0x343a64=_0x1e067a;_0x4c205f[_0x343a64(0x1fa)](_0xd19aa3)&&_0x10f7c5[_0x343a64(0x1ce)](_0xd19aa3);}),_0x10f7c5[_0x1e067a(0x1db)]&&(await _0x495dce[_0x1e067a(0x203)](_0x1e067a(0x1f8),{'params':{'userIDs':[..._0x10f7c5]}}))[_0x1e067a(0x1ed)][_0x1e067a(0x217)][_0x1e067a(0x1b5)](_0x15ecd1=>{const _0x3cad50=_0x1e067a;_0x15ecd1&&_0x4c205f[_0x3cad50(0x1b3)](_0x15ecd1);});};function _0x2488(_0x270ce7,_0x38354f){const _0x58c4af=_0x58c4();return _0x2488=function(_0x248805,_0x502246){_0x248805=_0x248805-0x1b0;let _0x5ce360=_0x58c4af[_0x248805];return _0x5ce360;},_0x2488(_0x270ce7,_0x38354f);}var $=Object[_0x1cc326(0x1e9)],E=(_0x1b0074,_0x1c2f59,_0x168e98,_0x35cb8c)=>{const _0x3644de=_0x1cc326;for(var _0x2ac6fa=_0x35cb8c>0x1?void 0x0:_0x35cb8c?$(_0x1c2f59,_0x168e98):_0x1c2f59,_0x576937=_0x1b0074[_0x3644de(0x208)]-0x1,_0x39a70b;_0x576937>=0x0;_0x576937--)(_0x39a70b=_0x1b0074[_0x576937])&&(_0x2ac6fa=_0x39a70b(_0x2ac6fa)||_0x2ac6fa);return _0x2ac6fa;},S=(_0x3dd708,_0x3dcc82)=>(_0x1d71da,_0x456961)=>_0x3dcc82(_0x1d71da,_0x456961,_0x3dd708);let p=class extends c['Disposable']{constructor(_0x1638c7,_0x24cfcf,_0xd938d3,_0x1c68bd){const _0x36c022=_0x1cc326;super(),this['_commentService']=_0x1638c7,this[_0x36c022(0x20d)]=_0x24cfcf,this['_userService']=_0xd938d3,this['_injector']=_0x1c68bd,this[_0x36c022(0x1d4)](),this[_0x36c022(0x200)]();}[_0x1cc326(0x200)](){const _0x4103c5=_0x1cc326;this['disposeWithMe'](this[_0x4103c5(0x20d)][_0x4103c5(0x1fb)][_0x4103c5(0x1e2)](w['bufferTime'](0x10))[_0x4103c5(0x1c5)](_0x3cb205=>{const _0x45d465=_0x4103c5,_0x1cc0a6=new Set();_0x3cb205['forEach'](_0x215d25=>{const _0x3ad5ff=_0x2488;switch(_0x215d25[_0x3ad5ff(0x229)]){case _0x3ad5ff(0x22f):{const _0x2c3ff6=_0x215d25['payload'][_0x3ad5ff(0x1f1)];_0x1cc0a6['add'](_0x2c3ff6);break;}}}),R(this[_0x45d465(0x20a)],_0x1cc0a6);}));}['_init'](){const _0x28369a=_0x1cc326;this[_0x28369a(0x1e7)](this['_commentService'][_0x28369a(0x1fb)][_0x28369a(0x1c5)](async _0x5ea780=>{const _0x2bec2c=_0x28369a;var _0xf305fe,_0x4963b1,_0x3bef13,_0x4c3c27;const _0x72d20e=(_0xf305fe=this[_0x2bec2c(0x20d)][_0x2bec2c(0x1e5)](_0x5ea780[_0x2bec2c(0x1bb)])[_0x2bec2c(0x1b8)](_0x472df3=>_0x472df3[_0x2bec2c(0x1d9)]===_0x5ea780[_0x2bec2c(0x1d9)]))==null?void 0x0:_0xf305fe[_0x2bec2c(0x1c6)];if(!_0x72d20e)return;const {unitId:_0x483338,subUnitId:_0x4d94d4}=_0x72d20e;switch(_0x5ea780['user']&&this[_0x2bec2c(0x204)][_0x2bec2c(0x1b3)](_0x5ea780[_0x2bec2c(0x22c)]),_0x5ea780[_0x2bec2c(0x229)]){case v[_0x2bec2c(0x1be)]:break;case v[_0x2bec2c(0x21f)]:{this[_0x2bec2c(0x20d)][_0x2bec2c(0x1c8)](_0x483338,_0x4d94d4,{'unitId':_0x483338,'subUnitId':_0x4d94d4,'ref':'','id':_0x5ea780[_0x2bec2c(0x1d7)],'dT':f(+_0x5ea780[_0x2bec2c(0x211)]),'threadId':_0x5ea780[_0x2bec2c(0x1d9)],'personId':(_0x3bef13=(_0x4963b1=_0x5ea780[_0x2bec2c(0x22c)])==null?void 0x0:_0x4963b1[_0x2bec2c(0x20e)])!=null?_0x3bef13:_0x5ea780[_0x2bec2c(0x1c9)],'text':JSON[_0x2bec2c(0x1b9)](_0x5ea780[_0x2bec2c(0x22a)]),'parentId':_0x72d20e['id']});break;}case v[_0x2bec2c(0x1f0)]:{const _0x515ab1=this[_0x2bec2c(0x20d)][_0x2bec2c(0x1cd)](_0x483338,_0x4d94d4,_0x5ea780[_0x2bec2c(0x1d7)]);_0x515ab1&&_0x515ab1['parentId']&&this['_threadCommentModel'][_0x2bec2c(0x227)](_0x483338,_0x4d94d4,_0x5ea780[_0x2bec2c(0x1d7)]);break;}case v[_0x2bec2c(0x1ca)]:{this[_0x2bec2c(0x20d)][_0x2bec2c(0x1e0)](_0x483338,_0x4d94d4,{'commentId':_0x5ea780['replyId'],'text':JSON['parse'](_0x5ea780[_0x2bec2c(0x22a)])});break;}case v[_0x2bec2c(0x1ee)]:{const _0x32a155=(_0x4c3c27=this['_threadCommentModel'][_0x2bec2c(0x1e5)](_0x5ea780['unitId'])[_0x2bec2c(0x1b8)](_0x9b630b=>_0x9b630b[_0x2bec2c(0x1d9)]===_0x5ea780['threadId']))==null?void 0x0:_0x4c3c27[_0x2bec2c(0x1c6)];_0x32a155&&this[_0x2bec2c(0x20d)][_0x2bec2c(0x1d0)](_0x483338,_0x4d94d4,_0x32a155['id'],_0x5ea780[_0x2bec2c(0x1c3)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x1cc326(0x1f7)](b[_0x1cc326(0x1ef)])),S(0x1,c[_0x1cc326(0x1f7)](M[_0x1cc326(0x207)])),S(0x2,c[_0x1cc326(0x1f7)](c[_0x1cc326(0x1f3)])),S(0x3,c['Inject'](c[_0x1cc326(0x1e1)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x1cc326(0x1e9)],x=(_0x5e303b,_0x119924,_0x4b5ab2,_0x266470)=>{const _0x504cc9=_0x1cc326;for(var _0x1c2d27=_0x266470>0x1?void 0x0:_0x266470?A(_0x119924,_0x4b5ab2):_0x119924,_0x492737=_0x5e303b[_0x504cc9(0x208)]-0x1,_0x5b662c;_0x492737>=0x0;_0x492737--)(_0x5b662c=_0x5e303b[_0x492737])&&(_0x1c2d27=_0x5b662c(_0x1c2d27)||_0x1c2d27);return _0x1c2d27;},_=(_0x263202,_0x2224cd)=>(_0x253bce,_0x25f46e)=>_0x2224cd(_0x253bce,_0x25f46e,_0x263202);function Y(_0x393f82,_0x2caa40){const _0x19a6e=_0x1cc326,_0x45edbf=_0x393f82[_0x19a6e(0x202)][0x0];return{..._0x2caa40,'id':_0x45edbf[_0x19a6e(0x1d7)],'resolved':_0x393f82[_0x19a6e(0x1c3)]===0x1,'dT':f(_0x45edbf[_0x19a6e(0x211)]),'personId':_0x45edbf[_0x19a6e(0x1c9)],'threadId':_0x45edbf[_0x19a6e(0x1d9)]};}function G(_0x803dcf,_0x3da555,_0x1ceea4){const _0x22a337=_0x1cc326;var _0x3e1f2f,_0x3e83a0;if(((_0x3e83a0=(_0x3e1f2f=_0x803dcf==null?void 0x0:_0x803dcf[_0x22a337(0x202)])==null?void 0x0:_0x3e1f2f['length'])!=null?_0x3e83a0:0x0)>0x0){const _0x3a272e=(_0x38ceea,_0x1ae59b)=>({'id':_0x38ceea[_0x22a337(0x1d7)],'threadId':_0x38ceea['threadId'],'dT':f(_0x38ceea['createTimestamp']),'personId':_0x38ceea[_0x22a337(0x1c9)],'resolved':_0x803dcf[_0x22a337(0x1c3)]===I[_0x22a337(0x21a)],'unitId':_0x3da555,'subUnitId':_0x1ceea4,'text':JSON[_0x22a337(0x1b9)](_0x38ceea[_0x22a337(0x22a)]),'parentId':_0x1ae59b}),_0x4a5646=_0x3a272e(_0x803dcf[_0x22a337(0x202)][0x0]);return{..._0x4a5646,'children':_0x803dcf[_0x22a337(0x202)][_0x22a337(0x228)](0x1)[_0x22a337(0x1f9)](_0x33e782=>_0x3a272e(_0x33e782,_0x4a5646['id']))};}return null;}function _0x58c4(){const _0x204f76=['slice','type','content','toStringTag','user','CustomRangeType','@univerjs/network','add','dataSource','/list','IConfigService','format','addUser','reply','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','find','parse','UniverThreadCommentUIPlugin','unitId','HTTPService','_initDataSource','Add','listComments','onStarting','3872296JXMKIO','COMMENT','solved','CollaborationSessionService','subscribe','root','_config','addComment','userId','Edit','@univerjs/thread-comment-ui','error','getComment','delete','OpenOrReOpen','resolveComment','comments','IThreadCommentDataSourceService','rangeType','_init','ref','rangeId','replyId','comment','threadId','95ZNcBYZ','size','110sfuPfE','values','post','/universer-api/comment/unit/','updateComment','Injector','pipe','pluginName','code','getUnit','_sessionService','disposeWithMe','Module','getOwnPropertyDescriptor','requireSession','merge','UniverLicensePlugin','body','Solve','CommentService','Delete','personId','YYYY/MM/DD\x20HH:mm','UserManagerService','dayjs','Unknown','/delete','Inject','/universer-api/user/list','map','getUser','commentUpdate$','_configService','UniverCollaborationClientPlugin','3339356XKNHIR','resolved','_initUserSync','UNRECOGNIZED','replies','get','_userService','_threadCommentDataSource','@univerjs-pro/collaboration-client','ThreadCommentModel','length','saveCommentToSnapshot','_injector','_threadCommentDataSourceService','filter','_threadCommentModel','userID','getCurrentUser','customRanges','createTimestamp','_httpService','syncUpdateMutationToColla','getMemberID','/solved','stringify','users','UniverThreadCommentDataSourcePlugin','symbol','Solved','14QbNzdo','Plugin','4324034BKTVrE','871209CiwEsU','Reply','setConfig','/add','4jwkWgA','@univerjs/thread-comment','4249419XTqdDj','1101480eBkzbX','286068ExWYGb','deleteComment'];_0x58c4=function(){return _0x204f76;};return _0x58c4();}let g=class{constructor(_0x1536e0,_0x4c6216,_0x4b9c07,_0x2a08bc){const _0x56d4ec=_0x1cc326;this['_httpService']=_0x1536e0,this[_0x56d4ec(0x204)]=_0x4c6216,this[_0x56d4ec(0x1e6)]=_0x4b9c07,this[_0x56d4ec(0x20a)]=_0x2a08bc;}async[_0x1cc326(0x1c8)](_0x50ddf3){const _0x209163=_0x1cc326;var _0x1877db,_0x6d5ebf;const {parentId:_0x5cbf45,unitId:_0x1cc7f2,text:_0x129a5f,threadId:_0x4dab95}=_0x50ddf3,_0x3b0f6b=(_0x6d5ebf=(_0x1877db=_0x129a5f[_0x209163(0x210)])==null?void 0x0:_0x1877db[_0x209163(0x20c)](_0x53507e=>_0x53507e[_0x209163(0x1d3)]===c[_0x209163(0x22d)]['COMMENT'])[_0x209163(0x1f9)](_0x4b27f6=>_0x4b27f6['rangeId']))!=null?_0x6d5ebf:[],_0x3da3e7=JSON[_0x209163(0x216)](_0x129a5f),_0x43b2cc=(await this['_sessionService'][_0x209163(0x1ea)](_0x1cc7f2))[_0x209163(0x214)]();if(_0x5cbf45){const _0xc56490={'memberId':_0x43b2cc,'unitId':_0x1cc7f2,'content':_0x3da3e7,'mention':_0x3b0f6b,'threadId':_0x4dab95},_0xaf2c5=(await this['_httpService'][_0x209163(0x1de)](_0x209163(0x1df)+_0x1cc7f2+'/reply',{'body':_0xc56490}))[_0x209163(0x1ed)][_0x209163(0x1b4)];return{..._0x50ddf3,'id':_0xaf2c5['replyId'],'dT':c[_0x209163(0x1f4)](+_0xaf2c5[_0x209163(0x211)])[_0x209163(0x1b2)](_0x209163(0x1f2)),'personId':_0xaf2c5['userId']};}else{const _0x4cdfb8={'memberId':_0x43b2cc,'unitId':_0x1cc7f2,'content':_0x3da3e7,'mention':_0x3b0f6b},_0x2dd799=await this[_0x209163(0x212)]['post'](_0x209163(0x1df)+_0x1cc7f2+_0x209163(0x221),{'body':_0x4cdfb8});return Y(_0x2dd799[_0x209163(0x1ed)][_0x209163(0x1d8)],_0x50ddf3);}}async['updateComment'](_0x1842b5){const _0x1b1f56=_0x1cc326;var _0x333de3,_0x1ab8e7;const {text:_0x3da809,unitId:_0x5dbf42}=_0x1842b5,_0x1c880e=(_0x1ab8e7=(_0x333de3=_0x3da809['customRanges'])==null?void 0x0:_0x333de3[_0x1b1f56(0x20c)](_0x3ce2f2=>_0x3ce2f2['rangeType']===c[_0x1b1f56(0x22d)][_0x1b1f56(0x1c2)])[_0x1b1f56(0x1f9)](_0x2de718=>_0x2de718[_0x1b1f56(0x1d6)]))!=null?_0x1ab8e7:[],_0x42674c=JSON[_0x1b1f56(0x216)](_0x3da809),_0x3c0871=_0x1842b5[_0x1b1f56(0x1d9)],_0x1f7ec2=_0x1842b5['id'],_0x272586={'memberId':(await this[_0x1b1f56(0x1e6)]['requireSession'](_0x5dbf42))[_0x1b1f56(0x214)](),'unitId':_0x5dbf42,'threadId':_0x3c0871,'mention':_0x1c880e,'content':_0x42674c,'replyId':_0x1f7ec2},_0x177a42=await this['_httpService'][_0x1b1f56(0x1de)]('/universer-api/comment/unit/'+_0x5dbf42+'/edit',{'body':_0x272586});return!_0x177a42[_0x1b1f56(0x1ed)][_0x1b1f56(0x1cc)]||_0x177a42[_0x1b1f56(0x1ed)][_0x1b1f56(0x1cc)][_0x1b1f56(0x1e4)]===0x1;}async[_0x1cc326(0x1d0)](_0xf4b202){const _0x49b7f2=_0x1cc326,{unitId:_0x486071}=_0xf4b202,_0x58ef00=_0xf4b202[_0x49b7f2(0x1d9)],_0x46dc4a={'memberId':this[_0x49b7f2(0x204)][_0x49b7f2(0x20f)]()[_0x49b7f2(0x20e)],'unitId':_0x486071,'threadId':_0x58ef00,'solved':_0xf4b202[_0x49b7f2(0x1ff)]?I['Solved']:I[_0x49b7f2(0x1cf)]},_0x55157c=await this['_httpService'][_0x49b7f2(0x1de)]('/universer-api/comment/unit/'+_0x486071+_0x49b7f2(0x215),{'body':_0x46dc4a});return!_0x55157c['body'][_0x49b7f2(0x1cc)]||_0x55157c[_0x49b7f2(0x1ed)]['error'][_0x49b7f2(0x1e4)]===0x1;}async[_0x1cc326(0x227)](_0x4ebe09,_0x17bd4b,_0x14b42c,_0xd9472){const _0x415c1a=_0x1cc326,_0x2fcff5={'memberId':(await this[_0x415c1a(0x1e6)][_0x415c1a(0x1ea)](_0x4ebe09))[_0x415c1a(0x214)](),'threadId':_0x14b42c,'replyId':_0xd9472,'unitId':_0x4ebe09},_0x328008=await this[_0x415c1a(0x212)][_0x415c1a(0x1de)]('/universer-api/comment/unit/'+_0x4ebe09+_0x415c1a(0x1f6),{'body':_0x2fcff5});return!_0x328008[_0x415c1a(0x1ed)][_0x415c1a(0x1cc)]||_0x328008['body'][_0x415c1a(0x1cc)][_0x415c1a(0x1e4)]===0x1;}async[_0x1cc326(0x1bf)](_0x23847e,_0x5551a3,_0x9aa56a){const _0x57571b=_0x1cc326,_0x126873={'unitId':_0x23847e,'threadId':_0x9aa56a},_0x1b2f12=await this[_0x57571b(0x212)][_0x57571b(0x1de)]('/universer-api/comment/unit/'+_0x23847e+_0x57571b(0x1b0),{'body':_0x126873}),_0x3d5d7a=_0x9aa56a[_0x57571b(0x1f9)](_0x25a320=>G(_0x1b2f12[_0x57571b(0x1ed)][_0x57571b(0x1d1)][_0x25a320],_0x23847e,_0x5551a3))[_0x57571b(0x20c)](Boolean);return Object[_0x57571b(0x1dd)](_0x1b2f12[_0x57571b(0x1ed)][_0x57571b(0x217)])['forEach'](_0x8e94ab=>{const _0x52a549=_0x57571b;this[_0x52a549(0x204)][_0x52a549(0x1b3)](_0x8e94ab);}),_0x3d5d7a;}[_0x1cc326(0x209)](_0x5eb727){const _0x1e42a2=_0x1cc326;return{'id':_0x5eb727['id'],'threadId':_0x5eb727['threadId'],'ref':_0x5eb727[_0x1e42a2(0x1d5)]};}};g=x([_(0x0,c['Inject'](P[_0x1cc326(0x1bc)])),_(0x1,c[_0x1cc326(0x1f7)](c[_0x1cc326(0x1f3)])),_(0x2,c[_0x1cc326(0x1f7)](b[_0x1cc326(0x1c4)])),_(0x3,c[_0x1cc326(0x1f7)](c[_0x1cc326(0x1e1)]))],g);var H=Object[_0x1cc326(0x1e9)],J=(_0x53a139,_0x559b97,_0x5745bc,_0xfea45e)=>{const _0x4f0bef=_0x1cc326;for(var _0x1a2186=_0xfea45e>0x1?void 0x0:_0xfea45e?H(_0x559b97,_0x5745bc):_0x559b97,_0x46ff92=_0x53a139[_0x4f0bef(0x208)]-0x1,_0x2316b5;_0x46ff92>=0x0;_0x46ff92--)(_0x2316b5=_0x53a139[_0x46ff92])&&(_0x1a2186=_0x2316b5(_0x1a2186)||_0x1a2186);return _0x1a2186;},y=(_0xe1a153,_0x2de42b)=>(_0x1565df,_0x183b8f)=>_0x2de42b(_0x1565df,_0x183b8f,_0xe1a153);let C=class extends c['Disposable']{constructor(_0x46d151,_0x2ebd8c){const _0x231f8d=_0x1cc326;super(),this[_0x231f8d(0x20b)]=_0x46d151,this[_0x231f8d(0x205)]=_0x2ebd8c,this['_initDataSource']();}[_0x1cc326(0x1bd)](){const _0x4495bc=_0x1cc326;this[_0x4495bc(0x20b)][_0x4495bc(0x230)]=this[_0x4495bc(0x205)],this[_0x4495bc(0x20b)][_0x4495bc(0x213)]=!0x1;}};C=J([y(0x0,M[_0x1cc326(0x1d2)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x1cc326(0x1b7)],L=Object[_0x1cc326(0x1e9)],Z=(_0x22fba4,_0x5b6860,_0x5bdbeb)=>_0x5b6860 in _0x22fba4?F(_0x22fba4,_0x5b6860,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5bdbeb}):_0x22fba4[_0x5b6860]=_0x5bdbeb,W=(_0x2ae318,_0x488150,_0x9ad07,_0x1aaf94)=>{const _0x16fd41=_0x1cc326;for(var _0x5c913a=_0x1aaf94>0x1?void 0x0:_0x1aaf94?L(_0x488150,_0x9ad07):_0x488150,_0x5846cb=_0x2ae318[_0x16fd41(0x208)]-0x1,_0x55f836;_0x5846cb>=0x0;_0x5846cb--)(_0x55f836=_0x2ae318[_0x5846cb])&&(_0x5c913a=_0x55f836(_0x5c913a)||_0x5c913a);return _0x5c913a;},O=(_0x5df39e,_0x5b2fdb)=>(_0x232daa,_0x2cfe28)=>_0x5b2fdb(_0x232daa,_0x2cfe28,_0x5df39e),N=(_0x2a07b7,_0x3a92d5,_0x5e82c8)=>Z(_0x2a07b7,typeof _0x3a92d5!=_0x1cc326(0x219)?_0x3a92d5+'':_0x3a92d5,_0x5e82c8);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1cc326(0x21c)]{constructor(_0x13abdc=D,_0x5678c2,_0x2f87c6){const _0x203d23=_0x1cc326;super(),this['_config']=_0x13abdc,this['_injector']=_0x5678c2,this['_configService']=_0x2f87c6;const {..._0x18c611}=c[_0x203d23(0x1eb)]({},D,this[_0x203d23(0x1c7)]);this[_0x203d23(0x1fc)][_0x203d23(0x220)](q,_0x18c611);}[_0x1cc326(0x1c0)](){const _0x385060=_0x1cc326;[[g],[C],[p]][_0x385060(0x1b5)](_0x3fbec1=>{const _0x228cd9=_0x385060;this[_0x228cd9(0x20a)][_0x228cd9(0x22f)](_0x3fbec1);});}['onReady'](){const _0x485d92=_0x1cc326;this[_0x485d92(0x20a)][_0x485d92(0x203)](C),this[_0x485d92(0x20a)]['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x1cc326(0x1e3),U),N(exports[_0x1cc326(0x218)],_0x1cc326(0x229),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0x1cc326(0x1ba)],b[_0x1cc326(0x1fd)],T[_0x1cc326(0x1ec)]),O(0x1,c[_0x1cc326(0x1f7)](c[_0x1cc326(0x1e1)])),O(0x2,c[_0x1cc326(0x1b1)])],exports[_0x1cc326(0x218)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- function _0x2500(_0xc161fb,_0x59b14d){const _0xbf0638=_0xbf06();return _0x2500=function(_0x25009d,_0x2d024b){_0x25009d=_0x25009d-0xee;let _0x79150f=_0xbf0638[_0x25009d];return _0x79150f;},_0x2500(_0xc161fb,_0x59b14d);}const _0x5bafd5=_0x2500;(function(_0x2dbc5b,_0x7c51bd){const _0x491544=_0x2500,_0x5ee555=_0x2dbc5b();while(!![]){try{const _0x19416b=-parseInt(_0x491544(0xf6))/0x1+parseInt(_0x491544(0xf3))/0x2*(parseInt(_0x491544(0x12e))/0x3)+parseInt(_0x491544(0x13d))/0x4+-parseInt(_0x491544(0x12c))/0x5+parseInt(_0x491544(0x114))/0x6*(parseInt(_0x491544(0x11a))/0x7)+parseInt(_0x491544(0x10b))/0x8+parseInt(_0x491544(0x117))/0x9;if(_0x19416b===_0x7c51bd)break;else _0x5ee555['push'](_0x5ee555['shift']());}catch(_0x13a064){_0x5ee555['push'](_0x5ee555['shift']());}}}(_0xbf06,0x86b87));import{CommentService as _0x1daba7,CollaborationSessionService as _0x4e7413,UniverCollaborationClientPlugin as _0x10eb17}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1c16ff}from'@univerjs-pro/license';import{dayjs as _0x51e9d5,UserManagerService as _0x2cd254,Inject as _0x21debe,Injector as _0x526b05,Disposable as _0x37480f,CustomRangeType as _0x919c75,UniverInstanceType as _0x4f6375,DependentOn as _0x44e46d,IConfigService as _0x3481ba,Plugin as _0x202252,merge as _0x554707}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x385c23}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4ecd78,IThreadCommentDataSourceService as _0xde2d25}from'@univerjs/thread-comment';function _0xbf06(){const _0x44433c=['_injector','_httpService','_initDataSource','/edit','error','updateComment','subscribe','threadId','getCurrentUser','setConfig','listComments','personId','unitId','find','620862vVRVVp','getComment','stringify','656826ujvgtq','Delete','addComment','payload','solved','comment','getUser','UNRECOGNIZED','resolveComment','_userService','userID','pluginName','users','onReady','length','map','parse','/list','_threadCommentModel','delete','addUser','5639784cFJFOC','/delete','parentId','Add','/universer-api/user/list','disposeWithMe','deleteComment','ref','YYYY/MM/DD\x20HH:mm','60mJYkeF','filter','values','4148703DIPPfu','OpenOrReOpen','customRanges','176673IumwBw','Unknown','userId','slice','code','rangeId','getOwnPropertyDescriptor','syncUpdateMutationToColla','COMMENT','/solved','user','/universer-api/comment/unit/','_threadCommentDataSource','onStarting','_sessionService','UNIVER_UNKNOWN','_commentService','defineProperty','4245505cxiEJa','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3gGjoaF','get','symbol','add','replyId','forEach','_configService','Solved','requireSession','body','_threadCommentDataSourceService','dataSource','Edit','rangeType','comments','1315924oZJWuv','_config','Solve','_initUserSync','type','thread-comment-data-source.config','content','getMemberID','resolved','createTimestamp','Reply','_init','saveCommentToSnapshot','getUnit','replies','reply','post'];_0xbf06=function(){return _0x44433c;};return _0xbf06();}import{bufferTime as _0x2d1e75}from'rxjs';import{HTTPService as _0x249829}from'@univerjs/network';const W=_0x5bafd5(0x12d);var I=(_0x5079b5=>(_0x5079b5[_0x5079b5['OpenOrReOpen']=0x0]=_0x5bafd5(0x118),_0x5079b5[_0x5079b5['Solved']=0x1]=_0x5bafd5(0x135),_0x5079b5[_0x5079b5['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x5079b5))(I||{}),v=(_0x5802ba=>(_0x5802ba[_0x5802ba['Unknown']=0x0]=_0x5bafd5(0x11b),_0x5802ba[_0x5802ba[_0x5bafd5(0x10e)]=0x1]='Add',_0x5802ba[_0x5802ba[_0x5bafd5(0x147)]=0x2]='Reply',_0x5802ba[_0x5802ba[_0x5bafd5(0x13a)]=0x3]=_0x5bafd5(0x13a),_0x5802ba[_0x5802ba[_0x5bafd5(0xf7)]=0x4]=_0x5bafd5(0xf7),_0x5802ba[_0x5802ba[_0x5bafd5(0x13f)]=0x5]='Solve',_0x5802ba[_0x5802ba[_0x5bafd5(0xfd)]=-0x1]=_0x5bafd5(0xfd),_0x5802ba))(v||{});const D=_0x1e636e=>_0x51e9d5(new Date(+_0x1e636e))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x554162,_0x80d833)=>{const _0x2273fa=_0x5bafd5,_0x1ea44f=_0x554162['get'](_0x2cd254),_0x3e5fb6=_0x554162[_0x2273fa(0x12f)](_0x249829);_0x80d833[_0x2273fa(0x133)](_0x492164=>{const _0xb0de10=_0x2273fa;_0x1ea44f[_0xb0de10(0xfc)](_0x492164)&&_0x80d833[_0xb0de10(0x109)](_0x492164);}),_0x80d833['size']&&(await _0x3e5fb6[_0x2273fa(0x12f)](_0x2273fa(0x10f),{'params':{'userIDs':[..._0x80d833]}}))[_0x2273fa(0x137)]['users']['forEach'](_0x1ef776=>{_0x1ef776&&_0x1ea44f['addUser'](_0x1ef776);});};var K=Object[_0x5bafd5(0x120)],V=(_0x5f4273,_0x13bd53,_0x1cc595,_0x3358a8)=>{const _0x4f9612=_0x5bafd5;for(var _0x4a65e3=_0x3358a8>0x1?void 0x0:_0x3358a8?K(_0x13bd53,_0x1cc595):_0x13bd53,_0x562985=_0x5f4273[_0x4f9612(0x104)]-0x1,_0x9156b5;_0x562985>=0x0;_0x562985--)(_0x9156b5=_0x5f4273[_0x562985])&&(_0x4a65e3=_0x9156b5(_0x4a65e3)||_0x4a65e3);return _0x4a65e3;},p=(_0x3d4582,_0x2e2049)=>(_0x8c15e4,_0x4b9692)=>_0x2e2049(_0x8c15e4,_0x4b9692,_0x3d4582);let S=class extends _0x37480f{constructor(_0x319d3d,_0x48c5bf,_0x176b1d,_0x328729){const _0x2dfd8b=_0x5bafd5;super(),this['_commentService']=_0x319d3d,this[_0x2dfd8b(0x108)]=_0x48c5bf,this[_0x2dfd8b(0xff)]=_0x176b1d,this[_0x2dfd8b(0x14e)]=_0x328729,this[_0x2dfd8b(0x148)](),this[_0x2dfd8b(0x140)]();}['_initUserSync'](){const _0x1cfacc=_0x5bafd5;this[_0x1cfacc(0x110)](this[_0x1cfacc(0x108)]['commentUpdate$']['pipe'](_0x2d1e75(0x10))['subscribe'](_0x4e7f0d=>{const _0x14d9bb=_0x1cfacc,_0x3ed9a8=new Set();_0x4e7f0d[_0x14d9bb(0x133)](_0x1cbd6d=>{const _0x2b116e=_0x14d9bb;switch(_0x1cbd6d[_0x2b116e(0x141)]){case _0x2b116e(0x131):{const _0x3548c7=_0x1cbd6d[_0x2b116e(0xf9)][_0x2b116e(0xf0)];_0x3ed9a8[_0x2b116e(0x131)](_0x3548c7);break;}}}),B(this[_0x14d9bb(0x14e)],_0x3ed9a8);}));}[_0x5bafd5(0x148)](){const _0xcbb601=_0x5bafd5;this[_0xcbb601(0x110)](this[_0xcbb601(0x12a)]['commentUpdate$'][_0xcbb601(0x154)](async _0x41f439=>{const _0x37f58a=_0xcbb601;var _0x586796,_0x4e22ff,_0x499dc5,_0x1e4e43;const _0x14c388=(_0x586796=this[_0x37f58a(0x108)][_0x37f58a(0x14a)](_0x41f439[_0x37f58a(0xf1)])[_0x37f58a(0xf2)](_0x563f68=>_0x563f68['threadId']===_0x41f439['threadId']))==null?void 0x0:_0x586796['root'];if(!_0x14c388)return;const {unitId:_0x34282c,subUnitId:_0x2e6a57}=_0x14c388;switch(_0x41f439['user']&&this[_0x37f58a(0xff)][_0x37f58a(0x10a)](_0x41f439[_0x37f58a(0x124)]),_0x41f439[_0x37f58a(0x141)]){case v['Add']:break;case v['Reply']:{this[_0x37f58a(0x108)][_0x37f58a(0xf8)](_0x34282c,_0x2e6a57,{'unitId':_0x34282c,'subUnitId':_0x2e6a57,'ref':'','id':_0x41f439['replyId'],'dT':D(+_0x41f439[_0x37f58a(0x146)]),'threadId':_0x41f439[_0x37f58a(0x155)],'personId':(_0x499dc5=(_0x4e22ff=_0x41f439[_0x37f58a(0x124)])==null?void 0x0:_0x4e22ff[_0x37f58a(0x100)])!=null?_0x499dc5:_0x41f439['userId'],'text':JSON[_0x37f58a(0x106)](_0x41f439[_0x37f58a(0x143)]),'parentId':_0x14c388['id']});break;}case v[_0x37f58a(0xf7)]:{const _0x46e702=this[_0x37f58a(0x108)][_0x37f58a(0xf4)](_0x34282c,_0x2e6a57,_0x41f439['replyId']);_0x46e702&&_0x46e702[_0x37f58a(0x10d)]&&this[_0x37f58a(0x108)]['deleteComment'](_0x34282c,_0x2e6a57,_0x41f439[_0x37f58a(0x132)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x37f58a(0x153)](_0x34282c,_0x2e6a57,{'commentId':_0x41f439[_0x37f58a(0x132)],'text':JSON['parse'](_0x41f439[_0x37f58a(0x143)])});break;}case v[_0x37f58a(0x13f)]:{const _0x5c243c=(_0x1e4e43=this[_0x37f58a(0x108)][_0x37f58a(0x14a)](_0x41f439[_0x37f58a(0xf1)])[_0x37f58a(0xf2)](_0x2f2e8e=>_0x2f2e8e[_0x37f58a(0x155)]===_0x41f439['threadId']))==null?void 0x0:_0x1e4e43['root'];_0x5c243c&&this[_0x37f58a(0x108)][_0x37f58a(0xfe)](_0x34282c,_0x2e6a57,_0x5c243c['id'],_0x41f439[_0x37f58a(0xfa)]===I[_0x37f58a(0x135)]);break;}}}));}};S=V([p(0x0,_0x21debe(_0x1daba7)),p(0x1,_0x21debe(_0x4ecd78)),p(0x2,_0x21debe(_0x2cd254)),p(0x3,_0x21debe(_0x526b05))],S);const z=_0x5bafd5(0x142),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0xc036d1,_0xeab7e7,_0x401602,_0x3a0113)=>{const _0x31fb97=_0x5bafd5;for(var _0x13d716=_0x3a0113>0x1?void 0x0:_0x3a0113?k(_0xeab7e7,_0x401602):_0xeab7e7,_0x444bc5=_0xc036d1[_0x31fb97(0x104)]-0x1,_0x93ddf2;_0x444bc5>=0x0;_0x444bc5--)(_0x93ddf2=_0xc036d1[_0x444bc5])&&(_0x13d716=_0x93ddf2(_0x13d716)||_0x13d716);return _0x13d716;},_=(_0x4e936e,_0x2feb1c)=>(_0x28ebaf,_0x219193)=>_0x2feb1c(_0x28ebaf,_0x219193,_0x4e936e);function X(_0x126613,_0x41108c){const _0xfceb08=_0x5bafd5,_0x403fe1=_0x126613['replies'][0x0];return{..._0x41108c,'id':_0x403fe1[_0xfceb08(0x132)],'resolved':_0x126613[_0xfceb08(0xfa)]===0x1,'dT':D(_0x403fe1[_0xfceb08(0x146)]),'personId':_0x403fe1['userId'],'threadId':_0x403fe1[_0xfceb08(0x155)]};}function ee(_0x370ca6,_0x1ae1fa,_0x301d45){const _0x3a4d16=_0x5bafd5;var _0x481cd9,_0xaf5960;if(((_0xaf5960=(_0x481cd9=_0x370ca6==null?void 0x0:_0x370ca6[_0x3a4d16(0x14b)])==null?void 0x0:_0x481cd9['length'])!=null?_0xaf5960:0x0)>0x0){const _0x4c56da=(_0x12a151,_0x27fa95)=>({'id':_0x12a151[_0x3a4d16(0x132)],'threadId':_0x12a151[_0x3a4d16(0x155)],'dT':D(_0x12a151[_0x3a4d16(0x146)]),'personId':_0x12a151[_0x3a4d16(0x11c)],'resolved':_0x370ca6[_0x3a4d16(0xfa)]===I[_0x3a4d16(0x135)],'unitId':_0x1ae1fa,'subUnitId':_0x301d45,'text':JSON[_0x3a4d16(0x106)](_0x12a151[_0x3a4d16(0x143)]),'parentId':_0x27fa95}),_0xa4fc22=_0x4c56da(_0x370ca6[_0x3a4d16(0x14b)][0x0]);return{..._0xa4fc22,'children':_0x370ca6[_0x3a4d16(0x14b)][_0x3a4d16(0x11d)](0x1)[_0x3a4d16(0x105)](_0x547b66=>_0x4c56da(_0x547b66,_0xa4fc22['id']))};}return null;}let f=class{constructor(_0x4cc459,_0x5217a3,_0x3de910,_0x1d2550){const _0x453a57=_0x5bafd5;this[_0x453a57(0x14f)]=_0x4cc459,this[_0x453a57(0xff)]=_0x5217a3,this[_0x453a57(0x128)]=_0x3de910,this[_0x453a57(0x14e)]=_0x1d2550;}async[_0x5bafd5(0xf8)](_0x5c4001){const _0x18e9ed=_0x5bafd5;var _0x2c62a9,_0x501922;const {parentId:_0x24aaef,unitId:_0x3c9ace,text:_0x29e33e,threadId:_0x594793}=_0x5c4001,_0x1e486d=(_0x501922=(_0x2c62a9=_0x29e33e['customRanges'])==null?void 0x0:_0x2c62a9['filter'](_0x1461d1=>_0x1461d1[_0x18e9ed(0x13b)]===_0x919c75['COMMENT'])[_0x18e9ed(0x105)](_0x4774eb=>_0x4774eb[_0x18e9ed(0x11f)]))!=null?_0x501922:[],_0x5037b5=JSON[_0x18e9ed(0xf5)](_0x29e33e),_0x4a66e5=(await this[_0x18e9ed(0x128)][_0x18e9ed(0x136)](_0x3c9ace))['getMemberID']();if(_0x24aaef){const _0x5b601e={'memberId':_0x4a66e5,'unitId':_0x3c9ace,'content':_0x5037b5,'mention':_0x1e486d,'threadId':_0x594793},_0x597a9b=(await this[_0x18e9ed(0x14f)][_0x18e9ed(0x14d)]('/universer-api/comment/unit/'+_0x3c9ace+'/reply',{'body':_0x5b601e}))[_0x18e9ed(0x137)][_0x18e9ed(0x14c)];return{..._0x5c4001,'id':_0x597a9b['replyId'],'dT':_0x51e9d5(+_0x597a9b[_0x18e9ed(0x146)])['format'](_0x18e9ed(0x113)),'personId':_0x597a9b[_0x18e9ed(0x11c)]};}else{const _0x599591={'memberId':_0x4a66e5,'unitId':_0x3c9ace,'content':_0x5037b5,'mention':_0x1e486d},_0x1850bc=await this[_0x18e9ed(0x14f)][_0x18e9ed(0x14d)]('/universer-api/comment/unit/'+_0x3c9ace+'/add',{'body':_0x599591});return X(_0x1850bc[_0x18e9ed(0x137)][_0x18e9ed(0xfb)],_0x5c4001);}}async[_0x5bafd5(0x153)](_0x2e36f1){const _0x38f122=_0x5bafd5;var _0x52bb44,_0x5f2e0e;const {text:_0x2b095b,unitId:_0x1d8485}=_0x2e36f1,_0x3cc18d=(_0x5f2e0e=(_0x52bb44=_0x2b095b[_0x38f122(0x119)])==null?void 0x0:_0x52bb44[_0x38f122(0x115)](_0x314cca=>_0x314cca[_0x38f122(0x13b)]===_0x919c75[_0x38f122(0x122)])[_0x38f122(0x105)](_0x48b842=>_0x48b842[_0x38f122(0x11f)]))!=null?_0x5f2e0e:[],_0x408f30=JSON['stringify'](_0x2b095b),_0x239618=_0x2e36f1['threadId'],_0x21f087=_0x2e36f1['id'],_0x2a0e66={'memberId':(await this[_0x38f122(0x128)]['requireSession'](_0x1d8485))[_0x38f122(0x144)](),'unitId':_0x1d8485,'threadId':_0x239618,'mention':_0x3cc18d,'content':_0x408f30,'replyId':_0x21f087},_0x3294bc=await this[_0x38f122(0x14f)][_0x38f122(0x14d)](_0x38f122(0x125)+_0x1d8485+_0x38f122(0x151),{'body':_0x2a0e66});return!_0x3294bc[_0x38f122(0x137)][_0x38f122(0x152)]||_0x3294bc[_0x38f122(0x137)]['error'][_0x38f122(0x11e)]===0x1;}async[_0x5bafd5(0xfe)](_0x10c470){const _0x596d7f=_0x5bafd5,{unitId:_0x187755}=_0x10c470,_0x22b58e=_0x10c470['threadId'],_0x401aff={'memberId':this[_0x596d7f(0xff)][_0x596d7f(0x156)]()[_0x596d7f(0x100)],'unitId':_0x187755,'threadId':_0x22b58e,'solved':_0x10c470[_0x596d7f(0x145)]?I['Solved']:I[_0x596d7f(0x118)]},_0x261f4d=await this[_0x596d7f(0x14f)][_0x596d7f(0x14d)](_0x596d7f(0x125)+_0x187755+_0x596d7f(0x123),{'body':_0x401aff});return!_0x261f4d['body'][_0x596d7f(0x152)]||_0x261f4d[_0x596d7f(0x137)][_0x596d7f(0x152)][_0x596d7f(0x11e)]===0x1;}async[_0x5bafd5(0x111)](_0x4f45b2,_0x2da280,_0x23ff6a,_0x8e2c81){const _0x2fe6c0=_0x5bafd5,_0x1ee7e7={'memberId':(await this[_0x2fe6c0(0x128)][_0x2fe6c0(0x136)](_0x4f45b2))[_0x2fe6c0(0x144)](),'threadId':_0x23ff6a,'replyId':_0x8e2c81,'unitId':_0x4f45b2},_0x35d305=await this[_0x2fe6c0(0x14f)]['post'](_0x2fe6c0(0x125)+_0x4f45b2+_0x2fe6c0(0x10c),{'body':_0x1ee7e7});return!_0x35d305['body'][_0x2fe6c0(0x152)]||_0x35d305['body'][_0x2fe6c0(0x152)]['code']===0x1;}async[_0x5bafd5(0xef)](_0x8cb7a5,_0x3d78f1,_0x4351ad){const _0x2b3524=_0x5bafd5,_0x47c080={'unitId':_0x8cb7a5,'threadId':_0x4351ad},_0xf6b384=await this[_0x2b3524(0x14f)][_0x2b3524(0x14d)](_0x2b3524(0x125)+_0x8cb7a5+_0x2b3524(0x107),{'body':_0x47c080}),_0x50c998=_0x4351ad['map'](_0x34e537=>ee(_0xf6b384['body'][_0x2b3524(0x13c)][_0x34e537],_0x8cb7a5,_0x3d78f1))[_0x2b3524(0x115)](Boolean);return Object[_0x2b3524(0x116)](_0xf6b384[_0x2b3524(0x137)][_0x2b3524(0x102)])['forEach'](_0x13eef1=>{const _0x3ce950=_0x2b3524;this[_0x3ce950(0xff)][_0x3ce950(0x10a)](_0x13eef1);}),_0x50c998;}[_0x5bafd5(0x149)](_0x5b9431){const _0x14eb95=_0x5bafd5;return{'id':_0x5b9431['id'],'threadId':_0x5b9431['threadId'],'ref':_0x5b9431[_0x14eb95(0x112)]};}};f=Q([_(0x0,_0x21debe(_0x249829)),_(0x1,_0x21debe(_0x2cd254)),_(0x2,_0x21debe(_0x4e7413)),_(0x3,_0x21debe(_0x526b05))],f);var re=Object[_0x5bafd5(0x120)],te=(_0x525bcb,_0x575974,_0x24d422,_0x3b8329)=>{for(var _0x561f7c=_0x3b8329>0x1?void 0x0:_0x3b8329?re(_0x575974,_0x24d422):_0x575974,_0x287bb0=_0x525bcb['length']-0x1,_0xdee57f;_0x287bb0>=0x0;_0x287bb0--)(_0xdee57f=_0x525bcb[_0x287bb0])&&(_0x561f7c=_0xdee57f(_0x561f7c)||_0x561f7c);return _0x561f7c;},N=(_0x1eba61,_0x1e75de)=>(_0x58b48c,_0x38392f)=>_0x1e75de(_0x58b48c,_0x38392f,_0x1eba61);let g=class extends _0x37480f{constructor(_0x3907da,_0x3ef105){const _0xa1de28=_0x5bafd5;super(),this[_0xa1de28(0x138)]=_0x3907da,this[_0xa1de28(0x126)]=_0x3ef105,this['_initDataSource']();}[_0x5bafd5(0x150)](){const _0x300076=_0x5bafd5;this[_0x300076(0x138)][_0x300076(0x139)]=this[_0x300076(0x126)],this[_0x300076(0x138)][_0x300076(0x121)]=!0x1;}};g=te([N(0x0,_0xde2d25),N(0x1,_0x21debe(f))],g);var se=Object[_0x5bafd5(0x12b)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xc73525,_0x126cb4,_0x525844)=>_0x126cb4 in _0xc73525?se(_0xc73525,_0x126cb4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x525844}):_0xc73525[_0x126cb4]=_0x525844,ie=(_0x4b7e84,_0x422282,_0x27e279,_0x5599e1)=>{for(var _0x3b9a46=_0x5599e1>0x1?void 0x0:_0x5599e1?oe(_0x422282,_0x27e279):_0x422282,_0x418cde=_0x4b7e84['length']-0x1,_0x144952;_0x418cde>=0x0;_0x418cde--)(_0x144952=_0x4b7e84[_0x418cde])&&(_0x3b9a46=_0x144952(_0x3b9a46)||_0x3b9a46);return _0x3b9a46;},w=(_0xf7a922,_0xbc4f99)=>(_0x26b25c,_0x5250e8)=>_0xbc4f99(_0x26b25c,_0x5250e8,_0xf7a922),$=(_0x239764,_0x4d13a0,_0x3880f4)=>ne(_0x239764,typeof _0x4d13a0!=_0x5bafd5(0x130)?_0x4d13a0+'':_0x4d13a0,_0x3880f4);let b=class extends _0x202252{constructor(_0x51a5f1=M,_0x593f62,_0x22795a){const _0x201703=_0x5bafd5;super(),this['_config']=_0x51a5f1,this[_0x201703(0x14e)]=_0x593f62,this[_0x201703(0x134)]=_0x22795a;const {..._0x482d4b}=_0x554707({},M,this[_0x201703(0x13e)]);this[_0x201703(0x134)][_0x201703(0xee)](z,_0x482d4b);}[_0x5bafd5(0x127)](){const _0x582af3=_0x5bafd5;[[f],[g],[S]][_0x582af3(0x133)](_0x2cf3d5=>{const _0x28c880=_0x582af3;this['_injector'][_0x28c880(0x131)](_0x2cf3d5);});}[_0x5bafd5(0x103)](){const _0x265c62=_0x5bafd5;this[_0x265c62(0x14e)]['get'](g),this['_injector']['get'](S);}};$(b,_0x5bafd5(0x101),W),$(b,'type',_0x4f6375[_0x5bafd5(0x129)]),b=ie([_0x44e46d(_0x385c23,_0x10eb17,_0x1c16ff),w(0x1,_0x21debe(_0x526b05)),w(0x2,_0x3481ba)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2b5fac=_0x5bf1;function _0x269e(){const _0x93f086=['customRanges','getUnit','solved','13911007bplEgo','rangeId','_threadCommentModel','Delete','4NhYCEb','_userService','disposeWithMe','userID','addComment','398001cXrOUp','values','syncUpdateMutationToColla','12oFdjsp','add','user','saveCommentToSnapshot','code','defineProperty','post','10nLouNw','addUser','/reply','thread-comment-data-source.config','OpenOrReOpen','_configService','comment','get','users','map','_threadCommentDataSource','threadId','610461OlAiyV','_init','getMemberID','format','Solve','stringify','_httpService','updateComment','pluginName','Unknown','1231672pCVwbr','/edit','setConfig','requireSession','slice','5QOyYPv','getComment','subscribe','579792OoBaVQ','forEach','content','/list','_sessionService','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parse','type','delete','resolved','replies','_initDataSource','getCurrentUser','filter','parentId','deleteComment','Solved','userId','personId','replyId','_config','root','UNRECOGNIZED','/universer-api/user/list','onReady','getOwnPropertyDescriptor','/solved','resolveComment','reply','_threadCommentDataSourceService','216XsHLwf','_injector','Reply','Edit','UNIVER_UNKNOWN','createTimestamp','_commentService','Add','172228EYgxpi','1094526tosQWB','_initUserSync','/delete','comments','YYYY/MM/DD\x20HH:mm','find','commentUpdate$','/universer-api/comment/unit/','unitId','length','body'];_0x269e=function(){return _0x93f086;};return _0x269e();}(function(_0x57c658,_0x57cd5b){const _0x38ab5c=_0x5bf1,_0x2adb85=_0x57c658();while(!![]){try{const _0x516d7d=parseInt(_0x38ab5c(0x126))/0x1+parseInt(_0x38ab5c(0x11e))/0x2+-parseInt(_0x38ab5c(0xfe))/0x3*(parseInt(_0x38ab5c(0x160))/0x4)+-parseInt(_0x38ab5c(0x123))/0x5*(parseInt(_0x38ab5c(0x14e))/0x6)+-parseInt(_0x38ab5c(0x14d))/0x7*(-parseInt(_0x38ab5c(0x145))/0x8)+parseInt(_0x38ab5c(0x114))/0x9*(parseInt(_0x38ab5c(0x108))/0xa)+parseInt(_0x38ab5c(0x15c))/0xb*(-parseInt(_0x38ab5c(0x101))/0xc);if(_0x516d7d===_0x57cd5b)break;else _0x2adb85['push'](_0x2adb85['shift']());}catch(_0x4b976c){_0x2adb85['push'](_0x2adb85['shift']());}}}(_0x269e,0x54f88));import{CommentService as _0x1643d3,CollaborationSessionService as _0x4592f,UniverCollaborationClientPlugin as _0x12c884}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x13415b}from'@univerjs-pro/license';import{dayjs as _0x5dd75f,UserManagerService as _0x475b3b,Inject as _0xccccd8,Injector as _0x1b0878,Disposable as _0x527aee,CustomRangeType as _0x1ee0ce,UniverInstanceType as _0x538ad9,DependentOn as _0x1756f4,IConfigService as _0x47c9d3,Plugin as _0x107f9d,merge as _0x2dacfc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1b6c56}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x6cf1a6,IThreadCommentDataSourceService as _0x41d95c}from'@univerjs/thread-comment';import{bufferTime as _0x12c025}from'rxjs';import{HTTPService as _0x23c06a}from'@univerjs/network';const W=_0x2b5fac(0x12c);var I=(_0x29b1bd=>(_0x29b1bd[_0x29b1bd['OpenOrReOpen']=0x0]=_0x2b5fac(0x10c),_0x29b1bd[_0x29b1bd[_0x2b5fac(0x137)]=0x1]=_0x2b5fac(0x137),_0x29b1bd[_0x29b1bd[_0x2b5fac(0x13d)]=-0x1]=_0x2b5fac(0x13d),_0x29b1bd))(I||{}),v=(_0x4928fe=>(_0x4928fe[_0x4928fe[_0x2b5fac(0x11d)]=0x0]='Unknown',_0x4928fe[_0x4928fe[_0x2b5fac(0x14c)]=0x1]=_0x2b5fac(0x14c),_0x4928fe[_0x4928fe[_0x2b5fac(0x147)]=0x2]=_0x2b5fac(0x147),_0x4928fe[_0x4928fe[_0x2b5fac(0x148)]=0x3]=_0x2b5fac(0x148),_0x4928fe[_0x4928fe[_0x2b5fac(0x15f)]=0x4]=_0x2b5fac(0x15f),_0x4928fe[_0x4928fe[_0x2b5fac(0x118)]=0x5]=_0x2b5fac(0x118),_0x4928fe[_0x4928fe['UNRECOGNIZED']=-0x1]=_0x2b5fac(0x13d),_0x4928fe))(v||{});const D=_0x5425ad=>_0x5dd75f(new Date(+_0x5425ad))[_0x2b5fac(0x117)](_0x2b5fac(0x152)),B=async(_0x5bd1bc,_0x22f234)=>{const _0x5f0595=_0x2b5fac,_0xfa8faa=_0x5bd1bc['get'](_0x475b3b),_0xc6e68d=_0x5bd1bc[_0x5f0595(0x10f)](_0x23c06a);_0x22f234['forEach'](_0x2e1d15=>{const _0x5ad52f=_0x5f0595;_0xfa8faa['getUser'](_0x2e1d15)&&_0x22f234[_0x5ad52f(0x12f)](_0x2e1d15);}),_0x22f234['size']&&(await _0xc6e68d[_0x5f0595(0x10f)](_0x5f0595(0x13e),{'params':{'userIDs':[..._0x22f234]}}))[_0x5f0595(0x158)][_0x5f0595(0x110)][_0x5f0595(0x127)](_0x36b20d=>{const _0x4dc00e=_0x5f0595;_0x36b20d&&_0xfa8faa[_0x4dc00e(0x109)](_0x36b20d);});};var K=Object[_0x2b5fac(0x140)],V=(_0x5e98ca,_0x5b0da5,_0x3d8529,_0x136388)=>{for(var _0x97c3e3=_0x136388>0x1?void 0x0:_0x136388?K(_0x5b0da5,_0x3d8529):_0x5b0da5,_0x14e9d0=_0x5e98ca['length']-0x1,_0x122917;_0x14e9d0>=0x0;_0x14e9d0--)(_0x122917=_0x5e98ca[_0x14e9d0])&&(_0x97c3e3=_0x122917(_0x97c3e3)||_0x97c3e3);return _0x97c3e3;},p=(_0x64a685,_0x10b575)=>(_0x2e257b,_0x54abce)=>_0x10b575(_0x2e257b,_0x54abce,_0x64a685);let S=class extends _0x527aee{constructor(_0x4a844c,_0x1fee33,_0x1f9472,_0x4bfd8e){const _0x37dcf8=_0x2b5fac;super(),this[_0x37dcf8(0x14b)]=_0x4a844c,this[_0x37dcf8(0x15e)]=_0x1fee33,this[_0x37dcf8(0x161)]=_0x1f9472,this[_0x37dcf8(0x146)]=_0x4bfd8e,this['_init'](),this[_0x37dcf8(0x14f)]();}['_initUserSync'](){const _0x127aef=_0x2b5fac;this[_0x127aef(0x162)](this['_threadCommentModel'][_0x127aef(0x154)]['pipe'](_0x12c025(0x10))[_0x127aef(0x125)](_0x275136=>{const _0x3b2511=_0x127aef,_0x580630=new Set();_0x275136[_0x3b2511(0x127)](_0x37ca96=>{const _0x44b486=_0x3b2511;switch(_0x37ca96[_0x44b486(0x12e)]){case _0x44b486(0x102):{const _0x4e1234=_0x37ca96['payload'][_0x44b486(0x139)];_0x580630[_0x44b486(0x102)](_0x4e1234);break;}}}),B(this[_0x3b2511(0x146)],_0x580630);}));}[_0x2b5fac(0x115)](){const _0xebf3f6=_0x2b5fac;this['disposeWithMe'](this['_commentService'][_0xebf3f6(0x154)][_0xebf3f6(0x125)](async _0x291447=>{const _0x2adbe2=_0xebf3f6;var _0x39c001,_0x41c1f4,_0x2fcac5,_0xe5d448;const _0x4e66ac=(_0x39c001=this['_threadCommentModel'][_0x2adbe2(0x15a)](_0x291447[_0x2adbe2(0x156)])['find'](_0xd6c8c7=>_0xd6c8c7[_0x2adbe2(0x113)]===_0x291447['threadId']))==null?void 0x0:_0x39c001['root'];if(!_0x4e66ac)return;const {unitId:_0x574c50,subUnitId:_0x359dae}=_0x4e66ac;switch(_0x291447['user']&&this[_0x2adbe2(0x161)]['addUser'](_0x291447[_0x2adbe2(0x103)]),_0x291447['type']){case v['Add']:break;case v[_0x2adbe2(0x147)]:{this[_0x2adbe2(0x15e)][_0x2adbe2(0xfd)](_0x574c50,_0x359dae,{'unitId':_0x574c50,'subUnitId':_0x359dae,'ref':'','id':_0x291447[_0x2adbe2(0x13a)],'dT':D(+_0x291447[_0x2adbe2(0x14a)]),'threadId':_0x291447[_0x2adbe2(0x113)],'personId':(_0x2fcac5=(_0x41c1f4=_0x291447[_0x2adbe2(0x103)])==null?void 0x0:_0x41c1f4[_0x2adbe2(0xfc)])!=null?_0x2fcac5:_0x291447[_0x2adbe2(0x138)],'text':JSON[_0x2adbe2(0x12d)](_0x291447[_0x2adbe2(0x128)]),'parentId':_0x4e66ac['id']});break;}case v[_0x2adbe2(0x15f)]:{const _0xdb398c=this[_0x2adbe2(0x15e)][_0x2adbe2(0x124)](_0x574c50,_0x359dae,_0x291447[_0x2adbe2(0x13a)]);_0xdb398c&&_0xdb398c[_0x2adbe2(0x135)]&&this[_0x2adbe2(0x15e)]['deleteComment'](_0x574c50,_0x359dae,_0x291447[_0x2adbe2(0x13a)]);break;}case v[_0x2adbe2(0x148)]:{this['_threadCommentModel'][_0x2adbe2(0x11b)](_0x574c50,_0x359dae,{'commentId':_0x291447['replyId'],'text':JSON[_0x2adbe2(0x12d)](_0x291447[_0x2adbe2(0x128)])});break;}case v[_0x2adbe2(0x118)]:{const _0x3951f8=(_0xe5d448=this[_0x2adbe2(0x15e)][_0x2adbe2(0x15a)](_0x291447[_0x2adbe2(0x156)])[_0x2adbe2(0x153)](_0x270489=>_0x270489['threadId']===_0x291447[_0x2adbe2(0x113)]))==null?void 0x0:_0xe5d448[_0x2adbe2(0x13c)];_0x3951f8&&this[_0x2adbe2(0x15e)][_0x2adbe2(0x142)](_0x574c50,_0x359dae,_0x3951f8['id'],_0x291447['solved']===I[_0x2adbe2(0x137)]);break;}}}));}};S=V([p(0x0,_0xccccd8(_0x1643d3)),p(0x1,_0xccccd8(_0x6cf1a6)),p(0x2,_0xccccd8(_0x475b3b)),p(0x3,_0xccccd8(_0x1b0878))],S);function _0x5bf1(_0x44de78,_0x37bb8e){const _0x269eaf=_0x269e();return _0x5bf1=function(_0x5bf1a0,_0x2cebc3){_0x5bf1a0=_0x5bf1a0-0xfc;let _0x204b92=_0x269eaf[_0x5bf1a0];return _0x204b92;},_0x5bf1(_0x44de78,_0x37bb8e);}const z=_0x2b5fac(0x10b),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x132c17,_0xca42e9,_0x16ce39,_0x3ba40d)=>{const _0x3f1611=_0x2b5fac;for(var _0x3ddbf8=_0x3ba40d>0x1?void 0x0:_0x3ba40d?k(_0xca42e9,_0x16ce39):_0xca42e9,_0x218c93=_0x132c17[_0x3f1611(0x157)]-0x1,_0x43283a;_0x218c93>=0x0;_0x218c93--)(_0x43283a=_0x132c17[_0x218c93])&&(_0x3ddbf8=_0x43283a(_0x3ddbf8)||_0x3ddbf8);return _0x3ddbf8;},_=(_0x48f0aa,_0xb790b5)=>(_0x304586,_0x1c20ca)=>_0xb790b5(_0x304586,_0x1c20ca,_0x48f0aa);function X(_0x48eef3,_0x35a490){const _0x3c2e26=_0x2b5fac,_0x27483b=_0x48eef3[_0x3c2e26(0x131)][0x0];return{..._0x35a490,'id':_0x27483b[_0x3c2e26(0x13a)],'resolved':_0x48eef3[_0x3c2e26(0x15b)]===0x1,'dT':D(_0x27483b[_0x3c2e26(0x14a)]),'personId':_0x27483b[_0x3c2e26(0x138)],'threadId':_0x27483b[_0x3c2e26(0x113)]};}function ee(_0x27c21a,_0x4ccf6c,_0x62e727){const _0x3f3efc=_0x2b5fac;var _0x166a76,_0x2d688c;if(((_0x2d688c=(_0x166a76=_0x27c21a==null?void 0x0:_0x27c21a[_0x3f3efc(0x131)])==null?void 0x0:_0x166a76[_0x3f3efc(0x157)])!=null?_0x2d688c:0x0)>0x0){const _0x30bd7f=(_0x42fbd8,_0x20717c)=>({'id':_0x42fbd8[_0x3f3efc(0x13a)],'threadId':_0x42fbd8[_0x3f3efc(0x113)],'dT':D(_0x42fbd8[_0x3f3efc(0x14a)]),'personId':_0x42fbd8[_0x3f3efc(0x138)],'resolved':_0x27c21a[_0x3f3efc(0x15b)]===I[_0x3f3efc(0x137)],'unitId':_0x4ccf6c,'subUnitId':_0x62e727,'text':JSON[_0x3f3efc(0x12d)](_0x42fbd8[_0x3f3efc(0x128)]),'parentId':_0x20717c}),_0x5de295=_0x30bd7f(_0x27c21a[_0x3f3efc(0x131)][0x0]);return{..._0x5de295,'children':_0x27c21a['replies'][_0x3f3efc(0x122)](0x1)[_0x3f3efc(0x111)](_0xe248bc=>_0x30bd7f(_0xe248bc,_0x5de295['id']))};}return null;}let f=class{constructor(_0x2abf80,_0x1da02e,_0x4c3d9b,_0x2e7f25){const _0x615afb=_0x2b5fac;this[_0x615afb(0x11a)]=_0x2abf80,this[_0x615afb(0x161)]=_0x1da02e,this['_sessionService']=_0x4c3d9b,this[_0x615afb(0x146)]=_0x2e7f25;}async['addComment'](_0x13165b){const _0x463547=_0x2b5fac;var _0x2de4b6,_0x589973;const {parentId:_0x35f11e,unitId:_0x54557a,text:_0x30c8fd,threadId:_0x20b42c}=_0x13165b,_0x19e199=(_0x589973=(_0x2de4b6=_0x30c8fd[_0x463547(0x159)])==null?void 0x0:_0x2de4b6['filter'](_0x560bff=>_0x560bff['rangeType']===_0x1ee0ce['COMMENT'])[_0x463547(0x111)](_0x48c29=>_0x48c29[_0x463547(0x15d)]))!=null?_0x589973:[],_0x19a126=JSON['stringify'](_0x30c8fd),_0x23eefb=(await this['_sessionService'][_0x463547(0x121)](_0x54557a))['getMemberID']();if(_0x35f11e){const _0x428aa0={'memberId':_0x23eefb,'unitId':_0x54557a,'content':_0x19a126,'mention':_0x19e199,'threadId':_0x20b42c},_0x1da836=(await this[_0x463547(0x11a)][_0x463547(0x107)](_0x463547(0x155)+_0x54557a+_0x463547(0x10a),{'body':_0x428aa0}))[_0x463547(0x158)][_0x463547(0x143)];return{..._0x13165b,'id':_0x1da836[_0x463547(0x13a)],'dT':_0x5dd75f(+_0x1da836[_0x463547(0x14a)])[_0x463547(0x117)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1da836[_0x463547(0x138)]};}else{const _0x5af8e8={'memberId':_0x23eefb,'unitId':_0x54557a,'content':_0x19a126,'mention':_0x19e199},_0x584287=await this[_0x463547(0x11a)][_0x463547(0x107)](_0x463547(0x155)+_0x54557a+'/add',{'body':_0x5af8e8});return X(_0x584287[_0x463547(0x158)][_0x463547(0x10e)],_0x13165b);}}async[_0x2b5fac(0x11b)](_0x5a97b7){const _0x55c84e=_0x2b5fac;var _0x982412,_0x36eac2;const {text:_0x90545b,unitId:_0x568535}=_0x5a97b7,_0x18b10a=(_0x36eac2=(_0x982412=_0x90545b[_0x55c84e(0x159)])==null?void 0x0:_0x982412[_0x55c84e(0x134)](_0xc80bc8=>_0xc80bc8['rangeType']===_0x1ee0ce['COMMENT'])[_0x55c84e(0x111)](_0x50aa73=>_0x50aa73['rangeId']))!=null?_0x36eac2:[],_0x50166b=JSON[_0x55c84e(0x119)](_0x90545b),_0x2323d4=_0x5a97b7[_0x55c84e(0x113)],_0x2b2bdd=_0x5a97b7['id'],_0x41178e={'memberId':(await this[_0x55c84e(0x12a)][_0x55c84e(0x121)](_0x568535))['getMemberID'](),'unitId':_0x568535,'threadId':_0x2323d4,'mention':_0x18b10a,'content':_0x50166b,'replyId':_0x2b2bdd},_0xad1fea=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x568535+_0x55c84e(0x11f),{'body':_0x41178e});return!_0xad1fea[_0x55c84e(0x158)]['error']||_0xad1fea[_0x55c84e(0x158)][_0x55c84e(0x12b)]['code']===0x1;}async[_0x2b5fac(0x142)](_0x50be37){const _0x46edd9=_0x2b5fac,{unitId:_0x104c0d}=_0x50be37,_0x31eb37=_0x50be37[_0x46edd9(0x113)],_0x171288={'memberId':this[_0x46edd9(0x161)][_0x46edd9(0x133)]()[_0x46edd9(0xfc)],'unitId':_0x104c0d,'threadId':_0x31eb37,'solved':_0x50be37[_0x46edd9(0x130)]?I['Solved']:I[_0x46edd9(0x10c)]},_0x11c0b3=await this[_0x46edd9(0x11a)][_0x46edd9(0x107)](_0x46edd9(0x155)+_0x104c0d+_0x46edd9(0x141),{'body':_0x171288});return!_0x11c0b3[_0x46edd9(0x158)][_0x46edd9(0x12b)]||_0x11c0b3[_0x46edd9(0x158)][_0x46edd9(0x12b)][_0x46edd9(0x105)]===0x1;}async[_0x2b5fac(0x136)](_0x121ee7,_0x40bd14,_0x5c73b7,_0x24970a){const _0x3f888b=_0x2b5fac,_0x4df111={'memberId':(await this[_0x3f888b(0x12a)][_0x3f888b(0x121)](_0x121ee7))[_0x3f888b(0x116)](),'threadId':_0x5c73b7,'replyId':_0x24970a,'unitId':_0x121ee7},_0x145911=await this['_httpService'][_0x3f888b(0x107)](_0x3f888b(0x155)+_0x121ee7+_0x3f888b(0x150),{'body':_0x4df111});return!_0x145911[_0x3f888b(0x158)][_0x3f888b(0x12b)]||_0x145911[_0x3f888b(0x158)][_0x3f888b(0x12b)][_0x3f888b(0x105)]===0x1;}async['listComments'](_0xd1cb93,_0x52dbe0,_0x23becd){const _0x33f765=_0x2b5fac,_0x50ce29={'unitId':_0xd1cb93,'threadId':_0x23becd},_0x29872d=await this[_0x33f765(0x11a)][_0x33f765(0x107)](_0x33f765(0x155)+_0xd1cb93+_0x33f765(0x129),{'body':_0x50ce29}),_0x327995=_0x23becd['map'](_0x3714ec=>ee(_0x29872d['body'][_0x33f765(0x151)][_0x3714ec],_0xd1cb93,_0x52dbe0))[_0x33f765(0x134)](Boolean);return Object[_0x33f765(0xff)](_0x29872d['body'][_0x33f765(0x110)])[_0x33f765(0x127)](_0x32ec6d=>{const _0x20ae81=_0x33f765;this[_0x20ae81(0x161)]['addUser'](_0x32ec6d);}),_0x327995;}[_0x2b5fac(0x104)](_0x5dd41d){const _0x243945=_0x2b5fac;return{'id':_0x5dd41d['id'],'threadId':_0x5dd41d[_0x243945(0x113)],'ref':_0x5dd41d['ref']};}};f=Q([_(0x0,_0xccccd8(_0x23c06a)),_(0x1,_0xccccd8(_0x475b3b)),_(0x2,_0xccccd8(_0x4592f)),_(0x3,_0xccccd8(_0x1b0878))],f);var re=Object[_0x2b5fac(0x140)],te=(_0x10e7d1,_0x142d30,_0x5ba3f9,_0x363f58)=>{const _0x2c4dae=_0x2b5fac;for(var _0x3c1fd7=_0x363f58>0x1?void 0x0:_0x363f58?re(_0x142d30,_0x5ba3f9):_0x142d30,_0x286c7d=_0x10e7d1[_0x2c4dae(0x157)]-0x1,_0xa01b62;_0x286c7d>=0x0;_0x286c7d--)(_0xa01b62=_0x10e7d1[_0x286c7d])&&(_0x3c1fd7=_0xa01b62(_0x3c1fd7)||_0x3c1fd7);return _0x3c1fd7;},N=(_0x23ee45,_0x52a34e)=>(_0x57f084,_0x4136af)=>_0x52a34e(_0x57f084,_0x4136af,_0x23ee45);let g=class extends _0x527aee{constructor(_0x502bf9,_0x2c82ba){const _0x496a1a=_0x2b5fac;super(),this['_threadCommentDataSourceService']=_0x502bf9,this[_0x496a1a(0x112)]=_0x2c82ba,this[_0x496a1a(0x132)]();}[_0x2b5fac(0x132)](){const _0x42314e=_0x2b5fac;this[_0x42314e(0x144)]['dataSource']=this[_0x42314e(0x112)],this[_0x42314e(0x144)][_0x42314e(0x100)]=!0x1;}};g=te([N(0x0,_0x41d95c),N(0x1,_0xccccd8(f))],g);var se=Object[_0x2b5fac(0x106)],oe=Object[_0x2b5fac(0x140)],ne=(_0xbcb39a,_0x35f1cd,_0xee785d)=>_0x35f1cd in _0xbcb39a?se(_0xbcb39a,_0x35f1cd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xee785d}):_0xbcb39a[_0x35f1cd]=_0xee785d,ie=(_0x450e88,_0x48f20b,_0x14f01f,_0x4b5a12)=>{const _0x3ee6db=_0x2b5fac;for(var _0x2fcadd=_0x4b5a12>0x1?void 0x0:_0x4b5a12?oe(_0x48f20b,_0x14f01f):_0x48f20b,_0x4bb6f4=_0x450e88[_0x3ee6db(0x157)]-0x1,_0x4cefe8;_0x4bb6f4>=0x0;_0x4bb6f4--)(_0x4cefe8=_0x450e88[_0x4bb6f4])&&(_0x2fcadd=_0x4cefe8(_0x2fcadd)||_0x2fcadd);return _0x2fcadd;},w=(_0x37468c,_0x1f5429)=>(_0x541a3d,_0x55fc0d)=>_0x1f5429(_0x541a3d,_0x55fc0d,_0x37468c),$=(_0x4ad1f1,_0x3d93f5,_0x8da227)=>ne(_0x4ad1f1,typeof _0x3d93f5!='symbol'?_0x3d93f5+'':_0x3d93f5,_0x8da227);let b=class extends _0x107f9d{constructor(_0x10935b=M,_0x41f671,_0x401885){const _0x5ee2bd=_0x2b5fac;super(),this[_0x5ee2bd(0x13b)]=_0x10935b,this[_0x5ee2bd(0x146)]=_0x41f671,this[_0x5ee2bd(0x10d)]=_0x401885;const {..._0x513e42}=_0x2dacfc({},M,this[_0x5ee2bd(0x13b)]);this['_configService'][_0x5ee2bd(0x120)](z,_0x513e42);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x31668b=>{const _0x10ea49=_0x5bf1;this[_0x10ea49(0x146)][_0x10ea49(0x102)](_0x31668b);});}[_0x2b5fac(0x13f)](){const _0x507d8c=_0x2b5fac;this[_0x507d8c(0x146)][_0x507d8c(0x10f)](g),this[_0x507d8c(0x146)][_0x507d8c(0x10f)](S);}};$(b,_0x2b5fac(0x11c),W),$(b,'type',_0x538ad9[_0x2b5fac(0x149)]),b=ie([_0x1756f4(_0x1b6c56,_0x12c884,_0x13415b),w(0x1,_0xccccd8(_0x1b0878)),w(0x2,_0x47c9d3)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- function _0x2500(_0xc161fb,_0x59b14d){const _0xbf0638=_0xbf06();return _0x2500=function(_0x25009d,_0x2d024b){_0x25009d=_0x25009d-0xee;let _0x79150f=_0xbf0638[_0x25009d];return _0x79150f;},_0x2500(_0xc161fb,_0x59b14d);}const _0x5bafd5=_0x2500;(function(_0x2dbc5b,_0x7c51bd){const _0x491544=_0x2500,_0x5ee555=_0x2dbc5b();while(!![]){try{const _0x19416b=-parseInt(_0x491544(0xf6))/0x1+parseInt(_0x491544(0xf3))/0x2*(parseInt(_0x491544(0x12e))/0x3)+parseInt(_0x491544(0x13d))/0x4+-parseInt(_0x491544(0x12c))/0x5+parseInt(_0x491544(0x114))/0x6*(parseInt(_0x491544(0x11a))/0x7)+parseInt(_0x491544(0x10b))/0x8+parseInt(_0x491544(0x117))/0x9;if(_0x19416b===_0x7c51bd)break;else _0x5ee555['push'](_0x5ee555['shift']());}catch(_0x13a064){_0x5ee555['push'](_0x5ee555['shift']());}}}(_0xbf06,0x86b87));import{CommentService as _0x1daba7,CollaborationSessionService as _0x4e7413,UniverCollaborationClientPlugin as _0x10eb17}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1c16ff}from'@univerjs-pro/license';import{dayjs as _0x51e9d5,UserManagerService as _0x2cd254,Inject as _0x21debe,Injector as _0x526b05,Disposable as _0x37480f,CustomRangeType as _0x919c75,UniverInstanceType as _0x4f6375,DependentOn as _0x44e46d,IConfigService as _0x3481ba,Plugin as _0x202252,merge as _0x554707}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x385c23}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4ecd78,IThreadCommentDataSourceService as _0xde2d25}from'@univerjs/thread-comment';function _0xbf06(){const _0x44433c=['_injector','_httpService','_initDataSource','/edit','error','updateComment','subscribe','threadId','getCurrentUser','setConfig','listComments','personId','unitId','find','620862vVRVVp','getComment','stringify','656826ujvgtq','Delete','addComment','payload','solved','comment','getUser','UNRECOGNIZED','resolveComment','_userService','userID','pluginName','users','onReady','length','map','parse','/list','_threadCommentModel','delete','addUser','5639784cFJFOC','/delete','parentId','Add','/universer-api/user/list','disposeWithMe','deleteComment','ref','YYYY/MM/DD\x20HH:mm','60mJYkeF','filter','values','4148703DIPPfu','OpenOrReOpen','customRanges','176673IumwBw','Unknown','userId','slice','code','rangeId','getOwnPropertyDescriptor','syncUpdateMutationToColla','COMMENT','/solved','user','/universer-api/comment/unit/','_threadCommentDataSource','onStarting','_sessionService','UNIVER_UNKNOWN','_commentService','defineProperty','4245505cxiEJa','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3gGjoaF','get','symbol','add','replyId','forEach','_configService','Solved','requireSession','body','_threadCommentDataSourceService','dataSource','Edit','rangeType','comments','1315924oZJWuv','_config','Solve','_initUserSync','type','thread-comment-data-source.config','content','getMemberID','resolved','createTimestamp','Reply','_init','saveCommentToSnapshot','getUnit','replies','reply','post'];_0xbf06=function(){return _0x44433c;};return _0xbf06();}import{bufferTime as _0x2d1e75}from'rxjs';import{HTTPService as _0x249829}from'@univerjs/network';const W=_0x5bafd5(0x12d);var I=(_0x5079b5=>(_0x5079b5[_0x5079b5['OpenOrReOpen']=0x0]=_0x5bafd5(0x118),_0x5079b5[_0x5079b5['Solved']=0x1]=_0x5bafd5(0x135),_0x5079b5[_0x5079b5['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x5079b5))(I||{}),v=(_0x5802ba=>(_0x5802ba[_0x5802ba['Unknown']=0x0]=_0x5bafd5(0x11b),_0x5802ba[_0x5802ba[_0x5bafd5(0x10e)]=0x1]='Add',_0x5802ba[_0x5802ba[_0x5bafd5(0x147)]=0x2]='Reply',_0x5802ba[_0x5802ba[_0x5bafd5(0x13a)]=0x3]=_0x5bafd5(0x13a),_0x5802ba[_0x5802ba[_0x5bafd5(0xf7)]=0x4]=_0x5bafd5(0xf7),_0x5802ba[_0x5802ba[_0x5bafd5(0x13f)]=0x5]='Solve',_0x5802ba[_0x5802ba[_0x5bafd5(0xfd)]=-0x1]=_0x5bafd5(0xfd),_0x5802ba))(v||{});const D=_0x1e636e=>_0x51e9d5(new Date(+_0x1e636e))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x554162,_0x80d833)=>{const _0x2273fa=_0x5bafd5,_0x1ea44f=_0x554162['get'](_0x2cd254),_0x3e5fb6=_0x554162[_0x2273fa(0x12f)](_0x249829);_0x80d833[_0x2273fa(0x133)](_0x492164=>{const _0xb0de10=_0x2273fa;_0x1ea44f[_0xb0de10(0xfc)](_0x492164)&&_0x80d833[_0xb0de10(0x109)](_0x492164);}),_0x80d833['size']&&(await _0x3e5fb6[_0x2273fa(0x12f)](_0x2273fa(0x10f),{'params':{'userIDs':[..._0x80d833]}}))[_0x2273fa(0x137)]['users']['forEach'](_0x1ef776=>{_0x1ef776&&_0x1ea44f['addUser'](_0x1ef776);});};var K=Object[_0x5bafd5(0x120)],V=(_0x5f4273,_0x13bd53,_0x1cc595,_0x3358a8)=>{const _0x4f9612=_0x5bafd5;for(var _0x4a65e3=_0x3358a8>0x1?void 0x0:_0x3358a8?K(_0x13bd53,_0x1cc595):_0x13bd53,_0x562985=_0x5f4273[_0x4f9612(0x104)]-0x1,_0x9156b5;_0x562985>=0x0;_0x562985--)(_0x9156b5=_0x5f4273[_0x562985])&&(_0x4a65e3=_0x9156b5(_0x4a65e3)||_0x4a65e3);return _0x4a65e3;},p=(_0x3d4582,_0x2e2049)=>(_0x8c15e4,_0x4b9692)=>_0x2e2049(_0x8c15e4,_0x4b9692,_0x3d4582);let S=class extends _0x37480f{constructor(_0x319d3d,_0x48c5bf,_0x176b1d,_0x328729){const _0x2dfd8b=_0x5bafd5;super(),this['_commentService']=_0x319d3d,this[_0x2dfd8b(0x108)]=_0x48c5bf,this[_0x2dfd8b(0xff)]=_0x176b1d,this[_0x2dfd8b(0x14e)]=_0x328729,this[_0x2dfd8b(0x148)](),this[_0x2dfd8b(0x140)]();}['_initUserSync'](){const _0x1cfacc=_0x5bafd5;this[_0x1cfacc(0x110)](this[_0x1cfacc(0x108)]['commentUpdate$']['pipe'](_0x2d1e75(0x10))['subscribe'](_0x4e7f0d=>{const _0x14d9bb=_0x1cfacc,_0x3ed9a8=new Set();_0x4e7f0d[_0x14d9bb(0x133)](_0x1cbd6d=>{const _0x2b116e=_0x14d9bb;switch(_0x1cbd6d[_0x2b116e(0x141)]){case _0x2b116e(0x131):{const _0x3548c7=_0x1cbd6d[_0x2b116e(0xf9)][_0x2b116e(0xf0)];_0x3ed9a8[_0x2b116e(0x131)](_0x3548c7);break;}}}),B(this[_0x14d9bb(0x14e)],_0x3ed9a8);}));}[_0x5bafd5(0x148)](){const _0xcbb601=_0x5bafd5;this[_0xcbb601(0x110)](this[_0xcbb601(0x12a)]['commentUpdate$'][_0xcbb601(0x154)](async _0x41f439=>{const _0x37f58a=_0xcbb601;var _0x586796,_0x4e22ff,_0x499dc5,_0x1e4e43;const _0x14c388=(_0x586796=this[_0x37f58a(0x108)][_0x37f58a(0x14a)](_0x41f439[_0x37f58a(0xf1)])[_0x37f58a(0xf2)](_0x563f68=>_0x563f68['threadId']===_0x41f439['threadId']))==null?void 0x0:_0x586796['root'];if(!_0x14c388)return;const {unitId:_0x34282c,subUnitId:_0x2e6a57}=_0x14c388;switch(_0x41f439['user']&&this[_0x37f58a(0xff)][_0x37f58a(0x10a)](_0x41f439[_0x37f58a(0x124)]),_0x41f439[_0x37f58a(0x141)]){case v['Add']:break;case v['Reply']:{this[_0x37f58a(0x108)][_0x37f58a(0xf8)](_0x34282c,_0x2e6a57,{'unitId':_0x34282c,'subUnitId':_0x2e6a57,'ref':'','id':_0x41f439['replyId'],'dT':D(+_0x41f439[_0x37f58a(0x146)]),'threadId':_0x41f439[_0x37f58a(0x155)],'personId':(_0x499dc5=(_0x4e22ff=_0x41f439[_0x37f58a(0x124)])==null?void 0x0:_0x4e22ff[_0x37f58a(0x100)])!=null?_0x499dc5:_0x41f439['userId'],'text':JSON[_0x37f58a(0x106)](_0x41f439[_0x37f58a(0x143)]),'parentId':_0x14c388['id']});break;}case v[_0x37f58a(0xf7)]:{const _0x46e702=this[_0x37f58a(0x108)][_0x37f58a(0xf4)](_0x34282c,_0x2e6a57,_0x41f439['replyId']);_0x46e702&&_0x46e702[_0x37f58a(0x10d)]&&this[_0x37f58a(0x108)]['deleteComment'](_0x34282c,_0x2e6a57,_0x41f439[_0x37f58a(0x132)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x37f58a(0x153)](_0x34282c,_0x2e6a57,{'commentId':_0x41f439[_0x37f58a(0x132)],'text':JSON['parse'](_0x41f439[_0x37f58a(0x143)])});break;}case v[_0x37f58a(0x13f)]:{const _0x5c243c=(_0x1e4e43=this[_0x37f58a(0x108)][_0x37f58a(0x14a)](_0x41f439[_0x37f58a(0xf1)])[_0x37f58a(0xf2)](_0x2f2e8e=>_0x2f2e8e[_0x37f58a(0x155)]===_0x41f439['threadId']))==null?void 0x0:_0x1e4e43['root'];_0x5c243c&&this[_0x37f58a(0x108)][_0x37f58a(0xfe)](_0x34282c,_0x2e6a57,_0x5c243c['id'],_0x41f439[_0x37f58a(0xfa)]===I[_0x37f58a(0x135)]);break;}}}));}};S=V([p(0x0,_0x21debe(_0x1daba7)),p(0x1,_0x21debe(_0x4ecd78)),p(0x2,_0x21debe(_0x2cd254)),p(0x3,_0x21debe(_0x526b05))],S);const z=_0x5bafd5(0x142),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0xc036d1,_0xeab7e7,_0x401602,_0x3a0113)=>{const _0x31fb97=_0x5bafd5;for(var _0x13d716=_0x3a0113>0x1?void 0x0:_0x3a0113?k(_0xeab7e7,_0x401602):_0xeab7e7,_0x444bc5=_0xc036d1[_0x31fb97(0x104)]-0x1,_0x93ddf2;_0x444bc5>=0x0;_0x444bc5--)(_0x93ddf2=_0xc036d1[_0x444bc5])&&(_0x13d716=_0x93ddf2(_0x13d716)||_0x13d716);return _0x13d716;},_=(_0x4e936e,_0x2feb1c)=>(_0x28ebaf,_0x219193)=>_0x2feb1c(_0x28ebaf,_0x219193,_0x4e936e);function X(_0x126613,_0x41108c){const _0xfceb08=_0x5bafd5,_0x403fe1=_0x126613['replies'][0x0];return{..._0x41108c,'id':_0x403fe1[_0xfceb08(0x132)],'resolved':_0x126613[_0xfceb08(0xfa)]===0x1,'dT':D(_0x403fe1[_0xfceb08(0x146)]),'personId':_0x403fe1['userId'],'threadId':_0x403fe1[_0xfceb08(0x155)]};}function ee(_0x370ca6,_0x1ae1fa,_0x301d45){const _0x3a4d16=_0x5bafd5;var _0x481cd9,_0xaf5960;if(((_0xaf5960=(_0x481cd9=_0x370ca6==null?void 0x0:_0x370ca6[_0x3a4d16(0x14b)])==null?void 0x0:_0x481cd9['length'])!=null?_0xaf5960:0x0)>0x0){const _0x4c56da=(_0x12a151,_0x27fa95)=>({'id':_0x12a151[_0x3a4d16(0x132)],'threadId':_0x12a151[_0x3a4d16(0x155)],'dT':D(_0x12a151[_0x3a4d16(0x146)]),'personId':_0x12a151[_0x3a4d16(0x11c)],'resolved':_0x370ca6[_0x3a4d16(0xfa)]===I[_0x3a4d16(0x135)],'unitId':_0x1ae1fa,'subUnitId':_0x301d45,'text':JSON[_0x3a4d16(0x106)](_0x12a151[_0x3a4d16(0x143)]),'parentId':_0x27fa95}),_0xa4fc22=_0x4c56da(_0x370ca6[_0x3a4d16(0x14b)][0x0]);return{..._0xa4fc22,'children':_0x370ca6[_0x3a4d16(0x14b)][_0x3a4d16(0x11d)](0x1)[_0x3a4d16(0x105)](_0x547b66=>_0x4c56da(_0x547b66,_0xa4fc22['id']))};}return null;}let f=class{constructor(_0x4cc459,_0x5217a3,_0x3de910,_0x1d2550){const _0x453a57=_0x5bafd5;this[_0x453a57(0x14f)]=_0x4cc459,this[_0x453a57(0xff)]=_0x5217a3,this[_0x453a57(0x128)]=_0x3de910,this[_0x453a57(0x14e)]=_0x1d2550;}async[_0x5bafd5(0xf8)](_0x5c4001){const _0x18e9ed=_0x5bafd5;var _0x2c62a9,_0x501922;const {parentId:_0x24aaef,unitId:_0x3c9ace,text:_0x29e33e,threadId:_0x594793}=_0x5c4001,_0x1e486d=(_0x501922=(_0x2c62a9=_0x29e33e['customRanges'])==null?void 0x0:_0x2c62a9['filter'](_0x1461d1=>_0x1461d1[_0x18e9ed(0x13b)]===_0x919c75['COMMENT'])[_0x18e9ed(0x105)](_0x4774eb=>_0x4774eb[_0x18e9ed(0x11f)]))!=null?_0x501922:[],_0x5037b5=JSON[_0x18e9ed(0xf5)](_0x29e33e),_0x4a66e5=(await this[_0x18e9ed(0x128)][_0x18e9ed(0x136)](_0x3c9ace))['getMemberID']();if(_0x24aaef){const _0x5b601e={'memberId':_0x4a66e5,'unitId':_0x3c9ace,'content':_0x5037b5,'mention':_0x1e486d,'threadId':_0x594793},_0x597a9b=(await this[_0x18e9ed(0x14f)][_0x18e9ed(0x14d)]('/universer-api/comment/unit/'+_0x3c9ace+'/reply',{'body':_0x5b601e}))[_0x18e9ed(0x137)][_0x18e9ed(0x14c)];return{..._0x5c4001,'id':_0x597a9b['replyId'],'dT':_0x51e9d5(+_0x597a9b[_0x18e9ed(0x146)])['format'](_0x18e9ed(0x113)),'personId':_0x597a9b[_0x18e9ed(0x11c)]};}else{const _0x599591={'memberId':_0x4a66e5,'unitId':_0x3c9ace,'content':_0x5037b5,'mention':_0x1e486d},_0x1850bc=await this[_0x18e9ed(0x14f)][_0x18e9ed(0x14d)]('/universer-api/comment/unit/'+_0x3c9ace+'/add',{'body':_0x599591});return X(_0x1850bc[_0x18e9ed(0x137)][_0x18e9ed(0xfb)],_0x5c4001);}}async[_0x5bafd5(0x153)](_0x2e36f1){const _0x38f122=_0x5bafd5;var _0x52bb44,_0x5f2e0e;const {text:_0x2b095b,unitId:_0x1d8485}=_0x2e36f1,_0x3cc18d=(_0x5f2e0e=(_0x52bb44=_0x2b095b[_0x38f122(0x119)])==null?void 0x0:_0x52bb44[_0x38f122(0x115)](_0x314cca=>_0x314cca[_0x38f122(0x13b)]===_0x919c75[_0x38f122(0x122)])[_0x38f122(0x105)](_0x48b842=>_0x48b842[_0x38f122(0x11f)]))!=null?_0x5f2e0e:[],_0x408f30=JSON['stringify'](_0x2b095b),_0x239618=_0x2e36f1['threadId'],_0x21f087=_0x2e36f1['id'],_0x2a0e66={'memberId':(await this[_0x38f122(0x128)]['requireSession'](_0x1d8485))[_0x38f122(0x144)](),'unitId':_0x1d8485,'threadId':_0x239618,'mention':_0x3cc18d,'content':_0x408f30,'replyId':_0x21f087},_0x3294bc=await this[_0x38f122(0x14f)][_0x38f122(0x14d)](_0x38f122(0x125)+_0x1d8485+_0x38f122(0x151),{'body':_0x2a0e66});return!_0x3294bc[_0x38f122(0x137)][_0x38f122(0x152)]||_0x3294bc[_0x38f122(0x137)]['error'][_0x38f122(0x11e)]===0x1;}async[_0x5bafd5(0xfe)](_0x10c470){const _0x596d7f=_0x5bafd5,{unitId:_0x187755}=_0x10c470,_0x22b58e=_0x10c470['threadId'],_0x401aff={'memberId':this[_0x596d7f(0xff)][_0x596d7f(0x156)]()[_0x596d7f(0x100)],'unitId':_0x187755,'threadId':_0x22b58e,'solved':_0x10c470[_0x596d7f(0x145)]?I['Solved']:I[_0x596d7f(0x118)]},_0x261f4d=await this[_0x596d7f(0x14f)][_0x596d7f(0x14d)](_0x596d7f(0x125)+_0x187755+_0x596d7f(0x123),{'body':_0x401aff});return!_0x261f4d['body'][_0x596d7f(0x152)]||_0x261f4d[_0x596d7f(0x137)][_0x596d7f(0x152)][_0x596d7f(0x11e)]===0x1;}async[_0x5bafd5(0x111)](_0x4f45b2,_0x2da280,_0x23ff6a,_0x8e2c81){const _0x2fe6c0=_0x5bafd5,_0x1ee7e7={'memberId':(await this[_0x2fe6c0(0x128)][_0x2fe6c0(0x136)](_0x4f45b2))[_0x2fe6c0(0x144)](),'threadId':_0x23ff6a,'replyId':_0x8e2c81,'unitId':_0x4f45b2},_0x35d305=await this[_0x2fe6c0(0x14f)]['post'](_0x2fe6c0(0x125)+_0x4f45b2+_0x2fe6c0(0x10c),{'body':_0x1ee7e7});return!_0x35d305['body'][_0x2fe6c0(0x152)]||_0x35d305['body'][_0x2fe6c0(0x152)]['code']===0x1;}async[_0x5bafd5(0xef)](_0x8cb7a5,_0x3d78f1,_0x4351ad){const _0x2b3524=_0x5bafd5,_0x47c080={'unitId':_0x8cb7a5,'threadId':_0x4351ad},_0xf6b384=await this[_0x2b3524(0x14f)][_0x2b3524(0x14d)](_0x2b3524(0x125)+_0x8cb7a5+_0x2b3524(0x107),{'body':_0x47c080}),_0x50c998=_0x4351ad['map'](_0x34e537=>ee(_0xf6b384['body'][_0x2b3524(0x13c)][_0x34e537],_0x8cb7a5,_0x3d78f1))[_0x2b3524(0x115)](Boolean);return Object[_0x2b3524(0x116)](_0xf6b384[_0x2b3524(0x137)][_0x2b3524(0x102)])['forEach'](_0x13eef1=>{const _0x3ce950=_0x2b3524;this[_0x3ce950(0xff)][_0x3ce950(0x10a)](_0x13eef1);}),_0x50c998;}[_0x5bafd5(0x149)](_0x5b9431){const _0x14eb95=_0x5bafd5;return{'id':_0x5b9431['id'],'threadId':_0x5b9431['threadId'],'ref':_0x5b9431[_0x14eb95(0x112)]};}};f=Q([_(0x0,_0x21debe(_0x249829)),_(0x1,_0x21debe(_0x2cd254)),_(0x2,_0x21debe(_0x4e7413)),_(0x3,_0x21debe(_0x526b05))],f);var re=Object[_0x5bafd5(0x120)],te=(_0x525bcb,_0x575974,_0x24d422,_0x3b8329)=>{for(var _0x561f7c=_0x3b8329>0x1?void 0x0:_0x3b8329?re(_0x575974,_0x24d422):_0x575974,_0x287bb0=_0x525bcb['length']-0x1,_0xdee57f;_0x287bb0>=0x0;_0x287bb0--)(_0xdee57f=_0x525bcb[_0x287bb0])&&(_0x561f7c=_0xdee57f(_0x561f7c)||_0x561f7c);return _0x561f7c;},N=(_0x1eba61,_0x1e75de)=>(_0x58b48c,_0x38392f)=>_0x1e75de(_0x58b48c,_0x38392f,_0x1eba61);let g=class extends _0x37480f{constructor(_0x3907da,_0x3ef105){const _0xa1de28=_0x5bafd5;super(),this[_0xa1de28(0x138)]=_0x3907da,this[_0xa1de28(0x126)]=_0x3ef105,this['_initDataSource']();}[_0x5bafd5(0x150)](){const _0x300076=_0x5bafd5;this[_0x300076(0x138)][_0x300076(0x139)]=this[_0x300076(0x126)],this[_0x300076(0x138)][_0x300076(0x121)]=!0x1;}};g=te([N(0x0,_0xde2d25),N(0x1,_0x21debe(f))],g);var se=Object[_0x5bafd5(0x12b)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xc73525,_0x126cb4,_0x525844)=>_0x126cb4 in _0xc73525?se(_0xc73525,_0x126cb4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x525844}):_0xc73525[_0x126cb4]=_0x525844,ie=(_0x4b7e84,_0x422282,_0x27e279,_0x5599e1)=>{for(var _0x3b9a46=_0x5599e1>0x1?void 0x0:_0x5599e1?oe(_0x422282,_0x27e279):_0x422282,_0x418cde=_0x4b7e84['length']-0x1,_0x144952;_0x418cde>=0x0;_0x418cde--)(_0x144952=_0x4b7e84[_0x418cde])&&(_0x3b9a46=_0x144952(_0x3b9a46)||_0x3b9a46);return _0x3b9a46;},w=(_0xf7a922,_0xbc4f99)=>(_0x26b25c,_0x5250e8)=>_0xbc4f99(_0x26b25c,_0x5250e8,_0xf7a922),$=(_0x239764,_0x4d13a0,_0x3880f4)=>ne(_0x239764,typeof _0x4d13a0!=_0x5bafd5(0x130)?_0x4d13a0+'':_0x4d13a0,_0x3880f4);let b=class extends _0x202252{constructor(_0x51a5f1=M,_0x593f62,_0x22795a){const _0x201703=_0x5bafd5;super(),this['_config']=_0x51a5f1,this[_0x201703(0x14e)]=_0x593f62,this[_0x201703(0x134)]=_0x22795a;const {..._0x482d4b}=_0x554707({},M,this[_0x201703(0x13e)]);this[_0x201703(0x134)][_0x201703(0xee)](z,_0x482d4b);}[_0x5bafd5(0x127)](){const _0x582af3=_0x5bafd5;[[f],[g],[S]][_0x582af3(0x133)](_0x2cf3d5=>{const _0x28c880=_0x582af3;this['_injector'][_0x28c880(0x131)](_0x2cf3d5);});}[_0x5bafd5(0x103)](){const _0x265c62=_0x5bafd5;this[_0x265c62(0x14e)]['get'](g),this['_injector']['get'](S);}};$(b,_0x5bafd5(0x101),W),$(b,'type',_0x4f6375[_0x5bafd5(0x129)]),b=ie([_0x44e46d(_0x385c23,_0x10eb17,_0x1c16ff),w(0x1,_0x21debe(_0x526b05)),w(0x2,_0x3481ba)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2b5fac=_0x5bf1;function _0x269e(){const _0x93f086=['customRanges','getUnit','solved','13911007bplEgo','rangeId','_threadCommentModel','Delete','4NhYCEb','_userService','disposeWithMe','userID','addComment','398001cXrOUp','values','syncUpdateMutationToColla','12oFdjsp','add','user','saveCommentToSnapshot','code','defineProperty','post','10nLouNw','addUser','/reply','thread-comment-data-source.config','OpenOrReOpen','_configService','comment','get','users','map','_threadCommentDataSource','threadId','610461OlAiyV','_init','getMemberID','format','Solve','stringify','_httpService','updateComment','pluginName','Unknown','1231672pCVwbr','/edit','setConfig','requireSession','slice','5QOyYPv','getComment','subscribe','579792OoBaVQ','forEach','content','/list','_sessionService','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parse','type','delete','resolved','replies','_initDataSource','getCurrentUser','filter','parentId','deleteComment','Solved','userId','personId','replyId','_config','root','UNRECOGNIZED','/universer-api/user/list','onReady','getOwnPropertyDescriptor','/solved','resolveComment','reply','_threadCommentDataSourceService','216XsHLwf','_injector','Reply','Edit','UNIVER_UNKNOWN','createTimestamp','_commentService','Add','172228EYgxpi','1094526tosQWB','_initUserSync','/delete','comments','YYYY/MM/DD\x20HH:mm','find','commentUpdate$','/universer-api/comment/unit/','unitId','length','body'];_0x269e=function(){return _0x93f086;};return _0x269e();}(function(_0x57c658,_0x57cd5b){const _0x38ab5c=_0x5bf1,_0x2adb85=_0x57c658();while(!![]){try{const _0x516d7d=parseInt(_0x38ab5c(0x126))/0x1+parseInt(_0x38ab5c(0x11e))/0x2+-parseInt(_0x38ab5c(0xfe))/0x3*(parseInt(_0x38ab5c(0x160))/0x4)+-parseInt(_0x38ab5c(0x123))/0x5*(parseInt(_0x38ab5c(0x14e))/0x6)+-parseInt(_0x38ab5c(0x14d))/0x7*(-parseInt(_0x38ab5c(0x145))/0x8)+parseInt(_0x38ab5c(0x114))/0x9*(parseInt(_0x38ab5c(0x108))/0xa)+parseInt(_0x38ab5c(0x15c))/0xb*(-parseInt(_0x38ab5c(0x101))/0xc);if(_0x516d7d===_0x57cd5b)break;else _0x2adb85['push'](_0x2adb85['shift']());}catch(_0x4b976c){_0x2adb85['push'](_0x2adb85['shift']());}}}(_0x269e,0x54f88));import{CommentService as _0x1643d3,CollaborationSessionService as _0x4592f,UniverCollaborationClientPlugin as _0x12c884}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x13415b}from'@univerjs-pro/license';import{dayjs as _0x5dd75f,UserManagerService as _0x475b3b,Inject as _0xccccd8,Injector as _0x1b0878,Disposable as _0x527aee,CustomRangeType as _0x1ee0ce,UniverInstanceType as _0x538ad9,DependentOn as _0x1756f4,IConfigService as _0x47c9d3,Plugin as _0x107f9d,merge as _0x2dacfc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1b6c56}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x6cf1a6,IThreadCommentDataSourceService as _0x41d95c}from'@univerjs/thread-comment';import{bufferTime as _0x12c025}from'rxjs';import{HTTPService as _0x23c06a}from'@univerjs/network';const W=_0x2b5fac(0x12c);var I=(_0x29b1bd=>(_0x29b1bd[_0x29b1bd['OpenOrReOpen']=0x0]=_0x2b5fac(0x10c),_0x29b1bd[_0x29b1bd[_0x2b5fac(0x137)]=0x1]=_0x2b5fac(0x137),_0x29b1bd[_0x29b1bd[_0x2b5fac(0x13d)]=-0x1]=_0x2b5fac(0x13d),_0x29b1bd))(I||{}),v=(_0x4928fe=>(_0x4928fe[_0x4928fe[_0x2b5fac(0x11d)]=0x0]='Unknown',_0x4928fe[_0x4928fe[_0x2b5fac(0x14c)]=0x1]=_0x2b5fac(0x14c),_0x4928fe[_0x4928fe[_0x2b5fac(0x147)]=0x2]=_0x2b5fac(0x147),_0x4928fe[_0x4928fe[_0x2b5fac(0x148)]=0x3]=_0x2b5fac(0x148),_0x4928fe[_0x4928fe[_0x2b5fac(0x15f)]=0x4]=_0x2b5fac(0x15f),_0x4928fe[_0x4928fe[_0x2b5fac(0x118)]=0x5]=_0x2b5fac(0x118),_0x4928fe[_0x4928fe['UNRECOGNIZED']=-0x1]=_0x2b5fac(0x13d),_0x4928fe))(v||{});const D=_0x5425ad=>_0x5dd75f(new Date(+_0x5425ad))[_0x2b5fac(0x117)](_0x2b5fac(0x152)),B=async(_0x5bd1bc,_0x22f234)=>{const _0x5f0595=_0x2b5fac,_0xfa8faa=_0x5bd1bc['get'](_0x475b3b),_0xc6e68d=_0x5bd1bc[_0x5f0595(0x10f)](_0x23c06a);_0x22f234['forEach'](_0x2e1d15=>{const _0x5ad52f=_0x5f0595;_0xfa8faa['getUser'](_0x2e1d15)&&_0x22f234[_0x5ad52f(0x12f)](_0x2e1d15);}),_0x22f234['size']&&(await _0xc6e68d[_0x5f0595(0x10f)](_0x5f0595(0x13e),{'params':{'userIDs':[..._0x22f234]}}))[_0x5f0595(0x158)][_0x5f0595(0x110)][_0x5f0595(0x127)](_0x36b20d=>{const _0x4dc00e=_0x5f0595;_0x36b20d&&_0xfa8faa[_0x4dc00e(0x109)](_0x36b20d);});};var K=Object[_0x2b5fac(0x140)],V=(_0x5e98ca,_0x5b0da5,_0x3d8529,_0x136388)=>{for(var _0x97c3e3=_0x136388>0x1?void 0x0:_0x136388?K(_0x5b0da5,_0x3d8529):_0x5b0da5,_0x14e9d0=_0x5e98ca['length']-0x1,_0x122917;_0x14e9d0>=0x0;_0x14e9d0--)(_0x122917=_0x5e98ca[_0x14e9d0])&&(_0x97c3e3=_0x122917(_0x97c3e3)||_0x97c3e3);return _0x97c3e3;},p=(_0x64a685,_0x10b575)=>(_0x2e257b,_0x54abce)=>_0x10b575(_0x2e257b,_0x54abce,_0x64a685);let S=class extends _0x527aee{constructor(_0x4a844c,_0x1fee33,_0x1f9472,_0x4bfd8e){const _0x37dcf8=_0x2b5fac;super(),this[_0x37dcf8(0x14b)]=_0x4a844c,this[_0x37dcf8(0x15e)]=_0x1fee33,this[_0x37dcf8(0x161)]=_0x1f9472,this[_0x37dcf8(0x146)]=_0x4bfd8e,this['_init'](),this[_0x37dcf8(0x14f)]();}['_initUserSync'](){const _0x127aef=_0x2b5fac;this[_0x127aef(0x162)](this['_threadCommentModel'][_0x127aef(0x154)]['pipe'](_0x12c025(0x10))[_0x127aef(0x125)](_0x275136=>{const _0x3b2511=_0x127aef,_0x580630=new Set();_0x275136[_0x3b2511(0x127)](_0x37ca96=>{const _0x44b486=_0x3b2511;switch(_0x37ca96[_0x44b486(0x12e)]){case _0x44b486(0x102):{const _0x4e1234=_0x37ca96['payload'][_0x44b486(0x139)];_0x580630[_0x44b486(0x102)](_0x4e1234);break;}}}),B(this[_0x3b2511(0x146)],_0x580630);}));}[_0x2b5fac(0x115)](){const _0xebf3f6=_0x2b5fac;this['disposeWithMe'](this['_commentService'][_0xebf3f6(0x154)][_0xebf3f6(0x125)](async _0x291447=>{const _0x2adbe2=_0xebf3f6;var _0x39c001,_0x41c1f4,_0x2fcac5,_0xe5d448;const _0x4e66ac=(_0x39c001=this['_threadCommentModel'][_0x2adbe2(0x15a)](_0x291447[_0x2adbe2(0x156)])['find'](_0xd6c8c7=>_0xd6c8c7[_0x2adbe2(0x113)]===_0x291447['threadId']))==null?void 0x0:_0x39c001['root'];if(!_0x4e66ac)return;const {unitId:_0x574c50,subUnitId:_0x359dae}=_0x4e66ac;switch(_0x291447['user']&&this[_0x2adbe2(0x161)]['addUser'](_0x291447[_0x2adbe2(0x103)]),_0x291447['type']){case v['Add']:break;case v[_0x2adbe2(0x147)]:{this[_0x2adbe2(0x15e)][_0x2adbe2(0xfd)](_0x574c50,_0x359dae,{'unitId':_0x574c50,'subUnitId':_0x359dae,'ref':'','id':_0x291447[_0x2adbe2(0x13a)],'dT':D(+_0x291447[_0x2adbe2(0x14a)]),'threadId':_0x291447[_0x2adbe2(0x113)],'personId':(_0x2fcac5=(_0x41c1f4=_0x291447[_0x2adbe2(0x103)])==null?void 0x0:_0x41c1f4[_0x2adbe2(0xfc)])!=null?_0x2fcac5:_0x291447[_0x2adbe2(0x138)],'text':JSON[_0x2adbe2(0x12d)](_0x291447[_0x2adbe2(0x128)]),'parentId':_0x4e66ac['id']});break;}case v[_0x2adbe2(0x15f)]:{const _0xdb398c=this[_0x2adbe2(0x15e)][_0x2adbe2(0x124)](_0x574c50,_0x359dae,_0x291447[_0x2adbe2(0x13a)]);_0xdb398c&&_0xdb398c[_0x2adbe2(0x135)]&&this[_0x2adbe2(0x15e)]['deleteComment'](_0x574c50,_0x359dae,_0x291447[_0x2adbe2(0x13a)]);break;}case v[_0x2adbe2(0x148)]:{this['_threadCommentModel'][_0x2adbe2(0x11b)](_0x574c50,_0x359dae,{'commentId':_0x291447['replyId'],'text':JSON[_0x2adbe2(0x12d)](_0x291447[_0x2adbe2(0x128)])});break;}case v[_0x2adbe2(0x118)]:{const _0x3951f8=(_0xe5d448=this[_0x2adbe2(0x15e)][_0x2adbe2(0x15a)](_0x291447[_0x2adbe2(0x156)])[_0x2adbe2(0x153)](_0x270489=>_0x270489['threadId']===_0x291447[_0x2adbe2(0x113)]))==null?void 0x0:_0xe5d448[_0x2adbe2(0x13c)];_0x3951f8&&this[_0x2adbe2(0x15e)][_0x2adbe2(0x142)](_0x574c50,_0x359dae,_0x3951f8['id'],_0x291447['solved']===I[_0x2adbe2(0x137)]);break;}}}));}};S=V([p(0x0,_0xccccd8(_0x1643d3)),p(0x1,_0xccccd8(_0x6cf1a6)),p(0x2,_0xccccd8(_0x475b3b)),p(0x3,_0xccccd8(_0x1b0878))],S);function _0x5bf1(_0x44de78,_0x37bb8e){const _0x269eaf=_0x269e();return _0x5bf1=function(_0x5bf1a0,_0x2cebc3){_0x5bf1a0=_0x5bf1a0-0xfc;let _0x204b92=_0x269eaf[_0x5bf1a0];return _0x204b92;},_0x5bf1(_0x44de78,_0x37bb8e);}const z=_0x2b5fac(0x10b),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x132c17,_0xca42e9,_0x16ce39,_0x3ba40d)=>{const _0x3f1611=_0x2b5fac;for(var _0x3ddbf8=_0x3ba40d>0x1?void 0x0:_0x3ba40d?k(_0xca42e9,_0x16ce39):_0xca42e9,_0x218c93=_0x132c17[_0x3f1611(0x157)]-0x1,_0x43283a;_0x218c93>=0x0;_0x218c93--)(_0x43283a=_0x132c17[_0x218c93])&&(_0x3ddbf8=_0x43283a(_0x3ddbf8)||_0x3ddbf8);return _0x3ddbf8;},_=(_0x48f0aa,_0xb790b5)=>(_0x304586,_0x1c20ca)=>_0xb790b5(_0x304586,_0x1c20ca,_0x48f0aa);function X(_0x48eef3,_0x35a490){const _0x3c2e26=_0x2b5fac,_0x27483b=_0x48eef3[_0x3c2e26(0x131)][0x0];return{..._0x35a490,'id':_0x27483b[_0x3c2e26(0x13a)],'resolved':_0x48eef3[_0x3c2e26(0x15b)]===0x1,'dT':D(_0x27483b[_0x3c2e26(0x14a)]),'personId':_0x27483b[_0x3c2e26(0x138)],'threadId':_0x27483b[_0x3c2e26(0x113)]};}function ee(_0x27c21a,_0x4ccf6c,_0x62e727){const _0x3f3efc=_0x2b5fac;var _0x166a76,_0x2d688c;if(((_0x2d688c=(_0x166a76=_0x27c21a==null?void 0x0:_0x27c21a[_0x3f3efc(0x131)])==null?void 0x0:_0x166a76[_0x3f3efc(0x157)])!=null?_0x2d688c:0x0)>0x0){const _0x30bd7f=(_0x42fbd8,_0x20717c)=>({'id':_0x42fbd8[_0x3f3efc(0x13a)],'threadId':_0x42fbd8[_0x3f3efc(0x113)],'dT':D(_0x42fbd8[_0x3f3efc(0x14a)]),'personId':_0x42fbd8[_0x3f3efc(0x138)],'resolved':_0x27c21a[_0x3f3efc(0x15b)]===I[_0x3f3efc(0x137)],'unitId':_0x4ccf6c,'subUnitId':_0x62e727,'text':JSON[_0x3f3efc(0x12d)](_0x42fbd8[_0x3f3efc(0x128)]),'parentId':_0x20717c}),_0x5de295=_0x30bd7f(_0x27c21a[_0x3f3efc(0x131)][0x0]);return{..._0x5de295,'children':_0x27c21a['replies'][_0x3f3efc(0x122)](0x1)[_0x3f3efc(0x111)](_0xe248bc=>_0x30bd7f(_0xe248bc,_0x5de295['id']))};}return null;}let f=class{constructor(_0x2abf80,_0x1da02e,_0x4c3d9b,_0x2e7f25){const _0x615afb=_0x2b5fac;this[_0x615afb(0x11a)]=_0x2abf80,this[_0x615afb(0x161)]=_0x1da02e,this['_sessionService']=_0x4c3d9b,this[_0x615afb(0x146)]=_0x2e7f25;}async['addComment'](_0x13165b){const _0x463547=_0x2b5fac;var _0x2de4b6,_0x589973;const {parentId:_0x35f11e,unitId:_0x54557a,text:_0x30c8fd,threadId:_0x20b42c}=_0x13165b,_0x19e199=(_0x589973=(_0x2de4b6=_0x30c8fd[_0x463547(0x159)])==null?void 0x0:_0x2de4b6['filter'](_0x560bff=>_0x560bff['rangeType']===_0x1ee0ce['COMMENT'])[_0x463547(0x111)](_0x48c29=>_0x48c29[_0x463547(0x15d)]))!=null?_0x589973:[],_0x19a126=JSON['stringify'](_0x30c8fd),_0x23eefb=(await this['_sessionService'][_0x463547(0x121)](_0x54557a))['getMemberID']();if(_0x35f11e){const _0x428aa0={'memberId':_0x23eefb,'unitId':_0x54557a,'content':_0x19a126,'mention':_0x19e199,'threadId':_0x20b42c},_0x1da836=(await this[_0x463547(0x11a)][_0x463547(0x107)](_0x463547(0x155)+_0x54557a+_0x463547(0x10a),{'body':_0x428aa0}))[_0x463547(0x158)][_0x463547(0x143)];return{..._0x13165b,'id':_0x1da836[_0x463547(0x13a)],'dT':_0x5dd75f(+_0x1da836[_0x463547(0x14a)])[_0x463547(0x117)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1da836[_0x463547(0x138)]};}else{const _0x5af8e8={'memberId':_0x23eefb,'unitId':_0x54557a,'content':_0x19a126,'mention':_0x19e199},_0x584287=await this[_0x463547(0x11a)][_0x463547(0x107)](_0x463547(0x155)+_0x54557a+'/add',{'body':_0x5af8e8});return X(_0x584287[_0x463547(0x158)][_0x463547(0x10e)],_0x13165b);}}async[_0x2b5fac(0x11b)](_0x5a97b7){const _0x55c84e=_0x2b5fac;var _0x982412,_0x36eac2;const {text:_0x90545b,unitId:_0x568535}=_0x5a97b7,_0x18b10a=(_0x36eac2=(_0x982412=_0x90545b[_0x55c84e(0x159)])==null?void 0x0:_0x982412[_0x55c84e(0x134)](_0xc80bc8=>_0xc80bc8['rangeType']===_0x1ee0ce['COMMENT'])[_0x55c84e(0x111)](_0x50aa73=>_0x50aa73['rangeId']))!=null?_0x36eac2:[],_0x50166b=JSON[_0x55c84e(0x119)](_0x90545b),_0x2323d4=_0x5a97b7[_0x55c84e(0x113)],_0x2b2bdd=_0x5a97b7['id'],_0x41178e={'memberId':(await this[_0x55c84e(0x12a)][_0x55c84e(0x121)](_0x568535))['getMemberID'](),'unitId':_0x568535,'threadId':_0x2323d4,'mention':_0x18b10a,'content':_0x50166b,'replyId':_0x2b2bdd},_0xad1fea=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x568535+_0x55c84e(0x11f),{'body':_0x41178e});return!_0xad1fea[_0x55c84e(0x158)]['error']||_0xad1fea[_0x55c84e(0x158)][_0x55c84e(0x12b)]['code']===0x1;}async[_0x2b5fac(0x142)](_0x50be37){const _0x46edd9=_0x2b5fac,{unitId:_0x104c0d}=_0x50be37,_0x31eb37=_0x50be37[_0x46edd9(0x113)],_0x171288={'memberId':this[_0x46edd9(0x161)][_0x46edd9(0x133)]()[_0x46edd9(0xfc)],'unitId':_0x104c0d,'threadId':_0x31eb37,'solved':_0x50be37[_0x46edd9(0x130)]?I['Solved']:I[_0x46edd9(0x10c)]},_0x11c0b3=await this[_0x46edd9(0x11a)][_0x46edd9(0x107)](_0x46edd9(0x155)+_0x104c0d+_0x46edd9(0x141),{'body':_0x171288});return!_0x11c0b3[_0x46edd9(0x158)][_0x46edd9(0x12b)]||_0x11c0b3[_0x46edd9(0x158)][_0x46edd9(0x12b)][_0x46edd9(0x105)]===0x1;}async[_0x2b5fac(0x136)](_0x121ee7,_0x40bd14,_0x5c73b7,_0x24970a){const _0x3f888b=_0x2b5fac,_0x4df111={'memberId':(await this[_0x3f888b(0x12a)][_0x3f888b(0x121)](_0x121ee7))[_0x3f888b(0x116)](),'threadId':_0x5c73b7,'replyId':_0x24970a,'unitId':_0x121ee7},_0x145911=await this['_httpService'][_0x3f888b(0x107)](_0x3f888b(0x155)+_0x121ee7+_0x3f888b(0x150),{'body':_0x4df111});return!_0x145911[_0x3f888b(0x158)][_0x3f888b(0x12b)]||_0x145911[_0x3f888b(0x158)][_0x3f888b(0x12b)][_0x3f888b(0x105)]===0x1;}async['listComments'](_0xd1cb93,_0x52dbe0,_0x23becd){const _0x33f765=_0x2b5fac,_0x50ce29={'unitId':_0xd1cb93,'threadId':_0x23becd},_0x29872d=await this[_0x33f765(0x11a)][_0x33f765(0x107)](_0x33f765(0x155)+_0xd1cb93+_0x33f765(0x129),{'body':_0x50ce29}),_0x327995=_0x23becd['map'](_0x3714ec=>ee(_0x29872d['body'][_0x33f765(0x151)][_0x3714ec],_0xd1cb93,_0x52dbe0))[_0x33f765(0x134)](Boolean);return Object[_0x33f765(0xff)](_0x29872d['body'][_0x33f765(0x110)])[_0x33f765(0x127)](_0x32ec6d=>{const _0x20ae81=_0x33f765;this[_0x20ae81(0x161)]['addUser'](_0x32ec6d);}),_0x327995;}[_0x2b5fac(0x104)](_0x5dd41d){const _0x243945=_0x2b5fac;return{'id':_0x5dd41d['id'],'threadId':_0x5dd41d[_0x243945(0x113)],'ref':_0x5dd41d['ref']};}};f=Q([_(0x0,_0xccccd8(_0x23c06a)),_(0x1,_0xccccd8(_0x475b3b)),_(0x2,_0xccccd8(_0x4592f)),_(0x3,_0xccccd8(_0x1b0878))],f);var re=Object[_0x2b5fac(0x140)],te=(_0x10e7d1,_0x142d30,_0x5ba3f9,_0x363f58)=>{const _0x2c4dae=_0x2b5fac;for(var _0x3c1fd7=_0x363f58>0x1?void 0x0:_0x363f58?re(_0x142d30,_0x5ba3f9):_0x142d30,_0x286c7d=_0x10e7d1[_0x2c4dae(0x157)]-0x1,_0xa01b62;_0x286c7d>=0x0;_0x286c7d--)(_0xa01b62=_0x10e7d1[_0x286c7d])&&(_0x3c1fd7=_0xa01b62(_0x3c1fd7)||_0x3c1fd7);return _0x3c1fd7;},N=(_0x23ee45,_0x52a34e)=>(_0x57f084,_0x4136af)=>_0x52a34e(_0x57f084,_0x4136af,_0x23ee45);let g=class extends _0x527aee{constructor(_0x502bf9,_0x2c82ba){const _0x496a1a=_0x2b5fac;super(),this['_threadCommentDataSourceService']=_0x502bf9,this[_0x496a1a(0x112)]=_0x2c82ba,this[_0x496a1a(0x132)]();}[_0x2b5fac(0x132)](){const _0x42314e=_0x2b5fac;this[_0x42314e(0x144)]['dataSource']=this[_0x42314e(0x112)],this[_0x42314e(0x144)][_0x42314e(0x100)]=!0x1;}};g=te([N(0x0,_0x41d95c),N(0x1,_0xccccd8(f))],g);var se=Object[_0x2b5fac(0x106)],oe=Object[_0x2b5fac(0x140)],ne=(_0xbcb39a,_0x35f1cd,_0xee785d)=>_0x35f1cd in _0xbcb39a?se(_0xbcb39a,_0x35f1cd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xee785d}):_0xbcb39a[_0x35f1cd]=_0xee785d,ie=(_0x450e88,_0x48f20b,_0x14f01f,_0x4b5a12)=>{const _0x3ee6db=_0x2b5fac;for(var _0x2fcadd=_0x4b5a12>0x1?void 0x0:_0x4b5a12?oe(_0x48f20b,_0x14f01f):_0x48f20b,_0x4bb6f4=_0x450e88[_0x3ee6db(0x157)]-0x1,_0x4cefe8;_0x4bb6f4>=0x0;_0x4bb6f4--)(_0x4cefe8=_0x450e88[_0x4bb6f4])&&(_0x2fcadd=_0x4cefe8(_0x2fcadd)||_0x2fcadd);return _0x2fcadd;},w=(_0x37468c,_0x1f5429)=>(_0x541a3d,_0x55fc0d)=>_0x1f5429(_0x541a3d,_0x55fc0d,_0x37468c),$=(_0x4ad1f1,_0x3d93f5,_0x8da227)=>ne(_0x4ad1f1,typeof _0x3d93f5!='symbol'?_0x3d93f5+'':_0x3d93f5,_0x8da227);let b=class extends _0x107f9d{constructor(_0x10935b=M,_0x41f671,_0x401885){const _0x5ee2bd=_0x2b5fac;super(),this[_0x5ee2bd(0x13b)]=_0x10935b,this[_0x5ee2bd(0x146)]=_0x41f671,this[_0x5ee2bd(0x10d)]=_0x401885;const {..._0x513e42}=_0x2dacfc({},M,this[_0x5ee2bd(0x13b)]);this['_configService'][_0x5ee2bd(0x120)](z,_0x513e42);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x31668b=>{const _0x10ea49=_0x5bf1;this[_0x10ea49(0x146)][_0x10ea49(0x102)](_0x31668b);});}[_0x2b5fac(0x13f)](){const _0x507d8c=_0x2b5fac;this[_0x507d8c(0x146)][_0x507d8c(0x10f)](g),this[_0x507d8c(0x146)][_0x507d8c(0x10f)](S);}};$(b,_0x2b5fac(0x11c),W),$(b,'type',_0x538ad9[_0x2b5fac(0x149)]),b=ie([_0x1756f4(_0x1b6c56,_0x12c884,_0x13415b),w(0x1,_0xccccd8(_0x1b0878)),w(0x2,_0x47c9d3)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x2299(_0x140aac,_0x1c273f){const _0x8d7750=_0x8d77();return _0x2299=function(_0x22992b,_0x28b96b){_0x22992b=_0x22992b-0x166;let _0x531152=_0x8d7750[_0x22992b];return _0x531152;},_0x2299(_0x140aac,_0x1c273f);}function _0x8d77(){const _0xef400=['4180048OqORlb','YYYY/MM/DD\x20HH:mm','/edit','rangeId','find','deleteComment','_userService','post','COMMENT','users','@univerjs/core','resolveComment','function','length','disposeWithMe','@univerjs/thread-comment','ThreadCommentModel','delete','getUnit','UniverLicensePlugin','Plugin','UniverInstanceType','get','_configService','@univerjs/network','requireSession','UniverProThreadCommentDatasource','addUser','body','comment','type','_threadCommentDataSource','/add','_injector','Edit','1562859hnkKyy','getOwnPropertyDescriptor','7ICCfaQ','createTimestamp','solved','DependentOn','Reply','Unknown','_threadCommentModel','UNRECOGNIZED','setConfig','UniverThreadCommentUi','UserManagerService','@univerjs-pro/collaboration-client','_config','UniverThreadComment','rangeType','rxjs','1687600jXeAWI','subscribe','parse','stringify','_init','UniverCollaborationClientPlugin','user','defineProperty','Delete','CommentService','/universer-api/user/list','size','_sessionService','3510325zCRHCW','toStringTag','_threadCommentDataSourceService','replyId','671935xnPkUR','_initDataSource','/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentDataSourcePlugin','88074QVoiuO','saveCommentToSnapshot','commentUpdate$','parentId','_initUserSync','onReady','add','UniverCore','syncUpdateMutationToColla','thread-comment-data-source.config','Inject','replies','reply','userID','30iIkzwV','Module','customRanges','unitId','dayjs','UNIVER_UNKNOWN','_commentService','pipe','Injector','54MbDzpS','Solve','comments','format','root','@univerjs-pro/license','updateComment','content','filter','resolved','Solved','8863494OePDFM','error','CustomRangeType','addComment','/universer-api/comment/unit/','object','/reply','OpenOrReOpen','CollaborationSessionService','Add','UniverProCollaborationClient','getComment','getMemberID','getCurrentUser','pluginName','dataSource','getUser','code','listComments','threadId','@univerjs/thread-comment-ui','HTTPService','map','/delete','values','userId','Disposable','symbol','forEach','ref','_httpService'];_0x8d77=function(){return _0xef400;};return _0x8d77();}(function(_0x301452,_0x57f4e9){const _0x173960=_0x2299,_0x1674d0=_0x301452();while(!![]){try{const _0x42234d=-parseInt(_0x173960(0x1c5))/0x1+-parseInt(_0x173960(0x1ca))/0x2*(-parseInt(_0x173960(0x1e1))/0x3)+parseInt(_0x173960(0x1b4))/0x4+parseInt(_0x173960(0x1c1))/0x5+-parseInt(_0x173960(0x1ec))/0x6+-parseInt(_0x173960(0x1a4))/0x7*(-parseInt(_0x173960(0x17f))/0x8)+parseInt(_0x173960(0x1a2))/0x9*(parseInt(_0x173960(0x1d8))/0xa);if(_0x42234d===_0x57f4e9)break;else _0x1674d0['push'](_0x1674d0['shift']());}catch(_0x164c89){_0x1674d0['push'](_0x1674d0['shift']());}}}(_0x8d77,0xc5f9a),function(_0x13e716,_0x35352f){const _0x5782aa=_0x2299;typeof exports==_0x5782aa(0x1f1)&&typeof module<'u'?_0x35352f(exports,require(_0x5782aa(0x1af)),require(_0x5782aa(0x1e6)),require(_0x5782aa(0x189)),require(_0x5782aa(0x174)),require(_0x5782aa(0x18e)),require('rxjs'),require(_0x5782aa(0x197))):typeof define==_0x5782aa(0x18b)&&define['amd']?define(['exports',_0x5782aa(0x1af),_0x5782aa(0x1e6),'@univerjs/core','@univerjs/thread-comment-ui',_0x5782aa(0x18e),_0x5782aa(0x1b3),_0x5782aa(0x197)],_0x35352f):(_0x13e716=typeof globalThis<'u'?globalThis:_0x13e716||self,_0x35352f(_0x13e716[_0x5782aa(0x199)]={},_0x13e716[_0x5782aa(0x16a)],_0x13e716['UniverProLicense'],_0x13e716[_0x5782aa(0x1d1)],_0x13e716[_0x5782aa(0x1ad)],_0x13e716[_0x5782aa(0x1b1)],_0x13e716[_0x5782aa(0x1b3)],_0x13e716['UniverNetwork']));}(this,function(_0x53e535,_0x2515fd,_0x568a73,_0x4f8d55,_0x301aa5,_0x116437,_0x271235,_0x274f20){'use strict';const _0x314d61=_0x2299;const _0x4dc8c2=_0x314d61(0x1c8);var _0x588c03=(_0x12a4f9=>(_0x12a4f9[_0x12a4f9['OpenOrReOpen']=0x0]=_0x314d61(0x167),_0x12a4f9[_0x12a4f9[_0x314d61(0x1eb)]=0x1]='Solved',_0x12a4f9[_0x12a4f9[_0x314d61(0x1ab)]=-0x1]=_0x314d61(0x1ab),_0x12a4f9))(_0x588c03||{}),_0x4724d4=(_0x5b7398=>(_0x5b7398[_0x5b7398[_0x314d61(0x1a9)]=0x0]=_0x314d61(0x1a9),_0x5b7398[_0x5b7398['Add']=0x1]=_0x314d61(0x169),_0x5b7398[_0x5b7398['Reply']=0x2]=_0x314d61(0x1a8),_0x5b7398[_0x5b7398['Edit']=0x3]='Edit',_0x5b7398[_0x5b7398['Delete']=0x4]=_0x314d61(0x1bc),_0x5b7398[_0x5b7398['Solve']=0x5]=_0x314d61(0x1e2),_0x5b7398[_0x5b7398['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x5b7398))(_0x4724d4||{});const _0x19a477=_0x1cd6a5=>_0x4f8d55[_0x314d61(0x1dc)](new Date(+_0x1cd6a5))[_0x314d61(0x1e4)](_0x314d61(0x180)),_0x345bff=async(_0x22b7b8,_0x5e7cc2)=>{const _0xf38370=_0x314d61,_0x5b77e4=_0x22b7b8[_0xf38370(0x195)](_0x4f8d55['UserManagerService']),_0x5c6f18=_0x22b7b8[_0xf38370(0x195)](_0x274f20[_0xf38370(0x175)]);_0x5e7cc2[_0xf38370(0x17c)](_0x4745e2=>{const _0x5ef4ea=_0xf38370;_0x5b77e4[_0x5ef4ea(0x170)](_0x4745e2)&&_0x5e7cc2[_0x5ef4ea(0x190)](_0x4745e2);}),_0x5e7cc2[_0xf38370(0x1bf)]&&(await _0x5c6f18[_0xf38370(0x195)](_0xf38370(0x1be),{'params':{'userIDs':[..._0x5e7cc2]}}))[_0xf38370(0x19b)]['users']['forEach'](_0x14e88c=>{_0x14e88c&&_0x5b77e4['addUser'](_0x14e88c);});};var _0xb967bb=Object[_0x314d61(0x1a3)],_0x3d4c57=(_0x3cf1ac,_0x2ad7a5,_0x20e19e,_0x46baa5)=>{for(var _0x5690f7=_0x46baa5>0x1?void 0x0:_0x46baa5?_0xb967bb(_0x2ad7a5,_0x20e19e):_0x2ad7a5,_0x66846=_0x3cf1ac['length']-0x1,_0x5f0edc;_0x66846>=0x0;_0x66846--)(_0x5f0edc=_0x3cf1ac[_0x66846])&&(_0x5690f7=_0x5f0edc(_0x5690f7)||_0x5690f7);return _0x5690f7;},_0xf945f1=(_0x49d61a,_0xd42b2e)=>(_0x1a50e5,_0x55b532)=>_0xd42b2e(_0x1a50e5,_0x55b532,_0x49d61a);let _0xae2ce6=class extends _0x4f8d55[_0x314d61(0x17a)]{constructor(_0x19c896,_0x1dc5e7,_0x5c51f6,_0x190cde){const _0x309365=_0x314d61;super(),this[_0x309365(0x1de)]=_0x19c896,this[_0x309365(0x1aa)]=_0x1dc5e7,this[_0x309365(0x185)]=_0x5c51f6,this[_0x309365(0x1a0)]=_0x190cde,this[_0x309365(0x1b8)](),this[_0x309365(0x1ce)]();}[_0x314d61(0x1ce)](){const _0x2ed064=_0x314d61;this[_0x2ed064(0x18d)](this[_0x2ed064(0x1aa)][_0x2ed064(0x1cc)][_0x2ed064(0x1df)](_0x271235['bufferTime'](0x10))[_0x2ed064(0x1b5)](_0x76e9bf=>{const _0x519504=_0x2ed064,_0x440b05=new Set();_0x76e9bf[_0x519504(0x17c)](_0xa0a91e=>{const _0x5cf088=_0x519504;switch(_0xa0a91e['type']){case _0x5cf088(0x1d0):{const _0x300a15=_0xa0a91e['payload']['personId'];_0x440b05['add'](_0x300a15);break;}}}),_0x345bff(this[_0x519504(0x1a0)],_0x440b05);}));}[_0x314d61(0x1b8)](){const _0x56ffca=_0x314d61;this[_0x56ffca(0x18d)](this[_0x56ffca(0x1de)]['commentUpdate$'][_0x56ffca(0x1b5)](async _0x598bf2=>{const _0x515c40=_0x56ffca;var _0x55fdff,_0x46a508,_0x1229cd,_0x1be93c;const _0x5a4209=(_0x55fdff=this[_0x515c40(0x1aa)][_0x515c40(0x191)](_0x598bf2[_0x515c40(0x1db)])[_0x515c40(0x183)](_0x491bfb=>_0x491bfb[_0x515c40(0x173)]===_0x598bf2[_0x515c40(0x173)]))==null?void 0x0:_0x55fdff[_0x515c40(0x1e5)];if(!_0x5a4209)return;const {unitId:_0x370226,subUnitId:_0x2cbf69}=_0x5a4209;switch(_0x598bf2[_0x515c40(0x1ba)]&&this[_0x515c40(0x185)][_0x515c40(0x19a)](_0x598bf2[_0x515c40(0x1ba)]),_0x598bf2[_0x515c40(0x19d)]){case _0x4724d4['Add']:break;case _0x4724d4['Reply']:{this[_0x515c40(0x1aa)][_0x515c40(0x1ef)](_0x370226,_0x2cbf69,{'unitId':_0x370226,'subUnitId':_0x2cbf69,'ref':'','id':_0x598bf2[_0x515c40(0x1c4)],'dT':_0x19a477(+_0x598bf2['createTimestamp']),'threadId':_0x598bf2[_0x515c40(0x173)],'personId':(_0x1229cd=(_0x46a508=_0x598bf2['user'])==null?void 0x0:_0x46a508[_0x515c40(0x1d7)])!=null?_0x1229cd:_0x598bf2[_0x515c40(0x179)],'text':JSON['parse'](_0x598bf2['content']),'parentId':_0x5a4209['id']});break;}case _0x4724d4[_0x515c40(0x1bc)]:{const _0x4e6bef=this[_0x515c40(0x1aa)][_0x515c40(0x16b)](_0x370226,_0x2cbf69,_0x598bf2[_0x515c40(0x1c4)]);_0x4e6bef&&_0x4e6bef[_0x515c40(0x1cd)]&&this[_0x515c40(0x1aa)][_0x515c40(0x184)](_0x370226,_0x2cbf69,_0x598bf2[_0x515c40(0x1c4)]);break;}case _0x4724d4[_0x515c40(0x1a1)]:{this['_threadCommentModel'][_0x515c40(0x1e7)](_0x370226,_0x2cbf69,{'commentId':_0x598bf2[_0x515c40(0x1c4)],'text':JSON[_0x515c40(0x1b6)](_0x598bf2[_0x515c40(0x1e8)])});break;}case _0x4724d4[_0x515c40(0x1e2)]:{const _0x438e06=(_0x1be93c=this[_0x515c40(0x1aa)][_0x515c40(0x191)](_0x598bf2['unitId'])[_0x515c40(0x183)](_0x3603ee=>_0x3603ee['threadId']===_0x598bf2[_0x515c40(0x173)]))==null?void 0x0:_0x1be93c[_0x515c40(0x1e5)];_0x438e06&&this[_0x515c40(0x1aa)][_0x515c40(0x18a)](_0x370226,_0x2cbf69,_0x438e06['id'],_0x598bf2[_0x515c40(0x1a6)]===_0x588c03[_0x515c40(0x1eb)]);break;}}}));}};_0xae2ce6=_0x3d4c57([_0xf945f1(0x0,_0x4f8d55[_0x314d61(0x1d4)](_0x2515fd[_0x314d61(0x1bd)])),_0xf945f1(0x1,_0x4f8d55['Inject'](_0x116437[_0x314d61(0x18f)])),_0xf945f1(0x2,_0x4f8d55[_0x314d61(0x1d4)](_0x4f8d55[_0x314d61(0x1ae)])),_0xf945f1(0x3,_0x4f8d55[_0x314d61(0x1d4)](_0x4f8d55['Injector']))],_0xae2ce6);const _0x3cab88=_0x314d61(0x1d3),_0x3c9e62={};var _0x986c48=Object[_0x314d61(0x1a3)],_0xcc5738=(_0x3a59ed,_0x9bd0ea,_0x4f1a3b,_0x3df159)=>{for(var _0x27eb0e=_0x3df159>0x1?void 0x0:_0x3df159?_0x986c48(_0x9bd0ea,_0x4f1a3b):_0x9bd0ea,_0x2c9785=_0x3a59ed['length']-0x1,_0x1ccadd;_0x2c9785>=0x0;_0x2c9785--)(_0x1ccadd=_0x3a59ed[_0x2c9785])&&(_0x27eb0e=_0x1ccadd(_0x27eb0e)||_0x27eb0e);return _0x27eb0e;},_0x5e2bb7=(_0x1706ce,_0xb6a0f0)=>(_0x24a388,_0xc7a0eb)=>_0xb6a0f0(_0x24a388,_0xc7a0eb,_0x1706ce);function _0x1bc467(_0x5f48ef,_0xa0e75d){const _0x5b2685=_0x314d61,_0xde496f=_0x5f48ef[_0x5b2685(0x1d5)][0x0];return{..._0xa0e75d,'id':_0xde496f[_0x5b2685(0x1c4)],'resolved':_0x5f48ef[_0x5b2685(0x1a6)]===0x1,'dT':_0x19a477(_0xde496f['createTimestamp']),'personId':_0xde496f[_0x5b2685(0x179)],'threadId':_0xde496f[_0x5b2685(0x173)]};}function _0x49f289(_0x21b548,_0x3b83a1,_0x3fdbdd){const _0x46be7d=_0x314d61;var _0x545d2c,_0x51c30a;if(((_0x51c30a=(_0x545d2c=_0x21b548==null?void 0x0:_0x21b548[_0x46be7d(0x1d5)])==null?void 0x0:_0x545d2c[_0x46be7d(0x18c)])!=null?_0x51c30a:0x0)>0x0){const _0x14edd1=(_0x5b751d,_0x2eafb6)=>({'id':_0x5b751d[_0x46be7d(0x1c4)],'threadId':_0x5b751d['threadId'],'dT':_0x19a477(_0x5b751d[_0x46be7d(0x1a5)]),'personId':_0x5b751d[_0x46be7d(0x179)],'resolved':_0x21b548[_0x46be7d(0x1a6)]===_0x588c03[_0x46be7d(0x1eb)],'unitId':_0x3b83a1,'subUnitId':_0x3fdbdd,'text':JSON[_0x46be7d(0x1b6)](_0x5b751d[_0x46be7d(0x1e8)]),'parentId':_0x2eafb6}),_0x30006d=_0x14edd1(_0x21b548[_0x46be7d(0x1d5)][0x0]);return{..._0x30006d,'children':_0x21b548[_0x46be7d(0x1d5)]['slice'](0x1)['map'](_0x4ad4bd=>_0x14edd1(_0x4ad4bd,_0x30006d['id']))};}return null;}let _0x40a520=class{constructor(_0x47b066,_0x439ac5,_0x43a730,_0x5a8340){const _0x3c4112=_0x314d61;this['_httpService']=_0x47b066,this[_0x3c4112(0x185)]=_0x439ac5,this['_sessionService']=_0x43a730,this[_0x3c4112(0x1a0)]=_0x5a8340;}async['addComment'](_0x512a3a){const _0x32c7cf=_0x314d61;var _0x3152b3,_0x4e5134;const {parentId:_0x213182,unitId:_0x42c295,text:_0x5b5060,threadId:_0x4d1461}=_0x512a3a,_0x2d6243=(_0x4e5134=(_0x3152b3=_0x5b5060[_0x32c7cf(0x1da)])==null?void 0x0:_0x3152b3[_0x32c7cf(0x1e9)](_0x4cb5c0=>_0x4cb5c0[_0x32c7cf(0x1b2)]===_0x4f8d55['CustomRangeType'][_0x32c7cf(0x187)])['map'](_0x1d69a3=>_0x1d69a3[_0x32c7cf(0x182)]))!=null?_0x4e5134:[],_0x490dcf=JSON[_0x32c7cf(0x1b7)](_0x5b5060),_0x246d38=(await this['_sessionService'][_0x32c7cf(0x198)](_0x42c295))[_0x32c7cf(0x16c)]();if(_0x213182){const _0x4828e0={'memberId':_0x246d38,'unitId':_0x42c295,'content':_0x490dcf,'mention':_0x2d6243,'threadId':_0x4d1461},_0x582408=(await this['_httpService'][_0x32c7cf(0x186)](_0x32c7cf(0x1f0)+_0x42c295+_0x32c7cf(0x166),{'body':_0x4828e0}))[_0x32c7cf(0x19b)][_0x32c7cf(0x1d6)];return{..._0x512a3a,'id':_0x582408[_0x32c7cf(0x1c4)],'dT':_0x4f8d55[_0x32c7cf(0x1dc)](+_0x582408[_0x32c7cf(0x1a5)])['format'](_0x32c7cf(0x180)),'personId':_0x582408[_0x32c7cf(0x179)]};}else{const _0x297600={'memberId':_0x246d38,'unitId':_0x42c295,'content':_0x490dcf,'mention':_0x2d6243},_0x266a34=await this[_0x32c7cf(0x17e)][_0x32c7cf(0x186)](_0x32c7cf(0x1f0)+_0x42c295+_0x32c7cf(0x19f),{'body':_0x297600});return _0x1bc467(_0x266a34['body'][_0x32c7cf(0x19c)],_0x512a3a);}}async[_0x314d61(0x1e7)](_0x29188f){const _0x104398=_0x314d61;var _0x2da3e9,_0x43b070;const {text:_0xcc6a2f,unitId:_0x5ed8db}=_0x29188f,_0x2af719=(_0x43b070=(_0x2da3e9=_0xcc6a2f[_0x104398(0x1da)])==null?void 0x0:_0x2da3e9[_0x104398(0x1e9)](_0x279f7d=>_0x279f7d[_0x104398(0x1b2)]===_0x4f8d55[_0x104398(0x1ee)]['COMMENT'])[_0x104398(0x176)](_0x362515=>_0x362515[_0x104398(0x182)]))!=null?_0x43b070:[],_0x57f187=JSON[_0x104398(0x1b7)](_0xcc6a2f),_0x5c2d21=_0x29188f[_0x104398(0x173)],_0x442254=_0x29188f['id'],_0xd927e9={'memberId':(await this[_0x104398(0x1c0)][_0x104398(0x198)](_0x5ed8db))[_0x104398(0x16c)](),'unitId':_0x5ed8db,'threadId':_0x5c2d21,'mention':_0x2af719,'content':_0x57f187,'replyId':_0x442254},_0x5bab11=await this[_0x104398(0x17e)][_0x104398(0x186)](_0x104398(0x1f0)+_0x5ed8db+_0x104398(0x181),{'body':_0xd927e9});return!_0x5bab11['body']['error']||_0x5bab11['body'][_0x104398(0x1ed)]['code']===0x1;}async[_0x314d61(0x18a)](_0x36d260){const _0x12cc98=_0x314d61,{unitId:_0x36f10b}=_0x36d260,_0x54a3ae=_0x36d260[_0x12cc98(0x173)],_0x14aa66={'memberId':this[_0x12cc98(0x185)][_0x12cc98(0x16d)]()[_0x12cc98(0x1d7)],'unitId':_0x36f10b,'threadId':_0x54a3ae,'solved':_0x36d260[_0x12cc98(0x1ea)]?_0x588c03[_0x12cc98(0x1eb)]:_0x588c03['OpenOrReOpen']},_0x4773a8=await this[_0x12cc98(0x17e)][_0x12cc98(0x186)]('/universer-api/comment/unit/'+_0x36f10b+_0x12cc98(0x1c7),{'body':_0x14aa66});return!_0x4773a8[_0x12cc98(0x19b)]['error']||_0x4773a8[_0x12cc98(0x19b)]['error'][_0x12cc98(0x171)]===0x1;}async[_0x314d61(0x184)](_0x9cbad1,_0x43d2f4,_0xbdd1b0,_0x2da3dc){const _0x51dd31=_0x314d61,_0x3a7f37={'memberId':(await this[_0x51dd31(0x1c0)]['requireSession'](_0x9cbad1))['getMemberID'](),'threadId':_0xbdd1b0,'replyId':_0x2da3dc,'unitId':_0x9cbad1},_0x2104a3=await this[_0x51dd31(0x17e)][_0x51dd31(0x186)](_0x51dd31(0x1f0)+_0x9cbad1+_0x51dd31(0x177),{'body':_0x3a7f37});return!_0x2104a3[_0x51dd31(0x19b)][_0x51dd31(0x1ed)]||_0x2104a3[_0x51dd31(0x19b)][_0x51dd31(0x1ed)][_0x51dd31(0x171)]===0x1;}async[_0x314d61(0x172)](_0x414840,_0x493f91,_0x73372a){const _0x45ff3c=_0x314d61,_0x1987c7={'unitId':_0x414840,'threadId':_0x73372a},_0x3710e1=await this[_0x45ff3c(0x17e)][_0x45ff3c(0x186)]('/universer-api/comment/unit/'+_0x414840+'/list',{'body':_0x1987c7}),_0x1631a4=_0x73372a['map'](_0x599f17=>_0x49f289(_0x3710e1[_0x45ff3c(0x19b)][_0x45ff3c(0x1e3)][_0x599f17],_0x414840,_0x493f91))[_0x45ff3c(0x1e9)](Boolean);return Object[_0x45ff3c(0x178)](_0x3710e1['body'][_0x45ff3c(0x188)])[_0x45ff3c(0x17c)](_0x27e372=>{const _0x6746c7=_0x45ff3c;this[_0x6746c7(0x185)][_0x6746c7(0x19a)](_0x27e372);}),_0x1631a4;}[_0x314d61(0x1cb)](_0x3b1d29){const _0x424f0b=_0x314d61;return{'id':_0x3b1d29['id'],'threadId':_0x3b1d29['threadId'],'ref':_0x3b1d29[_0x424f0b(0x17d)]};}};_0x40a520=_0xcc5738([_0x5e2bb7(0x0,_0x4f8d55[_0x314d61(0x1d4)](_0x274f20[_0x314d61(0x175)])),_0x5e2bb7(0x1,_0x4f8d55['Inject'](_0x4f8d55['UserManagerService'])),_0x5e2bb7(0x2,_0x4f8d55['Inject'](_0x2515fd[_0x314d61(0x168)])),_0x5e2bb7(0x3,_0x4f8d55['Inject'](_0x4f8d55[_0x314d61(0x1e0)]))],_0x40a520);var _0x49f1e7=Object['getOwnPropertyDescriptor'],_0x288673=(_0xd4b3a,_0x8a04c9,_0x58fffe,_0x1a6f90)=>{for(var _0x3ec27a=_0x1a6f90>0x1?void 0x0:_0x1a6f90?_0x49f1e7(_0x8a04c9,_0x58fffe):_0x8a04c9,_0xb58b3f=_0xd4b3a['length']-0x1,_0x55b68a;_0xb58b3f>=0x0;_0xb58b3f--)(_0x55b68a=_0xd4b3a[_0xb58b3f])&&(_0x3ec27a=_0x55b68a(_0x3ec27a)||_0x3ec27a);return _0x3ec27a;},_0xc01822=(_0x2a456f,_0x1addca)=>(_0x48558a,_0x5248c2)=>_0x1addca(_0x48558a,_0x5248c2,_0x2a456f);let _0x48c380=class extends _0x4f8d55[_0x314d61(0x17a)]{constructor(_0x525a15,_0x1d23f5){const _0x11685d=_0x314d61;super(),this[_0x11685d(0x1c3)]=_0x525a15,this[_0x11685d(0x19e)]=_0x1d23f5,this[_0x11685d(0x1c6)]();}[_0x314d61(0x1c6)](){const _0x2367d3=_0x314d61;this['_threadCommentDataSourceService'][_0x2367d3(0x16f)]=this['_threadCommentDataSource'],this[_0x2367d3(0x1c3)][_0x2367d3(0x1d2)]=!0x1;}};_0x48c380=_0x288673([_0xc01822(0x0,_0x116437['IThreadCommentDataSourceService']),_0xc01822(0x1,_0x4f8d55[_0x314d61(0x1d4)](_0x40a520))],_0x48c380);var _0x1f13e2=Object['defineProperty'],_0x210824=Object[_0x314d61(0x1a3)],_0x2fa108=(_0x30a765,_0x308796,_0x2d8436)=>_0x308796 in _0x30a765?_0x1f13e2(_0x30a765,_0x308796,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2d8436}):_0x30a765[_0x308796]=_0x2d8436,_0x2d5dd1=(_0x52898c,_0x537867,_0x2d16b7,_0x226e59)=>{const _0x70f1fc=_0x314d61;for(var _0x1fc816=_0x226e59>0x1?void 0x0:_0x226e59?_0x210824(_0x537867,_0x2d16b7):_0x537867,_0x4ed39d=_0x52898c[_0x70f1fc(0x18c)]-0x1,_0xb00880;_0x4ed39d>=0x0;_0x4ed39d--)(_0xb00880=_0x52898c[_0x4ed39d])&&(_0x1fc816=_0xb00880(_0x1fc816)||_0x1fc816);return _0x1fc816;},_0x45d87f=(_0xa07452,_0xe736ba)=>(_0x44b7c7,_0x19913d)=>_0xe736ba(_0x44b7c7,_0x19913d,_0xa07452),_0x37022e=(_0x581eb5,_0x56fe75,_0x2d1142)=>_0x2fa108(_0x581eb5,typeof _0x56fe75!=_0x314d61(0x17b)?_0x56fe75+'':_0x56fe75,_0x2d1142);_0x53e535[_0x314d61(0x1c9)]=class extends _0x4f8d55[_0x314d61(0x193)]{constructor(_0x5dfc44=_0x3c9e62,_0x55ea61,_0x47dbf5){const _0x50b830=_0x314d61;super(),this['_config']=_0x5dfc44,this[_0x50b830(0x1a0)]=_0x55ea61,this[_0x50b830(0x196)]=_0x47dbf5;const {..._0x227f66}=_0x4f8d55['merge']({},_0x3c9e62,this[_0x50b830(0x1b0)]);this['_configService'][_0x50b830(0x1ac)](_0x3cab88,_0x227f66);}['onStarting'](){const _0x4936c8=_0x314d61;[[_0x40a520],[_0x48c380],[_0xae2ce6]][_0x4936c8(0x17c)](_0x2c133d=>{const _0x4059a9=_0x4936c8;this[_0x4059a9(0x1a0)][_0x4059a9(0x1d0)](_0x2c133d);});}[_0x314d61(0x1cf)](){const _0x241f27=_0x314d61;this['_injector'][_0x241f27(0x195)](_0x48c380),this[_0x241f27(0x1a0)][_0x241f27(0x195)](_0xae2ce6);}},_0x37022e(_0x53e535[_0x314d61(0x1c9)],_0x314d61(0x16e),_0x4dc8c2),_0x37022e(_0x53e535[_0x314d61(0x1c9)],'type',_0x4f8d55[_0x314d61(0x194)][_0x314d61(0x1dd)]),_0x53e535[_0x314d61(0x1c9)]=_0x2d5dd1([_0x4f8d55[_0x314d61(0x1a7)](_0x301aa5['UniverThreadCommentUIPlugin'],_0x2515fd[_0x314d61(0x1b9)],_0x568a73[_0x314d61(0x192)]),_0x45d87f(0x1,_0x4f8d55['Inject'](_0x4f8d55[_0x314d61(0x1e0)])),_0x45d87f(0x2,_0x4f8d55['IConfigService'])],_0x53e535[_0x314d61(0x1c9)]),Object[_0x314d61(0x1bb)](_0x53e535,Symbol[_0x314d61(0x1c2)],{'value':_0x314d61(0x1d9)});}));
1
+ function _0xbe30(_0xacda66,_0x44309a){const _0x40e44c=_0x40e4();return _0xbe30=function(_0xbe3068,_0x419201){_0xbe3068=_0xbe3068-0x16d;let _0x5317d7=_0x40e44c[_0xbe3068];return _0x5317d7;},_0xbe30(_0xacda66,_0x44309a);}function _0x40e4(){const _0x139a77=['1653903qVREaI','comments','users','resolved','12717foNjOu','_injector','/list','dayjs','resolveComment','userId','amd','find','/solved','commentUpdate$','onStarting','code','slice','function','UserManagerService','_httpService','_initUserSync','_threadCommentDataSource','customRanges','204353plBFSF','dataSource','symbol','listComments','_sessionService','_threadCommentDataSourceService','HTTPService','@univerjs-pro/collaboration-client','Delete','getComment','syncUpdateMutationToColla','COMMENT','thread-comment-data-source.config','merge','UniverCollaborationClientPlugin','rxjs','post','UNRECOGNIZED','getUnit','body','@univerjs/core','values','UniverProCollaborationClient','rangeId','_configService','_init','CustomRangeType','UNIVER_UNKNOWN','pipe','map','@univerjs/thread-comment','Disposable','_userService','11316uRFYrh','toStringTag','user','UniverThreadCommentUi','createTimestamp','getOwnPropertyDescriptor','8uoiYpZ','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IThreadCommentDataSourceService','Injector','stringify','/add','reply','comment','@univerjs-pro/license','exports','Solve','Module','Inject','filter','Plugin','subscribe','parse','Unknown','root','2150uJZvaH','/reply','_config','getCurrentUser','392qyvBCg','requireSession','forEach','Reply','threadId','UniverCore','solved','UniverInstanceType','defineProperty','replies','@univerjs/thread-comment-ui','personId','1780dANklb','length','_threadCommentModel','UniverNetwork','/universer-api/comment/unit/','OpenOrReOpen','addComment','_initDataSource','getMemberID','58SeyAQI','userID','677820cggQYd','@univerjs/network','DependentOn','UniverThreadCommentDataSourcePlugin','6890741RGevaX','error','updateComment','UniverProLicense','disposeWithMe','UniverThreadCommentUIPlugin','/edit','UniverThreadComment','YYYY/MM/DD\x20HH:mm','rangeType','content','Solved','/delete','setConfig','get','size','add','IConfigService','addUser','replyId','delete','Add','type','format','Edit','_commentService'];_0x40e4=function(){return _0x139a77;};return _0x40e4();}(function(_0xbf97ab,_0x183e2a){const _0x513a30=_0xbe30,_0x5dbe62=_0xbf97ab();while(!![]){try{const _0x5acdc9=parseInt(_0x513a30(0x1c5))/0x1+parseInt(_0x513a30(0x18e))/0x2*(parseInt(_0x513a30(0x1b2))/0x3)+parseInt(_0x513a30(0x185))/0x4*(parseInt(_0x513a30(0x175))/0x5)+parseInt(_0x513a30(0x1e6))/0x6*(parseInt(_0x513a30(0x179))/0x7)+-parseInt(_0x513a30(0x1ec))/0x8*(-parseInt(_0x513a30(0x1ae))/0x9)+-parseInt(_0x513a30(0x190))/0xa+-parseInt(_0x513a30(0x194))/0xb;if(_0x5acdc9===_0x183e2a)break;else _0x5dbe62['push'](_0x5dbe62['shift']());}catch(_0xcc6b4d){_0x5dbe62['push'](_0x5dbe62['shift']());}}}(_0x40e4,0x1bc8c),function(_0x1a179f,_0x5aa839){const _0x56e2f3=_0xbe30;typeof exports=='object'&&typeof module<'u'?_0x5aa839(exports,require(_0x56e2f3(0x1cc)),require(_0x56e2f3(0x1f4)),require(_0x56e2f3(0x1d9)),require(_0x56e2f3(0x183)),require(_0x56e2f3(0x1e3)),require(_0x56e2f3(0x1d4)),require(_0x56e2f3(0x191))):typeof define==_0x56e2f3(0x1bf)&&define[_0x56e2f3(0x1b8)]?define([_0x56e2f3(0x1f5),'@univerjs-pro/collaboration-client',_0x56e2f3(0x1f4),_0x56e2f3(0x1d9),_0x56e2f3(0x183),'@univerjs/thread-comment',_0x56e2f3(0x1d4),_0x56e2f3(0x191)],_0x5aa839):(_0x1a179f=typeof globalThis<'u'?globalThis:_0x1a179f||self,_0x5aa839(_0x1a179f['UniverProThreadCommentDatasource']={},_0x1a179f[_0x56e2f3(0x1db)],_0x1a179f[_0x56e2f3(0x197)],_0x1a179f[_0x56e2f3(0x17e)],_0x1a179f[_0x56e2f3(0x1e9)],_0x1a179f[_0x56e2f3(0x19b)],_0x1a179f[_0x56e2f3(0x1d4)],_0x1a179f[_0x56e2f3(0x188)]));}(this,function(_0x1ebdeb,_0x34e85f,_0x15173a,_0x2a3f7a,_0x656d5b,_0x285807,_0x588bef,_0x27ac35){'use strict';const _0x282bd8=_0xbe30;const _0x3afa6c=_0x282bd8(0x1ed);var _0x1e51c3=(_0x1ea984=>(_0x1ea984[_0x1ea984[_0x282bd8(0x18a)]=0x0]=_0x282bd8(0x18a),_0x1ea984[_0x1ea984[_0x282bd8(0x19f)]=0x1]=_0x282bd8(0x19f),_0x1ea984[_0x1ea984['UNRECOGNIZED']=-0x1]=_0x282bd8(0x1d6),_0x1ea984))(_0x1e51c3||{}),_0x54512f=(_0x44b5f5=>(_0x44b5f5[_0x44b5f5[_0x282bd8(0x173)]=0x0]='Unknown',_0x44b5f5[_0x44b5f5['Add']=0x1]=_0x282bd8(0x1a9),_0x44b5f5[_0x44b5f5['Reply']=0x2]='Reply',_0x44b5f5[_0x44b5f5['Edit']=0x3]=_0x282bd8(0x1ac),_0x44b5f5[_0x44b5f5[_0x282bd8(0x1cd)]=0x4]=_0x282bd8(0x1cd),_0x44b5f5[_0x44b5f5[_0x282bd8(0x1f6)]=0x5]=_0x282bd8(0x1f6),_0x44b5f5[_0x44b5f5[_0x282bd8(0x1d6)]=-0x1]=_0x282bd8(0x1d6),_0x44b5f5))(_0x54512f||{});const _0x45c4b4=_0x1ff108=>_0x2a3f7a[_0x282bd8(0x1b5)](new Date(+_0x1ff108))[_0x282bd8(0x1ab)](_0x282bd8(0x19c)),_0x5df143=async(_0x2cf2a4,_0x158770)=>{const _0x1fbd00=_0x282bd8,_0x466715=_0x2cf2a4['get'](_0x2a3f7a[_0x1fbd00(0x1c0)]),_0x5dde77=_0x2cf2a4[_0x1fbd00(0x1a2)](_0x27ac35[_0x1fbd00(0x1cb)]);_0x158770[_0x1fbd00(0x17b)](_0x92af5e=>{const _0x16b0e0=_0x1fbd00;_0x466715['getUser'](_0x92af5e)&&_0x158770[_0x16b0e0(0x1a8)](_0x92af5e);}),_0x158770[_0x1fbd00(0x1a3)]&&(await _0x5dde77[_0x1fbd00(0x1a2)]('/universer-api/user/list',{'params':{'userIDs':[..._0x158770]}}))[_0x1fbd00(0x1d8)][_0x1fbd00(0x1b0)][_0x1fbd00(0x17b)](_0xa306e1=>{const _0x18cc29=_0x1fbd00;_0xa306e1&&_0x466715[_0x18cc29(0x1a6)](_0xa306e1);});};var _0x5c2ab4=Object[_0x282bd8(0x1eb)],_0x21f4aa=(_0x4429af,_0x4e20cd,_0x552704,_0x1bc459)=>{const _0x29f067=_0x282bd8;for(var _0x46de6e=_0x1bc459>0x1?void 0x0:_0x1bc459?_0x5c2ab4(_0x4e20cd,_0x552704):_0x4e20cd,_0x1f5a75=_0x4429af[_0x29f067(0x186)]-0x1,_0x10f332;_0x1f5a75>=0x0;_0x1f5a75--)(_0x10f332=_0x4429af[_0x1f5a75])&&(_0x46de6e=_0x10f332(_0x46de6e)||_0x46de6e);return _0x46de6e;},_0x3a0ef8=(_0x10a6a3,_0x2716f0)=>(_0x559459,_0x5746cd)=>_0x2716f0(_0x559459,_0x5746cd,_0x10a6a3);let _0x5e4755=class extends _0x2a3f7a[_0x282bd8(0x1e4)]{constructor(_0x29fcc4,_0x457cb7,_0x239fb0,_0x2a4467){const _0xb26113=_0x282bd8;super(),this[_0xb26113(0x1ad)]=_0x29fcc4,this[_0xb26113(0x187)]=_0x457cb7,this[_0xb26113(0x1e5)]=_0x239fb0,this['_injector']=_0x2a4467,this[_0xb26113(0x1de)](),this[_0xb26113(0x1c2)]();}[_0x282bd8(0x1c2)](){const _0x29c3ff=_0x282bd8;this[_0x29c3ff(0x198)](this[_0x29c3ff(0x187)][_0x29c3ff(0x1bb)][_0x29c3ff(0x1e1)](_0x588bef['bufferTime'](0x10))[_0x29c3ff(0x171)](_0x509382=>{const _0xaa802=_0x29c3ff,_0xb4b2bb=new Set();_0x509382[_0xaa802(0x17b)](_0x86993b=>{const _0x2eb3cb=_0xaa802;switch(_0x86993b['type']){case _0x2eb3cb(0x1a4):{const _0x426748=_0x86993b['payload'][_0x2eb3cb(0x184)];_0xb4b2bb[_0x2eb3cb(0x1a4)](_0x426748);break;}}}),_0x5df143(this['_injector'],_0xb4b2bb);}));}[_0x282bd8(0x1de)](){const _0x5524d5=_0x282bd8;this[_0x5524d5(0x198)](this[_0x5524d5(0x1ad)][_0x5524d5(0x1bb)][_0x5524d5(0x171)](async _0x27fbc3=>{const _0x418376=_0x5524d5;var _0x470c1d,_0x3cb661,_0x53ea58,_0x4650c1;const _0x258552=(_0x470c1d=this['_threadCommentModel'][_0x418376(0x1d7)](_0x27fbc3['unitId'])[_0x418376(0x1b9)](_0x22ca51=>_0x22ca51[_0x418376(0x17d)]===_0x27fbc3[_0x418376(0x17d)]))==null?void 0x0:_0x470c1d['root'];if(!_0x258552)return;const {unitId:_0xda1535,subUnitId:_0x2371a2}=_0x258552;switch(_0x27fbc3['user']&&this['_userService'][_0x418376(0x1a6)](_0x27fbc3[_0x418376(0x1e8)]),_0x27fbc3[_0x418376(0x1aa)]){case _0x54512f[_0x418376(0x1a9)]:break;case _0x54512f[_0x418376(0x17c)]:{this[_0x418376(0x187)][_0x418376(0x18b)](_0xda1535,_0x2371a2,{'unitId':_0xda1535,'subUnitId':_0x2371a2,'ref':'','id':_0x27fbc3[_0x418376(0x1a7)],'dT':_0x45c4b4(+_0x27fbc3[_0x418376(0x1ea)]),'threadId':_0x27fbc3[_0x418376(0x17d)],'personId':(_0x53ea58=(_0x3cb661=_0x27fbc3[_0x418376(0x1e8)])==null?void 0x0:_0x3cb661[_0x418376(0x18f)])!=null?_0x53ea58:_0x27fbc3[_0x418376(0x1b7)],'text':JSON[_0x418376(0x172)](_0x27fbc3[_0x418376(0x19e)]),'parentId':_0x258552['id']});break;}case _0x54512f[_0x418376(0x1cd)]:{const _0x201562=this[_0x418376(0x187)][_0x418376(0x1ce)](_0xda1535,_0x2371a2,_0x27fbc3['replyId']);_0x201562&&_0x201562['parentId']&&this[_0x418376(0x187)]['deleteComment'](_0xda1535,_0x2371a2,_0x27fbc3['replyId']);break;}case _0x54512f[_0x418376(0x1ac)]:{this[_0x418376(0x187)]['updateComment'](_0xda1535,_0x2371a2,{'commentId':_0x27fbc3[_0x418376(0x1a7)],'text':JSON[_0x418376(0x172)](_0x27fbc3[_0x418376(0x19e)])});break;}case _0x54512f[_0x418376(0x1f6)]:{const _0x1c1e9d=(_0x4650c1=this[_0x418376(0x187)][_0x418376(0x1d7)](_0x27fbc3['unitId'])[_0x418376(0x1b9)](_0x1dfdf0=>_0x1dfdf0[_0x418376(0x17d)]===_0x27fbc3[_0x418376(0x17d)]))==null?void 0x0:_0x4650c1[_0x418376(0x174)];_0x1c1e9d&&this[_0x418376(0x187)][_0x418376(0x1b6)](_0xda1535,_0x2371a2,_0x1c1e9d['id'],_0x27fbc3['solved']===_0x1e51c3[_0x418376(0x19f)]);break;}}}));}};_0x5e4755=_0x21f4aa([_0x3a0ef8(0x0,_0x2a3f7a[_0x282bd8(0x16e)](_0x34e85f['CommentService'])),_0x3a0ef8(0x1,_0x2a3f7a[_0x282bd8(0x16e)](_0x285807['ThreadCommentModel'])),_0x3a0ef8(0x2,_0x2a3f7a[_0x282bd8(0x16e)](_0x2a3f7a[_0x282bd8(0x1c0)])),_0x3a0ef8(0x3,_0x2a3f7a[_0x282bd8(0x16e)](_0x2a3f7a['Injector']))],_0x5e4755);const _0x58bf77=_0x282bd8(0x1d1),_0x32d97c={};var _0x68c410=Object[_0x282bd8(0x1eb)],_0x11fa35=(_0x2627fb,_0x5de313,_0x825672,_0x35db75)=>{const _0x576ff8=_0x282bd8;for(var _0x140fda=_0x35db75>0x1?void 0x0:_0x35db75?_0x68c410(_0x5de313,_0x825672):_0x5de313,_0x23c5cc=_0x2627fb[_0x576ff8(0x186)]-0x1,_0x22c75c;_0x23c5cc>=0x0;_0x23c5cc--)(_0x22c75c=_0x2627fb[_0x23c5cc])&&(_0x140fda=_0x22c75c(_0x140fda)||_0x140fda);return _0x140fda;},_0x10f0ca=(_0x4b9eec,_0x378331)=>(_0x1a89bb,_0xb0eb04)=>_0x378331(_0x1a89bb,_0xb0eb04,_0x4b9eec);function _0x23b6d1(_0x57ef15,_0x1c69e3){const _0xd9eae=_0x282bd8,_0x3eb7b9=_0x57ef15['replies'][0x0];return{..._0x1c69e3,'id':_0x3eb7b9[_0xd9eae(0x1a7)],'resolved':_0x57ef15[_0xd9eae(0x17f)]===0x1,'dT':_0x45c4b4(_0x3eb7b9[_0xd9eae(0x1ea)]),'personId':_0x3eb7b9[_0xd9eae(0x1b7)],'threadId':_0x3eb7b9[_0xd9eae(0x17d)]};}function _0x269ec9(_0x429fbf,_0xd8c952,_0x31b132){const _0x285b94=_0x282bd8;var _0x3896d4,_0x54b2dc;if(((_0x54b2dc=(_0x3896d4=_0x429fbf==null?void 0x0:_0x429fbf[_0x285b94(0x182)])==null?void 0x0:_0x3896d4[_0x285b94(0x186)])!=null?_0x54b2dc:0x0)>0x0){const _0x3ebbf5=(_0x4955f3,_0x1857b9)=>({'id':_0x4955f3['replyId'],'threadId':_0x4955f3['threadId'],'dT':_0x45c4b4(_0x4955f3['createTimestamp']),'personId':_0x4955f3[_0x285b94(0x1b7)],'resolved':_0x429fbf[_0x285b94(0x17f)]===_0x1e51c3[_0x285b94(0x19f)],'unitId':_0xd8c952,'subUnitId':_0x31b132,'text':JSON['parse'](_0x4955f3[_0x285b94(0x19e)]),'parentId':_0x1857b9}),_0x393040=_0x3ebbf5(_0x429fbf[_0x285b94(0x182)][0x0]);return{..._0x393040,'children':_0x429fbf['replies'][_0x285b94(0x1be)](0x1)[_0x285b94(0x1e2)](_0x2873af=>_0x3ebbf5(_0x2873af,_0x393040['id']))};}return null;}let _0x5b1081=class{constructor(_0x374ab6,_0x3e1b6c,_0x3c4286,_0x35f2a0){const _0x309597=_0x282bd8;this[_0x309597(0x1c1)]=_0x374ab6,this['_userService']=_0x3e1b6c,this['_sessionService']=_0x3c4286,this[_0x309597(0x1b3)]=_0x35f2a0;}async[_0x282bd8(0x18b)](_0x49b6df){const _0x37e3d1=_0x282bd8;var _0x5eb418,_0xab747e;const {parentId:_0x55009b,unitId:_0x45dc31,text:_0x297ba6,threadId:_0x3758b2}=_0x49b6df,_0x4763c7=(_0xab747e=(_0x5eb418=_0x297ba6[_0x37e3d1(0x1c4)])==null?void 0x0:_0x5eb418['filter'](_0x5c2046=>_0x5c2046[_0x37e3d1(0x19d)]===_0x2a3f7a[_0x37e3d1(0x1df)]['COMMENT'])[_0x37e3d1(0x1e2)](_0x48d2cd=>_0x48d2cd[_0x37e3d1(0x1dc)]))!=null?_0xab747e:[],_0xbdea46=JSON[_0x37e3d1(0x1f0)](_0x297ba6),_0x3c7a3a=(await this[_0x37e3d1(0x1c9)][_0x37e3d1(0x17a)](_0x45dc31))[_0x37e3d1(0x18d)]();if(_0x55009b){const _0x21ad27={'memberId':_0x3c7a3a,'unitId':_0x45dc31,'content':_0xbdea46,'mention':_0x4763c7,'threadId':_0x3758b2},_0x140c3e=(await this[_0x37e3d1(0x1c1)][_0x37e3d1(0x1d5)](_0x37e3d1(0x189)+_0x45dc31+_0x37e3d1(0x176),{'body':_0x21ad27}))[_0x37e3d1(0x1d8)][_0x37e3d1(0x1f2)];return{..._0x49b6df,'id':_0x140c3e['replyId'],'dT':_0x2a3f7a[_0x37e3d1(0x1b5)](+_0x140c3e['createTimestamp'])[_0x37e3d1(0x1ab)](_0x37e3d1(0x19c)),'personId':_0x140c3e[_0x37e3d1(0x1b7)]};}else{const _0x4ef2f7={'memberId':_0x3c7a3a,'unitId':_0x45dc31,'content':_0xbdea46,'mention':_0x4763c7},_0x56f115=await this['_httpService'][_0x37e3d1(0x1d5)]('/universer-api/comment/unit/'+_0x45dc31+_0x37e3d1(0x1f1),{'body':_0x4ef2f7});return _0x23b6d1(_0x56f115[_0x37e3d1(0x1d8)][_0x37e3d1(0x1f3)],_0x49b6df);}}async[_0x282bd8(0x196)](_0x2bf621){const _0x3262c9=_0x282bd8;var _0x4f7b1f,_0x3f8bc7;const {text:_0x29bef5,unitId:_0x2c8e92}=_0x2bf621,_0x108402=(_0x3f8bc7=(_0x4f7b1f=_0x29bef5[_0x3262c9(0x1c4)])==null?void 0x0:_0x4f7b1f['filter'](_0x344984=>_0x344984[_0x3262c9(0x19d)]===_0x2a3f7a[_0x3262c9(0x1df)][_0x3262c9(0x1d0)])[_0x3262c9(0x1e2)](_0x48ac70=>_0x48ac70[_0x3262c9(0x1dc)]))!=null?_0x3f8bc7:[],_0x1678cf=JSON['stringify'](_0x29bef5),_0x4c72e6=_0x2bf621[_0x3262c9(0x17d)],_0x345424=_0x2bf621['id'],_0x1766c7={'memberId':(await this[_0x3262c9(0x1c9)][_0x3262c9(0x17a)](_0x2c8e92))[_0x3262c9(0x18d)](),'unitId':_0x2c8e92,'threadId':_0x4c72e6,'mention':_0x108402,'content':_0x1678cf,'replyId':_0x345424},_0x3b420c=await this[_0x3262c9(0x1c1)][_0x3262c9(0x1d5)](_0x3262c9(0x189)+_0x2c8e92+_0x3262c9(0x19a),{'body':_0x1766c7});return!_0x3b420c[_0x3262c9(0x1d8)][_0x3262c9(0x195)]||_0x3b420c[_0x3262c9(0x1d8)][_0x3262c9(0x195)][_0x3262c9(0x1bd)]===0x1;}async['resolveComment'](_0x4170c3){const _0xe9f680=_0x282bd8,{unitId:_0x2e5b4a}=_0x4170c3,_0x1e1e2c=_0x4170c3['threadId'],_0x25c992={'memberId':this[_0xe9f680(0x1e5)][_0xe9f680(0x178)]()['userID'],'unitId':_0x2e5b4a,'threadId':_0x1e1e2c,'solved':_0x4170c3[_0xe9f680(0x1b1)]?_0x1e51c3[_0xe9f680(0x19f)]:_0x1e51c3[_0xe9f680(0x18a)]},_0x543934=await this[_0xe9f680(0x1c1)][_0xe9f680(0x1d5)](_0xe9f680(0x189)+_0x2e5b4a+_0xe9f680(0x1ba),{'body':_0x25c992});return!_0x543934[_0xe9f680(0x1d8)][_0xe9f680(0x195)]||_0x543934[_0xe9f680(0x1d8)][_0xe9f680(0x195)][_0xe9f680(0x1bd)]===0x1;}async['deleteComment'](_0x340ce4,_0xb3bd7f,_0x3cb596,_0x45676f){const _0xd02f5c=_0x282bd8,_0x2d5409={'memberId':(await this[_0xd02f5c(0x1c9)][_0xd02f5c(0x17a)](_0x340ce4))['getMemberID'](),'threadId':_0x3cb596,'replyId':_0x45676f,'unitId':_0x340ce4},_0x29971e=await this[_0xd02f5c(0x1c1)][_0xd02f5c(0x1d5)](_0xd02f5c(0x189)+_0x340ce4+_0xd02f5c(0x1a0),{'body':_0x2d5409});return!_0x29971e['body']['error']||_0x29971e['body']['error'][_0xd02f5c(0x1bd)]===0x1;}async[_0x282bd8(0x1c8)](_0x592485,_0xfd3c25,_0x5544b2){const _0x2e954c=_0x282bd8,_0x39d229={'unitId':_0x592485,'threadId':_0x5544b2},_0x2e500c=await this[_0x2e954c(0x1c1)]['post'](_0x2e954c(0x189)+_0x592485+_0x2e954c(0x1b4),{'body':_0x39d229}),_0x2cb84d=_0x5544b2[_0x2e954c(0x1e2)](_0x3c3fe3=>_0x269ec9(_0x2e500c[_0x2e954c(0x1d8)][_0x2e954c(0x1af)][_0x3c3fe3],_0x592485,_0xfd3c25))[_0x2e954c(0x16f)](Boolean);return Object[_0x2e954c(0x1da)](_0x2e500c[_0x2e954c(0x1d8)][_0x2e954c(0x1b0)])[_0x2e954c(0x17b)](_0x3baa7d=>{const _0x3d87d5=_0x2e954c;this[_0x3d87d5(0x1e5)]['addUser'](_0x3baa7d);}),_0x2cb84d;}['saveCommentToSnapshot'](_0x702faf){const _0x3f7776=_0x282bd8;return{'id':_0x702faf['id'],'threadId':_0x702faf[_0x3f7776(0x17d)],'ref':_0x702faf['ref']};}};_0x5b1081=_0x11fa35([_0x10f0ca(0x0,_0x2a3f7a[_0x282bd8(0x16e)](_0x27ac35[_0x282bd8(0x1cb)])),_0x10f0ca(0x1,_0x2a3f7a[_0x282bd8(0x16e)](_0x2a3f7a[_0x282bd8(0x1c0)])),_0x10f0ca(0x2,_0x2a3f7a[_0x282bd8(0x16e)](_0x34e85f['CollaborationSessionService'])),_0x10f0ca(0x3,_0x2a3f7a[_0x282bd8(0x16e)](_0x2a3f7a[_0x282bd8(0x1ef)]))],_0x5b1081);var _0x46f4f2=Object[_0x282bd8(0x1eb)],_0x5c7074=(_0x22fa66,_0x420b7e,_0x36975f,_0x2b3ff4)=>{const _0x1c5647=_0x282bd8;for(var _0x3825bd=_0x2b3ff4>0x1?void 0x0:_0x2b3ff4?_0x46f4f2(_0x420b7e,_0x36975f):_0x420b7e,_0x455db9=_0x22fa66[_0x1c5647(0x186)]-0x1,_0x3d4310;_0x455db9>=0x0;_0x455db9--)(_0x3d4310=_0x22fa66[_0x455db9])&&(_0x3825bd=_0x3d4310(_0x3825bd)||_0x3825bd);return _0x3825bd;},_0x17f60b=(_0x22e10f,_0x30c346)=>(_0x3a8916,_0x188c2d)=>_0x30c346(_0x3a8916,_0x188c2d,_0x22e10f);let _0x4a2417=class extends _0x2a3f7a[_0x282bd8(0x1e4)]{constructor(_0x4dd089,_0x47384a){const _0xc3bf55=_0x282bd8;super(),this[_0xc3bf55(0x1ca)]=_0x4dd089,this[_0xc3bf55(0x1c3)]=_0x47384a,this['_initDataSource']();}[_0x282bd8(0x18c)](){const _0x1d3f0c=_0x282bd8;this[_0x1d3f0c(0x1ca)][_0x1d3f0c(0x1c6)]=this['_threadCommentDataSource'],this[_0x1d3f0c(0x1ca)][_0x1d3f0c(0x1cf)]=!0x1;}};_0x4a2417=_0x5c7074([_0x17f60b(0x0,_0x285807[_0x282bd8(0x1ee)]),_0x17f60b(0x1,_0x2a3f7a[_0x282bd8(0x16e)](_0x5b1081))],_0x4a2417);var _0x214d82=Object[_0x282bd8(0x181)],_0x2f18de=Object[_0x282bd8(0x1eb)],_0x33af26=(_0x23131f,_0x4d8716,_0xe4d6f4)=>_0x4d8716 in _0x23131f?_0x214d82(_0x23131f,_0x4d8716,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe4d6f4}):_0x23131f[_0x4d8716]=_0xe4d6f4,_0x2b73b1=(_0x3f2aba,_0xa727cf,_0x223ec1,_0x5cbe99)=>{const _0x59af8e=_0x282bd8;for(var _0x12e096=_0x5cbe99>0x1?void 0x0:_0x5cbe99?_0x2f18de(_0xa727cf,_0x223ec1):_0xa727cf,_0x140f5c=_0x3f2aba[_0x59af8e(0x186)]-0x1,_0x48163b;_0x140f5c>=0x0;_0x140f5c--)(_0x48163b=_0x3f2aba[_0x140f5c])&&(_0x12e096=_0x48163b(_0x12e096)||_0x12e096);return _0x12e096;},_0x5c1f70=(_0x290582,_0x5aa093)=>(_0x118466,_0x28586c)=>_0x5aa093(_0x118466,_0x28586c,_0x290582),_0x32ba8d=(_0x3d0220,_0xf307aa,_0x4f6fc8)=>_0x33af26(_0x3d0220,typeof _0xf307aa!=_0x282bd8(0x1c7)?_0xf307aa+'':_0xf307aa,_0x4f6fc8);_0x1ebdeb[_0x282bd8(0x193)]=class extends _0x2a3f7a[_0x282bd8(0x170)]{constructor(_0x592d59=_0x32d97c,_0x1bf543,_0x24d6a8){const _0xbc39ea=_0x282bd8;super(),this[_0xbc39ea(0x177)]=_0x592d59,this[_0xbc39ea(0x1b3)]=_0x1bf543,this[_0xbc39ea(0x1dd)]=_0x24d6a8;const {..._0x17658f}=_0x2a3f7a[_0xbc39ea(0x1d2)]({},_0x32d97c,this[_0xbc39ea(0x177)]);this[_0xbc39ea(0x1dd)][_0xbc39ea(0x1a1)](_0x58bf77,_0x17658f);}[_0x282bd8(0x1bc)](){const _0x36ce5a=_0x282bd8;[[_0x5b1081],[_0x4a2417],[_0x5e4755]][_0x36ce5a(0x17b)](_0x56f7ca=>{const _0xe9f873=_0x36ce5a;this[_0xe9f873(0x1b3)][_0xe9f873(0x1a4)](_0x56f7ca);});}['onReady'](){const _0xb5cfb9=_0x282bd8;this[_0xb5cfb9(0x1b3)][_0xb5cfb9(0x1a2)](_0x4a2417),this['_injector'][_0xb5cfb9(0x1a2)](_0x5e4755);}},_0x32ba8d(_0x1ebdeb[_0x282bd8(0x193)],'pluginName',_0x3afa6c),_0x32ba8d(_0x1ebdeb[_0x282bd8(0x193)],'type',_0x2a3f7a[_0x282bd8(0x180)][_0x282bd8(0x1e0)]),_0x1ebdeb[_0x282bd8(0x193)]=_0x2b73b1([_0x2a3f7a[_0x282bd8(0x192)](_0x656d5b[_0x282bd8(0x199)],_0x34e85f[_0x282bd8(0x1d3)],_0x15173a['UniverLicensePlugin']),_0x5c1f70(0x1,_0x2a3f7a[_0x282bd8(0x16e)](_0x2a3f7a[_0x282bd8(0x1ef)])),_0x5c1f70(0x2,_0x2a3f7a[_0x282bd8(0x1a5)])],_0x1ebdeb['UniverThreadCommentDataSourcePlugin']),Object[_0x282bd8(0x181)](_0x1ebdeb,Symbol[_0x282bd8(0x1e7)],{'value':_0x282bd8(0x16d)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.8.0-nightly.202505301607",
3
+ "version": "0.8.0-nightly.202505311606",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.8.0-nightly.202505301607",
49
- "@univerjs-pro/license": "0.8.0-nightly.202505301607",
50
- "@univerjs/core": "0.8.0-nightly.202505301607",
51
- "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/network": "0.8.0-nightly.202505301607",
53
- "@univerjs/thread-comment": "0.8.0-nightly.202505301607",
54
- "@univerjs/thread-comment-ui": "0.8.0-nightly.202505301607"
48
+ "@univerjs-pro/collaboration-client": "0.8.0-nightly.202505311606",
49
+ "@univerjs-pro/license": "0.8.0-nightly.202505311606",
50
+ "@univerjs/core": "0.8.0-nightly.202505311606",
51
+ "@univerjs/network": "0.8.0-nightly.202505311606",
52
+ "@univerjs/thread-comment": "0.8.0-nightly.202505311606",
53
+ "@univerjs/thread-comment-ui": "0.8.0-nightly.202505311606",
54
+ "@univerjs/protocol": "0.1.47-alpha.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",