@univerjs-pro/thread-comment-datasource 0.3.0-alpha.0 → 0.3.0-alpha.1
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/umd/index.js +1 -1
- package/package.json +16 -16
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x1f4f70=_0x2fe5;(function(_0x5f4eba,_0x1fec57){const _0x1c694f=_0x2fe5,_0x2a8bf1=_0x5f4eba();while(!![]){try{const _0x56610d=-parseInt(_0x1c694f(0x10e))/0x1*(parseInt(_0x1c694f(0x14b))/0x2)+-parseInt(_0x1c694f(0xed))/0x3+parseInt(_0x1c694f(0x131))/0x4*(-parseInt(_0x1c694f(0xf9))/0x5)+-parseInt(_0x1c694f(0xdf))/0x6+-parseInt(_0x1c694f(0xff))/0x7*(parseInt(_0x1c694f(0xf0))/0x8)+-parseInt(_0x1c694f(0x14c))/0x9*(parseInt(_0x1c694f(0x14e))/0xa)+-parseInt(_0x1c694f(0xf1))/0xb*(-parseInt(_0x1c694f(0x11c))/0xc);if(_0x56610d===_0x1fec57)break;else _0x2a8bf1['push'](_0x2a8bf1['shift']());}catch(_0x308779){_0x2a8bf1['push'](_0x2a8bf1['shift']());}}}(_0x200b,0x943ab));Object['defineProperty'](exports,Symbol[_0x1f4f70(0x14f)],{'value':'Module'});const c=require('@univerjs/core'),g=require('@univerjs/thread-comment'),N=require(_0x1f4f70(0x108)),y=require('@univerjs-pro/collaboration-client'),E=require(_0x1f4f70(0x15f)),q=require('rxjs'),O=require(_0x1f4f70(0x115)),$=require(_0x1f4f70(0x137)),x=_0x1f4f70(0x119);function _0x2fe5(_0x253a93,_0xc2c45a){const _0x200b19=_0x200b();return _0x2fe5=function(_0x2fe5a1,_0x2aff71){_0x2fe5a1=_0x2fe5a1-0xd4;let _0x50abad=_0x200b19[_0x2fe5a1];return _0x50abad;},_0x2fe5(_0x253a93,_0xc2c45a);}var p=(_0xb145e4=>(_0xb145e4[_0xb145e4['OpenOrReOpen']=0x0]=_0x1f4f70(0xd7),_0xb145e4[_0xb145e4[_0x1f4f70(0xd8)]=0x1]=_0x1f4f70(0xd8),_0xb145e4[_0xb145e4[_0x1f4f70(0x124)]=-0x1]=_0x1f4f70(0x124),_0xb145e4))(p||{}),v=(_0x574375=>(_0x574375[_0x574375['Unknown']=0x0]=_0x1f4f70(0x11d),_0x574375[_0x574375['Add']=0x1]=_0x1f4f70(0x13d),_0x574375[_0x574375[_0x1f4f70(0x12b)]=0x2]='Reply',_0x574375[_0x574375[_0x1f4f70(0x142)]=0x3]=_0x1f4f70(0x142),_0x574375[_0x574375[_0x1f4f70(0x14d)]=0x4]=_0x1f4f70(0x14d),_0x574375[_0x574375[_0x1f4f70(0xf7)]=0x5]=_0x1f4f70(0xf7),_0x574375[_0x574375['UNRECOGNIZED']=-0x1]=_0x1f4f70(0x124),_0x574375))(v||{});const P=_0x196e28=>$(new Date(+_0x196e28))[_0x1f4f70(0xf5)](_0x1f4f70(0x13e)),L=async(_0x34be17,_0x161732)=>{const _0x38e9ce=_0x1f4f70,_0x2b11e3=_0x34be17[_0x38e9ce(0x140)](c['UserManagerService']),_0x58f527=_0x34be17[_0x38e9ce(0x140)](O[_0x38e9ce(0xec)]);_0x161732[_0x38e9ce(0xdb)](_0x83a851=>{const _0x1aec5e=_0x38e9ce;_0x2b11e3['getUser'](_0x83a851)&&_0x161732[_0x1aec5e(0x11a)](_0x83a851);}),_0x161732[_0x38e9ce(0x10f)]&&(await _0x58f527[_0x38e9ce(0x140)](_0x38e9ce(0xd6),{'params':{'userIDs':[..._0x161732]}}))[_0x38e9ce(0x155)][_0x38e9ce(0x123)][_0x38e9ce(0xdb)](_0x30558e=>{const _0x3d44a4=_0x38e9ce;_0x30558e&&_0x2b11e3[_0x3d44a4(0x150)](_0x30558e);});};var Y=Object[_0x1f4f70(0x147)],G=Object[_0x1f4f70(0x12c)],H=(_0x1c342b,_0x12a754,_0x744135,_0x130223)=>{const _0x1cf0bf=_0x1f4f70;for(var _0x591627=_0x130223>0x1?void 0x0:_0x130223?G(_0x12a754,_0x744135):_0x12a754,_0x568070=_0x1c342b[_0x1cf0bf(0x15c)]-0x1,_0x153446;_0x568070>=0x0;_0x568070--)(_0x153446=_0x1c342b[_0x568070])&&(_0x591627=(_0x130223?_0x153446(_0x12a754,_0x744135,_0x591627):_0x153446(_0x591627))||_0x591627);return _0x130223&&_0x591627&&Y(_0x12a754,_0x744135,_0x591627),_0x591627;},I=(_0x12441,_0x1708ca)=>(_0x18a20b,_0xa939d9)=>_0x1708ca(_0x18a20b,_0xa939d9,_0x12441);let f=class extends c['Disposable']{constructor(_0x29b248,_0x456bd6,_0x3cb8ec,_0x4a12b8){const _0x402a6b=_0x1f4f70;super(),this[_0x402a6b(0x14a)]=_0x29b248,this[_0x402a6b(0xe2)]=_0x456bd6,this[_0x402a6b(0xe1)]=_0x3cb8ec,this['_injector']=_0x4a12b8,this[_0x402a6b(0x117)](),this[_0x402a6b(0x105)]();}['_initUserSync'](){const _0x22f710=_0x1f4f70;this[_0x22f710(0x114)](this[_0x22f710(0xe2)][_0x22f710(0xea)][_0x22f710(0x101)](q[_0x22f710(0x15d)](0x10))[_0x22f710(0x10c)](_0x521579=>{const _0x1b0f90=_0x22f710,_0x439e12=new Set();_0x521579[_0x1b0f90(0xdb)](_0x553ba5=>{const _0x4a8dfa=_0x1b0f90;switch(_0x553ba5[_0x4a8dfa(0x132)]){case _0x4a8dfa(0x146):{const _0x8c8718=_0x553ba5['payload'][_0x4a8dfa(0xf6)];_0x439e12['add'](_0x8c8718);break;}}}),L(this['_injector'],_0x439e12);}));}[_0x1f4f70(0x117)](){const _0x451e6b=_0x1f4f70;this[_0x451e6b(0x114)](this[_0x451e6b(0x14a)]['commentUpdate$']['subscribe'](async _0x14fab9=>{const _0x2d2396=_0x451e6b;var _0x3b4e4a,_0x2c5c5c;const _0x470c56=this[_0x2d2396(0xe2)]['getThread'](_0x14fab9[_0x2d2396(0x154)],_0x14fab9[_0x2d2396(0x13f)]);if(!_0x470c56)return;const {unitId:_0x1e1445,subUnitId:_0x3dc2bf}=_0x470c56;switch(_0x14fab9[_0x2d2396(0xf2)]&&this[_0x2d2396(0xe1)][_0x2d2396(0x150)](_0x14fab9['user']),_0x14fab9[_0x2d2396(0x132)]){case v[_0x2d2396(0x13d)]:break;case v['Reply']:{this[_0x2d2396(0xe2)][_0x2d2396(0xe9)](_0x1e1445,_0x3dc2bf,{'unitId':_0x1e1445,'subUnitId':_0x3dc2bf,'ref':'','id':_0x14fab9[_0x2d2396(0x116)],'dT':P(+_0x14fab9[_0x2d2396(0xfe)]),'threadId':_0x14fab9['threadId'],'personId':(_0x2c5c5c=(_0x3b4e4a=_0x14fab9[_0x2d2396(0xf2)])==null?void 0x0:_0x3b4e4a[_0x2d2396(0x104)])!=null?_0x2c5c5c:_0x14fab9[_0x2d2396(0xe4)],'text':JSON[_0x2d2396(0x11b)](_0x14fab9[_0x2d2396(0x134)]),'parentId':_0x470c56['id']});break;}case v['Delete']:{const _0x893f86=this[_0x2d2396(0xe2)]['getComment'](_0x1e1445,_0x3dc2bf,_0x14fab9['replyId']);_0x893f86&&_0x893f86[_0x2d2396(0x10b)]&&this[_0x2d2396(0xe2)][_0x2d2396(0xde)](_0x1e1445,_0x3dc2bf,_0x14fab9[_0x2d2396(0x116)]);break;}case v['Edit']:{this[_0x2d2396(0xe2)]['updateComment'](_0x1e1445,_0x3dc2bf,{'commentId':_0x14fab9[_0x2d2396(0x116)],'text':JSON['parse'](_0x14fab9['content'])});break;}case v['Solve']:{const _0x2a2f92=this[_0x2d2396(0xe2)][_0x2d2396(0xe6)](_0x1e1445,_0x14fab9['threadId']);_0x2a2f92&&this[_0x2d2396(0xe2)][_0x2d2396(0x126)](_0x1e1445,_0x3dc2bf,_0x2a2f92['id'],_0x14fab9[_0x2d2396(0x110)]===p['Solved']);break;}}}));}};f=H([c[_0x1f4f70(0x139)](c[_0x1f4f70(0x122)]['Ready'],f),I(0x0,c[_0x1f4f70(0x103)](y[_0x1f4f70(0x12f)])),I(0x1,c[_0x1f4f70(0x103)](g[_0x1f4f70(0x141)])),I(0x2,c[_0x1f4f70(0x103)](c['UserManagerService'])),I(0x3,c[_0x1f4f70(0x103)](c[_0x1f4f70(0x151)]))],f);const A=_0x1f4f70(0xe5),J={};var F=Object[_0x1f4f70(0x147)],Z=Object[_0x1f4f70(0x12c)],W=(_0x502a41,_0x892612,_0x532b6f,_0x2a9337)=>{const _0x1c0d08=_0x1f4f70;for(var _0x3e1d2f=_0x2a9337>0x1?void 0x0:_0x2a9337?Z(_0x892612,_0x532b6f):_0x892612,_0x3e87d9=_0x502a41[_0x1c0d08(0x15c)]-0x1,_0x55c549;_0x3e87d9>=0x0;_0x3e87d9--)(_0x55c549=_0x502a41[_0x3e87d9])&&(_0x3e1d2f=(_0x2a9337?_0x55c549(_0x892612,_0x532b6f,_0x3e1d2f):_0x55c549(_0x3e1d2f))||_0x3e1d2f);return _0x2a9337&&_0x3e1d2f&&F(_0x892612,_0x532b6f,_0x3e1d2f),_0x3e1d2f;},S=(_0x34a40f,_0x5d4992)=>(_0x4626cf,_0x50415b)=>_0x5d4992(_0x4626cf,_0x50415b,_0x34a40f);function _0x200b(){const _0x15b968=['https','@univerjs/thread-comment-ui','/solved','DependentOn','parentId','subscribe','dataSource','8qpOASn','size','solved','/edit','/reply','onStarting','disposeWithMe','@univerjs/network','replyId','_init','host','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','delete','parse','2450892YdKIvh','Unknown','filter','getCurrentUser','_configService','_httpService','LifecycleStages','users','UNRECOGNIZED','slice','resolveComment','getMentions','UniverLicensePlugin','code','href','Reply','getOwnPropertyDescriptor','/delete','IConfigService','CommentService','location','8kJVvqA','type','stringify','content','_threadCommentMentionDataService','IThreadCommentMentionDataService','dayjs','UniverInstanceType','OnLifecycle','syncUpdateMutationToColla','CustomRangeType','name','Add','YYYY/MM/DD\x20HH:mm','threadId','get','ThreadCommentModel','Edit','unit','getMemberID','resolved','add','defineProperty','Starting','_threadCommentMentionDataSource','_commentService','52708zwLmWg','5208561cJYAvr','Delete','20jKyeQp','toStringTag','addUser','Injector','_threadCommentDataSourceService','/list','unitId','body','error','UserManagerService','setConfig','/universer-api/comment/unit/','rangeType','comments','length','bufferTime','listComments','@univerjs-pro/license','UniverCollaborationClientPlugin','UniverThreadCommentUIPlugin','COMMENT','/universer-api/user/list','OpenOrReOpen','Solved','rangeId','Plugin','forEach','values','comment','deleteComment','795402VVuVMW','post','_userService','_threadCommentModel','customRanges','userId','thread-comment-data-source.config','getThread','pluginName','Disposable','addComment','commentUpdate$','_initDataSource','HTTPService','120753jGvpEu','_sessionService','ref','27096ylQyGO','121QZZZuZ','user','protocol','saveCommentToSnapshot','format','personId','Solve','map','25835TQMTpV','subject','_threadCommentDataSource','UniverThreadCommentDataSourcePlugin','requireSession','createTimestamp','182ssKVWg','replies','pipe','_config','Inject','userID','_initUserSync','_injector'];_0x200b=function(){return _0x15b968;};return _0x200b();}function z(_0x199b07,_0x39dc64){const _0x15b74c=_0x1f4f70,_0x59b935=_0x199b07[_0x15b74c(0x100)][0x0];return{..._0x39dc64,'id':_0x59b935[_0x15b74c(0x116)],'resolved':_0x199b07[_0x15b74c(0x110)]===0x1,'dT':P(_0x59b935[_0x15b74c(0xfe)]),'personId':_0x59b935['userId'],'threadId':_0x59b935[_0x15b74c(0x13f)]};}function B(_0x5d96ad,_0x3d937f,_0x5d23f9){const _0x244a5d=_0x1f4f70;var _0x336719,_0x2fb343;if(((_0x2fb343=(_0x336719=_0x5d96ad==null?void 0x0:_0x5d96ad[_0x244a5d(0x100)])==null?void 0x0:_0x336719[_0x244a5d(0x15c)])!=null?_0x2fb343:0x0)>0x0){const _0x3fce54=(_0x5b18a5,_0x22a9fd)=>({'id':_0x5b18a5[_0x244a5d(0x116)],'threadId':_0x5b18a5['threadId'],'dT':P(_0x5b18a5[_0x244a5d(0xfe)]),'personId':_0x5b18a5[_0x244a5d(0xe4)],'resolved':_0x5d96ad[_0x244a5d(0x110)]===p['Solved'],'unitId':_0x3d937f,'subUnitId':_0x5d23f9,'text':JSON[_0x244a5d(0x11b)](_0x5b18a5[_0x244a5d(0x134)]),'parentId':_0x22a9fd}),_0x222cd2=_0x3fce54(_0x5d96ad[_0x244a5d(0x100)][0x0]);return{..._0x222cd2,'children':_0x5d96ad['replies'][_0x244a5d(0x125)](0x1)['map'](_0x5ce931=>_0x3fce54(_0x5ce931,_0x222cd2['id']))};}return null;}let C=class{constructor(_0x2f1906,_0xf9f4f,_0x4f5a1b,_0x2ecea6){const _0x1ddb7d=_0x1f4f70;this[_0x1ddb7d(0x121)]=_0x2f1906,this[_0x1ddb7d(0xe1)]=_0xf9f4f,this[_0x1ddb7d(0xee)]=_0x4f5a1b,this[_0x1ddb7d(0x106)]=_0x2ecea6;}async[_0x1f4f70(0xe9)](_0x1ec41e){const _0x3a3c07=_0x1f4f70;var _0x5825fa,_0x480694;const {parentId:_0x43dbc9,unitId:_0x44b3af,text:_0x121ab8,threadId:_0x5696d}=_0x1ec41e,_0x3fcca1=(_0x480694=(_0x5825fa=_0x121ab8[_0x3a3c07(0xe3)])==null?void 0x0:_0x5825fa[_0x3a3c07(0x11e)](_0x5d1bab=>_0x5d1bab[_0x3a3c07(0x15a)]===c['CustomRangeType'][_0x3a3c07(0xd5)])[_0x3a3c07(0xf8)](_0x347ae3=>_0x347ae3[_0x3a3c07(0xd9)]))!=null?_0x480694:[],_0x4e6477=JSON[_0x3a3c07(0x133)](_0x121ab8),_0x130f8b=(await this[_0x3a3c07(0xee)]['requireSession'](_0x44b3af))[_0x3a3c07(0x144)]();if(_0x43dbc9){const _0x1e5ff1={'memberId':_0x130f8b,'unitId':_0x44b3af,'content':_0x4e6477,'mention':_0x3fcca1,'threadId':_0x5696d},_0x51017c=(await this[_0x3a3c07(0x121)]['post'](_0x3a3c07(0x159)+_0x44b3af+_0x3a3c07(0x112),{'body':_0x1e5ff1}))[_0x3a3c07(0x155)]['reply'];return{..._0x1ec41e,'id':_0x51017c[_0x3a3c07(0x116)],'dT':$(+_0x51017c[_0x3a3c07(0xfe)])[_0x3a3c07(0xf5)](_0x3a3c07(0x13e)),'personId':_0x51017c[_0x3a3c07(0xe4)]};}else{const _0x282a10={'memberId':_0x130f8b,'unitId':_0x44b3af,'content':_0x4e6477,'mention':_0x3fcca1},_0x321161=await this[_0x3a3c07(0x121)][_0x3a3c07(0xe0)](_0x3a3c07(0x159)+_0x44b3af+'/add',{'body':_0x282a10});return z(_0x321161['body'][_0x3a3c07(0xdd)],_0x1ec41e);}}async['updateComment'](_0x546713){const _0x46db6b=_0x1f4f70;var _0x194e0c,_0x4c8238;const {text:_0x3cbec8,unitId:_0x106a0c}=_0x546713,_0x347f98=(_0x4c8238=(_0x194e0c=_0x3cbec8[_0x46db6b(0xe3)])==null?void 0x0:_0x194e0c[_0x46db6b(0x11e)](_0x149f6f=>_0x149f6f[_0x46db6b(0x15a)]===c[_0x46db6b(0x13b)][_0x46db6b(0xd5)])[_0x46db6b(0xf8)](_0x6fcef5=>_0x6fcef5[_0x46db6b(0xd9)]))!=null?_0x4c8238:[],_0x124dab=JSON['stringify'](_0x3cbec8),_0x54374e=_0x546713['threadId'],_0x43747f=_0x546713['id'],_0x484082={'memberId':(await this[_0x46db6b(0xee)][_0x46db6b(0xfd)](_0x106a0c))[_0x46db6b(0x144)](),'unitId':_0x106a0c,'threadId':_0x54374e,'mention':_0x347f98,'content':_0x124dab,'replyId':_0x43747f},_0x3afbca=await this[_0x46db6b(0x121)][_0x46db6b(0xe0)](_0x46db6b(0x159)+_0x106a0c+_0x46db6b(0x111),{'body':_0x484082});return!_0x3afbca[_0x46db6b(0x155)]['error']||_0x3afbca[_0x46db6b(0x155)]['error'][_0x46db6b(0x129)]===0x1;}async[_0x1f4f70(0x126)](_0x5e67c6){const _0x57dd42=_0x1f4f70,{unitId:_0x4e1d50}=_0x5e67c6,_0x1643ae=_0x5e67c6[_0x57dd42(0x13f)],_0xe1b05b={'memberId':this['_userService'][_0x57dd42(0x11f)]()[_0x57dd42(0x104)],'unitId':_0x4e1d50,'threadId':_0x1643ae,'solved':_0x5e67c6[_0x57dd42(0x145)]?p[_0x57dd42(0xd8)]:p[_0x57dd42(0xd7)]},_0xb6d441=await this[_0x57dd42(0x121)]['post'](_0x57dd42(0x159)+_0x4e1d50+_0x57dd42(0x109),{'body':_0xe1b05b});return!_0xb6d441[_0x57dd42(0x155)][_0x57dd42(0x156)]||_0xb6d441[_0x57dd42(0x155)][_0x57dd42(0x156)][_0x57dd42(0x129)]===0x1;}async[_0x1f4f70(0xde)](_0x53b67e,_0x399d08,_0x29a222,_0x2b5237){const _0x752201=_0x1f4f70,_0x39c7f8={'memberId':(await this[_0x752201(0xee)][_0x752201(0xfd)](_0x53b67e))['getMemberID'](),'threadId':_0x29a222,'replyId':_0x2b5237,'unitId':_0x53b67e},_0x32b025=await this[_0x752201(0x121)][_0x752201(0xe0)](_0x752201(0x159)+_0x53b67e+_0x752201(0x12d),{'body':_0x39c7f8});return!_0x32b025[_0x752201(0x155)][_0x752201(0x156)]||_0x32b025[_0x752201(0x155)][_0x752201(0x156)][_0x752201(0x129)]===0x1;}async[_0x1f4f70(0x15e)](_0x37a66c,_0x391a87,_0x5a76ce){const _0x152ddf=_0x1f4f70,_0x3bb70f={'unitId':_0x37a66c,'threadId':_0x5a76ce},_0x2607fe=await this['_httpService'][_0x152ddf(0xe0)]('/universer-api/comment/unit/'+_0x37a66c+_0x152ddf(0x153),{'body':_0x3bb70f}),_0x54f28f=_0x5a76ce[_0x152ddf(0xf8)](_0x1f36f7=>B(_0x2607fe[_0x152ddf(0x155)][_0x152ddf(0x15b)][_0x1f36f7],_0x37a66c,_0x391a87))[_0x152ddf(0x11e)](Boolean);return Object[_0x152ddf(0xdc)](_0x2607fe['body'][_0x152ddf(0x123)])[_0x152ddf(0xdb)](_0xae3465=>{const _0x5d86d7=_0x152ddf;this[_0x5d86d7(0xe1)][_0x5d86d7(0x150)](_0xae3465);}),_0x54f28f;}[_0x1f4f70(0xf4)](_0x569a5e){const _0x1a4c32=_0x1f4f70;return{'id':_0x569a5e['id'],'threadId':_0x569a5e[_0x1a4c32(0x13f)],'ref':_0x569a5e[_0x1a4c32(0xef)]};}};C=W([S(0x0,c[_0x1f4f70(0x103)](O[_0x1f4f70(0xec)])),S(0x1,c[_0x1f4f70(0x103)](c[_0x1f4f70(0x157)])),S(0x2,c['Inject'](y['CollaborationSessionService'])),S(0x3,c[_0x1f4f70(0x103)](c[_0x1f4f70(0x151)]))],C);var K=Object[_0x1f4f70(0x147)],V=Object[_0x1f4f70(0x12c)],Q=(_0x251e83,_0x5d9c3a,_0x45b364,_0x6b51f1)=>{const _0x2ebcdb=_0x1f4f70;for(var _0x518d42=_0x6b51f1>0x1?void 0x0:_0x6b51f1?V(_0x5d9c3a,_0x45b364):_0x5d9c3a,_0x4e92c8=_0x251e83[_0x2ebcdb(0x15c)]-0x1,_0x2fe041;_0x4e92c8>=0x0;_0x4e92c8--)(_0x2fe041=_0x251e83[_0x4e92c8])&&(_0x518d42=(_0x6b51f1?_0x2fe041(_0x5d9c3a,_0x45b364,_0x518d42):_0x2fe041(_0x518d42))||_0x518d42);return _0x6b51f1&&_0x518d42&&K(_0x5d9c3a,_0x45b364,_0x518d42),_0x518d42;},X=(_0x2bce3c,_0x4880a2)=>(_0x38c649,_0xc85ed4)=>_0x4880a2(_0x38c649,_0xc85ed4,_0x2bce3c);let D=class{constructor(_0x318c20){const _0x480274=_0x1f4f70;this[_0x480274(0x121)]=_0x318c20;}async[_0x1f4f70(0x127)](_0x3bd3b3,_0x30937e,_0x209581){const _0x410f1f=_0x1f4f70,_0x5d7670=new URL(window[_0x410f1f(0x130)][_0x410f1f(0x12a)])['searchParams'][_0x410f1f(0x140)](_0x410f1f(0x143));if(!_0x5d7670)return[];const _0x5d62fd=window[_0x410f1f(0x130)][_0x410f1f(0x118)],_0x58090d=window[_0x410f1f(0x130)][_0x410f1f(0xf3)]==='https:'?_0x410f1f(0x107):'http';return(await this[_0x410f1f(0x121)][_0x410f1f(0x140)](_0x58090d+'://'+_0x5d62fd+'/universer-api/authz/collaborator',{'params':{'objectID':_0x5d7670,'unitID':_0x5d7670}}))['body']['collaborators'][_0x410f1f(0xf8)](_0x18150a=>{const _0x4daa82=_0x410f1f;var _0x529fbb,_0x223d8b,_0x41be2f,_0x15ef7f,_0x2e6bfd,_0x3e0d42;return{'id':(_0x223d8b=(_0x529fbb=_0x18150a[_0x4daa82(0xfa)])==null?void 0x0:_0x529fbb['userID'])!=null?_0x223d8b:'','label':(_0x15ef7f=(_0x41be2f=_0x18150a['subject'])==null?void 0x0:_0x41be2f[_0x4daa82(0x13c)])!=null?_0x15ef7f:'','icon':(_0x3e0d42=(_0x2e6bfd=_0x18150a[_0x4daa82(0xfa)])==null?void 0x0:_0x2e6bfd['avatar'])!=null?_0x3e0d42:'','type':_0x4daa82(0xf2)};});}};D=Q([X(0x0,c[_0x1f4f70(0x103)](O[_0x1f4f70(0xec)]))],D);var k=Object[_0x1f4f70(0x147)],ee=Object[_0x1f4f70(0x12c)],re=(_0x59503d,_0x7a33a5,_0x3d217e,_0x36b86e)=>{const _0x2516b7=_0x1f4f70;for(var _0x821568=_0x36b86e>0x1?void 0x0:_0x36b86e?ee(_0x7a33a5,_0x3d217e):_0x7a33a5,_0x3655e7=_0x59503d[_0x2516b7(0x15c)]-0x1,_0x22ba7e;_0x3655e7>=0x0;_0x3655e7--)(_0x22ba7e=_0x59503d[_0x3655e7])&&(_0x821568=(_0x36b86e?_0x22ba7e(_0x7a33a5,_0x3d217e,_0x821568):_0x22ba7e(_0x821568))||_0x821568);return _0x36b86e&&_0x821568&&k(_0x7a33a5,_0x3d217e,_0x821568),_0x821568;},_=(_0x4bfada,_0x5a589c)=>(_0x4b4aff,_0x2c52f6)=>_0x5a589c(_0x4b4aff,_0x2c52f6,_0x4bfada);let b=class extends c[_0x1f4f70(0xe8)]{constructor(_0x137a63,_0x4c7ebe,_0x596ee7,_0xd4878c){const _0x671e99=_0x1f4f70;super(),this[_0x671e99(0x152)]=_0x137a63,this['_threadCommentDataSource']=_0x4c7ebe,this[_0x671e99(0x135)]=_0x596ee7,this[_0x671e99(0x149)]=_0xd4878c,this[_0x671e99(0xeb)]();}['_initDataSource'](){const _0x54135f=_0x1f4f70;this['_threadCommentDataSourceService'][_0x54135f(0x10d)]=this[_0x54135f(0xfb)],this[_0x54135f(0x152)][_0x54135f(0x13a)]=!0x1,this['_threadCommentMentionDataService'][_0x54135f(0x10d)]=this[_0x54135f(0x149)];}};b=re([c['OnLifecycle'](c[_0x1f4f70(0x122)][_0x1f4f70(0x148)],b),_(0x0,g['IThreadCommentDataSourceService']),_(0x1,c[_0x1f4f70(0x103)](C)),_(0x2,N[_0x1f4f70(0x136)]),_(0x3,c['Inject'](D))],b);var U=Object[_0x1f4f70(0x147)],te=Object[_0x1f4f70(0x12c)],se=(_0x16684a,_0x59d857,_0x4d571f)=>_0x59d857 in _0x16684a?U(_0x16684a,_0x59d857,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d571f}):_0x16684a[_0x59d857]=_0x4d571f,ne=(_0x50f547,_0x179de3,_0x34aa0b,_0x138d25)=>{const _0x563982=_0x1f4f70;for(var _0x19a44d=_0x138d25>0x1?void 0x0:_0x138d25?te(_0x179de3,_0x34aa0b):_0x179de3,_0x382dd0=_0x50f547[_0x563982(0x15c)]-0x1,_0x1d2146;_0x382dd0>=0x0;_0x382dd0--)(_0x1d2146=_0x50f547[_0x382dd0])&&(_0x19a44d=(_0x138d25?_0x1d2146(_0x179de3,_0x34aa0b,_0x19a44d):_0x1d2146(_0x19a44d))||_0x19a44d);return _0x138d25&&_0x19a44d&&U(_0x179de3,_0x34aa0b,_0x19a44d),_0x19a44d;},T=(_0x29f4a3,_0x2b0673)=>(_0x1f5dec,_0x594d29)=>_0x2b0673(_0x1f5dec,_0x594d29,_0x29f4a3),R=(_0x4625b5,_0x3f5996,_0x4bb510)=>se(_0x4625b5,typeof _0x3f5996!='symbol'?_0x3f5996+'':_0x3f5996,_0x4bb510);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1f4f70(0xda)]{constructor(_0x21bf8c=J,_0x22bcf1,_0x523f96){const _0x330886=_0x1f4f70;super(),this[_0x330886(0x102)]=_0x21bf8c,this[_0x330886(0x106)]=_0x22bcf1,this[_0x330886(0x120)]=_0x523f96;const {..._0x1d3d65}=this[_0x330886(0x102)];this[_0x330886(0x120)][_0x330886(0x158)](A,_0x1d3d65);}[_0x1f4f70(0x113)](){const _0x2eba0e=_0x1f4f70;[[D],[C],[b],[f]][_0x2eba0e(0xdb)](_0x4d4c92=>{const _0x17b872=_0x2eba0e;this[_0x17b872(0x106)]['add'](_0x4d4c92);});}},R(exports['UniverThreadCommentDataSourcePlugin'],_0x1f4f70(0xe7),x),R(exports[_0x1f4f70(0xfc)],_0x1f4f70(0x132),c[_0x1f4f70(0x138)]['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=ne([c[_0x1f4f70(0x10a)](g['UniverThreadCommentPlugin'],N[_0x1f4f70(0xd4)],y[_0x1f4f70(0x160)],E[_0x1f4f70(0x128)]),T(0x1,c[_0x1f4f70(0x103)](c[_0x1f4f70(0x151)])),T(0x2,c[_0x1f4f70(0x12e)])],exports[_0x1f4f70(0xfc)]);
|
|
1
|
+
'use strict';const _0x50539d=_0x47f8;function _0x2c92(){const _0x43da5b=['forEach','OnLifecycle','customRanges','code','_threadCommentMentionDataService','toStringTag','dataSource','Unknown','getComment','host','comment','/universer-api/authz/collaborator','IThreadCommentDataSourceService','resolved','_config','requireSession','_initDataSource','UniverInstanceType','UNRECOGNIZED','_configService','UniverThreadCommentUIPlugin','content','/edit','51248ZEdhga','_httpService','dayjs','Edit','Reply','filter','userID','_threadCommentModel','UniverThreadCommentPlugin','get','addComment','/reply','slice','commentUpdate$','symbol','_sessionService','userId','/add','error','rxjs','location','HTTPService','@univerjs/thread-comment','10350414MhHzHE','thread-comment-data-source.config','replies','@univerjs-pro/collaboration-client','setConfig','@univerjs/core','1gcoOSM','payload','OpenOrReOpen','length','reply','@univerjs/thread-comment-ui','post','https:','ThreadCommentModel','add','931GOaVzI','YYYY/MM/DD\x20HH:mm','UniverLicensePlugin','ref','://','Injector','collaborators','_threadCommentDataSource','getThread','993435ywjBhk','COMMENT','LifecycleStages','stringify','/delete','subscribe','disposeWithMe','listComments','unitId','_threadCommentMentionDataSource','users','Add','avatar','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','pluginName','_init','onStarting','user','protocol','getUser','unit','5355964LqWpBH','syncUpdateMutationToColla','subject','comments','searchParams','_threadCommentDataSourceService','replyId','defineProperty','Inject','values','Solved','/solved','47661570PGQlGI','3082124tItkIw','42SdffWU','getMentions','Plugin','https','UNIVER_UNKNOWN','/list','getOwnPropertyDescriptor','map','threadId','UserManagerService','CommentService','UniverThreadCommentDataSourcePlugin','resolveComment','body','personId','_userService','getCurrentUser','_injector','size','1301847uuhiSo','pipe','type','/universer-api/comment/unit/','getMemberID','parse','rangeType','addUser','createTimestamp','name','Delete','Ready','_commentService'];_0x2c92=function(){return _0x43da5b;};return _0x2c92();}(function(_0x5469db,_0x5af784){const _0x4247e0=_0x47f8,_0x2a379f=_0x5469db();while(!![]){try{const _0x2f5e12=parseInt(_0x4247e0(0x1b0))/0x1*(-parseInt(_0x4247e0(0x1e6))/0x2)+-parseInt(_0x4247e0(0x1fa))/0x3+-parseInt(_0x4247e0(0x1d9))/0x4+parseInt(_0x4247e0(0x1c3))/0x5*(parseInt(_0x4247e0(0x1e7))/0x6)+parseInt(_0x4247e0(0x1ba))/0x7*(-parseInt(_0x4247e0(0x193))/0x8)+-parseInt(_0x4247e0(0x1aa))/0x9+parseInt(_0x4247e0(0x1e5))/0xa;if(_0x2f5e12===_0x5af784)break;else _0x2a379f['push'](_0x2a379f['shift']());}catch(_0x2c65df){_0x2a379f['push'](_0x2a379f['shift']());}}}(_0x2c92,0xcd4d8));Object[_0x50539d(0x1e0)](exports,Symbol[_0x50539d(0x20c)],{'value':'Module'});const c=require(_0x50539d(0x1af)),g=require(_0x50539d(0x1a9)),N=require(_0x50539d(0x1b5)),y=require(_0x50539d(0x1ad)),E=require('@univerjs-pro/license'),q=require(_0x50539d(0x1a6)),O=require('@univerjs/network'),$=require(_0x50539d(0x195)),x=_0x50539d(0x1d0);var p=(_0xddacba=>(_0xddacba[_0xddacba[_0x50539d(0x1b2)]=0x0]=_0x50539d(0x1b2),_0xddacba[_0xddacba['Solved']=0x1]=_0x50539d(0x1e3),_0xddacba[_0xddacba[_0x50539d(0x18e)]=-0x1]=_0x50539d(0x18e),_0xddacba))(p||{}),v=(_0x3d547a=>(_0x3d547a[_0x3d547a['Unknown']=0x0]=_0x50539d(0x20e),_0x3d547a[_0x3d547a[_0x50539d(0x1ce)]=0x1]=_0x50539d(0x1ce),_0x3d547a[_0x3d547a['Reply']=0x2]='Reply',_0x3d547a[_0x3d547a[_0x50539d(0x196)]=0x3]=_0x50539d(0x196),_0x3d547a[_0x3d547a[_0x50539d(0x204)]=0x4]=_0x50539d(0x204),_0x3d547a[_0x3d547a['Solve']=0x5]='Solve',_0x3d547a[_0x3d547a[_0x50539d(0x18e)]=-0x1]=_0x50539d(0x18e),_0x3d547a))(v||{});const P=_0x10c5fe=>$(new Date(+_0x10c5fe))['format'](_0x50539d(0x1bb)),L=async(_0x396c58,_0x5632db)=>{const _0x1a5b78=_0x50539d,_0x4faadb=_0x396c58['get'](c[_0x1a5b78(0x1f0)]),_0x4b8e9a=_0x396c58[_0x1a5b78(0x19c)](O[_0x1a5b78(0x1a8)]);_0x5632db['forEach'](_0x1f9900=>{const _0x20fbb2=_0x1a5b78;_0x4faadb[_0x20fbb2(0x1d7)](_0x1f9900)&&_0x5632db['delete'](_0x1f9900);}),_0x5632db[_0x1a5b78(0x1f9)]&&(await _0x4b8e9a[_0x1a5b78(0x19c)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5632db]}}))[_0x1a5b78(0x1f4)][_0x1a5b78(0x1cd)][_0x1a5b78(0x207)](_0x557a45=>{const _0x5e9937=_0x1a5b78;_0x557a45&&_0x4faadb[_0x5e9937(0x201)](_0x557a45);});};var Y=Object[_0x50539d(0x1e0)],G=Object[_0x50539d(0x1ed)],H=(_0x4a77fa,_0x2ee927,_0x44001b,_0x54b175)=>{for(var _0x2f14fb=_0x54b175>0x1?void 0x0:_0x54b175?G(_0x2ee927,_0x44001b):_0x2ee927,_0xa2c84=_0x4a77fa['length']-0x1,_0x234b83;_0xa2c84>=0x0;_0xa2c84--)(_0x234b83=_0x4a77fa[_0xa2c84])&&(_0x2f14fb=(_0x54b175?_0x234b83(_0x2ee927,_0x44001b,_0x2f14fb):_0x234b83(_0x2f14fb))||_0x2f14fb);return _0x54b175&&_0x2f14fb&&Y(_0x2ee927,_0x44001b,_0x2f14fb),_0x2f14fb;},I=(_0x396fe0,_0x2b8a56)=>(_0x4d8296,_0x2e59f0)=>_0x2b8a56(_0x4d8296,_0x2e59f0,_0x396fe0);let f=class extends c['Disposable']{constructor(_0x9c29fb,_0xb6be02,_0x512584,_0x57b66a){const _0x52465d=_0x50539d;super(),this['_commentService']=_0x9c29fb,this['_threadCommentModel']=_0xb6be02,this[_0x52465d(0x1f6)]=_0x512584,this['_injector']=_0x57b66a,this[_0x52465d(0x1d3)](),this['_initUserSync']();}['_initUserSync'](){const _0x54a158=_0x50539d;this[_0x54a158(0x1c9)](this[_0x54a158(0x19a)]['commentUpdate$'][_0x54a158(0x1fb)](q['bufferTime'](0x10))[_0x54a158(0x1c8)](_0x251459=>{const _0x276441=_0x54a158,_0x5351a1=new Set();_0x251459[_0x276441(0x207)](_0x2310c0=>{const _0x4b9ca9=_0x276441;switch(_0x2310c0[_0x4b9ca9(0x1fc)]){case _0x4b9ca9(0x1b9):{const _0x15451f=_0x2310c0[_0x4b9ca9(0x1b1)][_0x4b9ca9(0x1f5)];_0x5351a1['add'](_0x15451f);break;}}}),L(this['_injector'],_0x5351a1);}));}[_0x50539d(0x1d3)](){const _0x40c78f=_0x50539d;this[_0x40c78f(0x1c9)](this[_0x40c78f(0x206)][_0x40c78f(0x1a0)][_0x40c78f(0x1c8)](async _0x7b2f89=>{const _0x31176e=_0x40c78f;var _0xa46c48,_0x22b4c3;const _0x18fb11=this['_threadCommentModel'][_0x31176e(0x1c2)](_0x7b2f89[_0x31176e(0x1cb)],_0x7b2f89[_0x31176e(0x1ef)]);if(!_0x18fb11)return;const {unitId:_0x352e85,subUnitId:_0x325527}=_0x18fb11;switch(_0x7b2f89['user']&&this['_userService']['addUser'](_0x7b2f89[_0x31176e(0x1d5)]),_0x7b2f89[_0x31176e(0x1fc)]){case v[_0x31176e(0x1ce)]:break;case v[_0x31176e(0x197)]:{this[_0x31176e(0x19a)][_0x31176e(0x19d)](_0x352e85,_0x325527,{'unitId':_0x352e85,'subUnitId':_0x325527,'ref':'','id':_0x7b2f89[_0x31176e(0x1df)],'dT':P(+_0x7b2f89[_0x31176e(0x202)]),'threadId':_0x7b2f89['threadId'],'personId':(_0x22b4c3=(_0xa46c48=_0x7b2f89[_0x31176e(0x1d5)])==null?void 0x0:_0xa46c48[_0x31176e(0x199)])!=null?_0x22b4c3:_0x7b2f89[_0x31176e(0x1a3)],'text':JSON[_0x31176e(0x1ff)](_0x7b2f89[_0x31176e(0x191)]),'parentId':_0x18fb11['id']});break;}case v[_0x31176e(0x204)]:{const _0x49705f=this[_0x31176e(0x19a)][_0x31176e(0x20f)](_0x352e85,_0x325527,_0x7b2f89[_0x31176e(0x1df)]);_0x49705f&&_0x49705f['parentId']&&this[_0x31176e(0x19a)]['deleteComment'](_0x352e85,_0x325527,_0x7b2f89[_0x31176e(0x1df)]);break;}case v[_0x31176e(0x196)]:{this[_0x31176e(0x19a)]['updateComment'](_0x352e85,_0x325527,{'commentId':_0x7b2f89[_0x31176e(0x1df)],'text':JSON[_0x31176e(0x1ff)](_0x7b2f89[_0x31176e(0x191)])});break;}case v['Solve']:{const _0x3b778f=this[_0x31176e(0x19a)][_0x31176e(0x1c2)](_0x352e85,_0x7b2f89[_0x31176e(0x1ef)]);_0x3b778f&&this['_threadCommentModel'][_0x31176e(0x1f3)](_0x352e85,_0x325527,_0x3b778f['id'],_0x7b2f89['solved']===p['Solved']);break;}}}));}};f=H([c['OnLifecycle'](c[_0x50539d(0x1c5)][_0x50539d(0x205)],f),I(0x0,c[_0x50539d(0x1e1)](y[_0x50539d(0x1f1)])),I(0x1,c[_0x50539d(0x1e1)](g[_0x50539d(0x1b8)])),I(0x2,c[_0x50539d(0x1e1)](c['UserManagerService'])),I(0x3,c[_0x50539d(0x1e1)](c[_0x50539d(0x1bf)]))],f);const A=_0x50539d(0x1ab),J={};var F=Object[_0x50539d(0x1e0)],Z=Object['getOwnPropertyDescriptor'],W=(_0x261eaa,_0x522eb5,_0x29a6cb,_0x3dc950)=>{for(var _0x2e8657=_0x3dc950>0x1?void 0x0:_0x3dc950?Z(_0x522eb5,_0x29a6cb):_0x522eb5,_0x3a81ee=_0x261eaa['length']-0x1,_0x28ca64;_0x3a81ee>=0x0;_0x3a81ee--)(_0x28ca64=_0x261eaa[_0x3a81ee])&&(_0x2e8657=(_0x3dc950?_0x28ca64(_0x522eb5,_0x29a6cb,_0x2e8657):_0x28ca64(_0x2e8657))||_0x2e8657);return _0x3dc950&&_0x2e8657&&F(_0x522eb5,_0x29a6cb,_0x2e8657),_0x2e8657;},S=(_0x38385e,_0x42354d)=>(_0x4df3bd,_0x2d7ebb)=>_0x42354d(_0x4df3bd,_0x2d7ebb,_0x38385e);function z(_0x5730af,_0x46c4d9){const _0x1d3949=_0x50539d,_0x50c3e7=_0x5730af[_0x1d3949(0x1ac)][0x0];return{..._0x46c4d9,'id':_0x50c3e7['replyId'],'resolved':_0x5730af['solved']===0x1,'dT':P(_0x50c3e7['createTimestamp']),'personId':_0x50c3e7['userId'],'threadId':_0x50c3e7[_0x1d3949(0x1ef)]};}function B(_0xda7ef4,_0x2f6b3b,_0x1ece20){const _0x2f4f14=_0x50539d;var _0x57d68a,_0x21b7a2;if(((_0x21b7a2=(_0x57d68a=_0xda7ef4==null?void 0x0:_0xda7ef4[_0x2f4f14(0x1ac)])==null?void 0x0:_0x57d68a[_0x2f4f14(0x1b3)])!=null?_0x21b7a2:0x0)>0x0){const _0x3628ee=(_0x4c1083,_0x566e42)=>({'id':_0x4c1083[_0x2f4f14(0x1df)],'threadId':_0x4c1083[_0x2f4f14(0x1ef)],'dT':P(_0x4c1083[_0x2f4f14(0x202)]),'personId':_0x4c1083[_0x2f4f14(0x1a3)],'resolved':_0xda7ef4['solved']===p[_0x2f4f14(0x1e3)],'unitId':_0x2f6b3b,'subUnitId':_0x1ece20,'text':JSON[_0x2f4f14(0x1ff)](_0x4c1083['content']),'parentId':_0x566e42}),_0x29175f=_0x3628ee(_0xda7ef4[_0x2f4f14(0x1ac)][0x0]);return{..._0x29175f,'children':_0xda7ef4[_0x2f4f14(0x1ac)][_0x2f4f14(0x19f)](0x1)[_0x2f4f14(0x1ee)](_0x1ea9e1=>_0x3628ee(_0x1ea9e1,_0x29175f['id']))};}return null;}let C=class{constructor(_0x5741c4,_0x5e1535,_0x17eaa3,_0x875db1){const _0x3ae825=_0x50539d;this[_0x3ae825(0x194)]=_0x5741c4,this['_userService']=_0x5e1535,this[_0x3ae825(0x1a2)]=_0x17eaa3,this[_0x3ae825(0x1f8)]=_0x875db1;}async[_0x50539d(0x19d)](_0x5e60df){const _0x40b6bf=_0x50539d;var _0x397b57,_0x18683f;const {parentId:_0x549fea,unitId:_0x2f312a,text:_0x231fd9,threadId:_0x1452a8}=_0x5e60df,_0x54bee9=(_0x18683f=(_0x397b57=_0x231fd9[_0x40b6bf(0x209)])==null?void 0x0:_0x397b57[_0x40b6bf(0x198)](_0x109bdb=>_0x109bdb[_0x40b6bf(0x200)]===c['CustomRangeType'][_0x40b6bf(0x1c4)])[_0x40b6bf(0x1ee)](_0x2a09be=>_0x2a09be['rangeId']))!=null?_0x18683f:[],_0x56559a=JSON[_0x40b6bf(0x1c6)](_0x231fd9),_0x3a05a0=(await this[_0x40b6bf(0x1a2)]['requireSession'](_0x2f312a))[_0x40b6bf(0x1fe)]();if(_0x549fea){const _0x4e88ac={'memberId':_0x3a05a0,'unitId':_0x2f312a,'content':_0x56559a,'mention':_0x54bee9,'threadId':_0x1452a8},_0x3ab7cd=(await this['_httpService'][_0x40b6bf(0x1b6)](_0x40b6bf(0x1fd)+_0x2f312a+_0x40b6bf(0x19e),{'body':_0x4e88ac}))[_0x40b6bf(0x1f4)][_0x40b6bf(0x1b4)];return{..._0x5e60df,'id':_0x3ab7cd[_0x40b6bf(0x1df)],'dT':$(+_0x3ab7cd[_0x40b6bf(0x202)])['format'](_0x40b6bf(0x1bb)),'personId':_0x3ab7cd[_0x40b6bf(0x1a3)]};}else{const _0x1d2e9a={'memberId':_0x3a05a0,'unitId':_0x2f312a,'content':_0x56559a,'mention':_0x54bee9},_0x58181a=await this[_0x40b6bf(0x194)][_0x40b6bf(0x1b6)](_0x40b6bf(0x1fd)+_0x2f312a+_0x40b6bf(0x1a4),{'body':_0x1d2e9a});return z(_0x58181a[_0x40b6bf(0x1f4)][_0x40b6bf(0x211)],_0x5e60df);}}async['updateComment'](_0x2ece23){const _0x4187d6=_0x50539d;var _0x576574,_0xc40e2f;const {text:_0x2d7671,unitId:_0x43386b}=_0x2ece23,_0x2cbdd1=(_0xc40e2f=(_0x576574=_0x2d7671[_0x4187d6(0x209)])==null?void 0x0:_0x576574[_0x4187d6(0x198)](_0x15c18a=>_0x15c18a[_0x4187d6(0x200)]===c['CustomRangeType'][_0x4187d6(0x1c4)])[_0x4187d6(0x1ee)](_0x4e28dd=>_0x4e28dd['rangeId']))!=null?_0xc40e2f:[],_0x6d2748=JSON[_0x4187d6(0x1c6)](_0x2d7671),_0x2fd12b=_0x2ece23[_0x4187d6(0x1ef)],_0x48cfec=_0x2ece23['id'],_0x3c033e={'memberId':(await this[_0x4187d6(0x1a2)][_0x4187d6(0x18b)](_0x43386b))[_0x4187d6(0x1fe)](),'unitId':_0x43386b,'threadId':_0x2fd12b,'mention':_0x2cbdd1,'content':_0x6d2748,'replyId':_0x48cfec},_0x242833=await this['_httpService'][_0x4187d6(0x1b6)]('/universer-api/comment/unit/'+_0x43386b+_0x4187d6(0x192),{'body':_0x3c033e});return!_0x242833[_0x4187d6(0x1f4)][_0x4187d6(0x1a5)]||_0x242833[_0x4187d6(0x1f4)]['error'][_0x4187d6(0x20a)]===0x1;}async['resolveComment'](_0x2911fb){const _0x48d8cb=_0x50539d,{unitId:_0x248253}=_0x2911fb,_0x488e76=_0x2911fb['threadId'],_0x440178={'memberId':this[_0x48d8cb(0x1f6)][_0x48d8cb(0x1f7)]()[_0x48d8cb(0x199)],'unitId':_0x248253,'threadId':_0x488e76,'solved':_0x2911fb[_0x48d8cb(0x214)]?p[_0x48d8cb(0x1e3)]:p[_0x48d8cb(0x1b2)]},_0x450f02=await this[_0x48d8cb(0x194)]['post']('/universer-api/comment/unit/'+_0x248253+_0x48d8cb(0x1e4),{'body':_0x440178});return!_0x450f02[_0x48d8cb(0x1f4)][_0x48d8cb(0x1a5)]||_0x450f02[_0x48d8cb(0x1f4)]['error'][_0x48d8cb(0x20a)]===0x1;}async['deleteComment'](_0x1d78da,_0x59dabe,_0x334034,_0x2e8edb){const _0x53fb44=_0x50539d,_0x418813={'memberId':(await this['_sessionService'][_0x53fb44(0x18b)](_0x1d78da))[_0x53fb44(0x1fe)](),'threadId':_0x334034,'replyId':_0x2e8edb,'unitId':_0x1d78da},_0xa91db1=await this[_0x53fb44(0x194)][_0x53fb44(0x1b6)](_0x53fb44(0x1fd)+_0x1d78da+_0x53fb44(0x1c7),{'body':_0x418813});return!_0xa91db1[_0x53fb44(0x1f4)][_0x53fb44(0x1a5)]||_0xa91db1[_0x53fb44(0x1f4)][_0x53fb44(0x1a5)]['code']===0x1;}async[_0x50539d(0x1ca)](_0x3a7723,_0x40a73d,_0x1a74e0){const _0x22c576=_0x50539d,_0x37a7f6={'unitId':_0x3a7723,'threadId':_0x1a74e0},_0x45ee08=await this[_0x22c576(0x194)][_0x22c576(0x1b6)](_0x22c576(0x1fd)+_0x3a7723+_0x22c576(0x1ec),{'body':_0x37a7f6}),_0x14a23f=_0x1a74e0[_0x22c576(0x1ee)](_0x35b90a=>B(_0x45ee08[_0x22c576(0x1f4)][_0x22c576(0x1dc)][_0x35b90a],_0x3a7723,_0x40a73d))[_0x22c576(0x198)](Boolean);return Object[_0x22c576(0x1e2)](_0x45ee08[_0x22c576(0x1f4)][_0x22c576(0x1cd)])[_0x22c576(0x207)](_0x8a6395=>{const _0x1a74cc=_0x22c576;this[_0x1a74cc(0x1f6)][_0x1a74cc(0x201)](_0x8a6395);}),_0x14a23f;}['saveCommentToSnapshot'](_0x275549){const _0x778b67=_0x50539d;return{'id':_0x275549['id'],'threadId':_0x275549[_0x778b67(0x1ef)],'ref':_0x275549[_0x778b67(0x1bd)]};}};C=W([S(0x0,c['Inject'](O['HTTPService'])),S(0x1,c[_0x50539d(0x1e1)](c[_0x50539d(0x1f0)])),S(0x2,c[_0x50539d(0x1e1)](y['CollaborationSessionService'])),S(0x3,c[_0x50539d(0x1e1)](c[_0x50539d(0x1bf)]))],C);var K=Object[_0x50539d(0x1e0)],V=Object[_0x50539d(0x1ed)],Q=(_0x24ed0c,_0x2bef9c,_0xd0096d,_0x3775b8)=>{const _0x4bfc37=_0x50539d;for(var _0x44d061=_0x3775b8>0x1?void 0x0:_0x3775b8?V(_0x2bef9c,_0xd0096d):_0x2bef9c,_0x4c7eb4=_0x24ed0c[_0x4bfc37(0x1b3)]-0x1,_0x2bf7ac;_0x4c7eb4>=0x0;_0x4c7eb4--)(_0x2bf7ac=_0x24ed0c[_0x4c7eb4])&&(_0x44d061=(_0x3775b8?_0x2bf7ac(_0x2bef9c,_0xd0096d,_0x44d061):_0x2bf7ac(_0x44d061))||_0x44d061);return _0x3775b8&&_0x44d061&&K(_0x2bef9c,_0xd0096d,_0x44d061),_0x44d061;},X=(_0x4b2a6b,_0x318f90)=>(_0x1f2765,_0x307439)=>_0x318f90(_0x1f2765,_0x307439,_0x4b2a6b);let D=class{constructor(_0x452304){const _0x27e141=_0x50539d;this[_0x27e141(0x194)]=_0x452304;}async[_0x50539d(0x1e8)](_0x32f909,_0x276f77,_0x47f7ce){const _0x1733b1=_0x50539d,_0x173f4a=new URL(window[_0x1733b1(0x1a7)]['href'])[_0x1733b1(0x1dd)]['get'](_0x1733b1(0x1d8));if(!_0x173f4a)return[];const _0x30c7aa=window[_0x1733b1(0x1a7)][_0x1733b1(0x210)],_0x2a6b16=window[_0x1733b1(0x1a7)][_0x1733b1(0x1d6)]===_0x1733b1(0x1b7)?_0x1733b1(0x1ea):'http';return(await this['_httpService'][_0x1733b1(0x19c)](_0x2a6b16+_0x1733b1(0x1be)+_0x30c7aa+_0x1733b1(0x212),{'params':{'objectID':_0x173f4a,'unitID':_0x173f4a}}))[_0x1733b1(0x1f4)][_0x1733b1(0x1c0)][_0x1733b1(0x1ee)](_0x8040e3=>{const _0x2e3f56=_0x1733b1;var _0x2162dc,_0x187f20,_0x1115e4,_0x445f82,_0x37a883,_0x33f784;return{'id':(_0x187f20=(_0x2162dc=_0x8040e3['subject'])==null?void 0x0:_0x2162dc[_0x2e3f56(0x199)])!=null?_0x187f20:'','label':(_0x445f82=(_0x1115e4=_0x8040e3[_0x2e3f56(0x1db)])==null?void 0x0:_0x1115e4[_0x2e3f56(0x203)])!=null?_0x445f82:'','icon':(_0x33f784=(_0x37a883=_0x8040e3[_0x2e3f56(0x1db)])==null?void 0x0:_0x37a883[_0x2e3f56(0x1cf)])!=null?_0x33f784:'','type':_0x2e3f56(0x1d5)};});}};D=Q([X(0x0,c[_0x50539d(0x1e1)](O[_0x50539d(0x1a8)]))],D);function _0x47f8(_0xc3419f,_0x58b90f){const _0x2c928d=_0x2c92();return _0x47f8=function(_0x47f81e,_0x4ad1ff){_0x47f81e=_0x47f81e-0x18b;let _0x350252=_0x2c928d[_0x47f81e];return _0x350252;},_0x47f8(_0xc3419f,_0x58b90f);}var k=Object[_0x50539d(0x1e0)],ee=Object[_0x50539d(0x1ed)],re=(_0x29f910,_0x2efe31,_0x40f44e,_0x5d2d66)=>{for(var _0x30f7c5=_0x5d2d66>0x1?void 0x0:_0x5d2d66?ee(_0x2efe31,_0x40f44e):_0x2efe31,_0x48f4e5=_0x29f910['length']-0x1,_0x270917;_0x48f4e5>=0x0;_0x48f4e5--)(_0x270917=_0x29f910[_0x48f4e5])&&(_0x30f7c5=(_0x5d2d66?_0x270917(_0x2efe31,_0x40f44e,_0x30f7c5):_0x270917(_0x30f7c5))||_0x30f7c5);return _0x5d2d66&&_0x30f7c5&&k(_0x2efe31,_0x40f44e,_0x30f7c5),_0x30f7c5;},_=(_0x467f81,_0x27b600)=>(_0x35a478,_0x356cc7)=>_0x27b600(_0x35a478,_0x356cc7,_0x467f81);let b=class extends c['Disposable']{constructor(_0xfdb7c,_0xbd4dda,_0x4068be,_0x207c01){const _0x47f4b6=_0x50539d;super(),this[_0x47f4b6(0x1de)]=_0xfdb7c,this[_0x47f4b6(0x1c1)]=_0xbd4dda,this[_0x47f4b6(0x20b)]=_0x4068be,this['_threadCommentMentionDataSource']=_0x207c01,this[_0x47f4b6(0x18c)]();}['_initDataSource'](){const _0x435208=_0x50539d;this[_0x435208(0x1de)][_0x435208(0x20d)]=this[_0x435208(0x1c1)],this[_0x435208(0x1de)][_0x435208(0x1da)]=!0x1,this['_threadCommentMentionDataService'][_0x435208(0x20d)]=this[_0x435208(0x1cc)];}};b=re([c[_0x50539d(0x208)](c[_0x50539d(0x1c5)]['Starting'],b),_(0x0,g[_0x50539d(0x213)]),_(0x1,c[_0x50539d(0x1e1)](C)),_(0x2,N['IThreadCommentMentionDataService']),_(0x3,c[_0x50539d(0x1e1)](D))],b);var U=Object[_0x50539d(0x1e0)],te=Object[_0x50539d(0x1ed)],se=(_0x3e584b,_0x539b19,_0x1bb44f)=>_0x539b19 in _0x3e584b?U(_0x3e584b,_0x539b19,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1bb44f}):_0x3e584b[_0x539b19]=_0x1bb44f,ne=(_0x56fc1f,_0x3fabac,_0x54e778,_0xf3fa54)=>{const _0x11eebc=_0x50539d;for(var _0x43fa5c=_0xf3fa54>0x1?void 0x0:_0xf3fa54?te(_0x3fabac,_0x54e778):_0x3fabac,_0x1b4d9f=_0x56fc1f[_0x11eebc(0x1b3)]-0x1,_0x202dd5;_0x1b4d9f>=0x0;_0x1b4d9f--)(_0x202dd5=_0x56fc1f[_0x1b4d9f])&&(_0x43fa5c=(_0xf3fa54?_0x202dd5(_0x3fabac,_0x54e778,_0x43fa5c):_0x202dd5(_0x43fa5c))||_0x43fa5c);return _0xf3fa54&&_0x43fa5c&&U(_0x3fabac,_0x54e778,_0x43fa5c),_0x43fa5c;},T=(_0x130afc,_0x1e773d)=>(_0x4ba982,_0x30e026)=>_0x1e773d(_0x4ba982,_0x30e026,_0x130afc),R=(_0x15dc9e,_0xc6a1b5,_0x47ee61)=>se(_0x15dc9e,typeof _0xc6a1b5!=_0x50539d(0x1a1)?_0xc6a1b5+'':_0xc6a1b5,_0x47ee61);exports[_0x50539d(0x1f2)]=class extends c[_0x50539d(0x1e9)]{constructor(_0x175a8e=J,_0x312077,_0x1569f7){const _0x33f209=_0x50539d;super(),this[_0x33f209(0x215)]=_0x175a8e,this[_0x33f209(0x1f8)]=_0x312077,this[_0x33f209(0x18f)]=_0x1569f7;const {..._0x32696c}=this[_0x33f209(0x215)];this[_0x33f209(0x18f)][_0x33f209(0x1ae)](A,_0x32696c);}[_0x50539d(0x1d4)](){const _0x41327e=_0x50539d;[[D],[C],[b],[f]][_0x41327e(0x207)](_0x371431=>{const _0x360dad=_0x41327e;this[_0x360dad(0x1f8)][_0x360dad(0x1b9)](_0x371431);});}},R(exports[_0x50539d(0x1f2)],_0x50539d(0x1d2),x),R(exports[_0x50539d(0x1f2)],_0x50539d(0x1fc),c[_0x50539d(0x18d)][_0x50539d(0x1eb)]),exports[_0x50539d(0x1f2)]=ne([c['DependentOn'](g[_0x50539d(0x19b)],N[_0x50539d(0x190)],y['UniverCollaborationClientPlugin'],E[_0x50539d(0x1bc)]),T(0x1,c[_0x50539d(0x1e1)](c[_0x50539d(0x1bf)])),T(0x2,c[_0x50539d(0x1d1)])],exports[_0x50539d(0x1f2)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x54d3c0=_0x3961;(function(_0x743aef,_0x3929fb){const _0x4e8eb8=_0x3961,_0x339f79=_0x743aef();while(!![]){try{const _0x2d9ec=-parseInt(_0x4e8eb8(0x228))/0x1+-parseInt(_0x4e8eb8(0x1f7))/0x2*(parseInt(_0x4e8eb8(0x246))/0x3)+-parseInt(_0x4e8eb8(0x243))/0x4+parseInt(_0x4e8eb8(0x218))/0x5+parseInt(_0x4e8eb8(0x1f1))/0x6*(-parseInt(_0x4e8eb8(0x212))/0x7)+-parseInt(_0x4e8eb8(0x1fa))/0x8+parseInt(_0x4e8eb8(0x1fb))/0x9;if(_0x2d9ec===_0x3929fb)break;else _0x339f79['push'](_0x339f79['shift']());}catch(_0x49a61c){_0x339f79['push'](_0x339f79['shift']());}}}(_0x5587,0xc9953));import{UserManagerService as _0x2f3fe0,OnLifecycle as _0x2e269a,LifecycleStages as _0x2dc267,Inject as _0x556ac5,Injector as _0x4900de,Disposable as _0x52739f,CustomRangeType as _0x45bfa5,UniverInstanceType as _0x4408ec,DependentOn as _0x556292,Plugin as _0x1a3cb5,IConfigService as _0x5362db}from'@univerjs/core';import{ThreadCommentModel as _0x4fc152,IThreadCommentDataSourceService as _0x183b75,UniverThreadCommentPlugin as _0x137644}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0x1d516f,UniverThreadCommentUIPlugin as _0x125610}from'@univerjs/thread-comment-ui';import{CommentService as _0x47984a,CollaborationSessionService as _0x385840,UniverCollaborationClientPlugin as _0x541cb2}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4bd77d}from'@univerjs-pro/license';import{bufferTime as _0x3a43bf}from'rxjs';function _0x3961(_0x2cc6a4,_0x22823d){const _0x558765=_0x5587();return _0x3961=function(_0x3961f9,_0x54171f){_0x3961f9=_0x3961f9-0x1db;let _0x354f26=_0x558765[_0x3961f9];return _0x354f26;},_0x3961(_0x2cc6a4,_0x22823d);}import{HTTPService as _0x4f4d9a}from'@univerjs/network';import _0x3cbc92 from'dayjs';const k=_0x54d3c0(0x234);var v=(_0x2b7f99=>(_0x2b7f99[_0x2b7f99['OpenOrReOpen']=0x0]=_0x54d3c0(0x21a),_0x2b7f99[_0x2b7f99['Solved']=0x1]='Solved',_0x2b7f99[_0x2b7f99[_0x54d3c0(0x1e6)]=-0x1]=_0x54d3c0(0x1e6),_0x2b7f99))(v||{}),p=(_0x1d177f=>(_0x1d177f[_0x1d177f[_0x54d3c0(0x241)]=0x0]=_0x54d3c0(0x241),_0x1d177f[_0x1d177f['Add']=0x1]=_0x54d3c0(0x200),_0x1d177f[_0x1d177f[_0x54d3c0(0x216)]=0x2]=_0x54d3c0(0x216),_0x1d177f[_0x1d177f['Edit']=0x3]='Edit',_0x1d177f[_0x1d177f[_0x54d3c0(0x1e9)]=0x4]=_0x54d3c0(0x1e9),_0x1d177f[_0x1d177f[_0x54d3c0(0x23b)]=0x5]='Solve',_0x1d177f[_0x1d177f[_0x54d3c0(0x1e6)]=-0x1]='UNRECOGNIZED',_0x1d177f))(p||{});const w=_0x5b8fb2=>_0x3cbc92(new Date(+_0x5b8fb2))[_0x54d3c0(0x1e8)](_0x54d3c0(0x21c)),ee=async(_0x36507b,_0x1911fa)=>{const _0x494fa5=_0x54d3c0,_0x2e8ba9=_0x36507b['get'](_0x2f3fe0),_0xfa89a7=_0x36507b[_0x494fa5(0x238)](_0x4f4d9a);_0x1911fa[_0x494fa5(0x1e7)](_0x15ade9=>{const _0x85cfcc=_0x494fa5;_0x2e8ba9['getUser'](_0x15ade9)&&_0x1911fa[_0x85cfcc(0x209)](_0x15ade9);}),_0x1911fa[_0x494fa5(0x20a)]&&(await _0xfa89a7[_0x494fa5(0x238)](_0x494fa5(0x1f4),{'params':{'userIDs':[..._0x1911fa]}}))['body']['users'][_0x494fa5(0x1e7)](_0x3a0f73=>{const _0x1c98a6=_0x494fa5;_0x3a0f73&&_0x2e8ba9[_0x1c98a6(0x222)](_0x3a0f73);});};var re=Object[_0x54d3c0(0x244)],te=Object[_0x54d3c0(0x20c)],se=(_0x30c1f0,_0x39e260,_0x4db4cf,_0x37fa7f)=>{const _0x3c8bbe=_0x54d3c0;for(var _0x250f69=_0x37fa7f>0x1?void 0x0:_0x37fa7f?te(_0x39e260,_0x4db4cf):_0x39e260,_0xda1ff6=_0x30c1f0[_0x3c8bbe(0x202)]-0x1,_0x3e277e;_0xda1ff6>=0x0;_0xda1ff6--)(_0x3e277e=_0x30c1f0[_0xda1ff6])&&(_0x250f69=(_0x37fa7f?_0x3e277e(_0x39e260,_0x4db4cf,_0x250f69):_0x3e277e(_0x250f69))||_0x250f69);return _0x37fa7f&&_0x250f69&&re(_0x39e260,_0x4db4cf,_0x250f69),_0x250f69;},_=(_0x5e9543,_0x1e4f73)=>(_0x188163,_0x49725b)=>_0x1e4f73(_0x188163,_0x49725b,_0x5e9543);let S=class extends _0x52739f{constructor(_0x2b15f1,_0x44f2f7,_0x1f5386,_0x98859c){const _0x5e89dc=_0x54d3c0;super(),this[_0x5e89dc(0x22d)]=_0x2b15f1,this['_threadCommentModel']=_0x44f2f7,this[_0x5e89dc(0x1ea)]=_0x1f5386,this[_0x5e89dc(0x23d)]=_0x98859c,this[_0x5e89dc(0x233)](),this[_0x5e89dc(0x210)]();}[_0x54d3c0(0x210)](){const _0x1c9aef=_0x54d3c0;this[_0x1c9aef(0x235)](this['_threadCommentModel']['commentUpdate$'][_0x1c9aef(0x23f)](_0x3a43bf(0x10))['subscribe'](_0x53ba54=>{const _0x56506c=_0x1c9aef,_0x2edc09=new Set();_0x53ba54[_0x56506c(0x1e7)](_0xf3f471=>{const _0x4444fd=_0x56506c;switch(_0xf3f471[_0x4444fd(0x1eb)]){case _0x4444fd(0x22b):{const _0x4166e8=_0xf3f471[_0x4444fd(0x22a)][_0x4444fd(0x223)];_0x2edc09['add'](_0x4166e8);break;}}}),ee(this['_injector'],_0x2edc09);}));}[_0x54d3c0(0x233)](){const _0x4e79b3=_0x54d3c0;this[_0x4e79b3(0x235)](this[_0x4e79b3(0x22d)]['commentUpdate$']['subscribe'](async _0x3d777b=>{const _0x34e7f1=_0x4e79b3;var _0x4776c4,_0x4226f8;const _0x808d41=this[_0x34e7f1(0x22f)][_0x34e7f1(0x1e1)](_0x3d777b[_0x34e7f1(0x203)],_0x3d777b['threadId']);if(!_0x808d41)return;const {unitId:_0x42dbbf,subUnitId:_0x53a9e6}=_0x808d41;switch(_0x3d777b['user']&&this[_0x34e7f1(0x1ea)][_0x34e7f1(0x222)](_0x3d777b[_0x34e7f1(0x20b)]),_0x3d777b[_0x34e7f1(0x1eb)]){case p[_0x34e7f1(0x200)]:break;case p['Reply']:{this[_0x34e7f1(0x22f)]['addComment'](_0x42dbbf,_0x53a9e6,{'unitId':_0x42dbbf,'subUnitId':_0x53a9e6,'ref':'','id':_0x3d777b[_0x34e7f1(0x205)],'dT':w(+_0x3d777b[_0x34e7f1(0x204)]),'threadId':_0x3d777b[_0x34e7f1(0x1e3)],'personId':(_0x4226f8=(_0x4776c4=_0x3d777b[_0x34e7f1(0x20b)])==null?void 0x0:_0x4776c4['userID'])!=null?_0x4226f8:_0x3d777b[_0x34e7f1(0x21e)],'text':JSON[_0x34e7f1(0x215)](_0x3d777b[_0x34e7f1(0x1f6)]),'parentId':_0x808d41['id']});break;}case p[_0x34e7f1(0x1e9)]:{const _0x487aa0=this[_0x34e7f1(0x22f)][_0x34e7f1(0x1fc)](_0x42dbbf,_0x53a9e6,_0x3d777b[_0x34e7f1(0x205)]);_0x487aa0&&_0x487aa0[_0x34e7f1(0x207)]&&this['_threadCommentModel'][_0x34e7f1(0x231)](_0x42dbbf,_0x53a9e6,_0x3d777b[_0x34e7f1(0x205)]);break;}case p[_0x34e7f1(0x1dd)]:{this['_threadCommentModel'][_0x34e7f1(0x20d)](_0x42dbbf,_0x53a9e6,{'commentId':_0x3d777b[_0x34e7f1(0x205)],'text':JSON[_0x34e7f1(0x215)](_0x3d777b[_0x34e7f1(0x1f6)])});break;}case p[_0x34e7f1(0x23b)]:{const _0x5897f1=this[_0x34e7f1(0x22f)]['getThread'](_0x42dbbf,_0x3d777b['threadId']);_0x5897f1&&this[_0x34e7f1(0x22f)][_0x34e7f1(0x23a)](_0x42dbbf,_0x53a9e6,_0x5897f1['id'],_0x3d777b['solved']===v[_0x34e7f1(0x242)]);break;}}}));}};S=se([_0x2e269a(_0x2dc267['Ready'],S),_(0x0,_0x556ac5(_0x47984a)),_(0x1,_0x556ac5(_0x4fc152)),_(0x2,_0x556ac5(_0x2f3fe0)),_(0x3,_0x556ac5(_0x4900de))],S);const oe=_0x54d3c0(0x225),ne={};var ie=Object[_0x54d3c0(0x244)],ae=Object['getOwnPropertyDescriptor'],ce=(_0x4bfad3,_0x3df789,_0x248f8a,_0x115988)=>{const _0x2eb3af=_0x54d3c0;for(var _0x1704c3=_0x115988>0x1?void 0x0:_0x115988?ae(_0x3df789,_0x248f8a):_0x3df789,_0x8d821c=_0x4bfad3[_0x2eb3af(0x202)]-0x1,_0x5df0c8;_0x8d821c>=0x0;_0x8d821c--)(_0x5df0c8=_0x4bfad3[_0x8d821c])&&(_0x1704c3=(_0x115988?_0x5df0c8(_0x3df789,_0x248f8a,_0x1704c3):_0x5df0c8(_0x1704c3))||_0x1704c3);return _0x115988&&_0x1704c3&&ie(_0x3df789,_0x248f8a,_0x1704c3),_0x1704c3;},f=(_0x1415e1,_0x1f9b9a)=>(_0x43f977,_0x5793f8)=>_0x1f9b9a(_0x43f977,_0x5793f8,_0x1415e1);function de(_0x8e9f3,_0x1ab00d){const _0x41be3a=_0x54d3c0,_0x1077b8=_0x8e9f3[_0x41be3a(0x237)][0x0];return{..._0x1ab00d,'id':_0x1077b8[_0x41be3a(0x205)],'resolved':_0x8e9f3[_0x41be3a(0x1ec)]===0x1,'dT':w(_0x1077b8['createTimestamp']),'personId':_0x1077b8[_0x41be3a(0x21e)],'threadId':_0x1077b8[_0x41be3a(0x1e3)]};}function me(_0x1c5652,_0x13f49d,_0x4493fa){const _0xa103b1=_0x54d3c0;var _0x519195,_0x5e865d;if(((_0x5e865d=(_0x519195=_0x1c5652==null?void 0x0:_0x1c5652[_0xa103b1(0x237)])==null?void 0x0:_0x519195[_0xa103b1(0x202)])!=null?_0x5e865d:0x0)>0x0){const _0x509481=(_0x5e4a1a,_0x2cec4f)=>({'id':_0x5e4a1a['replyId'],'threadId':_0x5e4a1a['threadId'],'dT':w(_0x5e4a1a[_0xa103b1(0x204)]),'personId':_0x5e4a1a[_0xa103b1(0x21e)],'resolved':_0x1c5652[_0xa103b1(0x1ec)]===v[_0xa103b1(0x242)],'unitId':_0x13f49d,'subUnitId':_0x4493fa,'text':JSON['parse'](_0x5e4a1a[_0xa103b1(0x1f6)]),'parentId':_0x2cec4f}),_0x1096c3=_0x509481(_0x1c5652[_0xa103b1(0x237)][0x0]);return{..._0x1096c3,'children':_0x1c5652['replies']['slice'](0x1)[_0xa103b1(0x220)](_0x4ac12d=>_0x509481(_0x4ac12d,_0x1096c3['id']))};}return null;}function _0x5587(){const _0x5bc3ec=['/reply','413UykPja','saveCommentToSnapshot','getMemberID','parse','Reply','values','5803020TsSsOz','_configService','OpenOrReOpen','body','YYYY/MM/DD\x20HH:mm','rangeId','userId','avatar','map','/solved','addUser','personId','rangeType','thread-comment-data-source.config','setConfig','subject','1485635MdJZcs','filter','payload','add','_threadCommentDataSourceService','_commentService','resolved','_threadCommentModel','listComments','deleteComment','reply','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','disposeWithMe','searchParams','replies','get','host','resolveComment','Solve','dataSource','_injector','code','pipe','pluginName','Unknown','Solved','2696396DEOsbv','defineProperty','error','235470jTcfZv','_config','/universer-api/comment/unit/','userID','Edit','protocol','onStarting','https','getThread','https:','threadId','UNIVER_UNKNOWN','unit','UNRECOGNIZED','forEach','format','Delete','_userService','type','solved','requireSession','location','_threadCommentDataSource','_sessionService','49584ayuSpg','customRanges','collaborators','/universer-api/user/list','users','content','12fwxSQr','COMMENT','symbol','6754656cSPIXR','32648949KqaRCc','getComment','_threadCommentMentionDataService','comment','_httpService','Add','_threadCommentMentionDataSource','length','unitId','createTimestamp','replyId','getMentions','parentId','stringify','delete','size','user','getOwnPropertyDescriptor','updateComment','_initDataSource','post','_initUserSync'];_0x5587=function(){return _0x5bc3ec;};return _0x5587();}let D=class{constructor(_0xdc1351,_0x12b7eb,_0x52b576,_0x337e95){const _0x33843d=_0x54d3c0;this[_0x33843d(0x1ff)]=_0xdc1351,this[_0x33843d(0x1ea)]=_0x12b7eb,this[_0x33843d(0x1f0)]=_0x52b576,this[_0x33843d(0x23d)]=_0x337e95;}async['addComment'](_0x4de92c){const _0x5d72b4=_0x54d3c0;var _0x21da39,_0xc4b3df;const {parentId:_0x50bb55,unitId:_0x58348a,text:_0x2aae63,threadId:_0x2cc5db}=_0x4de92c,_0x452246=(_0xc4b3df=(_0x21da39=_0x2aae63[_0x5d72b4(0x1f2)])==null?void 0x0:_0x21da39[_0x5d72b4(0x229)](_0x2a84ac=>_0x2a84ac[_0x5d72b4(0x224)]===_0x45bfa5[_0x5d72b4(0x1f8)])[_0x5d72b4(0x220)](_0x5c9247=>_0x5c9247['rangeId']))!=null?_0xc4b3df:[],_0x502389=JSON[_0x5d72b4(0x208)](_0x2aae63),_0x31dbf3=(await this[_0x5d72b4(0x1f0)][_0x5d72b4(0x1ed)](_0x58348a))['getMemberID']();if(_0x50bb55){const _0x2dd0fc={'memberId':_0x31dbf3,'unitId':_0x58348a,'content':_0x502389,'mention':_0x452246,'threadId':_0x2cc5db},_0xde95e6=(await this[_0x5d72b4(0x1ff)][_0x5d72b4(0x20f)](_0x5d72b4(0x1db)+_0x58348a+_0x5d72b4(0x211),{'body':_0x2dd0fc}))['body'][_0x5d72b4(0x232)];return{..._0x4de92c,'id':_0xde95e6[_0x5d72b4(0x205)],'dT':_0x3cbc92(+_0xde95e6[_0x5d72b4(0x204)])[_0x5d72b4(0x1e8)](_0x5d72b4(0x21c)),'personId':_0xde95e6['userId']};}else{const _0x3cae33={'memberId':_0x31dbf3,'unitId':_0x58348a,'content':_0x502389,'mention':_0x452246},_0x25a628=await this[_0x5d72b4(0x1ff)]['post'](_0x5d72b4(0x1db)+_0x58348a+'/add',{'body':_0x3cae33});return de(_0x25a628['body'][_0x5d72b4(0x1fe)],_0x4de92c);}}async[_0x54d3c0(0x20d)](_0x65105b){const _0x303d0e=_0x54d3c0;var _0x2a6fd4,_0x2d45e8;const {text:_0x2254c1,unitId:_0x446063}=_0x65105b,_0x3b2b42=(_0x2d45e8=(_0x2a6fd4=_0x2254c1[_0x303d0e(0x1f2)])==null?void 0x0:_0x2a6fd4[_0x303d0e(0x229)](_0x79dc6=>_0x79dc6[_0x303d0e(0x224)]===_0x45bfa5[_0x303d0e(0x1f8)])[_0x303d0e(0x220)](_0x2bc596=>_0x2bc596[_0x303d0e(0x21d)]))!=null?_0x2d45e8:[],_0xf7bf4c=JSON[_0x303d0e(0x208)](_0x2254c1),_0x5084e2=_0x65105b[_0x303d0e(0x1e3)],_0x4733d5=_0x65105b['id'],_0x395395={'memberId':(await this[_0x303d0e(0x1f0)][_0x303d0e(0x1ed)](_0x446063))[_0x303d0e(0x214)](),'unitId':_0x446063,'threadId':_0x5084e2,'mention':_0x3b2b42,'content':_0xf7bf4c,'replyId':_0x4733d5},_0x5b244b=await this[_0x303d0e(0x1ff)][_0x303d0e(0x20f)](_0x303d0e(0x1db)+_0x446063+'/edit',{'body':_0x395395});return!_0x5b244b[_0x303d0e(0x21b)]['error']||_0x5b244b['body']['error'][_0x303d0e(0x23e)]===0x1;}async[_0x54d3c0(0x23a)](_0xe15011){const _0x5cf847=_0x54d3c0,{unitId:_0x330869}=_0xe15011,_0x1b80df=_0xe15011['threadId'],_0x1d9da6={'memberId':this[_0x5cf847(0x1ea)]['getCurrentUser']()['userID'],'unitId':_0x330869,'threadId':_0x1b80df,'solved':_0xe15011[_0x5cf847(0x22e)]?v['Solved']:v[_0x5cf847(0x21a)]},_0x1f712a=await this[_0x5cf847(0x1ff)][_0x5cf847(0x20f)](_0x5cf847(0x1db)+_0x330869+_0x5cf847(0x221),{'body':_0x1d9da6});return!_0x1f712a[_0x5cf847(0x21b)][_0x5cf847(0x245)]||_0x1f712a[_0x5cf847(0x21b)]['error'][_0x5cf847(0x23e)]===0x1;}async['deleteComment'](_0x3d89e1,_0x417032,_0x14c108,_0x59b6c0){const _0x492208=_0x54d3c0,_0x3975f4={'memberId':(await this[_0x492208(0x1f0)][_0x492208(0x1ed)](_0x3d89e1))[_0x492208(0x214)](),'threadId':_0x14c108,'replyId':_0x59b6c0,'unitId':_0x3d89e1},_0xa73f3f=await this[_0x492208(0x1ff)][_0x492208(0x20f)](_0x492208(0x1db)+_0x3d89e1+'/delete',{'body':_0x3975f4});return!_0xa73f3f[_0x492208(0x21b)][_0x492208(0x245)]||_0xa73f3f['body']['error'][_0x492208(0x23e)]===0x1;}async[_0x54d3c0(0x230)](_0x4445ac,_0x59a290,_0x5db401){const _0x3338a2=_0x54d3c0,_0x376a5c={'unitId':_0x4445ac,'threadId':_0x5db401},_0xca403f=await this[_0x3338a2(0x1ff)][_0x3338a2(0x20f)](_0x3338a2(0x1db)+_0x4445ac+'/list',{'body':_0x376a5c}),_0x564394=_0x5db401[_0x3338a2(0x220)](_0x33fa7b=>me(_0xca403f[_0x3338a2(0x21b)]['comments'][_0x33fa7b],_0x4445ac,_0x59a290))['filter'](Boolean);return Object[_0x3338a2(0x217)](_0xca403f[_0x3338a2(0x21b)][_0x3338a2(0x1f5)])[_0x3338a2(0x1e7)](_0x483b19=>{const _0x781742=_0x3338a2;this[_0x781742(0x1ea)][_0x781742(0x222)](_0x483b19);}),_0x564394;}[_0x54d3c0(0x213)](_0x24c489){const _0x502d96=_0x54d3c0;return{'id':_0x24c489['id'],'threadId':_0x24c489[_0x502d96(0x1e3)],'ref':_0x24c489['ref']};}};D=ce([f(0x0,_0x556ac5(_0x4f4d9a)),f(0x1,_0x556ac5(_0x2f3fe0)),f(0x2,_0x556ac5(_0x385840)),f(0x3,_0x556ac5(_0x4900de))],D);var le=Object[_0x54d3c0(0x244)],he=Object[_0x54d3c0(0x20c)],ue=(_0x1d289e,_0x47bab7,_0x487386,_0x2a73b3)=>{const _0x4ecbdc=_0x54d3c0;for(var _0x1cea13=_0x2a73b3>0x1?void 0x0:_0x2a73b3?he(_0x47bab7,_0x487386):_0x47bab7,_0x141e6f=_0x1d289e[_0x4ecbdc(0x202)]-0x1,_0x35fc70;_0x141e6f>=0x0;_0x141e6f--)(_0x35fc70=_0x1d289e[_0x141e6f])&&(_0x1cea13=(_0x2a73b3?_0x35fc70(_0x47bab7,_0x487386,_0x1cea13):_0x35fc70(_0x1cea13))||_0x1cea13);return _0x2a73b3&&_0x1cea13&&le(_0x47bab7,_0x487386,_0x1cea13),_0x1cea13;},pe=(_0x1208af,_0x32ba16)=>(_0xed1875,_0xa44dd0)=>_0x32ba16(_0xed1875,_0xa44dd0,_0x1208af);let C=class{constructor(_0x4ffb5b){const _0x303d84=_0x54d3c0;this[_0x303d84(0x1ff)]=_0x4ffb5b;}async[_0x54d3c0(0x206)](_0xb523a0,_0x20e239,_0x577ac3){const _0x2c1cba=_0x54d3c0,_0x42177b=new URL(window[_0x2c1cba(0x1ee)]['href'])[_0x2c1cba(0x236)][_0x2c1cba(0x238)](_0x2c1cba(0x1e5));if(!_0x42177b)return[];const _0x34039c=window[_0x2c1cba(0x1ee)][_0x2c1cba(0x239)],_0x3282f3=window[_0x2c1cba(0x1ee)][_0x2c1cba(0x1de)]===_0x2c1cba(0x1e2)?_0x2c1cba(0x1e0):'http';return(await this[_0x2c1cba(0x1ff)][_0x2c1cba(0x238)](_0x3282f3+'://'+_0x34039c+'/universer-api/authz/collaborator',{'params':{'objectID':_0x42177b,'unitID':_0x42177b}}))['body'][_0x2c1cba(0x1f3)][_0x2c1cba(0x220)](_0x1bf8c9=>{const _0x42ccb0=_0x2c1cba;var _0x2e518e,_0x274e43,_0x2538ba,_0x5aef57,_0x5cdc62,_0x1fea7c;return{'id':(_0x274e43=(_0x2e518e=_0x1bf8c9['subject'])==null?void 0x0:_0x2e518e[_0x42ccb0(0x1dc)])!=null?_0x274e43:'','label':(_0x5aef57=(_0x2538ba=_0x1bf8c9[_0x42ccb0(0x227)])==null?void 0x0:_0x2538ba['name'])!=null?_0x5aef57:'','icon':(_0x1fea7c=(_0x5cdc62=_0x1bf8c9['subject'])==null?void 0x0:_0x5cdc62[_0x42ccb0(0x21f)])!=null?_0x1fea7c:'','type':_0x42ccb0(0x20b)};});}};C=ue([pe(0x0,_0x556ac5(_0x4f4d9a))],C);var ve=Object[_0x54d3c0(0x244)],_e=Object[_0x54d3c0(0x20c)],fe=(_0xf411fb,_0x2f74ad,_0x485828,_0x7b1e55)=>{const _0x14906c=_0x54d3c0;for(var _0xfcbb4d=_0x7b1e55>0x1?void 0x0:_0x7b1e55?_e(_0x2f74ad,_0x485828):_0x2f74ad,_0x1ddf08=_0xf411fb[_0x14906c(0x202)]-0x1,_0xd2c168;_0x1ddf08>=0x0;_0x1ddf08--)(_0xd2c168=_0xf411fb[_0x1ddf08])&&(_0xfcbb4d=(_0x7b1e55?_0xd2c168(_0x2f74ad,_0x485828,_0xfcbb4d):_0xd2c168(_0xfcbb4d))||_0xfcbb4d);return _0x7b1e55&&_0xfcbb4d&&ve(_0x2f74ad,_0x485828,_0xfcbb4d),_0xfcbb4d;},I=(_0x29b9ed,_0x48ed11)=>(_0x32bbf5,_0x4bc109)=>_0x48ed11(_0x32bbf5,_0x4bc109,_0x29b9ed);let b=class extends _0x52739f{constructor(_0xf89097,_0x2fd09c,_0xba321c,_0x7a5b4d){const _0x1244b2=_0x54d3c0;super(),this[_0x1244b2(0x22c)]=_0xf89097,this[_0x1244b2(0x1ef)]=_0x2fd09c,this[_0x1244b2(0x1fd)]=_0xba321c,this[_0x1244b2(0x201)]=_0x7a5b4d,this[_0x1244b2(0x20e)]();}[_0x54d3c0(0x20e)](){const _0x37842b=_0x54d3c0;this['_threadCommentDataSourceService'][_0x37842b(0x23c)]=this[_0x37842b(0x1ef)],this[_0x37842b(0x22c)]['syncUpdateMutationToColla']=!0x1,this[_0x37842b(0x1fd)][_0x37842b(0x23c)]=this[_0x37842b(0x201)];}};b=fe([_0x2e269a(_0x2dc267['Starting'],b),I(0x0,_0x183b75),I(0x1,_0x556ac5(D)),I(0x2,_0x1d516f),I(0x3,_0x556ac5(C))],b);var Y=Object[_0x54d3c0(0x244)],Ie=Object['getOwnPropertyDescriptor'],Se=(_0x224c38,_0x492ef6,_0x5d39ea)=>_0x492ef6 in _0x224c38?Y(_0x224c38,_0x492ef6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5d39ea}):_0x224c38[_0x492ef6]=_0x5d39ea,be=(_0x55a7cb,_0x16f2f9,_0x4b52aa,_0x2d931e)=>{const _0x45dc5c=_0x54d3c0;for(var _0x528292=_0x2d931e>0x1?void 0x0:_0x2d931e?Ie(_0x16f2f9,_0x4b52aa):_0x16f2f9,_0x5af7d5=_0x55a7cb[_0x45dc5c(0x202)]-0x1,_0x152cb7;_0x5af7d5>=0x0;_0x5af7d5--)(_0x152cb7=_0x55a7cb[_0x5af7d5])&&(_0x528292=(_0x2d931e?_0x152cb7(_0x16f2f9,_0x4b52aa,_0x528292):_0x152cb7(_0x528292))||_0x528292);return _0x2d931e&&_0x528292&&Y(_0x16f2f9,_0x4b52aa,_0x528292),_0x528292;},j=(_0x16e984,_0x1b4222)=>(_0x4e5a9f,_0x220bda)=>_0x1b4222(_0x4e5a9f,_0x220bda,_0x16e984),G=(_0x495927,_0x4f5702,_0xbd0703)=>Se(_0x495927,typeof _0x4f5702!=_0x54d3c0(0x1f9)?_0x4f5702+'':_0x4f5702,_0xbd0703);let g=class extends _0x1a3cb5{constructor(_0x1bb7a8=ne,_0xc93fd4,_0x10c50a){const _0x3fb49f=_0x54d3c0;super(),this[_0x3fb49f(0x247)]=_0x1bb7a8,this['_injector']=_0xc93fd4,this[_0x3fb49f(0x219)]=_0x10c50a;const {..._0xbd407f}=this[_0x3fb49f(0x247)];this['_configService'][_0x3fb49f(0x226)](oe,_0xbd407f);}[_0x54d3c0(0x1df)](){const _0x450fff=_0x54d3c0;[[C],[D],[b],[S]][_0x450fff(0x1e7)](_0x51dad5=>{const _0xb81c9e=_0x450fff;this['_injector'][_0xb81c9e(0x22b)](_0x51dad5);});}};G(g,_0x54d3c0(0x240),k),G(g,'type',_0x4408ec[_0x54d3c0(0x1e4)]),g=be([_0x556292(_0x137644,_0x125610,_0x541cb2,_0x4bd77d),j(0x1,_0x556ac5(_0x4900de)),j(0x2,_0x5362db)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0xe2d821=_0x47bf;(function(_0x36fb22,_0x3eb2e3){const _0x2ccc19=_0x47bf,_0x2e3c35=_0x36fb22();while(!![]){try{const _0x5af6bc=-parseInt(_0x2ccc19(0x1d0))/0x1*(parseInt(_0x2ccc19(0x1f9))/0x2)+-parseInt(_0x2ccc19(0x1cd))/0x3*(parseInt(_0x2ccc19(0x216))/0x4)+parseInt(_0x2ccc19(0x1e7))/0x5*(parseInt(_0x2ccc19(0x220))/0x6)+-parseInt(_0x2ccc19(0x1eb))/0x7+parseInt(_0x2ccc19(0x221))/0x8*(parseInt(_0x2ccc19(0x21a))/0x9)+-parseInt(_0x2ccc19(0x211))/0xa+parseInt(_0x2ccc19(0x1fe))/0xb;if(_0x5af6bc===_0x3eb2e3)break;else _0x2e3c35['push'](_0x2e3c35['shift']());}catch(_0x6bcd26){_0x2e3c35['push'](_0x2e3c35['shift']());}}}(_0x4787,0x2c482));import{UserManagerService as _0x1398ac,OnLifecycle as _0xb139a8,LifecycleStages as _0x117143,Inject as _0x2d90da,Injector as _0x442235,Disposable as _0x43bd51,CustomRangeType as _0x42157a,UniverInstanceType as _0x341ef4,DependentOn as _0x5d261a,Plugin as _0x476fc3,IConfigService as _0xaa26c7}from'@univerjs/core';import{ThreadCommentModel as _0x325738,IThreadCommentDataSourceService as _0x581213,UniverThreadCommentPlugin as _0x1d0b94}from'@univerjs/thread-comment';function _0x47bf(_0x3d2ff1,_0x2d6e9e){const _0x47877a=_0x4787();return _0x47bf=function(_0x47bf46,_0x4712b5){_0x47bf46=_0x47bf46-0x1c6;let _0xa787dd=_0x47877a[_0x47bf46];return _0xa787dd;},_0x47bf(_0x3d2ff1,_0x2d6e9e);}import{IThreadCommentMentionDataService as _0xaf4732,UniverThreadCommentUIPlugin as _0x403add}from'@univerjs/thread-comment-ui';import{CommentService as _0x49a6d4,CollaborationSessionService as _0x112c6e,UniverCollaborationClientPlugin as _0x36fe94}from'@univerjs-pro/collaboration-client';function _0x4787(){const _0x5a7c40=['resolved','user','2967560wlozQa','_threadCommentMentionDataSource','_threadCommentDataSourceService','Unknown','href','565788MkjjBw','_initUserSync','_threadCommentMentionDataService','/list','733599saCRug','getMentions','userId','_threadCommentModel','addComment','setConfig','150QntuwU','24SmDpHO','avatar','collaborators','values','Edit','location','/add','_userService','/solved','replyId','subscribe','OpenOrReOpen','updateComment','getCurrentUser','_threadCommentDataSource','Starting','subject','Ready','body','https','personId','pluginName','syncUpdateMutationToColla','http','YYYY/MM/DD\x20HH:mm','Solve','format','createTimestamp','disposeWithMe','getMemberID','requireSession','add','_init','_sessionService','deleteComment','3ZFLuwW','forEach','rangeId','5992IGFkVo','stringify','code','length','filter','post','listComments','UNRECOGNIZED','users','commentUpdate$','/universer-api/authz/collaborator','getUser','_injector','/reply','content','saveCommentToSnapshot','Add','comment','thread-comment-data-source.config','COMMENT','resolveComment','_commentService','/universer-api/user/list','16115UxHfXh','Delete','reply','https:','2255645AkgPLq','searchParams','replies','map','addUser','customRanges','userID','_initDataSource','Reply','threadId','_httpService','rangeType','_configService','unitId','4IYWYSO','error','_config','solved','UNIVER_UNKNOWN','6915612RpIrvX','unit','://','getThread','defineProperty','size','get','symbol','type','parse','/universer-api/comment/unit/','parentId','protocol','comments','getOwnPropertyDescriptor','Solved','/delete'];_0x4787=function(){return _0x5a7c40;};return _0x4787();}import{UniverLicensePlugin as _0x3dedcc}from'@univerjs-pro/license';import{bufferTime as _0xbf8a55}from'rxjs';import{HTTPService as _0x5d5f1d}from'@univerjs/network';import _0x3f611e from'dayjs';const k='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var v=(_0x465002=>(_0x465002[_0x465002[_0xe2d821(0x22c)]=0x0]=_0xe2d821(0x22c),_0x465002[_0x465002[_0xe2d821(0x20d)]=0x1]=_0xe2d821(0x20d),_0x465002[_0x465002[_0xe2d821(0x1d7)]=-0x1]='UNRECOGNIZED',_0x465002))(v||{}),p=(_0x144086=>(_0x144086[_0x144086['Unknown']=0x0]=_0xe2d821(0x214),_0x144086[_0x144086['Add']=0x1]=_0xe2d821(0x1e0),_0x144086[_0x144086[_0xe2d821(0x1f3)]=0x2]='Reply',_0x144086[_0x144086[_0xe2d821(0x225)]=0x3]=_0xe2d821(0x225),_0x144086[_0x144086[_0xe2d821(0x1e8)]=0x4]='Delete',_0x144086[_0x144086[_0xe2d821(0x23a)]=0x5]=_0xe2d821(0x23a),_0x144086[_0x144086[_0xe2d821(0x1d7)]=-0x1]=_0xe2d821(0x1d7),_0x144086))(p||{});const w=_0x4ef3f2=>_0x3f611e(new Date(+_0x4ef3f2))['format'](_0xe2d821(0x239)),ee=async(_0x59866d,_0x234fd4)=>{const _0x483c32=_0xe2d821,_0x2cad2b=_0x59866d[_0x483c32(0x204)](_0x1398ac),_0x447a00=_0x59866d[_0x483c32(0x204)](_0x5d5f1d);_0x234fd4[_0x483c32(0x1ce)](_0xb470fe=>{const _0x562aee=_0x483c32;_0x2cad2b[_0x562aee(0x1db)](_0xb470fe)&&_0x234fd4['delete'](_0xb470fe);}),_0x234fd4[_0x483c32(0x203)]&&(await _0x447a00[_0x483c32(0x204)](_0x483c32(0x1e6),{'params':{'userIDs':[..._0x234fd4]}}))['body'][_0x483c32(0x1d8)][_0x483c32(0x1ce)](_0x3a2af8=>{const _0x4ca3fc=_0x483c32;_0x3a2af8&&_0x2cad2b[_0x4ca3fc(0x1ef)](_0x3a2af8);});};var re=Object[_0xe2d821(0x202)],te=Object[_0xe2d821(0x20c)],se=(_0x43e9a5,_0x143b40,_0x22374e,_0x1740bd)=>{const _0x37a4df=_0xe2d821;for(var _0x227450=_0x1740bd>0x1?void 0x0:_0x1740bd?te(_0x143b40,_0x22374e):_0x143b40,_0x3733b4=_0x43e9a5[_0x37a4df(0x1d3)]-0x1,_0x45414c;_0x3733b4>=0x0;_0x3733b4--)(_0x45414c=_0x43e9a5[_0x3733b4])&&(_0x227450=(_0x1740bd?_0x45414c(_0x143b40,_0x22374e,_0x227450):_0x45414c(_0x227450))||_0x227450);return _0x1740bd&&_0x227450&&re(_0x143b40,_0x22374e,_0x227450),_0x227450;},_=(_0x2a20fc,_0x3fc782)=>(_0x192b2c,_0x56faad)=>_0x3fc782(_0x192b2c,_0x56faad,_0x2a20fc);let S=class extends _0x43bd51{constructor(_0x2b2042,_0x411052,_0x108d82,_0x4c459e){const _0x4fbd85=_0xe2d821;super(),this[_0x4fbd85(0x1e5)]=_0x2b2042,this[_0x4fbd85(0x21d)]=_0x411052,this['_userService']=_0x108d82,this[_0x4fbd85(0x1dc)]=_0x4c459e,this['_init'](),this[_0x4fbd85(0x217)]();}[_0xe2d821(0x217)](){const _0x38172b=_0xe2d821;this[_0x38172b(0x1c6)](this['_threadCommentModel']['commentUpdate$']['pipe'](_0xbf8a55(0x10))[_0x38172b(0x22b)](_0x375a8b=>{const _0x17f782=_0x38172b,_0x3ec57d=new Set();_0x375a8b[_0x17f782(0x1ce)](_0x42edc=>{const _0x672d07=_0x17f782;switch(_0x42edc[_0x672d07(0x206)]){case _0x672d07(0x1c9):{const _0x1315e9=_0x42edc['payload'][_0x672d07(0x235)];_0x3ec57d[_0x672d07(0x1c9)](_0x1315e9);break;}}}),ee(this[_0x17f782(0x1dc)],_0x3ec57d);}));}[_0xe2d821(0x1ca)](){const _0x2a9101=_0xe2d821;this[_0x2a9101(0x1c6)](this[_0x2a9101(0x1e5)][_0x2a9101(0x1d9)][_0x2a9101(0x22b)](async _0x4e9e0b=>{const _0x2a86d9=_0x2a9101;var _0x133e23,_0x4882e4;const _0x102695=this[_0x2a86d9(0x21d)][_0x2a86d9(0x201)](_0x4e9e0b[_0x2a86d9(0x1f8)],_0x4e9e0b[_0x2a86d9(0x1f4)]);if(!_0x102695)return;const {unitId:_0x4933a2,subUnitId:_0x2f615b}=_0x102695;switch(_0x4e9e0b[_0x2a86d9(0x210)]&&this[_0x2a86d9(0x228)][_0x2a86d9(0x1ef)](_0x4e9e0b['user']),_0x4e9e0b[_0x2a86d9(0x206)]){case p['Add']:break;case p[_0x2a86d9(0x1f3)]:{this['_threadCommentModel']['addComment'](_0x4933a2,_0x2f615b,{'unitId':_0x4933a2,'subUnitId':_0x2f615b,'ref':'','id':_0x4e9e0b[_0x2a86d9(0x22a)],'dT':w(+_0x4e9e0b[_0x2a86d9(0x23c)]),'threadId':_0x4e9e0b[_0x2a86d9(0x1f4)],'personId':(_0x4882e4=(_0x133e23=_0x4e9e0b[_0x2a86d9(0x210)])==null?void 0x0:_0x133e23[_0x2a86d9(0x1f1)])!=null?_0x4882e4:_0x4e9e0b[_0x2a86d9(0x21c)],'text':JSON['parse'](_0x4e9e0b[_0x2a86d9(0x1de)]),'parentId':_0x102695['id']});break;}case p[_0x2a86d9(0x1e8)]:{const _0x35f8f8=this[_0x2a86d9(0x21d)]['getComment'](_0x4933a2,_0x2f615b,_0x4e9e0b[_0x2a86d9(0x22a)]);_0x35f8f8&&_0x35f8f8[_0x2a86d9(0x209)]&&this[_0x2a86d9(0x21d)][_0x2a86d9(0x1cc)](_0x4933a2,_0x2f615b,_0x4e9e0b['replyId']);break;}case p[_0x2a86d9(0x225)]:{this[_0x2a86d9(0x21d)][_0x2a86d9(0x22d)](_0x4933a2,_0x2f615b,{'commentId':_0x4e9e0b['replyId'],'text':JSON['parse'](_0x4e9e0b['content'])});break;}case p[_0x2a86d9(0x23a)]:{const _0x232dc3=this[_0x2a86d9(0x21d)]['getThread'](_0x4933a2,_0x4e9e0b[_0x2a86d9(0x1f4)]);_0x232dc3&&this[_0x2a86d9(0x21d)][_0x2a86d9(0x1e4)](_0x4933a2,_0x2f615b,_0x232dc3['id'],_0x4e9e0b['solved']===v[_0x2a86d9(0x20d)]);break;}}}));}};S=se([_0xb139a8(_0x117143[_0xe2d821(0x232)],S),_(0x0,_0x2d90da(_0x49a6d4)),_(0x1,_0x2d90da(_0x325738)),_(0x2,_0x2d90da(_0x1398ac)),_(0x3,_0x2d90da(_0x442235))],S);const oe=_0xe2d821(0x1e2),ne={};var ie=Object[_0xe2d821(0x202)],ae=Object[_0xe2d821(0x20c)],ce=(_0xd1ee0a,_0x27d2ce,_0x2611f4,_0x5db2d5)=>{for(var _0x4a12d6=_0x5db2d5>0x1?void 0x0:_0x5db2d5?ae(_0x27d2ce,_0x2611f4):_0x27d2ce,_0x518224=_0xd1ee0a['length']-0x1,_0x54c2e1;_0x518224>=0x0;_0x518224--)(_0x54c2e1=_0xd1ee0a[_0x518224])&&(_0x4a12d6=(_0x5db2d5?_0x54c2e1(_0x27d2ce,_0x2611f4,_0x4a12d6):_0x54c2e1(_0x4a12d6))||_0x4a12d6);return _0x5db2d5&&_0x4a12d6&&ie(_0x27d2ce,_0x2611f4,_0x4a12d6),_0x4a12d6;},f=(_0x1dd823,_0x82c9dc)=>(_0x246586,_0x152f31)=>_0x82c9dc(_0x246586,_0x152f31,_0x1dd823);function de(_0x53f4d8,_0x17a138){const _0x503d44=_0xe2d821,_0x5a4e8b=_0x53f4d8[_0x503d44(0x1ed)][0x0];return{..._0x17a138,'id':_0x5a4e8b[_0x503d44(0x22a)],'resolved':_0x53f4d8['solved']===0x1,'dT':w(_0x5a4e8b[_0x503d44(0x23c)]),'personId':_0x5a4e8b[_0x503d44(0x21c)],'threadId':_0x5a4e8b[_0x503d44(0x1f4)]};}function me(_0x32f4b0,_0x354b8e,_0x331969){const _0x1f6216=_0xe2d821;var _0xc0ea01,_0x438dec;if(((_0x438dec=(_0xc0ea01=_0x32f4b0==null?void 0x0:_0x32f4b0[_0x1f6216(0x1ed)])==null?void 0x0:_0xc0ea01['length'])!=null?_0x438dec:0x0)>0x0){const _0x6158e7=(_0x5e0f99,_0x1423db)=>({'id':_0x5e0f99[_0x1f6216(0x22a)],'threadId':_0x5e0f99[_0x1f6216(0x1f4)],'dT':w(_0x5e0f99[_0x1f6216(0x23c)]),'personId':_0x5e0f99[_0x1f6216(0x21c)],'resolved':_0x32f4b0[_0x1f6216(0x1fc)]===v['Solved'],'unitId':_0x354b8e,'subUnitId':_0x331969,'text':JSON[_0x1f6216(0x207)](_0x5e0f99['content']),'parentId':_0x1423db}),_0x3821b4=_0x6158e7(_0x32f4b0[_0x1f6216(0x1ed)][0x0]);return{..._0x3821b4,'children':_0x32f4b0[_0x1f6216(0x1ed)]['slice'](0x1)[_0x1f6216(0x1ee)](_0x19bd1a=>_0x6158e7(_0x19bd1a,_0x3821b4['id']))};}return null;}let D=class{constructor(_0x954e61,_0x2149c1,_0x11e651,_0x1a8c25){const _0x7bcd6c=_0xe2d821;this[_0x7bcd6c(0x1f5)]=_0x954e61,this[_0x7bcd6c(0x228)]=_0x2149c1,this['_sessionService']=_0x11e651,this[_0x7bcd6c(0x1dc)]=_0x1a8c25;}async[_0xe2d821(0x21e)](_0x205a6f){const _0x383d77=_0xe2d821;var _0x370f6b,_0x24b8cb;const {parentId:_0x26e259,unitId:_0x12d956,text:_0x2d77dc,threadId:_0x330ceb}=_0x205a6f,_0x37e2be=(_0x24b8cb=(_0x370f6b=_0x2d77dc[_0x383d77(0x1f0)])==null?void 0x0:_0x370f6b[_0x383d77(0x1d4)](_0x2b3942=>_0x2b3942[_0x383d77(0x1f6)]===_0x42157a['COMMENT'])['map'](_0xb88ce9=>_0xb88ce9['rangeId']))!=null?_0x24b8cb:[],_0x3a45e6=JSON[_0x383d77(0x1d1)](_0x2d77dc),_0x5a00ab=(await this[_0x383d77(0x1cb)]['requireSession'](_0x12d956))[_0x383d77(0x1c7)]();if(_0x26e259){const _0x537642={'memberId':_0x5a00ab,'unitId':_0x12d956,'content':_0x3a45e6,'mention':_0x37e2be,'threadId':_0x330ceb},_0x2d97e6=(await this[_0x383d77(0x1f5)][_0x383d77(0x1d5)](_0x383d77(0x208)+_0x12d956+_0x383d77(0x1dd),{'body':_0x537642}))['body'][_0x383d77(0x1e9)];return{..._0x205a6f,'id':_0x2d97e6[_0x383d77(0x22a)],'dT':_0x3f611e(+_0x2d97e6[_0x383d77(0x23c)])[_0x383d77(0x23b)](_0x383d77(0x239)),'personId':_0x2d97e6[_0x383d77(0x21c)]};}else{const _0x5980e5={'memberId':_0x5a00ab,'unitId':_0x12d956,'content':_0x3a45e6,'mention':_0x37e2be},_0x3e8521=await this[_0x383d77(0x1f5)][_0x383d77(0x1d5)](_0x383d77(0x208)+_0x12d956+_0x383d77(0x227),{'body':_0x5980e5});return de(_0x3e8521[_0x383d77(0x233)][_0x383d77(0x1e1)],_0x205a6f);}}async['updateComment'](_0x2e0013){const _0x2cb7aa=_0xe2d821;var _0xa65634,_0x402789;const {text:_0x419ec2,unitId:_0x588705}=_0x2e0013,_0x204d2a=(_0x402789=(_0xa65634=_0x419ec2[_0x2cb7aa(0x1f0)])==null?void 0x0:_0xa65634[_0x2cb7aa(0x1d4)](_0x3438a8=>_0x3438a8['rangeType']===_0x42157a[_0x2cb7aa(0x1e3)])[_0x2cb7aa(0x1ee)](_0xacbc57=>_0xacbc57[_0x2cb7aa(0x1cf)]))!=null?_0x402789:[],_0x40daad=JSON[_0x2cb7aa(0x1d1)](_0x419ec2),_0x5de36f=_0x2e0013['threadId'],_0x23ef23=_0x2e0013['id'],_0x4cc1b2={'memberId':(await this['_sessionService'][_0x2cb7aa(0x1c8)](_0x588705))['getMemberID'](),'unitId':_0x588705,'threadId':_0x5de36f,'mention':_0x204d2a,'content':_0x40daad,'replyId':_0x23ef23},_0x152142=await this['_httpService'][_0x2cb7aa(0x1d5)](_0x2cb7aa(0x208)+_0x588705+'/edit',{'body':_0x4cc1b2});return!_0x152142['body'][_0x2cb7aa(0x1fa)]||_0x152142[_0x2cb7aa(0x233)][_0x2cb7aa(0x1fa)][_0x2cb7aa(0x1d2)]===0x1;}async[_0xe2d821(0x1e4)](_0x1f2b53){const _0x2cb29f=_0xe2d821,{unitId:_0xfb5da3}=_0x1f2b53,_0x57a6bf=_0x1f2b53[_0x2cb29f(0x1f4)],_0x4c47cb={'memberId':this[_0x2cb29f(0x228)][_0x2cb29f(0x22e)]()[_0x2cb29f(0x1f1)],'unitId':_0xfb5da3,'threadId':_0x57a6bf,'solved':_0x1f2b53[_0x2cb29f(0x20f)]?v['Solved']:v[_0x2cb29f(0x22c)]},_0x25e432=await this[_0x2cb29f(0x1f5)][_0x2cb29f(0x1d5)](_0x2cb29f(0x208)+_0xfb5da3+_0x2cb29f(0x229),{'body':_0x4c47cb});return!_0x25e432[_0x2cb29f(0x233)][_0x2cb29f(0x1fa)]||_0x25e432[_0x2cb29f(0x233)][_0x2cb29f(0x1fa)][_0x2cb29f(0x1d2)]===0x1;}async[_0xe2d821(0x1cc)](_0x24e441,_0x1360b3,_0x8767d4,_0x5e0e60){const _0x217c77=_0xe2d821,_0x31809b={'memberId':(await this[_0x217c77(0x1cb)]['requireSession'](_0x24e441))[_0x217c77(0x1c7)](),'threadId':_0x8767d4,'replyId':_0x5e0e60,'unitId':_0x24e441},_0x11ccfb=await this[_0x217c77(0x1f5)][_0x217c77(0x1d5)](_0x217c77(0x208)+_0x24e441+_0x217c77(0x20e),{'body':_0x31809b});return!_0x11ccfb[_0x217c77(0x233)][_0x217c77(0x1fa)]||_0x11ccfb['body']['error'][_0x217c77(0x1d2)]===0x1;}async[_0xe2d821(0x1d6)](_0x4a33d4,_0x3eedad,_0x29b67e){const _0x99202b=_0xe2d821,_0x3cddbf={'unitId':_0x4a33d4,'threadId':_0x29b67e},_0x54e030=await this[_0x99202b(0x1f5)][_0x99202b(0x1d5)](_0x99202b(0x208)+_0x4a33d4+_0x99202b(0x219),{'body':_0x3cddbf}),_0xe25644=_0x29b67e['map'](_0x140e45=>me(_0x54e030[_0x99202b(0x233)][_0x99202b(0x20b)][_0x140e45],_0x4a33d4,_0x3eedad))[_0x99202b(0x1d4)](Boolean);return Object[_0x99202b(0x224)](_0x54e030[_0x99202b(0x233)][_0x99202b(0x1d8)])['forEach'](_0x265408=>{const _0x4f59bc=_0x99202b;this[_0x4f59bc(0x228)][_0x4f59bc(0x1ef)](_0x265408);}),_0xe25644;}[_0xe2d821(0x1df)](_0x27ea67){const _0x48f42a=_0xe2d821;return{'id':_0x27ea67['id'],'threadId':_0x27ea67[_0x48f42a(0x1f4)],'ref':_0x27ea67['ref']};}};D=ce([f(0x0,_0x2d90da(_0x5d5f1d)),f(0x1,_0x2d90da(_0x1398ac)),f(0x2,_0x2d90da(_0x112c6e)),f(0x3,_0x2d90da(_0x442235))],D);var le=Object[_0xe2d821(0x202)],he=Object[_0xe2d821(0x20c)],ue=(_0x359e51,_0xfdeca1,_0x420911,_0x253204)=>{for(var _0x6ddbea=_0x253204>0x1?void 0x0:_0x253204?he(_0xfdeca1,_0x420911):_0xfdeca1,_0x8e7dc6=_0x359e51['length']-0x1,_0x5f2202;_0x8e7dc6>=0x0;_0x8e7dc6--)(_0x5f2202=_0x359e51[_0x8e7dc6])&&(_0x6ddbea=(_0x253204?_0x5f2202(_0xfdeca1,_0x420911,_0x6ddbea):_0x5f2202(_0x6ddbea))||_0x6ddbea);return _0x253204&&_0x6ddbea&&le(_0xfdeca1,_0x420911,_0x6ddbea),_0x6ddbea;},pe=(_0x421a0e,_0x52b954)=>(_0x1dbc2f,_0x266cdf)=>_0x52b954(_0x1dbc2f,_0x266cdf,_0x421a0e);let C=class{constructor(_0x2d1adf){const _0x4af55a=_0xe2d821;this[_0x4af55a(0x1f5)]=_0x2d1adf;}async[_0xe2d821(0x21b)](_0x24bf81,_0x128e7e,_0xbbf639){const _0x494c72=_0xe2d821,_0x3d7639=new URL(window[_0x494c72(0x226)][_0x494c72(0x215)])[_0x494c72(0x1ec)]['get'](_0x494c72(0x1ff));if(!_0x3d7639)return[];const _0x42c4e7=window['location']['host'],_0x4dcefc=window[_0x494c72(0x226)][_0x494c72(0x20a)]===_0x494c72(0x1ea)?_0x494c72(0x234):_0x494c72(0x238);return(await this[_0x494c72(0x1f5)]['get'](_0x4dcefc+_0x494c72(0x200)+_0x42c4e7+_0x494c72(0x1da),{'params':{'objectID':_0x3d7639,'unitID':_0x3d7639}}))['body'][_0x494c72(0x223)]['map'](_0x32c827=>{const _0x4e08a4=_0x494c72;var _0x3bdb92,_0x4ac0df,_0x30fb6d,_0x57f64b,_0x4ed56a,_0x3bf0db;return{'id':(_0x4ac0df=(_0x3bdb92=_0x32c827['subject'])==null?void 0x0:_0x3bdb92[_0x4e08a4(0x1f1)])!=null?_0x4ac0df:'','label':(_0x57f64b=(_0x30fb6d=_0x32c827[_0x4e08a4(0x231)])==null?void 0x0:_0x30fb6d['name'])!=null?_0x57f64b:'','icon':(_0x3bf0db=(_0x4ed56a=_0x32c827[_0x4e08a4(0x231)])==null?void 0x0:_0x4ed56a[_0x4e08a4(0x222)])!=null?_0x3bf0db:'','type':_0x4e08a4(0x210)};});}};C=ue([pe(0x0,_0x2d90da(_0x5d5f1d))],C);var ve=Object[_0xe2d821(0x202)],_e=Object['getOwnPropertyDescriptor'],fe=(_0x23f86f,_0x4614bf,_0x499f23,_0x2da4c2)=>{const _0xd38771=_0xe2d821;for(var _0x352a2a=_0x2da4c2>0x1?void 0x0:_0x2da4c2?_e(_0x4614bf,_0x499f23):_0x4614bf,_0x3acaa2=_0x23f86f[_0xd38771(0x1d3)]-0x1,_0x49dd88;_0x3acaa2>=0x0;_0x3acaa2--)(_0x49dd88=_0x23f86f[_0x3acaa2])&&(_0x352a2a=(_0x2da4c2?_0x49dd88(_0x4614bf,_0x499f23,_0x352a2a):_0x49dd88(_0x352a2a))||_0x352a2a);return _0x2da4c2&&_0x352a2a&&ve(_0x4614bf,_0x499f23,_0x352a2a),_0x352a2a;},I=(_0x10fb90,_0x1ef125)=>(_0x363704,_0x131786)=>_0x1ef125(_0x363704,_0x131786,_0x10fb90);let b=class extends _0x43bd51{constructor(_0x582823,_0x4fcdb8,_0x1d9f2d,_0x5cb4fb){const _0x1cfdf2=_0xe2d821;super(),this[_0x1cfdf2(0x213)]=_0x582823,this[_0x1cfdf2(0x22f)]=_0x4fcdb8,this[_0x1cfdf2(0x218)]=_0x1d9f2d,this[_0x1cfdf2(0x212)]=_0x5cb4fb,this['_initDataSource']();}[_0xe2d821(0x1f2)](){const _0x22d8a2=_0xe2d821;this[_0x22d8a2(0x213)]['dataSource']=this['_threadCommentDataSource'],this[_0x22d8a2(0x213)][_0x22d8a2(0x237)]=!0x1,this[_0x22d8a2(0x218)]['dataSource']=this[_0x22d8a2(0x212)];}};b=fe([_0xb139a8(_0x117143[_0xe2d821(0x230)],b),I(0x0,_0x581213),I(0x1,_0x2d90da(D)),I(0x2,_0xaf4732),I(0x3,_0x2d90da(C))],b);var Y=Object[_0xe2d821(0x202)],Ie=Object['getOwnPropertyDescriptor'],Se=(_0x5ea31d,_0x2932d9,_0x237cd1)=>_0x2932d9 in _0x5ea31d?Y(_0x5ea31d,_0x2932d9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x237cd1}):_0x5ea31d[_0x2932d9]=_0x237cd1,be=(_0x3a6cf2,_0x1a51df,_0x139c39,_0x3e9e48)=>{const _0x5b7e04=_0xe2d821;for(var _0x11647f=_0x3e9e48>0x1?void 0x0:_0x3e9e48?Ie(_0x1a51df,_0x139c39):_0x1a51df,_0xf8e7dc=_0x3a6cf2[_0x5b7e04(0x1d3)]-0x1,_0x29ac08;_0xf8e7dc>=0x0;_0xf8e7dc--)(_0x29ac08=_0x3a6cf2[_0xf8e7dc])&&(_0x11647f=(_0x3e9e48?_0x29ac08(_0x1a51df,_0x139c39,_0x11647f):_0x29ac08(_0x11647f))||_0x11647f);return _0x3e9e48&&_0x11647f&&Y(_0x1a51df,_0x139c39,_0x11647f),_0x11647f;},j=(_0x51ab07,_0x36c257)=>(_0x89857a,_0x51a2d7)=>_0x36c257(_0x89857a,_0x51a2d7,_0x51ab07),G=(_0x531c16,_0x3a4dfa,_0x47a9af)=>Se(_0x531c16,typeof _0x3a4dfa!=_0xe2d821(0x205)?_0x3a4dfa+'':_0x3a4dfa,_0x47a9af);let g=class extends _0x476fc3{constructor(_0xed6676=ne,_0x5a284a,_0x2ed4b5){const _0x4de551=_0xe2d821;super(),this[_0x4de551(0x1fb)]=_0xed6676,this['_injector']=_0x5a284a,this['_configService']=_0x2ed4b5;const {..._0x271fde}=this['_config'];this[_0x4de551(0x1f7)][_0x4de551(0x21f)](oe,_0x271fde);}['onStarting'](){const _0x4b8cfa=_0xe2d821;[[C],[D],[b],[S]][_0x4b8cfa(0x1ce)](_0x326bc4=>{const _0x377b21=_0x4b8cfa;this[_0x377b21(0x1dc)]['add'](_0x326bc4);});}};G(g,_0xe2d821(0x236),k),G(g,_0xe2d821(0x206),_0x341ef4[_0xe2d821(0x1fd)]),g=be([_0x5d261a(_0x1d0b94,_0x403add,_0x36fe94,_0x3dedcc),j(0x1,_0x2d90da(_0x442235)),j(0x2,_0xaa26c7)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0xcdf0(_0x4ea4b9,_0xcc44e5){const _0x5139c2=_0x5139();return _0xcdf0=function(_0xcdf00b,_0x3088d2){_0xcdf00b=_0xcdf00b-0x188;let _0x5ccdda=_0x5139c2[_0xcdf00b];return _0x5ccdda;},_0xcdf0(_0x4ea4b9,_0xcc44e5);}function _0x5139(){const _0x45df11=['_threadCommentDataSourceService','pipe','function','https','setConfig','_initUserSync','OpenOrReOpen','saveCommentToSnapshot','add','getMentions','slice','values','@univerjs/network','UniverThreadCommentUi','UniverThreadCommentDataSourcePlugin','_userService','stringify','@univerjs-pro/license','http','commentUpdate$','Module','UNRECOGNIZED','rangeType','/universer-api/comment/unit/','customRanges','/universer-api/user/list','_httpService','/delete','replies','@univerjs-pro/collaboration-client','solved','delete','CommentService','LifecycleStages','Solve','symbol','threadId','unit','8afABGm','body','CollaborationSessionService','deleteComment','comments','href','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentMentionDataSource','566523YyNIUv','addUser','11035qZSvpu','_threadCommentDataSource','IThreadCommentMentionDataService','getUser','toStringTag','_sessionService','userID','code','createTimestamp','parse','subscribe','_threadCommentMentionDataService','onStarting','@univerjs/thread-comment-ui','length','/universer-api/authz/collaborator','personId','rxjs','YYYY/MM/DD\x20HH:mm','bufferTime','rangeId','508hVuuuB','map','object','/list','10SUnQZp','Reply','resolveComment','getOwnPropertyDescriptor','1017540jtjCTn','_injector','dayjs','_threadCommentModel','reply','_init','OnLifecycle','parentId','COMMENT','589gAoaZS','userId','UniverCore','content','IThreadCommentDataSourceService','314088PqKyby','searchParams','size','ThreadCommentModel','protocol','getCurrentUser','forEach','thread-comment-data-source.config','Unknown','host','_initDataSource','unitId','Solved','Inject','UniverLicense','subject','addComment','182679dPHPRa','UniverNetwork','CustomRangeType','UniverCollaborationClient','format','dataSource','getComment','avatar','DependentOn','Delete','622nUvWnv','listComments','type','error','requireSession','_commentService','get','1506186lZkIIr','UserManagerService','UniverThreadComment','comment','@univerjs/thread-comment','Edit','replyId','Disposable','location','payload','getThread','users','disposeWithMe','Add','amd','UNIVER_UNKNOWN','HTTPService','://','defineProperty','getMemberID','user','UniverThreadCommentPlugin','/edit','UniverThreadCommentUIPlugin','filter','Injector','_config','/solved','_configService','resolved','post'];_0x5139=function(){return _0x45df11;};return _0x5139();}(function(_0x3f5f06,_0x2e4d81){const _0x51cbe9=_0xcdf0,_0x389dd6=_0x3f5f06();while(!![]){try{const _0x4e2194=-parseInt(_0x51cbe9(0x1b4))/0x1*(-parseInt(_0x51cbe9(0x1d4))/0x2)+-parseInt(_0x51cbe9(0x1ab))/0x3+parseInt(_0x51cbe9(0x1a3))/0x4*(parseInt(_0x51cbe9(0x18e))/0x5)+-parseInt(_0x51cbe9(0x1b9))/0x6+parseInt(_0x51cbe9(0x1ca))/0x7*(parseInt(_0x51cbe9(0x220))/0x8)+parseInt(_0x51cbe9(0x18c))/0x9*(-parseInt(_0x51cbe9(0x1a7))/0xa)+parseInt(_0x51cbe9(0x1db))/0xb;if(_0x4e2194===_0x2e4d81)break;else _0x389dd6['push'](_0x389dd6['shift']());}catch(_0x486f7e){_0x389dd6['push'](_0x389dd6['shift']());}}}(_0x5139,0x29ff0),function(_0x3addfc,_0x465b14){const _0x33ad61=_0xcdf0;typeof exports==_0x33ad61(0x1a5)&&typeof module<'u'?_0x465b14(exports,require('@univerjs/core'),require(_0x33ad61(0x1df)),require(_0x33ad61(0x19b)),require('@univerjs-pro/collaboration-client'),require(_0x33ad61(0x20b)),require(_0x33ad61(0x19f)),require(_0x33ad61(0x206)),require(_0x33ad61(0x1ad))):typeof define==_0x33ad61(0x1fc)&&define[_0x33ad61(0x1e9)]?define(['exports','@univerjs/core',_0x33ad61(0x1df),'@univerjs/thread-comment-ui',_0x33ad61(0x217),_0x33ad61(0x20b),'rxjs',_0x33ad61(0x206),_0x33ad61(0x1ad)],_0x465b14):(_0x3addfc=typeof globalThis<'u'?globalThis:_0x3addfc||self,_0x465b14(_0x3addfc['UniverThreadCommentDatasource']={},_0x3addfc[_0x33ad61(0x1b6)],_0x3addfc[_0x33ad61(0x1dd)],_0x3addfc[_0x33ad61(0x207)],_0x3addfc[_0x33ad61(0x1cd)],_0x3addfc[_0x33ad61(0x1c7)],_0x3addfc[_0x33ad61(0x19f)],_0x3addfc[_0x33ad61(0x1cb)],_0x3addfc[_0x33ad61(0x1ad)]));}(this,function(_0xbfcf46,_0x299097,_0x48b9c5,_0x3e94f5,_0x1d92d3,_0x4bcffa,_0x1d4a18,_0x1d7911,_0x4f003a){'use strict';const _0xcfdc78=_0xcdf0;const _0x2662d5=_0xcfdc78(0x18a);var _0x5754f1=(_0x3d7781=>(_0x3d7781[_0x3d7781[_0xcfdc78(0x200)]=0x0]=_0xcfdc78(0x200),_0x3d7781[_0x3d7781[_0xcfdc78(0x1c5)]=0x1]=_0xcfdc78(0x1c5),_0x3d7781[_0x3d7781[_0xcfdc78(0x20f)]=-0x1]=_0xcfdc78(0x20f),_0x3d7781))(_0x5754f1||{}),_0x6617b7=(_0x1a0528=>(_0x1a0528[_0x1a0528['Unknown']=0x0]=_0xcfdc78(0x1c1),_0x1a0528[_0x1a0528['Add']=0x1]=_0xcfdc78(0x1e8),_0x1a0528[_0x1a0528['Reply']=0x2]=_0xcfdc78(0x1a8),_0x1a0528[_0x1a0528[_0xcfdc78(0x1e0)]=0x3]=_0xcfdc78(0x1e0),_0x1a0528[_0x1a0528[_0xcfdc78(0x1d3)]=0x4]='Delete',_0x1a0528[_0x1a0528[_0xcfdc78(0x21c)]=0x5]='Solve',_0x1a0528[_0x1a0528[_0xcfdc78(0x20f)]=-0x1]=_0xcfdc78(0x20f),_0x1a0528))(_0x6617b7||{});const _0x685b06=_0x25dd90=>_0x4f003a(new Date(+_0x25dd90))[_0xcfdc78(0x1ce)](_0xcfdc78(0x1a0)),_0x2c9c90=async(_0x1019ab,_0x4ca21e)=>{const _0x5ee8f6=_0xcfdc78,_0xc93076=_0x1019ab[_0x5ee8f6(0x1da)](_0x299097[_0x5ee8f6(0x1dc)]),_0x28125e=_0x1019ab[_0x5ee8f6(0x1da)](_0x1d7911[_0x5ee8f6(0x1eb)]);_0x4ca21e[_0x5ee8f6(0x1bf)](_0x3cc81b=>{const _0x4c8c8f=_0x5ee8f6;_0xc93076[_0x4c8c8f(0x191)](_0x3cc81b)&&_0x4ca21e[_0x4c8c8f(0x219)](_0x3cc81b);}),_0x4ca21e[_0x5ee8f6(0x1bb)]&&(await _0x28125e['get'](_0x5ee8f6(0x213),{'params':{'userIDs':[..._0x4ca21e]}}))[_0x5ee8f6(0x221)]['users'][_0x5ee8f6(0x1bf)](_0x54d427=>{const _0x18c1bc=_0x5ee8f6;_0x54d427&&_0xc93076[_0x18c1bc(0x18d)](_0x54d427);});};var _0x39e91e=Object[_0xcfdc78(0x1ed)],_0x564452=Object[_0xcfdc78(0x1aa)],_0x279bfe=(_0x4fedc2,_0x2d55db,_0x28c6af,_0xf5b3d9)=>{const _0x107faf=_0xcfdc78;for(var _0x231137=_0xf5b3d9>0x1?void 0x0:_0xf5b3d9?_0x564452(_0x2d55db,_0x28c6af):_0x2d55db,_0x587196=_0x4fedc2[_0x107faf(0x19c)]-0x1,_0x3c355c;_0x587196>=0x0;_0x587196--)(_0x3c355c=_0x4fedc2[_0x587196])&&(_0x231137=(_0xf5b3d9?_0x3c355c(_0x2d55db,_0x28c6af,_0x231137):_0x3c355c(_0x231137))||_0x231137);return _0xf5b3d9&&_0x231137&&_0x39e91e(_0x2d55db,_0x28c6af,_0x231137),_0x231137;},_0x2eb7a9=(_0x483507,_0x58dd81)=>(_0x500ae5,_0x265349)=>_0x58dd81(_0x500ae5,_0x265349,_0x483507);let _0x29a3e2=class extends _0x299097['Disposable']{constructor(_0x43331d,_0x4a2531,_0x26bbaf,_0x403bcb){const _0x4b11ec=_0xcfdc78;super(),this[_0x4b11ec(0x1d9)]=_0x43331d,this[_0x4b11ec(0x1ae)]=_0x4a2531,this[_0x4b11ec(0x209)]=_0x26bbaf,this['_injector']=_0x403bcb,this[_0x4b11ec(0x1b0)](),this[_0x4b11ec(0x1ff)]();}['_initUserSync'](){const _0x37414c=_0xcfdc78;this['disposeWithMe'](this['_threadCommentModel'][_0x37414c(0x20d)][_0x37414c(0x1fb)](_0x1d4a18[_0x37414c(0x1a1)](0x10))['subscribe'](_0x3e813e=>{const _0x311010=new Set();_0x3e813e['forEach'](_0x25f6a4=>{const _0x315289=_0xcdf0;switch(_0x25f6a4['type']){case _0x315289(0x202):{const _0x3213ce=_0x25f6a4[_0x315289(0x1e4)][_0x315289(0x19e)];_0x311010[_0x315289(0x202)](_0x3213ce);break;}}}),_0x2c9c90(this['_injector'],_0x311010);}));}[_0xcfdc78(0x1b0)](){const _0x44a22b=_0xcfdc78;this[_0x44a22b(0x1e7)](this[_0x44a22b(0x1d9)][_0x44a22b(0x20d)][_0x44a22b(0x198)](async _0x899d1d=>{const _0x2a64a6=_0x44a22b;var _0x40abde,_0x7356cd;const _0x55749f=this['_threadCommentModel'][_0x2a64a6(0x1e5)](_0x899d1d[_0x2a64a6(0x1c4)],_0x899d1d[_0x2a64a6(0x21e)]);if(!_0x55749f)return;const {unitId:_0x54a856,subUnitId:_0xbf5e5c}=_0x55749f;switch(_0x899d1d[_0x2a64a6(0x1ef)]&&this['_userService']['addUser'](_0x899d1d[_0x2a64a6(0x1ef)]),_0x899d1d[_0x2a64a6(0x1d6)]){case _0x6617b7[_0x2a64a6(0x1e8)]:break;case _0x6617b7['Reply']:{this[_0x2a64a6(0x1ae)][_0x2a64a6(0x1c9)](_0x54a856,_0xbf5e5c,{'unitId':_0x54a856,'subUnitId':_0xbf5e5c,'ref':'','id':_0x899d1d[_0x2a64a6(0x1e1)],'dT':_0x685b06(+_0x899d1d[_0x2a64a6(0x196)]),'threadId':_0x899d1d['threadId'],'personId':(_0x7356cd=(_0x40abde=_0x899d1d[_0x2a64a6(0x1ef)])==null?void 0x0:_0x40abde['userID'])!=null?_0x7356cd:_0x899d1d['userId'],'text':JSON[_0x2a64a6(0x197)](_0x899d1d[_0x2a64a6(0x1b7)]),'parentId':_0x55749f['id']});break;}case _0x6617b7['Delete']:{const _0x4ea540=this[_0x2a64a6(0x1ae)][_0x2a64a6(0x1d0)](_0x54a856,_0xbf5e5c,_0x899d1d[_0x2a64a6(0x1e1)]);_0x4ea540&&_0x4ea540[_0x2a64a6(0x1b2)]&&this['_threadCommentModel'][_0x2a64a6(0x223)](_0x54a856,_0xbf5e5c,_0x899d1d[_0x2a64a6(0x1e1)]);break;}case _0x6617b7[_0x2a64a6(0x1e0)]:{this[_0x2a64a6(0x1ae)]['updateComment'](_0x54a856,_0xbf5e5c,{'commentId':_0x899d1d[_0x2a64a6(0x1e1)],'text':JSON[_0x2a64a6(0x197)](_0x899d1d[_0x2a64a6(0x1b7)])});break;}case _0x6617b7['Solve']:{const _0x2c1f27=this[_0x2a64a6(0x1ae)][_0x2a64a6(0x1e5)](_0x54a856,_0x899d1d[_0x2a64a6(0x21e)]);_0x2c1f27&&this[_0x2a64a6(0x1ae)][_0x2a64a6(0x1a9)](_0x54a856,_0xbf5e5c,_0x2c1f27['id'],_0x899d1d[_0x2a64a6(0x218)]===_0x5754f1[_0x2a64a6(0x1c5)]);break;}}}));}};_0x29a3e2=_0x279bfe([_0x299097['OnLifecycle'](_0x299097[_0xcfdc78(0x21b)]['Ready'],_0x29a3e2),_0x2eb7a9(0x0,_0x299097['Inject'](_0x1d92d3[_0xcfdc78(0x21a)])),_0x2eb7a9(0x1,_0x299097[_0xcfdc78(0x1c6)](_0x48b9c5[_0xcfdc78(0x1bc)])),_0x2eb7a9(0x2,_0x299097[_0xcfdc78(0x1c6)](_0x299097[_0xcfdc78(0x1dc)])),_0x2eb7a9(0x3,_0x299097[_0xcfdc78(0x1c6)](_0x299097['Injector']))],_0x29a3e2);const _0xb0c2b2=_0xcfdc78(0x1c0),_0x28b8ac={};var _0xeacdaa=Object['defineProperty'],_0x4aed05=Object[_0xcfdc78(0x1aa)],_0x13746a=(_0x8f6be7,_0x84f6b,_0x4e286b,_0x3d088a)=>{for(var _0x2900cc=_0x3d088a>0x1?void 0x0:_0x3d088a?_0x4aed05(_0x84f6b,_0x4e286b):_0x84f6b,_0x48085e=_0x8f6be7['length']-0x1,_0x21d349;_0x48085e>=0x0;_0x48085e--)(_0x21d349=_0x8f6be7[_0x48085e])&&(_0x2900cc=(_0x3d088a?_0x21d349(_0x84f6b,_0x4e286b,_0x2900cc):_0x21d349(_0x2900cc))||_0x2900cc);return _0x3d088a&&_0x2900cc&&_0xeacdaa(_0x84f6b,_0x4e286b,_0x2900cc),_0x2900cc;},_0x18cbb6=(_0x14fb34,_0xa3cb96)=>(_0x27fdbd,_0x353116)=>_0xa3cb96(_0x27fdbd,_0x353116,_0x14fb34);function _0x515303(_0x322e9f,_0x30812d){const _0x4810c6=_0xcfdc78,_0x5e350e=_0x322e9f['replies'][0x0];return{..._0x30812d,'id':_0x5e350e[_0x4810c6(0x1e1)],'resolved':_0x322e9f[_0x4810c6(0x218)]===0x1,'dT':_0x685b06(_0x5e350e[_0x4810c6(0x196)]),'personId':_0x5e350e['userId'],'threadId':_0x5e350e[_0x4810c6(0x21e)]};}function _0x5e3513(_0x278888,_0x57b7b1,_0x199c0e){const _0x1fe1a2=_0xcfdc78;var _0x27a4b9,_0x437ebc;if(((_0x437ebc=(_0x27a4b9=_0x278888==null?void 0x0:_0x278888['replies'])==null?void 0x0:_0x27a4b9['length'])!=null?_0x437ebc:0x0)>0x0){const _0x39eb07=(_0x53ce0c,_0xe24046)=>({'id':_0x53ce0c[_0x1fe1a2(0x1e1)],'threadId':_0x53ce0c['threadId'],'dT':_0x685b06(_0x53ce0c[_0x1fe1a2(0x196)]),'personId':_0x53ce0c[_0x1fe1a2(0x1b5)],'resolved':_0x278888[_0x1fe1a2(0x218)]===_0x5754f1['Solved'],'unitId':_0x57b7b1,'subUnitId':_0x199c0e,'text':JSON[_0x1fe1a2(0x197)](_0x53ce0c[_0x1fe1a2(0x1b7)]),'parentId':_0xe24046}),_0x50a064=_0x39eb07(_0x278888['replies'][0x0]);return{..._0x50a064,'children':_0x278888[_0x1fe1a2(0x216)][_0x1fe1a2(0x204)](0x1)['map'](_0x16ba06=>_0x39eb07(_0x16ba06,_0x50a064['id']))};}return null;}let _0x1636d9=class{constructor(_0x26f118,_0x295494,_0x553e0d,_0x2fd0a0){const _0x5cc699=_0xcfdc78;this[_0x5cc699(0x214)]=_0x26f118,this[_0x5cc699(0x209)]=_0x295494,this[_0x5cc699(0x193)]=_0x553e0d,this[_0x5cc699(0x1ac)]=_0x2fd0a0;}async['addComment'](_0x599164){const _0x4ca69e=_0xcfdc78;var _0x13663f,_0x419305;const {parentId:_0x1411ed,unitId:_0x3c5a22,text:_0x16d268,threadId:_0x4c1c46}=_0x599164,_0x2b3510=(_0x419305=(_0x13663f=_0x16d268[_0x4ca69e(0x212)])==null?void 0x0:_0x13663f[_0x4ca69e(0x1f3)](_0x4fe12d=>_0x4fe12d[_0x4ca69e(0x210)]===_0x299097[_0x4ca69e(0x1cc)][_0x4ca69e(0x1b3)])[_0x4ca69e(0x1a4)](_0x45ee27=>_0x45ee27['rangeId']))!=null?_0x419305:[],_0x47aefc=JSON[_0x4ca69e(0x20a)](_0x16d268),_0x1ae4a5=(await this[_0x4ca69e(0x193)][_0x4ca69e(0x1d8)](_0x3c5a22))[_0x4ca69e(0x1ee)]();if(_0x1411ed){const _0x115c99={'memberId':_0x1ae4a5,'unitId':_0x3c5a22,'content':_0x47aefc,'mention':_0x2b3510,'threadId':_0x4c1c46},_0x9611b=(await this['_httpService'][_0x4ca69e(0x1f9)](_0x4ca69e(0x211)+_0x3c5a22+'/reply',{'body':_0x115c99}))[_0x4ca69e(0x221)][_0x4ca69e(0x1af)];return{..._0x599164,'id':_0x9611b[_0x4ca69e(0x1e1)],'dT':_0x4f003a(+_0x9611b['createTimestamp'])[_0x4ca69e(0x1ce)](_0x4ca69e(0x1a0)),'personId':_0x9611b['userId']};}else{const _0x5c851a={'memberId':_0x1ae4a5,'unitId':_0x3c5a22,'content':_0x47aefc,'mention':_0x2b3510},_0x486139=await this[_0x4ca69e(0x214)][_0x4ca69e(0x1f9)](_0x4ca69e(0x211)+_0x3c5a22+'/add',{'body':_0x5c851a});return _0x515303(_0x486139[_0x4ca69e(0x221)][_0x4ca69e(0x1de)],_0x599164);}}async['updateComment'](_0x5b0dbb){const _0x31c8be=_0xcfdc78;var _0x4bb3b4,_0x5eeb8d;const {text:_0x47c548,unitId:_0x1984e7}=_0x5b0dbb,_0x579c06=(_0x5eeb8d=(_0x4bb3b4=_0x47c548[_0x31c8be(0x212)])==null?void 0x0:_0x4bb3b4[_0x31c8be(0x1f3)](_0x3cc857=>_0x3cc857[_0x31c8be(0x210)]===_0x299097['CustomRangeType'][_0x31c8be(0x1b3)])[_0x31c8be(0x1a4)](_0x1f73e3=>_0x1f73e3[_0x31c8be(0x1a2)]))!=null?_0x5eeb8d:[],_0x4db430=JSON['stringify'](_0x47c548),_0x51d3c1=_0x5b0dbb['threadId'],_0x1e1d91=_0x5b0dbb['id'],_0x5e36dc={'memberId':(await this[_0x31c8be(0x193)]['requireSession'](_0x1984e7))[_0x31c8be(0x1ee)](),'unitId':_0x1984e7,'threadId':_0x51d3c1,'mention':_0x579c06,'content':_0x4db430,'replyId':_0x1e1d91},_0x4d83b7=await this[_0x31c8be(0x214)][_0x31c8be(0x1f9)](_0x31c8be(0x211)+_0x1984e7+_0x31c8be(0x1f1),{'body':_0x5e36dc});return!_0x4d83b7[_0x31c8be(0x221)][_0x31c8be(0x1d7)]||_0x4d83b7['body'][_0x31c8be(0x1d7)][_0x31c8be(0x195)]===0x1;}async[_0xcfdc78(0x1a9)](_0x494960){const _0x233bfe=_0xcfdc78,{unitId:_0xbabc49}=_0x494960,_0x507ada=_0x494960['threadId'],_0x2c041b={'memberId':this[_0x233bfe(0x209)][_0x233bfe(0x1be)]()[_0x233bfe(0x194)],'unitId':_0xbabc49,'threadId':_0x507ada,'solved':_0x494960[_0x233bfe(0x1f8)]?_0x5754f1[_0x233bfe(0x1c5)]:_0x5754f1['OpenOrReOpen']},_0x225960=await this[_0x233bfe(0x214)][_0x233bfe(0x1f9)](_0x233bfe(0x211)+_0xbabc49+_0x233bfe(0x1f6),{'body':_0x2c041b});return!_0x225960[_0x233bfe(0x221)][_0x233bfe(0x1d7)]||_0x225960[_0x233bfe(0x221)][_0x233bfe(0x1d7)][_0x233bfe(0x195)]===0x1;}async[_0xcfdc78(0x223)](_0x29f659,_0x3ba61b,_0x4af766,_0x23e187){const _0x39bea2=_0xcfdc78,_0x4f8b1d={'memberId':(await this[_0x39bea2(0x193)]['requireSession'](_0x29f659))[_0x39bea2(0x1ee)](),'threadId':_0x4af766,'replyId':_0x23e187,'unitId':_0x29f659},_0x2cb9da=await this[_0x39bea2(0x214)][_0x39bea2(0x1f9)](_0x39bea2(0x211)+_0x29f659+_0x39bea2(0x215),{'body':_0x4f8b1d});return!_0x2cb9da[_0x39bea2(0x221)]['error']||_0x2cb9da['body'][_0x39bea2(0x1d7)]['code']===0x1;}async[_0xcfdc78(0x1d5)](_0x1b9d53,_0x51b8dd,_0x595c0e){const _0x7fab57=_0xcfdc78,_0x504412={'unitId':_0x1b9d53,'threadId':_0x595c0e},_0x26b948=await this['_httpService'][_0x7fab57(0x1f9)](_0x7fab57(0x211)+_0x1b9d53+_0x7fab57(0x1a6),{'body':_0x504412}),_0x5a5c7b=_0x595c0e[_0x7fab57(0x1a4)](_0x55915b=>_0x5e3513(_0x26b948[_0x7fab57(0x221)][_0x7fab57(0x188)][_0x55915b],_0x1b9d53,_0x51b8dd))[_0x7fab57(0x1f3)](Boolean);return Object[_0x7fab57(0x205)](_0x26b948[_0x7fab57(0x221)][_0x7fab57(0x1e6)])[_0x7fab57(0x1bf)](_0x33e7db=>{const _0x3bb26a=_0x7fab57;this[_0x3bb26a(0x209)][_0x3bb26a(0x18d)](_0x33e7db);}),_0x5a5c7b;}[_0xcfdc78(0x201)](_0x2fbe85){const _0x45b067=_0xcfdc78;return{'id':_0x2fbe85['id'],'threadId':_0x2fbe85[_0x45b067(0x21e)],'ref':_0x2fbe85['ref']};}};_0x1636d9=_0x13746a([_0x18cbb6(0x0,_0x299097['Inject'](_0x1d7911['HTTPService'])),_0x18cbb6(0x1,_0x299097[_0xcfdc78(0x1c6)](_0x299097[_0xcfdc78(0x1dc)])),_0x18cbb6(0x2,_0x299097[_0xcfdc78(0x1c6)](_0x1d92d3[_0xcfdc78(0x222)])),_0x18cbb6(0x3,_0x299097[_0xcfdc78(0x1c6)](_0x299097[_0xcfdc78(0x1f4)]))],_0x1636d9);var _0x6bc8a=Object[_0xcfdc78(0x1ed)],_0x22e244=Object['getOwnPropertyDescriptor'],_0x2cb860=(_0x3f8ba7,_0x2e064a,_0x59c341,_0x3a07ef)=>{const _0x470f3d=_0xcfdc78;for(var _0x9ff493=_0x3a07ef>0x1?void 0x0:_0x3a07ef?_0x22e244(_0x2e064a,_0x59c341):_0x2e064a,_0x1555eb=_0x3f8ba7[_0x470f3d(0x19c)]-0x1,_0x58029b;_0x1555eb>=0x0;_0x1555eb--)(_0x58029b=_0x3f8ba7[_0x1555eb])&&(_0x9ff493=(_0x3a07ef?_0x58029b(_0x2e064a,_0x59c341,_0x9ff493):_0x58029b(_0x9ff493))||_0x9ff493);return _0x3a07ef&&_0x9ff493&&_0x6bc8a(_0x2e064a,_0x59c341,_0x9ff493),_0x9ff493;},_0x509ad7=(_0x4e9023,_0x35aa70)=>(_0x40974b,_0x2e6e76)=>_0x35aa70(_0x40974b,_0x2e6e76,_0x4e9023);let _0x2d3fce=class{constructor(_0x4916c5){const _0x1bf3bd=_0xcfdc78;this[_0x1bf3bd(0x214)]=_0x4916c5;}async[_0xcfdc78(0x203)](_0x55e6ed,_0x5f5809,_0x5976ea){const _0x2da9a4=_0xcfdc78,_0x31b02c=new URL(window[_0x2da9a4(0x1e3)][_0x2da9a4(0x189)])[_0x2da9a4(0x1ba)][_0x2da9a4(0x1da)](_0x2da9a4(0x21f));if(!_0x31b02c)return[];const _0x396279=window[_0x2da9a4(0x1e3)][_0x2da9a4(0x1c2)],_0x1ed801=window[_0x2da9a4(0x1e3)][_0x2da9a4(0x1bd)]==='https:'?_0x2da9a4(0x1fd):_0x2da9a4(0x20c);return(await this[_0x2da9a4(0x214)]['get'](_0x1ed801+_0x2da9a4(0x1ec)+_0x396279+_0x2da9a4(0x19d),{'params':{'objectID':_0x31b02c,'unitID':_0x31b02c}}))[_0x2da9a4(0x221)]['collaborators']['map'](_0x19d1d7=>{const _0x18e846=_0x2da9a4;var _0x1a6804,_0x40c1ec,_0x36faf3,_0x2387e1,_0xac7402,_0x3d7f02;return{'id':(_0x40c1ec=(_0x1a6804=_0x19d1d7[_0x18e846(0x1c8)])==null?void 0x0:_0x1a6804[_0x18e846(0x194)])!=null?_0x40c1ec:'','label':(_0x2387e1=(_0x36faf3=_0x19d1d7[_0x18e846(0x1c8)])==null?void 0x0:_0x36faf3['name'])!=null?_0x2387e1:'','icon':(_0x3d7f02=(_0xac7402=_0x19d1d7[_0x18e846(0x1c8)])==null?void 0x0:_0xac7402[_0x18e846(0x1d1)])!=null?_0x3d7f02:'','type':_0x18e846(0x1ef)};});}};_0x2d3fce=_0x2cb860([_0x509ad7(0x0,_0x299097[_0xcfdc78(0x1c6)](_0x1d7911[_0xcfdc78(0x1eb)]))],_0x2d3fce);var _0x277968=Object[_0xcfdc78(0x1ed)],_0x361aec=Object[_0xcfdc78(0x1aa)],_0x593468=(_0x421936,_0x5c46a8,_0x6e8929,_0xb0b34)=>{const _0x3c1747=_0xcfdc78;for(var _0x4aa866=_0xb0b34>0x1?void 0x0:_0xb0b34?_0x361aec(_0x5c46a8,_0x6e8929):_0x5c46a8,_0x3d9b54=_0x421936[_0x3c1747(0x19c)]-0x1,_0x5cc9b2;_0x3d9b54>=0x0;_0x3d9b54--)(_0x5cc9b2=_0x421936[_0x3d9b54])&&(_0x4aa866=(_0xb0b34?_0x5cc9b2(_0x5c46a8,_0x6e8929,_0x4aa866):_0x5cc9b2(_0x4aa866))||_0x4aa866);return _0xb0b34&&_0x4aa866&&_0x277968(_0x5c46a8,_0x6e8929,_0x4aa866),_0x4aa866;},_0x56c8ef=(_0x3b82e0,_0x3d011b)=>(_0x4f86ca,_0x34e599)=>_0x3d011b(_0x4f86ca,_0x34e599,_0x3b82e0);let _0x3ed1c2=class extends _0x299097[_0xcfdc78(0x1e2)]{constructor(_0x272243,_0x14a021,_0x480d86,_0x4e6e2f){const _0x8aef0e=_0xcfdc78;super(),this[_0x8aef0e(0x1fa)]=_0x272243,this[_0x8aef0e(0x18f)]=_0x14a021,this[_0x8aef0e(0x199)]=_0x480d86,this[_0x8aef0e(0x18b)]=_0x4e6e2f,this[_0x8aef0e(0x1c3)]();}[_0xcfdc78(0x1c3)](){const _0x5e725=_0xcfdc78;this[_0x5e725(0x1fa)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1,this['_threadCommentMentionDataService'][_0x5e725(0x1cf)]=this[_0x5e725(0x18b)];}};_0x3ed1c2=_0x593468([_0x299097[_0xcfdc78(0x1b1)](_0x299097[_0xcfdc78(0x21b)]['Starting'],_0x3ed1c2),_0x56c8ef(0x0,_0x48b9c5[_0xcfdc78(0x1b8)]),_0x56c8ef(0x1,_0x299097[_0xcfdc78(0x1c6)](_0x1636d9)),_0x56c8ef(0x2,_0x3e94f5[_0xcfdc78(0x190)]),_0x56c8ef(0x3,_0x299097[_0xcfdc78(0x1c6)](_0x2d3fce))],_0x3ed1c2);var _0x245c5b=Object['defineProperty'],_0x1a5161=Object[_0xcfdc78(0x1aa)],_0x34d169=(_0x9e3e3c,_0x947f81,_0x3a7f60)=>_0x947f81 in _0x9e3e3c?_0x245c5b(_0x9e3e3c,_0x947f81,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3a7f60}):_0x9e3e3c[_0x947f81]=_0x3a7f60,_0x1a909b=(_0x4ac5a1,_0xb9fb96,_0x4386d4,_0x35ed27)=>{for(var _0x535575=_0x35ed27>0x1?void 0x0:_0x35ed27?_0x1a5161(_0xb9fb96,_0x4386d4):_0xb9fb96,_0x32d585=_0x4ac5a1['length']-0x1,_0xe50ede;_0x32d585>=0x0;_0x32d585--)(_0xe50ede=_0x4ac5a1[_0x32d585])&&(_0x535575=(_0x35ed27?_0xe50ede(_0xb9fb96,_0x4386d4,_0x535575):_0xe50ede(_0x535575))||_0x535575);return _0x35ed27&&_0x535575&&_0x245c5b(_0xb9fb96,_0x4386d4,_0x535575),_0x535575;},_0x597c4d=(_0x3d2351,_0x18ff01)=>(_0x20dbd2,_0x15b255)=>_0x18ff01(_0x20dbd2,_0x15b255,_0x3d2351),_0x30bd7a=(_0x509b42,_0x1deca4,_0x3d7992)=>_0x34d169(_0x509b42,typeof _0x1deca4!=_0xcfdc78(0x21d)?_0x1deca4+'':_0x1deca4,_0x3d7992);_0xbfcf46['UniverThreadCommentDataSourcePlugin']=class extends _0x299097['Plugin']{constructor(_0x20176c=_0x28b8ac,_0x58cc79,_0x10c7e8){const _0x39387f=_0xcfdc78;super(),this[_0x39387f(0x1f5)]=_0x20176c,this['_injector']=_0x58cc79,this['_configService']=_0x10c7e8;const {..._0xa0801a}=this[_0x39387f(0x1f5)];this[_0x39387f(0x1f7)][_0x39387f(0x1fe)](_0xb0c2b2,_0xa0801a);}[_0xcfdc78(0x19a)](){[[_0x2d3fce],[_0x1636d9],[_0x3ed1c2],[_0x29a3e2]]['forEach'](_0x5d8c86=>{const _0x5e3f12=_0xcdf0;this['_injector'][_0x5e3f12(0x202)](_0x5d8c86);});}},_0x30bd7a(_0xbfcf46['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x2662d5),_0x30bd7a(_0xbfcf46['UniverThreadCommentDataSourcePlugin'],_0xcfdc78(0x1d6),_0x299097['UniverInstanceType'][_0xcfdc78(0x1ea)]),_0xbfcf46[_0xcfdc78(0x208)]=_0x1a909b([_0x299097[_0xcfdc78(0x1d2)](_0x48b9c5[_0xcfdc78(0x1f0)],_0x3e94f5[_0xcfdc78(0x1f2)],_0x1d92d3['UniverCollaborationClientPlugin'],_0x4bcffa['UniverLicensePlugin']),_0x597c4d(0x1,_0x299097[_0xcfdc78(0x1c6)](_0x299097['Injector'])),_0x597c4d(0x2,_0x299097['IConfigService'])],_0xbfcf46['UniverThreadCommentDataSourcePlugin']),Object[_0xcfdc78(0x1ed)](_0xbfcf46,Symbol[_0xcfdc78(0x192)],{'value':_0xcfdc78(0x20e)});}));
|
|
1
|
+
(function(_0x288a7e,_0x5501ed){const _0x4b4a3e=_0x40bb,_0x1217e1=_0x288a7e();while(!![]){try{const _0xe93405=parseInt(_0x4b4a3e(0x11b))/0x1*(-parseInt(_0x4b4a3e(0x14a))/0x2)+parseInt(_0x4b4a3e(0x123))/0x3*(parseInt(_0x4b4a3e(0x103))/0x4)+-parseInt(_0x4b4a3e(0x152))/0x5*(parseInt(_0x4b4a3e(0x148))/0x6)+-parseInt(_0x4b4a3e(0x139))/0x7*(parseInt(_0x4b4a3e(0xf6))/0x8)+parseInt(_0x4b4a3e(0xf8))/0x9+parseInt(_0x4b4a3e(0x143))/0xa+-parseInt(_0x4b4a3e(0x14b))/0xb;if(_0xe93405===_0x5501ed)break;else _0x1217e1['push'](_0x1217e1['shift']());}catch(_0x1ccc8f){_0x1217e1['push'](_0x1217e1['shift']());}}}(_0x5a0e,0xdecfa),function(_0x2a5592,_0x4842d7){const _0x31b881=_0x40bb;typeof exports=='object'&&typeof module<'u'?_0x4842d7(exports,require(_0x31b881(0x101)),require(_0x31b881(0xf7)),require(_0x31b881(0xe9)),require(_0x31b881(0x10f)),require('@univerjs-pro/license'),require('rxjs'),require(_0x31b881(0xfa)),require('dayjs')):typeof define==_0x31b881(0x142)&&define[_0x31b881(0x13b)]?define([_0x31b881(0x160),'@univerjs/core',_0x31b881(0xf7),_0x31b881(0xe9),'@univerjs-pro/collaboration-client',_0x31b881(0xdf),'rxjs',_0x31b881(0xfa),'dayjs'],_0x4842d7):(_0x2a5592=typeof globalThis<'u'?globalThis:_0x2a5592||self,_0x4842d7(_0x2a5592[_0x31b881(0x13a)]={},_0x2a5592[_0x31b881(0xe4)],_0x2a5592[_0x31b881(0x12a)],_0x2a5592[_0x31b881(0x156)],_0x2a5592['UniverCollaborationClient'],_0x2a5592['UniverLicense'],_0x2a5592[_0x31b881(0x153)],_0x2a5592[_0x31b881(0x131)],_0x2a5592[_0x31b881(0xe1)]));}(this,function(_0x35516d,_0x5884e3,_0x47a0cf,_0x15ba5a,_0x2bc3ee,_0x495ec4,_0xd38334,_0x24a519,_0x445029){'use strict';const _0x114bcf=_0x40bb;const _0x5988b1=_0x114bcf(0xfe);var _0x276e42=(_0x102ddb=>(_0x102ddb[_0x102ddb[_0x114bcf(0xf3)]=0x0]='OpenOrReOpen',_0x102ddb[_0x102ddb[_0x114bcf(0xeb)]=0x1]=_0x114bcf(0xeb),_0x102ddb[_0x102ddb[_0x114bcf(0xea)]=-0x1]=_0x114bcf(0xea),_0x102ddb))(_0x276e42||{}),_0x412447=(_0x578556=>(_0x578556[_0x578556[_0x114bcf(0xdd)]=0x0]=_0x114bcf(0xdd),_0x578556[_0x578556[_0x114bcf(0x138)]=0x1]=_0x114bcf(0x138),_0x578556[_0x578556['Reply']=0x2]=_0x114bcf(0x15d),_0x578556[_0x578556[_0x114bcf(0xf5)]=0x3]='Edit',_0x578556[_0x578556[_0x114bcf(0xfc)]=0x4]=_0x114bcf(0xfc),_0x578556[_0x578556[_0x114bcf(0x15e)]=0x5]=_0x114bcf(0x15e),_0x578556[_0x578556[_0x114bcf(0xea)]=-0x1]='UNRECOGNIZED',_0x578556))(_0x412447||{});const _0x5c1fc0=_0x389f9e=>_0x445029(new Date(+_0x389f9e))[_0x114bcf(0xf1)]('YYYY/MM/DD\x20HH:mm'),_0x10b225=async(_0x23011e,_0x331cb2)=>{const _0x429b3d=_0x114bcf,_0x228159=_0x23011e['get'](_0x5884e3[_0x429b3d(0x109)]),_0x29b7ea=_0x23011e[_0x429b3d(0x10b)](_0x24a519[_0x429b3d(0x114)]);_0x331cb2[_0x429b3d(0x108)](_0x58de7d=>{const _0x3fd0d3=_0x429b3d;_0x228159[_0x3fd0d3(0x128)](_0x58de7d)&&_0x331cb2[_0x3fd0d3(0x12c)](_0x58de7d);}),_0x331cb2[_0x429b3d(0x105)]&&(await _0x29b7ea[_0x429b3d(0x10b)](_0x429b3d(0x133),{'params':{'userIDs':[..._0x331cb2]}}))[_0x429b3d(0x10e)][_0x429b3d(0x147)]['forEach'](_0x5b0b95=>{const _0x3879a4=_0x429b3d;_0x5b0b95&&_0x228159[_0x3879a4(0x115)](_0x5b0b95);});};var _0x21f306=Object[_0x114bcf(0x120)],_0x9c1afd=Object['getOwnPropertyDescriptor'],_0x18d26e=(_0x294375,_0x1e6643,_0x2acdc7,_0x531ec7)=>{for(var _0x16b3aa=_0x531ec7>0x1?void 0x0:_0x531ec7?_0x9c1afd(_0x1e6643,_0x2acdc7):_0x1e6643,_0x4d882d=_0x294375['length']-0x1,_0x3c572b;_0x4d882d>=0x0;_0x4d882d--)(_0x3c572b=_0x294375[_0x4d882d])&&(_0x16b3aa=(_0x531ec7?_0x3c572b(_0x1e6643,_0x2acdc7,_0x16b3aa):_0x3c572b(_0x16b3aa))||_0x16b3aa);return _0x531ec7&&_0x16b3aa&&_0x21f306(_0x1e6643,_0x2acdc7,_0x16b3aa),_0x16b3aa;},_0x126033=(_0x5e48ce,_0x2f0c6e)=>(_0x4f7ad2,_0x24ced8)=>_0x2f0c6e(_0x4f7ad2,_0x24ced8,_0x5e48ce);let _0x46ff54=class extends _0x5884e3[_0x114bcf(0x119)]{constructor(_0x20bd27,_0x44c580,_0x459861,_0x2b190d){const _0x11de71=_0x114bcf;super(),this[_0x11de71(0x157)]=_0x20bd27,this[_0x11de71(0xe7)]=_0x44c580,this['_userService']=_0x459861,this[_0x11de71(0x100)]=_0x2b190d,this[_0x11de71(0xf2)](),this['_initUserSync']();}['_initUserSync'](){const _0x546468=_0x114bcf;this[_0x546468(0x14d)](this[_0x546468(0xe7)][_0x546468(0x15f)][_0x546468(0x121)](_0xd38334[_0x546468(0x13f)](0x10))[_0x546468(0xf4)](_0x5eeabe=>{const _0x461852=_0x546468,_0xb3f17=new Set();_0x5eeabe[_0x461852(0x108)](_0x13f5b0=>{const _0x499ae0=_0x461852;switch(_0x13f5b0['type']){case _0x499ae0(0x146):{const _0x5d57bb=_0x13f5b0['payload'][_0x499ae0(0xe6)];_0xb3f17[_0x499ae0(0x146)](_0x5d57bb);break;}}}),_0x10b225(this['_injector'],_0xb3f17);}));}[_0x114bcf(0xf2)](){const _0x589cf2=_0x114bcf;this[_0x589cf2(0x14d)](this[_0x589cf2(0x157)][_0x589cf2(0x15f)][_0x589cf2(0xf4)](async _0x93c008=>{const _0xecd3f9=_0x589cf2;var _0xb2d297,_0xca670e;const _0x19afe5=this[_0xecd3f9(0xe7)][_0xecd3f9(0x137)](_0x93c008[_0xecd3f9(0x102)],_0x93c008[_0xecd3f9(0x151)]);if(!_0x19afe5)return;const {unitId:_0x508487,subUnitId:_0x3e4898}=_0x19afe5;switch(_0x93c008[_0xecd3f9(0x150)]&&this[_0xecd3f9(0xd6)][_0xecd3f9(0x115)](_0x93c008[_0xecd3f9(0x150)]),_0x93c008[_0xecd3f9(0x111)]){case _0x412447[_0xecd3f9(0x138)]:break;case _0x412447[_0xecd3f9(0x15d)]:{this[_0xecd3f9(0xe7)][_0xecd3f9(0x12e)](_0x508487,_0x3e4898,{'unitId':_0x508487,'subUnitId':_0x3e4898,'ref':'','id':_0x93c008[_0xecd3f9(0xe0)],'dT':_0x5c1fc0(+_0x93c008[_0xecd3f9(0x140)]),'threadId':_0x93c008[_0xecd3f9(0x151)],'personId':(_0xca670e=(_0xb2d297=_0x93c008['user'])==null?void 0x0:_0xb2d297[_0xecd3f9(0xfd)])!=null?_0xca670e:_0x93c008[_0xecd3f9(0x118)],'text':JSON['parse'](_0x93c008['content']),'parentId':_0x19afe5['id']});break;}case _0x412447[_0xecd3f9(0xfc)]:{const _0x9adc1=this[_0xecd3f9(0xe7)]['getComment'](_0x508487,_0x3e4898,_0x93c008[_0xecd3f9(0xe0)]);_0x9adc1&&_0x9adc1['parentId']&&this['_threadCommentModel']['deleteComment'](_0x508487,_0x3e4898,_0x93c008['replyId']);break;}case _0x412447['Edit']:{this[_0xecd3f9(0xe7)][_0xecd3f9(0x126)](_0x508487,_0x3e4898,{'commentId':_0x93c008[_0xecd3f9(0xe0)],'text':JSON[_0xecd3f9(0x15c)](_0x93c008['content'])});break;}case _0x412447[_0xecd3f9(0x15e)]:{const _0x5145eb=this['_threadCommentModel'][_0xecd3f9(0x137)](_0x508487,_0x93c008[_0xecd3f9(0x151)]);_0x5145eb&&this['_threadCommentModel']['resolveComment'](_0x508487,_0x3e4898,_0x5145eb['id'],_0x93c008[_0xecd3f9(0x11c)]===_0x276e42[_0xecd3f9(0xeb)]);break;}}}));}};_0x46ff54=_0x18d26e([_0x5884e3['OnLifecycle'](_0x5884e3['LifecycleStages']['Ready'],_0x46ff54),_0x126033(0x0,_0x5884e3[_0x114bcf(0x14e)](_0x2bc3ee[_0x114bcf(0x104)])),_0x126033(0x1,_0x5884e3[_0x114bcf(0x14e)](_0x47a0cf['ThreadCommentModel'])),_0x126033(0x2,_0x5884e3[_0x114bcf(0x14e)](_0x5884e3['UserManagerService'])),_0x126033(0x3,_0x5884e3[_0x114bcf(0x14e)](_0x5884e3['Injector']))],_0x46ff54);const _0x1bba56=_0x114bcf(0xf9),_0x17d309={};var _0x733f52=Object[_0x114bcf(0x120)],_0x570663=Object[_0x114bcf(0x12f)],_0x154237=(_0x266f42,_0x139424,_0x4aeeb1,_0x18a411)=>{const _0x534464=_0x114bcf;for(var _0x757265=_0x18a411>0x1?void 0x0:_0x18a411?_0x570663(_0x139424,_0x4aeeb1):_0x139424,_0x4f9449=_0x266f42[_0x534464(0x10a)]-0x1,_0x4751a4;_0x4f9449>=0x0;_0x4f9449--)(_0x4751a4=_0x266f42[_0x4f9449])&&(_0x757265=(_0x18a411?_0x4751a4(_0x139424,_0x4aeeb1,_0x757265):_0x4751a4(_0x757265))||_0x757265);return _0x18a411&&_0x757265&&_0x733f52(_0x139424,_0x4aeeb1,_0x757265),_0x757265;},_0x1c8759=(_0x3e6ee9,_0x44eadd)=>(_0x34ac4e,_0x3b8616)=>_0x44eadd(_0x34ac4e,_0x3b8616,_0x3e6ee9);function _0x25b9a(_0x1bce2e,_0xdc1321){const _0xf5c29b=_0x114bcf,_0x2c91de=_0x1bce2e[_0xf5c29b(0xee)][0x0];return{..._0xdc1321,'id':_0x2c91de[_0xf5c29b(0xe0)],'resolved':_0x1bce2e[_0xf5c29b(0x11c)]===0x1,'dT':_0x5c1fc0(_0x2c91de[_0xf5c29b(0x140)]),'personId':_0x2c91de[_0xf5c29b(0x118)],'threadId':_0x2c91de['threadId']};}function _0x1146aa(_0x1277e7,_0x1de0fe,_0x14570a){const _0x212ab1=_0x114bcf;var _0x1a906f,_0xbb33b5;if(((_0xbb33b5=(_0x1a906f=_0x1277e7==null?void 0x0:_0x1277e7[_0x212ab1(0xee)])==null?void 0x0:_0x1a906f['length'])!=null?_0xbb33b5:0x0)>0x0){const _0x2a2b4a=(_0x117050,_0x576855)=>({'id':_0x117050[_0x212ab1(0xe0)],'threadId':_0x117050[_0x212ab1(0x151)],'dT':_0x5c1fc0(_0x117050[_0x212ab1(0x140)]),'personId':_0x117050[_0x212ab1(0x118)],'resolved':_0x1277e7[_0x212ab1(0x11c)]===_0x276e42[_0x212ab1(0xeb)],'unitId':_0x1de0fe,'subUnitId':_0x14570a,'text':JSON[_0x212ab1(0x15c)](_0x117050['content']),'parentId':_0x576855}),_0x5be2d5=_0x2a2b4a(_0x1277e7[_0x212ab1(0xee)][0x0]);return{..._0x5be2d5,'children':_0x1277e7[_0x212ab1(0xee)][_0x212ab1(0x158)](0x1)['map'](_0x500aff=>_0x2a2b4a(_0x500aff,_0x5be2d5['id']))};}return null;}let _0x5c3061=class{constructor(_0x15b146,_0x333ebf,_0x26f889,_0x38adbf){const _0xb62f87=_0x114bcf;this['_httpService']=_0x15b146,this[_0xb62f87(0xd6)]=_0x333ebf,this[_0xb62f87(0xec)]=_0x26f889,this[_0xb62f87(0x100)]=_0x38adbf;}async['addComment'](_0x39a4e1){const _0x4bb2b1=_0x114bcf;var _0x27fb88,_0xcd5bce;const {parentId:_0x4aa864,unitId:_0x18bdb1,text:_0x43d7ab,threadId:_0x575f6c}=_0x39a4e1,_0x2ac051=(_0xcd5bce=(_0x27fb88=_0x43d7ab['customRanges'])==null?void 0x0:_0x27fb88[_0x4bb2b1(0x13c)](_0x310d73=>_0x310d73[_0x4bb2b1(0x10c)]===_0x5884e3[_0x4bb2b1(0x136)][_0x4bb2b1(0x141)])[_0x4bb2b1(0xde)](_0x4a621a=>_0x4a621a['rangeId']))!=null?_0xcd5bce:[],_0x4cec31=JSON[_0x4bb2b1(0xe3)](_0x43d7ab),_0x24a50b=(await this['_sessionService']['requireSession'](_0x18bdb1))[_0x4bb2b1(0x159)]();if(_0x4aa864){const _0x5a7396={'memberId':_0x24a50b,'unitId':_0x18bdb1,'content':_0x4cec31,'mention':_0x2ac051,'threadId':_0x575f6c},_0x3648db=(await this[_0x4bb2b1(0x144)][_0x4bb2b1(0x13d)](_0x4bb2b1(0x14f)+_0x18bdb1+'/reply',{'body':_0x5a7396}))['body'][_0x4bb2b1(0xda)];return{..._0x39a4e1,'id':_0x3648db[_0x4bb2b1(0xe0)],'dT':_0x445029(+_0x3648db[_0x4bb2b1(0x140)])[_0x4bb2b1(0xf1)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3648db[_0x4bb2b1(0x118)]};}else{const _0x54d67e={'memberId':_0x24a50b,'unitId':_0x18bdb1,'content':_0x4cec31,'mention':_0x2ac051},_0x52e53c=await this['_httpService'][_0x4bb2b1(0x13d)](_0x4bb2b1(0x14f)+_0x18bdb1+_0x4bb2b1(0x10d),{'body':_0x54d67e});return _0x25b9a(_0x52e53c[_0x4bb2b1(0x10e)]['comment'],_0x39a4e1);}}async[_0x114bcf(0x126)](_0xd01299){const _0x20416d=_0x114bcf;var _0xe86cd6,_0x29c86b;const {text:_0x19100a,unitId:_0x20697b}=_0xd01299,_0x5a9160=(_0x29c86b=(_0xe86cd6=_0x19100a['customRanges'])==null?void 0x0:_0xe86cd6['filter'](_0x4d0805=>_0x4d0805[_0x20416d(0x10c)]===_0x5884e3[_0x20416d(0x136)][_0x20416d(0x141)])[_0x20416d(0xde)](_0x4ffa2c=>_0x4ffa2c[_0x20416d(0x129)]))!=null?_0x29c86b:[],_0x19d688=JSON[_0x20416d(0xe3)](_0x19100a),_0x36f4a5=_0xd01299['threadId'],_0x5d66a1=_0xd01299['id'],_0x5ca41e={'memberId':(await this[_0x20416d(0xec)][_0x20416d(0x135)](_0x20697b))[_0x20416d(0x159)](),'unitId':_0x20697b,'threadId':_0x36f4a5,'mention':_0x5a9160,'content':_0x19d688,'replyId':_0x5d66a1},_0x208727=await this[_0x20416d(0x144)]['post']('/universer-api/comment/unit/'+_0x20697b+'/edit',{'body':_0x5ca41e});return!_0x208727[_0x20416d(0x10e)][_0x20416d(0x132)]||_0x208727[_0x20416d(0x10e)][_0x20416d(0x132)][_0x20416d(0x11f)]===0x1;}async[_0x114bcf(0x124)](_0x21833a){const _0x52ae3e=_0x114bcf,{unitId:_0x3a6809}=_0x21833a,_0x1c1cd3=_0x21833a[_0x52ae3e(0x151)],_0x248e0d={'memberId':this[_0x52ae3e(0xd6)]['getCurrentUser']()[_0x52ae3e(0xfd)],'unitId':_0x3a6809,'threadId':_0x1c1cd3,'solved':_0x21833a[_0x52ae3e(0x113)]?_0x276e42[_0x52ae3e(0xeb)]:_0x276e42[_0x52ae3e(0xf3)]},_0x8d7eee=await this[_0x52ae3e(0x144)][_0x52ae3e(0x13d)](_0x52ae3e(0x14f)+_0x3a6809+_0x52ae3e(0x155),{'body':_0x248e0d});return!_0x8d7eee[_0x52ae3e(0x10e)][_0x52ae3e(0x132)]||_0x8d7eee[_0x52ae3e(0x10e)][_0x52ae3e(0x132)][_0x52ae3e(0x11f)]===0x1;}async['deleteComment'](_0x2d0447,_0x1a10ad,_0x30a71e,_0x3895f2){const _0x202581=_0x114bcf,_0x199bbb={'memberId':(await this[_0x202581(0xec)][_0x202581(0x135)](_0x2d0447))[_0x202581(0x159)](),'threadId':_0x30a71e,'replyId':_0x3895f2,'unitId':_0x2d0447},_0x26df8f=await this[_0x202581(0x144)]['post'](_0x202581(0x14f)+_0x2d0447+_0x202581(0xd7),{'body':_0x199bbb});return!_0x26df8f[_0x202581(0x10e)]['error']||_0x26df8f['body']['error'][_0x202581(0x11f)]===0x1;}async[_0x114bcf(0x11d)](_0x341d6e,_0x26943b,_0x1ec63b){const _0x50d997=_0x114bcf,_0x18c92d={'unitId':_0x341d6e,'threadId':_0x1ec63b},_0x2c11e0=await this[_0x50d997(0x144)][_0x50d997(0x13d)](_0x50d997(0x14f)+_0x341d6e+_0x50d997(0xff),{'body':_0x18c92d}),_0x16ca65=_0x1ec63b[_0x50d997(0xde)](_0x34bad2=>_0x1146aa(_0x2c11e0[_0x50d997(0x10e)]['comments'][_0x34bad2],_0x341d6e,_0x26943b))[_0x50d997(0x13c)](Boolean);return Object[_0x50d997(0xe2)](_0x2c11e0[_0x50d997(0x10e)][_0x50d997(0x147)])['forEach'](_0x49c747=>{this['_userService']['addUser'](_0x49c747);}),_0x16ca65;}['saveCommentToSnapshot'](_0x496002){const _0x3e37d5=_0x114bcf;return{'id':_0x496002['id'],'threadId':_0x496002[_0x3e37d5(0x151)],'ref':_0x496002['ref']};}};_0x5c3061=_0x154237([_0x1c8759(0x0,_0x5884e3['Inject'](_0x24a519[_0x114bcf(0x114)])),_0x1c8759(0x1,_0x5884e3['Inject'](_0x5884e3[_0x114bcf(0x109)])),_0x1c8759(0x2,_0x5884e3[_0x114bcf(0x14e)](_0x2bc3ee[_0x114bcf(0x106)])),_0x1c8759(0x3,_0x5884e3[_0x114bcf(0x14e)](_0x5884e3['Injector']))],_0x5c3061);var _0x3d57ea=Object[_0x114bcf(0x120)],_0x43e2a3=Object[_0x114bcf(0x12f)],_0x2b00a3=(_0x29fc9f,_0x391d97,_0x274509,_0x3087de)=>{const _0x56f680=_0x114bcf;for(var _0x4d22a9=_0x3087de>0x1?void 0x0:_0x3087de?_0x43e2a3(_0x391d97,_0x274509):_0x391d97,_0x3373b3=_0x29fc9f[_0x56f680(0x10a)]-0x1,_0x13065c;_0x3373b3>=0x0;_0x3373b3--)(_0x13065c=_0x29fc9f[_0x3373b3])&&(_0x4d22a9=(_0x3087de?_0x13065c(_0x391d97,_0x274509,_0x4d22a9):_0x13065c(_0x4d22a9))||_0x4d22a9);return _0x3087de&&_0x4d22a9&&_0x3d57ea(_0x391d97,_0x274509,_0x4d22a9),_0x4d22a9;},_0x3583dd=(_0x30faaf,_0x520d90)=>(_0x12f3f0,_0x41bd3e)=>_0x520d90(_0x12f3f0,_0x41bd3e,_0x30faaf);let _0x1aaf47=class{constructor(_0x3ffccd){const _0x571559=_0x114bcf;this[_0x571559(0x144)]=_0x3ffccd;}async[_0x114bcf(0x12d)](_0x5b5cda,_0x299006,_0x2a8577){const _0x420b0f=_0x114bcf,_0x2ce15b=new URL(window['location'][_0x420b0f(0xd8)])[_0x420b0f(0xed)][_0x420b0f(0x10b)](_0x420b0f(0xf0));if(!_0x2ce15b)return[];const _0x1c4bc3=window[_0x420b0f(0xef)]['host'],_0x4e0b74=window['location'][_0x420b0f(0x117)]==='https:'?_0x420b0f(0x15a):'http';return(await this[_0x420b0f(0x144)][_0x420b0f(0x10b)](_0x4e0b74+'://'+_0x1c4bc3+'/universer-api/authz/collaborator',{'params':{'objectID':_0x2ce15b,'unitID':_0x2ce15b}}))[_0x420b0f(0x10e)][_0x420b0f(0xd9)]['map'](_0xd2a571=>{const _0x3481c2=_0x420b0f;var _0x35e145,_0x586e2f,_0x57ef87,_0x2c36fa,_0x570aed,_0x43b41b;return{'id':(_0x586e2f=(_0x35e145=_0xd2a571['subject'])==null?void 0x0:_0x35e145[_0x3481c2(0xfd)])!=null?_0x586e2f:'','label':(_0x2c36fa=(_0x57ef87=_0xd2a571['subject'])==null?void 0x0:_0x57ef87['name'])!=null?_0x2c36fa:'','icon':(_0x43b41b=(_0x570aed=_0xd2a571[_0x3481c2(0x107)])==null?void 0x0:_0x570aed[_0x3481c2(0x145)])!=null?_0x43b41b:'','type':'user'};});}};_0x1aaf47=_0x2b00a3([_0x3583dd(0x0,_0x5884e3[_0x114bcf(0x14e)](_0x24a519[_0x114bcf(0x114)]))],_0x1aaf47);var _0x59fa9f=Object[_0x114bcf(0x120)],_0x4e9b2b=Object['getOwnPropertyDescriptor'],_0x40f374=(_0xaad572,_0x253d30,_0x1bfc33,_0x3ffc16)=>{for(var _0x170acd=_0x3ffc16>0x1?void 0x0:_0x3ffc16?_0x4e9b2b(_0x253d30,_0x1bfc33):_0x253d30,_0x5a52f3=_0xaad572['length']-0x1,_0x488c94;_0x5a52f3>=0x0;_0x5a52f3--)(_0x488c94=_0xaad572[_0x5a52f3])&&(_0x170acd=(_0x3ffc16?_0x488c94(_0x253d30,_0x1bfc33,_0x170acd):_0x488c94(_0x170acd))||_0x170acd);return _0x3ffc16&&_0x170acd&&_0x59fa9f(_0x253d30,_0x1bfc33,_0x170acd),_0x170acd;},_0x449da5=(_0x226472,_0x9cce0)=>(_0x344e67,_0x28c026)=>_0x9cce0(_0x344e67,_0x28c026,_0x226472);let _0x3753c3=class extends _0x5884e3['Disposable']{constructor(_0x524067,_0x125d89,_0x1bb667,_0x3ae650){const _0x17ba00=_0x114bcf;super(),this[_0x17ba00(0xd4)]=_0x524067,this[_0x17ba00(0x112)]=_0x125d89,this[_0x17ba00(0xdc)]=_0x1bb667,this[_0x17ba00(0x11e)]=_0x3ae650,this[_0x17ba00(0x134)]();}['_initDataSource'](){const _0x53951b=_0x114bcf;this[_0x53951b(0xd4)][_0x53951b(0x130)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x53951b(0x110)]=!0x1,this[_0x53951b(0xdc)]['dataSource']=this[_0x53951b(0x11e)];}};_0x3753c3=_0x40f374([_0x5884e3[_0x114bcf(0x154)](_0x5884e3[_0x114bcf(0xd5)][_0x114bcf(0x116)],_0x3753c3),_0x449da5(0x0,_0x47a0cf['IThreadCommentDataSourceService']),_0x449da5(0x1,_0x5884e3[_0x114bcf(0x14e)](_0x5c3061)),_0x449da5(0x2,_0x15ba5a['IThreadCommentMentionDataService']),_0x449da5(0x3,_0x5884e3[_0x114bcf(0x14e)](_0x1aaf47))],_0x3753c3);var _0x26977c=Object['defineProperty'],_0x128639=Object[_0x114bcf(0x12f)],_0x1f0701=(_0xea266f,_0x372354,_0x40928d)=>_0x372354 in _0xea266f?_0x26977c(_0xea266f,_0x372354,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40928d}):_0xea266f[_0x372354]=_0x40928d,_0x295eba=(_0x2bc59d,_0x5a8588,_0x472865,_0x1ad5f6)=>{const _0x2de826=_0x114bcf;for(var _0x19557e=_0x1ad5f6>0x1?void 0x0:_0x1ad5f6?_0x128639(_0x5a8588,_0x472865):_0x5a8588,_0x416fb6=_0x2bc59d[_0x2de826(0x10a)]-0x1,_0x30127c;_0x416fb6>=0x0;_0x416fb6--)(_0x30127c=_0x2bc59d[_0x416fb6])&&(_0x19557e=(_0x1ad5f6?_0x30127c(_0x5a8588,_0x472865,_0x19557e):_0x30127c(_0x19557e))||_0x19557e);return _0x1ad5f6&&_0x19557e&&_0x26977c(_0x5a8588,_0x472865,_0x19557e),_0x19557e;},_0xfa89e1=(_0x3fb52e,_0xb3eaea)=>(_0xdb5f9c,_0x26dfe8)=>_0xb3eaea(_0xdb5f9c,_0x26dfe8,_0x3fb52e),_0x3898c8=(_0x3f5c1e,_0x150753,_0x148d4e)=>_0x1f0701(_0x3f5c1e,typeof _0x150753!=_0x114bcf(0x127)?_0x150753+'':_0x150753,_0x148d4e);_0x35516d[_0x114bcf(0xe8)]=class extends _0x5884e3[_0x114bcf(0x11a)]{constructor(_0x58938a=_0x17d309,_0xc31a52,_0x1c525d){const _0x5ed7c4=_0x114bcf;super(),this[_0x5ed7c4(0x122)]=_0x58938a,this[_0x5ed7c4(0x100)]=_0xc31a52,this[_0x5ed7c4(0xe5)]=_0x1c525d;const {..._0x390ccc}=this[_0x5ed7c4(0x122)];this[_0x5ed7c4(0xe5)][_0x5ed7c4(0xdb)](_0x1bba56,_0x390ccc);}[_0x114bcf(0x12b)](){[[_0x1aaf47],[_0x5c3061],[_0x3753c3],[_0x46ff54]]['forEach'](_0x5dc545=>{const _0x401c8d=_0x40bb;this['_injector'][_0x401c8d(0x146)](_0x5dc545);});}},_0x3898c8(_0x35516d[_0x114bcf(0xe8)],_0x114bcf(0x14c),_0x5988b1),_0x3898c8(_0x35516d[_0x114bcf(0xe8)],_0x114bcf(0x111),_0x5884e3['UniverInstanceType']['UNIVER_UNKNOWN']),_0x35516d['UniverThreadCommentDataSourcePlugin']=_0x295eba([_0x5884e3[_0x114bcf(0xfb)](_0x47a0cf['UniverThreadCommentPlugin'],_0x15ba5a['UniverThreadCommentUIPlugin'],_0x2bc3ee[_0x114bcf(0x15b)],_0x495ec4['UniverLicensePlugin']),_0xfa89e1(0x1,_0x5884e3['Inject'](_0x5884e3[_0x114bcf(0x125)])),_0xfa89e1(0x2,_0x5884e3[_0x114bcf(0x13e)])],_0x35516d['UniverThreadCommentDataSourcePlugin']),Object[_0x114bcf(0x120)](_0x35516d,Symbol[_0x114bcf(0x149)],{'value':'Module'});}));function _0x40bb(_0x253cda,_0x4518e1){const _0x5a0e31=_0x5a0e();return _0x40bb=function(_0x40bbb3,_0x466322){_0x40bbb3=_0x40bbb3-0xd4;let _0x4731b3=_0x5a0e31[_0x40bbb3];return _0x4731b3;},_0x40bb(_0x253cda,_0x4518e1);}function _0x5a0e(){const _0x128344=['Edit','16WhqLsz','@univerjs/thread-comment','1823319vlNvgm','thread-comment-data-source.config','@univerjs/network','DependentOn','Delete','userID','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/list','_injector','@univerjs/core','unitId','4964644hpITLq','CommentService','size','CollaborationSessionService','subject','forEach','UserManagerService','length','get','rangeType','/add','body','@univerjs-pro/collaboration-client','syncUpdateMutationToColla','type','_threadCommentDataSource','resolved','HTTPService','addUser','Starting','protocol','userId','Disposable','Plugin','770407FGcvgq','solved','listComments','_threadCommentMentionDataSource','code','defineProperty','pipe','_config','3eYdNwd','resolveComment','Injector','updateComment','symbol','getUser','rangeId','UniverThreadComment','onStarting','delete','getMentions','addComment','getOwnPropertyDescriptor','dataSource','UniverNetwork','error','/universer-api/user/list','_initDataSource','requireSession','CustomRangeType','getThread','Add','3393467OkRuTQ','UniverThreadCommentDatasource','amd','filter','post','IConfigService','bufferTime','createTimestamp','COMMENT','function','15960210WfbBRJ','_httpService','avatar','add','users','6kWNOMd','toStringTag','2BhWyOg','3769689jGGblY','pluginName','disposeWithMe','Inject','/universer-api/comment/unit/','user','threadId','222355LrsvnC','rxjs','OnLifecycle','/solved','UniverThreadCommentUi','_commentService','slice','getMemberID','https','UniverCollaborationClientPlugin','parse','Reply','Solve','commentUpdate$','exports','_threadCommentDataSourceService','LifecycleStages','_userService','/delete','href','collaborators','reply','setConfig','_threadCommentMentionDataService','Unknown','map','@univerjs-pro/license','replyId','dayjs','values','stringify','UniverCore','_configService','personId','_threadCommentModel','UniverThreadCommentDataSourcePlugin','@univerjs/thread-comment-ui','UNRECOGNIZED','Solved','_sessionService','searchParams','replies','location','unit','format','_init','OpenOrReOpen','subscribe'];_0x5a0e=function(){return _0x128344;};return _0x5a0e();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.3.0-alpha.
|
|
3
|
+
"version": "0.3.0-alpha.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,31 +45,31 @@
|
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"dayjs": ">=1.11.0",
|
|
47
47
|
"rxjs": ">=7.0.0",
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.3.0-alpha.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment": "0.3.0-alpha.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.3.0-alpha.1",
|
|
49
|
+
"@univerjs-pro/license": "0.3.0-alpha.1",
|
|
50
|
+
"@univerjs/network": "0.3.0-alpha.1",
|
|
51
|
+
"@univerjs/core": "0.3.0-alpha.1",
|
|
52
|
+
"@univerjs/thread-comment": "0.3.0-alpha.1",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.3.0-alpha.1"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"dayjs": "^1.11.13",
|
|
57
|
-
"@univerjs-pro/collaboration-client": "0.3.0-alpha.
|
|
58
|
-
"@univerjs-pro/
|
|
59
|
-
"@univerjs/
|
|
60
|
-
"@univerjs
|
|
61
|
-
"@univerjs/network": "0.3.0-alpha.0",
|
|
62
|
-
"@univerjs/thread-comment": "0.3.0-alpha.0",
|
|
57
|
+
"@univerjs-pro/collaboration-client": "0.3.0-alpha.1",
|
|
58
|
+
"@univerjs-pro/license": "0.3.0-alpha.1",
|
|
59
|
+
"@univerjs-pro/facade": "0.3.0-alpha.1",
|
|
60
|
+
"@univerjs/network": "0.3.0-alpha.1",
|
|
63
61
|
"@univerjs/protocol": "0.1.39-alpha.22",
|
|
64
|
-
"@univerjs/
|
|
65
|
-
"@univerjs/
|
|
62
|
+
"@univerjs/core": "0.3.0-alpha.1",
|
|
63
|
+
"@univerjs/thread-comment": "0.3.0-alpha.1",
|
|
64
|
+
"@univerjs/thread-comment-ui": "0.3.0-alpha.1",
|
|
65
|
+
"@univerjs/uniscript": "0.3.0-alpha.1"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"rxjs": "^7.8.1",
|
|
69
69
|
"typescript": "^5.6.2",
|
|
70
70
|
"vite": "^5.4.8",
|
|
71
71
|
"vitest": "^2.1.1",
|
|
72
|
-
"@univerjs-infra/shared": "0.3.0-alpha.
|
|
72
|
+
"@univerjs-infra/shared": "0.3.0-alpha.1"
|
|
73
73
|
},
|
|
74
74
|
"univerSpace": {
|
|
75
75
|
".": {
|