@univerjs-pro/thread-comment-datasource 0.6.0-alpha.0 → 0.6.0-experimental.20250125-1d060b9

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 _0x1758e2=_0x5bcf;(function(_0x24045e,_0x133d4b){const _0x2c2042=_0x5bcf,_0x4ef542=_0x24045e();while(!![]){try{const _0x2aa4e9=-parseInt(_0x2c2042(0x226))/0x1*(-parseInt(_0x2c2042(0x22a))/0x2)+-parseInt(_0x2c2042(0x23d))/0x3*(-parseInt(_0x2c2042(0x23a))/0x4)+parseInt(_0x2c2042(0x1f6))/0x5+-parseInt(_0x2c2042(0x1d7))/0x6*(parseInt(_0x2c2042(0x21f))/0x7)+-parseInt(_0x2c2042(0x1d8))/0x8*(parseInt(_0x2c2042(0x21b))/0x9)+-parseInt(_0x2c2042(0x21a))/0xa*(-parseInt(_0x2c2042(0x1ea))/0xb)+parseInt(_0x2c2042(0x227))/0xc;if(_0x2aa4e9===_0x133d4b)break;else _0x4ef542['push'](_0x4ef542['shift']());}catch(_0x31b0f2){_0x4ef542['push'](_0x4ef542['shift']());}}}(_0x3786,0x75e5d));Object[_0x1758e2(0x239)](exports,Symbol[_0x1758e2(0x245)],{'value':_0x1758e2(0x22e)});const C=require('@univerjs-pro/collaboration-client'),T=require(_0x1758e2(0x1da)),c=require('@univerjs/core'),w=require(_0x1758e2(0x20e)),P=require(_0x1758e2(0x231)),U=require('rxjs'),M=require(_0x1758e2(0x238)),R=_0x1758e2(0x1ee);var v=(_0x2cc8d7=>(_0x2cc8d7[_0x2cc8d7[_0x1758e2(0x1cb)]=0x0]=_0x1758e2(0x1cb),_0x2cc8d7[_0x2cc8d7['Solved']=0x1]=_0x1758e2(0x20f),_0x2cc8d7[_0x2cc8d7['UNRECOGNIZED']=-0x1]=_0x1758e2(0x1f2),_0x2cc8d7))(v||{}),I=(_0x1542f2=>(_0x1542f2[_0x1542f2[_0x1758e2(0x237)]=0x0]=_0x1758e2(0x237),_0x1542f2[_0x1542f2['Add']=0x1]=_0x1758e2(0x1d5),_0x1542f2[_0x1542f2[_0x1758e2(0x221)]=0x2]=_0x1758e2(0x221),_0x1542f2[_0x1542f2['Edit']=0x3]=_0x1758e2(0x1ec),_0x1542f2[_0x1542f2[_0x1758e2(0x1fe)]=0x4]=_0x1758e2(0x1fe),_0x1542f2[_0x1542f2['Solve']=0x5]=_0x1758e2(0x1e6),_0x1542f2[_0x1542f2[_0x1758e2(0x1f2)]=-0x1]=_0x1758e2(0x1f2),_0x1542f2))(I||{});const g=_0x5cf637=>c[_0x1758e2(0x201)](new Date(+_0x5cf637))['format'](_0x1758e2(0x1d1)),$=async(_0x46e540,_0x2c111b)=>{const _0x34e4d6=_0x1758e2,_0x23c002=_0x46e540[_0x34e4d6(0x216)](c[_0x34e4d6(0x218)]),_0xa446a5=_0x46e540['get'](M[_0x34e4d6(0x240)]);_0x2c111b[_0x34e4d6(0x1de)](_0x24e2f1=>{const _0x57b65b=_0x34e4d6;_0x23c002[_0x57b65b(0x202)](_0x24e2f1)&&_0x2c111b[_0x57b65b(0x1f7)](_0x24e2f1);}),_0x2c111b[_0x34e4d6(0x1e7)]&&(await _0xa446a5[_0x34e4d6(0x216)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2c111b]}}))['body'][_0x34e4d6(0x211)][_0x34e4d6(0x1de)](_0x39a57f=>{const _0x597977=_0x34e4d6;_0x39a57f&&_0x23c002[_0x597977(0x248)](_0x39a57f);});};var E=Object[_0x1758e2(0x239)],q=Object[_0x1758e2(0x228)],A=(_0x2e7b8c,_0x8ad16a,_0x3853e3,_0x3f289b)=>{const _0x57cdd7=_0x1758e2;for(var _0x2412d5=_0x3f289b>0x1?void 0x0:_0x3f289b?q(_0x8ad16a,_0x3853e3):_0x8ad16a,_0x53db68=_0x2e7b8c[_0x57cdd7(0x23e)]-0x1,_0x5d350a;_0x53db68>=0x0;_0x53db68--)(_0x5d350a=_0x2e7b8c[_0x53db68])&&(_0x2412d5=(_0x3f289b?_0x5d350a(_0x8ad16a,_0x3853e3,_0x2412d5):_0x5d350a(_0x2412d5))||_0x2412d5);return _0x3f289b&&_0x2412d5&&E(_0x8ad16a,_0x3853e3,_0x2412d5),_0x2412d5;},_=(_0xe9ef3c,_0x4100f1)=>(_0x135bcd,_0x146057)=>_0x4100f1(_0x135bcd,_0x146057,_0xe9ef3c);let S=class extends c[_0x1758e2(0x214)]{constructor(_0x17436a,_0x444dd7,_0x5cd559,_0x46b15c){const _0x53023d=_0x1758e2;super(),this[_0x53023d(0x206)]=_0x17436a,this[_0x53023d(0x22b)]=_0x444dd7,this['_userService']=_0x5cd559,this['_injector']=_0x46b15c,this[_0x53023d(0x230)](),this[_0x53023d(0x1cd)]();}['_initUserSync'](){const _0x1082fd=_0x1758e2;this['disposeWithMe'](this[_0x1082fd(0x22b)]['commentUpdate$'][_0x1082fd(0x209)](U[_0x1082fd(0x246)](0x10))[_0x1082fd(0x1f8)](_0x202b04=>{const _0x2ae245=_0x1082fd,_0x58b449=new Set();_0x202b04[_0x2ae245(0x1de)](_0x4ebe45=>{const _0x44c71a=_0x2ae245;switch(_0x4ebe45[_0x44c71a(0x217)]){case _0x44c71a(0x23b):{const _0x4edbd5=_0x4ebe45['payload'][_0x44c71a(0x1e4)];_0x58b449[_0x44c71a(0x23b)](_0x4edbd5);break;}}}),$(this[_0x2ae245(0x21e)],_0x58b449);}));}[_0x1758e2(0x230)](){const _0x426bdf=_0x1758e2;this['disposeWithMe'](this[_0x426bdf(0x206)]['commentUpdate$'][_0x426bdf(0x1f8)](async _0x55ee05=>{const _0x3e7335=_0x426bdf;var _0x63bd57,_0x469809,_0x206305,_0x37718b;const _0x257274=(_0x63bd57=this['_threadCommentModel'][_0x3e7335(0x1f4)](_0x55ee05[_0x3e7335(0x207)])[_0x3e7335(0x204)](_0x29cccf=>_0x29cccf[_0x3e7335(0x205)]===_0x55ee05[_0x3e7335(0x205)]))==null?void 0x0:_0x63bd57[_0x3e7335(0x1d6)];if(!_0x257274)return;const {unitId:_0x355627,subUnitId:_0x1631be}=_0x257274;switch(_0x55ee05[_0x3e7335(0x229)]&&this[_0x3e7335(0x200)]['addUser'](_0x55ee05[_0x3e7335(0x229)]),_0x55ee05[_0x3e7335(0x217)]){case I[_0x3e7335(0x1d5)]:break;case I[_0x3e7335(0x221)]:{this[_0x3e7335(0x22b)][_0x3e7335(0x1e1)](_0x355627,_0x1631be,{'unitId':_0x355627,'subUnitId':_0x1631be,'ref':'','id':_0x55ee05[_0x3e7335(0x203)],'dT':g(+_0x55ee05[_0x3e7335(0x20d)]),'threadId':_0x55ee05[_0x3e7335(0x205)],'personId':(_0x206305=(_0x469809=_0x55ee05[_0x3e7335(0x229)])==null?void 0x0:_0x469809[_0x3e7335(0x1db)])!=null?_0x206305:_0x55ee05[_0x3e7335(0x1fb)],'text':JSON['parse'](_0x55ee05[_0x3e7335(0x1cf)]),'parentId':_0x257274['id']});break;}case I[_0x3e7335(0x1fe)]:{const _0x3de53e=this[_0x3e7335(0x22b)][_0x3e7335(0x222)](_0x355627,_0x1631be,_0x55ee05[_0x3e7335(0x203)]);_0x3de53e&&_0x3de53e[_0x3e7335(0x1df)]&&this[_0x3e7335(0x22b)][_0x3e7335(0x1f9)](_0x355627,_0x1631be,_0x55ee05['replyId']);break;}case I[_0x3e7335(0x1ec)]:{this[_0x3e7335(0x22b)][_0x3e7335(0x223)](_0x355627,_0x1631be,{'commentId':_0x55ee05['replyId'],'text':JSON[_0x3e7335(0x1e5)](_0x55ee05[_0x3e7335(0x1cf)])});break;}case I[_0x3e7335(0x1e6)]:{const _0x42cffa=(_0x37718b=this[_0x3e7335(0x22b)]['getUnit'](_0x55ee05['unitId'])['find'](_0x30d719=>_0x30d719['threadId']===_0x55ee05[_0x3e7335(0x205)]))==null?void 0x0:_0x37718b[_0x3e7335(0x1d6)];_0x42cffa&&this[_0x3e7335(0x22b)]['resolveComment'](_0x355627,_0x1631be,_0x42cffa['id'],_0x55ee05[_0x3e7335(0x1f0)]===v[_0x3e7335(0x20f)]);break;}}}));}};S=A([_(0x0,c['Inject'](C[_0x1758e2(0x23c)])),_(0x1,c[_0x1758e2(0x1ef)](P['ThreadCommentModel'])),_(0x2,c['Inject'](c['UserManagerService'])),_(0x3,c[_0x1758e2(0x1ef)](c['Injector']))],S);const x=_0x1758e2(0x1e3),D={};var Y=Object[_0x1758e2(0x239)],G=Object[_0x1758e2(0x228)],H=(_0x511268,_0x50f64d,_0x3f376a,_0x6661ae)=>{for(var _0x9051e2=_0x6661ae>0x1?void 0x0:_0x6661ae?G(_0x50f64d,_0x3f376a):_0x50f64d,_0x1a6716=_0x511268['length']-0x1,_0x32c84f;_0x1a6716>=0x0;_0x1a6716--)(_0x32c84f=_0x511268[_0x1a6716])&&(_0x9051e2=(_0x6661ae?_0x32c84f(_0x50f64d,_0x3f376a,_0x9051e2):_0x32c84f(_0x9051e2))||_0x9051e2);return _0x6661ae&&_0x9051e2&&Y(_0x50f64d,_0x3f376a,_0x9051e2),_0x9051e2;},p=(_0x4487b3,_0x49e20e)=>(_0x1281bb,_0xf6b8ab)=>_0x49e20e(_0x1281bb,_0xf6b8ab,_0x4487b3);function J(_0x27ca16,_0x252ee6){const _0x40022f=_0x1758e2,_0x2e48a0=_0x27ca16[_0x40022f(0x1e2)][0x0];return{..._0x252ee6,'id':_0x2e48a0['replyId'],'resolved':_0x27ca16[_0x40022f(0x1f0)]===0x1,'dT':g(_0x2e48a0['createTimestamp']),'personId':_0x2e48a0[_0x40022f(0x1fb)],'threadId':_0x2e48a0[_0x40022f(0x205)]};}function F(_0x3e0775,_0x58e93d,_0x41eddd){const _0x17c4df=_0x1758e2;var _0x1c4984,_0x50351b;if(((_0x50351b=(_0x1c4984=_0x3e0775==null?void 0x0:_0x3e0775[_0x17c4df(0x1e2)])==null?void 0x0:_0x1c4984[_0x17c4df(0x23e)])!=null?_0x50351b:0x0)>0x0){const _0x2c1fcc=(_0x5325f2,_0x437aa4)=>({'id':_0x5325f2[_0x17c4df(0x203)],'threadId':_0x5325f2[_0x17c4df(0x205)],'dT':g(_0x5325f2[_0x17c4df(0x20d)]),'personId':_0x5325f2['userId'],'resolved':_0x3e0775[_0x17c4df(0x1f0)]===v[_0x17c4df(0x20f)],'unitId':_0x58e93d,'subUnitId':_0x41eddd,'text':JSON[_0x17c4df(0x1e5)](_0x5325f2[_0x17c4df(0x1cf)]),'parentId':_0x437aa4}),_0x5941eb=_0x2c1fcc(_0x3e0775[_0x17c4df(0x1e2)][0x0]);return{..._0x5941eb,'children':_0x3e0775['replies'][_0x17c4df(0x1f5)](0x1)['map'](_0x5c8004=>_0x2c1fcc(_0x5c8004,_0x5941eb['id']))};}return null;}function _0x5bcf(_0x5c793d,_0x58d5c6){const _0x3786d2=_0x3786();return _0x5bcf=function(_0x5bcfa8,_0x4d6f6e){_0x5bcfa8=_0x5bcfa8-0x1ca;let _0x39da13=_0x3786d2[_0x5bcfa8];return _0x39da13;},_0x5bcf(_0x5c793d,_0x58d5c6);}let f=class{constructor(_0x2cf87d,_0x1b50a9,_0x71edd9,_0x48cd67){const _0x32ea5a=_0x1758e2;this['_httpService']=_0x2cf87d,this[_0x32ea5a(0x200)]=_0x1b50a9,this[_0x32ea5a(0x220)]=_0x71edd9,this['_injector']=_0x48cd67;}async[_0x1758e2(0x1e1)](_0x4b66e8){const _0x441692=_0x1758e2;var _0x4639b1,_0x35a0e1;const {parentId:_0x3962e4,unitId:_0x18d567,text:_0x357abc,threadId:_0x3ad1c8}=_0x4b66e8,_0x18a477=(_0x35a0e1=(_0x4639b1=_0x357abc[_0x441692(0x208)])==null?void 0x0:_0x4639b1[_0x441692(0x244)](_0x364ff8=>_0x364ff8['rangeType']===c[_0x441692(0x21c)][_0x441692(0x1d3)])[_0x441692(0x1fc)](_0x2b3929=>_0x2b3929['rangeId']))!=null?_0x35a0e1:[],_0x15ce8b=JSON[_0x441692(0x22c)](_0x357abc),_0x400dbd=(await this['_sessionService'][_0x441692(0x1d2)](_0x18d567))[_0x441692(0x20c)]();if(_0x3962e4){const _0x15beac={'memberId':_0x400dbd,'unitId':_0x18d567,'content':_0x15ce8b,'mention':_0x18a477,'threadId':_0x3ad1c8},_0x2859db=(await this[_0x441692(0x249)][_0x441692(0x1f3)](_0x441692(0x213)+_0x18d567+_0x441692(0x210),{'body':_0x15beac}))[_0x441692(0x24a)][_0x441692(0x1ca)];return{..._0x4b66e8,'id':_0x2859db[_0x441692(0x203)],'dT':c[_0x441692(0x201)](+_0x2859db[_0x441692(0x20d)])[_0x441692(0x1e0)](_0x441692(0x1d1)),'personId':_0x2859db[_0x441692(0x1fb)]};}else{const _0x1e4b67={'memberId':_0x400dbd,'unitId':_0x18d567,'content':_0x15ce8b,'mention':_0x18a477},_0x4f9522=await this['_httpService'][_0x441692(0x1f3)](_0x441692(0x213)+_0x18d567+_0x441692(0x234),{'body':_0x1e4b67});return J(_0x4f9522[_0x441692(0x24a)][_0x441692(0x1dc)],_0x4b66e8);}}async[_0x1758e2(0x223)](_0x501070){const _0x550362=_0x1758e2;var _0x2607d6,_0x215fd9;const {text:_0x259b58,unitId:_0x361e4b}=_0x501070,_0x74c7e9=(_0x215fd9=(_0x2607d6=_0x259b58[_0x550362(0x208)])==null?void 0x0:_0x2607d6['filter'](_0x23231f=>_0x23231f[_0x550362(0x23f)]===c[_0x550362(0x21c)][_0x550362(0x1d3)])[_0x550362(0x1fc)](_0x2d449a=>_0x2d449a['rangeId']))!=null?_0x215fd9:[],_0x447a33=JSON[_0x550362(0x22c)](_0x259b58),_0xaffeb1=_0x501070['threadId'],_0x48456d=_0x501070['id'],_0x2837af={'memberId':(await this[_0x550362(0x220)][_0x550362(0x1d2)](_0x361e4b))[_0x550362(0x20c)](),'unitId':_0x361e4b,'threadId':_0xaffeb1,'mention':_0x74c7e9,'content':_0x447a33,'replyId':_0x48456d},_0x30ab77=await this[_0x550362(0x249)][_0x550362(0x1f3)](_0x550362(0x213)+_0x361e4b+'/edit',{'body':_0x2837af});return!_0x30ab77[_0x550362(0x24a)][_0x550362(0x1dd)]||_0x30ab77['body'][_0x550362(0x1dd)][_0x550362(0x1cc)]===0x1;}async[_0x1758e2(0x20a)](_0x238a16){const _0xcdf92d=_0x1758e2,{unitId:_0x36a736}=_0x238a16,_0x4d6859=_0x238a16[_0xcdf92d(0x205)],_0x2269dc={'memberId':this[_0xcdf92d(0x200)][_0xcdf92d(0x1fd)]()[_0xcdf92d(0x1db)],'unitId':_0x36a736,'threadId':_0x4d6859,'solved':_0x238a16[_0xcdf92d(0x241)]?v[_0xcdf92d(0x20f)]:v[_0xcdf92d(0x1cb)]},_0x577834=await this[_0xcdf92d(0x249)][_0xcdf92d(0x1f3)](_0xcdf92d(0x213)+_0x36a736+_0xcdf92d(0x224),{'body':_0x2269dc});return!_0x577834['body'][_0xcdf92d(0x1dd)]||_0x577834['body'][_0xcdf92d(0x1dd)][_0xcdf92d(0x1cc)]===0x1;}async[_0x1758e2(0x1f9)](_0x1ca364,_0x598e4e,_0x36f94d,_0x1195a6){const _0x58eada=_0x1758e2,_0x45b983={'memberId':(await this[_0x58eada(0x220)][_0x58eada(0x1d2)](_0x1ca364))[_0x58eada(0x20c)](),'threadId':_0x36f94d,'replyId':_0x1195a6,'unitId':_0x1ca364},_0x969543=await this['_httpService'][_0x58eada(0x1f3)](_0x58eada(0x213)+_0x1ca364+_0x58eada(0x1ff),{'body':_0x45b983});return!_0x969543['body'][_0x58eada(0x1dd)]||_0x969543['body']['error'][_0x58eada(0x1cc)]===0x1;}async['listComments'](_0x4b06bc,_0x2d283a,_0x18f876){const _0x174be6=_0x1758e2,_0x453d15={'unitId':_0x4b06bc,'threadId':_0x18f876},_0x1b3814=await this[_0x174be6(0x249)][_0x174be6(0x1f3)]('/universer-api/comment/unit/'+_0x4b06bc+_0x174be6(0x22f),{'body':_0x453d15}),_0x173019=_0x18f876[_0x174be6(0x1fc)](_0x17f6df=>F(_0x1b3814[_0x174be6(0x24a)][_0x174be6(0x212)][_0x17f6df],_0x4b06bc,_0x2d283a))['filter'](Boolean);return Object[_0x174be6(0x1f1)](_0x1b3814[_0x174be6(0x24a)][_0x174be6(0x211)])[_0x174be6(0x1de)](_0x23736b=>{const _0x1ec12b=_0x174be6;this[_0x1ec12b(0x200)]['addUser'](_0x23736b);}),_0x173019;}[_0x1758e2(0x1fa)](_0x4d48ae){const _0x1b8c7a=_0x1758e2;return{'id':_0x4d48ae['id'],'threadId':_0x4d48ae[_0x1b8c7a(0x205)],'ref':_0x4d48ae[_0x1b8c7a(0x20b)]};}};f=H([p(0x0,c[_0x1758e2(0x1ef)](M[_0x1758e2(0x240)])),p(0x1,c[_0x1758e2(0x1ef)](c[_0x1758e2(0x218)])),p(0x2,c[_0x1758e2(0x1ef)](C[_0x1758e2(0x1d9)])),p(0x3,c[_0x1758e2(0x1ef)](c['Injector']))],f);function _0x3786(){const _0x1f39d1=['36379beWnrE','_sessionService','Reply','getComment','updateComment','/solved','UniverThreadCommentUIPlugin','529961SsCHvS','653364BlosxY','getOwnPropertyDescriptor','user','2vTEWTR','_threadCommentModel','stringify','_initDataSource','Module','/list','_init','@univerjs/thread-comment','IConfigService','_configService','/add','onReady','_threadCommentDataSourceService','Unknown','@univerjs/network','defineProperty','629528ORzJyK','add','CommentService','6uqoeYf','length','rangeType','HTTPService','resolved','symbol','setConfig','filter','toStringTag','bufferTime','UniverThreadCommentDataSourcePlugin','addUser','_httpService','body','IThreadCommentDataSourceService','reply','OpenOrReOpen','code','_initUserSync','UniverInstanceType','content','UNIVER_UNKNOWN','YYYY/MM/DD\x20HH:mm','requireSession','COMMENT','DependentOn','Add','root','996hAXPpa','142768LXxStl','CollaborationSessionService','@univerjs-pro/license','userID','comment','error','forEach','parentId','format','addComment','replies','thread-comment-data-source.config','personId','parse','Solve','size','_config','pluginName','22OlodSH','dataSource','Edit','onStarting','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Inject','solved','values','UNRECOGNIZED','post','getUnit','slice','127605ECOsQH','delete','subscribe','deleteComment','saveCommentToSnapshot','userId','map','getCurrentUser','Delete','/delete','_userService','dayjs','getUser','replyId','find','threadId','_commentService','unitId','customRanges','pipe','resolveComment','ref','getMemberID','createTimestamp','@univerjs/thread-comment-ui','Solved','/reply','users','comments','/universer-api/comment/unit/','Disposable','_threadCommentDataSource','get','type','UserManagerService','syncUpdateMutationToColla','2550740dDIVie','45RGQztJ','CustomRangeType','merge','_injector'];_0x3786=function(){return _0x1f39d1;};return _0x3786();}var L=Object[_0x1758e2(0x239)],Z=Object[_0x1758e2(0x228)],W=(_0x371df0,_0x4d5e4c,_0x1a2e07,_0x48cea4)=>{const _0x5e2bff=_0x1758e2;for(var _0x4c0ef6=_0x48cea4>0x1?void 0x0:_0x48cea4?Z(_0x4d5e4c,_0x1a2e07):_0x4d5e4c,_0x13e6ba=_0x371df0[_0x5e2bff(0x23e)]-0x1,_0x9a4de7;_0x13e6ba>=0x0;_0x13e6ba--)(_0x9a4de7=_0x371df0[_0x13e6ba])&&(_0x4c0ef6=(_0x48cea4?_0x9a4de7(_0x4d5e4c,_0x1a2e07,_0x4c0ef6):_0x9a4de7(_0x4c0ef6))||_0x4c0ef6);return _0x48cea4&&_0x4c0ef6&&L(_0x4d5e4c,_0x1a2e07,_0x4c0ef6),_0x4c0ef6;},O=(_0x300b04,_0x22ce13)=>(_0x420bb3,_0x4bddc7)=>_0x22ce13(_0x420bb3,_0x4bddc7,_0x300b04);let b=class extends c[_0x1758e2(0x214)]{constructor(_0x20a8be,_0x29bfe1){const _0x278fe1=_0x1758e2;super(),this['_threadCommentDataSourceService']=_0x20a8be,this[_0x278fe1(0x215)]=_0x29bfe1,this[_0x278fe1(0x22d)]();}[_0x1758e2(0x22d)](){const _0x2bd935=_0x1758e2;this[_0x2bd935(0x236)][_0x2bd935(0x1eb)]=this['_threadCommentDataSource'],this[_0x2bd935(0x236)][_0x2bd935(0x219)]=!0x1;}};b=W([O(0x0,P[_0x1758e2(0x24b)]),O(0x1,c[_0x1758e2(0x1ef)](f))],b);var j=Object['defineProperty'],B=Object[_0x1758e2(0x228)],K=(_0x40ce30,_0x334e55,_0x5eae27)=>_0x334e55 in _0x40ce30?j(_0x40ce30,_0x334e55,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5eae27}):_0x40ce30[_0x334e55]=_0x5eae27,V=(_0x5777de,_0x12d8b4,_0x81741d,_0x264a9c)=>{const _0x26b591=_0x1758e2;for(var _0x558ad7=_0x264a9c>0x1?void 0x0:_0x264a9c?B(_0x12d8b4,_0x81741d):_0x12d8b4,_0x3071e=_0x5777de[_0x26b591(0x23e)]-0x1,_0x521c01;_0x3071e>=0x0;_0x3071e--)(_0x521c01=_0x5777de[_0x3071e])&&(_0x558ad7=(_0x264a9c?_0x521c01(_0x12d8b4,_0x81741d,_0x558ad7):_0x521c01(_0x558ad7))||_0x558ad7);return _0x264a9c&&_0x558ad7&&j(_0x12d8b4,_0x81741d,_0x558ad7),_0x558ad7;},y=(_0x23a53c,_0x36827f)=>(_0x468c17,_0x272586)=>_0x36827f(_0x468c17,_0x272586,_0x23a53c),N=(_0x2fd509,_0x19035b,_0x262a0a)=>K(_0x2fd509,typeof _0x19035b!=_0x1758e2(0x242)?_0x19035b+'':_0x19035b,_0x262a0a);exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x205719=D,_0x28a671,_0x562d15){const _0x4cef8e=_0x1758e2;super(),this[_0x4cef8e(0x1e8)]=_0x205719,this[_0x4cef8e(0x21e)]=_0x28a671,this[_0x4cef8e(0x233)]=_0x562d15;const {..._0x45b014}=c[_0x4cef8e(0x21d)]({},D,this[_0x4cef8e(0x1e8)]);this[_0x4cef8e(0x233)][_0x4cef8e(0x243)](x,_0x45b014);}[_0x1758e2(0x1ed)](){[[f],[b],[S]]['forEach'](_0x1c90c0=>{const _0x37de35=_0x5bcf;this[_0x37de35(0x21e)]['add'](_0x1c90c0);});}[_0x1758e2(0x235)](){const _0x24eaf2=_0x1758e2;this[_0x24eaf2(0x21e)]['get'](b),this[_0x24eaf2(0x21e)][_0x24eaf2(0x216)](S);}},N(exports[_0x1758e2(0x247)],_0x1758e2(0x1e9),R),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0x1758e2(0x1ce)][_0x1758e2(0x1d0)]),exports[_0x1758e2(0x247)]=V([c[_0x1758e2(0x1d4)](w[_0x1758e2(0x225)],C['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),y(0x1,c[_0x1758e2(0x1ef)](c['Injector'])),y(0x2,c[_0x1758e2(0x232)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0xfec871=_0x5f38;(function(_0x1120f3,_0x5488ea){const _0x56da6e=_0x5f38,_0x1f1b1d=_0x1120f3();while(!![]){try{const _0x428aa9=parseInt(_0x56da6e(0x1ed))/0x1+-parseInt(_0x56da6e(0x1dc))/0x2+parseInt(_0x56da6e(0x1bd))/0x3+-parseInt(_0x56da6e(0x1ad))/0x4*(-parseInt(_0x56da6e(0x196))/0x5)+parseInt(_0x56da6e(0x178))/0x6+parseInt(_0x56da6e(0x1a7))/0x7+-parseInt(_0x56da6e(0x189))/0x8;if(_0x428aa9===_0x5488ea)break;else _0x1f1b1d['push'](_0x1f1b1d['shift']());}catch(_0x5d46c5){_0x1f1b1d['push'](_0x1f1b1d['shift']());}}}(_0x414a,0xba694));Object['defineProperty'](exports,Symbol[_0xfec871(0x1e6)],{'value':_0xfec871(0x17b)});const C=require('@univerjs-pro/collaboration-client'),T=require(_0xfec871(0x1bc)),c=require('@univerjs/core'),w=require(_0xfec871(0x1d1)),P=require(_0xfec871(0x185)),U=require(_0xfec871(0x1de)),M=require(_0xfec871(0x1a5)),R=_0xfec871(0x1e5);var v=(_0x40346c=>(_0x40346c[_0x40346c['OpenOrReOpen']=0x0]=_0xfec871(0x17e),_0x40346c[_0x40346c[_0xfec871(0x1a6)]=0x1]='Solved',_0x40346c[_0x40346c[_0xfec871(0x18d)]=-0x1]='UNRECOGNIZED',_0x40346c))(v||{}),I=(_0x152084=>(_0x152084[_0x152084[_0xfec871(0x18c)]=0x0]=_0xfec871(0x18c),_0x152084[_0x152084[_0xfec871(0x1cb)]=0x1]='Add',_0x152084[_0x152084[_0xfec871(0x1b3)]=0x2]=_0xfec871(0x1b3),_0x152084[_0x152084['Edit']=0x3]=_0xfec871(0x195),_0x152084[_0x152084[_0xfec871(0x179)]=0x4]=_0xfec871(0x179),_0x152084[_0x152084[_0xfec871(0x1a4)]=0x5]=_0xfec871(0x1a4),_0x152084[_0x152084[_0xfec871(0x18d)]=-0x1]=_0xfec871(0x18d),_0x152084))(I||{});const g=_0x32e03b=>c[_0xfec871(0x1af)](new Date(+_0x32e03b))[_0xfec871(0x1c5)](_0xfec871(0x198)),$=async(_0x356af6,_0xf5379a)=>{const _0x3d1b8e=_0xfec871,_0x17ce5a=_0x356af6[_0x3d1b8e(0x182)](c[_0x3d1b8e(0x191)]),_0x566594=_0x356af6[_0x3d1b8e(0x182)](M['HTTPService']);_0xf5379a[_0x3d1b8e(0x1ab)](_0x56d77c=>{const _0x5f0522=_0x3d1b8e;_0x17ce5a[_0x5f0522(0x17f)](_0x56d77c)&&_0xf5379a[_0x5f0522(0x197)](_0x56d77c);}),_0xf5379a['size']&&(await _0x566594[_0x3d1b8e(0x182)](_0x3d1b8e(0x19f),{'params':{'userIDs':[..._0xf5379a]}}))['body'][_0x3d1b8e(0x176)][_0x3d1b8e(0x1ab)](_0x2f80c8=>{const _0x2271ad=_0x3d1b8e;_0x2f80c8&&_0x17ce5a[_0x2271ad(0x1ea)](_0x2f80c8);});};var E=Object['defineProperty'],q=Object[_0xfec871(0x1b6)],A=(_0x52910d,_0x215f3a,_0x32568b,_0x319f53)=>{const _0x7ac14e=_0xfec871;for(var _0xf5a7d1=_0x319f53>0x1?void 0x0:_0x319f53?q(_0x215f3a,_0x32568b):_0x215f3a,_0x502a59=_0x52910d[_0x7ac14e(0x1db)]-0x1,_0x55ad9e;_0x502a59>=0x0;_0x502a59--)(_0x55ad9e=_0x52910d[_0x502a59])&&(_0xf5a7d1=(_0x319f53?_0x55ad9e(_0x215f3a,_0x32568b,_0xf5a7d1):_0x55ad9e(_0xf5a7d1))||_0xf5a7d1);return _0x319f53&&_0xf5a7d1&&E(_0x215f3a,_0x32568b,_0xf5a7d1),_0xf5a7d1;},_=(_0x263681,_0x2b1f4b)=>(_0x271df0,_0x42b611)=>_0x2b1f4b(_0x271df0,_0x42b611,_0x263681);let S=class extends c['Disposable']{constructor(_0x588540,_0x152046,_0x409d9f,_0x11d210){const _0x360e13=_0xfec871;super(),this[_0x360e13(0x1a0)]=_0x588540,this[_0x360e13(0x1ac)]=_0x152046,this[_0x360e13(0x1d6)]=_0x409d9f,this[_0x360e13(0x188)]=_0x11d210,this['_init'](),this[_0x360e13(0x19c)]();}[_0xfec871(0x19c)](){const _0x1bfe51=_0xfec871;this[_0x1bfe51(0x1e8)](this[_0x1bfe51(0x1ac)]['commentUpdate$'][_0x1bfe51(0x19e)](U[_0x1bfe51(0x1b2)](0x10))[_0x1bfe51(0x1da)](_0x584afa=>{const _0x57d718=_0x1bfe51,_0x55a758=new Set();_0x584afa[_0x57d718(0x1ab)](_0x307f51=>{const _0x21cff4=_0x57d718;switch(_0x307f51[_0x21cff4(0x1eb)]){case _0x21cff4(0x1ae):{const _0x158d31=_0x307f51[_0x21cff4(0x18f)][_0x21cff4(0x1a2)];_0x55a758[_0x21cff4(0x1ae)](_0x158d31);break;}}}),$(this[_0x57d718(0x188)],_0x55a758);}));}[_0xfec871(0x1d7)](){const _0x584038=_0xfec871;this['disposeWithMe'](this[_0x584038(0x1a0)][_0x584038(0x1df)][_0x584038(0x1da)](async _0x3905d5=>{const _0x301bf8=_0x584038;var _0x395d83,_0x5962bf,_0x572fc4,_0x4833cd;const _0x118349=(_0x395d83=this[_0x301bf8(0x1ac)]['getUnit'](_0x3905d5[_0x301bf8(0x1b0)])[_0x301bf8(0x175)](_0x50d592=>_0x50d592['threadId']===_0x3905d5['threadId']))==null?void 0x0:_0x395d83[_0x301bf8(0x1b1)];if(!_0x118349)return;const {unitId:_0x4cacd1,subUnitId:_0x38793f}=_0x118349;switch(_0x3905d5[_0x301bf8(0x1a3)]&&this['_userService'][_0x301bf8(0x1ea)](_0x3905d5[_0x301bf8(0x1a3)]),_0x3905d5[_0x301bf8(0x1eb)]){case I[_0x301bf8(0x1cb)]:break;case I[_0x301bf8(0x1b3)]:{this[_0x301bf8(0x1ac)][_0x301bf8(0x1a9)](_0x4cacd1,_0x38793f,{'unitId':_0x4cacd1,'subUnitId':_0x38793f,'ref':'','id':_0x3905d5[_0x301bf8(0x187)],'dT':g(+_0x3905d5[_0x301bf8(0x1be)]),'threadId':_0x3905d5['threadId'],'personId':(_0x572fc4=(_0x5962bf=_0x3905d5[_0x301bf8(0x1a3)])==null?void 0x0:_0x5962bf['userID'])!=null?_0x572fc4:_0x3905d5[_0x301bf8(0x1aa)],'text':JSON[_0x301bf8(0x1c2)](_0x3905d5[_0x301bf8(0x18b)]),'parentId':_0x118349['id']});break;}case I[_0x301bf8(0x179)]:{const _0x489967=this[_0x301bf8(0x1ac)]['getComment'](_0x4cacd1,_0x38793f,_0x3905d5['replyId']);_0x489967&&_0x489967[_0x301bf8(0x1d2)]&&this[_0x301bf8(0x1ac)][_0x301bf8(0x186)](_0x4cacd1,_0x38793f,_0x3905d5['replyId']);break;}case I['Edit']:{this['_threadCommentModel'][_0x301bf8(0x18e)](_0x4cacd1,_0x38793f,{'commentId':_0x3905d5['replyId'],'text':JSON['parse'](_0x3905d5[_0x301bf8(0x18b)])});break;}case I['Solve']:{const _0x50b0d3=(_0x4833cd=this[_0x301bf8(0x1ac)][_0x301bf8(0x1c3)](_0x3905d5['unitId'])[_0x301bf8(0x175)](_0x11fe41=>_0x11fe41[_0x301bf8(0x193)]===_0x3905d5[_0x301bf8(0x193)]))==null?void 0x0:_0x4833cd[_0x301bf8(0x1b1)];_0x50b0d3&&this[_0x301bf8(0x1ac)][_0x301bf8(0x1e3)](_0x4cacd1,_0x38793f,_0x50b0d3['id'],_0x3905d5['solved']===v[_0x301bf8(0x1a6)]);break;}}}));}};S=A([_(0x0,c['Inject'](C[_0xfec871(0x184)])),_(0x1,c['Inject'](P[_0xfec871(0x1bf)])),_(0x2,c[_0xfec871(0x1b4)](c['UserManagerService'])),_(0x3,c[_0xfec871(0x1b4)](c['Injector']))],S);const x=_0xfec871(0x199),D={};var Y=Object[_0xfec871(0x1cd)],G=Object[_0xfec871(0x1b6)],H=(_0x5a4143,_0x391494,_0x3afc00,_0x3cba7d)=>{for(var _0x3b2b7b=_0x3cba7d>0x1?void 0x0:_0x3cba7d?G(_0x391494,_0x3afc00):_0x391494,_0x3c73f0=_0x5a4143['length']-0x1,_0x5e6b4d;_0x3c73f0>=0x0;_0x3c73f0--)(_0x5e6b4d=_0x5a4143[_0x3c73f0])&&(_0x3b2b7b=(_0x3cba7d?_0x5e6b4d(_0x391494,_0x3afc00,_0x3b2b7b):_0x5e6b4d(_0x3b2b7b))||_0x3b2b7b);return _0x3cba7d&&_0x3b2b7b&&Y(_0x391494,_0x3afc00,_0x3b2b7b),_0x3b2b7b;},p=(_0x1420e5,_0x57054d)=>(_0x2bddcb,_0x4741b1)=>_0x57054d(_0x2bddcb,_0x4741b1,_0x1420e5);function _0x414a(){const _0x54b82e=['syncUpdateMutationToColla','UniverInstanceType','subscribe','length','844800enJCdE','HTTPService','rxjs','commentUpdate$','pluginName','UniverCollaborationClientPlugin','_sessionService','resolveComment','_threadCommentDataSourceService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','toStringTag','_httpService','disposeWithMe','/list','addUser','type','saveCommentToSnapshot','993204SgKiPl','rangeId','dataSource','CustomRangeType','find','users','UniverLicensePlugin','4111134dkOPLH','Delete','/edit','Module','comment','filter','OpenOrReOpen','getUser','_threadCommentDataSource','IConfigService','get','comments','CommentService','@univerjs/thread-comment','deleteComment','replyId','_injector','25479992ZtSskQ','replies','content','Unknown','UNRECOGNIZED','updateComment','payload','_configService','UserManagerService','/universer-api/comment/unit/','threadId','/reply','Edit','5oRIXQo','delete','YYYY/MM/DD\x20HH:mm','thread-comment-data-source.config','onReady','UniverThreadCommentUIPlugin','_initUserSync','requireSession','pipe','/universer-api/user/list','_commentService','Disposable','personId','user','Solve','@univerjs/network','Solved','7444262gkfkQK','ref','addComment','userId','forEach','_threadCommentModel','5539652tILcdD','add','dayjs','unitId','root','bufferTime','Reply','Inject','error','getOwnPropertyDescriptor','_initDataSource','/delete','COMMENT','DependentOn','reply','@univerjs-pro/license','732501gdBUfr','createTimestamp','ThreadCommentModel','getMemberID','/add','parse','getUnit','UniverThreadCommentDataSourcePlugin','format','values','getCurrentUser','_config','map','/solved','Add','body','defineProperty','resolved','code','Injector','@univerjs/thread-comment-ui','parentId','merge','customRanges','post','_userService','_init'];_0x414a=function(){return _0x54b82e;};return _0x414a();}function J(_0x5e9434,_0x2da724){const _0x581ca4=_0xfec871,_0x3f8e51=_0x5e9434[_0x581ca4(0x18a)][0x0];return{..._0x2da724,'id':_0x3f8e51[_0x581ca4(0x187)],'resolved':_0x5e9434['solved']===0x1,'dT':g(_0x3f8e51[_0x581ca4(0x1be)]),'personId':_0x3f8e51['userId'],'threadId':_0x3f8e51[_0x581ca4(0x193)]};}function F(_0x3bc60a,_0x5bd96d,_0x44d3a2){const _0x1b8f1e=_0xfec871;var _0x179daf,_0x32d7de;if(((_0x32d7de=(_0x179daf=_0x3bc60a==null?void 0x0:_0x3bc60a[_0x1b8f1e(0x18a)])==null?void 0x0:_0x179daf['length'])!=null?_0x32d7de:0x0)>0x0){const _0xbd29ff=(_0x31b8f4,_0x47773f)=>({'id':_0x31b8f4[_0x1b8f1e(0x187)],'threadId':_0x31b8f4['threadId'],'dT':g(_0x31b8f4['createTimestamp']),'personId':_0x31b8f4['userId'],'resolved':_0x3bc60a['solved']===v[_0x1b8f1e(0x1a6)],'unitId':_0x5bd96d,'subUnitId':_0x44d3a2,'text':JSON[_0x1b8f1e(0x1c2)](_0x31b8f4[_0x1b8f1e(0x18b)]),'parentId':_0x47773f}),_0x863bba=_0xbd29ff(_0x3bc60a[_0x1b8f1e(0x18a)][0x0]);return{..._0x863bba,'children':_0x3bc60a[_0x1b8f1e(0x18a)]['slice'](0x1)[_0x1b8f1e(0x1c9)](_0x23d87c=>_0xbd29ff(_0x23d87c,_0x863bba['id']))};}return null;}let f=class{constructor(_0x1f348c,_0x7a1b34,_0x51b6a4,_0xe12000){const _0xdd4990=_0xfec871;this['_httpService']=_0x1f348c,this[_0xdd4990(0x1d6)]=_0x7a1b34,this[_0xdd4990(0x1e2)]=_0x51b6a4,this['_injector']=_0xe12000;}async[_0xfec871(0x1a9)](_0x56d7f3){const _0x5eede8=_0xfec871;var _0x571e1f,_0x41a6f6;const {parentId:_0x2325cc,unitId:_0x5b4ffb,text:_0x1f70f1,threadId:_0x42532e}=_0x56d7f3,_0x4db341=(_0x41a6f6=(_0x571e1f=_0x1f70f1[_0x5eede8(0x1d4)])==null?void 0x0:_0x571e1f[_0x5eede8(0x17d)](_0x420fc7=>_0x420fc7['rangeType']===c[_0x5eede8(0x174)][_0x5eede8(0x1b9)])[_0x5eede8(0x1c9)](_0xc1da45=>_0xc1da45[_0x5eede8(0x172)]))!=null?_0x41a6f6:[],_0x510ef9=JSON['stringify'](_0x1f70f1),_0x515250=(await this['_sessionService']['requireSession'](_0x5b4ffb))[_0x5eede8(0x1c0)]();if(_0x2325cc){const _0x4d1cca={'memberId':_0x515250,'unitId':_0x5b4ffb,'content':_0x510ef9,'mention':_0x4db341,'threadId':_0x42532e},_0x36e3d5=(await this['_httpService'][_0x5eede8(0x1d5)](_0x5eede8(0x192)+_0x5b4ffb+_0x5eede8(0x194),{'body':_0x4d1cca}))['body'][_0x5eede8(0x1bb)];return{..._0x56d7f3,'id':_0x36e3d5[_0x5eede8(0x187)],'dT':c[_0x5eede8(0x1af)](+_0x36e3d5[_0x5eede8(0x1be)])[_0x5eede8(0x1c5)](_0x5eede8(0x198)),'personId':_0x36e3d5[_0x5eede8(0x1aa)]};}else{const _0xde8100={'memberId':_0x515250,'unitId':_0x5b4ffb,'content':_0x510ef9,'mention':_0x4db341},_0x40b1b1=await this[_0x5eede8(0x1e7)][_0x5eede8(0x1d5)](_0x5eede8(0x192)+_0x5b4ffb+_0x5eede8(0x1c1),{'body':_0xde8100});return J(_0x40b1b1['body'][_0x5eede8(0x17c)],_0x56d7f3);}}async[_0xfec871(0x18e)](_0x2d9ad0){const _0x5a96a0=_0xfec871;var _0x234269,_0x36575a;const {text:_0x577ae3,unitId:_0x120ac3}=_0x2d9ad0,_0x27ffe5=(_0x36575a=(_0x234269=_0x577ae3[_0x5a96a0(0x1d4)])==null?void 0x0:_0x234269[_0x5a96a0(0x17d)](_0x1b5032=>_0x1b5032['rangeType']===c[_0x5a96a0(0x174)][_0x5a96a0(0x1b9)])[_0x5a96a0(0x1c9)](_0x450925=>_0x450925['rangeId']))!=null?_0x36575a:[],_0x2c25a5=JSON['stringify'](_0x577ae3),_0x202d56=_0x2d9ad0['threadId'],_0x411af3=_0x2d9ad0['id'],_0x59a10c={'memberId':(await this[_0x5a96a0(0x1e2)]['requireSession'](_0x120ac3))[_0x5a96a0(0x1c0)](),'unitId':_0x120ac3,'threadId':_0x202d56,'mention':_0x27ffe5,'content':_0x2c25a5,'replyId':_0x411af3},_0x27f449=await this[_0x5a96a0(0x1e7)]['post'](_0x5a96a0(0x192)+_0x120ac3+_0x5a96a0(0x17a),{'body':_0x59a10c});return!_0x27f449[_0x5a96a0(0x1cc)][_0x5a96a0(0x1b5)]||_0x27f449[_0x5a96a0(0x1cc)][_0x5a96a0(0x1b5)][_0x5a96a0(0x1cf)]===0x1;}async[_0xfec871(0x1e3)](_0x5b43f){const _0x4cc180=_0xfec871,{unitId:_0x1db9ed}=_0x5b43f,_0x2e3b4e=_0x5b43f[_0x4cc180(0x193)],_0x2656f2={'memberId':this[_0x4cc180(0x1d6)][_0x4cc180(0x1c7)]()['userID'],'unitId':_0x1db9ed,'threadId':_0x2e3b4e,'solved':_0x5b43f[_0x4cc180(0x1ce)]?v['Solved']:v['OpenOrReOpen']},_0x3facbf=await this[_0x4cc180(0x1e7)][_0x4cc180(0x1d5)](_0x4cc180(0x192)+_0x1db9ed+_0x4cc180(0x1ca),{'body':_0x2656f2});return!_0x3facbf['body'][_0x4cc180(0x1b5)]||_0x3facbf[_0x4cc180(0x1cc)][_0x4cc180(0x1b5)][_0x4cc180(0x1cf)]===0x1;}async[_0xfec871(0x186)](_0x577091,_0x3f3237,_0xb6c672,_0xba6e94){const _0x36acb1=_0xfec871,_0x5e4459={'memberId':(await this[_0x36acb1(0x1e2)][_0x36acb1(0x19d)](_0x577091))[_0x36acb1(0x1c0)](),'threadId':_0xb6c672,'replyId':_0xba6e94,'unitId':_0x577091},_0x3ef597=await this['_httpService']['post'](_0x36acb1(0x192)+_0x577091+_0x36acb1(0x1b8),{'body':_0x5e4459});return!_0x3ef597[_0x36acb1(0x1cc)][_0x36acb1(0x1b5)]||_0x3ef597[_0x36acb1(0x1cc)][_0x36acb1(0x1b5)][_0x36acb1(0x1cf)]===0x1;}async['listComments'](_0x3d9384,_0x2bdb38,_0x3e406a){const _0xd7bee7=_0xfec871,_0x4b93e2={'unitId':_0x3d9384,'threadId':_0x3e406a},_0x2ff7e5=await this[_0xd7bee7(0x1e7)][_0xd7bee7(0x1d5)]('/universer-api/comment/unit/'+_0x3d9384+_0xd7bee7(0x1e9),{'body':_0x4b93e2}),_0x45db93=_0x3e406a[_0xd7bee7(0x1c9)](_0x9e051e=>F(_0x2ff7e5[_0xd7bee7(0x1cc)][_0xd7bee7(0x183)][_0x9e051e],_0x3d9384,_0x2bdb38))[_0xd7bee7(0x17d)](Boolean);return Object[_0xd7bee7(0x1c6)](_0x2ff7e5[_0xd7bee7(0x1cc)][_0xd7bee7(0x176)])['forEach'](_0x5b9b60=>{this['_userService']['addUser'](_0x5b9b60);}),_0x45db93;}[_0xfec871(0x1ec)](_0x1004d3){const _0x14fd75=_0xfec871;return{'id':_0x1004d3['id'],'threadId':_0x1004d3[_0x14fd75(0x193)],'ref':_0x1004d3[_0x14fd75(0x1a8)]};}};f=H([p(0x0,c[_0xfec871(0x1b4)](M[_0xfec871(0x1dd)])),p(0x1,c[_0xfec871(0x1b4)](c['UserManagerService'])),p(0x2,c[_0xfec871(0x1b4)](C['CollaborationSessionService'])),p(0x3,c[_0xfec871(0x1b4)](c[_0xfec871(0x1d0)]))],f);function _0x5f38(_0x27a6a6,_0x43234b){const _0x414afc=_0x414a();return _0x5f38=function(_0x5f3845,_0x444a9b){_0x5f3845=_0x5f3845-0x172;let _0x735538=_0x414afc[_0x5f3845];return _0x735538;},_0x5f38(_0x27a6a6,_0x43234b);}var L=Object[_0xfec871(0x1cd)],Z=Object[_0xfec871(0x1b6)],W=(_0x2fd8f3,_0x4d6658,_0x24b6f2,_0x113774)=>{for(var _0x11ee74=_0x113774>0x1?void 0x0:_0x113774?Z(_0x4d6658,_0x24b6f2):_0x4d6658,_0x336291=_0x2fd8f3['length']-0x1,_0x3366d0;_0x336291>=0x0;_0x336291--)(_0x3366d0=_0x2fd8f3[_0x336291])&&(_0x11ee74=(_0x113774?_0x3366d0(_0x4d6658,_0x24b6f2,_0x11ee74):_0x3366d0(_0x11ee74))||_0x11ee74);return _0x113774&&_0x11ee74&&L(_0x4d6658,_0x24b6f2,_0x11ee74),_0x11ee74;},O=(_0x76eb60,_0x2691cf)=>(_0x3efd7a,_0x110221)=>_0x2691cf(_0x3efd7a,_0x110221,_0x76eb60);let b=class extends c[_0xfec871(0x1a1)]{constructor(_0x5a8bf2,_0x45993e){const _0x3dec6d=_0xfec871;super(),this[_0x3dec6d(0x1e4)]=_0x5a8bf2,this[_0x3dec6d(0x180)]=_0x45993e,this[_0x3dec6d(0x1b7)]();}[_0xfec871(0x1b7)](){const _0x51da1f=_0xfec871;this[_0x51da1f(0x1e4)][_0x51da1f(0x173)]=this['_threadCommentDataSource'],this[_0x51da1f(0x1e4)][_0x51da1f(0x1d8)]=!0x1;}};b=W([O(0x0,P['IThreadCommentDataSourceService']),O(0x1,c[_0xfec871(0x1b4)](f))],b);var j=Object[_0xfec871(0x1cd)],B=Object[_0xfec871(0x1b6)],K=(_0x10b4bd,_0x2a34ac,_0xb82f4e)=>_0x2a34ac in _0x10b4bd?j(_0x10b4bd,_0x2a34ac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb82f4e}):_0x10b4bd[_0x2a34ac]=_0xb82f4e,V=(_0x4a4955,_0x23fffa,_0x31ab76,_0x5d0796)=>{const _0x1d40df=_0xfec871;for(var _0x54c823=_0x5d0796>0x1?void 0x0:_0x5d0796?B(_0x23fffa,_0x31ab76):_0x23fffa,_0x514e24=_0x4a4955[_0x1d40df(0x1db)]-0x1,_0x54672b;_0x514e24>=0x0;_0x514e24--)(_0x54672b=_0x4a4955[_0x514e24])&&(_0x54c823=(_0x5d0796?_0x54672b(_0x23fffa,_0x31ab76,_0x54c823):_0x54672b(_0x54c823))||_0x54c823);return _0x5d0796&&_0x54c823&&j(_0x23fffa,_0x31ab76,_0x54c823),_0x54c823;},y=(_0xff88a2,_0x13ab78)=>(_0x4e5f23,_0x12e19c)=>_0x13ab78(_0x4e5f23,_0x12e19c,_0xff88a2),N=(_0x207aca,_0x56d504,_0x2299e3)=>K(_0x207aca,typeof _0x56d504!='symbol'?_0x56d504+'':_0x56d504,_0x2299e3);exports[_0xfec871(0x1c4)]=class extends c['Plugin']{constructor(_0x4fc387=D,_0xab283d,_0x21171c){const _0x5b774e=_0xfec871;super(),this[_0x5b774e(0x1c8)]=_0x4fc387,this[_0x5b774e(0x188)]=_0xab283d,this[_0x5b774e(0x190)]=_0x21171c;const {..._0x8ba02a}=c[_0x5b774e(0x1d3)]({},D,this['_config']);this[_0x5b774e(0x190)]['setConfig'](x,_0x8ba02a);}['onStarting'](){const _0x3c6f54=_0xfec871;[[f],[b],[S]][_0x3c6f54(0x1ab)](_0x172f82=>{const _0x58c1ac=_0x3c6f54;this[_0x58c1ac(0x188)][_0x58c1ac(0x1ae)](_0x172f82);});}[_0xfec871(0x19a)](){const _0x34c0bc=_0xfec871;this[_0x34c0bc(0x188)][_0x34c0bc(0x182)](b),this[_0x34c0bc(0x188)][_0x34c0bc(0x182)](S);}},N(exports[_0xfec871(0x1c4)],_0xfec871(0x1e0),R),N(exports[_0xfec871(0x1c4)],_0xfec871(0x1eb),c[_0xfec871(0x1d9)]['UNIVER_UNKNOWN']),exports[_0xfec871(0x1c4)]=V([c[_0xfec871(0x1ba)](w[_0xfec871(0x19b)],C[_0xfec871(0x1e1)],T[_0xfec871(0x177)]),y(0x1,c[_0xfec871(0x1b4)](c[_0xfec871(0x1d0)])),y(0x2,c[_0xfec871(0x181)])],exports[_0xfec871(0x1c4)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x109a23=_0x3d3b;(function(_0x519b89,_0x212074){const _0x114d6b=_0x3d3b,_0x5d8cb2=_0x519b89();while(!![]){try{const _0x105f13=parseInt(_0x114d6b(0xfd))/0x1*(-parseInt(_0x114d6b(0x100))/0x2)+parseInt(_0x114d6b(0x132))/0x3+-parseInt(_0x114d6b(0x152))/0x4+parseInt(_0x114d6b(0x10c))/0x5*(parseInt(_0x114d6b(0x12f))/0x6)+parseInt(_0x114d6b(0x151))/0x7*(-parseInt(_0x114d6b(0x11a))/0x8)+parseInt(_0x114d6b(0x11f))/0x9+parseInt(_0x114d6b(0x14e))/0xa;if(_0x105f13===_0x212074)break;else _0x5d8cb2['push'](_0x5d8cb2['shift']());}catch(_0x4d3d46){_0x5d8cb2['push'](_0x5d8cb2['shift']());}}}(_0x2d9e,0x82832));import{CommentService as _0x33429b,CollaborationSessionService as _0x5b9748,UniverCollaborationClientPlugin as _0x87e75c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x59ccf7}from'@univerjs-pro/license';import{dayjs as _0x4b1fd9,UserManagerService as _0xe7a64c,Inject as _0xb5eab3,Injector as _0x56655d,Disposable as _0xfedcae,CustomRangeType as _0x51de6f,UniverInstanceType as _0x1e94ae,DependentOn as _0x39d518,Plugin as _0xb5596f,merge as _0x41f38a,IConfigService as _0x47017a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x635f56}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa061c8,IThreadCommentDataSourceService as _0x21e3b4}from'@univerjs/thread-comment';import{bufferTime as _0x1a1bf8}from'rxjs';import{HTTPService as _0x3d833e}from'@univerjs/network';const B='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _=(_0x1d14dd=>(_0x1d14dd[_0x1d14dd[_0x109a23(0xfa)]=0x0]=_0x109a23(0xfa),_0x1d14dd[_0x1d14dd[_0x109a23(0x103)]=0x1]=_0x109a23(0x103),_0x1d14dd[_0x1d14dd[_0x109a23(0x119)]=-0x1]=_0x109a23(0x119),_0x1d14dd))(_||{}),p=(_0x457b27=>(_0x457b27[_0x457b27[_0x109a23(0xff)]=0x0]=_0x109a23(0xff),_0x457b27[_0x457b27[_0x109a23(0x10a)]=0x1]='Add',_0x457b27[_0x457b27[_0x109a23(0x11e)]=0x2]=_0x109a23(0x11e),_0x457b27[_0x457b27[_0x109a23(0xf7)]=0x3]=_0x109a23(0xf7),_0x457b27[_0x457b27[_0x109a23(0x106)]=0x4]=_0x109a23(0x106),_0x457b27[_0x457b27['Solve']=0x5]=_0x109a23(0x116),_0x457b27[_0x457b27[_0x109a23(0x119)]=-0x1]=_0x109a23(0x119),_0x457b27))(p||{});const O=_0x117e59=>_0x4b1fd9(new Date(+_0x117e59))[_0x109a23(0x12c)]('YYYY/MM/DD\x20HH:mm'),K=async(_0x264681,_0x2c5f6b)=>{const _0x765ac3=_0x109a23,_0x13c995=_0x264681['get'](_0xe7a64c),_0x21c1be=_0x264681['get'](_0x3d833e);_0x2c5f6b[_0x765ac3(0x10f)](_0x5ce1f4=>{const _0x3a600c=_0x765ac3;_0x13c995[_0x3a600c(0x139)](_0x5ce1f4)&&_0x2c5f6b['delete'](_0x5ce1f4);}),_0x2c5f6b[_0x765ac3(0x102)]&&(await _0x21c1be[_0x765ac3(0x11d)](_0x765ac3(0x122),{'params':{'userIDs':[..._0x2c5f6b]}}))[_0x765ac3(0x130)][_0x765ac3(0xf2)][_0x765ac3(0x10f)](_0x4ce77e=>{const _0x22ec6d=_0x765ac3;_0x4ce77e&&_0x13c995[_0x22ec6d(0x13e)](_0x4ce77e);});};var V=Object['defineProperty'],z=Object['getOwnPropertyDescriptor'],Q=(_0x39ae6a,_0x45f0c5,_0x3577a1,_0x39fc7d)=>{const _0x3639b2=_0x109a23;for(var _0x536f61=_0x39fc7d>0x1?void 0x0:_0x39fc7d?z(_0x45f0c5,_0x3577a1):_0x45f0c5,_0x483421=_0x39ae6a[_0x3639b2(0x13a)]-0x1,_0x54c01c;_0x483421>=0x0;_0x483421--)(_0x54c01c=_0x39ae6a[_0x483421])&&(_0x536f61=(_0x39fc7d?_0x54c01c(_0x45f0c5,_0x3577a1,_0x536f61):_0x54c01c(_0x536f61))||_0x536f61);return _0x39fc7d&&_0x536f61&&V(_0x45f0c5,_0x3577a1,_0x536f61),_0x536f61;},v=(_0x513b6f,_0x105def)=>(_0x4e6a00,_0x5dca0e)=>_0x105def(_0x4e6a00,_0x5dca0e,_0x513b6f);let I=class extends _0xfedcae{constructor(_0x2890e1,_0x511db6,_0x3063b0,_0x3350fc){const _0x5a7edd=_0x109a23;super(),this[_0x5a7edd(0x107)]=_0x2890e1,this[_0x5a7edd(0x12a)]=_0x511db6,this['_userService']=_0x3063b0,this[_0x5a7edd(0x143)]=_0x3350fc,this[_0x5a7edd(0x133)](),this[_0x5a7edd(0x13d)]();}[_0x109a23(0x13d)](){const _0x126fda=_0x109a23;this[_0x126fda(0x113)](this[_0x126fda(0x12a)][_0x126fda(0x124)][_0x126fda(0x10b)](_0x1a1bf8(0x10))[_0x126fda(0xfb)](_0x18e766=>{const _0x4ae1c3=_0x126fda,_0x6d6682=new Set();_0x18e766[_0x4ae1c3(0x10f)](_0x1a66c5=>{const _0x3ea3a6=_0x4ae1c3;switch(_0x1a66c5[_0x3ea3a6(0x141)]){case _0x3ea3a6(0x125):{const _0x447a6a=_0x1a66c5[_0x3ea3a6(0x129)][_0x3ea3a6(0x14f)];_0x6d6682[_0x3ea3a6(0x125)](_0x447a6a);break;}}}),K(this[_0x4ae1c3(0x143)],_0x6d6682);}));}[_0x109a23(0x133)](){const _0x22dab9=_0x109a23;this['disposeWithMe'](this[_0x22dab9(0x107)][_0x22dab9(0x124)][_0x22dab9(0xfb)](async _0x432a98=>{const _0x4f7abc=_0x22dab9;var _0x25e427,_0x81fac0,_0x479696,_0x3de5c7;const _0x2adf7e=(_0x25e427=this[_0x4f7abc(0x12a)][_0x4f7abc(0x110)](_0x432a98['unitId'])[_0x4f7abc(0x147)](_0x443b90=>_0x443b90[_0x4f7abc(0x12b)]===_0x432a98['threadId']))==null?void 0x0:_0x25e427['root'];if(!_0x2adf7e)return;const {unitId:_0x2ca617,subUnitId:_0x2209f9}=_0x2adf7e;switch(_0x432a98[_0x4f7abc(0x12e)]&&this[_0x4f7abc(0xfc)]['addUser'](_0x432a98[_0x4f7abc(0x12e)]),_0x432a98['type']){case p[_0x4f7abc(0x10a)]:break;case p['Reply']:{this[_0x4f7abc(0x12a)][_0x4f7abc(0x11b)](_0x2ca617,_0x2209f9,{'unitId':_0x2ca617,'subUnitId':_0x2209f9,'ref':'','id':_0x432a98[_0x4f7abc(0x10d)],'dT':O(+_0x432a98[_0x4f7abc(0xf4)]),'threadId':_0x432a98['threadId'],'personId':(_0x479696=(_0x81fac0=_0x432a98['user'])==null?void 0x0:_0x81fac0[_0x4f7abc(0x137)])!=null?_0x479696:_0x432a98[_0x4f7abc(0x138)],'text':JSON[_0x4f7abc(0x142)](_0x432a98[_0x4f7abc(0x148)]),'parentId':_0x2adf7e['id']});break;}case p['Delete']:{const _0x29b051=this[_0x4f7abc(0x12a)][_0x4f7abc(0x13b)](_0x2ca617,_0x2209f9,_0x432a98[_0x4f7abc(0x10d)]);_0x29b051&&_0x29b051[_0x4f7abc(0x14d)]&&this['_threadCommentModel'][_0x4f7abc(0xf1)](_0x2ca617,_0x2209f9,_0x432a98[_0x4f7abc(0x10d)]);break;}case p[_0x4f7abc(0xf7)]:{this['_threadCommentModel'][_0x4f7abc(0x10e)](_0x2ca617,_0x2209f9,{'commentId':_0x432a98[_0x4f7abc(0x10d)],'text':JSON[_0x4f7abc(0x142)](_0x432a98['content'])});break;}case p[_0x4f7abc(0x116)]:{const _0x44b62d=(_0x3de5c7=this[_0x4f7abc(0x12a)]['getUnit'](_0x432a98['unitId'])[_0x4f7abc(0x147)](_0x2a8f1b=>_0x2a8f1b[_0x4f7abc(0x12b)]===_0x432a98[_0x4f7abc(0x12b)]))==null?void 0x0:_0x3de5c7['root'];_0x44b62d&&this[_0x4f7abc(0x12a)][_0x4f7abc(0x104)](_0x2ca617,_0x2209f9,_0x44b62d['id'],_0x432a98[_0x4f7abc(0x134)]===_[_0x4f7abc(0x103)]);break;}}}));}};I=Q([v(0x0,_0xb5eab3(_0x33429b)),v(0x1,_0xb5eab3(_0xa061c8)),v(0x2,_0xb5eab3(_0xe7a64c)),v(0x3,_0xb5eab3(_0x56655d))],I);const X='thread-comment-data-source.config',P={};function _0x3d3b(_0x6493ed,_0x1a88b9){const _0x2d9ec3=_0x2d9e();return _0x3d3b=function(_0x3d3bfe,_0x2d2751){_0x3d3bfe=_0x3d3bfe-0xf0;let _0x41bf61=_0x2d9ec3[_0x3d3bfe];return _0x41bf61;},_0x3d3b(_0x6493ed,_0x1a88b9);}var k=Object['defineProperty'],ee=Object[_0x109a23(0x14c)],re=(_0x2704d5,_0x2f633f,_0x422161,_0x3ddf9e)=>{const _0x152910=_0x109a23;for(var _0x5d82de=_0x3ddf9e>0x1?void 0x0:_0x3ddf9e?ee(_0x2f633f,_0x422161):_0x2f633f,_0xfe6dd8=_0x2704d5[_0x152910(0x13a)]-0x1,_0x3ba1a3;_0xfe6dd8>=0x0;_0xfe6dd8--)(_0x3ba1a3=_0x2704d5[_0xfe6dd8])&&(_0x5d82de=(_0x3ddf9e?_0x3ba1a3(_0x2f633f,_0x422161,_0x5d82de):_0x3ba1a3(_0x5d82de))||_0x5d82de);return _0x3ddf9e&&_0x5d82de&&k(_0x2f633f,_0x422161,_0x5d82de),_0x5d82de;},f=(_0x521874,_0x3cf39b)=>(_0x323fd4,_0x3fef44)=>_0x3cf39b(_0x323fd4,_0x3fef44,_0x521874);function te(_0x495e80,_0x158816){const _0xcfc036=_0x109a23,_0x3e43cf=_0x495e80[_0xcfc036(0x14a)][0x0];return{..._0x158816,'id':_0x3e43cf[_0xcfc036(0x10d)],'resolved':_0x495e80[_0xcfc036(0x134)]===0x1,'dT':O(_0x3e43cf[_0xcfc036(0xf4)]),'personId':_0x3e43cf[_0xcfc036(0x138)],'threadId':_0x3e43cf[_0xcfc036(0x12b)]};}function _0x2d9e(){const _0x5dfae2=['Unknown','682930hfcPGm','pluginName','size','Solved','resolveComment','COMMENT','Delete','_commentService','map','_threadCommentDataSourceService','Add','pipe','948490tfmLSh','replyId','updateComment','forEach','getUnit','code','UNIVER_UNKNOWN','disposeWithMe','_sessionService','/reply','Solve','requireSession','error','UNRECOGNIZED','1016kUpLGF','addComment','getMemberID','get','Reply','4144923AkmgZd','values','comments','/universer-api/user/list','_configService','commentUpdate$','add','symbol','_config','/list','payload','_threadCommentModel','threadId','format','filter','user','6giuAcy','body','/universer-api/comment/unit/','1048794tuAwUi','_init','solved','dataSource','saveCommentToSnapshot','userID','userId','getUser','length','getComment','onReady','_initUserSync','addUser','listComments','comment','type','parse','_injector','syncUpdateMutationToColla','_initDataSource','/solved','find','content','_httpService','replies','slice','getOwnPropertyDescriptor','parentId','10460140WNTOaN','personId','ref','16282SyYjKY','3497648JYPSiD','setConfig','/delete','reply','rangeId','deleteComment','users','onStarting','createTimestamp','defineProperty','rangeType','Edit','post','customRanges','OpenOrReOpen','subscribe','_userService','1CMJcas','_threadCommentDataSource'];_0x2d9e=function(){return _0x5dfae2;};return _0x2d9e();}function se(_0x5867d6,_0x1617a8,_0x43cee4){const _0x594e1b=_0x109a23;var _0x3fc4c2,_0x4956e1;if(((_0x4956e1=(_0x3fc4c2=_0x5867d6==null?void 0x0:_0x5867d6['replies'])==null?void 0x0:_0x3fc4c2['length'])!=null?_0x4956e1:0x0)>0x0){const _0x53d4f6=(_0x39fbd0,_0x315934)=>({'id':_0x39fbd0[_0x594e1b(0x10d)],'threadId':_0x39fbd0[_0x594e1b(0x12b)],'dT':O(_0x39fbd0[_0x594e1b(0xf4)]),'personId':_0x39fbd0[_0x594e1b(0x138)],'resolved':_0x5867d6[_0x594e1b(0x134)]===_['Solved'],'unitId':_0x1617a8,'subUnitId':_0x43cee4,'text':JSON['parse'](_0x39fbd0[_0x594e1b(0x148)]),'parentId':_0x315934}),_0x32a7a6=_0x53d4f6(_0x5867d6['replies'][0x0]);return{..._0x32a7a6,'children':_0x5867d6[_0x594e1b(0x14a)][_0x594e1b(0x14b)](0x1)[_0x594e1b(0x108)](_0x4b0f3a=>_0x53d4f6(_0x4b0f3a,_0x32a7a6['id']))};}return null;}let S=class{constructor(_0x2509a4,_0x276f5b,_0x12862e,_0x442464){const _0x1774dd=_0x109a23;this['_httpService']=_0x2509a4,this[_0x1774dd(0xfc)]=_0x276f5b,this[_0x1774dd(0x114)]=_0x12862e,this[_0x1774dd(0x143)]=_0x442464;}async[_0x109a23(0x11b)](_0x5524c9){const _0x20c637=_0x109a23;var _0x5d64fd,_0x1d7941;const {parentId:_0x50fb0e,unitId:_0x2e0f20,text:_0x2ccb90,threadId:_0x600d27}=_0x5524c9,_0x246218=(_0x1d7941=(_0x5d64fd=_0x2ccb90[_0x20c637(0xf9)])==null?void 0x0:_0x5d64fd[_0x20c637(0x12d)](_0x385fa3=>_0x385fa3['rangeType']===_0x51de6f[_0x20c637(0x105)])['map'](_0x4b28b3=>_0x4b28b3[_0x20c637(0xf0)]))!=null?_0x1d7941:[],_0x16ae1b=JSON['stringify'](_0x2ccb90),_0x35e322=(await this[_0x20c637(0x114)][_0x20c637(0x117)](_0x2e0f20))[_0x20c637(0x11c)]();if(_0x50fb0e){const _0x596262={'memberId':_0x35e322,'unitId':_0x2e0f20,'content':_0x16ae1b,'mention':_0x246218,'threadId':_0x600d27},_0x25932b=(await this[_0x20c637(0x149)][_0x20c637(0xf8)](_0x20c637(0x131)+_0x2e0f20+_0x20c637(0x115),{'body':_0x596262}))[_0x20c637(0x130)][_0x20c637(0x155)];return{..._0x5524c9,'id':_0x25932b[_0x20c637(0x10d)],'dT':_0x4b1fd9(+_0x25932b[_0x20c637(0xf4)])[_0x20c637(0x12c)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x25932b[_0x20c637(0x138)]};}else{const _0x53502e={'memberId':_0x35e322,'unitId':_0x2e0f20,'content':_0x16ae1b,'mention':_0x246218},_0x3a8d47=await this[_0x20c637(0x149)]['post'](_0x20c637(0x131)+_0x2e0f20+'/add',{'body':_0x53502e});return te(_0x3a8d47[_0x20c637(0x130)][_0x20c637(0x140)],_0x5524c9);}}async['updateComment'](_0x25d450){const _0x7df8c0=_0x109a23;var _0x285bb8,_0x87d3f1;const {text:_0x42e786,unitId:_0x5d2ba8}=_0x25d450,_0x328095=(_0x87d3f1=(_0x285bb8=_0x42e786[_0x7df8c0(0xf9)])==null?void 0x0:_0x285bb8[_0x7df8c0(0x12d)](_0x3ce6b9=>_0x3ce6b9[_0x7df8c0(0xf6)]===_0x51de6f['COMMENT'])['map'](_0x5a3d20=>_0x5a3d20[_0x7df8c0(0xf0)]))!=null?_0x87d3f1:[],_0x29591a=JSON['stringify'](_0x42e786),_0x3f8083=_0x25d450[_0x7df8c0(0x12b)],_0x2983f8=_0x25d450['id'],_0x208fb3={'memberId':(await this[_0x7df8c0(0x114)][_0x7df8c0(0x117)](_0x5d2ba8))['getMemberID'](),'unitId':_0x5d2ba8,'threadId':_0x3f8083,'mention':_0x328095,'content':_0x29591a,'replyId':_0x2983f8},_0x259889=await this[_0x7df8c0(0x149)][_0x7df8c0(0xf8)](_0x7df8c0(0x131)+_0x5d2ba8+'/edit',{'body':_0x208fb3});return!_0x259889[_0x7df8c0(0x130)][_0x7df8c0(0x118)]||_0x259889['body']['error'][_0x7df8c0(0x111)]===0x1;}async['resolveComment'](_0x24956d){const _0x5873fd=_0x109a23,{unitId:_0x3ba665}=_0x24956d,_0x10299b=_0x24956d['threadId'],_0x6216b1={'memberId':this['_userService']['getCurrentUser']()[_0x5873fd(0x137)],'unitId':_0x3ba665,'threadId':_0x10299b,'solved':_0x24956d['resolved']?_['Solved']:_[_0x5873fd(0xfa)]},_0x353721=await this[_0x5873fd(0x149)]['post'](_0x5873fd(0x131)+_0x3ba665+_0x5873fd(0x146),{'body':_0x6216b1});return!_0x353721[_0x5873fd(0x130)]['error']||_0x353721[_0x5873fd(0x130)][_0x5873fd(0x118)][_0x5873fd(0x111)]===0x1;}async[_0x109a23(0xf1)](_0x516413,_0x82301d,_0x4b5d25,_0x373dfe){const _0x4d4f70=_0x109a23,_0x467b4d={'memberId':(await this['_sessionService']['requireSession'](_0x516413))[_0x4d4f70(0x11c)](),'threadId':_0x4b5d25,'replyId':_0x373dfe,'unitId':_0x516413},_0x4981a3=await this['_httpService'][_0x4d4f70(0xf8)](_0x4d4f70(0x131)+_0x516413+_0x4d4f70(0x154),{'body':_0x467b4d});return!_0x4981a3[_0x4d4f70(0x130)][_0x4d4f70(0x118)]||_0x4981a3[_0x4d4f70(0x130)][_0x4d4f70(0x118)][_0x4d4f70(0x111)]===0x1;}async[_0x109a23(0x13f)](_0x22abb4,_0x42bd79,_0x3ecc37){const _0x55370e=_0x109a23,_0x46d871={'unitId':_0x22abb4,'threadId':_0x3ecc37},_0xefb07f=await this[_0x55370e(0x149)]['post']('/universer-api/comment/unit/'+_0x22abb4+_0x55370e(0x128),{'body':_0x46d871}),_0x35defe=_0x3ecc37[_0x55370e(0x108)](_0x587bed=>se(_0xefb07f['body'][_0x55370e(0x121)][_0x587bed],_0x22abb4,_0x42bd79))[_0x55370e(0x12d)](Boolean);return Object[_0x55370e(0x120)](_0xefb07f['body'][_0x55370e(0xf2)])[_0x55370e(0x10f)](_0x46df50=>{const _0x4d436b=_0x55370e;this[_0x4d436b(0xfc)][_0x4d436b(0x13e)](_0x46df50);}),_0x35defe;}[_0x109a23(0x136)](_0x3c07a3){const _0x47ce7d=_0x109a23;return{'id':_0x3c07a3['id'],'threadId':_0x3c07a3[_0x47ce7d(0x12b)],'ref':_0x3c07a3[_0x47ce7d(0x150)]};}};S=re([f(0x0,_0xb5eab3(_0x3d833e)),f(0x1,_0xb5eab3(_0xe7a64c)),f(0x2,_0xb5eab3(_0x5b9748)),f(0x3,_0xb5eab3(_0x56655d))],S);var oe=Object[_0x109a23(0xf5)],ne=Object[_0x109a23(0x14c)],ie=(_0x27cb13,_0x3b682d,_0x1f06e7,_0x127da2)=>{const _0x2ff3e0=_0x109a23;for(var _0x3d1f4d=_0x127da2>0x1?void 0x0:_0x127da2?ne(_0x3b682d,_0x1f06e7):_0x3b682d,_0x16b2b2=_0x27cb13[_0x2ff3e0(0x13a)]-0x1,_0x41ffa9;_0x16b2b2>=0x0;_0x16b2b2--)(_0x41ffa9=_0x27cb13[_0x16b2b2])&&(_0x3d1f4d=(_0x127da2?_0x41ffa9(_0x3b682d,_0x1f06e7,_0x3d1f4d):_0x41ffa9(_0x3d1f4d))||_0x3d1f4d);return _0x127da2&&_0x3d1f4d&&oe(_0x3b682d,_0x1f06e7,_0x3d1f4d),_0x3d1f4d;},M=(_0x23b0bb,_0x1081bd)=>(_0x19085c,_0xe3b603)=>_0x1081bd(_0x19085c,_0xe3b603,_0x23b0bb);let b=class extends _0xfedcae{constructor(_0x371b1d,_0x5c9494){const _0x34f8bd=_0x109a23;super(),this['_threadCommentDataSourceService']=_0x371b1d,this[_0x34f8bd(0xfe)]=_0x5c9494,this['_initDataSource']();}[_0x109a23(0x145)](){const _0x1b5be0=_0x109a23;this['_threadCommentDataSourceService'][_0x1b5be0(0x135)]=this[_0x1b5be0(0xfe)],this[_0x1b5be0(0x109)][_0x1b5be0(0x144)]=!0x1;}};b=ie([M(0x0,_0x21e3b4),M(0x1,_0xb5eab3(S))],b);var $=Object['defineProperty'],ce=Object['getOwnPropertyDescriptor'],ae=(_0x53c6cb,_0x5c6aff,_0x36a26c)=>_0x5c6aff in _0x53c6cb?$(_0x53c6cb,_0x5c6aff,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x36a26c}):_0x53c6cb[_0x5c6aff]=_0x36a26c,de=(_0x6fee64,_0x3fc3b4,_0x2fddad,_0x231bfb)=>{const _0x244c13=_0x109a23;for(var _0x5a3aca=_0x231bfb>0x1?void 0x0:_0x231bfb?ce(_0x3fc3b4,_0x2fddad):_0x3fc3b4,_0x4027a7=_0x6fee64[_0x244c13(0x13a)]-0x1,_0x58c2f7;_0x4027a7>=0x0;_0x4027a7--)(_0x58c2f7=_0x6fee64[_0x4027a7])&&(_0x5a3aca=(_0x231bfb?_0x58c2f7(_0x3fc3b4,_0x2fddad,_0x5a3aca):_0x58c2f7(_0x5a3aca))||_0x5a3aca);return _0x231bfb&&_0x5a3aca&&$(_0x3fc3b4,_0x2fddad,_0x5a3aca),_0x5a3aca;},N=(_0x557fbb,_0x1215e8)=>(_0x4aff8f,_0x445834)=>_0x1215e8(_0x4aff8f,_0x445834,_0x557fbb),j=(_0x5aa27e,_0x5d6570,_0x58216f)=>ae(_0x5aa27e,typeof _0x5d6570!=_0x109a23(0x126)?_0x5d6570+'':_0x5d6570,_0x58216f);let C=class extends _0xb5596f{constructor(_0x573e36=P,_0x352f30,_0x402115){const _0x276d8c=_0x109a23;super(),this[_0x276d8c(0x127)]=_0x573e36,this['_injector']=_0x352f30,this[_0x276d8c(0x123)]=_0x402115;const {..._0x3b3db0}=_0x41f38a({},P,this['_config']);this['_configService'][_0x276d8c(0x153)](X,_0x3b3db0);}[_0x109a23(0xf3)](){[[S],[b],[I]]['forEach'](_0x4d33dc=>{const _0x25b49a=_0x3d3b;this[_0x25b49a(0x143)][_0x25b49a(0x125)](_0x4d33dc);});}[_0x109a23(0x13c)](){const _0xcee852=_0x109a23;this[_0xcee852(0x143)][_0xcee852(0x11d)](b),this[_0xcee852(0x143)][_0xcee852(0x11d)](I);}};j(C,_0x109a23(0x101),B),j(C,'type',_0x1e94ae[_0x109a23(0x112)]),C=de([_0x39d518(_0x635f56,_0x87e75c,_0x59ccf7),N(0x1,_0xb5eab3(_0x56655d)),N(0x2,_0x47017a)],C);export{C as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1c060a=_0x1a43;(function(_0x2b48b5,_0x224aa4){const _0x27e343=_0x1a43,_0x316f62=_0x2b48b5();while(!![]){try{const _0x2e8d4=-parseInt(_0x27e343(0x1c3))/0x1+-parseInt(_0x27e343(0x1a9))/0x2+-parseInt(_0x27e343(0x1c2))/0x3+-parseInt(_0x27e343(0x199))/0x4*(parseInt(_0x27e343(0x1a0))/0x5)+-parseInt(_0x27e343(0x1bc))/0x6*(parseInt(_0x27e343(0x1ba))/0x7)+-parseInt(_0x27e343(0x1a7))/0x8+parseInt(_0x27e343(0x19b))/0x9;if(_0x2e8d4===_0x224aa4)break;else _0x316f62['push'](_0x316f62['shift']());}catch(_0x2d3375){_0x316f62['push'](_0x316f62['shift']());}}}(_0x4b62,0xa4391));import{CommentService as _0x5b86b0,CollaborationSessionService as _0x320aac,UniverCollaborationClientPlugin as _0x303a7f}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4a4c8d}from'@univerjs-pro/license';import{dayjs as _0x3dba7e,UserManagerService as _0x1c5421,Inject as _0x58c13e,Injector as _0x521d83,Disposable as _0x550cf5,CustomRangeType as _0x4918f4,UniverInstanceType as _0x2756f3,DependentOn as _0x34a373,Plugin as _0x57c9b6,merge as _0x2f3f8c,IConfigService as _0x402eb0}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x425263}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x57f949,IThreadCommentDataSourceService as _0xa84ab7}from'@univerjs/thread-comment';import{bufferTime as _0x2b5592}from'rxjs';import{HTTPService as _0xef12b4}from'@univerjs/network';const B=_0x1c060a(0x192);var _=(_0x33a13f=>(_0x33a13f[_0x33a13f[_0x1c060a(0x1b3)]=0x0]=_0x1c060a(0x1b3),_0x33a13f[_0x33a13f[_0x1c060a(0x1ae)]=0x1]=_0x1c060a(0x1ae),_0x33a13f[_0x33a13f[_0x1c060a(0x1c6)]=-0x1]='UNRECOGNIZED',_0x33a13f))(_||{}),p=(_0x2bb77d=>(_0x2bb77d[_0x2bb77d[_0x1c060a(0x1c7)]=0x0]=_0x1c060a(0x1c7),_0x2bb77d[_0x2bb77d[_0x1c060a(0x1c0)]=0x1]=_0x1c060a(0x1c0),_0x2bb77d[_0x2bb77d[_0x1c060a(0x187)]=0x2]=_0x1c060a(0x187),_0x2bb77d[_0x2bb77d[_0x1c060a(0x1be)]=0x3]='Edit',_0x2bb77d[_0x2bb77d['Delete']=0x4]=_0x1c060a(0x1b6),_0x2bb77d[_0x2bb77d[_0x1c060a(0x183)]=0x5]=_0x1c060a(0x183),_0x2bb77d[_0x2bb77d[_0x1c060a(0x1c6)]=-0x1]=_0x1c060a(0x1c6),_0x2bb77d))(p||{});const O=_0x1b6810=>_0x3dba7e(new Date(+_0x1b6810))[_0x1c060a(0x1d9)]('YYYY/MM/DD\x20HH:mm'),K=async(_0x3ff5a5,_0x49eabb)=>{const _0x1c8597=_0x1c060a,_0x5ee8ed=_0x3ff5a5[_0x1c8597(0x186)](_0x1c5421),_0x34e30d=_0x3ff5a5[_0x1c8597(0x186)](_0xef12b4);_0x49eabb['forEach'](_0x68fc2e=>{const _0x438e5e=_0x1c8597;_0x5ee8ed[_0x438e5e(0x19c)](_0x68fc2e)&&_0x49eabb[_0x438e5e(0x18b)](_0x68fc2e);}),_0x49eabb[_0x1c8597(0x1d7)]&&(await _0x34e30d[_0x1c8597(0x186)](_0x1c8597(0x18d),{'params':{'userIDs':[..._0x49eabb]}}))['body'][_0x1c8597(0x194)]['forEach'](_0x45a2f8=>{const _0x124d8c=_0x1c8597;_0x45a2f8&&_0x5ee8ed[_0x124d8c(0x184)](_0x45a2f8);});};var V=Object[_0x1c060a(0x191)],z=Object['getOwnPropertyDescriptor'],Q=(_0x276cbb,_0x3cc784,_0x400094,_0x1af6bd)=>{for(var _0x27fbb2=_0x1af6bd>0x1?void 0x0:_0x1af6bd?z(_0x3cc784,_0x400094):_0x3cc784,_0x1800a5=_0x276cbb['length']-0x1,_0x3b8b97;_0x1800a5>=0x0;_0x1800a5--)(_0x3b8b97=_0x276cbb[_0x1800a5])&&(_0x27fbb2=(_0x1af6bd?_0x3b8b97(_0x3cc784,_0x400094,_0x27fbb2):_0x3b8b97(_0x27fbb2))||_0x27fbb2);return _0x1af6bd&&_0x27fbb2&&V(_0x3cc784,_0x400094,_0x27fbb2),_0x27fbb2;},v=(_0x9536fe,_0x5a7adf)=>(_0x5ad283,_0x1b1f2e)=>_0x5a7adf(_0x5ad283,_0x1b1f2e,_0x9536fe);let I=class extends _0x550cf5{constructor(_0x11fd56,_0x3b853f,_0x389d6f,_0x37dba6){const _0x3df3a=_0x1c060a;super(),this[_0x3df3a(0x1a4)]=_0x11fd56,this[_0x3df3a(0x18a)]=_0x3b853f,this['_userService']=_0x389d6f,this[_0x3df3a(0x196)]=_0x37dba6,this[_0x3df3a(0x171)](),this[_0x3df3a(0x1d5)]();}[_0x1c060a(0x1d5)](){const _0x1d17c1=_0x1c060a;this[_0x1d17c1(0x1bd)](this[_0x1d17c1(0x18a)]['commentUpdate$'][_0x1d17c1(0x19e)](_0x2b5592(0x10))[_0x1d17c1(0x181)](_0x52d0c2=>{const _0xdbd172=_0x1d17c1,_0x188fb3=new Set();_0x52d0c2[_0xdbd172(0x182)](_0x2ab259=>{const _0x2b47b=_0xdbd172;switch(_0x2ab259[_0x2b47b(0x180)]){case'add':{const _0x33e092=_0x2ab259[_0x2b47b(0x173)][_0x2b47b(0x19f)];_0x188fb3[_0x2b47b(0x1c5)](_0x33e092);break;}}}),K(this['_injector'],_0x188fb3);}));}[_0x1c060a(0x171)](){const _0x55329b=_0x1c060a;this['disposeWithMe'](this[_0x55329b(0x1a4)]['commentUpdate$'][_0x55329b(0x181)](async _0x2049a9=>{const _0x516ac6=_0x55329b;var _0x35b5b4,_0x38e2f0,_0x4f1106,_0x5ae9d5;const _0xeef639=(_0x35b5b4=this[_0x516ac6(0x18a)]['getUnit'](_0x2049a9[_0x516ac6(0x1bf)])[_0x516ac6(0x1ab)](_0x273749=>_0x273749['threadId']===_0x2049a9[_0x516ac6(0x1cf)]))==null?void 0x0:_0x35b5b4[_0x516ac6(0x1d8)];if(!_0xeef639)return;const {unitId:_0x1419cc,subUnitId:_0x521525}=_0xeef639;switch(_0x2049a9[_0x516ac6(0x1af)]&&this[_0x516ac6(0x190)][_0x516ac6(0x184)](_0x2049a9[_0x516ac6(0x1af)]),_0x2049a9[_0x516ac6(0x180)]){case p[_0x516ac6(0x1c0)]:break;case p[_0x516ac6(0x187)]:{this[_0x516ac6(0x18a)]['addComment'](_0x1419cc,_0x521525,{'unitId':_0x1419cc,'subUnitId':_0x521525,'ref':'','id':_0x2049a9['replyId'],'dT':O(+_0x2049a9[_0x516ac6(0x1d0)]),'threadId':_0x2049a9[_0x516ac6(0x1cf)],'personId':(_0x4f1106=(_0x38e2f0=_0x2049a9[_0x516ac6(0x1af)])==null?void 0x0:_0x38e2f0[_0x516ac6(0x17a)])!=null?_0x4f1106:_0x2049a9['userId'],'text':JSON[_0x516ac6(0x1d1)](_0x2049a9['content']),'parentId':_0xeef639['id']});break;}case p[_0x516ac6(0x1b6)]:{const _0x31876a=this['_threadCommentModel'][_0x516ac6(0x1cd)](_0x1419cc,_0x521525,_0x2049a9['replyId']);_0x31876a&&_0x31876a['parentId']&&this[_0x516ac6(0x18a)][_0x516ac6(0x1a3)](_0x1419cc,_0x521525,_0x2049a9[_0x516ac6(0x1c8)]);break;}case p[_0x516ac6(0x1be)]:{this[_0x516ac6(0x18a)]['updateComment'](_0x1419cc,_0x521525,{'commentId':_0x2049a9[_0x516ac6(0x1c8)],'text':JSON[_0x516ac6(0x1d1)](_0x2049a9['content'])});break;}case p[_0x516ac6(0x183)]:{const _0x3014f8=(_0x5ae9d5=this['_threadCommentModel'][_0x516ac6(0x1a1)](_0x2049a9['unitId'])['find'](_0x2b9fbe=>_0x2b9fbe[_0x516ac6(0x1cf)]===_0x2049a9['threadId']))==null?void 0x0:_0x5ae9d5[_0x516ac6(0x1d8)];_0x3014f8&&this[_0x516ac6(0x18a)][_0x516ac6(0x17d)](_0x1419cc,_0x521525,_0x3014f8['id'],_0x2049a9['solved']===_[_0x516ac6(0x1ae)]);break;}}}));}};I=Q([v(0x0,_0x58c13e(_0x5b86b0)),v(0x1,_0x58c13e(_0x57f949)),v(0x2,_0x58c13e(_0x1c5421)),v(0x3,_0x58c13e(_0x521d83))],I);const X='thread-comment-data-source.config',P={};var k=Object[_0x1c060a(0x191)],ee=Object['getOwnPropertyDescriptor'],re=(_0xc56df9,_0x38aa04,_0x2dbb08,_0x260fd8)=>{const _0x5a8dd7=_0x1c060a;for(var _0x1d8bd9=_0x260fd8>0x1?void 0x0:_0x260fd8?ee(_0x38aa04,_0x2dbb08):_0x38aa04,_0x42f2e4=_0xc56df9[_0x5a8dd7(0x1a8)]-0x1,_0x33f21e;_0x42f2e4>=0x0;_0x42f2e4--)(_0x33f21e=_0xc56df9[_0x42f2e4])&&(_0x1d8bd9=(_0x260fd8?_0x33f21e(_0x38aa04,_0x2dbb08,_0x1d8bd9):_0x33f21e(_0x1d8bd9))||_0x1d8bd9);return _0x260fd8&&_0x1d8bd9&&k(_0x38aa04,_0x2dbb08,_0x1d8bd9),_0x1d8bd9;},f=(_0x455a21,_0x5e8c6d)=>(_0x43c7aa,_0x18e9cd)=>_0x5e8c6d(_0x43c7aa,_0x18e9cd,_0x455a21);function te(_0x5cb071,_0x797928){const _0x4d81ec=_0x1c060a,_0x45ab1b=_0x5cb071[_0x4d81ec(0x197)][0x0];return{..._0x797928,'id':_0x45ab1b[_0x4d81ec(0x1c8)],'resolved':_0x5cb071[_0x4d81ec(0x1cc)]===0x1,'dT':O(_0x45ab1b['createTimestamp']),'personId':_0x45ab1b[_0x4d81ec(0x17e)],'threadId':_0x45ab1b[_0x4d81ec(0x1cf)]};}function _0x1a43(_0x19f53d,_0x3aea8f){const _0x4b6284=_0x4b62();return _0x1a43=function(_0x1a43b2,_0x54f52b){_0x1a43b2=_0x1a43b2-0x171;let _0x466b39=_0x4b6284[_0x1a43b2];return _0x466b39;},_0x1a43(_0x19f53d,_0x3aea8f);}function se(_0x14048e,_0x3bab63,_0x4fd43a){const _0x27a21c=_0x1c060a;var _0x14ec59,_0x1ce173;if(((_0x1ce173=(_0x14ec59=_0x14048e==null?void 0x0:_0x14048e[_0x27a21c(0x197)])==null?void 0x0:_0x14ec59['length'])!=null?_0x1ce173:0x0)>0x0){const _0x2d34a9=(_0x26f235,_0x3eba9a)=>({'id':_0x26f235['replyId'],'threadId':_0x26f235[_0x27a21c(0x1cf)],'dT':O(_0x26f235[_0x27a21c(0x1d0)]),'personId':_0x26f235[_0x27a21c(0x17e)],'resolved':_0x14048e[_0x27a21c(0x1cc)]===_['Solved'],'unitId':_0x3bab63,'subUnitId':_0x4fd43a,'text':JSON[_0x27a21c(0x1d1)](_0x26f235[_0x27a21c(0x1d3)]),'parentId':_0x3eba9a}),_0x214923=_0x2d34a9(_0x14048e[_0x27a21c(0x197)][0x0]);return{..._0x214923,'children':_0x14048e[_0x27a21c(0x197)]['slice'](0x1)[_0x27a21c(0x174)](_0x55a40d=>_0x2d34a9(_0x55a40d,_0x214923['id']))};}return null;}let S=class{constructor(_0x48afd9,_0x117cb1,_0x6b836f,_0x4c197b){const _0x23b7b6=_0x1c060a;this[_0x23b7b6(0x1b8)]=_0x48afd9,this['_userService']=_0x117cb1,this['_sessionService']=_0x6b836f,this[_0x23b7b6(0x196)]=_0x4c197b;}async['addComment'](_0x7eb979){const _0x1272a3=_0x1c060a;var _0x22574e,_0xb0e62f;const {parentId:_0x5449b7,unitId:_0x24691e,text:_0x5e379f,threadId:_0x44764b}=_0x7eb979,_0x554531=(_0xb0e62f=(_0x22574e=_0x5e379f['customRanges'])==null?void 0x0:_0x22574e[_0x1272a3(0x1c9)](_0x516388=>_0x516388[_0x1272a3(0x185)]===_0x4918f4[_0x1272a3(0x1b9)])[_0x1272a3(0x174)](_0x612cac=>_0x612cac[_0x1272a3(0x1a2)]))!=null?_0xb0e62f:[],_0x58a258=JSON[_0x1272a3(0x1b2)](_0x5e379f),_0x24f085=(await this[_0x1272a3(0x1bb)]['requireSession'](_0x24691e))[_0x1272a3(0x188)]();if(_0x5449b7){const _0x1d5299={'memberId':_0x24f085,'unitId':_0x24691e,'content':_0x58a258,'mention':_0x554531,'threadId':_0x44764b},_0x13f009=(await this[_0x1272a3(0x1b8)][_0x1272a3(0x195)](_0x1272a3(0x17c)+_0x24691e+_0x1272a3(0x189),{'body':_0x1d5299}))[_0x1272a3(0x177)][_0x1272a3(0x179)];return{..._0x7eb979,'id':_0x13f009[_0x1272a3(0x1c8)],'dT':_0x3dba7e(+_0x13f009[_0x1272a3(0x1d0)])[_0x1272a3(0x1d9)](_0x1272a3(0x198)),'personId':_0x13f009[_0x1272a3(0x17e)]};}else{const _0x45cc77={'memberId':_0x24f085,'unitId':_0x24691e,'content':_0x58a258,'mention':_0x554531},_0x2b0714=await this[_0x1272a3(0x1b8)][_0x1272a3(0x195)](_0x1272a3(0x17c)+_0x24691e+_0x1272a3(0x1b4),{'body':_0x45cc77});return te(_0x2b0714['body'][_0x1272a3(0x172)],_0x7eb979);}}async[_0x1c060a(0x1c4)](_0x30d06a){const _0x1a3854=_0x1c060a;var _0x20581d,_0x479566;const {text:_0x55d760,unitId:_0x41ec3a}=_0x30d06a,_0x19c02b=(_0x479566=(_0x20581d=_0x55d760[_0x1a3854(0x18c)])==null?void 0x0:_0x20581d[_0x1a3854(0x1c9)](_0x1e90f5=>_0x1e90f5[_0x1a3854(0x185)]===_0x4918f4['COMMENT'])[_0x1a3854(0x174)](_0x3ba7a2=>_0x3ba7a2[_0x1a3854(0x1a2)]))!=null?_0x479566:[],_0xe552ce=JSON[_0x1a3854(0x1b2)](_0x55d760),_0x55737f=_0x30d06a[_0x1a3854(0x1cf)],_0x548609=_0x30d06a['id'],_0x197026={'memberId':(await this[_0x1a3854(0x1bb)][_0x1a3854(0x1d6)](_0x41ec3a))[_0x1a3854(0x188)](),'unitId':_0x41ec3a,'threadId':_0x55737f,'mention':_0x19c02b,'content':_0xe552ce,'replyId':_0x548609},_0x5eaf46=await this[_0x1a3854(0x1b8)][_0x1a3854(0x195)](_0x1a3854(0x17c)+_0x41ec3a+_0x1a3854(0x1d4),{'body':_0x197026});return!_0x5eaf46['body'][_0x1a3854(0x178)]||_0x5eaf46[_0x1a3854(0x177)][_0x1a3854(0x178)][_0x1a3854(0x1aa)]===0x1;}async[_0x1c060a(0x17d)](_0x239901){const _0x52e772=_0x1c060a,{unitId:_0x596335}=_0x239901,_0x218581=_0x239901['threadId'],_0x5d679f={'memberId':this[_0x52e772(0x190)][_0x52e772(0x1ad)]()['userID'],'unitId':_0x596335,'threadId':_0x218581,'solved':_0x239901[_0x52e772(0x1ce)]?_['Solved']:_[_0x52e772(0x1b3)]},_0x2dc2eb=await this[_0x52e772(0x1b8)][_0x52e772(0x195)](_0x52e772(0x17c)+_0x596335+_0x52e772(0x1a5),{'body':_0x5d679f});return!_0x2dc2eb['body'][_0x52e772(0x178)]||_0x2dc2eb['body']['error'][_0x52e772(0x1aa)]===0x1;}async['deleteComment'](_0x33a660,_0xc89e31,_0x317870,_0x4a7d52){const _0x110eae=_0x1c060a,_0x50242f={'memberId':(await this[_0x110eae(0x1bb)][_0x110eae(0x1d6)](_0x33a660))[_0x110eae(0x188)](),'threadId':_0x317870,'replyId':_0x4a7d52,'unitId':_0x33a660},_0x522a21=await this[_0x110eae(0x1b8)][_0x110eae(0x195)](_0x110eae(0x17c)+_0x33a660+'/delete',{'body':_0x50242f});return!_0x522a21[_0x110eae(0x177)]['error']||_0x522a21[_0x110eae(0x177)]['error']['code']===0x1;}async[_0x1c060a(0x176)](_0x1a8281,_0x5d8ac2,_0x2c7488){const _0x43b39f=_0x1c060a,_0x5414ac={'unitId':_0x1a8281,'threadId':_0x2c7488},_0x476a2e=await this[_0x43b39f(0x1b8)]['post']('/universer-api/comment/unit/'+_0x1a8281+_0x43b39f(0x193),{'body':_0x5414ac}),_0x2f8c63=_0x2c7488[_0x43b39f(0x174)](_0x34c18f=>se(_0x476a2e[_0x43b39f(0x177)][_0x43b39f(0x19d)][_0x34c18f],_0x1a8281,_0x5d8ac2))[_0x43b39f(0x1c9)](Boolean);return Object[_0x43b39f(0x17f)](_0x476a2e[_0x43b39f(0x177)][_0x43b39f(0x194)])[_0x43b39f(0x182)](_0x5be379=>{const _0x1101a8=_0x43b39f;this['_userService'][_0x1101a8(0x184)](_0x5be379);}),_0x2f8c63;}[_0x1c060a(0x1b7)](_0x244f8d){const _0x12de9a=_0x1c060a;return{'id':_0x244f8d['id'],'threadId':_0x244f8d[_0x12de9a(0x1cf)],'ref':_0x244f8d[_0x12de9a(0x1ca)]};}};function _0x4b62(){const _0x574bf0=['959912QllHbx','code','find','_threadCommentDataSource','getCurrentUser','Solved','user','onStarting','UNIVER_UNKNOWN','stringify','OpenOrReOpen','/add','dataSource','Delete','saveCommentToSnapshot','_httpService','COMMENT','5558yGvuBQ','_sessionService','7578xqCIvL','disposeWithMe','Edit','unitId','Add','_configService','1509345pYxdBK','329520lrvifU','updateComment','add','UNRECOGNIZED','Unknown','replyId','filter','ref','setConfig','solved','getComment','resolved','threadId','createTimestamp','parse','syncUpdateMutationToColla','content','/edit','_initUserSync','requireSession','size','root','format','_init','comment','payload','map','_threadCommentDataSourceService','listComments','body','error','reply','userID','onReady','/universer-api/comment/unit/','resolveComment','userId','values','type','subscribe','forEach','Solve','addUser','rangeType','get','Reply','getMemberID','/reply','_threadCommentModel','delete','customRanges','/universer-api/user/list','symbol','_config','_userService','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/list','users','post','_injector','replies','YYYY/MM/DD\x20HH:mm','158120xJcXXA','_initDataSource','47008017wNzNAC','getUser','comments','pipe','personId','170fJrqDs','getUnit','rangeId','deleteComment','_commentService','/solved','getOwnPropertyDescriptor','7128184dCwHhk','length'];_0x4b62=function(){return _0x574bf0;};return _0x4b62();}S=re([f(0x0,_0x58c13e(_0xef12b4)),f(0x1,_0x58c13e(_0x1c5421)),f(0x2,_0x58c13e(_0x320aac)),f(0x3,_0x58c13e(_0x521d83))],S);var oe=Object[_0x1c060a(0x191)],ne=Object[_0x1c060a(0x1a6)],ie=(_0x193a61,_0x3ec318,_0xa55682,_0x2f81e7)=>{const _0x5a1ec4=_0x1c060a;for(var _0x35fc16=_0x2f81e7>0x1?void 0x0:_0x2f81e7?ne(_0x3ec318,_0xa55682):_0x3ec318,_0x2e600b=_0x193a61[_0x5a1ec4(0x1a8)]-0x1,_0x18f269;_0x2e600b>=0x0;_0x2e600b--)(_0x18f269=_0x193a61[_0x2e600b])&&(_0x35fc16=(_0x2f81e7?_0x18f269(_0x3ec318,_0xa55682,_0x35fc16):_0x18f269(_0x35fc16))||_0x35fc16);return _0x2f81e7&&_0x35fc16&&oe(_0x3ec318,_0xa55682,_0x35fc16),_0x35fc16;},M=(_0x495496,_0x16953f)=>(_0x321fe1,_0xca420a)=>_0x16953f(_0x321fe1,_0xca420a,_0x495496);let b=class extends _0x550cf5{constructor(_0x122790,_0x54f3da){const _0x21a08d=_0x1c060a;super(),this['_threadCommentDataSourceService']=_0x122790,this[_0x21a08d(0x1ac)]=_0x54f3da,this[_0x21a08d(0x19a)]();}[_0x1c060a(0x19a)](){const _0x4868e5=_0x1c060a;this[_0x4868e5(0x175)][_0x4868e5(0x1b5)]=this[_0x4868e5(0x1ac)],this[_0x4868e5(0x175)][_0x4868e5(0x1d2)]=!0x1;}};b=ie([M(0x0,_0xa84ab7),M(0x1,_0x58c13e(S))],b);var $=Object[_0x1c060a(0x191)],ce=Object[_0x1c060a(0x1a6)],ae=(_0x10f327,_0x1fe6d0,_0x3807af)=>_0x1fe6d0 in _0x10f327?$(_0x10f327,_0x1fe6d0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3807af}):_0x10f327[_0x1fe6d0]=_0x3807af,de=(_0x25ee14,_0x4b5cc3,_0x39af96,_0x3f578d)=>{const _0x2f98c3=_0x1c060a;for(var _0x208d04=_0x3f578d>0x1?void 0x0:_0x3f578d?ce(_0x4b5cc3,_0x39af96):_0x4b5cc3,_0xe490e2=_0x25ee14[_0x2f98c3(0x1a8)]-0x1,_0x85d073;_0xe490e2>=0x0;_0xe490e2--)(_0x85d073=_0x25ee14[_0xe490e2])&&(_0x208d04=(_0x3f578d?_0x85d073(_0x4b5cc3,_0x39af96,_0x208d04):_0x85d073(_0x208d04))||_0x208d04);return _0x3f578d&&_0x208d04&&$(_0x4b5cc3,_0x39af96,_0x208d04),_0x208d04;},N=(_0x4d0415,_0x3b1083)=>(_0x984b19,_0x33b9e7)=>_0x3b1083(_0x984b19,_0x33b9e7,_0x4d0415),j=(_0x179a5b,_0x2c9ef2,_0x326e2d)=>ae(_0x179a5b,typeof _0x2c9ef2!=_0x1c060a(0x18e)?_0x2c9ef2+'':_0x2c9ef2,_0x326e2d);let C=class extends _0x57c9b6{constructor(_0x19a67d=P,_0x136e17,_0x30c3a4){const _0x20ee4b=_0x1c060a;super(),this[_0x20ee4b(0x18f)]=_0x19a67d,this[_0x20ee4b(0x196)]=_0x136e17,this[_0x20ee4b(0x1c1)]=_0x30c3a4;const {..._0x559f5a}=_0x2f3f8c({},P,this[_0x20ee4b(0x18f)]);this[_0x20ee4b(0x1c1)][_0x20ee4b(0x1cb)](X,_0x559f5a);}[_0x1c060a(0x1b0)](){const _0x5e4d77=_0x1c060a;[[S],[b],[I]][_0x5e4d77(0x182)](_0x4c9934=>{this['_injector']['add'](_0x4c9934);});}[_0x1c060a(0x17b)](){const _0x2d7122=_0x1c060a;this[_0x2d7122(0x196)][_0x2d7122(0x186)](b),this[_0x2d7122(0x196)][_0x2d7122(0x186)](I);}};j(C,'pluginName',B),j(C,_0x1c060a(0x180),_0x2756f3[_0x1c060a(0x1b1)]),C=de([_0x34a373(_0x425263,_0x303a7f,_0x4a4c8d),N(0x1,_0x58c13e(_0x521d83)),N(0x2,_0x402eb0)],C);export{C as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x2d182d,_0x1a8820){const _0x5eaf69=_0xe90e,_0x489597=_0x2d182d();while(!![]){try{const _0x3a9b82=parseInt(_0x5eaf69(0x23d))/0x1*(parseInt(_0x5eaf69(0x247))/0x2)+-parseInt(_0x5eaf69(0x1f8))/0x3*(parseInt(_0x5eaf69(0x1e6))/0x4)+-parseInt(_0x5eaf69(0x233))/0x5*(-parseInt(_0x5eaf69(0x1f9))/0x6)+parseInt(_0x5eaf69(0x1fe))/0x7+parseInt(_0x5eaf69(0x1e1))/0x8+-parseInt(_0x5eaf69(0x25d))/0x9+-parseInt(_0x5eaf69(0x1f7))/0xa*(parseInt(_0x5eaf69(0x24d))/0xb);if(_0x3a9b82===_0x1a8820)break;else _0x489597['push'](_0x489597['shift']());}catch(_0x42a9e9){_0x489597['push'](_0x489597['shift']());}}}(_0x598c,0x305cc),function(_0x19a864,_0x58fcbe){const _0x34a44b=_0xe90e;typeof exports==_0x34a44b(0x223)&&typeof module<'u'?_0x58fcbe(exports,require(_0x34a44b(0x1f2)),require('@univerjs-pro/license'),require(_0x34a44b(0x23b)),require(_0x34a44b(0x23c)),require(_0x34a44b(0x253)),require('rxjs'),require(_0x34a44b(0x1fa))):typeof define==_0x34a44b(0x1e9)&&define['amd']?define([_0x34a44b(0x256),'@univerjs-pro/collaboration-client',_0x34a44b(0x263),_0x34a44b(0x23b),_0x34a44b(0x23c),'@univerjs/thread-comment',_0x34a44b(0x203),'@univerjs/network'],_0x58fcbe):(_0x19a864=typeof globalThis<'u'?globalThis:_0x19a864||self,_0x58fcbe(_0x19a864['UniverProThreadCommentDatasource']={},_0x19a864[_0x34a44b(0x236)],_0x19a864['UniverProLicense'],_0x19a864[_0x34a44b(0x1e3)],_0x19a864[_0x34a44b(0x1f1)],_0x19a864['UniverThreadComment'],_0x19a864[_0x34a44b(0x203)],_0x19a864[_0x34a44b(0x248)]));}(this,function(_0xe321bc,_0x1b71b5,_0x43b226,_0xedcf29,_0x576a60,_0x35a9c5,_0x58a3e1,_0x2d0535){'use strict';const _0x130830=_0xe90e;const _0x36942a=_0x130830(0x257);var _0xd086b3=(_0x572c55=>(_0x572c55[_0x572c55[_0x130830(0x212)]=0x0]=_0x130830(0x212),_0x572c55[_0x572c55[_0x130830(0x1f0)]=0x1]=_0x130830(0x1f0),_0x572c55[_0x572c55[_0x130830(0x244)]=-0x1]=_0x130830(0x244),_0x572c55))(_0xd086b3||{}),_0x305301=(_0x540a60=>(_0x540a60[_0x540a60[_0x130830(0x260)]=0x0]=_0x130830(0x260),_0x540a60[_0x540a60[_0x130830(0x235)]=0x1]=_0x130830(0x235),_0x540a60[_0x540a60[_0x130830(0x22a)]=0x2]=_0x130830(0x22a),_0x540a60[_0x540a60[_0x130830(0x21e)]=0x3]=_0x130830(0x21e),_0x540a60[_0x540a60[_0x130830(0x214)]=0x4]='Delete',_0x540a60[_0x540a60['Solve']=0x5]='Solve',_0x540a60[_0x540a60[_0x130830(0x244)]=-0x1]=_0x130830(0x244),_0x540a60))(_0x305301||{});const _0x402ef8=_0x58f492=>_0xedcf29['dayjs'](new Date(+_0x58f492))[_0x130830(0x255)]('YYYY/MM/DD\x20HH:mm'),_0x35fc5f=async(_0x119e45,_0xf43d91)=>{const _0x374cc5=_0x130830,_0x437b55=_0x119e45[_0x374cc5(0x1ec)](_0xedcf29[_0x374cc5(0x1f3)]),_0x5c9ca2=_0x119e45[_0x374cc5(0x1ec)](_0x2d0535[_0x374cc5(0x228)]);_0xf43d91[_0x374cc5(0x258)](_0x5f0a40=>{const _0x42b395=_0x374cc5;_0x437b55['getUser'](_0x5f0a40)&&_0xf43d91[_0x42b395(0x202)](_0x5f0a40);}),_0xf43d91[_0x374cc5(0x229)]&&(await _0x5c9ca2['get'](_0x374cc5(0x1fd),{'params':{'userIDs':[..._0xf43d91]}}))[_0x374cc5(0x22b)]['users']['forEach'](_0x49c79b=>{const _0xbf8807=_0x374cc5;_0x49c79b&&_0x437b55[_0xbf8807(0x249)](_0x49c79b);});};var _0x401640=Object[_0x130830(0x1fb)],_0x1b02bc=Object['getOwnPropertyDescriptor'],_0xd349f=(_0x1869ac,_0x5c9216,_0x2b5926,_0x54a4a4)=>{for(var _0x455082=_0x54a4a4>0x1?void 0x0:_0x54a4a4?_0x1b02bc(_0x5c9216,_0x2b5926):_0x5c9216,_0x301a64=_0x1869ac['length']-0x1,_0x5d808c;_0x301a64>=0x0;_0x301a64--)(_0x5d808c=_0x1869ac[_0x301a64])&&(_0x455082=(_0x54a4a4?_0x5d808c(_0x5c9216,_0x2b5926,_0x455082):_0x5d808c(_0x455082))||_0x455082);return _0x54a4a4&&_0x455082&&_0x401640(_0x5c9216,_0x2b5926,_0x455082),_0x455082;},_0x3b0533=(_0x288196,_0x46f65c)=>(_0x3b2fab,_0x18e2d6)=>_0x46f65c(_0x3b2fab,_0x18e2d6,_0x288196);let _0x37514d=class extends _0xedcf29[_0x130830(0x220)]{constructor(_0x232f73,_0x1229d,_0x382c98,_0x330737){const _0x2595f9=_0x130830;super(),this[_0x2595f9(0x24c)]=_0x232f73,this[_0x2595f9(0x207)]=_0x1229d,this['_userService']=_0x382c98,this[_0x2595f9(0x213)]=_0x330737,this[_0x2595f9(0x238)](),this['_initUserSync']();}['_initUserSync'](){const _0x41abab=_0x130830;this['disposeWithMe'](this[_0x41abab(0x207)][_0x41abab(0x232)]['pipe'](_0x58a3e1[_0x41abab(0x20c)](0x10))[_0x41abab(0x224)](_0x4ca2f2=>{const _0x3e887c=_0x41abab,_0x44f6a7=new Set();_0x4ca2f2[_0x3e887c(0x258)](_0x4e9b3b=>{const _0x1e5caf=_0x3e887c;switch(_0x4e9b3b['type']){case _0x1e5caf(0x1f5):{const _0x963c40=_0x4e9b3b[_0x1e5caf(0x25e)][_0x1e5caf(0x230)];_0x44f6a7[_0x1e5caf(0x1f5)](_0x963c40);break;}}}),_0x35fc5f(this[_0x3e887c(0x213)],_0x44f6a7);}));}['_init'](){const _0x69ede5=_0x130830;this[_0x69ede5(0x24b)](this[_0x69ede5(0x24c)][_0x69ede5(0x232)][_0x69ede5(0x224)](async _0x322ba7=>{const _0x20b9de=_0x69ede5;var _0x19f7c4,_0x2044fe,_0x56665a,_0x3c64d4;const _0x16d104=(_0x19f7c4=this[_0x20b9de(0x207)][_0x20b9de(0x251)](_0x322ba7[_0x20b9de(0x24e)])[_0x20b9de(0x217)](_0x1f2e8d=>_0x1f2e8d[_0x20b9de(0x21d)]===_0x322ba7[_0x20b9de(0x21d)]))==null?void 0x0:_0x19f7c4[_0x20b9de(0x218)];if(!_0x16d104)return;const {unitId:_0x52a4e0,subUnitId:_0x29df74}=_0x16d104;switch(_0x322ba7[_0x20b9de(0x1e7)]&&this[_0x20b9de(0x1f6)][_0x20b9de(0x249)](_0x322ba7[_0x20b9de(0x1e7)]),_0x322ba7[_0x20b9de(0x1e2)]){case _0x305301[_0x20b9de(0x235)]:break;case _0x305301[_0x20b9de(0x22a)]:{this[_0x20b9de(0x207)][_0x20b9de(0x1ff)](_0x52a4e0,_0x29df74,{'unitId':_0x52a4e0,'subUnitId':_0x29df74,'ref':'','id':_0x322ba7[_0x20b9de(0x243)],'dT':_0x402ef8(+_0x322ba7[_0x20b9de(0x216)]),'threadId':_0x322ba7['threadId'],'personId':(_0x56665a=(_0x2044fe=_0x322ba7[_0x20b9de(0x1e7)])==null?void 0x0:_0x2044fe[_0x20b9de(0x226)])!=null?_0x56665a:_0x322ba7[_0x20b9de(0x24a)],'text':JSON[_0x20b9de(0x25f)](_0x322ba7[_0x20b9de(0x23e)]),'parentId':_0x16d104['id']});break;}case _0x305301[_0x20b9de(0x214)]:{const _0x350ef7=this[_0x20b9de(0x207)][_0x20b9de(0x245)](_0x52a4e0,_0x29df74,_0x322ba7[_0x20b9de(0x243)]);_0x350ef7&&_0x350ef7['parentId']&&this[_0x20b9de(0x207)]['deleteComment'](_0x52a4e0,_0x29df74,_0x322ba7[_0x20b9de(0x243)]);break;}case _0x305301['Edit']:{this['_threadCommentModel'][_0x20b9de(0x231)](_0x52a4e0,_0x29df74,{'commentId':_0x322ba7[_0x20b9de(0x243)],'text':JSON[_0x20b9de(0x25f)](_0x322ba7['content'])});break;}case _0x305301[_0x20b9de(0x21c)]:{const _0x144db5=(_0x3c64d4=this[_0x20b9de(0x207)][_0x20b9de(0x251)](_0x322ba7[_0x20b9de(0x24e)])[_0x20b9de(0x217)](_0x4ea9fe=>_0x4ea9fe[_0x20b9de(0x21d)]===_0x322ba7[_0x20b9de(0x21d)]))==null?void 0x0:_0x3c64d4['root'];_0x144db5&&this['_threadCommentModel']['resolveComment'](_0x52a4e0,_0x29df74,_0x144db5['id'],_0x322ba7['solved']===_0xd086b3[_0x20b9de(0x1f0)]);break;}}}));}};_0x37514d=_0xd349f([_0x3b0533(0x0,_0xedcf29[_0x130830(0x206)](_0x1b71b5[_0x130830(0x1ed)])),_0x3b0533(0x1,_0xedcf29[_0x130830(0x206)](_0x35a9c5[_0x130830(0x1ef)])),_0x3b0533(0x2,_0xedcf29[_0x130830(0x206)](_0xedcf29['UserManagerService'])),_0x3b0533(0x3,_0xedcf29[_0x130830(0x206)](_0xedcf29[_0x130830(0x20f)]))],_0x37514d);const _0x59b8cd=_0x130830(0x1ee),_0x209c80={};var _0x357a64=Object['defineProperty'],_0x117620=Object[_0x130830(0x211)],_0x40a10a=(_0x16deb2,_0x378def,_0x4dbc1d,_0x4ec62a)=>{const _0x104dc6=_0x130830;for(var _0x45423a=_0x4ec62a>0x1?void 0x0:_0x4ec62a?_0x117620(_0x378def,_0x4dbc1d):_0x378def,_0x1c4e79=_0x16deb2[_0x104dc6(0x1e5)]-0x1,_0x4ac89d;_0x1c4e79>=0x0;_0x1c4e79--)(_0x4ac89d=_0x16deb2[_0x1c4e79])&&(_0x45423a=(_0x4ec62a?_0x4ac89d(_0x378def,_0x4dbc1d,_0x45423a):_0x4ac89d(_0x45423a))||_0x45423a);return _0x4ec62a&&_0x45423a&&_0x357a64(_0x378def,_0x4dbc1d,_0x45423a),_0x45423a;},_0x1c7136=(_0x458394,_0x2d646c)=>(_0x5e5718,_0x58fa95)=>_0x2d646c(_0x5e5718,_0x58fa95,_0x458394);function _0x3ddf18(_0x1f35d0,_0x936e98){const _0x141dc7=_0x130830,_0x420f80=_0x1f35d0[_0x141dc7(0x1e8)][0x0];return{..._0x936e98,'id':_0x420f80['replyId'],'resolved':_0x1f35d0[_0x141dc7(0x242)]===0x1,'dT':_0x402ef8(_0x420f80[_0x141dc7(0x216)]),'personId':_0x420f80[_0x141dc7(0x24a)],'threadId':_0x420f80['threadId']};}function _0x32ca3f(_0x245107,_0x44757b,_0x21e6e7){const _0xfb4e10=_0x130830;var _0x249ac2,_0xcd21c8;if(((_0xcd21c8=(_0x249ac2=_0x245107==null?void 0x0:_0x245107[_0xfb4e10(0x1e8)])==null?void 0x0:_0x249ac2[_0xfb4e10(0x1e5)])!=null?_0xcd21c8:0x0)>0x0){const _0x1842b9=(_0x198c03,_0x3bb1d9)=>({'id':_0x198c03['replyId'],'threadId':_0x198c03['threadId'],'dT':_0x402ef8(_0x198c03[_0xfb4e10(0x216)]),'personId':_0x198c03[_0xfb4e10(0x24a)],'resolved':_0x245107['solved']===_0xd086b3[_0xfb4e10(0x1f0)],'unitId':_0x44757b,'subUnitId':_0x21e6e7,'text':JSON[_0xfb4e10(0x25f)](_0x198c03[_0xfb4e10(0x23e)]),'parentId':_0x3bb1d9}),_0x3c0df9=_0x1842b9(_0x245107[_0xfb4e10(0x1e8)][0x0]);return{..._0x3c0df9,'children':_0x245107['replies'][_0xfb4e10(0x222)](0x1)[_0xfb4e10(0x22e)](_0x219d6c=>_0x1842b9(_0x219d6c,_0x3c0df9['id']))};}return null;}let _0x4f0eb0=class{constructor(_0x11c4c2,_0x1e8081,_0x170101,_0x1f573f){const _0x4b5819=_0x130830;this[_0x4b5819(0x25a)]=_0x11c4c2,this[_0x4b5819(0x1f6)]=_0x1e8081,this[_0x4b5819(0x21b)]=_0x170101,this[_0x4b5819(0x213)]=_0x1f573f;}async[_0x130830(0x1ff)](_0x50db66){const _0x1ef7a6=_0x130830;var _0x2c4f3f,_0x1f2aa7;const {parentId:_0x299940,unitId:_0x2da6d0,text:_0x5e3821,threadId:_0x28d8b5}=_0x50db66,_0x1d3bb6=(_0x1f2aa7=(_0x2c4f3f=_0x5e3821['customRanges'])==null?void 0x0:_0x2c4f3f[_0x1ef7a6(0x25b)](_0x105b61=>_0x105b61[_0x1ef7a6(0x266)]===_0xedcf29['CustomRangeType'][_0x1ef7a6(0x262)])[_0x1ef7a6(0x22e)](_0x4ca229=>_0x4ca229['rangeId']))!=null?_0x1f2aa7:[],_0x3e4c6c=JSON[_0x1ef7a6(0x1ea)](_0x5e3821),_0x532385=(await this[_0x1ef7a6(0x21b)][_0x1ef7a6(0x201)](_0x2da6d0))['getMemberID']();if(_0x299940){const _0xd98674={'memberId':_0x532385,'unitId':_0x2da6d0,'content':_0x3e4c6c,'mention':_0x1d3bb6,'threadId':_0x28d8b5},_0xae0400=(await this[_0x1ef7a6(0x25a)]['post']('/universer-api/comment/unit/'+_0x2da6d0+'/reply',{'body':_0xd98674}))['body']['reply'];return{..._0x50db66,'id':_0xae0400[_0x1ef7a6(0x243)],'dT':_0xedcf29['dayjs'](+_0xae0400[_0x1ef7a6(0x216)])['format'](_0x1ef7a6(0x208)),'personId':_0xae0400[_0x1ef7a6(0x24a)]};}else{const _0x317cde={'memberId':_0x532385,'unitId':_0x2da6d0,'content':_0x3e4c6c,'mention':_0x1d3bb6},_0x389ace=await this[_0x1ef7a6(0x25a)][_0x1ef7a6(0x261)](_0x1ef7a6(0x234)+_0x2da6d0+_0x1ef7a6(0x20b),{'body':_0x317cde});return _0x3ddf18(_0x389ace['body'][_0x1ef7a6(0x21a)],_0x50db66);}}async[_0x130830(0x231)](_0x38d54f){const _0x2d9530=_0x130830;var _0x150e9c,_0x546073;const {text:_0x3df344,unitId:_0x4ebe7f}=_0x38d54f,_0x30f345=(_0x546073=(_0x150e9c=_0x3df344[_0x2d9530(0x22c)])==null?void 0x0:_0x150e9c['filter'](_0x59c6b5=>_0x59c6b5[_0x2d9530(0x266)]===_0xedcf29['CustomRangeType'][_0x2d9530(0x262)])[_0x2d9530(0x22e)](_0x4ee91e=>_0x4ee91e[_0x2d9530(0x24f)]))!=null?_0x546073:[],_0x281ca9=JSON[_0x2d9530(0x1ea)](_0x3df344),_0x4fda36=_0x38d54f[_0x2d9530(0x21d)],_0x2dd12d=_0x38d54f['id'],_0x42e5f8={'memberId':(await this[_0x2d9530(0x21b)][_0x2d9530(0x201)](_0x4ebe7f))['getMemberID'](),'unitId':_0x4ebe7f,'threadId':_0x4fda36,'mention':_0x30f345,'content':_0x281ca9,'replyId':_0x2dd12d},_0x13a63f=await this[_0x2d9530(0x25a)]['post']('/universer-api/comment/unit/'+_0x4ebe7f+_0x2d9530(0x221),{'body':_0x42e5f8});return!_0x13a63f[_0x2d9530(0x22b)][_0x2d9530(0x246)]||_0x13a63f['body'][_0x2d9530(0x246)][_0x2d9530(0x225)]===0x1;}async['resolveComment'](_0x3e182a){const _0x3d25ab=_0x130830,{unitId:_0x42130f}=_0x3e182a,_0x3961d7=_0x3e182a[_0x3d25ab(0x21d)],_0x2c363c={'memberId':this[_0x3d25ab(0x1f6)][_0x3d25ab(0x259)]()[_0x3d25ab(0x226)],'unitId':_0x42130f,'threadId':_0x3961d7,'solved':_0x3e182a[_0x3d25ab(0x264)]?_0xd086b3[_0x3d25ab(0x1f0)]:_0xd086b3['OpenOrReOpen']},_0x4d9e64=await this[_0x3d25ab(0x25a)][_0x3d25ab(0x261)](_0x3d25ab(0x234)+_0x42130f+'/solved',{'body':_0x2c363c});return!_0x4d9e64['body'][_0x3d25ab(0x246)]||_0x4d9e64[_0x3d25ab(0x22b)][_0x3d25ab(0x246)][_0x3d25ab(0x225)]===0x1;}async['deleteComment'](_0x5e8d33,_0x2a610f,_0x5094bc,_0x6c6a38){const _0x3482eb=_0x130830,_0x2cb607={'memberId':(await this[_0x3482eb(0x21b)][_0x3482eb(0x201)](_0x5e8d33))[_0x3482eb(0x20e)](),'threadId':_0x5094bc,'replyId':_0x6c6a38,'unitId':_0x5e8d33},_0x3dba2d=await this[_0x3482eb(0x25a)][_0x3482eb(0x261)](_0x3482eb(0x234)+_0x5e8d33+_0x3482eb(0x269),{'body':_0x2cb607});return!_0x3dba2d[_0x3482eb(0x22b)][_0x3482eb(0x246)]||_0x3dba2d[_0x3482eb(0x22b)][_0x3482eb(0x246)]['code']===0x1;}async[_0x130830(0x239)](_0xadf83e,_0x2406fe,_0x5888e0){const _0x276d40=_0x130830,_0x596d33={'unitId':_0xadf83e,'threadId':_0x5888e0},_0x13a342=await this[_0x276d40(0x25a)]['post']('/universer-api/comment/unit/'+_0xadf83e+_0x276d40(0x240),{'body':_0x596d33}),_0x38bc4d=_0x5888e0['map'](_0x317733=>_0x32ca3f(_0x13a342['body'][_0x276d40(0x205)][_0x317733],_0xadf83e,_0x2406fe))[_0x276d40(0x25b)](Boolean);return Object[_0x276d40(0x20d)](_0x13a342[_0x276d40(0x22b)][_0x276d40(0x20a)])[_0x276d40(0x258)](_0x26e8cb=>{const _0x98d2a1=_0x276d40;this[_0x98d2a1(0x1f6)][_0x98d2a1(0x249)](_0x26e8cb);}),_0x38bc4d;}[_0x130830(0x250)](_0x445bcb){const _0x1196f3=_0x130830;return{'id':_0x445bcb['id'],'threadId':_0x445bcb[_0x1196f3(0x21d)],'ref':_0x445bcb[_0x1196f3(0x219)]};}};_0x4f0eb0=_0x40a10a([_0x1c7136(0x0,_0xedcf29[_0x130830(0x206)](_0x2d0535['HTTPService'])),_0x1c7136(0x1,_0xedcf29[_0x130830(0x206)](_0xedcf29['UserManagerService'])),_0x1c7136(0x2,_0xedcf29[_0x130830(0x206)](_0x1b71b5[_0x130830(0x21f)])),_0x1c7136(0x3,_0xedcf29[_0x130830(0x206)](_0xedcf29[_0x130830(0x20f)]))],_0x4f0eb0);var _0x1faf76=Object[_0x130830(0x1fb)],_0x12d71a=Object[_0x130830(0x211)],_0x3aa664=(_0x45f09f,_0x2f94f1,_0x265e47,_0x4983ae)=>{const _0x2e1f93=_0x130830;for(var _0x1404ec=_0x4983ae>0x1?void 0x0:_0x4983ae?_0x12d71a(_0x2f94f1,_0x265e47):_0x2f94f1,_0x28e6d9=_0x45f09f[_0x2e1f93(0x1e5)]-0x1,_0x30958f;_0x28e6d9>=0x0;_0x28e6d9--)(_0x30958f=_0x45f09f[_0x28e6d9])&&(_0x1404ec=(_0x4983ae?_0x30958f(_0x2f94f1,_0x265e47,_0x1404ec):_0x30958f(_0x1404ec))||_0x1404ec);return _0x4983ae&&_0x1404ec&&_0x1faf76(_0x2f94f1,_0x265e47,_0x1404ec),_0x1404ec;},_0x7322b1=(_0xe87a91,_0x39482a)=>(_0x383035,_0x5b4c89)=>_0x39482a(_0x383035,_0x5b4c89,_0xe87a91);let _0x4ff174=class extends _0xedcf29[_0x130830(0x220)]{constructor(_0x157daf,_0x36c9fc){const _0x397836=_0x130830;super(),this['_threadCommentDataSourceService']=_0x157daf,this[_0x397836(0x241)]=_0x36c9fc,this[_0x397836(0x1fc)]();}['_initDataSource'](){const _0x461df5=_0x130830;this[_0x461df5(0x252)][_0x461df5(0x1e4)]=this[_0x461df5(0x241)],this[_0x461df5(0x252)][_0x461df5(0x254)]=!0x1;}};_0x4ff174=_0x3aa664([_0x7322b1(0x0,_0x35a9c5[_0x130830(0x23f)]),_0x7322b1(0x1,_0xedcf29[_0x130830(0x206)](_0x4f0eb0))],_0x4ff174);var _0x25bae7=Object['defineProperty'],_0xde3189=Object[_0x130830(0x211)],_0x32ec5d=(_0xf0e86a,_0x5acf7c,_0x20246c)=>_0x5acf7c in _0xf0e86a?_0x25bae7(_0xf0e86a,_0x5acf7c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x20246c}):_0xf0e86a[_0x5acf7c]=_0x20246c,_0x3b60f7=(_0x16ad54,_0x50d2d8,_0x1bc0bd,_0x2e37f7)=>{const _0x5e038c=_0x130830;for(var _0x27c7b4=_0x2e37f7>0x1?void 0x0:_0x2e37f7?_0xde3189(_0x50d2d8,_0x1bc0bd):_0x50d2d8,_0x2cde6c=_0x16ad54[_0x5e038c(0x1e5)]-0x1,_0x8db9fb;_0x2cde6c>=0x0;_0x2cde6c--)(_0x8db9fb=_0x16ad54[_0x2cde6c])&&(_0x27c7b4=(_0x2e37f7?_0x8db9fb(_0x50d2d8,_0x1bc0bd,_0x27c7b4):_0x8db9fb(_0x27c7b4))||_0x27c7b4);return _0x2e37f7&&_0x27c7b4&&_0x25bae7(_0x50d2d8,_0x1bc0bd,_0x27c7b4),_0x27c7b4;},_0x1b03f7=(_0x1a74dc,_0x5b2a54)=>(_0x27b623,_0x8d32bf)=>_0x5b2a54(_0x27b623,_0x8d32bf,_0x1a74dc),_0x1c91e8=(_0x53a4b,_0x323ea8,_0x120135)=>_0x32ec5d(_0x53a4b,typeof _0x323ea8!=_0x130830(0x268)?_0x323ea8+'':_0x323ea8,_0x120135);_0xe321bc[_0x130830(0x209)]=class extends _0xedcf29[_0x130830(0x267)]{constructor(_0xac5b47=_0x209c80,_0x4d0b8d,_0x2abce0){const _0x93bff4=_0x130830;super(),this[_0x93bff4(0x22d)]=_0xac5b47,this['_injector']=_0x4d0b8d,this[_0x93bff4(0x25c)]=_0x2abce0;const {..._0x21fa43}=_0xedcf29[_0x93bff4(0x23a)]({},_0x209c80,this[_0x93bff4(0x22d)]);this['_configService'][_0x93bff4(0x200)](_0x59b8cd,_0x21fa43);}['onStarting'](){const _0x48c0e2=_0x130830;[[_0x4f0eb0],[_0x4ff174],[_0x37514d]][_0x48c0e2(0x258)](_0x108bd7=>{const _0x49c5ae=_0x48c0e2;this['_injector'][_0x49c5ae(0x1f5)](_0x108bd7);});}['onReady'](){const _0x45dde0=_0x130830;this[_0x45dde0(0x213)][_0x45dde0(0x1ec)](_0x4ff174),this[_0x45dde0(0x213)][_0x45dde0(0x1ec)](_0x37514d);}},_0x1c91e8(_0xe321bc[_0x130830(0x209)],_0x130830(0x1eb),_0x36942a),_0x1c91e8(_0xe321bc[_0x130830(0x209)],_0x130830(0x1e2),_0xedcf29[_0x130830(0x227)]['UNIVER_UNKNOWN']),_0xe321bc['UniverThreadCommentDataSourcePlugin']=_0x3b60f7([_0xedcf29[_0x130830(0x1f4)](_0x576a60[_0x130830(0x204)],_0x1b71b5[_0x130830(0x237)],_0x43b226[_0x130830(0x215)]),_0x1b03f7(0x1,_0xedcf29[_0x130830(0x206)](_0xedcf29[_0x130830(0x20f)])),_0x1b03f7(0x2,_0xedcf29[_0x130830(0x22f)])],_0xe321bc[_0x130830(0x209)]),Object[_0x130830(0x1fb)](_0xe321bc,Symbol[_0x130830(0x265)],{'value':_0x130830(0x210)});}));function _0xe90e(_0x1525e3,_0x15aec9){const _0x598c96=_0x598c();return _0xe90e=function(_0xe90e66,_0x4877f6){_0xe90e66=_0xe90e66-0x1e1;let _0x20434d=_0x598c96[_0xe90e66];return _0x20434d;},_0xe90e(_0x1525e3,_0x15aec9);}function _0x598c(){const _0x14dbe3=['rangeType','Plugin','symbol','/delete','764552FhMqSJ','type','UniverCore','dataSource','length','4KGdMUq','user','replies','function','stringify','pluginName','get','CommentService','thread-comment-data-source.config','ThreadCommentModel','Solved','UniverThreadCommentUi','@univerjs-pro/collaboration-client','UserManagerService','DependentOn','add','_userService','1310boLjlW','167031LHdswD','1350852XyeLeP','@univerjs/network','defineProperty','_initDataSource','/universer-api/user/list','2160347ivBgNr','addComment','setConfig','requireSession','delete','rxjs','UniverThreadCommentUIPlugin','comments','Inject','_threadCommentModel','YYYY/MM/DD\x20HH:mm','UniverThreadCommentDataSourcePlugin','users','/add','bufferTime','values','getMemberID','Injector','Module','getOwnPropertyDescriptor','OpenOrReOpen','_injector','Delete','UniverLicensePlugin','createTimestamp','find','root','ref','comment','_sessionService','Solve','threadId','Edit','CollaborationSessionService','Disposable','/edit','slice','object','subscribe','code','userID','UniverInstanceType','HTTPService','size','Reply','body','customRanges','_config','map','IConfigService','personId','updateComment','commentUpdate$','5TiQEue','/universer-api/comment/unit/','Add','UniverProCollaborationClient','UniverCollaborationClientPlugin','_init','listComments','merge','@univerjs/core','@univerjs/thread-comment-ui','2873dbUNrX','content','IThreadCommentDataSourceService','/list','_threadCommentDataSource','solved','replyId','UNRECOGNIZED','getComment','error','122fDTyqN','UniverNetwork','addUser','userId','disposeWithMe','_commentService','38093YtfBpe','unitId','rangeId','saveCommentToSnapshot','getUnit','_threadCommentDataSourceService','@univerjs/thread-comment','syncUpdateMutationToColla','format','exports','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','forEach','getCurrentUser','_httpService','filter','_configService','874467OrVILI','payload','parse','Unknown','post','COMMENT','@univerjs-pro/license','resolved','toStringTag'];_0x598c=function(){return _0x14dbe3;};return _0x598c();}
1
+ function _0x3663(_0x34ba98,_0x76873){const _0x17a816=_0x17a8();return _0x3663=function(_0x36638b,_0x17618c){_0x36638b=_0x36638b-0x1d1;let _0x5dc8fb=_0x17a816[_0x36638b];return _0x5dc8fb;},_0x3663(_0x34ba98,_0x76873);}(function(_0x4fe2d6,_0x2cfe17){const _0x5ab82d=_0x3663,_0x2536b5=_0x4fe2d6();while(!![]){try{const _0x4b9ba9=-parseInt(_0x5ab82d(0x20c))/0x1+-parseInt(_0x5ab82d(0x251))/0x2+-parseInt(_0x5ab82d(0x238))/0x3*(-parseInt(_0x5ab82d(0x24f))/0x4)+-parseInt(_0x5ab82d(0x1ee))/0x5+-parseInt(_0x5ab82d(0x206))/0x6+parseInt(_0x5ab82d(0x1e7))/0x7*(parseInt(_0x5ab82d(0x23a))/0x8)+parseInt(_0x5ab82d(0x234))/0x9*(parseInt(_0x5ab82d(0x242))/0xa);if(_0x4b9ba9===_0x2cfe17)break;else _0x2536b5['push'](_0x2536b5['shift']());}catch(_0x478031){_0x2536b5['push'](_0x2536b5['shift']());}}}(_0x17a8,0x2710f),function(_0x5f5291,_0x1bf399){const _0x26d9ce=_0x3663;typeof exports==_0x26d9ce(0x243)&&typeof module<'u'?_0x1bf399(exports,require(_0x26d9ce(0x1e9)),require('@univerjs-pro/license'),require(_0x26d9ce(0x204)),require(_0x26d9ce(0x22b)),require('@univerjs/thread-comment'),require(_0x26d9ce(0x22d)),require(_0x26d9ce(0x24b))):typeof define==_0x26d9ce(0x1d2)&&define[_0x26d9ce(0x248)]?define(['exports',_0x26d9ce(0x1e9),'@univerjs-pro/license',_0x26d9ce(0x204),_0x26d9ce(0x22b),_0x26d9ce(0x241),_0x26d9ce(0x22d),'@univerjs/network'],_0x1bf399):(_0x5f5291=typeof globalThis<'u'?globalThis:_0x5f5291||self,_0x1bf399(_0x5f5291[_0x26d9ce(0x209)]={},_0x5f5291['UniverProCollaborationClient'],_0x5f5291[_0x26d9ce(0x1d5)],_0x5f5291[_0x26d9ce(0x246)],_0x5f5291[_0x26d9ce(0x219)],_0x5f5291['UniverThreadComment'],_0x5f5291[_0x26d9ce(0x22d)],_0x5f5291[_0x26d9ce(0x21f)]));}(this,function(_0x1efa69,_0x4d245d,_0x19f981,_0x476eec,_0x5bff04,_0xfcf424,_0x5482e9,_0x3f1f8c){'use strict';const _0x3e294a=_0x3663;const _0x380b7e=_0x3e294a(0x1df);var _0x4c58e7=(_0x53ab49=>(_0x53ab49[_0x53ab49[_0x3e294a(0x1f1)]=0x0]=_0x3e294a(0x1f1),_0x53ab49[_0x53ab49[_0x3e294a(0x229)]=0x1]=_0x3e294a(0x229),_0x53ab49[_0x53ab49[_0x3e294a(0x1e5)]=-0x1]='UNRECOGNIZED',_0x53ab49))(_0x4c58e7||{}),_0xe24067=(_0xdc9655=>(_0xdc9655[_0xdc9655['Unknown']=0x0]=_0x3e294a(0x221),_0xdc9655[_0xdc9655[_0x3e294a(0x1fa)]=0x1]=_0x3e294a(0x1fa),_0xdc9655[_0xdc9655[_0x3e294a(0x1eb)]=0x2]='Reply',_0xdc9655[_0xdc9655[_0x3e294a(0x257)]=0x3]='Edit',_0xdc9655[_0xdc9655['Delete']=0x4]=_0x3e294a(0x1e0),_0xdc9655[_0xdc9655[_0x3e294a(0x239)]=0x5]='Solve',_0xdc9655[_0xdc9655[_0x3e294a(0x1e5)]=-0x1]=_0x3e294a(0x1e5),_0xdc9655))(_0xe24067||{});const _0x3eba5b=_0x55d94d=>_0x476eec['dayjs'](new Date(+_0x55d94d))['format'](_0x3e294a(0x252)),_0x24d62e=async(_0x593418,_0x5327a8)=>{const _0x2a0ffa=_0x3e294a,_0x240d7f=_0x593418[_0x2a0ffa(0x224)](_0x476eec['UserManagerService']),_0x5de257=_0x593418[_0x2a0ffa(0x224)](_0x3f1f8c[_0x2a0ffa(0x21d)]);_0x5327a8[_0x2a0ffa(0x210)](_0x523aaf=>{const _0x35d37b=_0x2a0ffa;_0x240d7f[_0x35d37b(0x222)](_0x523aaf)&&_0x5327a8['delete'](_0x523aaf);}),_0x5327a8['size']&&(await _0x5de257['get'](_0x2a0ffa(0x226),{'params':{'userIDs':[..._0x5327a8]}}))[_0x2a0ffa(0x1f0)][_0x2a0ffa(0x228)][_0x2a0ffa(0x210)](_0x44fc0c=>{const _0x5a1a83=_0x2a0ffa;_0x44fc0c&&_0x240d7f[_0x5a1a83(0x1ed)](_0x44fc0c);});};var _0x2ae0fd=Object[_0x3e294a(0x231)],_0x134253=Object[_0x3e294a(0x245)],_0x45db67=(_0x2b25c5,_0x4c1c66,_0x42167c,_0x2e9eae)=>{const _0x1f574d=_0x3e294a;for(var _0x25e451=_0x2e9eae>0x1?void 0x0:_0x2e9eae?_0x134253(_0x4c1c66,_0x42167c):_0x4c1c66,_0x169b31=_0x2b25c5[_0x1f574d(0x1d7)]-0x1,_0x1ea44d;_0x169b31>=0x0;_0x169b31--)(_0x1ea44d=_0x2b25c5[_0x169b31])&&(_0x25e451=(_0x2e9eae?_0x1ea44d(_0x4c1c66,_0x42167c,_0x25e451):_0x1ea44d(_0x25e451))||_0x25e451);return _0x2e9eae&&_0x25e451&&_0x2ae0fd(_0x4c1c66,_0x42167c,_0x25e451),_0x25e451;},_0x71746=(_0x28b399,_0x25281a)=>(_0x2144b8,_0x2a380e)=>_0x25281a(_0x2144b8,_0x2a380e,_0x28b399);let _0x51f9b9=class extends _0x476eec[_0x3e294a(0x1d6)]{constructor(_0x1766c9,_0x3c106d,_0x516c96,_0x41756e){const _0x2d62d9=_0x3e294a;super(),this[_0x2d62d9(0x23b)]=_0x1766c9,this[_0x2d62d9(0x1ea)]=_0x3c106d,this[_0x2d62d9(0x23c)]=_0x516c96,this[_0x2d62d9(0x24e)]=_0x41756e,this['_init'](),this[_0x2d62d9(0x23e)]();}[_0x3e294a(0x23e)](){const _0x2c3d29=_0x3e294a;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$']['pipe'](_0x5482e9[_0x2c3d29(0x20f)](0x10))[_0x2c3d29(0x253)](_0xe9a313=>{const _0x388edd=_0x2c3d29,_0x457608=new Set();_0xe9a313[_0x388edd(0x210)](_0x128d71=>{const _0x591b56=_0x388edd;switch(_0x128d71['type']){case'add':{const _0x41039d=_0x128d71[_0x591b56(0x20e)]['personId'];_0x457608[_0x591b56(0x203)](_0x41039d);break;}}}),_0x24d62e(this[_0x388edd(0x24e)],_0x457608);}));}[_0x3e294a(0x233)](){const _0x7fb4ad=_0x3e294a;this['disposeWithMe'](this[_0x7fb4ad(0x23b)][_0x7fb4ad(0x1f9)][_0x7fb4ad(0x253)](async _0x1d815a=>{const _0x47776a=_0x7fb4ad;var _0x638c26,_0x375bac,_0x37bc8b,_0x2e9fbf;const _0x186566=(_0x638c26=this[_0x47776a(0x1ea)][_0x47776a(0x1e8)](_0x1d815a[_0x47776a(0x232)])[_0x47776a(0x207)](_0x34ae84=>_0x34ae84['threadId']===_0x1d815a[_0x47776a(0x1ef)]))==null?void 0x0:_0x638c26[_0x47776a(0x22a)];if(!_0x186566)return;const {unitId:_0x4b08ec,subUnitId:_0x12ae2b}=_0x186566;switch(_0x1d815a[_0x47776a(0x200)]&&this['_userService'][_0x47776a(0x1ed)](_0x1d815a[_0x47776a(0x200)]),_0x1d815a['type']){case _0xe24067[_0x47776a(0x1fa)]:break;case _0xe24067['Reply']:{this[_0x47776a(0x1ea)][_0x47776a(0x20a)](_0x4b08ec,_0x12ae2b,{'unitId':_0x4b08ec,'subUnitId':_0x12ae2b,'ref':'','id':_0x1d815a['replyId'],'dT':_0x3eba5b(+_0x1d815a[_0x47776a(0x23f)]),'threadId':_0x1d815a[_0x47776a(0x1ef)],'personId':(_0x37bc8b=(_0x375bac=_0x1d815a[_0x47776a(0x200)])==null?void 0x0:_0x375bac[_0x47776a(0x20b)])!=null?_0x37bc8b:_0x1d815a[_0x47776a(0x1d4)],'text':JSON['parse'](_0x1d815a['content']),'parentId':_0x186566['id']});break;}case _0xe24067[_0x47776a(0x1e0)]:{const _0xa66673=this[_0x47776a(0x1ea)]['getComment'](_0x4b08ec,_0x12ae2b,_0x1d815a['replyId']);_0xa66673&&_0xa66673[_0x47776a(0x211)]&&this[_0x47776a(0x1ea)][_0x47776a(0x236)](_0x4b08ec,_0x12ae2b,_0x1d815a[_0x47776a(0x230)]);break;}case _0xe24067['Edit']:{this[_0x47776a(0x1ea)]['updateComment'](_0x4b08ec,_0x12ae2b,{'commentId':_0x1d815a['replyId'],'text':JSON[_0x47776a(0x218)](_0x1d815a[_0x47776a(0x1f2)])});break;}case _0xe24067['Solve']:{const _0x40898e=(_0x2e9fbf=this['_threadCommentModel']['getUnit'](_0x1d815a[_0x47776a(0x232)])[_0x47776a(0x207)](_0x19e519=>_0x19e519[_0x47776a(0x1ef)]===_0x1d815a[_0x47776a(0x1ef)]))==null?void 0x0:_0x2e9fbf[_0x47776a(0x22a)];_0x40898e&&this[_0x47776a(0x1ea)][_0x47776a(0x1e1)](_0x4b08ec,_0x12ae2b,_0x40898e['id'],_0x1d815a[_0x47776a(0x237)]===_0x4c58e7['Solved']);break;}}}));}};_0x51f9b9=_0x45db67([_0x71746(0x0,_0x476eec['Inject'](_0x4d245d[_0x3e294a(0x212)])),_0x71746(0x1,_0x476eec['Inject'](_0xfcf424[_0x3e294a(0x255)])),_0x71746(0x2,_0x476eec[_0x3e294a(0x208)](_0x476eec['UserManagerService'])),_0x71746(0x3,_0x476eec[_0x3e294a(0x208)](_0x476eec['Injector']))],_0x51f9b9);const _0x14994f=_0x3e294a(0x1e2),_0xdcb753={};var _0x3e13eb=Object[_0x3e294a(0x231)],_0x5d6a1e=Object['getOwnPropertyDescriptor'],_0x40c353=(_0x41b4b9,_0x6d2f1b,_0x3eb7e8,_0x2ed277)=>{const _0x5a841f=_0x3e294a;for(var _0x99c1c0=_0x2ed277>0x1?void 0x0:_0x2ed277?_0x5d6a1e(_0x6d2f1b,_0x3eb7e8):_0x6d2f1b,_0x1491f8=_0x41b4b9[_0x5a841f(0x1d7)]-0x1,_0xa915bc;_0x1491f8>=0x0;_0x1491f8--)(_0xa915bc=_0x41b4b9[_0x1491f8])&&(_0x99c1c0=(_0x2ed277?_0xa915bc(_0x6d2f1b,_0x3eb7e8,_0x99c1c0):_0xa915bc(_0x99c1c0))||_0x99c1c0);return _0x2ed277&&_0x99c1c0&&_0x3e13eb(_0x6d2f1b,_0x3eb7e8,_0x99c1c0),_0x99c1c0;},_0x585dbc=(_0x2a65ab,_0x1a5167)=>(_0x43c6ec,_0x1cb495)=>_0x1a5167(_0x43c6ec,_0x1cb495,_0x2a65ab);function _0x4d1c3f(_0x3974ad,_0x21668f){const _0x49f871=_0x3e294a,_0x4aa73c=_0x3974ad[_0x49f871(0x23d)][0x0];return{..._0x21668f,'id':_0x4aa73c[_0x49f871(0x230)],'resolved':_0x3974ad[_0x49f871(0x237)]===0x1,'dT':_0x3eba5b(_0x4aa73c[_0x49f871(0x23f)]),'personId':_0x4aa73c[_0x49f871(0x1d4)],'threadId':_0x4aa73c['threadId']};}function _0x5af800(_0xbe5010,_0x4ae72c,_0x21e231){const _0x5d8f9a=_0x3e294a;var _0x3f49ab,_0x17da88;if(((_0x17da88=(_0x3f49ab=_0xbe5010==null?void 0x0:_0xbe5010['replies'])==null?void 0x0:_0x3f49ab['length'])!=null?_0x17da88:0x0)>0x0){const _0x2fa691=(_0x25ad1f,_0x5de307)=>({'id':_0x25ad1f['replyId'],'threadId':_0x25ad1f[_0x5d8f9a(0x1ef)],'dT':_0x3eba5b(_0x25ad1f['createTimestamp']),'personId':_0x25ad1f[_0x5d8f9a(0x1d4)],'resolved':_0xbe5010[_0x5d8f9a(0x237)]===_0x4c58e7[_0x5d8f9a(0x229)],'unitId':_0x4ae72c,'subUnitId':_0x21e231,'text':JSON[_0x5d8f9a(0x218)](_0x25ad1f['content']),'parentId':_0x5de307}),_0x30abbd=_0x2fa691(_0xbe5010['replies'][0x0]);return{..._0x30abbd,'children':_0xbe5010[_0x5d8f9a(0x23d)]['slice'](0x1)['map'](_0x30adfc=>_0x2fa691(_0x30adfc,_0x30abbd['id']))};}return null;}let _0x1dacc1=class{constructor(_0x44ffe6,_0x267385,_0x131bee,_0x32ef60){const _0x1f4b22=_0x3e294a;this[_0x1f4b22(0x1dd)]=_0x44ffe6,this['_userService']=_0x267385,this[_0x1f4b22(0x223)]=_0x131bee,this[_0x1f4b22(0x24e)]=_0x32ef60;}async[_0x3e294a(0x20a)](_0x54f3cf){const _0x309e0e=_0x3e294a;var _0x45b921,_0x408933;const {parentId:_0xb095a4,unitId:_0x98ed81,text:_0x479cc7,threadId:_0x2a2e1a}=_0x54f3cf,_0x46a346=(_0x408933=(_0x45b921=_0x479cc7[_0x309e0e(0x21a)])==null?void 0x0:_0x45b921['filter'](_0xe9a4f1=>_0xe9a4f1[_0x309e0e(0x247)]===_0x476eec[_0x309e0e(0x227)][_0x309e0e(0x254)])[_0x309e0e(0x1ff)](_0x5e11d0=>_0x5e11d0[_0x309e0e(0x216)]))!=null?_0x408933:[],_0x232715=JSON['stringify'](_0x479cc7),_0x6b02df=(await this['_sessionService']['requireSession'](_0x98ed81))[_0x309e0e(0x1da)]();if(_0xb095a4){const _0xe816ee={'memberId':_0x6b02df,'unitId':_0x98ed81,'content':_0x232715,'mention':_0x46a346,'threadId':_0x2a2e1a},_0x538eb1=(await this[_0x309e0e(0x1dd)][_0x309e0e(0x205)](_0x309e0e(0x1de)+_0x98ed81+_0x309e0e(0x249),{'body':_0xe816ee}))[_0x309e0e(0x1f0)][_0x309e0e(0x24c)];return{..._0x54f3cf,'id':_0x538eb1['replyId'],'dT':_0x476eec[_0x309e0e(0x1fc)](+_0x538eb1['createTimestamp'])[_0x309e0e(0x217)](_0x309e0e(0x252)),'personId':_0x538eb1[_0x309e0e(0x1d4)]};}else{const _0x5119ea={'memberId':_0x6b02df,'unitId':_0x98ed81,'content':_0x232715,'mention':_0x46a346},_0x4b9e60=await this[_0x309e0e(0x1dd)]['post'](_0x309e0e(0x1de)+_0x98ed81+'/add',{'body':_0x5119ea});return _0x4d1c3f(_0x4b9e60['body']['comment'],_0x54f3cf);}}async[_0x3e294a(0x1e6)](_0x528069){const _0x210779=_0x3e294a;var _0x4b98d6,_0x4c79e6;const {text:_0x4e3523,unitId:_0x20d06c}=_0x528069,_0x1cefc1=(_0x4c79e6=(_0x4b98d6=_0x4e3523[_0x210779(0x21a)])==null?void 0x0:_0x4b98d6[_0x210779(0x21b)](_0x4b1c50=>_0x4b1c50[_0x210779(0x247)]===_0x476eec[_0x210779(0x227)][_0x210779(0x254)])[_0x210779(0x1ff)](_0x5ed1ee=>_0x5ed1ee['rangeId']))!=null?_0x4c79e6:[],_0x58464c=JSON[_0x210779(0x1dc)](_0x4e3523),_0x3c1cfb=_0x528069[_0x210779(0x1ef)],_0x2a6c22=_0x528069['id'],_0x2e8935={'memberId':(await this['_sessionService']['requireSession'](_0x20d06c))[_0x210779(0x1da)](),'unitId':_0x20d06c,'threadId':_0x3c1cfb,'mention':_0x1cefc1,'content':_0x58464c,'replyId':_0x2a6c22},_0x32b7aa=await this[_0x210779(0x1dd)][_0x210779(0x205)](_0x210779(0x1de)+_0x20d06c+_0x210779(0x1fd),{'body':_0x2e8935});return!_0x32b7aa[_0x210779(0x1f0)][_0x210779(0x250)]||_0x32b7aa['body'][_0x210779(0x250)][_0x210779(0x244)]===0x1;}async[_0x3e294a(0x1e1)](_0x2a71d0){const _0x10b82b=_0x3e294a,{unitId:_0x36d656}=_0x2a71d0,_0x56f46a=_0x2a71d0[_0x10b82b(0x1ef)],_0x43eff7={'memberId':this[_0x10b82b(0x23c)]['getCurrentUser']()[_0x10b82b(0x20b)],'unitId':_0x36d656,'threadId':_0x56f46a,'solved':_0x2a71d0[_0x10b82b(0x215)]?_0x4c58e7[_0x10b82b(0x229)]:_0x4c58e7[_0x10b82b(0x1f1)]},_0x4616f5=await this[_0x10b82b(0x1dd)][_0x10b82b(0x205)](_0x10b82b(0x1de)+_0x36d656+_0x10b82b(0x1d8),{'body':_0x43eff7});return!_0x4616f5['body'][_0x10b82b(0x250)]||_0x4616f5['body'][_0x10b82b(0x250)][_0x10b82b(0x244)]===0x1;}async[_0x3e294a(0x236)](_0x2e2ba9,_0x5987f1,_0x573a80,_0x26e41d){const _0x53962c=_0x3e294a,_0x3f61cd={'memberId':(await this[_0x53962c(0x223)][_0x53962c(0x21e)](_0x2e2ba9))[_0x53962c(0x1da)](),'threadId':_0x573a80,'replyId':_0x26e41d,'unitId':_0x2e2ba9},_0x41f6bd=await this['_httpService'][_0x53962c(0x205)](_0x53962c(0x1de)+_0x2e2ba9+_0x53962c(0x22f),{'body':_0x3f61cd});return!_0x41f6bd[_0x53962c(0x1f0)][_0x53962c(0x250)]||_0x41f6bd[_0x53962c(0x1f0)]['error'][_0x53962c(0x244)]===0x1;}async[_0x3e294a(0x1ec)](_0x146978,_0x5a8262,_0xc13d59){const _0x293d8c=_0x3e294a,_0x2996ea={'unitId':_0x146978,'threadId':_0xc13d59},_0x12a10b=await this[_0x293d8c(0x1dd)]['post'](_0x293d8c(0x1de)+_0x146978+_0x293d8c(0x1d3),{'body':_0x2996ea}),_0x288161=_0xc13d59[_0x293d8c(0x1ff)](_0x6cf263=>_0x5af800(_0x12a10b[_0x293d8c(0x1f0)][_0x293d8c(0x256)][_0x6cf263],_0x146978,_0x5a8262))['filter'](Boolean);return Object[_0x293d8c(0x202)](_0x12a10b['body'][_0x293d8c(0x228)])[_0x293d8c(0x210)](_0x38e1dd=>{const _0xaff1c3=_0x293d8c;this['_userService'][_0xaff1c3(0x1ed)](_0x38e1dd);}),_0x288161;}[_0x3e294a(0x220)](_0x5de62b){return{'id':_0x5de62b['id'],'threadId':_0x5de62b['threadId'],'ref':_0x5de62b['ref']};}};_0x1dacc1=_0x40c353([_0x585dbc(0x0,_0x476eec[_0x3e294a(0x208)](_0x3f1f8c['HTTPService'])),_0x585dbc(0x1,_0x476eec[_0x3e294a(0x208)](_0x476eec[_0x3e294a(0x1e3)])),_0x585dbc(0x2,_0x476eec[_0x3e294a(0x208)](_0x4d245d[_0x3e294a(0x213)])),_0x585dbc(0x3,_0x476eec[_0x3e294a(0x208)](_0x476eec[_0x3e294a(0x1f8)]))],_0x1dacc1);var _0x26d19d=Object['defineProperty'],_0x75aa3f=Object[_0x3e294a(0x245)],_0xd87127=(_0x23610e,_0x2cf505,_0x31429f,_0x6f56c1)=>{const _0x1ededc=_0x3e294a;for(var _0x5ac461=_0x6f56c1>0x1?void 0x0:_0x6f56c1?_0x75aa3f(_0x2cf505,_0x31429f):_0x2cf505,_0x24a1b9=_0x23610e[_0x1ededc(0x1d7)]-0x1,_0x2a6ad9;_0x24a1b9>=0x0;_0x24a1b9--)(_0x2a6ad9=_0x23610e[_0x24a1b9])&&(_0x5ac461=(_0x6f56c1?_0x2a6ad9(_0x2cf505,_0x31429f,_0x5ac461):_0x2a6ad9(_0x5ac461))||_0x5ac461);return _0x6f56c1&&_0x5ac461&&_0x26d19d(_0x2cf505,_0x31429f,_0x5ac461),_0x5ac461;},_0x301d1b=(_0x5afdcf,_0x11f077)=>(_0x3b7aef,_0x428e2c)=>_0x11f077(_0x3b7aef,_0x428e2c,_0x5afdcf);let _0x3681c6=class extends _0x476eec['Disposable']{constructor(_0x465275,_0x1bac0a){const _0x3901f4=_0x3e294a;super(),this[_0x3901f4(0x1f4)]=_0x465275,this['_threadCommentDataSource']=_0x1bac0a,this['_initDataSource']();}[_0x3e294a(0x1fe)](){const _0x2933b8=_0x3e294a;this[_0x2933b8(0x1f4)][_0x2933b8(0x1e4)]=this[_0x2933b8(0x1f7)],this[_0x2933b8(0x1f4)][_0x2933b8(0x24d)]=!0x1;}};_0x3681c6=_0xd87127([_0x301d1b(0x0,_0xfcf424[_0x3e294a(0x1f3)]),_0x301d1b(0x1,_0x476eec[_0x3e294a(0x208)](_0x1dacc1))],_0x3681c6);var _0x125270=Object['defineProperty'],_0x485858=Object['getOwnPropertyDescriptor'],_0x340507=(_0x24f6a9,_0x3953f7,_0x5fd6f3)=>_0x3953f7 in _0x24f6a9?_0x125270(_0x24f6a9,_0x3953f7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5fd6f3}):_0x24f6a9[_0x3953f7]=_0x5fd6f3,_0x187bc9=(_0x1ae1bc,_0x5f2e77,_0x87263e,_0x2756bf)=>{const _0x59ea9b=_0x3e294a;for(var _0x5e7906=_0x2756bf>0x1?void 0x0:_0x2756bf?_0x485858(_0x5f2e77,_0x87263e):_0x5f2e77,_0x2fc6fe=_0x1ae1bc[_0x59ea9b(0x1d7)]-0x1,_0x22355b;_0x2fc6fe>=0x0;_0x2fc6fe--)(_0x22355b=_0x1ae1bc[_0x2fc6fe])&&(_0x5e7906=(_0x2756bf?_0x22355b(_0x5f2e77,_0x87263e,_0x5e7906):_0x22355b(_0x5e7906))||_0x5e7906);return _0x2756bf&&_0x5e7906&&_0x125270(_0x5f2e77,_0x87263e,_0x5e7906),_0x5e7906;},_0x2f92d2=(_0x5c57bd,_0xad792e)=>(_0x1e32fb,_0x2295bc)=>_0xad792e(_0x1e32fb,_0x2295bc,_0x5c57bd),_0xa42806=(_0x5f6c4e,_0x55b0c8,_0x3ac180)=>_0x340507(_0x5f6c4e,typeof _0x55b0c8!=_0x3e294a(0x240)?_0x55b0c8+'':_0x55b0c8,_0x3ac180);_0x1efa69[_0x3e294a(0x1d9)]=class extends _0x476eec[_0x3e294a(0x21c)]{constructor(_0x561332=_0xdcb753,_0xa9b4f8,_0x5b6f3f){const _0x218a1a=_0x3e294a;super(),this[_0x218a1a(0x235)]=_0x561332,this[_0x218a1a(0x24e)]=_0xa9b4f8,this['_configService']=_0x5b6f3f;const {..._0x266942}=_0x476eec[_0x218a1a(0x1fb)]({},_0xdcb753,this[_0x218a1a(0x235)]);this['_configService'][_0x218a1a(0x22c)](_0x14994f,_0x266942);}[_0x3e294a(0x214)](){const _0xced05d=_0x3e294a;[[_0x1dacc1],[_0x3681c6],[_0x51f9b9]][_0xced05d(0x210)](_0x37a1c1=>{const _0x220b20=_0xced05d;this[_0x220b20(0x24e)]['add'](_0x37a1c1);});}[_0x3e294a(0x1f6)](){const _0x4fb3bc=_0x3e294a;this[_0x4fb3bc(0x24e)][_0x4fb3bc(0x224)](_0x3681c6),this['_injector']['get'](_0x51f9b9);}},_0xa42806(_0x1efa69[_0x3e294a(0x1d9)],_0x3e294a(0x1db),_0x380b7e),_0xa42806(_0x1efa69[_0x3e294a(0x1d9)],_0x3e294a(0x20d),_0x476eec[_0x3e294a(0x201)][_0x3e294a(0x225)]),_0x1efa69[_0x3e294a(0x1d9)]=_0x187bc9([_0x476eec[_0x3e294a(0x22e)](_0x5bff04[_0x3e294a(0x1d1)],_0x4d245d['UniverCollaborationClientPlugin'],_0x19f981['UniverLicensePlugin']),_0x2f92d2(0x1,_0x476eec[_0x3e294a(0x208)](_0x476eec['Injector'])),_0x2f92d2(0x2,_0x476eec['IConfigService'])],_0x1efa69[_0x3e294a(0x1d9)]),Object[_0x3e294a(0x231)](_0x1efa69,Symbol[_0x3e294a(0x24a)],{'value':_0x3e294a(0x1f5)});}));function _0x17a8(){const _0x56fcae=['Module','onReady','_threadCommentDataSource','Injector','commentUpdate$','Add','merge','dayjs','/edit','_initDataSource','map','user','UniverInstanceType','values','add','@univerjs/core','post','1436556QArusp','find','Inject','UniverProThreadCommentDatasource','addComment','userID','260368ziZIAO','type','payload','bufferTime','forEach','parentId','CommentService','CollaborationSessionService','onStarting','resolved','rangeId','format','parse','UniverThreadCommentUi','customRanges','filter','Plugin','HTTPService','requireSession','UniverNetwork','saveCommentToSnapshot','Unknown','getUser','_sessionService','get','UNIVER_UNKNOWN','/universer-api/user/list','CustomRangeType','users','Solved','root','@univerjs/thread-comment-ui','setConfig','rxjs','DependentOn','/delete','replyId','defineProperty','unitId','_init','5265UDvXOb','_config','deleteComment','solved','3bmUKdS','Solve','180496esVtzu','_commentService','_userService','replies','_initUserSync','createTimestamp','symbol','@univerjs/thread-comment','12950DgShmi','object','code','getOwnPropertyDescriptor','UniverCore','rangeType','amd','/reply','toStringTag','@univerjs/network','reply','syncUpdateMutationToColla','_injector','81460tzjEZH','error','21714CqMklB','YYYY/MM/DD\x20HH:mm','subscribe','COMMENT','ThreadCommentModel','comments','Edit','UniverThreadCommentUIPlugin','function','/list','userId','UniverProLicense','Disposable','length','/solved','UniverThreadCommentDataSourcePlugin','getMemberID','pluginName','stringify','_httpService','/universer-api/comment/unit/','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','resolveComment','thread-comment-data-source.config','UserManagerService','dataSource','UNRECOGNIZED','updateComment','7KTQKeG','getUnit','@univerjs-pro/collaboration-client','_threadCommentModel','Reply','listComments','addUser','649180eCvFqh','threadId','body','OpenOrReOpen','content','IThreadCommentDataSourceService','_threadCommentDataSourceService'];_0x17a8=function(){return _0x56fcae;};return _0x17a8();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.0-alpha.0",
3
+ "version": "0.6.0-experimental.20250125-1d060b9",
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.0-alpha.0",
49
- "@univerjs-pro/license": "0.6.0-alpha.0",
50
- "@univerjs/protocol": "0.1.42",
51
- "@univerjs/core": "0.6.0-alpha.0",
52
- "@univerjs/network": "0.6.0-alpha.0",
53
- "@univerjs/thread-comment": "0.6.0-alpha.0",
54
- "@univerjs/thread-comment-ui": "0.6.0-alpha.0"
48
+ "@univerjs-pro/collaboration-client": "0.6.0-experimental.20250125-1d060b9",
49
+ "@univerjs-pro/license": "0.6.0-experimental.20250125-1d060b9",
50
+ "@univerjs/core": "0.6.0-experimental.20250125-1d060b9",
51
+ "@univerjs/thread-comment": "0.6.0-experimental.20250125-1d060b9",
52
+ "@univerjs/network": "0.6.0-experimental.20250125-1d060b9",
53
+ "@univerjs/thread-comment-ui": "0.6.0-experimental.20250125-1d060b9",
54
+ "@univerjs/protocol": "0.1.42"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",