@univerjs-pro/thread-comment-datasource 0.12.0-nightly.202511220628 → 0.12.1-nightly.202511221011
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 +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x28d4e1=_0x4dc7;(function(_0x2547d9,_0x1522a6){const _0x5c46d1=_0x4dc7,_0x3d6417=_0x2547d9();while(!![]){try{const _0x2c3a3d=parseInt(_0x5c46d1(0x17d))/0x1+-parseInt(_0x5c46d1(0x17e))/0x2*(parseInt(_0x5c46d1(0x12e))/0x3)+parseInt(_0x5c46d1(0x14b))/0x4+-parseInt(_0x5c46d1(0x152))/0x5+parseInt(_0x5c46d1(0x11e))/0x6+parseInt(_0x5c46d1(0x188))/0x7+-parseInt(_0x5c46d1(0x139))/0x8;if(_0x2c3a3d===_0x1522a6)break;else _0x3d6417['push'](_0x3d6417['shift']());}catch(_0x2a0c02){_0x3d6417['push'](_0x3d6417['shift']());}}}(_0x44c0,0xeb09a));Object[_0x28d4e1(0x183)](exports,Symbol[_0x28d4e1(0x122)],{'value':_0x28d4e1(0x153)});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=_0x28d4e1(0x18b);function _0x4dc7(_0x199391,_0x27e22b){const _0x44c0e8=_0x44c0();return _0x4dc7=function(_0x4dc7a8,_0x500380){_0x4dc7a8=_0x4dc7a8-0x11a;let _0x1fb534=_0x44c0e8[_0x4dc7a8];return _0x1fb534;},_0x4dc7(_0x199391,_0x27e22b);}var I=(_0x36c126=>(_0x36c126[_0x36c126['OpenOrReOpen']=0x0]=_0x28d4e1(0x159),_0x36c126[_0x36c126['Solved']=0x1]=_0x28d4e1(0x13c),_0x36c126[_0x36c126[_0x28d4e1(0x133)]=-0x1]='UNRECOGNIZED',_0x36c126))(I||{}),v=(_0x1ccbc5=>(_0x1ccbc5[_0x1ccbc5['Unknown']=0x0]='Unknown',_0x1ccbc5[_0x1ccbc5['Add']=0x1]='Add',_0x1ccbc5[_0x1ccbc5[_0x28d4e1(0x11a)]=0x2]=_0x28d4e1(0x11a),_0x1ccbc5[_0x1ccbc5[_0x28d4e1(0x138)]=0x3]=_0x28d4e1(0x138),_0x1ccbc5[_0x1ccbc5[_0x28d4e1(0x11b)]=0x4]=_0x28d4e1(0x11b),_0x1ccbc5[_0x1ccbc5['Solve']=0x5]=_0x28d4e1(0x17c),_0x1ccbc5[_0x1ccbc5[_0x28d4e1(0x133)]=-0x1]=_0x28d4e1(0x133),_0x1ccbc5))(v||{});const f=_0x4ac1e9=>c[_0x28d4e1(0x155)](new Date(+_0x4ac1e9))['format'](_0x28d4e1(0x15a)),R=async(_0x37e26a,_0x7bdd76)=>{const _0x24e46d=_0x28d4e1,_0x226e65=_0x37e26a[_0x24e46d(0x174)](c[_0x24e46d(0x18c)]),_0x17effb=_0x37e26a[_0x24e46d(0x174)](P['HTTPService']);_0x7bdd76[_0x24e46d(0x184)](_0x29163b=>{const _0x5cb2f3=_0x24e46d;_0x226e65['getUser'](_0x29163b)&&_0x7bdd76[_0x5cb2f3(0x14d)](_0x29163b);}),_0x7bdd76[_0x24e46d(0x15d)]&&(await _0x17effb['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x7bdd76]}}))[_0x24e46d(0x165)]['users'][_0x24e46d(0x184)](_0x27dd06=>{const _0x54fd0c=_0x24e46d;_0x27dd06&&_0x226e65[_0x54fd0c(0x166)](_0x27dd06);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x2c0dd4,_0x11b2ad,_0x1e0223,_0x5efbe5)=>{const _0x268439=_0x28d4e1;for(var _0x4ef70b=_0x5efbe5>0x1?void 0x0:_0x5efbe5?$(_0x11b2ad,_0x1e0223):_0x11b2ad,_0xe10c9a=_0x2c0dd4[_0x268439(0x160)]-0x1,_0x1d4925;_0xe10c9a>=0x0;_0xe10c9a--)(_0x1d4925=_0x2c0dd4[_0xe10c9a])&&(_0x4ef70b=_0x1d4925(_0x4ef70b)||_0x4ef70b);return _0x4ef70b;},S=(_0x40722d,_0x225791)=>(_0x343805,_0x511c22)=>_0x225791(_0x343805,_0x511c22,_0x40722d);let _=class extends c[_0x28d4e1(0x181)]{constructor(_0x2e03d7,_0x2620e3,_0x2ea11a,_0x213fed){const _0x960d5b=_0x28d4e1;super(),this[_0x960d5b(0x17b)]=_0x2e03d7,this[_0x960d5b(0x161)]=_0x2620e3,this['_userService']=_0x2ea11a,this[_0x960d5b(0x16f)]=_0x213fed,this['_init'](),this[_0x960d5b(0x12f)]();}[_0x28d4e1(0x12f)](){const _0x91e0f9=_0x28d4e1;this[_0x91e0f9(0x11c)](this['_threadCommentModel'][_0x91e0f9(0x158)][_0x91e0f9(0x17f)](j[_0x91e0f9(0x132)](0x10))['subscribe'](_0x34e675=>{const _0x21f245=_0x91e0f9,_0x483f90=new Set();_0x34e675[_0x21f245(0x184)](_0x426525=>{const _0x33e4d2=_0x21f245;switch(_0x426525[_0x33e4d2(0x12d)]){case _0x33e4d2(0x163):{const _0x3cb17c=_0x426525[_0x33e4d2(0x123)]['personId'];_0x483f90[_0x33e4d2(0x163)](_0x3cb17c);break;}}}),R(this[_0x21f245(0x16f)],_0x483f90);}));}['_init'](){const _0x3a44b4=_0x28d4e1;this[_0x3a44b4(0x11c)](this[_0x3a44b4(0x17b)][_0x3a44b4(0x158)][_0x3a44b4(0x15c)](async _0x14c87c=>{const _0x347f58=_0x3a44b4;var _0x4a0cfa,_0x339aa8,_0x25dee5,_0x10e7f0;const _0x169a32=(_0x4a0cfa=this['_threadCommentModel'][_0x347f58(0x12c)](_0x14c87c[_0x347f58(0x129)])[_0x347f58(0x169)](_0x2c7e0e=>_0x2c7e0e[_0x347f58(0x136)]===_0x14c87c[_0x347f58(0x136)]))==null?void 0x0:_0x4a0cfa['root'];if(!_0x169a32)return;const {unitId:_0xe2c6c2,subUnitId:_0x2dda84}=_0x169a32;switch(_0x14c87c['user']&&this[_0x347f58(0x131)][_0x347f58(0x166)](_0x14c87c[_0x347f58(0x172)]),_0x14c87c[_0x347f58(0x12d)]){case v[_0x347f58(0x16c)]:break;case v[_0x347f58(0x11a)]:{this[_0x347f58(0x161)][_0x347f58(0x157)](_0xe2c6c2,_0x2dda84,{'unitId':_0xe2c6c2,'subUnitId':_0x2dda84,'ref':'','id':_0x14c87c[_0x347f58(0x18d)],'dT':f(+_0x14c87c['createTimestamp']),'threadId':_0x14c87c['threadId'],'personId':(_0x25dee5=(_0x339aa8=_0x14c87c['user'])==null?void 0x0:_0x339aa8['userID'])!=null?_0x25dee5:_0x14c87c[_0x347f58(0x16b)],'text':JSON[_0x347f58(0x15e)](_0x14c87c[_0x347f58(0x13f)]),'parentId':_0x169a32['id']});break;}case v[_0x347f58(0x11b)]:{const _0x16f490=this['_threadCommentModel']['getComment'](_0xe2c6c2,_0x2dda84,_0x14c87c['replyId']);_0x16f490&&_0x16f490[_0x347f58(0x171)]&&this['_threadCommentModel'][_0x347f58(0x14c)](_0xe2c6c2,_0x2dda84,_0x14c87c[_0x347f58(0x18d)]);break;}case v[_0x347f58(0x138)]:{this[_0x347f58(0x161)][_0x347f58(0x148)](_0xe2c6c2,_0x2dda84,{'commentId':_0x14c87c['replyId'],'text':JSON[_0x347f58(0x15e)](_0x14c87c[_0x347f58(0x13f)])});break;}case v['Solve']:{const _0x287db5=(_0x10e7f0=this[_0x347f58(0x161)][_0x347f58(0x12c)](_0x14c87c['unitId'])['find'](_0x49e314=>_0x49e314['threadId']===_0x14c87c[_0x347f58(0x136)]))==null?void 0x0:_0x10e7f0[_0x347f58(0x125)];_0x287db5&&this[_0x347f58(0x161)][_0x347f58(0x13a)](_0xe2c6c2,_0x2dda84,_0x287db5['id'],_0x14c87c[_0x347f58(0x180)]===I[_0x347f58(0x13c)]);break;}}}));}};_=E([S(0x0,c[_0x28d4e1(0x14a)](b[_0x28d4e1(0x137)])),S(0x1,c[_0x28d4e1(0x14a)](M[_0x28d4e1(0x18f)])),S(0x2,c['Inject'](c[_0x28d4e1(0x18c)])),S(0x3,c[_0x28d4e1(0x14a)](c[_0x28d4e1(0x16d)]))],_);const q=_0x28d4e1(0x187),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x43491a,_0x137f77,_0x2c21b4,_0x10d896)=>{for(var _0x5390f4=_0x10d896>0x1?void 0x0:_0x10d896?A(_0x137f77,_0x2c21b4):_0x137f77,_0x4ffb07=_0x43491a['length']-0x1,_0x5bca03;_0x4ffb07>=0x0;_0x4ffb07--)(_0x5bca03=_0x43491a[_0x4ffb07])&&(_0x5390f4=_0x5bca03(_0x5390f4)||_0x5390f4);return _0x5390f4;},C=(_0x21807f,_0x499d8a)=>(_0x2834e4,_0x3b2f81)=>_0x499d8a(_0x2834e4,_0x3b2f81,_0x21807f);function Y(_0x19a1a4,_0x70a2e7){const _0x3d5275=_0x28d4e1,_0x251668=_0x19a1a4[_0x3d5275(0x189)][0x0];return{..._0x70a2e7,'id':_0x251668['replyId'],'resolved':_0x19a1a4[_0x3d5275(0x180)]===0x1,'dT':f(_0x251668['createTimestamp']),'personId':_0x251668[_0x3d5275(0x16b)],'threadId':_0x251668[_0x3d5275(0x136)]};}function G(_0x47c3fc,_0x2c50c9,_0x102094){const _0x5a7bac=_0x28d4e1;var _0x118e6c,_0x326172;if(((_0x326172=(_0x118e6c=_0x47c3fc==null?void 0x0:_0x47c3fc[_0x5a7bac(0x189)])==null?void 0x0:_0x118e6c[_0x5a7bac(0x160)])!=null?_0x326172:0x0)>0x0){const _0x4df773=(_0x196977,_0x54117d)=>({'id':_0x196977[_0x5a7bac(0x18d)],'threadId':_0x196977['threadId'],'dT':f(_0x196977[_0x5a7bac(0x124)]),'personId':_0x196977[_0x5a7bac(0x16b)],'resolved':_0x47c3fc[_0x5a7bac(0x180)]===I[_0x5a7bac(0x13c)],'unitId':_0x2c50c9,'subUnitId':_0x102094,'text':JSON['parse'](_0x196977['content']),'parentId':_0x54117d}),_0x5b7e07=_0x4df773(_0x47c3fc[_0x5a7bac(0x189)][0x0]);return{..._0x5b7e07,'children':_0x47c3fc[_0x5a7bac(0x189)][_0x5a7bac(0x14f)](0x1)[_0x5a7bac(0x179)](_0x3aa5c6=>_0x4df773(_0x3aa5c6,_0x5b7e07['id']))};}return null;}let p=class{constructor(_0xac9d86,_0x1e8961,_0x33bd6b){const _0x1d1a41=_0x28d4e1;this[_0x1d1a41(0x176)]=_0xac9d86,this[_0x1d1a41(0x131)]=_0x1e8961,this['_sessionService']=_0x33bd6b;}async[_0x28d4e1(0x157)](_0x2dfa98){const _0x2fbf93=_0x28d4e1;var _0x15c1e5,_0x3868e8;const {parentId:_0x464b91,unitId:_0x2a74c9,text:_0x486f64,threadId:_0x537ef5}=_0x2dfa98,_0x3b9b2a=(_0x3868e8=(_0x15c1e5=_0x486f64[_0x2fbf93(0x127)])==null?void 0x0:_0x15c1e5['filter'](_0x3bed6f=>_0x3bed6f['rangeType']===c[_0x2fbf93(0x175)][_0x2fbf93(0x12b)])[_0x2fbf93(0x179)](_0x47db5b=>_0x47db5b[_0x2fbf93(0x16e)]))!=null?_0x3868e8:[],_0x568f9c=JSON[_0x2fbf93(0x156)](_0x486f64),_0x4d0551=(await this[_0x2fbf93(0x134)]['requireSession'](_0x2a74c9))['getMemberID']();if(_0x464b91){const _0x22b1ba={'memberId':_0x4d0551,'unitId':_0x2a74c9,'content':_0x568f9c,'mention':_0x3b9b2a,'threadId':_0x537ef5},_0x2b28a0=(await this[_0x2fbf93(0x176)]['post'](_0x2fbf93(0x186)+_0x2a74c9+_0x2fbf93(0x120),{'body':_0x22b1ba}))[_0x2fbf93(0x165)][_0x2fbf93(0x144)];return{..._0x2dfa98,'id':_0x2b28a0[_0x2fbf93(0x18d)],'dT':c['dayjs'](+_0x2b28a0[_0x2fbf93(0x124)])[_0x2fbf93(0x150)](_0x2fbf93(0x15a)),'personId':_0x2b28a0['userId']};}else{const _0x450474={'memberId':_0x4d0551,'unitId':_0x2a74c9,'content':_0x568f9c,'mention':_0x3b9b2a},_0x3296bd=await this['_httpService']['post'](_0x2fbf93(0x186)+_0x2a74c9+_0x2fbf93(0x143),{'body':_0x450474});return Y(_0x3296bd[_0x2fbf93(0x165)]['comment'],_0x2dfa98);}}async[_0x28d4e1(0x148)](_0x2a80e8){const _0x153d6f=_0x28d4e1;var _0x26ab89,_0x38d16f;const {text:_0x5bd196,unitId:_0x4a73b3}=_0x2a80e8,_0x2440df=(_0x38d16f=(_0x26ab89=_0x5bd196['customRanges'])==null?void 0x0:_0x26ab89['filter'](_0x239eac=>_0x239eac[_0x153d6f(0x141)]===c[_0x153d6f(0x175)][_0x153d6f(0x12b)])[_0x153d6f(0x179)](_0x573fc1=>_0x573fc1['rangeId']))!=null?_0x38d16f:[],_0xdd98e4=JSON[_0x153d6f(0x156)](_0x5bd196),_0x1cef63=_0x2a80e8[_0x153d6f(0x136)],_0x265d92=_0x2a80e8['id'],_0x40fcd2={'memberId':(await this['_sessionService'][_0x153d6f(0x182)](_0x4a73b3))[_0x153d6f(0x190)](),'unitId':_0x4a73b3,'threadId':_0x1cef63,'mention':_0x2440df,'content':_0xdd98e4,'replyId':_0x265d92},_0x5affcf=await this[_0x153d6f(0x176)][_0x153d6f(0x13b)](_0x153d6f(0x186)+_0x4a73b3+_0x153d6f(0x167),{'body':_0x40fcd2});return!_0x5affcf[_0x153d6f(0x165)][_0x153d6f(0x15b)]||_0x5affcf[_0x153d6f(0x165)]['error']['code']===0x1;}async[_0x28d4e1(0x13a)](_0x4a0ee4){const _0x7c3b1d=_0x28d4e1,{unitId:_0x2c7dd1}=_0x4a0ee4,_0x21c796=_0x4a0ee4['threadId'],_0x597f27={'memberId':this[_0x7c3b1d(0x131)][_0x7c3b1d(0x12a)]()['userID'],'unitId':_0x2c7dd1,'threadId':_0x21c796,'solved':_0x4a0ee4[_0x7c3b1d(0x151)]?I[_0x7c3b1d(0x13c)]:I[_0x7c3b1d(0x159)]},_0x558bd6=await this[_0x7c3b1d(0x176)]['post']('/universer-api/comment/unit/'+_0x2c7dd1+_0x7c3b1d(0x170),{'body':_0x597f27});return!_0x558bd6[_0x7c3b1d(0x165)]['error']||_0x558bd6[_0x7c3b1d(0x165)][_0x7c3b1d(0x15b)][_0x7c3b1d(0x130)]===0x1;}async[_0x28d4e1(0x14c)](_0x1d6053,_0x37c286,_0x71bd64,_0x3610b7){const _0x9b0429=_0x28d4e1,_0x23a813={'memberId':(await this[_0x9b0429(0x134)][_0x9b0429(0x182)](_0x1d6053))[_0x9b0429(0x190)](),'threadId':_0x71bd64,'replyId':_0x3610b7,'unitId':_0x1d6053},_0x5c8852=await this[_0x9b0429(0x176)][_0x9b0429(0x13b)](_0x9b0429(0x186)+_0x1d6053+_0x9b0429(0x11f),{'body':_0x23a813});return!_0x5c8852['body']['error']||_0x5c8852[_0x9b0429(0x165)][_0x9b0429(0x15b)][_0x9b0429(0x130)]===0x1;}async['listComments'](_0x4dd997,_0x57c5b1,_0x23f1c8){const _0x103107=_0x28d4e1,_0x10a79a={'unitId':_0x4dd997,'threadId':_0x23f1c8},_0x4cd2cc=await this[_0x103107(0x176)][_0x103107(0x13b)](_0x103107(0x186)+_0x4dd997+_0x103107(0x13e),{'body':_0x10a79a}),_0x440c58=_0x23f1c8[_0x103107(0x179)](_0x49d9fe=>G(_0x4cd2cc['body'][_0x103107(0x18a)][_0x49d9fe],_0x4dd997,_0x57c5b1))['filter'](Boolean);return Object[_0x103107(0x178)](_0x4cd2cc[_0x103107(0x165)][_0x103107(0x15f)])['forEach'](_0x2f7397=>{const _0x3884f6=_0x103107;this['_userService'][_0x3884f6(0x166)](_0x2f7397);}),_0x440c58;}[_0x28d4e1(0x149)](_0x7624af){return{'id':_0x7624af['id'],'threadId':_0x7624af['threadId'],'ref':_0x7624af['ref']};}};p=x([C(0x0,c['Inject'](P[_0x28d4e1(0x135)])),C(0x1,c[_0x28d4e1(0x14a)](c[_0x28d4e1(0x18c)])),C(0x2,c['Inject'](b['CollaborationSessionService']))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x13c7f1,_0x5d43fc,_0x45a616,_0x165e7e)=>{const _0x42b3ea=_0x28d4e1;for(var _0x52ca6a=_0x165e7e>0x1?void 0x0:_0x165e7e?H(_0x5d43fc,_0x45a616):_0x5d43fc,_0x4a3140=_0x13c7f1[_0x42b3ea(0x160)]-0x1,_0x51572c;_0x4a3140>=0x0;_0x4a3140--)(_0x51572c=_0x13c7f1[_0x4a3140])&&(_0x52ca6a=_0x51572c(_0x52ca6a)||_0x52ca6a);return _0x52ca6a;},y=(_0x45edba,_0x52d18e)=>(_0x13c023,_0x3cb2d9)=>_0x52d18e(_0x13c023,_0x3cb2d9,_0x45edba);let g=class extends c['Disposable']{constructor(_0x3e090b,_0x20f96a){const _0x3fc10b=_0x28d4e1;super(),this[_0x3fc10b(0x128)]=_0x3e090b,this[_0x3fc10b(0x121)]=_0x20f96a,this[_0x3fc10b(0x17a)]();}[_0x28d4e1(0x17a)](){const _0x44e8dc=_0x28d4e1;this['_threadCommentDataSourceService'][_0x44e8dc(0x145)]=this[_0x44e8dc(0x121)],this[_0x44e8dc(0x128)][_0x44e8dc(0x168)]=!0x1;}};g=J([y(0x0,M[_0x28d4e1(0x14e)]),y(0x1,c[_0x28d4e1(0x14a)](p))],g);var F=Object['defineProperty'],L=Object[_0x28d4e1(0x147)],Z=(_0x1b60a0,_0x43517e,_0x30ba3a)=>_0x43517e in _0x1b60a0?F(_0x1b60a0,_0x43517e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x30ba3a}):_0x1b60a0[_0x43517e]=_0x30ba3a,W=(_0x42ae70,_0x92e35b,_0x500b95,_0x28ab34)=>{const _0x2f75bb=_0x28d4e1;for(var _0x142f58=_0x28ab34>0x1?void 0x0:_0x28ab34?L(_0x92e35b,_0x500b95):_0x92e35b,_0x229436=_0x42ae70[_0x2f75bb(0x160)]-0x1,_0x4ce92a;_0x229436>=0x0;_0x229436--)(_0x4ce92a=_0x42ae70[_0x229436])&&(_0x142f58=_0x4ce92a(_0x142f58)||_0x142f58);return _0x142f58;},O=(_0x2310f5,_0x3c49dc)=>(_0x271d5b,_0x1b1398)=>_0x3c49dc(_0x271d5b,_0x1b1398,_0x2310f5),N=(_0x19321a,_0x4d1aed,_0x3a4d39)=>Z(_0x19321a,typeof _0x4d1aed!=_0x28d4e1(0x142)?_0x4d1aed+'':_0x4d1aed,_0x3a4d39);function _0x44c0(){const _0x1cc997=['onStarting','/list','content','pluginName','rangeType','symbol','/add','reply','dataSource','setConfig','getOwnPropertyDescriptor','updateComment','saveCommentToSnapshot','Inject','1202732djtDsS','deleteComment','delete','IThreadCommentDataSourceService','slice','format','resolved','2052215jQhfop','Module','merge','dayjs','stringify','addComment','commentUpdate$','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','error','subscribe','size','parse','users','length','_threadCommentModel','_config','add','UniverThreadCommentUIPlugin','body','addUser','/edit','syncUpdateMutationToColla','find','UniverCollaborationClientPlugin','userId','Add','Injector','rangeId','_injector','/solved','parentId','user','onReady','get','CustomRangeType','_httpService','UniverLicensePlugin','values','map','_initDataSource','_commentService','Solve','1778780eLomSX','244466EtcMDW','pipe','solved','Disposable','requireSession','defineProperty','forEach','UniverInstanceType','/universer-api/comment/unit/','thread-comment-data-source.config','13174483ZtKjch','replies','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UserManagerService','replyId','_configService','ThreadCommentModel','getMemberID','Reply','Delete','disposeWithMe','Plugin','1160694DXpBfa','/delete','/reply','_threadCommentDataSource','toStringTag','payload','createTimestamp','root','UniverThreadCommentDataSourcePlugin','customRanges','_threadCommentDataSourceService','unitId','getCurrentUser','COMMENT','getUnit','type','3ShNXAP','_initUserSync','code','_userService','bufferTime','UNRECOGNIZED','_sessionService','HTTPService','threadId','CommentService','Edit','21276728GmowKc','resolveComment','post','Solved'];_0x44c0=function(){return _0x1cc997;};return _0x44c0();}exports[_0x28d4e1(0x126)]=class extends c[_0x28d4e1(0x11d)]{constructor(_0x42ca03=D,_0x37263a,_0x5d8cfd){const _0x28f627=_0x28d4e1;super(),this[_0x28f627(0x162)]=_0x42ca03,this['_injector']=_0x37263a,this[_0x28f627(0x18e)]=_0x5d8cfd;const {..._0x41bafd}=c[_0x28f627(0x154)]({},D,this[_0x28f627(0x162)]);this[_0x28f627(0x18e)][_0x28f627(0x146)](q,_0x41bafd);}[_0x28d4e1(0x13d)](){[[p],[g],[_]]['forEach'](_0x5ea4de=>{const _0x13e96c=_0x4dc7;this[_0x13e96c(0x16f)]['add'](_0x5ea4de);});}[_0x28d4e1(0x173)](){const _0x1a7fa3=_0x28d4e1;this[_0x1a7fa3(0x16f)][_0x1a7fa3(0x174)](g),this[_0x1a7fa3(0x16f)]['get'](_);}},N(exports[_0x28d4e1(0x126)],_0x28d4e1(0x140),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x28d4e1(0x12d),c[_0x28d4e1(0x185)]['UNIVER_UNKNOWN']),exports[_0x28d4e1(0x126)]=W([c['DependentOn'](w[_0x28d4e1(0x164)],b[_0x28d4e1(0x16a)],T[_0x28d4e1(0x177)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x28d4e1(0x126)]);
|
|
1
|
+
'use strict';const _0x4e54ff=_0x1cb8;(function(_0x52bac1,_0x4f24fb){const _0x22dd45=_0x1cb8,_0x459b48=_0x52bac1();while(!![]){try{const _0x456d=parseInt(_0x22dd45(0x1b4))/0x1+-parseInt(_0x22dd45(0x15f))/0x2+parseInt(_0x22dd45(0x19f))/0x3*(-parseInt(_0x22dd45(0x19a))/0x4)+parseInt(_0x22dd45(0x19c))/0x5+parseInt(_0x22dd45(0x173))/0x6+-parseInt(_0x22dd45(0x16a))/0x7+parseInt(_0x22dd45(0x1a3))/0x8;if(_0x456d===_0x4f24fb)break;else _0x459b48['push'](_0x459b48['shift']());}catch(_0x1c90ec){_0x459b48['push'](_0x459b48['shift']());}}}(_0xbd57,0xa71f8));Object[_0x4e54ff(0x168)](exports,Symbol[_0x4e54ff(0x1aa)],{'value':_0x4e54ff(0x1a4)});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=_0x4e54ff(0x152);var I=(_0x2b5367=>(_0x2b5367[_0x2b5367[_0x4e54ff(0x14c)]=0x0]=_0x4e54ff(0x14c),_0x2b5367[_0x2b5367['Solved']=0x1]=_0x4e54ff(0x18e),_0x2b5367[_0x2b5367[_0x4e54ff(0x1b2)]=-0x1]='UNRECOGNIZED',_0x2b5367))(I||{}),v=(_0x2b3815=>(_0x2b3815[_0x2b3815[_0x4e54ff(0x175)]=0x0]=_0x4e54ff(0x175),_0x2b3815[_0x2b3815[_0x4e54ff(0x164)]=0x1]='Add',_0x2b3815[_0x2b3815[_0x4e54ff(0x181)]=0x2]=_0x4e54ff(0x181),_0x2b3815[_0x2b3815[_0x4e54ff(0x1a8)]=0x3]=_0x4e54ff(0x1a8),_0x2b3815[_0x2b3815[_0x4e54ff(0x17e)]=0x4]=_0x4e54ff(0x17e),_0x2b3815[_0x2b3815[_0x4e54ff(0x179)]=0x5]=_0x4e54ff(0x179),_0x2b3815[_0x2b3815[_0x4e54ff(0x1b2)]=-0x1]=_0x4e54ff(0x1b2),_0x2b3815))(v||{});const f=_0x2374ac=>c['dayjs'](new Date(+_0x2374ac))[_0x4e54ff(0x150)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x2e4ab4,_0x4cdfed)=>{const _0x9e3580=_0x4e54ff,_0x1effb6=_0x2e4ab4[_0x9e3580(0x196)](c[_0x9e3580(0x15b)]),_0x2db1f9=_0x2e4ab4[_0x9e3580(0x196)](P['HTTPService']);_0x4cdfed[_0x9e3580(0x191)](_0x32ae48=>{const _0x1a5fc4=_0x9e3580;_0x1effb6[_0x1a5fc4(0x162)](_0x32ae48)&&_0x4cdfed[_0x1a5fc4(0x15c)](_0x32ae48);}),_0x4cdfed['size']&&(await _0x2db1f9[_0x9e3580(0x196)](_0x9e3580(0x165),{'params':{'userIDs':[..._0x4cdfed]}}))[_0x9e3580(0x16f)][_0x9e3580(0x160)][_0x9e3580(0x191)](_0x310f87=>{const _0x577efb=_0x9e3580;_0x310f87&&_0x1effb6[_0x577efb(0x180)](_0x310f87);});};var $=Object[_0x4e54ff(0x18f)],E=(_0xb66bec,_0x540309,_0x128157,_0x49a46e)=>{const _0x2080e4=_0x4e54ff;for(var _0xfe0fb=_0x49a46e>0x1?void 0x0:_0x49a46e?$(_0x540309,_0x128157):_0x540309,_0x2e9330=_0xb66bec[_0x2080e4(0x1a9)]-0x1,_0x340629;_0x2e9330>=0x0;_0x2e9330--)(_0x340629=_0xb66bec[_0x2e9330])&&(_0xfe0fb=_0x340629(_0xfe0fb)||_0xfe0fb);return _0xfe0fb;},S=(_0x1b84f7,_0x47808e)=>(_0x2eb786,_0x42b586)=>_0x47808e(_0x2eb786,_0x42b586,_0x1b84f7);let _=class extends c[_0x4e54ff(0x177)]{constructor(_0x1c3c5c,_0x1691b2,_0x3253dc,_0x20be70){const _0x14e40f=_0x4e54ff;super(),this['_commentService']=_0x1c3c5c,this[_0x14e40f(0x15a)]=_0x1691b2,this['_userService']=_0x3253dc,this['_injector']=_0x20be70,this[_0x14e40f(0x148)](),this[_0x14e40f(0x184)]();}[_0x4e54ff(0x184)](){const _0x1f7c87=_0x4e54ff;this[_0x1f7c87(0x144)](this[_0x1f7c87(0x15a)][_0x1f7c87(0x176)][_0x1f7c87(0x1ad)](j[_0x1f7c87(0x14a)](0x10))[_0x1f7c87(0x170)](_0x4dfdf3=>{const _0x13570d=_0x1f7c87,_0x372b74=new Set();_0x4dfdf3['forEach'](_0x414801=>{const _0x4e455d=_0x1cb8;switch(_0x414801[_0x4e455d(0x16c)]){case _0x4e455d(0x185):{const _0x167a9a=_0x414801[_0x4e455d(0x1a0)][_0x4e455d(0x19e)];_0x372b74[_0x4e455d(0x185)](_0x167a9a);break;}}}),R(this[_0x13570d(0x1b1)],_0x372b74);}));}[_0x4e54ff(0x148)](){const _0x3acb1a=_0x4e54ff;this[_0x3acb1a(0x144)](this['_commentService'][_0x3acb1a(0x176)]['subscribe'](async _0x472c2c=>{const _0x258fc0=_0x3acb1a;var _0x49f19a,_0x46351c,_0x2ecc43,_0x756b29;const _0xbceed0=(_0x49f19a=this[_0x258fc0(0x15a)][_0x258fc0(0x167)](_0x472c2c['unitId'])[_0x258fc0(0x14d)](_0x1da577=>_0x1da577[_0x258fc0(0x195)]===_0x472c2c[_0x258fc0(0x195)]))==null?void 0x0:_0x49f19a['root'];if(!_0xbceed0)return;const {unitId:_0x3d45a3,subUnitId:_0x5a7e86}=_0xbceed0;switch(_0x472c2c[_0x258fc0(0x1b5)]&&this[_0x258fc0(0x15e)][_0x258fc0(0x180)](_0x472c2c[_0x258fc0(0x1b5)]),_0x472c2c[_0x258fc0(0x16c)]){case v[_0x258fc0(0x164)]:break;case v[_0x258fc0(0x181)]:{this[_0x258fc0(0x15a)][_0x258fc0(0x194)](_0x3d45a3,_0x5a7e86,{'unitId':_0x3d45a3,'subUnitId':_0x5a7e86,'ref':'','id':_0x472c2c[_0x258fc0(0x17c)],'dT':f(+_0x472c2c[_0x258fc0(0x154)]),'threadId':_0x472c2c[_0x258fc0(0x195)],'personId':(_0x2ecc43=(_0x46351c=_0x472c2c[_0x258fc0(0x1b5)])==null?void 0x0:_0x46351c[_0x258fc0(0x188)])!=null?_0x2ecc43:_0x472c2c['userId'],'text':JSON[_0x258fc0(0x1a2)](_0x472c2c[_0x258fc0(0x18a)]),'parentId':_0xbceed0['id']});break;}case v[_0x258fc0(0x17e)]:{const _0x52e86d=this['_threadCommentModel'][_0x258fc0(0x17f)](_0x3d45a3,_0x5a7e86,_0x472c2c[_0x258fc0(0x17c)]);_0x52e86d&&_0x52e86d[_0x258fc0(0x156)]&&this[_0x258fc0(0x15a)][_0x258fc0(0x147)](_0x3d45a3,_0x5a7e86,_0x472c2c['replyId']);break;}case v['Edit']:{this[_0x258fc0(0x15a)][_0x258fc0(0x14b)](_0x3d45a3,_0x5a7e86,{'commentId':_0x472c2c[_0x258fc0(0x17c)],'text':JSON[_0x258fc0(0x1a2)](_0x472c2c['content'])});break;}case v[_0x258fc0(0x179)]:{const _0x36d713=(_0x756b29=this['_threadCommentModel'][_0x258fc0(0x167)](_0x472c2c[_0x258fc0(0x190)])[_0x258fc0(0x14d)](_0x3c869d=>_0x3c869d[_0x258fc0(0x195)]===_0x472c2c[_0x258fc0(0x195)]))==null?void 0x0:_0x756b29[_0x258fc0(0x149)];_0x36d713&&this['_threadCommentModel'][_0x258fc0(0x174)](_0x3d45a3,_0x5a7e86,_0x36d713['id'],_0x472c2c[_0x258fc0(0x18d)]===I[_0x258fc0(0x18e)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x4e54ff(0x1ac)])),S(0x1,c[_0x4e54ff(0x1ae)](M[_0x4e54ff(0x14e)])),S(0x2,c[_0x4e54ff(0x1ae)](c[_0x4e54ff(0x15b)])),S(0x3,c[_0x4e54ff(0x1ae)](c[_0x4e54ff(0x13f)]))],_);const q=_0x4e54ff(0x1a5),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x23e8a2,_0x40a77d,_0xf58c63,_0x127c7f)=>{const _0x37b954=_0x4e54ff;for(var _0x5304ea=_0x127c7f>0x1?void 0x0:_0x127c7f?A(_0x40a77d,_0xf58c63):_0x40a77d,_0x328dd4=_0x23e8a2[_0x37b954(0x1a9)]-0x1,_0x44e6d2;_0x328dd4>=0x0;_0x328dd4--)(_0x44e6d2=_0x23e8a2[_0x328dd4])&&(_0x5304ea=_0x44e6d2(_0x5304ea)||_0x5304ea);return _0x5304ea;},C=(_0x3918c2,_0x511327)=>(_0x31383a,_0x18d330)=>_0x511327(_0x31383a,_0x18d330,_0x3918c2);function _0x1cb8(_0x55ac0b,_0x32ac73){const _0xbd57b9=_0xbd57();return _0x1cb8=function(_0x1cb85b,_0x3e1f4d){_0x1cb85b=_0x1cb85b-0x13c;let _0x6b4040=_0xbd57b9[_0x1cb85b];return _0x6b4040;},_0x1cb8(_0x55ac0b,_0x32ac73);}function Y(_0x26bdc2,_0x16855e){const _0x4cb573=_0x4e54ff,_0x361d5c=_0x26bdc2[_0x4cb573(0x13c)][0x0];return{..._0x16855e,'id':_0x361d5c['replyId'],'resolved':_0x26bdc2['solved']===0x1,'dT':f(_0x361d5c[_0x4cb573(0x154)]),'personId':_0x361d5c[_0x4cb573(0x1af)],'threadId':_0x361d5c[_0x4cb573(0x195)]};}function G(_0x3a8271,_0x4ff7e2,_0x5246ef){const _0x424a43=_0x4e54ff;var _0x2c6718,_0x54036e;if(((_0x54036e=(_0x2c6718=_0x3a8271==null?void 0x0:_0x3a8271[_0x424a43(0x13c)])==null?void 0x0:_0x2c6718[_0x424a43(0x1a9)])!=null?_0x54036e:0x0)>0x0){const _0x20255a=(_0xeac31a,_0x35d0b4)=>({'id':_0xeac31a[_0x424a43(0x17c)],'threadId':_0xeac31a['threadId'],'dT':f(_0xeac31a[_0x424a43(0x154)]),'personId':_0xeac31a[_0x424a43(0x1af)],'resolved':_0x3a8271['solved']===I['Solved'],'unitId':_0x4ff7e2,'subUnitId':_0x5246ef,'text':JSON[_0x424a43(0x1a2)](_0xeac31a[_0x424a43(0x18a)]),'parentId':_0x35d0b4}),_0x46ee90=_0x20255a(_0x3a8271['replies'][0x0]);return{..._0x46ee90,'children':_0x3a8271[_0x424a43(0x13c)][_0x424a43(0x16b)](0x1)[_0x424a43(0x186)](_0x19b6e6=>_0x20255a(_0x19b6e6,_0x46ee90['id']))};}return null;}function _0xbd57(){const _0x140152=['body','subscribe','saveCommentToSnapshot','CollaborationSessionService','423102EZRkaJ','resolveComment','Unknown','commentUpdate$','Disposable','values','Solve','/universer-api/comment/unit/','UniverCollaborationClientPlugin','replyId','getCurrentUser','Delete','getComment','addUser','Reply','onStarting','setConfig','_initUserSync','add','map','IThreadCommentDataSourceService','userID','_initDataSource','content','dayjs','syncUpdateMutationToColla','solved','Solved','getOwnPropertyDescriptor','unitId','forEach','customRanges','UniverThreadCommentDataSourcePlugin','addComment','threadId','get','YYYY/MM/DD\x20HH:mm','stringify','listComments','112EryYRw','DependentOn','2073995HTyGGy','code','personId','8142TerIUb','payload','rangeId','parse','12630584MSlfio','Module','thread-comment-data-source.config','post','_config','Edit','length','toStringTag','UniverThreadCommentUIPlugin','CommentService','pipe','Inject','userId','ref','_injector','UNRECOGNIZED','UniverLicensePlugin','18487GfIozu','user','replies','_threadCommentDataSource','filter','Injector','requireSession','merge','dataSource','UniverInstanceType','disposeWithMe','/list','CustomRangeType','deleteComment','_init','root','bufferTime','updateComment','OpenOrReOpen','find','ThreadCommentModel','/edit','format','comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','COMMENT','createTimestamp','/add','parentId','/reply','_configService','_threadCommentDataSourceService','_threadCommentModel','UserManagerService','delete','_sessionService','_userService','626568praPRV','users','getMemberID','getUser','_httpService','Add','/universer-api/user/list','comments','getUnit','defineProperty','error','7061698Vtrcda','slice','type','/delete','pluginName'];_0xbd57=function(){return _0x140152;};return _0xbd57();}let p=class{constructor(_0x17296e,_0x527398,_0xb5969f){const _0x5cf7a4=_0x4e54ff;this[_0x5cf7a4(0x163)]=_0x17296e,this[_0x5cf7a4(0x15e)]=_0x527398,this[_0x5cf7a4(0x15d)]=_0xb5969f;}async[_0x4e54ff(0x194)](_0x444728){const _0x396126=_0x4e54ff;var _0x25949e,_0x2da73b;const {parentId:_0x2a8069,unitId:_0x50d2bb,text:_0x25210b,threadId:_0x41da55}=_0x444728,_0x276570=(_0x2da73b=(_0x25949e=_0x25210b['customRanges'])==null?void 0x0:_0x25949e[_0x396126(0x13e)](_0x15c0a2=>_0x15c0a2['rangeType']===c['CustomRangeType'][_0x396126(0x153)])[_0x396126(0x186)](_0x1a4ae6=>_0x1a4ae6[_0x396126(0x1a1)]))!=null?_0x2da73b:[],_0x426546=JSON[_0x396126(0x198)](_0x25210b),_0x51cd4b=(await this[_0x396126(0x15d)][_0x396126(0x140)](_0x50d2bb))[_0x396126(0x161)]();if(_0x2a8069){const _0x404e38={'memberId':_0x51cd4b,'unitId':_0x50d2bb,'content':_0x426546,'mention':_0x276570,'threadId':_0x41da55},_0x33c508=(await this[_0x396126(0x163)][_0x396126(0x1a6)]('/universer-api/comment/unit/'+_0x50d2bb+_0x396126(0x157),{'body':_0x404e38}))['body']['reply'];return{..._0x444728,'id':_0x33c508['replyId'],'dT':c[_0x396126(0x18b)](+_0x33c508[_0x396126(0x154)])[_0x396126(0x150)](_0x396126(0x197)),'personId':_0x33c508[_0x396126(0x1af)]};}else{const _0x7cf946={'memberId':_0x51cd4b,'unitId':_0x50d2bb,'content':_0x426546,'mention':_0x276570},_0x28fead=await this['_httpService'][_0x396126(0x1a6)](_0x396126(0x17a)+_0x50d2bb+_0x396126(0x155),{'body':_0x7cf946});return Y(_0x28fead['body'][_0x396126(0x151)],_0x444728);}}async[_0x4e54ff(0x14b)](_0x5a2458){const _0x4c0419=_0x4e54ff;var _0x3057d7,_0x5870d2;const {text:_0x29b576,unitId:_0xcc168f}=_0x5a2458,_0x2f4d54=(_0x5870d2=(_0x3057d7=_0x29b576[_0x4c0419(0x192)])==null?void 0x0:_0x3057d7[_0x4c0419(0x13e)](_0x232cdc=>_0x232cdc['rangeType']===c[_0x4c0419(0x146)]['COMMENT'])['map'](_0x197c9d=>_0x197c9d[_0x4c0419(0x1a1)]))!=null?_0x5870d2:[],_0x52ac1b=JSON[_0x4c0419(0x198)](_0x29b576),_0x746288=_0x5a2458[_0x4c0419(0x195)],_0x485a9f=_0x5a2458['id'],_0x40f209={'memberId':(await this[_0x4c0419(0x15d)][_0x4c0419(0x140)](_0xcc168f))[_0x4c0419(0x161)](),'unitId':_0xcc168f,'threadId':_0x746288,'mention':_0x2f4d54,'content':_0x52ac1b,'replyId':_0x485a9f},_0x528d08=await this[_0x4c0419(0x163)][_0x4c0419(0x1a6)](_0x4c0419(0x17a)+_0xcc168f+_0x4c0419(0x14f),{'body':_0x40f209});return!_0x528d08['body'][_0x4c0419(0x169)]||_0x528d08[_0x4c0419(0x16f)][_0x4c0419(0x169)][_0x4c0419(0x19d)]===0x1;}async['resolveComment'](_0x4d752a){const _0x1789f0=_0x4e54ff,{unitId:_0x4f2ec1}=_0x4d752a,_0x272e9e=_0x4d752a[_0x1789f0(0x195)],_0x1ba4c3={'memberId':this[_0x1789f0(0x15e)][_0x1789f0(0x17d)]()[_0x1789f0(0x188)],'unitId':_0x4f2ec1,'threadId':_0x272e9e,'solved':_0x4d752a['resolved']?I['Solved']:I['OpenOrReOpen']},_0x3a79f1=await this[_0x1789f0(0x163)][_0x1789f0(0x1a6)](_0x1789f0(0x17a)+_0x4f2ec1+'/solved',{'body':_0x1ba4c3});return!_0x3a79f1[_0x1789f0(0x16f)][_0x1789f0(0x169)]||_0x3a79f1[_0x1789f0(0x16f)][_0x1789f0(0x169)]['code']===0x1;}async[_0x4e54ff(0x147)](_0x461080,_0x55ee4e,_0x282edf,_0x151da1){const _0x38ecb8=_0x4e54ff,_0x38c708={'memberId':(await this[_0x38ecb8(0x15d)][_0x38ecb8(0x140)](_0x461080))[_0x38ecb8(0x161)](),'threadId':_0x282edf,'replyId':_0x151da1,'unitId':_0x461080},_0x3669e1=await this['_httpService'][_0x38ecb8(0x1a6)](_0x38ecb8(0x17a)+_0x461080+_0x38ecb8(0x16d),{'body':_0x38c708});return!_0x3669e1[_0x38ecb8(0x16f)][_0x38ecb8(0x169)]||_0x3669e1[_0x38ecb8(0x16f)][_0x38ecb8(0x169)][_0x38ecb8(0x19d)]===0x1;}async[_0x4e54ff(0x199)](_0x3ddd62,_0x2ed544,_0x3dfb07){const _0x3a292f=_0x4e54ff,_0x3b6979={'unitId':_0x3ddd62,'threadId':_0x3dfb07},_0x335d6e=await this[_0x3a292f(0x163)][_0x3a292f(0x1a6)]('/universer-api/comment/unit/'+_0x3ddd62+_0x3a292f(0x145),{'body':_0x3b6979}),_0x4dbde8=_0x3dfb07[_0x3a292f(0x186)](_0xf9ed7b=>G(_0x335d6e[_0x3a292f(0x16f)][_0x3a292f(0x166)][_0xf9ed7b],_0x3ddd62,_0x2ed544))[_0x3a292f(0x13e)](Boolean);return Object[_0x3a292f(0x178)](_0x335d6e[_0x3a292f(0x16f)][_0x3a292f(0x160)])[_0x3a292f(0x191)](_0x574e9b=>{const _0x4217ed=_0x3a292f;this['_userService'][_0x4217ed(0x180)](_0x574e9b);}),_0x4dbde8;}[_0x4e54ff(0x171)](_0x350d3e){const _0x490e42=_0x4e54ff;return{'id':_0x350d3e['id'],'threadId':_0x350d3e[_0x490e42(0x195)],'ref':_0x350d3e[_0x490e42(0x1b0)]};}};p=x([C(0x0,c[_0x4e54ff(0x1ae)](P['HTTPService'])),C(0x1,c[_0x4e54ff(0x1ae)](c[_0x4e54ff(0x15b)])),C(0x2,c['Inject'](b[_0x4e54ff(0x172)]))],p);var H=Object[_0x4e54ff(0x18f)],J=(_0x180cad,_0x3bf74d,_0x12cecf,_0x11683c)=>{const _0x2a644b=_0x4e54ff;for(var _0x4f2529=_0x11683c>0x1?void 0x0:_0x11683c?H(_0x3bf74d,_0x12cecf):_0x3bf74d,_0x193855=_0x180cad[_0x2a644b(0x1a9)]-0x1,_0x45ac9c;_0x193855>=0x0;_0x193855--)(_0x45ac9c=_0x180cad[_0x193855])&&(_0x4f2529=_0x45ac9c(_0x4f2529)||_0x4f2529);return _0x4f2529;},y=(_0x42648f,_0x3edba9)=>(_0x3253ef,_0x5715bd)=>_0x3edba9(_0x3253ef,_0x5715bd,_0x42648f);let g=class extends c[_0x4e54ff(0x177)]{constructor(_0x1591e4,_0x105306){const _0x1258b7=_0x4e54ff;super(),this[_0x1258b7(0x159)]=_0x1591e4,this['_threadCommentDataSource']=_0x105306,this[_0x1258b7(0x189)]();}[_0x4e54ff(0x189)](){const _0x45d4d1=_0x4e54ff;this[_0x45d4d1(0x159)][_0x45d4d1(0x142)]=this[_0x45d4d1(0x13d)],this[_0x45d4d1(0x159)][_0x45d4d1(0x18c)]=!0x1;}};g=J([y(0x0,M[_0x4e54ff(0x187)]),y(0x1,c[_0x4e54ff(0x1ae)](p))],g);var F=Object[_0x4e54ff(0x168)],L=Object['getOwnPropertyDescriptor'],Z=(_0x137594,_0xf1dcd9,_0x45e549)=>_0xf1dcd9 in _0x137594?F(_0x137594,_0xf1dcd9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x45e549}):_0x137594[_0xf1dcd9]=_0x45e549,W=(_0x1e0da3,_0x52957a,_0x2b186f,_0x2b2834)=>{const _0x40e015=_0x4e54ff;for(var _0x57e9cd=_0x2b2834>0x1?void 0x0:_0x2b2834?L(_0x52957a,_0x2b186f):_0x52957a,_0x1e53f8=_0x1e0da3[_0x40e015(0x1a9)]-0x1,_0x35c2db;_0x1e53f8>=0x0;_0x1e53f8--)(_0x35c2db=_0x1e0da3[_0x1e53f8])&&(_0x57e9cd=_0x35c2db(_0x57e9cd)||_0x57e9cd);return _0x57e9cd;},O=(_0x26bf63,_0x2197e2)=>(_0x5b1175,_0x4ade1b)=>_0x2197e2(_0x5b1175,_0x4ade1b,_0x26bf63),N=(_0x518dbf,_0x3875a9,_0x215cba)=>Z(_0x518dbf,typeof _0x3875a9!='symbol'?_0x3875a9+'':_0x3875a9,_0x215cba);exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x266e6c=D,_0x1a2a69,_0x83087f){const _0x52ce3e=_0x4e54ff;super(),this['_config']=_0x266e6c,this[_0x52ce3e(0x1b1)]=_0x1a2a69,this[_0x52ce3e(0x158)]=_0x83087f;const {..._0x34c0ac}=c[_0x52ce3e(0x141)]({},D,this[_0x52ce3e(0x1a7)]);this[_0x52ce3e(0x158)][_0x52ce3e(0x183)](q,_0x34c0ac);}[_0x4e54ff(0x182)](){const _0x2e5b54=_0x4e54ff;[[p],[g],[_]][_0x2e5b54(0x191)](_0x717d01=>{this['_injector']['add'](_0x717d01);});}['onReady'](){const _0x4a76d6=_0x4e54ff;this[_0x4a76d6(0x1b1)]['get'](g),this[_0x4a76d6(0x1b1)][_0x4a76d6(0x196)](_);}},N(exports[_0x4e54ff(0x193)],_0x4e54ff(0x16e),U),N(exports[_0x4e54ff(0x193)],'type',c[_0x4e54ff(0x143)]['UNIVER_UNKNOWN']),exports[_0x4e54ff(0x193)]=W([c[_0x4e54ff(0x19b)](w[_0x4e54ff(0x1ab)],b[_0x4e54ff(0x17b)],T[_0x4e54ff(0x1b3)]),O(0x1,c[_0x4e54ff(0x1ae)](c[_0x4e54ff(0x13f)])),O(0x2,c['IConfigService'])],exports[_0x4e54ff(0x193)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x317147=_0x21b8;(function(_0x3c184b,_0x1ab6a7){const _0x51570d=_0x21b8,_0x5f35f2=_0x3c184b();while(!![]){try{const _0x395ffd=-parseInt(_0x51570d(0x1ac))/0x1+parseInt(_0x51570d(0x1a2))/0x2*(-parseInt(_0x51570d(0x19f))/0x3)+parseInt(_0x51570d(0x1ce))/0x4+-parseInt(_0x51570d(0x1c1))/0x5+parseInt(_0x51570d(0x1c9))/0x6+parseInt(_0x51570d(0x1c6))/0x7*(parseInt(_0x51570d(0x196))/0x8)+parseInt(_0x51570d(0x188))/0x9;if(_0x395ffd===_0x1ab6a7)break;else _0x5f35f2['push'](_0x5f35f2['shift']());}catch(_0x1c0eb0){_0x5f35f2['push'](_0x5f35f2['shift']());}}}(_0x5767,0x45a72));import{CommentService as _0x30b9cd,CollaborationSessionService as _0x450154,UniverCollaborationClientPlugin as _0x3f195e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5183ef}from'@univerjs-pro/license';import{dayjs as _0x5568cd,UserManagerService as _0x17961f,Inject as _0x919d50,Injector as _0x44cd81,Disposable as _0x2e4002,CustomRangeType as _0x43a9e5,UniverInstanceType as _0x3d559f,DependentOn as _0x23f7c9,IConfigService as _0x3b264d,Plugin as _0x4d1b0e,merge as _0x2e9ae9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x29578f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x62d7b6,IThreadCommentDataSourceService as _0x29d0b3}from'@univerjs/thread-comment';import{bufferTime as _0x3fd222}from'rxjs';import{HTTPService as _0x4dcd29}from'@univerjs/network';function _0x5767(){const _0x41617d=['threadId','payload','_init','solved','Delete','_initUserSync','_threadCommentDataSource','syncUpdateMutationToColla','getUser','delete','UNRECOGNIZED','find','deleteComment','pluginName','/add','Solved','listComments','COMMENT','1489040khuHZF','thread-comment-data-source.config','format','_config','userId','30814IfegVP','user','getComment','212442tsKlCr','getMemberID','replies','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','1971256VsXeUZ','resolveComment','content','root','forEach','/delete','/universer-api/comment/unit/','onReady','parentId','getCurrentUser','userID','commentUpdate$','/edit','personId','unitId','/list','dataSource','_threadCommentModel','addComment','replyId','size','rangeId','addUser','Edit','ref','add','16821tIVABs','body','type','pipe','slice','Solve','length','stringify','code','YYYY/MM/DD\x20HH:mm','_injector','_userService','saveCommentToSnapshot','getUnit','456swMVoX','Reply','setConfig','Add','_httpService','parse','map','error','users','837TjSwiB','_initDataSource','Unknown','1288XZYLDR','_sessionService','onStarting','updateComment','_commentService','subscribe','createTimestamp','getOwnPropertyDescriptor','OpenOrReOpen','_configService','18222mtQWqB','get','post'];_0x5767=function(){return _0x41617d;};return _0x5767();}const W=_0x317147(0x1cd);var I=(_0x2b110e=>(_0x2b110e[_0x2b110e['OpenOrReOpen']=0x0]=_0x317147(0x1aa),_0x2b110e[_0x2b110e[_0x317147(0x1be)]=0x1]=_0x317147(0x1be),_0x2b110e[_0x2b110e[_0x317147(0x1b9)]=-0x1]=_0x317147(0x1b9),_0x2b110e))(I||{}),v=(_0x113ab8=>(_0x113ab8[_0x113ab8[_0x317147(0x1a1)]=0x0]=_0x317147(0x1a1),_0x113ab8[_0x113ab8[_0x317147(0x199)]=0x1]='Add',_0x113ab8[_0x113ab8['Reply']=0x2]=_0x317147(0x197),_0x113ab8[_0x113ab8[_0x317147(0x185)]=0x3]='Edit',_0x113ab8[_0x113ab8[_0x317147(0x1b3)]=0x4]=_0x317147(0x1b3),_0x113ab8[_0x113ab8['Solve']=0x5]=_0x317147(0x18d),_0x113ab8[_0x113ab8[_0x317147(0x1b9)]=-0x1]='UNRECOGNIZED',_0x113ab8))(v||{});const y=_0xd66d54=>_0x5568cd(new Date(+_0xd66d54))[_0x317147(0x1c3)](_0x317147(0x191)),B=async(_0x3a5619,_0x1475ce)=>{const _0x31f177=_0x317147,_0x13f328=_0x3a5619[_0x31f177(0x1ad)](_0x17961f),_0x1aab74=_0x3a5619[_0x31f177(0x1ad)](_0x4dcd29);_0x1475ce[_0x31f177(0x172)](_0x36931c=>{const _0x4de2a3=_0x31f177;_0x13f328[_0x4de2a3(0x1b7)](_0x36931c)&&_0x1475ce[_0x4de2a3(0x1b8)](_0x36931c);}),_0x1475ce[_0x31f177(0x182)]&&(await _0x1aab74[_0x31f177(0x1ad)]('/universer-api/user/list',{'params':{'userIDs':[..._0x1475ce]}}))[_0x31f177(0x189)][_0x31f177(0x19e)][_0x31f177(0x172)](_0x437bc7=>{_0x437bc7&&_0x13f328['addUser'](_0x437bc7);});};var K=Object[_0x317147(0x1a9)],V=(_0x1986f5,_0x5a9c13,_0x500017,_0x464d65)=>{for(var _0x2b6f11=_0x464d65>0x1?void 0x0:_0x464d65?K(_0x5a9c13,_0x500017):_0x5a9c13,_0x19be93=_0x1986f5['length']-0x1,_0x411b41;_0x19be93>=0x0;_0x19be93--)(_0x411b41=_0x1986f5[_0x19be93])&&(_0x2b6f11=_0x411b41(_0x2b6f11)||_0x2b6f11);return _0x2b6f11;},p=(_0x288494,_0x503001)=>(_0x2ba2f2,_0x10c635)=>_0x503001(_0x2ba2f2,_0x10c635,_0x288494);let _=class extends _0x2e4002{constructor(_0x1c8f88,_0x186972,_0x1db6e1,_0x3e30b3){const _0x35947c=_0x317147;super(),this[_0x35947c(0x1a6)]=_0x1c8f88,this[_0x35947c(0x17f)]=_0x186972,this[_0x35947c(0x193)]=_0x1db6e1,this[_0x35947c(0x192)]=_0x3e30b3,this[_0x35947c(0x1b1)](),this[_0x35947c(0x1b4)]();}[_0x317147(0x1b4)](){const _0x35b652=_0x317147;this['disposeWithMe'](this[_0x35b652(0x17f)][_0x35b652(0x179)][_0x35b652(0x18b)](_0x3fd222(0x10))[_0x35b652(0x1a7)](_0xf5ac9b=>{const _0x30d9dc=_0x35b652,_0x23ebb4=new Set();_0xf5ac9b[_0x30d9dc(0x172)](_0x7465f0=>{const _0x49430e=_0x30d9dc;switch(_0x7465f0['type']){case _0x49430e(0x187):{const _0x233665=_0x7465f0[_0x49430e(0x1b0)][_0x49430e(0x17b)];_0x23ebb4[_0x49430e(0x187)](_0x233665);break;}}}),B(this[_0x30d9dc(0x192)],_0x23ebb4);}));}[_0x317147(0x1b1)](){const _0x15c4a3=_0x317147;this['disposeWithMe'](this[_0x15c4a3(0x1a6)][_0x15c4a3(0x179)][_0x15c4a3(0x1a7)](async _0x1f5333=>{const _0x4335e1=_0x15c4a3;var _0x5206cc,_0x3520be,_0x19c3e4,_0x564637;const _0x5eec09=(_0x5206cc=this[_0x4335e1(0x17f)][_0x4335e1(0x195)](_0x1f5333['unitId'])[_0x4335e1(0x1ba)](_0x525335=>_0x525335['threadId']===_0x1f5333['threadId']))==null?void 0x0:_0x5206cc[_0x4335e1(0x1d1)];if(!_0x5eec09)return;const {unitId:_0x1f703d,subUnitId:_0x24448a}=_0x5eec09;switch(_0x1f5333[_0x4335e1(0x1c7)]&&this[_0x4335e1(0x193)][_0x4335e1(0x184)](_0x1f5333[_0x4335e1(0x1c7)]),_0x1f5333[_0x4335e1(0x18a)]){case v[_0x4335e1(0x199)]:break;case v[_0x4335e1(0x197)]:{this[_0x4335e1(0x17f)][_0x4335e1(0x180)](_0x1f703d,_0x24448a,{'unitId':_0x1f703d,'subUnitId':_0x24448a,'ref':'','id':_0x1f5333[_0x4335e1(0x181)],'dT':y(+_0x1f5333['createTimestamp']),'threadId':_0x1f5333[_0x4335e1(0x1af)],'personId':(_0x19c3e4=(_0x3520be=_0x1f5333[_0x4335e1(0x1c7)])==null?void 0x0:_0x3520be['userID'])!=null?_0x19c3e4:_0x1f5333['userId'],'text':JSON[_0x4335e1(0x19b)](_0x1f5333[_0x4335e1(0x1d0)]),'parentId':_0x5eec09['id']});break;}case v['Delete']:{const _0x7ab39d=this[_0x4335e1(0x17f)][_0x4335e1(0x1c8)](_0x1f703d,_0x24448a,_0x1f5333[_0x4335e1(0x181)]);_0x7ab39d&&_0x7ab39d[_0x4335e1(0x176)]&&this['_threadCommentModel'][_0x4335e1(0x1bb)](_0x1f703d,_0x24448a,_0x1f5333[_0x4335e1(0x181)]);break;}case v['Edit']:{this[_0x4335e1(0x17f)][_0x4335e1(0x1a5)](_0x1f703d,_0x24448a,{'commentId':_0x1f5333[_0x4335e1(0x181)],'text':JSON[_0x4335e1(0x19b)](_0x1f5333[_0x4335e1(0x1d0)])});break;}case v['Solve']:{const _0x363e7c=(_0x564637=this[_0x4335e1(0x17f)]['getUnit'](_0x1f5333[_0x4335e1(0x17c)])[_0x4335e1(0x1ba)](_0x34ea49=>_0x34ea49[_0x4335e1(0x1af)]===_0x1f5333['threadId']))==null?void 0x0:_0x564637['root'];_0x363e7c&&this[_0x4335e1(0x17f)][_0x4335e1(0x1cf)](_0x1f703d,_0x24448a,_0x363e7c['id'],_0x1f5333['solved']===I[_0x4335e1(0x1be)]);break;}}}));}};_=V([p(0x0,_0x919d50(_0x30b9cd)),p(0x1,_0x919d50(_0x62d7b6)),p(0x2,_0x919d50(_0x17961f)),p(0x3,_0x919d50(_0x44cd81))],_);const z=_0x317147(0x1c2),O={};var k=Object[_0x317147(0x1a9)],Q=(_0x34fbf5,_0x63973c,_0x250759,_0x68b1d0)=>{const _0x40c80d=_0x317147;for(var _0x2fa889=_0x68b1d0>0x1?void 0x0:_0x68b1d0?k(_0x63973c,_0x250759):_0x63973c,_0x36a328=_0x34fbf5[_0x40c80d(0x18e)]-0x1,_0x59f722;_0x36a328>=0x0;_0x36a328--)(_0x59f722=_0x34fbf5[_0x36a328])&&(_0x2fa889=_0x59f722(_0x2fa889)||_0x2fa889);return _0x2fa889;},b=(_0x2ec58a,_0x11f8d7)=>(_0x21ebd8,_0x8cc938)=>_0x11f8d7(_0x21ebd8,_0x8cc938,_0x2ec58a);function _0x21b8(_0x4a3e0f,_0x421deb){const _0x57670a=_0x5767();return _0x21b8=function(_0x21b835,_0x330ec9){_0x21b835=_0x21b835-0x172;let _0x58cae2=_0x57670a[_0x21b835];return _0x58cae2;},_0x21b8(_0x4a3e0f,_0x421deb);}function X(_0x5e1ea1,_0x5d05a3){const _0x4b697b=_0x317147,_0x258ee9=_0x5e1ea1[_0x4b697b(0x1cb)][0x0];return{..._0x5d05a3,'id':_0x258ee9[_0x4b697b(0x181)],'resolved':_0x5e1ea1[_0x4b697b(0x1b2)]===0x1,'dT':y(_0x258ee9[_0x4b697b(0x1a8)]),'personId':_0x258ee9[_0x4b697b(0x1c5)],'threadId':_0x258ee9[_0x4b697b(0x1af)]};}function ee(_0x1ba1fc,_0x321ea2,_0x31ad39){const _0x1bf817=_0x317147;var _0x40ea83,_0x359379;if(((_0x359379=(_0x40ea83=_0x1ba1fc==null?void 0x0:_0x1ba1fc['replies'])==null?void 0x0:_0x40ea83[_0x1bf817(0x18e)])!=null?_0x359379:0x0)>0x0){const _0x192d2d=(_0x30c427,_0xf57e0)=>({'id':_0x30c427[_0x1bf817(0x181)],'threadId':_0x30c427[_0x1bf817(0x1af)],'dT':y(_0x30c427[_0x1bf817(0x1a8)]),'personId':_0x30c427[_0x1bf817(0x1c5)],'resolved':_0x1ba1fc['solved']===I['Solved'],'unitId':_0x321ea2,'subUnitId':_0x31ad39,'text':JSON[_0x1bf817(0x19b)](_0x30c427[_0x1bf817(0x1d0)]),'parentId':_0xf57e0}),_0x454388=_0x192d2d(_0x1ba1fc['replies'][0x0]);return{..._0x454388,'children':_0x1ba1fc[_0x1bf817(0x1cb)][_0x1bf817(0x18c)](0x1)['map'](_0x319a59=>_0x192d2d(_0x319a59,_0x454388['id']))};}return null;}let S=class{constructor(_0x111ec9,_0x1b5cfa,_0x40bc19){const _0x4004ee=_0x317147;this[_0x4004ee(0x19a)]=_0x111ec9,this[_0x4004ee(0x193)]=_0x1b5cfa,this[_0x4004ee(0x1a3)]=_0x40bc19;}async[_0x317147(0x180)](_0x2bbca5){const _0x13e2fe=_0x317147;var _0x35a908,_0xddadef;const {parentId:_0x4669f6,unitId:_0x480037,text:_0x5ed32f,threadId:_0x3e31be}=_0x2bbca5,_0x40a12c=(_0xddadef=(_0x35a908=_0x5ed32f['customRanges'])==null?void 0x0:_0x35a908['filter'](_0xbd8bb8=>_0xbd8bb8['rangeType']===_0x43a9e5[_0x13e2fe(0x1c0)])[_0x13e2fe(0x19c)](_0x3cb063=>_0x3cb063[_0x13e2fe(0x183)]))!=null?_0xddadef:[],_0x5a1ca4=JSON[_0x13e2fe(0x18f)](_0x5ed32f),_0x15f458=(await this[_0x13e2fe(0x1a3)]['requireSession'](_0x480037))['getMemberID']();if(_0x4669f6){const _0x55ecdf={'memberId':_0x15f458,'unitId':_0x480037,'content':_0x5a1ca4,'mention':_0x40a12c,'threadId':_0x3e31be},_0x14e037=(await this['_httpService']['post'](_0x13e2fe(0x174)+_0x480037+'/reply',{'body':_0x55ecdf}))[_0x13e2fe(0x189)]['reply'];return{..._0x2bbca5,'id':_0x14e037['replyId'],'dT':_0x5568cd(+_0x14e037[_0x13e2fe(0x1a8)])['format'](_0x13e2fe(0x191)),'personId':_0x14e037[_0x13e2fe(0x1c5)]};}else{const _0x3cc583={'memberId':_0x15f458,'unitId':_0x480037,'content':_0x5a1ca4,'mention':_0x40a12c},_0x2b798d=await this[_0x13e2fe(0x19a)][_0x13e2fe(0x1ae)](_0x13e2fe(0x174)+_0x480037+_0x13e2fe(0x1bd),{'body':_0x3cc583});return X(_0x2b798d[_0x13e2fe(0x189)]['comment'],_0x2bbca5);}}async[_0x317147(0x1a5)](_0xd8e35c){const _0xc884e0=_0x317147;var _0xc9ae48,_0x553443;const {text:_0x2d0b72,unitId:_0x1525e0}=_0xd8e35c,_0x1ef3fe=(_0x553443=(_0xc9ae48=_0x2d0b72['customRanges'])==null?void 0x0:_0xc9ae48['filter'](_0x3b1b6d=>_0x3b1b6d['rangeType']===_0x43a9e5[_0xc884e0(0x1c0)])['map'](_0x2c7bb3=>_0x2c7bb3['rangeId']))!=null?_0x553443:[],_0xbebb48=JSON[_0xc884e0(0x18f)](_0x2d0b72),_0x547736=_0xd8e35c[_0xc884e0(0x1af)],_0x16f98e=_0xd8e35c['id'],_0x3f01c9={'memberId':(await this['_sessionService'][_0xc884e0(0x1cc)](_0x1525e0))[_0xc884e0(0x1ca)](),'unitId':_0x1525e0,'threadId':_0x547736,'mention':_0x1ef3fe,'content':_0xbebb48,'replyId':_0x16f98e},_0x2999ff=await this[_0xc884e0(0x19a)][_0xc884e0(0x1ae)]('/universer-api/comment/unit/'+_0x1525e0+_0xc884e0(0x17a),{'body':_0x3f01c9});return!_0x2999ff[_0xc884e0(0x189)][_0xc884e0(0x19d)]||_0x2999ff[_0xc884e0(0x189)][_0xc884e0(0x19d)]['code']===0x1;}async[_0x317147(0x1cf)](_0xc8b494){const _0x40b4c9=_0x317147,{unitId:_0x1e35dc}=_0xc8b494,_0xdfa52e=_0xc8b494[_0x40b4c9(0x1af)],_0x1381f6={'memberId':this[_0x40b4c9(0x193)][_0x40b4c9(0x177)]()[_0x40b4c9(0x178)],'unitId':_0x1e35dc,'threadId':_0xdfa52e,'solved':_0xc8b494['resolved']?I[_0x40b4c9(0x1be)]:I[_0x40b4c9(0x1aa)]},_0x4d8ba3=await this[_0x40b4c9(0x19a)][_0x40b4c9(0x1ae)](_0x40b4c9(0x174)+_0x1e35dc+'/solved',{'body':_0x1381f6});return!_0x4d8ba3['body'][_0x40b4c9(0x19d)]||_0x4d8ba3['body'][_0x40b4c9(0x19d)][_0x40b4c9(0x190)]===0x1;}async[_0x317147(0x1bb)](_0x51f442,_0xac3513,_0x1fa424,_0x58d0af){const _0x61c465=_0x317147,_0x588b6a={'memberId':(await this['_sessionService']['requireSession'](_0x51f442))[_0x61c465(0x1ca)](),'threadId':_0x1fa424,'replyId':_0x58d0af,'unitId':_0x51f442},_0x389d87=await this['_httpService'][_0x61c465(0x1ae)]('/universer-api/comment/unit/'+_0x51f442+_0x61c465(0x173),{'body':_0x588b6a});return!_0x389d87[_0x61c465(0x189)][_0x61c465(0x19d)]||_0x389d87['body']['error']['code']===0x1;}async[_0x317147(0x1bf)](_0x2e86d0,_0x43a525,_0x200aff){const _0x232a4b=_0x317147,_0x925e69={'unitId':_0x2e86d0,'threadId':_0x200aff},_0x25dbe6=await this[_0x232a4b(0x19a)][_0x232a4b(0x1ae)]('/universer-api/comment/unit/'+_0x2e86d0+_0x232a4b(0x17d),{'body':_0x925e69}),_0x1eb8c6=_0x200aff[_0x232a4b(0x19c)](_0x2e08ec=>ee(_0x25dbe6[_0x232a4b(0x189)]['comments'][_0x2e08ec],_0x2e86d0,_0x43a525))['filter'](Boolean);return Object['values'](_0x25dbe6[_0x232a4b(0x189)][_0x232a4b(0x19e)])[_0x232a4b(0x172)](_0xc21005=>{const _0x94f2bc=_0x232a4b;this[_0x94f2bc(0x193)][_0x94f2bc(0x184)](_0xc21005);}),_0x1eb8c6;}[_0x317147(0x194)](_0x43ee2d){const _0x285f73=_0x317147;return{'id':_0x43ee2d['id'],'threadId':_0x43ee2d[_0x285f73(0x1af)],'ref':_0x43ee2d[_0x285f73(0x186)]};}};S=Q([b(0x0,_0x919d50(_0x4dcd29)),b(0x1,_0x919d50(_0x17961f)),b(0x2,_0x919d50(_0x450154))],S);var re=Object[_0x317147(0x1a9)],te=(_0x597568,_0x2a01a9,_0x136c85,_0x26b9ed)=>{for(var _0x4f9830=_0x26b9ed>0x1?void 0x0:_0x26b9ed?re(_0x2a01a9,_0x136c85):_0x2a01a9,_0x41cbd9=_0x597568['length']-0x1,_0x10740a;_0x41cbd9>=0x0;_0x41cbd9--)(_0x10740a=_0x597568[_0x41cbd9])&&(_0x4f9830=_0x10740a(_0x4f9830)||_0x4f9830);return _0x4f9830;},M=(_0x2204e3,_0x538494)=>(_0x4ea35a,_0xa31641)=>_0x538494(_0x4ea35a,_0xa31641,_0x2204e3);let f=class extends _0x2e4002{constructor(_0x21a714,_0x256d6b){const _0x58b080=_0x317147;super(),this['_threadCommentDataSourceService']=_0x21a714,this['_threadCommentDataSource']=_0x256d6b,this[_0x58b080(0x1a0)]();}['_initDataSource'](){const _0x3eea86=_0x317147;this['_threadCommentDataSourceService'][_0x3eea86(0x17e)]=this[_0x3eea86(0x1b5)],this['_threadCommentDataSourceService'][_0x3eea86(0x1b6)]=!0x1;}};f=te([M(0x0,_0x29d0b3),M(0x1,_0x919d50(S))],f);var se=Object['defineProperty'],oe=Object[_0x317147(0x1a9)],ne=(_0x23df4b,_0x531235,_0x5642e3)=>_0x531235 in _0x23df4b?se(_0x23df4b,_0x531235,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5642e3}):_0x23df4b[_0x531235]=_0x5642e3,ie=(_0x24b306,_0x367b9b,_0x27bcf2,_0x41f5a8)=>{const _0x2705e8=_0x317147;for(var _0x31dd84=_0x41f5a8>0x1?void 0x0:_0x41f5a8?oe(_0x367b9b,_0x27bcf2):_0x367b9b,_0x1398c0=_0x24b306[_0x2705e8(0x18e)]-0x1,_0x272d9f;_0x1398c0>=0x0;_0x1398c0--)(_0x272d9f=_0x24b306[_0x1398c0])&&(_0x31dd84=_0x272d9f(_0x31dd84)||_0x31dd84);return _0x31dd84;},N=(_0xad93b0,_0x374e81)=>(_0x3c4804,_0x318e19)=>_0x374e81(_0x3c4804,_0x318e19,_0xad93b0),$=(_0x709107,_0x48deea,_0x244c5f)=>ne(_0x709107,typeof _0x48deea!='symbol'?_0x48deea+'':_0x48deea,_0x244c5f);let g=class extends _0x4d1b0e{constructor(_0xcfc018=O,_0x168363,_0x2286e8){const _0x4e0800=_0x317147;super(),this['_config']=_0xcfc018,this[_0x4e0800(0x192)]=_0x168363,this[_0x4e0800(0x1ab)]=_0x2286e8;const {..._0x5ee5ec}=_0x2e9ae9({},O,this[_0x4e0800(0x1c4)]);this['_configService'][_0x4e0800(0x198)](z,_0x5ee5ec);}[_0x317147(0x1a4)](){const _0xef391f=_0x317147;[[S],[f],[_]][_0xef391f(0x172)](_0x1262f4=>{const _0x32e01b=_0xef391f;this[_0x32e01b(0x192)][_0x32e01b(0x187)](_0x1262f4);});}[_0x317147(0x175)](){const _0x11a297=_0x317147;this[_0x11a297(0x192)][_0x11a297(0x1ad)](f),this[_0x11a297(0x192)]['get'](_);}};$(g,_0x317147(0x1bc),W),$(g,'type',_0x3d559f['UNIVER_UNKNOWN']),g=ie([_0x23f7c9(_0x29578f,_0x3f195e,_0x5183ef),N(0x1,_0x919d50(_0x44cd81)),N(0x2,_0x3b264d)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x450650=_0x1924;(function(_0x38d6eb,_0x19fe4c){const _0x5de90c=_0x1924,_0x5b6db2=_0x38d6eb();while(!![]){try{const _0x328a8b=-parseInt(_0x5de90c(0x140))/0x1+parseInt(_0x5de90c(0x13d))/0x2+parseInt(_0x5de90c(0x115))/0x3+-parseInt(_0x5de90c(0x109))/0x4+-parseInt(_0x5de90c(0x108))/0x5*(parseInt(_0x5de90c(0x10f))/0x6)+parseInt(_0x5de90c(0x13e))/0x7+parseInt(_0x5de90c(0x12a))/0x8*(parseInt(_0x5de90c(0xff))/0x9);if(_0x328a8b===_0x19fe4c)break;else _0x5b6db2['push'](_0x5b6db2['shift']());}catch(_0x504658){_0x5b6db2['push'](_0x5b6db2['shift']());}}}(_0x1a8e,0xb5cb2));import{CommentService as _0x4899ac,CollaborationSessionService as _0x4b7890,UniverCollaborationClientPlugin as _0x46de07}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x41bba8}from'@univerjs-pro/license';import{dayjs as _0x37a29a,UserManagerService as _0x50853d,Inject as _0x4de773,Injector as _0x202eaa,Disposable as _0x4222cc,CustomRangeType as _0x569be7,UniverInstanceType as _0xb46a4b,DependentOn as _0x542ceb,IConfigService as _0x5c022a,Plugin as _0x533345,merge as _0x326730}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4e15a3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4cd4a3,IThreadCommentDataSourceService as _0x2c32f7}from'@univerjs/thread-comment';import{bufferTime as _0x11b7ff}from'rxjs';import{HTTPService as _0x328679}from'@univerjs/network';const W=_0x450650(0x156);var I=(_0x44c82c=>(_0x44c82c[_0x44c82c[_0x450650(0x11b)]=0x0]='OpenOrReOpen',_0x44c82c[_0x44c82c['Solved']=0x1]='Solved',_0x44c82c[_0x44c82c[_0x450650(0x14b)]=-0x1]=_0x450650(0x14b),_0x44c82c))(I||{}),v=(_0x590116=>(_0x590116[_0x590116['Unknown']=0x0]=_0x450650(0x152),_0x590116[_0x590116[_0x450650(0x107)]=0x1]=_0x450650(0x107),_0x590116[_0x590116[_0x450650(0x138)]=0x2]='Reply',_0x590116[_0x590116[_0x450650(0x126)]=0x3]='Edit',_0x590116[_0x590116[_0x450650(0x12c)]=0x4]=_0x450650(0x12c),_0x590116[_0x590116[_0x450650(0x134)]=0x5]=_0x450650(0x134),_0x590116[_0x590116[_0x450650(0x14b)]=-0x1]='UNRECOGNIZED',_0x590116))(v||{});const y=_0x37f553=>_0x37a29a(new Date(+_0x37f553))[_0x450650(0x154)](_0x450650(0x12d)),B=async(_0x2b0a42,_0x105b1c)=>{const _0x343fb0=_0x450650,_0x3f89cf=_0x2b0a42[_0x343fb0(0x15d)](_0x50853d),_0x56af5f=_0x2b0a42['get'](_0x328679);_0x105b1c[_0x343fb0(0x10d)](_0x5e2cff=>{const _0x1af291=_0x343fb0;_0x3f89cf[_0x1af291(0x10b)](_0x5e2cff)&&_0x105b1c['delete'](_0x5e2cff);}),_0x105b1c[_0x343fb0(0x11d)]&&(await _0x56af5f['get'](_0x343fb0(0x147),{'params':{'userIDs':[..._0x105b1c]}}))['body'][_0x343fb0(0x159)][_0x343fb0(0x10d)](_0x2c2f86=>{const _0x412c84=_0x343fb0;_0x2c2f86&&_0x3f89cf[_0x412c84(0x114)](_0x2c2f86);});};var K=Object[_0x450650(0x12f)],V=(_0x33efb4,_0x2cf513,_0x332bf3,_0x3eef2a)=>{const _0x18a9b4=_0x450650;for(var _0x29a0fa=_0x3eef2a>0x1?void 0x0:_0x3eef2a?K(_0x2cf513,_0x332bf3):_0x2cf513,_0x3a6492=_0x33efb4[_0x18a9b4(0x130)]-0x1,_0xf52b28;_0x3a6492>=0x0;_0x3a6492--)(_0xf52b28=_0x33efb4[_0x3a6492])&&(_0x29a0fa=_0xf52b28(_0x29a0fa)||_0x29a0fa);return _0x29a0fa;},p=(_0x521a2c,_0x36d664)=>(_0x1a7769,_0x2f2d6f)=>_0x36d664(_0x1a7769,_0x2f2d6f,_0x521a2c);let _=class extends _0x4222cc{constructor(_0x324abf,_0x401363,_0x1cdd56,_0x1bf407){const _0x232274=_0x450650;super(),this[_0x232274(0x129)]=_0x324abf,this[_0x232274(0x112)]=_0x401363,this['_userService']=_0x1cdd56,this[_0x232274(0x145)]=_0x1bf407,this[_0x232274(0x10e)](),this[_0x232274(0x13c)]();}[_0x450650(0x13c)](){const _0x117061=_0x450650;this[_0x117061(0x15b)](this[_0x117061(0x112)]['commentUpdate$'][_0x117061(0x142)](_0x11b7ff(0x10))[_0x117061(0x150)](_0x52703e=>{const _0xd28a4f=_0x117061,_0x3e0999=new Set();_0x52703e[_0xd28a4f(0x10d)](_0x384e79=>{const _0x473079=_0xd28a4f;switch(_0x384e79[_0x473079(0x12b)]){case _0x473079(0x13b):{const _0x45583c=_0x384e79['payload']['personId'];_0x3e0999['add'](_0x45583c);break;}}}),B(this['_injector'],_0x3e0999);}));}[_0x450650(0x10e)](){const _0x2c900d=_0x450650;this[_0x2c900d(0x15b)](this[_0x2c900d(0x129)][_0x2c900d(0x118)][_0x2c900d(0x150)](async _0x2d4ab2=>{const _0x3f6f2a=_0x2c900d;var _0x5433ce,_0x39f5d9,_0x34d0e3,_0xa26bd8;const _0x237772=(_0x5433ce=this[_0x3f6f2a(0x112)][_0x3f6f2a(0x11e)](_0x2d4ab2[_0x3f6f2a(0x146)])[_0x3f6f2a(0x111)](_0x2cf1ad=>_0x2cf1ad[_0x3f6f2a(0x102)]===_0x2d4ab2[_0x3f6f2a(0x102)]))==null?void 0x0:_0x5433ce[_0x3f6f2a(0x132)];if(!_0x237772)return;const {unitId:_0x2b0aa3,subUnitId:_0x1e8ca8}=_0x237772;switch(_0x2d4ab2[_0x3f6f2a(0x14e)]&&this['_userService'][_0x3f6f2a(0x114)](_0x2d4ab2[_0x3f6f2a(0x14e)]),_0x2d4ab2[_0x3f6f2a(0x12b)]){case v[_0x3f6f2a(0x107)]:break;case v['Reply']:{this['_threadCommentModel'][_0x3f6f2a(0x131)](_0x2b0aa3,_0x1e8ca8,{'unitId':_0x2b0aa3,'subUnitId':_0x1e8ca8,'ref':'','id':_0x2d4ab2[_0x3f6f2a(0x121)],'dT':y(+_0x2d4ab2['createTimestamp']),'threadId':_0x2d4ab2[_0x3f6f2a(0x102)],'personId':(_0x34d0e3=(_0x39f5d9=_0x2d4ab2[_0x3f6f2a(0x14e)])==null?void 0x0:_0x39f5d9[_0x3f6f2a(0x15e)])!=null?_0x34d0e3:_0x2d4ab2[_0x3f6f2a(0x155)],'text':JSON[_0x3f6f2a(0x162)](_0x2d4ab2['content']),'parentId':_0x237772['id']});break;}case v['Delete']:{const _0x38ab8a=this[_0x3f6f2a(0x112)][_0x3f6f2a(0x135)](_0x2b0aa3,_0x1e8ca8,_0x2d4ab2[_0x3f6f2a(0x121)]);_0x38ab8a&&_0x38ab8a['parentId']&&this[_0x3f6f2a(0x112)][_0x3f6f2a(0x128)](_0x2b0aa3,_0x1e8ca8,_0x2d4ab2[_0x3f6f2a(0x121)]);break;}case v[_0x3f6f2a(0x126)]:{this['_threadCommentModel']['updateComment'](_0x2b0aa3,_0x1e8ca8,{'commentId':_0x2d4ab2[_0x3f6f2a(0x121)],'text':JSON[_0x3f6f2a(0x162)](_0x2d4ab2[_0x3f6f2a(0x10c)])});break;}case v[_0x3f6f2a(0x134)]:{const _0x3c4d5b=(_0xa26bd8=this[_0x3f6f2a(0x112)]['getUnit'](_0x2d4ab2[_0x3f6f2a(0x146)])[_0x3f6f2a(0x111)](_0x3d6d1c=>_0x3d6d1c[_0x3f6f2a(0x102)]===_0x2d4ab2[_0x3f6f2a(0x102)]))==null?void 0x0:_0xa26bd8['root'];_0x3c4d5b&&this[_0x3f6f2a(0x112)]['resolveComment'](_0x2b0aa3,_0x1e8ca8,_0x3c4d5b['id'],_0x2d4ab2[_0x3f6f2a(0x157)]===I[_0x3f6f2a(0x110)]);break;}}}));}};_=V([p(0x0,_0x4de773(_0x4899ac)),p(0x1,_0x4de773(_0x4cd4a3)),p(0x2,_0x4de773(_0x50853d)),p(0x3,_0x4de773(_0x202eaa))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x450650(0x12f)],Q=(_0x4ddc77,_0x6098fb,_0x108dc2,_0x172c81)=>{const _0x133127=_0x450650;for(var _0x28a051=_0x172c81>0x1?void 0x0:_0x172c81?k(_0x6098fb,_0x108dc2):_0x6098fb,_0x1a2f8c=_0x4ddc77[_0x133127(0x130)]-0x1,_0x1b7ed2;_0x1a2f8c>=0x0;_0x1a2f8c--)(_0x1b7ed2=_0x4ddc77[_0x1a2f8c])&&(_0x28a051=_0x1b7ed2(_0x28a051)||_0x28a051);return _0x28a051;},b=(_0x2ee30c,_0x5c5d1c)=>(_0x3ad1d1,_0x1e6fc5)=>_0x5c5d1c(_0x3ad1d1,_0x1e6fc5,_0x2ee30c);function X(_0x4bf659,_0x311a27){const _0xc0a75b=_0x450650,_0x269da6=_0x4bf659['replies'][0x0];return{..._0x311a27,'id':_0x269da6[_0xc0a75b(0x121)],'resolved':_0x4bf659[_0xc0a75b(0x157)]===0x1,'dT':y(_0x269da6[_0xc0a75b(0x14d)]),'personId':_0x269da6[_0xc0a75b(0x155)],'threadId':_0x269da6[_0xc0a75b(0x102)]};}function ee(_0x2cba06,_0x5bc8bb,_0x2e0927){const _0x2a95ef=_0x450650;var _0x59c3fd,_0x3899ae;if(((_0x3899ae=(_0x59c3fd=_0x2cba06==null?void 0x0:_0x2cba06[_0x2a95ef(0x14c)])==null?void 0x0:_0x59c3fd['length'])!=null?_0x3899ae:0x0)>0x0){const _0x27e5d6=(_0x5a56c1,_0x51317f)=>({'id':_0x5a56c1[_0x2a95ef(0x121)],'threadId':_0x5a56c1[_0x2a95ef(0x102)],'dT':y(_0x5a56c1[_0x2a95ef(0x14d)]),'personId':_0x5a56c1[_0x2a95ef(0x155)],'resolved':_0x2cba06[_0x2a95ef(0x157)]===I['Solved'],'unitId':_0x5bc8bb,'subUnitId':_0x2e0927,'text':JSON[_0x2a95ef(0x162)](_0x5a56c1[_0x2a95ef(0x10c)]),'parentId':_0x51317f}),_0x5377a8=_0x27e5d6(_0x2cba06[_0x2a95ef(0x14c)][0x0]);return{..._0x5377a8,'children':_0x2cba06[_0x2a95ef(0x14c)][_0x2a95ef(0x143)](0x1)['map'](_0x5c3cd6=>_0x27e5d6(_0x5c3cd6,_0x5377a8['id']))};}return null;}function _0x1a8e(){const _0x3fd8dc=['code','Reply','comments','getMemberID','add','_initUserSync','1747996QwjSau','3650745YxwvFK','_userService','858119KAoNwk','dataSource','pipe','slice','filter','_injector','unitId','/universer-api/user/list','body','_threadCommentDataSourceService','_config','UNRECOGNIZED','replies','createTimestamp','user','_threadCommentDataSource','subscribe','setConfig','Unknown','error','format','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','COMMENT','users','syncUpdateMutationToColla','disposeWithMe','saveCommentToSnapshot','get','userID','_httpService','defineProperty','/reply','parse','5422104fqQprz','post','stringify','threadId','_sessionService','listComments','comment','/delete','Add','85epRCQh','2813356FJhUba','onReady','getUser','content','forEach','_init','295494AmpJjn','Solved','find','_threadCommentModel','/universer-api/comment/unit/','addUser','1628616yHAmUA','_configService','symbol','commentUpdate$','/list','values','OpenOrReOpen','/solved','size','getUnit','rangeId','ref','replyId','_initDataSource','customRanges','rangeType','resolveComment','Edit','requireSession','deleteComment','_commentService','16wXlDWw','type','Delete','YYYY/MM/DD\x20HH:mm','resolved','getOwnPropertyDescriptor','length','addComment','root','map','Solve','getComment','onStarting'];_0x1a8e=function(){return _0x3fd8dc;};return _0x1a8e();}let S=class{constructor(_0x238068,_0x177cfc,_0x148a5e){const _0x47d2bc=_0x450650;this['_httpService']=_0x238068,this['_userService']=_0x177cfc,this[_0x47d2bc(0x103)]=_0x148a5e;}async[_0x450650(0x131)](_0x3ba58f){const _0x574128=_0x450650;var _0x5aca7f,_0x7f726e;const {parentId:_0x4b6b8f,unitId:_0x4283ce,text:_0x48d656,threadId:_0x40c46c}=_0x3ba58f,_0x4cd983=(_0x7f726e=(_0x5aca7f=_0x48d656[_0x574128(0x123)])==null?void 0x0:_0x5aca7f[_0x574128(0x144)](_0x43d1b2=>_0x43d1b2[_0x574128(0x124)]===_0x569be7[_0x574128(0x158)])[_0x574128(0x133)](_0x20c471=>_0x20c471[_0x574128(0x11f)]))!=null?_0x7f726e:[],_0x51d695=JSON[_0x574128(0x101)](_0x48d656),_0x396279=(await this[_0x574128(0x103)][_0x574128(0x127)](_0x4283ce))['getMemberID']();if(_0x4b6b8f){const _0x5e4e5d={'memberId':_0x396279,'unitId':_0x4283ce,'content':_0x51d695,'mention':_0x4cd983,'threadId':_0x40c46c},_0x2d4faf=(await this['_httpService'][_0x574128(0x100)]('/universer-api/comment/unit/'+_0x4283ce+_0x574128(0x161),{'body':_0x5e4e5d}))[_0x574128(0x148)]['reply'];return{..._0x3ba58f,'id':_0x2d4faf['replyId'],'dT':_0x37a29a(+_0x2d4faf[_0x574128(0x14d)])['format'](_0x574128(0x12d)),'personId':_0x2d4faf['userId']};}else{const _0x581101={'memberId':_0x396279,'unitId':_0x4283ce,'content':_0x51d695,'mention':_0x4cd983},_0x184f58=await this[_0x574128(0x15f)][_0x574128(0x100)](_0x574128(0x113)+_0x4283ce+'/add',{'body':_0x581101});return X(_0x184f58['body'][_0x574128(0x105)],_0x3ba58f);}}async['updateComment'](_0x459dbb){const _0x276da0=_0x450650;var _0x573eac,_0x3193d7;const {text:_0x116c6c,unitId:_0x1e4eeb}=_0x459dbb,_0x3d4331=(_0x3193d7=(_0x573eac=_0x116c6c[_0x276da0(0x123)])==null?void 0x0:_0x573eac[_0x276da0(0x144)](_0x13cea7=>_0x13cea7['rangeType']===_0x569be7['COMMENT'])[_0x276da0(0x133)](_0x46874e=>_0x46874e[_0x276da0(0x11f)]))!=null?_0x3193d7:[],_0x4ee99e=JSON[_0x276da0(0x101)](_0x116c6c),_0x3b0949=_0x459dbb[_0x276da0(0x102)],_0x276211=_0x459dbb['id'],_0x28cd66={'memberId':(await this[_0x276da0(0x103)][_0x276da0(0x127)](_0x1e4eeb))[_0x276da0(0x13a)](),'unitId':_0x1e4eeb,'threadId':_0x3b0949,'mention':_0x3d4331,'content':_0x4ee99e,'replyId':_0x276211},_0x307bb4=await this[_0x276da0(0x15f)][_0x276da0(0x100)](_0x276da0(0x113)+_0x1e4eeb+'/edit',{'body':_0x28cd66});return!_0x307bb4[_0x276da0(0x148)][_0x276da0(0x153)]||_0x307bb4[_0x276da0(0x148)][_0x276da0(0x153)][_0x276da0(0x137)]===0x1;}async[_0x450650(0x125)](_0x5dc3ce){const _0xea7d8=_0x450650,{unitId:_0x27781b}=_0x5dc3ce,_0x57664f=_0x5dc3ce[_0xea7d8(0x102)],_0x419d92={'memberId':this[_0xea7d8(0x13f)]['getCurrentUser']()[_0xea7d8(0x15e)],'unitId':_0x27781b,'threadId':_0x57664f,'solved':_0x5dc3ce[_0xea7d8(0x12e)]?I[_0xea7d8(0x110)]:I[_0xea7d8(0x11b)]},_0x2798d7=await this[_0xea7d8(0x15f)]['post']('/universer-api/comment/unit/'+_0x27781b+_0xea7d8(0x11c),{'body':_0x419d92});return!_0x2798d7[_0xea7d8(0x148)][_0xea7d8(0x153)]||_0x2798d7['body']['error'][_0xea7d8(0x137)]===0x1;}async['deleteComment'](_0x2597bf,_0x25a58f,_0x5db11d,_0x258215){const _0x347b35=_0x450650,_0x4b0ca0={'memberId':(await this[_0x347b35(0x103)]['requireSession'](_0x2597bf))[_0x347b35(0x13a)](),'threadId':_0x5db11d,'replyId':_0x258215,'unitId':_0x2597bf},_0x4e0269=await this[_0x347b35(0x15f)]['post'](_0x347b35(0x113)+_0x2597bf+_0x347b35(0x106),{'body':_0x4b0ca0});return!_0x4e0269[_0x347b35(0x148)][_0x347b35(0x153)]||_0x4e0269['body'][_0x347b35(0x153)][_0x347b35(0x137)]===0x1;}async[_0x450650(0x104)](_0x2f338d,_0x352087,_0x44fe4a){const _0x2c3b8b=_0x450650,_0x500f19={'unitId':_0x2f338d,'threadId':_0x44fe4a},_0xdf1f69=await this['_httpService'][_0x2c3b8b(0x100)](_0x2c3b8b(0x113)+_0x2f338d+_0x2c3b8b(0x119),{'body':_0x500f19}),_0x5eaadf=_0x44fe4a[_0x2c3b8b(0x133)](_0x20845b=>ee(_0xdf1f69[_0x2c3b8b(0x148)][_0x2c3b8b(0x139)][_0x20845b],_0x2f338d,_0x352087))[_0x2c3b8b(0x144)](Boolean);return Object[_0x2c3b8b(0x11a)](_0xdf1f69[_0x2c3b8b(0x148)][_0x2c3b8b(0x159)])[_0x2c3b8b(0x10d)](_0x15c1ef=>{const _0x54250a=_0x2c3b8b;this[_0x54250a(0x13f)][_0x54250a(0x114)](_0x15c1ef);}),_0x5eaadf;}[_0x450650(0x15c)](_0x24330d){const _0x2d459d=_0x450650;return{'id':_0x24330d['id'],'threadId':_0x24330d[_0x2d459d(0x102)],'ref':_0x24330d[_0x2d459d(0x120)]};}};S=Q([b(0x0,_0x4de773(_0x328679)),b(0x1,_0x4de773(_0x50853d)),b(0x2,_0x4de773(_0x4b7890))],S);var re=Object[_0x450650(0x12f)],te=(_0x57c3ab,_0x5f06a2,_0x524422,_0x10cf71)=>{const _0x13a432=_0x450650;for(var _0xb5c623=_0x10cf71>0x1?void 0x0:_0x10cf71?re(_0x5f06a2,_0x524422):_0x5f06a2,_0x2af6fe=_0x57c3ab[_0x13a432(0x130)]-0x1,_0x7dee2e;_0x2af6fe>=0x0;_0x2af6fe--)(_0x7dee2e=_0x57c3ab[_0x2af6fe])&&(_0xb5c623=_0x7dee2e(_0xb5c623)||_0xb5c623);return _0xb5c623;},M=(_0x3d7186,_0x2a9bc4)=>(_0x3f3dbb,_0x4ea6fc)=>_0x2a9bc4(_0x3f3dbb,_0x4ea6fc,_0x3d7186);let f=class extends _0x4222cc{constructor(_0x6b2eb6,_0x580aae){const _0x2fb173=_0x450650;super(),this['_threadCommentDataSourceService']=_0x6b2eb6,this[_0x2fb173(0x14f)]=_0x580aae,this[_0x2fb173(0x122)]();}[_0x450650(0x122)](){const _0x2c6eeb=_0x450650;this[_0x2c6eeb(0x149)][_0x2c6eeb(0x141)]=this[_0x2c6eeb(0x14f)],this['_threadCommentDataSourceService'][_0x2c6eeb(0x15a)]=!0x1;}};f=te([M(0x0,_0x2c32f7),M(0x1,_0x4de773(S))],f);function _0x1924(_0xc3c12b,_0x218da0){const _0x1a8ed4=_0x1a8e();return _0x1924=function(_0x1924ea,_0x1a3cec){_0x1924ea=_0x1924ea-0xff;let _0x238a45=_0x1a8ed4[_0x1924ea];return _0x238a45;},_0x1924(_0xc3c12b,_0x218da0);}var se=Object[_0x450650(0x160)],oe=Object[_0x450650(0x12f)],ne=(_0x1be323,_0xd3ead9,_0x194ad1)=>_0xd3ead9 in _0x1be323?se(_0x1be323,_0xd3ead9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x194ad1}):_0x1be323[_0xd3ead9]=_0x194ad1,ie=(_0x1e250a,_0x16ac86,_0x2006c7,_0x4e1784)=>{const _0x219979=_0x450650;for(var _0x3471cb=_0x4e1784>0x1?void 0x0:_0x4e1784?oe(_0x16ac86,_0x2006c7):_0x16ac86,_0x4956a5=_0x1e250a[_0x219979(0x130)]-0x1,_0x38ee77;_0x4956a5>=0x0;_0x4956a5--)(_0x38ee77=_0x1e250a[_0x4956a5])&&(_0x3471cb=_0x38ee77(_0x3471cb)||_0x3471cb);return _0x3471cb;},N=(_0x462216,_0xa44542)=>(_0x1fc42f,_0x2da45a)=>_0xa44542(_0x1fc42f,_0x2da45a,_0x462216),$=(_0x345592,_0x232bcc,_0xfb10dc)=>ne(_0x345592,typeof _0x232bcc!=_0x450650(0x117)?_0x232bcc+'':_0x232bcc,_0xfb10dc);let g=class extends _0x533345{constructor(_0x23c501=O,_0x394f2e,_0x5cff35){const _0x93059f=_0x450650;super(),this[_0x93059f(0x14a)]=_0x23c501,this[_0x93059f(0x145)]=_0x394f2e,this[_0x93059f(0x116)]=_0x5cff35;const {..._0x5aa076}=_0x326730({},O,this['_config']);this[_0x93059f(0x116)][_0x93059f(0x151)](z,_0x5aa076);}[_0x450650(0x136)](){const _0x50800c=_0x450650;[[S],[f],[_]][_0x50800c(0x10d)](_0x3d78b9=>{const _0x3c158c=_0x50800c;this[_0x3c158c(0x145)][_0x3c158c(0x13b)](_0x3d78b9);});}[_0x450650(0x10a)](){const _0x140853=_0x450650;this[_0x140853(0x145)][_0x140853(0x15d)](f),this[_0x140853(0x145)]['get'](_);}};$(g,'pluginName',W),$(g,_0x450650(0x12b),_0xb46a4b['UNIVER_UNKNOWN']),g=ie([_0x542ceb(_0x4e15a3,_0x46de07,_0x41bba8),N(0x1,_0x4de773(_0x202eaa)),N(0x2,_0x5c022a)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x317147=_0x21b8;(function(_0x3c184b,_0x1ab6a7){const _0x51570d=_0x21b8,_0x5f35f2=_0x3c184b();while(!![]){try{const _0x395ffd=-parseInt(_0x51570d(0x1ac))/0x1+parseInt(_0x51570d(0x1a2))/0x2*(-parseInt(_0x51570d(0x19f))/0x3)+parseInt(_0x51570d(0x1ce))/0x4+-parseInt(_0x51570d(0x1c1))/0x5+parseInt(_0x51570d(0x1c9))/0x6+parseInt(_0x51570d(0x1c6))/0x7*(parseInt(_0x51570d(0x196))/0x8)+parseInt(_0x51570d(0x188))/0x9;if(_0x395ffd===_0x1ab6a7)break;else _0x5f35f2['push'](_0x5f35f2['shift']());}catch(_0x1c0eb0){_0x5f35f2['push'](_0x5f35f2['shift']());}}}(_0x5767,0x45a72));import{CommentService as _0x30b9cd,CollaborationSessionService as _0x450154,UniverCollaborationClientPlugin as _0x3f195e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5183ef}from'@univerjs-pro/license';import{dayjs as _0x5568cd,UserManagerService as _0x17961f,Inject as _0x919d50,Injector as _0x44cd81,Disposable as _0x2e4002,CustomRangeType as _0x43a9e5,UniverInstanceType as _0x3d559f,DependentOn as _0x23f7c9,IConfigService as _0x3b264d,Plugin as _0x4d1b0e,merge as _0x2e9ae9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x29578f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x62d7b6,IThreadCommentDataSourceService as _0x29d0b3}from'@univerjs/thread-comment';import{bufferTime as _0x3fd222}from'rxjs';import{HTTPService as _0x4dcd29}from'@univerjs/network';function _0x5767(){const _0x41617d=['threadId','payload','_init','solved','Delete','_initUserSync','_threadCommentDataSource','syncUpdateMutationToColla','getUser','delete','UNRECOGNIZED','find','deleteComment','pluginName','/add','Solved','listComments','COMMENT','1489040khuHZF','thread-comment-data-source.config','format','_config','userId','30814IfegVP','user','getComment','212442tsKlCr','getMemberID','replies','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','1971256VsXeUZ','resolveComment','content','root','forEach','/delete','/universer-api/comment/unit/','onReady','parentId','getCurrentUser','userID','commentUpdate$','/edit','personId','unitId','/list','dataSource','_threadCommentModel','addComment','replyId','size','rangeId','addUser','Edit','ref','add','16821tIVABs','body','type','pipe','slice','Solve','length','stringify','code','YYYY/MM/DD\x20HH:mm','_injector','_userService','saveCommentToSnapshot','getUnit','456swMVoX','Reply','setConfig','Add','_httpService','parse','map','error','users','837TjSwiB','_initDataSource','Unknown','1288XZYLDR','_sessionService','onStarting','updateComment','_commentService','subscribe','createTimestamp','getOwnPropertyDescriptor','OpenOrReOpen','_configService','18222mtQWqB','get','post'];_0x5767=function(){return _0x41617d;};return _0x5767();}const W=_0x317147(0x1cd);var I=(_0x2b110e=>(_0x2b110e[_0x2b110e['OpenOrReOpen']=0x0]=_0x317147(0x1aa),_0x2b110e[_0x2b110e[_0x317147(0x1be)]=0x1]=_0x317147(0x1be),_0x2b110e[_0x2b110e[_0x317147(0x1b9)]=-0x1]=_0x317147(0x1b9),_0x2b110e))(I||{}),v=(_0x113ab8=>(_0x113ab8[_0x113ab8[_0x317147(0x1a1)]=0x0]=_0x317147(0x1a1),_0x113ab8[_0x113ab8[_0x317147(0x199)]=0x1]='Add',_0x113ab8[_0x113ab8['Reply']=0x2]=_0x317147(0x197),_0x113ab8[_0x113ab8[_0x317147(0x185)]=0x3]='Edit',_0x113ab8[_0x113ab8[_0x317147(0x1b3)]=0x4]=_0x317147(0x1b3),_0x113ab8[_0x113ab8['Solve']=0x5]=_0x317147(0x18d),_0x113ab8[_0x113ab8[_0x317147(0x1b9)]=-0x1]='UNRECOGNIZED',_0x113ab8))(v||{});const y=_0xd66d54=>_0x5568cd(new Date(+_0xd66d54))[_0x317147(0x1c3)](_0x317147(0x191)),B=async(_0x3a5619,_0x1475ce)=>{const _0x31f177=_0x317147,_0x13f328=_0x3a5619[_0x31f177(0x1ad)](_0x17961f),_0x1aab74=_0x3a5619[_0x31f177(0x1ad)](_0x4dcd29);_0x1475ce[_0x31f177(0x172)](_0x36931c=>{const _0x4de2a3=_0x31f177;_0x13f328[_0x4de2a3(0x1b7)](_0x36931c)&&_0x1475ce[_0x4de2a3(0x1b8)](_0x36931c);}),_0x1475ce[_0x31f177(0x182)]&&(await _0x1aab74[_0x31f177(0x1ad)]('/universer-api/user/list',{'params':{'userIDs':[..._0x1475ce]}}))[_0x31f177(0x189)][_0x31f177(0x19e)][_0x31f177(0x172)](_0x437bc7=>{_0x437bc7&&_0x13f328['addUser'](_0x437bc7);});};var K=Object[_0x317147(0x1a9)],V=(_0x1986f5,_0x5a9c13,_0x500017,_0x464d65)=>{for(var _0x2b6f11=_0x464d65>0x1?void 0x0:_0x464d65?K(_0x5a9c13,_0x500017):_0x5a9c13,_0x19be93=_0x1986f5['length']-0x1,_0x411b41;_0x19be93>=0x0;_0x19be93--)(_0x411b41=_0x1986f5[_0x19be93])&&(_0x2b6f11=_0x411b41(_0x2b6f11)||_0x2b6f11);return _0x2b6f11;},p=(_0x288494,_0x503001)=>(_0x2ba2f2,_0x10c635)=>_0x503001(_0x2ba2f2,_0x10c635,_0x288494);let _=class extends _0x2e4002{constructor(_0x1c8f88,_0x186972,_0x1db6e1,_0x3e30b3){const _0x35947c=_0x317147;super(),this[_0x35947c(0x1a6)]=_0x1c8f88,this[_0x35947c(0x17f)]=_0x186972,this[_0x35947c(0x193)]=_0x1db6e1,this[_0x35947c(0x192)]=_0x3e30b3,this[_0x35947c(0x1b1)](),this[_0x35947c(0x1b4)]();}[_0x317147(0x1b4)](){const _0x35b652=_0x317147;this['disposeWithMe'](this[_0x35b652(0x17f)][_0x35b652(0x179)][_0x35b652(0x18b)](_0x3fd222(0x10))[_0x35b652(0x1a7)](_0xf5ac9b=>{const _0x30d9dc=_0x35b652,_0x23ebb4=new Set();_0xf5ac9b[_0x30d9dc(0x172)](_0x7465f0=>{const _0x49430e=_0x30d9dc;switch(_0x7465f0['type']){case _0x49430e(0x187):{const _0x233665=_0x7465f0[_0x49430e(0x1b0)][_0x49430e(0x17b)];_0x23ebb4[_0x49430e(0x187)](_0x233665);break;}}}),B(this[_0x30d9dc(0x192)],_0x23ebb4);}));}[_0x317147(0x1b1)](){const _0x15c4a3=_0x317147;this['disposeWithMe'](this[_0x15c4a3(0x1a6)][_0x15c4a3(0x179)][_0x15c4a3(0x1a7)](async _0x1f5333=>{const _0x4335e1=_0x15c4a3;var _0x5206cc,_0x3520be,_0x19c3e4,_0x564637;const _0x5eec09=(_0x5206cc=this[_0x4335e1(0x17f)][_0x4335e1(0x195)](_0x1f5333['unitId'])[_0x4335e1(0x1ba)](_0x525335=>_0x525335['threadId']===_0x1f5333['threadId']))==null?void 0x0:_0x5206cc[_0x4335e1(0x1d1)];if(!_0x5eec09)return;const {unitId:_0x1f703d,subUnitId:_0x24448a}=_0x5eec09;switch(_0x1f5333[_0x4335e1(0x1c7)]&&this[_0x4335e1(0x193)][_0x4335e1(0x184)](_0x1f5333[_0x4335e1(0x1c7)]),_0x1f5333[_0x4335e1(0x18a)]){case v[_0x4335e1(0x199)]:break;case v[_0x4335e1(0x197)]:{this[_0x4335e1(0x17f)][_0x4335e1(0x180)](_0x1f703d,_0x24448a,{'unitId':_0x1f703d,'subUnitId':_0x24448a,'ref':'','id':_0x1f5333[_0x4335e1(0x181)],'dT':y(+_0x1f5333['createTimestamp']),'threadId':_0x1f5333[_0x4335e1(0x1af)],'personId':(_0x19c3e4=(_0x3520be=_0x1f5333[_0x4335e1(0x1c7)])==null?void 0x0:_0x3520be['userID'])!=null?_0x19c3e4:_0x1f5333['userId'],'text':JSON[_0x4335e1(0x19b)](_0x1f5333[_0x4335e1(0x1d0)]),'parentId':_0x5eec09['id']});break;}case v['Delete']:{const _0x7ab39d=this[_0x4335e1(0x17f)][_0x4335e1(0x1c8)](_0x1f703d,_0x24448a,_0x1f5333[_0x4335e1(0x181)]);_0x7ab39d&&_0x7ab39d[_0x4335e1(0x176)]&&this['_threadCommentModel'][_0x4335e1(0x1bb)](_0x1f703d,_0x24448a,_0x1f5333[_0x4335e1(0x181)]);break;}case v['Edit']:{this[_0x4335e1(0x17f)][_0x4335e1(0x1a5)](_0x1f703d,_0x24448a,{'commentId':_0x1f5333[_0x4335e1(0x181)],'text':JSON[_0x4335e1(0x19b)](_0x1f5333[_0x4335e1(0x1d0)])});break;}case v['Solve']:{const _0x363e7c=(_0x564637=this[_0x4335e1(0x17f)]['getUnit'](_0x1f5333[_0x4335e1(0x17c)])[_0x4335e1(0x1ba)](_0x34ea49=>_0x34ea49[_0x4335e1(0x1af)]===_0x1f5333['threadId']))==null?void 0x0:_0x564637['root'];_0x363e7c&&this[_0x4335e1(0x17f)][_0x4335e1(0x1cf)](_0x1f703d,_0x24448a,_0x363e7c['id'],_0x1f5333['solved']===I[_0x4335e1(0x1be)]);break;}}}));}};_=V([p(0x0,_0x919d50(_0x30b9cd)),p(0x1,_0x919d50(_0x62d7b6)),p(0x2,_0x919d50(_0x17961f)),p(0x3,_0x919d50(_0x44cd81))],_);const z=_0x317147(0x1c2),O={};var k=Object[_0x317147(0x1a9)],Q=(_0x34fbf5,_0x63973c,_0x250759,_0x68b1d0)=>{const _0x40c80d=_0x317147;for(var _0x2fa889=_0x68b1d0>0x1?void 0x0:_0x68b1d0?k(_0x63973c,_0x250759):_0x63973c,_0x36a328=_0x34fbf5[_0x40c80d(0x18e)]-0x1,_0x59f722;_0x36a328>=0x0;_0x36a328--)(_0x59f722=_0x34fbf5[_0x36a328])&&(_0x2fa889=_0x59f722(_0x2fa889)||_0x2fa889);return _0x2fa889;},b=(_0x2ec58a,_0x11f8d7)=>(_0x21ebd8,_0x8cc938)=>_0x11f8d7(_0x21ebd8,_0x8cc938,_0x2ec58a);function _0x21b8(_0x4a3e0f,_0x421deb){const _0x57670a=_0x5767();return _0x21b8=function(_0x21b835,_0x330ec9){_0x21b835=_0x21b835-0x172;let _0x58cae2=_0x57670a[_0x21b835];return _0x58cae2;},_0x21b8(_0x4a3e0f,_0x421deb);}function X(_0x5e1ea1,_0x5d05a3){const _0x4b697b=_0x317147,_0x258ee9=_0x5e1ea1[_0x4b697b(0x1cb)][0x0];return{..._0x5d05a3,'id':_0x258ee9[_0x4b697b(0x181)],'resolved':_0x5e1ea1[_0x4b697b(0x1b2)]===0x1,'dT':y(_0x258ee9[_0x4b697b(0x1a8)]),'personId':_0x258ee9[_0x4b697b(0x1c5)],'threadId':_0x258ee9[_0x4b697b(0x1af)]};}function ee(_0x1ba1fc,_0x321ea2,_0x31ad39){const _0x1bf817=_0x317147;var _0x40ea83,_0x359379;if(((_0x359379=(_0x40ea83=_0x1ba1fc==null?void 0x0:_0x1ba1fc['replies'])==null?void 0x0:_0x40ea83[_0x1bf817(0x18e)])!=null?_0x359379:0x0)>0x0){const _0x192d2d=(_0x30c427,_0xf57e0)=>({'id':_0x30c427[_0x1bf817(0x181)],'threadId':_0x30c427[_0x1bf817(0x1af)],'dT':y(_0x30c427[_0x1bf817(0x1a8)]),'personId':_0x30c427[_0x1bf817(0x1c5)],'resolved':_0x1ba1fc['solved']===I['Solved'],'unitId':_0x321ea2,'subUnitId':_0x31ad39,'text':JSON[_0x1bf817(0x19b)](_0x30c427[_0x1bf817(0x1d0)]),'parentId':_0xf57e0}),_0x454388=_0x192d2d(_0x1ba1fc['replies'][0x0]);return{..._0x454388,'children':_0x1ba1fc[_0x1bf817(0x1cb)][_0x1bf817(0x18c)](0x1)['map'](_0x319a59=>_0x192d2d(_0x319a59,_0x454388['id']))};}return null;}let S=class{constructor(_0x111ec9,_0x1b5cfa,_0x40bc19){const _0x4004ee=_0x317147;this[_0x4004ee(0x19a)]=_0x111ec9,this[_0x4004ee(0x193)]=_0x1b5cfa,this[_0x4004ee(0x1a3)]=_0x40bc19;}async[_0x317147(0x180)](_0x2bbca5){const _0x13e2fe=_0x317147;var _0x35a908,_0xddadef;const {parentId:_0x4669f6,unitId:_0x480037,text:_0x5ed32f,threadId:_0x3e31be}=_0x2bbca5,_0x40a12c=(_0xddadef=(_0x35a908=_0x5ed32f['customRanges'])==null?void 0x0:_0x35a908['filter'](_0xbd8bb8=>_0xbd8bb8['rangeType']===_0x43a9e5[_0x13e2fe(0x1c0)])[_0x13e2fe(0x19c)](_0x3cb063=>_0x3cb063[_0x13e2fe(0x183)]))!=null?_0xddadef:[],_0x5a1ca4=JSON[_0x13e2fe(0x18f)](_0x5ed32f),_0x15f458=(await this[_0x13e2fe(0x1a3)]['requireSession'](_0x480037))['getMemberID']();if(_0x4669f6){const _0x55ecdf={'memberId':_0x15f458,'unitId':_0x480037,'content':_0x5a1ca4,'mention':_0x40a12c,'threadId':_0x3e31be},_0x14e037=(await this['_httpService']['post'](_0x13e2fe(0x174)+_0x480037+'/reply',{'body':_0x55ecdf}))[_0x13e2fe(0x189)]['reply'];return{..._0x2bbca5,'id':_0x14e037['replyId'],'dT':_0x5568cd(+_0x14e037[_0x13e2fe(0x1a8)])['format'](_0x13e2fe(0x191)),'personId':_0x14e037[_0x13e2fe(0x1c5)]};}else{const _0x3cc583={'memberId':_0x15f458,'unitId':_0x480037,'content':_0x5a1ca4,'mention':_0x40a12c},_0x2b798d=await this[_0x13e2fe(0x19a)][_0x13e2fe(0x1ae)](_0x13e2fe(0x174)+_0x480037+_0x13e2fe(0x1bd),{'body':_0x3cc583});return X(_0x2b798d[_0x13e2fe(0x189)]['comment'],_0x2bbca5);}}async[_0x317147(0x1a5)](_0xd8e35c){const _0xc884e0=_0x317147;var _0xc9ae48,_0x553443;const {text:_0x2d0b72,unitId:_0x1525e0}=_0xd8e35c,_0x1ef3fe=(_0x553443=(_0xc9ae48=_0x2d0b72['customRanges'])==null?void 0x0:_0xc9ae48['filter'](_0x3b1b6d=>_0x3b1b6d['rangeType']===_0x43a9e5[_0xc884e0(0x1c0)])['map'](_0x2c7bb3=>_0x2c7bb3['rangeId']))!=null?_0x553443:[],_0xbebb48=JSON[_0xc884e0(0x18f)](_0x2d0b72),_0x547736=_0xd8e35c[_0xc884e0(0x1af)],_0x16f98e=_0xd8e35c['id'],_0x3f01c9={'memberId':(await this['_sessionService'][_0xc884e0(0x1cc)](_0x1525e0))[_0xc884e0(0x1ca)](),'unitId':_0x1525e0,'threadId':_0x547736,'mention':_0x1ef3fe,'content':_0xbebb48,'replyId':_0x16f98e},_0x2999ff=await this[_0xc884e0(0x19a)][_0xc884e0(0x1ae)]('/universer-api/comment/unit/'+_0x1525e0+_0xc884e0(0x17a),{'body':_0x3f01c9});return!_0x2999ff[_0xc884e0(0x189)][_0xc884e0(0x19d)]||_0x2999ff[_0xc884e0(0x189)][_0xc884e0(0x19d)]['code']===0x1;}async[_0x317147(0x1cf)](_0xc8b494){const _0x40b4c9=_0x317147,{unitId:_0x1e35dc}=_0xc8b494,_0xdfa52e=_0xc8b494[_0x40b4c9(0x1af)],_0x1381f6={'memberId':this[_0x40b4c9(0x193)][_0x40b4c9(0x177)]()[_0x40b4c9(0x178)],'unitId':_0x1e35dc,'threadId':_0xdfa52e,'solved':_0xc8b494['resolved']?I[_0x40b4c9(0x1be)]:I[_0x40b4c9(0x1aa)]},_0x4d8ba3=await this[_0x40b4c9(0x19a)][_0x40b4c9(0x1ae)](_0x40b4c9(0x174)+_0x1e35dc+'/solved',{'body':_0x1381f6});return!_0x4d8ba3['body'][_0x40b4c9(0x19d)]||_0x4d8ba3['body'][_0x40b4c9(0x19d)][_0x40b4c9(0x190)]===0x1;}async[_0x317147(0x1bb)](_0x51f442,_0xac3513,_0x1fa424,_0x58d0af){const _0x61c465=_0x317147,_0x588b6a={'memberId':(await this['_sessionService']['requireSession'](_0x51f442))[_0x61c465(0x1ca)](),'threadId':_0x1fa424,'replyId':_0x58d0af,'unitId':_0x51f442},_0x389d87=await this['_httpService'][_0x61c465(0x1ae)]('/universer-api/comment/unit/'+_0x51f442+_0x61c465(0x173),{'body':_0x588b6a});return!_0x389d87[_0x61c465(0x189)][_0x61c465(0x19d)]||_0x389d87['body']['error']['code']===0x1;}async[_0x317147(0x1bf)](_0x2e86d0,_0x43a525,_0x200aff){const _0x232a4b=_0x317147,_0x925e69={'unitId':_0x2e86d0,'threadId':_0x200aff},_0x25dbe6=await this[_0x232a4b(0x19a)][_0x232a4b(0x1ae)]('/universer-api/comment/unit/'+_0x2e86d0+_0x232a4b(0x17d),{'body':_0x925e69}),_0x1eb8c6=_0x200aff[_0x232a4b(0x19c)](_0x2e08ec=>ee(_0x25dbe6[_0x232a4b(0x189)]['comments'][_0x2e08ec],_0x2e86d0,_0x43a525))['filter'](Boolean);return Object['values'](_0x25dbe6[_0x232a4b(0x189)][_0x232a4b(0x19e)])[_0x232a4b(0x172)](_0xc21005=>{const _0x94f2bc=_0x232a4b;this[_0x94f2bc(0x193)][_0x94f2bc(0x184)](_0xc21005);}),_0x1eb8c6;}[_0x317147(0x194)](_0x43ee2d){const _0x285f73=_0x317147;return{'id':_0x43ee2d['id'],'threadId':_0x43ee2d[_0x285f73(0x1af)],'ref':_0x43ee2d[_0x285f73(0x186)]};}};S=Q([b(0x0,_0x919d50(_0x4dcd29)),b(0x1,_0x919d50(_0x17961f)),b(0x2,_0x919d50(_0x450154))],S);var re=Object[_0x317147(0x1a9)],te=(_0x597568,_0x2a01a9,_0x136c85,_0x26b9ed)=>{for(var _0x4f9830=_0x26b9ed>0x1?void 0x0:_0x26b9ed?re(_0x2a01a9,_0x136c85):_0x2a01a9,_0x41cbd9=_0x597568['length']-0x1,_0x10740a;_0x41cbd9>=0x0;_0x41cbd9--)(_0x10740a=_0x597568[_0x41cbd9])&&(_0x4f9830=_0x10740a(_0x4f9830)||_0x4f9830);return _0x4f9830;},M=(_0x2204e3,_0x538494)=>(_0x4ea35a,_0xa31641)=>_0x538494(_0x4ea35a,_0xa31641,_0x2204e3);let f=class extends _0x2e4002{constructor(_0x21a714,_0x256d6b){const _0x58b080=_0x317147;super(),this['_threadCommentDataSourceService']=_0x21a714,this['_threadCommentDataSource']=_0x256d6b,this[_0x58b080(0x1a0)]();}['_initDataSource'](){const _0x3eea86=_0x317147;this['_threadCommentDataSourceService'][_0x3eea86(0x17e)]=this[_0x3eea86(0x1b5)],this['_threadCommentDataSourceService'][_0x3eea86(0x1b6)]=!0x1;}};f=te([M(0x0,_0x29d0b3),M(0x1,_0x919d50(S))],f);var se=Object['defineProperty'],oe=Object[_0x317147(0x1a9)],ne=(_0x23df4b,_0x531235,_0x5642e3)=>_0x531235 in _0x23df4b?se(_0x23df4b,_0x531235,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5642e3}):_0x23df4b[_0x531235]=_0x5642e3,ie=(_0x24b306,_0x367b9b,_0x27bcf2,_0x41f5a8)=>{const _0x2705e8=_0x317147;for(var _0x31dd84=_0x41f5a8>0x1?void 0x0:_0x41f5a8?oe(_0x367b9b,_0x27bcf2):_0x367b9b,_0x1398c0=_0x24b306[_0x2705e8(0x18e)]-0x1,_0x272d9f;_0x1398c0>=0x0;_0x1398c0--)(_0x272d9f=_0x24b306[_0x1398c0])&&(_0x31dd84=_0x272d9f(_0x31dd84)||_0x31dd84);return _0x31dd84;},N=(_0xad93b0,_0x374e81)=>(_0x3c4804,_0x318e19)=>_0x374e81(_0x3c4804,_0x318e19,_0xad93b0),$=(_0x709107,_0x48deea,_0x244c5f)=>ne(_0x709107,typeof _0x48deea!='symbol'?_0x48deea+'':_0x48deea,_0x244c5f);let g=class extends _0x4d1b0e{constructor(_0xcfc018=O,_0x168363,_0x2286e8){const _0x4e0800=_0x317147;super(),this['_config']=_0xcfc018,this[_0x4e0800(0x192)]=_0x168363,this[_0x4e0800(0x1ab)]=_0x2286e8;const {..._0x5ee5ec}=_0x2e9ae9({},O,this[_0x4e0800(0x1c4)]);this['_configService'][_0x4e0800(0x198)](z,_0x5ee5ec);}[_0x317147(0x1a4)](){const _0xef391f=_0x317147;[[S],[f],[_]][_0xef391f(0x172)](_0x1262f4=>{const _0x32e01b=_0xef391f;this[_0x32e01b(0x192)][_0x32e01b(0x187)](_0x1262f4);});}[_0x317147(0x175)](){const _0x11a297=_0x317147;this[_0x11a297(0x192)][_0x11a297(0x1ad)](f),this[_0x11a297(0x192)]['get'](_);}};$(g,_0x317147(0x1bc),W),$(g,'type',_0x3d559f['UNIVER_UNKNOWN']),g=ie([_0x23f7c9(_0x29578f,_0x3f195e,_0x5183ef),N(0x1,_0x919d50(_0x44cd81)),N(0x2,_0x3b264d)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x450650=_0x1924;(function(_0x38d6eb,_0x19fe4c){const _0x5de90c=_0x1924,_0x5b6db2=_0x38d6eb();while(!![]){try{const _0x328a8b=-parseInt(_0x5de90c(0x140))/0x1+parseInt(_0x5de90c(0x13d))/0x2+parseInt(_0x5de90c(0x115))/0x3+-parseInt(_0x5de90c(0x109))/0x4+-parseInt(_0x5de90c(0x108))/0x5*(parseInt(_0x5de90c(0x10f))/0x6)+parseInt(_0x5de90c(0x13e))/0x7+parseInt(_0x5de90c(0x12a))/0x8*(parseInt(_0x5de90c(0xff))/0x9);if(_0x328a8b===_0x19fe4c)break;else _0x5b6db2['push'](_0x5b6db2['shift']());}catch(_0x504658){_0x5b6db2['push'](_0x5b6db2['shift']());}}}(_0x1a8e,0xb5cb2));import{CommentService as _0x4899ac,CollaborationSessionService as _0x4b7890,UniverCollaborationClientPlugin as _0x46de07}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x41bba8}from'@univerjs-pro/license';import{dayjs as _0x37a29a,UserManagerService as _0x50853d,Inject as _0x4de773,Injector as _0x202eaa,Disposable as _0x4222cc,CustomRangeType as _0x569be7,UniverInstanceType as _0xb46a4b,DependentOn as _0x542ceb,IConfigService as _0x5c022a,Plugin as _0x533345,merge as _0x326730}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4e15a3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4cd4a3,IThreadCommentDataSourceService as _0x2c32f7}from'@univerjs/thread-comment';import{bufferTime as _0x11b7ff}from'rxjs';import{HTTPService as _0x328679}from'@univerjs/network';const W=_0x450650(0x156);var I=(_0x44c82c=>(_0x44c82c[_0x44c82c[_0x450650(0x11b)]=0x0]='OpenOrReOpen',_0x44c82c[_0x44c82c['Solved']=0x1]='Solved',_0x44c82c[_0x44c82c[_0x450650(0x14b)]=-0x1]=_0x450650(0x14b),_0x44c82c))(I||{}),v=(_0x590116=>(_0x590116[_0x590116['Unknown']=0x0]=_0x450650(0x152),_0x590116[_0x590116[_0x450650(0x107)]=0x1]=_0x450650(0x107),_0x590116[_0x590116[_0x450650(0x138)]=0x2]='Reply',_0x590116[_0x590116[_0x450650(0x126)]=0x3]='Edit',_0x590116[_0x590116[_0x450650(0x12c)]=0x4]=_0x450650(0x12c),_0x590116[_0x590116[_0x450650(0x134)]=0x5]=_0x450650(0x134),_0x590116[_0x590116[_0x450650(0x14b)]=-0x1]='UNRECOGNIZED',_0x590116))(v||{});const y=_0x37f553=>_0x37a29a(new Date(+_0x37f553))[_0x450650(0x154)](_0x450650(0x12d)),B=async(_0x2b0a42,_0x105b1c)=>{const _0x343fb0=_0x450650,_0x3f89cf=_0x2b0a42[_0x343fb0(0x15d)](_0x50853d),_0x56af5f=_0x2b0a42['get'](_0x328679);_0x105b1c[_0x343fb0(0x10d)](_0x5e2cff=>{const _0x1af291=_0x343fb0;_0x3f89cf[_0x1af291(0x10b)](_0x5e2cff)&&_0x105b1c['delete'](_0x5e2cff);}),_0x105b1c[_0x343fb0(0x11d)]&&(await _0x56af5f['get'](_0x343fb0(0x147),{'params':{'userIDs':[..._0x105b1c]}}))['body'][_0x343fb0(0x159)][_0x343fb0(0x10d)](_0x2c2f86=>{const _0x412c84=_0x343fb0;_0x2c2f86&&_0x3f89cf[_0x412c84(0x114)](_0x2c2f86);});};var K=Object[_0x450650(0x12f)],V=(_0x33efb4,_0x2cf513,_0x332bf3,_0x3eef2a)=>{const _0x18a9b4=_0x450650;for(var _0x29a0fa=_0x3eef2a>0x1?void 0x0:_0x3eef2a?K(_0x2cf513,_0x332bf3):_0x2cf513,_0x3a6492=_0x33efb4[_0x18a9b4(0x130)]-0x1,_0xf52b28;_0x3a6492>=0x0;_0x3a6492--)(_0xf52b28=_0x33efb4[_0x3a6492])&&(_0x29a0fa=_0xf52b28(_0x29a0fa)||_0x29a0fa);return _0x29a0fa;},p=(_0x521a2c,_0x36d664)=>(_0x1a7769,_0x2f2d6f)=>_0x36d664(_0x1a7769,_0x2f2d6f,_0x521a2c);let _=class extends _0x4222cc{constructor(_0x324abf,_0x401363,_0x1cdd56,_0x1bf407){const _0x232274=_0x450650;super(),this[_0x232274(0x129)]=_0x324abf,this[_0x232274(0x112)]=_0x401363,this['_userService']=_0x1cdd56,this[_0x232274(0x145)]=_0x1bf407,this[_0x232274(0x10e)](),this[_0x232274(0x13c)]();}[_0x450650(0x13c)](){const _0x117061=_0x450650;this[_0x117061(0x15b)](this[_0x117061(0x112)]['commentUpdate$'][_0x117061(0x142)](_0x11b7ff(0x10))[_0x117061(0x150)](_0x52703e=>{const _0xd28a4f=_0x117061,_0x3e0999=new Set();_0x52703e[_0xd28a4f(0x10d)](_0x384e79=>{const _0x473079=_0xd28a4f;switch(_0x384e79[_0x473079(0x12b)]){case _0x473079(0x13b):{const _0x45583c=_0x384e79['payload']['personId'];_0x3e0999['add'](_0x45583c);break;}}}),B(this['_injector'],_0x3e0999);}));}[_0x450650(0x10e)](){const _0x2c900d=_0x450650;this[_0x2c900d(0x15b)](this[_0x2c900d(0x129)][_0x2c900d(0x118)][_0x2c900d(0x150)](async _0x2d4ab2=>{const _0x3f6f2a=_0x2c900d;var _0x5433ce,_0x39f5d9,_0x34d0e3,_0xa26bd8;const _0x237772=(_0x5433ce=this[_0x3f6f2a(0x112)][_0x3f6f2a(0x11e)](_0x2d4ab2[_0x3f6f2a(0x146)])[_0x3f6f2a(0x111)](_0x2cf1ad=>_0x2cf1ad[_0x3f6f2a(0x102)]===_0x2d4ab2[_0x3f6f2a(0x102)]))==null?void 0x0:_0x5433ce[_0x3f6f2a(0x132)];if(!_0x237772)return;const {unitId:_0x2b0aa3,subUnitId:_0x1e8ca8}=_0x237772;switch(_0x2d4ab2[_0x3f6f2a(0x14e)]&&this['_userService'][_0x3f6f2a(0x114)](_0x2d4ab2[_0x3f6f2a(0x14e)]),_0x2d4ab2[_0x3f6f2a(0x12b)]){case v[_0x3f6f2a(0x107)]:break;case v['Reply']:{this['_threadCommentModel'][_0x3f6f2a(0x131)](_0x2b0aa3,_0x1e8ca8,{'unitId':_0x2b0aa3,'subUnitId':_0x1e8ca8,'ref':'','id':_0x2d4ab2[_0x3f6f2a(0x121)],'dT':y(+_0x2d4ab2['createTimestamp']),'threadId':_0x2d4ab2[_0x3f6f2a(0x102)],'personId':(_0x34d0e3=(_0x39f5d9=_0x2d4ab2[_0x3f6f2a(0x14e)])==null?void 0x0:_0x39f5d9[_0x3f6f2a(0x15e)])!=null?_0x34d0e3:_0x2d4ab2[_0x3f6f2a(0x155)],'text':JSON[_0x3f6f2a(0x162)](_0x2d4ab2['content']),'parentId':_0x237772['id']});break;}case v['Delete']:{const _0x38ab8a=this[_0x3f6f2a(0x112)][_0x3f6f2a(0x135)](_0x2b0aa3,_0x1e8ca8,_0x2d4ab2[_0x3f6f2a(0x121)]);_0x38ab8a&&_0x38ab8a['parentId']&&this[_0x3f6f2a(0x112)][_0x3f6f2a(0x128)](_0x2b0aa3,_0x1e8ca8,_0x2d4ab2[_0x3f6f2a(0x121)]);break;}case v[_0x3f6f2a(0x126)]:{this['_threadCommentModel']['updateComment'](_0x2b0aa3,_0x1e8ca8,{'commentId':_0x2d4ab2[_0x3f6f2a(0x121)],'text':JSON[_0x3f6f2a(0x162)](_0x2d4ab2[_0x3f6f2a(0x10c)])});break;}case v[_0x3f6f2a(0x134)]:{const _0x3c4d5b=(_0xa26bd8=this[_0x3f6f2a(0x112)]['getUnit'](_0x2d4ab2[_0x3f6f2a(0x146)])[_0x3f6f2a(0x111)](_0x3d6d1c=>_0x3d6d1c[_0x3f6f2a(0x102)]===_0x2d4ab2[_0x3f6f2a(0x102)]))==null?void 0x0:_0xa26bd8['root'];_0x3c4d5b&&this[_0x3f6f2a(0x112)]['resolveComment'](_0x2b0aa3,_0x1e8ca8,_0x3c4d5b['id'],_0x2d4ab2[_0x3f6f2a(0x157)]===I[_0x3f6f2a(0x110)]);break;}}}));}};_=V([p(0x0,_0x4de773(_0x4899ac)),p(0x1,_0x4de773(_0x4cd4a3)),p(0x2,_0x4de773(_0x50853d)),p(0x3,_0x4de773(_0x202eaa))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x450650(0x12f)],Q=(_0x4ddc77,_0x6098fb,_0x108dc2,_0x172c81)=>{const _0x133127=_0x450650;for(var _0x28a051=_0x172c81>0x1?void 0x0:_0x172c81?k(_0x6098fb,_0x108dc2):_0x6098fb,_0x1a2f8c=_0x4ddc77[_0x133127(0x130)]-0x1,_0x1b7ed2;_0x1a2f8c>=0x0;_0x1a2f8c--)(_0x1b7ed2=_0x4ddc77[_0x1a2f8c])&&(_0x28a051=_0x1b7ed2(_0x28a051)||_0x28a051);return _0x28a051;},b=(_0x2ee30c,_0x5c5d1c)=>(_0x3ad1d1,_0x1e6fc5)=>_0x5c5d1c(_0x3ad1d1,_0x1e6fc5,_0x2ee30c);function X(_0x4bf659,_0x311a27){const _0xc0a75b=_0x450650,_0x269da6=_0x4bf659['replies'][0x0];return{..._0x311a27,'id':_0x269da6[_0xc0a75b(0x121)],'resolved':_0x4bf659[_0xc0a75b(0x157)]===0x1,'dT':y(_0x269da6[_0xc0a75b(0x14d)]),'personId':_0x269da6[_0xc0a75b(0x155)],'threadId':_0x269da6[_0xc0a75b(0x102)]};}function ee(_0x2cba06,_0x5bc8bb,_0x2e0927){const _0x2a95ef=_0x450650;var _0x59c3fd,_0x3899ae;if(((_0x3899ae=(_0x59c3fd=_0x2cba06==null?void 0x0:_0x2cba06[_0x2a95ef(0x14c)])==null?void 0x0:_0x59c3fd['length'])!=null?_0x3899ae:0x0)>0x0){const _0x27e5d6=(_0x5a56c1,_0x51317f)=>({'id':_0x5a56c1[_0x2a95ef(0x121)],'threadId':_0x5a56c1[_0x2a95ef(0x102)],'dT':y(_0x5a56c1[_0x2a95ef(0x14d)]),'personId':_0x5a56c1[_0x2a95ef(0x155)],'resolved':_0x2cba06[_0x2a95ef(0x157)]===I['Solved'],'unitId':_0x5bc8bb,'subUnitId':_0x2e0927,'text':JSON[_0x2a95ef(0x162)](_0x5a56c1[_0x2a95ef(0x10c)]),'parentId':_0x51317f}),_0x5377a8=_0x27e5d6(_0x2cba06[_0x2a95ef(0x14c)][0x0]);return{..._0x5377a8,'children':_0x2cba06[_0x2a95ef(0x14c)][_0x2a95ef(0x143)](0x1)['map'](_0x5c3cd6=>_0x27e5d6(_0x5c3cd6,_0x5377a8['id']))};}return null;}function _0x1a8e(){const _0x3fd8dc=['code','Reply','comments','getMemberID','add','_initUserSync','1747996QwjSau','3650745YxwvFK','_userService','858119KAoNwk','dataSource','pipe','slice','filter','_injector','unitId','/universer-api/user/list','body','_threadCommentDataSourceService','_config','UNRECOGNIZED','replies','createTimestamp','user','_threadCommentDataSource','subscribe','setConfig','Unknown','error','format','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','COMMENT','users','syncUpdateMutationToColla','disposeWithMe','saveCommentToSnapshot','get','userID','_httpService','defineProperty','/reply','parse','5422104fqQprz','post','stringify','threadId','_sessionService','listComments','comment','/delete','Add','85epRCQh','2813356FJhUba','onReady','getUser','content','forEach','_init','295494AmpJjn','Solved','find','_threadCommentModel','/universer-api/comment/unit/','addUser','1628616yHAmUA','_configService','symbol','commentUpdate$','/list','values','OpenOrReOpen','/solved','size','getUnit','rangeId','ref','replyId','_initDataSource','customRanges','rangeType','resolveComment','Edit','requireSession','deleteComment','_commentService','16wXlDWw','type','Delete','YYYY/MM/DD\x20HH:mm','resolved','getOwnPropertyDescriptor','length','addComment','root','map','Solve','getComment','onStarting'];_0x1a8e=function(){return _0x3fd8dc;};return _0x1a8e();}let S=class{constructor(_0x238068,_0x177cfc,_0x148a5e){const _0x47d2bc=_0x450650;this['_httpService']=_0x238068,this['_userService']=_0x177cfc,this[_0x47d2bc(0x103)]=_0x148a5e;}async[_0x450650(0x131)](_0x3ba58f){const _0x574128=_0x450650;var _0x5aca7f,_0x7f726e;const {parentId:_0x4b6b8f,unitId:_0x4283ce,text:_0x48d656,threadId:_0x40c46c}=_0x3ba58f,_0x4cd983=(_0x7f726e=(_0x5aca7f=_0x48d656[_0x574128(0x123)])==null?void 0x0:_0x5aca7f[_0x574128(0x144)](_0x43d1b2=>_0x43d1b2[_0x574128(0x124)]===_0x569be7[_0x574128(0x158)])[_0x574128(0x133)](_0x20c471=>_0x20c471[_0x574128(0x11f)]))!=null?_0x7f726e:[],_0x51d695=JSON[_0x574128(0x101)](_0x48d656),_0x396279=(await this[_0x574128(0x103)][_0x574128(0x127)](_0x4283ce))['getMemberID']();if(_0x4b6b8f){const _0x5e4e5d={'memberId':_0x396279,'unitId':_0x4283ce,'content':_0x51d695,'mention':_0x4cd983,'threadId':_0x40c46c},_0x2d4faf=(await this['_httpService'][_0x574128(0x100)]('/universer-api/comment/unit/'+_0x4283ce+_0x574128(0x161),{'body':_0x5e4e5d}))[_0x574128(0x148)]['reply'];return{..._0x3ba58f,'id':_0x2d4faf['replyId'],'dT':_0x37a29a(+_0x2d4faf[_0x574128(0x14d)])['format'](_0x574128(0x12d)),'personId':_0x2d4faf['userId']};}else{const _0x581101={'memberId':_0x396279,'unitId':_0x4283ce,'content':_0x51d695,'mention':_0x4cd983},_0x184f58=await this[_0x574128(0x15f)][_0x574128(0x100)](_0x574128(0x113)+_0x4283ce+'/add',{'body':_0x581101});return X(_0x184f58['body'][_0x574128(0x105)],_0x3ba58f);}}async['updateComment'](_0x459dbb){const _0x276da0=_0x450650;var _0x573eac,_0x3193d7;const {text:_0x116c6c,unitId:_0x1e4eeb}=_0x459dbb,_0x3d4331=(_0x3193d7=(_0x573eac=_0x116c6c[_0x276da0(0x123)])==null?void 0x0:_0x573eac[_0x276da0(0x144)](_0x13cea7=>_0x13cea7['rangeType']===_0x569be7['COMMENT'])[_0x276da0(0x133)](_0x46874e=>_0x46874e[_0x276da0(0x11f)]))!=null?_0x3193d7:[],_0x4ee99e=JSON[_0x276da0(0x101)](_0x116c6c),_0x3b0949=_0x459dbb[_0x276da0(0x102)],_0x276211=_0x459dbb['id'],_0x28cd66={'memberId':(await this[_0x276da0(0x103)][_0x276da0(0x127)](_0x1e4eeb))[_0x276da0(0x13a)](),'unitId':_0x1e4eeb,'threadId':_0x3b0949,'mention':_0x3d4331,'content':_0x4ee99e,'replyId':_0x276211},_0x307bb4=await this[_0x276da0(0x15f)][_0x276da0(0x100)](_0x276da0(0x113)+_0x1e4eeb+'/edit',{'body':_0x28cd66});return!_0x307bb4[_0x276da0(0x148)][_0x276da0(0x153)]||_0x307bb4[_0x276da0(0x148)][_0x276da0(0x153)][_0x276da0(0x137)]===0x1;}async[_0x450650(0x125)](_0x5dc3ce){const _0xea7d8=_0x450650,{unitId:_0x27781b}=_0x5dc3ce,_0x57664f=_0x5dc3ce[_0xea7d8(0x102)],_0x419d92={'memberId':this[_0xea7d8(0x13f)]['getCurrentUser']()[_0xea7d8(0x15e)],'unitId':_0x27781b,'threadId':_0x57664f,'solved':_0x5dc3ce[_0xea7d8(0x12e)]?I[_0xea7d8(0x110)]:I[_0xea7d8(0x11b)]},_0x2798d7=await this[_0xea7d8(0x15f)]['post']('/universer-api/comment/unit/'+_0x27781b+_0xea7d8(0x11c),{'body':_0x419d92});return!_0x2798d7[_0xea7d8(0x148)][_0xea7d8(0x153)]||_0x2798d7['body']['error'][_0xea7d8(0x137)]===0x1;}async['deleteComment'](_0x2597bf,_0x25a58f,_0x5db11d,_0x258215){const _0x347b35=_0x450650,_0x4b0ca0={'memberId':(await this[_0x347b35(0x103)]['requireSession'](_0x2597bf))[_0x347b35(0x13a)](),'threadId':_0x5db11d,'replyId':_0x258215,'unitId':_0x2597bf},_0x4e0269=await this[_0x347b35(0x15f)]['post'](_0x347b35(0x113)+_0x2597bf+_0x347b35(0x106),{'body':_0x4b0ca0});return!_0x4e0269[_0x347b35(0x148)][_0x347b35(0x153)]||_0x4e0269['body'][_0x347b35(0x153)][_0x347b35(0x137)]===0x1;}async[_0x450650(0x104)](_0x2f338d,_0x352087,_0x44fe4a){const _0x2c3b8b=_0x450650,_0x500f19={'unitId':_0x2f338d,'threadId':_0x44fe4a},_0xdf1f69=await this['_httpService'][_0x2c3b8b(0x100)](_0x2c3b8b(0x113)+_0x2f338d+_0x2c3b8b(0x119),{'body':_0x500f19}),_0x5eaadf=_0x44fe4a[_0x2c3b8b(0x133)](_0x20845b=>ee(_0xdf1f69[_0x2c3b8b(0x148)][_0x2c3b8b(0x139)][_0x20845b],_0x2f338d,_0x352087))[_0x2c3b8b(0x144)](Boolean);return Object[_0x2c3b8b(0x11a)](_0xdf1f69[_0x2c3b8b(0x148)][_0x2c3b8b(0x159)])[_0x2c3b8b(0x10d)](_0x15c1ef=>{const _0x54250a=_0x2c3b8b;this[_0x54250a(0x13f)][_0x54250a(0x114)](_0x15c1ef);}),_0x5eaadf;}[_0x450650(0x15c)](_0x24330d){const _0x2d459d=_0x450650;return{'id':_0x24330d['id'],'threadId':_0x24330d[_0x2d459d(0x102)],'ref':_0x24330d[_0x2d459d(0x120)]};}};S=Q([b(0x0,_0x4de773(_0x328679)),b(0x1,_0x4de773(_0x50853d)),b(0x2,_0x4de773(_0x4b7890))],S);var re=Object[_0x450650(0x12f)],te=(_0x57c3ab,_0x5f06a2,_0x524422,_0x10cf71)=>{const _0x13a432=_0x450650;for(var _0xb5c623=_0x10cf71>0x1?void 0x0:_0x10cf71?re(_0x5f06a2,_0x524422):_0x5f06a2,_0x2af6fe=_0x57c3ab[_0x13a432(0x130)]-0x1,_0x7dee2e;_0x2af6fe>=0x0;_0x2af6fe--)(_0x7dee2e=_0x57c3ab[_0x2af6fe])&&(_0xb5c623=_0x7dee2e(_0xb5c623)||_0xb5c623);return _0xb5c623;},M=(_0x3d7186,_0x2a9bc4)=>(_0x3f3dbb,_0x4ea6fc)=>_0x2a9bc4(_0x3f3dbb,_0x4ea6fc,_0x3d7186);let f=class extends _0x4222cc{constructor(_0x6b2eb6,_0x580aae){const _0x2fb173=_0x450650;super(),this['_threadCommentDataSourceService']=_0x6b2eb6,this[_0x2fb173(0x14f)]=_0x580aae,this[_0x2fb173(0x122)]();}[_0x450650(0x122)](){const _0x2c6eeb=_0x450650;this[_0x2c6eeb(0x149)][_0x2c6eeb(0x141)]=this[_0x2c6eeb(0x14f)],this['_threadCommentDataSourceService'][_0x2c6eeb(0x15a)]=!0x1;}};f=te([M(0x0,_0x2c32f7),M(0x1,_0x4de773(S))],f);function _0x1924(_0xc3c12b,_0x218da0){const _0x1a8ed4=_0x1a8e();return _0x1924=function(_0x1924ea,_0x1a3cec){_0x1924ea=_0x1924ea-0xff;let _0x238a45=_0x1a8ed4[_0x1924ea];return _0x238a45;},_0x1924(_0xc3c12b,_0x218da0);}var se=Object[_0x450650(0x160)],oe=Object[_0x450650(0x12f)],ne=(_0x1be323,_0xd3ead9,_0x194ad1)=>_0xd3ead9 in _0x1be323?se(_0x1be323,_0xd3ead9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x194ad1}):_0x1be323[_0xd3ead9]=_0x194ad1,ie=(_0x1e250a,_0x16ac86,_0x2006c7,_0x4e1784)=>{const _0x219979=_0x450650;for(var _0x3471cb=_0x4e1784>0x1?void 0x0:_0x4e1784?oe(_0x16ac86,_0x2006c7):_0x16ac86,_0x4956a5=_0x1e250a[_0x219979(0x130)]-0x1,_0x38ee77;_0x4956a5>=0x0;_0x4956a5--)(_0x38ee77=_0x1e250a[_0x4956a5])&&(_0x3471cb=_0x38ee77(_0x3471cb)||_0x3471cb);return _0x3471cb;},N=(_0x462216,_0xa44542)=>(_0x1fc42f,_0x2da45a)=>_0xa44542(_0x1fc42f,_0x2da45a,_0x462216),$=(_0x345592,_0x232bcc,_0xfb10dc)=>ne(_0x345592,typeof _0x232bcc!=_0x450650(0x117)?_0x232bcc+'':_0x232bcc,_0xfb10dc);let g=class extends _0x533345{constructor(_0x23c501=O,_0x394f2e,_0x5cff35){const _0x93059f=_0x450650;super(),this[_0x93059f(0x14a)]=_0x23c501,this[_0x93059f(0x145)]=_0x394f2e,this[_0x93059f(0x116)]=_0x5cff35;const {..._0x5aa076}=_0x326730({},O,this['_config']);this[_0x93059f(0x116)][_0x93059f(0x151)](z,_0x5aa076);}[_0x450650(0x136)](){const _0x50800c=_0x450650;[[S],[f],[_]][_0x50800c(0x10d)](_0x3d78b9=>{const _0x3c158c=_0x50800c;this[_0x3c158c(0x145)][_0x3c158c(0x13b)](_0x3d78b9);});}[_0x450650(0x10a)](){const _0x140853=_0x450650;this[_0x140853(0x145)][_0x140853(0x15d)](f),this[_0x140853(0x145)]['get'](_);}};$(g,'pluginName',W),$(g,_0x450650(0x12b),_0xb46a4b['UNIVER_UNKNOWN']),g=ie([_0x542ceb(_0x4e15a3,_0x46de07,_0x41bba8),N(0x1,_0x4de773(_0x202eaa)),N(0x2,_0x5c022a)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x12f2(_0x4bfb9f,_0x4c7a64){const _0x5b7a08=_0x5b7a();return _0x12f2=function(_0x12f2a8,_0x3a1418){_0x12f2a8=_0x12f2a8-0x90;let _0x6bb27=_0x5b7a08[_0x12f2a8];return _0x6bb27;},_0x12f2(_0x4bfb9f,_0x4c7a64);}(function(_0x2fb853,_0x3337b1){const _0x46c682=_0x12f2,_0x4e97b4=_0x2fb853();while(!![]){try{const _0x20b68f=-parseInt(_0x46c682(0x106))/0x1*(parseInt(_0x46c682(0xbc))/0x2)+-parseInt(_0x46c682(0xd2))/0x3*(-parseInt(_0x46c682(0xcb))/0x4)+-parseInt(_0x46c682(0xe3))/0x5*(-parseInt(_0x46c682(0xfd))/0x6)+parseInt(_0x46c682(0x11b))/0x7*(parseInt(_0x46c682(0xf6))/0x8)+-parseInt(_0x46c682(0xc0))/0x9*(parseInt(_0x46c682(0xb0))/0xa)+parseInt(_0x46c682(0xa6))/0xb*(parseInt(_0x46c682(0x11c))/0xc)+-parseInt(_0x46c682(0xd6))/0xd*(parseInt(_0x46c682(0x105))/0xe);if(_0x20b68f===_0x3337b1)break;else _0x4e97b4['push'](_0x4e97b4['shift']());}catch(_0x5d2be1){_0x4e97b4['push'](_0x4e97b4['shift']());}}}(_0x5b7a,0x45a0f),function(_0x2f653e,_0xac95a6){const _0x1764db=_0x12f2;typeof exports==_0x1764db(0xc2)&&typeof module<'u'?_0xac95a6(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==_0x1764db(0xb5)&&define['amd']?define([_0x1764db(0xa7),_0x1764db(0x9b),'@univerjs-pro/license','@univerjs/core',_0x1764db(0xd8),_0x1764db(0x118),'rxjs',_0x1764db(0xbf)],_0xac95a6):(_0x2f653e=typeof globalThis<'u'?globalThis:_0x2f653e||self,_0xac95a6(_0x2f653e['UniverProThreadCommentDatasource']={},_0x2f653e[_0x1764db(0xc1)],_0x2f653e[_0x1764db(0xf9)],_0x2f653e[_0x1764db(0xed)],_0x2f653e['UniverThreadCommentUi'],_0x2f653e[_0x1764db(0xf3)],_0x2f653e[_0x1764db(0xea)],_0x2f653e[_0x1764db(0x114)]));}(this,function(_0x4566de,_0x233784,_0x270dd1,_0x4765b0,_0x42872c,_0xbb184,_0x289720,_0x480fe9){'use strict';const _0x30a803=_0x12f2;const _0x56caf9=_0x30a803(0xfc);var _0x321aff=(_0x594434=>(_0x594434[_0x594434[_0x30a803(0x97)]=0x0]=_0x30a803(0x97),_0x594434[_0x594434['Solved']=0x1]=_0x30a803(0xd7),_0x594434[_0x594434[_0x30a803(0x92)]=-0x1]=_0x30a803(0x92),_0x594434))(_0x321aff||{}),_0x7c3b5a=(_0x4139c8=>(_0x4139c8[_0x4139c8['Unknown']=0x0]=_0x30a803(0xcd),_0x4139c8[_0x4139c8['Add']=0x1]=_0x30a803(0x111),_0x4139c8[_0x4139c8[_0x30a803(0xc3)]=0x2]=_0x30a803(0xc3),_0x4139c8[_0x4139c8[_0x30a803(0xd4)]=0x3]=_0x30a803(0xd4),_0x4139c8[_0x4139c8[_0x30a803(0xcc)]=0x4]=_0x30a803(0xcc),_0x4139c8[_0x4139c8['Solve']=0x5]='Solve',_0x4139c8[_0x4139c8[_0x30a803(0x92)]=-0x1]=_0x30a803(0x92),_0x4139c8))(_0x7c3b5a||{});const _0x2d5180=_0x5cf482=>_0x4765b0[_0x30a803(0x94)](new Date(+_0x5cf482))[_0x30a803(0xbe)](_0x30a803(0xb6)),_0x32bcc5=async(_0x35cb82,_0x52d879)=>{const _0x2fdbce=_0x30a803,_0x4bf809=_0x35cb82[_0x2fdbce(0xb2)](_0x4765b0['UserManagerService']),_0x127eaa=_0x35cb82['get'](_0x480fe9['HTTPService']);_0x52d879[_0x2fdbce(0xda)](_0x433caa=>{const _0x42a91f=_0x2fdbce;_0x4bf809[_0x42a91f(0x110)](_0x433caa)&&_0x52d879[_0x42a91f(0xbb)](_0x433caa);}),_0x52d879[_0x2fdbce(0xdc)]&&(await _0x127eaa[_0x2fdbce(0xb2)](_0x2fdbce(0x10d),{'params':{'userIDs':[..._0x52d879]}}))['body']['users'][_0x2fdbce(0xda)](_0x125665=>{const _0x3fd368=_0x2fdbce;_0x125665&&_0x4bf809[_0x3fd368(0xdf)](_0x125665);});};var _0xd35e89=Object[_0x30a803(0xb8)],_0x2ec6a3=(_0x45e65a,_0x50a347,_0x5f0442,_0x54fef5)=>{const _0x20ef7c=_0x30a803;for(var _0xab5971=_0x54fef5>0x1?void 0x0:_0x54fef5?_0xd35e89(_0x50a347,_0x5f0442):_0x50a347,_0x1c5cec=_0x45e65a[_0x20ef7c(0xb7)]-0x1,_0x248b2e;_0x1c5cec>=0x0;_0x1c5cec--)(_0x248b2e=_0x45e65a[_0x1c5cec])&&(_0xab5971=_0x248b2e(_0xab5971)||_0xab5971);return _0xab5971;},_0x324cd5=(_0x25b6ff,_0x477dcf)=>(_0x34cb1c,_0x31e485)=>_0x477dcf(_0x34cb1c,_0x31e485,_0x25b6ff);let _0x1b2ec9=class extends _0x4765b0[_0x30a803(0xbd)]{constructor(_0x16bbe2,_0x2939ec,_0x4ea2f4,_0x2e559c){const _0x20a27c=_0x30a803;super(),this[_0x20a27c(0xf2)]=_0x16bbe2,this['_threadCommentModel']=_0x2939ec,this[_0x20a27c(0xad)]=_0x4ea2f4,this[_0x20a27c(0xc7)]=_0x2e559c,this[_0x20a27c(0xe7)](),this[_0x20a27c(0xce)]();}['_initUserSync'](){const _0x305b18=_0x30a803;this[_0x305b18(0xf8)](this[_0x305b18(0x117)]['commentUpdate$'][_0x305b18(0x90)](_0x289720[_0x305b18(0x10b)](0x10))[_0x305b18(0xca)](_0x1890e0=>{const _0x37949e=_0x305b18,_0x5d69e0=new Set();_0x1890e0[_0x37949e(0xda)](_0x25cd1d=>{const _0x1d3a99=_0x37949e;switch(_0x25cd1d[_0x1d3a99(0x93)]){case _0x1d3a99(0xeb):{const _0x586bf4=_0x25cd1d[_0x1d3a99(0x96)]['personId'];_0x5d69e0[_0x1d3a99(0xeb)](_0x586bf4);break;}}}),_0x32bcc5(this[_0x37949e(0xc7)],_0x5d69e0);}));}[_0x30a803(0xe7)](){const _0x4cf412=_0x30a803;this[_0x4cf412(0xf8)](this[_0x4cf412(0xf2)]['commentUpdate$'][_0x4cf412(0xca)](async _0x8f397=>{const _0x109d0f=_0x4cf412;var _0x422ce5,_0x552067,_0x21139c,_0x207966;const _0x5d9e14=(_0x422ce5=this[_0x109d0f(0x117)][_0x109d0f(0xf5)](_0x8f397['unitId'])[_0x109d0f(0x99)](_0x4a4706=>_0x4a4706[_0x109d0f(0x10c)]===_0x8f397[_0x109d0f(0x10c)]))==null?void 0x0:_0x422ce5[_0x109d0f(0xac)];if(!_0x5d9e14)return;const {unitId:_0x15ce1b,subUnitId:_0x54b887}=_0x5d9e14;switch(_0x8f397['user']&&this[_0x109d0f(0xad)][_0x109d0f(0xdf)](_0x8f397['user']),_0x8f397['type']){case _0x7c3b5a[_0x109d0f(0x111)]:break;case _0x7c3b5a[_0x109d0f(0xc3)]:{this[_0x109d0f(0x117)][_0x109d0f(0xb1)](_0x15ce1b,_0x54b887,{'unitId':_0x15ce1b,'subUnitId':_0x54b887,'ref':'','id':_0x8f397[_0x109d0f(0x95)],'dT':_0x2d5180(+_0x8f397[_0x109d0f(0xf4)]),'threadId':_0x8f397['threadId'],'personId':(_0x21139c=(_0x552067=_0x8f397[_0x109d0f(0x113)])==null?void 0x0:_0x552067['userID'])!=null?_0x21139c:_0x8f397['userId'],'text':JSON[_0x109d0f(0x11e)](_0x8f397[_0x109d0f(0xcf)]),'parentId':_0x5d9e14['id']});break;}case _0x7c3b5a[_0x109d0f(0xcc)]:{const _0x1e58f0=this[_0x109d0f(0x117)][_0x109d0f(0x115)](_0x15ce1b,_0x54b887,_0x8f397[_0x109d0f(0x95)]);_0x1e58f0&&_0x1e58f0[_0x109d0f(0xec)]&&this[_0x109d0f(0x117)][_0x109d0f(0xfa)](_0x15ce1b,_0x54b887,_0x8f397[_0x109d0f(0x95)]);break;}case _0x7c3b5a[_0x109d0f(0xd4)]:{this[_0x109d0f(0x117)]['updateComment'](_0x15ce1b,_0x54b887,{'commentId':_0x8f397[_0x109d0f(0x95)],'text':JSON[_0x109d0f(0x11e)](_0x8f397['content'])});break;}case _0x7c3b5a[_0x109d0f(0xe8)]:{const _0x3bf284=(_0x207966=this[_0x109d0f(0x117)][_0x109d0f(0xf5)](_0x8f397[_0x109d0f(0xa9)])['find'](_0x498f2c=>_0x498f2c[_0x109d0f(0x10c)]===_0x8f397[_0x109d0f(0x10c)]))==null?void 0x0:_0x207966[_0x109d0f(0xac)];_0x3bf284&&this[_0x109d0f(0x117)]['resolveComment'](_0x15ce1b,_0x54b887,_0x3bf284['id'],_0x8f397[_0x109d0f(0xdd)]===_0x321aff[_0x109d0f(0xd7)]);break;}}}));}};_0x1b2ec9=_0x2ec6a3([_0x324cd5(0x0,_0x4765b0['Inject'](_0x233784[_0x30a803(0x10e)])),_0x324cd5(0x1,_0x4765b0['Inject'](_0xbb184['ThreadCommentModel'])),_0x324cd5(0x2,_0x4765b0[_0x30a803(0xd1)](_0x4765b0[_0x30a803(0xde)])),_0x324cd5(0x3,_0x4765b0[_0x30a803(0xd1)](_0x4765b0[_0x30a803(0xb3)]))],_0x1b2ec9);const _0x57ce81=_0x30a803(0x108),_0x1a7ef5={};var _0x171eb1=Object[_0x30a803(0xb8)],_0x250f4e=(_0x572534,_0xe67539,_0x583d74,_0x4f69a1)=>{const _0x4f3c29=_0x30a803;for(var _0x462dee=_0x4f69a1>0x1?void 0x0:_0x4f69a1?_0x171eb1(_0xe67539,_0x583d74):_0xe67539,_0x399c2e=_0x572534[_0x4f3c29(0xb7)]-0x1,_0x95c48d;_0x399c2e>=0x0;_0x399c2e--)(_0x95c48d=_0x572534[_0x399c2e])&&(_0x462dee=_0x95c48d(_0x462dee)||_0x462dee);return _0x462dee;},_0x33555d=(_0x75ffcc,_0x391073)=>(_0x5c2bac,_0x20667b)=>_0x391073(_0x5c2bac,_0x20667b,_0x75ffcc);function _0x3bb341(_0x55b021,_0x3ab72a){const _0x2c6005=_0x30a803,_0x2f31ec=_0x55b021[_0x2c6005(0xa4)][0x0];return{..._0x3ab72a,'id':_0x2f31ec[_0x2c6005(0x95)],'resolved':_0x55b021[_0x2c6005(0xdd)]===0x1,'dT':_0x2d5180(_0x2f31ec[_0x2c6005(0xf4)]),'personId':_0x2f31ec[_0x2c6005(0x112)],'threadId':_0x2f31ec[_0x2c6005(0x10c)]};}function _0x23d6f3(_0x5ea1b9,_0x4d10b3,_0x520147){const _0x267eb5=_0x30a803;var _0x2af0ae,_0x27b670;if(((_0x27b670=(_0x2af0ae=_0x5ea1b9==null?void 0x0:_0x5ea1b9[_0x267eb5(0xa4)])==null?void 0x0:_0x2af0ae[_0x267eb5(0xb7)])!=null?_0x27b670:0x0)>0x0){const _0x3177af=(_0x421323,_0x3421f7)=>({'id':_0x421323['replyId'],'threadId':_0x421323['threadId'],'dT':_0x2d5180(_0x421323['createTimestamp']),'personId':_0x421323[_0x267eb5(0x112)],'resolved':_0x5ea1b9[_0x267eb5(0xdd)]===_0x321aff[_0x267eb5(0xd7)],'unitId':_0x4d10b3,'subUnitId':_0x520147,'text':JSON[_0x267eb5(0x11e)](_0x421323[_0x267eb5(0xcf)]),'parentId':_0x3421f7}),_0xe937b2=_0x3177af(_0x5ea1b9[_0x267eb5(0xa4)][0x0]);return{..._0xe937b2,'children':_0x5ea1b9[_0x267eb5(0xa4)][_0x267eb5(0xe5)](0x1)['map'](_0x5e562f=>_0x3177af(_0x5e562f,_0xe937b2['id']))};}return null;}let _0xe10dd0=class{constructor(_0x4af68d,_0x29d45f,_0x15df43){const _0x487658=_0x30a803;this[_0x487658(0xa0)]=_0x4af68d,this[_0x487658(0xad)]=_0x29d45f,this[_0x487658(0x10f)]=_0x15df43;}async[_0x30a803(0xb1)](_0x1c2cc7){const _0x3eec7b=_0x30a803;var _0x12872c,_0x4e4e79;const {parentId:_0x49b010,unitId:_0x2ffcc5,text:_0x1c81ef,threadId:_0xb7e957}=_0x1c2cc7,_0x3f334f=(_0x4e4e79=(_0x12872c=_0x1c81ef[_0x3eec7b(0xa3)])==null?void 0x0:_0x12872c['filter'](_0xa7187b=>_0xa7187b[_0x3eec7b(0x11a)]===_0x4765b0[_0x3eec7b(0xba)][_0x3eec7b(0x9a)])[_0x3eec7b(0xa1)](_0x75536c=>_0x75536c[_0x3eec7b(0xfe)]))!=null?_0x4e4e79:[],_0x17e9a7=JSON[_0x3eec7b(0xdb)](_0x1c81ef),_0x45acc8=(await this[_0x3eec7b(0x10f)][_0x3eec7b(0x10a)](_0x2ffcc5))[_0x3eec7b(0x91)]();if(_0x49b010){const _0xfef4ec={'memberId':_0x45acc8,'unitId':_0x2ffcc5,'content':_0x17e9a7,'mention':_0x3f334f,'threadId':_0xb7e957},_0x12a8d7=(await this[_0x3eec7b(0xa0)]['post'](_0x3eec7b(0xf0)+_0x2ffcc5+_0x3eec7b(0x100),{'body':_0xfef4ec}))[_0x3eec7b(0xe4)]['reply'];return{..._0x1c2cc7,'id':_0x12a8d7[_0x3eec7b(0x95)],'dT':_0x4765b0[_0x3eec7b(0x94)](+_0x12a8d7[_0x3eec7b(0xf4)])[_0x3eec7b(0xbe)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x12a8d7[_0x3eec7b(0x112)]};}else{const _0x42561b={'memberId':_0x45acc8,'unitId':_0x2ffcc5,'content':_0x17e9a7,'mention':_0x3f334f},_0x53c2fc=await this[_0x3eec7b(0xa0)][_0x3eec7b(0x104)]('/universer-api/comment/unit/'+_0x2ffcc5+_0x3eec7b(0xef),{'body':_0x42561b});return _0x3bb341(_0x53c2fc[_0x3eec7b(0xe4)][_0x3eec7b(0x11d)],_0x1c2cc7);}}async[_0x30a803(0x103)](_0x2dc626){const _0x1e046b=_0x30a803;var _0xb11024,_0x5efb3e;const {text:_0x41f0f7,unitId:_0x1e7231}=_0x2dc626,_0x3ed66a=(_0x5efb3e=(_0xb11024=_0x41f0f7[_0x1e046b(0xa3)])==null?void 0x0:_0xb11024[_0x1e046b(0xaa)](_0x5a5166=>_0x5a5166['rangeType']===_0x4765b0['CustomRangeType'][_0x1e046b(0x9a)])[_0x1e046b(0xa1)](_0x545437=>_0x545437[_0x1e046b(0xfe)]))!=null?_0x5efb3e:[],_0x3318d4=JSON[_0x1e046b(0xdb)](_0x41f0f7),_0xf8b3d0=_0x2dc626['threadId'],_0x911b54=_0x2dc626['id'],_0x5e7d33={'memberId':(await this[_0x1e046b(0x10f)][_0x1e046b(0x10a)](_0x1e7231))['getMemberID'](),'unitId':_0x1e7231,'threadId':_0xf8b3d0,'mention':_0x3ed66a,'content':_0x3318d4,'replyId':_0x911b54},_0x33faf4=await this['_httpService'][_0x1e046b(0x104)](_0x1e046b(0xf0)+_0x1e7231+_0x1e046b(0xee),{'body':_0x5e7d33});return!_0x33faf4[_0x1e046b(0xe4)][_0x1e046b(0xe1)]||_0x33faf4[_0x1e046b(0xe4)]['error'][_0x1e046b(0xd0)]===0x1;}async[_0x30a803(0xe9)](_0x1a8649){const _0x3ad57e=_0x30a803,{unitId:_0x477ccd}=_0x1a8649,_0xc9163d=_0x1a8649[_0x3ad57e(0x10c)],_0x1dd04e={'memberId':this[_0x3ad57e(0xad)][_0x3ad57e(0x9f)]()[_0x3ad57e(0xa5)],'unitId':_0x477ccd,'threadId':_0xc9163d,'solved':_0x1a8649[_0x3ad57e(0xc9)]?_0x321aff[_0x3ad57e(0xd7)]:_0x321aff[_0x3ad57e(0x97)]},_0x1d3370=await this[_0x3ad57e(0xa0)][_0x3ad57e(0x104)]('/universer-api/comment/unit/'+_0x477ccd+'/solved',{'body':_0x1dd04e});return!_0x1d3370[_0x3ad57e(0xe4)][_0x3ad57e(0xe1)]||_0x1d3370[_0x3ad57e(0xe4)][_0x3ad57e(0xe1)][_0x3ad57e(0xd0)]===0x1;}async[_0x30a803(0xfa)](_0x372a8c,_0x59cbac,_0x25924d,_0x15d9dd){const _0x2791d7=_0x30a803,_0x5e08d0={'memberId':(await this[_0x2791d7(0x10f)][_0x2791d7(0x10a)](_0x372a8c))[_0x2791d7(0x91)](),'threadId':_0x25924d,'replyId':_0x15d9dd,'unitId':_0x372a8c},_0x2db55f=await this[_0x2791d7(0xa0)][_0x2791d7(0x104)](_0x2791d7(0xf0)+_0x372a8c+_0x2791d7(0xd3),{'body':_0x5e08d0});return!_0x2db55f[_0x2791d7(0xe4)]['error']||_0x2db55f['body'][_0x2791d7(0xe1)]['code']===0x1;}async['listComments'](_0x44c2a0,_0x7d1192,_0x41b0d9){const _0x54ad7b=_0x30a803,_0x3da4d2={'unitId':_0x44c2a0,'threadId':_0x41b0d9},_0x5079b8=await this[_0x54ad7b(0xa0)]['post'](_0x54ad7b(0xf0)+_0x44c2a0+_0x54ad7b(0xc6),{'body':_0x3da4d2}),_0x293433=_0x41b0d9[_0x54ad7b(0xa1)](_0x5118c1=>_0x23d6f3(_0x5079b8[_0x54ad7b(0xe4)]['comments'][_0x5118c1],_0x44c2a0,_0x7d1192))[_0x54ad7b(0xaa)](Boolean);return Object[_0x54ad7b(0x98)](_0x5079b8[_0x54ad7b(0xe4)]['users'])[_0x54ad7b(0xda)](_0x3af080=>{const _0x330312=_0x54ad7b;this[_0x330312(0xad)]['addUser'](_0x3af080);}),_0x293433;}[_0x30a803(0x109)](_0x537b16){const _0x1d58dc=_0x30a803;return{'id':_0x537b16['id'],'threadId':_0x537b16[_0x1d58dc(0x10c)],'ref':_0x537b16[_0x1d58dc(0xc4)]};}};_0xe10dd0=_0x250f4e([_0x33555d(0x0,_0x4765b0[_0x30a803(0xd1)](_0x480fe9[_0x30a803(0xe6)])),_0x33555d(0x1,_0x4765b0['Inject'](_0x4765b0['UserManagerService'])),_0x33555d(0x2,_0x4765b0['Inject'](_0x233784[_0x30a803(0x9d)]))],_0xe10dd0);var _0x1f6fdb=Object[_0x30a803(0xb8)],_0x7f2377=(_0x2e185e,_0x2acbc3,_0x287285,_0xb2d59f)=>{const _0x49cf61=_0x30a803;for(var _0x13c0c2=_0xb2d59f>0x1?void 0x0:_0xb2d59f?_0x1f6fdb(_0x2acbc3,_0x287285):_0x2acbc3,_0x256793=_0x2e185e[_0x49cf61(0xb7)]-0x1,_0x49f358;_0x256793>=0x0;_0x256793--)(_0x49f358=_0x2e185e[_0x256793])&&(_0x13c0c2=_0x49f358(_0x13c0c2)||_0x13c0c2);return _0x13c0c2;},_0x4bbad2=(_0xa1f956,_0x13da71)=>(_0x4f2cbd,_0x295dd2)=>_0x13da71(_0x4f2cbd,_0x295dd2,_0xa1f956);let _0x4462fc=class extends _0x4765b0['Disposable']{constructor(_0x28d05b,_0x58b435){const _0x487a61=_0x30a803;super(),this['_threadCommentDataSourceService']=_0x28d05b,this[_0x487a61(0xe0)]=_0x58b435,this[_0x487a61(0x101)]();}['_initDataSource'](){const _0xc95d14=_0x30a803;this[_0xc95d14(0xc5)][_0xc95d14(0xf7)]=this['_threadCommentDataSource'],this[_0xc95d14(0xc5)][_0xc95d14(0xfb)]=!0x1;}};_0x4462fc=_0x7f2377([_0x4bbad2(0x0,_0xbb184[_0x30a803(0xaf)]),_0x4bbad2(0x1,_0x4765b0[_0x30a803(0xd1)](_0xe10dd0))],_0x4462fc);var _0x169816=Object[_0x30a803(0xa2)],_0x17da6a=Object['getOwnPropertyDescriptor'],_0xb650fa=(_0x8e4391,_0x1d866e,_0x5a72e1)=>_0x1d866e in _0x8e4391?_0x169816(_0x8e4391,_0x1d866e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5a72e1}):_0x8e4391[_0x1d866e]=_0x5a72e1,_0x4dec70=(_0x3d272e,_0x22d38a,_0x57c8f5,_0x389c4d)=>{const _0x50d0cc=_0x30a803;for(var _0x390385=_0x389c4d>0x1?void 0x0:_0x389c4d?_0x17da6a(_0x22d38a,_0x57c8f5):_0x22d38a,_0x376ee9=_0x3d272e[_0x50d0cc(0xb7)]-0x1,_0x2010cb;_0x376ee9>=0x0;_0x376ee9--)(_0x2010cb=_0x3d272e[_0x376ee9])&&(_0x390385=_0x2010cb(_0x390385)||_0x390385);return _0x390385;},_0x13f33d=(_0x336f76,_0x40f309)=>(_0x26b8ab,_0x4aded0)=>_0x40f309(_0x26b8ab,_0x4aded0,_0x336f76),_0xd3ec54=(_0x1f563a,_0x54ae5c,_0x216bdc)=>_0xb650fa(_0x1f563a,typeof _0x54ae5c!=_0x30a803(0xab)?_0x54ae5c+'':_0x54ae5c,_0x216bdc);_0x4566de[_0x30a803(0xb9)]=class extends _0x4765b0['Plugin']{constructor(_0x4e5e33=_0x1a7ef5,_0x26f7f4,_0x13c7ac){const _0x3df538=_0x30a803;super(),this[_0x3df538(0xf1)]=_0x4e5e33,this['_injector']=_0x26f7f4,this[_0x3df538(0xb4)]=_0x13c7ac;const {..._0x4026fc}=_0x4765b0[_0x3df538(0xc8)]({},_0x1a7ef5,this[_0x3df538(0xf1)]);this[_0x3df538(0xb4)][_0x3df538(0x107)](_0x57ce81,_0x4026fc);}[_0x30a803(0xff)](){[[_0xe10dd0],[_0x4462fc],[_0x1b2ec9]]['forEach'](_0x1b9056=>{const _0x4c385f=_0x12f2;this[_0x4c385f(0xc7)][_0x4c385f(0xeb)](_0x1b9056);});}[_0x30a803(0x119)](){const _0x13582d=_0x30a803;this[_0x13582d(0xc7)][_0x13582d(0xb2)](_0x4462fc),this['_injector'][_0x13582d(0xb2)](_0x1b2ec9);}},_0xd3ec54(_0x4566de[_0x30a803(0xb9)],'pluginName',_0x56caf9),_0xd3ec54(_0x4566de[_0x30a803(0xb9)],_0x30a803(0x93),_0x4765b0[_0x30a803(0x102)][_0x30a803(0xae)]),_0x4566de[_0x30a803(0xb9)]=_0x4dec70([_0x4765b0[_0x30a803(0x116)](_0x42872c[_0x30a803(0xd5)],_0x233784[_0x30a803(0x9c)],_0x270dd1[_0x30a803(0xa8)]),_0x13f33d(0x1,_0x4765b0['Inject'](_0x4765b0[_0x30a803(0xb3)])),_0x13f33d(0x2,_0x4765b0[_0x30a803(0xe2)])],_0x4566de['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x4566de,Symbol[_0x30a803(0x9e)],{'value':_0x30a803(0xd9)});}));function _0x5b7a(){const _0xb67818=['parse','pipe','getMemberID','UNRECOGNIZED','type','dayjs','replyId','payload','OpenOrReOpen','values','find','COMMENT','@univerjs-pro/collaboration-client','UniverCollaborationClientPlugin','CollaborationSessionService','toStringTag','getCurrentUser','_httpService','map','defineProperty','customRanges','replies','userID','473dCuBCl','exports','UniverLicensePlugin','unitId','filter','symbol','root','_userService','UNIVER_UNKNOWN','IThreadCommentDataSourceService','10820WkADUZ','addComment','get','Injector','_configService','function','YYYY/MM/DD\x20HH:mm','length','getOwnPropertyDescriptor','UniverThreadCommentDataSourcePlugin','CustomRangeType','delete','84230Ptkmrp','Disposable','format','@univerjs/network','2619MswJZp','UniverProCollaborationClient','object','Reply','ref','_threadCommentDataSourceService','/list','_injector','merge','resolved','subscribe','1938228GexnNh','Delete','Unknown','_initUserSync','content','code','Inject','3mcIOtL','/delete','Edit','UniverThreadCommentUIPlugin','7727278SCIfXN','Solved','@univerjs/thread-comment-ui','Module','forEach','stringify','size','solved','UserManagerService','addUser','_threadCommentDataSource','error','IConfigService','655uzPVFS','body','slice','HTTPService','_init','Solve','resolveComment','rxjs','add','parentId','UniverCore','/edit','/add','/universer-api/comment/unit/','_config','_commentService','UniverThreadComment','createTimestamp','getUnit','13000PdgijW','dataSource','disposeWithMe','UniverProLicense','deleteComment','syncUpdateMutationToColla','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','22938OHJUEC','rangeId','onStarting','/reply','_initDataSource','UniverInstanceType','updateComment','post','14YfUZox','2AvqlXt','setConfig','thread-comment-data-source.config','saveCommentToSnapshot','requireSession','bufferTime','threadId','/universer-api/user/list','CommentService','_sessionService','getUser','Add','userId','user','UniverNetwork','getComment','DependentOn','_threadCommentModel','@univerjs/thread-comment','onReady','rangeType','1085gTuVXL','11568roBPpE','comment'];_0x5b7a=function(){return _0xb67818;};return _0x5b7a();}
|
|
1
|
+
(function(_0x3d29c9,_0x3aceba){const _0xdf231e=_0x779c,_0xff5e0c=_0x3d29c9();while(!![]){try{const _0x5434f1=parseInt(_0xdf231e(0x105))/0x1*(-parseInt(_0xdf231e(0xf6))/0x2)+parseInt(_0xdf231e(0xe6))/0x3*(-parseInt(_0xdf231e(0x120))/0x4)+parseInt(_0xdf231e(0xba))/0x5+parseInt(_0xdf231e(0xb9))/0x6*(-parseInt(_0xdf231e(0xab))/0x7)+-parseInt(_0xdf231e(0xb8))/0x8*(parseInt(_0xdf231e(0xcd))/0x9)+parseInt(_0xdf231e(0xc1))/0xa*(-parseInt(_0xdf231e(0xd3))/0xb)+parseInt(_0xdf231e(0x129))/0xc*(parseInt(_0xdf231e(0xff))/0xd);if(_0x5434f1===_0x3aceba)break;else _0xff5e0c['push'](_0xff5e0c['shift']());}catch(_0x2adf6d){_0xff5e0c['push'](_0xff5e0c['shift']());}}}(_0x1f48,0xd5149),function(_0x2f4a66,_0x19bcec){const _0x3e3d37=_0x779c;typeof exports=='object'&&typeof module<'u'?_0x19bcec(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==_0x3e3d37(0xd6)&&define[_0x3e3d37(0xed)]?define(['exports',_0x3e3d37(0xe7),'@univerjs-pro/license',_0x3e3d37(0xdb),'@univerjs/thread-comment-ui','@univerjs/thread-comment','rxjs',_0x3e3d37(0xef)],_0x19bcec):(_0x2f4a66=typeof globalThis<'u'?globalThis:_0x2f4a66||self,_0x19bcec(_0x2f4a66[_0x3e3d37(0xd4)]={},_0x2f4a66[_0x3e3d37(0x108)],_0x2f4a66['UniverProLicense'],_0x2f4a66['UniverCore'],_0x2f4a66[_0x3e3d37(0xdc)],_0x2f4a66[_0x3e3d37(0x12a)],_0x2f4a66['rxjs'],_0x2f4a66[_0x3e3d37(0x124)]));}(this,function(_0x5243dd,_0x57866e,_0x5473a2,_0x534eba,_0x1a8000,_0x9f1156,_0x50231b,_0x3c27fd){'use strict';const _0x29560f=_0x779c;const _0x1bd9ca=_0x29560f(0x104);var _0x29d1d7=(_0x290b74=>(_0x290b74[_0x290b74['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x290b74[_0x290b74[_0x29560f(0x103)]=0x1]=_0x29560f(0x103),_0x290b74[_0x290b74[_0x29560f(0xaa)]=-0x1]=_0x29560f(0xaa),_0x290b74))(_0x29d1d7||{}),_0x774206=(_0x237ce5=>(_0x237ce5[_0x237ce5[_0x29560f(0x11b)]=0x0]=_0x29560f(0x11b),_0x237ce5[_0x237ce5['Add']=0x1]=_0x29560f(0x101),_0x237ce5[_0x237ce5['Reply']=0x2]='Reply',_0x237ce5[_0x237ce5['Edit']=0x3]=_0x29560f(0x121),_0x237ce5[_0x237ce5['Delete']=0x4]=_0x29560f(0xc0),_0x237ce5[_0x237ce5[_0x29560f(0xc5)]=0x5]=_0x29560f(0xc5),_0x237ce5[_0x237ce5[_0x29560f(0xaa)]=-0x1]='UNRECOGNIZED',_0x237ce5))(_0x774206||{});const _0x352bd5=_0x3f52a2=>_0x534eba[_0x29560f(0xb5)](new Date(+_0x3f52a2))[_0x29560f(0x11c)](_0x29560f(0xfd)),_0x1a3729=async(_0x1436c0,_0x42ce29)=>{const _0x487c45=_0x29560f,_0x304125=_0x1436c0[_0x487c45(0xf7)](_0x534eba[_0x487c45(0x107)]),_0x1246f9=_0x1436c0[_0x487c45(0xf7)](_0x3c27fd[_0x487c45(0x10e)]);_0x42ce29[_0x487c45(0xe2)](_0x55dab2=>{const _0x28e00b=_0x487c45;_0x304125['getUser'](_0x55dab2)&&_0x42ce29[_0x28e00b(0x10f)](_0x55dab2);}),_0x42ce29[_0x487c45(0x11f)]&&(await _0x1246f9[_0x487c45(0xf7)](_0x487c45(0xdd),{'params':{'userIDs':[..._0x42ce29]}}))['body'][_0x487c45(0xb2)][_0x487c45(0xe2)](_0x248c59=>{const _0x26a841=_0x487c45;_0x248c59&&_0x304125[_0x26a841(0xeb)](_0x248c59);});};var _0x436e63=Object[_0x29560f(0x110)],_0x54343d=(_0x5e9b8d,_0x2eca3a,_0x4204ab,_0x48afcb)=>{for(var _0x4d89b2=_0x48afcb>0x1?void 0x0:_0x48afcb?_0x436e63(_0x2eca3a,_0x4204ab):_0x2eca3a,_0x334472=_0x5e9b8d['length']-0x1,_0x33001a;_0x334472>=0x0;_0x334472--)(_0x33001a=_0x5e9b8d[_0x334472])&&(_0x4d89b2=_0x33001a(_0x4d89b2)||_0x4d89b2);return _0x4d89b2;},_0x5f3768=(_0x171269,_0x10491b)=>(_0x112199,_0x557828)=>_0x10491b(_0x112199,_0x557828,_0x171269);let _0x2e2e16=class extends _0x534eba[_0x29560f(0x11e)]{constructor(_0x422e79,_0x23e177,_0x223366,_0x4c4122){const _0x2b0e71=_0x29560f;super(),this[_0x2b0e71(0xe4)]=_0x422e79,this[_0x2b0e71(0x11a)]=_0x23e177,this['_userService']=_0x223366,this[_0x2b0e71(0xb1)]=_0x4c4122,this[_0x2b0e71(0x127)](),this[_0x2b0e71(0xcc)]();}[_0x29560f(0xcc)](){const _0x384d20=_0x29560f;this[_0x384d20(0xc9)](this[_0x384d20(0x11a)][_0x384d20(0xee)][_0x384d20(0x10a)](_0x50231b[_0x384d20(0xe1)](0x10))[_0x384d20(0xa9)](_0x32cd6b=>{const _0x160715=_0x384d20,_0xd2e16e=new Set();_0x32cd6b[_0x160715(0xe2)](_0x21cec5=>{const _0x568abd=_0x160715;switch(_0x21cec5[_0x568abd(0xd9)]){case'add':{const _0x4d168a=_0x21cec5[_0x568abd(0x118)][_0x568abd(0xd5)];_0xd2e16e['add'](_0x4d168a);break;}}}),_0x1a3729(this[_0x160715(0xb1)],_0xd2e16e);}));}[_0x29560f(0x127)](){const _0x352369=_0x29560f;this[_0x352369(0xc9)](this[_0x352369(0xe4)][_0x352369(0xee)][_0x352369(0xa9)](async _0x5d4577=>{const _0x2e7090=_0x352369;var _0x3163cf,_0x2c82e3,_0x58adc3,_0xf0256;const _0x53d98f=(_0x3163cf=this[_0x2e7090(0x11a)][_0x2e7090(0xd7)](_0x5d4577[_0x2e7090(0xe3)])[_0x2e7090(0xfa)](_0x21e020=>_0x21e020['threadId']===_0x5d4577[_0x2e7090(0xbe)]))==null?void 0x0:_0x3163cf[_0x2e7090(0x100)];if(!_0x53d98f)return;const {unitId:_0x33f4d6,subUnitId:_0x362716}=_0x53d98f;switch(_0x5d4577[_0x2e7090(0xe0)]&&this[_0x2e7090(0x111)][_0x2e7090(0xeb)](_0x5d4577[_0x2e7090(0xe0)]),_0x5d4577[_0x2e7090(0xd9)]){case _0x774206[_0x2e7090(0x101)]:break;case _0x774206[_0x2e7090(0xec)]:{this[_0x2e7090(0x11a)][_0x2e7090(0xe5)](_0x33f4d6,_0x362716,{'unitId':_0x33f4d6,'subUnitId':_0x362716,'ref':'','id':_0x5d4577[_0x2e7090(0xf0)],'dT':_0x352bd5(+_0x5d4577[_0x2e7090(0x116)]),'threadId':_0x5d4577[_0x2e7090(0xbe)],'personId':(_0x58adc3=(_0x2c82e3=_0x5d4577[_0x2e7090(0xe0)])==null?void 0x0:_0x2c82e3['userID'])!=null?_0x58adc3:_0x5d4577[_0x2e7090(0xe9)],'text':JSON['parse'](_0x5d4577['content']),'parentId':_0x53d98f['id']});break;}case _0x774206[_0x2e7090(0xc0)]:{const _0x11663a=this['_threadCommentModel']['getComment'](_0x33f4d6,_0x362716,_0x5d4577['replyId']);_0x11663a&&_0x11663a[_0x2e7090(0xbc)]&&this[_0x2e7090(0x11a)][_0x2e7090(0x122)](_0x33f4d6,_0x362716,_0x5d4577[_0x2e7090(0xf0)]);break;}case _0x774206[_0x2e7090(0x121)]:{this['_threadCommentModel'][_0x2e7090(0x119)](_0x33f4d6,_0x362716,{'commentId':_0x5d4577[_0x2e7090(0xf0)],'text':JSON[_0x2e7090(0xd1)](_0x5d4577[_0x2e7090(0xf5)])});break;}case _0x774206[_0x2e7090(0xc5)]:{const _0x57d724=(_0xf0256=this[_0x2e7090(0x11a)]['getUnit'](_0x5d4577[_0x2e7090(0xe3)])[_0x2e7090(0xfa)](_0x5f18c7=>_0x5f18c7[_0x2e7090(0xbe)]===_0x5d4577[_0x2e7090(0xbe)]))==null?void 0x0:_0xf0256[_0x2e7090(0x100)];_0x57d724&&this[_0x2e7090(0x11a)]['resolveComment'](_0x33f4d6,_0x362716,_0x57d724['id'],_0x5d4577['solved']===_0x29d1d7['Solved']);break;}}}));}};_0x2e2e16=_0x54343d([_0x5f3768(0x0,_0x534eba[_0x29560f(0xce)](_0x57866e[_0x29560f(0xae)])),_0x5f3768(0x1,_0x534eba[_0x29560f(0xce)](_0x9f1156['ThreadCommentModel'])),_0x5f3768(0x2,_0x534eba[_0x29560f(0xce)](_0x534eba[_0x29560f(0x107)])),_0x5f3768(0x3,_0x534eba[_0x29560f(0xce)](_0x534eba[_0x29560f(0xb7)]))],_0x2e2e16);const _0x2fb9b9='thread-comment-data-source.config',_0x4db5f3={};var _0x1944d9=Object[_0x29560f(0x110)],_0x22b0c0=(_0x2c27b1,_0x756492,_0x2e794a,_0x14cd2e)=>{const _0xc5b92b=_0x29560f;for(var _0x1e2eec=_0x14cd2e>0x1?void 0x0:_0x14cd2e?_0x1944d9(_0x756492,_0x2e794a):_0x756492,_0x28f474=_0x2c27b1[_0xc5b92b(0x102)]-0x1,_0x3ed690;_0x28f474>=0x0;_0x28f474--)(_0x3ed690=_0x2c27b1[_0x28f474])&&(_0x1e2eec=_0x3ed690(_0x1e2eec)||_0x1e2eec);return _0x1e2eec;},_0x1db0d7=(_0x387fa5,_0x77e376)=>(_0x172587,_0x246576)=>_0x77e376(_0x172587,_0x246576,_0x387fa5);function _0x2aa250(_0x5e7852,_0x55d587){const _0x338cae=_0x29560f,_0x55d388=_0x5e7852[_0x338cae(0xf1)][0x0];return{..._0x55d587,'id':_0x55d388[_0x338cae(0xf0)],'resolved':_0x5e7852['solved']===0x1,'dT':_0x352bd5(_0x55d388[_0x338cae(0x116)]),'personId':_0x55d388[_0x338cae(0xe9)],'threadId':_0x55d388[_0x338cae(0xbe)]};}function _0x20b6bf(_0x1c09a5,_0x231a01,_0x1848ff){const _0x436ec4=_0x29560f;var _0x2b6687,_0x4413b3;if(((_0x4413b3=(_0x2b6687=_0x1c09a5==null?void 0x0:_0x1c09a5[_0x436ec4(0xf1)])==null?void 0x0:_0x2b6687['length'])!=null?_0x4413b3:0x0)>0x0){const _0x4a5687=(_0x5c0821,_0x1dfa57)=>({'id':_0x5c0821[_0x436ec4(0xf0)],'threadId':_0x5c0821['threadId'],'dT':_0x352bd5(_0x5c0821['createTimestamp']),'personId':_0x5c0821['userId'],'resolved':_0x1c09a5[_0x436ec4(0x123)]===_0x29d1d7[_0x436ec4(0x103)],'unitId':_0x231a01,'subUnitId':_0x1848ff,'text':JSON[_0x436ec4(0xd1)](_0x5c0821[_0x436ec4(0xf5)]),'parentId':_0x1dfa57}),_0x192d30=_0x4a5687(_0x1c09a5[_0x436ec4(0xf1)][0x0]);return{..._0x192d30,'children':_0x1c09a5[_0x436ec4(0xf1)]['slice'](0x1)[_0x436ec4(0x114)](_0x5c46b7=>_0x4a5687(_0x5c46b7,_0x192d30['id']))};}return null;}let _0xa0207a=class{constructor(_0x2b1d5b,_0x4aa0ee,_0x12da8c){const _0x583a00=_0x29560f;this[_0x583a00(0xc8)]=_0x2b1d5b,this[_0x583a00(0x111)]=_0x4aa0ee,this[_0x583a00(0xc4)]=_0x12da8c;}async[_0x29560f(0xe5)](_0x15480f){const _0x188ac5=_0x29560f;var _0x1e2fc0,_0x25cc1e;const {parentId:_0x2b6142,unitId:_0x1a9fb7,text:_0x4abeee,threadId:_0x105a58}=_0x15480f,_0x2cdf86=(_0x25cc1e=(_0x1e2fc0=_0x4abeee['customRanges'])==null?void 0x0:_0x1e2fc0[_0x188ac5(0xf2)](_0x258e93=>_0x258e93[_0x188ac5(0xa7)]===_0x534eba['CustomRangeType'][_0x188ac5(0xde)])[_0x188ac5(0x114)](_0x45817a=>_0x45817a[_0x188ac5(0xf8)]))!=null?_0x25cc1e:[],_0x381c08=JSON[_0x188ac5(0x115)](_0x4abeee),_0x13aa25=(await this[_0x188ac5(0xc4)][_0x188ac5(0x109)](_0x1a9fb7))['getMemberID']();if(_0x2b6142){const _0x21e631={'memberId':_0x13aa25,'unitId':_0x1a9fb7,'content':_0x381c08,'mention':_0x2cdf86,'threadId':_0x105a58},_0x29ff43=(await this[_0x188ac5(0xc8)][_0x188ac5(0x10b)](_0x188ac5(0xc2)+_0x1a9fb7+'/reply',{'body':_0x21e631}))['body'][_0x188ac5(0x113)];return{..._0x15480f,'id':_0x29ff43['replyId'],'dT':_0x534eba['dayjs'](+_0x29ff43[_0x188ac5(0x116)])['format'](_0x188ac5(0xfd)),'personId':_0x29ff43[_0x188ac5(0xe9)]};}else{const _0x3c2d0a={'memberId':_0x13aa25,'unitId':_0x1a9fb7,'content':_0x381c08,'mention':_0x2cdf86},_0x18c05c=await this[_0x188ac5(0xc8)][_0x188ac5(0x10b)]('/universer-api/comment/unit/'+_0x1a9fb7+_0x188ac5(0xdf),{'body':_0x3c2d0a});return _0x2aa250(_0x18c05c[_0x188ac5(0xca)]['comment'],_0x15480f);}}async[_0x29560f(0x119)](_0x3bc4f2){const _0x33be60=_0x29560f;var _0x5a16f8,_0x47d31c;const {text:_0x169518,unitId:_0xde18d6}=_0x3bc4f2,_0x181922=(_0x47d31c=(_0x5a16f8=_0x169518[_0x33be60(0xb3)])==null?void 0x0:_0x5a16f8['filter'](_0x5846ef=>_0x5846ef[_0x33be60(0xa7)]===_0x534eba[_0x33be60(0x12b)][_0x33be60(0xde)])[_0x33be60(0x114)](_0x517a22=>_0x517a22['rangeId']))!=null?_0x47d31c:[],_0x311394=JSON[_0x33be60(0x115)](_0x169518),_0x182e8e=_0x3bc4f2['threadId'],_0x14c612=_0x3bc4f2['id'],_0x281a9a={'memberId':(await this[_0x33be60(0xc4)][_0x33be60(0x109)](_0xde18d6))[_0x33be60(0x117)](),'unitId':_0xde18d6,'threadId':_0x182e8e,'mention':_0x181922,'content':_0x311394,'replyId':_0x14c612},_0x3d3780=await this[_0x33be60(0xc8)]['post'](_0x33be60(0xc2)+_0xde18d6+_0x33be60(0xd0),{'body':_0x281a9a});return!_0x3d3780['body'][_0x33be60(0xbb)]||_0x3d3780[_0x33be60(0xca)][_0x33be60(0xbb)][_0x33be60(0xf3)]===0x1;}async[_0x29560f(0x126)](_0x46b17a){const _0x45ba2b=_0x29560f,{unitId:_0x3597e1}=_0x46b17a,_0x4370a2=_0x46b17a[_0x45ba2b(0xbe)],_0x4e1962={'memberId':this[_0x45ba2b(0x111)][_0x45ba2b(0xad)]()['userID'],'unitId':_0x3597e1,'threadId':_0x4370a2,'solved':_0x46b17a[_0x45ba2b(0xac)]?_0x29d1d7[_0x45ba2b(0x103)]:_0x29d1d7[_0x45ba2b(0xaf)]},_0x50eea0=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x3597e1+_0x45ba2b(0x112),{'body':_0x4e1962});return!_0x50eea0[_0x45ba2b(0xca)][_0x45ba2b(0xbb)]||_0x50eea0[_0x45ba2b(0xca)][_0x45ba2b(0xbb)][_0x45ba2b(0xf3)]===0x1;}async[_0x29560f(0x122)](_0x449b79,_0x228f0c,_0x5df298,_0x10fee4){const _0x3ae717=_0x29560f,_0x123211={'memberId':(await this['_sessionService']['requireSession'](_0x449b79))[_0x3ae717(0x117)](),'threadId':_0x5df298,'replyId':_0x10fee4,'unitId':_0x449b79},_0x4e93df=await this[_0x3ae717(0xc8)][_0x3ae717(0x10b)](_0x3ae717(0xc2)+_0x449b79+_0x3ae717(0xc7),{'body':_0x123211});return!_0x4e93df[_0x3ae717(0xca)][_0x3ae717(0xbb)]||_0x4e93df[_0x3ae717(0xca)][_0x3ae717(0xbb)][_0x3ae717(0xf3)]===0x1;}async['listComments'](_0x1aed1e,_0x351868,_0x3fd4c9){const _0x3d2725=_0x29560f,_0x5892e6={'unitId':_0x1aed1e,'threadId':_0x3fd4c9},_0x5d2259=await this[_0x3d2725(0xc8)]['post'](_0x3d2725(0xc2)+_0x1aed1e+'/list',{'body':_0x5892e6}),_0x4fef8d=_0x3fd4c9[_0x3d2725(0x114)](_0x5358e3=>_0x20b6bf(_0x5d2259['body'][_0x3d2725(0xfe)][_0x5358e3],_0x1aed1e,_0x351868))[_0x3d2725(0xf2)](Boolean);return Object[_0x3d2725(0x10c)](_0x5d2259['body'][_0x3d2725(0xb2)])[_0x3d2725(0xe2)](_0x4b5e90=>{const _0xfc4701=_0x3d2725;this[_0xfc4701(0x111)][_0xfc4701(0xeb)](_0x4b5e90);}),_0x4fef8d;}[_0x29560f(0xb0)](_0x3a4379){const _0xba88f1=_0x29560f;return{'id':_0x3a4379['id'],'threadId':_0x3a4379[_0xba88f1(0xbe)],'ref':_0x3a4379[_0xba88f1(0xfc)]};}};_0xa0207a=_0x22b0c0([_0x1db0d7(0x0,_0x534eba['Inject'](_0x3c27fd['HTTPService'])),_0x1db0d7(0x1,_0x534eba[_0x29560f(0xce)](_0x534eba[_0x29560f(0x107)])),_0x1db0d7(0x2,_0x534eba[_0x29560f(0xce)](_0x57866e[_0x29560f(0xf9)]))],_0xa0207a);var _0x22f630=Object['getOwnPropertyDescriptor'],_0xe04ed3=(_0x24edb3,_0x1912b7,_0x47a740,_0x5bac6b)=>{const _0x2ba8d4=_0x29560f;for(var _0x3e4644=_0x5bac6b>0x1?void 0x0:_0x5bac6b?_0x22f630(_0x1912b7,_0x47a740):_0x1912b7,_0x7171cb=_0x24edb3[_0x2ba8d4(0x102)]-0x1,_0x4b9500;_0x7171cb>=0x0;_0x7171cb--)(_0x4b9500=_0x24edb3[_0x7171cb])&&(_0x3e4644=_0x4b9500(_0x3e4644)||_0x3e4644);return _0x3e4644;},_0x4a30b9=(_0x2aa738,_0x5a2057)=>(_0x32eecb,_0x8eccc8)=>_0x5a2057(_0x32eecb,_0x8eccc8,_0x2aa738);let _0x9824f7=class extends _0x534eba[_0x29560f(0x11e)]{constructor(_0x5a2d99,_0x3f794b){const _0xb8ffb5=_0x29560f;super(),this['_threadCommentDataSourceService']=_0x5a2d99,this['_threadCommentDataSource']=_0x3f794b,this[_0xb8ffb5(0x125)]();}['_initDataSource'](){const _0x3061da=_0x29560f;this[_0x3061da(0xb4)]['dataSource']=this[_0x3061da(0x128)],this[_0x3061da(0xb4)]['syncUpdateMutationToColla']=!0x1;}};_0x9824f7=_0xe04ed3([_0x4a30b9(0x0,_0x9f1156['IThreadCommentDataSourceService']),_0x4a30b9(0x1,_0x534eba[_0x29560f(0xce)](_0xa0207a))],_0x9824f7);var _0xfd49c6=Object[_0x29560f(0xf4)],_0x55adcd=Object[_0x29560f(0x110)],_0x251c4a=(_0x1a7464,_0x4372b6,_0x3fd7eb)=>_0x4372b6 in _0x1a7464?_0xfd49c6(_0x1a7464,_0x4372b6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3fd7eb}):_0x1a7464[_0x4372b6]=_0x3fd7eb,_0x252366=(_0x1c4550,_0x292abb,_0xae7eca,_0xe17483)=>{const _0x45240a=_0x29560f;for(var _0x133c78=_0xe17483>0x1?void 0x0:_0xe17483?_0x55adcd(_0x292abb,_0xae7eca):_0x292abb,_0x43547b=_0x1c4550[_0x45240a(0x102)]-0x1,_0x36c8fa;_0x43547b>=0x0;_0x43547b--)(_0x36c8fa=_0x1c4550[_0x43547b])&&(_0x133c78=_0x36c8fa(_0x133c78)||_0x133c78);return _0x133c78;},_0x1e760b=(_0x228d18,_0x4072c5)=>(_0x1fc217,_0x2e6209)=>_0x4072c5(_0x1fc217,_0x2e6209,_0x228d18),_0xa6e0b2=(_0x297776,_0x287dcc,_0x1953c4)=>_0x251c4a(_0x297776,typeof _0x287dcc!=_0x29560f(0xd8)?_0x287dcc+'':_0x287dcc,_0x1953c4);_0x5243dd['UniverThreadCommentDataSourcePlugin']=class extends _0x534eba[_0x29560f(0xbf)]{constructor(_0xaf51d7=_0x4db5f3,_0x5c2758,_0x22fa21){const _0x255a95=_0x29560f;super(),this[_0x255a95(0xcb)]=_0xaf51d7,this[_0x255a95(0xb1)]=_0x5c2758,this[_0x255a95(0xc6)]=_0x22fa21;const {..._0x512692}=_0x534eba[_0x255a95(0xc3)]({},_0x4db5f3,this[_0x255a95(0xcb)]);this[_0x255a95(0xc6)]['setConfig'](_0x2fb9b9,_0x512692);}[_0x29560f(0xda)](){const _0x2dd43d=_0x29560f;[[_0xa0207a],[_0x9824f7],[_0x2e2e16]][_0x2dd43d(0xe2)](_0x3302aa=>{const _0x4810cb=_0x2dd43d;this[_0x4810cb(0xb1)][_0x4810cb(0xea)](_0x3302aa);});}[_0x29560f(0xfb)](){const _0x3b14b8=_0x29560f;this[_0x3b14b8(0xb1)][_0x3b14b8(0xf7)](_0x9824f7),this[_0x3b14b8(0xb1)]['get'](_0x2e2e16);}},_0xa6e0b2(_0x5243dd[_0x29560f(0xcf)],'pluginName',_0x1bd9ca),_0xa6e0b2(_0x5243dd['UniverThreadCommentDataSourcePlugin'],_0x29560f(0xd9),_0x534eba['UniverInstanceType'][_0x29560f(0xd2)]),_0x5243dd['UniverThreadCommentDataSourcePlugin']=_0x252366([_0x534eba[_0x29560f(0xa8)](_0x1a8000[_0x29560f(0x10d)],_0x57866e[_0x29560f(0x106)],_0x5473a2[_0x29560f(0xbd)]),_0x1e760b(0x1,_0x534eba['Inject'](_0x534eba[_0x29560f(0xb7)])),_0x1e760b(0x2,_0x534eba[_0x29560f(0xb6)])],_0x5243dd[_0x29560f(0xcf)]),Object[_0x29560f(0xf4)](_0x5243dd,Symbol[_0x29560f(0x11d)],{'value':_0x29560f(0xe8)});}));function _0x779c(_0x2a1b1c,_0xc7b3ef){const _0x1f480c=_0x1f48();return _0x779c=function(_0x779cc,_0x207d57){_0x779cc=_0x779cc-0xa7;let _0xadf0ca=_0x1f480c[_0x779cc];return _0xadf0ca;},_0x779c(_0x2a1b1c,_0xc7b3ef);}function _0x1f48(){const _0x305964=['user','bufferTime','forEach','unitId','_commentService','addComment','100452YSFwqp','@univerjs-pro/collaboration-client','Module','userId','add','addUser','Reply','amd','commentUpdate$','@univerjs/network','replyId','replies','filter','code','defineProperty','content','2CyVEqY','get','rangeId','CollaborationSessionService','find','onReady','ref','YYYY/MM/DD\x20HH:mm','comments','54055898TPGQNU','root','Add','length','Solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','1235499HVRFDi','UniverCollaborationClientPlugin','UserManagerService','UniverProCollaborationClient','requireSession','pipe','post','values','UniverThreadCommentUIPlugin','HTTPService','delete','getOwnPropertyDescriptor','_userService','/solved','reply','map','stringify','createTimestamp','getMemberID','payload','updateComment','_threadCommentModel','Unknown','format','toStringTag','Disposable','size','132vLZbRW','Edit','deleteComment','solved','UniverNetwork','_initDataSource','resolveComment','_init','_threadCommentDataSource','12BzWcsw','UniverThreadComment','CustomRangeType','rangeType','DependentOn','subscribe','UNRECOGNIZED','4998fyDmMx','resolved','getCurrentUser','CommentService','OpenOrReOpen','saveCommentToSnapshot','_injector','users','customRanges','_threadCommentDataSourceService','dayjs','IConfigService','Injector','2456392DRMDdQ','8328zfWqFK','4505905IjNlWw','error','parentId','UniverLicensePlugin','threadId','Plugin','Delete','230frarrg','/universer-api/comment/unit/','merge','_sessionService','Solve','_configService','/delete','_httpService','disposeWithMe','body','_config','_initUserSync','9PDvMpU','Inject','UniverThreadCommentDataSourcePlugin','/edit','parse','UNIVER_UNKNOWN','262086YefIct','UniverProThreadCommentDatasource','personId','function','getUnit','symbol','type','onStarting','@univerjs/core','UniverThreadCommentUi','/universer-api/user/list','COMMENT','/add'];_0x1f48=function(){return _0x305964;};return _0x1f48();}
|
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.1-nightly.202511221011",
|
|
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/collaboration-client": "0.12.
|
|
49
|
-
"@univerjs-pro/license": "0.12.
|
|
50
|
-
"@univerjs/core": "0.12.
|
|
51
|
-
"@univerjs/thread-comment": "0.12.
|
|
52
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.12.1-nightly.202511221011",
|
|
49
|
+
"@univerjs-pro/license": "0.12.1-nightly.202511221011",
|
|
50
|
+
"@univerjs/core": "0.12.1-nightly.202511221011",
|
|
51
|
+
"@univerjs/thread-comment": "0.12.1-nightly.202511221011",
|
|
52
|
+
"@univerjs/thread-comment-ui": "0.12.1-nightly.202511221011",
|
|
53
53
|
"@univerjs/protocol": "0.1.47",
|
|
54
|
-
"@univerjs/
|
|
54
|
+
"@univerjs/network": "0.12.1-nightly.202511221011"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
59
|
"vite": "^7.2.2",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.12.
|
|
61
|
+
"@univerjs-infra/shared": "0.12.1"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|