@univerjs-pro/thread-comment-datasource 0.10.6-experimental.20250903-f52e3bf → 0.10.6-experimental.20250904-9591d16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x232800=_0x2f6c;(function(_0x4cef54,_0x570db4){const _0x42d198=_0x2f6c,_0x41ff4b=_0x4cef54();while(!![]){try{const _0x687806=-parseInt(_0x42d198(0x142))/0x1+-parseInt(_0x42d198(0xfd))/0x2*(parseInt(_0x42d198(0xd3))/0x3)+-parseInt(_0x42d198(0x140))/0x4+parseInt(_0x42d198(0xe5))/0x5*(-parseInt(_0x42d198(0xff))/0x6)+-parseInt(_0x42d198(0x137))/0x7+parseInt(_0x42d198(0xfa))/0x8*(-parseInt(_0x42d198(0x135))/0x9)+-parseInt(_0x42d198(0x149))/0xa*(-parseInt(_0x42d198(0x139))/0xb);if(_0x687806===_0x570db4)break;else _0x41ff4b['push'](_0x41ff4b['shift']());}catch(_0x58a28a){_0x41ff4b['push'](_0x41ff4b['shift']());}}}(_0x4da0,0x6bbe6));Object[_0x232800(0x145)](exports,Symbol[_0x232800(0x118)],{'value':_0x232800(0xda)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x53ee4c=>(_0x53ee4c[_0x53ee4c[_0x232800(0x119)]=0x0]=_0x232800(0x119),_0x53ee4c[_0x53ee4c[_0x232800(0x13a)]=0x1]='Solved',_0x53ee4c[_0x53ee4c['UNRECOGNIZED']=-0x1]=_0x232800(0x102),_0x53ee4c))(I||{}),v=(_0x166b5b=>(_0x166b5b[_0x166b5b[_0x232800(0xf8)]=0x0]=_0x232800(0xf8),_0x166b5b[_0x166b5b[_0x232800(0xe9)]=0x1]=_0x232800(0xe9),_0x166b5b[_0x166b5b[_0x232800(0x126)]=0x2]=_0x232800(0x126),_0x166b5b[_0x166b5b[_0x232800(0xee)]=0x3]=_0x232800(0xee),_0x166b5b[_0x166b5b[_0x232800(0x105)]=0x4]=_0x232800(0x105),_0x166b5b[_0x166b5b['Solve']=0x5]=_0x232800(0x127),_0x166b5b[_0x166b5b[_0x232800(0x102)]=-0x1]=_0x232800(0x102),_0x166b5b))(v||{});const f=_0x284b9c=>c[_0x232800(0x13b)](new Date(+_0x284b9c))[_0x232800(0x117)](_0x232800(0xf0)),R=async(_0x209bf9,_0x206fde)=>{const _0x6aaccc=_0x232800,_0x33cf93=_0x209bf9[_0x6aaccc(0x12c)](c[_0x6aaccc(0xe6)]),_0x44e7b0=_0x209bf9['get'](P[_0x6aaccc(0x10c)]);_0x206fde[_0x6aaccc(0x120)](_0xd1394a=>{const _0x57a77f=_0x6aaccc;_0x33cf93[_0x57a77f(0xd4)](_0xd1394a)&&_0x206fde['delete'](_0xd1394a);}),_0x206fde['size']&&(await _0x44e7b0[_0x6aaccc(0x12c)]('/universer-api/user/list',{'params':{'userIDs':[..._0x206fde]}}))[_0x6aaccc(0xfc)]['users'][_0x6aaccc(0x120)](_0x42a8d6=>{const _0x506eb1=_0x6aaccc;_0x42a8d6&&_0x33cf93[_0x506eb1(0x132)](_0x42a8d6);});};var $=Object[_0x232800(0xed)],E=(_0x2da6c7,_0x50889f,_0x3a8414,_0x4e096e)=>{const _0x58bc84=_0x232800;for(var _0x21a82f=_0x4e096e>0x1?void 0x0:_0x4e096e?$(_0x50889f,_0x3a8414):_0x50889f,_0x3c2f0f=_0x2da6c7[_0x58bc84(0x115)]-0x1,_0x3f9aca;_0x3c2f0f>=0x0;_0x3c2f0f--)(_0x3f9aca=_0x2da6c7[_0x3c2f0f])&&(_0x21a82f=_0x3f9aca(_0x21a82f)||_0x21a82f);return _0x21a82f;},S=(_0x11941d,_0x2d0f0c)=>(_0x2eafc3,_0x41e4f4)=>_0x2d0f0c(_0x2eafc3,_0x41e4f4,_0x11941d);let _=class extends c[_0x232800(0x136)]{constructor(_0x579f24,_0x2c4c37,_0x5e134f,_0x380eb3){const _0x26a89b=_0x232800;super(),this[_0x26a89b(0x10a)]=_0x579f24,this[_0x26a89b(0x13e)]=_0x2c4c37,this[_0x26a89b(0xd2)]=_0x5e134f,this['_injector']=_0x380eb3,this[_0x26a89b(0x13c)](),this[_0x26a89b(0xe3)]();}[_0x232800(0xe3)](){const _0x5528ac=_0x232800;this[_0x5528ac(0x11f)](this[_0x5528ac(0x13e)][_0x5528ac(0xe4)][_0x5528ac(0xde)](j[_0x5528ac(0x12b)](0x10))[_0x5528ac(0x143)](_0x3acec4=>{const _0x1498c5=_0x5528ac,_0x4eac11=new Set();_0x3acec4[_0x1498c5(0x120)](_0xe11b62=>{const _0xd70e6c=_0x1498c5;switch(_0xe11b62[_0xd70e6c(0x12f)]){case _0xd70e6c(0xdc):{const _0x194e1d=_0xe11b62['payload']['personId'];_0x4eac11[_0xd70e6c(0xdc)](_0x194e1d);break;}}}),R(this[_0x1498c5(0xd0)],_0x4eac11);}));}['_init'](){const _0x286d85=_0x232800;this[_0x286d85(0x11f)](this['_commentService']['commentUpdate$'][_0x286d85(0x143)](async _0x51c5d3=>{const _0x15f401=_0x286d85;var _0x4e8f12,_0x412f47,_0x309fd2,_0x4f2c69;const _0x383e2a=(_0x4e8f12=this[_0x15f401(0x13e)][_0x15f401(0x110)](_0x51c5d3['unitId'])[_0x15f401(0xfb)](_0x225c0f=>_0x225c0f['threadId']===_0x51c5d3[_0x15f401(0xf6)]))==null?void 0x0:_0x4e8f12[_0x15f401(0x112)];if(!_0x383e2a)return;const {unitId:_0x545aa6,subUnitId:_0x1df2d0}=_0x383e2a;switch(_0x51c5d3[_0x15f401(0x11d)]&&this[_0x15f401(0xd2)][_0x15f401(0x132)](_0x51c5d3[_0x15f401(0x11d)]),_0x51c5d3[_0x15f401(0x12f)]){case v[_0x15f401(0xe9)]:break;case v['Reply']:{this['_threadCommentModel'][_0x15f401(0xf7)](_0x545aa6,_0x1df2d0,{'unitId':_0x545aa6,'subUnitId':_0x1df2d0,'ref':'','id':_0x51c5d3[_0x15f401(0xd8)],'dT':f(+_0x51c5d3[_0x15f401(0x10f)]),'threadId':_0x51c5d3[_0x15f401(0xf6)],'personId':(_0x309fd2=(_0x412f47=_0x51c5d3[_0x15f401(0x11d)])==null?void 0x0:_0x412f47['userID'])!=null?_0x309fd2:_0x51c5d3['userId'],'text':JSON['parse'](_0x51c5d3[_0x15f401(0x10d)]),'parentId':_0x383e2a['id']});break;}case v[_0x15f401(0x105)]:{const _0xbe11c4=this[_0x15f401(0x13e)][_0x15f401(0x101)](_0x545aa6,_0x1df2d0,_0x51c5d3[_0x15f401(0xd8)]);_0xbe11c4&&_0xbe11c4[_0x15f401(0x12a)]&&this[_0x15f401(0x13e)][_0x15f401(0xef)](_0x545aa6,_0x1df2d0,_0x51c5d3[_0x15f401(0xd8)]);break;}case v[_0x15f401(0xee)]:{this[_0x15f401(0x13e)][_0x15f401(0x131)](_0x545aa6,_0x1df2d0,{'commentId':_0x51c5d3[_0x15f401(0xd8)],'text':JSON['parse'](_0x51c5d3['content'])});break;}case v[_0x15f401(0x127)]:{const _0x17b61d=(_0x4f2c69=this[_0x15f401(0x13e)][_0x15f401(0x110)](_0x51c5d3[_0x15f401(0x133)])[_0x15f401(0xfb)](_0x28b666=>_0x28b666[_0x15f401(0xf6)]===_0x51c5d3[_0x15f401(0xf6)]))==null?void 0x0:_0x4f2c69[_0x15f401(0x112)];_0x17b61d&&this[_0x15f401(0x13e)][_0x15f401(0x122)](_0x545aa6,_0x1df2d0,_0x17b61d['id'],_0x51c5d3[_0x15f401(0x13d)]===I[_0x15f401(0x13a)]);break;}}}));}};_=E([S(0x0,c[_0x232800(0x12e)](b[_0x232800(0xd6)])),S(0x1,c[_0x232800(0x12e)](M[_0x232800(0xfe)])),S(0x2,c[_0x232800(0x12e)](c[_0x232800(0xe6)])),S(0x3,c[_0x232800(0x12e)](c[_0x232800(0x111)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x232800(0xed)],x=(_0x25e1f7,_0x19ebc5,_0x37e45d,_0x697cd1)=>{const _0x1d9d8e=_0x232800;for(var _0x3983df=_0x697cd1>0x1?void 0x0:_0x697cd1?A(_0x19ebc5,_0x37e45d):_0x19ebc5,_0x133e19=_0x25e1f7[_0x1d9d8e(0x115)]-0x1,_0x209105;_0x133e19>=0x0;_0x133e19--)(_0x209105=_0x25e1f7[_0x133e19])&&(_0x3983df=_0x209105(_0x3983df)||_0x3983df);return _0x3983df;},C=(_0x1821cc,_0x2de965)=>(_0x26bc5f,_0x138d15)=>_0x2de965(_0x26bc5f,_0x138d15,_0x1821cc);function Y(_0x506859,_0x526012){const _0x4aba2d=_0x232800,_0x2d6cfb=_0x506859[_0x4aba2d(0x11b)][0x0];return{..._0x526012,'id':_0x2d6cfb[_0x4aba2d(0xd8)],'resolved':_0x506859[_0x4aba2d(0x13d)]===0x1,'dT':f(_0x2d6cfb[_0x4aba2d(0x10f)]),'personId':_0x2d6cfb[_0x4aba2d(0x13f)],'threadId':_0x2d6cfb[_0x4aba2d(0xf6)]};}function _0x4da0(){const _0x717f59=['UNRECOGNIZED','symbol','COMMENT','Delete','_config','/universer-api/comment/unit/','IConfigService','dataSource','_commentService','_sessionService','HTTPService','content','getCurrentUser','createTimestamp','getUnit','Injector','root','ref','merge','length','customRanges','format','toStringTag','OpenOrReOpen','UniverCollaborationClientPlugin','replies','saveCommentToSnapshot','user','IThreadCommentDataSourceService','disposeWithMe','forEach','filter','resolveComment','comments','UniverThreadCommentUIPlugin','CollaborationSessionService','Reply','Solve','listComments','UniverInstanceType','parentId','bufferTime','get','post','Inject','type','comment','updateComment','addUser','unitId','resolved','1179486VtfshR','Disposable','5777450yQImSE','setConfig','20017778VbDsIh','Solved','dayjs','_init','solved','_threadCommentModel','userId','3061972TnSrpo','_initDataSource','16818paLjYF','subscribe','users','defineProperty','error','/list','getMemberID','20xnbEGi','DependentOn','_httpService','code','/delete','_injector','pluginName','_userService','21XOVSAW','getUser','UniverLicensePlugin','CommentService','CustomRangeType','replyId','/solved','Module','onReady','add','syncUpdateMutationToColla','pipe','/add','Plugin','slice','_threadCommentDataSource','_initUserSync','commentUpdate$','4405730QDOloJ','UserManagerService','map','_threadCommentDataSourceService','Add','UniverThreadCommentDataSourcePlugin','/edit','/reply','getOwnPropertyDescriptor','Edit','deleteComment','YYYY/MM/DD\x20HH:mm','requireSession','_configService','UNIVER_UNKNOWN','parse','rangeId','threadId','addComment','Unknown','stringify','8EEcovH','find','body','165262Ryzjsf','ThreadCommentModel','6LtUnDY','rangeType','getComment'];_0x4da0=function(){return _0x717f59;};return _0x4da0();}function G(_0x5ab6b5,_0x477dcd,_0x38dbd8){const _0x570768=_0x232800;var _0x205fd0,_0x14f7e5;if(((_0x14f7e5=(_0x205fd0=_0x5ab6b5==null?void 0x0:_0x5ab6b5['replies'])==null?void 0x0:_0x205fd0[_0x570768(0x115)])!=null?_0x14f7e5:0x0)>0x0){const _0x1e73f4=(_0x1a2bd3,_0x2b1e5d)=>({'id':_0x1a2bd3[_0x570768(0xd8)],'threadId':_0x1a2bd3[_0x570768(0xf6)],'dT':f(_0x1a2bd3[_0x570768(0x10f)]),'personId':_0x1a2bd3[_0x570768(0x13f)],'resolved':_0x5ab6b5['solved']===I['Solved'],'unitId':_0x477dcd,'subUnitId':_0x38dbd8,'text':JSON[_0x570768(0xf4)](_0x1a2bd3['content']),'parentId':_0x2b1e5d}),_0x5e9e44=_0x1e73f4(_0x5ab6b5[_0x570768(0x11b)][0x0]);return{..._0x5e9e44,'children':_0x5ab6b5[_0x570768(0x11b)][_0x570768(0xe1)](0x1)[_0x570768(0xe7)](_0x2787c8=>_0x1e73f4(_0x2787c8,_0x5e9e44['id']))};}return null;}let p=class{constructor(_0xd98f83,_0x384ffb,_0x32addd){const _0x35c11c=_0x232800;this[_0x35c11c(0x14b)]=_0xd98f83,this[_0x35c11c(0xd2)]=_0x384ffb,this[_0x35c11c(0x10b)]=_0x32addd;}async[_0x232800(0xf7)](_0x52c3a5){const _0x21b70e=_0x232800;var _0x2d6257,_0x1a8319;const {parentId:_0x44dc39,unitId:_0x1c2efe,text:_0x2a0e21,threadId:_0x266f95}=_0x52c3a5,_0x58d29e=(_0x1a8319=(_0x2d6257=_0x2a0e21[_0x21b70e(0x116)])==null?void 0x0:_0x2d6257[_0x21b70e(0x121)](_0x434278=>_0x434278[_0x21b70e(0x100)]===c[_0x21b70e(0xd7)][_0x21b70e(0x104)])[_0x21b70e(0xe7)](_0x234003=>_0x234003[_0x21b70e(0xf5)]))!=null?_0x1a8319:[],_0x5da659=JSON[_0x21b70e(0xf9)](_0x2a0e21),_0x312697=(await this[_0x21b70e(0x10b)]['requireSession'](_0x1c2efe))['getMemberID']();if(_0x44dc39){const _0x535cb2={'memberId':_0x312697,'unitId':_0x1c2efe,'content':_0x5da659,'mention':_0x58d29e,'threadId':_0x266f95},_0x2143ca=(await this['_httpService'][_0x21b70e(0x12d)](_0x21b70e(0x107)+_0x1c2efe+_0x21b70e(0xec),{'body':_0x535cb2}))[_0x21b70e(0xfc)]['reply'];return{..._0x52c3a5,'id':_0x2143ca[_0x21b70e(0xd8)],'dT':c[_0x21b70e(0x13b)](+_0x2143ca[_0x21b70e(0x10f)])[_0x21b70e(0x117)](_0x21b70e(0xf0)),'personId':_0x2143ca[_0x21b70e(0x13f)]};}else{const _0x460dad={'memberId':_0x312697,'unitId':_0x1c2efe,'content':_0x5da659,'mention':_0x58d29e},_0xb84c0e=await this[_0x21b70e(0x14b)][_0x21b70e(0x12d)](_0x21b70e(0x107)+_0x1c2efe+_0x21b70e(0xdf),{'body':_0x460dad});return Y(_0xb84c0e[_0x21b70e(0xfc)][_0x21b70e(0x130)],_0x52c3a5);}}async[_0x232800(0x131)](_0xbe2287){const _0x25bd2c=_0x232800;var _0x2bb2a3,_0x20c21c;const {text:_0x25d993,unitId:_0x54e56e}=_0xbe2287,_0x843773=(_0x20c21c=(_0x2bb2a3=_0x25d993['customRanges'])==null?void 0x0:_0x2bb2a3[_0x25bd2c(0x121)](_0x25a29e=>_0x25a29e[_0x25bd2c(0x100)]===c[_0x25bd2c(0xd7)][_0x25bd2c(0x104)])[_0x25bd2c(0xe7)](_0x5b02f1=>_0x5b02f1['rangeId']))!=null?_0x20c21c:[],_0x25ade0=JSON[_0x25bd2c(0xf9)](_0x25d993),_0x35ad10=_0xbe2287['threadId'],_0x1a38ca=_0xbe2287['id'],_0x335074={'memberId':(await this[_0x25bd2c(0x10b)][_0x25bd2c(0xf1)](_0x54e56e))[_0x25bd2c(0x148)](),'unitId':_0x54e56e,'threadId':_0x35ad10,'mention':_0x843773,'content':_0x25ade0,'replyId':_0x1a38ca},_0x5731cc=await this[_0x25bd2c(0x14b)]['post'](_0x25bd2c(0x107)+_0x54e56e+_0x25bd2c(0xeb),{'body':_0x335074});return!_0x5731cc[_0x25bd2c(0xfc)][_0x25bd2c(0x146)]||_0x5731cc[_0x25bd2c(0xfc)][_0x25bd2c(0x146)][_0x25bd2c(0xce)]===0x1;}async[_0x232800(0x122)](_0x139b71){const _0x39aa16=_0x232800,{unitId:_0x3941fc}=_0x139b71,_0x2d335c=_0x139b71[_0x39aa16(0xf6)],_0xc46bbc={'memberId':this[_0x39aa16(0xd2)][_0x39aa16(0x10e)]()['userID'],'unitId':_0x3941fc,'threadId':_0x2d335c,'solved':_0x139b71[_0x39aa16(0x134)]?I[_0x39aa16(0x13a)]:I[_0x39aa16(0x119)]},_0x2d656c=await this[_0x39aa16(0x14b)][_0x39aa16(0x12d)](_0x39aa16(0x107)+_0x3941fc+_0x39aa16(0xd9),{'body':_0xc46bbc});return!_0x2d656c[_0x39aa16(0xfc)][_0x39aa16(0x146)]||_0x2d656c['body'][_0x39aa16(0x146)][_0x39aa16(0xce)]===0x1;}async[_0x232800(0xef)](_0x3f6177,_0x53d5b3,_0x3c6c4d,_0x3dac18){const _0x41dc85=_0x232800,_0x13680a={'memberId':(await this[_0x41dc85(0x10b)][_0x41dc85(0xf1)](_0x3f6177))[_0x41dc85(0x148)](),'threadId':_0x3c6c4d,'replyId':_0x3dac18,'unitId':_0x3f6177},_0x2c8d20=await this[_0x41dc85(0x14b)]['post'](_0x41dc85(0x107)+_0x3f6177+_0x41dc85(0xcf),{'body':_0x13680a});return!_0x2c8d20[_0x41dc85(0xfc)][_0x41dc85(0x146)]||_0x2c8d20[_0x41dc85(0xfc)]['error']['code']===0x1;}async[_0x232800(0x128)](_0xd81062,_0x369037,_0x37f49b){const _0x46dff5=_0x232800,_0x54c628={'unitId':_0xd81062,'threadId':_0x37f49b},_0x17646f=await this['_httpService'][_0x46dff5(0x12d)](_0x46dff5(0x107)+_0xd81062+_0x46dff5(0x147),{'body':_0x54c628}),_0x432580=_0x37f49b['map'](_0x4f6392=>G(_0x17646f[_0x46dff5(0xfc)][_0x46dff5(0x123)][_0x4f6392],_0xd81062,_0x369037))[_0x46dff5(0x121)](Boolean);return Object['values'](_0x17646f['body'][_0x46dff5(0x144)])['forEach'](_0x2d3203=>{const _0x28521a=_0x46dff5;this['_userService'][_0x28521a(0x132)](_0x2d3203);}),_0x432580;}[_0x232800(0x11c)](_0x28246f){const _0x14ac55=_0x232800;return{'id':_0x28246f['id'],'threadId':_0x28246f[_0x14ac55(0xf6)],'ref':_0x28246f[_0x14ac55(0x113)]};}};function _0x2f6c(_0x308771,_0x63d342){const _0x4da0f0=_0x4da0();return _0x2f6c=function(_0x2f6cce,_0x165cbc){_0x2f6cce=_0x2f6cce-0xce;let _0x11983f=_0x4da0f0[_0x2f6cce];return _0x11983f;},_0x2f6c(_0x308771,_0x63d342);}p=x([C(0x0,c[_0x232800(0x12e)](P[_0x232800(0x10c)])),C(0x1,c[_0x232800(0x12e)](c[_0x232800(0xe6)])),C(0x2,c[_0x232800(0x12e)](b[_0x232800(0x125)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x5d588e,_0x19c714,_0x16a5a3,_0x40004e)=>{const _0x4aef67=_0x232800;for(var _0x27d31d=_0x40004e>0x1?void 0x0:_0x40004e?H(_0x19c714,_0x16a5a3):_0x19c714,_0x48607d=_0x5d588e[_0x4aef67(0x115)]-0x1,_0x28f728;_0x48607d>=0x0;_0x48607d--)(_0x28f728=_0x5d588e[_0x48607d])&&(_0x27d31d=_0x28f728(_0x27d31d)||_0x27d31d);return _0x27d31d;},y=(_0x218727,_0x59bce8)=>(_0xd91f64,_0x5f4857)=>_0x59bce8(_0xd91f64,_0x5f4857,_0x218727);let g=class extends c[_0x232800(0x136)]{constructor(_0x3fd8dc,_0x5dc067){const _0x47eee9=_0x232800;super(),this[_0x47eee9(0xe8)]=_0x3fd8dc,this['_threadCommentDataSource']=_0x5dc067,this['_initDataSource']();}[_0x232800(0x141)](){const _0xcf11d9=_0x232800;this['_threadCommentDataSourceService'][_0xcf11d9(0x109)]=this[_0xcf11d9(0xe2)],this['_threadCommentDataSourceService'][_0xcf11d9(0xdd)]=!0x1;}};g=J([y(0x0,M[_0x232800(0x11e)]),y(0x1,c[_0x232800(0x12e)](p))],g);var F=Object[_0x232800(0x145)],L=Object[_0x232800(0xed)],Z=(_0x5283f9,_0x2b3b3f,_0x42b621)=>_0x2b3b3f in _0x5283f9?F(_0x5283f9,_0x2b3b3f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x42b621}):_0x5283f9[_0x2b3b3f]=_0x42b621,W=(_0x1e8ee3,_0x2de0a7,_0xdd8b2f,_0x3a9f2b)=>{const _0x5694b0=_0x232800;for(var _0x3ea703=_0x3a9f2b>0x1?void 0x0:_0x3a9f2b?L(_0x2de0a7,_0xdd8b2f):_0x2de0a7,_0x3f33b7=_0x1e8ee3[_0x5694b0(0x115)]-0x1,_0x37b398;_0x3f33b7>=0x0;_0x3f33b7--)(_0x37b398=_0x1e8ee3[_0x3f33b7])&&(_0x3ea703=_0x37b398(_0x3ea703)||_0x3ea703);return _0x3ea703;},O=(_0x1f4802,_0x4ed76f)=>(_0x4f7ff6,_0x1f2db6)=>_0x4ed76f(_0x4f7ff6,_0x1f2db6,_0x1f4802),N=(_0x354e25,_0x1ef61d,_0x59fe12)=>Z(_0x354e25,typeof _0x1ef61d!=_0x232800(0x103)?_0x1ef61d+'':_0x1ef61d,_0x59fe12);exports[_0x232800(0xea)]=class extends c[_0x232800(0xe0)]{constructor(_0x5c7f8b=D,_0x2d27bc,_0x4270e6){const _0x4602b9=_0x232800;super(),this[_0x4602b9(0x106)]=_0x5c7f8b,this[_0x4602b9(0xd0)]=_0x2d27bc,this[_0x4602b9(0xf2)]=_0x4270e6;const {..._0x296edd}=c[_0x4602b9(0x114)]({},D,this[_0x4602b9(0x106)]);this[_0x4602b9(0xf2)][_0x4602b9(0x138)](q,_0x296edd);}['onStarting'](){const _0x29ead1=_0x232800;[[p],[g],[_]][_0x29ead1(0x120)](_0x311977=>{const _0x4ba5f9=_0x29ead1;this[_0x4ba5f9(0xd0)]['add'](_0x311977);});}[_0x232800(0xdb)](){const _0x22b8b8=_0x232800;this[_0x22b8b8(0xd0)][_0x22b8b8(0x12c)](g),this['_injector'][_0x22b8b8(0x12c)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x232800(0xd1),U),N(exports[_0x232800(0xea)],_0x232800(0x12f),c[_0x232800(0x129)][_0x232800(0xf3)]),exports[_0x232800(0xea)]=W([c[_0x232800(0x14a)](w[_0x232800(0x124)],b[_0x232800(0x11a)],T[_0x232800(0xd5)]),O(0x1,c[_0x232800(0x12e)](c[_0x232800(0x111)])),O(0x2,c[_0x232800(0x108)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x59fa75=_0x28ea;(function(_0x1259e2,_0x393018){const _0x200562=_0x28ea,_0x262acb=_0x1259e2();while(!![]){try{const _0x1bda8b=-parseInt(_0x200562(0x1d7))/0x1+-parseInt(_0x200562(0x1dc))/0x2+-parseInt(_0x200562(0x1d8))/0x3+parseInt(_0x200562(0x1df))/0x4+parseInt(_0x200562(0x1e2))/0x5+parseInt(_0x200562(0x1e8))/0x6*(-parseInt(_0x200562(0x19d))/0x7)+-parseInt(_0x200562(0x191))/0x8*(-parseInt(_0x200562(0x1c5))/0x9);if(_0x1bda8b===_0x393018)break;else _0x262acb['push'](_0x262acb['shift']());}catch(_0xb68819){_0x262acb['push'](_0x262acb['shift']());}}}(_0x3fa4,0xd07af));Object[_0x59fa75(0x186)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x35b38e=>(_0x35b38e[_0x35b38e['OpenOrReOpen']=0x0]=_0x59fa75(0x190),_0x35b38e[_0x35b38e[_0x59fa75(0x178)]=0x1]=_0x59fa75(0x178),_0x35b38e[_0x35b38e['UNRECOGNIZED']=-0x1]=_0x59fa75(0x174),_0x35b38e))(I||{}),v=(_0x506303=>(_0x506303[_0x506303['Unknown']=0x0]=_0x59fa75(0x1b1),_0x506303[_0x506303[_0x59fa75(0x1cb)]=0x1]='Add',_0x506303[_0x506303['Reply']=0x2]='Reply',_0x506303[_0x506303[_0x59fa75(0x1b4)]=0x3]='Edit',_0x506303[_0x506303['Delete']=0x4]=_0x59fa75(0x1d9),_0x506303[_0x506303[_0x59fa75(0x185)]=0x5]=_0x59fa75(0x185),_0x506303[_0x506303[_0x59fa75(0x174)]=-0x1]=_0x59fa75(0x174),_0x506303))(v||{});function _0x3fa4(){const _0xec4133=['getComment','4399932aRviLk','commentUpdate$','customRanges','3285065wVkWRm','CollaborationSessionService','delete','getMemberID','UniverLicensePlugin','rangeType','120SMvVRi','_commentService','personId','UniverInstanceType','_initDataSource','DependentOn','UNRECOGNIZED','/reply','/add','replyId','Solved','UserManagerService','body','CommentService','parse','_userService','reply','getUnit','resolveComment','comment','add','values','filter','Solve','defineProperty','rangeId','thread-comment-data-source.config','getOwnPropertyDescriptor','Reply','solved','/solved','disposeWithMe','Injector','map','OpenOrReOpen','8NyeAuM','length','UniverCollaborationClientPlugin','find','root','get','size','createTimestamp','slice','updateComment','onReady','subscribe','466711BBfAIy','saveCommentToSnapshot','dayjs','syncUpdateMutationToColla','pluginName','Inject','IConfigService','content','UniverThreadCommentUIPlugin','_httpService','HTTPService','UniverThreadCommentDataSourcePlugin','_config','post','_injector','/universer-api/user/list','_configService','Plugin','getCurrentUser','setConfig','Unknown','requireSession','symbol','Edit','error','code','threadId','_sessionService','replies','/edit','dataSource','user','forEach','getUser','Disposable','unitId','/universer-api/comment/unit/','comments','CustomRangeType','stringify','28119051OhXUkg','ref','resolved','userId','type','pipe','Add','addUser','merge','YYYY/MM/DD\x20HH:mm','COMMENT','/delete','parentId','onStarting','_threadCommentDataSource','_threadCommentModel','_initUserSync','deleteComment','217045qBIqqh','4351770crlkIn','Delete','UNIVER_UNKNOWN','userID','2052610cyYycZ','addComment'];_0x3fa4=function(){return _0xec4133;};return _0x3fa4();}function _0x28ea(_0x58ad3e,_0x5514fd){const _0x3fa4f9=_0x3fa4();return _0x28ea=function(_0x28ea0b,_0x47dd47){_0x28ea0b=_0x28ea0b-0x174;let _0x22e492=_0x3fa4f9[_0x28ea0b];return _0x22e492;},_0x28ea(_0x58ad3e,_0x5514fd);}const f=_0x562171=>c[_0x59fa75(0x19f)](new Date(+_0x562171))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x5334df,_0x3e845d)=>{const _0x4e801f=_0x59fa75,_0x25abbd=_0x5334df[_0x4e801f(0x196)](c['UserManagerService']),_0x33687f=_0x5334df[_0x4e801f(0x196)](P[_0x4e801f(0x1a7)]);_0x3e845d['forEach'](_0x4cc28f=>{const _0x3eee29=_0x4e801f;_0x25abbd[_0x3eee29(0x1be)](_0x4cc28f)&&_0x3e845d[_0x3eee29(0x1e4)](_0x4cc28f);}),_0x3e845d[_0x4e801f(0x197)]&&(await _0x33687f[_0x4e801f(0x196)](_0x4e801f(0x1ac),{'params':{'userIDs':[..._0x3e845d]}}))[_0x4e801f(0x17a)]['users'][_0x4e801f(0x1bd)](_0x53face=>{const _0x20c6e8=_0x4e801f;_0x53face&&_0x25abbd[_0x20c6e8(0x1cc)](_0x53face);});};var $=Object[_0x59fa75(0x189)],E=(_0x152758,_0x24f8a9,_0x30247d,_0x808f29)=>{for(var _0x224313=_0x808f29>0x1?void 0x0:_0x808f29?$(_0x24f8a9,_0x30247d):_0x24f8a9,_0xf4d8aa=_0x152758['length']-0x1,_0x46c887;_0xf4d8aa>=0x0;_0xf4d8aa--)(_0x46c887=_0x152758[_0xf4d8aa])&&(_0x224313=_0x46c887(_0x224313)||_0x224313);return _0x224313;},S=(_0x21eac7,_0x54c01c)=>(_0x132ed2,_0x5bfbd5)=>_0x54c01c(_0x132ed2,_0x5bfbd5,_0x21eac7);let _=class extends c[_0x59fa75(0x1bf)]{constructor(_0x56978a,_0x22af80,_0x43dffc,_0x2975bf){const _0x56ba23=_0x59fa75;super(),this[_0x56ba23(0x1e9)]=_0x56978a,this[_0x56ba23(0x1d4)]=_0x22af80,this[_0x56ba23(0x17d)]=_0x43dffc,this[_0x56ba23(0x1ab)]=_0x2975bf,this['_init'](),this['_initUserSync']();}[_0x59fa75(0x1d5)](){const _0x5ed8cd=_0x59fa75;this[_0x5ed8cd(0x18d)](this[_0x5ed8cd(0x1d4)][_0x5ed8cd(0x1e0)][_0x5ed8cd(0x1ca)](j['bufferTime'](0x10))[_0x5ed8cd(0x19c)](_0x398383=>{const _0x5da550=_0x5ed8cd,_0x23adfd=new Set();_0x398383['forEach'](_0x3a1676=>{const _0x5ea460=_0x28ea;switch(_0x3a1676['type']){case _0x5ea460(0x182):{const _0x7eaa23=_0x3a1676['payload'][_0x5ea460(0x1ea)];_0x23adfd[_0x5ea460(0x182)](_0x7eaa23);break;}}}),R(this[_0x5da550(0x1ab)],_0x23adfd);}));}['_init'](){const _0x6c0229=_0x59fa75;this[_0x6c0229(0x18d)](this[_0x6c0229(0x1e9)][_0x6c0229(0x1e0)][_0x6c0229(0x19c)](async _0x48169a=>{const _0x495d63=_0x6c0229;var _0x2e4a63,_0xcd9bc5,_0x502e1b,_0x1a6ada;const _0x185f2f=(_0x2e4a63=this['_threadCommentModel'][_0x495d63(0x17f)](_0x48169a[_0x495d63(0x1c0)])[_0x495d63(0x194)](_0x36db9f=>_0x36db9f[_0x495d63(0x1b7)]===_0x48169a[_0x495d63(0x1b7)]))==null?void 0x0:_0x2e4a63['root'];if(!_0x185f2f)return;const {unitId:_0x5b51f5,subUnitId:_0x389276}=_0x185f2f;switch(_0x48169a[_0x495d63(0x1bc)]&&this[_0x495d63(0x17d)][_0x495d63(0x1cc)](_0x48169a['user']),_0x48169a['type']){case v[_0x495d63(0x1cb)]:break;case v[_0x495d63(0x18a)]:{this[_0x495d63(0x1d4)]['addComment'](_0x5b51f5,_0x389276,{'unitId':_0x5b51f5,'subUnitId':_0x389276,'ref':'','id':_0x48169a[_0x495d63(0x177)],'dT':f(+_0x48169a['createTimestamp']),'threadId':_0x48169a[_0x495d63(0x1b7)],'personId':(_0x502e1b=(_0xcd9bc5=_0x48169a[_0x495d63(0x1bc)])==null?void 0x0:_0xcd9bc5[_0x495d63(0x1db)])!=null?_0x502e1b:_0x48169a['userId'],'text':JSON[_0x495d63(0x17c)](_0x48169a[_0x495d63(0x1a4)]),'parentId':_0x185f2f['id']});break;}case v[_0x495d63(0x1d9)]:{const _0x39b51b=this['_threadCommentModel'][_0x495d63(0x1de)](_0x5b51f5,_0x389276,_0x48169a['replyId']);_0x39b51b&&_0x39b51b[_0x495d63(0x1d1)]&&this[_0x495d63(0x1d4)][_0x495d63(0x1d6)](_0x5b51f5,_0x389276,_0x48169a[_0x495d63(0x177)]);break;}case v[_0x495d63(0x1b4)]:{this['_threadCommentModel'][_0x495d63(0x19a)](_0x5b51f5,_0x389276,{'commentId':_0x48169a[_0x495d63(0x177)],'text':JSON[_0x495d63(0x17c)](_0x48169a[_0x495d63(0x1a4)])});break;}case v[_0x495d63(0x185)]:{const _0x5f5b2d=(_0x1a6ada=this[_0x495d63(0x1d4)]['getUnit'](_0x48169a[_0x495d63(0x1c0)])[_0x495d63(0x194)](_0x547311=>_0x547311[_0x495d63(0x1b7)]===_0x48169a[_0x495d63(0x1b7)]))==null?void 0x0:_0x1a6ada[_0x495d63(0x195)];_0x5f5b2d&&this[_0x495d63(0x1d4)][_0x495d63(0x180)](_0x5b51f5,_0x389276,_0x5f5b2d['id'],_0x48169a['solved']===I[_0x495d63(0x178)]);break;}}}));}};_=E([S(0x0,c[_0x59fa75(0x1a2)](b[_0x59fa75(0x17b)])),S(0x1,c[_0x59fa75(0x1a2)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x59fa75(0x179)])),S(0x3,c[_0x59fa75(0x1a2)](c[_0x59fa75(0x18e)]))],_);const q=_0x59fa75(0x188),D={};var A=Object[_0x59fa75(0x189)],x=(_0x3a1f21,_0x150de6,_0x5f0dcc,_0x490724)=>{const _0x1af7bc=_0x59fa75;for(var _0x1509f4=_0x490724>0x1?void 0x0:_0x490724?A(_0x150de6,_0x5f0dcc):_0x150de6,_0x4e0cab=_0x3a1f21[_0x1af7bc(0x192)]-0x1,_0xd48312;_0x4e0cab>=0x0;_0x4e0cab--)(_0xd48312=_0x3a1f21[_0x4e0cab])&&(_0x1509f4=_0xd48312(_0x1509f4)||_0x1509f4);return _0x1509f4;},C=(_0x26b149,_0xf9b301)=>(_0x1125c2,_0x458935)=>_0xf9b301(_0x1125c2,_0x458935,_0x26b149);function Y(_0x325ccc,_0x11242d){const _0x317cce=_0x59fa75,_0x2f5003=_0x325ccc[_0x317cce(0x1b9)][0x0];return{..._0x11242d,'id':_0x2f5003[_0x317cce(0x177)],'resolved':_0x325ccc[_0x317cce(0x18b)]===0x1,'dT':f(_0x2f5003[_0x317cce(0x198)]),'personId':_0x2f5003[_0x317cce(0x1c8)],'threadId':_0x2f5003[_0x317cce(0x1b7)]};}function G(_0x216643,_0x20b91f,_0x49deb7){const _0x20557a=_0x59fa75;var _0x510e7d,_0x27ba7a;if(((_0x27ba7a=(_0x510e7d=_0x216643==null?void 0x0:_0x216643[_0x20557a(0x1b9)])==null?void 0x0:_0x510e7d[_0x20557a(0x192)])!=null?_0x27ba7a:0x0)>0x0){const _0x129bfd=(_0x504a9b,_0x17aa28)=>({'id':_0x504a9b[_0x20557a(0x177)],'threadId':_0x504a9b[_0x20557a(0x1b7)],'dT':f(_0x504a9b[_0x20557a(0x198)]),'personId':_0x504a9b[_0x20557a(0x1c8)],'resolved':_0x216643[_0x20557a(0x18b)]===I[_0x20557a(0x178)],'unitId':_0x20b91f,'subUnitId':_0x49deb7,'text':JSON['parse'](_0x504a9b[_0x20557a(0x1a4)]),'parentId':_0x17aa28}),_0x561652=_0x129bfd(_0x216643[_0x20557a(0x1b9)][0x0]);return{..._0x561652,'children':_0x216643[_0x20557a(0x1b9)][_0x20557a(0x199)](0x1)[_0x20557a(0x18f)](_0x6a8530=>_0x129bfd(_0x6a8530,_0x561652['id']))};}return null;}let p=class{constructor(_0x283659,_0x2aa68d,_0x6ddc78){const _0x57a4e4=_0x59fa75;this[_0x57a4e4(0x1a6)]=_0x283659,this['_userService']=_0x2aa68d,this['_sessionService']=_0x6ddc78;}async[_0x59fa75(0x1dd)](_0x10274a){const _0x522503=_0x59fa75;var _0x5bc5f7,_0x230df4;const {parentId:_0x17bb17,unitId:_0x2858cd,text:_0x5d174b,threadId:_0x97b971}=_0x10274a,_0x3a7c68=(_0x230df4=(_0x5bc5f7=_0x5d174b[_0x522503(0x1e1)])==null?void 0x0:_0x5bc5f7['filter'](_0x197221=>_0x197221[_0x522503(0x1e7)]===c['CustomRangeType']['COMMENT'])['map'](_0x223a11=>_0x223a11['rangeId']))!=null?_0x230df4:[],_0x419b09=JSON['stringify'](_0x5d174b),_0x2f4921=(await this[_0x522503(0x1b8)]['requireSession'](_0x2858cd))[_0x522503(0x1e5)]();if(_0x17bb17){const _0x4b2095={'memberId':_0x2f4921,'unitId':_0x2858cd,'content':_0x419b09,'mention':_0x3a7c68,'threadId':_0x97b971},_0xd27f80=(await this[_0x522503(0x1a6)][_0x522503(0x1aa)](_0x522503(0x1c1)+_0x2858cd+_0x522503(0x175),{'body':_0x4b2095}))[_0x522503(0x17a)][_0x522503(0x17e)];return{..._0x10274a,'id':_0xd27f80['replyId'],'dT':c[_0x522503(0x19f)](+_0xd27f80['createTimestamp'])['format'](_0x522503(0x1ce)),'personId':_0xd27f80[_0x522503(0x1c8)]};}else{const _0x3d2b7a={'memberId':_0x2f4921,'unitId':_0x2858cd,'content':_0x419b09,'mention':_0x3a7c68},_0x26cf6e=await this[_0x522503(0x1a6)][_0x522503(0x1aa)]('/universer-api/comment/unit/'+_0x2858cd+_0x522503(0x176),{'body':_0x3d2b7a});return Y(_0x26cf6e[_0x522503(0x17a)][_0x522503(0x181)],_0x10274a);}}async['updateComment'](_0x16a561){const _0x3e42fc=_0x59fa75;var _0x3c4342,_0x56b530;const {text:_0x2afde0,unitId:_0x428277}=_0x16a561,_0x567d1c=(_0x56b530=(_0x3c4342=_0x2afde0[_0x3e42fc(0x1e1)])==null?void 0x0:_0x3c4342['filter'](_0x5c7ac2=>_0x5c7ac2[_0x3e42fc(0x1e7)]===c[_0x3e42fc(0x1c3)][_0x3e42fc(0x1cf)])[_0x3e42fc(0x18f)](_0x3bd1c3=>_0x3bd1c3[_0x3e42fc(0x187)]))!=null?_0x56b530:[],_0x2de9da=JSON[_0x3e42fc(0x1c4)](_0x2afde0),_0x487f44=_0x16a561[_0x3e42fc(0x1b7)],_0x1c1b09=_0x16a561['id'],_0x4eb37d={'memberId':(await this['_sessionService']['requireSession'](_0x428277))[_0x3e42fc(0x1e5)](),'unitId':_0x428277,'threadId':_0x487f44,'mention':_0x567d1c,'content':_0x2de9da,'replyId':_0x1c1b09},_0x2e112e=await this['_httpService'][_0x3e42fc(0x1aa)](_0x3e42fc(0x1c1)+_0x428277+_0x3e42fc(0x1ba),{'body':_0x4eb37d});return!_0x2e112e['body']['error']||_0x2e112e['body'][_0x3e42fc(0x1b5)][_0x3e42fc(0x1b6)]===0x1;}async[_0x59fa75(0x180)](_0x333576){const _0x3bbefa=_0x59fa75,{unitId:_0x307522}=_0x333576,_0x5db4b7=_0x333576[_0x3bbefa(0x1b7)],_0x53a841={'memberId':this[_0x3bbefa(0x17d)][_0x3bbefa(0x1af)]()['userID'],'unitId':_0x307522,'threadId':_0x5db4b7,'solved':_0x333576[_0x3bbefa(0x1c7)]?I['Solved']:I[_0x3bbefa(0x190)]},_0x202fb2=await this['_httpService'][_0x3bbefa(0x1aa)](_0x3bbefa(0x1c1)+_0x307522+_0x3bbefa(0x18c),{'body':_0x53a841});return!_0x202fb2[_0x3bbefa(0x17a)][_0x3bbefa(0x1b5)]||_0x202fb2[_0x3bbefa(0x17a)]['error'][_0x3bbefa(0x1b6)]===0x1;}async[_0x59fa75(0x1d6)](_0x50a21a,_0x52c2d5,_0x18bd98,_0x399a94){const _0x5a302c=_0x59fa75,_0x1cbe5a={'memberId':(await this['_sessionService'][_0x5a302c(0x1b2)](_0x50a21a))[_0x5a302c(0x1e5)](),'threadId':_0x18bd98,'replyId':_0x399a94,'unitId':_0x50a21a},_0x3acceb=await this[_0x5a302c(0x1a6)][_0x5a302c(0x1aa)]('/universer-api/comment/unit/'+_0x50a21a+_0x5a302c(0x1d0),{'body':_0x1cbe5a});return!_0x3acceb[_0x5a302c(0x17a)]['error']||_0x3acceb[_0x5a302c(0x17a)]['error'][_0x5a302c(0x1b6)]===0x1;}async['listComments'](_0x5a5abe,_0x1dadcb,_0x5ba044){const _0x57da44=_0x59fa75,_0x24bc84={'unitId':_0x5a5abe,'threadId':_0x5ba044},_0x500633=await this['_httpService'][_0x57da44(0x1aa)](_0x57da44(0x1c1)+_0x5a5abe+'/list',{'body':_0x24bc84}),_0xdb0f46=_0x5ba044[_0x57da44(0x18f)](_0x557f54=>G(_0x500633['body'][_0x57da44(0x1c2)][_0x557f54],_0x5a5abe,_0x1dadcb))[_0x57da44(0x184)](Boolean);return Object[_0x57da44(0x183)](_0x500633[_0x57da44(0x17a)]['users'])['forEach'](_0x149269=>{this['_userService']['addUser'](_0x149269);}),_0xdb0f46;}[_0x59fa75(0x19e)](_0x5b7001){const _0x5c9bc2=_0x59fa75;return{'id':_0x5b7001['id'],'threadId':_0x5b7001['threadId'],'ref':_0x5b7001[_0x5c9bc2(0x1c6)]};}};p=x([C(0x0,c[_0x59fa75(0x1a2)](P[_0x59fa75(0x1a7)])),C(0x1,c['Inject'](c[_0x59fa75(0x179)])),C(0x2,c[_0x59fa75(0x1a2)](b[_0x59fa75(0x1e3)]))],p);var H=Object[_0x59fa75(0x189)],J=(_0xdbfd27,_0x1619b0,_0xee5469,_0x2291d8)=>{for(var _0x23b726=_0x2291d8>0x1?void 0x0:_0x2291d8?H(_0x1619b0,_0xee5469):_0x1619b0,_0x301ace=_0xdbfd27['length']-0x1,_0x3dbb3e;_0x301ace>=0x0;_0x301ace--)(_0x3dbb3e=_0xdbfd27[_0x301ace])&&(_0x23b726=_0x3dbb3e(_0x23b726)||_0x23b726);return _0x23b726;},y=(_0x110598,_0x3fee7f)=>(_0xb7b6e4,_0x379b3f)=>_0x3fee7f(_0xb7b6e4,_0x379b3f,_0x110598);let g=class extends c[_0x59fa75(0x1bf)]{constructor(_0x44bc05,_0x1f300a){const _0x530ca1=_0x59fa75;super(),this['_threadCommentDataSourceService']=_0x44bc05,this[_0x530ca1(0x1d3)]=_0x1f300a,this[_0x530ca1(0x1ec)]();}[_0x59fa75(0x1ec)](){const _0x11433d=_0x59fa75;this['_threadCommentDataSourceService'][_0x11433d(0x1bb)]=this[_0x11433d(0x1d3)],this['_threadCommentDataSourceService'][_0x11433d(0x1a0)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x59fa75(0x1a2)](p))],g);var F=Object[_0x59fa75(0x186)],L=Object[_0x59fa75(0x189)],Z=(_0x5068d1,_0x3b7527,_0x8b20cd)=>_0x3b7527 in _0x5068d1?F(_0x5068d1,_0x3b7527,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8b20cd}):_0x5068d1[_0x3b7527]=_0x8b20cd,W=(_0x46c249,_0x45bc59,_0x50c243,_0x3e05dd)=>{for(var _0x1db9ae=_0x3e05dd>0x1?void 0x0:_0x3e05dd?L(_0x45bc59,_0x50c243):_0x45bc59,_0x568b11=_0x46c249['length']-0x1,_0x443b9e;_0x568b11>=0x0;_0x568b11--)(_0x443b9e=_0x46c249[_0x568b11])&&(_0x1db9ae=_0x443b9e(_0x1db9ae)||_0x1db9ae);return _0x1db9ae;},O=(_0x354c65,_0xed409d)=>(_0xef1645,_0x18550f)=>_0xed409d(_0xef1645,_0x18550f,_0x354c65),N=(_0x451b13,_0x480e45,_0x54f166)=>Z(_0x451b13,typeof _0x480e45!=_0x59fa75(0x1b3)?_0x480e45+'':_0x480e45,_0x54f166);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x59fa75(0x1ae)]{constructor(_0xd06a8c=D,_0x46735c,_0x31ff89){const _0x438e41=_0x59fa75;super(),this[_0x438e41(0x1a9)]=_0xd06a8c,this[_0x438e41(0x1ab)]=_0x46735c,this[_0x438e41(0x1ad)]=_0x31ff89;const {..._0x3ca28d}=c[_0x438e41(0x1cd)]({},D,this[_0x438e41(0x1a9)]);this['_configService'][_0x438e41(0x1b0)](q,_0x3ca28d);}[_0x59fa75(0x1d2)](){const _0x134498=_0x59fa75;[[p],[g],[_]][_0x134498(0x1bd)](_0x1e680e=>{const _0x5b4047=_0x134498;this[_0x5b4047(0x1ab)]['add'](_0x1e680e);});}[_0x59fa75(0x19b)](){const _0x5cf567=_0x59fa75;this[_0x5cf567(0x1ab)]['get'](g),this['_injector'][_0x5cf567(0x196)](_);}},N(exports[_0x59fa75(0x1a8)],_0x59fa75(0x1a1),U),N(exports[_0x59fa75(0x1a8)],_0x59fa75(0x1c9),c[_0x59fa75(0x1eb)][_0x59fa75(0x1da)]),exports[_0x59fa75(0x1a8)]=W([c[_0x59fa75(0x1ed)](w[_0x59fa75(0x1a5)],b[_0x59fa75(0x193)],T[_0x59fa75(0x1e6)]),O(0x1,c[_0x59fa75(0x1a2)](c['Injector'])),O(0x2,c[_0x59fa75(0x1a3)])],exports[_0x59fa75(0x1a8)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x15cd(){const _0x3ba6ad=['Reply','Unknown','_threadCommentDataSource','4tdPchq','6fbgOrZ','type','8627880tAtNqW','1528BYvkDZ','/universer-api/user/list','requireSession','add','createTimestamp','8208SlrLsQ','_initUserSync','_userService','symbol','resolveComment','/solved','3139455byeWhe','filter','dataSource','_injector','deleteComment','YYYY/MM/DD\x20HH:mm','commentUpdate$','addComment','replyId','content','user','threadId','error','reply','unitId','format','forEach','_config','syncUpdateMutationToColla','getMemberID','4093453GWzeSq','_threadCommentModel','159OzTvAV','disposeWithMe','/universer-api/comment/unit/','subscribe','onReady','Solved','rangeType','Solve','getOwnPropertyDescriptor','ref','setConfig','/add','_init','20966bfBniH','Add','slice','_configService','/reply','replies','values','_sessionService','_threadCommentDataSourceService','solved','get','OpenOrReOpen','308996SmvDBF','COMMENT','body','users','_httpService','payload','onStarting','getCurrentUser','UNRECOGNIZED','parse','/delete','code','getUser','listComments','post','getUnit','Delete','userID','thread-comment-data-source.config','8796FQzEkC','_initDataSource','userId','find','rangeId','personId','root','length','customRanges','comment','4160RbcSyz','Edit','delete','stringify','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','addUser'];_0x15cd=function(){return _0x3ba6ad;};return _0x15cd();}const _0x484af3=_0x448c;(function(_0x905c0e,_0x2fab82){const _0x4e6bd0=_0x448c,_0x3ba09a=_0x905c0e();while(!![]){try{const _0x3bde17=parseInt(_0x4e6bd0(0xb4))/0x1*(-parseInt(_0x4e6bd0(0xdb))/0x2)+parseInt(_0x4e6bd0(0x9b))/0x3*(-parseInt(_0x4e6bd0(0xdf))/0x4)+parseInt(_0x4e6bd0(0xea))/0x5+-parseInt(_0x4e6bd0(0xdc))/0x6*(-parseInt(_0x4e6bd0(0x99))/0x7)+-parseInt(_0x4e6bd0(0xd1))/0x8*(-parseInt(_0x4e6bd0(0xe4))/0x9)+parseInt(_0x4e6bd0(0xde))/0xa+parseInt(_0x4e6bd0(0xa8))/0xb*(-parseInt(_0x4e6bd0(0xc7))/0xc);if(_0x3bde17===_0x2fab82)break;else _0x3ba09a['push'](_0x3ba09a['shift']());}catch(_0x5f0343){_0x3ba09a['push'](_0x3ba09a['shift']());}}}(_0x15cd,0x7d93a));import{CommentService as _0x410c99,CollaborationSessionService as _0x844a5f,UniverCollaborationClientPlugin as _0x706f71}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3aca80}from'@univerjs-pro/license';import{dayjs as _0x16b3d9,UserManagerService as _0x587f73,Inject as _0x489677,Injector as _0x4b33d3,Disposable as _0x3eeb98,CustomRangeType as _0x25a850,UniverInstanceType as _0x4f170b,DependentOn as _0x24b919,IConfigService as _0x1d6929,Plugin as _0x284dc3,merge as _0x35db6f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3da613}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2321f4,IThreadCommentDataSourceService as _0x3e8143}from'@univerjs/thread-comment';import{bufferTime as _0x46d570}from'rxjs';import{HTTPService as _0x5d2277}from'@univerjs/network';const W=_0x484af3(0xd5);var I=(_0x2417ab=>(_0x2417ab[_0x2417ab[_0x484af3(0xb3)]=0x0]=_0x484af3(0xb3),_0x2417ab[_0x2417ab[_0x484af3(0xa0)]=0x1]=_0x484af3(0xa0),_0x2417ab[_0x2417ab[_0x484af3(0xbc)]=-0x1]='UNRECOGNIZED',_0x2417ab))(I||{}),v=(_0x460bd6=>(_0x460bd6[_0x460bd6[_0x484af3(0xd9)]=0x0]=_0x484af3(0xd9),_0x460bd6[_0x460bd6['Add']=0x1]=_0x484af3(0xa9),_0x460bd6[_0x460bd6[_0x484af3(0xd8)]=0x2]=_0x484af3(0xd8),_0x460bd6[_0x460bd6['Edit']=0x3]=_0x484af3(0xd2),_0x460bd6[_0x460bd6['Delete']=0x4]=_0x484af3(0xc4),_0x460bd6[_0x460bd6[_0x484af3(0xa2)]=0x5]=_0x484af3(0xa2),_0x460bd6[_0x460bd6[_0x484af3(0xbc)]=-0x1]=_0x484af3(0xbc),_0x460bd6))(v||{});const y=_0x3bf6e9=>_0x16b3d9(new Date(+_0x3bf6e9))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x48c2bc,_0x2ddefc)=>{const _0x32cea1=_0x484af3,_0x22886a=_0x48c2bc[_0x32cea1(0xb2)](_0x587f73),_0x57fd7f=_0x48c2bc[_0x32cea1(0xb2)](_0x5d2277);_0x2ddefc[_0x32cea1(0x95)](_0x4de656=>{const _0x14126e=_0x32cea1;_0x22886a[_0x14126e(0xc0)](_0x4de656)&&_0x2ddefc[_0x14126e(0xd3)](_0x4de656);}),_0x2ddefc['size']&&(await _0x57fd7f[_0x32cea1(0xb2)](_0x32cea1(0xe0),{'params':{'userIDs':[..._0x2ddefc]}}))['body'][_0x32cea1(0xb7)][_0x32cea1(0x95)](_0x15b07d=>{const _0x2ab095=_0x32cea1;_0x15b07d&&_0x22886a[_0x2ab095(0xd7)](_0x15b07d);});};function _0x448c(_0x2064a8,_0xe4404c){const _0x15cd26=_0x15cd();return _0x448c=function(_0x448ca1,_0x37a6e6){_0x448ca1=_0x448ca1-0x93;let _0x768dfc=_0x15cd26[_0x448ca1];return _0x768dfc;},_0x448c(_0x2064a8,_0xe4404c);}var K=Object[_0x484af3(0xa3)],V=(_0x10d94f,_0x2b18be,_0x3f5aea,_0x35c7f2)=>{const _0x3ebb44=_0x484af3;for(var _0x324436=_0x35c7f2>0x1?void 0x0:_0x35c7f2?K(_0x2b18be,_0x3f5aea):_0x2b18be,_0x3ae2d1=_0x10d94f[_0x3ebb44(0xce)]-0x1,_0xbf06f2;_0x3ae2d1>=0x0;_0x3ae2d1--)(_0xbf06f2=_0x10d94f[_0x3ae2d1])&&(_0x324436=_0xbf06f2(_0x324436)||_0x324436);return _0x324436;},p=(_0x4c2e6d,_0x5589a2)=>(_0x495644,_0x15801a)=>_0x5589a2(_0x495644,_0x15801a,_0x4c2e6d);let _=class extends _0x3eeb98{constructor(_0x934b1e,_0x4ee911,_0x1bffd9,_0x404782){const _0x2dc7e3=_0x484af3;super(),this['_commentService']=_0x934b1e,this[_0x2dc7e3(0x9a)]=_0x4ee911,this[_0x2dc7e3(0xe6)]=_0x1bffd9,this[_0x2dc7e3(0xed)]=_0x404782,this[_0x2dc7e3(0xa7)](),this[_0x2dc7e3(0xe5)]();}[_0x484af3(0xe5)](){const _0x5ec0d8=_0x484af3;this['disposeWithMe'](this[_0x5ec0d8(0x9a)]['commentUpdate$']['pipe'](_0x46d570(0x10))['subscribe'](_0x520229=>{const _0x41e715=_0x5ec0d8,_0x11d514=new Set();_0x520229[_0x41e715(0x95)](_0x3a4c8a=>{const _0x31cd41=_0x41e715;switch(_0x3a4c8a[_0x31cd41(0xdd)]){case _0x31cd41(0xe2):{const _0x1faa56=_0x3a4c8a[_0x31cd41(0xb9)][_0x31cd41(0xcc)];_0x11d514['add'](_0x1faa56);break;}}}),B(this[_0x41e715(0xed)],_0x11d514);}));}[_0x484af3(0xa7)](){const _0x181688=_0x484af3;this[_0x181688(0x9c)](this['_commentService'][_0x181688(0xf0)][_0x181688(0x9e)](async _0x3f64d0=>{const _0x2ba8d1=_0x181688;var _0x5ca012,_0x4dce7e,_0x515b93,_0x1fcfb8;const _0x981617=(_0x5ca012=this[_0x2ba8d1(0x9a)][_0x2ba8d1(0xc3)](_0x3f64d0[_0x2ba8d1(0x93)])[_0x2ba8d1(0xca)](_0x500fe0=>_0x500fe0['threadId']===_0x3f64d0[_0x2ba8d1(0xf5)]))==null?void 0x0:_0x5ca012[_0x2ba8d1(0xcd)];if(!_0x981617)return;const {unitId:_0xe883c0,subUnitId:_0x1c9acb}=_0x981617;switch(_0x3f64d0[_0x2ba8d1(0xf4)]&&this[_0x2ba8d1(0xe6)][_0x2ba8d1(0xd7)](_0x3f64d0[_0x2ba8d1(0xf4)]),_0x3f64d0[_0x2ba8d1(0xdd)]){case v[_0x2ba8d1(0xa9)]:break;case v['Reply']:{this[_0x2ba8d1(0x9a)][_0x2ba8d1(0xf1)](_0xe883c0,_0x1c9acb,{'unitId':_0xe883c0,'subUnitId':_0x1c9acb,'ref':'','id':_0x3f64d0['replyId'],'dT':y(+_0x3f64d0['createTimestamp']),'threadId':_0x3f64d0[_0x2ba8d1(0xf5)],'personId':(_0x515b93=(_0x4dce7e=_0x3f64d0[_0x2ba8d1(0xf4)])==null?void 0x0:_0x4dce7e[_0x2ba8d1(0xc5)])!=null?_0x515b93:_0x3f64d0[_0x2ba8d1(0xc9)],'text':JSON[_0x2ba8d1(0xbd)](_0x3f64d0[_0x2ba8d1(0xf3)]),'parentId':_0x981617['id']});break;}case v[_0x2ba8d1(0xc4)]:{const _0x2321f3=this[_0x2ba8d1(0x9a)]['getComment'](_0xe883c0,_0x1c9acb,_0x3f64d0[_0x2ba8d1(0xf2)]);_0x2321f3&&_0x2321f3['parentId']&&this[_0x2ba8d1(0x9a)]['deleteComment'](_0xe883c0,_0x1c9acb,_0x3f64d0[_0x2ba8d1(0xf2)]);break;}case v[_0x2ba8d1(0xd2)]:{this['_threadCommentModel']['updateComment'](_0xe883c0,_0x1c9acb,{'commentId':_0x3f64d0[_0x2ba8d1(0xf2)],'text':JSON[_0x2ba8d1(0xbd)](_0x3f64d0[_0x2ba8d1(0xf3)])});break;}case v[_0x2ba8d1(0xa2)]:{const _0x2037ac=(_0x1fcfb8=this[_0x2ba8d1(0x9a)][_0x2ba8d1(0xc3)](_0x3f64d0['unitId'])[_0x2ba8d1(0xca)](_0x1bc15e=>_0x1bc15e[_0x2ba8d1(0xf5)]===_0x3f64d0[_0x2ba8d1(0xf5)]))==null?void 0x0:_0x1fcfb8['root'];_0x2037ac&&this['_threadCommentModel'][_0x2ba8d1(0xe8)](_0xe883c0,_0x1c9acb,_0x2037ac['id'],_0x3f64d0[_0x2ba8d1(0xb1)]===I[_0x2ba8d1(0xa0)]);break;}}}));}};_=V([p(0x0,_0x489677(_0x410c99)),p(0x1,_0x489677(_0x2321f4)),p(0x2,_0x489677(_0x587f73)),p(0x3,_0x489677(_0x4b33d3))],_);const z=_0x484af3(0xc6),O={};var k=Object[_0x484af3(0xa3)],Q=(_0x21b830,_0x5a1f04,_0x5e9582,_0x351cc0)=>{const _0x1befda=_0x484af3;for(var _0x2b57e4=_0x351cc0>0x1?void 0x0:_0x351cc0?k(_0x5a1f04,_0x5e9582):_0x5a1f04,_0x195b38=_0x21b830[_0x1befda(0xce)]-0x1,_0x429f7f;_0x195b38>=0x0;_0x195b38--)(_0x429f7f=_0x21b830[_0x195b38])&&(_0x2b57e4=_0x429f7f(_0x2b57e4)||_0x2b57e4);return _0x2b57e4;},b=(_0x11471f,_0x4d8b98)=>(_0x306e83,_0x4cef75)=>_0x4d8b98(_0x306e83,_0x4cef75,_0x11471f);function X(_0x4d28c0,_0x35001c){const _0x487168=_0x484af3,_0x4ec3d8=_0x4d28c0['replies'][0x0];return{..._0x35001c,'id':_0x4ec3d8['replyId'],'resolved':_0x4d28c0['solved']===0x1,'dT':y(_0x4ec3d8[_0x487168(0xe3)]),'personId':_0x4ec3d8[_0x487168(0xc9)],'threadId':_0x4ec3d8[_0x487168(0xf5)]};}function ee(_0x5a4fd0,_0x4bc89f,_0x262494){const _0x1a90c7=_0x484af3;var _0x592fa9,_0x1bbd44;if(((_0x1bbd44=(_0x592fa9=_0x5a4fd0==null?void 0x0:_0x5a4fd0[_0x1a90c7(0xad)])==null?void 0x0:_0x592fa9['length'])!=null?_0x1bbd44:0x0)>0x0){const _0xd0b0a5=(_0x35b21e,_0x2e4267)=>({'id':_0x35b21e[_0x1a90c7(0xf2)],'threadId':_0x35b21e[_0x1a90c7(0xf5)],'dT':y(_0x35b21e[_0x1a90c7(0xe3)]),'personId':_0x35b21e['userId'],'resolved':_0x5a4fd0[_0x1a90c7(0xb1)]===I['Solved'],'unitId':_0x4bc89f,'subUnitId':_0x262494,'text':JSON['parse'](_0x35b21e['content']),'parentId':_0x2e4267}),_0xfd9577=_0xd0b0a5(_0x5a4fd0[_0x1a90c7(0xad)][0x0]);return{..._0xfd9577,'children':_0x5a4fd0[_0x1a90c7(0xad)][_0x1a90c7(0xaa)](0x1)['map'](_0x45e001=>_0xd0b0a5(_0x45e001,_0xfd9577['id']))};}return null;}let S=class{constructor(_0xb47edd,_0x35a420,_0x2a58a1){const _0x183084=_0x484af3;this[_0x183084(0xb8)]=_0xb47edd,this[_0x183084(0xe6)]=_0x35a420,this[_0x183084(0xaf)]=_0x2a58a1;}async[_0x484af3(0xf1)](_0x542a55){const _0x4a0d05=_0x484af3;var _0x3e71a4,_0x1d1a48;const {parentId:_0x2fd295,unitId:_0xf5a6b1,text:_0x57d8ea,threadId:_0x1b1f97}=_0x542a55,_0x2d3f20=(_0x1d1a48=(_0x3e71a4=_0x57d8ea['customRanges'])==null?void 0x0:_0x3e71a4[_0x4a0d05(0xeb)](_0x450d52=>_0x450d52[_0x4a0d05(0xa1)]===_0x25a850['COMMENT'])[_0x4a0d05(0xd6)](_0x50863b=>_0x50863b[_0x4a0d05(0xcb)]))!=null?_0x1d1a48:[],_0x3cfdde=JSON[_0x4a0d05(0xd4)](_0x57d8ea),_0x452449=(await this[_0x4a0d05(0xaf)][_0x4a0d05(0xe1)](_0xf5a6b1))[_0x4a0d05(0x98)]();if(_0x2fd295){const _0x3aa433={'memberId':_0x452449,'unitId':_0xf5a6b1,'content':_0x3cfdde,'mention':_0x2d3f20,'threadId':_0x1b1f97},_0x42fe71=(await this[_0x4a0d05(0xb8)][_0x4a0d05(0xc2)]('/universer-api/comment/unit/'+_0xf5a6b1+_0x4a0d05(0xac),{'body':_0x3aa433}))[_0x4a0d05(0xb6)][_0x4a0d05(0xf7)];return{..._0x542a55,'id':_0x42fe71[_0x4a0d05(0xf2)],'dT':_0x16b3d9(+_0x42fe71[_0x4a0d05(0xe3)])[_0x4a0d05(0x94)](_0x4a0d05(0xef)),'personId':_0x42fe71[_0x4a0d05(0xc9)]};}else{const _0x53bf30={'memberId':_0x452449,'unitId':_0xf5a6b1,'content':_0x3cfdde,'mention':_0x2d3f20},_0x1ec399=await this[_0x4a0d05(0xb8)]['post'](_0x4a0d05(0x9d)+_0xf5a6b1+_0x4a0d05(0xa6),{'body':_0x53bf30});return X(_0x1ec399['body'][_0x4a0d05(0xd0)],_0x542a55);}}async['updateComment'](_0x3002fb){const _0x55c190=_0x484af3;var _0x2180f7,_0x37dbc6;const {text:_0x36e5e5,unitId:_0x23d397}=_0x3002fb,_0x29f0f6=(_0x37dbc6=(_0x2180f7=_0x36e5e5[_0x55c190(0xcf)])==null?void 0x0:_0x2180f7[_0x55c190(0xeb)](_0x2878b4=>_0x2878b4[_0x55c190(0xa1)]===_0x25a850[_0x55c190(0xb5)])[_0x55c190(0xd6)](_0x40f54e=>_0x40f54e[_0x55c190(0xcb)]))!=null?_0x37dbc6:[],_0xae4095=JSON[_0x55c190(0xd4)](_0x36e5e5),_0x2a6771=_0x3002fb[_0x55c190(0xf5)],_0x56cf47=_0x3002fb['id'],_0x130163={'memberId':(await this[_0x55c190(0xaf)][_0x55c190(0xe1)](_0x23d397))['getMemberID'](),'unitId':_0x23d397,'threadId':_0x2a6771,'mention':_0x29f0f6,'content':_0xae4095,'replyId':_0x56cf47},_0xc88552=await this[_0x55c190(0xb8)][_0x55c190(0xc2)](_0x55c190(0x9d)+_0x23d397+'/edit',{'body':_0x130163});return!_0xc88552[_0x55c190(0xb6)][_0x55c190(0xf6)]||_0xc88552[_0x55c190(0xb6)]['error'][_0x55c190(0xbf)]===0x1;}async[_0x484af3(0xe8)](_0x5ee94c){const _0x5717fa=_0x484af3,{unitId:_0x365c3d}=_0x5ee94c,_0xefed8a=_0x5ee94c[_0x5717fa(0xf5)],_0xc0b204={'memberId':this[_0x5717fa(0xe6)][_0x5717fa(0xbb)]()['userID'],'unitId':_0x365c3d,'threadId':_0xefed8a,'solved':_0x5ee94c['resolved']?I[_0x5717fa(0xa0)]:I[_0x5717fa(0xb3)]},_0x3b8582=await this['_httpService'][_0x5717fa(0xc2)]('/universer-api/comment/unit/'+_0x365c3d+_0x5717fa(0xe9),{'body':_0xc0b204});return!_0x3b8582['body']['error']||_0x3b8582['body'][_0x5717fa(0xf6)][_0x5717fa(0xbf)]===0x1;}async[_0x484af3(0xee)](_0x1d2846,_0x559a89,_0x21f46c,_0x2ce7cc){const _0x8e75cd=_0x484af3,_0x3c700f={'memberId':(await this['_sessionService'][_0x8e75cd(0xe1)](_0x1d2846))[_0x8e75cd(0x98)](),'threadId':_0x21f46c,'replyId':_0x2ce7cc,'unitId':_0x1d2846},_0x538de8=await this[_0x8e75cd(0xb8)][_0x8e75cd(0xc2)](_0x8e75cd(0x9d)+_0x1d2846+_0x8e75cd(0xbe),{'body':_0x3c700f});return!_0x538de8[_0x8e75cd(0xb6)][_0x8e75cd(0xf6)]||_0x538de8[_0x8e75cd(0xb6)]['error'][_0x8e75cd(0xbf)]===0x1;}async[_0x484af3(0xc1)](_0x46a981,_0x502468,_0x3d0730){const _0x1c029c=_0x484af3,_0x208a1e={'unitId':_0x46a981,'threadId':_0x3d0730},_0x201c48=await this[_0x1c029c(0xb8)][_0x1c029c(0xc2)]('/universer-api/comment/unit/'+_0x46a981+'/list',{'body':_0x208a1e}),_0x5ad548=_0x3d0730[_0x1c029c(0xd6)](_0x2c81d2=>ee(_0x201c48['body']['comments'][_0x2c81d2],_0x46a981,_0x502468))[_0x1c029c(0xeb)](Boolean);return Object[_0x1c029c(0xae)](_0x201c48[_0x1c029c(0xb6)][_0x1c029c(0xb7)])[_0x1c029c(0x95)](_0x58c6fd=>{const _0x2b548c=_0x1c029c;this[_0x2b548c(0xe6)][_0x2b548c(0xd7)](_0x58c6fd);}),_0x5ad548;}['saveCommentToSnapshot'](_0x18ec7f){const _0xcd3cdc=_0x484af3;return{'id':_0x18ec7f['id'],'threadId':_0x18ec7f[_0xcd3cdc(0xf5)],'ref':_0x18ec7f[_0xcd3cdc(0xa4)]};}};S=Q([b(0x0,_0x489677(_0x5d2277)),b(0x1,_0x489677(_0x587f73)),b(0x2,_0x489677(_0x844a5f))],S);var re=Object[_0x484af3(0xa3)],te=(_0x40e849,_0xea08,_0x4eadd1,_0x6dc0b0)=>{const _0x10cf87=_0x484af3;for(var _0x1cb20f=_0x6dc0b0>0x1?void 0x0:_0x6dc0b0?re(_0xea08,_0x4eadd1):_0xea08,_0x2a77e3=_0x40e849[_0x10cf87(0xce)]-0x1,_0x7d6160;_0x2a77e3>=0x0;_0x2a77e3--)(_0x7d6160=_0x40e849[_0x2a77e3])&&(_0x1cb20f=_0x7d6160(_0x1cb20f)||_0x1cb20f);return _0x1cb20f;},M=(_0x233f64,_0x42e0ce)=>(_0x110b6e,_0x1eea80)=>_0x42e0ce(_0x110b6e,_0x1eea80,_0x233f64);let f=class extends _0x3eeb98{constructor(_0x5eb981,_0x152c19){const _0x4e4333=_0x484af3;super(),this[_0x4e4333(0xb0)]=_0x5eb981,this[_0x4e4333(0xda)]=_0x152c19,this[_0x4e4333(0xc8)]();}[_0x484af3(0xc8)](){const _0x20935a=_0x484af3;this[_0x20935a(0xb0)][_0x20935a(0xec)]=this[_0x20935a(0xda)],this[_0x20935a(0xb0)][_0x20935a(0x97)]=!0x1;}};f=te([M(0x0,_0x3e8143),M(0x1,_0x489677(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x242656,_0x368037,_0x533a56)=>_0x368037 in _0x242656?se(_0x242656,_0x368037,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x533a56}):_0x242656[_0x368037]=_0x533a56,ie=(_0x5efba4,_0xe6c025,_0x47db5e,_0x5e550c)=>{const _0x5946bf=_0x484af3;for(var _0x25ea17=_0x5e550c>0x1?void 0x0:_0x5e550c?oe(_0xe6c025,_0x47db5e):_0xe6c025,_0x2d8507=_0x5efba4[_0x5946bf(0xce)]-0x1,_0x8838ce;_0x2d8507>=0x0;_0x2d8507--)(_0x8838ce=_0x5efba4[_0x2d8507])&&(_0x25ea17=_0x8838ce(_0x25ea17)||_0x25ea17);return _0x25ea17;},N=(_0x42d093,_0x369d82)=>(_0x195ffc,_0x3a2654)=>_0x369d82(_0x195ffc,_0x3a2654,_0x42d093),$=(_0x2996cf,_0x475366,_0x41333f)=>ne(_0x2996cf,typeof _0x475366!=_0x484af3(0xe7)?_0x475366+'':_0x475366,_0x41333f);let g=class extends _0x284dc3{constructor(_0x5516de=O,_0x2030a7,_0x5c15f7){const _0x47dfe4=_0x484af3;super(),this[_0x47dfe4(0x96)]=_0x5516de,this[_0x47dfe4(0xed)]=_0x2030a7,this[_0x47dfe4(0xab)]=_0x5c15f7;const {..._0x8f9e45}=_0x35db6f({},O,this[_0x47dfe4(0x96)]);this[_0x47dfe4(0xab)][_0x47dfe4(0xa5)](z,_0x8f9e45);}[_0x484af3(0xba)](){const _0x481b45=_0x484af3;[[S],[f],[_]][_0x481b45(0x95)](_0x16081b=>{const _0x37ac73=_0x481b45;this[_0x37ac73(0xed)][_0x37ac73(0xe2)](_0x16081b);});}[_0x484af3(0x9f)](){const _0x57a4ab=_0x484af3;this[_0x57a4ab(0xed)]['get'](f),this[_0x57a4ab(0xed)]['get'](_);}};$(g,'pluginName',W),$(g,'type',_0x4f170b['UNIVER_UNKNOWN']),g=ie([_0x24b919(_0x3da613,_0x706f71,_0x3aca80),N(0x1,_0x489677(_0x4b33d3)),N(0x2,_0x1d6929)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x427a2e=_0xc44c;(function(_0x23b5e0,_0xa887ce){const _0x27737=_0xc44c,_0x4f2778=_0x23b5e0();while(!![]){try{const _0x487175=-parseInt(_0x27737(0x235))/0x1+parseInt(_0x27737(0x221))/0x2*(parseInt(_0x27737(0x210))/0x3)+-parseInt(_0x27737(0x22e))/0x4+-parseInt(_0x27737(0x1ef))/0x5*(parseInt(_0x27737(0x239))/0x6)+-parseInt(_0x27737(0x1ee))/0x7+-parseInt(_0x27737(0x225))/0x8+parseInt(_0x27737(0x234))/0x9*(parseInt(_0x27737(0x22f))/0xa);if(_0x487175===_0xa887ce)break;else _0x4f2778['push'](_0x4f2778['shift']());}catch(_0x3ddfb5){_0x4f2778['push'](_0x4f2778['shift']());}}}(_0x4991,0xbfe52));import{CommentService as _0x5e2ac9,CollaborationSessionService as _0x4747fc,UniverCollaborationClientPlugin as _0x5628d7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x46b496}from'@univerjs-pro/license';import{dayjs as _0x7583d3,UserManagerService as _0x138878,Inject as _0xa91514,Injector as _0x31a0cf,Disposable as _0x9fb58a,CustomRangeType as _0x34f293,UniverInstanceType as _0x3bd6b7,DependentOn as _0x3efd0c,IConfigService as _0x5702e0,Plugin as _0x17f2a3,merge as _0x5641fc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5cc0d1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x35bfa3,IThreadCommentDataSourceService as _0x66b051}from'@univerjs/thread-comment';import{bufferTime as _0x16b7ca}from'rxjs';import{HTTPService as _0x2afb15}from'@univerjs/network';const W=_0x427a2e(0x23b);function _0xc44c(_0x440fa0,_0x44909f){const _0x4991cf=_0x4991();return _0xc44c=function(_0xc44cc0,_0x308b12){_0xc44cc0=_0xc44cc0-0x1eb;let _0x49fd14=_0x4991cf[_0xc44cc0];return _0x49fd14;},_0xc44c(_0x440fa0,_0x44909f);}var I=(_0x5b10af=>(_0x5b10af[_0x5b10af[_0x427a2e(0x21f)]=0x0]=_0x427a2e(0x21f),_0x5b10af[_0x5b10af['Solved']=0x1]='Solved',_0x5b10af[_0x5b10af['UNRECOGNIZED']=-0x1]=_0x427a2e(0x1ff),_0x5b10af))(I||{}),v=(_0x39172e=>(_0x39172e[_0x39172e[_0x427a2e(0x216)]=0x0]='Unknown',_0x39172e[_0x39172e[_0x427a2e(0x243)]=0x1]=_0x427a2e(0x243),_0x39172e[_0x39172e[_0x427a2e(0x249)]=0x2]=_0x427a2e(0x249),_0x39172e[_0x39172e['Edit']=0x3]=_0x427a2e(0x200),_0x39172e[_0x39172e[_0x427a2e(0x21c)]=0x4]=_0x427a2e(0x21c),_0x39172e[_0x39172e[_0x427a2e(0x21a)]=0x5]=_0x427a2e(0x21a),_0x39172e[_0x39172e[_0x427a2e(0x1ff)]=-0x1]=_0x427a2e(0x1ff),_0x39172e))(v||{});const y=_0x2d3265=>_0x7583d3(new Date(+_0x2d3265))[_0x427a2e(0x245)]('YYYY/MM/DD\x20HH:mm'),B=async(_0xec4c6f,_0x993a9a)=>{const _0x11e26d=_0x427a2e,_0x1362f3=_0xec4c6f[_0x11e26d(0x1fe)](_0x138878),_0x33adfc=_0xec4c6f[_0x11e26d(0x1fe)](_0x2afb15);_0x993a9a[_0x11e26d(0x246)](_0x3fe7ae=>{const _0x45cd00=_0x11e26d;_0x1362f3['getUser'](_0x3fe7ae)&&_0x993a9a[_0x45cd00(0x224)](_0x3fe7ae);}),_0x993a9a['size']&&(await _0x33adfc[_0x11e26d(0x1fe)](_0x11e26d(0x237),{'params':{'userIDs':[..._0x993a9a]}}))['body']['users'][_0x11e26d(0x246)](_0x444276=>{const _0x5ec002=_0x11e26d;_0x444276&&_0x1362f3[_0x5ec002(0x1fa)](_0x444276);});};var K=Object[_0x427a2e(0x24d)],V=(_0x56de3a,_0x135cae,_0xedd4b7,_0x1e1677)=>{const _0x324c8b=_0x427a2e;for(var _0x131aec=_0x1e1677>0x1?void 0x0:_0x1e1677?K(_0x135cae,_0xedd4b7):_0x135cae,_0x44a569=_0x56de3a[_0x324c8b(0x22d)]-0x1,_0x47d23f;_0x44a569>=0x0;_0x44a569--)(_0x47d23f=_0x56de3a[_0x44a569])&&(_0x131aec=_0x47d23f(_0x131aec)||_0x131aec);return _0x131aec;},p=(_0x40a3b5,_0x24f808)=>(_0x5a2adb,_0x3fe247)=>_0x24f808(_0x5a2adb,_0x3fe247,_0x40a3b5);let _=class extends _0x9fb58a{constructor(_0x33b69b,_0x93e34,_0x3437fb,_0x40045a){const _0x249cfb=_0x427a2e;super(),this[_0x249cfb(0x1f4)]=_0x33b69b,this[_0x249cfb(0x1eb)]=_0x93e34,this['_userService']=_0x3437fb,this['_injector']=_0x40045a,this[_0x249cfb(0x1ec)](),this['_initUserSync']();}[_0x427a2e(0x1fc)](){const _0x45830d=_0x427a2e;this[_0x45830d(0x230)](this[_0x45830d(0x1eb)][_0x45830d(0x233)]['pipe'](_0x16b7ca(0x10))['subscribe'](_0x4cd7c6=>{const _0x74cfca=_0x45830d,_0x1e118e=new Set();_0x4cd7c6['forEach'](_0x1bf6d0=>{const _0x44e670=_0xc44c;switch(_0x1bf6d0['type']){case _0x44e670(0x20c):{const _0x55c9a4=_0x1bf6d0[_0x44e670(0x232)]['personId'];_0x1e118e['add'](_0x55c9a4);break;}}}),B(this[_0x74cfca(0x240)],_0x1e118e);}));}[_0x427a2e(0x1ec)](){const _0xa0f61b=_0x427a2e;this[_0xa0f61b(0x230)](this[_0xa0f61b(0x1f4)][_0xa0f61b(0x233)][_0xa0f61b(0x213)](async _0x4f9689=>{const _0xf7d7c4=_0xa0f61b;var _0x99602b,_0x13eee6,_0x164819,_0xb79a5d;const _0x51473a=(_0x99602b=this[_0xf7d7c4(0x1eb)][_0xf7d7c4(0x248)](_0x4f9689[_0xf7d7c4(0x228)])['find'](_0x384a39=>_0x384a39[_0xf7d7c4(0x20e)]===_0x4f9689[_0xf7d7c4(0x20e)]))==null?void 0x0:_0x99602b[_0xf7d7c4(0x1fb)];if(!_0x51473a)return;const {unitId:_0x431e43,subUnitId:_0x50f156}=_0x51473a;switch(_0x4f9689[_0xf7d7c4(0x238)]&&this['_userService'][_0xf7d7c4(0x1fa)](_0x4f9689[_0xf7d7c4(0x238)]),_0x4f9689['type']){case v[_0xf7d7c4(0x243)]:break;case v[_0xf7d7c4(0x249)]:{this[_0xf7d7c4(0x1eb)]['addComment'](_0x431e43,_0x50f156,{'unitId':_0x431e43,'subUnitId':_0x50f156,'ref':'','id':_0x4f9689[_0xf7d7c4(0x242)],'dT':y(+_0x4f9689['createTimestamp']),'threadId':_0x4f9689['threadId'],'personId':(_0x164819=(_0x13eee6=_0x4f9689[_0xf7d7c4(0x238)])==null?void 0x0:_0x13eee6[_0xf7d7c4(0x203)])!=null?_0x164819:_0x4f9689[_0xf7d7c4(0x226)],'text':JSON['parse'](_0x4f9689[_0xf7d7c4(0x218)]),'parentId':_0x51473a['id']});break;}case v['Delete']:{const _0x2252ed=this[_0xf7d7c4(0x1eb)][_0xf7d7c4(0x21d)](_0x431e43,_0x50f156,_0x4f9689[_0xf7d7c4(0x242)]);_0x2252ed&&_0x2252ed[_0xf7d7c4(0x1f1)]&&this[_0xf7d7c4(0x1eb)][_0xf7d7c4(0x21b)](_0x431e43,_0x50f156,_0x4f9689['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0xf7d7c4(0x24c)](_0x431e43,_0x50f156,{'commentId':_0x4f9689[_0xf7d7c4(0x242)],'text':JSON['parse'](_0x4f9689[_0xf7d7c4(0x218)])});break;}case v[_0xf7d7c4(0x21a)]:{const _0x5040f4=(_0xb79a5d=this[_0xf7d7c4(0x1eb)][_0xf7d7c4(0x248)](_0x4f9689[_0xf7d7c4(0x228)])[_0xf7d7c4(0x229)](_0xc0f8d8=>_0xc0f8d8[_0xf7d7c4(0x20e)]===_0x4f9689[_0xf7d7c4(0x20e)]))==null?void 0x0:_0xb79a5d[_0xf7d7c4(0x1fb)];_0x5040f4&&this[_0xf7d7c4(0x1eb)]['resolveComment'](_0x431e43,_0x50f156,_0x5040f4['id'],_0x4f9689[_0xf7d7c4(0x1f3)]===I[_0xf7d7c4(0x231)]);break;}}}));}};_=V([p(0x0,_0xa91514(_0x5e2ac9)),p(0x1,_0xa91514(_0x35bfa3)),p(0x2,_0xa91514(_0x138878)),p(0x3,_0xa91514(_0x31a0cf))],_);function _0x4991(){const _0x42cb06=['Solve','deleteComment','Delete','getComment','values','OpenOrReOpen','syncUpdateMutationToColla','2574434jPPtbC','_config','_userService','delete','11416928zuQPQW','userId','onStarting','unitId','find','stringify','customRanges','thread-comment-data-source.config','length','3739856FhhcGS','90JLYmrv','disposeWithMe','Solved','payload','commentUpdate$','4531203CbWJuF','1126568WICpuI','type','/universer-api/user/list','user','1033446PWXrjN','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','/list','/universer-api/comment/unit/','_initDataSource','_injector','addComment','replyId','Add','comment','format','forEach','map','getUnit','Reply','YYYY/MM/DD\x20HH:mm','filter','updateComment','getOwnPropertyDescriptor','listComments','_threadCommentModel','_init','setConfig','5983642kkdulS','20pksfvd','getCurrentUser','parentId','rangeType','solved','_commentService','pluginName','parse','_httpService','createTimestamp','defineProperty','addUser','root','_initUserSync','getMemberID','get','UNRECOGNIZED','Edit','/add','saveCommentToSnapshot','userID','body','UNIVER_UNKNOWN','COMMENT','/edit','onReady','_sessionService','/reply','resolveComment','add','comments','threadId','replies','3RxAyRS','dataSource','post','subscribe','/delete','_threadCommentDataSourceService','Unknown','reply','content','code'];_0x4991=function(){return _0x42cb06;};return _0x4991();}const z=_0x427a2e(0x22c),O={};var k=Object[_0x427a2e(0x24d)],Q=(_0x326aa0,_0x166321,_0x2bcc10,_0x2d7868)=>{const _0x34c10c=_0x427a2e;for(var _0x1deb63=_0x2d7868>0x1?void 0x0:_0x2d7868?k(_0x166321,_0x2bcc10):_0x166321,_0x3247f9=_0x326aa0[_0x34c10c(0x22d)]-0x1,_0x1dd555;_0x3247f9>=0x0;_0x3247f9--)(_0x1dd555=_0x326aa0[_0x3247f9])&&(_0x1deb63=_0x1dd555(_0x1deb63)||_0x1deb63);return _0x1deb63;},b=(_0x57a633,_0x5ee277)=>(_0x564e99,_0x1fa0f6)=>_0x5ee277(_0x564e99,_0x1fa0f6,_0x57a633);function X(_0xe1072c,_0x41f460){const _0x7df795=_0x427a2e,_0x3777ab=_0xe1072c[_0x7df795(0x20f)][0x0];return{..._0x41f460,'id':_0x3777ab[_0x7df795(0x242)],'resolved':_0xe1072c[_0x7df795(0x1f3)]===0x1,'dT':y(_0x3777ab[_0x7df795(0x1f8)]),'personId':_0x3777ab[_0x7df795(0x226)],'threadId':_0x3777ab[_0x7df795(0x20e)]};}function ee(_0x13bc10,_0x5aa49a,_0x1a320b){const _0x510d89=_0x427a2e;var _0xc25905,_0x4e5c4e;if(((_0x4e5c4e=(_0xc25905=_0x13bc10==null?void 0x0:_0x13bc10['replies'])==null?void 0x0:_0xc25905[_0x510d89(0x22d)])!=null?_0x4e5c4e:0x0)>0x0){const _0x1b8324=(_0x5dc6fb,_0x593d96)=>({'id':_0x5dc6fb['replyId'],'threadId':_0x5dc6fb[_0x510d89(0x20e)],'dT':y(_0x5dc6fb[_0x510d89(0x1f8)]),'personId':_0x5dc6fb['userId'],'resolved':_0x13bc10['solved']===I[_0x510d89(0x231)],'unitId':_0x5aa49a,'subUnitId':_0x1a320b,'text':JSON[_0x510d89(0x1f6)](_0x5dc6fb[_0x510d89(0x218)]),'parentId':_0x593d96}),_0x936e72=_0x1b8324(_0x13bc10[_0x510d89(0x20f)][0x0]);return{..._0x936e72,'children':_0x13bc10[_0x510d89(0x20f)]['slice'](0x1)[_0x510d89(0x247)](_0x151331=>_0x1b8324(_0x151331,_0x936e72['id']))};}return null;}let S=class{constructor(_0x5665b4,_0x182fbb,_0x19a611){const _0x5dd2d0=_0x427a2e;this[_0x5dd2d0(0x1f7)]=_0x5665b4,this[_0x5dd2d0(0x223)]=_0x182fbb,this['_sessionService']=_0x19a611;}async[_0x427a2e(0x241)](_0x41fbd8){const _0x5d004e=_0x427a2e;var _0x47dd8b,_0x3f6441;const {parentId:_0x24f767,unitId:_0x5e07ef,text:_0x1fc884,threadId:_0x5503d6}=_0x41fbd8,_0x5e0a58=(_0x3f6441=(_0x47dd8b=_0x1fc884[_0x5d004e(0x22b)])==null?void 0x0:_0x47dd8b[_0x5d004e(0x24b)](_0x91b62d=>_0x91b62d[_0x5d004e(0x1f2)]===_0x34f293['COMMENT'])['map'](_0x4162a2=>_0x4162a2['rangeId']))!=null?_0x3f6441:[],_0x3386a2=JSON[_0x5d004e(0x22a)](_0x1fc884),_0x2e4836=(await this['_sessionService'][_0x5d004e(0x23c)](_0x5e07ef))[_0x5d004e(0x1fd)]();if(_0x24f767){const _0x52454b={'memberId':_0x2e4836,'unitId':_0x5e07ef,'content':_0x3386a2,'mention':_0x5e0a58,'threadId':_0x5503d6},_0xe944ce=(await this['_httpService'][_0x5d004e(0x212)](_0x5d004e(0x23e)+_0x5e07ef+_0x5d004e(0x20a),{'body':_0x52454b}))['body'][_0x5d004e(0x217)];return{..._0x41fbd8,'id':_0xe944ce[_0x5d004e(0x242)],'dT':_0x7583d3(+_0xe944ce[_0x5d004e(0x1f8)])['format'](_0x5d004e(0x24a)),'personId':_0xe944ce[_0x5d004e(0x226)]};}else{const _0x2218aa={'memberId':_0x2e4836,'unitId':_0x5e07ef,'content':_0x3386a2,'mention':_0x5e0a58},_0x155724=await this[_0x5d004e(0x1f7)][_0x5d004e(0x212)](_0x5d004e(0x23e)+_0x5e07ef+_0x5d004e(0x201),{'body':_0x2218aa});return X(_0x155724['body'][_0x5d004e(0x244)],_0x41fbd8);}}async[_0x427a2e(0x24c)](_0x1106ee){const _0x5786b0=_0x427a2e;var _0x3ca738,_0x419aa8;const {text:_0x30bbbe,unitId:_0x209525}=_0x1106ee,_0x43ce1b=(_0x419aa8=(_0x3ca738=_0x30bbbe['customRanges'])==null?void 0x0:_0x3ca738[_0x5786b0(0x24b)](_0x316819=>_0x316819[_0x5786b0(0x1f2)]===_0x34f293[_0x5786b0(0x206)])[_0x5786b0(0x247)](_0xaf055a=>_0xaf055a['rangeId']))!=null?_0x419aa8:[],_0x27dc97=JSON[_0x5786b0(0x22a)](_0x30bbbe),_0x5d6af7=_0x1106ee[_0x5786b0(0x20e)],_0x7a802a=_0x1106ee['id'],_0x1f9f51={'memberId':(await this[_0x5786b0(0x209)][_0x5786b0(0x23c)](_0x209525))['getMemberID'](),'unitId':_0x209525,'threadId':_0x5d6af7,'mention':_0x43ce1b,'content':_0x27dc97,'replyId':_0x7a802a},_0x5833fd=await this[_0x5786b0(0x1f7)][_0x5786b0(0x212)](_0x5786b0(0x23e)+_0x209525+_0x5786b0(0x207),{'body':_0x1f9f51});return!_0x5833fd[_0x5786b0(0x204)][_0x5786b0(0x23a)]||_0x5833fd[_0x5786b0(0x204)]['error'][_0x5786b0(0x219)]===0x1;}async[_0x427a2e(0x20b)](_0x3ed283){const _0x2d3af9=_0x427a2e,{unitId:_0x3cc81c}=_0x3ed283,_0x4be88b=_0x3ed283[_0x2d3af9(0x20e)],_0x36061f={'memberId':this[_0x2d3af9(0x223)][_0x2d3af9(0x1f0)]()[_0x2d3af9(0x203)],'unitId':_0x3cc81c,'threadId':_0x4be88b,'solved':_0x3ed283['resolved']?I[_0x2d3af9(0x231)]:I[_0x2d3af9(0x21f)]},_0x25c7f7=await this[_0x2d3af9(0x1f7)]['post'](_0x2d3af9(0x23e)+_0x3cc81c+'/solved',{'body':_0x36061f});return!_0x25c7f7[_0x2d3af9(0x204)][_0x2d3af9(0x23a)]||_0x25c7f7['body'][_0x2d3af9(0x23a)]['code']===0x1;}async[_0x427a2e(0x21b)](_0x1059db,_0xcea8a5,_0x4a5566,_0x55adc1){const _0xce10ff=_0x427a2e,_0x2ca44f={'memberId':(await this['_sessionService'][_0xce10ff(0x23c)](_0x1059db))[_0xce10ff(0x1fd)](),'threadId':_0x4a5566,'replyId':_0x55adc1,'unitId':_0x1059db},_0xdb2a1e=await this[_0xce10ff(0x1f7)][_0xce10ff(0x212)](_0xce10ff(0x23e)+_0x1059db+_0xce10ff(0x214),{'body':_0x2ca44f});return!_0xdb2a1e[_0xce10ff(0x204)][_0xce10ff(0x23a)]||_0xdb2a1e[_0xce10ff(0x204)][_0xce10ff(0x23a)][_0xce10ff(0x219)]===0x1;}async[_0x427a2e(0x24e)](_0x2fa4eb,_0x2d752f,_0x1da61d){const _0x16433b=_0x427a2e,_0x294ba6={'unitId':_0x2fa4eb,'threadId':_0x1da61d},_0x3c67b4=await this['_httpService']['post'](_0x16433b(0x23e)+_0x2fa4eb+_0x16433b(0x23d),{'body':_0x294ba6}),_0x4c1201=_0x1da61d[_0x16433b(0x247)](_0x54cc62=>ee(_0x3c67b4[_0x16433b(0x204)][_0x16433b(0x20d)][_0x54cc62],_0x2fa4eb,_0x2d752f))[_0x16433b(0x24b)](Boolean);return Object[_0x16433b(0x21e)](_0x3c67b4[_0x16433b(0x204)]['users'])[_0x16433b(0x246)](_0x39d062=>{const _0x3e2cf4=_0x16433b;this[_0x3e2cf4(0x223)]['addUser'](_0x39d062);}),_0x4c1201;}[_0x427a2e(0x202)](_0x343ffc){const _0x4e26f8=_0x427a2e;return{'id':_0x343ffc['id'],'threadId':_0x343ffc[_0x4e26f8(0x20e)],'ref':_0x343ffc['ref']};}};S=Q([b(0x0,_0xa91514(_0x2afb15)),b(0x1,_0xa91514(_0x138878)),b(0x2,_0xa91514(_0x4747fc))],S);var re=Object[_0x427a2e(0x24d)],te=(_0x2e6ac3,_0x100c47,_0x16a1be,_0x3eef32)=>{const _0x28ef98=_0x427a2e;for(var _0x2271f9=_0x3eef32>0x1?void 0x0:_0x3eef32?re(_0x100c47,_0x16a1be):_0x100c47,_0x2a8da0=_0x2e6ac3[_0x28ef98(0x22d)]-0x1,_0x327a13;_0x2a8da0>=0x0;_0x2a8da0--)(_0x327a13=_0x2e6ac3[_0x2a8da0])&&(_0x2271f9=_0x327a13(_0x2271f9)||_0x2271f9);return _0x2271f9;},M=(_0x22dab5,_0x596094)=>(_0x48d198,_0x479164)=>_0x596094(_0x48d198,_0x479164,_0x22dab5);let f=class extends _0x9fb58a{constructor(_0x4169e7,_0x40d77e){const _0x104a97=_0x427a2e;super(),this[_0x104a97(0x215)]=_0x4169e7,this['_threadCommentDataSource']=_0x40d77e,this[_0x104a97(0x23f)]();}[_0x427a2e(0x23f)](){const _0x330379=_0x427a2e;this[_0x330379(0x215)][_0x330379(0x211)]=this['_threadCommentDataSource'],this[_0x330379(0x215)][_0x330379(0x220)]=!0x1;}};f=te([M(0x0,_0x66b051),M(0x1,_0xa91514(S))],f);var se=Object[_0x427a2e(0x1f9)],oe=Object[_0x427a2e(0x24d)],ne=(_0x51658d,_0x4d14aa,_0x37ff1e)=>_0x4d14aa in _0x51658d?se(_0x51658d,_0x4d14aa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37ff1e}):_0x51658d[_0x4d14aa]=_0x37ff1e,ie=(_0x426eaf,_0x167da9,_0x43fe46,_0x5132e2)=>{const _0x3ce4df=_0x427a2e;for(var _0x52c174=_0x5132e2>0x1?void 0x0:_0x5132e2?oe(_0x167da9,_0x43fe46):_0x167da9,_0x5cdf6b=_0x426eaf[_0x3ce4df(0x22d)]-0x1,_0x338d47;_0x5cdf6b>=0x0;_0x5cdf6b--)(_0x338d47=_0x426eaf[_0x5cdf6b])&&(_0x52c174=_0x338d47(_0x52c174)||_0x52c174);return _0x52c174;},N=(_0x4140fe,_0x4c5c35)=>(_0x28658f,_0x481473)=>_0x4c5c35(_0x28658f,_0x481473,_0x4140fe),$=(_0x4a6810,_0xb11839,_0x13fd7e)=>ne(_0x4a6810,typeof _0xb11839!='symbol'?_0xb11839+'':_0xb11839,_0x13fd7e);let g=class extends _0x17f2a3{constructor(_0x194ecd=O,_0x1601d4,_0x7615ef){const _0x51e56e=_0x427a2e;super(),this[_0x51e56e(0x222)]=_0x194ecd,this[_0x51e56e(0x240)]=_0x1601d4,this['_configService']=_0x7615ef;const {..._0x462ad1}=_0x5641fc({},O,this[_0x51e56e(0x222)]);this['_configService'][_0x51e56e(0x1ed)](z,_0x462ad1);}[_0x427a2e(0x227)](){const _0x97533d=_0x427a2e;[[S],[f],[_]][_0x97533d(0x246)](_0x58b5e1=>{const _0x315ee5=_0x97533d;this[_0x315ee5(0x240)][_0x315ee5(0x20c)](_0x58b5e1);});}[_0x427a2e(0x208)](){const _0x141d9a=_0x427a2e;this[_0x141d9a(0x240)][_0x141d9a(0x1fe)](f),this[_0x141d9a(0x240)]['get'](_);}};$(g,_0x427a2e(0x1f5),W),$(g,_0x427a2e(0x236),_0x3bd6b7[_0x427a2e(0x205)]),g=ie([_0x3efd0c(_0x5cc0d1,_0x5628d7,_0x46b496),N(0x1,_0xa91514(_0x31a0cf)),N(0x2,_0x5702e0)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x15cd(){const _0x3ba6ad=['Reply','Unknown','_threadCommentDataSource','4tdPchq','6fbgOrZ','type','8627880tAtNqW','1528BYvkDZ','/universer-api/user/list','requireSession','add','createTimestamp','8208SlrLsQ','_initUserSync','_userService','symbol','resolveComment','/solved','3139455byeWhe','filter','dataSource','_injector','deleteComment','YYYY/MM/DD\x20HH:mm','commentUpdate$','addComment','replyId','content','user','threadId','error','reply','unitId','format','forEach','_config','syncUpdateMutationToColla','getMemberID','4093453GWzeSq','_threadCommentModel','159OzTvAV','disposeWithMe','/universer-api/comment/unit/','subscribe','onReady','Solved','rangeType','Solve','getOwnPropertyDescriptor','ref','setConfig','/add','_init','20966bfBniH','Add','slice','_configService','/reply','replies','values','_sessionService','_threadCommentDataSourceService','solved','get','OpenOrReOpen','308996SmvDBF','COMMENT','body','users','_httpService','payload','onStarting','getCurrentUser','UNRECOGNIZED','parse','/delete','code','getUser','listComments','post','getUnit','Delete','userID','thread-comment-data-source.config','8796FQzEkC','_initDataSource','userId','find','rangeId','personId','root','length','customRanges','comment','4160RbcSyz','Edit','delete','stringify','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','addUser'];_0x15cd=function(){return _0x3ba6ad;};return _0x15cd();}const _0x484af3=_0x448c;(function(_0x905c0e,_0x2fab82){const _0x4e6bd0=_0x448c,_0x3ba09a=_0x905c0e();while(!![]){try{const _0x3bde17=parseInt(_0x4e6bd0(0xb4))/0x1*(-parseInt(_0x4e6bd0(0xdb))/0x2)+parseInt(_0x4e6bd0(0x9b))/0x3*(-parseInt(_0x4e6bd0(0xdf))/0x4)+parseInt(_0x4e6bd0(0xea))/0x5+-parseInt(_0x4e6bd0(0xdc))/0x6*(-parseInt(_0x4e6bd0(0x99))/0x7)+-parseInt(_0x4e6bd0(0xd1))/0x8*(-parseInt(_0x4e6bd0(0xe4))/0x9)+parseInt(_0x4e6bd0(0xde))/0xa+parseInt(_0x4e6bd0(0xa8))/0xb*(-parseInt(_0x4e6bd0(0xc7))/0xc);if(_0x3bde17===_0x2fab82)break;else _0x3ba09a['push'](_0x3ba09a['shift']());}catch(_0x5f0343){_0x3ba09a['push'](_0x3ba09a['shift']());}}}(_0x15cd,0x7d93a));import{CommentService as _0x410c99,CollaborationSessionService as _0x844a5f,UniverCollaborationClientPlugin as _0x706f71}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3aca80}from'@univerjs-pro/license';import{dayjs as _0x16b3d9,UserManagerService as _0x587f73,Inject as _0x489677,Injector as _0x4b33d3,Disposable as _0x3eeb98,CustomRangeType as _0x25a850,UniverInstanceType as _0x4f170b,DependentOn as _0x24b919,IConfigService as _0x1d6929,Plugin as _0x284dc3,merge as _0x35db6f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3da613}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2321f4,IThreadCommentDataSourceService as _0x3e8143}from'@univerjs/thread-comment';import{bufferTime as _0x46d570}from'rxjs';import{HTTPService as _0x5d2277}from'@univerjs/network';const W=_0x484af3(0xd5);var I=(_0x2417ab=>(_0x2417ab[_0x2417ab[_0x484af3(0xb3)]=0x0]=_0x484af3(0xb3),_0x2417ab[_0x2417ab[_0x484af3(0xa0)]=0x1]=_0x484af3(0xa0),_0x2417ab[_0x2417ab[_0x484af3(0xbc)]=-0x1]='UNRECOGNIZED',_0x2417ab))(I||{}),v=(_0x460bd6=>(_0x460bd6[_0x460bd6[_0x484af3(0xd9)]=0x0]=_0x484af3(0xd9),_0x460bd6[_0x460bd6['Add']=0x1]=_0x484af3(0xa9),_0x460bd6[_0x460bd6[_0x484af3(0xd8)]=0x2]=_0x484af3(0xd8),_0x460bd6[_0x460bd6['Edit']=0x3]=_0x484af3(0xd2),_0x460bd6[_0x460bd6['Delete']=0x4]=_0x484af3(0xc4),_0x460bd6[_0x460bd6[_0x484af3(0xa2)]=0x5]=_0x484af3(0xa2),_0x460bd6[_0x460bd6[_0x484af3(0xbc)]=-0x1]=_0x484af3(0xbc),_0x460bd6))(v||{});const y=_0x3bf6e9=>_0x16b3d9(new Date(+_0x3bf6e9))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x48c2bc,_0x2ddefc)=>{const _0x32cea1=_0x484af3,_0x22886a=_0x48c2bc[_0x32cea1(0xb2)](_0x587f73),_0x57fd7f=_0x48c2bc[_0x32cea1(0xb2)](_0x5d2277);_0x2ddefc[_0x32cea1(0x95)](_0x4de656=>{const _0x14126e=_0x32cea1;_0x22886a[_0x14126e(0xc0)](_0x4de656)&&_0x2ddefc[_0x14126e(0xd3)](_0x4de656);}),_0x2ddefc['size']&&(await _0x57fd7f[_0x32cea1(0xb2)](_0x32cea1(0xe0),{'params':{'userIDs':[..._0x2ddefc]}}))['body'][_0x32cea1(0xb7)][_0x32cea1(0x95)](_0x15b07d=>{const _0x2ab095=_0x32cea1;_0x15b07d&&_0x22886a[_0x2ab095(0xd7)](_0x15b07d);});};function _0x448c(_0x2064a8,_0xe4404c){const _0x15cd26=_0x15cd();return _0x448c=function(_0x448ca1,_0x37a6e6){_0x448ca1=_0x448ca1-0x93;let _0x768dfc=_0x15cd26[_0x448ca1];return _0x768dfc;},_0x448c(_0x2064a8,_0xe4404c);}var K=Object[_0x484af3(0xa3)],V=(_0x10d94f,_0x2b18be,_0x3f5aea,_0x35c7f2)=>{const _0x3ebb44=_0x484af3;for(var _0x324436=_0x35c7f2>0x1?void 0x0:_0x35c7f2?K(_0x2b18be,_0x3f5aea):_0x2b18be,_0x3ae2d1=_0x10d94f[_0x3ebb44(0xce)]-0x1,_0xbf06f2;_0x3ae2d1>=0x0;_0x3ae2d1--)(_0xbf06f2=_0x10d94f[_0x3ae2d1])&&(_0x324436=_0xbf06f2(_0x324436)||_0x324436);return _0x324436;},p=(_0x4c2e6d,_0x5589a2)=>(_0x495644,_0x15801a)=>_0x5589a2(_0x495644,_0x15801a,_0x4c2e6d);let _=class extends _0x3eeb98{constructor(_0x934b1e,_0x4ee911,_0x1bffd9,_0x404782){const _0x2dc7e3=_0x484af3;super(),this['_commentService']=_0x934b1e,this[_0x2dc7e3(0x9a)]=_0x4ee911,this[_0x2dc7e3(0xe6)]=_0x1bffd9,this[_0x2dc7e3(0xed)]=_0x404782,this[_0x2dc7e3(0xa7)](),this[_0x2dc7e3(0xe5)]();}[_0x484af3(0xe5)](){const _0x5ec0d8=_0x484af3;this['disposeWithMe'](this[_0x5ec0d8(0x9a)]['commentUpdate$']['pipe'](_0x46d570(0x10))['subscribe'](_0x520229=>{const _0x41e715=_0x5ec0d8,_0x11d514=new Set();_0x520229[_0x41e715(0x95)](_0x3a4c8a=>{const _0x31cd41=_0x41e715;switch(_0x3a4c8a[_0x31cd41(0xdd)]){case _0x31cd41(0xe2):{const _0x1faa56=_0x3a4c8a[_0x31cd41(0xb9)][_0x31cd41(0xcc)];_0x11d514['add'](_0x1faa56);break;}}}),B(this[_0x41e715(0xed)],_0x11d514);}));}[_0x484af3(0xa7)](){const _0x181688=_0x484af3;this[_0x181688(0x9c)](this['_commentService'][_0x181688(0xf0)][_0x181688(0x9e)](async _0x3f64d0=>{const _0x2ba8d1=_0x181688;var _0x5ca012,_0x4dce7e,_0x515b93,_0x1fcfb8;const _0x981617=(_0x5ca012=this[_0x2ba8d1(0x9a)][_0x2ba8d1(0xc3)](_0x3f64d0[_0x2ba8d1(0x93)])[_0x2ba8d1(0xca)](_0x500fe0=>_0x500fe0['threadId']===_0x3f64d0[_0x2ba8d1(0xf5)]))==null?void 0x0:_0x5ca012[_0x2ba8d1(0xcd)];if(!_0x981617)return;const {unitId:_0xe883c0,subUnitId:_0x1c9acb}=_0x981617;switch(_0x3f64d0[_0x2ba8d1(0xf4)]&&this[_0x2ba8d1(0xe6)][_0x2ba8d1(0xd7)](_0x3f64d0[_0x2ba8d1(0xf4)]),_0x3f64d0[_0x2ba8d1(0xdd)]){case v[_0x2ba8d1(0xa9)]:break;case v['Reply']:{this[_0x2ba8d1(0x9a)][_0x2ba8d1(0xf1)](_0xe883c0,_0x1c9acb,{'unitId':_0xe883c0,'subUnitId':_0x1c9acb,'ref':'','id':_0x3f64d0['replyId'],'dT':y(+_0x3f64d0['createTimestamp']),'threadId':_0x3f64d0[_0x2ba8d1(0xf5)],'personId':(_0x515b93=(_0x4dce7e=_0x3f64d0[_0x2ba8d1(0xf4)])==null?void 0x0:_0x4dce7e[_0x2ba8d1(0xc5)])!=null?_0x515b93:_0x3f64d0[_0x2ba8d1(0xc9)],'text':JSON[_0x2ba8d1(0xbd)](_0x3f64d0[_0x2ba8d1(0xf3)]),'parentId':_0x981617['id']});break;}case v[_0x2ba8d1(0xc4)]:{const _0x2321f3=this[_0x2ba8d1(0x9a)]['getComment'](_0xe883c0,_0x1c9acb,_0x3f64d0[_0x2ba8d1(0xf2)]);_0x2321f3&&_0x2321f3['parentId']&&this[_0x2ba8d1(0x9a)]['deleteComment'](_0xe883c0,_0x1c9acb,_0x3f64d0[_0x2ba8d1(0xf2)]);break;}case v[_0x2ba8d1(0xd2)]:{this['_threadCommentModel']['updateComment'](_0xe883c0,_0x1c9acb,{'commentId':_0x3f64d0[_0x2ba8d1(0xf2)],'text':JSON[_0x2ba8d1(0xbd)](_0x3f64d0[_0x2ba8d1(0xf3)])});break;}case v[_0x2ba8d1(0xa2)]:{const _0x2037ac=(_0x1fcfb8=this[_0x2ba8d1(0x9a)][_0x2ba8d1(0xc3)](_0x3f64d0['unitId'])[_0x2ba8d1(0xca)](_0x1bc15e=>_0x1bc15e[_0x2ba8d1(0xf5)]===_0x3f64d0[_0x2ba8d1(0xf5)]))==null?void 0x0:_0x1fcfb8['root'];_0x2037ac&&this['_threadCommentModel'][_0x2ba8d1(0xe8)](_0xe883c0,_0x1c9acb,_0x2037ac['id'],_0x3f64d0[_0x2ba8d1(0xb1)]===I[_0x2ba8d1(0xa0)]);break;}}}));}};_=V([p(0x0,_0x489677(_0x410c99)),p(0x1,_0x489677(_0x2321f4)),p(0x2,_0x489677(_0x587f73)),p(0x3,_0x489677(_0x4b33d3))],_);const z=_0x484af3(0xc6),O={};var k=Object[_0x484af3(0xa3)],Q=(_0x21b830,_0x5a1f04,_0x5e9582,_0x351cc0)=>{const _0x1befda=_0x484af3;for(var _0x2b57e4=_0x351cc0>0x1?void 0x0:_0x351cc0?k(_0x5a1f04,_0x5e9582):_0x5a1f04,_0x195b38=_0x21b830[_0x1befda(0xce)]-0x1,_0x429f7f;_0x195b38>=0x0;_0x195b38--)(_0x429f7f=_0x21b830[_0x195b38])&&(_0x2b57e4=_0x429f7f(_0x2b57e4)||_0x2b57e4);return _0x2b57e4;},b=(_0x11471f,_0x4d8b98)=>(_0x306e83,_0x4cef75)=>_0x4d8b98(_0x306e83,_0x4cef75,_0x11471f);function X(_0x4d28c0,_0x35001c){const _0x487168=_0x484af3,_0x4ec3d8=_0x4d28c0['replies'][0x0];return{..._0x35001c,'id':_0x4ec3d8['replyId'],'resolved':_0x4d28c0['solved']===0x1,'dT':y(_0x4ec3d8[_0x487168(0xe3)]),'personId':_0x4ec3d8[_0x487168(0xc9)],'threadId':_0x4ec3d8[_0x487168(0xf5)]};}function ee(_0x5a4fd0,_0x4bc89f,_0x262494){const _0x1a90c7=_0x484af3;var _0x592fa9,_0x1bbd44;if(((_0x1bbd44=(_0x592fa9=_0x5a4fd0==null?void 0x0:_0x5a4fd0[_0x1a90c7(0xad)])==null?void 0x0:_0x592fa9['length'])!=null?_0x1bbd44:0x0)>0x0){const _0xd0b0a5=(_0x35b21e,_0x2e4267)=>({'id':_0x35b21e[_0x1a90c7(0xf2)],'threadId':_0x35b21e[_0x1a90c7(0xf5)],'dT':y(_0x35b21e[_0x1a90c7(0xe3)]),'personId':_0x35b21e['userId'],'resolved':_0x5a4fd0[_0x1a90c7(0xb1)]===I['Solved'],'unitId':_0x4bc89f,'subUnitId':_0x262494,'text':JSON['parse'](_0x35b21e['content']),'parentId':_0x2e4267}),_0xfd9577=_0xd0b0a5(_0x5a4fd0[_0x1a90c7(0xad)][0x0]);return{..._0xfd9577,'children':_0x5a4fd0[_0x1a90c7(0xad)][_0x1a90c7(0xaa)](0x1)['map'](_0x45e001=>_0xd0b0a5(_0x45e001,_0xfd9577['id']))};}return null;}let S=class{constructor(_0xb47edd,_0x35a420,_0x2a58a1){const _0x183084=_0x484af3;this[_0x183084(0xb8)]=_0xb47edd,this[_0x183084(0xe6)]=_0x35a420,this[_0x183084(0xaf)]=_0x2a58a1;}async[_0x484af3(0xf1)](_0x542a55){const _0x4a0d05=_0x484af3;var _0x3e71a4,_0x1d1a48;const {parentId:_0x2fd295,unitId:_0xf5a6b1,text:_0x57d8ea,threadId:_0x1b1f97}=_0x542a55,_0x2d3f20=(_0x1d1a48=(_0x3e71a4=_0x57d8ea['customRanges'])==null?void 0x0:_0x3e71a4[_0x4a0d05(0xeb)](_0x450d52=>_0x450d52[_0x4a0d05(0xa1)]===_0x25a850['COMMENT'])[_0x4a0d05(0xd6)](_0x50863b=>_0x50863b[_0x4a0d05(0xcb)]))!=null?_0x1d1a48:[],_0x3cfdde=JSON[_0x4a0d05(0xd4)](_0x57d8ea),_0x452449=(await this[_0x4a0d05(0xaf)][_0x4a0d05(0xe1)](_0xf5a6b1))[_0x4a0d05(0x98)]();if(_0x2fd295){const _0x3aa433={'memberId':_0x452449,'unitId':_0xf5a6b1,'content':_0x3cfdde,'mention':_0x2d3f20,'threadId':_0x1b1f97},_0x42fe71=(await this[_0x4a0d05(0xb8)][_0x4a0d05(0xc2)]('/universer-api/comment/unit/'+_0xf5a6b1+_0x4a0d05(0xac),{'body':_0x3aa433}))[_0x4a0d05(0xb6)][_0x4a0d05(0xf7)];return{..._0x542a55,'id':_0x42fe71[_0x4a0d05(0xf2)],'dT':_0x16b3d9(+_0x42fe71[_0x4a0d05(0xe3)])[_0x4a0d05(0x94)](_0x4a0d05(0xef)),'personId':_0x42fe71[_0x4a0d05(0xc9)]};}else{const _0x53bf30={'memberId':_0x452449,'unitId':_0xf5a6b1,'content':_0x3cfdde,'mention':_0x2d3f20},_0x1ec399=await this[_0x4a0d05(0xb8)]['post'](_0x4a0d05(0x9d)+_0xf5a6b1+_0x4a0d05(0xa6),{'body':_0x53bf30});return X(_0x1ec399['body'][_0x4a0d05(0xd0)],_0x542a55);}}async['updateComment'](_0x3002fb){const _0x55c190=_0x484af3;var _0x2180f7,_0x37dbc6;const {text:_0x36e5e5,unitId:_0x23d397}=_0x3002fb,_0x29f0f6=(_0x37dbc6=(_0x2180f7=_0x36e5e5[_0x55c190(0xcf)])==null?void 0x0:_0x2180f7[_0x55c190(0xeb)](_0x2878b4=>_0x2878b4[_0x55c190(0xa1)]===_0x25a850[_0x55c190(0xb5)])[_0x55c190(0xd6)](_0x40f54e=>_0x40f54e[_0x55c190(0xcb)]))!=null?_0x37dbc6:[],_0xae4095=JSON[_0x55c190(0xd4)](_0x36e5e5),_0x2a6771=_0x3002fb[_0x55c190(0xf5)],_0x56cf47=_0x3002fb['id'],_0x130163={'memberId':(await this[_0x55c190(0xaf)][_0x55c190(0xe1)](_0x23d397))['getMemberID'](),'unitId':_0x23d397,'threadId':_0x2a6771,'mention':_0x29f0f6,'content':_0xae4095,'replyId':_0x56cf47},_0xc88552=await this[_0x55c190(0xb8)][_0x55c190(0xc2)](_0x55c190(0x9d)+_0x23d397+'/edit',{'body':_0x130163});return!_0xc88552[_0x55c190(0xb6)][_0x55c190(0xf6)]||_0xc88552[_0x55c190(0xb6)]['error'][_0x55c190(0xbf)]===0x1;}async[_0x484af3(0xe8)](_0x5ee94c){const _0x5717fa=_0x484af3,{unitId:_0x365c3d}=_0x5ee94c,_0xefed8a=_0x5ee94c[_0x5717fa(0xf5)],_0xc0b204={'memberId':this[_0x5717fa(0xe6)][_0x5717fa(0xbb)]()['userID'],'unitId':_0x365c3d,'threadId':_0xefed8a,'solved':_0x5ee94c['resolved']?I[_0x5717fa(0xa0)]:I[_0x5717fa(0xb3)]},_0x3b8582=await this['_httpService'][_0x5717fa(0xc2)]('/universer-api/comment/unit/'+_0x365c3d+_0x5717fa(0xe9),{'body':_0xc0b204});return!_0x3b8582['body']['error']||_0x3b8582['body'][_0x5717fa(0xf6)][_0x5717fa(0xbf)]===0x1;}async[_0x484af3(0xee)](_0x1d2846,_0x559a89,_0x21f46c,_0x2ce7cc){const _0x8e75cd=_0x484af3,_0x3c700f={'memberId':(await this['_sessionService'][_0x8e75cd(0xe1)](_0x1d2846))[_0x8e75cd(0x98)](),'threadId':_0x21f46c,'replyId':_0x2ce7cc,'unitId':_0x1d2846},_0x538de8=await this[_0x8e75cd(0xb8)][_0x8e75cd(0xc2)](_0x8e75cd(0x9d)+_0x1d2846+_0x8e75cd(0xbe),{'body':_0x3c700f});return!_0x538de8[_0x8e75cd(0xb6)][_0x8e75cd(0xf6)]||_0x538de8[_0x8e75cd(0xb6)]['error'][_0x8e75cd(0xbf)]===0x1;}async[_0x484af3(0xc1)](_0x46a981,_0x502468,_0x3d0730){const _0x1c029c=_0x484af3,_0x208a1e={'unitId':_0x46a981,'threadId':_0x3d0730},_0x201c48=await this[_0x1c029c(0xb8)][_0x1c029c(0xc2)]('/universer-api/comment/unit/'+_0x46a981+'/list',{'body':_0x208a1e}),_0x5ad548=_0x3d0730[_0x1c029c(0xd6)](_0x2c81d2=>ee(_0x201c48['body']['comments'][_0x2c81d2],_0x46a981,_0x502468))[_0x1c029c(0xeb)](Boolean);return Object[_0x1c029c(0xae)](_0x201c48[_0x1c029c(0xb6)][_0x1c029c(0xb7)])[_0x1c029c(0x95)](_0x58c6fd=>{const _0x2b548c=_0x1c029c;this[_0x2b548c(0xe6)][_0x2b548c(0xd7)](_0x58c6fd);}),_0x5ad548;}['saveCommentToSnapshot'](_0x18ec7f){const _0xcd3cdc=_0x484af3;return{'id':_0x18ec7f['id'],'threadId':_0x18ec7f[_0xcd3cdc(0xf5)],'ref':_0x18ec7f[_0xcd3cdc(0xa4)]};}};S=Q([b(0x0,_0x489677(_0x5d2277)),b(0x1,_0x489677(_0x587f73)),b(0x2,_0x489677(_0x844a5f))],S);var re=Object[_0x484af3(0xa3)],te=(_0x40e849,_0xea08,_0x4eadd1,_0x6dc0b0)=>{const _0x10cf87=_0x484af3;for(var _0x1cb20f=_0x6dc0b0>0x1?void 0x0:_0x6dc0b0?re(_0xea08,_0x4eadd1):_0xea08,_0x2a77e3=_0x40e849[_0x10cf87(0xce)]-0x1,_0x7d6160;_0x2a77e3>=0x0;_0x2a77e3--)(_0x7d6160=_0x40e849[_0x2a77e3])&&(_0x1cb20f=_0x7d6160(_0x1cb20f)||_0x1cb20f);return _0x1cb20f;},M=(_0x233f64,_0x42e0ce)=>(_0x110b6e,_0x1eea80)=>_0x42e0ce(_0x110b6e,_0x1eea80,_0x233f64);let f=class extends _0x3eeb98{constructor(_0x5eb981,_0x152c19){const _0x4e4333=_0x484af3;super(),this[_0x4e4333(0xb0)]=_0x5eb981,this[_0x4e4333(0xda)]=_0x152c19,this[_0x4e4333(0xc8)]();}[_0x484af3(0xc8)](){const _0x20935a=_0x484af3;this[_0x20935a(0xb0)][_0x20935a(0xec)]=this[_0x20935a(0xda)],this[_0x20935a(0xb0)][_0x20935a(0x97)]=!0x1;}};f=te([M(0x0,_0x3e8143),M(0x1,_0x489677(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x242656,_0x368037,_0x533a56)=>_0x368037 in _0x242656?se(_0x242656,_0x368037,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x533a56}):_0x242656[_0x368037]=_0x533a56,ie=(_0x5efba4,_0xe6c025,_0x47db5e,_0x5e550c)=>{const _0x5946bf=_0x484af3;for(var _0x25ea17=_0x5e550c>0x1?void 0x0:_0x5e550c?oe(_0xe6c025,_0x47db5e):_0xe6c025,_0x2d8507=_0x5efba4[_0x5946bf(0xce)]-0x1,_0x8838ce;_0x2d8507>=0x0;_0x2d8507--)(_0x8838ce=_0x5efba4[_0x2d8507])&&(_0x25ea17=_0x8838ce(_0x25ea17)||_0x25ea17);return _0x25ea17;},N=(_0x42d093,_0x369d82)=>(_0x195ffc,_0x3a2654)=>_0x369d82(_0x195ffc,_0x3a2654,_0x42d093),$=(_0x2996cf,_0x475366,_0x41333f)=>ne(_0x2996cf,typeof _0x475366!=_0x484af3(0xe7)?_0x475366+'':_0x475366,_0x41333f);let g=class extends _0x284dc3{constructor(_0x5516de=O,_0x2030a7,_0x5c15f7){const _0x47dfe4=_0x484af3;super(),this[_0x47dfe4(0x96)]=_0x5516de,this[_0x47dfe4(0xed)]=_0x2030a7,this[_0x47dfe4(0xab)]=_0x5c15f7;const {..._0x8f9e45}=_0x35db6f({},O,this[_0x47dfe4(0x96)]);this[_0x47dfe4(0xab)][_0x47dfe4(0xa5)](z,_0x8f9e45);}[_0x484af3(0xba)](){const _0x481b45=_0x484af3;[[S],[f],[_]][_0x481b45(0x95)](_0x16081b=>{const _0x37ac73=_0x481b45;this[_0x37ac73(0xed)][_0x37ac73(0xe2)](_0x16081b);});}[_0x484af3(0x9f)](){const _0x57a4ab=_0x484af3;this[_0x57a4ab(0xed)]['get'](f),this[_0x57a4ab(0xed)]['get'](_);}};$(g,'pluginName',W),$(g,'type',_0x4f170b['UNIVER_UNKNOWN']),g=ie([_0x24b919(_0x3da613,_0x706f71,_0x3aca80),N(0x1,_0x489677(_0x4b33d3)),N(0x2,_0x1d6929)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x427a2e=_0xc44c;(function(_0x23b5e0,_0xa887ce){const _0x27737=_0xc44c,_0x4f2778=_0x23b5e0();while(!![]){try{const _0x487175=-parseInt(_0x27737(0x235))/0x1+parseInt(_0x27737(0x221))/0x2*(parseInt(_0x27737(0x210))/0x3)+-parseInt(_0x27737(0x22e))/0x4+-parseInt(_0x27737(0x1ef))/0x5*(parseInt(_0x27737(0x239))/0x6)+-parseInt(_0x27737(0x1ee))/0x7+-parseInt(_0x27737(0x225))/0x8+parseInt(_0x27737(0x234))/0x9*(parseInt(_0x27737(0x22f))/0xa);if(_0x487175===_0xa887ce)break;else _0x4f2778['push'](_0x4f2778['shift']());}catch(_0x3ddfb5){_0x4f2778['push'](_0x4f2778['shift']());}}}(_0x4991,0xbfe52));import{CommentService as _0x5e2ac9,CollaborationSessionService as _0x4747fc,UniverCollaborationClientPlugin as _0x5628d7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x46b496}from'@univerjs-pro/license';import{dayjs as _0x7583d3,UserManagerService as _0x138878,Inject as _0xa91514,Injector as _0x31a0cf,Disposable as _0x9fb58a,CustomRangeType as _0x34f293,UniverInstanceType as _0x3bd6b7,DependentOn as _0x3efd0c,IConfigService as _0x5702e0,Plugin as _0x17f2a3,merge as _0x5641fc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5cc0d1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x35bfa3,IThreadCommentDataSourceService as _0x66b051}from'@univerjs/thread-comment';import{bufferTime as _0x16b7ca}from'rxjs';import{HTTPService as _0x2afb15}from'@univerjs/network';const W=_0x427a2e(0x23b);function _0xc44c(_0x440fa0,_0x44909f){const _0x4991cf=_0x4991();return _0xc44c=function(_0xc44cc0,_0x308b12){_0xc44cc0=_0xc44cc0-0x1eb;let _0x49fd14=_0x4991cf[_0xc44cc0];return _0x49fd14;},_0xc44c(_0x440fa0,_0x44909f);}var I=(_0x5b10af=>(_0x5b10af[_0x5b10af[_0x427a2e(0x21f)]=0x0]=_0x427a2e(0x21f),_0x5b10af[_0x5b10af['Solved']=0x1]='Solved',_0x5b10af[_0x5b10af['UNRECOGNIZED']=-0x1]=_0x427a2e(0x1ff),_0x5b10af))(I||{}),v=(_0x39172e=>(_0x39172e[_0x39172e[_0x427a2e(0x216)]=0x0]='Unknown',_0x39172e[_0x39172e[_0x427a2e(0x243)]=0x1]=_0x427a2e(0x243),_0x39172e[_0x39172e[_0x427a2e(0x249)]=0x2]=_0x427a2e(0x249),_0x39172e[_0x39172e['Edit']=0x3]=_0x427a2e(0x200),_0x39172e[_0x39172e[_0x427a2e(0x21c)]=0x4]=_0x427a2e(0x21c),_0x39172e[_0x39172e[_0x427a2e(0x21a)]=0x5]=_0x427a2e(0x21a),_0x39172e[_0x39172e[_0x427a2e(0x1ff)]=-0x1]=_0x427a2e(0x1ff),_0x39172e))(v||{});const y=_0x2d3265=>_0x7583d3(new Date(+_0x2d3265))[_0x427a2e(0x245)]('YYYY/MM/DD\x20HH:mm'),B=async(_0xec4c6f,_0x993a9a)=>{const _0x11e26d=_0x427a2e,_0x1362f3=_0xec4c6f[_0x11e26d(0x1fe)](_0x138878),_0x33adfc=_0xec4c6f[_0x11e26d(0x1fe)](_0x2afb15);_0x993a9a[_0x11e26d(0x246)](_0x3fe7ae=>{const _0x45cd00=_0x11e26d;_0x1362f3['getUser'](_0x3fe7ae)&&_0x993a9a[_0x45cd00(0x224)](_0x3fe7ae);}),_0x993a9a['size']&&(await _0x33adfc[_0x11e26d(0x1fe)](_0x11e26d(0x237),{'params':{'userIDs':[..._0x993a9a]}}))['body']['users'][_0x11e26d(0x246)](_0x444276=>{const _0x5ec002=_0x11e26d;_0x444276&&_0x1362f3[_0x5ec002(0x1fa)](_0x444276);});};var K=Object[_0x427a2e(0x24d)],V=(_0x56de3a,_0x135cae,_0xedd4b7,_0x1e1677)=>{const _0x324c8b=_0x427a2e;for(var _0x131aec=_0x1e1677>0x1?void 0x0:_0x1e1677?K(_0x135cae,_0xedd4b7):_0x135cae,_0x44a569=_0x56de3a[_0x324c8b(0x22d)]-0x1,_0x47d23f;_0x44a569>=0x0;_0x44a569--)(_0x47d23f=_0x56de3a[_0x44a569])&&(_0x131aec=_0x47d23f(_0x131aec)||_0x131aec);return _0x131aec;},p=(_0x40a3b5,_0x24f808)=>(_0x5a2adb,_0x3fe247)=>_0x24f808(_0x5a2adb,_0x3fe247,_0x40a3b5);let _=class extends _0x9fb58a{constructor(_0x33b69b,_0x93e34,_0x3437fb,_0x40045a){const _0x249cfb=_0x427a2e;super(),this[_0x249cfb(0x1f4)]=_0x33b69b,this[_0x249cfb(0x1eb)]=_0x93e34,this['_userService']=_0x3437fb,this['_injector']=_0x40045a,this[_0x249cfb(0x1ec)](),this['_initUserSync']();}[_0x427a2e(0x1fc)](){const _0x45830d=_0x427a2e;this[_0x45830d(0x230)](this[_0x45830d(0x1eb)][_0x45830d(0x233)]['pipe'](_0x16b7ca(0x10))['subscribe'](_0x4cd7c6=>{const _0x74cfca=_0x45830d,_0x1e118e=new Set();_0x4cd7c6['forEach'](_0x1bf6d0=>{const _0x44e670=_0xc44c;switch(_0x1bf6d0['type']){case _0x44e670(0x20c):{const _0x55c9a4=_0x1bf6d0[_0x44e670(0x232)]['personId'];_0x1e118e['add'](_0x55c9a4);break;}}}),B(this[_0x74cfca(0x240)],_0x1e118e);}));}[_0x427a2e(0x1ec)](){const _0xa0f61b=_0x427a2e;this[_0xa0f61b(0x230)](this[_0xa0f61b(0x1f4)][_0xa0f61b(0x233)][_0xa0f61b(0x213)](async _0x4f9689=>{const _0xf7d7c4=_0xa0f61b;var _0x99602b,_0x13eee6,_0x164819,_0xb79a5d;const _0x51473a=(_0x99602b=this[_0xf7d7c4(0x1eb)][_0xf7d7c4(0x248)](_0x4f9689[_0xf7d7c4(0x228)])['find'](_0x384a39=>_0x384a39[_0xf7d7c4(0x20e)]===_0x4f9689[_0xf7d7c4(0x20e)]))==null?void 0x0:_0x99602b[_0xf7d7c4(0x1fb)];if(!_0x51473a)return;const {unitId:_0x431e43,subUnitId:_0x50f156}=_0x51473a;switch(_0x4f9689[_0xf7d7c4(0x238)]&&this['_userService'][_0xf7d7c4(0x1fa)](_0x4f9689[_0xf7d7c4(0x238)]),_0x4f9689['type']){case v[_0xf7d7c4(0x243)]:break;case v[_0xf7d7c4(0x249)]:{this[_0xf7d7c4(0x1eb)]['addComment'](_0x431e43,_0x50f156,{'unitId':_0x431e43,'subUnitId':_0x50f156,'ref':'','id':_0x4f9689[_0xf7d7c4(0x242)],'dT':y(+_0x4f9689['createTimestamp']),'threadId':_0x4f9689['threadId'],'personId':(_0x164819=(_0x13eee6=_0x4f9689[_0xf7d7c4(0x238)])==null?void 0x0:_0x13eee6[_0xf7d7c4(0x203)])!=null?_0x164819:_0x4f9689[_0xf7d7c4(0x226)],'text':JSON['parse'](_0x4f9689[_0xf7d7c4(0x218)]),'parentId':_0x51473a['id']});break;}case v['Delete']:{const _0x2252ed=this[_0xf7d7c4(0x1eb)][_0xf7d7c4(0x21d)](_0x431e43,_0x50f156,_0x4f9689[_0xf7d7c4(0x242)]);_0x2252ed&&_0x2252ed[_0xf7d7c4(0x1f1)]&&this[_0xf7d7c4(0x1eb)][_0xf7d7c4(0x21b)](_0x431e43,_0x50f156,_0x4f9689['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0xf7d7c4(0x24c)](_0x431e43,_0x50f156,{'commentId':_0x4f9689[_0xf7d7c4(0x242)],'text':JSON['parse'](_0x4f9689[_0xf7d7c4(0x218)])});break;}case v[_0xf7d7c4(0x21a)]:{const _0x5040f4=(_0xb79a5d=this[_0xf7d7c4(0x1eb)][_0xf7d7c4(0x248)](_0x4f9689[_0xf7d7c4(0x228)])[_0xf7d7c4(0x229)](_0xc0f8d8=>_0xc0f8d8[_0xf7d7c4(0x20e)]===_0x4f9689[_0xf7d7c4(0x20e)]))==null?void 0x0:_0xb79a5d[_0xf7d7c4(0x1fb)];_0x5040f4&&this[_0xf7d7c4(0x1eb)]['resolveComment'](_0x431e43,_0x50f156,_0x5040f4['id'],_0x4f9689[_0xf7d7c4(0x1f3)]===I[_0xf7d7c4(0x231)]);break;}}}));}};_=V([p(0x0,_0xa91514(_0x5e2ac9)),p(0x1,_0xa91514(_0x35bfa3)),p(0x2,_0xa91514(_0x138878)),p(0x3,_0xa91514(_0x31a0cf))],_);function _0x4991(){const _0x42cb06=['Solve','deleteComment','Delete','getComment','values','OpenOrReOpen','syncUpdateMutationToColla','2574434jPPtbC','_config','_userService','delete','11416928zuQPQW','userId','onStarting','unitId','find','stringify','customRanges','thread-comment-data-source.config','length','3739856FhhcGS','90JLYmrv','disposeWithMe','Solved','payload','commentUpdate$','4531203CbWJuF','1126568WICpuI','type','/universer-api/user/list','user','1033446PWXrjN','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','/list','/universer-api/comment/unit/','_initDataSource','_injector','addComment','replyId','Add','comment','format','forEach','map','getUnit','Reply','YYYY/MM/DD\x20HH:mm','filter','updateComment','getOwnPropertyDescriptor','listComments','_threadCommentModel','_init','setConfig','5983642kkdulS','20pksfvd','getCurrentUser','parentId','rangeType','solved','_commentService','pluginName','parse','_httpService','createTimestamp','defineProperty','addUser','root','_initUserSync','getMemberID','get','UNRECOGNIZED','Edit','/add','saveCommentToSnapshot','userID','body','UNIVER_UNKNOWN','COMMENT','/edit','onReady','_sessionService','/reply','resolveComment','add','comments','threadId','replies','3RxAyRS','dataSource','post','subscribe','/delete','_threadCommentDataSourceService','Unknown','reply','content','code'];_0x4991=function(){return _0x42cb06;};return _0x4991();}const z=_0x427a2e(0x22c),O={};var k=Object[_0x427a2e(0x24d)],Q=(_0x326aa0,_0x166321,_0x2bcc10,_0x2d7868)=>{const _0x34c10c=_0x427a2e;for(var _0x1deb63=_0x2d7868>0x1?void 0x0:_0x2d7868?k(_0x166321,_0x2bcc10):_0x166321,_0x3247f9=_0x326aa0[_0x34c10c(0x22d)]-0x1,_0x1dd555;_0x3247f9>=0x0;_0x3247f9--)(_0x1dd555=_0x326aa0[_0x3247f9])&&(_0x1deb63=_0x1dd555(_0x1deb63)||_0x1deb63);return _0x1deb63;},b=(_0x57a633,_0x5ee277)=>(_0x564e99,_0x1fa0f6)=>_0x5ee277(_0x564e99,_0x1fa0f6,_0x57a633);function X(_0xe1072c,_0x41f460){const _0x7df795=_0x427a2e,_0x3777ab=_0xe1072c[_0x7df795(0x20f)][0x0];return{..._0x41f460,'id':_0x3777ab[_0x7df795(0x242)],'resolved':_0xe1072c[_0x7df795(0x1f3)]===0x1,'dT':y(_0x3777ab[_0x7df795(0x1f8)]),'personId':_0x3777ab[_0x7df795(0x226)],'threadId':_0x3777ab[_0x7df795(0x20e)]};}function ee(_0x13bc10,_0x5aa49a,_0x1a320b){const _0x510d89=_0x427a2e;var _0xc25905,_0x4e5c4e;if(((_0x4e5c4e=(_0xc25905=_0x13bc10==null?void 0x0:_0x13bc10['replies'])==null?void 0x0:_0xc25905[_0x510d89(0x22d)])!=null?_0x4e5c4e:0x0)>0x0){const _0x1b8324=(_0x5dc6fb,_0x593d96)=>({'id':_0x5dc6fb['replyId'],'threadId':_0x5dc6fb[_0x510d89(0x20e)],'dT':y(_0x5dc6fb[_0x510d89(0x1f8)]),'personId':_0x5dc6fb['userId'],'resolved':_0x13bc10['solved']===I[_0x510d89(0x231)],'unitId':_0x5aa49a,'subUnitId':_0x1a320b,'text':JSON[_0x510d89(0x1f6)](_0x5dc6fb[_0x510d89(0x218)]),'parentId':_0x593d96}),_0x936e72=_0x1b8324(_0x13bc10[_0x510d89(0x20f)][0x0]);return{..._0x936e72,'children':_0x13bc10[_0x510d89(0x20f)]['slice'](0x1)[_0x510d89(0x247)](_0x151331=>_0x1b8324(_0x151331,_0x936e72['id']))};}return null;}let S=class{constructor(_0x5665b4,_0x182fbb,_0x19a611){const _0x5dd2d0=_0x427a2e;this[_0x5dd2d0(0x1f7)]=_0x5665b4,this[_0x5dd2d0(0x223)]=_0x182fbb,this['_sessionService']=_0x19a611;}async[_0x427a2e(0x241)](_0x41fbd8){const _0x5d004e=_0x427a2e;var _0x47dd8b,_0x3f6441;const {parentId:_0x24f767,unitId:_0x5e07ef,text:_0x1fc884,threadId:_0x5503d6}=_0x41fbd8,_0x5e0a58=(_0x3f6441=(_0x47dd8b=_0x1fc884[_0x5d004e(0x22b)])==null?void 0x0:_0x47dd8b[_0x5d004e(0x24b)](_0x91b62d=>_0x91b62d[_0x5d004e(0x1f2)]===_0x34f293['COMMENT'])['map'](_0x4162a2=>_0x4162a2['rangeId']))!=null?_0x3f6441:[],_0x3386a2=JSON[_0x5d004e(0x22a)](_0x1fc884),_0x2e4836=(await this['_sessionService'][_0x5d004e(0x23c)](_0x5e07ef))[_0x5d004e(0x1fd)]();if(_0x24f767){const _0x52454b={'memberId':_0x2e4836,'unitId':_0x5e07ef,'content':_0x3386a2,'mention':_0x5e0a58,'threadId':_0x5503d6},_0xe944ce=(await this['_httpService'][_0x5d004e(0x212)](_0x5d004e(0x23e)+_0x5e07ef+_0x5d004e(0x20a),{'body':_0x52454b}))['body'][_0x5d004e(0x217)];return{..._0x41fbd8,'id':_0xe944ce[_0x5d004e(0x242)],'dT':_0x7583d3(+_0xe944ce[_0x5d004e(0x1f8)])['format'](_0x5d004e(0x24a)),'personId':_0xe944ce[_0x5d004e(0x226)]};}else{const _0x2218aa={'memberId':_0x2e4836,'unitId':_0x5e07ef,'content':_0x3386a2,'mention':_0x5e0a58},_0x155724=await this[_0x5d004e(0x1f7)][_0x5d004e(0x212)](_0x5d004e(0x23e)+_0x5e07ef+_0x5d004e(0x201),{'body':_0x2218aa});return X(_0x155724['body'][_0x5d004e(0x244)],_0x41fbd8);}}async[_0x427a2e(0x24c)](_0x1106ee){const _0x5786b0=_0x427a2e;var _0x3ca738,_0x419aa8;const {text:_0x30bbbe,unitId:_0x209525}=_0x1106ee,_0x43ce1b=(_0x419aa8=(_0x3ca738=_0x30bbbe['customRanges'])==null?void 0x0:_0x3ca738[_0x5786b0(0x24b)](_0x316819=>_0x316819[_0x5786b0(0x1f2)]===_0x34f293[_0x5786b0(0x206)])[_0x5786b0(0x247)](_0xaf055a=>_0xaf055a['rangeId']))!=null?_0x419aa8:[],_0x27dc97=JSON[_0x5786b0(0x22a)](_0x30bbbe),_0x5d6af7=_0x1106ee[_0x5786b0(0x20e)],_0x7a802a=_0x1106ee['id'],_0x1f9f51={'memberId':(await this[_0x5786b0(0x209)][_0x5786b0(0x23c)](_0x209525))['getMemberID'](),'unitId':_0x209525,'threadId':_0x5d6af7,'mention':_0x43ce1b,'content':_0x27dc97,'replyId':_0x7a802a},_0x5833fd=await this[_0x5786b0(0x1f7)][_0x5786b0(0x212)](_0x5786b0(0x23e)+_0x209525+_0x5786b0(0x207),{'body':_0x1f9f51});return!_0x5833fd[_0x5786b0(0x204)][_0x5786b0(0x23a)]||_0x5833fd[_0x5786b0(0x204)]['error'][_0x5786b0(0x219)]===0x1;}async[_0x427a2e(0x20b)](_0x3ed283){const _0x2d3af9=_0x427a2e,{unitId:_0x3cc81c}=_0x3ed283,_0x4be88b=_0x3ed283[_0x2d3af9(0x20e)],_0x36061f={'memberId':this[_0x2d3af9(0x223)][_0x2d3af9(0x1f0)]()[_0x2d3af9(0x203)],'unitId':_0x3cc81c,'threadId':_0x4be88b,'solved':_0x3ed283['resolved']?I[_0x2d3af9(0x231)]:I[_0x2d3af9(0x21f)]},_0x25c7f7=await this[_0x2d3af9(0x1f7)]['post'](_0x2d3af9(0x23e)+_0x3cc81c+'/solved',{'body':_0x36061f});return!_0x25c7f7[_0x2d3af9(0x204)][_0x2d3af9(0x23a)]||_0x25c7f7['body'][_0x2d3af9(0x23a)]['code']===0x1;}async[_0x427a2e(0x21b)](_0x1059db,_0xcea8a5,_0x4a5566,_0x55adc1){const _0xce10ff=_0x427a2e,_0x2ca44f={'memberId':(await this['_sessionService'][_0xce10ff(0x23c)](_0x1059db))[_0xce10ff(0x1fd)](),'threadId':_0x4a5566,'replyId':_0x55adc1,'unitId':_0x1059db},_0xdb2a1e=await this[_0xce10ff(0x1f7)][_0xce10ff(0x212)](_0xce10ff(0x23e)+_0x1059db+_0xce10ff(0x214),{'body':_0x2ca44f});return!_0xdb2a1e[_0xce10ff(0x204)][_0xce10ff(0x23a)]||_0xdb2a1e[_0xce10ff(0x204)][_0xce10ff(0x23a)][_0xce10ff(0x219)]===0x1;}async[_0x427a2e(0x24e)](_0x2fa4eb,_0x2d752f,_0x1da61d){const _0x16433b=_0x427a2e,_0x294ba6={'unitId':_0x2fa4eb,'threadId':_0x1da61d},_0x3c67b4=await this['_httpService']['post'](_0x16433b(0x23e)+_0x2fa4eb+_0x16433b(0x23d),{'body':_0x294ba6}),_0x4c1201=_0x1da61d[_0x16433b(0x247)](_0x54cc62=>ee(_0x3c67b4[_0x16433b(0x204)][_0x16433b(0x20d)][_0x54cc62],_0x2fa4eb,_0x2d752f))[_0x16433b(0x24b)](Boolean);return Object[_0x16433b(0x21e)](_0x3c67b4[_0x16433b(0x204)]['users'])[_0x16433b(0x246)](_0x39d062=>{const _0x3e2cf4=_0x16433b;this[_0x3e2cf4(0x223)]['addUser'](_0x39d062);}),_0x4c1201;}[_0x427a2e(0x202)](_0x343ffc){const _0x4e26f8=_0x427a2e;return{'id':_0x343ffc['id'],'threadId':_0x343ffc[_0x4e26f8(0x20e)],'ref':_0x343ffc['ref']};}};S=Q([b(0x0,_0xa91514(_0x2afb15)),b(0x1,_0xa91514(_0x138878)),b(0x2,_0xa91514(_0x4747fc))],S);var re=Object[_0x427a2e(0x24d)],te=(_0x2e6ac3,_0x100c47,_0x16a1be,_0x3eef32)=>{const _0x28ef98=_0x427a2e;for(var _0x2271f9=_0x3eef32>0x1?void 0x0:_0x3eef32?re(_0x100c47,_0x16a1be):_0x100c47,_0x2a8da0=_0x2e6ac3[_0x28ef98(0x22d)]-0x1,_0x327a13;_0x2a8da0>=0x0;_0x2a8da0--)(_0x327a13=_0x2e6ac3[_0x2a8da0])&&(_0x2271f9=_0x327a13(_0x2271f9)||_0x2271f9);return _0x2271f9;},M=(_0x22dab5,_0x596094)=>(_0x48d198,_0x479164)=>_0x596094(_0x48d198,_0x479164,_0x22dab5);let f=class extends _0x9fb58a{constructor(_0x4169e7,_0x40d77e){const _0x104a97=_0x427a2e;super(),this[_0x104a97(0x215)]=_0x4169e7,this['_threadCommentDataSource']=_0x40d77e,this[_0x104a97(0x23f)]();}[_0x427a2e(0x23f)](){const _0x330379=_0x427a2e;this[_0x330379(0x215)][_0x330379(0x211)]=this['_threadCommentDataSource'],this[_0x330379(0x215)][_0x330379(0x220)]=!0x1;}};f=te([M(0x0,_0x66b051),M(0x1,_0xa91514(S))],f);var se=Object[_0x427a2e(0x1f9)],oe=Object[_0x427a2e(0x24d)],ne=(_0x51658d,_0x4d14aa,_0x37ff1e)=>_0x4d14aa in _0x51658d?se(_0x51658d,_0x4d14aa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37ff1e}):_0x51658d[_0x4d14aa]=_0x37ff1e,ie=(_0x426eaf,_0x167da9,_0x43fe46,_0x5132e2)=>{const _0x3ce4df=_0x427a2e;for(var _0x52c174=_0x5132e2>0x1?void 0x0:_0x5132e2?oe(_0x167da9,_0x43fe46):_0x167da9,_0x5cdf6b=_0x426eaf[_0x3ce4df(0x22d)]-0x1,_0x338d47;_0x5cdf6b>=0x0;_0x5cdf6b--)(_0x338d47=_0x426eaf[_0x5cdf6b])&&(_0x52c174=_0x338d47(_0x52c174)||_0x52c174);return _0x52c174;},N=(_0x4140fe,_0x4c5c35)=>(_0x28658f,_0x481473)=>_0x4c5c35(_0x28658f,_0x481473,_0x4140fe),$=(_0x4a6810,_0xb11839,_0x13fd7e)=>ne(_0x4a6810,typeof _0xb11839!='symbol'?_0xb11839+'':_0xb11839,_0x13fd7e);let g=class extends _0x17f2a3{constructor(_0x194ecd=O,_0x1601d4,_0x7615ef){const _0x51e56e=_0x427a2e;super(),this[_0x51e56e(0x222)]=_0x194ecd,this[_0x51e56e(0x240)]=_0x1601d4,this['_configService']=_0x7615ef;const {..._0x462ad1}=_0x5641fc({},O,this[_0x51e56e(0x222)]);this['_configService'][_0x51e56e(0x1ed)](z,_0x462ad1);}[_0x427a2e(0x227)](){const _0x97533d=_0x427a2e;[[S],[f],[_]][_0x97533d(0x246)](_0x58b5e1=>{const _0x315ee5=_0x97533d;this[_0x315ee5(0x240)][_0x315ee5(0x20c)](_0x58b5e1);});}[_0x427a2e(0x208)](){const _0x141d9a=_0x427a2e;this[_0x141d9a(0x240)][_0x141d9a(0x1fe)](f),this[_0x141d9a(0x240)]['get'](_);}};$(g,_0x427a2e(0x1f5),W),$(g,_0x427a2e(0x236),_0x3bd6b7[_0x427a2e(0x205)]),g=ie([_0x3efd0c(_0x5cc0d1,_0x5628d7,_0x46b496),N(0x1,_0xa91514(_0x31a0cf)),N(0x2,_0x5702e0)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x46f8(){const _0x2991b5=['ref','format','Solved','Plugin','getUnit','syncUpdateMutationToColla','pipe','code','toStringTag','userId','_config','dayjs','341709MkPcpg','customRanges','UniverCollaborationClientPlugin','_threadCommentModel','UniverInstanceType','UniverThreadCommentUIPlugin','parentId','32sYVqLY','users','5686624fTZmbm','/add','resolved','onReady','createTimestamp','UniverThreadComment','Edit','length','OpenOrReOpen','_sessionService','type','Disposable','UserManagerService','rangeType','pluginName','getMemberID','rangeId','listComments','/universer-api/comment/unit/','reply','values','saveCommentToSnapshot','root','8898JYSAaB','onStarting','function','Solve','content','add','_commentService','/reply','personId','@univerjs/thread-comment','UniverThreadCommentDataSourcePlugin','post','addComment','@univerjs/core','UniverLicensePlugin','stringify','deleteComment','3028550FHQVnn','IConfigService','Reply','Injector','_injector','comments','exports','Add','userID','resolveComment','_init','Module','ThreadCommentModel','COMMENT','7NGZRtN','HTTPService','Unknown','getCurrentUser','delete','solved','parse','addUser','amd','getOwnPropertyDescriptor','thread-comment-data-source.config','payload','230733SVQiZf','_initDataSource','@univerjs-pro/collaboration-client','threadId','1848306uXeNBq','commentUpdate$','forEach','updateComment','body','requireSession','_initUserSync','CollaborationSessionService','Inject','get','filter','disposeWithMe','error','@univerjs/thread-comment-ui','symbol','UniverCore','_configService','IThreadCommentDataSourceService','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','18slOrWI','rxjs','subscribe','replies','@univerjs/network','5425800jzKeGS','_threadCommentDataSource','UniverNetwork','bufferTime','map','@univerjs-pro/license','dataSource','merge','size','defineProperty','user','Delete','YYYY/MM/DD\x20HH:mm','/universer-api/user/list','comment','UniverProCollaborationClient','_threadCommentDataSourceService','CustomRangeType','replyId','_httpService'];_0x46f8=function(){return _0x2991b5;};return _0x46f8();}function _0x468f(_0x3a84e3,_0x3e7562){const _0x46f811=_0x46f8();return _0x468f=function(_0x468f3c,_0x16c6a0){_0x468f3c=_0x468f3c-0x1f4;let _0x42cd54=_0x46f811[_0x468f3c];return _0x42cd54;},_0x468f(_0x3a84e3,_0x3e7562);}(function(_0x469a81,_0x1b2f79){const _0x280261=_0x468f,_0x2ea531=_0x469a81();while(!![]){try{const _0x202986=parseInt(_0x280261(0x274))/0x1*(parseInt(_0x280261(0x231))/0x2)+parseInt(_0x280261(0x211))/0x3*(parseInt(_0x280261(0x218))/0x4)+-parseInt(_0x280261(0x279))/0x5+-parseInt(_0x280261(0x260))/0x6*(-parseInt(_0x280261(0x250))/0x7)+parseInt(_0x280261(0x21a))/0x8+-parseInt(_0x280261(0x25c))/0x9+-parseInt(_0x280261(0x242))/0xa;if(_0x202986===_0x1b2f79)break;else _0x2ea531['push'](_0x2ea531['shift']());}catch(_0x10a45c){_0x2ea531['push'](_0x2ea531['shift']());}}}(_0x46f8,0x91a35),function(_0x327c2b,_0x37d1bf){const _0x6f1daf=_0x468f;typeof exports=='object'&&typeof module<'u'?_0x37d1bf(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x6f1daf(0x233)&&define[_0x6f1daf(0x258)]?define([_0x6f1daf(0x248),_0x6f1daf(0x25e),_0x6f1daf(0x1f6),_0x6f1daf(0x23e),_0x6f1daf(0x26d),_0x6f1daf(0x23a),'rxjs',_0x6f1daf(0x278)],_0x37d1bf):(_0x327c2b=typeof globalThis<'u'?globalThis:_0x327c2b||self,_0x37d1bf(_0x327c2b['UniverProThreadCommentDatasource']={},_0x327c2b[_0x6f1daf(0x200)],_0x327c2b['UniverProLicense'],_0x327c2b[_0x6f1daf(0x26f)],_0x327c2b['UniverThreadCommentUi'],_0x327c2b[_0x6f1daf(0x21f)],_0x327c2b[_0x6f1daf(0x275)],_0x327c2b[_0x6f1daf(0x27b)]));}(this,function(_0x3f72c,_0x52eae7,_0x1cf475,_0x459f9a,_0x47763d,_0x1bf7c4,_0x1a357c,_0x51fe71){'use strict';const _0x4b3d97=_0x468f;const _0x201b52=_0x4b3d97(0x273);var _0x57973f=(_0x323e0e=>(_0x323e0e[_0x323e0e[_0x4b3d97(0x222)]=0x0]=_0x4b3d97(0x222),_0x323e0e[_0x323e0e['Solved']=0x1]=_0x4b3d97(0x207),_0x323e0e[_0x323e0e['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x323e0e))(_0x57973f||{}),_0x16a70e=(_0x8f0a4e=>(_0x8f0a4e[_0x8f0a4e[_0x4b3d97(0x252)]=0x0]=_0x4b3d97(0x252),_0x8f0a4e[_0x8f0a4e[_0x4b3d97(0x249)]=0x1]=_0x4b3d97(0x249),_0x8f0a4e[_0x8f0a4e[_0x4b3d97(0x244)]=0x2]=_0x4b3d97(0x244),_0x8f0a4e[_0x8f0a4e[_0x4b3d97(0x220)]=0x3]=_0x4b3d97(0x220),_0x8f0a4e[_0x8f0a4e[_0x4b3d97(0x1fc)]=0x4]=_0x4b3d97(0x1fc),_0x8f0a4e[_0x8f0a4e[_0x4b3d97(0x234)]=0x5]=_0x4b3d97(0x234),_0x8f0a4e[_0x8f0a4e['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x8f0a4e))(_0x16a70e||{});const _0x2e0003=_0x14b184=>_0x459f9a[_0x4b3d97(0x210)](new Date(+_0x14b184))[_0x4b3d97(0x206)](_0x4b3d97(0x1fd)),_0x50984b=async(_0x580c25,_0x717de1)=>{const _0x4852fa=_0x4b3d97,_0x57fca6=_0x580c25['get'](_0x459f9a[_0x4852fa(0x226)]),_0x46b733=_0x580c25[_0x4852fa(0x269)](_0x51fe71[_0x4852fa(0x251)]);_0x717de1['forEach'](_0xce610d=>{const _0x30e574=_0x4852fa;_0x57fca6['getUser'](_0xce610d)&&_0x717de1[_0x30e574(0x254)](_0xce610d);}),_0x717de1[_0x4852fa(0x1f9)]&&(await _0x46b733['get'](_0x4852fa(0x1fe),{'params':{'userIDs':[..._0x717de1]}}))[_0x4852fa(0x264)][_0x4852fa(0x219)]['forEach'](_0x292cb0=>{const _0x568e19=_0x4852fa;_0x292cb0&&_0x57fca6[_0x568e19(0x257)](_0x292cb0);});};var _0x1fed9a=Object['getOwnPropertyDescriptor'],_0x18ceba=(_0x138ab1,_0x51a04d,_0x3ee152,_0x25c122)=>{const _0x1429d1=_0x4b3d97;for(var _0x233168=_0x25c122>0x1?void 0x0:_0x25c122?_0x1fed9a(_0x51a04d,_0x3ee152):_0x51a04d,_0x4e2e32=_0x138ab1[_0x1429d1(0x221)]-0x1,_0x38dc3b;_0x4e2e32>=0x0;_0x4e2e32--)(_0x38dc3b=_0x138ab1[_0x4e2e32])&&(_0x233168=_0x38dc3b(_0x233168)||_0x233168);return _0x233168;},_0x16e1fe=(_0x109cf9,_0x2d4843)=>(_0x3a819d,_0x4ebd16)=>_0x2d4843(_0x3a819d,_0x4ebd16,_0x109cf9);let _0x2b7552=class extends _0x459f9a[_0x4b3d97(0x225)]{constructor(_0x32d9fd,_0x2ba241,_0x343162,_0x4e2d65){const _0x12528b=_0x4b3d97;super(),this[_0x12528b(0x237)]=_0x32d9fd,this[_0x12528b(0x214)]=_0x2ba241,this[_0x12528b(0x272)]=_0x343162,this[_0x12528b(0x246)]=_0x4e2d65,this[_0x12528b(0x24c)](),this[_0x12528b(0x266)]();}['_initUserSync'](){const _0x21ea08=_0x4b3d97;this[_0x21ea08(0x26b)](this[_0x21ea08(0x214)][_0x21ea08(0x261)][_0x21ea08(0x20b)](_0x1a357c[_0x21ea08(0x1f4)](0x10))['subscribe'](_0x575a3b=>{const _0x72c7d9=_0x21ea08,_0x54c70d=new Set();_0x575a3b[_0x72c7d9(0x262)](_0xe23b16=>{const _0x1cc353=_0x72c7d9;switch(_0xe23b16[_0x1cc353(0x224)]){case _0x1cc353(0x236):{const _0x11fa84=_0xe23b16[_0x1cc353(0x25b)][_0x1cc353(0x239)];_0x54c70d['add'](_0x11fa84);break;}}}),_0x50984b(this[_0x72c7d9(0x246)],_0x54c70d);}));}['_init'](){const _0x1a0f20=_0x4b3d97;this[_0x1a0f20(0x26b)](this[_0x1a0f20(0x237)][_0x1a0f20(0x261)][_0x1a0f20(0x276)](async _0x77ee2d=>{const _0x564644=_0x1a0f20;var _0x3df349,_0x2f3ba9,_0x524fdf,_0x124d3e;const _0x25ec5f=(_0x3df349=this[_0x564644(0x214)][_0x564644(0x209)](_0x77ee2d['unitId'])['find'](_0x7e3ce6=>_0x7e3ce6[_0x564644(0x25f)]===_0x77ee2d['threadId']))==null?void 0x0:_0x3df349[_0x564644(0x230)];if(!_0x25ec5f)return;const {unitId:_0x176671,subUnitId:_0x52c605}=_0x25ec5f;switch(_0x77ee2d[_0x564644(0x1fb)]&&this[_0x564644(0x272)][_0x564644(0x257)](_0x77ee2d[_0x564644(0x1fb)]),_0x77ee2d[_0x564644(0x224)]){case _0x16a70e[_0x564644(0x249)]:break;case _0x16a70e[_0x564644(0x244)]:{this[_0x564644(0x214)][_0x564644(0x23d)](_0x176671,_0x52c605,{'unitId':_0x176671,'subUnitId':_0x52c605,'ref':'','id':_0x77ee2d[_0x564644(0x203)],'dT':_0x2e0003(+_0x77ee2d[_0x564644(0x21e)]),'threadId':_0x77ee2d[_0x564644(0x25f)],'personId':(_0x524fdf=(_0x2f3ba9=_0x77ee2d[_0x564644(0x1fb)])==null?void 0x0:_0x2f3ba9[_0x564644(0x24a)])!=null?_0x524fdf:_0x77ee2d[_0x564644(0x20e)],'text':JSON[_0x564644(0x256)](_0x77ee2d['content']),'parentId':_0x25ec5f['id']});break;}case _0x16a70e['Delete']:{const _0x42b3e2=this['_threadCommentModel']['getComment'](_0x176671,_0x52c605,_0x77ee2d['replyId']);_0x42b3e2&&_0x42b3e2[_0x564644(0x217)]&&this['_threadCommentModel'][_0x564644(0x241)](_0x176671,_0x52c605,_0x77ee2d[_0x564644(0x203)]);break;}case _0x16a70e[_0x564644(0x220)]:{this[_0x564644(0x214)][_0x564644(0x263)](_0x176671,_0x52c605,{'commentId':_0x77ee2d[_0x564644(0x203)],'text':JSON[_0x564644(0x256)](_0x77ee2d['content'])});break;}case _0x16a70e[_0x564644(0x234)]:{const _0x13ab61=(_0x124d3e=this[_0x564644(0x214)][_0x564644(0x209)](_0x77ee2d['unitId'])['find'](_0x1e184c=>_0x1e184c['threadId']===_0x77ee2d['threadId']))==null?void 0x0:_0x124d3e['root'];_0x13ab61&&this[_0x564644(0x214)][_0x564644(0x24b)](_0x176671,_0x52c605,_0x13ab61['id'],_0x77ee2d[_0x564644(0x255)]===_0x57973f[_0x564644(0x207)]);break;}}}));}};_0x2b7552=_0x18ceba([_0x16e1fe(0x0,_0x459f9a[_0x4b3d97(0x268)](_0x52eae7['CommentService'])),_0x16e1fe(0x1,_0x459f9a[_0x4b3d97(0x268)](_0x1bf7c4[_0x4b3d97(0x24e)])),_0x16e1fe(0x2,_0x459f9a[_0x4b3d97(0x268)](_0x459f9a[_0x4b3d97(0x226)])),_0x16e1fe(0x3,_0x459f9a[_0x4b3d97(0x268)](_0x459f9a['Injector']))],_0x2b7552);const _0x5ad761=_0x4b3d97(0x25a),_0x5d8192={};var _0x160841=Object[_0x4b3d97(0x259)],_0x10685d=(_0x390467,_0x3496a9,_0x4886df,_0x4dce3a)=>{const _0x28879e=_0x4b3d97;for(var _0x4ce218=_0x4dce3a>0x1?void 0x0:_0x4dce3a?_0x160841(_0x3496a9,_0x4886df):_0x3496a9,_0x1603a0=_0x390467[_0x28879e(0x221)]-0x1,_0x178972;_0x1603a0>=0x0;_0x1603a0--)(_0x178972=_0x390467[_0x1603a0])&&(_0x4ce218=_0x178972(_0x4ce218)||_0x4ce218);return _0x4ce218;},_0x4ad7df=(_0x1be61b,_0x37ff4f)=>(_0x483607,_0x1d7654)=>_0x37ff4f(_0x483607,_0x1d7654,_0x1be61b);function _0x50b5eb(_0x18c689,_0x40ef2c){const _0x538daf=_0x4b3d97,_0x55d2b1=_0x18c689[_0x538daf(0x277)][0x0];return{..._0x40ef2c,'id':_0x55d2b1[_0x538daf(0x203)],'resolved':_0x18c689[_0x538daf(0x255)]===0x1,'dT':_0x2e0003(_0x55d2b1[_0x538daf(0x21e)]),'personId':_0x55d2b1[_0x538daf(0x20e)],'threadId':_0x55d2b1[_0x538daf(0x25f)]};}function _0x15a7dd(_0x21b871,_0x3a6cf5,_0x19ab5e){const _0x2fcedf=_0x4b3d97;var _0x50055b,_0x3f6508;if(((_0x3f6508=(_0x50055b=_0x21b871==null?void 0x0:_0x21b871[_0x2fcedf(0x277)])==null?void 0x0:_0x50055b['length'])!=null?_0x3f6508:0x0)>0x0){const _0x1f7a9f=(_0x1d9c63,_0x2a17b1)=>({'id':_0x1d9c63[_0x2fcedf(0x203)],'threadId':_0x1d9c63[_0x2fcedf(0x25f)],'dT':_0x2e0003(_0x1d9c63[_0x2fcedf(0x21e)]),'personId':_0x1d9c63[_0x2fcedf(0x20e)],'resolved':_0x21b871[_0x2fcedf(0x255)]===_0x57973f[_0x2fcedf(0x207)],'unitId':_0x3a6cf5,'subUnitId':_0x19ab5e,'text':JSON['parse'](_0x1d9c63[_0x2fcedf(0x235)]),'parentId':_0x2a17b1}),_0x536aeb=_0x1f7a9f(_0x21b871['replies'][0x0]);return{..._0x536aeb,'children':_0x21b871[_0x2fcedf(0x277)]['slice'](0x1)['map'](_0x11442c=>_0x1f7a9f(_0x11442c,_0x536aeb['id']))};}return null;}let _0x5d8526=class{constructor(_0x3152f6,_0x58513,_0xc57a41){const _0x535b0e=_0x4b3d97;this[_0x535b0e(0x204)]=_0x3152f6,this[_0x535b0e(0x272)]=_0x58513,this[_0x535b0e(0x223)]=_0xc57a41;}async['addComment'](_0x5d8b53){const _0x22c6e1=_0x4b3d97;var _0x233807,_0x350ffe;const {parentId:_0x582f80,unitId:_0x2200a4,text:_0x4d99e5,threadId:_0x1f6168}=_0x5d8b53,_0xcc9817=(_0x350ffe=(_0x233807=_0x4d99e5[_0x22c6e1(0x212)])==null?void 0x0:_0x233807[_0x22c6e1(0x26a)](_0xb9cf54=>_0xb9cf54[_0x22c6e1(0x227)]===_0x459f9a[_0x22c6e1(0x202)][_0x22c6e1(0x24f)])[_0x22c6e1(0x1f5)](_0x57ad8b=>_0x57ad8b[_0x22c6e1(0x22a)]))!=null?_0x350ffe:[],_0x344b43=JSON[_0x22c6e1(0x240)](_0x4d99e5),_0x513f63=(await this[_0x22c6e1(0x223)][_0x22c6e1(0x265)](_0x2200a4))['getMemberID']();if(_0x582f80){const _0x5de1b1={'memberId':_0x513f63,'unitId':_0x2200a4,'content':_0x344b43,'mention':_0xcc9817,'threadId':_0x1f6168},_0x225988=(await this['_httpService'][_0x22c6e1(0x23c)](_0x22c6e1(0x22c)+_0x2200a4+_0x22c6e1(0x238),{'body':_0x5de1b1}))[_0x22c6e1(0x264)][_0x22c6e1(0x22d)];return{..._0x5d8b53,'id':_0x225988[_0x22c6e1(0x203)],'dT':_0x459f9a[_0x22c6e1(0x210)](+_0x225988[_0x22c6e1(0x21e)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x225988['userId']};}else{const _0x5c70e3={'memberId':_0x513f63,'unitId':_0x2200a4,'content':_0x344b43,'mention':_0xcc9817},_0x4d786b=await this[_0x22c6e1(0x204)][_0x22c6e1(0x23c)](_0x22c6e1(0x22c)+_0x2200a4+_0x22c6e1(0x21b),{'body':_0x5c70e3});return _0x50b5eb(_0x4d786b[_0x22c6e1(0x264)][_0x22c6e1(0x1ff)],_0x5d8b53);}}async[_0x4b3d97(0x263)](_0x4b4b){const _0x22a70d=_0x4b3d97;var _0x5aa49a,_0x268ebc;const {text:_0xd1da81,unitId:_0xafe7ac}=_0x4b4b,_0xcf3c3a=(_0x268ebc=(_0x5aa49a=_0xd1da81[_0x22a70d(0x212)])==null?void 0x0:_0x5aa49a[_0x22a70d(0x26a)](_0x20813b=>_0x20813b[_0x22a70d(0x227)]===_0x459f9a[_0x22a70d(0x202)][_0x22a70d(0x24f)])[_0x22a70d(0x1f5)](_0x46c382=>_0x46c382[_0x22a70d(0x22a)]))!=null?_0x268ebc:[],_0x371f3c=JSON[_0x22a70d(0x240)](_0xd1da81),_0x55a478=_0x4b4b[_0x22a70d(0x25f)],_0x26c539=_0x4b4b['id'],_0x21c86c={'memberId':(await this[_0x22a70d(0x223)][_0x22a70d(0x265)](_0xafe7ac))[_0x22a70d(0x229)](),'unitId':_0xafe7ac,'threadId':_0x55a478,'mention':_0xcf3c3a,'content':_0x371f3c,'replyId':_0x26c539},_0x261e34=await this[_0x22a70d(0x204)]['post']('/universer-api/comment/unit/'+_0xafe7ac+'/edit',{'body':_0x21c86c});return!_0x261e34[_0x22a70d(0x264)][_0x22a70d(0x26c)]||_0x261e34['body'][_0x22a70d(0x26c)][_0x22a70d(0x20c)]===0x1;}async[_0x4b3d97(0x24b)](_0x59b687){const _0x2b85ca=_0x4b3d97,{unitId:_0x51da5b}=_0x59b687,_0x46564e=_0x59b687['threadId'],_0x14a0a3={'memberId':this[_0x2b85ca(0x272)][_0x2b85ca(0x253)]()[_0x2b85ca(0x24a)],'unitId':_0x51da5b,'threadId':_0x46564e,'solved':_0x59b687[_0x2b85ca(0x21c)]?_0x57973f[_0x2b85ca(0x207)]:_0x57973f[_0x2b85ca(0x222)]},_0x1bd6a5=await this[_0x2b85ca(0x204)][_0x2b85ca(0x23c)](_0x2b85ca(0x22c)+_0x51da5b+'/solved',{'body':_0x14a0a3});return!_0x1bd6a5[_0x2b85ca(0x264)][_0x2b85ca(0x26c)]||_0x1bd6a5[_0x2b85ca(0x264)][_0x2b85ca(0x26c)]['code']===0x1;}async[_0x4b3d97(0x241)](_0xdfc77c,_0x2bf876,_0x13eaae,_0x1924de){const _0x195161=_0x4b3d97,_0x23c1fe={'memberId':(await this[_0x195161(0x223)][_0x195161(0x265)](_0xdfc77c))['getMemberID'](),'threadId':_0x13eaae,'replyId':_0x1924de,'unitId':_0xdfc77c},_0x2cfdcc=await this[_0x195161(0x204)][_0x195161(0x23c)](_0x195161(0x22c)+_0xdfc77c+'/delete',{'body':_0x23c1fe});return!_0x2cfdcc['body'][_0x195161(0x26c)]||_0x2cfdcc['body']['error'][_0x195161(0x20c)]===0x1;}async[_0x4b3d97(0x22b)](_0x57f7d2,_0x34bfc4,_0x5c9ff8){const _0xbf00f0=_0x4b3d97,_0xdfcc81={'unitId':_0x57f7d2,'threadId':_0x5c9ff8},_0x2df658=await this[_0xbf00f0(0x204)]['post'](_0xbf00f0(0x22c)+_0x57f7d2+'/list',{'body':_0xdfcc81}),_0x2c82b7=_0x5c9ff8['map'](_0x7c75e8=>_0x15a7dd(_0x2df658[_0xbf00f0(0x264)][_0xbf00f0(0x247)][_0x7c75e8],_0x57f7d2,_0x34bfc4))[_0xbf00f0(0x26a)](Boolean);return Object[_0xbf00f0(0x22e)](_0x2df658[_0xbf00f0(0x264)][_0xbf00f0(0x219)])[_0xbf00f0(0x262)](_0x14f567=>{const _0x47574e=_0xbf00f0;this[_0x47574e(0x272)][_0x47574e(0x257)](_0x14f567);}),_0x2c82b7;}[_0x4b3d97(0x22f)](_0x343186){const _0x73987f=_0x4b3d97;return{'id':_0x343186['id'],'threadId':_0x343186[_0x73987f(0x25f)],'ref':_0x343186[_0x73987f(0x205)]};}};_0x5d8526=_0x10685d([_0x4ad7df(0x0,_0x459f9a[_0x4b3d97(0x268)](_0x51fe71[_0x4b3d97(0x251)])),_0x4ad7df(0x1,_0x459f9a[_0x4b3d97(0x268)](_0x459f9a['UserManagerService'])),_0x4ad7df(0x2,_0x459f9a['Inject'](_0x52eae7[_0x4b3d97(0x267)]))],_0x5d8526);var _0x552e37=Object['getOwnPropertyDescriptor'],_0x5a4769=(_0x5e8dfd,_0x142ed6,_0x30f157,_0x458d15)=>{const _0x243fda=_0x4b3d97;for(var _0x17dfa0=_0x458d15>0x1?void 0x0:_0x458d15?_0x552e37(_0x142ed6,_0x30f157):_0x142ed6,_0xe3071=_0x5e8dfd[_0x243fda(0x221)]-0x1,_0x214f0a;_0xe3071>=0x0;_0xe3071--)(_0x214f0a=_0x5e8dfd[_0xe3071])&&(_0x17dfa0=_0x214f0a(_0x17dfa0)||_0x17dfa0);return _0x17dfa0;},_0x3daec0=(_0x359599,_0x38e571)=>(_0x1eae8f,_0x49b04d)=>_0x38e571(_0x1eae8f,_0x49b04d,_0x359599);let _0x13bed7=class extends _0x459f9a[_0x4b3d97(0x225)]{constructor(_0x1b0ec4,_0x1cdbad){const _0x5de7f2=_0x4b3d97;super(),this[_0x5de7f2(0x201)]=_0x1b0ec4,this[_0x5de7f2(0x27a)]=_0x1cdbad,this[_0x5de7f2(0x25d)]();}['_initDataSource'](){const _0x576f06=_0x4b3d97;this[_0x576f06(0x201)][_0x576f06(0x1f7)]=this[_0x576f06(0x27a)],this['_threadCommentDataSourceService'][_0x576f06(0x20a)]=!0x1;}};_0x13bed7=_0x5a4769([_0x3daec0(0x0,_0x1bf7c4[_0x4b3d97(0x271)]),_0x3daec0(0x1,_0x459f9a[_0x4b3d97(0x268)](_0x5d8526))],_0x13bed7);var _0x438a08=Object[_0x4b3d97(0x1fa)],_0x4b984a=Object[_0x4b3d97(0x259)],_0x3308aa=(_0x2192ff,_0x283c10,_0x5a85e1)=>_0x283c10 in _0x2192ff?_0x438a08(_0x2192ff,_0x283c10,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5a85e1}):_0x2192ff[_0x283c10]=_0x5a85e1,_0x52fdd2=(_0xed8445,_0x49691c,_0x2c2bc7,_0x222e76)=>{const _0x563650=_0x4b3d97;for(var _0xd98fb6=_0x222e76>0x1?void 0x0:_0x222e76?_0x4b984a(_0x49691c,_0x2c2bc7):_0x49691c,_0x211d17=_0xed8445[_0x563650(0x221)]-0x1,_0x192c69;_0x211d17>=0x0;_0x211d17--)(_0x192c69=_0xed8445[_0x211d17])&&(_0xd98fb6=_0x192c69(_0xd98fb6)||_0xd98fb6);return _0xd98fb6;},_0x1b80d8=(_0x4c774f,_0x2ba105)=>(_0x4423ff,_0x2eae73)=>_0x2ba105(_0x4423ff,_0x2eae73,_0x4c774f),_0x29c54d=(_0x577aac,_0xca7ecb,_0x3123f6)=>_0x3308aa(_0x577aac,typeof _0xca7ecb!=_0x4b3d97(0x26e)?_0xca7ecb+'':_0xca7ecb,_0x3123f6);_0x3f72c[_0x4b3d97(0x23b)]=class extends _0x459f9a[_0x4b3d97(0x208)]{constructor(_0x3bdbef=_0x5d8192,_0x9756e3,_0x268d3b){const _0x36b919=_0x4b3d97;super(),this['_config']=_0x3bdbef,this[_0x36b919(0x246)]=_0x9756e3,this[_0x36b919(0x270)]=_0x268d3b;const {..._0x45b1d9}=_0x459f9a[_0x36b919(0x1f8)]({},_0x5d8192,this[_0x36b919(0x20f)]);this[_0x36b919(0x270)]['setConfig'](_0x5ad761,_0x45b1d9);}[_0x4b3d97(0x232)](){[[_0x5d8526],[_0x13bed7],[_0x2b7552]]['forEach'](_0x5bb171=>{const _0x411254=_0x468f;this[_0x411254(0x246)][_0x411254(0x236)](_0x5bb171);});}[_0x4b3d97(0x21d)](){const _0x53a3a4=_0x4b3d97;this[_0x53a3a4(0x246)][_0x53a3a4(0x269)](_0x13bed7),this[_0x53a3a4(0x246)][_0x53a3a4(0x269)](_0x2b7552);}},_0x29c54d(_0x3f72c[_0x4b3d97(0x23b)],_0x4b3d97(0x228),_0x201b52),_0x29c54d(_0x3f72c[_0x4b3d97(0x23b)],_0x4b3d97(0x224),_0x459f9a[_0x4b3d97(0x215)]['UNIVER_UNKNOWN']),_0x3f72c['UniverThreadCommentDataSourcePlugin']=_0x52fdd2([_0x459f9a['DependentOn'](_0x47763d[_0x4b3d97(0x216)],_0x52eae7[_0x4b3d97(0x213)],_0x1cf475[_0x4b3d97(0x23f)]),_0x1b80d8(0x1,_0x459f9a[_0x4b3d97(0x268)](_0x459f9a[_0x4b3d97(0x245)])),_0x1b80d8(0x2,_0x459f9a[_0x4b3d97(0x243)])],_0x3f72c[_0x4b3d97(0x23b)]),Object[_0x4b3d97(0x1fa)](_0x3f72c,Symbol[_0x4b3d97(0x20d)],{'value':_0x4b3d97(0x24d)});}));
|
|
1
|
+
function _0x1786(_0x4cdcd8,_0x531a73){const _0x4b81df=_0x4b81();return _0x1786=function(_0x17869c,_0x52c0d1){_0x17869c=_0x17869c-0x1bf;let _0x22bee5=_0x4b81df[_0x17869c];return _0x22bee5;},_0x1786(_0x4cdcd8,_0x531a73);}function _0x4b81(){const _0x4071b7=['solved','IConfigService','forEach','dataSource','2813516KwzeKp','rangeId','comment','@univerjs/thread-comment','deleteComment','580644YIQVQG','replyId','listComments','ThreadCommentModel','UniverProCollaborationClient','threadId','UniverCollaborationClientPlugin','UNRECOGNIZED','@univerjs/core','amd','Injector','Reply','Add','151277VrTaSM','IThreadCommentDataSourceService','toStringTag','requireSession','saveCommentToSnapshot','40ccoFOt','add','Module','getCurrentUser','values','_config','getOwnPropertyDescriptor','_init','UniverInstanceType','createTimestamp','CommentService','422913rqxHOB','unitId','7859403hjXJHM','body','312jgufqq','CustomRangeType','Inject','parentId','@univerjs-pro/collaboration-client','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','updateComment','Solve','size','map','/reply','type','commentUpdate$','resolveComment','userId','/solved','UniverProLicense','dayjs','code','196122fvaPKt','format','_sessionService','length','UniverThreadCommentDataSourcePlugin','@univerjs/thread-comment-ui','getUser','parse','_commentService','slice','addComment','object','_threadCommentDataSource','root','userID','15iDLZrR','addUser','getUnit','users','_threadCommentDataSourceService','/universer-api/comment/unit/','OpenOrReOpen','_configService','post','delete','get','HTTPService','setConfig','rangeType','pluginName','personId','thread-comment-data-source.config','UniverProThreadCommentDatasource','stringify','UniverThreadCommentUi','content','Unknown','UserManagerService','defineProperty','user','DependentOn','/add','_userService','_injector','Solved','_httpService','@univerjs-pro/license','pipe','disposeWithMe','_threadCommentModel','replies','UniverLicensePlugin','symbol','6922390pyqteS','Disposable','getComment','filter','bufferTime','getMemberID','find','exports','YYYY/MM/DD\x20HH:mm','UniverNetwork','/edit','Delete','error','UniverThreadCommentUIPlugin','_initUserSync','Edit'];_0x4b81=function(){return _0x4071b7;};return _0x4b81();}(function(_0x5555e0,_0x4528b4){const _0x4b273f=_0x1786,_0x567f09=_0x5555e0();while(!![]){try{const _0x4796a5=parseInt(_0x4b273f(0x202))/0x1+parseInt(_0x4b273f(0x219))/0x2*(parseInt(_0x4b273f(0x228))/0x3)+-parseInt(_0x4b273f(0x1e0))/0x4+-parseInt(_0x4b273f(0x1f7))/0x5*(parseInt(_0x4b273f(0x1e5))/0x6)+-parseInt(_0x4b273f(0x1f2))/0x7*(-parseInt(_0x4b273f(0x206))/0x8)+parseInt(_0x4b273f(0x204))/0x9+-parseInt(_0x4b273f(0x1cc))/0xa;if(_0x4796a5===_0x4528b4)break;else _0x567f09['push'](_0x567f09['shift']());}catch(_0x311457){_0x567f09['push'](_0x567f09['shift']());}}}(_0x4b81,0x702f0),function(_0x98137f,_0x3e2571){const _0x39576b=_0x1786;typeof exports==_0x39576b(0x224)&&typeof module<'u'?_0x3e2571(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x39576b(0x1ee)]?define([_0x39576b(0x1d3),_0x39576b(0x20a),_0x39576b(0x1c5),_0x39576b(0x1ed),_0x39576b(0x21e),_0x39576b(0x1e3),'rxjs','@univerjs/network'],_0x3e2571):(_0x98137f=typeof globalThis<'u'?globalThis:_0x98137f||self,_0x3e2571(_0x98137f[_0x39576b(0x239)]={},_0x98137f[_0x39576b(0x1e9)],_0x98137f[_0x39576b(0x216)],_0x98137f['UniverCore'],_0x98137f[_0x39576b(0x23b)],_0x98137f['UniverThreadComment'],_0x98137f['rxjs'],_0x98137f[_0x39576b(0x1d5)]));}(this,function(_0x1c69aa,_0x1ce932,_0x18806b,_0x2764e5,_0x544142,_0x1326db,_0x2a1585,_0x23f582){'use strict';const _0x8f8da4=_0x1786;const _0x1d809b=_0x8f8da4(0x20b);var _0x2b8b1d=(_0x573d21=>(_0x573d21[_0x573d21[_0x8f8da4(0x22e)]=0x0]=_0x8f8da4(0x22e),_0x573d21[_0x573d21[_0x8f8da4(0x1c3)]=0x1]=_0x8f8da4(0x1c3),_0x573d21[_0x573d21[_0x8f8da4(0x1ec)]=-0x1]=_0x8f8da4(0x1ec),_0x573d21))(_0x2b8b1d||{}),_0x30e06f=(_0x37bf05=>(_0x37bf05[_0x37bf05[_0x8f8da4(0x23d)]=0x0]=_0x8f8da4(0x23d),_0x37bf05[_0x37bf05[_0x8f8da4(0x1f1)]=0x1]=_0x8f8da4(0x1f1),_0x37bf05[_0x37bf05[_0x8f8da4(0x1f0)]=0x2]='Reply',_0x37bf05[_0x37bf05[_0x8f8da4(0x1db)]=0x3]=_0x8f8da4(0x1db),_0x37bf05[_0x37bf05['Delete']=0x4]=_0x8f8da4(0x1d7),_0x37bf05[_0x37bf05[_0x8f8da4(0x20d)]=0x5]='Solve',_0x37bf05[_0x37bf05[_0x8f8da4(0x1ec)]=-0x1]='UNRECOGNIZED',_0x37bf05))(_0x30e06f||{});const _0x37dc3f=_0x32e2e9=>_0x2764e5['dayjs'](new Date(+_0x32e2e9))[_0x8f8da4(0x21a)](_0x8f8da4(0x1d4)),_0x46c544=async(_0x441ce6,_0x440899)=>{const _0x10e2ec=_0x8f8da4,_0x1a89be=_0x441ce6[_0x10e2ec(0x232)](_0x2764e5[_0x10e2ec(0x23e)]),_0x2fb0dc=_0x441ce6[_0x10e2ec(0x232)](_0x23f582[_0x10e2ec(0x233)]);_0x440899[_0x10e2ec(0x1de)](_0x435851=>{const _0x51be69=_0x10e2ec;_0x1a89be[_0x51be69(0x21f)](_0x435851)&&_0x440899[_0x51be69(0x231)](_0x435851);}),_0x440899[_0x10e2ec(0x20e)]&&(await _0x2fb0dc[_0x10e2ec(0x232)]('/universer-api/user/list',{'params':{'userIDs':[..._0x440899]}}))[_0x10e2ec(0x205)]['users'][_0x10e2ec(0x1de)](_0x5be17c=>{const _0x298f56=_0x10e2ec;_0x5be17c&&_0x1a89be[_0x298f56(0x229)](_0x5be17c);});};var _0x3102e5=Object[_0x8f8da4(0x1fd)],_0xae37e7=(_0xa53c39,_0x35ff45,_0x658df8,_0x57107f)=>{const _0x31b9f8=_0x8f8da4;for(var _0x5f4bcc=_0x57107f>0x1?void 0x0:_0x57107f?_0x3102e5(_0x35ff45,_0x658df8):_0x35ff45,_0x30f7f5=_0xa53c39[_0x31b9f8(0x21c)]-0x1,_0x35b7a1;_0x30f7f5>=0x0;_0x30f7f5--)(_0x35b7a1=_0xa53c39[_0x30f7f5])&&(_0x5f4bcc=_0x35b7a1(_0x5f4bcc)||_0x5f4bcc);return _0x5f4bcc;},_0x7c81b2=(_0xe42556,_0x36baa5)=>(_0x4bcfc5,_0x4b2e0a)=>_0x36baa5(_0x4bcfc5,_0x4b2e0a,_0xe42556);let _0x1d8466=class extends _0x2764e5[_0x8f8da4(0x1cd)]{constructor(_0x2f143d,_0x5be5de,_0x174102,_0x54b74b){const _0x2b5151=_0x8f8da4;super(),this[_0x2b5151(0x221)]=_0x2f143d,this['_threadCommentModel']=_0x5be5de,this[_0x2b5151(0x1c1)]=_0x174102,this[_0x2b5151(0x1c2)]=_0x54b74b,this[_0x2b5151(0x1fe)](),this[_0x2b5151(0x1da)]();}[_0x8f8da4(0x1da)](){const _0xd71ce1=_0x8f8da4;this[_0xd71ce1(0x1c7)](this['_threadCommentModel'][_0xd71ce1(0x212)][_0xd71ce1(0x1c6)](_0x2a1585[_0xd71ce1(0x1d0)](0x10))['subscribe'](_0x57889d=>{const _0x11f194=_0xd71ce1,_0x54e52e=new Set();_0x57889d[_0x11f194(0x1de)](_0xc040a0=>{const _0x48e32c=_0x11f194;switch(_0xc040a0[_0x48e32c(0x211)]){case _0x48e32c(0x1f8):{const _0x38e34a=_0xc040a0['payload'][_0x48e32c(0x237)];_0x54e52e['add'](_0x38e34a);break;}}}),_0x46c544(this[_0x11f194(0x1c2)],_0x54e52e);}));}[_0x8f8da4(0x1fe)](){const _0x5d19f7=_0x8f8da4;this[_0x5d19f7(0x1c7)](this[_0x5d19f7(0x221)]['commentUpdate$']['subscribe'](async _0xa832af=>{const _0x262dc5=_0x5d19f7;var _0x4ed35d,_0x11da0d,_0x857c4e,_0x3f33be;const _0x368b4b=(_0x4ed35d=this[_0x262dc5(0x1c8)][_0x262dc5(0x22a)](_0xa832af[_0x262dc5(0x203)])[_0x262dc5(0x1d2)](_0x5c1388=>_0x5c1388['threadId']===_0xa832af[_0x262dc5(0x1ea)]))==null?void 0x0:_0x4ed35d[_0x262dc5(0x226)];if(!_0x368b4b)return;const {unitId:_0x450b1a,subUnitId:_0x363786}=_0x368b4b;switch(_0xa832af[_0x262dc5(0x240)]&&this['_userService'][_0x262dc5(0x229)](_0xa832af[_0x262dc5(0x240)]),_0xa832af['type']){case _0x30e06f['Add']:break;case _0x30e06f[_0x262dc5(0x1f0)]:{this[_0x262dc5(0x1c8)][_0x262dc5(0x223)](_0x450b1a,_0x363786,{'unitId':_0x450b1a,'subUnitId':_0x363786,'ref':'','id':_0xa832af[_0x262dc5(0x1e6)],'dT':_0x37dc3f(+_0xa832af['createTimestamp']),'threadId':_0xa832af[_0x262dc5(0x1ea)],'personId':(_0x857c4e=(_0x11da0d=_0xa832af[_0x262dc5(0x240)])==null?void 0x0:_0x11da0d['userID'])!=null?_0x857c4e:_0xa832af['userId'],'text':JSON['parse'](_0xa832af[_0x262dc5(0x23c)]),'parentId':_0x368b4b['id']});break;}case _0x30e06f[_0x262dc5(0x1d7)]:{const _0x1f0ab1=this[_0x262dc5(0x1c8)][_0x262dc5(0x1ce)](_0x450b1a,_0x363786,_0xa832af['replyId']);_0x1f0ab1&&_0x1f0ab1[_0x262dc5(0x209)]&&this[_0x262dc5(0x1c8)][_0x262dc5(0x1e4)](_0x450b1a,_0x363786,_0xa832af[_0x262dc5(0x1e6)]);break;}case _0x30e06f[_0x262dc5(0x1db)]:{this[_0x262dc5(0x1c8)][_0x262dc5(0x20c)](_0x450b1a,_0x363786,{'commentId':_0xa832af[_0x262dc5(0x1e6)],'text':JSON[_0x262dc5(0x220)](_0xa832af['content'])});break;}case _0x30e06f[_0x262dc5(0x20d)]:{const _0x22def8=(_0x3f33be=this['_threadCommentModel'][_0x262dc5(0x22a)](_0xa832af['unitId'])['find'](_0x4c397e=>_0x4c397e[_0x262dc5(0x1ea)]===_0xa832af[_0x262dc5(0x1ea)]))==null?void 0x0:_0x3f33be[_0x262dc5(0x226)];_0x22def8&&this[_0x262dc5(0x1c8)][_0x262dc5(0x213)](_0x450b1a,_0x363786,_0x22def8['id'],_0xa832af[_0x262dc5(0x1dc)]===_0x2b8b1d[_0x262dc5(0x1c3)]);break;}}}));}};_0x1d8466=_0xae37e7([_0x7c81b2(0x0,_0x2764e5[_0x8f8da4(0x208)](_0x1ce932[_0x8f8da4(0x201)])),_0x7c81b2(0x1,_0x2764e5[_0x8f8da4(0x208)](_0x1326db[_0x8f8da4(0x1e8)])),_0x7c81b2(0x2,_0x2764e5['Inject'](_0x2764e5[_0x8f8da4(0x23e)])),_0x7c81b2(0x3,_0x2764e5[_0x8f8da4(0x208)](_0x2764e5[_0x8f8da4(0x1ef)]))],_0x1d8466);const _0x1c77e8=_0x8f8da4(0x238),_0x5515c9={};var _0x118178=Object[_0x8f8da4(0x1fd)],_0x40818f=(_0xc7cae9,_0x20e855,_0x149ba3,_0x21e261)=>{const _0x27d5cd=_0x8f8da4;for(var _0x379faa=_0x21e261>0x1?void 0x0:_0x21e261?_0x118178(_0x20e855,_0x149ba3):_0x20e855,_0x591fab=_0xc7cae9[_0x27d5cd(0x21c)]-0x1,_0x345171;_0x591fab>=0x0;_0x591fab--)(_0x345171=_0xc7cae9[_0x591fab])&&(_0x379faa=_0x345171(_0x379faa)||_0x379faa);return _0x379faa;},_0xa13acf=(_0x19e448,_0x1a8215)=>(_0x366628,_0x43a788)=>_0x1a8215(_0x366628,_0x43a788,_0x19e448);function _0x11e21d(_0x355519,_0xf3488c){const _0x3ab8bf=_0x8f8da4,_0x173b4f=_0x355519[_0x3ab8bf(0x1c9)][0x0];return{..._0xf3488c,'id':_0x173b4f['replyId'],'resolved':_0x355519[_0x3ab8bf(0x1dc)]===0x1,'dT':_0x37dc3f(_0x173b4f[_0x3ab8bf(0x200)]),'personId':_0x173b4f[_0x3ab8bf(0x214)],'threadId':_0x173b4f[_0x3ab8bf(0x1ea)]};}function _0x27ea1e(_0x3fef39,_0x3c0351,_0x5b5902){const _0x1a032b=_0x8f8da4;var _0x2134a3,_0x46ffad;if(((_0x46ffad=(_0x2134a3=_0x3fef39==null?void 0x0:_0x3fef39[_0x1a032b(0x1c9)])==null?void 0x0:_0x2134a3[_0x1a032b(0x21c)])!=null?_0x46ffad:0x0)>0x0){const _0x441481=(_0x360f04,_0x79614)=>({'id':_0x360f04['replyId'],'threadId':_0x360f04['threadId'],'dT':_0x37dc3f(_0x360f04[_0x1a032b(0x200)]),'personId':_0x360f04[_0x1a032b(0x214)],'resolved':_0x3fef39['solved']===_0x2b8b1d[_0x1a032b(0x1c3)],'unitId':_0x3c0351,'subUnitId':_0x5b5902,'text':JSON['parse'](_0x360f04['content']),'parentId':_0x79614}),_0x15afc5=_0x441481(_0x3fef39[_0x1a032b(0x1c9)][0x0]);return{..._0x15afc5,'children':_0x3fef39['replies'][_0x1a032b(0x222)](0x1)['map'](_0xfc969f=>_0x441481(_0xfc969f,_0x15afc5['id']))};}return null;}let _0x486f3b=class{constructor(_0x2a8029,_0x520a3b,_0x190e98){const _0x3a912b=_0x8f8da4;this[_0x3a912b(0x1c4)]=_0x2a8029,this[_0x3a912b(0x1c1)]=_0x520a3b,this[_0x3a912b(0x21b)]=_0x190e98;}async[_0x8f8da4(0x223)](_0xe746fe){const _0x43fb0d=_0x8f8da4;var _0x460908,_0x2fb447;const {parentId:_0x397220,unitId:_0x49ae66,text:_0x4736f1,threadId:_0x52b2f6}=_0xe746fe,_0x217814=(_0x2fb447=(_0x460908=_0x4736f1['customRanges'])==null?void 0x0:_0x460908[_0x43fb0d(0x1cf)](_0x125269=>_0x125269[_0x43fb0d(0x235)]===_0x2764e5['CustomRangeType']['COMMENT'])[_0x43fb0d(0x20f)](_0x498d87=>_0x498d87['rangeId']))!=null?_0x2fb447:[],_0x1057a1=JSON[_0x43fb0d(0x23a)](_0x4736f1),_0x1c9b8e=(await this[_0x43fb0d(0x21b)][_0x43fb0d(0x1f5)](_0x49ae66))[_0x43fb0d(0x1d1)]();if(_0x397220){const _0x21345b={'memberId':_0x1c9b8e,'unitId':_0x49ae66,'content':_0x1057a1,'mention':_0x217814,'threadId':_0x52b2f6},_0x2c461b=(await this[_0x43fb0d(0x1c4)][_0x43fb0d(0x230)](_0x43fb0d(0x22d)+_0x49ae66+_0x43fb0d(0x210),{'body':_0x21345b}))[_0x43fb0d(0x205)]['reply'];return{..._0xe746fe,'id':_0x2c461b[_0x43fb0d(0x1e6)],'dT':_0x2764e5[_0x43fb0d(0x217)](+_0x2c461b[_0x43fb0d(0x200)])['format'](_0x43fb0d(0x1d4)),'personId':_0x2c461b[_0x43fb0d(0x214)]};}else{const _0x534a59={'memberId':_0x1c9b8e,'unitId':_0x49ae66,'content':_0x1057a1,'mention':_0x217814},_0x4c37c7=await this[_0x43fb0d(0x1c4)][_0x43fb0d(0x230)](_0x43fb0d(0x22d)+_0x49ae66+_0x43fb0d(0x1c0),{'body':_0x534a59});return _0x11e21d(_0x4c37c7[_0x43fb0d(0x205)][_0x43fb0d(0x1e2)],_0xe746fe);}}async['updateComment'](_0x9db4ec){const _0x232436=_0x8f8da4;var _0x20a5fb,_0x523137;const {text:_0x13ca94,unitId:_0x1fba14}=_0x9db4ec,_0x2bf0ab=(_0x523137=(_0x20a5fb=_0x13ca94['customRanges'])==null?void 0x0:_0x20a5fb[_0x232436(0x1cf)](_0x2ca485=>_0x2ca485[_0x232436(0x235)]===_0x2764e5[_0x232436(0x207)]['COMMENT'])[_0x232436(0x20f)](_0x4c1696=>_0x4c1696[_0x232436(0x1e1)]))!=null?_0x523137:[],_0x261701=JSON[_0x232436(0x23a)](_0x13ca94),_0x552905=_0x9db4ec[_0x232436(0x1ea)],_0x5b7215=_0x9db4ec['id'],_0x4c0643={'memberId':(await this[_0x232436(0x21b)][_0x232436(0x1f5)](_0x1fba14))[_0x232436(0x1d1)](),'unitId':_0x1fba14,'threadId':_0x552905,'mention':_0x2bf0ab,'content':_0x261701,'replyId':_0x5b7215},_0x58be6b=await this[_0x232436(0x1c4)][_0x232436(0x230)]('/universer-api/comment/unit/'+_0x1fba14+_0x232436(0x1d6),{'body':_0x4c0643});return!_0x58be6b[_0x232436(0x205)][_0x232436(0x1d8)]||_0x58be6b['body'][_0x232436(0x1d8)]['code']===0x1;}async[_0x8f8da4(0x213)](_0x3a97d4){const _0x229453=_0x8f8da4,{unitId:_0xdc1e3}=_0x3a97d4,_0x4555d1=_0x3a97d4[_0x229453(0x1ea)],_0xb64be={'memberId':this[_0x229453(0x1c1)][_0x229453(0x1fa)]()[_0x229453(0x227)],'unitId':_0xdc1e3,'threadId':_0x4555d1,'solved':_0x3a97d4['resolved']?_0x2b8b1d[_0x229453(0x1c3)]:_0x2b8b1d[_0x229453(0x22e)]},_0x2959d9=await this[_0x229453(0x1c4)][_0x229453(0x230)](_0x229453(0x22d)+_0xdc1e3+_0x229453(0x215),{'body':_0xb64be});return!_0x2959d9[_0x229453(0x205)][_0x229453(0x1d8)]||_0x2959d9[_0x229453(0x205)][_0x229453(0x1d8)][_0x229453(0x218)]===0x1;}async[_0x8f8da4(0x1e4)](_0x354871,_0x9431b3,_0xa117d4,_0x56cba0){const _0x27a6c3=_0x8f8da4,_0x26d266={'memberId':(await this[_0x27a6c3(0x21b)][_0x27a6c3(0x1f5)](_0x354871))['getMemberID'](),'threadId':_0xa117d4,'replyId':_0x56cba0,'unitId':_0x354871},_0x2be28b=await this[_0x27a6c3(0x1c4)][_0x27a6c3(0x230)]('/universer-api/comment/unit/'+_0x354871+'/delete',{'body':_0x26d266});return!_0x2be28b[_0x27a6c3(0x205)][_0x27a6c3(0x1d8)]||_0x2be28b['body'][_0x27a6c3(0x1d8)][_0x27a6c3(0x218)]===0x1;}async[_0x8f8da4(0x1e7)](_0x1fac75,_0x1e74e5,_0x2a59bf){const _0x33be0e=_0x8f8da4,_0x48085f={'unitId':_0x1fac75,'threadId':_0x2a59bf},_0x247148=await this[_0x33be0e(0x1c4)][_0x33be0e(0x230)](_0x33be0e(0x22d)+_0x1fac75+'/list',{'body':_0x48085f}),_0x5c7746=_0x2a59bf['map'](_0x3e1e18=>_0x27ea1e(_0x247148[_0x33be0e(0x205)]['comments'][_0x3e1e18],_0x1fac75,_0x1e74e5))[_0x33be0e(0x1cf)](Boolean);return Object[_0x33be0e(0x1fb)](_0x247148[_0x33be0e(0x205)][_0x33be0e(0x22b)])[_0x33be0e(0x1de)](_0x2f014a=>{this['_userService']['addUser'](_0x2f014a);}),_0x5c7746;}[_0x8f8da4(0x1f6)](_0x307dd3){const _0xf2ad6=_0x8f8da4;return{'id':_0x307dd3['id'],'threadId':_0x307dd3[_0xf2ad6(0x1ea)],'ref':_0x307dd3['ref']};}};_0x486f3b=_0x40818f([_0xa13acf(0x0,_0x2764e5[_0x8f8da4(0x208)](_0x23f582[_0x8f8da4(0x233)])),_0xa13acf(0x1,_0x2764e5[_0x8f8da4(0x208)](_0x2764e5['UserManagerService'])),_0xa13acf(0x2,_0x2764e5['Inject'](_0x1ce932['CollaborationSessionService']))],_0x486f3b);var _0x44bc2b=Object[_0x8f8da4(0x1fd)],_0xe960d7=(_0x12eef0,_0x2be8f2,_0x4e397e,_0x1b6995)=>{for(var _0x378887=_0x1b6995>0x1?void 0x0:_0x1b6995?_0x44bc2b(_0x2be8f2,_0x4e397e):_0x2be8f2,_0xb37d08=_0x12eef0['length']-0x1,_0x559318;_0xb37d08>=0x0;_0xb37d08--)(_0x559318=_0x12eef0[_0xb37d08])&&(_0x378887=_0x559318(_0x378887)||_0x378887);return _0x378887;},_0x1ab3ea=(_0x446bc2,_0x2bb984)=>(_0x4de4bc,_0x5b5184)=>_0x2bb984(_0x4de4bc,_0x5b5184,_0x446bc2);let _0xc789e6=class extends _0x2764e5[_0x8f8da4(0x1cd)]{constructor(_0x16087a,_0x225d47){const _0x28d8dd=_0x8f8da4;super(),this['_threadCommentDataSourceService']=_0x16087a,this[_0x28d8dd(0x225)]=_0x225d47,this['_initDataSource']();}['_initDataSource'](){const _0x4cc1e6=_0x8f8da4;this[_0x4cc1e6(0x22c)][_0x4cc1e6(0x1df)]=this[_0x4cc1e6(0x225)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0xc789e6=_0xe960d7([_0x1ab3ea(0x0,_0x1326db[_0x8f8da4(0x1f3)]),_0x1ab3ea(0x1,_0x2764e5[_0x8f8da4(0x208)](_0x486f3b))],_0xc789e6);var _0x10bf96=Object[_0x8f8da4(0x23f)],_0x22a4c2=Object[_0x8f8da4(0x1fd)],_0x42790c=(_0x128903,_0x337078,_0xd69cec)=>_0x337078 in _0x128903?_0x10bf96(_0x128903,_0x337078,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd69cec}):_0x128903[_0x337078]=_0xd69cec,_0x17cec2=(_0x429f1a,_0x555ce3,_0x2c8f46,_0x1a4821)=>{for(var _0x5228aa=_0x1a4821>0x1?void 0x0:_0x1a4821?_0x22a4c2(_0x555ce3,_0x2c8f46):_0x555ce3,_0x418df1=_0x429f1a['length']-0x1,_0x559782;_0x418df1>=0x0;_0x418df1--)(_0x559782=_0x429f1a[_0x418df1])&&(_0x5228aa=_0x559782(_0x5228aa)||_0x5228aa);return _0x5228aa;},_0x56d4a7=(_0x51831a,_0x5e252b)=>(_0xdb230b,_0x31fedb)=>_0x5e252b(_0xdb230b,_0x31fedb,_0x51831a),_0x282c90=(_0x1e51e2,_0x55b0c2,_0x2e5e3d)=>_0x42790c(_0x1e51e2,typeof _0x55b0c2!=_0x8f8da4(0x1cb)?_0x55b0c2+'':_0x55b0c2,_0x2e5e3d);_0x1c69aa[_0x8f8da4(0x21d)]=class extends _0x2764e5['Plugin']{constructor(_0x5c9a31=_0x5515c9,_0x595e5e,_0x130e5b){const _0x39ccb6=_0x8f8da4;super(),this[_0x39ccb6(0x1fc)]=_0x5c9a31,this[_0x39ccb6(0x1c2)]=_0x595e5e,this[_0x39ccb6(0x22f)]=_0x130e5b;const {..._0x6acc31}=_0x2764e5['merge']({},_0x5515c9,this[_0x39ccb6(0x1fc)]);this[_0x39ccb6(0x22f)][_0x39ccb6(0x234)](_0x1c77e8,_0x6acc31);}['onStarting'](){const _0x4fdc35=_0x8f8da4;[[_0x486f3b],[_0xc789e6],[_0x1d8466]][_0x4fdc35(0x1de)](_0x2cb39e=>{const _0x5a0ecd=_0x4fdc35;this['_injector'][_0x5a0ecd(0x1f8)](_0x2cb39e);});}['onReady'](){const _0xfb830b=_0x8f8da4;this[_0xfb830b(0x1c2)][_0xfb830b(0x232)](_0xc789e6),this[_0xfb830b(0x1c2)][_0xfb830b(0x232)](_0x1d8466);}},_0x282c90(_0x1c69aa['UniverThreadCommentDataSourcePlugin'],_0x8f8da4(0x236),_0x1d809b),_0x282c90(_0x1c69aa['UniverThreadCommentDataSourcePlugin'],'type',_0x2764e5[_0x8f8da4(0x1ff)]['UNIVER_UNKNOWN']),_0x1c69aa['UniverThreadCommentDataSourcePlugin']=_0x17cec2([_0x2764e5[_0x8f8da4(0x1bf)](_0x544142[_0x8f8da4(0x1d9)],_0x1ce932[_0x8f8da4(0x1eb)],_0x18806b[_0x8f8da4(0x1ca)]),_0x56d4a7(0x1,_0x2764e5['Inject'](_0x2764e5[_0x8f8da4(0x1ef)])),_0x56d4a7(0x2,_0x2764e5[_0x8f8da4(0x1dd)])],_0x1c69aa[_0x8f8da4(0x21d)]),Object[_0x8f8da4(0x23f)](_0x1c69aa,Symbol[_0x8f8da4(0x1f4)],{'value':_0x8f8da4(0x1f9)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.6-experimental.
|
|
3
|
+
"version": "0.10.6-experimental.20250904-9591d16",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.10.6-experimental.
|
|
49
|
-
"@univerjs-pro/license": "0.10.6-experimental.
|
|
50
|
-
"@univerjs/core": "0.10.6-experimental.
|
|
51
|
-
"@univerjs/network": "0.10.6-experimental.
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.10.6-experimental.
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.6-experimental.20250904-9591d16",
|
|
49
|
+
"@univerjs-pro/license": "0.10.6-experimental.20250904-9591d16",
|
|
50
|
+
"@univerjs/core": "0.10.6-experimental.20250904-9591d16",
|
|
51
|
+
"@univerjs/network": "0.10.6-experimental.20250904-9591d16",
|
|
52
|
+
"@univerjs/thread-comment": "0.10.6-experimental.20250904-9591d16",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.10.6-experimental.20250904-9591d16",
|
|
54
|
+
"@univerjs/protocol": "0.1.47-alpha.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|