@univerjs-pro/thread-comment-datasource 0.6.10-nightly.202504181606 → 0.6.10-nightly.202504201606

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 _0x388aec=_0x3e84;(function(_0x114cc8,_0xc8c4f7){const _0x533e00=_0x3e84,_0x3eae97=_0x114cc8();while(!![]){try{const _0x55b011=parseInt(_0x533e00(0x1b3))/0x1*(parseInt(_0x533e00(0x16f))/0x2)+-parseInt(_0x533e00(0x15e))/0x3*(-parseInt(_0x533e00(0x193))/0x4)+-parseInt(_0x533e00(0x168))/0x5+parseInt(_0x533e00(0x194))/0x6+-parseInt(_0x533e00(0x18a))/0x7+parseInt(_0x533e00(0x1a9))/0x8*(parseInt(_0x533e00(0x17b))/0x9)+-parseInt(_0x533e00(0x16e))/0xa;if(_0x55b011===_0xc8c4f7)break;else _0x3eae97['push'](_0x3eae97['shift']());}catch(_0x30b7c1){_0x3eae97['push'](_0x3eae97['shift']());}}}(_0x5285,0xf042c));Object[_0x388aec(0x173)](exports,Symbol[_0x388aec(0x16a)],{'value':_0x388aec(0x13e)});const b=require(_0x388aec(0x172)),T=require('@univerjs-pro/license'),c=require(_0x388aec(0x1ad)),j=require(_0x388aec(0x1ba)),M=require(_0x388aec(0x1a8)),w=require(_0x388aec(0x19c)),P=require(_0x388aec(0x197)),U=_0x388aec(0x148);var I=(_0x2c4b32=>(_0x2c4b32[_0x2c4b32['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2c4b32[_0x2c4b32[_0x388aec(0x147)]=0x1]=_0x388aec(0x147),_0x2c4b32[_0x2c4b32['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2c4b32))(I||{}),v=(_0x4ca27f=>(_0x4ca27f[_0x4ca27f['Unknown']=0x0]='Unknown',_0x4ca27f[_0x4ca27f[_0x388aec(0x161)]=0x1]='Add',_0x4ca27f[_0x4ca27f[_0x388aec(0x1b6)]=0x2]=_0x388aec(0x1b6),_0x4ca27f[_0x4ca27f[_0x388aec(0x1af)]=0x3]=_0x388aec(0x1af),_0x4ca27f[_0x4ca27f[_0x388aec(0x184)]=0x4]=_0x388aec(0x184),_0x4ca27f[_0x4ca27f[_0x388aec(0x189)]=0x5]=_0x388aec(0x189),_0x4ca27f[_0x4ca27f[_0x388aec(0x1b9)]=-0x1]=_0x388aec(0x1b9),_0x4ca27f))(v||{});const f=_0x1304ca=>c['dayjs'](new Date(+_0x1304ca))[_0x388aec(0x13f)](_0x388aec(0x158)),R=async(_0x6d2d23,_0x4975cb)=>{const _0x59bbad=_0x388aec,_0x228f75=_0x6d2d23[_0x59bbad(0x1aa)](c[_0x59bbad(0x178)]),_0xac6127=_0x6d2d23['get'](P[_0x59bbad(0x1b5)]);_0x4975cb[_0x59bbad(0x14a)](_0x449dcd=>{const _0x291c08=_0x59bbad;_0x228f75[_0x291c08(0x195)](_0x449dcd)&&_0x4975cb[_0x291c08(0x171)](_0x449dcd);}),_0x4975cb[_0x59bbad(0x18d)]&&(await _0xac6127[_0x59bbad(0x1aa)](_0x59bbad(0x16b),{'params':{'userIDs':[..._0x4975cb]}}))[_0x59bbad(0x192)][_0x59bbad(0x196)]['forEach'](_0x444b4a=>{const _0x281ee4=_0x59bbad;_0x444b4a&&_0x228f75[_0x281ee4(0x19f)](_0x444b4a);});};var $=Object[_0x388aec(0x1a5)],E=(_0x45c239,_0x4d1bc3,_0x552aad,_0x2b0cf8)=>{const _0x4fea2c=_0x388aec;for(var _0x296acf=_0x2b0cf8>0x1?void 0x0:_0x2b0cf8?$(_0x4d1bc3,_0x552aad):_0x4d1bc3,_0x357276=_0x45c239[_0x4fea2c(0x19a)]-0x1,_0x41befa;_0x357276>=0x0;_0x357276--)(_0x41befa=_0x45c239[_0x357276])&&(_0x296acf=_0x41befa(_0x296acf)||_0x296acf);return _0x296acf;},S=(_0x39d99a,_0x27ff11)=>(_0x2bd6ac,_0x4f51e1)=>_0x27ff11(_0x2bd6ac,_0x4f51e1,_0x39d99a);let p=class extends c[_0x388aec(0x154)]{constructor(_0x4a49bc,_0x3f72fc,_0x379876,_0x20a011){const _0x443840=_0x388aec;super(),this[_0x443840(0x198)]=_0x4a49bc,this[_0x443840(0x13c)]=_0x3f72fc,this[_0x443840(0x15d)]=_0x379876,this['_injector']=_0x20a011,this[_0x443840(0x1b1)](),this[_0x443840(0x19b)]();}[_0x388aec(0x19b)](){const _0x5ab1ed=_0x388aec;this[_0x5ab1ed(0x185)](this[_0x5ab1ed(0x13c)][_0x5ab1ed(0x146)][_0x5ab1ed(0x155)](w[_0x5ab1ed(0x165)](0x10))[_0x5ab1ed(0x14b)](_0x6ce85d=>{const _0x5cd3dc=new Set();_0x6ce85d['forEach'](_0x3c0804=>{const _0x233ca4=_0x3e84;switch(_0x3c0804['type']){case _0x233ca4(0x169):{const _0x987780=_0x3c0804[_0x233ca4(0x160)][_0x233ca4(0x15a)];_0x5cd3dc[_0x233ca4(0x169)](_0x987780);break;}}}),R(this['_injector'],_0x5cd3dc);}));}[_0x388aec(0x1b1)](){const _0x166ab1=_0x388aec;this['disposeWithMe'](this[_0x166ab1(0x198)][_0x166ab1(0x146)][_0x166ab1(0x14b)](async _0x50df74=>{const _0x493a1e=_0x166ab1;var _0x58e99d,_0x4501e7,_0x332815,_0x5de7a2;const _0x36d99b=(_0x58e99d=this['_threadCommentModel']['getUnit'](_0x50df74[_0x493a1e(0x18c)])['find'](_0x2c4aa6=>_0x2c4aa6['threadId']===_0x50df74['threadId']))==null?void 0x0:_0x58e99d['root'];if(!_0x36d99b)return;const {unitId:_0x32b90d,subUnitId:_0x59e12f}=_0x36d99b;switch(_0x50df74[_0x493a1e(0x1a1)]&&this[_0x493a1e(0x15d)][_0x493a1e(0x19f)](_0x50df74[_0x493a1e(0x1a1)]),_0x50df74['type']){case v[_0x493a1e(0x161)]:break;case v['Reply']:{this[_0x493a1e(0x13c)][_0x493a1e(0x164)](_0x32b90d,_0x59e12f,{'unitId':_0x32b90d,'subUnitId':_0x59e12f,'ref':'','id':_0x50df74[_0x493a1e(0x139)],'dT':f(+_0x50df74[_0x493a1e(0x17f)]),'threadId':_0x50df74[_0x493a1e(0x162)],'personId':(_0x332815=(_0x4501e7=_0x50df74[_0x493a1e(0x1a1)])==null?void 0x0:_0x4501e7[_0x493a1e(0x17c)])!=null?_0x332815:_0x50df74[_0x493a1e(0x1b0)],'text':JSON[_0x493a1e(0x14e)](_0x50df74[_0x493a1e(0x149)]),'parentId':_0x36d99b['id']});break;}case v['Delete']:{const _0x116e87=this[_0x493a1e(0x13c)][_0x493a1e(0x18b)](_0x32b90d,_0x59e12f,_0x50df74[_0x493a1e(0x139)]);_0x116e87&&_0x116e87['parentId']&&this[_0x493a1e(0x13c)]['deleteComment'](_0x32b90d,_0x59e12f,_0x50df74[_0x493a1e(0x139)]);break;}case v['Edit']:{this[_0x493a1e(0x13c)]['updateComment'](_0x32b90d,_0x59e12f,{'commentId':_0x50df74[_0x493a1e(0x139)],'text':JSON[_0x493a1e(0x14e)](_0x50df74[_0x493a1e(0x149)])});break;}case v[_0x493a1e(0x189)]:{const _0x435044=(_0x5de7a2=this[_0x493a1e(0x13c)][_0x493a1e(0x186)](_0x50df74['unitId'])['find'](_0x45b6f9=>_0x45b6f9[_0x493a1e(0x162)]===_0x50df74[_0x493a1e(0x162)]))==null?void 0x0:_0x5de7a2['root'];_0x435044&&this[_0x493a1e(0x13c)][_0x493a1e(0x1a3)](_0x32b90d,_0x59e12f,_0x435044['id'],_0x50df74['solved']===I[_0x493a1e(0x147)]);break;}}}));}};p=E([S(0x0,c[_0x388aec(0x19e)](b[_0x388aec(0x166)])),S(0x1,c[_0x388aec(0x19e)](M['ThreadCommentModel'])),S(0x2,c[_0x388aec(0x19e)](c[_0x388aec(0x178)])),S(0x3,c[_0x388aec(0x19e)](c[_0x388aec(0x140)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x388aec(0x1a5)],x=(_0x15f0d5,_0xa98014,_0x330a1b,_0x7445e)=>{for(var _0x18e188=_0x7445e>0x1?void 0x0:_0x7445e?A(_0xa98014,_0x330a1b):_0xa98014,_0x91e0ce=_0x15f0d5['length']-0x1,_0x15465d;_0x91e0ce>=0x0;_0x91e0ce--)(_0x15465d=_0x15f0d5[_0x91e0ce])&&(_0x18e188=_0x15465d(_0x18e188)||_0x18e188);return _0x18e188;},_=(_0x577213,_0x406217)=>(_0x2806c2,_0x11106b)=>_0x406217(_0x2806c2,_0x11106b,_0x577213);function Y(_0x364dcf,_0xac98c){const _0x1e3fb9=_0x388aec,_0x8d5554=_0x364dcf['replies'][0x0];return{..._0xac98c,'id':_0x8d5554[_0x1e3fb9(0x139)],'resolved':_0x364dcf[_0x1e3fb9(0x1a7)]===0x1,'dT':f(_0x8d5554['createTimestamp']),'personId':_0x8d5554['userId'],'threadId':_0x8d5554[_0x1e3fb9(0x162)]};}function G(_0x1b908d,_0x5c674b,_0x3691c8){const _0x2c94cb=_0x388aec;var _0x1c6cb4,_0x2b9a82;if(((_0x2b9a82=(_0x1c6cb4=_0x1b908d==null?void 0x0:_0x1b908d[_0x2c94cb(0x179)])==null?void 0x0:_0x1c6cb4[_0x2c94cb(0x19a)])!=null?_0x2b9a82:0x0)>0x0){const _0x1253a4=(_0x161ad1,_0x518e59)=>({'id':_0x161ad1['replyId'],'threadId':_0x161ad1[_0x2c94cb(0x162)],'dT':f(_0x161ad1[_0x2c94cb(0x17f)]),'personId':_0x161ad1[_0x2c94cb(0x1b0)],'resolved':_0x1b908d[_0x2c94cb(0x1a7)]===I[_0x2c94cb(0x147)],'unitId':_0x5c674b,'subUnitId':_0x3691c8,'text':JSON['parse'](_0x161ad1['content']),'parentId':_0x518e59}),_0x1ded71=_0x1253a4(_0x1b908d[_0x2c94cb(0x179)][0x0]);return{..._0x1ded71,'children':_0x1b908d[_0x2c94cb(0x179)]['slice'](0x1)[_0x2c94cb(0x188)](_0x35885e=>_0x1253a4(_0x35885e,_0x1ded71['id']))};}return null;}let g=class{constructor(_0xdf16f2,_0x255c3a,_0x571b01,_0x360c31){const _0x289c55=_0x388aec;this[_0x289c55(0x14c)]=_0xdf16f2,this['_userService']=_0x255c3a,this['_sessionService']=_0x571b01,this[_0x289c55(0x167)]=_0x360c31;}async[_0x388aec(0x164)](_0x177223){const _0x47e2a4=_0x388aec;var _0x4e2d54,_0x594c1b;const {parentId:_0xe0661d,unitId:_0x313229,text:_0x2b6deb,threadId:_0x22fdfc}=_0x177223,_0x1a4f6b=(_0x594c1b=(_0x4e2d54=_0x2b6deb[_0x47e2a4(0x1a0)])==null?void 0x0:_0x4e2d54[_0x47e2a4(0x15b)](_0x37e032=>_0x37e032[_0x47e2a4(0x181)]===c[_0x47e2a4(0x1a2)][_0x47e2a4(0x177)])[_0x47e2a4(0x188)](_0x4fd371=>_0x4fd371[_0x47e2a4(0x13b)]))!=null?_0x594c1b:[],_0x3e232b=JSON['stringify'](_0x2b6deb),_0x5c1d73=(await this[_0x47e2a4(0x156)][_0x47e2a4(0x13a)](_0x313229))[_0x47e2a4(0x174)]();if(_0xe0661d){const _0x1cb3bf={'memberId':_0x5c1d73,'unitId':_0x313229,'content':_0x3e232b,'mention':_0x1a4f6b,'threadId':_0x22fdfc},_0x21a3e0=(await this[_0x47e2a4(0x14c)][_0x47e2a4(0x1ac)](_0x47e2a4(0x14d)+_0x313229+_0x47e2a4(0x176),{'body':_0x1cb3bf}))[_0x47e2a4(0x192)][_0x47e2a4(0x18e)];return{..._0x177223,'id':_0x21a3e0['replyId'],'dT':c[_0x47e2a4(0x17d)](+_0x21a3e0[_0x47e2a4(0x17f)])[_0x47e2a4(0x13f)](_0x47e2a4(0x158)),'personId':_0x21a3e0[_0x47e2a4(0x1b0)]};}else{const _0x2f3a43={'memberId':_0x5c1d73,'unitId':_0x313229,'content':_0x3e232b,'mention':_0x1a4f6b},_0x1a8799=await this[_0x47e2a4(0x14c)][_0x47e2a4(0x1ac)](_0x47e2a4(0x14d)+_0x313229+_0x47e2a4(0x18f),{'body':_0x2f3a43});return Y(_0x1a8799[_0x47e2a4(0x192)][_0x47e2a4(0x191)],_0x177223);}}async[_0x388aec(0x183)](_0x25e8e1){const _0x303779=_0x388aec;var _0x531808,_0x516959;const {text:_0x1d39c5,unitId:_0x2ed02f}=_0x25e8e1,_0x475977=(_0x516959=(_0x531808=_0x1d39c5[_0x303779(0x1a0)])==null?void 0x0:_0x531808[_0x303779(0x15b)](_0x1da517=>_0x1da517[_0x303779(0x181)]===c['CustomRangeType'][_0x303779(0x177)])['map'](_0x3a5696=>_0x3a5696[_0x303779(0x13b)]))!=null?_0x516959:[],_0x32f77b=JSON[_0x303779(0x143)](_0x1d39c5),_0x45759e=_0x25e8e1['threadId'],_0xcf2024=_0x25e8e1['id'],_0x3caad5={'memberId':(await this[_0x303779(0x156)]['requireSession'](_0x2ed02f))['getMemberID'](),'unitId':_0x2ed02f,'threadId':_0x45759e,'mention':_0x475977,'content':_0x32f77b,'replyId':_0xcf2024},_0x139ed6=await this[_0x303779(0x14c)][_0x303779(0x1ac)](_0x303779(0x14d)+_0x2ed02f+_0x303779(0x1a6),{'body':_0x3caad5});return!_0x139ed6['body'][_0x303779(0x180)]||_0x139ed6[_0x303779(0x192)][_0x303779(0x180)]['code']===0x1;}async['resolveComment'](_0x2a4bcc){const _0x20b2f9=_0x388aec,{unitId:_0x54b38d}=_0x2a4bcc,_0xe27a7f=_0x2a4bcc[_0x20b2f9(0x162)],_0x343ff9={'memberId':this[_0x20b2f9(0x15d)][_0x20b2f9(0x199)]()[_0x20b2f9(0x17c)],'unitId':_0x54b38d,'threadId':_0xe27a7f,'solved':_0x2a4bcc['resolved']?I[_0x20b2f9(0x147)]:I[_0x20b2f9(0x144)]},_0x553be5=await this[_0x20b2f9(0x14c)][_0x20b2f9(0x1ac)](_0x20b2f9(0x14d)+_0x54b38d+_0x20b2f9(0x150),{'body':_0x343ff9});return!_0x553be5[_0x20b2f9(0x192)]['error']||_0x553be5[_0x20b2f9(0x192)][_0x20b2f9(0x180)][_0x20b2f9(0x1a4)]===0x1;}async[_0x388aec(0x1b7)](_0x448da8,_0x3ae590,_0x58d5e0,_0x22cf6d){const _0xab9d4=_0x388aec,_0x5bb21d={'memberId':(await this['_sessionService'][_0xab9d4(0x13a)](_0x448da8))[_0xab9d4(0x174)](),'threadId':_0x58d5e0,'replyId':_0x22cf6d,'unitId':_0x448da8},_0x4c26f6=await this[_0xab9d4(0x14c)][_0xab9d4(0x1ac)]('/universer-api/comment/unit/'+_0x448da8+_0xab9d4(0x19d),{'body':_0x5bb21d});return!_0x4c26f6[_0xab9d4(0x192)][_0xab9d4(0x180)]||_0x4c26f6['body']['error'][_0xab9d4(0x1a4)]===0x1;}async[_0x388aec(0x163)](_0x46f7c0,_0x344489,_0x55e2a8){const _0x35a058=_0x388aec,_0x5c768b={'unitId':_0x46f7c0,'threadId':_0x55e2a8},_0x130548=await this[_0x35a058(0x14c)][_0x35a058(0x1ac)](_0x35a058(0x14d)+_0x46f7c0+_0x35a058(0x15c),{'body':_0x5c768b}),_0x202daa=_0x55e2a8[_0x35a058(0x188)](_0x271d68=>G(_0x130548[_0x35a058(0x192)][_0x35a058(0x1b2)][_0x271d68],_0x46f7c0,_0x344489))[_0x35a058(0x15b)](Boolean);return Object[_0x35a058(0x152)](_0x130548[_0x35a058(0x192)][_0x35a058(0x196)])[_0x35a058(0x14a)](_0x4154dd=>{const _0x21d795=_0x35a058;this[_0x21d795(0x15d)][_0x21d795(0x19f)](_0x4154dd);}),_0x202daa;}[_0x388aec(0x16c)](_0x1a4427){const _0x3ec65a=_0x388aec;return{'id':_0x1a4427['id'],'threadId':_0x1a4427[_0x3ec65a(0x162)],'ref':_0x1a4427[_0x3ec65a(0x13d)]};}};g=x([_(0x0,c[_0x388aec(0x19e)](P[_0x388aec(0x1b5)])),_(0x1,c['Inject'](c[_0x388aec(0x178)])),_(0x2,c[_0x388aec(0x19e)](b[_0x388aec(0x151)])),_(0x3,c[_0x388aec(0x19e)](c[_0x388aec(0x140)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x2dc94,_0x332e0f,_0x16d2f2,_0x2efc6d)=>{const _0x527549=_0x388aec;for(var _0x20910a=_0x2efc6d>0x1?void 0x0:_0x2efc6d?H(_0x332e0f,_0x16d2f2):_0x332e0f,_0x38af90=_0x2dc94[_0x527549(0x19a)]-0x1,_0x350a82;_0x38af90>=0x0;_0x38af90--)(_0x350a82=_0x2dc94[_0x38af90])&&(_0x20910a=_0x350a82(_0x20910a)||_0x20910a);return _0x20910a;},y=(_0x1657a3,_0xc2c48)=>(_0x14ce5a,_0x529eae)=>_0xc2c48(_0x14ce5a,_0x529eae,_0x1657a3);let C=class extends c[_0x388aec(0x154)]{constructor(_0x18cf72,_0x41d77c){const _0x4bab1c=_0x388aec;super(),this[_0x4bab1c(0x15f)]=_0x18cf72,this['_threadCommentDataSource']=_0x41d77c,this[_0x4bab1c(0x14f)]();}[_0x388aec(0x14f)](){const _0x3c7a9c=_0x388aec;this[_0x3c7a9c(0x15f)]['dataSource']=this[_0x3c7a9c(0x190)],this['_threadCommentDataSourceService'][_0x3c7a9c(0x142)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x388aec(0x19e)](g))],C);function _0x3e84(_0x27c014,_0xabae98){const _0x528560=_0x5285();return _0x3e84=function(_0x3e8419,_0x28626f){_0x3e8419=_0x3e8419-0x139;let _0x57b0af=_0x528560[_0x3e8419];return _0x57b0af;},_0x3e84(_0x27c014,_0xabae98);}var F=Object[_0x388aec(0x173)],L=Object['getOwnPropertyDescriptor'],Z=(_0xe2d6c0,_0x5b07f8,_0x47402b)=>_0x5b07f8 in _0xe2d6c0?F(_0xe2d6c0,_0x5b07f8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x47402b}):_0xe2d6c0[_0x5b07f8]=_0x47402b,W=(_0x184848,_0x2b6ec5,_0x2aa825,_0x189e97)=>{const _0x9c65aa=_0x388aec;for(var _0x3ba2bc=_0x189e97>0x1?void 0x0:_0x189e97?L(_0x2b6ec5,_0x2aa825):_0x2b6ec5,_0x119a9e=_0x184848[_0x9c65aa(0x19a)]-0x1,_0xf7c1f4;_0x119a9e>=0x0;_0x119a9e--)(_0xf7c1f4=_0x184848[_0x119a9e])&&(_0x3ba2bc=_0xf7c1f4(_0x3ba2bc)||_0x3ba2bc);return _0x3ba2bc;},O=(_0x4457ad,_0x1238fc)=>(_0x2b59b5,_0x4bbc93)=>_0x1238fc(_0x2b59b5,_0x4bbc93,_0x4457ad),N=(_0x543204,_0xa8f29e,_0x2441d7)=>Z(_0x543204,typeof _0xa8f29e!='symbol'?_0xa8f29e+'':_0xa8f29e,_0x2441d7);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x388aec(0x17a)]{constructor(_0x320a9d=D,_0x4b8996,_0x54c16e){const _0x564e6f=_0x388aec;super(),this[_0x564e6f(0x145)]=_0x320a9d,this[_0x564e6f(0x167)]=_0x4b8996,this[_0x564e6f(0x1b4)]=_0x54c16e;const {..._0x45e990}=c[_0x564e6f(0x170)]({},D,this[_0x564e6f(0x145)]);this['_configService'][_0x564e6f(0x187)](q,_0x45e990);}[_0x388aec(0x175)](){const _0x58bb66=_0x388aec;[[g],[C],[p]][_0x58bb66(0x14a)](_0x29fa9a=>{const _0x3110a1=_0x58bb66;this[_0x3110a1(0x167)][_0x3110a1(0x169)](_0x29fa9a);});}['onReady'](){const _0x581769=_0x388aec;this['_injector'][_0x581769(0x1aa)](C),this['_injector'][_0x581769(0x1aa)](p);}},N(exports[_0x388aec(0x17e)],_0x388aec(0x1ab),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x388aec(0x16d),c[_0x388aec(0x1ae)][_0x388aec(0x141)]),exports[_0x388aec(0x17e)]=W([c[_0x388aec(0x159)](j[_0x388aec(0x1b8)],b[_0x388aec(0x153)],T[_0x388aec(0x157)]),O(0x1,c[_0x388aec(0x19e)](c[_0x388aec(0x140)])),O(0x2,c[_0x388aec(0x182)])],exports[_0x388aec(0x17e)]);function _0x5285(){const _0xf51d3b=['/universer-api/comment/unit/','parse','_initDataSource','/solved','CollaborationSessionService','values','UniverCollaborationClientPlugin','Disposable','pipe','_sessionService','UniverLicensePlugin','YYYY/MM/DD\x20HH:mm','DependentOn','personId','filter','/list','_userService','90609cmEZJJ','_threadCommentDataSourceService','payload','Add','threadId','listComments','addComment','bufferTime','CommentService','_injector','3459830MxzWTJ','add','toStringTag','/universer-api/user/list','saveCommentToSnapshot','type','23036040iYmMvN','370870lzkGOK','merge','delete','@univerjs-pro/collaboration-client','defineProperty','getMemberID','onStarting','/reply','COMMENT','UserManagerService','replies','Plugin','657lYabUm','userID','dayjs','UniverThreadCommentDataSourcePlugin','createTimestamp','error','rangeType','IConfigService','updateComment','Delete','disposeWithMe','getUnit','setConfig','map','Solve','4770157jpmtdy','getComment','unitId','size','reply','/add','_threadCommentDataSource','comment','body','156ypxfIq','675564DxHhIS','getUser','users','@univerjs/network','_commentService','getCurrentUser','length','_initUserSync','rxjs','/delete','Inject','addUser','customRanges','user','CustomRangeType','resolveComment','code','getOwnPropertyDescriptor','/edit','solved','@univerjs/thread-comment','186488YsNpcE','get','pluginName','post','@univerjs/core','UniverInstanceType','Edit','userId','_init','comments','9YebXve','_configService','HTTPService','Reply','deleteComment','UniverThreadCommentUIPlugin','UNRECOGNIZED','@univerjs/thread-comment-ui','replyId','requireSession','rangeId','_threadCommentModel','ref','Module','format','Injector','UNIVER_UNKNOWN','syncUpdateMutationToColla','stringify','OpenOrReOpen','_config','commentUpdate$','Solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','content','forEach','subscribe','_httpService'];_0x5285=function(){return _0xf51d3b;};return _0x5285();}
1
+ 'use strict';const _0x3d5f70=_0x4a82;(function(_0x54678f,_0x45f830){const _0x2d6da5=_0x4a82,_0x1930c8=_0x54678f();while(!![]){try{const _0x21e12b=parseInt(_0x2d6da5(0x22a))/0x1+parseInt(_0x2d6da5(0x227))/0x2+-parseInt(_0x2d6da5(0x21b))/0x3*(-parseInt(_0x2d6da5(0x222))/0x4)+parseInt(_0x2d6da5(0x1c3))/0x5+-parseInt(_0x2d6da5(0x1c6))/0x6*(-parseInt(_0x2d6da5(0x1f3))/0x7)+parseInt(_0x2d6da5(0x20b))/0x8*(-parseInt(_0x2d6da5(0x218))/0x9)+parseInt(_0x2d6da5(0x1cf))/0xa*(-parseInt(_0x2d6da5(0x1e4))/0xb);if(_0x21e12b===_0x45f830)break;else _0x1930c8['push'](_0x1930c8['shift']());}catch(_0x220781){_0x1930c8['push'](_0x1930c8['shift']());}}}(_0x11a2,0xf184d));Object[_0x3d5f70(0x20a)](exports,Symbol[_0x3d5f70(0x1bf)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require(_0x3d5f70(0x1d6)),j=require(_0x3d5f70(0x1bd)),M=require(_0x3d5f70(0x220)),w=require(_0x3d5f70(0x1cd)),P=require(_0x3d5f70(0x1d1)),U=_0x3d5f70(0x234);var I=(_0x4174a7=>(_0x4174a7[_0x4174a7[_0x3d5f70(0x237)]=0x0]='OpenOrReOpen',_0x4174a7[_0x4174a7['Solved']=0x1]=_0x3d5f70(0x202),_0x4174a7[_0x4174a7[_0x3d5f70(0x221)]=-0x1]='UNRECOGNIZED',_0x4174a7))(I||{}),v=(_0x3bce75=>(_0x3bce75[_0x3bce75[_0x3d5f70(0x1be)]=0x0]=_0x3d5f70(0x1be),_0x3bce75[_0x3bce75['Add']=0x1]='Add',_0x3bce75[_0x3bce75[_0x3d5f70(0x20f)]=0x2]=_0x3d5f70(0x20f),_0x3bce75[_0x3bce75[_0x3d5f70(0x21d)]=0x3]=_0x3d5f70(0x21d),_0x3bce75[_0x3bce75[_0x3d5f70(0x1c4)]=0x4]=_0x3d5f70(0x1c4),_0x3bce75[_0x3bce75[_0x3d5f70(0x1d5)]=0x5]='Solve',_0x3bce75[_0x3bce75[_0x3d5f70(0x221)]=-0x1]=_0x3d5f70(0x221),_0x3bce75))(v||{});const f=_0x2ce2fc=>c[_0x3d5f70(0x1e9)](new Date(+_0x2ce2fc))[_0x3d5f70(0x1fc)](_0x3d5f70(0x217)),R=async(_0x2141c1,_0xab3258)=>{const _0x2a337e=_0x3d5f70,_0x32ca16=_0x2141c1[_0x2a337e(0x231)](c[_0x2a337e(0x230)]),_0x52165e=_0x2141c1[_0x2a337e(0x231)](P[_0x2a337e(0x20c)]);_0xab3258['forEach'](_0x5399c9=>{_0x32ca16['getUser'](_0x5399c9)&&_0xab3258['delete'](_0x5399c9);}),_0xab3258[_0x2a337e(0x22b)]&&(await _0x52165e[_0x2a337e(0x231)]('/universer-api/user/list',{'params':{'userIDs':[..._0xab3258]}}))['body']['users'][_0x2a337e(0x1e7)](_0xf85b43=>{const _0x556500=_0x2a337e;_0xf85b43&&_0x32ca16[_0x556500(0x1e5)](_0xf85b43);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x236c63,_0x474fd5,_0x57e1b4,_0x45b0ba)=>{const _0x5acecd=_0x3d5f70;for(var _0x3c4faf=_0x45b0ba>0x1?void 0x0:_0x45b0ba?$(_0x474fd5,_0x57e1b4):_0x474fd5,_0x406f7a=_0x236c63[_0x5acecd(0x1f6)]-0x1,_0x35e22e;_0x406f7a>=0x0;_0x406f7a--)(_0x35e22e=_0x236c63[_0x406f7a])&&(_0x3c4faf=_0x35e22e(_0x3c4faf)||_0x3c4faf);return _0x3c4faf;},S=(_0x3d7060,_0xcc7e77)=>(_0x3bfd77,_0x2a091b)=>_0xcc7e77(_0x3bfd77,_0x2a091b,_0x3d7060);function _0x4a82(_0x4e14c0,_0x423213){const _0x11a242=_0x11a2();return _0x4a82=function(_0x4a8207,_0x18d8b6){_0x4a8207=_0x4a8207-0x1bb;let _0x54413d=_0x11a242[_0x4a8207];return _0x54413d;},_0x4a82(_0x4e14c0,_0x423213);}let p=class extends c['Disposable']{constructor(_0xbc2e18,_0x3b3dd1,_0x6881a6,_0x304060){const _0x3c6a88=_0x3d5f70;super(),this[_0x3c6a88(0x204)]=_0xbc2e18,this[_0x3c6a88(0x212)]=_0x3b3dd1,this[_0x3c6a88(0x1c0)]=_0x6881a6,this[_0x3c6a88(0x203)]=_0x304060,this[_0x3c6a88(0x1c1)](),this['_initUserSync']();}['_initUserSync'](){const _0x331566=_0x3d5f70;this['disposeWithMe'](this[_0x331566(0x212)][_0x331566(0x1de)][_0x331566(0x22d)](w[_0x331566(0x1d0)](0x10))[_0x331566(0x232)](_0x5479c1=>{const _0x4b5cf2=_0x331566,_0xa83d6=new Set();_0x5479c1[_0x4b5cf2(0x1e7)](_0x3ed27b=>{const _0x28d628=_0x4b5cf2;switch(_0x3ed27b['type']){case _0x28d628(0x21f):{const _0x15dcaf=_0x3ed27b[_0x28d628(0x1e8)][_0x28d628(0x1c2)];_0xa83d6[_0x28d628(0x21f)](_0x15dcaf);break;}}}),R(this[_0x4b5cf2(0x203)],_0xa83d6);}));}[_0x3d5f70(0x1c1)](){const _0x55c10e=_0x3d5f70;this[_0x55c10e(0x1d4)](this[_0x55c10e(0x204)][_0x55c10e(0x1de)]['subscribe'](async _0x58c717=>{const _0x16a0a6=_0x55c10e;var _0xcf2aec,_0x19b451,_0x375016,_0x4a41f8;const _0x14c7d2=(_0xcf2aec=this['_threadCommentModel'][_0x16a0a6(0x1f9)](_0x58c717['unitId'])[_0x16a0a6(0x21e)](_0x3a3abb=>_0x3a3abb['threadId']===_0x58c717[_0x16a0a6(0x1e2)]))==null?void 0x0:_0xcf2aec['root'];if(!_0x14c7d2)return;const {unitId:_0x3be9c1,subUnitId:_0x5759b9}=_0x14c7d2;switch(_0x58c717['user']&&this[_0x16a0a6(0x1c0)][_0x16a0a6(0x1e5)](_0x58c717[_0x16a0a6(0x1dd)]),_0x58c717['type']){case v['Add']:break;case v[_0x16a0a6(0x20f)]:{this[_0x16a0a6(0x212)][_0x16a0a6(0x1f7)](_0x3be9c1,_0x5759b9,{'unitId':_0x3be9c1,'subUnitId':_0x5759b9,'ref':'','id':_0x58c717[_0x16a0a6(0x1ff)],'dT':f(+_0x58c717[_0x16a0a6(0x1d7)]),'threadId':_0x58c717['threadId'],'personId':(_0x375016=(_0x19b451=_0x58c717['user'])==null?void 0x0:_0x19b451[_0x16a0a6(0x1fd)])!=null?_0x375016:_0x58c717[_0x16a0a6(0x210)],'text':JSON[_0x16a0a6(0x1f5)](_0x58c717[_0x16a0a6(0x229)]),'parentId':_0x14c7d2['id']});break;}case v['Delete']:{const _0x59fee6=this['_threadCommentModel'][_0x16a0a6(0x1da)](_0x3be9c1,_0x5759b9,_0x58c717[_0x16a0a6(0x1ff)]);_0x59fee6&&_0x59fee6[_0x16a0a6(0x1dc)]&&this[_0x16a0a6(0x212)]['deleteComment'](_0x3be9c1,_0x5759b9,_0x58c717['replyId']);break;}case v[_0x16a0a6(0x21d)]:{this[_0x16a0a6(0x212)][_0x16a0a6(0x1ec)](_0x3be9c1,_0x5759b9,{'commentId':_0x58c717[_0x16a0a6(0x1ff)],'text':JSON[_0x16a0a6(0x1f5)](_0x58c717['content'])});break;}case v[_0x16a0a6(0x1d5)]:{const _0x36bcd3=(_0x4a41f8=this[_0x16a0a6(0x212)][_0x16a0a6(0x1f9)](_0x58c717[_0x16a0a6(0x239)])[_0x16a0a6(0x21e)](_0x1968ac=>_0x1968ac['threadId']===_0x58c717[_0x16a0a6(0x1e2)]))==null?void 0x0:_0x4a41f8['root'];_0x36bcd3&&this[_0x16a0a6(0x212)]['resolveComment'](_0x3be9c1,_0x5759b9,_0x36bcd3['id'],_0x58c717['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x3d5f70(0x1f1)](b[_0x3d5f70(0x1e6)])),S(0x1,c['Inject'](M[_0x3d5f70(0x1ce)])),S(0x2,c[_0x3d5f70(0x1f1)](c[_0x3d5f70(0x230)])),S(0x3,c['Inject'](c[_0x3d5f70(0x1cc)]))],p);const q=_0x3d5f70(0x1f0),D={};var A=Object[_0x3d5f70(0x1f8)],x=(_0x26ed8b,_0x18b605,_0x512612,_0x403fdf)=>{const _0x58c737=_0x3d5f70;for(var _0x450efb=_0x403fdf>0x1?void 0x0:_0x403fdf?A(_0x18b605,_0x512612):_0x18b605,_0x10c784=_0x26ed8b[_0x58c737(0x1f6)]-0x1,_0x402ae7;_0x10c784>=0x0;_0x10c784--)(_0x402ae7=_0x26ed8b[_0x10c784])&&(_0x450efb=_0x402ae7(_0x450efb)||_0x450efb);return _0x450efb;},_=(_0x3b52fd,_0x3e4f45)=>(_0x4b6f47,_0x7e17d1)=>_0x3e4f45(_0x4b6f47,_0x7e17d1,_0x3b52fd);function Y(_0x3a1247,_0x2e3693){const _0x1b5b9f=_0x3d5f70,_0x3e967e=_0x3a1247['replies'][0x0];return{..._0x2e3693,'id':_0x3e967e[_0x1b5b9f(0x1ff)],'resolved':_0x3a1247[_0x1b5b9f(0x1c9)]===0x1,'dT':f(_0x3e967e['createTimestamp']),'personId':_0x3e967e[_0x1b5b9f(0x210)],'threadId':_0x3e967e['threadId']};}function G(_0xbbb201,_0x50f0d6,_0x15313c){const _0xda75f5=_0x3d5f70;var _0x52e077,_0x6085b7;if(((_0x6085b7=(_0x52e077=_0xbbb201==null?void 0x0:_0xbbb201['replies'])==null?void 0x0:_0x52e077[_0xda75f5(0x1f6)])!=null?_0x6085b7:0x0)>0x0){const _0x49e6d0=(_0x11216a,_0x3488be)=>({'id':_0x11216a[_0xda75f5(0x1ff)],'threadId':_0x11216a['threadId'],'dT':f(_0x11216a['createTimestamp']),'personId':_0x11216a[_0xda75f5(0x210)],'resolved':_0xbbb201[_0xda75f5(0x1c9)]===I['Solved'],'unitId':_0x50f0d6,'subUnitId':_0x15313c,'text':JSON[_0xda75f5(0x1f5)](_0x11216a[_0xda75f5(0x229)]),'parentId':_0x3488be}),_0x4374d6=_0x49e6d0(_0xbbb201[_0xda75f5(0x209)][0x0]);return{..._0x4374d6,'children':_0xbbb201['replies'][_0xda75f5(0x1fb)](0x1)[_0xda75f5(0x1c7)](_0x1024e0=>_0x49e6d0(_0x1024e0,_0x4374d6['id']))};}return null;}let g=class{constructor(_0x20aff3,_0x1b9081,_0x1a98d6,_0x1de726){const _0x57237e=_0x3d5f70;this[_0x57237e(0x200)]=_0x20aff3,this[_0x57237e(0x1c0)]=_0x1b9081,this[_0x57237e(0x22f)]=_0x1a98d6,this[_0x57237e(0x203)]=_0x1de726;}async[_0x3d5f70(0x1f7)](_0x1126bd){const _0x217431=_0x3d5f70;var _0x490ed4,_0x48f3ce;const {parentId:_0x2189ec,unitId:_0x191fcc,text:_0x4f20da,threadId:_0x517cf7}=_0x1126bd,_0x2b9b04=(_0x48f3ce=(_0x490ed4=_0x4f20da['customRanges'])==null?void 0x0:_0x490ed4[_0x217431(0x226)](_0x303841=>_0x303841[_0x217431(0x225)]===c[_0x217431(0x228)]['COMMENT'])[_0x217431(0x1c7)](_0x3449fd=>_0x3449fd[_0x217431(0x20e)]))!=null?_0x48f3ce:[],_0x6b8e55=JSON[_0x217431(0x1d9)](_0x4f20da),_0x45279a=(await this[_0x217431(0x22f)][_0x217431(0x223)](_0x191fcc))['getMemberID']();if(_0x2189ec){const _0x5c889f={'memberId':_0x45279a,'unitId':_0x191fcc,'content':_0x6b8e55,'mention':_0x2b9b04,'threadId':_0x517cf7},_0x32c09b=(await this[_0x217431(0x200)][_0x217431(0x1cb)]('/universer-api/comment/unit/'+_0x191fcc+_0x217431(0x1ee),{'body':_0x5c889f}))[_0x217431(0x233)]['reply'];return{..._0x1126bd,'id':_0x32c09b[_0x217431(0x1ff)],'dT':c[_0x217431(0x1e9)](+_0x32c09b[_0x217431(0x1d7)])['format'](_0x217431(0x217)),'personId':_0x32c09b[_0x217431(0x210)]};}else{const _0x401042={'memberId':_0x45279a,'unitId':_0x191fcc,'content':_0x6b8e55,'mention':_0x2b9b04},_0x1a3e3e=await this['_httpService'][_0x217431(0x1cb)](_0x217431(0x236)+_0x191fcc+_0x217431(0x1c5),{'body':_0x401042});return Y(_0x1a3e3e[_0x217431(0x233)][_0x217431(0x216)],_0x1126bd);}}async[_0x3d5f70(0x1ec)](_0xe5e7fd){const _0x1b85fc=_0x3d5f70;var _0x4c2a93,_0x33b8f0;const {text:_0x1fcc5c,unitId:_0x546ece}=_0xe5e7fd,_0x85ebd5=(_0x33b8f0=(_0x4c2a93=_0x1fcc5c[_0x1b85fc(0x20d)])==null?void 0x0:_0x4c2a93['filter'](_0x399217=>_0x399217[_0x1b85fc(0x225)]===c[_0x1b85fc(0x228)][_0x1b85fc(0x1df)])[_0x1b85fc(0x1c7)](_0x3f06fa=>_0x3f06fa['rangeId']))!=null?_0x33b8f0:[],_0x474753=JSON['stringify'](_0x1fcc5c),_0x40b800=_0xe5e7fd[_0x1b85fc(0x1e2)],_0x3cce9f=_0xe5e7fd['id'],_0x5f400a={'memberId':(await this[_0x1b85fc(0x22f)][_0x1b85fc(0x223)](_0x546ece))[_0x1b85fc(0x1fe)](),'unitId':_0x546ece,'threadId':_0x40b800,'mention':_0x85ebd5,'content':_0x474753,'replyId':_0x3cce9f},_0x2da8da=await this['_httpService'][_0x1b85fc(0x1cb)]('/universer-api/comment/unit/'+_0x546ece+_0x1b85fc(0x214),{'body':_0x5f400a});return!_0x2da8da[_0x1b85fc(0x233)][_0x1b85fc(0x1eb)]||_0x2da8da[_0x1b85fc(0x233)]['error'][_0x1b85fc(0x22e)]===0x1;}async[_0x3d5f70(0x1ea)](_0x1628de){const _0x565cf6=_0x3d5f70,{unitId:_0x1909e5}=_0x1628de,_0x219526=_0x1628de['threadId'],_0x2e0901={'memberId':this[_0x565cf6(0x1c0)]['getCurrentUser']()[_0x565cf6(0x1fd)],'unitId':_0x1909e5,'threadId':_0x219526,'solved':_0x1628de[_0x565cf6(0x1ed)]?I['Solved']:I['OpenOrReOpen']},_0x242312=await this[_0x565cf6(0x200)]['post'](_0x565cf6(0x236)+_0x1909e5+_0x565cf6(0x1f4),{'body':_0x2e0901});return!_0x242312[_0x565cf6(0x233)][_0x565cf6(0x1eb)]||_0x242312['body']['error']['code']===0x1;}async[_0x3d5f70(0x1bc)](_0x1272b6,_0x4e187d,_0x222462,_0x1ee9ac){const _0x121f91=_0x3d5f70,_0x50b178={'memberId':(await this[_0x121f91(0x22f)][_0x121f91(0x223)](_0x1272b6))[_0x121f91(0x1fe)](),'threadId':_0x222462,'replyId':_0x1ee9ac,'unitId':_0x1272b6},_0x4c6520=await this[_0x121f91(0x200)][_0x121f91(0x1cb)](_0x121f91(0x236)+_0x1272b6+_0x121f91(0x208),{'body':_0x50b178});return!_0x4c6520[_0x121f91(0x233)]['error']||_0x4c6520[_0x121f91(0x233)]['error'][_0x121f91(0x22e)]===0x1;}async[_0x3d5f70(0x201)](_0x4ce14c,_0x4c8a2f,_0x2ccf16){const _0x260c5b=_0x3d5f70,_0x4c2db1={'unitId':_0x4ce14c,'threadId':_0x2ccf16},_0x333215=await this[_0x260c5b(0x200)][_0x260c5b(0x1cb)](_0x260c5b(0x236)+_0x4ce14c+_0x260c5b(0x215),{'body':_0x4c2db1}),_0x252608=_0x2ccf16[_0x260c5b(0x1c7)](_0x126533=>G(_0x333215[_0x260c5b(0x233)]['comments'][_0x126533],_0x4ce14c,_0x4c8a2f))['filter'](Boolean);return Object[_0x260c5b(0x1c8)](_0x333215['body']['users'])['forEach'](_0x440775=>{const _0x50369a=_0x260c5b;this[_0x50369a(0x1c0)][_0x50369a(0x1e5)](_0x440775);}),_0x252608;}[_0x3d5f70(0x21c)](_0x29e25d){const _0x566944=_0x3d5f70;return{'id':_0x29e25d['id'],'threadId':_0x29e25d[_0x566944(0x1e2)],'ref':_0x29e25d[_0x566944(0x206)]};}};g=x([_(0x0,c[_0x3d5f70(0x1f1)](P['HTTPService'])),_(0x1,c[_0x3d5f70(0x1f1)](c[_0x3d5f70(0x230)])),_(0x2,c['Inject'](b[_0x3d5f70(0x213)])),_(0x3,c['Inject'](c[_0x3d5f70(0x1cc)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0xc98bf4,_0x3f19a3,_0x66f2f6,_0x3e5b63)=>{const _0x4715a0=_0x3d5f70;for(var _0x15bed9=_0x3e5b63>0x1?void 0x0:_0x3e5b63?H(_0x3f19a3,_0x66f2f6):_0x3f19a3,_0x3a96ff=_0xc98bf4[_0x4715a0(0x1f6)]-0x1,_0x1592bd;_0x3a96ff>=0x0;_0x3a96ff--)(_0x1592bd=_0xc98bf4[_0x3a96ff])&&(_0x15bed9=_0x1592bd(_0x15bed9)||_0x15bed9);return _0x15bed9;},y=(_0x381199,_0x105e4d)=>(_0x25958a,_0x1e85bf)=>_0x105e4d(_0x25958a,_0x1e85bf,_0x381199);function _0x11a2(){const _0x292fa9=['setConfig','deleteComment','@univerjs/thread-comment-ui','Unknown','toStringTag','_userService','_init','personId','1799490Ikimhe','Delete','/add','64560dsnMgu','map','values','solved','_initDataSource','post','Injector','rxjs','ThreadCommentModel','80zIbzob','bufferTime','@univerjs/network','merge','_threadCommentDataSourceService','disposeWithMe','Solve','@univerjs/core','createTimestamp','_config','stringify','getComment','UniverLicensePlugin','parentId','user','commentUpdate$','COMMENT','pluginName','onReady','threadId','UNIVER_UNKNOWN','3994265ApXOSi','addUser','CommentService','forEach','payload','dayjs','resolveComment','error','updateComment','resolved','/reply','UniverCollaborationClientPlugin','thread-comment-data-source.config','Inject','UniverInstanceType','553sXmcSI','/solved','parse','length','addComment','getOwnPropertyDescriptor','getUnit','syncUpdateMutationToColla','slice','format','userID','getMemberID','replyId','_httpService','listComments','Solved','_injector','_commentService','IThreadCommentDataSourceService','ref','dataSource','/delete','replies','defineProperty','976tUKgzw','HTTPService','customRanges','rangeId','Reply','userId','onStarting','_threadCommentModel','CollaborationSessionService','/edit','/list','comment','YYYY/MM/DD\x20HH:mm','10971MpmibO','symbol','_threadCommentDataSource','4403979XWynvQ','saveCommentToSnapshot','Edit','find','add','@univerjs/thread-comment','UNRECOGNIZED','4crPJyC','requireSession','_configService','rangeType','filter','2213426qZkIPN','CustomRangeType','content','258255uyTZgp','size','type','pipe','code','_sessionService','UserManagerService','get','subscribe','body','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentDataSourcePlugin','/universer-api/comment/unit/','OpenOrReOpen','IConfigService','unitId'];_0x11a2=function(){return _0x292fa9;};return _0x11a2();}let C=class extends c['Disposable']{constructor(_0x24d7ac,_0x385a88){const _0x3bb8ea=_0x3d5f70;super(),this[_0x3bb8ea(0x1d3)]=_0x24d7ac,this[_0x3bb8ea(0x21a)]=_0x385a88,this[_0x3bb8ea(0x1ca)]();}[_0x3d5f70(0x1ca)](){const _0x39ebfd=_0x3d5f70;this['_threadCommentDataSourceService'][_0x39ebfd(0x207)]=this['_threadCommentDataSource'],this[_0x39ebfd(0x1d3)][_0x39ebfd(0x1fa)]=!0x1;}};C=J([y(0x0,M[_0x3d5f70(0x205)]),y(0x1,c[_0x3d5f70(0x1f1)](g))],C);var F=Object['defineProperty'],L=Object[_0x3d5f70(0x1f8)],Z=(_0x460e96,_0xcb660f,_0x2cdac5)=>_0xcb660f in _0x460e96?F(_0x460e96,_0xcb660f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2cdac5}):_0x460e96[_0xcb660f]=_0x2cdac5,W=(_0x3355d3,_0x578fd1,_0x1b5044,_0x3ebe3e)=>{for(var _0x432675=_0x3ebe3e>0x1?void 0x0:_0x3ebe3e?L(_0x578fd1,_0x1b5044):_0x578fd1,_0x41aa6f=_0x3355d3['length']-0x1,_0x3a31fd;_0x41aa6f>=0x0;_0x41aa6f--)(_0x3a31fd=_0x3355d3[_0x41aa6f])&&(_0x432675=_0x3a31fd(_0x432675)||_0x432675);return _0x432675;},O=(_0x2dcb2a,_0x1180d8)=>(_0x5ad534,_0x33f268)=>_0x1180d8(_0x5ad534,_0x33f268,_0x2dcb2a),N=(_0x4016de,_0x2b4cd0,_0x2fc7d8)=>Z(_0x4016de,typeof _0x2b4cd0!=_0x3d5f70(0x219)?_0x2b4cd0+'':_0x2b4cd0,_0x2fc7d8);exports[_0x3d5f70(0x235)]=class extends c['Plugin']{constructor(_0x4bc021=D,_0x4309fe,_0x1c3828){const _0x552951=_0x3d5f70;super(),this[_0x552951(0x1d8)]=_0x4bc021,this[_0x552951(0x203)]=_0x4309fe,this[_0x552951(0x224)]=_0x1c3828;const {..._0x3738db}=c[_0x552951(0x1d2)]({},D,this[_0x552951(0x1d8)]);this['_configService'][_0x552951(0x1bb)](q,_0x3738db);}[_0x3d5f70(0x211)](){const _0x44e454=_0x3d5f70;[[g],[C],[p]][_0x44e454(0x1e7)](_0x3931b4=>{const _0x1c7058=_0x44e454;this[_0x1c7058(0x203)]['add'](_0x3931b4);});}[_0x3d5f70(0x1e1)](){const _0x30ca21=_0x3d5f70;this[_0x30ca21(0x203)][_0x30ca21(0x231)](C),this[_0x30ca21(0x203)][_0x30ca21(0x231)](p);}},N(exports[_0x3d5f70(0x235)],_0x3d5f70(0x1e0),U),N(exports[_0x3d5f70(0x235)],_0x3d5f70(0x22c),c[_0x3d5f70(0x1f2)][_0x3d5f70(0x1e3)]),exports[_0x3d5f70(0x235)]=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b[_0x3d5f70(0x1ef)],T[_0x3d5f70(0x1db)]),O(0x1,c[_0x3d5f70(0x1f1)](c[_0x3d5f70(0x1cc)])),O(0x2,c[_0x3d5f70(0x238)])],exports[_0x3d5f70(0x235)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x156056=_0x2456;(function(_0x20a7c2,_0x1d5fc3){const _0x68fe54=_0x2456,_0x40f370=_0x20a7c2();while(!![]){try{const _0x5194d3=parseInt(_0x68fe54(0x141))/0x1+parseInt(_0x68fe54(0x114))/0x2*(parseInt(_0x68fe54(0x157))/0x3)+parseInt(_0x68fe54(0x127))/0x4+-parseInt(_0x68fe54(0x168))/0x5+parseInt(_0x68fe54(0x11f))/0x6*(-parseInt(_0x68fe54(0x136))/0x7)+parseInt(_0x68fe54(0x166))/0x8*(parseInt(_0x68fe54(0x149))/0x9)+parseInt(_0x68fe54(0x116))/0xa;if(_0x5194d3===_0x1d5fc3)break;else _0x40f370['push'](_0x40f370['shift']());}catch(_0x16e1bc){_0x40f370['push'](_0x40f370['shift']());}}}(_0xc8e1,0x3ea1e));import{CommentService as _0x585108,CollaborationSessionService as _0x55d06f,UniverCollaborationClientPlugin as _0x2a0e3c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x576c81}from'@univerjs-pro/license';import{dayjs as _0x29a7b8,UserManagerService as _0x3b7c6a,Inject as _0xa1f4a5,Injector as _0x467e49,Disposable as _0x329f5c,CustomRangeType as _0x364f98,UniverInstanceType as _0x5183dd,DependentOn as _0x12fb17,IConfigService as _0x1abcfa,Plugin as _0x239e11,merge as _0x29ada1}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x507370}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x28d422,IThreadCommentDataSourceService as _0xa48844}from'@univerjs/thread-comment';import{bufferTime as _0x1e78a8}from'rxjs';import{HTTPService as _0x581e56}from'@univerjs/network';const W=_0x156056(0x12f);var I=(_0x1016ca=>(_0x1016ca[_0x1016ca[_0x156056(0x158)]=0x0]=_0x156056(0x158),_0x1016ca[_0x1016ca['Solved']=0x1]=_0x156056(0x11b),_0x1016ca[_0x1016ca[_0x156056(0x15e)]=-0x1]='UNRECOGNIZED',_0x1016ca))(I||{}),v=(_0x37796f=>(_0x37796f[_0x37796f[_0x156056(0x15f)]=0x0]='Unknown',_0x37796f[_0x37796f['Add']=0x1]=_0x156056(0x12c),_0x37796f[_0x37796f['Reply']=0x2]='Reply',_0x37796f[_0x37796f[_0x156056(0x13d)]=0x3]='Edit',_0x37796f[_0x37796f[_0x156056(0x118)]=0x4]=_0x156056(0x118),_0x37796f[_0x37796f[_0x156056(0x162)]=0x5]=_0x156056(0x162),_0x37796f[_0x37796f[_0x156056(0x15e)]=-0x1]=_0x156056(0x15e),_0x37796f))(v||{});const D=_0x43f4de=>_0x29a7b8(new Date(+_0x43f4de))[_0x156056(0x122)](_0x156056(0x129)),B=async(_0x22a29d,_0x13a601)=>{const _0x2a1314=_0x156056,_0x40c388=_0x22a29d[_0x2a1314(0x14e)](_0x3b7c6a),_0x320ab6=_0x22a29d[_0x2a1314(0x14e)](_0x581e56);_0x13a601[_0x2a1314(0x134)](_0x2824b6=>{_0x40c388['getUser'](_0x2824b6)&&_0x13a601['delete'](_0x2824b6);}),_0x13a601[_0x2a1314(0x152)]&&(await _0x320ab6[_0x2a1314(0x14e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x13a601]}}))['body'][_0x2a1314(0x133)][_0x2a1314(0x134)](_0x1c33a0=>{const _0x4e7395=_0x2a1314;_0x1c33a0&&_0x40c388[_0x4e7395(0x161)](_0x1c33a0);});};function _0x2456(_0x4c12e8,_0x3d7bc7){const _0xc8e1ba=_0xc8e1();return _0x2456=function(_0x245614,_0x2ea907){_0x245614=_0x245614-0x10e;let _0x5bb234=_0xc8e1ba[_0x245614];return _0x5bb234;},_0x2456(_0x4c12e8,_0x3d7bc7);}var K=Object[_0x156056(0x167)],V=(_0x3b2791,_0x1609d7,_0x25fe0c,_0x3d6d82)=>{const _0x1c04fb=_0x156056;for(var _0x26ffe0=_0x3d6d82>0x1?void 0x0:_0x3d6d82?K(_0x1609d7,_0x25fe0c):_0x1609d7,_0x445793=_0x3b2791[_0x1c04fb(0x130)]-0x1,_0x4edd96;_0x445793>=0x0;_0x445793--)(_0x4edd96=_0x3b2791[_0x445793])&&(_0x26ffe0=_0x4edd96(_0x26ffe0)||_0x26ffe0);return _0x26ffe0;},p=(_0x3915d1,_0x1f847f)=>(_0x465386,_0x3c9236)=>_0x1f847f(_0x465386,_0x3c9236,_0x3915d1);let S=class extends _0x329f5c{constructor(_0x31b552,_0x1540da,_0x227bf2,_0x3963a1){const _0xe7ef26=_0x156056;super(),this[_0xe7ef26(0x15c)]=_0x31b552,this[_0xe7ef26(0x128)]=_0x1540da,this['_userService']=_0x227bf2,this[_0xe7ef26(0x155)]=_0x3963a1,this[_0xe7ef26(0x132)](),this[_0xe7ef26(0x12d)]();}[_0x156056(0x12d)](){const _0x101168=_0x156056;this[_0x101168(0x165)](this[_0x101168(0x128)][_0x101168(0x111)][_0x101168(0x14b)](_0x1e78a8(0x10))[_0x101168(0x150)](_0x2d5363=>{const _0x39f921=_0x101168,_0x22d89f=new Set();_0x2d5363['forEach'](_0x3ad8bd=>{const _0x26a9f6=_0x2456;switch(_0x3ad8bd[_0x26a9f6(0x117)]){case'add':{const _0x3b1a6d=_0x3ad8bd[_0x26a9f6(0x163)][_0x26a9f6(0x119)];_0x22d89f['add'](_0x3b1a6d);break;}}}),B(this[_0x39f921(0x155)],_0x22d89f);}));}[_0x156056(0x132)](){const _0x29a7f2=_0x156056;this[_0x29a7f2(0x165)](this['_commentService'][_0x29a7f2(0x111)][_0x29a7f2(0x150)](async _0x3aa7b2=>{const _0x20d005=_0x29a7f2;var _0x1aeaab,_0x362222,_0x5e1ce8,_0xdfeded;const _0x389266=(_0x1aeaab=this[_0x20d005(0x128)][_0x20d005(0x144)](_0x3aa7b2[_0x20d005(0x115)])[_0x20d005(0x14a)](_0x2fc067=>_0x2fc067[_0x20d005(0x121)]===_0x3aa7b2[_0x20d005(0x121)]))==null?void 0x0:_0x1aeaab[_0x20d005(0x142)];if(!_0x389266)return;const {unitId:_0x560d4b,subUnitId:_0x39f6b0}=_0x389266;switch(_0x3aa7b2['user']&&this[_0x20d005(0x164)][_0x20d005(0x161)](_0x3aa7b2[_0x20d005(0x126)]),_0x3aa7b2['type']){case v[_0x20d005(0x12c)]:break;case v[_0x20d005(0x151)]:{this[_0x20d005(0x128)][_0x20d005(0x147)](_0x560d4b,_0x39f6b0,{'unitId':_0x560d4b,'subUnitId':_0x39f6b0,'ref':'','id':_0x3aa7b2['replyId'],'dT':D(+_0x3aa7b2[_0x20d005(0x160)]),'threadId':_0x3aa7b2['threadId'],'personId':(_0x5e1ce8=(_0x362222=_0x3aa7b2['user'])==null?void 0x0:_0x362222['userID'])!=null?_0x5e1ce8:_0x3aa7b2[_0x20d005(0x12e)],'text':JSON['parse'](_0x3aa7b2['content']),'parentId':_0x389266['id']});break;}case v['Delete']:{const _0x331be0=this[_0x20d005(0x128)][_0x20d005(0x16d)](_0x560d4b,_0x39f6b0,_0x3aa7b2['replyId']);_0x331be0&&_0x331be0[_0x20d005(0x13a)]&&this[_0x20d005(0x128)]['deleteComment'](_0x560d4b,_0x39f6b0,_0x3aa7b2[_0x20d005(0x15a)]);break;}case v[_0x20d005(0x13d)]:{this['_threadCommentModel']['updateComment'](_0x560d4b,_0x39f6b0,{'commentId':_0x3aa7b2[_0x20d005(0x15a)],'text':JSON['parse'](_0x3aa7b2['content'])});break;}case v[_0x20d005(0x162)]:{const _0x12ce01=(_0xdfeded=this[_0x20d005(0x128)][_0x20d005(0x144)](_0x3aa7b2[_0x20d005(0x115)])[_0x20d005(0x14a)](_0xe352f7=>_0xe352f7['threadId']===_0x3aa7b2[_0x20d005(0x121)]))==null?void 0x0:_0xdfeded[_0x20d005(0x142)];_0x12ce01&&this[_0x20d005(0x128)][_0x20d005(0x11c)](_0x560d4b,_0x39f6b0,_0x12ce01['id'],_0x3aa7b2[_0x20d005(0x145)]===I[_0x20d005(0x11b)]);break;}}}));}};S=V([p(0x0,_0xa1f4a5(_0x585108)),p(0x1,_0xa1f4a5(_0x28d422)),p(0x2,_0xa1f4a5(_0x3b7c6a)),p(0x3,_0xa1f4a5(_0x467e49))],S);const z='thread-comment-data-source.config',M={};function _0xc8e1(){const _0x39b3f9=['find','pipe','_threadCommentDataSourceService','onStarting','get','/universer-api/comment/unit/','subscribe','Reply','size','slice','getCurrentUser','_injector','_threadCommentDataSource','479097uOfuEm','OpenOrReOpen','comment','replyId','comments','_commentService','rangeType','UNRECOGNIZED','Unknown','createTimestamp','addUser','Solve','payload','_userService','disposeWithMe','3056jNFFfa','getOwnPropertyDescriptor','2266985wAcCtD','ref','customRanges','content','resolved','getComment','symbol','userID','_config','commentUpdate$','add','values','4vrIPwt','unitId','4520230hiDsQq','type','Delete','personId','_httpService','Solved','resolveComment','setConfig','_sessionService','4638ugxPzA','/solved','threadId','format','/add','_initDataSource','getMemberID','user','713124lSpvsP','_threadCommentModel','YYYY/MM/DD\x20HH:mm','filter','rangeId','Add','_initUserSync','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','code','_init','users','forEach','onReady','4354rmFpVS','/delete','_configService','requireSession','parentId','/reply','post','Edit','body','error','replies','142105IfCHxx','root','map','getUnit','solved','stringify','addComment','reply','2331NrhPvQ'];_0xc8e1=function(){return _0x39b3f9;};return _0xc8e1();}var k=Object[_0x156056(0x167)],Q=(_0x1d4abd,_0x55ea39,_0xa2396e,_0x45cc93)=>{const _0x341bf6=_0x156056;for(var _0x2601e6=_0x45cc93>0x1?void 0x0:_0x45cc93?k(_0x55ea39,_0xa2396e):_0x55ea39,_0x463efd=_0x1d4abd[_0x341bf6(0x130)]-0x1,_0x26ffd5;_0x463efd>=0x0;_0x463efd--)(_0x26ffd5=_0x1d4abd[_0x463efd])&&(_0x2601e6=_0x26ffd5(_0x2601e6)||_0x2601e6);return _0x2601e6;},_=(_0x44f823,_0x4e6144)=>(_0x52e865,_0x1a0aec)=>_0x4e6144(_0x52e865,_0x1a0aec,_0x44f823);function X(_0x1c5532,_0x44d280){const _0x299dd1=_0x156056,_0x513332=_0x1c5532['replies'][0x0];return{..._0x44d280,'id':_0x513332[_0x299dd1(0x15a)],'resolved':_0x1c5532[_0x299dd1(0x145)]===0x1,'dT':D(_0x513332[_0x299dd1(0x160)]),'personId':_0x513332[_0x299dd1(0x12e)],'threadId':_0x513332[_0x299dd1(0x121)]};}function ee(_0x1782e9,_0x1aa38b,_0x44d93c){const _0x41a88e=_0x156056;var _0x266e7e,_0x4ccf46;if(((_0x4ccf46=(_0x266e7e=_0x1782e9==null?void 0x0:_0x1782e9[_0x41a88e(0x140)])==null?void 0x0:_0x266e7e[_0x41a88e(0x130)])!=null?_0x4ccf46:0x0)>0x0){const _0x2be37d=(_0x1ac1d6,_0x187c23)=>({'id':_0x1ac1d6['replyId'],'threadId':_0x1ac1d6['threadId'],'dT':D(_0x1ac1d6[_0x41a88e(0x160)]),'personId':_0x1ac1d6['userId'],'resolved':_0x1782e9[_0x41a88e(0x145)]===I['Solved'],'unitId':_0x1aa38b,'subUnitId':_0x44d93c,'text':JSON['parse'](_0x1ac1d6[_0x41a88e(0x16b)]),'parentId':_0x187c23}),_0xfb42ee=_0x2be37d(_0x1782e9[_0x41a88e(0x140)][0x0]);return{..._0xfb42ee,'children':_0x1782e9['replies'][_0x41a88e(0x153)](0x1)[_0x41a88e(0x143)](_0x192254=>_0x2be37d(_0x192254,_0xfb42ee['id']))};}return null;}let f=class{constructor(_0xe36bad,_0x28940f,_0x468e6b,_0x3e00d5){const _0x41b8e8=_0x156056;this[_0x41b8e8(0x11a)]=_0xe36bad,this['_userService']=_0x28940f,this['_sessionService']=_0x468e6b,this[_0x41b8e8(0x155)]=_0x3e00d5;}async[_0x156056(0x147)](_0x41e943){const _0x3f87cb=_0x156056;var _0x26dab2,_0x5b8a0c;const {parentId:_0x1ef24b,unitId:_0x28a974,text:_0x2984a5,threadId:_0x27aa9a}=_0x41e943,_0x3ab062=(_0x5b8a0c=(_0x26dab2=_0x2984a5[_0x3f87cb(0x16a)])==null?void 0x0:_0x26dab2[_0x3f87cb(0x12a)](_0x175e95=>_0x175e95[_0x3f87cb(0x15d)]===_0x364f98['COMMENT'])['map'](_0x517bf9=>_0x517bf9[_0x3f87cb(0x12b)]))!=null?_0x5b8a0c:[],_0x4e47a1=JSON[_0x3f87cb(0x146)](_0x2984a5),_0x37d0f2=(await this[_0x3f87cb(0x11e)][_0x3f87cb(0x139)](_0x28a974))[_0x3f87cb(0x125)]();if(_0x1ef24b){const _0x32edac={'memberId':_0x37d0f2,'unitId':_0x28a974,'content':_0x4e47a1,'mention':_0x3ab062,'threadId':_0x27aa9a},_0x5e3c83=(await this[_0x3f87cb(0x11a)]['post'](_0x3f87cb(0x14f)+_0x28a974+_0x3f87cb(0x13b),{'body':_0x32edac}))[_0x3f87cb(0x13e)][_0x3f87cb(0x148)];return{..._0x41e943,'id':_0x5e3c83[_0x3f87cb(0x15a)],'dT':_0x29a7b8(+_0x5e3c83[_0x3f87cb(0x160)])[_0x3f87cb(0x122)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5e3c83['userId']};}else{const _0x2263db={'memberId':_0x37d0f2,'unitId':_0x28a974,'content':_0x4e47a1,'mention':_0x3ab062},_0x17a925=await this[_0x3f87cb(0x11a)][_0x3f87cb(0x13c)](_0x3f87cb(0x14f)+_0x28a974+_0x3f87cb(0x123),{'body':_0x2263db});return X(_0x17a925[_0x3f87cb(0x13e)][_0x3f87cb(0x159)],_0x41e943);}}async['updateComment'](_0xb833f8){const _0x2e1b21=_0x156056;var _0x5e6b70,_0x9c7b7a;const {text:_0x4da092,unitId:_0x346bf5}=_0xb833f8,_0x5554d4=(_0x9c7b7a=(_0x5e6b70=_0x4da092[_0x2e1b21(0x16a)])==null?void 0x0:_0x5e6b70[_0x2e1b21(0x12a)](_0x249967=>_0x249967['rangeType']===_0x364f98['COMMENT'])[_0x2e1b21(0x143)](_0x4028bc=>_0x4028bc[_0x2e1b21(0x12b)]))!=null?_0x9c7b7a:[],_0x54e6fc=JSON[_0x2e1b21(0x146)](_0x4da092),_0x1e74ca=_0xb833f8[_0x2e1b21(0x121)],_0x4e0a64=_0xb833f8['id'],_0xa7a531={'memberId':(await this[_0x2e1b21(0x11e)][_0x2e1b21(0x139)](_0x346bf5))[_0x2e1b21(0x125)](),'unitId':_0x346bf5,'threadId':_0x1e74ca,'mention':_0x5554d4,'content':_0x54e6fc,'replyId':_0x4e0a64},_0x32f297=await this[_0x2e1b21(0x11a)][_0x2e1b21(0x13c)]('/universer-api/comment/unit/'+_0x346bf5+'/edit',{'body':_0xa7a531});return!_0x32f297['body']['error']||_0x32f297['body'][_0x2e1b21(0x13f)]['code']===0x1;}async['resolveComment'](_0x476469){const _0x14c8f0=_0x156056,{unitId:_0x10b187}=_0x476469,_0x569166=_0x476469[_0x14c8f0(0x121)],_0x59123f={'memberId':this[_0x14c8f0(0x164)][_0x14c8f0(0x154)]()[_0x14c8f0(0x10f)],'unitId':_0x10b187,'threadId':_0x569166,'solved':_0x476469[_0x14c8f0(0x16c)]?I[_0x14c8f0(0x11b)]:I[_0x14c8f0(0x158)]},_0x478d60=await this[_0x14c8f0(0x11a)][_0x14c8f0(0x13c)]('/universer-api/comment/unit/'+_0x10b187+_0x14c8f0(0x120),{'body':_0x59123f});return!_0x478d60[_0x14c8f0(0x13e)][_0x14c8f0(0x13f)]||_0x478d60[_0x14c8f0(0x13e)][_0x14c8f0(0x13f)][_0x14c8f0(0x131)]===0x1;}async['deleteComment'](_0x103939,_0x5d3b85,_0x3a5fca,_0x305080){const _0x167b49=_0x156056,_0x2262bf={'memberId':(await this[_0x167b49(0x11e)][_0x167b49(0x139)](_0x103939))[_0x167b49(0x125)](),'threadId':_0x3a5fca,'replyId':_0x305080,'unitId':_0x103939},_0x5c6d03=await this[_0x167b49(0x11a)][_0x167b49(0x13c)]('/universer-api/comment/unit/'+_0x103939+_0x167b49(0x137),{'body':_0x2262bf});return!_0x5c6d03[_0x167b49(0x13e)][_0x167b49(0x13f)]||_0x5c6d03[_0x167b49(0x13e)][_0x167b49(0x13f)][_0x167b49(0x131)]===0x1;}async['listComments'](_0x242f39,_0x3770c4,_0x4cc007){const _0x2565fc=_0x156056,_0x373546={'unitId':_0x242f39,'threadId':_0x4cc007},_0x304036=await this[_0x2565fc(0x11a)]['post'](_0x2565fc(0x14f)+_0x242f39+'/list',{'body':_0x373546}),_0x3dd9b9=_0x4cc007[_0x2565fc(0x143)](_0x52a210=>ee(_0x304036[_0x2565fc(0x13e)][_0x2565fc(0x15b)][_0x52a210],_0x242f39,_0x3770c4))['filter'](Boolean);return Object[_0x2565fc(0x113)](_0x304036[_0x2565fc(0x13e)]['users'])[_0x2565fc(0x134)](_0x563f1b=>{const _0x124cd9=_0x2565fc;this['_userService'][_0x124cd9(0x161)](_0x563f1b);}),_0x3dd9b9;}['saveCommentToSnapshot'](_0x38cf18){const _0x187eea=_0x156056;return{'id':_0x38cf18['id'],'threadId':_0x38cf18[_0x187eea(0x121)],'ref':_0x38cf18[_0x187eea(0x169)]};}};f=Q([_(0x0,_0xa1f4a5(_0x581e56)),_(0x1,_0xa1f4a5(_0x3b7c6a)),_(0x2,_0xa1f4a5(_0x55d06f)),_(0x3,_0xa1f4a5(_0x467e49))],f);var re=Object[_0x156056(0x167)],te=(_0x458293,_0x1ca14f,_0x4207b3,_0x46b4a4)=>{const _0x580f09=_0x156056;for(var _0x17d475=_0x46b4a4>0x1?void 0x0:_0x46b4a4?re(_0x1ca14f,_0x4207b3):_0x1ca14f,_0x7153ca=_0x458293[_0x580f09(0x130)]-0x1,_0x10f1b2;_0x7153ca>=0x0;_0x7153ca--)(_0x10f1b2=_0x458293[_0x7153ca])&&(_0x17d475=_0x10f1b2(_0x17d475)||_0x17d475);return _0x17d475;},N=(_0x3c6250,_0x134122)=>(_0x1517f3,_0x3fc326)=>_0x134122(_0x1517f3,_0x3fc326,_0x3c6250);let g=class extends _0x329f5c{constructor(_0xe81fa,_0x2417c9){const _0x4c0951=_0x156056;super(),this[_0x4c0951(0x14c)]=_0xe81fa,this[_0x4c0951(0x156)]=_0x2417c9,this[_0x4c0951(0x124)]();}['_initDataSource'](){const _0x1515a1=_0x156056;this[_0x1515a1(0x14c)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xa48844),N(0x1,_0xa1f4a5(f))],g);var se=Object['defineProperty'],oe=Object[_0x156056(0x167)],ne=(_0x1e35b8,_0x3f0a5c,_0x358331)=>_0x3f0a5c in _0x1e35b8?se(_0x1e35b8,_0x3f0a5c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x358331}):_0x1e35b8[_0x3f0a5c]=_0x358331,ie=(_0x3619b6,_0xe59082,_0xb271be,_0x1c0fa4)=>{const _0x3328b6=_0x156056;for(var _0x13fa9f=_0x1c0fa4>0x1?void 0x0:_0x1c0fa4?oe(_0xe59082,_0xb271be):_0xe59082,_0x3a80cc=_0x3619b6[_0x3328b6(0x130)]-0x1,_0x349c6e;_0x3a80cc>=0x0;_0x3a80cc--)(_0x349c6e=_0x3619b6[_0x3a80cc])&&(_0x13fa9f=_0x349c6e(_0x13fa9f)||_0x13fa9f);return _0x13fa9f;},w=(_0x39533e,_0x26f6c4)=>(_0x4c2b17,_0xd48a5c)=>_0x26f6c4(_0x4c2b17,_0xd48a5c,_0x39533e),$=(_0x4bbf12,_0x1c041a,_0x2cdcf2)=>ne(_0x4bbf12,typeof _0x1c041a!=_0x156056(0x10e)?_0x1c041a+'':_0x1c041a,_0x2cdcf2);let b=class extends _0x239e11{constructor(_0x45dd26=M,_0x116394,_0x1bfa8a){const _0x2a1210=_0x156056;super(),this['_config']=_0x45dd26,this['_injector']=_0x116394,this[_0x2a1210(0x138)]=_0x1bfa8a;const {..._0x37b173}=_0x29ada1({},M,this[_0x2a1210(0x110)]);this[_0x2a1210(0x138)][_0x2a1210(0x11d)](z,_0x37b173);}[_0x156056(0x14d)](){const _0xfad2c7=_0x156056;[[f],[g],[S]][_0xfad2c7(0x134)](_0x2fbabf=>{const _0x42ca9f=_0xfad2c7;this[_0x42ca9f(0x155)][_0x42ca9f(0x112)](_0x2fbabf);});}[_0x156056(0x135)](){const _0x4d1d01=_0x156056;this[_0x4d1d01(0x155)]['get'](g),this[_0x4d1d01(0x155)][_0x4d1d01(0x14e)](S);}};$(b,'pluginName',W),$(b,_0x156056(0x117),_0x5183dd['UNIVER_UNKNOWN']),b=ie([_0x12fb17(_0x507370,_0x2a0e3c,_0x576c81),w(0x1,_0xa1f4a5(_0x467e49)),w(0x2,_0x1abcfa)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x35f622=_0x5cab;(function(_0x1b2cd9,_0x5da74d){const _0x5e12c8=_0x5cab,_0x25c4c3=_0x1b2cd9();while(!![]){try{const _0x5dcee1=-parseInt(_0x5e12c8(0xbb))/0x1+-parseInt(_0x5e12c8(0x8c))/0x2*(-parseInt(_0x5e12c8(0xe4))/0x3)+parseInt(_0x5e12c8(0xc1))/0x4+parseInt(_0x5e12c8(0xc2))/0x5*(-parseInt(_0x5e12c8(0xd8))/0x6)+-parseInt(_0x5e12c8(0xd9))/0x7+-parseInt(_0x5e12c8(0xb3))/0x8+parseInt(_0x5e12c8(0xce))/0x9*(parseInt(_0x5e12c8(0xa7))/0xa);if(_0x5dcee1===_0x5da74d)break;else _0x25c4c3['push'](_0x25c4c3['shift']());}catch(_0x2f75ac){_0x25c4c3['push'](_0x25c4c3['shift']());}}}(_0x2c57,0x4359b));import{CommentService as _0x4b60cb,CollaborationSessionService as _0x2c2f5a,UniverCollaborationClientPlugin as _0x177d49}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x843546}from'@univerjs-pro/license';import{dayjs as _0x269791,UserManagerService as _0x1ff591,Inject as _0x5ee840,Injector as _0x55640e,Disposable as _0x2b7514,CustomRangeType as _0x335bcd,UniverInstanceType as _0x238f45,DependentOn as _0x21b651,IConfigService as _0x3ef499,Plugin as _0x223b2b,merge as _0x20f8a7}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2a1676}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x147ce0,IThreadCommentDataSourceService as _0x217b63}from'@univerjs/thread-comment';import{bufferTime as _0x1f8f94}from'rxjs';import{HTTPService as _0x714c0}from'@univerjs/network';const W=_0x35f622(0xad);var I=(_0x39faa5=>(_0x39faa5[_0x39faa5[_0x35f622(0x93)]=0x0]=_0x35f622(0x93),_0x39faa5[_0x39faa5[_0x35f622(0xa9)]=0x1]=_0x35f622(0xa9),_0x39faa5[_0x39faa5[_0x35f622(0xdd)]=-0x1]=_0x35f622(0xdd),_0x39faa5))(I||{}),v=(_0x21e2cc=>(_0x21e2cc[_0x21e2cc[_0x35f622(0xaa)]=0x0]=_0x35f622(0xaa),_0x21e2cc[_0x21e2cc[_0x35f622(0x94)]=0x1]=_0x35f622(0x94),_0x21e2cc[_0x21e2cc[_0x35f622(0xb1)]=0x2]=_0x35f622(0xb1),_0x21e2cc[_0x21e2cc[_0x35f622(0xdb)]=0x3]=_0x35f622(0xdb),_0x21e2cc[_0x21e2cc[_0x35f622(0xbe)]=0x4]=_0x35f622(0xbe),_0x21e2cc[_0x21e2cc[_0x35f622(0xa3)]=0x5]=_0x35f622(0xa3),_0x21e2cc[_0x21e2cc[_0x35f622(0xdd)]=-0x1]=_0x35f622(0xdd),_0x21e2cc))(v||{});const D=_0x2995a0=>_0x269791(new Date(+_0x2995a0))['format'](_0x35f622(0x89)),B=async(_0x541115,_0x2e973b)=>{const _0x5df6e6=_0x35f622,_0x334860=_0x541115[_0x5df6e6(0x99)](_0x1ff591),_0x27f671=_0x541115[_0x5df6e6(0x99)](_0x714c0);_0x2e973b[_0x5df6e6(0x81)](_0x372532=>{const _0x3e2d9f=_0x5df6e6;_0x334860[_0x3e2d9f(0x8d)](_0x372532)&&_0x2e973b[_0x3e2d9f(0x9a)](_0x372532);}),_0x2e973b[_0x5df6e6(0x90)]&&(await _0x27f671[_0x5df6e6(0x99)](_0x5df6e6(0xd7),{'params':{'userIDs':[..._0x2e973b]}}))[_0x5df6e6(0x9d)]['users'][_0x5df6e6(0x81)](_0x152cac=>{_0x152cac&&_0x334860['addUser'](_0x152cac);});};function _0x5cab(_0x386b70,_0x459290){const _0x2c57e9=_0x2c57();return _0x5cab=function(_0x5cabe5,_0x2f8474){_0x5cabe5=_0x5cabe5-0x81;let _0x362657=_0x2c57e9[_0x5cabe5];return _0x362657;},_0x5cab(_0x386b70,_0x459290);}var K=Object['getOwnPropertyDescriptor'],V=(_0x5ac705,_0x5d4635,_0x1f923a,_0x3c3872)=>{for(var _0x297b77=_0x3c3872>0x1?void 0x0:_0x3c3872?K(_0x5d4635,_0x1f923a):_0x5d4635,_0x128eab=_0x5ac705['length']-0x1,_0x2510fe;_0x128eab>=0x0;_0x128eab--)(_0x2510fe=_0x5ac705[_0x128eab])&&(_0x297b77=_0x2510fe(_0x297b77)||_0x297b77);return _0x297b77;},p=(_0x38df0a,_0x58cec8)=>(_0x1a5010,_0x47a2e1)=>_0x58cec8(_0x1a5010,_0x47a2e1,_0x38df0a);let S=class extends _0x2b7514{constructor(_0x570cf4,_0x5e05f7,_0x5cd1c4,_0x22773a){const _0x56268c=_0x35f622;super(),this['_commentService']=_0x570cf4,this['_threadCommentModel']=_0x5e05f7,this[_0x56268c(0xda)]=_0x5cd1c4,this[_0x56268c(0xc8)]=_0x22773a,this['_init'](),this[_0x56268c(0xa2)]();}[_0x35f622(0xa2)](){const _0xb40629=_0x35f622;this[_0xb40629(0xc3)](this['_threadCommentModel'][_0xb40629(0x83)][_0xb40629(0x9e)](_0x1f8f94(0x10))[_0xb40629(0xcd)](_0xba17da=>{const _0x558794=_0xb40629,_0x1b9e9b=new Set();_0xba17da[_0x558794(0x81)](_0x23f262=>{const _0x224239=_0x558794;switch(_0x23f262[_0x224239(0xca)]){case'add':{const _0x758cd2=_0x23f262[_0x224239(0xb4)]['personId'];_0x1b9e9b[_0x224239(0xc6)](_0x758cd2);break;}}}),B(this['_injector'],_0x1b9e9b);}));}['_init'](){const _0x352833=_0x35f622;this[_0x352833(0xc3)](this['_commentService']['commentUpdate$'][_0x352833(0xcd)](async _0x49a8a0=>{const _0xcddc8e=_0x352833;var _0x494bd6,_0x3d17b9,_0x58449a,_0x368fbe;const _0x4acafd=(_0x494bd6=this[_0xcddc8e(0x9c)][_0xcddc8e(0xd4)](_0x49a8a0['unitId'])[_0xcddc8e(0x9f)](_0x2961d2=>_0x2961d2[_0xcddc8e(0xe0)]===_0x49a8a0['threadId']))==null?void 0x0:_0x494bd6[_0xcddc8e(0xcf)];if(!_0x4acafd)return;const {unitId:_0x3efa35,subUnitId:_0x266c46}=_0x4acafd;switch(_0x49a8a0[_0xcddc8e(0xde)]&&this[_0xcddc8e(0xda)][_0xcddc8e(0xc5)](_0x49a8a0[_0xcddc8e(0xde)]),_0x49a8a0[_0xcddc8e(0xca)]){case v[_0xcddc8e(0x94)]:break;case v['Reply']:{this[_0xcddc8e(0x9c)][_0xcddc8e(0x8e)](_0x3efa35,_0x266c46,{'unitId':_0x3efa35,'subUnitId':_0x266c46,'ref':'','id':_0x49a8a0[_0xcddc8e(0x92)],'dT':D(+_0x49a8a0[_0xcddc8e(0x86)]),'threadId':_0x49a8a0[_0xcddc8e(0xe0)],'personId':(_0x58449a=(_0x3d17b9=_0x49a8a0['user'])==null?void 0x0:_0x3d17b9['userID'])!=null?_0x58449a:_0x49a8a0[_0xcddc8e(0xe3)],'text':JSON[_0xcddc8e(0xb9)](_0x49a8a0[_0xcddc8e(0xa4)]),'parentId':_0x4acafd['id']});break;}case v[_0xcddc8e(0xbe)]:{const _0x4fb529=this[_0xcddc8e(0x9c)][_0xcddc8e(0x95)](_0x3efa35,_0x266c46,_0x49a8a0[_0xcddc8e(0x92)]);_0x4fb529&&_0x4fb529[_0xcddc8e(0x91)]&&this[_0xcddc8e(0x9c)][_0xcddc8e(0xdf)](_0x3efa35,_0x266c46,_0x49a8a0[_0xcddc8e(0x92)]);break;}case v[_0xcddc8e(0xdb)]:{this['_threadCommentModel']['updateComment'](_0x3efa35,_0x266c46,{'commentId':_0x49a8a0['replyId'],'text':JSON[_0xcddc8e(0xb9)](_0x49a8a0[_0xcddc8e(0xa4)])});break;}case v[_0xcddc8e(0xa3)]:{const _0x5e89a2=(_0x368fbe=this[_0xcddc8e(0x9c)][_0xcddc8e(0xd4)](_0x49a8a0[_0xcddc8e(0xbf)])['find'](_0x11bb12=>_0x11bb12[_0xcddc8e(0xe0)]===_0x49a8a0[_0xcddc8e(0xe0)]))==null?void 0x0:_0x368fbe[_0xcddc8e(0xcf)];_0x5e89a2&&this['_threadCommentModel'][_0xcddc8e(0x98)](_0x3efa35,_0x266c46,_0x5e89a2['id'],_0x49a8a0[_0xcddc8e(0xe2)]===I[_0xcddc8e(0xa9)]);break;}}}));}};S=V([p(0x0,_0x5ee840(_0x4b60cb)),p(0x1,_0x5ee840(_0x147ce0)),p(0x2,_0x5ee840(_0x1ff591)),p(0x3,_0x5ee840(_0x55640e))],S);const z=_0x35f622(0x82),M={};var k=Object[_0x35f622(0xac)],Q=(_0x51f97a,_0x1a5fc2,_0xbd56b3,_0x5bdb05)=>{const _0x750660=_0x35f622;for(var _0x4335aa=_0x5bdb05>0x1?void 0x0:_0x5bdb05?k(_0x1a5fc2,_0xbd56b3):_0x1a5fc2,_0x36f690=_0x51f97a[_0x750660(0xa5)]-0x1,_0x34cdc5;_0x36f690>=0x0;_0x36f690--)(_0x34cdc5=_0x51f97a[_0x36f690])&&(_0x4335aa=_0x34cdc5(_0x4335aa)||_0x4335aa);return _0x4335aa;},_=(_0x361dc2,_0x3367bf)=>(_0x28b89f,_0x3b2cf2)=>_0x3367bf(_0x28b89f,_0x3b2cf2,_0x361dc2);function X(_0x2c1ede,_0x33ce9a){const _0xc1602f=_0x35f622,_0x594c51=_0x2c1ede[_0xc1602f(0xba)][0x0];return{..._0x33ce9a,'id':_0x594c51[_0xc1602f(0x92)],'resolved':_0x2c1ede[_0xc1602f(0xe2)]===0x1,'dT':D(_0x594c51['createTimestamp']),'personId':_0x594c51[_0xc1602f(0xe3)],'threadId':_0x594c51['threadId']};}function ee(_0x437eca,_0x28fd3d,_0x44ea4d){const _0x70b55a=_0x35f622;var _0x1b5ba5,_0x5c2b03;if(((_0x5c2b03=(_0x1b5ba5=_0x437eca==null?void 0x0:_0x437eca['replies'])==null?void 0x0:_0x1b5ba5[_0x70b55a(0xa5)])!=null?_0x5c2b03:0x0)>0x0){const _0x27af79=(_0x368a0b,_0x38a8f7)=>({'id':_0x368a0b[_0x70b55a(0x92)],'threadId':_0x368a0b[_0x70b55a(0xe0)],'dT':D(_0x368a0b[_0x70b55a(0x86)]),'personId':_0x368a0b[_0x70b55a(0xe3)],'resolved':_0x437eca['solved']===I[_0x70b55a(0xa9)],'unitId':_0x28fd3d,'subUnitId':_0x44ea4d,'text':JSON['parse'](_0x368a0b[_0x70b55a(0xa4)]),'parentId':_0x38a8f7}),_0x55d0f9=_0x27af79(_0x437eca[_0x70b55a(0xba)][0x0]);return{..._0x55d0f9,'children':_0x437eca[_0x70b55a(0xba)]['slice'](0x1)[_0x70b55a(0xaf)](_0x2b954e=>_0x27af79(_0x2b954e,_0x55d0f9['id']))};}return null;}let f=class{constructor(_0x50d33a,_0x58f5aa,_0x3cc0da,_0x5b7c6f){const _0x227f70=_0x35f622;this[_0x227f70(0x88)]=_0x50d33a,this[_0x227f70(0xda)]=_0x58f5aa,this[_0x227f70(0xc9)]=_0x3cc0da,this[_0x227f70(0xc8)]=_0x5b7c6f;}async[_0x35f622(0x8e)](_0x3dfab8){const _0x3b023e=_0x35f622;var _0x489ca1,_0x5d253c;const {parentId:_0x2b435e,unitId:_0x5e4185,text:_0x4fdf6c,threadId:_0x461cfa}=_0x3dfab8,_0x4dbb01=(_0x5d253c=(_0x489ca1=_0x4fdf6c['customRanges'])==null?void 0x0:_0x489ca1['filter'](_0x5dc21f=>_0x5dc21f['rangeType']===_0x335bcd[_0x3b023e(0xe1)])['map'](_0x126094=>_0x126094[_0x3b023e(0x8b)]))!=null?_0x5d253c:[],_0x4d8b07=JSON[_0x3b023e(0xc4)](_0x4fdf6c),_0x5a0ca8=(await this[_0x3b023e(0xc9)][_0x3b023e(0xd6)](_0x5e4185))['getMemberID']();if(_0x2b435e){const _0x1342bc={'memberId':_0x5a0ca8,'unitId':_0x5e4185,'content':_0x4d8b07,'mention':_0x4dbb01,'threadId':_0x461cfa},_0x3f970e=(await this['_httpService']['post'](_0x3b023e(0xa8)+_0x5e4185+_0x3b023e(0x85),{'body':_0x1342bc}))['body'][_0x3b023e(0xb5)];return{..._0x3dfab8,'id':_0x3f970e[_0x3b023e(0x92)],'dT':_0x269791(+_0x3f970e['createTimestamp'])[_0x3b023e(0xa0)](_0x3b023e(0x89)),'personId':_0x3f970e['userId']};}else{const _0x37544c={'memberId':_0x5a0ca8,'unitId':_0x5e4185,'content':_0x4d8b07,'mention':_0x4dbb01},_0x2d65a1=await this[_0x3b023e(0x88)]['post'](_0x3b023e(0xa8)+_0x5e4185+_0x3b023e(0x8f),{'body':_0x37544c});return X(_0x2d65a1['body'][_0x3b023e(0xd3)],_0x3dfab8);}}async[_0x35f622(0xd2)](_0x271465){const _0x267123=_0x35f622;var _0x3450c0,_0xc95b20;const {text:_0xe2305,unitId:_0x40a3f7}=_0x271465,_0x322750=(_0xc95b20=(_0x3450c0=_0xe2305[_0x267123(0xb8)])==null?void 0x0:_0x3450c0[_0x267123(0xd0)](_0x255c73=>_0x255c73[_0x267123(0xcb)]===_0x335bcd[_0x267123(0xe1)])[_0x267123(0xaf)](_0x518cd2=>_0x518cd2[_0x267123(0x8b)]))!=null?_0xc95b20:[],_0x4509ea=JSON[_0x267123(0xc4)](_0xe2305),_0x3e4068=_0x271465[_0x267123(0xe0)],_0x10bd8e=_0x271465['id'],_0x466d52={'memberId':(await this[_0x267123(0xc9)][_0x267123(0xd6)](_0x40a3f7))[_0x267123(0xbd)](),'unitId':_0x40a3f7,'threadId':_0x3e4068,'mention':_0x322750,'content':_0x4509ea,'replyId':_0x10bd8e},_0x547eba=await this[_0x267123(0x88)][_0x267123(0xd5)](_0x267123(0xa8)+_0x40a3f7+'/edit',{'body':_0x466d52});return!_0x547eba['body'][_0x267123(0xae)]||_0x547eba[_0x267123(0x9d)][_0x267123(0xae)]['code']===0x1;}async[_0x35f622(0x98)](_0x1fe854){const _0x177aa2=_0x35f622,{unitId:_0x5b7442}=_0x1fe854,_0x3651a8=_0x1fe854[_0x177aa2(0xe0)],_0x3db9a4={'memberId':this['_userService']['getCurrentUser']()[_0x177aa2(0xab)],'unitId':_0x5b7442,'threadId':_0x3651a8,'solved':_0x1fe854[_0x177aa2(0xd1)]?I[_0x177aa2(0xa9)]:I[_0x177aa2(0x93)]},_0x53c279=await this[_0x177aa2(0x88)][_0x177aa2(0xd5)](_0x177aa2(0xa8)+_0x5b7442+'/solved',{'body':_0x3db9a4});return!_0x53c279[_0x177aa2(0x9d)][_0x177aa2(0xae)]||_0x53c279[_0x177aa2(0x9d)][_0x177aa2(0xae)][_0x177aa2(0xcc)]===0x1;}async['deleteComment'](_0x447493,_0x115e7e,_0x82e5d5,_0xd1caa0){const _0xa38f44=_0x35f622,_0x4e78a1={'memberId':(await this[_0xa38f44(0xc9)][_0xa38f44(0xd6)](_0x447493))[_0xa38f44(0xbd)](),'threadId':_0x82e5d5,'replyId':_0xd1caa0,'unitId':_0x447493},_0x18f034=await this['_httpService'][_0xa38f44(0xd5)](_0xa38f44(0xa8)+_0x447493+_0xa38f44(0xb7),{'body':_0x4e78a1});return!_0x18f034[_0xa38f44(0x9d)][_0xa38f44(0xae)]||_0x18f034[_0xa38f44(0x9d)][_0xa38f44(0xae)]['code']===0x1;}async[_0x35f622(0xa6)](_0x3d9b36,_0x6d5352,_0x2b5ad7){const _0x3c37cf=_0x35f622,_0x1fd422={'unitId':_0x3d9b36,'threadId':_0x2b5ad7},_0x4aa0ad=await this[_0x3c37cf(0x88)][_0x3c37cf(0xd5)](_0x3c37cf(0xa8)+_0x3d9b36+_0x3c37cf(0xbc),{'body':_0x1fd422}),_0xbc15c6=_0x2b5ad7[_0x3c37cf(0xaf)](_0xce2053=>ee(_0x4aa0ad[_0x3c37cf(0x9d)][_0x3c37cf(0xb6)][_0xce2053],_0x3d9b36,_0x6d5352))[_0x3c37cf(0xd0)](Boolean);return Object['values'](_0x4aa0ad['body'][_0x3c37cf(0x97)])[_0x3c37cf(0x81)](_0x33e89e=>{const _0x3543ec=_0x3c37cf;this[_0x3543ec(0xda)][_0x3543ec(0xc5)](_0x33e89e);}),_0xbc15c6;}[_0x35f622(0x96)](_0x2104a1){const _0x3f2ffd=_0x35f622;return{'id':_0x2104a1['id'],'threadId':_0x2104a1[_0x3f2ffd(0xe0)],'ref':_0x2104a1[_0x3f2ffd(0x87)]};}};f=Q([_(0x0,_0x5ee840(_0x714c0)),_(0x1,_0x5ee840(_0x1ff591)),_(0x2,_0x5ee840(_0x2c2f5a)),_(0x3,_0x5ee840(_0x55640e))],f);var re=Object[_0x35f622(0xac)],te=(_0x272a61,_0xe43b3e,_0x49fecd,_0x12b5b1)=>{const _0x35b499=_0x35f622;for(var _0x4c3781=_0x12b5b1>0x1?void 0x0:_0x12b5b1?re(_0xe43b3e,_0x49fecd):_0xe43b3e,_0x1b2fa2=_0x272a61[_0x35b499(0xa5)]-0x1,_0x116346;_0x1b2fa2>=0x0;_0x1b2fa2--)(_0x116346=_0x272a61[_0x1b2fa2])&&(_0x4c3781=_0x116346(_0x4c3781)||_0x4c3781);return _0x4c3781;},N=(_0x5d522c,_0x30f5f4)=>(_0x2a707c,_0x5b854)=>_0x30f5f4(_0x2a707c,_0x5b854,_0x5d522c);let g=class extends _0x2b7514{constructor(_0x5e5a8d,_0x1ec3ae){const _0x3a5543=_0x35f622;super(),this[_0x3a5543(0xb0)]=_0x5e5a8d,this[_0x3a5543(0xc0)]=_0x1ec3ae,this[_0x3a5543(0x8a)]();}[_0x35f622(0x8a)](){const _0x577bed=_0x35f622;this[_0x577bed(0xb0)][_0x577bed(0xb2)]=this['_threadCommentDataSource'],this[_0x577bed(0xb0)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x217b63),N(0x1,_0x5ee840(f))],g);var se=Object[_0x35f622(0xa1)],oe=Object[_0x35f622(0xac)],ne=(_0x2b883b,_0x579912,_0x20d538)=>_0x579912 in _0x2b883b?se(_0x2b883b,_0x579912,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x20d538}):_0x2b883b[_0x579912]=_0x20d538,ie=(_0x4aa11b,_0x567acf,_0x2958bb,_0x33a7fc)=>{const _0x415228=_0x35f622;for(var _0x1f08e1=_0x33a7fc>0x1?void 0x0:_0x33a7fc?oe(_0x567acf,_0x2958bb):_0x567acf,_0x4d98a3=_0x4aa11b[_0x415228(0xa5)]-0x1,_0x1f03bf;_0x4d98a3>=0x0;_0x4d98a3--)(_0x1f03bf=_0x4aa11b[_0x4d98a3])&&(_0x1f08e1=_0x1f03bf(_0x1f08e1)||_0x1f08e1);return _0x1f08e1;},w=(_0x2ef0a1,_0x53ec45)=>(_0x3561b9,_0x118ca7)=>_0x53ec45(_0x3561b9,_0x118ca7,_0x2ef0a1),$=(_0x57a3de,_0x42dae5,_0x164089)=>ne(_0x57a3de,typeof _0x42dae5!='symbol'?_0x42dae5+'':_0x42dae5,_0x164089);let b=class extends _0x223b2b{constructor(_0x5662f7=M,_0x45c20b,_0x373bc4){const _0x411667=_0x35f622;super(),this[_0x411667(0x84)]=_0x5662f7,this['_injector']=_0x45c20b,this['_configService']=_0x373bc4;const {..._0x277ebf}=_0x20f8a7({},M,this[_0x411667(0x84)]);this[_0x411667(0x9b)][_0x411667(0xc7)](z,_0x277ebf);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x2a45c8=>{const _0x1c8826=_0x5cab;this[_0x1c8826(0xc8)][_0x1c8826(0xc6)](_0x2a45c8);});}['onReady'](){const _0x2d0d6d=_0x35f622;this[_0x2d0d6d(0xc8)][_0x2d0d6d(0x99)](g),this[_0x2d0d6d(0xc8)][_0x2d0d6d(0x99)](S);}};function _0x2c57(){const _0x506809=['forEach','thread-comment-data-source.config','commentUpdate$','_config','/reply','createTimestamp','ref','_httpService','YYYY/MM/DD\x20HH:mm','_initDataSource','rangeId','39148kRXgXO','getUser','addComment','/add','size','parentId','replyId','OpenOrReOpen','Add','getComment','saveCommentToSnapshot','users','resolveComment','get','delete','_configService','_threadCommentModel','body','pipe','find','format','defineProperty','_initUserSync','Solve','content','length','listComments','103100cpCNfz','/universer-api/comment/unit/','Solved','Unknown','userID','getOwnPropertyDescriptor','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','error','map','_threadCommentDataSourceService','Reply','dataSource','927840zKQEDj','payload','reply','comments','/delete','customRanges','parse','replies','144589EmeniB','/list','getMemberID','Delete','unitId','_threadCommentDataSource','1460496OAYQSK','221295ovGihH','disposeWithMe','stringify','addUser','add','setConfig','_injector','_sessionService','type','rangeType','code','subscribe','342lWzpeQ','root','filter','resolved','updateComment','comment','getUnit','post','requireSession','/universer-api/user/list','42nhHaoM','881783ekwohx','_userService','Edit','UNIVER_UNKNOWN','UNRECOGNIZED','user','deleteComment','threadId','COMMENT','solved','userId','33PpQjPQ'];_0x2c57=function(){return _0x506809;};return _0x2c57();}$(b,'pluginName',W),$(b,_0x35f622(0xca),_0x238f45[_0x35f622(0xdc)]),b=ie([_0x21b651(_0x2a1676,_0x177d49,_0x843546),w(0x1,_0x5ee840(_0x55640e)),w(0x2,_0x3ef499)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x156056=_0x2456;(function(_0x20a7c2,_0x1d5fc3){const _0x68fe54=_0x2456,_0x40f370=_0x20a7c2();while(!![]){try{const _0x5194d3=parseInt(_0x68fe54(0x141))/0x1+parseInt(_0x68fe54(0x114))/0x2*(parseInt(_0x68fe54(0x157))/0x3)+parseInt(_0x68fe54(0x127))/0x4+-parseInt(_0x68fe54(0x168))/0x5+parseInt(_0x68fe54(0x11f))/0x6*(-parseInt(_0x68fe54(0x136))/0x7)+parseInt(_0x68fe54(0x166))/0x8*(parseInt(_0x68fe54(0x149))/0x9)+parseInt(_0x68fe54(0x116))/0xa;if(_0x5194d3===_0x1d5fc3)break;else _0x40f370['push'](_0x40f370['shift']());}catch(_0x16e1bc){_0x40f370['push'](_0x40f370['shift']());}}}(_0xc8e1,0x3ea1e));import{CommentService as _0x585108,CollaborationSessionService as _0x55d06f,UniverCollaborationClientPlugin as _0x2a0e3c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x576c81}from'@univerjs-pro/license';import{dayjs as _0x29a7b8,UserManagerService as _0x3b7c6a,Inject as _0xa1f4a5,Injector as _0x467e49,Disposable as _0x329f5c,CustomRangeType as _0x364f98,UniverInstanceType as _0x5183dd,DependentOn as _0x12fb17,IConfigService as _0x1abcfa,Plugin as _0x239e11,merge as _0x29ada1}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x507370}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x28d422,IThreadCommentDataSourceService as _0xa48844}from'@univerjs/thread-comment';import{bufferTime as _0x1e78a8}from'rxjs';import{HTTPService as _0x581e56}from'@univerjs/network';const W=_0x156056(0x12f);var I=(_0x1016ca=>(_0x1016ca[_0x1016ca[_0x156056(0x158)]=0x0]=_0x156056(0x158),_0x1016ca[_0x1016ca['Solved']=0x1]=_0x156056(0x11b),_0x1016ca[_0x1016ca[_0x156056(0x15e)]=-0x1]='UNRECOGNIZED',_0x1016ca))(I||{}),v=(_0x37796f=>(_0x37796f[_0x37796f[_0x156056(0x15f)]=0x0]='Unknown',_0x37796f[_0x37796f['Add']=0x1]=_0x156056(0x12c),_0x37796f[_0x37796f['Reply']=0x2]='Reply',_0x37796f[_0x37796f[_0x156056(0x13d)]=0x3]='Edit',_0x37796f[_0x37796f[_0x156056(0x118)]=0x4]=_0x156056(0x118),_0x37796f[_0x37796f[_0x156056(0x162)]=0x5]=_0x156056(0x162),_0x37796f[_0x37796f[_0x156056(0x15e)]=-0x1]=_0x156056(0x15e),_0x37796f))(v||{});const D=_0x43f4de=>_0x29a7b8(new Date(+_0x43f4de))[_0x156056(0x122)](_0x156056(0x129)),B=async(_0x22a29d,_0x13a601)=>{const _0x2a1314=_0x156056,_0x40c388=_0x22a29d[_0x2a1314(0x14e)](_0x3b7c6a),_0x320ab6=_0x22a29d[_0x2a1314(0x14e)](_0x581e56);_0x13a601[_0x2a1314(0x134)](_0x2824b6=>{_0x40c388['getUser'](_0x2824b6)&&_0x13a601['delete'](_0x2824b6);}),_0x13a601[_0x2a1314(0x152)]&&(await _0x320ab6[_0x2a1314(0x14e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x13a601]}}))['body'][_0x2a1314(0x133)][_0x2a1314(0x134)](_0x1c33a0=>{const _0x4e7395=_0x2a1314;_0x1c33a0&&_0x40c388[_0x4e7395(0x161)](_0x1c33a0);});};function _0x2456(_0x4c12e8,_0x3d7bc7){const _0xc8e1ba=_0xc8e1();return _0x2456=function(_0x245614,_0x2ea907){_0x245614=_0x245614-0x10e;let _0x5bb234=_0xc8e1ba[_0x245614];return _0x5bb234;},_0x2456(_0x4c12e8,_0x3d7bc7);}var K=Object[_0x156056(0x167)],V=(_0x3b2791,_0x1609d7,_0x25fe0c,_0x3d6d82)=>{const _0x1c04fb=_0x156056;for(var _0x26ffe0=_0x3d6d82>0x1?void 0x0:_0x3d6d82?K(_0x1609d7,_0x25fe0c):_0x1609d7,_0x445793=_0x3b2791[_0x1c04fb(0x130)]-0x1,_0x4edd96;_0x445793>=0x0;_0x445793--)(_0x4edd96=_0x3b2791[_0x445793])&&(_0x26ffe0=_0x4edd96(_0x26ffe0)||_0x26ffe0);return _0x26ffe0;},p=(_0x3915d1,_0x1f847f)=>(_0x465386,_0x3c9236)=>_0x1f847f(_0x465386,_0x3c9236,_0x3915d1);let S=class extends _0x329f5c{constructor(_0x31b552,_0x1540da,_0x227bf2,_0x3963a1){const _0xe7ef26=_0x156056;super(),this[_0xe7ef26(0x15c)]=_0x31b552,this[_0xe7ef26(0x128)]=_0x1540da,this['_userService']=_0x227bf2,this[_0xe7ef26(0x155)]=_0x3963a1,this[_0xe7ef26(0x132)](),this[_0xe7ef26(0x12d)]();}[_0x156056(0x12d)](){const _0x101168=_0x156056;this[_0x101168(0x165)](this[_0x101168(0x128)][_0x101168(0x111)][_0x101168(0x14b)](_0x1e78a8(0x10))[_0x101168(0x150)](_0x2d5363=>{const _0x39f921=_0x101168,_0x22d89f=new Set();_0x2d5363['forEach'](_0x3ad8bd=>{const _0x26a9f6=_0x2456;switch(_0x3ad8bd[_0x26a9f6(0x117)]){case'add':{const _0x3b1a6d=_0x3ad8bd[_0x26a9f6(0x163)][_0x26a9f6(0x119)];_0x22d89f['add'](_0x3b1a6d);break;}}}),B(this[_0x39f921(0x155)],_0x22d89f);}));}[_0x156056(0x132)](){const _0x29a7f2=_0x156056;this[_0x29a7f2(0x165)](this['_commentService'][_0x29a7f2(0x111)][_0x29a7f2(0x150)](async _0x3aa7b2=>{const _0x20d005=_0x29a7f2;var _0x1aeaab,_0x362222,_0x5e1ce8,_0xdfeded;const _0x389266=(_0x1aeaab=this[_0x20d005(0x128)][_0x20d005(0x144)](_0x3aa7b2[_0x20d005(0x115)])[_0x20d005(0x14a)](_0x2fc067=>_0x2fc067[_0x20d005(0x121)]===_0x3aa7b2[_0x20d005(0x121)]))==null?void 0x0:_0x1aeaab[_0x20d005(0x142)];if(!_0x389266)return;const {unitId:_0x560d4b,subUnitId:_0x39f6b0}=_0x389266;switch(_0x3aa7b2['user']&&this[_0x20d005(0x164)][_0x20d005(0x161)](_0x3aa7b2[_0x20d005(0x126)]),_0x3aa7b2['type']){case v[_0x20d005(0x12c)]:break;case v[_0x20d005(0x151)]:{this[_0x20d005(0x128)][_0x20d005(0x147)](_0x560d4b,_0x39f6b0,{'unitId':_0x560d4b,'subUnitId':_0x39f6b0,'ref':'','id':_0x3aa7b2['replyId'],'dT':D(+_0x3aa7b2[_0x20d005(0x160)]),'threadId':_0x3aa7b2['threadId'],'personId':(_0x5e1ce8=(_0x362222=_0x3aa7b2['user'])==null?void 0x0:_0x362222['userID'])!=null?_0x5e1ce8:_0x3aa7b2[_0x20d005(0x12e)],'text':JSON['parse'](_0x3aa7b2['content']),'parentId':_0x389266['id']});break;}case v['Delete']:{const _0x331be0=this[_0x20d005(0x128)][_0x20d005(0x16d)](_0x560d4b,_0x39f6b0,_0x3aa7b2['replyId']);_0x331be0&&_0x331be0[_0x20d005(0x13a)]&&this[_0x20d005(0x128)]['deleteComment'](_0x560d4b,_0x39f6b0,_0x3aa7b2[_0x20d005(0x15a)]);break;}case v[_0x20d005(0x13d)]:{this['_threadCommentModel']['updateComment'](_0x560d4b,_0x39f6b0,{'commentId':_0x3aa7b2[_0x20d005(0x15a)],'text':JSON['parse'](_0x3aa7b2['content'])});break;}case v[_0x20d005(0x162)]:{const _0x12ce01=(_0xdfeded=this[_0x20d005(0x128)][_0x20d005(0x144)](_0x3aa7b2[_0x20d005(0x115)])[_0x20d005(0x14a)](_0xe352f7=>_0xe352f7['threadId']===_0x3aa7b2[_0x20d005(0x121)]))==null?void 0x0:_0xdfeded[_0x20d005(0x142)];_0x12ce01&&this[_0x20d005(0x128)][_0x20d005(0x11c)](_0x560d4b,_0x39f6b0,_0x12ce01['id'],_0x3aa7b2[_0x20d005(0x145)]===I[_0x20d005(0x11b)]);break;}}}));}};S=V([p(0x0,_0xa1f4a5(_0x585108)),p(0x1,_0xa1f4a5(_0x28d422)),p(0x2,_0xa1f4a5(_0x3b7c6a)),p(0x3,_0xa1f4a5(_0x467e49))],S);const z='thread-comment-data-source.config',M={};function _0xc8e1(){const _0x39b3f9=['find','pipe','_threadCommentDataSourceService','onStarting','get','/universer-api/comment/unit/','subscribe','Reply','size','slice','getCurrentUser','_injector','_threadCommentDataSource','479097uOfuEm','OpenOrReOpen','comment','replyId','comments','_commentService','rangeType','UNRECOGNIZED','Unknown','createTimestamp','addUser','Solve','payload','_userService','disposeWithMe','3056jNFFfa','getOwnPropertyDescriptor','2266985wAcCtD','ref','customRanges','content','resolved','getComment','symbol','userID','_config','commentUpdate$','add','values','4vrIPwt','unitId','4520230hiDsQq','type','Delete','personId','_httpService','Solved','resolveComment','setConfig','_sessionService','4638ugxPzA','/solved','threadId','format','/add','_initDataSource','getMemberID','user','713124lSpvsP','_threadCommentModel','YYYY/MM/DD\x20HH:mm','filter','rangeId','Add','_initUserSync','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','code','_init','users','forEach','onReady','4354rmFpVS','/delete','_configService','requireSession','parentId','/reply','post','Edit','body','error','replies','142105IfCHxx','root','map','getUnit','solved','stringify','addComment','reply','2331NrhPvQ'];_0xc8e1=function(){return _0x39b3f9;};return _0xc8e1();}var k=Object[_0x156056(0x167)],Q=(_0x1d4abd,_0x55ea39,_0xa2396e,_0x45cc93)=>{const _0x341bf6=_0x156056;for(var _0x2601e6=_0x45cc93>0x1?void 0x0:_0x45cc93?k(_0x55ea39,_0xa2396e):_0x55ea39,_0x463efd=_0x1d4abd[_0x341bf6(0x130)]-0x1,_0x26ffd5;_0x463efd>=0x0;_0x463efd--)(_0x26ffd5=_0x1d4abd[_0x463efd])&&(_0x2601e6=_0x26ffd5(_0x2601e6)||_0x2601e6);return _0x2601e6;},_=(_0x44f823,_0x4e6144)=>(_0x52e865,_0x1a0aec)=>_0x4e6144(_0x52e865,_0x1a0aec,_0x44f823);function X(_0x1c5532,_0x44d280){const _0x299dd1=_0x156056,_0x513332=_0x1c5532['replies'][0x0];return{..._0x44d280,'id':_0x513332[_0x299dd1(0x15a)],'resolved':_0x1c5532[_0x299dd1(0x145)]===0x1,'dT':D(_0x513332[_0x299dd1(0x160)]),'personId':_0x513332[_0x299dd1(0x12e)],'threadId':_0x513332[_0x299dd1(0x121)]};}function ee(_0x1782e9,_0x1aa38b,_0x44d93c){const _0x41a88e=_0x156056;var _0x266e7e,_0x4ccf46;if(((_0x4ccf46=(_0x266e7e=_0x1782e9==null?void 0x0:_0x1782e9[_0x41a88e(0x140)])==null?void 0x0:_0x266e7e[_0x41a88e(0x130)])!=null?_0x4ccf46:0x0)>0x0){const _0x2be37d=(_0x1ac1d6,_0x187c23)=>({'id':_0x1ac1d6['replyId'],'threadId':_0x1ac1d6['threadId'],'dT':D(_0x1ac1d6[_0x41a88e(0x160)]),'personId':_0x1ac1d6['userId'],'resolved':_0x1782e9[_0x41a88e(0x145)]===I['Solved'],'unitId':_0x1aa38b,'subUnitId':_0x44d93c,'text':JSON['parse'](_0x1ac1d6[_0x41a88e(0x16b)]),'parentId':_0x187c23}),_0xfb42ee=_0x2be37d(_0x1782e9[_0x41a88e(0x140)][0x0]);return{..._0xfb42ee,'children':_0x1782e9['replies'][_0x41a88e(0x153)](0x1)[_0x41a88e(0x143)](_0x192254=>_0x2be37d(_0x192254,_0xfb42ee['id']))};}return null;}let f=class{constructor(_0xe36bad,_0x28940f,_0x468e6b,_0x3e00d5){const _0x41b8e8=_0x156056;this[_0x41b8e8(0x11a)]=_0xe36bad,this['_userService']=_0x28940f,this['_sessionService']=_0x468e6b,this[_0x41b8e8(0x155)]=_0x3e00d5;}async[_0x156056(0x147)](_0x41e943){const _0x3f87cb=_0x156056;var _0x26dab2,_0x5b8a0c;const {parentId:_0x1ef24b,unitId:_0x28a974,text:_0x2984a5,threadId:_0x27aa9a}=_0x41e943,_0x3ab062=(_0x5b8a0c=(_0x26dab2=_0x2984a5[_0x3f87cb(0x16a)])==null?void 0x0:_0x26dab2[_0x3f87cb(0x12a)](_0x175e95=>_0x175e95[_0x3f87cb(0x15d)]===_0x364f98['COMMENT'])['map'](_0x517bf9=>_0x517bf9[_0x3f87cb(0x12b)]))!=null?_0x5b8a0c:[],_0x4e47a1=JSON[_0x3f87cb(0x146)](_0x2984a5),_0x37d0f2=(await this[_0x3f87cb(0x11e)][_0x3f87cb(0x139)](_0x28a974))[_0x3f87cb(0x125)]();if(_0x1ef24b){const _0x32edac={'memberId':_0x37d0f2,'unitId':_0x28a974,'content':_0x4e47a1,'mention':_0x3ab062,'threadId':_0x27aa9a},_0x5e3c83=(await this[_0x3f87cb(0x11a)]['post'](_0x3f87cb(0x14f)+_0x28a974+_0x3f87cb(0x13b),{'body':_0x32edac}))[_0x3f87cb(0x13e)][_0x3f87cb(0x148)];return{..._0x41e943,'id':_0x5e3c83[_0x3f87cb(0x15a)],'dT':_0x29a7b8(+_0x5e3c83[_0x3f87cb(0x160)])[_0x3f87cb(0x122)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5e3c83['userId']};}else{const _0x2263db={'memberId':_0x37d0f2,'unitId':_0x28a974,'content':_0x4e47a1,'mention':_0x3ab062},_0x17a925=await this[_0x3f87cb(0x11a)][_0x3f87cb(0x13c)](_0x3f87cb(0x14f)+_0x28a974+_0x3f87cb(0x123),{'body':_0x2263db});return X(_0x17a925[_0x3f87cb(0x13e)][_0x3f87cb(0x159)],_0x41e943);}}async['updateComment'](_0xb833f8){const _0x2e1b21=_0x156056;var _0x5e6b70,_0x9c7b7a;const {text:_0x4da092,unitId:_0x346bf5}=_0xb833f8,_0x5554d4=(_0x9c7b7a=(_0x5e6b70=_0x4da092[_0x2e1b21(0x16a)])==null?void 0x0:_0x5e6b70[_0x2e1b21(0x12a)](_0x249967=>_0x249967['rangeType']===_0x364f98['COMMENT'])[_0x2e1b21(0x143)](_0x4028bc=>_0x4028bc[_0x2e1b21(0x12b)]))!=null?_0x9c7b7a:[],_0x54e6fc=JSON[_0x2e1b21(0x146)](_0x4da092),_0x1e74ca=_0xb833f8[_0x2e1b21(0x121)],_0x4e0a64=_0xb833f8['id'],_0xa7a531={'memberId':(await this[_0x2e1b21(0x11e)][_0x2e1b21(0x139)](_0x346bf5))[_0x2e1b21(0x125)](),'unitId':_0x346bf5,'threadId':_0x1e74ca,'mention':_0x5554d4,'content':_0x54e6fc,'replyId':_0x4e0a64},_0x32f297=await this[_0x2e1b21(0x11a)][_0x2e1b21(0x13c)]('/universer-api/comment/unit/'+_0x346bf5+'/edit',{'body':_0xa7a531});return!_0x32f297['body']['error']||_0x32f297['body'][_0x2e1b21(0x13f)]['code']===0x1;}async['resolveComment'](_0x476469){const _0x14c8f0=_0x156056,{unitId:_0x10b187}=_0x476469,_0x569166=_0x476469[_0x14c8f0(0x121)],_0x59123f={'memberId':this[_0x14c8f0(0x164)][_0x14c8f0(0x154)]()[_0x14c8f0(0x10f)],'unitId':_0x10b187,'threadId':_0x569166,'solved':_0x476469[_0x14c8f0(0x16c)]?I[_0x14c8f0(0x11b)]:I[_0x14c8f0(0x158)]},_0x478d60=await this[_0x14c8f0(0x11a)][_0x14c8f0(0x13c)]('/universer-api/comment/unit/'+_0x10b187+_0x14c8f0(0x120),{'body':_0x59123f});return!_0x478d60[_0x14c8f0(0x13e)][_0x14c8f0(0x13f)]||_0x478d60[_0x14c8f0(0x13e)][_0x14c8f0(0x13f)][_0x14c8f0(0x131)]===0x1;}async['deleteComment'](_0x103939,_0x5d3b85,_0x3a5fca,_0x305080){const _0x167b49=_0x156056,_0x2262bf={'memberId':(await this[_0x167b49(0x11e)][_0x167b49(0x139)](_0x103939))[_0x167b49(0x125)](),'threadId':_0x3a5fca,'replyId':_0x305080,'unitId':_0x103939},_0x5c6d03=await this[_0x167b49(0x11a)][_0x167b49(0x13c)]('/universer-api/comment/unit/'+_0x103939+_0x167b49(0x137),{'body':_0x2262bf});return!_0x5c6d03[_0x167b49(0x13e)][_0x167b49(0x13f)]||_0x5c6d03[_0x167b49(0x13e)][_0x167b49(0x13f)][_0x167b49(0x131)]===0x1;}async['listComments'](_0x242f39,_0x3770c4,_0x4cc007){const _0x2565fc=_0x156056,_0x373546={'unitId':_0x242f39,'threadId':_0x4cc007},_0x304036=await this[_0x2565fc(0x11a)]['post'](_0x2565fc(0x14f)+_0x242f39+'/list',{'body':_0x373546}),_0x3dd9b9=_0x4cc007[_0x2565fc(0x143)](_0x52a210=>ee(_0x304036[_0x2565fc(0x13e)][_0x2565fc(0x15b)][_0x52a210],_0x242f39,_0x3770c4))['filter'](Boolean);return Object[_0x2565fc(0x113)](_0x304036[_0x2565fc(0x13e)]['users'])[_0x2565fc(0x134)](_0x563f1b=>{const _0x124cd9=_0x2565fc;this['_userService'][_0x124cd9(0x161)](_0x563f1b);}),_0x3dd9b9;}['saveCommentToSnapshot'](_0x38cf18){const _0x187eea=_0x156056;return{'id':_0x38cf18['id'],'threadId':_0x38cf18[_0x187eea(0x121)],'ref':_0x38cf18[_0x187eea(0x169)]};}};f=Q([_(0x0,_0xa1f4a5(_0x581e56)),_(0x1,_0xa1f4a5(_0x3b7c6a)),_(0x2,_0xa1f4a5(_0x55d06f)),_(0x3,_0xa1f4a5(_0x467e49))],f);var re=Object[_0x156056(0x167)],te=(_0x458293,_0x1ca14f,_0x4207b3,_0x46b4a4)=>{const _0x580f09=_0x156056;for(var _0x17d475=_0x46b4a4>0x1?void 0x0:_0x46b4a4?re(_0x1ca14f,_0x4207b3):_0x1ca14f,_0x7153ca=_0x458293[_0x580f09(0x130)]-0x1,_0x10f1b2;_0x7153ca>=0x0;_0x7153ca--)(_0x10f1b2=_0x458293[_0x7153ca])&&(_0x17d475=_0x10f1b2(_0x17d475)||_0x17d475);return _0x17d475;},N=(_0x3c6250,_0x134122)=>(_0x1517f3,_0x3fc326)=>_0x134122(_0x1517f3,_0x3fc326,_0x3c6250);let g=class extends _0x329f5c{constructor(_0xe81fa,_0x2417c9){const _0x4c0951=_0x156056;super(),this[_0x4c0951(0x14c)]=_0xe81fa,this[_0x4c0951(0x156)]=_0x2417c9,this[_0x4c0951(0x124)]();}['_initDataSource'](){const _0x1515a1=_0x156056;this[_0x1515a1(0x14c)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xa48844),N(0x1,_0xa1f4a5(f))],g);var se=Object['defineProperty'],oe=Object[_0x156056(0x167)],ne=(_0x1e35b8,_0x3f0a5c,_0x358331)=>_0x3f0a5c in _0x1e35b8?se(_0x1e35b8,_0x3f0a5c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x358331}):_0x1e35b8[_0x3f0a5c]=_0x358331,ie=(_0x3619b6,_0xe59082,_0xb271be,_0x1c0fa4)=>{const _0x3328b6=_0x156056;for(var _0x13fa9f=_0x1c0fa4>0x1?void 0x0:_0x1c0fa4?oe(_0xe59082,_0xb271be):_0xe59082,_0x3a80cc=_0x3619b6[_0x3328b6(0x130)]-0x1,_0x349c6e;_0x3a80cc>=0x0;_0x3a80cc--)(_0x349c6e=_0x3619b6[_0x3a80cc])&&(_0x13fa9f=_0x349c6e(_0x13fa9f)||_0x13fa9f);return _0x13fa9f;},w=(_0x39533e,_0x26f6c4)=>(_0x4c2b17,_0xd48a5c)=>_0x26f6c4(_0x4c2b17,_0xd48a5c,_0x39533e),$=(_0x4bbf12,_0x1c041a,_0x2cdcf2)=>ne(_0x4bbf12,typeof _0x1c041a!=_0x156056(0x10e)?_0x1c041a+'':_0x1c041a,_0x2cdcf2);let b=class extends _0x239e11{constructor(_0x45dd26=M,_0x116394,_0x1bfa8a){const _0x2a1210=_0x156056;super(),this['_config']=_0x45dd26,this['_injector']=_0x116394,this[_0x2a1210(0x138)]=_0x1bfa8a;const {..._0x37b173}=_0x29ada1({},M,this[_0x2a1210(0x110)]);this[_0x2a1210(0x138)][_0x2a1210(0x11d)](z,_0x37b173);}[_0x156056(0x14d)](){const _0xfad2c7=_0x156056;[[f],[g],[S]][_0xfad2c7(0x134)](_0x2fbabf=>{const _0x42ca9f=_0xfad2c7;this[_0x42ca9f(0x155)][_0x42ca9f(0x112)](_0x2fbabf);});}[_0x156056(0x135)](){const _0x4d1d01=_0x156056;this[_0x4d1d01(0x155)]['get'](g),this[_0x4d1d01(0x155)][_0x4d1d01(0x14e)](S);}};$(b,'pluginName',W),$(b,_0x156056(0x117),_0x5183dd['UNIVER_UNKNOWN']),b=ie([_0x12fb17(_0x507370,_0x2a0e3c,_0x576c81),w(0x1,_0xa1f4a5(_0x467e49)),w(0x2,_0x1abcfa)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x35f622=_0x5cab;(function(_0x1b2cd9,_0x5da74d){const _0x5e12c8=_0x5cab,_0x25c4c3=_0x1b2cd9();while(!![]){try{const _0x5dcee1=-parseInt(_0x5e12c8(0xbb))/0x1+-parseInt(_0x5e12c8(0x8c))/0x2*(-parseInt(_0x5e12c8(0xe4))/0x3)+parseInt(_0x5e12c8(0xc1))/0x4+parseInt(_0x5e12c8(0xc2))/0x5*(-parseInt(_0x5e12c8(0xd8))/0x6)+-parseInt(_0x5e12c8(0xd9))/0x7+-parseInt(_0x5e12c8(0xb3))/0x8+parseInt(_0x5e12c8(0xce))/0x9*(parseInt(_0x5e12c8(0xa7))/0xa);if(_0x5dcee1===_0x5da74d)break;else _0x25c4c3['push'](_0x25c4c3['shift']());}catch(_0x2f75ac){_0x25c4c3['push'](_0x25c4c3['shift']());}}}(_0x2c57,0x4359b));import{CommentService as _0x4b60cb,CollaborationSessionService as _0x2c2f5a,UniverCollaborationClientPlugin as _0x177d49}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x843546}from'@univerjs-pro/license';import{dayjs as _0x269791,UserManagerService as _0x1ff591,Inject as _0x5ee840,Injector as _0x55640e,Disposable as _0x2b7514,CustomRangeType as _0x335bcd,UniverInstanceType as _0x238f45,DependentOn as _0x21b651,IConfigService as _0x3ef499,Plugin as _0x223b2b,merge as _0x20f8a7}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2a1676}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x147ce0,IThreadCommentDataSourceService as _0x217b63}from'@univerjs/thread-comment';import{bufferTime as _0x1f8f94}from'rxjs';import{HTTPService as _0x714c0}from'@univerjs/network';const W=_0x35f622(0xad);var I=(_0x39faa5=>(_0x39faa5[_0x39faa5[_0x35f622(0x93)]=0x0]=_0x35f622(0x93),_0x39faa5[_0x39faa5[_0x35f622(0xa9)]=0x1]=_0x35f622(0xa9),_0x39faa5[_0x39faa5[_0x35f622(0xdd)]=-0x1]=_0x35f622(0xdd),_0x39faa5))(I||{}),v=(_0x21e2cc=>(_0x21e2cc[_0x21e2cc[_0x35f622(0xaa)]=0x0]=_0x35f622(0xaa),_0x21e2cc[_0x21e2cc[_0x35f622(0x94)]=0x1]=_0x35f622(0x94),_0x21e2cc[_0x21e2cc[_0x35f622(0xb1)]=0x2]=_0x35f622(0xb1),_0x21e2cc[_0x21e2cc[_0x35f622(0xdb)]=0x3]=_0x35f622(0xdb),_0x21e2cc[_0x21e2cc[_0x35f622(0xbe)]=0x4]=_0x35f622(0xbe),_0x21e2cc[_0x21e2cc[_0x35f622(0xa3)]=0x5]=_0x35f622(0xa3),_0x21e2cc[_0x21e2cc[_0x35f622(0xdd)]=-0x1]=_0x35f622(0xdd),_0x21e2cc))(v||{});const D=_0x2995a0=>_0x269791(new Date(+_0x2995a0))['format'](_0x35f622(0x89)),B=async(_0x541115,_0x2e973b)=>{const _0x5df6e6=_0x35f622,_0x334860=_0x541115[_0x5df6e6(0x99)](_0x1ff591),_0x27f671=_0x541115[_0x5df6e6(0x99)](_0x714c0);_0x2e973b[_0x5df6e6(0x81)](_0x372532=>{const _0x3e2d9f=_0x5df6e6;_0x334860[_0x3e2d9f(0x8d)](_0x372532)&&_0x2e973b[_0x3e2d9f(0x9a)](_0x372532);}),_0x2e973b[_0x5df6e6(0x90)]&&(await _0x27f671[_0x5df6e6(0x99)](_0x5df6e6(0xd7),{'params':{'userIDs':[..._0x2e973b]}}))[_0x5df6e6(0x9d)]['users'][_0x5df6e6(0x81)](_0x152cac=>{_0x152cac&&_0x334860['addUser'](_0x152cac);});};function _0x5cab(_0x386b70,_0x459290){const _0x2c57e9=_0x2c57();return _0x5cab=function(_0x5cabe5,_0x2f8474){_0x5cabe5=_0x5cabe5-0x81;let _0x362657=_0x2c57e9[_0x5cabe5];return _0x362657;},_0x5cab(_0x386b70,_0x459290);}var K=Object['getOwnPropertyDescriptor'],V=(_0x5ac705,_0x5d4635,_0x1f923a,_0x3c3872)=>{for(var _0x297b77=_0x3c3872>0x1?void 0x0:_0x3c3872?K(_0x5d4635,_0x1f923a):_0x5d4635,_0x128eab=_0x5ac705['length']-0x1,_0x2510fe;_0x128eab>=0x0;_0x128eab--)(_0x2510fe=_0x5ac705[_0x128eab])&&(_0x297b77=_0x2510fe(_0x297b77)||_0x297b77);return _0x297b77;},p=(_0x38df0a,_0x58cec8)=>(_0x1a5010,_0x47a2e1)=>_0x58cec8(_0x1a5010,_0x47a2e1,_0x38df0a);let S=class extends _0x2b7514{constructor(_0x570cf4,_0x5e05f7,_0x5cd1c4,_0x22773a){const _0x56268c=_0x35f622;super(),this['_commentService']=_0x570cf4,this['_threadCommentModel']=_0x5e05f7,this[_0x56268c(0xda)]=_0x5cd1c4,this[_0x56268c(0xc8)]=_0x22773a,this['_init'](),this[_0x56268c(0xa2)]();}[_0x35f622(0xa2)](){const _0xb40629=_0x35f622;this[_0xb40629(0xc3)](this['_threadCommentModel'][_0xb40629(0x83)][_0xb40629(0x9e)](_0x1f8f94(0x10))[_0xb40629(0xcd)](_0xba17da=>{const _0x558794=_0xb40629,_0x1b9e9b=new Set();_0xba17da[_0x558794(0x81)](_0x23f262=>{const _0x224239=_0x558794;switch(_0x23f262[_0x224239(0xca)]){case'add':{const _0x758cd2=_0x23f262[_0x224239(0xb4)]['personId'];_0x1b9e9b[_0x224239(0xc6)](_0x758cd2);break;}}}),B(this['_injector'],_0x1b9e9b);}));}['_init'](){const _0x352833=_0x35f622;this[_0x352833(0xc3)](this['_commentService']['commentUpdate$'][_0x352833(0xcd)](async _0x49a8a0=>{const _0xcddc8e=_0x352833;var _0x494bd6,_0x3d17b9,_0x58449a,_0x368fbe;const _0x4acafd=(_0x494bd6=this[_0xcddc8e(0x9c)][_0xcddc8e(0xd4)](_0x49a8a0['unitId'])[_0xcddc8e(0x9f)](_0x2961d2=>_0x2961d2[_0xcddc8e(0xe0)]===_0x49a8a0['threadId']))==null?void 0x0:_0x494bd6[_0xcddc8e(0xcf)];if(!_0x4acafd)return;const {unitId:_0x3efa35,subUnitId:_0x266c46}=_0x4acafd;switch(_0x49a8a0[_0xcddc8e(0xde)]&&this[_0xcddc8e(0xda)][_0xcddc8e(0xc5)](_0x49a8a0[_0xcddc8e(0xde)]),_0x49a8a0[_0xcddc8e(0xca)]){case v[_0xcddc8e(0x94)]:break;case v['Reply']:{this[_0xcddc8e(0x9c)][_0xcddc8e(0x8e)](_0x3efa35,_0x266c46,{'unitId':_0x3efa35,'subUnitId':_0x266c46,'ref':'','id':_0x49a8a0[_0xcddc8e(0x92)],'dT':D(+_0x49a8a0[_0xcddc8e(0x86)]),'threadId':_0x49a8a0[_0xcddc8e(0xe0)],'personId':(_0x58449a=(_0x3d17b9=_0x49a8a0['user'])==null?void 0x0:_0x3d17b9['userID'])!=null?_0x58449a:_0x49a8a0[_0xcddc8e(0xe3)],'text':JSON[_0xcddc8e(0xb9)](_0x49a8a0[_0xcddc8e(0xa4)]),'parentId':_0x4acafd['id']});break;}case v[_0xcddc8e(0xbe)]:{const _0x4fb529=this[_0xcddc8e(0x9c)][_0xcddc8e(0x95)](_0x3efa35,_0x266c46,_0x49a8a0[_0xcddc8e(0x92)]);_0x4fb529&&_0x4fb529[_0xcddc8e(0x91)]&&this[_0xcddc8e(0x9c)][_0xcddc8e(0xdf)](_0x3efa35,_0x266c46,_0x49a8a0[_0xcddc8e(0x92)]);break;}case v[_0xcddc8e(0xdb)]:{this['_threadCommentModel']['updateComment'](_0x3efa35,_0x266c46,{'commentId':_0x49a8a0['replyId'],'text':JSON[_0xcddc8e(0xb9)](_0x49a8a0[_0xcddc8e(0xa4)])});break;}case v[_0xcddc8e(0xa3)]:{const _0x5e89a2=(_0x368fbe=this[_0xcddc8e(0x9c)][_0xcddc8e(0xd4)](_0x49a8a0[_0xcddc8e(0xbf)])['find'](_0x11bb12=>_0x11bb12[_0xcddc8e(0xe0)]===_0x49a8a0[_0xcddc8e(0xe0)]))==null?void 0x0:_0x368fbe[_0xcddc8e(0xcf)];_0x5e89a2&&this['_threadCommentModel'][_0xcddc8e(0x98)](_0x3efa35,_0x266c46,_0x5e89a2['id'],_0x49a8a0[_0xcddc8e(0xe2)]===I[_0xcddc8e(0xa9)]);break;}}}));}};S=V([p(0x0,_0x5ee840(_0x4b60cb)),p(0x1,_0x5ee840(_0x147ce0)),p(0x2,_0x5ee840(_0x1ff591)),p(0x3,_0x5ee840(_0x55640e))],S);const z=_0x35f622(0x82),M={};var k=Object[_0x35f622(0xac)],Q=(_0x51f97a,_0x1a5fc2,_0xbd56b3,_0x5bdb05)=>{const _0x750660=_0x35f622;for(var _0x4335aa=_0x5bdb05>0x1?void 0x0:_0x5bdb05?k(_0x1a5fc2,_0xbd56b3):_0x1a5fc2,_0x36f690=_0x51f97a[_0x750660(0xa5)]-0x1,_0x34cdc5;_0x36f690>=0x0;_0x36f690--)(_0x34cdc5=_0x51f97a[_0x36f690])&&(_0x4335aa=_0x34cdc5(_0x4335aa)||_0x4335aa);return _0x4335aa;},_=(_0x361dc2,_0x3367bf)=>(_0x28b89f,_0x3b2cf2)=>_0x3367bf(_0x28b89f,_0x3b2cf2,_0x361dc2);function X(_0x2c1ede,_0x33ce9a){const _0xc1602f=_0x35f622,_0x594c51=_0x2c1ede[_0xc1602f(0xba)][0x0];return{..._0x33ce9a,'id':_0x594c51[_0xc1602f(0x92)],'resolved':_0x2c1ede[_0xc1602f(0xe2)]===0x1,'dT':D(_0x594c51['createTimestamp']),'personId':_0x594c51[_0xc1602f(0xe3)],'threadId':_0x594c51['threadId']};}function ee(_0x437eca,_0x28fd3d,_0x44ea4d){const _0x70b55a=_0x35f622;var _0x1b5ba5,_0x5c2b03;if(((_0x5c2b03=(_0x1b5ba5=_0x437eca==null?void 0x0:_0x437eca['replies'])==null?void 0x0:_0x1b5ba5[_0x70b55a(0xa5)])!=null?_0x5c2b03:0x0)>0x0){const _0x27af79=(_0x368a0b,_0x38a8f7)=>({'id':_0x368a0b[_0x70b55a(0x92)],'threadId':_0x368a0b[_0x70b55a(0xe0)],'dT':D(_0x368a0b[_0x70b55a(0x86)]),'personId':_0x368a0b[_0x70b55a(0xe3)],'resolved':_0x437eca['solved']===I[_0x70b55a(0xa9)],'unitId':_0x28fd3d,'subUnitId':_0x44ea4d,'text':JSON['parse'](_0x368a0b[_0x70b55a(0xa4)]),'parentId':_0x38a8f7}),_0x55d0f9=_0x27af79(_0x437eca[_0x70b55a(0xba)][0x0]);return{..._0x55d0f9,'children':_0x437eca[_0x70b55a(0xba)]['slice'](0x1)[_0x70b55a(0xaf)](_0x2b954e=>_0x27af79(_0x2b954e,_0x55d0f9['id']))};}return null;}let f=class{constructor(_0x50d33a,_0x58f5aa,_0x3cc0da,_0x5b7c6f){const _0x227f70=_0x35f622;this[_0x227f70(0x88)]=_0x50d33a,this[_0x227f70(0xda)]=_0x58f5aa,this[_0x227f70(0xc9)]=_0x3cc0da,this[_0x227f70(0xc8)]=_0x5b7c6f;}async[_0x35f622(0x8e)](_0x3dfab8){const _0x3b023e=_0x35f622;var _0x489ca1,_0x5d253c;const {parentId:_0x2b435e,unitId:_0x5e4185,text:_0x4fdf6c,threadId:_0x461cfa}=_0x3dfab8,_0x4dbb01=(_0x5d253c=(_0x489ca1=_0x4fdf6c['customRanges'])==null?void 0x0:_0x489ca1['filter'](_0x5dc21f=>_0x5dc21f['rangeType']===_0x335bcd[_0x3b023e(0xe1)])['map'](_0x126094=>_0x126094[_0x3b023e(0x8b)]))!=null?_0x5d253c:[],_0x4d8b07=JSON[_0x3b023e(0xc4)](_0x4fdf6c),_0x5a0ca8=(await this[_0x3b023e(0xc9)][_0x3b023e(0xd6)](_0x5e4185))['getMemberID']();if(_0x2b435e){const _0x1342bc={'memberId':_0x5a0ca8,'unitId':_0x5e4185,'content':_0x4d8b07,'mention':_0x4dbb01,'threadId':_0x461cfa},_0x3f970e=(await this['_httpService']['post'](_0x3b023e(0xa8)+_0x5e4185+_0x3b023e(0x85),{'body':_0x1342bc}))['body'][_0x3b023e(0xb5)];return{..._0x3dfab8,'id':_0x3f970e[_0x3b023e(0x92)],'dT':_0x269791(+_0x3f970e['createTimestamp'])[_0x3b023e(0xa0)](_0x3b023e(0x89)),'personId':_0x3f970e['userId']};}else{const _0x37544c={'memberId':_0x5a0ca8,'unitId':_0x5e4185,'content':_0x4d8b07,'mention':_0x4dbb01},_0x2d65a1=await this[_0x3b023e(0x88)]['post'](_0x3b023e(0xa8)+_0x5e4185+_0x3b023e(0x8f),{'body':_0x37544c});return X(_0x2d65a1['body'][_0x3b023e(0xd3)],_0x3dfab8);}}async[_0x35f622(0xd2)](_0x271465){const _0x267123=_0x35f622;var _0x3450c0,_0xc95b20;const {text:_0xe2305,unitId:_0x40a3f7}=_0x271465,_0x322750=(_0xc95b20=(_0x3450c0=_0xe2305[_0x267123(0xb8)])==null?void 0x0:_0x3450c0[_0x267123(0xd0)](_0x255c73=>_0x255c73[_0x267123(0xcb)]===_0x335bcd[_0x267123(0xe1)])[_0x267123(0xaf)](_0x518cd2=>_0x518cd2[_0x267123(0x8b)]))!=null?_0xc95b20:[],_0x4509ea=JSON[_0x267123(0xc4)](_0xe2305),_0x3e4068=_0x271465[_0x267123(0xe0)],_0x10bd8e=_0x271465['id'],_0x466d52={'memberId':(await this[_0x267123(0xc9)][_0x267123(0xd6)](_0x40a3f7))[_0x267123(0xbd)](),'unitId':_0x40a3f7,'threadId':_0x3e4068,'mention':_0x322750,'content':_0x4509ea,'replyId':_0x10bd8e},_0x547eba=await this[_0x267123(0x88)][_0x267123(0xd5)](_0x267123(0xa8)+_0x40a3f7+'/edit',{'body':_0x466d52});return!_0x547eba['body'][_0x267123(0xae)]||_0x547eba[_0x267123(0x9d)][_0x267123(0xae)]['code']===0x1;}async[_0x35f622(0x98)](_0x1fe854){const _0x177aa2=_0x35f622,{unitId:_0x5b7442}=_0x1fe854,_0x3651a8=_0x1fe854[_0x177aa2(0xe0)],_0x3db9a4={'memberId':this['_userService']['getCurrentUser']()[_0x177aa2(0xab)],'unitId':_0x5b7442,'threadId':_0x3651a8,'solved':_0x1fe854[_0x177aa2(0xd1)]?I[_0x177aa2(0xa9)]:I[_0x177aa2(0x93)]},_0x53c279=await this[_0x177aa2(0x88)][_0x177aa2(0xd5)](_0x177aa2(0xa8)+_0x5b7442+'/solved',{'body':_0x3db9a4});return!_0x53c279[_0x177aa2(0x9d)][_0x177aa2(0xae)]||_0x53c279[_0x177aa2(0x9d)][_0x177aa2(0xae)][_0x177aa2(0xcc)]===0x1;}async['deleteComment'](_0x447493,_0x115e7e,_0x82e5d5,_0xd1caa0){const _0xa38f44=_0x35f622,_0x4e78a1={'memberId':(await this[_0xa38f44(0xc9)][_0xa38f44(0xd6)](_0x447493))[_0xa38f44(0xbd)](),'threadId':_0x82e5d5,'replyId':_0xd1caa0,'unitId':_0x447493},_0x18f034=await this['_httpService'][_0xa38f44(0xd5)](_0xa38f44(0xa8)+_0x447493+_0xa38f44(0xb7),{'body':_0x4e78a1});return!_0x18f034[_0xa38f44(0x9d)][_0xa38f44(0xae)]||_0x18f034[_0xa38f44(0x9d)][_0xa38f44(0xae)]['code']===0x1;}async[_0x35f622(0xa6)](_0x3d9b36,_0x6d5352,_0x2b5ad7){const _0x3c37cf=_0x35f622,_0x1fd422={'unitId':_0x3d9b36,'threadId':_0x2b5ad7},_0x4aa0ad=await this[_0x3c37cf(0x88)][_0x3c37cf(0xd5)](_0x3c37cf(0xa8)+_0x3d9b36+_0x3c37cf(0xbc),{'body':_0x1fd422}),_0xbc15c6=_0x2b5ad7[_0x3c37cf(0xaf)](_0xce2053=>ee(_0x4aa0ad[_0x3c37cf(0x9d)][_0x3c37cf(0xb6)][_0xce2053],_0x3d9b36,_0x6d5352))[_0x3c37cf(0xd0)](Boolean);return Object['values'](_0x4aa0ad['body'][_0x3c37cf(0x97)])[_0x3c37cf(0x81)](_0x33e89e=>{const _0x3543ec=_0x3c37cf;this[_0x3543ec(0xda)][_0x3543ec(0xc5)](_0x33e89e);}),_0xbc15c6;}[_0x35f622(0x96)](_0x2104a1){const _0x3f2ffd=_0x35f622;return{'id':_0x2104a1['id'],'threadId':_0x2104a1[_0x3f2ffd(0xe0)],'ref':_0x2104a1[_0x3f2ffd(0x87)]};}};f=Q([_(0x0,_0x5ee840(_0x714c0)),_(0x1,_0x5ee840(_0x1ff591)),_(0x2,_0x5ee840(_0x2c2f5a)),_(0x3,_0x5ee840(_0x55640e))],f);var re=Object[_0x35f622(0xac)],te=(_0x272a61,_0xe43b3e,_0x49fecd,_0x12b5b1)=>{const _0x35b499=_0x35f622;for(var _0x4c3781=_0x12b5b1>0x1?void 0x0:_0x12b5b1?re(_0xe43b3e,_0x49fecd):_0xe43b3e,_0x1b2fa2=_0x272a61[_0x35b499(0xa5)]-0x1,_0x116346;_0x1b2fa2>=0x0;_0x1b2fa2--)(_0x116346=_0x272a61[_0x1b2fa2])&&(_0x4c3781=_0x116346(_0x4c3781)||_0x4c3781);return _0x4c3781;},N=(_0x5d522c,_0x30f5f4)=>(_0x2a707c,_0x5b854)=>_0x30f5f4(_0x2a707c,_0x5b854,_0x5d522c);let g=class extends _0x2b7514{constructor(_0x5e5a8d,_0x1ec3ae){const _0x3a5543=_0x35f622;super(),this[_0x3a5543(0xb0)]=_0x5e5a8d,this[_0x3a5543(0xc0)]=_0x1ec3ae,this[_0x3a5543(0x8a)]();}[_0x35f622(0x8a)](){const _0x577bed=_0x35f622;this[_0x577bed(0xb0)][_0x577bed(0xb2)]=this['_threadCommentDataSource'],this[_0x577bed(0xb0)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x217b63),N(0x1,_0x5ee840(f))],g);var se=Object[_0x35f622(0xa1)],oe=Object[_0x35f622(0xac)],ne=(_0x2b883b,_0x579912,_0x20d538)=>_0x579912 in _0x2b883b?se(_0x2b883b,_0x579912,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x20d538}):_0x2b883b[_0x579912]=_0x20d538,ie=(_0x4aa11b,_0x567acf,_0x2958bb,_0x33a7fc)=>{const _0x415228=_0x35f622;for(var _0x1f08e1=_0x33a7fc>0x1?void 0x0:_0x33a7fc?oe(_0x567acf,_0x2958bb):_0x567acf,_0x4d98a3=_0x4aa11b[_0x415228(0xa5)]-0x1,_0x1f03bf;_0x4d98a3>=0x0;_0x4d98a3--)(_0x1f03bf=_0x4aa11b[_0x4d98a3])&&(_0x1f08e1=_0x1f03bf(_0x1f08e1)||_0x1f08e1);return _0x1f08e1;},w=(_0x2ef0a1,_0x53ec45)=>(_0x3561b9,_0x118ca7)=>_0x53ec45(_0x3561b9,_0x118ca7,_0x2ef0a1),$=(_0x57a3de,_0x42dae5,_0x164089)=>ne(_0x57a3de,typeof _0x42dae5!='symbol'?_0x42dae5+'':_0x42dae5,_0x164089);let b=class extends _0x223b2b{constructor(_0x5662f7=M,_0x45c20b,_0x373bc4){const _0x411667=_0x35f622;super(),this[_0x411667(0x84)]=_0x5662f7,this['_injector']=_0x45c20b,this['_configService']=_0x373bc4;const {..._0x277ebf}=_0x20f8a7({},M,this[_0x411667(0x84)]);this[_0x411667(0x9b)][_0x411667(0xc7)](z,_0x277ebf);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x2a45c8=>{const _0x1c8826=_0x5cab;this[_0x1c8826(0xc8)][_0x1c8826(0xc6)](_0x2a45c8);});}['onReady'](){const _0x2d0d6d=_0x35f622;this[_0x2d0d6d(0xc8)][_0x2d0d6d(0x99)](g),this[_0x2d0d6d(0xc8)][_0x2d0d6d(0x99)](S);}};function _0x2c57(){const _0x506809=['forEach','thread-comment-data-source.config','commentUpdate$','_config','/reply','createTimestamp','ref','_httpService','YYYY/MM/DD\x20HH:mm','_initDataSource','rangeId','39148kRXgXO','getUser','addComment','/add','size','parentId','replyId','OpenOrReOpen','Add','getComment','saveCommentToSnapshot','users','resolveComment','get','delete','_configService','_threadCommentModel','body','pipe','find','format','defineProperty','_initUserSync','Solve','content','length','listComments','103100cpCNfz','/universer-api/comment/unit/','Solved','Unknown','userID','getOwnPropertyDescriptor','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','error','map','_threadCommentDataSourceService','Reply','dataSource','927840zKQEDj','payload','reply','comments','/delete','customRanges','parse','replies','144589EmeniB','/list','getMemberID','Delete','unitId','_threadCommentDataSource','1460496OAYQSK','221295ovGihH','disposeWithMe','stringify','addUser','add','setConfig','_injector','_sessionService','type','rangeType','code','subscribe','342lWzpeQ','root','filter','resolved','updateComment','comment','getUnit','post','requireSession','/universer-api/user/list','42nhHaoM','881783ekwohx','_userService','Edit','UNIVER_UNKNOWN','UNRECOGNIZED','user','deleteComment','threadId','COMMENT','solved','userId','33PpQjPQ'];_0x2c57=function(){return _0x506809;};return _0x2c57();}$(b,'pluginName',W),$(b,_0x35f622(0xca),_0x238f45[_0x35f622(0xdc)]),b=ie([_0x21b651(_0x2a1676,_0x177d49,_0x843546),w(0x1,_0x5ee840(_0x55640e)),w(0x2,_0x3ef499)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x1ce650,_0x415dbf){const _0x5a336e=_0x41de,_0x15b7c7=_0x1ce650();while(!![]){try{const _0x1aaf89=-parseInt(_0x5a336e(0x1c7))/0x1*(parseInt(_0x5a336e(0x20d))/0x2)+-parseInt(_0x5a336e(0x237))/0x3+-parseInt(_0x5a336e(0x23d))/0x4*(parseInt(_0x5a336e(0x1d2))/0x5)+parseInt(_0x5a336e(0x206))/0x6*(parseInt(_0x5a336e(0x1fd))/0x7)+parseInt(_0x5a336e(0x1d4))/0x8+-parseInt(_0x5a336e(0x204))/0x9+parseInt(_0x5a336e(0x229))/0xa*(parseInt(_0x5a336e(0x1e7))/0xb);if(_0x1aaf89===_0x415dbf)break;else _0x15b7c7['push'](_0x15b7c7['shift']());}catch(_0x25c2c1){_0x15b7c7['push'](_0x15b7c7['shift']());}}}(_0x1632,0x27e40),function(_0x587f7b,_0x134c09){const _0x1965da=_0x41de;typeof exports==_0x1965da(0x20e)&&typeof module<'u'?_0x134c09(exports,require(_0x1965da(0x223)),require('@univerjs-pro/license'),require(_0x1965da(0x1ff)),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require(_0x1965da(0x1e1)),require(_0x1965da(0x1fc))):typeof define=='function'&&define['amd']?define(['exports',_0x1965da(0x223),_0x1965da(0x23c),_0x1965da(0x1ff),_0x1965da(0x1e5),_0x1965da(0x1fb),_0x1965da(0x1e1),_0x1965da(0x1fc)],_0x134c09):(_0x587f7b=typeof globalThis<'u'?globalThis:_0x587f7b||self,_0x134c09(_0x587f7b['UniverProThreadCommentDatasource']={},_0x587f7b[_0x1965da(0x1d1)],_0x587f7b['UniverProLicense'],_0x587f7b[_0x1965da(0x215)],_0x587f7b[_0x1965da(0x22f)],_0x587f7b['UniverThreadComment'],_0x587f7b[_0x1965da(0x1e1)],_0x587f7b['UniverNetwork']));}(this,function(_0x2a78b6,_0x32c2f9,_0x3978b6,_0x206fc5,_0x1cd1db,_0x5aad4a,_0x4f8cf8,_0x2a30c3){'use strict';const _0x501570=_0x41de;const _0x206c54=_0x501570(0x1f4);var _0x2a37cd=(_0x2c8a28=>(_0x2c8a28[_0x2c8a28[_0x501570(0x227)]=0x0]=_0x501570(0x227),_0x2c8a28[_0x2c8a28[_0x501570(0x1de)]=0x1]=_0x501570(0x1de),_0x2c8a28[_0x2c8a28[_0x501570(0x1e2)]=-0x1]=_0x501570(0x1e2),_0x2c8a28))(_0x2a37cd||{}),_0x5cfb89=(_0x5d64c2=>(_0x5d64c2[_0x5d64c2[_0x501570(0x207)]=0x0]=_0x501570(0x207),_0x5d64c2[_0x5d64c2[_0x501570(0x22e)]=0x1]=_0x501570(0x22e),_0x5d64c2[_0x5d64c2['Reply']=0x2]='Reply',_0x5d64c2[_0x5d64c2[_0x501570(0x214)]=0x3]=_0x501570(0x214),_0x5d64c2[_0x5d64c2[_0x501570(0x1dd)]=0x4]=_0x501570(0x1dd),_0x5d64c2[_0x5d64c2['Solve']=0x5]=_0x501570(0x225),_0x5d64c2[_0x5d64c2[_0x501570(0x1e2)]=-0x1]=_0x501570(0x1e2),_0x5d64c2))(_0x5cfb89||{});const _0x2568c8=_0x2ba203=>_0x206fc5[_0x501570(0x22a)](new Date(+_0x2ba203))[_0x501570(0x234)](_0x501570(0x1ce)),_0xf4c171=async(_0x142fd7,_0x52a1f3)=>{const _0x419791=_0x501570,_0x17165f=_0x142fd7['get'](_0x206fc5[_0x419791(0x1e4)]),_0x2dbd40=_0x142fd7[_0x419791(0x22b)](_0x2a30c3['HTTPService']);_0x52a1f3['forEach'](_0x10ac8b=>{const _0x31a495=_0x419791;_0x17165f[_0x31a495(0x1d5)](_0x10ac8b)&&_0x52a1f3['delete'](_0x10ac8b);}),_0x52a1f3[_0x419791(0x211)]&&(await _0x2dbd40[_0x419791(0x22b)](_0x419791(0x236),{'params':{'userIDs':[..._0x52a1f3]}}))[_0x419791(0x1ed)]['users']['forEach'](_0x192336=>{_0x192336&&_0x17165f['addUser'](_0x192336);});};var _0x339ea1=Object[_0x501570(0x21c)],_0x490248=(_0x45fb86,_0x50bccb,_0x9a5e78,_0x317ce4)=>{const _0x2e9d66=_0x501570;for(var _0x5ccac9=_0x317ce4>0x1?void 0x0:_0x317ce4?_0x339ea1(_0x50bccb,_0x9a5e78):_0x50bccb,_0x32c796=_0x45fb86[_0x2e9d66(0x1f3)]-0x1,_0x4929ae;_0x32c796>=0x0;_0x32c796--)(_0x4929ae=_0x45fb86[_0x32c796])&&(_0x5ccac9=_0x4929ae(_0x5ccac9)||_0x5ccac9);return _0x5ccac9;},_0x3693a7=(_0x188d13,_0x425ab0)=>(_0x2e5ba2,_0xdca2b9)=>_0x425ab0(_0x2e5ba2,_0xdca2b9,_0x188d13);let _0x1158c2=class extends _0x206fc5[_0x501570(0x1f1)]{constructor(_0x510cca,_0x37c92f,_0x1aca70,_0x3c51e3){const _0x2b0e9d=_0x501570;super(),this[_0x2b0e9d(0x23b)]=_0x510cca,this[_0x2b0e9d(0x21b)]=_0x37c92f,this['_userService']=_0x1aca70,this[_0x2b0e9d(0x1e6)]=_0x3c51e3,this[_0x2b0e9d(0x241)](),this[_0x2b0e9d(0x20b)]();}[_0x501570(0x20b)](){const _0x4ffabd=_0x501570;this[_0x4ffabd(0x245)](this[_0x4ffabd(0x21b)][_0x4ffabd(0x1cd)][_0x4ffabd(0x201)](_0x4f8cf8[_0x4ffabd(0x20a)](0x10))[_0x4ffabd(0x205)](_0x426b75=>{const _0x342b64=_0x4ffabd,_0x23d7e7=new Set();_0x426b75[_0x342b64(0x222)](_0x340654=>{const _0x2a6c81=_0x342b64;switch(_0x340654[_0x2a6c81(0x1db)]){case _0x2a6c81(0x1d8):{const _0x4b0b98=_0x340654['payload'][_0x2a6c81(0x232)];_0x23d7e7[_0x2a6c81(0x1d8)](_0x4b0b98);break;}}}),_0xf4c171(this[_0x342b64(0x1e6)],_0x23d7e7);}));}['_init'](){const _0xb50c82=_0x501570;this[_0xb50c82(0x245)](this[_0xb50c82(0x23b)][_0xb50c82(0x1cd)]['subscribe'](async _0x39453e=>{const _0x537a47=_0xb50c82;var _0x1da1af,_0x398b54,_0x228f14,_0x2c6a53;const _0x1d573c=(_0x1da1af=this['_threadCommentModel'][_0x537a47(0x1d6)](_0x39453e[_0x537a47(0x209)])[_0x537a47(0x23f)](_0x4f5aeb=>_0x4f5aeb[_0x537a47(0x1f0)]===_0x39453e[_0x537a47(0x1f0)]))==null?void 0x0:_0x1da1af[_0x537a47(0x1eb)];if(!_0x1d573c)return;const {unitId:_0x5f355e,subUnitId:_0x478c0a}=_0x1d573c;switch(_0x39453e[_0x537a47(0x1c6)]&&this[_0x537a47(0x239)][_0x537a47(0x1e0)](_0x39453e[_0x537a47(0x1c6)]),_0x39453e[_0x537a47(0x1db)]){case _0x5cfb89[_0x537a47(0x22e)]:break;case _0x5cfb89[_0x537a47(0x1ef)]:{this[_0x537a47(0x21b)]['addComment'](_0x5f355e,_0x478c0a,{'unitId':_0x5f355e,'subUnitId':_0x478c0a,'ref':'','id':_0x39453e[_0x537a47(0x1f2)],'dT':_0x2568c8(+_0x39453e[_0x537a47(0x219)]),'threadId':_0x39453e[_0x537a47(0x1f0)],'personId':(_0x228f14=(_0x398b54=_0x39453e['user'])==null?void 0x0:_0x398b54[_0x537a47(0x221)])!=null?_0x228f14:_0x39453e[_0x537a47(0x235)],'text':JSON[_0x537a47(0x23a)](_0x39453e['content']),'parentId':_0x1d573c['id']});break;}case _0x5cfb89[_0x537a47(0x1dd)]:{const _0x2eb408=this[_0x537a47(0x21b)][_0x537a47(0x1dc)](_0x5f355e,_0x478c0a,_0x39453e['replyId']);_0x2eb408&&_0x2eb408['parentId']&&this[_0x537a47(0x21b)][_0x537a47(0x217)](_0x5f355e,_0x478c0a,_0x39453e[_0x537a47(0x1f2)]);break;}case _0x5cfb89[_0x537a47(0x214)]:{this[_0x537a47(0x21b)][_0x537a47(0x1f7)](_0x5f355e,_0x478c0a,{'commentId':_0x39453e[_0x537a47(0x1f2)],'text':JSON['parse'](_0x39453e[_0x537a47(0x20c)])});break;}case _0x5cfb89[_0x537a47(0x225)]:{const _0x3f9fba=(_0x2c6a53=this[_0x537a47(0x21b)][_0x537a47(0x1d6)](_0x39453e['unitId'])['find'](_0x201f8c=>_0x201f8c[_0x537a47(0x1f0)]===_0x39453e[_0x537a47(0x1f0)]))==null?void 0x0:_0x2c6a53[_0x537a47(0x1eb)];_0x3f9fba&&this['_threadCommentModel']['resolveComment'](_0x5f355e,_0x478c0a,_0x3f9fba['id'],_0x39453e['solved']===_0x2a37cd[_0x537a47(0x1de)]);break;}}}));}};_0x1158c2=_0x490248([_0x3693a7(0x0,_0x206fc5[_0x501570(0x240)](_0x32c2f9['CommentService'])),_0x3693a7(0x1,_0x206fc5[_0x501570(0x240)](_0x5aad4a[_0x501570(0x23e)])),_0x3693a7(0x2,_0x206fc5[_0x501570(0x240)](_0x206fc5[_0x501570(0x1e4)])),_0x3693a7(0x3,_0x206fc5['Inject'](_0x206fc5[_0x501570(0x20f)]))],_0x1158c2);const _0xc7f60='thread-comment-data-source.config',_0x5d6dce={};var _0xc1be93=Object[_0x501570(0x21c)],_0x3169df=(_0x61ad2e,_0x529a05,_0xac5a41,_0x5e171e)=>{for(var _0x35243a=_0x5e171e>0x1?void 0x0:_0x5e171e?_0xc1be93(_0x529a05,_0xac5a41):_0x529a05,_0x32c216=_0x61ad2e['length']-0x1,_0x1a29b5;_0x32c216>=0x0;_0x32c216--)(_0x1a29b5=_0x61ad2e[_0x32c216])&&(_0x35243a=_0x1a29b5(_0x35243a)||_0x35243a);return _0x35243a;},_0x5c41c8=(_0x200986,_0x4aebc5)=>(_0x13f5d2,_0x26fca7)=>_0x4aebc5(_0x13f5d2,_0x26fca7,_0x200986);function _0x408a5d(_0x541e75,_0x12b0b9){const _0x341044=_0x501570,_0xfd5f8f=_0x541e75[_0x341044(0x21e)][0x0];return{..._0x12b0b9,'id':_0xfd5f8f[_0x341044(0x1f2)],'resolved':_0x541e75[_0x341044(0x238)]===0x1,'dT':_0x2568c8(_0xfd5f8f[_0x341044(0x219)]),'personId':_0xfd5f8f[_0x341044(0x235)],'threadId':_0xfd5f8f[_0x341044(0x1f0)]};}function _0x441684(_0x123669,_0x32ef4c,_0x12371c){const _0x3dcb95=_0x501570;var _0x2ce2e1,_0x2bcdec;if(((_0x2bcdec=(_0x2ce2e1=_0x123669==null?void 0x0:_0x123669[_0x3dcb95(0x21e)])==null?void 0x0:_0x2ce2e1[_0x3dcb95(0x1f3)])!=null?_0x2bcdec:0x0)>0x0){const _0x17063c=(_0x5138a6,_0xa6c8cb)=>({'id':_0x5138a6[_0x3dcb95(0x1f2)],'threadId':_0x5138a6[_0x3dcb95(0x1f0)],'dT':_0x2568c8(_0x5138a6[_0x3dcb95(0x219)]),'personId':_0x5138a6[_0x3dcb95(0x235)],'resolved':_0x123669[_0x3dcb95(0x238)]===_0x2a37cd['Solved'],'unitId':_0x32ef4c,'subUnitId':_0x12371c,'text':JSON[_0x3dcb95(0x23a)](_0x5138a6[_0x3dcb95(0x20c)]),'parentId':_0xa6c8cb}),_0x155273=_0x17063c(_0x123669['replies'][0x0]);return{..._0x155273,'children':_0x123669[_0x3dcb95(0x21e)]['slice'](0x1)[_0x3dcb95(0x216)](_0x5d3f90=>_0x17063c(_0x5d3f90,_0x155273['id']))};}return null;}let _0xae0cf=class{constructor(_0x529576,_0x2b021a,_0x38bf44,_0x2c8a04){const _0x464f35=_0x501570;this[_0x464f35(0x1f9)]=_0x529576,this[_0x464f35(0x239)]=_0x2b021a,this[_0x464f35(0x1d7)]=_0x38bf44,this[_0x464f35(0x1e6)]=_0x2c8a04;}async[_0x501570(0x1d0)](_0x14ba2e){const _0x3ed51a=_0x501570;var _0x290a3e,_0x938257;const {parentId:_0x26b850,unitId:_0x56ebce,text:_0x30e842,threadId:_0x126bcb}=_0x14ba2e,_0x348dff=(_0x938257=(_0x290a3e=_0x30e842[_0x3ed51a(0x1fa)])==null?void 0x0:_0x290a3e[_0x3ed51a(0x213)](_0x33f58f=>_0x33f58f[_0x3ed51a(0x1d9)]===_0x206fc5[_0x3ed51a(0x1d3)]['COMMENT'])['map'](_0x41d18c=>_0x41d18c['rangeId']))!=null?_0x938257:[],_0x1ff1c8=JSON[_0x3ed51a(0x1cb)](_0x30e842),_0x9f8d8a=(await this[_0x3ed51a(0x1d7)][_0x3ed51a(0x21f)](_0x56ebce))[_0x3ed51a(0x202)]();if(_0x26b850){const _0x52dd08={'memberId':_0x9f8d8a,'unitId':_0x56ebce,'content':_0x1ff1c8,'mention':_0x348dff,'threadId':_0x126bcb},_0x4d7c17=(await this['_httpService'][_0x3ed51a(0x21d)](_0x3ed51a(0x1fe)+_0x56ebce+_0x3ed51a(0x22c),{'body':_0x52dd08}))[_0x3ed51a(0x1ed)][_0x3ed51a(0x228)];return{..._0x14ba2e,'id':_0x4d7c17['replyId'],'dT':_0x206fc5[_0x3ed51a(0x22a)](+_0x4d7c17[_0x3ed51a(0x219)])[_0x3ed51a(0x234)](_0x3ed51a(0x1ce)),'personId':_0x4d7c17[_0x3ed51a(0x235)]};}else{const _0x1403df={'memberId':_0x9f8d8a,'unitId':_0x56ebce,'content':_0x1ff1c8,'mention':_0x348dff},_0x4cf81a=await this['_httpService'][_0x3ed51a(0x21d)](_0x3ed51a(0x1fe)+_0x56ebce+_0x3ed51a(0x22d),{'body':_0x1403df});return _0x408a5d(_0x4cf81a[_0x3ed51a(0x1ed)]['comment'],_0x14ba2e);}}async[_0x501570(0x1f7)](_0x3a8cb6){const _0x481ede=_0x501570;var _0x1f4bc3,_0x1c6ffb;const {text:_0x27ca5f,unitId:_0x1eff1e}=_0x3a8cb6,_0x40563e=(_0x1c6ffb=(_0x1f4bc3=_0x27ca5f[_0x481ede(0x1fa)])==null?void 0x0:_0x1f4bc3[_0x481ede(0x213)](_0x1cfa59=>_0x1cfa59[_0x481ede(0x1d9)]===_0x206fc5['CustomRangeType'][_0x481ede(0x243)])[_0x481ede(0x216)](_0x2e7e8d=>_0x2e7e8d[_0x481ede(0x218)]))!=null?_0x1c6ffb:[],_0x5c44bb=JSON[_0x481ede(0x1cb)](_0x27ca5f),_0x272248=_0x3a8cb6[_0x481ede(0x1f0)],_0x26dac3=_0x3a8cb6['id'],_0x35ba45={'memberId':(await this[_0x481ede(0x1d7)][_0x481ede(0x21f)](_0x1eff1e))['getMemberID'](),'unitId':_0x1eff1e,'threadId':_0x272248,'mention':_0x40563e,'content':_0x5c44bb,'replyId':_0x26dac3},_0x4570e3=await this[_0x481ede(0x1f9)]['post'](_0x481ede(0x1fe)+_0x1eff1e+_0x481ede(0x1da),{'body':_0x35ba45});return!_0x4570e3[_0x481ede(0x1ed)][_0x481ede(0x1c9)]||_0x4570e3['body']['error'][_0x481ede(0x1f5)]===0x1;}async['resolveComment'](_0x2e5a75){const _0x5be4da=_0x501570,{unitId:_0x323c26}=_0x2e5a75,_0x580042=_0x2e5a75[_0x5be4da(0x1f0)],_0x4d54be={'memberId':this[_0x5be4da(0x239)]['getCurrentUser']()['userID'],'unitId':_0x323c26,'threadId':_0x580042,'solved':_0x2e5a75[_0x5be4da(0x200)]?_0x2a37cd['Solved']:_0x2a37cd[_0x5be4da(0x227)]},_0x519ef6=await this[_0x5be4da(0x1f9)][_0x5be4da(0x21d)](_0x5be4da(0x1fe)+_0x323c26+'/solved',{'body':_0x4d54be});return!_0x519ef6['body'][_0x5be4da(0x1c9)]||_0x519ef6['body'][_0x5be4da(0x1c9)]['code']===0x1;}async['deleteComment'](_0x292cb8,_0x34d7ed,_0x1340d0,_0x908b56){const _0x46cac7=_0x501570,_0x167e90={'memberId':(await this['_sessionService'][_0x46cac7(0x21f)](_0x292cb8))[_0x46cac7(0x202)](),'threadId':_0x1340d0,'replyId':_0x908b56,'unitId':_0x292cb8},_0x3116fe=await this[_0x46cac7(0x1f9)]['post']('/universer-api/comment/unit/'+_0x292cb8+_0x46cac7(0x233),{'body':_0x167e90});return!_0x3116fe[_0x46cac7(0x1ed)][_0x46cac7(0x1c9)]||_0x3116fe[_0x46cac7(0x1ed)][_0x46cac7(0x1c9)][_0x46cac7(0x1f5)]===0x1;}async['listComments'](_0x2df413,_0x5167cf,_0x154168){const _0x8d6a78=_0x501570,_0x26c88b={'unitId':_0x2df413,'threadId':_0x154168},_0x138c14=await this['_httpService'][_0x8d6a78(0x21d)](_0x8d6a78(0x1fe)+_0x2df413+'/list',{'body':_0x26c88b}),_0x162289=_0x154168[_0x8d6a78(0x216)](_0x1fbee3=>_0x441684(_0x138c14[_0x8d6a78(0x1ed)]['comments'][_0x1fbee3],_0x2df413,_0x5167cf))[_0x8d6a78(0x213)](Boolean);return Object[_0x8d6a78(0x246)](_0x138c14[_0x8d6a78(0x1ed)][_0x8d6a78(0x1e3)])[_0x8d6a78(0x222)](_0x297d4e=>{const _0x6cb67=_0x8d6a78;this['_userService'][_0x6cb67(0x1e0)](_0x297d4e);}),_0x162289;}['saveCommentToSnapshot'](_0xaef788){const _0x400d27=_0x501570;return{'id':_0xaef788['id'],'threadId':_0xaef788[_0x400d27(0x1f0)],'ref':_0xaef788[_0x400d27(0x1cf)]};}};_0xae0cf=_0x3169df([_0x5c41c8(0x0,_0x206fc5[_0x501570(0x240)](_0x2a30c3[_0x501570(0x1e8)])),_0x5c41c8(0x1,_0x206fc5[_0x501570(0x240)](_0x206fc5[_0x501570(0x1e4)])),_0x5c41c8(0x2,_0x206fc5[_0x501570(0x240)](_0x32c2f9[_0x501570(0x1e9)])),_0x5c41c8(0x3,_0x206fc5[_0x501570(0x240)](_0x206fc5[_0x501570(0x20f)]))],_0xae0cf);var _0x5b6b1f=Object['getOwnPropertyDescriptor'],_0x562505=(_0x26e933,_0x34ef92,_0x435ab4,_0x53e132)=>{const _0x4bb49a=_0x501570;for(var _0x4ab4ca=_0x53e132>0x1?void 0x0:_0x53e132?_0x5b6b1f(_0x34ef92,_0x435ab4):_0x34ef92,_0x2fbe88=_0x26e933[_0x4bb49a(0x1f3)]-0x1,_0x48d349;_0x2fbe88>=0x0;_0x2fbe88--)(_0x48d349=_0x26e933[_0x2fbe88])&&(_0x4ab4ca=_0x48d349(_0x4ab4ca)||_0x4ab4ca);return _0x4ab4ca;},_0x4b1c23=(_0x4f1852,_0x533385)=>(_0x58b5dc,_0x5f36df)=>_0x533385(_0x58b5dc,_0x5f36df,_0x4f1852);let _0xa301a0=class extends _0x206fc5['Disposable']{constructor(_0x26ccda,_0x10626c){const _0x2e35f5=_0x501570;super(),this['_threadCommentDataSourceService']=_0x26ccda,this[_0x2e35f5(0x231)]=_0x10626c,this[_0x2e35f5(0x1df)]();}['_initDataSource'](){const _0x53463e=_0x501570;this[_0x53463e(0x210)][_0x53463e(0x208)]=this[_0x53463e(0x231)],this[_0x53463e(0x210)][_0x53463e(0x1f6)]=!0x1;}};_0xa301a0=_0x562505([_0x4b1c23(0x0,_0x5aad4a['IThreadCommentDataSourceService']),_0x4b1c23(0x1,_0x206fc5[_0x501570(0x240)](_0xae0cf))],_0xa301a0);var _0x52eb31=Object['defineProperty'],_0x47e13c=Object[_0x501570(0x21c)],_0x3c31c3=(_0x535a42,_0xf50228,_0x1bcbff)=>_0xf50228 in _0x535a42?_0x52eb31(_0x535a42,_0xf50228,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1bcbff}):_0x535a42[_0xf50228]=_0x1bcbff,_0x3fc96b=(_0x3b0da6,_0x2862d0,_0x238a46,_0x38c1ef)=>{for(var _0x2aa055=_0x38c1ef>0x1?void 0x0:_0x38c1ef?_0x47e13c(_0x2862d0,_0x238a46):_0x2862d0,_0x4aa9a4=_0x3b0da6['length']-0x1,_0x21d09c;_0x4aa9a4>=0x0;_0x4aa9a4--)(_0x21d09c=_0x3b0da6[_0x4aa9a4])&&(_0x2aa055=_0x21d09c(_0x2aa055)||_0x2aa055);return _0x2aa055;},_0x58a248=(_0x283406,_0x1dd9a3)=>(_0xe3795a,_0xc26a6)=>_0x1dd9a3(_0xe3795a,_0xc26a6,_0x283406),_0x128f1c=(_0x1c7933,_0x311271,_0x4f981f)=>_0x3c31c3(_0x1c7933,typeof _0x311271!='symbol'?_0x311271+'':_0x311271,_0x4f981f);_0x2a78b6[_0x501570(0x212)]=class extends _0x206fc5[_0x501570(0x220)]{constructor(_0x6ad92b=_0x5d6dce,_0x43aabd,_0x25abe7){const _0x1d392a=_0x501570;super(),this[_0x1d392a(0x1cc)]=_0x6ad92b,this['_injector']=_0x43aabd,this['_configService']=_0x25abe7;const {..._0x1b4d3f}=_0x206fc5['merge']({},_0x5d6dce,this[_0x1d392a(0x1cc)]);this[_0x1d392a(0x1ee)][_0x1d392a(0x1f8)](_0xc7f60,_0x1b4d3f);}[_0x501570(0x1ea)](){const _0x2c7493=_0x501570;[[_0xae0cf],[_0xa301a0],[_0x1158c2]][_0x2c7493(0x222)](_0x294e69=>{const _0x3f05ea=_0x2c7493;this['_injector'][_0x3f05ea(0x1d8)](_0x294e69);});}[_0x501570(0x230)](){const _0x430bd9=_0x501570;this['_injector']['get'](_0xa301a0),this[_0x430bd9(0x1e6)][_0x430bd9(0x22b)](_0x1158c2);}},_0x128f1c(_0x2a78b6[_0x501570(0x212)],_0x501570(0x1ca),_0x206c54),_0x128f1c(_0x2a78b6['UniverThreadCommentDataSourcePlugin'],_0x501570(0x1db),_0x206fc5[_0x501570(0x242)][_0x501570(0x1c8)]),_0x2a78b6[_0x501570(0x212)]=_0x3fc96b([_0x206fc5[_0x501570(0x224)](_0x1cd1db['UniverThreadCommentUIPlugin'],_0x32c2f9[_0x501570(0x244)],_0x3978b6[_0x501570(0x1ec)]),_0x58a248(0x1,_0x206fc5['Inject'](_0x206fc5[_0x501570(0x20f)])),_0x58a248(0x2,_0x206fc5[_0x501570(0x21a)])],_0x2a78b6[_0x501570(0x212)]),Object['defineProperty'](_0x2a78b6,Symbol[_0x501570(0x226)],{'value':_0x501570(0x203)});}));function _0x41de(_0x27d1ea,_0x45d9b8){const _0x163271=_0x1632();return _0x41de=function(_0x41deee,_0x3d79c5){_0x41deee=_0x41deee-0x1c6;let _0x167a62=_0x163271[_0x41deee];return _0x167a62;},_0x41de(_0x27d1ea,_0x45d9b8);}function _0x1632(){const _0x5032e4=['ref','addComment','UniverProCollaborationClient','195KbkyBj','CustomRangeType','2611696JeAqEV','getUser','getUnit','_sessionService','add','rangeType','/edit','type','getComment','Delete','Solved','_initDataSource','addUser','rxjs','UNRECOGNIZED','users','UserManagerService','@univerjs/thread-comment-ui','_injector','110682rZjvHp','HTTPService','CollaborationSessionService','onStarting','root','UniverLicensePlugin','body','_configService','Reply','threadId','Disposable','replyId','length','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','code','syncUpdateMutationToColla','updateComment','setConfig','_httpService','customRanges','@univerjs/thread-comment','@univerjs/network','2250367iDmaao','/universer-api/comment/unit/','@univerjs/core','resolved','pipe','getMemberID','Module','1303740JeOnPA','subscribe','6SmhGMu','Unknown','dataSource','unitId','bufferTime','_initUserSync','content','553684DzduMJ','object','Injector','_threadCommentDataSourceService','size','UniverThreadCommentDataSourcePlugin','filter','Edit','UniverCore','map','deleteComment','rangeId','createTimestamp','IConfigService','_threadCommentModel','getOwnPropertyDescriptor','post','replies','requireSession','Plugin','userID','forEach','@univerjs-pro/collaboration-client','DependentOn','Solve','toStringTag','OpenOrReOpen','reply','130QeZfui','dayjs','get','/reply','/add','Add','UniverThreadCommentUi','onReady','_threadCommentDataSource','personId','/delete','format','userId','/universer-api/user/list','261438kmZbYz','solved','_userService','parse','_commentService','@univerjs-pro/license','10924eaoPSf','ThreadCommentModel','find','Inject','_init','UniverInstanceType','COMMENT','UniverCollaborationClientPlugin','disposeWithMe','values','user','1RDXGze','UNIVER_UNKNOWN','error','pluginName','stringify','_config','commentUpdate$','YYYY/MM/DD\x20HH:mm'];_0x1632=function(){return _0x5032e4;};return _0x1632();}
1
+ function _0x4b10(){const _0x530385=['parse','unitId','pipe','onReady','createTimestamp','ref','filter','values','_initUserSync','length','users','root','_userService','find','rangeType','643809oqjYFm','commentUpdate$','onStarting','defineProperty','get','pluginName','getComment','/add','error','slice','_commentService','IThreadCommentDataSourceService','comment','Delete','UniverInstanceType','Plugin','syncUpdateMutationToColla','14854596rjjbMN','Solved','userID','@univerjs-pro/collaboration-client','content','getMemberID','Inject','/solved','amd','UniverThreadCommentUi','saveCommentToSnapshot','disposeWithMe','map','symbol','@univerjs-pro/license','602200iSDMnU','44oyHIwS','_injector','requireSession','toStringTag','12pASVNz','1IKikPm','UniverCollaborationClientPlugin','setConfig','bufferTime','resolveComment','post','_sessionService','object','Unknown','updateComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/edit','exports','addComment','/universer-api/comment/unit/','user','type','@univerjs/core','1643754RWppAg','6sdokCf','UniverThreadCommentDataSourcePlugin','dayjs','Disposable','UserManagerService','stringify','_init','15580860bHmufL','Reply','solved','personId','UniverProCollaborationClient','HTTPService','UNRECOGNIZED','dataSource','Add','getUser','getCurrentUser','/reply','getOwnPropertyDescriptor','Solve','/list','@univerjs/network','_initDataSource','subscribe','customRanges','replyId','_threadCommentDataSource','/universer-api/user/list','rangeId','4248510TuLMLh','resolved','_configService','YYYY/MM/DD\x20HH:mm','deleteComment','UniverProLicense','UniverThreadCommentUIPlugin','72vmZQrq','add','format','CustomRangeType','ThreadCommentModel','COMMENT','_httpService','_config','userId','@univerjs/thread-comment','threadId','Module','size','listComments','8882097mPhuLp','replies','OpenOrReOpen','payload','Edit','code','_threadCommentDataSourceService','CollaborationSessionService','/delete','addUser','forEach','body','_threadCommentModel','Injector','rxjs','getUnit','DependentOn'];_0x4b10=function(){return _0x530385;};return _0x4b10();}function _0x1521(_0x55bba8,_0x1aabe7){const _0x4b10b6=_0x4b10();return _0x1521=function(_0x152147,_0x2c463c){_0x152147=_0x152147-0x124;let _0x124ec1=_0x4b10b6[_0x152147];return _0x124ec1;},_0x1521(_0x55bba8,_0x1aabe7);}(function(_0x1ee148,_0x112784){const _0x595d81=_0x1521,_0x46ce55=_0x1ee148();while(!![]){try{const _0x4b49cb=parseInt(_0x595d81(0x12e))/0x1*(parseInt(_0x595d81(0x140))/0x2)+parseInt(_0x595d81(0x194))/0x3*(-parseInt(_0x595d81(0x12d))/0x4)+parseInt(_0x595d81(0x15f))/0x5*(-parseInt(_0x595d81(0x141))/0x6)+-parseInt(_0x595d81(0x174))/0x7+-parseInt(_0x595d81(0x128))/0x8*(parseInt(_0x595d81(0x166))/0x9)+-parseInt(_0x595d81(0x148))/0xa+-parseInt(_0x595d81(0x129))/0xb*(-parseInt(_0x595d81(0x1a5))/0xc);if(_0x4b49cb===_0x112784)break;else _0x46ce55['push'](_0x46ce55['shift']());}catch(_0x2e57aa){_0x46ce55['push'](_0x46ce55['shift']());}}}(_0x4b10,0xcfb35),function(_0x21008b,_0x52397f){const _0x28f414=_0x1521;typeof exports==_0x28f414(0x135)&&typeof module<'u'?_0x52397f(exports,require(_0x28f414(0x1a8)),require(_0x28f414(0x127)),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require(_0x28f414(0x16f)),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x28f414(0x1ad)]?define([_0x28f414(0x13a),_0x28f414(0x1a8),_0x28f414(0x127),_0x28f414(0x13f),'@univerjs/thread-comment-ui','@univerjs/thread-comment','rxjs',_0x28f414(0x157)],_0x52397f):(_0x21008b=typeof globalThis<'u'?globalThis:_0x21008b||self,_0x52397f(_0x21008b['UniverProThreadCommentDatasource']={},_0x21008b[_0x28f414(0x14c)],_0x21008b[_0x28f414(0x164)],_0x21008b['UniverCore'],_0x21008b[_0x28f414(0x1ae)],_0x21008b['UniverThreadComment'],_0x21008b[_0x28f414(0x182)],_0x21008b['UniverNetwork']));}(this,function(_0x558cbb,_0x56c752,_0xe3a7ef,_0x49ccf8,_0x5d7012,_0x40ee22,_0x401b33,_0x275513){'use strict';const _0xbc40f2=_0x1521;const _0x1cbfc1=_0xbc40f2(0x138);var _0x3e564a=(_0x2786b8=>(_0x2786b8[_0x2786b8[_0xbc40f2(0x176)]=0x0]=_0xbc40f2(0x176),_0x2786b8[_0x2786b8[_0xbc40f2(0x1a6)]=0x1]=_0xbc40f2(0x1a6),_0x2786b8[_0x2786b8[_0xbc40f2(0x14e)]=-0x1]=_0xbc40f2(0x14e),_0x2786b8))(_0x3e564a||{}),_0x24916e=(_0x104173=>(_0x104173[_0x104173[_0xbc40f2(0x136)]=0x0]=_0xbc40f2(0x136),_0x104173[_0x104173['Add']=0x1]=_0xbc40f2(0x150),_0x104173[_0x104173[_0xbc40f2(0x149)]=0x2]=_0xbc40f2(0x149),_0x104173[_0x104173['Edit']=0x3]=_0xbc40f2(0x178),_0x104173[_0x104173[_0xbc40f2(0x1a1)]=0x4]='Delete',_0x104173[_0x104173[_0xbc40f2(0x155)]=0x5]=_0xbc40f2(0x155),_0x104173[_0x104173[_0xbc40f2(0x14e)]=-0x1]=_0xbc40f2(0x14e),_0x104173))(_0x24916e||{});const _0x327441=_0x85035=>_0x49ccf8[_0xbc40f2(0x143)](new Date(+_0x85035))['format'](_0xbc40f2(0x162)),_0x15ec3c=async(_0x5e6d49,_0x1f7adc)=>{const _0x5b15f8=_0xbc40f2,_0x3844ab=_0x5e6d49['get'](_0x49ccf8[_0x5b15f8(0x145)]),_0x2bfa42=_0x5e6d49[_0x5b15f8(0x198)](_0x275513[_0x5b15f8(0x14d)]);_0x1f7adc[_0x5b15f8(0x17e)](_0x1a75b1=>{const _0x1350b2=_0x5b15f8;_0x3844ab[_0x1350b2(0x151)](_0x1a75b1)&&_0x1f7adc['delete'](_0x1a75b1);}),_0x1f7adc[_0x5b15f8(0x172)]&&(await _0x2bfa42[_0x5b15f8(0x198)](_0x5b15f8(0x15d),{'params':{'userIDs':[..._0x1f7adc]}}))['body']['users'][_0x5b15f8(0x17e)](_0x27cb18=>{const _0x5f1ee3=_0x5b15f8;_0x27cb18&&_0x3844ab[_0x5f1ee3(0x17d)](_0x27cb18);});};var _0x59118c=Object[_0xbc40f2(0x154)],_0x1e76f1=(_0x1d7758,_0x5b226a,_0x22d622,_0x16aaaa)=>{const _0x34deae=_0xbc40f2;for(var _0x18ae4b=_0x16aaaa>0x1?void 0x0:_0x16aaaa?_0x59118c(_0x5b226a,_0x22d622):_0x5b226a,_0x3930a4=_0x1d7758[_0x34deae(0x18e)]-0x1,_0x2a10eb;_0x3930a4>=0x0;_0x3930a4--)(_0x2a10eb=_0x1d7758[_0x3930a4])&&(_0x18ae4b=_0x2a10eb(_0x18ae4b)||_0x18ae4b);return _0x18ae4b;},_0x2e2abd=(_0xaf19e9,_0x415187)=>(_0x443029,_0x4cfbae)=>_0x415187(_0x443029,_0x4cfbae,_0xaf19e9);let _0x5c8dd9=class extends _0x49ccf8[_0xbc40f2(0x144)]{constructor(_0x12a888,_0x33061e,_0x41151f,_0x5882fb){const _0x1317b6=_0xbc40f2;super(),this[_0x1317b6(0x19e)]=_0x12a888,this[_0x1317b6(0x180)]=_0x33061e,this['_userService']=_0x41151f,this[_0x1317b6(0x12a)]=_0x5882fb,this[_0x1317b6(0x147)](),this['_initUserSync']();}[_0xbc40f2(0x18d)](){const _0x4d0340=_0xbc40f2;this[_0x4d0340(0x124)](this[_0x4d0340(0x180)][_0x4d0340(0x195)][_0x4d0340(0x187)](_0x401b33[_0x4d0340(0x131)](0x10))[_0x4d0340(0x159)](_0xe5d572=>{const _0x2c3d77=_0x4d0340,_0x2e62f4=new Set();_0xe5d572[_0x2c3d77(0x17e)](_0x43c240=>{const _0x395427=_0x2c3d77;switch(_0x43c240['type']){case _0x395427(0x167):{const _0x2fd409=_0x43c240[_0x395427(0x177)][_0x395427(0x14b)];_0x2e62f4['add'](_0x2fd409);break;}}}),_0x15ec3c(this[_0x2c3d77(0x12a)],_0x2e62f4);}));}[_0xbc40f2(0x147)](){const _0x30e36f=_0xbc40f2;this[_0x30e36f(0x124)](this['_commentService'][_0x30e36f(0x195)]['subscribe'](async _0xf8ed6e=>{const _0x477aa5=_0x30e36f;var _0x512055,_0x5d526d,_0x5307c1,_0x12b86b;const _0xe8d992=(_0x512055=this[_0x477aa5(0x180)][_0x477aa5(0x183)](_0xf8ed6e[_0x477aa5(0x186)])[_0x477aa5(0x192)](_0x2d5765=>_0x2d5765[_0x477aa5(0x170)]===_0xf8ed6e[_0x477aa5(0x170)]))==null?void 0x0:_0x512055[_0x477aa5(0x190)];if(!_0xe8d992)return;const {unitId:_0x54441e,subUnitId:_0x192b05}=_0xe8d992;switch(_0xf8ed6e['user']&&this['_userService'][_0x477aa5(0x17d)](_0xf8ed6e['user']),_0xf8ed6e['type']){case _0x24916e[_0x477aa5(0x150)]:break;case _0x24916e[_0x477aa5(0x149)]:{this[_0x477aa5(0x180)]['addComment'](_0x54441e,_0x192b05,{'unitId':_0x54441e,'subUnitId':_0x192b05,'ref':'','id':_0xf8ed6e[_0x477aa5(0x15b)],'dT':_0x327441(+_0xf8ed6e[_0x477aa5(0x189)]),'threadId':_0xf8ed6e[_0x477aa5(0x170)],'personId':(_0x5307c1=(_0x5d526d=_0xf8ed6e[_0x477aa5(0x13d)])==null?void 0x0:_0x5d526d[_0x477aa5(0x1a7)])!=null?_0x5307c1:_0xf8ed6e[_0x477aa5(0x16e)],'text':JSON[_0x477aa5(0x185)](_0xf8ed6e[_0x477aa5(0x1a9)]),'parentId':_0xe8d992['id']});break;}case _0x24916e[_0x477aa5(0x1a1)]:{const _0x48ca65=this[_0x477aa5(0x180)][_0x477aa5(0x19a)](_0x54441e,_0x192b05,_0xf8ed6e['replyId']);_0x48ca65&&_0x48ca65['parentId']&&this[_0x477aa5(0x180)][_0x477aa5(0x163)](_0x54441e,_0x192b05,_0xf8ed6e[_0x477aa5(0x15b)]);break;}case _0x24916e[_0x477aa5(0x178)]:{this[_0x477aa5(0x180)][_0x477aa5(0x137)](_0x54441e,_0x192b05,{'commentId':_0xf8ed6e['replyId'],'text':JSON[_0x477aa5(0x185)](_0xf8ed6e[_0x477aa5(0x1a9)])});break;}case _0x24916e[_0x477aa5(0x155)]:{const _0x4d56d1=(_0x12b86b=this[_0x477aa5(0x180)]['getUnit'](_0xf8ed6e[_0x477aa5(0x186)])[_0x477aa5(0x192)](_0x5186f8=>_0x5186f8[_0x477aa5(0x170)]===_0xf8ed6e[_0x477aa5(0x170)]))==null?void 0x0:_0x12b86b['root'];_0x4d56d1&&this[_0x477aa5(0x180)][_0x477aa5(0x132)](_0x54441e,_0x192b05,_0x4d56d1['id'],_0xf8ed6e[_0x477aa5(0x14a)]===_0x3e564a[_0x477aa5(0x1a6)]);break;}}}));}};_0x5c8dd9=_0x1e76f1([_0x2e2abd(0x0,_0x49ccf8[_0xbc40f2(0x1ab)](_0x56c752['CommentService'])),_0x2e2abd(0x1,_0x49ccf8[_0xbc40f2(0x1ab)](_0x40ee22[_0xbc40f2(0x16a)])),_0x2e2abd(0x2,_0x49ccf8[_0xbc40f2(0x1ab)](_0x49ccf8[_0xbc40f2(0x145)])),_0x2e2abd(0x3,_0x49ccf8[_0xbc40f2(0x1ab)](_0x49ccf8[_0xbc40f2(0x181)]))],_0x5c8dd9);const _0x5a1e3f='thread-comment-data-source.config',_0x1b2c79={};var _0x2c6b44=Object['getOwnPropertyDescriptor'],_0x6f4ec9=(_0x77530b,_0x43ebf5,_0x573bea,_0x2218f5)=>{const _0x4d42f0=_0xbc40f2;for(var _0x239574=_0x2218f5>0x1?void 0x0:_0x2218f5?_0x2c6b44(_0x43ebf5,_0x573bea):_0x43ebf5,_0x56cf6d=_0x77530b[_0x4d42f0(0x18e)]-0x1,_0x3d9df8;_0x56cf6d>=0x0;_0x56cf6d--)(_0x3d9df8=_0x77530b[_0x56cf6d])&&(_0x239574=_0x3d9df8(_0x239574)||_0x239574);return _0x239574;},_0x351bb6=(_0x1e31ab,_0xa4f6c5)=>(_0x5440b3,_0x356cd5)=>_0xa4f6c5(_0x5440b3,_0x356cd5,_0x1e31ab);function _0xba955b(_0x542a74,_0x2297d8){const _0x455560=_0xbc40f2,_0x4ba9d5=_0x542a74['replies'][0x0];return{..._0x2297d8,'id':_0x4ba9d5[_0x455560(0x15b)],'resolved':_0x542a74[_0x455560(0x14a)]===0x1,'dT':_0x327441(_0x4ba9d5['createTimestamp']),'personId':_0x4ba9d5['userId'],'threadId':_0x4ba9d5[_0x455560(0x170)]};}function _0x51df96(_0x5203e8,_0xf601aa,_0x2ea052){const _0x306fbc=_0xbc40f2;var _0x244cce,_0x15967d;if(((_0x15967d=(_0x244cce=_0x5203e8==null?void 0x0:_0x5203e8[_0x306fbc(0x175)])==null?void 0x0:_0x244cce['length'])!=null?_0x15967d:0x0)>0x0){const _0x398114=(_0x5022c7,_0x592f86)=>({'id':_0x5022c7[_0x306fbc(0x15b)],'threadId':_0x5022c7[_0x306fbc(0x170)],'dT':_0x327441(_0x5022c7[_0x306fbc(0x189)]),'personId':_0x5022c7[_0x306fbc(0x16e)],'resolved':_0x5203e8[_0x306fbc(0x14a)]===_0x3e564a[_0x306fbc(0x1a6)],'unitId':_0xf601aa,'subUnitId':_0x2ea052,'text':JSON[_0x306fbc(0x185)](_0x5022c7[_0x306fbc(0x1a9)]),'parentId':_0x592f86}),_0x485932=_0x398114(_0x5203e8[_0x306fbc(0x175)][0x0]);return{..._0x485932,'children':_0x5203e8['replies'][_0x306fbc(0x19d)](0x1)[_0x306fbc(0x125)](_0x907d88=>_0x398114(_0x907d88,_0x485932['id']))};}return null;}let _0x8946e0=class{constructor(_0x5d2e57,_0x33a435,_0x2844f0,_0x296b40){const _0x89a56f=_0xbc40f2;this['_httpService']=_0x5d2e57,this[_0x89a56f(0x191)]=_0x33a435,this[_0x89a56f(0x134)]=_0x2844f0,this[_0x89a56f(0x12a)]=_0x296b40;}async[_0xbc40f2(0x13b)](_0x328230){const _0x4892cc=_0xbc40f2;var _0x48ea22,_0x1b096b;const {parentId:_0x159322,unitId:_0x1be4c6,text:_0x20269a,threadId:_0x44c47f}=_0x328230,_0x1d909e=(_0x1b096b=(_0x48ea22=_0x20269a[_0x4892cc(0x15a)])==null?void 0x0:_0x48ea22[_0x4892cc(0x18b)](_0x3313cc=>_0x3313cc[_0x4892cc(0x193)]===_0x49ccf8['CustomRangeType'][_0x4892cc(0x16b)])[_0x4892cc(0x125)](_0x5b93ac=>_0x5b93ac['rangeId']))!=null?_0x1b096b:[],_0x47369d=JSON['stringify'](_0x20269a),_0xd1f9c9=(await this['_sessionService'][_0x4892cc(0x12b)](_0x1be4c6))[_0x4892cc(0x1aa)]();if(_0x159322){const _0x49e992={'memberId':_0xd1f9c9,'unitId':_0x1be4c6,'content':_0x47369d,'mention':_0x1d909e,'threadId':_0x44c47f},_0x5423d5=(await this[_0x4892cc(0x16c)][_0x4892cc(0x133)](_0x4892cc(0x13c)+_0x1be4c6+_0x4892cc(0x153),{'body':_0x49e992}))[_0x4892cc(0x17f)]['reply'];return{..._0x328230,'id':_0x5423d5[_0x4892cc(0x15b)],'dT':_0x49ccf8[_0x4892cc(0x143)](+_0x5423d5[_0x4892cc(0x189)])[_0x4892cc(0x168)](_0x4892cc(0x162)),'personId':_0x5423d5[_0x4892cc(0x16e)]};}else{const _0x2d36ac={'memberId':_0xd1f9c9,'unitId':_0x1be4c6,'content':_0x47369d,'mention':_0x1d909e},_0x3b6ffc=await this['_httpService'][_0x4892cc(0x133)](_0x4892cc(0x13c)+_0x1be4c6+_0x4892cc(0x19b),{'body':_0x2d36ac});return _0xba955b(_0x3b6ffc['body'][_0x4892cc(0x1a0)],_0x328230);}}async[_0xbc40f2(0x137)](_0x36c811){const _0x4e6f2f=_0xbc40f2;var _0x2adc48,_0x3d4042;const {text:_0x3dde95,unitId:_0x426068}=_0x36c811,_0x225522=(_0x3d4042=(_0x2adc48=_0x3dde95[_0x4e6f2f(0x15a)])==null?void 0x0:_0x2adc48['filter'](_0x3ba467=>_0x3ba467[_0x4e6f2f(0x193)]===_0x49ccf8[_0x4e6f2f(0x169)][_0x4e6f2f(0x16b)])[_0x4e6f2f(0x125)](_0x3d1c04=>_0x3d1c04[_0x4e6f2f(0x15e)]))!=null?_0x3d4042:[],_0x43efd6=JSON[_0x4e6f2f(0x146)](_0x3dde95),_0x230712=_0x36c811[_0x4e6f2f(0x170)],_0x4b70aa=_0x36c811['id'],_0x4845aa={'memberId':(await this[_0x4e6f2f(0x134)][_0x4e6f2f(0x12b)](_0x426068))[_0x4e6f2f(0x1aa)](),'unitId':_0x426068,'threadId':_0x230712,'mention':_0x225522,'content':_0x43efd6,'replyId':_0x4b70aa},_0x4aa269=await this[_0x4e6f2f(0x16c)][_0x4e6f2f(0x133)]('/universer-api/comment/unit/'+_0x426068+_0x4e6f2f(0x139),{'body':_0x4845aa});return!_0x4aa269[_0x4e6f2f(0x17f)]['error']||_0x4aa269[_0x4e6f2f(0x17f)][_0x4e6f2f(0x19c)][_0x4e6f2f(0x179)]===0x1;}async['resolveComment'](_0x1ea087){const _0x1abcdf=_0xbc40f2,{unitId:_0x428b00}=_0x1ea087,_0x37b250=_0x1ea087[_0x1abcdf(0x170)],_0x23a4b8={'memberId':this[_0x1abcdf(0x191)][_0x1abcdf(0x152)]()[_0x1abcdf(0x1a7)],'unitId':_0x428b00,'threadId':_0x37b250,'solved':_0x1ea087[_0x1abcdf(0x160)]?_0x3e564a[_0x1abcdf(0x1a6)]:_0x3e564a[_0x1abcdf(0x176)]},_0x85db2b=await this['_httpService'][_0x1abcdf(0x133)](_0x1abcdf(0x13c)+_0x428b00+_0x1abcdf(0x1ac),{'body':_0x23a4b8});return!_0x85db2b['body'][_0x1abcdf(0x19c)]||_0x85db2b[_0x1abcdf(0x17f)]['error'][_0x1abcdf(0x179)]===0x1;}async['deleteComment'](_0xded9a3,_0x3f9641,_0x5e2f1d,_0x1747a7){const _0x34f292=_0xbc40f2,_0x23a718={'memberId':(await this[_0x34f292(0x134)][_0x34f292(0x12b)](_0xded9a3))['getMemberID'](),'threadId':_0x5e2f1d,'replyId':_0x1747a7,'unitId':_0xded9a3},_0x1e40eb=await this[_0x34f292(0x16c)][_0x34f292(0x133)]('/universer-api/comment/unit/'+_0xded9a3+_0x34f292(0x17c),{'body':_0x23a718});return!_0x1e40eb[_0x34f292(0x17f)][_0x34f292(0x19c)]||_0x1e40eb[_0x34f292(0x17f)][_0x34f292(0x19c)][_0x34f292(0x179)]===0x1;}async[_0xbc40f2(0x173)](_0x2e2649,_0x235506,_0x3d07c1){const _0x590c63=_0xbc40f2,_0xe291c0={'unitId':_0x2e2649,'threadId':_0x3d07c1},_0x32bccf=await this['_httpService']['post'](_0x590c63(0x13c)+_0x2e2649+_0x590c63(0x156),{'body':_0xe291c0}),_0x213273=_0x3d07c1[_0x590c63(0x125)](_0xbbaf6d=>_0x51df96(_0x32bccf[_0x590c63(0x17f)]['comments'][_0xbbaf6d],_0x2e2649,_0x235506))[_0x590c63(0x18b)](Boolean);return Object[_0x590c63(0x18c)](_0x32bccf[_0x590c63(0x17f)][_0x590c63(0x18f)])[_0x590c63(0x17e)](_0x26b631=>{const _0x27ccd7=_0x590c63;this[_0x27ccd7(0x191)][_0x27ccd7(0x17d)](_0x26b631);}),_0x213273;}[_0xbc40f2(0x1af)](_0x528141){const _0x491eda=_0xbc40f2;return{'id':_0x528141['id'],'threadId':_0x528141['threadId'],'ref':_0x528141[_0x491eda(0x18a)]};}};_0x8946e0=_0x6f4ec9([_0x351bb6(0x0,_0x49ccf8[_0xbc40f2(0x1ab)](_0x275513[_0xbc40f2(0x14d)])),_0x351bb6(0x1,_0x49ccf8[_0xbc40f2(0x1ab)](_0x49ccf8[_0xbc40f2(0x145)])),_0x351bb6(0x2,_0x49ccf8[_0xbc40f2(0x1ab)](_0x56c752[_0xbc40f2(0x17b)])),_0x351bb6(0x3,_0x49ccf8[_0xbc40f2(0x1ab)](_0x49ccf8['Injector']))],_0x8946e0);var _0x39766e=Object['getOwnPropertyDescriptor'],_0xd33cbe=(_0x58bb03,_0xde2d0e,_0x350ebb,_0x27c2ca)=>{const _0x21dba0=_0xbc40f2;for(var _0xcb1448=_0x27c2ca>0x1?void 0x0:_0x27c2ca?_0x39766e(_0xde2d0e,_0x350ebb):_0xde2d0e,_0x2a7d36=_0x58bb03[_0x21dba0(0x18e)]-0x1,_0x3c162c;_0x2a7d36>=0x0;_0x2a7d36--)(_0x3c162c=_0x58bb03[_0x2a7d36])&&(_0xcb1448=_0x3c162c(_0xcb1448)||_0xcb1448);return _0xcb1448;},_0x5e74c2=(_0x2e133d,_0x108493)=>(_0x3ee63e,_0x757e82)=>_0x108493(_0x3ee63e,_0x757e82,_0x2e133d);let _0x5c392d=class extends _0x49ccf8[_0xbc40f2(0x144)]{constructor(_0xe13635,_0x4abe62){const _0x82948b=_0xbc40f2;super(),this['_threadCommentDataSourceService']=_0xe13635,this[_0x82948b(0x15c)]=_0x4abe62,this['_initDataSource']();}[_0xbc40f2(0x158)](){const _0x5b92fe=_0xbc40f2;this[_0x5b92fe(0x17a)][_0x5b92fe(0x14f)]=this[_0x5b92fe(0x15c)],this[_0x5b92fe(0x17a)][_0x5b92fe(0x1a4)]=!0x1;}};_0x5c392d=_0xd33cbe([_0x5e74c2(0x0,_0x40ee22[_0xbc40f2(0x19f)]),_0x5e74c2(0x1,_0x49ccf8[_0xbc40f2(0x1ab)](_0x8946e0))],_0x5c392d);var _0x22184d=Object[_0xbc40f2(0x197)],_0x48f5ca=Object['getOwnPropertyDescriptor'],_0x2a261a=(_0x31d6aa,_0x5609b6,_0x5c648a)=>_0x5609b6 in _0x31d6aa?_0x22184d(_0x31d6aa,_0x5609b6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c648a}):_0x31d6aa[_0x5609b6]=_0x5c648a,_0x819943=(_0x2cf1f2,_0xff9986,_0x27d574,_0x59072d)=>{for(var _0x38e32d=_0x59072d>0x1?void 0x0:_0x59072d?_0x48f5ca(_0xff9986,_0x27d574):_0xff9986,_0x195124=_0x2cf1f2['length']-0x1,_0x313ec0;_0x195124>=0x0;_0x195124--)(_0x313ec0=_0x2cf1f2[_0x195124])&&(_0x38e32d=_0x313ec0(_0x38e32d)||_0x38e32d);return _0x38e32d;},_0x5287b7=(_0x352d60,_0xaf15d8)=>(_0x5bb551,_0x2a5d9a)=>_0xaf15d8(_0x5bb551,_0x2a5d9a,_0x352d60),_0x46b35c=(_0x4aa174,_0x5fe9d2,_0x528673)=>_0x2a261a(_0x4aa174,typeof _0x5fe9d2!=_0xbc40f2(0x126)?_0x5fe9d2+'':_0x5fe9d2,_0x528673);_0x558cbb[_0xbc40f2(0x142)]=class extends _0x49ccf8[_0xbc40f2(0x1a3)]{constructor(_0x10d20e=_0x1b2c79,_0x12bbf0,_0x4b6220){const _0x4d274d=_0xbc40f2;super(),this[_0x4d274d(0x16d)]=_0x10d20e,this['_injector']=_0x12bbf0,this[_0x4d274d(0x161)]=_0x4b6220;const {..._0x5ac3b6}=_0x49ccf8['merge']({},_0x1b2c79,this[_0x4d274d(0x16d)]);this['_configService'][_0x4d274d(0x130)](_0x5a1e3f,_0x5ac3b6);}[_0xbc40f2(0x196)](){const _0x54e402=_0xbc40f2;[[_0x8946e0],[_0x5c392d],[_0x5c8dd9]][_0x54e402(0x17e)](_0x38c99e=>{const _0x211476=_0x54e402;this[_0x211476(0x12a)][_0x211476(0x167)](_0x38c99e);});}[_0xbc40f2(0x188)](){const _0x2cb630=_0xbc40f2;this['_injector'][_0x2cb630(0x198)](_0x5c392d),this['_injector']['get'](_0x5c8dd9);}},_0x46b35c(_0x558cbb[_0xbc40f2(0x142)],_0xbc40f2(0x199),_0x1cbfc1),_0x46b35c(_0x558cbb['UniverThreadCommentDataSourcePlugin'],_0xbc40f2(0x13e),_0x49ccf8[_0xbc40f2(0x1a2)]['UNIVER_UNKNOWN']),_0x558cbb[_0xbc40f2(0x142)]=_0x819943([_0x49ccf8[_0xbc40f2(0x184)](_0x5d7012[_0xbc40f2(0x165)],_0x56c752[_0xbc40f2(0x12f)],_0xe3a7ef['UniverLicensePlugin']),_0x5287b7(0x1,_0x49ccf8['Inject'](_0x49ccf8[_0xbc40f2(0x181)])),_0x5287b7(0x2,_0x49ccf8['IConfigService'])],_0x558cbb[_0xbc40f2(0x142)]),Object[_0xbc40f2(0x197)](_0x558cbb,Symbol[_0xbc40f2(0x12c)],{'value':_0xbc40f2(0x171)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.10-nightly.202504181606",
3
+ "version": "0.6.10-nightly.202504201606",
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.6.10-nightly.202504181606",
49
- "@univerjs-pro/license": "0.6.10-nightly.202504181606",
50
- "@univerjs/core": "0.6.10-nightly.202504181606",
48
+ "@univerjs-pro/collaboration-client": "0.6.10-nightly.202504201606",
49
+ "@univerjs-pro/license": "0.6.10-nightly.202504201606",
50
+ "@univerjs/network": "0.6.10-nightly.202504201606",
51
+ "@univerjs/thread-comment": "0.6.10-nightly.202504201606",
52
+ "@univerjs/thread-comment-ui": "0.6.10-nightly.202504201606",
51
53
  "@univerjs/protocol": "0.1.46-alpha.3",
52
- "@univerjs/thread-comment-ui": "0.6.10-nightly.202504181606",
53
- "@univerjs/thread-comment": "0.6.10-nightly.202504181606",
54
- "@univerjs/network": "0.6.10-nightly.202504181606"
54
+ "@univerjs/core": "0.6.10-nightly.202504201606"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",