@univerjs-pro/thread-comment-datasource 0.6.10-nightly.202504201606 → 0.6.10-nightly.202504221607
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 +9 -9
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x3d5f70=_0x4a82;(function(_0x54678f,_0x45f830){const _0x2d6da5=_0x4a82,_0x1930c8=_0x54678f();while(!![]){try{const _0x21e12b=parseInt(_0x2d6da5(0x22a))/0x1+parseInt(_0x2d6da5(0x227))/0x2+-parseInt(_0x2d6da5(0x21b))/0x3*(-parseInt(_0x2d6da5(0x222))/0x4)+parseInt(_0x2d6da5(0x1c3))/0x5+-parseInt(_0x2d6da5(0x1c6))/0x6*(-parseInt(_0x2d6da5(0x1f3))/0x7)+parseInt(_0x2d6da5(0x20b))/0x8*(-parseInt(_0x2d6da5(0x218))/0x9)+parseInt(_0x2d6da5(0x1cf))/0xa*(-parseInt(_0x2d6da5(0x1e4))/0xb);if(_0x21e12b===_0x45f830)break;else _0x1930c8['push'](_0x1930c8['shift']());}catch(_0x220781){_0x1930c8['push'](_0x1930c8['shift']());}}}(_0x11a2,0xf184d));Object[_0x3d5f70(0x20a)](exports,Symbol[_0x3d5f70(0x1bf)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require(_0x3d5f70(0x1d6)),j=require(_0x3d5f70(0x1bd)),M=require(_0x3d5f70(0x220)),w=require(_0x3d5f70(0x1cd)),P=require(_0x3d5f70(0x1d1)),U=_0x3d5f70(0x234);var I=(_0x4174a7=>(_0x4174a7[_0x4174a7[_0x3d5f70(0x237)]=0x0]='OpenOrReOpen',_0x4174a7[_0x4174a7['Solved']=0x1]=_0x3d5f70(0x202),_0x4174a7[_0x4174a7[_0x3d5f70(0x221)]=-0x1]='UNRECOGNIZED',_0x4174a7))(I||{}),v=(_0x3bce75=>(_0x3bce75[_0x3bce75[_0x3d5f70(0x1be)]=0x0]=_0x3d5f70(0x1be),_0x3bce75[_0x3bce75['Add']=0x1]='Add',_0x3bce75[_0x3bce75[_0x3d5f70(0x20f)]=0x2]=_0x3d5f70(0x20f),_0x3bce75[_0x3bce75[_0x3d5f70(0x21d)]=0x3]=_0x3d5f70(0x21d),_0x3bce75[_0x3bce75[_0x3d5f70(0x1c4)]=0x4]=_0x3d5f70(0x1c4),_0x3bce75[_0x3bce75[_0x3d5f70(0x1d5)]=0x5]='Solve',_0x3bce75[_0x3bce75[_0x3d5f70(0x221)]=-0x1]=_0x3d5f70(0x221),_0x3bce75))(v||{});const f=_0x2ce2fc=>c[_0x3d5f70(0x1e9)](new Date(+_0x2ce2fc))[_0x3d5f70(0x1fc)](_0x3d5f70(0x217)),R=async(_0x2141c1,_0xab3258)=>{const _0x2a337e=_0x3d5f70,_0x32ca16=_0x2141c1[_0x2a337e(0x231)](c[_0x2a337e(0x230)]),_0x52165e=_0x2141c1[_0x2a337e(0x231)](P[_0x2a337e(0x20c)]);_0xab3258['forEach'](_0x5399c9=>{_0x32ca16['getUser'](_0x5399c9)&&_0xab3258['delete'](_0x5399c9);}),_0xab3258[_0x2a337e(0x22b)]&&(await _0x52165e[_0x2a337e(0x231)]('/universer-api/user/list',{'params':{'userIDs':[..._0xab3258]}}))['body']['users'][_0x2a337e(0x1e7)](_0xf85b43=>{const _0x556500=_0x2a337e;_0xf85b43&&_0x32ca16[_0x556500(0x1e5)](_0xf85b43);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x236c63,_0x474fd5,_0x57e1b4,_0x45b0ba)=>{const _0x5acecd=_0x3d5f70;for(var _0x3c4faf=_0x45b0ba>0x1?void 0x0:_0x45b0ba?$(_0x474fd5,_0x57e1b4):_0x474fd5,_0x406f7a=_0x236c63[_0x5acecd(0x1f6)]-0x1,_0x35e22e;_0x406f7a>=0x0;_0x406f7a--)(_0x35e22e=_0x236c63[_0x406f7a])&&(_0x3c4faf=_0x35e22e(_0x3c4faf)||_0x3c4faf);return _0x3c4faf;},S=(_0x3d7060,_0xcc7e77)=>(_0x3bfd77,_0x2a091b)=>_0xcc7e77(_0x3bfd77,_0x2a091b,_0x3d7060);function _0x4a82(_0x4e14c0,_0x423213){const _0x11a242=_0x11a2();return _0x4a82=function(_0x4a8207,_0x18d8b6){_0x4a8207=_0x4a8207-0x1bb;let _0x54413d=_0x11a242[_0x4a8207];return _0x54413d;},_0x4a82(_0x4e14c0,_0x423213);}let p=class extends c['Disposable']{constructor(_0xbc2e18,_0x3b3dd1,_0x6881a6,_0x304060){const _0x3c6a88=_0x3d5f70;super(),this[_0x3c6a88(0x204)]=_0xbc2e18,this[_0x3c6a88(0x212)]=_0x3b3dd1,this[_0x3c6a88(0x1c0)]=_0x6881a6,this[_0x3c6a88(0x203)]=_0x304060,this[_0x3c6a88(0x1c1)](),this['_initUserSync']();}['_initUserSync'](){const _0x331566=_0x3d5f70;this['disposeWithMe'](this[_0x331566(0x212)][_0x331566(0x1de)][_0x331566(0x22d)](w[_0x331566(0x1d0)](0x10))[_0x331566(0x232)](_0x5479c1=>{const _0x4b5cf2=_0x331566,_0xa83d6=new Set();_0x5479c1[_0x4b5cf2(0x1e7)](_0x3ed27b=>{const _0x28d628=_0x4b5cf2;switch(_0x3ed27b['type']){case _0x28d628(0x21f):{const _0x15dcaf=_0x3ed27b[_0x28d628(0x1e8)][_0x28d628(0x1c2)];_0xa83d6[_0x28d628(0x21f)](_0x15dcaf);break;}}}),R(this[_0x4b5cf2(0x203)],_0xa83d6);}));}[_0x3d5f70(0x1c1)](){const _0x55c10e=_0x3d5f70;this[_0x55c10e(0x1d4)](this[_0x55c10e(0x204)][_0x55c10e(0x1de)]['subscribe'](async _0x58c717=>{const _0x16a0a6=_0x55c10e;var _0xcf2aec,_0x19b451,_0x375016,_0x4a41f8;const _0x14c7d2=(_0xcf2aec=this['_threadCommentModel'][_0x16a0a6(0x1f9)](_0x58c717['unitId'])[_0x16a0a6(0x21e)](_0x3a3abb=>_0x3a3abb['threadId']===_0x58c717[_0x16a0a6(0x1e2)]))==null?void 0x0:_0xcf2aec['root'];if(!_0x14c7d2)return;const {unitId:_0x3be9c1,subUnitId:_0x5759b9}=_0x14c7d2;switch(_0x58c717['user']&&this[_0x16a0a6(0x1c0)][_0x16a0a6(0x1e5)](_0x58c717[_0x16a0a6(0x1dd)]),_0x58c717['type']){case v['Add']:break;case v[_0x16a0a6(0x20f)]:{this[_0x16a0a6(0x212)][_0x16a0a6(0x1f7)](_0x3be9c1,_0x5759b9,{'unitId':_0x3be9c1,'subUnitId':_0x5759b9,'ref':'','id':_0x58c717[_0x16a0a6(0x1ff)],'dT':f(+_0x58c717[_0x16a0a6(0x1d7)]),'threadId':_0x58c717['threadId'],'personId':(_0x375016=(_0x19b451=_0x58c717['user'])==null?void 0x0:_0x19b451[_0x16a0a6(0x1fd)])!=null?_0x375016:_0x58c717[_0x16a0a6(0x210)],'text':JSON[_0x16a0a6(0x1f5)](_0x58c717[_0x16a0a6(0x229)]),'parentId':_0x14c7d2['id']});break;}case v['Delete']:{const _0x59fee6=this['_threadCommentModel'][_0x16a0a6(0x1da)](_0x3be9c1,_0x5759b9,_0x58c717[_0x16a0a6(0x1ff)]);_0x59fee6&&_0x59fee6[_0x16a0a6(0x1dc)]&&this[_0x16a0a6(0x212)]['deleteComment'](_0x3be9c1,_0x5759b9,_0x58c717['replyId']);break;}case v[_0x16a0a6(0x21d)]:{this[_0x16a0a6(0x212)][_0x16a0a6(0x1ec)](_0x3be9c1,_0x5759b9,{'commentId':_0x58c717[_0x16a0a6(0x1ff)],'text':JSON[_0x16a0a6(0x1f5)](_0x58c717['content'])});break;}case v[_0x16a0a6(0x1d5)]:{const _0x36bcd3=(_0x4a41f8=this[_0x16a0a6(0x212)][_0x16a0a6(0x1f9)](_0x58c717[_0x16a0a6(0x239)])[_0x16a0a6(0x21e)](_0x1968ac=>_0x1968ac['threadId']===_0x58c717[_0x16a0a6(0x1e2)]))==null?void 0x0:_0x4a41f8['root'];_0x36bcd3&&this[_0x16a0a6(0x212)]['resolveComment'](_0x3be9c1,_0x5759b9,_0x36bcd3['id'],_0x58c717['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x3d5f70(0x1f1)](b[_0x3d5f70(0x1e6)])),S(0x1,c['Inject'](M[_0x3d5f70(0x1ce)])),S(0x2,c[_0x3d5f70(0x1f1)](c[_0x3d5f70(0x230)])),S(0x3,c['Inject'](c[_0x3d5f70(0x1cc)]))],p);const q=_0x3d5f70(0x1f0),D={};var A=Object[_0x3d5f70(0x1f8)],x=(_0x26ed8b,_0x18b605,_0x512612,_0x403fdf)=>{const _0x58c737=_0x3d5f70;for(var _0x450efb=_0x403fdf>0x1?void 0x0:_0x403fdf?A(_0x18b605,_0x512612):_0x18b605,_0x10c784=_0x26ed8b[_0x58c737(0x1f6)]-0x1,_0x402ae7;_0x10c784>=0x0;_0x10c784--)(_0x402ae7=_0x26ed8b[_0x10c784])&&(_0x450efb=_0x402ae7(_0x450efb)||_0x450efb);return _0x450efb;},_=(_0x3b52fd,_0x3e4f45)=>(_0x4b6f47,_0x7e17d1)=>_0x3e4f45(_0x4b6f47,_0x7e17d1,_0x3b52fd);function Y(_0x3a1247,_0x2e3693){const _0x1b5b9f=_0x3d5f70,_0x3e967e=_0x3a1247['replies'][0x0];return{..._0x2e3693,'id':_0x3e967e[_0x1b5b9f(0x1ff)],'resolved':_0x3a1247[_0x1b5b9f(0x1c9)]===0x1,'dT':f(_0x3e967e['createTimestamp']),'personId':_0x3e967e[_0x1b5b9f(0x210)],'threadId':_0x3e967e['threadId']};}function G(_0xbbb201,_0x50f0d6,_0x15313c){const _0xda75f5=_0x3d5f70;var _0x52e077,_0x6085b7;if(((_0x6085b7=(_0x52e077=_0xbbb201==null?void 0x0:_0xbbb201['replies'])==null?void 0x0:_0x52e077[_0xda75f5(0x1f6)])!=null?_0x6085b7:0x0)>0x0){const _0x49e6d0=(_0x11216a,_0x3488be)=>({'id':_0x11216a[_0xda75f5(0x1ff)],'threadId':_0x11216a['threadId'],'dT':f(_0x11216a['createTimestamp']),'personId':_0x11216a[_0xda75f5(0x210)],'resolved':_0xbbb201[_0xda75f5(0x1c9)]===I['Solved'],'unitId':_0x50f0d6,'subUnitId':_0x15313c,'text':JSON[_0xda75f5(0x1f5)](_0x11216a[_0xda75f5(0x229)]),'parentId':_0x3488be}),_0x4374d6=_0x49e6d0(_0xbbb201[_0xda75f5(0x209)][0x0]);return{..._0x4374d6,'children':_0xbbb201['replies'][_0xda75f5(0x1fb)](0x1)[_0xda75f5(0x1c7)](_0x1024e0=>_0x49e6d0(_0x1024e0,_0x4374d6['id']))};}return null;}let g=class{constructor(_0x20aff3,_0x1b9081,_0x1a98d6,_0x1de726){const _0x57237e=_0x3d5f70;this[_0x57237e(0x200)]=_0x20aff3,this[_0x57237e(0x1c0)]=_0x1b9081,this[_0x57237e(0x22f)]=_0x1a98d6,this[_0x57237e(0x203)]=_0x1de726;}async[_0x3d5f70(0x1f7)](_0x1126bd){const _0x217431=_0x3d5f70;var _0x490ed4,_0x48f3ce;const {parentId:_0x2189ec,unitId:_0x191fcc,text:_0x4f20da,threadId:_0x517cf7}=_0x1126bd,_0x2b9b04=(_0x48f3ce=(_0x490ed4=_0x4f20da['customRanges'])==null?void 0x0:_0x490ed4[_0x217431(0x226)](_0x303841=>_0x303841[_0x217431(0x225)]===c[_0x217431(0x228)]['COMMENT'])[_0x217431(0x1c7)](_0x3449fd=>_0x3449fd[_0x217431(0x20e)]))!=null?_0x48f3ce:[],_0x6b8e55=JSON[_0x217431(0x1d9)](_0x4f20da),_0x45279a=(await this[_0x217431(0x22f)][_0x217431(0x223)](_0x191fcc))['getMemberID']();if(_0x2189ec){const _0x5c889f={'memberId':_0x45279a,'unitId':_0x191fcc,'content':_0x6b8e55,'mention':_0x2b9b04,'threadId':_0x517cf7},_0x32c09b=(await this[_0x217431(0x200)][_0x217431(0x1cb)]('/universer-api/comment/unit/'+_0x191fcc+_0x217431(0x1ee),{'body':_0x5c889f}))[_0x217431(0x233)]['reply'];return{..._0x1126bd,'id':_0x32c09b[_0x217431(0x1ff)],'dT':c[_0x217431(0x1e9)](+_0x32c09b[_0x217431(0x1d7)])['format'](_0x217431(0x217)),'personId':_0x32c09b[_0x217431(0x210)]};}else{const _0x401042={'memberId':_0x45279a,'unitId':_0x191fcc,'content':_0x6b8e55,'mention':_0x2b9b04},_0x1a3e3e=await this['_httpService'][_0x217431(0x1cb)](_0x217431(0x236)+_0x191fcc+_0x217431(0x1c5),{'body':_0x401042});return Y(_0x1a3e3e[_0x217431(0x233)][_0x217431(0x216)],_0x1126bd);}}async[_0x3d5f70(0x1ec)](_0xe5e7fd){const _0x1b85fc=_0x3d5f70;var _0x4c2a93,_0x33b8f0;const {text:_0x1fcc5c,unitId:_0x546ece}=_0xe5e7fd,_0x85ebd5=(_0x33b8f0=(_0x4c2a93=_0x1fcc5c[_0x1b85fc(0x20d)])==null?void 0x0:_0x4c2a93['filter'](_0x399217=>_0x399217[_0x1b85fc(0x225)]===c[_0x1b85fc(0x228)][_0x1b85fc(0x1df)])[_0x1b85fc(0x1c7)](_0x3f06fa=>_0x3f06fa['rangeId']))!=null?_0x33b8f0:[],_0x474753=JSON['stringify'](_0x1fcc5c),_0x40b800=_0xe5e7fd[_0x1b85fc(0x1e2)],_0x3cce9f=_0xe5e7fd['id'],_0x5f400a={'memberId':(await this[_0x1b85fc(0x22f)][_0x1b85fc(0x223)](_0x546ece))[_0x1b85fc(0x1fe)](),'unitId':_0x546ece,'threadId':_0x40b800,'mention':_0x85ebd5,'content':_0x474753,'replyId':_0x3cce9f},_0x2da8da=await this['_httpService'][_0x1b85fc(0x1cb)]('/universer-api/comment/unit/'+_0x546ece+_0x1b85fc(0x214),{'body':_0x5f400a});return!_0x2da8da[_0x1b85fc(0x233)][_0x1b85fc(0x1eb)]||_0x2da8da[_0x1b85fc(0x233)]['error'][_0x1b85fc(0x22e)]===0x1;}async[_0x3d5f70(0x1ea)](_0x1628de){const _0x565cf6=_0x3d5f70,{unitId:_0x1909e5}=_0x1628de,_0x219526=_0x1628de['threadId'],_0x2e0901={'memberId':this[_0x565cf6(0x1c0)]['getCurrentUser']()[_0x565cf6(0x1fd)],'unitId':_0x1909e5,'threadId':_0x219526,'solved':_0x1628de[_0x565cf6(0x1ed)]?I['Solved']:I['OpenOrReOpen']},_0x242312=await this[_0x565cf6(0x200)]['post'](_0x565cf6(0x236)+_0x1909e5+_0x565cf6(0x1f4),{'body':_0x2e0901});return!_0x242312[_0x565cf6(0x233)][_0x565cf6(0x1eb)]||_0x242312['body']['error']['code']===0x1;}async[_0x3d5f70(0x1bc)](_0x1272b6,_0x4e187d,_0x222462,_0x1ee9ac){const _0x121f91=_0x3d5f70,_0x50b178={'memberId':(await this[_0x121f91(0x22f)][_0x121f91(0x223)](_0x1272b6))[_0x121f91(0x1fe)](),'threadId':_0x222462,'replyId':_0x1ee9ac,'unitId':_0x1272b6},_0x4c6520=await this[_0x121f91(0x200)][_0x121f91(0x1cb)](_0x121f91(0x236)+_0x1272b6+_0x121f91(0x208),{'body':_0x50b178});return!_0x4c6520[_0x121f91(0x233)]['error']||_0x4c6520[_0x121f91(0x233)]['error'][_0x121f91(0x22e)]===0x1;}async[_0x3d5f70(0x201)](_0x4ce14c,_0x4c8a2f,_0x2ccf16){const _0x260c5b=_0x3d5f70,_0x4c2db1={'unitId':_0x4ce14c,'threadId':_0x2ccf16},_0x333215=await this[_0x260c5b(0x200)][_0x260c5b(0x1cb)](_0x260c5b(0x236)+_0x4ce14c+_0x260c5b(0x215),{'body':_0x4c2db1}),_0x252608=_0x2ccf16[_0x260c5b(0x1c7)](_0x126533=>G(_0x333215[_0x260c5b(0x233)]['comments'][_0x126533],_0x4ce14c,_0x4c8a2f))['filter'](Boolean);return Object[_0x260c5b(0x1c8)](_0x333215['body']['users'])['forEach'](_0x440775=>{const _0x50369a=_0x260c5b;this[_0x50369a(0x1c0)][_0x50369a(0x1e5)](_0x440775);}),_0x252608;}[_0x3d5f70(0x21c)](_0x29e25d){const _0x566944=_0x3d5f70;return{'id':_0x29e25d['id'],'threadId':_0x29e25d[_0x566944(0x1e2)],'ref':_0x29e25d[_0x566944(0x206)]};}};g=x([_(0x0,c[_0x3d5f70(0x1f1)](P['HTTPService'])),_(0x1,c[_0x3d5f70(0x1f1)](c[_0x3d5f70(0x230)])),_(0x2,c['Inject'](b[_0x3d5f70(0x213)])),_(0x3,c['Inject'](c[_0x3d5f70(0x1cc)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0xc98bf4,_0x3f19a3,_0x66f2f6,_0x3e5b63)=>{const _0x4715a0=_0x3d5f70;for(var _0x15bed9=_0x3e5b63>0x1?void 0x0:_0x3e5b63?H(_0x3f19a3,_0x66f2f6):_0x3f19a3,_0x3a96ff=_0xc98bf4[_0x4715a0(0x1f6)]-0x1,_0x1592bd;_0x3a96ff>=0x0;_0x3a96ff--)(_0x1592bd=_0xc98bf4[_0x3a96ff])&&(_0x15bed9=_0x1592bd(_0x15bed9)||_0x15bed9);return _0x15bed9;},y=(_0x381199,_0x105e4d)=>(_0x25958a,_0x1e85bf)=>_0x105e4d(_0x25958a,_0x1e85bf,_0x381199);function _0x11a2(){const _0x292fa9=['setConfig','deleteComment','@univerjs/thread-comment-ui','Unknown','toStringTag','_userService','_init','personId','1799490Ikimhe','Delete','/add','64560dsnMgu','map','values','solved','_initDataSource','post','Injector','rxjs','ThreadCommentModel','80zIbzob','bufferTime','@univerjs/network','merge','_threadCommentDataSourceService','disposeWithMe','Solve','@univerjs/core','createTimestamp','_config','stringify','getComment','UniverLicensePlugin','parentId','user','commentUpdate$','COMMENT','pluginName','onReady','threadId','UNIVER_UNKNOWN','3994265ApXOSi','addUser','CommentService','forEach','payload','dayjs','resolveComment','error','updateComment','resolved','/reply','UniverCollaborationClientPlugin','thread-comment-data-source.config','Inject','UniverInstanceType','553sXmcSI','/solved','parse','length','addComment','getOwnPropertyDescriptor','getUnit','syncUpdateMutationToColla','slice','format','userID','getMemberID','replyId','_httpService','listComments','Solved','_injector','_commentService','IThreadCommentDataSourceService','ref','dataSource','/delete','replies','defineProperty','976tUKgzw','HTTPService','customRanges','rangeId','Reply','userId','onStarting','_threadCommentModel','CollaborationSessionService','/edit','/list','comment','YYYY/MM/DD\x20HH:mm','10971MpmibO','symbol','_threadCommentDataSource','4403979XWynvQ','saveCommentToSnapshot','Edit','find','add','@univerjs/thread-comment','UNRECOGNIZED','4crPJyC','requireSession','_configService','rangeType','filter','2213426qZkIPN','CustomRangeType','content','258255uyTZgp','size','type','pipe','code','_sessionService','UserManagerService','get','subscribe','body','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentDataSourcePlugin','/universer-api/comment/unit/','OpenOrReOpen','IConfigService','unitId'];_0x11a2=function(){return _0x292fa9;};return _0x11a2();}let C=class extends c['Disposable']{constructor(_0x24d7ac,_0x385a88){const _0x3bb8ea=_0x3d5f70;super(),this[_0x3bb8ea(0x1d3)]=_0x24d7ac,this[_0x3bb8ea(0x21a)]=_0x385a88,this[_0x3bb8ea(0x1ca)]();}[_0x3d5f70(0x1ca)](){const _0x39ebfd=_0x3d5f70;this['_threadCommentDataSourceService'][_0x39ebfd(0x207)]=this['_threadCommentDataSource'],this[_0x39ebfd(0x1d3)][_0x39ebfd(0x1fa)]=!0x1;}};C=J([y(0x0,M[_0x3d5f70(0x205)]),y(0x1,c[_0x3d5f70(0x1f1)](g))],C);var F=Object['defineProperty'],L=Object[_0x3d5f70(0x1f8)],Z=(_0x460e96,_0xcb660f,_0x2cdac5)=>_0xcb660f in _0x460e96?F(_0x460e96,_0xcb660f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2cdac5}):_0x460e96[_0xcb660f]=_0x2cdac5,W=(_0x3355d3,_0x578fd1,_0x1b5044,_0x3ebe3e)=>{for(var _0x432675=_0x3ebe3e>0x1?void 0x0:_0x3ebe3e?L(_0x578fd1,_0x1b5044):_0x578fd1,_0x41aa6f=_0x3355d3['length']-0x1,_0x3a31fd;_0x41aa6f>=0x0;_0x41aa6f--)(_0x3a31fd=_0x3355d3[_0x41aa6f])&&(_0x432675=_0x3a31fd(_0x432675)||_0x432675);return _0x432675;},O=(_0x2dcb2a,_0x1180d8)=>(_0x5ad534,_0x33f268)=>_0x1180d8(_0x5ad534,_0x33f268,_0x2dcb2a),N=(_0x4016de,_0x2b4cd0,_0x2fc7d8)=>Z(_0x4016de,typeof _0x2b4cd0!=_0x3d5f70(0x219)?_0x2b4cd0+'':_0x2b4cd0,_0x2fc7d8);exports[_0x3d5f70(0x235)]=class extends c['Plugin']{constructor(_0x4bc021=D,_0x4309fe,_0x1c3828){const _0x552951=_0x3d5f70;super(),this[_0x552951(0x1d8)]=_0x4bc021,this[_0x552951(0x203)]=_0x4309fe,this[_0x552951(0x224)]=_0x1c3828;const {..._0x3738db}=c[_0x552951(0x1d2)]({},D,this[_0x552951(0x1d8)]);this['_configService'][_0x552951(0x1bb)](q,_0x3738db);}[_0x3d5f70(0x211)](){const _0x44e454=_0x3d5f70;[[g],[C],[p]][_0x44e454(0x1e7)](_0x3931b4=>{const _0x1c7058=_0x44e454;this[_0x1c7058(0x203)]['add'](_0x3931b4);});}[_0x3d5f70(0x1e1)](){const _0x30ca21=_0x3d5f70;this[_0x30ca21(0x203)][_0x30ca21(0x231)](C),this[_0x30ca21(0x203)][_0x30ca21(0x231)](p);}},N(exports[_0x3d5f70(0x235)],_0x3d5f70(0x1e0),U),N(exports[_0x3d5f70(0x235)],_0x3d5f70(0x22c),c[_0x3d5f70(0x1f2)][_0x3d5f70(0x1e3)]),exports[_0x3d5f70(0x235)]=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b[_0x3d5f70(0x1ef)],T[_0x3d5f70(0x1db)]),O(0x1,c[_0x3d5f70(0x1f1)](c[_0x3d5f70(0x1cc)])),O(0x2,c[_0x3d5f70(0x238)])],exports[_0x3d5f70(0x235)]);
|
|
1
|
+
'use strict';const _0x4aaf49=_0x7313;(function(_0x465a2f,_0x593403){const _0x1b9c04=_0x7313,_0x1a69d4=_0x465a2f();while(!![]){try{const _0x531f6c=-parseInt(_0x1b9c04(0x16b))/0x1+parseInt(_0x1b9c04(0x178))/0x2+-parseInt(_0x1b9c04(0x188))/0x3*(parseInt(_0x1b9c04(0x19a))/0x4)+parseInt(_0x1b9c04(0x19f))/0x5*(parseInt(_0x1b9c04(0x14f))/0x6)+-parseInt(_0x1b9c04(0x154))/0x7*(parseInt(_0x1b9c04(0x196))/0x8)+parseInt(_0x1b9c04(0x17c))/0x9*(parseInt(_0x1b9c04(0x1a4))/0xa)+parseInt(_0x1b9c04(0x168))/0xb*(-parseInt(_0x1b9c04(0x1b8))/0xc);if(_0x531f6c===_0x593403)break;else _0x1a69d4['push'](_0x1a69d4['shift']());}catch(_0x3ada18){_0x1a69d4['push'](_0x1a69d4['shift']());}}}(_0x1627,0x68854));function _0x1627(){const _0x3b1f8f=['Reply','unitId','type','1306870rYQdDA','symbol','/universer-api/user/list','Solve','135MjqHep','_threadCommentDataSource','comment','getUnit','requireSession','find','forEach','getComment','commentUpdate$','users','delete','user','14937sqCYXv','rangeType','Unknown','parentId','setConfig','CommentService','@univerjs/thread-comment','body','Edit','@univerjs/core','_initUserSync','OpenOrReOpen','_threadCommentDataSourceService','createTimestamp','19408YcuBzX','syncUpdateMutationToColla','defineProperty','dayjs','28IywScB','root','userId','_sessionService','add','3916295oACkrU','saveCommentToSnapshot','onReady','replies','resolved','443810dEAnlj','/list','_httpService','Solved','_threadCommentModel','DependentOn','solved','UniverThreadCommentDataSourcePlugin','@univerjs/thread-comment-ui','updateComment','getCurrentUser','resolveComment','UserManagerService','addUser','getUser','addComment','values','disposeWithMe','code','getMemberID','5751588BuaRcM','slice','Delete','stringify','payload','/universer-api/comment/unit/','UNRECOGNIZED','filter','content','format','replyId','Module','map','Inject','6iOuOWV','UniverInstanceType','deleteComment','customRanges','/add','469KAGyHY','post','subscribe','length','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','/delete','pipe','thread-comment-data-source.config','CustomRangeType','Disposable','_commentService','_configService','Plugin','_initDataSource','YYYY/MM/DD\x20HH:mm','UniverThreadCommentUIPlugin','error','_userService','IThreadCommentDataSourceService','22JTSleX','threadId','getOwnPropertyDescriptor','518300uwhVOf','get','listComments','userID','personId','_injector','onStarting','Injector','parse','Add'];_0x1627=function(){return _0x3b1f8f;};return _0x1627();}Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x4aaf49(0x14c)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require(_0x4aaf49(0x191)),j=require(_0x4aaf49(0x1ac)),M=require(_0x4aaf49(0x18e)),w=require('rxjs'),P=require('@univerjs/network'),U=_0x4aaf49(0x158);var I=(_0xfb8ad9=>(_0xfb8ad9[_0xfb8ad9[_0x4aaf49(0x193)]=0x0]=_0x4aaf49(0x193),_0xfb8ad9[_0xfb8ad9['Solved']=0x1]='Solved',_0xfb8ad9[_0xfb8ad9[_0x4aaf49(0x147)]=-0x1]=_0x4aaf49(0x147),_0xfb8ad9))(I||{}),v=(_0x101db6=>(_0x101db6[_0x101db6[_0x4aaf49(0x18a)]=0x0]=_0x4aaf49(0x18a),_0x101db6[_0x101db6['Add']=0x1]=_0x4aaf49(0x174),_0x101db6[_0x101db6['Reply']=0x2]=_0x4aaf49(0x175),_0x101db6[_0x101db6['Edit']=0x3]=_0x4aaf49(0x190),_0x101db6[_0x101db6[_0x4aaf49(0x143)]=0x4]=_0x4aaf49(0x143),_0x101db6[_0x101db6['Solve']=0x5]=_0x4aaf49(0x17b),_0x101db6[_0x101db6[_0x4aaf49(0x147)]=-0x1]='UNRECOGNIZED',_0x101db6))(v||{});const f=_0x55519d=>c[_0x4aaf49(0x199)](new Date(+_0x55519d))[_0x4aaf49(0x14a)](_0x4aaf49(0x163)),R=async(_0x41a465,_0x3f11e8)=>{const _0x27b689=_0x4aaf49,_0x509685=_0x41a465[_0x27b689(0x16c)](c[_0x27b689(0x1b0)]),_0x2d4504=_0x41a465[_0x27b689(0x16c)](P['HTTPService']);_0x3f11e8['forEach'](_0x69248e=>{const _0x265862=_0x27b689;_0x509685[_0x265862(0x1b2)](_0x69248e)&&_0x3f11e8[_0x265862(0x186)](_0x69248e);}),_0x3f11e8['size']&&(await _0x2d4504[_0x27b689(0x16c)](_0x27b689(0x17a),{'params':{'userIDs':[..._0x3f11e8]}}))[_0x27b689(0x18f)]['users'][_0x27b689(0x182)](_0x313ffc=>{_0x313ffc&&_0x509685['addUser'](_0x313ffc);});};var $=Object[_0x4aaf49(0x16a)],E=(_0x43de55,_0x315613,_0x11ead0,_0x2ab31d)=>{const _0x3d99bd=_0x4aaf49;for(var _0x2cb316=_0x2ab31d>0x1?void 0x0:_0x2ab31d?$(_0x315613,_0x11ead0):_0x315613,_0x25ae03=_0x43de55[_0x3d99bd(0x157)]-0x1,_0x5e0974;_0x25ae03>=0x0;_0x25ae03--)(_0x5e0974=_0x43de55[_0x25ae03])&&(_0x2cb316=_0x5e0974(_0x2cb316)||_0x2cb316);return _0x2cb316;},S=(_0x265056,_0x36f846)=>(_0x53f4e0,_0x44597c)=>_0x36f846(_0x53f4e0,_0x44597c,_0x265056);let p=class extends c[_0x4aaf49(0x15e)]{constructor(_0x127dc1,_0x3f329c,_0x48a914,_0x1d3ec0){const _0x2fc7a8=_0x4aaf49;super(),this[_0x2fc7a8(0x15f)]=_0x127dc1,this[_0x2fc7a8(0x1a8)]=_0x3f329c,this[_0x2fc7a8(0x166)]=_0x48a914,this['_injector']=_0x1d3ec0,this['_init'](),this['_initUserSync']();}[_0x4aaf49(0x192)](){const _0x249584=_0x4aaf49;this[_0x249584(0x1b5)](this['_threadCommentModel'][_0x249584(0x184)][_0x249584(0x15b)](w['bufferTime'](0x10))['subscribe'](_0x30671c=>{const _0x132ccf=_0x249584,_0x3b5dec=new Set();_0x30671c[_0x132ccf(0x182)](_0x4a7542=>{const _0xdae1e9=_0x132ccf;switch(_0x4a7542[_0xdae1e9(0x177)]){case _0xdae1e9(0x19e):{const _0x4e57e0=_0x4a7542[_0xdae1e9(0x145)][_0xdae1e9(0x16f)];_0x3b5dec['add'](_0x4e57e0);break;}}}),R(this[_0x132ccf(0x170)],_0x3b5dec);}));}['_init'](){const _0x24b1f4=_0x4aaf49;this[_0x24b1f4(0x1b5)](this['_commentService'][_0x24b1f4(0x184)][_0x24b1f4(0x156)](async _0xd57348=>{const _0x14551e=_0x24b1f4;var _0xad1cce,_0x4636ed,_0x3f2688,_0x407f29;const _0x1b4f86=(_0xad1cce=this[_0x14551e(0x1a8)]['getUnit'](_0xd57348[_0x14551e(0x176)])[_0x14551e(0x181)](_0x4e1492=>_0x4e1492[_0x14551e(0x169)]===_0xd57348[_0x14551e(0x169)]))==null?void 0x0:_0xad1cce[_0x14551e(0x19b)];if(!_0x1b4f86)return;const {unitId:_0x2bacf9,subUnitId:_0x3d876b}=_0x1b4f86;switch(_0xd57348[_0x14551e(0x187)]&&this[_0x14551e(0x166)][_0x14551e(0x1b1)](_0xd57348[_0x14551e(0x187)]),_0xd57348[_0x14551e(0x177)]){case v['Add']:break;case v[_0x14551e(0x175)]:{this[_0x14551e(0x1a8)][_0x14551e(0x1b3)](_0x2bacf9,_0x3d876b,{'unitId':_0x2bacf9,'subUnitId':_0x3d876b,'ref':'','id':_0xd57348[_0x14551e(0x14b)],'dT':f(+_0xd57348[_0x14551e(0x195)]),'threadId':_0xd57348[_0x14551e(0x169)],'personId':(_0x3f2688=(_0x4636ed=_0xd57348[_0x14551e(0x187)])==null?void 0x0:_0x4636ed[_0x14551e(0x16e)])!=null?_0x3f2688:_0xd57348['userId'],'text':JSON['parse'](_0xd57348[_0x14551e(0x149)]),'parentId':_0x1b4f86['id']});break;}case v['Delete']:{const _0x354d48=this[_0x14551e(0x1a8)][_0x14551e(0x183)](_0x2bacf9,_0x3d876b,_0xd57348[_0x14551e(0x14b)]);_0x354d48&&_0x354d48[_0x14551e(0x18b)]&&this[_0x14551e(0x1a8)][_0x14551e(0x151)](_0x2bacf9,_0x3d876b,_0xd57348['replyId']);break;}case v[_0x14551e(0x190)]:{this['_threadCommentModel'][_0x14551e(0x1ad)](_0x2bacf9,_0x3d876b,{'commentId':_0xd57348['replyId'],'text':JSON['parse'](_0xd57348['content'])});break;}case v[_0x14551e(0x17b)]:{const _0x417450=(_0x407f29=this[_0x14551e(0x1a8)][_0x14551e(0x17f)](_0xd57348[_0x14551e(0x176)])[_0x14551e(0x181)](_0x32d19d=>_0x32d19d[_0x14551e(0x169)]===_0xd57348[_0x14551e(0x169)]))==null?void 0x0:_0x407f29[_0x14551e(0x19b)];_0x417450&&this[_0x14551e(0x1a8)][_0x14551e(0x1af)](_0x2bacf9,_0x3d876b,_0x417450['id'],_0xd57348['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x4aaf49(0x14e)](b[_0x4aaf49(0x18d)])),S(0x1,c[_0x4aaf49(0x14e)](M['ThreadCommentModel'])),S(0x2,c[_0x4aaf49(0x14e)](c[_0x4aaf49(0x1b0)])),S(0x3,c[_0x4aaf49(0x14e)](c[_0x4aaf49(0x172)]))],p);const q=_0x4aaf49(0x15c),D={};var A=Object[_0x4aaf49(0x16a)],x=(_0x3dff3b,_0x1f84b2,_0xa4680f,_0x4620fd)=>{const _0x36c6ad=_0x4aaf49;for(var _0x4525e3=_0x4620fd>0x1?void 0x0:_0x4620fd?A(_0x1f84b2,_0xa4680f):_0x1f84b2,_0x1256b3=_0x3dff3b[_0x36c6ad(0x157)]-0x1,_0x240049;_0x1256b3>=0x0;_0x1256b3--)(_0x240049=_0x3dff3b[_0x1256b3])&&(_0x4525e3=_0x240049(_0x4525e3)||_0x4525e3);return _0x4525e3;},_=(_0x549d3e,_0x1c9750)=>(_0x58cfda,_0x2cec3d)=>_0x1c9750(_0x58cfda,_0x2cec3d,_0x549d3e);function _0x7313(_0x53b298,_0x3e9c23){const _0x162715=_0x1627();return _0x7313=function(_0x731348,_0x2af567){_0x731348=_0x731348-0x143;let _0x279292=_0x162715[_0x731348];return _0x279292;},_0x7313(_0x53b298,_0x3e9c23);}function Y(_0x377ca1,_0x443587){const _0x1faa73=_0x4aaf49,_0x32be8a=_0x377ca1[_0x1faa73(0x1a2)][0x0];return{..._0x443587,'id':_0x32be8a[_0x1faa73(0x14b)],'resolved':_0x377ca1[_0x1faa73(0x1aa)]===0x1,'dT':f(_0x32be8a['createTimestamp']),'personId':_0x32be8a[_0x1faa73(0x19c)],'threadId':_0x32be8a[_0x1faa73(0x169)]};}function G(_0x5e3ab4,_0x520c07,_0x1ee5db){const _0x9cfdc0=_0x4aaf49;var _0x2941e7,_0xcfb729;if(((_0xcfb729=(_0x2941e7=_0x5e3ab4==null?void 0x0:_0x5e3ab4[_0x9cfdc0(0x1a2)])==null?void 0x0:_0x2941e7[_0x9cfdc0(0x157)])!=null?_0xcfb729:0x0)>0x0){const _0x3d6589=(_0x286e96,_0xcd72c6)=>({'id':_0x286e96[_0x9cfdc0(0x14b)],'threadId':_0x286e96[_0x9cfdc0(0x169)],'dT':f(_0x286e96['createTimestamp']),'personId':_0x286e96['userId'],'resolved':_0x5e3ab4[_0x9cfdc0(0x1aa)]===I[_0x9cfdc0(0x1a7)],'unitId':_0x520c07,'subUnitId':_0x1ee5db,'text':JSON[_0x9cfdc0(0x173)](_0x286e96[_0x9cfdc0(0x149)]),'parentId':_0xcd72c6}),_0x3eaa29=_0x3d6589(_0x5e3ab4[_0x9cfdc0(0x1a2)][0x0]);return{..._0x3eaa29,'children':_0x5e3ab4[_0x9cfdc0(0x1a2)][_0x9cfdc0(0x1b9)](0x1)['map'](_0x1a0395=>_0x3d6589(_0x1a0395,_0x3eaa29['id']))};}return null;}let g=class{constructor(_0x4bc39c,_0x39e095,_0x6dfa73,_0x2f59ba){const _0x2e35bd=_0x4aaf49;this[_0x2e35bd(0x1a6)]=_0x4bc39c,this[_0x2e35bd(0x166)]=_0x39e095,this['_sessionService']=_0x6dfa73,this[_0x2e35bd(0x170)]=_0x2f59ba;}async[_0x4aaf49(0x1b3)](_0x314ccf){const _0x3c3a1d=_0x4aaf49;var _0xf11389,_0x5e2db2;const {parentId:_0x1b2780,unitId:_0x5a5266,text:_0x4a3e9d,threadId:_0x3d84bf}=_0x314ccf,_0x38c0ce=(_0x5e2db2=(_0xf11389=_0x4a3e9d[_0x3c3a1d(0x152)])==null?void 0x0:_0xf11389[_0x3c3a1d(0x148)](_0x4e0a46=>_0x4e0a46[_0x3c3a1d(0x189)]===c[_0x3c3a1d(0x15d)]['COMMENT'])[_0x3c3a1d(0x14d)](_0x47e95a=>_0x47e95a['rangeId']))!=null?_0x5e2db2:[],_0x151e1b=JSON['stringify'](_0x4a3e9d),_0x409fd4=(await this[_0x3c3a1d(0x19d)][_0x3c3a1d(0x180)](_0x5a5266))[_0x3c3a1d(0x1b7)]();if(_0x1b2780){const _0x58e7b6={'memberId':_0x409fd4,'unitId':_0x5a5266,'content':_0x151e1b,'mention':_0x38c0ce,'threadId':_0x3d84bf},_0x3a2c37=(await this[_0x3c3a1d(0x1a6)]['post']('/universer-api/comment/unit/'+_0x5a5266+'/reply',{'body':_0x58e7b6}))[_0x3c3a1d(0x18f)]['reply'];return{..._0x314ccf,'id':_0x3a2c37[_0x3c3a1d(0x14b)],'dT':c[_0x3c3a1d(0x199)](+_0x3a2c37[_0x3c3a1d(0x195)])[_0x3c3a1d(0x14a)](_0x3c3a1d(0x163)),'personId':_0x3a2c37['userId']};}else{const _0x11b83c={'memberId':_0x409fd4,'unitId':_0x5a5266,'content':_0x151e1b,'mention':_0x38c0ce},_0x539eb7=await this[_0x3c3a1d(0x1a6)][_0x3c3a1d(0x155)](_0x3c3a1d(0x146)+_0x5a5266+_0x3c3a1d(0x153),{'body':_0x11b83c});return Y(_0x539eb7[_0x3c3a1d(0x18f)][_0x3c3a1d(0x17e)],_0x314ccf);}}async[_0x4aaf49(0x1ad)](_0x4d733f){const _0x73b842=_0x4aaf49;var _0x2aaf2a,_0x31b46e;const {text:_0x2fd27f,unitId:_0x5b868c}=_0x4d733f,_0x90d82f=(_0x31b46e=(_0x2aaf2a=_0x2fd27f[_0x73b842(0x152)])==null?void 0x0:_0x2aaf2a[_0x73b842(0x148)](_0x761f8c=>_0x761f8c['rangeType']===c[_0x73b842(0x15d)]['COMMENT'])[_0x73b842(0x14d)](_0x5b9981=>_0x5b9981['rangeId']))!=null?_0x31b46e:[],_0x4212ee=JSON[_0x73b842(0x144)](_0x2fd27f),_0x3a716e=_0x4d733f[_0x73b842(0x169)],_0x3635c6=_0x4d733f['id'],_0x62bf4b={'memberId':(await this[_0x73b842(0x19d)][_0x73b842(0x180)](_0x5b868c))['getMemberID'](),'unitId':_0x5b868c,'threadId':_0x3a716e,'mention':_0x90d82f,'content':_0x4212ee,'replyId':_0x3635c6},_0x29c077=await this[_0x73b842(0x1a6)]['post'](_0x73b842(0x146)+_0x5b868c+'/edit',{'body':_0x62bf4b});return!_0x29c077['body'][_0x73b842(0x165)]||_0x29c077[_0x73b842(0x18f)][_0x73b842(0x165)][_0x73b842(0x1b6)]===0x1;}async[_0x4aaf49(0x1af)](_0x15a384){const _0x1c9eb4=_0x4aaf49,{unitId:_0x51fb6d}=_0x15a384,_0xf27ae3=_0x15a384['threadId'],_0x1acfe7={'memberId':this[_0x1c9eb4(0x166)][_0x1c9eb4(0x1ae)]()[_0x1c9eb4(0x16e)],'unitId':_0x51fb6d,'threadId':_0xf27ae3,'solved':_0x15a384[_0x1c9eb4(0x1a3)]?I[_0x1c9eb4(0x1a7)]:I['OpenOrReOpen']},_0x521c1d=await this['_httpService']['post'](_0x1c9eb4(0x146)+_0x51fb6d+'/solved',{'body':_0x1acfe7});return!_0x521c1d[_0x1c9eb4(0x18f)][_0x1c9eb4(0x165)]||_0x521c1d[_0x1c9eb4(0x18f)]['error'][_0x1c9eb4(0x1b6)]===0x1;}async[_0x4aaf49(0x151)](_0xddb5a7,_0x4926a2,_0x41e394,_0x4fab06){const _0x2196f3=_0x4aaf49,_0xb8339b={'memberId':(await this[_0x2196f3(0x19d)][_0x2196f3(0x180)](_0xddb5a7))[_0x2196f3(0x1b7)](),'threadId':_0x41e394,'replyId':_0x4fab06,'unitId':_0xddb5a7},_0x4873bc=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xddb5a7+_0x2196f3(0x15a),{'body':_0xb8339b});return!_0x4873bc[_0x2196f3(0x18f)][_0x2196f3(0x165)]||_0x4873bc[_0x2196f3(0x18f)][_0x2196f3(0x165)][_0x2196f3(0x1b6)]===0x1;}async[_0x4aaf49(0x16d)](_0x10fced,_0x57cbda,_0x5ae93c){const _0x31e415=_0x4aaf49,_0x54a13b={'unitId':_0x10fced,'threadId':_0x5ae93c},_0x4dc7f8=await this[_0x31e415(0x1a6)][_0x31e415(0x155)](_0x31e415(0x146)+_0x10fced+_0x31e415(0x1a5),{'body':_0x54a13b}),_0x153acd=_0x5ae93c[_0x31e415(0x14d)](_0x8b9b81=>G(_0x4dc7f8['body']['comments'][_0x8b9b81],_0x10fced,_0x57cbda))[_0x31e415(0x148)](Boolean);return Object[_0x31e415(0x1b4)](_0x4dc7f8['body'][_0x31e415(0x185)])[_0x31e415(0x182)](_0xe8885a=>{const _0x27dcd1=_0x31e415;this[_0x27dcd1(0x166)][_0x27dcd1(0x1b1)](_0xe8885a);}),_0x153acd;}[_0x4aaf49(0x1a0)](_0x1e6951){const _0x25803f=_0x4aaf49;return{'id':_0x1e6951['id'],'threadId':_0x1e6951[_0x25803f(0x169)],'ref':_0x1e6951['ref']};}};g=x([_(0x0,c['Inject'](P['HTTPService'])),_(0x1,c[_0x4aaf49(0x14e)](c['UserManagerService'])),_(0x2,c[_0x4aaf49(0x14e)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c[_0x4aaf49(0x172)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x23cce7,_0x1961ef,_0x14c4ab,_0x14ca93)=>{for(var _0x39e39e=_0x14ca93>0x1?void 0x0:_0x14ca93?H(_0x1961ef,_0x14c4ab):_0x1961ef,_0x30353b=_0x23cce7['length']-0x1,_0x32b9c5;_0x30353b>=0x0;_0x30353b--)(_0x32b9c5=_0x23cce7[_0x30353b])&&(_0x39e39e=_0x32b9c5(_0x39e39e)||_0x39e39e);return _0x39e39e;},y=(_0x55076f,_0x42124d)=>(_0x5190db,_0x4a0af7)=>_0x42124d(_0x5190db,_0x4a0af7,_0x55076f);let C=class extends c[_0x4aaf49(0x15e)]{constructor(_0x2a7df1,_0xf026dc){const _0x448b7b=_0x4aaf49;super(),this[_0x448b7b(0x194)]=_0x2a7df1,this[_0x448b7b(0x17d)]=_0xf026dc,this[_0x448b7b(0x162)]();}['_initDataSource'](){const _0x2b9e37=_0x4aaf49;this[_0x2b9e37(0x194)]['dataSource']=this[_0x2b9e37(0x17d)],this['_threadCommentDataSourceService'][_0x2b9e37(0x197)]=!0x1;}};C=J([y(0x0,M[_0x4aaf49(0x167)]),y(0x1,c[_0x4aaf49(0x14e)](g))],C);var F=Object[_0x4aaf49(0x198)],L=Object['getOwnPropertyDescriptor'],Z=(_0x51c903,_0x2d77da,_0x31ed97)=>_0x2d77da in _0x51c903?F(_0x51c903,_0x2d77da,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x31ed97}):_0x51c903[_0x2d77da]=_0x31ed97,W=(_0x2fd3b4,_0x29998e,_0x3521df,_0x3597fb)=>{const _0x19be2e=_0x4aaf49;for(var _0x500fdb=_0x3597fb>0x1?void 0x0:_0x3597fb?L(_0x29998e,_0x3521df):_0x29998e,_0x4d112b=_0x2fd3b4[_0x19be2e(0x157)]-0x1,_0x1637a3;_0x4d112b>=0x0;_0x4d112b--)(_0x1637a3=_0x2fd3b4[_0x4d112b])&&(_0x500fdb=_0x1637a3(_0x500fdb)||_0x500fdb);return _0x500fdb;},O=(_0x674ea8,_0x30329e)=>(_0x3c24f8,_0x3fd889)=>_0x30329e(_0x3c24f8,_0x3fd889,_0x674ea8),N=(_0x56ccd9,_0xf1f4d0,_0x22c14e)=>Z(_0x56ccd9,typeof _0xf1f4d0!=_0x4aaf49(0x179)?_0xf1f4d0+'':_0xf1f4d0,_0x22c14e);exports[_0x4aaf49(0x1ab)]=class extends c[_0x4aaf49(0x161)]{constructor(_0x390953=D,_0x3d7390,_0x24c621){const _0x35b9b9=_0x4aaf49;super(),this['_config']=_0x390953,this[_0x35b9b9(0x170)]=_0x3d7390,this[_0x35b9b9(0x160)]=_0x24c621;const {..._0x4723f6}=c['merge']({},D,this['_config']);this[_0x35b9b9(0x160)][_0x35b9b9(0x18c)](q,_0x4723f6);}[_0x4aaf49(0x171)](){const _0x47d8e4=_0x4aaf49;[[g],[C],[p]][_0x47d8e4(0x182)](_0x2f0c5d=>{const _0x1ade0c=_0x47d8e4;this[_0x1ade0c(0x170)][_0x1ade0c(0x19e)](_0x2f0c5d);});}[_0x4aaf49(0x1a1)](){const _0x4497d2=_0x4aaf49;this['_injector'][_0x4497d2(0x16c)](C),this['_injector'][_0x4497d2(0x16c)](p);}},N(exports[_0x4aaf49(0x1ab)],'pluginName',U),N(exports[_0x4aaf49(0x1ab)],'type',c[_0x4aaf49(0x150)]['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x4aaf49(0x1a9)](j[_0x4aaf49(0x164)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x4aaf49(0x172)])),O(0x2,c[_0x4aaf49(0x159)])],exports[_0x4aaf49(0x1ab)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x35f622=_0x5cab;(function(_0x1b2cd9,_0x5da74d){const _0x5e12c8=_0x5cab,_0x25c4c3=_0x1b2cd9();while(!![]){try{const _0x5dcee1=-parseInt(_0x5e12c8(0xbb))/0x1+-parseInt(_0x5e12c8(0x8c))/0x2*(-parseInt(_0x5e12c8(0xe4))/0x3)+parseInt(_0x5e12c8(0xc1))/0x4+parseInt(_0x5e12c8(0xc2))/0x5*(-parseInt(_0x5e12c8(0xd8))/0x6)+-parseInt(_0x5e12c8(0xd9))/0x7+-parseInt(_0x5e12c8(0xb3))/0x8+parseInt(_0x5e12c8(0xce))/0x9*(parseInt(_0x5e12c8(0xa7))/0xa);if(_0x5dcee1===_0x5da74d)break;else _0x25c4c3['push'](_0x25c4c3['shift']());}catch(_0x2f75ac){_0x25c4c3['push'](_0x25c4c3['shift']());}}}(_0x2c57,0x4359b));import{CommentService as _0x4b60cb,CollaborationSessionService as _0x2c2f5a,UniverCollaborationClientPlugin as _0x177d49}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x843546}from'@univerjs-pro/license';import{dayjs as _0x269791,UserManagerService as _0x1ff591,Inject as _0x5ee840,Injector as _0x55640e,Disposable as _0x2b7514,CustomRangeType as _0x335bcd,UniverInstanceType as _0x238f45,DependentOn as _0x21b651,IConfigService as _0x3ef499,Plugin as _0x223b2b,merge as _0x20f8a7}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2a1676}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x147ce0,IThreadCommentDataSourceService as _0x217b63}from'@univerjs/thread-comment';import{bufferTime as _0x1f8f94}from'rxjs';import{HTTPService as _0x714c0}from'@univerjs/network';const W=_0x35f622(0xad);var I=(_0x39faa5=>(_0x39faa5[_0x39faa5[_0x35f622(0x93)]=0x0]=_0x35f622(0x93),_0x39faa5[_0x39faa5[_0x35f622(0xa9)]=0x1]=_0x35f622(0xa9),_0x39faa5[_0x39faa5[_0x35f622(0xdd)]=-0x1]=_0x35f622(0xdd),_0x39faa5))(I||{}),v=(_0x21e2cc=>(_0x21e2cc[_0x21e2cc[_0x35f622(0xaa)]=0x0]=_0x35f622(0xaa),_0x21e2cc[_0x21e2cc[_0x35f622(0x94)]=0x1]=_0x35f622(0x94),_0x21e2cc[_0x21e2cc[_0x35f622(0xb1)]=0x2]=_0x35f622(0xb1),_0x21e2cc[_0x21e2cc[_0x35f622(0xdb)]=0x3]=_0x35f622(0xdb),_0x21e2cc[_0x21e2cc[_0x35f622(0xbe)]=0x4]=_0x35f622(0xbe),_0x21e2cc[_0x21e2cc[_0x35f622(0xa3)]=0x5]=_0x35f622(0xa3),_0x21e2cc[_0x21e2cc[_0x35f622(0xdd)]=-0x1]=_0x35f622(0xdd),_0x21e2cc))(v||{});const D=_0x2995a0=>_0x269791(new Date(+_0x2995a0))['format'](_0x35f622(0x89)),B=async(_0x541115,_0x2e973b)=>{const _0x5df6e6=_0x35f622,_0x334860=_0x541115[_0x5df6e6(0x99)](_0x1ff591),_0x27f671=_0x541115[_0x5df6e6(0x99)](_0x714c0);_0x2e973b[_0x5df6e6(0x81)](_0x372532=>{const _0x3e2d9f=_0x5df6e6;_0x334860[_0x3e2d9f(0x8d)](_0x372532)&&_0x2e973b[_0x3e2d9f(0x9a)](_0x372532);}),_0x2e973b[_0x5df6e6(0x90)]&&(await _0x27f671[_0x5df6e6(0x99)](_0x5df6e6(0xd7),{'params':{'userIDs':[..._0x2e973b]}}))[_0x5df6e6(0x9d)]['users'][_0x5df6e6(0x81)](_0x152cac=>{_0x152cac&&_0x334860['addUser'](_0x152cac);});};function _0x5cab(_0x386b70,_0x459290){const _0x2c57e9=_0x2c57();return _0x5cab=function(_0x5cabe5,_0x2f8474){_0x5cabe5=_0x5cabe5-0x81;let _0x362657=_0x2c57e9[_0x5cabe5];return _0x362657;},_0x5cab(_0x386b70,_0x459290);}var K=Object['getOwnPropertyDescriptor'],V=(_0x5ac705,_0x5d4635,_0x1f923a,_0x3c3872)=>{for(var _0x297b77=_0x3c3872>0x1?void 0x0:_0x3c3872?K(_0x5d4635,_0x1f923a):_0x5d4635,_0x128eab=_0x5ac705['length']-0x1,_0x2510fe;_0x128eab>=0x0;_0x128eab--)(_0x2510fe=_0x5ac705[_0x128eab])&&(_0x297b77=_0x2510fe(_0x297b77)||_0x297b77);return _0x297b77;},p=(_0x38df0a,_0x58cec8)=>(_0x1a5010,_0x47a2e1)=>_0x58cec8(_0x1a5010,_0x47a2e1,_0x38df0a);let S=class extends _0x2b7514{constructor(_0x570cf4,_0x5e05f7,_0x5cd1c4,_0x22773a){const _0x56268c=_0x35f622;super(),this['_commentService']=_0x570cf4,this['_threadCommentModel']=_0x5e05f7,this[_0x56268c(0xda)]=_0x5cd1c4,this[_0x56268c(0xc8)]=_0x22773a,this['_init'](),this[_0x56268c(0xa2)]();}[_0x35f622(0xa2)](){const _0xb40629=_0x35f622;this[_0xb40629(0xc3)](this['_threadCommentModel'][_0xb40629(0x83)][_0xb40629(0x9e)](_0x1f8f94(0x10))[_0xb40629(0xcd)](_0xba17da=>{const _0x558794=_0xb40629,_0x1b9e9b=new Set();_0xba17da[_0x558794(0x81)](_0x23f262=>{const _0x224239=_0x558794;switch(_0x23f262[_0x224239(0xca)]){case'add':{const _0x758cd2=_0x23f262[_0x224239(0xb4)]['personId'];_0x1b9e9b[_0x224239(0xc6)](_0x758cd2);break;}}}),B(this['_injector'],_0x1b9e9b);}));}['_init'](){const _0x352833=_0x35f622;this[_0x352833(0xc3)](this['_commentService']['commentUpdate$'][_0x352833(0xcd)](async _0x49a8a0=>{const _0xcddc8e=_0x352833;var _0x494bd6,_0x3d17b9,_0x58449a,_0x368fbe;const _0x4acafd=(_0x494bd6=this[_0xcddc8e(0x9c)][_0xcddc8e(0xd4)](_0x49a8a0['unitId'])[_0xcddc8e(0x9f)](_0x2961d2=>_0x2961d2[_0xcddc8e(0xe0)]===_0x49a8a0['threadId']))==null?void 0x0:_0x494bd6[_0xcddc8e(0xcf)];if(!_0x4acafd)return;const {unitId:_0x3efa35,subUnitId:_0x266c46}=_0x4acafd;switch(_0x49a8a0[_0xcddc8e(0xde)]&&this[_0xcddc8e(0xda)][_0xcddc8e(0xc5)](_0x49a8a0[_0xcddc8e(0xde)]),_0x49a8a0[_0xcddc8e(0xca)]){case v[_0xcddc8e(0x94)]:break;case v['Reply']:{this[_0xcddc8e(0x9c)][_0xcddc8e(0x8e)](_0x3efa35,_0x266c46,{'unitId':_0x3efa35,'subUnitId':_0x266c46,'ref':'','id':_0x49a8a0[_0xcddc8e(0x92)],'dT':D(+_0x49a8a0[_0xcddc8e(0x86)]),'threadId':_0x49a8a0[_0xcddc8e(0xe0)],'personId':(_0x58449a=(_0x3d17b9=_0x49a8a0['user'])==null?void 0x0:_0x3d17b9['userID'])!=null?_0x58449a:_0x49a8a0[_0xcddc8e(0xe3)],'text':JSON[_0xcddc8e(0xb9)](_0x49a8a0[_0xcddc8e(0xa4)]),'parentId':_0x4acafd['id']});break;}case v[_0xcddc8e(0xbe)]:{const _0x4fb529=this[_0xcddc8e(0x9c)][_0xcddc8e(0x95)](_0x3efa35,_0x266c46,_0x49a8a0[_0xcddc8e(0x92)]);_0x4fb529&&_0x4fb529[_0xcddc8e(0x91)]&&this[_0xcddc8e(0x9c)][_0xcddc8e(0xdf)](_0x3efa35,_0x266c46,_0x49a8a0[_0xcddc8e(0x92)]);break;}case v[_0xcddc8e(0xdb)]:{this['_threadCommentModel']['updateComment'](_0x3efa35,_0x266c46,{'commentId':_0x49a8a0['replyId'],'text':JSON[_0xcddc8e(0xb9)](_0x49a8a0[_0xcddc8e(0xa4)])});break;}case v[_0xcddc8e(0xa3)]:{const _0x5e89a2=(_0x368fbe=this[_0xcddc8e(0x9c)][_0xcddc8e(0xd4)](_0x49a8a0[_0xcddc8e(0xbf)])['find'](_0x11bb12=>_0x11bb12[_0xcddc8e(0xe0)]===_0x49a8a0[_0xcddc8e(0xe0)]))==null?void 0x0:_0x368fbe[_0xcddc8e(0xcf)];_0x5e89a2&&this['_threadCommentModel'][_0xcddc8e(0x98)](_0x3efa35,_0x266c46,_0x5e89a2['id'],_0x49a8a0[_0xcddc8e(0xe2)]===I[_0xcddc8e(0xa9)]);break;}}}));}};S=V([p(0x0,_0x5ee840(_0x4b60cb)),p(0x1,_0x5ee840(_0x147ce0)),p(0x2,_0x5ee840(_0x1ff591)),p(0x3,_0x5ee840(_0x55640e))],S);const z=_0x35f622(0x82),M={};var k=Object[_0x35f622(0xac)],Q=(_0x51f97a,_0x1a5fc2,_0xbd56b3,_0x5bdb05)=>{const _0x750660=_0x35f622;for(var _0x4335aa=_0x5bdb05>0x1?void 0x0:_0x5bdb05?k(_0x1a5fc2,_0xbd56b3):_0x1a5fc2,_0x36f690=_0x51f97a[_0x750660(0xa5)]-0x1,_0x34cdc5;_0x36f690>=0x0;_0x36f690--)(_0x34cdc5=_0x51f97a[_0x36f690])&&(_0x4335aa=_0x34cdc5(_0x4335aa)||_0x4335aa);return _0x4335aa;},_=(_0x361dc2,_0x3367bf)=>(_0x28b89f,_0x3b2cf2)=>_0x3367bf(_0x28b89f,_0x3b2cf2,_0x361dc2);function X(_0x2c1ede,_0x33ce9a){const _0xc1602f=_0x35f622,_0x594c51=_0x2c1ede[_0xc1602f(0xba)][0x0];return{..._0x33ce9a,'id':_0x594c51[_0xc1602f(0x92)],'resolved':_0x2c1ede[_0xc1602f(0xe2)]===0x1,'dT':D(_0x594c51['createTimestamp']),'personId':_0x594c51[_0xc1602f(0xe3)],'threadId':_0x594c51['threadId']};}function ee(_0x437eca,_0x28fd3d,_0x44ea4d){const _0x70b55a=_0x35f622;var _0x1b5ba5,_0x5c2b03;if(((_0x5c2b03=(_0x1b5ba5=_0x437eca==null?void 0x0:_0x437eca['replies'])==null?void 0x0:_0x1b5ba5[_0x70b55a(0xa5)])!=null?_0x5c2b03:0x0)>0x0){const _0x27af79=(_0x368a0b,_0x38a8f7)=>({'id':_0x368a0b[_0x70b55a(0x92)],'threadId':_0x368a0b[_0x70b55a(0xe0)],'dT':D(_0x368a0b[_0x70b55a(0x86)]),'personId':_0x368a0b[_0x70b55a(0xe3)],'resolved':_0x437eca['solved']===I[_0x70b55a(0xa9)],'unitId':_0x28fd3d,'subUnitId':_0x44ea4d,'text':JSON['parse'](_0x368a0b[_0x70b55a(0xa4)]),'parentId':_0x38a8f7}),_0x55d0f9=_0x27af79(_0x437eca[_0x70b55a(0xba)][0x0]);return{..._0x55d0f9,'children':_0x437eca[_0x70b55a(0xba)]['slice'](0x1)[_0x70b55a(0xaf)](_0x2b954e=>_0x27af79(_0x2b954e,_0x55d0f9['id']))};}return null;}let f=class{constructor(_0x50d33a,_0x58f5aa,_0x3cc0da,_0x5b7c6f){const _0x227f70=_0x35f622;this[_0x227f70(0x88)]=_0x50d33a,this[_0x227f70(0xda)]=_0x58f5aa,this[_0x227f70(0xc9)]=_0x3cc0da,this[_0x227f70(0xc8)]=_0x5b7c6f;}async[_0x35f622(0x8e)](_0x3dfab8){const _0x3b023e=_0x35f622;var _0x489ca1,_0x5d253c;const {parentId:_0x2b435e,unitId:_0x5e4185,text:_0x4fdf6c,threadId:_0x461cfa}=_0x3dfab8,_0x4dbb01=(_0x5d253c=(_0x489ca1=_0x4fdf6c['customRanges'])==null?void 0x0:_0x489ca1['filter'](_0x5dc21f=>_0x5dc21f['rangeType']===_0x335bcd[_0x3b023e(0xe1)])['map'](_0x126094=>_0x126094[_0x3b023e(0x8b)]))!=null?_0x5d253c:[],_0x4d8b07=JSON[_0x3b023e(0xc4)](_0x4fdf6c),_0x5a0ca8=(await this[_0x3b023e(0xc9)][_0x3b023e(0xd6)](_0x5e4185))['getMemberID']();if(_0x2b435e){const _0x1342bc={'memberId':_0x5a0ca8,'unitId':_0x5e4185,'content':_0x4d8b07,'mention':_0x4dbb01,'threadId':_0x461cfa},_0x3f970e=(await this['_httpService']['post'](_0x3b023e(0xa8)+_0x5e4185+_0x3b023e(0x85),{'body':_0x1342bc}))['body'][_0x3b023e(0xb5)];return{..._0x3dfab8,'id':_0x3f970e[_0x3b023e(0x92)],'dT':_0x269791(+_0x3f970e['createTimestamp'])[_0x3b023e(0xa0)](_0x3b023e(0x89)),'personId':_0x3f970e['userId']};}else{const _0x37544c={'memberId':_0x5a0ca8,'unitId':_0x5e4185,'content':_0x4d8b07,'mention':_0x4dbb01},_0x2d65a1=await this[_0x3b023e(0x88)]['post'](_0x3b023e(0xa8)+_0x5e4185+_0x3b023e(0x8f),{'body':_0x37544c});return X(_0x2d65a1['body'][_0x3b023e(0xd3)],_0x3dfab8);}}async[_0x35f622(0xd2)](_0x271465){const _0x267123=_0x35f622;var _0x3450c0,_0xc95b20;const {text:_0xe2305,unitId:_0x40a3f7}=_0x271465,_0x322750=(_0xc95b20=(_0x3450c0=_0xe2305[_0x267123(0xb8)])==null?void 0x0:_0x3450c0[_0x267123(0xd0)](_0x255c73=>_0x255c73[_0x267123(0xcb)]===_0x335bcd[_0x267123(0xe1)])[_0x267123(0xaf)](_0x518cd2=>_0x518cd2[_0x267123(0x8b)]))!=null?_0xc95b20:[],_0x4509ea=JSON[_0x267123(0xc4)](_0xe2305),_0x3e4068=_0x271465[_0x267123(0xe0)],_0x10bd8e=_0x271465['id'],_0x466d52={'memberId':(await this[_0x267123(0xc9)][_0x267123(0xd6)](_0x40a3f7))[_0x267123(0xbd)](),'unitId':_0x40a3f7,'threadId':_0x3e4068,'mention':_0x322750,'content':_0x4509ea,'replyId':_0x10bd8e},_0x547eba=await this[_0x267123(0x88)][_0x267123(0xd5)](_0x267123(0xa8)+_0x40a3f7+'/edit',{'body':_0x466d52});return!_0x547eba['body'][_0x267123(0xae)]||_0x547eba[_0x267123(0x9d)][_0x267123(0xae)]['code']===0x1;}async[_0x35f622(0x98)](_0x1fe854){const _0x177aa2=_0x35f622,{unitId:_0x5b7442}=_0x1fe854,_0x3651a8=_0x1fe854[_0x177aa2(0xe0)],_0x3db9a4={'memberId':this['_userService']['getCurrentUser']()[_0x177aa2(0xab)],'unitId':_0x5b7442,'threadId':_0x3651a8,'solved':_0x1fe854[_0x177aa2(0xd1)]?I[_0x177aa2(0xa9)]:I[_0x177aa2(0x93)]},_0x53c279=await this[_0x177aa2(0x88)][_0x177aa2(0xd5)](_0x177aa2(0xa8)+_0x5b7442+'/solved',{'body':_0x3db9a4});return!_0x53c279[_0x177aa2(0x9d)][_0x177aa2(0xae)]||_0x53c279[_0x177aa2(0x9d)][_0x177aa2(0xae)][_0x177aa2(0xcc)]===0x1;}async['deleteComment'](_0x447493,_0x115e7e,_0x82e5d5,_0xd1caa0){const _0xa38f44=_0x35f622,_0x4e78a1={'memberId':(await this[_0xa38f44(0xc9)][_0xa38f44(0xd6)](_0x447493))[_0xa38f44(0xbd)](),'threadId':_0x82e5d5,'replyId':_0xd1caa0,'unitId':_0x447493},_0x18f034=await this['_httpService'][_0xa38f44(0xd5)](_0xa38f44(0xa8)+_0x447493+_0xa38f44(0xb7),{'body':_0x4e78a1});return!_0x18f034[_0xa38f44(0x9d)][_0xa38f44(0xae)]||_0x18f034[_0xa38f44(0x9d)][_0xa38f44(0xae)]['code']===0x1;}async[_0x35f622(0xa6)](_0x3d9b36,_0x6d5352,_0x2b5ad7){const _0x3c37cf=_0x35f622,_0x1fd422={'unitId':_0x3d9b36,'threadId':_0x2b5ad7},_0x4aa0ad=await this[_0x3c37cf(0x88)][_0x3c37cf(0xd5)](_0x3c37cf(0xa8)+_0x3d9b36+_0x3c37cf(0xbc),{'body':_0x1fd422}),_0xbc15c6=_0x2b5ad7[_0x3c37cf(0xaf)](_0xce2053=>ee(_0x4aa0ad[_0x3c37cf(0x9d)][_0x3c37cf(0xb6)][_0xce2053],_0x3d9b36,_0x6d5352))[_0x3c37cf(0xd0)](Boolean);return Object['values'](_0x4aa0ad['body'][_0x3c37cf(0x97)])[_0x3c37cf(0x81)](_0x33e89e=>{const _0x3543ec=_0x3c37cf;this[_0x3543ec(0xda)][_0x3543ec(0xc5)](_0x33e89e);}),_0xbc15c6;}[_0x35f622(0x96)](_0x2104a1){const _0x3f2ffd=_0x35f622;return{'id':_0x2104a1['id'],'threadId':_0x2104a1[_0x3f2ffd(0xe0)],'ref':_0x2104a1[_0x3f2ffd(0x87)]};}};f=Q([_(0x0,_0x5ee840(_0x714c0)),_(0x1,_0x5ee840(_0x1ff591)),_(0x2,_0x5ee840(_0x2c2f5a)),_(0x3,_0x5ee840(_0x55640e))],f);var re=Object[_0x35f622(0xac)],te=(_0x272a61,_0xe43b3e,_0x49fecd,_0x12b5b1)=>{const _0x35b499=_0x35f622;for(var _0x4c3781=_0x12b5b1>0x1?void 0x0:_0x12b5b1?re(_0xe43b3e,_0x49fecd):_0xe43b3e,_0x1b2fa2=_0x272a61[_0x35b499(0xa5)]-0x1,_0x116346;_0x1b2fa2>=0x0;_0x1b2fa2--)(_0x116346=_0x272a61[_0x1b2fa2])&&(_0x4c3781=_0x116346(_0x4c3781)||_0x4c3781);return _0x4c3781;},N=(_0x5d522c,_0x30f5f4)=>(_0x2a707c,_0x5b854)=>_0x30f5f4(_0x2a707c,_0x5b854,_0x5d522c);let g=class extends _0x2b7514{constructor(_0x5e5a8d,_0x1ec3ae){const _0x3a5543=_0x35f622;super(),this[_0x3a5543(0xb0)]=_0x5e5a8d,this[_0x3a5543(0xc0)]=_0x1ec3ae,this[_0x3a5543(0x8a)]();}[_0x35f622(0x8a)](){const _0x577bed=_0x35f622;this[_0x577bed(0xb0)][_0x577bed(0xb2)]=this['_threadCommentDataSource'],this[_0x577bed(0xb0)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x217b63),N(0x1,_0x5ee840(f))],g);var se=Object[_0x35f622(0xa1)],oe=Object[_0x35f622(0xac)],ne=(_0x2b883b,_0x579912,_0x20d538)=>_0x579912 in _0x2b883b?se(_0x2b883b,_0x579912,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x20d538}):_0x2b883b[_0x579912]=_0x20d538,ie=(_0x4aa11b,_0x567acf,_0x2958bb,_0x33a7fc)=>{const _0x415228=_0x35f622;for(var _0x1f08e1=_0x33a7fc>0x1?void 0x0:_0x33a7fc?oe(_0x567acf,_0x2958bb):_0x567acf,_0x4d98a3=_0x4aa11b[_0x415228(0xa5)]-0x1,_0x1f03bf;_0x4d98a3>=0x0;_0x4d98a3--)(_0x1f03bf=_0x4aa11b[_0x4d98a3])&&(_0x1f08e1=_0x1f03bf(_0x1f08e1)||_0x1f08e1);return _0x1f08e1;},w=(_0x2ef0a1,_0x53ec45)=>(_0x3561b9,_0x118ca7)=>_0x53ec45(_0x3561b9,_0x118ca7,_0x2ef0a1),$=(_0x57a3de,_0x42dae5,_0x164089)=>ne(_0x57a3de,typeof _0x42dae5!='symbol'?_0x42dae5+'':_0x42dae5,_0x164089);let b=class extends _0x223b2b{constructor(_0x5662f7=M,_0x45c20b,_0x373bc4){const _0x411667=_0x35f622;super(),this[_0x411667(0x84)]=_0x5662f7,this['_injector']=_0x45c20b,this['_configService']=_0x373bc4;const {..._0x277ebf}=_0x20f8a7({},M,this[_0x411667(0x84)]);this[_0x411667(0x9b)][_0x411667(0xc7)](z,_0x277ebf);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x2a45c8=>{const _0x1c8826=_0x5cab;this[_0x1c8826(0xc8)][_0x1c8826(0xc6)](_0x2a45c8);});}['onReady'](){const _0x2d0d6d=_0x35f622;this[_0x2d0d6d(0xc8)][_0x2d0d6d(0x99)](g),this[_0x2d0d6d(0xc8)][_0x2d0d6d(0x99)](S);}};function _0x2c57(){const _0x506809=['forEach','thread-comment-data-source.config','commentUpdate$','_config','/reply','createTimestamp','ref','_httpService','YYYY/MM/DD\x20HH:mm','_initDataSource','rangeId','39148kRXgXO','getUser','addComment','/add','size','parentId','replyId','OpenOrReOpen','Add','getComment','saveCommentToSnapshot','users','resolveComment','get','delete','_configService','_threadCommentModel','body','pipe','find','format','defineProperty','_initUserSync','Solve','content','length','listComments','103100cpCNfz','/universer-api/comment/unit/','Solved','Unknown','userID','getOwnPropertyDescriptor','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','error','map','_threadCommentDataSourceService','Reply','dataSource','927840zKQEDj','payload','reply','comments','/delete','customRanges','parse','replies','144589EmeniB','/list','getMemberID','Delete','unitId','_threadCommentDataSource','1460496OAYQSK','221295ovGihH','disposeWithMe','stringify','addUser','add','setConfig','_injector','_sessionService','type','rangeType','code','subscribe','342lWzpeQ','root','filter','resolved','updateComment','comment','getUnit','post','requireSession','/universer-api/user/list','42nhHaoM','881783ekwohx','_userService','Edit','UNIVER_UNKNOWN','UNRECOGNIZED','user','deleteComment','threadId','COMMENT','solved','userId','33PpQjPQ'];_0x2c57=function(){return _0x506809;};return _0x2c57();}$(b,'pluginName',W),$(b,_0x35f622(0xca),_0x238f45[_0x35f622(0xdc)]),b=ie([_0x21b651(_0x2a1676,_0x177d49,_0x843546),w(0x1,_0x5ee840(_0x55640e)),w(0x2,_0x3ef499)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x10dd51=_0x11cb;(function(_0x5593fd,_0x39ba53){const _0x38ce01=_0x11cb,_0x6c3ab1=_0x5593fd();while(!![]){try{const _0x25e2d0=-parseInt(_0x38ce01(0x1b2))/0x1+-parseInt(_0x38ce01(0x1d5))/0x2+-parseInt(_0x38ce01(0x1e2))/0x3+-parseInt(_0x38ce01(0x1d7))/0x4*(parseInt(_0x38ce01(0x1ce))/0x5)+parseInt(_0x38ce01(0x1cd))/0x6*(-parseInt(_0x38ce01(0x1c0))/0x7)+-parseInt(_0x38ce01(0x1dd))/0x8+-parseInt(_0x38ce01(0x1d9))/0x9*(-parseInt(_0x38ce01(0x1b7))/0xa);if(_0x25e2d0===_0x39ba53)break;else _0x6c3ab1['push'](_0x6c3ab1['shift']());}catch(_0x549fea){_0x6c3ab1['push'](_0x6c3ab1['shift']());}}}(_0x19f0,0x6e085));import{CommentService as _0x480a02,CollaborationSessionService as _0xa13fb7,UniverCollaborationClientPlugin as _0x349d8d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x46f06c}from'@univerjs-pro/license';import{dayjs as _0x13b06d,UserManagerService as _0x4945be,Inject as _0x2f4fe1,Injector as _0x36f8f1,Disposable as _0x42963d,CustomRangeType as _0x5b13ae,UniverInstanceType as _0x472341,DependentOn as _0x1c23a3,IConfigService as _0x18ac02,Plugin as _0x424e35,merge as _0x3c064f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x589ee4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x33888f,IThreadCommentDataSourceService as _0x2d29f0}from'@univerjs/thread-comment';import{bufferTime as _0x2e1f0d}from'rxjs';import{HTTPService as _0x181eb7}from'@univerjs/network';function _0x11cb(_0x2f1284,_0x4f4a0f){const _0x19f012=_0x19f0();return _0x11cb=function(_0x11cba1,_0x188804){_0x11cba1=_0x11cba1-0x1a0;let _0xa95549=_0x19f012[_0x11cba1];return _0xa95549;},_0x11cb(_0x2f1284,_0x4f4a0f);}const W=_0x10dd51(0x1b3);var I=(_0x26f9dd=>(_0x26f9dd[_0x26f9dd[_0x10dd51(0x1a6)]=0x0]=_0x10dd51(0x1a6),_0x26f9dd[_0x26f9dd[_0x10dd51(0x1ac)]=0x1]=_0x10dd51(0x1ac),_0x26f9dd[_0x26f9dd['UNRECOGNIZED']=-0x1]=_0x10dd51(0x1bb),_0x26f9dd))(I||{}),v=(_0x47478a=>(_0x47478a[_0x47478a['Unknown']=0x0]='Unknown',_0x47478a[_0x47478a[_0x10dd51(0x1ae)]=0x1]='Add',_0x47478a[_0x47478a['Reply']=0x2]='Reply',_0x47478a[_0x47478a['Edit']=0x3]=_0x10dd51(0x1c4),_0x47478a[_0x47478a[_0x10dd51(0x1cc)]=0x4]='Delete',_0x47478a[_0x47478a[_0x10dd51(0x1e4)]=0x5]=_0x10dd51(0x1e4),_0x47478a[_0x47478a[_0x10dd51(0x1bb)]=-0x1]=_0x10dd51(0x1bb),_0x47478a))(v||{});const D=_0x47a61f=>_0x13b06d(new Date(+_0x47a61f))[_0x10dd51(0x1ec)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x2c7438,_0x476874)=>{const _0x39beeb=_0x10dd51,_0x2ec2d8=_0x2c7438[_0x39beeb(0x1dc)](_0x4945be),_0x5e8f3c=_0x2c7438[_0x39beeb(0x1dc)](_0x181eb7);_0x476874['forEach'](_0x33f877=>{const _0xac41ea=_0x39beeb;_0x2ec2d8[_0xac41ea(0x1f3)](_0x33f877)&&_0x476874[_0xac41ea(0x1f2)](_0x33f877);}),_0x476874[_0x39beeb(0x1db)]&&(await _0x5e8f3c[_0x39beeb(0x1dc)](_0x39beeb(0x1b4),{'params':{'userIDs':[..._0x476874]}}))[_0x39beeb(0x1f0)][_0x39beeb(0x1cf)][_0x39beeb(0x1ab)](_0x2988d6=>{const _0x1690dd=_0x39beeb;_0x2988d6&&_0x2ec2d8[_0x1690dd(0x1bd)](_0x2988d6);});};var K=Object[_0x10dd51(0x1a0)],V=(_0x3b975c,_0x3bcd25,_0x293c56,_0x37d013)=>{for(var _0x3ed374=_0x37d013>0x1?void 0x0:_0x37d013?K(_0x3bcd25,_0x293c56):_0x3bcd25,_0x56e7e0=_0x3b975c['length']-0x1,_0x3dbc0f;_0x56e7e0>=0x0;_0x56e7e0--)(_0x3dbc0f=_0x3b975c[_0x56e7e0])&&(_0x3ed374=_0x3dbc0f(_0x3ed374)||_0x3ed374);return _0x3ed374;},p=(_0x416c56,_0x5e3432)=>(_0x1c0c8c,_0x363ac3)=>_0x5e3432(_0x1c0c8c,_0x363ac3,_0x416c56);let S=class extends _0x42963d{constructor(_0x4ce056,_0x18c6c9,_0x1f818b,_0x541540){const _0x195020=_0x10dd51;super(),this['_commentService']=_0x4ce056,this[_0x195020(0x1a2)]=_0x18c6c9,this[_0x195020(0x1ee)]=_0x1f818b,this[_0x195020(0x1cb)]=_0x541540,this[_0x195020(0x1a7)](),this[_0x195020(0x1f7)]();}[_0x10dd51(0x1f7)](){const _0x292770=_0x10dd51;this[_0x292770(0x1de)](this[_0x292770(0x1a2)]['commentUpdate$']['pipe'](_0x2e1f0d(0x10))[_0x292770(0x1e6)](_0x3dbe55=>{const _0x462a7c=_0x292770,_0x2c45a0=new Set();_0x3dbe55['forEach'](_0x16ea0b=>{const _0x557a96=_0x11cb;switch(_0x16ea0b[_0x557a96(0x1f9)]){case _0x557a96(0x1e0):{const _0x3473a8=_0x16ea0b['payload']['personId'];_0x2c45a0[_0x557a96(0x1e0)](_0x3473a8);break;}}}),B(this[_0x462a7c(0x1cb)],_0x2c45a0);}));}[_0x10dd51(0x1a7)](){const _0x1c5778=_0x10dd51;this['disposeWithMe'](this[_0x1c5778(0x1eb)][_0x1c5778(0x1b5)][_0x1c5778(0x1e6)](async _0x32de80=>{const _0x222337=_0x1c5778;var _0x351913,_0x5e3a57,_0x5046df,_0x447723;const _0xca006d=(_0x351913=this[_0x222337(0x1a2)][_0x222337(0x1f5)](_0x32de80[_0x222337(0x1a8)])[_0x222337(0x1d1)](_0x48932e=>_0x48932e[_0x222337(0x1fa)]===_0x32de80[_0x222337(0x1fa)]))==null?void 0x0:_0x351913['root'];if(!_0xca006d)return;const {unitId:_0x2e0029,subUnitId:_0x42d124}=_0xca006d;switch(_0x32de80[_0x222337(0x1c9)]&&this['_userService'][_0x222337(0x1bd)](_0x32de80[_0x222337(0x1c9)]),_0x32de80[_0x222337(0x1f9)]){case v[_0x222337(0x1ae)]:break;case v[_0x222337(0x1d4)]:{this[_0x222337(0x1a2)][_0x222337(0x1be)](_0x2e0029,_0x42d124,{'unitId':_0x2e0029,'subUnitId':_0x42d124,'ref':'','id':_0x32de80[_0x222337(0x1a5)],'dT':D(+_0x32de80[_0x222337(0x1b1)]),'threadId':_0x32de80[_0x222337(0x1fa)],'personId':(_0x5046df=(_0x5e3a57=_0x32de80[_0x222337(0x1c9)])==null?void 0x0:_0x5e3a57['userID'])!=null?_0x5046df:_0x32de80[_0x222337(0x1ea)],'text':JSON[_0x222337(0x1ff)](_0x32de80['content']),'parentId':_0xca006d['id']});break;}case v[_0x222337(0x1cc)]:{const _0x4bed65=this[_0x222337(0x1a2)][_0x222337(0x1ad)](_0x2e0029,_0x42d124,_0x32de80[_0x222337(0x1a5)]);_0x4bed65&&_0x4bed65[_0x222337(0x1f8)]&&this[_0x222337(0x1a2)][_0x222337(0x1fd)](_0x2e0029,_0x42d124,_0x32de80['replyId']);break;}case v[_0x222337(0x1c4)]:{this[_0x222337(0x1a2)][_0x222337(0x1df)](_0x2e0029,_0x42d124,{'commentId':_0x32de80[_0x222337(0x1a5)],'text':JSON[_0x222337(0x1ff)](_0x32de80[_0x222337(0x1a3)])});break;}case v[_0x222337(0x1e4)]:{const _0x3bf972=(_0x447723=this[_0x222337(0x1a2)][_0x222337(0x1f5)](_0x32de80['unitId'])[_0x222337(0x1d1)](_0xc63f0d=>_0xc63f0d[_0x222337(0x1fa)]===_0x32de80['threadId']))==null?void 0x0:_0x447723[_0x222337(0x1fb)];_0x3bf972&&this[_0x222337(0x1a2)][_0x222337(0x1c1)](_0x2e0029,_0x42d124,_0x3bf972['id'],_0x32de80['solved']===I[_0x222337(0x1ac)]);break;}}}));}};S=V([p(0x0,_0x2f4fe1(_0x480a02)),p(0x1,_0x2f4fe1(_0x33888f)),p(0x2,_0x2f4fe1(_0x4945be)),p(0x3,_0x2f4fe1(_0x36f8f1))],S);const z=_0x10dd51(0x1c8),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5107cd,_0x4540ab,_0x3dc2d2,_0x34b0d2)=>{const _0x104726=_0x10dd51;for(var _0x576fe5=_0x34b0d2>0x1?void 0x0:_0x34b0d2?k(_0x4540ab,_0x3dc2d2):_0x4540ab,_0x950792=_0x5107cd[_0x104726(0x1ba)]-0x1,_0x673bac;_0x950792>=0x0;_0x950792--)(_0x673bac=_0x5107cd[_0x950792])&&(_0x576fe5=_0x673bac(_0x576fe5)||_0x576fe5);return _0x576fe5;},_=(_0x2be1fb,_0x2c3fcc)=>(_0x29ae54,_0xef4bc)=>_0x2c3fcc(_0x29ae54,_0xef4bc,_0x2be1fb);function X(_0x5a3b0f,_0x19c30e){const _0x2cfd35=_0x10dd51,_0x39bafd=_0x5a3b0f[_0x2cfd35(0x1bc)][0x0];return{..._0x19c30e,'id':_0x39bafd[_0x2cfd35(0x1a5)],'resolved':_0x5a3b0f[_0x2cfd35(0x1a9)]===0x1,'dT':D(_0x39bafd['createTimestamp']),'personId':_0x39bafd['userId'],'threadId':_0x39bafd[_0x2cfd35(0x1fa)]};}function _0x19f0(){const _0xfb680b=['_userService','filter','body','symbol','delete','getUser','reply','getUnit','_configService','_initUserSync','parentId','type','threadId','root','ref','deleteComment','comment','parse','getOwnPropertyDescriptor','_threadCommentDataSourceService','_threadCommentModel','content','post','replyId','OpenOrReOpen','_init','unitId','solved','rangeType','forEach','Solved','getComment','Add','pluginName','_httpService','createTimestamp','38524TSZSNL','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/universer-api/user/list','commentUpdate$','COMMENT','10xvRKow','saveCommentToSnapshot','requireSession','length','UNRECOGNIZED','replies','addUser','addComment','getMemberID','7cIeESQ','resolveComment','values','getCurrentUser','Edit','onStarting','comments','setConfig','thread-comment-data-source.config','user','/add','_injector','Delete','1119918FkAfKu','3585ENSGRb','users','customRanges','find','map','/delete','Reply','1264864IWwLUa','/reply','4196LvXbnw','_config','27951543SnPJcQ','rangeId','size','get','3171544HcFjPy','disposeWithMe','updateComment','add','error','1946547RGVrHi','_threadCommentDataSource','Solve','_initDataSource','subscribe','_sessionService','defineProperty','/universer-api/comment/unit/','userId','_commentService','format','code'];_0x19f0=function(){return _0xfb680b;};return _0x19f0();}function ee(_0x21dbfb,_0x3f0b9e,_0x102120){const _0x2bc455=_0x10dd51;var _0x4b7ba9,_0x4431b5;if(((_0x4431b5=(_0x4b7ba9=_0x21dbfb==null?void 0x0:_0x21dbfb[_0x2bc455(0x1bc)])==null?void 0x0:_0x4b7ba9[_0x2bc455(0x1ba)])!=null?_0x4431b5:0x0)>0x0){const _0x4a8e0c=(_0x1c5b0a,_0x34b27d)=>({'id':_0x1c5b0a[_0x2bc455(0x1a5)],'threadId':_0x1c5b0a[_0x2bc455(0x1fa)],'dT':D(_0x1c5b0a[_0x2bc455(0x1b1)]),'personId':_0x1c5b0a[_0x2bc455(0x1ea)],'resolved':_0x21dbfb[_0x2bc455(0x1a9)]===I['Solved'],'unitId':_0x3f0b9e,'subUnitId':_0x102120,'text':JSON[_0x2bc455(0x1ff)](_0x1c5b0a[_0x2bc455(0x1a3)]),'parentId':_0x34b27d}),_0x465812=_0x4a8e0c(_0x21dbfb[_0x2bc455(0x1bc)][0x0]);return{..._0x465812,'children':_0x21dbfb[_0x2bc455(0x1bc)]['slice'](0x1)['map'](_0x40a8d5=>_0x4a8e0c(_0x40a8d5,_0x465812['id']))};}return null;}let f=class{constructor(_0x34854e,_0x4f12e8,_0x212f20,_0x307da2){const _0x3f16fd=_0x10dd51;this[_0x3f16fd(0x1b0)]=_0x34854e,this[_0x3f16fd(0x1ee)]=_0x4f12e8,this[_0x3f16fd(0x1e7)]=_0x212f20,this[_0x3f16fd(0x1cb)]=_0x307da2;}async[_0x10dd51(0x1be)](_0x1b730b){const _0x5ac165=_0x10dd51;var _0x1ad724,_0x474259;const {parentId:_0xd17921,unitId:_0x4e0ab2,text:_0x430c78,threadId:_0x879d1f}=_0x1b730b,_0x237901=(_0x474259=(_0x1ad724=_0x430c78['customRanges'])==null?void 0x0:_0x1ad724[_0x5ac165(0x1ef)](_0x188c49=>_0x188c49[_0x5ac165(0x1aa)]===_0x5b13ae['COMMENT'])[_0x5ac165(0x1d2)](_0x48dd16=>_0x48dd16[_0x5ac165(0x1da)]))!=null?_0x474259:[],_0x10521c=JSON['stringify'](_0x430c78),_0x59c8c1=(await this[_0x5ac165(0x1e7)][_0x5ac165(0x1b9)](_0x4e0ab2))[_0x5ac165(0x1bf)]();if(_0xd17921){const _0x36f6fd={'memberId':_0x59c8c1,'unitId':_0x4e0ab2,'content':_0x10521c,'mention':_0x237901,'threadId':_0x879d1f},_0x194a8b=(await this[_0x5ac165(0x1b0)][_0x5ac165(0x1a4)](_0x5ac165(0x1e9)+_0x4e0ab2+_0x5ac165(0x1d6),{'body':_0x36f6fd}))[_0x5ac165(0x1f0)][_0x5ac165(0x1f4)];return{..._0x1b730b,'id':_0x194a8b[_0x5ac165(0x1a5)],'dT':_0x13b06d(+_0x194a8b[_0x5ac165(0x1b1)])[_0x5ac165(0x1ec)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x194a8b[_0x5ac165(0x1ea)]};}else{const _0x100bd8={'memberId':_0x59c8c1,'unitId':_0x4e0ab2,'content':_0x10521c,'mention':_0x237901},_0x3a3d93=await this[_0x5ac165(0x1b0)][_0x5ac165(0x1a4)]('/universer-api/comment/unit/'+_0x4e0ab2+_0x5ac165(0x1ca),{'body':_0x100bd8});return X(_0x3a3d93[_0x5ac165(0x1f0)][_0x5ac165(0x1fe)],_0x1b730b);}}async[_0x10dd51(0x1df)](_0x5d22ad){const _0x5925fa=_0x10dd51;var _0x5dcf4a,_0x42696d;const {text:_0x36b18c,unitId:_0xa798c5}=_0x5d22ad,_0xe68161=(_0x42696d=(_0x5dcf4a=_0x36b18c[_0x5925fa(0x1d0)])==null?void 0x0:_0x5dcf4a[_0x5925fa(0x1ef)](_0x12bbf8=>_0x12bbf8[_0x5925fa(0x1aa)]===_0x5b13ae[_0x5925fa(0x1b6)])['map'](_0x56f75f=>_0x56f75f['rangeId']))!=null?_0x42696d:[],_0x3a0ec8=JSON['stringify'](_0x36b18c),_0x277e88=_0x5d22ad[_0x5925fa(0x1fa)],_0x5b7b17=_0x5d22ad['id'],_0x28f7df={'memberId':(await this[_0x5925fa(0x1e7)][_0x5925fa(0x1b9)](_0xa798c5))['getMemberID'](),'unitId':_0xa798c5,'threadId':_0x277e88,'mention':_0xe68161,'content':_0x3a0ec8,'replyId':_0x5b7b17},_0x1b15af=await this[_0x5925fa(0x1b0)][_0x5925fa(0x1a4)](_0x5925fa(0x1e9)+_0xa798c5+'/edit',{'body':_0x28f7df});return!_0x1b15af['body'][_0x5925fa(0x1e1)]||_0x1b15af[_0x5925fa(0x1f0)][_0x5925fa(0x1e1)][_0x5925fa(0x1ed)]===0x1;}async['resolveComment'](_0x553a18){const _0x5b20be=_0x10dd51,{unitId:_0x4a9933}=_0x553a18,_0x169aed=_0x553a18['threadId'],_0x5cf1f5={'memberId':this[_0x5b20be(0x1ee)][_0x5b20be(0x1c3)]()['userID'],'unitId':_0x4a9933,'threadId':_0x169aed,'solved':_0x553a18['resolved']?I[_0x5b20be(0x1ac)]:I['OpenOrReOpen']},_0xe6ad43=await this[_0x5b20be(0x1b0)][_0x5b20be(0x1a4)]('/universer-api/comment/unit/'+_0x4a9933+'/solved',{'body':_0x5cf1f5});return!_0xe6ad43[_0x5b20be(0x1f0)]['error']||_0xe6ad43[_0x5b20be(0x1f0)]['error'][_0x5b20be(0x1ed)]===0x1;}async[_0x10dd51(0x1fd)](_0x31f4ea,_0x2b351f,_0x423d3d,_0x5647ce){const _0x4fc712=_0x10dd51,_0x59f71b={'memberId':(await this[_0x4fc712(0x1e7)][_0x4fc712(0x1b9)](_0x31f4ea))['getMemberID'](),'threadId':_0x423d3d,'replyId':_0x5647ce,'unitId':_0x31f4ea},_0x3089c0=await this[_0x4fc712(0x1b0)]['post'](_0x4fc712(0x1e9)+_0x31f4ea+_0x4fc712(0x1d3),{'body':_0x59f71b});return!_0x3089c0['body']['error']||_0x3089c0['body'][_0x4fc712(0x1e1)][_0x4fc712(0x1ed)]===0x1;}async['listComments'](_0x16e185,_0x25a2ff,_0x26c951){const _0x56ef58=_0x10dd51,_0x1415d6={'unitId':_0x16e185,'threadId':_0x26c951},_0xdb5897=await this[_0x56ef58(0x1b0)][_0x56ef58(0x1a4)](_0x56ef58(0x1e9)+_0x16e185+'/list',{'body':_0x1415d6}),_0x14f46d=_0x26c951[_0x56ef58(0x1d2)](_0x11f78b=>ee(_0xdb5897[_0x56ef58(0x1f0)][_0x56ef58(0x1c6)][_0x11f78b],_0x16e185,_0x25a2ff))[_0x56ef58(0x1ef)](Boolean);return Object[_0x56ef58(0x1c2)](_0xdb5897['body']['users'])[_0x56ef58(0x1ab)](_0x39532c=>{const _0x347fc1=_0x56ef58;this[_0x347fc1(0x1ee)]['addUser'](_0x39532c);}),_0x14f46d;}[_0x10dd51(0x1b8)](_0x3c7911){const _0x180999=_0x10dd51;return{'id':_0x3c7911['id'],'threadId':_0x3c7911['threadId'],'ref':_0x3c7911[_0x180999(0x1fc)]};}};f=Q([_(0x0,_0x2f4fe1(_0x181eb7)),_(0x1,_0x2f4fe1(_0x4945be)),_(0x2,_0x2f4fe1(_0xa13fb7)),_(0x3,_0x2f4fe1(_0x36f8f1))],f);var re=Object[_0x10dd51(0x1a0)],te=(_0x2e3938,_0x520446,_0x12145a,_0x4cface)=>{const _0x5dd3fc=_0x10dd51;for(var _0x27befd=_0x4cface>0x1?void 0x0:_0x4cface?re(_0x520446,_0x12145a):_0x520446,_0x226c48=_0x2e3938[_0x5dd3fc(0x1ba)]-0x1,_0x482e6a;_0x226c48>=0x0;_0x226c48--)(_0x482e6a=_0x2e3938[_0x226c48])&&(_0x27befd=_0x482e6a(_0x27befd)||_0x27befd);return _0x27befd;},N=(_0x17c323,_0x443b7d)=>(_0x10196c,_0x20f974)=>_0x443b7d(_0x10196c,_0x20f974,_0x17c323);let g=class extends _0x42963d{constructor(_0x331994,_0x1196dd){const _0x144bdd=_0x10dd51;super(),this['_threadCommentDataSourceService']=_0x331994,this['_threadCommentDataSource']=_0x1196dd,this[_0x144bdd(0x1e5)]();}['_initDataSource'](){const _0x4e0553=_0x10dd51;this[_0x4e0553(0x1a1)]['dataSource']=this[_0x4e0553(0x1e3)],this[_0x4e0553(0x1a1)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x2d29f0),N(0x1,_0x2f4fe1(f))],g);var se=Object[_0x10dd51(0x1e8)],oe=Object[_0x10dd51(0x1a0)],ne=(_0x543418,_0x21c9ac,_0x25fac4)=>_0x21c9ac in _0x543418?se(_0x543418,_0x21c9ac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x25fac4}):_0x543418[_0x21c9ac]=_0x25fac4,ie=(_0x5f0bb1,_0x24b37f,_0x561555,_0xaba4b1)=>{const _0x2eb2a8=_0x10dd51;for(var _0x5d1f8a=_0xaba4b1>0x1?void 0x0:_0xaba4b1?oe(_0x24b37f,_0x561555):_0x24b37f,_0x1261f3=_0x5f0bb1[_0x2eb2a8(0x1ba)]-0x1,_0x550eaf;_0x1261f3>=0x0;_0x1261f3--)(_0x550eaf=_0x5f0bb1[_0x1261f3])&&(_0x5d1f8a=_0x550eaf(_0x5d1f8a)||_0x5d1f8a);return _0x5d1f8a;},w=(_0x118886,_0x4fd5f0)=>(_0x1518c9,_0x4e069a)=>_0x4fd5f0(_0x1518c9,_0x4e069a,_0x118886),$=(_0x5571b2,_0x275438,_0x113773)=>ne(_0x5571b2,typeof _0x275438!=_0x10dd51(0x1f1)?_0x275438+'':_0x275438,_0x113773);let b=class extends _0x424e35{constructor(_0x3ea8dd=M,_0x56b00e,_0x3fb8a7){const _0x1ced53=_0x10dd51;super(),this[_0x1ced53(0x1d8)]=_0x3ea8dd,this[_0x1ced53(0x1cb)]=_0x56b00e,this[_0x1ced53(0x1f6)]=_0x3fb8a7;const {..._0x4a2325}=_0x3c064f({},M,this[_0x1ced53(0x1d8)]);this[_0x1ced53(0x1f6)][_0x1ced53(0x1c7)](z,_0x4a2325);}[_0x10dd51(0x1c5)](){[[f],[g],[S]]['forEach'](_0x58b7fa=>{const _0x422f4e=_0x11cb;this[_0x422f4e(0x1cb)][_0x422f4e(0x1e0)](_0x58b7fa);});}['onReady'](){const _0x127c24=_0x10dd51;this[_0x127c24(0x1cb)][_0x127c24(0x1dc)](g),this[_0x127c24(0x1cb)]['get'](S);}};$(b,_0x10dd51(0x1af),W),$(b,_0x10dd51(0x1f9),_0x472341['UNIVER_UNKNOWN']),b=ie([_0x1c23a3(_0x589ee4,_0x349d8d,_0x46f06c),w(0x1,_0x2f4fe1(_0x36f8f1)),w(0x2,_0x18ac02)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x35f622=_0x5cab;(function(_0x1b2cd9,_0x5da74d){const _0x5e12c8=_0x5cab,_0x25c4c3=_0x1b2cd9();while(!![]){try{const _0x5dcee1=-parseInt(_0x5e12c8(0xbb))/0x1+-parseInt(_0x5e12c8(0x8c))/0x2*(-parseInt(_0x5e12c8(0xe4))/0x3)+parseInt(_0x5e12c8(0xc1))/0x4+parseInt(_0x5e12c8(0xc2))/0x5*(-parseInt(_0x5e12c8(0xd8))/0x6)+-parseInt(_0x5e12c8(0xd9))/0x7+-parseInt(_0x5e12c8(0xb3))/0x8+parseInt(_0x5e12c8(0xce))/0x9*(parseInt(_0x5e12c8(0xa7))/0xa);if(_0x5dcee1===_0x5da74d)break;else _0x25c4c3['push'](_0x25c4c3['shift']());}catch(_0x2f75ac){_0x25c4c3['push'](_0x25c4c3['shift']());}}}(_0x2c57,0x4359b));import{CommentService as _0x4b60cb,CollaborationSessionService as _0x2c2f5a,UniverCollaborationClientPlugin as _0x177d49}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x843546}from'@univerjs-pro/license';import{dayjs as _0x269791,UserManagerService as _0x1ff591,Inject as _0x5ee840,Injector as _0x55640e,Disposable as _0x2b7514,CustomRangeType as _0x335bcd,UniverInstanceType as _0x238f45,DependentOn as _0x21b651,IConfigService as _0x3ef499,Plugin as _0x223b2b,merge as _0x20f8a7}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2a1676}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x147ce0,IThreadCommentDataSourceService as _0x217b63}from'@univerjs/thread-comment';import{bufferTime as _0x1f8f94}from'rxjs';import{HTTPService as _0x714c0}from'@univerjs/network';const W=_0x35f622(0xad);var I=(_0x39faa5=>(_0x39faa5[_0x39faa5[_0x35f622(0x93)]=0x0]=_0x35f622(0x93),_0x39faa5[_0x39faa5[_0x35f622(0xa9)]=0x1]=_0x35f622(0xa9),_0x39faa5[_0x39faa5[_0x35f622(0xdd)]=-0x1]=_0x35f622(0xdd),_0x39faa5))(I||{}),v=(_0x21e2cc=>(_0x21e2cc[_0x21e2cc[_0x35f622(0xaa)]=0x0]=_0x35f622(0xaa),_0x21e2cc[_0x21e2cc[_0x35f622(0x94)]=0x1]=_0x35f622(0x94),_0x21e2cc[_0x21e2cc[_0x35f622(0xb1)]=0x2]=_0x35f622(0xb1),_0x21e2cc[_0x21e2cc[_0x35f622(0xdb)]=0x3]=_0x35f622(0xdb),_0x21e2cc[_0x21e2cc[_0x35f622(0xbe)]=0x4]=_0x35f622(0xbe),_0x21e2cc[_0x21e2cc[_0x35f622(0xa3)]=0x5]=_0x35f622(0xa3),_0x21e2cc[_0x21e2cc[_0x35f622(0xdd)]=-0x1]=_0x35f622(0xdd),_0x21e2cc))(v||{});const D=_0x2995a0=>_0x269791(new Date(+_0x2995a0))['format'](_0x35f622(0x89)),B=async(_0x541115,_0x2e973b)=>{const _0x5df6e6=_0x35f622,_0x334860=_0x541115[_0x5df6e6(0x99)](_0x1ff591),_0x27f671=_0x541115[_0x5df6e6(0x99)](_0x714c0);_0x2e973b[_0x5df6e6(0x81)](_0x372532=>{const _0x3e2d9f=_0x5df6e6;_0x334860[_0x3e2d9f(0x8d)](_0x372532)&&_0x2e973b[_0x3e2d9f(0x9a)](_0x372532);}),_0x2e973b[_0x5df6e6(0x90)]&&(await _0x27f671[_0x5df6e6(0x99)](_0x5df6e6(0xd7),{'params':{'userIDs':[..._0x2e973b]}}))[_0x5df6e6(0x9d)]['users'][_0x5df6e6(0x81)](_0x152cac=>{_0x152cac&&_0x334860['addUser'](_0x152cac);});};function _0x5cab(_0x386b70,_0x459290){const _0x2c57e9=_0x2c57();return _0x5cab=function(_0x5cabe5,_0x2f8474){_0x5cabe5=_0x5cabe5-0x81;let _0x362657=_0x2c57e9[_0x5cabe5];return _0x362657;},_0x5cab(_0x386b70,_0x459290);}var K=Object['getOwnPropertyDescriptor'],V=(_0x5ac705,_0x5d4635,_0x1f923a,_0x3c3872)=>{for(var _0x297b77=_0x3c3872>0x1?void 0x0:_0x3c3872?K(_0x5d4635,_0x1f923a):_0x5d4635,_0x128eab=_0x5ac705['length']-0x1,_0x2510fe;_0x128eab>=0x0;_0x128eab--)(_0x2510fe=_0x5ac705[_0x128eab])&&(_0x297b77=_0x2510fe(_0x297b77)||_0x297b77);return _0x297b77;},p=(_0x38df0a,_0x58cec8)=>(_0x1a5010,_0x47a2e1)=>_0x58cec8(_0x1a5010,_0x47a2e1,_0x38df0a);let S=class extends _0x2b7514{constructor(_0x570cf4,_0x5e05f7,_0x5cd1c4,_0x22773a){const _0x56268c=_0x35f622;super(),this['_commentService']=_0x570cf4,this['_threadCommentModel']=_0x5e05f7,this[_0x56268c(0xda)]=_0x5cd1c4,this[_0x56268c(0xc8)]=_0x22773a,this['_init'](),this[_0x56268c(0xa2)]();}[_0x35f622(0xa2)](){const _0xb40629=_0x35f622;this[_0xb40629(0xc3)](this['_threadCommentModel'][_0xb40629(0x83)][_0xb40629(0x9e)](_0x1f8f94(0x10))[_0xb40629(0xcd)](_0xba17da=>{const _0x558794=_0xb40629,_0x1b9e9b=new Set();_0xba17da[_0x558794(0x81)](_0x23f262=>{const _0x224239=_0x558794;switch(_0x23f262[_0x224239(0xca)]){case'add':{const _0x758cd2=_0x23f262[_0x224239(0xb4)]['personId'];_0x1b9e9b[_0x224239(0xc6)](_0x758cd2);break;}}}),B(this['_injector'],_0x1b9e9b);}));}['_init'](){const _0x352833=_0x35f622;this[_0x352833(0xc3)](this['_commentService']['commentUpdate$'][_0x352833(0xcd)](async _0x49a8a0=>{const _0xcddc8e=_0x352833;var _0x494bd6,_0x3d17b9,_0x58449a,_0x368fbe;const _0x4acafd=(_0x494bd6=this[_0xcddc8e(0x9c)][_0xcddc8e(0xd4)](_0x49a8a0['unitId'])[_0xcddc8e(0x9f)](_0x2961d2=>_0x2961d2[_0xcddc8e(0xe0)]===_0x49a8a0['threadId']))==null?void 0x0:_0x494bd6[_0xcddc8e(0xcf)];if(!_0x4acafd)return;const {unitId:_0x3efa35,subUnitId:_0x266c46}=_0x4acafd;switch(_0x49a8a0[_0xcddc8e(0xde)]&&this[_0xcddc8e(0xda)][_0xcddc8e(0xc5)](_0x49a8a0[_0xcddc8e(0xde)]),_0x49a8a0[_0xcddc8e(0xca)]){case v[_0xcddc8e(0x94)]:break;case v['Reply']:{this[_0xcddc8e(0x9c)][_0xcddc8e(0x8e)](_0x3efa35,_0x266c46,{'unitId':_0x3efa35,'subUnitId':_0x266c46,'ref':'','id':_0x49a8a0[_0xcddc8e(0x92)],'dT':D(+_0x49a8a0[_0xcddc8e(0x86)]),'threadId':_0x49a8a0[_0xcddc8e(0xe0)],'personId':(_0x58449a=(_0x3d17b9=_0x49a8a0['user'])==null?void 0x0:_0x3d17b9['userID'])!=null?_0x58449a:_0x49a8a0[_0xcddc8e(0xe3)],'text':JSON[_0xcddc8e(0xb9)](_0x49a8a0[_0xcddc8e(0xa4)]),'parentId':_0x4acafd['id']});break;}case v[_0xcddc8e(0xbe)]:{const _0x4fb529=this[_0xcddc8e(0x9c)][_0xcddc8e(0x95)](_0x3efa35,_0x266c46,_0x49a8a0[_0xcddc8e(0x92)]);_0x4fb529&&_0x4fb529[_0xcddc8e(0x91)]&&this[_0xcddc8e(0x9c)][_0xcddc8e(0xdf)](_0x3efa35,_0x266c46,_0x49a8a0[_0xcddc8e(0x92)]);break;}case v[_0xcddc8e(0xdb)]:{this['_threadCommentModel']['updateComment'](_0x3efa35,_0x266c46,{'commentId':_0x49a8a0['replyId'],'text':JSON[_0xcddc8e(0xb9)](_0x49a8a0[_0xcddc8e(0xa4)])});break;}case v[_0xcddc8e(0xa3)]:{const _0x5e89a2=(_0x368fbe=this[_0xcddc8e(0x9c)][_0xcddc8e(0xd4)](_0x49a8a0[_0xcddc8e(0xbf)])['find'](_0x11bb12=>_0x11bb12[_0xcddc8e(0xe0)]===_0x49a8a0[_0xcddc8e(0xe0)]))==null?void 0x0:_0x368fbe[_0xcddc8e(0xcf)];_0x5e89a2&&this['_threadCommentModel'][_0xcddc8e(0x98)](_0x3efa35,_0x266c46,_0x5e89a2['id'],_0x49a8a0[_0xcddc8e(0xe2)]===I[_0xcddc8e(0xa9)]);break;}}}));}};S=V([p(0x0,_0x5ee840(_0x4b60cb)),p(0x1,_0x5ee840(_0x147ce0)),p(0x2,_0x5ee840(_0x1ff591)),p(0x3,_0x5ee840(_0x55640e))],S);const z=_0x35f622(0x82),M={};var k=Object[_0x35f622(0xac)],Q=(_0x51f97a,_0x1a5fc2,_0xbd56b3,_0x5bdb05)=>{const _0x750660=_0x35f622;for(var _0x4335aa=_0x5bdb05>0x1?void 0x0:_0x5bdb05?k(_0x1a5fc2,_0xbd56b3):_0x1a5fc2,_0x36f690=_0x51f97a[_0x750660(0xa5)]-0x1,_0x34cdc5;_0x36f690>=0x0;_0x36f690--)(_0x34cdc5=_0x51f97a[_0x36f690])&&(_0x4335aa=_0x34cdc5(_0x4335aa)||_0x4335aa);return _0x4335aa;},_=(_0x361dc2,_0x3367bf)=>(_0x28b89f,_0x3b2cf2)=>_0x3367bf(_0x28b89f,_0x3b2cf2,_0x361dc2);function X(_0x2c1ede,_0x33ce9a){const _0xc1602f=_0x35f622,_0x594c51=_0x2c1ede[_0xc1602f(0xba)][0x0];return{..._0x33ce9a,'id':_0x594c51[_0xc1602f(0x92)],'resolved':_0x2c1ede[_0xc1602f(0xe2)]===0x1,'dT':D(_0x594c51['createTimestamp']),'personId':_0x594c51[_0xc1602f(0xe3)],'threadId':_0x594c51['threadId']};}function ee(_0x437eca,_0x28fd3d,_0x44ea4d){const _0x70b55a=_0x35f622;var _0x1b5ba5,_0x5c2b03;if(((_0x5c2b03=(_0x1b5ba5=_0x437eca==null?void 0x0:_0x437eca['replies'])==null?void 0x0:_0x1b5ba5[_0x70b55a(0xa5)])!=null?_0x5c2b03:0x0)>0x0){const _0x27af79=(_0x368a0b,_0x38a8f7)=>({'id':_0x368a0b[_0x70b55a(0x92)],'threadId':_0x368a0b[_0x70b55a(0xe0)],'dT':D(_0x368a0b[_0x70b55a(0x86)]),'personId':_0x368a0b[_0x70b55a(0xe3)],'resolved':_0x437eca['solved']===I[_0x70b55a(0xa9)],'unitId':_0x28fd3d,'subUnitId':_0x44ea4d,'text':JSON['parse'](_0x368a0b[_0x70b55a(0xa4)]),'parentId':_0x38a8f7}),_0x55d0f9=_0x27af79(_0x437eca[_0x70b55a(0xba)][0x0]);return{..._0x55d0f9,'children':_0x437eca[_0x70b55a(0xba)]['slice'](0x1)[_0x70b55a(0xaf)](_0x2b954e=>_0x27af79(_0x2b954e,_0x55d0f9['id']))};}return null;}let f=class{constructor(_0x50d33a,_0x58f5aa,_0x3cc0da,_0x5b7c6f){const _0x227f70=_0x35f622;this[_0x227f70(0x88)]=_0x50d33a,this[_0x227f70(0xda)]=_0x58f5aa,this[_0x227f70(0xc9)]=_0x3cc0da,this[_0x227f70(0xc8)]=_0x5b7c6f;}async[_0x35f622(0x8e)](_0x3dfab8){const _0x3b023e=_0x35f622;var _0x489ca1,_0x5d253c;const {parentId:_0x2b435e,unitId:_0x5e4185,text:_0x4fdf6c,threadId:_0x461cfa}=_0x3dfab8,_0x4dbb01=(_0x5d253c=(_0x489ca1=_0x4fdf6c['customRanges'])==null?void 0x0:_0x489ca1['filter'](_0x5dc21f=>_0x5dc21f['rangeType']===_0x335bcd[_0x3b023e(0xe1)])['map'](_0x126094=>_0x126094[_0x3b023e(0x8b)]))!=null?_0x5d253c:[],_0x4d8b07=JSON[_0x3b023e(0xc4)](_0x4fdf6c),_0x5a0ca8=(await this[_0x3b023e(0xc9)][_0x3b023e(0xd6)](_0x5e4185))['getMemberID']();if(_0x2b435e){const _0x1342bc={'memberId':_0x5a0ca8,'unitId':_0x5e4185,'content':_0x4d8b07,'mention':_0x4dbb01,'threadId':_0x461cfa},_0x3f970e=(await this['_httpService']['post'](_0x3b023e(0xa8)+_0x5e4185+_0x3b023e(0x85),{'body':_0x1342bc}))['body'][_0x3b023e(0xb5)];return{..._0x3dfab8,'id':_0x3f970e[_0x3b023e(0x92)],'dT':_0x269791(+_0x3f970e['createTimestamp'])[_0x3b023e(0xa0)](_0x3b023e(0x89)),'personId':_0x3f970e['userId']};}else{const _0x37544c={'memberId':_0x5a0ca8,'unitId':_0x5e4185,'content':_0x4d8b07,'mention':_0x4dbb01},_0x2d65a1=await this[_0x3b023e(0x88)]['post'](_0x3b023e(0xa8)+_0x5e4185+_0x3b023e(0x8f),{'body':_0x37544c});return X(_0x2d65a1['body'][_0x3b023e(0xd3)],_0x3dfab8);}}async[_0x35f622(0xd2)](_0x271465){const _0x267123=_0x35f622;var _0x3450c0,_0xc95b20;const {text:_0xe2305,unitId:_0x40a3f7}=_0x271465,_0x322750=(_0xc95b20=(_0x3450c0=_0xe2305[_0x267123(0xb8)])==null?void 0x0:_0x3450c0[_0x267123(0xd0)](_0x255c73=>_0x255c73[_0x267123(0xcb)]===_0x335bcd[_0x267123(0xe1)])[_0x267123(0xaf)](_0x518cd2=>_0x518cd2[_0x267123(0x8b)]))!=null?_0xc95b20:[],_0x4509ea=JSON[_0x267123(0xc4)](_0xe2305),_0x3e4068=_0x271465[_0x267123(0xe0)],_0x10bd8e=_0x271465['id'],_0x466d52={'memberId':(await this[_0x267123(0xc9)][_0x267123(0xd6)](_0x40a3f7))[_0x267123(0xbd)](),'unitId':_0x40a3f7,'threadId':_0x3e4068,'mention':_0x322750,'content':_0x4509ea,'replyId':_0x10bd8e},_0x547eba=await this[_0x267123(0x88)][_0x267123(0xd5)](_0x267123(0xa8)+_0x40a3f7+'/edit',{'body':_0x466d52});return!_0x547eba['body'][_0x267123(0xae)]||_0x547eba[_0x267123(0x9d)][_0x267123(0xae)]['code']===0x1;}async[_0x35f622(0x98)](_0x1fe854){const _0x177aa2=_0x35f622,{unitId:_0x5b7442}=_0x1fe854,_0x3651a8=_0x1fe854[_0x177aa2(0xe0)],_0x3db9a4={'memberId':this['_userService']['getCurrentUser']()[_0x177aa2(0xab)],'unitId':_0x5b7442,'threadId':_0x3651a8,'solved':_0x1fe854[_0x177aa2(0xd1)]?I[_0x177aa2(0xa9)]:I[_0x177aa2(0x93)]},_0x53c279=await this[_0x177aa2(0x88)][_0x177aa2(0xd5)](_0x177aa2(0xa8)+_0x5b7442+'/solved',{'body':_0x3db9a4});return!_0x53c279[_0x177aa2(0x9d)][_0x177aa2(0xae)]||_0x53c279[_0x177aa2(0x9d)][_0x177aa2(0xae)][_0x177aa2(0xcc)]===0x1;}async['deleteComment'](_0x447493,_0x115e7e,_0x82e5d5,_0xd1caa0){const _0xa38f44=_0x35f622,_0x4e78a1={'memberId':(await this[_0xa38f44(0xc9)][_0xa38f44(0xd6)](_0x447493))[_0xa38f44(0xbd)](),'threadId':_0x82e5d5,'replyId':_0xd1caa0,'unitId':_0x447493},_0x18f034=await this['_httpService'][_0xa38f44(0xd5)](_0xa38f44(0xa8)+_0x447493+_0xa38f44(0xb7),{'body':_0x4e78a1});return!_0x18f034[_0xa38f44(0x9d)][_0xa38f44(0xae)]||_0x18f034[_0xa38f44(0x9d)][_0xa38f44(0xae)]['code']===0x1;}async[_0x35f622(0xa6)](_0x3d9b36,_0x6d5352,_0x2b5ad7){const _0x3c37cf=_0x35f622,_0x1fd422={'unitId':_0x3d9b36,'threadId':_0x2b5ad7},_0x4aa0ad=await this[_0x3c37cf(0x88)][_0x3c37cf(0xd5)](_0x3c37cf(0xa8)+_0x3d9b36+_0x3c37cf(0xbc),{'body':_0x1fd422}),_0xbc15c6=_0x2b5ad7[_0x3c37cf(0xaf)](_0xce2053=>ee(_0x4aa0ad[_0x3c37cf(0x9d)][_0x3c37cf(0xb6)][_0xce2053],_0x3d9b36,_0x6d5352))[_0x3c37cf(0xd0)](Boolean);return Object['values'](_0x4aa0ad['body'][_0x3c37cf(0x97)])[_0x3c37cf(0x81)](_0x33e89e=>{const _0x3543ec=_0x3c37cf;this[_0x3543ec(0xda)][_0x3543ec(0xc5)](_0x33e89e);}),_0xbc15c6;}[_0x35f622(0x96)](_0x2104a1){const _0x3f2ffd=_0x35f622;return{'id':_0x2104a1['id'],'threadId':_0x2104a1[_0x3f2ffd(0xe0)],'ref':_0x2104a1[_0x3f2ffd(0x87)]};}};f=Q([_(0x0,_0x5ee840(_0x714c0)),_(0x1,_0x5ee840(_0x1ff591)),_(0x2,_0x5ee840(_0x2c2f5a)),_(0x3,_0x5ee840(_0x55640e))],f);var re=Object[_0x35f622(0xac)],te=(_0x272a61,_0xe43b3e,_0x49fecd,_0x12b5b1)=>{const _0x35b499=_0x35f622;for(var _0x4c3781=_0x12b5b1>0x1?void 0x0:_0x12b5b1?re(_0xe43b3e,_0x49fecd):_0xe43b3e,_0x1b2fa2=_0x272a61[_0x35b499(0xa5)]-0x1,_0x116346;_0x1b2fa2>=0x0;_0x1b2fa2--)(_0x116346=_0x272a61[_0x1b2fa2])&&(_0x4c3781=_0x116346(_0x4c3781)||_0x4c3781);return _0x4c3781;},N=(_0x5d522c,_0x30f5f4)=>(_0x2a707c,_0x5b854)=>_0x30f5f4(_0x2a707c,_0x5b854,_0x5d522c);let g=class extends _0x2b7514{constructor(_0x5e5a8d,_0x1ec3ae){const _0x3a5543=_0x35f622;super(),this[_0x3a5543(0xb0)]=_0x5e5a8d,this[_0x3a5543(0xc0)]=_0x1ec3ae,this[_0x3a5543(0x8a)]();}[_0x35f622(0x8a)](){const _0x577bed=_0x35f622;this[_0x577bed(0xb0)][_0x577bed(0xb2)]=this['_threadCommentDataSource'],this[_0x577bed(0xb0)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x217b63),N(0x1,_0x5ee840(f))],g);var se=Object[_0x35f622(0xa1)],oe=Object[_0x35f622(0xac)],ne=(_0x2b883b,_0x579912,_0x20d538)=>_0x579912 in _0x2b883b?se(_0x2b883b,_0x579912,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x20d538}):_0x2b883b[_0x579912]=_0x20d538,ie=(_0x4aa11b,_0x567acf,_0x2958bb,_0x33a7fc)=>{const _0x415228=_0x35f622;for(var _0x1f08e1=_0x33a7fc>0x1?void 0x0:_0x33a7fc?oe(_0x567acf,_0x2958bb):_0x567acf,_0x4d98a3=_0x4aa11b[_0x415228(0xa5)]-0x1,_0x1f03bf;_0x4d98a3>=0x0;_0x4d98a3--)(_0x1f03bf=_0x4aa11b[_0x4d98a3])&&(_0x1f08e1=_0x1f03bf(_0x1f08e1)||_0x1f08e1);return _0x1f08e1;},w=(_0x2ef0a1,_0x53ec45)=>(_0x3561b9,_0x118ca7)=>_0x53ec45(_0x3561b9,_0x118ca7,_0x2ef0a1),$=(_0x57a3de,_0x42dae5,_0x164089)=>ne(_0x57a3de,typeof _0x42dae5!='symbol'?_0x42dae5+'':_0x42dae5,_0x164089);let b=class extends _0x223b2b{constructor(_0x5662f7=M,_0x45c20b,_0x373bc4){const _0x411667=_0x35f622;super(),this[_0x411667(0x84)]=_0x5662f7,this['_injector']=_0x45c20b,this['_configService']=_0x373bc4;const {..._0x277ebf}=_0x20f8a7({},M,this[_0x411667(0x84)]);this[_0x411667(0x9b)][_0x411667(0xc7)](z,_0x277ebf);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x2a45c8=>{const _0x1c8826=_0x5cab;this[_0x1c8826(0xc8)][_0x1c8826(0xc6)](_0x2a45c8);});}['onReady'](){const _0x2d0d6d=_0x35f622;this[_0x2d0d6d(0xc8)][_0x2d0d6d(0x99)](g),this[_0x2d0d6d(0xc8)][_0x2d0d6d(0x99)](S);}};function _0x2c57(){const _0x506809=['forEach','thread-comment-data-source.config','commentUpdate$','_config','/reply','createTimestamp','ref','_httpService','YYYY/MM/DD\x20HH:mm','_initDataSource','rangeId','39148kRXgXO','getUser','addComment','/add','size','parentId','replyId','OpenOrReOpen','Add','getComment','saveCommentToSnapshot','users','resolveComment','get','delete','_configService','_threadCommentModel','body','pipe','find','format','defineProperty','_initUserSync','Solve','content','length','listComments','103100cpCNfz','/universer-api/comment/unit/','Solved','Unknown','userID','getOwnPropertyDescriptor','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','error','map','_threadCommentDataSourceService','Reply','dataSource','927840zKQEDj','payload','reply','comments','/delete','customRanges','parse','replies','144589EmeniB','/list','getMemberID','Delete','unitId','_threadCommentDataSource','1460496OAYQSK','221295ovGihH','disposeWithMe','stringify','addUser','add','setConfig','_injector','_sessionService','type','rangeType','code','subscribe','342lWzpeQ','root','filter','resolved','updateComment','comment','getUnit','post','requireSession','/universer-api/user/list','42nhHaoM','881783ekwohx','_userService','Edit','UNIVER_UNKNOWN','UNRECOGNIZED','user','deleteComment','threadId','COMMENT','solved','userId','33PpQjPQ'];_0x2c57=function(){return _0x506809;};return _0x2c57();}$(b,'pluginName',W),$(b,_0x35f622(0xca),_0x238f45[_0x35f622(0xdc)]),b=ie([_0x21b651(_0x2a1676,_0x177d49,_0x843546),w(0x1,_0x5ee840(_0x55640e)),w(0x2,_0x3ef499)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x10dd51=_0x11cb;(function(_0x5593fd,_0x39ba53){const _0x38ce01=_0x11cb,_0x6c3ab1=_0x5593fd();while(!![]){try{const _0x25e2d0=-parseInt(_0x38ce01(0x1b2))/0x1+-parseInt(_0x38ce01(0x1d5))/0x2+-parseInt(_0x38ce01(0x1e2))/0x3+-parseInt(_0x38ce01(0x1d7))/0x4*(parseInt(_0x38ce01(0x1ce))/0x5)+parseInt(_0x38ce01(0x1cd))/0x6*(-parseInt(_0x38ce01(0x1c0))/0x7)+-parseInt(_0x38ce01(0x1dd))/0x8+-parseInt(_0x38ce01(0x1d9))/0x9*(-parseInt(_0x38ce01(0x1b7))/0xa);if(_0x25e2d0===_0x39ba53)break;else _0x6c3ab1['push'](_0x6c3ab1['shift']());}catch(_0x549fea){_0x6c3ab1['push'](_0x6c3ab1['shift']());}}}(_0x19f0,0x6e085));import{CommentService as _0x480a02,CollaborationSessionService as _0xa13fb7,UniverCollaborationClientPlugin as _0x349d8d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x46f06c}from'@univerjs-pro/license';import{dayjs as _0x13b06d,UserManagerService as _0x4945be,Inject as _0x2f4fe1,Injector as _0x36f8f1,Disposable as _0x42963d,CustomRangeType as _0x5b13ae,UniverInstanceType as _0x472341,DependentOn as _0x1c23a3,IConfigService as _0x18ac02,Plugin as _0x424e35,merge as _0x3c064f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x589ee4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x33888f,IThreadCommentDataSourceService as _0x2d29f0}from'@univerjs/thread-comment';import{bufferTime as _0x2e1f0d}from'rxjs';import{HTTPService as _0x181eb7}from'@univerjs/network';function _0x11cb(_0x2f1284,_0x4f4a0f){const _0x19f012=_0x19f0();return _0x11cb=function(_0x11cba1,_0x188804){_0x11cba1=_0x11cba1-0x1a0;let _0xa95549=_0x19f012[_0x11cba1];return _0xa95549;},_0x11cb(_0x2f1284,_0x4f4a0f);}const W=_0x10dd51(0x1b3);var I=(_0x26f9dd=>(_0x26f9dd[_0x26f9dd[_0x10dd51(0x1a6)]=0x0]=_0x10dd51(0x1a6),_0x26f9dd[_0x26f9dd[_0x10dd51(0x1ac)]=0x1]=_0x10dd51(0x1ac),_0x26f9dd[_0x26f9dd['UNRECOGNIZED']=-0x1]=_0x10dd51(0x1bb),_0x26f9dd))(I||{}),v=(_0x47478a=>(_0x47478a[_0x47478a['Unknown']=0x0]='Unknown',_0x47478a[_0x47478a[_0x10dd51(0x1ae)]=0x1]='Add',_0x47478a[_0x47478a['Reply']=0x2]='Reply',_0x47478a[_0x47478a['Edit']=0x3]=_0x10dd51(0x1c4),_0x47478a[_0x47478a[_0x10dd51(0x1cc)]=0x4]='Delete',_0x47478a[_0x47478a[_0x10dd51(0x1e4)]=0x5]=_0x10dd51(0x1e4),_0x47478a[_0x47478a[_0x10dd51(0x1bb)]=-0x1]=_0x10dd51(0x1bb),_0x47478a))(v||{});const D=_0x47a61f=>_0x13b06d(new Date(+_0x47a61f))[_0x10dd51(0x1ec)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x2c7438,_0x476874)=>{const _0x39beeb=_0x10dd51,_0x2ec2d8=_0x2c7438[_0x39beeb(0x1dc)](_0x4945be),_0x5e8f3c=_0x2c7438[_0x39beeb(0x1dc)](_0x181eb7);_0x476874['forEach'](_0x33f877=>{const _0xac41ea=_0x39beeb;_0x2ec2d8[_0xac41ea(0x1f3)](_0x33f877)&&_0x476874[_0xac41ea(0x1f2)](_0x33f877);}),_0x476874[_0x39beeb(0x1db)]&&(await _0x5e8f3c[_0x39beeb(0x1dc)](_0x39beeb(0x1b4),{'params':{'userIDs':[..._0x476874]}}))[_0x39beeb(0x1f0)][_0x39beeb(0x1cf)][_0x39beeb(0x1ab)](_0x2988d6=>{const _0x1690dd=_0x39beeb;_0x2988d6&&_0x2ec2d8[_0x1690dd(0x1bd)](_0x2988d6);});};var K=Object[_0x10dd51(0x1a0)],V=(_0x3b975c,_0x3bcd25,_0x293c56,_0x37d013)=>{for(var _0x3ed374=_0x37d013>0x1?void 0x0:_0x37d013?K(_0x3bcd25,_0x293c56):_0x3bcd25,_0x56e7e0=_0x3b975c['length']-0x1,_0x3dbc0f;_0x56e7e0>=0x0;_0x56e7e0--)(_0x3dbc0f=_0x3b975c[_0x56e7e0])&&(_0x3ed374=_0x3dbc0f(_0x3ed374)||_0x3ed374);return _0x3ed374;},p=(_0x416c56,_0x5e3432)=>(_0x1c0c8c,_0x363ac3)=>_0x5e3432(_0x1c0c8c,_0x363ac3,_0x416c56);let S=class extends _0x42963d{constructor(_0x4ce056,_0x18c6c9,_0x1f818b,_0x541540){const _0x195020=_0x10dd51;super(),this['_commentService']=_0x4ce056,this[_0x195020(0x1a2)]=_0x18c6c9,this[_0x195020(0x1ee)]=_0x1f818b,this[_0x195020(0x1cb)]=_0x541540,this[_0x195020(0x1a7)](),this[_0x195020(0x1f7)]();}[_0x10dd51(0x1f7)](){const _0x292770=_0x10dd51;this[_0x292770(0x1de)](this[_0x292770(0x1a2)]['commentUpdate$']['pipe'](_0x2e1f0d(0x10))[_0x292770(0x1e6)](_0x3dbe55=>{const _0x462a7c=_0x292770,_0x2c45a0=new Set();_0x3dbe55['forEach'](_0x16ea0b=>{const _0x557a96=_0x11cb;switch(_0x16ea0b[_0x557a96(0x1f9)]){case _0x557a96(0x1e0):{const _0x3473a8=_0x16ea0b['payload']['personId'];_0x2c45a0[_0x557a96(0x1e0)](_0x3473a8);break;}}}),B(this[_0x462a7c(0x1cb)],_0x2c45a0);}));}[_0x10dd51(0x1a7)](){const _0x1c5778=_0x10dd51;this['disposeWithMe'](this[_0x1c5778(0x1eb)][_0x1c5778(0x1b5)][_0x1c5778(0x1e6)](async _0x32de80=>{const _0x222337=_0x1c5778;var _0x351913,_0x5e3a57,_0x5046df,_0x447723;const _0xca006d=(_0x351913=this[_0x222337(0x1a2)][_0x222337(0x1f5)](_0x32de80[_0x222337(0x1a8)])[_0x222337(0x1d1)](_0x48932e=>_0x48932e[_0x222337(0x1fa)]===_0x32de80[_0x222337(0x1fa)]))==null?void 0x0:_0x351913['root'];if(!_0xca006d)return;const {unitId:_0x2e0029,subUnitId:_0x42d124}=_0xca006d;switch(_0x32de80[_0x222337(0x1c9)]&&this['_userService'][_0x222337(0x1bd)](_0x32de80[_0x222337(0x1c9)]),_0x32de80[_0x222337(0x1f9)]){case v[_0x222337(0x1ae)]:break;case v[_0x222337(0x1d4)]:{this[_0x222337(0x1a2)][_0x222337(0x1be)](_0x2e0029,_0x42d124,{'unitId':_0x2e0029,'subUnitId':_0x42d124,'ref':'','id':_0x32de80[_0x222337(0x1a5)],'dT':D(+_0x32de80[_0x222337(0x1b1)]),'threadId':_0x32de80[_0x222337(0x1fa)],'personId':(_0x5046df=(_0x5e3a57=_0x32de80[_0x222337(0x1c9)])==null?void 0x0:_0x5e3a57['userID'])!=null?_0x5046df:_0x32de80[_0x222337(0x1ea)],'text':JSON[_0x222337(0x1ff)](_0x32de80['content']),'parentId':_0xca006d['id']});break;}case v[_0x222337(0x1cc)]:{const _0x4bed65=this[_0x222337(0x1a2)][_0x222337(0x1ad)](_0x2e0029,_0x42d124,_0x32de80[_0x222337(0x1a5)]);_0x4bed65&&_0x4bed65[_0x222337(0x1f8)]&&this[_0x222337(0x1a2)][_0x222337(0x1fd)](_0x2e0029,_0x42d124,_0x32de80['replyId']);break;}case v[_0x222337(0x1c4)]:{this[_0x222337(0x1a2)][_0x222337(0x1df)](_0x2e0029,_0x42d124,{'commentId':_0x32de80[_0x222337(0x1a5)],'text':JSON[_0x222337(0x1ff)](_0x32de80[_0x222337(0x1a3)])});break;}case v[_0x222337(0x1e4)]:{const _0x3bf972=(_0x447723=this[_0x222337(0x1a2)][_0x222337(0x1f5)](_0x32de80['unitId'])[_0x222337(0x1d1)](_0xc63f0d=>_0xc63f0d[_0x222337(0x1fa)]===_0x32de80['threadId']))==null?void 0x0:_0x447723[_0x222337(0x1fb)];_0x3bf972&&this[_0x222337(0x1a2)][_0x222337(0x1c1)](_0x2e0029,_0x42d124,_0x3bf972['id'],_0x32de80['solved']===I[_0x222337(0x1ac)]);break;}}}));}};S=V([p(0x0,_0x2f4fe1(_0x480a02)),p(0x1,_0x2f4fe1(_0x33888f)),p(0x2,_0x2f4fe1(_0x4945be)),p(0x3,_0x2f4fe1(_0x36f8f1))],S);const z=_0x10dd51(0x1c8),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5107cd,_0x4540ab,_0x3dc2d2,_0x34b0d2)=>{const _0x104726=_0x10dd51;for(var _0x576fe5=_0x34b0d2>0x1?void 0x0:_0x34b0d2?k(_0x4540ab,_0x3dc2d2):_0x4540ab,_0x950792=_0x5107cd[_0x104726(0x1ba)]-0x1,_0x673bac;_0x950792>=0x0;_0x950792--)(_0x673bac=_0x5107cd[_0x950792])&&(_0x576fe5=_0x673bac(_0x576fe5)||_0x576fe5);return _0x576fe5;},_=(_0x2be1fb,_0x2c3fcc)=>(_0x29ae54,_0xef4bc)=>_0x2c3fcc(_0x29ae54,_0xef4bc,_0x2be1fb);function X(_0x5a3b0f,_0x19c30e){const _0x2cfd35=_0x10dd51,_0x39bafd=_0x5a3b0f[_0x2cfd35(0x1bc)][0x0];return{..._0x19c30e,'id':_0x39bafd[_0x2cfd35(0x1a5)],'resolved':_0x5a3b0f[_0x2cfd35(0x1a9)]===0x1,'dT':D(_0x39bafd['createTimestamp']),'personId':_0x39bafd['userId'],'threadId':_0x39bafd[_0x2cfd35(0x1fa)]};}function _0x19f0(){const _0xfb680b=['_userService','filter','body','symbol','delete','getUser','reply','getUnit','_configService','_initUserSync','parentId','type','threadId','root','ref','deleteComment','comment','parse','getOwnPropertyDescriptor','_threadCommentDataSourceService','_threadCommentModel','content','post','replyId','OpenOrReOpen','_init','unitId','solved','rangeType','forEach','Solved','getComment','Add','pluginName','_httpService','createTimestamp','38524TSZSNL','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/universer-api/user/list','commentUpdate$','COMMENT','10xvRKow','saveCommentToSnapshot','requireSession','length','UNRECOGNIZED','replies','addUser','addComment','getMemberID','7cIeESQ','resolveComment','values','getCurrentUser','Edit','onStarting','comments','setConfig','thread-comment-data-source.config','user','/add','_injector','Delete','1119918FkAfKu','3585ENSGRb','users','customRanges','find','map','/delete','Reply','1264864IWwLUa','/reply','4196LvXbnw','_config','27951543SnPJcQ','rangeId','size','get','3171544HcFjPy','disposeWithMe','updateComment','add','error','1946547RGVrHi','_threadCommentDataSource','Solve','_initDataSource','subscribe','_sessionService','defineProperty','/universer-api/comment/unit/','userId','_commentService','format','code'];_0x19f0=function(){return _0xfb680b;};return _0x19f0();}function ee(_0x21dbfb,_0x3f0b9e,_0x102120){const _0x2bc455=_0x10dd51;var _0x4b7ba9,_0x4431b5;if(((_0x4431b5=(_0x4b7ba9=_0x21dbfb==null?void 0x0:_0x21dbfb[_0x2bc455(0x1bc)])==null?void 0x0:_0x4b7ba9[_0x2bc455(0x1ba)])!=null?_0x4431b5:0x0)>0x0){const _0x4a8e0c=(_0x1c5b0a,_0x34b27d)=>({'id':_0x1c5b0a[_0x2bc455(0x1a5)],'threadId':_0x1c5b0a[_0x2bc455(0x1fa)],'dT':D(_0x1c5b0a[_0x2bc455(0x1b1)]),'personId':_0x1c5b0a[_0x2bc455(0x1ea)],'resolved':_0x21dbfb[_0x2bc455(0x1a9)]===I['Solved'],'unitId':_0x3f0b9e,'subUnitId':_0x102120,'text':JSON[_0x2bc455(0x1ff)](_0x1c5b0a[_0x2bc455(0x1a3)]),'parentId':_0x34b27d}),_0x465812=_0x4a8e0c(_0x21dbfb[_0x2bc455(0x1bc)][0x0]);return{..._0x465812,'children':_0x21dbfb[_0x2bc455(0x1bc)]['slice'](0x1)['map'](_0x40a8d5=>_0x4a8e0c(_0x40a8d5,_0x465812['id']))};}return null;}let f=class{constructor(_0x34854e,_0x4f12e8,_0x212f20,_0x307da2){const _0x3f16fd=_0x10dd51;this[_0x3f16fd(0x1b0)]=_0x34854e,this[_0x3f16fd(0x1ee)]=_0x4f12e8,this[_0x3f16fd(0x1e7)]=_0x212f20,this[_0x3f16fd(0x1cb)]=_0x307da2;}async[_0x10dd51(0x1be)](_0x1b730b){const _0x5ac165=_0x10dd51;var _0x1ad724,_0x474259;const {parentId:_0xd17921,unitId:_0x4e0ab2,text:_0x430c78,threadId:_0x879d1f}=_0x1b730b,_0x237901=(_0x474259=(_0x1ad724=_0x430c78['customRanges'])==null?void 0x0:_0x1ad724[_0x5ac165(0x1ef)](_0x188c49=>_0x188c49[_0x5ac165(0x1aa)]===_0x5b13ae['COMMENT'])[_0x5ac165(0x1d2)](_0x48dd16=>_0x48dd16[_0x5ac165(0x1da)]))!=null?_0x474259:[],_0x10521c=JSON['stringify'](_0x430c78),_0x59c8c1=(await this[_0x5ac165(0x1e7)][_0x5ac165(0x1b9)](_0x4e0ab2))[_0x5ac165(0x1bf)]();if(_0xd17921){const _0x36f6fd={'memberId':_0x59c8c1,'unitId':_0x4e0ab2,'content':_0x10521c,'mention':_0x237901,'threadId':_0x879d1f},_0x194a8b=(await this[_0x5ac165(0x1b0)][_0x5ac165(0x1a4)](_0x5ac165(0x1e9)+_0x4e0ab2+_0x5ac165(0x1d6),{'body':_0x36f6fd}))[_0x5ac165(0x1f0)][_0x5ac165(0x1f4)];return{..._0x1b730b,'id':_0x194a8b[_0x5ac165(0x1a5)],'dT':_0x13b06d(+_0x194a8b[_0x5ac165(0x1b1)])[_0x5ac165(0x1ec)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x194a8b[_0x5ac165(0x1ea)]};}else{const _0x100bd8={'memberId':_0x59c8c1,'unitId':_0x4e0ab2,'content':_0x10521c,'mention':_0x237901},_0x3a3d93=await this[_0x5ac165(0x1b0)][_0x5ac165(0x1a4)]('/universer-api/comment/unit/'+_0x4e0ab2+_0x5ac165(0x1ca),{'body':_0x100bd8});return X(_0x3a3d93[_0x5ac165(0x1f0)][_0x5ac165(0x1fe)],_0x1b730b);}}async[_0x10dd51(0x1df)](_0x5d22ad){const _0x5925fa=_0x10dd51;var _0x5dcf4a,_0x42696d;const {text:_0x36b18c,unitId:_0xa798c5}=_0x5d22ad,_0xe68161=(_0x42696d=(_0x5dcf4a=_0x36b18c[_0x5925fa(0x1d0)])==null?void 0x0:_0x5dcf4a[_0x5925fa(0x1ef)](_0x12bbf8=>_0x12bbf8[_0x5925fa(0x1aa)]===_0x5b13ae[_0x5925fa(0x1b6)])['map'](_0x56f75f=>_0x56f75f['rangeId']))!=null?_0x42696d:[],_0x3a0ec8=JSON['stringify'](_0x36b18c),_0x277e88=_0x5d22ad[_0x5925fa(0x1fa)],_0x5b7b17=_0x5d22ad['id'],_0x28f7df={'memberId':(await this[_0x5925fa(0x1e7)][_0x5925fa(0x1b9)](_0xa798c5))['getMemberID'](),'unitId':_0xa798c5,'threadId':_0x277e88,'mention':_0xe68161,'content':_0x3a0ec8,'replyId':_0x5b7b17},_0x1b15af=await this[_0x5925fa(0x1b0)][_0x5925fa(0x1a4)](_0x5925fa(0x1e9)+_0xa798c5+'/edit',{'body':_0x28f7df});return!_0x1b15af['body'][_0x5925fa(0x1e1)]||_0x1b15af[_0x5925fa(0x1f0)][_0x5925fa(0x1e1)][_0x5925fa(0x1ed)]===0x1;}async['resolveComment'](_0x553a18){const _0x5b20be=_0x10dd51,{unitId:_0x4a9933}=_0x553a18,_0x169aed=_0x553a18['threadId'],_0x5cf1f5={'memberId':this[_0x5b20be(0x1ee)][_0x5b20be(0x1c3)]()['userID'],'unitId':_0x4a9933,'threadId':_0x169aed,'solved':_0x553a18['resolved']?I[_0x5b20be(0x1ac)]:I['OpenOrReOpen']},_0xe6ad43=await this[_0x5b20be(0x1b0)][_0x5b20be(0x1a4)]('/universer-api/comment/unit/'+_0x4a9933+'/solved',{'body':_0x5cf1f5});return!_0xe6ad43[_0x5b20be(0x1f0)]['error']||_0xe6ad43[_0x5b20be(0x1f0)]['error'][_0x5b20be(0x1ed)]===0x1;}async[_0x10dd51(0x1fd)](_0x31f4ea,_0x2b351f,_0x423d3d,_0x5647ce){const _0x4fc712=_0x10dd51,_0x59f71b={'memberId':(await this[_0x4fc712(0x1e7)][_0x4fc712(0x1b9)](_0x31f4ea))['getMemberID'](),'threadId':_0x423d3d,'replyId':_0x5647ce,'unitId':_0x31f4ea},_0x3089c0=await this[_0x4fc712(0x1b0)]['post'](_0x4fc712(0x1e9)+_0x31f4ea+_0x4fc712(0x1d3),{'body':_0x59f71b});return!_0x3089c0['body']['error']||_0x3089c0['body'][_0x4fc712(0x1e1)][_0x4fc712(0x1ed)]===0x1;}async['listComments'](_0x16e185,_0x25a2ff,_0x26c951){const _0x56ef58=_0x10dd51,_0x1415d6={'unitId':_0x16e185,'threadId':_0x26c951},_0xdb5897=await this[_0x56ef58(0x1b0)][_0x56ef58(0x1a4)](_0x56ef58(0x1e9)+_0x16e185+'/list',{'body':_0x1415d6}),_0x14f46d=_0x26c951[_0x56ef58(0x1d2)](_0x11f78b=>ee(_0xdb5897[_0x56ef58(0x1f0)][_0x56ef58(0x1c6)][_0x11f78b],_0x16e185,_0x25a2ff))[_0x56ef58(0x1ef)](Boolean);return Object[_0x56ef58(0x1c2)](_0xdb5897['body']['users'])[_0x56ef58(0x1ab)](_0x39532c=>{const _0x347fc1=_0x56ef58;this[_0x347fc1(0x1ee)]['addUser'](_0x39532c);}),_0x14f46d;}[_0x10dd51(0x1b8)](_0x3c7911){const _0x180999=_0x10dd51;return{'id':_0x3c7911['id'],'threadId':_0x3c7911['threadId'],'ref':_0x3c7911[_0x180999(0x1fc)]};}};f=Q([_(0x0,_0x2f4fe1(_0x181eb7)),_(0x1,_0x2f4fe1(_0x4945be)),_(0x2,_0x2f4fe1(_0xa13fb7)),_(0x3,_0x2f4fe1(_0x36f8f1))],f);var re=Object[_0x10dd51(0x1a0)],te=(_0x2e3938,_0x520446,_0x12145a,_0x4cface)=>{const _0x5dd3fc=_0x10dd51;for(var _0x27befd=_0x4cface>0x1?void 0x0:_0x4cface?re(_0x520446,_0x12145a):_0x520446,_0x226c48=_0x2e3938[_0x5dd3fc(0x1ba)]-0x1,_0x482e6a;_0x226c48>=0x0;_0x226c48--)(_0x482e6a=_0x2e3938[_0x226c48])&&(_0x27befd=_0x482e6a(_0x27befd)||_0x27befd);return _0x27befd;},N=(_0x17c323,_0x443b7d)=>(_0x10196c,_0x20f974)=>_0x443b7d(_0x10196c,_0x20f974,_0x17c323);let g=class extends _0x42963d{constructor(_0x331994,_0x1196dd){const _0x144bdd=_0x10dd51;super(),this['_threadCommentDataSourceService']=_0x331994,this['_threadCommentDataSource']=_0x1196dd,this[_0x144bdd(0x1e5)]();}['_initDataSource'](){const _0x4e0553=_0x10dd51;this[_0x4e0553(0x1a1)]['dataSource']=this[_0x4e0553(0x1e3)],this[_0x4e0553(0x1a1)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x2d29f0),N(0x1,_0x2f4fe1(f))],g);var se=Object[_0x10dd51(0x1e8)],oe=Object[_0x10dd51(0x1a0)],ne=(_0x543418,_0x21c9ac,_0x25fac4)=>_0x21c9ac in _0x543418?se(_0x543418,_0x21c9ac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x25fac4}):_0x543418[_0x21c9ac]=_0x25fac4,ie=(_0x5f0bb1,_0x24b37f,_0x561555,_0xaba4b1)=>{const _0x2eb2a8=_0x10dd51;for(var _0x5d1f8a=_0xaba4b1>0x1?void 0x0:_0xaba4b1?oe(_0x24b37f,_0x561555):_0x24b37f,_0x1261f3=_0x5f0bb1[_0x2eb2a8(0x1ba)]-0x1,_0x550eaf;_0x1261f3>=0x0;_0x1261f3--)(_0x550eaf=_0x5f0bb1[_0x1261f3])&&(_0x5d1f8a=_0x550eaf(_0x5d1f8a)||_0x5d1f8a);return _0x5d1f8a;},w=(_0x118886,_0x4fd5f0)=>(_0x1518c9,_0x4e069a)=>_0x4fd5f0(_0x1518c9,_0x4e069a,_0x118886),$=(_0x5571b2,_0x275438,_0x113773)=>ne(_0x5571b2,typeof _0x275438!=_0x10dd51(0x1f1)?_0x275438+'':_0x275438,_0x113773);let b=class extends _0x424e35{constructor(_0x3ea8dd=M,_0x56b00e,_0x3fb8a7){const _0x1ced53=_0x10dd51;super(),this[_0x1ced53(0x1d8)]=_0x3ea8dd,this[_0x1ced53(0x1cb)]=_0x56b00e,this[_0x1ced53(0x1f6)]=_0x3fb8a7;const {..._0x4a2325}=_0x3c064f({},M,this[_0x1ced53(0x1d8)]);this[_0x1ced53(0x1f6)][_0x1ced53(0x1c7)](z,_0x4a2325);}[_0x10dd51(0x1c5)](){[[f],[g],[S]]['forEach'](_0x58b7fa=>{const _0x422f4e=_0x11cb;this[_0x422f4e(0x1cb)][_0x422f4e(0x1e0)](_0x58b7fa);});}['onReady'](){const _0x127c24=_0x10dd51;this[_0x127c24(0x1cb)][_0x127c24(0x1dc)](g),this[_0x127c24(0x1cb)]['get'](S);}};$(b,_0x10dd51(0x1af),W),$(b,_0x10dd51(0x1f9),_0x472341['UNIVER_UNKNOWN']),b=ie([_0x1c23a3(_0x589ee4,_0x349d8d,_0x46f06c),w(0x1,_0x2f4fe1(_0x36f8f1)),w(0x2,_0x18ac02)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4b10(){const _0x530385=['parse','unitId','pipe','onReady','createTimestamp','ref','filter','values','_initUserSync','length','users','root','_userService','find','rangeType','643809oqjYFm','commentUpdate$','onStarting','defineProperty','get','pluginName','getComment','/add','error','slice','_commentService','IThreadCommentDataSourceService','comment','Delete','UniverInstanceType','Plugin','syncUpdateMutationToColla','14854596rjjbMN','Solved','userID','@univerjs-pro/collaboration-client','content','getMemberID','Inject','/solved','amd','UniverThreadCommentUi','saveCommentToSnapshot','disposeWithMe','map','symbol','@univerjs-pro/license','602200iSDMnU','44oyHIwS','_injector','requireSession','toStringTag','12pASVNz','1IKikPm','UniverCollaborationClientPlugin','setConfig','bufferTime','resolveComment','post','_sessionService','object','Unknown','updateComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/edit','exports','addComment','/universer-api/comment/unit/','user','type','@univerjs/core','1643754RWppAg','6sdokCf','UniverThreadCommentDataSourcePlugin','dayjs','Disposable','UserManagerService','stringify','_init','15580860bHmufL','Reply','solved','personId','UniverProCollaborationClient','HTTPService','UNRECOGNIZED','dataSource','Add','getUser','getCurrentUser','/reply','getOwnPropertyDescriptor','Solve','/list','@univerjs/network','_initDataSource','subscribe','customRanges','replyId','_threadCommentDataSource','/universer-api/user/list','rangeId','4248510TuLMLh','resolved','_configService','YYYY/MM/DD\x20HH:mm','deleteComment','UniverProLicense','UniverThreadCommentUIPlugin','72vmZQrq','add','format','CustomRangeType','ThreadCommentModel','COMMENT','_httpService','_config','userId','@univerjs/thread-comment','threadId','Module','size','listComments','8882097mPhuLp','replies','OpenOrReOpen','payload','Edit','code','_threadCommentDataSourceService','CollaborationSessionService','/delete','addUser','forEach','body','_threadCommentModel','Injector','rxjs','getUnit','DependentOn'];_0x4b10=function(){return _0x530385;};return _0x4b10();}function _0x1521(_0x55bba8,_0x1aabe7){const _0x4b10b6=_0x4b10();return _0x1521=function(_0x152147,_0x2c463c){_0x152147=_0x152147-0x124;let _0x124ec1=_0x4b10b6[_0x152147];return _0x124ec1;},_0x1521(_0x55bba8,_0x1aabe7);}(function(_0x1ee148,_0x112784){const _0x595d81=_0x1521,_0x46ce55=_0x1ee148();while(!![]){try{const _0x4b49cb=parseInt(_0x595d81(0x12e))/0x1*(parseInt(_0x595d81(0x140))/0x2)+parseInt(_0x595d81(0x194))/0x3*(-parseInt(_0x595d81(0x12d))/0x4)+parseInt(_0x595d81(0x15f))/0x5*(-parseInt(_0x595d81(0x141))/0x6)+-parseInt(_0x595d81(0x174))/0x7+-parseInt(_0x595d81(0x128))/0x8*(parseInt(_0x595d81(0x166))/0x9)+-parseInt(_0x595d81(0x148))/0xa+-parseInt(_0x595d81(0x129))/0xb*(-parseInt(_0x595d81(0x1a5))/0xc);if(_0x4b49cb===_0x112784)break;else _0x46ce55['push'](_0x46ce55['shift']());}catch(_0x2e57aa){_0x46ce55['push'](_0x46ce55['shift']());}}}(_0x4b10,0xcfb35),function(_0x21008b,_0x52397f){const _0x28f414=_0x1521;typeof exports==_0x28f414(0x135)&&typeof module<'u'?_0x52397f(exports,require(_0x28f414(0x1a8)),require(_0x28f414(0x127)),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require(_0x28f414(0x16f)),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x28f414(0x1ad)]?define([_0x28f414(0x13a),_0x28f414(0x1a8),_0x28f414(0x127),_0x28f414(0x13f),'@univerjs/thread-comment-ui','@univerjs/thread-comment','rxjs',_0x28f414(0x157)],_0x52397f):(_0x21008b=typeof globalThis<'u'?globalThis:_0x21008b||self,_0x52397f(_0x21008b['UniverProThreadCommentDatasource']={},_0x21008b[_0x28f414(0x14c)],_0x21008b[_0x28f414(0x164)],_0x21008b['UniverCore'],_0x21008b[_0x28f414(0x1ae)],_0x21008b['UniverThreadComment'],_0x21008b[_0x28f414(0x182)],_0x21008b['UniverNetwork']));}(this,function(_0x558cbb,_0x56c752,_0xe3a7ef,_0x49ccf8,_0x5d7012,_0x40ee22,_0x401b33,_0x275513){'use strict';const _0xbc40f2=_0x1521;const _0x1cbfc1=_0xbc40f2(0x138);var _0x3e564a=(_0x2786b8=>(_0x2786b8[_0x2786b8[_0xbc40f2(0x176)]=0x0]=_0xbc40f2(0x176),_0x2786b8[_0x2786b8[_0xbc40f2(0x1a6)]=0x1]=_0xbc40f2(0x1a6),_0x2786b8[_0x2786b8[_0xbc40f2(0x14e)]=-0x1]=_0xbc40f2(0x14e),_0x2786b8))(_0x3e564a||{}),_0x24916e=(_0x104173=>(_0x104173[_0x104173[_0xbc40f2(0x136)]=0x0]=_0xbc40f2(0x136),_0x104173[_0x104173['Add']=0x1]=_0xbc40f2(0x150),_0x104173[_0x104173[_0xbc40f2(0x149)]=0x2]=_0xbc40f2(0x149),_0x104173[_0x104173['Edit']=0x3]=_0xbc40f2(0x178),_0x104173[_0x104173[_0xbc40f2(0x1a1)]=0x4]='Delete',_0x104173[_0x104173[_0xbc40f2(0x155)]=0x5]=_0xbc40f2(0x155),_0x104173[_0x104173[_0xbc40f2(0x14e)]=-0x1]=_0xbc40f2(0x14e),_0x104173))(_0x24916e||{});const _0x327441=_0x85035=>_0x49ccf8[_0xbc40f2(0x143)](new Date(+_0x85035))['format'](_0xbc40f2(0x162)),_0x15ec3c=async(_0x5e6d49,_0x1f7adc)=>{const _0x5b15f8=_0xbc40f2,_0x3844ab=_0x5e6d49['get'](_0x49ccf8[_0x5b15f8(0x145)]),_0x2bfa42=_0x5e6d49[_0x5b15f8(0x198)](_0x275513[_0x5b15f8(0x14d)]);_0x1f7adc[_0x5b15f8(0x17e)](_0x1a75b1=>{const _0x1350b2=_0x5b15f8;_0x3844ab[_0x1350b2(0x151)](_0x1a75b1)&&_0x1f7adc['delete'](_0x1a75b1);}),_0x1f7adc[_0x5b15f8(0x172)]&&(await _0x2bfa42[_0x5b15f8(0x198)](_0x5b15f8(0x15d),{'params':{'userIDs':[..._0x1f7adc]}}))['body']['users'][_0x5b15f8(0x17e)](_0x27cb18=>{const _0x5f1ee3=_0x5b15f8;_0x27cb18&&_0x3844ab[_0x5f1ee3(0x17d)](_0x27cb18);});};var _0x59118c=Object[_0xbc40f2(0x154)],_0x1e76f1=(_0x1d7758,_0x5b226a,_0x22d622,_0x16aaaa)=>{const _0x34deae=_0xbc40f2;for(var _0x18ae4b=_0x16aaaa>0x1?void 0x0:_0x16aaaa?_0x59118c(_0x5b226a,_0x22d622):_0x5b226a,_0x3930a4=_0x1d7758[_0x34deae(0x18e)]-0x1,_0x2a10eb;_0x3930a4>=0x0;_0x3930a4--)(_0x2a10eb=_0x1d7758[_0x3930a4])&&(_0x18ae4b=_0x2a10eb(_0x18ae4b)||_0x18ae4b);return _0x18ae4b;},_0x2e2abd=(_0xaf19e9,_0x415187)=>(_0x443029,_0x4cfbae)=>_0x415187(_0x443029,_0x4cfbae,_0xaf19e9);let _0x5c8dd9=class extends _0x49ccf8[_0xbc40f2(0x144)]{constructor(_0x12a888,_0x33061e,_0x41151f,_0x5882fb){const _0x1317b6=_0xbc40f2;super(),this[_0x1317b6(0x19e)]=_0x12a888,this[_0x1317b6(0x180)]=_0x33061e,this['_userService']=_0x41151f,this[_0x1317b6(0x12a)]=_0x5882fb,this[_0x1317b6(0x147)](),this['_initUserSync']();}[_0xbc40f2(0x18d)](){const _0x4d0340=_0xbc40f2;this[_0x4d0340(0x124)](this[_0x4d0340(0x180)][_0x4d0340(0x195)][_0x4d0340(0x187)](_0x401b33[_0x4d0340(0x131)](0x10))[_0x4d0340(0x159)](_0xe5d572=>{const _0x2c3d77=_0x4d0340,_0x2e62f4=new Set();_0xe5d572[_0x2c3d77(0x17e)](_0x43c240=>{const _0x395427=_0x2c3d77;switch(_0x43c240['type']){case _0x395427(0x167):{const _0x2fd409=_0x43c240[_0x395427(0x177)][_0x395427(0x14b)];_0x2e62f4['add'](_0x2fd409);break;}}}),_0x15ec3c(this[_0x2c3d77(0x12a)],_0x2e62f4);}));}[_0xbc40f2(0x147)](){const _0x30e36f=_0xbc40f2;this[_0x30e36f(0x124)](this['_commentService'][_0x30e36f(0x195)]['subscribe'](async _0xf8ed6e=>{const _0x477aa5=_0x30e36f;var _0x512055,_0x5d526d,_0x5307c1,_0x12b86b;const _0xe8d992=(_0x512055=this[_0x477aa5(0x180)][_0x477aa5(0x183)](_0xf8ed6e[_0x477aa5(0x186)])[_0x477aa5(0x192)](_0x2d5765=>_0x2d5765[_0x477aa5(0x170)]===_0xf8ed6e[_0x477aa5(0x170)]))==null?void 0x0:_0x512055[_0x477aa5(0x190)];if(!_0xe8d992)return;const {unitId:_0x54441e,subUnitId:_0x192b05}=_0xe8d992;switch(_0xf8ed6e['user']&&this['_userService'][_0x477aa5(0x17d)](_0xf8ed6e['user']),_0xf8ed6e['type']){case _0x24916e[_0x477aa5(0x150)]:break;case _0x24916e[_0x477aa5(0x149)]:{this[_0x477aa5(0x180)]['addComment'](_0x54441e,_0x192b05,{'unitId':_0x54441e,'subUnitId':_0x192b05,'ref':'','id':_0xf8ed6e[_0x477aa5(0x15b)],'dT':_0x327441(+_0xf8ed6e[_0x477aa5(0x189)]),'threadId':_0xf8ed6e[_0x477aa5(0x170)],'personId':(_0x5307c1=(_0x5d526d=_0xf8ed6e[_0x477aa5(0x13d)])==null?void 0x0:_0x5d526d[_0x477aa5(0x1a7)])!=null?_0x5307c1:_0xf8ed6e[_0x477aa5(0x16e)],'text':JSON[_0x477aa5(0x185)](_0xf8ed6e[_0x477aa5(0x1a9)]),'parentId':_0xe8d992['id']});break;}case _0x24916e[_0x477aa5(0x1a1)]:{const _0x48ca65=this[_0x477aa5(0x180)][_0x477aa5(0x19a)](_0x54441e,_0x192b05,_0xf8ed6e['replyId']);_0x48ca65&&_0x48ca65['parentId']&&this[_0x477aa5(0x180)][_0x477aa5(0x163)](_0x54441e,_0x192b05,_0xf8ed6e[_0x477aa5(0x15b)]);break;}case _0x24916e[_0x477aa5(0x178)]:{this[_0x477aa5(0x180)][_0x477aa5(0x137)](_0x54441e,_0x192b05,{'commentId':_0xf8ed6e['replyId'],'text':JSON[_0x477aa5(0x185)](_0xf8ed6e[_0x477aa5(0x1a9)])});break;}case _0x24916e[_0x477aa5(0x155)]:{const _0x4d56d1=(_0x12b86b=this[_0x477aa5(0x180)]['getUnit'](_0xf8ed6e[_0x477aa5(0x186)])[_0x477aa5(0x192)](_0x5186f8=>_0x5186f8[_0x477aa5(0x170)]===_0xf8ed6e[_0x477aa5(0x170)]))==null?void 0x0:_0x12b86b['root'];_0x4d56d1&&this[_0x477aa5(0x180)][_0x477aa5(0x132)](_0x54441e,_0x192b05,_0x4d56d1['id'],_0xf8ed6e[_0x477aa5(0x14a)]===_0x3e564a[_0x477aa5(0x1a6)]);break;}}}));}};_0x5c8dd9=_0x1e76f1([_0x2e2abd(0x0,_0x49ccf8[_0xbc40f2(0x1ab)](_0x56c752['CommentService'])),_0x2e2abd(0x1,_0x49ccf8[_0xbc40f2(0x1ab)](_0x40ee22[_0xbc40f2(0x16a)])),_0x2e2abd(0x2,_0x49ccf8[_0xbc40f2(0x1ab)](_0x49ccf8[_0xbc40f2(0x145)])),_0x2e2abd(0x3,_0x49ccf8[_0xbc40f2(0x1ab)](_0x49ccf8[_0xbc40f2(0x181)]))],_0x5c8dd9);const _0x5a1e3f='thread-comment-data-source.config',_0x1b2c79={};var _0x2c6b44=Object['getOwnPropertyDescriptor'],_0x6f4ec9=(_0x77530b,_0x43ebf5,_0x573bea,_0x2218f5)=>{const _0x4d42f0=_0xbc40f2;for(var _0x239574=_0x2218f5>0x1?void 0x0:_0x2218f5?_0x2c6b44(_0x43ebf5,_0x573bea):_0x43ebf5,_0x56cf6d=_0x77530b[_0x4d42f0(0x18e)]-0x1,_0x3d9df8;_0x56cf6d>=0x0;_0x56cf6d--)(_0x3d9df8=_0x77530b[_0x56cf6d])&&(_0x239574=_0x3d9df8(_0x239574)||_0x239574);return _0x239574;},_0x351bb6=(_0x1e31ab,_0xa4f6c5)=>(_0x5440b3,_0x356cd5)=>_0xa4f6c5(_0x5440b3,_0x356cd5,_0x1e31ab);function _0xba955b(_0x542a74,_0x2297d8){const _0x455560=_0xbc40f2,_0x4ba9d5=_0x542a74['replies'][0x0];return{..._0x2297d8,'id':_0x4ba9d5[_0x455560(0x15b)],'resolved':_0x542a74[_0x455560(0x14a)]===0x1,'dT':_0x327441(_0x4ba9d5['createTimestamp']),'personId':_0x4ba9d5['userId'],'threadId':_0x4ba9d5[_0x455560(0x170)]};}function _0x51df96(_0x5203e8,_0xf601aa,_0x2ea052){const _0x306fbc=_0xbc40f2;var _0x244cce,_0x15967d;if(((_0x15967d=(_0x244cce=_0x5203e8==null?void 0x0:_0x5203e8[_0x306fbc(0x175)])==null?void 0x0:_0x244cce['length'])!=null?_0x15967d:0x0)>0x0){const _0x398114=(_0x5022c7,_0x592f86)=>({'id':_0x5022c7[_0x306fbc(0x15b)],'threadId':_0x5022c7[_0x306fbc(0x170)],'dT':_0x327441(_0x5022c7[_0x306fbc(0x189)]),'personId':_0x5022c7[_0x306fbc(0x16e)],'resolved':_0x5203e8[_0x306fbc(0x14a)]===_0x3e564a[_0x306fbc(0x1a6)],'unitId':_0xf601aa,'subUnitId':_0x2ea052,'text':JSON[_0x306fbc(0x185)](_0x5022c7[_0x306fbc(0x1a9)]),'parentId':_0x592f86}),_0x485932=_0x398114(_0x5203e8[_0x306fbc(0x175)][0x0]);return{..._0x485932,'children':_0x5203e8['replies'][_0x306fbc(0x19d)](0x1)[_0x306fbc(0x125)](_0x907d88=>_0x398114(_0x907d88,_0x485932['id']))};}return null;}let _0x8946e0=class{constructor(_0x5d2e57,_0x33a435,_0x2844f0,_0x296b40){const _0x89a56f=_0xbc40f2;this['_httpService']=_0x5d2e57,this[_0x89a56f(0x191)]=_0x33a435,this[_0x89a56f(0x134)]=_0x2844f0,this[_0x89a56f(0x12a)]=_0x296b40;}async[_0xbc40f2(0x13b)](_0x328230){const _0x4892cc=_0xbc40f2;var _0x48ea22,_0x1b096b;const {parentId:_0x159322,unitId:_0x1be4c6,text:_0x20269a,threadId:_0x44c47f}=_0x328230,_0x1d909e=(_0x1b096b=(_0x48ea22=_0x20269a[_0x4892cc(0x15a)])==null?void 0x0:_0x48ea22[_0x4892cc(0x18b)](_0x3313cc=>_0x3313cc[_0x4892cc(0x193)]===_0x49ccf8['CustomRangeType'][_0x4892cc(0x16b)])[_0x4892cc(0x125)](_0x5b93ac=>_0x5b93ac['rangeId']))!=null?_0x1b096b:[],_0x47369d=JSON['stringify'](_0x20269a),_0xd1f9c9=(await this['_sessionService'][_0x4892cc(0x12b)](_0x1be4c6))[_0x4892cc(0x1aa)]();if(_0x159322){const _0x49e992={'memberId':_0xd1f9c9,'unitId':_0x1be4c6,'content':_0x47369d,'mention':_0x1d909e,'threadId':_0x44c47f},_0x5423d5=(await this[_0x4892cc(0x16c)][_0x4892cc(0x133)](_0x4892cc(0x13c)+_0x1be4c6+_0x4892cc(0x153),{'body':_0x49e992}))[_0x4892cc(0x17f)]['reply'];return{..._0x328230,'id':_0x5423d5[_0x4892cc(0x15b)],'dT':_0x49ccf8[_0x4892cc(0x143)](+_0x5423d5[_0x4892cc(0x189)])[_0x4892cc(0x168)](_0x4892cc(0x162)),'personId':_0x5423d5[_0x4892cc(0x16e)]};}else{const _0x2d36ac={'memberId':_0xd1f9c9,'unitId':_0x1be4c6,'content':_0x47369d,'mention':_0x1d909e},_0x3b6ffc=await this['_httpService'][_0x4892cc(0x133)](_0x4892cc(0x13c)+_0x1be4c6+_0x4892cc(0x19b),{'body':_0x2d36ac});return _0xba955b(_0x3b6ffc['body'][_0x4892cc(0x1a0)],_0x328230);}}async[_0xbc40f2(0x137)](_0x36c811){const _0x4e6f2f=_0xbc40f2;var _0x2adc48,_0x3d4042;const {text:_0x3dde95,unitId:_0x426068}=_0x36c811,_0x225522=(_0x3d4042=(_0x2adc48=_0x3dde95[_0x4e6f2f(0x15a)])==null?void 0x0:_0x2adc48['filter'](_0x3ba467=>_0x3ba467[_0x4e6f2f(0x193)]===_0x49ccf8[_0x4e6f2f(0x169)][_0x4e6f2f(0x16b)])[_0x4e6f2f(0x125)](_0x3d1c04=>_0x3d1c04[_0x4e6f2f(0x15e)]))!=null?_0x3d4042:[],_0x43efd6=JSON[_0x4e6f2f(0x146)](_0x3dde95),_0x230712=_0x36c811[_0x4e6f2f(0x170)],_0x4b70aa=_0x36c811['id'],_0x4845aa={'memberId':(await this[_0x4e6f2f(0x134)][_0x4e6f2f(0x12b)](_0x426068))[_0x4e6f2f(0x1aa)](),'unitId':_0x426068,'threadId':_0x230712,'mention':_0x225522,'content':_0x43efd6,'replyId':_0x4b70aa},_0x4aa269=await this[_0x4e6f2f(0x16c)][_0x4e6f2f(0x133)]('/universer-api/comment/unit/'+_0x426068+_0x4e6f2f(0x139),{'body':_0x4845aa});return!_0x4aa269[_0x4e6f2f(0x17f)]['error']||_0x4aa269[_0x4e6f2f(0x17f)][_0x4e6f2f(0x19c)][_0x4e6f2f(0x179)]===0x1;}async['resolveComment'](_0x1ea087){const _0x1abcdf=_0xbc40f2,{unitId:_0x428b00}=_0x1ea087,_0x37b250=_0x1ea087[_0x1abcdf(0x170)],_0x23a4b8={'memberId':this[_0x1abcdf(0x191)][_0x1abcdf(0x152)]()[_0x1abcdf(0x1a7)],'unitId':_0x428b00,'threadId':_0x37b250,'solved':_0x1ea087[_0x1abcdf(0x160)]?_0x3e564a[_0x1abcdf(0x1a6)]:_0x3e564a[_0x1abcdf(0x176)]},_0x85db2b=await this['_httpService'][_0x1abcdf(0x133)](_0x1abcdf(0x13c)+_0x428b00+_0x1abcdf(0x1ac),{'body':_0x23a4b8});return!_0x85db2b['body'][_0x1abcdf(0x19c)]||_0x85db2b[_0x1abcdf(0x17f)]['error'][_0x1abcdf(0x179)]===0x1;}async['deleteComment'](_0xded9a3,_0x3f9641,_0x5e2f1d,_0x1747a7){const _0x34f292=_0xbc40f2,_0x23a718={'memberId':(await this[_0x34f292(0x134)][_0x34f292(0x12b)](_0xded9a3))['getMemberID'](),'threadId':_0x5e2f1d,'replyId':_0x1747a7,'unitId':_0xded9a3},_0x1e40eb=await this[_0x34f292(0x16c)][_0x34f292(0x133)]('/universer-api/comment/unit/'+_0xded9a3+_0x34f292(0x17c),{'body':_0x23a718});return!_0x1e40eb[_0x34f292(0x17f)][_0x34f292(0x19c)]||_0x1e40eb[_0x34f292(0x17f)][_0x34f292(0x19c)][_0x34f292(0x179)]===0x1;}async[_0xbc40f2(0x173)](_0x2e2649,_0x235506,_0x3d07c1){const _0x590c63=_0xbc40f2,_0xe291c0={'unitId':_0x2e2649,'threadId':_0x3d07c1},_0x32bccf=await this['_httpService']['post'](_0x590c63(0x13c)+_0x2e2649+_0x590c63(0x156),{'body':_0xe291c0}),_0x213273=_0x3d07c1[_0x590c63(0x125)](_0xbbaf6d=>_0x51df96(_0x32bccf[_0x590c63(0x17f)]['comments'][_0xbbaf6d],_0x2e2649,_0x235506))[_0x590c63(0x18b)](Boolean);return Object[_0x590c63(0x18c)](_0x32bccf[_0x590c63(0x17f)][_0x590c63(0x18f)])[_0x590c63(0x17e)](_0x26b631=>{const _0x27ccd7=_0x590c63;this[_0x27ccd7(0x191)][_0x27ccd7(0x17d)](_0x26b631);}),_0x213273;}[_0xbc40f2(0x1af)](_0x528141){const _0x491eda=_0xbc40f2;return{'id':_0x528141['id'],'threadId':_0x528141['threadId'],'ref':_0x528141[_0x491eda(0x18a)]};}};_0x8946e0=_0x6f4ec9([_0x351bb6(0x0,_0x49ccf8[_0xbc40f2(0x1ab)](_0x275513[_0xbc40f2(0x14d)])),_0x351bb6(0x1,_0x49ccf8[_0xbc40f2(0x1ab)](_0x49ccf8[_0xbc40f2(0x145)])),_0x351bb6(0x2,_0x49ccf8[_0xbc40f2(0x1ab)](_0x56c752[_0xbc40f2(0x17b)])),_0x351bb6(0x3,_0x49ccf8[_0xbc40f2(0x1ab)](_0x49ccf8['Injector']))],_0x8946e0);var _0x39766e=Object['getOwnPropertyDescriptor'],_0xd33cbe=(_0x58bb03,_0xde2d0e,_0x350ebb,_0x27c2ca)=>{const _0x21dba0=_0xbc40f2;for(var _0xcb1448=_0x27c2ca>0x1?void 0x0:_0x27c2ca?_0x39766e(_0xde2d0e,_0x350ebb):_0xde2d0e,_0x2a7d36=_0x58bb03[_0x21dba0(0x18e)]-0x1,_0x3c162c;_0x2a7d36>=0x0;_0x2a7d36--)(_0x3c162c=_0x58bb03[_0x2a7d36])&&(_0xcb1448=_0x3c162c(_0xcb1448)||_0xcb1448);return _0xcb1448;},_0x5e74c2=(_0x2e133d,_0x108493)=>(_0x3ee63e,_0x757e82)=>_0x108493(_0x3ee63e,_0x757e82,_0x2e133d);let _0x5c392d=class extends _0x49ccf8[_0xbc40f2(0x144)]{constructor(_0xe13635,_0x4abe62){const _0x82948b=_0xbc40f2;super(),this['_threadCommentDataSourceService']=_0xe13635,this[_0x82948b(0x15c)]=_0x4abe62,this['_initDataSource']();}[_0xbc40f2(0x158)](){const _0x5b92fe=_0xbc40f2;this[_0x5b92fe(0x17a)][_0x5b92fe(0x14f)]=this[_0x5b92fe(0x15c)],this[_0x5b92fe(0x17a)][_0x5b92fe(0x1a4)]=!0x1;}};_0x5c392d=_0xd33cbe([_0x5e74c2(0x0,_0x40ee22[_0xbc40f2(0x19f)]),_0x5e74c2(0x1,_0x49ccf8[_0xbc40f2(0x1ab)](_0x8946e0))],_0x5c392d);var _0x22184d=Object[_0xbc40f2(0x197)],_0x48f5ca=Object['getOwnPropertyDescriptor'],_0x2a261a=(_0x31d6aa,_0x5609b6,_0x5c648a)=>_0x5609b6 in _0x31d6aa?_0x22184d(_0x31d6aa,_0x5609b6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c648a}):_0x31d6aa[_0x5609b6]=_0x5c648a,_0x819943=(_0x2cf1f2,_0xff9986,_0x27d574,_0x59072d)=>{for(var _0x38e32d=_0x59072d>0x1?void 0x0:_0x59072d?_0x48f5ca(_0xff9986,_0x27d574):_0xff9986,_0x195124=_0x2cf1f2['length']-0x1,_0x313ec0;_0x195124>=0x0;_0x195124--)(_0x313ec0=_0x2cf1f2[_0x195124])&&(_0x38e32d=_0x313ec0(_0x38e32d)||_0x38e32d);return _0x38e32d;},_0x5287b7=(_0x352d60,_0xaf15d8)=>(_0x5bb551,_0x2a5d9a)=>_0xaf15d8(_0x5bb551,_0x2a5d9a,_0x352d60),_0x46b35c=(_0x4aa174,_0x5fe9d2,_0x528673)=>_0x2a261a(_0x4aa174,typeof _0x5fe9d2!=_0xbc40f2(0x126)?_0x5fe9d2+'':_0x5fe9d2,_0x528673);_0x558cbb[_0xbc40f2(0x142)]=class extends _0x49ccf8[_0xbc40f2(0x1a3)]{constructor(_0x10d20e=_0x1b2c79,_0x12bbf0,_0x4b6220){const _0x4d274d=_0xbc40f2;super(),this[_0x4d274d(0x16d)]=_0x10d20e,this['_injector']=_0x12bbf0,this[_0x4d274d(0x161)]=_0x4b6220;const {..._0x5ac3b6}=_0x49ccf8['merge']({},_0x1b2c79,this[_0x4d274d(0x16d)]);this['_configService'][_0x4d274d(0x130)](_0x5a1e3f,_0x5ac3b6);}[_0xbc40f2(0x196)](){const _0x54e402=_0xbc40f2;[[_0x8946e0],[_0x5c392d],[_0x5c8dd9]][_0x54e402(0x17e)](_0x38c99e=>{const _0x211476=_0x54e402;this[_0x211476(0x12a)][_0x211476(0x167)](_0x38c99e);});}[_0xbc40f2(0x188)](){const _0x2cb630=_0xbc40f2;this['_injector'][_0x2cb630(0x198)](_0x5c392d),this['_injector']['get'](_0x5c8dd9);}},_0x46b35c(_0x558cbb[_0xbc40f2(0x142)],_0xbc40f2(0x199),_0x1cbfc1),_0x46b35c(_0x558cbb['UniverThreadCommentDataSourcePlugin'],_0xbc40f2(0x13e),_0x49ccf8[_0xbc40f2(0x1a2)]['UNIVER_UNKNOWN']),_0x558cbb[_0xbc40f2(0x142)]=_0x819943([_0x49ccf8[_0xbc40f2(0x184)](_0x5d7012[_0xbc40f2(0x165)],_0x56c752[_0xbc40f2(0x12f)],_0xe3a7ef['UniverLicensePlugin']),_0x5287b7(0x1,_0x49ccf8['Inject'](_0x49ccf8[_0xbc40f2(0x181)])),_0x5287b7(0x2,_0x49ccf8['IConfigService'])],_0x558cbb[_0xbc40f2(0x142)]),Object[_0xbc40f2(0x197)](_0x558cbb,Symbol[_0xbc40f2(0x12c)],{'value':_0xbc40f2(0x171)});}));
|
|
1
|
+
function _0x5c75(_0x219229,_0x2b1b81){const _0x10a129=_0x10a1();return _0x5c75=function(_0x5c75ef,_0x2cc3b0){_0x5c75ef=_0x5c75ef-0x19f;let _0x3cc356=_0x10a129[_0x5c75ef];return _0x3cc356;},_0x5c75(_0x219229,_0x2b1b81);}function _0x10a1(){const _0x16a63f=['getMemberID','OpenOrReOpen','commentUpdate$','_threadCommentDataSource','merge','solved','ref','length','object','Plugin','@univerjs/network','417MWejeF','function','type','UniverThreadCommentDataSourcePlugin','8gVlLaF','Disposable','getCurrentUser','payload','find','dayjs','forEach','/universer-api/user/list','UniverThreadCommentUi','_initUserSync','pluginName','defineProperty','/add','getUnit','Reply','/edit','Inject','UniverThreadComment','UniverProCollaborationClient','6pakJzQ','IThreadCommentDataSourceService','syncUpdateMutationToColla','Unknown','605547wtCYUS','UniverCollaborationClientPlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userID','2756411ZVkioK','Solve','_userService','replyId','rxjs','map','user','@univerjs/thread-comment','Injector','rangeType','IConfigService','COMMENT','_injector','personId','toStringTag','threadId','_config','/list','pipe','2079004ZrVjvO','dataSource','461884dKUVuD','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','replies','_configService','parse','code','delete','@univerjs/core','rangeId','error','2341695EAhgDy','_sessionService','symbol','3493260LUVDht','slice','UserManagerService','Add','@univerjs-pro/license','UniverCore','CustomRangeType','@univerjs/thread-comment-ui','parentId','createTimestamp','disposeWithMe','stringify','/delete','addUser','exports','/universer-api/comment/unit/','root','UNRECOGNIZED','_commentService','Module','add','post','reply','updateComment','deleteComment','customRanges','UniverInstanceType','CollaborationSessionService','UniverThreadCommentUIPlugin','body','unitId','users','amd','filter','resolveComment','userId','7838xSsPPV','ThreadCommentModel','_init','UniverProLicense','HTTPService','Solved','_initDataSource','_httpService','format','resolved','CommentService','get','Edit','requireSession','bufferTime','_threadCommentModel','content','@univerjs-pro/collaboration-client','subscribe','getOwnPropertyDescriptor'];_0x10a1=function(){return _0x16a63f;};return _0x10a1();}(function(_0x47c7c7,_0xebcf1e){const _0x3d6ef3=_0x5c75,_0x3e9716=_0x47c7c7();while(!![]){try{const _0x4929f3=parseInt(_0x3d6ef3(0x1fe))/0x1+parseInt(_0x3d6ef3(0x1ab))/0x2*(parseInt(_0x3d6ef3(0x1ca))/0x3)+-parseInt(_0x3d6ef3(0x1fc))/0x4+parseInt(_0x3d6ef3(0x209))/0x5+-parseInt(_0x3d6ef3(0x1e1))/0x6*(parseInt(_0x3d6ef3(0x1e9))/0x7)+parseInt(_0x3d6ef3(0x1ce))/0x8*(parseInt(_0x3d6ef3(0x1e5))/0x9)+-parseInt(_0x3d6ef3(0x20c))/0xa;if(_0x4929f3===_0xebcf1e)break;else _0x3e9716['push'](_0x3e9716['shift']());}catch(_0x14d74a){_0x3e9716['push'](_0x3e9716['shift']());}}}(_0x10a1,0x44365),function(_0x3ef09c,_0xe4a7b6){const _0x15fc46=_0x5c75;typeof exports==_0x15fc46(0x1c7)&&typeof module<'u'?_0xe4a7b6(exports,require(_0x15fc46(0x1bc)),require(_0x15fc46(0x210)),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require(_0x15fc46(0x1f0)),require(_0x15fc46(0x1ed)),require(_0x15fc46(0x1c9))):typeof define==_0x15fc46(0x1cb)&&define[_0x15fc46(0x1a7)]?define([_0x15fc46(0x21a),_0x15fc46(0x1bc),_0x15fc46(0x210),_0x15fc46(0x206),_0x15fc46(0x213),'@univerjs/thread-comment',_0x15fc46(0x1ed),_0x15fc46(0x1c9)],_0xe4a7b6):(_0x3ef09c=typeof globalThis<'u'?globalThis:_0x3ef09c||self,_0xe4a7b6(_0x3ef09c['UniverProThreadCommentDatasource']={},_0x3ef09c[_0x15fc46(0x1e0)],_0x3ef09c[_0x15fc46(0x1ae)],_0x3ef09c[_0x15fc46(0x211)],_0x3ef09c[_0x15fc46(0x1d6)],_0x3ef09c[_0x15fc46(0x1df)],_0x3ef09c['rxjs'],_0x3ef09c['UniverNetwork']));}(this,function(_0x449b61,_0x2ae46c,_0x34d216,_0x233f6d,_0x245617,_0x5c253f,_0x261f9e,_0x76628e){'use strict';const _0x3bdc4b=_0x5c75;const _0x1ec23e=_0x3bdc4b(0x1e7);var _0x48e63d=(_0x422c71=>(_0x422c71[_0x422c71[_0x3bdc4b(0x1c0)]=0x0]=_0x3bdc4b(0x1c0),_0x422c71[_0x422c71[_0x3bdc4b(0x1b0)]=0x1]=_0x3bdc4b(0x1b0),_0x422c71[_0x422c71['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x422c71))(_0x48e63d||{}),_0x5f30a4=(_0xb280d6=>(_0xb280d6[_0xb280d6['Unknown']=0x0]=_0x3bdc4b(0x1e4),_0xb280d6[_0xb280d6[_0x3bdc4b(0x20f)]=0x1]=_0x3bdc4b(0x20f),_0xb280d6[_0xb280d6['Reply']=0x2]=_0x3bdc4b(0x1dc),_0xb280d6[_0xb280d6[_0x3bdc4b(0x1b7)]=0x3]=_0x3bdc4b(0x1b7),_0xb280d6[_0xb280d6['Delete']=0x4]='Delete',_0xb280d6[_0xb280d6[_0x3bdc4b(0x1ea)]=0x5]='Solve',_0xb280d6[_0xb280d6['UNRECOGNIZED']=-0x1]=_0x3bdc4b(0x21d),_0xb280d6))(_0x5f30a4||{});const _0x39ca27=_0x2645df=>_0x233f6d[_0x3bdc4b(0x1d3)](new Date(+_0x2645df))['format']('YYYY/MM/DD\x20HH:mm'),_0x1cb772=async(_0x5c6b23,_0x493d98)=>{const _0x189540=_0x3bdc4b,_0x56fc79=_0x5c6b23['get'](_0x233f6d['UserManagerService']),_0x140944=_0x5c6b23[_0x189540(0x1b6)](_0x76628e[_0x189540(0x1af)]);_0x493d98['forEach'](_0x51ddbc=>{const _0x1fc219=_0x189540;_0x56fc79['getUser'](_0x51ddbc)&&_0x493d98[_0x1fc219(0x205)](_0x51ddbc);}),_0x493d98['size']&&(await _0x140944[_0x189540(0x1b6)](_0x189540(0x1d5),{'params':{'userIDs':[..._0x493d98]}}))['body']['users'][_0x189540(0x1d4)](_0x4503a1=>{const _0x404eb9=_0x189540;_0x4503a1&&_0x56fc79[_0x404eb9(0x219)](_0x4503a1);});};var _0x2c781c=Object['getOwnPropertyDescriptor'],_0x844576=(_0x41bce1,_0x37f796,_0x2a166e,_0x462299)=>{const _0x5256b5=_0x3bdc4b;for(var _0x15651a=_0x462299>0x1?void 0x0:_0x462299?_0x2c781c(_0x37f796,_0x2a166e):_0x37f796,_0x2ab43d=_0x41bce1[_0x5256b5(0x1c6)]-0x1,_0x1c6730;_0x2ab43d>=0x0;_0x2ab43d--)(_0x1c6730=_0x41bce1[_0x2ab43d])&&(_0x15651a=_0x1c6730(_0x15651a)||_0x15651a);return _0x15651a;},_0x59b3e7=(_0x2c9c8b,_0x2ed191)=>(_0x3f4d1a,_0x3cb388)=>_0x2ed191(_0x3f4d1a,_0x3cb388,_0x2c9c8b);let _0x52dfe1=class extends _0x233f6d[_0x3bdc4b(0x1cf)]{constructor(_0xddeaec,_0x5d2ce2,_0xbbb86e,_0x2332c9){const _0x28b4c7=_0x3bdc4b;super(),this[_0x28b4c7(0x21e)]=_0xddeaec,this[_0x28b4c7(0x1ba)]=_0x5d2ce2,this[_0x28b4c7(0x1eb)]=_0xbbb86e,this[_0x28b4c7(0x1f5)]=_0x2332c9,this[_0x28b4c7(0x1ad)](),this[_0x28b4c7(0x1d7)]();}[_0x3bdc4b(0x1d7)](){const _0x330f5b=_0x3bdc4b;this['disposeWithMe'](this['_threadCommentModel'][_0x330f5b(0x1c1)][_0x330f5b(0x1fb)](_0x261f9e[_0x330f5b(0x1b9)](0x10))['subscribe'](_0x31ebc8=>{const _0x394299=_0x330f5b,_0xd03763=new Set();_0x31ebc8['forEach'](_0x5e5bbf=>{const _0x34831e=_0x5c75;switch(_0x5e5bbf[_0x34831e(0x1cc)]){case _0x34831e(0x220):{const _0x21cada=_0x5e5bbf[_0x34831e(0x1d1)][_0x34831e(0x1f6)];_0xd03763[_0x34831e(0x220)](_0x21cada);break;}}}),_0x1cb772(this[_0x394299(0x1f5)],_0xd03763);}));}[_0x3bdc4b(0x1ad)](){const _0x19b3bb=_0x3bdc4b;this[_0x19b3bb(0x216)](this[_0x19b3bb(0x21e)][_0x19b3bb(0x1c1)][_0x19b3bb(0x1bd)](async _0x1b1e11=>{const _0x16857=_0x19b3bb;var _0x52fafe,_0xa3a642,_0x24fbc8,_0x3087a2;const _0x45490a=(_0x52fafe=this[_0x16857(0x1ba)][_0x16857(0x1db)](_0x1b1e11[_0x16857(0x1a5)])[_0x16857(0x1d2)](_0x55bfe3=>_0x55bfe3[_0x16857(0x1f8)]===_0x1b1e11['threadId']))==null?void 0x0:_0x52fafe['root'];if(!_0x45490a)return;const {unitId:_0x4f04c2,subUnitId:_0xa709df}=_0x45490a;switch(_0x1b1e11['user']&&this['_userService']['addUser'](_0x1b1e11[_0x16857(0x1ef)]),_0x1b1e11['type']){case _0x5f30a4['Add']:break;case _0x5f30a4[_0x16857(0x1dc)]:{this[_0x16857(0x1ba)]['addComment'](_0x4f04c2,_0xa709df,{'unitId':_0x4f04c2,'subUnitId':_0xa709df,'ref':'','id':_0x1b1e11[_0x16857(0x1ec)],'dT':_0x39ca27(+_0x1b1e11[_0x16857(0x215)]),'threadId':_0x1b1e11[_0x16857(0x1f8)],'personId':(_0x24fbc8=(_0xa3a642=_0x1b1e11[_0x16857(0x1ef)])==null?void 0x0:_0xa3a642[_0x16857(0x1e8)])!=null?_0x24fbc8:_0x1b1e11[_0x16857(0x1aa)],'text':JSON[_0x16857(0x203)](_0x1b1e11['content']),'parentId':_0x45490a['id']});break;}case _0x5f30a4['Delete']:{const _0x2e0f2f=this['_threadCommentModel']['getComment'](_0x4f04c2,_0xa709df,_0x1b1e11['replyId']);_0x2e0f2f&&_0x2e0f2f[_0x16857(0x214)]&&this['_threadCommentModel']['deleteComment'](_0x4f04c2,_0xa709df,_0x1b1e11[_0x16857(0x1ec)]);break;}case _0x5f30a4['Edit']:{this[_0x16857(0x1ba)]['updateComment'](_0x4f04c2,_0xa709df,{'commentId':_0x1b1e11[_0x16857(0x1ec)],'text':JSON[_0x16857(0x203)](_0x1b1e11['content'])});break;}case _0x5f30a4['Solve']:{const _0x3a28f8=(_0x3087a2=this[_0x16857(0x1ba)]['getUnit'](_0x1b1e11[_0x16857(0x1a5)])[_0x16857(0x1d2)](_0x10c729=>_0x10c729[_0x16857(0x1f8)]===_0x1b1e11[_0x16857(0x1f8)]))==null?void 0x0:_0x3087a2[_0x16857(0x21c)];_0x3a28f8&&this[_0x16857(0x1ba)][_0x16857(0x1a9)](_0x4f04c2,_0xa709df,_0x3a28f8['id'],_0x1b1e11[_0x16857(0x1c4)]===_0x48e63d[_0x16857(0x1b0)]);break;}}}));}};_0x52dfe1=_0x844576([_0x59b3e7(0x0,_0x233f6d[_0x3bdc4b(0x1de)](_0x2ae46c[_0x3bdc4b(0x1b5)])),_0x59b3e7(0x1,_0x233f6d[_0x3bdc4b(0x1de)](_0x5c253f[_0x3bdc4b(0x1ac)])),_0x59b3e7(0x2,_0x233f6d[_0x3bdc4b(0x1de)](_0x233f6d['UserManagerService'])),_0x59b3e7(0x3,_0x233f6d[_0x3bdc4b(0x1de)](_0x233f6d[_0x3bdc4b(0x1f1)]))],_0x52dfe1);const _0x582ece='thread-comment-data-source.config',_0x4532a2={};var _0x5516ec=Object[_0x3bdc4b(0x1be)],_0x438f33=(_0x3a28c6,_0x46a3a1,_0x299df7,_0x393473)=>{const _0x322794=_0x3bdc4b;for(var _0x4840ba=_0x393473>0x1?void 0x0:_0x393473?_0x5516ec(_0x46a3a1,_0x299df7):_0x46a3a1,_0x2b70d3=_0x3a28c6[_0x322794(0x1c6)]-0x1,_0x249f57;_0x2b70d3>=0x0;_0x2b70d3--)(_0x249f57=_0x3a28c6[_0x2b70d3])&&(_0x4840ba=_0x249f57(_0x4840ba)||_0x4840ba);return _0x4840ba;},_0x3427ac=(_0x7139e9,_0xb2d530)=>(_0x567280,_0x232be6)=>_0xb2d530(_0x567280,_0x232be6,_0x7139e9);function _0x1e92e5(_0x3110fb,_0xd0b475){const _0x29f6ea=_0x3bdc4b,_0x25a780=_0x3110fb[_0x29f6ea(0x201)][0x0];return{..._0xd0b475,'id':_0x25a780[_0x29f6ea(0x1ec)],'resolved':_0x3110fb[_0x29f6ea(0x1c4)]===0x1,'dT':_0x39ca27(_0x25a780[_0x29f6ea(0x215)]),'personId':_0x25a780[_0x29f6ea(0x1aa)],'threadId':_0x25a780['threadId']};}function _0x27ca2e(_0x5879f0,_0xffb3dc,_0x3f20df){const _0x2653d8=_0x3bdc4b;var _0x386201,_0x2ff588;if(((_0x2ff588=(_0x386201=_0x5879f0==null?void 0x0:_0x5879f0[_0x2653d8(0x201)])==null?void 0x0:_0x386201[_0x2653d8(0x1c6)])!=null?_0x2ff588:0x0)>0x0){const _0x3bb48b=(_0x8ed368,_0x434bd7)=>({'id':_0x8ed368[_0x2653d8(0x1ec)],'threadId':_0x8ed368[_0x2653d8(0x1f8)],'dT':_0x39ca27(_0x8ed368['createTimestamp']),'personId':_0x8ed368[_0x2653d8(0x1aa)],'resolved':_0x5879f0[_0x2653d8(0x1c4)]===_0x48e63d[_0x2653d8(0x1b0)],'unitId':_0xffb3dc,'subUnitId':_0x3f20df,'text':JSON['parse'](_0x8ed368[_0x2653d8(0x1bb)]),'parentId':_0x434bd7}),_0x5e00fe=_0x3bb48b(_0x5879f0['replies'][0x0]);return{..._0x5e00fe,'children':_0x5879f0[_0x2653d8(0x201)][_0x2653d8(0x20d)](0x1)['map'](_0x390b9d=>_0x3bb48b(_0x390b9d,_0x5e00fe['id']))};}return null;}let _0x164e30=class{constructor(_0x266935,_0x5c7749,_0x29e277,_0x405ec){const _0x26e6be=_0x3bdc4b;this[_0x26e6be(0x1b2)]=_0x266935,this[_0x26e6be(0x1eb)]=_0x5c7749,this['_sessionService']=_0x29e277,this[_0x26e6be(0x1f5)]=_0x405ec;}async['addComment'](_0x20f571){const _0xe39d7d=_0x3bdc4b;var _0x37305d,_0x1f01dc;const {parentId:_0x545b28,unitId:_0x195ae2,text:_0x48bed1,threadId:_0xa49575}=_0x20f571,_0x4abb16=(_0x1f01dc=(_0x37305d=_0x48bed1[_0xe39d7d(0x1a0)])==null?void 0x0:_0x37305d[_0xe39d7d(0x1a8)](_0x463412=>_0x463412['rangeType']===_0x233f6d[_0xe39d7d(0x212)][_0xe39d7d(0x1f4)])[_0xe39d7d(0x1ee)](_0x29d015=>_0x29d015['rangeId']))!=null?_0x1f01dc:[],_0xe37acb=JSON[_0xe39d7d(0x217)](_0x48bed1),_0x3111e3=(await this['_sessionService']['requireSession'](_0x195ae2))[_0xe39d7d(0x1bf)]();if(_0x545b28){const _0x62f844={'memberId':_0x3111e3,'unitId':_0x195ae2,'content':_0xe37acb,'mention':_0x4abb16,'threadId':_0xa49575},_0x1dbfdb=(await this['_httpService'][_0xe39d7d(0x221)](_0xe39d7d(0x21b)+_0x195ae2+'/reply',{'body':_0x62f844}))[_0xe39d7d(0x1a4)][_0xe39d7d(0x222)];return{..._0x20f571,'id':_0x1dbfdb[_0xe39d7d(0x1ec)],'dT':_0x233f6d[_0xe39d7d(0x1d3)](+_0x1dbfdb[_0xe39d7d(0x215)])[_0xe39d7d(0x1b3)](_0xe39d7d(0x1ff)),'personId':_0x1dbfdb[_0xe39d7d(0x1aa)]};}else{const _0x391b7c={'memberId':_0x3111e3,'unitId':_0x195ae2,'content':_0xe37acb,'mention':_0x4abb16},_0x33a058=await this['_httpService'][_0xe39d7d(0x221)](_0xe39d7d(0x21b)+_0x195ae2+_0xe39d7d(0x1da),{'body':_0x391b7c});return _0x1e92e5(_0x33a058[_0xe39d7d(0x1a4)]['comment'],_0x20f571);}}async[_0x3bdc4b(0x223)](_0x7b6af8){const _0x595c7f=_0x3bdc4b;var _0x473614,_0x5f0ea7;const {text:_0x2a86c1,unitId:_0x268798}=_0x7b6af8,_0x56f439=(_0x5f0ea7=(_0x473614=_0x2a86c1[_0x595c7f(0x1a0)])==null?void 0x0:_0x473614['filter'](_0x721ef8=>_0x721ef8[_0x595c7f(0x1f2)]===_0x233f6d[_0x595c7f(0x212)][_0x595c7f(0x1f4)])[_0x595c7f(0x1ee)](_0x276850=>_0x276850[_0x595c7f(0x207)]))!=null?_0x5f0ea7:[],_0x100332=JSON[_0x595c7f(0x217)](_0x2a86c1),_0x2328ba=_0x7b6af8[_0x595c7f(0x1f8)],_0x12b861=_0x7b6af8['id'],_0x2199c7={'memberId':(await this[_0x595c7f(0x20a)][_0x595c7f(0x1b8)](_0x268798))[_0x595c7f(0x1bf)](),'unitId':_0x268798,'threadId':_0x2328ba,'mention':_0x56f439,'content':_0x100332,'replyId':_0x12b861},_0x143602=await this[_0x595c7f(0x1b2)][_0x595c7f(0x221)](_0x595c7f(0x21b)+_0x268798+_0x595c7f(0x1dd),{'body':_0x2199c7});return!_0x143602[_0x595c7f(0x1a4)][_0x595c7f(0x208)]||_0x143602[_0x595c7f(0x1a4)][_0x595c7f(0x208)][_0x595c7f(0x204)]===0x1;}async[_0x3bdc4b(0x1a9)](_0x2f0e52){const _0x3e3232=_0x3bdc4b,{unitId:_0x30caa5}=_0x2f0e52,_0x3b77e1=_0x2f0e52[_0x3e3232(0x1f8)],_0xb35993={'memberId':this[_0x3e3232(0x1eb)][_0x3e3232(0x1d0)]()[_0x3e3232(0x1e8)],'unitId':_0x30caa5,'threadId':_0x3b77e1,'solved':_0x2f0e52[_0x3e3232(0x1b4)]?_0x48e63d[_0x3e3232(0x1b0)]:_0x48e63d[_0x3e3232(0x1c0)]},_0x874aed=await this['_httpService'][_0x3e3232(0x221)](_0x3e3232(0x21b)+_0x30caa5+'/solved',{'body':_0xb35993});return!_0x874aed[_0x3e3232(0x1a4)]['error']||_0x874aed[_0x3e3232(0x1a4)][_0x3e3232(0x208)][_0x3e3232(0x204)]===0x1;}async[_0x3bdc4b(0x19f)](_0xe40e49,_0x2621a3,_0x5d6b1b,_0xb7a700){const _0x3d14d3=_0x3bdc4b,_0x3c54c7={'memberId':(await this[_0x3d14d3(0x20a)][_0x3d14d3(0x1b8)](_0xe40e49))[_0x3d14d3(0x1bf)](),'threadId':_0x5d6b1b,'replyId':_0xb7a700,'unitId':_0xe40e49},_0x2bcce8=await this[_0x3d14d3(0x1b2)][_0x3d14d3(0x221)](_0x3d14d3(0x21b)+_0xe40e49+_0x3d14d3(0x218),{'body':_0x3c54c7});return!_0x2bcce8['body'][_0x3d14d3(0x208)]||_0x2bcce8[_0x3d14d3(0x1a4)][_0x3d14d3(0x208)][_0x3d14d3(0x204)]===0x1;}async['listComments'](_0x6c3c36,_0x56f1e8,_0x8df4ab){const _0x1d3aba=_0x3bdc4b,_0x31bba5={'unitId':_0x6c3c36,'threadId':_0x8df4ab},_0x58a41b=await this['_httpService'][_0x1d3aba(0x221)]('/universer-api/comment/unit/'+_0x6c3c36+_0x1d3aba(0x1fa),{'body':_0x31bba5}),_0x24634d=_0x8df4ab[_0x1d3aba(0x1ee)](_0x517b20=>_0x27ca2e(_0x58a41b[_0x1d3aba(0x1a4)]['comments'][_0x517b20],_0x6c3c36,_0x56f1e8))[_0x1d3aba(0x1a8)](Boolean);return Object['values'](_0x58a41b[_0x1d3aba(0x1a4)][_0x1d3aba(0x1a6)])[_0x1d3aba(0x1d4)](_0x3740f0=>{const _0x5582df=_0x1d3aba;this[_0x5582df(0x1eb)][_0x5582df(0x219)](_0x3740f0);}),_0x24634d;}['saveCommentToSnapshot'](_0x2fb6a2){const _0x3280ac=_0x3bdc4b;return{'id':_0x2fb6a2['id'],'threadId':_0x2fb6a2[_0x3280ac(0x1f8)],'ref':_0x2fb6a2[_0x3280ac(0x1c5)]};}};_0x164e30=_0x438f33([_0x3427ac(0x0,_0x233f6d['Inject'](_0x76628e[_0x3bdc4b(0x1af)])),_0x3427ac(0x1,_0x233f6d['Inject'](_0x233f6d[_0x3bdc4b(0x20e)])),_0x3427ac(0x2,_0x233f6d[_0x3bdc4b(0x1de)](_0x2ae46c[_0x3bdc4b(0x1a2)])),_0x3427ac(0x3,_0x233f6d[_0x3bdc4b(0x1de)](_0x233f6d[_0x3bdc4b(0x1f1)]))],_0x164e30);var _0x4bc854=Object[_0x3bdc4b(0x1be)],_0x29c0c3=(_0x5cfbdd,_0x2d0f70,_0x3909a6,_0x6d1d5c)=>{const _0x4c549a=_0x3bdc4b;for(var _0x178236=_0x6d1d5c>0x1?void 0x0:_0x6d1d5c?_0x4bc854(_0x2d0f70,_0x3909a6):_0x2d0f70,_0x4ad0df=_0x5cfbdd[_0x4c549a(0x1c6)]-0x1,_0x1bd30c;_0x4ad0df>=0x0;_0x4ad0df--)(_0x1bd30c=_0x5cfbdd[_0x4ad0df])&&(_0x178236=_0x1bd30c(_0x178236)||_0x178236);return _0x178236;},_0x5d9f6c=(_0x5a2dbb,_0x48dce5)=>(_0x100ad9,_0x58be7d)=>_0x48dce5(_0x100ad9,_0x58be7d,_0x5a2dbb);let _0x4226b0=class extends _0x233f6d[_0x3bdc4b(0x1cf)]{constructor(_0x1a528f,_0x599d21){const _0x6a932c=_0x3bdc4b;super(),this['_threadCommentDataSourceService']=_0x1a528f,this[_0x6a932c(0x1c2)]=_0x599d21,this[_0x6a932c(0x1b1)]();}[_0x3bdc4b(0x1b1)](){const _0x4d68d4=_0x3bdc4b;this[_0x4d68d4(0x200)][_0x4d68d4(0x1fd)]=this['_threadCommentDataSource'],this[_0x4d68d4(0x200)][_0x4d68d4(0x1e3)]=!0x1;}};_0x4226b0=_0x29c0c3([_0x5d9f6c(0x0,_0x5c253f[_0x3bdc4b(0x1e2)]),_0x5d9f6c(0x1,_0x233f6d['Inject'](_0x164e30))],_0x4226b0);var _0x466ee=Object[_0x3bdc4b(0x1d9)],_0x11f6a1=Object[_0x3bdc4b(0x1be)],_0x5788b7=(_0x4aeea2,_0x31841c,_0xa704d3)=>_0x31841c in _0x4aeea2?_0x466ee(_0x4aeea2,_0x31841c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xa704d3}):_0x4aeea2[_0x31841c]=_0xa704d3,_0x18ad6d=(_0x3fba82,_0x4eb6a3,_0x5c4963,_0x4bed87)=>{const _0x49b84c=_0x3bdc4b;for(var _0x225cd8=_0x4bed87>0x1?void 0x0:_0x4bed87?_0x11f6a1(_0x4eb6a3,_0x5c4963):_0x4eb6a3,_0x3fc3ec=_0x3fba82[_0x49b84c(0x1c6)]-0x1,_0x29b3b3;_0x3fc3ec>=0x0;_0x3fc3ec--)(_0x29b3b3=_0x3fba82[_0x3fc3ec])&&(_0x225cd8=_0x29b3b3(_0x225cd8)||_0x225cd8);return _0x225cd8;},_0x544505=(_0x9c57fa,_0x3d0d2c)=>(_0xbcfc2c,_0x3f78f0)=>_0x3d0d2c(_0xbcfc2c,_0x3f78f0,_0x9c57fa),_0x2db0bd=(_0x4f0c4a,_0x8453b3,_0x513b28)=>_0x5788b7(_0x4f0c4a,typeof _0x8453b3!=_0x3bdc4b(0x20b)?_0x8453b3+'':_0x8453b3,_0x513b28);_0x449b61[_0x3bdc4b(0x1cd)]=class extends _0x233f6d[_0x3bdc4b(0x1c8)]{constructor(_0x2172aa=_0x4532a2,_0x1658c1,_0x26cfa1){const _0x540e2a=_0x3bdc4b;super(),this['_config']=_0x2172aa,this['_injector']=_0x1658c1,this[_0x540e2a(0x202)]=_0x26cfa1;const {..._0x4a6101}=_0x233f6d[_0x540e2a(0x1c3)]({},_0x4532a2,this[_0x540e2a(0x1f9)]);this[_0x540e2a(0x202)]['setConfig'](_0x582ece,_0x4a6101);}['onStarting'](){[[_0x164e30],[_0x4226b0],[_0x52dfe1]]['forEach'](_0x41564f=>{const _0x2b5025=_0x5c75;this[_0x2b5025(0x1f5)]['add'](_0x41564f);});}['onReady'](){const _0x227459=_0x3bdc4b;this[_0x227459(0x1f5)][_0x227459(0x1b6)](_0x4226b0),this[_0x227459(0x1f5)][_0x227459(0x1b6)](_0x52dfe1);}},_0x2db0bd(_0x449b61[_0x3bdc4b(0x1cd)],_0x3bdc4b(0x1d8),_0x1ec23e),_0x2db0bd(_0x449b61[_0x3bdc4b(0x1cd)],_0x3bdc4b(0x1cc),_0x233f6d[_0x3bdc4b(0x1a1)]['UNIVER_UNKNOWN']),_0x449b61[_0x3bdc4b(0x1cd)]=_0x18ad6d([_0x233f6d['DependentOn'](_0x245617[_0x3bdc4b(0x1a3)],_0x2ae46c[_0x3bdc4b(0x1e6)],_0x34d216['UniverLicensePlugin']),_0x544505(0x1,_0x233f6d[_0x3bdc4b(0x1de)](_0x233f6d['Injector'])),_0x544505(0x2,_0x233f6d[_0x3bdc4b(0x1f3)])],_0x449b61[_0x3bdc4b(0x1cd)]),Object[_0x3bdc4b(0x1d9)](_0x449b61,Symbol[_0x3bdc4b(0x1f7)],{'value':_0x3bdc4b(0x21f)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.10-nightly.
|
|
3
|
+
"version": "0.6.10-nightly.202504221607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,19 +45,19 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.6.10-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.6.10-nightly.
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/thread-comment": "0.6.10-nightly.
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.10-nightly.202504221607",
|
|
49
|
+
"@univerjs-pro/license": "0.6.10-nightly.202504221607",
|
|
50
|
+
"@univerjs/core": "0.6.10-nightly.202504221607",
|
|
51
|
+
"@univerjs/thread-comment": "0.6.10-nightly.202504221607",
|
|
52
|
+
"@univerjs/network": "0.6.10-nightly.202504221607",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.6.10-nightly.202504221607",
|
|
54
|
+
"@univerjs/protocol": "0.1.46-alpha.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vite": "^6.3.0",
|
|
60
|
-
"vitest": "^3.1.
|
|
60
|
+
"vitest": "^3.1.2",
|
|
61
61
|
"@univerjs-infra/shared": "0.6.10"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|