@univerjs-pro/thread-comment-datasource 0.10.6-nightly.202509060724 → 0.10.6-nightly.202509060832
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 +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x37db36=_0x50cb;(function(_0x3b7c4d,_0x53fcb1){const _0x3c8e70=_0x50cb,_0x142a71=_0x3b7c4d();while(!![]){try{const _0x100c8d=parseInt(_0x3c8e70(0x194))/0x1+-parseInt(_0x3c8e70(0x17b))/0x2*(parseInt(_0x3c8e70(0x165))/0x3)+-parseInt(_0x3c8e70(0x16a))/0x4*(-parseInt(_0x3c8e70(0x1c5))/0x5)+-parseInt(_0x3c8e70(0x16f))/0x6*(-parseInt(_0x3c8e70(0x16d))/0x7)+-parseInt(_0x3c8e70(0x167))/0x8*(-parseInt(_0x3c8e70(0x196))/0x9)+parseInt(_0x3c8e70(0x1cf))/0xa+-parseInt(_0x3c8e70(0x189))/0xb;if(_0x100c8d===_0x53fcb1)break;else _0x142a71['push'](_0x142a71['shift']());}catch(_0x4a3ae5){_0x142a71['push'](_0x142a71['shift']());}}}(_0x3d27,0xefa13));Object[_0x37db36(0x1a1)](exports,Symbol['toStringTag'],{'value':_0x37db36(0x1a8)});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='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x59cd5c=>(_0x59cd5c[_0x59cd5c[_0x37db36(0x18d)]=0x0]=_0x37db36(0x18d),_0x59cd5c[_0x59cd5c[_0x37db36(0x1b2)]=0x1]='Solved',_0x59cd5c[_0x59cd5c[_0x37db36(0x191)]=-0x1]=_0x37db36(0x191),_0x59cd5c))(I||{}),v=(_0x539e40=>(_0x539e40[_0x539e40[_0x37db36(0x1aa)]=0x0]=_0x37db36(0x1aa),_0x539e40[_0x539e40[_0x37db36(0x184)]=0x1]=_0x37db36(0x184),_0x539e40[_0x539e40[_0x37db36(0x1c0)]=0x2]='Reply',_0x539e40[_0x539e40[_0x37db36(0x163)]=0x3]='Edit',_0x539e40[_0x539e40[_0x37db36(0x1b4)]=0x4]=_0x37db36(0x1b4),_0x539e40[_0x539e40[_0x37db36(0x185)]=0x5]=_0x37db36(0x185),_0x539e40[_0x539e40['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x539e40))(v||{});const f=_0x27a144=>c['dayjs'](new Date(+_0x27a144))['format'](_0x37db36(0x1c1)),R=async(_0x3f4831,_0x2ee28d)=>{const _0x6e6fb1=_0x37db36,_0x1db442=_0x3f4831[_0x6e6fb1(0x1bf)](c[_0x6e6fb1(0x17d)]),_0x28ae40=_0x3f4831[_0x6e6fb1(0x1bf)](P['HTTPService']);_0x2ee28d[_0x6e6fb1(0x1d2)](_0x1dbc55=>{const _0x36f5a2=_0x6e6fb1;_0x1db442[_0x36f5a2(0x1d3)](_0x1dbc55)&&_0x2ee28d[_0x36f5a2(0x190)](_0x1dbc55);}),_0x2ee28d[_0x6e6fb1(0x168)]&&(await _0x28ae40['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2ee28d]}}))[_0x6e6fb1(0x1ba)]['users']['forEach'](_0x4f773c=>{const _0xeb0e8c=_0x6e6fb1;_0x4f773c&&_0x1db442[_0xeb0e8c(0x1a0)](_0x4f773c);});};var $=Object[_0x37db36(0x17c)],E=(_0x2d6584,_0x355dd4,_0x29e7bf,_0x27e1ad)=>{const _0x543ff8=_0x37db36;for(var _0x4c0bb0=_0x27e1ad>0x1?void 0x0:_0x27e1ad?$(_0x355dd4,_0x29e7bf):_0x355dd4,_0x2f1329=_0x2d6584[_0x543ff8(0x17a)]-0x1,_0x26c02f;_0x2f1329>=0x0;_0x2f1329--)(_0x26c02f=_0x2d6584[_0x2f1329])&&(_0x4c0bb0=_0x26c02f(_0x4c0bb0)||_0x4c0bb0);return _0x4c0bb0;},S=(_0x4952ed,_0x501663)=>(_0x332f13,_0x2abb9b)=>_0x501663(_0x332f13,_0x2abb9b,_0x4952ed);let _=class extends c[_0x37db36(0x1a7)]{constructor(_0x211b44,_0x3e78a1,_0xdfc52d,_0x4abcb0){const _0x2834d4=_0x37db36;super(),this[_0x2834d4(0x18a)]=_0x211b44,this[_0x2834d4(0x162)]=_0x3e78a1,this[_0x2834d4(0x1b0)]=_0xdfc52d,this[_0x2834d4(0x174)]=_0x4abcb0,this[_0x2834d4(0x16b)](),this[_0x2834d4(0x179)]();}[_0x37db36(0x179)](){const _0x18fed4=_0x37db36;this[_0x18fed4(0x1b7)](this[_0x18fed4(0x162)][_0x18fed4(0x188)]['pipe'](j[_0x18fed4(0x1d1)](0x10))[_0x18fed4(0x1bd)](_0x2ac427=>{const _0x524803=_0x18fed4,_0x26bdf6=new Set();_0x2ac427[_0x524803(0x1d2)](_0xc19959=>{const _0x4a4e7f=_0x524803;switch(_0xc19959[_0x4a4e7f(0x172)]){case _0x4a4e7f(0x1d4):{const _0x2e42c4=_0xc19959[_0x4a4e7f(0x19d)]['personId'];_0x26bdf6[_0x4a4e7f(0x1d4)](_0x2e42c4);break;}}}),R(this[_0x524803(0x174)],_0x26bdf6);}));}['_init'](){const _0x4ed71e=_0x37db36;this[_0x4ed71e(0x1b7)](this['_commentService'][_0x4ed71e(0x188)]['subscribe'](async _0x187e57=>{const _0x573fde=_0x4ed71e;var _0x8071c3,_0xa5962f,_0x50ee43,_0xcc412b;const _0x579109=(_0x8071c3=this[_0x573fde(0x162)][_0x573fde(0x183)](_0x187e57[_0x573fde(0x1af)])[_0x573fde(0x1ca)](_0x5ede60=>_0x5ede60['threadId']===_0x187e57[_0x573fde(0x19e)]))==null?void 0x0:_0x8071c3[_0x573fde(0x1d0)];if(!_0x579109)return;const {unitId:_0xc08a21,subUnitId:_0x1ff8f7}=_0x579109;switch(_0x187e57[_0x573fde(0x199)]&&this[_0x573fde(0x1b0)]['addUser'](_0x187e57['user']),_0x187e57[_0x573fde(0x172)]){case v[_0x573fde(0x184)]:break;case v['Reply']:{this[_0x573fde(0x162)]['addComment'](_0xc08a21,_0x1ff8f7,{'unitId':_0xc08a21,'subUnitId':_0x1ff8f7,'ref':'','id':_0x187e57['replyId'],'dT':f(+_0x187e57['createTimestamp']),'threadId':_0x187e57[_0x573fde(0x19e)],'personId':(_0x50ee43=(_0xa5962f=_0x187e57[_0x573fde(0x199)])==null?void 0x0:_0xa5962f[_0x573fde(0x1bb)])!=null?_0x50ee43:_0x187e57[_0x573fde(0x1a3)],'text':JSON['parse'](_0x187e57['content']),'parentId':_0x579109['id']});break;}case v[_0x573fde(0x1b4)]:{const _0x255a66=this[_0x573fde(0x162)]['getComment'](_0xc08a21,_0x1ff8f7,_0x187e57[_0x573fde(0x1b3)]);_0x255a66&&_0x255a66[_0x573fde(0x17f)]&&this['_threadCommentModel'][_0x573fde(0x1c8)](_0xc08a21,_0x1ff8f7,_0x187e57['replyId']);break;}case v[_0x573fde(0x163)]:{this[_0x573fde(0x162)][_0x573fde(0x18b)](_0xc08a21,_0x1ff8f7,{'commentId':_0x187e57[_0x573fde(0x1b3)],'text':JSON['parse'](_0x187e57[_0x573fde(0x177)])});break;}case v[_0x573fde(0x185)]:{const _0x2ad4e3=(_0xcc412b=this[_0x573fde(0x162)][_0x573fde(0x183)](_0x187e57['unitId'])['find'](_0x3b41f0=>_0x3b41f0[_0x573fde(0x19e)]===_0x187e57[_0x573fde(0x19e)]))==null?void 0x0:_0xcc412b[_0x573fde(0x1d0)];_0x2ad4e3&&this[_0x573fde(0x162)]['resolveComment'](_0xc08a21,_0x1ff8f7,_0x2ad4e3['id'],_0x187e57['solved']===I[_0x573fde(0x1b2)]);break;}}}));}};_=E([S(0x0,c[_0x37db36(0x19a)](b[_0x37db36(0x170)])),S(0x1,c[_0x37db36(0x19a)](M['ThreadCommentModel'])),S(0x2,c[_0x37db36(0x19a)](c[_0x37db36(0x17d)])),S(0x3,c[_0x37db36(0x19a)](c[_0x37db36(0x1c3)]))],_);const q=_0x37db36(0x195),D={};var A=Object[_0x37db36(0x17c)],x=(_0x13a01d,_0x563cdc,_0x4a3870,_0x8f9887)=>{const _0x199dfc=_0x37db36;for(var _0x3f6f56=_0x8f9887>0x1?void 0x0:_0x8f9887?A(_0x563cdc,_0x4a3870):_0x563cdc,_0x43838a=_0x13a01d[_0x199dfc(0x17a)]-0x1,_0x576d76;_0x43838a>=0x0;_0x43838a--)(_0x576d76=_0x13a01d[_0x43838a])&&(_0x3f6f56=_0x576d76(_0x3f6f56)||_0x3f6f56);return _0x3f6f56;},C=(_0x30d31b,_0x559794)=>(_0x468da9,_0x578cf7)=>_0x559794(_0x468da9,_0x578cf7,_0x30d31b);function Y(_0x401303,_0x150e1e){const _0x1a32a1=_0x37db36,_0x429a03=_0x401303['replies'][0x0];return{..._0x150e1e,'id':_0x429a03[_0x1a32a1(0x1b3)],'resolved':_0x401303[_0x1a32a1(0x169)]===0x1,'dT':f(_0x429a03[_0x1a32a1(0x1a5)]),'personId':_0x429a03[_0x1a32a1(0x1a3)],'threadId':_0x429a03[_0x1a32a1(0x19e)]};}function G(_0x342618,_0x248890,_0x1868f0){const _0x18f3d1=_0x37db36;var _0x206b12,_0x5ed449;if(((_0x5ed449=(_0x206b12=_0x342618==null?void 0x0:_0x342618['replies'])==null?void 0x0:_0x206b12['length'])!=null?_0x5ed449:0x0)>0x0){const _0x51608f=(_0x323672,_0x12e01e)=>({'id':_0x323672['replyId'],'threadId':_0x323672[_0x18f3d1(0x19e)],'dT':f(_0x323672[_0x18f3d1(0x1a5)]),'personId':_0x323672[_0x18f3d1(0x1a3)],'resolved':_0x342618[_0x18f3d1(0x169)]===I[_0x18f3d1(0x1b2)],'unitId':_0x248890,'subUnitId':_0x1868f0,'text':JSON[_0x18f3d1(0x1d7)](_0x323672['content']),'parentId':_0x12e01e}),_0x5ebda9=_0x51608f(_0x342618[_0x18f3d1(0x19b)][0x0]);return{..._0x5ebda9,'children':_0x342618[_0x18f3d1(0x19b)][_0x18f3d1(0x1a4)](0x1)['map'](_0x15c578=>_0x51608f(_0x15c578,_0x5ebda9['id']))};}return null;}let p=class{constructor(_0x352568,_0x186e6a,_0x3b0581){const _0x35afcd=_0x37db36;this['_httpService']=_0x352568,this['_userService']=_0x186e6a,this[_0x35afcd(0x1c6)]=_0x3b0581;}async[_0x37db36(0x16c)](_0x201cce){const _0xb6e77c=_0x37db36;var _0x5c844f,_0x4a55ff;const {parentId:_0x5f20e0,unitId:_0x5d2767,text:_0xdf1db,threadId:_0x10ef13}=_0x201cce,_0x1541e4=(_0x4a55ff=(_0x5c844f=_0xdf1db[_0xb6e77c(0x1ac)])==null?void 0x0:_0x5c844f['filter'](_0x570dfc=>_0x570dfc[_0xb6e77c(0x173)]===c[_0xb6e77c(0x1c2)][_0xb6e77c(0x1c7)])[_0xb6e77c(0x1a9)](_0x2a42f1=>_0x2a42f1['rangeId']))!=null?_0x4a55ff:[],_0x3d558c=JSON[_0xb6e77c(0x181)](_0xdf1db),_0x3dc238=(await this[_0xb6e77c(0x1c6)]['requireSession'](_0x5d2767))[_0xb6e77c(0x166)]();if(_0x5f20e0){const _0x1d3923={'memberId':_0x3dc238,'unitId':_0x5d2767,'content':_0x3d558c,'mention':_0x1541e4,'threadId':_0x10ef13},_0xb08c16=(await this[_0xb6e77c(0x1b8)][_0xb6e77c(0x18c)](_0xb6e77c(0x1d6)+_0x5d2767+_0xb6e77c(0x1cb),{'body':_0x1d3923}))['body'][_0xb6e77c(0x1b5)];return{..._0x201cce,'id':_0xb08c16[_0xb6e77c(0x1b3)],'dT':c[_0xb6e77c(0x1ae)](+_0xb08c16[_0xb6e77c(0x1a5)])[_0xb6e77c(0x171)](_0xb6e77c(0x1c1)),'personId':_0xb08c16[_0xb6e77c(0x1a3)]};}else{const _0x3efee4={'memberId':_0x3dc238,'unitId':_0x5d2767,'content':_0x3d558c,'mention':_0x1541e4},_0x338649=await this['_httpService'][_0xb6e77c(0x18c)](_0xb6e77c(0x1d6)+_0x5d2767+'/add',{'body':_0x3efee4});return Y(_0x338649[_0xb6e77c(0x1ba)][_0xb6e77c(0x17e)],_0x201cce);}}async['updateComment'](_0x3b32f8){const _0x1e2ad4=_0x37db36;var _0x19f5c0,_0x108892;const {text:_0x31d0bb,unitId:_0x12aa47}=_0x3b32f8,_0x151fca=(_0x108892=(_0x19f5c0=_0x31d0bb[_0x1e2ad4(0x1ac)])==null?void 0x0:_0x19f5c0['filter'](_0x293f8f=>_0x293f8f['rangeType']===c[_0x1e2ad4(0x1c2)][_0x1e2ad4(0x1c7)])[_0x1e2ad4(0x1a9)](_0x57f3b0=>_0x57f3b0[_0x1e2ad4(0x1b1)]))!=null?_0x108892:[],_0x312f0c=JSON[_0x1e2ad4(0x181)](_0x31d0bb),_0x1544f1=_0x3b32f8[_0x1e2ad4(0x19e)],_0x44e865=_0x3b32f8['id'],_0x2658a5={'memberId':(await this[_0x1e2ad4(0x1c6)][_0x1e2ad4(0x1b6)](_0x12aa47))[_0x1e2ad4(0x166)](),'unitId':_0x12aa47,'threadId':_0x1544f1,'mention':_0x151fca,'content':_0x312f0c,'replyId':_0x44e865},_0x36c212=await this['_httpService'][_0x1e2ad4(0x18c)](_0x1e2ad4(0x1d6)+_0x12aa47+'/edit',{'body':_0x2658a5});return!_0x36c212[_0x1e2ad4(0x1ba)]['error']||_0x36c212[_0x1e2ad4(0x1ba)]['error'][_0x1e2ad4(0x164)]===0x1;}async[_0x37db36(0x1a6)](_0x33119a){const _0x28e09b=_0x37db36,{unitId:_0x176eb4}=_0x33119a,_0x377437=_0x33119a[_0x28e09b(0x19e)],_0x971ce3={'memberId':this[_0x28e09b(0x1b0)]['getCurrentUser']()[_0x28e09b(0x1bb)],'unitId':_0x176eb4,'threadId':_0x377437,'solved':_0x33119a['resolved']?I[_0x28e09b(0x1b2)]:I[_0x28e09b(0x18d)]},_0x367508=await this[_0x28e09b(0x1b8)][_0x28e09b(0x18c)](_0x28e09b(0x1d6)+_0x176eb4+_0x28e09b(0x193),{'body':_0x971ce3});return!_0x367508[_0x28e09b(0x1ba)][_0x28e09b(0x16e)]||_0x367508['body'][_0x28e09b(0x16e)][_0x28e09b(0x164)]===0x1;}async[_0x37db36(0x1c8)](_0x2238bd,_0x1e67f5,_0x28313f,_0x4d0bdd){const _0x2ba20f=_0x37db36,_0x1ccaac={'memberId':(await this[_0x2ba20f(0x1c6)]['requireSession'](_0x2238bd))['getMemberID'](),'threadId':_0x28313f,'replyId':_0x4d0bdd,'unitId':_0x2238bd},_0x414a29=await this[_0x2ba20f(0x1b8)]['post']('/universer-api/comment/unit/'+_0x2238bd+'/delete',{'body':_0x1ccaac});return!_0x414a29[_0x2ba20f(0x1ba)][_0x2ba20f(0x16e)]||_0x414a29[_0x2ba20f(0x1ba)][_0x2ba20f(0x16e)]['code']===0x1;}async[_0x37db36(0x1be)](_0x45ce37,_0xb03613,_0x1b3ea9){const _0x5c4f50=_0x37db36,_0x4c9c54={'unitId':_0x45ce37,'threadId':_0x1b3ea9},_0xc51246=await this[_0x5c4f50(0x1b8)]['post'](_0x5c4f50(0x1d6)+_0x45ce37+_0x5c4f50(0x1d5),{'body':_0x4c9c54}),_0xd4d81c=_0x1b3ea9[_0x5c4f50(0x1a9)](_0x1fff48=>G(_0xc51246['body'][_0x5c4f50(0x18f)][_0x1fff48],_0x45ce37,_0xb03613))[_0x5c4f50(0x1bc)](Boolean);return Object['values'](_0xc51246[_0x5c4f50(0x1ba)][_0x5c4f50(0x1c9)])[_0x5c4f50(0x1d2)](_0x5d5c3b=>{const _0x351c23=_0x5c4f50;this[_0x351c23(0x1b0)][_0x351c23(0x1a0)](_0x5d5c3b);}),_0xd4d81c;}[_0x37db36(0x1ab)](_0x3d8f58){return{'id':_0x3d8f58['id'],'threadId':_0x3d8f58['threadId'],'ref':_0x3d8f58['ref']};}};p=x([C(0x0,c[_0x37db36(0x19a)](P[_0x37db36(0x1a2)])),C(0x1,c[_0x37db36(0x19a)](c[_0x37db36(0x17d)])),C(0x2,c[_0x37db36(0x19a)](b[_0x37db36(0x187)]))],p);var H=Object[_0x37db36(0x17c)],J=(_0x5d4e12,_0x20764a,_0x3924e2,_0x4dcd61)=>{const _0x195dc0=_0x37db36;for(var _0xbda9d2=_0x4dcd61>0x1?void 0x0:_0x4dcd61?H(_0x20764a,_0x3924e2):_0x20764a,_0x4724c4=_0x5d4e12[_0x195dc0(0x17a)]-0x1,_0x3da381;_0x4724c4>=0x0;_0x4724c4--)(_0x3da381=_0x5d4e12[_0x4724c4])&&(_0xbda9d2=_0x3da381(_0xbda9d2)||_0xbda9d2);return _0xbda9d2;},y=(_0x197b01,_0x272be4)=>(_0x416cc2,_0x537c35)=>_0x272be4(_0x416cc2,_0x537c35,_0x197b01);function _0x50cb(_0x18a475,_0x2dcff4){const _0x3d27bf=_0x3d27();return _0x50cb=function(_0x50cb0b,_0x208d41){_0x50cb0b=_0x50cb0b-0x162;let _0x3ae7b4=_0x3d27bf[_0x50cb0b];return _0x3ae7b4;},_0x50cb(_0x18a475,_0x2dcff4);}let g=class extends c['Disposable']{constructor(_0x495a0b,_0x1dddcd){const _0x41c9ea=_0x37db36;super(),this[_0x41c9ea(0x18e)]=_0x495a0b,this[_0x41c9ea(0x198)]=_0x1dddcd,this[_0x41c9ea(0x176)]();}['_initDataSource'](){const _0x2c75e2=_0x37db36;this['_threadCommentDataSourceService'][_0x2c75e2(0x19c)]=this[_0x2c75e2(0x198)],this[_0x2c75e2(0x18e)][_0x2c75e2(0x192)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](p))],g);var F=Object[_0x37db36(0x1a1)],L=Object[_0x37db36(0x17c)],Z=(_0x467b91,_0x110866,_0x1c2fa4)=>_0x110866 in _0x467b91?F(_0x467b91,_0x110866,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1c2fa4}):_0x467b91[_0x110866]=_0x1c2fa4,W=(_0x444623,_0x36a9a6,_0x38d568,_0x2ba91b)=>{const _0x3d7a7b=_0x37db36;for(var _0x57be8c=_0x2ba91b>0x1?void 0x0:_0x2ba91b?L(_0x36a9a6,_0x38d568):_0x36a9a6,_0x29641e=_0x444623[_0x3d7a7b(0x17a)]-0x1,_0x385e6a;_0x29641e>=0x0;_0x29641e--)(_0x385e6a=_0x444623[_0x29641e])&&(_0x57be8c=_0x385e6a(_0x57be8c)||_0x57be8c);return _0x57be8c;},O=(_0x5cbef3,_0x2fd3a7)=>(_0x1ce547,_0x3fa716)=>_0x2fd3a7(_0x1ce547,_0x3fa716,_0x5cbef3),N=(_0x3f66a8,_0x2e4bd7,_0x83ae5b)=>Z(_0x3f66a8,typeof _0x2e4bd7!=_0x37db36(0x182)?_0x2e4bd7+'':_0x2e4bd7,_0x83ae5b);function _0x3d27(){const _0x55ea9b=['forEach','getUser','add','/list','/universer-api/comment/unit/','parse','_threadCommentModel','Edit','code','12MxiXWG','getMemberID','11344rlAXfw','size','solved','3624668LNReSS','_init','addComment','35819rNzhxr','error','1692NJmvPZ','CommentService','format','type','rangeType','_injector','onStarting','_initDataSource','content','onReady','_initUserSync','length','772872HuAXPy','getOwnPropertyDescriptor','UserManagerService','comment','parentId','DependentOn','stringify','symbol','getUnit','Add','Solve','merge','CollaborationSessionService','commentUpdate$','23591051ibqeOJ','_commentService','updateComment','post','OpenOrReOpen','_threadCommentDataSourceService','comments','delete','UNRECOGNIZED','syncUpdateMutationToColla','/solved','535311qzqAKC','thread-comment-data-source.config','5157wQoRwb','UniverCollaborationClientPlugin','_threadCommentDataSource','user','Inject','replies','dataSource','payload','threadId','_config','addUser','defineProperty','HTTPService','userId','slice','createTimestamp','resolveComment','Disposable','Module','map','Unknown','saveCommentToSnapshot','customRanges','setConfig','dayjs','unitId','_userService','rangeId','Solved','replyId','Delete','reply','requireSession','disposeWithMe','_httpService','UNIVER_UNKNOWN','body','userID','filter','subscribe','listComments','get','Reply','YYYY/MM/DD\x20HH:mm','CustomRangeType','Injector','UniverThreadCommentUIPlugin','10tpZagE','_sessionService','COMMENT','deleteComment','users','find','/reply','_configService','UniverThreadCommentDataSourcePlugin','UniverInstanceType','687550cLnHcu','root','bufferTime'];_0x3d27=function(){return _0x55ea9b;};return _0x3d27();}exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x1a3c72=D,_0x48039e,_0x335248){const _0x4cd67d=_0x37db36;super(),this[_0x4cd67d(0x19f)]=_0x1a3c72,this[_0x4cd67d(0x174)]=_0x48039e,this[_0x4cd67d(0x1cc)]=_0x335248;const {..._0x46facc}=c[_0x4cd67d(0x186)]({},D,this[_0x4cd67d(0x19f)]);this[_0x4cd67d(0x1cc)][_0x4cd67d(0x1ad)](q,_0x46facc);}[_0x37db36(0x175)](){const _0x36cde6=_0x37db36;[[p],[g],[_]][_0x36cde6(0x1d2)](_0x145f28=>{const _0x13e8ff=_0x36cde6;this[_0x13e8ff(0x174)][_0x13e8ff(0x1d4)](_0x145f28);});}[_0x37db36(0x178)](){const _0x5946bb=_0x37db36;this[_0x5946bb(0x174)]['get'](g),this[_0x5946bb(0x174)][_0x5946bb(0x1bf)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x37db36(0x1cd)],_0x37db36(0x172),c[_0x37db36(0x1ce)][_0x37db36(0x1b9)]),exports[_0x37db36(0x1cd)]=W([c[_0x37db36(0x180)](w[_0x37db36(0x1c4)],b[_0x37db36(0x197)],T['UniverLicensePlugin']),O(0x1,c[_0x37db36(0x19a)](c['Injector'])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x570388=_0x24a2;(function(_0x260439,_0x2522d5){const _0x46572d=_0x24a2,_0x355940=_0x260439();while(!![]){try{const _0x128269=-parseInt(_0x46572d(0xac))/0x1+parseInt(_0x46572d(0xe9))/0x2+parseInt(_0x46572d(0xfe))/0x3*(-parseInt(_0x46572d(0xa2))/0x4)+parseInt(_0x46572d(0xbf))/0x5*(parseInt(_0x46572d(0xa1))/0x6)+parseInt(_0x46572d(0xc1))/0x7+-parseInt(_0x46572d(0xfc))/0x8+-parseInt(_0x46572d(0xf3))/0x9*(-parseInt(_0x46572d(0x96))/0xa);if(_0x128269===_0x2522d5)break;else _0x355940['push'](_0x355940['shift']());}catch(_0x4047b9){_0x355940['push'](_0x355940['shift']());}}}(_0x41f5,0x4cd06));Object[_0x570388(0x98)](exports,Symbol[_0x570388(0xdf)],{'value':_0x570388(0x97)});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=_0x570388(0xa9);function _0x24a2(_0x4abfef,_0x5bf3a8){const _0x41f5f8=_0x41f5();return _0x24a2=function(_0x24a205,_0x1f6f9d){_0x24a205=_0x24a205-0x94;let _0x2850b3=_0x41f5f8[_0x24a205];return _0x2850b3;},_0x24a2(_0x4abfef,_0x5bf3a8);}var I=(_0x1e08bc=>(_0x1e08bc[_0x1e08bc['OpenOrReOpen']=0x0]=_0x570388(0xd7),_0x1e08bc[_0x1e08bc[_0x570388(0xdc)]=0x1]=_0x570388(0xdc),_0x1e08bc[_0x1e08bc[_0x570388(0xf7)]=-0x1]=_0x570388(0xf7),_0x1e08bc))(I||{}),v=(_0xce858f=>(_0xce858f[_0xce858f[_0x570388(0xa4)]=0x0]=_0x570388(0xa4),_0xce858f[_0xce858f[_0x570388(0xdd)]=0x1]=_0x570388(0xdd),_0xce858f[_0xce858f['Reply']=0x2]=_0x570388(0x102),_0xce858f[_0xce858f[_0x570388(0x10f)]=0x3]=_0x570388(0x10f),_0xce858f[_0xce858f[_0x570388(0xae)]=0x4]=_0x570388(0xae),_0xce858f[_0xce858f[_0x570388(0x110)]=0x5]=_0x570388(0x110),_0xce858f[_0xce858f[_0x570388(0xf7)]=-0x1]=_0x570388(0xf7),_0xce858f))(v||{});const f=_0xeeee4c=>c[_0x570388(0xdb)](new Date(+_0xeeee4c))[_0x570388(0xc5)](_0x570388(0x108)),R=async(_0x53b8a9,_0x1cb4b4)=>{const _0x4ec091=_0x570388,_0x2e6fb4=_0x53b8a9[_0x4ec091(0x104)](c['UserManagerService']),_0x46ea82=_0x53b8a9[_0x4ec091(0x104)](P[_0x4ec091(0xf2)]);_0x1cb4b4[_0x4ec091(0x9d)](_0x198cbd=>{const _0x2e9204=_0x4ec091;_0x2e6fb4[_0x2e9204(0xda)](_0x198cbd)&&_0x1cb4b4[_0x2e9204(0x9f)](_0x198cbd);}),_0x1cb4b4[_0x4ec091(0xaa)]&&(await _0x46ea82['get'](_0x4ec091(0xaf),{'params':{'userIDs':[..._0x1cb4b4]}}))[_0x4ec091(0xe2)]['users'][_0x4ec091(0x9d)](_0x42bbf2=>{_0x42bbf2&&_0x2e6fb4['addUser'](_0x42bbf2);});};var $=Object[_0x570388(0xc7)],E=(_0x42397a,_0x436ff9,_0x3495e1,_0x4a5af6)=>{const _0xcd27b2=_0x570388;for(var _0x18ac51=_0x4a5af6>0x1?void 0x0:_0x4a5af6?$(_0x436ff9,_0x3495e1):_0x436ff9,_0x56fdd9=_0x42397a[_0xcd27b2(0xba)]-0x1,_0x2ce21d;_0x56fdd9>=0x0;_0x56fdd9--)(_0x2ce21d=_0x42397a[_0x56fdd9])&&(_0x18ac51=_0x2ce21d(_0x18ac51)||_0x18ac51);return _0x18ac51;},S=(_0x3a541f,_0x3a5a5a)=>(_0x5b185a,_0x47b7c5)=>_0x3a5a5a(_0x5b185a,_0x47b7c5,_0x3a541f);let _=class extends c[_0x570388(0x107)]{constructor(_0x1c996d,_0x52515c,_0x2470e1,_0x470777){const _0x1707a3=_0x570388;super(),this[_0x1707a3(0xc0)]=_0x1c996d,this['_threadCommentModel']=_0x52515c,this['_userService']=_0x2470e1,this[_0x1707a3(0xc6)]=_0x470777,this[_0x1707a3(0xb8)](),this[_0x1707a3(0x10a)]();}[_0x570388(0x10a)](){const _0x154435=_0x570388;this[_0x154435(0x113)](this[_0x154435(0xb6)][_0x154435(0x95)][_0x154435(0xfa)](j[_0x154435(0xe0)](0x10))[_0x154435(0xe8)](_0x36b362=>{const _0x1596da=_0x154435,_0x2d9d0d=new Set();_0x36b362[_0x1596da(0x9d)](_0x84759f=>{const _0xf089d6=_0x1596da;switch(_0x84759f[_0xf089d6(0xcd)]){case _0xf089d6(0xc9):{const _0x55b9ec=_0x84759f[_0xf089d6(0x9c)]['personId'];_0x2d9d0d[_0xf089d6(0xc9)](_0x55b9ec);break;}}}),R(this[_0x1596da(0xc6)],_0x2d9d0d);}));}[_0x570388(0xb8)](){const _0x139e6c=_0x570388;this[_0x139e6c(0x113)](this[_0x139e6c(0xc0)][_0x139e6c(0x95)][_0x139e6c(0xe8)](async _0x3280a4=>{const _0x3fd12e=_0x139e6c;var _0xd5c2b5,_0x20c297,_0x41f6d8,_0x393fd4;const _0x1630fa=(_0xd5c2b5=this['_threadCommentModel'][_0x3fd12e(0xbd)](_0x3280a4[_0x3fd12e(0xc3)])[_0x3fd12e(0x101)](_0x1a9c95=>_0x1a9c95[_0x3fd12e(0x10b)]===_0x3280a4[_0x3fd12e(0x10b)]))==null?void 0x0:_0xd5c2b5['root'];if(!_0x1630fa)return;const {unitId:_0x5ae795,subUnitId:_0x397441}=_0x1630fa;switch(_0x3280a4[_0x3fd12e(0xa5)]&&this[_0x3fd12e(0xa0)]['addUser'](_0x3280a4[_0x3fd12e(0xa5)]),_0x3280a4[_0x3fd12e(0xcd)]){case v[_0x3fd12e(0xdd)]:break;case v[_0x3fd12e(0x102)]:{this[_0x3fd12e(0xb6)][_0x3fd12e(0xd6)](_0x5ae795,_0x397441,{'unitId':_0x5ae795,'subUnitId':_0x397441,'ref':'','id':_0x3280a4[_0x3fd12e(0x9b)],'dT':f(+_0x3280a4[_0x3fd12e(0xbc)]),'threadId':_0x3280a4[_0x3fd12e(0x10b)],'personId':(_0x41f6d8=(_0x20c297=_0x3280a4['user'])==null?void 0x0:_0x20c297[_0x3fd12e(0xec)])!=null?_0x41f6d8:_0x3280a4[_0x3fd12e(0x112)],'text':JSON[_0x3fd12e(0xce)](_0x3280a4[_0x3fd12e(0x106)]),'parentId':_0x1630fa['id']});break;}case v[_0x3fd12e(0xae)]:{const _0x30f94e=this[_0x3fd12e(0xb6)][_0x3fd12e(0x10d)](_0x5ae795,_0x397441,_0x3280a4[_0x3fd12e(0x9b)]);_0x30f94e&&_0x30f94e[_0x3fd12e(0xe6)]&&this[_0x3fd12e(0xb6)][_0x3fd12e(0xb4)](_0x5ae795,_0x397441,_0x3280a4[_0x3fd12e(0x9b)]);break;}case v[_0x3fd12e(0x10f)]:{this[_0x3fd12e(0xb6)][_0x3fd12e(0xb0)](_0x5ae795,_0x397441,{'commentId':_0x3280a4['replyId'],'text':JSON[_0x3fd12e(0xce)](_0x3280a4[_0x3fd12e(0x106)])});break;}case v[_0x3fd12e(0x110)]:{const _0x30a62e=(_0x393fd4=this[_0x3fd12e(0xb6)][_0x3fd12e(0xbd)](_0x3280a4[_0x3fd12e(0xc3)])[_0x3fd12e(0x101)](_0x1bf325=>_0x1bf325[_0x3fd12e(0x10b)]===_0x3280a4[_0x3fd12e(0x10b)]))==null?void 0x0:_0x393fd4[_0x3fd12e(0x103)];_0x30a62e&&this[_0x3fd12e(0xb6)][_0x3fd12e(0xb9)](_0x5ae795,_0x397441,_0x30a62e['id'],_0x3280a4[_0x3fd12e(0xd2)]===I[_0x3fd12e(0xdc)]);break;}}}));}};_=E([S(0x0,c[_0x570388(0xf5)](b[_0x570388(0xcf)])),S(0x1,c[_0x570388(0xf5)](M[_0x570388(0xee)])),S(0x2,c[_0x570388(0xf5)](c[_0x570388(0xfd)])),S(0x3,c[_0x570388(0xf5)](c[_0x570388(0x105)]))],_);const q=_0x570388(0xf4),D={};var A=Object[_0x570388(0xc7)],x=(_0x13b5d9,_0x1e48e8,_0x5a6fcc,_0xbfa912)=>{for(var _0x1ac175=_0xbfa912>0x1?void 0x0:_0xbfa912?A(_0x1e48e8,_0x5a6fcc):_0x1e48e8,_0x3d8ee1=_0x13b5d9['length']-0x1,_0x32a170;_0x3d8ee1>=0x0;_0x3d8ee1--)(_0x32a170=_0x13b5d9[_0x3d8ee1])&&(_0x1ac175=_0x32a170(_0x1ac175)||_0x1ac175);return _0x1ac175;},C=(_0x38fd7c,_0x8b7afb)=>(_0x4038da,_0x35f570)=>_0x8b7afb(_0x4038da,_0x35f570,_0x38fd7c);function Y(_0x354bda,_0x476ca0){const _0x574ea0=_0x570388,_0x1883a6=_0x354bda['replies'][0x0];return{..._0x476ca0,'id':_0x1883a6[_0x574ea0(0x9b)],'resolved':_0x354bda['solved']===0x1,'dT':f(_0x1883a6['createTimestamp']),'personId':_0x1883a6[_0x574ea0(0x112)],'threadId':_0x1883a6['threadId']};}function _0x41f5(){const _0x27c3b0=['deleteComment','COMMENT','_threadCommentModel','IConfigService','_init','resolveComment','length','/universer-api/comment/unit/','createTimestamp','getUnit','_configService','625iJuwGC','_commentService','3457797uGLieO','CustomRangeType','unitId','/edit','format','_injector','getOwnPropertyDescriptor','/list','add','UniverCollaborationClientPlugin','_threadCommentDataSourceService','map','type','parse','CommentService','_threadCommentDataSource','UniverThreadCommentDataSourcePlugin','solved','getMemberID','onReady','_initDataSource','addComment','OpenOrReOpen','rangeType','rangeId','getUser','dayjs','Solved','Add','comments','toStringTag','bufferTime','slice','body','code','/solved','filter','parentId','requireSession','subscribe','910142RPXXSj','/delete','comment','userID','getCurrentUser','ThreadCommentModel','stringify','_config','pluginName','HTTPService','2127429NbLNib','thread-comment-data-source.config','Inject','addUser','UNRECOGNIZED','UniverInstanceType','_sessionService','pipe','dataSource','4807248PuiLnW','UserManagerService','39rpaGrX','CollaborationSessionService','replies','find','Reply','root','get','Injector','content','Disposable','YYYY/MM/DD\x20HH:mm','users','_initUserSync','threadId','UniverLicensePlugin','getComment','symbol','Edit','Solve','ref','userId','disposeWithMe','setConfig','commentUpdate$','30CviGvZ','Module','defineProperty','syncUpdateMutationToColla','_httpService','replyId','payload','forEach','resolved','delete','_userService','3726QOyZkf','61592rwHaqa','error','Unknown','user','/add','post','values','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','size','UNIVER_UNKNOWN','620100RUidER','saveCommentToSnapshot','Delete','/universer-api/user/list','updateComment','merge','customRanges','DependentOn'];_0x41f5=function(){return _0x27c3b0;};return _0x41f5();}function G(_0x4dbd94,_0x6e46,_0x545057){const _0x5b40a9=_0x570388;var _0x2ab8c3,_0x2ecc36;if(((_0x2ecc36=(_0x2ab8c3=_0x4dbd94==null?void 0x0:_0x4dbd94[_0x5b40a9(0x100)])==null?void 0x0:_0x2ab8c3['length'])!=null?_0x2ecc36:0x0)>0x0){const _0xab2e=(_0x17278c,_0x41d3e3)=>({'id':_0x17278c[_0x5b40a9(0x9b)],'threadId':_0x17278c[_0x5b40a9(0x10b)],'dT':f(_0x17278c[_0x5b40a9(0xbc)]),'personId':_0x17278c['userId'],'resolved':_0x4dbd94['solved']===I['Solved'],'unitId':_0x6e46,'subUnitId':_0x545057,'text':JSON[_0x5b40a9(0xce)](_0x17278c[_0x5b40a9(0x106)]),'parentId':_0x41d3e3}),_0x3e948d=_0xab2e(_0x4dbd94['replies'][0x0]);return{..._0x3e948d,'children':_0x4dbd94[_0x5b40a9(0x100)][_0x5b40a9(0xe1)](0x1)[_0x5b40a9(0xcc)](_0x4d7993=>_0xab2e(_0x4d7993,_0x3e948d['id']))};}return null;}let p=class{constructor(_0x590aa7,_0x2a83e6,_0x3b1604){const _0x4250e4=_0x570388;this[_0x4250e4(0x9a)]=_0x590aa7,this[_0x4250e4(0xa0)]=_0x2a83e6,this[_0x4250e4(0xf9)]=_0x3b1604;}async[_0x570388(0xd6)](_0xf4d42e){const _0xe07f29=_0x570388;var _0x814272,_0x3e24fe;const {parentId:_0x2ddf8b,unitId:_0x547552,text:_0x512a17,threadId:_0x59440b}=_0xf4d42e,_0xfbae8f=(_0x3e24fe=(_0x814272=_0x512a17['customRanges'])==null?void 0x0:_0x814272[_0xe07f29(0xe5)](_0x5f2ab0=>_0x5f2ab0[_0xe07f29(0xd8)]===c[_0xe07f29(0xc2)]['COMMENT'])[_0xe07f29(0xcc)](_0x4194d5=>_0x4194d5[_0xe07f29(0xd9)]))!=null?_0x3e24fe:[],_0x348408=JSON[_0xe07f29(0xef)](_0x512a17),_0x12d779=(await this[_0xe07f29(0xf9)][_0xe07f29(0xe7)](_0x547552))[_0xe07f29(0xd3)]();if(_0x2ddf8b){const _0x58b8f1={'memberId':_0x12d779,'unitId':_0x547552,'content':_0x348408,'mention':_0xfbae8f,'threadId':_0x59440b},_0x192037=(await this[_0xe07f29(0x9a)]['post'](_0xe07f29(0xbb)+_0x547552+'/reply',{'body':_0x58b8f1}))[_0xe07f29(0xe2)]['reply'];return{..._0xf4d42e,'id':_0x192037[_0xe07f29(0x9b)],'dT':c[_0xe07f29(0xdb)](+_0x192037[_0xe07f29(0xbc)])[_0xe07f29(0xc5)](_0xe07f29(0x108)),'personId':_0x192037[_0xe07f29(0x112)]};}else{const _0x32c742={'memberId':_0x12d779,'unitId':_0x547552,'content':_0x348408,'mention':_0xfbae8f},_0x452ba6=await this[_0xe07f29(0x9a)][_0xe07f29(0xa7)]('/universer-api/comment/unit/'+_0x547552+_0xe07f29(0xa6),{'body':_0x32c742});return Y(_0x452ba6[_0xe07f29(0xe2)][_0xe07f29(0xeb)],_0xf4d42e);}}async[_0x570388(0xb0)](_0x308c52){const _0x6ccecc=_0x570388;var _0x308888,_0x2538f9;const {text:_0x176954,unitId:_0x14d24f}=_0x308c52,_0x49ccfa=(_0x2538f9=(_0x308888=_0x176954[_0x6ccecc(0xb2)])==null?void 0x0:_0x308888[_0x6ccecc(0xe5)](_0xa5e419=>_0xa5e419[_0x6ccecc(0xd8)]===c[_0x6ccecc(0xc2)][_0x6ccecc(0xb5)])[_0x6ccecc(0xcc)](_0x4bc6fb=>_0x4bc6fb[_0x6ccecc(0xd9)]))!=null?_0x2538f9:[],_0x2c271c=JSON[_0x6ccecc(0xef)](_0x176954),_0x2cb8c3=_0x308c52['threadId'],_0x517225=_0x308c52['id'],_0x4eaead={'memberId':(await this[_0x6ccecc(0xf9)]['requireSession'](_0x14d24f))[_0x6ccecc(0xd3)](),'unitId':_0x14d24f,'threadId':_0x2cb8c3,'mention':_0x49ccfa,'content':_0x2c271c,'replyId':_0x517225},_0x5a26ac=await this[_0x6ccecc(0x9a)][_0x6ccecc(0xa7)](_0x6ccecc(0xbb)+_0x14d24f+_0x6ccecc(0xc4),{'body':_0x4eaead});return!_0x5a26ac['body'][_0x6ccecc(0xa3)]||_0x5a26ac[_0x6ccecc(0xe2)][_0x6ccecc(0xa3)][_0x6ccecc(0xe3)]===0x1;}async[_0x570388(0xb9)](_0x3f2cfc){const _0x24743e=_0x570388,{unitId:_0x40d77e}=_0x3f2cfc,_0x130122=_0x3f2cfc[_0x24743e(0x10b)],_0x2f608c={'memberId':this['_userService'][_0x24743e(0xed)]()[_0x24743e(0xec)],'unitId':_0x40d77e,'threadId':_0x130122,'solved':_0x3f2cfc[_0x24743e(0x9e)]?I['Solved']:I[_0x24743e(0xd7)]},_0x2095e0=await this[_0x24743e(0x9a)][_0x24743e(0xa7)]('/universer-api/comment/unit/'+_0x40d77e+_0x24743e(0xe4),{'body':_0x2f608c});return!_0x2095e0['body'][_0x24743e(0xa3)]||_0x2095e0['body'][_0x24743e(0xa3)][_0x24743e(0xe3)]===0x1;}async[_0x570388(0xb4)](_0x129b76,_0x4ffee3,_0x2db611,_0x40d899){const _0x31defb=_0x570388,_0x371ba9={'memberId':(await this[_0x31defb(0xf9)][_0x31defb(0xe7)](_0x129b76))[_0x31defb(0xd3)](),'threadId':_0x2db611,'replyId':_0x40d899,'unitId':_0x129b76},_0x8f9f7c=await this[_0x31defb(0x9a)][_0x31defb(0xa7)](_0x31defb(0xbb)+_0x129b76+_0x31defb(0xea),{'body':_0x371ba9});return!_0x8f9f7c['body'][_0x31defb(0xa3)]||_0x8f9f7c['body'][_0x31defb(0xa3)][_0x31defb(0xe3)]===0x1;}async['listComments'](_0x34490d,_0x48389b,_0xb7af50){const _0x206a81=_0x570388,_0x46d878={'unitId':_0x34490d,'threadId':_0xb7af50},_0x13f1f0=await this[_0x206a81(0x9a)]['post']('/universer-api/comment/unit/'+_0x34490d+_0x206a81(0xc8),{'body':_0x46d878}),_0x1fbb18=_0xb7af50[_0x206a81(0xcc)](_0x42ed2e=>G(_0x13f1f0[_0x206a81(0xe2)][_0x206a81(0xde)][_0x42ed2e],_0x34490d,_0x48389b))['filter'](Boolean);return Object[_0x206a81(0xa8)](_0x13f1f0[_0x206a81(0xe2)][_0x206a81(0x109)])[_0x206a81(0x9d)](_0x2fe6a5=>{const _0x5d4fef=_0x206a81;this[_0x5d4fef(0xa0)][_0x5d4fef(0xf6)](_0x2fe6a5);}),_0x1fbb18;}[_0x570388(0xad)](_0x56c9b7){const _0x13bced=_0x570388;return{'id':_0x56c9b7['id'],'threadId':_0x56c9b7['threadId'],'ref':_0x56c9b7[_0x13bced(0x111)]};}};p=x([C(0x0,c[_0x570388(0xf5)](P[_0x570388(0xf2)])),C(0x1,c['Inject'](c[_0x570388(0xfd)])),C(0x2,c[_0x570388(0xf5)](b[_0x570388(0xff)]))],p);var H=Object[_0x570388(0xc7)],J=(_0x5a9159,_0x28f027,_0x2bce42,_0x3e3e91)=>{const _0x34bd03=_0x570388;for(var _0x4cfb62=_0x3e3e91>0x1?void 0x0:_0x3e3e91?H(_0x28f027,_0x2bce42):_0x28f027,_0x345e35=_0x5a9159[_0x34bd03(0xba)]-0x1,_0x337597;_0x345e35>=0x0;_0x345e35--)(_0x337597=_0x5a9159[_0x345e35])&&(_0x4cfb62=_0x337597(_0x4cfb62)||_0x4cfb62);return _0x4cfb62;},y=(_0x3dd2cd,_0x36b059)=>(_0x3e946a,_0x3d22c1)=>_0x36b059(_0x3e946a,_0x3d22c1,_0x3dd2cd);let g=class extends c[_0x570388(0x107)]{constructor(_0x9cecbd,_0x195d7f){const _0xdadb6e=_0x570388;super(),this['_threadCommentDataSourceService']=_0x9cecbd,this[_0xdadb6e(0xd0)]=_0x195d7f,this[_0xdadb6e(0xd5)]();}[_0x570388(0xd5)](){const _0x4cdba7=_0x570388;this[_0x4cdba7(0xcb)][_0x4cdba7(0xfb)]=this[_0x4cdba7(0xd0)],this[_0x4cdba7(0xcb)][_0x4cdba7(0x99)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x570388(0xf5)](p))],g);var F=Object[_0x570388(0x98)],L=Object['getOwnPropertyDescriptor'],Z=(_0x5b6ff5,_0x5c00f6,_0x2a0ada)=>_0x5c00f6 in _0x5b6ff5?F(_0x5b6ff5,_0x5c00f6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2a0ada}):_0x5b6ff5[_0x5c00f6]=_0x2a0ada,W=(_0x2cbd83,_0x1d7650,_0x551676,_0xdde6ed)=>{const _0x46cc65=_0x570388;for(var _0x5e0974=_0xdde6ed>0x1?void 0x0:_0xdde6ed?L(_0x1d7650,_0x551676):_0x1d7650,_0xd478b2=_0x2cbd83[_0x46cc65(0xba)]-0x1,_0x6beb59;_0xd478b2>=0x0;_0xd478b2--)(_0x6beb59=_0x2cbd83[_0xd478b2])&&(_0x5e0974=_0x6beb59(_0x5e0974)||_0x5e0974);return _0x5e0974;},O=(_0x50559a,_0x547d1e)=>(_0x105111,_0xb0ff6b)=>_0x547d1e(_0x105111,_0xb0ff6b,_0x50559a),N=(_0x32731b,_0x119ffd,_0x583d1d)=>Z(_0x32731b,typeof _0x119ffd!=_0x570388(0x10e)?_0x119ffd+'':_0x119ffd,_0x583d1d);exports[_0x570388(0xd1)]=class extends c['Plugin']{constructor(_0x551c14=D,_0xa6bc0c,_0x40f86c){const _0x3177fe=_0x570388;super(),this[_0x3177fe(0xf0)]=_0x551c14,this[_0x3177fe(0xc6)]=_0xa6bc0c,this[_0x3177fe(0xbe)]=_0x40f86c;const {..._0x103a89}=c[_0x3177fe(0xb1)]({},D,this[_0x3177fe(0xf0)]);this['_configService'][_0x3177fe(0x94)](q,_0x103a89);}['onStarting'](){const _0x2c7646=_0x570388;[[p],[g],[_]][_0x2c7646(0x9d)](_0x1a0cb0=>{const _0x4e19df=_0x2c7646;this[_0x4e19df(0xc6)]['add'](_0x1a0cb0);});}[_0x570388(0xd4)](){const _0x33ce4c=_0x570388;this['_injector'][_0x33ce4c(0x104)](g),this[_0x33ce4c(0xc6)]['get'](_);}},N(exports[_0x570388(0xd1)],_0x570388(0xf1),U),N(exports[_0x570388(0xd1)],_0x570388(0xcd),c[_0x570388(0xf8)][_0x570388(0xab)]),exports[_0x570388(0xd1)]=W([c[_0x570388(0xb3)](w['UniverThreadCommentUIPlugin'],b[_0x570388(0xca)],T[_0x570388(0x10c)]),O(0x1,c[_0x570388(0xf5)](c['Injector'])),O(0x2,c[_0x570388(0xb7)])],exports[_0x570388(0xd1)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x39abda=_0x254a;function _0x20ae(){const _0x38050d=['requireSession','size','/edit','_configService','2639pTrTJh','Solve','Solved','subscribe','comment','resolved','body','parentId','replies','getUnit','slice','OpenOrReOpen','resolveComment','YYYY/MM/DD\x20HH:mm','unitId','8snNQrz','threadId','/solved','onStarting','userId','_threadCommentDataSource','1105840DmKyWZ','rangeId','users','values','content','reply','3770667hHByLq','UNRECOGNIZED','stringify','post','11Rcsywb','getComment','2031954ytrDuq','error','addUser','COMMENT','Delete','_sessionService','11798470hmefXu','UNIVER_UNKNOWN','_threadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getUser','replyId','comments','8242SQBInI','add','delete','root','26484ELVTFb','_userService','_initDataSource','Add','_threadCommentDataSourceService','pluginName','getCurrentUser','userID','solved','get','format','customRanges','getMemberID','/list','user','getOwnPropertyDescriptor','_init','filter','createTimestamp','Reply','length','/universer-api/user/list','1154qBnPjD','onReady','thread-comment-data-source.config','updateComment','/universer-api/comment/unit/','3349983MqwtgJ','_httpService','parse','disposeWithMe','_commentService','rangeType','code','Edit','_injector','type','pipe','find','15HmQshf','addComment','21KXauGo','forEach','listComments','dataSource','payload','commentUpdate$','symbol','_initUserSync','_config','ref','map'];_0x20ae=function(){return _0x38050d;};return _0x20ae();}(function(_0x11a44b,_0x29f598){const _0x4bb57f=_0x254a,_0x54db8d=_0x11a44b();while(!![]){try{const _0x4829dd=-parseInt(_0x4bb57f(0x1b9))/0x1*(-parseInt(_0x4bb57f(0x197))/0x2)+-parseInt(_0x4bb57f(0x19c))/0x3+-parseInt(_0x4bb57f(0x164))/0x4*(-parseInt(_0x4bb57f(0x1a8))/0x5)+parseInt(_0x4bb57f(0x170))/0x6*(-parseInt(_0x4bb57f(0x1aa))/0x7)+-parseInt(_0x4bb57f(0x15e))/0x8*(-parseInt(_0x4bb57f(0x16a))/0x9)+-parseInt(_0x4bb57f(0x176))/0xa*(parseInt(_0x4bb57f(0x16e))/0xb)+parseInt(_0x4bb57f(0x181))/0xc*(parseInt(_0x4bb57f(0x17d))/0xd);if(_0x4829dd===_0x29f598)break;else _0x54db8d['push'](_0x54db8d['shift']());}catch(_0x4e46a7){_0x54db8d['push'](_0x54db8d['shift']());}}}(_0x20ae,0xd16c7));import{CommentService as _0x180f07,CollaborationSessionService as _0x39372f,UniverCollaborationClientPlugin as _0x3510e5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x153641}from'@univerjs-pro/license';import{dayjs as _0x4e4634,UserManagerService as _0xddf515,Inject as _0x53a3d7,Injector as _0x3d62de,Disposable as _0x3e38bb,CustomRangeType as _0x484fd6,UniverInstanceType as _0xa6b08c,DependentOn as _0x13968e,IConfigService as _0x380b95,Plugin as _0x220026,merge as _0x468d5d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x95d4a2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x391da1,IThreadCommentDataSourceService as _0x33f6d5}from'@univerjs/thread-comment';import{bufferTime as _0x38dd9a}from'rxjs';import{HTTPService as _0x3008e2}from'@univerjs/network';const W=_0x39abda(0x179);var I=(_0x812362=>(_0x812362[_0x812362[_0x39abda(0x15a)]=0x0]=_0x39abda(0x15a),_0x812362[_0x812362['Solved']=0x1]=_0x39abda(0x1bb),_0x812362[_0x812362[_0x39abda(0x16b)]=-0x1]=_0x39abda(0x16b),_0x812362))(I||{}),v=(_0x3cc1ba=>(_0x3cc1ba[_0x3cc1ba['Unknown']=0x0]='Unknown',_0x3cc1ba[_0x3cc1ba[_0x39abda(0x184)]=0x1]=_0x39abda(0x184),_0x3cc1ba[_0x3cc1ba[_0x39abda(0x194)]=0x2]=_0x39abda(0x194),_0x3cc1ba[_0x3cc1ba['Edit']=0x3]=_0x39abda(0x1a3),_0x3cc1ba[_0x3cc1ba[_0x39abda(0x174)]=0x4]=_0x39abda(0x174),_0x3cc1ba[_0x3cc1ba['Solve']=0x5]=_0x39abda(0x1ba),_0x3cc1ba[_0x3cc1ba[_0x39abda(0x16b)]=-0x1]=_0x39abda(0x16b),_0x3cc1ba))(v||{});function _0x254a(_0x52bd6e,_0x1c56ad){const _0x20aea5=_0x20ae();return _0x254a=function(_0x254ab4,_0x1c845a){_0x254ab4=_0x254ab4-0x152;let _0x5b822b=_0x20aea5[_0x254ab4];return _0x5b822b;},_0x254a(_0x52bd6e,_0x1c56ad);}const y=_0x50e37d=>_0x4e4634(new Date(+_0x50e37d))['format'](_0x39abda(0x15c)),B=async(_0x4acf47,_0x315432)=>{const _0x582387=_0x39abda,_0x4b08fb=_0x4acf47['get'](_0xddf515),_0x5dd19b=_0x4acf47[_0x582387(0x18a)](_0x3008e2);_0x315432[_0x582387(0x1ab)](_0x3542e5=>{const _0x475605=_0x582387;_0x4b08fb[_0x475605(0x17a)](_0x3542e5)&&_0x315432[_0x475605(0x17f)](_0x3542e5);}),_0x315432[_0x582387(0x1b6)]&&(await _0x5dd19b[_0x582387(0x18a)](_0x582387(0x196),{'params':{'userIDs':[..._0x315432]}}))[_0x582387(0x155)][_0x582387(0x166)][_0x582387(0x1ab)](_0x27fda8=>{const _0x2fb417=_0x582387;_0x27fda8&&_0x4b08fb[_0x2fb417(0x172)](_0x27fda8);});};var K=Object[_0x39abda(0x190)],V=(_0x512784,_0x3112ed,_0xd7e388,_0x292e65)=>{const _0x42a5f0=_0x39abda;for(var _0x58df18=_0x292e65>0x1?void 0x0:_0x292e65?K(_0x3112ed,_0xd7e388):_0x3112ed,_0x264401=_0x512784[_0x42a5f0(0x195)]-0x1,_0x387b9d;_0x264401>=0x0;_0x264401--)(_0x387b9d=_0x512784[_0x264401])&&(_0x58df18=_0x387b9d(_0x58df18)||_0x58df18);return _0x58df18;},p=(_0x27558a,_0x48114c)=>(_0x2725e1,_0x52ee93)=>_0x48114c(_0x2725e1,_0x52ee93,_0x27558a);let _=class extends _0x3e38bb{constructor(_0x14677a,_0x3b210e,_0x5b3b01,_0x769463){const _0x5af6af=_0x39abda;super(),this[_0x5af6af(0x1a0)]=_0x14677a,this[_0x5af6af(0x178)]=_0x3b210e,this[_0x5af6af(0x182)]=_0x5b3b01,this[_0x5af6af(0x1a4)]=_0x769463,this[_0x5af6af(0x191)](),this[_0x5af6af(0x1b1)]();}['_initUserSync'](){const _0x2144f9=_0x39abda;this[_0x2144f9(0x19f)](this[_0x2144f9(0x178)][_0x2144f9(0x1af)][_0x2144f9(0x1a6)](_0x38dd9a(0x10))[_0x2144f9(0x152)](_0x1468d6=>{const _0x5e63f7=new Set();_0x1468d6['forEach'](_0x2b52d8=>{const _0xde654=_0x254a;switch(_0x2b52d8['type']){case'add':{const _0x42c3b7=_0x2b52d8[_0xde654(0x1ae)]['personId'];_0x5e63f7[_0xde654(0x17e)](_0x42c3b7);break;}}}),B(this['_injector'],_0x5e63f7);}));}['_init'](){const _0x20126d=_0x39abda;this[_0x20126d(0x19f)](this['_commentService'][_0x20126d(0x1af)][_0x20126d(0x152)](async _0x592e4d=>{const _0x1b6ad2=_0x20126d;var _0x3467d0,_0xd6be2f,_0x19ccdb,_0x27236c;const _0x1a02b7=(_0x3467d0=this[_0x1b6ad2(0x178)][_0x1b6ad2(0x158)](_0x592e4d['unitId'])[_0x1b6ad2(0x1a7)](_0x482880=>_0x482880[_0x1b6ad2(0x15f)]===_0x592e4d[_0x1b6ad2(0x15f)]))==null?void 0x0:_0x3467d0['root'];if(!_0x1a02b7)return;const {unitId:_0x5c955a,subUnitId:_0x5d8c9f}=_0x1a02b7;switch(_0x592e4d[_0x1b6ad2(0x18f)]&&this['_userService'][_0x1b6ad2(0x172)](_0x592e4d['user']),_0x592e4d[_0x1b6ad2(0x1a5)]){case v[_0x1b6ad2(0x184)]:break;case v[_0x1b6ad2(0x194)]:{this['_threadCommentModel'][_0x1b6ad2(0x1a9)](_0x5c955a,_0x5d8c9f,{'unitId':_0x5c955a,'subUnitId':_0x5d8c9f,'ref':'','id':_0x592e4d[_0x1b6ad2(0x17b)],'dT':y(+_0x592e4d[_0x1b6ad2(0x193)]),'threadId':_0x592e4d[_0x1b6ad2(0x15f)],'personId':(_0x19ccdb=(_0xd6be2f=_0x592e4d[_0x1b6ad2(0x18f)])==null?void 0x0:_0xd6be2f[_0x1b6ad2(0x188)])!=null?_0x19ccdb:_0x592e4d[_0x1b6ad2(0x162)],'text':JSON['parse'](_0x592e4d[_0x1b6ad2(0x168)]),'parentId':_0x1a02b7['id']});break;}case v[_0x1b6ad2(0x174)]:{const _0x46c585=this[_0x1b6ad2(0x178)][_0x1b6ad2(0x16f)](_0x5c955a,_0x5d8c9f,_0x592e4d[_0x1b6ad2(0x17b)]);_0x46c585&&_0x46c585[_0x1b6ad2(0x156)]&&this[_0x1b6ad2(0x178)]['deleteComment'](_0x5c955a,_0x5d8c9f,_0x592e4d[_0x1b6ad2(0x17b)]);break;}case v[_0x1b6ad2(0x1a3)]:{this[_0x1b6ad2(0x178)]['updateComment'](_0x5c955a,_0x5d8c9f,{'commentId':_0x592e4d[_0x1b6ad2(0x17b)],'text':JSON[_0x1b6ad2(0x19e)](_0x592e4d['content'])});break;}case v[_0x1b6ad2(0x1ba)]:{const _0x5cd376=(_0x27236c=this['_threadCommentModel'][_0x1b6ad2(0x158)](_0x592e4d[_0x1b6ad2(0x15d)])['find'](_0x22f234=>_0x22f234[_0x1b6ad2(0x15f)]===_0x592e4d[_0x1b6ad2(0x15f)]))==null?void 0x0:_0x27236c[_0x1b6ad2(0x180)];_0x5cd376&&this[_0x1b6ad2(0x178)][_0x1b6ad2(0x15b)](_0x5c955a,_0x5d8c9f,_0x5cd376['id'],_0x592e4d[_0x1b6ad2(0x189)]===I[_0x1b6ad2(0x1bb)]);break;}}}));}};_=V([p(0x0,_0x53a3d7(_0x180f07)),p(0x1,_0x53a3d7(_0x391da1)),p(0x2,_0x53a3d7(_0xddf515)),p(0x3,_0x53a3d7(_0x3d62de))],_);const z=_0x39abda(0x199),O={};var k=Object[_0x39abda(0x190)],Q=(_0x4a6ee5,_0x1fd566,_0x5b7ea2,_0x3bbda1)=>{const _0x1813a7=_0x39abda;for(var _0x5d5454=_0x3bbda1>0x1?void 0x0:_0x3bbda1?k(_0x1fd566,_0x5b7ea2):_0x1fd566,_0x24e0c4=_0x4a6ee5[_0x1813a7(0x195)]-0x1,_0x34c393;_0x24e0c4>=0x0;_0x24e0c4--)(_0x34c393=_0x4a6ee5[_0x24e0c4])&&(_0x5d5454=_0x34c393(_0x5d5454)||_0x5d5454);return _0x5d5454;},b=(_0x577f04,_0x4a0fd2)=>(_0x40684b,_0x3a310f)=>_0x4a0fd2(_0x40684b,_0x3a310f,_0x577f04);function X(_0x416e16,_0x4befb3){const _0x76a828=_0x39abda,_0x2175d2=_0x416e16[_0x76a828(0x157)][0x0];return{..._0x4befb3,'id':_0x2175d2[_0x76a828(0x17b)],'resolved':_0x416e16[_0x76a828(0x189)]===0x1,'dT':y(_0x2175d2[_0x76a828(0x193)]),'personId':_0x2175d2['userId'],'threadId':_0x2175d2[_0x76a828(0x15f)]};}function ee(_0x5c30d8,_0x11bc79,_0x306724){const _0x151e96=_0x39abda;var _0x38618b,_0x405c38;if(((_0x405c38=(_0x38618b=_0x5c30d8==null?void 0x0:_0x5c30d8['replies'])==null?void 0x0:_0x38618b[_0x151e96(0x195)])!=null?_0x405c38:0x0)>0x0){const _0x54ed64=(_0x1707d2,_0x3b4b7f)=>({'id':_0x1707d2[_0x151e96(0x17b)],'threadId':_0x1707d2[_0x151e96(0x15f)],'dT':y(_0x1707d2[_0x151e96(0x193)]),'personId':_0x1707d2['userId'],'resolved':_0x5c30d8[_0x151e96(0x189)]===I[_0x151e96(0x1bb)],'unitId':_0x11bc79,'subUnitId':_0x306724,'text':JSON[_0x151e96(0x19e)](_0x1707d2[_0x151e96(0x168)]),'parentId':_0x3b4b7f}),_0x3d6040=_0x54ed64(_0x5c30d8['replies'][0x0]);return{..._0x3d6040,'children':_0x5c30d8['replies'][_0x151e96(0x159)](0x1)[_0x151e96(0x1b4)](_0x3062a5=>_0x54ed64(_0x3062a5,_0x3d6040['id']))};}return null;}let S=class{constructor(_0x23a61b,_0x47bc4c,_0x532d40){const _0x423867=_0x39abda;this[_0x423867(0x19d)]=_0x23a61b,this[_0x423867(0x182)]=_0x47bc4c,this[_0x423867(0x175)]=_0x532d40;}async[_0x39abda(0x1a9)](_0x45935f){const _0x3b8f7d=_0x39abda;var _0x1b960d,_0x4e4da2;const {parentId:_0x4eddb1,unitId:_0x1bd439,text:_0x235729,threadId:_0x5d2292}=_0x45935f,_0x4873b4=(_0x4e4da2=(_0x1b960d=_0x235729[_0x3b8f7d(0x18c)])==null?void 0x0:_0x1b960d[_0x3b8f7d(0x192)](_0xd383b3=>_0xd383b3[_0x3b8f7d(0x1a1)]===_0x484fd6['COMMENT'])[_0x3b8f7d(0x1b4)](_0x3cda7c=>_0x3cda7c[_0x3b8f7d(0x165)]))!=null?_0x4e4da2:[],_0x502b20=JSON['stringify'](_0x235729),_0x48ebf0=(await this[_0x3b8f7d(0x175)][_0x3b8f7d(0x1b5)](_0x1bd439))[_0x3b8f7d(0x18d)]();if(_0x4eddb1){const _0x5e9785={'memberId':_0x48ebf0,'unitId':_0x1bd439,'content':_0x502b20,'mention':_0x4873b4,'threadId':_0x5d2292},_0x3582f8=(await this['_httpService'][_0x3b8f7d(0x16d)](_0x3b8f7d(0x19b)+_0x1bd439+'/reply',{'body':_0x5e9785}))['body'][_0x3b8f7d(0x169)];return{..._0x45935f,'id':_0x3582f8[_0x3b8f7d(0x17b)],'dT':_0x4e4634(+_0x3582f8['createTimestamp'])[_0x3b8f7d(0x18b)](_0x3b8f7d(0x15c)),'personId':_0x3582f8[_0x3b8f7d(0x162)]};}else{const _0x487c06={'memberId':_0x48ebf0,'unitId':_0x1bd439,'content':_0x502b20,'mention':_0x4873b4},_0x138f9b=await this['_httpService'][_0x3b8f7d(0x16d)](_0x3b8f7d(0x19b)+_0x1bd439+'/add',{'body':_0x487c06});return X(_0x138f9b['body'][_0x3b8f7d(0x153)],_0x45935f);}}async[_0x39abda(0x19a)](_0x4c233c){const _0x58da9c=_0x39abda;var _0x518ed5,_0x5c95a3;const {text:_0x1f6cd1,unitId:_0x672090}=_0x4c233c,_0x22b7d2=(_0x5c95a3=(_0x518ed5=_0x1f6cd1['customRanges'])==null?void 0x0:_0x518ed5[_0x58da9c(0x192)](_0x4ae2d3=>_0x4ae2d3[_0x58da9c(0x1a1)]===_0x484fd6[_0x58da9c(0x173)])[_0x58da9c(0x1b4)](_0x4b130b=>_0x4b130b[_0x58da9c(0x165)]))!=null?_0x5c95a3:[],_0x32634a=JSON[_0x58da9c(0x16c)](_0x1f6cd1),_0x362017=_0x4c233c[_0x58da9c(0x15f)],_0x20b9fa=_0x4c233c['id'],_0x17081c={'memberId':(await this['_sessionService'][_0x58da9c(0x1b5)](_0x672090))[_0x58da9c(0x18d)](),'unitId':_0x672090,'threadId':_0x362017,'mention':_0x22b7d2,'content':_0x32634a,'replyId':_0x20b9fa},_0x235491=await this['_httpService'][_0x58da9c(0x16d)](_0x58da9c(0x19b)+_0x672090+_0x58da9c(0x1b7),{'body':_0x17081c});return!_0x235491[_0x58da9c(0x155)]['error']||_0x235491['body'][_0x58da9c(0x171)][_0x58da9c(0x1a2)]===0x1;}async[_0x39abda(0x15b)](_0x5f0c0a){const _0x1867d=_0x39abda,{unitId:_0x386887}=_0x5f0c0a,_0x4c6d68=_0x5f0c0a[_0x1867d(0x15f)],_0x27c5eb={'memberId':this[_0x1867d(0x182)][_0x1867d(0x187)]()[_0x1867d(0x188)],'unitId':_0x386887,'threadId':_0x4c6d68,'solved':_0x5f0c0a[_0x1867d(0x154)]?I[_0x1867d(0x1bb)]:I[_0x1867d(0x15a)]},_0x326f61=await this[_0x1867d(0x19d)][_0x1867d(0x16d)](_0x1867d(0x19b)+_0x386887+_0x1867d(0x160),{'body':_0x27c5eb});return!_0x326f61[_0x1867d(0x155)][_0x1867d(0x171)]||_0x326f61[_0x1867d(0x155)]['error'][_0x1867d(0x1a2)]===0x1;}async['deleteComment'](_0x561fb6,_0x261754,_0x49a5e4,_0x33e362){const _0x1f30e3=_0x39abda,_0x29c3b8={'memberId':(await this['_sessionService'][_0x1f30e3(0x1b5)](_0x561fb6))['getMemberID'](),'threadId':_0x49a5e4,'replyId':_0x33e362,'unitId':_0x561fb6},_0x52e1a9=await this[_0x1f30e3(0x19d)][_0x1f30e3(0x16d)](_0x1f30e3(0x19b)+_0x561fb6+'/delete',{'body':_0x29c3b8});return!_0x52e1a9[_0x1f30e3(0x155)]['error']||_0x52e1a9[_0x1f30e3(0x155)]['error']['code']===0x1;}async[_0x39abda(0x1ac)](_0x2a55c1,_0x1d175a,_0x5dcad8){const _0x2dbb22=_0x39abda,_0x13fc5e={'unitId':_0x2a55c1,'threadId':_0x5dcad8},_0x27cfec=await this[_0x2dbb22(0x19d)][_0x2dbb22(0x16d)](_0x2dbb22(0x19b)+_0x2a55c1+_0x2dbb22(0x18e),{'body':_0x13fc5e}),_0x141578=_0x5dcad8[_0x2dbb22(0x1b4)](_0x4a2238=>ee(_0x27cfec[_0x2dbb22(0x155)][_0x2dbb22(0x17c)][_0x4a2238],_0x2a55c1,_0x1d175a))['filter'](Boolean);return Object[_0x2dbb22(0x167)](_0x27cfec[_0x2dbb22(0x155)][_0x2dbb22(0x166)])[_0x2dbb22(0x1ab)](_0x26376e=>{const _0x20ea9c=_0x2dbb22;this['_userService'][_0x20ea9c(0x172)](_0x26376e);}),_0x141578;}['saveCommentToSnapshot'](_0x244c76){const _0xd13ddb=_0x39abda;return{'id':_0x244c76['id'],'threadId':_0x244c76[_0xd13ddb(0x15f)],'ref':_0x244c76[_0xd13ddb(0x1b3)]};}};S=Q([b(0x0,_0x53a3d7(_0x3008e2)),b(0x1,_0x53a3d7(_0xddf515)),b(0x2,_0x53a3d7(_0x39372f))],S);var re=Object[_0x39abda(0x190)],te=(_0x2003fb,_0x117432,_0x1e53f9,_0x1c6a71)=>{const _0x5b8d83=_0x39abda;for(var _0x1538df=_0x1c6a71>0x1?void 0x0:_0x1c6a71?re(_0x117432,_0x1e53f9):_0x117432,_0x2fbc47=_0x2003fb[_0x5b8d83(0x195)]-0x1,_0x40cc79;_0x2fbc47>=0x0;_0x2fbc47--)(_0x40cc79=_0x2003fb[_0x2fbc47])&&(_0x1538df=_0x40cc79(_0x1538df)||_0x1538df);return _0x1538df;},M=(_0x43695d,_0x316986)=>(_0x426000,_0x55516b)=>_0x316986(_0x426000,_0x55516b,_0x43695d);let f=class extends _0x3e38bb{constructor(_0x1bdd6d,_0x150809){const _0x45bf1b=_0x39abda;super(),this[_0x45bf1b(0x185)]=_0x1bdd6d,this[_0x45bf1b(0x163)]=_0x150809,this['_initDataSource']();}[_0x39abda(0x183)](){const _0x3f8252=_0x39abda;this[_0x3f8252(0x185)][_0x3f8252(0x1ad)]=this[_0x3f8252(0x163)],this[_0x3f8252(0x185)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x33f6d5),M(0x1,_0x53a3d7(S))],f);var se=Object['defineProperty'],oe=Object[_0x39abda(0x190)],ne=(_0x23e56d,_0x42a81b,_0x41eb82)=>_0x42a81b in _0x23e56d?se(_0x23e56d,_0x42a81b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x41eb82}):_0x23e56d[_0x42a81b]=_0x41eb82,ie=(_0xc2203d,_0x119b30,_0x2ca147,_0x1dcbaa)=>{const _0x361020=_0x39abda;for(var _0x21d75d=_0x1dcbaa>0x1?void 0x0:_0x1dcbaa?oe(_0x119b30,_0x2ca147):_0x119b30,_0x23cd19=_0xc2203d[_0x361020(0x195)]-0x1,_0x4ac972;_0x23cd19>=0x0;_0x23cd19--)(_0x4ac972=_0xc2203d[_0x23cd19])&&(_0x21d75d=_0x4ac972(_0x21d75d)||_0x21d75d);return _0x21d75d;},N=(_0x422f37,_0x5a9302)=>(_0x5d68cb,_0x30eb6e)=>_0x5a9302(_0x5d68cb,_0x30eb6e,_0x422f37),$=(_0x17f253,_0x5dcd88,_0x194336)=>ne(_0x17f253,typeof _0x5dcd88!=_0x39abda(0x1b0)?_0x5dcd88+'':_0x5dcd88,_0x194336);let g=class extends _0x220026{constructor(_0x83e8ee=O,_0x54d0bf,_0x4f940b){const _0x2599fe=_0x39abda;super(),this['_config']=_0x83e8ee,this['_injector']=_0x54d0bf,this[_0x2599fe(0x1b8)]=_0x4f940b;const {..._0x2cbde1}=_0x468d5d({},O,this[_0x2599fe(0x1b2)]);this['_configService']['setConfig'](z,_0x2cbde1);}[_0x39abda(0x161)](){[[S],[f],[_]]['forEach'](_0x4f93e3=>{this['_injector']['add'](_0x4f93e3);});}[_0x39abda(0x198)](){const _0x18906d=_0x39abda;this[_0x18906d(0x1a4)][_0x18906d(0x18a)](f),this[_0x18906d(0x1a4)]['get'](_);}};$(g,_0x39abda(0x186),W),$(g,'type',_0xa6b08c[_0x39abda(0x177)]),g=ie([_0x13968e(_0x95d4a2,_0x3510e5,_0x153641),N(0x1,_0x53a3d7(_0x3d62de)),N(0x2,_0x380b95)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x59ea57=_0x264e;function _0x264e(_0x359968,_0x411b3){const _0x7619d4=_0x7619();return _0x264e=function(_0x264ef0,_0x15444f){_0x264ef0=_0x264ef0-0x16e;let _0x2aaf03=_0x7619d4[_0x264ef0];return _0x2aaf03;},_0x264e(_0x359968,_0x411b3);}(function(_0x1f465c,_0x3b303){const _0xdc7ff7=_0x264e,_0x1dc9f3=_0x1f465c();while(!![]){try{const _0x538dba=parseInt(_0xdc7ff7(0x1b4))/0x1+parseInt(_0xdc7ff7(0x1ca))/0x2+parseInt(_0xdc7ff7(0x1b3))/0x3+parseInt(_0xdc7ff7(0x1bd))/0x4+-parseInt(_0xdc7ff7(0x1c4))/0x5+-parseInt(_0xdc7ff7(0x1b8))/0x6*(parseInt(_0xdc7ff7(0x1a1))/0x7)+-parseInt(_0xdc7ff7(0x174))/0x8*(-parseInt(_0xdc7ff7(0x172))/0x9);if(_0x538dba===_0x3b303)break;else _0x1dc9f3['push'](_0x1dc9f3['shift']());}catch(_0x483c7d){_0x1dc9f3['push'](_0x1dc9f3['shift']());}}}(_0x7619,0x4e0d8));import{CommentService as _0x3cd1f3,CollaborationSessionService as _0x250336,UniverCollaborationClientPlugin as _0x3f0de4}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x53e585}from'@univerjs-pro/license';import{dayjs as _0x30ebdb,UserManagerService as _0x11e1a7,Inject as _0x305425,Injector as _0x55b98c,Disposable as _0x3b5b07,CustomRangeType as _0x52cc13,UniverInstanceType as _0x1acf5a,DependentOn as _0x5f16f5,IConfigService as _0x1dbb73,Plugin as _0x465844,merge as _0x148cba}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x260dd3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43c617,IThreadCommentDataSourceService as _0x4e5a4c}from'@univerjs/thread-comment';import{bufferTime as _0x5376a3}from'rxjs';import{HTTPService as _0x4fcb94}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xf85ada=>(_0xf85ada[_0xf85ada[_0x59ea57(0x182)]=0x0]=_0x59ea57(0x182),_0xf85ada[_0xf85ada[_0x59ea57(0x1b2)]=0x1]=_0x59ea57(0x1b2),_0xf85ada[_0xf85ada[_0x59ea57(0x1d0)]=-0x1]=_0x59ea57(0x1d0),_0xf85ada))(I||{}),v=(_0x4ea0ac=>(_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1ba)]=0x0]=_0x59ea57(0x1ba),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1cc)]=0x1]=_0x59ea57(0x1cc),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1d1)]=0x2]=_0x59ea57(0x1d1),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1a5)]=0x3]=_0x59ea57(0x1a5),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x19e)]=0x4]=_0x59ea57(0x19e),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1a3)]=0x5]=_0x59ea57(0x1a3),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1d0)]=-0x1]='UNRECOGNIZED',_0x4ea0ac))(v||{});const y=_0x52eb61=>_0x30ebdb(new Date(+_0x52eb61))[_0x59ea57(0x176)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x463959,_0xc06963)=>{const _0x27d60f=_0x59ea57,_0x36c378=_0x463959[_0x27d60f(0x1cf)](_0x11e1a7),_0x344afa=_0x463959['get'](_0x4fcb94);_0xc06963[_0x27d60f(0x185)](_0xc43dd4=>{const _0x3aeff7=_0x27d60f;_0x36c378[_0x3aeff7(0x18b)](_0xc43dd4)&&_0xc06963[_0x3aeff7(0x195)](_0xc43dd4);}),_0xc06963[_0x27d60f(0x183)]&&(await _0x344afa[_0x27d60f(0x1cf)](_0x27d60f(0x1ab),{'params':{'userIDs':[..._0xc06963]}}))[_0x27d60f(0x19c)][_0x27d60f(0x197)]['forEach'](_0x58ee22=>{const _0x25ef9c=_0x27d60f;_0x58ee22&&_0x36c378[_0x25ef9c(0x1c1)](_0x58ee22);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2e5a42,_0x505724,_0x3a9326,_0x4cbdb0)=>{const _0x1ec23e=_0x59ea57;for(var _0x4c9b72=_0x4cbdb0>0x1?void 0x0:_0x4cbdb0?K(_0x505724,_0x3a9326):_0x505724,_0x5e4417=_0x2e5a42[_0x1ec23e(0x1b1)]-0x1,_0x19900f;_0x5e4417>=0x0;_0x5e4417--)(_0x19900f=_0x2e5a42[_0x5e4417])&&(_0x4c9b72=_0x19900f(_0x4c9b72)||_0x4c9b72);return _0x4c9b72;},p=(_0x266256,_0x149c7c)=>(_0x1a89f9,_0x2c6fe7)=>_0x149c7c(_0x1a89f9,_0x2c6fe7,_0x266256);let _=class extends _0x3b5b07{constructor(_0x180cbb,_0x4b7acb,_0x31e234,_0x519c8a){const _0xbe32b5=_0x59ea57;super(),this['_commentService']=_0x180cbb,this['_threadCommentModel']=_0x4b7acb,this[_0xbe32b5(0x1c5)]=_0x31e234,this[_0xbe32b5(0x1b0)]=_0x519c8a,this[_0xbe32b5(0x193)](),this[_0xbe32b5(0x17e)]();}[_0x59ea57(0x17e)](){const _0x1c963e=_0x59ea57;this['disposeWithMe'](this[_0x1c963e(0x1c6)][_0x1c963e(0x1c2)][_0x1c963e(0x171)](_0x5376a3(0x10))[_0x1c963e(0x1a4)](_0x2ab37e=>{const _0x351837=_0x1c963e,_0x279584=new Set();_0x2ab37e['forEach'](_0x267458=>{const _0x2dc0a6=_0x264e;switch(_0x267458['type']){case'add':{const _0x515725=_0x267458['payload'][_0x2dc0a6(0x17a)];_0x279584[_0x2dc0a6(0x17c)](_0x515725);break;}}}),B(this[_0x351837(0x1b0)],_0x279584);}));}[_0x59ea57(0x193)](){const _0x5538fc=_0x59ea57;this[_0x5538fc(0x1cd)](this[_0x5538fc(0x190)]['commentUpdate$'][_0x5538fc(0x1a4)](async _0x44f446=>{const _0xb80720=_0x5538fc;var _0xff2834,_0x4bd814,_0x465202,_0x37673f;const _0x58025a=(_0xff2834=this[_0xb80720(0x1c6)][_0xb80720(0x191)](_0x44f446[_0xb80720(0x1ce)])['find'](_0x43a2b0=>_0x43a2b0['threadId']===_0x44f446[_0xb80720(0x1aa)]))==null?void 0x0:_0xff2834[_0xb80720(0x199)];if(!_0x58025a)return;const {unitId:_0x1251e5,subUnitId:_0xdcb03c}=_0x58025a;switch(_0x44f446[_0xb80720(0x1a9)]&&this[_0xb80720(0x1c5)]['addUser'](_0x44f446[_0xb80720(0x1a9)]),_0x44f446['type']){case v[_0xb80720(0x1cc)]:break;case v[_0xb80720(0x1d1)]:{this[_0xb80720(0x1c6)][_0xb80720(0x1c8)](_0x1251e5,_0xdcb03c,{'unitId':_0x1251e5,'subUnitId':_0xdcb03c,'ref':'','id':_0x44f446[_0xb80720(0x1d3)],'dT':y(+_0x44f446['createTimestamp']),'threadId':_0x44f446[_0xb80720(0x1aa)],'personId':(_0x465202=(_0x4bd814=_0x44f446[_0xb80720(0x1a9)])==null?void 0x0:_0x4bd814['userID'])!=null?_0x465202:_0x44f446[_0xb80720(0x1bc)],'text':JSON['parse'](_0x44f446['content']),'parentId':_0x58025a['id']});break;}case v[_0xb80720(0x19e)]:{const _0x3a966d=this[_0xb80720(0x1c6)]['getComment'](_0x1251e5,_0xdcb03c,_0x44f446[_0xb80720(0x1d3)]);_0x3a966d&&_0x3a966d[_0xb80720(0x1af)]&&this[_0xb80720(0x1c6)][_0xb80720(0x192)](_0x1251e5,_0xdcb03c,_0x44f446[_0xb80720(0x1d3)]);break;}case v['Edit']:{this[_0xb80720(0x1c6)][_0xb80720(0x181)](_0x1251e5,_0xdcb03c,{'commentId':_0x44f446['replyId'],'text':JSON[_0xb80720(0x1c0)](_0x44f446[_0xb80720(0x1bb)])});break;}case v[_0xb80720(0x1a3)]:{const _0x4313cc=(_0x37673f=this[_0xb80720(0x1c6)][_0xb80720(0x191)](_0x44f446[_0xb80720(0x1ce)])[_0xb80720(0x1a6)](_0xb94a3c=>_0xb94a3c[_0xb80720(0x1aa)]===_0x44f446[_0xb80720(0x1aa)]))==null?void 0x0:_0x37673f[_0xb80720(0x199)];_0x4313cc&&this[_0xb80720(0x1c6)][_0xb80720(0x19f)](_0x1251e5,_0xdcb03c,_0x4313cc['id'],_0x44f446['solved']===I[_0xb80720(0x1b2)]);break;}}}));}};_=V([p(0x0,_0x305425(_0x3cd1f3)),p(0x1,_0x305425(_0x43c617)),p(0x2,_0x305425(_0x11e1a7)),p(0x3,_0x305425(_0x55b98c))],_);const z=_0x59ea57(0x18a),O={};var k=Object[_0x59ea57(0x1b7)],Q=(_0x4414ef,_0x418a93,_0x433852,_0x4d2d5b)=>{for(var _0x5043d0=_0x4d2d5b>0x1?void 0x0:_0x4d2d5b?k(_0x418a93,_0x433852):_0x418a93,_0x32e476=_0x4414ef['length']-0x1,_0x4f3393;_0x32e476>=0x0;_0x32e476--)(_0x4f3393=_0x4414ef[_0x32e476])&&(_0x5043d0=_0x4f3393(_0x5043d0)||_0x5043d0);return _0x5043d0;},b=(_0x2d3e20,_0x10368b)=>(_0x41b6cd,_0x11d852)=>_0x10368b(_0x41b6cd,_0x11d852,_0x2d3e20);function X(_0x3bd5bf,_0x1aae86){const _0x55de61=_0x59ea57,_0x8c3315=_0x3bd5bf[_0x55de61(0x1ae)][0x0];return{..._0x1aae86,'id':_0x8c3315['replyId'],'resolved':_0x3bd5bf[_0x55de61(0x18f)]===0x1,'dT':y(_0x8c3315[_0x55de61(0x1b9)]),'personId':_0x8c3315[_0x55de61(0x1bc)],'threadId':_0x8c3315[_0x55de61(0x1aa)]};}function ee(_0x2e6878,_0x25c9de,_0x2c3112){const _0x537dea=_0x59ea57;var _0x4a6bed,_0x1f3183;if(((_0x1f3183=(_0x4a6bed=_0x2e6878==null?void 0x0:_0x2e6878['replies'])==null?void 0x0:_0x4a6bed['length'])!=null?_0x1f3183:0x0)>0x0){const _0x13edb9=(_0x1547cd,_0x54a702)=>({'id':_0x1547cd['replyId'],'threadId':_0x1547cd[_0x537dea(0x1aa)],'dT':y(_0x1547cd[_0x537dea(0x1b9)]),'personId':_0x1547cd[_0x537dea(0x1bc)],'resolved':_0x2e6878[_0x537dea(0x18f)]===I[_0x537dea(0x1b2)],'unitId':_0x25c9de,'subUnitId':_0x2c3112,'text':JSON[_0x537dea(0x1c0)](_0x1547cd[_0x537dea(0x1bb)]),'parentId':_0x54a702}),_0x337bc1=_0x13edb9(_0x2e6878[_0x537dea(0x1ae)][0x0]);return{..._0x337bc1,'children':_0x2e6878[_0x537dea(0x1ae)][_0x537dea(0x1ad)](0x1)[_0x537dea(0x1ac)](_0x482275=>_0x13edb9(_0x482275,_0x337bc1['id']))};}return null;}let S=class{constructor(_0xd4a196,_0x2e6c75,_0x32deab){const _0x5ceab4=_0x59ea57;this[_0x5ceab4(0x16f)]=_0xd4a196,this[_0x5ceab4(0x1c5)]=_0x2e6c75,this['_sessionService']=_0x32deab;}async[_0x59ea57(0x1c8)](_0x509388){const _0x4ce1db=_0x59ea57;var _0x190b80,_0x5d7e9b;const {parentId:_0x40412d,unitId:_0x39f96b,text:_0x5450a4,threadId:_0x2c5143}=_0x509388,_0xb94365=(_0x5d7e9b=(_0x190b80=_0x5450a4['customRanges'])==null?void 0x0:_0x190b80[_0x4ce1db(0x17b)](_0x87eb07=>_0x87eb07['rangeType']===_0x52cc13[_0x4ce1db(0x186)])['map'](_0x7a4d19=>_0x7a4d19[_0x4ce1db(0x189)]))!=null?_0x5d7e9b:[],_0x2917ca=JSON[_0x4ce1db(0x1c3)](_0x5450a4),_0x37b411=(await this[_0x4ce1db(0x1be)][_0x4ce1db(0x196)](_0x39f96b))[_0x4ce1db(0x1b5)]();if(_0x40412d){const _0x3cb96d={'memberId':_0x37b411,'unitId':_0x39f96b,'content':_0x2917ca,'mention':_0xb94365,'threadId':_0x2c5143},_0x1550cb=(await this['_httpService'][_0x4ce1db(0x184)](_0x4ce1db(0x1cb)+_0x39f96b+_0x4ce1db(0x1b6),{'body':_0x3cb96d}))[_0x4ce1db(0x19c)][_0x4ce1db(0x178)];return{..._0x509388,'id':_0x1550cb[_0x4ce1db(0x1d3)],'dT':_0x30ebdb(+_0x1550cb[_0x4ce1db(0x1b9)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x1550cb[_0x4ce1db(0x1bc)]};}else{const _0x39a8fe={'memberId':_0x37b411,'unitId':_0x39f96b,'content':_0x2917ca,'mention':_0xb94365},_0x296fab=await this['_httpService'][_0x4ce1db(0x184)](_0x4ce1db(0x1cb)+_0x39f96b+_0x4ce1db(0x1c9),{'body':_0x39a8fe});return X(_0x296fab[_0x4ce1db(0x19c)][_0x4ce1db(0x17d)],_0x509388);}}async[_0x59ea57(0x181)](_0x5a2659){const _0x4f3961=_0x59ea57;var _0x26b8c6,_0x2fc754;const {text:_0x54fae8,unitId:_0x33630b}=_0x5a2659,_0x635e11=(_0x2fc754=(_0x26b8c6=_0x54fae8[_0x4f3961(0x175)])==null?void 0x0:_0x26b8c6[_0x4f3961(0x17b)](_0x358c60=>_0x358c60[_0x4f3961(0x1a2)]===_0x52cc13[_0x4f3961(0x186)])[_0x4f3961(0x1ac)](_0x276776=>_0x276776[_0x4f3961(0x189)]))!=null?_0x2fc754:[],_0x339f28=JSON[_0x4f3961(0x1c3)](_0x54fae8),_0x11e090=_0x5a2659[_0x4f3961(0x1aa)],_0x17c5e7=_0x5a2659['id'],_0x4f4296={'memberId':(await this['_sessionService'][_0x4f3961(0x196)](_0x33630b))['getMemberID'](),'unitId':_0x33630b,'threadId':_0x11e090,'mention':_0x635e11,'content':_0x339f28,'replyId':_0x17c5e7},_0x296ed3=await this['_httpService'][_0x4f3961(0x184)](_0x4f3961(0x1cb)+_0x33630b+_0x4f3961(0x180),{'body':_0x4f4296});return!_0x296ed3['body']['error']||_0x296ed3['body']['error'][_0x4f3961(0x1c7)]===0x1;}async['resolveComment'](_0xd27023){const _0x3f427d=_0x59ea57,{unitId:_0x59457b}=_0xd27023,_0x46e734=_0xd27023[_0x3f427d(0x1aa)],_0x50a8f7={'memberId':this[_0x3f427d(0x1c5)][_0x3f427d(0x19d)]()[_0x3f427d(0x173)],'unitId':_0x59457b,'threadId':_0x46e734,'solved':_0xd27023['resolved']?I[_0x3f427d(0x1b2)]:I[_0x3f427d(0x182)]},_0x4e4ec7=await this[_0x3f427d(0x16f)]['post'](_0x3f427d(0x1cb)+_0x59457b+'/solved',{'body':_0x50a8f7});return!_0x4e4ec7[_0x3f427d(0x19c)]['error']||_0x4e4ec7[_0x3f427d(0x19c)]['error'][_0x3f427d(0x1c7)]===0x1;}async[_0x59ea57(0x192)](_0x1e31d1,_0x1c21ed,_0x258733,_0x1e8ee2){const _0xeafe29=_0x59ea57,_0x267288={'memberId':(await this['_sessionService']['requireSession'](_0x1e31d1))[_0xeafe29(0x1b5)](),'threadId':_0x258733,'replyId':_0x1e8ee2,'unitId':_0x1e31d1},_0x282b85=await this['_httpService'][_0xeafe29(0x184)](_0xeafe29(0x1cb)+_0x1e31d1+_0xeafe29(0x18c),{'body':_0x267288});return!_0x282b85[_0xeafe29(0x19c)][_0xeafe29(0x179)]||_0x282b85[_0xeafe29(0x19c)][_0xeafe29(0x179)]['code']===0x1;}async[_0x59ea57(0x170)](_0xecbe23,_0x139476,_0xc2f44e){const _0x31b2f8=_0x59ea57,_0x5445ae={'unitId':_0xecbe23,'threadId':_0xc2f44e},_0xc88335=await this['_httpService'][_0x31b2f8(0x184)]('/universer-api/comment/unit/'+_0xecbe23+_0x31b2f8(0x187),{'body':_0x5445ae}),_0x44e8a0=_0xc2f44e[_0x31b2f8(0x1ac)](_0x45a7c1=>ee(_0xc88335[_0x31b2f8(0x19c)][_0x31b2f8(0x18d)][_0x45a7c1],_0xecbe23,_0x139476))['filter'](Boolean);return Object['values'](_0xc88335['body'][_0x31b2f8(0x197)])[_0x31b2f8(0x185)](_0x33241c=>{const _0x334e38=_0x31b2f8;this['_userService'][_0x334e38(0x1c1)](_0x33241c);}),_0x44e8a0;}[_0x59ea57(0x19b)](_0x2accbb){const _0x5c4543=_0x59ea57;return{'id':_0x2accbb['id'],'threadId':_0x2accbb[_0x5c4543(0x1aa)],'ref':_0x2accbb[_0x5c4543(0x17f)]};}};function _0x7619(){const _0xb92e9c=['user','threadId','/universer-api/user/list','map','slice','replies','parentId','_injector','length','Solved','648744pchXYX','241366sZmiDl','getMemberID','/reply','getOwnPropertyDescriptor','192150lcNakw','createTimestamp','Unknown','content','userId','1897176okHVAa','_sessionService','type','parse','addUser','commentUpdate$','stringify','2814485mmSRJs','_userService','_threadCommentModel','code','addComment','/add','465450ZLrGIX','/universer-api/comment/unit/','Add','disposeWithMe','unitId','get','UNRECOGNIZED','Reply','onStarting','replyId','defineProperty','_httpService','listComments','pipe','632187rayOhg','userID','8SZaTuj','customRanges','format','_configService','reply','error','personId','filter','add','comment','_initUserSync','ref','/edit','updateComment','OpenOrReOpen','size','post','forEach','COMMENT','/list','symbol','rangeId','thread-comment-data-source.config','getUser','/delete','comments','pluginName','solved','_commentService','getUnit','deleteComment','_init','_threadCommentDataSourceService','delete','requireSession','users','_threadCommentDataSource','root','syncUpdateMutationToColla','saveCommentToSnapshot','body','getCurrentUser','Delete','resolveComment','_initDataSource','77XeUbbE','rangeType','Solve','subscribe','Edit','find','_config','UNIVER_UNKNOWN'];_0x7619=function(){return _0xb92e9c;};return _0x7619();}S=Q([b(0x0,_0x305425(_0x4fcb94)),b(0x1,_0x305425(_0x11e1a7)),b(0x2,_0x305425(_0x250336))],S);var re=Object[_0x59ea57(0x1b7)],te=(_0x316dfd,_0x570ad9,_0x291029,_0x10a655)=>{const _0x56e817=_0x59ea57;for(var _0xa60318=_0x10a655>0x1?void 0x0:_0x10a655?re(_0x570ad9,_0x291029):_0x570ad9,_0x210d36=_0x316dfd[_0x56e817(0x1b1)]-0x1,_0x5b6d7c;_0x210d36>=0x0;_0x210d36--)(_0x5b6d7c=_0x316dfd[_0x210d36])&&(_0xa60318=_0x5b6d7c(_0xa60318)||_0xa60318);return _0xa60318;},M=(_0x5a8ffe,_0x7b1d7c)=>(_0x730be2,_0x33f244)=>_0x7b1d7c(_0x730be2,_0x33f244,_0x5a8ffe);let f=class extends _0x3b5b07{constructor(_0x35e734,_0x207612){const _0x1c32a9=_0x59ea57;super(),this[_0x1c32a9(0x194)]=_0x35e734,this[_0x1c32a9(0x198)]=_0x207612,this[_0x1c32a9(0x1a0)]();}[_0x59ea57(0x1a0)](){const _0x2399f4=_0x59ea57;this[_0x2399f4(0x194)]['dataSource']=this[_0x2399f4(0x198)],this['_threadCommentDataSourceService'][_0x2399f4(0x19a)]=!0x1;}};f=te([M(0x0,_0x4e5a4c),M(0x1,_0x305425(S))],f);var se=Object[_0x59ea57(0x16e)],oe=Object[_0x59ea57(0x1b7)],ne=(_0x585d99,_0xb0bfd6,_0x4e5e26)=>_0xb0bfd6 in _0x585d99?se(_0x585d99,_0xb0bfd6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e5e26}):_0x585d99[_0xb0bfd6]=_0x4e5e26,ie=(_0x57f88b,_0x40ff86,_0x580d67,_0xabce1)=>{const _0x51fd5b=_0x59ea57;for(var _0x95fdfd=_0xabce1>0x1?void 0x0:_0xabce1?oe(_0x40ff86,_0x580d67):_0x40ff86,_0x13fe48=_0x57f88b[_0x51fd5b(0x1b1)]-0x1,_0x82b9e0;_0x13fe48>=0x0;_0x13fe48--)(_0x82b9e0=_0x57f88b[_0x13fe48])&&(_0x95fdfd=_0x82b9e0(_0x95fdfd)||_0x95fdfd);return _0x95fdfd;},N=(_0x4b1065,_0x55c98b)=>(_0x563a7e,_0x53df8c)=>_0x55c98b(_0x563a7e,_0x53df8c,_0x4b1065),$=(_0x3f0ec9,_0x4d5904,_0x3f5e43)=>ne(_0x3f0ec9,typeof _0x4d5904!=_0x59ea57(0x188)?_0x4d5904+'':_0x4d5904,_0x3f5e43);let g=class extends _0x465844{constructor(_0x414b94=O,_0x4ba7ed,_0x6b66d6){const _0x128580=_0x59ea57;super(),this[_0x128580(0x1a7)]=_0x414b94,this[_0x128580(0x1b0)]=_0x4ba7ed,this[_0x128580(0x177)]=_0x6b66d6;const {..._0x3b932c}=_0x148cba({},O,this[_0x128580(0x1a7)]);this['_configService']['setConfig'](z,_0x3b932c);}[_0x59ea57(0x1d2)](){[[S],[f],[_]]['forEach'](_0x147e24=>{const _0x4e12ee=_0x264e;this['_injector'][_0x4e12ee(0x17c)](_0x147e24);});}['onReady'](){const _0x4ee148=_0x59ea57;this[_0x4ee148(0x1b0)][_0x4ee148(0x1cf)](f),this[_0x4ee148(0x1b0)][_0x4ee148(0x1cf)](_);}};$(g,_0x59ea57(0x18e),W),$(g,_0x59ea57(0x1bf),_0x1acf5a[_0x59ea57(0x1a8)]),g=ie([_0x5f16f5(_0x260dd3,_0x3f0de4,_0x53e585),N(0x1,_0x305425(_0x55b98c)),N(0x2,_0x1dbb73)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x39abda=_0x254a;function _0x20ae(){const _0x38050d=['requireSession','size','/edit','_configService','2639pTrTJh','Solve','Solved','subscribe','comment','resolved','body','parentId','replies','getUnit','slice','OpenOrReOpen','resolveComment','YYYY/MM/DD\x20HH:mm','unitId','8snNQrz','threadId','/solved','onStarting','userId','_threadCommentDataSource','1105840DmKyWZ','rangeId','users','values','content','reply','3770667hHByLq','UNRECOGNIZED','stringify','post','11Rcsywb','getComment','2031954ytrDuq','error','addUser','COMMENT','Delete','_sessionService','11798470hmefXu','UNIVER_UNKNOWN','_threadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getUser','replyId','comments','8242SQBInI','add','delete','root','26484ELVTFb','_userService','_initDataSource','Add','_threadCommentDataSourceService','pluginName','getCurrentUser','userID','solved','get','format','customRanges','getMemberID','/list','user','getOwnPropertyDescriptor','_init','filter','createTimestamp','Reply','length','/universer-api/user/list','1154qBnPjD','onReady','thread-comment-data-source.config','updateComment','/universer-api/comment/unit/','3349983MqwtgJ','_httpService','parse','disposeWithMe','_commentService','rangeType','code','Edit','_injector','type','pipe','find','15HmQshf','addComment','21KXauGo','forEach','listComments','dataSource','payload','commentUpdate$','symbol','_initUserSync','_config','ref','map'];_0x20ae=function(){return _0x38050d;};return _0x20ae();}(function(_0x11a44b,_0x29f598){const _0x4bb57f=_0x254a,_0x54db8d=_0x11a44b();while(!![]){try{const _0x4829dd=-parseInt(_0x4bb57f(0x1b9))/0x1*(-parseInt(_0x4bb57f(0x197))/0x2)+-parseInt(_0x4bb57f(0x19c))/0x3+-parseInt(_0x4bb57f(0x164))/0x4*(-parseInt(_0x4bb57f(0x1a8))/0x5)+parseInt(_0x4bb57f(0x170))/0x6*(-parseInt(_0x4bb57f(0x1aa))/0x7)+-parseInt(_0x4bb57f(0x15e))/0x8*(-parseInt(_0x4bb57f(0x16a))/0x9)+-parseInt(_0x4bb57f(0x176))/0xa*(parseInt(_0x4bb57f(0x16e))/0xb)+parseInt(_0x4bb57f(0x181))/0xc*(parseInt(_0x4bb57f(0x17d))/0xd);if(_0x4829dd===_0x29f598)break;else _0x54db8d['push'](_0x54db8d['shift']());}catch(_0x4e46a7){_0x54db8d['push'](_0x54db8d['shift']());}}}(_0x20ae,0xd16c7));import{CommentService as _0x180f07,CollaborationSessionService as _0x39372f,UniverCollaborationClientPlugin as _0x3510e5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x153641}from'@univerjs-pro/license';import{dayjs as _0x4e4634,UserManagerService as _0xddf515,Inject as _0x53a3d7,Injector as _0x3d62de,Disposable as _0x3e38bb,CustomRangeType as _0x484fd6,UniverInstanceType as _0xa6b08c,DependentOn as _0x13968e,IConfigService as _0x380b95,Plugin as _0x220026,merge as _0x468d5d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x95d4a2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x391da1,IThreadCommentDataSourceService as _0x33f6d5}from'@univerjs/thread-comment';import{bufferTime as _0x38dd9a}from'rxjs';import{HTTPService as _0x3008e2}from'@univerjs/network';const W=_0x39abda(0x179);var I=(_0x812362=>(_0x812362[_0x812362[_0x39abda(0x15a)]=0x0]=_0x39abda(0x15a),_0x812362[_0x812362['Solved']=0x1]=_0x39abda(0x1bb),_0x812362[_0x812362[_0x39abda(0x16b)]=-0x1]=_0x39abda(0x16b),_0x812362))(I||{}),v=(_0x3cc1ba=>(_0x3cc1ba[_0x3cc1ba['Unknown']=0x0]='Unknown',_0x3cc1ba[_0x3cc1ba[_0x39abda(0x184)]=0x1]=_0x39abda(0x184),_0x3cc1ba[_0x3cc1ba[_0x39abda(0x194)]=0x2]=_0x39abda(0x194),_0x3cc1ba[_0x3cc1ba['Edit']=0x3]=_0x39abda(0x1a3),_0x3cc1ba[_0x3cc1ba[_0x39abda(0x174)]=0x4]=_0x39abda(0x174),_0x3cc1ba[_0x3cc1ba['Solve']=0x5]=_0x39abda(0x1ba),_0x3cc1ba[_0x3cc1ba[_0x39abda(0x16b)]=-0x1]=_0x39abda(0x16b),_0x3cc1ba))(v||{});function _0x254a(_0x52bd6e,_0x1c56ad){const _0x20aea5=_0x20ae();return _0x254a=function(_0x254ab4,_0x1c845a){_0x254ab4=_0x254ab4-0x152;let _0x5b822b=_0x20aea5[_0x254ab4];return _0x5b822b;},_0x254a(_0x52bd6e,_0x1c56ad);}const y=_0x50e37d=>_0x4e4634(new Date(+_0x50e37d))['format'](_0x39abda(0x15c)),B=async(_0x4acf47,_0x315432)=>{const _0x582387=_0x39abda,_0x4b08fb=_0x4acf47['get'](_0xddf515),_0x5dd19b=_0x4acf47[_0x582387(0x18a)](_0x3008e2);_0x315432[_0x582387(0x1ab)](_0x3542e5=>{const _0x475605=_0x582387;_0x4b08fb[_0x475605(0x17a)](_0x3542e5)&&_0x315432[_0x475605(0x17f)](_0x3542e5);}),_0x315432[_0x582387(0x1b6)]&&(await _0x5dd19b[_0x582387(0x18a)](_0x582387(0x196),{'params':{'userIDs':[..._0x315432]}}))[_0x582387(0x155)][_0x582387(0x166)][_0x582387(0x1ab)](_0x27fda8=>{const _0x2fb417=_0x582387;_0x27fda8&&_0x4b08fb[_0x2fb417(0x172)](_0x27fda8);});};var K=Object[_0x39abda(0x190)],V=(_0x512784,_0x3112ed,_0xd7e388,_0x292e65)=>{const _0x42a5f0=_0x39abda;for(var _0x58df18=_0x292e65>0x1?void 0x0:_0x292e65?K(_0x3112ed,_0xd7e388):_0x3112ed,_0x264401=_0x512784[_0x42a5f0(0x195)]-0x1,_0x387b9d;_0x264401>=0x0;_0x264401--)(_0x387b9d=_0x512784[_0x264401])&&(_0x58df18=_0x387b9d(_0x58df18)||_0x58df18);return _0x58df18;},p=(_0x27558a,_0x48114c)=>(_0x2725e1,_0x52ee93)=>_0x48114c(_0x2725e1,_0x52ee93,_0x27558a);let _=class extends _0x3e38bb{constructor(_0x14677a,_0x3b210e,_0x5b3b01,_0x769463){const _0x5af6af=_0x39abda;super(),this[_0x5af6af(0x1a0)]=_0x14677a,this[_0x5af6af(0x178)]=_0x3b210e,this[_0x5af6af(0x182)]=_0x5b3b01,this[_0x5af6af(0x1a4)]=_0x769463,this[_0x5af6af(0x191)](),this[_0x5af6af(0x1b1)]();}['_initUserSync'](){const _0x2144f9=_0x39abda;this[_0x2144f9(0x19f)](this[_0x2144f9(0x178)][_0x2144f9(0x1af)][_0x2144f9(0x1a6)](_0x38dd9a(0x10))[_0x2144f9(0x152)](_0x1468d6=>{const _0x5e63f7=new Set();_0x1468d6['forEach'](_0x2b52d8=>{const _0xde654=_0x254a;switch(_0x2b52d8['type']){case'add':{const _0x42c3b7=_0x2b52d8[_0xde654(0x1ae)]['personId'];_0x5e63f7[_0xde654(0x17e)](_0x42c3b7);break;}}}),B(this['_injector'],_0x5e63f7);}));}['_init'](){const _0x20126d=_0x39abda;this[_0x20126d(0x19f)](this['_commentService'][_0x20126d(0x1af)][_0x20126d(0x152)](async _0x592e4d=>{const _0x1b6ad2=_0x20126d;var _0x3467d0,_0xd6be2f,_0x19ccdb,_0x27236c;const _0x1a02b7=(_0x3467d0=this[_0x1b6ad2(0x178)][_0x1b6ad2(0x158)](_0x592e4d['unitId'])[_0x1b6ad2(0x1a7)](_0x482880=>_0x482880[_0x1b6ad2(0x15f)]===_0x592e4d[_0x1b6ad2(0x15f)]))==null?void 0x0:_0x3467d0['root'];if(!_0x1a02b7)return;const {unitId:_0x5c955a,subUnitId:_0x5d8c9f}=_0x1a02b7;switch(_0x592e4d[_0x1b6ad2(0x18f)]&&this['_userService'][_0x1b6ad2(0x172)](_0x592e4d['user']),_0x592e4d[_0x1b6ad2(0x1a5)]){case v[_0x1b6ad2(0x184)]:break;case v[_0x1b6ad2(0x194)]:{this['_threadCommentModel'][_0x1b6ad2(0x1a9)](_0x5c955a,_0x5d8c9f,{'unitId':_0x5c955a,'subUnitId':_0x5d8c9f,'ref':'','id':_0x592e4d[_0x1b6ad2(0x17b)],'dT':y(+_0x592e4d[_0x1b6ad2(0x193)]),'threadId':_0x592e4d[_0x1b6ad2(0x15f)],'personId':(_0x19ccdb=(_0xd6be2f=_0x592e4d[_0x1b6ad2(0x18f)])==null?void 0x0:_0xd6be2f[_0x1b6ad2(0x188)])!=null?_0x19ccdb:_0x592e4d[_0x1b6ad2(0x162)],'text':JSON['parse'](_0x592e4d[_0x1b6ad2(0x168)]),'parentId':_0x1a02b7['id']});break;}case v[_0x1b6ad2(0x174)]:{const _0x46c585=this[_0x1b6ad2(0x178)][_0x1b6ad2(0x16f)](_0x5c955a,_0x5d8c9f,_0x592e4d[_0x1b6ad2(0x17b)]);_0x46c585&&_0x46c585[_0x1b6ad2(0x156)]&&this[_0x1b6ad2(0x178)]['deleteComment'](_0x5c955a,_0x5d8c9f,_0x592e4d[_0x1b6ad2(0x17b)]);break;}case v[_0x1b6ad2(0x1a3)]:{this[_0x1b6ad2(0x178)]['updateComment'](_0x5c955a,_0x5d8c9f,{'commentId':_0x592e4d[_0x1b6ad2(0x17b)],'text':JSON[_0x1b6ad2(0x19e)](_0x592e4d['content'])});break;}case v[_0x1b6ad2(0x1ba)]:{const _0x5cd376=(_0x27236c=this['_threadCommentModel'][_0x1b6ad2(0x158)](_0x592e4d[_0x1b6ad2(0x15d)])['find'](_0x22f234=>_0x22f234[_0x1b6ad2(0x15f)]===_0x592e4d[_0x1b6ad2(0x15f)]))==null?void 0x0:_0x27236c[_0x1b6ad2(0x180)];_0x5cd376&&this[_0x1b6ad2(0x178)][_0x1b6ad2(0x15b)](_0x5c955a,_0x5d8c9f,_0x5cd376['id'],_0x592e4d[_0x1b6ad2(0x189)]===I[_0x1b6ad2(0x1bb)]);break;}}}));}};_=V([p(0x0,_0x53a3d7(_0x180f07)),p(0x1,_0x53a3d7(_0x391da1)),p(0x2,_0x53a3d7(_0xddf515)),p(0x3,_0x53a3d7(_0x3d62de))],_);const z=_0x39abda(0x199),O={};var k=Object[_0x39abda(0x190)],Q=(_0x4a6ee5,_0x1fd566,_0x5b7ea2,_0x3bbda1)=>{const _0x1813a7=_0x39abda;for(var _0x5d5454=_0x3bbda1>0x1?void 0x0:_0x3bbda1?k(_0x1fd566,_0x5b7ea2):_0x1fd566,_0x24e0c4=_0x4a6ee5[_0x1813a7(0x195)]-0x1,_0x34c393;_0x24e0c4>=0x0;_0x24e0c4--)(_0x34c393=_0x4a6ee5[_0x24e0c4])&&(_0x5d5454=_0x34c393(_0x5d5454)||_0x5d5454);return _0x5d5454;},b=(_0x577f04,_0x4a0fd2)=>(_0x40684b,_0x3a310f)=>_0x4a0fd2(_0x40684b,_0x3a310f,_0x577f04);function X(_0x416e16,_0x4befb3){const _0x76a828=_0x39abda,_0x2175d2=_0x416e16[_0x76a828(0x157)][0x0];return{..._0x4befb3,'id':_0x2175d2[_0x76a828(0x17b)],'resolved':_0x416e16[_0x76a828(0x189)]===0x1,'dT':y(_0x2175d2[_0x76a828(0x193)]),'personId':_0x2175d2['userId'],'threadId':_0x2175d2[_0x76a828(0x15f)]};}function ee(_0x5c30d8,_0x11bc79,_0x306724){const _0x151e96=_0x39abda;var _0x38618b,_0x405c38;if(((_0x405c38=(_0x38618b=_0x5c30d8==null?void 0x0:_0x5c30d8['replies'])==null?void 0x0:_0x38618b[_0x151e96(0x195)])!=null?_0x405c38:0x0)>0x0){const _0x54ed64=(_0x1707d2,_0x3b4b7f)=>({'id':_0x1707d2[_0x151e96(0x17b)],'threadId':_0x1707d2[_0x151e96(0x15f)],'dT':y(_0x1707d2[_0x151e96(0x193)]),'personId':_0x1707d2['userId'],'resolved':_0x5c30d8[_0x151e96(0x189)]===I[_0x151e96(0x1bb)],'unitId':_0x11bc79,'subUnitId':_0x306724,'text':JSON[_0x151e96(0x19e)](_0x1707d2[_0x151e96(0x168)]),'parentId':_0x3b4b7f}),_0x3d6040=_0x54ed64(_0x5c30d8['replies'][0x0]);return{..._0x3d6040,'children':_0x5c30d8['replies'][_0x151e96(0x159)](0x1)[_0x151e96(0x1b4)](_0x3062a5=>_0x54ed64(_0x3062a5,_0x3d6040['id']))};}return null;}let S=class{constructor(_0x23a61b,_0x47bc4c,_0x532d40){const _0x423867=_0x39abda;this[_0x423867(0x19d)]=_0x23a61b,this[_0x423867(0x182)]=_0x47bc4c,this[_0x423867(0x175)]=_0x532d40;}async[_0x39abda(0x1a9)](_0x45935f){const _0x3b8f7d=_0x39abda;var _0x1b960d,_0x4e4da2;const {parentId:_0x4eddb1,unitId:_0x1bd439,text:_0x235729,threadId:_0x5d2292}=_0x45935f,_0x4873b4=(_0x4e4da2=(_0x1b960d=_0x235729[_0x3b8f7d(0x18c)])==null?void 0x0:_0x1b960d[_0x3b8f7d(0x192)](_0xd383b3=>_0xd383b3[_0x3b8f7d(0x1a1)]===_0x484fd6['COMMENT'])[_0x3b8f7d(0x1b4)](_0x3cda7c=>_0x3cda7c[_0x3b8f7d(0x165)]))!=null?_0x4e4da2:[],_0x502b20=JSON['stringify'](_0x235729),_0x48ebf0=(await this[_0x3b8f7d(0x175)][_0x3b8f7d(0x1b5)](_0x1bd439))[_0x3b8f7d(0x18d)]();if(_0x4eddb1){const _0x5e9785={'memberId':_0x48ebf0,'unitId':_0x1bd439,'content':_0x502b20,'mention':_0x4873b4,'threadId':_0x5d2292},_0x3582f8=(await this['_httpService'][_0x3b8f7d(0x16d)](_0x3b8f7d(0x19b)+_0x1bd439+'/reply',{'body':_0x5e9785}))['body'][_0x3b8f7d(0x169)];return{..._0x45935f,'id':_0x3582f8[_0x3b8f7d(0x17b)],'dT':_0x4e4634(+_0x3582f8['createTimestamp'])[_0x3b8f7d(0x18b)](_0x3b8f7d(0x15c)),'personId':_0x3582f8[_0x3b8f7d(0x162)]};}else{const _0x487c06={'memberId':_0x48ebf0,'unitId':_0x1bd439,'content':_0x502b20,'mention':_0x4873b4},_0x138f9b=await this['_httpService'][_0x3b8f7d(0x16d)](_0x3b8f7d(0x19b)+_0x1bd439+'/add',{'body':_0x487c06});return X(_0x138f9b['body'][_0x3b8f7d(0x153)],_0x45935f);}}async[_0x39abda(0x19a)](_0x4c233c){const _0x58da9c=_0x39abda;var _0x518ed5,_0x5c95a3;const {text:_0x1f6cd1,unitId:_0x672090}=_0x4c233c,_0x22b7d2=(_0x5c95a3=(_0x518ed5=_0x1f6cd1['customRanges'])==null?void 0x0:_0x518ed5[_0x58da9c(0x192)](_0x4ae2d3=>_0x4ae2d3[_0x58da9c(0x1a1)]===_0x484fd6[_0x58da9c(0x173)])[_0x58da9c(0x1b4)](_0x4b130b=>_0x4b130b[_0x58da9c(0x165)]))!=null?_0x5c95a3:[],_0x32634a=JSON[_0x58da9c(0x16c)](_0x1f6cd1),_0x362017=_0x4c233c[_0x58da9c(0x15f)],_0x20b9fa=_0x4c233c['id'],_0x17081c={'memberId':(await this['_sessionService'][_0x58da9c(0x1b5)](_0x672090))[_0x58da9c(0x18d)](),'unitId':_0x672090,'threadId':_0x362017,'mention':_0x22b7d2,'content':_0x32634a,'replyId':_0x20b9fa},_0x235491=await this['_httpService'][_0x58da9c(0x16d)](_0x58da9c(0x19b)+_0x672090+_0x58da9c(0x1b7),{'body':_0x17081c});return!_0x235491[_0x58da9c(0x155)]['error']||_0x235491['body'][_0x58da9c(0x171)][_0x58da9c(0x1a2)]===0x1;}async[_0x39abda(0x15b)](_0x5f0c0a){const _0x1867d=_0x39abda,{unitId:_0x386887}=_0x5f0c0a,_0x4c6d68=_0x5f0c0a[_0x1867d(0x15f)],_0x27c5eb={'memberId':this[_0x1867d(0x182)][_0x1867d(0x187)]()[_0x1867d(0x188)],'unitId':_0x386887,'threadId':_0x4c6d68,'solved':_0x5f0c0a[_0x1867d(0x154)]?I[_0x1867d(0x1bb)]:I[_0x1867d(0x15a)]},_0x326f61=await this[_0x1867d(0x19d)][_0x1867d(0x16d)](_0x1867d(0x19b)+_0x386887+_0x1867d(0x160),{'body':_0x27c5eb});return!_0x326f61[_0x1867d(0x155)][_0x1867d(0x171)]||_0x326f61[_0x1867d(0x155)]['error'][_0x1867d(0x1a2)]===0x1;}async['deleteComment'](_0x561fb6,_0x261754,_0x49a5e4,_0x33e362){const _0x1f30e3=_0x39abda,_0x29c3b8={'memberId':(await this['_sessionService'][_0x1f30e3(0x1b5)](_0x561fb6))['getMemberID'](),'threadId':_0x49a5e4,'replyId':_0x33e362,'unitId':_0x561fb6},_0x52e1a9=await this[_0x1f30e3(0x19d)][_0x1f30e3(0x16d)](_0x1f30e3(0x19b)+_0x561fb6+'/delete',{'body':_0x29c3b8});return!_0x52e1a9[_0x1f30e3(0x155)]['error']||_0x52e1a9[_0x1f30e3(0x155)]['error']['code']===0x1;}async[_0x39abda(0x1ac)](_0x2a55c1,_0x1d175a,_0x5dcad8){const _0x2dbb22=_0x39abda,_0x13fc5e={'unitId':_0x2a55c1,'threadId':_0x5dcad8},_0x27cfec=await this[_0x2dbb22(0x19d)][_0x2dbb22(0x16d)](_0x2dbb22(0x19b)+_0x2a55c1+_0x2dbb22(0x18e),{'body':_0x13fc5e}),_0x141578=_0x5dcad8[_0x2dbb22(0x1b4)](_0x4a2238=>ee(_0x27cfec[_0x2dbb22(0x155)][_0x2dbb22(0x17c)][_0x4a2238],_0x2a55c1,_0x1d175a))['filter'](Boolean);return Object[_0x2dbb22(0x167)](_0x27cfec[_0x2dbb22(0x155)][_0x2dbb22(0x166)])[_0x2dbb22(0x1ab)](_0x26376e=>{const _0x20ea9c=_0x2dbb22;this['_userService'][_0x20ea9c(0x172)](_0x26376e);}),_0x141578;}['saveCommentToSnapshot'](_0x244c76){const _0xd13ddb=_0x39abda;return{'id':_0x244c76['id'],'threadId':_0x244c76[_0xd13ddb(0x15f)],'ref':_0x244c76[_0xd13ddb(0x1b3)]};}};S=Q([b(0x0,_0x53a3d7(_0x3008e2)),b(0x1,_0x53a3d7(_0xddf515)),b(0x2,_0x53a3d7(_0x39372f))],S);var re=Object[_0x39abda(0x190)],te=(_0x2003fb,_0x117432,_0x1e53f9,_0x1c6a71)=>{const _0x5b8d83=_0x39abda;for(var _0x1538df=_0x1c6a71>0x1?void 0x0:_0x1c6a71?re(_0x117432,_0x1e53f9):_0x117432,_0x2fbc47=_0x2003fb[_0x5b8d83(0x195)]-0x1,_0x40cc79;_0x2fbc47>=0x0;_0x2fbc47--)(_0x40cc79=_0x2003fb[_0x2fbc47])&&(_0x1538df=_0x40cc79(_0x1538df)||_0x1538df);return _0x1538df;},M=(_0x43695d,_0x316986)=>(_0x426000,_0x55516b)=>_0x316986(_0x426000,_0x55516b,_0x43695d);let f=class extends _0x3e38bb{constructor(_0x1bdd6d,_0x150809){const _0x45bf1b=_0x39abda;super(),this[_0x45bf1b(0x185)]=_0x1bdd6d,this[_0x45bf1b(0x163)]=_0x150809,this['_initDataSource']();}[_0x39abda(0x183)](){const _0x3f8252=_0x39abda;this[_0x3f8252(0x185)][_0x3f8252(0x1ad)]=this[_0x3f8252(0x163)],this[_0x3f8252(0x185)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x33f6d5),M(0x1,_0x53a3d7(S))],f);var se=Object['defineProperty'],oe=Object[_0x39abda(0x190)],ne=(_0x23e56d,_0x42a81b,_0x41eb82)=>_0x42a81b in _0x23e56d?se(_0x23e56d,_0x42a81b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x41eb82}):_0x23e56d[_0x42a81b]=_0x41eb82,ie=(_0xc2203d,_0x119b30,_0x2ca147,_0x1dcbaa)=>{const _0x361020=_0x39abda;for(var _0x21d75d=_0x1dcbaa>0x1?void 0x0:_0x1dcbaa?oe(_0x119b30,_0x2ca147):_0x119b30,_0x23cd19=_0xc2203d[_0x361020(0x195)]-0x1,_0x4ac972;_0x23cd19>=0x0;_0x23cd19--)(_0x4ac972=_0xc2203d[_0x23cd19])&&(_0x21d75d=_0x4ac972(_0x21d75d)||_0x21d75d);return _0x21d75d;},N=(_0x422f37,_0x5a9302)=>(_0x5d68cb,_0x30eb6e)=>_0x5a9302(_0x5d68cb,_0x30eb6e,_0x422f37),$=(_0x17f253,_0x5dcd88,_0x194336)=>ne(_0x17f253,typeof _0x5dcd88!=_0x39abda(0x1b0)?_0x5dcd88+'':_0x5dcd88,_0x194336);let g=class extends _0x220026{constructor(_0x83e8ee=O,_0x54d0bf,_0x4f940b){const _0x2599fe=_0x39abda;super(),this['_config']=_0x83e8ee,this['_injector']=_0x54d0bf,this[_0x2599fe(0x1b8)]=_0x4f940b;const {..._0x2cbde1}=_0x468d5d({},O,this[_0x2599fe(0x1b2)]);this['_configService']['setConfig'](z,_0x2cbde1);}[_0x39abda(0x161)](){[[S],[f],[_]]['forEach'](_0x4f93e3=>{this['_injector']['add'](_0x4f93e3);});}[_0x39abda(0x198)](){const _0x18906d=_0x39abda;this[_0x18906d(0x1a4)][_0x18906d(0x18a)](f),this[_0x18906d(0x1a4)]['get'](_);}};$(g,_0x39abda(0x186),W),$(g,'type',_0xa6b08c[_0x39abda(0x177)]),g=ie([_0x13968e(_0x95d4a2,_0x3510e5,_0x153641),N(0x1,_0x53a3d7(_0x3d62de)),N(0x2,_0x380b95)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x59ea57=_0x264e;function _0x264e(_0x359968,_0x411b3){const _0x7619d4=_0x7619();return _0x264e=function(_0x264ef0,_0x15444f){_0x264ef0=_0x264ef0-0x16e;let _0x2aaf03=_0x7619d4[_0x264ef0];return _0x2aaf03;},_0x264e(_0x359968,_0x411b3);}(function(_0x1f465c,_0x3b303){const _0xdc7ff7=_0x264e,_0x1dc9f3=_0x1f465c();while(!![]){try{const _0x538dba=parseInt(_0xdc7ff7(0x1b4))/0x1+parseInt(_0xdc7ff7(0x1ca))/0x2+parseInt(_0xdc7ff7(0x1b3))/0x3+parseInt(_0xdc7ff7(0x1bd))/0x4+-parseInt(_0xdc7ff7(0x1c4))/0x5+-parseInt(_0xdc7ff7(0x1b8))/0x6*(parseInt(_0xdc7ff7(0x1a1))/0x7)+-parseInt(_0xdc7ff7(0x174))/0x8*(-parseInt(_0xdc7ff7(0x172))/0x9);if(_0x538dba===_0x3b303)break;else _0x1dc9f3['push'](_0x1dc9f3['shift']());}catch(_0x483c7d){_0x1dc9f3['push'](_0x1dc9f3['shift']());}}}(_0x7619,0x4e0d8));import{CommentService as _0x3cd1f3,CollaborationSessionService as _0x250336,UniverCollaborationClientPlugin as _0x3f0de4}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x53e585}from'@univerjs-pro/license';import{dayjs as _0x30ebdb,UserManagerService as _0x11e1a7,Inject as _0x305425,Injector as _0x55b98c,Disposable as _0x3b5b07,CustomRangeType as _0x52cc13,UniverInstanceType as _0x1acf5a,DependentOn as _0x5f16f5,IConfigService as _0x1dbb73,Plugin as _0x465844,merge as _0x148cba}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x260dd3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43c617,IThreadCommentDataSourceService as _0x4e5a4c}from'@univerjs/thread-comment';import{bufferTime as _0x5376a3}from'rxjs';import{HTTPService as _0x4fcb94}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xf85ada=>(_0xf85ada[_0xf85ada[_0x59ea57(0x182)]=0x0]=_0x59ea57(0x182),_0xf85ada[_0xf85ada[_0x59ea57(0x1b2)]=0x1]=_0x59ea57(0x1b2),_0xf85ada[_0xf85ada[_0x59ea57(0x1d0)]=-0x1]=_0x59ea57(0x1d0),_0xf85ada))(I||{}),v=(_0x4ea0ac=>(_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1ba)]=0x0]=_0x59ea57(0x1ba),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1cc)]=0x1]=_0x59ea57(0x1cc),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1d1)]=0x2]=_0x59ea57(0x1d1),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1a5)]=0x3]=_0x59ea57(0x1a5),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x19e)]=0x4]=_0x59ea57(0x19e),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1a3)]=0x5]=_0x59ea57(0x1a3),_0x4ea0ac[_0x4ea0ac[_0x59ea57(0x1d0)]=-0x1]='UNRECOGNIZED',_0x4ea0ac))(v||{});const y=_0x52eb61=>_0x30ebdb(new Date(+_0x52eb61))[_0x59ea57(0x176)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x463959,_0xc06963)=>{const _0x27d60f=_0x59ea57,_0x36c378=_0x463959[_0x27d60f(0x1cf)](_0x11e1a7),_0x344afa=_0x463959['get'](_0x4fcb94);_0xc06963[_0x27d60f(0x185)](_0xc43dd4=>{const _0x3aeff7=_0x27d60f;_0x36c378[_0x3aeff7(0x18b)](_0xc43dd4)&&_0xc06963[_0x3aeff7(0x195)](_0xc43dd4);}),_0xc06963[_0x27d60f(0x183)]&&(await _0x344afa[_0x27d60f(0x1cf)](_0x27d60f(0x1ab),{'params':{'userIDs':[..._0xc06963]}}))[_0x27d60f(0x19c)][_0x27d60f(0x197)]['forEach'](_0x58ee22=>{const _0x25ef9c=_0x27d60f;_0x58ee22&&_0x36c378[_0x25ef9c(0x1c1)](_0x58ee22);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2e5a42,_0x505724,_0x3a9326,_0x4cbdb0)=>{const _0x1ec23e=_0x59ea57;for(var _0x4c9b72=_0x4cbdb0>0x1?void 0x0:_0x4cbdb0?K(_0x505724,_0x3a9326):_0x505724,_0x5e4417=_0x2e5a42[_0x1ec23e(0x1b1)]-0x1,_0x19900f;_0x5e4417>=0x0;_0x5e4417--)(_0x19900f=_0x2e5a42[_0x5e4417])&&(_0x4c9b72=_0x19900f(_0x4c9b72)||_0x4c9b72);return _0x4c9b72;},p=(_0x266256,_0x149c7c)=>(_0x1a89f9,_0x2c6fe7)=>_0x149c7c(_0x1a89f9,_0x2c6fe7,_0x266256);let _=class extends _0x3b5b07{constructor(_0x180cbb,_0x4b7acb,_0x31e234,_0x519c8a){const _0xbe32b5=_0x59ea57;super(),this['_commentService']=_0x180cbb,this['_threadCommentModel']=_0x4b7acb,this[_0xbe32b5(0x1c5)]=_0x31e234,this[_0xbe32b5(0x1b0)]=_0x519c8a,this[_0xbe32b5(0x193)](),this[_0xbe32b5(0x17e)]();}[_0x59ea57(0x17e)](){const _0x1c963e=_0x59ea57;this['disposeWithMe'](this[_0x1c963e(0x1c6)][_0x1c963e(0x1c2)][_0x1c963e(0x171)](_0x5376a3(0x10))[_0x1c963e(0x1a4)](_0x2ab37e=>{const _0x351837=_0x1c963e,_0x279584=new Set();_0x2ab37e['forEach'](_0x267458=>{const _0x2dc0a6=_0x264e;switch(_0x267458['type']){case'add':{const _0x515725=_0x267458['payload'][_0x2dc0a6(0x17a)];_0x279584[_0x2dc0a6(0x17c)](_0x515725);break;}}}),B(this[_0x351837(0x1b0)],_0x279584);}));}[_0x59ea57(0x193)](){const _0x5538fc=_0x59ea57;this[_0x5538fc(0x1cd)](this[_0x5538fc(0x190)]['commentUpdate$'][_0x5538fc(0x1a4)](async _0x44f446=>{const _0xb80720=_0x5538fc;var _0xff2834,_0x4bd814,_0x465202,_0x37673f;const _0x58025a=(_0xff2834=this[_0xb80720(0x1c6)][_0xb80720(0x191)](_0x44f446[_0xb80720(0x1ce)])['find'](_0x43a2b0=>_0x43a2b0['threadId']===_0x44f446[_0xb80720(0x1aa)]))==null?void 0x0:_0xff2834[_0xb80720(0x199)];if(!_0x58025a)return;const {unitId:_0x1251e5,subUnitId:_0xdcb03c}=_0x58025a;switch(_0x44f446[_0xb80720(0x1a9)]&&this[_0xb80720(0x1c5)]['addUser'](_0x44f446[_0xb80720(0x1a9)]),_0x44f446['type']){case v[_0xb80720(0x1cc)]:break;case v[_0xb80720(0x1d1)]:{this[_0xb80720(0x1c6)][_0xb80720(0x1c8)](_0x1251e5,_0xdcb03c,{'unitId':_0x1251e5,'subUnitId':_0xdcb03c,'ref':'','id':_0x44f446[_0xb80720(0x1d3)],'dT':y(+_0x44f446['createTimestamp']),'threadId':_0x44f446[_0xb80720(0x1aa)],'personId':(_0x465202=(_0x4bd814=_0x44f446[_0xb80720(0x1a9)])==null?void 0x0:_0x4bd814['userID'])!=null?_0x465202:_0x44f446[_0xb80720(0x1bc)],'text':JSON['parse'](_0x44f446['content']),'parentId':_0x58025a['id']});break;}case v[_0xb80720(0x19e)]:{const _0x3a966d=this[_0xb80720(0x1c6)]['getComment'](_0x1251e5,_0xdcb03c,_0x44f446[_0xb80720(0x1d3)]);_0x3a966d&&_0x3a966d[_0xb80720(0x1af)]&&this[_0xb80720(0x1c6)][_0xb80720(0x192)](_0x1251e5,_0xdcb03c,_0x44f446[_0xb80720(0x1d3)]);break;}case v['Edit']:{this[_0xb80720(0x1c6)][_0xb80720(0x181)](_0x1251e5,_0xdcb03c,{'commentId':_0x44f446['replyId'],'text':JSON[_0xb80720(0x1c0)](_0x44f446[_0xb80720(0x1bb)])});break;}case v[_0xb80720(0x1a3)]:{const _0x4313cc=(_0x37673f=this[_0xb80720(0x1c6)][_0xb80720(0x191)](_0x44f446[_0xb80720(0x1ce)])[_0xb80720(0x1a6)](_0xb94a3c=>_0xb94a3c[_0xb80720(0x1aa)]===_0x44f446[_0xb80720(0x1aa)]))==null?void 0x0:_0x37673f[_0xb80720(0x199)];_0x4313cc&&this[_0xb80720(0x1c6)][_0xb80720(0x19f)](_0x1251e5,_0xdcb03c,_0x4313cc['id'],_0x44f446['solved']===I[_0xb80720(0x1b2)]);break;}}}));}};_=V([p(0x0,_0x305425(_0x3cd1f3)),p(0x1,_0x305425(_0x43c617)),p(0x2,_0x305425(_0x11e1a7)),p(0x3,_0x305425(_0x55b98c))],_);const z=_0x59ea57(0x18a),O={};var k=Object[_0x59ea57(0x1b7)],Q=(_0x4414ef,_0x418a93,_0x433852,_0x4d2d5b)=>{for(var _0x5043d0=_0x4d2d5b>0x1?void 0x0:_0x4d2d5b?k(_0x418a93,_0x433852):_0x418a93,_0x32e476=_0x4414ef['length']-0x1,_0x4f3393;_0x32e476>=0x0;_0x32e476--)(_0x4f3393=_0x4414ef[_0x32e476])&&(_0x5043d0=_0x4f3393(_0x5043d0)||_0x5043d0);return _0x5043d0;},b=(_0x2d3e20,_0x10368b)=>(_0x41b6cd,_0x11d852)=>_0x10368b(_0x41b6cd,_0x11d852,_0x2d3e20);function X(_0x3bd5bf,_0x1aae86){const _0x55de61=_0x59ea57,_0x8c3315=_0x3bd5bf[_0x55de61(0x1ae)][0x0];return{..._0x1aae86,'id':_0x8c3315['replyId'],'resolved':_0x3bd5bf[_0x55de61(0x18f)]===0x1,'dT':y(_0x8c3315[_0x55de61(0x1b9)]),'personId':_0x8c3315[_0x55de61(0x1bc)],'threadId':_0x8c3315[_0x55de61(0x1aa)]};}function ee(_0x2e6878,_0x25c9de,_0x2c3112){const _0x537dea=_0x59ea57;var _0x4a6bed,_0x1f3183;if(((_0x1f3183=(_0x4a6bed=_0x2e6878==null?void 0x0:_0x2e6878['replies'])==null?void 0x0:_0x4a6bed['length'])!=null?_0x1f3183:0x0)>0x0){const _0x13edb9=(_0x1547cd,_0x54a702)=>({'id':_0x1547cd['replyId'],'threadId':_0x1547cd[_0x537dea(0x1aa)],'dT':y(_0x1547cd[_0x537dea(0x1b9)]),'personId':_0x1547cd[_0x537dea(0x1bc)],'resolved':_0x2e6878[_0x537dea(0x18f)]===I[_0x537dea(0x1b2)],'unitId':_0x25c9de,'subUnitId':_0x2c3112,'text':JSON[_0x537dea(0x1c0)](_0x1547cd[_0x537dea(0x1bb)]),'parentId':_0x54a702}),_0x337bc1=_0x13edb9(_0x2e6878[_0x537dea(0x1ae)][0x0]);return{..._0x337bc1,'children':_0x2e6878[_0x537dea(0x1ae)][_0x537dea(0x1ad)](0x1)[_0x537dea(0x1ac)](_0x482275=>_0x13edb9(_0x482275,_0x337bc1['id']))};}return null;}let S=class{constructor(_0xd4a196,_0x2e6c75,_0x32deab){const _0x5ceab4=_0x59ea57;this[_0x5ceab4(0x16f)]=_0xd4a196,this[_0x5ceab4(0x1c5)]=_0x2e6c75,this['_sessionService']=_0x32deab;}async[_0x59ea57(0x1c8)](_0x509388){const _0x4ce1db=_0x59ea57;var _0x190b80,_0x5d7e9b;const {parentId:_0x40412d,unitId:_0x39f96b,text:_0x5450a4,threadId:_0x2c5143}=_0x509388,_0xb94365=(_0x5d7e9b=(_0x190b80=_0x5450a4['customRanges'])==null?void 0x0:_0x190b80[_0x4ce1db(0x17b)](_0x87eb07=>_0x87eb07['rangeType']===_0x52cc13[_0x4ce1db(0x186)])['map'](_0x7a4d19=>_0x7a4d19[_0x4ce1db(0x189)]))!=null?_0x5d7e9b:[],_0x2917ca=JSON[_0x4ce1db(0x1c3)](_0x5450a4),_0x37b411=(await this[_0x4ce1db(0x1be)][_0x4ce1db(0x196)](_0x39f96b))[_0x4ce1db(0x1b5)]();if(_0x40412d){const _0x3cb96d={'memberId':_0x37b411,'unitId':_0x39f96b,'content':_0x2917ca,'mention':_0xb94365,'threadId':_0x2c5143},_0x1550cb=(await this['_httpService'][_0x4ce1db(0x184)](_0x4ce1db(0x1cb)+_0x39f96b+_0x4ce1db(0x1b6),{'body':_0x3cb96d}))[_0x4ce1db(0x19c)][_0x4ce1db(0x178)];return{..._0x509388,'id':_0x1550cb[_0x4ce1db(0x1d3)],'dT':_0x30ebdb(+_0x1550cb[_0x4ce1db(0x1b9)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x1550cb[_0x4ce1db(0x1bc)]};}else{const _0x39a8fe={'memberId':_0x37b411,'unitId':_0x39f96b,'content':_0x2917ca,'mention':_0xb94365},_0x296fab=await this['_httpService'][_0x4ce1db(0x184)](_0x4ce1db(0x1cb)+_0x39f96b+_0x4ce1db(0x1c9),{'body':_0x39a8fe});return X(_0x296fab[_0x4ce1db(0x19c)][_0x4ce1db(0x17d)],_0x509388);}}async[_0x59ea57(0x181)](_0x5a2659){const _0x4f3961=_0x59ea57;var _0x26b8c6,_0x2fc754;const {text:_0x54fae8,unitId:_0x33630b}=_0x5a2659,_0x635e11=(_0x2fc754=(_0x26b8c6=_0x54fae8[_0x4f3961(0x175)])==null?void 0x0:_0x26b8c6[_0x4f3961(0x17b)](_0x358c60=>_0x358c60[_0x4f3961(0x1a2)]===_0x52cc13[_0x4f3961(0x186)])[_0x4f3961(0x1ac)](_0x276776=>_0x276776[_0x4f3961(0x189)]))!=null?_0x2fc754:[],_0x339f28=JSON[_0x4f3961(0x1c3)](_0x54fae8),_0x11e090=_0x5a2659[_0x4f3961(0x1aa)],_0x17c5e7=_0x5a2659['id'],_0x4f4296={'memberId':(await this['_sessionService'][_0x4f3961(0x196)](_0x33630b))['getMemberID'](),'unitId':_0x33630b,'threadId':_0x11e090,'mention':_0x635e11,'content':_0x339f28,'replyId':_0x17c5e7},_0x296ed3=await this['_httpService'][_0x4f3961(0x184)](_0x4f3961(0x1cb)+_0x33630b+_0x4f3961(0x180),{'body':_0x4f4296});return!_0x296ed3['body']['error']||_0x296ed3['body']['error'][_0x4f3961(0x1c7)]===0x1;}async['resolveComment'](_0xd27023){const _0x3f427d=_0x59ea57,{unitId:_0x59457b}=_0xd27023,_0x46e734=_0xd27023[_0x3f427d(0x1aa)],_0x50a8f7={'memberId':this[_0x3f427d(0x1c5)][_0x3f427d(0x19d)]()[_0x3f427d(0x173)],'unitId':_0x59457b,'threadId':_0x46e734,'solved':_0xd27023['resolved']?I[_0x3f427d(0x1b2)]:I[_0x3f427d(0x182)]},_0x4e4ec7=await this[_0x3f427d(0x16f)]['post'](_0x3f427d(0x1cb)+_0x59457b+'/solved',{'body':_0x50a8f7});return!_0x4e4ec7[_0x3f427d(0x19c)]['error']||_0x4e4ec7[_0x3f427d(0x19c)]['error'][_0x3f427d(0x1c7)]===0x1;}async[_0x59ea57(0x192)](_0x1e31d1,_0x1c21ed,_0x258733,_0x1e8ee2){const _0xeafe29=_0x59ea57,_0x267288={'memberId':(await this['_sessionService']['requireSession'](_0x1e31d1))[_0xeafe29(0x1b5)](),'threadId':_0x258733,'replyId':_0x1e8ee2,'unitId':_0x1e31d1},_0x282b85=await this['_httpService'][_0xeafe29(0x184)](_0xeafe29(0x1cb)+_0x1e31d1+_0xeafe29(0x18c),{'body':_0x267288});return!_0x282b85[_0xeafe29(0x19c)][_0xeafe29(0x179)]||_0x282b85[_0xeafe29(0x19c)][_0xeafe29(0x179)]['code']===0x1;}async[_0x59ea57(0x170)](_0xecbe23,_0x139476,_0xc2f44e){const _0x31b2f8=_0x59ea57,_0x5445ae={'unitId':_0xecbe23,'threadId':_0xc2f44e},_0xc88335=await this['_httpService'][_0x31b2f8(0x184)]('/universer-api/comment/unit/'+_0xecbe23+_0x31b2f8(0x187),{'body':_0x5445ae}),_0x44e8a0=_0xc2f44e[_0x31b2f8(0x1ac)](_0x45a7c1=>ee(_0xc88335[_0x31b2f8(0x19c)][_0x31b2f8(0x18d)][_0x45a7c1],_0xecbe23,_0x139476))['filter'](Boolean);return Object['values'](_0xc88335['body'][_0x31b2f8(0x197)])[_0x31b2f8(0x185)](_0x33241c=>{const _0x334e38=_0x31b2f8;this['_userService'][_0x334e38(0x1c1)](_0x33241c);}),_0x44e8a0;}[_0x59ea57(0x19b)](_0x2accbb){const _0x5c4543=_0x59ea57;return{'id':_0x2accbb['id'],'threadId':_0x2accbb[_0x5c4543(0x1aa)],'ref':_0x2accbb[_0x5c4543(0x17f)]};}};function _0x7619(){const _0xb92e9c=['user','threadId','/universer-api/user/list','map','slice','replies','parentId','_injector','length','Solved','648744pchXYX','241366sZmiDl','getMemberID','/reply','getOwnPropertyDescriptor','192150lcNakw','createTimestamp','Unknown','content','userId','1897176okHVAa','_sessionService','type','parse','addUser','commentUpdate$','stringify','2814485mmSRJs','_userService','_threadCommentModel','code','addComment','/add','465450ZLrGIX','/universer-api/comment/unit/','Add','disposeWithMe','unitId','get','UNRECOGNIZED','Reply','onStarting','replyId','defineProperty','_httpService','listComments','pipe','632187rayOhg','userID','8SZaTuj','customRanges','format','_configService','reply','error','personId','filter','add','comment','_initUserSync','ref','/edit','updateComment','OpenOrReOpen','size','post','forEach','COMMENT','/list','symbol','rangeId','thread-comment-data-source.config','getUser','/delete','comments','pluginName','solved','_commentService','getUnit','deleteComment','_init','_threadCommentDataSourceService','delete','requireSession','users','_threadCommentDataSource','root','syncUpdateMutationToColla','saveCommentToSnapshot','body','getCurrentUser','Delete','resolveComment','_initDataSource','77XeUbbE','rangeType','Solve','subscribe','Edit','find','_config','UNIVER_UNKNOWN'];_0x7619=function(){return _0xb92e9c;};return _0x7619();}S=Q([b(0x0,_0x305425(_0x4fcb94)),b(0x1,_0x305425(_0x11e1a7)),b(0x2,_0x305425(_0x250336))],S);var re=Object[_0x59ea57(0x1b7)],te=(_0x316dfd,_0x570ad9,_0x291029,_0x10a655)=>{const _0x56e817=_0x59ea57;for(var _0xa60318=_0x10a655>0x1?void 0x0:_0x10a655?re(_0x570ad9,_0x291029):_0x570ad9,_0x210d36=_0x316dfd[_0x56e817(0x1b1)]-0x1,_0x5b6d7c;_0x210d36>=0x0;_0x210d36--)(_0x5b6d7c=_0x316dfd[_0x210d36])&&(_0xa60318=_0x5b6d7c(_0xa60318)||_0xa60318);return _0xa60318;},M=(_0x5a8ffe,_0x7b1d7c)=>(_0x730be2,_0x33f244)=>_0x7b1d7c(_0x730be2,_0x33f244,_0x5a8ffe);let f=class extends _0x3b5b07{constructor(_0x35e734,_0x207612){const _0x1c32a9=_0x59ea57;super(),this[_0x1c32a9(0x194)]=_0x35e734,this[_0x1c32a9(0x198)]=_0x207612,this[_0x1c32a9(0x1a0)]();}[_0x59ea57(0x1a0)](){const _0x2399f4=_0x59ea57;this[_0x2399f4(0x194)]['dataSource']=this[_0x2399f4(0x198)],this['_threadCommentDataSourceService'][_0x2399f4(0x19a)]=!0x1;}};f=te([M(0x0,_0x4e5a4c),M(0x1,_0x305425(S))],f);var se=Object[_0x59ea57(0x16e)],oe=Object[_0x59ea57(0x1b7)],ne=(_0x585d99,_0xb0bfd6,_0x4e5e26)=>_0xb0bfd6 in _0x585d99?se(_0x585d99,_0xb0bfd6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e5e26}):_0x585d99[_0xb0bfd6]=_0x4e5e26,ie=(_0x57f88b,_0x40ff86,_0x580d67,_0xabce1)=>{const _0x51fd5b=_0x59ea57;for(var _0x95fdfd=_0xabce1>0x1?void 0x0:_0xabce1?oe(_0x40ff86,_0x580d67):_0x40ff86,_0x13fe48=_0x57f88b[_0x51fd5b(0x1b1)]-0x1,_0x82b9e0;_0x13fe48>=0x0;_0x13fe48--)(_0x82b9e0=_0x57f88b[_0x13fe48])&&(_0x95fdfd=_0x82b9e0(_0x95fdfd)||_0x95fdfd);return _0x95fdfd;},N=(_0x4b1065,_0x55c98b)=>(_0x563a7e,_0x53df8c)=>_0x55c98b(_0x563a7e,_0x53df8c,_0x4b1065),$=(_0x3f0ec9,_0x4d5904,_0x3f5e43)=>ne(_0x3f0ec9,typeof _0x4d5904!=_0x59ea57(0x188)?_0x4d5904+'':_0x4d5904,_0x3f5e43);let g=class extends _0x465844{constructor(_0x414b94=O,_0x4ba7ed,_0x6b66d6){const _0x128580=_0x59ea57;super(),this[_0x128580(0x1a7)]=_0x414b94,this[_0x128580(0x1b0)]=_0x4ba7ed,this[_0x128580(0x177)]=_0x6b66d6;const {..._0x3b932c}=_0x148cba({},O,this[_0x128580(0x1a7)]);this['_configService']['setConfig'](z,_0x3b932c);}[_0x59ea57(0x1d2)](){[[S],[f],[_]]['forEach'](_0x147e24=>{const _0x4e12ee=_0x264e;this['_injector'][_0x4e12ee(0x17c)](_0x147e24);});}['onReady'](){const _0x4ee148=_0x59ea57;this[_0x4ee148(0x1b0)][_0x4ee148(0x1cf)](f),this[_0x4ee148(0x1b0)][_0x4ee148(0x1cf)](_);}};$(g,_0x59ea57(0x18e),W),$(g,_0x59ea57(0x1bf),_0x1acf5a[_0x59ea57(0x1a8)]),g=ie([_0x5f16f5(_0x260dd3,_0x3f0de4,_0x53e585),N(0x1,_0x305425(_0x55b98c)),N(0x2,_0x1dbb73)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2418(_0x1b48c8,_0x5218a3){const _0xf62b0e=_0xf62b();return _0x2418=function(_0x241840,_0x1009d6){_0x241840=_0x241840-0x19f;let _0x21a80e=_0xf62b0e[_0x241840];return _0x21a80e;},_0x2418(_0x1b48c8,_0x5218a3);}function _0xf62b(){const _0x124b09=['CustomRangeType','444606hxNDuF','solved','userID','Delete','Solve','Disposable','@univerjs-pro/collaboration-client','UniverNetwork','user','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/universer-api/comment/unit/','toStringTag','customRanges','UNIVER_UNKNOWN','CommentService','_commentService','Unknown','HTTPService','_initDataSource','Solved','dayjs','map','updateComment','12aKbpSu','@univerjs/thread-comment','Add','Module','format','commentUpdate$','CollaborationSessionService','_httpService','_initUserSync','addUser','UNRECOGNIZED','IConfigService','230556VHCRyf','getOwnPropertyDescriptor','rangeType','45wipTYK','payload','YYYY/MM/DD\x20HH:mm','defineProperty','disposeWithMe','_threadCommentModel','224310lgGTfM','/solved','get','Plugin','forEach','UniverLicensePlugin','rangeId','code','ThreadCommentModel','length','UniverCore','parentId','filter','resolveComment','createTimestamp','/edit','parse','onReady','object','function','2625238kqmGXc','replies','subscribe','12YZlngw','users','/reply','_threadCommentDataSourceService','getUnit','DependentOn','_init','type','setConfig','406660BnWISF','UniverThreadCommentDataSourcePlugin','comment','@univerjs/network','exports','UserManagerService','UniverProLicense','Reply','_config','UniverThreadCommentUIPlugin','_sessionService','threadId','rxjs','getMemberID','_userService','requireSession','error','values','listComments','@univerjs/core','amd','pluginName','merge','onStarting','body','getCurrentUser','_threadCommentDataSource','root','dataSource','content','@univerjs-pro/license','_configService','unitId','symbol','add','/add','post','12CTsArw','3jBRnho','4406712Fxtnwh','userId','_injector','size','replyId','pipe','thread-comment-data-source.config','Edit','/delete','OpenOrReOpen','1131403Rgfufx','Inject','IThreadCommentDataSourceService'];_0xf62b=function(){return _0x124b09;};return _0xf62b();}(function(_0x54063f,_0x4ff0c3){const _0x5a09ac=_0x2418,_0x58002b=_0x54063f();while(!![]){try{const _0x1ab469=parseInt(_0x5a09ac(0x1eb))/0x1+-parseInt(_0x5a09ac(0x1c8))/0x2*(-parseInt(_0x5a09ac(0x1b9))/0x3)+-parseInt(_0x5a09ac(0x20b))/0x4*(-parseInt(_0x5a09ac(0x1f4))/0x5)+-parseInt(_0x5a09ac(0x1df))/0x6*(-parseInt(_0x5a09ac(0x1c4))/0x7)+-parseInt(_0x5a09ac(0x1ba))/0x8+parseInt(_0x5a09ac(0x1ee))/0x9*(parseInt(_0x5a09ac(0x214))/0xa)+-parseInt(_0x5a09ac(0x208))/0xb*(parseInt(_0x5a09ac(0x1b8))/0xc);if(_0x1ab469===_0x4ff0c3)break;else _0x58002b['push'](_0x58002b['shift']());}catch(_0x428654){_0x58002b['push'](_0x58002b['shift']());}}}(_0xf62b,0x4f3b8),function(_0x446f19,_0x227c1c){const _0x4f88e0=_0x2418;typeof exports==_0x4f88e0(0x206)&&typeof module<'u'?_0x227c1c(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==_0x4f88e0(0x207)&&define[_0x4f88e0(0x1a7)]?define([_0x4f88e0(0x218),_0x4f88e0(0x1ce),_0x4f88e0(0x1b1),_0x4f88e0(0x1a6),'@univerjs/thread-comment-ui',_0x4f88e0(0x1e0),_0x4f88e0(0x19f),_0x4f88e0(0x217)],_0x227c1c):(_0x446f19=typeof globalThis<'u'?globalThis:_0x446f19||self,_0x227c1c(_0x446f19['UniverProThreadCommentDatasource']={},_0x446f19['UniverProCollaborationClient'],_0x446f19[_0x4f88e0(0x21a)],_0x446f19[_0x4f88e0(0x1fe)],_0x446f19['UniverThreadCommentUi'],_0x446f19['UniverThreadComment'],_0x446f19[_0x4f88e0(0x19f)],_0x446f19[_0x4f88e0(0x1cf)]));}(this,function(_0x317186,_0x1b27a8,_0x566f5b,_0xf8ec49,_0x4a9aa9,_0x1a975c,_0x493fcd,_0x2a1745){'use strict';const _0x7e79e2=_0x2418;const _0x47c91f=_0x7e79e2(0x1d1);var _0x5137ca=(_0x41e0bb=>(_0x41e0bb[_0x41e0bb['OpenOrReOpen']=0x0]=_0x7e79e2(0x1c3),_0x41e0bb[_0x41e0bb[_0x7e79e2(0x1db)]=0x1]=_0x7e79e2(0x1db),_0x41e0bb[_0x41e0bb[_0x7e79e2(0x1e9)]=-0x1]=_0x7e79e2(0x1e9),_0x41e0bb))(_0x5137ca||{}),_0x404f60=(_0x1185de=>(_0x1185de[_0x1185de[_0x7e79e2(0x1d8)]=0x0]=_0x7e79e2(0x1d8),_0x1185de[_0x1185de[_0x7e79e2(0x1e1)]=0x1]='Add',_0x1185de[_0x1185de['Reply']=0x2]=_0x7e79e2(0x21b),_0x1185de[_0x1185de['Edit']=0x3]=_0x7e79e2(0x1c1),_0x1185de[_0x1185de[_0x7e79e2(0x1cb)]=0x4]=_0x7e79e2(0x1cb),_0x1185de[_0x1185de[_0x7e79e2(0x1cc)]=0x5]=_0x7e79e2(0x1cc),_0x1185de[_0x1185de[_0x7e79e2(0x1e9)]=-0x1]=_0x7e79e2(0x1e9),_0x1185de))(_0x404f60||{});const _0x4467d1=_0x3e27fe=>_0xf8ec49['dayjs'](new Date(+_0x3e27fe))[_0x7e79e2(0x1e3)](_0x7e79e2(0x1f0)),_0x2028c1=async(_0x45d623,_0x40937c)=>{const _0x20e77f=_0x7e79e2,_0x4f5462=_0x45d623[_0x20e77f(0x1f6)](_0xf8ec49['UserManagerService']),_0x53ec09=_0x45d623[_0x20e77f(0x1f6)](_0x2a1745[_0x20e77f(0x1d9)]);_0x40937c[_0x20e77f(0x1f8)](_0x65074b=>{_0x4f5462['getUser'](_0x65074b)&&_0x40937c['delete'](_0x65074b);}),_0x40937c[_0x20e77f(0x1bd)]&&(await _0x53ec09[_0x20e77f(0x1f6)]('/universer-api/user/list',{'params':{'userIDs':[..._0x40937c]}}))['body']['users'][_0x20e77f(0x1f8)](_0x368799=>{const _0x156895=_0x20e77f;_0x368799&&_0x4f5462[_0x156895(0x1e8)](_0x368799);});};var _0xfee35c=Object[_0x7e79e2(0x1ec)],_0x186f4f=(_0x3c3904,_0x36670a,_0x3a072d,_0x6e24d1)=>{const _0x5a5d8a=_0x7e79e2;for(var _0x5696f5=_0x6e24d1>0x1?void 0x0:_0x6e24d1?_0xfee35c(_0x36670a,_0x3a072d):_0x36670a,_0x11c20d=_0x3c3904[_0x5a5d8a(0x1fd)]-0x1,_0x35f921;_0x11c20d>=0x0;_0x11c20d--)(_0x35f921=_0x3c3904[_0x11c20d])&&(_0x5696f5=_0x35f921(_0x5696f5)||_0x5696f5);return _0x5696f5;},_0x2e6254=(_0x141c42,_0x37a243)=>(_0x4f41c7,_0x581f52)=>_0x37a243(_0x4f41c7,_0x581f52,_0x141c42);let _0x34cba4=class extends _0xf8ec49['Disposable']{constructor(_0x1a77e,_0x186372,_0x4839cc,_0x293173){const _0x3dacc4=_0x7e79e2;super(),this[_0x3dacc4(0x1d7)]=_0x1a77e,this[_0x3dacc4(0x1f3)]=_0x186372,this['_userService']=_0x4839cc,this['_injector']=_0x293173,this[_0x3dacc4(0x211)](),this[_0x3dacc4(0x1e7)]();}[_0x7e79e2(0x1e7)](){const _0x42b5b0=_0x7e79e2;this[_0x42b5b0(0x1f2)](this['_threadCommentModel']['commentUpdate$'][_0x42b5b0(0x1bf)](_0x493fcd['bufferTime'](0x10))[_0x42b5b0(0x20a)](_0x41ba5f=>{const _0x28b994=_0x42b5b0,_0x4090ea=new Set();_0x41ba5f[_0x28b994(0x1f8)](_0x578061=>{const _0x2e116e=_0x28b994;switch(_0x578061[_0x2e116e(0x212)]){case _0x2e116e(0x1b5):{const _0x5a6b12=_0x578061[_0x2e116e(0x1ef)]['personId'];_0x4090ea[_0x2e116e(0x1b5)](_0x5a6b12);break;}}}),_0x2028c1(this[_0x28b994(0x1bc)],_0x4090ea);}));}['_init'](){const _0x4c9c52=_0x7e79e2;this[_0x4c9c52(0x1f2)](this[_0x4c9c52(0x1d7)][_0x4c9c52(0x1e4)]['subscribe'](async _0x1259d0=>{const _0x338ca2=_0x4c9c52;var _0x4fef29,_0x3ba926,_0x30be04,_0xf7e65e;const _0x1feaad=(_0x4fef29=this['_threadCommentModel'][_0x338ca2(0x20f)](_0x1259d0[_0x338ca2(0x1b3)])['find'](_0x1afe24=>_0x1afe24['threadId']===_0x1259d0['threadId']))==null?void 0x0:_0x4fef29[_0x338ca2(0x1ae)];if(!_0x1feaad)return;const {unitId:_0x547164,subUnitId:_0x4fe329}=_0x1feaad;switch(_0x1259d0[_0x338ca2(0x1d0)]&&this[_0x338ca2(0x1a1)][_0x338ca2(0x1e8)](_0x1259d0[_0x338ca2(0x1d0)]),_0x1259d0[_0x338ca2(0x212)]){case _0x404f60['Add']:break;case _0x404f60[_0x338ca2(0x21b)]:{this[_0x338ca2(0x1f3)]['addComment'](_0x547164,_0x4fe329,{'unitId':_0x547164,'subUnitId':_0x4fe329,'ref':'','id':_0x1259d0['replyId'],'dT':_0x4467d1(+_0x1259d0[_0x338ca2(0x202)]),'threadId':_0x1259d0[_0x338ca2(0x21f)],'personId':(_0x30be04=(_0x3ba926=_0x1259d0['user'])==null?void 0x0:_0x3ba926[_0x338ca2(0x1ca)])!=null?_0x30be04:_0x1259d0[_0x338ca2(0x1bb)],'text':JSON[_0x338ca2(0x204)](_0x1259d0[_0x338ca2(0x1b0)]),'parentId':_0x1feaad['id']});break;}case _0x404f60[_0x338ca2(0x1cb)]:{const _0x34580b=this[_0x338ca2(0x1f3)]['getComment'](_0x547164,_0x4fe329,_0x1259d0[_0x338ca2(0x1be)]);_0x34580b&&_0x34580b[_0x338ca2(0x1ff)]&&this[_0x338ca2(0x1f3)]['deleteComment'](_0x547164,_0x4fe329,_0x1259d0[_0x338ca2(0x1be)]);break;}case _0x404f60[_0x338ca2(0x1c1)]:{this[_0x338ca2(0x1f3)]['updateComment'](_0x547164,_0x4fe329,{'commentId':_0x1259d0['replyId'],'text':JSON[_0x338ca2(0x204)](_0x1259d0[_0x338ca2(0x1b0)])});break;}case _0x404f60[_0x338ca2(0x1cc)]:{const _0x425394=(_0xf7e65e=this[_0x338ca2(0x1f3)]['getUnit'](_0x1259d0[_0x338ca2(0x1b3)])['find'](_0x210b5f=>_0x210b5f[_0x338ca2(0x21f)]===_0x1259d0['threadId']))==null?void 0x0:_0xf7e65e[_0x338ca2(0x1ae)];_0x425394&&this[_0x338ca2(0x1f3)][_0x338ca2(0x201)](_0x547164,_0x4fe329,_0x425394['id'],_0x1259d0[_0x338ca2(0x1c9)]===_0x5137ca[_0x338ca2(0x1db)]);break;}}}));}};_0x34cba4=_0x186f4f([_0x2e6254(0x0,_0xf8ec49[_0x7e79e2(0x1c5)](_0x1b27a8[_0x7e79e2(0x1d6)])),_0x2e6254(0x1,_0xf8ec49[_0x7e79e2(0x1c5)](_0x1a975c[_0x7e79e2(0x1fc)])),_0x2e6254(0x2,_0xf8ec49[_0x7e79e2(0x1c5)](_0xf8ec49[_0x7e79e2(0x219)])),_0x2e6254(0x3,_0xf8ec49[_0x7e79e2(0x1c5)](_0xf8ec49['Injector']))],_0x34cba4);const _0x57909d=_0x7e79e2(0x1c0),_0x377708={};var _0x448214=Object[_0x7e79e2(0x1ec)],_0x21b935=(_0x157332,_0x3b05fa,_0xea8b7e,_0x42c245)=>{const _0xb9f208=_0x7e79e2;for(var _0x406108=_0x42c245>0x1?void 0x0:_0x42c245?_0x448214(_0x3b05fa,_0xea8b7e):_0x3b05fa,_0x2304fe=_0x157332[_0xb9f208(0x1fd)]-0x1,_0x21ad03;_0x2304fe>=0x0;_0x2304fe--)(_0x21ad03=_0x157332[_0x2304fe])&&(_0x406108=_0x21ad03(_0x406108)||_0x406108);return _0x406108;},_0x3a26ca=(_0x313b7b,_0x2fee6c)=>(_0x282e20,_0xca2c24)=>_0x2fee6c(_0x282e20,_0xca2c24,_0x313b7b);function _0x4c11ea(_0x58c7c0,_0x339cea){const _0x1654e5=_0x7e79e2,_0x48db4e=_0x58c7c0[_0x1654e5(0x209)][0x0];return{..._0x339cea,'id':_0x48db4e[_0x1654e5(0x1be)],'resolved':_0x58c7c0['solved']===0x1,'dT':_0x4467d1(_0x48db4e[_0x1654e5(0x202)]),'personId':_0x48db4e['userId'],'threadId':_0x48db4e[_0x1654e5(0x21f)]};}function _0x449fc5(_0x2dc144,_0x13114b,_0x5c1e4d){const _0x8667fd=_0x7e79e2;var _0x33bc34,_0x552d85;if(((_0x552d85=(_0x33bc34=_0x2dc144==null?void 0x0:_0x2dc144[_0x8667fd(0x209)])==null?void 0x0:_0x33bc34['length'])!=null?_0x552d85:0x0)>0x0){const _0x48967c=(_0x51ed80,_0x35c313)=>({'id':_0x51ed80[_0x8667fd(0x1be)],'threadId':_0x51ed80[_0x8667fd(0x21f)],'dT':_0x4467d1(_0x51ed80[_0x8667fd(0x202)]),'personId':_0x51ed80[_0x8667fd(0x1bb)],'resolved':_0x2dc144[_0x8667fd(0x1c9)]===_0x5137ca[_0x8667fd(0x1db)],'unitId':_0x13114b,'subUnitId':_0x5c1e4d,'text':JSON[_0x8667fd(0x204)](_0x51ed80[_0x8667fd(0x1b0)]),'parentId':_0x35c313}),_0x280e67=_0x48967c(_0x2dc144[_0x8667fd(0x209)][0x0]);return{..._0x280e67,'children':_0x2dc144[_0x8667fd(0x209)]['slice'](0x1)[_0x8667fd(0x1dd)](_0x10221d=>_0x48967c(_0x10221d,_0x280e67['id']))};}return null;}let _0x12fbbb=class{constructor(_0x5df2e3,_0x5d607b,_0x4e55e1){const _0x84cbec=_0x7e79e2;this[_0x84cbec(0x1e6)]=_0x5df2e3,this[_0x84cbec(0x1a1)]=_0x5d607b,this['_sessionService']=_0x4e55e1;}async['addComment'](_0x3ccf18){const _0x5d4a2e=_0x7e79e2;var _0x554e26,_0x4db71e;const {parentId:_0x63f43,unitId:_0xe8eb58,text:_0x3a2d26,threadId:_0x1044a4}=_0x3ccf18,_0xc2eb26=(_0x4db71e=(_0x554e26=_0x3a2d26[_0x5d4a2e(0x1d4)])==null?void 0x0:_0x554e26[_0x5d4a2e(0x200)](_0x29a9a7=>_0x29a9a7[_0x5d4a2e(0x1ed)]===_0xf8ec49[_0x5d4a2e(0x1c7)]['COMMENT'])['map'](_0x3ace1d=>_0x3ace1d[_0x5d4a2e(0x1fa)]))!=null?_0x4db71e:[],_0x2f887a=JSON['stringify'](_0x3a2d26),_0x5ace75=(await this[_0x5d4a2e(0x21e)][_0x5d4a2e(0x1a2)](_0xe8eb58))['getMemberID']();if(_0x63f43){const _0x470895={'memberId':_0x5ace75,'unitId':_0xe8eb58,'content':_0x2f887a,'mention':_0xc2eb26,'threadId':_0x1044a4},_0x2a7c8d=(await this[_0x5d4a2e(0x1e6)][_0x5d4a2e(0x1b7)](_0x5d4a2e(0x1d2)+_0xe8eb58+_0x5d4a2e(0x20d),{'body':_0x470895}))[_0x5d4a2e(0x1ab)]['reply'];return{..._0x3ccf18,'id':_0x2a7c8d[_0x5d4a2e(0x1be)],'dT':_0xf8ec49[_0x5d4a2e(0x1dc)](+_0x2a7c8d['createTimestamp'])[_0x5d4a2e(0x1e3)](_0x5d4a2e(0x1f0)),'personId':_0x2a7c8d[_0x5d4a2e(0x1bb)]};}else{const _0x1c48a4={'memberId':_0x5ace75,'unitId':_0xe8eb58,'content':_0x2f887a,'mention':_0xc2eb26},_0x6b54c5=await this[_0x5d4a2e(0x1e6)]['post']('/universer-api/comment/unit/'+_0xe8eb58+_0x5d4a2e(0x1b6),{'body':_0x1c48a4});return _0x4c11ea(_0x6b54c5['body'][_0x5d4a2e(0x216)],_0x3ccf18);}}async[_0x7e79e2(0x1de)](_0x5ddc4){const _0x2db112=_0x7e79e2;var _0x4678a8,_0xcc557a;const {text:_0x1a5fc0,unitId:_0x4ab8f2}=_0x5ddc4,_0x1e5652=(_0xcc557a=(_0x4678a8=_0x1a5fc0['customRanges'])==null?void 0x0:_0x4678a8[_0x2db112(0x200)](_0x1300c1=>_0x1300c1['rangeType']===_0xf8ec49[_0x2db112(0x1c7)]['COMMENT'])[_0x2db112(0x1dd)](_0x5ac1d5=>_0x5ac1d5[_0x2db112(0x1fa)]))!=null?_0xcc557a:[],_0x3ded64=JSON['stringify'](_0x1a5fc0),_0x140c20=_0x5ddc4[_0x2db112(0x21f)],_0x33ffc8=_0x5ddc4['id'],_0x28171c={'memberId':(await this[_0x2db112(0x21e)]['requireSession'](_0x4ab8f2))[_0x2db112(0x1a0)](),'unitId':_0x4ab8f2,'threadId':_0x140c20,'mention':_0x1e5652,'content':_0x3ded64,'replyId':_0x33ffc8},_0x4436d4=await this[_0x2db112(0x1e6)][_0x2db112(0x1b7)](_0x2db112(0x1d2)+_0x4ab8f2+_0x2db112(0x203),{'body':_0x28171c});return!_0x4436d4[_0x2db112(0x1ab)][_0x2db112(0x1a3)]||_0x4436d4[_0x2db112(0x1ab)][_0x2db112(0x1a3)][_0x2db112(0x1fb)]===0x1;}async[_0x7e79e2(0x201)](_0x244c63){const _0x38c990=_0x7e79e2,{unitId:_0x1c95ea}=_0x244c63,_0xc65d4=_0x244c63[_0x38c990(0x21f)],_0x50c6ab={'memberId':this[_0x38c990(0x1a1)][_0x38c990(0x1ac)]()[_0x38c990(0x1ca)],'unitId':_0x1c95ea,'threadId':_0xc65d4,'solved':_0x244c63['resolved']?_0x5137ca[_0x38c990(0x1db)]:_0x5137ca[_0x38c990(0x1c3)]},_0x1630b9=await this[_0x38c990(0x1e6)][_0x38c990(0x1b7)](_0x38c990(0x1d2)+_0x1c95ea+_0x38c990(0x1f5),{'body':_0x50c6ab});return!_0x1630b9[_0x38c990(0x1ab)]['error']||_0x1630b9[_0x38c990(0x1ab)][_0x38c990(0x1a3)][_0x38c990(0x1fb)]===0x1;}async['deleteComment'](_0x52909f,_0x28efb2,_0x478f4d,_0x1df4ef){const _0x330cca=_0x7e79e2,_0x182745={'memberId':(await this[_0x330cca(0x21e)][_0x330cca(0x1a2)](_0x52909f))[_0x330cca(0x1a0)](),'threadId':_0x478f4d,'replyId':_0x1df4ef,'unitId':_0x52909f},_0xcdcb4f=await this[_0x330cca(0x1e6)][_0x330cca(0x1b7)](_0x330cca(0x1d2)+_0x52909f+_0x330cca(0x1c2),{'body':_0x182745});return!_0xcdcb4f[_0x330cca(0x1ab)][_0x330cca(0x1a3)]||_0xcdcb4f['body'][_0x330cca(0x1a3)][_0x330cca(0x1fb)]===0x1;}async[_0x7e79e2(0x1a5)](_0x9f469b,_0x239367,_0x31c36a){const _0x83248e=_0x7e79e2,_0x5cf6f6={'unitId':_0x9f469b,'threadId':_0x31c36a},_0x39de62=await this[_0x83248e(0x1e6)][_0x83248e(0x1b7)]('/universer-api/comment/unit/'+_0x9f469b+'/list',{'body':_0x5cf6f6}),_0x4a59a6=_0x31c36a[_0x83248e(0x1dd)](_0x2f1639=>_0x449fc5(_0x39de62[_0x83248e(0x1ab)]['comments'][_0x2f1639],_0x9f469b,_0x239367))[_0x83248e(0x200)](Boolean);return Object[_0x83248e(0x1a4)](_0x39de62['body'][_0x83248e(0x20c)])[_0x83248e(0x1f8)](_0x1963b8=>{const _0x117e52=_0x83248e;this[_0x117e52(0x1a1)]['addUser'](_0x1963b8);}),_0x4a59a6;}['saveCommentToSnapshot'](_0x2f2098){return{'id':_0x2f2098['id'],'threadId':_0x2f2098['threadId'],'ref':_0x2f2098['ref']};}};_0x12fbbb=_0x21b935([_0x3a26ca(0x0,_0xf8ec49[_0x7e79e2(0x1c5)](_0x2a1745[_0x7e79e2(0x1d9)])),_0x3a26ca(0x1,_0xf8ec49['Inject'](_0xf8ec49[_0x7e79e2(0x219)])),_0x3a26ca(0x2,_0xf8ec49[_0x7e79e2(0x1c5)](_0x1b27a8[_0x7e79e2(0x1e5)]))],_0x12fbbb);var _0x14ed4e=Object['getOwnPropertyDescriptor'],_0x3f6481=(_0x361975,_0xb830c3,_0x67d969,_0x3359c2)=>{const _0x29ec2e=_0x7e79e2;for(var _0x22eb30=_0x3359c2>0x1?void 0x0:_0x3359c2?_0x14ed4e(_0xb830c3,_0x67d969):_0xb830c3,_0x3baf39=_0x361975[_0x29ec2e(0x1fd)]-0x1,_0x21ab91;_0x3baf39>=0x0;_0x3baf39--)(_0x21ab91=_0x361975[_0x3baf39])&&(_0x22eb30=_0x21ab91(_0x22eb30)||_0x22eb30);return _0x22eb30;},_0x677483=(_0x393deb,_0x1c6c87)=>(_0x28e5e3,_0x3a347d)=>_0x1c6c87(_0x28e5e3,_0x3a347d,_0x393deb);let _0x528d6a=class extends _0xf8ec49[_0x7e79e2(0x1cd)]{constructor(_0x1c58a2,_0x394335){const _0x1386b2=_0x7e79e2;super(),this[_0x1386b2(0x20e)]=_0x1c58a2,this[_0x1386b2(0x1ad)]=_0x394335,this[_0x1386b2(0x1da)]();}[_0x7e79e2(0x1da)](){const _0x28c14a=_0x7e79e2;this['_threadCommentDataSourceService'][_0x28c14a(0x1af)]=this['_threadCommentDataSource'],this[_0x28c14a(0x20e)]['syncUpdateMutationToColla']=!0x1;}};_0x528d6a=_0x3f6481([_0x677483(0x0,_0x1a975c[_0x7e79e2(0x1c6)]),_0x677483(0x1,_0xf8ec49[_0x7e79e2(0x1c5)](_0x12fbbb))],_0x528d6a);var _0x49a111=Object[_0x7e79e2(0x1f1)],_0x3582a6=Object[_0x7e79e2(0x1ec)],_0x163f3e=(_0x80cb93,_0x48d66c,_0xe28aa0)=>_0x48d66c in _0x80cb93?_0x49a111(_0x80cb93,_0x48d66c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe28aa0}):_0x80cb93[_0x48d66c]=_0xe28aa0,_0x125f79=(_0x22d169,_0x3493bf,_0x30ddb9,_0x2a65c6)=>{for(var _0x470095=_0x2a65c6>0x1?void 0x0:_0x2a65c6?_0x3582a6(_0x3493bf,_0x30ddb9):_0x3493bf,_0x42cc75=_0x22d169['length']-0x1,_0x5b605a;_0x42cc75>=0x0;_0x42cc75--)(_0x5b605a=_0x22d169[_0x42cc75])&&(_0x470095=_0x5b605a(_0x470095)||_0x470095);return _0x470095;},_0x55814f=(_0x59a8e4,_0x15a1c6)=>(_0x57512a,_0x2521ce)=>_0x15a1c6(_0x57512a,_0x2521ce,_0x59a8e4),_0x5d807c=(_0x29b18b,_0x377e9d,_0x319baf)=>_0x163f3e(_0x29b18b,typeof _0x377e9d!=_0x7e79e2(0x1b4)?_0x377e9d+'':_0x377e9d,_0x319baf);_0x317186[_0x7e79e2(0x215)]=class extends _0xf8ec49[_0x7e79e2(0x1f7)]{constructor(_0x5644c6=_0x377708,_0x5d5986,_0x16811f){const _0x2cea09=_0x7e79e2;super(),this[_0x2cea09(0x21c)]=_0x5644c6,this[_0x2cea09(0x1bc)]=_0x5d5986,this[_0x2cea09(0x1b2)]=_0x16811f;const {..._0x27ff92}=_0xf8ec49[_0x2cea09(0x1a9)]({},_0x377708,this[_0x2cea09(0x21c)]);this[_0x2cea09(0x1b2)][_0x2cea09(0x213)](_0x57909d,_0x27ff92);}[_0x7e79e2(0x1aa)](){[[_0x12fbbb],[_0x528d6a],[_0x34cba4]]['forEach'](_0x21929c=>{const _0x531001=_0x2418;this[_0x531001(0x1bc)][_0x531001(0x1b5)](_0x21929c);});}[_0x7e79e2(0x205)](){const _0x557ae9=_0x7e79e2;this[_0x557ae9(0x1bc)][_0x557ae9(0x1f6)](_0x528d6a),this['_injector'][_0x557ae9(0x1f6)](_0x34cba4);}},_0x5d807c(_0x317186[_0x7e79e2(0x215)],_0x7e79e2(0x1a8),_0x47c91f),_0x5d807c(_0x317186['UniverThreadCommentDataSourcePlugin'],_0x7e79e2(0x212),_0xf8ec49['UniverInstanceType'][_0x7e79e2(0x1d5)]),_0x317186[_0x7e79e2(0x215)]=_0x125f79([_0xf8ec49[_0x7e79e2(0x210)](_0x4a9aa9[_0x7e79e2(0x21d)],_0x1b27a8['UniverCollaborationClientPlugin'],_0x566f5b[_0x7e79e2(0x1f9)]),_0x55814f(0x1,_0xf8ec49[_0x7e79e2(0x1c5)](_0xf8ec49['Injector'])),_0x55814f(0x2,_0xf8ec49[_0x7e79e2(0x1ea)])],_0x317186[_0x7e79e2(0x215)]),Object[_0x7e79e2(0x1f1)](_0x317186,Symbol[_0x7e79e2(0x1d3)],{'value':_0x7e79e2(0x1e2)});}));
|
|
1
|
+
function _0x56ab(_0x471bc9,_0x5686ed){const _0x25a912=_0x25a9();return _0x56ab=function(_0x56abbc,_0x5d50a5){_0x56abbc=_0x56abbc-0xee;let _0x109938=_0x25a912[_0x56abbc];return _0x109938;},_0x56ab(_0x471bc9,_0x5686ed);}(function(_0x366883,_0x1f1f41){const _0x1b7e39=_0x56ab,_0x2a860e=_0x366883();while(!![]){try{const _0x5ce1cb=-parseInt(_0x1b7e39(0x16e))/0x1+-parseInt(_0x1b7e39(0x116))/0x2*(parseInt(_0x1b7e39(0x143))/0x3)+-parseInt(_0x1b7e39(0x126))/0x4*(parseInt(_0x1b7e39(0x176))/0x5)+parseInt(_0x1b7e39(0xf7))/0x6*(parseInt(_0x1b7e39(0x13f))/0x7)+parseInt(_0x1b7e39(0x12b))/0x8*(-parseInt(_0x1b7e39(0x135))/0x9)+-parseInt(_0x1b7e39(0x13c))/0xa+parseInt(_0x1b7e39(0x118))/0xb;if(_0x5ce1cb===_0x1f1f41)break;else _0x2a860e['push'](_0x2a860e['shift']());}catch(_0xf2602f){_0x2a860e['push'](_0x2a860e['shift']());}}}(_0x25a9,0x3e2a6),function(_0x4d673b,_0x5468fa){const _0x1b983b=_0x56ab;typeof exports==_0x1b983b(0x119)&&typeof module<'u'?_0x5468fa(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==_0x1b983b(0x130)&&define['amd']?define(['exports',_0x1b983b(0x160),_0x1b983b(0xfb),_0x1b983b(0x16c),_0x1b983b(0xf5),_0x1b983b(0x123),_0x1b983b(0x14c),_0x1b983b(0x109)],_0x5468fa):(_0x4d673b=typeof globalThis<'u'?globalThis:_0x4d673b||self,_0x5468fa(_0x4d673b[_0x1b983b(0x132)]={},_0x4d673b[_0x1b983b(0x13d)],_0x4d673b[_0x1b983b(0x122)],_0x4d673b[_0x1b983b(0x11a)],_0x4d673b['UniverThreadCommentUi'],_0x4d673b[_0x1b983b(0x103)],_0x4d673b[_0x1b983b(0x14c)],_0x4d673b[_0x1b983b(0x10a)]));}(this,function(_0x6df14e,_0x5ee949,_0x4b12ee,_0x1abb0c,_0x1b3bd0,_0x2333db,_0x19affa,_0x2d1d10){'use strict';const _0x4640e0=_0x56ab;const _0x302e71=_0x4640e0(0x152);var _0x4f964b=(_0x300cca=>(_0x300cca[_0x300cca[_0x4640e0(0x145)]=0x0]=_0x4640e0(0x145),_0x300cca[_0x300cca[_0x4640e0(0x10f)]=0x1]=_0x4640e0(0x10f),_0x300cca[_0x300cca[_0x4640e0(0x10b)]=-0x1]=_0x4640e0(0x10b),_0x300cca))(_0x4f964b||{}),_0x46c1be=(_0x31e787=>(_0x31e787[_0x31e787[_0x4640e0(0x178)]=0x0]='Unknown',_0x31e787[_0x31e787[_0x4640e0(0x173)]=0x1]='Add',_0x31e787[_0x31e787[_0x4640e0(0x11d)]=0x2]=_0x4640e0(0x11d),_0x31e787[_0x31e787['Edit']=0x3]=_0x4640e0(0x129),_0x31e787[_0x31e787[_0x4640e0(0x164)]=0x4]=_0x4640e0(0x164),_0x31e787[_0x31e787[_0x4640e0(0x11b)]=0x5]=_0x4640e0(0x11b),_0x31e787[_0x31e787[_0x4640e0(0x10b)]=-0x1]=_0x4640e0(0x10b),_0x31e787))(_0x46c1be||{});const _0x3bd3f6=_0xd5f750=>_0x1abb0c[_0x4640e0(0x10c)](new Date(+_0xd5f750))[_0x4640e0(0x153)](_0x4640e0(0x10d)),_0x386473=async(_0x56a14a,_0x46ac76)=>{const _0x5901cf=_0x4640e0,_0x47e425=_0x56a14a[_0x5901cf(0x15d)](_0x1abb0c[_0x5901cf(0x140)]),_0x30e17b=_0x56a14a['get'](_0x2d1d10[_0x5901cf(0x14b)]);_0x46ac76[_0x5901cf(0x170)](_0x233c82=>{const _0x483f01=_0x5901cf;_0x47e425[_0x483f01(0x101)](_0x233c82)&&_0x46ac76[_0x483f01(0x169)](_0x233c82);}),_0x46ac76[_0x5901cf(0x12d)]&&(await _0x30e17b[_0x5901cf(0x15d)](_0x5901cf(0x16d),{'params':{'userIDs':[..._0x46ac76]}}))['body'][_0x5901cf(0x162)]['forEach'](_0x13a28e=>{const _0xd3f2d6=_0x5901cf;_0x13a28e&&_0x47e425[_0xd3f2d6(0xef)](_0x13a28e);});};var _0x169ba6=Object['getOwnPropertyDescriptor'],_0x3726c6=(_0x4fd7e0,_0x48459a,_0x27bda6,_0x6297fc)=>{const _0x1c2807=_0x4640e0;for(var _0x2a37df=_0x6297fc>0x1?void 0x0:_0x6297fc?_0x169ba6(_0x48459a,_0x27bda6):_0x48459a,_0x55f433=_0x4fd7e0[_0x1c2807(0x157)]-0x1,_0x59f9c7;_0x55f433>=0x0;_0x55f433--)(_0x59f9c7=_0x4fd7e0[_0x55f433])&&(_0x2a37df=_0x59f9c7(_0x2a37df)||_0x2a37df);return _0x2a37df;},_0x38d4f1=(_0x23f6cf,_0x37232b)=>(_0x12ea3a,_0x265653)=>_0x37232b(_0x12ea3a,_0x265653,_0x23f6cf);let _0x15487d=class extends _0x1abb0c['Disposable']{constructor(_0x5e70c6,_0x3d4905,_0x57362a,_0x562689){const _0x45705b=_0x4640e0;super(),this[_0x45705b(0x106)]=_0x5e70c6,this[_0x45705b(0x147)]=_0x3d4905,this[_0x45705b(0x112)]=_0x57362a,this['_injector']=_0x562689,this[_0x45705b(0xee)](),this['_initUserSync']();}[_0x4640e0(0x14a)](){const _0x15affc=_0x4640e0;this[_0x15affc(0x11f)](this[_0x15affc(0x147)][_0x15affc(0x12c)][_0x15affc(0x12f)](_0x19affa[_0x15affc(0x175)](0x10))[_0x15affc(0x15f)](_0x4403bc=>{const _0x5b4de7=_0x15affc,_0x35c780=new Set();_0x4403bc[_0x5b4de7(0x170)](_0x1a93de=>{const _0x3a34d2=_0x5b4de7;switch(_0x1a93de[_0x3a34d2(0x100)]){case _0x3a34d2(0x12a):{const _0x233d37=_0x1a93de['payload']['personId'];_0x35c780[_0x3a34d2(0x12a)](_0x233d37);break;}}}),_0x386473(this[_0x5b4de7(0x144)],_0x35c780);}));}[_0x4640e0(0xee)](){const _0x1bdac9=_0x4640e0;this[_0x1bdac9(0x11f)](this[_0x1bdac9(0x106)][_0x1bdac9(0x12c)]['subscribe'](async _0x3dac1b=>{const _0x11b8c9=_0x1bdac9;var _0x28ceb1,_0x4dcb2c,_0x3cbb86,_0x5268bb;const _0x5d63d3=(_0x28ceb1=this[_0x11b8c9(0x147)][_0x11b8c9(0x108)](_0x3dac1b['unitId'])[_0x11b8c9(0x15e)](_0x3c16f8=>_0x3c16f8[_0x11b8c9(0x179)]===_0x3dac1b[_0x11b8c9(0x179)]))==null?void 0x0:_0x28ceb1[_0x11b8c9(0x120)];if(!_0x5d63d3)return;const {unitId:_0x327ce1,subUnitId:_0x187e41}=_0x5d63d3;switch(_0x3dac1b['user']&&this[_0x11b8c9(0x112)]['addUser'](_0x3dac1b[_0x11b8c9(0xfa)]),_0x3dac1b[_0x11b8c9(0x100)]){case _0x46c1be[_0x11b8c9(0x173)]:break;case _0x46c1be['Reply']:{this[_0x11b8c9(0x147)][_0x11b8c9(0x165)](_0x327ce1,_0x187e41,{'unitId':_0x327ce1,'subUnitId':_0x187e41,'ref':'','id':_0x3dac1b[_0x11b8c9(0x117)],'dT':_0x3bd3f6(+_0x3dac1b[_0x11b8c9(0x141)]),'threadId':_0x3dac1b['threadId'],'personId':(_0x3cbb86=(_0x4dcb2c=_0x3dac1b[_0x11b8c9(0xfa)])==null?void 0x0:_0x4dcb2c[_0x11b8c9(0x125)])!=null?_0x3cbb86:_0x3dac1b[_0x11b8c9(0xff)],'text':JSON[_0x11b8c9(0x115)](_0x3dac1b[_0x11b8c9(0x148)]),'parentId':_0x5d63d3['id']});break;}case _0x46c1be['Delete']:{const _0x2030a0=this[_0x11b8c9(0x147)][_0x11b8c9(0x149)](_0x327ce1,_0x187e41,_0x3dac1b[_0x11b8c9(0x117)]);_0x2030a0&&_0x2030a0[_0x11b8c9(0x121)]&&this['_threadCommentModel'][_0x11b8c9(0x14f)](_0x327ce1,_0x187e41,_0x3dac1b[_0x11b8c9(0x117)]);break;}case _0x46c1be[_0x11b8c9(0x129)]:{this[_0x11b8c9(0x147)][_0x11b8c9(0x172)](_0x327ce1,_0x187e41,{'commentId':_0x3dac1b['replyId'],'text':JSON['parse'](_0x3dac1b[_0x11b8c9(0x148)])});break;}case _0x46c1be[_0x11b8c9(0x11b)]:{const _0x4f0f5d=(_0x5268bb=this[_0x11b8c9(0x147)][_0x11b8c9(0x108)](_0x3dac1b[_0x11b8c9(0x16b)])[_0x11b8c9(0x15e)](_0x8e5e85=>_0x8e5e85[_0x11b8c9(0x179)]===_0x3dac1b[_0x11b8c9(0x179)]))==null?void 0x0:_0x5268bb[_0x11b8c9(0x120)];_0x4f0f5d&&this[_0x11b8c9(0x147)][_0x11b8c9(0x151)](_0x327ce1,_0x187e41,_0x4f0f5d['id'],_0x3dac1b['solved']===_0x4f964b[_0x11b8c9(0x10f)]);break;}}}));}};_0x15487d=_0x3726c6([_0x38d4f1(0x0,_0x1abb0c[_0x4640e0(0x171)](_0x5ee949[_0x4640e0(0x136)])),_0x38d4f1(0x1,_0x1abb0c[_0x4640e0(0x171)](_0x2333db[_0x4640e0(0x13a)])),_0x38d4f1(0x2,_0x1abb0c[_0x4640e0(0x171)](_0x1abb0c[_0x4640e0(0x140)])),_0x38d4f1(0x3,_0x1abb0c[_0x4640e0(0x171)](_0x1abb0c[_0x4640e0(0x15c)]))],_0x15487d);const _0x1239a3=_0x4640e0(0x16a),_0x4d25c5={};var _0x8dc64a=Object[_0x4640e0(0x14d)],_0x2fddeb=(_0x2475f5,_0x4006a4,_0x813567,_0x114c19)=>{for(var _0x20ed2a=_0x114c19>0x1?void 0x0:_0x114c19?_0x8dc64a(_0x4006a4,_0x813567):_0x4006a4,_0x39aa5d=_0x2475f5['length']-0x1,_0x5c79cd;_0x39aa5d>=0x0;_0x39aa5d--)(_0x5c79cd=_0x2475f5[_0x39aa5d])&&(_0x20ed2a=_0x5c79cd(_0x20ed2a)||_0x20ed2a);return _0x20ed2a;},_0x51112c=(_0x3214e0,_0x11034d)=>(_0x50363b,_0xce8d7d)=>_0x11034d(_0x50363b,_0xce8d7d,_0x3214e0);function _0x1ceabd(_0x22b122,_0x8fe12){const _0x5991f9=_0x4640e0,_0x1217e0=_0x22b122[_0x5991f9(0x111)][0x0];return{..._0x8fe12,'id':_0x1217e0[_0x5991f9(0x117)],'resolved':_0x22b122[_0x5991f9(0x161)]===0x1,'dT':_0x3bd3f6(_0x1217e0[_0x5991f9(0x141)]),'personId':_0x1217e0[_0x5991f9(0xff)],'threadId':_0x1217e0[_0x5991f9(0x179)]};}function _0x20c343(_0x496656,_0x457ea7,_0x2110ee){const _0xe4c489=_0x4640e0;var _0x484f1b,_0x17ea3b;if(((_0x17ea3b=(_0x484f1b=_0x496656==null?void 0x0:_0x496656[_0xe4c489(0x111)])==null?void 0x0:_0x484f1b[_0xe4c489(0x157)])!=null?_0x17ea3b:0x0)>0x0){const _0x225965=(_0x13bbc8,_0x4b1b06)=>({'id':_0x13bbc8[_0xe4c489(0x117)],'threadId':_0x13bbc8[_0xe4c489(0x179)],'dT':_0x3bd3f6(_0x13bbc8[_0xe4c489(0x141)]),'personId':_0x13bbc8[_0xe4c489(0xff)],'resolved':_0x496656[_0xe4c489(0x161)]===_0x4f964b[_0xe4c489(0x10f)],'unitId':_0x457ea7,'subUnitId':_0x2110ee,'text':JSON[_0xe4c489(0x115)](_0x13bbc8[_0xe4c489(0x148)]),'parentId':_0x4b1b06}),_0x5c1ed1=_0x225965(_0x496656[_0xe4c489(0x111)][0x0]);return{..._0x5c1ed1,'children':_0x496656[_0xe4c489(0x111)]['slice'](0x1)[_0xe4c489(0x156)](_0xbb3b3d=>_0x225965(_0xbb3b3d,_0x5c1ed1['id']))};}return null;}let _0x3d829a=class{constructor(_0x4d2307,_0x4fad93,_0x9ccafe){const _0x257f94=_0x4640e0;this[_0x257f94(0x14e)]=_0x4d2307,this[_0x257f94(0x112)]=_0x4fad93,this['_sessionService']=_0x9ccafe;}async[_0x4640e0(0x165)](_0x1eadaa){const _0x43d41a=_0x4640e0;var _0x10ead3,_0xb49a04;const {parentId:_0xc1ec2d,unitId:_0x76ab4d,text:_0x5c3c02,threadId:_0x2d206f}=_0x1eadaa,_0x536abe=(_0xb49a04=(_0x10ead3=_0x5c3c02[_0x43d41a(0x102)])==null?void 0x0:_0x10ead3[_0x43d41a(0xf4)](_0x1b3f10=>_0x1b3f10['rangeType']===_0x1abb0c[_0x43d41a(0x128)][_0x43d41a(0x134)])[_0x43d41a(0x156)](_0x5a1624=>_0x5a1624[_0x43d41a(0x105)]))!=null?_0xb49a04:[],_0x48ea40=JSON[_0x43d41a(0x11c)](_0x5c3c02),_0x43105b=(await this[_0x43d41a(0x13b)][_0x43d41a(0x177)](_0x76ab4d))[_0x43d41a(0x11e)]();if(_0xc1ec2d){const _0x47292b={'memberId':_0x43105b,'unitId':_0x76ab4d,'content':_0x48ea40,'mention':_0x536abe,'threadId':_0x2d206f},_0xa242e3=(await this['_httpService'][_0x43d41a(0x113)](_0x43d41a(0x168)+_0x76ab4d+_0x43d41a(0x142),{'body':_0x47292b}))[_0x43d41a(0x13e)][_0x43d41a(0xfe)];return{..._0x1eadaa,'id':_0xa242e3[_0x43d41a(0x117)],'dT':_0x1abb0c[_0x43d41a(0x10c)](+_0xa242e3['createTimestamp'])['format'](_0x43d41a(0x10d)),'personId':_0xa242e3[_0x43d41a(0xff)]};}else{const _0x1c0bc6={'memberId':_0x43105b,'unitId':_0x76ab4d,'content':_0x48ea40,'mention':_0x536abe},_0x5d295e=await this[_0x43d41a(0x14e)]['post'](_0x43d41a(0x168)+_0x76ab4d+'/add',{'body':_0x1c0bc6});return _0x1ceabd(_0x5d295e[_0x43d41a(0x13e)][_0x43d41a(0x155)],_0x1eadaa);}}async[_0x4640e0(0x172)](_0x569f83){const _0x1033f9=_0x4640e0;var _0x40beb4,_0x2792a3;const {text:_0x2a5940,unitId:_0x1f223c}=_0x569f83,_0x46bd1d=(_0x2792a3=(_0x40beb4=_0x2a5940[_0x1033f9(0x102)])==null?void 0x0:_0x40beb4[_0x1033f9(0xf4)](_0x3a5e29=>_0x3a5e29['rangeType']===_0x1abb0c['CustomRangeType'][_0x1033f9(0x134)])[_0x1033f9(0x156)](_0x37c91b=>_0x37c91b[_0x1033f9(0x105)]))!=null?_0x2792a3:[],_0x5cd58e=JSON['stringify'](_0x2a5940),_0x397f0d=_0x569f83[_0x1033f9(0x179)],_0x354c60=_0x569f83['id'],_0x34265c={'memberId':(await this['_sessionService'][_0x1033f9(0x177)](_0x1f223c))[_0x1033f9(0x11e)](),'unitId':_0x1f223c,'threadId':_0x397f0d,'mention':_0x46bd1d,'content':_0x5cd58e,'replyId':_0x354c60},_0x561978=await this[_0x1033f9(0x14e)][_0x1033f9(0x113)](_0x1033f9(0x168)+_0x1f223c+_0x1033f9(0xfc),{'body':_0x34265c});return!_0x561978[_0x1033f9(0x13e)]['error']||_0x561978[_0x1033f9(0x13e)][_0x1033f9(0x150)]['code']===0x1;}async[_0x4640e0(0x151)](_0x8f3c9c){const _0x3eef28=_0x4640e0,{unitId:_0x5952f2}=_0x8f3c9c,_0x50e50c=_0x8f3c9c[_0x3eef28(0x179)],_0x4dd4cd={'memberId':this[_0x3eef28(0x112)][_0x3eef28(0x107)]()[_0x3eef28(0x125)],'unitId':_0x5952f2,'threadId':_0x50e50c,'solved':_0x8f3c9c[_0x3eef28(0xf0)]?_0x4f964b[_0x3eef28(0x10f)]:_0x4f964b[_0x3eef28(0x145)]},_0x28d2c3=await this[_0x3eef28(0x14e)]['post'](_0x3eef28(0x168)+_0x5952f2+_0x3eef28(0x139),{'body':_0x4dd4cd});return!_0x28d2c3[_0x3eef28(0x13e)][_0x3eef28(0x150)]||_0x28d2c3[_0x3eef28(0x13e)][_0x3eef28(0x150)][_0x3eef28(0xfd)]===0x1;}async[_0x4640e0(0x14f)](_0x279cb2,_0x1a3da3,_0x2babee,_0x2c5ed7){const _0x3abd22=_0x4640e0,_0x3b6d3c={'memberId':(await this[_0x3abd22(0x13b)]['requireSession'](_0x279cb2))[_0x3abd22(0x11e)](),'threadId':_0x2babee,'replyId':_0x2c5ed7,'unitId':_0x279cb2},_0x46789c=await this[_0x3abd22(0x14e)][_0x3abd22(0x113)](_0x3abd22(0x168)+_0x279cb2+'/delete',{'body':_0x3b6d3c});return!_0x46789c['body'][_0x3abd22(0x150)]||_0x46789c[_0x3abd22(0x13e)]['error'][_0x3abd22(0xfd)]===0x1;}async[_0x4640e0(0x137)](_0x15969e,_0xafc77b,_0x3ae58b){const _0x6f0b4a=_0x4640e0,_0x3d6269={'unitId':_0x15969e,'threadId':_0x3ae58b},_0x25a845=await this[_0x6f0b4a(0x14e)]['post']('/universer-api/comment/unit/'+_0x15969e+_0x6f0b4a(0x104),{'body':_0x3d6269}),_0x352f3a=_0x3ae58b['map'](_0x3a5745=>_0x20c343(_0x25a845[_0x6f0b4a(0x13e)][_0x6f0b4a(0x167)][_0x3a5745],_0x15969e,_0xafc77b))['filter'](Boolean);return Object[_0x6f0b4a(0x110)](_0x25a845[_0x6f0b4a(0x13e)]['users'])[_0x6f0b4a(0x170)](_0x5387d7=>{const _0x531b10=_0x6f0b4a;this[_0x531b10(0x112)][_0x531b10(0xef)](_0x5387d7);}),_0x352f3a;}[_0x4640e0(0x15b)](_0x22299b){const _0x64ab2c=_0x4640e0;return{'id':_0x22299b['id'],'threadId':_0x22299b['threadId'],'ref':_0x22299b[_0x64ab2c(0x146)]};}};_0x3d829a=_0x2fddeb([_0x51112c(0x0,_0x1abb0c[_0x4640e0(0x171)](_0x2d1d10[_0x4640e0(0x14b)])),_0x51112c(0x1,_0x1abb0c[_0x4640e0(0x171)](_0x1abb0c[_0x4640e0(0x140)])),_0x51112c(0x2,_0x1abb0c[_0x4640e0(0x171)](_0x5ee949[_0x4640e0(0xf3)]))],_0x3d829a);var _0x5d4d29=Object[_0x4640e0(0x14d)],_0xadb1b8=(_0x3c96a1,_0x3dcfed,_0xc42e68,_0x312d72)=>{const _0x3a084a=_0x4640e0;for(var _0x29251a=_0x312d72>0x1?void 0x0:_0x312d72?_0x5d4d29(_0x3dcfed,_0xc42e68):_0x3dcfed,_0x4e5ff3=_0x3c96a1[_0x3a084a(0x157)]-0x1,_0x154c37;_0x4e5ff3>=0x0;_0x4e5ff3--)(_0x154c37=_0x3c96a1[_0x4e5ff3])&&(_0x29251a=_0x154c37(_0x29251a)||_0x29251a);return _0x29251a;},_0x143330=(_0x2be7bc,_0x5e1f9e)=>(_0x1dcdb1,_0x3985b1)=>_0x5e1f9e(_0x1dcdb1,_0x3985b1,_0x2be7bc);let _0x1eb9e7=class extends _0x1abb0c[_0x4640e0(0xf8)]{constructor(_0x4f4c9e,_0x2f14fa){const _0x2e46c9=_0x4640e0;super(),this['_threadCommentDataSourceService']=_0x4f4c9e,this['_threadCommentDataSource']=_0x2f14fa,this[_0x2e46c9(0x163)]();}[_0x4640e0(0x163)](){const _0x2f1854=_0x4640e0;this[_0x2f1854(0x158)][_0x2f1854(0x154)]=this[_0x2f1854(0x12e)],this[_0x2f1854(0x158)]['syncUpdateMutationToColla']=!0x1;}};_0x1eb9e7=_0xadb1b8([_0x143330(0x0,_0x2333db['IThreadCommentDataSourceService']),_0x143330(0x1,_0x1abb0c[_0x4640e0(0x171)](_0x3d829a))],_0x1eb9e7);var _0x226f9e=Object[_0x4640e0(0xf1)],_0x33295a=Object['getOwnPropertyDescriptor'],_0xe79c23=(_0x445898,_0x451bfb,_0x34da65)=>_0x451bfb in _0x445898?_0x226f9e(_0x445898,_0x451bfb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x34da65}):_0x445898[_0x451bfb]=_0x34da65,_0x1c44a7=(_0xef34a7,_0x5b1cca,_0x5c29cb,_0x378b8b)=>{for(var _0x37debc=_0x378b8b>0x1?void 0x0:_0x378b8b?_0x33295a(_0x5b1cca,_0x5c29cb):_0x5b1cca,_0x276e7e=_0xef34a7['length']-0x1,_0x3a2b0a;_0x276e7e>=0x0;_0x276e7e--)(_0x3a2b0a=_0xef34a7[_0x276e7e])&&(_0x37debc=_0x3a2b0a(_0x37debc)||_0x37debc);return _0x37debc;},_0x4a93b9=(_0x482487,_0x421919)=>(_0x555208,_0x5ca049)=>_0x421919(_0x555208,_0x5ca049,_0x482487),_0x440ed7=(_0x2c600f,_0x42da6d,_0x72a460)=>_0xe79c23(_0x2c600f,typeof _0x42da6d!=_0x4640e0(0xf9)?_0x42da6d+'':_0x42da6d,_0x72a460);_0x6df14e[_0x4640e0(0x10e)]=class extends _0x1abb0c[_0x4640e0(0xf2)]{constructor(_0x4666d2=_0x4d25c5,_0xff3b8c,_0x423d7e){const _0x25fc55=_0x4640e0;super(),this[_0x25fc55(0x15a)]=_0x4666d2,this[_0x25fc55(0x144)]=_0xff3b8c,this[_0x25fc55(0x127)]=_0x423d7e;const {..._0x3eecc6}=_0x1abb0c[_0x25fc55(0x114)]({},_0x4d25c5,this[_0x25fc55(0x15a)]);this['_configService']['setConfig'](_0x1239a3,_0x3eecc6);}[_0x4640e0(0x166)](){const _0x39bf92=_0x4640e0;[[_0x3d829a],[_0x1eb9e7],[_0x15487d]][_0x39bf92(0x170)](_0x43af92=>{const _0x4b1fda=_0x39bf92;this[_0x4b1fda(0x144)][_0x4b1fda(0x12a)](_0x43af92);});}[_0x4640e0(0x138)](){const _0x1c91a0=_0x4640e0;this[_0x1c91a0(0x144)][_0x1c91a0(0x15d)](_0x1eb9e7),this[_0x1c91a0(0x144)][_0x1c91a0(0x15d)](_0x15487d);}},_0x440ed7(_0x6df14e[_0x4640e0(0x10e)],_0x4640e0(0x124),_0x302e71),_0x440ed7(_0x6df14e[_0x4640e0(0x10e)],_0x4640e0(0x100),_0x1abb0c[_0x4640e0(0x133)]['UNIVER_UNKNOWN']),_0x6df14e['UniverThreadCommentDataSourcePlugin']=_0x1c44a7([_0x1abb0c[_0x4640e0(0x131)](_0x1b3bd0[_0x4640e0(0x16f)],_0x5ee949['UniverCollaborationClientPlugin'],_0x4b12ee['UniverLicensePlugin']),_0x4a93b9(0x1,_0x1abb0c[_0x4640e0(0x171)](_0x1abb0c[_0x4640e0(0x15c)])),_0x4a93b9(0x2,_0x1abb0c[_0x4640e0(0x174)])],_0x6df14e[_0x4640e0(0x10e)]),Object['defineProperty'](_0x6df14e,Symbol[_0x4640e0(0x159)],{'value':_0x4640e0(0xf6)});}));function _0x25a9(){const _0x289ed6=['/reply','18cXkQeH','_injector','OpenOrReOpen','ref','_threadCommentModel','content','getComment','_initUserSync','HTTPService','rxjs','getOwnPropertyDescriptor','_httpService','deleteComment','error','resolveComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','dataSource','comment','map','length','_threadCommentDataSourceService','toStringTag','_config','saveCommentToSnapshot','Injector','get','find','subscribe','@univerjs-pro/collaboration-client','solved','users','_initDataSource','Delete','addComment','onStarting','comments','/universer-api/comment/unit/','delete','thread-comment-data-source.config','unitId','@univerjs/core','/universer-api/user/list','401740fFlrTh','UniverThreadCommentUIPlugin','forEach','Inject','updateComment','Add','IConfigService','bufferTime','30EZFMgt','requireSession','Unknown','threadId','_init','addUser','resolved','defineProperty','Plugin','CollaborationSessionService','filter','@univerjs/thread-comment-ui','Module','2326794KBKjfr','Disposable','symbol','user','@univerjs-pro/license','/edit','code','reply','userId','type','getUser','customRanges','UniverThreadComment','/list','rangeId','_commentService','getCurrentUser','getUnit','@univerjs/network','UniverNetwork','UNRECOGNIZED','dayjs','YYYY/MM/DD\x20HH:mm','UniverThreadCommentDataSourcePlugin','Solved','values','replies','_userService','post','merge','parse','13180UYddaC','replyId','14826966Eutema','object','UniverCore','Solve','stringify','Reply','getMemberID','disposeWithMe','root','parentId','UniverProLicense','@univerjs/thread-comment','pluginName','userID','132476yCkGCH','_configService','CustomRangeType','Edit','add','1205416OUKQLQ','commentUpdate$','size','_threadCommentDataSource','pipe','function','DependentOn','UniverProThreadCommentDatasource','UniverInstanceType','COMMENT','27HfAMyA','CommentService','listComments','onReady','/solved','ThreadCommentModel','_sessionService','3890500SFJDwH','UniverProCollaborationClient','body','7dmmyWN','UserManagerService','createTimestamp'];_0x25a9=function(){return _0x289ed6;};return _0x25a9();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.6-nightly.
|
|
3
|
+
"version": "0.10.6-nightly.202509060832",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.10.6-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.10.6-nightly.
|
|
50
|
-
"@univerjs/core": "0.10.6-nightly.
|
|
51
|
-
"@univerjs/network": "0.10.6-nightly.202509060724",
|
|
52
|
-
"@univerjs/thread-comment": "0.10.6-nightly.202509060724",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.6-nightly.202509060832",
|
|
49
|
+
"@univerjs-pro/license": "0.10.6-nightly.202509060832",
|
|
50
|
+
"@univerjs/core": "0.10.6-nightly.202509060832",
|
|
53
51
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
54
|
-
"@univerjs/
|
|
52
|
+
"@univerjs/network": "0.10.6-nightly.202509060832",
|
|
53
|
+
"@univerjs/thread-comment": "0.10.6-nightly.202509060832",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.10.6-nightly.202509060832"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|