@univerjs-pro/thread-comment-datasource 0.6.10-nightly.202504241607 → 0.6.10-nightly.202504251607

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 _0x392f24=_0x4a1c;(function(_0x58b51f,_0x2d43fb){const _0x41000f=_0x4a1c,_0x10a378=_0x58b51f();while(!![]){try{const _0x2d3933=-parseInt(_0x41000f(0x1bc))/0x1*(-parseInt(_0x41000f(0x1f2))/0x2)+parseInt(_0x41000f(0x19d))/0x3+-parseInt(_0x41000f(0x1b1))/0x4*(parseInt(_0x41000f(0x1af))/0x5)+parseInt(_0x41000f(0x1ab))/0x6*(-parseInt(_0x41000f(0x1c1))/0x7)+-parseInt(_0x41000f(0x1c0))/0x8+parseInt(_0x41000f(0x1c9))/0x9+parseInt(_0x41000f(0x1aa))/0xa*(parseInt(_0x41000f(0x1d1))/0xb);if(_0x2d3933===_0x2d43fb)break;else _0x10a378['push'](_0x10a378['shift']());}catch(_0x5a34f8){_0x10a378['push'](_0x10a378['shift']());}}}(_0xddbd,0xd39d3));function _0xddbd(){const _0x3d6a04=['users','userId','getUnit','ref','unitId','UniverThreadCommentDataSourcePlugin','root','requireSession','1sYnNfe','Module','code','merge','1492896QdqyrA','200011yyUNgH','onReady','replies','@univerjs/network','UNRECOGNIZED','/universer-api/user/list','UNIVER_UNKNOWN','UniverCollaborationClientPlugin','1668033phLXFx','add','/delete','rangeId','getUser','pluginName','error','createTimestamp','41294umPatZ','Disposable','IThreadCommentDataSourceService','content','/solved','OpenOrReOpen','_httpService','type','threadId','/list','_commentService','map','defineProperty','format','Solved','@univerjs-pro/license','_injector','Solve','post','getOwnPropertyDescriptor','onStarting','payload','thread-comment-data-source.config','syncUpdateMutationToColla','/reply','_threadCommentModel','Injector','UniverInstanceType','saveCommentToSnapshot','UniverLicensePlugin','ThreadCommentModel','setConfig','filter','120384fEuFap','getComment','rangeType','_threadCommentDataSourceService','getCurrentUser','_initDataSource','_config','find','_init','user','comment','pipe','userID','Add','getMemberID','COMMENT','UserManagerService','length','customRanges','/universer-api/comment/unit/','replyId','reply','updateComment','disposeWithMe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CommentService','listComments','body','resolved','addUser','Delete','toStringTag','solved','_sessionService','_userService','Plugin','forEach','resolveComment','subscribe','_threadCommentDataSource','UniverThreadCommentUIPlugin','460956elHbzo','stringify','commentUpdate$','deleteComment','Edit','parse','Unknown','@univerjs/thread-comment-ui','Inject','YYYY/MM/DD\x20HH:mm','/edit','_initUserSync','dayjs','4710DuwdrO','102feomjl','symbol','get','@univerjs-pro/collaboration-client','15Zefapg','personId','837588aPqhWF','addComment','Reply'];_0xddbd=function(){return _0x3d6a04;};return _0xddbd();}Object[_0x392f24(0x1dd)](exports,Symbol[_0x392f24(0x193)],{'value':_0x392f24(0x1bd)});const b=require(_0x392f24(0x1ae)),T=require(_0x392f24(0x1e0)),c=require('@univerjs/core'),j=require(_0x392f24(0x1a4)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x392f24(0x1c4)),U=_0x392f24(0x18c);var I=(_0x2da485=>(_0x2da485[_0x2da485[_0x392f24(0x1d6)]=0x0]='OpenOrReOpen',_0x2da485[_0x2da485[_0x392f24(0x1df)]=0x1]=_0x392f24(0x1df),_0x2da485[_0x2da485['UNRECOGNIZED']=-0x1]=_0x392f24(0x1c5),_0x2da485))(I||{}),v=(_0x146282=>(_0x146282[_0x146282['Unknown']=0x0]=_0x392f24(0x1a3),_0x146282[_0x146282[_0x392f24(0x181)]=0x1]=_0x392f24(0x181),_0x146282[_0x146282[_0x392f24(0x1b3)]=0x2]=_0x392f24(0x1b3),_0x146282[_0x146282[_0x392f24(0x1a1)]=0x3]='Edit',_0x146282[_0x146282[_0x392f24(0x192)]=0x4]=_0x392f24(0x192),_0x146282[_0x146282['Solve']=0x5]=_0x392f24(0x1e2),_0x146282[_0x146282['UNRECOGNIZED']=-0x1]=_0x392f24(0x1c5),_0x146282))(v||{});const f=_0x4e12cc=>c[_0x392f24(0x1a9)](new Date(+_0x4e12cc))[_0x392f24(0x1de)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x5183d7,_0x3cd64b)=>{const _0x4835a6=_0x392f24,_0xe6f981=_0x5183d7['get'](c[_0x4835a6(0x184)]),_0x346fbb=_0x5183d7[_0x4835a6(0x1ad)](P['HTTPService']);_0x3cd64b[_0x4835a6(0x198)](_0xcf71a7=>{const _0xa69307=_0x4835a6;_0xe6f981[_0xa69307(0x1cd)](_0xcf71a7)&&_0x3cd64b['delete'](_0xcf71a7);}),_0x3cd64b['size']&&(await _0x346fbb[_0x4835a6(0x1ad)](_0x4835a6(0x1c6),{'params':{'userIDs':[..._0x3cd64b]}}))['body'][_0x4835a6(0x1b4)][_0x4835a6(0x198)](_0x290596=>{const _0x302b24=_0x4835a6;_0x290596&&_0xe6f981[_0x302b24(0x191)](_0x290596);});};var $=Object[_0x392f24(0x1e4)],E=(_0x2c64b3,_0x3479b9,_0x47a0ff,_0x1b65b7)=>{const _0x580d52=_0x392f24;for(var _0x1e59a7=_0x1b65b7>0x1?void 0x0:_0x1b65b7?$(_0x3479b9,_0x47a0ff):_0x3479b9,_0x3be1be=_0x2c64b3[_0x580d52(0x185)]-0x1,_0x450f84;_0x3be1be>=0x0;_0x3be1be--)(_0x450f84=_0x2c64b3[_0x3be1be])&&(_0x1e59a7=_0x450f84(_0x1e59a7)||_0x1e59a7);return _0x1e59a7;},S=(_0x5db431,_0x1ee519)=>(_0x4d34fe,_0x1d3803)=>_0x1ee519(_0x4d34fe,_0x1d3803,_0x5db431);let p=class extends c['Disposable']{constructor(_0x373dc2,_0x750d10,_0x55ff25,_0x1ad3cc){const _0x26a86f=_0x392f24;super(),this[_0x26a86f(0x1db)]=_0x373dc2,this['_threadCommentModel']=_0x750d10,this['_userService']=_0x55ff25,this[_0x26a86f(0x1e1)]=_0x1ad3cc,this[_0x26a86f(0x1fa)](),this[_0x26a86f(0x1a8)]();}[_0x392f24(0x1a8)](){const _0x1777a2=_0x392f24;this[_0x1777a2(0x18b)](this[_0x1777a2(0x1ea)][_0x1777a2(0x19f)][_0x1777a2(0x17f)](w['bufferTime'](0x10))[_0x1777a2(0x19a)](_0x18b1b5=>{const _0xc0bb88=_0x1777a2,_0x5d097a=new Set();_0x18b1b5['forEach'](_0x15fc55=>{const _0x24a0ee=_0x4a1c;switch(_0x15fc55[_0x24a0ee(0x1d8)]){case _0x24a0ee(0x1ca):{const _0x2dafb7=_0x15fc55[_0x24a0ee(0x1e6)][_0x24a0ee(0x1b0)];_0x5d097a['add'](_0x2dafb7);break;}}}),R(this[_0xc0bb88(0x1e1)],_0x5d097a);}));}[_0x392f24(0x1fa)](){const _0x46fc50=_0x392f24;this[_0x46fc50(0x18b)](this[_0x46fc50(0x1db)][_0x46fc50(0x19f)][_0x46fc50(0x19a)](async _0x595a8d=>{const _0x3e0779=_0x46fc50;var _0x3ab29e,_0x402321,_0x802c41,_0x39d81b;const _0xf615e4=(_0x3ab29e=this['_threadCommentModel']['getUnit'](_0x595a8d[_0x3e0779(0x1b8)])['find'](_0x5036a2=>_0x5036a2['threadId']===_0x595a8d[_0x3e0779(0x1d9)]))==null?void 0x0:_0x3ab29e[_0x3e0779(0x1ba)];if(!_0xf615e4)return;const {unitId:_0x5019ea,subUnitId:_0x5c2896}=_0xf615e4;switch(_0x595a8d['user']&&this[_0x3e0779(0x196)][_0x3e0779(0x191)](_0x595a8d[_0x3e0779(0x1fb)]),_0x595a8d[_0x3e0779(0x1d8)]){case v[_0x3e0779(0x181)]:break;case v[_0x3e0779(0x1b3)]:{this[_0x3e0779(0x1ea)][_0x3e0779(0x1b2)](_0x5019ea,_0x5c2896,{'unitId':_0x5019ea,'subUnitId':_0x5c2896,'ref':'','id':_0x595a8d[_0x3e0779(0x188)],'dT':f(+_0x595a8d[_0x3e0779(0x1d0)]),'threadId':_0x595a8d[_0x3e0779(0x1d9)],'personId':(_0x802c41=(_0x402321=_0x595a8d['user'])==null?void 0x0:_0x402321[_0x3e0779(0x180)])!=null?_0x802c41:_0x595a8d[_0x3e0779(0x1b5)],'text':JSON[_0x3e0779(0x1a2)](_0x595a8d['content']),'parentId':_0xf615e4['id']});break;}case v['Delete']:{const _0x160257=this[_0x3e0779(0x1ea)][_0x3e0779(0x1f3)](_0x5019ea,_0x5c2896,_0x595a8d['replyId']);_0x160257&&_0x160257['parentId']&&this[_0x3e0779(0x1ea)]['deleteComment'](_0x5019ea,_0x5c2896,_0x595a8d[_0x3e0779(0x188)]);break;}case v['Edit']:{this[_0x3e0779(0x1ea)][_0x3e0779(0x18a)](_0x5019ea,_0x5c2896,{'commentId':_0x595a8d[_0x3e0779(0x188)],'text':JSON[_0x3e0779(0x1a2)](_0x595a8d[_0x3e0779(0x1d4)])});break;}case v[_0x3e0779(0x1e2)]:{const _0x1576af=(_0x39d81b=this['_threadCommentModel'][_0x3e0779(0x1b6)](_0x595a8d[_0x3e0779(0x1b8)])[_0x3e0779(0x1f9)](_0x53dfcc=>_0x53dfcc['threadId']===_0x595a8d[_0x3e0779(0x1d9)]))==null?void 0x0:_0x39d81b[_0x3e0779(0x1ba)];_0x1576af&&this[_0x3e0779(0x1ea)]['resolveComment'](_0x5019ea,_0x5c2896,_0x1576af['id'],_0x595a8d['solved']===I[_0x3e0779(0x1df)]);break;}}}));}};function _0x4a1c(_0x5054ca,_0xcc1deb){const _0xddbd70=_0xddbd();return _0x4a1c=function(_0x4a1c58,_0x4f9200){_0x4a1c58=_0x4a1c58-0x17f;let _0x55863b=_0xddbd70[_0x4a1c58];return _0x55863b;},_0x4a1c(_0x5054ca,_0xcc1deb);}p=E([S(0x0,c[_0x392f24(0x1a5)](b[_0x392f24(0x18d)])),S(0x1,c[_0x392f24(0x1a5)](M[_0x392f24(0x1ef)])),S(0x2,c['Inject'](c[_0x392f24(0x184)])),S(0x3,c[_0x392f24(0x1a5)](c[_0x392f24(0x1eb)]))],p);const q=_0x392f24(0x1e7),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x4df98a,_0x17c693,_0x5c5045,_0x526305)=>{const _0x3c92a1=_0x392f24;for(var _0x1856c3=_0x526305>0x1?void 0x0:_0x526305?A(_0x17c693,_0x5c5045):_0x17c693,_0x5ee4da=_0x4df98a[_0x3c92a1(0x185)]-0x1,_0x42f0ad;_0x5ee4da>=0x0;_0x5ee4da--)(_0x42f0ad=_0x4df98a[_0x5ee4da])&&(_0x1856c3=_0x42f0ad(_0x1856c3)||_0x1856c3);return _0x1856c3;},_=(_0x3541df,_0x4f4cf6)=>(_0x1cd631,_0x889ca7)=>_0x4f4cf6(_0x1cd631,_0x889ca7,_0x3541df);function Y(_0x2c9145,_0x145fa6){const _0x27b23b=_0x392f24,_0x2279d8=_0x2c9145[_0x27b23b(0x1c3)][0x0];return{..._0x145fa6,'id':_0x2279d8['replyId'],'resolved':_0x2c9145[_0x27b23b(0x194)]===0x1,'dT':f(_0x2279d8['createTimestamp']),'personId':_0x2279d8['userId'],'threadId':_0x2279d8[_0x27b23b(0x1d9)]};}function G(_0x3f4b68,_0x1c5b6c,_0x479354){const _0x51a556=_0x392f24;var _0x49cbe7,_0x26a449;if(((_0x26a449=(_0x49cbe7=_0x3f4b68==null?void 0x0:_0x3f4b68['replies'])==null?void 0x0:_0x49cbe7[_0x51a556(0x185)])!=null?_0x26a449:0x0)>0x0){const _0x404a72=(_0x3a78f9,_0x33f89a)=>({'id':_0x3a78f9[_0x51a556(0x188)],'threadId':_0x3a78f9[_0x51a556(0x1d9)],'dT':f(_0x3a78f9[_0x51a556(0x1d0)]),'personId':_0x3a78f9[_0x51a556(0x1b5)],'resolved':_0x3f4b68[_0x51a556(0x194)]===I[_0x51a556(0x1df)],'unitId':_0x1c5b6c,'subUnitId':_0x479354,'text':JSON[_0x51a556(0x1a2)](_0x3a78f9[_0x51a556(0x1d4)]),'parentId':_0x33f89a}),_0x3c96d1=_0x404a72(_0x3f4b68[_0x51a556(0x1c3)][0x0]);return{..._0x3c96d1,'children':_0x3f4b68[_0x51a556(0x1c3)]['slice'](0x1)[_0x51a556(0x1dc)](_0x3d899e=>_0x404a72(_0x3d899e,_0x3c96d1['id']))};}return null;}let g=class{constructor(_0x2fab19,_0x3e0143,_0x563bd4,_0x132222){const _0x1b3961=_0x392f24;this[_0x1b3961(0x1d7)]=_0x2fab19,this[_0x1b3961(0x196)]=_0x3e0143,this[_0x1b3961(0x195)]=_0x563bd4,this[_0x1b3961(0x1e1)]=_0x132222;}async[_0x392f24(0x1b2)](_0x11513e){const _0x4536d8=_0x392f24;var _0x2ebb0c,_0x3376df;const {parentId:_0x5cd647,unitId:_0x497fc0,text:_0x29cb5c,threadId:_0x4d532a}=_0x11513e,_0x20adb1=(_0x3376df=(_0x2ebb0c=_0x29cb5c['customRanges'])==null?void 0x0:_0x2ebb0c[_0x4536d8(0x1f1)](_0x56e749=>_0x56e749['rangeType']===c['CustomRangeType'][_0x4536d8(0x183)])[_0x4536d8(0x1dc)](_0x1b9e65=>_0x1b9e65[_0x4536d8(0x1cc)]))!=null?_0x3376df:[],_0x5bc1dc=JSON[_0x4536d8(0x19e)](_0x29cb5c),_0x405b8d=(await this[_0x4536d8(0x195)]['requireSession'](_0x497fc0))[_0x4536d8(0x182)]();if(_0x5cd647){const _0x92f785={'memberId':_0x405b8d,'unitId':_0x497fc0,'content':_0x5bc1dc,'mention':_0x20adb1,'threadId':_0x4d532a},_0x254646=(await this['_httpService'][_0x4536d8(0x1e3)](_0x4536d8(0x187)+_0x497fc0+_0x4536d8(0x1e9),{'body':_0x92f785}))[_0x4536d8(0x18f)][_0x4536d8(0x189)];return{..._0x11513e,'id':_0x254646['replyId'],'dT':c[_0x4536d8(0x1a9)](+_0x254646[_0x4536d8(0x1d0)])['format'](_0x4536d8(0x1a6)),'personId':_0x254646[_0x4536d8(0x1b5)]};}else{const _0x50b17a={'memberId':_0x405b8d,'unitId':_0x497fc0,'content':_0x5bc1dc,'mention':_0x20adb1},_0x1337da=await this['_httpService'][_0x4536d8(0x1e3)](_0x4536d8(0x187)+_0x497fc0+'/add',{'body':_0x50b17a});return Y(_0x1337da[_0x4536d8(0x18f)][_0x4536d8(0x1fc)],_0x11513e);}}async[_0x392f24(0x18a)](_0x58cb08){const _0x467d21=_0x392f24;var _0x12f2c1,_0xb2caca;const {text:_0x1a63d7,unitId:_0x3af5d9}=_0x58cb08,_0x4d8b83=(_0xb2caca=(_0x12f2c1=_0x1a63d7[_0x467d21(0x186)])==null?void 0x0:_0x12f2c1[_0x467d21(0x1f1)](_0x1320c6=>_0x1320c6[_0x467d21(0x1f4)]===c['CustomRangeType'][_0x467d21(0x183)])[_0x467d21(0x1dc)](_0x2bfdbf=>_0x2bfdbf['rangeId']))!=null?_0xb2caca:[],_0x3dcdce=JSON['stringify'](_0x1a63d7),_0x3ee114=_0x58cb08[_0x467d21(0x1d9)],_0xf3686d=_0x58cb08['id'],_0x46787c={'memberId':(await this[_0x467d21(0x195)]['requireSession'](_0x3af5d9))[_0x467d21(0x182)](),'unitId':_0x3af5d9,'threadId':_0x3ee114,'mention':_0x4d8b83,'content':_0x3dcdce,'replyId':_0xf3686d},_0xf05379=await this[_0x467d21(0x1d7)][_0x467d21(0x1e3)](_0x467d21(0x187)+_0x3af5d9+_0x467d21(0x1a7),{'body':_0x46787c});return!_0xf05379[_0x467d21(0x18f)][_0x467d21(0x1cf)]||_0xf05379['body'][_0x467d21(0x1cf)]['code']===0x1;}async[_0x392f24(0x199)](_0x5d7ecf){const _0x35297c=_0x392f24,{unitId:_0x1ba7de}=_0x5d7ecf,_0x3cb8a6=_0x5d7ecf[_0x35297c(0x1d9)],_0x2464ed={'memberId':this['_userService'][_0x35297c(0x1f6)]()[_0x35297c(0x180)],'unitId':_0x1ba7de,'threadId':_0x3cb8a6,'solved':_0x5d7ecf[_0x35297c(0x190)]?I['Solved']:I[_0x35297c(0x1d6)]},_0x365b02=await this[_0x35297c(0x1d7)][_0x35297c(0x1e3)](_0x35297c(0x187)+_0x1ba7de+_0x35297c(0x1d5),{'body':_0x2464ed});return!_0x365b02[_0x35297c(0x18f)][_0x35297c(0x1cf)]||_0x365b02[_0x35297c(0x18f)][_0x35297c(0x1cf)][_0x35297c(0x1be)]===0x1;}async[_0x392f24(0x1a0)](_0x76df1e,_0x4ac0ec,_0x561530,_0x196194){const _0x5ce17b=_0x392f24,_0x44ce87={'memberId':(await this[_0x5ce17b(0x195)][_0x5ce17b(0x1bb)](_0x76df1e))[_0x5ce17b(0x182)](),'threadId':_0x561530,'replyId':_0x196194,'unitId':_0x76df1e},_0x1cc899=await this[_0x5ce17b(0x1d7)][_0x5ce17b(0x1e3)](_0x5ce17b(0x187)+_0x76df1e+_0x5ce17b(0x1cb),{'body':_0x44ce87});return!_0x1cc899[_0x5ce17b(0x18f)][_0x5ce17b(0x1cf)]||_0x1cc899[_0x5ce17b(0x18f)][_0x5ce17b(0x1cf)][_0x5ce17b(0x1be)]===0x1;}async[_0x392f24(0x18e)](_0x351731,_0x5bd5d3,_0x2f5f05){const _0x164a50=_0x392f24,_0x3a417c={'unitId':_0x351731,'threadId':_0x2f5f05},_0x5d898c=await this[_0x164a50(0x1d7)][_0x164a50(0x1e3)](_0x164a50(0x187)+_0x351731+_0x164a50(0x1da),{'body':_0x3a417c}),_0x3300d4=_0x2f5f05[_0x164a50(0x1dc)](_0x58d03a=>G(_0x5d898c[_0x164a50(0x18f)]['comments'][_0x58d03a],_0x351731,_0x5bd5d3))[_0x164a50(0x1f1)](Boolean);return Object['values'](_0x5d898c[_0x164a50(0x18f)][_0x164a50(0x1b4)])[_0x164a50(0x198)](_0x411802=>{const _0x23bb0b=_0x164a50;this[_0x23bb0b(0x196)][_0x23bb0b(0x191)](_0x411802);}),_0x3300d4;}[_0x392f24(0x1ed)](_0x24a38d){const _0x57b4b0=_0x392f24;return{'id':_0x24a38d['id'],'threadId':_0x24a38d[_0x57b4b0(0x1d9)],'ref':_0x24a38d[_0x57b4b0(0x1b7)]};}};g=x([_(0x0,c['Inject'](P['HTTPService'])),_(0x1,c[_0x392f24(0x1a5)](c['UserManagerService'])),_(0x2,c[_0x392f24(0x1a5)](b['CollaborationSessionService'])),_(0x3,c[_0x392f24(0x1a5)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x30018f,_0x3249b6,_0x583fe2,_0x31473a)=>{const _0x4d15ba=_0x392f24;for(var _0x3eb0f9=_0x31473a>0x1?void 0x0:_0x31473a?H(_0x3249b6,_0x583fe2):_0x3249b6,_0x468aaf=_0x30018f[_0x4d15ba(0x185)]-0x1,_0x28b93d;_0x468aaf>=0x0;_0x468aaf--)(_0x28b93d=_0x30018f[_0x468aaf])&&(_0x3eb0f9=_0x28b93d(_0x3eb0f9)||_0x3eb0f9);return _0x3eb0f9;},y=(_0xa08322,_0x4d8cb7)=>(_0x1accc0,_0x11f284)=>_0x4d8cb7(_0x1accc0,_0x11f284,_0xa08322);let C=class extends c[_0x392f24(0x1d2)]{constructor(_0x1258ce,_0x2da5b8){const _0x45936c=_0x392f24;super(),this[_0x45936c(0x1f5)]=_0x1258ce,this['_threadCommentDataSource']=_0x2da5b8,this[_0x45936c(0x1f7)]();}[_0x392f24(0x1f7)](){const _0x1012b9=_0x392f24;this[_0x1012b9(0x1f5)]['dataSource']=this[_0x1012b9(0x19b)],this[_0x1012b9(0x1f5)][_0x1012b9(0x1e8)]=!0x1;}};C=J([y(0x0,M[_0x392f24(0x1d3)]),y(0x1,c[_0x392f24(0x1a5)](g))],C);var F=Object['defineProperty'],L=Object[_0x392f24(0x1e4)],Z=(_0x487dc2,_0x3da979,_0x172e84)=>_0x3da979 in _0x487dc2?F(_0x487dc2,_0x3da979,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x172e84}):_0x487dc2[_0x3da979]=_0x172e84,W=(_0x1644db,_0x2da080,_0x293e45,_0x3d52cc)=>{for(var _0x1ae039=_0x3d52cc>0x1?void 0x0:_0x3d52cc?L(_0x2da080,_0x293e45):_0x2da080,_0x1ef531=_0x1644db['length']-0x1,_0x22d3ab;_0x1ef531>=0x0;_0x1ef531--)(_0x22d3ab=_0x1644db[_0x1ef531])&&(_0x1ae039=_0x22d3ab(_0x1ae039)||_0x1ae039);return _0x1ae039;},O=(_0x2752a7,_0x5ded3f)=>(_0x1221d5,_0x198e78)=>_0x5ded3f(_0x1221d5,_0x198e78,_0x2752a7),N=(_0x36a289,_0x3f7352,_0x2eb427)=>Z(_0x36a289,typeof _0x3f7352!=_0x392f24(0x1ac)?_0x3f7352+'':_0x3f7352,_0x2eb427);exports[_0x392f24(0x1b9)]=class extends c[_0x392f24(0x197)]{constructor(_0x1931e9=D,_0x276ed1,_0x1ccd51){const _0x27b7b4=_0x392f24;super(),this[_0x27b7b4(0x1f8)]=_0x1931e9,this[_0x27b7b4(0x1e1)]=_0x276ed1,this['_configService']=_0x1ccd51;const {..._0x5f17b5}=c[_0x27b7b4(0x1bf)]({},D,this['_config']);this['_configService'][_0x27b7b4(0x1f0)](q,_0x5f17b5);}[_0x392f24(0x1e5)](){[[g],[C],[p]]['forEach'](_0x429814=>{const _0x3ae465=_0x4a1c;this[_0x3ae465(0x1e1)]['add'](_0x429814);});}[_0x392f24(0x1c2)](){const _0x2d9c89=_0x392f24;this[_0x2d9c89(0x1e1)][_0x2d9c89(0x1ad)](C),this[_0x2d9c89(0x1e1)][_0x2d9c89(0x1ad)](p);}},N(exports[_0x392f24(0x1b9)],_0x392f24(0x1ce),U),N(exports[_0x392f24(0x1b9)],_0x392f24(0x1d8),c[_0x392f24(0x1ec)][_0x392f24(0x1c7)]),exports[_0x392f24(0x1b9)]=W([c['DependentOn'](j[_0x392f24(0x19c)],b[_0x392f24(0x1c8)],T[_0x392f24(0x1ee)]),O(0x1,c['Inject'](c[_0x392f24(0x1eb)])),O(0x2,c['IConfigService'])],exports[_0x392f24(0x1b9)]);
1
+ 'use strict';const _0x329b33=_0x50d1;(function(_0x24dbd7,_0x2aca8a){const _0x2211a8=_0x50d1,_0x95258f=_0x24dbd7();while(!![]){try{const _0x98f874=parseInt(_0x2211a8(0x17c))/0x1*(-parseInt(_0x2211a8(0x1c5))/0x2)+parseInt(_0x2211a8(0x1ce))/0x3+-parseInt(_0x2211a8(0x1d7))/0x4*(-parseInt(_0x2211a8(0x1bf))/0x5)+parseInt(_0x2211a8(0x1ae))/0x6+parseInt(_0x2211a8(0x1b8))/0x7+-parseInt(_0x2211a8(0x1f4))/0x8*(-parseInt(_0x2211a8(0x1b2))/0x9)+-parseInt(_0x2211a8(0x1c6))/0xa;if(_0x98f874===_0x2aca8a)break;else _0x95258f['push'](_0x95258f['shift']());}catch(_0x2d1c40){_0x95258f['push'](_0x95258f['shift']());}}}(_0x32dc,0x8e636));Object[_0x329b33(0x1c0)](exports,Symbol[_0x329b33(0x1b4)],{'value':_0x329b33(0x188)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x329b33(0x189)),c=require(_0x329b33(0x1c3)),j=require(_0x329b33(0x195)),M=require(_0x329b33(0x1a8)),w=require('rxjs'),P=require('@univerjs/network'),U=_0x329b33(0x1cf);var I=(_0x471b98=>(_0x471b98[_0x471b98[_0x329b33(0x1ac)]=0x0]=_0x329b33(0x1ac),_0x471b98[_0x471b98[_0x329b33(0x1be)]=0x1]=_0x329b33(0x1be),_0x471b98[_0x471b98[_0x329b33(0x1e8)]=-0x1]=_0x329b33(0x1e8),_0x471b98))(I||{}),v=(_0x2659ca=>(_0x2659ca[_0x2659ca[_0x329b33(0x197)]=0x0]='Unknown',_0x2659ca[_0x2659ca[_0x329b33(0x191)]=0x1]='Add',_0x2659ca[_0x2659ca['Reply']=0x2]=_0x329b33(0x1e1),_0x2659ca[_0x2659ca[_0x329b33(0x1e4)]=0x3]=_0x329b33(0x1e4),_0x2659ca[_0x2659ca[_0x329b33(0x17a)]=0x4]=_0x329b33(0x17a),_0x2659ca[_0x2659ca[_0x329b33(0x187)]=0x5]='Solve',_0x2659ca[_0x2659ca['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2659ca))(v||{});const f=_0x52a3dc=>c[_0x329b33(0x1ec)](new Date(+_0x52a3dc))[_0x329b33(0x1d9)](_0x329b33(0x186)),R=async(_0x304f56,_0x2657d9)=>{const _0x152e9c=_0x329b33,_0x25dffb=_0x304f56['get'](c[_0x152e9c(0x18c)]),_0x50a175=_0x304f56['get'](P[_0x152e9c(0x1db)]);_0x2657d9[_0x152e9c(0x185)](_0x2d5ff2=>{const _0x1331e7=_0x152e9c;_0x25dffb['getUser'](_0x2d5ff2)&&_0x2657d9[_0x1331e7(0x18a)](_0x2d5ff2);}),_0x2657d9[_0x152e9c(0x19a)]&&(await _0x50a175[_0x152e9c(0x184)](_0x152e9c(0x1b1),{'params':{'userIDs':[..._0x2657d9]}}))['body']['users'][_0x152e9c(0x185)](_0x4eff69=>{_0x4eff69&&_0x25dffb['addUser'](_0x4eff69);});};var $=Object[_0x329b33(0x1dd)],E=(_0x183191,_0x1e17c5,_0x2f2217,_0x183fa6)=>{for(var _0xd8c375=_0x183fa6>0x1?void 0x0:_0x183fa6?$(_0x1e17c5,_0x2f2217):_0x1e17c5,_0x587bb3=_0x183191['length']-0x1,_0x174bfa;_0x587bb3>=0x0;_0x587bb3--)(_0x174bfa=_0x183191[_0x587bb3])&&(_0xd8c375=_0x174bfa(_0xd8c375)||_0xd8c375);return _0xd8c375;},S=(_0x2c60ee,_0x4e5540)=>(_0x5d8e3f,_0x39ae5c)=>_0x4e5540(_0x5d8e3f,_0x39ae5c,_0x2c60ee);let p=class extends c[_0x329b33(0x1c9)]{constructor(_0x4f2363,_0x150ebb,_0x1fb65c,_0x147a90){const _0x1a406f=_0x329b33;super(),this[_0x1a406f(0x196)]=_0x4f2363,this[_0x1a406f(0x1da)]=_0x150ebb,this['_userService']=_0x1fb65c,this[_0x1a406f(0x1c4)]=_0x147a90,this['_init'](),this[_0x1a406f(0x190)]();}[_0x329b33(0x190)](){const _0x579cfb=_0x329b33;this[_0x579cfb(0x1d0)](this[_0x579cfb(0x1da)][_0x579cfb(0x1e5)][_0x579cfb(0x193)](w['bufferTime'](0x10))[_0x579cfb(0x1f6)](_0xf126e9=>{const _0x4ebfdb=_0x579cfb,_0x16fe2e=new Set();_0xf126e9['forEach'](_0x324a14=>{const _0x49f2fc=_0x50d1;switch(_0x324a14[_0x49f2fc(0x1af)]){case _0x49f2fc(0x1f3):{const _0x573ab1=_0x324a14[_0x49f2fc(0x1ad)][_0x49f2fc(0x18b)];_0x16fe2e[_0x49f2fc(0x1f3)](_0x573ab1);break;}}}),R(this[_0x4ebfdb(0x1c4)],_0x16fe2e);}));}[_0x329b33(0x1ca)](){const _0x1d9980=_0x329b33;this[_0x1d9980(0x1d0)](this[_0x1d9980(0x196)][_0x1d9980(0x1e5)][_0x1d9980(0x1f6)](async _0x5050e3=>{const _0x1d17e3=_0x1d9980;var _0x5b40ff,_0x384a09,_0xa5d624,_0x53b2d2;const _0x2b1295=(_0x5b40ff=this[_0x1d17e3(0x1da)][_0x1d17e3(0x198)](_0x5050e3[_0x1d17e3(0x1d1)])[_0x1d17e3(0x1f5)](_0x461805=>_0x461805[_0x1d17e3(0x19e)]===_0x5050e3['threadId']))==null?void 0x0:_0x5b40ff[_0x1d17e3(0x19f)];if(!_0x2b1295)return;const {unitId:_0x300a33,subUnitId:_0x938e08}=_0x2b1295;switch(_0x5050e3['user']&&this[_0x1d17e3(0x1f7)][_0x1d17e3(0x1c7)](_0x5050e3['user']),_0x5050e3['type']){case v[_0x1d17e3(0x191)]:break;case v[_0x1d17e3(0x1e1)]:{this[_0x1d17e3(0x1da)][_0x1d17e3(0x1dc)](_0x300a33,_0x938e08,{'unitId':_0x300a33,'subUnitId':_0x938e08,'ref':'','id':_0x5050e3[_0x1d17e3(0x1a9)],'dT':f(+_0x5050e3['createTimestamp']),'threadId':_0x5050e3[_0x1d17e3(0x19e)],'personId':(_0xa5d624=(_0x384a09=_0x5050e3[_0x1d17e3(0x1ab)])==null?void 0x0:_0x384a09[_0x1d17e3(0x1d6)])!=null?_0xa5d624:_0x5050e3[_0x1d17e3(0x1b9)],'text':JSON[_0x1d17e3(0x1cc)](_0x5050e3['content']),'parentId':_0x2b1295['id']});break;}case v[_0x1d17e3(0x17a)]:{const _0x4f47d9=this[_0x1d17e3(0x1da)]['getComment'](_0x300a33,_0x938e08,_0x5050e3[_0x1d17e3(0x1a9)]);_0x4f47d9&&_0x4f47d9['parentId']&&this['_threadCommentModel'][_0x1d17e3(0x1d3)](_0x300a33,_0x938e08,_0x5050e3[_0x1d17e3(0x1a9)]);break;}case v['Edit']:{this[_0x1d17e3(0x1da)]['updateComment'](_0x300a33,_0x938e08,{'commentId':_0x5050e3[_0x1d17e3(0x1a9)],'text':JSON[_0x1d17e3(0x1cc)](_0x5050e3[_0x1d17e3(0x1b3)])});break;}case v[_0x1d17e3(0x187)]:{const _0x4e584e=(_0x53b2d2=this[_0x1d17e3(0x1da)][_0x1d17e3(0x198)](_0x5050e3['unitId'])[_0x1d17e3(0x1f5)](_0x384ffe=>_0x384ffe[_0x1d17e3(0x19e)]===_0x5050e3[_0x1d17e3(0x19e)]))==null?void 0x0:_0x53b2d2[_0x1d17e3(0x19f)];_0x4e584e&&this[_0x1d17e3(0x1da)]['resolveComment'](_0x300a33,_0x938e08,_0x4e584e['id'],_0x5050e3[_0x1d17e3(0x1aa)]===I[_0x1d17e3(0x1be)]);break;}}}));}};p=E([S(0x0,c[_0x329b33(0x1a0)](b['CommentService'])),S(0x1,c['Inject'](M[_0x329b33(0x1a4)])),S(0x2,c[_0x329b33(0x1a0)](c[_0x329b33(0x18c)])),S(0x3,c['Inject'](c[_0x329b33(0x1e3)]))],p);function _0x50d1(_0x2143e7,_0x3dba65){const _0x32dc7a=_0x32dc();return _0x50d1=function(_0x50d19f,_0x5ab7cb){_0x50d19f=_0x50d19f-0x17a;let _0x1a1856=_0x32dc7a[_0x50d19f];return _0x1a1856;},_0x50d1(_0x2143e7,_0x3dba65);}const q=_0x329b33(0x19c),D={};var A=Object[_0x329b33(0x1dd)],x=(_0x33c0a6,_0xeea431,_0x3c27a5,_0x476250)=>{const _0x1d5d14=_0x329b33;for(var _0x40bbff=_0x476250>0x1?void 0x0:_0x476250?A(_0xeea431,_0x3c27a5):_0xeea431,_0x150787=_0x33c0a6[_0x1d5d14(0x194)]-0x1,_0x31eb86;_0x150787>=0x0;_0x150787--)(_0x31eb86=_0x33c0a6[_0x150787])&&(_0x40bbff=_0x31eb86(_0x40bbff)||_0x40bbff);return _0x40bbff;},_=(_0x4daaf5,_0x5e2c9d)=>(_0x17eb70,_0x3a6315)=>_0x5e2c9d(_0x17eb70,_0x3a6315,_0x4daaf5);function Y(_0x1f06dd,_0x5983a3){const _0x59c6b8=_0x329b33,_0x2e5ff0=_0x1f06dd[_0x59c6b8(0x1de)][0x0];return{..._0x5983a3,'id':_0x2e5ff0[_0x59c6b8(0x1a9)],'resolved':_0x1f06dd[_0x59c6b8(0x1aa)]===0x1,'dT':f(_0x2e5ff0[_0x59c6b8(0x1d8)]),'personId':_0x2e5ff0[_0x59c6b8(0x1b9)],'threadId':_0x2e5ff0[_0x59c6b8(0x19e)]};}function G(_0x17db92,_0x4bda98,_0x5ef8fe){const _0x315f88=_0x329b33;var _0x11ffc1,_0x2661df;if(((_0x2661df=(_0x11ffc1=_0x17db92==null?void 0x0:_0x17db92[_0x315f88(0x1de)])==null?void 0x0:_0x11ffc1['length'])!=null?_0x2661df:0x0)>0x0){const _0x43bbbc=(_0xe75b05,_0x2affbb)=>({'id':_0xe75b05['replyId'],'threadId':_0xe75b05[_0x315f88(0x19e)],'dT':f(_0xe75b05[_0x315f88(0x1d8)]),'personId':_0xe75b05['userId'],'resolved':_0x17db92[_0x315f88(0x1aa)]===I[_0x315f88(0x1be)],'unitId':_0x4bda98,'subUnitId':_0x5ef8fe,'text':JSON[_0x315f88(0x1cc)](_0xe75b05[_0x315f88(0x1b3)]),'parentId':_0x2affbb}),_0x2e6f5d=_0x43bbbc(_0x17db92[_0x315f88(0x1de)][0x0]);return{..._0x2e6f5d,'children':_0x17db92['replies']['slice'](0x1)[_0x315f88(0x1a1)](_0x57d201=>_0x43bbbc(_0x57d201,_0x2e6f5d['id']))};}return null;}let g=class{constructor(_0x2701b7,_0x4463ba,_0x3f8bdb,_0x32d5d5){const _0x2463cc=_0x329b33;this[_0x2463cc(0x17f)]=_0x2701b7,this['_userService']=_0x4463ba,this[_0x2463cc(0x199)]=_0x3f8bdb,this[_0x2463cc(0x1c4)]=_0x32d5d5;}async[_0x329b33(0x1dc)](_0x265cdb){const _0x3c5602=_0x329b33;var _0x2542f4,_0x19273d;const {parentId:_0x3248e5,unitId:_0x9557b3,text:_0x1f2bdc,threadId:_0x4aec7f}=_0x265cdb,_0x1d5c1d=(_0x19273d=(_0x2542f4=_0x1f2bdc[_0x3c5602(0x1bb)])==null?void 0x0:_0x2542f4[_0x3c5602(0x1cd)](_0x4105ce=>_0x4105ce[_0x3c5602(0x1cb)]===c['CustomRangeType'][_0x3c5602(0x18e)])['map'](_0x2ac3eb=>_0x2ac3eb[_0x3c5602(0x1c8)]))!=null?_0x19273d:[],_0x5496d7=JSON[_0x3c5602(0x1b7)](_0x1f2bdc),_0x3b7d5d=(await this[_0x3c5602(0x199)][_0x3c5602(0x1d4)](_0x9557b3))['getMemberID']();if(_0x3248e5){const _0x22acc2={'memberId':_0x3b7d5d,'unitId':_0x9557b3,'content':_0x5496d7,'mention':_0x1d5c1d,'threadId':_0x4aec7f},_0x183aa2=(await this['_httpService']['post'](_0x3c5602(0x183)+_0x9557b3+_0x3c5602(0x1ef),{'body':_0x22acc2}))[_0x3c5602(0x1e6)][_0x3c5602(0x1d2)];return{..._0x265cdb,'id':_0x183aa2[_0x3c5602(0x1a9)],'dT':c[_0x3c5602(0x1ec)](+_0x183aa2[_0x3c5602(0x1d8)])[_0x3c5602(0x1d9)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x183aa2['userId']};}else{const _0x7d47f9={'memberId':_0x3b7d5d,'unitId':_0x9557b3,'content':_0x5496d7,'mention':_0x1d5c1d},_0x8f3a56=await this[_0x3c5602(0x17f)]['post'](_0x3c5602(0x183)+_0x9557b3+_0x3c5602(0x1a6),{'body':_0x7d47f9});return Y(_0x8f3a56[_0x3c5602(0x1e6)][_0x3c5602(0x17b)],_0x265cdb);}}async[_0x329b33(0x1f9)](_0x1f63ec){const _0x1b841b=_0x329b33;var _0x23e607,_0x3fc8fe;const {text:_0x5a22bb,unitId:_0x177532}=_0x1f63ec,_0xe8a0fe=(_0x3fc8fe=(_0x23e607=_0x5a22bb[_0x1b841b(0x1bb)])==null?void 0x0:_0x23e607[_0x1b841b(0x1cd)](_0x11fb73=>_0x11fb73[_0x1b841b(0x1cb)]===c['CustomRangeType'][_0x1b841b(0x18e)])['map'](_0x2f5ad9=>_0x2f5ad9['rangeId']))!=null?_0x3fc8fe:[],_0x25750a=JSON[_0x1b841b(0x1b7)](_0x5a22bb),_0x24b78e=_0x1f63ec[_0x1b841b(0x19e)],_0x39bae1=_0x1f63ec['id'],_0x5d711b={'memberId':(await this[_0x1b841b(0x199)][_0x1b841b(0x1d4)](_0x177532))['getMemberID'](),'unitId':_0x177532,'threadId':_0x24b78e,'mention':_0xe8a0fe,'content':_0x25750a,'replyId':_0x39bae1},_0x3f1e7f=await this['_httpService']['post'](_0x1b841b(0x183)+_0x177532+_0x1b841b(0x1a5),{'body':_0x5d711b});return!_0x3f1e7f[_0x1b841b(0x1e6)][_0x1b841b(0x18f)]||_0x3f1e7f[_0x1b841b(0x1e6)]['error']['code']===0x1;}async[_0x329b33(0x17e)](_0x4d2ff9){const _0x2f867f=_0x329b33,{unitId:_0x456fa5}=_0x4d2ff9,_0x1d51f1=_0x4d2ff9['threadId'],_0x38a844={'memberId':this[_0x2f867f(0x1f7)][_0x2f867f(0x1c2)]()[_0x2f867f(0x1d6)],'unitId':_0x456fa5,'threadId':_0x1d51f1,'solved':_0x4d2ff9[_0x2f867f(0x192)]?I['Solved']:I[_0x2f867f(0x1ac)]},_0x233dc3=await this[_0x2f867f(0x17f)][_0x2f867f(0x1a2)](_0x2f867f(0x183)+_0x456fa5+_0x2f867f(0x18d),{'body':_0x38a844});return!_0x233dc3[_0x2f867f(0x1e6)]['error']||_0x233dc3[_0x2f867f(0x1e6)][_0x2f867f(0x18f)]['code']===0x1;}async['deleteComment'](_0x4c7c30,_0x40df85,_0x39378f,_0x2a4222){const _0x3e31a0=_0x329b33,_0x4a8ecd={'memberId':(await this[_0x3e31a0(0x199)][_0x3e31a0(0x1d4)](_0x4c7c30))[_0x3e31a0(0x1e9)](),'threadId':_0x39378f,'replyId':_0x2a4222,'unitId':_0x4c7c30},_0x4433a8=await this[_0x3e31a0(0x17f)][_0x3e31a0(0x1a2)](_0x3e31a0(0x183)+_0x4c7c30+_0x3e31a0(0x1e2),{'body':_0x4a8ecd});return!_0x4433a8[_0x3e31a0(0x1e6)][_0x3e31a0(0x18f)]||_0x4433a8['body']['error'][_0x3e31a0(0x1ed)]===0x1;}async['listComments'](_0x7f51d4,_0x69ecdb,_0x3ceccd){const _0x3a2349=_0x329b33,_0x9ee1f3={'unitId':_0x7f51d4,'threadId':_0x3ceccd},_0x22a859=await this[_0x3a2349(0x17f)][_0x3a2349(0x1a2)](_0x3a2349(0x183)+_0x7f51d4+_0x3a2349(0x1c1),{'body':_0x9ee1f3}),_0x42ec0a=_0x3ceccd[_0x3a2349(0x1a1)](_0x1063b5=>G(_0x22a859['body'][_0x3a2349(0x1a3)][_0x1063b5],_0x7f51d4,_0x69ecdb))['filter'](Boolean);return Object[_0x3a2349(0x1f0)](_0x22a859[_0x3a2349(0x1e6)][_0x3a2349(0x1b5)])[_0x3a2349(0x185)](_0x261e88=>{const _0x49cb92=_0x3a2349;this[_0x49cb92(0x1f7)][_0x49cb92(0x1c7)](_0x261e88);}),_0x42ec0a;}[_0x329b33(0x1e7)](_0x52aa0e){const _0x14e56c=_0x329b33;return{'id':_0x52aa0e['id'],'threadId':_0x52aa0e[_0x14e56c(0x19e)],'ref':_0x52aa0e[_0x14e56c(0x1e0)]};}};g=x([_(0x0,c['Inject'](P[_0x329b33(0x1db)])),_(0x1,c[_0x329b33(0x1a0)](c['UserManagerService'])),_(0x2,c[_0x329b33(0x1a0)](b[_0x329b33(0x1ee)])),_(0x3,c[_0x329b33(0x1a0)](c[_0x329b33(0x1e3)]))],g);var H=Object[_0x329b33(0x1dd)],J=(_0x2b8fbc,_0x4491b4,_0x553d32,_0x36230c)=>{const _0x11b19d=_0x329b33;for(var _0x55b32c=_0x36230c>0x1?void 0x0:_0x36230c?H(_0x4491b4,_0x553d32):_0x4491b4,_0x2e8a44=_0x2b8fbc[_0x11b19d(0x194)]-0x1,_0x5162f6;_0x2e8a44>=0x0;_0x2e8a44--)(_0x5162f6=_0x2b8fbc[_0x2e8a44])&&(_0x55b32c=_0x5162f6(_0x55b32c)||_0x55b32c);return _0x55b32c;},y=(_0x25dabc,_0x17adda)=>(_0x1ed2ec,_0x512ec2)=>_0x17adda(_0x1ed2ec,_0x512ec2,_0x25dabc);function _0x32dc(){const _0xcc2ef=['Module','@univerjs-pro/license','delete','personId','UserManagerService','/solved','COMMENT','error','_initUserSync','Add','resolved','pipe','length','@univerjs/thread-comment-ui','_commentService','Unknown','getUnit','_sessionService','size','_config','thread-comment-data-source.config','symbol','threadId','root','Inject','map','post','comments','ThreadCommentModel','/edit','/add','UniverLicensePlugin','@univerjs/thread-comment','replyId','solved','user','OpenOrReOpen','payload','6966696mwIhRZ','type','UniverThreadCommentUIPlugin','/universer-api/user/list','19503UwAebv','content','toStringTag','users','_threadCommentDataSource','stringify','7024759jKFMlD','userId','UNIVER_UNKNOWN','customRanges','IConfigService','UniverThreadCommentDataSourcePlugin','Solved','25brPgLx','defineProperty','/list','getCurrentUser','@univerjs/core','_injector','23390IKXIJR','21456030Upwztx','addUser','rangeId','Disposable','_init','rangeType','parse','filter','397929UariAW','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','disposeWithMe','unitId','reply','deleteComment','requireSession','dataSource','userID','288788hOKvxA','createTimestamp','format','_threadCommentModel','HTTPService','addComment','getOwnPropertyDescriptor','replies','DependentOn','ref','Reply','/delete','Injector','Edit','commentUpdate$','body','saveCommentToSnapshot','UNRECOGNIZED','getMemberID','onStarting','merge','dayjs','code','CollaborationSessionService','/reply','values','IThreadCommentDataSourceService','_initDataSource','add','2376KmHzCP','find','subscribe','_userService','syncUpdateMutationToColla','updateComment','Delete','comment','49edRySL','_threadCommentDataSourceService','resolveComment','_httpService','Plugin','UniverCollaborationClientPlugin','UniverInstanceType','/universer-api/comment/unit/','get','forEach','YYYY/MM/DD\x20HH:mm','Solve'];_0x32dc=function(){return _0xcc2ef;};return _0x32dc();}let C=class extends c[_0x329b33(0x1c9)]{constructor(_0x5906f6,_0x324dca){const _0x5cbc00=_0x329b33;super(),this[_0x5cbc00(0x17d)]=_0x5906f6,this[_0x5cbc00(0x1b6)]=_0x324dca,this[_0x5cbc00(0x1f2)]();}[_0x329b33(0x1f2)](){const _0x41a127=_0x329b33;this[_0x41a127(0x17d)][_0x41a127(0x1d5)]=this[_0x41a127(0x1b6)],this[_0x41a127(0x17d)][_0x41a127(0x1f8)]=!0x1;}};C=J([y(0x0,M[_0x329b33(0x1f1)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x329b33(0x1c0)],L=Object[_0x329b33(0x1dd)],Z=(_0x4f48cf,_0x26afc0,_0x4a7ba4)=>_0x26afc0 in _0x4f48cf?F(_0x4f48cf,_0x26afc0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4a7ba4}):_0x4f48cf[_0x26afc0]=_0x4a7ba4,W=(_0xd79a65,_0x1a98f8,_0x1393ae,_0x145912)=>{const _0x3dac63=_0x329b33;for(var _0x27c704=_0x145912>0x1?void 0x0:_0x145912?L(_0x1a98f8,_0x1393ae):_0x1a98f8,_0x15cf4f=_0xd79a65[_0x3dac63(0x194)]-0x1,_0x3ea9a3;_0x15cf4f>=0x0;_0x15cf4f--)(_0x3ea9a3=_0xd79a65[_0x15cf4f])&&(_0x27c704=_0x3ea9a3(_0x27c704)||_0x27c704);return _0x27c704;},O=(_0x4151cb,_0x5cf87a)=>(_0xc1b280,_0x3a9a3b)=>_0x5cf87a(_0xc1b280,_0x3a9a3b,_0x4151cb),N=(_0x4774a5,_0x2a82ca,_0xf2cc4e)=>Z(_0x4774a5,typeof _0x2a82ca!=_0x329b33(0x19d)?_0x2a82ca+'':_0x2a82ca,_0xf2cc4e);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x329b33(0x180)]{constructor(_0x1736f4=D,_0xee7d29,_0x44d433){const _0x2f4e47=_0x329b33;super(),this[_0x2f4e47(0x19b)]=_0x1736f4,this[_0x2f4e47(0x1c4)]=_0xee7d29,this['_configService']=_0x44d433;const {..._0xa3d30b}=c[_0x2f4e47(0x1eb)]({},D,this[_0x2f4e47(0x19b)]);this['_configService']['setConfig'](q,_0xa3d30b);}[_0x329b33(0x1ea)](){const _0x2a4fc4=_0x329b33;[[g],[C],[p]][_0x2a4fc4(0x185)](_0x20e9ec=>{const _0x534933=_0x2a4fc4;this[_0x534933(0x1c4)][_0x534933(0x1f3)](_0x20e9ec);});}['onReady'](){const _0x5cfcf4=_0x329b33;this[_0x5cfcf4(0x1c4)][_0x5cfcf4(0x184)](C),this[_0x5cfcf4(0x1c4)]['get'](p);}},N(exports[_0x329b33(0x1bd)],'pluginName',U),N(exports[_0x329b33(0x1bd)],_0x329b33(0x1af),c[_0x329b33(0x182)][_0x329b33(0x1ba)]),exports[_0x329b33(0x1bd)]=W([c[_0x329b33(0x1df)](j[_0x329b33(0x1b0)],b[_0x329b33(0x181)],T[_0x329b33(0x1a7)]),O(0x1,c[_0x329b33(0x1a0)](c[_0x329b33(0x1e3)])),O(0x2,c[_0x329b33(0x1bc)])],exports[_0x329b33(0x1bd)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3f46f4=_0x43ef;(function(_0x257461,_0x23c47c){const _0x3621c8=_0x43ef,_0x42c4fd=_0x257461();while(!![]){try{const _0x29961c=-parseInt(_0x3621c8(0xc2))/0x1*(parseInt(_0x3621c8(0xf8))/0x2)+parseInt(_0x3621c8(0xb3))/0x3+-parseInt(_0x3621c8(0xb5))/0x4*(-parseInt(_0x3621c8(0xae))/0x5)+parseInt(_0x3621c8(0xd4))/0x6*(-parseInt(_0x3621c8(0xe3))/0x7)+parseInt(_0x3621c8(0xbf))/0x8+-parseInt(_0x3621c8(0xc7))/0x9+parseInt(_0x3621c8(0xe7))/0xa*(parseInt(_0x3621c8(0xb0))/0xb);if(_0x29961c===_0x23c47c)break;else _0x42c4fd['push'](_0x42c4fd['shift']());}catch(_0x433d00){_0x42c4fd['push'](_0x42c4fd['shift']());}}}(_0xf5b1,0x87ded));import{CommentService as _0x11e170,CollaborationSessionService as _0x4cd38e,UniverCollaborationClientPlugin as _0xf421b9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x22ada7}from'@univerjs-pro/license';import{dayjs as _0x545eb3,UserManagerService as _0x5dff7a,Inject as _0x1e3f8f,Injector as _0x2f3235,Disposable as _0x161b8f,CustomRangeType as _0x396d46,UniverInstanceType as _0xe0e43a,DependentOn as _0x21b12e,IConfigService as _0x293df4,Plugin as _0x3fdb49,merge as _0xff6135}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x196607}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x32b180,IThreadCommentDataSourceService as _0x26e588}from'@univerjs/thread-comment';import{bufferTime as _0x517f82}from'rxjs';import{HTTPService as _0x267ec3}from'@univerjs/network';const W=_0x3f46f4(0xde);var I=(_0x50494d=>(_0x50494d[_0x50494d[_0x3f46f4(0xd0)]=0x0]='OpenOrReOpen',_0x50494d[_0x50494d[_0x3f46f4(0xd5)]=0x1]=_0x3f46f4(0xd5),_0x50494d[_0x50494d[_0x3f46f4(0x9e)]=-0x1]=_0x3f46f4(0x9e),_0x50494d))(I||{}),v=(_0x47cbf9=>(_0x47cbf9[_0x47cbf9[_0x3f46f4(0xbc)]=0x0]=_0x3f46f4(0xbc),_0x47cbf9[_0x47cbf9[_0x3f46f4(0xdd)]=0x1]=_0x3f46f4(0xdd),_0x47cbf9[_0x47cbf9['Reply']=0x2]=_0x3f46f4(0xf3),_0x47cbf9[_0x47cbf9[_0x3f46f4(0xc8)]=0x3]='Edit',_0x47cbf9[_0x47cbf9[_0x3f46f4(0xf6)]=0x4]=_0x3f46f4(0xf6),_0x47cbf9[_0x47cbf9['Solve']=0x5]=_0x3f46f4(0xc5),_0x47cbf9[_0x47cbf9['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x47cbf9))(v||{});const D=_0x443cbb=>_0x545eb3(new Date(+_0x443cbb))[_0x3f46f4(0x9c)](_0x3f46f4(0xf2)),B=async(_0x33143a,_0x2124cd)=>{const _0x1bc886=_0x3f46f4,_0x91bcc4=_0x33143a[_0x1bc886(0xb6)](_0x5dff7a),_0x18a19e=_0x33143a[_0x1bc886(0xb6)](_0x267ec3);_0x2124cd[_0x1bc886(0xfa)](_0x271c29=>{const _0x338be5=_0x1bc886;_0x91bcc4[_0x338be5(0xe8)](_0x271c29)&&_0x2124cd['delete'](_0x271c29);}),_0x2124cd[_0x1bc886(0xbb)]&&(await _0x18a19e[_0x1bc886(0xb6)](_0x1bc886(0xf4),{'params':{'userIDs':[..._0x2124cd]}}))['body']['users'][_0x1bc886(0xfa)](_0x40dcb5=>{const _0x4f48e0=_0x1bc886;_0x40dcb5&&_0x91bcc4[_0x4f48e0(0xef)](_0x40dcb5);});};var K=Object[_0x3f46f4(0xfc)],V=(_0x4e7606,_0x2e769e,_0x1b9f38,_0x54e2bc)=>{const _0x3240ad=_0x3f46f4;for(var _0x1edb70=_0x54e2bc>0x1?void 0x0:_0x54e2bc?K(_0x2e769e,_0x1b9f38):_0x2e769e,_0x54247d=_0x4e7606[_0x3240ad(0xdc)]-0x1,_0x3507ef;_0x54247d>=0x0;_0x54247d--)(_0x3507ef=_0x4e7606[_0x54247d])&&(_0x1edb70=_0x3507ef(_0x1edb70)||_0x1edb70);return _0x1edb70;},p=(_0xcbfd65,_0x1cafac)=>(_0x1f0a38,_0x27a032)=>_0x1cafac(_0x1f0a38,_0x27a032,_0xcbfd65);function _0x43ef(_0x5446a7,_0x20a84d){const _0xf5b1d1=_0xf5b1();return _0x43ef=function(_0x43ef8b,_0x2230f8){_0x43ef8b=_0x43ef8b-0x9b;let _0x30d8f7=_0xf5b1d1[_0x43ef8b];return _0x30d8f7;},_0x43ef(_0x5446a7,_0x20a84d);}let S=class extends _0x161b8f{constructor(_0x1a409b,_0x35c7b1,_0xac4fb,_0x163dd9){const _0x50a314=_0x3f46f4;super(),this['_commentService']=_0x1a409b,this[_0x50a314(0xfb)]=_0x35c7b1,this['_userService']=_0xac4fb,this[_0x50a314(0xf1)]=_0x163dd9,this[_0x50a314(0xac)](),this[_0x50a314(0xba)]();}[_0x3f46f4(0xba)](){const _0x2f56ca=_0x3f46f4;this[_0x2f56ca(0xaa)](this['_threadCommentModel'][_0x2f56ca(0xa7)][_0x2f56ca(0xaf)](_0x517f82(0x10))[_0x2f56ca(0xa4)](_0x6a4799=>{const _0x42a5c6=_0x2f56ca,_0x2dbccd=new Set();_0x6a4799[_0x42a5c6(0xfa)](_0x137d50=>{const _0x24ac14=_0x42a5c6;switch(_0x137d50[_0x24ac14(0xbd)]){case _0x24ac14(0xad):{const _0x50461a=_0x137d50[_0x24ac14(0xed)][_0x24ac14(0xc0)];_0x2dbccd[_0x24ac14(0xad)](_0x50461a);break;}}}),B(this[_0x42a5c6(0xf1)],_0x2dbccd);}));}[_0x3f46f4(0xac)](){const _0x1a28dc=_0x3f46f4;this[_0x1a28dc(0xaa)](this['_commentService'][_0x1a28dc(0xa7)]['subscribe'](async _0x181b23=>{const _0x1fabec=_0x1a28dc;var _0x322bcb,_0x11624f,_0x3daffe,_0x28bc77;const _0x42a56b=(_0x322bcb=this[_0x1fabec(0xfb)]['getUnit'](_0x181b23[_0x1fabec(0xea)])['find'](_0x1c1967=>_0x1c1967[_0x1fabec(0xb8)]===_0x181b23['threadId']))==null?void 0x0:_0x322bcb[_0x1fabec(0xc1)];if(!_0x42a56b)return;const {unitId:_0x38d1a8,subUnitId:_0x3e7f2e}=_0x42a56b;switch(_0x181b23[_0x1fabec(0xfe)]&&this[_0x1fabec(0xc6)][_0x1fabec(0xef)](_0x181b23[_0x1fabec(0xfe)]),_0x181b23[_0x1fabec(0xbd)]){case v[_0x1fabec(0xdd)]:break;case v[_0x1fabec(0xf3)]:{this[_0x1fabec(0xfb)][_0x1fabec(0xdb)](_0x38d1a8,_0x3e7f2e,{'unitId':_0x38d1a8,'subUnitId':_0x3e7f2e,'ref':'','id':_0x181b23[_0x1fabec(0xc4)],'dT':D(+_0x181b23['createTimestamp']),'threadId':_0x181b23[_0x1fabec(0xb8)],'personId':(_0x3daffe=(_0x11624f=_0x181b23[_0x1fabec(0xfe)])==null?void 0x0:_0x11624f[_0x1fabec(0xdf)])!=null?_0x3daffe:_0x181b23[_0x1fabec(0xcf)],'text':JSON[_0x1fabec(0xce)](_0x181b23[_0x1fabec(0xd3)]),'parentId':_0x42a56b['id']});break;}case v[_0x1fabec(0xf6)]:{const _0x4d2c00=this[_0x1fabec(0xfb)]['getComment'](_0x38d1a8,_0x3e7f2e,_0x181b23[_0x1fabec(0xc4)]);_0x4d2c00&&_0x4d2c00[_0x1fabec(0xc3)]&&this['_threadCommentModel']['deleteComment'](_0x38d1a8,_0x3e7f2e,_0x181b23[_0x1fabec(0xc4)]);break;}case v[_0x1fabec(0xc8)]:{this[_0x1fabec(0xfb)]['updateComment'](_0x38d1a8,_0x3e7f2e,{'commentId':_0x181b23[_0x1fabec(0xc4)],'text':JSON[_0x1fabec(0xce)](_0x181b23[_0x1fabec(0xd3)])});break;}case v['Solve']:{const _0x58b5a9=(_0x28bc77=this[_0x1fabec(0xfb)][_0x1fabec(0xb7)](_0x181b23[_0x1fabec(0xea)])['find'](_0x14cf37=>_0x14cf37[_0x1fabec(0xb8)]===_0x181b23[_0x1fabec(0xb8)]))==null?void 0x0:_0x28bc77['root'];_0x58b5a9&&this['_threadCommentModel']['resolveComment'](_0x38d1a8,_0x3e7f2e,_0x58b5a9['id'],_0x181b23[_0x1fabec(0x9d)]===I[_0x1fabec(0xd5)]);break;}}}));}};S=V([p(0x0,_0x1e3f8f(_0x11e170)),p(0x1,_0x1e3f8f(_0x32b180)),p(0x2,_0x1e3f8f(_0x5dff7a)),p(0x3,_0x1e3f8f(_0x2f3235))],S);const z=_0x3f46f4(0xb9),M={};var k=Object[_0x3f46f4(0xfc)],Q=(_0x3e1f0e,_0x5d99ce,_0x38890e,_0x242978)=>{const _0x20216b=_0x3f46f4;for(var _0x156b53=_0x242978>0x1?void 0x0:_0x242978?k(_0x5d99ce,_0x38890e):_0x5d99ce,_0x2ffe4a=_0x3e1f0e[_0x20216b(0xdc)]-0x1,_0x8b8a3b;_0x2ffe4a>=0x0;_0x2ffe4a--)(_0x8b8a3b=_0x3e1f0e[_0x2ffe4a])&&(_0x156b53=_0x8b8a3b(_0x156b53)||_0x156b53);return _0x156b53;},_=(_0x5c8104,_0xd928ed)=>(_0xe4a2a4,_0x20ce7b)=>_0xd928ed(_0xe4a2a4,_0x20ce7b,_0x5c8104);function X(_0x1918c,_0x4b8e1b){const _0x14979a=_0x3f46f4,_0x322908=_0x1918c['replies'][0x0];return{..._0x4b8e1b,'id':_0x322908[_0x14979a(0xc4)],'resolved':_0x1918c['solved']===0x1,'dT':D(_0x322908[_0x14979a(0xf9)]),'personId':_0x322908[_0x14979a(0xcf)],'threadId':_0x322908[_0x14979a(0xb8)]};}function ee(_0x29e162,_0x58d0e4,_0x58a3d4){const _0x259496=_0x3f46f4;var _0x4261aa,_0x313eb0;if(((_0x313eb0=(_0x4261aa=_0x29e162==null?void 0x0:_0x29e162['replies'])==null?void 0x0:_0x4261aa[_0x259496(0xdc)])!=null?_0x313eb0:0x0)>0x0){const _0x4c1165=(_0x45dc74,_0x343170)=>({'id':_0x45dc74[_0x259496(0xc4)],'threadId':_0x45dc74['threadId'],'dT':D(_0x45dc74['createTimestamp']),'personId':_0x45dc74['userId'],'resolved':_0x29e162[_0x259496(0x9d)]===I[_0x259496(0xd5)],'unitId':_0x58d0e4,'subUnitId':_0x58a3d4,'text':JSON[_0x259496(0xce)](_0x45dc74[_0x259496(0xd3)]),'parentId':_0x343170}),_0x31a9a7=_0x4c1165(_0x29e162[_0x259496(0xec)][0x0]);return{..._0x31a9a7,'children':_0x29e162['replies'][_0x259496(0xa8)](0x1)[_0x259496(0xeb)](_0x572877=>_0x4c1165(_0x572877,_0x31a9a7['id']))};}return null;}function _0xf5b1(){const _0x2d3517=['/edit','unitId','map','replies','payload','_threadCommentDataSource','addUser','/reply','_injector','YYYY/MM/DD\x20HH:mm','Reply','/universer-api/user/list','_configService','Delete','resolveComment','199022MlYQZz','createTimestamp','forEach','_threadCommentModel','getOwnPropertyDescriptor','users','user','code','format','solved','UNRECOGNIZED','/add','comments','COMMENT','/universer-api/comment/unit/','/solved','subscribe','syncUpdateMutationToColla','setConfig','commentUpdate$','slice','_threadCommentDataSourceService','disposeWithMe','getMemberID','_init','add','604085GBTZEi','pipe','16346RtQwHT','updateComment','resolved','474552ClnPOZ','symbol','4DojKee','get','getUnit','threadId','thread-comment-data-source.config','_initUserSync','size','Unknown','type','_initDataSource','6475536VQAIbW','personId','root','1yNvFPc','parentId','replyId','Solve','_userService','1587708rcJdvb','Edit','_sessionService','requireSession','/delete','reply','_config','parse','userId','OpenOrReOpen','pluginName','rangeId','content','430218jdWDoJ','Solved','stringify','filter','values','error','defineProperty','addComment','length','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userID','body','post','comment','63njSkDS','dataSource','_httpService','rangeType','2620slUuJq','getUser'];_0xf5b1=function(){return _0x2d3517;};return _0xf5b1();}let f=class{constructor(_0x1cddcf,_0x5ac749,_0x3c58d2,_0x444356){const _0x1a6c70=_0x3f46f4;this['_httpService']=_0x1cddcf,this[_0x1a6c70(0xc6)]=_0x5ac749,this[_0x1a6c70(0xc9)]=_0x3c58d2,this[_0x1a6c70(0xf1)]=_0x444356;}async['addComment'](_0x4eda24){const _0x366a83=_0x3f46f4;var _0x400dc7,_0x2608f1;const {parentId:_0x548c31,unitId:_0x37733d,text:_0x266740,threadId:_0x10d27e}=_0x4eda24,_0x4f2370=(_0x2608f1=(_0x400dc7=_0x266740['customRanges'])==null?void 0x0:_0x400dc7[_0x366a83(0xd7)](_0x4aee06=>_0x4aee06[_0x366a83(0xe6)]===_0x396d46['COMMENT'])[_0x366a83(0xeb)](_0x269f59=>_0x269f59[_0x366a83(0xd2)]))!=null?_0x2608f1:[],_0x194f37=JSON['stringify'](_0x266740),_0x5b4e7c=(await this[_0x366a83(0xc9)][_0x366a83(0xca)](_0x37733d))[_0x366a83(0xab)]();if(_0x548c31){const _0x35bd37={'memberId':_0x5b4e7c,'unitId':_0x37733d,'content':_0x194f37,'mention':_0x4f2370,'threadId':_0x10d27e},_0x539197=(await this[_0x366a83(0xe5)]['post']('/universer-api/comment/unit/'+_0x37733d+_0x366a83(0xf0),{'body':_0x35bd37}))['body'][_0x366a83(0xcc)];return{..._0x4eda24,'id':_0x539197[_0x366a83(0xc4)],'dT':_0x545eb3(+_0x539197[_0x366a83(0xf9)])[_0x366a83(0x9c)](_0x366a83(0xf2)),'personId':_0x539197[_0x366a83(0xcf)]};}else{const _0x44e77a={'memberId':_0x5b4e7c,'unitId':_0x37733d,'content':_0x194f37,'mention':_0x4f2370},_0x49d4ae=await this[_0x366a83(0xe5)][_0x366a83(0xe1)](_0x366a83(0xa2)+_0x37733d+_0x366a83(0x9f),{'body':_0x44e77a});return X(_0x49d4ae[_0x366a83(0xe0)][_0x366a83(0xe2)],_0x4eda24);}}async[_0x3f46f4(0xb1)](_0x4aaa17){const _0x991ab9=_0x3f46f4;var _0x467278,_0x10c58d;const {text:_0x291750,unitId:_0x4ae034}=_0x4aaa17,_0x2b3a74=(_0x10c58d=(_0x467278=_0x291750['customRanges'])==null?void 0x0:_0x467278[_0x991ab9(0xd7)](_0x4f0c91=>_0x4f0c91['rangeType']===_0x396d46[_0x991ab9(0xa1)])['map'](_0x362cfa=>_0x362cfa['rangeId']))!=null?_0x10c58d:[],_0x397aa1=JSON[_0x991ab9(0xd6)](_0x291750),_0x27b4e4=_0x4aaa17[_0x991ab9(0xb8)],_0x5b8fd5=_0x4aaa17['id'],_0x205ef0={'memberId':(await this[_0x991ab9(0xc9)][_0x991ab9(0xca)](_0x4ae034))[_0x991ab9(0xab)](),'unitId':_0x4ae034,'threadId':_0x27b4e4,'mention':_0x2b3a74,'content':_0x397aa1,'replyId':_0x5b8fd5},_0x2a6977=await this[_0x991ab9(0xe5)]['post'](_0x991ab9(0xa2)+_0x4ae034+_0x991ab9(0xe9),{'body':_0x205ef0});return!_0x2a6977[_0x991ab9(0xe0)][_0x991ab9(0xd9)]||_0x2a6977[_0x991ab9(0xe0)][_0x991ab9(0xd9)][_0x991ab9(0x9b)]===0x1;}async[_0x3f46f4(0xf7)](_0x37b948){const _0x4f5a6b=_0x3f46f4,{unitId:_0x1aabbe}=_0x37b948,_0x15205a=_0x37b948[_0x4f5a6b(0xb8)],_0x3d569a={'memberId':this[_0x4f5a6b(0xc6)]['getCurrentUser']()[_0x4f5a6b(0xdf)],'unitId':_0x1aabbe,'threadId':_0x15205a,'solved':_0x37b948[_0x4f5a6b(0xb2)]?I[_0x4f5a6b(0xd5)]:I[_0x4f5a6b(0xd0)]},_0x20c6bc=await this['_httpService'][_0x4f5a6b(0xe1)](_0x4f5a6b(0xa2)+_0x1aabbe+_0x4f5a6b(0xa3),{'body':_0x3d569a});return!_0x20c6bc[_0x4f5a6b(0xe0)][_0x4f5a6b(0xd9)]||_0x20c6bc[_0x4f5a6b(0xe0)][_0x4f5a6b(0xd9)][_0x4f5a6b(0x9b)]===0x1;}async['deleteComment'](_0x4f5ad4,_0x5062bc,_0x310e1d,_0x4b3ab2){const _0x4a19f0=_0x3f46f4,_0x3f91a8={'memberId':(await this[_0x4a19f0(0xc9)][_0x4a19f0(0xca)](_0x4f5ad4))[_0x4a19f0(0xab)](),'threadId':_0x310e1d,'replyId':_0x4b3ab2,'unitId':_0x4f5ad4},_0x44e7e0=await this['_httpService']['post'](_0x4a19f0(0xa2)+_0x4f5ad4+_0x4a19f0(0xcb),{'body':_0x3f91a8});return!_0x44e7e0['body']['error']||_0x44e7e0[_0x4a19f0(0xe0)][_0x4a19f0(0xd9)]['code']===0x1;}async['listComments'](_0x2a9555,_0x7f1c78,_0x551c74){const _0x48f84f=_0x3f46f4,_0x326454={'unitId':_0x2a9555,'threadId':_0x551c74},_0x7ee0dc=await this[_0x48f84f(0xe5)]['post']('/universer-api/comment/unit/'+_0x2a9555+'/list',{'body':_0x326454}),_0x497d27=_0x551c74[_0x48f84f(0xeb)](_0x4f52fe=>ee(_0x7ee0dc['body'][_0x48f84f(0xa0)][_0x4f52fe],_0x2a9555,_0x7f1c78))[_0x48f84f(0xd7)](Boolean);return Object[_0x48f84f(0xd8)](_0x7ee0dc['body'][_0x48f84f(0xfd)])[_0x48f84f(0xfa)](_0xd5c1ec=>{const _0x4eb5c9=_0x48f84f;this[_0x4eb5c9(0xc6)]['addUser'](_0xd5c1ec);}),_0x497d27;}['saveCommentToSnapshot'](_0x25b46d){const _0x5660e0=_0x3f46f4;return{'id':_0x25b46d['id'],'threadId':_0x25b46d[_0x5660e0(0xb8)],'ref':_0x25b46d['ref']};}};f=Q([_(0x0,_0x1e3f8f(_0x267ec3)),_(0x1,_0x1e3f8f(_0x5dff7a)),_(0x2,_0x1e3f8f(_0x4cd38e)),_(0x3,_0x1e3f8f(_0x2f3235))],f);var re=Object[_0x3f46f4(0xfc)],te=(_0x422a50,_0x204a4c,_0x3eb1f,_0x4f5c24)=>{const _0x241e3f=_0x3f46f4;for(var _0x20ea41=_0x4f5c24>0x1?void 0x0:_0x4f5c24?re(_0x204a4c,_0x3eb1f):_0x204a4c,_0x52868e=_0x422a50[_0x241e3f(0xdc)]-0x1,_0x309664;_0x52868e>=0x0;_0x52868e--)(_0x309664=_0x422a50[_0x52868e])&&(_0x20ea41=_0x309664(_0x20ea41)||_0x20ea41);return _0x20ea41;},N=(_0x21da7b,_0x43e304)=>(_0x52d743,_0xbdc6bb)=>_0x43e304(_0x52d743,_0xbdc6bb,_0x21da7b);let g=class extends _0x161b8f{constructor(_0x10504f,_0x30017c){const _0x2ae5be=_0x3f46f4;super(),this['_threadCommentDataSourceService']=_0x10504f,this[_0x2ae5be(0xee)]=_0x30017c,this[_0x2ae5be(0xbe)]();}['_initDataSource'](){const _0x10899a=_0x3f46f4;this['_threadCommentDataSourceService'][_0x10899a(0xe4)]=this[_0x10899a(0xee)],this[_0x10899a(0xa9)][_0x10899a(0xa5)]=!0x1;}};g=te([N(0x0,_0x26e588),N(0x1,_0x1e3f8f(f))],g);var se=Object[_0x3f46f4(0xda)],oe=Object[_0x3f46f4(0xfc)],ne=(_0x239c9c,_0x4483d7,_0x3efb5a)=>_0x4483d7 in _0x239c9c?se(_0x239c9c,_0x4483d7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3efb5a}):_0x239c9c[_0x4483d7]=_0x3efb5a,ie=(_0x5cf66c,_0x26b4d5,_0x11bccb,_0x538de6)=>{const _0xb7f3b0=_0x3f46f4;for(var _0x3038e3=_0x538de6>0x1?void 0x0:_0x538de6?oe(_0x26b4d5,_0x11bccb):_0x26b4d5,_0x41732e=_0x5cf66c[_0xb7f3b0(0xdc)]-0x1,_0x371806;_0x41732e>=0x0;_0x41732e--)(_0x371806=_0x5cf66c[_0x41732e])&&(_0x3038e3=_0x371806(_0x3038e3)||_0x3038e3);return _0x3038e3;},w=(_0x22ed5d,_0x5a5f7f)=>(_0x42bf15,_0x54a908)=>_0x5a5f7f(_0x42bf15,_0x54a908,_0x22ed5d),$=(_0xc71f46,_0x5183e8,_0x353f70)=>ne(_0xc71f46,typeof _0x5183e8!=_0x3f46f4(0xb4)?_0x5183e8+'':_0x5183e8,_0x353f70);let b=class extends _0x3fdb49{constructor(_0x5b1110=M,_0x27fd76,_0x4b0c38){const _0x1889cc=_0x3f46f4;super(),this['_config']=_0x5b1110,this[_0x1889cc(0xf1)]=_0x27fd76,this[_0x1889cc(0xf5)]=_0x4b0c38;const {..._0x388edc}=_0xff6135({},M,this[_0x1889cc(0xcd)]);this[_0x1889cc(0xf5)][_0x1889cc(0xa6)](z,_0x388edc);}['onStarting'](){const _0x427cc9=_0x3f46f4;[[f],[g],[S]][_0x427cc9(0xfa)](_0x1df5b2=>{const _0x351be2=_0x427cc9;this[_0x351be2(0xf1)][_0x351be2(0xad)](_0x1df5b2);});}['onReady'](){const _0x528871=_0x3f46f4;this[_0x528871(0xf1)]['get'](g),this['_injector']['get'](S);}};$(b,_0x3f46f4(0xd1),W),$(b,'type',_0xe0e43a['UNIVER_UNKNOWN']),b=ie([_0x21b12e(_0x196607,_0xf421b9,_0x22ada7),w(0x1,_0x1e3f8f(_0x2f3235)),w(0x2,_0x293df4)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x44a406=_0x57ec;(function(_0x52f56a,_0x35c68d){const _0x1aedd0=_0x57ec,_0x1e3a74=_0x52f56a();while(!![]){try{const _0x431955=parseInt(_0x1aedd0(0x7f))/0x1+parseInt(_0x1aedd0(0xc9))/0x2+-parseInt(_0x1aedd0(0x75))/0x3*(-parseInt(_0x1aedd0(0xb9))/0x4)+parseInt(_0x1aedd0(0xc0))/0x5*(-parseInt(_0x1aedd0(0xc3))/0x6)+-parseInt(_0x1aedd0(0xc7))/0x7+-parseInt(_0x1aedd0(0x95))/0x8*(-parseInt(_0x1aedd0(0xcb))/0x9)+parseInt(_0x1aedd0(0xd2))/0xa*(-parseInt(_0x1aedd0(0xd0))/0xb);if(_0x431955===_0x35c68d)break;else _0x1e3a74['push'](_0x1e3a74['shift']());}catch(_0xd67a8c){_0x1e3a74['push'](_0x1e3a74['shift']());}}}(_0x2bc5,0xb80a1));import{CommentService as _0x4a8fdb,CollaborationSessionService as _0x2694b8,UniverCollaborationClientPlugin as _0x438bfa}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2ad2ef}from'@univerjs-pro/license';import{dayjs as _0x10572a,UserManagerService as _0x28fba7,Inject as _0x31fc7d,Injector as _0xd68dd6,Disposable as _0x533201,CustomRangeType as _0x31eeb2,UniverInstanceType as _0xcf7a68,DependentOn as _0x3289c3,IConfigService as _0x30af86,Plugin as _0x29ebf4,merge as _0x475af6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x188891}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4da4d1,IThreadCommentDataSourceService as _0xdb350c}from'@univerjs/thread-comment';import{bufferTime as _0x34613c}from'rxjs';import{HTTPService as _0x2963b5}from'@univerjs/network';const W=_0x44a406(0xd8);var I=(_0x3e4ac5=>(_0x3e4ac5[_0x3e4ac5[_0x44a406(0xbf)]=0x0]=_0x44a406(0xbf),_0x3e4ac5[_0x3e4ac5['Solved']=0x1]=_0x44a406(0xc8),_0x3e4ac5[_0x3e4ac5[_0x44a406(0xa4)]=-0x1]=_0x44a406(0xa4),_0x3e4ac5))(I||{}),v=(_0x20dd32=>(_0x20dd32[_0x20dd32[_0x44a406(0x9a)]=0x0]=_0x44a406(0x9a),_0x20dd32[_0x20dd32[_0x44a406(0x89)]=0x1]=_0x44a406(0x89),_0x20dd32[_0x20dd32['Reply']=0x2]='Reply',_0x20dd32[_0x20dd32[_0x44a406(0xd3)]=0x3]=_0x44a406(0xd3),_0x20dd32[_0x20dd32[_0x44a406(0xc6)]=0x4]=_0x44a406(0xc6),_0x20dd32[_0x20dd32[_0x44a406(0x88)]=0x5]='Solve',_0x20dd32[_0x20dd32[_0x44a406(0xa4)]=-0x1]=_0x44a406(0xa4),_0x20dd32))(v||{});const D=_0x2b944d=>_0x10572a(new Date(+_0x2b944d))[_0x44a406(0xb0)](_0x44a406(0xae)),B=async(_0x5dd15c,_0x120158)=>{const _0xadebea=_0x44a406,_0x2982a8=_0x5dd15c['get'](_0x28fba7),_0x140307=_0x5dd15c[_0xadebea(0x74)](_0x2963b5);_0x120158[_0xadebea(0xa6)](_0x664562=>{const _0x26005f=_0xadebea;_0x2982a8[_0x26005f(0x80)](_0x664562)&&_0x120158[_0x26005f(0x9f)](_0x664562);}),_0x120158[_0xadebea(0x7c)]&&(await _0x140307['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x120158]}}))[_0xadebea(0x7b)][_0xadebea(0xbb)][_0xadebea(0xa6)](_0x32e918=>{const _0x4b6960=_0xadebea;_0x32e918&&_0x2982a8[_0x4b6960(0x96)](_0x32e918);});};var K=Object[_0x44a406(0xb1)],V=(_0x6bd33b,_0x39ae3a,_0x582bbf,_0x15d664)=>{const _0x5561da=_0x44a406;for(var _0x358c5c=_0x15d664>0x1?void 0x0:_0x15d664?K(_0x39ae3a,_0x582bbf):_0x39ae3a,_0x1eaf6d=_0x6bd33b[_0x5561da(0x85)]-0x1,_0x5b59f3;_0x1eaf6d>=0x0;_0x1eaf6d--)(_0x5b59f3=_0x6bd33b[_0x1eaf6d])&&(_0x358c5c=_0x5b59f3(_0x358c5c)||_0x358c5c);return _0x358c5c;},p=(_0xfca09d,_0x5cdc7e)=>(_0x465ef0,_0x59634a)=>_0x5cdc7e(_0x465ef0,_0x59634a,_0xfca09d);let S=class extends _0x533201{constructor(_0x5ecdfb,_0x1f9cdc,_0x55e549,_0x5f2f97){const _0x55fabd=_0x44a406;super(),this[_0x55fabd(0x8d)]=_0x5ecdfb,this['_threadCommentModel']=_0x1f9cdc,this[_0x55fabd(0xa5)]=_0x55e549,this[_0x55fabd(0xc5)]=_0x5f2f97,this[_0x55fabd(0xc4)](),this[_0x55fabd(0xbd)]();}['_initUserSync'](){const _0x2c9780=_0x44a406;this[_0x2c9780(0xbe)](this[_0x2c9780(0x8e)][_0x2c9780(0x81)][_0x2c9780(0x8f)](_0x34613c(0x10))[_0x2c9780(0x86)](_0x393886=>{const _0x54336b=_0x2c9780,_0x31de56=new Set();_0x393886[_0x54336b(0xa6)](_0x365452=>{const _0x3ddfcc=_0x54336b;switch(_0x365452[_0x3ddfcc(0xda)]){case _0x3ddfcc(0x7e):{const _0x49582a=_0x365452[_0x3ddfcc(0xa9)][_0x3ddfcc(0x9c)];_0x31de56[_0x3ddfcc(0x7e)](_0x49582a);break;}}}),B(this['_injector'],_0x31de56);}));}['_init'](){const _0x11c179=_0x44a406;this[_0x11c179(0xbe)](this['_commentService']['commentUpdate$'][_0x11c179(0x86)](async _0x4d978d=>{const _0x5b2904=_0x11c179;var _0x3b9a0,_0x30df4c,_0x4cb597,_0x4ae88d;const _0x39f48d=(_0x3b9a0=this[_0x5b2904(0x8e)][_0x5b2904(0x8a)](_0x4d978d[_0x5b2904(0x9b)])[_0x5b2904(0x79)](_0x58498e=>_0x58498e[_0x5b2904(0x9d)]===_0x4d978d[_0x5b2904(0x9d)]))==null?void 0x0:_0x3b9a0['root'];if(!_0x39f48d)return;const {unitId:_0x417a84,subUnitId:_0x7f0ccd}=_0x39f48d;switch(_0x4d978d[_0x5b2904(0x8b)]&&this['_userService'][_0x5b2904(0x96)](_0x4d978d[_0x5b2904(0x8b)]),_0x4d978d['type']){case v['Add']:break;case v[_0x5b2904(0xa8)]:{this['_threadCommentModel']['addComment'](_0x417a84,_0x7f0ccd,{'unitId':_0x417a84,'subUnitId':_0x7f0ccd,'ref':'','id':_0x4d978d[_0x5b2904(0x87)],'dT':D(+_0x4d978d['createTimestamp']),'threadId':_0x4d978d[_0x5b2904(0x9d)],'personId':(_0x4cb597=(_0x30df4c=_0x4d978d[_0x5b2904(0x8b)])==null?void 0x0:_0x30df4c['userID'])!=null?_0x4cb597:_0x4d978d[_0x5b2904(0xd9)],'text':JSON[_0x5b2904(0xaa)](_0x4d978d[_0x5b2904(0x78)]),'parentId':_0x39f48d['id']});break;}case v['Delete']:{const _0x5c3808=this[_0x5b2904(0x8e)][_0x5b2904(0x7d)](_0x417a84,_0x7f0ccd,_0x4d978d[_0x5b2904(0x87)]);_0x5c3808&&_0x5c3808['parentId']&&this[_0x5b2904(0x8e)][_0x5b2904(0xb2)](_0x417a84,_0x7f0ccd,_0x4d978d['replyId']);break;}case v[_0x5b2904(0xd3)]:{this[_0x5b2904(0x8e)][_0x5b2904(0xd7)](_0x417a84,_0x7f0ccd,{'commentId':_0x4d978d[_0x5b2904(0x87)],'text':JSON['parse'](_0x4d978d['content'])});break;}case v['Solve']:{const _0x47845f=(_0x4ae88d=this['_threadCommentModel']['getUnit'](_0x4d978d['unitId'])[_0x5b2904(0x79)](_0x5ed475=>_0x5ed475[_0x5b2904(0x9d)]===_0x4d978d[_0x5b2904(0x9d)]))==null?void 0x0:_0x4ae88d[_0x5b2904(0xa2)];_0x47845f&&this['_threadCommentModel'][_0x5b2904(0x92)](_0x417a84,_0x7f0ccd,_0x47845f['id'],_0x4d978d[_0x5b2904(0x84)]===I[_0x5b2904(0xc8)]);break;}}}));}};S=V([p(0x0,_0x31fc7d(_0x4a8fdb)),p(0x1,_0x31fc7d(_0x4da4d1)),p(0x2,_0x31fc7d(_0x28fba7)),p(0x3,_0x31fc7d(_0xd68dd6))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x362616,_0x58b291,_0x3bbd32,_0x208dfc)=>{const _0x18554b=_0x44a406;for(var _0x48019a=_0x208dfc>0x1?void 0x0:_0x208dfc?k(_0x58b291,_0x3bbd32):_0x58b291,_0x51e59b=_0x362616[_0x18554b(0x85)]-0x1,_0x202f94;_0x51e59b>=0x0;_0x51e59b--)(_0x202f94=_0x362616[_0x51e59b])&&(_0x48019a=_0x202f94(_0x48019a)||_0x48019a);return _0x48019a;},_=(_0x41824d,_0x73e99c)=>(_0x13b012,_0x42b274)=>_0x73e99c(_0x13b012,_0x42b274,_0x41824d);function X(_0xfc9fbc,_0xb8a1ac){const _0x14483b=_0x44a406,_0x3ad6b1=_0xfc9fbc[_0x14483b(0xdb)][0x0];return{..._0xb8a1ac,'id':_0x3ad6b1[_0x14483b(0x87)],'resolved':_0xfc9fbc[_0x14483b(0x84)]===0x1,'dT':D(_0x3ad6b1['createTimestamp']),'personId':_0x3ad6b1[_0x14483b(0xd9)],'threadId':_0x3ad6b1[_0x14483b(0x9d)]};}function ee(_0x11395a,_0x69a7b9,_0x5d9df9){const _0x54213f=_0x44a406;var _0x122d47,_0x597028;if(((_0x597028=(_0x122d47=_0x11395a==null?void 0x0:_0x11395a['replies'])==null?void 0x0:_0x122d47[_0x54213f(0x85)])!=null?_0x597028:0x0)>0x0){const _0xc2dad=(_0x46f45a,_0x31d499)=>({'id':_0x46f45a[_0x54213f(0x87)],'threadId':_0x46f45a[_0x54213f(0x9d)],'dT':D(_0x46f45a[_0x54213f(0x7a)]),'personId':_0x46f45a[_0x54213f(0xd9)],'resolved':_0x11395a['solved']===I[_0x54213f(0xc8)],'unitId':_0x69a7b9,'subUnitId':_0x5d9df9,'text':JSON['parse'](_0x46f45a[_0x54213f(0x78)]),'parentId':_0x31d499}),_0x4a0c47=_0xc2dad(_0x11395a[_0x54213f(0xdb)][0x0]);return{..._0x4a0c47,'children':_0x11395a[_0x54213f(0xdb)][_0x54213f(0x99)](0x1)[_0x54213f(0x76)](_0xa26b12=>_0xc2dad(_0xa26b12,_0x4a0c47['id']))};}return null;}let f=class{constructor(_0x4f0060,_0x253511,_0x38f6d5,_0x4531c4){const _0x53660f=_0x44a406;this['_httpService']=_0x4f0060,this[_0x53660f(0xa5)]=_0x253511,this[_0x53660f(0xd5)]=_0x38f6d5,this[_0x53660f(0xc5)]=_0x4531c4;}async['addComment'](_0x4c6bc1){const _0x260385=_0x44a406;var _0x3d3543,_0x1de18a;const {parentId:_0xaee483,unitId:_0x20bd21,text:_0x4bf737,threadId:_0xb218e4}=_0x4c6bc1,_0x39efb6=(_0x1de18a=(_0x3d3543=_0x4bf737[_0x260385(0x8c)])==null?void 0x0:_0x3d3543[_0x260385(0x77)](_0x19e769=>_0x19e769['rangeType']===_0x31eeb2[_0x260385(0xc2)])[_0x260385(0x76)](_0x30d7bb=>_0x30d7bb['rangeId']))!=null?_0x1de18a:[],_0x276622=JSON[_0x260385(0xba)](_0x4bf737),_0x51be7f=(await this[_0x260385(0xd5)][_0x260385(0xca)](_0x20bd21))[_0x260385(0xd1)]();if(_0xaee483){const _0x414b9b={'memberId':_0x51be7f,'unitId':_0x20bd21,'content':_0x276622,'mention':_0x39efb6,'threadId':_0xb218e4},_0x1ff198=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x20bd21+_0x260385(0xd4),{'body':_0x414b9b}))[_0x260385(0x7b)][_0x260385(0xb7)];return{..._0x4c6bc1,'id':_0x1ff198[_0x260385(0x87)],'dT':_0x10572a(+_0x1ff198['createTimestamp'])['format'](_0x260385(0xae)),'personId':_0x1ff198['userId']};}else{const _0x3ea7fc={'memberId':_0x51be7f,'unitId':_0x20bd21,'content':_0x276622,'mention':_0x39efb6},_0xbf33f2=await this[_0x260385(0xa0)][_0x260385(0x9e)](_0x260385(0xaf)+_0x20bd21+'/add',{'body':_0x3ea7fc});return X(_0xbf33f2['body'][_0x260385(0xb8)],_0x4c6bc1);}}async[_0x44a406(0xd7)](_0x5a8adb){const _0xb5d137=_0x44a406;var _0x521b24,_0x2ac28a;const {text:_0x3e72ce,unitId:_0x5541b4}=_0x5a8adb,_0x4ef70a=(_0x2ac28a=(_0x521b24=_0x3e72ce[_0xb5d137(0x8c)])==null?void 0x0:_0x521b24[_0xb5d137(0x77)](_0xd920f=>_0xd920f[_0xb5d137(0x97)]===_0x31eeb2['COMMENT'])[_0xb5d137(0x76)](_0x357f34=>_0x357f34[_0xb5d137(0xcf)]))!=null?_0x2ac28a:[],_0x905bd0=JSON[_0xb5d137(0xba)](_0x3e72ce),_0x4a0646=_0x5a8adb[_0xb5d137(0x9d)],_0x46cd73=_0x5a8adb['id'],_0x23097e={'memberId':(await this['_sessionService'][_0xb5d137(0xca)](_0x5541b4))[_0xb5d137(0xd1)](),'unitId':_0x5541b4,'threadId':_0x4a0646,'mention':_0x4ef70a,'content':_0x905bd0,'replyId':_0x46cd73},_0x36c908=await this[_0xb5d137(0xa0)]['post'](_0xb5d137(0xaf)+_0x5541b4+_0xb5d137(0x82),{'body':_0x23097e});return!_0x36c908['body'][_0xb5d137(0xc1)]||_0x36c908[_0xb5d137(0x7b)]['error'][_0xb5d137(0xce)]===0x1;}async[_0x44a406(0x92)](_0xaf291b){const _0xc8b712=_0x44a406,{unitId:_0x211ff8}=_0xaf291b,_0x22c145=_0xaf291b[_0xc8b712(0x9d)],_0x5cd18b={'memberId':this[_0xc8b712(0xa5)][_0xc8b712(0xd6)]()[_0xc8b712(0xad)],'unitId':_0x211ff8,'threadId':_0x22c145,'solved':_0xaf291b[_0xc8b712(0xa3)]?I['Solved']:I[_0xc8b712(0xbf)]},_0x3d2d86=await this[_0xc8b712(0xa0)][_0xc8b712(0x9e)]('/universer-api/comment/unit/'+_0x211ff8+'/solved',{'body':_0x5cd18b});return!_0x3d2d86['body'][_0xc8b712(0xc1)]||_0x3d2d86['body'][_0xc8b712(0xc1)][_0xc8b712(0xce)]===0x1;}async[_0x44a406(0xb2)](_0x5582c7,_0x29e578,_0x2033bb,_0x1edacd){const _0x35aafa=_0x44a406,_0x25ba8c={'memberId':(await this[_0x35aafa(0xd5)][_0x35aafa(0xca)](_0x5582c7))['getMemberID'](),'threadId':_0x2033bb,'replyId':_0x1edacd,'unitId':_0x5582c7},_0x2d7caa=await this[_0x35aafa(0xa0)][_0x35aafa(0x9e)]('/universer-api/comment/unit/'+_0x5582c7+_0x35aafa(0xbc),{'body':_0x25ba8c});return!_0x2d7caa[_0x35aafa(0x7b)][_0x35aafa(0xc1)]||_0x2d7caa[_0x35aafa(0x7b)]['error']['code']===0x1;}async['listComments'](_0x30e92a,_0x2c064c,_0x1315ef){const _0x80c20=_0x44a406,_0x242dde={'unitId':_0x30e92a,'threadId':_0x1315ef},_0x400f80=await this[_0x80c20(0xa0)]['post'](_0x80c20(0xaf)+_0x30e92a+_0x80c20(0x83),{'body':_0x242dde}),_0x563c53=_0x1315ef['map'](_0x323db8=>ee(_0x400f80[_0x80c20(0x7b)][_0x80c20(0xb6)][_0x323db8],_0x30e92a,_0x2c064c))['filter'](Boolean);return Object['values'](_0x400f80[_0x80c20(0x7b)]['users'])['forEach'](_0xd65319=>{const _0x42eb3b=_0x80c20;this[_0x42eb3b(0xa5)][_0x42eb3b(0x96)](_0xd65319);}),_0x563c53;}[_0x44a406(0xb5)](_0x1724c1){const _0x5ca0cb=_0x44a406;return{'id':_0x1724c1['id'],'threadId':_0x1724c1['threadId'],'ref':_0x1724c1[_0x5ca0cb(0xab)]};}};f=Q([_(0x0,_0x31fc7d(_0x2963b5)),_(0x1,_0x31fc7d(_0x28fba7)),_(0x2,_0x31fc7d(_0x2694b8)),_(0x3,_0x31fc7d(_0xd68dd6))],f);var re=Object[_0x44a406(0xb1)],te=(_0x5aa0bd,_0x26a32e,_0x2879be,_0x37e68c)=>{const _0x29e26f=_0x44a406;for(var _0x4f3e43=_0x37e68c>0x1?void 0x0:_0x37e68c?re(_0x26a32e,_0x2879be):_0x26a32e,_0x92ec98=_0x5aa0bd[_0x29e26f(0x85)]-0x1,_0x3d62e1;_0x92ec98>=0x0;_0x92ec98--)(_0x3d62e1=_0x5aa0bd[_0x92ec98])&&(_0x4f3e43=_0x3d62e1(_0x4f3e43)||_0x4f3e43);return _0x4f3e43;},N=(_0x2b45e2,_0x510ac9)=>(_0x319f8c,_0x4a312d)=>_0x510ac9(_0x319f8c,_0x4a312d,_0x2b45e2);let g=class extends _0x533201{constructor(_0x55040f,_0x48cc94){const _0x4156bc=_0x44a406;super(),this[_0x4156bc(0xb3)]=_0x55040f,this['_threadCommentDataSource']=_0x48cc94,this[_0x4156bc(0xa7)]();}['_initDataSource'](){const _0x162e1d=_0x44a406;this[_0x162e1d(0xb3)][_0x162e1d(0x90)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x162e1d(0xcd)]=!0x1;}};g=te([N(0x0,_0xdb350c),N(0x1,_0x31fc7d(f))],g);var se=Object[_0x44a406(0xb4)],oe=Object[_0x44a406(0xb1)],ne=(_0x4cd999,_0x3a5632,_0x1f115e)=>_0x3a5632 in _0x4cd999?se(_0x4cd999,_0x3a5632,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1f115e}):_0x4cd999[_0x3a5632]=_0x1f115e,ie=(_0x2ac9a9,_0x4f60d5,_0x54fbf6,_0x14e90b)=>{const _0x350c1a=_0x44a406;for(var _0x12edeb=_0x14e90b>0x1?void 0x0:_0x14e90b?oe(_0x4f60d5,_0x54fbf6):_0x4f60d5,_0x4f0c68=_0x2ac9a9[_0x350c1a(0x85)]-0x1,_0x4bceca;_0x4f0c68>=0x0;_0x4f0c68--)(_0x4bceca=_0x2ac9a9[_0x4f0c68])&&(_0x12edeb=_0x4bceca(_0x12edeb)||_0x12edeb);return _0x12edeb;},w=(_0x3cae73,_0x3e6749)=>(_0x9c8371,_0x4e2b2f)=>_0x3e6749(_0x9c8371,_0x4e2b2f,_0x3cae73),$=(_0x4ce060,_0x1322f1,_0x2de7a7)=>ne(_0x4ce060,typeof _0x1322f1!='symbol'?_0x1322f1+'':_0x1322f1,_0x2de7a7);function _0x2bc5(){const _0x48eae5=['onReady','7061192rOgmlB','addUser','rangeType','_configService','slice','Unknown','unitId','personId','threadId','post','delete','_httpService','_config','root','resolved','UNRECOGNIZED','_userService','forEach','_initDataSource','Reply','payload','parse','ref','UNIVER_UNKNOWN','userID','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','format','getOwnPropertyDescriptor','deleteComment','_threadCommentDataSourceService','defineProperty','saveCommentToSnapshot','comments','reply','comment','4327028HendsC','stringify','users','/delete','_initUserSync','disposeWithMe','OpenOrReOpen','4447410JHdAhp','error','COMMENT','6gQATzY','_init','_injector','Delete','4570503DLJwCg','Solved','556356UPPuHo','requireSession','9qViNYy','pluginName','syncUpdateMutationToColla','code','rangeId','11pAwrzO','getMemberID','5495420Oapxoi','Edit','/reply','_sessionService','getCurrentUser','updateComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userId','type','replies','get','3eyTXlF','map','filter','content','find','createTimestamp','body','size','getComment','add','603194qoQNme','getUser','commentUpdate$','/edit','/list','solved','length','subscribe','replyId','Solve','Add','getUnit','user','customRanges','_commentService','_threadCommentModel','pipe','dataSource','onStarting','resolveComment','setConfig'];_0x2bc5=function(){return _0x48eae5;};return _0x2bc5();}let b=class extends _0x29ebf4{constructor(_0x12573a=M,_0x45449c,_0x3f4685){const _0x2a9c07=_0x44a406;super(),this[_0x2a9c07(0xa1)]=_0x12573a,this[_0x2a9c07(0xc5)]=_0x45449c,this[_0x2a9c07(0x98)]=_0x3f4685;const {..._0xe4e546}=_0x475af6({},M,this['_config']);this[_0x2a9c07(0x98)][_0x2a9c07(0x93)](z,_0xe4e546);}[_0x44a406(0x91)](){const _0x2698d1=_0x44a406;[[f],[g],[S]][_0x2698d1(0xa6)](_0x5941ac=>{const _0x1eb197=_0x2698d1;this[_0x1eb197(0xc5)][_0x1eb197(0x7e)](_0x5941ac);});}[_0x44a406(0x94)](){const _0x25e721=_0x44a406;this[_0x25e721(0xc5)][_0x25e721(0x74)](g),this['_injector']['get'](S);}};function _0x57ec(_0x48af42,_0x797010){const _0x2bc5cc=_0x2bc5();return _0x57ec=function(_0x57ecf4,_0x587c7c){_0x57ecf4=_0x57ecf4-0x74;let _0x273aeb=_0x2bc5cc[_0x57ecf4];return _0x273aeb;},_0x57ec(_0x48af42,_0x797010);}$(b,_0x44a406(0xcc),W),$(b,'type',_0xcf7a68[_0x44a406(0xac)]),b=ie([_0x3289c3(_0x188891,_0x438bfa,_0x2ad2ef),w(0x1,_0x31fc7d(_0xd68dd6)),w(0x2,_0x30af86)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3f46f4=_0x43ef;(function(_0x257461,_0x23c47c){const _0x3621c8=_0x43ef,_0x42c4fd=_0x257461();while(!![]){try{const _0x29961c=-parseInt(_0x3621c8(0xc2))/0x1*(parseInt(_0x3621c8(0xf8))/0x2)+parseInt(_0x3621c8(0xb3))/0x3+-parseInt(_0x3621c8(0xb5))/0x4*(-parseInt(_0x3621c8(0xae))/0x5)+parseInt(_0x3621c8(0xd4))/0x6*(-parseInt(_0x3621c8(0xe3))/0x7)+parseInt(_0x3621c8(0xbf))/0x8+-parseInt(_0x3621c8(0xc7))/0x9+parseInt(_0x3621c8(0xe7))/0xa*(parseInt(_0x3621c8(0xb0))/0xb);if(_0x29961c===_0x23c47c)break;else _0x42c4fd['push'](_0x42c4fd['shift']());}catch(_0x433d00){_0x42c4fd['push'](_0x42c4fd['shift']());}}}(_0xf5b1,0x87ded));import{CommentService as _0x11e170,CollaborationSessionService as _0x4cd38e,UniverCollaborationClientPlugin as _0xf421b9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x22ada7}from'@univerjs-pro/license';import{dayjs as _0x545eb3,UserManagerService as _0x5dff7a,Inject as _0x1e3f8f,Injector as _0x2f3235,Disposable as _0x161b8f,CustomRangeType as _0x396d46,UniverInstanceType as _0xe0e43a,DependentOn as _0x21b12e,IConfigService as _0x293df4,Plugin as _0x3fdb49,merge as _0xff6135}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x196607}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x32b180,IThreadCommentDataSourceService as _0x26e588}from'@univerjs/thread-comment';import{bufferTime as _0x517f82}from'rxjs';import{HTTPService as _0x267ec3}from'@univerjs/network';const W=_0x3f46f4(0xde);var I=(_0x50494d=>(_0x50494d[_0x50494d[_0x3f46f4(0xd0)]=0x0]='OpenOrReOpen',_0x50494d[_0x50494d[_0x3f46f4(0xd5)]=0x1]=_0x3f46f4(0xd5),_0x50494d[_0x50494d[_0x3f46f4(0x9e)]=-0x1]=_0x3f46f4(0x9e),_0x50494d))(I||{}),v=(_0x47cbf9=>(_0x47cbf9[_0x47cbf9[_0x3f46f4(0xbc)]=0x0]=_0x3f46f4(0xbc),_0x47cbf9[_0x47cbf9[_0x3f46f4(0xdd)]=0x1]=_0x3f46f4(0xdd),_0x47cbf9[_0x47cbf9['Reply']=0x2]=_0x3f46f4(0xf3),_0x47cbf9[_0x47cbf9[_0x3f46f4(0xc8)]=0x3]='Edit',_0x47cbf9[_0x47cbf9[_0x3f46f4(0xf6)]=0x4]=_0x3f46f4(0xf6),_0x47cbf9[_0x47cbf9['Solve']=0x5]=_0x3f46f4(0xc5),_0x47cbf9[_0x47cbf9['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x47cbf9))(v||{});const D=_0x443cbb=>_0x545eb3(new Date(+_0x443cbb))[_0x3f46f4(0x9c)](_0x3f46f4(0xf2)),B=async(_0x33143a,_0x2124cd)=>{const _0x1bc886=_0x3f46f4,_0x91bcc4=_0x33143a[_0x1bc886(0xb6)](_0x5dff7a),_0x18a19e=_0x33143a[_0x1bc886(0xb6)](_0x267ec3);_0x2124cd[_0x1bc886(0xfa)](_0x271c29=>{const _0x338be5=_0x1bc886;_0x91bcc4[_0x338be5(0xe8)](_0x271c29)&&_0x2124cd['delete'](_0x271c29);}),_0x2124cd[_0x1bc886(0xbb)]&&(await _0x18a19e[_0x1bc886(0xb6)](_0x1bc886(0xf4),{'params':{'userIDs':[..._0x2124cd]}}))['body']['users'][_0x1bc886(0xfa)](_0x40dcb5=>{const _0x4f48e0=_0x1bc886;_0x40dcb5&&_0x91bcc4[_0x4f48e0(0xef)](_0x40dcb5);});};var K=Object[_0x3f46f4(0xfc)],V=(_0x4e7606,_0x2e769e,_0x1b9f38,_0x54e2bc)=>{const _0x3240ad=_0x3f46f4;for(var _0x1edb70=_0x54e2bc>0x1?void 0x0:_0x54e2bc?K(_0x2e769e,_0x1b9f38):_0x2e769e,_0x54247d=_0x4e7606[_0x3240ad(0xdc)]-0x1,_0x3507ef;_0x54247d>=0x0;_0x54247d--)(_0x3507ef=_0x4e7606[_0x54247d])&&(_0x1edb70=_0x3507ef(_0x1edb70)||_0x1edb70);return _0x1edb70;},p=(_0xcbfd65,_0x1cafac)=>(_0x1f0a38,_0x27a032)=>_0x1cafac(_0x1f0a38,_0x27a032,_0xcbfd65);function _0x43ef(_0x5446a7,_0x20a84d){const _0xf5b1d1=_0xf5b1();return _0x43ef=function(_0x43ef8b,_0x2230f8){_0x43ef8b=_0x43ef8b-0x9b;let _0x30d8f7=_0xf5b1d1[_0x43ef8b];return _0x30d8f7;},_0x43ef(_0x5446a7,_0x20a84d);}let S=class extends _0x161b8f{constructor(_0x1a409b,_0x35c7b1,_0xac4fb,_0x163dd9){const _0x50a314=_0x3f46f4;super(),this['_commentService']=_0x1a409b,this[_0x50a314(0xfb)]=_0x35c7b1,this['_userService']=_0xac4fb,this[_0x50a314(0xf1)]=_0x163dd9,this[_0x50a314(0xac)](),this[_0x50a314(0xba)]();}[_0x3f46f4(0xba)](){const _0x2f56ca=_0x3f46f4;this[_0x2f56ca(0xaa)](this['_threadCommentModel'][_0x2f56ca(0xa7)][_0x2f56ca(0xaf)](_0x517f82(0x10))[_0x2f56ca(0xa4)](_0x6a4799=>{const _0x42a5c6=_0x2f56ca,_0x2dbccd=new Set();_0x6a4799[_0x42a5c6(0xfa)](_0x137d50=>{const _0x24ac14=_0x42a5c6;switch(_0x137d50[_0x24ac14(0xbd)]){case _0x24ac14(0xad):{const _0x50461a=_0x137d50[_0x24ac14(0xed)][_0x24ac14(0xc0)];_0x2dbccd[_0x24ac14(0xad)](_0x50461a);break;}}}),B(this[_0x42a5c6(0xf1)],_0x2dbccd);}));}[_0x3f46f4(0xac)](){const _0x1a28dc=_0x3f46f4;this[_0x1a28dc(0xaa)](this['_commentService'][_0x1a28dc(0xa7)]['subscribe'](async _0x181b23=>{const _0x1fabec=_0x1a28dc;var _0x322bcb,_0x11624f,_0x3daffe,_0x28bc77;const _0x42a56b=(_0x322bcb=this[_0x1fabec(0xfb)]['getUnit'](_0x181b23[_0x1fabec(0xea)])['find'](_0x1c1967=>_0x1c1967[_0x1fabec(0xb8)]===_0x181b23['threadId']))==null?void 0x0:_0x322bcb[_0x1fabec(0xc1)];if(!_0x42a56b)return;const {unitId:_0x38d1a8,subUnitId:_0x3e7f2e}=_0x42a56b;switch(_0x181b23[_0x1fabec(0xfe)]&&this[_0x1fabec(0xc6)][_0x1fabec(0xef)](_0x181b23[_0x1fabec(0xfe)]),_0x181b23[_0x1fabec(0xbd)]){case v[_0x1fabec(0xdd)]:break;case v[_0x1fabec(0xf3)]:{this[_0x1fabec(0xfb)][_0x1fabec(0xdb)](_0x38d1a8,_0x3e7f2e,{'unitId':_0x38d1a8,'subUnitId':_0x3e7f2e,'ref':'','id':_0x181b23[_0x1fabec(0xc4)],'dT':D(+_0x181b23['createTimestamp']),'threadId':_0x181b23[_0x1fabec(0xb8)],'personId':(_0x3daffe=(_0x11624f=_0x181b23[_0x1fabec(0xfe)])==null?void 0x0:_0x11624f[_0x1fabec(0xdf)])!=null?_0x3daffe:_0x181b23[_0x1fabec(0xcf)],'text':JSON[_0x1fabec(0xce)](_0x181b23[_0x1fabec(0xd3)]),'parentId':_0x42a56b['id']});break;}case v[_0x1fabec(0xf6)]:{const _0x4d2c00=this[_0x1fabec(0xfb)]['getComment'](_0x38d1a8,_0x3e7f2e,_0x181b23[_0x1fabec(0xc4)]);_0x4d2c00&&_0x4d2c00[_0x1fabec(0xc3)]&&this['_threadCommentModel']['deleteComment'](_0x38d1a8,_0x3e7f2e,_0x181b23[_0x1fabec(0xc4)]);break;}case v[_0x1fabec(0xc8)]:{this[_0x1fabec(0xfb)]['updateComment'](_0x38d1a8,_0x3e7f2e,{'commentId':_0x181b23[_0x1fabec(0xc4)],'text':JSON[_0x1fabec(0xce)](_0x181b23[_0x1fabec(0xd3)])});break;}case v['Solve']:{const _0x58b5a9=(_0x28bc77=this[_0x1fabec(0xfb)][_0x1fabec(0xb7)](_0x181b23[_0x1fabec(0xea)])['find'](_0x14cf37=>_0x14cf37[_0x1fabec(0xb8)]===_0x181b23[_0x1fabec(0xb8)]))==null?void 0x0:_0x28bc77['root'];_0x58b5a9&&this['_threadCommentModel']['resolveComment'](_0x38d1a8,_0x3e7f2e,_0x58b5a9['id'],_0x181b23[_0x1fabec(0x9d)]===I[_0x1fabec(0xd5)]);break;}}}));}};S=V([p(0x0,_0x1e3f8f(_0x11e170)),p(0x1,_0x1e3f8f(_0x32b180)),p(0x2,_0x1e3f8f(_0x5dff7a)),p(0x3,_0x1e3f8f(_0x2f3235))],S);const z=_0x3f46f4(0xb9),M={};var k=Object[_0x3f46f4(0xfc)],Q=(_0x3e1f0e,_0x5d99ce,_0x38890e,_0x242978)=>{const _0x20216b=_0x3f46f4;for(var _0x156b53=_0x242978>0x1?void 0x0:_0x242978?k(_0x5d99ce,_0x38890e):_0x5d99ce,_0x2ffe4a=_0x3e1f0e[_0x20216b(0xdc)]-0x1,_0x8b8a3b;_0x2ffe4a>=0x0;_0x2ffe4a--)(_0x8b8a3b=_0x3e1f0e[_0x2ffe4a])&&(_0x156b53=_0x8b8a3b(_0x156b53)||_0x156b53);return _0x156b53;},_=(_0x5c8104,_0xd928ed)=>(_0xe4a2a4,_0x20ce7b)=>_0xd928ed(_0xe4a2a4,_0x20ce7b,_0x5c8104);function X(_0x1918c,_0x4b8e1b){const _0x14979a=_0x3f46f4,_0x322908=_0x1918c['replies'][0x0];return{..._0x4b8e1b,'id':_0x322908[_0x14979a(0xc4)],'resolved':_0x1918c['solved']===0x1,'dT':D(_0x322908[_0x14979a(0xf9)]),'personId':_0x322908[_0x14979a(0xcf)],'threadId':_0x322908[_0x14979a(0xb8)]};}function ee(_0x29e162,_0x58d0e4,_0x58a3d4){const _0x259496=_0x3f46f4;var _0x4261aa,_0x313eb0;if(((_0x313eb0=(_0x4261aa=_0x29e162==null?void 0x0:_0x29e162['replies'])==null?void 0x0:_0x4261aa[_0x259496(0xdc)])!=null?_0x313eb0:0x0)>0x0){const _0x4c1165=(_0x45dc74,_0x343170)=>({'id':_0x45dc74[_0x259496(0xc4)],'threadId':_0x45dc74['threadId'],'dT':D(_0x45dc74['createTimestamp']),'personId':_0x45dc74['userId'],'resolved':_0x29e162[_0x259496(0x9d)]===I[_0x259496(0xd5)],'unitId':_0x58d0e4,'subUnitId':_0x58a3d4,'text':JSON[_0x259496(0xce)](_0x45dc74[_0x259496(0xd3)]),'parentId':_0x343170}),_0x31a9a7=_0x4c1165(_0x29e162[_0x259496(0xec)][0x0]);return{..._0x31a9a7,'children':_0x29e162['replies'][_0x259496(0xa8)](0x1)[_0x259496(0xeb)](_0x572877=>_0x4c1165(_0x572877,_0x31a9a7['id']))};}return null;}function _0xf5b1(){const _0x2d3517=['/edit','unitId','map','replies','payload','_threadCommentDataSource','addUser','/reply','_injector','YYYY/MM/DD\x20HH:mm','Reply','/universer-api/user/list','_configService','Delete','resolveComment','199022MlYQZz','createTimestamp','forEach','_threadCommentModel','getOwnPropertyDescriptor','users','user','code','format','solved','UNRECOGNIZED','/add','comments','COMMENT','/universer-api/comment/unit/','/solved','subscribe','syncUpdateMutationToColla','setConfig','commentUpdate$','slice','_threadCommentDataSourceService','disposeWithMe','getMemberID','_init','add','604085GBTZEi','pipe','16346RtQwHT','updateComment','resolved','474552ClnPOZ','symbol','4DojKee','get','getUnit','threadId','thread-comment-data-source.config','_initUserSync','size','Unknown','type','_initDataSource','6475536VQAIbW','personId','root','1yNvFPc','parentId','replyId','Solve','_userService','1587708rcJdvb','Edit','_sessionService','requireSession','/delete','reply','_config','parse','userId','OpenOrReOpen','pluginName','rangeId','content','430218jdWDoJ','Solved','stringify','filter','values','error','defineProperty','addComment','length','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userID','body','post','comment','63njSkDS','dataSource','_httpService','rangeType','2620slUuJq','getUser'];_0xf5b1=function(){return _0x2d3517;};return _0xf5b1();}let f=class{constructor(_0x1cddcf,_0x5ac749,_0x3c58d2,_0x444356){const _0x1a6c70=_0x3f46f4;this['_httpService']=_0x1cddcf,this[_0x1a6c70(0xc6)]=_0x5ac749,this[_0x1a6c70(0xc9)]=_0x3c58d2,this[_0x1a6c70(0xf1)]=_0x444356;}async['addComment'](_0x4eda24){const _0x366a83=_0x3f46f4;var _0x400dc7,_0x2608f1;const {parentId:_0x548c31,unitId:_0x37733d,text:_0x266740,threadId:_0x10d27e}=_0x4eda24,_0x4f2370=(_0x2608f1=(_0x400dc7=_0x266740['customRanges'])==null?void 0x0:_0x400dc7[_0x366a83(0xd7)](_0x4aee06=>_0x4aee06[_0x366a83(0xe6)]===_0x396d46['COMMENT'])[_0x366a83(0xeb)](_0x269f59=>_0x269f59[_0x366a83(0xd2)]))!=null?_0x2608f1:[],_0x194f37=JSON['stringify'](_0x266740),_0x5b4e7c=(await this[_0x366a83(0xc9)][_0x366a83(0xca)](_0x37733d))[_0x366a83(0xab)]();if(_0x548c31){const _0x35bd37={'memberId':_0x5b4e7c,'unitId':_0x37733d,'content':_0x194f37,'mention':_0x4f2370,'threadId':_0x10d27e},_0x539197=(await this[_0x366a83(0xe5)]['post']('/universer-api/comment/unit/'+_0x37733d+_0x366a83(0xf0),{'body':_0x35bd37}))['body'][_0x366a83(0xcc)];return{..._0x4eda24,'id':_0x539197[_0x366a83(0xc4)],'dT':_0x545eb3(+_0x539197[_0x366a83(0xf9)])[_0x366a83(0x9c)](_0x366a83(0xf2)),'personId':_0x539197[_0x366a83(0xcf)]};}else{const _0x44e77a={'memberId':_0x5b4e7c,'unitId':_0x37733d,'content':_0x194f37,'mention':_0x4f2370},_0x49d4ae=await this[_0x366a83(0xe5)][_0x366a83(0xe1)](_0x366a83(0xa2)+_0x37733d+_0x366a83(0x9f),{'body':_0x44e77a});return X(_0x49d4ae[_0x366a83(0xe0)][_0x366a83(0xe2)],_0x4eda24);}}async[_0x3f46f4(0xb1)](_0x4aaa17){const _0x991ab9=_0x3f46f4;var _0x467278,_0x10c58d;const {text:_0x291750,unitId:_0x4ae034}=_0x4aaa17,_0x2b3a74=(_0x10c58d=(_0x467278=_0x291750['customRanges'])==null?void 0x0:_0x467278[_0x991ab9(0xd7)](_0x4f0c91=>_0x4f0c91['rangeType']===_0x396d46[_0x991ab9(0xa1)])['map'](_0x362cfa=>_0x362cfa['rangeId']))!=null?_0x10c58d:[],_0x397aa1=JSON[_0x991ab9(0xd6)](_0x291750),_0x27b4e4=_0x4aaa17[_0x991ab9(0xb8)],_0x5b8fd5=_0x4aaa17['id'],_0x205ef0={'memberId':(await this[_0x991ab9(0xc9)][_0x991ab9(0xca)](_0x4ae034))[_0x991ab9(0xab)](),'unitId':_0x4ae034,'threadId':_0x27b4e4,'mention':_0x2b3a74,'content':_0x397aa1,'replyId':_0x5b8fd5},_0x2a6977=await this[_0x991ab9(0xe5)]['post'](_0x991ab9(0xa2)+_0x4ae034+_0x991ab9(0xe9),{'body':_0x205ef0});return!_0x2a6977[_0x991ab9(0xe0)][_0x991ab9(0xd9)]||_0x2a6977[_0x991ab9(0xe0)][_0x991ab9(0xd9)][_0x991ab9(0x9b)]===0x1;}async[_0x3f46f4(0xf7)](_0x37b948){const _0x4f5a6b=_0x3f46f4,{unitId:_0x1aabbe}=_0x37b948,_0x15205a=_0x37b948[_0x4f5a6b(0xb8)],_0x3d569a={'memberId':this[_0x4f5a6b(0xc6)]['getCurrentUser']()[_0x4f5a6b(0xdf)],'unitId':_0x1aabbe,'threadId':_0x15205a,'solved':_0x37b948[_0x4f5a6b(0xb2)]?I[_0x4f5a6b(0xd5)]:I[_0x4f5a6b(0xd0)]},_0x20c6bc=await this['_httpService'][_0x4f5a6b(0xe1)](_0x4f5a6b(0xa2)+_0x1aabbe+_0x4f5a6b(0xa3),{'body':_0x3d569a});return!_0x20c6bc[_0x4f5a6b(0xe0)][_0x4f5a6b(0xd9)]||_0x20c6bc[_0x4f5a6b(0xe0)][_0x4f5a6b(0xd9)][_0x4f5a6b(0x9b)]===0x1;}async['deleteComment'](_0x4f5ad4,_0x5062bc,_0x310e1d,_0x4b3ab2){const _0x4a19f0=_0x3f46f4,_0x3f91a8={'memberId':(await this[_0x4a19f0(0xc9)][_0x4a19f0(0xca)](_0x4f5ad4))[_0x4a19f0(0xab)](),'threadId':_0x310e1d,'replyId':_0x4b3ab2,'unitId':_0x4f5ad4},_0x44e7e0=await this['_httpService']['post'](_0x4a19f0(0xa2)+_0x4f5ad4+_0x4a19f0(0xcb),{'body':_0x3f91a8});return!_0x44e7e0['body']['error']||_0x44e7e0[_0x4a19f0(0xe0)][_0x4a19f0(0xd9)]['code']===0x1;}async['listComments'](_0x2a9555,_0x7f1c78,_0x551c74){const _0x48f84f=_0x3f46f4,_0x326454={'unitId':_0x2a9555,'threadId':_0x551c74},_0x7ee0dc=await this[_0x48f84f(0xe5)]['post']('/universer-api/comment/unit/'+_0x2a9555+'/list',{'body':_0x326454}),_0x497d27=_0x551c74[_0x48f84f(0xeb)](_0x4f52fe=>ee(_0x7ee0dc['body'][_0x48f84f(0xa0)][_0x4f52fe],_0x2a9555,_0x7f1c78))[_0x48f84f(0xd7)](Boolean);return Object[_0x48f84f(0xd8)](_0x7ee0dc['body'][_0x48f84f(0xfd)])[_0x48f84f(0xfa)](_0xd5c1ec=>{const _0x4eb5c9=_0x48f84f;this[_0x4eb5c9(0xc6)]['addUser'](_0xd5c1ec);}),_0x497d27;}['saveCommentToSnapshot'](_0x25b46d){const _0x5660e0=_0x3f46f4;return{'id':_0x25b46d['id'],'threadId':_0x25b46d[_0x5660e0(0xb8)],'ref':_0x25b46d['ref']};}};f=Q([_(0x0,_0x1e3f8f(_0x267ec3)),_(0x1,_0x1e3f8f(_0x5dff7a)),_(0x2,_0x1e3f8f(_0x4cd38e)),_(0x3,_0x1e3f8f(_0x2f3235))],f);var re=Object[_0x3f46f4(0xfc)],te=(_0x422a50,_0x204a4c,_0x3eb1f,_0x4f5c24)=>{const _0x241e3f=_0x3f46f4;for(var _0x20ea41=_0x4f5c24>0x1?void 0x0:_0x4f5c24?re(_0x204a4c,_0x3eb1f):_0x204a4c,_0x52868e=_0x422a50[_0x241e3f(0xdc)]-0x1,_0x309664;_0x52868e>=0x0;_0x52868e--)(_0x309664=_0x422a50[_0x52868e])&&(_0x20ea41=_0x309664(_0x20ea41)||_0x20ea41);return _0x20ea41;},N=(_0x21da7b,_0x43e304)=>(_0x52d743,_0xbdc6bb)=>_0x43e304(_0x52d743,_0xbdc6bb,_0x21da7b);let g=class extends _0x161b8f{constructor(_0x10504f,_0x30017c){const _0x2ae5be=_0x3f46f4;super(),this['_threadCommentDataSourceService']=_0x10504f,this[_0x2ae5be(0xee)]=_0x30017c,this[_0x2ae5be(0xbe)]();}['_initDataSource'](){const _0x10899a=_0x3f46f4;this['_threadCommentDataSourceService'][_0x10899a(0xe4)]=this[_0x10899a(0xee)],this[_0x10899a(0xa9)][_0x10899a(0xa5)]=!0x1;}};g=te([N(0x0,_0x26e588),N(0x1,_0x1e3f8f(f))],g);var se=Object[_0x3f46f4(0xda)],oe=Object[_0x3f46f4(0xfc)],ne=(_0x239c9c,_0x4483d7,_0x3efb5a)=>_0x4483d7 in _0x239c9c?se(_0x239c9c,_0x4483d7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3efb5a}):_0x239c9c[_0x4483d7]=_0x3efb5a,ie=(_0x5cf66c,_0x26b4d5,_0x11bccb,_0x538de6)=>{const _0xb7f3b0=_0x3f46f4;for(var _0x3038e3=_0x538de6>0x1?void 0x0:_0x538de6?oe(_0x26b4d5,_0x11bccb):_0x26b4d5,_0x41732e=_0x5cf66c[_0xb7f3b0(0xdc)]-0x1,_0x371806;_0x41732e>=0x0;_0x41732e--)(_0x371806=_0x5cf66c[_0x41732e])&&(_0x3038e3=_0x371806(_0x3038e3)||_0x3038e3);return _0x3038e3;},w=(_0x22ed5d,_0x5a5f7f)=>(_0x42bf15,_0x54a908)=>_0x5a5f7f(_0x42bf15,_0x54a908,_0x22ed5d),$=(_0xc71f46,_0x5183e8,_0x353f70)=>ne(_0xc71f46,typeof _0x5183e8!=_0x3f46f4(0xb4)?_0x5183e8+'':_0x5183e8,_0x353f70);let b=class extends _0x3fdb49{constructor(_0x5b1110=M,_0x27fd76,_0x4b0c38){const _0x1889cc=_0x3f46f4;super(),this['_config']=_0x5b1110,this[_0x1889cc(0xf1)]=_0x27fd76,this[_0x1889cc(0xf5)]=_0x4b0c38;const {..._0x388edc}=_0xff6135({},M,this[_0x1889cc(0xcd)]);this[_0x1889cc(0xf5)][_0x1889cc(0xa6)](z,_0x388edc);}['onStarting'](){const _0x427cc9=_0x3f46f4;[[f],[g],[S]][_0x427cc9(0xfa)](_0x1df5b2=>{const _0x351be2=_0x427cc9;this[_0x351be2(0xf1)][_0x351be2(0xad)](_0x1df5b2);});}['onReady'](){const _0x528871=_0x3f46f4;this[_0x528871(0xf1)]['get'](g),this['_injector']['get'](S);}};$(b,_0x3f46f4(0xd1),W),$(b,'type',_0xe0e43a['UNIVER_UNKNOWN']),b=ie([_0x21b12e(_0x196607,_0xf421b9,_0x22ada7),w(0x1,_0x1e3f8f(_0x2f3235)),w(0x2,_0x293df4)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x44a406=_0x57ec;(function(_0x52f56a,_0x35c68d){const _0x1aedd0=_0x57ec,_0x1e3a74=_0x52f56a();while(!![]){try{const _0x431955=parseInt(_0x1aedd0(0x7f))/0x1+parseInt(_0x1aedd0(0xc9))/0x2+-parseInt(_0x1aedd0(0x75))/0x3*(-parseInt(_0x1aedd0(0xb9))/0x4)+parseInt(_0x1aedd0(0xc0))/0x5*(-parseInt(_0x1aedd0(0xc3))/0x6)+-parseInt(_0x1aedd0(0xc7))/0x7+-parseInt(_0x1aedd0(0x95))/0x8*(-parseInt(_0x1aedd0(0xcb))/0x9)+parseInt(_0x1aedd0(0xd2))/0xa*(-parseInt(_0x1aedd0(0xd0))/0xb);if(_0x431955===_0x35c68d)break;else _0x1e3a74['push'](_0x1e3a74['shift']());}catch(_0xd67a8c){_0x1e3a74['push'](_0x1e3a74['shift']());}}}(_0x2bc5,0xb80a1));import{CommentService as _0x4a8fdb,CollaborationSessionService as _0x2694b8,UniverCollaborationClientPlugin as _0x438bfa}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2ad2ef}from'@univerjs-pro/license';import{dayjs as _0x10572a,UserManagerService as _0x28fba7,Inject as _0x31fc7d,Injector as _0xd68dd6,Disposable as _0x533201,CustomRangeType as _0x31eeb2,UniverInstanceType as _0xcf7a68,DependentOn as _0x3289c3,IConfigService as _0x30af86,Plugin as _0x29ebf4,merge as _0x475af6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x188891}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4da4d1,IThreadCommentDataSourceService as _0xdb350c}from'@univerjs/thread-comment';import{bufferTime as _0x34613c}from'rxjs';import{HTTPService as _0x2963b5}from'@univerjs/network';const W=_0x44a406(0xd8);var I=(_0x3e4ac5=>(_0x3e4ac5[_0x3e4ac5[_0x44a406(0xbf)]=0x0]=_0x44a406(0xbf),_0x3e4ac5[_0x3e4ac5['Solved']=0x1]=_0x44a406(0xc8),_0x3e4ac5[_0x3e4ac5[_0x44a406(0xa4)]=-0x1]=_0x44a406(0xa4),_0x3e4ac5))(I||{}),v=(_0x20dd32=>(_0x20dd32[_0x20dd32[_0x44a406(0x9a)]=0x0]=_0x44a406(0x9a),_0x20dd32[_0x20dd32[_0x44a406(0x89)]=0x1]=_0x44a406(0x89),_0x20dd32[_0x20dd32['Reply']=0x2]='Reply',_0x20dd32[_0x20dd32[_0x44a406(0xd3)]=0x3]=_0x44a406(0xd3),_0x20dd32[_0x20dd32[_0x44a406(0xc6)]=0x4]=_0x44a406(0xc6),_0x20dd32[_0x20dd32[_0x44a406(0x88)]=0x5]='Solve',_0x20dd32[_0x20dd32[_0x44a406(0xa4)]=-0x1]=_0x44a406(0xa4),_0x20dd32))(v||{});const D=_0x2b944d=>_0x10572a(new Date(+_0x2b944d))[_0x44a406(0xb0)](_0x44a406(0xae)),B=async(_0x5dd15c,_0x120158)=>{const _0xadebea=_0x44a406,_0x2982a8=_0x5dd15c['get'](_0x28fba7),_0x140307=_0x5dd15c[_0xadebea(0x74)](_0x2963b5);_0x120158[_0xadebea(0xa6)](_0x664562=>{const _0x26005f=_0xadebea;_0x2982a8[_0x26005f(0x80)](_0x664562)&&_0x120158[_0x26005f(0x9f)](_0x664562);}),_0x120158[_0xadebea(0x7c)]&&(await _0x140307['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x120158]}}))[_0xadebea(0x7b)][_0xadebea(0xbb)][_0xadebea(0xa6)](_0x32e918=>{const _0x4b6960=_0xadebea;_0x32e918&&_0x2982a8[_0x4b6960(0x96)](_0x32e918);});};var K=Object[_0x44a406(0xb1)],V=(_0x6bd33b,_0x39ae3a,_0x582bbf,_0x15d664)=>{const _0x5561da=_0x44a406;for(var _0x358c5c=_0x15d664>0x1?void 0x0:_0x15d664?K(_0x39ae3a,_0x582bbf):_0x39ae3a,_0x1eaf6d=_0x6bd33b[_0x5561da(0x85)]-0x1,_0x5b59f3;_0x1eaf6d>=0x0;_0x1eaf6d--)(_0x5b59f3=_0x6bd33b[_0x1eaf6d])&&(_0x358c5c=_0x5b59f3(_0x358c5c)||_0x358c5c);return _0x358c5c;},p=(_0xfca09d,_0x5cdc7e)=>(_0x465ef0,_0x59634a)=>_0x5cdc7e(_0x465ef0,_0x59634a,_0xfca09d);let S=class extends _0x533201{constructor(_0x5ecdfb,_0x1f9cdc,_0x55e549,_0x5f2f97){const _0x55fabd=_0x44a406;super(),this[_0x55fabd(0x8d)]=_0x5ecdfb,this['_threadCommentModel']=_0x1f9cdc,this[_0x55fabd(0xa5)]=_0x55e549,this[_0x55fabd(0xc5)]=_0x5f2f97,this[_0x55fabd(0xc4)](),this[_0x55fabd(0xbd)]();}['_initUserSync'](){const _0x2c9780=_0x44a406;this[_0x2c9780(0xbe)](this[_0x2c9780(0x8e)][_0x2c9780(0x81)][_0x2c9780(0x8f)](_0x34613c(0x10))[_0x2c9780(0x86)](_0x393886=>{const _0x54336b=_0x2c9780,_0x31de56=new Set();_0x393886[_0x54336b(0xa6)](_0x365452=>{const _0x3ddfcc=_0x54336b;switch(_0x365452[_0x3ddfcc(0xda)]){case _0x3ddfcc(0x7e):{const _0x49582a=_0x365452[_0x3ddfcc(0xa9)][_0x3ddfcc(0x9c)];_0x31de56[_0x3ddfcc(0x7e)](_0x49582a);break;}}}),B(this['_injector'],_0x31de56);}));}['_init'](){const _0x11c179=_0x44a406;this[_0x11c179(0xbe)](this['_commentService']['commentUpdate$'][_0x11c179(0x86)](async _0x4d978d=>{const _0x5b2904=_0x11c179;var _0x3b9a0,_0x30df4c,_0x4cb597,_0x4ae88d;const _0x39f48d=(_0x3b9a0=this[_0x5b2904(0x8e)][_0x5b2904(0x8a)](_0x4d978d[_0x5b2904(0x9b)])[_0x5b2904(0x79)](_0x58498e=>_0x58498e[_0x5b2904(0x9d)]===_0x4d978d[_0x5b2904(0x9d)]))==null?void 0x0:_0x3b9a0['root'];if(!_0x39f48d)return;const {unitId:_0x417a84,subUnitId:_0x7f0ccd}=_0x39f48d;switch(_0x4d978d[_0x5b2904(0x8b)]&&this['_userService'][_0x5b2904(0x96)](_0x4d978d[_0x5b2904(0x8b)]),_0x4d978d['type']){case v['Add']:break;case v[_0x5b2904(0xa8)]:{this['_threadCommentModel']['addComment'](_0x417a84,_0x7f0ccd,{'unitId':_0x417a84,'subUnitId':_0x7f0ccd,'ref':'','id':_0x4d978d[_0x5b2904(0x87)],'dT':D(+_0x4d978d['createTimestamp']),'threadId':_0x4d978d[_0x5b2904(0x9d)],'personId':(_0x4cb597=(_0x30df4c=_0x4d978d[_0x5b2904(0x8b)])==null?void 0x0:_0x30df4c['userID'])!=null?_0x4cb597:_0x4d978d[_0x5b2904(0xd9)],'text':JSON[_0x5b2904(0xaa)](_0x4d978d[_0x5b2904(0x78)]),'parentId':_0x39f48d['id']});break;}case v['Delete']:{const _0x5c3808=this[_0x5b2904(0x8e)][_0x5b2904(0x7d)](_0x417a84,_0x7f0ccd,_0x4d978d[_0x5b2904(0x87)]);_0x5c3808&&_0x5c3808['parentId']&&this[_0x5b2904(0x8e)][_0x5b2904(0xb2)](_0x417a84,_0x7f0ccd,_0x4d978d['replyId']);break;}case v[_0x5b2904(0xd3)]:{this[_0x5b2904(0x8e)][_0x5b2904(0xd7)](_0x417a84,_0x7f0ccd,{'commentId':_0x4d978d[_0x5b2904(0x87)],'text':JSON['parse'](_0x4d978d['content'])});break;}case v['Solve']:{const _0x47845f=(_0x4ae88d=this['_threadCommentModel']['getUnit'](_0x4d978d['unitId'])[_0x5b2904(0x79)](_0x5ed475=>_0x5ed475[_0x5b2904(0x9d)]===_0x4d978d[_0x5b2904(0x9d)]))==null?void 0x0:_0x4ae88d[_0x5b2904(0xa2)];_0x47845f&&this['_threadCommentModel'][_0x5b2904(0x92)](_0x417a84,_0x7f0ccd,_0x47845f['id'],_0x4d978d[_0x5b2904(0x84)]===I[_0x5b2904(0xc8)]);break;}}}));}};S=V([p(0x0,_0x31fc7d(_0x4a8fdb)),p(0x1,_0x31fc7d(_0x4da4d1)),p(0x2,_0x31fc7d(_0x28fba7)),p(0x3,_0x31fc7d(_0xd68dd6))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x362616,_0x58b291,_0x3bbd32,_0x208dfc)=>{const _0x18554b=_0x44a406;for(var _0x48019a=_0x208dfc>0x1?void 0x0:_0x208dfc?k(_0x58b291,_0x3bbd32):_0x58b291,_0x51e59b=_0x362616[_0x18554b(0x85)]-0x1,_0x202f94;_0x51e59b>=0x0;_0x51e59b--)(_0x202f94=_0x362616[_0x51e59b])&&(_0x48019a=_0x202f94(_0x48019a)||_0x48019a);return _0x48019a;},_=(_0x41824d,_0x73e99c)=>(_0x13b012,_0x42b274)=>_0x73e99c(_0x13b012,_0x42b274,_0x41824d);function X(_0xfc9fbc,_0xb8a1ac){const _0x14483b=_0x44a406,_0x3ad6b1=_0xfc9fbc[_0x14483b(0xdb)][0x0];return{..._0xb8a1ac,'id':_0x3ad6b1[_0x14483b(0x87)],'resolved':_0xfc9fbc[_0x14483b(0x84)]===0x1,'dT':D(_0x3ad6b1['createTimestamp']),'personId':_0x3ad6b1[_0x14483b(0xd9)],'threadId':_0x3ad6b1[_0x14483b(0x9d)]};}function ee(_0x11395a,_0x69a7b9,_0x5d9df9){const _0x54213f=_0x44a406;var _0x122d47,_0x597028;if(((_0x597028=(_0x122d47=_0x11395a==null?void 0x0:_0x11395a['replies'])==null?void 0x0:_0x122d47[_0x54213f(0x85)])!=null?_0x597028:0x0)>0x0){const _0xc2dad=(_0x46f45a,_0x31d499)=>({'id':_0x46f45a[_0x54213f(0x87)],'threadId':_0x46f45a[_0x54213f(0x9d)],'dT':D(_0x46f45a[_0x54213f(0x7a)]),'personId':_0x46f45a[_0x54213f(0xd9)],'resolved':_0x11395a['solved']===I[_0x54213f(0xc8)],'unitId':_0x69a7b9,'subUnitId':_0x5d9df9,'text':JSON['parse'](_0x46f45a[_0x54213f(0x78)]),'parentId':_0x31d499}),_0x4a0c47=_0xc2dad(_0x11395a[_0x54213f(0xdb)][0x0]);return{..._0x4a0c47,'children':_0x11395a[_0x54213f(0xdb)][_0x54213f(0x99)](0x1)[_0x54213f(0x76)](_0xa26b12=>_0xc2dad(_0xa26b12,_0x4a0c47['id']))};}return null;}let f=class{constructor(_0x4f0060,_0x253511,_0x38f6d5,_0x4531c4){const _0x53660f=_0x44a406;this['_httpService']=_0x4f0060,this[_0x53660f(0xa5)]=_0x253511,this[_0x53660f(0xd5)]=_0x38f6d5,this[_0x53660f(0xc5)]=_0x4531c4;}async['addComment'](_0x4c6bc1){const _0x260385=_0x44a406;var _0x3d3543,_0x1de18a;const {parentId:_0xaee483,unitId:_0x20bd21,text:_0x4bf737,threadId:_0xb218e4}=_0x4c6bc1,_0x39efb6=(_0x1de18a=(_0x3d3543=_0x4bf737[_0x260385(0x8c)])==null?void 0x0:_0x3d3543[_0x260385(0x77)](_0x19e769=>_0x19e769['rangeType']===_0x31eeb2[_0x260385(0xc2)])[_0x260385(0x76)](_0x30d7bb=>_0x30d7bb['rangeId']))!=null?_0x1de18a:[],_0x276622=JSON[_0x260385(0xba)](_0x4bf737),_0x51be7f=(await this[_0x260385(0xd5)][_0x260385(0xca)](_0x20bd21))[_0x260385(0xd1)]();if(_0xaee483){const _0x414b9b={'memberId':_0x51be7f,'unitId':_0x20bd21,'content':_0x276622,'mention':_0x39efb6,'threadId':_0xb218e4},_0x1ff198=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x20bd21+_0x260385(0xd4),{'body':_0x414b9b}))[_0x260385(0x7b)][_0x260385(0xb7)];return{..._0x4c6bc1,'id':_0x1ff198[_0x260385(0x87)],'dT':_0x10572a(+_0x1ff198['createTimestamp'])['format'](_0x260385(0xae)),'personId':_0x1ff198['userId']};}else{const _0x3ea7fc={'memberId':_0x51be7f,'unitId':_0x20bd21,'content':_0x276622,'mention':_0x39efb6},_0xbf33f2=await this[_0x260385(0xa0)][_0x260385(0x9e)](_0x260385(0xaf)+_0x20bd21+'/add',{'body':_0x3ea7fc});return X(_0xbf33f2['body'][_0x260385(0xb8)],_0x4c6bc1);}}async[_0x44a406(0xd7)](_0x5a8adb){const _0xb5d137=_0x44a406;var _0x521b24,_0x2ac28a;const {text:_0x3e72ce,unitId:_0x5541b4}=_0x5a8adb,_0x4ef70a=(_0x2ac28a=(_0x521b24=_0x3e72ce[_0xb5d137(0x8c)])==null?void 0x0:_0x521b24[_0xb5d137(0x77)](_0xd920f=>_0xd920f[_0xb5d137(0x97)]===_0x31eeb2['COMMENT'])[_0xb5d137(0x76)](_0x357f34=>_0x357f34[_0xb5d137(0xcf)]))!=null?_0x2ac28a:[],_0x905bd0=JSON[_0xb5d137(0xba)](_0x3e72ce),_0x4a0646=_0x5a8adb[_0xb5d137(0x9d)],_0x46cd73=_0x5a8adb['id'],_0x23097e={'memberId':(await this['_sessionService'][_0xb5d137(0xca)](_0x5541b4))[_0xb5d137(0xd1)](),'unitId':_0x5541b4,'threadId':_0x4a0646,'mention':_0x4ef70a,'content':_0x905bd0,'replyId':_0x46cd73},_0x36c908=await this[_0xb5d137(0xa0)]['post'](_0xb5d137(0xaf)+_0x5541b4+_0xb5d137(0x82),{'body':_0x23097e});return!_0x36c908['body'][_0xb5d137(0xc1)]||_0x36c908[_0xb5d137(0x7b)]['error'][_0xb5d137(0xce)]===0x1;}async[_0x44a406(0x92)](_0xaf291b){const _0xc8b712=_0x44a406,{unitId:_0x211ff8}=_0xaf291b,_0x22c145=_0xaf291b[_0xc8b712(0x9d)],_0x5cd18b={'memberId':this[_0xc8b712(0xa5)][_0xc8b712(0xd6)]()[_0xc8b712(0xad)],'unitId':_0x211ff8,'threadId':_0x22c145,'solved':_0xaf291b[_0xc8b712(0xa3)]?I['Solved']:I[_0xc8b712(0xbf)]},_0x3d2d86=await this[_0xc8b712(0xa0)][_0xc8b712(0x9e)]('/universer-api/comment/unit/'+_0x211ff8+'/solved',{'body':_0x5cd18b});return!_0x3d2d86['body'][_0xc8b712(0xc1)]||_0x3d2d86['body'][_0xc8b712(0xc1)][_0xc8b712(0xce)]===0x1;}async[_0x44a406(0xb2)](_0x5582c7,_0x29e578,_0x2033bb,_0x1edacd){const _0x35aafa=_0x44a406,_0x25ba8c={'memberId':(await this[_0x35aafa(0xd5)][_0x35aafa(0xca)](_0x5582c7))['getMemberID'](),'threadId':_0x2033bb,'replyId':_0x1edacd,'unitId':_0x5582c7},_0x2d7caa=await this[_0x35aafa(0xa0)][_0x35aafa(0x9e)]('/universer-api/comment/unit/'+_0x5582c7+_0x35aafa(0xbc),{'body':_0x25ba8c});return!_0x2d7caa[_0x35aafa(0x7b)][_0x35aafa(0xc1)]||_0x2d7caa[_0x35aafa(0x7b)]['error']['code']===0x1;}async['listComments'](_0x30e92a,_0x2c064c,_0x1315ef){const _0x80c20=_0x44a406,_0x242dde={'unitId':_0x30e92a,'threadId':_0x1315ef},_0x400f80=await this[_0x80c20(0xa0)]['post'](_0x80c20(0xaf)+_0x30e92a+_0x80c20(0x83),{'body':_0x242dde}),_0x563c53=_0x1315ef['map'](_0x323db8=>ee(_0x400f80[_0x80c20(0x7b)][_0x80c20(0xb6)][_0x323db8],_0x30e92a,_0x2c064c))['filter'](Boolean);return Object['values'](_0x400f80[_0x80c20(0x7b)]['users'])['forEach'](_0xd65319=>{const _0x42eb3b=_0x80c20;this[_0x42eb3b(0xa5)][_0x42eb3b(0x96)](_0xd65319);}),_0x563c53;}[_0x44a406(0xb5)](_0x1724c1){const _0x5ca0cb=_0x44a406;return{'id':_0x1724c1['id'],'threadId':_0x1724c1['threadId'],'ref':_0x1724c1[_0x5ca0cb(0xab)]};}};f=Q([_(0x0,_0x31fc7d(_0x2963b5)),_(0x1,_0x31fc7d(_0x28fba7)),_(0x2,_0x31fc7d(_0x2694b8)),_(0x3,_0x31fc7d(_0xd68dd6))],f);var re=Object[_0x44a406(0xb1)],te=(_0x5aa0bd,_0x26a32e,_0x2879be,_0x37e68c)=>{const _0x29e26f=_0x44a406;for(var _0x4f3e43=_0x37e68c>0x1?void 0x0:_0x37e68c?re(_0x26a32e,_0x2879be):_0x26a32e,_0x92ec98=_0x5aa0bd[_0x29e26f(0x85)]-0x1,_0x3d62e1;_0x92ec98>=0x0;_0x92ec98--)(_0x3d62e1=_0x5aa0bd[_0x92ec98])&&(_0x4f3e43=_0x3d62e1(_0x4f3e43)||_0x4f3e43);return _0x4f3e43;},N=(_0x2b45e2,_0x510ac9)=>(_0x319f8c,_0x4a312d)=>_0x510ac9(_0x319f8c,_0x4a312d,_0x2b45e2);let g=class extends _0x533201{constructor(_0x55040f,_0x48cc94){const _0x4156bc=_0x44a406;super(),this[_0x4156bc(0xb3)]=_0x55040f,this['_threadCommentDataSource']=_0x48cc94,this[_0x4156bc(0xa7)]();}['_initDataSource'](){const _0x162e1d=_0x44a406;this[_0x162e1d(0xb3)][_0x162e1d(0x90)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x162e1d(0xcd)]=!0x1;}};g=te([N(0x0,_0xdb350c),N(0x1,_0x31fc7d(f))],g);var se=Object[_0x44a406(0xb4)],oe=Object[_0x44a406(0xb1)],ne=(_0x4cd999,_0x3a5632,_0x1f115e)=>_0x3a5632 in _0x4cd999?se(_0x4cd999,_0x3a5632,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1f115e}):_0x4cd999[_0x3a5632]=_0x1f115e,ie=(_0x2ac9a9,_0x4f60d5,_0x54fbf6,_0x14e90b)=>{const _0x350c1a=_0x44a406;for(var _0x12edeb=_0x14e90b>0x1?void 0x0:_0x14e90b?oe(_0x4f60d5,_0x54fbf6):_0x4f60d5,_0x4f0c68=_0x2ac9a9[_0x350c1a(0x85)]-0x1,_0x4bceca;_0x4f0c68>=0x0;_0x4f0c68--)(_0x4bceca=_0x2ac9a9[_0x4f0c68])&&(_0x12edeb=_0x4bceca(_0x12edeb)||_0x12edeb);return _0x12edeb;},w=(_0x3cae73,_0x3e6749)=>(_0x9c8371,_0x4e2b2f)=>_0x3e6749(_0x9c8371,_0x4e2b2f,_0x3cae73),$=(_0x4ce060,_0x1322f1,_0x2de7a7)=>ne(_0x4ce060,typeof _0x1322f1!='symbol'?_0x1322f1+'':_0x1322f1,_0x2de7a7);function _0x2bc5(){const _0x48eae5=['onReady','7061192rOgmlB','addUser','rangeType','_configService','slice','Unknown','unitId','personId','threadId','post','delete','_httpService','_config','root','resolved','UNRECOGNIZED','_userService','forEach','_initDataSource','Reply','payload','parse','ref','UNIVER_UNKNOWN','userID','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','format','getOwnPropertyDescriptor','deleteComment','_threadCommentDataSourceService','defineProperty','saveCommentToSnapshot','comments','reply','comment','4327028HendsC','stringify','users','/delete','_initUserSync','disposeWithMe','OpenOrReOpen','4447410JHdAhp','error','COMMENT','6gQATzY','_init','_injector','Delete','4570503DLJwCg','Solved','556356UPPuHo','requireSession','9qViNYy','pluginName','syncUpdateMutationToColla','code','rangeId','11pAwrzO','getMemberID','5495420Oapxoi','Edit','/reply','_sessionService','getCurrentUser','updateComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userId','type','replies','get','3eyTXlF','map','filter','content','find','createTimestamp','body','size','getComment','add','603194qoQNme','getUser','commentUpdate$','/edit','/list','solved','length','subscribe','replyId','Solve','Add','getUnit','user','customRanges','_commentService','_threadCommentModel','pipe','dataSource','onStarting','resolveComment','setConfig'];_0x2bc5=function(){return _0x48eae5;};return _0x2bc5();}let b=class extends _0x29ebf4{constructor(_0x12573a=M,_0x45449c,_0x3f4685){const _0x2a9c07=_0x44a406;super(),this[_0x2a9c07(0xa1)]=_0x12573a,this[_0x2a9c07(0xc5)]=_0x45449c,this[_0x2a9c07(0x98)]=_0x3f4685;const {..._0xe4e546}=_0x475af6({},M,this['_config']);this[_0x2a9c07(0x98)][_0x2a9c07(0x93)](z,_0xe4e546);}[_0x44a406(0x91)](){const _0x2698d1=_0x44a406;[[f],[g],[S]][_0x2698d1(0xa6)](_0x5941ac=>{const _0x1eb197=_0x2698d1;this[_0x1eb197(0xc5)][_0x1eb197(0x7e)](_0x5941ac);});}[_0x44a406(0x94)](){const _0x25e721=_0x44a406;this[_0x25e721(0xc5)][_0x25e721(0x74)](g),this['_injector']['get'](S);}};function _0x57ec(_0x48af42,_0x797010){const _0x2bc5cc=_0x2bc5();return _0x57ec=function(_0x57ecf4,_0x587c7c){_0x57ecf4=_0x57ecf4-0x74;let _0x273aeb=_0x2bc5cc[_0x57ecf4];return _0x273aeb;},_0x57ec(_0x48af42,_0x797010);}$(b,_0x44a406(0xcc),W),$(b,'type',_0xcf7a68[_0x44a406(0xac)]),b=ie([_0x3289c3(_0x188891,_0x438bfa,_0x2ad2ef),w(0x1,_0x31fc7d(_0xd68dd6)),w(0x2,_0x30af86)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3b7f(){const _0x4162ad=['slice','get','@univerjs-pro/collaboration-client','3685346JUvJhD','UniverProThreadCommentDatasource','ThreadCommentModel','_sessionService','@univerjs/core','subscribe','_configService','YYYY/MM/DD\x20HH:mm','UniverThreadCommentUi','add','body','IConfigService','filter','forEach','bufferTime','_threadCommentModel','Module','defineProperty','addComment','resolveComment','pluginName','UNRECOGNIZED','replyId','/universer-api/comment/unit/','payload','replies','merge','getUnit','_commentService','UserManagerService','toStringTag','_init','3732495QHkUiR','_injector','getCurrentUser','rangeId','_httpService','/list','onReady','Edit','error','dataSource','rxjs','requireSession','user','CommentService','@univerjs/thread-comment','_threadCommentDataSource','unitId','content','root','IThreadCommentDataSourceService','addUser','6502728WhZrpk','UniverThreadCommentUIPlugin','Disposable','threadId','parentId','getOwnPropertyDescriptor','exports','UNIVER_UNKNOWN','map','Reply','reply','getUser','Delete','_config','thread-comment-data-source.config','305172KQlqlO','post','_userService','updateComment','1545270flMLGc','symbol','@univerjs/network','OpenOrReOpen','@univerjs/thread-comment-ui','17299476MGQtxs','UniverNetwork','UniverThreadComment','Plugin','getMemberID','users','userID','find','resolved','/reply','object','dayjs','Injector','saveCommentToSnapshot','solved','size','values','/add','Inject','deleteComment','onStarting','CollaborationSessionService','_threadCommentDataSourceService','personId','101992wzdQFB','customRanges','getComment','_initDataSource','2wSVWFR','CustomRangeType','type','UniverThreadCommentDataSourcePlugin','delete','HTTPService','ref','8rnewXu','Unknown','createTimestamp','commentUpdate$','Solved','@univerjs-pro/license','userId','pipe','amd','Add','parse','comments','_initUserSync','rangeType','code','format','syncUpdateMutationToColla','/solved','Solve','length'];_0x3b7f=function(){return _0x4162ad;};return _0x3b7f();}function _0x22fc(_0x5a689a,_0x1fe581){const _0x3b7fb8=_0x3b7f();return _0x22fc=function(_0x22fc1f,_0x347221){_0x22fc1f=_0x22fc1f-0xdb;let _0x418d8c=_0x3b7fb8[_0x22fc1f];return _0x418d8c;},_0x22fc(_0x5a689a,_0x1fe581);}(function(_0x28ae13,_0x5e1faf){const _0xeaa0cd=_0x22fc,_0x8b311=_0x28ae13();while(!![]){try{const _0x73c25d=parseInt(_0xeaa0cd(0x153))/0x1+parseInt(_0xeaa0cd(0x157))/0x2*(-parseInt(_0xeaa0cd(0x136))/0x3)+-parseInt(_0xeaa0cd(0x132))/0x4+parseInt(_0xeaa0cd(0x10e))/0x5+-parseInt(_0xeaa0cd(0x123))/0x6+-parseInt(_0xeaa0cd(0xee))/0x7+-parseInt(_0xeaa0cd(0x15e))/0x8*(-parseInt(_0xeaa0cd(0x13b))/0x9);if(_0x73c25d===_0x5e1faf)break;else _0x8b311['push'](_0x8b311['shift']());}catch(_0x50f91c){_0x8b311['push'](_0x8b311['shift']());}}}(_0x3b7f,0x8aeae),function(_0x1557f7,_0x1b7ed9){const _0x3aa7b8=_0x22fc;typeof exports==_0x3aa7b8(0x145)&&typeof module<'u'?_0x1b7ed9(exports,require(_0x3aa7b8(0xed)),require('@univerjs-pro/license'),require(_0x3aa7b8(0xf2)),require(_0x3aa7b8(0x13a)),require(_0x3aa7b8(0x11c)),require('rxjs'),require(_0x3aa7b8(0x138))):typeof define=='function'&&define[_0x3aa7b8(0xdf)]?define([_0x3aa7b8(0x129),_0x3aa7b8(0xed),_0x3aa7b8(0xdc),'@univerjs/core',_0x3aa7b8(0x13a),_0x3aa7b8(0x11c),_0x3aa7b8(0x118),_0x3aa7b8(0x138)],_0x1b7ed9):(_0x1557f7=typeof globalThis<'u'?globalThis:_0x1557f7||self,_0x1b7ed9(_0x1557f7[_0x3aa7b8(0xef)]={},_0x1557f7['UniverProCollaborationClient'],_0x1557f7['UniverProLicense'],_0x1557f7['UniverCore'],_0x1557f7[_0x3aa7b8(0xf6)],_0x1557f7[_0x3aa7b8(0x13d)],_0x1557f7['rxjs'],_0x1557f7[_0x3aa7b8(0x13c)]));}(this,function(_0x3024ba,_0x54e75,_0x19c446,_0x46f0ca,_0x3ad3db,_0xf0eb6c,_0x1679ec,_0x2a6a49){'use strict';const _0x103ccf=_0x22fc;const _0x1c10bb='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x504a42=(_0x4f88a6=>(_0x4f88a6[_0x4f88a6[_0x103ccf(0x139)]=0x0]=_0x103ccf(0x139),_0x4f88a6[_0x4f88a6[_0x103ccf(0xdb)]=0x1]=_0x103ccf(0xdb),_0x4f88a6[_0x4f88a6[_0x103ccf(0x103)]=-0x1]=_0x103ccf(0x103),_0x4f88a6))(_0x504a42||{}),_0x563ab6=(_0x15d220=>(_0x15d220[_0x15d220[_0x103ccf(0x15f)]=0x0]=_0x103ccf(0x15f),_0x15d220[_0x15d220[_0x103ccf(0xe0)]=0x1]='Add',_0x15d220[_0x15d220[_0x103ccf(0x12c)]=0x2]=_0x103ccf(0x12c),_0x15d220[_0x15d220['Edit']=0x3]=_0x103ccf(0x115),_0x15d220[_0x15d220[_0x103ccf(0x12f)]=0x4]='Delete',_0x15d220[_0x15d220[_0x103ccf(0xe9)]=0x5]='Solve',_0x15d220[_0x15d220[_0x103ccf(0x103)]=-0x1]='UNRECOGNIZED',_0x15d220))(_0x563ab6||{});const _0x5062a2=_0x3611e9=>_0x46f0ca[_0x103ccf(0x146)](new Date(+_0x3611e9))[_0x103ccf(0xe6)](_0x103ccf(0xf5)),_0x3319d4=async(_0x17d4a4,_0x5b4c58)=>{const _0x20c21a=_0x103ccf,_0x994c26=_0x17d4a4[_0x20c21a(0xec)](_0x46f0ca[_0x20c21a(0x10b)]),_0x349077=_0x17d4a4[_0x20c21a(0xec)](_0x2a6a49[_0x20c21a(0x15c)]);_0x5b4c58[_0x20c21a(0xfb)](_0x671737=>{const _0x1faadf=_0x20c21a;_0x994c26[_0x1faadf(0x12e)](_0x671737)&&_0x5b4c58[_0x1faadf(0x15b)](_0x671737);}),_0x5b4c58[_0x20c21a(0x14a)]&&(await _0x349077[_0x20c21a(0xec)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5b4c58]}}))[_0x20c21a(0xf8)]['users']['forEach'](_0x23fd4f=>{const _0x3be789=_0x20c21a;_0x23fd4f&&_0x994c26[_0x3be789(0x122)](_0x23fd4f);});};var _0x1a0097=Object[_0x103ccf(0x128)],_0x2bd9eb=(_0x1bc67f,_0x4d08fa,_0x599cbd,_0x5bbc6e)=>{const _0x22e4f5=_0x103ccf;for(var _0x414691=_0x5bbc6e>0x1?void 0x0:_0x5bbc6e?_0x1a0097(_0x4d08fa,_0x599cbd):_0x4d08fa,_0x43bca9=_0x1bc67f[_0x22e4f5(0xea)]-0x1,_0x3bf5a0;_0x43bca9>=0x0;_0x43bca9--)(_0x3bf5a0=_0x1bc67f[_0x43bca9])&&(_0x414691=_0x3bf5a0(_0x414691)||_0x414691);return _0x414691;},_0x5da8af=(_0x1efda8,_0x4925cf)=>(_0xebbc34,_0x3d8623)=>_0x4925cf(_0xebbc34,_0x3d8623,_0x1efda8);let _0x484d31=class extends _0x46f0ca['Disposable']{constructor(_0x541c38,_0x78b5b6,_0x4b3271,_0x54bf72){const _0x9cae75=_0x103ccf;super(),this[_0x9cae75(0x10a)]=_0x541c38,this[_0x9cae75(0xfd)]=_0x78b5b6,this['_userService']=_0x4b3271,this['_injector']=_0x54bf72,this[_0x9cae75(0x10d)](),this[_0x9cae75(0xe3)]();}['_initUserSync'](){const _0x5c3987=_0x103ccf;this['disposeWithMe'](this[_0x5c3987(0xfd)]['commentUpdate$'][_0x5c3987(0xde)](_0x1679ec[_0x5c3987(0xfc)](0x10))[_0x5c3987(0xf3)](_0x41b260=>{const _0x38a9c3=_0x5c3987,_0x599888=new Set();_0x41b260['forEach'](_0x4e7550=>{const _0xb01d79=_0x22fc;switch(_0x4e7550[_0xb01d79(0x159)]){case'add':{const _0x3e5943=_0x4e7550[_0xb01d79(0x106)][_0xb01d79(0x152)];_0x599888[_0xb01d79(0xf7)](_0x3e5943);break;}}}),_0x3319d4(this[_0x38a9c3(0x10f)],_0x599888);}));}[_0x103ccf(0x10d)](){const _0x537eaa=_0x103ccf;this['disposeWithMe'](this[_0x537eaa(0x10a)][_0x537eaa(0x161)][_0x537eaa(0xf3)](async _0x5e3370=>{const _0x59c3e4=_0x537eaa;var _0x4620b9,_0x18d9f0,_0x45e945,_0x4a08a0;const _0x35c057=(_0x4620b9=this[_0x59c3e4(0xfd)][_0x59c3e4(0x109)](_0x5e3370[_0x59c3e4(0x11e)])[_0x59c3e4(0x142)](_0x160eb2=>_0x160eb2[_0x59c3e4(0x126)]===_0x5e3370[_0x59c3e4(0x126)]))==null?void 0x0:_0x4620b9[_0x59c3e4(0x120)];if(!_0x35c057)return;const {unitId:_0x32eb08,subUnitId:_0xd6c8f5}=_0x35c057;switch(_0x5e3370[_0x59c3e4(0x11a)]&&this[_0x59c3e4(0x134)]['addUser'](_0x5e3370['user']),_0x5e3370[_0x59c3e4(0x159)]){case _0x563ab6[_0x59c3e4(0xe0)]:break;case _0x563ab6['Reply']:{this[_0x59c3e4(0xfd)][_0x59c3e4(0x100)](_0x32eb08,_0xd6c8f5,{'unitId':_0x32eb08,'subUnitId':_0xd6c8f5,'ref':'','id':_0x5e3370[_0x59c3e4(0x104)],'dT':_0x5062a2(+_0x5e3370[_0x59c3e4(0x160)]),'threadId':_0x5e3370['threadId'],'personId':(_0x45e945=(_0x18d9f0=_0x5e3370[_0x59c3e4(0x11a)])==null?void 0x0:_0x18d9f0[_0x59c3e4(0x141)])!=null?_0x45e945:_0x5e3370['userId'],'text':JSON[_0x59c3e4(0xe1)](_0x5e3370[_0x59c3e4(0x11f)]),'parentId':_0x35c057['id']});break;}case _0x563ab6[_0x59c3e4(0x12f)]:{const _0x1b187c=this['_threadCommentModel'][_0x59c3e4(0x155)](_0x32eb08,_0xd6c8f5,_0x5e3370['replyId']);_0x1b187c&&_0x1b187c[_0x59c3e4(0x127)]&&this['_threadCommentModel'][_0x59c3e4(0x14e)](_0x32eb08,_0xd6c8f5,_0x5e3370[_0x59c3e4(0x104)]);break;}case _0x563ab6['Edit']:{this[_0x59c3e4(0xfd)][_0x59c3e4(0x135)](_0x32eb08,_0xd6c8f5,{'commentId':_0x5e3370['replyId'],'text':JSON[_0x59c3e4(0xe1)](_0x5e3370[_0x59c3e4(0x11f)])});break;}case _0x563ab6[_0x59c3e4(0xe9)]:{const _0x223028=(_0x4a08a0=this[_0x59c3e4(0xfd)]['getUnit'](_0x5e3370['unitId'])[_0x59c3e4(0x142)](_0x117fa8=>_0x117fa8[_0x59c3e4(0x126)]===_0x5e3370['threadId']))==null?void 0x0:_0x4a08a0[_0x59c3e4(0x120)];_0x223028&&this[_0x59c3e4(0xfd)][_0x59c3e4(0x101)](_0x32eb08,_0xd6c8f5,_0x223028['id'],_0x5e3370[_0x59c3e4(0x149)]===_0x504a42[_0x59c3e4(0xdb)]);break;}}}));}};_0x484d31=_0x2bd9eb([_0x5da8af(0x0,_0x46f0ca[_0x103ccf(0x14d)](_0x54e75[_0x103ccf(0x11b)])),_0x5da8af(0x1,_0x46f0ca['Inject'](_0xf0eb6c[_0x103ccf(0xf0)])),_0x5da8af(0x2,_0x46f0ca[_0x103ccf(0x14d)](_0x46f0ca[_0x103ccf(0x10b)])),_0x5da8af(0x3,_0x46f0ca[_0x103ccf(0x14d)](_0x46f0ca[_0x103ccf(0x147)]))],_0x484d31);const _0x12747a=_0x103ccf(0x131),_0x1b91e7={};var _0x4e039=Object[_0x103ccf(0x128)],_0x4a24f7=(_0x51792a,_0x24ce7d,_0x6abbb1,_0x47de16)=>{const _0x52bbce=_0x103ccf;for(var _0x38e635=_0x47de16>0x1?void 0x0:_0x47de16?_0x4e039(_0x24ce7d,_0x6abbb1):_0x24ce7d,_0x40ce87=_0x51792a[_0x52bbce(0xea)]-0x1,_0x2e395d;_0x40ce87>=0x0;_0x40ce87--)(_0x2e395d=_0x51792a[_0x40ce87])&&(_0x38e635=_0x2e395d(_0x38e635)||_0x38e635);return _0x38e635;},_0x111b51=(_0x39027c,_0x3a94b0)=>(_0x69ca17,_0x54e3c6)=>_0x3a94b0(_0x69ca17,_0x54e3c6,_0x39027c);function _0x44bcee(_0x28eb43,_0x73b48a){const _0x1b15a1=_0x103ccf,_0x4dbba=_0x28eb43[_0x1b15a1(0x107)][0x0];return{..._0x73b48a,'id':_0x4dbba[_0x1b15a1(0x104)],'resolved':_0x28eb43['solved']===0x1,'dT':_0x5062a2(_0x4dbba[_0x1b15a1(0x160)]),'personId':_0x4dbba['userId'],'threadId':_0x4dbba[_0x1b15a1(0x126)]};}function _0x1838b1(_0x18924e,_0x287190,_0x10106b){const _0x4437f1=_0x103ccf;var _0x42cb65,_0x50becc;if(((_0x50becc=(_0x42cb65=_0x18924e==null?void 0x0:_0x18924e['replies'])==null?void 0x0:_0x42cb65[_0x4437f1(0xea)])!=null?_0x50becc:0x0)>0x0){const _0x328e53=(_0x4cf97c,_0x5bd260)=>({'id':_0x4cf97c[_0x4437f1(0x104)],'threadId':_0x4cf97c[_0x4437f1(0x126)],'dT':_0x5062a2(_0x4cf97c[_0x4437f1(0x160)]),'personId':_0x4cf97c[_0x4437f1(0xdd)],'resolved':_0x18924e[_0x4437f1(0x149)]===_0x504a42[_0x4437f1(0xdb)],'unitId':_0x287190,'subUnitId':_0x10106b,'text':JSON[_0x4437f1(0xe1)](_0x4cf97c[_0x4437f1(0x11f)]),'parentId':_0x5bd260}),_0x4da6a5=_0x328e53(_0x18924e[_0x4437f1(0x107)][0x0]);return{..._0x4da6a5,'children':_0x18924e[_0x4437f1(0x107)][_0x4437f1(0xeb)](0x1)[_0x4437f1(0x12b)](_0x15a480=>_0x328e53(_0x15a480,_0x4da6a5['id']))};}return null;}let _0x3c3717=class{constructor(_0x2a43ec,_0x4c02c6,_0x4c0d1d,_0x37a2da){const _0x28e5c7=_0x103ccf;this[_0x28e5c7(0x112)]=_0x2a43ec,this[_0x28e5c7(0x134)]=_0x4c02c6,this['_sessionService']=_0x4c0d1d,this[_0x28e5c7(0x10f)]=_0x37a2da;}async['addComment'](_0xf33ba3){const _0x48c3c8=_0x103ccf;var _0x595898,_0x2e2005;const {parentId:_0x4994ac,unitId:_0x59af4c,text:_0x4dbdfa,threadId:_0x435c8a}=_0xf33ba3,_0x92bba0=(_0x2e2005=(_0x595898=_0x4dbdfa[_0x48c3c8(0x154)])==null?void 0x0:_0x595898[_0x48c3c8(0xfa)](_0x5996b2=>_0x5996b2[_0x48c3c8(0xe4)]===_0x46f0ca[_0x48c3c8(0x158)]['COMMENT'])[_0x48c3c8(0x12b)](_0x1a8e7e=>_0x1a8e7e[_0x48c3c8(0x111)]))!=null?_0x2e2005:[],_0x288807=JSON['stringify'](_0x4dbdfa),_0x588ac3=(await this[_0x48c3c8(0xf1)][_0x48c3c8(0x119)](_0x59af4c))[_0x48c3c8(0x13f)]();if(_0x4994ac){const _0x2358cb={'memberId':_0x588ac3,'unitId':_0x59af4c,'content':_0x288807,'mention':_0x92bba0,'threadId':_0x435c8a},_0x155d9f=(await this[_0x48c3c8(0x112)][_0x48c3c8(0x133)](_0x48c3c8(0x105)+_0x59af4c+_0x48c3c8(0x144),{'body':_0x2358cb}))[_0x48c3c8(0xf8)][_0x48c3c8(0x12d)];return{..._0xf33ba3,'id':_0x155d9f[_0x48c3c8(0x104)],'dT':_0x46f0ca[_0x48c3c8(0x146)](+_0x155d9f[_0x48c3c8(0x160)])[_0x48c3c8(0xe6)](_0x48c3c8(0xf5)),'personId':_0x155d9f['userId']};}else{const _0x41b3b1={'memberId':_0x588ac3,'unitId':_0x59af4c,'content':_0x288807,'mention':_0x92bba0},_0x27ba86=await this[_0x48c3c8(0x112)][_0x48c3c8(0x133)]('/universer-api/comment/unit/'+_0x59af4c+_0x48c3c8(0x14c),{'body':_0x41b3b1});return _0x44bcee(_0x27ba86[_0x48c3c8(0xf8)]['comment'],_0xf33ba3);}}async[_0x103ccf(0x135)](_0x27aa38){const _0x34f3e8=_0x103ccf;var _0x3430d5,_0x5c5127;const {text:_0x3134d6,unitId:_0x209b8e}=_0x27aa38,_0x3da449=(_0x5c5127=(_0x3430d5=_0x3134d6[_0x34f3e8(0x154)])==null?void 0x0:_0x3430d5['filter'](_0x4343b2=>_0x4343b2[_0x34f3e8(0xe4)]===_0x46f0ca['CustomRangeType']['COMMENT'])[_0x34f3e8(0x12b)](_0x47b68f=>_0x47b68f[_0x34f3e8(0x111)]))!=null?_0x5c5127:[],_0x1103ca=JSON['stringify'](_0x3134d6),_0x38517c=_0x27aa38[_0x34f3e8(0x126)],_0x158119=_0x27aa38['id'],_0x4a9c3f={'memberId':(await this['_sessionService']['requireSession'](_0x209b8e))['getMemberID'](),'unitId':_0x209b8e,'threadId':_0x38517c,'mention':_0x3da449,'content':_0x1103ca,'replyId':_0x158119},_0x1ec1d1=await this[_0x34f3e8(0x112)][_0x34f3e8(0x133)](_0x34f3e8(0x105)+_0x209b8e+'/edit',{'body':_0x4a9c3f});return!_0x1ec1d1[_0x34f3e8(0xf8)][_0x34f3e8(0x116)]||_0x1ec1d1['body']['error']['code']===0x1;}async[_0x103ccf(0x101)](_0x56f30d){const _0x158c35=_0x103ccf,{unitId:_0x4feafc}=_0x56f30d,_0x527b4e=_0x56f30d['threadId'],_0xbb32c7={'memberId':this[_0x158c35(0x134)][_0x158c35(0x110)]()[_0x158c35(0x141)],'unitId':_0x4feafc,'threadId':_0x527b4e,'solved':_0x56f30d[_0x158c35(0x143)]?_0x504a42['Solved']:_0x504a42['OpenOrReOpen']},_0x3ded9a=await this[_0x158c35(0x112)]['post'](_0x158c35(0x105)+_0x4feafc+_0x158c35(0xe8),{'body':_0xbb32c7});return!_0x3ded9a[_0x158c35(0xf8)][_0x158c35(0x116)]||_0x3ded9a['body'][_0x158c35(0x116)]['code']===0x1;}async['deleteComment'](_0x15d589,_0x524f5e,_0x1e83da,_0x15a128){const _0xe6a9a5=_0x103ccf,_0x539a1d={'memberId':(await this[_0xe6a9a5(0xf1)][_0xe6a9a5(0x119)](_0x15d589))[_0xe6a9a5(0x13f)](),'threadId':_0x1e83da,'replyId':_0x15a128,'unitId':_0x15d589},_0x45d773=await this[_0xe6a9a5(0x112)][_0xe6a9a5(0x133)](_0xe6a9a5(0x105)+_0x15d589+'/delete',{'body':_0x539a1d});return!_0x45d773[_0xe6a9a5(0xf8)][_0xe6a9a5(0x116)]||_0x45d773[_0xe6a9a5(0xf8)][_0xe6a9a5(0x116)][_0xe6a9a5(0xe5)]===0x1;}async['listComments'](_0x5e74eb,_0x11359b,_0x46b99d){const _0x13f7b1=_0x103ccf,_0x5d2f7c={'unitId':_0x5e74eb,'threadId':_0x46b99d},_0x508125=await this[_0x13f7b1(0x112)]['post'](_0x13f7b1(0x105)+_0x5e74eb+_0x13f7b1(0x113),{'body':_0x5d2f7c}),_0x5d350d=_0x46b99d[_0x13f7b1(0x12b)](_0x44f38e=>_0x1838b1(_0x508125[_0x13f7b1(0xf8)][_0x13f7b1(0xe2)][_0x44f38e],_0x5e74eb,_0x11359b))[_0x13f7b1(0xfa)](Boolean);return Object[_0x13f7b1(0x14b)](_0x508125['body'][_0x13f7b1(0x140)])[_0x13f7b1(0xfb)](_0x484642=>{const _0x35bf24=_0x13f7b1;this[_0x35bf24(0x134)][_0x35bf24(0x122)](_0x484642);}),_0x5d350d;}[_0x103ccf(0x148)](_0x252152){const _0x5c7926=_0x103ccf;return{'id':_0x252152['id'],'threadId':_0x252152['threadId'],'ref':_0x252152[_0x5c7926(0x15d)]};}};_0x3c3717=_0x4a24f7([_0x111b51(0x0,_0x46f0ca[_0x103ccf(0x14d)](_0x2a6a49['HTTPService'])),_0x111b51(0x1,_0x46f0ca['Inject'](_0x46f0ca[_0x103ccf(0x10b)])),_0x111b51(0x2,_0x46f0ca[_0x103ccf(0x14d)](_0x54e75[_0x103ccf(0x150)])),_0x111b51(0x3,_0x46f0ca[_0x103ccf(0x14d)](_0x46f0ca[_0x103ccf(0x147)]))],_0x3c3717);var _0x2aaac7=Object['getOwnPropertyDescriptor'],_0x23f59f=(_0x3c1f4e,_0x16cea1,_0x4d4761,_0x1f2050)=>{const _0x4c49a6=_0x103ccf;for(var _0x1415d7=_0x1f2050>0x1?void 0x0:_0x1f2050?_0x2aaac7(_0x16cea1,_0x4d4761):_0x16cea1,_0x3ae364=_0x3c1f4e[_0x4c49a6(0xea)]-0x1,_0x5d8969;_0x3ae364>=0x0;_0x3ae364--)(_0x5d8969=_0x3c1f4e[_0x3ae364])&&(_0x1415d7=_0x5d8969(_0x1415d7)||_0x1415d7);return _0x1415d7;},_0x49c3b0=(_0x172f34,_0x5c6943)=>(_0x81df2b,_0x3216f0)=>_0x5c6943(_0x81df2b,_0x3216f0,_0x172f34);let _0x90e452=class extends _0x46f0ca[_0x103ccf(0x125)]{constructor(_0x4ce1d7,_0x7af094){const _0x3445bd=_0x103ccf;super(),this[_0x3445bd(0x151)]=_0x4ce1d7,this['_threadCommentDataSource']=_0x7af094,this[_0x3445bd(0x156)]();}[_0x103ccf(0x156)](){const _0x386116=_0x103ccf;this[_0x386116(0x151)][_0x386116(0x117)]=this[_0x386116(0x11d)],this[_0x386116(0x151)][_0x386116(0xe7)]=!0x1;}};_0x90e452=_0x23f59f([_0x49c3b0(0x0,_0xf0eb6c[_0x103ccf(0x121)]),_0x49c3b0(0x1,_0x46f0ca['Inject'](_0x3c3717))],_0x90e452);var _0x5906cf=Object[_0x103ccf(0xff)],_0x39b356=Object[_0x103ccf(0x128)],_0x5307d1=(_0x1205ff,_0x10849f,_0x13341d)=>_0x10849f in _0x1205ff?_0x5906cf(_0x1205ff,_0x10849f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x13341d}):_0x1205ff[_0x10849f]=_0x13341d,_0x4554f3=(_0x5bb76d,_0x2c6aa6,_0x222d7,_0x1b4748)=>{const _0x1e75cd=_0x103ccf;for(var _0x29b0b5=_0x1b4748>0x1?void 0x0:_0x1b4748?_0x39b356(_0x2c6aa6,_0x222d7):_0x2c6aa6,_0x159a60=_0x5bb76d[_0x1e75cd(0xea)]-0x1,_0x4a7ffe;_0x159a60>=0x0;_0x159a60--)(_0x4a7ffe=_0x5bb76d[_0x159a60])&&(_0x29b0b5=_0x4a7ffe(_0x29b0b5)||_0x29b0b5);return _0x29b0b5;},_0x258440=(_0xd4382b,_0x4a0efc)=>(_0x4b50d8,_0xb85207)=>_0x4a0efc(_0x4b50d8,_0xb85207,_0xd4382b),_0x14155e=(_0xd9a57c,_0x34d2b1,_0x51e112)=>_0x5307d1(_0xd9a57c,typeof _0x34d2b1!=_0x103ccf(0x137)?_0x34d2b1+'':_0x34d2b1,_0x51e112);_0x3024ba[_0x103ccf(0x15a)]=class extends _0x46f0ca[_0x103ccf(0x13e)]{constructor(_0xdec7b5=_0x1b91e7,_0x15746f,_0x19e2e6){const _0x874001=_0x103ccf;super(),this[_0x874001(0x130)]=_0xdec7b5,this[_0x874001(0x10f)]=_0x15746f,this[_0x874001(0xf4)]=_0x19e2e6;const {..._0x2ac372}=_0x46f0ca[_0x874001(0x108)]({},_0x1b91e7,this[_0x874001(0x130)]);this[_0x874001(0xf4)]['setConfig'](_0x12747a,_0x2ac372);}[_0x103ccf(0x14f)](){[[_0x3c3717],[_0x90e452],[_0x484d31]]['forEach'](_0x1a7073=>{const _0x10d284=_0x22fc;this[_0x10d284(0x10f)][_0x10d284(0xf7)](_0x1a7073);});}[_0x103ccf(0x114)](){const _0x107573=_0x103ccf;this[_0x107573(0x10f)]['get'](_0x90e452),this['_injector'][_0x107573(0xec)](_0x484d31);}},_0x14155e(_0x3024ba[_0x103ccf(0x15a)],_0x103ccf(0x102),_0x1c10bb),_0x14155e(_0x3024ba[_0x103ccf(0x15a)],'type',_0x46f0ca['UniverInstanceType'][_0x103ccf(0x12a)]),_0x3024ba[_0x103ccf(0x15a)]=_0x4554f3([_0x46f0ca['DependentOn'](_0x3ad3db[_0x103ccf(0x124)],_0x54e75['UniverCollaborationClientPlugin'],_0x19c446['UniverLicensePlugin']),_0x258440(0x1,_0x46f0ca['Inject'](_0x46f0ca[_0x103ccf(0x147)])),_0x258440(0x2,_0x46f0ca[_0x103ccf(0xf9)])],_0x3024ba[_0x103ccf(0x15a)]),Object[_0x103ccf(0xff)](_0x3024ba,Symbol[_0x103ccf(0x10c)],{'value':_0x103ccf(0xfe)});}));
1
+ function _0x5a50(_0x4e7ccf,_0x3dc4a7){const _0x5f23ba=_0x5f23();return _0x5a50=function(_0x5a5037,_0x130f74){_0x5a5037=_0x5a5037-0x7b;let _0x55fc9d=_0x5f23ba[_0x5a5037];return _0x55fc9d;},_0x5a50(_0x4e7ccf,_0x3dc4a7);}(function(_0x435b42,_0x899eb2){const _0x550c38=_0x5a50,_0x1161c5=_0x435b42();while(!![]){try{const _0x5dd73f=-parseInt(_0x550c38(0x9a))/0x1*(-parseInt(_0x550c38(0xd4))/0x2)+-parseInt(_0x550c38(0x81))/0x3+parseInt(_0x550c38(0xe8))/0x4*(parseInt(_0x550c38(0xd3))/0x5)+-parseInt(_0x550c38(0x7e))/0x6*(parseInt(_0x550c38(0xc9))/0x7)+parseInt(_0x550c38(0xd8))/0x8+-parseInt(_0x550c38(0xc1))/0x9+parseInt(_0x550c38(0xb3))/0xa*(-parseInt(_0x550c38(0x9c))/0xb);if(_0x5dd73f===_0x899eb2)break;else _0x1161c5['push'](_0x1161c5['shift']());}catch(_0x180c26){_0x1161c5['push'](_0x1161c5['shift']());}}}(_0x5f23,0x493b0),function(_0x29e976,_0x83c432){const _0x1d5161=_0x5a50;typeof exports=='object'&&typeof module<'u'?_0x83c432(exports,require(_0x1d5161(0x93)),require('@univerjs-pro/license'),require(_0x1d5161(0xa3)),require(_0x1d5161(0xf8)),require('@univerjs/thread-comment'),require(_0x1d5161(0xea)),require(_0x1d5161(0xe4))):typeof define=='function'&&define[_0x1d5161(0x95)]?define([_0x1d5161(0x7b),_0x1d5161(0x93),'@univerjs-pro/license',_0x1d5161(0xa3),_0x1d5161(0xf8),_0x1d5161(0xbe),_0x1d5161(0xea),_0x1d5161(0xe4)],_0x83c432):(_0x29e976=typeof globalThis<'u'?globalThis:_0x29e976||self,_0x83c432(_0x29e976[_0x1d5161(0xed)]={},_0x29e976[_0x1d5161(0xa1)],_0x29e976[_0x1d5161(0xba)],_0x29e976[_0x1d5161(0x106)],_0x29e976[_0x1d5161(0xc8)],_0x29e976[_0x1d5161(0xe7)],_0x29e976['rxjs'],_0x29e976[_0x1d5161(0xeb)]));}(this,function(_0x2537c5,_0x228a55,_0x437b1e,_0x5360a5,_0x21b3bf,_0x4a163c,_0x2a7d93,_0x5ac8ce){'use strict';const _0x1a5ea4=_0x5a50;const _0x19f7b2=_0x1a5ea4(0x88);var _0x4a5170=(_0x2b43fb=>(_0x2b43fb[_0x2b43fb[_0x1a5ea4(0xca)]=0x0]=_0x1a5ea4(0xca),_0x2b43fb[_0x2b43fb[_0x1a5ea4(0xf0)]=0x1]=_0x1a5ea4(0xf0),_0x2b43fb[_0x2b43fb[_0x1a5ea4(0xa7)]=-0x1]=_0x1a5ea4(0xa7),_0x2b43fb))(_0x4a5170||{}),_0x51f684=(_0x120eb8=>(_0x120eb8[_0x120eb8[_0x1a5ea4(0xcf)]=0x0]='Unknown',_0x120eb8[_0x120eb8[_0x1a5ea4(0xf7)]=0x1]='Add',_0x120eb8[_0x120eb8[_0x1a5ea4(0xf6)]=0x2]=_0x1a5ea4(0xf6),_0x120eb8[_0x120eb8[_0x1a5ea4(0xf9)]=0x3]=_0x1a5ea4(0xf9),_0x120eb8[_0x120eb8[_0x1a5ea4(0xe1)]=0x4]=_0x1a5ea4(0xe1),_0x120eb8[_0x120eb8[_0x1a5ea4(0xe9)]=0x5]=_0x1a5ea4(0xe9),_0x120eb8[_0x120eb8[_0x1a5ea4(0xa7)]=-0x1]=_0x1a5ea4(0xa7),_0x120eb8))(_0x51f684||{});const _0x11e6fa=_0x1a83e7=>_0x5360a5['dayjs'](new Date(+_0x1a83e7))[_0x1a5ea4(0xff)]('YYYY/MM/DD\x20HH:mm'),_0x131cff=async(_0x59b093,_0x189fde)=>{const _0x13bd9d=_0x1a5ea4,_0x4d6c49=_0x59b093[_0x13bd9d(0xf4)](_0x5360a5['UserManagerService']),_0x9e7287=_0x59b093['get'](_0x5ac8ce[_0x13bd9d(0xc0)]);_0x189fde[_0x13bd9d(0xaf)](_0x50d334=>{const _0x182ee1=_0x13bd9d;_0x4d6c49[_0x182ee1(0xc2)](_0x50d334)&&_0x189fde[_0x182ee1(0xfd)](_0x50d334);}),_0x189fde[_0x13bd9d(0x85)]&&(await _0x9e7287['get'](_0x13bd9d(0x8d),{'params':{'userIDs':[..._0x189fde]}}))[_0x13bd9d(0xf5)]['users'][_0x13bd9d(0xaf)](_0x22865c=>{const _0x21098e=_0x13bd9d;_0x22865c&&_0x4d6c49[_0x21098e(0x9f)](_0x22865c);});};var _0x14f4a7=Object['getOwnPropertyDescriptor'],_0x5718e0=(_0x56f3cc,_0x251318,_0x57212c,_0x566f7f)=>{const _0x5cde3e=_0x1a5ea4;for(var _0x3cd4a0=_0x566f7f>0x1?void 0x0:_0x566f7f?_0x14f4a7(_0x251318,_0x57212c):_0x251318,_0x33dbb0=_0x56f3cc[_0x5cde3e(0xf1)]-0x1,_0x2b1607;_0x33dbb0>=0x0;_0x33dbb0--)(_0x2b1607=_0x56f3cc[_0x33dbb0])&&(_0x3cd4a0=_0x2b1607(_0x3cd4a0)||_0x3cd4a0);return _0x3cd4a0;},_0x19d19b=(_0x1f5508,_0x243c4e)=>(_0x1d9123,_0x39ea8e)=>_0x243c4e(_0x1d9123,_0x39ea8e,_0x1f5508);let _0x46b62c=class extends _0x5360a5['Disposable']{constructor(_0x55c186,_0x320d79,_0x330dd5,_0x35cf5d){const _0x3890ac=_0x1a5ea4;super(),this[_0x3890ac(0xd9)]=_0x55c186,this['_threadCommentModel']=_0x320d79,this[_0x3890ac(0xdb)]=_0x330dd5,this[_0x3890ac(0xcb)]=_0x35cf5d,this[_0x3890ac(0xb2)](),this[_0x3890ac(0xfa)]();}['_initUserSync'](){const _0x402853=_0x1a5ea4;this[_0x402853(0xc4)](this[_0x402853(0xa5)]['commentUpdate$']['pipe'](_0x2a7d93[_0x402853(0xde)](0x10))['subscribe'](_0x50f3d4=>{const _0xb4ac56=_0x402853,_0x23f6a2=new Set();_0x50f3d4[_0xb4ac56(0xaf)](_0x1828b7=>{const _0x19a913=_0xb4ac56;switch(_0x1828b7[_0x19a913(0x8a)]){case _0x19a913(0xf3):{const _0x107e30=_0x1828b7[_0x19a913(0x7d)][_0x19a913(0xad)];_0x23f6a2[_0x19a913(0xf3)](_0x107e30);break;}}}),_0x131cff(this['_injector'],_0x23f6a2);}));}['_init'](){const _0x113536=_0x1a5ea4;this['disposeWithMe'](this[_0x113536(0xd9)][_0x113536(0x9e)][_0x113536(0x8b)](async _0x2b0a42=>{const _0x31dfec=_0x113536;var _0x2f54a6,_0x59207c,_0x48f9a7,_0x1e03ae;const _0x5c9c3f=(_0x2f54a6=this[_0x31dfec(0xa5)][_0x31dfec(0xdd)](_0x2b0a42[_0x31dfec(0x94)])['find'](_0x29b59d=>_0x29b59d[_0x31dfec(0x98)]===_0x2b0a42[_0x31dfec(0x98)]))==null?void 0x0:_0x2f54a6['root'];if(!_0x5c9c3f)return;const {unitId:_0x5d0f69,subUnitId:_0x44fa90}=_0x5c9c3f;switch(_0x2b0a42['user']&&this[_0x31dfec(0xdb)][_0x31dfec(0x9f)](_0x2b0a42[_0x31dfec(0xfb)]),_0x2b0a42[_0x31dfec(0x8a)]){case _0x51f684[_0x31dfec(0xf7)]:break;case _0x51f684[_0x31dfec(0xf6)]:{this[_0x31dfec(0xa5)][_0x31dfec(0xc5)](_0x5d0f69,_0x44fa90,{'unitId':_0x5d0f69,'subUnitId':_0x44fa90,'ref':'','id':_0x2b0a42[_0x31dfec(0xbb)],'dT':_0x11e6fa(+_0x2b0a42[_0x31dfec(0xc7)]),'threadId':_0x2b0a42[_0x31dfec(0x98)],'personId':(_0x48f9a7=(_0x59207c=_0x2b0a42['user'])==null?void 0x0:_0x59207c[_0x31dfec(0xd5)])!=null?_0x48f9a7:_0x2b0a42['userId'],'text':JSON[_0x31dfec(0xe3)](_0x2b0a42[_0x31dfec(0xb1)]),'parentId':_0x5c9c3f['id']});break;}case _0x51f684[_0x31dfec(0xe1)]:{const _0x410602=this[_0x31dfec(0xa5)][_0x31dfec(0xaa)](_0x5d0f69,_0x44fa90,_0x2b0a42['replyId']);_0x410602&&_0x410602[_0x31dfec(0xd0)]&&this[_0x31dfec(0xa5)][_0x31dfec(0xbf)](_0x5d0f69,_0x44fa90,_0x2b0a42[_0x31dfec(0xbb)]);break;}case _0x51f684[_0x31dfec(0xf9)]:{this[_0x31dfec(0xa5)][_0x31dfec(0x107)](_0x5d0f69,_0x44fa90,{'commentId':_0x2b0a42[_0x31dfec(0xbb)],'text':JSON[_0x31dfec(0xe3)](_0x2b0a42[_0x31dfec(0xb1)])});break;}case _0x51f684[_0x31dfec(0xe9)]:{const _0x319866=(_0x1e03ae=this[_0x31dfec(0xa5)]['getUnit'](_0x2b0a42[_0x31dfec(0x94)])[_0x31dfec(0x8c)](_0x151ec1=>_0x151ec1['threadId']===_0x2b0a42['threadId']))==null?void 0x0:_0x1e03ae[_0x31dfec(0xce)];_0x319866&&this[_0x31dfec(0xa5)]['resolveComment'](_0x5d0f69,_0x44fa90,_0x319866['id'],_0x2b0a42[_0x31dfec(0xd2)]===_0x4a5170[_0x31dfec(0xf0)]);break;}}}));}};_0x46b62c=_0x5718e0([_0x19d19b(0x0,_0x5360a5['Inject'](_0x228a55[_0x1a5ea4(0xec)])),_0x19d19b(0x1,_0x5360a5['Inject'](_0x4a163c[_0x1a5ea4(0xfe)])),_0x19d19b(0x2,_0x5360a5[_0x1a5ea4(0xb5)](_0x5360a5[_0x1a5ea4(0xd7)])),_0x19d19b(0x3,_0x5360a5[_0x1a5ea4(0xb5)](_0x5360a5[_0x1a5ea4(0x104)]))],_0x46b62c);const _0x3ef379=_0x1a5ea4(0x89),_0x220006={};var _0x15068d=Object[_0x1a5ea4(0x102)],_0x57516c=(_0x41877a,_0x525de3,_0x3e0a21,_0x1f6ffa)=>{const _0x53aaaa=_0x1a5ea4;for(var _0x2b3337=_0x1f6ffa>0x1?void 0x0:_0x1f6ffa?_0x15068d(_0x525de3,_0x3e0a21):_0x525de3,_0x510a28=_0x41877a[_0x53aaaa(0xf1)]-0x1,_0x2a6235;_0x510a28>=0x0;_0x510a28--)(_0x2a6235=_0x41877a[_0x510a28])&&(_0x2b3337=_0x2a6235(_0x2b3337)||_0x2b3337);return _0x2b3337;},_0x3504ff=(_0x2dd743,_0x12585f)=>(_0x127c3f,_0x1f7f2c)=>_0x12585f(_0x127c3f,_0x1f7f2c,_0x2dd743);function _0x491d73(_0x4a5a55,_0x58563d){const _0x217425=_0x1a5ea4,_0xe71856=_0x4a5a55[_0x217425(0x91)][0x0];return{..._0x58563d,'id':_0xe71856[_0x217425(0xbb)],'resolved':_0x4a5a55['solved']===0x1,'dT':_0x11e6fa(_0xe71856['createTimestamp']),'personId':_0xe71856[_0x217425(0xcc)],'threadId':_0xe71856['threadId']};}function _0xbf090f(_0x4b7d7d,_0x8ed694,_0x1e88a3){const _0x50b8bd=_0x1a5ea4;var _0x3e4280,_0x437bdf;if(((_0x437bdf=(_0x3e4280=_0x4b7d7d==null?void 0x0:_0x4b7d7d[_0x50b8bd(0x91)])==null?void 0x0:_0x3e4280['length'])!=null?_0x437bdf:0x0)>0x0){const _0x14f2ed=(_0x482431,_0x378327)=>({'id':_0x482431[_0x50b8bd(0xbb)],'threadId':_0x482431[_0x50b8bd(0x98)],'dT':_0x11e6fa(_0x482431[_0x50b8bd(0xc7)]),'personId':_0x482431[_0x50b8bd(0xcc)],'resolved':_0x4b7d7d['solved']===_0x4a5170[_0x50b8bd(0xf0)],'unitId':_0x8ed694,'subUnitId':_0x1e88a3,'text':JSON['parse'](_0x482431[_0x50b8bd(0xb1)]),'parentId':_0x378327}),_0xa39d8b=_0x14f2ed(_0x4b7d7d[_0x50b8bd(0x91)][0x0]);return{..._0xa39d8b,'children':_0x4b7d7d[_0x50b8bd(0x91)]['slice'](0x1)[_0x50b8bd(0xb7)](_0x2acc5c=>_0x14f2ed(_0x2acc5c,_0xa39d8b['id']))};}return null;}let _0x485699=class{constructor(_0x4481ed,_0x4b1757,_0x4dd17d,_0x3ce325){const _0x13e334=_0x1a5ea4;this[_0x13e334(0xe2)]=_0x4481ed,this[_0x13e334(0xdb)]=_0x4b1757,this['_sessionService']=_0x4dd17d,this[_0x13e334(0xcb)]=_0x3ce325;}async[_0x1a5ea4(0xc5)](_0x170529){const _0x58f489=_0x1a5ea4;var _0x49acb2,_0xd556c1;const {parentId:_0x5e40ff,unitId:_0x239be9,text:_0x45c982,threadId:_0x50156d}=_0x170529,_0x5c1f0f=(_0xd556c1=(_0x49acb2=_0x45c982[_0x58f489(0x92)])==null?void 0x0:_0x49acb2[_0x58f489(0xa8)](_0x33120c=>_0x33120c['rangeType']===_0x5360a5[_0x58f489(0xe0)][_0x58f489(0xa4)])[_0x58f489(0xb7)](_0x31a43a=>_0x31a43a[_0x58f489(0xa2)]))!=null?_0xd556c1:[],_0x3f4195=JSON[_0x58f489(0xdc)](_0x45c982),_0xda908b=(await this[_0x58f489(0x80)]['requireSession'](_0x239be9))[_0x58f489(0xae)]();if(_0x5e40ff){const _0x758dd3={'memberId':_0xda908b,'unitId':_0x239be9,'content':_0x3f4195,'mention':_0x5c1f0f,'threadId':_0x50156d},_0x3e44cd=(await this[_0x58f489(0xe2)][_0x58f489(0x8e)](_0x58f489(0x9b)+_0x239be9+_0x58f489(0xb8),{'body':_0x758dd3}))[_0x58f489(0xf5)][_0x58f489(0xb6)];return{..._0x170529,'id':_0x3e44cd[_0x58f489(0xbb)],'dT':_0x5360a5[_0x58f489(0xa6)](+_0x3e44cd[_0x58f489(0xc7)])['format'](_0x58f489(0xac)),'personId':_0x3e44cd[_0x58f489(0xcc)]};}else{const _0x58567e={'memberId':_0xda908b,'unitId':_0x239be9,'content':_0x3f4195,'mention':_0x5c1f0f},_0x260e45=await this['_httpService'][_0x58f489(0x8e)](_0x58f489(0x9b)+_0x239be9+_0x58f489(0x82),{'body':_0x58567e});return _0x491d73(_0x260e45[_0x58f489(0xf5)][_0x58f489(0xfc)],_0x170529);}}async[_0x1a5ea4(0x107)](_0x2a223e){const _0x2d0053=_0x1a5ea4;var _0x3ca217,_0x4dbd46;const {text:_0x3a9a80,unitId:_0x205de1}=_0x2a223e,_0x1c3bd5=(_0x4dbd46=(_0x3ca217=_0x3a9a80[_0x2d0053(0x92)])==null?void 0x0:_0x3ca217[_0x2d0053(0xa8)](_0x1f47cc=>_0x1f47cc[_0x2d0053(0xb4)]===_0x5360a5[_0x2d0053(0xe0)][_0x2d0053(0xa4)])[_0x2d0053(0xb7)](_0x2c9da1=>_0x2c9da1[_0x2d0053(0xa2)]))!=null?_0x4dbd46:[],_0x556a39=JSON[_0x2d0053(0xdc)](_0x3a9a80),_0x5972df=_0x2a223e[_0x2d0053(0x98)],_0x11acea=_0x2a223e['id'],_0x567fef={'memberId':(await this[_0x2d0053(0x80)][_0x2d0053(0xdf)](_0x205de1))[_0x2d0053(0xae)](),'unitId':_0x205de1,'threadId':_0x5972df,'mention':_0x1c3bd5,'content':_0x556a39,'replyId':_0x11acea},_0x41b460=await this[_0x2d0053(0xe2)]['post'](_0x2d0053(0x9b)+_0x205de1+_0x2d0053(0x100),{'body':_0x567fef});return!_0x41b460[_0x2d0053(0xf5)][_0x2d0053(0xda)]||_0x41b460[_0x2d0053(0xf5)][_0x2d0053(0xda)][_0x2d0053(0xd6)]===0x1;}async[_0x1a5ea4(0xbd)](_0x56ab21){const _0x117cd5=_0x1a5ea4,{unitId:_0x319d91}=_0x56ab21,_0x2634e2=_0x56ab21[_0x117cd5(0x98)],_0x343302={'memberId':this['_userService'][_0x117cd5(0xcd)]()[_0x117cd5(0xd5)],'unitId':_0x319d91,'threadId':_0x2634e2,'solved':_0x56ab21[_0x117cd5(0x105)]?_0x4a5170['Solved']:_0x4a5170[_0x117cd5(0xca)]},_0x285cda=await this['_httpService'][_0x117cd5(0x8e)]('/universer-api/comment/unit/'+_0x319d91+'/solved',{'body':_0x343302});return!_0x285cda['body']['error']||_0x285cda[_0x117cd5(0xf5)][_0x117cd5(0xda)][_0x117cd5(0xd6)]===0x1;}async[_0x1a5ea4(0xbf)](_0x6bbb0d,_0x196b3e,_0x322a6e,_0x29f0ac){const _0x45fa35=_0x1a5ea4,_0x4b52e8={'memberId':(await this[_0x45fa35(0x80)][_0x45fa35(0xdf)](_0x6bbb0d))[_0x45fa35(0xae)](),'threadId':_0x322a6e,'replyId':_0x29f0ac,'unitId':_0x6bbb0d},_0x244305=await this[_0x45fa35(0xe2)]['post'](_0x45fa35(0x9b)+_0x6bbb0d+_0x45fa35(0x84),{'body':_0x4b52e8});return!_0x244305[_0x45fa35(0xf5)]['error']||_0x244305[_0x45fa35(0xf5)][_0x45fa35(0xda)][_0x45fa35(0xd6)]===0x1;}async[_0x1a5ea4(0xe6)](_0x5f00b5,_0x24ecff,_0x468aec){const _0x5b8755=_0x1a5ea4,_0x302fca={'unitId':_0x5f00b5,'threadId':_0x468aec},_0xe88c2c=await this[_0x5b8755(0xe2)]['post'](_0x5b8755(0x9b)+_0x5f00b5+_0x5b8755(0xef),{'body':_0x302fca}),_0x395b29=_0x468aec[_0x5b8755(0xb7)](_0x1483d9=>_0xbf090f(_0xe88c2c[_0x5b8755(0xf5)]['comments'][_0x1483d9],_0x5f00b5,_0x24ecff))[_0x5b8755(0xa8)](Boolean);return Object[_0x5b8755(0xb0)](_0xe88c2c[_0x5b8755(0xf5)]['users'])[_0x5b8755(0xaf)](_0x1535e2=>{const _0x57f0d9=_0x5b8755;this['_userService'][_0x57f0d9(0x9f)](_0x1535e2);}),_0x395b29;}['saveCommentToSnapshot'](_0xc6fb76){const _0x9aa123=_0x1a5ea4;return{'id':_0xc6fb76['id'],'threadId':_0xc6fb76[_0x9aa123(0x98)],'ref':_0xc6fb76[_0x9aa123(0xf2)]};}};_0x485699=_0x57516c([_0x3504ff(0x0,_0x5360a5[_0x1a5ea4(0xb5)](_0x5ac8ce[_0x1a5ea4(0xc0)])),_0x3504ff(0x1,_0x5360a5[_0x1a5ea4(0xb5)](_0x5360a5[_0x1a5ea4(0xd7)])),_0x3504ff(0x2,_0x5360a5['Inject'](_0x228a55[_0x1a5ea4(0xa0)])),_0x3504ff(0x3,_0x5360a5[_0x1a5ea4(0xb5)](_0x5360a5[_0x1a5ea4(0x104)]))],_0x485699);var _0x1923b8=Object['getOwnPropertyDescriptor'],_0x482c1e=(_0x780543,_0xc312d9,_0xf2993e,_0x57259b)=>{const _0x57dd3c=_0x1a5ea4;for(var _0x42ffe5=_0x57259b>0x1?void 0x0:_0x57259b?_0x1923b8(_0xc312d9,_0xf2993e):_0xc312d9,_0x159a99=_0x780543[_0x57dd3c(0xf1)]-0x1,_0x4be7d3;_0x159a99>=0x0;_0x159a99--)(_0x4be7d3=_0x780543[_0x159a99])&&(_0x42ffe5=_0x4be7d3(_0x42ffe5)||_0x42ffe5);return _0x42ffe5;},_0x2eb3c5=(_0x54213c,_0x3ea9eb)=>(_0x282947,_0x39e04a)=>_0x3ea9eb(_0x282947,_0x39e04a,_0x54213c);let _0x312f48=class extends _0x5360a5[_0x1a5ea4(0x96)]{constructor(_0x2a49dd,_0x116681){const _0x15900d=_0x1a5ea4;super(),this['_threadCommentDataSourceService']=_0x2a49dd,this[_0x15900d(0x9d)]=_0x116681,this[_0x15900d(0x99)]();}[_0x1a5ea4(0x99)](){const _0xaf9fec=_0x1a5ea4;this[_0xaf9fec(0x97)]['dataSource']=this['_threadCommentDataSource'],this[_0xaf9fec(0x97)]['syncUpdateMutationToColla']=!0x1;}};_0x312f48=_0x482c1e([_0x2eb3c5(0x0,_0x4a163c['IThreadCommentDataSourceService']),_0x2eb3c5(0x1,_0x5360a5['Inject'](_0x485699))],_0x312f48);var _0x1ecd35=Object[_0x1a5ea4(0xbc)],_0x9f8699=Object['getOwnPropertyDescriptor'],_0x580821=(_0x4a4e8f,_0x17d37e,_0xdcb4f7)=>_0x17d37e in _0x4a4e8f?_0x1ecd35(_0x4a4e8f,_0x17d37e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xdcb4f7}):_0x4a4e8f[_0x17d37e]=_0xdcb4f7,_0x2b17f3=(_0x1001e4,_0x41a22d,_0xd02868,_0x3b6ec9)=>{for(var _0x4c3c11=_0x3b6ec9>0x1?void 0x0:_0x3b6ec9?_0x9f8699(_0x41a22d,_0xd02868):_0x41a22d,_0x14c576=_0x1001e4['length']-0x1,_0x2d0ef0;_0x14c576>=0x0;_0x14c576--)(_0x2d0ef0=_0x1001e4[_0x14c576])&&(_0x4c3c11=_0x2d0ef0(_0x4c3c11)||_0x4c3c11);return _0x4c3c11;},_0x52e111=(_0x3f9a64,_0x462e86)=>(_0xf4c599,_0x311b7f)=>_0x462e86(_0xf4c599,_0x311b7f,_0x3f9a64),_0x283bec=(_0x1e6284,_0x9ce3f2,_0x2706bd)=>_0x580821(_0x1e6284,typeof _0x9ce3f2!=_0x1a5ea4(0xc3)?_0x9ce3f2+'':_0x9ce3f2,_0x2706bd);_0x2537c5['UniverThreadCommentDataSourcePlugin']=class extends _0x5360a5[_0x1a5ea4(0x7c)]{constructor(_0x574c36=_0x220006,_0xc74711,_0x2964c6){const _0x205f0a=_0x1a5ea4;super(),this[_0x205f0a(0xa9)]=_0x574c36,this[_0x205f0a(0xcb)]=_0xc74711,this['_configService']=_0x2964c6;const {..._0xfba9b5}=_0x5360a5[_0x205f0a(0x86)]({},_0x220006,this[_0x205f0a(0xa9)]);this[_0x205f0a(0xe5)][_0x205f0a(0x7f)](_0x3ef379,_0xfba9b5);}[_0x1a5ea4(0xee)](){const _0x1dd5e3=_0x1a5ea4;[[_0x485699],[_0x312f48],[_0x46b62c]][_0x1dd5e3(0xaf)](_0x26d951=>{const _0x5f361e=_0x1dd5e3;this[_0x5f361e(0xcb)][_0x5f361e(0xf3)](_0x26d951);});}['onReady'](){const _0x5526b8=_0x1a5ea4;this['_injector'][_0x5526b8(0xf4)](_0x312f48),this['_injector'][_0x5526b8(0xf4)](_0x46b62c);}},_0x283bec(_0x2537c5[_0x1a5ea4(0x83)],_0x1a5ea4(0x101),_0x19f7b2),_0x283bec(_0x2537c5['UniverThreadCommentDataSourcePlugin'],'type',_0x5360a5[_0x1a5ea4(0xc6)][_0x1a5ea4(0xd1)]),_0x2537c5['UniverThreadCommentDataSourcePlugin']=_0x2b17f3([_0x5360a5['DependentOn'](_0x21b3bf[_0x1a5ea4(0xb9)],_0x228a55[_0x1a5ea4(0x103)],_0x437b1e[_0x1a5ea4(0x8f)]),_0x52e111(0x1,_0x5360a5[_0x1a5ea4(0xb5)](_0x5360a5['Injector'])),_0x52e111(0x2,_0x5360a5[_0x1a5ea4(0xab)])],_0x2537c5[_0x1a5ea4(0x83)]),Object[_0x1a5ea4(0xbc)](_0x2537c5,Symbol[_0x1a5ea4(0x87)],{'value':_0x1a5ea4(0x90)});}));function _0x5f23(){const _0x2f734e=['CustomRangeType','Delete','_httpService','parse','@univerjs/network','_configService','listComments','UniverThreadComment','753116rRqtqC','Solve','rxjs','UniverNetwork','CommentService','UniverProThreadCommentDatasource','onStarting','/list','Solved','length','ref','add','get','body','Reply','Add','@univerjs/thread-comment-ui','Edit','_initUserSync','user','comment','delete','ThreadCommentModel','format','/edit','pluginName','getOwnPropertyDescriptor','UniverCollaborationClientPlugin','Injector','resolved','UniverCore','updateComment','exports','Plugin','payload','6axkcoQ','setConfig','_sessionService','254772AAEzPV','/add','UniverThreadCommentDataSourcePlugin','/delete','size','merge','toStringTag','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','thread-comment-data-source.config','type','subscribe','find','/universer-api/user/list','post','UniverLicensePlugin','Module','replies','customRanges','@univerjs-pro/collaboration-client','unitId','amd','Disposable','_threadCommentDataSourceService','threadId','_initDataSource','7KxwnCY','/universer-api/comment/unit/','132nhXQsc','_threadCommentDataSource','commentUpdate$','addUser','CollaborationSessionService','UniverProCollaborationClient','rangeId','@univerjs/core','COMMENT','_threadCommentModel','dayjs','UNRECOGNIZED','filter','_config','getComment','IConfigService','YYYY/MM/DD\x20HH:mm','personId','getMemberID','forEach','values','content','_init','409390JMltMQ','rangeType','Inject','reply','map','/reply','UniverThreadCommentUIPlugin','UniverProLicense','replyId','defineProperty','resolveComment','@univerjs/thread-comment','deleteComment','HTTPService','3415914obscmj','getUser','symbol','disposeWithMe','addComment','UniverInstanceType','createTimestamp','UniverThreadCommentUi','337729KIHKow','OpenOrReOpen','_injector','userId','getCurrentUser','root','Unknown','parentId','UNIVER_UNKNOWN','solved','10FuZIUT','113658zNouOe','userID','code','UserManagerService','4236608JFaxTz','_commentService','error','_userService','stringify','getUnit','bufferTime','requireSession'];_0x5f23=function(){return _0x2f734e;};return _0x5f23();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.10-nightly.202504241607",
3
+ "version": "0.6.10-nightly.202504251607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.6.10-nightly.202504241607",
49
- "@univerjs-pro/license": "0.6.10-nightly.202504241607",
50
- "@univerjs/core": "0.6.10-nightly.202504241607",
51
- "@univerjs/network": "0.6.10-nightly.202504241607",
52
- "@univerjs/thread-comment": "0.6.10-nightly.202504241607",
48
+ "@univerjs-pro/collaboration-client": "0.6.10-nightly.202504251607",
49
+ "@univerjs-pro/license": "0.6.10-nightly.202504251607",
50
+ "@univerjs/network": "0.6.10-nightly.202504251607",
53
51
  "@univerjs/protocol": "0.1.46-alpha.3",
54
- "@univerjs/thread-comment-ui": "0.6.10-nightly.202504241607"
52
+ "@univerjs/thread-comment-ui": "0.6.10-nightly.202504251607",
53
+ "@univerjs/thread-comment": "0.6.10-nightly.202504251607",
54
+ "@univerjs/core": "0.6.10-nightly.202504251607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",