@univerjs-pro/thread-comment-datasource 0.12.1 → 0.12.2-nightly.202511290732

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 _0x4bff12=_0x3fa3;(function(_0x35dbbf,_0x26de5b){const _0x39ba39=_0x3fa3,_0x5093da=_0x35dbbf();while(!![]){try{const _0x3ff795=parseInt(_0x39ba39(0x194))/0x1*(parseInt(_0x39ba39(0x176))/0x2)+parseInt(_0x39ba39(0x197))/0x3+-parseInt(_0x39ba39(0x18e))/0x4+-parseInt(_0x39ba39(0x141))/0x5+parseInt(_0x39ba39(0x19b))/0x6*(parseInt(_0x39ba39(0x160))/0x7)+-parseInt(_0x39ba39(0x199))/0x8+parseInt(_0x39ba39(0x191))/0x9*(-parseInt(_0x39ba39(0x186))/0xa);if(_0x3ff795===_0x26de5b)break;else _0x5093da['push'](_0x5093da['shift']());}catch(_0x268500){_0x5093da['push'](_0x5093da['shift']());}}}(_0x2437,0xc2d30));function _0x3fa3(_0x1929b4,_0x790b9b){const _0x2437cb=_0x2437();return _0x3fa3=function(_0x3fa3db,_0x41f2a4){_0x3fa3db=_0x3fa3db-0x12d;let _0x35d03d=_0x2437cb[_0x3fa3db];return _0x35d03d;},_0x3fa3(_0x1929b4,_0x790b9b);}Object[_0x4bff12(0x156)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4bff12(0x15f);var I=(_0x3ceeb3=>(_0x3ceeb3[_0x3ceeb3['OpenOrReOpen']=0x0]=_0x4bff12(0x158),_0x3ceeb3[_0x3ceeb3[_0x4bff12(0x18a)]=0x1]='Solved',_0x3ceeb3[_0x3ceeb3[_0x4bff12(0x150)]=-0x1]=_0x4bff12(0x150),_0x3ceeb3))(I||{}),v=(_0xae20c=>(_0xae20c[_0xae20c[_0x4bff12(0x193)]=0x0]=_0x4bff12(0x193),_0xae20c[_0xae20c[_0x4bff12(0x16e)]=0x1]=_0x4bff12(0x16e),_0xae20c[_0xae20c['Reply']=0x2]=_0x4bff12(0x147),_0xae20c[_0xae20c[_0x4bff12(0x16c)]=0x3]=_0x4bff12(0x16c),_0xae20c[_0xae20c[_0x4bff12(0x19e)]=0x4]=_0x4bff12(0x19e),_0xae20c[_0xae20c[_0x4bff12(0x12d)]=0x5]=_0x4bff12(0x12d),_0xae20c[_0xae20c[_0x4bff12(0x150)]=-0x1]=_0x4bff12(0x150),_0xae20c))(v||{});const f=_0x54236c=>c[_0x4bff12(0x188)](new Date(+_0x54236c))[_0x4bff12(0x1a5)](_0x4bff12(0x13c)),R=async(_0x7194ad,_0x55334c)=>{const _0x39b181=_0x4bff12,_0x5e4b79=_0x7194ad[_0x39b181(0x15b)](c[_0x39b181(0x166)]),_0x134650=_0x7194ad['get'](P['HTTPService']);_0x55334c['forEach'](_0x2e12a6=>{const _0x54ef03=_0x39b181;_0x5e4b79[_0x54ef03(0x187)](_0x2e12a6)&&_0x55334c[_0x54ef03(0x144)](_0x2e12a6);}),_0x55334c[_0x39b181(0x135)]&&(await _0x134650[_0x39b181(0x15b)](_0x39b181(0x157),{'params':{'userIDs':[..._0x55334c]}}))[_0x39b181(0x131)]['users'][_0x39b181(0x18d)](_0x1f13cd=>{const _0x55ca3c=_0x39b181;_0x1f13cd&&_0x5e4b79[_0x55ca3c(0x13b)](_0x1f13cd);});};function _0x2437(){const _0x2dc759=['3975678UIiIra','IConfigService','11085096qNsqyT','replyId','6cJqQWj','comments','thread-comment-data-source.config','Delete','COMMENT','UNIVER_UNKNOWN','resolveComment','filter','reply','code','format','Solve','_injector','UniverThreadCommentDataSourcePlugin','setConfig','body','UniverLicensePlugin','_userService','UniverThreadCommentUIPlugin','size','_threadCommentDataSource','_httpService','map','/add','getCurrentUser','addUser','YYYY/MM/DD\x20HH:mm','disposeWithMe','onStarting','rangeId','Injector','2366670cuNPCp','add','requireSession','delete','replies','_sessionService','Reply','/solved','IThreadCommentDataSourceService','_init','UniverCollaborationClientPlugin','_initDataSource','threadId','content','values','UNRECOGNIZED','createTimestamp','_threadCommentDataSourceService','DependentOn','comment','merge','defineProperty','/universer-api/user/list','OpenOrReOpen','personId','CustomRangeType','get','parentId','Plugin','Inject','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','6721274knHwvO','users','_initUserSync','CommentService','_commentService','type','UserManagerService','/list','length','getMemberID','rangeType','customRanges','Edit','_configService','Add','/delete','stringify','_threadCommentModel','/universer-api/comment/unit/','symbol','Disposable','deleteComment','4ekeBno','listComments','userID','updateComment','getComment','ThreadCommentModel','pipe','user','root','getUnit','error','subscribe','UniverInstanceType','CollaborationSessionService','/reply','parse','7162960MHTKuJ','getUser','dayjs','userId','Solved','/edit','slice','forEach','2004028mObNNU','solved','getOwnPropertyDescriptor','9YojHOp','unitId','Unknown','794433HZXmNa','payload','post'];_0x2437=function(){return _0x2dc759;};return _0x2437();}var $=Object[_0x4bff12(0x190)],E=(_0x3ef370,_0x46584c,_0x245550,_0x3de885)=>{const _0x5449e2=_0x4bff12;for(var _0x594631=_0x3de885>0x1?void 0x0:_0x3de885?$(_0x46584c,_0x245550):_0x46584c,_0x334d3e=_0x3ef370[_0x5449e2(0x168)]-0x1,_0x250470;_0x334d3e>=0x0;_0x334d3e--)(_0x250470=_0x3ef370[_0x334d3e])&&(_0x594631=_0x250470(_0x594631)||_0x594631);return _0x594631;},S=(_0xd0ab58,_0x217b9f)=>(_0x459084,_0x40cbdf)=>_0x217b9f(_0x459084,_0x40cbdf,_0xd0ab58);let _=class extends c[_0x4bff12(0x174)]{constructor(_0x58b72d,_0xaa7629,_0x1c2b68,_0x17b52a){const _0x14015d=_0x4bff12;super(),this[_0x14015d(0x164)]=_0x58b72d,this[_0x14015d(0x171)]=_0xaa7629,this[_0x14015d(0x133)]=_0x1c2b68,this[_0x14015d(0x12e)]=_0x17b52a,this[_0x14015d(0x14a)](),this[_0x14015d(0x162)]();}['_initUserSync'](){const _0x23e4ac=_0x4bff12;this[_0x23e4ac(0x13d)](this['_threadCommentModel']['commentUpdate$'][_0x23e4ac(0x17c)](j['bufferTime'](0x10))[_0x23e4ac(0x181)](_0x1c2cf4=>{const _0x18e2bd=_0x23e4ac,_0x580815=new Set();_0x1c2cf4[_0x18e2bd(0x18d)](_0x3f763a=>{const _0x3dc7fe=_0x18e2bd;switch(_0x3f763a[_0x3dc7fe(0x165)]){case _0x3dc7fe(0x142):{const _0x31af00=_0x3f763a[_0x3dc7fe(0x195)][_0x3dc7fe(0x159)];_0x580815[_0x3dc7fe(0x142)](_0x31af00);break;}}}),R(this[_0x18e2bd(0x12e)],_0x580815);}));}[_0x4bff12(0x14a)](){const _0x1cc51b=_0x4bff12;this[_0x1cc51b(0x13d)](this[_0x1cc51b(0x164)]['commentUpdate$'][_0x1cc51b(0x181)](async _0x2952b5=>{const _0x5780fb=_0x1cc51b;var _0x4a44ad,_0x1fc45c,_0xcd0030,_0x1685fa;const _0x26f005=(_0x4a44ad=this['_threadCommentModel'][_0x5780fb(0x17f)](_0x2952b5[_0x5780fb(0x192)])['find'](_0x27a152=>_0x27a152['threadId']===_0x2952b5[_0x5780fb(0x14d)]))==null?void 0x0:_0x4a44ad[_0x5780fb(0x17e)];if(!_0x26f005)return;const {unitId:_0x19ec2c,subUnitId:_0x2dd38a}=_0x26f005;switch(_0x2952b5[_0x5780fb(0x17d)]&&this[_0x5780fb(0x133)]['addUser'](_0x2952b5[_0x5780fb(0x17d)]),_0x2952b5[_0x5780fb(0x165)]){case v['Add']:break;case v[_0x5780fb(0x147)]:{this[_0x5780fb(0x171)]['addComment'](_0x19ec2c,_0x2dd38a,{'unitId':_0x19ec2c,'subUnitId':_0x2dd38a,'ref':'','id':_0x2952b5[_0x5780fb(0x19a)],'dT':f(+_0x2952b5[_0x5780fb(0x151)]),'threadId':_0x2952b5[_0x5780fb(0x14d)],'personId':(_0xcd0030=(_0x1fc45c=_0x2952b5['user'])==null?void 0x0:_0x1fc45c[_0x5780fb(0x178)])!=null?_0xcd0030:_0x2952b5[_0x5780fb(0x189)],'text':JSON[_0x5780fb(0x185)](_0x2952b5['content']),'parentId':_0x26f005['id']});break;}case v[_0x5780fb(0x19e)]:{const _0x2610bd=this[_0x5780fb(0x171)][_0x5780fb(0x17a)](_0x19ec2c,_0x2dd38a,_0x2952b5[_0x5780fb(0x19a)]);_0x2610bd&&_0x2610bd[_0x5780fb(0x15c)]&&this[_0x5780fb(0x171)][_0x5780fb(0x175)](_0x19ec2c,_0x2dd38a,_0x2952b5['replyId']);break;}case v[_0x5780fb(0x16c)]:{this['_threadCommentModel'][_0x5780fb(0x179)](_0x19ec2c,_0x2dd38a,{'commentId':_0x2952b5[_0x5780fb(0x19a)],'text':JSON[_0x5780fb(0x185)](_0x2952b5[_0x5780fb(0x14e)])});break;}case v['Solve']:{const _0x15a3ec=(_0x1685fa=this[_0x5780fb(0x171)][_0x5780fb(0x17f)](_0x2952b5['unitId'])['find'](_0x20d9d4=>_0x20d9d4[_0x5780fb(0x14d)]===_0x2952b5[_0x5780fb(0x14d)]))==null?void 0x0:_0x1685fa[_0x5780fb(0x17e)];_0x15a3ec&&this[_0x5780fb(0x171)][_0x5780fb(0x1a1)](_0x19ec2c,_0x2dd38a,_0x15a3ec['id'],_0x2952b5['solved']===I[_0x5780fb(0x18a)]);break;}}}));}};_=E([S(0x0,c[_0x4bff12(0x15e)](b[_0x4bff12(0x163)])),S(0x1,c['Inject'](M[_0x4bff12(0x17b)])),S(0x2,c['Inject'](c[_0x4bff12(0x166)])),S(0x3,c[_0x4bff12(0x15e)](c[_0x4bff12(0x140)]))],_);const q=_0x4bff12(0x19d),D={};var A=Object[_0x4bff12(0x190)],x=(_0x46068c,_0x37de42,_0xb272a5,_0x347295)=>{const _0x4711ee=_0x4bff12;for(var _0x3ba1d1=_0x347295>0x1?void 0x0:_0x347295?A(_0x37de42,_0xb272a5):_0x37de42,_0x2efd98=_0x46068c[_0x4711ee(0x168)]-0x1,_0x55d7ef;_0x2efd98>=0x0;_0x2efd98--)(_0x55d7ef=_0x46068c[_0x2efd98])&&(_0x3ba1d1=_0x55d7ef(_0x3ba1d1)||_0x3ba1d1);return _0x3ba1d1;},C=(_0xcdb6f6,_0x269e2b)=>(_0x4b5a1d,_0x159f0d)=>_0x269e2b(_0x4b5a1d,_0x159f0d,_0xcdb6f6);function Y(_0x30343b,_0x14fd29){const _0x3c935e=_0x4bff12,_0x21ae49=_0x30343b[_0x3c935e(0x145)][0x0];return{..._0x14fd29,'id':_0x21ae49['replyId'],'resolved':_0x30343b['solved']===0x1,'dT':f(_0x21ae49[_0x3c935e(0x151)]),'personId':_0x21ae49[_0x3c935e(0x189)],'threadId':_0x21ae49['threadId']};}function G(_0x485786,_0x3688dd,_0x53da58){const _0x2ee07c=_0x4bff12;var _0x4b86bb,_0x88953d;if(((_0x88953d=(_0x4b86bb=_0x485786==null?void 0x0:_0x485786['replies'])==null?void 0x0:_0x4b86bb[_0x2ee07c(0x168)])!=null?_0x88953d:0x0)>0x0){const _0x1d0603=(_0x29eff3,_0x2e0b3c)=>({'id':_0x29eff3[_0x2ee07c(0x19a)],'threadId':_0x29eff3[_0x2ee07c(0x14d)],'dT':f(_0x29eff3[_0x2ee07c(0x151)]),'personId':_0x29eff3[_0x2ee07c(0x189)],'resolved':_0x485786[_0x2ee07c(0x18f)]===I[_0x2ee07c(0x18a)],'unitId':_0x3688dd,'subUnitId':_0x53da58,'text':JSON[_0x2ee07c(0x185)](_0x29eff3['content']),'parentId':_0x2e0b3c}),_0x28adfd=_0x1d0603(_0x485786[_0x2ee07c(0x145)][0x0]);return{..._0x28adfd,'children':_0x485786[_0x2ee07c(0x145)][_0x2ee07c(0x18c)](0x1)[_0x2ee07c(0x138)](_0x3f7387=>_0x1d0603(_0x3f7387,_0x28adfd['id']))};}return null;}let p=class{constructor(_0x2369b6,_0x21224a,_0xa849b4){const _0x61d927=_0x4bff12;this[_0x61d927(0x137)]=_0x2369b6,this['_userService']=_0x21224a,this[_0x61d927(0x146)]=_0xa849b4;}async['addComment'](_0x1d4b56){const _0x4ca033=_0x4bff12;var _0x21abce,_0x4cdf7b;const {parentId:_0x50d86d,unitId:_0x573d6f,text:_0x2fbf57,threadId:_0x3b6dab}=_0x1d4b56,_0x4b31b7=(_0x4cdf7b=(_0x21abce=_0x2fbf57[_0x4ca033(0x16b)])==null?void 0x0:_0x21abce[_0x4ca033(0x1a2)](_0x47d68b=>_0x47d68b['rangeType']===c[_0x4ca033(0x15a)][_0x4ca033(0x19f)])[_0x4ca033(0x138)](_0x10e10f=>_0x10e10f[_0x4ca033(0x13f)]))!=null?_0x4cdf7b:[],_0x5144f4=JSON['stringify'](_0x2fbf57),_0x5c9fd4=(await this[_0x4ca033(0x146)][_0x4ca033(0x143)](_0x573d6f))[_0x4ca033(0x169)]();if(_0x50d86d){const _0x19cb51={'memberId':_0x5c9fd4,'unitId':_0x573d6f,'content':_0x5144f4,'mention':_0x4b31b7,'threadId':_0x3b6dab},_0x395381=(await this[_0x4ca033(0x137)]['post'](_0x4ca033(0x172)+_0x573d6f+_0x4ca033(0x184),{'body':_0x19cb51}))['body'][_0x4ca033(0x1a3)];return{..._0x1d4b56,'id':_0x395381[_0x4ca033(0x19a)],'dT':c['dayjs'](+_0x395381[_0x4ca033(0x151)])[_0x4ca033(0x1a5)](_0x4ca033(0x13c)),'personId':_0x395381[_0x4ca033(0x189)]};}else{const _0x544646={'memberId':_0x5c9fd4,'unitId':_0x573d6f,'content':_0x5144f4,'mention':_0x4b31b7},_0x4143b3=await this['_httpService'][_0x4ca033(0x196)](_0x4ca033(0x172)+_0x573d6f+_0x4ca033(0x139),{'body':_0x544646});return Y(_0x4143b3[_0x4ca033(0x131)][_0x4ca033(0x154)],_0x1d4b56);}}async[_0x4bff12(0x179)](_0x11d07c){const _0x5b5a08=_0x4bff12;var _0x1a9705,_0x2283c8;const {text:_0x341bac,unitId:_0x558414}=_0x11d07c,_0x1b019d=(_0x2283c8=(_0x1a9705=_0x341bac['customRanges'])==null?void 0x0:_0x1a9705[_0x5b5a08(0x1a2)](_0x46176d=>_0x46176d[_0x5b5a08(0x16a)]===c[_0x5b5a08(0x15a)][_0x5b5a08(0x19f)])[_0x5b5a08(0x138)](_0x4da16e=>_0x4da16e[_0x5b5a08(0x13f)]))!=null?_0x2283c8:[],_0x1f0dc7=JSON[_0x5b5a08(0x170)](_0x341bac),_0x4410c5=_0x11d07c[_0x5b5a08(0x14d)],_0x3ca959=_0x11d07c['id'],_0x51196e={'memberId':(await this[_0x5b5a08(0x146)][_0x5b5a08(0x143)](_0x558414))[_0x5b5a08(0x169)](),'unitId':_0x558414,'threadId':_0x4410c5,'mention':_0x1b019d,'content':_0x1f0dc7,'replyId':_0x3ca959},_0x46dcb4=await this[_0x5b5a08(0x137)][_0x5b5a08(0x196)](_0x5b5a08(0x172)+_0x558414+_0x5b5a08(0x18b),{'body':_0x51196e});return!_0x46dcb4[_0x5b5a08(0x131)][_0x5b5a08(0x180)]||_0x46dcb4[_0x5b5a08(0x131)][_0x5b5a08(0x180)][_0x5b5a08(0x1a4)]===0x1;}async[_0x4bff12(0x1a1)](_0x1dbd66){const _0x188cbd=_0x4bff12,{unitId:_0x6abf0c}=_0x1dbd66,_0xff84e=_0x1dbd66[_0x188cbd(0x14d)],_0x55f79a={'memberId':this[_0x188cbd(0x133)][_0x188cbd(0x13a)]()[_0x188cbd(0x178)],'unitId':_0x6abf0c,'threadId':_0xff84e,'solved':_0x1dbd66['resolved']?I[_0x188cbd(0x18a)]:I[_0x188cbd(0x158)]},_0x404d0f=await this[_0x188cbd(0x137)][_0x188cbd(0x196)]('/universer-api/comment/unit/'+_0x6abf0c+_0x188cbd(0x148),{'body':_0x55f79a});return!_0x404d0f[_0x188cbd(0x131)][_0x188cbd(0x180)]||_0x404d0f[_0x188cbd(0x131)][_0x188cbd(0x180)][_0x188cbd(0x1a4)]===0x1;}async[_0x4bff12(0x175)](_0xd275b5,_0x123b36,_0x144b2d,_0x2e3c9f){const _0x2efeb2=_0x4bff12,_0x20b907={'memberId':(await this[_0x2efeb2(0x146)][_0x2efeb2(0x143)](_0xd275b5))[_0x2efeb2(0x169)](),'threadId':_0x144b2d,'replyId':_0x2e3c9f,'unitId':_0xd275b5},_0x41f9f6=await this['_httpService']['post'](_0x2efeb2(0x172)+_0xd275b5+_0x2efeb2(0x16f),{'body':_0x20b907});return!_0x41f9f6['body'][_0x2efeb2(0x180)]||_0x41f9f6[_0x2efeb2(0x131)][_0x2efeb2(0x180)][_0x2efeb2(0x1a4)]===0x1;}async[_0x4bff12(0x177)](_0x39cf12,_0x23cc12,_0x14b29b){const _0x510128=_0x4bff12,_0x95e6ef={'unitId':_0x39cf12,'threadId':_0x14b29b},_0x369f74=await this[_0x510128(0x137)][_0x510128(0x196)](_0x510128(0x172)+_0x39cf12+_0x510128(0x167),{'body':_0x95e6ef}),_0x5395fa=_0x14b29b[_0x510128(0x138)](_0x155646=>G(_0x369f74[_0x510128(0x131)][_0x510128(0x19c)][_0x155646],_0x39cf12,_0x23cc12))[_0x510128(0x1a2)](Boolean);return Object[_0x510128(0x14f)](_0x369f74[_0x510128(0x131)][_0x510128(0x161)])[_0x510128(0x18d)](_0xafaf26=>{const _0x66110e=_0x510128;this[_0x66110e(0x133)][_0x66110e(0x13b)](_0xafaf26);}),_0x5395fa;}['saveCommentToSnapshot'](_0x41831d){return{'id':_0x41831d['id'],'threadId':_0x41831d['threadId'],'ref':_0x41831d['ref']};}};p=x([C(0x0,c[_0x4bff12(0x15e)](P['HTTPService'])),C(0x1,c[_0x4bff12(0x15e)](c[_0x4bff12(0x166)])),C(0x2,c[_0x4bff12(0x15e)](b[_0x4bff12(0x183)]))],p);var H=Object[_0x4bff12(0x190)],J=(_0x1125f8,_0x184503,_0x1ba075,_0x2bc155)=>{const _0x4530c5=_0x4bff12;for(var _0x39fbb1=_0x2bc155>0x1?void 0x0:_0x2bc155?H(_0x184503,_0x1ba075):_0x184503,_0x2be498=_0x1125f8[_0x4530c5(0x168)]-0x1,_0x420257;_0x2be498>=0x0;_0x2be498--)(_0x420257=_0x1125f8[_0x2be498])&&(_0x39fbb1=_0x420257(_0x39fbb1)||_0x39fbb1);return _0x39fbb1;},y=(_0x28a309,_0x3557cc)=>(_0x2551b9,_0x51481e)=>_0x3557cc(_0x2551b9,_0x51481e,_0x28a309);let g=class extends c['Disposable']{constructor(_0x221195,_0x3c6e05){const _0x51a9d7=_0x4bff12;super(),this['_threadCommentDataSourceService']=_0x221195,this[_0x51a9d7(0x136)]=_0x3c6e05,this[_0x51a9d7(0x14c)]();}[_0x4bff12(0x14c)](){const _0x1834a5=_0x4bff12;this[_0x1834a5(0x152)]['dataSource']=this[_0x1834a5(0x136)],this[_0x1834a5(0x152)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4bff12(0x149)]),y(0x1,c['Inject'](p))],g);var F=Object['defineProperty'],L=Object[_0x4bff12(0x190)],Z=(_0x6f3048,_0x4cf2b4,_0x27a6d4)=>_0x4cf2b4 in _0x6f3048?F(_0x6f3048,_0x4cf2b4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x27a6d4}):_0x6f3048[_0x4cf2b4]=_0x27a6d4,W=(_0x11e8af,_0x5ab9dd,_0x32ad18,_0x43f655)=>{const _0x3f8dd4=_0x4bff12;for(var _0x110160=_0x43f655>0x1?void 0x0:_0x43f655?L(_0x5ab9dd,_0x32ad18):_0x5ab9dd,_0x2a1500=_0x11e8af[_0x3f8dd4(0x168)]-0x1,_0x135241;_0x2a1500>=0x0;_0x2a1500--)(_0x135241=_0x11e8af[_0x2a1500])&&(_0x110160=_0x135241(_0x110160)||_0x110160);return _0x110160;},O=(_0x57a9f8,_0xaa1cdf)=>(_0x50b3f7,_0x229668)=>_0xaa1cdf(_0x50b3f7,_0x229668,_0x57a9f8),N=(_0x142ef8,_0x525a45,_0x5e3ec3)=>Z(_0x142ef8,typeof _0x525a45!=_0x4bff12(0x173)?_0x525a45+'':_0x525a45,_0x5e3ec3);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4bff12(0x15d)]{constructor(_0x2e0549=D,_0xccc06a,_0x1dae27){const _0x594076=_0x4bff12;super(),this['_config']=_0x2e0549,this['_injector']=_0xccc06a,this[_0x594076(0x16d)]=_0x1dae27;const {..._0x48d92f}=c[_0x594076(0x155)]({},D,this['_config']);this[_0x594076(0x16d)][_0x594076(0x130)](q,_0x48d92f);}[_0x4bff12(0x13e)](){const _0x3ec8fd=_0x4bff12;[[p],[g],[_]][_0x3ec8fd(0x18d)](_0x46f40f=>{const _0x3ebb76=_0x3ec8fd;this[_0x3ebb76(0x12e)][_0x3ebb76(0x142)](_0x46f40f);});}['onReady'](){const _0x27153c=_0x4bff12;this[_0x27153c(0x12e)]['get'](g),this[_0x27153c(0x12e)][_0x27153c(0x15b)](_);}},N(exports[_0x4bff12(0x12f)],'pluginName',U),N(exports[_0x4bff12(0x12f)],_0x4bff12(0x165),c[_0x4bff12(0x182)][_0x4bff12(0x1a0)]),exports[_0x4bff12(0x12f)]=W([c[_0x4bff12(0x153)](w[_0x4bff12(0x134)],b[_0x4bff12(0x14b)],T[_0x4bff12(0x132)]),O(0x1,c['Inject'](c[_0x4bff12(0x140)])),O(0x2,c[_0x4bff12(0x198)])],exports[_0x4bff12(0x12f)]);
1
+ 'use strict';const _0x5e36c2=_0x3d7d;(function(_0x3ef869,_0xa6fc9e){const _0x2f84f4=_0x3d7d,_0x3822e1=_0x3ef869();while(!![]){try{const _0x444e90=-parseInt(_0x2f84f4(0x14c))/0x1*(-parseInt(_0x2f84f4(0x148))/0x2)+parseInt(_0x2f84f4(0x154))/0x3*(-parseInt(_0x2f84f4(0x19c))/0x4)+parseInt(_0x2f84f4(0x19b))/0x5+-parseInt(_0x2f84f4(0x198))/0x6+-parseInt(_0x2f84f4(0x13c))/0x7*(parseInt(_0x2f84f4(0x17f))/0x8)+parseInt(_0x2f84f4(0x1a9))/0x9+-parseInt(_0x2f84f4(0x142))/0xa*(-parseInt(_0x2f84f4(0x199))/0xb);if(_0x444e90===_0xa6fc9e)break;else _0x3822e1['push'](_0x3822e1['shift']());}catch(_0x5add35){_0x3822e1['push'](_0x3822e1['shift']());}}}(_0x4c3c,0xc0717));Object[_0x5e36c2(0x15a)](exports,Symbol[_0x5e36c2(0x15f)],{'value':_0x5e36c2(0x143)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x5e36c2(0x157);var I=(_0x8a4f48=>(_0x8a4f48[_0x8a4f48[_0x5e36c2(0x176)]=0x0]=_0x5e36c2(0x176),_0x8a4f48[_0x8a4f48[_0x5e36c2(0x193)]=0x1]=_0x5e36c2(0x193),_0x8a4f48[_0x8a4f48[_0x5e36c2(0x162)]=-0x1]=_0x5e36c2(0x162),_0x8a4f48))(I||{}),v=(_0x5b12af=>(_0x5b12af[_0x5b12af[_0x5e36c2(0x1ab)]=0x0]=_0x5e36c2(0x1ab),_0x5b12af[_0x5b12af['Add']=0x1]='Add',_0x5b12af[_0x5b12af[_0x5e36c2(0x1a6)]=0x2]=_0x5e36c2(0x1a6),_0x5b12af[_0x5b12af[_0x5e36c2(0x136)]=0x3]=_0x5e36c2(0x136),_0x5b12af[_0x5b12af[_0x5e36c2(0x179)]=0x4]=_0x5e36c2(0x179),_0x5b12af[_0x5b12af[_0x5e36c2(0x16c)]=0x5]=_0x5e36c2(0x16c),_0x5b12af[_0x5b12af[_0x5e36c2(0x162)]=-0x1]='UNRECOGNIZED',_0x5b12af))(v||{});const f=_0x2f5e8e=>c[_0x5e36c2(0x167)](new Date(+_0x2f5e8e))['format'](_0x5e36c2(0x14d)),R=async(_0x4783c7,_0x4dcbae)=>{const _0x1b500c=_0x5e36c2,_0x13a68b=_0x4783c7[_0x1b500c(0x190)](c['UserManagerService']),_0x4327da=_0x4783c7[_0x1b500c(0x190)](P[_0x1b500c(0x195)]);_0x4dcbae[_0x1b500c(0x163)](_0xfbb20=>{const _0x55fe2c=_0x1b500c;_0x13a68b[_0x55fe2c(0x1a7)](_0xfbb20)&&_0x4dcbae[_0x55fe2c(0x185)](_0xfbb20);}),_0x4dcbae[_0x1b500c(0x180)]&&(await _0x4327da['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x4dcbae]}}))['body'][_0x1b500c(0x18c)][_0x1b500c(0x163)](_0x30114a=>{const _0x9cbd3d=_0x1b500c;_0x30114a&&_0x13a68b[_0x9cbd3d(0x172)](_0x30114a);});};var $=Object[_0x5e36c2(0x155)],E=(_0x5c803d,_0xb34460,_0x1eb76f,_0x3c59de)=>{const _0x482e2b=_0x5e36c2;for(var _0x4d41d8=_0x3c59de>0x1?void 0x0:_0x3c59de?$(_0xb34460,_0x1eb76f):_0xb34460,_0x22abcd=_0x5c803d[_0x482e2b(0x14a)]-0x1,_0x1ff063;_0x22abcd>=0x0;_0x22abcd--)(_0x1ff063=_0x5c803d[_0x22abcd])&&(_0x4d41d8=_0x1ff063(_0x4d41d8)||_0x4d41d8);return _0x4d41d8;},S=(_0x1614e2,_0x467985)=>(_0x5bac98,_0x66ded6)=>_0x467985(_0x5bac98,_0x66ded6,_0x1614e2);let _=class extends c[_0x5e36c2(0x166)]{constructor(_0x2d246e,_0x22f36a,_0x347b37,_0x51cdd5){const _0x1ce51e=_0x5e36c2;super(),this['_commentService']=_0x2d246e,this['_threadCommentModel']=_0x22f36a,this[_0x1ce51e(0x145)]=_0x347b37,this[_0x1ce51e(0x147)]=_0x51cdd5,this['_init'](),this[_0x1ce51e(0x184)]();}['_initUserSync'](){const _0x1d5842=_0x5e36c2;this[_0x1d5842(0x160)](this[_0x1d5842(0x1aa)]['commentUpdate$'][_0x1d5842(0x159)](j[_0x1d5842(0x13e)](0x10))['subscribe'](_0x882f9e=>{const _0x1d13c0=_0x1d5842,_0x2a9233=new Set();_0x882f9e[_0x1d13c0(0x163)](_0x3685a9=>{const _0xe83d67=_0x1d13c0;switch(_0x3685a9['type']){case _0xe83d67(0x188):{const _0x482e18=_0x3685a9[_0xe83d67(0x1a4)][_0xe83d67(0x1a0)];_0x2a9233[_0xe83d67(0x188)](_0x482e18);break;}}}),R(this['_injector'],_0x2a9233);}));}['_init'](){const _0x4ee6ef=_0x5e36c2;this[_0x4ee6ef(0x160)](this[_0x4ee6ef(0x19f)]['commentUpdate$'][_0x4ee6ef(0x17c)](async _0x337eda=>{const _0x165214=_0x4ee6ef;var _0x433bb7,_0xa8bfa5,_0x2c9533,_0x5ee004;const _0x50de09=(_0x433bb7=this[_0x165214(0x1aa)][_0x165214(0x181)](_0x337eda['unitId'])[_0x165214(0x177)](_0x31932b=>_0x31932b['threadId']===_0x337eda[_0x165214(0x141)]))==null?void 0x0:_0x433bb7[_0x165214(0x165)];if(!_0x50de09)return;const {unitId:_0x1651a9,subUnitId:_0x3654eb}=_0x50de09;switch(_0x337eda[_0x165214(0x140)]&&this[_0x165214(0x145)][_0x165214(0x172)](_0x337eda[_0x165214(0x140)]),_0x337eda[_0x165214(0x16e)]){case v[_0x165214(0x189)]:break;case v[_0x165214(0x1a6)]:{this[_0x165214(0x1aa)]['addComment'](_0x1651a9,_0x3654eb,{'unitId':_0x1651a9,'subUnitId':_0x3654eb,'ref':'','id':_0x337eda['replyId'],'dT':f(+_0x337eda[_0x165214(0x1af)]),'threadId':_0x337eda[_0x165214(0x141)],'personId':(_0x2c9533=(_0xa8bfa5=_0x337eda[_0x165214(0x140)])==null?void 0x0:_0xa8bfa5[_0x165214(0x153)])!=null?_0x2c9533:_0x337eda[_0x165214(0x1a1)],'text':JSON[_0x165214(0x1ac)](_0x337eda[_0x165214(0x19e)]),'parentId':_0x50de09['id']});break;}case v[_0x165214(0x179)]:{const _0x25dd5d=this[_0x165214(0x1aa)]['getComment'](_0x1651a9,_0x3654eb,_0x337eda['replyId']);_0x25dd5d&&_0x25dd5d[_0x165214(0x156)]&&this[_0x165214(0x1aa)][_0x165214(0x196)](_0x1651a9,_0x3654eb,_0x337eda[_0x165214(0x187)]);break;}case v['Edit']:{this[_0x165214(0x1aa)]['updateComment'](_0x1651a9,_0x3654eb,{'commentId':_0x337eda[_0x165214(0x187)],'text':JSON[_0x165214(0x1ac)](_0x337eda[_0x165214(0x19e)])});break;}case v[_0x165214(0x16c)]:{const _0x1c8b07=(_0x5ee004=this[_0x165214(0x1aa)]['getUnit'](_0x337eda[_0x165214(0x17a)])[_0x165214(0x177)](_0x7ab352=>_0x7ab352[_0x165214(0x141)]===_0x337eda['threadId']))==null?void 0x0:_0x5ee004[_0x165214(0x165)];_0x1c8b07&&this['_threadCommentModel'][_0x165214(0x182)](_0x1651a9,_0x3654eb,_0x1c8b07['id'],_0x337eda[_0x165214(0x178)]===I[_0x165214(0x193)]);break;}}}));}};function _0x4c3c(){const _0x223fe3=['pluginName','26272cnikgl','size','getUnit','resolveComment','UniverLicensePlugin','_initUserSync','delete','setConfig','replyId','add','Add','listComments','requireSession','users','_configService','UniverThreadCommentDataSourcePlugin','stringify','get','CollaborationSessionService','rangeType','Solved','code','HTTPService','deleteComment','resolved','9404964aLNIYa','16027913jVDBlf','_threadCommentDataSource','2321765wjDkkr','4AZrtSy','updateComment','content','_commentService','personId','userId','post','CommentService','payload','format','Reply','getUser','_initDataSource','9770346iZBvKJ','_threadCommentModel','Unknown','parse','addComment','error','createTimestamp','Edit','onStarting','onReady','getMemberID','symbol','Inject','1722ZxUczF','ref','bufferTime','UniverInstanceType','user','threadId','10NjqaVV','Module','filter','_userService','Plugin','_injector','6NPqlhE','/list','length','body','329542DVaGcy','YYYY/MM/DD\x20HH:mm','comment','/universer-api/comment/unit/','rangeId','merge','UserManagerService','userID','2496153iWStTF','getOwnPropertyDescriptor','parentId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','pipe','defineProperty','UniverCollaborationClientPlugin','comments','Injector','/solved','toStringTag','disposeWithMe','COMMENT','UNRECOGNIZED','forEach','replies','root','Disposable','dayjs','_config','IThreadCommentDataSourceService','dataSource','slice','Solve','/reply','type','CustomRangeType','thread-comment-data-source.config','_sessionService','addUser','DependentOn','_httpService','_threadCommentDataSourceService','OpenOrReOpen','find','solved','Delete','unitId','syncUpdateMutationToColla','subscribe','reply'];_0x4c3c=function(){return _0x223fe3;};return _0x4c3c();}_=E([S(0x0,c[_0x5e36c2(0x13b)](b[_0x5e36c2(0x1a3)])),S(0x1,c[_0x5e36c2(0x13b)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x5e36c2(0x152)])),S(0x3,c[_0x5e36c2(0x13b)](c[_0x5e36c2(0x15d)]))],_);const q=_0x5e36c2(0x170),D={};var A=Object[_0x5e36c2(0x155)],x=(_0x349f9f,_0x15402d,_0x574a9b,_0x45c323)=>{const _0x1ed8a0=_0x5e36c2;for(var _0x2fd61c=_0x45c323>0x1?void 0x0:_0x45c323?A(_0x15402d,_0x574a9b):_0x15402d,_0x403ce4=_0x349f9f[_0x1ed8a0(0x14a)]-0x1,_0x337bfc;_0x403ce4>=0x0;_0x403ce4--)(_0x337bfc=_0x349f9f[_0x403ce4])&&(_0x2fd61c=_0x337bfc(_0x2fd61c)||_0x2fd61c);return _0x2fd61c;},C=(_0x5dcd64,_0x3680a5)=>(_0xb5b9f6,_0x1254fe)=>_0x3680a5(_0xb5b9f6,_0x1254fe,_0x5dcd64);function Y(_0x19422a,_0x12c3c9){const _0x4cf86e=_0x5e36c2,_0x26080a=_0x19422a[_0x4cf86e(0x164)][0x0];return{..._0x12c3c9,'id':_0x26080a[_0x4cf86e(0x187)],'resolved':_0x19422a['solved']===0x1,'dT':f(_0x26080a[_0x4cf86e(0x1af)]),'personId':_0x26080a['userId'],'threadId':_0x26080a[_0x4cf86e(0x141)]};}function G(_0xc0a4,_0x490916,_0x1462ac){const _0x3b3d71=_0x5e36c2;var _0x3b0ddd,_0x556a13;if(((_0x556a13=(_0x3b0ddd=_0xc0a4==null?void 0x0:_0xc0a4[_0x3b3d71(0x164)])==null?void 0x0:_0x3b0ddd['length'])!=null?_0x556a13:0x0)>0x0){const _0x2537b0=(_0x368388,_0x1064da)=>({'id':_0x368388[_0x3b3d71(0x187)],'threadId':_0x368388[_0x3b3d71(0x141)],'dT':f(_0x368388[_0x3b3d71(0x1af)]),'personId':_0x368388['userId'],'resolved':_0xc0a4[_0x3b3d71(0x178)]===I[_0x3b3d71(0x193)],'unitId':_0x490916,'subUnitId':_0x1462ac,'text':JSON[_0x3b3d71(0x1ac)](_0x368388['content']),'parentId':_0x1064da}),_0x200d95=_0x2537b0(_0xc0a4[_0x3b3d71(0x164)][0x0]);return{..._0x200d95,'children':_0xc0a4[_0x3b3d71(0x164)][_0x3b3d71(0x16b)](0x1)[_0x3b3d71(0x158)](_0x334c8e=>_0x2537b0(_0x334c8e,_0x200d95['id']))};}return null;}let p=class{constructor(_0x5e7dba,_0x4c3471,_0x590ffb){const _0x320ee3=_0x5e36c2;this[_0x320ee3(0x174)]=_0x5e7dba,this[_0x320ee3(0x145)]=_0x4c3471,this['_sessionService']=_0x590ffb;}async[_0x5e36c2(0x1ad)](_0x58bc6d){const _0x3d0ba0=_0x5e36c2;var _0x3291e6,_0x273b6d;const {parentId:_0x40d935,unitId:_0x3fd172,text:_0x38625c,threadId:_0x2feeb1}=_0x58bc6d,_0x19dcd4=(_0x273b6d=(_0x3291e6=_0x38625c['customRanges'])==null?void 0x0:_0x3291e6[_0x3d0ba0(0x144)](_0x3db06c=>_0x3db06c['rangeType']===c[_0x3d0ba0(0x16f)][_0x3d0ba0(0x161)])[_0x3d0ba0(0x158)](_0x808bfb=>_0x808bfb[_0x3d0ba0(0x150)]))!=null?_0x273b6d:[],_0x83d8b4=JSON[_0x3d0ba0(0x18f)](_0x38625c),_0x3d724f=(await this[_0x3d0ba0(0x171)][_0x3d0ba0(0x18b)](_0x3fd172))[_0x3d0ba0(0x139)]();if(_0x40d935){const _0x52deb0={'memberId':_0x3d724f,'unitId':_0x3fd172,'content':_0x83d8b4,'mention':_0x19dcd4,'threadId':_0x2feeb1},_0x2ffdda=(await this[_0x3d0ba0(0x174)][_0x3d0ba0(0x1a2)](_0x3d0ba0(0x14f)+_0x3fd172+_0x3d0ba0(0x16d),{'body':_0x52deb0}))[_0x3d0ba0(0x14b)][_0x3d0ba0(0x17d)];return{..._0x58bc6d,'id':_0x2ffdda['replyId'],'dT':c[_0x3d0ba0(0x167)](+_0x2ffdda['createTimestamp'])[_0x3d0ba0(0x1a5)](_0x3d0ba0(0x14d)),'personId':_0x2ffdda[_0x3d0ba0(0x1a1)]};}else{const _0xf08d96={'memberId':_0x3d724f,'unitId':_0x3fd172,'content':_0x83d8b4,'mention':_0x19dcd4},_0x6b2bef=await this[_0x3d0ba0(0x174)]['post'](_0x3d0ba0(0x14f)+_0x3fd172+'/add',{'body':_0xf08d96});return Y(_0x6b2bef['body'][_0x3d0ba0(0x14e)],_0x58bc6d);}}async[_0x5e36c2(0x19d)](_0xd6d4ba){const _0x15c040=_0x5e36c2;var _0x20da07,_0x262a4b;const {text:_0x2f7820,unitId:_0x3571e7}=_0xd6d4ba,_0x5ce69a=(_0x262a4b=(_0x20da07=_0x2f7820['customRanges'])==null?void 0x0:_0x20da07['filter'](_0x2f88ec=>_0x2f88ec[_0x15c040(0x192)]===c[_0x15c040(0x16f)][_0x15c040(0x161)])[_0x15c040(0x158)](_0x224875=>_0x224875[_0x15c040(0x150)]))!=null?_0x262a4b:[],_0x1d8dbf=JSON['stringify'](_0x2f7820),_0x54b883=_0xd6d4ba['threadId'],_0x48ef62=_0xd6d4ba['id'],_0x53b2a1={'memberId':(await this[_0x15c040(0x171)][_0x15c040(0x18b)](_0x3571e7))[_0x15c040(0x139)](),'unitId':_0x3571e7,'threadId':_0x54b883,'mention':_0x5ce69a,'content':_0x1d8dbf,'replyId':_0x48ef62},_0x25fd97=await this[_0x15c040(0x174)][_0x15c040(0x1a2)]('/universer-api/comment/unit/'+_0x3571e7+'/edit',{'body':_0x53b2a1});return!_0x25fd97[_0x15c040(0x14b)][_0x15c040(0x1ae)]||_0x25fd97[_0x15c040(0x14b)][_0x15c040(0x1ae)]['code']===0x1;}async[_0x5e36c2(0x182)](_0x560a27){const _0x5612ca=_0x5e36c2,{unitId:_0x2fe0a0}=_0x560a27,_0x8c13a5=_0x560a27[_0x5612ca(0x141)],_0x2e274d={'memberId':this[_0x5612ca(0x145)]['getCurrentUser']()[_0x5612ca(0x153)],'unitId':_0x2fe0a0,'threadId':_0x8c13a5,'solved':_0x560a27[_0x5612ca(0x197)]?I[_0x5612ca(0x193)]:I[_0x5612ca(0x176)]},_0x588f8f=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2fe0a0+_0x5612ca(0x15e),{'body':_0x2e274d});return!_0x588f8f[_0x5612ca(0x14b)]['error']||_0x588f8f['body']['error'][_0x5612ca(0x194)]===0x1;}async[_0x5e36c2(0x196)](_0x20ebd0,_0x99eb1b,_0x33492b,_0x158c47){const _0xc720eb=_0x5e36c2,_0x19eac4={'memberId':(await this[_0xc720eb(0x171)][_0xc720eb(0x18b)](_0x20ebd0))[_0xc720eb(0x139)](),'threadId':_0x33492b,'replyId':_0x158c47,'unitId':_0x20ebd0},_0x192e0f=await this[_0xc720eb(0x174)][_0xc720eb(0x1a2)](_0xc720eb(0x14f)+_0x20ebd0+'/delete',{'body':_0x19eac4});return!_0x192e0f['body']['error']||_0x192e0f[_0xc720eb(0x14b)]['error']['code']===0x1;}async[_0x5e36c2(0x18a)](_0xeb0ae4,_0x3258ee,_0x5c25f7){const _0x230533=_0x5e36c2,_0x5992c4={'unitId':_0xeb0ae4,'threadId':_0x5c25f7},_0x2137d1=await this[_0x230533(0x174)][_0x230533(0x1a2)]('/universer-api/comment/unit/'+_0xeb0ae4+_0x230533(0x149),{'body':_0x5992c4}),_0x121230=_0x5c25f7['map'](_0x4b5248=>G(_0x2137d1[_0x230533(0x14b)][_0x230533(0x15c)][_0x4b5248],_0xeb0ae4,_0x3258ee))[_0x230533(0x144)](Boolean);return Object['values'](_0x2137d1[_0x230533(0x14b)][_0x230533(0x18c)])['forEach'](_0x7ec268=>{const _0x3871be=_0x230533;this[_0x3871be(0x145)]['addUser'](_0x7ec268);}),_0x121230;}['saveCommentToSnapshot'](_0x5794f0){const _0xe0009=_0x5e36c2;return{'id':_0x5794f0['id'],'threadId':_0x5794f0[_0xe0009(0x141)],'ref':_0x5794f0[_0xe0009(0x13d)]};}};p=x([C(0x0,c[_0x5e36c2(0x13b)](P['HTTPService'])),C(0x1,c[_0x5e36c2(0x13b)](c[_0x5e36c2(0x152)])),C(0x2,c['Inject'](b[_0x5e36c2(0x191)]))],p);function _0x3d7d(_0x591760,_0x32c773){const _0x4c3c53=_0x4c3c();return _0x3d7d=function(_0x3d7d3f,_0x3eebe8){_0x3d7d3f=_0x3d7d3f-0x136;let _0x2a4a77=_0x4c3c53[_0x3d7d3f];return _0x2a4a77;},_0x3d7d(_0x591760,_0x32c773);}var H=Object['getOwnPropertyDescriptor'],J=(_0x183f16,_0x5a935f,_0x2b0980,_0x4c26a5)=>{const _0x3cc356=_0x5e36c2;for(var _0x293cbb=_0x4c26a5>0x1?void 0x0:_0x4c26a5?H(_0x5a935f,_0x2b0980):_0x5a935f,_0x7dcb42=_0x183f16[_0x3cc356(0x14a)]-0x1,_0x2f2157;_0x7dcb42>=0x0;_0x7dcb42--)(_0x2f2157=_0x183f16[_0x7dcb42])&&(_0x293cbb=_0x2f2157(_0x293cbb)||_0x293cbb);return _0x293cbb;},y=(_0x58fcc9,_0x28448c)=>(_0x31ceac,_0x492638)=>_0x28448c(_0x31ceac,_0x492638,_0x58fcc9);let g=class extends c[_0x5e36c2(0x166)]{constructor(_0x3a35e4,_0x333771){const _0x369c75=_0x5e36c2;super(),this['_threadCommentDataSourceService']=_0x3a35e4,this[_0x369c75(0x19a)]=_0x333771,this[_0x369c75(0x1a8)]();}['_initDataSource'](){const _0x56a675=_0x5e36c2;this[_0x56a675(0x175)][_0x56a675(0x16a)]=this[_0x56a675(0x19a)],this['_threadCommentDataSourceService'][_0x56a675(0x17b)]=!0x1;}};g=J([y(0x0,M[_0x5e36c2(0x169)]),y(0x1,c[_0x5e36c2(0x13b)](p))],g);var F=Object['defineProperty'],L=Object[_0x5e36c2(0x155)],Z=(_0x19a1df,_0x349e8c,_0x1ed548)=>_0x349e8c in _0x19a1df?F(_0x19a1df,_0x349e8c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1ed548}):_0x19a1df[_0x349e8c]=_0x1ed548,W=(_0x2e30eb,_0xce6373,_0x1ffd1e,_0x5fd304)=>{const _0x4345d3=_0x5e36c2;for(var _0x4758a7=_0x5fd304>0x1?void 0x0:_0x5fd304?L(_0xce6373,_0x1ffd1e):_0xce6373,_0xff6eb0=_0x2e30eb[_0x4345d3(0x14a)]-0x1,_0x703532;_0xff6eb0>=0x0;_0xff6eb0--)(_0x703532=_0x2e30eb[_0xff6eb0])&&(_0x4758a7=_0x703532(_0x4758a7)||_0x4758a7);return _0x4758a7;},O=(_0x125e79,_0xc60943)=>(_0xdb842d,_0x1b8956)=>_0xc60943(_0xdb842d,_0x1b8956,_0x125e79),N=(_0x15d2cc,_0x188c5b,_0xe5143b)=>Z(_0x15d2cc,typeof _0x188c5b!=_0x5e36c2(0x13a)?_0x188c5b+'':_0x188c5b,_0xe5143b);exports[_0x5e36c2(0x18e)]=class extends c[_0x5e36c2(0x146)]{constructor(_0x1ad0d6=D,_0x27862b,_0x3eb821){const _0x5abdbc=_0x5e36c2;super(),this[_0x5abdbc(0x168)]=_0x1ad0d6,this[_0x5abdbc(0x147)]=_0x27862b,this[_0x5abdbc(0x18d)]=_0x3eb821;const {..._0x5084fe}=c[_0x5abdbc(0x151)]({},D,this[_0x5abdbc(0x168)]);this[_0x5abdbc(0x18d)][_0x5abdbc(0x186)](q,_0x5084fe);}[_0x5e36c2(0x137)](){[[p],[g],[_]]['forEach'](_0x463771=>{const _0xbd3ac3=_0x3d7d;this[_0xbd3ac3(0x147)][_0xbd3ac3(0x188)](_0x463771);});}[_0x5e36c2(0x138)](){const _0x1efe39=_0x5e36c2;this[_0x1efe39(0x147)][_0x1efe39(0x190)](g),this[_0x1efe39(0x147)][_0x1efe39(0x190)](_);}},N(exports[_0x5e36c2(0x18e)],_0x5e36c2(0x17e),U),N(exports[_0x5e36c2(0x18e)],'type',c[_0x5e36c2(0x13f)]['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x5e36c2(0x173)](w['UniverThreadCommentUIPlugin'],b[_0x5e36c2(0x15b)],T[_0x5e36c2(0x183)]),O(0x1,c['Inject'](c[_0x5e36c2(0x15d)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3603e1=_0x2560;(function(_0xa1537d,_0x11af53){const _0x5ea1e0=_0x2560,_0x147c00=_0xa1537d();while(!![]){try{const _0x1295b0=-parseInt(_0x5ea1e0(0x14f))/0x1*(-parseInt(_0x5ea1e0(0x163))/0x2)+parseInt(_0x5ea1e0(0x12d))/0x3+-parseInt(_0x5ea1e0(0x145))/0x4+parseInt(_0x5ea1e0(0x14d))/0x5+parseInt(_0x5ea1e0(0x132))/0x6+-parseInt(_0x5ea1e0(0x150))/0x7+-parseInt(_0x5ea1e0(0x133))/0x8*(-parseInt(_0x5ea1e0(0x15a))/0x9);if(_0x1295b0===_0x11af53)break;else _0x147c00['push'](_0x147c00['shift']());}catch(_0x5e1b46){_0x147c00['push'](_0x147c00['shift']());}}}(_0x549c,0xb67e9));import{CommentService as _0x5d5f90,CollaborationSessionService as _0x3c4a77,UniverCollaborationClientPlugin as _0x8c2bb9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xd50337}from'@univerjs-pro/license';import{dayjs as _0x2557b7,UserManagerService as _0x2bff43,Inject as _0x4c511f,Injector as _0x130911,Disposable as _0x199a3d,CustomRangeType as _0x729685,UniverInstanceType as _0x4ffa54,DependentOn as _0x414d5d,IConfigService as _0x5d98bf,Plugin as _0x2db651,merge as _0x352425}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5b41d9}from'@univerjs/thread-comment-ui';function _0x549c(){const _0x3b6b96=['addUser','_configService','comment','deleteComment','/edit','pipe','Edit','resolved','2PmucyW','createTimestamp','Solve','parse','YYYY/MM/DD\x20HH:mm','rangeId','_httpService','COMMENT','saveCommentToSnapshot','map','solved','getOwnPropertyDescriptor','pluginName','_userService','unitId','threadId','filter','Solved','replies','customRanges','find','_threadCommentDataSourceService','_initDataSource','userID','size','error','_injector','user','disposeWithMe','UNRECOGNIZED','length','subscribe','root','_sessionService','Unknown','_initUserSync','content','parentId','rangeType','requireSession','OpenOrReOpen','resolveComment','reply','Add','code','ref','getCurrentUser','372465IzKdOn','userId','get','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','868542mHczTj','9946000ooByHz','post','_threadCommentDataSource','setConfig','onReady','/add','_commentService','Reply','slice','/universer-api/comment/unit/','updateComment','values','UNIVER_UNKNOWN','/solved','dataSource','getMemberID','add','delete','4405228HrwoMy','payload','format','stringify','addComment','replyId','_config','body','6636785AdUQxW','_init','319433kXmTug','9171036eFBHMz','getUnit','Delete','forEach','_threadCommentModel','commentUpdate$','personId','/list','type','syncUpdateMutationToColla','9wXcmmx'];_0x549c=function(){return _0x3b6b96;};return _0x549c();}import{ThreadCommentModel as _0x1650d8,IThreadCommentDataSourceService as _0x14c9f4}from'@univerjs/thread-comment';import{bufferTime as _0x33d3a7}from'rxjs';import{HTTPService as _0x4be4d2}from'@univerjs/network';const W=_0x3603e1(0x131);var I=(_0x1e8132=>(_0x1e8132[_0x1e8132[_0x3603e1(0x126)]=0x0]=_0x3603e1(0x126),_0x1e8132[_0x1e8132['Solved']=0x1]='Solved',_0x1e8132[_0x1e8132[_0x3603e1(0x11b)]=-0x1]=_0x3603e1(0x11b),_0x1e8132))(I||{}),v=(_0x45e0db=>(_0x45e0db[_0x45e0db[_0x3603e1(0x120)]=0x0]=_0x3603e1(0x120),_0x45e0db[_0x45e0db[_0x3603e1(0x129)]=0x1]=_0x3603e1(0x129),_0x45e0db[_0x45e0db[_0x3603e1(0x13a)]=0x2]=_0x3603e1(0x13a),_0x45e0db[_0x45e0db[_0x3603e1(0x161)]=0x3]='Edit',_0x45e0db[_0x45e0db[_0x3603e1(0x152)]=0x4]=_0x3603e1(0x152),_0x45e0db[_0x45e0db['Solve']=0x5]=_0x3603e1(0x165),_0x45e0db[_0x45e0db['UNRECOGNIZED']=-0x1]=_0x3603e1(0x11b),_0x45e0db))(v||{});const y=_0x1222d2=>_0x2557b7(new Date(+_0x1222d2))[_0x3603e1(0x147)](_0x3603e1(0x167)),B=async(_0x25f2aa,_0x3668ec)=>{const _0x38f4c6=_0x3603e1,_0x41c345=_0x25f2aa[_0x38f4c6(0x12f)](_0x2bff43),_0xdd090c=_0x25f2aa['get'](_0x4be4d2);_0x3668ec['forEach'](_0x2e82cc=>{const _0x1df16f=_0x38f4c6;_0x41c345['getUser'](_0x2e82cc)&&_0x3668ec[_0x1df16f(0x144)](_0x2e82cc);}),_0x3668ec[_0x38f4c6(0x116)]&&(await _0xdd090c[_0x38f4c6(0x12f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3668ec]}}))[_0x38f4c6(0x14c)][_0x38f4c6(0x130)][_0x38f4c6(0x153)](_0x2449c2=>{_0x2449c2&&_0x41c345['addUser'](_0x2449c2);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x42190c,_0x5cec83,_0x4907dc,_0x5e1cb7)=>{const _0xff9594=_0x3603e1;for(var _0x5e9f88=_0x5e1cb7>0x1?void 0x0:_0x5e1cb7?K(_0x5cec83,_0x4907dc):_0x5cec83,_0x3bca60=_0x42190c[_0xff9594(0x11c)]-0x1,_0x48719c;_0x3bca60>=0x0;_0x3bca60--)(_0x48719c=_0x42190c[_0x3bca60])&&(_0x5e9f88=_0x48719c(_0x5e9f88)||_0x5e9f88);return _0x5e9f88;},p=(_0x2efd0f,_0x28468f)=>(_0x408ca1,_0x15dd41)=>_0x28468f(_0x408ca1,_0x15dd41,_0x2efd0f);let _=class extends _0x199a3d{constructor(_0x39e204,_0x12cd99,_0x35f7d9,_0x18e945){const _0x36e703=_0x3603e1;super(),this[_0x36e703(0x139)]=_0x39e204,this[_0x36e703(0x154)]=_0x12cd99,this[_0x36e703(0x170)]=_0x35f7d9,this[_0x36e703(0x118)]=_0x18e945,this[_0x36e703(0x14e)](),this[_0x36e703(0x121)]();}[_0x3603e1(0x121)](){const _0xaf7b0c=_0x3603e1;this[_0xaf7b0c(0x11a)](this[_0xaf7b0c(0x154)][_0xaf7b0c(0x155)][_0xaf7b0c(0x160)](_0x33d3a7(0x10))['subscribe'](_0x46c702=>{const _0x3db001=_0xaf7b0c,_0x534f63=new Set();_0x46c702[_0x3db001(0x153)](_0x1f1752=>{const _0x32501d=_0x3db001;switch(_0x1f1752[_0x32501d(0x158)]){case _0x32501d(0x143):{const _0x3a6c10=_0x1f1752[_0x32501d(0x146)][_0x32501d(0x156)];_0x534f63[_0x32501d(0x143)](_0x3a6c10);break;}}}),B(this[_0x3db001(0x118)],_0x534f63);}));}['_init'](){const _0x50faa7=_0x3603e1;this[_0x50faa7(0x11a)](this[_0x50faa7(0x139)][_0x50faa7(0x155)][_0x50faa7(0x11d)](async _0x491b86=>{const _0x383228=_0x50faa7;var _0x4cd500,_0x933e87,_0x534ec5,_0x4394c7;const _0x170e0f=(_0x4cd500=this[_0x383228(0x154)][_0x383228(0x151)](_0x491b86[_0x383228(0x171)])[_0x383228(0x112)](_0x55e71a=>_0x55e71a[_0x383228(0x172)]===_0x491b86[_0x383228(0x172)]))==null?void 0x0:_0x4cd500[_0x383228(0x11e)];if(!_0x170e0f)return;const {unitId:_0x300389,subUnitId:_0x33d44e}=_0x170e0f;switch(_0x491b86[_0x383228(0x119)]&&this[_0x383228(0x170)][_0x383228(0x15b)](_0x491b86[_0x383228(0x119)]),_0x491b86[_0x383228(0x158)]){case v['Add']:break;case v[_0x383228(0x13a)]:{this[_0x383228(0x154)][_0x383228(0x149)](_0x300389,_0x33d44e,{'unitId':_0x300389,'subUnitId':_0x33d44e,'ref':'','id':_0x491b86['replyId'],'dT':y(+_0x491b86[_0x383228(0x164)]),'threadId':_0x491b86[_0x383228(0x172)],'personId':(_0x534ec5=(_0x933e87=_0x491b86[_0x383228(0x119)])==null?void 0x0:_0x933e87[_0x383228(0x115)])!=null?_0x534ec5:_0x491b86['userId'],'text':JSON[_0x383228(0x166)](_0x491b86[_0x383228(0x122)]),'parentId':_0x170e0f['id']});break;}case v['Delete']:{const _0x418b2e=this[_0x383228(0x154)]['getComment'](_0x300389,_0x33d44e,_0x491b86[_0x383228(0x14a)]);_0x418b2e&&_0x418b2e[_0x383228(0x123)]&&this['_threadCommentModel'][_0x383228(0x15e)](_0x300389,_0x33d44e,_0x491b86[_0x383228(0x14a)]);break;}case v['Edit']:{this[_0x383228(0x154)][_0x383228(0x13d)](_0x300389,_0x33d44e,{'commentId':_0x491b86[_0x383228(0x14a)],'text':JSON['parse'](_0x491b86[_0x383228(0x122)])});break;}case v[_0x383228(0x165)]:{const _0x578684=(_0x4394c7=this[_0x383228(0x154)][_0x383228(0x151)](_0x491b86[_0x383228(0x171)])['find'](_0x40ea88=>_0x40ea88[_0x383228(0x172)]===_0x491b86['threadId']))==null?void 0x0:_0x4394c7['root'];_0x578684&&this['_threadCommentModel'][_0x383228(0x127)](_0x300389,_0x33d44e,_0x578684['id'],_0x491b86[_0x383228(0x16d)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4c511f(_0x5d5f90)),p(0x1,_0x4c511f(_0x1650d8)),p(0x2,_0x4c511f(_0x2bff43)),p(0x3,_0x4c511f(_0x130911))],_);function _0x2560(_0x347111,_0x5da665){const _0x549c35=_0x549c();return _0x2560=function(_0x25603c,_0x2dc82c){_0x25603c=_0x25603c-0x111;let _0x23ac25=_0x549c35[_0x25603c];return _0x23ac25;},_0x2560(_0x347111,_0x5da665);}const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5bdaee,_0x255f8f,_0x2a2ca5,_0x15aaa5)=>{for(var _0x45c161=_0x15aaa5>0x1?void 0x0:_0x15aaa5?k(_0x255f8f,_0x2a2ca5):_0x255f8f,_0x3a6252=_0x5bdaee['length']-0x1,_0x1d8bd2;_0x3a6252>=0x0;_0x3a6252--)(_0x1d8bd2=_0x5bdaee[_0x3a6252])&&(_0x45c161=_0x1d8bd2(_0x45c161)||_0x45c161);return _0x45c161;},b=(_0x9fdc32,_0x2f9aeb)=>(_0x29a17d,_0x40315d)=>_0x2f9aeb(_0x29a17d,_0x40315d,_0x9fdc32);function X(_0x387955,_0x8fc331){const _0x36d2f5=_0x3603e1,_0x257eeb=_0x387955[_0x36d2f5(0x175)][0x0];return{..._0x8fc331,'id':_0x257eeb[_0x36d2f5(0x14a)],'resolved':_0x387955['solved']===0x1,'dT':y(_0x257eeb[_0x36d2f5(0x164)]),'personId':_0x257eeb['userId'],'threadId':_0x257eeb[_0x36d2f5(0x172)]};}function ee(_0x242bc8,_0x1a5118,_0x5c8298){const _0x2476dc=_0x3603e1;var _0x20f65a,_0x4ded9c;if(((_0x4ded9c=(_0x20f65a=_0x242bc8==null?void 0x0:_0x242bc8['replies'])==null?void 0x0:_0x20f65a[_0x2476dc(0x11c)])!=null?_0x4ded9c:0x0)>0x0){const _0x402548=(_0x4ae8c7,_0x314035)=>({'id':_0x4ae8c7[_0x2476dc(0x14a)],'threadId':_0x4ae8c7[_0x2476dc(0x172)],'dT':y(_0x4ae8c7[_0x2476dc(0x164)]),'personId':_0x4ae8c7[_0x2476dc(0x12e)],'resolved':_0x242bc8[_0x2476dc(0x16d)]===I[_0x2476dc(0x174)],'unitId':_0x1a5118,'subUnitId':_0x5c8298,'text':JSON[_0x2476dc(0x166)](_0x4ae8c7[_0x2476dc(0x122)]),'parentId':_0x314035}),_0x2abd8f=_0x402548(_0x242bc8[_0x2476dc(0x175)][0x0]);return{..._0x2abd8f,'children':_0x242bc8['replies'][_0x2476dc(0x13b)](0x1)[_0x2476dc(0x16c)](_0x5ab63b=>_0x402548(_0x5ab63b,_0x2abd8f['id']))};}return null;}let S=class{constructor(_0x38b591,_0x12135c,_0x43adcc){const _0x1bd914=_0x3603e1;this['_httpService']=_0x38b591,this[_0x1bd914(0x170)]=_0x12135c,this[_0x1bd914(0x11f)]=_0x43adcc;}async[_0x3603e1(0x149)](_0x576602){const _0x5d6350=_0x3603e1;var _0x49b212,_0x5030d4;const {parentId:_0x2eee08,unitId:_0x2e627e,text:_0x53aa84,threadId:_0x5e5adf}=_0x576602,_0xe0a2b0=(_0x5030d4=(_0x49b212=_0x53aa84[_0x5d6350(0x111)])==null?void 0x0:_0x49b212['filter'](_0x5a2df8=>_0x5a2df8[_0x5d6350(0x124)]===_0x729685[_0x5d6350(0x16a)])[_0x5d6350(0x16c)](_0x3a8dab=>_0x3a8dab[_0x5d6350(0x168)]))!=null?_0x5030d4:[],_0x2b50ac=JSON[_0x5d6350(0x148)](_0x53aa84),_0x4b0364=(await this[_0x5d6350(0x11f)][_0x5d6350(0x125)](_0x2e627e))['getMemberID']();if(_0x2eee08){const _0x1e1567={'memberId':_0x4b0364,'unitId':_0x2e627e,'content':_0x2b50ac,'mention':_0xe0a2b0,'threadId':_0x5e5adf},_0x29a066=(await this['_httpService'][_0x5d6350(0x134)]('/universer-api/comment/unit/'+_0x2e627e+'/reply',{'body':_0x1e1567}))[_0x5d6350(0x14c)][_0x5d6350(0x128)];return{..._0x576602,'id':_0x29a066[_0x5d6350(0x14a)],'dT':_0x2557b7(+_0x29a066['createTimestamp'])[_0x5d6350(0x147)](_0x5d6350(0x167)),'personId':_0x29a066[_0x5d6350(0x12e)]};}else{const _0x3a8725={'memberId':_0x4b0364,'unitId':_0x2e627e,'content':_0x2b50ac,'mention':_0xe0a2b0},_0x12b2f1=await this['_httpService'][_0x5d6350(0x134)]('/universer-api/comment/unit/'+_0x2e627e+_0x5d6350(0x138),{'body':_0x3a8725});return X(_0x12b2f1['body'][_0x5d6350(0x15d)],_0x576602);}}async[_0x3603e1(0x13d)](_0x7e24d7){const _0x36aeb4=_0x3603e1;var _0x562efe,_0x46c781;const {text:_0x5587f3,unitId:_0x28913b}=_0x7e24d7,_0xcd73c7=(_0x46c781=(_0x562efe=_0x5587f3[_0x36aeb4(0x111)])==null?void 0x0:_0x562efe[_0x36aeb4(0x173)](_0x3950b1=>_0x3950b1[_0x36aeb4(0x124)]===_0x729685[_0x36aeb4(0x16a)])[_0x36aeb4(0x16c)](_0x543c22=>_0x543c22['rangeId']))!=null?_0x46c781:[],_0x50513b=JSON['stringify'](_0x5587f3),_0x2d8946=_0x7e24d7[_0x36aeb4(0x172)],_0x5e1fcb=_0x7e24d7['id'],_0x309c07={'memberId':(await this[_0x36aeb4(0x11f)][_0x36aeb4(0x125)](_0x28913b))['getMemberID'](),'unitId':_0x28913b,'threadId':_0x2d8946,'mention':_0xcd73c7,'content':_0x50513b,'replyId':_0x5e1fcb},_0x316bde=await this[_0x36aeb4(0x169)][_0x36aeb4(0x134)]('/universer-api/comment/unit/'+_0x28913b+_0x36aeb4(0x15f),{'body':_0x309c07});return!_0x316bde['body']['error']||_0x316bde[_0x36aeb4(0x14c)][_0x36aeb4(0x117)][_0x36aeb4(0x12a)]===0x1;}async[_0x3603e1(0x127)](_0x17a72c){const _0x564f23=_0x3603e1,{unitId:_0x417c84}=_0x17a72c,_0x49e65b=_0x17a72c[_0x564f23(0x172)],_0x2e6561={'memberId':this[_0x564f23(0x170)][_0x564f23(0x12c)]()[_0x564f23(0x115)],'unitId':_0x417c84,'threadId':_0x49e65b,'solved':_0x17a72c[_0x564f23(0x162)]?I['Solved']:I[_0x564f23(0x126)]},_0x370a85=await this[_0x564f23(0x169)]['post'](_0x564f23(0x13c)+_0x417c84+_0x564f23(0x140),{'body':_0x2e6561});return!_0x370a85[_0x564f23(0x14c)]['error']||_0x370a85[_0x564f23(0x14c)][_0x564f23(0x117)][_0x564f23(0x12a)]===0x1;}async['deleteComment'](_0x526e13,_0x3a00f5,_0x222751,_0x442f5e){const _0x336cc6=_0x3603e1,_0x98e226={'memberId':(await this['_sessionService'][_0x336cc6(0x125)](_0x526e13))[_0x336cc6(0x142)](),'threadId':_0x222751,'replyId':_0x442f5e,'unitId':_0x526e13},_0x3705d5=await this[_0x336cc6(0x169)][_0x336cc6(0x134)]('/universer-api/comment/unit/'+_0x526e13+'/delete',{'body':_0x98e226});return!_0x3705d5[_0x336cc6(0x14c)][_0x336cc6(0x117)]||_0x3705d5[_0x336cc6(0x14c)][_0x336cc6(0x117)][_0x336cc6(0x12a)]===0x1;}async['listComments'](_0x3ab6f2,_0x21a4cd,_0x11fdb9){const _0x4636dd=_0x3603e1,_0x1e174f={'unitId':_0x3ab6f2,'threadId':_0x11fdb9},_0x36d645=await this[_0x4636dd(0x169)][_0x4636dd(0x134)](_0x4636dd(0x13c)+_0x3ab6f2+_0x4636dd(0x157),{'body':_0x1e174f}),_0x198f78=_0x11fdb9[_0x4636dd(0x16c)](_0x451b15=>ee(_0x36d645[_0x4636dd(0x14c)]['comments'][_0x451b15],_0x3ab6f2,_0x21a4cd))['filter'](Boolean);return Object[_0x4636dd(0x13e)](_0x36d645['body'][_0x4636dd(0x130)])[_0x4636dd(0x153)](_0x46054b=>{const _0x152e6e=_0x4636dd;this[_0x152e6e(0x170)][_0x152e6e(0x15b)](_0x46054b);}),_0x198f78;}[_0x3603e1(0x16b)](_0x2ecc60){const _0x478897=_0x3603e1;return{'id':_0x2ecc60['id'],'threadId':_0x2ecc60[_0x478897(0x172)],'ref':_0x2ecc60[_0x478897(0x12b)]};}};S=Q([b(0x0,_0x4c511f(_0x4be4d2)),b(0x1,_0x4c511f(_0x2bff43)),b(0x2,_0x4c511f(_0x3c4a77))],S);var re=Object[_0x3603e1(0x16e)],te=(_0x52cef3,_0x358961,_0x5869a7,_0x5b2bc1)=>{const _0x49b540=_0x3603e1;for(var _0x17ada8=_0x5b2bc1>0x1?void 0x0:_0x5b2bc1?re(_0x358961,_0x5869a7):_0x358961,_0x114f18=_0x52cef3[_0x49b540(0x11c)]-0x1,_0x2d6d13;_0x114f18>=0x0;_0x114f18--)(_0x2d6d13=_0x52cef3[_0x114f18])&&(_0x17ada8=_0x2d6d13(_0x17ada8)||_0x17ada8);return _0x17ada8;},M=(_0x3d1f7b,_0x120812)=>(_0xe48815,_0x2da559)=>_0x120812(_0xe48815,_0x2da559,_0x3d1f7b);let f=class extends _0x199a3d{constructor(_0x5294ac,_0x45bfef){const _0x510915=_0x3603e1;super(),this['_threadCommentDataSourceService']=_0x5294ac,this['_threadCommentDataSource']=_0x45bfef,this[_0x510915(0x114)]();}[_0x3603e1(0x114)](){const _0x58da72=_0x3603e1;this[_0x58da72(0x113)][_0x58da72(0x141)]=this[_0x58da72(0x135)],this[_0x58da72(0x113)][_0x58da72(0x159)]=!0x1;}};f=te([M(0x0,_0x14c9f4),M(0x1,_0x4c511f(S))],f);var se=Object['defineProperty'],oe=Object[_0x3603e1(0x16e)],ne=(_0x48ded8,_0xaa4984,_0x14a79d)=>_0xaa4984 in _0x48ded8?se(_0x48ded8,_0xaa4984,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14a79d}):_0x48ded8[_0xaa4984]=_0x14a79d,ie=(_0x1405ab,_0x4d873e,_0x1a522a,_0x129fad)=>{for(var _0x4bb661=_0x129fad>0x1?void 0x0:_0x129fad?oe(_0x4d873e,_0x1a522a):_0x4d873e,_0x376546=_0x1405ab['length']-0x1,_0x2c7adc;_0x376546>=0x0;_0x376546--)(_0x2c7adc=_0x1405ab[_0x376546])&&(_0x4bb661=_0x2c7adc(_0x4bb661)||_0x4bb661);return _0x4bb661;},N=(_0x5aa258,_0x488498)=>(_0x2c93fa,_0x5a31e6)=>_0x488498(_0x2c93fa,_0x5a31e6,_0x5aa258),$=(_0x184f22,_0x48592a,_0x1a2c9f)=>ne(_0x184f22,typeof _0x48592a!='symbol'?_0x48592a+'':_0x48592a,_0x1a2c9f);let g=class extends _0x2db651{constructor(_0x1ef4b3=O,_0x2c0d31,_0x41dc22){const _0x45abde=_0x3603e1;super(),this[_0x45abde(0x14b)]=_0x1ef4b3,this[_0x45abde(0x118)]=_0x2c0d31,this[_0x45abde(0x15c)]=_0x41dc22;const {..._0x1f6e80}=_0x352425({},O,this['_config']);this['_configService'][_0x45abde(0x136)](z,_0x1f6e80);}['onStarting'](){const _0x3c080e=_0x3603e1;[[S],[f],[_]][_0x3c080e(0x153)](_0x3b515a=>{const _0xc5e888=_0x3c080e;this[_0xc5e888(0x118)][_0xc5e888(0x143)](_0x3b515a);});}[_0x3603e1(0x137)](){const _0x2ae203=_0x3603e1;this[_0x2ae203(0x118)][_0x2ae203(0x12f)](f),this[_0x2ae203(0x118)][_0x2ae203(0x12f)](_);}};$(g,_0x3603e1(0x16f),W),$(g,_0x3603e1(0x158),_0x4ffa54[_0x3603e1(0x13f)]),g=ie([_0x414d5d(_0x5b41d9,_0x8c2bb9,_0xd50337),N(0x1,_0x4c511f(_0x130911)),N(0x2,_0x5d98bf)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ function _0x4b19(){const _0x5931d0=['_commentService','map','Solve','Solved','ref','error','pipe','type','getComment','Unknown','getCurrentUser','thread-comment-data-source.config','YYYY/MM/DD\x20HH:mm','length','1982272fJtFNI','_injector','Reply','replyId','getOwnPropertyDescriptor','delete','addUser','users','solved','4668248TefsXS','OpenOrReOpen','/delete','4939446YddyLV','resolved','format','stringify','slice','_initUserSync','1110366umpKha','7dMwilo','14674104VITWXC','175430nMxnIB','rangeType','getMemberID','post','syncUpdateMutationToColla','dataSource','comments','add','reply','content','_configService','/universer-api/comment/unit/','comment','user','/edit','2078340zWCoQN','values','root','_init','rangeId','COMMENT','body','_userService','saveCommentToSnapshot','userID','_config','getUnit','parse','resolveComment','filter','subscribe','threadId','updateComment','listComments','replies','disposeWithMe','commentUpdate$','/solved','setConfig','defineProperty','requireSession','_sessionService','customRanges','createTimestamp','_httpService','unitId','personId','6ShsaHY','getUser','Delete','/reply','userId','_threadCommentModel','Edit','code','/universer-api/user/list','_threadCommentDataSourceService','find','addComment','_initDataSource','onReady','deleteComment','Add','_threadCommentDataSource','forEach','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get'];_0x4b19=function(){return _0x5931d0;};return _0x4b19();}const _0x508aae=_0x2893;(function(_0x2afc5d,_0x128712){const _0x57876c=_0x2893,_0x22f4cb=_0x2afc5d();while(!![]){try{const _0x3a6dfb=-parseInt(_0x57876c(0x1f6))/0x1*(-parseInt(_0x57876c(0x1be))/0x2)+-parseInt(_0x57876c(0x1f3))/0x3+parseInt(_0x57876c(0x1ea))/0x4+parseInt(_0x57876c(0x19e))/0x5+-parseInt(_0x57876c(0x1ed))/0x6*(-parseInt(_0x57876c(0x1f4))/0x7)+-parseInt(_0x57876c(0x1e1))/0x8+-parseInt(_0x57876c(0x1f5))/0x9;if(_0x3a6dfb===_0x128712)break;else _0x22f4cb['push'](_0x22f4cb['shift']());}catch(_0x456131){_0x22f4cb['push'](_0x22f4cb['shift']());}}}(_0x4b19,0xa6f7b));import{CommentService as _0xeab878,CollaborationSessionService as _0x2c9dad,UniverCollaborationClientPlugin as _0x214c30}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1dfa68}from'@univerjs-pro/license';import{dayjs as _0xd8a88a,UserManagerService as _0x119c71,Inject as _0x2d47f8,Injector as _0x1c26b5,Disposable as _0x5be0c8,CustomRangeType as _0x32d36d,UniverInstanceType as _0x5c1d9b,DependentOn as _0x562a8a,IConfigService as _0x385a7d,Plugin as _0x1beb87,merge as _0x5ac491}from'@univerjs/core';function _0x2893(_0x59814a,_0x1b51d1){const _0x4b19bd=_0x4b19();return _0x2893=function(_0x289352,_0x2fa73c){_0x289352=_0x289352-0x19a;let _0x480643=_0x4b19bd[_0x289352];return _0x480643;},_0x2893(_0x59814a,_0x1b51d1);}import{UniverThreadCommentUIPlugin as _0x38a385}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x10684c,IThreadCommentDataSourceService as _0x4e8f25}from'@univerjs/thread-comment';import{bufferTime as _0x31ea8f}from'rxjs';import{HTTPService as _0x2f6168}from'@univerjs/network';const W=_0x508aae(0x1d1);var I=(_0x33da7e=>(_0x33da7e[_0x33da7e[_0x508aae(0x1eb)]=0x0]=_0x508aae(0x1eb),_0x33da7e[_0x33da7e[_0x508aae(0x1d6)]=0x1]=_0x508aae(0x1d6),_0x33da7e[_0x33da7e['UNRECOGNIZED']=-0x1]=_0x508aae(0x1d0),_0x33da7e))(I||{}),v=(_0x5a04b5=>(_0x5a04b5[_0x5a04b5[_0x508aae(0x1dc)]=0x0]='Unknown',_0x5a04b5[_0x5a04b5[_0x508aae(0x1cd)]=0x1]=_0x508aae(0x1cd),_0x5a04b5[_0x5a04b5[_0x508aae(0x1e3)]=0x2]='Reply',_0x5a04b5[_0x5a04b5[_0x508aae(0x1c4)]=0x3]=_0x508aae(0x1c4),_0x5a04b5[_0x5a04b5[_0x508aae(0x1c0)]=0x4]=_0x508aae(0x1c0),_0x5a04b5[_0x5a04b5[_0x508aae(0x1d5)]=0x5]=_0x508aae(0x1d5),_0x5a04b5[_0x5a04b5['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x5a04b5))(v||{});const y=_0x128419=>_0xd8a88a(new Date(+_0x128419))[_0x508aae(0x1ef)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x343707,_0x5f4c09)=>{const _0x6f6a6b=_0x508aae,_0xd9dc4f=_0x343707[_0x6f6a6b(0x1d2)](_0x119c71),_0x260b5d=_0x343707[_0x6f6a6b(0x1d2)](_0x2f6168);_0x5f4c09['forEach'](_0x26ffc1=>{const _0x376fa7=_0x6f6a6b;_0xd9dc4f[_0x376fa7(0x1bf)](_0x26ffc1)&&_0x5f4c09[_0x376fa7(0x1e6)](_0x26ffc1);}),_0x5f4c09['size']&&(await _0x260b5d['get'](_0x6f6a6b(0x1c6),{'params':{'userIDs':[..._0x5f4c09]}}))[_0x6f6a6b(0x1a4)][_0x6f6a6b(0x1e8)][_0x6f6a6b(0x1cf)](_0x499f95=>{const _0x44d1ce=_0x6f6a6b;_0x499f95&&_0xd9dc4f[_0x44d1ce(0x1e7)](_0x499f95);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x445184,_0x1d1a2e,_0x3b889b,_0x4b5ef7)=>{const _0x39cb67=_0x508aae;for(var _0x57830d=_0x4b5ef7>0x1?void 0x0:_0x4b5ef7?K(_0x1d1a2e,_0x3b889b):_0x1d1a2e,_0x2dc935=_0x445184[_0x39cb67(0x1e0)]-0x1,_0x45f323;_0x2dc935>=0x0;_0x2dc935--)(_0x45f323=_0x445184[_0x2dc935])&&(_0x57830d=_0x45f323(_0x57830d)||_0x57830d);return _0x57830d;},p=(_0x120310,_0x1c7d42)=>(_0x842d39,_0x9bc089)=>_0x1c7d42(_0x842d39,_0x9bc089,_0x120310);let _=class extends _0x5be0c8{constructor(_0x53c56b,_0xdf6c05,_0x2bbc99,_0x3ef601){const _0xc88234=_0x508aae;super(),this[_0xc88234(0x1d3)]=_0x53c56b,this['_threadCommentModel']=_0xdf6c05,this[_0xc88234(0x1a5)]=_0x2bbc99,this[_0xc88234(0x1e2)]=_0x3ef601,this[_0xc88234(0x1a1)](),this[_0xc88234(0x1f2)]();}[_0x508aae(0x1f2)](){const _0x5ecd6a=_0x508aae;this[_0x5ecd6a(0x1b2)](this['_threadCommentModel']['commentUpdate$'][_0x5ecd6a(0x1d9)](_0x31ea8f(0x10))[_0x5ecd6a(0x1ad)](_0x273a9f=>{const _0x342ac6=_0x5ecd6a,_0x5d7d04=new Set();_0x273a9f[_0x342ac6(0x1cf)](_0x17f9cb=>{const _0x2f895f=_0x342ac6;switch(_0x17f9cb[_0x2f895f(0x1da)]){case _0x2f895f(0x1fd):{const _0xcb7f32=_0x17f9cb['payload'][_0x2f895f(0x1bd)];_0x5d7d04[_0x2f895f(0x1fd)](_0xcb7f32);break;}}}),B(this[_0x342ac6(0x1e2)],_0x5d7d04);}));}['_init'](){const _0x434195=_0x508aae;this[_0x434195(0x1b2)](this['_commentService'][_0x434195(0x1b3)][_0x434195(0x1ad)](async _0x13f74c=>{const _0x265b8f=_0x434195;var _0x14925d,_0x48778e,_0x33cefa,_0x5167f2;const _0x278794=(_0x14925d=this[_0x265b8f(0x1c3)]['getUnit'](_0x13f74c[_0x265b8f(0x1bc)])['find'](_0x166225=>_0x166225[_0x265b8f(0x1ae)]===_0x13f74c['threadId']))==null?void 0x0:_0x14925d[_0x265b8f(0x1a0)];if(!_0x278794)return;const {unitId:_0x2faac4,subUnitId:_0x3aac6f}=_0x278794;switch(_0x13f74c[_0x265b8f(0x19c)]&&this['_userService'][_0x265b8f(0x1e7)](_0x13f74c[_0x265b8f(0x19c)]),_0x13f74c[_0x265b8f(0x1da)]){case v[_0x265b8f(0x1cd)]:break;case v[_0x265b8f(0x1e3)]:{this[_0x265b8f(0x1c3)]['addComment'](_0x2faac4,_0x3aac6f,{'unitId':_0x2faac4,'subUnitId':_0x3aac6f,'ref':'','id':_0x13f74c[_0x265b8f(0x1e4)],'dT':y(+_0x13f74c[_0x265b8f(0x1ba)]),'threadId':_0x13f74c[_0x265b8f(0x1ae)],'personId':(_0x33cefa=(_0x48778e=_0x13f74c[_0x265b8f(0x19c)])==null?void 0x0:_0x48778e[_0x265b8f(0x1a7)])!=null?_0x33cefa:_0x13f74c[_0x265b8f(0x1c2)],'text':JSON[_0x265b8f(0x1aa)](_0x13f74c[_0x265b8f(0x1ff)]),'parentId':_0x278794['id']});break;}case v[_0x265b8f(0x1c0)]:{const _0x4df48e=this['_threadCommentModel'][_0x265b8f(0x1db)](_0x2faac4,_0x3aac6f,_0x13f74c[_0x265b8f(0x1e4)]);_0x4df48e&&_0x4df48e['parentId']&&this[_0x265b8f(0x1c3)][_0x265b8f(0x1cc)](_0x2faac4,_0x3aac6f,_0x13f74c[_0x265b8f(0x1e4)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x2faac4,_0x3aac6f,{'commentId':_0x13f74c[_0x265b8f(0x1e4)],'text':JSON['parse'](_0x13f74c[_0x265b8f(0x1ff)])});break;}case v[_0x265b8f(0x1d5)]:{const _0x534cf4=(_0x5167f2=this['_threadCommentModel'][_0x265b8f(0x1a9)](_0x13f74c[_0x265b8f(0x1bc)])[_0x265b8f(0x1c8)](_0x449f44=>_0x449f44[_0x265b8f(0x1ae)]===_0x13f74c[_0x265b8f(0x1ae)]))==null?void 0x0:_0x5167f2['root'];_0x534cf4&&this['_threadCommentModel'][_0x265b8f(0x1ab)](_0x2faac4,_0x3aac6f,_0x534cf4['id'],_0x13f74c[_0x265b8f(0x1e9)]===I[_0x265b8f(0x1d6)]);break;}}}));}};_=V([p(0x0,_0x2d47f8(_0xeab878)),p(0x1,_0x2d47f8(_0x10684c)),p(0x2,_0x2d47f8(_0x119c71)),p(0x3,_0x2d47f8(_0x1c26b5))],_);const z=_0x508aae(0x1de),O={};var k=Object[_0x508aae(0x1e5)],Q=(_0x262daa,_0x4ccfd9,_0x49b84a,_0x1b91be)=>{const _0x3720a2=_0x508aae;for(var _0x385990=_0x1b91be>0x1?void 0x0:_0x1b91be?k(_0x4ccfd9,_0x49b84a):_0x4ccfd9,_0x18cc7a=_0x262daa[_0x3720a2(0x1e0)]-0x1,_0x2c6a56;_0x18cc7a>=0x0;_0x18cc7a--)(_0x2c6a56=_0x262daa[_0x18cc7a])&&(_0x385990=_0x2c6a56(_0x385990)||_0x385990);return _0x385990;},b=(_0x28c0ab,_0x1d8df3)=>(_0x4c813f,_0x1591cc)=>_0x1d8df3(_0x4c813f,_0x1591cc,_0x28c0ab);function X(_0x320956,_0x1cb8b6){const _0x5ebc58=_0x508aae,_0x521ba8=_0x320956[_0x5ebc58(0x1b1)][0x0];return{..._0x1cb8b6,'id':_0x521ba8[_0x5ebc58(0x1e4)],'resolved':_0x320956[_0x5ebc58(0x1e9)]===0x1,'dT':y(_0x521ba8[_0x5ebc58(0x1ba)]),'personId':_0x521ba8[_0x5ebc58(0x1c2)],'threadId':_0x521ba8[_0x5ebc58(0x1ae)]};}function ee(_0x22c516,_0x1004b8,_0x13bf78){const _0x467f3d=_0x508aae;var _0x5eeeac,_0x1b127c;if(((_0x1b127c=(_0x5eeeac=_0x22c516==null?void 0x0:_0x22c516[_0x467f3d(0x1b1)])==null?void 0x0:_0x5eeeac[_0x467f3d(0x1e0)])!=null?_0x1b127c:0x0)>0x0){const _0x3f4d9c=(_0x59af77,_0x17ab0c)=>({'id':_0x59af77[_0x467f3d(0x1e4)],'threadId':_0x59af77[_0x467f3d(0x1ae)],'dT':y(_0x59af77[_0x467f3d(0x1ba)]),'personId':_0x59af77['userId'],'resolved':_0x22c516[_0x467f3d(0x1e9)]===I[_0x467f3d(0x1d6)],'unitId':_0x1004b8,'subUnitId':_0x13bf78,'text':JSON[_0x467f3d(0x1aa)](_0x59af77['content']),'parentId':_0x17ab0c}),_0x514e33=_0x3f4d9c(_0x22c516[_0x467f3d(0x1b1)][0x0]);return{..._0x514e33,'children':_0x22c516[_0x467f3d(0x1b1)][_0x467f3d(0x1f1)](0x1)['map'](_0x5b8212=>_0x3f4d9c(_0x5b8212,_0x514e33['id']))};}return null;}let S=class{constructor(_0x167b26,_0x489152,_0x4bc89f){const _0x131ab4=_0x508aae;this['_httpService']=_0x167b26,this['_userService']=_0x489152,this[_0x131ab4(0x1b8)]=_0x4bc89f;}async[_0x508aae(0x1c9)](_0x2c0f8b){const _0x520774=_0x508aae;var _0x237f6c,_0x3441f3;const {parentId:_0x25dd13,unitId:_0x275fc9,text:_0x2ab6f6,threadId:_0x581f53}=_0x2c0f8b,_0x458414=(_0x3441f3=(_0x237f6c=_0x2ab6f6[_0x520774(0x1b9)])==null?void 0x0:_0x237f6c[_0x520774(0x1ac)](_0x351cd5=>_0x351cd5[_0x520774(0x1f7)]===_0x32d36d[_0x520774(0x1a3)])[_0x520774(0x1d4)](_0x559687=>_0x559687[_0x520774(0x1a2)]))!=null?_0x3441f3:[],_0x6aa74=JSON[_0x520774(0x1f0)](_0x2ab6f6),_0x444226=(await this[_0x520774(0x1b8)][_0x520774(0x1b7)](_0x275fc9))['getMemberID']();if(_0x25dd13){const _0x187012={'memberId':_0x444226,'unitId':_0x275fc9,'content':_0x6aa74,'mention':_0x458414,'threadId':_0x581f53},_0x1049f5=(await this[_0x520774(0x1bb)]['post'](_0x520774(0x19a)+_0x275fc9+_0x520774(0x1c1),{'body':_0x187012}))[_0x520774(0x1a4)][_0x520774(0x1fe)];return{..._0x2c0f8b,'id':_0x1049f5[_0x520774(0x1e4)],'dT':_0xd8a88a(+_0x1049f5[_0x520774(0x1ba)])['format'](_0x520774(0x1df)),'personId':_0x1049f5[_0x520774(0x1c2)]};}else{const _0x6d3c2b={'memberId':_0x444226,'unitId':_0x275fc9,'content':_0x6aa74,'mention':_0x458414},_0x5d4b05=await this[_0x520774(0x1bb)][_0x520774(0x1f9)](_0x520774(0x19a)+_0x275fc9+'/add',{'body':_0x6d3c2b});return X(_0x5d4b05[_0x520774(0x1a4)][_0x520774(0x19b)],_0x2c0f8b);}}async[_0x508aae(0x1af)](_0x30447c){const _0x248109=_0x508aae;var _0x4b7c38,_0x213bc0;const {text:_0x3a98dd,unitId:_0x3db28f}=_0x30447c,_0x29139e=(_0x213bc0=(_0x4b7c38=_0x3a98dd[_0x248109(0x1b9)])==null?void 0x0:_0x4b7c38[_0x248109(0x1ac)](_0x51c157=>_0x51c157['rangeType']===_0x32d36d[_0x248109(0x1a3)])['map'](_0xc952b7=>_0xc952b7[_0x248109(0x1a2)]))!=null?_0x213bc0:[],_0x689371=JSON[_0x248109(0x1f0)](_0x3a98dd),_0x7279b=_0x30447c['threadId'],_0x48b622=_0x30447c['id'],_0x4efb5c={'memberId':(await this[_0x248109(0x1b8)]['requireSession'](_0x3db28f))[_0x248109(0x1f8)](),'unitId':_0x3db28f,'threadId':_0x7279b,'mention':_0x29139e,'content':_0x689371,'replyId':_0x48b622},_0x388cce=await this[_0x248109(0x1bb)]['post'](_0x248109(0x19a)+_0x3db28f+_0x248109(0x19d),{'body':_0x4efb5c});return!_0x388cce[_0x248109(0x1a4)]['error']||_0x388cce[_0x248109(0x1a4)][_0x248109(0x1d8)][_0x248109(0x1c5)]===0x1;}async['resolveComment'](_0x4631a6){const _0x747b4=_0x508aae,{unitId:_0x1e311c}=_0x4631a6,_0x268394=_0x4631a6[_0x747b4(0x1ae)],_0x5c015d={'memberId':this[_0x747b4(0x1a5)][_0x747b4(0x1dd)]()[_0x747b4(0x1a7)],'unitId':_0x1e311c,'threadId':_0x268394,'solved':_0x4631a6[_0x747b4(0x1ee)]?I[_0x747b4(0x1d6)]:I[_0x747b4(0x1eb)]},_0x11e06e=await this[_0x747b4(0x1bb)][_0x747b4(0x1f9)]('/universer-api/comment/unit/'+_0x1e311c+_0x747b4(0x1b4),{'body':_0x5c015d});return!_0x11e06e['body'][_0x747b4(0x1d8)]||_0x11e06e[_0x747b4(0x1a4)][_0x747b4(0x1d8)]['code']===0x1;}async['deleteComment'](_0x42999f,_0x3b61bb,_0x202a1c,_0x5694d8){const _0x448b1f=_0x508aae,_0x7ee3d={'memberId':(await this['_sessionService'][_0x448b1f(0x1b7)](_0x42999f))[_0x448b1f(0x1f8)](),'threadId':_0x202a1c,'replyId':_0x5694d8,'unitId':_0x42999f},_0x577a18=await this[_0x448b1f(0x1bb)][_0x448b1f(0x1f9)](_0x448b1f(0x19a)+_0x42999f+_0x448b1f(0x1ec),{'body':_0x7ee3d});return!_0x577a18['body'][_0x448b1f(0x1d8)]||_0x577a18[_0x448b1f(0x1a4)][_0x448b1f(0x1d8)][_0x448b1f(0x1c5)]===0x1;}async[_0x508aae(0x1b0)](_0x219944,_0x1afa20,_0x58b5d3){const _0x2b20c4=_0x508aae,_0x28d977={'unitId':_0x219944,'threadId':_0x58b5d3},_0x5e4299=await this[_0x2b20c4(0x1bb)][_0x2b20c4(0x1f9)]('/universer-api/comment/unit/'+_0x219944+'/list',{'body':_0x28d977}),_0x1ba0c8=_0x58b5d3[_0x2b20c4(0x1d4)](_0x212dce=>ee(_0x5e4299[_0x2b20c4(0x1a4)][_0x2b20c4(0x1fc)][_0x212dce],_0x219944,_0x1afa20))[_0x2b20c4(0x1ac)](Boolean);return Object[_0x2b20c4(0x19f)](_0x5e4299[_0x2b20c4(0x1a4)][_0x2b20c4(0x1e8)])['forEach'](_0x450707=>{this['_userService']['addUser'](_0x450707);}),_0x1ba0c8;}[_0x508aae(0x1a6)](_0x4cf104){const _0x35ebd5=_0x508aae;return{'id':_0x4cf104['id'],'threadId':_0x4cf104['threadId'],'ref':_0x4cf104[_0x35ebd5(0x1d7)]};}};S=Q([b(0x0,_0x2d47f8(_0x2f6168)),b(0x1,_0x2d47f8(_0x119c71)),b(0x2,_0x2d47f8(_0x2c9dad))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x227392,_0x39e32c,_0x3f82b0,_0x47faff)=>{for(var _0xf21c84=_0x47faff>0x1?void 0x0:_0x47faff?re(_0x39e32c,_0x3f82b0):_0x39e32c,_0x21fcf4=_0x227392['length']-0x1,_0x571f80;_0x21fcf4>=0x0;_0x21fcf4--)(_0x571f80=_0x227392[_0x21fcf4])&&(_0xf21c84=_0x571f80(_0xf21c84)||_0xf21c84);return _0xf21c84;},M=(_0x43aabe,_0x516a2d)=>(_0x490fea,_0x5ec390)=>_0x516a2d(_0x490fea,_0x5ec390,_0x43aabe);let f=class extends _0x5be0c8{constructor(_0x297072,_0x133254){const _0x2667ea=_0x508aae;super(),this['_threadCommentDataSourceService']=_0x297072,this[_0x2667ea(0x1ce)]=_0x133254,this[_0x2667ea(0x1ca)]();}[_0x508aae(0x1ca)](){const _0x5582d0=_0x508aae;this['_threadCommentDataSourceService'][_0x5582d0(0x1fb)]=this['_threadCommentDataSource'],this[_0x5582d0(0x1c7)][_0x5582d0(0x1fa)]=!0x1;}};f=te([M(0x0,_0x4e8f25),M(0x1,_0x2d47f8(S))],f);var se=Object[_0x508aae(0x1b6)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x23d1ab,_0x31b67d,_0xd25b78)=>_0x31b67d in _0x23d1ab?se(_0x23d1ab,_0x31b67d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd25b78}):_0x23d1ab[_0x31b67d]=_0xd25b78,ie=(_0x16c325,_0x10aa17,_0x2c3385,_0x2eef3e)=>{const _0x1debec=_0x508aae;for(var _0x109e9b=_0x2eef3e>0x1?void 0x0:_0x2eef3e?oe(_0x10aa17,_0x2c3385):_0x10aa17,_0x3f1df5=_0x16c325[_0x1debec(0x1e0)]-0x1,_0x361cf8;_0x3f1df5>=0x0;_0x3f1df5--)(_0x361cf8=_0x16c325[_0x3f1df5])&&(_0x109e9b=_0x361cf8(_0x109e9b)||_0x109e9b);return _0x109e9b;},N=(_0x4ed43c,_0x58f985)=>(_0x3e0db6,_0x474a95)=>_0x58f985(_0x3e0db6,_0x474a95,_0x4ed43c),$=(_0x4558bc,_0x4eda8d,_0x2810db)=>ne(_0x4558bc,typeof _0x4eda8d!='symbol'?_0x4eda8d+'':_0x4eda8d,_0x2810db);let g=class extends _0x1beb87{constructor(_0x3814ac=O,_0x554fd1,_0x52331e){const _0x29b9a4=_0x508aae;super(),this[_0x29b9a4(0x1a8)]=_0x3814ac,this[_0x29b9a4(0x1e2)]=_0x554fd1,this[_0x29b9a4(0x200)]=_0x52331e;const {..._0x413c91}=_0x5ac491({},O,this[_0x29b9a4(0x1a8)]);this[_0x29b9a4(0x200)][_0x29b9a4(0x1b5)](z,_0x413c91);}['onStarting'](){const _0x2539d0=_0x508aae;[[S],[f],[_]][_0x2539d0(0x1cf)](_0x5b9e1f=>{const _0x77e87d=_0x2539d0;this[_0x77e87d(0x1e2)][_0x77e87d(0x1fd)](_0x5b9e1f);});}[_0x508aae(0x1cb)](){const _0x26803a=_0x508aae;this[_0x26803a(0x1e2)][_0x26803a(0x1d2)](f),this[_0x26803a(0x1e2)][_0x26803a(0x1d2)](_);}};$(g,'pluginName',W),$(g,'type',_0x5c1d9b['UNIVER_UNKNOWN']),g=ie([_0x562a8a(_0x38a385,_0x214c30,_0x1dfa68),N(0x1,_0x2d47f8(_0x1c26b5)),N(0x2,_0x385a7d)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3603e1=_0x2560;(function(_0xa1537d,_0x11af53){const _0x5ea1e0=_0x2560,_0x147c00=_0xa1537d();while(!![]){try{const _0x1295b0=-parseInt(_0x5ea1e0(0x14f))/0x1*(-parseInt(_0x5ea1e0(0x163))/0x2)+parseInt(_0x5ea1e0(0x12d))/0x3+-parseInt(_0x5ea1e0(0x145))/0x4+parseInt(_0x5ea1e0(0x14d))/0x5+parseInt(_0x5ea1e0(0x132))/0x6+-parseInt(_0x5ea1e0(0x150))/0x7+-parseInt(_0x5ea1e0(0x133))/0x8*(-parseInt(_0x5ea1e0(0x15a))/0x9);if(_0x1295b0===_0x11af53)break;else _0x147c00['push'](_0x147c00['shift']());}catch(_0x5e1b46){_0x147c00['push'](_0x147c00['shift']());}}}(_0x549c,0xb67e9));import{CommentService as _0x5d5f90,CollaborationSessionService as _0x3c4a77,UniverCollaborationClientPlugin as _0x8c2bb9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xd50337}from'@univerjs-pro/license';import{dayjs as _0x2557b7,UserManagerService as _0x2bff43,Inject as _0x4c511f,Injector as _0x130911,Disposable as _0x199a3d,CustomRangeType as _0x729685,UniverInstanceType as _0x4ffa54,DependentOn as _0x414d5d,IConfigService as _0x5d98bf,Plugin as _0x2db651,merge as _0x352425}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5b41d9}from'@univerjs/thread-comment-ui';function _0x549c(){const _0x3b6b96=['addUser','_configService','comment','deleteComment','/edit','pipe','Edit','resolved','2PmucyW','createTimestamp','Solve','parse','YYYY/MM/DD\x20HH:mm','rangeId','_httpService','COMMENT','saveCommentToSnapshot','map','solved','getOwnPropertyDescriptor','pluginName','_userService','unitId','threadId','filter','Solved','replies','customRanges','find','_threadCommentDataSourceService','_initDataSource','userID','size','error','_injector','user','disposeWithMe','UNRECOGNIZED','length','subscribe','root','_sessionService','Unknown','_initUserSync','content','parentId','rangeType','requireSession','OpenOrReOpen','resolveComment','reply','Add','code','ref','getCurrentUser','372465IzKdOn','userId','get','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','868542mHczTj','9946000ooByHz','post','_threadCommentDataSource','setConfig','onReady','/add','_commentService','Reply','slice','/universer-api/comment/unit/','updateComment','values','UNIVER_UNKNOWN','/solved','dataSource','getMemberID','add','delete','4405228HrwoMy','payload','format','stringify','addComment','replyId','_config','body','6636785AdUQxW','_init','319433kXmTug','9171036eFBHMz','getUnit','Delete','forEach','_threadCommentModel','commentUpdate$','personId','/list','type','syncUpdateMutationToColla','9wXcmmx'];_0x549c=function(){return _0x3b6b96;};return _0x549c();}import{ThreadCommentModel as _0x1650d8,IThreadCommentDataSourceService as _0x14c9f4}from'@univerjs/thread-comment';import{bufferTime as _0x33d3a7}from'rxjs';import{HTTPService as _0x4be4d2}from'@univerjs/network';const W=_0x3603e1(0x131);var I=(_0x1e8132=>(_0x1e8132[_0x1e8132[_0x3603e1(0x126)]=0x0]=_0x3603e1(0x126),_0x1e8132[_0x1e8132['Solved']=0x1]='Solved',_0x1e8132[_0x1e8132[_0x3603e1(0x11b)]=-0x1]=_0x3603e1(0x11b),_0x1e8132))(I||{}),v=(_0x45e0db=>(_0x45e0db[_0x45e0db[_0x3603e1(0x120)]=0x0]=_0x3603e1(0x120),_0x45e0db[_0x45e0db[_0x3603e1(0x129)]=0x1]=_0x3603e1(0x129),_0x45e0db[_0x45e0db[_0x3603e1(0x13a)]=0x2]=_0x3603e1(0x13a),_0x45e0db[_0x45e0db[_0x3603e1(0x161)]=0x3]='Edit',_0x45e0db[_0x45e0db[_0x3603e1(0x152)]=0x4]=_0x3603e1(0x152),_0x45e0db[_0x45e0db['Solve']=0x5]=_0x3603e1(0x165),_0x45e0db[_0x45e0db['UNRECOGNIZED']=-0x1]=_0x3603e1(0x11b),_0x45e0db))(v||{});const y=_0x1222d2=>_0x2557b7(new Date(+_0x1222d2))[_0x3603e1(0x147)](_0x3603e1(0x167)),B=async(_0x25f2aa,_0x3668ec)=>{const _0x38f4c6=_0x3603e1,_0x41c345=_0x25f2aa[_0x38f4c6(0x12f)](_0x2bff43),_0xdd090c=_0x25f2aa['get'](_0x4be4d2);_0x3668ec['forEach'](_0x2e82cc=>{const _0x1df16f=_0x38f4c6;_0x41c345['getUser'](_0x2e82cc)&&_0x3668ec[_0x1df16f(0x144)](_0x2e82cc);}),_0x3668ec[_0x38f4c6(0x116)]&&(await _0xdd090c[_0x38f4c6(0x12f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3668ec]}}))[_0x38f4c6(0x14c)][_0x38f4c6(0x130)][_0x38f4c6(0x153)](_0x2449c2=>{_0x2449c2&&_0x41c345['addUser'](_0x2449c2);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x42190c,_0x5cec83,_0x4907dc,_0x5e1cb7)=>{const _0xff9594=_0x3603e1;for(var _0x5e9f88=_0x5e1cb7>0x1?void 0x0:_0x5e1cb7?K(_0x5cec83,_0x4907dc):_0x5cec83,_0x3bca60=_0x42190c[_0xff9594(0x11c)]-0x1,_0x48719c;_0x3bca60>=0x0;_0x3bca60--)(_0x48719c=_0x42190c[_0x3bca60])&&(_0x5e9f88=_0x48719c(_0x5e9f88)||_0x5e9f88);return _0x5e9f88;},p=(_0x2efd0f,_0x28468f)=>(_0x408ca1,_0x15dd41)=>_0x28468f(_0x408ca1,_0x15dd41,_0x2efd0f);let _=class extends _0x199a3d{constructor(_0x39e204,_0x12cd99,_0x35f7d9,_0x18e945){const _0x36e703=_0x3603e1;super(),this[_0x36e703(0x139)]=_0x39e204,this[_0x36e703(0x154)]=_0x12cd99,this[_0x36e703(0x170)]=_0x35f7d9,this[_0x36e703(0x118)]=_0x18e945,this[_0x36e703(0x14e)](),this[_0x36e703(0x121)]();}[_0x3603e1(0x121)](){const _0xaf7b0c=_0x3603e1;this[_0xaf7b0c(0x11a)](this[_0xaf7b0c(0x154)][_0xaf7b0c(0x155)][_0xaf7b0c(0x160)](_0x33d3a7(0x10))['subscribe'](_0x46c702=>{const _0x3db001=_0xaf7b0c,_0x534f63=new Set();_0x46c702[_0x3db001(0x153)](_0x1f1752=>{const _0x32501d=_0x3db001;switch(_0x1f1752[_0x32501d(0x158)]){case _0x32501d(0x143):{const _0x3a6c10=_0x1f1752[_0x32501d(0x146)][_0x32501d(0x156)];_0x534f63[_0x32501d(0x143)](_0x3a6c10);break;}}}),B(this[_0x3db001(0x118)],_0x534f63);}));}['_init'](){const _0x50faa7=_0x3603e1;this[_0x50faa7(0x11a)](this[_0x50faa7(0x139)][_0x50faa7(0x155)][_0x50faa7(0x11d)](async _0x491b86=>{const _0x383228=_0x50faa7;var _0x4cd500,_0x933e87,_0x534ec5,_0x4394c7;const _0x170e0f=(_0x4cd500=this[_0x383228(0x154)][_0x383228(0x151)](_0x491b86[_0x383228(0x171)])[_0x383228(0x112)](_0x55e71a=>_0x55e71a[_0x383228(0x172)]===_0x491b86[_0x383228(0x172)]))==null?void 0x0:_0x4cd500[_0x383228(0x11e)];if(!_0x170e0f)return;const {unitId:_0x300389,subUnitId:_0x33d44e}=_0x170e0f;switch(_0x491b86[_0x383228(0x119)]&&this[_0x383228(0x170)][_0x383228(0x15b)](_0x491b86[_0x383228(0x119)]),_0x491b86[_0x383228(0x158)]){case v['Add']:break;case v[_0x383228(0x13a)]:{this[_0x383228(0x154)][_0x383228(0x149)](_0x300389,_0x33d44e,{'unitId':_0x300389,'subUnitId':_0x33d44e,'ref':'','id':_0x491b86['replyId'],'dT':y(+_0x491b86[_0x383228(0x164)]),'threadId':_0x491b86[_0x383228(0x172)],'personId':(_0x534ec5=(_0x933e87=_0x491b86[_0x383228(0x119)])==null?void 0x0:_0x933e87[_0x383228(0x115)])!=null?_0x534ec5:_0x491b86['userId'],'text':JSON[_0x383228(0x166)](_0x491b86[_0x383228(0x122)]),'parentId':_0x170e0f['id']});break;}case v['Delete']:{const _0x418b2e=this[_0x383228(0x154)]['getComment'](_0x300389,_0x33d44e,_0x491b86[_0x383228(0x14a)]);_0x418b2e&&_0x418b2e[_0x383228(0x123)]&&this['_threadCommentModel'][_0x383228(0x15e)](_0x300389,_0x33d44e,_0x491b86[_0x383228(0x14a)]);break;}case v['Edit']:{this[_0x383228(0x154)][_0x383228(0x13d)](_0x300389,_0x33d44e,{'commentId':_0x491b86[_0x383228(0x14a)],'text':JSON['parse'](_0x491b86[_0x383228(0x122)])});break;}case v[_0x383228(0x165)]:{const _0x578684=(_0x4394c7=this[_0x383228(0x154)][_0x383228(0x151)](_0x491b86[_0x383228(0x171)])['find'](_0x40ea88=>_0x40ea88[_0x383228(0x172)]===_0x491b86['threadId']))==null?void 0x0:_0x4394c7['root'];_0x578684&&this['_threadCommentModel'][_0x383228(0x127)](_0x300389,_0x33d44e,_0x578684['id'],_0x491b86[_0x383228(0x16d)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4c511f(_0x5d5f90)),p(0x1,_0x4c511f(_0x1650d8)),p(0x2,_0x4c511f(_0x2bff43)),p(0x3,_0x4c511f(_0x130911))],_);function _0x2560(_0x347111,_0x5da665){const _0x549c35=_0x549c();return _0x2560=function(_0x25603c,_0x2dc82c){_0x25603c=_0x25603c-0x111;let _0x23ac25=_0x549c35[_0x25603c];return _0x23ac25;},_0x2560(_0x347111,_0x5da665);}const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5bdaee,_0x255f8f,_0x2a2ca5,_0x15aaa5)=>{for(var _0x45c161=_0x15aaa5>0x1?void 0x0:_0x15aaa5?k(_0x255f8f,_0x2a2ca5):_0x255f8f,_0x3a6252=_0x5bdaee['length']-0x1,_0x1d8bd2;_0x3a6252>=0x0;_0x3a6252--)(_0x1d8bd2=_0x5bdaee[_0x3a6252])&&(_0x45c161=_0x1d8bd2(_0x45c161)||_0x45c161);return _0x45c161;},b=(_0x9fdc32,_0x2f9aeb)=>(_0x29a17d,_0x40315d)=>_0x2f9aeb(_0x29a17d,_0x40315d,_0x9fdc32);function X(_0x387955,_0x8fc331){const _0x36d2f5=_0x3603e1,_0x257eeb=_0x387955[_0x36d2f5(0x175)][0x0];return{..._0x8fc331,'id':_0x257eeb[_0x36d2f5(0x14a)],'resolved':_0x387955['solved']===0x1,'dT':y(_0x257eeb[_0x36d2f5(0x164)]),'personId':_0x257eeb['userId'],'threadId':_0x257eeb[_0x36d2f5(0x172)]};}function ee(_0x242bc8,_0x1a5118,_0x5c8298){const _0x2476dc=_0x3603e1;var _0x20f65a,_0x4ded9c;if(((_0x4ded9c=(_0x20f65a=_0x242bc8==null?void 0x0:_0x242bc8['replies'])==null?void 0x0:_0x20f65a[_0x2476dc(0x11c)])!=null?_0x4ded9c:0x0)>0x0){const _0x402548=(_0x4ae8c7,_0x314035)=>({'id':_0x4ae8c7[_0x2476dc(0x14a)],'threadId':_0x4ae8c7[_0x2476dc(0x172)],'dT':y(_0x4ae8c7[_0x2476dc(0x164)]),'personId':_0x4ae8c7[_0x2476dc(0x12e)],'resolved':_0x242bc8[_0x2476dc(0x16d)]===I[_0x2476dc(0x174)],'unitId':_0x1a5118,'subUnitId':_0x5c8298,'text':JSON[_0x2476dc(0x166)](_0x4ae8c7[_0x2476dc(0x122)]),'parentId':_0x314035}),_0x2abd8f=_0x402548(_0x242bc8[_0x2476dc(0x175)][0x0]);return{..._0x2abd8f,'children':_0x242bc8['replies'][_0x2476dc(0x13b)](0x1)[_0x2476dc(0x16c)](_0x5ab63b=>_0x402548(_0x5ab63b,_0x2abd8f['id']))};}return null;}let S=class{constructor(_0x38b591,_0x12135c,_0x43adcc){const _0x1bd914=_0x3603e1;this['_httpService']=_0x38b591,this[_0x1bd914(0x170)]=_0x12135c,this[_0x1bd914(0x11f)]=_0x43adcc;}async[_0x3603e1(0x149)](_0x576602){const _0x5d6350=_0x3603e1;var _0x49b212,_0x5030d4;const {parentId:_0x2eee08,unitId:_0x2e627e,text:_0x53aa84,threadId:_0x5e5adf}=_0x576602,_0xe0a2b0=(_0x5030d4=(_0x49b212=_0x53aa84[_0x5d6350(0x111)])==null?void 0x0:_0x49b212['filter'](_0x5a2df8=>_0x5a2df8[_0x5d6350(0x124)]===_0x729685[_0x5d6350(0x16a)])[_0x5d6350(0x16c)](_0x3a8dab=>_0x3a8dab[_0x5d6350(0x168)]))!=null?_0x5030d4:[],_0x2b50ac=JSON[_0x5d6350(0x148)](_0x53aa84),_0x4b0364=(await this[_0x5d6350(0x11f)][_0x5d6350(0x125)](_0x2e627e))['getMemberID']();if(_0x2eee08){const _0x1e1567={'memberId':_0x4b0364,'unitId':_0x2e627e,'content':_0x2b50ac,'mention':_0xe0a2b0,'threadId':_0x5e5adf},_0x29a066=(await this['_httpService'][_0x5d6350(0x134)]('/universer-api/comment/unit/'+_0x2e627e+'/reply',{'body':_0x1e1567}))[_0x5d6350(0x14c)][_0x5d6350(0x128)];return{..._0x576602,'id':_0x29a066[_0x5d6350(0x14a)],'dT':_0x2557b7(+_0x29a066['createTimestamp'])[_0x5d6350(0x147)](_0x5d6350(0x167)),'personId':_0x29a066[_0x5d6350(0x12e)]};}else{const _0x3a8725={'memberId':_0x4b0364,'unitId':_0x2e627e,'content':_0x2b50ac,'mention':_0xe0a2b0},_0x12b2f1=await this['_httpService'][_0x5d6350(0x134)]('/universer-api/comment/unit/'+_0x2e627e+_0x5d6350(0x138),{'body':_0x3a8725});return X(_0x12b2f1['body'][_0x5d6350(0x15d)],_0x576602);}}async[_0x3603e1(0x13d)](_0x7e24d7){const _0x36aeb4=_0x3603e1;var _0x562efe,_0x46c781;const {text:_0x5587f3,unitId:_0x28913b}=_0x7e24d7,_0xcd73c7=(_0x46c781=(_0x562efe=_0x5587f3[_0x36aeb4(0x111)])==null?void 0x0:_0x562efe[_0x36aeb4(0x173)](_0x3950b1=>_0x3950b1[_0x36aeb4(0x124)]===_0x729685[_0x36aeb4(0x16a)])[_0x36aeb4(0x16c)](_0x543c22=>_0x543c22['rangeId']))!=null?_0x46c781:[],_0x50513b=JSON['stringify'](_0x5587f3),_0x2d8946=_0x7e24d7[_0x36aeb4(0x172)],_0x5e1fcb=_0x7e24d7['id'],_0x309c07={'memberId':(await this[_0x36aeb4(0x11f)][_0x36aeb4(0x125)](_0x28913b))['getMemberID'](),'unitId':_0x28913b,'threadId':_0x2d8946,'mention':_0xcd73c7,'content':_0x50513b,'replyId':_0x5e1fcb},_0x316bde=await this[_0x36aeb4(0x169)][_0x36aeb4(0x134)]('/universer-api/comment/unit/'+_0x28913b+_0x36aeb4(0x15f),{'body':_0x309c07});return!_0x316bde['body']['error']||_0x316bde[_0x36aeb4(0x14c)][_0x36aeb4(0x117)][_0x36aeb4(0x12a)]===0x1;}async[_0x3603e1(0x127)](_0x17a72c){const _0x564f23=_0x3603e1,{unitId:_0x417c84}=_0x17a72c,_0x49e65b=_0x17a72c[_0x564f23(0x172)],_0x2e6561={'memberId':this[_0x564f23(0x170)][_0x564f23(0x12c)]()[_0x564f23(0x115)],'unitId':_0x417c84,'threadId':_0x49e65b,'solved':_0x17a72c[_0x564f23(0x162)]?I['Solved']:I[_0x564f23(0x126)]},_0x370a85=await this[_0x564f23(0x169)]['post'](_0x564f23(0x13c)+_0x417c84+_0x564f23(0x140),{'body':_0x2e6561});return!_0x370a85[_0x564f23(0x14c)]['error']||_0x370a85[_0x564f23(0x14c)][_0x564f23(0x117)][_0x564f23(0x12a)]===0x1;}async['deleteComment'](_0x526e13,_0x3a00f5,_0x222751,_0x442f5e){const _0x336cc6=_0x3603e1,_0x98e226={'memberId':(await this['_sessionService'][_0x336cc6(0x125)](_0x526e13))[_0x336cc6(0x142)](),'threadId':_0x222751,'replyId':_0x442f5e,'unitId':_0x526e13},_0x3705d5=await this[_0x336cc6(0x169)][_0x336cc6(0x134)]('/universer-api/comment/unit/'+_0x526e13+'/delete',{'body':_0x98e226});return!_0x3705d5[_0x336cc6(0x14c)][_0x336cc6(0x117)]||_0x3705d5[_0x336cc6(0x14c)][_0x336cc6(0x117)][_0x336cc6(0x12a)]===0x1;}async['listComments'](_0x3ab6f2,_0x21a4cd,_0x11fdb9){const _0x4636dd=_0x3603e1,_0x1e174f={'unitId':_0x3ab6f2,'threadId':_0x11fdb9},_0x36d645=await this[_0x4636dd(0x169)][_0x4636dd(0x134)](_0x4636dd(0x13c)+_0x3ab6f2+_0x4636dd(0x157),{'body':_0x1e174f}),_0x198f78=_0x11fdb9[_0x4636dd(0x16c)](_0x451b15=>ee(_0x36d645[_0x4636dd(0x14c)]['comments'][_0x451b15],_0x3ab6f2,_0x21a4cd))['filter'](Boolean);return Object[_0x4636dd(0x13e)](_0x36d645['body'][_0x4636dd(0x130)])[_0x4636dd(0x153)](_0x46054b=>{const _0x152e6e=_0x4636dd;this[_0x152e6e(0x170)][_0x152e6e(0x15b)](_0x46054b);}),_0x198f78;}[_0x3603e1(0x16b)](_0x2ecc60){const _0x478897=_0x3603e1;return{'id':_0x2ecc60['id'],'threadId':_0x2ecc60[_0x478897(0x172)],'ref':_0x2ecc60[_0x478897(0x12b)]};}};S=Q([b(0x0,_0x4c511f(_0x4be4d2)),b(0x1,_0x4c511f(_0x2bff43)),b(0x2,_0x4c511f(_0x3c4a77))],S);var re=Object[_0x3603e1(0x16e)],te=(_0x52cef3,_0x358961,_0x5869a7,_0x5b2bc1)=>{const _0x49b540=_0x3603e1;for(var _0x17ada8=_0x5b2bc1>0x1?void 0x0:_0x5b2bc1?re(_0x358961,_0x5869a7):_0x358961,_0x114f18=_0x52cef3[_0x49b540(0x11c)]-0x1,_0x2d6d13;_0x114f18>=0x0;_0x114f18--)(_0x2d6d13=_0x52cef3[_0x114f18])&&(_0x17ada8=_0x2d6d13(_0x17ada8)||_0x17ada8);return _0x17ada8;},M=(_0x3d1f7b,_0x120812)=>(_0xe48815,_0x2da559)=>_0x120812(_0xe48815,_0x2da559,_0x3d1f7b);let f=class extends _0x199a3d{constructor(_0x5294ac,_0x45bfef){const _0x510915=_0x3603e1;super(),this['_threadCommentDataSourceService']=_0x5294ac,this['_threadCommentDataSource']=_0x45bfef,this[_0x510915(0x114)]();}[_0x3603e1(0x114)](){const _0x58da72=_0x3603e1;this[_0x58da72(0x113)][_0x58da72(0x141)]=this[_0x58da72(0x135)],this[_0x58da72(0x113)][_0x58da72(0x159)]=!0x1;}};f=te([M(0x0,_0x14c9f4),M(0x1,_0x4c511f(S))],f);var se=Object['defineProperty'],oe=Object[_0x3603e1(0x16e)],ne=(_0x48ded8,_0xaa4984,_0x14a79d)=>_0xaa4984 in _0x48ded8?se(_0x48ded8,_0xaa4984,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14a79d}):_0x48ded8[_0xaa4984]=_0x14a79d,ie=(_0x1405ab,_0x4d873e,_0x1a522a,_0x129fad)=>{for(var _0x4bb661=_0x129fad>0x1?void 0x0:_0x129fad?oe(_0x4d873e,_0x1a522a):_0x4d873e,_0x376546=_0x1405ab['length']-0x1,_0x2c7adc;_0x376546>=0x0;_0x376546--)(_0x2c7adc=_0x1405ab[_0x376546])&&(_0x4bb661=_0x2c7adc(_0x4bb661)||_0x4bb661);return _0x4bb661;},N=(_0x5aa258,_0x488498)=>(_0x2c93fa,_0x5a31e6)=>_0x488498(_0x2c93fa,_0x5a31e6,_0x5aa258),$=(_0x184f22,_0x48592a,_0x1a2c9f)=>ne(_0x184f22,typeof _0x48592a!='symbol'?_0x48592a+'':_0x48592a,_0x1a2c9f);let g=class extends _0x2db651{constructor(_0x1ef4b3=O,_0x2c0d31,_0x41dc22){const _0x45abde=_0x3603e1;super(),this[_0x45abde(0x14b)]=_0x1ef4b3,this[_0x45abde(0x118)]=_0x2c0d31,this[_0x45abde(0x15c)]=_0x41dc22;const {..._0x1f6e80}=_0x352425({},O,this['_config']);this['_configService'][_0x45abde(0x136)](z,_0x1f6e80);}['onStarting'](){const _0x3c080e=_0x3603e1;[[S],[f],[_]][_0x3c080e(0x153)](_0x3b515a=>{const _0xc5e888=_0x3c080e;this[_0xc5e888(0x118)][_0xc5e888(0x143)](_0x3b515a);});}[_0x3603e1(0x137)](){const _0x2ae203=_0x3603e1;this[_0x2ae203(0x118)][_0x2ae203(0x12f)](f),this[_0x2ae203(0x118)][_0x2ae203(0x12f)](_);}};$(g,_0x3603e1(0x16f),W),$(g,_0x3603e1(0x158),_0x4ffa54[_0x3603e1(0x13f)]),g=ie([_0x414d5d(_0x5b41d9,_0x8c2bb9,_0xd50337),N(0x1,_0x4c511f(_0x130911)),N(0x2,_0x5d98bf)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ function _0x4b19(){const _0x5931d0=['_commentService','map','Solve','Solved','ref','error','pipe','type','getComment','Unknown','getCurrentUser','thread-comment-data-source.config','YYYY/MM/DD\x20HH:mm','length','1982272fJtFNI','_injector','Reply','replyId','getOwnPropertyDescriptor','delete','addUser','users','solved','4668248TefsXS','OpenOrReOpen','/delete','4939446YddyLV','resolved','format','stringify','slice','_initUserSync','1110366umpKha','7dMwilo','14674104VITWXC','175430nMxnIB','rangeType','getMemberID','post','syncUpdateMutationToColla','dataSource','comments','add','reply','content','_configService','/universer-api/comment/unit/','comment','user','/edit','2078340zWCoQN','values','root','_init','rangeId','COMMENT','body','_userService','saveCommentToSnapshot','userID','_config','getUnit','parse','resolveComment','filter','subscribe','threadId','updateComment','listComments','replies','disposeWithMe','commentUpdate$','/solved','setConfig','defineProperty','requireSession','_sessionService','customRanges','createTimestamp','_httpService','unitId','personId','6ShsaHY','getUser','Delete','/reply','userId','_threadCommentModel','Edit','code','/universer-api/user/list','_threadCommentDataSourceService','find','addComment','_initDataSource','onReady','deleteComment','Add','_threadCommentDataSource','forEach','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get'];_0x4b19=function(){return _0x5931d0;};return _0x4b19();}const _0x508aae=_0x2893;(function(_0x2afc5d,_0x128712){const _0x57876c=_0x2893,_0x22f4cb=_0x2afc5d();while(!![]){try{const _0x3a6dfb=-parseInt(_0x57876c(0x1f6))/0x1*(-parseInt(_0x57876c(0x1be))/0x2)+-parseInt(_0x57876c(0x1f3))/0x3+parseInt(_0x57876c(0x1ea))/0x4+parseInt(_0x57876c(0x19e))/0x5+-parseInt(_0x57876c(0x1ed))/0x6*(-parseInt(_0x57876c(0x1f4))/0x7)+-parseInt(_0x57876c(0x1e1))/0x8+-parseInt(_0x57876c(0x1f5))/0x9;if(_0x3a6dfb===_0x128712)break;else _0x22f4cb['push'](_0x22f4cb['shift']());}catch(_0x456131){_0x22f4cb['push'](_0x22f4cb['shift']());}}}(_0x4b19,0xa6f7b));import{CommentService as _0xeab878,CollaborationSessionService as _0x2c9dad,UniverCollaborationClientPlugin as _0x214c30}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1dfa68}from'@univerjs-pro/license';import{dayjs as _0xd8a88a,UserManagerService as _0x119c71,Inject as _0x2d47f8,Injector as _0x1c26b5,Disposable as _0x5be0c8,CustomRangeType as _0x32d36d,UniverInstanceType as _0x5c1d9b,DependentOn as _0x562a8a,IConfigService as _0x385a7d,Plugin as _0x1beb87,merge as _0x5ac491}from'@univerjs/core';function _0x2893(_0x59814a,_0x1b51d1){const _0x4b19bd=_0x4b19();return _0x2893=function(_0x289352,_0x2fa73c){_0x289352=_0x289352-0x19a;let _0x480643=_0x4b19bd[_0x289352];return _0x480643;},_0x2893(_0x59814a,_0x1b51d1);}import{UniverThreadCommentUIPlugin as _0x38a385}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x10684c,IThreadCommentDataSourceService as _0x4e8f25}from'@univerjs/thread-comment';import{bufferTime as _0x31ea8f}from'rxjs';import{HTTPService as _0x2f6168}from'@univerjs/network';const W=_0x508aae(0x1d1);var I=(_0x33da7e=>(_0x33da7e[_0x33da7e[_0x508aae(0x1eb)]=0x0]=_0x508aae(0x1eb),_0x33da7e[_0x33da7e[_0x508aae(0x1d6)]=0x1]=_0x508aae(0x1d6),_0x33da7e[_0x33da7e['UNRECOGNIZED']=-0x1]=_0x508aae(0x1d0),_0x33da7e))(I||{}),v=(_0x5a04b5=>(_0x5a04b5[_0x5a04b5[_0x508aae(0x1dc)]=0x0]='Unknown',_0x5a04b5[_0x5a04b5[_0x508aae(0x1cd)]=0x1]=_0x508aae(0x1cd),_0x5a04b5[_0x5a04b5[_0x508aae(0x1e3)]=0x2]='Reply',_0x5a04b5[_0x5a04b5[_0x508aae(0x1c4)]=0x3]=_0x508aae(0x1c4),_0x5a04b5[_0x5a04b5[_0x508aae(0x1c0)]=0x4]=_0x508aae(0x1c0),_0x5a04b5[_0x5a04b5[_0x508aae(0x1d5)]=0x5]=_0x508aae(0x1d5),_0x5a04b5[_0x5a04b5['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x5a04b5))(v||{});const y=_0x128419=>_0xd8a88a(new Date(+_0x128419))[_0x508aae(0x1ef)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x343707,_0x5f4c09)=>{const _0x6f6a6b=_0x508aae,_0xd9dc4f=_0x343707[_0x6f6a6b(0x1d2)](_0x119c71),_0x260b5d=_0x343707[_0x6f6a6b(0x1d2)](_0x2f6168);_0x5f4c09['forEach'](_0x26ffc1=>{const _0x376fa7=_0x6f6a6b;_0xd9dc4f[_0x376fa7(0x1bf)](_0x26ffc1)&&_0x5f4c09[_0x376fa7(0x1e6)](_0x26ffc1);}),_0x5f4c09['size']&&(await _0x260b5d['get'](_0x6f6a6b(0x1c6),{'params':{'userIDs':[..._0x5f4c09]}}))[_0x6f6a6b(0x1a4)][_0x6f6a6b(0x1e8)][_0x6f6a6b(0x1cf)](_0x499f95=>{const _0x44d1ce=_0x6f6a6b;_0x499f95&&_0xd9dc4f[_0x44d1ce(0x1e7)](_0x499f95);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x445184,_0x1d1a2e,_0x3b889b,_0x4b5ef7)=>{const _0x39cb67=_0x508aae;for(var _0x57830d=_0x4b5ef7>0x1?void 0x0:_0x4b5ef7?K(_0x1d1a2e,_0x3b889b):_0x1d1a2e,_0x2dc935=_0x445184[_0x39cb67(0x1e0)]-0x1,_0x45f323;_0x2dc935>=0x0;_0x2dc935--)(_0x45f323=_0x445184[_0x2dc935])&&(_0x57830d=_0x45f323(_0x57830d)||_0x57830d);return _0x57830d;},p=(_0x120310,_0x1c7d42)=>(_0x842d39,_0x9bc089)=>_0x1c7d42(_0x842d39,_0x9bc089,_0x120310);let _=class extends _0x5be0c8{constructor(_0x53c56b,_0xdf6c05,_0x2bbc99,_0x3ef601){const _0xc88234=_0x508aae;super(),this[_0xc88234(0x1d3)]=_0x53c56b,this['_threadCommentModel']=_0xdf6c05,this[_0xc88234(0x1a5)]=_0x2bbc99,this[_0xc88234(0x1e2)]=_0x3ef601,this[_0xc88234(0x1a1)](),this[_0xc88234(0x1f2)]();}[_0x508aae(0x1f2)](){const _0x5ecd6a=_0x508aae;this[_0x5ecd6a(0x1b2)](this['_threadCommentModel']['commentUpdate$'][_0x5ecd6a(0x1d9)](_0x31ea8f(0x10))[_0x5ecd6a(0x1ad)](_0x273a9f=>{const _0x342ac6=_0x5ecd6a,_0x5d7d04=new Set();_0x273a9f[_0x342ac6(0x1cf)](_0x17f9cb=>{const _0x2f895f=_0x342ac6;switch(_0x17f9cb[_0x2f895f(0x1da)]){case _0x2f895f(0x1fd):{const _0xcb7f32=_0x17f9cb['payload'][_0x2f895f(0x1bd)];_0x5d7d04[_0x2f895f(0x1fd)](_0xcb7f32);break;}}}),B(this[_0x342ac6(0x1e2)],_0x5d7d04);}));}['_init'](){const _0x434195=_0x508aae;this[_0x434195(0x1b2)](this['_commentService'][_0x434195(0x1b3)][_0x434195(0x1ad)](async _0x13f74c=>{const _0x265b8f=_0x434195;var _0x14925d,_0x48778e,_0x33cefa,_0x5167f2;const _0x278794=(_0x14925d=this[_0x265b8f(0x1c3)]['getUnit'](_0x13f74c[_0x265b8f(0x1bc)])['find'](_0x166225=>_0x166225[_0x265b8f(0x1ae)]===_0x13f74c['threadId']))==null?void 0x0:_0x14925d[_0x265b8f(0x1a0)];if(!_0x278794)return;const {unitId:_0x2faac4,subUnitId:_0x3aac6f}=_0x278794;switch(_0x13f74c[_0x265b8f(0x19c)]&&this['_userService'][_0x265b8f(0x1e7)](_0x13f74c[_0x265b8f(0x19c)]),_0x13f74c[_0x265b8f(0x1da)]){case v[_0x265b8f(0x1cd)]:break;case v[_0x265b8f(0x1e3)]:{this[_0x265b8f(0x1c3)]['addComment'](_0x2faac4,_0x3aac6f,{'unitId':_0x2faac4,'subUnitId':_0x3aac6f,'ref':'','id':_0x13f74c[_0x265b8f(0x1e4)],'dT':y(+_0x13f74c[_0x265b8f(0x1ba)]),'threadId':_0x13f74c[_0x265b8f(0x1ae)],'personId':(_0x33cefa=(_0x48778e=_0x13f74c[_0x265b8f(0x19c)])==null?void 0x0:_0x48778e[_0x265b8f(0x1a7)])!=null?_0x33cefa:_0x13f74c[_0x265b8f(0x1c2)],'text':JSON[_0x265b8f(0x1aa)](_0x13f74c[_0x265b8f(0x1ff)]),'parentId':_0x278794['id']});break;}case v[_0x265b8f(0x1c0)]:{const _0x4df48e=this['_threadCommentModel'][_0x265b8f(0x1db)](_0x2faac4,_0x3aac6f,_0x13f74c[_0x265b8f(0x1e4)]);_0x4df48e&&_0x4df48e['parentId']&&this[_0x265b8f(0x1c3)][_0x265b8f(0x1cc)](_0x2faac4,_0x3aac6f,_0x13f74c[_0x265b8f(0x1e4)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x2faac4,_0x3aac6f,{'commentId':_0x13f74c[_0x265b8f(0x1e4)],'text':JSON['parse'](_0x13f74c[_0x265b8f(0x1ff)])});break;}case v[_0x265b8f(0x1d5)]:{const _0x534cf4=(_0x5167f2=this['_threadCommentModel'][_0x265b8f(0x1a9)](_0x13f74c[_0x265b8f(0x1bc)])[_0x265b8f(0x1c8)](_0x449f44=>_0x449f44[_0x265b8f(0x1ae)]===_0x13f74c[_0x265b8f(0x1ae)]))==null?void 0x0:_0x5167f2['root'];_0x534cf4&&this['_threadCommentModel'][_0x265b8f(0x1ab)](_0x2faac4,_0x3aac6f,_0x534cf4['id'],_0x13f74c[_0x265b8f(0x1e9)]===I[_0x265b8f(0x1d6)]);break;}}}));}};_=V([p(0x0,_0x2d47f8(_0xeab878)),p(0x1,_0x2d47f8(_0x10684c)),p(0x2,_0x2d47f8(_0x119c71)),p(0x3,_0x2d47f8(_0x1c26b5))],_);const z=_0x508aae(0x1de),O={};var k=Object[_0x508aae(0x1e5)],Q=(_0x262daa,_0x4ccfd9,_0x49b84a,_0x1b91be)=>{const _0x3720a2=_0x508aae;for(var _0x385990=_0x1b91be>0x1?void 0x0:_0x1b91be?k(_0x4ccfd9,_0x49b84a):_0x4ccfd9,_0x18cc7a=_0x262daa[_0x3720a2(0x1e0)]-0x1,_0x2c6a56;_0x18cc7a>=0x0;_0x18cc7a--)(_0x2c6a56=_0x262daa[_0x18cc7a])&&(_0x385990=_0x2c6a56(_0x385990)||_0x385990);return _0x385990;},b=(_0x28c0ab,_0x1d8df3)=>(_0x4c813f,_0x1591cc)=>_0x1d8df3(_0x4c813f,_0x1591cc,_0x28c0ab);function X(_0x320956,_0x1cb8b6){const _0x5ebc58=_0x508aae,_0x521ba8=_0x320956[_0x5ebc58(0x1b1)][0x0];return{..._0x1cb8b6,'id':_0x521ba8[_0x5ebc58(0x1e4)],'resolved':_0x320956[_0x5ebc58(0x1e9)]===0x1,'dT':y(_0x521ba8[_0x5ebc58(0x1ba)]),'personId':_0x521ba8[_0x5ebc58(0x1c2)],'threadId':_0x521ba8[_0x5ebc58(0x1ae)]};}function ee(_0x22c516,_0x1004b8,_0x13bf78){const _0x467f3d=_0x508aae;var _0x5eeeac,_0x1b127c;if(((_0x1b127c=(_0x5eeeac=_0x22c516==null?void 0x0:_0x22c516[_0x467f3d(0x1b1)])==null?void 0x0:_0x5eeeac[_0x467f3d(0x1e0)])!=null?_0x1b127c:0x0)>0x0){const _0x3f4d9c=(_0x59af77,_0x17ab0c)=>({'id':_0x59af77[_0x467f3d(0x1e4)],'threadId':_0x59af77[_0x467f3d(0x1ae)],'dT':y(_0x59af77[_0x467f3d(0x1ba)]),'personId':_0x59af77['userId'],'resolved':_0x22c516[_0x467f3d(0x1e9)]===I[_0x467f3d(0x1d6)],'unitId':_0x1004b8,'subUnitId':_0x13bf78,'text':JSON[_0x467f3d(0x1aa)](_0x59af77['content']),'parentId':_0x17ab0c}),_0x514e33=_0x3f4d9c(_0x22c516[_0x467f3d(0x1b1)][0x0]);return{..._0x514e33,'children':_0x22c516[_0x467f3d(0x1b1)][_0x467f3d(0x1f1)](0x1)['map'](_0x5b8212=>_0x3f4d9c(_0x5b8212,_0x514e33['id']))};}return null;}let S=class{constructor(_0x167b26,_0x489152,_0x4bc89f){const _0x131ab4=_0x508aae;this['_httpService']=_0x167b26,this['_userService']=_0x489152,this[_0x131ab4(0x1b8)]=_0x4bc89f;}async[_0x508aae(0x1c9)](_0x2c0f8b){const _0x520774=_0x508aae;var _0x237f6c,_0x3441f3;const {parentId:_0x25dd13,unitId:_0x275fc9,text:_0x2ab6f6,threadId:_0x581f53}=_0x2c0f8b,_0x458414=(_0x3441f3=(_0x237f6c=_0x2ab6f6[_0x520774(0x1b9)])==null?void 0x0:_0x237f6c[_0x520774(0x1ac)](_0x351cd5=>_0x351cd5[_0x520774(0x1f7)]===_0x32d36d[_0x520774(0x1a3)])[_0x520774(0x1d4)](_0x559687=>_0x559687[_0x520774(0x1a2)]))!=null?_0x3441f3:[],_0x6aa74=JSON[_0x520774(0x1f0)](_0x2ab6f6),_0x444226=(await this[_0x520774(0x1b8)][_0x520774(0x1b7)](_0x275fc9))['getMemberID']();if(_0x25dd13){const _0x187012={'memberId':_0x444226,'unitId':_0x275fc9,'content':_0x6aa74,'mention':_0x458414,'threadId':_0x581f53},_0x1049f5=(await this[_0x520774(0x1bb)]['post'](_0x520774(0x19a)+_0x275fc9+_0x520774(0x1c1),{'body':_0x187012}))[_0x520774(0x1a4)][_0x520774(0x1fe)];return{..._0x2c0f8b,'id':_0x1049f5[_0x520774(0x1e4)],'dT':_0xd8a88a(+_0x1049f5[_0x520774(0x1ba)])['format'](_0x520774(0x1df)),'personId':_0x1049f5[_0x520774(0x1c2)]};}else{const _0x6d3c2b={'memberId':_0x444226,'unitId':_0x275fc9,'content':_0x6aa74,'mention':_0x458414},_0x5d4b05=await this[_0x520774(0x1bb)][_0x520774(0x1f9)](_0x520774(0x19a)+_0x275fc9+'/add',{'body':_0x6d3c2b});return X(_0x5d4b05[_0x520774(0x1a4)][_0x520774(0x19b)],_0x2c0f8b);}}async[_0x508aae(0x1af)](_0x30447c){const _0x248109=_0x508aae;var _0x4b7c38,_0x213bc0;const {text:_0x3a98dd,unitId:_0x3db28f}=_0x30447c,_0x29139e=(_0x213bc0=(_0x4b7c38=_0x3a98dd[_0x248109(0x1b9)])==null?void 0x0:_0x4b7c38[_0x248109(0x1ac)](_0x51c157=>_0x51c157['rangeType']===_0x32d36d[_0x248109(0x1a3)])['map'](_0xc952b7=>_0xc952b7[_0x248109(0x1a2)]))!=null?_0x213bc0:[],_0x689371=JSON[_0x248109(0x1f0)](_0x3a98dd),_0x7279b=_0x30447c['threadId'],_0x48b622=_0x30447c['id'],_0x4efb5c={'memberId':(await this[_0x248109(0x1b8)]['requireSession'](_0x3db28f))[_0x248109(0x1f8)](),'unitId':_0x3db28f,'threadId':_0x7279b,'mention':_0x29139e,'content':_0x689371,'replyId':_0x48b622},_0x388cce=await this[_0x248109(0x1bb)]['post'](_0x248109(0x19a)+_0x3db28f+_0x248109(0x19d),{'body':_0x4efb5c});return!_0x388cce[_0x248109(0x1a4)]['error']||_0x388cce[_0x248109(0x1a4)][_0x248109(0x1d8)][_0x248109(0x1c5)]===0x1;}async['resolveComment'](_0x4631a6){const _0x747b4=_0x508aae,{unitId:_0x1e311c}=_0x4631a6,_0x268394=_0x4631a6[_0x747b4(0x1ae)],_0x5c015d={'memberId':this[_0x747b4(0x1a5)][_0x747b4(0x1dd)]()[_0x747b4(0x1a7)],'unitId':_0x1e311c,'threadId':_0x268394,'solved':_0x4631a6[_0x747b4(0x1ee)]?I[_0x747b4(0x1d6)]:I[_0x747b4(0x1eb)]},_0x11e06e=await this[_0x747b4(0x1bb)][_0x747b4(0x1f9)]('/universer-api/comment/unit/'+_0x1e311c+_0x747b4(0x1b4),{'body':_0x5c015d});return!_0x11e06e['body'][_0x747b4(0x1d8)]||_0x11e06e[_0x747b4(0x1a4)][_0x747b4(0x1d8)]['code']===0x1;}async['deleteComment'](_0x42999f,_0x3b61bb,_0x202a1c,_0x5694d8){const _0x448b1f=_0x508aae,_0x7ee3d={'memberId':(await this['_sessionService'][_0x448b1f(0x1b7)](_0x42999f))[_0x448b1f(0x1f8)](),'threadId':_0x202a1c,'replyId':_0x5694d8,'unitId':_0x42999f},_0x577a18=await this[_0x448b1f(0x1bb)][_0x448b1f(0x1f9)](_0x448b1f(0x19a)+_0x42999f+_0x448b1f(0x1ec),{'body':_0x7ee3d});return!_0x577a18['body'][_0x448b1f(0x1d8)]||_0x577a18[_0x448b1f(0x1a4)][_0x448b1f(0x1d8)][_0x448b1f(0x1c5)]===0x1;}async[_0x508aae(0x1b0)](_0x219944,_0x1afa20,_0x58b5d3){const _0x2b20c4=_0x508aae,_0x28d977={'unitId':_0x219944,'threadId':_0x58b5d3},_0x5e4299=await this[_0x2b20c4(0x1bb)][_0x2b20c4(0x1f9)]('/universer-api/comment/unit/'+_0x219944+'/list',{'body':_0x28d977}),_0x1ba0c8=_0x58b5d3[_0x2b20c4(0x1d4)](_0x212dce=>ee(_0x5e4299[_0x2b20c4(0x1a4)][_0x2b20c4(0x1fc)][_0x212dce],_0x219944,_0x1afa20))[_0x2b20c4(0x1ac)](Boolean);return Object[_0x2b20c4(0x19f)](_0x5e4299[_0x2b20c4(0x1a4)][_0x2b20c4(0x1e8)])['forEach'](_0x450707=>{this['_userService']['addUser'](_0x450707);}),_0x1ba0c8;}[_0x508aae(0x1a6)](_0x4cf104){const _0x35ebd5=_0x508aae;return{'id':_0x4cf104['id'],'threadId':_0x4cf104['threadId'],'ref':_0x4cf104[_0x35ebd5(0x1d7)]};}};S=Q([b(0x0,_0x2d47f8(_0x2f6168)),b(0x1,_0x2d47f8(_0x119c71)),b(0x2,_0x2d47f8(_0x2c9dad))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x227392,_0x39e32c,_0x3f82b0,_0x47faff)=>{for(var _0xf21c84=_0x47faff>0x1?void 0x0:_0x47faff?re(_0x39e32c,_0x3f82b0):_0x39e32c,_0x21fcf4=_0x227392['length']-0x1,_0x571f80;_0x21fcf4>=0x0;_0x21fcf4--)(_0x571f80=_0x227392[_0x21fcf4])&&(_0xf21c84=_0x571f80(_0xf21c84)||_0xf21c84);return _0xf21c84;},M=(_0x43aabe,_0x516a2d)=>(_0x490fea,_0x5ec390)=>_0x516a2d(_0x490fea,_0x5ec390,_0x43aabe);let f=class extends _0x5be0c8{constructor(_0x297072,_0x133254){const _0x2667ea=_0x508aae;super(),this['_threadCommentDataSourceService']=_0x297072,this[_0x2667ea(0x1ce)]=_0x133254,this[_0x2667ea(0x1ca)]();}[_0x508aae(0x1ca)](){const _0x5582d0=_0x508aae;this['_threadCommentDataSourceService'][_0x5582d0(0x1fb)]=this['_threadCommentDataSource'],this[_0x5582d0(0x1c7)][_0x5582d0(0x1fa)]=!0x1;}};f=te([M(0x0,_0x4e8f25),M(0x1,_0x2d47f8(S))],f);var se=Object[_0x508aae(0x1b6)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x23d1ab,_0x31b67d,_0xd25b78)=>_0x31b67d in _0x23d1ab?se(_0x23d1ab,_0x31b67d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd25b78}):_0x23d1ab[_0x31b67d]=_0xd25b78,ie=(_0x16c325,_0x10aa17,_0x2c3385,_0x2eef3e)=>{const _0x1debec=_0x508aae;for(var _0x109e9b=_0x2eef3e>0x1?void 0x0:_0x2eef3e?oe(_0x10aa17,_0x2c3385):_0x10aa17,_0x3f1df5=_0x16c325[_0x1debec(0x1e0)]-0x1,_0x361cf8;_0x3f1df5>=0x0;_0x3f1df5--)(_0x361cf8=_0x16c325[_0x3f1df5])&&(_0x109e9b=_0x361cf8(_0x109e9b)||_0x109e9b);return _0x109e9b;},N=(_0x4ed43c,_0x58f985)=>(_0x3e0db6,_0x474a95)=>_0x58f985(_0x3e0db6,_0x474a95,_0x4ed43c),$=(_0x4558bc,_0x4eda8d,_0x2810db)=>ne(_0x4558bc,typeof _0x4eda8d!='symbol'?_0x4eda8d+'':_0x4eda8d,_0x2810db);let g=class extends _0x1beb87{constructor(_0x3814ac=O,_0x554fd1,_0x52331e){const _0x29b9a4=_0x508aae;super(),this[_0x29b9a4(0x1a8)]=_0x3814ac,this[_0x29b9a4(0x1e2)]=_0x554fd1,this[_0x29b9a4(0x200)]=_0x52331e;const {..._0x413c91}=_0x5ac491({},O,this[_0x29b9a4(0x1a8)]);this[_0x29b9a4(0x200)][_0x29b9a4(0x1b5)](z,_0x413c91);}['onStarting'](){const _0x2539d0=_0x508aae;[[S],[f],[_]][_0x2539d0(0x1cf)](_0x5b9e1f=>{const _0x77e87d=_0x2539d0;this[_0x77e87d(0x1e2)][_0x77e87d(0x1fd)](_0x5b9e1f);});}[_0x508aae(0x1cb)](){const _0x26803a=_0x508aae;this[_0x26803a(0x1e2)][_0x26803a(0x1d2)](f),this[_0x26803a(0x1e2)][_0x26803a(0x1d2)](_);}};$(g,'pluginName',W),$(g,'type',_0x5c1d9b['UNIVER_UNKNOWN']),g=ie([_0x562a8a(_0x38a385,_0x214c30,_0x1dfa68),N(0x1,_0x2d47f8(_0x1c26b5)),N(0x2,_0x385a7d)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x43b6(){const _0xef9192=['solved','COMMENT','users','resolved','length','replyId','UniverLicensePlugin','Add','exports','root','userId','post','Plugin','format','stringify','/edit','parse','replies','updateComment','_userService','getUnit','UniverProCollaborationClient','UniverThreadComment','filter','1141bviBpN','getOwnPropertyDescriptor','saveCommentToSnapshot','user','disposeWithMe','/solved','rangeId','getMemberID','resolveComment','10zfECVt','payload','Injector','Unknown','@univerjs/thread-comment-ui','values','ThreadCommentModel','Delete','map','4883112UJMIkP','userID','onStarting','bufferTime','thread-comment-data-source.config','409904fnSnzq','ref','Inject','UniverThreadCommentUi','1420359XwfLXu','UniverThreadCommentUIPlugin','UNIVER_UNKNOWN','UniverInstanceType','/add','DependentOn','10579BjONCy','YYYY/MM/DD\x20HH:mm','rangeType','add','_configService','rxjs','slice','_commentService','@univerjs/core','UniverProLicense','CollaborationSessionService','UNRECOGNIZED','unitId','1449789WDzaiH','Solved','dayjs','comments','forEach','_threadCommentDataSource','merge','Edit','HTTPService','code','amd','CustomRangeType','type','object','subscribe','_injector','UniverCollaborationClientPlugin','Solve','CommentService','body','UniverNetwork','@univerjs-pro/license','Reply','@univerjs/network','addUser','@univerjs/thread-comment','UniverCore','deleteComment','_sessionService','dataSource','get','symbol','toStringTag','Disposable','_init','onReady','_threadCommentModel','addComment','getCurrentUser','_threadCommentDataSourceService','OpenOrReOpen','getUser','threadId','_initUserSync','30tkyFrd','UniverThreadCommentDataSourcePlugin','error','requireSession','_config','createTimestamp','defineProperty','36192erMutX','/delete','comment','/universer-api/user/list','_httpService','_initDataSource','6570117GCYWST','function','86hjDQyc','content','/universer-api/comment/unit/','UserManagerService','Module'];_0x43b6=function(){return _0xef9192;};return _0x43b6();}function _0x2263(_0x26951e,_0x51504c){const _0x43b6ef=_0x43b6();return _0x2263=function(_0x226364,_0x39c559){_0x226364=_0x226364-0x1a3;let _0x4e8dc4=_0x43b6ef[_0x226364];return _0x4e8dc4;},_0x2263(_0x26951e,_0x51504c);}(function(_0xd14ae0,_0xf243e5){const _0x20ddf4=_0x2263,_0x5068ca=_0xd14ae0();while(!![]){try{const _0x3ed83e=parseInt(_0x20ddf4(0x1c1))/0x1*(parseInt(_0x20ddf4(0x209))/0x2)+-parseInt(_0x20ddf4(0x1bb))/0x3+-parseInt(_0x20ddf4(0x1b7))/0x4*(parseInt(_0x20ddf4(0x1a9))/0x5)+-parseInt(_0x20ddf4(0x201))/0x6*(parseInt(_0x20ddf4(0x226))/0x7)+parseInt(_0x20ddf4(0x1b2))/0x8+parseInt(_0x20ddf4(0x207))/0x9+parseInt(_0x20ddf4(0x1fa))/0xa*(parseInt(_0x20ddf4(0x1ce))/0xb);if(_0x3ed83e===_0xf243e5)break;else _0x5068ca['push'](_0x5068ca['shift']());}catch(_0x191611){_0x5068ca['push'](_0x5068ca['shift']());}}}(_0x43b6,0x812b3),function(_0x5860bf,_0x298227){const _0xa7eb1e=_0x2263;typeof exports==_0xa7eb1e(0x1db)&&typeof module<'u'?_0x298227(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0xa7eb1e(0x208)&&define[_0xa7eb1e(0x1d8)]?define([_0xa7eb1e(0x216),'@univerjs-pro/collaboration-client',_0xa7eb1e(0x1e3),_0xa7eb1e(0x1c9),_0xa7eb1e(0x1ad),_0xa7eb1e(0x1e7),_0xa7eb1e(0x1c6),_0xa7eb1e(0x1e5)],_0x298227):(_0x5860bf=typeof globalThis<'u'?globalThis:_0x5860bf||self,_0x298227(_0x5860bf['UniverProThreadCommentDatasource']={},_0x5860bf[_0xa7eb1e(0x223)],_0x5860bf[_0xa7eb1e(0x1ca)],_0x5860bf[_0xa7eb1e(0x1e8)],_0x5860bf[_0xa7eb1e(0x1ba)],_0x5860bf[_0xa7eb1e(0x224)],_0x5860bf[_0xa7eb1e(0x1c6)],_0x5860bf[_0xa7eb1e(0x1e2)]));}(this,function(_0x1364c8,_0x39b02d,_0x2c286d,_0x4fe2f8,_0x4dd2a8,_0x335fb0,_0x29d836,_0x2d13c2){'use strict';const _0x621c8a=_0x2263;const _0x4696c5='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x589ea0=(_0xdf4b59=>(_0xdf4b59[_0xdf4b59[_0x621c8a(0x1f6)]=0x0]='OpenOrReOpen',_0xdf4b59[_0xdf4b59[_0x621c8a(0x1cf)]=0x1]=_0x621c8a(0x1cf),_0xdf4b59[_0xdf4b59['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xdf4b59))(_0x589ea0||{}),_0x18e293=(_0xbd6438=>(_0xbd6438[_0xbd6438['Unknown']=0x0]=_0x621c8a(0x1ac),_0xbd6438[_0xbd6438['Add']=0x1]=_0x621c8a(0x215),_0xbd6438[_0xbd6438[_0x621c8a(0x1e4)]=0x2]=_0x621c8a(0x1e4),_0xbd6438[_0xbd6438[_0x621c8a(0x1d5)]=0x3]=_0x621c8a(0x1d5),_0xbd6438[_0xbd6438[_0x621c8a(0x1b0)]=0x4]=_0x621c8a(0x1b0),_0xbd6438[_0xbd6438[_0x621c8a(0x1df)]=0x5]=_0x621c8a(0x1df),_0xbd6438[_0xbd6438['UNRECOGNIZED']=-0x1]=_0x621c8a(0x1cc),_0xbd6438))(_0x18e293||{});const _0x34ad45=_0x5444c3=>_0x4fe2f8[_0x621c8a(0x1d0)](new Date(+_0x5444c3))[_0x621c8a(0x21b)](_0x621c8a(0x1c2)),_0x32d783=async(_0x352d11,_0x3cffdd)=>{const _0x4697b0=_0x621c8a,_0x2bd54d=_0x352d11[_0x4697b0(0x1ec)](_0x4fe2f8[_0x4697b0(0x20c)]),_0x543cd3=_0x352d11[_0x4697b0(0x1ec)](_0x2d13c2[_0x4697b0(0x1d6)]);_0x3cffdd[_0x4697b0(0x1d2)](_0x5f21bd=>{const _0x2e3569=_0x4697b0;_0x2bd54d[_0x2e3569(0x1f7)](_0x5f21bd)&&_0x3cffdd['delete'](_0x5f21bd);}),_0x3cffdd['size']&&(await _0x543cd3[_0x4697b0(0x1ec)](_0x4697b0(0x204),{'params':{'userIDs':[..._0x3cffdd]}}))[_0x4697b0(0x1e1)][_0x4697b0(0x210)]['forEach'](_0x40778b=>{const _0x581ad5=_0x4697b0;_0x40778b&&_0x2bd54d[_0x581ad5(0x1e6)](_0x40778b);});};var _0x48a680=Object[_0x621c8a(0x227)],_0x2b4e8f=(_0x1e14bd,_0x410822,_0x1a27e2,_0x195c04)=>{const _0x29c8cb=_0x621c8a;for(var _0x3b7566=_0x195c04>0x1?void 0x0:_0x195c04?_0x48a680(_0x410822,_0x1a27e2):_0x410822,_0x5eb332=_0x1e14bd[_0x29c8cb(0x212)]-0x1,_0x8d7e0f;_0x5eb332>=0x0;_0x5eb332--)(_0x8d7e0f=_0x1e14bd[_0x5eb332])&&(_0x3b7566=_0x8d7e0f(_0x3b7566)||_0x3b7566);return _0x3b7566;},_0x579027=(_0x46c716,_0x483230)=>(_0x590855,_0x533cfa)=>_0x483230(_0x590855,_0x533cfa,_0x46c716);let _0x479b42=class extends _0x4fe2f8[_0x621c8a(0x1ef)]{constructor(_0x5a0169,_0x245875,_0x241c80,_0x562fa5){const _0x46e933=_0x621c8a;super(),this[_0x46e933(0x1c8)]=_0x5a0169,this[_0x46e933(0x1f2)]=_0x245875,this[_0x46e933(0x221)]=_0x241c80,this['_injector']=_0x562fa5,this[_0x46e933(0x1f0)](),this['_initUserSync']();}[_0x621c8a(0x1f9)](){const _0x10aa3b=_0x621c8a;this['disposeWithMe'](this[_0x10aa3b(0x1f2)]['commentUpdate$']['pipe'](_0x29d836[_0x10aa3b(0x1b5)](0x10))[_0x10aa3b(0x1dc)](_0x82182a=>{const _0x8f9877=_0x10aa3b,_0x2ae634=new Set();_0x82182a[_0x8f9877(0x1d2)](_0x293d12=>{const _0x2d7df9=_0x8f9877;switch(_0x293d12[_0x2d7df9(0x1da)]){case'add':{const _0x2775eb=_0x293d12[_0x2d7df9(0x1aa)]['personId'];_0x2ae634[_0x2d7df9(0x1c4)](_0x2775eb);break;}}}),_0x32d783(this['_injector'],_0x2ae634);}));}[_0x621c8a(0x1f0)](){const _0x3fbc45=_0x621c8a;this[_0x3fbc45(0x1a4)](this[_0x3fbc45(0x1c8)]['commentUpdate$'][_0x3fbc45(0x1dc)](async _0x48d7a8=>{const _0x5311f1=_0x3fbc45;var _0xcf88c0,_0x5c0372,_0xae7ec2,_0x11c52a;const _0x555409=(_0xcf88c0=this['_threadCommentModel'][_0x5311f1(0x222)](_0x48d7a8[_0x5311f1(0x1cd)])['find'](_0x1ae19b=>_0x1ae19b[_0x5311f1(0x1f8)]===_0x48d7a8[_0x5311f1(0x1f8)]))==null?void 0x0:_0xcf88c0[_0x5311f1(0x217)];if(!_0x555409)return;const {unitId:_0x2d61a9,subUnitId:_0x70e6f6}=_0x555409;switch(_0x48d7a8[_0x5311f1(0x1a3)]&&this[_0x5311f1(0x221)]['addUser'](_0x48d7a8[_0x5311f1(0x1a3)]),_0x48d7a8[_0x5311f1(0x1da)]){case _0x18e293[_0x5311f1(0x215)]:break;case _0x18e293['Reply']:{this['_threadCommentModel'][_0x5311f1(0x1f3)](_0x2d61a9,_0x70e6f6,{'unitId':_0x2d61a9,'subUnitId':_0x70e6f6,'ref':'','id':_0x48d7a8['replyId'],'dT':_0x34ad45(+_0x48d7a8[_0x5311f1(0x1ff)]),'threadId':_0x48d7a8[_0x5311f1(0x1f8)],'personId':(_0xae7ec2=(_0x5c0372=_0x48d7a8[_0x5311f1(0x1a3)])==null?void 0x0:_0x5c0372[_0x5311f1(0x1b3)])!=null?_0xae7ec2:_0x48d7a8[_0x5311f1(0x218)],'text':JSON[_0x5311f1(0x21e)](_0x48d7a8[_0x5311f1(0x20a)]),'parentId':_0x555409['id']});break;}case _0x18e293[_0x5311f1(0x1b0)]:{const _0x392d86=this[_0x5311f1(0x1f2)]['getComment'](_0x2d61a9,_0x70e6f6,_0x48d7a8[_0x5311f1(0x213)]);_0x392d86&&_0x392d86['parentId']&&this['_threadCommentModel'][_0x5311f1(0x1e9)](_0x2d61a9,_0x70e6f6,_0x48d7a8[_0x5311f1(0x213)]);break;}case _0x18e293[_0x5311f1(0x1d5)]:{this[_0x5311f1(0x1f2)][_0x5311f1(0x220)](_0x2d61a9,_0x70e6f6,{'commentId':_0x48d7a8['replyId'],'text':JSON['parse'](_0x48d7a8['content'])});break;}case _0x18e293[_0x5311f1(0x1df)]:{const _0x277692=(_0x11c52a=this['_threadCommentModel'][_0x5311f1(0x222)](_0x48d7a8[_0x5311f1(0x1cd)])['find'](_0x8967a7=>_0x8967a7[_0x5311f1(0x1f8)]===_0x48d7a8[_0x5311f1(0x1f8)]))==null?void 0x0:_0x11c52a[_0x5311f1(0x217)];_0x277692&&this['_threadCommentModel']['resolveComment'](_0x2d61a9,_0x70e6f6,_0x277692['id'],_0x48d7a8[_0x5311f1(0x20e)]===_0x589ea0[_0x5311f1(0x1cf)]);break;}}}));}};_0x479b42=_0x2b4e8f([_0x579027(0x0,_0x4fe2f8[_0x621c8a(0x1b9)](_0x39b02d[_0x621c8a(0x1e0)])),_0x579027(0x1,_0x4fe2f8[_0x621c8a(0x1b9)](_0x335fb0[_0x621c8a(0x1af)])),_0x579027(0x2,_0x4fe2f8[_0x621c8a(0x1b9)](_0x4fe2f8[_0x621c8a(0x20c)])),_0x579027(0x3,_0x4fe2f8[_0x621c8a(0x1b9)](_0x4fe2f8[_0x621c8a(0x1ab)]))],_0x479b42);const _0x492efb=_0x621c8a(0x1b6),_0x27617e={};var _0x290262=Object[_0x621c8a(0x227)],_0xe659bf=(_0x3000e6,_0x57c87c,_0x25aaef,_0x25c6a1)=>{const _0x58c15f=_0x621c8a;for(var _0x370b6e=_0x25c6a1>0x1?void 0x0:_0x25c6a1?_0x290262(_0x57c87c,_0x25aaef):_0x57c87c,_0xa18c26=_0x3000e6[_0x58c15f(0x212)]-0x1,_0x399e0b;_0xa18c26>=0x0;_0xa18c26--)(_0x399e0b=_0x3000e6[_0xa18c26])&&(_0x370b6e=_0x399e0b(_0x370b6e)||_0x370b6e);return _0x370b6e;},_0x3f08a2=(_0x556b74,_0x1c4725)=>(_0x2869fe,_0x252775)=>_0x1c4725(_0x2869fe,_0x252775,_0x556b74);function _0x13c38e(_0x5031a2,_0x170e2f){const _0x59d96f=_0x621c8a,_0xea9d2e=_0x5031a2[_0x59d96f(0x21f)][0x0];return{..._0x170e2f,'id':_0xea9d2e[_0x59d96f(0x213)],'resolved':_0x5031a2[_0x59d96f(0x20e)]===0x1,'dT':_0x34ad45(_0xea9d2e['createTimestamp']),'personId':_0xea9d2e[_0x59d96f(0x218)],'threadId':_0xea9d2e[_0x59d96f(0x1f8)]};}function _0x286105(_0x51c281,_0x40367e,_0x386aa4){const _0x4244bf=_0x621c8a;var _0x389807,_0x41fe8c;if(((_0x41fe8c=(_0x389807=_0x51c281==null?void 0x0:_0x51c281[_0x4244bf(0x21f)])==null?void 0x0:_0x389807[_0x4244bf(0x212)])!=null?_0x41fe8c:0x0)>0x0){const _0x11783f=(_0x5d8e4b,_0x1bb702)=>({'id':_0x5d8e4b[_0x4244bf(0x213)],'threadId':_0x5d8e4b[_0x4244bf(0x1f8)],'dT':_0x34ad45(_0x5d8e4b[_0x4244bf(0x1ff)]),'personId':_0x5d8e4b['userId'],'resolved':_0x51c281[_0x4244bf(0x20e)]===_0x589ea0[_0x4244bf(0x1cf)],'unitId':_0x40367e,'subUnitId':_0x386aa4,'text':JSON['parse'](_0x5d8e4b['content']),'parentId':_0x1bb702}),_0x7ceb7e=_0x11783f(_0x51c281[_0x4244bf(0x21f)][0x0]);return{..._0x7ceb7e,'children':_0x51c281[_0x4244bf(0x21f)][_0x4244bf(0x1c7)](0x1)[_0x4244bf(0x1b1)](_0x32c0cf=>_0x11783f(_0x32c0cf,_0x7ceb7e['id']))};}return null;}let _0x14208e=class{constructor(_0x3797a7,_0x2498f7,_0x367310){const _0x1abdfb=_0x621c8a;this[_0x1abdfb(0x205)]=_0x3797a7,this[_0x1abdfb(0x221)]=_0x2498f7,this[_0x1abdfb(0x1ea)]=_0x367310;}async[_0x621c8a(0x1f3)](_0x216feb){const _0x1aabdd=_0x621c8a;var _0x112b29,_0x2d497b;const {parentId:_0x57904f,unitId:_0x2b53c9,text:_0x4a91ef,threadId:_0x24a3ab}=_0x216feb,_0x227674=(_0x2d497b=(_0x112b29=_0x4a91ef['customRanges'])==null?void 0x0:_0x112b29[_0x1aabdd(0x225)](_0x52d885=>_0x52d885[_0x1aabdd(0x1c3)]===_0x4fe2f8[_0x1aabdd(0x1d9)][_0x1aabdd(0x20f)])['map'](_0x370e17=>_0x370e17[_0x1aabdd(0x1a6)]))!=null?_0x2d497b:[],_0x15bc49=JSON[_0x1aabdd(0x21c)](_0x4a91ef),_0x4bcd87=(await this[_0x1aabdd(0x1ea)][_0x1aabdd(0x1fd)](_0x2b53c9))[_0x1aabdd(0x1a7)]();if(_0x57904f){const _0x4a02bb={'memberId':_0x4bcd87,'unitId':_0x2b53c9,'content':_0x15bc49,'mention':_0x227674,'threadId':_0x24a3ab},_0x2da8d9=(await this[_0x1aabdd(0x205)][_0x1aabdd(0x219)](_0x1aabdd(0x20b)+_0x2b53c9+'/reply',{'body':_0x4a02bb}))[_0x1aabdd(0x1e1)]['reply'];return{..._0x216feb,'id':_0x2da8d9[_0x1aabdd(0x213)],'dT':_0x4fe2f8['dayjs'](+_0x2da8d9[_0x1aabdd(0x1ff)])['format'](_0x1aabdd(0x1c2)),'personId':_0x2da8d9[_0x1aabdd(0x218)]};}else{const _0x2cc378={'memberId':_0x4bcd87,'unitId':_0x2b53c9,'content':_0x15bc49,'mention':_0x227674},_0x5da2f2=await this[_0x1aabdd(0x205)][_0x1aabdd(0x219)](_0x1aabdd(0x20b)+_0x2b53c9+_0x1aabdd(0x1bf),{'body':_0x2cc378});return _0x13c38e(_0x5da2f2[_0x1aabdd(0x1e1)][_0x1aabdd(0x203)],_0x216feb);}}async[_0x621c8a(0x220)](_0xc994e9){const _0x491d2e=_0x621c8a;var _0xb15531,_0x36ac69;const {text:_0x418561,unitId:_0x26af0d}=_0xc994e9,_0x11a4b1=(_0x36ac69=(_0xb15531=_0x418561['customRanges'])==null?void 0x0:_0xb15531['filter'](_0x52e0cc=>_0x52e0cc[_0x491d2e(0x1c3)]===_0x4fe2f8[_0x491d2e(0x1d9)][_0x491d2e(0x20f)])[_0x491d2e(0x1b1)](_0x1940cc=>_0x1940cc['rangeId']))!=null?_0x36ac69:[],_0xfd37db=JSON[_0x491d2e(0x21c)](_0x418561),_0x4cc4bf=_0xc994e9[_0x491d2e(0x1f8)],_0x5f0442=_0xc994e9['id'],_0x5e5958={'memberId':(await this[_0x491d2e(0x1ea)][_0x491d2e(0x1fd)](_0x26af0d))[_0x491d2e(0x1a7)](),'unitId':_0x26af0d,'threadId':_0x4cc4bf,'mention':_0x11a4b1,'content':_0xfd37db,'replyId':_0x5f0442},_0x5058ed=await this['_httpService'][_0x491d2e(0x219)](_0x491d2e(0x20b)+_0x26af0d+_0x491d2e(0x21d),{'body':_0x5e5958});return!_0x5058ed[_0x491d2e(0x1e1)][_0x491d2e(0x1fc)]||_0x5058ed[_0x491d2e(0x1e1)][_0x491d2e(0x1fc)][_0x491d2e(0x1d7)]===0x1;}async[_0x621c8a(0x1a8)](_0x521bd1){const _0x29cd5d=_0x621c8a,{unitId:_0x35773f}=_0x521bd1,_0x531f53=_0x521bd1[_0x29cd5d(0x1f8)],_0x44a999={'memberId':this[_0x29cd5d(0x221)][_0x29cd5d(0x1f4)]()['userID'],'unitId':_0x35773f,'threadId':_0x531f53,'solved':_0x521bd1[_0x29cd5d(0x211)]?_0x589ea0[_0x29cd5d(0x1cf)]:_0x589ea0[_0x29cd5d(0x1f6)]},_0x2048bb=await this[_0x29cd5d(0x205)][_0x29cd5d(0x219)](_0x29cd5d(0x20b)+_0x35773f+_0x29cd5d(0x1a5),{'body':_0x44a999});return!_0x2048bb[_0x29cd5d(0x1e1)][_0x29cd5d(0x1fc)]||_0x2048bb['body'][_0x29cd5d(0x1fc)]['code']===0x1;}async[_0x621c8a(0x1e9)](_0x581cb1,_0x2c0d3d,_0x2ee973,_0x3a5334){const _0x43b918=_0x621c8a,_0x1ef600={'memberId':(await this[_0x43b918(0x1ea)][_0x43b918(0x1fd)](_0x581cb1))[_0x43b918(0x1a7)](),'threadId':_0x2ee973,'replyId':_0x3a5334,'unitId':_0x581cb1},_0x323014=await this[_0x43b918(0x205)][_0x43b918(0x219)](_0x43b918(0x20b)+_0x581cb1+_0x43b918(0x202),{'body':_0x1ef600});return!_0x323014[_0x43b918(0x1e1)]['error']||_0x323014[_0x43b918(0x1e1)][_0x43b918(0x1fc)][_0x43b918(0x1d7)]===0x1;}async['listComments'](_0x23d2ac,_0x568b3d,_0x63bf56){const _0x40bc64=_0x621c8a,_0xe15183={'unitId':_0x23d2ac,'threadId':_0x63bf56},_0x35e970=await this[_0x40bc64(0x205)][_0x40bc64(0x219)]('/universer-api/comment/unit/'+_0x23d2ac+'/list',{'body':_0xe15183}),_0x1b4263=_0x63bf56[_0x40bc64(0x1b1)](_0x50611d=>_0x286105(_0x35e970['body'][_0x40bc64(0x1d1)][_0x50611d],_0x23d2ac,_0x568b3d))[_0x40bc64(0x225)](Boolean);return Object[_0x40bc64(0x1ae)](_0x35e970[_0x40bc64(0x1e1)][_0x40bc64(0x210)])[_0x40bc64(0x1d2)](_0x36411f=>{const _0x33947d=_0x40bc64;this['_userService'][_0x33947d(0x1e6)](_0x36411f);}),_0x1b4263;}[_0x621c8a(0x228)](_0x2826a4){const _0x1ffd4e=_0x621c8a;return{'id':_0x2826a4['id'],'threadId':_0x2826a4['threadId'],'ref':_0x2826a4[_0x1ffd4e(0x1b8)]};}};_0x14208e=_0xe659bf([_0x3f08a2(0x0,_0x4fe2f8[_0x621c8a(0x1b9)](_0x2d13c2[_0x621c8a(0x1d6)])),_0x3f08a2(0x1,_0x4fe2f8[_0x621c8a(0x1b9)](_0x4fe2f8[_0x621c8a(0x20c)])),_0x3f08a2(0x2,_0x4fe2f8[_0x621c8a(0x1b9)](_0x39b02d[_0x621c8a(0x1cb)]))],_0x14208e);var _0x49bc21=Object[_0x621c8a(0x227)],_0x5b47dc=(_0x4db194,_0x57ca5c,_0x457608,_0x3a60b6)=>{const _0x5e58a4=_0x621c8a;for(var _0x1b0cae=_0x3a60b6>0x1?void 0x0:_0x3a60b6?_0x49bc21(_0x57ca5c,_0x457608):_0x57ca5c,_0x3807bc=_0x4db194[_0x5e58a4(0x212)]-0x1,_0x524fe6;_0x3807bc>=0x0;_0x3807bc--)(_0x524fe6=_0x4db194[_0x3807bc])&&(_0x1b0cae=_0x524fe6(_0x1b0cae)||_0x1b0cae);return _0x1b0cae;},_0x2e4e1a=(_0x56aefc,_0x411035)=>(_0x5564c1,_0x130719)=>_0x411035(_0x5564c1,_0x130719,_0x56aefc);let _0x4bf261=class extends _0x4fe2f8[_0x621c8a(0x1ef)]{constructor(_0x2fe674,_0x54cd8f){const _0x1c9525=_0x621c8a;super(),this[_0x1c9525(0x1f5)]=_0x2fe674,this[_0x1c9525(0x1d3)]=_0x54cd8f,this[_0x1c9525(0x206)]();}['_initDataSource'](){const _0x2dbd77=_0x621c8a;this['_threadCommentDataSourceService'][_0x2dbd77(0x1eb)]=this[_0x2dbd77(0x1d3)],this[_0x2dbd77(0x1f5)]['syncUpdateMutationToColla']=!0x1;}};_0x4bf261=_0x5b47dc([_0x2e4e1a(0x0,_0x335fb0['IThreadCommentDataSourceService']),_0x2e4e1a(0x1,_0x4fe2f8[_0x621c8a(0x1b9)](_0x14208e))],_0x4bf261);var _0x24e48e=Object[_0x621c8a(0x200)],_0x2b6ea3=Object[_0x621c8a(0x227)],_0x5a4e09=(_0x1b89e4,_0x601104,_0x5921c3)=>_0x601104 in _0x1b89e4?_0x24e48e(_0x1b89e4,_0x601104,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5921c3}):_0x1b89e4[_0x601104]=_0x5921c3,_0x4b39da=(_0x5d4a9f,_0x1ba3b8,_0x1708e3,_0x1df463)=>{const _0x562803=_0x621c8a;for(var _0x38b97e=_0x1df463>0x1?void 0x0:_0x1df463?_0x2b6ea3(_0x1ba3b8,_0x1708e3):_0x1ba3b8,_0x339de0=_0x5d4a9f[_0x562803(0x212)]-0x1,_0x3f85fa;_0x339de0>=0x0;_0x339de0--)(_0x3f85fa=_0x5d4a9f[_0x339de0])&&(_0x38b97e=_0x3f85fa(_0x38b97e)||_0x38b97e);return _0x38b97e;},_0x1706f7=(_0x5bc052,_0x395508)=>(_0x3dbfdd,_0x162e21)=>_0x395508(_0x3dbfdd,_0x162e21,_0x5bc052),_0x16bba0=(_0x11750b,_0x240602,_0x3997ea)=>_0x5a4e09(_0x11750b,typeof _0x240602!=_0x621c8a(0x1ed)?_0x240602+'':_0x240602,_0x3997ea);_0x1364c8['UniverThreadCommentDataSourcePlugin']=class extends _0x4fe2f8[_0x621c8a(0x21a)]{constructor(_0x3f27be=_0x27617e,_0x209b5b,_0x2b3de3){const _0x5d3465=_0x621c8a;super(),this[_0x5d3465(0x1fe)]=_0x3f27be,this['_injector']=_0x209b5b,this[_0x5d3465(0x1c5)]=_0x2b3de3;const {..._0x5e42ec}=_0x4fe2f8[_0x5d3465(0x1d4)]({},_0x27617e,this['_config']);this[_0x5d3465(0x1c5)]['setConfig'](_0x492efb,_0x5e42ec);}[_0x621c8a(0x1b4)](){[[_0x14208e],[_0x4bf261],[_0x479b42]]['forEach'](_0x4623e4=>{const _0x234546=_0x2263;this[_0x234546(0x1dd)][_0x234546(0x1c4)](_0x4623e4);});}[_0x621c8a(0x1f1)](){const _0x20d6b9=_0x621c8a;this[_0x20d6b9(0x1dd)][_0x20d6b9(0x1ec)](_0x4bf261),this[_0x20d6b9(0x1dd)][_0x20d6b9(0x1ec)](_0x479b42);}},_0x16bba0(_0x1364c8[_0x621c8a(0x1fb)],'pluginName',_0x4696c5),_0x16bba0(_0x1364c8[_0x621c8a(0x1fb)],_0x621c8a(0x1da),_0x4fe2f8[_0x621c8a(0x1be)][_0x621c8a(0x1bd)]),_0x1364c8[_0x621c8a(0x1fb)]=_0x4b39da([_0x4fe2f8[_0x621c8a(0x1c0)](_0x4dd2a8[_0x621c8a(0x1bc)],_0x39b02d[_0x621c8a(0x1de)],_0x2c286d[_0x621c8a(0x214)]),_0x1706f7(0x1,_0x4fe2f8['Inject'](_0x4fe2f8[_0x621c8a(0x1ab)])),_0x1706f7(0x2,_0x4fe2f8['IConfigService'])],_0x1364c8[_0x621c8a(0x1fb)]),Object[_0x621c8a(0x200)](_0x1364c8,Symbol[_0x621c8a(0x1ee)],{'value':_0x621c8a(0x20d)});}));
1
+ function _0x6377(_0x55f279,_0x369ad8){const _0x5e751b=_0x5e75();return _0x6377=function(_0x6377f4,_0x2f72a1){_0x6377f4=_0x6377f4-0x12e;let _0x279d0b=_0x5e751b[_0x6377f4];return _0x279d0b;},_0x6377(_0x55f279,_0x369ad8);}(function(_0x321f7e,_0x1b9bc3){const _0x5232ca=_0x6377,_0x35ef49=_0x321f7e();while(!![]){try{const _0xfe445f=-parseInt(_0x5232ca(0x1b2))/0x1+parseInt(_0x5232ca(0x13f))/0x2+-parseInt(_0x5232ca(0x14d))/0x3*(parseInt(_0x5232ca(0x181))/0x4)+-parseInt(_0x5232ca(0x1af))/0x5*(parseInt(_0x5232ca(0x139))/0x6)+parseInt(_0x5232ca(0x1b0))/0x7*(-parseInt(_0x5232ca(0x19d))/0x8)+-parseInt(_0x5232ca(0x197))/0x9+-parseInt(_0x5232ca(0x17f))/0xa*(-parseInt(_0x5232ca(0x17b))/0xb);if(_0xfe445f===_0x1b9bc3)break;else _0x35ef49['push'](_0x35ef49['shift']());}catch(_0xbade7e){_0x35ef49['push'](_0x35ef49['shift']());}}}(_0x5e75,0x32ddb),function(_0x5b53a4,_0x5798be){const _0x29ef60=_0x6377;typeof exports==_0x29ef60(0x14b)&&typeof module<'u'?_0x5798be(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x29ef60(0x180)&&define[_0x29ef60(0x184)]?define([_0x29ef60(0x18f),_0x29ef60(0x185),'@univerjs-pro/license','@univerjs/core',_0x29ef60(0x137),_0x29ef60(0x145),'rxjs',_0x29ef60(0x1b1)],_0x5798be):(_0x5b53a4=typeof globalThis<'u'?globalThis:_0x5b53a4||self,_0x5798be(_0x5b53a4[_0x29ef60(0x179)]={},_0x5b53a4[_0x29ef60(0x199)],_0x5b53a4[_0x29ef60(0x147)],_0x5b53a4[_0x29ef60(0x191)],_0x5b53a4['UniverThreadCommentUi'],_0x5b53a4[_0x29ef60(0x187)],_0x5b53a4['rxjs'],_0x5b53a4[_0x29ef60(0x1ab)]));}(this,function(_0x2501e2,_0x48fe52,_0xc7431b,_0x3024df,_0x51d56a,_0x11ef9d,_0xec189,_0x763b7b){'use strict';const _0x12bf66=_0x6377;const _0xe8f509=_0x12bf66(0x15e);var _0x19f665=(_0x1a0b83=>(_0x1a0b83[_0x1a0b83[_0x12bf66(0x148)]=0x0]=_0x12bf66(0x148),_0x1a0b83[_0x1a0b83['Solved']=0x1]='Solved',_0x1a0b83[_0x1a0b83[_0x12bf66(0x15b)]=-0x1]=_0x12bf66(0x15b),_0x1a0b83))(_0x19f665||{}),_0x41bc0c=(_0x35b520=>(_0x35b520[_0x35b520[_0x12bf66(0x1ac)]=0x0]=_0x12bf66(0x1ac),_0x35b520[_0x35b520[_0x12bf66(0x17c)]=0x1]=_0x12bf66(0x17c),_0x35b520[_0x35b520[_0x12bf66(0x149)]=0x2]='Reply',_0x35b520[_0x35b520[_0x12bf66(0x140)]=0x3]='Edit',_0x35b520[_0x35b520['Delete']=0x4]=_0x12bf66(0x16a),_0x35b520[_0x35b520[_0x12bf66(0x150)]=0x5]=_0x12bf66(0x150),_0x35b520[_0x35b520[_0x12bf66(0x15b)]=-0x1]='UNRECOGNIZED',_0x35b520))(_0x41bc0c||{});const _0x118c4e=_0xa77ab4=>_0x3024df[_0x12bf66(0x167)](new Date(+_0xa77ab4))[_0x12bf66(0x1a3)]('YYYY/MM/DD\x20HH:mm'),_0x172c13=async(_0x1a30e3,_0x37e772)=>{const _0x3a49df=_0x12bf66,_0x1f0824=_0x1a30e3['get'](_0x3024df['UserManagerService']),_0x70c3e2=_0x1a30e3[_0x3a49df(0x183)](_0x763b7b[_0x3a49df(0x163)]);_0x37e772[_0x3a49df(0x18a)](_0x30ef89=>{const _0x53b624=_0x3a49df;_0x1f0824[_0x53b624(0x1a8)](_0x30ef89)&&_0x37e772[_0x53b624(0x17e)](_0x30ef89);}),_0x37e772['size']&&(await _0x70c3e2[_0x3a49df(0x183)](_0x3a49df(0x16d),{'params':{'userIDs':[..._0x37e772]}}))[_0x3a49df(0x19f)]['users'][_0x3a49df(0x18a)](_0x599aae=>{_0x599aae&&_0x1f0824['addUser'](_0x599aae);});};var _0x47d8c1=Object['getOwnPropertyDescriptor'],_0x2de80c=(_0x169f9b,_0x1359ff,_0x331399,_0x2958ac)=>{const _0xed1057=_0x12bf66;for(var _0x1b41bc=_0x2958ac>0x1?void 0x0:_0x2958ac?_0x47d8c1(_0x1359ff,_0x331399):_0x1359ff,_0x4a121a=_0x169f9b[_0xed1057(0x198)]-0x1,_0x461ba5;_0x4a121a>=0x0;_0x4a121a--)(_0x461ba5=_0x169f9b[_0x4a121a])&&(_0x1b41bc=_0x461ba5(_0x1b41bc)||_0x1b41bc);return _0x1b41bc;},_0x529c8a=(_0x1de0fb,_0x544c1f)=>(_0x6032f7,_0x490876)=>_0x544c1f(_0x6032f7,_0x490876,_0x1de0fb);let _0x50e535=class extends _0x3024df[_0x12bf66(0x162)]{constructor(_0x3d9483,_0x219d19,_0x73ca6,_0x27b94e){const _0x73c5f=_0x12bf66;super(),this[_0x73c5f(0x165)]=_0x3d9483,this[_0x73c5f(0x14a)]=_0x219d19,this[_0x73c5f(0x14c)]=_0x73ca6,this[_0x73c5f(0x1b8)]=_0x27b94e,this[_0x73c5f(0x192)](),this[_0x73c5f(0x136)]();}[_0x12bf66(0x136)](){const _0x19be3c=_0x12bf66;this[_0x19be3c(0x15f)](this[_0x19be3c(0x14a)][_0x19be3c(0x152)][_0x19be3c(0x1b6)](_0xec189[_0x19be3c(0x133)](0x10))['subscribe'](_0x3cbb8c=>{const _0x3b5e6c=_0x19be3c,_0x1ab5c4=new Set();_0x3cbb8c[_0x3b5e6c(0x18a)](_0x5413ec=>{const _0x4b07b6=_0x3b5e6c;switch(_0x5413ec['type']){case _0x4b07b6(0x151):{const _0x1629f7=_0x5413ec[_0x4b07b6(0x189)][_0x4b07b6(0x138)];_0x1ab5c4[_0x4b07b6(0x151)](_0x1629f7);break;}}}),_0x172c13(this[_0x3b5e6c(0x1b8)],_0x1ab5c4);}));}['_init'](){const _0x428989=_0x12bf66;this[_0x428989(0x15f)](this[_0x428989(0x165)]['commentUpdate$'][_0x428989(0x12f)](async _0xd19f56=>{const _0x28ff68=_0x428989;var _0x53d198,_0x1fd23b,_0x152a38,_0x21b790;const _0x20120a=(_0x53d198=this[_0x28ff68(0x14a)][_0x28ff68(0x18c)](_0xd19f56[_0x28ff68(0x153)])[_0x28ff68(0x12e)](_0x3d8623=>_0x3d8623[_0x28ff68(0x14e)]===_0xd19f56[_0x28ff68(0x14e)]))==null?void 0x0:_0x53d198[_0x28ff68(0x154)];if(!_0x20120a)return;const {unitId:_0x59ae0d,subUnitId:_0x2afe6a}=_0x20120a;switch(_0xd19f56[_0x28ff68(0x15a)]&&this[_0x28ff68(0x14c)][_0x28ff68(0x19a)](_0xd19f56['user']),_0xd19f56['type']){case _0x41bc0c[_0x28ff68(0x17c)]:break;case _0x41bc0c[_0x28ff68(0x149)]:{this[_0x28ff68(0x14a)][_0x28ff68(0x130)](_0x59ae0d,_0x2afe6a,{'unitId':_0x59ae0d,'subUnitId':_0x2afe6a,'ref':'','id':_0xd19f56[_0x28ff68(0x190)],'dT':_0x118c4e(+_0xd19f56['createTimestamp']),'threadId':_0xd19f56['threadId'],'personId':(_0x152a38=(_0x1fd23b=_0xd19f56[_0x28ff68(0x15a)])==null?void 0x0:_0x1fd23b[_0x28ff68(0x196)])!=null?_0x152a38:_0xd19f56[_0x28ff68(0x13b)],'text':JSON['parse'](_0xd19f56['content']),'parentId':_0x20120a['id']});break;}case _0x41bc0c[_0x28ff68(0x16a)]:{const _0xc5dc97=this[_0x28ff68(0x14a)][_0x28ff68(0x14f)](_0x59ae0d,_0x2afe6a,_0xd19f56[_0x28ff68(0x190)]);_0xc5dc97&&_0xc5dc97[_0x28ff68(0x19c)]&&this['_threadCommentModel'][_0x28ff68(0x160)](_0x59ae0d,_0x2afe6a,_0xd19f56[_0x28ff68(0x190)]);break;}case _0x41bc0c[_0x28ff68(0x140)]:{this[_0x28ff68(0x14a)][_0x28ff68(0x141)](_0x59ae0d,_0x2afe6a,{'commentId':_0xd19f56[_0x28ff68(0x190)],'text':JSON['parse'](_0xd19f56['content'])});break;}case _0x41bc0c[_0x28ff68(0x150)]:{const _0x2d30c4=(_0x21b790=this[_0x28ff68(0x14a)][_0x28ff68(0x18c)](_0xd19f56[_0x28ff68(0x153)])[_0x28ff68(0x12e)](_0x561136=>_0x561136['threadId']===_0xd19f56[_0x28ff68(0x14e)]))==null?void 0x0:_0x21b790[_0x28ff68(0x154)];_0x2d30c4&&this['_threadCommentModel']['resolveComment'](_0x59ae0d,_0x2afe6a,_0x2d30c4['id'],_0xd19f56[_0x28ff68(0x195)]===_0x19f665[_0x28ff68(0x18b)]);break;}}}));}};_0x50e535=_0x2de80c([_0x529c8a(0x0,_0x3024df['Inject'](_0x48fe52[_0x12bf66(0x1ad)])),_0x529c8a(0x1,_0x3024df[_0x12bf66(0x194)](_0x11ef9d[_0x12bf66(0x17a)])),_0x529c8a(0x2,_0x3024df[_0x12bf66(0x194)](_0x3024df[_0x12bf66(0x1a5)])),_0x529c8a(0x3,_0x3024df[_0x12bf66(0x194)](_0x3024df[_0x12bf66(0x134)]))],_0x50e535);const _0x3abbb1=_0x12bf66(0x1a1),_0x8c09de={};var _0x2ae2cf=Object['getOwnPropertyDescriptor'],_0x22b60b=(_0x5a2722,_0x31faae,_0x1deb1f,_0x4c5b53)=>{for(var _0x3f0b06=_0x4c5b53>0x1?void 0x0:_0x4c5b53?_0x2ae2cf(_0x31faae,_0x1deb1f):_0x31faae,_0x4df712=_0x5a2722['length']-0x1,_0x1c8830;_0x4df712>=0x0;_0x4df712--)(_0x1c8830=_0x5a2722[_0x4df712])&&(_0x3f0b06=_0x1c8830(_0x3f0b06)||_0x3f0b06);return _0x3f0b06;},_0x52af3b=(_0x15f83b,_0x548339)=>(_0x54f8b6,_0x1b382f)=>_0x548339(_0x54f8b6,_0x1b382f,_0x15f83b);function _0x514ca3(_0x287522,_0x1d812){const _0x4f6000=_0x12bf66,_0x3be826=_0x287522[_0x4f6000(0x193)][0x0];return{..._0x1d812,'id':_0x3be826[_0x4f6000(0x190)],'resolved':_0x287522['solved']===0x1,'dT':_0x118c4e(_0x3be826[_0x4f6000(0x159)]),'personId':_0x3be826['userId'],'threadId':_0x3be826['threadId']};}function _0x402477(_0x1af81b,_0x17250d,_0x12b919){const _0x4d5156=_0x12bf66;var _0x11fead,_0xf2a096;if(((_0xf2a096=(_0x11fead=_0x1af81b==null?void 0x0:_0x1af81b[_0x4d5156(0x193)])==null?void 0x0:_0x11fead[_0x4d5156(0x198)])!=null?_0xf2a096:0x0)>0x0){const _0x412b78=(_0x182021,_0x16676b)=>({'id':_0x182021[_0x4d5156(0x190)],'threadId':_0x182021[_0x4d5156(0x14e)],'dT':_0x118c4e(_0x182021[_0x4d5156(0x159)]),'personId':_0x182021[_0x4d5156(0x13b)],'resolved':_0x1af81b[_0x4d5156(0x195)]===_0x19f665['Solved'],'unitId':_0x17250d,'subUnitId':_0x12b919,'text':JSON[_0x4d5156(0x177)](_0x182021['content']),'parentId':_0x16676b}),_0x396f67=_0x412b78(_0x1af81b[_0x4d5156(0x193)][0x0]);return{..._0x396f67,'children':_0x1af81b[_0x4d5156(0x193)]['slice'](0x1)[_0x4d5156(0x1b5)](_0x4a5c39=>_0x412b78(_0x4a5c39,_0x396f67['id']))};}return null;}let _0x348eb6=class{constructor(_0x5cfb7e,_0x10606b,_0x3aff20){const _0xa2644b=_0x12bf66;this[_0xa2644b(0x1b7)]=_0x5cfb7e,this[_0xa2644b(0x14c)]=_0x10606b,this[_0xa2644b(0x13e)]=_0x3aff20;}async[_0x12bf66(0x130)](_0x465fbd){const _0x5034f6=_0x12bf66;var _0x22456a,_0x46d8f1;const {parentId:_0x29429a,unitId:_0x3e980e,text:_0x454945,threadId:_0x67a809}=_0x465fbd,_0x17daf7=(_0x46d8f1=(_0x22456a=_0x454945[_0x5034f6(0x1b3)])==null?void 0x0:_0x22456a[_0x5034f6(0x182)](_0x897fa7=>_0x897fa7['rangeType']===_0x3024df[_0x5034f6(0x158)][_0x5034f6(0x171)])[_0x5034f6(0x1b5)](_0x392cfe=>_0x392cfe[_0x5034f6(0x172)]))!=null?_0x46d8f1:[],_0x263b54=JSON[_0x5034f6(0x178)](_0x454945),_0x4ba15d=(await this['_sessionService'][_0x5034f6(0x1a9)](_0x3e980e))[_0x5034f6(0x157)]();if(_0x29429a){const _0x20a655={'memberId':_0x4ba15d,'unitId':_0x3e980e,'content':_0x263b54,'mention':_0x17daf7,'threadId':_0x67a809},_0x639e9c=(await this[_0x5034f6(0x1b7)]['post'](_0x5034f6(0x16f)+_0x3e980e+'/reply',{'body':_0x20a655}))['body'][_0x5034f6(0x144)];return{..._0x465fbd,'id':_0x639e9c[_0x5034f6(0x190)],'dT':_0x3024df['dayjs'](+_0x639e9c['createTimestamp'])[_0x5034f6(0x1a3)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x639e9c['userId']};}else{const _0x14d9a1={'memberId':_0x4ba15d,'unitId':_0x3e980e,'content':_0x263b54,'mention':_0x17daf7},_0x941460=await this[_0x5034f6(0x1b7)]['post']('/universer-api/comment/unit/'+_0x3e980e+_0x5034f6(0x166),{'body':_0x14d9a1});return _0x514ca3(_0x941460[_0x5034f6(0x19f)][_0x5034f6(0x156)],_0x465fbd);}}async[_0x12bf66(0x141)](_0x5e8864){const _0x25b0da=_0x12bf66;var _0x2fd8e4,_0x5c2e75;const {text:_0x4211d3,unitId:_0xbf9347}=_0x5e8864,_0x3850f9=(_0x5c2e75=(_0x2fd8e4=_0x4211d3[_0x25b0da(0x1b3)])==null?void 0x0:_0x2fd8e4[_0x25b0da(0x182)](_0x4640b8=>_0x4640b8[_0x25b0da(0x132)]===_0x3024df[_0x25b0da(0x158)][_0x25b0da(0x171)])[_0x25b0da(0x1b5)](_0x5bf953=>_0x5bf953['rangeId']))!=null?_0x5c2e75:[],_0x1129ee=JSON['stringify'](_0x4211d3),_0x7f7804=_0x5e8864[_0x25b0da(0x14e)],_0xc46f3d=_0x5e8864['id'],_0x1c0907={'memberId':(await this[_0x25b0da(0x13e)][_0x25b0da(0x1a9)](_0xbf9347))['getMemberID'](),'unitId':_0xbf9347,'threadId':_0x7f7804,'mention':_0x3850f9,'content':_0x1129ee,'replyId':_0xc46f3d},_0x143fa0=await this[_0x25b0da(0x1b7)][_0x25b0da(0x135)](_0x25b0da(0x16f)+_0xbf9347+_0x25b0da(0x161),{'body':_0x1c0907});return!_0x143fa0[_0x25b0da(0x19f)][_0x25b0da(0x16e)]||_0x143fa0[_0x25b0da(0x19f)][_0x25b0da(0x16e)][_0x25b0da(0x1a4)]===0x1;}async[_0x12bf66(0x15d)](_0x5d0752){const _0x58dbba=_0x12bf66,{unitId:_0x29c611}=_0x5d0752,_0x44e2a9=_0x5d0752['threadId'],_0x51155b={'memberId':this[_0x58dbba(0x14c)][_0x58dbba(0x186)]()[_0x58dbba(0x196)],'unitId':_0x29c611,'threadId':_0x44e2a9,'solved':_0x5d0752[_0x58dbba(0x18e)]?_0x19f665[_0x58dbba(0x18b)]:_0x19f665[_0x58dbba(0x148)]},_0x2d7154=await this['_httpService'][_0x58dbba(0x135)]('/universer-api/comment/unit/'+_0x29c611+'/solved',{'body':_0x51155b});return!_0x2d7154['body'][_0x58dbba(0x16e)]||_0x2d7154['body'][_0x58dbba(0x16e)][_0x58dbba(0x1a4)]===0x1;}async[_0x12bf66(0x160)](_0x366e00,_0x534df9,_0x4f989f,_0x82dc8b){const _0x235212=_0x12bf66,_0x11eee7={'memberId':(await this['_sessionService'][_0x235212(0x1a9)](_0x366e00))[_0x235212(0x157)](),'threadId':_0x4f989f,'replyId':_0x82dc8b,'unitId':_0x366e00},_0x5a4336=await this['_httpService'][_0x235212(0x135)](_0x235212(0x16f)+_0x366e00+_0x235212(0x19e),{'body':_0x11eee7});return!_0x5a4336[_0x235212(0x19f)][_0x235212(0x16e)]||_0x5a4336['body'][_0x235212(0x16e)]['code']===0x1;}async[_0x12bf66(0x1b4)](_0x57f157,_0x4ebcf6,_0x29c1a5){const _0x32fa50=_0x12bf66,_0x547516={'unitId':_0x57f157,'threadId':_0x29c1a5},_0x3ba732=await this['_httpService']['post'](_0x32fa50(0x16f)+_0x57f157+_0x32fa50(0x1ae),{'body':_0x547516}),_0x24fdbf=_0x29c1a5[_0x32fa50(0x1b5)](_0x443a72=>_0x402477(_0x3ba732[_0x32fa50(0x19f)][_0x32fa50(0x13d)][_0x443a72],_0x57f157,_0x4ebcf6))[_0x32fa50(0x182)](Boolean);return Object['values'](_0x3ba732[_0x32fa50(0x19f)][_0x32fa50(0x1a2)])[_0x32fa50(0x18a)](_0x3c00f2=>{const _0xaa62ba=_0x32fa50;this[_0xaa62ba(0x14c)][_0xaa62ba(0x19a)](_0x3c00f2);}),_0x24fdbf;}['saveCommentToSnapshot'](_0x3638a5){const _0x359352=_0x12bf66;return{'id':_0x3638a5['id'],'threadId':_0x3638a5[_0x359352(0x14e)],'ref':_0x3638a5[_0x359352(0x131)]};}};_0x348eb6=_0x22b60b([_0x52af3b(0x0,_0x3024df[_0x12bf66(0x194)](_0x763b7b[_0x12bf66(0x163)])),_0x52af3b(0x1,_0x3024df['Inject'](_0x3024df[_0x12bf66(0x1a5)])),_0x52af3b(0x2,_0x3024df[_0x12bf66(0x194)](_0x48fe52[_0x12bf66(0x18d)]))],_0x348eb6);var _0x1645ed=Object[_0x12bf66(0x168)],_0x1033e9=(_0x2fcf66,_0x55d415,_0x33a88f,_0x6ff5ac)=>{const _0x953a77=_0x12bf66;for(var _0x24febc=_0x6ff5ac>0x1?void 0x0:_0x6ff5ac?_0x1645ed(_0x55d415,_0x33a88f):_0x55d415,_0x1a5c0c=_0x2fcf66[_0x953a77(0x198)]-0x1,_0x36f3d1;_0x1a5c0c>=0x0;_0x1a5c0c--)(_0x36f3d1=_0x2fcf66[_0x1a5c0c])&&(_0x24febc=_0x36f3d1(_0x24febc)||_0x24febc);return _0x24febc;},_0x1a8f21=(_0x110021,_0x169e01)=>(_0x2581c4,_0x52ee93)=>_0x169e01(_0x2581c4,_0x52ee93,_0x110021);let _0x11419e=class extends _0x3024df[_0x12bf66(0x162)]{constructor(_0x460ba1,_0x37882b){const _0x333ef3=_0x12bf66;super(),this[_0x333ef3(0x175)]=_0x460ba1,this[_0x333ef3(0x16c)]=_0x37882b,this[_0x333ef3(0x19b)]();}['_initDataSource'](){const _0x147a71=_0x12bf66;this['_threadCommentDataSourceService']['dataSource']=this[_0x147a71(0x16c)],this[_0x147a71(0x175)][_0x147a71(0x174)]=!0x1;}};_0x11419e=_0x1033e9([_0x1a8f21(0x0,_0x11ef9d[_0x12bf66(0x13c)]),_0x1a8f21(0x1,_0x3024df[_0x12bf66(0x194)](_0x348eb6))],_0x11419e);var _0x4d7d74=Object[_0x12bf66(0x16b)],_0x12ba43=Object[_0x12bf66(0x168)],_0x599236=(_0x490713,_0x42da5e,_0x14fb01)=>_0x42da5e in _0x490713?_0x4d7d74(_0x490713,_0x42da5e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14fb01}):_0x490713[_0x42da5e]=_0x14fb01,_0xc8363b=(_0x5cf7b5,_0x3256c4,_0x342aa5,_0xf15eb2)=>{const _0x10f521=_0x12bf66;for(var _0x227175=_0xf15eb2>0x1?void 0x0:_0xf15eb2?_0x12ba43(_0x3256c4,_0x342aa5):_0x3256c4,_0x35eb59=_0x5cf7b5[_0x10f521(0x198)]-0x1,_0x21ddc1;_0x35eb59>=0x0;_0x35eb59--)(_0x21ddc1=_0x5cf7b5[_0x35eb59])&&(_0x227175=_0x21ddc1(_0x227175)||_0x227175);return _0x227175;},_0x551762=(_0x5665d8,_0xa1c277)=>(_0x38b806,_0x3c0a3f)=>_0xa1c277(_0x38b806,_0x3c0a3f,_0x5665d8),_0x341a07=(_0x1fe193,_0x26dfb3,_0xc77204)=>_0x599236(_0x1fe193,typeof _0x26dfb3!=_0x12bf66(0x146)?_0x26dfb3+'':_0x26dfb3,_0xc77204);_0x2501e2['UniverThreadCommentDataSourcePlugin']=class extends _0x3024df[_0x12bf66(0x1a7)]{constructor(_0x73eb19=_0x8c09de,_0x940a7,_0x508c80){const _0x5a6e1c=_0x12bf66;super(),this[_0x5a6e1c(0x15c)]=_0x73eb19,this['_injector']=_0x940a7,this[_0x5a6e1c(0x17d)]=_0x508c80;const {..._0x2c0397}=_0x3024df[_0x5a6e1c(0x143)]({},_0x8c09de,this[_0x5a6e1c(0x15c)]);this['_configService'][_0x5a6e1c(0x164)](_0x3abbb1,_0x2c0397);}[_0x12bf66(0x1aa)](){const _0xda12ba=_0x12bf66;[[_0x348eb6],[_0x11419e],[_0x50e535]][_0xda12ba(0x18a)](_0x2e354e=>{const _0x99a5de=_0xda12ba;this[_0x99a5de(0x1b8)][_0x99a5de(0x151)](_0x2e354e);});}[_0x12bf66(0x155)](){this['_injector']['get'](_0x11419e),this['_injector']['get'](_0x50e535);}},_0x341a07(_0x2501e2[_0x12bf66(0x1a6)],'pluginName',_0xe8f509),_0x341a07(_0x2501e2[_0x12bf66(0x1a6)],_0x12bf66(0x13a),_0x3024df[_0x12bf66(0x173)]['UNIVER_UNKNOWN']),_0x2501e2[_0x12bf66(0x1a6)]=_0xc8363b([_0x3024df[_0x12bf66(0x1a0)](_0x51d56a[_0x12bf66(0x142)],_0x48fe52[_0x12bf66(0x170)],_0xc7431b[_0x12bf66(0x169)]),_0x551762(0x1,_0x3024df[_0x12bf66(0x194)](_0x3024df['Injector'])),_0x551762(0x2,_0x3024df['IConfigService'])],_0x2501e2['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x2501e2,Symbol[_0x12bf66(0x176)],{'value':_0x12bf66(0x188)});}));function _0x5e75(){const _0x258c37=['error','/universer-api/comment/unit/','UniverCollaborationClientPlugin','COMMENT','rangeId','UniverInstanceType','syncUpdateMutationToColla','_threadCommentDataSourceService','toStringTag','parse','stringify','UniverProThreadCommentDatasource','ThreadCommentModel','3553hXvQgT','Add','_configService','delete','25390iRaBHZ','function','64JjdpHr','filter','get','amd','@univerjs-pro/collaboration-client','getCurrentUser','UniverThreadComment','Module','payload','forEach','Solved','getUnit','CollaborationSessionService','resolved','exports','replyId','UniverCore','_init','replies','Inject','solved','userID','41553cKDHcY','length','UniverProCollaborationClient','addUser','_initDataSource','parentId','8WHKFer','/delete','body','DependentOn','thread-comment-data-source.config','users','format','code','UserManagerService','UniverThreadCommentDataSourcePlugin','Plugin','getUser','requireSession','onStarting','UniverNetwork','Unknown','CommentService','/list','515chMWKm','887635DOTWWk','@univerjs/network','360797ohzPyS','customRanges','listComments','map','pipe','_httpService','_injector','find','subscribe','addComment','ref','rangeType','bufferTime','Injector','post','_initUserSync','@univerjs/thread-comment-ui','personId','7482PhXANn','type','userId','IThreadCommentDataSourceService','comments','_sessionService','342556dPzmbd','Edit','updateComment','UniverThreadCommentUIPlugin','merge','reply','@univerjs/thread-comment','symbol','UniverProLicense','OpenOrReOpen','Reply','_threadCommentModel','object','_userService','30444CCrtOf','threadId','getComment','Solve','add','commentUpdate$','unitId','root','onReady','comment','getMemberID','CustomRangeType','createTimestamp','user','UNRECOGNIZED','_config','resolveComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','disposeWithMe','deleteComment','/edit','Disposable','HTTPService','setConfig','_commentService','/add','dayjs','getOwnPropertyDescriptor','UniverLicensePlugin','Delete','defineProperty','_threadCommentDataSource','/universer-api/user/list'];_0x5e75=function(){return _0x258c37;};return _0x5e75();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.12.1",
3
+ "version": "0.12.2-nightly.202511290732",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/license": "0.12.1",
49
- "@univerjs/core": "0.12.1",
50
- "@univerjs/network": "0.12.1",
48
+ "@univerjs-pro/collaboration-client": "0.12.2-nightly.202511290732",
49
+ "@univerjs-pro/license": "0.12.2-nightly.202511290732",
50
+ "@univerjs/core": "0.12.2-nightly.202511290732",
51
+ "@univerjs/network": "0.12.2-nightly.202511290732",
51
52
  "@univerjs/protocol": "0.1.47",
52
- "@univerjs/thread-comment": "0.12.1",
53
- "@univerjs/thread-comment-ui": "0.12.1",
54
- "@univerjs-pro/collaboration-client": "0.12.1"
53
+ "@univerjs/thread-comment-ui": "0.12.2-nightly.202511290732",
54
+ "@univerjs/thread-comment": "0.12.2-nightly.202511290732"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
- "vite": "^7.2.2",
60
- "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.12.1"
59
+ "vite": "^7.2.4",
60
+ "vitest": "^4.0.14",
61
+ "@univerjs-infra/shared": "0.12.2"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",