@univerjs-pro/thread-comment-datasource 0.12.1 → 0.12.2-experimental.20251129-0fa20cd
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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +10 -10
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 _0x1e7cb5=_0x5f4e;(function(_0x2061f0,_0x3bcba8){const _0x29fe78=_0x5f4e,_0x4db2b2=_0x2061f0();while(!![]){try{const _0xa47e75=-parseInt(_0x29fe78(0x188))/0x1*(-parseInt(_0x29fe78(0x139))/0x2)+-parseInt(_0x29fe78(0x16d))/0x3+-parseInt(_0x29fe78(0x12d))/0x4+parseInt(_0x29fe78(0x177))/0x5+-parseInt(_0x29fe78(0x182))/0x6+-parseInt(_0x29fe78(0x13a))/0x7+-parseInt(_0x29fe78(0x192))/0x8*(-parseInt(_0x29fe78(0x165))/0x9);if(_0xa47e75===_0x3bcba8)break;else _0x4db2b2['push'](_0x4db2b2['shift']());}catch(_0x44203e){_0x4db2b2['push'](_0x4db2b2['shift']());}}}(_0x3046,0x89aa2));Object['defineProperty'](exports,Symbol[_0x1e7cb5(0x15b)],{'value':_0x1e7cb5(0x184)});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=_0x1e7cb5(0x141);var I=(_0x2800ef=>(_0x2800ef[_0x2800ef['OpenOrReOpen']=0x0]=_0x1e7cb5(0x15c),_0x2800ef[_0x2800ef[_0x1e7cb5(0x1a3)]=0x1]=_0x1e7cb5(0x1a3),_0x2800ef[_0x2800ef[_0x1e7cb5(0x178)]=-0x1]=_0x1e7cb5(0x178),_0x2800ef))(I||{}),v=(_0x3448dc=>(_0x3448dc[_0x3448dc['Unknown']=0x0]=_0x1e7cb5(0x131),_0x3448dc[_0x3448dc[_0x1e7cb5(0x14d)]=0x1]=_0x1e7cb5(0x14d),_0x3448dc[_0x3448dc[_0x1e7cb5(0x17a)]=0x2]=_0x1e7cb5(0x17a),_0x3448dc[_0x3448dc[_0x1e7cb5(0x19d)]=0x3]='Edit',_0x3448dc[_0x3448dc[_0x1e7cb5(0x197)]=0x4]=_0x1e7cb5(0x197),_0x3448dc[_0x3448dc[_0x1e7cb5(0x132)]=0x5]='Solve',_0x3448dc[_0x3448dc[_0x1e7cb5(0x178)]=-0x1]=_0x1e7cb5(0x178),_0x3448dc))(v||{});const f=_0x2a64ab=>c[_0x1e7cb5(0x19e)](new Date(+_0x2a64ab))[_0x1e7cb5(0x172)](_0x1e7cb5(0x189)),R=async(_0x359d27,_0x2b078f)=>{const _0x4238c9=_0x1e7cb5,_0xe7c026=_0x359d27[_0x4238c9(0x15f)](c[_0x4238c9(0x175)]),_0x4ed49e=_0x359d27[_0x4238c9(0x15f)](P[_0x4238c9(0x128)]);_0x2b078f['forEach'](_0x10bc60=>{const _0x37ee00=_0x4238c9;_0xe7c026[_0x37ee00(0x195)](_0x10bc60)&&_0x2b078f[_0x37ee00(0x162)](_0x10bc60);}),_0x2b078f[_0x4238c9(0x137)]&&(await _0x4ed49e[_0x4238c9(0x15f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2b078f]}}))[_0x4238c9(0x12b)][_0x4238c9(0x129)][_0x4238c9(0x159)](_0x18fffa=>{const _0x2c133f=_0x4238c9;_0x18fffa&&_0xe7c026[_0x2c133f(0x134)](_0x18fffa);});};var $=Object[_0x1e7cb5(0x174)],E=(_0x2bcbb3,_0x3b59b5,_0x361126,_0x3b466e)=>{const _0x4b67ed=_0x1e7cb5;for(var _0x1789bd=_0x3b466e>0x1?void 0x0:_0x3b466e?$(_0x3b59b5,_0x361126):_0x3b59b5,_0x2d686a=_0x2bcbb3[_0x4b67ed(0x160)]-0x1,_0x583293;_0x2d686a>=0x0;_0x2d686a--)(_0x583293=_0x2bcbb3[_0x2d686a])&&(_0x1789bd=_0x583293(_0x1789bd)||_0x1789bd);return _0x1789bd;},S=(_0x496b4f,_0x4cf4b9)=>(_0x4d679e,_0xb0d8f4)=>_0x4cf4b9(_0x4d679e,_0xb0d8f4,_0x496b4f);let _=class extends c['Disposable']{constructor(_0x51b070,_0x13dcc0,_0x41ab4b,_0x39b046){const _0x38652c=_0x1e7cb5;super(),this[_0x38652c(0x14e)]=_0x51b070,this[_0x38652c(0x18d)]=_0x13dcc0,this[_0x38652c(0x19b)]=_0x41ab4b,this['_injector']=_0x39b046,this['_init'](),this[_0x38652c(0x187)]();}[_0x1e7cb5(0x187)](){const _0x3005c9=_0x1e7cb5;this['disposeWithMe'](this[_0x3005c9(0x18d)][_0x3005c9(0x18c)]['pipe'](j[_0x3005c9(0x12c)](0x10))[_0x3005c9(0x161)](_0x4829c5=>{const _0x1e62fc=_0x3005c9,_0x2f0055=new Set();_0x4829c5['forEach'](_0xd2a82f=>{const _0x4e75e2=_0x5f4e;switch(_0xd2a82f[_0x4e75e2(0x18b)]){case'add':{const _0x18844c=_0xd2a82f[_0x4e75e2(0x171)][_0x4e75e2(0x167)];_0x2f0055[_0x4e75e2(0x19c)](_0x18844c);break;}}}),R(this[_0x1e62fc(0x133)],_0x2f0055);}));}[_0x1e7cb5(0x140)](){const _0x51aee0=_0x1e7cb5;this['disposeWithMe'](this[_0x51aee0(0x14e)]['commentUpdate$'][_0x51aee0(0x161)](async _0x2347a7=>{const _0x5811db=_0x51aee0;var _0x151c29,_0x51b07f,_0xec2dba,_0x23f185;const _0x1ef38e=(_0x151c29=this[_0x5811db(0x18d)][_0x5811db(0x16b)](_0x2347a7[_0x5811db(0x150)])[_0x5811db(0x148)](_0x17b92f=>_0x17b92f[_0x5811db(0x14c)]===_0x2347a7[_0x5811db(0x14c)]))==null?void 0x0:_0x151c29[_0x5811db(0x198)];if(!_0x1ef38e)return;const {unitId:_0x58f0dd,subUnitId:_0x1e7358}=_0x1ef38e;switch(_0x2347a7[_0x5811db(0x16f)]&&this[_0x5811db(0x19b)][_0x5811db(0x134)](_0x2347a7['user']),_0x2347a7[_0x5811db(0x18b)]){case v['Add']:break;case v['Reply']:{this[_0x5811db(0x18d)]['addComment'](_0x58f0dd,_0x1e7358,{'unitId':_0x58f0dd,'subUnitId':_0x1e7358,'ref':'','id':_0x2347a7['replyId'],'dT':f(+_0x2347a7['createTimestamp']),'threadId':_0x2347a7[_0x5811db(0x14c)],'personId':(_0xec2dba=(_0x51b07f=_0x2347a7['user'])==null?void 0x0:_0x51b07f[_0x5811db(0x15a)])!=null?_0xec2dba:_0x2347a7[_0x5811db(0x13e)],'text':JSON[_0x5811db(0x152)](_0x2347a7[_0x5811db(0x157)]),'parentId':_0x1ef38e['id']});break;}case v[_0x5811db(0x197)]:{const _0x227cea=this['_threadCommentModel'][_0x5811db(0x17c)](_0x58f0dd,_0x1e7358,_0x2347a7['replyId']);_0x227cea&&_0x227cea[_0x5811db(0x13c)]&&this[_0x5811db(0x18d)][_0x5811db(0x153)](_0x58f0dd,_0x1e7358,_0x2347a7[_0x5811db(0x17b)]);break;}case v[_0x5811db(0x19d)]:{this['_threadCommentModel']['updateComment'](_0x58f0dd,_0x1e7358,{'commentId':_0x2347a7[_0x5811db(0x17b)],'text':JSON[_0x5811db(0x152)](_0x2347a7[_0x5811db(0x157)])});break;}case v[_0x5811db(0x132)]:{const _0x47fb3c=(_0x23f185=this[_0x5811db(0x18d)]['getUnit'](_0x2347a7[_0x5811db(0x150)])[_0x5811db(0x148)](_0x2cf2dd=>_0x2cf2dd[_0x5811db(0x14c)]===_0x2347a7[_0x5811db(0x14c)]))==null?void 0x0:_0x23f185[_0x5811db(0x198)];_0x47fb3c&&this[_0x5811db(0x18d)][_0x5811db(0x168)](_0x58f0dd,_0x1e7358,_0x47fb3c['id'],_0x2347a7[_0x5811db(0x191)]===I[_0x5811db(0x1a3)]);break;}}}));}};_=E([S(0x0,c[_0x1e7cb5(0x196)](b[_0x1e7cb5(0x183)])),S(0x1,c['Inject'](M[_0x1e7cb5(0x142)])),S(0x2,c[_0x1e7cb5(0x196)](c['UserManagerService'])),S(0x3,c[_0x1e7cb5(0x196)](c[_0x1e7cb5(0x145)]))],_);const q=_0x1e7cb5(0x17e),D={};var A=Object[_0x1e7cb5(0x174)],x=(_0x1f28b6,_0x43ca8c,_0x21378a,_0x4a5ec9)=>{for(var _0x53cc0d=_0x4a5ec9>0x1?void 0x0:_0x4a5ec9?A(_0x43ca8c,_0x21378a):_0x43ca8c,_0x2d31fc=_0x1f28b6['length']-0x1,_0x496d5c;_0x2d31fc>=0x0;_0x2d31fc--)(_0x496d5c=_0x1f28b6[_0x2d31fc])&&(_0x53cc0d=_0x496d5c(_0x53cc0d)||_0x53cc0d);return _0x53cc0d;},C=(_0x3e91e1,_0x408eea)=>(_0x579df3,_0x3f8156)=>_0x408eea(_0x579df3,_0x3f8156,_0x3e91e1);function Y(_0x298722,_0x4c6eaf){const _0x399dce=_0x1e7cb5,_0x1580a0=_0x298722['replies'][0x0];return{..._0x4c6eaf,'id':_0x1580a0[_0x399dce(0x17b)],'resolved':_0x298722[_0x399dce(0x191)]===0x1,'dT':f(_0x1580a0['createTimestamp']),'personId':_0x1580a0[_0x399dce(0x13e)],'threadId':_0x1580a0['threadId']};}function G(_0x6dd30,_0x2684c7,_0x256ad6){const _0x3117df=_0x1e7cb5;var _0x55875f,_0xf992e7;if(((_0xf992e7=(_0x55875f=_0x6dd30==null?void 0x0:_0x6dd30[_0x3117df(0x146)])==null?void 0x0:_0x55875f[_0x3117df(0x160)])!=null?_0xf992e7:0x0)>0x0){const _0x225be5=(_0x44b1ed,_0x99de86)=>({'id':_0x44b1ed[_0x3117df(0x17b)],'threadId':_0x44b1ed['threadId'],'dT':f(_0x44b1ed[_0x3117df(0x17d)]),'personId':_0x44b1ed['userId'],'resolved':_0x6dd30['solved']===I[_0x3117df(0x1a3)],'unitId':_0x2684c7,'subUnitId':_0x256ad6,'text':JSON[_0x3117df(0x152)](_0x44b1ed[_0x3117df(0x157)]),'parentId':_0x99de86}),_0x3eb7cb=_0x225be5(_0x6dd30[_0x3117df(0x146)][0x0]);return{..._0x3eb7cb,'children':_0x6dd30[_0x3117df(0x146)][_0x3117df(0x185)](0x1)['map'](_0x53a68f=>_0x225be5(_0x53a68f,_0x3eb7cb['id']))};}return null;}let p=class{constructor(_0x55028b,_0x403b9d,_0x2e63a1){const _0x4727b2=_0x1e7cb5;this[_0x4727b2(0x13b)]=_0x55028b,this[_0x4727b2(0x19b)]=_0x403b9d,this[_0x4727b2(0x17f)]=_0x2e63a1;}async[_0x1e7cb5(0x14b)](_0x4b568a){const _0x491c80=_0x1e7cb5;var _0x15fec4,_0x4007b0;const {parentId:_0xfea93c,unitId:_0x2e8adc,text:_0x1bad22,threadId:_0xda7c73}=_0x4b568a,_0x29f89b=(_0x4007b0=(_0x15fec4=_0x1bad22[_0x491c80(0x180)])==null?void 0x0:_0x15fec4[_0x491c80(0x16a)](_0x40efd5=>_0x40efd5[_0x491c80(0x190)]===c[_0x491c80(0x14a)][_0x491c80(0x138)])[_0x491c80(0x18f)](_0x4d5b3b=>_0x4d5b3b[_0x491c80(0x156)]))!=null?_0x4007b0:[],_0x4d9f1d=JSON[_0x491c80(0x1a1)](_0x1bad22),_0x3eda97=(await this['_sessionService'][_0x491c80(0x164)](_0x2e8adc))[_0x491c80(0x14f)]();if(_0xfea93c){const _0x394315={'memberId':_0x3eda97,'unitId':_0x2e8adc,'content':_0x4d9f1d,'mention':_0x29f89b,'threadId':_0xda7c73},_0x5387ab=(await this[_0x491c80(0x13b)][_0x491c80(0x12e)](_0x491c80(0x19f)+_0x2e8adc+'/reply',{'body':_0x394315}))[_0x491c80(0x12b)][_0x491c80(0x15d)];return{..._0x4b568a,'id':_0x5387ab[_0x491c80(0x17b)],'dT':c[_0x491c80(0x19e)](+_0x5387ab[_0x491c80(0x17d)])[_0x491c80(0x172)](_0x491c80(0x189)),'personId':_0x5387ab['userId']};}else{const _0xdb8ce={'memberId':_0x3eda97,'unitId':_0x2e8adc,'content':_0x4d9f1d,'mention':_0x29f89b},_0x281353=await this[_0x491c80(0x13b)][_0x491c80(0x12e)]('/universer-api/comment/unit/'+_0x2e8adc+_0x491c80(0x12a),{'body':_0xdb8ce});return Y(_0x281353[_0x491c80(0x12b)][_0x491c80(0x158)],_0x4b568a);}}async[_0x1e7cb5(0x179)](_0x2b4a8e){const _0x41f6c6=_0x1e7cb5;var _0x1b7832,_0x15c3a4;const {text:_0xbb7631,unitId:_0x666f2d}=_0x2b4a8e,_0xadc1b2=(_0x15c3a4=(_0x1b7832=_0xbb7631[_0x41f6c6(0x180)])==null?void 0x0:_0x1b7832[_0x41f6c6(0x16a)](_0x1c432b=>_0x1c432b[_0x41f6c6(0x190)]===c[_0x41f6c6(0x14a)][_0x41f6c6(0x138)])[_0x41f6c6(0x18f)](_0x3e8c26=>_0x3e8c26[_0x41f6c6(0x156)]))!=null?_0x15c3a4:[],_0x4bf0d7=JSON[_0x41f6c6(0x1a1)](_0xbb7631),_0x5292ec=_0x2b4a8e[_0x41f6c6(0x14c)],_0x367973=_0x2b4a8e['id'],_0x185989={'memberId':(await this[_0x41f6c6(0x17f)]['requireSession'](_0x666f2d))[_0x41f6c6(0x14f)](),'unitId':_0x666f2d,'threadId':_0x5292ec,'mention':_0xadc1b2,'content':_0x4bf0d7,'replyId':_0x367973},_0x394ace=await this['_httpService'][_0x41f6c6(0x12e)](_0x41f6c6(0x19f)+_0x666f2d+'/edit',{'body':_0x185989});return!_0x394ace['body'][_0x41f6c6(0x199)]||_0x394ace['body']['error'][_0x41f6c6(0x143)]===0x1;}async[_0x1e7cb5(0x168)](_0x3ff9ea){const _0x2d4473=_0x1e7cb5,{unitId:_0x582c24}=_0x3ff9ea,_0x2729d1=_0x3ff9ea[_0x2d4473(0x14c)],_0xfc912e={'memberId':this['_userService'][_0x2d4473(0x13f)]()['userID'],'unitId':_0x582c24,'threadId':_0x2729d1,'solved':_0x3ff9ea[_0x2d4473(0x151)]?I[_0x2d4473(0x1a3)]:I['OpenOrReOpen']},_0x3ebc33=await this[_0x2d4473(0x13b)]['post']('/universer-api/comment/unit/'+_0x582c24+_0x2d4473(0x163),{'body':_0xfc912e});return!_0x3ebc33[_0x2d4473(0x12b)][_0x2d4473(0x199)]||_0x3ebc33['body']['error'][_0x2d4473(0x143)]===0x1;}async[_0x1e7cb5(0x153)](_0x1ca752,_0x386b12,_0x17bff5,_0x43ac6c){const _0x3e55e2=_0x1e7cb5,_0x59704f={'memberId':(await this['_sessionService'][_0x3e55e2(0x164)](_0x1ca752))[_0x3e55e2(0x14f)](),'threadId':_0x17bff5,'replyId':_0x43ac6c,'unitId':_0x1ca752},_0x936c02=await this['_httpService']['post'](_0x3e55e2(0x19f)+_0x1ca752+_0x3e55e2(0x154),{'body':_0x59704f});return!_0x936c02[_0x3e55e2(0x12b)][_0x3e55e2(0x199)]||_0x936c02[_0x3e55e2(0x12b)]['error'][_0x3e55e2(0x143)]===0x1;}async['listComments'](_0x94b353,_0x1f25cc,_0x4fa7f9){const _0x4a377f=_0x1e7cb5,_0x5eba11={'unitId':_0x94b353,'threadId':_0x4fa7f9},_0x2b708d=await this[_0x4a377f(0x13b)][_0x4a377f(0x12e)](_0x4a377f(0x19f)+_0x94b353+_0x4a377f(0x19a),{'body':_0x5eba11}),_0xf73ba7=_0x4fa7f9[_0x4a377f(0x18f)](_0xd023d8=>G(_0x2b708d[_0x4a377f(0x12b)][_0x4a377f(0x18a)][_0xd023d8],_0x94b353,_0x1f25cc))['filter'](Boolean);return Object[_0x4a377f(0x170)](_0x2b708d[_0x4a377f(0x12b)][_0x4a377f(0x129)])[_0x4a377f(0x159)](_0x56a594=>{const _0x599b12=_0x4a377f;this[_0x599b12(0x19b)][_0x599b12(0x134)](_0x56a594);}),_0xf73ba7;}[_0x1e7cb5(0x176)](_0x1af70c){const _0x56eac3=_0x1e7cb5;return{'id':_0x1af70c['id'],'threadId':_0x1af70c[_0x56eac3(0x14c)],'ref':_0x1af70c[_0x56eac3(0x1a6)]};}};p=x([C(0x0,c['Inject'](P['HTTPService'])),C(0x1,c[_0x1e7cb5(0x196)](c[_0x1e7cb5(0x175)])),C(0x2,c[_0x1e7cb5(0x196)](b[_0x1e7cb5(0x16e)]))],p);function _0x3046(){const _0x3ba01a=['Reply','replyId','getComment','createTimestamp','thread-comment-data-source.config','_sessionService','customRanges','_threadCommentDataSourceService','3367518tVwtpO','CommentService','Module','slice','symbol','_initUserSync','509nwvnhF','YYYY/MM/DD\x20HH:mm','comments','type','commentUpdate$','_threadCommentModel','pluginName','map','rangeType','solved','91912CEwTZg','UniverThreadCommentDataSourcePlugin','_initDataSource','getUser','Inject','Delete','root','error','/list','_userService','add','Edit','dayjs','/universer-api/comment/unit/','defineProperty','stringify','UniverThreadCommentUIPlugin','Solved','UniverCollaborationClientPlugin','_threadCommentDataSource','ref','HTTPService','users','/add','body','bufferTime','335812YeOHnO','post','Plugin','onReady','Unknown','Solve','_injector','addUser','_configService','syncUpdateMutationToColla','size','COMMENT','274xmtKkf','7305116genhgs','_httpService','parentId','_config','userId','getCurrentUser','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','ThreadCommentModel','code','IThreadCommentDataSourceService','Injector','replies','DependentOn','find','Disposable','CustomRangeType','addComment','threadId','Add','_commentService','getMemberID','unitId','resolved','parse','deleteComment','/delete','merge','rangeId','content','comment','forEach','userID','toStringTag','OpenOrReOpen','reply','IConfigService','get','length','subscribe','delete','/solved','requireSession','1899wxfjqe','onStarting','personId','resolveComment','UniverInstanceType','filter','getUnit','UNIVER_UNKNOWN','2098425qjvEhV','CollaborationSessionService','user','values','payload','format','UniverLicensePlugin','getOwnPropertyDescriptor','UserManagerService','saveCommentToSnapshot','2291155Rmadms','UNRECOGNIZED','updateComment'];_0x3046=function(){return _0x3ba01a;};return _0x3046();}var H=Object[_0x1e7cb5(0x174)],J=(_0x19a4fe,_0x2848c5,_0x2892cf,_0x4d837d)=>{for(var _0x3b50eb=_0x4d837d>0x1?void 0x0:_0x4d837d?H(_0x2848c5,_0x2892cf):_0x2848c5,_0x103b65=_0x19a4fe['length']-0x1,_0x47dd99;_0x103b65>=0x0;_0x103b65--)(_0x47dd99=_0x19a4fe[_0x103b65])&&(_0x3b50eb=_0x47dd99(_0x3b50eb)||_0x3b50eb);return _0x3b50eb;},y=(_0x296e10,_0x4f249e)=>(_0x352eda,_0x9990eb)=>_0x4f249e(_0x352eda,_0x9990eb,_0x296e10);let g=class extends c[_0x1e7cb5(0x149)]{constructor(_0x43a265,_0x46edc2){const _0x423359=_0x1e7cb5;super(),this[_0x423359(0x181)]=_0x43a265,this[_0x423359(0x1a5)]=_0x46edc2,this[_0x423359(0x194)]();}[_0x1e7cb5(0x194)](){const _0x2a2b2e=_0x1e7cb5;this['_threadCommentDataSourceService']['dataSource']=this[_0x2a2b2e(0x1a5)],this['_threadCommentDataSourceService'][_0x2a2b2e(0x136)]=!0x1;}};g=J([y(0x0,M[_0x1e7cb5(0x144)]),y(0x1,c[_0x1e7cb5(0x196)](p))],g);var F=Object[_0x1e7cb5(0x1a0)],L=Object[_0x1e7cb5(0x174)],Z=(_0x1714a6,_0x26246f,_0xa7a2a5)=>_0x26246f in _0x1714a6?F(_0x1714a6,_0x26246f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xa7a2a5}):_0x1714a6[_0x26246f]=_0xa7a2a5,W=(_0x110216,_0x16a4b5,_0x995c46,_0x1d34bb)=>{const _0x5ced0f=_0x1e7cb5;for(var _0x444738=_0x1d34bb>0x1?void 0x0:_0x1d34bb?L(_0x16a4b5,_0x995c46):_0x16a4b5,_0x1095bf=_0x110216[_0x5ced0f(0x160)]-0x1,_0x2953db;_0x1095bf>=0x0;_0x1095bf--)(_0x2953db=_0x110216[_0x1095bf])&&(_0x444738=_0x2953db(_0x444738)||_0x444738);return _0x444738;},O=(_0x3e3397,_0x17d1cf)=>(_0x3576b8,_0x5c7fa7)=>_0x17d1cf(_0x3576b8,_0x5c7fa7,_0x3e3397),N=(_0x30bf33,_0xb8fa7e,_0x4e6001)=>Z(_0x30bf33,typeof _0xb8fa7e!=_0x1e7cb5(0x186)?_0xb8fa7e+'':_0xb8fa7e,_0x4e6001);function _0x5f4e(_0x581fe4,_0x19ee87){const _0x304638=_0x3046();return _0x5f4e=function(_0x5f4e89,_0x1056e5){_0x5f4e89=_0x5f4e89-0x128;let _0x59ef03=_0x304638[_0x5f4e89];return _0x59ef03;},_0x5f4e(_0x581fe4,_0x19ee87);}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1e7cb5(0x12f)]{constructor(_0x592498=D,_0x5d5ced,_0x25c828){const _0x2d34e2=_0x1e7cb5;super(),this[_0x2d34e2(0x13d)]=_0x592498,this['_injector']=_0x5d5ced,this[_0x2d34e2(0x135)]=_0x25c828;const {..._0x2d4576}=c[_0x2d34e2(0x155)]({},D,this[_0x2d34e2(0x13d)]);this['_configService']['setConfig'](q,_0x2d4576);}[_0x1e7cb5(0x166)](){const _0xc93a6d=_0x1e7cb5;[[p],[g],[_]][_0xc93a6d(0x159)](_0x24d615=>{const _0x29eb2d=_0xc93a6d;this[_0x29eb2d(0x133)][_0x29eb2d(0x19c)](_0x24d615);});}[_0x1e7cb5(0x130)](){const _0xceff50=_0x1e7cb5;this[_0xceff50(0x133)][_0xceff50(0x15f)](g),this[_0xceff50(0x133)][_0xceff50(0x15f)](_);}},N(exports[_0x1e7cb5(0x193)],_0x1e7cb5(0x18e),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x1e7cb5(0x18b),c[_0x1e7cb5(0x169)][_0x1e7cb5(0x16c)]),exports[_0x1e7cb5(0x193)]=W([c[_0x1e7cb5(0x147)](w[_0x1e7cb5(0x1a2)],b[_0x1e7cb5(0x1a4)],T[_0x1e7cb5(0x173)]),O(0x1,c[_0x1e7cb5(0x196)](c[_0x1e7cb5(0x145)])),O(0x2,c[_0x1e7cb5(0x15e)])],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
|
+
const _0x338a3e=_0x5a1c;(function(_0x421eef,_0x21576a){const _0x155f51=_0x5a1c,_0x1f40ca=_0x421eef();while(!![]){try{const _0x7a0bbb=-parseInt(_0x155f51(0x10b))/0x1*(-parseInt(_0x155f51(0x100))/0x2)+parseInt(_0x155f51(0x11b))/0x3+parseInt(_0x155f51(0x111))/0x4*(-parseInt(_0x155f51(0x14a))/0x5)+parseInt(_0x155f51(0x13a))/0x6+-parseInt(_0x155f51(0x156))/0x7+parseInt(_0x155f51(0x122))/0x8*(parseInt(_0x155f51(0x146))/0x9)+-parseInt(_0x155f51(0x12c))/0xa;if(_0x7a0bbb===_0x21576a)break;else _0x1f40ca['push'](_0x1f40ca['shift']());}catch(_0x2934f6){_0x1f40ca['push'](_0x1f40ca['shift']());}}}(_0x5587,0x4a60c));import{CommentService as _0x1def95,CollaborationSessionService as _0x2e0b26,UniverCollaborationClientPlugin as _0x5f22af}from'@univerjs-pro/collaboration-client';function _0x5587(){const _0x1ed97f=['add','defineProperty','/delete','error','_threadCommentDataSourceService','saveCommentToSnapshot','UNIVER_UNKNOWN','symbol','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','11ZMXMml','Reply','find','getUnit','get','dataSource','995772toOZkT','getOwnPropertyDescriptor','_config','Edit','post','users','/list','filter','comment','Delete','1028079AWGkrD','updateComment','_threadCommentModel','getComment','format','code','solved','8dHujXV','subscribe','_httpService','_initDataSource','slice','YYYY/MM/DD\x20HH:mm','pipe','userId','root','_initUserSync','5072660gWPFPJ','resolveComment','/add','content','unitId','length','listComments','rangeId','reply','commentUpdate$','_init','_configService','Solve','customRanges','920280DFVkgd','_sessionService','Add','delete','createTimestamp','replyId','user','type','onReady','resolved','/reply','pluginName','2690757eNPXGv','getUser','/universer-api/comment/unit/','addUser','5HIVOuH','userID','rangeType','threadId','addComment','Solved','_userService','map','parse','body','stringify','COMMENT','1820896gWeTNH','_injector','getMemberID','getCurrentUser','size','_threadCommentDataSource','forEach','OpenOrReOpen','setConfig','syncUpdateMutationToColla','parentId','deleteComment','_commentService','replies','UNRECOGNIZED','95626EdJvYz'];_0x5587=function(){return _0x1ed97f;};return _0x5587();}import{UniverLicensePlugin as _0x1fa237}from'@univerjs-pro/license';import{dayjs as _0x2e89bc,UserManagerService as _0x1fa847,Inject as _0x3dcfa0,Injector as _0xac405f,Disposable as _0x4d943a,CustomRangeType as _0x265937,UniverInstanceType as _0x2d50f1,DependentOn as _0x266507,IConfigService as _0x108d43,Plugin as _0xc515d7,merge as _0xaa02ee}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3d6cdd}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2cf2a9,IThreadCommentDataSourceService as _0x4cbc34}from'@univerjs/thread-comment';import{bufferTime as _0x4bb671}from'rxjs';import{HTTPService as _0x112d55}from'@univerjs/network';const W=_0x338a3e(0x109);var I=(_0x4500c7=>(_0x4500c7[_0x4500c7[_0x338a3e(0x15d)]=0x0]='OpenOrReOpen',_0x4500c7[_0x4500c7['Solved']=0x1]=_0x338a3e(0x14f),_0x4500c7[_0x4500c7[_0x338a3e(0xff)]=-0x1]=_0x338a3e(0xff),_0x4500c7))(I||{}),v=(_0x35e1fb=>(_0x35e1fb[_0x35e1fb['Unknown']=0x0]='Unknown',_0x35e1fb[_0x35e1fb[_0x338a3e(0x13c)]=0x1]=_0x338a3e(0x13c),_0x35e1fb[_0x35e1fb[_0x338a3e(0x10c)]=0x2]=_0x338a3e(0x10c),_0x35e1fb[_0x35e1fb[_0x338a3e(0x114)]=0x3]=_0x338a3e(0x114),_0x35e1fb[_0x35e1fb[_0x338a3e(0x11a)]=0x4]='Delete',_0x35e1fb[_0x35e1fb[_0x338a3e(0x138)]=0x5]=_0x338a3e(0x138),_0x35e1fb[_0x35e1fb[_0x338a3e(0xff)]=-0x1]=_0x338a3e(0xff),_0x35e1fb))(v||{});const y=_0x226e89=>_0x2e89bc(new Date(+_0x226e89))[_0x338a3e(0x11f)](_0x338a3e(0x127)),B=async(_0x378fa9,_0x142af3)=>{const _0x447adb=_0x338a3e,_0x182c3d=_0x378fa9[_0x447adb(0x10f)](_0x1fa847),_0x3c579b=_0x378fa9[_0x447adb(0x10f)](_0x112d55);_0x142af3[_0x447adb(0x15c)](_0x41b28e=>{const _0x5da1c3=_0x447adb;_0x182c3d[_0x5da1c3(0x147)](_0x41b28e)&&_0x142af3[_0x5da1c3(0x13d)](_0x41b28e);}),_0x142af3[_0x447adb(0x15a)]&&(await _0x3c579b['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x142af3]}}))['body'][_0x447adb(0x116)][_0x447adb(0x15c)](_0x56e572=>{const _0x56958b=_0x447adb;_0x56e572&&_0x182c3d[_0x56958b(0x149)](_0x56e572);});};var K=Object[_0x338a3e(0x112)],V=(_0x4f6e70,_0x1b3a77,_0x548a66,_0x26bec7)=>{const _0x114894=_0x338a3e;for(var _0x2dc9f9=_0x26bec7>0x1?void 0x0:_0x26bec7?K(_0x1b3a77,_0x548a66):_0x1b3a77,_0x23d12d=_0x4f6e70[_0x114894(0x131)]-0x1,_0x21d864;_0x23d12d>=0x0;_0x23d12d--)(_0x21d864=_0x4f6e70[_0x23d12d])&&(_0x2dc9f9=_0x21d864(_0x2dc9f9)||_0x2dc9f9);return _0x2dc9f9;},p=(_0x351c9a,_0x4ffbb4)=>(_0x21d346,_0x4064a0)=>_0x4ffbb4(_0x21d346,_0x4064a0,_0x351c9a);let _=class extends _0x4d943a{constructor(_0x297217,_0xf241f0,_0x16f3f2,_0x543ccf){const _0x15c834=_0x338a3e;super(),this[_0x15c834(0xfd)]=_0x297217,this[_0x15c834(0x11d)]=_0xf241f0,this['_userService']=_0x16f3f2,this['_injector']=_0x543ccf,this['_init'](),this[_0x15c834(0x12b)]();}[_0x338a3e(0x12b)](){const _0x82eccc=_0x338a3e;this['disposeWithMe'](this[_0x82eccc(0x11d)]['commentUpdate$'][_0x82eccc(0x128)](_0x4bb671(0x10))[_0x82eccc(0x123)](_0x56da90=>{const _0x5d7d54=_0x82eccc,_0x44e3ee=new Set();_0x56da90[_0x5d7d54(0x15c)](_0x538286=>{const _0x4fcb7e=_0x5d7d54;switch(_0x538286[_0x4fcb7e(0x141)]){case _0x4fcb7e(0x101):{const _0x1cbb31=_0x538286['payload']['personId'];_0x44e3ee[_0x4fcb7e(0x101)](_0x1cbb31);break;}}}),B(this['_injector'],_0x44e3ee);}));}[_0x338a3e(0x136)](){const _0xa4ead8=_0x338a3e;this['disposeWithMe'](this['_commentService'][_0xa4ead8(0x135)][_0xa4ead8(0x123)](async _0x3694f6=>{const _0xcd9c24=_0xa4ead8;var _0x1f5d51,_0x41643d,_0x15beaf,_0x40b714;const _0x3d802e=(_0x1f5d51=this[_0xcd9c24(0x11d)][_0xcd9c24(0x10e)](_0x3694f6[_0xcd9c24(0x130)])[_0xcd9c24(0x10d)](_0x25f61f=>_0x25f61f[_0xcd9c24(0x14d)]===_0x3694f6['threadId']))==null?void 0x0:_0x1f5d51[_0xcd9c24(0x12a)];if(!_0x3d802e)return;const {unitId:_0x1363a9,subUnitId:_0x42d716}=_0x3d802e;switch(_0x3694f6[_0xcd9c24(0x140)]&&this[_0xcd9c24(0x150)][_0xcd9c24(0x149)](_0x3694f6[_0xcd9c24(0x140)]),_0x3694f6['type']){case v['Add']:break;case v[_0xcd9c24(0x10c)]:{this[_0xcd9c24(0x11d)][_0xcd9c24(0x14e)](_0x1363a9,_0x42d716,{'unitId':_0x1363a9,'subUnitId':_0x42d716,'ref':'','id':_0x3694f6[_0xcd9c24(0x13f)],'dT':y(+_0x3694f6[_0xcd9c24(0x13e)]),'threadId':_0x3694f6[_0xcd9c24(0x14d)],'personId':(_0x15beaf=(_0x41643d=_0x3694f6['user'])==null?void 0x0:_0x41643d[_0xcd9c24(0x14b)])!=null?_0x15beaf:_0x3694f6[_0xcd9c24(0x129)],'text':JSON[_0xcd9c24(0x152)](_0x3694f6[_0xcd9c24(0x12f)]),'parentId':_0x3d802e['id']});break;}case v[_0xcd9c24(0x11a)]:{const _0x1224f1=this[_0xcd9c24(0x11d)][_0xcd9c24(0x11e)](_0x1363a9,_0x42d716,_0x3694f6[_0xcd9c24(0x13f)]);_0x1224f1&&_0x1224f1[_0xcd9c24(0xfb)]&&this[_0xcd9c24(0x11d)][_0xcd9c24(0xfc)](_0x1363a9,_0x42d716,_0x3694f6[_0xcd9c24(0x13f)]);break;}case v[_0xcd9c24(0x114)]:{this[_0xcd9c24(0x11d)][_0xcd9c24(0x11c)](_0x1363a9,_0x42d716,{'commentId':_0x3694f6['replyId'],'text':JSON[_0xcd9c24(0x152)](_0x3694f6[_0xcd9c24(0x12f)])});break;}case v[_0xcd9c24(0x138)]:{const _0x32af58=(_0x40b714=this[_0xcd9c24(0x11d)][_0xcd9c24(0x10e)](_0x3694f6[_0xcd9c24(0x130)])[_0xcd9c24(0x10d)](_0x5edea5=>_0x5edea5[_0xcd9c24(0x14d)]===_0x3694f6['threadId']))==null?void 0x0:_0x40b714[_0xcd9c24(0x12a)];_0x32af58&&this[_0xcd9c24(0x11d)]['resolveComment'](_0x1363a9,_0x42d716,_0x32af58['id'],_0x3694f6[_0xcd9c24(0x121)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x3dcfa0(_0x1def95)),p(0x1,_0x3dcfa0(_0x2cf2a9)),p(0x2,_0x3dcfa0(_0x1fa847)),p(0x3,_0x3dcfa0(_0xac405f))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x338a3e(0x112)],Q=(_0x5cffac,_0x9fdacf,_0x1fcf1f,_0x4ac5c6)=>{const _0x5d2aab=_0x338a3e;for(var _0x3ea5c6=_0x4ac5c6>0x1?void 0x0:_0x4ac5c6?k(_0x9fdacf,_0x1fcf1f):_0x9fdacf,_0x5a1a7d=_0x5cffac[_0x5d2aab(0x131)]-0x1,_0x4220eb;_0x5a1a7d>=0x0;_0x5a1a7d--)(_0x4220eb=_0x5cffac[_0x5a1a7d])&&(_0x3ea5c6=_0x4220eb(_0x3ea5c6)||_0x3ea5c6);return _0x3ea5c6;},b=(_0x9731cc,_0x4af6e8)=>(_0x510a8d,_0x2c6b36)=>_0x4af6e8(_0x510a8d,_0x2c6b36,_0x9731cc);function X(_0x2ccde8,_0x176d52){const _0x3a1a10=_0x338a3e,_0x19bf87=_0x2ccde8['replies'][0x0];return{..._0x176d52,'id':_0x19bf87[_0x3a1a10(0x13f)],'resolved':_0x2ccde8[_0x3a1a10(0x121)]===0x1,'dT':y(_0x19bf87[_0x3a1a10(0x13e)]),'personId':_0x19bf87[_0x3a1a10(0x129)],'threadId':_0x19bf87['threadId']};}function ee(_0x2a1ce0,_0x451b4b,_0x22e8dc){const _0x5e87f7=_0x338a3e;var _0x3777e1,_0x30a3dc;if(((_0x30a3dc=(_0x3777e1=_0x2a1ce0==null?void 0x0:_0x2a1ce0['replies'])==null?void 0x0:_0x3777e1[_0x5e87f7(0x131)])!=null?_0x30a3dc:0x0)>0x0){const _0x147947=(_0x4a85a1,_0x5bd59b)=>({'id':_0x4a85a1[_0x5e87f7(0x13f)],'threadId':_0x4a85a1['threadId'],'dT':y(_0x4a85a1[_0x5e87f7(0x13e)]),'personId':_0x4a85a1[_0x5e87f7(0x129)],'resolved':_0x2a1ce0['solved']===I[_0x5e87f7(0x14f)],'unitId':_0x451b4b,'subUnitId':_0x22e8dc,'text':JSON['parse'](_0x4a85a1[_0x5e87f7(0x12f)]),'parentId':_0x5bd59b}),_0x968d23=_0x147947(_0x2a1ce0[_0x5e87f7(0xfe)][0x0]);return{..._0x968d23,'children':_0x2a1ce0[_0x5e87f7(0xfe)][_0x5e87f7(0x126)](0x1)[_0x5e87f7(0x151)](_0x54641e=>_0x147947(_0x54641e,_0x968d23['id']))};}return null;}let S=class{constructor(_0x3e1357,_0x2ca5a6,_0x44dade){const _0x2f836e=_0x338a3e;this['_httpService']=_0x3e1357,this[_0x2f836e(0x150)]=_0x2ca5a6,this[_0x2f836e(0x13b)]=_0x44dade;}async[_0x338a3e(0x14e)](_0x5b06db){const _0xb5aa14=_0x338a3e;var _0x54f22d,_0x598e90;const {parentId:_0x40580b,unitId:_0x1bea6d,text:_0x8a6db2,threadId:_0x4781a4}=_0x5b06db,_0x4db24c=(_0x598e90=(_0x54f22d=_0x8a6db2['customRanges'])==null?void 0x0:_0x54f22d[_0xb5aa14(0x118)](_0x359dc5=>_0x359dc5['rangeType']===_0x265937[_0xb5aa14(0x155)])['map'](_0x1bf44b=>_0x1bf44b[_0xb5aa14(0x133)]))!=null?_0x598e90:[],_0x2a07ba=JSON[_0xb5aa14(0x154)](_0x8a6db2),_0x488f3c=(await this[_0xb5aa14(0x13b)][_0xb5aa14(0x10a)](_0x1bea6d))[_0xb5aa14(0x158)]();if(_0x40580b){const _0x381699={'memberId':_0x488f3c,'unitId':_0x1bea6d,'content':_0x2a07ba,'mention':_0x4db24c,'threadId':_0x4781a4},_0x5a780b=(await this['_httpService'][_0xb5aa14(0x115)]('/universer-api/comment/unit/'+_0x1bea6d+_0xb5aa14(0x144),{'body':_0x381699}))[_0xb5aa14(0x153)][_0xb5aa14(0x134)];return{..._0x5b06db,'id':_0x5a780b[_0xb5aa14(0x13f)],'dT':_0x2e89bc(+_0x5a780b[_0xb5aa14(0x13e)])[_0xb5aa14(0x11f)](_0xb5aa14(0x127)),'personId':_0x5a780b[_0xb5aa14(0x129)]};}else{const _0x4e65e3={'memberId':_0x488f3c,'unitId':_0x1bea6d,'content':_0x2a07ba,'mention':_0x4db24c},_0xb727bf=await this[_0xb5aa14(0x124)]['post']('/universer-api/comment/unit/'+_0x1bea6d+_0xb5aa14(0x12e),{'body':_0x4e65e3});return X(_0xb727bf[_0xb5aa14(0x153)][_0xb5aa14(0x119)],_0x5b06db);}}async[_0x338a3e(0x11c)](_0x14f34d){const _0x32c5d4=_0x338a3e;var _0x5df3a9,_0x506e1c;const {text:_0x49c043,unitId:_0x24b95f}=_0x14f34d,_0x42e7fa=(_0x506e1c=(_0x5df3a9=_0x49c043[_0x32c5d4(0x139)])==null?void 0x0:_0x5df3a9[_0x32c5d4(0x118)](_0x418b2d=>_0x418b2d[_0x32c5d4(0x14c)]===_0x265937[_0x32c5d4(0x155)])[_0x32c5d4(0x151)](_0x4c4660=>_0x4c4660['rangeId']))!=null?_0x506e1c:[],_0x4fe81d=JSON['stringify'](_0x49c043),_0x5e7004=_0x14f34d[_0x32c5d4(0x14d)],_0x337074=_0x14f34d['id'],_0x56bedd={'memberId':(await this[_0x32c5d4(0x13b)]['requireSession'](_0x24b95f))[_0x32c5d4(0x158)](),'unitId':_0x24b95f,'threadId':_0x5e7004,'mention':_0x42e7fa,'content':_0x4fe81d,'replyId':_0x337074},_0x1dbc8e=await this[_0x32c5d4(0x124)][_0x32c5d4(0x115)]('/universer-api/comment/unit/'+_0x24b95f+'/edit',{'body':_0x56bedd});return!_0x1dbc8e['body'][_0x32c5d4(0x104)]||_0x1dbc8e['body'][_0x32c5d4(0x104)][_0x32c5d4(0x120)]===0x1;}async[_0x338a3e(0x12d)](_0x3382c9){const _0x150cc7=_0x338a3e,{unitId:_0x141cbe}=_0x3382c9,_0x334650=_0x3382c9['threadId'],_0x104119={'memberId':this['_userService'][_0x150cc7(0x159)]()[_0x150cc7(0x14b)],'unitId':_0x141cbe,'threadId':_0x334650,'solved':_0x3382c9[_0x150cc7(0x143)]?I[_0x150cc7(0x14f)]:I[_0x150cc7(0x15d)]},_0x64487c=await this[_0x150cc7(0x124)][_0x150cc7(0x115)]('/universer-api/comment/unit/'+_0x141cbe+'/solved',{'body':_0x104119});return!_0x64487c['body'][_0x150cc7(0x104)]||_0x64487c[_0x150cc7(0x153)][_0x150cc7(0x104)]['code']===0x1;}async['deleteComment'](_0x536d8b,_0x3b1700,_0x2d620a,_0x489a84){const _0x451505=_0x338a3e,_0x4bda8c={'memberId':(await this[_0x451505(0x13b)][_0x451505(0x10a)](_0x536d8b))[_0x451505(0x158)](),'threadId':_0x2d620a,'replyId':_0x489a84,'unitId':_0x536d8b},_0x38a2b3=await this[_0x451505(0x124)][_0x451505(0x115)](_0x451505(0x148)+_0x536d8b+_0x451505(0x103),{'body':_0x4bda8c});return!_0x38a2b3[_0x451505(0x153)][_0x451505(0x104)]||_0x38a2b3[_0x451505(0x153)]['error']['code']===0x1;}async[_0x338a3e(0x132)](_0x1c8cac,_0x5481b0,_0x831ede){const _0x5f4a19=_0x338a3e,_0x10092c={'unitId':_0x1c8cac,'threadId':_0x831ede},_0x157b19=await this[_0x5f4a19(0x124)][_0x5f4a19(0x115)](_0x5f4a19(0x148)+_0x1c8cac+_0x5f4a19(0x117),{'body':_0x10092c}),_0x46485d=_0x831ede[_0x5f4a19(0x151)](_0x132065=>ee(_0x157b19['body']['comments'][_0x132065],_0x1c8cac,_0x5481b0))[_0x5f4a19(0x118)](Boolean);return Object['values'](_0x157b19['body']['users'])[_0x5f4a19(0x15c)](_0x211611=>{const _0x4d090c=_0x5f4a19;this[_0x4d090c(0x150)][_0x4d090c(0x149)](_0x211611);}),_0x46485d;}[_0x338a3e(0x106)](_0x212752){return{'id':_0x212752['id'],'threadId':_0x212752['threadId'],'ref':_0x212752['ref']};}};S=Q([b(0x0,_0x3dcfa0(_0x112d55)),b(0x1,_0x3dcfa0(_0x1fa847)),b(0x2,_0x3dcfa0(_0x2e0b26))],S);var re=Object[_0x338a3e(0x112)],te=(_0x18f331,_0x795dbf,_0x3e4002,_0x33eb0f)=>{const _0x35834a=_0x338a3e;for(var _0x51100e=_0x33eb0f>0x1?void 0x0:_0x33eb0f?re(_0x795dbf,_0x3e4002):_0x795dbf,_0x5e9855=_0x18f331[_0x35834a(0x131)]-0x1,_0x5aba81;_0x5e9855>=0x0;_0x5e9855--)(_0x5aba81=_0x18f331[_0x5e9855])&&(_0x51100e=_0x5aba81(_0x51100e)||_0x51100e);return _0x51100e;},M=(_0x918176,_0x219454)=>(_0x244624,_0x48c445)=>_0x219454(_0x244624,_0x48c445,_0x918176);let f=class extends _0x4d943a{constructor(_0x2a873,_0x1a6cad){const _0x397510=_0x338a3e;super(),this[_0x397510(0x105)]=_0x2a873,this[_0x397510(0x15b)]=_0x1a6cad,this[_0x397510(0x125)]();}['_initDataSource'](){const _0xa8573=_0x338a3e;this[_0xa8573(0x105)][_0xa8573(0x110)]=this[_0xa8573(0x15b)],this[_0xa8573(0x105)][_0xa8573(0xfa)]=!0x1;}};f=te([M(0x0,_0x4cbc34),M(0x1,_0x3dcfa0(S))],f);var se=Object[_0x338a3e(0x102)],oe=Object[_0x338a3e(0x112)],ne=(_0x181a5a,_0x7a7a70,_0x5cbeb5)=>_0x7a7a70 in _0x181a5a?se(_0x181a5a,_0x7a7a70,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5cbeb5}):_0x181a5a[_0x7a7a70]=_0x5cbeb5,ie=(_0x328dfb,_0x5df7d7,_0x2b461b,_0x477789)=>{const _0x375b10=_0x338a3e;for(var _0x45ddc3=_0x477789>0x1?void 0x0:_0x477789?oe(_0x5df7d7,_0x2b461b):_0x5df7d7,_0x42a7c5=_0x328dfb[_0x375b10(0x131)]-0x1,_0x12e377;_0x42a7c5>=0x0;_0x42a7c5--)(_0x12e377=_0x328dfb[_0x42a7c5])&&(_0x45ddc3=_0x12e377(_0x45ddc3)||_0x45ddc3);return _0x45ddc3;},N=(_0x1dffd5,_0x13cbd7)=>(_0x352a40,_0x2a90f9)=>_0x13cbd7(_0x352a40,_0x2a90f9,_0x1dffd5),$=(_0x3a438f,_0x9d9e30,_0x155efe)=>ne(_0x3a438f,typeof _0x9d9e30!=_0x338a3e(0x108)?_0x9d9e30+'':_0x9d9e30,_0x155efe);let g=class extends _0xc515d7{constructor(_0x44dd69=O,_0x9b157c,_0x3d048f){const _0xabcd55=_0x338a3e;super(),this[_0xabcd55(0x113)]=_0x44dd69,this[_0xabcd55(0x157)]=_0x9b157c,this['_configService']=_0x3d048f;const {..._0x4cb607}=_0xaa02ee({},O,this['_config']);this[_0xabcd55(0x137)][_0xabcd55(0x15e)](z,_0x4cb607);}['onStarting'](){const _0x26d32d=_0x338a3e;[[S],[f],[_]][_0x26d32d(0x15c)](_0x361d75=>{const _0x5b897a=_0x26d32d;this[_0x5b897a(0x157)][_0x5b897a(0x101)](_0x361d75);});}[_0x338a3e(0x142)](){const _0x48806f=_0x338a3e;this['_injector'][_0x48806f(0x10f)](f),this[_0x48806f(0x157)][_0x48806f(0x10f)](_);}};function _0x5a1c(_0x3f2a5f,_0x50d58e){const _0x5587d2=_0x5587();return _0x5a1c=function(_0x5a1c5f,_0x46e39a){_0x5a1c5f=_0x5a1c5f-0xfa;let _0xdaf486=_0x5587d2[_0x5a1c5f];return _0xdaf486;},_0x5a1c(_0x3f2a5f,_0x50d58e);}$(g,_0x338a3e(0x145),W),$(g,_0x338a3e(0x141),_0x2d50f1[_0x338a3e(0x107)]),g=ie([_0x266507(_0x3d6cdd,_0x5f22af,_0x1fa237),N(0x1,_0x3dcfa0(_0xac405f)),N(0x2,_0x108d43)],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
|
+
const _0x338a3e=_0x5a1c;(function(_0x421eef,_0x21576a){const _0x155f51=_0x5a1c,_0x1f40ca=_0x421eef();while(!![]){try{const _0x7a0bbb=-parseInt(_0x155f51(0x10b))/0x1*(-parseInt(_0x155f51(0x100))/0x2)+parseInt(_0x155f51(0x11b))/0x3+parseInt(_0x155f51(0x111))/0x4*(-parseInt(_0x155f51(0x14a))/0x5)+parseInt(_0x155f51(0x13a))/0x6+-parseInt(_0x155f51(0x156))/0x7+parseInt(_0x155f51(0x122))/0x8*(parseInt(_0x155f51(0x146))/0x9)+-parseInt(_0x155f51(0x12c))/0xa;if(_0x7a0bbb===_0x21576a)break;else _0x1f40ca['push'](_0x1f40ca['shift']());}catch(_0x2934f6){_0x1f40ca['push'](_0x1f40ca['shift']());}}}(_0x5587,0x4a60c));import{CommentService as _0x1def95,CollaborationSessionService as _0x2e0b26,UniverCollaborationClientPlugin as _0x5f22af}from'@univerjs-pro/collaboration-client';function _0x5587(){const _0x1ed97f=['add','defineProperty','/delete','error','_threadCommentDataSourceService','saveCommentToSnapshot','UNIVER_UNKNOWN','symbol','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','11ZMXMml','Reply','find','getUnit','get','dataSource','995772toOZkT','getOwnPropertyDescriptor','_config','Edit','post','users','/list','filter','comment','Delete','1028079AWGkrD','updateComment','_threadCommentModel','getComment','format','code','solved','8dHujXV','subscribe','_httpService','_initDataSource','slice','YYYY/MM/DD\x20HH:mm','pipe','userId','root','_initUserSync','5072660gWPFPJ','resolveComment','/add','content','unitId','length','listComments','rangeId','reply','commentUpdate$','_init','_configService','Solve','customRanges','920280DFVkgd','_sessionService','Add','delete','createTimestamp','replyId','user','type','onReady','resolved','/reply','pluginName','2690757eNPXGv','getUser','/universer-api/comment/unit/','addUser','5HIVOuH','userID','rangeType','threadId','addComment','Solved','_userService','map','parse','body','stringify','COMMENT','1820896gWeTNH','_injector','getMemberID','getCurrentUser','size','_threadCommentDataSource','forEach','OpenOrReOpen','setConfig','syncUpdateMutationToColla','parentId','deleteComment','_commentService','replies','UNRECOGNIZED','95626EdJvYz'];_0x5587=function(){return _0x1ed97f;};return _0x5587();}import{UniverLicensePlugin as _0x1fa237}from'@univerjs-pro/license';import{dayjs as _0x2e89bc,UserManagerService as _0x1fa847,Inject as _0x3dcfa0,Injector as _0xac405f,Disposable as _0x4d943a,CustomRangeType as _0x265937,UniverInstanceType as _0x2d50f1,DependentOn as _0x266507,IConfigService as _0x108d43,Plugin as _0xc515d7,merge as _0xaa02ee}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3d6cdd}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2cf2a9,IThreadCommentDataSourceService as _0x4cbc34}from'@univerjs/thread-comment';import{bufferTime as _0x4bb671}from'rxjs';import{HTTPService as _0x112d55}from'@univerjs/network';const W=_0x338a3e(0x109);var I=(_0x4500c7=>(_0x4500c7[_0x4500c7[_0x338a3e(0x15d)]=0x0]='OpenOrReOpen',_0x4500c7[_0x4500c7['Solved']=0x1]=_0x338a3e(0x14f),_0x4500c7[_0x4500c7[_0x338a3e(0xff)]=-0x1]=_0x338a3e(0xff),_0x4500c7))(I||{}),v=(_0x35e1fb=>(_0x35e1fb[_0x35e1fb['Unknown']=0x0]='Unknown',_0x35e1fb[_0x35e1fb[_0x338a3e(0x13c)]=0x1]=_0x338a3e(0x13c),_0x35e1fb[_0x35e1fb[_0x338a3e(0x10c)]=0x2]=_0x338a3e(0x10c),_0x35e1fb[_0x35e1fb[_0x338a3e(0x114)]=0x3]=_0x338a3e(0x114),_0x35e1fb[_0x35e1fb[_0x338a3e(0x11a)]=0x4]='Delete',_0x35e1fb[_0x35e1fb[_0x338a3e(0x138)]=0x5]=_0x338a3e(0x138),_0x35e1fb[_0x35e1fb[_0x338a3e(0xff)]=-0x1]=_0x338a3e(0xff),_0x35e1fb))(v||{});const y=_0x226e89=>_0x2e89bc(new Date(+_0x226e89))[_0x338a3e(0x11f)](_0x338a3e(0x127)),B=async(_0x378fa9,_0x142af3)=>{const _0x447adb=_0x338a3e,_0x182c3d=_0x378fa9[_0x447adb(0x10f)](_0x1fa847),_0x3c579b=_0x378fa9[_0x447adb(0x10f)](_0x112d55);_0x142af3[_0x447adb(0x15c)](_0x41b28e=>{const _0x5da1c3=_0x447adb;_0x182c3d[_0x5da1c3(0x147)](_0x41b28e)&&_0x142af3[_0x5da1c3(0x13d)](_0x41b28e);}),_0x142af3[_0x447adb(0x15a)]&&(await _0x3c579b['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x142af3]}}))['body'][_0x447adb(0x116)][_0x447adb(0x15c)](_0x56e572=>{const _0x56958b=_0x447adb;_0x56e572&&_0x182c3d[_0x56958b(0x149)](_0x56e572);});};var K=Object[_0x338a3e(0x112)],V=(_0x4f6e70,_0x1b3a77,_0x548a66,_0x26bec7)=>{const _0x114894=_0x338a3e;for(var _0x2dc9f9=_0x26bec7>0x1?void 0x0:_0x26bec7?K(_0x1b3a77,_0x548a66):_0x1b3a77,_0x23d12d=_0x4f6e70[_0x114894(0x131)]-0x1,_0x21d864;_0x23d12d>=0x0;_0x23d12d--)(_0x21d864=_0x4f6e70[_0x23d12d])&&(_0x2dc9f9=_0x21d864(_0x2dc9f9)||_0x2dc9f9);return _0x2dc9f9;},p=(_0x351c9a,_0x4ffbb4)=>(_0x21d346,_0x4064a0)=>_0x4ffbb4(_0x21d346,_0x4064a0,_0x351c9a);let _=class extends _0x4d943a{constructor(_0x297217,_0xf241f0,_0x16f3f2,_0x543ccf){const _0x15c834=_0x338a3e;super(),this[_0x15c834(0xfd)]=_0x297217,this[_0x15c834(0x11d)]=_0xf241f0,this['_userService']=_0x16f3f2,this['_injector']=_0x543ccf,this['_init'](),this[_0x15c834(0x12b)]();}[_0x338a3e(0x12b)](){const _0x82eccc=_0x338a3e;this['disposeWithMe'](this[_0x82eccc(0x11d)]['commentUpdate$'][_0x82eccc(0x128)](_0x4bb671(0x10))[_0x82eccc(0x123)](_0x56da90=>{const _0x5d7d54=_0x82eccc,_0x44e3ee=new Set();_0x56da90[_0x5d7d54(0x15c)](_0x538286=>{const _0x4fcb7e=_0x5d7d54;switch(_0x538286[_0x4fcb7e(0x141)]){case _0x4fcb7e(0x101):{const _0x1cbb31=_0x538286['payload']['personId'];_0x44e3ee[_0x4fcb7e(0x101)](_0x1cbb31);break;}}}),B(this['_injector'],_0x44e3ee);}));}[_0x338a3e(0x136)](){const _0xa4ead8=_0x338a3e;this['disposeWithMe'](this['_commentService'][_0xa4ead8(0x135)][_0xa4ead8(0x123)](async _0x3694f6=>{const _0xcd9c24=_0xa4ead8;var _0x1f5d51,_0x41643d,_0x15beaf,_0x40b714;const _0x3d802e=(_0x1f5d51=this[_0xcd9c24(0x11d)][_0xcd9c24(0x10e)](_0x3694f6[_0xcd9c24(0x130)])[_0xcd9c24(0x10d)](_0x25f61f=>_0x25f61f[_0xcd9c24(0x14d)]===_0x3694f6['threadId']))==null?void 0x0:_0x1f5d51[_0xcd9c24(0x12a)];if(!_0x3d802e)return;const {unitId:_0x1363a9,subUnitId:_0x42d716}=_0x3d802e;switch(_0x3694f6[_0xcd9c24(0x140)]&&this[_0xcd9c24(0x150)][_0xcd9c24(0x149)](_0x3694f6[_0xcd9c24(0x140)]),_0x3694f6['type']){case v['Add']:break;case v[_0xcd9c24(0x10c)]:{this[_0xcd9c24(0x11d)][_0xcd9c24(0x14e)](_0x1363a9,_0x42d716,{'unitId':_0x1363a9,'subUnitId':_0x42d716,'ref':'','id':_0x3694f6[_0xcd9c24(0x13f)],'dT':y(+_0x3694f6[_0xcd9c24(0x13e)]),'threadId':_0x3694f6[_0xcd9c24(0x14d)],'personId':(_0x15beaf=(_0x41643d=_0x3694f6['user'])==null?void 0x0:_0x41643d[_0xcd9c24(0x14b)])!=null?_0x15beaf:_0x3694f6[_0xcd9c24(0x129)],'text':JSON[_0xcd9c24(0x152)](_0x3694f6[_0xcd9c24(0x12f)]),'parentId':_0x3d802e['id']});break;}case v[_0xcd9c24(0x11a)]:{const _0x1224f1=this[_0xcd9c24(0x11d)][_0xcd9c24(0x11e)](_0x1363a9,_0x42d716,_0x3694f6[_0xcd9c24(0x13f)]);_0x1224f1&&_0x1224f1[_0xcd9c24(0xfb)]&&this[_0xcd9c24(0x11d)][_0xcd9c24(0xfc)](_0x1363a9,_0x42d716,_0x3694f6[_0xcd9c24(0x13f)]);break;}case v[_0xcd9c24(0x114)]:{this[_0xcd9c24(0x11d)][_0xcd9c24(0x11c)](_0x1363a9,_0x42d716,{'commentId':_0x3694f6['replyId'],'text':JSON[_0xcd9c24(0x152)](_0x3694f6[_0xcd9c24(0x12f)])});break;}case v[_0xcd9c24(0x138)]:{const _0x32af58=(_0x40b714=this[_0xcd9c24(0x11d)][_0xcd9c24(0x10e)](_0x3694f6[_0xcd9c24(0x130)])[_0xcd9c24(0x10d)](_0x5edea5=>_0x5edea5[_0xcd9c24(0x14d)]===_0x3694f6['threadId']))==null?void 0x0:_0x40b714[_0xcd9c24(0x12a)];_0x32af58&&this[_0xcd9c24(0x11d)]['resolveComment'](_0x1363a9,_0x42d716,_0x32af58['id'],_0x3694f6[_0xcd9c24(0x121)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x3dcfa0(_0x1def95)),p(0x1,_0x3dcfa0(_0x2cf2a9)),p(0x2,_0x3dcfa0(_0x1fa847)),p(0x3,_0x3dcfa0(_0xac405f))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x338a3e(0x112)],Q=(_0x5cffac,_0x9fdacf,_0x1fcf1f,_0x4ac5c6)=>{const _0x5d2aab=_0x338a3e;for(var _0x3ea5c6=_0x4ac5c6>0x1?void 0x0:_0x4ac5c6?k(_0x9fdacf,_0x1fcf1f):_0x9fdacf,_0x5a1a7d=_0x5cffac[_0x5d2aab(0x131)]-0x1,_0x4220eb;_0x5a1a7d>=0x0;_0x5a1a7d--)(_0x4220eb=_0x5cffac[_0x5a1a7d])&&(_0x3ea5c6=_0x4220eb(_0x3ea5c6)||_0x3ea5c6);return _0x3ea5c6;},b=(_0x9731cc,_0x4af6e8)=>(_0x510a8d,_0x2c6b36)=>_0x4af6e8(_0x510a8d,_0x2c6b36,_0x9731cc);function X(_0x2ccde8,_0x176d52){const _0x3a1a10=_0x338a3e,_0x19bf87=_0x2ccde8['replies'][0x0];return{..._0x176d52,'id':_0x19bf87[_0x3a1a10(0x13f)],'resolved':_0x2ccde8[_0x3a1a10(0x121)]===0x1,'dT':y(_0x19bf87[_0x3a1a10(0x13e)]),'personId':_0x19bf87[_0x3a1a10(0x129)],'threadId':_0x19bf87['threadId']};}function ee(_0x2a1ce0,_0x451b4b,_0x22e8dc){const _0x5e87f7=_0x338a3e;var _0x3777e1,_0x30a3dc;if(((_0x30a3dc=(_0x3777e1=_0x2a1ce0==null?void 0x0:_0x2a1ce0['replies'])==null?void 0x0:_0x3777e1[_0x5e87f7(0x131)])!=null?_0x30a3dc:0x0)>0x0){const _0x147947=(_0x4a85a1,_0x5bd59b)=>({'id':_0x4a85a1[_0x5e87f7(0x13f)],'threadId':_0x4a85a1['threadId'],'dT':y(_0x4a85a1[_0x5e87f7(0x13e)]),'personId':_0x4a85a1[_0x5e87f7(0x129)],'resolved':_0x2a1ce0['solved']===I[_0x5e87f7(0x14f)],'unitId':_0x451b4b,'subUnitId':_0x22e8dc,'text':JSON['parse'](_0x4a85a1[_0x5e87f7(0x12f)]),'parentId':_0x5bd59b}),_0x968d23=_0x147947(_0x2a1ce0[_0x5e87f7(0xfe)][0x0]);return{..._0x968d23,'children':_0x2a1ce0[_0x5e87f7(0xfe)][_0x5e87f7(0x126)](0x1)[_0x5e87f7(0x151)](_0x54641e=>_0x147947(_0x54641e,_0x968d23['id']))};}return null;}let S=class{constructor(_0x3e1357,_0x2ca5a6,_0x44dade){const _0x2f836e=_0x338a3e;this['_httpService']=_0x3e1357,this[_0x2f836e(0x150)]=_0x2ca5a6,this[_0x2f836e(0x13b)]=_0x44dade;}async[_0x338a3e(0x14e)](_0x5b06db){const _0xb5aa14=_0x338a3e;var _0x54f22d,_0x598e90;const {parentId:_0x40580b,unitId:_0x1bea6d,text:_0x8a6db2,threadId:_0x4781a4}=_0x5b06db,_0x4db24c=(_0x598e90=(_0x54f22d=_0x8a6db2['customRanges'])==null?void 0x0:_0x54f22d[_0xb5aa14(0x118)](_0x359dc5=>_0x359dc5['rangeType']===_0x265937[_0xb5aa14(0x155)])['map'](_0x1bf44b=>_0x1bf44b[_0xb5aa14(0x133)]))!=null?_0x598e90:[],_0x2a07ba=JSON[_0xb5aa14(0x154)](_0x8a6db2),_0x488f3c=(await this[_0xb5aa14(0x13b)][_0xb5aa14(0x10a)](_0x1bea6d))[_0xb5aa14(0x158)]();if(_0x40580b){const _0x381699={'memberId':_0x488f3c,'unitId':_0x1bea6d,'content':_0x2a07ba,'mention':_0x4db24c,'threadId':_0x4781a4},_0x5a780b=(await this['_httpService'][_0xb5aa14(0x115)]('/universer-api/comment/unit/'+_0x1bea6d+_0xb5aa14(0x144),{'body':_0x381699}))[_0xb5aa14(0x153)][_0xb5aa14(0x134)];return{..._0x5b06db,'id':_0x5a780b[_0xb5aa14(0x13f)],'dT':_0x2e89bc(+_0x5a780b[_0xb5aa14(0x13e)])[_0xb5aa14(0x11f)](_0xb5aa14(0x127)),'personId':_0x5a780b[_0xb5aa14(0x129)]};}else{const _0x4e65e3={'memberId':_0x488f3c,'unitId':_0x1bea6d,'content':_0x2a07ba,'mention':_0x4db24c},_0xb727bf=await this[_0xb5aa14(0x124)]['post']('/universer-api/comment/unit/'+_0x1bea6d+_0xb5aa14(0x12e),{'body':_0x4e65e3});return X(_0xb727bf[_0xb5aa14(0x153)][_0xb5aa14(0x119)],_0x5b06db);}}async[_0x338a3e(0x11c)](_0x14f34d){const _0x32c5d4=_0x338a3e;var _0x5df3a9,_0x506e1c;const {text:_0x49c043,unitId:_0x24b95f}=_0x14f34d,_0x42e7fa=(_0x506e1c=(_0x5df3a9=_0x49c043[_0x32c5d4(0x139)])==null?void 0x0:_0x5df3a9[_0x32c5d4(0x118)](_0x418b2d=>_0x418b2d[_0x32c5d4(0x14c)]===_0x265937[_0x32c5d4(0x155)])[_0x32c5d4(0x151)](_0x4c4660=>_0x4c4660['rangeId']))!=null?_0x506e1c:[],_0x4fe81d=JSON['stringify'](_0x49c043),_0x5e7004=_0x14f34d[_0x32c5d4(0x14d)],_0x337074=_0x14f34d['id'],_0x56bedd={'memberId':(await this[_0x32c5d4(0x13b)]['requireSession'](_0x24b95f))[_0x32c5d4(0x158)](),'unitId':_0x24b95f,'threadId':_0x5e7004,'mention':_0x42e7fa,'content':_0x4fe81d,'replyId':_0x337074},_0x1dbc8e=await this[_0x32c5d4(0x124)][_0x32c5d4(0x115)]('/universer-api/comment/unit/'+_0x24b95f+'/edit',{'body':_0x56bedd});return!_0x1dbc8e['body'][_0x32c5d4(0x104)]||_0x1dbc8e['body'][_0x32c5d4(0x104)][_0x32c5d4(0x120)]===0x1;}async[_0x338a3e(0x12d)](_0x3382c9){const _0x150cc7=_0x338a3e,{unitId:_0x141cbe}=_0x3382c9,_0x334650=_0x3382c9['threadId'],_0x104119={'memberId':this['_userService'][_0x150cc7(0x159)]()[_0x150cc7(0x14b)],'unitId':_0x141cbe,'threadId':_0x334650,'solved':_0x3382c9[_0x150cc7(0x143)]?I[_0x150cc7(0x14f)]:I[_0x150cc7(0x15d)]},_0x64487c=await this[_0x150cc7(0x124)][_0x150cc7(0x115)]('/universer-api/comment/unit/'+_0x141cbe+'/solved',{'body':_0x104119});return!_0x64487c['body'][_0x150cc7(0x104)]||_0x64487c[_0x150cc7(0x153)][_0x150cc7(0x104)]['code']===0x1;}async['deleteComment'](_0x536d8b,_0x3b1700,_0x2d620a,_0x489a84){const _0x451505=_0x338a3e,_0x4bda8c={'memberId':(await this[_0x451505(0x13b)][_0x451505(0x10a)](_0x536d8b))[_0x451505(0x158)](),'threadId':_0x2d620a,'replyId':_0x489a84,'unitId':_0x536d8b},_0x38a2b3=await this[_0x451505(0x124)][_0x451505(0x115)](_0x451505(0x148)+_0x536d8b+_0x451505(0x103),{'body':_0x4bda8c});return!_0x38a2b3[_0x451505(0x153)][_0x451505(0x104)]||_0x38a2b3[_0x451505(0x153)]['error']['code']===0x1;}async[_0x338a3e(0x132)](_0x1c8cac,_0x5481b0,_0x831ede){const _0x5f4a19=_0x338a3e,_0x10092c={'unitId':_0x1c8cac,'threadId':_0x831ede},_0x157b19=await this[_0x5f4a19(0x124)][_0x5f4a19(0x115)](_0x5f4a19(0x148)+_0x1c8cac+_0x5f4a19(0x117),{'body':_0x10092c}),_0x46485d=_0x831ede[_0x5f4a19(0x151)](_0x132065=>ee(_0x157b19['body']['comments'][_0x132065],_0x1c8cac,_0x5481b0))[_0x5f4a19(0x118)](Boolean);return Object['values'](_0x157b19['body']['users'])[_0x5f4a19(0x15c)](_0x211611=>{const _0x4d090c=_0x5f4a19;this[_0x4d090c(0x150)][_0x4d090c(0x149)](_0x211611);}),_0x46485d;}[_0x338a3e(0x106)](_0x212752){return{'id':_0x212752['id'],'threadId':_0x212752['threadId'],'ref':_0x212752['ref']};}};S=Q([b(0x0,_0x3dcfa0(_0x112d55)),b(0x1,_0x3dcfa0(_0x1fa847)),b(0x2,_0x3dcfa0(_0x2e0b26))],S);var re=Object[_0x338a3e(0x112)],te=(_0x18f331,_0x795dbf,_0x3e4002,_0x33eb0f)=>{const _0x35834a=_0x338a3e;for(var _0x51100e=_0x33eb0f>0x1?void 0x0:_0x33eb0f?re(_0x795dbf,_0x3e4002):_0x795dbf,_0x5e9855=_0x18f331[_0x35834a(0x131)]-0x1,_0x5aba81;_0x5e9855>=0x0;_0x5e9855--)(_0x5aba81=_0x18f331[_0x5e9855])&&(_0x51100e=_0x5aba81(_0x51100e)||_0x51100e);return _0x51100e;},M=(_0x918176,_0x219454)=>(_0x244624,_0x48c445)=>_0x219454(_0x244624,_0x48c445,_0x918176);let f=class extends _0x4d943a{constructor(_0x2a873,_0x1a6cad){const _0x397510=_0x338a3e;super(),this[_0x397510(0x105)]=_0x2a873,this[_0x397510(0x15b)]=_0x1a6cad,this[_0x397510(0x125)]();}['_initDataSource'](){const _0xa8573=_0x338a3e;this[_0xa8573(0x105)][_0xa8573(0x110)]=this[_0xa8573(0x15b)],this[_0xa8573(0x105)][_0xa8573(0xfa)]=!0x1;}};f=te([M(0x0,_0x4cbc34),M(0x1,_0x3dcfa0(S))],f);var se=Object[_0x338a3e(0x102)],oe=Object[_0x338a3e(0x112)],ne=(_0x181a5a,_0x7a7a70,_0x5cbeb5)=>_0x7a7a70 in _0x181a5a?se(_0x181a5a,_0x7a7a70,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5cbeb5}):_0x181a5a[_0x7a7a70]=_0x5cbeb5,ie=(_0x328dfb,_0x5df7d7,_0x2b461b,_0x477789)=>{const _0x375b10=_0x338a3e;for(var _0x45ddc3=_0x477789>0x1?void 0x0:_0x477789?oe(_0x5df7d7,_0x2b461b):_0x5df7d7,_0x42a7c5=_0x328dfb[_0x375b10(0x131)]-0x1,_0x12e377;_0x42a7c5>=0x0;_0x42a7c5--)(_0x12e377=_0x328dfb[_0x42a7c5])&&(_0x45ddc3=_0x12e377(_0x45ddc3)||_0x45ddc3);return _0x45ddc3;},N=(_0x1dffd5,_0x13cbd7)=>(_0x352a40,_0x2a90f9)=>_0x13cbd7(_0x352a40,_0x2a90f9,_0x1dffd5),$=(_0x3a438f,_0x9d9e30,_0x155efe)=>ne(_0x3a438f,typeof _0x9d9e30!=_0x338a3e(0x108)?_0x9d9e30+'':_0x9d9e30,_0x155efe);let g=class extends _0xc515d7{constructor(_0x44dd69=O,_0x9b157c,_0x3d048f){const _0xabcd55=_0x338a3e;super(),this[_0xabcd55(0x113)]=_0x44dd69,this[_0xabcd55(0x157)]=_0x9b157c,this['_configService']=_0x3d048f;const {..._0x4cb607}=_0xaa02ee({},O,this['_config']);this[_0xabcd55(0x137)][_0xabcd55(0x15e)](z,_0x4cb607);}['onStarting'](){const _0x26d32d=_0x338a3e;[[S],[f],[_]][_0x26d32d(0x15c)](_0x361d75=>{const _0x5b897a=_0x26d32d;this[_0x5b897a(0x157)][_0x5b897a(0x101)](_0x361d75);});}[_0x338a3e(0x142)](){const _0x48806f=_0x338a3e;this['_injector'][_0x48806f(0x10f)](f),this[_0x48806f(0x157)][_0x48806f(0x10f)](_);}};function _0x5a1c(_0x3f2a5f,_0x50d58e){const _0x5587d2=_0x5587();return _0x5a1c=function(_0x5a1c5f,_0x46e39a){_0x5a1c5f=_0x5a1c5f-0xfa;let _0xdaf486=_0x5587d2[_0x5a1c5f];return _0xdaf486;},_0x5a1c(_0x3f2a5f,_0x50d58e);}$(g,_0x338a3e(0x145),W),$(g,_0x338a3e(0x141),_0x2d50f1[_0x338a3e(0x107)]),g=ie([_0x266507(_0x3d6cdd,_0x5f22af,_0x1fa237),N(0x1,_0x3dcfa0(_0xac405f)),N(0x2,_0x108d43)],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 _0x1f0c(_0x3ef45c,_0x4f2046){const _0x1fde67=_0x1fde();return _0x1f0c=function(_0x1f0c3b,_0x9900f4){_0x1f0c3b=_0x1f0c3b-0xe1;let _0x19e2c1=_0x1fde67[_0x1f0c3b];return _0x19e2c1;},_0x1f0c(_0x3ef45c,_0x4f2046);}(function(_0x4ca8f5,_0x43720e){const _0x221748=_0x1f0c,_0x377697=_0x4ca8f5();while(!![]){try{const _0x24a847=-parseInt(_0x221748(0x165))/0x1*(parseInt(_0x221748(0x146))/0x2)+parseInt(_0x221748(0x113))/0x3*(-parseInt(_0x221748(0x110))/0x4)+-parseInt(_0x221748(0xed))/0x5*(parseInt(_0x221748(0x109))/0x6)+-parseInt(_0x221748(0xe8))/0x7*(parseInt(_0x221748(0x14e))/0x8)+parseInt(_0x221748(0x117))/0x9*(parseInt(_0x221748(0x108))/0xa)+-parseInt(_0x221748(0x12e))/0xb*(parseInt(_0x221748(0xe7))/0xc)+parseInt(_0x221748(0x136))/0xd;if(_0x24a847===_0x43720e)break;else _0x377697['push'](_0x377697['shift']());}catch(_0xf97030){_0x377697['push'](_0x377697['shift']());}}}(_0x1fde,0x20b68),function(_0x3520e9,_0x449285){const _0x1d9584=_0x1f0c;typeof exports=='object'&&typeof module<'u'?_0x449285(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==_0x1d9584(0x153)&&define[_0x1d9584(0x118)]?define(['exports',_0x1d9584(0xf1),_0x1d9584(0xf8),_0x1d9584(0x15c),_0x1d9584(0xeb),_0x1d9584(0x132),_0x1d9584(0xec),_0x1d9584(0x107)],_0x449285):(_0x3520e9=typeof globalThis<'u'?globalThis:_0x3520e9||self,_0x449285(_0x3520e9[_0x1d9584(0x125)]={},_0x3520e9[_0x1d9584(0xe6)],_0x3520e9[_0x1d9584(0x162)],_0x3520e9[_0x1d9584(0x15b)],_0x3520e9['UniverThreadCommentUi'],_0x3520e9[_0x1d9584(0xfc)],_0x3520e9[_0x1d9584(0xec)],_0x3520e9['UniverNetwork']));}(this,function(_0x1812bf,_0x53a0d2,_0x481f6b,_0x4e03f5,_0x377150,_0x2f2ab9,_0x2cbfc0,_0x3ca965){'use strict';const _0x26004a=_0x1f0c;const _0x4a0e0e='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x40d01b=(_0x28a3a7=>(_0x28a3a7[_0x28a3a7[_0x26004a(0x13b)]=0x0]=_0x26004a(0x13b),_0x28a3a7[_0x28a3a7[_0x26004a(0xfa)]=0x1]=_0x26004a(0xfa),_0x28a3a7[_0x28a3a7[_0x26004a(0x131)]=-0x1]='UNRECOGNIZED',_0x28a3a7))(_0x40d01b||{}),_0x138f2b=(_0x2c9cb1=>(_0x2c9cb1[_0x2c9cb1[_0x26004a(0x10e)]=0x0]=_0x26004a(0x10e),_0x2c9cb1[_0x2c9cb1[_0x26004a(0x163)]=0x1]=_0x26004a(0x163),_0x2c9cb1[_0x2c9cb1['Reply']=0x2]=_0x26004a(0xfe),_0x2c9cb1[_0x2c9cb1[_0x26004a(0x11d)]=0x3]=_0x26004a(0x11d),_0x2c9cb1[_0x2c9cb1[_0x26004a(0x160)]=0x4]='Delete',_0x2c9cb1[_0x2c9cb1[_0x26004a(0x128)]=0x5]=_0x26004a(0x128),_0x2c9cb1[_0x2c9cb1[_0x26004a(0x131)]=-0x1]='UNRECOGNIZED',_0x2c9cb1))(_0x138f2b||{});const _0x1f5e7f=_0x45358a=>_0x4e03f5[_0x26004a(0x155)](new Date(+_0x45358a))['format']('YYYY/MM/DD\x20HH:mm'),_0x19bf2f=async(_0x27a385,_0x481241)=>{const _0x45b921=_0x26004a,_0x1aad2c=_0x27a385['get'](_0x4e03f5['UserManagerService']),_0x1d629a=_0x27a385[_0x45b921(0xfd)](_0x3ca965[_0x45b921(0x13a)]);_0x481241[_0x45b921(0x15a)](_0x373e72=>{const _0xd5b99e=_0x45b921;_0x1aad2c[_0xd5b99e(0x14a)](_0x373e72)&&_0x481241[_0xd5b99e(0x158)](_0x373e72);}),_0x481241[_0x45b921(0x11e)]&&(await _0x1d629a[_0x45b921(0xfd)](_0x45b921(0x15e),{'params':{'userIDs':[..._0x481241]}}))['body'][_0x45b921(0xe5)][_0x45b921(0x15a)](_0xd1ec02=>{const _0x50b3a5=_0x45b921;_0xd1ec02&&_0x1aad2c[_0x50b3a5(0x124)](_0xd1ec02);});};var _0x23dec8=Object[_0x26004a(0x10a)],_0x328dc9=(_0xffaa6c,_0x1e1908,_0x4dac8a,_0x559b0c)=>{const _0x1aa1b8=_0x26004a;for(var _0x299c0a=_0x559b0c>0x1?void 0x0:_0x559b0c?_0x23dec8(_0x1e1908,_0x4dac8a):_0x1e1908,_0x13f80b=_0xffaa6c[_0x1aa1b8(0x164)]-0x1,_0x4d7f36;_0x13f80b>=0x0;_0x13f80b--)(_0x4d7f36=_0xffaa6c[_0x13f80b])&&(_0x299c0a=_0x4d7f36(_0x299c0a)||_0x299c0a);return _0x299c0a;},_0x1a4246=(_0x3126f4,_0x387b67)=>(_0x5afcc9,_0x5831a2)=>_0x387b67(_0x5afcc9,_0x5831a2,_0x3126f4);let _0x4cd53f=class extends _0x4e03f5['Disposable']{constructor(_0x68f521,_0x21ef8f,_0x4d81f4,_0x4ee209){const _0xee2d65=_0x26004a;super(),this['_commentService']=_0x68f521,this[_0xee2d65(0x13d)]=_0x21ef8f,this[_0xee2d65(0x104)]=_0x4d81f4,this[_0xee2d65(0x10f)]=_0x4ee209,this[_0xee2d65(0xf6)](),this[_0xee2d65(0x134)]();}[_0x26004a(0x134)](){const _0x23b3b0=_0x26004a;this['disposeWithMe'](this[_0x23b3b0(0x13d)]['commentUpdate$'][_0x23b3b0(0x144)](_0x2cbfc0[_0x23b3b0(0xe1)](0x10))[_0x23b3b0(0xee)](_0x83bdaf=>{const _0x25da11=_0x23b3b0,_0x5635c4=new Set();_0x83bdaf[_0x25da11(0x15a)](_0x2fa831=>{const _0x39af63=_0x25da11;switch(_0x2fa831[_0x39af63(0x11c)]){case'add':{const _0xe4caa=_0x2fa831[_0x39af63(0x148)][_0x39af63(0x137)];_0x5635c4['add'](_0xe4caa);break;}}}),_0x19bf2f(this[_0x25da11(0x10f)],_0x5635c4);}));}[_0x26004a(0xf6)](){const _0x46acec=_0x26004a;this['disposeWithMe'](this['_commentService'][_0x46acec(0x142)][_0x46acec(0xee)](async _0x3ff8f5=>{const _0x4811ec=_0x46acec;var _0x597b64,_0x262bac,_0x32e883,_0x5774fa;const _0x266d8a=(_0x597b64=this[_0x4811ec(0x13d)][_0x4811ec(0x12c)](_0x3ff8f5['unitId'])[_0x4811ec(0x11b)](_0x4fe11c=>_0x4fe11c[_0x4811ec(0x12a)]===_0x3ff8f5[_0x4811ec(0x12a)]))==null?void 0x0:_0x597b64[_0x4811ec(0x100)];if(!_0x266d8a)return;const {unitId:_0x42098a,subUnitId:_0x5cfb33}=_0x266d8a;switch(_0x3ff8f5[_0x4811ec(0x16b)]&&this[_0x4811ec(0x104)][_0x4811ec(0x124)](_0x3ff8f5['user']),_0x3ff8f5[_0x4811ec(0x11c)]){case _0x138f2b[_0x4811ec(0x163)]:break;case _0x138f2b[_0x4811ec(0xfe)]:{this[_0x4811ec(0x13d)][_0x4811ec(0x14d)](_0x42098a,_0x5cfb33,{'unitId':_0x42098a,'subUnitId':_0x5cfb33,'ref':'','id':_0x3ff8f5['replyId'],'dT':_0x1f5e7f(+_0x3ff8f5[_0x4811ec(0x122)]),'threadId':_0x3ff8f5[_0x4811ec(0x12a)],'personId':(_0x32e883=(_0x262bac=_0x3ff8f5[_0x4811ec(0x16b)])==null?void 0x0:_0x262bac[_0x4811ec(0x13f)])!=null?_0x32e883:_0x3ff8f5['userId'],'text':JSON[_0x4811ec(0x167)](_0x3ff8f5[_0x4811ec(0x161)]),'parentId':_0x266d8a['id']});break;}case _0x138f2b[_0x4811ec(0x160)]:{const _0x27c838=this[_0x4811ec(0x13d)][_0x4811ec(0x10d)](_0x42098a,_0x5cfb33,_0x3ff8f5[_0x4811ec(0xe2)]);_0x27c838&&_0x27c838[_0x4811ec(0xf2)]&&this[_0x4811ec(0x13d)][_0x4811ec(0x157)](_0x42098a,_0x5cfb33,_0x3ff8f5[_0x4811ec(0xe2)]);break;}case _0x138f2b[_0x4811ec(0x11d)]:{this['_threadCommentModel'][_0x4811ec(0x135)](_0x42098a,_0x5cfb33,{'commentId':_0x3ff8f5[_0x4811ec(0xe2)],'text':JSON[_0x4811ec(0x167)](_0x3ff8f5['content'])});break;}case _0x138f2b['Solve']:{const _0x2dd667=(_0x5774fa=this['_threadCommentModel']['getUnit'](_0x3ff8f5[_0x4811ec(0x16c)])[_0x4811ec(0x11b)](_0x20b300=>_0x20b300[_0x4811ec(0x12a)]===_0x3ff8f5[_0x4811ec(0x12a)]))==null?void 0x0:_0x5774fa[_0x4811ec(0x100)];_0x2dd667&&this[_0x4811ec(0x13d)]['resolveComment'](_0x42098a,_0x5cfb33,_0x2dd667['id'],_0x3ff8f5['solved']===_0x40d01b[_0x4811ec(0xfa)]);break;}}}));}};_0x4cd53f=_0x328dc9([_0x1a4246(0x0,_0x4e03f5['Inject'](_0x53a0d2[_0x26004a(0x151)])),_0x1a4246(0x1,_0x4e03f5['Inject'](_0x2f2ab9['ThreadCommentModel'])),_0x1a4246(0x2,_0x4e03f5[_0x26004a(0xf0)](_0x4e03f5['UserManagerService'])),_0x1a4246(0x3,_0x4e03f5[_0x26004a(0xf0)](_0x4e03f5['Injector']))],_0x4cd53f);const _0x3f49b4=_0x26004a(0x13e),_0x32c45a={};var _0x2e3587=Object['getOwnPropertyDescriptor'],_0x23fee2=(_0x36feea,_0x3ca54f,_0x5c43b4,_0x2ce9eb)=>{const _0x5484b1=_0x26004a;for(var _0x3a69b8=_0x2ce9eb>0x1?void 0x0:_0x2ce9eb?_0x2e3587(_0x3ca54f,_0x5c43b4):_0x3ca54f,_0x1ed29c=_0x36feea[_0x5484b1(0x164)]-0x1,_0x2c4ee7;_0x1ed29c>=0x0;_0x1ed29c--)(_0x2c4ee7=_0x36feea[_0x1ed29c])&&(_0x3a69b8=_0x2c4ee7(_0x3a69b8)||_0x3a69b8);return _0x3a69b8;},_0x4a34ac=(_0x2e86b8,_0x5cfa71)=>(_0x57bf01,_0x56b91a)=>_0x5cfa71(_0x57bf01,_0x56b91a,_0x2e86b8);function _0x50f40d(_0x442064,_0xe5cb2f){const _0x3b0786=_0x26004a,_0x40b23b=_0x442064[_0x3b0786(0x145)][0x0];return{..._0xe5cb2f,'id':_0x40b23b[_0x3b0786(0xe2)],'resolved':_0x442064[_0x3b0786(0x150)]===0x1,'dT':_0x1f5e7f(_0x40b23b['createTimestamp']),'personId':_0x40b23b[_0x3b0786(0x14b)],'threadId':_0x40b23b[_0x3b0786(0x12a)]};}function _0x4161cc(_0x45038d,_0x23612d,_0x550362){const _0x28606c=_0x26004a;var _0x1b308a,_0x3c7f5c;if(((_0x3c7f5c=(_0x1b308a=_0x45038d==null?void 0x0:_0x45038d[_0x28606c(0x145)])==null?void 0x0:_0x1b308a[_0x28606c(0x164)])!=null?_0x3c7f5c:0x0)>0x0){const _0xd5ccc6=(_0x1c7c53,_0x5f399f)=>({'id':_0x1c7c53[_0x28606c(0xe2)],'threadId':_0x1c7c53[_0x28606c(0x12a)],'dT':_0x1f5e7f(_0x1c7c53['createTimestamp']),'personId':_0x1c7c53['userId'],'resolved':_0x45038d[_0x28606c(0x150)]===_0x40d01b[_0x28606c(0xfa)],'unitId':_0x23612d,'subUnitId':_0x550362,'text':JSON[_0x28606c(0x167)](_0x1c7c53[_0x28606c(0x161)]),'parentId':_0x5f399f}),_0x5510df=_0xd5ccc6(_0x45038d['replies'][0x0]);return{..._0x5510df,'children':_0x45038d[_0x28606c(0x145)][_0x28606c(0x12b)](0x1)[_0x28606c(0x111)](_0x5e344b=>_0xd5ccc6(_0x5e344b,_0x5510df['id']))};}return null;}let _0x4cdabd=class{constructor(_0x1c0ec5,_0x5999f3,_0x5dff14){const _0x470a39=_0x26004a;this['_httpService']=_0x1c0ec5,this[_0x470a39(0x104)]=_0x5999f3,this['_sessionService']=_0x5dff14;}async[_0x26004a(0x14d)](_0x4b5992){const _0x52736b=_0x26004a;var _0x466ea5,_0x10b189;const {parentId:_0x38841c,unitId:_0x4847ea,text:_0xfd9516,threadId:_0x5ae0e1}=_0x4b5992,_0x2a41f3=(_0x10b189=(_0x466ea5=_0xfd9516['customRanges'])==null?void 0x0:_0x466ea5[_0x52736b(0xf9)](_0x28702b=>_0x28702b[_0x52736b(0x102)]===_0x4e03f5[_0x52736b(0x106)][_0x52736b(0x12d)])[_0x52736b(0x111)](_0x32f29e=>_0x32f29e[_0x52736b(0x168)]))!=null?_0x10b189:[],_0xbe13e6=JSON[_0x52736b(0x130)](_0xfd9516),_0xcca53e=(await this[_0x52736b(0x159)]['requireSession'](_0x4847ea))[_0x52736b(0x12f)]();if(_0x38841c){const _0x36fbb6={'memberId':_0xcca53e,'unitId':_0x4847ea,'content':_0xbe13e6,'mention':_0x2a41f3,'threadId':_0x5ae0e1},_0x2c58f4=(await this[_0x52736b(0xfb)][_0x52736b(0xf3)](_0x52736b(0x129)+_0x4847ea+_0x52736b(0x13c),{'body':_0x36fbb6}))[_0x52736b(0x140)][_0x52736b(0x123)];return{..._0x4b5992,'id':_0x2c58f4[_0x52736b(0xe2)],'dT':_0x4e03f5[_0x52736b(0x155)](+_0x2c58f4[_0x52736b(0x122)])[_0x52736b(0x14f)](_0x52736b(0x139)),'personId':_0x2c58f4['userId']};}else{const _0x4028ba={'memberId':_0xcca53e,'unitId':_0x4847ea,'content':_0xbe13e6,'mention':_0x2a41f3},_0x425f8b=await this['_httpService']['post'](_0x52736b(0x129)+_0x4847ea+'/add',{'body':_0x4028ba});return _0x50f40d(_0x425f8b[_0x52736b(0x140)]['comment'],_0x4b5992);}}async['updateComment'](_0x51c7fe){const _0x360fe6=_0x26004a;var _0x254942,_0x3db29e;const {text:_0x29fb83,unitId:_0x3db13f}=_0x51c7fe,_0x4a955b=(_0x3db29e=(_0x254942=_0x29fb83[_0x360fe6(0xf4)])==null?void 0x0:_0x254942['filter'](_0x95a85f=>_0x95a85f[_0x360fe6(0x102)]===_0x4e03f5[_0x360fe6(0x106)][_0x360fe6(0x12d)])['map'](_0x24ab1b=>_0x24ab1b['rangeId']))!=null?_0x3db29e:[],_0x413ce1=JSON[_0x360fe6(0x130)](_0x29fb83),_0x422c5a=_0x51c7fe[_0x360fe6(0x12a)],_0x457950=_0x51c7fe['id'],_0x4714c1={'memberId':(await this[_0x360fe6(0x159)][_0x360fe6(0x101)](_0x3db13f))[_0x360fe6(0x12f)](),'unitId':_0x3db13f,'threadId':_0x422c5a,'mention':_0x4a955b,'content':_0x413ce1,'replyId':_0x457950},_0x5779f6=await this[_0x360fe6(0xfb)][_0x360fe6(0xf3)](_0x360fe6(0x129)+_0x3db13f+_0x360fe6(0x169),{'body':_0x4714c1});return!_0x5779f6[_0x360fe6(0x140)][_0x360fe6(0x138)]||_0x5779f6['body'][_0x360fe6(0x138)][_0x360fe6(0x126)]===0x1;}async['resolveComment'](_0x1767bc){const _0x8905da=_0x26004a,{unitId:_0x2feafd}=_0x1767bc,_0x2fc52c=_0x1767bc[_0x8905da(0x12a)],_0x36083f={'memberId':this['_userService'][_0x8905da(0x141)]()[_0x8905da(0x13f)],'unitId':_0x2feafd,'threadId':_0x2fc52c,'solved':_0x1767bc[_0x8905da(0x105)]?_0x40d01b[_0x8905da(0xfa)]:_0x40d01b[_0x8905da(0x13b)]},_0x163169=await this['_httpService'][_0x8905da(0xf3)](_0x8905da(0x129)+_0x2feafd+_0x8905da(0x166),{'body':_0x36083f});return!_0x163169[_0x8905da(0x140)]['error']||_0x163169[_0x8905da(0x140)][_0x8905da(0x138)][_0x8905da(0x126)]===0x1;}async['deleteComment'](_0x508045,_0x2e61ff,_0x42c85c,_0x4c765e){const _0x1d4220=_0x26004a,_0x33bc6e={'memberId':(await this[_0x1d4220(0x159)][_0x1d4220(0x101)](_0x508045))['getMemberID'](),'threadId':_0x42c85c,'replyId':_0x4c765e,'unitId':_0x508045},_0x1b9bd1=await this['_httpService'][_0x1d4220(0xf3)](_0x1d4220(0x129)+_0x508045+_0x1d4220(0x11f),{'body':_0x33bc6e});return!_0x1b9bd1['body'][_0x1d4220(0x138)]||_0x1b9bd1[_0x1d4220(0x140)]['error']['code']===0x1;}async[_0x26004a(0x147)](_0x23807b,_0x7e9b37,_0x3f112c){const _0x5a7ba1=_0x26004a,_0x4d711c={'unitId':_0x23807b,'threadId':_0x3f112c},_0x2ebd9c=await this[_0x5a7ba1(0xfb)][_0x5a7ba1(0xf3)](_0x5a7ba1(0x129)+_0x23807b+'/list',{'body':_0x4d711c}),_0x50df0f=_0x3f112c[_0x5a7ba1(0x111)](_0x4ecf7c=>_0x4161cc(_0x2ebd9c[_0x5a7ba1(0x140)][_0x5a7ba1(0x154)][_0x4ecf7c],_0x23807b,_0x7e9b37))[_0x5a7ba1(0xf9)](Boolean);return Object[_0x5a7ba1(0x133)](_0x2ebd9c[_0x5a7ba1(0x140)]['users'])[_0x5a7ba1(0x15a)](_0x175b77=>{const _0x107818=_0x5a7ba1;this[_0x107818(0x104)][_0x107818(0x124)](_0x175b77);}),_0x50df0f;}[_0x26004a(0xf7)](_0x4ba1ff){const _0x51214c=_0x26004a;return{'id':_0x4ba1ff['id'],'threadId':_0x4ba1ff[_0x51214c(0x12a)],'ref':_0x4ba1ff[_0x51214c(0x149)]};}};_0x4cdabd=_0x23fee2([_0x4a34ac(0x0,_0x4e03f5['Inject'](_0x3ca965['HTTPService'])),_0x4a34ac(0x1,_0x4e03f5[_0x26004a(0xf0)](_0x4e03f5['UserManagerService'])),_0x4a34ac(0x2,_0x4e03f5[_0x26004a(0xf0)](_0x53a0d2['CollaborationSessionService']))],_0x4cdabd);var _0x13d8c3=Object[_0x26004a(0x10a)],_0x23c0eb=(_0x182af6,_0x145463,_0x4ef266,_0x30d9c4)=>{const _0x2d81e8=_0x26004a;for(var _0x2f71e1=_0x30d9c4>0x1?void 0x0:_0x30d9c4?_0x13d8c3(_0x145463,_0x4ef266):_0x145463,_0x34d278=_0x182af6[_0x2d81e8(0x164)]-0x1,_0x416479;_0x34d278>=0x0;_0x34d278--)(_0x416479=_0x182af6[_0x34d278])&&(_0x2f71e1=_0x416479(_0x2f71e1)||_0x2f71e1);return _0x2f71e1;},_0x3c7fa9=(_0x28be74,_0x1b02ee)=>(_0x1c386c,_0x4919a4)=>_0x1b02ee(_0x1c386c,_0x4919a4,_0x28be74);let _0x406b40=class extends _0x4e03f5[_0x26004a(0x119)]{constructor(_0x4ab3a5,_0x3f0407){const _0x3900cc=_0x26004a;super(),this['_threadCommentDataSourceService']=_0x4ab3a5,this[_0x3900cc(0xef)]=_0x3f0407,this['_initDataSource']();}[_0x26004a(0xea)](){const _0x5b1292=_0x26004a;this[_0x5b1292(0x115)][_0x5b1292(0x120)]=this[_0x5b1292(0xef)],this[_0x5b1292(0x115)][_0x5b1292(0x116)]=!0x1;}};_0x406b40=_0x23c0eb([_0x3c7fa9(0x0,_0x2f2ab9[_0x26004a(0x127)]),_0x3c7fa9(0x1,_0x4e03f5['Inject'](_0x4cdabd))],_0x406b40);var _0x3ceb0a=Object['defineProperty'],_0x5c14f5=Object['getOwnPropertyDescriptor'],_0x3f9d24=(_0x1e5822,_0x310981,_0x5524f9)=>_0x310981 in _0x1e5822?_0x3ceb0a(_0x1e5822,_0x310981,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5524f9}):_0x1e5822[_0x310981]=_0x5524f9,_0x46b467=(_0x1fdec1,_0xa27ff5,_0x5709fc,_0x47eaf9)=>{const _0x554b8c=_0x26004a;for(var _0x167e3b=_0x47eaf9>0x1?void 0x0:_0x47eaf9?_0x5c14f5(_0xa27ff5,_0x5709fc):_0xa27ff5,_0x20d668=_0x1fdec1[_0x554b8c(0x164)]-0x1,_0x36d26a;_0x20d668>=0x0;_0x20d668--)(_0x36d26a=_0x1fdec1[_0x20d668])&&(_0x167e3b=_0x36d26a(_0x167e3b)||_0x167e3b);return _0x167e3b;},_0x3ee0c0=(_0x3af733,_0x269093)=>(_0x272494,_0x70b85e)=>_0x269093(_0x272494,_0x70b85e,_0x3af733),_0x52bb14=(_0xdd445d,_0xe53dbf,_0x4697e8)=>_0x3f9d24(_0xdd445d,typeof _0xe53dbf!=_0x26004a(0x11a)?_0xe53dbf+'':_0xe53dbf,_0x4697e8);_0x1812bf[_0x26004a(0x143)]=class extends _0x4e03f5[_0x26004a(0xe3)]{constructor(_0x4c2d6a=_0x32c45a,_0x120982,_0x3afc2a){const _0x2ba581=_0x26004a;super(),this['_config']=_0x4c2d6a,this[_0x2ba581(0x10f)]=_0x120982,this[_0x2ba581(0x156)]=_0x3afc2a;const {..._0xbd74b4}=_0x4e03f5[_0x2ba581(0xf5)]({},_0x32c45a,this[_0x2ba581(0xe9)]);this['_configService'][_0x2ba581(0x14c)](_0x3f49b4,_0xbd74b4);}[_0x26004a(0xff)](){[[_0x4cdabd],[_0x406b40],[_0x4cd53f]]['forEach'](_0x44d3b1=>{const _0x2cf0c6=_0x1f0c;this[_0x2cf0c6(0x10f)]['add'](_0x44d3b1);});}[_0x26004a(0x16e)](){const _0x4609cc=_0x26004a;this['_injector'][_0x4609cc(0xfd)](_0x406b40),this[_0x4609cc(0x10f)][_0x4609cc(0xfd)](_0x4cd53f);}},_0x52bb14(_0x1812bf['UniverThreadCommentDataSourcePlugin'],_0x26004a(0x114),_0x4a0e0e),_0x52bb14(_0x1812bf[_0x26004a(0x143)],_0x26004a(0x11c),_0x4e03f5[_0x26004a(0x121)][_0x26004a(0x15f)]),_0x1812bf[_0x26004a(0x143)]=_0x46b467([_0x4e03f5[_0x26004a(0x10c)](_0x377150[_0x26004a(0x16a)],_0x53a0d2[_0x26004a(0x112)],_0x481f6b[_0x26004a(0x16d)]),_0x3ee0c0(0x1,_0x4e03f5[_0x26004a(0xf0)](_0x4e03f5[_0x26004a(0x103)])),_0x3ee0c0(0x2,_0x4e03f5[_0x26004a(0x10b)])],_0x1812bf[_0x26004a(0x143)]),Object[_0x26004a(0x152)](_0x1812bf,Symbol[_0x26004a(0xe4)],{'value':_0x26004a(0x15d)});}));function _0x1fde(){const _0x43d12a=['updateComment','8543028GJENlb','personId','error','YYYY/MM/DD\x20HH:mm','HTTPService','OpenOrReOpen','/reply','_threadCommentModel','thread-comment-data-source.config','userID','body','getCurrentUser','commentUpdate$','UniverThreadCommentDataSourcePlugin','pipe','replies','518iCzsWJ','listComments','payload','ref','getUser','userId','setConfig','addComment','301448mRjRAB','format','solved','CommentService','defineProperty','function','comments','dayjs','_configService','deleteComment','delete','_sessionService','forEach','UniverCore','@univerjs/core','Module','/universer-api/user/list','UNIVER_UNKNOWN','Delete','content','UniverProLicense','Add','length','167OxYvaU','/solved','parse','rangeId','/edit','UniverThreadCommentUIPlugin','user','unitId','UniverLicensePlugin','onReady','bufferTime','replyId','Plugin','toStringTag','users','UniverProCollaborationClient','36CiEqvC','7WDzPAI','_config','_initDataSource','@univerjs/thread-comment-ui','rxjs','5iHOGFc','subscribe','_threadCommentDataSource','Inject','@univerjs-pro/collaboration-client','parentId','post','customRanges','merge','_init','saveCommentToSnapshot','@univerjs-pro/license','filter','Solved','_httpService','UniverThreadComment','get','Reply','onStarting','root','requireSession','rangeType','Injector','_userService','resolved','CustomRangeType','@univerjs/network','330dNgwMP','1074318uoDCJW','getOwnPropertyDescriptor','IConfigService','DependentOn','getComment','Unknown','_injector','269788HyGnjm','map','UniverCollaborationClientPlugin','6eZmizk','pluginName','_threadCommentDataSourceService','syncUpdateMutationToColla','27567wnNnov','amd','Disposable','symbol','find','type','Edit','size','/delete','dataSource','UniverInstanceType','createTimestamp','reply','addUser','UniverProThreadCommentDatasource','code','IThreadCommentDataSourceService','Solve','/universer-api/comment/unit/','threadId','slice','getUnit','COMMENT','840994ezrDAk','getMemberID','stringify','UNRECOGNIZED','@univerjs/thread-comment','values','_initUserSync'];_0x1fde=function(){return _0x43d12a;};return _0x1fde();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2-experimental.20251129-0fa20cd",
|
|
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.
|
|
49
|
-
"@univerjs/core": "0.12.
|
|
50
|
-
"@univerjs/network": "0.12.
|
|
48
|
+
"@univerjs-pro/license": "0.12.2-experimental.20251129-0fa20cd",
|
|
49
|
+
"@univerjs/core": "0.12.2-experimental.20251129-0fa20cd",
|
|
50
|
+
"@univerjs/network": "0.12.2-experimental.20251129-0fa20cd",
|
|
51
|
+
"@univerjs/thread-comment": "0.12.2-experimental.20251129-0fa20cd",
|
|
51
52
|
"@univerjs/protocol": "0.1.47",
|
|
52
|
-
"@univerjs/thread-comment": "0.12.
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs-pro/collaboration-client": "0.12.1"
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.12.2-experimental.20251129-0fa20cd",
|
|
54
|
+
"@univerjs-pro/collaboration-client": "0.12.2-experimental.20251129-0fa20cd"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
|
-
"vite": "^7.2.
|
|
60
|
-
"vitest": "^
|
|
61
|
-
"@univerjs-infra/shared": "0.12.
|
|
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",
|