@univerjs-pro/thread-comment-datasource 0.2.9 → 0.2.11

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 _0x49b930=_0x36ef;(function(_0x1dfc57,_0x14f415){const _0x2a2536=_0x36ef,_0x445e5f=_0x1dfc57();while(!![]){try{const _0x19c02c=-parseInt(_0x2a2536(0xe2))/0x1+parseInt(_0x2a2536(0xd2))/0x2*(-parseInt(_0x2a2536(0xf8))/0x3)+parseInt(_0x2a2536(0x102))/0x4+-parseInt(_0x2a2536(0x145))/0x5+parseInt(_0x2a2536(0x113))/0x6+parseInt(_0x2a2536(0xec))/0x7*(parseInt(_0x2a2536(0xde))/0x8)+parseInt(_0x2a2536(0xd4))/0x9;if(_0x19c02c===_0x14f415)break;else _0x445e5f['push'](_0x445e5f['shift']());}catch(_0x37cf0a){_0x445e5f['push'](_0x445e5f['shift']());}}}(_0x3e9b,0xe4a3a));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x49b930(0xf9)});const a=require('@univerjs/core'),g=require('@univerjs/thread-comment'),T=require('@univerjs/thread-comment-ui'),y=require(_0x49b930(0x13c)),O=require(_0x49b930(0x137)),$=require(_0x49b930(0x138)),R=require(_0x49b930(0x132)),q='THREAD_COMMENT_DATA_SOURCE_PLUGIN';var p=(_0x34ba88=>(_0x34ba88[_0x34ba88[_0x49b930(0x10b)]=0x0]=_0x49b930(0x10b),_0x34ba88[_0x34ba88[_0x49b930(0x10c)]=0x1]=_0x49b930(0x10c),_0x34ba88[_0x34ba88[_0x49b930(0xef)]=-0x1]=_0x49b930(0xef),_0x34ba88))(p||{}),v=(_0x220da7=>(_0x220da7[_0x220da7[_0x49b930(0x136)]=0x0]=_0x49b930(0x136),_0x220da7[_0x220da7[_0x49b930(0x100)]=0x1]=_0x49b930(0x100),_0x220da7[_0x220da7['Reply']=0x2]='Reply',_0x220da7[_0x220da7[_0x49b930(0x11f)]=0x3]=_0x49b930(0x11f),_0x220da7[_0x220da7[_0x49b930(0x109)]=0x4]=_0x49b930(0x109),_0x220da7[_0x220da7['Solve']=0x5]=_0x49b930(0x131),_0x220da7[_0x220da7[_0x49b930(0xef)]=-0x1]=_0x49b930(0xef),_0x220da7))(v||{});const P=_0x2a996d=>$(new Date(+_0x2a996d))[_0x49b930(0x130)](_0x49b930(0x11c)),E=async(_0x6837c9,_0xf60042)=>{const _0x31bd63=_0x49b930,_0x2c126d=_0x6837c9[_0x31bd63(0xfb)](a[_0x31bd63(0x105)]),_0x2890a9=_0x6837c9['get'](O[_0x31bd63(0x10f)]);_0xf60042['forEach'](_0x28869c=>{const _0x16093b=_0x31bd63;_0x2c126d[_0x16093b(0x114)](_0x28869c)&&_0xf60042[_0x16093b(0xfd)](_0x28869c);}),_0xf60042['size']&&(await _0x2890a9['get'](_0x31bd63(0xdf),{'params':{'userIDs':[..._0xf60042]}}))[_0x31bd63(0xdd)][_0x31bd63(0xee)][_0x31bd63(0x12a)](_0x24d368=>{const _0x410d83=_0x31bd63;_0x24d368&&_0x2c126d[_0x410d83(0x120)](_0x24d368);});};var x=Object[_0x49b930(0xea)],H=Object[_0x49b930(0x13f)],Y=(_0x2d48ac,_0x436a05,_0x66b404,_0x530126)=>{const _0x2ab7a7=_0x49b930;for(var _0x1c0a96=_0x530126>0x1?void 0x0:_0x530126?H(_0x436a05,_0x66b404):_0x436a05,_0x2d194d=_0x2d48ac[_0x2ab7a7(0xd9)]-0x1,_0x5c37dc;_0x2d194d>=0x0;_0x2d194d--)(_0x5c37dc=_0x2d48ac[_0x2d194d])&&(_0x1c0a96=(_0x530126?_0x5c37dc(_0x436a05,_0x66b404,_0x1c0a96):_0x5c37dc(_0x1c0a96))||_0x1c0a96);return _0x530126&&_0x1c0a96&&x(_0x436a05,_0x66b404,_0x1c0a96),_0x1c0a96;},I=(_0x3adc2a,_0x27125e)=>(_0x3dfedb,_0x3598b4)=>_0x27125e(_0x3dfedb,_0x3598b4,_0x3adc2a);function A(_0x912d16,_0xd36592){const _0x2cccf3=_0x49b930,_0x1c6bc7=_0x912d16[_0x2cccf3(0x116)][0x0];return{..._0xd36592,'id':_0x1c6bc7[_0x2cccf3(0xe8)],'resolved':_0x912d16[_0x2cccf3(0x12d)]===0x1,'dT':P(_0x1c6bc7[_0x2cccf3(0x11d)]),'personId':_0x1c6bc7[_0x2cccf3(0xe7)],'threadId':_0x1c6bc7[_0x2cccf3(0x133)]};}function L(_0x393703,_0x2db39,_0x433faa){const _0x1b70e4=_0x49b930;var _0x189cd2,_0x5aa0f9;if(((_0x5aa0f9=(_0x189cd2=_0x393703==null?void 0x0:_0x393703[_0x1b70e4(0x116)])==null?void 0x0:_0x189cd2[_0x1b70e4(0xd9)])!=null?_0x5aa0f9:0x0)>0x0){const _0x48012e=(_0x1952dd,_0xae4505)=>({'id':_0x1952dd[_0x1b70e4(0xe8)],'threadId':_0x1952dd[_0x1b70e4(0x133)],'dT':P(_0x1952dd[_0x1b70e4(0x11d)]),'personId':_0x1952dd[_0x1b70e4(0xe7)],'resolved':_0x393703['solved']===p[_0x1b70e4(0x10c)],'unitId':_0x2db39,'subUnitId':_0x433faa,'text':JSON[_0x1b70e4(0x128)](_0x1952dd[_0x1b70e4(0x134)]),'parentId':_0xae4505}),_0x31e7ee=_0x48012e(_0x393703[_0x1b70e4(0x116)][0x0]);return{..._0x31e7ee,'children':_0x393703['replies'][_0x1b70e4(0xf0)](0x1)[_0x1b70e4(0x13b)](_0x27730f=>_0x48012e(_0x27730f,_0x31e7ee['id']))};}return null;}function _0x36ef(_0x90f16a,_0x273d81){const _0x3e9bab=_0x3e9b();return _0x36ef=function(_0x36ef8f,_0xee373a){_0x36ef8f=_0x36ef8f-0xd1;let _0x129946=_0x3e9bab[_0x36ef8f];return _0x129946;},_0x36ef(_0x90f16a,_0x273d81);}let D=class{constructor(_0x407ba8,_0x228e1a,_0x471e06,_0x201f23){const _0x168f1e=_0x49b930;this[_0x168f1e(0xf7)]=_0x407ba8,this[_0x168f1e(0xfa)]=_0x228e1a,this[_0x168f1e(0xd8)]=_0x471e06,this[_0x168f1e(0x127)]=_0x201f23;}async[_0x49b930(0xfc)](_0x996878){const _0x14f28f=_0x49b930;var _0xdaa6bc,_0x15fe2d;const {parentId:_0x398930,unitId:_0x56dac8,text:_0x4cb00d,threadId:_0x353da9}=_0x996878,_0x395890=(_0x15fe2d=(_0xdaa6bc=_0x4cb00d[_0x14f28f(0xdb)])==null?void 0x0:_0xdaa6bc[_0x14f28f(0xe4)](_0x45e8d9=>_0x45e8d9[_0x14f28f(0x107)]===a['CustomRangeType'][_0x14f28f(0x11e)])['map'](_0x300ad9=>_0x300ad9['rangeId']))!=null?_0x15fe2d:[],_0x1fa553=JSON[_0x14f28f(0x122)](_0x4cb00d),_0x1356f9=(await this[_0x14f28f(0xd8)][_0x14f28f(0x115)](_0x56dac8))[_0x14f28f(0xd3)]();if(_0x398930){const _0x49a1e3={'memberId':_0x1356f9,'unitId':_0x56dac8,'content':_0x1fa553,'mention':_0x395890,'threadId':_0x353da9},_0xe8b653=(await this[_0x14f28f(0xf7)][_0x14f28f(0x14b)](_0x14f28f(0x149)+_0x56dac8+_0x14f28f(0xff),{'body':_0x49a1e3}))['body'][_0x14f28f(0x139)];return{..._0x996878,'id':_0xe8b653['replyId'],'dT':$(+_0xe8b653[_0x14f28f(0x11d)])[_0x14f28f(0x130)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xe8b653['userId']};}else{const _0x2d8efe={'memberId':_0x1356f9,'unitId':_0x56dac8,'content':_0x1fa553,'mention':_0x395890},_0x51c85b=await this['_httpService']['post'](_0x14f28f(0x149)+_0x56dac8+'/add',{'body':_0x2d8efe});return A(_0x51c85b[_0x14f28f(0xdd)][_0x14f28f(0xe9)],_0x996878);}}async[_0x49b930(0xd7)](_0x90dd07){const _0x2cdd05=_0x49b930;var _0x4a882f,_0xe28533;const {text:_0x5c8839,unitId:_0x33f57a}=_0x90dd07,_0x39fb0d=(_0xe28533=(_0x4a882f=_0x5c8839[_0x2cdd05(0xdb)])==null?void 0x0:_0x4a882f[_0x2cdd05(0xe4)](_0x4df743=>_0x4df743[_0x2cdd05(0x107)]===a['CustomRangeType']['COMMENT'])[_0x2cdd05(0x13b)](_0x1d43b1=>_0x1d43b1[_0x2cdd05(0x144)]))!=null?_0xe28533:[],_0x3f1099=JSON[_0x2cdd05(0x122)](_0x5c8839),_0x58730e=_0x90dd07[_0x2cdd05(0x133)],_0x393d62=_0x90dd07['id'],_0x9fb36={'memberId':(await this[_0x2cdd05(0xd8)][_0x2cdd05(0x115)](_0x33f57a))[_0x2cdd05(0xd3)](),'unitId':_0x33f57a,'threadId':_0x58730e,'mention':_0x39fb0d,'content':_0x3f1099,'replyId':_0x393d62},_0x5cbc08=await this[_0x2cdd05(0xf7)]['post'](_0x2cdd05(0x149)+_0x33f57a+_0x2cdd05(0x143),{'body':_0x9fb36});return!_0x5cbc08[_0x2cdd05(0xdd)][_0x2cdd05(0xf6)]||_0x5cbc08[_0x2cdd05(0xdd)][_0x2cdd05(0xf6)][_0x2cdd05(0x12b)]===0x1;}async[_0x49b930(0xe5)](_0x281647){const _0x2391ac=_0x49b930,{unitId:_0x2de1c6}=_0x281647,_0x3df24a=_0x281647[_0x2391ac(0x133)],_0x7fb6e0={'memberId':this[_0x2391ac(0xfa)][_0x2391ac(0x142)]()[_0x2391ac(0xf4)],'unitId':_0x2de1c6,'threadId':_0x3df24a,'solved':_0x281647[_0x2391ac(0xfe)]?p[_0x2391ac(0x10c)]:p[_0x2391ac(0x10b)]},_0x48e8be=await this['_httpService'][_0x2391ac(0x14b)]('/universer-api/comment/unit/'+_0x2de1c6+_0x2391ac(0x123),{'body':_0x7fb6e0});return!_0x48e8be[_0x2391ac(0xdd)][_0x2391ac(0xf6)]||_0x48e8be['body'][_0x2391ac(0xf6)][_0x2391ac(0x12b)]===0x1;}async[_0x49b930(0xe1)](_0x1af410,_0x1945f0,_0x46a9cd,_0x174ae3){const _0x4c862e=_0x49b930,_0x38e7dd={'memberId':(await this[_0x4c862e(0xd8)][_0x4c862e(0x115)](_0x1af410))[_0x4c862e(0xd3)](),'threadId':_0x46a9cd,'replyId':_0x174ae3,'unitId':_0x1af410},_0x24abd1=await this[_0x4c862e(0xf7)][_0x4c862e(0x14b)]('/universer-api/comment/unit/'+_0x1af410+_0x4c862e(0xd1),{'body':_0x38e7dd});return!_0x24abd1[_0x4c862e(0xdd)][_0x4c862e(0xf6)]||_0x24abd1[_0x4c862e(0xdd)][_0x4c862e(0xf6)][_0x4c862e(0x12b)]===0x1;}async['listComments'](_0x1376d4,_0x161e2f,_0x1d4409){const _0x3030aa=_0x49b930,_0x18b60d={'unitId':_0x1376d4,'threadId':_0x1d4409},_0x415762=await this[_0x3030aa(0xf7)]['post']('/universer-api/comment/unit/'+_0x1376d4+'/list',{'body':_0x18b60d}),_0x3c3bcd=_0x1d4409[_0x3030aa(0x13b)](_0x4f0d29=>L(_0x415762[_0x3030aa(0xdd)][_0x3030aa(0xf5)][_0x4f0d29],_0x1376d4,_0x161e2f))['filter'](Boolean);return Object[_0x3030aa(0xe3)](_0x415762['body'][_0x3030aa(0xee)])['forEach'](_0x158c8e=>{const _0x253ada=_0x3030aa;this[_0x253ada(0xfa)]['addUser'](_0x158c8e);}),_0x3c3bcd;}['saveCommentToSnapshot'](_0x16bd1b){const _0x1903fb=_0x49b930;return{'id':_0x16bd1b['id'],'threadId':_0x16bd1b[_0x1903fb(0x133)],'ref':_0x16bd1b[_0x1903fb(0x112)]};}};D=Y([I(0x0,a[_0x49b930(0xed)](O[_0x49b930(0x10f)])),I(0x1,a[_0x49b930(0xed)](a[_0x49b930(0x105)])),I(0x2,a[_0x49b930(0xed)](y['CollaborationSessionService'])),I(0x3,a[_0x49b930(0xed)](a['Injector']))],D);var G=Object[_0x49b930(0xea)],J=Object[_0x49b930(0x13f)],Z=(_0x45ce26,_0x2f75c2,_0x22401e,_0x35c797)=>{const _0x377f89=_0x49b930;for(var _0x23033e=_0x35c797>0x1?void 0x0:_0x35c797?J(_0x2f75c2,_0x22401e):_0x2f75c2,_0x17e0d8=_0x45ce26[_0x377f89(0xd9)]-0x1,_0x452f1c;_0x17e0d8>=0x0;_0x17e0d8--)(_0x452f1c=_0x45ce26[_0x17e0d8])&&(_0x23033e=(_0x35c797?_0x452f1c(_0x2f75c2,_0x22401e,_0x23033e):_0x452f1c(_0x23033e))||_0x23033e);return _0x35c797&&_0x23033e&&G(_0x2f75c2,_0x22401e,_0x23033e),_0x23033e;},F=(_0x1c8d74,_0x5d4d52)=>(_0xe665e7,_0x3523a2)=>_0x5d4d52(_0xe665e7,_0x3523a2,_0x1c8d74);let C=class{constructor(_0x1d1bcc){const _0x1c4a20=_0x49b930;this[_0x1c4a20(0xf7)]=_0x1d1bcc;}async['getMentions'](_0x2018cb,_0x22292f,_0x2efa21){const _0x3df491=_0x49b930,_0xee993b=new URL(window[_0x3df491(0x141)][_0x3df491(0x12f)])['searchParams'][_0x3df491(0xfb)]('unit');if(!_0xee993b)return[];const _0x69908=window[_0x3df491(0x141)][_0x3df491(0x129)],_0x533e35=window['location'][_0x3df491(0x14d)]===_0x3df491(0x12c)?_0x3df491(0xf2):'http';return(await this['_httpService'][_0x3df491(0xfb)](_0x533e35+_0x3df491(0x106)+_0x69908+'/universer-api/authz/collaborator',{'params':{'objectID':_0xee993b,'unitID':_0xee993b}}))[_0x3df491(0xdd)][_0x3df491(0x147)][_0x3df491(0x13b)](_0x4bf129=>{const _0x441807=_0x3df491;var _0x27175b,_0x14f797,_0x44b93a,_0x1e7742,_0x57cfad,_0x1414be;return{'id':(_0x14f797=(_0x27175b=_0x4bf129[_0x441807(0xda)])==null?void 0x0:_0x27175b[_0x441807(0xf4)])!=null?_0x14f797:'','label':(_0x1e7742=(_0x44b93a=_0x4bf129[_0x441807(0xda)])==null?void 0x0:_0x44b93a[_0x441807(0x14c)])!=null?_0x1e7742:'','icon':(_0x1414be=(_0x57cfad=_0x4bf129[_0x441807(0xda)])==null?void 0x0:_0x57cfad['avatar'])!=null?_0x1414be:'','type':_0x441807(0x135)};});}};C=Z([F(0x0,a[_0x49b930(0xed)](O[_0x49b930(0x10f)]))],C);var W=Object[_0x49b930(0xea)],z=Object[_0x49b930(0x13f)],B=(_0x3b1518,_0x39fef,_0x204a5c,_0x42e4dc)=>{const _0x2a93f8=_0x49b930;for(var _0x5cba45=_0x42e4dc>0x1?void 0x0:_0x42e4dc?z(_0x39fef,_0x204a5c):_0x39fef,_0x43c25b=_0x3b1518[_0x2a93f8(0xd9)]-0x1,_0x53346d;_0x43c25b>=0x0;_0x43c25b--)(_0x53346d=_0x3b1518[_0x43c25b])&&(_0x5cba45=(_0x42e4dc?_0x53346d(_0x39fef,_0x204a5c,_0x5cba45):_0x53346d(_0x5cba45))||_0x5cba45);return _0x42e4dc&&_0x5cba45&&W(_0x39fef,_0x204a5c,_0x5cba45),_0x5cba45;},S=(_0x2317e8,_0x1396f6)=>(_0x290acb,_0x4b2719)=>_0x1396f6(_0x290acb,_0x4b2719,_0x2317e8);let b=class extends a[_0x49b930(0xdc)]{constructor(_0x4fd69c,_0x1a82bf,_0x3130a1,_0x2d7a24){const _0x413486=_0x49b930;super(),this[_0x413486(0x11b)]=_0x4fd69c,this[_0x413486(0x118)]=_0x1a82bf,this['_threadCommentMentionDataService']=_0x3130a1,this[_0x413486(0x14a)]=_0x2d7a24,this[_0x413486(0x117)]();}['_initDataSource'](){const _0x5b09bd=_0x49b930;this[_0x5b09bd(0x11b)]['dataSource']=this['_threadCommentDataSource'],this[_0x5b09bd(0x11b)][_0x5b09bd(0x10a)]=!0x1,this[_0x5b09bd(0xf1)]['dataSource']=this[_0x5b09bd(0x14a)];}};b=B([a['OnLifecycle'](a['LifecycleStages']['Starting'],b),S(0x0,g[_0x49b930(0xe0)]),S(0x1,a[_0x49b930(0xed)](D)),S(0x2,T[_0x49b930(0xe6)]),S(0x3,a['Inject'](C))],b);var K=Object[_0x49b930(0xea)],V=Object['getOwnPropertyDescriptor'],Q=(_0x332324,_0x23d5d1,_0x545f17,_0x2fc903)=>{const _0x504cdc=_0x49b930;for(var _0x94880c=_0x2fc903>0x1?void 0x0:_0x2fc903?V(_0x23d5d1,_0x545f17):_0x23d5d1,_0x279e0d=_0x332324[_0x504cdc(0xd9)]-0x1,_0x8c4ab7;_0x279e0d>=0x0;_0x279e0d--)(_0x8c4ab7=_0x332324[_0x279e0d])&&(_0x94880c=(_0x2fc903?_0x8c4ab7(_0x23d5d1,_0x545f17,_0x94880c):_0x8c4ab7(_0x94880c))||_0x94880c);return _0x2fc903&&_0x94880c&&K(_0x23d5d1,_0x545f17,_0x94880c),_0x94880c;},_=(_0x40ac1f,_0x1dd354)=>(_0x40c2ce,_0x447511)=>_0x1dd354(_0x40c2ce,_0x447511,_0x40ac1f);let f=class extends a[_0x49b930(0xdc)]{constructor(_0x434fba,_0x5b6859,_0x15fcec,_0x3f85da){const _0x3b869c=_0x49b930;super(),this[_0x3b869c(0xeb)]=_0x434fba,this['_threadCommentModel']=_0x5b6859,this[_0x3b869c(0xfa)]=_0x15fcec,this[_0x3b869c(0x127)]=_0x3f85da,this[_0x3b869c(0xf3)](),this[_0x3b869c(0x12e)]();}[_0x49b930(0x12e)](){const _0x5cfaa1=_0x49b930;this[_0x5cfaa1(0x101)](this[_0x5cfaa1(0xd5)][_0x5cfaa1(0x119)][_0x5cfaa1(0x148)](R[_0x5cfaa1(0x126)](0x10))['subscribe'](_0x526b9e=>{const _0x5d16b9=_0x5cfaa1,_0x461f2f=new Set();_0x526b9e['forEach'](_0x251941=>{const _0x3b8229=_0x36ef;switch(_0x251941['type']){case'add':{const _0x5d6382=_0x251941['payload'][_0x3b8229(0x146)];_0x461f2f[_0x3b8229(0x10e)](_0x5d6382);break;}}}),E(this[_0x5d16b9(0x127)],_0x461f2f);}));}[_0x49b930(0xf3)](){const _0x44583e=_0x49b930;this[_0x44583e(0x101)](this[_0x44583e(0xeb)][_0x44583e(0x119)][_0x44583e(0x103)](async _0x5803d2=>{const _0x5634f0=_0x44583e;var _0x2ab799,_0xa52f2f;const _0xda3cc6=this[_0x5634f0(0xd5)]['getThread'](_0x5803d2[_0x5634f0(0x111)],_0x5803d2[_0x5634f0(0x133)]);if(!_0xda3cc6)return;const {unitId:_0x224c19,subUnitId:_0x686258}=_0xda3cc6;switch(_0x5803d2[_0x5634f0(0x135)]&&this[_0x5634f0(0xfa)]['addUser'](_0x5803d2[_0x5634f0(0x135)]),_0x5803d2[_0x5634f0(0x11a)]){case v[_0x5634f0(0x100)]:break;case v['Reply']:{this['_threadCommentModel'][_0x5634f0(0xfc)](_0x224c19,_0x686258,{'unitId':_0x224c19,'subUnitId':_0x686258,'ref':'','id':_0x5803d2['replyId'],'dT':P(+_0x5803d2['createTimestamp']),'threadId':_0x5803d2[_0x5634f0(0x133)],'personId':(_0xa52f2f=(_0x2ab799=_0x5803d2[_0x5634f0(0x135)])==null?void 0x0:_0x2ab799[_0x5634f0(0xf4)])!=null?_0xa52f2f:_0x5803d2['userId'],'text':JSON[_0x5634f0(0x128)](_0x5803d2[_0x5634f0(0x134)]),'parentId':_0xda3cc6['id']});break;}case v[_0x5634f0(0x109)]:{const _0xb0570b=this[_0x5634f0(0xd5)]['getComment'](_0x224c19,_0x686258,_0x5803d2[_0x5634f0(0xe8)]);_0xb0570b&&_0xb0570b[_0x5634f0(0x13a)]&&this[_0x5634f0(0xd5)][_0x5634f0(0xe1)](_0x224c19,_0x686258,_0x5803d2[_0x5634f0(0xe8)]);break;}case v[_0x5634f0(0x11f)]:{this[_0x5634f0(0xd5)][_0x5634f0(0xd7)](_0x224c19,_0x686258,{'commentId':_0x5803d2[_0x5634f0(0xe8)],'text':JSON[_0x5634f0(0x128)](_0x5803d2[_0x5634f0(0x134)])});break;}case v[_0x5634f0(0x131)]:{const _0x591af3=this[_0x5634f0(0xd5)][_0x5634f0(0x108)](_0x224c19,_0x5803d2[_0x5634f0(0x133)]);_0x591af3&&this['_threadCommentModel'][_0x5634f0(0xe5)](_0x224c19,_0x686258,_0x591af3['id'],_0x5803d2[_0x5634f0(0x12d)]===p['Solved']);break;}}}));}};f=Q([a['OnLifecycle'](a['LifecycleStages'][_0x49b930(0x124)],f),_(0x0,a[_0x49b930(0xed)](y[_0x49b930(0x13e)])),_(0x1,a['Inject'](g['ThreadCommentModel'])),_(0x2,a[_0x49b930(0xed)](a[_0x49b930(0x105)])),_(0x3,a['Inject'](a[_0x49b930(0x10d)]))],f);var N=Object[_0x49b930(0xea)],X=Object[_0x49b930(0x13f)],k=(_0xfb3786,_0x34aa84,_0x2d90a5)=>_0x34aa84 in _0xfb3786?N(_0xfb3786,_0x34aa84,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2d90a5}):_0xfb3786[_0x34aa84]=_0x2d90a5,ee=(_0x408512,_0x3e6eb7,_0x56cef2,_0xc5c903)=>{const _0x47c293=_0x49b930;for(var _0x307f9a=_0xc5c903>0x1?void 0x0:_0xc5c903?X(_0x3e6eb7,_0x56cef2):_0x3e6eb7,_0x211809=_0x408512[_0x47c293(0xd9)]-0x1,_0x3387ff;_0x211809>=0x0;_0x211809--)(_0x3387ff=_0x408512[_0x211809])&&(_0x307f9a=(_0xc5c903?_0x3387ff(_0x3e6eb7,_0x56cef2,_0x307f9a):_0x3387ff(_0x307f9a))||_0x307f9a);return _0xc5c903&&_0x307f9a&&N(_0x3e6eb7,_0x56cef2,_0x307f9a),_0x307f9a;},re=(_0x4dadea,_0x82424f)=>(_0x20b8f9,_0x528368)=>_0x82424f(_0x20b8f9,_0x528368,_0x4dadea),U=(_0x258c22,_0x4939ea,_0x1bc8a7)=>k(_0x258c22,typeof _0x4939ea!=_0x49b930(0x121)?_0x4939ea+'':_0x4939ea,_0x1bc8a7);function _0x3e9b(){const _0x4e8e72=['UniverThreadCommentDataSourcePlugin','location','getCurrentUser','/edit','rangeId','7140530aUnMDA','personId','collaborators','pipe','/universer-api/comment/unit/','_threadCommentMentionDataSource','post','name','protocol','/delete','480168TipxRI','getMemberID','22176360NwpgdA','_threadCommentModel','Plugin','updateComment','_sessionService','length','subject','customRanges','Disposable','body','3791704TWBmFD','/universer-api/user/list','IThreadCommentDataSourceService','deleteComment','786620PvUQbp','values','filter','resolveComment','IThreadCommentMentionDataService','userId','replyId','comment','defineProperty','_commentService','7RlEAkF','Inject','users','UNRECOGNIZED','slice','_threadCommentMentionDataService','https','_init','userID','comments','error','_httpService','21PWrjhC','Module','_userService','get','addComment','delete','resolved','/reply','Add','disposeWithMe','3546440FHRoDd','subscribe','UniverThreadCommentUIPlugin','UserManagerService','://','rangeType','getThread','Delete','syncUpdateMutationToColla','OpenOrReOpen','Solved','Injector','add','HTTPService','DependentOn','unitId','ref','6043242eBVzPn','getUser','requireSession','replies','_initDataSource','_threadCommentDataSource','commentUpdate$','type','_threadCommentDataSourceService','YYYY/MM/DD\x20HH:mm','createTimestamp','COMMENT','Edit','addUser','symbol','stringify','/solved','Ready','pluginName','bufferTime','_injector','parse','host','forEach','code','https:','solved','_initUserSync','href','format','Solve','rxjs','threadId','content','user','Unknown','@univerjs/network','dayjs','reply','parentId','map','@univerjs-pro/collaboration-client','UniverCollaborationClientPlugin','CommentService','getOwnPropertyDescriptor'];_0x3e9b=function(){return _0x4e8e72;};return _0x3e9b();}exports['UniverThreadCommentDataSourcePlugin']=class extends a[_0x49b930(0xd6)]{constructor(_0xc9b448,_0x1ab5b7){const _0xf27c9c=_0x49b930;super(),this[_0xf27c9c(0x127)]=_0x1ab5b7;}['onStarting'](_0x137b70){const _0x5f5591=_0x49b930;[[C],[D],[b],[f]][_0x5f5591(0x12a)](_0x4a8098=>{const _0x582664=_0x5f5591;_0x137b70[_0x582664(0x10e)](_0x4a8098);});}},U(exports[_0x49b930(0x140)],_0x49b930(0x125),q),U(exports[_0x49b930(0x140)],_0x49b930(0x11a),a['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x49b930(0x140)]=ee([a[_0x49b930(0x110)](g['UniverThreadCommentPlugin'],T[_0x49b930(0x104)],y[_0x49b930(0x13d)]),re(0x1,a['Inject'](a[_0x49b930(0x10d)]))],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x338967=_0x4edd;(function(_0x48e543,_0x1413fd){const _0x32dde1=_0x4edd,_0x578f8b=_0x48e543();while(!![]){try{const _0x6c823c=parseInt(_0x32dde1(0x1c0))/0x1+-parseInt(_0x32dde1(0x176))/0x2*(parseInt(_0x32dde1(0x1b8))/0x3)+-parseInt(_0x32dde1(0x188))/0x4+-parseInt(_0x32dde1(0x1df))/0x5*(parseInt(_0x32dde1(0x196))/0x6)+parseInt(_0x32dde1(0x17b))/0x7+-parseInt(_0x32dde1(0x18f))/0x8+parseInt(_0x32dde1(0x18c))/0x9;if(_0x6c823c===_0x1413fd)break;else _0x578f8b['push'](_0x578f8b['shift']());}catch(_0x5420e7){_0x578f8b['push'](_0x578f8b['shift']());}}}(_0x58fd,0x405ff));Object[_0x338967(0x17a)](exports,Symbol[_0x338967(0x18a)],{'value':'Module'});const a=require(_0x338967(0x190)),g=require(_0x338967(0x1db)),T=require(_0x338967(0x1d0)),y=require(_0x338967(0x180)),O=require(_0x338967(0x19a)),$=require('dayjs'),R=require('rxjs'),q=_0x338967(0x1da);var p=(_0x221ac6=>(_0x221ac6[_0x221ac6[_0x338967(0x1ec)]=0x0]=_0x338967(0x1ec),_0x221ac6[_0x221ac6[_0x338967(0x1e9)]=0x1]=_0x338967(0x1e9),_0x221ac6[_0x221ac6['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x221ac6))(p||{}),v=(_0x1d0f3c=>(_0x1d0f3c[_0x1d0f3c[_0x338967(0x198)]=0x0]='Unknown',_0x1d0f3c[_0x1d0f3c[_0x338967(0x1a8)]=0x1]=_0x338967(0x1a8),_0x1d0f3c[_0x1d0f3c[_0x338967(0x1f4)]=0x2]=_0x338967(0x1f4),_0x1d0f3c[_0x1d0f3c[_0x338967(0x192)]=0x3]=_0x338967(0x192),_0x1d0f3c[_0x1d0f3c[_0x338967(0x1ca)]=0x4]='Delete',_0x1d0f3c[_0x1d0f3c[_0x338967(0x18e)]=0x5]=_0x338967(0x18e),_0x1d0f3c[_0x1d0f3c[_0x338967(0x1f1)]=-0x1]=_0x338967(0x1f1),_0x1d0f3c))(v||{});const P=_0x1d9ffe=>$(new Date(+_0x1d9ffe))[_0x338967(0x189)](_0x338967(0x1a5)),E=async(_0x19b7f2,_0x434887)=>{const _0x1abf5e=_0x338967,_0xbaad16=_0x19b7f2[_0x1abf5e(0x1c6)](a[_0x1abf5e(0x1de)]),_0x232d13=_0x19b7f2[_0x1abf5e(0x1c6)](O[_0x1abf5e(0x1a0)]);_0x434887[_0x1abf5e(0x174)](_0x1cc625=>{const _0x150b60=_0x1abf5e;_0xbaad16['getUser'](_0x1cc625)&&_0x434887[_0x150b60(0x17d)](_0x1cc625);}),_0x434887[_0x1abf5e(0x17c)]&&(await _0x232d13[_0x1abf5e(0x1c6)](_0x1abf5e(0x191),{'params':{'userIDs':[..._0x434887]}}))[_0x1abf5e(0x184)][_0x1abf5e(0x1d2)]['forEach'](_0xa936b0=>{const _0x482b18=_0x1abf5e;_0xa936b0&&_0xbaad16[_0x482b18(0x1a7)](_0xa936b0);});};var x=Object[_0x338967(0x17a)],H=Object['getOwnPropertyDescriptor'],Y=(_0x5a4617,_0xf8c4da,_0x1a5fa0,_0x5dd1b5)=>{const _0x4643f3=_0x338967;for(var _0x46e633=_0x5dd1b5>0x1?void 0x0:_0x5dd1b5?H(_0xf8c4da,_0x1a5fa0):_0xf8c4da,_0x154df8=_0x5a4617[_0x4643f3(0x1a3)]-0x1,_0x5d76a5;_0x154df8>=0x0;_0x154df8--)(_0x5d76a5=_0x5a4617[_0x154df8])&&(_0x46e633=(_0x5dd1b5?_0x5d76a5(_0xf8c4da,_0x1a5fa0,_0x46e633):_0x5d76a5(_0x46e633))||_0x46e633);return _0x5dd1b5&&_0x46e633&&x(_0xf8c4da,_0x1a5fa0,_0x46e633),_0x46e633;},I=(_0x1d944e,_0x56a6c7)=>(_0x1a3649,_0x38d7c3)=>_0x56a6c7(_0x1a3649,_0x38d7c3,_0x1d944e);function A(_0x524203,_0x46a277){const _0x1e720b=_0x338967,_0x835dc0=_0x524203[_0x1e720b(0x1dc)][0x0];return{..._0x46a277,'id':_0x835dc0['replyId'],'resolved':_0x524203['solved']===0x1,'dT':P(_0x835dc0[_0x1e720b(0x19b)]),'personId':_0x835dc0['userId'],'threadId':_0x835dc0[_0x1e720b(0x1b0)]};}function _0x58fd(){const _0x46683b=['_initUserSync','https','Solved','deleteComment','dataSource','OpenOrReOpen','subscribe','_commentService','addComment','UniverThreadCommentDataSourcePlugin','UNRECOGNIZED','Injector','userID','Reply','add','IThreadCommentDataSourceService','parse','forEach','ThreadCommentModel','2VgUPFB','replyId','getOwnPropertyDescriptor','href','defineProperty','931273hsUBbQ','size','delete','disposeWithMe','getMemberID','@univerjs-pro/collaboration-client','user','_userService','comments','body','rangeId','unitId','subject','1389228HDThJC','format','toStringTag','commentUpdate$','9675441BMSuwn','listComments','Solve','2298744WmHpGc','@univerjs/core','/universer-api/user/list','Edit','error','Ready','://','204GFRkmv','UniverCollaborationClientPlugin','Unknown','type','@univerjs/network','createTimestamp','slice','_init','onStarting','/delete','HTTPService','filter','resolved','length','comment','YYYY/MM/DD\x20HH:mm','content','addUser','Add','getThread','_sessionService','LifecycleStages','Disposable','parentId','avatar','UniverThreadCommentUIPlugin','threadId','requireSession','_threadCommentMentionDataService','_httpService','map','updateComment','stringify','solved','407157dtykwu','_threadCommentModel','UNIVER_UNKNOWN','resolveComment','_threadCommentDataSource','customRanges','UniverThreadCommentPlugin','/universer-api/comment/unit/','287986djlHtW','COMMENT','reply','getCurrentUser','_injector','host','get','protocol','http','personId','Delete','userId','symbol','_threadCommentMentionDataSource','code','CustomRangeType','@univerjs/thread-comment-ui','Inject','users','syncUpdateMutationToColla','_threadCommentDataSourceService','post','payload','ref','https:','UniverInstanceType','THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs/thread-comment','replies','location','UserManagerService','67945gXwBGe','searchParams','/list','Starting','/universer-api/authz/collaborator','/solved','Plugin','rangeType'];_0x58fd=function(){return _0x46683b;};return _0x58fd();}function L(_0x280c69,_0x4725e0,_0x3b065a){const _0x3139ad=_0x338967;var _0x5e2956,_0x2ce27c;if(((_0x2ce27c=(_0x5e2956=_0x280c69==null?void 0x0:_0x280c69[_0x3139ad(0x1dc)])==null?void 0x0:_0x5e2956['length'])!=null?_0x2ce27c:0x0)>0x0){const _0x3fa89c=(_0x230a4d,_0x34fde7)=>({'id':_0x230a4d['replyId'],'threadId':_0x230a4d[_0x3139ad(0x1b0)],'dT':P(_0x230a4d['createTimestamp']),'personId':_0x230a4d[_0x3139ad(0x1cb)],'resolved':_0x280c69['solved']===p['Solved'],'unitId':_0x4725e0,'subUnitId':_0x3b065a,'text':JSON['parse'](_0x230a4d[_0x3139ad(0x1a6)]),'parentId':_0x34fde7}),_0x33b92c=_0x3fa89c(_0x280c69[_0x3139ad(0x1dc)][0x0]);return{..._0x33b92c,'children':_0x280c69[_0x3139ad(0x1dc)][_0x3139ad(0x19c)](0x1)[_0x3139ad(0x1b4)](_0x4b602c=>_0x3fa89c(_0x4b602c,_0x33b92c['id']))};}return null;}let D=class{constructor(_0x53ce02,_0x5a854f,_0x1a88db,_0x3d65ae){const _0x5835fd=_0x338967;this[_0x5835fd(0x1b3)]=_0x53ce02,this[_0x5835fd(0x182)]=_0x5a854f,this['_sessionService']=_0x1a88db,this[_0x5835fd(0x1c4)]=_0x3d65ae;}async[_0x338967(0x1ef)](_0x2aba2b){const _0x3111d0=_0x338967;var _0x33ec62,_0x7a779c;const {parentId:_0x103eb8,unitId:_0x574bbc,text:_0x3016ff,threadId:_0x43d753}=_0x2aba2b,_0x45148e=(_0x7a779c=(_0x33ec62=_0x3016ff[_0x3111d0(0x1bd)])==null?void 0x0:_0x33ec62[_0x3111d0(0x1a1)](_0x277d99=>_0x277d99[_0x3111d0(0x1e6)]===a[_0x3111d0(0x1cf)][_0x3111d0(0x1c1)])[_0x3111d0(0x1b4)](_0x4fb443=>_0x4fb443[_0x3111d0(0x185)]))!=null?_0x7a779c:[],_0x2b5984=JSON['stringify'](_0x3016ff),_0x53ca79=(await this[_0x3111d0(0x1aa)][_0x3111d0(0x1b1)](_0x574bbc))[_0x3111d0(0x17f)]();if(_0x103eb8){const _0xe8c836={'memberId':_0x53ca79,'unitId':_0x574bbc,'content':_0x2b5984,'mention':_0x45148e,'threadId':_0x43d753},_0x5cd71a=(await this[_0x3111d0(0x1b3)]['post']('/universer-api/comment/unit/'+_0x574bbc+'/reply',{'body':_0xe8c836}))[_0x3111d0(0x184)][_0x3111d0(0x1c2)];return{..._0x2aba2b,'id':_0x5cd71a[_0x3111d0(0x177)],'dT':$(+_0x5cd71a['createTimestamp'])[_0x3111d0(0x189)](_0x3111d0(0x1a5)),'personId':_0x5cd71a[_0x3111d0(0x1cb)]};}else{const _0x56f376={'memberId':_0x53ca79,'unitId':_0x574bbc,'content':_0x2b5984,'mention':_0x45148e},_0x2dcfe0=await this[_0x3111d0(0x1b3)]['post'](_0x3111d0(0x1bf)+_0x574bbc+'/add',{'body':_0x56f376});return A(_0x2dcfe0[_0x3111d0(0x184)][_0x3111d0(0x1a4)],_0x2aba2b);}}async[_0x338967(0x1b5)](_0x195d31){const _0x363afa=_0x338967;var _0x470479,_0x29576c;const {text:_0x1aa110,unitId:_0x4bf50e}=_0x195d31,_0x32409b=(_0x29576c=(_0x470479=_0x1aa110[_0x363afa(0x1bd)])==null?void 0x0:_0x470479['filter'](_0x3144c7=>_0x3144c7[_0x363afa(0x1e6)]===a[_0x363afa(0x1cf)]['COMMENT'])[_0x363afa(0x1b4)](_0x49de1a=>_0x49de1a[_0x363afa(0x185)]))!=null?_0x29576c:[],_0x74d834=JSON[_0x363afa(0x1b6)](_0x1aa110),_0x4fb2aa=_0x195d31[_0x363afa(0x1b0)],_0x5231e2=_0x195d31['id'],_0x1dedb8={'memberId':(await this[_0x363afa(0x1aa)][_0x363afa(0x1b1)](_0x4bf50e))[_0x363afa(0x17f)](),'unitId':_0x4bf50e,'threadId':_0x4fb2aa,'mention':_0x32409b,'content':_0x74d834,'replyId':_0x5231e2},_0x36f265=await this[_0x363afa(0x1b3)][_0x363afa(0x1d5)](_0x363afa(0x1bf)+_0x4bf50e+'/edit',{'body':_0x1dedb8});return!_0x36f265['body'][_0x363afa(0x193)]||_0x36f265[_0x363afa(0x184)]['error'][_0x363afa(0x1ce)]===0x1;}async['resolveComment'](_0x4a6158){const _0x54828c=_0x338967,{unitId:_0x395a50}=_0x4a6158,_0x34c506=_0x4a6158[_0x54828c(0x1b0)],_0x13b991={'memberId':this[_0x54828c(0x182)][_0x54828c(0x1c3)]()['userID'],'unitId':_0x395a50,'threadId':_0x34c506,'solved':_0x4a6158[_0x54828c(0x1a2)]?p['Solved']:p['OpenOrReOpen']},_0x2ebae8=await this['_httpService'][_0x54828c(0x1d5)]('/universer-api/comment/unit/'+_0x395a50+_0x54828c(0x1e4),{'body':_0x13b991});return!_0x2ebae8[_0x54828c(0x184)][_0x54828c(0x193)]||_0x2ebae8['body']['error'][_0x54828c(0x1ce)]===0x1;}async['deleteComment'](_0x437e3d,_0x259b75,_0x4e2e05,_0x56e1c7){const _0x2f6289=_0x338967,_0x110d38={'memberId':(await this['_sessionService'][_0x2f6289(0x1b1)](_0x437e3d))[_0x2f6289(0x17f)](),'threadId':_0x4e2e05,'replyId':_0x56e1c7,'unitId':_0x437e3d},_0x26314e=await this[_0x2f6289(0x1b3)][_0x2f6289(0x1d5)]('/universer-api/comment/unit/'+_0x437e3d+_0x2f6289(0x19f),{'body':_0x110d38});return!_0x26314e[_0x2f6289(0x184)][_0x2f6289(0x193)]||_0x26314e[_0x2f6289(0x184)][_0x2f6289(0x193)][_0x2f6289(0x1ce)]===0x1;}async[_0x338967(0x18d)](_0x1f5490,_0x5cfaf9,_0x54c792){const _0xb0b9f3=_0x338967,_0x41d669={'unitId':_0x1f5490,'threadId':_0x54c792},_0x5bafff=await this['_httpService'][_0xb0b9f3(0x1d5)](_0xb0b9f3(0x1bf)+_0x1f5490+_0xb0b9f3(0x1e1),{'body':_0x41d669}),_0x475214=_0x54c792[_0xb0b9f3(0x1b4)](_0x3f301d=>L(_0x5bafff['body'][_0xb0b9f3(0x183)][_0x3f301d],_0x1f5490,_0x5cfaf9))[_0xb0b9f3(0x1a1)](Boolean);return Object['values'](_0x5bafff['body']['users'])['forEach'](_0x79ca44=>{const _0x4d6ff4=_0xb0b9f3;this[_0x4d6ff4(0x182)][_0x4d6ff4(0x1a7)](_0x79ca44);}),_0x475214;}['saveCommentToSnapshot'](_0x2cd23b){const _0xfab306=_0x338967;return{'id':_0x2cd23b['id'],'threadId':_0x2cd23b[_0xfab306(0x1b0)],'ref':_0x2cd23b[_0xfab306(0x1d7)]};}};D=Y([I(0x0,a[_0x338967(0x1d1)](O['HTTPService'])),I(0x1,a['Inject'](a['UserManagerService'])),I(0x2,a[_0x338967(0x1d1)](y['CollaborationSessionService'])),I(0x3,a[_0x338967(0x1d1)](a[_0x338967(0x1f2)]))],D);var G=Object[_0x338967(0x17a)],J=Object['getOwnPropertyDescriptor'],Z=(_0x1bdb49,_0xbdfda2,_0x34cfe9,_0x308920)=>{for(var _0x3562f6=_0x308920>0x1?void 0x0:_0x308920?J(_0xbdfda2,_0x34cfe9):_0xbdfda2,_0x3365a8=_0x1bdb49['length']-0x1,_0xa9f1e7;_0x3365a8>=0x0;_0x3365a8--)(_0xa9f1e7=_0x1bdb49[_0x3365a8])&&(_0x3562f6=(_0x308920?_0xa9f1e7(_0xbdfda2,_0x34cfe9,_0x3562f6):_0xa9f1e7(_0x3562f6))||_0x3562f6);return _0x308920&&_0x3562f6&&G(_0xbdfda2,_0x34cfe9,_0x3562f6),_0x3562f6;},F=(_0x32aab4,_0x293312)=>(_0x87d33d,_0x50d304)=>_0x293312(_0x87d33d,_0x50d304,_0x32aab4);let C=class{constructor(_0x3de386){const _0x191f92=_0x338967;this[_0x191f92(0x1b3)]=_0x3de386;}async['getMentions'](_0x33e03d,_0x291e45,_0x41ccd2){const _0x223a54=_0x338967,_0x55fce6=new URL(window[_0x223a54(0x1dd)][_0x223a54(0x179)])[_0x223a54(0x1e0)][_0x223a54(0x1c6)]('unit');if(!_0x55fce6)return[];const _0x1d11e7=window['location'][_0x223a54(0x1c5)],_0x12b8ee=window[_0x223a54(0x1dd)][_0x223a54(0x1c7)]===_0x223a54(0x1d8)?_0x223a54(0x1e8):_0x223a54(0x1c8);return(await this[_0x223a54(0x1b3)][_0x223a54(0x1c6)](_0x12b8ee+_0x223a54(0x195)+_0x1d11e7+_0x223a54(0x1e3),{'params':{'objectID':_0x55fce6,'unitID':_0x55fce6}}))[_0x223a54(0x184)]['collaborators']['map'](_0x1bd561=>{const _0x4d1e5a=_0x223a54;var _0x46dd0f,_0x95388a,_0x29f246,_0x42205b,_0x51549f,_0x1e434a;return{'id':(_0x95388a=(_0x46dd0f=_0x1bd561[_0x4d1e5a(0x187)])==null?void 0x0:_0x46dd0f[_0x4d1e5a(0x1f3)])!=null?_0x95388a:'','label':(_0x42205b=(_0x29f246=_0x1bd561[_0x4d1e5a(0x187)])==null?void 0x0:_0x29f246['name'])!=null?_0x42205b:'','icon':(_0x1e434a=(_0x51549f=_0x1bd561[_0x4d1e5a(0x187)])==null?void 0x0:_0x51549f[_0x4d1e5a(0x1ae)])!=null?_0x1e434a:'','type':'user'};});}};C=Z([F(0x0,a['Inject'](O[_0x338967(0x1a0)]))],C);var W=Object[_0x338967(0x17a)],z=Object[_0x338967(0x178)],B=(_0x54b469,_0xabc20b,_0x5e229a,_0x414406)=>{const _0x7a93d5=_0x338967;for(var _0x21128e=_0x414406>0x1?void 0x0:_0x414406?z(_0xabc20b,_0x5e229a):_0xabc20b,_0x37ac25=_0x54b469[_0x7a93d5(0x1a3)]-0x1,_0xfcb167;_0x37ac25>=0x0;_0x37ac25--)(_0xfcb167=_0x54b469[_0x37ac25])&&(_0x21128e=(_0x414406?_0xfcb167(_0xabc20b,_0x5e229a,_0x21128e):_0xfcb167(_0x21128e))||_0x21128e);return _0x414406&&_0x21128e&&W(_0xabc20b,_0x5e229a,_0x21128e),_0x21128e;},S=(_0x593e2d,_0x2399e6)=>(_0x21b0f8,_0x207883)=>_0x2399e6(_0x21b0f8,_0x207883,_0x593e2d);let b=class extends a['Disposable']{constructor(_0x289ac9,_0x26596d,_0x59b4e0,_0x46b0a6){const _0x3ffb34=_0x338967;super(),this['_threadCommentDataSourceService']=_0x289ac9,this[_0x3ffb34(0x1bc)]=_0x26596d,this['_threadCommentMentionDataService']=_0x59b4e0,this['_threadCommentMentionDataSource']=_0x46b0a6,this['_initDataSource']();}['_initDataSource'](){const _0x549146=_0x338967;this[_0x549146(0x1d4)][_0x549146(0x1eb)]=this[_0x549146(0x1bc)],this[_0x549146(0x1d4)][_0x549146(0x1d3)]=!0x1,this[_0x549146(0x1b2)]['dataSource']=this[_0x549146(0x1cd)];}};function _0x4edd(_0x37acf7,_0x5bf945){const _0x58fd2d=_0x58fd();return _0x4edd=function(_0x4eddc3,_0x40595c){_0x4eddc3=_0x4eddc3-0x171;let _0x97a7d0=_0x58fd2d[_0x4eddc3];return _0x97a7d0;},_0x4edd(_0x37acf7,_0x5bf945);}b=B([a['OnLifecycle'](a[_0x338967(0x1ab)][_0x338967(0x1e2)],b),S(0x0,g[_0x338967(0x172)]),S(0x1,a['Inject'](D)),S(0x2,T['IThreadCommentMentionDataService']),S(0x3,a['Inject'](C))],b);var K=Object[_0x338967(0x17a)],V=Object[_0x338967(0x178)],Q=(_0x555476,_0x4a418a,_0x20057d,_0x109766)=>{const _0xad49c7=_0x338967;for(var _0x4e5266=_0x109766>0x1?void 0x0:_0x109766?V(_0x4a418a,_0x20057d):_0x4a418a,_0x2176e1=_0x555476[_0xad49c7(0x1a3)]-0x1,_0x4a01ed;_0x2176e1>=0x0;_0x2176e1--)(_0x4a01ed=_0x555476[_0x2176e1])&&(_0x4e5266=(_0x109766?_0x4a01ed(_0x4a418a,_0x20057d,_0x4e5266):_0x4a01ed(_0x4e5266))||_0x4e5266);return _0x109766&&_0x4e5266&&K(_0x4a418a,_0x20057d,_0x4e5266),_0x4e5266;},_=(_0x4fb2c4,_0x4b2560)=>(_0x1e24fc,_0x40b10b)=>_0x4b2560(_0x1e24fc,_0x40b10b,_0x4fb2c4);let f=class extends a[_0x338967(0x1ac)]{constructor(_0x47fb92,_0x4ae539,_0x598f89,_0x453628){const _0x24c442=_0x338967;super(),this[_0x24c442(0x1ee)]=_0x47fb92,this[_0x24c442(0x1b9)]=_0x4ae539,this[_0x24c442(0x182)]=_0x598f89,this['_injector']=_0x453628,this[_0x24c442(0x19d)](),this[_0x24c442(0x1e7)]();}[_0x338967(0x1e7)](){const _0x55d817=_0x338967;this['disposeWithMe'](this['_threadCommentModel'][_0x55d817(0x18b)]['pipe'](R['bufferTime'](0x10))['subscribe'](_0x2928c2=>{const _0x5f1079=_0x55d817,_0x4b987f=new Set();_0x2928c2[_0x5f1079(0x174)](_0x107d53=>{const _0x40332c=_0x5f1079;switch(_0x107d53[_0x40332c(0x199)]){case _0x40332c(0x171):{const _0x307da5=_0x107d53[_0x40332c(0x1d6)][_0x40332c(0x1c9)];_0x4b987f[_0x40332c(0x171)](_0x307da5);break;}}}),E(this['_injector'],_0x4b987f);}));}[_0x338967(0x19d)](){const _0x2a05aa=_0x338967;this[_0x2a05aa(0x17e)](this[_0x2a05aa(0x1ee)][_0x2a05aa(0x18b)][_0x2a05aa(0x1ed)](async _0x510369=>{const _0x274aa7=_0x2a05aa;var _0x424aab,_0x5f366a;const _0x55da9a=this[_0x274aa7(0x1b9)][_0x274aa7(0x1a9)](_0x510369[_0x274aa7(0x186)],_0x510369[_0x274aa7(0x1b0)]);if(!_0x55da9a)return;const {unitId:_0x5a4e72,subUnitId:_0x195a98}=_0x55da9a;switch(_0x510369[_0x274aa7(0x181)]&&this[_0x274aa7(0x182)][_0x274aa7(0x1a7)](_0x510369[_0x274aa7(0x181)]),_0x510369[_0x274aa7(0x199)]){case v[_0x274aa7(0x1a8)]:break;case v[_0x274aa7(0x1f4)]:{this['_threadCommentModel']['addComment'](_0x5a4e72,_0x195a98,{'unitId':_0x5a4e72,'subUnitId':_0x195a98,'ref':'','id':_0x510369[_0x274aa7(0x177)],'dT':P(+_0x510369[_0x274aa7(0x19b)]),'threadId':_0x510369[_0x274aa7(0x1b0)],'personId':(_0x5f366a=(_0x424aab=_0x510369[_0x274aa7(0x181)])==null?void 0x0:_0x424aab[_0x274aa7(0x1f3)])!=null?_0x5f366a:_0x510369['userId'],'text':JSON[_0x274aa7(0x173)](_0x510369['content']),'parentId':_0x55da9a['id']});break;}case v[_0x274aa7(0x1ca)]:{const _0x171902=this[_0x274aa7(0x1b9)]['getComment'](_0x5a4e72,_0x195a98,_0x510369['replyId']);_0x171902&&_0x171902[_0x274aa7(0x1ad)]&&this[_0x274aa7(0x1b9)][_0x274aa7(0x1ea)](_0x5a4e72,_0x195a98,_0x510369[_0x274aa7(0x177)]);break;}case v['Edit']:{this[_0x274aa7(0x1b9)][_0x274aa7(0x1b5)](_0x5a4e72,_0x195a98,{'commentId':_0x510369[_0x274aa7(0x177)],'text':JSON['parse'](_0x510369[_0x274aa7(0x1a6)])});break;}case v[_0x274aa7(0x18e)]:{const _0xe39cd6=this[_0x274aa7(0x1b9)][_0x274aa7(0x1a9)](_0x5a4e72,_0x510369[_0x274aa7(0x1b0)]);_0xe39cd6&&this['_threadCommentModel'][_0x274aa7(0x1bb)](_0x5a4e72,_0x195a98,_0xe39cd6['id'],_0x510369[_0x274aa7(0x1b7)]===p[_0x274aa7(0x1e9)]);break;}}}));}};f=Q([a['OnLifecycle'](a[_0x338967(0x1ab)][_0x338967(0x194)],f),_(0x0,a['Inject'](y['CommentService'])),_(0x1,a['Inject'](g[_0x338967(0x175)])),_(0x2,a['Inject'](a['UserManagerService'])),_(0x3,a[_0x338967(0x1d1)](a['Injector']))],f);var N=Object['defineProperty'],X=Object[_0x338967(0x178)],k=(_0x374186,_0x13cda0,_0x3b1018)=>_0x13cda0 in _0x374186?N(_0x374186,_0x13cda0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b1018}):_0x374186[_0x13cda0]=_0x3b1018,ee=(_0x150bc1,_0x4d644c,_0x3217f7,_0x2e0a43)=>{const _0x10c991=_0x338967;for(var _0x17b565=_0x2e0a43>0x1?void 0x0:_0x2e0a43?X(_0x4d644c,_0x3217f7):_0x4d644c,_0x460bfe=_0x150bc1[_0x10c991(0x1a3)]-0x1,_0x2c8831;_0x460bfe>=0x0;_0x460bfe--)(_0x2c8831=_0x150bc1[_0x460bfe])&&(_0x17b565=(_0x2e0a43?_0x2c8831(_0x4d644c,_0x3217f7,_0x17b565):_0x2c8831(_0x17b565))||_0x17b565);return _0x2e0a43&&_0x17b565&&N(_0x4d644c,_0x3217f7,_0x17b565),_0x17b565;},re=(_0x4fcb47,_0x4ba339)=>(_0x1c81b8,_0x1150c2)=>_0x4ba339(_0x1c81b8,_0x1150c2,_0x4fcb47),U=(_0xb2848d,_0x213b16,_0x3bed66)=>k(_0xb2848d,typeof _0x213b16!=_0x338967(0x1cc)?_0x213b16+'':_0x213b16,_0x3bed66);exports['UniverThreadCommentDataSourcePlugin']=class extends a[_0x338967(0x1e5)]{constructor(_0x50638f,_0x5d6f19){const _0x3076c3=_0x338967;super(),this[_0x3076c3(0x1c4)]=_0x5d6f19;}[_0x338967(0x19e)](_0x2848f5){[[C],[D],[b],[f]]['forEach'](_0x284143=>{const _0x2dfeb6=_0x4edd;_0x2848f5[_0x2dfeb6(0x171)](_0x284143);});}},U(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',q),U(exports['UniverThreadCommentDataSourcePlugin'],_0x338967(0x199),a[_0x338967(0x1d9)][_0x338967(0x1ba)]),exports[_0x338967(0x1f0)]=ee([a['DependentOn'](g[_0x338967(0x1be)],T[_0x338967(0x1af)],y[_0x338967(0x197)]),re(0x1,a[_0x338967(0x1d1)](a[_0x338967(0x1f2)]))],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x165011=_0x61ca;(function(_0x4c6505,_0x1f3fb4){const _0xe922fc=_0x61ca,_0x116961=_0x4c6505();while(!![]){try{const _0x56c7f8=-parseInt(_0xe922fc(0x142))/0x1*(-parseInt(_0xe922fc(0x12c))/0x2)+parseInt(_0xe922fc(0x164))/0x3+parseInt(_0xe922fc(0x163))/0x4+parseInt(_0xe922fc(0x193))/0x5*(-parseInt(_0xe922fc(0x13a))/0x6)+-parseInt(_0xe922fc(0x182))/0x7*(parseInt(_0xe922fc(0x157))/0x8)+-parseInt(_0xe922fc(0x137))/0x9+parseInt(_0xe922fc(0x178))/0xa;if(_0x56c7f8===_0x1f3fb4)break;else _0x116961['push'](_0x116961['shift']());}catch(_0x317277){_0x116961['push'](_0x116961['shift']());}}}(_0x5aed,0xb64ae));import{UserManagerService as _0x2b64d3,Inject as _0x3392f0,Injector as _0x46f1f0,CustomRangeType as _0x3f7b7d,OnLifecycle as _0x21be5d,LifecycleStages as _0x3c42b9,Disposable as _0x42ad2c,UniverInstanceType as _0x130f22,DependentOn as _0x41379d,Plugin as _0x1a184e}from'@univerjs/core';import{IThreadCommentDataSourceService as _0x36dd23,ThreadCommentModel as _0x545191,UniverThreadCommentPlugin as _0x51ae2c}from'@univerjs/thread-comment';function _0x61ca(_0x455fb6,_0x358bb4){const _0x5aed63=_0x5aed();return _0x61ca=function(_0x61ca2,_0x3fd43d){_0x61ca2=_0x61ca2-0x128;let _0x3cdc50=_0x5aed63[_0x61ca2];return _0x3cdc50;},_0x61ca(_0x455fb6,_0x358bb4);}import{IThreadCommentMentionDataService as _0x3e08cd,UniverThreadCommentUIPlugin as _0x264eb6}from'@univerjs/thread-comment-ui';import{CollaborationSessionService as _0x53f925,CommentService as _0x3a6c82,UniverCollaborationClientPlugin as _0x5d1bba}from'@univerjs-pro/collaboration-client';import{HTTPService as _0x2e58e9}from'@univerjs/network';import _0x59315e from'dayjs';import{bufferTime as _0x56ea80}from'rxjs';const V=_0x165011(0x147);var v=(_0x5e0415=>(_0x5e0415[_0x5e0415['OpenOrReOpen']=0x0]=_0x165011(0x180),_0x5e0415[_0x5e0415['Solved']=0x1]=_0x165011(0x181),_0x5e0415[_0x5e0415[_0x165011(0x12f)]=-0x1]=_0x165011(0x12f),_0x5e0415))(v||{}),p=(_0x591e76=>(_0x591e76[_0x591e76[_0x165011(0x18b)]=0x0]=_0x165011(0x18b),_0x591e76[_0x591e76[_0x165011(0x13f)]=0x1]=_0x165011(0x13f),_0x591e76[_0x591e76[_0x165011(0x14a)]=0x2]=_0x165011(0x14a),_0x591e76[_0x591e76[_0x165011(0x12e)]=0x3]=_0x165011(0x12e),_0x591e76[_0x591e76[_0x165011(0x155)]=0x4]=_0x165011(0x155),_0x591e76[_0x591e76[_0x165011(0x17a)]=0x5]=_0x165011(0x17a),_0x591e76[_0x591e76[_0x165011(0x12f)]=-0x1]='UNRECOGNIZED',_0x591e76))(p||{});const w=_0x4209ff=>_0x59315e(new Date(+_0x4209ff))[_0x165011(0x12b)](_0x165011(0x197)),Q=async(_0x1974e6,_0x74f1b5)=>{const _0x426828=_0x165011,_0x214ffc=_0x1974e6[_0x426828(0x145)](_0x2b64d3),_0x251e0a=_0x1974e6[_0x426828(0x145)](_0x2e58e9);_0x74f1b5['forEach'](_0x2fc3e8=>{const _0x4aa34a=_0x426828;_0x214ffc[_0x4aa34a(0x190)](_0x2fc3e8)&&_0x74f1b5[_0x4aa34a(0x18c)](_0x2fc3e8);}),_0x74f1b5[_0x426828(0x198)]&&(await _0x251e0a['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x74f1b5]}}))[_0x426828(0x150)][_0x426828(0x14b)][_0x426828(0x154)](_0x33bd10=>{_0x33bd10&&_0x214ffc['addUser'](_0x33bd10);});};var X=Object[_0x165011(0x16c)],k=Object['getOwnPropertyDescriptor'],ee=(_0x5b9f6c,_0x519964,_0x672b9c,_0x5b76a1)=>{const _0x17be08=_0x165011;for(var _0x3c1ea3=_0x5b76a1>0x1?void 0x0:_0x5b76a1?k(_0x519964,_0x672b9c):_0x519964,_0x53c511=_0x5b9f6c[_0x17be08(0x13b)]-0x1,_0xf31cca;_0x53c511>=0x0;_0x53c511--)(_0xf31cca=_0x5b9f6c[_0x53c511])&&(_0x3c1ea3=(_0x5b76a1?_0xf31cca(_0x519964,_0x672b9c,_0x3c1ea3):_0xf31cca(_0x3c1ea3))||_0x3c1ea3);return _0x5b76a1&&_0x3c1ea3&&X(_0x519964,_0x672b9c,_0x3c1ea3),_0x3c1ea3;},_=(_0x22b85b,_0x9bea7f)=>(_0x2edb7d,_0x9af077)=>_0x9bea7f(_0x2edb7d,_0x9af077,_0x22b85b);function re(_0x676f98,_0x30394){const _0x130585=_0x165011,_0x3a28e2=_0x676f98['replies'][0x0];return{..._0x30394,'id':_0x3a28e2[_0x130585(0x19a)],'resolved':_0x676f98['solved']===0x1,'dT':w(_0x3a28e2[_0x130585(0x19c)]),'personId':_0x3a28e2[_0x130585(0x189)],'threadId':_0x3a28e2['threadId']};}function te(_0x4fc70c,_0x23098b,_0x2f64a4){const _0x2684aa=_0x165011;var _0x155a83,_0x22b92b;if(((_0x22b92b=(_0x155a83=_0x4fc70c==null?void 0x0:_0x4fc70c[_0x2684aa(0x134)])==null?void 0x0:_0x155a83[_0x2684aa(0x13b)])!=null?_0x22b92b:0x0)>0x0){const _0x40afc0=(_0x440f88,_0x42542e)=>({'id':_0x440f88[_0x2684aa(0x19a)],'threadId':_0x440f88['threadId'],'dT':w(_0x440f88[_0x2684aa(0x19c)]),'personId':_0x440f88[_0x2684aa(0x189)],'resolved':_0x4fc70c[_0x2684aa(0x160)]===v[_0x2684aa(0x181)],'unitId':_0x23098b,'subUnitId':_0x2f64a4,'text':JSON['parse'](_0x440f88[_0x2684aa(0x14d)]),'parentId':_0x42542e}),_0x11eb97=_0x40afc0(_0x4fc70c[_0x2684aa(0x134)][0x0]);return{..._0x11eb97,'children':_0x4fc70c[_0x2684aa(0x134)][_0x2684aa(0x196)](0x1)[_0x2684aa(0x17b)](_0x7c5200=>_0x40afc0(_0x7c5200,_0x11eb97['id']))};}return null;}let D=class{constructor(_0x41ff25,_0x2c4e38,_0xeb629b,_0x2745fa){const _0x49ab55=_0x165011;this[_0x49ab55(0x143)]=_0x41ff25,this[_0x49ab55(0x152)]=_0x2c4e38,this[_0x49ab55(0x18f)]=_0xeb629b,this[_0x49ab55(0x192)]=_0x2745fa;}async[_0x165011(0x148)](_0x23dcf3){const _0x3ee10c=_0x165011;var _0x329a4a,_0x18396b;const {parentId:_0x53fb57,unitId:_0x218e84,text:_0x5a7e07,threadId:_0x103161}=_0x23dcf3,_0x7b40e5=(_0x18396b=(_0x329a4a=_0x5a7e07[_0x3ee10c(0x13c)])==null?void 0x0:_0x329a4a[_0x3ee10c(0x15c)](_0x3cc368=>_0x3cc368['rangeType']===_0x3f7b7d[_0x3ee10c(0x17f)])[_0x3ee10c(0x17b)](_0x22c21c=>_0x22c21c[_0x3ee10c(0x187)]))!=null?_0x18396b:[],_0x31fd51=JSON[_0x3ee10c(0x19b)](_0x5a7e07),_0x5a7dc4=(await this['_sessionService'][_0x3ee10c(0x174)](_0x218e84))[_0x3ee10c(0x131)]();if(_0x53fb57){const _0x5096d5={'memberId':_0x5a7dc4,'unitId':_0x218e84,'content':_0x31fd51,'mention':_0x7b40e5,'threadId':_0x103161},_0x4a033e=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x218e84+_0x3ee10c(0x19d),{'body':_0x5096d5}))['body'][_0x3ee10c(0x195)];return{..._0x23dcf3,'id':_0x4a033e['replyId'],'dT':_0x59315e(+_0x4a033e[_0x3ee10c(0x19c)])[_0x3ee10c(0x12b)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4a033e[_0x3ee10c(0x189)]};}else{const _0x4bd365={'memberId':_0x5a7dc4,'unitId':_0x218e84,'content':_0x31fd51,'mention':_0x7b40e5},_0x1f6a58=await this['_httpService'][_0x3ee10c(0x139)](_0x3ee10c(0x15f)+_0x218e84+_0x3ee10c(0x165),{'body':_0x4bd365});return re(_0x1f6a58[_0x3ee10c(0x150)][_0x3ee10c(0x13e)],_0x23dcf3);}}async[_0x165011(0x159)](_0x1cecde){const _0x3a7de5=_0x165011;var _0x422b43,_0x82408e;const {text:_0x36aa02,unitId:_0x387374}=_0x1cecde,_0x358f83=(_0x82408e=(_0x422b43=_0x36aa02['customRanges'])==null?void 0x0:_0x422b43[_0x3a7de5(0x15c)](_0x114d38=>_0x114d38[_0x3a7de5(0x18a)]===_0x3f7b7d['COMMENT'])[_0x3a7de5(0x17b)](_0x445c27=>_0x445c27[_0x3a7de5(0x187)]))!=null?_0x82408e:[],_0xd43380=JSON[_0x3a7de5(0x19b)](_0x36aa02),_0x156c42=_0x1cecde['threadId'],_0x307fce=_0x1cecde['id'],_0x4c6cd6={'memberId':(await this[_0x3a7de5(0x18f)][_0x3a7de5(0x174)](_0x387374))[_0x3a7de5(0x131)](),'unitId':_0x387374,'threadId':_0x156c42,'mention':_0x358f83,'content':_0xd43380,'replyId':_0x307fce},_0x22aabb=await this[_0x3a7de5(0x143)]['post'](_0x3a7de5(0x15f)+_0x387374+_0x3a7de5(0x183),{'body':_0x4c6cd6});return!_0x22aabb[_0x3a7de5(0x150)][_0x3a7de5(0x17c)]||_0x22aabb[_0x3a7de5(0x150)]['error'][_0x3a7de5(0x170)]===0x1;}async[_0x165011(0x149)](_0x3de0fa){const _0x2a9020=_0x165011,{unitId:_0x58d218}=_0x3de0fa,_0x34f193=_0x3de0fa[_0x2a9020(0x138)],_0xb630db={'memberId':this[_0x2a9020(0x152)][_0x2a9020(0x14e)]()[_0x2a9020(0x128)],'unitId':_0x58d218,'threadId':_0x34f193,'solved':_0x3de0fa[_0x2a9020(0x140)]?v[_0x2a9020(0x181)]:v[_0x2a9020(0x180)]},_0x56a748=await this[_0x2a9020(0x143)][_0x2a9020(0x139)](_0x2a9020(0x15f)+_0x58d218+_0x2a9020(0x151),{'body':_0xb630db});return!_0x56a748[_0x2a9020(0x150)][_0x2a9020(0x17c)]||_0x56a748[_0x2a9020(0x150)][_0x2a9020(0x17c)][_0x2a9020(0x170)]===0x1;}async['deleteComment'](_0x57bf23,_0x2289a5,_0x31d77a,_0x5957ec){const _0xde4c65=_0x165011,_0x4098b2={'memberId':(await this[_0xde4c65(0x18f)][_0xde4c65(0x174)](_0x57bf23))[_0xde4c65(0x131)](),'threadId':_0x31d77a,'replyId':_0x5957ec,'unitId':_0x57bf23},_0x3c42fc=await this['_httpService'][_0xde4c65(0x139)](_0xde4c65(0x15f)+_0x57bf23+_0xde4c65(0x15d),{'body':_0x4098b2});return!_0x3c42fc[_0xde4c65(0x150)][_0xde4c65(0x17c)]||_0x3c42fc[_0xde4c65(0x150)][_0xde4c65(0x17c)]['code']===0x1;}async[_0x165011(0x17d)](_0x553b8d,_0x39bda5,_0x45db9){const _0x3ff01a=_0x165011,_0x38b082={'unitId':_0x553b8d,'threadId':_0x45db9},_0x18858c=await this[_0x3ff01a(0x143)][_0x3ff01a(0x139)](_0x3ff01a(0x15f)+_0x553b8d+_0x3ff01a(0x184),{'body':_0x38b082}),_0x3b156a=_0x45db9[_0x3ff01a(0x17b)](_0x199a35=>te(_0x18858c['body'][_0x3ff01a(0x14f)][_0x199a35],_0x553b8d,_0x39bda5))[_0x3ff01a(0x15c)](Boolean);return Object[_0x3ff01a(0x168)](_0x18858c[_0x3ff01a(0x150)][_0x3ff01a(0x14b)])[_0x3ff01a(0x154)](_0x301968=>{const _0x120397=_0x3ff01a;this[_0x120397(0x152)][_0x120397(0x14c)](_0x301968);}),_0x3b156a;}[_0x165011(0x156)](_0x5db58d){const _0x48dfdb=_0x165011;return{'id':_0x5db58d['id'],'threadId':_0x5db58d[_0x48dfdb(0x138)],'ref':_0x5db58d[_0x48dfdb(0x175)]};}};D=ee([_(0x0,_0x3392f0(_0x2e58e9)),_(0x1,_0x3392f0(_0x2b64d3)),_(0x2,_0x3392f0(_0x53f925)),_(0x3,_0x3392f0(_0x46f1f0))],D);var se=Object[_0x165011(0x16c)],oe=Object[_0x165011(0x186)],ne=(_0x1169d9,_0x57677c,_0x5b61e9,_0x4a895a)=>{const _0x4bd40c=_0x165011;for(var _0x17eb8c=_0x4a895a>0x1?void 0x0:_0x4a895a?oe(_0x57677c,_0x5b61e9):_0x57677c,_0x55d659=_0x1169d9[_0x4bd40c(0x13b)]-0x1,_0x11f447;_0x55d659>=0x0;_0x55d659--)(_0x11f447=_0x1169d9[_0x55d659])&&(_0x17eb8c=(_0x4a895a?_0x11f447(_0x57677c,_0x5b61e9,_0x17eb8c):_0x11f447(_0x17eb8c))||_0x17eb8c);return _0x4a895a&&_0x17eb8c&&se(_0x57677c,_0x5b61e9,_0x17eb8c),_0x17eb8c;},ie=(_0x170c94,_0x21c74a)=>(_0x51607d,_0x1f302f)=>_0x21c74a(_0x51607d,_0x1f302f,_0x170c94);let C=class{constructor(_0x5dfb51){const _0x22755=_0x165011;this[_0x22755(0x143)]=_0x5dfb51;}async[_0x165011(0x162)](_0x38e556,_0x593f15,_0x19e529){const _0x1f25a7=_0x165011,_0x22f215=new URL(window[_0x1f25a7(0x136)][_0x1f25a7(0x144)])[_0x1f25a7(0x18e)][_0x1f25a7(0x145)]('unit');if(!_0x22f215)return[];const _0x3f9749=window[_0x1f25a7(0x136)]['host'],_0x40862f=window[_0x1f25a7(0x136)]['protocol']===_0x1f25a7(0x15e)?'https':_0x1f25a7(0x17e);return(await this[_0x1f25a7(0x143)][_0x1f25a7(0x145)](_0x40862f+_0x1f25a7(0x16d)+_0x3f9749+_0x1f25a7(0x166),{'params':{'objectID':_0x22f215,'unitID':_0x22f215}}))['body'][_0x1f25a7(0x12d)]['map'](_0x254ba0=>{const _0x366ac8=_0x1f25a7;var _0x53a6e4,_0x51b9c5,_0x484675,_0xbedf85,_0x41580e,_0x4eed3f;return{'id':(_0x51b9c5=(_0x53a6e4=_0x254ba0[_0x366ac8(0x16e)])==null?void 0x0:_0x53a6e4[_0x366ac8(0x128)])!=null?_0x51b9c5:'','label':(_0xbedf85=(_0x484675=_0x254ba0[_0x366ac8(0x16e)])==null?void 0x0:_0x484675[_0x366ac8(0x130)])!=null?_0xbedf85:'','icon':(_0x4eed3f=(_0x41580e=_0x254ba0[_0x366ac8(0x16e)])==null?void 0x0:_0x41580e['avatar'])!=null?_0x4eed3f:'','type':_0x366ac8(0x194)};});}};C=ne([ie(0x0,_0x3392f0(_0x2e58e9))],C);var ae=Object[_0x165011(0x16c)],ce=Object[_0x165011(0x186)],de=(_0x3812e7,_0x263ea8,_0x35df1d,_0x1e9639)=>{const _0x1ead0d=_0x165011;for(var _0x241d61=_0x1e9639>0x1?void 0x0:_0x1e9639?ce(_0x263ea8,_0x35df1d):_0x263ea8,_0xb9a01d=_0x3812e7[_0x1ead0d(0x13b)]-0x1,_0x54e770;_0xb9a01d>=0x0;_0xb9a01d--)(_0x54e770=_0x3812e7[_0xb9a01d])&&(_0x241d61=(_0x1e9639?_0x54e770(_0x263ea8,_0x35df1d,_0x241d61):_0x54e770(_0x241d61))||_0x241d61);return _0x1e9639&&_0x241d61&&ae(_0x263ea8,_0x35df1d,_0x241d61),_0x241d61;},I=(_0x586995,_0x355cbe)=>(_0x38a21f,_0x59ba78)=>_0x355cbe(_0x38a21f,_0x59ba78,_0x586995);let f=class extends _0x42ad2c{constructor(_0x446d3c,_0x3673e1,_0xcaf6e2,_0x5e062b){const _0x77187=_0x165011;super(),this[_0x77187(0x179)]=_0x446d3c,this[_0x77187(0x172)]=_0x3673e1,this[_0x77187(0x188)]=_0xcaf6e2,this[_0x77187(0x146)]=_0x5e062b,this['_initDataSource']();}[_0x165011(0x129)](){const _0x3da254=_0x165011;this[_0x3da254(0x179)]['dataSource']=this['_threadCommentDataSource'],this[_0x3da254(0x179)][_0x3da254(0x169)]=!0x1,this[_0x3da254(0x188)][_0x3da254(0x199)]=this[_0x3da254(0x146)];}};f=de([_0x21be5d(_0x3c42b9['Starting'],f),I(0x0,_0x36dd23),I(0x1,_0x3392f0(D)),I(0x2,_0x3e08cd),I(0x3,_0x3392f0(C))],f);var me=Object[_0x165011(0x16c)],le=Object[_0x165011(0x186)],he=(_0x2a935e,_0x3aa4b5,_0x392d1c,_0x5450f6)=>{const _0xe4d29=_0x165011;for(var _0x341d47=_0x5450f6>0x1?void 0x0:_0x5450f6?le(_0x3aa4b5,_0x392d1c):_0x3aa4b5,_0x14e001=_0x2a935e[_0xe4d29(0x13b)]-0x1,_0x1e5c0b;_0x14e001>=0x0;_0x14e001--)(_0x1e5c0b=_0x2a935e[_0x14e001])&&(_0x341d47=(_0x5450f6?_0x1e5c0b(_0x3aa4b5,_0x392d1c,_0x341d47):_0x1e5c0b(_0x341d47))||_0x341d47);return _0x5450f6&&_0x341d47&&me(_0x3aa4b5,_0x392d1c,_0x341d47),_0x341d47;},S=(_0x2d94d4,_0x2b9290)=>(_0x4d97d7,_0x51708c)=>_0x2b9290(_0x4d97d7,_0x51708c,_0x2d94d4);let b=class extends _0x42ad2c{constructor(_0x44a597,_0x5ec049,_0xdd4ead,_0x527cae){const _0x3fadd1=_0x165011;super(),this['_commentService']=_0x44a597,this[_0x3fadd1(0x16f)]=_0x5ec049,this[_0x3fadd1(0x152)]=_0xdd4ead,this[_0x3fadd1(0x192)]=_0x527cae,this[_0x3fadd1(0x132)](),this['_initUserSync']();}[_0x165011(0x12a)](){const _0x35cc76=_0x165011;this['disposeWithMe'](this[_0x35cc76(0x16f)][_0x35cc76(0x15b)][_0x35cc76(0x191)](_0x56ea80(0x10))[_0x35cc76(0x16a)](_0x3bed97=>{const _0x13057c=_0x35cc76,_0x47330e=new Set();_0x3bed97[_0x13057c(0x154)](_0x22857d=>{const _0x2f519e=_0x13057c;switch(_0x22857d[_0x2f519e(0x18d)]){case _0x2f519e(0x13d):{const _0x4736ea=_0x22857d[_0x2f519e(0x15a)][_0x2f519e(0x173)];_0x47330e[_0x2f519e(0x13d)](_0x4736ea);break;}}}),Q(this[_0x13057c(0x192)],_0x47330e);}));}[_0x165011(0x132)](){const _0x141bbb=_0x165011;this[_0x141bbb(0x176)](this[_0x141bbb(0x161)][_0x141bbb(0x15b)][_0x141bbb(0x16a)](async _0xdae8f5=>{const _0x7bec38=_0x141bbb;var _0x4be3e6,_0x58ed28;const _0x5a1d18=this[_0x7bec38(0x16f)][_0x7bec38(0x158)](_0xdae8f5[_0x7bec38(0x177)],_0xdae8f5[_0x7bec38(0x138)]);if(!_0x5a1d18)return;const {unitId:_0x47f562,subUnitId:_0x1ece02}=_0x5a1d18;switch(_0xdae8f5[_0x7bec38(0x194)]&&this[_0x7bec38(0x152)][_0x7bec38(0x14c)](_0xdae8f5[_0x7bec38(0x194)]),_0xdae8f5['type']){case p[_0x7bec38(0x13f)]:break;case p[_0x7bec38(0x14a)]:{this[_0x7bec38(0x16f)]['addComment'](_0x47f562,_0x1ece02,{'unitId':_0x47f562,'subUnitId':_0x1ece02,'ref':'','id':_0xdae8f5['replyId'],'dT':w(+_0xdae8f5[_0x7bec38(0x19c)]),'threadId':_0xdae8f5[_0x7bec38(0x138)],'personId':(_0x58ed28=(_0x4be3e6=_0xdae8f5[_0x7bec38(0x194)])==null?void 0x0:_0x4be3e6[_0x7bec38(0x128)])!=null?_0x58ed28:_0xdae8f5[_0x7bec38(0x189)],'text':JSON[_0x7bec38(0x141)](_0xdae8f5[_0x7bec38(0x14d)]),'parentId':_0x5a1d18['id']});break;}case p[_0x7bec38(0x155)]:{const _0x33fd61=this[_0x7bec38(0x16f)][_0x7bec38(0x16b)](_0x47f562,_0x1ece02,_0xdae8f5[_0x7bec38(0x19a)]);_0x33fd61&&_0x33fd61[_0x7bec38(0x153)]&&this[_0x7bec38(0x16f)][_0x7bec38(0x135)](_0x47f562,_0x1ece02,_0xdae8f5['replyId']);break;}case p[_0x7bec38(0x12e)]:{this['_threadCommentModel'][_0x7bec38(0x159)](_0x47f562,_0x1ece02,{'commentId':_0xdae8f5[_0x7bec38(0x19a)],'text':JSON[_0x7bec38(0x141)](_0xdae8f5[_0x7bec38(0x14d)])});break;}case p[_0x7bec38(0x17a)]:{const _0x3abb68=this[_0x7bec38(0x16f)][_0x7bec38(0x158)](_0x47f562,_0xdae8f5[_0x7bec38(0x138)]);_0x3abb68&&this[_0x7bec38(0x16f)][_0x7bec38(0x149)](_0x47f562,_0x1ece02,_0x3abb68['id'],_0xdae8f5[_0x7bec38(0x160)]===v[_0x7bec38(0x181)]);break;}}}));}};b=he([_0x21be5d(_0x3c42b9[_0x165011(0x133)],b),S(0x0,_0x3392f0(_0x3a6c82)),S(0x1,_0x3392f0(_0x545191)),S(0x2,_0x3392f0(_0x2b64d3)),S(0x3,_0x3392f0(_0x46f1f0))],b);var x=Object['defineProperty'],ue=Object['getOwnPropertyDescriptor'],pe=(_0x24556c,_0x30584a,_0x10d54b)=>_0x30584a in _0x24556c?x(_0x24556c,_0x30584a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x10d54b}):_0x24556c[_0x30584a]=_0x10d54b,ve=(_0x3979c1,_0xb03c93,_0x4c0d11,_0x7f68fa)=>{const _0x3b5f28=_0x165011;for(var _0x33bde6=_0x7f68fa>0x1?void 0x0:_0x7f68fa?ue(_0xb03c93,_0x4c0d11):_0xb03c93,_0x5eebf4=_0x3979c1[_0x3b5f28(0x13b)]-0x1,_0x417436;_0x5eebf4>=0x0;_0x5eebf4--)(_0x417436=_0x3979c1[_0x5eebf4])&&(_0x33bde6=(_0x7f68fa?_0x417436(_0xb03c93,_0x4c0d11,_0x33bde6):_0x417436(_0x33bde6))||_0x33bde6);return _0x7f68fa&&_0x33bde6&&x(_0xb03c93,_0x4c0d11,_0x33bde6),_0x33bde6;},_e=(_0x5b4698,_0x149af5)=>(_0x34f606,_0x3bdb2b)=>_0x149af5(_0x34f606,_0x3bdb2b,_0x5b4698),Y=(_0x23fd93,_0xf963f1,_0x14070b)=>pe(_0x23fd93,typeof _0xf963f1!=_0x165011(0x185)?_0xf963f1+'':_0xf963f1,_0x14070b);let O=class extends _0x1a184e{constructor(_0x261629,_0x27d263){const _0x5520f7=_0x165011;super(),this[_0x5520f7(0x192)]=_0x27d263;}[_0x165011(0x171)](_0x3e30cb){const _0x1988be=_0x165011;[[C],[D],[f],[b]][_0x1988be(0x154)](_0x117ba1=>{const _0x3a9750=_0x1988be;_0x3e30cb[_0x3a9750(0x13d)](_0x117ba1);});}};Y(O,_0x165011(0x167),V),Y(O,_0x165011(0x18d),_0x130f22['UNIVER_UNKNOWN']),O=ve([_0x41379d(_0x51ae2c,_0x264eb6,_0x5d1bba),_e(0x1,_0x3392f0(_0x46f1f0))],O);function _0x5aed(){const _0x21aa4f=['Reply','users','addUser','content','getCurrentUser','comments','body','/solved','_userService','parentId','forEach','Delete','saveCommentToSnapshot','9670240RdFflQ','getThread','updateComment','payload','commentUpdate$','filter','/delete','https:','/universer-api/comment/unit/','solved','_commentService','getMentions','359100KXRwQY','2679216EmphxO','/add','/universer-api/authz/collaborator','pluginName','values','syncUpdateMutationToColla','subscribe','getComment','defineProperty','://','subject','_threadCommentModel','code','onStarting','_threadCommentDataSource','personId','requireSession','ref','disposeWithMe','unitId','13247300DuzUOR','_threadCommentDataSourceService','Solve','map','error','listComments','http','COMMENT','OpenOrReOpen','Solved','7AQtIGZ','/edit','/list','symbol','getOwnPropertyDescriptor','rangeId','_threadCommentMentionDataService','userId','rangeType','Unknown','delete','type','searchParams','_sessionService','getUser','pipe','_injector','5tqLJTI','user','reply','slice','YYYY/MM/DD\x20HH:mm','size','dataSource','replyId','stringify','createTimestamp','/reply','userID','_initDataSource','_initUserSync','format','33412OndtYA','collaborators','Edit','UNRECOGNIZED','name','getMemberID','_init','Ready','replies','deleteComment','location','791604BnoXzQ','threadId','post','6296118lYUiGL','length','customRanges','add','comment','Add','resolved','parse','47DAoHnC','_httpService','href','get','_threadCommentMentionDataSource','THREAD_COMMENT_DATA_SOURCE_PLUGIN','addComment','resolveComment'];_0x5aed=function(){return _0x21aa4f;};return _0x5aed();}export{O as UniverThreadCommentDataSourcePlugin};
1
+ const _0x143511=_0x322a;(function(_0x5efbee,_0xac3be2){const _0x1fa382=_0x322a,_0x34691d=_0x5efbee();while(!![]){try{const _0x4c37ee=parseInt(_0x1fa382(0xc6))/0x1*(-parseInt(_0x1fa382(0x97))/0x2)+-parseInt(_0x1fa382(0xcb))/0x3+parseInt(_0x1fa382(0xee))/0x4*(-parseInt(_0x1fa382(0xa9))/0x5)+-parseInt(_0x1fa382(0xf3))/0x6+-parseInt(_0x1fa382(0xba))/0x7+-parseInt(_0x1fa382(0xe3))/0x8*(parseInt(_0x1fa382(0x8e))/0x9)+-parseInt(_0x1fa382(0x8d))/0xa*(-parseInt(_0x1fa382(0xf0))/0xb);if(_0x4c37ee===_0xac3be2)break;else _0x34691d['push'](_0x34691d['shift']());}catch(_0x38249b){_0x34691d['push'](_0x34691d['shift']());}}}(_0x312c,0xec21d));import{UserManagerService as _0x5df1d1,Inject as _0x3812c1,Injector as _0x5a9d8e,CustomRangeType as _0x385822,OnLifecycle as _0x26df7f,LifecycleStages as _0x3fc83a,Disposable as _0x295544,UniverInstanceType as _0x4e03ab,DependentOn as _0x547640,Plugin as _0x33087c}from'@univerjs/core';import{IThreadCommentDataSourceService as _0x23f907,ThreadCommentModel as _0x58f947,UniverThreadCommentPlugin as _0x298c54}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0x1a4824,UniverThreadCommentUIPlugin as _0xe12c45}from'@univerjs/thread-comment-ui';import{CollaborationSessionService as _0xee5160,CommentService as _0x3ae437,UniverCollaborationClientPlugin as _0xea4fb8}from'@univerjs-pro/collaboration-client';import{HTTPService as _0x433638}from'@univerjs/network';import _0x24772b from'dayjs';function _0x322a(_0x18dc60,_0x49a468){const _0x312c1e=_0x312c();return _0x322a=function(_0x322aad,_0x873079){_0x322aad=_0x322aad-0x84;let _0x5aaa74=_0x312c1e[_0x322aad];return _0x5aaa74;},_0x322a(_0x18dc60,_0x49a468);}import{bufferTime as _0x3db047}from'rxjs';const V='THREAD_COMMENT_DATA_SOURCE_PLUGIN';var v=(_0x5d7dd3=>(_0x5d7dd3[_0x5d7dd3[_0x143511(0x91)]=0x0]=_0x143511(0x91),_0x5d7dd3[_0x5d7dd3['Solved']=0x1]=_0x143511(0xb6),_0x5d7dd3[_0x5d7dd3[_0x143511(0x93)]=-0x1]=_0x143511(0x93),_0x5d7dd3))(v||{}),p=(_0xd4625d=>(_0xd4625d[_0xd4625d['Unknown']=0x0]=_0x143511(0x9f),_0xd4625d[_0xd4625d[_0x143511(0xcf)]=0x1]=_0x143511(0xcf),_0xd4625d[_0xd4625d[_0x143511(0xa5)]=0x2]=_0x143511(0xa5),_0xd4625d[_0xd4625d['Edit']=0x3]=_0x143511(0xc4),_0xd4625d[_0xd4625d[_0x143511(0x85)]=0x4]=_0x143511(0x85),_0xd4625d[_0xd4625d[_0x143511(0xe8)]=0x5]=_0x143511(0xe8),_0xd4625d[_0xd4625d[_0x143511(0x93)]=-0x1]=_0x143511(0x93),_0xd4625d))(p||{});const w=_0x78c020=>_0x24772b(new Date(+_0x78c020))[_0x143511(0xca)](_0x143511(0xe1)),Q=async(_0x259563,_0x4c1083)=>{const _0x8c1aa0=_0x143511,_0x26ed3b=_0x259563[_0x8c1aa0(0xbe)](_0x5df1d1),_0x2aeb45=_0x259563[_0x8c1aa0(0xbe)](_0x433638);_0x4c1083[_0x8c1aa0(0xbc)](_0x17ffb7=>{const _0x1ec272=_0x8c1aa0;_0x26ed3b[_0x1ec272(0xd4)](_0x17ffb7)&&_0x4c1083[_0x1ec272(0xdd)](_0x17ffb7);}),_0x4c1083[_0x8c1aa0(0x8f)]&&(await _0x2aeb45[_0x8c1aa0(0xbe)](_0x8c1aa0(0xa2),{'params':{'userIDs':[..._0x4c1083]}}))[_0x8c1aa0(0xa0)]['users'][_0x8c1aa0(0xbc)](_0x3b60ba=>{const _0x228292=_0x8c1aa0;_0x3b60ba&&_0x26ed3b[_0x228292(0x98)](_0x3b60ba);});};var X=Object[_0x143511(0xa3)],k=Object[_0x143511(0xc9)],ee=(_0x45f155,_0xddd270,_0x2c037d,_0x2e84f6)=>{for(var _0x151e4d=_0x2e84f6>0x1?void 0x0:_0x2e84f6?k(_0xddd270,_0x2c037d):_0xddd270,_0x5f5cd5=_0x45f155['length']-0x1,_0x4cd2d8;_0x5f5cd5>=0x0;_0x5f5cd5--)(_0x4cd2d8=_0x45f155[_0x5f5cd5])&&(_0x151e4d=(_0x2e84f6?_0x4cd2d8(_0xddd270,_0x2c037d,_0x151e4d):_0x4cd2d8(_0x151e4d))||_0x151e4d);return _0x2e84f6&&_0x151e4d&&X(_0xddd270,_0x2c037d,_0x151e4d),_0x151e4d;},_=(_0x642b57,_0x5f3e20)=>(_0x389926,_0x352b81)=>_0x5f3e20(_0x389926,_0x352b81,_0x642b57);function re(_0x4a0b42,_0x59bbcf){const _0x1a3f6c=_0x143511,_0x2042c4=_0x4a0b42[_0x1a3f6c(0x88)][0x0];return{..._0x59bbcf,'id':_0x2042c4[_0x1a3f6c(0x86)],'resolved':_0x4a0b42[_0x1a3f6c(0xe7)]===0x1,'dT':w(_0x2042c4['createTimestamp']),'personId':_0x2042c4[_0x1a3f6c(0xa4)],'threadId':_0x2042c4[_0x1a3f6c(0xef)]};}function te(_0x12de68,_0x4354c,_0x222db2){const _0x484322=_0x143511;var _0x44afe6,_0x2ab616;if(((_0x2ab616=(_0x44afe6=_0x12de68==null?void 0x0:_0x12de68[_0x484322(0x88)])==null?void 0x0:_0x44afe6['length'])!=null?_0x2ab616:0x0)>0x0){const _0x4effe8=(_0x5b44c7,_0x331c5b)=>({'id':_0x5b44c7[_0x484322(0x86)],'threadId':_0x5b44c7['threadId'],'dT':w(_0x5b44c7['createTimestamp']),'personId':_0x5b44c7[_0x484322(0xa4)],'resolved':_0x12de68[_0x484322(0xe7)]===v[_0x484322(0xb6)],'unitId':_0x4354c,'subUnitId':_0x222db2,'text':JSON[_0x484322(0xa8)](_0x5b44c7['content']),'parentId':_0x331c5b}),_0x2ab751=_0x4effe8(_0x12de68[_0x484322(0x88)][0x0]);return{..._0x2ab751,'children':_0x12de68[_0x484322(0x88)][_0x484322(0xd8)](0x1)[_0x484322(0x9c)](_0x4b707a=>_0x4effe8(_0x4b707a,_0x2ab751['id']))};}return null;}let D=class{constructor(_0x3108e4,_0x5eb5e0,_0x5a0b8b,_0x426a87){const _0x462731=_0x143511;this[_0x462731(0xf1)]=_0x3108e4,this[_0x462731(0xcc)]=_0x5eb5e0,this['_sessionService']=_0x5a0b8b,this[_0x462731(0xeb)]=_0x426a87;}async[_0x143511(0xa1)](_0x29741e){const _0x76a63=_0x143511;var _0x7dc0c,_0x43cf69;const {parentId:_0x58af8a,unitId:_0x3c20c7,text:_0x500525,threadId:_0x26dd0e}=_0x29741e,_0x433ee7=(_0x43cf69=(_0x7dc0c=_0x500525['customRanges'])==null?void 0x0:_0x7dc0c[_0x76a63(0x8a)](_0x8b1ef9=>_0x8b1ef9[_0x76a63(0xe2)]===_0x385822['COMMENT'])[_0x76a63(0x9c)](_0x39585d=>_0x39585d[_0x76a63(0x92)]))!=null?_0x43cf69:[],_0x4841d3=JSON['stringify'](_0x500525),_0x51b6a2=(await this['_sessionService'][_0x76a63(0xb4)](_0x3c20c7))[_0x76a63(0xe5)]();if(_0x58af8a){const _0xf3c8fb={'memberId':_0x51b6a2,'unitId':_0x3c20c7,'content':_0x4841d3,'mention':_0x433ee7,'threadId':_0x26dd0e},_0x3675b6=(await this['_httpService'][_0x76a63(0xd6)](_0x76a63(0x9e)+_0x3c20c7+_0x76a63(0x89),{'body':_0xf3c8fb}))[_0x76a63(0xa0)][_0x76a63(0xc7)];return{..._0x29741e,'id':_0x3675b6['replyId'],'dT':_0x24772b(+_0x3675b6[_0x76a63(0xf2)])[_0x76a63(0xca)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3675b6['userId']};}else{const _0x41eb97={'memberId':_0x51b6a2,'unitId':_0x3c20c7,'content':_0x4841d3,'mention':_0x433ee7},_0x559765=await this[_0x76a63(0xf1)]['post'](_0x76a63(0x9e)+_0x3c20c7+_0x76a63(0xac),{'body':_0x41eb97});return re(_0x559765['body'][_0x76a63(0xf5)],_0x29741e);}}async[_0x143511(0xd9)](_0x32c49a){const _0x2d2fe1=_0x143511;var _0x2a8422,_0x12d3ea;const {text:_0x318ced,unitId:_0x5393cb}=_0x32c49a,_0x58ec3e=(_0x12d3ea=(_0x2a8422=_0x318ced[_0x2d2fe1(0xd5)])==null?void 0x0:_0x2a8422[_0x2d2fe1(0x8a)](_0x4fa10e=>_0x4fa10e['rangeType']===_0x385822[_0x2d2fe1(0xb7)])[_0x2d2fe1(0x9c)](_0x43993c=>_0x43993c[_0x2d2fe1(0x92)]))!=null?_0x12d3ea:[],_0x1e3781=JSON['stringify'](_0x318ced),_0x46b300=_0x32c49a['threadId'],_0x43994a=_0x32c49a['id'],_0x276a18={'memberId':(await this['_sessionService'][_0x2d2fe1(0xb4)](_0x5393cb))[_0x2d2fe1(0xe5)](),'unitId':_0x5393cb,'threadId':_0x46b300,'mention':_0x58ec3e,'content':_0x1e3781,'replyId':_0x43994a},_0x1a311a=await this[_0x2d2fe1(0xf1)][_0x2d2fe1(0xd6)]('/universer-api/comment/unit/'+_0x5393cb+_0x2d2fe1(0xcd),{'body':_0x276a18});return!_0x1a311a[_0x2d2fe1(0xa0)][_0x2d2fe1(0xe9)]||_0x1a311a[_0x2d2fe1(0xa0)]['error'][_0x2d2fe1(0xd3)]===0x1;}async[_0x143511(0xe0)](_0x18954e){const _0x2815d3=_0x143511,{unitId:_0x37ed62}=_0x18954e,_0x48dd86=_0x18954e['threadId'],_0x623d5d={'memberId':this[_0x2815d3(0xcc)][_0x2815d3(0xce)]()[_0x2815d3(0xad)],'unitId':_0x37ed62,'threadId':_0x48dd86,'solved':_0x18954e[_0x2815d3(0xc1)]?v[_0x2815d3(0xb6)]:v[_0x2815d3(0x91)]},_0x1ac204=await this[_0x2815d3(0xf1)][_0x2815d3(0xd6)](_0x2815d3(0x9e)+_0x37ed62+_0x2815d3(0xea),{'body':_0x623d5d});return!_0x1ac204[_0x2815d3(0xa0)][_0x2815d3(0xe9)]||_0x1ac204[_0x2815d3(0xa0)][_0x2815d3(0xe9)][_0x2815d3(0xd3)]===0x1;}async[_0x143511(0x99)](_0x5d7819,_0x1b54f1,_0x475e90,_0x4f8845){const _0x199a86=_0x143511,_0x2221da={'memberId':(await this[_0x199a86(0xb0)][_0x199a86(0xb4)](_0x5d7819))[_0x199a86(0xe5)](),'threadId':_0x475e90,'replyId':_0x4f8845,'unitId':_0x5d7819},_0x3b9199=await this[_0x199a86(0xf1)]['post'](_0x199a86(0x9e)+_0x5d7819+_0x199a86(0xbf),{'body':_0x2221da});return!_0x3b9199[_0x199a86(0xa0)][_0x199a86(0xe9)]||_0x3b9199['body'][_0x199a86(0xe9)]['code']===0x1;}async[_0x143511(0xbb)](_0x4931de,_0x510cfc,_0x1463c8){const _0x5d51e4=_0x143511,_0x25901f={'unitId':_0x4931de,'threadId':_0x1463c8},_0x52d0db=await this[_0x5d51e4(0xf1)][_0x5d51e4(0xd6)](_0x5d51e4(0x9e)+_0x4931de+_0x5d51e4(0xc5),{'body':_0x25901f}),_0x1cb69b=_0x1463c8[_0x5d51e4(0x9c)](_0x53a540=>te(_0x52d0db['body'][_0x5d51e4(0x8b)][_0x53a540],_0x4931de,_0x510cfc))[_0x5d51e4(0x8a)](Boolean);return Object[_0x5d51e4(0x84)](_0x52d0db[_0x5d51e4(0xa0)][_0x5d51e4(0xf4)])['forEach'](_0x41d9d0=>{const _0x57c600=_0x5d51e4;this[_0x57c600(0xcc)][_0x57c600(0x98)](_0x41d9d0);}),_0x1cb69b;}['saveCommentToSnapshot'](_0x538f7e){const _0x2a0150=_0x143511;return{'id':_0x538f7e['id'],'threadId':_0x538f7e[_0x2a0150(0xef)],'ref':_0x538f7e['ref']};}};D=ee([_(0x0,_0x3812c1(_0x433638)),_(0x1,_0x3812c1(_0x5df1d1)),_(0x2,_0x3812c1(_0xee5160)),_(0x3,_0x3812c1(_0x5a9d8e))],D);var se=Object[_0x143511(0xa3)],oe=Object[_0x143511(0xc9)],ne=(_0x58d4c7,_0x27b884,_0x1e527c,_0xb5d10a)=>{const _0x4d676b=_0x143511;for(var _0x5a5787=_0xb5d10a>0x1?void 0x0:_0xb5d10a?oe(_0x27b884,_0x1e527c):_0x27b884,_0xfac818=_0x58d4c7[_0x4d676b(0xdc)]-0x1,_0x145ece;_0xfac818>=0x0;_0xfac818--)(_0x145ece=_0x58d4c7[_0xfac818])&&(_0x5a5787=(_0xb5d10a?_0x145ece(_0x27b884,_0x1e527c,_0x5a5787):_0x145ece(_0x5a5787))||_0x5a5787);return _0xb5d10a&&_0x5a5787&&se(_0x27b884,_0x1e527c,_0x5a5787),_0x5a5787;},ie=(_0x3c2cfb,_0x2422c9)=>(_0x4cbdca,_0x590156)=>_0x2422c9(_0x4cbdca,_0x590156,_0x3c2cfb);let C=class{constructor(_0x55e89d){this['_httpService']=_0x55e89d;}async[_0x143511(0x90)](_0x2f0fe8,_0x104ad2,_0x10d33a){const _0x4670e7=_0x143511,_0x3bf87a=new URL(window[_0x4670e7(0xd1)]['href'])[_0x4670e7(0x96)][_0x4670e7(0xbe)](_0x4670e7(0xb2));if(!_0x3bf87a)return[];const _0x390b53=window[_0x4670e7(0xd1)][_0x4670e7(0xf6)],_0x37982c=window['location']['protocol']===_0x4670e7(0xda)?'https':'http';return(await this['_httpService'][_0x4670e7(0xbe)](_0x37982c+_0x4670e7(0xec)+_0x390b53+_0x4670e7(0x8c),{'params':{'objectID':_0x3bf87a,'unitID':_0x3bf87a}}))[_0x4670e7(0xa0)][_0x4670e7(0xe6)][_0x4670e7(0x9c)](_0x482ac4=>{const _0x240876=_0x4670e7;var _0x123461,_0x29e7c0,_0x213308,_0x3e9222,_0x92d2a0,_0x3c21e3;return{'id':(_0x29e7c0=(_0x123461=_0x482ac4['subject'])==null?void 0x0:_0x123461[_0x240876(0xad)])!=null?_0x29e7c0:'','label':(_0x3e9222=(_0x213308=_0x482ac4[_0x240876(0xc8)])==null?void 0x0:_0x213308[_0x240876(0xa7)])!=null?_0x3e9222:'','icon':(_0x3c21e3=(_0x92d2a0=_0x482ac4[_0x240876(0xc8)])==null?void 0x0:_0x92d2a0['avatar'])!=null?_0x3c21e3:'','type':'user'};});}};C=ne([ie(0x0,_0x3812c1(_0x433638))],C);var ae=Object[_0x143511(0xa3)],ce=Object[_0x143511(0xc9)],de=(_0x2e25f9,_0xa6830f,_0x223e96,_0xa00979)=>{const _0x359ee2=_0x143511;for(var _0x29f229=_0xa00979>0x1?void 0x0:_0xa00979?ce(_0xa6830f,_0x223e96):_0xa6830f,_0x22f186=_0x2e25f9[_0x359ee2(0xdc)]-0x1,_0x37cd74;_0x22f186>=0x0;_0x22f186--)(_0x37cd74=_0x2e25f9[_0x22f186])&&(_0x29f229=(_0xa00979?_0x37cd74(_0xa6830f,_0x223e96,_0x29f229):_0x37cd74(_0x29f229))||_0x29f229);return _0xa00979&&_0x29f229&&ae(_0xa6830f,_0x223e96,_0x29f229),_0x29f229;},I=(_0xbab565,_0xa35b9d)=>(_0x14cd84,_0x427abe)=>_0xa35b9d(_0x14cd84,_0x427abe,_0xbab565);let f=class extends _0x295544{constructor(_0x15ed56,_0x499564,_0x526d9f,_0x59567f){const _0x20736a=_0x143511;super(),this[_0x20736a(0x87)]=_0x15ed56,this[_0x20736a(0x94)]=_0x499564,this['_threadCommentMentionDataService']=_0x526d9f,this['_threadCommentMentionDataSource']=_0x59567f,this[_0x20736a(0x9a)]();}['_initDataSource'](){const _0xabade3=_0x143511;this[_0xabade3(0x87)][_0xabade3(0xaa)]=this[_0xabade3(0x94)],this[_0xabade3(0x87)][_0xabade3(0xa6)]=!0x1,this[_0xabade3(0xc2)]['dataSource']=this[_0xabade3(0xde)];}};function _0x312c(){const _0x2bd7ea=['66BAxGvM','_httpService','createTimestamp','3207366QKCgoV','users','comment','host','values','Delete','replyId','_threadCommentDataSourceService','replies','/reply','filter','comments','/universer-api/authz/collaborator','8323510ewenyx','117VVFdEA','size','getMentions','OpenOrReOpen','rangeId','UNRECOGNIZED','_threadCommentDataSource','content','searchParams','680402LYCheB','addUser','deleteComment','_initDataSource','commentUpdate$','map','Starting','/universer-api/comment/unit/','Unknown','body','addComment','/universer-api/user/list','defineProperty','userId','Reply','syncUpdateMutationToColla','name','parse','5ZTtcEV','dataSource','getThread','/add','userID','disposeWithMe','parentId','_sessionService','unitId','unit','type','requireSession','_initUserSync','Solved','COMMENT','onStarting','user','3863972rLCucR','listComments','forEach','add','get','/delete','UNIVER_UNKNOWN','resolved','_threadCommentMentionDataService','symbol','Edit','/list','2KvCejQ','reply','subject','getOwnPropertyDescriptor','format','494538JQPESO','_userService','/edit','getCurrentUser','Add','subscribe','location','_init','code','getUser','customRanges','post','payload','slice','updateComment','https:','getComment','length','delete','_threadCommentMentionDataSource','_threadCommentModel','resolveComment','YYYY/MM/DD\x20HH:mm','rangeType','867392eYBZAW','_commentService','getMemberID','collaborators','solved','Solve','error','/solved','_injector','://','pipe','2742368RpMRgA','threadId'];_0x312c=function(){return _0x2bd7ea;};return _0x312c();}f=de([_0x26df7f(_0x3fc83a[_0x143511(0x9d)],f),I(0x0,_0x23f907),I(0x1,_0x3812c1(D)),I(0x2,_0x1a4824),I(0x3,_0x3812c1(C))],f);var me=Object['defineProperty'],le=Object[_0x143511(0xc9)],he=(_0x4bbed7,_0x1a7ced,_0x4cd29d,_0x236891)=>{const _0x5bca4b=_0x143511;for(var _0x19b058=_0x236891>0x1?void 0x0:_0x236891?le(_0x1a7ced,_0x4cd29d):_0x1a7ced,_0x27ca6c=_0x4bbed7[_0x5bca4b(0xdc)]-0x1,_0x14a4c4;_0x27ca6c>=0x0;_0x27ca6c--)(_0x14a4c4=_0x4bbed7[_0x27ca6c])&&(_0x19b058=(_0x236891?_0x14a4c4(_0x1a7ced,_0x4cd29d,_0x19b058):_0x14a4c4(_0x19b058))||_0x19b058);return _0x236891&&_0x19b058&&me(_0x1a7ced,_0x4cd29d,_0x19b058),_0x19b058;},S=(_0x2f2cea,_0x2e7fb9)=>(_0x2d9fc2,_0x50a490)=>_0x2e7fb9(_0x2d9fc2,_0x50a490,_0x2f2cea);let b=class extends _0x295544{constructor(_0x3ef6d7,_0x4bc756,_0x491d02,_0x48fee7){const _0x46394f=_0x143511;super(),this[_0x46394f(0xe4)]=_0x3ef6d7,this[_0x46394f(0xdf)]=_0x4bc756,this[_0x46394f(0xcc)]=_0x491d02,this[_0x46394f(0xeb)]=_0x48fee7,this[_0x46394f(0xd2)](),this[_0x46394f(0xb5)]();}['_initUserSync'](){const _0x123849=_0x143511;this[_0x123849(0xae)](this['_threadCommentModel'][_0x123849(0x9b)][_0x123849(0xed)](_0x3db047(0x10))[_0x123849(0xd0)](_0x5b14c2=>{const _0x50bced=_0x123849,_0x123756=new Set();_0x5b14c2[_0x50bced(0xbc)](_0x1478f3=>{const _0x58a3fb=_0x50bced;switch(_0x1478f3[_0x58a3fb(0xb3)]){case _0x58a3fb(0xbd):{const _0xb3e8b2=_0x1478f3[_0x58a3fb(0xd7)]['personId'];_0x123756['add'](_0xb3e8b2);break;}}}),Q(this[_0x50bced(0xeb)],_0x123756);}));}[_0x143511(0xd2)](){const _0x1bd041=_0x143511;this[_0x1bd041(0xae)](this[_0x1bd041(0xe4)]['commentUpdate$'][_0x1bd041(0xd0)](async _0x2dc47b=>{const _0x488ef3=_0x1bd041;var _0x3c0eae,_0x47b93a;const _0x14d794=this[_0x488ef3(0xdf)][_0x488ef3(0xab)](_0x2dc47b[_0x488ef3(0xb1)],_0x2dc47b[_0x488ef3(0xef)]);if(!_0x14d794)return;const {unitId:_0xb61283,subUnitId:_0x3f7e24}=_0x14d794;switch(_0x2dc47b[_0x488ef3(0xb9)]&&this[_0x488ef3(0xcc)][_0x488ef3(0x98)](_0x2dc47b[_0x488ef3(0xb9)]),_0x2dc47b[_0x488ef3(0xb3)]){case p[_0x488ef3(0xcf)]:break;case p[_0x488ef3(0xa5)]:{this[_0x488ef3(0xdf)][_0x488ef3(0xa1)](_0xb61283,_0x3f7e24,{'unitId':_0xb61283,'subUnitId':_0x3f7e24,'ref':'','id':_0x2dc47b[_0x488ef3(0x86)],'dT':w(+_0x2dc47b['createTimestamp']),'threadId':_0x2dc47b[_0x488ef3(0xef)],'personId':(_0x47b93a=(_0x3c0eae=_0x2dc47b['user'])==null?void 0x0:_0x3c0eae[_0x488ef3(0xad)])!=null?_0x47b93a:_0x2dc47b['userId'],'text':JSON['parse'](_0x2dc47b[_0x488ef3(0x95)]),'parentId':_0x14d794['id']});break;}case p[_0x488ef3(0x85)]:{const _0x1c96eb=this[_0x488ef3(0xdf)][_0x488ef3(0xdb)](_0xb61283,_0x3f7e24,_0x2dc47b['replyId']);_0x1c96eb&&_0x1c96eb[_0x488ef3(0xaf)]&&this[_0x488ef3(0xdf)][_0x488ef3(0x99)](_0xb61283,_0x3f7e24,_0x2dc47b[_0x488ef3(0x86)]);break;}case p['Edit']:{this['_threadCommentModel']['updateComment'](_0xb61283,_0x3f7e24,{'commentId':_0x2dc47b[_0x488ef3(0x86)],'text':JSON[_0x488ef3(0xa8)](_0x2dc47b[_0x488ef3(0x95)])});break;}case p[_0x488ef3(0xe8)]:{const _0x229db5=this['_threadCommentModel'][_0x488ef3(0xab)](_0xb61283,_0x2dc47b[_0x488ef3(0xef)]);_0x229db5&&this['_threadCommentModel'][_0x488ef3(0xe0)](_0xb61283,_0x3f7e24,_0x229db5['id'],_0x2dc47b[_0x488ef3(0xe7)]===v[_0x488ef3(0xb6)]);break;}}}));}};b=he([_0x26df7f(_0x3fc83a['Ready'],b),S(0x0,_0x3812c1(_0x3ae437)),S(0x1,_0x3812c1(_0x58f947)),S(0x2,_0x3812c1(_0x5df1d1)),S(0x3,_0x3812c1(_0x5a9d8e))],b);var x=Object['defineProperty'],ue=Object[_0x143511(0xc9)],pe=(_0x5a2318,_0x1fd7e5,_0x1e2efc)=>_0x1fd7e5 in _0x5a2318?x(_0x5a2318,_0x1fd7e5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1e2efc}):_0x5a2318[_0x1fd7e5]=_0x1e2efc,ve=(_0x2df26a,_0x10581c,_0x5660d0,_0x49bb14)=>{const _0x17b7f1=_0x143511;for(var _0x51fbac=_0x49bb14>0x1?void 0x0:_0x49bb14?ue(_0x10581c,_0x5660d0):_0x10581c,_0xac086=_0x2df26a[_0x17b7f1(0xdc)]-0x1,_0xac9bc4;_0xac086>=0x0;_0xac086--)(_0xac9bc4=_0x2df26a[_0xac086])&&(_0x51fbac=(_0x49bb14?_0xac9bc4(_0x10581c,_0x5660d0,_0x51fbac):_0xac9bc4(_0x51fbac))||_0x51fbac);return _0x49bb14&&_0x51fbac&&x(_0x10581c,_0x5660d0,_0x51fbac),_0x51fbac;},_e=(_0x361bbf,_0x3b29ab)=>(_0x2828fd,_0x35a661)=>_0x3b29ab(_0x2828fd,_0x35a661,_0x361bbf),Y=(_0x3aad7e,_0x4bf138,_0x1a87b0)=>pe(_0x3aad7e,typeof _0x4bf138!=_0x143511(0xc3)?_0x4bf138+'':_0x4bf138,_0x1a87b0);let O=class extends _0x33087c{constructor(_0x2d4e93,_0x29ab83){const _0x599211=_0x143511;super(),this[_0x599211(0xeb)]=_0x29ab83;}[_0x143511(0xb8)](_0x24e6b4){const _0x246f4d=_0x143511;[[C],[D],[f],[b]][_0x246f4d(0xbc)](_0x4155e7=>{const _0x537578=_0x246f4d;_0x24e6b4[_0x537578(0xbd)](_0x4155e7);});}};Y(O,'pluginName',V),Y(O,_0x143511(0xb3),_0x4e03ab[_0x143511(0xc0)]),O=ve([_0x547640(_0x298c54,_0xe12c45,_0xea4fb8),_e(0x1,_0x3812c1(_0x5a9d8e))],O);export{O as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x790860,_0x3980dc){const _0xb16699=_0x4da0,_0x4b7b26=_0x790860();while(!![]){try{const _0x3cff4b=-parseInt(_0xb16699(0x15b))/0x1+parseInt(_0xb16699(0x188))/0x2+parseInt(_0xb16699(0x17d))/0x3+-parseInt(_0xb16699(0x185))/0x4+-parseInt(_0xb16699(0x16e))/0x5+parseInt(_0xb16699(0x1c0))/0x6+-parseInt(_0xb16699(0x180))/0x7*(-parseInt(_0xb16699(0x162))/0x8);if(_0x3cff4b===_0x3980dc)break;else _0x4b7b26['push'](_0x4b7b26['shift']());}catch(_0x55866c){_0x4b7b26['push'](_0x4b7b26['shift']());}}}(_0x2d28,0x27b8d),function(_0x175811,_0x5b5072){const _0x4381ac=_0x4da0;typeof exports==_0x4381ac(0x1ad)&&typeof module<'u'?_0x5b5072(exports,require(_0x4381ac(0x13e)),require(_0x4381ac(0x1a7)),require('@univerjs/thread-comment-ui'),require(_0x4381ac(0x135)),require('@univerjs/network'),require(_0x4381ac(0x145)),require('rxjs')):typeof define==_0x4381ac(0x1c2)&&define[_0x4381ac(0x1a0)]?define([_0x4381ac(0x179),_0x4381ac(0x13e),_0x4381ac(0x1a7),'@univerjs/thread-comment-ui',_0x4381ac(0x135),'@univerjs/network',_0x4381ac(0x145),_0x4381ac(0x152)],_0x5b5072):(_0x175811=typeof globalThis<'u'?globalThis:_0x175811||self,_0x5b5072(_0x175811[_0x4381ac(0x18b)]={},_0x175811['UniverCore'],_0x175811[_0x4381ac(0x174)],_0x175811[_0x4381ac(0x148)],_0x175811[_0x4381ac(0x169)],_0x175811[_0x4381ac(0x190)],_0x175811[_0x4381ac(0x145)],_0x175811['rxjs']));}(this,function(_0x121068,_0x26092f,_0x212135,_0x586c6e,_0x5c60ad,_0x3f8012,_0x1a5f43,_0x5c8ade){'use strict';const _0x1bd289=_0x4da0;const _0x454ed3='THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x41629e=(_0x3d81be=>(_0x3d81be[_0x3d81be[_0x1bd289(0x1bd)]=0x0]='OpenOrReOpen',_0x3d81be[_0x3d81be['Solved']=0x1]='Solved',_0x3d81be[_0x3d81be[_0x1bd289(0x19c)]=-0x1]=_0x1bd289(0x19c),_0x3d81be))(_0x41629e||{}),_0x1c9ef9=(_0x18d995=>(_0x18d995[_0x18d995[_0x1bd289(0x187)]=0x0]=_0x1bd289(0x187),_0x18d995[_0x18d995[_0x1bd289(0x165)]=0x1]=_0x1bd289(0x165),_0x18d995[_0x18d995[_0x1bd289(0x155)]=0x2]=_0x1bd289(0x155),_0x18d995[_0x18d995['Edit']=0x3]=_0x1bd289(0x150),_0x18d995[_0x18d995[_0x1bd289(0x1a6)]=0x4]=_0x1bd289(0x1a6),_0x18d995[_0x18d995[_0x1bd289(0x1b1)]=0x5]='Solve',_0x18d995[_0x18d995['UNRECOGNIZED']=-0x1]=_0x1bd289(0x19c),_0x18d995))(_0x1c9ef9||{});const _0x1f16a2=_0x3cd5e4=>_0x1a5f43(new Date(+_0x3cd5e4))[_0x1bd289(0x138)](_0x1bd289(0x196)),_0x55d069=async(_0x1c34b6,_0x333134)=>{const _0x42e6c7=_0x1bd289,_0x1d12eb=_0x1c34b6[_0x42e6c7(0x1b6)](_0x26092f[_0x42e6c7(0x16d)]),_0x2f5892=_0x1c34b6[_0x42e6c7(0x1b6)](_0x3f8012[_0x42e6c7(0x17b)]);_0x333134[_0x42e6c7(0x19b)](_0x3010c4=>{const _0x4e6aff=_0x42e6c7;_0x1d12eb[_0x4e6aff(0x183)](_0x3010c4)&&_0x333134['delete'](_0x3010c4);}),_0x333134[_0x42e6c7(0x141)]&&(await _0x2f5892[_0x42e6c7(0x1b6)](_0x42e6c7(0x144),{'params':{'userIDs':[..._0x333134]}}))[_0x42e6c7(0x16b)][_0x42e6c7(0x14b)][_0x42e6c7(0x19b)](_0x28a68f=>{_0x28a68f&&_0x1d12eb['addUser'](_0x28a68f);});};var _0x239db8=Object[_0x1bd289(0x171)],_0x3f9ae2=Object[_0x1bd289(0x184)],_0x5187c3=(_0x2389c7,_0xe79b80,_0x5290f3,_0x460d74)=>{const _0x930a14=_0x1bd289;for(var _0x1387fe=_0x460d74>0x1?void 0x0:_0x460d74?_0x3f9ae2(_0xe79b80,_0x5290f3):_0xe79b80,_0x32fc33=_0x2389c7[_0x930a14(0x1bc)]-0x1,_0x293b40;_0x32fc33>=0x0;_0x32fc33--)(_0x293b40=_0x2389c7[_0x32fc33])&&(_0x1387fe=(_0x460d74?_0x293b40(_0xe79b80,_0x5290f3,_0x1387fe):_0x293b40(_0x1387fe))||_0x1387fe);return _0x460d74&&_0x1387fe&&_0x239db8(_0xe79b80,_0x5290f3,_0x1387fe),_0x1387fe;},_0x2614b2=(_0x28e312,_0x1da432)=>(_0x244856,_0x81c46d)=>_0x1da432(_0x244856,_0x81c46d,_0x28e312);function _0x5e8e3a(_0x5831ce,_0x1f745f){const _0x2db60a=_0x1bd289,_0x4344f1=_0x5831ce[_0x2db60a(0x1ac)][0x0];return{..._0x1f745f,'id':_0x4344f1['replyId'],'resolved':_0x5831ce[_0x2db60a(0x19d)]===0x1,'dT':_0x1f16a2(_0x4344f1[_0x2db60a(0x1b3)]),'personId':_0x4344f1[_0x2db60a(0x164)],'threadId':_0x4344f1[_0x2db60a(0x182)]};}function _0x988dbc(_0x51116a,_0x400357,_0x5a0515){const _0x485e54=_0x1bd289;var _0x21fbfe,_0x3eb6cb;if(((_0x3eb6cb=(_0x21fbfe=_0x51116a==null?void 0x0:_0x51116a[_0x485e54(0x1ac)])==null?void 0x0:_0x21fbfe[_0x485e54(0x1bc)])!=null?_0x3eb6cb:0x0)>0x0){const _0x120709=(_0x2b5729,_0x4e566b)=>({'id':_0x2b5729[_0x485e54(0x18d)],'threadId':_0x2b5729[_0x485e54(0x182)],'dT':_0x1f16a2(_0x2b5729[_0x485e54(0x1b3)]),'personId':_0x2b5729[_0x485e54(0x164)],'resolved':_0x51116a[_0x485e54(0x19d)]===_0x41629e[_0x485e54(0x177)],'unitId':_0x400357,'subUnitId':_0x5a0515,'text':JSON['parse'](_0x2b5729[_0x485e54(0x13c)]),'parentId':_0x4e566b}),_0x1065c0=_0x120709(_0x51116a[_0x485e54(0x1ac)][0x0]);return{..._0x1065c0,'children':_0x51116a['replies'][_0x485e54(0x13d)](0x1)[_0x485e54(0x1b2)](_0x506cfe=>_0x120709(_0x506cfe,_0x1065c0['id']))};}return null;}let _0x59c806=class{constructor(_0x961f69,_0x5dac41,_0x505f62,_0x337d0c){const _0x25a1eb=_0x1bd289;this[_0x25a1eb(0x157)]=_0x961f69,this['_userService']=_0x5dac41,this[_0x25a1eb(0x176)]=_0x505f62,this['_injector']=_0x337d0c;}async[_0x1bd289(0x14a)](_0x5eae7d){const _0xb532f3=_0x1bd289;var _0x2b4851,_0x1e2e52;const {parentId:_0x11ee88,unitId:_0x3be9f8,text:_0x1ca4ea,threadId:_0x1b4980}=_0x5eae7d,_0x5ba08d=(_0x1e2e52=(_0x2b4851=_0x1ca4ea[_0xb532f3(0x134)])==null?void 0x0:_0x2b4851['filter'](_0x288abc=>_0x288abc[_0xb532f3(0x1a2)]===_0x26092f[_0xb532f3(0x149)][_0xb532f3(0x1c1)])['map'](_0xd478a7=>_0xd478a7[_0xb532f3(0x191)]))!=null?_0x1e2e52:[],_0x6cfee5=JSON[_0xb532f3(0x17a)](_0x1ca4ea),_0x891317=(await this[_0xb532f3(0x176)][_0xb532f3(0x1a5)](_0x3be9f8))[_0xb532f3(0x1a1)]();if(_0x11ee88){const _0x2e1336={'memberId':_0x891317,'unitId':_0x3be9f8,'content':_0x6cfee5,'mention':_0x5ba08d,'threadId':_0x1b4980},_0x11f45c=(await this[_0xb532f3(0x157)]['post']('/universer-api/comment/unit/'+_0x3be9f8+_0xb532f3(0x143),{'body':_0x2e1336}))[_0xb532f3(0x16b)][_0xb532f3(0x1bf)];return{..._0x5eae7d,'id':_0x11f45c[_0xb532f3(0x18d)],'dT':_0x1a5f43(+_0x11f45c[_0xb532f3(0x1b3)])['format'](_0xb532f3(0x196)),'personId':_0x11f45c[_0xb532f3(0x164)]};}else{const _0x1a6ff2={'memberId':_0x891317,'unitId':_0x3be9f8,'content':_0x6cfee5,'mention':_0x5ba08d},_0x360619=await this[_0xb532f3(0x157)][_0xb532f3(0x16f)]('/universer-api/comment/unit/'+_0x3be9f8+_0xb532f3(0x147),{'body':_0x1a6ff2});return _0x5e8e3a(_0x360619[_0xb532f3(0x16b)]['comment'],_0x5eae7d);}}async[_0x1bd289(0x14e)](_0x39e805){const _0x3f2ff0=_0x1bd289;var _0x7e3265,_0x2f4824;const {text:_0x11f39e,unitId:_0x58ac1b}=_0x39e805,_0x4a6cb8=(_0x2f4824=(_0x7e3265=_0x11f39e['customRanges'])==null?void 0x0:_0x7e3265[_0x3f2ff0(0x166)](_0xb480f5=>_0xb480f5[_0x3f2ff0(0x1a2)]===_0x26092f[_0x3f2ff0(0x149)][_0x3f2ff0(0x1c1)])[_0x3f2ff0(0x1b2)](_0x3b94c7=>_0x3b94c7[_0x3f2ff0(0x191)]))!=null?_0x2f4824:[],_0x452ce1=JSON['stringify'](_0x11f39e),_0x30aad5=_0x39e805[_0x3f2ff0(0x182)],_0x3b9406=_0x39e805['id'],_0x1a703b={'memberId':(await this[_0x3f2ff0(0x176)][_0x3f2ff0(0x1a5)](_0x58ac1b))['getMemberID'](),'unitId':_0x58ac1b,'threadId':_0x30aad5,'mention':_0x4a6cb8,'content':_0x452ce1,'replyId':_0x3b9406},_0x49ba4f=await this[_0x3f2ff0(0x157)][_0x3f2ff0(0x16f)](_0x3f2ff0(0x168)+_0x58ac1b+_0x3f2ff0(0x1ae),{'body':_0x1a703b});return!_0x49ba4f['body'][_0x3f2ff0(0x167)]||_0x49ba4f[_0x3f2ff0(0x16b)]['error'][_0x3f2ff0(0x15d)]===0x1;}async[_0x1bd289(0x14f)](_0x411217){const _0x103c64=_0x1bd289,{unitId:_0x3ccfe5}=_0x411217,_0x2824a0=_0x411217['threadId'],_0x2ef08f={'memberId':this['_userService'][_0x103c64(0x13f)]()['userID'],'unitId':_0x3ccfe5,'threadId':_0x2824a0,'solved':_0x411217['resolved']?_0x41629e[_0x103c64(0x177)]:_0x41629e[_0x103c64(0x1bd)]},_0x5b468b=await this[_0x103c64(0x157)][_0x103c64(0x16f)](_0x103c64(0x168)+_0x3ccfe5+'/solved',{'body':_0x2ef08f});return!_0x5b468b['body'][_0x103c64(0x167)]||_0x5b468b[_0x103c64(0x16b)][_0x103c64(0x167)][_0x103c64(0x15d)]===0x1;}async[_0x1bd289(0x15e)](_0x24ff63,_0x208f28,_0x40aaf9,_0x583311){const _0x4680be=_0x1bd289,_0x5ab8f6={'memberId':(await this[_0x4680be(0x176)][_0x4680be(0x1a5)](_0x24ff63))['getMemberID'](),'threadId':_0x40aaf9,'replyId':_0x583311,'unitId':_0x24ff63},_0x260aed=await this[_0x4680be(0x157)][_0x4680be(0x16f)](_0x4680be(0x168)+_0x24ff63+'/delete',{'body':_0x5ab8f6});return!_0x260aed[_0x4680be(0x16b)]['error']||_0x260aed[_0x4680be(0x16b)][_0x4680be(0x167)][_0x4680be(0x15d)]===0x1;}async[_0x1bd289(0x193)](_0x1ba40b,_0x222223,_0x5c2eda){const _0x358310=_0x1bd289,_0x4f5427={'unitId':_0x1ba40b,'threadId':_0x5c2eda},_0x4dab92=await this['_httpService'][_0x358310(0x16f)](_0x358310(0x168)+_0x1ba40b+'/list',{'body':_0x4f5427}),_0x4f2a67=_0x5c2eda[_0x358310(0x1b2)](_0x44eb45=>_0x988dbc(_0x4dab92[_0x358310(0x16b)][_0x358310(0x195)][_0x44eb45],_0x1ba40b,_0x222223))[_0x358310(0x166)](Boolean);return Object[_0x358310(0x1a4)](_0x4dab92[_0x358310(0x16b)][_0x358310(0x14b)])[_0x358310(0x19b)](_0x1b65b5=>{const _0x50f7f2=_0x358310;this[_0x50f7f2(0x142)][_0x50f7f2(0x1b5)](_0x1b65b5);}),_0x4f2a67;}[_0x1bd289(0x153)](_0x1a7167){const _0x2edfcf=_0x1bd289;return{'id':_0x1a7167['id'],'threadId':_0x1a7167[_0x2edfcf(0x182)],'ref':_0x1a7167[_0x2edfcf(0x15f)]};}};_0x59c806=_0x5187c3([_0x2614b2(0x0,_0x26092f[_0x1bd289(0x173)](_0x3f8012[_0x1bd289(0x17b)])),_0x2614b2(0x1,_0x26092f[_0x1bd289(0x173)](_0x26092f['UserManagerService'])),_0x2614b2(0x2,_0x26092f[_0x1bd289(0x173)](_0x5c60ad[_0x1bd289(0x14c)])),_0x2614b2(0x3,_0x26092f['Inject'](_0x26092f[_0x1bd289(0x18a)]))],_0x59c806);var _0x5ac5b8=Object['defineProperty'],_0x4743e4=Object['getOwnPropertyDescriptor'],_0x498a03=(_0x1a6d39,_0x11329e,_0x560443,_0x58a9d1)=>{for(var _0x3c8427=_0x58a9d1>0x1?void 0x0:_0x58a9d1?_0x4743e4(_0x11329e,_0x560443):_0x11329e,_0x55280f=_0x1a6d39['length']-0x1,_0x41e02c;_0x55280f>=0x0;_0x55280f--)(_0x41e02c=_0x1a6d39[_0x55280f])&&(_0x3c8427=(_0x58a9d1?_0x41e02c(_0x11329e,_0x560443,_0x3c8427):_0x41e02c(_0x3c8427))||_0x3c8427);return _0x58a9d1&&_0x3c8427&&_0x5ac5b8(_0x11329e,_0x560443,_0x3c8427),_0x3c8427;},_0x5c14af=(_0x1b7f01,_0x21f955)=>(_0x37acc7,_0x589938)=>_0x21f955(_0x37acc7,_0x589938,_0x1b7f01);let _0x1ad295=class{constructor(_0x2d4ae3){const _0xa12fe5=_0x1bd289;this[_0xa12fe5(0x157)]=_0x2d4ae3;}async[_0x1bd289(0x186)](_0x8743b0,_0x4d4269,_0x2824f9){const _0x3650f7=_0x1bd289,_0x5f4c2d=new URL(window['location'][_0x3650f7(0x1ba)])['searchParams']['get']('unit');if(!_0x5f4c2d)return[];const _0x5160c5=window[_0x3650f7(0x17c)][_0x3650f7(0x159)],_0x171c98=window[_0x3650f7(0x17c)][_0x3650f7(0x13a)]===_0x3650f7(0x1af)?_0x3650f7(0x172):'http';return(await this[_0x3650f7(0x157)]['get'](_0x171c98+_0x3650f7(0x160)+_0x5160c5+'/universer-api/authz/collaborator',{'params':{'objectID':_0x5f4c2d,'unitID':_0x5f4c2d}}))['body'][_0x3650f7(0x1b0)][_0x3650f7(0x1b2)](_0x372a14=>{const _0x175f1e=_0x3650f7;var _0x1db922,_0xfa572e,_0x134f3e,_0x4d330f,_0x31d1e6,_0x115112;return{'id':(_0xfa572e=(_0x1db922=_0x372a14[_0x175f1e(0x14d)])==null?void 0x0:_0x1db922[_0x175f1e(0x18c)])!=null?_0xfa572e:'','label':(_0x4d330f=(_0x134f3e=_0x372a14['subject'])==null?void 0x0:_0x134f3e[_0x175f1e(0x192)])!=null?_0x4d330f:'','icon':(_0x115112=(_0x31d1e6=_0x372a14[_0x175f1e(0x14d)])==null?void 0x0:_0x31d1e6[_0x175f1e(0x1bb)])!=null?_0x115112:'','type':'user'};});}};_0x1ad295=_0x498a03([_0x5c14af(0x0,_0x26092f[_0x1bd289(0x173)](_0x3f8012[_0x1bd289(0x17b)]))],_0x1ad295);var _0x27d60d=Object[_0x1bd289(0x171)],_0x371387=Object['getOwnPropertyDescriptor'],_0x37bbf2=(_0x2c1b81,_0x1c151c,_0x502207,_0x847bb9)=>{const _0x5a175a=_0x1bd289;for(var _0x439e29=_0x847bb9>0x1?void 0x0:_0x847bb9?_0x371387(_0x1c151c,_0x502207):_0x1c151c,_0x28344b=_0x2c1b81[_0x5a175a(0x1bc)]-0x1,_0x6f38b4;_0x28344b>=0x0;_0x28344b--)(_0x6f38b4=_0x2c1b81[_0x28344b])&&(_0x439e29=(_0x847bb9?_0x6f38b4(_0x1c151c,_0x502207,_0x439e29):_0x6f38b4(_0x439e29))||_0x439e29);return _0x847bb9&&_0x439e29&&_0x27d60d(_0x1c151c,_0x502207,_0x439e29),_0x439e29;},_0x581bbc=(_0x1065ae,_0x1a5c2b)=>(_0x26aca9,_0x34a1c2)=>_0x1a5c2b(_0x26aca9,_0x34a1c2,_0x1065ae);let _0x4a0f2a=class extends _0x26092f[_0x1bd289(0x151)]{constructor(_0x156a39,_0x33759d,_0x12a6c4,_0x55c8b8){const _0x242c90=_0x1bd289;super(),this[_0x242c90(0x1b9)]=_0x156a39,this[_0x242c90(0x1a9)]=_0x33759d,this[_0x242c90(0x16a)]=_0x12a6c4,this[_0x242c90(0x1b8)]=_0x55c8b8,this[_0x242c90(0x17e)]();}[_0x1bd289(0x17e)](){const _0x1438ce=_0x1bd289;this['_threadCommentDataSourceService'][_0x1438ce(0x136)]=this['_threadCommentDataSource'],this[_0x1438ce(0x1b9)]['syncUpdateMutationToColla']=!0x1,this[_0x1438ce(0x16a)][_0x1438ce(0x136)]=this['_threadCommentMentionDataSource'];}};_0x4a0f2a=_0x37bbf2([_0x26092f[_0x1bd289(0x158)](_0x26092f[_0x1bd289(0x19a)][_0x1bd289(0x139)],_0x4a0f2a),_0x581bbc(0x0,_0x212135['IThreadCommentDataSourceService']),_0x581bbc(0x1,_0x26092f[_0x1bd289(0x173)](_0x59c806)),_0x581bbc(0x2,_0x586c6e['IThreadCommentMentionDataService']),_0x581bbc(0x3,_0x26092f['Inject'](_0x1ad295))],_0x4a0f2a);var _0x2fc046=Object['defineProperty'],_0x2db506=Object['getOwnPropertyDescriptor'],_0x2809b3=(_0x9c7341,_0x21c186,_0x250320,_0x341bff)=>{const _0x46b8bd=_0x1bd289;for(var _0x5eb684=_0x341bff>0x1?void 0x0:_0x341bff?_0x2db506(_0x21c186,_0x250320):_0x21c186,_0x294ae2=_0x9c7341[_0x46b8bd(0x1bc)]-0x1,_0x4e84ed;_0x294ae2>=0x0;_0x294ae2--)(_0x4e84ed=_0x9c7341[_0x294ae2])&&(_0x5eb684=(_0x341bff?_0x4e84ed(_0x21c186,_0x250320,_0x5eb684):_0x4e84ed(_0x5eb684))||_0x5eb684);return _0x341bff&&_0x5eb684&&_0x2fc046(_0x21c186,_0x250320,_0x5eb684),_0x5eb684;},_0x6ba17a=(_0x1f3fe8,_0x217117)=>(_0x2990e7,_0x300f8a)=>_0x217117(_0x2990e7,_0x300f8a,_0x1f3fe8);let _0x51cbd3=class extends _0x26092f[_0x1bd289(0x151)]{constructor(_0x4ef0b7,_0x2a3caa,_0x2e0124,_0x1b0dec){const _0x3203e7=_0x1bd289;super(),this[_0x3203e7(0x163)]=_0x4ef0b7,this[_0x3203e7(0x197)]=_0x2a3caa,this[_0x3203e7(0x142)]=_0x2e0124,this[_0x3203e7(0x19f)]=_0x1b0dec,this[_0x3203e7(0x154)](),this[_0x3203e7(0x18e)]();}[_0x1bd289(0x18e)](){const _0x19bcd8=_0x1bd289;this['disposeWithMe'](this[_0x19bcd8(0x197)][_0x19bcd8(0x1aa)]['pipe'](_0x5c8ade[_0x19bcd8(0x18f)](0x10))[_0x19bcd8(0x140)](_0x5b98e9=>{const _0x68236e=_0x19bcd8,_0x4409ec=new Set();_0x5b98e9['forEach'](_0x354db8=>{const _0x56b09d=_0x4da0;switch(_0x354db8[_0x56b09d(0x161)]){case _0x56b09d(0x181):{const _0x2b51b1=_0x354db8[_0x56b09d(0x1be)][_0x56b09d(0x189)];_0x4409ec['add'](_0x2b51b1);break;}}}),_0x55d069(this[_0x68236e(0x19f)],_0x4409ec);}));}[_0x1bd289(0x154)](){const _0x2904d2=_0x1bd289;this[_0x2904d2(0x170)](this[_0x2904d2(0x163)][_0x2904d2(0x1aa)]['subscribe'](async _0x338047=>{const _0x374f52=_0x2904d2;var _0xc907c3,_0x24ef54;const _0x4ca030=this[_0x374f52(0x197)][_0x374f52(0x198)](_0x338047['unitId'],_0x338047['threadId']);if(!_0x4ca030)return;const {unitId:_0xcb688f,subUnitId:_0x4bdaf0}=_0x4ca030;switch(_0x338047['user']&&this[_0x374f52(0x142)][_0x374f52(0x1b5)](_0x338047[_0x374f52(0x178)]),_0x338047[_0x374f52(0x161)]){case _0x1c9ef9[_0x374f52(0x165)]:break;case _0x1c9ef9[_0x374f52(0x155)]:{this[_0x374f52(0x197)][_0x374f52(0x14a)](_0xcb688f,_0x4bdaf0,{'unitId':_0xcb688f,'subUnitId':_0x4bdaf0,'ref':'','id':_0x338047[_0x374f52(0x18d)],'dT':_0x1f16a2(+_0x338047[_0x374f52(0x1b3)]),'threadId':_0x338047[_0x374f52(0x182)],'personId':(_0x24ef54=(_0xc907c3=_0x338047['user'])==null?void 0x0:_0xc907c3[_0x374f52(0x18c)])!=null?_0x24ef54:_0x338047[_0x374f52(0x164)],'text':JSON[_0x374f52(0x1b7)](_0x338047['content']),'parentId':_0x4ca030['id']});break;}case _0x1c9ef9[_0x374f52(0x1a6)]:{const _0x3f78f5=this[_0x374f52(0x197)][_0x374f52(0x15a)](_0xcb688f,_0x4bdaf0,_0x338047[_0x374f52(0x18d)]);_0x3f78f5&&_0x3f78f5[_0x374f52(0x146)]&&this[_0x374f52(0x197)][_0x374f52(0x15e)](_0xcb688f,_0x4bdaf0,_0x338047[_0x374f52(0x18d)]);break;}case _0x1c9ef9[_0x374f52(0x150)]:{this[_0x374f52(0x197)][_0x374f52(0x14e)](_0xcb688f,_0x4bdaf0,{'commentId':_0x338047['replyId'],'text':JSON['parse'](_0x338047[_0x374f52(0x13c)])});break;}case _0x1c9ef9['Solve']:{const _0x2762bd=this[_0x374f52(0x197)]['getThread'](_0xcb688f,_0x338047[_0x374f52(0x182)]);_0x2762bd&&this[_0x374f52(0x197)]['resolveComment'](_0xcb688f,_0x4bdaf0,_0x2762bd['id'],_0x338047[_0x374f52(0x19d)]===_0x41629e[_0x374f52(0x177)]);break;}}}));}};_0x51cbd3=_0x2809b3([_0x26092f['OnLifecycle'](_0x26092f[_0x1bd289(0x19a)][_0x1bd289(0x156)],_0x51cbd3),_0x6ba17a(0x0,_0x26092f[_0x1bd289(0x173)](_0x5c60ad[_0x1bd289(0x1a8)])),_0x6ba17a(0x1,_0x26092f[_0x1bd289(0x173)](_0x212135[_0x1bd289(0x15c)])),_0x6ba17a(0x2,_0x26092f[_0x1bd289(0x173)](_0x26092f[_0x1bd289(0x16d)])),_0x6ba17a(0x3,_0x26092f[_0x1bd289(0x173)](_0x26092f[_0x1bd289(0x18a)]))],_0x51cbd3);var _0x4d3741=Object[_0x1bd289(0x171)],_0x56f623=Object[_0x1bd289(0x184)],_0x253b90=(_0x237166,_0x31969e,_0x595579)=>_0x31969e in _0x237166?_0x4d3741(_0x237166,_0x31969e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x595579}):_0x237166[_0x31969e]=_0x595579,_0x57427b=(_0x555029,_0x36a3c4,_0x534f52,_0x48d63c)=>{const _0x10b51d=_0x1bd289;for(var _0x3af420=_0x48d63c>0x1?void 0x0:_0x48d63c?_0x56f623(_0x36a3c4,_0x534f52):_0x36a3c4,_0x4ff56f=_0x555029[_0x10b51d(0x1bc)]-0x1,_0x23f96e;_0x4ff56f>=0x0;_0x4ff56f--)(_0x23f96e=_0x555029[_0x4ff56f])&&(_0x3af420=(_0x48d63c?_0x23f96e(_0x36a3c4,_0x534f52,_0x3af420):_0x23f96e(_0x3af420))||_0x3af420);return _0x48d63c&&_0x3af420&&_0x4d3741(_0x36a3c4,_0x534f52,_0x3af420),_0x3af420;},_0x1b4848=(_0x3f17b9,_0x48dba1)=>(_0x188d47,_0x55e6ef)=>_0x48dba1(_0x188d47,_0x55e6ef,_0x3f17b9),_0x42a123=(_0x4e3626,_0x5306e1,_0x3eb96d)=>_0x253b90(_0x4e3626,typeof _0x5306e1!=_0x1bd289(0x13b)?_0x5306e1+'':_0x5306e1,_0x3eb96d);_0x121068[_0x1bd289(0x17f)]=class extends _0x26092f[_0x1bd289(0x175)]{constructor(_0x4e2d6a,_0x5cd28a){const _0xfe8eef=_0x1bd289;super(),this[_0xfe8eef(0x19f)]=_0x5cd28a;}['onStarting'](_0xe74224){const _0x4b9361=_0x1bd289;[[_0x1ad295],[_0x59c806],[_0x4a0f2a],[_0x51cbd3]][_0x4b9361(0x19b)](_0x450f18=>{const _0x33dd31=_0x4b9361;_0xe74224[_0x33dd31(0x181)](_0x450f18);});}},_0x42a123(_0x121068[_0x1bd289(0x17f)],_0x1bd289(0x1ab),_0x454ed3),_0x42a123(_0x121068['UniverThreadCommentDataSourcePlugin'],_0x1bd289(0x161),_0x26092f[_0x1bd289(0x137)][_0x1bd289(0x16c)]),_0x121068[_0x1bd289(0x17f)]=_0x57427b([_0x26092f[_0x1bd289(0x194)](_0x212135[_0x1bd289(0x199)],_0x586c6e['UniverThreadCommentUIPlugin'],_0x5c60ad[_0x1bd289(0x1b4)]),_0x1b4848(0x1,_0x26092f['Inject'](_0x26092f['Injector']))],_0x121068[_0x1bd289(0x17f)]),Object[_0x1bd289(0x171)](_0x121068,Symbol[_0x1bd289(0x19e)],{'value':_0x1bd289(0x1a3)});}));function _0x4da0(_0x395ee3,_0x4eef8c){const _0x2d28c3=_0x2d28();return _0x4da0=function(_0x4da00e,_0x47d537){_0x4da00e=_0x4da00e-0x134;let _0x5e76e1=_0x2d28c3[_0x4da00e];return _0x5e76e1;},_0x4da0(_0x395ee3,_0x4eef8c);}function _0x2d28(){const _0x2d2a5d=['UserManagerService','1577745uqstln','post','disposeWithMe','defineProperty','https','Inject','UniverThreadComment','Plugin','_sessionService','Solved','user','exports','stringify','HTTPService','location','876708DIVUwz','_initDataSource','UniverThreadCommentDataSourcePlugin','655851BmfITZ','add','threadId','getUser','getOwnPropertyDescriptor','25820jCrZBP','getMentions','Unknown','532788tvHFxg','personId','Injector','UniverThreadCommentDatasource','userID','replyId','_initUserSync','bufferTime','UniverNetwork','rangeId','name','listComments','DependentOn','comments','YYYY/MM/DD\x20HH:mm','_threadCommentModel','getThread','UniverThreadCommentPlugin','LifecycleStages','forEach','UNRECOGNIZED','solved','toStringTag','_injector','amd','getMemberID','rangeType','Module','values','requireSession','Delete','@univerjs/thread-comment','CommentService','_threadCommentDataSource','commentUpdate$','pluginName','replies','object','/edit','https:','collaborators','Solve','map','createTimestamp','UniverCollaborationClientPlugin','addUser','get','parse','_threadCommentMentionDataSource','_threadCommentDataSourceService','href','avatar','length','OpenOrReOpen','payload','reply','372336lpWbde','COMMENT','function','customRanges','@univerjs-pro/collaboration-client','dataSource','UniverInstanceType','format','Starting','protocol','symbol','content','slice','@univerjs/core','getCurrentUser','subscribe','size','_userService','/reply','/universer-api/user/list','dayjs','parentId','/add','UniverThreadCommentUi','CustomRangeType','addComment','users','CollaborationSessionService','subject','updateComment','resolveComment','Edit','Disposable','rxjs','saveCommentToSnapshot','_init','Reply','Ready','_httpService','OnLifecycle','host','getComment','229674CyqHlY','ThreadCommentModel','code','deleteComment','ref','://','type','8QBDCsu','_commentService','userId','Add','filter','error','/universer-api/comment/unit/','UniverCollaborationClient','_threadCommentMentionDataService','body','UNIVER_UNKNOWN'];_0x2d28=function(){return _0x2d2a5d;};return _0x2d28();}
1
+ (function(_0x207433,_0x362791){const _0x1d6924=_0x5d84,_0x24613b=_0x207433();while(!![]){try{const _0x400351=parseInt(_0x1d6924(0x155))/0x1*(parseInt(_0x1d6924(0x11f))/0x2)+parseInt(_0x1d6924(0x141))/0x3*(parseInt(_0x1d6924(0x128))/0x4)+parseInt(_0x1d6924(0x104))/0x5*(parseInt(_0x1d6924(0x133))/0x6)+parseInt(_0x1d6924(0x170))/0x7+parseInt(_0x1d6924(0x12d))/0x8+parseInt(_0x1d6924(0x103))/0x9*(-parseInt(_0x1d6924(0x15d))/0xa)+-parseInt(_0x1d6924(0x151))/0xb*(parseInt(_0x1d6924(0x102))/0xc);if(_0x400351===_0x362791)break;else _0x24613b['push'](_0x24613b['shift']());}catch(_0xf3dd29){_0x24613b['push'](_0x24613b['shift']());}}}(_0x206b,0x8c082),function(_0x5a8c67,_0x1b45ac){const _0x24696b=_0x5d84;typeof exports==_0x24696b(0x14e)&&typeof module<'u'?_0x1b45ac(exports,require(_0x24696b(0x139)),require(_0x24696b(0x117)),require(_0x24696b(0x140)),require(_0x24696b(0xfd)),require('@univerjs/network'),require('dayjs'),require(_0x24696b(0x153))):typeof define==_0x24696b(0x13f)&&define[_0x24696b(0x13a)]?define([_0x24696b(0x119),_0x24696b(0x139),_0x24696b(0x117),_0x24696b(0x140),_0x24696b(0xfd),_0x24696b(0x109),_0x24696b(0x113),_0x24696b(0x153)],_0x1b45ac):(_0x5a8c67=typeof globalThis<'u'?globalThis:_0x5a8c67||self,_0x1b45ac(_0x5a8c67['UniverThreadCommentDatasource']={},_0x5a8c67[_0x24696b(0x101)],_0x5a8c67[_0x24696b(0x135)],_0x5a8c67[_0x24696b(0x146)],_0x5a8c67[_0x24696b(0x10f)],_0x5a8c67[_0x24696b(0x107)],_0x5a8c67[_0x24696b(0x113)],_0x5a8c67[_0x24696b(0x153)]));}(this,function(_0x48fcbb,_0x8a051d,_0xbb6af7,_0x2225b0,_0x54cc54,_0x2b815e,_0x5d66e2,_0x1ab0e1){'use strict';const _0x54f122=_0x5d84;const _0x3467b7=_0x54f122(0x15c);var _0x398213=(_0x20d3d4=>(_0x20d3d4[_0x20d3d4['OpenOrReOpen']=0x0]=_0x54f122(0x12c),_0x20d3d4[_0x20d3d4['Solved']=0x1]=_0x54f122(0x130),_0x20d3d4[_0x20d3d4[_0x54f122(0x142)]=-0x1]=_0x54f122(0x142),_0x20d3d4))(_0x398213||{}),_0x1b5e47=(_0x3a2963=>(_0x3a2963[_0x3a2963['Unknown']=0x0]=_0x54f122(0xf4),_0x3a2963[_0x3a2963[_0x54f122(0xf7)]=0x1]=_0x54f122(0xf7),_0x3a2963[_0x3a2963['Reply']=0x2]=_0x54f122(0x149),_0x3a2963[_0x3a2963[_0x54f122(0x17a)]=0x3]='Edit',_0x3a2963[_0x3a2963[_0x54f122(0x112)]=0x4]='Delete',_0x3a2963[_0x3a2963[_0x54f122(0x100)]=0x5]=_0x54f122(0x100),_0x3a2963[_0x3a2963[_0x54f122(0x142)]=-0x1]=_0x54f122(0x142),_0x3a2963))(_0x1b5e47||{});const _0x415b40=_0x724240=>_0x5d66e2(new Date(+_0x724240))[_0x54f122(0x12a)](_0x54f122(0x177)),_0x4d6f9b=async(_0x3b3cd8,_0x402eda)=>{const _0x4ab957=_0x54f122,_0x25b4e5=_0x3b3cd8[_0x4ab957(0xf3)](_0x8a051d[_0x4ab957(0xf9)]),_0x2e38a0=_0x3b3cd8[_0x4ab957(0xf3)](_0x2b815e[_0x4ab957(0x179)]);_0x402eda[_0x4ab957(0xeb)](_0x2256a9=>{const _0x275c3f=_0x4ab957;_0x25b4e5[_0x275c3f(0x116)](_0x2256a9)&&_0x402eda[_0x275c3f(0x148)](_0x2256a9);}),_0x402eda[_0x4ab957(0x10a)]&&(await _0x2e38a0[_0x4ab957(0xf3)](_0x4ab957(0xf8),{'params':{'userIDs':[..._0x402eda]}}))[_0x4ab957(0x150)]['users'][_0x4ab957(0xeb)](_0x59664b=>{const _0x1a28ab=_0x4ab957;_0x59664b&&_0x25b4e5[_0x1a28ab(0x15b)](_0x59664b);});};var _0x2634cd=Object['defineProperty'],_0xe374b8=Object[_0x54f122(0x136)],_0x203dba=(_0x1c2d53,_0x5ae0f8,_0x13a255,_0x127d94)=>{const _0x5c52bd=_0x54f122;for(var _0x54f9ba=_0x127d94>0x1?void 0x0:_0x127d94?_0xe374b8(_0x5ae0f8,_0x13a255):_0x5ae0f8,_0x3fa3cf=_0x1c2d53[_0x5c52bd(0x175)]-0x1,_0x41f3ed;_0x3fa3cf>=0x0;_0x3fa3cf--)(_0x41f3ed=_0x1c2d53[_0x3fa3cf])&&(_0x54f9ba=(_0x127d94?_0x41f3ed(_0x5ae0f8,_0x13a255,_0x54f9ba):_0x41f3ed(_0x54f9ba))||_0x54f9ba);return _0x127d94&&_0x54f9ba&&_0x2634cd(_0x5ae0f8,_0x13a255,_0x54f9ba),_0x54f9ba;},_0x1c1f41=(_0x14bdee,_0x4b2b61)=>(_0x3cd880,_0x2d18cd)=>_0x4b2b61(_0x3cd880,_0x2d18cd,_0x14bdee);function _0x3c6a54(_0x841a16,_0x280b99){const _0x156a44=_0x54f122,_0x5a0628=_0x841a16[_0x156a44(0x145)][0x0];return{..._0x280b99,'id':_0x5a0628['replyId'],'resolved':_0x841a16[_0x156a44(0x138)]===0x1,'dT':_0x415b40(_0x5a0628['createTimestamp']),'personId':_0x5a0628[_0x156a44(0x11e)],'threadId':_0x5a0628[_0x156a44(0x12e)]};}function _0x2033ae(_0x172323,_0x61ad3a,_0xd329d){const _0x461557=_0x54f122;var _0x204d84,_0x2e963b;if(((_0x2e963b=(_0x204d84=_0x172323==null?void 0x0:_0x172323['replies'])==null?void 0x0:_0x204d84[_0x461557(0x175)])!=null?_0x2e963b:0x0)>0x0){const _0x1e852a=(_0x391103,_0x13b492)=>({'id':_0x391103[_0x461557(0x13c)],'threadId':_0x391103[_0x461557(0x12e)],'dT':_0x415b40(_0x391103['createTimestamp']),'personId':_0x391103[_0x461557(0x11e)],'resolved':_0x172323[_0x461557(0x138)]===_0x398213[_0x461557(0x130)],'unitId':_0x61ad3a,'subUnitId':_0xd329d,'text':JSON[_0x461557(0x161)](_0x391103['content']),'parentId':_0x13b492}),_0x19caf9=_0x1e852a(_0x172323['replies'][0x0]);return{..._0x19caf9,'children':_0x172323[_0x461557(0x145)]['slice'](0x1)[_0x461557(0x11c)](_0x161406=>_0x1e852a(_0x161406,_0x19caf9['id']))};}return null;}let _0x1326b1=class{constructor(_0x2981af,_0x1cef14,_0x2f5049,_0x3f8e24){const _0x1f2f99=_0x54f122;this['_httpService']=_0x2981af,this['_userService']=_0x1cef14,this[_0x1f2f99(0x171)]=_0x2f5049,this[_0x1f2f99(0x168)]=_0x3f8e24;}async[_0x54f122(0x134)](_0x3384a2){const _0x44db38=_0x54f122;var _0x2c115,_0xfc320f;const {parentId:_0x9327b0,unitId:_0x146078,text:_0x836d95,threadId:_0x10e7f6}=_0x3384a2,_0x3b5de2=(_0xfc320f=(_0x2c115=_0x836d95[_0x44db38(0x114)])==null?void 0x0:_0x2c115[_0x44db38(0xfc)](_0x10d995=>_0x10d995[_0x44db38(0xff)]===_0x8a051d[_0x44db38(0xee)][_0x44db38(0x16c)])['map'](_0x4d266b=>_0x4d266b[_0x44db38(0x121)]))!=null?_0xfc320f:[],_0x2fbaf4=JSON[_0x44db38(0x166)](_0x836d95),_0x15978f=(await this[_0x44db38(0x171)][_0x44db38(0x11a)](_0x146078))['getMemberID']();if(_0x9327b0){const _0x162eef={'memberId':_0x15978f,'unitId':_0x146078,'content':_0x2fbaf4,'mention':_0x3b5de2,'threadId':_0x10e7f6},_0x39cdcb=(await this[_0x44db38(0x167)][_0x44db38(0x143)](_0x44db38(0x14d)+_0x146078+_0x44db38(0x108),{'body':_0x162eef}))['body']['reply'];return{..._0x3384a2,'id':_0x39cdcb[_0x44db38(0x13c)],'dT':_0x5d66e2(+_0x39cdcb['createTimestamp'])[_0x44db38(0x12a)](_0x44db38(0x177)),'personId':_0x39cdcb[_0x44db38(0x11e)]};}else{const _0x586319={'memberId':_0x15978f,'unitId':_0x146078,'content':_0x2fbaf4,'mention':_0x3b5de2},_0x2aa9b7=await this[_0x44db38(0x167)][_0x44db38(0x143)](_0x44db38(0x14d)+_0x146078+_0x44db38(0xf0),{'body':_0x586319});return _0x3c6a54(_0x2aa9b7[_0x44db38(0x150)][_0x44db38(0x174)],_0x3384a2);}}async[_0x54f122(0x111)](_0x41855f){const _0x42e02e=_0x54f122;var _0x2f36aa,_0x1d06f2;const {text:_0x20515c,unitId:_0x243c00}=_0x41855f,_0x10562d=(_0x1d06f2=(_0x2f36aa=_0x20515c[_0x42e02e(0x114)])==null?void 0x0:_0x2f36aa[_0x42e02e(0xfc)](_0x562b2d=>_0x562b2d[_0x42e02e(0xff)]===_0x8a051d['CustomRangeType'][_0x42e02e(0x16c)])[_0x42e02e(0x11c)](_0x5b799b=>_0x5b799b[_0x42e02e(0x121)]))!=null?_0x1d06f2:[],_0x5b34a0=JSON[_0x42e02e(0x166)](_0x20515c),_0x2531fb=_0x41855f[_0x42e02e(0x12e)],_0x21efd7=_0x41855f['id'],_0x37fb67={'memberId':(await this[_0x42e02e(0x171)][_0x42e02e(0x11a)](_0x243c00))[_0x42e02e(0x15f)](),'unitId':_0x243c00,'threadId':_0x2531fb,'mention':_0x10562d,'content':_0x5b34a0,'replyId':_0x21efd7},_0x4ff8b1=await this['_httpService']['post'](_0x42e02e(0x14d)+_0x243c00+_0x42e02e(0x159),{'body':_0x37fb67});return!_0x4ff8b1[_0x42e02e(0x150)][_0x42e02e(0x154)]||_0x4ff8b1['body'][_0x42e02e(0x154)][_0x42e02e(0x158)]===0x1;}async[_0x54f122(0x13d)](_0x27e4a5){const _0x5000b0=_0x54f122,{unitId:_0x42ad7b}=_0x27e4a5,_0x4c5deb=_0x27e4a5['threadId'],_0x1efb9f={'memberId':this[_0x5000b0(0x156)][_0x5000b0(0x162)]()[_0x5000b0(0x163)],'unitId':_0x42ad7b,'threadId':_0x4c5deb,'solved':_0x27e4a5[_0x5000b0(0x13e)]?_0x398213[_0x5000b0(0x130)]:_0x398213[_0x5000b0(0x12c)]},_0x33a457=await this[_0x5000b0(0x167)][_0x5000b0(0x143)](_0x5000b0(0x14d)+_0x42ad7b+_0x5000b0(0x105),{'body':_0x1efb9f});return!_0x33a457['body'][_0x5000b0(0x154)]||_0x33a457[_0x5000b0(0x150)][_0x5000b0(0x154)][_0x5000b0(0x158)]===0x1;}async['deleteComment'](_0x1fba8b,_0x54e3f0,_0xb96160,_0x31322d){const _0x390326=_0x54f122,_0x16b06f={'memberId':(await this[_0x390326(0x171)][_0x390326(0x11a)](_0x1fba8b))[_0x390326(0x15f)](),'threadId':_0xb96160,'replyId':_0x31322d,'unitId':_0x1fba8b},_0x4f670c=await this['_httpService'][_0x390326(0x143)]('/universer-api/comment/unit/'+_0x1fba8b+'/delete',{'body':_0x16b06f});return!_0x4f670c[_0x390326(0x150)][_0x390326(0x154)]||_0x4f670c['body'][_0x390326(0x154)][_0x390326(0x158)]===0x1;}async['listComments'](_0x455c43,_0x6a0775,_0x25a10d){const _0x43db52=_0x54f122,_0x5490d8={'unitId':_0x455c43,'threadId':_0x25a10d},_0x3feb6d=await this[_0x43db52(0x167)]['post']('/universer-api/comment/unit/'+_0x455c43+_0x43db52(0xea),{'body':_0x5490d8}),_0x382787=_0x25a10d[_0x43db52(0x11c)](_0x3b196f=>_0x2033ae(_0x3feb6d[_0x43db52(0x150)][_0x43db52(0x160)][_0x3b196f],_0x455c43,_0x6a0775))[_0x43db52(0xfc)](Boolean);return Object[_0x43db52(0xfe)](_0x3feb6d['body'][_0x43db52(0x115)])[_0x43db52(0xeb)](_0x454d34=>{const _0x5f5d6a=_0x43db52;this[_0x5f5d6a(0x156)][_0x5f5d6a(0x15b)](_0x454d34);}),_0x382787;}[_0x54f122(0xed)](_0x89b73d){const _0xe5181c=_0x54f122;return{'id':_0x89b73d['id'],'threadId':_0x89b73d[_0xe5181c(0x12e)],'ref':_0x89b73d[_0xe5181c(0x123)]};}};_0x1326b1=_0x203dba([_0x1c1f41(0x0,_0x8a051d['Inject'](_0x2b815e['HTTPService'])),_0x1c1f41(0x1,_0x8a051d[_0x54f122(0x127)](_0x8a051d[_0x54f122(0xf9)])),_0x1c1f41(0x2,_0x8a051d[_0x54f122(0x127)](_0x54cc54[_0x54f122(0x132)])),_0x1c1f41(0x3,_0x8a051d['Inject'](_0x8a051d[_0x54f122(0x131)]))],_0x1326b1);var _0x571b27=Object[_0x54f122(0x164)],_0x42db20=Object[_0x54f122(0x136)],_0x2133a0=(_0x3edf4b,_0x136c36,_0x49a9b3,_0x506706)=>{const _0x5035bf=_0x54f122;for(var _0x3d651f=_0x506706>0x1?void 0x0:_0x506706?_0x42db20(_0x136c36,_0x49a9b3):_0x136c36,_0x34e260=_0x3edf4b[_0x5035bf(0x175)]-0x1,_0xe630f8;_0x34e260>=0x0;_0x34e260--)(_0xe630f8=_0x3edf4b[_0x34e260])&&(_0x3d651f=(_0x506706?_0xe630f8(_0x136c36,_0x49a9b3,_0x3d651f):_0xe630f8(_0x3d651f))||_0x3d651f);return _0x506706&&_0x3d651f&&_0x571b27(_0x136c36,_0x49a9b3,_0x3d651f),_0x3d651f;},_0x58576d=(_0x4f8d10,_0x503265)=>(_0x9d05be,_0x2a4749)=>_0x503265(_0x9d05be,_0x2a4749,_0x4f8d10);let _0x3c159e=class{constructor(_0x55825a){const _0x130763=_0x54f122;this[_0x130763(0x167)]=_0x55825a;}async[_0x54f122(0x11b)](_0x99a2de,_0x8f6a0c,_0x20ceba){const _0x1631b5=_0x54f122,_0x5e3f39=new URL(window['location'][_0x1631b5(0x129)])[_0x1631b5(0x14f)][_0x1631b5(0xf3)](_0x1631b5(0x126));if(!_0x5e3f39)return[];const _0x319e6d=window[_0x1631b5(0x172)][_0x1631b5(0xf6)],_0x3ecc77=window['location']['protocol']===_0x1631b5(0x16b)?_0x1631b5(0xf5):_0x1631b5(0x165);return(await this[_0x1631b5(0x167)]['get'](_0x3ecc77+_0x1631b5(0x14c)+_0x319e6d+'/universer-api/authz/collaborator',{'params':{'objectID':_0x5e3f39,'unitID':_0x5e3f39}}))[_0x1631b5(0x150)]['collaborators'][_0x1631b5(0x11c)](_0x543daa=>{const _0x327f32=_0x1631b5;var _0x303b27,_0x599f01,_0x375c02,_0x321933,_0x5a92b8,_0x50fede;return{'id':(_0x599f01=(_0x303b27=_0x543daa[_0x327f32(0x10b)])==null?void 0x0:_0x303b27[_0x327f32(0x163)])!=null?_0x599f01:'','label':(_0x321933=(_0x375c02=_0x543daa[_0x327f32(0x10b)])==null?void 0x0:_0x375c02[_0x327f32(0x118)])!=null?_0x321933:'','icon':(_0x50fede=(_0x5a92b8=_0x543daa[_0x327f32(0x10b)])==null?void 0x0:_0x5a92b8[_0x327f32(0x137)])!=null?_0x50fede:'','type':'user'};});}};_0x3c159e=_0x2133a0([_0x58576d(0x0,_0x8a051d[_0x54f122(0x127)](_0x2b815e[_0x54f122(0x179)]))],_0x3c159e);var _0x1cda65=Object[_0x54f122(0x164)],_0x3df826=Object[_0x54f122(0x136)],_0x1c614c=(_0x101d21,_0x26921a,_0x2e789a,_0x54930a)=>{const _0x2d00bd=_0x54f122;for(var _0x4dac21=_0x54930a>0x1?void 0x0:_0x54930a?_0x3df826(_0x26921a,_0x2e789a):_0x26921a,_0x2904bc=_0x101d21[_0x2d00bd(0x175)]-0x1,_0x189f7a;_0x2904bc>=0x0;_0x2904bc--)(_0x189f7a=_0x101d21[_0x2904bc])&&(_0x4dac21=(_0x54930a?_0x189f7a(_0x26921a,_0x2e789a,_0x4dac21):_0x189f7a(_0x4dac21))||_0x4dac21);return _0x54930a&&_0x4dac21&&_0x1cda65(_0x26921a,_0x2e789a,_0x4dac21),_0x4dac21;},_0x775770=(_0xe4f9c0,_0x2762ea)=>(_0x21086a,_0x326b0e)=>_0x2762ea(_0x21086a,_0x326b0e,_0xe4f9c0);let _0x360483=class extends _0x8a051d[_0x54f122(0x122)]{constructor(_0x477810,_0x4f7697,_0x2d6195,_0x56f455){const _0x867e36=_0x54f122;super(),this[_0x867e36(0x173)]=_0x477810,this[_0x867e36(0x10c)]=_0x4f7697,this[_0x867e36(0x10e)]=_0x2d6195,this['_threadCommentMentionDataSource']=_0x56f455,this['_initDataSource']();}[_0x54f122(0xe8)](){const _0x399473=_0x54f122;this[_0x399473(0x173)][_0x399473(0x124)]=this[_0x399473(0x10c)],this['_threadCommentDataSourceService'][_0x399473(0xef)]=!0x1,this[_0x399473(0x10e)]['dataSource']=this['_threadCommentMentionDataSource'];}};_0x360483=_0x1c614c([_0x8a051d[_0x54f122(0xfb)](_0x8a051d[_0x54f122(0x13b)]['Starting'],_0x360483),_0x775770(0x0,_0xbb6af7[_0x54f122(0x12f)]),_0x775770(0x1,_0x8a051d[_0x54f122(0x127)](_0x1326b1)),_0x775770(0x2,_0x2225b0[_0x54f122(0x120)]),_0x775770(0x3,_0x8a051d['Inject'](_0x3c159e))],_0x360483);var _0x44e577=Object[_0x54f122(0x164)],_0x3a975b=Object['getOwnPropertyDescriptor'],_0x12d1ec=(_0x180b25,_0x27b164,_0x5305b1,_0x1e96ef)=>{const _0x4d32e7=_0x54f122;for(var _0x10426b=_0x1e96ef>0x1?void 0x0:_0x1e96ef?_0x3a975b(_0x27b164,_0x5305b1):_0x27b164,_0x4fecdd=_0x180b25[_0x4d32e7(0x175)]-0x1,_0xe86f74;_0x4fecdd>=0x0;_0x4fecdd--)(_0xe86f74=_0x180b25[_0x4fecdd])&&(_0x10426b=(_0x1e96ef?_0xe86f74(_0x27b164,_0x5305b1,_0x10426b):_0xe86f74(_0x10426b))||_0x10426b);return _0x1e96ef&&_0x10426b&&_0x44e577(_0x27b164,_0x5305b1,_0x10426b),_0x10426b;},_0x8b6c46=(_0x375eba,_0x529638)=>(_0x2f623f,_0x59b893)=>_0x529638(_0x2f623f,_0x59b893,_0x375eba);let _0x458f18=class extends _0x8a051d[_0x54f122(0x122)]{constructor(_0x407ae6,_0x36aeb7,_0x52362d,_0x1ecdff){const _0xa97da=_0x54f122;super(),this[_0xa97da(0x11d)]=_0x407ae6,this['_threadCommentModel']=_0x36aeb7,this[_0xa97da(0x156)]=_0x52362d,this[_0xa97da(0x168)]=_0x1ecdff,this[_0xa97da(0x16e)](),this[_0xa97da(0x125)]();}['_initUserSync'](){const _0x491bd9=_0x54f122;this['disposeWithMe'](this[_0x491bd9(0x110)][_0x491bd9(0x15a)][_0x491bd9(0xfa)](_0x1ab0e1['bufferTime'](0x10))[_0x491bd9(0x157)](_0x5a83a3=>{const _0x550125=_0x491bd9,_0x48177a=new Set();_0x5a83a3[_0x550125(0xeb)](_0x23db0c=>{const _0x420e50=_0x550125;switch(_0x23db0c[_0x420e50(0x14a)]){case'add':{const _0x418b20=_0x23db0c[_0x420e50(0x10d)][_0x420e50(0x12b)];_0x48177a[_0x420e50(0x15e)](_0x418b20);break;}}}),_0x4d6f9b(this[_0x550125(0x168)],_0x48177a);}));}[_0x54f122(0x16e)](){const _0xb378c3=_0x54f122;this[_0xb378c3(0x106)](this[_0xb378c3(0x11d)][_0xb378c3(0x15a)][_0xb378c3(0x157)](async _0x250675=>{const _0x3d1687=_0xb378c3;var _0x32fc2a,_0x218095;const _0x1d096d=this['_threadCommentModel'][_0x3d1687(0xe7)](_0x250675[_0x3d1687(0xe9)],_0x250675[_0x3d1687(0x12e)]);if(!_0x1d096d)return;const {unitId:_0x56517f,subUnitId:_0x4247d3}=_0x1d096d;switch(_0x250675['user']&&this[_0x3d1687(0x156)][_0x3d1687(0x15b)](_0x250675['user']),_0x250675[_0x3d1687(0x14a)]){case _0x1b5e47[_0x3d1687(0xf7)]:break;case _0x1b5e47[_0x3d1687(0x149)]:{this[_0x3d1687(0x110)][_0x3d1687(0x134)](_0x56517f,_0x4247d3,{'unitId':_0x56517f,'subUnitId':_0x4247d3,'ref':'','id':_0x250675[_0x3d1687(0x13c)],'dT':_0x415b40(+_0x250675['createTimestamp']),'threadId':_0x250675[_0x3d1687(0x12e)],'personId':(_0x218095=(_0x32fc2a=_0x250675[_0x3d1687(0x176)])==null?void 0x0:_0x32fc2a[_0x3d1687(0x163)])!=null?_0x218095:_0x250675[_0x3d1687(0x11e)],'text':JSON[_0x3d1687(0x161)](_0x250675['content']),'parentId':_0x1d096d['id']});break;}case _0x1b5e47['Delete']:{const _0x33c543=this[_0x3d1687(0x110)][_0x3d1687(0xf1)](_0x56517f,_0x4247d3,_0x250675[_0x3d1687(0x13c)]);_0x33c543&&_0x33c543[_0x3d1687(0xf2)]&&this[_0x3d1687(0x110)][_0x3d1687(0xec)](_0x56517f,_0x4247d3,_0x250675[_0x3d1687(0x13c)]);break;}case _0x1b5e47[_0x3d1687(0x17a)]:{this[_0x3d1687(0x110)]['updateComment'](_0x56517f,_0x4247d3,{'commentId':_0x250675[_0x3d1687(0x13c)],'text':JSON[_0x3d1687(0x161)](_0x250675[_0x3d1687(0x147)])});break;}case _0x1b5e47[_0x3d1687(0x100)]:{const _0x3140ff=this['_threadCommentModel'][_0x3d1687(0xe7)](_0x56517f,_0x250675[_0x3d1687(0x12e)]);_0x3140ff&&this[_0x3d1687(0x110)][_0x3d1687(0x13d)](_0x56517f,_0x4247d3,_0x3140ff['id'],_0x250675[_0x3d1687(0x138)]===_0x398213['Solved']);break;}}}));}};_0x458f18=_0x12d1ec([_0x8a051d[_0x54f122(0xfb)](_0x8a051d['LifecycleStages']['Ready'],_0x458f18),_0x8b6c46(0x0,_0x8a051d[_0x54f122(0x127)](_0x54cc54[_0x54f122(0x14b)])),_0x8b6c46(0x1,_0x8a051d['Inject'](_0xbb6af7['ThreadCommentModel'])),_0x8b6c46(0x2,_0x8a051d[_0x54f122(0x127)](_0x8a051d['UserManagerService'])),_0x8b6c46(0x3,_0x8a051d[_0x54f122(0x127)](_0x8a051d['Injector']))],_0x458f18);var _0x2dbd4e=Object['defineProperty'],_0x232c9e=Object[_0x54f122(0x136)],_0x1dd134=(_0x2b92ba,_0x549b3a,_0x4e367d)=>_0x549b3a in _0x2b92ba?_0x2dbd4e(_0x2b92ba,_0x549b3a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e367d}):_0x2b92ba[_0x549b3a]=_0x4e367d,_0x4d6de5=(_0x282398,_0x520429,_0x52ea07,_0x52d2ce)=>{const _0x40e812=_0x54f122;for(var _0x3a7800=_0x52d2ce>0x1?void 0x0:_0x52d2ce?_0x232c9e(_0x520429,_0x52ea07):_0x520429,_0x7609d9=_0x282398[_0x40e812(0x175)]-0x1,_0x393ee3;_0x7609d9>=0x0;_0x7609d9--)(_0x393ee3=_0x282398[_0x7609d9])&&(_0x3a7800=(_0x52d2ce?_0x393ee3(_0x520429,_0x52ea07,_0x3a7800):_0x393ee3(_0x3a7800))||_0x3a7800);return _0x52d2ce&&_0x3a7800&&_0x2dbd4e(_0x520429,_0x52ea07,_0x3a7800),_0x3a7800;},_0x5c7766=(_0x464499,_0x4fbc0d)=>(_0x5c69a3,_0x27c0f6)=>_0x4fbc0d(_0x5c69a3,_0x27c0f6,_0x464499),_0x120d4c=(_0xff842d,_0x4d30ee,_0x2bcc95)=>_0x1dd134(_0xff842d,typeof _0x4d30ee!=_0x54f122(0x169)?_0x4d30ee+'':_0x4d30ee,_0x2bcc95);_0x48fcbb['UniverThreadCommentDataSourcePlugin']=class extends _0x8a051d['Plugin']{constructor(_0x17b8df,_0x26df6f){const _0x1754ff=_0x54f122;super(),this[_0x1754ff(0x168)]=_0x26df6f;}[_0x54f122(0x152)](_0x569172){[[_0x3c159e],[_0x1326b1],[_0x360483],[_0x458f18]]['forEach'](_0x443649=>{const _0x3da630=_0x5d84;_0x569172[_0x3da630(0x15e)](_0x443649);});}},_0x120d4c(_0x48fcbb[_0x54f122(0x178)],'pluginName',_0x3467b7),_0x120d4c(_0x48fcbb[_0x54f122(0x178)],_0x54f122(0x14a),_0x8a051d[_0x54f122(0x16d)][_0x54f122(0xe6)]),_0x48fcbb[_0x54f122(0x178)]=_0x4d6de5([_0x8a051d[_0x54f122(0x16a)](_0xbb6af7[_0x54f122(0x16f)],_0x2225b0['UniverThreadCommentUIPlugin'],_0x54cc54['UniverCollaborationClientPlugin']),_0x5c7766(0x1,_0x8a051d[_0x54f122(0x127)](_0x8a051d['Injector']))],_0x48fcbb[_0x54f122(0x178)]),Object['defineProperty'](_0x48fcbb,Symbol[_0x54f122(0x144)],{'value':'Module'});}));function _0x5d84(_0x4406e8,_0x26b07e){const _0x206b8a=_0x206b();return _0x5d84=function(_0x5d8462,_0x48b138){_0x5d8462=_0x5d8462-0xe6;let _0x1e7cb5=_0x206b8a[_0x5d8462];return _0x1e7cb5;},_0x5d84(_0x4406e8,_0x26b07e);}function _0x206b(){const _0x12fd22=['_threadCommentDataSourceService','comment','length','user','YYYY/MM/DD\x20HH:mm','UniverThreadCommentDataSourcePlugin','HTTPService','Edit','UNIVER_UNKNOWN','getThread','_initDataSource','unitId','/list','forEach','deleteComment','saveCommentToSnapshot','CustomRangeType','syncUpdateMutationToColla','/add','getComment','parentId','get','Unknown','https','host','Add','/universer-api/user/list','UserManagerService','pipe','OnLifecycle','filter','@univerjs-pro/collaboration-client','values','rangeType','Solve','UniverCore','36HDBSeW','55134hRehPT','9570sQYzTh','/solved','disposeWithMe','UniverNetwork','/reply','@univerjs/network','size','subject','_threadCommentDataSource','payload','_threadCommentMentionDataService','UniverCollaborationClient','_threadCommentModel','updateComment','Delete','dayjs','customRanges','users','getUser','@univerjs/thread-comment','name','exports','requireSession','getMentions','map','_commentService','userId','8NjEtMJ','IThreadCommentMentionDataService','rangeId','Disposable','ref','dataSource','_initUserSync','unit','Inject','4BPotRT','href','format','personId','OpenOrReOpen','4238816kUnELF','threadId','IThreadCommentDataSourceService','Solved','Injector','CollaborationSessionService','1644nTVZnt','addComment','UniverThreadComment','getOwnPropertyDescriptor','avatar','solved','@univerjs/core','amd','LifecycleStages','replyId','resolveComment','resolved','function','@univerjs/thread-comment-ui','3123123OiLSuX','UNRECOGNIZED','post','toStringTag','replies','UniverThreadCommentUi','content','delete','Reply','type','CommentService','://','/universer-api/comment/unit/','object','searchParams','body','9184571jdZzVv','onStarting','rxjs','error','144167ARnoRC','_userService','subscribe','code','/edit','commentUpdate$','addUser','THREAD_COMMENT_DATA_SOURCE_PLUGIN','830ItYfJm','add','getMemberID','comments','parse','getCurrentUser','userID','defineProperty','http','stringify','_httpService','_injector','symbol','DependentOn','https:','COMMENT','UniverInstanceType','_init','UniverThreadCommentPlugin','6404398mVYcPu','_sessionService','location'];_0x206b=function(){return _0x12fd22;};return _0x206b();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,14 +45,14 @@
45
45
  "peerDependencies": {
46
46
  "dayjs": ">=1.11.0",
47
47
  "rxjs": ">=7.0.0",
48
- "@univerjs-pro/collaboration-client": "0.2.9",
49
- "@univerjs/core": "0.2.9",
50
- "@univerjs/network": "0.2.9",
51
- "@univerjs/thread-comment": "0.2.9",
52
- "@univerjs/thread-comment-ui": "0.2.9"
48
+ "@univerjs-pro/collaboration-client": "0.2.11",
49
+ "@univerjs/core": "0.2.11",
50
+ "@univerjs/thread-comment": "0.2.11",
51
+ "@univerjs/thread-comment-ui": "0.2.11",
52
+ "@univerjs/network": "0.2.11"
53
53
  },
54
54
  "dependencies": {
55
- "@univerjs/protocol": "0.1.39-alpha.12"
55
+ "@univerjs/protocol": "0.1.39-alpha.15"
56
56
  },
57
57
  "devDependencies": {
58
58
  "dayjs": "^1.11.12",
@@ -60,11 +60,11 @@
60
60
  "typescript": "^5.5.4",
61
61
  "vite": "^5.4.0",
62
62
  "vitest": "^2.0.5",
63
- "@univerjs/core": "0.2.9",
64
- "@univerjs/network": "0.2.9",
65
- "@univerjs-pro/facade": "0.2.9",
66
- "@univerjs/shared": "0.2.9",
67
- "@univerjs/uniscript": "0.2.9"
63
+ "@univerjs-pro/facade": "0.2.11",
64
+ "@univerjs/core": "0.2.11",
65
+ "@univerjs/network": "0.2.11",
66
+ "@univerjs/shared": "0.2.11",
67
+ "@univerjs/uniscript": "0.2.11"
68
68
  },
69
69
  "univerSpace": {
70
70
  ".": {