@univerjs-pro/thread-comment-datasource 0.10.12-nightly.202510221114 → 0.10.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x1decc9=_0x4465;(function(_0x1c8927,_0x12226a){const _0x476008=_0x4465,_0x381ab7=_0x1c8927();while(!![]){try{const _0x24bac1=-parseInt(_0x476008(0x1bd))/0x1*(parseInt(_0x476008(0x165))/0x2)+parseInt(_0x476008(0x1a0))/0x3+parseInt(_0x476008(0x1ad))/0x4+parseInt(_0x476008(0x174))/0x5*(parseInt(_0x476008(0x1b4))/0x6)+-parseInt(_0x476008(0x18b))/0x7*(parseInt(_0x476008(0x1ce))/0x8)+-parseInt(_0x476008(0x18f))/0x9+parseInt(_0x476008(0x1a9))/0xa;if(_0x24bac1===_0x12226a)break;else _0x381ab7['push'](_0x381ab7['shift']());}catch(_0x5331a2){_0x381ab7['push'](_0x381ab7['shift']());}}}(_0x316b,0x7a51c));Object[_0x1decc9(0x16e)](exports,Symbol[_0x1decc9(0x1ca)],{'value':_0x1decc9(0x1ab)});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=_0x1decc9(0x1bf);var I=(_0x17efd0=>(_0x17efd0[_0x17efd0[_0x1decc9(0x189)]=0x0]=_0x1decc9(0x189),_0x17efd0[_0x17efd0[_0x1decc9(0x1b5)]=0x1]=_0x1decc9(0x1b5),_0x17efd0[_0x17efd0[_0x1decc9(0x17e)]=-0x1]=_0x1decc9(0x17e),_0x17efd0))(I||{}),v=(_0x591815=>(_0x591815[_0x591815[_0x1decc9(0x18a)]=0x0]=_0x1decc9(0x18a),_0x591815[_0x591815['Add']=0x1]=_0x1decc9(0x1a7),_0x591815[_0x591815['Reply']=0x2]=_0x1decc9(0x173),_0x591815[_0x591815[_0x1decc9(0x1af)]=0x3]=_0x1decc9(0x1af),_0x591815[_0x591815[_0x1decc9(0x1d1)]=0x4]=_0x1decc9(0x1d1),_0x591815[_0x591815['Solve']=0x5]=_0x1decc9(0x19d),_0x591815[_0x591815[_0x1decc9(0x17e)]=-0x1]=_0x1decc9(0x17e),_0x591815))(v||{});const f=_0x35160d=>c[_0x1decc9(0x184)](new Date(+_0x35160d))[_0x1decc9(0x187)](_0x1decc9(0x1b2)),R=async(_0x2a61c8,_0x462c76)=>{const _0x466644=_0x1decc9,_0x112b49=_0x2a61c8[_0x466644(0x1b9)](c['UserManagerService']),_0x2dbdb2=_0x2a61c8[_0x466644(0x1b9)](P[_0x466644(0x1a3)]);_0x462c76[_0x466644(0x175)](_0x949069=>{const _0x5e480e=_0x466644;_0x112b49[_0x5e480e(0x1cb)](_0x949069)&&_0x462c76[_0x5e480e(0x15f)](_0x949069);}),_0x462c76['size']&&(await _0x2dbdb2[_0x466644(0x1b9)](_0x466644(0x188),{'params':{'userIDs':[..._0x462c76]}}))['body'][_0x466644(0x196)]['forEach'](_0x15ade7=>{const _0x538c9a=_0x466644;_0x15ade7&&_0x112b49[_0x538c9a(0x1c9)](_0x15ade7);});};var $=Object[_0x1decc9(0x1a5)],E=(_0x8ddf49,_0x1471b8,_0x56636a,_0x4e07a8)=>{for(var _0x287152=_0x4e07a8>0x1?void 0x0:_0x4e07a8?$(_0x1471b8,_0x56636a):_0x1471b8,_0x343704=_0x8ddf49['length']-0x1,_0x13b356;_0x343704>=0x0;_0x343704--)(_0x13b356=_0x8ddf49[_0x343704])&&(_0x287152=_0x13b356(_0x287152)||_0x287152);return _0x287152;},S=(_0xe3f195,_0x5402d9)=>(_0x120955,_0x572e9f)=>_0x5402d9(_0x120955,_0x572e9f,_0xe3f195);let _=class extends c[_0x1decc9(0x1c3)]{constructor(_0x1dfc85,_0xe92dfa,_0x40752b,_0x5ae8d2){const _0x48e68d=_0x1decc9;super(),this[_0x48e68d(0x1c6)]=_0x1dfc85,this[_0x48e68d(0x1c1)]=_0xe92dfa,this[_0x48e68d(0x193)]=_0x40752b,this[_0x48e68d(0x178)]=_0x5ae8d2,this[_0x48e68d(0x1b1)](),this['_initUserSync']();}[_0x1decc9(0x15e)](){const _0x356d7e=_0x1decc9;this['disposeWithMe'](this[_0x356d7e(0x1c1)][_0x356d7e(0x1c2)][_0x356d7e(0x16b)](j[_0x356d7e(0x19c)](0x10))[_0x356d7e(0x199)](_0x271c14=>{const _0x57419e=_0x356d7e,_0x13a863=new Set();_0x271c14[_0x57419e(0x175)](_0x2cd80a=>{const _0x35d3b6=_0x57419e;switch(_0x2cd80a[_0x35d3b6(0x1cf)]){case _0x35d3b6(0x1a2):{const _0x24faed=_0x2cd80a[_0x35d3b6(0x195)][_0x35d3b6(0x194)];_0x13a863['add'](_0x24faed);break;}}}),R(this[_0x57419e(0x178)],_0x13a863);}));}[_0x1decc9(0x1b1)](){const _0x5541b6=_0x1decc9;this['disposeWithMe'](this[_0x5541b6(0x1c6)][_0x5541b6(0x1c2)][_0x5541b6(0x199)](async _0x3980ed=>{const _0x4814a6=_0x5541b6;var _0x495b67,_0x1b5c96,_0xfb206c,_0x3917fa;const _0x1078a8=(_0x495b67=this[_0x4814a6(0x1c1)]['getUnit'](_0x3980ed[_0x4814a6(0x16f)])[_0x4814a6(0x171)](_0x3507b3=>_0x3507b3[_0x4814a6(0x1b0)]===_0x3980ed[_0x4814a6(0x1b0)]))==null?void 0x0:_0x495b67[_0x4814a6(0x16d)];if(!_0x1078a8)return;const {unitId:_0x6dad42,subUnitId:_0x1f801e}=_0x1078a8;switch(_0x3980ed[_0x4814a6(0x1a6)]&&this[_0x4814a6(0x193)][_0x4814a6(0x1c9)](_0x3980ed[_0x4814a6(0x1a6)]),_0x3980ed[_0x4814a6(0x1cf)]){case v[_0x4814a6(0x1a7)]:break;case v[_0x4814a6(0x173)]:{this['_threadCommentModel'][_0x4814a6(0x17d)](_0x6dad42,_0x1f801e,{'unitId':_0x6dad42,'subUnitId':_0x1f801e,'ref':'','id':_0x3980ed[_0x4814a6(0x1c4)],'dT':f(+_0x3980ed['createTimestamp']),'threadId':_0x3980ed[_0x4814a6(0x1b0)],'personId':(_0xfb206c=(_0x1b5c96=_0x3980ed[_0x4814a6(0x1a6)])==null?void 0x0:_0x1b5c96[_0x4814a6(0x164)])!=null?_0xfb206c:_0x3980ed['userId'],'text':JSON['parse'](_0x3980ed[_0x4814a6(0x1cc)]),'parentId':_0x1078a8['id']});break;}case v[_0x4814a6(0x1d1)]:{const _0x5899af=this['_threadCommentModel'][_0x4814a6(0x17c)](_0x6dad42,_0x1f801e,_0x3980ed[_0x4814a6(0x1c4)]);_0x5899af&&_0x5899af['parentId']&&this[_0x4814a6(0x1c1)][_0x4814a6(0x170)](_0x6dad42,_0x1f801e,_0x3980ed[_0x4814a6(0x1c4)]);break;}case v['Edit']:{this[_0x4814a6(0x1c1)][_0x4814a6(0x163)](_0x6dad42,_0x1f801e,{'commentId':_0x3980ed[_0x4814a6(0x1c4)],'text':JSON[_0x4814a6(0x17b)](_0x3980ed['content'])});break;}case v['Solve']:{const _0x23a30b=(_0x3917fa=this[_0x4814a6(0x1c1)][_0x4814a6(0x1c8)](_0x3980ed[_0x4814a6(0x16f)])[_0x4814a6(0x171)](_0x25e557=>_0x25e557[_0x4814a6(0x1b0)]===_0x3980ed[_0x4814a6(0x1b0)]))==null?void 0x0:_0x3917fa[_0x4814a6(0x16d)];_0x23a30b&&this[_0x4814a6(0x1c1)][_0x4814a6(0x161)](_0x6dad42,_0x1f801e,_0x23a30b['id'],_0x3980ed[_0x4814a6(0x186)]===I[_0x4814a6(0x1b5)]);break;}}}));}};_=E([S(0x0,c[_0x1decc9(0x18d)](b[_0x1decc9(0x168)])),S(0x1,c[_0x1decc9(0x18d)](M[_0x1decc9(0x1d4)])),S(0x2,c[_0x1decc9(0x18d)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x1decc9(0x15a)]))],_);const q=_0x1decc9(0x19f),D={};function _0x316b(){const _0x24848c=['12360460ZrgiOu','_httpService','Module','values','2225612mGNYbB','Plugin','Edit','threadId','_init','YYYY/MM/DD\x20HH:mm','post','6IHdedR','Solved','saveCommentToSnapshot','UniverInstanceType','dataSource','get','reply','getMemberID','UniverLicensePlugin','227EQJNsP','_threadCommentDataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','_threadCommentModel','commentUpdate$','Disposable','replyId','CollaborationSessionService','_commentService','_threadCommentDataSourceService','getUnit','addUser','toStringTag','getUser','content','_sessionService','8GRSHlq','type','requireSession','Delete','comment','DependentOn','ThreadCommentModel','Injector','_config','customRanges','_initDataSource','_initUserSync','delete','body','resolveComment','map','updateComment','userID','4366RlMiEk','UniverThreadCommentDataSourcePlugin','pluginName','CommentService','listComments','code','pipe','onStarting','root','defineProperty','unitId','deleteComment','find','filter','Reply','1663345kvHXGq','forEach','error','/reply','_injector','onReady','/edit','parse','getComment','addComment','UNRECOGNIZED','syncUpdateMutationToColla','rangeType','rangeId','/delete','merge','dayjs','stringify','solved','format','/universer-api/user/list','OpenOrReOpen','Unknown','5906943olbJLw','slice','Inject','COMMENT','8668242xqUtCq','UNIVER_UNKNOWN','createTimestamp','CustomRangeType','_userService','personId','payload','users','/universer-api/comment/unit/','userId','subscribe','_configService','getCurrentUser','bufferTime','Solve','IConfigService','thread-comment-data-source.config','2035290mnxXuS','replies','add','HTTPService','UniverCollaborationClientPlugin','getOwnPropertyDescriptor','user','Add','/list'];_0x316b=function(){return _0x24848c;};return _0x316b();}var A=Object[_0x1decc9(0x1a5)],x=(_0x247ba1,_0x1b0436,_0x5321ab,_0x48ba14)=>{const _0x3eebcc=_0x1decc9;for(var _0x325f33=_0x48ba14>0x1?void 0x0:_0x48ba14?A(_0x1b0436,_0x5321ab):_0x1b0436,_0x3a3a74=_0x247ba1[_0x3eebcc(0x1c0)]-0x1,_0x57bf38;_0x3a3a74>=0x0;_0x3a3a74--)(_0x57bf38=_0x247ba1[_0x3a3a74])&&(_0x325f33=_0x57bf38(_0x325f33)||_0x325f33);return _0x325f33;},C=(_0x2291ba,_0xbc0e7)=>(_0x264a6f,_0x2584e6)=>_0xbc0e7(_0x264a6f,_0x2584e6,_0x2291ba);function Y(_0x4d6178,_0x42eed3){const _0x5e870d=_0x1decc9,_0x587053=_0x4d6178[_0x5e870d(0x1a1)][0x0];return{..._0x42eed3,'id':_0x587053[_0x5e870d(0x1c4)],'resolved':_0x4d6178[_0x5e870d(0x186)]===0x1,'dT':f(_0x587053[_0x5e870d(0x191)]),'personId':_0x587053[_0x5e870d(0x198)],'threadId':_0x587053[_0x5e870d(0x1b0)]};}function G(_0x576417,_0xd8f498,_0x367030){const _0x39efc0=_0x1decc9;var _0x3d055b,_0x5f4c20;if(((_0x5f4c20=(_0x3d055b=_0x576417==null?void 0x0:_0x576417[_0x39efc0(0x1a1)])==null?void 0x0:_0x3d055b[_0x39efc0(0x1c0)])!=null?_0x5f4c20:0x0)>0x0){const _0x570c49=(_0x3c3a33,_0x5a0020)=>({'id':_0x3c3a33[_0x39efc0(0x1c4)],'threadId':_0x3c3a33[_0x39efc0(0x1b0)],'dT':f(_0x3c3a33[_0x39efc0(0x191)]),'personId':_0x3c3a33[_0x39efc0(0x198)],'resolved':_0x576417[_0x39efc0(0x186)]===I[_0x39efc0(0x1b5)],'unitId':_0xd8f498,'subUnitId':_0x367030,'text':JSON[_0x39efc0(0x17b)](_0x3c3a33[_0x39efc0(0x1cc)]),'parentId':_0x5a0020}),_0x37c71c=_0x570c49(_0x576417['replies'][0x0]);return{..._0x37c71c,'children':_0x576417[_0x39efc0(0x1a1)][_0x39efc0(0x18c)](0x1)[_0x39efc0(0x162)](_0x578ca3=>_0x570c49(_0x578ca3,_0x37c71c['id']))};}return null;}let p=class{constructor(_0x1911cb,_0x345b9a,_0x2a173b){const _0x486096=_0x1decc9;this['_httpService']=_0x1911cb,this[_0x486096(0x193)]=_0x345b9a,this[_0x486096(0x1cd)]=_0x2a173b;}async[_0x1decc9(0x17d)](_0x40f00f){const _0x3030c1=_0x1decc9;var _0x613f3,_0x22a790;const {parentId:_0x43f3c6,unitId:_0x4ddef4,text:_0x4f7598,threadId:_0x23b6c7}=_0x40f00f,_0x15a1a2=(_0x22a790=(_0x613f3=_0x4f7598[_0x3030c1(0x15c)])==null?void 0x0:_0x613f3[_0x3030c1(0x172)](_0x4e5d9a=>_0x4e5d9a['rangeType']===c['CustomRangeType']['COMMENT'])[_0x3030c1(0x162)](_0x118447=>_0x118447[_0x3030c1(0x181)]))!=null?_0x22a790:[],_0x3e3828=JSON[_0x3030c1(0x185)](_0x4f7598),_0xd8f07b=(await this[_0x3030c1(0x1cd)][_0x3030c1(0x1d0)](_0x4ddef4))['getMemberID']();if(_0x43f3c6){const _0x1990a8={'memberId':_0xd8f07b,'unitId':_0x4ddef4,'content':_0x3e3828,'mention':_0x15a1a2,'threadId':_0x23b6c7},_0x3ef836=(await this['_httpService']['post'](_0x3030c1(0x197)+_0x4ddef4+_0x3030c1(0x177),{'body':_0x1990a8}))[_0x3030c1(0x160)][_0x3030c1(0x1ba)];return{..._0x40f00f,'id':_0x3ef836[_0x3030c1(0x1c4)],'dT':c[_0x3030c1(0x184)](+_0x3ef836[_0x3030c1(0x191)])[_0x3030c1(0x187)](_0x3030c1(0x1b2)),'personId':_0x3ef836[_0x3030c1(0x198)]};}else{const _0x1054f5={'memberId':_0xd8f07b,'unitId':_0x4ddef4,'content':_0x3e3828,'mention':_0x15a1a2},_0x13a0a9=await this[_0x3030c1(0x1aa)]['post']('/universer-api/comment/unit/'+_0x4ddef4+'/add',{'body':_0x1054f5});return Y(_0x13a0a9['body'][_0x3030c1(0x1d2)],_0x40f00f);}}async[_0x1decc9(0x163)](_0x1644e5){const _0x1ad13e=_0x1decc9;var _0x545e31,_0xda0e14;const {text:_0x290cb6,unitId:_0xed0da9}=_0x1644e5,_0x4cafaf=(_0xda0e14=(_0x545e31=_0x290cb6[_0x1ad13e(0x15c)])==null?void 0x0:_0x545e31[_0x1ad13e(0x172)](_0x11498b=>_0x11498b[_0x1ad13e(0x180)]===c[_0x1ad13e(0x192)][_0x1ad13e(0x18e)])[_0x1ad13e(0x162)](_0x143c82=>_0x143c82[_0x1ad13e(0x181)]))!=null?_0xda0e14:[],_0x1aa1cd=JSON[_0x1ad13e(0x185)](_0x290cb6),_0x6fb97e=_0x1644e5[_0x1ad13e(0x1b0)],_0x3c72c5=_0x1644e5['id'],_0x2ff56b={'memberId':(await this[_0x1ad13e(0x1cd)]['requireSession'](_0xed0da9))[_0x1ad13e(0x1bb)](),'unitId':_0xed0da9,'threadId':_0x6fb97e,'mention':_0x4cafaf,'content':_0x1aa1cd,'replyId':_0x3c72c5},_0x195a1e=await this['_httpService'][_0x1ad13e(0x1b3)]('/universer-api/comment/unit/'+_0xed0da9+_0x1ad13e(0x17a),{'body':_0x2ff56b});return!_0x195a1e[_0x1ad13e(0x160)][_0x1ad13e(0x176)]||_0x195a1e[_0x1ad13e(0x160)][_0x1ad13e(0x176)][_0x1ad13e(0x16a)]===0x1;}async[_0x1decc9(0x161)](_0x581d10){const _0x190b29=_0x1decc9,{unitId:_0x18c5e4}=_0x581d10,_0x95faa4=_0x581d10['threadId'],_0x33ea9f={'memberId':this['_userService'][_0x190b29(0x19b)]()[_0x190b29(0x164)],'unitId':_0x18c5e4,'threadId':_0x95faa4,'solved':_0x581d10['resolved']?I[_0x190b29(0x1b5)]:I[_0x190b29(0x189)]},_0x50ac0f=await this[_0x190b29(0x1aa)]['post'](_0x190b29(0x197)+_0x18c5e4+'/solved',{'body':_0x33ea9f});return!_0x50ac0f[_0x190b29(0x160)]['error']||_0x50ac0f[_0x190b29(0x160)][_0x190b29(0x176)][_0x190b29(0x16a)]===0x1;}async['deleteComment'](_0x189228,_0x4c1684,_0x53d84e,_0x5a4adf){const _0x4a3128=_0x1decc9,_0x4db3d9={'memberId':(await this['_sessionService'][_0x4a3128(0x1d0)](_0x189228))[_0x4a3128(0x1bb)](),'threadId':_0x53d84e,'replyId':_0x5a4adf,'unitId':_0x189228},_0x207588=await this[_0x4a3128(0x1aa)][_0x4a3128(0x1b3)](_0x4a3128(0x197)+_0x189228+_0x4a3128(0x182),{'body':_0x4db3d9});return!_0x207588[_0x4a3128(0x160)]['error']||_0x207588['body'][_0x4a3128(0x176)][_0x4a3128(0x16a)]===0x1;}async[_0x1decc9(0x169)](_0x392246,_0x20bad9,_0x4261dd){const _0x3dc19d=_0x1decc9,_0x46c8f6={'unitId':_0x392246,'threadId':_0x4261dd},_0x37fb6a=await this[_0x3dc19d(0x1aa)][_0x3dc19d(0x1b3)](_0x3dc19d(0x197)+_0x392246+_0x3dc19d(0x1a8),{'body':_0x46c8f6}),_0x1eb37e=_0x4261dd['map'](_0x43d4d3=>G(_0x37fb6a[_0x3dc19d(0x160)]['comments'][_0x43d4d3],_0x392246,_0x20bad9))[_0x3dc19d(0x172)](Boolean);return Object[_0x3dc19d(0x1ac)](_0x37fb6a[_0x3dc19d(0x160)][_0x3dc19d(0x196)])[_0x3dc19d(0x175)](_0x72c12c=>{const _0x312e0d=_0x3dc19d;this[_0x312e0d(0x193)][_0x312e0d(0x1c9)](_0x72c12c);}),_0x1eb37e;}[_0x1decc9(0x1b6)](_0xf73a52){return{'id':_0xf73a52['id'],'threadId':_0xf73a52['threadId'],'ref':_0xf73a52['ref']};}};p=x([C(0x0,c[_0x1decc9(0x18d)](P[_0x1decc9(0x1a3)])),C(0x1,c[_0x1decc9(0x18d)](c['UserManagerService'])),C(0x2,c[_0x1decc9(0x18d)](b[_0x1decc9(0x1c5)]))],p);var H=Object[_0x1decc9(0x1a5)],J=(_0x2f793a,_0x174c75,_0x432031,_0x30ed3c)=>{const _0x35cf91=_0x1decc9;for(var _0x20b262=_0x30ed3c>0x1?void 0x0:_0x30ed3c?H(_0x174c75,_0x432031):_0x174c75,_0x1be4f4=_0x2f793a[_0x35cf91(0x1c0)]-0x1,_0x3d42d3;_0x1be4f4>=0x0;_0x1be4f4--)(_0x3d42d3=_0x2f793a[_0x1be4f4])&&(_0x20b262=_0x3d42d3(_0x20b262)||_0x20b262);return _0x20b262;},y=(_0x393315,_0x1d09a3)=>(_0x49642d,_0x5121d0)=>_0x1d09a3(_0x49642d,_0x5121d0,_0x393315);let g=class extends c[_0x1decc9(0x1c3)]{constructor(_0x3e7e1f,_0x40beff){const _0x3f0ea9=_0x1decc9;super(),this['_threadCommentDataSourceService']=_0x3e7e1f,this[_0x3f0ea9(0x1be)]=_0x40beff,this['_initDataSource']();}[_0x1decc9(0x15d)](){const _0x19c253=_0x1decc9;this[_0x19c253(0x1c7)][_0x19c253(0x1b8)]=this['_threadCommentDataSource'],this[_0x19c253(0x1c7)][_0x19c253(0x17f)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](p))],g);var F=Object[_0x1decc9(0x16e)],L=Object[_0x1decc9(0x1a5)],Z=(_0x2fd275,_0x188937,_0x308a36)=>_0x188937 in _0x2fd275?F(_0x2fd275,_0x188937,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x308a36}):_0x2fd275[_0x188937]=_0x308a36,W=(_0x2f9529,_0x3f62d6,_0x54595e,_0x297784)=>{const _0x405c57=_0x1decc9;for(var _0x224c63=_0x297784>0x1?void 0x0:_0x297784?L(_0x3f62d6,_0x54595e):_0x3f62d6,_0x3d1376=_0x2f9529[_0x405c57(0x1c0)]-0x1,_0x5ed265;_0x3d1376>=0x0;_0x3d1376--)(_0x5ed265=_0x2f9529[_0x3d1376])&&(_0x224c63=_0x5ed265(_0x224c63)||_0x224c63);return _0x224c63;},O=(_0x4fc87c,_0x4cb66f)=>(_0x51e7bb,_0x1b94d5)=>_0x4cb66f(_0x51e7bb,_0x1b94d5,_0x4fc87c),N=(_0x591cc4,_0x23ea1e,_0x678568)=>Z(_0x591cc4,typeof _0x23ea1e!='symbol'?_0x23ea1e+'':_0x23ea1e,_0x678568);function _0x4465(_0x1320a0,_0x428e22){const _0x316b48=_0x316b();return _0x4465=function(_0x4465de,_0x25a734){_0x4465de=_0x4465de-0x15a;let _0x51235e=_0x316b48[_0x4465de];return _0x51235e;},_0x4465(_0x1320a0,_0x428e22);}exports[_0x1decc9(0x166)]=class extends c[_0x1decc9(0x1ae)]{constructor(_0x167d55=D,_0x31c17d,_0x3c8414){const _0x409d65=_0x1decc9;super(),this[_0x409d65(0x15b)]=_0x167d55,this['_injector']=_0x31c17d,this[_0x409d65(0x19a)]=_0x3c8414;const {..._0x4c1ac0}=c[_0x409d65(0x183)]({},D,this['_config']);this[_0x409d65(0x19a)]['setConfig'](q,_0x4c1ac0);}[_0x1decc9(0x16c)](){const _0x598739=_0x1decc9;[[p],[g],[_]][_0x598739(0x175)](_0x270159=>{const _0x30fa0b=_0x598739;this[_0x30fa0b(0x178)][_0x30fa0b(0x1a2)](_0x270159);});}[_0x1decc9(0x179)](){const _0x2c42c8=_0x1decc9;this[_0x2c42c8(0x178)][_0x2c42c8(0x1b9)](g),this[_0x2c42c8(0x178)][_0x2c42c8(0x1b9)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x1decc9(0x167),U),N(exports[_0x1decc9(0x166)],'type',c[_0x1decc9(0x1b7)][_0x1decc9(0x190)]),exports[_0x1decc9(0x166)]=W([c[_0x1decc9(0x1d3)](w['UniverThreadCommentUIPlugin'],b[_0x1decc9(0x1a4)],T[_0x1decc9(0x1bc)]),O(0x1,c[_0x1decc9(0x18d)](c[_0x1decc9(0x15a)])),O(0x2,c[_0x1decc9(0x19e)])],exports[_0x1decc9(0x166)]);
|
|
1
|
+
'use strict';const _0x1375d2=_0x4f66;(function(_0x134f5a,_0x51ab93){const _0x2b9287=_0x4f66,_0x1e8629=_0x134f5a();while(!![]){try{const _0x139af4=parseInt(_0x2b9287(0x13f))/0x1*(parseInt(_0x2b9287(0x113))/0x2)+parseInt(_0x2b9287(0x12e))/0x3*(parseInt(_0x2b9287(0x137))/0x4)+-parseInt(_0x2b9287(0xce))/0x5*(parseInt(_0x2b9287(0x13c))/0x6)+-parseInt(_0x2b9287(0x13b))/0x7+-parseInt(_0x2b9287(0x128))/0x8*(parseInt(_0x2b9287(0xcc))/0x9)+parseInt(_0x2b9287(0x105))/0xa*(-parseInt(_0x2b9287(0x108))/0xb)+-parseInt(_0x2b9287(0x102))/0xc*(-parseInt(_0x2b9287(0xe7))/0xd);if(_0x139af4===_0x51ab93)break;else _0x1e8629['push'](_0x1e8629['shift']());}catch(_0x2c705e){_0x1e8629['push'](_0x1e8629['shift']());}}}(_0xb92c,0xbbb39));Object[_0x1375d2(0xc8)](exports,Symbol[_0x1375d2(0x101)],{'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=(_0x36eda1=>(_0x36eda1[_0x36eda1[_0x1375d2(0x10c)]=0x0]='OpenOrReOpen',_0x36eda1[_0x36eda1[_0x1375d2(0x130)]=0x1]=_0x1375d2(0x130),_0x36eda1[_0x36eda1[_0x1375d2(0x138)]=-0x1]=_0x1375d2(0x138),_0x36eda1))(I||{}),v=(_0x2f1566=>(_0x2f1566[_0x2f1566[_0x1375d2(0xf5)]=0x0]=_0x1375d2(0xf5),_0x2f1566[_0x2f1566[_0x1375d2(0xea)]=0x1]=_0x1375d2(0xea),_0x2f1566[_0x2f1566[_0x1375d2(0x111)]=0x2]=_0x1375d2(0x111),_0x2f1566[_0x2f1566[_0x1375d2(0x119)]=0x3]=_0x1375d2(0x119),_0x2f1566[_0x2f1566[_0x1375d2(0xd5)]=0x4]=_0x1375d2(0xd5),_0x2f1566[_0x2f1566[_0x1375d2(0xcb)]=0x5]=_0x1375d2(0xcb),_0x2f1566[_0x2f1566[_0x1375d2(0x138)]=-0x1]=_0x1375d2(0x138),_0x2f1566))(v||{});function _0xb92c(){const _0x3b0ec2=['length','size','code','symbol','_configService','defineProperty','forEach','delete','Solve','126KSRuEx','ThreadCommentModel','55oBlRlv','solved','threadId','/reply','_threadCommentDataSourceService','slice','_sessionService','Delete','DependentOn','_threadCommentDataSource','/list','addUser','replyId','Inject','unitId','commentUpdate$','reply','CommentService','setConfig','stringify','IConfigService','getMemberID','_config','replies','/solved','52AmDxCp','_commentService','deleteComment','Add','saveCommentToSnapshot','disposeWithMe','resolved','CustomRangeType','user','updateComment','users','comment','_init','pluginName','Unknown','createTimestamp','add','/edit','UniverThreadCommentUIPlugin','getUser','ref','userId','YYYY/MM/DD\x20HH:mm','content','/universer-api/comment/unit/','map','toStringTag','8044200UKdItD','_injector','parse','370cMQKgq','get','_initDataSource','455653sUtcrZ','format','parentId','UniverCollaborationClientPlugin','OpenOrReOpen','syncUpdateMutationToColla','/delete','pipe','error','Reply','COMMENT','2KBSbKm','dataSource','requireSession','Injector','find','payload','Edit','/universer-api/user/list','userID','getUnit','UniverLicensePlugin','UNIVER_UNKNOWN','type','rangeId','dayjs','_initUserSync','UniverThreadCommentDataSourcePlugin','IThreadCommentDataSourceService','comments','values','root','369112okIBfb','resolveComment','filter','customRanges','getCurrentUser','UserManagerService','1952298MXOnTr','getOwnPropertyDescriptor','Solved','_threadCommentModel','_userService','Disposable','addComment','post','UniverInstanceType','8aixJNj','UNRECOGNIZED','_httpService','subscribe','10579674XIOsZY','116214pBQNfA','HTTPService','body','688931kNPnFo'];_0xb92c=function(){return _0x3b0ec2;};return _0xb92c();}const f=_0xc89e60=>c[_0x1375d2(0x121)](new Date(+_0xc89e60))[_0x1375d2(0x109)](_0x1375d2(0xfd)),R=async(_0x5c484e,_0x1a6454)=>{const _0x4d75bf=_0x1375d2,_0x5295be=_0x5c484e[_0x4d75bf(0x106)](c[_0x4d75bf(0x12d)]),_0x45d08f=_0x5c484e[_0x4d75bf(0x106)](P['HTTPService']);_0x1a6454[_0x4d75bf(0xc9)](_0x590ef2=>{const _0x3d75c1=_0x4d75bf;_0x5295be[_0x3d75c1(0xfa)](_0x590ef2)&&_0x1a6454[_0x3d75c1(0xca)](_0x590ef2);}),_0x1a6454[_0x4d75bf(0x141)]&&(await _0x45d08f[_0x4d75bf(0x106)](_0x4d75bf(0x11a),{'params':{'userIDs':[..._0x1a6454]}}))[_0x4d75bf(0x13e)][_0x4d75bf(0xf1)][_0x4d75bf(0xc9)](_0x43a323=>{const _0x13c29d=_0x4d75bf;_0x43a323&&_0x5295be[_0x13c29d(0xd9)](_0x43a323);});};var $=Object[_0x1375d2(0x12f)],E=(_0x5b90c2,_0x1e39ba,_0x457e35,_0x355113)=>{for(var _0x550d9c=_0x355113>0x1?void 0x0:_0x355113?$(_0x1e39ba,_0x457e35):_0x1e39ba,_0x45338f=_0x5b90c2['length']-0x1,_0x4ff12a;_0x45338f>=0x0;_0x45338f--)(_0x4ff12a=_0x5b90c2[_0x45338f])&&(_0x550d9c=_0x4ff12a(_0x550d9c)||_0x550d9c);return _0x550d9c;},S=(_0x482890,_0x401ed1)=>(_0x39c925,_0x26e52b)=>_0x401ed1(_0x39c925,_0x26e52b,_0x482890);let _=class extends c[_0x1375d2(0x133)]{constructor(_0x2398e7,_0x18ce1f,_0x275578,_0x558435){const _0x515909=_0x1375d2;super(),this['_commentService']=_0x2398e7,this[_0x515909(0x131)]=_0x18ce1f,this['_userService']=_0x275578,this[_0x515909(0x103)]=_0x558435,this['_init'](),this['_initUserSync']();}[_0x1375d2(0x122)](){const _0x118b5f=_0x1375d2;this[_0x118b5f(0xec)](this[_0x118b5f(0x131)][_0x118b5f(0xdd)][_0x118b5f(0x10f)](j['bufferTime'](0x10))[_0x118b5f(0x13a)](_0x12c792=>{const _0x486ad5=_0x118b5f,_0x324669=new Set();_0x12c792[_0x486ad5(0xc9)](_0x585889=>{const _0x4657ef=_0x486ad5;switch(_0x585889['type']){case _0x4657ef(0xf7):{const _0x213c6e=_0x585889[_0x4657ef(0x118)]['personId'];_0x324669['add'](_0x213c6e);break;}}}),R(this[_0x486ad5(0x103)],_0x324669);}));}[_0x1375d2(0xf3)](){const _0x15a369=_0x1375d2;this[_0x15a369(0xec)](this[_0x15a369(0xe8)][_0x15a369(0xdd)][_0x15a369(0x13a)](async _0x2ff993=>{const _0x48b338=_0x15a369;var _0x5d3af6,_0x243ecc,_0xdeb3e9,_0x5de7f7;const _0x17a0a6=(_0x5d3af6=this[_0x48b338(0x131)][_0x48b338(0x11c)](_0x2ff993[_0x48b338(0xdc)])[_0x48b338(0x117)](_0x567a2a=>_0x567a2a['threadId']===_0x2ff993[_0x48b338(0xd0)]))==null?void 0x0:_0x5d3af6[_0x48b338(0x127)];if(!_0x17a0a6)return;const {unitId:_0x14972f,subUnitId:_0x641f25}=_0x17a0a6;switch(_0x2ff993[_0x48b338(0xef)]&&this['_userService']['addUser'](_0x2ff993[_0x48b338(0xef)]),_0x2ff993[_0x48b338(0x11f)]){case v[_0x48b338(0xea)]:break;case v[_0x48b338(0x111)]:{this[_0x48b338(0x131)][_0x48b338(0x134)](_0x14972f,_0x641f25,{'unitId':_0x14972f,'subUnitId':_0x641f25,'ref':'','id':_0x2ff993[_0x48b338(0xda)],'dT':f(+_0x2ff993[_0x48b338(0xf6)]),'threadId':_0x2ff993[_0x48b338(0xd0)],'personId':(_0xdeb3e9=(_0x243ecc=_0x2ff993[_0x48b338(0xef)])==null?void 0x0:_0x243ecc[_0x48b338(0x11b)])!=null?_0xdeb3e9:_0x2ff993['userId'],'text':JSON[_0x48b338(0x104)](_0x2ff993[_0x48b338(0xfe)]),'parentId':_0x17a0a6['id']});break;}case v[_0x48b338(0xd5)]:{const _0x575984=this['_threadCommentModel']['getComment'](_0x14972f,_0x641f25,_0x2ff993[_0x48b338(0xda)]);_0x575984&&_0x575984[_0x48b338(0x10a)]&&this['_threadCommentModel'][_0x48b338(0xe9)](_0x14972f,_0x641f25,_0x2ff993['replyId']);break;}case v[_0x48b338(0x119)]:{this['_threadCommentModel'][_0x48b338(0xf0)](_0x14972f,_0x641f25,{'commentId':_0x2ff993[_0x48b338(0xda)],'text':JSON[_0x48b338(0x104)](_0x2ff993[_0x48b338(0xfe)])});break;}case v[_0x48b338(0xcb)]:{const _0x25bb28=(_0x5de7f7=this[_0x48b338(0x131)][_0x48b338(0x11c)](_0x2ff993['unitId'])['find'](_0x391cff=>_0x391cff['threadId']===_0x2ff993[_0x48b338(0xd0)]))==null?void 0x0:_0x5de7f7[_0x48b338(0x127)];_0x25bb28&&this[_0x48b338(0x131)][_0x48b338(0x129)](_0x14972f,_0x641f25,_0x25bb28['id'],_0x2ff993[_0x48b338(0xcf)]===I[_0x48b338(0x130)]);break;}}}));}};_=E([S(0x0,c[_0x1375d2(0xdb)](b[_0x1375d2(0xdf)])),S(0x1,c[_0x1375d2(0xdb)](M[_0x1375d2(0xcd)])),S(0x2,c[_0x1375d2(0xdb)](c[_0x1375d2(0x12d)])),S(0x3,c[_0x1375d2(0xdb)](c['Injector']))],_);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x2954b4,_0x2265b2,_0x185b66,_0x3a6fd1)=>{for(var _0x389659=_0x3a6fd1>0x1?void 0x0:_0x3a6fd1?A(_0x2265b2,_0x185b66):_0x2265b2,_0x41ce57=_0x2954b4['length']-0x1,_0x42bc6f;_0x41ce57>=0x0;_0x41ce57--)(_0x42bc6f=_0x2954b4[_0x41ce57])&&(_0x389659=_0x42bc6f(_0x389659)||_0x389659);return _0x389659;},C=(_0x14d36e,_0x28b1d7)=>(_0x1cee25,_0x354516)=>_0x28b1d7(_0x1cee25,_0x354516,_0x14d36e);function Y(_0x35a23e,_0xe25cfb){const _0x3aea6c=_0x1375d2,_0x3d8e6d=_0x35a23e[_0x3aea6c(0xe5)][0x0];return{..._0xe25cfb,'id':_0x3d8e6d[_0x3aea6c(0xda)],'resolved':_0x35a23e[_0x3aea6c(0xcf)]===0x1,'dT':f(_0x3d8e6d[_0x3aea6c(0xf6)]),'personId':_0x3d8e6d[_0x3aea6c(0xfc)],'threadId':_0x3d8e6d['threadId']};}function G(_0x5afc50,_0x110096,_0x250c23){const _0x55ad0a=_0x1375d2;var _0x35b38a,_0x45d879;if(((_0x45d879=(_0x35b38a=_0x5afc50==null?void 0x0:_0x5afc50['replies'])==null?void 0x0:_0x35b38a[_0x55ad0a(0x140)])!=null?_0x45d879:0x0)>0x0){const _0x206d9c=(_0x4ffc6e,_0x4eb75b)=>({'id':_0x4ffc6e[_0x55ad0a(0xda)],'threadId':_0x4ffc6e[_0x55ad0a(0xd0)],'dT':f(_0x4ffc6e[_0x55ad0a(0xf6)]),'personId':_0x4ffc6e[_0x55ad0a(0xfc)],'resolved':_0x5afc50[_0x55ad0a(0xcf)]===I['Solved'],'unitId':_0x110096,'subUnitId':_0x250c23,'text':JSON[_0x55ad0a(0x104)](_0x4ffc6e[_0x55ad0a(0xfe)]),'parentId':_0x4eb75b}),_0x1d2fe7=_0x206d9c(_0x5afc50[_0x55ad0a(0xe5)][0x0]);return{..._0x1d2fe7,'children':_0x5afc50[_0x55ad0a(0xe5)][_0x55ad0a(0xd3)](0x1)['map'](_0x336cfd=>_0x206d9c(_0x336cfd,_0x1d2fe7['id']))};}return null;}let p=class{constructor(_0x44fda8,_0xcf9d9b,_0x37b97d){const _0x35a5eb=_0x1375d2;this[_0x35a5eb(0x139)]=_0x44fda8,this[_0x35a5eb(0x132)]=_0xcf9d9b,this['_sessionService']=_0x37b97d;}async[_0x1375d2(0x134)](_0x2db82f){const _0x2f0799=_0x1375d2;var _0x48f7f3,_0x36ef2f;const {parentId:_0x5a940a,unitId:_0x1fa3fc,text:_0x301435,threadId:_0x30ba64}=_0x2db82f,_0x1c4810=(_0x36ef2f=(_0x48f7f3=_0x301435['customRanges'])==null?void 0x0:_0x48f7f3['filter'](_0x4de6b7=>_0x4de6b7['rangeType']===c[_0x2f0799(0xee)][_0x2f0799(0x112)])['map'](_0x3c1abd=>_0x3c1abd[_0x2f0799(0x120)]))!=null?_0x36ef2f:[],_0x1a0f1a=JSON[_0x2f0799(0xe1)](_0x301435),_0x87e172=(await this[_0x2f0799(0xd4)][_0x2f0799(0x115)](_0x1fa3fc))[_0x2f0799(0xe3)]();if(_0x5a940a){const _0x5eaaf2={'memberId':_0x87e172,'unitId':_0x1fa3fc,'content':_0x1a0f1a,'mention':_0x1c4810,'threadId':_0x30ba64},_0x5b2e5d=(await this[_0x2f0799(0x139)][_0x2f0799(0x135)](_0x2f0799(0xff)+_0x1fa3fc+_0x2f0799(0xd1),{'body':_0x5eaaf2}))[_0x2f0799(0x13e)][_0x2f0799(0xde)];return{..._0x2db82f,'id':_0x5b2e5d[_0x2f0799(0xda)],'dT':c[_0x2f0799(0x121)](+_0x5b2e5d[_0x2f0799(0xf6)])[_0x2f0799(0x109)](_0x2f0799(0xfd)),'personId':_0x5b2e5d['userId']};}else{const _0x24a5aa={'memberId':_0x87e172,'unitId':_0x1fa3fc,'content':_0x1a0f1a,'mention':_0x1c4810},_0x54396d=await this['_httpService'][_0x2f0799(0x135)](_0x2f0799(0xff)+_0x1fa3fc+'/add',{'body':_0x24a5aa});return Y(_0x54396d[_0x2f0799(0x13e)][_0x2f0799(0xf2)],_0x2db82f);}}async[_0x1375d2(0xf0)](_0xdb2370){const _0x243624=_0x1375d2;var _0x15f240,_0x263731;const {text:_0x5a5411,unitId:_0x610605}=_0xdb2370,_0x277683=(_0x263731=(_0x15f240=_0x5a5411[_0x243624(0x12b)])==null?void 0x0:_0x15f240[_0x243624(0x12a)](_0x3956f5=>_0x3956f5['rangeType']===c[_0x243624(0xee)][_0x243624(0x112)])[_0x243624(0x100)](_0x516467=>_0x516467[_0x243624(0x120)]))!=null?_0x263731:[],_0x2687e5=JSON['stringify'](_0x5a5411),_0x4c8c21=_0xdb2370[_0x243624(0xd0)],_0x15fe33=_0xdb2370['id'],_0x4e5a31={'memberId':(await this[_0x243624(0xd4)]['requireSession'](_0x610605))['getMemberID'](),'unitId':_0x610605,'threadId':_0x4c8c21,'mention':_0x277683,'content':_0x2687e5,'replyId':_0x15fe33},_0x44203b=await this['_httpService'][_0x243624(0x135)](_0x243624(0xff)+_0x610605+_0x243624(0xf8),{'body':_0x4e5a31});return!_0x44203b['body']['error']||_0x44203b[_0x243624(0x13e)][_0x243624(0x110)][_0x243624(0x142)]===0x1;}async['resolveComment'](_0x4187d9){const _0xa1806d=_0x1375d2,{unitId:_0x142965}=_0x4187d9,_0x50cc58=_0x4187d9[_0xa1806d(0xd0)],_0x105336={'memberId':this['_userService'][_0xa1806d(0x12c)]()[_0xa1806d(0x11b)],'unitId':_0x142965,'threadId':_0x50cc58,'solved':_0x4187d9[_0xa1806d(0xed)]?I[_0xa1806d(0x130)]:I[_0xa1806d(0x10c)]},_0x3bafe0=await this[_0xa1806d(0x139)][_0xa1806d(0x135)](_0xa1806d(0xff)+_0x142965+_0xa1806d(0xe6),{'body':_0x105336});return!_0x3bafe0[_0xa1806d(0x13e)][_0xa1806d(0x110)]||_0x3bafe0[_0xa1806d(0x13e)][_0xa1806d(0x110)][_0xa1806d(0x142)]===0x1;}async['deleteComment'](_0x45e657,_0x3eeb01,_0x2df8e7,_0x3cf780){const _0x2a38c2=_0x1375d2,_0x430f31={'memberId':(await this[_0x2a38c2(0xd4)][_0x2a38c2(0x115)](_0x45e657))['getMemberID'](),'threadId':_0x2df8e7,'replyId':_0x3cf780,'unitId':_0x45e657},_0xf47d39=await this[_0x2a38c2(0x139)][_0x2a38c2(0x135)](_0x2a38c2(0xff)+_0x45e657+_0x2a38c2(0x10e),{'body':_0x430f31});return!_0xf47d39[_0x2a38c2(0x13e)]['error']||_0xf47d39[_0x2a38c2(0x13e)][_0x2a38c2(0x110)]['code']===0x1;}async['listComments'](_0xace606,_0xb088dd,_0x962b10){const _0x157735=_0x1375d2,_0x1d024a={'unitId':_0xace606,'threadId':_0x962b10},_0x15f611=await this[_0x157735(0x139)][_0x157735(0x135)](_0x157735(0xff)+_0xace606+_0x157735(0xd8),{'body':_0x1d024a}),_0x5116f3=_0x962b10[_0x157735(0x100)](_0x466191=>G(_0x15f611[_0x157735(0x13e)][_0x157735(0x125)][_0x466191],_0xace606,_0xb088dd))[_0x157735(0x12a)](Boolean);return Object[_0x157735(0x126)](_0x15f611['body'][_0x157735(0xf1)])['forEach'](_0xcdeb9f=>{const _0x38353a=_0x157735;this[_0x38353a(0x132)][_0x38353a(0xd9)](_0xcdeb9f);}),_0x5116f3;}[_0x1375d2(0xeb)](_0x2e1585){const _0x38eda0=_0x1375d2;return{'id':_0x2e1585['id'],'threadId':_0x2e1585[_0x38eda0(0xd0)],'ref':_0x2e1585[_0x38eda0(0xfb)]};}};p=x([C(0x0,c[_0x1375d2(0xdb)](P[_0x1375d2(0x13d)])),C(0x1,c[_0x1375d2(0xdb)](c[_0x1375d2(0x12d)])),C(0x2,c[_0x1375d2(0xdb)](b['CollaborationSessionService']))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x27fc8c,_0x4f849b,_0x5eb73f,_0x2c91de)=>{const _0x1bb6ed=_0x1375d2;for(var _0x289e55=_0x2c91de>0x1?void 0x0:_0x2c91de?H(_0x4f849b,_0x5eb73f):_0x4f849b,_0x5cdb3d=_0x27fc8c[_0x1bb6ed(0x140)]-0x1,_0x5497bc;_0x5cdb3d>=0x0;_0x5cdb3d--)(_0x5497bc=_0x27fc8c[_0x5cdb3d])&&(_0x289e55=_0x5497bc(_0x289e55)||_0x289e55);return _0x289e55;},y=(_0x3b0ebb,_0x3620a3)=>(_0x4d99b0,_0x925215)=>_0x3620a3(_0x4d99b0,_0x925215,_0x3b0ebb);let g=class extends c['Disposable']{constructor(_0x1c0b65,_0x270101){const _0x56db43=_0x1375d2;super(),this['_threadCommentDataSourceService']=_0x1c0b65,this[_0x56db43(0xd7)]=_0x270101,this['_initDataSource']();}[_0x1375d2(0x107)](){const _0x261f62=_0x1375d2;this[_0x261f62(0xd2)][_0x261f62(0x114)]=this[_0x261f62(0xd7)],this['_threadCommentDataSourceService'][_0x261f62(0x10d)]=!0x1;}};function _0x4f66(_0x1a794e,_0x163598){const _0xb92cb3=_0xb92c();return _0x4f66=function(_0x4f6620,_0x409fad){_0x4f6620=_0x4f6620-0xc7;let _0x512f43=_0xb92cb3[_0x4f6620];return _0x512f43;},_0x4f66(_0x1a794e,_0x163598);}g=J([y(0x0,M[_0x1375d2(0x124)]),y(0x1,c[_0x1375d2(0xdb)](p))],g);var F=Object[_0x1375d2(0xc8)],L=Object[_0x1375d2(0x12f)],Z=(_0x589ab7,_0x454bf0,_0x1133d3)=>_0x454bf0 in _0x589ab7?F(_0x589ab7,_0x454bf0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1133d3}):_0x589ab7[_0x454bf0]=_0x1133d3,W=(_0x2cd9a1,_0xfb63fa,_0x26c8d7,_0x457ba9)=>{const _0x430003=_0x1375d2;for(var _0x581c17=_0x457ba9>0x1?void 0x0:_0x457ba9?L(_0xfb63fa,_0x26c8d7):_0xfb63fa,_0x3e4499=_0x2cd9a1[_0x430003(0x140)]-0x1,_0x5c0371;_0x3e4499>=0x0;_0x3e4499--)(_0x5c0371=_0x2cd9a1[_0x3e4499])&&(_0x581c17=_0x5c0371(_0x581c17)||_0x581c17);return _0x581c17;},O=(_0x282e56,_0x1dcba9)=>(_0x581b03,_0x5ec76a)=>_0x1dcba9(_0x581b03,_0x5ec76a,_0x282e56),N=(_0x3f69d1,_0x5b4ff4,_0x1cf845)=>Z(_0x3f69d1,typeof _0x5b4ff4!=_0x1375d2(0x143)?_0x5b4ff4+'':_0x5b4ff4,_0x1cf845);exports[_0x1375d2(0x123)]=class extends c['Plugin']{constructor(_0x3fff28=D,_0x43a471,_0x2094ed){const _0x8a2572=_0x1375d2;super(),this['_config']=_0x3fff28,this['_injector']=_0x43a471,this[_0x8a2572(0xc7)]=_0x2094ed;const {..._0xdafcfe}=c['merge']({},D,this[_0x8a2572(0xe4)]);this[_0x8a2572(0xc7)][_0x8a2572(0xe0)](q,_0xdafcfe);}['onStarting'](){const _0x1c8090=_0x1375d2;[[p],[g],[_]][_0x1c8090(0xc9)](_0x50f073=>{const _0x432af3=_0x1c8090;this['_injector'][_0x432af3(0xf7)](_0x50f073);});}['onReady'](){const _0x328d5b=_0x1375d2;this[_0x328d5b(0x103)]['get'](g),this[_0x328d5b(0x103)][_0x328d5b(0x106)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x1375d2(0xf4),U),N(exports[_0x1375d2(0x123)],_0x1375d2(0x11f),c[_0x1375d2(0x136)][_0x1375d2(0x11e)]),exports[_0x1375d2(0x123)]=W([c[_0x1375d2(0xd6)](w[_0x1375d2(0xf9)],b[_0x1375d2(0x10b)],T[_0x1375d2(0x11d)]),O(0x1,c[_0x1375d2(0xdb)](c[_0x1375d2(0x116)])),O(0x2,c[_0x1375d2(0xe2)])],exports[_0x1375d2(0x123)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2df57e=_0x5e0c;(function(_0x216986,_0x317750){const _0x86c761=_0x5e0c,_0x5b3d7a=_0x216986();while(!![]){try{const _0x408e46=parseInt(_0x86c761(0x12f))/0x1*(parseInt(_0x86c761(0x13d))/0x2)+parseInt(_0x86c761(0x11b))/0x3*(parseInt(_0x86c761(0x110))/0x4)+parseInt(_0x86c761(0xf9))/0x5*(parseInt(_0x86c761(0x143))/0x6)+parseInt(_0x86c761(0x10e))/0x7+parseInt(_0x86c761(0x125))/0x8*(parseInt(_0x86c761(0x12d))/0x9)+parseInt(_0x86c761(0x121))/0xa+-parseInt(_0x86c761(0x116))/0xb;if(_0x408e46===_0x317750)break;else _0x5b3d7a['push'](_0x5b3d7a['shift']());}catch(_0x3c1b88){_0x5b3d7a['push'](_0x5b3d7a['shift']());}}}(_0x129b,0x21b1f));import{CommentService as _0x2ca153,CollaborationSessionService as _0x50d4fb,UniverCollaborationClientPlugin as _0x9f917b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d1065}from'@univerjs-pro/license';import{dayjs as _0x479e24,UserManagerService as _0x3391ff,Inject as _0x18776e,Injector as _0x450dbc,Disposable as _0x6ff48f,CustomRangeType as _0x525ecc,UniverInstanceType as _0xefb13,DependentOn as _0x53ac22,IConfigService as _0x5d7bed,Plugin as _0x415431,merge as _0x3ae601}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5c9762}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x22a644,IThreadCommentDataSourceService as _0x191df3}from'@univerjs/thread-comment';import{bufferTime as _0x6ecdfc}from'rxjs';import{HTTPService as _0x2c40b3}from'@univerjs/network';const W=_0x2df57e(0x129);var I=(_0x418b2a=>(_0x418b2a[_0x418b2a[_0x2df57e(0x103)]=0x0]=_0x2df57e(0x103),_0x418b2a[_0x418b2a['Solved']=0x1]=_0x2df57e(0x10f),_0x418b2a[_0x418b2a[_0x2df57e(0xf3)]=-0x1]=_0x2df57e(0xf3),_0x418b2a))(I||{}),v=(_0x36a6d2=>(_0x36a6d2[_0x36a6d2[_0x2df57e(0x144)]=0x0]='Unknown',_0x36a6d2[_0x36a6d2[_0x2df57e(0x10d)]=0x1]='Add',_0x36a6d2[_0x36a6d2['Reply']=0x2]='Reply',_0x36a6d2[_0x36a6d2['Edit']=0x3]=_0x2df57e(0x14c),_0x36a6d2[_0x36a6d2[_0x2df57e(0x149)]=0x4]=_0x2df57e(0x149),_0x36a6d2[_0x36a6d2[_0x2df57e(0xef)]=0x5]='Solve',_0x36a6d2[_0x36a6d2[_0x2df57e(0xf3)]=-0x1]=_0x2df57e(0xf3),_0x36a6d2))(v||{});const y=_0x35b876=>_0x479e24(new Date(+_0x35b876))[_0x2df57e(0x134)](_0x2df57e(0x14f)),B=async(_0x239a71,_0x514647)=>{const _0x22100c=_0x2df57e,_0x531666=_0x239a71[_0x22100c(0x133)](_0x3391ff),_0x3ed7fc=_0x239a71[_0x22100c(0x133)](_0x2c40b3);_0x514647[_0x22100c(0xfa)](_0x3357f4=>{const _0x9479f4=_0x22100c;_0x531666[_0x9479f4(0x104)](_0x3357f4)&&_0x514647[_0x9479f4(0x119)](_0x3357f4);}),_0x514647['size']&&(await _0x3ed7fc[_0x22100c(0x133)](_0x22100c(0x14e),{'params':{'userIDs':[..._0x514647]}}))[_0x22100c(0x113)][_0x22100c(0xec)][_0x22100c(0xfa)](_0x14efae=>{_0x14efae&&_0x531666['addUser'](_0x14efae);});};var K=Object[_0x2df57e(0x13b)],V=(_0xa17a6a,_0x4a3b78,_0x262d70,_0x2c7f2e)=>{const _0xdb9475=_0x2df57e;for(var _0x48d145=_0x2c7f2e>0x1?void 0x0:_0x2c7f2e?K(_0x4a3b78,_0x262d70):_0x4a3b78,_0x4ce027=_0xa17a6a[_0xdb9475(0x101)]-0x1,_0x365d8b;_0x4ce027>=0x0;_0x4ce027--)(_0x365d8b=_0xa17a6a[_0x4ce027])&&(_0x48d145=_0x365d8b(_0x48d145)||_0x48d145);return _0x48d145;},p=(_0x4b20ca,_0x3ad02f)=>(_0x28e79d,_0x57c547)=>_0x3ad02f(_0x28e79d,_0x57c547,_0x4b20ca);let _=class extends _0x6ff48f{constructor(_0x416dd4,_0x5af778,_0x529fca,_0x9bfbf3){const _0x1ff28c=_0x2df57e;super(),this[_0x1ff28c(0x138)]=_0x416dd4,this[_0x1ff28c(0x12b)]=_0x5af778,this['_userService']=_0x529fca,this[_0x1ff28c(0x122)]=_0x9bfbf3,this[_0x1ff28c(0x124)](),this[_0x1ff28c(0x137)]();}[_0x2df57e(0x137)](){const _0x3109e2=_0x2df57e;this[_0x3109e2(0x127)](this[_0x3109e2(0x12b)][_0x3109e2(0x13e)][_0x3109e2(0x106)](_0x6ecdfc(0x10))[_0x3109e2(0x114)](_0x241810=>{const _0x20f028=_0x3109e2,_0x3f12b7=new Set();_0x241810[_0x20f028(0xfa)](_0x386e83=>{const _0x2bf348=_0x20f028;switch(_0x386e83[_0x2bf348(0x109)]){case _0x2bf348(0x111):{const _0xe27159=_0x386e83[_0x2bf348(0xf1)]['personId'];_0x3f12b7[_0x2bf348(0x111)](_0xe27159);break;}}}),B(this[_0x20f028(0x122)],_0x3f12b7);}));}[_0x2df57e(0x124)](){const _0x18276f=_0x2df57e;this[_0x18276f(0x127)](this[_0x18276f(0x138)][_0x18276f(0x13e)]['subscribe'](async _0x1e8776=>{const _0x2fea5e=_0x18276f;var _0x326346,_0x363885,_0x3ca518,_0x4e6fcc;const _0x321a28=(_0x326346=this[_0x2fea5e(0x12b)]['getUnit'](_0x1e8776[_0x2fea5e(0x112)])[_0x2fea5e(0x140)](_0x15dc61=>_0x15dc61['threadId']===_0x1e8776[_0x2fea5e(0x10c)]))==null?void 0x0:_0x326346[_0x2fea5e(0x14b)];if(!_0x321a28)return;const {unitId:_0x330dc6,subUnitId:_0x3d7524}=_0x321a28;switch(_0x1e8776[_0x2fea5e(0xed)]&&this[_0x2fea5e(0x14a)][_0x2fea5e(0xf8)](_0x1e8776[_0x2fea5e(0xed)]),_0x1e8776[_0x2fea5e(0x109)]){case v[_0x2fea5e(0x10d)]:break;case v[_0x2fea5e(0x10b)]:{this['_threadCommentModel']['addComment'](_0x330dc6,_0x3d7524,{'unitId':_0x330dc6,'subUnitId':_0x3d7524,'ref':'','id':_0x1e8776[_0x2fea5e(0x105)],'dT':y(+_0x1e8776[_0x2fea5e(0x108)]),'threadId':_0x1e8776[_0x2fea5e(0x10c)],'personId':(_0x3ca518=(_0x363885=_0x1e8776[_0x2fea5e(0xed)])==null?void 0x0:_0x363885['userID'])!=null?_0x3ca518:_0x1e8776['userId'],'text':JSON[_0x2fea5e(0xfd)](_0x1e8776[_0x2fea5e(0xf6)]),'parentId':_0x321a28['id']});break;}case v[_0x2fea5e(0x149)]:{const _0x5d5d68=this[_0x2fea5e(0x12b)][_0x2fea5e(0xfc)](_0x330dc6,_0x3d7524,_0x1e8776['replyId']);_0x5d5d68&&_0x5d5d68['parentId']&&this[_0x2fea5e(0x12b)]['deleteComment'](_0x330dc6,_0x3d7524,_0x1e8776['replyId']);break;}case v[_0x2fea5e(0x14c)]:{this[_0x2fea5e(0x12b)][_0x2fea5e(0x131)](_0x330dc6,_0x3d7524,{'commentId':_0x1e8776[_0x2fea5e(0x105)],'text':JSON['parse'](_0x1e8776[_0x2fea5e(0xf6)])});break;}case v[_0x2fea5e(0xef)]:{const _0x338167=(_0x4e6fcc=this['_threadCommentModel'][_0x2fea5e(0x148)](_0x1e8776[_0x2fea5e(0x112)])[_0x2fea5e(0x140)](_0x409772=>_0x409772[_0x2fea5e(0x10c)]===_0x1e8776['threadId']))==null?void 0x0:_0x4e6fcc['root'];_0x338167&&this['_threadCommentModel'][_0x2fea5e(0x11c)](_0x330dc6,_0x3d7524,_0x338167['id'],_0x1e8776[_0x2fea5e(0x128)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x18776e(_0x2ca153)),p(0x1,_0x18776e(_0x22a644)),p(0x2,_0x18776e(_0x3391ff)),p(0x3,_0x18776e(_0x450dbc))],_);const z=_0x2df57e(0x132),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x3312b8,_0x7d809d,_0x17117c,_0x10dc37)=>{const _0x56015e=_0x2df57e;for(var _0x7cdee8=_0x10dc37>0x1?void 0x0:_0x10dc37?k(_0x7d809d,_0x17117c):_0x7d809d,_0x4c2d24=_0x3312b8[_0x56015e(0x101)]-0x1,_0x497906;_0x4c2d24>=0x0;_0x4c2d24--)(_0x497906=_0x3312b8[_0x4c2d24])&&(_0x7cdee8=_0x497906(_0x7cdee8)||_0x7cdee8);return _0x7cdee8;},b=(_0x571f7b,_0x138c81)=>(_0x1705ba,_0x42e228)=>_0x138c81(_0x1705ba,_0x42e228,_0x571f7b);function X(_0xf82f4,_0x318d20){const _0x10fa94=_0x2df57e,_0x598b8a=_0xf82f4['replies'][0x0];return{..._0x318d20,'id':_0x598b8a[_0x10fa94(0x105)],'resolved':_0xf82f4[_0x10fa94(0x128)]===0x1,'dT':y(_0x598b8a['createTimestamp']),'personId':_0x598b8a['userId'],'threadId':_0x598b8a[_0x10fa94(0x10c)]};}function ee(_0xd923e2,_0x91e9de,_0x7e4771){const _0x42041b=_0x2df57e;var _0x42a4c9,_0x2ce87e;if(((_0x2ce87e=(_0x42a4c9=_0xd923e2==null?void 0x0:_0xd923e2[_0x42041b(0x135)])==null?void 0x0:_0x42a4c9[_0x42041b(0x101)])!=null?_0x2ce87e:0x0)>0x0){const _0x4aec0e=(_0x54b5e5,_0xc74423)=>({'id':_0x54b5e5[_0x42041b(0x105)],'threadId':_0x54b5e5[_0x42041b(0x10c)],'dT':y(_0x54b5e5[_0x42041b(0x108)]),'personId':_0x54b5e5['userId'],'resolved':_0xd923e2[_0x42041b(0x128)]===I[_0x42041b(0x10f)],'unitId':_0x91e9de,'subUnitId':_0x7e4771,'text':JSON[_0x42041b(0xfd)](_0x54b5e5[_0x42041b(0xf6)]),'parentId':_0xc74423}),_0x469822=_0x4aec0e(_0xd923e2[_0x42041b(0x135)][0x0]);return{..._0x469822,'children':_0xd923e2[_0x42041b(0x135)][_0x42041b(0x146)](0x1)[_0x42041b(0x136)](_0x573178=>_0x4aec0e(_0x573178,_0x469822['id']))};}return null;}let S=class{constructor(_0x3e9ca2,_0x8f12c2,_0x5e8038){const _0x2eedae=_0x2df57e;this[_0x2eedae(0x11a)]=_0x3e9ca2,this['_userService']=_0x8f12c2,this[_0x2eedae(0xfe)]=_0x5e8038;}async[_0x2df57e(0xea)](_0x2adf0e){const _0x528850=_0x2df57e;var _0xc2258d,_0x1c42b8;const {parentId:_0x4edafa,unitId:_0x1c99ce,text:_0x1caca3,threadId:_0x463993}=_0x2adf0e,_0x2e89f1=(_0x1c42b8=(_0xc2258d=_0x1caca3['customRanges'])==null?void 0x0:_0xc2258d[_0x528850(0x147)](_0x394559=>_0x394559[_0x528850(0x13c)]===_0x525ecc[_0x528850(0x11f)])['map'](_0x3e5b56=>_0x3e5b56['rangeId']))!=null?_0x1c42b8:[],_0x2a45f0=JSON[_0x528850(0xff)](_0x1caca3),_0x1419e9=(await this[_0x528850(0xfe)][_0x528850(0x141)](_0x1c99ce))[_0x528850(0x118)]();if(_0x4edafa){const _0x55e3d3={'memberId':_0x1419e9,'unitId':_0x1c99ce,'content':_0x2a45f0,'mention':_0x2e89f1,'threadId':_0x463993},_0x5ac32a=(await this[_0x528850(0x11a)][_0x528850(0xf0)]('/universer-api/comment/unit/'+_0x1c99ce+_0x528850(0x100),{'body':_0x55e3d3}))[_0x528850(0x113)][_0x528850(0x107)];return{..._0x2adf0e,'id':_0x5ac32a['replyId'],'dT':_0x479e24(+_0x5ac32a[_0x528850(0x108)])[_0x528850(0x134)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5ac32a[_0x528850(0x117)]};}else{const _0x2f82a6={'memberId':_0x1419e9,'unitId':_0x1c99ce,'content':_0x2a45f0,'mention':_0x2e89f1},_0x3b23cd=await this[_0x528850(0x11a)]['post'](_0x528850(0x145)+_0x1c99ce+'/add',{'body':_0x2f82a6});return X(_0x3b23cd[_0x528850(0x113)][_0x528850(0xf2)],_0x2adf0e);}}async[_0x2df57e(0x131)](_0x2bf7c5){const _0x25ea8a=_0x2df57e;var _0x3d531f,_0x28dd3b;const {text:_0x296ac4,unitId:_0x157793}=_0x2bf7c5,_0x2761da=(_0x28dd3b=(_0x3d531f=_0x296ac4['customRanges'])==null?void 0x0:_0x3d531f[_0x25ea8a(0x147)](_0x258917=>_0x258917[_0x25ea8a(0x13c)]===_0x525ecc[_0x25ea8a(0x11f)])['map'](_0x42686e=>_0x42686e[_0x25ea8a(0x12c)]))!=null?_0x28dd3b:[],_0x17b74d=JSON['stringify'](_0x296ac4),_0x98e84b=_0x2bf7c5['threadId'],_0x31e3ca=_0x2bf7c5['id'],_0x11431c={'memberId':(await this[_0x25ea8a(0xfe)]['requireSession'](_0x157793))[_0x25ea8a(0x118)](),'unitId':_0x157793,'threadId':_0x98e84b,'mention':_0x2761da,'content':_0x17b74d,'replyId':_0x31e3ca},_0x3ab397=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x157793+_0x25ea8a(0xf4),{'body':_0x11431c});return!_0x3ab397[_0x25ea8a(0x113)][_0x25ea8a(0x126)]||_0x3ab397[_0x25ea8a(0x113)][_0x25ea8a(0x126)][_0x25ea8a(0xeb)]===0x1;}async[_0x2df57e(0x11c)](_0x2f643b){const _0x4f02f0=_0x2df57e,{unitId:_0x3c088c}=_0x2f643b,_0xa5d433=_0x2f643b['threadId'],_0x37827d={'memberId':this[_0x4f02f0(0x14a)][_0x4f02f0(0x12e)]()[_0x4f02f0(0x142)],'unitId':_0x3c088c,'threadId':_0xa5d433,'solved':_0x2f643b['resolved']?I[_0x4f02f0(0x10f)]:I[_0x4f02f0(0x103)]},_0x3f2522=await this[_0x4f02f0(0x11a)][_0x4f02f0(0xf0)](_0x4f02f0(0x145)+_0x3c088c+_0x4f02f0(0x123),{'body':_0x37827d});return!_0x3f2522[_0x4f02f0(0x113)][_0x4f02f0(0x126)]||_0x3f2522['body']['error']['code']===0x1;}async['deleteComment'](_0x2e0780,_0x40977c,_0xc24a2f,_0x41a57d){const _0x4687ac=_0x2df57e,_0x4d29ba={'memberId':(await this['_sessionService'][_0x4687ac(0x141)](_0x2e0780))[_0x4687ac(0x118)](),'threadId':_0xc24a2f,'replyId':_0x41a57d,'unitId':_0x2e0780},_0x50b595=await this[_0x4687ac(0x11a)]['post']('/universer-api/comment/unit/'+_0x2e0780+'/delete',{'body':_0x4d29ba});return!_0x50b595['body']['error']||_0x50b595['body'][_0x4687ac(0x126)][_0x4687ac(0xeb)]===0x1;}async[_0x2df57e(0x14d)](_0x4aeba1,_0x70ceef,_0x1df212){const _0x598c5f=_0x2df57e,_0x4e8bcd={'unitId':_0x4aeba1,'threadId':_0x1df212},_0x55c85f=await this[_0x598c5f(0x11a)][_0x598c5f(0xf0)](_0x598c5f(0x145)+_0x4aeba1+_0x598c5f(0xee),{'body':_0x4e8bcd}),_0x3dc01a=_0x1df212['map'](_0x2e1293=>ee(_0x55c85f[_0x598c5f(0x113)]['comments'][_0x2e1293],_0x4aeba1,_0x70ceef))[_0x598c5f(0x147)](Boolean);return Object[_0x598c5f(0x11e)](_0x55c85f['body'][_0x598c5f(0xec)])[_0x598c5f(0xfa)](_0xe314ce=>{const _0x101fef=_0x598c5f;this['_userService'][_0x101fef(0xf8)](_0xe314ce);}),_0x3dc01a;}[_0x2df57e(0x11d)](_0x80f058){const _0x5b5e58=_0x2df57e;return{'id':_0x80f058['id'],'threadId':_0x80f058['threadId'],'ref':_0x80f058[_0x5b5e58(0x13f)]};}};function _0x5e0c(_0x307c4f,_0x28c5ba){const _0x129bca=_0x129b();return _0x5e0c=function(_0x5e0c30,_0x5b9d08){_0x5e0c30=_0x5e0c30-0xea;let _0x4be09c=_0x129bca[_0x5e0c30];return _0x4be09c;},_0x5e0c(_0x307c4f,_0x28c5ba);}function _0x129b(){const _0xab210=['createTimestamp','type','onReady','Reply','threadId','Add','247590aPxYRW','Solved','8vbkFrA','add','unitId','body','subscribe','pluginName','6954662qkUMeV','userId','getMemberID','delete','_httpService','103143alqrEm','resolveComment','saveCommentToSnapshot','values','COMMENT','defineProperty','2347090uzkSWZ','_injector','/solved','_init','828152SashBe','error','disposeWithMe','solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','_threadCommentModel','rangeId','9HagVIL','getCurrentUser','7367IfrDig','symbol','updateComment','thread-comment-data-source.config','get','format','replies','map','_initUserSync','_commentService','_threadCommentDataSource','setConfig','getOwnPropertyDescriptor','rangeType','40VIDFAS','commentUpdate$','ref','find','requireSession','userID','1083342rDCome','Unknown','/universer-api/comment/unit/','slice','filter','getUnit','Delete','_userService','root','Edit','listComments','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','addComment','code','users','user','/list','Solve','post','payload','comment','UNRECOGNIZED','/edit','_config','content','dataSource','addUser','5nAbWYt','forEach','_threadCommentDataSourceService','getComment','parse','_sessionService','stringify','/reply','length','_configService','OpenOrReOpen','getUser','replyId','pipe','reply'];_0x129b=function(){return _0xab210;};return _0x129b();}S=Q([b(0x0,_0x18776e(_0x2c40b3)),b(0x1,_0x18776e(_0x3391ff)),b(0x2,_0x18776e(_0x50d4fb))],S);var re=Object[_0x2df57e(0x13b)],te=(_0x2d998a,_0x24fe1b,_0x4b3547,_0x394193)=>{const _0x4f79ac=_0x2df57e;for(var _0x89ac49=_0x394193>0x1?void 0x0:_0x394193?re(_0x24fe1b,_0x4b3547):_0x24fe1b,_0x53ea72=_0x2d998a[_0x4f79ac(0x101)]-0x1,_0x59a9b8;_0x53ea72>=0x0;_0x53ea72--)(_0x59a9b8=_0x2d998a[_0x53ea72])&&(_0x89ac49=_0x59a9b8(_0x89ac49)||_0x89ac49);return _0x89ac49;},M=(_0x369163,_0x56662d)=>(_0x57945b,_0x2bd66f)=>_0x56662d(_0x57945b,_0x2bd66f,_0x369163);let f=class extends _0x6ff48f{constructor(_0x4687ff,_0x4adb7a){const _0x45742d=_0x2df57e;super(),this['_threadCommentDataSourceService']=_0x4687ff,this['_threadCommentDataSource']=_0x4adb7a,this[_0x45742d(0x12a)]();}['_initDataSource'](){const _0x25f890=_0x2df57e;this[_0x25f890(0xfb)][_0x25f890(0xf7)]=this[_0x25f890(0x139)],this[_0x25f890(0xfb)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x191df3),M(0x1,_0x18776e(S))],f);var se=Object[_0x2df57e(0x120)],oe=Object[_0x2df57e(0x13b)],ne=(_0x1a97ab,_0x5f5985,_0xacf64d)=>_0x5f5985 in _0x1a97ab?se(_0x1a97ab,_0x5f5985,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xacf64d}):_0x1a97ab[_0x5f5985]=_0xacf64d,ie=(_0x4592e9,_0x3b0195,_0x4f694d,_0x30ce71)=>{for(var _0x365549=_0x30ce71>0x1?void 0x0:_0x30ce71?oe(_0x3b0195,_0x4f694d):_0x3b0195,_0x1969c7=_0x4592e9['length']-0x1,_0x5b383e;_0x1969c7>=0x0;_0x1969c7--)(_0x5b383e=_0x4592e9[_0x1969c7])&&(_0x365549=_0x5b383e(_0x365549)||_0x365549);return _0x365549;},N=(_0x400ffa,_0x338df2)=>(_0x82f31b,_0xea5e61)=>_0x338df2(_0x82f31b,_0xea5e61,_0x400ffa),$=(_0x5a58d5,_0xe854c7,_0x7f5156)=>ne(_0x5a58d5,typeof _0xe854c7!=_0x2df57e(0x130)?_0xe854c7+'':_0xe854c7,_0x7f5156);let g=class extends _0x415431{constructor(_0x321f4e=O,_0xd93a0c,_0x510113){const _0x42e0d0=_0x2df57e;super(),this[_0x42e0d0(0xf5)]=_0x321f4e,this['_injector']=_0xd93a0c,this[_0x42e0d0(0x102)]=_0x510113;const {..._0x5ef4c9}=_0x3ae601({},O,this['_config']);this[_0x42e0d0(0x102)][_0x42e0d0(0x13a)](z,_0x5ef4c9);}['onStarting'](){const _0x1abc1f=_0x2df57e;[[S],[f],[_]][_0x1abc1f(0xfa)](_0x37d170=>{const _0x58c7f9=_0x1abc1f;this[_0x58c7f9(0x122)][_0x58c7f9(0x111)](_0x37d170);});}[_0x2df57e(0x10a)](){const _0x2ff896=_0x2df57e;this[_0x2ff896(0x122)][_0x2ff896(0x133)](f),this[_0x2ff896(0x122)][_0x2ff896(0x133)](_);}};$(g,_0x2df57e(0x115),W),$(g,_0x2df57e(0x109),_0xefb13['UNIVER_UNKNOWN']),g=ie([_0x53ac22(_0x5c9762,_0x9f917b,_0x5d1065),N(0x1,_0x18776e(_0x450dbc)),N(0x2,_0x5d7bed)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3f9f96=_0x35bf;(function(_0x2c79a1,_0x26fb1c){const _0x3921f6=_0x35bf,_0x15a4cd=_0x2c79a1();while(!![]){try{const _0x486d8a=parseInt(_0x3921f6(0x12e))/0x1+parseInt(_0x3921f6(0x101))/0x2+-parseInt(_0x3921f6(0x15b))/0x3*(-parseInt(_0x3921f6(0x115))/0x4)+parseInt(_0x3921f6(0x15c))/0x5*(-parseInt(_0x3921f6(0x144))/0x6)+parseInt(_0x3921f6(0x151))/0x7*(parseInt(_0x3921f6(0x100))/0x8)+parseInt(_0x3921f6(0x10a))/0x9*(-parseInt(_0x3921f6(0x163))/0xa)+parseInt(_0x3921f6(0x107))/0xb*(-parseInt(_0x3921f6(0x158))/0xc);if(_0x486d8a===_0x26fb1c)break;else _0x15a4cd['push'](_0x15a4cd['shift']());}catch(_0x128b30){_0x15a4cd['push'](_0x15a4cd['shift']());}}}(_0x4b6f,0x906c5));import{CommentService as _0x1ef5d3,CollaborationSessionService as _0x47a7e9,UniverCollaborationClientPlugin as _0x4f29e8}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2c7508}from'@univerjs-pro/license';import{dayjs as _0x2d795a,UserManagerService as _0xfa36f5,Inject as _0x106498,Injector as _0x6af6db,Disposable as _0x4eb02a,CustomRangeType as _0x131a19,UniverInstanceType as _0x3c5c89,DependentOn as _0x4910a4,IConfigService as _0x451b01,Plugin as _0xa28747,merge as _0x2356f8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e08b1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x575b16,IThreadCommentDataSourceService as _0x437863}from'@univerjs/thread-comment';import{bufferTime as _0x55611a}from'rxjs';import{HTTPService as _0x4158c8}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x327e96=>(_0x327e96[_0x327e96[_0x3f9f96(0x139)]=0x0]=_0x3f9f96(0x139),_0x327e96[_0x327e96[_0x3f9f96(0x124)]=0x1]=_0x3f9f96(0x124),_0x327e96[_0x327e96['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x327e96))(I||{}),v=(_0x4fd123=>(_0x4fd123[_0x4fd123[_0x3f9f96(0x125)]=0x0]=_0x3f9f96(0x125),_0x4fd123[_0x4fd123[_0x3f9f96(0x10e)]=0x1]=_0x3f9f96(0x10e),_0x4fd123[_0x4fd123[_0x3f9f96(0x133)]=0x2]=_0x3f9f96(0x133),_0x4fd123[_0x4fd123[_0x3f9f96(0x14b)]=0x3]=_0x3f9f96(0x14b),_0x4fd123[_0x4fd123['Delete']=0x4]=_0x3f9f96(0x155),_0x4fd123[_0x4fd123[_0x3f9f96(0x108)]=0x5]='Solve',_0x4fd123[_0x4fd123[_0x3f9f96(0x154)]=-0x1]=_0x3f9f96(0x154),_0x4fd123))(v||{});const y=_0x130229=>_0x2d795a(new Date(+_0x130229))[_0x3f9f96(0xfe)](_0x3f9f96(0x143)),B=async(_0x485c11,_0x3d2c24)=>{const _0x20ab77=_0x3f9f96,_0x2dd0fb=_0x485c11['get'](_0xfa36f5),_0x215b63=_0x485c11[_0x20ab77(0x13f)](_0x4158c8);_0x3d2c24[_0x20ab77(0x145)](_0x11817d=>{const _0x589f09=_0x20ab77;_0x2dd0fb[_0x589f09(0x114)](_0x11817d)&&_0x3d2c24[_0x589f09(0x111)](_0x11817d);}),_0x3d2c24['size']&&(await _0x215b63[_0x20ab77(0x13f)](_0x20ab77(0xfb),{'params':{'userIDs':[..._0x3d2c24]}}))[_0x20ab77(0x14f)]['users']['forEach'](_0x1a8394=>{_0x1a8394&&_0x2dd0fb['addUser'](_0x1a8394);});};var K=Object[_0x3f9f96(0x156)],V=(_0xf265f1,_0x39e342,_0x1bca90,_0x11184f)=>{const _0x122c25=_0x3f9f96;for(var _0x2e9922=_0x11184f>0x1?void 0x0:_0x11184f?K(_0x39e342,_0x1bca90):_0x39e342,_0x1db8b7=_0xf265f1[_0x122c25(0x149)]-0x1,_0x4e9818;_0x1db8b7>=0x0;_0x1db8b7--)(_0x4e9818=_0xf265f1[_0x1db8b7])&&(_0x2e9922=_0x4e9818(_0x2e9922)||_0x2e9922);return _0x2e9922;},p=(_0x5697b2,_0x486d58)=>(_0x33209d,_0x5904af)=>_0x486d58(_0x33209d,_0x5904af,_0x5697b2);let _=class extends _0x4eb02a{constructor(_0x571173,_0x1da147,_0x5eb1ca,_0x3807c2){const _0x220135=_0x3f9f96;super(),this[_0x220135(0x13c)]=_0x571173,this[_0x220135(0x129)]=_0x1da147,this['_userService']=_0x5eb1ca,this[_0x220135(0x13e)]=_0x3807c2,this[_0x220135(0x147)](),this['_initUserSync']();}[_0x3f9f96(0x15d)](){const _0x36c140=_0x3f9f96;this['disposeWithMe'](this[_0x36c140(0x129)][_0x36c140(0x12b)][_0x36c140(0x153)](_0x55611a(0x10))['subscribe'](_0x88faff=>{const _0x3a4e96=_0x36c140,_0xeff9f5=new Set();_0x88faff[_0x3a4e96(0x145)](_0x366578=>{const _0x1794d5=_0x3a4e96;switch(_0x366578[_0x1794d5(0x110)]){case _0x1794d5(0x12f):{const _0x422f14=_0x366578[_0x1794d5(0x141)][_0x1794d5(0x11a)];_0xeff9f5['add'](_0x422f14);break;}}}),B(this[_0x3a4e96(0x13e)],_0xeff9f5);}));}[_0x3f9f96(0x147)](){const _0x393365=_0x3f9f96;this[_0x393365(0x116)](this['_commentService']['commentUpdate$'][_0x393365(0x103)](async _0x17e56c=>{const _0x4b208e=_0x393365;var _0x34a7c2,_0x594bb9,_0x332337,_0x52bfad;const _0x692bbe=(_0x34a7c2=this[_0x4b208e(0x129)][_0x4b208e(0x123)](_0x17e56c[_0x4b208e(0x132)])[_0x4b208e(0x131)](_0x292047=>_0x292047['threadId']===_0x17e56c[_0x4b208e(0x10f)]))==null?void 0x0:_0x34a7c2[_0x4b208e(0x104)];if(!_0x692bbe)return;const {unitId:_0x6e28a9,subUnitId:_0x5d8741}=_0x692bbe;switch(_0x17e56c[_0x4b208e(0x135)]&&this[_0x4b208e(0x162)][_0x4b208e(0xfc)](_0x17e56c[_0x4b208e(0x135)]),_0x17e56c[_0x4b208e(0x110)]){case v[_0x4b208e(0x10e)]:break;case v[_0x4b208e(0x133)]:{this[_0x4b208e(0x129)][_0x4b208e(0x148)](_0x6e28a9,_0x5d8741,{'unitId':_0x6e28a9,'subUnitId':_0x5d8741,'ref':'','id':_0x17e56c[_0x4b208e(0x12a)],'dT':y(+_0x17e56c[_0x4b208e(0x13d)]),'threadId':_0x17e56c[_0x4b208e(0x10f)],'personId':(_0x332337=(_0x594bb9=_0x17e56c[_0x4b208e(0x135)])==null?void 0x0:_0x594bb9[_0x4b208e(0x15e)])!=null?_0x332337:_0x17e56c[_0x4b208e(0x137)],'text':JSON[_0x4b208e(0x14a)](_0x17e56c['content']),'parentId':_0x692bbe['id']});break;}case v[_0x4b208e(0x155)]:{const _0x24a3dd=this[_0x4b208e(0x129)][_0x4b208e(0x13a)](_0x6e28a9,_0x5d8741,_0x17e56c[_0x4b208e(0x12a)]);_0x24a3dd&&_0x24a3dd[_0x4b208e(0x11f)]&&this[_0x4b208e(0x129)][_0x4b208e(0x126)](_0x6e28a9,_0x5d8741,_0x17e56c[_0x4b208e(0x12a)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x4b208e(0x120)](_0x6e28a9,_0x5d8741,{'commentId':_0x17e56c['replyId'],'text':JSON[_0x4b208e(0x14a)](_0x17e56c[_0x4b208e(0xff)])});break;}case v[_0x4b208e(0x108)]:{const _0x35fba2=(_0x52bfad=this[_0x4b208e(0x129)]['getUnit'](_0x17e56c['unitId'])[_0x4b208e(0x131)](_0x34b7cd=>_0x34b7cd[_0x4b208e(0x10f)]===_0x17e56c['threadId']))==null?void 0x0:_0x52bfad['root'];_0x35fba2&&this[_0x4b208e(0x129)]['resolveComment'](_0x6e28a9,_0x5d8741,_0x35fba2['id'],_0x17e56c[_0x4b208e(0x160)]===I[_0x4b208e(0x124)]);break;}}}));}};_=V([p(0x0,_0x106498(_0x1ef5d3)),p(0x1,_0x106498(_0x575b16)),p(0x2,_0x106498(_0xfa36f5)),p(0x3,_0x106498(_0x6af6db))],_);const z=_0x3f9f96(0x127),O={};function _0x35bf(_0x519cf0,_0x3aaeb3){const _0x4b6fa7=_0x4b6f();return _0x35bf=function(_0x35bfc9,_0x10ee73){_0x35bfc9=_0x35bfc9-0xfb;let _0x1bdde5=_0x4b6fa7[_0x35bfc9];return _0x1bdde5;},_0x35bf(_0x519cf0,_0x3aaeb3);}var k=Object[_0x3f9f96(0x156)],Q=(_0x4f0afe,_0x478101,_0x11aa72,_0x2a7ff8)=>{for(var _0x5f1415=_0x2a7ff8>0x1?void 0x0:_0x2a7ff8?k(_0x478101,_0x11aa72):_0x478101,_0x4f5d51=_0x4f0afe['length']-0x1,_0x5d35ec;_0x4f5d51>=0x0;_0x4f5d51--)(_0x5d35ec=_0x4f0afe[_0x4f5d51])&&(_0x5f1415=_0x5d35ec(_0x5f1415)||_0x5f1415);return _0x5f1415;},b=(_0x604f68,_0x17af1b)=>(_0x305b1a,_0xad1443)=>_0x17af1b(_0x305b1a,_0xad1443,_0x604f68);function X(_0x4aff59,_0x2bb473){const _0x430678=_0x3f9f96,_0x323ed7=_0x4aff59[_0x430678(0x138)][0x0];return{..._0x2bb473,'id':_0x323ed7[_0x430678(0x12a)],'resolved':_0x4aff59['solved']===0x1,'dT':y(_0x323ed7['createTimestamp']),'personId':_0x323ed7[_0x430678(0x137)],'threadId':_0x323ed7[_0x430678(0x10f)]};}function ee(_0x1a14f2,_0x270291,_0x222bb6){const _0x84ff88=_0x3f9f96;var _0x3a354e,_0x51a195;if(((_0x51a195=(_0x3a354e=_0x1a14f2==null?void 0x0:_0x1a14f2['replies'])==null?void 0x0:_0x3a354e[_0x84ff88(0x149)])!=null?_0x51a195:0x0)>0x0){const _0x21fe27=(_0x5761ac,_0x4e313d)=>({'id':_0x5761ac[_0x84ff88(0x12a)],'threadId':_0x5761ac[_0x84ff88(0x10f)],'dT':y(_0x5761ac['createTimestamp']),'personId':_0x5761ac[_0x84ff88(0x137)],'resolved':_0x1a14f2[_0x84ff88(0x160)]===I[_0x84ff88(0x124)],'unitId':_0x270291,'subUnitId':_0x222bb6,'text':JSON[_0x84ff88(0x14a)](_0x5761ac[_0x84ff88(0xff)]),'parentId':_0x4e313d}),_0xc2c5b8=_0x21fe27(_0x1a14f2[_0x84ff88(0x138)][0x0]);return{..._0xc2c5b8,'children':_0x1a14f2[_0x84ff88(0x138)]['slice'](0x1)[_0x84ff88(0x157)](_0x177817=>_0x21fe27(_0x177817,_0xc2c5b8['id']))};}return null;}let S=class{constructor(_0x120c89,_0x3f9b7b,_0x54df27){const _0x416dfd=_0x3f9f96;this['_httpService']=_0x120c89,this[_0x416dfd(0x162)]=_0x3f9b7b,this[_0x416dfd(0x14c)]=_0x54df27;}async['addComment'](_0x2b887a){const _0x5c41d6=_0x3f9f96;var _0x1f0f75,_0x573e74;const {parentId:_0x466186,unitId:_0x20b29f,text:_0x52db9e,threadId:_0x512bd6}=_0x2b887a,_0x2bb83e=(_0x573e74=(_0x1f0f75=_0x52db9e[_0x5c41d6(0x15a)])==null?void 0x0:_0x1f0f75[_0x5c41d6(0x10d)](_0x18ad90=>_0x18ad90[_0x5c41d6(0x12d)]===_0x131a19['COMMENT'])['map'](_0x252ce4=>_0x252ce4['rangeId']))!=null?_0x573e74:[],_0x311710=JSON['stringify'](_0x52db9e),_0x1404e6=(await this[_0x5c41d6(0x14c)]['requireSession'](_0x20b29f))[_0x5c41d6(0xfd)]();if(_0x466186){const _0x2a5aa2={'memberId':_0x1404e6,'unitId':_0x20b29f,'content':_0x311710,'mention':_0x2bb83e,'threadId':_0x512bd6},_0x206387=(await this['_httpService'][_0x5c41d6(0x159)](_0x5c41d6(0x112)+_0x20b29f+_0x5c41d6(0x146),{'body':_0x2a5aa2}))[_0x5c41d6(0x14f)][_0x5c41d6(0x11c)];return{..._0x2b887a,'id':_0x206387[_0x5c41d6(0x12a)],'dT':_0x2d795a(+_0x206387[_0x5c41d6(0x13d)])[_0x5c41d6(0xfe)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x206387[_0x5c41d6(0x137)]};}else{const _0x55e077={'memberId':_0x1404e6,'unitId':_0x20b29f,'content':_0x311710,'mention':_0x2bb83e},_0xffd0f1=await this[_0x5c41d6(0x12c)][_0x5c41d6(0x159)](_0x5c41d6(0x112)+_0x20b29f+_0x5c41d6(0x14e),{'body':_0x55e077});return X(_0xffd0f1[_0x5c41d6(0x14f)][_0x5c41d6(0x119)],_0x2b887a);}}async[_0x3f9f96(0x120)](_0x4d7588){const _0x4f6402=_0x3f9f96;var _0x2ee8cb,_0x3d5109;const {text:_0x8861fa,unitId:_0x47bd2e}=_0x4d7588,_0x14648d=(_0x3d5109=(_0x2ee8cb=_0x8861fa[_0x4f6402(0x15a)])==null?void 0x0:_0x2ee8cb[_0x4f6402(0x10d)](_0xaf7ab0=>_0xaf7ab0['rangeType']===_0x131a19[_0x4f6402(0x130)])[_0x4f6402(0x157)](_0x4855e9=>_0x4855e9[_0x4f6402(0x152)]))!=null?_0x3d5109:[],_0x1640d1=JSON[_0x4f6402(0x140)](_0x8861fa),_0x59f3df=_0x4d7588[_0x4f6402(0x10f)],_0x1de97b=_0x4d7588['id'],_0x257fd5={'memberId':(await this[_0x4f6402(0x14c)]['requireSession'](_0x47bd2e))[_0x4f6402(0xfd)](),'unitId':_0x47bd2e,'threadId':_0x59f3df,'mention':_0x14648d,'content':_0x1640d1,'replyId':_0x1de97b},_0x29dd12=await this[_0x4f6402(0x12c)][_0x4f6402(0x159)](_0x4f6402(0x112)+_0x47bd2e+_0x4f6402(0x15f),{'body':_0x257fd5});return!_0x29dd12['body'][_0x4f6402(0x109)]||_0x29dd12[_0x4f6402(0x14f)]['error']['code']===0x1;}async[_0x3f9f96(0x10c)](_0x4a2e34){const _0x2b3cc6=_0x3f9f96,{unitId:_0x1ad85f}=_0x4a2e34,_0x1ed428=_0x4a2e34[_0x2b3cc6(0x10f)],_0x266974={'memberId':this['_userService']['getCurrentUser']()[_0x2b3cc6(0x15e)],'unitId':_0x1ad85f,'threadId':_0x1ed428,'solved':_0x4a2e34[_0x2b3cc6(0x10b)]?I[_0x2b3cc6(0x124)]:I[_0x2b3cc6(0x139)]},_0x443f8c=await this[_0x2b3cc6(0x12c)][_0x2b3cc6(0x159)](_0x2b3cc6(0x112)+_0x1ad85f+_0x2b3cc6(0x118),{'body':_0x266974});return!_0x443f8c[_0x2b3cc6(0x14f)][_0x2b3cc6(0x109)]||_0x443f8c[_0x2b3cc6(0x14f)][_0x2b3cc6(0x109)][_0x2b3cc6(0x105)]===0x1;}async['deleteComment'](_0x942dc7,_0x497d65,_0x491ad3,_0x584d23){const _0x2dbb32=_0x3f9f96,_0x2ee9ab={'memberId':(await this[_0x2dbb32(0x14c)][_0x2dbb32(0x117)](_0x942dc7))['getMemberID'](),'threadId':_0x491ad3,'replyId':_0x584d23,'unitId':_0x942dc7},_0x383688=await this[_0x2dbb32(0x12c)][_0x2dbb32(0x159)](_0x2dbb32(0x112)+_0x942dc7+'/delete',{'body':_0x2ee9ab});return!_0x383688[_0x2dbb32(0x14f)]['error']||_0x383688[_0x2dbb32(0x14f)][_0x2dbb32(0x109)][_0x2dbb32(0x105)]===0x1;}async[_0x3f9f96(0x150)](_0x5f188c,_0x4739ec,_0x2094eb){const _0x2d5a8d=_0x3f9f96,_0x3db022={'unitId':_0x5f188c,'threadId':_0x2094eb},_0x5aa689=await this[_0x2d5a8d(0x12c)][_0x2d5a8d(0x159)](_0x2d5a8d(0x112)+_0x5f188c+'/list',{'body':_0x3db022}),_0x2ad918=_0x2094eb[_0x2d5a8d(0x157)](_0x3beb70=>ee(_0x5aa689[_0x2d5a8d(0x14f)][_0x2d5a8d(0x142)][_0x3beb70],_0x5f188c,_0x4739ec))[_0x2d5a8d(0x10d)](Boolean);return Object[_0x2d5a8d(0x11b)](_0x5aa689[_0x2d5a8d(0x14f)][_0x2d5a8d(0x106)])['forEach'](_0x1e05eb=>{const _0x10e2ab=_0x2d5a8d;this[_0x10e2ab(0x162)][_0x10e2ab(0xfc)](_0x1e05eb);}),_0x2ad918;}['saveCommentToSnapshot'](_0x1e9932){const _0x22fe60=_0x3f9f96;return{'id':_0x1e9932['id'],'threadId':_0x1e9932[_0x22fe60(0x10f)],'ref':_0x1e9932[_0x22fe60(0x134)]};}};S=Q([b(0x0,_0x106498(_0x4158c8)),b(0x1,_0x106498(_0xfa36f5)),b(0x2,_0x106498(_0x47a7e9))],S);var re=Object[_0x3f9f96(0x156)],te=(_0x4f2066,_0x45df4d,_0x2dd190,_0x133929)=>{const _0x16c0db=_0x3f9f96;for(var _0x59424c=_0x133929>0x1?void 0x0:_0x133929?re(_0x45df4d,_0x2dd190):_0x45df4d,_0x11e328=_0x4f2066[_0x16c0db(0x149)]-0x1,_0x35f23d;_0x11e328>=0x0;_0x11e328--)(_0x35f23d=_0x4f2066[_0x11e328])&&(_0x59424c=_0x35f23d(_0x59424c)||_0x59424c);return _0x59424c;},M=(_0x7c4f2a,_0x424246)=>(_0x2fe2ca,_0x3e5092)=>_0x424246(_0x2fe2ca,_0x3e5092,_0x7c4f2a);function _0x4b6f(){const _0x167859=['resolved','resolveComment','filter','Add','threadId','type','delete','/universer-api/comment/unit/','syncUpdateMutationToColla','getUser','4xmyNkg','disposeWithMe','requireSession','/solved','comment','personId','values','reply','UNIVER_UNKNOWN','onStarting','parentId','updateComment','_threadCommentDataSourceService','_config','getUnit','Solved','Unknown','deleteComment','thread-comment-data-source.config','defineProperty','_threadCommentModel','replyId','commentUpdate$','_httpService','rangeType','1103273hKNkqS','add','COMMENT','find','unitId','Reply','ref','user','_threadCommentDataSource','userId','replies','OpenOrReOpen','getComment','_configService','_commentService','createTimestamp','_injector','get','stringify','payload','comments','YYYY/MM/DD\x20HH:mm','866688vLLiYS','forEach','/reply','_init','addComment','length','parse','Edit','_sessionService','setConfig','/add','body','listComments','26383MgJYkS','rangeId','pipe','UNRECOGNIZED','Delete','getOwnPropertyDescriptor','map','756kRnsdI','post','customRanges','1833099dKnhOF','15NFgOtZ','_initUserSync','userID','/edit','solved','dataSource','_userService','300aiwELH','/universer-api/user/list','addUser','getMemberID','format','content','2248KSAOPb','1627780EYmikn','_initDataSource','subscribe','root','code','users','356378PLzKKa','Solve','error','156393hdCxpz'];_0x4b6f=function(){return _0x167859;};return _0x4b6f();}let f=class extends _0x4eb02a{constructor(_0x543b9c,_0x4585b9){const _0x11dd97=_0x3f9f96;super(),this[_0x11dd97(0x121)]=_0x543b9c,this['_threadCommentDataSource']=_0x4585b9,this['_initDataSource']();}[_0x3f9f96(0x102)](){const _0x572ae6=_0x3f9f96;this[_0x572ae6(0x121)][_0x572ae6(0x161)]=this[_0x572ae6(0x136)],this[_0x572ae6(0x121)][_0x572ae6(0x113)]=!0x1;}};f=te([M(0x0,_0x437863),M(0x1,_0x106498(S))],f);var se=Object[_0x3f9f96(0x128)],oe=Object[_0x3f9f96(0x156)],ne=(_0x1dad90,_0x625bd5,_0x786d3a)=>_0x625bd5 in _0x1dad90?se(_0x1dad90,_0x625bd5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x786d3a}):_0x1dad90[_0x625bd5]=_0x786d3a,ie=(_0x3d3db7,_0x57b2d4,_0x49df4b,_0x381f46)=>{for(var _0x1adcb6=_0x381f46>0x1?void 0x0:_0x381f46?oe(_0x57b2d4,_0x49df4b):_0x57b2d4,_0xc46f1=_0x3d3db7['length']-0x1,_0x1c0e29;_0xc46f1>=0x0;_0xc46f1--)(_0x1c0e29=_0x3d3db7[_0xc46f1])&&(_0x1adcb6=_0x1c0e29(_0x1adcb6)||_0x1adcb6);return _0x1adcb6;},N=(_0x405ea8,_0x245d32)=>(_0x4dfe64,_0x903518)=>_0x245d32(_0x4dfe64,_0x903518,_0x405ea8),$=(_0x314c4f,_0x3eedd5,_0x401af9)=>ne(_0x314c4f,typeof _0x3eedd5!='symbol'?_0x3eedd5+'':_0x3eedd5,_0x401af9);let g=class extends _0xa28747{constructor(_0x3eaea6=O,_0x58454d,_0x288dfe){const _0x43837d=_0x3f9f96;super(),this[_0x43837d(0x122)]=_0x3eaea6,this['_injector']=_0x58454d,this[_0x43837d(0x13b)]=_0x288dfe;const {..._0x152b24}=_0x2356f8({},O,this['_config']);this[_0x43837d(0x13b)][_0x43837d(0x14d)](z,_0x152b24);}[_0x3f9f96(0x11e)](){const _0x182246=_0x3f9f96;[[S],[f],[_]][_0x182246(0x145)](_0x26e1ec=>{const _0x27b561=_0x182246;this['_injector'][_0x27b561(0x12f)](_0x26e1ec);});}['onReady'](){const _0x1b22ff=_0x3f9f96;this[_0x1b22ff(0x13e)][_0x1b22ff(0x13f)](f),this[_0x1b22ff(0x13e)][_0x1b22ff(0x13f)](_);}};$(g,'pluginName',W),$(g,_0x3f9f96(0x110),_0x3c5c89[_0x3f9f96(0x11d)]),g=ie([_0x4910a4(_0x5e08b1,_0x4f29e8,_0x2c7508),N(0x1,_0x106498(_0x6af6db)),N(0x2,_0x451b01)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2df57e=_0x5e0c;(function(_0x216986,_0x317750){const _0x86c761=_0x5e0c,_0x5b3d7a=_0x216986();while(!![]){try{const _0x408e46=parseInt(_0x86c761(0x12f))/0x1*(parseInt(_0x86c761(0x13d))/0x2)+parseInt(_0x86c761(0x11b))/0x3*(parseInt(_0x86c761(0x110))/0x4)+parseInt(_0x86c761(0xf9))/0x5*(parseInt(_0x86c761(0x143))/0x6)+parseInt(_0x86c761(0x10e))/0x7+parseInt(_0x86c761(0x125))/0x8*(parseInt(_0x86c761(0x12d))/0x9)+parseInt(_0x86c761(0x121))/0xa+-parseInt(_0x86c761(0x116))/0xb;if(_0x408e46===_0x317750)break;else _0x5b3d7a['push'](_0x5b3d7a['shift']());}catch(_0x3c1b88){_0x5b3d7a['push'](_0x5b3d7a['shift']());}}}(_0x129b,0x21b1f));import{CommentService as _0x2ca153,CollaborationSessionService as _0x50d4fb,UniverCollaborationClientPlugin as _0x9f917b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d1065}from'@univerjs-pro/license';import{dayjs as _0x479e24,UserManagerService as _0x3391ff,Inject as _0x18776e,Injector as _0x450dbc,Disposable as _0x6ff48f,CustomRangeType as _0x525ecc,UniverInstanceType as _0xefb13,DependentOn as _0x53ac22,IConfigService as _0x5d7bed,Plugin as _0x415431,merge as _0x3ae601}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5c9762}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x22a644,IThreadCommentDataSourceService as _0x191df3}from'@univerjs/thread-comment';import{bufferTime as _0x6ecdfc}from'rxjs';import{HTTPService as _0x2c40b3}from'@univerjs/network';const W=_0x2df57e(0x129);var I=(_0x418b2a=>(_0x418b2a[_0x418b2a[_0x2df57e(0x103)]=0x0]=_0x2df57e(0x103),_0x418b2a[_0x418b2a['Solved']=0x1]=_0x2df57e(0x10f),_0x418b2a[_0x418b2a[_0x2df57e(0xf3)]=-0x1]=_0x2df57e(0xf3),_0x418b2a))(I||{}),v=(_0x36a6d2=>(_0x36a6d2[_0x36a6d2[_0x2df57e(0x144)]=0x0]='Unknown',_0x36a6d2[_0x36a6d2[_0x2df57e(0x10d)]=0x1]='Add',_0x36a6d2[_0x36a6d2['Reply']=0x2]='Reply',_0x36a6d2[_0x36a6d2['Edit']=0x3]=_0x2df57e(0x14c),_0x36a6d2[_0x36a6d2[_0x2df57e(0x149)]=0x4]=_0x2df57e(0x149),_0x36a6d2[_0x36a6d2[_0x2df57e(0xef)]=0x5]='Solve',_0x36a6d2[_0x36a6d2[_0x2df57e(0xf3)]=-0x1]=_0x2df57e(0xf3),_0x36a6d2))(v||{});const y=_0x35b876=>_0x479e24(new Date(+_0x35b876))[_0x2df57e(0x134)](_0x2df57e(0x14f)),B=async(_0x239a71,_0x514647)=>{const _0x22100c=_0x2df57e,_0x531666=_0x239a71[_0x22100c(0x133)](_0x3391ff),_0x3ed7fc=_0x239a71[_0x22100c(0x133)](_0x2c40b3);_0x514647[_0x22100c(0xfa)](_0x3357f4=>{const _0x9479f4=_0x22100c;_0x531666[_0x9479f4(0x104)](_0x3357f4)&&_0x514647[_0x9479f4(0x119)](_0x3357f4);}),_0x514647['size']&&(await _0x3ed7fc[_0x22100c(0x133)](_0x22100c(0x14e),{'params':{'userIDs':[..._0x514647]}}))[_0x22100c(0x113)][_0x22100c(0xec)][_0x22100c(0xfa)](_0x14efae=>{_0x14efae&&_0x531666['addUser'](_0x14efae);});};var K=Object[_0x2df57e(0x13b)],V=(_0xa17a6a,_0x4a3b78,_0x262d70,_0x2c7f2e)=>{const _0xdb9475=_0x2df57e;for(var _0x48d145=_0x2c7f2e>0x1?void 0x0:_0x2c7f2e?K(_0x4a3b78,_0x262d70):_0x4a3b78,_0x4ce027=_0xa17a6a[_0xdb9475(0x101)]-0x1,_0x365d8b;_0x4ce027>=0x0;_0x4ce027--)(_0x365d8b=_0xa17a6a[_0x4ce027])&&(_0x48d145=_0x365d8b(_0x48d145)||_0x48d145);return _0x48d145;},p=(_0x4b20ca,_0x3ad02f)=>(_0x28e79d,_0x57c547)=>_0x3ad02f(_0x28e79d,_0x57c547,_0x4b20ca);let _=class extends _0x6ff48f{constructor(_0x416dd4,_0x5af778,_0x529fca,_0x9bfbf3){const _0x1ff28c=_0x2df57e;super(),this[_0x1ff28c(0x138)]=_0x416dd4,this[_0x1ff28c(0x12b)]=_0x5af778,this['_userService']=_0x529fca,this[_0x1ff28c(0x122)]=_0x9bfbf3,this[_0x1ff28c(0x124)](),this[_0x1ff28c(0x137)]();}[_0x2df57e(0x137)](){const _0x3109e2=_0x2df57e;this[_0x3109e2(0x127)](this[_0x3109e2(0x12b)][_0x3109e2(0x13e)][_0x3109e2(0x106)](_0x6ecdfc(0x10))[_0x3109e2(0x114)](_0x241810=>{const _0x20f028=_0x3109e2,_0x3f12b7=new Set();_0x241810[_0x20f028(0xfa)](_0x386e83=>{const _0x2bf348=_0x20f028;switch(_0x386e83[_0x2bf348(0x109)]){case _0x2bf348(0x111):{const _0xe27159=_0x386e83[_0x2bf348(0xf1)]['personId'];_0x3f12b7[_0x2bf348(0x111)](_0xe27159);break;}}}),B(this[_0x20f028(0x122)],_0x3f12b7);}));}[_0x2df57e(0x124)](){const _0x18276f=_0x2df57e;this[_0x18276f(0x127)](this[_0x18276f(0x138)][_0x18276f(0x13e)]['subscribe'](async _0x1e8776=>{const _0x2fea5e=_0x18276f;var _0x326346,_0x363885,_0x3ca518,_0x4e6fcc;const _0x321a28=(_0x326346=this[_0x2fea5e(0x12b)]['getUnit'](_0x1e8776[_0x2fea5e(0x112)])[_0x2fea5e(0x140)](_0x15dc61=>_0x15dc61['threadId']===_0x1e8776[_0x2fea5e(0x10c)]))==null?void 0x0:_0x326346[_0x2fea5e(0x14b)];if(!_0x321a28)return;const {unitId:_0x330dc6,subUnitId:_0x3d7524}=_0x321a28;switch(_0x1e8776[_0x2fea5e(0xed)]&&this[_0x2fea5e(0x14a)][_0x2fea5e(0xf8)](_0x1e8776[_0x2fea5e(0xed)]),_0x1e8776[_0x2fea5e(0x109)]){case v[_0x2fea5e(0x10d)]:break;case v[_0x2fea5e(0x10b)]:{this['_threadCommentModel']['addComment'](_0x330dc6,_0x3d7524,{'unitId':_0x330dc6,'subUnitId':_0x3d7524,'ref':'','id':_0x1e8776[_0x2fea5e(0x105)],'dT':y(+_0x1e8776[_0x2fea5e(0x108)]),'threadId':_0x1e8776[_0x2fea5e(0x10c)],'personId':(_0x3ca518=(_0x363885=_0x1e8776[_0x2fea5e(0xed)])==null?void 0x0:_0x363885['userID'])!=null?_0x3ca518:_0x1e8776['userId'],'text':JSON[_0x2fea5e(0xfd)](_0x1e8776[_0x2fea5e(0xf6)]),'parentId':_0x321a28['id']});break;}case v[_0x2fea5e(0x149)]:{const _0x5d5d68=this[_0x2fea5e(0x12b)][_0x2fea5e(0xfc)](_0x330dc6,_0x3d7524,_0x1e8776['replyId']);_0x5d5d68&&_0x5d5d68['parentId']&&this[_0x2fea5e(0x12b)]['deleteComment'](_0x330dc6,_0x3d7524,_0x1e8776['replyId']);break;}case v[_0x2fea5e(0x14c)]:{this[_0x2fea5e(0x12b)][_0x2fea5e(0x131)](_0x330dc6,_0x3d7524,{'commentId':_0x1e8776[_0x2fea5e(0x105)],'text':JSON['parse'](_0x1e8776[_0x2fea5e(0xf6)])});break;}case v[_0x2fea5e(0xef)]:{const _0x338167=(_0x4e6fcc=this['_threadCommentModel'][_0x2fea5e(0x148)](_0x1e8776[_0x2fea5e(0x112)])[_0x2fea5e(0x140)](_0x409772=>_0x409772[_0x2fea5e(0x10c)]===_0x1e8776['threadId']))==null?void 0x0:_0x4e6fcc['root'];_0x338167&&this['_threadCommentModel'][_0x2fea5e(0x11c)](_0x330dc6,_0x3d7524,_0x338167['id'],_0x1e8776[_0x2fea5e(0x128)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x18776e(_0x2ca153)),p(0x1,_0x18776e(_0x22a644)),p(0x2,_0x18776e(_0x3391ff)),p(0x3,_0x18776e(_0x450dbc))],_);const z=_0x2df57e(0x132),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x3312b8,_0x7d809d,_0x17117c,_0x10dc37)=>{const _0x56015e=_0x2df57e;for(var _0x7cdee8=_0x10dc37>0x1?void 0x0:_0x10dc37?k(_0x7d809d,_0x17117c):_0x7d809d,_0x4c2d24=_0x3312b8[_0x56015e(0x101)]-0x1,_0x497906;_0x4c2d24>=0x0;_0x4c2d24--)(_0x497906=_0x3312b8[_0x4c2d24])&&(_0x7cdee8=_0x497906(_0x7cdee8)||_0x7cdee8);return _0x7cdee8;},b=(_0x571f7b,_0x138c81)=>(_0x1705ba,_0x42e228)=>_0x138c81(_0x1705ba,_0x42e228,_0x571f7b);function X(_0xf82f4,_0x318d20){const _0x10fa94=_0x2df57e,_0x598b8a=_0xf82f4['replies'][0x0];return{..._0x318d20,'id':_0x598b8a[_0x10fa94(0x105)],'resolved':_0xf82f4[_0x10fa94(0x128)]===0x1,'dT':y(_0x598b8a['createTimestamp']),'personId':_0x598b8a['userId'],'threadId':_0x598b8a[_0x10fa94(0x10c)]};}function ee(_0xd923e2,_0x91e9de,_0x7e4771){const _0x42041b=_0x2df57e;var _0x42a4c9,_0x2ce87e;if(((_0x2ce87e=(_0x42a4c9=_0xd923e2==null?void 0x0:_0xd923e2[_0x42041b(0x135)])==null?void 0x0:_0x42a4c9[_0x42041b(0x101)])!=null?_0x2ce87e:0x0)>0x0){const _0x4aec0e=(_0x54b5e5,_0xc74423)=>({'id':_0x54b5e5[_0x42041b(0x105)],'threadId':_0x54b5e5[_0x42041b(0x10c)],'dT':y(_0x54b5e5[_0x42041b(0x108)]),'personId':_0x54b5e5['userId'],'resolved':_0xd923e2[_0x42041b(0x128)]===I[_0x42041b(0x10f)],'unitId':_0x91e9de,'subUnitId':_0x7e4771,'text':JSON[_0x42041b(0xfd)](_0x54b5e5[_0x42041b(0xf6)]),'parentId':_0xc74423}),_0x469822=_0x4aec0e(_0xd923e2[_0x42041b(0x135)][0x0]);return{..._0x469822,'children':_0xd923e2[_0x42041b(0x135)][_0x42041b(0x146)](0x1)[_0x42041b(0x136)](_0x573178=>_0x4aec0e(_0x573178,_0x469822['id']))};}return null;}let S=class{constructor(_0x3e9ca2,_0x8f12c2,_0x5e8038){const _0x2eedae=_0x2df57e;this[_0x2eedae(0x11a)]=_0x3e9ca2,this['_userService']=_0x8f12c2,this[_0x2eedae(0xfe)]=_0x5e8038;}async[_0x2df57e(0xea)](_0x2adf0e){const _0x528850=_0x2df57e;var _0xc2258d,_0x1c42b8;const {parentId:_0x4edafa,unitId:_0x1c99ce,text:_0x1caca3,threadId:_0x463993}=_0x2adf0e,_0x2e89f1=(_0x1c42b8=(_0xc2258d=_0x1caca3['customRanges'])==null?void 0x0:_0xc2258d[_0x528850(0x147)](_0x394559=>_0x394559[_0x528850(0x13c)]===_0x525ecc[_0x528850(0x11f)])['map'](_0x3e5b56=>_0x3e5b56['rangeId']))!=null?_0x1c42b8:[],_0x2a45f0=JSON[_0x528850(0xff)](_0x1caca3),_0x1419e9=(await this[_0x528850(0xfe)][_0x528850(0x141)](_0x1c99ce))[_0x528850(0x118)]();if(_0x4edafa){const _0x55e3d3={'memberId':_0x1419e9,'unitId':_0x1c99ce,'content':_0x2a45f0,'mention':_0x2e89f1,'threadId':_0x463993},_0x5ac32a=(await this[_0x528850(0x11a)][_0x528850(0xf0)]('/universer-api/comment/unit/'+_0x1c99ce+_0x528850(0x100),{'body':_0x55e3d3}))[_0x528850(0x113)][_0x528850(0x107)];return{..._0x2adf0e,'id':_0x5ac32a['replyId'],'dT':_0x479e24(+_0x5ac32a[_0x528850(0x108)])[_0x528850(0x134)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5ac32a[_0x528850(0x117)]};}else{const _0x2f82a6={'memberId':_0x1419e9,'unitId':_0x1c99ce,'content':_0x2a45f0,'mention':_0x2e89f1},_0x3b23cd=await this[_0x528850(0x11a)]['post'](_0x528850(0x145)+_0x1c99ce+'/add',{'body':_0x2f82a6});return X(_0x3b23cd[_0x528850(0x113)][_0x528850(0xf2)],_0x2adf0e);}}async[_0x2df57e(0x131)](_0x2bf7c5){const _0x25ea8a=_0x2df57e;var _0x3d531f,_0x28dd3b;const {text:_0x296ac4,unitId:_0x157793}=_0x2bf7c5,_0x2761da=(_0x28dd3b=(_0x3d531f=_0x296ac4['customRanges'])==null?void 0x0:_0x3d531f[_0x25ea8a(0x147)](_0x258917=>_0x258917[_0x25ea8a(0x13c)]===_0x525ecc[_0x25ea8a(0x11f)])['map'](_0x42686e=>_0x42686e[_0x25ea8a(0x12c)]))!=null?_0x28dd3b:[],_0x17b74d=JSON['stringify'](_0x296ac4),_0x98e84b=_0x2bf7c5['threadId'],_0x31e3ca=_0x2bf7c5['id'],_0x11431c={'memberId':(await this[_0x25ea8a(0xfe)]['requireSession'](_0x157793))[_0x25ea8a(0x118)](),'unitId':_0x157793,'threadId':_0x98e84b,'mention':_0x2761da,'content':_0x17b74d,'replyId':_0x31e3ca},_0x3ab397=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x157793+_0x25ea8a(0xf4),{'body':_0x11431c});return!_0x3ab397[_0x25ea8a(0x113)][_0x25ea8a(0x126)]||_0x3ab397[_0x25ea8a(0x113)][_0x25ea8a(0x126)][_0x25ea8a(0xeb)]===0x1;}async[_0x2df57e(0x11c)](_0x2f643b){const _0x4f02f0=_0x2df57e,{unitId:_0x3c088c}=_0x2f643b,_0xa5d433=_0x2f643b['threadId'],_0x37827d={'memberId':this[_0x4f02f0(0x14a)][_0x4f02f0(0x12e)]()[_0x4f02f0(0x142)],'unitId':_0x3c088c,'threadId':_0xa5d433,'solved':_0x2f643b['resolved']?I[_0x4f02f0(0x10f)]:I[_0x4f02f0(0x103)]},_0x3f2522=await this[_0x4f02f0(0x11a)][_0x4f02f0(0xf0)](_0x4f02f0(0x145)+_0x3c088c+_0x4f02f0(0x123),{'body':_0x37827d});return!_0x3f2522[_0x4f02f0(0x113)][_0x4f02f0(0x126)]||_0x3f2522['body']['error']['code']===0x1;}async['deleteComment'](_0x2e0780,_0x40977c,_0xc24a2f,_0x41a57d){const _0x4687ac=_0x2df57e,_0x4d29ba={'memberId':(await this['_sessionService'][_0x4687ac(0x141)](_0x2e0780))[_0x4687ac(0x118)](),'threadId':_0xc24a2f,'replyId':_0x41a57d,'unitId':_0x2e0780},_0x50b595=await this[_0x4687ac(0x11a)]['post']('/universer-api/comment/unit/'+_0x2e0780+'/delete',{'body':_0x4d29ba});return!_0x50b595['body']['error']||_0x50b595['body'][_0x4687ac(0x126)][_0x4687ac(0xeb)]===0x1;}async[_0x2df57e(0x14d)](_0x4aeba1,_0x70ceef,_0x1df212){const _0x598c5f=_0x2df57e,_0x4e8bcd={'unitId':_0x4aeba1,'threadId':_0x1df212},_0x55c85f=await this[_0x598c5f(0x11a)][_0x598c5f(0xf0)](_0x598c5f(0x145)+_0x4aeba1+_0x598c5f(0xee),{'body':_0x4e8bcd}),_0x3dc01a=_0x1df212['map'](_0x2e1293=>ee(_0x55c85f[_0x598c5f(0x113)]['comments'][_0x2e1293],_0x4aeba1,_0x70ceef))[_0x598c5f(0x147)](Boolean);return Object[_0x598c5f(0x11e)](_0x55c85f['body'][_0x598c5f(0xec)])[_0x598c5f(0xfa)](_0xe314ce=>{const _0x101fef=_0x598c5f;this['_userService'][_0x101fef(0xf8)](_0xe314ce);}),_0x3dc01a;}[_0x2df57e(0x11d)](_0x80f058){const _0x5b5e58=_0x2df57e;return{'id':_0x80f058['id'],'threadId':_0x80f058['threadId'],'ref':_0x80f058[_0x5b5e58(0x13f)]};}};function _0x5e0c(_0x307c4f,_0x28c5ba){const _0x129bca=_0x129b();return _0x5e0c=function(_0x5e0c30,_0x5b9d08){_0x5e0c30=_0x5e0c30-0xea;let _0x4be09c=_0x129bca[_0x5e0c30];return _0x4be09c;},_0x5e0c(_0x307c4f,_0x28c5ba);}function _0x129b(){const _0xab210=['createTimestamp','type','onReady','Reply','threadId','Add','247590aPxYRW','Solved','8vbkFrA','add','unitId','body','subscribe','pluginName','6954662qkUMeV','userId','getMemberID','delete','_httpService','103143alqrEm','resolveComment','saveCommentToSnapshot','values','COMMENT','defineProperty','2347090uzkSWZ','_injector','/solved','_init','828152SashBe','error','disposeWithMe','solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','_threadCommentModel','rangeId','9HagVIL','getCurrentUser','7367IfrDig','symbol','updateComment','thread-comment-data-source.config','get','format','replies','map','_initUserSync','_commentService','_threadCommentDataSource','setConfig','getOwnPropertyDescriptor','rangeType','40VIDFAS','commentUpdate$','ref','find','requireSession','userID','1083342rDCome','Unknown','/universer-api/comment/unit/','slice','filter','getUnit','Delete','_userService','root','Edit','listComments','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','addComment','code','users','user','/list','Solve','post','payload','comment','UNRECOGNIZED','/edit','_config','content','dataSource','addUser','5nAbWYt','forEach','_threadCommentDataSourceService','getComment','parse','_sessionService','stringify','/reply','length','_configService','OpenOrReOpen','getUser','replyId','pipe','reply'];_0x129b=function(){return _0xab210;};return _0x129b();}S=Q([b(0x0,_0x18776e(_0x2c40b3)),b(0x1,_0x18776e(_0x3391ff)),b(0x2,_0x18776e(_0x50d4fb))],S);var re=Object[_0x2df57e(0x13b)],te=(_0x2d998a,_0x24fe1b,_0x4b3547,_0x394193)=>{const _0x4f79ac=_0x2df57e;for(var _0x89ac49=_0x394193>0x1?void 0x0:_0x394193?re(_0x24fe1b,_0x4b3547):_0x24fe1b,_0x53ea72=_0x2d998a[_0x4f79ac(0x101)]-0x1,_0x59a9b8;_0x53ea72>=0x0;_0x53ea72--)(_0x59a9b8=_0x2d998a[_0x53ea72])&&(_0x89ac49=_0x59a9b8(_0x89ac49)||_0x89ac49);return _0x89ac49;},M=(_0x369163,_0x56662d)=>(_0x57945b,_0x2bd66f)=>_0x56662d(_0x57945b,_0x2bd66f,_0x369163);let f=class extends _0x6ff48f{constructor(_0x4687ff,_0x4adb7a){const _0x45742d=_0x2df57e;super(),this['_threadCommentDataSourceService']=_0x4687ff,this['_threadCommentDataSource']=_0x4adb7a,this[_0x45742d(0x12a)]();}['_initDataSource'](){const _0x25f890=_0x2df57e;this[_0x25f890(0xfb)][_0x25f890(0xf7)]=this[_0x25f890(0x139)],this[_0x25f890(0xfb)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x191df3),M(0x1,_0x18776e(S))],f);var se=Object[_0x2df57e(0x120)],oe=Object[_0x2df57e(0x13b)],ne=(_0x1a97ab,_0x5f5985,_0xacf64d)=>_0x5f5985 in _0x1a97ab?se(_0x1a97ab,_0x5f5985,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xacf64d}):_0x1a97ab[_0x5f5985]=_0xacf64d,ie=(_0x4592e9,_0x3b0195,_0x4f694d,_0x30ce71)=>{for(var _0x365549=_0x30ce71>0x1?void 0x0:_0x30ce71?oe(_0x3b0195,_0x4f694d):_0x3b0195,_0x1969c7=_0x4592e9['length']-0x1,_0x5b383e;_0x1969c7>=0x0;_0x1969c7--)(_0x5b383e=_0x4592e9[_0x1969c7])&&(_0x365549=_0x5b383e(_0x365549)||_0x365549);return _0x365549;},N=(_0x400ffa,_0x338df2)=>(_0x82f31b,_0xea5e61)=>_0x338df2(_0x82f31b,_0xea5e61,_0x400ffa),$=(_0x5a58d5,_0xe854c7,_0x7f5156)=>ne(_0x5a58d5,typeof _0xe854c7!=_0x2df57e(0x130)?_0xe854c7+'':_0xe854c7,_0x7f5156);let g=class extends _0x415431{constructor(_0x321f4e=O,_0xd93a0c,_0x510113){const _0x42e0d0=_0x2df57e;super(),this[_0x42e0d0(0xf5)]=_0x321f4e,this['_injector']=_0xd93a0c,this[_0x42e0d0(0x102)]=_0x510113;const {..._0x5ef4c9}=_0x3ae601({},O,this['_config']);this[_0x42e0d0(0x102)][_0x42e0d0(0x13a)](z,_0x5ef4c9);}['onStarting'](){const _0x1abc1f=_0x2df57e;[[S],[f],[_]][_0x1abc1f(0xfa)](_0x37d170=>{const _0x58c7f9=_0x1abc1f;this[_0x58c7f9(0x122)][_0x58c7f9(0x111)](_0x37d170);});}[_0x2df57e(0x10a)](){const _0x2ff896=_0x2df57e;this[_0x2ff896(0x122)][_0x2ff896(0x133)](f),this[_0x2ff896(0x122)][_0x2ff896(0x133)](_);}};$(g,_0x2df57e(0x115),W),$(g,_0x2df57e(0x109),_0xefb13['UNIVER_UNKNOWN']),g=ie([_0x53ac22(_0x5c9762,_0x9f917b,_0x5d1065),N(0x1,_0x18776e(_0x450dbc)),N(0x2,_0x5d7bed)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3f9f96=_0x35bf;(function(_0x2c79a1,_0x26fb1c){const _0x3921f6=_0x35bf,_0x15a4cd=_0x2c79a1();while(!![]){try{const _0x486d8a=parseInt(_0x3921f6(0x12e))/0x1+parseInt(_0x3921f6(0x101))/0x2+-parseInt(_0x3921f6(0x15b))/0x3*(-parseInt(_0x3921f6(0x115))/0x4)+parseInt(_0x3921f6(0x15c))/0x5*(-parseInt(_0x3921f6(0x144))/0x6)+parseInt(_0x3921f6(0x151))/0x7*(parseInt(_0x3921f6(0x100))/0x8)+parseInt(_0x3921f6(0x10a))/0x9*(-parseInt(_0x3921f6(0x163))/0xa)+parseInt(_0x3921f6(0x107))/0xb*(-parseInt(_0x3921f6(0x158))/0xc);if(_0x486d8a===_0x26fb1c)break;else _0x15a4cd['push'](_0x15a4cd['shift']());}catch(_0x128b30){_0x15a4cd['push'](_0x15a4cd['shift']());}}}(_0x4b6f,0x906c5));import{CommentService as _0x1ef5d3,CollaborationSessionService as _0x47a7e9,UniverCollaborationClientPlugin as _0x4f29e8}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2c7508}from'@univerjs-pro/license';import{dayjs as _0x2d795a,UserManagerService as _0xfa36f5,Inject as _0x106498,Injector as _0x6af6db,Disposable as _0x4eb02a,CustomRangeType as _0x131a19,UniverInstanceType as _0x3c5c89,DependentOn as _0x4910a4,IConfigService as _0x451b01,Plugin as _0xa28747,merge as _0x2356f8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e08b1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x575b16,IThreadCommentDataSourceService as _0x437863}from'@univerjs/thread-comment';import{bufferTime as _0x55611a}from'rxjs';import{HTTPService as _0x4158c8}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x327e96=>(_0x327e96[_0x327e96[_0x3f9f96(0x139)]=0x0]=_0x3f9f96(0x139),_0x327e96[_0x327e96[_0x3f9f96(0x124)]=0x1]=_0x3f9f96(0x124),_0x327e96[_0x327e96['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x327e96))(I||{}),v=(_0x4fd123=>(_0x4fd123[_0x4fd123[_0x3f9f96(0x125)]=0x0]=_0x3f9f96(0x125),_0x4fd123[_0x4fd123[_0x3f9f96(0x10e)]=0x1]=_0x3f9f96(0x10e),_0x4fd123[_0x4fd123[_0x3f9f96(0x133)]=0x2]=_0x3f9f96(0x133),_0x4fd123[_0x4fd123[_0x3f9f96(0x14b)]=0x3]=_0x3f9f96(0x14b),_0x4fd123[_0x4fd123['Delete']=0x4]=_0x3f9f96(0x155),_0x4fd123[_0x4fd123[_0x3f9f96(0x108)]=0x5]='Solve',_0x4fd123[_0x4fd123[_0x3f9f96(0x154)]=-0x1]=_0x3f9f96(0x154),_0x4fd123))(v||{});const y=_0x130229=>_0x2d795a(new Date(+_0x130229))[_0x3f9f96(0xfe)](_0x3f9f96(0x143)),B=async(_0x485c11,_0x3d2c24)=>{const _0x20ab77=_0x3f9f96,_0x2dd0fb=_0x485c11['get'](_0xfa36f5),_0x215b63=_0x485c11[_0x20ab77(0x13f)](_0x4158c8);_0x3d2c24[_0x20ab77(0x145)](_0x11817d=>{const _0x589f09=_0x20ab77;_0x2dd0fb[_0x589f09(0x114)](_0x11817d)&&_0x3d2c24[_0x589f09(0x111)](_0x11817d);}),_0x3d2c24['size']&&(await _0x215b63[_0x20ab77(0x13f)](_0x20ab77(0xfb),{'params':{'userIDs':[..._0x3d2c24]}}))[_0x20ab77(0x14f)]['users']['forEach'](_0x1a8394=>{_0x1a8394&&_0x2dd0fb['addUser'](_0x1a8394);});};var K=Object[_0x3f9f96(0x156)],V=(_0xf265f1,_0x39e342,_0x1bca90,_0x11184f)=>{const _0x122c25=_0x3f9f96;for(var _0x2e9922=_0x11184f>0x1?void 0x0:_0x11184f?K(_0x39e342,_0x1bca90):_0x39e342,_0x1db8b7=_0xf265f1[_0x122c25(0x149)]-0x1,_0x4e9818;_0x1db8b7>=0x0;_0x1db8b7--)(_0x4e9818=_0xf265f1[_0x1db8b7])&&(_0x2e9922=_0x4e9818(_0x2e9922)||_0x2e9922);return _0x2e9922;},p=(_0x5697b2,_0x486d58)=>(_0x33209d,_0x5904af)=>_0x486d58(_0x33209d,_0x5904af,_0x5697b2);let _=class extends _0x4eb02a{constructor(_0x571173,_0x1da147,_0x5eb1ca,_0x3807c2){const _0x220135=_0x3f9f96;super(),this[_0x220135(0x13c)]=_0x571173,this[_0x220135(0x129)]=_0x1da147,this['_userService']=_0x5eb1ca,this[_0x220135(0x13e)]=_0x3807c2,this[_0x220135(0x147)](),this['_initUserSync']();}[_0x3f9f96(0x15d)](){const _0x36c140=_0x3f9f96;this['disposeWithMe'](this[_0x36c140(0x129)][_0x36c140(0x12b)][_0x36c140(0x153)](_0x55611a(0x10))['subscribe'](_0x88faff=>{const _0x3a4e96=_0x36c140,_0xeff9f5=new Set();_0x88faff[_0x3a4e96(0x145)](_0x366578=>{const _0x1794d5=_0x3a4e96;switch(_0x366578[_0x1794d5(0x110)]){case _0x1794d5(0x12f):{const _0x422f14=_0x366578[_0x1794d5(0x141)][_0x1794d5(0x11a)];_0xeff9f5['add'](_0x422f14);break;}}}),B(this[_0x3a4e96(0x13e)],_0xeff9f5);}));}[_0x3f9f96(0x147)](){const _0x393365=_0x3f9f96;this[_0x393365(0x116)](this['_commentService']['commentUpdate$'][_0x393365(0x103)](async _0x17e56c=>{const _0x4b208e=_0x393365;var _0x34a7c2,_0x594bb9,_0x332337,_0x52bfad;const _0x692bbe=(_0x34a7c2=this[_0x4b208e(0x129)][_0x4b208e(0x123)](_0x17e56c[_0x4b208e(0x132)])[_0x4b208e(0x131)](_0x292047=>_0x292047['threadId']===_0x17e56c[_0x4b208e(0x10f)]))==null?void 0x0:_0x34a7c2[_0x4b208e(0x104)];if(!_0x692bbe)return;const {unitId:_0x6e28a9,subUnitId:_0x5d8741}=_0x692bbe;switch(_0x17e56c[_0x4b208e(0x135)]&&this[_0x4b208e(0x162)][_0x4b208e(0xfc)](_0x17e56c[_0x4b208e(0x135)]),_0x17e56c[_0x4b208e(0x110)]){case v[_0x4b208e(0x10e)]:break;case v[_0x4b208e(0x133)]:{this[_0x4b208e(0x129)][_0x4b208e(0x148)](_0x6e28a9,_0x5d8741,{'unitId':_0x6e28a9,'subUnitId':_0x5d8741,'ref':'','id':_0x17e56c[_0x4b208e(0x12a)],'dT':y(+_0x17e56c[_0x4b208e(0x13d)]),'threadId':_0x17e56c[_0x4b208e(0x10f)],'personId':(_0x332337=(_0x594bb9=_0x17e56c[_0x4b208e(0x135)])==null?void 0x0:_0x594bb9[_0x4b208e(0x15e)])!=null?_0x332337:_0x17e56c[_0x4b208e(0x137)],'text':JSON[_0x4b208e(0x14a)](_0x17e56c['content']),'parentId':_0x692bbe['id']});break;}case v[_0x4b208e(0x155)]:{const _0x24a3dd=this[_0x4b208e(0x129)][_0x4b208e(0x13a)](_0x6e28a9,_0x5d8741,_0x17e56c[_0x4b208e(0x12a)]);_0x24a3dd&&_0x24a3dd[_0x4b208e(0x11f)]&&this[_0x4b208e(0x129)][_0x4b208e(0x126)](_0x6e28a9,_0x5d8741,_0x17e56c[_0x4b208e(0x12a)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x4b208e(0x120)](_0x6e28a9,_0x5d8741,{'commentId':_0x17e56c['replyId'],'text':JSON[_0x4b208e(0x14a)](_0x17e56c[_0x4b208e(0xff)])});break;}case v[_0x4b208e(0x108)]:{const _0x35fba2=(_0x52bfad=this[_0x4b208e(0x129)]['getUnit'](_0x17e56c['unitId'])[_0x4b208e(0x131)](_0x34b7cd=>_0x34b7cd[_0x4b208e(0x10f)]===_0x17e56c['threadId']))==null?void 0x0:_0x52bfad['root'];_0x35fba2&&this[_0x4b208e(0x129)]['resolveComment'](_0x6e28a9,_0x5d8741,_0x35fba2['id'],_0x17e56c[_0x4b208e(0x160)]===I[_0x4b208e(0x124)]);break;}}}));}};_=V([p(0x0,_0x106498(_0x1ef5d3)),p(0x1,_0x106498(_0x575b16)),p(0x2,_0x106498(_0xfa36f5)),p(0x3,_0x106498(_0x6af6db))],_);const z=_0x3f9f96(0x127),O={};function _0x35bf(_0x519cf0,_0x3aaeb3){const _0x4b6fa7=_0x4b6f();return _0x35bf=function(_0x35bfc9,_0x10ee73){_0x35bfc9=_0x35bfc9-0xfb;let _0x1bdde5=_0x4b6fa7[_0x35bfc9];return _0x1bdde5;},_0x35bf(_0x519cf0,_0x3aaeb3);}var k=Object[_0x3f9f96(0x156)],Q=(_0x4f0afe,_0x478101,_0x11aa72,_0x2a7ff8)=>{for(var _0x5f1415=_0x2a7ff8>0x1?void 0x0:_0x2a7ff8?k(_0x478101,_0x11aa72):_0x478101,_0x4f5d51=_0x4f0afe['length']-0x1,_0x5d35ec;_0x4f5d51>=0x0;_0x4f5d51--)(_0x5d35ec=_0x4f0afe[_0x4f5d51])&&(_0x5f1415=_0x5d35ec(_0x5f1415)||_0x5f1415);return _0x5f1415;},b=(_0x604f68,_0x17af1b)=>(_0x305b1a,_0xad1443)=>_0x17af1b(_0x305b1a,_0xad1443,_0x604f68);function X(_0x4aff59,_0x2bb473){const _0x430678=_0x3f9f96,_0x323ed7=_0x4aff59[_0x430678(0x138)][0x0];return{..._0x2bb473,'id':_0x323ed7[_0x430678(0x12a)],'resolved':_0x4aff59['solved']===0x1,'dT':y(_0x323ed7['createTimestamp']),'personId':_0x323ed7[_0x430678(0x137)],'threadId':_0x323ed7[_0x430678(0x10f)]};}function ee(_0x1a14f2,_0x270291,_0x222bb6){const _0x84ff88=_0x3f9f96;var _0x3a354e,_0x51a195;if(((_0x51a195=(_0x3a354e=_0x1a14f2==null?void 0x0:_0x1a14f2['replies'])==null?void 0x0:_0x3a354e[_0x84ff88(0x149)])!=null?_0x51a195:0x0)>0x0){const _0x21fe27=(_0x5761ac,_0x4e313d)=>({'id':_0x5761ac[_0x84ff88(0x12a)],'threadId':_0x5761ac[_0x84ff88(0x10f)],'dT':y(_0x5761ac['createTimestamp']),'personId':_0x5761ac[_0x84ff88(0x137)],'resolved':_0x1a14f2[_0x84ff88(0x160)]===I[_0x84ff88(0x124)],'unitId':_0x270291,'subUnitId':_0x222bb6,'text':JSON[_0x84ff88(0x14a)](_0x5761ac[_0x84ff88(0xff)]),'parentId':_0x4e313d}),_0xc2c5b8=_0x21fe27(_0x1a14f2[_0x84ff88(0x138)][0x0]);return{..._0xc2c5b8,'children':_0x1a14f2[_0x84ff88(0x138)]['slice'](0x1)[_0x84ff88(0x157)](_0x177817=>_0x21fe27(_0x177817,_0xc2c5b8['id']))};}return null;}let S=class{constructor(_0x120c89,_0x3f9b7b,_0x54df27){const _0x416dfd=_0x3f9f96;this['_httpService']=_0x120c89,this[_0x416dfd(0x162)]=_0x3f9b7b,this[_0x416dfd(0x14c)]=_0x54df27;}async['addComment'](_0x2b887a){const _0x5c41d6=_0x3f9f96;var _0x1f0f75,_0x573e74;const {parentId:_0x466186,unitId:_0x20b29f,text:_0x52db9e,threadId:_0x512bd6}=_0x2b887a,_0x2bb83e=(_0x573e74=(_0x1f0f75=_0x52db9e[_0x5c41d6(0x15a)])==null?void 0x0:_0x1f0f75[_0x5c41d6(0x10d)](_0x18ad90=>_0x18ad90[_0x5c41d6(0x12d)]===_0x131a19['COMMENT'])['map'](_0x252ce4=>_0x252ce4['rangeId']))!=null?_0x573e74:[],_0x311710=JSON['stringify'](_0x52db9e),_0x1404e6=(await this[_0x5c41d6(0x14c)]['requireSession'](_0x20b29f))[_0x5c41d6(0xfd)]();if(_0x466186){const _0x2a5aa2={'memberId':_0x1404e6,'unitId':_0x20b29f,'content':_0x311710,'mention':_0x2bb83e,'threadId':_0x512bd6},_0x206387=(await this['_httpService'][_0x5c41d6(0x159)](_0x5c41d6(0x112)+_0x20b29f+_0x5c41d6(0x146),{'body':_0x2a5aa2}))[_0x5c41d6(0x14f)][_0x5c41d6(0x11c)];return{..._0x2b887a,'id':_0x206387[_0x5c41d6(0x12a)],'dT':_0x2d795a(+_0x206387[_0x5c41d6(0x13d)])[_0x5c41d6(0xfe)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x206387[_0x5c41d6(0x137)]};}else{const _0x55e077={'memberId':_0x1404e6,'unitId':_0x20b29f,'content':_0x311710,'mention':_0x2bb83e},_0xffd0f1=await this[_0x5c41d6(0x12c)][_0x5c41d6(0x159)](_0x5c41d6(0x112)+_0x20b29f+_0x5c41d6(0x14e),{'body':_0x55e077});return X(_0xffd0f1[_0x5c41d6(0x14f)][_0x5c41d6(0x119)],_0x2b887a);}}async[_0x3f9f96(0x120)](_0x4d7588){const _0x4f6402=_0x3f9f96;var _0x2ee8cb,_0x3d5109;const {text:_0x8861fa,unitId:_0x47bd2e}=_0x4d7588,_0x14648d=(_0x3d5109=(_0x2ee8cb=_0x8861fa[_0x4f6402(0x15a)])==null?void 0x0:_0x2ee8cb[_0x4f6402(0x10d)](_0xaf7ab0=>_0xaf7ab0['rangeType']===_0x131a19[_0x4f6402(0x130)])[_0x4f6402(0x157)](_0x4855e9=>_0x4855e9[_0x4f6402(0x152)]))!=null?_0x3d5109:[],_0x1640d1=JSON[_0x4f6402(0x140)](_0x8861fa),_0x59f3df=_0x4d7588[_0x4f6402(0x10f)],_0x1de97b=_0x4d7588['id'],_0x257fd5={'memberId':(await this[_0x4f6402(0x14c)]['requireSession'](_0x47bd2e))[_0x4f6402(0xfd)](),'unitId':_0x47bd2e,'threadId':_0x59f3df,'mention':_0x14648d,'content':_0x1640d1,'replyId':_0x1de97b},_0x29dd12=await this[_0x4f6402(0x12c)][_0x4f6402(0x159)](_0x4f6402(0x112)+_0x47bd2e+_0x4f6402(0x15f),{'body':_0x257fd5});return!_0x29dd12['body'][_0x4f6402(0x109)]||_0x29dd12[_0x4f6402(0x14f)]['error']['code']===0x1;}async[_0x3f9f96(0x10c)](_0x4a2e34){const _0x2b3cc6=_0x3f9f96,{unitId:_0x1ad85f}=_0x4a2e34,_0x1ed428=_0x4a2e34[_0x2b3cc6(0x10f)],_0x266974={'memberId':this['_userService']['getCurrentUser']()[_0x2b3cc6(0x15e)],'unitId':_0x1ad85f,'threadId':_0x1ed428,'solved':_0x4a2e34[_0x2b3cc6(0x10b)]?I[_0x2b3cc6(0x124)]:I[_0x2b3cc6(0x139)]},_0x443f8c=await this[_0x2b3cc6(0x12c)][_0x2b3cc6(0x159)](_0x2b3cc6(0x112)+_0x1ad85f+_0x2b3cc6(0x118),{'body':_0x266974});return!_0x443f8c[_0x2b3cc6(0x14f)][_0x2b3cc6(0x109)]||_0x443f8c[_0x2b3cc6(0x14f)][_0x2b3cc6(0x109)][_0x2b3cc6(0x105)]===0x1;}async['deleteComment'](_0x942dc7,_0x497d65,_0x491ad3,_0x584d23){const _0x2dbb32=_0x3f9f96,_0x2ee9ab={'memberId':(await this[_0x2dbb32(0x14c)][_0x2dbb32(0x117)](_0x942dc7))['getMemberID'](),'threadId':_0x491ad3,'replyId':_0x584d23,'unitId':_0x942dc7},_0x383688=await this[_0x2dbb32(0x12c)][_0x2dbb32(0x159)](_0x2dbb32(0x112)+_0x942dc7+'/delete',{'body':_0x2ee9ab});return!_0x383688[_0x2dbb32(0x14f)]['error']||_0x383688[_0x2dbb32(0x14f)][_0x2dbb32(0x109)][_0x2dbb32(0x105)]===0x1;}async[_0x3f9f96(0x150)](_0x5f188c,_0x4739ec,_0x2094eb){const _0x2d5a8d=_0x3f9f96,_0x3db022={'unitId':_0x5f188c,'threadId':_0x2094eb},_0x5aa689=await this[_0x2d5a8d(0x12c)][_0x2d5a8d(0x159)](_0x2d5a8d(0x112)+_0x5f188c+'/list',{'body':_0x3db022}),_0x2ad918=_0x2094eb[_0x2d5a8d(0x157)](_0x3beb70=>ee(_0x5aa689[_0x2d5a8d(0x14f)][_0x2d5a8d(0x142)][_0x3beb70],_0x5f188c,_0x4739ec))[_0x2d5a8d(0x10d)](Boolean);return Object[_0x2d5a8d(0x11b)](_0x5aa689[_0x2d5a8d(0x14f)][_0x2d5a8d(0x106)])['forEach'](_0x1e05eb=>{const _0x10e2ab=_0x2d5a8d;this[_0x10e2ab(0x162)][_0x10e2ab(0xfc)](_0x1e05eb);}),_0x2ad918;}['saveCommentToSnapshot'](_0x1e9932){const _0x22fe60=_0x3f9f96;return{'id':_0x1e9932['id'],'threadId':_0x1e9932[_0x22fe60(0x10f)],'ref':_0x1e9932[_0x22fe60(0x134)]};}};S=Q([b(0x0,_0x106498(_0x4158c8)),b(0x1,_0x106498(_0xfa36f5)),b(0x2,_0x106498(_0x47a7e9))],S);var re=Object[_0x3f9f96(0x156)],te=(_0x4f2066,_0x45df4d,_0x2dd190,_0x133929)=>{const _0x16c0db=_0x3f9f96;for(var _0x59424c=_0x133929>0x1?void 0x0:_0x133929?re(_0x45df4d,_0x2dd190):_0x45df4d,_0x11e328=_0x4f2066[_0x16c0db(0x149)]-0x1,_0x35f23d;_0x11e328>=0x0;_0x11e328--)(_0x35f23d=_0x4f2066[_0x11e328])&&(_0x59424c=_0x35f23d(_0x59424c)||_0x59424c);return _0x59424c;},M=(_0x7c4f2a,_0x424246)=>(_0x2fe2ca,_0x3e5092)=>_0x424246(_0x2fe2ca,_0x3e5092,_0x7c4f2a);function _0x4b6f(){const _0x167859=['resolved','resolveComment','filter','Add','threadId','type','delete','/universer-api/comment/unit/','syncUpdateMutationToColla','getUser','4xmyNkg','disposeWithMe','requireSession','/solved','comment','personId','values','reply','UNIVER_UNKNOWN','onStarting','parentId','updateComment','_threadCommentDataSourceService','_config','getUnit','Solved','Unknown','deleteComment','thread-comment-data-source.config','defineProperty','_threadCommentModel','replyId','commentUpdate$','_httpService','rangeType','1103273hKNkqS','add','COMMENT','find','unitId','Reply','ref','user','_threadCommentDataSource','userId','replies','OpenOrReOpen','getComment','_configService','_commentService','createTimestamp','_injector','get','stringify','payload','comments','YYYY/MM/DD\x20HH:mm','866688vLLiYS','forEach','/reply','_init','addComment','length','parse','Edit','_sessionService','setConfig','/add','body','listComments','26383MgJYkS','rangeId','pipe','UNRECOGNIZED','Delete','getOwnPropertyDescriptor','map','756kRnsdI','post','customRanges','1833099dKnhOF','15NFgOtZ','_initUserSync','userID','/edit','solved','dataSource','_userService','300aiwELH','/universer-api/user/list','addUser','getMemberID','format','content','2248KSAOPb','1627780EYmikn','_initDataSource','subscribe','root','code','users','356378PLzKKa','Solve','error','156393hdCxpz'];_0x4b6f=function(){return _0x167859;};return _0x4b6f();}let f=class extends _0x4eb02a{constructor(_0x543b9c,_0x4585b9){const _0x11dd97=_0x3f9f96;super(),this[_0x11dd97(0x121)]=_0x543b9c,this['_threadCommentDataSource']=_0x4585b9,this['_initDataSource']();}[_0x3f9f96(0x102)](){const _0x572ae6=_0x3f9f96;this[_0x572ae6(0x121)][_0x572ae6(0x161)]=this[_0x572ae6(0x136)],this[_0x572ae6(0x121)][_0x572ae6(0x113)]=!0x1;}};f=te([M(0x0,_0x437863),M(0x1,_0x106498(S))],f);var se=Object[_0x3f9f96(0x128)],oe=Object[_0x3f9f96(0x156)],ne=(_0x1dad90,_0x625bd5,_0x786d3a)=>_0x625bd5 in _0x1dad90?se(_0x1dad90,_0x625bd5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x786d3a}):_0x1dad90[_0x625bd5]=_0x786d3a,ie=(_0x3d3db7,_0x57b2d4,_0x49df4b,_0x381f46)=>{for(var _0x1adcb6=_0x381f46>0x1?void 0x0:_0x381f46?oe(_0x57b2d4,_0x49df4b):_0x57b2d4,_0xc46f1=_0x3d3db7['length']-0x1,_0x1c0e29;_0xc46f1>=0x0;_0xc46f1--)(_0x1c0e29=_0x3d3db7[_0xc46f1])&&(_0x1adcb6=_0x1c0e29(_0x1adcb6)||_0x1adcb6);return _0x1adcb6;},N=(_0x405ea8,_0x245d32)=>(_0x4dfe64,_0x903518)=>_0x245d32(_0x4dfe64,_0x903518,_0x405ea8),$=(_0x314c4f,_0x3eedd5,_0x401af9)=>ne(_0x314c4f,typeof _0x3eedd5!='symbol'?_0x3eedd5+'':_0x3eedd5,_0x401af9);let g=class extends _0xa28747{constructor(_0x3eaea6=O,_0x58454d,_0x288dfe){const _0x43837d=_0x3f9f96;super(),this[_0x43837d(0x122)]=_0x3eaea6,this['_injector']=_0x58454d,this[_0x43837d(0x13b)]=_0x288dfe;const {..._0x152b24}=_0x2356f8({},O,this['_config']);this[_0x43837d(0x13b)][_0x43837d(0x14d)](z,_0x152b24);}[_0x3f9f96(0x11e)](){const _0x182246=_0x3f9f96;[[S],[f],[_]][_0x182246(0x145)](_0x26e1ec=>{const _0x27b561=_0x182246;this['_injector'][_0x27b561(0x12f)](_0x26e1ec);});}['onReady'](){const _0x1b22ff=_0x3f9f96;this[_0x1b22ff(0x13e)][_0x1b22ff(0x13f)](f),this[_0x1b22ff(0x13e)][_0x1b22ff(0x13f)](_);}};$(g,'pluginName',W),$(g,_0x3f9f96(0x110),_0x3c5c89[_0x3f9f96(0x11d)]),g=ie([_0x4910a4(_0x5e08b1,_0x4f29e8,_0x2c7508),N(0x1,_0x106498(_0x6af6db)),N(0x2,_0x451b01)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x169658,_0x5a6e5e){const _0x3054e5=_0x1f1a,_0x3c56a8=_0x169658();while(!![]){try{const _0x57c3d5=-parseInt(_0x3054e5(0x259))/0x1*(-parseInt(_0x3054e5(0x24f))/0x2)+-parseInt(_0x3054e5(0x1f0))/0x3+parseInt(_0x3054e5(0x1e9))/0x4+parseInt(_0x3054e5(0x233))/0x5*(parseInt(_0x3054e5(0x24c))/0x6)+parseInt(_0x3054e5(0x229))/0x7+parseInt(_0x3054e5(0x22c))/0x8*(parseInt(_0x3054e5(0x21c))/0x9)+-parseInt(_0x3054e5(0x1e8))/0xa*(parseInt(_0x3054e5(0x1fc))/0xb);if(_0x57c3d5===_0x5a6e5e)break;else _0x3c56a8['push'](_0x3c56a8['shift']());}catch(_0x3ca8c8){_0x3c56a8['push'](_0x3c56a8['shift']());}}}(_0x488a,0xd00a2),function(_0x15c9a2,_0x5dd36e){const _0x97bfa9=_0x1f1a;typeof exports==_0x97bfa9(0x256)&&typeof module<'u'?_0x5dd36e(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[_0x97bfa9(0x1f6)]?define([_0x97bfa9(0x261),_0x97bfa9(0x23d),'@univerjs-pro/license',_0x97bfa9(0x204),_0x97bfa9(0x214),_0x97bfa9(0x216),_0x97bfa9(0x1f2),_0x97bfa9(0x23b)],_0x5dd36e):(_0x15c9a2=typeof globalThis<'u'?globalThis:_0x15c9a2||self,_0x5dd36e(_0x15c9a2['UniverProThreadCommentDatasource']={},_0x15c9a2[_0x97bfa9(0x212)],_0x15c9a2[_0x97bfa9(0x221)],_0x15c9a2['UniverCore'],_0x15c9a2['UniverThreadCommentUi'],_0x15c9a2[_0x97bfa9(0x220)],_0x15c9a2[_0x97bfa9(0x1f2)],_0x15c9a2[_0x97bfa9(0x249)]));}(this,function(_0x27316b,_0x4e7d77,_0x175f22,_0x113a6f,_0x51cb85,_0x139ece,_0xe51048,_0x2ffd6d){'use strict';const _0x307496=_0x1f1a;const _0x14d825='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x159c99=(_0x10891c=>(_0x10891c[_0x10891c['OpenOrReOpen']=0x0]=_0x307496(0x25b),_0x10891c[_0x10891c[_0x307496(0x23f)]=0x1]=_0x307496(0x23f),_0x10891c[_0x10891c[_0x307496(0x1f8)]=-0x1]=_0x307496(0x1f8),_0x10891c))(_0x159c99||{}),_0x4791ef=(_0xfe2e45=>(_0xfe2e45[_0xfe2e45[_0x307496(0x25c)]=0x0]=_0x307496(0x25c),_0xfe2e45[_0xfe2e45[_0x307496(0x21a)]=0x1]=_0x307496(0x21a),_0xfe2e45[_0xfe2e45[_0x307496(0x206)]=0x2]=_0x307496(0x206),_0xfe2e45[_0xfe2e45[_0x307496(0x255)]=0x3]='Edit',_0xfe2e45[_0xfe2e45[_0x307496(0x213)]=0x4]=_0x307496(0x213),_0xfe2e45[_0xfe2e45['Solve']=0x5]='Solve',_0xfe2e45[_0xfe2e45[_0x307496(0x1f8)]=-0x1]='UNRECOGNIZED',_0xfe2e45))(_0x4791ef||{});const _0x29c37c=_0xca725a=>_0x113a6f['dayjs'](new Date(+_0xca725a))[_0x307496(0x22b)](_0x307496(0x203)),_0x4ef2ad=async(_0x314404,_0x291e29)=>{const _0x57562a=_0x307496,_0x4e5248=_0x314404[_0x57562a(0x218)](_0x113a6f[_0x57562a(0x263)]),_0x45306b=_0x314404[_0x57562a(0x218)](_0x2ffd6d[_0x57562a(0x228)]);_0x291e29[_0x57562a(0x264)](_0x5962bc=>{const _0x453352=_0x57562a;_0x4e5248[_0x453352(0x234)](_0x5962bc)&&_0x291e29['delete'](_0x5962bc);}),_0x291e29[_0x57562a(0x22d)]&&(await _0x45306b[_0x57562a(0x218)](_0x57562a(0x22a),{'params':{'userIDs':[..._0x291e29]}}))[_0x57562a(0x239)][_0x57562a(0x247)]['forEach'](_0x56e0ba=>{const _0x36e1a7=_0x57562a;_0x56e0ba&&_0x4e5248[_0x36e1a7(0x230)](_0x56e0ba);});};var _0x6b946f=Object[_0x307496(0x20d)],_0x51857a=(_0x5b199f,_0x386d19,_0x47b03f,_0xb65802)=>{const _0x1f1e1d=_0x307496;for(var _0x2a1ce5=_0xb65802>0x1?void 0x0:_0xb65802?_0x6b946f(_0x386d19,_0x47b03f):_0x386d19,_0x5ad410=_0x5b199f[_0x1f1e1d(0x267)]-0x1,_0x1761ec;_0x5ad410>=0x0;_0x5ad410--)(_0x1761ec=_0x5b199f[_0x5ad410])&&(_0x2a1ce5=_0x1761ec(_0x2a1ce5)||_0x2a1ce5);return _0x2a1ce5;},_0x59f3ab=(_0x16933b,_0x3cce4b)=>(_0x297cd8,_0x3f1f7e)=>_0x3cce4b(_0x297cd8,_0x3f1f7e,_0x16933b);let _0x2a4ebc=class extends _0x113a6f[_0x307496(0x1e1)]{constructor(_0x3aee05,_0x1a37e6,_0x39fc88,_0x4ebbee){const _0x18faab=_0x307496;super(),this['_commentService']=_0x3aee05,this[_0x18faab(0x235)]=_0x1a37e6,this[_0x18faab(0x269)]=_0x39fc88,this[_0x18faab(0x265)]=_0x4ebbee,this[_0x18faab(0x201)](),this['_initUserSync']();}['_initUserSync'](){const _0x3ec118=_0x307496;this['disposeWithMe'](this[_0x3ec118(0x235)][_0x3ec118(0x209)][_0x3ec118(0x1fb)](_0xe51048[_0x3ec118(0x20b)](0x10))[_0x3ec118(0x223)](_0x446936=>{const _0x11bbd8=_0x3ec118,_0x5380ae=new Set();_0x446936[_0x11bbd8(0x264)](_0x3d9746=>{const _0x339f16=_0x11bbd8;switch(_0x3d9746[_0x339f16(0x242)]){case'add':{const _0x40622a=_0x3d9746[_0x339f16(0x20f)]['personId'];_0x5380ae[_0x339f16(0x248)](_0x40622a);break;}}}),_0x4ef2ad(this[_0x11bbd8(0x265)],_0x5380ae);}));}[_0x307496(0x201)](){const _0x1821ec=_0x307496;this[_0x1821ec(0x20c)](this[_0x1821ec(0x227)][_0x1821ec(0x209)]['subscribe'](async _0x285c7a=>{const _0x2dce93=_0x1821ec;var _0x5c17a1,_0x994e53,_0x344c6d,_0x1b3efb;const _0x475623=(_0x5c17a1=this[_0x2dce93(0x235)][_0x2dce93(0x1ec)](_0x285c7a[_0x2dce93(0x1e4)])['find'](_0x58a905=>_0x58a905[_0x2dce93(0x1e5)]===_0x285c7a['threadId']))==null?void 0x0:_0x5c17a1['root'];if(!_0x475623)return;const {unitId:_0x568726,subUnitId:_0x1611ff}=_0x475623;switch(_0x285c7a[_0x2dce93(0x23e)]&&this['_userService'][_0x2dce93(0x230)](_0x285c7a['user']),_0x285c7a[_0x2dce93(0x242)]){case _0x4791ef[_0x2dce93(0x21a)]:break;case _0x4791ef[_0x2dce93(0x206)]:{this['_threadCommentModel'][_0x2dce93(0x1f4)](_0x568726,_0x1611ff,{'unitId':_0x568726,'subUnitId':_0x1611ff,'ref':'','id':_0x285c7a[_0x2dce93(0x1ef)],'dT':_0x29c37c(+_0x285c7a[_0x2dce93(0x25f)]),'threadId':_0x285c7a[_0x2dce93(0x1e5)],'personId':(_0x344c6d=(_0x994e53=_0x285c7a[_0x2dce93(0x23e)])==null?void 0x0:_0x994e53['userID'])!=null?_0x344c6d:_0x285c7a[_0x2dce93(0x1fe)],'text':JSON['parse'](_0x285c7a[_0x2dce93(0x1e3)]),'parentId':_0x475623['id']});break;}case _0x4791ef[_0x2dce93(0x213)]:{const _0x2cb91e=this['_threadCommentModel'][_0x2dce93(0x207)](_0x568726,_0x1611ff,_0x285c7a[_0x2dce93(0x1ef)]);_0x2cb91e&&_0x2cb91e[_0x2dce93(0x268)]&&this[_0x2dce93(0x235)][_0x2dce93(0x1ff)](_0x568726,_0x1611ff,_0x285c7a['replyId']);break;}case _0x4791ef[_0x2dce93(0x255)]:{this[_0x2dce93(0x235)][_0x2dce93(0x252)](_0x568726,_0x1611ff,{'commentId':_0x285c7a['replyId'],'text':JSON['parse'](_0x285c7a['content'])});break;}case _0x4791ef[_0x2dce93(0x1e7)]:{const _0x4121f3=(_0x1b3efb=this[_0x2dce93(0x235)]['getUnit'](_0x285c7a[_0x2dce93(0x1e4)])[_0x2dce93(0x24b)](_0x477cc6=>_0x477cc6[_0x2dce93(0x1e5)]===_0x285c7a[_0x2dce93(0x1e5)]))==null?void 0x0:_0x1b3efb[_0x2dce93(0x25e)];_0x4121f3&&this[_0x2dce93(0x235)][_0x2dce93(0x20e)](_0x568726,_0x1611ff,_0x4121f3['id'],_0x285c7a['solved']===_0x159c99[_0x2dce93(0x23f)]);break;}}}));}};_0x2a4ebc=_0x51857a([_0x59f3ab(0x0,_0x113a6f['Inject'](_0x4e7d77[_0x307496(0x1eb)])),_0x59f3ab(0x1,_0x113a6f[_0x307496(0x1f1)](_0x139ece[_0x307496(0x260)])),_0x59f3ab(0x2,_0x113a6f[_0x307496(0x1f1)](_0x113a6f[_0x307496(0x263)])),_0x59f3ab(0x3,_0x113a6f[_0x307496(0x1f1)](_0x113a6f[_0x307496(0x1fd)]))],_0x2a4ebc);const _0x19bbdf=_0x307496(0x202),_0x1447e3={};var _0x540eb3=Object[_0x307496(0x20d)],_0x5062b4=(_0x17c13e,_0x8a5971,_0xdc11e9,_0x10a775)=>{const _0x199a79=_0x307496;for(var _0x67f005=_0x10a775>0x1?void 0x0:_0x10a775?_0x540eb3(_0x8a5971,_0xdc11e9):_0x8a5971,_0x3a2ab8=_0x17c13e[_0x199a79(0x267)]-0x1,_0x22f9cf;_0x3a2ab8>=0x0;_0x3a2ab8--)(_0x22f9cf=_0x17c13e[_0x3a2ab8])&&(_0x67f005=_0x22f9cf(_0x67f005)||_0x67f005);return _0x67f005;},_0x37acc2=(_0x22d4ed,_0x46a6d8)=>(_0x57ebfb,_0x428a97)=>_0x46a6d8(_0x57ebfb,_0x428a97,_0x22d4ed);function _0x5d41f3(_0x54f4dd,_0x1db35a){const _0x47d418=_0x307496,_0x17137d=_0x54f4dd['replies'][0x0];return{..._0x1db35a,'id':_0x17137d[_0x47d418(0x1ef)],'resolved':_0x54f4dd['solved']===0x1,'dT':_0x29c37c(_0x17137d[_0x47d418(0x25f)]),'personId':_0x17137d[_0x47d418(0x1fe)],'threadId':_0x17137d[_0x47d418(0x1e5)]};}function _0x504917(_0x33c942,_0x3d69fa,_0x5920c5){const _0x1c69e2=_0x307496;var _0x11dc21,_0x819643;if(((_0x819643=(_0x11dc21=_0x33c942==null?void 0x0:_0x33c942[_0x1c69e2(0x232)])==null?void 0x0:_0x11dc21[_0x1c69e2(0x267)])!=null?_0x819643:0x0)>0x0){const _0x3cc719=(_0x21615e,_0x3147e2)=>({'id':_0x21615e[_0x1c69e2(0x1ef)],'threadId':_0x21615e['threadId'],'dT':_0x29c37c(_0x21615e[_0x1c69e2(0x25f)]),'personId':_0x21615e[_0x1c69e2(0x1fe)],'resolved':_0x33c942['solved']===_0x159c99[_0x1c69e2(0x23f)],'unitId':_0x3d69fa,'subUnitId':_0x5920c5,'text':JSON['parse'](_0x21615e['content']),'parentId':_0x3147e2}),_0x66a807=_0x3cc719(_0x33c942[_0x1c69e2(0x232)][0x0]);return{..._0x66a807,'children':_0x33c942[_0x1c69e2(0x232)][_0x1c69e2(0x22f)](0x1)[_0x1c69e2(0x250)](_0x17ff36=>_0x3cc719(_0x17ff36,_0x66a807['id']))};}return null;}let _0x4bfdb5=class{constructor(_0x3b5cf6,_0x5729cb,_0x2c53e9){const _0x3e0e21=_0x307496;this[_0x3e0e21(0x266)]=_0x3b5cf6,this[_0x3e0e21(0x269)]=_0x5729cb,this['_sessionService']=_0x2c53e9;}async[_0x307496(0x1f4)](_0x58ad0e){const _0x510bab=_0x307496;var _0x42bb1b,_0x9288cf;const {parentId:_0x229301,unitId:_0x58cb94,text:_0x19a052,threadId:_0x526229}=_0x58ad0e,_0x473e0a=(_0x9288cf=(_0x42bb1b=_0x19a052['customRanges'])==null?void 0x0:_0x42bb1b[_0x510bab(0x208)](_0x5f45d1=>_0x5f45d1[_0x510bab(0x237)]===_0x113a6f['CustomRangeType'][_0x510bab(0x222)])[_0x510bab(0x250)](_0x51a839=>_0x51a839['rangeId']))!=null?_0x9288cf:[],_0x1cc11d=JSON['stringify'](_0x19a052),_0x1c0086=(await this[_0x510bab(0x24e)][_0x510bab(0x1ee)](_0x58cb94))['getMemberID']();if(_0x229301){const _0x46fe43={'memberId':_0x1c0086,'unitId':_0x58cb94,'content':_0x1cc11d,'mention':_0x473e0a,'threadId':_0x526229},_0x58a5c2=(await this['_httpService'][_0x510bab(0x244)](_0x510bab(0x251)+_0x58cb94+_0x510bab(0x226),{'body':_0x46fe43}))[_0x510bab(0x239)][_0x510bab(0x236)];return{..._0x58ad0e,'id':_0x58a5c2[_0x510bab(0x1ef)],'dT':_0x113a6f['dayjs'](+_0x58a5c2['createTimestamp'])[_0x510bab(0x22b)](_0x510bab(0x203)),'personId':_0x58a5c2['userId']};}else{const _0xbf3d6={'memberId':_0x1c0086,'unitId':_0x58cb94,'content':_0x1cc11d,'mention':_0x473e0a},_0x393e0f=await this[_0x510bab(0x266)][_0x510bab(0x244)](_0x510bab(0x251)+_0x58cb94+'/add',{'body':_0xbf3d6});return _0x5d41f3(_0x393e0f['body'][_0x510bab(0x238)],_0x58ad0e);}}async[_0x307496(0x252)](_0x5778c9){const _0x527515=_0x307496;var _0x5c5fcd,_0x496950;const {text:_0x141d99,unitId:_0x2a0c2e}=_0x5778c9,_0x144221=(_0x496950=(_0x5c5fcd=_0x141d99[_0x527515(0x211)])==null?void 0x0:_0x5c5fcd[_0x527515(0x208)](_0x212aa1=>_0x212aa1[_0x527515(0x237)]===_0x113a6f[_0x527515(0x25a)][_0x527515(0x222)])[_0x527515(0x250)](_0x487fbe=>_0x487fbe[_0x527515(0x21f)]))!=null?_0x496950:[],_0x46254b=JSON[_0x527515(0x257)](_0x141d99),_0x12fe3e=_0x5778c9[_0x527515(0x1e5)],_0x5794b7=_0x5778c9['id'],_0x5068d6={'memberId':(await this['_sessionService'][_0x527515(0x1ee)](_0x2a0c2e))[_0x527515(0x262)](),'unitId':_0x2a0c2e,'threadId':_0x12fe3e,'mention':_0x144221,'content':_0x46254b,'replyId':_0x5794b7},_0x30904f=await this[_0x527515(0x266)]['post'](_0x527515(0x251)+_0x2a0c2e+_0x527515(0x24a),{'body':_0x5068d6});return!_0x30904f[_0x527515(0x239)][_0x527515(0x20a)]||_0x30904f[_0x527515(0x239)]['error']['code']===0x1;}async[_0x307496(0x20e)](_0x2aea6a){const _0x4169e6=_0x307496,{unitId:_0x213b67}=_0x2aea6a,_0x47cc1a=_0x2aea6a[_0x4169e6(0x1e5)],_0x216d01={'memberId':this[_0x4169e6(0x269)][_0x4169e6(0x224)]()[_0x4169e6(0x254)],'unitId':_0x213b67,'threadId':_0x47cc1a,'solved':_0x2aea6a['resolved']?_0x159c99[_0x4169e6(0x23f)]:_0x159c99[_0x4169e6(0x25b)]},_0x295107=await this[_0x4169e6(0x266)][_0x4169e6(0x244)](_0x4169e6(0x251)+_0x213b67+'/solved',{'body':_0x216d01});return!_0x295107[_0x4169e6(0x239)][_0x4169e6(0x20a)]||_0x295107[_0x4169e6(0x239)][_0x4169e6(0x20a)][_0x4169e6(0x253)]===0x1;}async[_0x307496(0x1ff)](_0x9eebcc,_0x3bea1c,_0x38ece3,_0x470a73){const _0xb99519=_0x307496,_0x3c7dde={'memberId':(await this['_sessionService'][_0xb99519(0x1ee)](_0x9eebcc))[_0xb99519(0x262)](),'threadId':_0x38ece3,'replyId':_0x470a73,'unitId':_0x9eebcc},_0x44dc1b=await this[_0xb99519(0x266)][_0xb99519(0x244)](_0xb99519(0x251)+_0x9eebcc+'/delete',{'body':_0x3c7dde});return!_0x44dc1b[_0xb99519(0x239)][_0xb99519(0x20a)]||_0x44dc1b[_0xb99519(0x239)][_0xb99519(0x20a)][_0xb99519(0x253)]===0x1;}async[_0x307496(0x1e2)](_0x25a7fe,_0x3821a7,_0x3456fe){const _0x2b7597=_0x307496,_0x1ce170={'unitId':_0x25a7fe,'threadId':_0x3456fe},_0x3d129a=await this[_0x2b7597(0x266)][_0x2b7597(0x244)](_0x2b7597(0x251)+_0x25a7fe+_0x2b7597(0x21d),{'body':_0x1ce170}),_0x588e9b=_0x3456fe[_0x2b7597(0x250)](_0x25e25d=>_0x504917(_0x3d129a[_0x2b7597(0x239)][_0x2b7597(0x23c)][_0x25e25d],_0x25a7fe,_0x3821a7))[_0x2b7597(0x208)](Boolean);return Object[_0x2b7597(0x1e6)](_0x3d129a[_0x2b7597(0x239)]['users'])[_0x2b7597(0x264)](_0x50b602=>{const _0x30ea38=_0x2b7597;this[_0x30ea38(0x269)][_0x30ea38(0x230)](_0x50b602);}),_0x588e9b;}[_0x307496(0x1f3)](_0x154028){const _0x28733c=_0x307496;return{'id':_0x154028['id'],'threadId':_0x154028['threadId'],'ref':_0x154028[_0x28733c(0x22e)]};}};_0x4bfdb5=_0x5062b4([_0x37acc2(0x0,_0x113a6f[_0x307496(0x1f1)](_0x2ffd6d[_0x307496(0x228)])),_0x37acc2(0x1,_0x113a6f[_0x307496(0x1f1)](_0x113a6f[_0x307496(0x263)])),_0x37acc2(0x2,_0x113a6f[_0x307496(0x1f1)](_0x4e7d77[_0x307496(0x23a)]))],_0x4bfdb5);var _0x44354=Object['getOwnPropertyDescriptor'],_0x46263a=(_0x366c3a,_0x2cdc36,_0x61b73b,_0x3e6e63)=>{for(var _0x2967d9=_0x3e6e63>0x1?void 0x0:_0x3e6e63?_0x44354(_0x2cdc36,_0x61b73b):_0x2cdc36,_0x5e869c=_0x366c3a['length']-0x1,_0x339a6e;_0x5e869c>=0x0;_0x5e869c--)(_0x339a6e=_0x366c3a[_0x5e869c])&&(_0x2967d9=_0x339a6e(_0x2967d9)||_0x2967d9);return _0x2967d9;},_0x311762=(_0x491e6a,_0x471e70)=>(_0x4089c8,_0x5116fe)=>_0x471e70(_0x4089c8,_0x5116fe,_0x491e6a);let _0x553bdc=class extends _0x113a6f['Disposable']{constructor(_0x39c040,_0x55fa3b){const _0x39552f=_0x307496;super(),this[_0x39552f(0x1f5)]=_0x39c040,this['_threadCommentDataSource']=_0x55fa3b,this[_0x39552f(0x215)]();}['_initDataSource'](){const _0x24be53=_0x307496;this['_threadCommentDataSourceService'][_0x24be53(0x258)]=this[_0x24be53(0x231)],this[_0x24be53(0x1f5)][_0x24be53(0x1f7)]=!0x1;}};_0x553bdc=_0x46263a([_0x311762(0x0,_0x139ece[_0x307496(0x21e)]),_0x311762(0x1,_0x113a6f[_0x307496(0x1f1)](_0x4bfdb5))],_0x553bdc);var _0x59d82e=Object[_0x307496(0x241)],_0x33d7e1=Object[_0x307496(0x20d)],_0x412707=(_0x3bddda,_0x59d4da,_0x11899d)=>_0x59d4da in _0x3bddda?_0x59d82e(_0x3bddda,_0x59d4da,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x11899d}):_0x3bddda[_0x59d4da]=_0x11899d,_0x5b7b27=(_0x2454ad,_0x2a533d,_0x3da234,_0x3f884d)=>{const _0x391eed=_0x307496;for(var _0x18763c=_0x3f884d>0x1?void 0x0:_0x3f884d?_0x33d7e1(_0x2a533d,_0x3da234):_0x2a533d,_0x460f04=_0x2454ad[_0x391eed(0x267)]-0x1,_0x25cc94;_0x460f04>=0x0;_0x460f04--)(_0x25cc94=_0x2454ad[_0x460f04])&&(_0x18763c=_0x25cc94(_0x18763c)||_0x18763c);return _0x18763c;},_0x3d1dad=(_0x2d229a,_0x9fa390)=>(_0x2a2d2f,_0x4a4bf7)=>_0x9fa390(_0x2a2d2f,_0x4a4bf7,_0x2d229a),_0xfa3e0c=(_0x216647,_0x46260f,_0x346546)=>_0x412707(_0x216647,typeof _0x46260f!=_0x307496(0x205)?_0x46260f+'':_0x46260f,_0x346546);_0x27316b[_0x307496(0x200)]=class extends _0x113a6f[_0x307496(0x245)]{constructor(_0x67bfec=_0x1447e3,_0x28f708,_0x5d582c){const _0x3dcc2a=_0x307496;super(),this[_0x3dcc2a(0x1f9)]=_0x67bfec,this[_0x3dcc2a(0x265)]=_0x28f708,this[_0x3dcc2a(0x240)]=_0x5d582c;const {..._0x454494}=_0x113a6f['merge']({},_0x1447e3,this[_0x3dcc2a(0x1f9)]);this['_configService'][_0x3dcc2a(0x210)](_0x19bbdf,_0x454494);}[_0x307496(0x1ea)](){[[_0x4bfdb5],[_0x553bdc],[_0x2a4ebc]]['forEach'](_0x34b1e0=>{const _0x5290fd=_0x1f1a;this['_injector'][_0x5290fd(0x248)](_0x34b1e0);});}[_0x307496(0x1ed)](){const _0x2451eb=_0x307496;this[_0x2451eb(0x265)][_0x2451eb(0x218)](_0x553bdc),this['_injector']['get'](_0x2a4ebc);}},_0xfa3e0c(_0x27316b[_0x307496(0x200)],'pluginName',_0x14d825),_0xfa3e0c(_0x27316b[_0x307496(0x200)],_0x307496(0x242),_0x113a6f[_0x307496(0x21b)][_0x307496(0x219)]),_0x27316b[_0x307496(0x200)]=_0x5b7b27([_0x113a6f[_0x307496(0x246)](_0x51cb85[_0x307496(0x217)],_0x4e7d77[_0x307496(0x225)],_0x175f22[_0x307496(0x24d)]),_0x3d1dad(0x1,_0x113a6f[_0x307496(0x1f1)](_0x113a6f[_0x307496(0x1fd)])),_0x3d1dad(0x2,_0x113a6f[_0x307496(0x1fa)])],_0x27316b[_0x307496(0x200)]),Object[_0x307496(0x241)](_0x27316b,Symbol[_0x307496(0x243)],{'value':_0x307496(0x25d)});}));function _0x1f1a(_0x1edd91,_0xad203a){const _0x488a6d=_0x488a();return _0x1f1a=function(_0x1f1a96,_0x18100b){_0x1f1a96=_0x1f1a96-0x1e1;let _0x3cced0=_0x488a6d[_0x1f1a96];return _0x3cced0;},_0x1f1a(_0x1edd91,_0xad203a);}function _0x488a(){const _0x2d7657=['_threadCommentDataSourceService','amd','syncUpdateMutationToColla','UNRECOGNIZED','_config','IConfigService','pipe','29822067RkJnbm','Injector','userId','deleteComment','UniverThreadCommentDataSourcePlugin','_init','thread-comment-data-source.config','YYYY/MM/DD\x20HH:mm','@univerjs/core','symbol','Reply','getComment','filter','commentUpdate$','error','bufferTime','disposeWithMe','getOwnPropertyDescriptor','resolveComment','payload','setConfig','customRanges','UniverProCollaborationClient','Delete','@univerjs/thread-comment-ui','_initDataSource','@univerjs/thread-comment','UniverThreadCommentUIPlugin','get','UNIVER_UNKNOWN','Add','UniverInstanceType','35694Ibfggx','/list','IThreadCommentDataSourceService','rangeId','UniverThreadComment','UniverProLicense','COMMENT','subscribe','getCurrentUser','UniverCollaborationClientPlugin','/reply','_commentService','HTTPService','11119549qVGuxI','/universer-api/user/list','format','1192mEGWCk','size','ref','slice','addUser','_threadCommentDataSource','replies','10835byRaad','getUser','_threadCommentModel','reply','rangeType','comment','body','CollaborationSessionService','@univerjs/network','comments','@univerjs-pro/collaboration-client','user','Solved','_configService','defineProperty','type','toStringTag','post','Plugin','DependentOn','users','add','UniverNetwork','/edit','find','3918VpLZdl','UniverLicensePlugin','_sessionService','68VhstHi','map','/universer-api/comment/unit/','updateComment','code','userID','Edit','object','stringify','dataSource','10727EGNQQe','CustomRangeType','OpenOrReOpen','Unknown','Module','root','createTimestamp','ThreadCommentModel','exports','getMemberID','UserManagerService','forEach','_injector','_httpService','length','parentId','_userService','Disposable','listComments','content','unitId','threadId','values','Solve','10NytUrm','4935056dfuBDI','onStarting','CommentService','getUnit','onReady','requireSession','replyId','4889241AMRWmW','Inject','rxjs','saveCommentToSnapshot','addComment'];_0x488a=function(){return _0x2d7657;};return _0x488a();}
|
|
1
|
+
function _0x45af(_0x2324c5,_0x57909e){const _0x32dcb0=_0x32dc();return _0x45af=function(_0x45afcc,_0x217edf){_0x45afcc=_0x45afcc-0x9e;let _0x451abd=_0x32dcb0[_0x45afcc];return _0x451abd;},_0x45af(_0x2324c5,_0x57909e);}function _0x32dc(){const _0x135802=['318668kKCFGW','Disposable','stringify','UniverCollaborationClientPlugin','3174597sMuMmc','/edit','reply','personId','1465756pTgwMG','ref','YYYY/MM/DD\x20HH:mm','Add','HTTPService','UniverProThreadCommentDatasource','unitId','resolveComment','exports','addComment','434580PTWQlT','forEach','size','CollaborationSessionService','2702208NXgaFa','thread-comment-data-source.config','merge','code','UniverProLicense','map','createTimestamp','values','@univerjs/network','UniverProCollaborationClient','_initDataSource','find','_httpService','saveCommentToSnapshot','body','userID','format','syncUpdateMutationToColla','UniverThreadCommentDataSourcePlugin','UserManagerService','_threadCommentModel','_userService','CustomRangeType','slice','disposeWithMe','/list','Plugin','COMMENT','user','/add','15208280xbKpwn','OpenOrReOpen','setConfig','Edit','_commentService','post','add','_configService','UniverThreadCommentUIPlugin','UniverCore','filter','Inject','payload','userId','toStringTag','onReady','comment','/reply','ThreadCommentModel','UniverLicensePlugin','_threadCommentDataSource','content','users','delete','UniverInstanceType','threadId','solved','parse','function','updateComment','IConfigService','parentId','DependentOn','deleteComment','UniverNetwork','Module','amd','getCurrentUser','root','resolved','rxjs','_sessionService','CommentService','Delete','8EQAXNX','bufferTime','subscribe','/delete','@univerjs/thread-comment','36xLpltF','pluginName','Unknown','858823GQQdlW','requireSession','_config','_initUserSync','customRanges','error','type','UniverThreadCommentUi','rangeId','length','getOwnPropertyDescriptor','_init','Reply','listComments','Solve','Solved','dayjs','/solved','_threadCommentDataSourceService','1BjbOka','getMemberID','addUser','UNRECOGNIZED','get','@univerjs/core','replies','/universer-api/comment/unit/','commentUpdate$','defineProperty','rangeType','_injector','replyId'];_0x32dc=function(){return _0x135802;};return _0x32dc();}(function(_0x405607,_0x9e59d8){const _0x251925=_0x45af,_0x14f6ed=_0x405607();while(!![]){try{const _0x1387c0=-parseInt(_0x251925(0xd8))/0x1*(parseInt(_0x251925(0xed))/0x2)+-parseInt(_0x251925(0xfb))/0x3+-parseInt(_0x251925(0xe5))/0x4+parseInt(_0x251925(0xf7))/0x5*(parseInt(_0x251925(0xc2))/0x6)+parseInt(_0x251925(0xc5))/0x7+parseInt(_0x251925(0xbd))/0x8*(parseInt(_0x251925(0xe9))/0x9)+parseInt(_0x251925(0x119))/0xa;if(_0x1387c0===_0x9e59d8)break;else _0x14f6ed['push'](_0x14f6ed['shift']());}catch(_0x50de24){_0x14f6ed['push'](_0x14f6ed['shift']());}}}(_0x32dc,0xc4671),function(_0x1549bc,_0x1b1d53){const _0x587348=_0x45af;typeof exports=='object'&&typeof module<'u'?_0x1b1d53(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==_0x587348(0xad)&&define[_0x587348(0xb5)]?define([_0x587348(0xf5),'@univerjs-pro/collaboration-client','@univerjs-pro/license',_0x587348(0xdd),'@univerjs/thread-comment-ui',_0x587348(0xc1),_0x587348(0xb9),_0x587348(0x103)],_0x1b1d53):(_0x1549bc=typeof globalThis<'u'?globalThis:_0x1549bc||self,_0x1b1d53(_0x1549bc[_0x587348(0xf2)]={},_0x1549bc[_0x587348(0x104)],_0x1549bc[_0x587348(0xff)],_0x1549bc[_0x587348(0x122)],_0x1549bc[_0x587348(0xcc)],_0x1549bc['UniverThreadComment'],_0x1549bc['rxjs'],_0x1549bc[_0x587348(0xb3)]));}(this,function(_0x3241c7,_0x20dfb9,_0x4ddca5,_0x3e7491,_0x8102ab,_0x2679b8,_0x782355,_0x12a47f){'use strict';const _0x63d315=_0x45af;const _0x3a37d7='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x35344c=(_0xd0fc96=>(_0xd0fc96[_0xd0fc96[_0x63d315(0x11a)]=0x0]=_0x63d315(0x11a),_0xd0fc96[_0xd0fc96[_0x63d315(0xd4)]=0x1]='Solved',_0xd0fc96[_0xd0fc96['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xd0fc96))(_0x35344c||{}),_0x20b2d9=(_0x422f52=>(_0x422f52[_0x422f52[_0x63d315(0xc4)]=0x0]=_0x63d315(0xc4),_0x422f52[_0x422f52[_0x63d315(0xf0)]=0x1]=_0x63d315(0xf0),_0x422f52[_0x422f52[_0x63d315(0xd1)]=0x2]=_0x63d315(0xd1),_0x422f52[_0x422f52[_0x63d315(0x11c)]=0x3]=_0x63d315(0x11c),_0x422f52[_0x422f52[_0x63d315(0xbc)]=0x4]=_0x63d315(0xbc),_0x422f52[_0x422f52[_0x63d315(0xd3)]=0x5]=_0x63d315(0xd3),_0x422f52[_0x422f52[_0x63d315(0xdb)]=-0x1]=_0x63d315(0xdb),_0x422f52))(_0x20b2d9||{});const _0x44db12=_0x3b9a35=>_0x3e7491[_0x63d315(0xd5)](new Date(+_0x3b9a35))[_0x63d315(0x10b)](_0x63d315(0xef)),_0x555eef=async(_0x53f0a8,_0x4ba2f0)=>{const _0x4dce4e=_0x63d315,_0x273dc6=_0x53f0a8['get'](_0x3e7491[_0x4dce4e(0x10e)]),_0x465e85=_0x53f0a8[_0x4dce4e(0xdc)](_0x12a47f[_0x4dce4e(0xf1)]);_0x4ba2f0['forEach'](_0x4fe606=>{const _0x1b19ce=_0x4dce4e;_0x273dc6['getUser'](_0x4fe606)&&_0x4ba2f0[_0x1b19ce(0xa8)](_0x4fe606);}),_0x4ba2f0[_0x4dce4e(0xf9)]&&(await _0x465e85[_0x4dce4e(0xdc)]('/universer-api/user/list',{'params':{'userIDs':[..._0x4ba2f0]}}))[_0x4dce4e(0x109)][_0x4dce4e(0xa7)][_0x4dce4e(0xf8)](_0x41d805=>{const _0x1ff58a=_0x4dce4e;_0x41d805&&_0x273dc6[_0x1ff58a(0xda)](_0x41d805);});};var _0x5a62c8=Object['getOwnPropertyDescriptor'],_0x3545f8=(_0x1cd4f0,_0x594354,_0x5b5b57,_0x3c0c25)=>{for(var _0x35a85c=_0x3c0c25>0x1?void 0x0:_0x3c0c25?_0x5a62c8(_0x594354,_0x5b5b57):_0x594354,_0x431feb=_0x1cd4f0['length']-0x1,_0xeb174b;_0x431feb>=0x0;_0x431feb--)(_0xeb174b=_0x1cd4f0[_0x431feb])&&(_0x35a85c=_0xeb174b(_0x35a85c)||_0x35a85c);return _0x35a85c;},_0x27d7d1=(_0xe3324a,_0x877267)=>(_0x1e8636,_0x1e13ad)=>_0x877267(_0x1e8636,_0x1e13ad,_0xe3324a);let _0x17876b=class extends _0x3e7491[_0x63d315(0xe6)]{constructor(_0x13f494,_0x31bcfc,_0x5722ba,_0x42f0e5){const _0x2f52db=_0x63d315;super(),this['_commentService']=_0x13f494,this[_0x2f52db(0x10f)]=_0x31bcfc,this[_0x2f52db(0x110)]=_0x5722ba,this[_0x2f52db(0xe3)]=_0x42f0e5,this[_0x2f52db(0xd0)](),this[_0x2f52db(0xc8)]();}[_0x63d315(0xc8)](){const _0x23a23a=_0x63d315;this[_0x23a23a(0x113)](this[_0x23a23a(0x10f)][_0x23a23a(0xe0)]['pipe'](_0x782355[_0x23a23a(0xbe)](0x10))[_0x23a23a(0xbf)](_0x316b70=>{const _0x57881a=_0x23a23a,_0x546c22=new Set();_0x316b70[_0x57881a(0xf8)](_0x436a6b=>{const _0x5788cc=_0x57881a;switch(_0x436a6b[_0x5788cc(0xcb)]){case _0x5788cc(0x11f):{const _0x55093d=_0x436a6b[_0x5788cc(0x125)][_0x5788cc(0xec)];_0x546c22[_0x5788cc(0x11f)](_0x55093d);break;}}}),_0x555eef(this[_0x57881a(0xe3)],_0x546c22);}));}['_init'](){const _0x287c85=_0x63d315;this[_0x287c85(0x113)](this[_0x287c85(0x11d)][_0x287c85(0xe0)][_0x287c85(0xbf)](async _0x24f3c7=>{const _0xdd2725=_0x287c85;var _0xf0a2d5,_0x28fb10,_0x349e1a,_0x1a6974;const _0x2a03be=(_0xf0a2d5=this[_0xdd2725(0x10f)]['getUnit'](_0x24f3c7[_0xdd2725(0xf3)])[_0xdd2725(0x106)](_0x5aa74b=>_0x5aa74b[_0xdd2725(0xaa)]===_0x24f3c7['threadId']))==null?void 0x0:_0xf0a2d5[_0xdd2725(0xb7)];if(!_0x2a03be)return;const {unitId:_0x5a5048,subUnitId:_0x130e47}=_0x2a03be;switch(_0x24f3c7[_0xdd2725(0x117)]&&this[_0xdd2725(0x110)]['addUser'](_0x24f3c7[_0xdd2725(0x117)]),_0x24f3c7[_0xdd2725(0xcb)]){case _0x20b2d9[_0xdd2725(0xf0)]:break;case _0x20b2d9[_0xdd2725(0xd1)]:{this[_0xdd2725(0x10f)][_0xdd2725(0xf6)](_0x5a5048,_0x130e47,{'unitId':_0x5a5048,'subUnitId':_0x130e47,'ref':'','id':_0x24f3c7['replyId'],'dT':_0x44db12(+_0x24f3c7[_0xdd2725(0x101)]),'threadId':_0x24f3c7[_0xdd2725(0xaa)],'personId':(_0x349e1a=(_0x28fb10=_0x24f3c7[_0xdd2725(0x117)])==null?void 0x0:_0x28fb10[_0xdd2725(0x10a)])!=null?_0x349e1a:_0x24f3c7[_0xdd2725(0x9e)],'text':JSON[_0xdd2725(0xac)](_0x24f3c7[_0xdd2725(0xa6)]),'parentId':_0x2a03be['id']});break;}case _0x20b2d9[_0xdd2725(0xbc)]:{const _0x4c5807=this[_0xdd2725(0x10f)]['getComment'](_0x5a5048,_0x130e47,_0x24f3c7[_0xdd2725(0xe4)]);_0x4c5807&&_0x4c5807[_0xdd2725(0xb0)]&&this[_0xdd2725(0x10f)][_0xdd2725(0xb2)](_0x5a5048,_0x130e47,_0x24f3c7[_0xdd2725(0xe4)]);break;}case _0x20b2d9['Edit']:{this['_threadCommentModel'][_0xdd2725(0xae)](_0x5a5048,_0x130e47,{'commentId':_0x24f3c7['replyId'],'text':JSON['parse'](_0x24f3c7['content'])});break;}case _0x20b2d9[_0xdd2725(0xd3)]:{const _0x2513e3=(_0x1a6974=this[_0xdd2725(0x10f)]['getUnit'](_0x24f3c7[_0xdd2725(0xf3)])[_0xdd2725(0x106)](_0x178dfe=>_0x178dfe[_0xdd2725(0xaa)]===_0x24f3c7['threadId']))==null?void 0x0:_0x1a6974[_0xdd2725(0xb7)];_0x2513e3&&this[_0xdd2725(0x10f)][_0xdd2725(0xf4)](_0x5a5048,_0x130e47,_0x2513e3['id'],_0x24f3c7[_0xdd2725(0xab)]===_0x35344c[_0xdd2725(0xd4)]);break;}}}));}};_0x17876b=_0x3545f8([_0x27d7d1(0x0,_0x3e7491[_0x63d315(0x124)](_0x20dfb9[_0x63d315(0xbb)])),_0x27d7d1(0x1,_0x3e7491[_0x63d315(0x124)](_0x2679b8[_0x63d315(0xa3)])),_0x27d7d1(0x2,_0x3e7491[_0x63d315(0x124)](_0x3e7491[_0x63d315(0x10e)])),_0x27d7d1(0x3,_0x3e7491[_0x63d315(0x124)](_0x3e7491['Injector']))],_0x17876b);const _0x55bd91=_0x63d315(0xfc),_0x5eb45f={};var _0xc5a255=Object[_0x63d315(0xcf)],_0x2b3093=(_0x5f4431,_0x5802bf,_0x5b017a,_0x118b3b)=>{for(var _0xede531=_0x118b3b>0x1?void 0x0:_0x118b3b?_0xc5a255(_0x5802bf,_0x5b017a):_0x5802bf,_0x3c3bf2=_0x5f4431['length']-0x1,_0x3b44ec;_0x3c3bf2>=0x0;_0x3c3bf2--)(_0x3b44ec=_0x5f4431[_0x3c3bf2])&&(_0xede531=_0x3b44ec(_0xede531)||_0xede531);return _0xede531;},_0x2128da=(_0x5e80c4,_0x1b2751)=>(_0x3b9af2,_0x153e1d)=>_0x1b2751(_0x3b9af2,_0x153e1d,_0x5e80c4);function _0x5784b4(_0x5c3204,_0x206fb5){const _0x429739=_0x63d315,_0x21dc96=_0x5c3204[_0x429739(0xde)][0x0];return{..._0x206fb5,'id':_0x21dc96[_0x429739(0xe4)],'resolved':_0x5c3204[_0x429739(0xab)]===0x1,'dT':_0x44db12(_0x21dc96[_0x429739(0x101)]),'personId':_0x21dc96[_0x429739(0x9e)],'threadId':_0x21dc96[_0x429739(0xaa)]};}function _0x4f6855(_0x44b8f6,_0x2bef8b,_0x3114a1){const _0x16d0f3=_0x63d315;var _0x3c8633,_0x13efb6;if(((_0x13efb6=(_0x3c8633=_0x44b8f6==null?void 0x0:_0x44b8f6[_0x16d0f3(0xde)])==null?void 0x0:_0x3c8633[_0x16d0f3(0xce)])!=null?_0x13efb6:0x0)>0x0){const _0x4da823=(_0x29f4ab,_0x551ac8)=>({'id':_0x29f4ab[_0x16d0f3(0xe4)],'threadId':_0x29f4ab[_0x16d0f3(0xaa)],'dT':_0x44db12(_0x29f4ab[_0x16d0f3(0x101)]),'personId':_0x29f4ab['userId'],'resolved':_0x44b8f6[_0x16d0f3(0xab)]===_0x35344c[_0x16d0f3(0xd4)],'unitId':_0x2bef8b,'subUnitId':_0x3114a1,'text':JSON[_0x16d0f3(0xac)](_0x29f4ab[_0x16d0f3(0xa6)]),'parentId':_0x551ac8}),_0x19e248=_0x4da823(_0x44b8f6[_0x16d0f3(0xde)][0x0]);return{..._0x19e248,'children':_0x44b8f6[_0x16d0f3(0xde)][_0x16d0f3(0x112)](0x1)['map'](_0x430565=>_0x4da823(_0x430565,_0x19e248['id']))};}return null;}let _0x5c8c4d=class{constructor(_0x2fbe2a,_0x36bf03,_0x4bf6db){const _0x84ec00=_0x63d315;this[_0x84ec00(0x107)]=_0x2fbe2a,this[_0x84ec00(0x110)]=_0x36bf03,this[_0x84ec00(0xba)]=_0x4bf6db;}async[_0x63d315(0xf6)](_0x12ad75){const _0xed754=_0x63d315;var _0x3431d2,_0x4a3e3c;const {parentId:_0x247407,unitId:_0x2ed109,text:_0x1749c5,threadId:_0xda5724}=_0x12ad75,_0x40513c=(_0x4a3e3c=(_0x3431d2=_0x1749c5[_0xed754(0xc9)])==null?void 0x0:_0x3431d2[_0xed754(0x123)](_0x2faf4c=>_0x2faf4c[_0xed754(0xe2)]===_0x3e7491['CustomRangeType'][_0xed754(0x116)])['map'](_0x366569=>_0x366569[_0xed754(0xcd)]))!=null?_0x4a3e3c:[],_0x444bfa=JSON[_0xed754(0xe7)](_0x1749c5),_0x33b0ca=(await this[_0xed754(0xba)][_0xed754(0xc6)](_0x2ed109))[_0xed754(0xd9)]();if(_0x247407){const _0x3c9df8={'memberId':_0x33b0ca,'unitId':_0x2ed109,'content':_0x444bfa,'mention':_0x40513c,'threadId':_0xda5724},_0x5d7d5b=(await this[_0xed754(0x107)][_0xed754(0x11e)](_0xed754(0xdf)+_0x2ed109+_0xed754(0xa2),{'body':_0x3c9df8}))[_0xed754(0x109)][_0xed754(0xeb)];return{..._0x12ad75,'id':_0x5d7d5b[_0xed754(0xe4)],'dT':_0x3e7491[_0xed754(0xd5)](+_0x5d7d5b[_0xed754(0x101)])['format'](_0xed754(0xef)),'personId':_0x5d7d5b[_0xed754(0x9e)]};}else{const _0x1a9840={'memberId':_0x33b0ca,'unitId':_0x2ed109,'content':_0x444bfa,'mention':_0x40513c},_0x5bdb41=await this[_0xed754(0x107)][_0xed754(0x11e)](_0xed754(0xdf)+_0x2ed109+_0xed754(0x118),{'body':_0x1a9840});return _0x5784b4(_0x5bdb41['body'][_0xed754(0xa1)],_0x12ad75);}}async[_0x63d315(0xae)](_0x175348){const _0x136ef6=_0x63d315;var _0xbc0a4f,_0x1d98ba;const {text:_0x8c384a,unitId:_0x3b8ac8}=_0x175348,_0x55cd5e=(_0x1d98ba=(_0xbc0a4f=_0x8c384a[_0x136ef6(0xc9)])==null?void 0x0:_0xbc0a4f[_0x136ef6(0x123)](_0x2ecce7=>_0x2ecce7[_0x136ef6(0xe2)]===_0x3e7491[_0x136ef6(0x111)]['COMMENT'])[_0x136ef6(0x100)](_0x32b097=>_0x32b097[_0x136ef6(0xcd)]))!=null?_0x1d98ba:[],_0x43aede=JSON[_0x136ef6(0xe7)](_0x8c384a),_0x3d5b5e=_0x175348['threadId'],_0x162651=_0x175348['id'],_0x1ede53={'memberId':(await this[_0x136ef6(0xba)][_0x136ef6(0xc6)](_0x3b8ac8))[_0x136ef6(0xd9)](),'unitId':_0x3b8ac8,'threadId':_0x3d5b5e,'mention':_0x55cd5e,'content':_0x43aede,'replyId':_0x162651},_0x3ba94d=await this[_0x136ef6(0x107)][_0x136ef6(0x11e)](_0x136ef6(0xdf)+_0x3b8ac8+_0x136ef6(0xea),{'body':_0x1ede53});return!_0x3ba94d['body'][_0x136ef6(0xca)]||_0x3ba94d[_0x136ef6(0x109)][_0x136ef6(0xca)][_0x136ef6(0xfe)]===0x1;}async['resolveComment'](_0x54847b){const _0x4502be=_0x63d315,{unitId:_0x366af0}=_0x54847b,_0x495369=_0x54847b[_0x4502be(0xaa)],_0x548aa5={'memberId':this['_userService'][_0x4502be(0xb6)]()['userID'],'unitId':_0x366af0,'threadId':_0x495369,'solved':_0x54847b[_0x4502be(0xb8)]?_0x35344c[_0x4502be(0xd4)]:_0x35344c[_0x4502be(0x11a)]},_0x2d95a2=await this[_0x4502be(0x107)][_0x4502be(0x11e)](_0x4502be(0xdf)+_0x366af0+_0x4502be(0xd6),{'body':_0x548aa5});return!_0x2d95a2['body'][_0x4502be(0xca)]||_0x2d95a2[_0x4502be(0x109)][_0x4502be(0xca)][_0x4502be(0xfe)]===0x1;}async[_0x63d315(0xb2)](_0x33e137,_0x464fcc,_0x3259a2,_0x19f8a2){const _0xacc755=_0x63d315,_0x44f817={'memberId':(await this[_0xacc755(0xba)][_0xacc755(0xc6)](_0x33e137))[_0xacc755(0xd9)](),'threadId':_0x3259a2,'replyId':_0x19f8a2,'unitId':_0x33e137},_0x454a82=await this['_httpService'][_0xacc755(0x11e)](_0xacc755(0xdf)+_0x33e137+_0xacc755(0xc0),{'body':_0x44f817});return!_0x454a82[_0xacc755(0x109)]['error']||_0x454a82[_0xacc755(0x109)]['error']['code']===0x1;}async[_0x63d315(0xd2)](_0x2b996c,_0x79d030,_0x10eb9f){const _0x4f4c13=_0x63d315,_0x32f987={'unitId':_0x2b996c,'threadId':_0x10eb9f},_0x36524a=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2b996c+_0x4f4c13(0x114),{'body':_0x32f987}),_0x4afa65=_0x10eb9f[_0x4f4c13(0x100)](_0x47dbbb=>_0x4f6855(_0x36524a['body']['comments'][_0x47dbbb],_0x2b996c,_0x79d030))[_0x4f4c13(0x123)](Boolean);return Object[_0x4f4c13(0x102)](_0x36524a[_0x4f4c13(0x109)][_0x4f4c13(0xa7)])['forEach'](_0x175f76=>{const _0x300f1a=_0x4f4c13;this[_0x300f1a(0x110)]['addUser'](_0x175f76);}),_0x4afa65;}[_0x63d315(0x108)](_0x188057){const _0x39a976=_0x63d315;return{'id':_0x188057['id'],'threadId':_0x188057['threadId'],'ref':_0x188057[_0x39a976(0xee)]};}};_0x5c8c4d=_0x2b3093([_0x2128da(0x0,_0x3e7491[_0x63d315(0x124)](_0x12a47f['HTTPService'])),_0x2128da(0x1,_0x3e7491[_0x63d315(0x124)](_0x3e7491['UserManagerService'])),_0x2128da(0x2,_0x3e7491['Inject'](_0x20dfb9[_0x63d315(0xfa)]))],_0x5c8c4d);var _0x94dfd2=Object[_0x63d315(0xcf)],_0x58e606=(_0x5631ff,_0x5e5087,_0x4c6174,_0x4ff87c)=>{const _0x151cf4=_0x63d315;for(var _0x12b65a=_0x4ff87c>0x1?void 0x0:_0x4ff87c?_0x94dfd2(_0x5e5087,_0x4c6174):_0x5e5087,_0x65bb1f=_0x5631ff[_0x151cf4(0xce)]-0x1,_0x45468c;_0x65bb1f>=0x0;_0x65bb1f--)(_0x45468c=_0x5631ff[_0x65bb1f])&&(_0x12b65a=_0x45468c(_0x12b65a)||_0x12b65a);return _0x12b65a;},_0x5e30a1=(_0x4e8840,_0x1e0747)=>(_0x14e640,_0x6a75d1)=>_0x1e0747(_0x14e640,_0x6a75d1,_0x4e8840);let _0x8f2f23=class extends _0x3e7491['Disposable']{constructor(_0x1edbef,_0xd35d9c){const _0x200346=_0x63d315;super(),this['_threadCommentDataSourceService']=_0x1edbef,this[_0x200346(0xa5)]=_0xd35d9c,this[_0x200346(0x105)]();}[_0x63d315(0x105)](){const _0x100099=_0x63d315;this[_0x100099(0xd7)]['dataSource']=this['_threadCommentDataSource'],this[_0x100099(0xd7)][_0x100099(0x10c)]=!0x1;}};_0x8f2f23=_0x58e606([_0x5e30a1(0x0,_0x2679b8['IThreadCommentDataSourceService']),_0x5e30a1(0x1,_0x3e7491['Inject'](_0x5c8c4d))],_0x8f2f23);var _0x54cda6=Object[_0x63d315(0xe1)],_0x1fa165=Object[_0x63d315(0xcf)],_0x557ee0=(_0x17a5a3,_0x3b9715,_0x13afed)=>_0x3b9715 in _0x17a5a3?_0x54cda6(_0x17a5a3,_0x3b9715,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x13afed}):_0x17a5a3[_0x3b9715]=_0x13afed,_0x576c9c=(_0x2b4607,_0x206334,_0x4b6175,_0x559d6d)=>{for(var _0x9b78=_0x559d6d>0x1?void 0x0:_0x559d6d?_0x1fa165(_0x206334,_0x4b6175):_0x206334,_0x533daa=_0x2b4607['length']-0x1,_0x553066;_0x533daa>=0x0;_0x533daa--)(_0x553066=_0x2b4607[_0x533daa])&&(_0x9b78=_0x553066(_0x9b78)||_0x9b78);return _0x9b78;},_0x3f5840=(_0x55950a,_0x19850e)=>(_0xe1186d,_0x18a2ee)=>_0x19850e(_0xe1186d,_0x18a2ee,_0x55950a),_0x5b42a4=(_0x135e09,_0x313945,_0x2fe803)=>_0x557ee0(_0x135e09,typeof _0x313945!='symbol'?_0x313945+'':_0x313945,_0x2fe803);_0x3241c7[_0x63d315(0x10d)]=class extends _0x3e7491[_0x63d315(0x115)]{constructor(_0x49324a=_0x5eb45f,_0x4b4873,_0x3d0036){const _0x3ea8f1=_0x63d315;super(),this['_config']=_0x49324a,this[_0x3ea8f1(0xe3)]=_0x4b4873,this[_0x3ea8f1(0x120)]=_0x3d0036;const {..._0x401466}=_0x3e7491[_0x3ea8f1(0xfd)]({},_0x5eb45f,this[_0x3ea8f1(0xc7)]);this[_0x3ea8f1(0x120)][_0x3ea8f1(0x11b)](_0x55bd91,_0x401466);}['onStarting'](){const _0x496c50=_0x63d315;[[_0x5c8c4d],[_0x8f2f23],[_0x17876b]][_0x496c50(0xf8)](_0x3e3f08=>{const _0x36d09f=_0x496c50;this[_0x36d09f(0xe3)][_0x36d09f(0x11f)](_0x3e3f08);});}[_0x63d315(0xa0)](){const _0x242d78=_0x63d315;this[_0x242d78(0xe3)][_0x242d78(0xdc)](_0x8f2f23),this[_0x242d78(0xe3)]['get'](_0x17876b);}},_0x5b42a4(_0x3241c7[_0x63d315(0x10d)],_0x63d315(0xc3),_0x3a37d7),_0x5b42a4(_0x3241c7[_0x63d315(0x10d)],_0x63d315(0xcb),_0x3e7491[_0x63d315(0xa9)]['UNIVER_UNKNOWN']),_0x3241c7['UniverThreadCommentDataSourcePlugin']=_0x576c9c([_0x3e7491[_0x63d315(0xb1)](_0x8102ab[_0x63d315(0x121)],_0x20dfb9[_0x63d315(0xe8)],_0x4ddca5[_0x63d315(0xa4)]),_0x3f5840(0x1,_0x3e7491[_0x63d315(0x124)](_0x3e7491['Injector'])),_0x3f5840(0x2,_0x3e7491[_0x63d315(0xaf)])],_0x3241c7[_0x63d315(0x10d)]),Object[_0x63d315(0xe1)](_0x3241c7,Symbol[_0x63d315(0x9f)],{'value':_0x63d315(0xb4)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.12
|
|
3
|
+
"version": "0.10.12",
|
|
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.12
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/core": "0.10.12
|
|
51
|
-
"@univerjs/thread-comment": "0.10.12-nightly.202510221114",
|
|
52
|
-
"@univerjs/network": "0.10.12-nightly.202510221114",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.12",
|
|
49
|
+
"@univerjs/network": "0.10.12",
|
|
50
|
+
"@univerjs/core": "0.10.12",
|
|
53
51
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
54
|
-
"@univerjs/thread-comment
|
|
52
|
+
"@univerjs/thread-comment": "0.10.12",
|
|
53
|
+
"@univerjs-pro/license": "0.10.12",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.10.12"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|