@univerjs-pro/thread-comment-datasource 0.6.10-nightly.202504221607 → 0.6.10-nightly.202504231607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x4aaf49=_0x7313;(function(_0x465a2f,_0x593403){const _0x1b9c04=_0x7313,_0x1a69d4=_0x465a2f();while(!![]){try{const _0x531f6c=-parseInt(_0x1b9c04(0x16b))/0x1+parseInt(_0x1b9c04(0x178))/0x2+-parseInt(_0x1b9c04(0x188))/0x3*(parseInt(_0x1b9c04(0x19a))/0x4)+parseInt(_0x1b9c04(0x19f))/0x5*(parseInt(_0x1b9c04(0x14f))/0x6)+-parseInt(_0x1b9c04(0x154))/0x7*(parseInt(_0x1b9c04(0x196))/0x8)+parseInt(_0x1b9c04(0x17c))/0x9*(parseInt(_0x1b9c04(0x1a4))/0xa)+parseInt(_0x1b9c04(0x168))/0xb*(-parseInt(_0x1b9c04(0x1b8))/0xc);if(_0x531f6c===_0x593403)break;else _0x1a69d4['push'](_0x1a69d4['shift']());}catch(_0x3ada18){_0x1a69d4['push'](_0x1a69d4['shift']());}}}(_0x1627,0x68854));function _0x1627(){const _0x3b1f8f=['Reply','unitId','type','1306870rYQdDA','symbol','/universer-api/user/list','Solve','135MjqHep','_threadCommentDataSource','comment','getUnit','requireSession','find','forEach','getComment','commentUpdate$','users','delete','user','14937sqCYXv','rangeType','Unknown','parentId','setConfig','CommentService','@univerjs/thread-comment','body','Edit','@univerjs/core','_initUserSync','OpenOrReOpen','_threadCommentDataSourceService','createTimestamp','19408YcuBzX','syncUpdateMutationToColla','defineProperty','dayjs','28IywScB','root','userId','_sessionService','add','3916295oACkrU','saveCommentToSnapshot','onReady','replies','resolved','443810dEAnlj','/list','_httpService','Solved','_threadCommentModel','DependentOn','solved','UniverThreadCommentDataSourcePlugin','@univerjs/thread-comment-ui','updateComment','getCurrentUser','resolveComment','UserManagerService','addUser','getUser','addComment','values','disposeWithMe','code','getMemberID','5751588BuaRcM','slice','Delete','stringify','payload','/universer-api/comment/unit/','UNRECOGNIZED','filter','content','format','replyId','Module','map','Inject','6iOuOWV','UniverInstanceType','deleteComment','customRanges','/add','469KAGyHY','post','subscribe','length','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','/delete','pipe','thread-comment-data-source.config','CustomRangeType','Disposable','_commentService','_configService','Plugin','_initDataSource','YYYY/MM/DD\x20HH:mm','UniverThreadCommentUIPlugin','error','_userService','IThreadCommentDataSourceService','22JTSleX','threadId','getOwnPropertyDescriptor','518300uwhVOf','get','listComments','userID','personId','_injector','onStarting','Injector','parse','Add'];_0x1627=function(){return _0x3b1f8f;};return _0x1627();}Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x4aaf49(0x14c)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require(_0x4aaf49(0x191)),j=require(_0x4aaf49(0x1ac)),M=require(_0x4aaf49(0x18e)),w=require('rxjs'),P=require('@univerjs/network'),U=_0x4aaf49(0x158);var I=(_0xfb8ad9=>(_0xfb8ad9[_0xfb8ad9[_0x4aaf49(0x193)]=0x0]=_0x4aaf49(0x193),_0xfb8ad9[_0xfb8ad9['Solved']=0x1]='Solved',_0xfb8ad9[_0xfb8ad9[_0x4aaf49(0x147)]=-0x1]=_0x4aaf49(0x147),_0xfb8ad9))(I||{}),v=(_0x101db6=>(_0x101db6[_0x101db6[_0x4aaf49(0x18a)]=0x0]=_0x4aaf49(0x18a),_0x101db6[_0x101db6['Add']=0x1]=_0x4aaf49(0x174),_0x101db6[_0x101db6['Reply']=0x2]=_0x4aaf49(0x175),_0x101db6[_0x101db6['Edit']=0x3]=_0x4aaf49(0x190),_0x101db6[_0x101db6[_0x4aaf49(0x143)]=0x4]=_0x4aaf49(0x143),_0x101db6[_0x101db6['Solve']=0x5]=_0x4aaf49(0x17b),_0x101db6[_0x101db6[_0x4aaf49(0x147)]=-0x1]='UNRECOGNIZED',_0x101db6))(v||{});const f=_0x55519d=>c[_0x4aaf49(0x199)](new Date(+_0x55519d))[_0x4aaf49(0x14a)](_0x4aaf49(0x163)),R=async(_0x41a465,_0x3f11e8)=>{const _0x27b689=_0x4aaf49,_0x509685=_0x41a465[_0x27b689(0x16c)](c[_0x27b689(0x1b0)]),_0x2d4504=_0x41a465[_0x27b689(0x16c)](P['HTTPService']);_0x3f11e8['forEach'](_0x69248e=>{const _0x265862=_0x27b689;_0x509685[_0x265862(0x1b2)](_0x69248e)&&_0x3f11e8[_0x265862(0x186)](_0x69248e);}),_0x3f11e8['size']&&(await _0x2d4504[_0x27b689(0x16c)](_0x27b689(0x17a),{'params':{'userIDs':[..._0x3f11e8]}}))[_0x27b689(0x18f)]['users'][_0x27b689(0x182)](_0x313ffc=>{_0x313ffc&&_0x509685['addUser'](_0x313ffc);});};var $=Object[_0x4aaf49(0x16a)],E=(_0x43de55,_0x315613,_0x11ead0,_0x2ab31d)=>{const _0x3d99bd=_0x4aaf49;for(var _0x2cb316=_0x2ab31d>0x1?void 0x0:_0x2ab31d?$(_0x315613,_0x11ead0):_0x315613,_0x25ae03=_0x43de55[_0x3d99bd(0x157)]-0x1,_0x5e0974;_0x25ae03>=0x0;_0x25ae03--)(_0x5e0974=_0x43de55[_0x25ae03])&&(_0x2cb316=_0x5e0974(_0x2cb316)||_0x2cb316);return _0x2cb316;},S=(_0x265056,_0x36f846)=>(_0x53f4e0,_0x44597c)=>_0x36f846(_0x53f4e0,_0x44597c,_0x265056);let p=class extends c[_0x4aaf49(0x15e)]{constructor(_0x127dc1,_0x3f329c,_0x48a914,_0x1d3ec0){const _0x2fc7a8=_0x4aaf49;super(),this[_0x2fc7a8(0x15f)]=_0x127dc1,this[_0x2fc7a8(0x1a8)]=_0x3f329c,this[_0x2fc7a8(0x166)]=_0x48a914,this['_injector']=_0x1d3ec0,this['_init'](),this['_initUserSync']();}[_0x4aaf49(0x192)](){const _0x249584=_0x4aaf49;this[_0x249584(0x1b5)](this['_threadCommentModel'][_0x249584(0x184)][_0x249584(0x15b)](w['bufferTime'](0x10))['subscribe'](_0x30671c=>{const _0x132ccf=_0x249584,_0x3b5dec=new Set();_0x30671c[_0x132ccf(0x182)](_0x4a7542=>{const _0xdae1e9=_0x132ccf;switch(_0x4a7542[_0xdae1e9(0x177)]){case _0xdae1e9(0x19e):{const _0x4e57e0=_0x4a7542[_0xdae1e9(0x145)][_0xdae1e9(0x16f)];_0x3b5dec['add'](_0x4e57e0);break;}}}),R(this[_0x132ccf(0x170)],_0x3b5dec);}));}['_init'](){const _0x24b1f4=_0x4aaf49;this[_0x24b1f4(0x1b5)](this['_commentService'][_0x24b1f4(0x184)][_0x24b1f4(0x156)](async _0xd57348=>{const _0x14551e=_0x24b1f4;var _0xad1cce,_0x4636ed,_0x3f2688,_0x407f29;const _0x1b4f86=(_0xad1cce=this[_0x14551e(0x1a8)]['getUnit'](_0xd57348[_0x14551e(0x176)])[_0x14551e(0x181)](_0x4e1492=>_0x4e1492[_0x14551e(0x169)]===_0xd57348[_0x14551e(0x169)]))==null?void 0x0:_0xad1cce[_0x14551e(0x19b)];if(!_0x1b4f86)return;const {unitId:_0x2bacf9,subUnitId:_0x3d876b}=_0x1b4f86;switch(_0xd57348[_0x14551e(0x187)]&&this[_0x14551e(0x166)][_0x14551e(0x1b1)](_0xd57348[_0x14551e(0x187)]),_0xd57348[_0x14551e(0x177)]){case v['Add']:break;case v[_0x14551e(0x175)]:{this[_0x14551e(0x1a8)][_0x14551e(0x1b3)](_0x2bacf9,_0x3d876b,{'unitId':_0x2bacf9,'subUnitId':_0x3d876b,'ref':'','id':_0xd57348[_0x14551e(0x14b)],'dT':f(+_0xd57348[_0x14551e(0x195)]),'threadId':_0xd57348[_0x14551e(0x169)],'personId':(_0x3f2688=(_0x4636ed=_0xd57348[_0x14551e(0x187)])==null?void 0x0:_0x4636ed[_0x14551e(0x16e)])!=null?_0x3f2688:_0xd57348['userId'],'text':JSON['parse'](_0xd57348[_0x14551e(0x149)]),'parentId':_0x1b4f86['id']});break;}case v['Delete']:{const _0x354d48=this[_0x14551e(0x1a8)][_0x14551e(0x183)](_0x2bacf9,_0x3d876b,_0xd57348[_0x14551e(0x14b)]);_0x354d48&&_0x354d48[_0x14551e(0x18b)]&&this[_0x14551e(0x1a8)][_0x14551e(0x151)](_0x2bacf9,_0x3d876b,_0xd57348['replyId']);break;}case v[_0x14551e(0x190)]:{this['_threadCommentModel'][_0x14551e(0x1ad)](_0x2bacf9,_0x3d876b,{'commentId':_0xd57348['replyId'],'text':JSON['parse'](_0xd57348['content'])});break;}case v[_0x14551e(0x17b)]:{const _0x417450=(_0x407f29=this[_0x14551e(0x1a8)][_0x14551e(0x17f)](_0xd57348[_0x14551e(0x176)])[_0x14551e(0x181)](_0x32d19d=>_0x32d19d[_0x14551e(0x169)]===_0xd57348[_0x14551e(0x169)]))==null?void 0x0:_0x407f29[_0x14551e(0x19b)];_0x417450&&this[_0x14551e(0x1a8)][_0x14551e(0x1af)](_0x2bacf9,_0x3d876b,_0x417450['id'],_0xd57348['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x4aaf49(0x14e)](b[_0x4aaf49(0x18d)])),S(0x1,c[_0x4aaf49(0x14e)](M['ThreadCommentModel'])),S(0x2,c[_0x4aaf49(0x14e)](c[_0x4aaf49(0x1b0)])),S(0x3,c[_0x4aaf49(0x14e)](c[_0x4aaf49(0x172)]))],p);const q=_0x4aaf49(0x15c),D={};var A=Object[_0x4aaf49(0x16a)],x=(_0x3dff3b,_0x1f84b2,_0xa4680f,_0x4620fd)=>{const _0x36c6ad=_0x4aaf49;for(var _0x4525e3=_0x4620fd>0x1?void 0x0:_0x4620fd?A(_0x1f84b2,_0xa4680f):_0x1f84b2,_0x1256b3=_0x3dff3b[_0x36c6ad(0x157)]-0x1,_0x240049;_0x1256b3>=0x0;_0x1256b3--)(_0x240049=_0x3dff3b[_0x1256b3])&&(_0x4525e3=_0x240049(_0x4525e3)||_0x4525e3);return _0x4525e3;},_=(_0x549d3e,_0x1c9750)=>(_0x58cfda,_0x2cec3d)=>_0x1c9750(_0x58cfda,_0x2cec3d,_0x549d3e);function _0x7313(_0x53b298,_0x3e9c23){const _0x162715=_0x1627();return _0x7313=function(_0x731348,_0x2af567){_0x731348=_0x731348-0x143;let _0x279292=_0x162715[_0x731348];return _0x279292;},_0x7313(_0x53b298,_0x3e9c23);}function Y(_0x377ca1,_0x443587){const _0x1faa73=_0x4aaf49,_0x32be8a=_0x377ca1[_0x1faa73(0x1a2)][0x0];return{..._0x443587,'id':_0x32be8a[_0x1faa73(0x14b)],'resolved':_0x377ca1[_0x1faa73(0x1aa)]===0x1,'dT':f(_0x32be8a['createTimestamp']),'personId':_0x32be8a[_0x1faa73(0x19c)],'threadId':_0x32be8a[_0x1faa73(0x169)]};}function G(_0x5e3ab4,_0x520c07,_0x1ee5db){const _0x9cfdc0=_0x4aaf49;var _0x2941e7,_0xcfb729;if(((_0xcfb729=(_0x2941e7=_0x5e3ab4==null?void 0x0:_0x5e3ab4[_0x9cfdc0(0x1a2)])==null?void 0x0:_0x2941e7[_0x9cfdc0(0x157)])!=null?_0xcfb729:0x0)>0x0){const _0x3d6589=(_0x286e96,_0xcd72c6)=>({'id':_0x286e96[_0x9cfdc0(0x14b)],'threadId':_0x286e96[_0x9cfdc0(0x169)],'dT':f(_0x286e96['createTimestamp']),'personId':_0x286e96['userId'],'resolved':_0x5e3ab4[_0x9cfdc0(0x1aa)]===I[_0x9cfdc0(0x1a7)],'unitId':_0x520c07,'subUnitId':_0x1ee5db,'text':JSON[_0x9cfdc0(0x173)](_0x286e96[_0x9cfdc0(0x149)]),'parentId':_0xcd72c6}),_0x3eaa29=_0x3d6589(_0x5e3ab4[_0x9cfdc0(0x1a2)][0x0]);return{..._0x3eaa29,'children':_0x5e3ab4[_0x9cfdc0(0x1a2)][_0x9cfdc0(0x1b9)](0x1)['map'](_0x1a0395=>_0x3d6589(_0x1a0395,_0x3eaa29['id']))};}return null;}let g=class{constructor(_0x4bc39c,_0x39e095,_0x6dfa73,_0x2f59ba){const _0x2e35bd=_0x4aaf49;this[_0x2e35bd(0x1a6)]=_0x4bc39c,this[_0x2e35bd(0x166)]=_0x39e095,this['_sessionService']=_0x6dfa73,this[_0x2e35bd(0x170)]=_0x2f59ba;}async[_0x4aaf49(0x1b3)](_0x314ccf){const _0x3c3a1d=_0x4aaf49;var _0xf11389,_0x5e2db2;const {parentId:_0x1b2780,unitId:_0x5a5266,text:_0x4a3e9d,threadId:_0x3d84bf}=_0x314ccf,_0x38c0ce=(_0x5e2db2=(_0xf11389=_0x4a3e9d[_0x3c3a1d(0x152)])==null?void 0x0:_0xf11389[_0x3c3a1d(0x148)](_0x4e0a46=>_0x4e0a46[_0x3c3a1d(0x189)]===c[_0x3c3a1d(0x15d)]['COMMENT'])[_0x3c3a1d(0x14d)](_0x47e95a=>_0x47e95a['rangeId']))!=null?_0x5e2db2:[],_0x151e1b=JSON['stringify'](_0x4a3e9d),_0x409fd4=(await this[_0x3c3a1d(0x19d)][_0x3c3a1d(0x180)](_0x5a5266))[_0x3c3a1d(0x1b7)]();if(_0x1b2780){const _0x58e7b6={'memberId':_0x409fd4,'unitId':_0x5a5266,'content':_0x151e1b,'mention':_0x38c0ce,'threadId':_0x3d84bf},_0x3a2c37=(await this[_0x3c3a1d(0x1a6)]['post']('/universer-api/comment/unit/'+_0x5a5266+'/reply',{'body':_0x58e7b6}))[_0x3c3a1d(0x18f)]['reply'];return{..._0x314ccf,'id':_0x3a2c37[_0x3c3a1d(0x14b)],'dT':c[_0x3c3a1d(0x199)](+_0x3a2c37[_0x3c3a1d(0x195)])[_0x3c3a1d(0x14a)](_0x3c3a1d(0x163)),'personId':_0x3a2c37['userId']};}else{const _0x11b83c={'memberId':_0x409fd4,'unitId':_0x5a5266,'content':_0x151e1b,'mention':_0x38c0ce},_0x539eb7=await this[_0x3c3a1d(0x1a6)][_0x3c3a1d(0x155)](_0x3c3a1d(0x146)+_0x5a5266+_0x3c3a1d(0x153),{'body':_0x11b83c});return Y(_0x539eb7[_0x3c3a1d(0x18f)][_0x3c3a1d(0x17e)],_0x314ccf);}}async[_0x4aaf49(0x1ad)](_0x4d733f){const _0x73b842=_0x4aaf49;var _0x2aaf2a,_0x31b46e;const {text:_0x2fd27f,unitId:_0x5b868c}=_0x4d733f,_0x90d82f=(_0x31b46e=(_0x2aaf2a=_0x2fd27f[_0x73b842(0x152)])==null?void 0x0:_0x2aaf2a[_0x73b842(0x148)](_0x761f8c=>_0x761f8c['rangeType']===c[_0x73b842(0x15d)]['COMMENT'])[_0x73b842(0x14d)](_0x5b9981=>_0x5b9981['rangeId']))!=null?_0x31b46e:[],_0x4212ee=JSON[_0x73b842(0x144)](_0x2fd27f),_0x3a716e=_0x4d733f[_0x73b842(0x169)],_0x3635c6=_0x4d733f['id'],_0x62bf4b={'memberId':(await this[_0x73b842(0x19d)][_0x73b842(0x180)](_0x5b868c))['getMemberID'](),'unitId':_0x5b868c,'threadId':_0x3a716e,'mention':_0x90d82f,'content':_0x4212ee,'replyId':_0x3635c6},_0x29c077=await this[_0x73b842(0x1a6)]['post'](_0x73b842(0x146)+_0x5b868c+'/edit',{'body':_0x62bf4b});return!_0x29c077['body'][_0x73b842(0x165)]||_0x29c077[_0x73b842(0x18f)][_0x73b842(0x165)][_0x73b842(0x1b6)]===0x1;}async[_0x4aaf49(0x1af)](_0x15a384){const _0x1c9eb4=_0x4aaf49,{unitId:_0x51fb6d}=_0x15a384,_0xf27ae3=_0x15a384['threadId'],_0x1acfe7={'memberId':this[_0x1c9eb4(0x166)][_0x1c9eb4(0x1ae)]()[_0x1c9eb4(0x16e)],'unitId':_0x51fb6d,'threadId':_0xf27ae3,'solved':_0x15a384[_0x1c9eb4(0x1a3)]?I[_0x1c9eb4(0x1a7)]:I['OpenOrReOpen']},_0x521c1d=await this['_httpService']['post'](_0x1c9eb4(0x146)+_0x51fb6d+'/solved',{'body':_0x1acfe7});return!_0x521c1d[_0x1c9eb4(0x18f)][_0x1c9eb4(0x165)]||_0x521c1d[_0x1c9eb4(0x18f)]['error'][_0x1c9eb4(0x1b6)]===0x1;}async[_0x4aaf49(0x151)](_0xddb5a7,_0x4926a2,_0x41e394,_0x4fab06){const _0x2196f3=_0x4aaf49,_0xb8339b={'memberId':(await this[_0x2196f3(0x19d)][_0x2196f3(0x180)](_0xddb5a7))[_0x2196f3(0x1b7)](),'threadId':_0x41e394,'replyId':_0x4fab06,'unitId':_0xddb5a7},_0x4873bc=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xddb5a7+_0x2196f3(0x15a),{'body':_0xb8339b});return!_0x4873bc[_0x2196f3(0x18f)][_0x2196f3(0x165)]||_0x4873bc[_0x2196f3(0x18f)][_0x2196f3(0x165)][_0x2196f3(0x1b6)]===0x1;}async[_0x4aaf49(0x16d)](_0x10fced,_0x57cbda,_0x5ae93c){const _0x31e415=_0x4aaf49,_0x54a13b={'unitId':_0x10fced,'threadId':_0x5ae93c},_0x4dc7f8=await this[_0x31e415(0x1a6)][_0x31e415(0x155)](_0x31e415(0x146)+_0x10fced+_0x31e415(0x1a5),{'body':_0x54a13b}),_0x153acd=_0x5ae93c[_0x31e415(0x14d)](_0x8b9b81=>G(_0x4dc7f8['body']['comments'][_0x8b9b81],_0x10fced,_0x57cbda))[_0x31e415(0x148)](Boolean);return Object[_0x31e415(0x1b4)](_0x4dc7f8['body'][_0x31e415(0x185)])[_0x31e415(0x182)](_0xe8885a=>{const _0x27dcd1=_0x31e415;this[_0x27dcd1(0x166)][_0x27dcd1(0x1b1)](_0xe8885a);}),_0x153acd;}[_0x4aaf49(0x1a0)](_0x1e6951){const _0x25803f=_0x4aaf49;return{'id':_0x1e6951['id'],'threadId':_0x1e6951[_0x25803f(0x169)],'ref':_0x1e6951['ref']};}};g=x([_(0x0,c['Inject'](P['HTTPService'])),_(0x1,c[_0x4aaf49(0x14e)](c['UserManagerService'])),_(0x2,c[_0x4aaf49(0x14e)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c[_0x4aaf49(0x172)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x23cce7,_0x1961ef,_0x14c4ab,_0x14ca93)=>{for(var _0x39e39e=_0x14ca93>0x1?void 0x0:_0x14ca93?H(_0x1961ef,_0x14c4ab):_0x1961ef,_0x30353b=_0x23cce7['length']-0x1,_0x32b9c5;_0x30353b>=0x0;_0x30353b--)(_0x32b9c5=_0x23cce7[_0x30353b])&&(_0x39e39e=_0x32b9c5(_0x39e39e)||_0x39e39e);return _0x39e39e;},y=(_0x55076f,_0x42124d)=>(_0x5190db,_0x4a0af7)=>_0x42124d(_0x5190db,_0x4a0af7,_0x55076f);let C=class extends c[_0x4aaf49(0x15e)]{constructor(_0x2a7df1,_0xf026dc){const _0x448b7b=_0x4aaf49;super(),this[_0x448b7b(0x194)]=_0x2a7df1,this[_0x448b7b(0x17d)]=_0xf026dc,this[_0x448b7b(0x162)]();}['_initDataSource'](){const _0x2b9e37=_0x4aaf49;this[_0x2b9e37(0x194)]['dataSource']=this[_0x2b9e37(0x17d)],this['_threadCommentDataSourceService'][_0x2b9e37(0x197)]=!0x1;}};C=J([y(0x0,M[_0x4aaf49(0x167)]),y(0x1,c[_0x4aaf49(0x14e)](g))],C);var F=Object[_0x4aaf49(0x198)],L=Object['getOwnPropertyDescriptor'],Z=(_0x51c903,_0x2d77da,_0x31ed97)=>_0x2d77da in _0x51c903?F(_0x51c903,_0x2d77da,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x31ed97}):_0x51c903[_0x2d77da]=_0x31ed97,W=(_0x2fd3b4,_0x29998e,_0x3521df,_0x3597fb)=>{const _0x19be2e=_0x4aaf49;for(var _0x500fdb=_0x3597fb>0x1?void 0x0:_0x3597fb?L(_0x29998e,_0x3521df):_0x29998e,_0x4d112b=_0x2fd3b4[_0x19be2e(0x157)]-0x1,_0x1637a3;_0x4d112b>=0x0;_0x4d112b--)(_0x1637a3=_0x2fd3b4[_0x4d112b])&&(_0x500fdb=_0x1637a3(_0x500fdb)||_0x500fdb);return _0x500fdb;},O=(_0x674ea8,_0x30329e)=>(_0x3c24f8,_0x3fd889)=>_0x30329e(_0x3c24f8,_0x3fd889,_0x674ea8),N=(_0x56ccd9,_0xf1f4d0,_0x22c14e)=>Z(_0x56ccd9,typeof _0xf1f4d0!=_0x4aaf49(0x179)?_0xf1f4d0+'':_0xf1f4d0,_0x22c14e);exports[_0x4aaf49(0x1ab)]=class extends c[_0x4aaf49(0x161)]{constructor(_0x390953=D,_0x3d7390,_0x24c621){const _0x35b9b9=_0x4aaf49;super(),this['_config']=_0x390953,this[_0x35b9b9(0x170)]=_0x3d7390,this[_0x35b9b9(0x160)]=_0x24c621;const {..._0x4723f6}=c['merge']({},D,this['_config']);this[_0x35b9b9(0x160)][_0x35b9b9(0x18c)](q,_0x4723f6);}[_0x4aaf49(0x171)](){const _0x47d8e4=_0x4aaf49;[[g],[C],[p]][_0x47d8e4(0x182)](_0x2f0c5d=>{const _0x1ade0c=_0x47d8e4;this[_0x1ade0c(0x170)][_0x1ade0c(0x19e)](_0x2f0c5d);});}[_0x4aaf49(0x1a1)](){const _0x4497d2=_0x4aaf49;this['_injector'][_0x4497d2(0x16c)](C),this['_injector'][_0x4497d2(0x16c)](p);}},N(exports[_0x4aaf49(0x1ab)],'pluginName',U),N(exports[_0x4aaf49(0x1ab)],'type',c[_0x4aaf49(0x150)]['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x4aaf49(0x1a9)](j[_0x4aaf49(0x164)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x4aaf49(0x172)])),O(0x2,c[_0x4aaf49(0x159)])],exports[_0x4aaf49(0x1ab)]);
|
|
1
|
+
'use strict';const _0xee1cbe=_0x50af;(function(_0x57d8d9,_0x4035f6){const _0x6935c7=_0x50af,_0x2fc410=_0x57d8d9();while(!![]){try{const _0x5472b2=parseInt(_0x6935c7(0x181))/0x1+-parseInt(_0x6935c7(0x1a8))/0x2*(parseInt(_0x6935c7(0x15c))/0x3)+parseInt(_0x6935c7(0x151))/0x4+-parseInt(_0x6935c7(0x190))/0x5+parseInt(_0x6935c7(0x156))/0x6*(parseInt(_0x6935c7(0x18b))/0x7)+-parseInt(_0x6935c7(0x195))/0x8*(-parseInt(_0x6935c7(0x172))/0x9)+parseInt(_0x6935c7(0x1a9))/0xa;if(_0x5472b2===_0x4035f6)break;else _0x2fc410['push'](_0x2fc410['shift']());}catch(_0x44428c){_0x2fc410['push'](_0x2fc410['shift']());}}}(_0x3fec,0xaa3b6));Object[_0xee1cbe(0x149)](exports,Symbol[_0xee1cbe(0x15d)],{'value':_0xee1cbe(0x1b7)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0xee1cbe(0x17a)),c=require(_0xee1cbe(0x19e)),j=require(_0xee1cbe(0x16c)),M=require(_0xee1cbe(0x166)),w=require('rxjs'),P=require(_0xee1cbe(0x1ad)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x395055=>(_0x395055[_0x395055[_0xee1cbe(0x1c2)]=0x0]=_0xee1cbe(0x1c2),_0x395055[_0x395055['Solved']=0x1]=_0xee1cbe(0x16e),_0x395055[_0x395055[_0xee1cbe(0x188)]=-0x1]=_0xee1cbe(0x188),_0x395055))(I||{}),v=(_0x1c03c3=>(_0x1c03c3[_0x1c03c3['Unknown']=0x0]=_0xee1cbe(0x15b),_0x1c03c3[_0x1c03c3[_0xee1cbe(0x168)]=0x1]=_0xee1cbe(0x168),_0x1c03c3[_0x1c03c3['Reply']=0x2]=_0xee1cbe(0x16b),_0x1c03c3[_0x1c03c3[_0xee1cbe(0x171)]=0x3]=_0xee1cbe(0x171),_0x1c03c3[_0x1c03c3[_0xee1cbe(0x17c)]=0x4]=_0xee1cbe(0x17c),_0x1c03c3[_0x1c03c3[_0xee1cbe(0x163)]=0x5]=_0xee1cbe(0x163),_0x1c03c3[_0x1c03c3[_0xee1cbe(0x188)]=-0x1]=_0xee1cbe(0x188),_0x1c03c3))(v||{});const f=_0x544357=>c[_0xee1cbe(0x177)](new Date(+_0x544357))[_0xee1cbe(0x176)](_0xee1cbe(0x1b4)),R=async(_0xfb46c4,_0xb4679f)=>{const _0x560d4c=_0xee1cbe,_0x3cc00d=_0xfb46c4[_0x560d4c(0x19f)](c['UserManagerService']),_0x2c9ca4=_0xfb46c4[_0x560d4c(0x19f)](P[_0x560d4c(0x1b2)]);_0xb4679f['forEach'](_0x2bbd0d=>{const _0x3dd7b4=_0x560d4c;_0x3cc00d[_0x3dd7b4(0x1aa)](_0x2bbd0d)&&_0xb4679f[_0x3dd7b4(0x189)](_0x2bbd0d);}),_0xb4679f[_0x560d4c(0x170)]&&(await _0x2c9ca4[_0x560d4c(0x19f)](_0x560d4c(0x1a0),{'params':{'userIDs':[..._0xb4679f]}}))[_0x560d4c(0x154)]['users'][_0x560d4c(0x18e)](_0x3c176d=>{_0x3c176d&&_0x3cc00d['addUser'](_0x3c176d);});};var $=Object[_0xee1cbe(0x14a)],E=(_0x13a9e1,_0x114c6a,_0x2ed9f6,_0x156ed7)=>{const _0x21bf38=_0xee1cbe;for(var _0x4f3ef5=_0x156ed7>0x1?void 0x0:_0x156ed7?$(_0x114c6a,_0x2ed9f6):_0x114c6a,_0xab64c0=_0x13a9e1[_0x21bf38(0x1a7)]-0x1,_0x21b00a;_0xab64c0>=0x0;_0xab64c0--)(_0x21b00a=_0x13a9e1[_0xab64c0])&&(_0x4f3ef5=_0x21b00a(_0x4f3ef5)||_0x4f3ef5);return _0x4f3ef5;},S=(_0x42b564,_0x43b4e3)=>(_0x33945b,_0x5df12b)=>_0x43b4e3(_0x33945b,_0x5df12b,_0x42b564);let p=class extends c[_0xee1cbe(0x167)]{constructor(_0x409d96,_0x1f09c3,_0x4a9d83,_0xa9f6b7){const _0x26eaab=_0xee1cbe;super(),this['_commentService']=_0x409d96,this['_threadCommentModel']=_0x1f09c3,this['_userService']=_0x4a9d83,this[_0x26eaab(0x1bc)]=_0xa9f6b7,this[_0x26eaab(0x18c)](),this['_initUserSync']();}[_0xee1cbe(0x14d)](){const _0x364cbd=_0xee1cbe;this[_0x364cbd(0x165)](this['_threadCommentModel'][_0x364cbd(0x17f)][_0x364cbd(0x14b)](w[_0x364cbd(0x153)](0x10))[_0x364cbd(0x150)](_0x3fc63b=>{const _0x3a2d43=_0x364cbd,_0x11d34b=new Set();_0x3fc63b[_0x3a2d43(0x18e)](_0x4ff3c1=>{const _0x3e827a=_0x3a2d43;switch(_0x4ff3c1[_0x3e827a(0x15e)]){case _0x3e827a(0x1be):{const _0x529888=_0x4ff3c1[_0x3e827a(0x1b0)][_0x3e827a(0x14e)];_0x11d34b[_0x3e827a(0x1be)](_0x529888);break;}}}),R(this[_0x3a2d43(0x1bc)],_0x11d34b);}));}[_0xee1cbe(0x18c)](){const _0x601e06=_0xee1cbe;this[_0x601e06(0x165)](this[_0x601e06(0x147)][_0x601e06(0x17f)][_0x601e06(0x150)](async _0x116c19=>{const _0x2c9c24=_0x601e06;var _0x2763a6,_0x465ce2,_0x38b2c6,_0x152aaa;const _0x2c6f87=(_0x2763a6=this[_0x2c9c24(0x1c0)]['getUnit'](_0x116c19[_0x2c9c24(0x1b3)])[_0x2c9c24(0x16a)](_0x14cc80=>_0x14cc80[_0x2c9c24(0x144)]===_0x116c19['threadId']))==null?void 0x0:_0x2763a6['root'];if(!_0x2c6f87)return;const {unitId:_0x584109,subUnitId:_0x57cd8e}=_0x2c6f87;switch(_0x116c19[_0x2c9c24(0x180)]&&this[_0x2c9c24(0x1af)]['addUser'](_0x116c19['user']),_0x116c19[_0x2c9c24(0x15e)]){case v[_0x2c9c24(0x168)]:break;case v[_0x2c9c24(0x16b)]:{this[_0x2c9c24(0x1c0)][_0x2c9c24(0x17d)](_0x584109,_0x57cd8e,{'unitId':_0x584109,'subUnitId':_0x57cd8e,'ref':'','id':_0x116c19['replyId'],'dT':f(+_0x116c19[_0x2c9c24(0x1bb)]),'threadId':_0x116c19[_0x2c9c24(0x144)],'personId':(_0x38b2c6=(_0x465ce2=_0x116c19[_0x2c9c24(0x180)])==null?void 0x0:_0x465ce2[_0x2c9c24(0x162)])!=null?_0x38b2c6:_0x116c19['userId'],'text':JSON[_0x2c9c24(0x18f)](_0x116c19['content']),'parentId':_0x2c6f87['id']});break;}case v[_0x2c9c24(0x17c)]:{const _0x17b592=this[_0x2c9c24(0x1c0)][_0x2c9c24(0x16d)](_0x584109,_0x57cd8e,_0x116c19[_0x2c9c24(0x183)]);_0x17b592&&_0x17b592[_0x2c9c24(0x14f)]&&this[_0x2c9c24(0x1c0)][_0x2c9c24(0x186)](_0x584109,_0x57cd8e,_0x116c19[_0x2c9c24(0x183)]);break;}case v[_0x2c9c24(0x171)]:{this[_0x2c9c24(0x1c0)][_0x2c9c24(0x145)](_0x584109,_0x57cd8e,{'commentId':_0x116c19[_0x2c9c24(0x183)],'text':JSON[_0x2c9c24(0x18f)](_0x116c19[_0x2c9c24(0x158)])});break;}case v[_0x2c9c24(0x163)]:{const _0x39ffd6=(_0x152aaa=this[_0x2c9c24(0x1c0)][_0x2c9c24(0x146)](_0x116c19['unitId'])[_0x2c9c24(0x16a)](_0x1d6f2c=>_0x1d6f2c[_0x2c9c24(0x144)]===_0x116c19[_0x2c9c24(0x144)]))==null?void 0x0:_0x152aaa[_0x2c9c24(0x1b5)];_0x39ffd6&&this['_threadCommentModel']['resolveComment'](_0x584109,_0x57cd8e,_0x39ffd6['id'],_0x116c19['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0xee1cbe(0x198)](b['CommentService'])),S(0x1,c[_0xee1cbe(0x198)](M['ThreadCommentModel'])),S(0x2,c[_0xee1cbe(0x198)](c[_0xee1cbe(0x161)])),S(0x3,c[_0xee1cbe(0x198)](c[_0xee1cbe(0x159)]))],p);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x55383d,_0x2f8630,_0x2c555f,_0x2e10bd)=>{const _0x468ffd=_0xee1cbe;for(var _0x5898ea=_0x2e10bd>0x1?void 0x0:_0x2e10bd?A(_0x2f8630,_0x2c555f):_0x2f8630,_0x15883e=_0x55383d[_0x468ffd(0x1a7)]-0x1,_0x1b1262;_0x15883e>=0x0;_0x15883e--)(_0x1b1262=_0x55383d[_0x15883e])&&(_0x5898ea=_0x1b1262(_0x5898ea)||_0x5898ea);return _0x5898ea;},_=(_0x22f968,_0x1f653a)=>(_0x128281,_0x3ce497)=>_0x1f653a(_0x128281,_0x3ce497,_0x22f968);function _0x50af(_0x25037f,_0x32e460){const _0x3fec61=_0x3fec();return _0x50af=function(_0x50af53,_0x3865b9){_0x50af53=_0x50af53-0x144;let _0x12606b=_0x3fec61[_0x50af53];return _0x12606b;},_0x50af(_0x25037f,_0x32e460);}function Y(_0xe6baea,_0x515dcb){const _0x4ab72c=_0xee1cbe,_0x5ae022=_0xe6baea[_0x4ab72c(0x1a1)][0x0];return{..._0x515dcb,'id':_0x5ae022[_0x4ab72c(0x183)],'resolved':_0xe6baea[_0x4ab72c(0x1a4)]===0x1,'dT':f(_0x5ae022[_0x4ab72c(0x1bb)]),'personId':_0x5ae022[_0x4ab72c(0x182)],'threadId':_0x5ae022['threadId']};}function G(_0x28e41b,_0x3f254a,_0x52b9ef){const _0x213bf5=_0xee1cbe;var _0x1b3594,_0x100c02;if(((_0x100c02=(_0x1b3594=_0x28e41b==null?void 0x0:_0x28e41b['replies'])==null?void 0x0:_0x1b3594[_0x213bf5(0x1a7)])!=null?_0x100c02:0x0)>0x0){const _0x32e8da=(_0x5b8484,_0x28c2ae)=>({'id':_0x5b8484[_0x213bf5(0x183)],'threadId':_0x5b8484['threadId'],'dT':f(_0x5b8484[_0x213bf5(0x1bb)]),'personId':_0x5b8484[_0x213bf5(0x182)],'resolved':_0x28e41b['solved']===I[_0x213bf5(0x16e)],'unitId':_0x3f254a,'subUnitId':_0x52b9ef,'text':JSON[_0x213bf5(0x18f)](_0x5b8484[_0x213bf5(0x158)]),'parentId':_0x28c2ae}),_0xa19e87=_0x32e8da(_0x28e41b['replies'][0x0]);return{..._0xa19e87,'children':_0x28e41b[_0x213bf5(0x1a1)][_0x213bf5(0x17b)](0x1)[_0x213bf5(0x173)](_0x57a8b7=>_0x32e8da(_0x57a8b7,_0xa19e87['id']))};}return null;}function _0x3fec(){const _0x5c61da=['resolved','HTTPService','unitId','YYYY/MM/DD\x20HH:mm','root','UniverThreadCommentDataSourcePlugin','Module','_threadCommentDataSourceService','addUser','getCurrentUser','createTimestamp','_injector','_initDataSource','add','dataSource','_threadCommentModel','code','OpenOrReOpen','threadId','updateComment','getUnit','_commentService','ref','defineProperty','getOwnPropertyDescriptor','pipe','/edit','_initUserSync','personId','parentId','subscribe','1834420hZexRl','_httpService','bufferTime','body','IConfigService','54ExJVGL','DependentOn','content','Injector','UniverLicensePlugin','Unknown','12DVrTrX','toStringTag','type','customRanges','post','UserManagerService','userID','Solve','_sessionService','disposeWithMe','@univerjs/thread-comment','Disposable','Add','Plugin','find','Reply','@univerjs/thread-comment-ui','getComment','Solved','symbol','size','Edit','9vDRxea','map','getMemberID','_threadCommentDataSource','format','dayjs','UniverInstanceType','stringify','@univerjs-pro/license','slice','Delete','addComment','pluginName','commentUpdate$','user','560104NzpTtP','userId','replyId','_config','filter','deleteComment','/delete','UNRECOGNIZED','delete','CollaborationSessionService','598409obfwNn','_init','comment','forEach','parse','6926825pIWfcR','merge','/list','rangeType','rangeId','6443168zZoaPs','UniverThreadCommentUIPlugin','_configService','Inject','/add','listComments','CustomRangeType','users','error','@univerjs/core','get','/universer-api/user/list','replies','requireSession','saveCommentToSnapshot','solved','UniverCollaborationClientPlugin','comments','length','366290PacegA','2217270ElQKTQ','getUser','/universer-api/comment/unit/','values','@univerjs/network','/solved','_userService','payload'];_0x3fec=function(){return _0x5c61da;};return _0x3fec();}let g=class{constructor(_0x503828,_0x5cc9ef,_0x279210,_0x470c4a){const _0x3624d5=_0xee1cbe;this['_httpService']=_0x503828,this[_0x3624d5(0x1af)]=_0x5cc9ef,this['_sessionService']=_0x279210,this[_0x3624d5(0x1bc)]=_0x470c4a;}async[_0xee1cbe(0x17d)](_0x481d17){const _0x538b93=_0xee1cbe;var _0x31fa11,_0x5d22f6;const {parentId:_0x1ad6be,unitId:_0x31d45f,text:_0x3fdf00,threadId:_0x4f22c5}=_0x481d17,_0x1a1a8d=(_0x5d22f6=(_0x31fa11=_0x3fdf00['customRanges'])==null?void 0x0:_0x31fa11[_0x538b93(0x185)](_0x23a220=>_0x23a220['rangeType']===c['CustomRangeType']['COMMENT'])[_0x538b93(0x173)](_0x5ab9e8=>_0x5ab9e8[_0x538b93(0x194)]))!=null?_0x5d22f6:[],_0x527ec4=JSON[_0x538b93(0x179)](_0x3fdf00),_0x251027=(await this[_0x538b93(0x164)][_0x538b93(0x1a2)](_0x31d45f))['getMemberID']();if(_0x1ad6be){const _0x53f1c5={'memberId':_0x251027,'unitId':_0x31d45f,'content':_0x527ec4,'mention':_0x1a1a8d,'threadId':_0x4f22c5},_0x19770a=(await this[_0x538b93(0x152)]['post'](_0x538b93(0x1ab)+_0x31d45f+'/reply',{'body':_0x53f1c5}))['body']['reply'];return{..._0x481d17,'id':_0x19770a[_0x538b93(0x183)],'dT':c[_0x538b93(0x177)](+_0x19770a[_0x538b93(0x1bb)])[_0x538b93(0x176)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x19770a[_0x538b93(0x182)]};}else{const _0x15c951={'memberId':_0x251027,'unitId':_0x31d45f,'content':_0x527ec4,'mention':_0x1a1a8d},_0x67b147=await this[_0x538b93(0x152)][_0x538b93(0x160)](_0x538b93(0x1ab)+_0x31d45f+_0x538b93(0x199),{'body':_0x15c951});return Y(_0x67b147[_0x538b93(0x154)][_0x538b93(0x18d)],_0x481d17);}}async[_0xee1cbe(0x145)](_0x2878e0){const _0x362d39=_0xee1cbe;var _0x1cb8c0,_0x3d26b5;const {text:_0x38ecbb,unitId:_0x549a01}=_0x2878e0,_0x2b78f0=(_0x3d26b5=(_0x1cb8c0=_0x38ecbb[_0x362d39(0x15f)])==null?void 0x0:_0x1cb8c0['filter'](_0x14519a=>_0x14519a[_0x362d39(0x193)]===c[_0x362d39(0x19b)]['COMMENT'])[_0x362d39(0x173)](_0x3a83c2=>_0x3a83c2[_0x362d39(0x194)]))!=null?_0x3d26b5:[],_0x383016=JSON[_0x362d39(0x179)](_0x38ecbb),_0x538103=_0x2878e0[_0x362d39(0x144)],_0x3e1b57=_0x2878e0['id'],_0x2263c3={'memberId':(await this['_sessionService']['requireSession'](_0x549a01))[_0x362d39(0x174)](),'unitId':_0x549a01,'threadId':_0x538103,'mention':_0x2b78f0,'content':_0x383016,'replyId':_0x3e1b57},_0x4f2d45=await this[_0x362d39(0x152)]['post'](_0x362d39(0x1ab)+_0x549a01+_0x362d39(0x14c),{'body':_0x2263c3});return!_0x4f2d45['body'][_0x362d39(0x19d)]||_0x4f2d45[_0x362d39(0x154)][_0x362d39(0x19d)]['code']===0x1;}async['resolveComment'](_0x1d9ca2){const _0x52dde5=_0xee1cbe,{unitId:_0x252c6a}=_0x1d9ca2,_0x5017e1=_0x1d9ca2[_0x52dde5(0x144)],_0x211d2d={'memberId':this['_userService'][_0x52dde5(0x1ba)]()[_0x52dde5(0x162)],'unitId':_0x252c6a,'threadId':_0x5017e1,'solved':_0x1d9ca2[_0x52dde5(0x1b1)]?I[_0x52dde5(0x16e)]:I[_0x52dde5(0x1c2)]},_0x4b8b3c=await this[_0x52dde5(0x152)][_0x52dde5(0x160)](_0x52dde5(0x1ab)+_0x252c6a+_0x52dde5(0x1ae),{'body':_0x211d2d});return!_0x4b8b3c[_0x52dde5(0x154)][_0x52dde5(0x19d)]||_0x4b8b3c['body'][_0x52dde5(0x19d)][_0x52dde5(0x1c1)]===0x1;}async[_0xee1cbe(0x186)](_0x3491cf,_0x3f9758,_0x5afec2,_0x253237){const _0x459a77=_0xee1cbe,_0xe2d9e1={'memberId':(await this['_sessionService'][_0x459a77(0x1a2)](_0x3491cf))[_0x459a77(0x174)](),'threadId':_0x5afec2,'replyId':_0x253237,'unitId':_0x3491cf},_0x378674=await this[_0x459a77(0x152)][_0x459a77(0x160)](_0x459a77(0x1ab)+_0x3491cf+_0x459a77(0x187),{'body':_0xe2d9e1});return!_0x378674[_0x459a77(0x154)][_0x459a77(0x19d)]||_0x378674['body']['error']['code']===0x1;}async[_0xee1cbe(0x19a)](_0x5d8ce9,_0x27653c,_0x58b9ea){const _0x50b053=_0xee1cbe,_0x322f5d={'unitId':_0x5d8ce9,'threadId':_0x58b9ea},_0x20d8cf=await this[_0x50b053(0x152)][_0x50b053(0x160)](_0x50b053(0x1ab)+_0x5d8ce9+_0x50b053(0x192),{'body':_0x322f5d}),_0x56c87e=_0x58b9ea[_0x50b053(0x173)](_0x46c797=>G(_0x20d8cf[_0x50b053(0x154)][_0x50b053(0x1a6)][_0x46c797],_0x5d8ce9,_0x27653c))['filter'](Boolean);return Object[_0x50b053(0x1ac)](_0x20d8cf[_0x50b053(0x154)][_0x50b053(0x19c)])[_0x50b053(0x18e)](_0x5383e7=>{const _0x48f056=_0x50b053;this[_0x48f056(0x1af)][_0x48f056(0x1b9)](_0x5383e7);}),_0x56c87e;}[_0xee1cbe(0x1a3)](_0x20c3d7){const _0xbb05aa=_0xee1cbe;return{'id':_0x20c3d7['id'],'threadId':_0x20c3d7['threadId'],'ref':_0x20c3d7[_0xbb05aa(0x148)]};}};g=x([_(0x0,c[_0xee1cbe(0x198)](P[_0xee1cbe(0x1b2)])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c['Inject'](b[_0xee1cbe(0x18a)])),_(0x3,c[_0xee1cbe(0x198)](c[_0xee1cbe(0x159)]))],g);var H=Object[_0xee1cbe(0x14a)],J=(_0x10b7c5,_0x41d761,_0x3588f0,_0x45e679)=>{for(var _0x3dcce4=_0x45e679>0x1?void 0x0:_0x45e679?H(_0x41d761,_0x3588f0):_0x41d761,_0x1ad2ed=_0x10b7c5['length']-0x1,_0x3ab300;_0x1ad2ed>=0x0;_0x1ad2ed--)(_0x3ab300=_0x10b7c5[_0x1ad2ed])&&(_0x3dcce4=_0x3ab300(_0x3dcce4)||_0x3dcce4);return _0x3dcce4;},y=(_0xede303,_0x1e5ce3)=>(_0x4ad24b,_0x427888)=>_0x1e5ce3(_0x4ad24b,_0x427888,_0xede303);let C=class extends c[_0xee1cbe(0x167)]{constructor(_0x5d879b,_0x5a164d){const _0x196780=_0xee1cbe;super(),this[_0x196780(0x1b8)]=_0x5d879b,this['_threadCommentDataSource']=_0x5a164d,this[_0x196780(0x1bd)]();}[_0xee1cbe(0x1bd)](){const _0x4e8b86=_0xee1cbe;this[_0x4e8b86(0x1b8)][_0x4e8b86(0x1bf)]=this[_0x4e8b86(0x175)],this[_0x4e8b86(0x1b8)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0xee1cbe(0x198)](g))],C);var F=Object[_0xee1cbe(0x149)],L=Object[_0xee1cbe(0x14a)],Z=(_0x2da636,_0x59c772,_0x5e6993)=>_0x59c772 in _0x2da636?F(_0x2da636,_0x59c772,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e6993}):_0x2da636[_0x59c772]=_0x5e6993,W=(_0x1b247,_0x83ba80,_0x330809,_0x1a195d)=>{const _0x4469a1=_0xee1cbe;for(var _0x3ba79c=_0x1a195d>0x1?void 0x0:_0x1a195d?L(_0x83ba80,_0x330809):_0x83ba80,_0x5274be=_0x1b247[_0x4469a1(0x1a7)]-0x1,_0x25ab4a;_0x5274be>=0x0;_0x5274be--)(_0x25ab4a=_0x1b247[_0x5274be])&&(_0x3ba79c=_0x25ab4a(_0x3ba79c)||_0x3ba79c);return _0x3ba79c;},O=(_0x1fd85b,_0xa516a7)=>(_0x28aed7,_0x4edd08)=>_0xa516a7(_0x28aed7,_0x4edd08,_0x1fd85b),N=(_0x5f1aa1,_0x2f37f0,_0x539554)=>Z(_0x5f1aa1,typeof _0x2f37f0!=_0xee1cbe(0x16f)?_0x2f37f0+'':_0x2f37f0,_0x539554);exports[_0xee1cbe(0x1b6)]=class extends c[_0xee1cbe(0x169)]{constructor(_0x39cbaf=D,_0x1d43da,_0x59cce0){const _0x4c5c53=_0xee1cbe;super(),this[_0x4c5c53(0x184)]=_0x39cbaf,this[_0x4c5c53(0x1bc)]=_0x1d43da,this['_configService']=_0x59cce0;const {..._0x3d4f1a}=c[_0x4c5c53(0x191)]({},D,this[_0x4c5c53(0x184)]);this[_0x4c5c53(0x197)]['setConfig'](q,_0x3d4f1a);}['onStarting'](){[[g],[C],[p]]['forEach'](_0x157c77=>{const _0x413089=_0x50af;this[_0x413089(0x1bc)][_0x413089(0x1be)](_0x157c77);});}['onReady'](){const _0x3af8a8=_0xee1cbe;this[_0x3af8a8(0x1bc)][_0x3af8a8(0x19f)](C),this[_0x3af8a8(0x1bc)][_0x3af8a8(0x19f)](p);}},N(exports[_0xee1cbe(0x1b6)],_0xee1cbe(0x17e),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0xee1cbe(0x178)]['UNIVER_UNKNOWN']),exports[_0xee1cbe(0x1b6)]=W([c[_0xee1cbe(0x157)](j[_0xee1cbe(0x196)],b[_0xee1cbe(0x1a5)],T[_0xee1cbe(0x15a)]),O(0x1,c[_0xee1cbe(0x198)](c[_0xee1cbe(0x159)])),O(0x2,c[_0xee1cbe(0x155)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x10dd51=_0x11cb;(function(_0x5593fd,_0x39ba53){const _0x38ce01=_0x11cb,_0x6c3ab1=_0x5593fd();while(!![]){try{const _0x25e2d0=-parseInt(_0x38ce01(0x1b2))/0x1+-parseInt(_0x38ce01(0x1d5))/0x2+-parseInt(_0x38ce01(0x1e2))/0x3+-parseInt(_0x38ce01(0x1d7))/0x4*(parseInt(_0x38ce01(0x1ce))/0x5)+parseInt(_0x38ce01(0x1cd))/0x6*(-parseInt(_0x38ce01(0x1c0))/0x7)+-parseInt(_0x38ce01(0x1dd))/0x8+-parseInt(_0x38ce01(0x1d9))/0x9*(-parseInt(_0x38ce01(0x1b7))/0xa);if(_0x25e2d0===_0x39ba53)break;else _0x6c3ab1['push'](_0x6c3ab1['shift']());}catch(_0x549fea){_0x6c3ab1['push'](_0x6c3ab1['shift']());}}}(_0x19f0,0x6e085));import{CommentService as _0x480a02,CollaborationSessionService as _0xa13fb7,UniverCollaborationClientPlugin as _0x349d8d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x46f06c}from'@univerjs-pro/license';import{dayjs as _0x13b06d,UserManagerService as _0x4945be,Inject as _0x2f4fe1,Injector as _0x36f8f1,Disposable as _0x42963d,CustomRangeType as _0x5b13ae,UniverInstanceType as _0x472341,DependentOn as _0x1c23a3,IConfigService as _0x18ac02,Plugin as _0x424e35,merge as _0x3c064f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x589ee4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x33888f,IThreadCommentDataSourceService as _0x2d29f0}from'@univerjs/thread-comment';import{bufferTime as _0x2e1f0d}from'rxjs';import{HTTPService as _0x181eb7}from'@univerjs/network';function _0x11cb(_0x2f1284,_0x4f4a0f){const _0x19f012=_0x19f0();return _0x11cb=function(_0x11cba1,_0x188804){_0x11cba1=_0x11cba1-0x1a0;let _0xa95549=_0x19f012[_0x11cba1];return _0xa95549;},_0x11cb(_0x2f1284,_0x4f4a0f);}const W=_0x10dd51(0x1b3);var I=(_0x26f9dd=>(_0x26f9dd[_0x26f9dd[_0x10dd51(0x1a6)]=0x0]=_0x10dd51(0x1a6),_0x26f9dd[_0x26f9dd[_0x10dd51(0x1ac)]=0x1]=_0x10dd51(0x1ac),_0x26f9dd[_0x26f9dd['UNRECOGNIZED']=-0x1]=_0x10dd51(0x1bb),_0x26f9dd))(I||{}),v=(_0x47478a=>(_0x47478a[_0x47478a['Unknown']=0x0]='Unknown',_0x47478a[_0x47478a[_0x10dd51(0x1ae)]=0x1]='Add',_0x47478a[_0x47478a['Reply']=0x2]='Reply',_0x47478a[_0x47478a['Edit']=0x3]=_0x10dd51(0x1c4),_0x47478a[_0x47478a[_0x10dd51(0x1cc)]=0x4]='Delete',_0x47478a[_0x47478a[_0x10dd51(0x1e4)]=0x5]=_0x10dd51(0x1e4),_0x47478a[_0x47478a[_0x10dd51(0x1bb)]=-0x1]=_0x10dd51(0x1bb),_0x47478a))(v||{});const D=_0x47a61f=>_0x13b06d(new Date(+_0x47a61f))[_0x10dd51(0x1ec)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x2c7438,_0x476874)=>{const _0x39beeb=_0x10dd51,_0x2ec2d8=_0x2c7438[_0x39beeb(0x1dc)](_0x4945be),_0x5e8f3c=_0x2c7438[_0x39beeb(0x1dc)](_0x181eb7);_0x476874['forEach'](_0x33f877=>{const _0xac41ea=_0x39beeb;_0x2ec2d8[_0xac41ea(0x1f3)](_0x33f877)&&_0x476874[_0xac41ea(0x1f2)](_0x33f877);}),_0x476874[_0x39beeb(0x1db)]&&(await _0x5e8f3c[_0x39beeb(0x1dc)](_0x39beeb(0x1b4),{'params':{'userIDs':[..._0x476874]}}))[_0x39beeb(0x1f0)][_0x39beeb(0x1cf)][_0x39beeb(0x1ab)](_0x2988d6=>{const _0x1690dd=_0x39beeb;_0x2988d6&&_0x2ec2d8[_0x1690dd(0x1bd)](_0x2988d6);});};var K=Object[_0x10dd51(0x1a0)],V=(_0x3b975c,_0x3bcd25,_0x293c56,_0x37d013)=>{for(var _0x3ed374=_0x37d013>0x1?void 0x0:_0x37d013?K(_0x3bcd25,_0x293c56):_0x3bcd25,_0x56e7e0=_0x3b975c['length']-0x1,_0x3dbc0f;_0x56e7e0>=0x0;_0x56e7e0--)(_0x3dbc0f=_0x3b975c[_0x56e7e0])&&(_0x3ed374=_0x3dbc0f(_0x3ed374)||_0x3ed374);return _0x3ed374;},p=(_0x416c56,_0x5e3432)=>(_0x1c0c8c,_0x363ac3)=>_0x5e3432(_0x1c0c8c,_0x363ac3,_0x416c56);let S=class extends _0x42963d{constructor(_0x4ce056,_0x18c6c9,_0x1f818b,_0x541540){const _0x195020=_0x10dd51;super(),this['_commentService']=_0x4ce056,this[_0x195020(0x1a2)]=_0x18c6c9,this[_0x195020(0x1ee)]=_0x1f818b,this[_0x195020(0x1cb)]=_0x541540,this[_0x195020(0x1a7)](),this[_0x195020(0x1f7)]();}[_0x10dd51(0x1f7)](){const _0x292770=_0x10dd51;this[_0x292770(0x1de)](this[_0x292770(0x1a2)]['commentUpdate$']['pipe'](_0x2e1f0d(0x10))[_0x292770(0x1e6)](_0x3dbe55=>{const _0x462a7c=_0x292770,_0x2c45a0=new Set();_0x3dbe55['forEach'](_0x16ea0b=>{const _0x557a96=_0x11cb;switch(_0x16ea0b[_0x557a96(0x1f9)]){case _0x557a96(0x1e0):{const _0x3473a8=_0x16ea0b['payload']['personId'];_0x2c45a0[_0x557a96(0x1e0)](_0x3473a8);break;}}}),B(this[_0x462a7c(0x1cb)],_0x2c45a0);}));}[_0x10dd51(0x1a7)](){const _0x1c5778=_0x10dd51;this['disposeWithMe'](this[_0x1c5778(0x1eb)][_0x1c5778(0x1b5)][_0x1c5778(0x1e6)](async _0x32de80=>{const _0x222337=_0x1c5778;var _0x351913,_0x5e3a57,_0x5046df,_0x447723;const _0xca006d=(_0x351913=this[_0x222337(0x1a2)][_0x222337(0x1f5)](_0x32de80[_0x222337(0x1a8)])[_0x222337(0x1d1)](_0x48932e=>_0x48932e[_0x222337(0x1fa)]===_0x32de80[_0x222337(0x1fa)]))==null?void 0x0:_0x351913['root'];if(!_0xca006d)return;const {unitId:_0x2e0029,subUnitId:_0x42d124}=_0xca006d;switch(_0x32de80[_0x222337(0x1c9)]&&this['_userService'][_0x222337(0x1bd)](_0x32de80[_0x222337(0x1c9)]),_0x32de80[_0x222337(0x1f9)]){case v[_0x222337(0x1ae)]:break;case v[_0x222337(0x1d4)]:{this[_0x222337(0x1a2)][_0x222337(0x1be)](_0x2e0029,_0x42d124,{'unitId':_0x2e0029,'subUnitId':_0x42d124,'ref':'','id':_0x32de80[_0x222337(0x1a5)],'dT':D(+_0x32de80[_0x222337(0x1b1)]),'threadId':_0x32de80[_0x222337(0x1fa)],'personId':(_0x5046df=(_0x5e3a57=_0x32de80[_0x222337(0x1c9)])==null?void 0x0:_0x5e3a57['userID'])!=null?_0x5046df:_0x32de80[_0x222337(0x1ea)],'text':JSON[_0x222337(0x1ff)](_0x32de80['content']),'parentId':_0xca006d['id']});break;}case v[_0x222337(0x1cc)]:{const _0x4bed65=this[_0x222337(0x1a2)][_0x222337(0x1ad)](_0x2e0029,_0x42d124,_0x32de80[_0x222337(0x1a5)]);_0x4bed65&&_0x4bed65[_0x222337(0x1f8)]&&this[_0x222337(0x1a2)][_0x222337(0x1fd)](_0x2e0029,_0x42d124,_0x32de80['replyId']);break;}case v[_0x222337(0x1c4)]:{this[_0x222337(0x1a2)][_0x222337(0x1df)](_0x2e0029,_0x42d124,{'commentId':_0x32de80[_0x222337(0x1a5)],'text':JSON[_0x222337(0x1ff)](_0x32de80[_0x222337(0x1a3)])});break;}case v[_0x222337(0x1e4)]:{const _0x3bf972=(_0x447723=this[_0x222337(0x1a2)][_0x222337(0x1f5)](_0x32de80['unitId'])[_0x222337(0x1d1)](_0xc63f0d=>_0xc63f0d[_0x222337(0x1fa)]===_0x32de80['threadId']))==null?void 0x0:_0x447723[_0x222337(0x1fb)];_0x3bf972&&this[_0x222337(0x1a2)][_0x222337(0x1c1)](_0x2e0029,_0x42d124,_0x3bf972['id'],_0x32de80['solved']===I[_0x222337(0x1ac)]);break;}}}));}};S=V([p(0x0,_0x2f4fe1(_0x480a02)),p(0x1,_0x2f4fe1(_0x33888f)),p(0x2,_0x2f4fe1(_0x4945be)),p(0x3,_0x2f4fe1(_0x36f8f1))],S);const z=_0x10dd51(0x1c8),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5107cd,_0x4540ab,_0x3dc2d2,_0x34b0d2)=>{const _0x104726=_0x10dd51;for(var _0x576fe5=_0x34b0d2>0x1?void 0x0:_0x34b0d2?k(_0x4540ab,_0x3dc2d2):_0x4540ab,_0x950792=_0x5107cd[_0x104726(0x1ba)]-0x1,_0x673bac;_0x950792>=0x0;_0x950792--)(_0x673bac=_0x5107cd[_0x950792])&&(_0x576fe5=_0x673bac(_0x576fe5)||_0x576fe5);return _0x576fe5;},_=(_0x2be1fb,_0x2c3fcc)=>(_0x29ae54,_0xef4bc)=>_0x2c3fcc(_0x29ae54,_0xef4bc,_0x2be1fb);function X(_0x5a3b0f,_0x19c30e){const _0x2cfd35=_0x10dd51,_0x39bafd=_0x5a3b0f[_0x2cfd35(0x1bc)][0x0];return{..._0x19c30e,'id':_0x39bafd[_0x2cfd35(0x1a5)],'resolved':_0x5a3b0f[_0x2cfd35(0x1a9)]===0x1,'dT':D(_0x39bafd['createTimestamp']),'personId':_0x39bafd['userId'],'threadId':_0x39bafd[_0x2cfd35(0x1fa)]};}function _0x19f0(){const _0xfb680b=['_userService','filter','body','symbol','delete','getUser','reply','getUnit','_configService','_initUserSync','parentId','type','threadId','root','ref','deleteComment','comment','parse','getOwnPropertyDescriptor','_threadCommentDataSourceService','_threadCommentModel','content','post','replyId','OpenOrReOpen','_init','unitId','solved','rangeType','forEach','Solved','getComment','Add','pluginName','_httpService','createTimestamp','38524TSZSNL','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/universer-api/user/list','commentUpdate$','COMMENT','10xvRKow','saveCommentToSnapshot','requireSession','length','UNRECOGNIZED','replies','addUser','addComment','getMemberID','7cIeESQ','resolveComment','values','getCurrentUser','Edit','onStarting','comments','setConfig','thread-comment-data-source.config','user','/add','_injector','Delete','1119918FkAfKu','3585ENSGRb','users','customRanges','find','map','/delete','Reply','1264864IWwLUa','/reply','4196LvXbnw','_config','27951543SnPJcQ','rangeId','size','get','3171544HcFjPy','disposeWithMe','updateComment','add','error','1946547RGVrHi','_threadCommentDataSource','Solve','_initDataSource','subscribe','_sessionService','defineProperty','/universer-api/comment/unit/','userId','_commentService','format','code'];_0x19f0=function(){return _0xfb680b;};return _0x19f0();}function ee(_0x21dbfb,_0x3f0b9e,_0x102120){const _0x2bc455=_0x10dd51;var _0x4b7ba9,_0x4431b5;if(((_0x4431b5=(_0x4b7ba9=_0x21dbfb==null?void 0x0:_0x21dbfb[_0x2bc455(0x1bc)])==null?void 0x0:_0x4b7ba9[_0x2bc455(0x1ba)])!=null?_0x4431b5:0x0)>0x0){const _0x4a8e0c=(_0x1c5b0a,_0x34b27d)=>({'id':_0x1c5b0a[_0x2bc455(0x1a5)],'threadId':_0x1c5b0a[_0x2bc455(0x1fa)],'dT':D(_0x1c5b0a[_0x2bc455(0x1b1)]),'personId':_0x1c5b0a[_0x2bc455(0x1ea)],'resolved':_0x21dbfb[_0x2bc455(0x1a9)]===I['Solved'],'unitId':_0x3f0b9e,'subUnitId':_0x102120,'text':JSON[_0x2bc455(0x1ff)](_0x1c5b0a[_0x2bc455(0x1a3)]),'parentId':_0x34b27d}),_0x465812=_0x4a8e0c(_0x21dbfb[_0x2bc455(0x1bc)][0x0]);return{..._0x465812,'children':_0x21dbfb[_0x2bc455(0x1bc)]['slice'](0x1)['map'](_0x40a8d5=>_0x4a8e0c(_0x40a8d5,_0x465812['id']))};}return null;}let f=class{constructor(_0x34854e,_0x4f12e8,_0x212f20,_0x307da2){const _0x3f16fd=_0x10dd51;this[_0x3f16fd(0x1b0)]=_0x34854e,this[_0x3f16fd(0x1ee)]=_0x4f12e8,this[_0x3f16fd(0x1e7)]=_0x212f20,this[_0x3f16fd(0x1cb)]=_0x307da2;}async[_0x10dd51(0x1be)](_0x1b730b){const _0x5ac165=_0x10dd51;var _0x1ad724,_0x474259;const {parentId:_0xd17921,unitId:_0x4e0ab2,text:_0x430c78,threadId:_0x879d1f}=_0x1b730b,_0x237901=(_0x474259=(_0x1ad724=_0x430c78['customRanges'])==null?void 0x0:_0x1ad724[_0x5ac165(0x1ef)](_0x188c49=>_0x188c49[_0x5ac165(0x1aa)]===_0x5b13ae['COMMENT'])[_0x5ac165(0x1d2)](_0x48dd16=>_0x48dd16[_0x5ac165(0x1da)]))!=null?_0x474259:[],_0x10521c=JSON['stringify'](_0x430c78),_0x59c8c1=(await this[_0x5ac165(0x1e7)][_0x5ac165(0x1b9)](_0x4e0ab2))[_0x5ac165(0x1bf)]();if(_0xd17921){const _0x36f6fd={'memberId':_0x59c8c1,'unitId':_0x4e0ab2,'content':_0x10521c,'mention':_0x237901,'threadId':_0x879d1f},_0x194a8b=(await this[_0x5ac165(0x1b0)][_0x5ac165(0x1a4)](_0x5ac165(0x1e9)+_0x4e0ab2+_0x5ac165(0x1d6),{'body':_0x36f6fd}))[_0x5ac165(0x1f0)][_0x5ac165(0x1f4)];return{..._0x1b730b,'id':_0x194a8b[_0x5ac165(0x1a5)],'dT':_0x13b06d(+_0x194a8b[_0x5ac165(0x1b1)])[_0x5ac165(0x1ec)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x194a8b[_0x5ac165(0x1ea)]};}else{const _0x100bd8={'memberId':_0x59c8c1,'unitId':_0x4e0ab2,'content':_0x10521c,'mention':_0x237901},_0x3a3d93=await this[_0x5ac165(0x1b0)][_0x5ac165(0x1a4)]('/universer-api/comment/unit/'+_0x4e0ab2+_0x5ac165(0x1ca),{'body':_0x100bd8});return X(_0x3a3d93[_0x5ac165(0x1f0)][_0x5ac165(0x1fe)],_0x1b730b);}}async[_0x10dd51(0x1df)](_0x5d22ad){const _0x5925fa=_0x10dd51;var _0x5dcf4a,_0x42696d;const {text:_0x36b18c,unitId:_0xa798c5}=_0x5d22ad,_0xe68161=(_0x42696d=(_0x5dcf4a=_0x36b18c[_0x5925fa(0x1d0)])==null?void 0x0:_0x5dcf4a[_0x5925fa(0x1ef)](_0x12bbf8=>_0x12bbf8[_0x5925fa(0x1aa)]===_0x5b13ae[_0x5925fa(0x1b6)])['map'](_0x56f75f=>_0x56f75f['rangeId']))!=null?_0x42696d:[],_0x3a0ec8=JSON['stringify'](_0x36b18c),_0x277e88=_0x5d22ad[_0x5925fa(0x1fa)],_0x5b7b17=_0x5d22ad['id'],_0x28f7df={'memberId':(await this[_0x5925fa(0x1e7)][_0x5925fa(0x1b9)](_0xa798c5))['getMemberID'](),'unitId':_0xa798c5,'threadId':_0x277e88,'mention':_0xe68161,'content':_0x3a0ec8,'replyId':_0x5b7b17},_0x1b15af=await this[_0x5925fa(0x1b0)][_0x5925fa(0x1a4)](_0x5925fa(0x1e9)+_0xa798c5+'/edit',{'body':_0x28f7df});return!_0x1b15af['body'][_0x5925fa(0x1e1)]||_0x1b15af[_0x5925fa(0x1f0)][_0x5925fa(0x1e1)][_0x5925fa(0x1ed)]===0x1;}async['resolveComment'](_0x553a18){const _0x5b20be=_0x10dd51,{unitId:_0x4a9933}=_0x553a18,_0x169aed=_0x553a18['threadId'],_0x5cf1f5={'memberId':this[_0x5b20be(0x1ee)][_0x5b20be(0x1c3)]()['userID'],'unitId':_0x4a9933,'threadId':_0x169aed,'solved':_0x553a18['resolved']?I[_0x5b20be(0x1ac)]:I['OpenOrReOpen']},_0xe6ad43=await this[_0x5b20be(0x1b0)][_0x5b20be(0x1a4)]('/universer-api/comment/unit/'+_0x4a9933+'/solved',{'body':_0x5cf1f5});return!_0xe6ad43[_0x5b20be(0x1f0)]['error']||_0xe6ad43[_0x5b20be(0x1f0)]['error'][_0x5b20be(0x1ed)]===0x1;}async[_0x10dd51(0x1fd)](_0x31f4ea,_0x2b351f,_0x423d3d,_0x5647ce){const _0x4fc712=_0x10dd51,_0x59f71b={'memberId':(await this[_0x4fc712(0x1e7)][_0x4fc712(0x1b9)](_0x31f4ea))['getMemberID'](),'threadId':_0x423d3d,'replyId':_0x5647ce,'unitId':_0x31f4ea},_0x3089c0=await this[_0x4fc712(0x1b0)]['post'](_0x4fc712(0x1e9)+_0x31f4ea+_0x4fc712(0x1d3),{'body':_0x59f71b});return!_0x3089c0['body']['error']||_0x3089c0['body'][_0x4fc712(0x1e1)][_0x4fc712(0x1ed)]===0x1;}async['listComments'](_0x16e185,_0x25a2ff,_0x26c951){const _0x56ef58=_0x10dd51,_0x1415d6={'unitId':_0x16e185,'threadId':_0x26c951},_0xdb5897=await this[_0x56ef58(0x1b0)][_0x56ef58(0x1a4)](_0x56ef58(0x1e9)+_0x16e185+'/list',{'body':_0x1415d6}),_0x14f46d=_0x26c951[_0x56ef58(0x1d2)](_0x11f78b=>ee(_0xdb5897[_0x56ef58(0x1f0)][_0x56ef58(0x1c6)][_0x11f78b],_0x16e185,_0x25a2ff))[_0x56ef58(0x1ef)](Boolean);return Object[_0x56ef58(0x1c2)](_0xdb5897['body']['users'])[_0x56ef58(0x1ab)](_0x39532c=>{const _0x347fc1=_0x56ef58;this[_0x347fc1(0x1ee)]['addUser'](_0x39532c);}),_0x14f46d;}[_0x10dd51(0x1b8)](_0x3c7911){const _0x180999=_0x10dd51;return{'id':_0x3c7911['id'],'threadId':_0x3c7911['threadId'],'ref':_0x3c7911[_0x180999(0x1fc)]};}};f=Q([_(0x0,_0x2f4fe1(_0x181eb7)),_(0x1,_0x2f4fe1(_0x4945be)),_(0x2,_0x2f4fe1(_0xa13fb7)),_(0x3,_0x2f4fe1(_0x36f8f1))],f);var re=Object[_0x10dd51(0x1a0)],te=(_0x2e3938,_0x520446,_0x12145a,_0x4cface)=>{const _0x5dd3fc=_0x10dd51;for(var _0x27befd=_0x4cface>0x1?void 0x0:_0x4cface?re(_0x520446,_0x12145a):_0x520446,_0x226c48=_0x2e3938[_0x5dd3fc(0x1ba)]-0x1,_0x482e6a;_0x226c48>=0x0;_0x226c48--)(_0x482e6a=_0x2e3938[_0x226c48])&&(_0x27befd=_0x482e6a(_0x27befd)||_0x27befd);return _0x27befd;},N=(_0x17c323,_0x443b7d)=>(_0x10196c,_0x20f974)=>_0x443b7d(_0x10196c,_0x20f974,_0x17c323);let g=class extends _0x42963d{constructor(_0x331994,_0x1196dd){const _0x144bdd=_0x10dd51;super(),this['_threadCommentDataSourceService']=_0x331994,this['_threadCommentDataSource']=_0x1196dd,this[_0x144bdd(0x1e5)]();}['_initDataSource'](){const _0x4e0553=_0x10dd51;this[_0x4e0553(0x1a1)]['dataSource']=this[_0x4e0553(0x1e3)],this[_0x4e0553(0x1a1)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x2d29f0),N(0x1,_0x2f4fe1(f))],g);var se=Object[_0x10dd51(0x1e8)],oe=Object[_0x10dd51(0x1a0)],ne=(_0x543418,_0x21c9ac,_0x25fac4)=>_0x21c9ac in _0x543418?se(_0x543418,_0x21c9ac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x25fac4}):_0x543418[_0x21c9ac]=_0x25fac4,ie=(_0x5f0bb1,_0x24b37f,_0x561555,_0xaba4b1)=>{const _0x2eb2a8=_0x10dd51;for(var _0x5d1f8a=_0xaba4b1>0x1?void 0x0:_0xaba4b1?oe(_0x24b37f,_0x561555):_0x24b37f,_0x1261f3=_0x5f0bb1[_0x2eb2a8(0x1ba)]-0x1,_0x550eaf;_0x1261f3>=0x0;_0x1261f3--)(_0x550eaf=_0x5f0bb1[_0x1261f3])&&(_0x5d1f8a=_0x550eaf(_0x5d1f8a)||_0x5d1f8a);return _0x5d1f8a;},w=(_0x118886,_0x4fd5f0)=>(_0x1518c9,_0x4e069a)=>_0x4fd5f0(_0x1518c9,_0x4e069a,_0x118886),$=(_0x5571b2,_0x275438,_0x113773)=>ne(_0x5571b2,typeof _0x275438!=_0x10dd51(0x1f1)?_0x275438+'':_0x275438,_0x113773);let b=class extends _0x424e35{constructor(_0x3ea8dd=M,_0x56b00e,_0x3fb8a7){const _0x1ced53=_0x10dd51;super(),this[_0x1ced53(0x1d8)]=_0x3ea8dd,this[_0x1ced53(0x1cb)]=_0x56b00e,this[_0x1ced53(0x1f6)]=_0x3fb8a7;const {..._0x4a2325}=_0x3c064f({},M,this[_0x1ced53(0x1d8)]);this[_0x1ced53(0x1f6)][_0x1ced53(0x1c7)](z,_0x4a2325);}[_0x10dd51(0x1c5)](){[[f],[g],[S]]['forEach'](_0x58b7fa=>{const _0x422f4e=_0x11cb;this[_0x422f4e(0x1cb)][_0x422f4e(0x1e0)](_0x58b7fa);});}['onReady'](){const _0x127c24=_0x10dd51;this[_0x127c24(0x1cb)][_0x127c24(0x1dc)](g),this[_0x127c24(0x1cb)]['get'](S);}};$(b,_0x10dd51(0x1af),W),$(b,_0x10dd51(0x1f9),_0x472341['UNIVER_UNKNOWN']),b=ie([_0x1c23a3(_0x589ee4,_0x349d8d,_0x46f06c),w(0x1,_0x2f4fe1(_0x36f8f1)),w(0x2,_0x18ac02)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x57bc55=_0x3c4a;(function(_0x487028,_0x8b70ab){const _0x45bc50=_0x3c4a,_0x2eefa2=_0x487028();while(!![]){try{const _0x45c18d=-parseInt(_0x45bc50(0x9c))/0x1+-parseInt(_0x45bc50(0xc4))/0x2*(-parseInt(_0x45bc50(0x93))/0x3)+-parseInt(_0x45bc50(0x83))/0x4*(-parseInt(_0x45bc50(0xb7))/0x5)+parseInt(_0x45bc50(0xab))/0x6+parseInt(_0x45bc50(0xcf))/0x7*(-parseInt(_0x45bc50(0xb6))/0x8)+parseInt(_0x45bc50(0x82))/0x9+-parseInt(_0x45bc50(0x9f))/0xa;if(_0x45c18d===_0x8b70ab)break;else _0x2eefa2['push'](_0x2eefa2['shift']());}catch(_0x443960){_0x2eefa2['push'](_0x2eefa2['shift']());}}}(_0x2cb6,0x81dca));import{CommentService as _0x522639,CollaborationSessionService as _0xddc2cb,UniverCollaborationClientPlugin as _0x94d2f7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d99ac}from'@univerjs-pro/license';import{dayjs as _0x4c2fdc,UserManagerService as _0x2abd0d,Inject as _0x4a5557,Injector as _0x5ea5e8,Disposable as _0x505c15,CustomRangeType as _0x5e7d56,UniverInstanceType as _0x58a442,DependentOn as _0x2ab32d,IConfigService as _0x3741a8,Plugin as _0x37bdb6,merge as _0x236ec6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x303987}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4c5542,IThreadCommentDataSourceService as _0x31375c}from'@univerjs/thread-comment';import{bufferTime as _0x131cf2}from'rxjs';import{HTTPService as _0x51f54d}from'@univerjs/network';const W=_0x57bc55(0xc0);var I=(_0x3e827f=>(_0x3e827f[_0x3e827f['OpenOrReOpen']=0x0]=_0x57bc55(0x92),_0x3e827f[_0x3e827f[_0x57bc55(0x9a)]=0x1]=_0x57bc55(0x9a),_0x3e827f[_0x3e827f[_0x57bc55(0xd3)]=-0x1]=_0x57bc55(0xd3),_0x3e827f))(I||{}),v=(_0xb9e1f0=>(_0xb9e1f0[_0xb9e1f0[_0x57bc55(0xc2)]=0x0]=_0x57bc55(0xc2),_0xb9e1f0[_0xb9e1f0[_0x57bc55(0xb9)]=0x1]=_0x57bc55(0xb9),_0xb9e1f0[_0xb9e1f0[_0x57bc55(0xa5)]=0x2]=_0x57bc55(0xa5),_0xb9e1f0[_0xb9e1f0['Edit']=0x3]=_0x57bc55(0xd2),_0xb9e1f0[_0xb9e1f0[_0x57bc55(0x9e)]=0x4]='Delete',_0xb9e1f0[_0xb9e1f0[_0x57bc55(0x89)]=0x5]=_0x57bc55(0x89),_0xb9e1f0[_0xb9e1f0[_0x57bc55(0xd3)]=-0x1]=_0x57bc55(0xd3),_0xb9e1f0))(v||{});const D=_0x52089=>_0x4c2fdc(new Date(+_0x52089))['format'](_0x57bc55(0x91)),B=async(_0x50df37,_0x3b2f95)=>{const _0x3f88e3=_0x57bc55,_0x487abc=_0x50df37[_0x3f88e3(0xe4)](_0x2abd0d),_0x43826c=_0x50df37[_0x3f88e3(0xe4)](_0x51f54d);_0x3b2f95['forEach'](_0x2b7131=>{const _0x56db1f=_0x3f88e3;_0x487abc[_0x56db1f(0x86)](_0x2b7131)&&_0x3b2f95[_0x56db1f(0xcd)](_0x2b7131);}),_0x3b2f95[_0x3f88e3(0xe5)]&&(await _0x43826c['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x3b2f95]}}))['body'][_0x3f88e3(0xae)][_0x3f88e3(0x8e)](_0x2f09a7=>{const _0x6bb3b9=_0x3f88e3;_0x2f09a7&&_0x487abc[_0x6bb3b9(0xd7)](_0x2f09a7);});};var K=Object[_0x57bc55(0xbc)],V=(_0xd504ce,_0x3e3bab,_0x47edde,_0x399105)=>{const _0x4e9da1=_0x57bc55;for(var _0xe60486=_0x399105>0x1?void 0x0:_0x399105?K(_0x3e3bab,_0x47edde):_0x3e3bab,_0x1865f3=_0xd504ce[_0x4e9da1(0x88)]-0x1,_0x37021f;_0x1865f3>=0x0;_0x1865f3--)(_0x37021f=_0xd504ce[_0x1865f3])&&(_0xe60486=_0x37021f(_0xe60486)||_0xe60486);return _0xe60486;},p=(_0xa74daa,_0x2d8f54)=>(_0x51a935,_0x5c14bc)=>_0x2d8f54(_0x51a935,_0x5c14bc,_0xa74daa);let S=class extends _0x505c15{constructor(_0x2a41c1,_0x561936,_0x3c408d,_0x4d2532){const _0x1ce3b9=_0x57bc55;super(),this[_0x1ce3b9(0xbb)]=_0x2a41c1,this[_0x1ce3b9(0xe3)]=_0x561936,this['_userService']=_0x3c408d,this[_0x1ce3b9(0x9b)]=_0x4d2532,this['_init'](),this['_initUserSync']();}['_initUserSync'](){const _0x18723a=_0x57bc55;this['disposeWithMe'](this['_threadCommentModel'][_0x18723a(0xa4)]['pipe'](_0x131cf2(0x10))[_0x18723a(0xbd)](_0x12c953=>{const _0x3e3b38=_0x18723a,_0x5f25f1=new Set();_0x12c953[_0x3e3b38(0x8e)](_0x4c5714=>{const _0x42a67c=_0x3e3b38;switch(_0x4c5714[_0x42a67c(0xdc)]){case _0x42a67c(0x8a):{const _0x10e67a=_0x4c5714[_0x42a67c(0xc7)][_0x42a67c(0xb8)];_0x5f25f1[_0x42a67c(0x8a)](_0x10e67a);break;}}}),B(this[_0x3e3b38(0x9b)],_0x5f25f1);}));}['_init'](){const _0x5e943e=_0x57bc55;this[_0x5e943e(0xbf)](this[_0x5e943e(0xbb)][_0x5e943e(0xa4)][_0x5e943e(0xbd)](async _0x4a37fa=>{const _0x66bdf3=_0x5e943e;var _0x4c2111,_0x693ca0,_0x19e5ed,_0x4531aa;const _0x2ffdb6=(_0x4c2111=this['_threadCommentModel'][_0x66bdf3(0xa8)](_0x4a37fa['unitId'])[_0x66bdf3(0xe0)](_0x243cdd=>_0x243cdd[_0x66bdf3(0x96)]===_0x4a37fa[_0x66bdf3(0x96)]))==null?void 0x0:_0x4c2111[_0x66bdf3(0xb5)];if(!_0x2ffdb6)return;const {unitId:_0x415abb,subUnitId:_0x20f5d7}=_0x2ffdb6;switch(_0x4a37fa['user']&&this['_userService'][_0x66bdf3(0xd7)](_0x4a37fa['user']),_0x4a37fa[_0x66bdf3(0xdc)]){case v[_0x66bdf3(0xb9)]:break;case v['Reply']:{this[_0x66bdf3(0xe3)][_0x66bdf3(0xce)](_0x415abb,_0x20f5d7,{'unitId':_0x415abb,'subUnitId':_0x20f5d7,'ref':'','id':_0x4a37fa[_0x66bdf3(0xd5)],'dT':D(+_0x4a37fa['createTimestamp']),'threadId':_0x4a37fa[_0x66bdf3(0x96)],'personId':(_0x19e5ed=(_0x693ca0=_0x4a37fa[_0x66bdf3(0xaf)])==null?void 0x0:_0x693ca0[_0x66bdf3(0xd6)])!=null?_0x19e5ed:_0x4a37fa[_0x66bdf3(0xb3)],'text':JSON[_0x66bdf3(0xca)](_0x4a37fa['content']),'parentId':_0x2ffdb6['id']});break;}case v['Delete']:{const _0xec162f=this[_0x66bdf3(0xe3)]['getComment'](_0x415abb,_0x20f5d7,_0x4a37fa['replyId']);_0xec162f&&_0xec162f[_0x66bdf3(0xd9)]&&this[_0x66bdf3(0xe3)][_0x66bdf3(0x84)](_0x415abb,_0x20f5d7,_0x4a37fa['replyId']);break;}case v[_0x66bdf3(0xd2)]:{this[_0x66bdf3(0xe3)][_0x66bdf3(0xdd)](_0x415abb,_0x20f5d7,{'commentId':_0x4a37fa['replyId'],'text':JSON[_0x66bdf3(0xca)](_0x4a37fa[_0x66bdf3(0x87)])});break;}case v[_0x66bdf3(0x89)]:{const _0x3c89b3=(_0x4531aa=this[_0x66bdf3(0xe3)][_0x66bdf3(0xa8)](_0x4a37fa['unitId'])[_0x66bdf3(0xe0)](_0x5ae08e=>_0x5ae08e['threadId']===_0x4a37fa[_0x66bdf3(0x96)]))==null?void 0x0:_0x4531aa['root'];_0x3c89b3&&this['_threadCommentModel'][_0x66bdf3(0x85)](_0x415abb,_0x20f5d7,_0x3c89b3['id'],_0x4a37fa[_0x66bdf3(0x94)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x4a5557(_0x522639)),p(0x1,_0x4a5557(_0x4c5542)),p(0x2,_0x4a5557(_0x2abd0d)),p(0x3,_0x4a5557(_0x5ea5e8))],S);function _0x2cb6(){const _0x49feaa=['_initDataSource','/reply','Edit','UNRECOGNIZED','onStarting','replyId','userID','addUser','_httpService','parentId','body','COMMENT','type','updateComment','/list','createTimestamp','find','UNIVER_UNKNOWN','_threadCommentDataSource','_threadCommentModel','get','size','2019015VwPGcL','36ztMjzj','deleteComment','resolveComment','getUser','content','length','Solve','add','_threadCommentDataSourceService','rangeType','_sessionService','forEach','resolved','replies','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','6QlAeGj','solved','setConfig','threadId','_userService','getCurrentUser','defineProperty','Solved','_injector','132481NSrgVM','requireSession','Delete','5367570nqRvmW','slice','thread-comment-data-source.config','post','stringify','commentUpdate$','Reply','rangeId','values','getUnit','comment','_config','6168654JlKtlm','/universer-api/comment/unit/','saveCommentToSnapshot','users','user','/solved','error','comments','userId','map','root','8HgThsM','48155NceoQK','personId','Add','reply','_commentService','getOwnPropertyDescriptor','subscribe','filter','disposeWithMe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/add','Unknown','getMemberID','814846QkPktG','listComments','ref','payload','format','dataSource','parse','syncUpdateMutationToColla','customRanges','delete','addComment','6669719MFnaDf'];_0x2cb6=function(){return _0x49feaa;};return _0x2cb6();}function _0x3c4a(_0x312b2f,_0xb807b2){const _0x2cb634=_0x2cb6();return _0x3c4a=function(_0x3c4a06,_0x5569d8){_0x3c4a06=_0x3c4a06-0x82;let _0x983530=_0x2cb634[_0x3c4a06];return _0x983530;},_0x3c4a(_0x312b2f,_0xb807b2);}const z=_0x57bc55(0xa1),M={};var k=Object[_0x57bc55(0xbc)],Q=(_0xbfdef6,_0x4c6c49,_0x5df54e,_0x56d66e)=>{const _0x7a7030=_0x57bc55;for(var _0x556108=_0x56d66e>0x1?void 0x0:_0x56d66e?k(_0x4c6c49,_0x5df54e):_0x4c6c49,_0x1c829c=_0xbfdef6[_0x7a7030(0x88)]-0x1,_0x27117e;_0x1c829c>=0x0;_0x1c829c--)(_0x27117e=_0xbfdef6[_0x1c829c])&&(_0x556108=_0x27117e(_0x556108)||_0x556108);return _0x556108;},_=(_0x3684e5,_0x28f502)=>(_0x2a89af,_0xc0d68d)=>_0x28f502(_0x2a89af,_0xc0d68d,_0x3684e5);function X(_0x6d04d8,_0x29ec24){const _0x3a5532=_0x57bc55,_0x50be63=_0x6d04d8[_0x3a5532(0x90)][0x0];return{..._0x29ec24,'id':_0x50be63['replyId'],'resolved':_0x6d04d8[_0x3a5532(0x94)]===0x1,'dT':D(_0x50be63['createTimestamp']),'personId':_0x50be63['userId'],'threadId':_0x50be63[_0x3a5532(0x96)]};}function ee(_0x30ccc8,_0x396cdb,_0x1d76ef){const _0x41f004=_0x57bc55;var _0x3a22b0,_0x1f018d;if(((_0x1f018d=(_0x3a22b0=_0x30ccc8==null?void 0x0:_0x30ccc8[_0x41f004(0x90)])==null?void 0x0:_0x3a22b0[_0x41f004(0x88)])!=null?_0x1f018d:0x0)>0x0){const _0x180bc4=(_0x30206a,_0x1b7b45)=>({'id':_0x30206a[_0x41f004(0xd5)],'threadId':_0x30206a[_0x41f004(0x96)],'dT':D(_0x30206a[_0x41f004(0xdf)]),'personId':_0x30206a['userId'],'resolved':_0x30ccc8[_0x41f004(0x94)]===I[_0x41f004(0x9a)],'unitId':_0x396cdb,'subUnitId':_0x1d76ef,'text':JSON[_0x41f004(0xca)](_0x30206a['content']),'parentId':_0x1b7b45}),_0x1d6e60=_0x180bc4(_0x30ccc8[_0x41f004(0x90)][0x0]);return{..._0x1d6e60,'children':_0x30ccc8[_0x41f004(0x90)][_0x41f004(0xa0)](0x1)[_0x41f004(0xb4)](_0x22f349=>_0x180bc4(_0x22f349,_0x1d6e60['id']))};}return null;}let f=class{constructor(_0x281d98,_0x3617a0,_0x3f96a3,_0x1eb2f3){const _0x2af29d=_0x57bc55;this[_0x2af29d(0xd8)]=_0x281d98,this[_0x2af29d(0x97)]=_0x3617a0,this[_0x2af29d(0x8d)]=_0x3f96a3,this[_0x2af29d(0x9b)]=_0x1eb2f3;}async[_0x57bc55(0xce)](_0x58d471){const _0x583f43=_0x57bc55;var _0x1e1d79,_0x44e218;const {parentId:_0x15dfaf,unitId:_0x27ddb6,text:_0x4b65e1,threadId:_0x58be55}=_0x58d471,_0x3a8320=(_0x44e218=(_0x1e1d79=_0x4b65e1['customRanges'])==null?void 0x0:_0x1e1d79[_0x583f43(0xbe)](_0x191a73=>_0x191a73['rangeType']===_0x5e7d56[_0x583f43(0xdb)])[_0x583f43(0xb4)](_0x217fa3=>_0x217fa3[_0x583f43(0xa6)]))!=null?_0x44e218:[],_0x4db3cc=JSON[_0x583f43(0xa3)](_0x4b65e1),_0x19f6a0=(await this[_0x583f43(0x8d)][_0x583f43(0x9d)](_0x27ddb6))[_0x583f43(0xc3)]();if(_0x15dfaf){const _0x4e6b33={'memberId':_0x19f6a0,'unitId':_0x27ddb6,'content':_0x4db3cc,'mention':_0x3a8320,'threadId':_0x58be55},_0x573766=(await this[_0x583f43(0xd8)]['post']('/universer-api/comment/unit/'+_0x27ddb6+_0x583f43(0xd1),{'body':_0x4e6b33}))[_0x583f43(0xda)][_0x583f43(0xba)];return{..._0x58d471,'id':_0x573766[_0x583f43(0xd5)],'dT':_0x4c2fdc(+_0x573766[_0x583f43(0xdf)])[_0x583f43(0xc8)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x573766[_0x583f43(0xb3)]};}else{const _0x281286={'memberId':_0x19f6a0,'unitId':_0x27ddb6,'content':_0x4db3cc,'mention':_0x3a8320},_0x26ce9a=await this[_0x583f43(0xd8)][_0x583f43(0xa2)](_0x583f43(0xac)+_0x27ddb6+_0x583f43(0xc1),{'body':_0x281286});return X(_0x26ce9a[_0x583f43(0xda)][_0x583f43(0xa9)],_0x58d471);}}async[_0x57bc55(0xdd)](_0x4e5af5){const _0x52e80a=_0x57bc55;var _0x22f13d,_0x1e83df;const {text:_0x178021,unitId:_0x261054}=_0x4e5af5,_0x1728e3=(_0x1e83df=(_0x22f13d=_0x178021[_0x52e80a(0xcc)])==null?void 0x0:_0x22f13d[_0x52e80a(0xbe)](_0x3dd7fe=>_0x3dd7fe[_0x52e80a(0x8c)]===_0x5e7d56['COMMENT'])[_0x52e80a(0xb4)](_0x10e0dd=>_0x10e0dd[_0x52e80a(0xa6)]))!=null?_0x1e83df:[],_0x1c3add=JSON[_0x52e80a(0xa3)](_0x178021),_0x280457=_0x4e5af5[_0x52e80a(0x96)],_0x36d19f=_0x4e5af5['id'],_0x2649f9={'memberId':(await this['_sessionService'][_0x52e80a(0x9d)](_0x261054))[_0x52e80a(0xc3)](),'unitId':_0x261054,'threadId':_0x280457,'mention':_0x1728e3,'content':_0x1c3add,'replyId':_0x36d19f},_0x308175=await this[_0x52e80a(0xd8)][_0x52e80a(0xa2)](_0x52e80a(0xac)+_0x261054+'/edit',{'body':_0x2649f9});return!_0x308175[_0x52e80a(0xda)][_0x52e80a(0xb1)]||_0x308175['body'][_0x52e80a(0xb1)]['code']===0x1;}async[_0x57bc55(0x85)](_0x123b66){const _0x580ff1=_0x57bc55,{unitId:_0x45bead}=_0x123b66,_0x3c92f0=_0x123b66[_0x580ff1(0x96)],_0x95469c={'memberId':this[_0x580ff1(0x97)][_0x580ff1(0x98)]()['userID'],'unitId':_0x45bead,'threadId':_0x3c92f0,'solved':_0x123b66[_0x580ff1(0x8f)]?I[_0x580ff1(0x9a)]:I['OpenOrReOpen']},_0x4a1307=await this['_httpService'][_0x580ff1(0xa2)]('/universer-api/comment/unit/'+_0x45bead+_0x580ff1(0xb0),{'body':_0x95469c});return!_0x4a1307[_0x580ff1(0xda)]['error']||_0x4a1307['body']['error']['code']===0x1;}async[_0x57bc55(0x84)](_0x2c1a3d,_0x4f5e6f,_0x6fd82,_0x3a83c1){const _0x4227d7=_0x57bc55,_0x3cd393={'memberId':(await this[_0x4227d7(0x8d)][_0x4227d7(0x9d)](_0x2c1a3d))[_0x4227d7(0xc3)](),'threadId':_0x6fd82,'replyId':_0x3a83c1,'unitId':_0x2c1a3d},_0xe92c51=await this[_0x4227d7(0xd8)][_0x4227d7(0xa2)](_0x4227d7(0xac)+_0x2c1a3d+'/delete',{'body':_0x3cd393});return!_0xe92c51[_0x4227d7(0xda)][_0x4227d7(0xb1)]||_0xe92c51[_0x4227d7(0xda)]['error']['code']===0x1;}async[_0x57bc55(0xc5)](_0x5810d0,_0x1febef,_0x345299){const _0x1c0844=_0x57bc55,_0x59e421={'unitId':_0x5810d0,'threadId':_0x345299},_0x51fcab=await this[_0x1c0844(0xd8)][_0x1c0844(0xa2)](_0x1c0844(0xac)+_0x5810d0+_0x1c0844(0xde),{'body':_0x59e421}),_0x29d7b2=_0x345299['map'](_0x37c3d4=>ee(_0x51fcab[_0x1c0844(0xda)][_0x1c0844(0xb2)][_0x37c3d4],_0x5810d0,_0x1febef))[_0x1c0844(0xbe)](Boolean);return Object[_0x1c0844(0xa7)](_0x51fcab[_0x1c0844(0xda)]['users'])[_0x1c0844(0x8e)](_0x5bda53=>{const _0x5f226a=_0x1c0844;this[_0x5f226a(0x97)]['addUser'](_0x5bda53);}),_0x29d7b2;}[_0x57bc55(0xad)](_0x4ff27f){const _0x36b34e=_0x57bc55;return{'id':_0x4ff27f['id'],'threadId':_0x4ff27f[_0x36b34e(0x96)],'ref':_0x4ff27f[_0x36b34e(0xc6)]};}};f=Q([_(0x0,_0x4a5557(_0x51f54d)),_(0x1,_0x4a5557(_0x2abd0d)),_(0x2,_0x4a5557(_0xddc2cb)),_(0x3,_0x4a5557(_0x5ea5e8))],f);var re=Object[_0x57bc55(0xbc)],te=(_0x4ee1b8,_0xe6f83,_0x4984dc,_0xb84bf5)=>{const _0x20b69d=_0x57bc55;for(var _0xa60cda=_0xb84bf5>0x1?void 0x0:_0xb84bf5?re(_0xe6f83,_0x4984dc):_0xe6f83,_0x23319b=_0x4ee1b8[_0x20b69d(0x88)]-0x1,_0x478865;_0x23319b>=0x0;_0x23319b--)(_0x478865=_0x4ee1b8[_0x23319b])&&(_0xa60cda=_0x478865(_0xa60cda)||_0xa60cda);return _0xa60cda;},N=(_0x110cc6,_0x26f303)=>(_0x35d264,_0x45057b)=>_0x26f303(_0x35d264,_0x45057b,_0x110cc6);let g=class extends _0x505c15{constructor(_0x1e7bfa,_0x912d59){const _0x218e34=_0x57bc55;super(),this[_0x218e34(0x8b)]=_0x1e7bfa,this[_0x218e34(0xe2)]=_0x912d59,this['_initDataSource']();}[_0x57bc55(0xd0)](){const _0x315df7=_0x57bc55;this[_0x315df7(0x8b)][_0x315df7(0xc9)]=this[_0x315df7(0xe2)],this[_0x315df7(0x8b)][_0x315df7(0xcb)]=!0x1;}};g=te([N(0x0,_0x31375c),N(0x1,_0x4a5557(f))],g);var se=Object[_0x57bc55(0x99)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x58fe0a,_0x1711f9,_0x4b91ed)=>_0x1711f9 in _0x58fe0a?se(_0x58fe0a,_0x1711f9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4b91ed}):_0x58fe0a[_0x1711f9]=_0x4b91ed,ie=(_0x2669aa,_0x3d8acd,_0x3102f2,_0x30a4cc)=>{const _0x15696a=_0x57bc55;for(var _0x53c1d3=_0x30a4cc>0x1?void 0x0:_0x30a4cc?oe(_0x3d8acd,_0x3102f2):_0x3d8acd,_0x248b3c=_0x2669aa[_0x15696a(0x88)]-0x1,_0x5a66e7;_0x248b3c>=0x0;_0x248b3c--)(_0x5a66e7=_0x2669aa[_0x248b3c])&&(_0x53c1d3=_0x5a66e7(_0x53c1d3)||_0x53c1d3);return _0x53c1d3;},w=(_0x4a2ca5,_0x147142)=>(_0x51c68a,_0x2f8e3f)=>_0x147142(_0x51c68a,_0x2f8e3f,_0x4a2ca5),$=(_0x477f51,_0x4e90c6,_0x2b9e3f)=>ne(_0x477f51,typeof _0x4e90c6!='symbol'?_0x4e90c6+'':_0x4e90c6,_0x2b9e3f);let b=class extends _0x37bdb6{constructor(_0x4be973=M,_0x42dc3e,_0x33c583){const _0xe3ca8b=_0x57bc55;super(),this[_0xe3ca8b(0xaa)]=_0x4be973,this[_0xe3ca8b(0x9b)]=_0x42dc3e,this['_configService']=_0x33c583;const {..._0x528d05}=_0x236ec6({},M,this[_0xe3ca8b(0xaa)]);this['_configService'][_0xe3ca8b(0x95)](z,_0x528d05);}[_0x57bc55(0xd4)](){const _0x7392ab=_0x57bc55;[[f],[g],[S]][_0x7392ab(0x8e)](_0x4ef12e=>{const _0x39fe6a=_0x7392ab;this[_0x39fe6a(0x9b)][_0x39fe6a(0x8a)](_0x4ef12e);});}['onReady'](){const _0x1744f9=_0x57bc55;this[_0x1744f9(0x9b)][_0x1744f9(0xe4)](g),this[_0x1744f9(0x9b)][_0x1744f9(0xe4)](S);}};$(b,'pluginName',W),$(b,_0x57bc55(0xdc),_0x58a442[_0x57bc55(0xe1)]),b=ie([_0x2ab32d(_0x303987,_0x94d2f7,_0x5d99ac),w(0x1,_0x4a5557(_0x5ea5e8)),w(0x2,_0x3741a8)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x10dd51=_0x11cb;(function(_0x5593fd,_0x39ba53){const _0x38ce01=_0x11cb,_0x6c3ab1=_0x5593fd();while(!![]){try{const _0x25e2d0=-parseInt(_0x38ce01(0x1b2))/0x1+-parseInt(_0x38ce01(0x1d5))/0x2+-parseInt(_0x38ce01(0x1e2))/0x3+-parseInt(_0x38ce01(0x1d7))/0x4*(parseInt(_0x38ce01(0x1ce))/0x5)+parseInt(_0x38ce01(0x1cd))/0x6*(-parseInt(_0x38ce01(0x1c0))/0x7)+-parseInt(_0x38ce01(0x1dd))/0x8+-parseInt(_0x38ce01(0x1d9))/0x9*(-parseInt(_0x38ce01(0x1b7))/0xa);if(_0x25e2d0===_0x39ba53)break;else _0x6c3ab1['push'](_0x6c3ab1['shift']());}catch(_0x549fea){_0x6c3ab1['push'](_0x6c3ab1['shift']());}}}(_0x19f0,0x6e085));import{CommentService as _0x480a02,CollaborationSessionService as _0xa13fb7,UniverCollaborationClientPlugin as _0x349d8d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x46f06c}from'@univerjs-pro/license';import{dayjs as _0x13b06d,UserManagerService as _0x4945be,Inject as _0x2f4fe1,Injector as _0x36f8f1,Disposable as _0x42963d,CustomRangeType as _0x5b13ae,UniverInstanceType as _0x472341,DependentOn as _0x1c23a3,IConfigService as _0x18ac02,Plugin as _0x424e35,merge as _0x3c064f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x589ee4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x33888f,IThreadCommentDataSourceService as _0x2d29f0}from'@univerjs/thread-comment';import{bufferTime as _0x2e1f0d}from'rxjs';import{HTTPService as _0x181eb7}from'@univerjs/network';function _0x11cb(_0x2f1284,_0x4f4a0f){const _0x19f012=_0x19f0();return _0x11cb=function(_0x11cba1,_0x188804){_0x11cba1=_0x11cba1-0x1a0;let _0xa95549=_0x19f012[_0x11cba1];return _0xa95549;},_0x11cb(_0x2f1284,_0x4f4a0f);}const W=_0x10dd51(0x1b3);var I=(_0x26f9dd=>(_0x26f9dd[_0x26f9dd[_0x10dd51(0x1a6)]=0x0]=_0x10dd51(0x1a6),_0x26f9dd[_0x26f9dd[_0x10dd51(0x1ac)]=0x1]=_0x10dd51(0x1ac),_0x26f9dd[_0x26f9dd['UNRECOGNIZED']=-0x1]=_0x10dd51(0x1bb),_0x26f9dd))(I||{}),v=(_0x47478a=>(_0x47478a[_0x47478a['Unknown']=0x0]='Unknown',_0x47478a[_0x47478a[_0x10dd51(0x1ae)]=0x1]='Add',_0x47478a[_0x47478a['Reply']=0x2]='Reply',_0x47478a[_0x47478a['Edit']=0x3]=_0x10dd51(0x1c4),_0x47478a[_0x47478a[_0x10dd51(0x1cc)]=0x4]='Delete',_0x47478a[_0x47478a[_0x10dd51(0x1e4)]=0x5]=_0x10dd51(0x1e4),_0x47478a[_0x47478a[_0x10dd51(0x1bb)]=-0x1]=_0x10dd51(0x1bb),_0x47478a))(v||{});const D=_0x47a61f=>_0x13b06d(new Date(+_0x47a61f))[_0x10dd51(0x1ec)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x2c7438,_0x476874)=>{const _0x39beeb=_0x10dd51,_0x2ec2d8=_0x2c7438[_0x39beeb(0x1dc)](_0x4945be),_0x5e8f3c=_0x2c7438[_0x39beeb(0x1dc)](_0x181eb7);_0x476874['forEach'](_0x33f877=>{const _0xac41ea=_0x39beeb;_0x2ec2d8[_0xac41ea(0x1f3)](_0x33f877)&&_0x476874[_0xac41ea(0x1f2)](_0x33f877);}),_0x476874[_0x39beeb(0x1db)]&&(await _0x5e8f3c[_0x39beeb(0x1dc)](_0x39beeb(0x1b4),{'params':{'userIDs':[..._0x476874]}}))[_0x39beeb(0x1f0)][_0x39beeb(0x1cf)][_0x39beeb(0x1ab)](_0x2988d6=>{const _0x1690dd=_0x39beeb;_0x2988d6&&_0x2ec2d8[_0x1690dd(0x1bd)](_0x2988d6);});};var K=Object[_0x10dd51(0x1a0)],V=(_0x3b975c,_0x3bcd25,_0x293c56,_0x37d013)=>{for(var _0x3ed374=_0x37d013>0x1?void 0x0:_0x37d013?K(_0x3bcd25,_0x293c56):_0x3bcd25,_0x56e7e0=_0x3b975c['length']-0x1,_0x3dbc0f;_0x56e7e0>=0x0;_0x56e7e0--)(_0x3dbc0f=_0x3b975c[_0x56e7e0])&&(_0x3ed374=_0x3dbc0f(_0x3ed374)||_0x3ed374);return _0x3ed374;},p=(_0x416c56,_0x5e3432)=>(_0x1c0c8c,_0x363ac3)=>_0x5e3432(_0x1c0c8c,_0x363ac3,_0x416c56);let S=class extends _0x42963d{constructor(_0x4ce056,_0x18c6c9,_0x1f818b,_0x541540){const _0x195020=_0x10dd51;super(),this['_commentService']=_0x4ce056,this[_0x195020(0x1a2)]=_0x18c6c9,this[_0x195020(0x1ee)]=_0x1f818b,this[_0x195020(0x1cb)]=_0x541540,this[_0x195020(0x1a7)](),this[_0x195020(0x1f7)]();}[_0x10dd51(0x1f7)](){const _0x292770=_0x10dd51;this[_0x292770(0x1de)](this[_0x292770(0x1a2)]['commentUpdate$']['pipe'](_0x2e1f0d(0x10))[_0x292770(0x1e6)](_0x3dbe55=>{const _0x462a7c=_0x292770,_0x2c45a0=new Set();_0x3dbe55['forEach'](_0x16ea0b=>{const _0x557a96=_0x11cb;switch(_0x16ea0b[_0x557a96(0x1f9)]){case _0x557a96(0x1e0):{const _0x3473a8=_0x16ea0b['payload']['personId'];_0x2c45a0[_0x557a96(0x1e0)](_0x3473a8);break;}}}),B(this[_0x462a7c(0x1cb)],_0x2c45a0);}));}[_0x10dd51(0x1a7)](){const _0x1c5778=_0x10dd51;this['disposeWithMe'](this[_0x1c5778(0x1eb)][_0x1c5778(0x1b5)][_0x1c5778(0x1e6)](async _0x32de80=>{const _0x222337=_0x1c5778;var _0x351913,_0x5e3a57,_0x5046df,_0x447723;const _0xca006d=(_0x351913=this[_0x222337(0x1a2)][_0x222337(0x1f5)](_0x32de80[_0x222337(0x1a8)])[_0x222337(0x1d1)](_0x48932e=>_0x48932e[_0x222337(0x1fa)]===_0x32de80[_0x222337(0x1fa)]))==null?void 0x0:_0x351913['root'];if(!_0xca006d)return;const {unitId:_0x2e0029,subUnitId:_0x42d124}=_0xca006d;switch(_0x32de80[_0x222337(0x1c9)]&&this['_userService'][_0x222337(0x1bd)](_0x32de80[_0x222337(0x1c9)]),_0x32de80[_0x222337(0x1f9)]){case v[_0x222337(0x1ae)]:break;case v[_0x222337(0x1d4)]:{this[_0x222337(0x1a2)][_0x222337(0x1be)](_0x2e0029,_0x42d124,{'unitId':_0x2e0029,'subUnitId':_0x42d124,'ref':'','id':_0x32de80[_0x222337(0x1a5)],'dT':D(+_0x32de80[_0x222337(0x1b1)]),'threadId':_0x32de80[_0x222337(0x1fa)],'personId':(_0x5046df=(_0x5e3a57=_0x32de80[_0x222337(0x1c9)])==null?void 0x0:_0x5e3a57['userID'])!=null?_0x5046df:_0x32de80[_0x222337(0x1ea)],'text':JSON[_0x222337(0x1ff)](_0x32de80['content']),'parentId':_0xca006d['id']});break;}case v[_0x222337(0x1cc)]:{const _0x4bed65=this[_0x222337(0x1a2)][_0x222337(0x1ad)](_0x2e0029,_0x42d124,_0x32de80[_0x222337(0x1a5)]);_0x4bed65&&_0x4bed65[_0x222337(0x1f8)]&&this[_0x222337(0x1a2)][_0x222337(0x1fd)](_0x2e0029,_0x42d124,_0x32de80['replyId']);break;}case v[_0x222337(0x1c4)]:{this[_0x222337(0x1a2)][_0x222337(0x1df)](_0x2e0029,_0x42d124,{'commentId':_0x32de80[_0x222337(0x1a5)],'text':JSON[_0x222337(0x1ff)](_0x32de80[_0x222337(0x1a3)])});break;}case v[_0x222337(0x1e4)]:{const _0x3bf972=(_0x447723=this[_0x222337(0x1a2)][_0x222337(0x1f5)](_0x32de80['unitId'])[_0x222337(0x1d1)](_0xc63f0d=>_0xc63f0d[_0x222337(0x1fa)]===_0x32de80['threadId']))==null?void 0x0:_0x447723[_0x222337(0x1fb)];_0x3bf972&&this[_0x222337(0x1a2)][_0x222337(0x1c1)](_0x2e0029,_0x42d124,_0x3bf972['id'],_0x32de80['solved']===I[_0x222337(0x1ac)]);break;}}}));}};S=V([p(0x0,_0x2f4fe1(_0x480a02)),p(0x1,_0x2f4fe1(_0x33888f)),p(0x2,_0x2f4fe1(_0x4945be)),p(0x3,_0x2f4fe1(_0x36f8f1))],S);const z=_0x10dd51(0x1c8),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5107cd,_0x4540ab,_0x3dc2d2,_0x34b0d2)=>{const _0x104726=_0x10dd51;for(var _0x576fe5=_0x34b0d2>0x1?void 0x0:_0x34b0d2?k(_0x4540ab,_0x3dc2d2):_0x4540ab,_0x950792=_0x5107cd[_0x104726(0x1ba)]-0x1,_0x673bac;_0x950792>=0x0;_0x950792--)(_0x673bac=_0x5107cd[_0x950792])&&(_0x576fe5=_0x673bac(_0x576fe5)||_0x576fe5);return _0x576fe5;},_=(_0x2be1fb,_0x2c3fcc)=>(_0x29ae54,_0xef4bc)=>_0x2c3fcc(_0x29ae54,_0xef4bc,_0x2be1fb);function X(_0x5a3b0f,_0x19c30e){const _0x2cfd35=_0x10dd51,_0x39bafd=_0x5a3b0f[_0x2cfd35(0x1bc)][0x0];return{..._0x19c30e,'id':_0x39bafd[_0x2cfd35(0x1a5)],'resolved':_0x5a3b0f[_0x2cfd35(0x1a9)]===0x1,'dT':D(_0x39bafd['createTimestamp']),'personId':_0x39bafd['userId'],'threadId':_0x39bafd[_0x2cfd35(0x1fa)]};}function _0x19f0(){const _0xfb680b=['_userService','filter','body','symbol','delete','getUser','reply','getUnit','_configService','_initUserSync','parentId','type','threadId','root','ref','deleteComment','comment','parse','getOwnPropertyDescriptor','_threadCommentDataSourceService','_threadCommentModel','content','post','replyId','OpenOrReOpen','_init','unitId','solved','rangeType','forEach','Solved','getComment','Add','pluginName','_httpService','createTimestamp','38524TSZSNL','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/universer-api/user/list','commentUpdate$','COMMENT','10xvRKow','saveCommentToSnapshot','requireSession','length','UNRECOGNIZED','replies','addUser','addComment','getMemberID','7cIeESQ','resolveComment','values','getCurrentUser','Edit','onStarting','comments','setConfig','thread-comment-data-source.config','user','/add','_injector','Delete','1119918FkAfKu','3585ENSGRb','users','customRanges','find','map','/delete','Reply','1264864IWwLUa','/reply','4196LvXbnw','_config','27951543SnPJcQ','rangeId','size','get','3171544HcFjPy','disposeWithMe','updateComment','add','error','1946547RGVrHi','_threadCommentDataSource','Solve','_initDataSource','subscribe','_sessionService','defineProperty','/universer-api/comment/unit/','userId','_commentService','format','code'];_0x19f0=function(){return _0xfb680b;};return _0x19f0();}function ee(_0x21dbfb,_0x3f0b9e,_0x102120){const _0x2bc455=_0x10dd51;var _0x4b7ba9,_0x4431b5;if(((_0x4431b5=(_0x4b7ba9=_0x21dbfb==null?void 0x0:_0x21dbfb[_0x2bc455(0x1bc)])==null?void 0x0:_0x4b7ba9[_0x2bc455(0x1ba)])!=null?_0x4431b5:0x0)>0x0){const _0x4a8e0c=(_0x1c5b0a,_0x34b27d)=>({'id':_0x1c5b0a[_0x2bc455(0x1a5)],'threadId':_0x1c5b0a[_0x2bc455(0x1fa)],'dT':D(_0x1c5b0a[_0x2bc455(0x1b1)]),'personId':_0x1c5b0a[_0x2bc455(0x1ea)],'resolved':_0x21dbfb[_0x2bc455(0x1a9)]===I['Solved'],'unitId':_0x3f0b9e,'subUnitId':_0x102120,'text':JSON[_0x2bc455(0x1ff)](_0x1c5b0a[_0x2bc455(0x1a3)]),'parentId':_0x34b27d}),_0x465812=_0x4a8e0c(_0x21dbfb[_0x2bc455(0x1bc)][0x0]);return{..._0x465812,'children':_0x21dbfb[_0x2bc455(0x1bc)]['slice'](0x1)['map'](_0x40a8d5=>_0x4a8e0c(_0x40a8d5,_0x465812['id']))};}return null;}let f=class{constructor(_0x34854e,_0x4f12e8,_0x212f20,_0x307da2){const _0x3f16fd=_0x10dd51;this[_0x3f16fd(0x1b0)]=_0x34854e,this[_0x3f16fd(0x1ee)]=_0x4f12e8,this[_0x3f16fd(0x1e7)]=_0x212f20,this[_0x3f16fd(0x1cb)]=_0x307da2;}async[_0x10dd51(0x1be)](_0x1b730b){const _0x5ac165=_0x10dd51;var _0x1ad724,_0x474259;const {parentId:_0xd17921,unitId:_0x4e0ab2,text:_0x430c78,threadId:_0x879d1f}=_0x1b730b,_0x237901=(_0x474259=(_0x1ad724=_0x430c78['customRanges'])==null?void 0x0:_0x1ad724[_0x5ac165(0x1ef)](_0x188c49=>_0x188c49[_0x5ac165(0x1aa)]===_0x5b13ae['COMMENT'])[_0x5ac165(0x1d2)](_0x48dd16=>_0x48dd16[_0x5ac165(0x1da)]))!=null?_0x474259:[],_0x10521c=JSON['stringify'](_0x430c78),_0x59c8c1=(await this[_0x5ac165(0x1e7)][_0x5ac165(0x1b9)](_0x4e0ab2))[_0x5ac165(0x1bf)]();if(_0xd17921){const _0x36f6fd={'memberId':_0x59c8c1,'unitId':_0x4e0ab2,'content':_0x10521c,'mention':_0x237901,'threadId':_0x879d1f},_0x194a8b=(await this[_0x5ac165(0x1b0)][_0x5ac165(0x1a4)](_0x5ac165(0x1e9)+_0x4e0ab2+_0x5ac165(0x1d6),{'body':_0x36f6fd}))[_0x5ac165(0x1f0)][_0x5ac165(0x1f4)];return{..._0x1b730b,'id':_0x194a8b[_0x5ac165(0x1a5)],'dT':_0x13b06d(+_0x194a8b[_0x5ac165(0x1b1)])[_0x5ac165(0x1ec)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x194a8b[_0x5ac165(0x1ea)]};}else{const _0x100bd8={'memberId':_0x59c8c1,'unitId':_0x4e0ab2,'content':_0x10521c,'mention':_0x237901},_0x3a3d93=await this[_0x5ac165(0x1b0)][_0x5ac165(0x1a4)]('/universer-api/comment/unit/'+_0x4e0ab2+_0x5ac165(0x1ca),{'body':_0x100bd8});return X(_0x3a3d93[_0x5ac165(0x1f0)][_0x5ac165(0x1fe)],_0x1b730b);}}async[_0x10dd51(0x1df)](_0x5d22ad){const _0x5925fa=_0x10dd51;var _0x5dcf4a,_0x42696d;const {text:_0x36b18c,unitId:_0xa798c5}=_0x5d22ad,_0xe68161=(_0x42696d=(_0x5dcf4a=_0x36b18c[_0x5925fa(0x1d0)])==null?void 0x0:_0x5dcf4a[_0x5925fa(0x1ef)](_0x12bbf8=>_0x12bbf8[_0x5925fa(0x1aa)]===_0x5b13ae[_0x5925fa(0x1b6)])['map'](_0x56f75f=>_0x56f75f['rangeId']))!=null?_0x42696d:[],_0x3a0ec8=JSON['stringify'](_0x36b18c),_0x277e88=_0x5d22ad[_0x5925fa(0x1fa)],_0x5b7b17=_0x5d22ad['id'],_0x28f7df={'memberId':(await this[_0x5925fa(0x1e7)][_0x5925fa(0x1b9)](_0xa798c5))['getMemberID'](),'unitId':_0xa798c5,'threadId':_0x277e88,'mention':_0xe68161,'content':_0x3a0ec8,'replyId':_0x5b7b17},_0x1b15af=await this[_0x5925fa(0x1b0)][_0x5925fa(0x1a4)](_0x5925fa(0x1e9)+_0xa798c5+'/edit',{'body':_0x28f7df});return!_0x1b15af['body'][_0x5925fa(0x1e1)]||_0x1b15af[_0x5925fa(0x1f0)][_0x5925fa(0x1e1)][_0x5925fa(0x1ed)]===0x1;}async['resolveComment'](_0x553a18){const _0x5b20be=_0x10dd51,{unitId:_0x4a9933}=_0x553a18,_0x169aed=_0x553a18['threadId'],_0x5cf1f5={'memberId':this[_0x5b20be(0x1ee)][_0x5b20be(0x1c3)]()['userID'],'unitId':_0x4a9933,'threadId':_0x169aed,'solved':_0x553a18['resolved']?I[_0x5b20be(0x1ac)]:I['OpenOrReOpen']},_0xe6ad43=await this[_0x5b20be(0x1b0)][_0x5b20be(0x1a4)]('/universer-api/comment/unit/'+_0x4a9933+'/solved',{'body':_0x5cf1f5});return!_0xe6ad43[_0x5b20be(0x1f0)]['error']||_0xe6ad43[_0x5b20be(0x1f0)]['error'][_0x5b20be(0x1ed)]===0x1;}async[_0x10dd51(0x1fd)](_0x31f4ea,_0x2b351f,_0x423d3d,_0x5647ce){const _0x4fc712=_0x10dd51,_0x59f71b={'memberId':(await this[_0x4fc712(0x1e7)][_0x4fc712(0x1b9)](_0x31f4ea))['getMemberID'](),'threadId':_0x423d3d,'replyId':_0x5647ce,'unitId':_0x31f4ea},_0x3089c0=await this[_0x4fc712(0x1b0)]['post'](_0x4fc712(0x1e9)+_0x31f4ea+_0x4fc712(0x1d3),{'body':_0x59f71b});return!_0x3089c0['body']['error']||_0x3089c0['body'][_0x4fc712(0x1e1)][_0x4fc712(0x1ed)]===0x1;}async['listComments'](_0x16e185,_0x25a2ff,_0x26c951){const _0x56ef58=_0x10dd51,_0x1415d6={'unitId':_0x16e185,'threadId':_0x26c951},_0xdb5897=await this[_0x56ef58(0x1b0)][_0x56ef58(0x1a4)](_0x56ef58(0x1e9)+_0x16e185+'/list',{'body':_0x1415d6}),_0x14f46d=_0x26c951[_0x56ef58(0x1d2)](_0x11f78b=>ee(_0xdb5897[_0x56ef58(0x1f0)][_0x56ef58(0x1c6)][_0x11f78b],_0x16e185,_0x25a2ff))[_0x56ef58(0x1ef)](Boolean);return Object[_0x56ef58(0x1c2)](_0xdb5897['body']['users'])[_0x56ef58(0x1ab)](_0x39532c=>{const _0x347fc1=_0x56ef58;this[_0x347fc1(0x1ee)]['addUser'](_0x39532c);}),_0x14f46d;}[_0x10dd51(0x1b8)](_0x3c7911){const _0x180999=_0x10dd51;return{'id':_0x3c7911['id'],'threadId':_0x3c7911['threadId'],'ref':_0x3c7911[_0x180999(0x1fc)]};}};f=Q([_(0x0,_0x2f4fe1(_0x181eb7)),_(0x1,_0x2f4fe1(_0x4945be)),_(0x2,_0x2f4fe1(_0xa13fb7)),_(0x3,_0x2f4fe1(_0x36f8f1))],f);var re=Object[_0x10dd51(0x1a0)],te=(_0x2e3938,_0x520446,_0x12145a,_0x4cface)=>{const _0x5dd3fc=_0x10dd51;for(var _0x27befd=_0x4cface>0x1?void 0x0:_0x4cface?re(_0x520446,_0x12145a):_0x520446,_0x226c48=_0x2e3938[_0x5dd3fc(0x1ba)]-0x1,_0x482e6a;_0x226c48>=0x0;_0x226c48--)(_0x482e6a=_0x2e3938[_0x226c48])&&(_0x27befd=_0x482e6a(_0x27befd)||_0x27befd);return _0x27befd;},N=(_0x17c323,_0x443b7d)=>(_0x10196c,_0x20f974)=>_0x443b7d(_0x10196c,_0x20f974,_0x17c323);let g=class extends _0x42963d{constructor(_0x331994,_0x1196dd){const _0x144bdd=_0x10dd51;super(),this['_threadCommentDataSourceService']=_0x331994,this['_threadCommentDataSource']=_0x1196dd,this[_0x144bdd(0x1e5)]();}['_initDataSource'](){const _0x4e0553=_0x10dd51;this[_0x4e0553(0x1a1)]['dataSource']=this[_0x4e0553(0x1e3)],this[_0x4e0553(0x1a1)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x2d29f0),N(0x1,_0x2f4fe1(f))],g);var se=Object[_0x10dd51(0x1e8)],oe=Object[_0x10dd51(0x1a0)],ne=(_0x543418,_0x21c9ac,_0x25fac4)=>_0x21c9ac in _0x543418?se(_0x543418,_0x21c9ac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x25fac4}):_0x543418[_0x21c9ac]=_0x25fac4,ie=(_0x5f0bb1,_0x24b37f,_0x561555,_0xaba4b1)=>{const _0x2eb2a8=_0x10dd51;for(var _0x5d1f8a=_0xaba4b1>0x1?void 0x0:_0xaba4b1?oe(_0x24b37f,_0x561555):_0x24b37f,_0x1261f3=_0x5f0bb1[_0x2eb2a8(0x1ba)]-0x1,_0x550eaf;_0x1261f3>=0x0;_0x1261f3--)(_0x550eaf=_0x5f0bb1[_0x1261f3])&&(_0x5d1f8a=_0x550eaf(_0x5d1f8a)||_0x5d1f8a);return _0x5d1f8a;},w=(_0x118886,_0x4fd5f0)=>(_0x1518c9,_0x4e069a)=>_0x4fd5f0(_0x1518c9,_0x4e069a,_0x118886),$=(_0x5571b2,_0x275438,_0x113773)=>ne(_0x5571b2,typeof _0x275438!=_0x10dd51(0x1f1)?_0x275438+'':_0x275438,_0x113773);let b=class extends _0x424e35{constructor(_0x3ea8dd=M,_0x56b00e,_0x3fb8a7){const _0x1ced53=_0x10dd51;super(),this[_0x1ced53(0x1d8)]=_0x3ea8dd,this[_0x1ced53(0x1cb)]=_0x56b00e,this[_0x1ced53(0x1f6)]=_0x3fb8a7;const {..._0x4a2325}=_0x3c064f({},M,this[_0x1ced53(0x1d8)]);this[_0x1ced53(0x1f6)][_0x1ced53(0x1c7)](z,_0x4a2325);}[_0x10dd51(0x1c5)](){[[f],[g],[S]]['forEach'](_0x58b7fa=>{const _0x422f4e=_0x11cb;this[_0x422f4e(0x1cb)][_0x422f4e(0x1e0)](_0x58b7fa);});}['onReady'](){const _0x127c24=_0x10dd51;this[_0x127c24(0x1cb)][_0x127c24(0x1dc)](g),this[_0x127c24(0x1cb)]['get'](S);}};$(b,_0x10dd51(0x1af),W),$(b,_0x10dd51(0x1f9),_0x472341['UNIVER_UNKNOWN']),b=ie([_0x1c23a3(_0x589ee4,_0x349d8d,_0x46f06c),w(0x1,_0x2f4fe1(_0x36f8f1)),w(0x2,_0x18ac02)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x57bc55=_0x3c4a;(function(_0x487028,_0x8b70ab){const _0x45bc50=_0x3c4a,_0x2eefa2=_0x487028();while(!![]){try{const _0x45c18d=-parseInt(_0x45bc50(0x9c))/0x1+-parseInt(_0x45bc50(0xc4))/0x2*(-parseInt(_0x45bc50(0x93))/0x3)+-parseInt(_0x45bc50(0x83))/0x4*(-parseInt(_0x45bc50(0xb7))/0x5)+parseInt(_0x45bc50(0xab))/0x6+parseInt(_0x45bc50(0xcf))/0x7*(-parseInt(_0x45bc50(0xb6))/0x8)+parseInt(_0x45bc50(0x82))/0x9+-parseInt(_0x45bc50(0x9f))/0xa;if(_0x45c18d===_0x8b70ab)break;else _0x2eefa2['push'](_0x2eefa2['shift']());}catch(_0x443960){_0x2eefa2['push'](_0x2eefa2['shift']());}}}(_0x2cb6,0x81dca));import{CommentService as _0x522639,CollaborationSessionService as _0xddc2cb,UniverCollaborationClientPlugin as _0x94d2f7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d99ac}from'@univerjs-pro/license';import{dayjs as _0x4c2fdc,UserManagerService as _0x2abd0d,Inject as _0x4a5557,Injector as _0x5ea5e8,Disposable as _0x505c15,CustomRangeType as _0x5e7d56,UniverInstanceType as _0x58a442,DependentOn as _0x2ab32d,IConfigService as _0x3741a8,Plugin as _0x37bdb6,merge as _0x236ec6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x303987}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4c5542,IThreadCommentDataSourceService as _0x31375c}from'@univerjs/thread-comment';import{bufferTime as _0x131cf2}from'rxjs';import{HTTPService as _0x51f54d}from'@univerjs/network';const W=_0x57bc55(0xc0);var I=(_0x3e827f=>(_0x3e827f[_0x3e827f['OpenOrReOpen']=0x0]=_0x57bc55(0x92),_0x3e827f[_0x3e827f[_0x57bc55(0x9a)]=0x1]=_0x57bc55(0x9a),_0x3e827f[_0x3e827f[_0x57bc55(0xd3)]=-0x1]=_0x57bc55(0xd3),_0x3e827f))(I||{}),v=(_0xb9e1f0=>(_0xb9e1f0[_0xb9e1f0[_0x57bc55(0xc2)]=0x0]=_0x57bc55(0xc2),_0xb9e1f0[_0xb9e1f0[_0x57bc55(0xb9)]=0x1]=_0x57bc55(0xb9),_0xb9e1f0[_0xb9e1f0[_0x57bc55(0xa5)]=0x2]=_0x57bc55(0xa5),_0xb9e1f0[_0xb9e1f0['Edit']=0x3]=_0x57bc55(0xd2),_0xb9e1f0[_0xb9e1f0[_0x57bc55(0x9e)]=0x4]='Delete',_0xb9e1f0[_0xb9e1f0[_0x57bc55(0x89)]=0x5]=_0x57bc55(0x89),_0xb9e1f0[_0xb9e1f0[_0x57bc55(0xd3)]=-0x1]=_0x57bc55(0xd3),_0xb9e1f0))(v||{});const D=_0x52089=>_0x4c2fdc(new Date(+_0x52089))['format'](_0x57bc55(0x91)),B=async(_0x50df37,_0x3b2f95)=>{const _0x3f88e3=_0x57bc55,_0x487abc=_0x50df37[_0x3f88e3(0xe4)](_0x2abd0d),_0x43826c=_0x50df37[_0x3f88e3(0xe4)](_0x51f54d);_0x3b2f95['forEach'](_0x2b7131=>{const _0x56db1f=_0x3f88e3;_0x487abc[_0x56db1f(0x86)](_0x2b7131)&&_0x3b2f95[_0x56db1f(0xcd)](_0x2b7131);}),_0x3b2f95[_0x3f88e3(0xe5)]&&(await _0x43826c['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x3b2f95]}}))['body'][_0x3f88e3(0xae)][_0x3f88e3(0x8e)](_0x2f09a7=>{const _0x6bb3b9=_0x3f88e3;_0x2f09a7&&_0x487abc[_0x6bb3b9(0xd7)](_0x2f09a7);});};var K=Object[_0x57bc55(0xbc)],V=(_0xd504ce,_0x3e3bab,_0x47edde,_0x399105)=>{const _0x4e9da1=_0x57bc55;for(var _0xe60486=_0x399105>0x1?void 0x0:_0x399105?K(_0x3e3bab,_0x47edde):_0x3e3bab,_0x1865f3=_0xd504ce[_0x4e9da1(0x88)]-0x1,_0x37021f;_0x1865f3>=0x0;_0x1865f3--)(_0x37021f=_0xd504ce[_0x1865f3])&&(_0xe60486=_0x37021f(_0xe60486)||_0xe60486);return _0xe60486;},p=(_0xa74daa,_0x2d8f54)=>(_0x51a935,_0x5c14bc)=>_0x2d8f54(_0x51a935,_0x5c14bc,_0xa74daa);let S=class extends _0x505c15{constructor(_0x2a41c1,_0x561936,_0x3c408d,_0x4d2532){const _0x1ce3b9=_0x57bc55;super(),this[_0x1ce3b9(0xbb)]=_0x2a41c1,this[_0x1ce3b9(0xe3)]=_0x561936,this['_userService']=_0x3c408d,this[_0x1ce3b9(0x9b)]=_0x4d2532,this['_init'](),this['_initUserSync']();}['_initUserSync'](){const _0x18723a=_0x57bc55;this['disposeWithMe'](this['_threadCommentModel'][_0x18723a(0xa4)]['pipe'](_0x131cf2(0x10))[_0x18723a(0xbd)](_0x12c953=>{const _0x3e3b38=_0x18723a,_0x5f25f1=new Set();_0x12c953[_0x3e3b38(0x8e)](_0x4c5714=>{const _0x42a67c=_0x3e3b38;switch(_0x4c5714[_0x42a67c(0xdc)]){case _0x42a67c(0x8a):{const _0x10e67a=_0x4c5714[_0x42a67c(0xc7)][_0x42a67c(0xb8)];_0x5f25f1[_0x42a67c(0x8a)](_0x10e67a);break;}}}),B(this[_0x3e3b38(0x9b)],_0x5f25f1);}));}['_init'](){const _0x5e943e=_0x57bc55;this[_0x5e943e(0xbf)](this[_0x5e943e(0xbb)][_0x5e943e(0xa4)][_0x5e943e(0xbd)](async _0x4a37fa=>{const _0x66bdf3=_0x5e943e;var _0x4c2111,_0x693ca0,_0x19e5ed,_0x4531aa;const _0x2ffdb6=(_0x4c2111=this['_threadCommentModel'][_0x66bdf3(0xa8)](_0x4a37fa['unitId'])[_0x66bdf3(0xe0)](_0x243cdd=>_0x243cdd[_0x66bdf3(0x96)]===_0x4a37fa[_0x66bdf3(0x96)]))==null?void 0x0:_0x4c2111[_0x66bdf3(0xb5)];if(!_0x2ffdb6)return;const {unitId:_0x415abb,subUnitId:_0x20f5d7}=_0x2ffdb6;switch(_0x4a37fa['user']&&this['_userService'][_0x66bdf3(0xd7)](_0x4a37fa['user']),_0x4a37fa[_0x66bdf3(0xdc)]){case v[_0x66bdf3(0xb9)]:break;case v['Reply']:{this[_0x66bdf3(0xe3)][_0x66bdf3(0xce)](_0x415abb,_0x20f5d7,{'unitId':_0x415abb,'subUnitId':_0x20f5d7,'ref':'','id':_0x4a37fa[_0x66bdf3(0xd5)],'dT':D(+_0x4a37fa['createTimestamp']),'threadId':_0x4a37fa[_0x66bdf3(0x96)],'personId':(_0x19e5ed=(_0x693ca0=_0x4a37fa[_0x66bdf3(0xaf)])==null?void 0x0:_0x693ca0[_0x66bdf3(0xd6)])!=null?_0x19e5ed:_0x4a37fa[_0x66bdf3(0xb3)],'text':JSON[_0x66bdf3(0xca)](_0x4a37fa['content']),'parentId':_0x2ffdb6['id']});break;}case v['Delete']:{const _0xec162f=this[_0x66bdf3(0xe3)]['getComment'](_0x415abb,_0x20f5d7,_0x4a37fa['replyId']);_0xec162f&&_0xec162f[_0x66bdf3(0xd9)]&&this[_0x66bdf3(0xe3)][_0x66bdf3(0x84)](_0x415abb,_0x20f5d7,_0x4a37fa['replyId']);break;}case v[_0x66bdf3(0xd2)]:{this[_0x66bdf3(0xe3)][_0x66bdf3(0xdd)](_0x415abb,_0x20f5d7,{'commentId':_0x4a37fa['replyId'],'text':JSON[_0x66bdf3(0xca)](_0x4a37fa[_0x66bdf3(0x87)])});break;}case v[_0x66bdf3(0x89)]:{const _0x3c89b3=(_0x4531aa=this[_0x66bdf3(0xe3)][_0x66bdf3(0xa8)](_0x4a37fa['unitId'])[_0x66bdf3(0xe0)](_0x5ae08e=>_0x5ae08e['threadId']===_0x4a37fa[_0x66bdf3(0x96)]))==null?void 0x0:_0x4531aa['root'];_0x3c89b3&&this['_threadCommentModel'][_0x66bdf3(0x85)](_0x415abb,_0x20f5d7,_0x3c89b3['id'],_0x4a37fa[_0x66bdf3(0x94)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x4a5557(_0x522639)),p(0x1,_0x4a5557(_0x4c5542)),p(0x2,_0x4a5557(_0x2abd0d)),p(0x3,_0x4a5557(_0x5ea5e8))],S);function _0x2cb6(){const _0x49feaa=['_initDataSource','/reply','Edit','UNRECOGNIZED','onStarting','replyId','userID','addUser','_httpService','parentId','body','COMMENT','type','updateComment','/list','createTimestamp','find','UNIVER_UNKNOWN','_threadCommentDataSource','_threadCommentModel','get','size','2019015VwPGcL','36ztMjzj','deleteComment','resolveComment','getUser','content','length','Solve','add','_threadCommentDataSourceService','rangeType','_sessionService','forEach','resolved','replies','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','6QlAeGj','solved','setConfig','threadId','_userService','getCurrentUser','defineProperty','Solved','_injector','132481NSrgVM','requireSession','Delete','5367570nqRvmW','slice','thread-comment-data-source.config','post','stringify','commentUpdate$','Reply','rangeId','values','getUnit','comment','_config','6168654JlKtlm','/universer-api/comment/unit/','saveCommentToSnapshot','users','user','/solved','error','comments','userId','map','root','8HgThsM','48155NceoQK','personId','Add','reply','_commentService','getOwnPropertyDescriptor','subscribe','filter','disposeWithMe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/add','Unknown','getMemberID','814846QkPktG','listComments','ref','payload','format','dataSource','parse','syncUpdateMutationToColla','customRanges','delete','addComment','6669719MFnaDf'];_0x2cb6=function(){return _0x49feaa;};return _0x2cb6();}function _0x3c4a(_0x312b2f,_0xb807b2){const _0x2cb634=_0x2cb6();return _0x3c4a=function(_0x3c4a06,_0x5569d8){_0x3c4a06=_0x3c4a06-0x82;let _0x983530=_0x2cb634[_0x3c4a06];return _0x983530;},_0x3c4a(_0x312b2f,_0xb807b2);}const z=_0x57bc55(0xa1),M={};var k=Object[_0x57bc55(0xbc)],Q=(_0xbfdef6,_0x4c6c49,_0x5df54e,_0x56d66e)=>{const _0x7a7030=_0x57bc55;for(var _0x556108=_0x56d66e>0x1?void 0x0:_0x56d66e?k(_0x4c6c49,_0x5df54e):_0x4c6c49,_0x1c829c=_0xbfdef6[_0x7a7030(0x88)]-0x1,_0x27117e;_0x1c829c>=0x0;_0x1c829c--)(_0x27117e=_0xbfdef6[_0x1c829c])&&(_0x556108=_0x27117e(_0x556108)||_0x556108);return _0x556108;},_=(_0x3684e5,_0x28f502)=>(_0x2a89af,_0xc0d68d)=>_0x28f502(_0x2a89af,_0xc0d68d,_0x3684e5);function X(_0x6d04d8,_0x29ec24){const _0x3a5532=_0x57bc55,_0x50be63=_0x6d04d8[_0x3a5532(0x90)][0x0];return{..._0x29ec24,'id':_0x50be63['replyId'],'resolved':_0x6d04d8[_0x3a5532(0x94)]===0x1,'dT':D(_0x50be63['createTimestamp']),'personId':_0x50be63['userId'],'threadId':_0x50be63[_0x3a5532(0x96)]};}function ee(_0x30ccc8,_0x396cdb,_0x1d76ef){const _0x41f004=_0x57bc55;var _0x3a22b0,_0x1f018d;if(((_0x1f018d=(_0x3a22b0=_0x30ccc8==null?void 0x0:_0x30ccc8[_0x41f004(0x90)])==null?void 0x0:_0x3a22b0[_0x41f004(0x88)])!=null?_0x1f018d:0x0)>0x0){const _0x180bc4=(_0x30206a,_0x1b7b45)=>({'id':_0x30206a[_0x41f004(0xd5)],'threadId':_0x30206a[_0x41f004(0x96)],'dT':D(_0x30206a[_0x41f004(0xdf)]),'personId':_0x30206a['userId'],'resolved':_0x30ccc8[_0x41f004(0x94)]===I[_0x41f004(0x9a)],'unitId':_0x396cdb,'subUnitId':_0x1d76ef,'text':JSON[_0x41f004(0xca)](_0x30206a['content']),'parentId':_0x1b7b45}),_0x1d6e60=_0x180bc4(_0x30ccc8[_0x41f004(0x90)][0x0]);return{..._0x1d6e60,'children':_0x30ccc8[_0x41f004(0x90)][_0x41f004(0xa0)](0x1)[_0x41f004(0xb4)](_0x22f349=>_0x180bc4(_0x22f349,_0x1d6e60['id']))};}return null;}let f=class{constructor(_0x281d98,_0x3617a0,_0x3f96a3,_0x1eb2f3){const _0x2af29d=_0x57bc55;this[_0x2af29d(0xd8)]=_0x281d98,this[_0x2af29d(0x97)]=_0x3617a0,this[_0x2af29d(0x8d)]=_0x3f96a3,this[_0x2af29d(0x9b)]=_0x1eb2f3;}async[_0x57bc55(0xce)](_0x58d471){const _0x583f43=_0x57bc55;var _0x1e1d79,_0x44e218;const {parentId:_0x15dfaf,unitId:_0x27ddb6,text:_0x4b65e1,threadId:_0x58be55}=_0x58d471,_0x3a8320=(_0x44e218=(_0x1e1d79=_0x4b65e1['customRanges'])==null?void 0x0:_0x1e1d79[_0x583f43(0xbe)](_0x191a73=>_0x191a73['rangeType']===_0x5e7d56[_0x583f43(0xdb)])[_0x583f43(0xb4)](_0x217fa3=>_0x217fa3[_0x583f43(0xa6)]))!=null?_0x44e218:[],_0x4db3cc=JSON[_0x583f43(0xa3)](_0x4b65e1),_0x19f6a0=(await this[_0x583f43(0x8d)][_0x583f43(0x9d)](_0x27ddb6))[_0x583f43(0xc3)]();if(_0x15dfaf){const _0x4e6b33={'memberId':_0x19f6a0,'unitId':_0x27ddb6,'content':_0x4db3cc,'mention':_0x3a8320,'threadId':_0x58be55},_0x573766=(await this[_0x583f43(0xd8)]['post']('/universer-api/comment/unit/'+_0x27ddb6+_0x583f43(0xd1),{'body':_0x4e6b33}))[_0x583f43(0xda)][_0x583f43(0xba)];return{..._0x58d471,'id':_0x573766[_0x583f43(0xd5)],'dT':_0x4c2fdc(+_0x573766[_0x583f43(0xdf)])[_0x583f43(0xc8)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x573766[_0x583f43(0xb3)]};}else{const _0x281286={'memberId':_0x19f6a0,'unitId':_0x27ddb6,'content':_0x4db3cc,'mention':_0x3a8320},_0x26ce9a=await this[_0x583f43(0xd8)][_0x583f43(0xa2)](_0x583f43(0xac)+_0x27ddb6+_0x583f43(0xc1),{'body':_0x281286});return X(_0x26ce9a[_0x583f43(0xda)][_0x583f43(0xa9)],_0x58d471);}}async[_0x57bc55(0xdd)](_0x4e5af5){const _0x52e80a=_0x57bc55;var _0x22f13d,_0x1e83df;const {text:_0x178021,unitId:_0x261054}=_0x4e5af5,_0x1728e3=(_0x1e83df=(_0x22f13d=_0x178021[_0x52e80a(0xcc)])==null?void 0x0:_0x22f13d[_0x52e80a(0xbe)](_0x3dd7fe=>_0x3dd7fe[_0x52e80a(0x8c)]===_0x5e7d56['COMMENT'])[_0x52e80a(0xb4)](_0x10e0dd=>_0x10e0dd[_0x52e80a(0xa6)]))!=null?_0x1e83df:[],_0x1c3add=JSON[_0x52e80a(0xa3)](_0x178021),_0x280457=_0x4e5af5[_0x52e80a(0x96)],_0x36d19f=_0x4e5af5['id'],_0x2649f9={'memberId':(await this['_sessionService'][_0x52e80a(0x9d)](_0x261054))[_0x52e80a(0xc3)](),'unitId':_0x261054,'threadId':_0x280457,'mention':_0x1728e3,'content':_0x1c3add,'replyId':_0x36d19f},_0x308175=await this[_0x52e80a(0xd8)][_0x52e80a(0xa2)](_0x52e80a(0xac)+_0x261054+'/edit',{'body':_0x2649f9});return!_0x308175[_0x52e80a(0xda)][_0x52e80a(0xb1)]||_0x308175['body'][_0x52e80a(0xb1)]['code']===0x1;}async[_0x57bc55(0x85)](_0x123b66){const _0x580ff1=_0x57bc55,{unitId:_0x45bead}=_0x123b66,_0x3c92f0=_0x123b66[_0x580ff1(0x96)],_0x95469c={'memberId':this[_0x580ff1(0x97)][_0x580ff1(0x98)]()['userID'],'unitId':_0x45bead,'threadId':_0x3c92f0,'solved':_0x123b66[_0x580ff1(0x8f)]?I[_0x580ff1(0x9a)]:I['OpenOrReOpen']},_0x4a1307=await this['_httpService'][_0x580ff1(0xa2)]('/universer-api/comment/unit/'+_0x45bead+_0x580ff1(0xb0),{'body':_0x95469c});return!_0x4a1307[_0x580ff1(0xda)]['error']||_0x4a1307['body']['error']['code']===0x1;}async[_0x57bc55(0x84)](_0x2c1a3d,_0x4f5e6f,_0x6fd82,_0x3a83c1){const _0x4227d7=_0x57bc55,_0x3cd393={'memberId':(await this[_0x4227d7(0x8d)][_0x4227d7(0x9d)](_0x2c1a3d))[_0x4227d7(0xc3)](),'threadId':_0x6fd82,'replyId':_0x3a83c1,'unitId':_0x2c1a3d},_0xe92c51=await this[_0x4227d7(0xd8)][_0x4227d7(0xa2)](_0x4227d7(0xac)+_0x2c1a3d+'/delete',{'body':_0x3cd393});return!_0xe92c51[_0x4227d7(0xda)][_0x4227d7(0xb1)]||_0xe92c51[_0x4227d7(0xda)]['error']['code']===0x1;}async[_0x57bc55(0xc5)](_0x5810d0,_0x1febef,_0x345299){const _0x1c0844=_0x57bc55,_0x59e421={'unitId':_0x5810d0,'threadId':_0x345299},_0x51fcab=await this[_0x1c0844(0xd8)][_0x1c0844(0xa2)](_0x1c0844(0xac)+_0x5810d0+_0x1c0844(0xde),{'body':_0x59e421}),_0x29d7b2=_0x345299['map'](_0x37c3d4=>ee(_0x51fcab[_0x1c0844(0xda)][_0x1c0844(0xb2)][_0x37c3d4],_0x5810d0,_0x1febef))[_0x1c0844(0xbe)](Boolean);return Object[_0x1c0844(0xa7)](_0x51fcab[_0x1c0844(0xda)]['users'])[_0x1c0844(0x8e)](_0x5bda53=>{const _0x5f226a=_0x1c0844;this[_0x5f226a(0x97)]['addUser'](_0x5bda53);}),_0x29d7b2;}[_0x57bc55(0xad)](_0x4ff27f){const _0x36b34e=_0x57bc55;return{'id':_0x4ff27f['id'],'threadId':_0x4ff27f[_0x36b34e(0x96)],'ref':_0x4ff27f[_0x36b34e(0xc6)]};}};f=Q([_(0x0,_0x4a5557(_0x51f54d)),_(0x1,_0x4a5557(_0x2abd0d)),_(0x2,_0x4a5557(_0xddc2cb)),_(0x3,_0x4a5557(_0x5ea5e8))],f);var re=Object[_0x57bc55(0xbc)],te=(_0x4ee1b8,_0xe6f83,_0x4984dc,_0xb84bf5)=>{const _0x20b69d=_0x57bc55;for(var _0xa60cda=_0xb84bf5>0x1?void 0x0:_0xb84bf5?re(_0xe6f83,_0x4984dc):_0xe6f83,_0x23319b=_0x4ee1b8[_0x20b69d(0x88)]-0x1,_0x478865;_0x23319b>=0x0;_0x23319b--)(_0x478865=_0x4ee1b8[_0x23319b])&&(_0xa60cda=_0x478865(_0xa60cda)||_0xa60cda);return _0xa60cda;},N=(_0x110cc6,_0x26f303)=>(_0x35d264,_0x45057b)=>_0x26f303(_0x35d264,_0x45057b,_0x110cc6);let g=class extends _0x505c15{constructor(_0x1e7bfa,_0x912d59){const _0x218e34=_0x57bc55;super(),this[_0x218e34(0x8b)]=_0x1e7bfa,this[_0x218e34(0xe2)]=_0x912d59,this['_initDataSource']();}[_0x57bc55(0xd0)](){const _0x315df7=_0x57bc55;this[_0x315df7(0x8b)][_0x315df7(0xc9)]=this[_0x315df7(0xe2)],this[_0x315df7(0x8b)][_0x315df7(0xcb)]=!0x1;}};g=te([N(0x0,_0x31375c),N(0x1,_0x4a5557(f))],g);var se=Object[_0x57bc55(0x99)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x58fe0a,_0x1711f9,_0x4b91ed)=>_0x1711f9 in _0x58fe0a?se(_0x58fe0a,_0x1711f9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4b91ed}):_0x58fe0a[_0x1711f9]=_0x4b91ed,ie=(_0x2669aa,_0x3d8acd,_0x3102f2,_0x30a4cc)=>{const _0x15696a=_0x57bc55;for(var _0x53c1d3=_0x30a4cc>0x1?void 0x0:_0x30a4cc?oe(_0x3d8acd,_0x3102f2):_0x3d8acd,_0x248b3c=_0x2669aa[_0x15696a(0x88)]-0x1,_0x5a66e7;_0x248b3c>=0x0;_0x248b3c--)(_0x5a66e7=_0x2669aa[_0x248b3c])&&(_0x53c1d3=_0x5a66e7(_0x53c1d3)||_0x53c1d3);return _0x53c1d3;},w=(_0x4a2ca5,_0x147142)=>(_0x51c68a,_0x2f8e3f)=>_0x147142(_0x51c68a,_0x2f8e3f,_0x4a2ca5),$=(_0x477f51,_0x4e90c6,_0x2b9e3f)=>ne(_0x477f51,typeof _0x4e90c6!='symbol'?_0x4e90c6+'':_0x4e90c6,_0x2b9e3f);let b=class extends _0x37bdb6{constructor(_0x4be973=M,_0x42dc3e,_0x33c583){const _0xe3ca8b=_0x57bc55;super(),this[_0xe3ca8b(0xaa)]=_0x4be973,this[_0xe3ca8b(0x9b)]=_0x42dc3e,this['_configService']=_0x33c583;const {..._0x528d05}=_0x236ec6({},M,this[_0xe3ca8b(0xaa)]);this['_configService'][_0xe3ca8b(0x95)](z,_0x528d05);}[_0x57bc55(0xd4)](){const _0x7392ab=_0x57bc55;[[f],[g],[S]][_0x7392ab(0x8e)](_0x4ef12e=>{const _0x39fe6a=_0x7392ab;this[_0x39fe6a(0x9b)][_0x39fe6a(0x8a)](_0x4ef12e);});}['onReady'](){const _0x1744f9=_0x57bc55;this[_0x1744f9(0x9b)][_0x1744f9(0xe4)](g),this[_0x1744f9(0x9b)][_0x1744f9(0xe4)](S);}};$(b,'pluginName',W),$(b,_0x57bc55(0xdc),_0x58a442[_0x57bc55(0xe1)]),b=ie([_0x2ab32d(_0x303987,_0x94d2f7,_0x5d99ac),w(0x1,_0x4a5557(_0x5ea5e8)),w(0x2,_0x3741a8)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x5c75(_0x219229,_0x2b1b81){const _0x10a129=_0x10a1();return _0x5c75=function(_0x5c75ef,_0x2cc3b0){_0x5c75ef=_0x5c75ef-0x19f;let _0x3cc356=_0x10a129[_0x5c75ef];return _0x3cc356;},_0x5c75(_0x219229,_0x2b1b81);}function _0x10a1(){const _0x16a63f=['getMemberID','OpenOrReOpen','commentUpdate$','_threadCommentDataSource','merge','solved','ref','length','object','Plugin','@univerjs/network','417MWejeF','function','type','UniverThreadCommentDataSourcePlugin','8gVlLaF','Disposable','getCurrentUser','payload','find','dayjs','forEach','/universer-api/user/list','UniverThreadCommentUi','_initUserSync','pluginName','defineProperty','/add','getUnit','Reply','/edit','Inject','UniverThreadComment','UniverProCollaborationClient','6pakJzQ','IThreadCommentDataSourceService','syncUpdateMutationToColla','Unknown','605547wtCYUS','UniverCollaborationClientPlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userID','2756411ZVkioK','Solve','_userService','replyId','rxjs','map','user','@univerjs/thread-comment','Injector','rangeType','IConfigService','COMMENT','_injector','personId','toStringTag','threadId','_config','/list','pipe','2079004ZrVjvO','dataSource','461884dKUVuD','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','replies','_configService','parse','code','delete','@univerjs/core','rangeId','error','2341695EAhgDy','_sessionService','symbol','3493260LUVDht','slice','UserManagerService','Add','@univerjs-pro/license','UniverCore','CustomRangeType','@univerjs/thread-comment-ui','parentId','createTimestamp','disposeWithMe','stringify','/delete','addUser','exports','/universer-api/comment/unit/','root','UNRECOGNIZED','_commentService','Module','add','post','reply','updateComment','deleteComment','customRanges','UniverInstanceType','CollaborationSessionService','UniverThreadCommentUIPlugin','body','unitId','users','amd','filter','resolveComment','userId','7838xSsPPV','ThreadCommentModel','_init','UniverProLicense','HTTPService','Solved','_initDataSource','_httpService','format','resolved','CommentService','get','Edit','requireSession','bufferTime','_threadCommentModel','content','@univerjs-pro/collaboration-client','subscribe','getOwnPropertyDescriptor'];_0x10a1=function(){return _0x16a63f;};return _0x10a1();}(function(_0x47c7c7,_0xebcf1e){const _0x3d6ef3=_0x5c75,_0x3e9716=_0x47c7c7();while(!![]){try{const _0x4929f3=parseInt(_0x3d6ef3(0x1fe))/0x1+parseInt(_0x3d6ef3(0x1ab))/0x2*(parseInt(_0x3d6ef3(0x1ca))/0x3)+-parseInt(_0x3d6ef3(0x1fc))/0x4+parseInt(_0x3d6ef3(0x209))/0x5+-parseInt(_0x3d6ef3(0x1e1))/0x6*(parseInt(_0x3d6ef3(0x1e9))/0x7)+parseInt(_0x3d6ef3(0x1ce))/0x8*(parseInt(_0x3d6ef3(0x1e5))/0x9)+-parseInt(_0x3d6ef3(0x20c))/0xa;if(_0x4929f3===_0xebcf1e)break;else _0x3e9716['push'](_0x3e9716['shift']());}catch(_0x14d74a){_0x3e9716['push'](_0x3e9716['shift']());}}}(_0x10a1,0x44365),function(_0x3ef09c,_0xe4a7b6){const _0x15fc46=_0x5c75;typeof exports==_0x15fc46(0x1c7)&&typeof module<'u'?_0xe4a7b6(exports,require(_0x15fc46(0x1bc)),require(_0x15fc46(0x210)),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require(_0x15fc46(0x1f0)),require(_0x15fc46(0x1ed)),require(_0x15fc46(0x1c9))):typeof define==_0x15fc46(0x1cb)&&define[_0x15fc46(0x1a7)]?define([_0x15fc46(0x21a),_0x15fc46(0x1bc),_0x15fc46(0x210),_0x15fc46(0x206),_0x15fc46(0x213),'@univerjs/thread-comment',_0x15fc46(0x1ed),_0x15fc46(0x1c9)],_0xe4a7b6):(_0x3ef09c=typeof globalThis<'u'?globalThis:_0x3ef09c||self,_0xe4a7b6(_0x3ef09c['UniverProThreadCommentDatasource']={},_0x3ef09c[_0x15fc46(0x1e0)],_0x3ef09c[_0x15fc46(0x1ae)],_0x3ef09c[_0x15fc46(0x211)],_0x3ef09c[_0x15fc46(0x1d6)],_0x3ef09c[_0x15fc46(0x1df)],_0x3ef09c['rxjs'],_0x3ef09c['UniverNetwork']));}(this,function(_0x449b61,_0x2ae46c,_0x34d216,_0x233f6d,_0x245617,_0x5c253f,_0x261f9e,_0x76628e){'use strict';const _0x3bdc4b=_0x5c75;const _0x1ec23e=_0x3bdc4b(0x1e7);var _0x48e63d=(_0x422c71=>(_0x422c71[_0x422c71[_0x3bdc4b(0x1c0)]=0x0]=_0x3bdc4b(0x1c0),_0x422c71[_0x422c71[_0x3bdc4b(0x1b0)]=0x1]=_0x3bdc4b(0x1b0),_0x422c71[_0x422c71['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x422c71))(_0x48e63d||{}),_0x5f30a4=(_0xb280d6=>(_0xb280d6[_0xb280d6['Unknown']=0x0]=_0x3bdc4b(0x1e4),_0xb280d6[_0xb280d6[_0x3bdc4b(0x20f)]=0x1]=_0x3bdc4b(0x20f),_0xb280d6[_0xb280d6['Reply']=0x2]=_0x3bdc4b(0x1dc),_0xb280d6[_0xb280d6[_0x3bdc4b(0x1b7)]=0x3]=_0x3bdc4b(0x1b7),_0xb280d6[_0xb280d6['Delete']=0x4]='Delete',_0xb280d6[_0xb280d6[_0x3bdc4b(0x1ea)]=0x5]='Solve',_0xb280d6[_0xb280d6['UNRECOGNIZED']=-0x1]=_0x3bdc4b(0x21d),_0xb280d6))(_0x5f30a4||{});const _0x39ca27=_0x2645df=>_0x233f6d[_0x3bdc4b(0x1d3)](new Date(+_0x2645df))['format']('YYYY/MM/DD\x20HH:mm'),_0x1cb772=async(_0x5c6b23,_0x493d98)=>{const _0x189540=_0x3bdc4b,_0x56fc79=_0x5c6b23['get'](_0x233f6d['UserManagerService']),_0x140944=_0x5c6b23[_0x189540(0x1b6)](_0x76628e[_0x189540(0x1af)]);_0x493d98['forEach'](_0x51ddbc=>{const _0x1fc219=_0x189540;_0x56fc79['getUser'](_0x51ddbc)&&_0x493d98[_0x1fc219(0x205)](_0x51ddbc);}),_0x493d98['size']&&(await _0x140944[_0x189540(0x1b6)](_0x189540(0x1d5),{'params':{'userIDs':[..._0x493d98]}}))['body']['users'][_0x189540(0x1d4)](_0x4503a1=>{const _0x404eb9=_0x189540;_0x4503a1&&_0x56fc79[_0x404eb9(0x219)](_0x4503a1);});};var _0x2c781c=Object['getOwnPropertyDescriptor'],_0x844576=(_0x41bce1,_0x37f796,_0x2a166e,_0x462299)=>{const _0x5256b5=_0x3bdc4b;for(var _0x15651a=_0x462299>0x1?void 0x0:_0x462299?_0x2c781c(_0x37f796,_0x2a166e):_0x37f796,_0x2ab43d=_0x41bce1[_0x5256b5(0x1c6)]-0x1,_0x1c6730;_0x2ab43d>=0x0;_0x2ab43d--)(_0x1c6730=_0x41bce1[_0x2ab43d])&&(_0x15651a=_0x1c6730(_0x15651a)||_0x15651a);return _0x15651a;},_0x59b3e7=(_0x2c9c8b,_0x2ed191)=>(_0x3f4d1a,_0x3cb388)=>_0x2ed191(_0x3f4d1a,_0x3cb388,_0x2c9c8b);let _0x52dfe1=class extends _0x233f6d[_0x3bdc4b(0x1cf)]{constructor(_0xddeaec,_0x5d2ce2,_0xbbb86e,_0x2332c9){const _0x28b4c7=_0x3bdc4b;super(),this[_0x28b4c7(0x21e)]=_0xddeaec,this[_0x28b4c7(0x1ba)]=_0x5d2ce2,this[_0x28b4c7(0x1eb)]=_0xbbb86e,this[_0x28b4c7(0x1f5)]=_0x2332c9,this[_0x28b4c7(0x1ad)](),this[_0x28b4c7(0x1d7)]();}[_0x3bdc4b(0x1d7)](){const _0x330f5b=_0x3bdc4b;this['disposeWithMe'](this['_threadCommentModel'][_0x330f5b(0x1c1)][_0x330f5b(0x1fb)](_0x261f9e[_0x330f5b(0x1b9)](0x10))['subscribe'](_0x31ebc8=>{const _0x394299=_0x330f5b,_0xd03763=new Set();_0x31ebc8['forEach'](_0x5e5bbf=>{const _0x34831e=_0x5c75;switch(_0x5e5bbf[_0x34831e(0x1cc)]){case _0x34831e(0x220):{const _0x21cada=_0x5e5bbf[_0x34831e(0x1d1)][_0x34831e(0x1f6)];_0xd03763[_0x34831e(0x220)](_0x21cada);break;}}}),_0x1cb772(this[_0x394299(0x1f5)],_0xd03763);}));}[_0x3bdc4b(0x1ad)](){const _0x19b3bb=_0x3bdc4b;this[_0x19b3bb(0x216)](this[_0x19b3bb(0x21e)][_0x19b3bb(0x1c1)][_0x19b3bb(0x1bd)](async _0x1b1e11=>{const _0x16857=_0x19b3bb;var _0x52fafe,_0xa3a642,_0x24fbc8,_0x3087a2;const _0x45490a=(_0x52fafe=this[_0x16857(0x1ba)][_0x16857(0x1db)](_0x1b1e11[_0x16857(0x1a5)])[_0x16857(0x1d2)](_0x55bfe3=>_0x55bfe3[_0x16857(0x1f8)]===_0x1b1e11['threadId']))==null?void 0x0:_0x52fafe['root'];if(!_0x45490a)return;const {unitId:_0x4f04c2,subUnitId:_0xa709df}=_0x45490a;switch(_0x1b1e11['user']&&this['_userService']['addUser'](_0x1b1e11[_0x16857(0x1ef)]),_0x1b1e11['type']){case _0x5f30a4['Add']:break;case _0x5f30a4[_0x16857(0x1dc)]:{this[_0x16857(0x1ba)]['addComment'](_0x4f04c2,_0xa709df,{'unitId':_0x4f04c2,'subUnitId':_0xa709df,'ref':'','id':_0x1b1e11[_0x16857(0x1ec)],'dT':_0x39ca27(+_0x1b1e11[_0x16857(0x215)]),'threadId':_0x1b1e11[_0x16857(0x1f8)],'personId':(_0x24fbc8=(_0xa3a642=_0x1b1e11[_0x16857(0x1ef)])==null?void 0x0:_0xa3a642[_0x16857(0x1e8)])!=null?_0x24fbc8:_0x1b1e11[_0x16857(0x1aa)],'text':JSON[_0x16857(0x203)](_0x1b1e11['content']),'parentId':_0x45490a['id']});break;}case _0x5f30a4['Delete']:{const _0x2e0f2f=this['_threadCommentModel']['getComment'](_0x4f04c2,_0xa709df,_0x1b1e11['replyId']);_0x2e0f2f&&_0x2e0f2f[_0x16857(0x214)]&&this['_threadCommentModel']['deleteComment'](_0x4f04c2,_0xa709df,_0x1b1e11[_0x16857(0x1ec)]);break;}case _0x5f30a4['Edit']:{this[_0x16857(0x1ba)]['updateComment'](_0x4f04c2,_0xa709df,{'commentId':_0x1b1e11[_0x16857(0x1ec)],'text':JSON[_0x16857(0x203)](_0x1b1e11['content'])});break;}case _0x5f30a4['Solve']:{const _0x3a28f8=(_0x3087a2=this[_0x16857(0x1ba)]['getUnit'](_0x1b1e11[_0x16857(0x1a5)])[_0x16857(0x1d2)](_0x10c729=>_0x10c729[_0x16857(0x1f8)]===_0x1b1e11[_0x16857(0x1f8)]))==null?void 0x0:_0x3087a2[_0x16857(0x21c)];_0x3a28f8&&this[_0x16857(0x1ba)][_0x16857(0x1a9)](_0x4f04c2,_0xa709df,_0x3a28f8['id'],_0x1b1e11[_0x16857(0x1c4)]===_0x48e63d[_0x16857(0x1b0)]);break;}}}));}};_0x52dfe1=_0x844576([_0x59b3e7(0x0,_0x233f6d[_0x3bdc4b(0x1de)](_0x2ae46c[_0x3bdc4b(0x1b5)])),_0x59b3e7(0x1,_0x233f6d[_0x3bdc4b(0x1de)](_0x5c253f[_0x3bdc4b(0x1ac)])),_0x59b3e7(0x2,_0x233f6d[_0x3bdc4b(0x1de)](_0x233f6d['UserManagerService'])),_0x59b3e7(0x3,_0x233f6d[_0x3bdc4b(0x1de)](_0x233f6d[_0x3bdc4b(0x1f1)]))],_0x52dfe1);const _0x582ece='thread-comment-data-source.config',_0x4532a2={};var _0x5516ec=Object[_0x3bdc4b(0x1be)],_0x438f33=(_0x3a28c6,_0x46a3a1,_0x299df7,_0x393473)=>{const _0x322794=_0x3bdc4b;for(var _0x4840ba=_0x393473>0x1?void 0x0:_0x393473?_0x5516ec(_0x46a3a1,_0x299df7):_0x46a3a1,_0x2b70d3=_0x3a28c6[_0x322794(0x1c6)]-0x1,_0x249f57;_0x2b70d3>=0x0;_0x2b70d3--)(_0x249f57=_0x3a28c6[_0x2b70d3])&&(_0x4840ba=_0x249f57(_0x4840ba)||_0x4840ba);return _0x4840ba;},_0x3427ac=(_0x7139e9,_0xb2d530)=>(_0x567280,_0x232be6)=>_0xb2d530(_0x567280,_0x232be6,_0x7139e9);function _0x1e92e5(_0x3110fb,_0xd0b475){const _0x29f6ea=_0x3bdc4b,_0x25a780=_0x3110fb[_0x29f6ea(0x201)][0x0];return{..._0xd0b475,'id':_0x25a780[_0x29f6ea(0x1ec)],'resolved':_0x3110fb[_0x29f6ea(0x1c4)]===0x1,'dT':_0x39ca27(_0x25a780[_0x29f6ea(0x215)]),'personId':_0x25a780[_0x29f6ea(0x1aa)],'threadId':_0x25a780['threadId']};}function _0x27ca2e(_0x5879f0,_0xffb3dc,_0x3f20df){const _0x2653d8=_0x3bdc4b;var _0x386201,_0x2ff588;if(((_0x2ff588=(_0x386201=_0x5879f0==null?void 0x0:_0x5879f0[_0x2653d8(0x201)])==null?void 0x0:_0x386201[_0x2653d8(0x1c6)])!=null?_0x2ff588:0x0)>0x0){const _0x3bb48b=(_0x8ed368,_0x434bd7)=>({'id':_0x8ed368[_0x2653d8(0x1ec)],'threadId':_0x8ed368[_0x2653d8(0x1f8)],'dT':_0x39ca27(_0x8ed368['createTimestamp']),'personId':_0x8ed368[_0x2653d8(0x1aa)],'resolved':_0x5879f0[_0x2653d8(0x1c4)]===_0x48e63d[_0x2653d8(0x1b0)],'unitId':_0xffb3dc,'subUnitId':_0x3f20df,'text':JSON['parse'](_0x8ed368[_0x2653d8(0x1bb)]),'parentId':_0x434bd7}),_0x5e00fe=_0x3bb48b(_0x5879f0['replies'][0x0]);return{..._0x5e00fe,'children':_0x5879f0[_0x2653d8(0x201)][_0x2653d8(0x20d)](0x1)['map'](_0x390b9d=>_0x3bb48b(_0x390b9d,_0x5e00fe['id']))};}return null;}let _0x164e30=class{constructor(_0x266935,_0x5c7749,_0x29e277,_0x405ec){const _0x26e6be=_0x3bdc4b;this[_0x26e6be(0x1b2)]=_0x266935,this[_0x26e6be(0x1eb)]=_0x5c7749,this['_sessionService']=_0x29e277,this[_0x26e6be(0x1f5)]=_0x405ec;}async['addComment'](_0x20f571){const _0xe39d7d=_0x3bdc4b;var _0x37305d,_0x1f01dc;const {parentId:_0x545b28,unitId:_0x195ae2,text:_0x48bed1,threadId:_0xa49575}=_0x20f571,_0x4abb16=(_0x1f01dc=(_0x37305d=_0x48bed1[_0xe39d7d(0x1a0)])==null?void 0x0:_0x37305d[_0xe39d7d(0x1a8)](_0x463412=>_0x463412['rangeType']===_0x233f6d[_0xe39d7d(0x212)][_0xe39d7d(0x1f4)])[_0xe39d7d(0x1ee)](_0x29d015=>_0x29d015['rangeId']))!=null?_0x1f01dc:[],_0xe37acb=JSON[_0xe39d7d(0x217)](_0x48bed1),_0x3111e3=(await this['_sessionService']['requireSession'](_0x195ae2))[_0xe39d7d(0x1bf)]();if(_0x545b28){const _0x62f844={'memberId':_0x3111e3,'unitId':_0x195ae2,'content':_0xe37acb,'mention':_0x4abb16,'threadId':_0xa49575},_0x1dbfdb=(await this['_httpService'][_0xe39d7d(0x221)](_0xe39d7d(0x21b)+_0x195ae2+'/reply',{'body':_0x62f844}))[_0xe39d7d(0x1a4)][_0xe39d7d(0x222)];return{..._0x20f571,'id':_0x1dbfdb[_0xe39d7d(0x1ec)],'dT':_0x233f6d[_0xe39d7d(0x1d3)](+_0x1dbfdb[_0xe39d7d(0x215)])[_0xe39d7d(0x1b3)](_0xe39d7d(0x1ff)),'personId':_0x1dbfdb[_0xe39d7d(0x1aa)]};}else{const _0x391b7c={'memberId':_0x3111e3,'unitId':_0x195ae2,'content':_0xe37acb,'mention':_0x4abb16},_0x33a058=await this['_httpService'][_0xe39d7d(0x221)](_0xe39d7d(0x21b)+_0x195ae2+_0xe39d7d(0x1da),{'body':_0x391b7c});return _0x1e92e5(_0x33a058[_0xe39d7d(0x1a4)]['comment'],_0x20f571);}}async[_0x3bdc4b(0x223)](_0x7b6af8){const _0x595c7f=_0x3bdc4b;var _0x473614,_0x5f0ea7;const {text:_0x2a86c1,unitId:_0x268798}=_0x7b6af8,_0x56f439=(_0x5f0ea7=(_0x473614=_0x2a86c1[_0x595c7f(0x1a0)])==null?void 0x0:_0x473614['filter'](_0x721ef8=>_0x721ef8[_0x595c7f(0x1f2)]===_0x233f6d[_0x595c7f(0x212)][_0x595c7f(0x1f4)])[_0x595c7f(0x1ee)](_0x276850=>_0x276850[_0x595c7f(0x207)]))!=null?_0x5f0ea7:[],_0x100332=JSON[_0x595c7f(0x217)](_0x2a86c1),_0x2328ba=_0x7b6af8[_0x595c7f(0x1f8)],_0x12b861=_0x7b6af8['id'],_0x2199c7={'memberId':(await this[_0x595c7f(0x20a)][_0x595c7f(0x1b8)](_0x268798))[_0x595c7f(0x1bf)](),'unitId':_0x268798,'threadId':_0x2328ba,'mention':_0x56f439,'content':_0x100332,'replyId':_0x12b861},_0x143602=await this[_0x595c7f(0x1b2)][_0x595c7f(0x221)](_0x595c7f(0x21b)+_0x268798+_0x595c7f(0x1dd),{'body':_0x2199c7});return!_0x143602[_0x595c7f(0x1a4)][_0x595c7f(0x208)]||_0x143602[_0x595c7f(0x1a4)][_0x595c7f(0x208)][_0x595c7f(0x204)]===0x1;}async[_0x3bdc4b(0x1a9)](_0x2f0e52){const _0x3e3232=_0x3bdc4b,{unitId:_0x30caa5}=_0x2f0e52,_0x3b77e1=_0x2f0e52[_0x3e3232(0x1f8)],_0xb35993={'memberId':this[_0x3e3232(0x1eb)][_0x3e3232(0x1d0)]()[_0x3e3232(0x1e8)],'unitId':_0x30caa5,'threadId':_0x3b77e1,'solved':_0x2f0e52[_0x3e3232(0x1b4)]?_0x48e63d[_0x3e3232(0x1b0)]:_0x48e63d[_0x3e3232(0x1c0)]},_0x874aed=await this['_httpService'][_0x3e3232(0x221)](_0x3e3232(0x21b)+_0x30caa5+'/solved',{'body':_0xb35993});return!_0x874aed[_0x3e3232(0x1a4)]['error']||_0x874aed[_0x3e3232(0x1a4)][_0x3e3232(0x208)][_0x3e3232(0x204)]===0x1;}async[_0x3bdc4b(0x19f)](_0xe40e49,_0x2621a3,_0x5d6b1b,_0xb7a700){const _0x3d14d3=_0x3bdc4b,_0x3c54c7={'memberId':(await this[_0x3d14d3(0x20a)][_0x3d14d3(0x1b8)](_0xe40e49))[_0x3d14d3(0x1bf)](),'threadId':_0x5d6b1b,'replyId':_0xb7a700,'unitId':_0xe40e49},_0x2bcce8=await this[_0x3d14d3(0x1b2)][_0x3d14d3(0x221)](_0x3d14d3(0x21b)+_0xe40e49+_0x3d14d3(0x218),{'body':_0x3c54c7});return!_0x2bcce8['body'][_0x3d14d3(0x208)]||_0x2bcce8[_0x3d14d3(0x1a4)][_0x3d14d3(0x208)][_0x3d14d3(0x204)]===0x1;}async['listComments'](_0x6c3c36,_0x56f1e8,_0x8df4ab){const _0x1d3aba=_0x3bdc4b,_0x31bba5={'unitId':_0x6c3c36,'threadId':_0x8df4ab},_0x58a41b=await this['_httpService'][_0x1d3aba(0x221)]('/universer-api/comment/unit/'+_0x6c3c36+_0x1d3aba(0x1fa),{'body':_0x31bba5}),_0x24634d=_0x8df4ab[_0x1d3aba(0x1ee)](_0x517b20=>_0x27ca2e(_0x58a41b[_0x1d3aba(0x1a4)]['comments'][_0x517b20],_0x6c3c36,_0x56f1e8))[_0x1d3aba(0x1a8)](Boolean);return Object['values'](_0x58a41b[_0x1d3aba(0x1a4)][_0x1d3aba(0x1a6)])[_0x1d3aba(0x1d4)](_0x3740f0=>{const _0x5582df=_0x1d3aba;this[_0x5582df(0x1eb)][_0x5582df(0x219)](_0x3740f0);}),_0x24634d;}['saveCommentToSnapshot'](_0x2fb6a2){const _0x3280ac=_0x3bdc4b;return{'id':_0x2fb6a2['id'],'threadId':_0x2fb6a2[_0x3280ac(0x1f8)],'ref':_0x2fb6a2[_0x3280ac(0x1c5)]};}};_0x164e30=_0x438f33([_0x3427ac(0x0,_0x233f6d['Inject'](_0x76628e[_0x3bdc4b(0x1af)])),_0x3427ac(0x1,_0x233f6d['Inject'](_0x233f6d[_0x3bdc4b(0x20e)])),_0x3427ac(0x2,_0x233f6d[_0x3bdc4b(0x1de)](_0x2ae46c[_0x3bdc4b(0x1a2)])),_0x3427ac(0x3,_0x233f6d[_0x3bdc4b(0x1de)](_0x233f6d[_0x3bdc4b(0x1f1)]))],_0x164e30);var _0x4bc854=Object[_0x3bdc4b(0x1be)],_0x29c0c3=(_0x5cfbdd,_0x2d0f70,_0x3909a6,_0x6d1d5c)=>{const _0x4c549a=_0x3bdc4b;for(var _0x178236=_0x6d1d5c>0x1?void 0x0:_0x6d1d5c?_0x4bc854(_0x2d0f70,_0x3909a6):_0x2d0f70,_0x4ad0df=_0x5cfbdd[_0x4c549a(0x1c6)]-0x1,_0x1bd30c;_0x4ad0df>=0x0;_0x4ad0df--)(_0x1bd30c=_0x5cfbdd[_0x4ad0df])&&(_0x178236=_0x1bd30c(_0x178236)||_0x178236);return _0x178236;},_0x5d9f6c=(_0x5a2dbb,_0x48dce5)=>(_0x100ad9,_0x58be7d)=>_0x48dce5(_0x100ad9,_0x58be7d,_0x5a2dbb);let _0x4226b0=class extends _0x233f6d[_0x3bdc4b(0x1cf)]{constructor(_0x1a528f,_0x599d21){const _0x6a932c=_0x3bdc4b;super(),this['_threadCommentDataSourceService']=_0x1a528f,this[_0x6a932c(0x1c2)]=_0x599d21,this[_0x6a932c(0x1b1)]();}[_0x3bdc4b(0x1b1)](){const _0x4d68d4=_0x3bdc4b;this[_0x4d68d4(0x200)][_0x4d68d4(0x1fd)]=this['_threadCommentDataSource'],this[_0x4d68d4(0x200)][_0x4d68d4(0x1e3)]=!0x1;}};_0x4226b0=_0x29c0c3([_0x5d9f6c(0x0,_0x5c253f[_0x3bdc4b(0x1e2)]),_0x5d9f6c(0x1,_0x233f6d['Inject'](_0x164e30))],_0x4226b0);var _0x466ee=Object[_0x3bdc4b(0x1d9)],_0x11f6a1=Object[_0x3bdc4b(0x1be)],_0x5788b7=(_0x4aeea2,_0x31841c,_0xa704d3)=>_0x31841c in _0x4aeea2?_0x466ee(_0x4aeea2,_0x31841c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xa704d3}):_0x4aeea2[_0x31841c]=_0xa704d3,_0x18ad6d=(_0x3fba82,_0x4eb6a3,_0x5c4963,_0x4bed87)=>{const _0x49b84c=_0x3bdc4b;for(var _0x225cd8=_0x4bed87>0x1?void 0x0:_0x4bed87?_0x11f6a1(_0x4eb6a3,_0x5c4963):_0x4eb6a3,_0x3fc3ec=_0x3fba82[_0x49b84c(0x1c6)]-0x1,_0x29b3b3;_0x3fc3ec>=0x0;_0x3fc3ec--)(_0x29b3b3=_0x3fba82[_0x3fc3ec])&&(_0x225cd8=_0x29b3b3(_0x225cd8)||_0x225cd8);return _0x225cd8;},_0x544505=(_0x9c57fa,_0x3d0d2c)=>(_0xbcfc2c,_0x3f78f0)=>_0x3d0d2c(_0xbcfc2c,_0x3f78f0,_0x9c57fa),_0x2db0bd=(_0x4f0c4a,_0x8453b3,_0x513b28)=>_0x5788b7(_0x4f0c4a,typeof _0x8453b3!=_0x3bdc4b(0x20b)?_0x8453b3+'':_0x8453b3,_0x513b28);_0x449b61[_0x3bdc4b(0x1cd)]=class extends _0x233f6d[_0x3bdc4b(0x1c8)]{constructor(_0x2172aa=_0x4532a2,_0x1658c1,_0x26cfa1){const _0x540e2a=_0x3bdc4b;super(),this['_config']=_0x2172aa,this['_injector']=_0x1658c1,this[_0x540e2a(0x202)]=_0x26cfa1;const {..._0x4a6101}=_0x233f6d[_0x540e2a(0x1c3)]({},_0x4532a2,this[_0x540e2a(0x1f9)]);this[_0x540e2a(0x202)]['setConfig'](_0x582ece,_0x4a6101);}['onStarting'](){[[_0x164e30],[_0x4226b0],[_0x52dfe1]]['forEach'](_0x41564f=>{const _0x2b5025=_0x5c75;this[_0x2b5025(0x1f5)]['add'](_0x41564f);});}['onReady'](){const _0x227459=_0x3bdc4b;this[_0x227459(0x1f5)][_0x227459(0x1b6)](_0x4226b0),this[_0x227459(0x1f5)][_0x227459(0x1b6)](_0x52dfe1);}},_0x2db0bd(_0x449b61[_0x3bdc4b(0x1cd)],_0x3bdc4b(0x1d8),_0x1ec23e),_0x2db0bd(_0x449b61[_0x3bdc4b(0x1cd)],_0x3bdc4b(0x1cc),_0x233f6d[_0x3bdc4b(0x1a1)]['UNIVER_UNKNOWN']),_0x449b61[_0x3bdc4b(0x1cd)]=_0x18ad6d([_0x233f6d['DependentOn'](_0x245617[_0x3bdc4b(0x1a3)],_0x2ae46c[_0x3bdc4b(0x1e6)],_0x34d216['UniverLicensePlugin']),_0x544505(0x1,_0x233f6d[_0x3bdc4b(0x1de)](_0x233f6d['Injector'])),_0x544505(0x2,_0x233f6d[_0x3bdc4b(0x1f3)])],_0x449b61[_0x3bdc4b(0x1cd)]),Object[_0x3bdc4b(0x1d9)](_0x449b61,Symbol[_0x3bdc4b(0x1f7)],{'value':_0x3bdc4b(0x21f)});}));
|
|
1
|
+
(function(_0x24e0c6,_0x20589f){const _0x5c06bd=_0xb0d2,_0x560744=_0x24e0c6();while(!![]){try{const _0x3cc33c=-parseInt(_0x5c06bd(0x106))/0x1+-parseInt(_0x5c06bd(0x131))/0x2+-parseInt(_0x5c06bd(0x149))/0x3+-parseInt(_0x5c06bd(0x15b))/0x4*(-parseInt(_0x5c06bd(0x100))/0x5)+-parseInt(_0x5c06bd(0x139))/0x6+-parseInt(_0x5c06bd(0x135))/0x7*(-parseInt(_0x5c06bd(0xdb))/0x8)+-parseInt(_0x5c06bd(0x11a))/0x9*(-parseInt(_0x5c06bd(0xe6))/0xa);if(_0x3cc33c===_0x20589f)break;else _0x560744['push'](_0x560744['shift']());}catch(_0x5f2691){_0x560744['push'](_0x560744['shift']());}}}(_0x5aee,0x7272d),function(_0x42fed5,_0x1b4e88){const _0x5e1677=_0xb0d2;typeof exports==_0x5e1677(0x107)&&typeof module<'u'?_0x1b4e88(exports,require(_0x5e1677(0x141)),require(_0x5e1677(0x102)),require(_0x5e1677(0x146)),require(_0x5e1677(0x120)),require(_0x5e1677(0x142)),require(_0x5e1677(0xd3)),require(_0x5e1677(0x158))):typeof define==_0x5e1677(0x108)&&define['amd']?define(['exports',_0x5e1677(0x141),'@univerjs-pro/license',_0x5e1677(0x146),_0x5e1677(0x120),_0x5e1677(0x142),'rxjs',_0x5e1677(0x158)],_0x1b4e88):(_0x42fed5=typeof globalThis<'u'?globalThis:_0x42fed5||self,_0x1b4e88(_0x42fed5[_0x5e1677(0xd7)]={},_0x42fed5[_0x5e1677(0x140)],_0x42fed5['UniverProLicense'],_0x42fed5[_0x5e1677(0x10c)],_0x42fed5[_0x5e1677(0x104)],_0x42fed5[_0x5e1677(0xe0)],_0x42fed5[_0x5e1677(0xd3)],_0x42fed5[_0x5e1677(0x12c)]));}(this,function(_0x434650,_0x53bebc,_0xf074,_0x417afa,_0x31017a,_0x2d48fc,_0x257bfb,_0xdeab71){'use strict';const _0x45867f=_0xb0d2;const _0x3ab465=_0x45867f(0x13f);var _0x56e51a=(_0x1b7c4e=>(_0x1b7c4e[_0x1b7c4e[_0x45867f(0xfa)]=0x0]=_0x45867f(0xfa),_0x1b7c4e[_0x1b7c4e['Solved']=0x1]=_0x45867f(0x10f),_0x1b7c4e[_0x1b7c4e['UNRECOGNIZED']=-0x1]=_0x45867f(0xfd),_0x1b7c4e))(_0x56e51a||{}),_0xe44462=(_0x451a6e=>(_0x451a6e[_0x451a6e[_0x45867f(0x125)]=0x0]=_0x45867f(0x125),_0x451a6e[_0x451a6e['Add']=0x1]='Add',_0x451a6e[_0x451a6e[_0x45867f(0x11c)]=0x2]=_0x45867f(0x11c),_0x451a6e[_0x451a6e['Edit']=0x3]=_0x45867f(0x11f),_0x451a6e[_0x451a6e[_0x45867f(0x14e)]=0x4]=_0x45867f(0x14e),_0x451a6e[_0x451a6e[_0x45867f(0xfe)]=0x5]='Solve',_0x451a6e[_0x451a6e[_0x45867f(0xfd)]=-0x1]=_0x45867f(0xfd),_0x451a6e))(_0xe44462||{});const _0x5966ec=_0x1242d2=>_0x417afa[_0x45867f(0x12d)](new Date(+_0x1242d2))[_0x45867f(0x123)](_0x45867f(0xf7)),_0x4c8f66=async(_0x1faef8,_0x56e25f)=>{const _0x14ab1d=_0x45867f,_0x5e5483=_0x1faef8[_0x14ab1d(0x13c)](_0x417afa[_0x14ab1d(0xe2)]),_0xf59b7a=_0x1faef8[_0x14ab1d(0x13c)](_0xdeab71[_0x14ab1d(0x105)]);_0x56e25f[_0x14ab1d(0x152)](_0x91d8bb=>{const _0x3ec3ec=_0x14ab1d;_0x5e5483[_0x3ec3ec(0x156)](_0x91d8bb)&&_0x56e25f['delete'](_0x91d8bb);}),_0x56e25f[_0x14ab1d(0xda)]&&(await _0xf59b7a[_0x14ab1d(0x13c)](_0x14ab1d(0x12f),{'params':{'userIDs':[..._0x56e25f]}}))[_0x14ab1d(0x150)][_0x14ab1d(0x11e)][_0x14ab1d(0x152)](_0x39e446=>{const _0x54e586=_0x14ab1d;_0x39e446&&_0x5e5483[_0x54e586(0x151)](_0x39e446);});};var _0x36fa69=Object[_0x45867f(0x118)],_0x4b6526=(_0x98d6db,_0x1879a8,_0x4377cc,_0x1d33e4)=>{const _0x29be01=_0x45867f;for(var _0x6b1ec5=_0x1d33e4>0x1?void 0x0:_0x1d33e4?_0x36fa69(_0x1879a8,_0x4377cc):_0x1879a8,_0x2022ca=_0x98d6db[_0x29be01(0xf5)]-0x1,_0x59187b;_0x2022ca>=0x0;_0x2022ca--)(_0x59187b=_0x98d6db[_0x2022ca])&&(_0x6b1ec5=_0x59187b(_0x6b1ec5)||_0x6b1ec5);return _0x6b1ec5;},_0x147141=(_0x103d88,_0x446b07)=>(_0x2e9347,_0x1e7082)=>_0x446b07(_0x2e9347,_0x1e7082,_0x103d88);let _0x46e35c=class extends _0x417afa[_0x45867f(0x148)]{constructor(_0x5b923a,_0x1dbe59,_0x535626,_0x4ac417){const _0x1cc566=_0x45867f;super(),this[_0x1cc566(0xf9)]=_0x5b923a,this[_0x1cc566(0x124)]=_0x1dbe59,this['_userService']=_0x535626,this[_0x1cc566(0xf8)]=_0x4ac417,this[_0x1cc566(0xf4)](),this[_0x1cc566(0x154)]();}[_0x45867f(0x154)](){const _0x1a56fc=_0x45867f;this['disposeWithMe'](this['_threadCommentModel'][_0x1a56fc(0x159)][_0x1a56fc(0x137)](_0x257bfb[_0x1a56fc(0x128)](0x10))[_0x1a56fc(0xe9)](_0x412ca0=>{const _0x111e52=_0x1a56fc,_0x1d9975=new Set();_0x412ca0[_0x111e52(0x152)](_0x56b01c=>{const _0x22516e=_0x111e52;switch(_0x56b01c[_0x22516e(0x113)]){case _0x22516e(0x127):{const _0x342673=_0x56b01c[_0x22516e(0x110)][_0x22516e(0x130)];_0x1d9975[_0x22516e(0x127)](_0x342673);break;}}}),_0x4c8f66(this[_0x111e52(0xf8)],_0x1d9975);}));}[_0x45867f(0xf4)](){const _0x459cb1=_0x45867f;this['disposeWithMe'](this[_0x459cb1(0xf9)][_0x459cb1(0x159)]['subscribe'](async _0x34c451=>{const _0x40758e=_0x459cb1;var _0x3f64dc,_0x4920b1,_0x938592,_0x1f9ef5;const _0x148465=(_0x3f64dc=this[_0x40758e(0x124)][_0x40758e(0x12e)](_0x34c451[_0x40758e(0x13e)])[_0x40758e(0xee)](_0xc4f811=>_0xc4f811[_0x40758e(0x14f)]===_0x34c451[_0x40758e(0x14f)]))==null?void 0x0:_0x3f64dc['root'];if(!_0x148465)return;const {unitId:_0x69c52b,subUnitId:_0x52cc1d}=_0x148465;switch(_0x34c451[_0x40758e(0xef)]&&this[_0x40758e(0xd4)][_0x40758e(0x151)](_0x34c451['user']),_0x34c451[_0x40758e(0x113)]){case _0xe44462[_0x40758e(0x13d)]:break;case _0xe44462['Reply']:{this[_0x40758e(0x124)]['addComment'](_0x69c52b,_0x52cc1d,{'unitId':_0x69c52b,'subUnitId':_0x52cc1d,'ref':'','id':_0x34c451[_0x40758e(0x133)],'dT':_0x5966ec(+_0x34c451[_0x40758e(0xed)]),'threadId':_0x34c451[_0x40758e(0x14f)],'personId':(_0x938592=(_0x4920b1=_0x34c451[_0x40758e(0xef)])==null?void 0x0:_0x4920b1[_0x40758e(0x13a)])!=null?_0x938592:_0x34c451[_0x40758e(0xdc)],'text':JSON['parse'](_0x34c451[_0x40758e(0x14a)]),'parentId':_0x148465['id']});break;}case _0xe44462[_0x40758e(0x14e)]:{const _0x3ff263=this[_0x40758e(0x124)][_0x40758e(0x121)](_0x69c52b,_0x52cc1d,_0x34c451[_0x40758e(0x133)]);_0x3ff263&&_0x3ff263[_0x40758e(0xd2)]&&this[_0x40758e(0x124)][_0x40758e(0xd8)](_0x69c52b,_0x52cc1d,_0x34c451[_0x40758e(0x133)]);break;}case _0xe44462[_0x40758e(0x11f)]:{this[_0x40758e(0x124)][_0x40758e(0xec)](_0x69c52b,_0x52cc1d,{'commentId':_0x34c451['replyId'],'text':JSON[_0x40758e(0x147)](_0x34c451['content'])});break;}case _0xe44462[_0x40758e(0xfe)]:{const _0xac9c8e=(_0x1f9ef5=this['_threadCommentModel'][_0x40758e(0x12e)](_0x34c451[_0x40758e(0x13e)])[_0x40758e(0xee)](_0x45ab8f=>_0x45ab8f['threadId']===_0x34c451[_0x40758e(0x14f)]))==null?void 0x0:_0x1f9ef5[_0x40758e(0x145)];_0xac9c8e&&this[_0x40758e(0x124)]['resolveComment'](_0x69c52b,_0x52cc1d,_0xac9c8e['id'],_0x34c451[_0x40758e(0xe5)]===_0x56e51a[_0x40758e(0x10f)]);break;}}}));}};_0x46e35c=_0x4b6526([_0x147141(0x0,_0x417afa[_0x45867f(0xd1)](_0x53bebc['CommentService'])),_0x147141(0x1,_0x417afa[_0x45867f(0xd1)](_0x2d48fc[_0x45867f(0x12a)])),_0x147141(0x2,_0x417afa[_0x45867f(0xd1)](_0x417afa['UserManagerService'])),_0x147141(0x3,_0x417afa[_0x45867f(0xd1)](_0x417afa['Injector']))],_0x46e35c);const _0x1d1d48=_0x45867f(0xfb),_0x3ed40f={};var _0x5852f3=Object[_0x45867f(0x118)],_0x143016=(_0x21548d,_0x1541dd,_0x28a852,_0x3cab56)=>{const _0x30ea40=_0x45867f;for(var _0xd63a1d=_0x3cab56>0x1?void 0x0:_0x3cab56?_0x5852f3(_0x1541dd,_0x28a852):_0x1541dd,_0x5ce0b7=_0x21548d[_0x30ea40(0xf5)]-0x1,_0x274974;_0x5ce0b7>=0x0;_0x5ce0b7--)(_0x274974=_0x21548d[_0x5ce0b7])&&(_0xd63a1d=_0x274974(_0xd63a1d)||_0xd63a1d);return _0xd63a1d;},_0x1e2737=(_0x5b7fc5,_0x4b4c79)=>(_0x1e9941,_0x16d444)=>_0x4b4c79(_0x1e9941,_0x16d444,_0x5b7fc5);function _0x587e82(_0x1122d6,_0x2e747e){const _0x3301d8=_0x45867f,_0x2a98fd=_0x1122d6[_0x3301d8(0x143)][0x0];return{..._0x2e747e,'id':_0x2a98fd[_0x3301d8(0x133)],'resolved':_0x1122d6[_0x3301d8(0xe5)]===0x1,'dT':_0x5966ec(_0x2a98fd[_0x3301d8(0xed)]),'personId':_0x2a98fd['userId'],'threadId':_0x2a98fd[_0x3301d8(0x14f)]};}function _0x22161b(_0x2189cf,_0x40cdd2,_0xfdf626){const _0x298035=_0x45867f;var _0x3a16c7,_0x2235f1;if(((_0x2235f1=(_0x3a16c7=_0x2189cf==null?void 0x0:_0x2189cf[_0x298035(0x143)])==null?void 0x0:_0x3a16c7[_0x298035(0xf5)])!=null?_0x2235f1:0x0)>0x0){const _0x1dafc8=(_0x3dbb04,_0x12d588)=>({'id':_0x3dbb04['replyId'],'threadId':_0x3dbb04['threadId'],'dT':_0x5966ec(_0x3dbb04[_0x298035(0xed)]),'personId':_0x3dbb04[_0x298035(0xdc)],'resolved':_0x2189cf[_0x298035(0xe5)]===_0x56e51a[_0x298035(0x10f)],'unitId':_0x40cdd2,'subUnitId':_0xfdf626,'text':JSON['parse'](_0x3dbb04[_0x298035(0x14a)]),'parentId':_0x12d588}),_0x346882=_0x1dafc8(_0x2189cf[_0x298035(0x143)][0x0]);return{..._0x346882,'children':_0x2189cf[_0x298035(0x143)][_0x298035(0xfc)](0x1)['map'](_0x14ea18=>_0x1dafc8(_0x14ea18,_0x346882['id']))};}return null;}let _0x458444=class{constructor(_0x464dcf,_0x54e095,_0x5cc907,_0x4798a3){const _0x160d13=_0x45867f;this[_0x160d13(0xf3)]=_0x464dcf,this['_userService']=_0x54e095,this[_0x160d13(0x129)]=_0x5cc907,this[_0x160d13(0xf8)]=_0x4798a3;}async[_0x45867f(0xf6)](_0x141e0a){const _0x38be64=_0x45867f;var _0x3a4407,_0x49daf8;const {parentId:_0x579d8a,unitId:_0x5df299,text:_0x466b9a,threadId:_0x7eb988}=_0x141e0a,_0x59e7d8=(_0x49daf8=(_0x3a4407=_0x466b9a[_0x38be64(0xe7)])==null?void 0x0:_0x3a4407['filter'](_0x1f4d38=>_0x1f4d38[_0x38be64(0xe8)]===_0x417afa[_0x38be64(0x122)][_0x38be64(0x157)])[_0x38be64(0x13b)](_0x484e70=>_0x484e70[_0x38be64(0x12b)]))!=null?_0x49daf8:[],_0x1b5076=JSON[_0x38be64(0xe3)](_0x466b9a),_0x50e11b=(await this[_0x38be64(0x129)]['requireSession'](_0x5df299))[_0x38be64(0x11b)]();if(_0x579d8a){const _0x378a35={'memberId':_0x50e11b,'unitId':_0x5df299,'content':_0x1b5076,'mention':_0x59e7d8,'threadId':_0x7eb988},_0x1bbc4c=(await this['_httpService'][_0x38be64(0x116)]('/universer-api/comment/unit/'+_0x5df299+'/reply',{'body':_0x378a35}))[_0x38be64(0x150)][_0x38be64(0xde)];return{..._0x141e0a,'id':_0x1bbc4c[_0x38be64(0x133)],'dT':_0x417afa[_0x38be64(0x12d)](+_0x1bbc4c[_0x38be64(0xed)])['format'](_0x38be64(0xf7)),'personId':_0x1bbc4c['userId']};}else{const _0x3efc03={'memberId':_0x50e11b,'unitId':_0x5df299,'content':_0x1b5076,'mention':_0x59e7d8},_0x140276=await this[_0x38be64(0xf3)][_0x38be64(0x116)](_0x38be64(0xd5)+_0x5df299+'/add',{'body':_0x3efc03});return _0x587e82(_0x140276[_0x38be64(0x150)][_0x38be64(0xd9)],_0x141e0a);}}async['updateComment'](_0x2cb748){const _0x144546=_0x45867f;var _0x11cb10,_0x51534d;const {text:_0x54c61e,unitId:_0x337d07}=_0x2cb748,_0x4251fc=(_0x51534d=(_0x11cb10=_0x54c61e[_0x144546(0xe7)])==null?void 0x0:_0x11cb10[_0x144546(0x101)](_0x90ebf5=>_0x90ebf5['rangeType']===_0x417afa[_0x144546(0x122)]['COMMENT'])[_0x144546(0x13b)](_0x4f8466=>_0x4f8466[_0x144546(0x12b)]))!=null?_0x51534d:[],_0x24b280=JSON[_0x144546(0xe3)](_0x54c61e),_0x4ad3e3=_0x2cb748[_0x144546(0x14f)],_0x4fc7e5=_0x2cb748['id'],_0x2279d5={'memberId':(await this[_0x144546(0x129)][_0x144546(0xf0)](_0x337d07))[_0x144546(0x11b)](),'unitId':_0x337d07,'threadId':_0x4ad3e3,'mention':_0x4251fc,'content':_0x24b280,'replyId':_0x4fc7e5},_0x29d5cf=await this[_0x144546(0xf3)][_0x144546(0x116)](_0x144546(0xd5)+_0x337d07+_0x144546(0xe1),{'body':_0x2279d5});return!_0x29d5cf[_0x144546(0x150)][_0x144546(0x153)]||_0x29d5cf[_0x144546(0x150)][_0x144546(0x153)][_0x144546(0x111)]===0x1;}async[_0x45867f(0xea)](_0x5307e9){const _0x448f1f=_0x45867f,{unitId:_0x3f2837}=_0x5307e9,_0x590573=_0x5307e9['threadId'],_0x390fa6={'memberId':this[_0x448f1f(0xd4)]['getCurrentUser']()[_0x448f1f(0x13a)],'unitId':_0x3f2837,'threadId':_0x590573,'solved':_0x5307e9[_0x448f1f(0xe4)]?_0x56e51a[_0x448f1f(0x10f)]:_0x56e51a[_0x448f1f(0xfa)]},_0x517a17=await this[_0x448f1f(0xf3)]['post']('/universer-api/comment/unit/'+_0x3f2837+_0x448f1f(0xf2),{'body':_0x390fa6});return!_0x517a17[_0x448f1f(0x150)][_0x448f1f(0x153)]||_0x517a17['body'][_0x448f1f(0x153)][_0x448f1f(0x111)]===0x1;}async[_0x45867f(0xd8)](_0x22d381,_0x3f8178,_0x22e689,_0x30faab){const _0x1cdfba=_0x45867f,_0x516fb8={'memberId':(await this[_0x1cdfba(0x129)][_0x1cdfba(0xf0)](_0x22d381))[_0x1cdfba(0x11b)](),'threadId':_0x22e689,'replyId':_0x30faab,'unitId':_0x22d381},_0x330de6=await this['_httpService']['post'](_0x1cdfba(0xd5)+_0x22d381+_0x1cdfba(0xdf),{'body':_0x516fb8});return!_0x330de6[_0x1cdfba(0x150)]['error']||_0x330de6['body']['error'][_0x1cdfba(0x111)]===0x1;}async[_0x45867f(0x10d)](_0x5d05ed,_0xe7e802,_0x1375cd){const _0x371ff8=_0x45867f,_0x22bbca={'unitId':_0x5d05ed,'threadId':_0x1375cd},_0x5a68cf=await this['_httpService'][_0x371ff8(0x116)](_0x371ff8(0xd5)+_0x5d05ed+'/list',{'body':_0x22bbca}),_0x2102da=_0x1375cd[_0x371ff8(0x13b)](_0x31b16a=>_0x22161b(_0x5a68cf[_0x371ff8(0x150)][_0x371ff8(0x136)][_0x31b16a],_0x5d05ed,_0xe7e802))[_0x371ff8(0x101)](Boolean);return Object[_0x371ff8(0x14b)](_0x5a68cf[_0x371ff8(0x150)][_0x371ff8(0x11e)])[_0x371ff8(0x152)](_0x1d3abe=>{const _0x40bd52=_0x371ff8;this[_0x40bd52(0xd4)][_0x40bd52(0x151)](_0x1d3abe);}),_0x2102da;}[_0x45867f(0x138)](_0x231e97){return{'id':_0x231e97['id'],'threadId':_0x231e97['threadId'],'ref':_0x231e97['ref']};}};_0x458444=_0x143016([_0x1e2737(0x0,_0x417afa[_0x45867f(0xd1)](_0xdeab71[_0x45867f(0x105)])),_0x1e2737(0x1,_0x417afa[_0x45867f(0xd1)](_0x417afa[_0x45867f(0xe2)])),_0x1e2737(0x2,_0x417afa[_0x45867f(0xd1)](_0x53bebc[_0x45867f(0x10b)])),_0x1e2737(0x3,_0x417afa[_0x45867f(0xd1)](_0x417afa[_0x45867f(0x112)]))],_0x458444);var _0x3d0749=Object[_0x45867f(0x118)],_0x150bfd=(_0xf324b8,_0xde8dc5,_0x363c97,_0x516433)=>{for(var _0x4ed861=_0x516433>0x1?void 0x0:_0x516433?_0x3d0749(_0xde8dc5,_0x363c97):_0xde8dc5,_0x5dc44d=_0xf324b8['length']-0x1,_0x5a35c6;_0x5dc44d>=0x0;_0x5dc44d--)(_0x5a35c6=_0xf324b8[_0x5dc44d])&&(_0x4ed861=_0x5a35c6(_0x4ed861)||_0x4ed861);return _0x4ed861;},_0x176500=(_0x290930,_0x3ed015)=>(_0x4d03b8,_0x5688f6)=>_0x3ed015(_0x4d03b8,_0x5688f6,_0x290930);let _0x114d73=class extends _0x417afa[_0x45867f(0x148)]{constructor(_0x5ed837,_0x539ced){const _0x2d4317=_0x45867f;super(),this[_0x2d4317(0x11d)]=_0x5ed837,this[_0x2d4317(0x114)]=_0x539ced,this[_0x2d4317(0x132)]();}[_0x45867f(0x132)](){const _0x5b4a27=_0x45867f;this['_threadCommentDataSourceService'][_0x5b4a27(0x109)]=this[_0x5b4a27(0x114)],this['_threadCommentDataSourceService'][_0x5b4a27(0x103)]=!0x1;}};_0x114d73=_0x150bfd([_0x176500(0x0,_0x2d48fc[_0x45867f(0x155)]),_0x176500(0x1,_0x417afa[_0x45867f(0xd1)](_0x458444))],_0x114d73);var _0x398a56=Object['defineProperty'],_0x36c6b2=Object[_0x45867f(0x118)],_0xadb6b8=(_0x65f894,_0x4a5013,_0x39d4b9)=>_0x4a5013 in _0x65f894?_0x398a56(_0x65f894,_0x4a5013,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39d4b9}):_0x65f894[_0x4a5013]=_0x39d4b9,_0x3343d5=(_0x387854,_0x8e6a55,_0x5805d3,_0x181cfe)=>{const _0x537001=_0x45867f;for(var _0x32e79f=_0x181cfe>0x1?void 0x0:_0x181cfe?_0x36c6b2(_0x8e6a55,_0x5805d3):_0x8e6a55,_0x4a37df=_0x387854[_0x537001(0xf5)]-0x1,_0x25f633;_0x4a37df>=0x0;_0x4a37df--)(_0x25f633=_0x387854[_0x4a37df])&&(_0x32e79f=_0x25f633(_0x32e79f)||_0x32e79f);return _0x32e79f;},_0x178213=(_0x2b2722,_0x4c2782)=>(_0x48e82d,_0x49a290)=>_0x4c2782(_0x48e82d,_0x49a290,_0x2b2722),_0x4348f2=(_0x2a96bb,_0x2b45e1,_0x42d156)=>_0xadb6b8(_0x2a96bb,typeof _0x2b45e1!=_0x45867f(0x15a)?_0x2b45e1+'':_0x2b45e1,_0x42d156);_0x434650[_0x45867f(0x117)]=class extends _0x417afa[_0x45867f(0xeb)]{constructor(_0x357b12=_0x3ed40f,_0x5f2cda,_0x5a238e){const _0x678ef9=_0x45867f;super(),this[_0x678ef9(0xd0)]=_0x357b12,this[_0x678ef9(0xf8)]=_0x5f2cda,this[_0x678ef9(0x126)]=_0x5a238e;const {..._0x17a671}=_0x417afa[_0x678ef9(0x14c)]({},_0x3ed40f,this[_0x678ef9(0xd0)]);this[_0x678ef9(0x126)][_0x678ef9(0x115)](_0x1d1d48,_0x17a671);}[_0x45867f(0x14d)](){const _0x4b28eb=_0x45867f;[[_0x458444],[_0x114d73],[_0x46e35c]][_0x4b28eb(0x152)](_0xce4084=>{const _0x5e4128=_0x4b28eb;this[_0x5e4128(0xf8)][_0x5e4128(0x127)](_0xce4084);});}[_0x45867f(0x134)](){const _0x4b0f3d=_0x45867f;this[_0x4b0f3d(0xf8)][_0x4b0f3d(0x13c)](_0x114d73),this[_0x4b0f3d(0xf8)][_0x4b0f3d(0x13c)](_0x46e35c);}},_0x4348f2(_0x434650['UniverThreadCommentDataSourcePlugin'],_0x45867f(0xff),_0x3ab465),_0x4348f2(_0x434650[_0x45867f(0x117)],_0x45867f(0x113),_0x417afa[_0x45867f(0x119)][_0x45867f(0xf1)]),_0x434650[_0x45867f(0x117)]=_0x3343d5([_0x417afa[_0x45867f(0xdd)](_0x31017a[_0x45867f(0x10e)],_0x53bebc['UniverCollaborationClientPlugin'],_0xf074[_0x45867f(0xd6)]),_0x178213(0x1,_0x417afa['Inject'](_0x417afa[_0x45867f(0x112)])),_0x178213(0x2,_0x417afa['IConfigService'])],_0x434650[_0x45867f(0x117)]),Object[_0x45867f(0x144)](_0x434650,Symbol[_0x45867f(0x10a)],{'value':'Module'});}));function _0xb0d2(_0x47af6a,_0x5cbdd0){const _0x5aee30=_0x5aee();return _0xb0d2=function(_0xb0d299,_0x3c85bb){_0xb0d299=_0xb0d299-0xd0;let _0x2715ef=_0x5aee30[_0xb0d299];return _0x2715ef;},_0xb0d2(_0x47af6a,_0x5cbdd0);}function _0x5aee(){const _0x545fe6=['Solved','payload','code','Injector','type','_threadCommentDataSource','setConfig','post','UniverThreadCommentDataSourcePlugin','getOwnPropertyDescriptor','UniverInstanceType','2421itSnhE','getMemberID','Reply','_threadCommentDataSourceService','users','Edit','@univerjs/thread-comment-ui','getComment','CustomRangeType','format','_threadCommentModel','Unknown','_configService','add','bufferTime','_sessionService','ThreadCommentModel','rangeId','UniverNetwork','dayjs','getUnit','/universer-api/user/list','personId','1475926VhYVnP','_initDataSource','replyId','onReady','7tColit','comments','pipe','saveCommentToSnapshot','5072658wPlxhg','userID','map','get','Add','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverProCollaborationClient','@univerjs-pro/collaboration-client','@univerjs/thread-comment','replies','defineProperty','root','@univerjs/core','parse','Disposable','1359171xUJlrW','content','values','merge','onStarting','Delete','threadId','body','addUser','forEach','error','_initUserSync','IThreadCommentDataSourceService','getUser','COMMENT','@univerjs/network','commentUpdate$','symbol','44RwpzvJ','_config','Inject','parentId','rxjs','_userService','/universer-api/comment/unit/','UniverLicensePlugin','UniverProThreadCommentDatasource','deleteComment','comment','size','313064QmyKvv','userId','DependentOn','reply','/delete','UniverThreadComment','/edit','UserManagerService','stringify','resolved','solved','77080YXEdbz','customRanges','rangeType','subscribe','resolveComment','Plugin','updateComment','createTimestamp','find','user','requireSession','UNIVER_UNKNOWN','/solved','_httpService','_init','length','addComment','YYYY/MM/DD\x20HH:mm','_injector','_commentService','OpenOrReOpen','thread-comment-data-source.config','slice','UNRECOGNIZED','Solve','pluginName','184045vqcUYj','filter','@univerjs-pro/license','syncUpdateMutationToColla','UniverThreadCommentUi','HTTPService','12240WGzhdH','object','function','dataSource','toStringTag','CollaborationSessionService','UniverCore','listComments','UniverThreadCommentUIPlugin'];_0x5aee=function(){return _0x545fe6;};return _0x5aee();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.10-nightly.
|
|
3
|
+
"version": "0.6.10-nightly.202504231607",
|
|
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.6.10-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.6.10-nightly.
|
|
50
|
-
"@univerjs/core": "0.6.10-nightly.
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.6.10-nightly.
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.10-nightly.202504231607",
|
|
49
|
+
"@univerjs-pro/license": "0.6.10-nightly.202504231607",
|
|
50
|
+
"@univerjs/core": "0.6.10-nightly.202504231607",
|
|
51
|
+
"@univerjs/protocol": "0.1.46-alpha.3",
|
|
52
|
+
"@univerjs/thread-comment": "0.6.10-nightly.202504231607",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.6.10-nightly.202504231607",
|
|
54
|
+
"@univerjs/network": "0.6.10-nightly.202504231607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|