@univerjs-pro/thread-comment-datasource 0.2.15 → 0.3.0-alpha.0

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 CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x536ebc=_0x59a4;(function(_0x350a04,_0x4838c4){const _0x1dbccc=_0x59a4,_0x4cf48f=_0x350a04();while(!![]){try{const _0x502143=parseInt(_0x1dbccc(0x1ed))/0x1*(parseInt(_0x1dbccc(0x20f))/0x2)+parseInt(_0x1dbccc(0x260))/0x3*(parseInt(_0x1dbccc(0x20c))/0x4)+-parseInt(_0x1dbccc(0x246))/0x5+-parseInt(_0x1dbccc(0x235))/0x6*(parseInt(_0x1dbccc(0x251))/0x7)+parseInt(_0x1dbccc(0x26d))/0x8*(-parseInt(_0x1dbccc(0x269))/0x9)+parseInt(_0x1dbccc(0x25b))/0xa+parseInt(_0x1dbccc(0x25c))/0xb*(parseInt(_0x1dbccc(0x21e))/0xc);if(_0x502143===_0x4838c4)break;else _0x4cf48f['push'](_0x4cf48f['shift']());}catch(_0x1f5428){_0x4cf48f['push'](_0x4cf48f['shift']());}}}(_0x5035,0x36516));Object['defineProperty'](exports,Symbol[_0x536ebc(0x23a)],{'value':_0x536ebc(0x259)});const c=require('@univerjs/core'),g=require(_0x536ebc(0x230)),N=require('@univerjs/thread-comment-ui'),y=require('@univerjs-pro/collaboration-client'),O=require(_0x536ebc(0x1fb)),$=require(_0x536ebc(0x20b)),E=require(_0x536ebc(0x22d)),q=_0x536ebc(0x211);var p=(_0x50afc6=>(_0x50afc6[_0x50afc6[_0x536ebc(0x226)]=0x0]='OpenOrReOpen',_0x50afc6[_0x50afc6[_0x536ebc(0x247)]=0x1]=_0x536ebc(0x247),_0x50afc6[_0x50afc6[_0x536ebc(0x25d)]=-0x1]=_0x536ebc(0x25d),_0x50afc6))(p||{}),v=(_0x54be3a=>(_0x54be3a[_0x54be3a[_0x536ebc(0x233)]=0x0]=_0x536ebc(0x233),_0x54be3a[_0x54be3a[_0x536ebc(0x1ff)]=0x1]='Add',_0x54be3a[_0x54be3a['Reply']=0x2]=_0x536ebc(0x20a),_0x54be3a[_0x54be3a[_0x536ebc(0x262)]=0x3]=_0x536ebc(0x262),_0x54be3a[_0x54be3a[_0x536ebc(0x270)]=0x4]=_0x536ebc(0x270),_0x54be3a[_0x54be3a[_0x536ebc(0x200)]=0x5]=_0x536ebc(0x200),_0x54be3a[_0x54be3a[_0x536ebc(0x25d)]=-0x1]=_0x536ebc(0x25d),_0x54be3a))(v||{});const P=_0x25d8e4=>$(new Date(+_0x25d8e4))[_0x536ebc(0x238)](_0x536ebc(0x237)),x=async(_0x5ecd41,_0x4e67f8)=>{const _0x181eab=_0x536ebc,_0x228d36=_0x5ecd41[_0x181eab(0x1f5)](c['UserManagerService']),_0x45f6ac=_0x5ecd41[_0x181eab(0x1f5)](O[_0x181eab(0x23c)]);_0x4e67f8[_0x181eab(0x24b)](_0x276e60=>{const _0x2b2009=_0x181eab;_0x228d36[_0x2b2009(0x218)](_0x276e60)&&_0x4e67f8[_0x2b2009(0x26e)](_0x276e60);}),_0x4e67f8['size']&&(await _0x45f6ac[_0x181eab(0x1f5)](_0x181eab(0x263),{'params':{'userIDs':[..._0x4e67f8]}}))[_0x181eab(0x206)]['users'][_0x181eab(0x24b)](_0x54aa91=>{_0x54aa91&&_0x228d36['addUser'](_0x54aa91);});};var Y=Object['defineProperty'],G=Object[_0x536ebc(0x1e6)],H=(_0x502a3b,_0x59388c,_0x19248b,_0x46e96b)=>{const _0x5894fa=_0x536ebc;for(var _0x2c47f5=_0x46e96b>0x1?void 0x0:_0x46e96b?G(_0x59388c,_0x19248b):_0x59388c,_0x95ff48=_0x502a3b[_0x5894fa(0x216)]-0x1,_0x430ec3;_0x95ff48>=0x0;_0x95ff48--)(_0x430ec3=_0x502a3b[_0x95ff48])&&(_0x2c47f5=(_0x46e96b?_0x430ec3(_0x59388c,_0x19248b,_0x2c47f5):_0x430ec3(_0x2c47f5))||_0x2c47f5);return _0x46e96b&&_0x2c47f5&&Y(_0x59388c,_0x19248b,_0x2c47f5),_0x2c47f5;},I=(_0x306af0,_0x5a2db4)=>(_0x17863d,_0x50ff6c)=>_0x5a2db4(_0x17863d,_0x50ff6c,_0x306af0);function L(_0xee56d4,_0x148655){const _0x13e410=_0x536ebc,_0x5e3efe=_0xee56d4['replies'][0x0];return{..._0x148655,'id':_0x5e3efe['replyId'],'resolved':_0xee56d4[_0x13e410(0x234)]===0x1,'dT':P(_0x5e3efe['createTimestamp']),'personId':_0x5e3efe[_0x13e410(0x244)],'threadId':_0x5e3efe[_0x13e410(0x231)]};}function _0x59a4(_0x828c8f,_0x4bac1f){const _0x5035bd=_0x5035();return _0x59a4=function(_0x59a48a,_0x1769a1){_0x59a48a=_0x59a48a-0x1e5;let _0x22ccc9=_0x5035bd[_0x59a48a];return _0x22ccc9;},_0x59a4(_0x828c8f,_0x4bac1f);}function A(_0x5deea0,_0x52fec1,_0x51356f){const _0x1c9a1a=_0x536ebc;var _0x4e71d6,_0xd545d0;if(((_0xd545d0=(_0x4e71d6=_0x5deea0==null?void 0x0:_0x5deea0[_0x1c9a1a(0x1f7)])==null?void 0x0:_0x4e71d6[_0x1c9a1a(0x216)])!=null?_0xd545d0:0x0)>0x0){const _0x315e13=(_0x3bdb9b,_0x196083)=>({'id':_0x3bdb9b[_0x1c9a1a(0x22b)],'threadId':_0x3bdb9b['threadId'],'dT':P(_0x3bdb9b[_0x1c9a1a(0x239)]),'personId':_0x3bdb9b[_0x1c9a1a(0x244)],'resolved':_0x5deea0[_0x1c9a1a(0x234)]===p['Solved'],'unitId':_0x52fec1,'subUnitId':_0x51356f,'text':JSON['parse'](_0x3bdb9b['content']),'parentId':_0x196083}),_0x1a9cff=_0x315e13(_0x5deea0[_0x1c9a1a(0x1f7)][0x0]);return{..._0x1a9cff,'children':_0x5deea0[_0x1c9a1a(0x1f7)]['slice'](0x1)[_0x1c9a1a(0x214)](_0x154fb6=>_0x315e13(_0x154fb6,_0x1a9cff['id']))};}return null;}let C=class{constructor(_0x2d251a,_0x3e7b00,_0xf3e4fb,_0x4bef29){const _0x48c6fd=_0x536ebc;this[_0x48c6fd(0x21c)]=_0x2d251a,this[_0x48c6fd(0x24e)]=_0x3e7b00,this[_0x48c6fd(0x204)]=_0xf3e4fb,this[_0x48c6fd(0x1e9)]=_0x4bef29;}async[_0x536ebc(0x245)](_0x78ae26){const _0x386fdb=_0x536ebc;var _0x56c71d,_0x3689d7;const {parentId:_0x449725,unitId:_0x47619d,text:_0x155e87,threadId:_0x36eb3d}=_0x78ae26,_0x7d9217=(_0x3689d7=(_0x56c71d=_0x155e87[_0x386fdb(0x25e)])==null?void 0x0:_0x56c71d['filter'](_0x15076c=>_0x15076c[_0x386fdb(0x265)]===c[_0x386fdb(0x217)][_0x386fdb(0x1e8)])[_0x386fdb(0x214)](_0x3efc9d=>_0x3efc9d[_0x386fdb(0x23f)]))!=null?_0x3689d7:[],_0x390c3a=JSON['stringify'](_0x155e87),_0x4c79f6=(await this['_sessionService'][_0x386fdb(0x210)](_0x47619d))[_0x386fdb(0x219)]();if(_0x449725){const _0x31c7f6={'memberId':_0x4c79f6,'unitId':_0x47619d,'content':_0x390c3a,'mention':_0x7d9217,'threadId':_0x36eb3d},_0x20f148=(await this['_httpService'][_0x386fdb(0x266)]('/universer-api/comment/unit/'+_0x47619d+_0x386fdb(0x22e),{'body':_0x31c7f6}))[_0x386fdb(0x206)]['reply'];return{..._0x78ae26,'id':_0x20f148[_0x386fdb(0x22b)],'dT':$(+_0x20f148[_0x386fdb(0x239)])[_0x386fdb(0x238)](_0x386fdb(0x237)),'personId':_0x20f148['userId']};}else{const _0x368a25={'memberId':_0x4c79f6,'unitId':_0x47619d,'content':_0x390c3a,'mention':_0x7d9217},_0x5ec89=await this[_0x386fdb(0x21c)]['post']('/universer-api/comment/unit/'+_0x47619d+_0x386fdb(0x1e5),{'body':_0x368a25});return L(_0x5ec89[_0x386fdb(0x206)]['comment'],_0x78ae26);}}async['updateComment'](_0x16d46e){const _0x4fbbb5=_0x536ebc;var _0xd21ab3,_0xd80823;const {text:_0x5a30df,unitId:_0x13a60f}=_0x16d46e,_0x53f6ac=(_0xd80823=(_0xd21ab3=_0x5a30df[_0x4fbbb5(0x25e)])==null?void 0x0:_0xd21ab3[_0x4fbbb5(0x255)](_0x5d787c=>_0x5d787c[_0x4fbbb5(0x265)]===c['CustomRangeType'][_0x4fbbb5(0x1e8)])[_0x4fbbb5(0x214)](_0x533658=>_0x533658[_0x4fbbb5(0x23f)]))!=null?_0xd80823:[],_0x2e4fc9=JSON['stringify'](_0x5a30df),_0x5bcc7c=_0x16d46e[_0x4fbbb5(0x231)],_0x1c427d=_0x16d46e['id'],_0x3eb5c0={'memberId':(await this[_0x4fbbb5(0x204)]['requireSession'](_0x13a60f))[_0x4fbbb5(0x219)](),'unitId':_0x13a60f,'threadId':_0x5bcc7c,'mention':_0x53f6ac,'content':_0x2e4fc9,'replyId':_0x1c427d},_0x486ec1=await this[_0x4fbbb5(0x21c)][_0x4fbbb5(0x266)](_0x4fbbb5(0x23e)+_0x13a60f+_0x4fbbb5(0x276),{'body':_0x3eb5c0});return!_0x486ec1[_0x4fbbb5(0x206)][_0x4fbbb5(0x215)]||_0x486ec1['body'][_0x4fbbb5(0x215)][_0x4fbbb5(0x232)]===0x1;}async[_0x536ebc(0x273)](_0x37e425){const _0x9fca3b=_0x536ebc,{unitId:_0x1998f1}=_0x37e425,_0xb6323b=_0x37e425['threadId'],_0x41c8b8={'memberId':this['_userService'][_0x9fca3b(0x25a)]()[_0x9fca3b(0x1e7)],'unitId':_0x1998f1,'threadId':_0xb6323b,'solved':_0x37e425[_0x9fca3b(0x1f6)]?p[_0x9fca3b(0x247)]:p[_0x9fca3b(0x226)]},_0x1200bb=await this['_httpService']['post'](_0x9fca3b(0x23e)+_0x1998f1+_0x9fca3b(0x250),{'body':_0x41c8b8});return!_0x1200bb[_0x9fca3b(0x206)][_0x9fca3b(0x215)]||_0x1200bb[_0x9fca3b(0x206)][_0x9fca3b(0x215)][_0x9fca3b(0x232)]===0x1;}async['deleteComment'](_0xc23769,_0x2e0cdf,_0xb47a52,_0x4c247b){const _0x3f0894=_0x536ebc,_0x159287={'memberId':(await this[_0x3f0894(0x204)][_0x3f0894(0x210)](_0xc23769))[_0x3f0894(0x219)](),'threadId':_0xb47a52,'replyId':_0x4c247b,'unitId':_0xc23769},_0x49c952=await this[_0x3f0894(0x21c)][_0x3f0894(0x266)](_0x3f0894(0x23e)+_0xc23769+_0x3f0894(0x24f),{'body':_0x159287});return!_0x49c952['body']['error']||_0x49c952[_0x3f0894(0x206)][_0x3f0894(0x215)][_0x3f0894(0x232)]===0x1;}async[_0x536ebc(0x26c)](_0x348e78,_0x169b3f,_0x4a1834){const _0x39d94e=_0x536ebc,_0x100aad={'unitId':_0x348e78,'threadId':_0x4a1834},_0x24deba=await this[_0x39d94e(0x21c)][_0x39d94e(0x266)](_0x39d94e(0x23e)+_0x348e78+_0x39d94e(0x23b),{'body':_0x100aad}),_0x20a5ed=_0x4a1834['map'](_0x53673f=>A(_0x24deba['body'][_0x39d94e(0x1f1)][_0x53673f],_0x348e78,_0x169b3f))[_0x39d94e(0x255)](Boolean);return Object[_0x39d94e(0x23d)](_0x24deba[_0x39d94e(0x206)][_0x39d94e(0x267)])['forEach'](_0x10d57d=>{const _0x1637d9=_0x39d94e;this['_userService'][_0x1637d9(0x24a)](_0x10d57d);}),_0x20a5ed;}[_0x536ebc(0x264)](_0x17e470){const _0x9b0865=_0x536ebc;return{'id':_0x17e470['id'],'threadId':_0x17e470['threadId'],'ref':_0x17e470[_0x9b0865(0x1fc)]};}};C=H([I(0x0,c[_0x536ebc(0x1f0)](O[_0x536ebc(0x23c)])),I(0x1,c[_0x536ebc(0x1f0)](c['UserManagerService'])),I(0x2,c[_0x536ebc(0x1f0)](y['CollaborationSessionService'])),I(0x3,c[_0x536ebc(0x1f0)](c[_0x536ebc(0x1ef)]))],C);var J=Object[_0x536ebc(0x25f)],F=Object[_0x536ebc(0x1e6)],Z=(_0x359ebf,_0x51c582,_0x14e1fa,_0x4bf2c5)=>{const _0x29e1e9=_0x536ebc;for(var _0x132dcd=_0x4bf2c5>0x1?void 0x0:_0x4bf2c5?F(_0x51c582,_0x14e1fa):_0x51c582,_0x3d1497=_0x359ebf[_0x29e1e9(0x216)]-0x1,_0x210a50;_0x3d1497>=0x0;_0x3d1497--)(_0x210a50=_0x359ebf[_0x3d1497])&&(_0x132dcd=(_0x4bf2c5?_0x210a50(_0x51c582,_0x14e1fa,_0x132dcd):_0x210a50(_0x132dcd))||_0x132dcd);return _0x4bf2c5&&_0x132dcd&&J(_0x51c582,_0x14e1fa,_0x132dcd),_0x132dcd;},W=(_0x3f913f,_0x34b321)=>(_0x41b74a,_0x4848b0)=>_0x34b321(_0x41b74a,_0x4848b0,_0x3f913f);function _0x5035(){const _0x357a86=['syncUpdateMutationToColla','Edit','/universer-api/user/list','saveCommentToSnapshot','rangeType','post','users','UniverThreadCommentUIPlugin','27NiiBVO','UserManagerService','location','listComments','484648ZvPoiu','delete','searchParams','Delete','updateComment','type','resolveComment','avatar','UNIVER_UNKNOWN','/edit','_threadCommentMentionDataService','/add','getOwnPropertyDescriptor','userID','COMMENT','_injector','disposeWithMe','_initDataSource','http','3628fgIjbe','ThreadCommentModel','Injector','Inject','comments','LifecycleStages','setConfig','host','get','resolved','replies','Plugin','thread-comment-data-source.config','commentUpdate$','@univerjs/network','ref','add','OnLifecycle','Add','Solve','deleteComment','DependentOn','_threadCommentDataSourceService','_sessionService','IThreadCommentMentionDataService','body','Disposable','unit','Ready','Reply','dayjs','12uTrebJ','_threadCommentModel','/universer-api/authz/collaborator','4LdItYp','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','onStarting','map','error','length','CustomRangeType','getUser','getMemberID','collaborators','href','_httpService','://','12MgRARj','subject','_initUserSync','dataSource','bufferTime','Starting','protocol','_threadCommentMentionDataSource','OpenOrReOpen','getMentions','UniverThreadCommentDataSourcePlugin','getComment','CommentService','replyId','IThreadCommentDataSourceService','rxjs','/reply','content','@univerjs/thread-comment','threadId','code','Unknown','solved','880926JVrGdT','IConfigService','YYYY/MM/DD\x20HH:mm','format','createTimestamp','toStringTag','/list','HTTPService','values','/universer-api/comment/unit/','rangeId','parse','_config','name','payload','userId','addComment','1087390EAlbuW','Solved','_commentService','_init','addUser','forEach','user','_configService','_userService','/delete','/solved','21jccqvZ','https','unitId','pipe','filter','symbol','_threadCommentDataSource','UniverThreadCommentPlugin','Module','getCurrentUser','1589980xpyRKn','7753273iHvaym','UNRECOGNIZED','customRanges','defineProperty','191073WSNVtR'];_0x5035=function(){return _0x357a86;};return _0x5035();}let D=class{constructor(_0x2ca1d6){this['_httpService']=_0x2ca1d6;}async[_0x536ebc(0x227)](_0x4452be,_0x2e4623,_0x5bcecd){const _0x489ad1=_0x536ebc,_0x30fa45=new URL(window[_0x489ad1(0x26b)][_0x489ad1(0x21b)])[_0x489ad1(0x26f)]['get'](_0x489ad1(0x208));if(!_0x30fa45)return[];const _0x288a06=window['location'][_0x489ad1(0x1f4)],_0x4fc6aa=window[_0x489ad1(0x26b)][_0x489ad1(0x224)]==='https:'?_0x489ad1(0x252):_0x489ad1(0x1ec);return(await this[_0x489ad1(0x21c)][_0x489ad1(0x1f5)](_0x4fc6aa+_0x489ad1(0x21d)+_0x288a06+_0x489ad1(0x20e),{'params':{'objectID':_0x30fa45,'unitID':_0x30fa45}}))[_0x489ad1(0x206)][_0x489ad1(0x21a)][_0x489ad1(0x214)](_0x6d1f28=>{const _0x340dbb=_0x489ad1;var _0x4b5377,_0x1a5788,_0x21af4b,_0x1484fa,_0x59984b,_0xbc1561;return{'id':(_0x1a5788=(_0x4b5377=_0x6d1f28[_0x340dbb(0x21f)])==null?void 0x0:_0x4b5377[_0x340dbb(0x1e7)])!=null?_0x1a5788:'','label':(_0x1484fa=(_0x21af4b=_0x6d1f28[_0x340dbb(0x21f)])==null?void 0x0:_0x21af4b[_0x340dbb(0x242)])!=null?_0x1484fa:'','icon':(_0xbc1561=(_0x59984b=_0x6d1f28['subject'])==null?void 0x0:_0x59984b[_0x340dbb(0x274)])!=null?_0xbc1561:'','type':_0x340dbb(0x24c)};});}};D=Z([W(0x0,c[_0x536ebc(0x1f0)](O[_0x536ebc(0x23c)]))],D);var z=Object[_0x536ebc(0x25f)],B=Object[_0x536ebc(0x1e6)],K=(_0x350aa2,_0x1251f9,_0x464ee4,_0x26f1ae)=>{const _0x49977a=_0x536ebc;for(var _0x5e6123=_0x26f1ae>0x1?void 0x0:_0x26f1ae?B(_0x1251f9,_0x464ee4):_0x1251f9,_0x3aa74e=_0x350aa2[_0x49977a(0x216)]-0x1,_0x5385b1;_0x3aa74e>=0x0;_0x3aa74e--)(_0x5385b1=_0x350aa2[_0x3aa74e])&&(_0x5e6123=(_0x26f1ae?_0x5385b1(_0x1251f9,_0x464ee4,_0x5e6123):_0x5385b1(_0x5e6123))||_0x5e6123);return _0x26f1ae&&_0x5e6123&&z(_0x1251f9,_0x464ee4,_0x5e6123),_0x5e6123;},S=(_0x3efb86,_0x5739ba)=>(_0x296c7f,_0x4a08e8)=>_0x5739ba(_0x296c7f,_0x4a08e8,_0x3efb86);let f=class extends c[_0x536ebc(0x207)]{constructor(_0x51a609,_0x4d01d7,_0x3e12d5,_0x451f0a){const _0x54e86d=_0x536ebc;super(),this[_0x54e86d(0x203)]=_0x51a609,this[_0x54e86d(0x257)]=_0x4d01d7,this[_0x54e86d(0x277)]=_0x3e12d5,this[_0x54e86d(0x225)]=_0x451f0a,this['_initDataSource']();}[_0x536ebc(0x1eb)](){const _0x362a79=_0x536ebc;this[_0x362a79(0x203)][_0x362a79(0x221)]=this[_0x362a79(0x257)],this[_0x362a79(0x203)][_0x362a79(0x261)]=!0x1,this[_0x362a79(0x277)][_0x362a79(0x221)]=this[_0x362a79(0x225)];}};f=K([c[_0x536ebc(0x1fe)](c[_0x536ebc(0x1f2)][_0x536ebc(0x223)],f),S(0x0,g[_0x536ebc(0x22c)]),S(0x1,c[_0x536ebc(0x1f0)](C)),S(0x2,N[_0x536ebc(0x205)]),S(0x3,c['Inject'](D))],f);var V=Object[_0x536ebc(0x25f)],Q=Object[_0x536ebc(0x1e6)],X=(_0x4bce33,_0x2f48af,_0x3711b6,_0x5db39f)=>{const _0x2f0766=_0x536ebc;for(var _0x2ebdd7=_0x5db39f>0x1?void 0x0:_0x5db39f?Q(_0x2f48af,_0x3711b6):_0x2f48af,_0x133b66=_0x4bce33[_0x2f0766(0x216)]-0x1,_0x3edb2e;_0x133b66>=0x0;_0x133b66--)(_0x3edb2e=_0x4bce33[_0x133b66])&&(_0x2ebdd7=(_0x5db39f?_0x3edb2e(_0x2f48af,_0x3711b6,_0x2ebdd7):_0x3edb2e(_0x2ebdd7))||_0x2ebdd7);return _0x5db39f&&_0x2ebdd7&&V(_0x2f48af,_0x3711b6,_0x2ebdd7),_0x2ebdd7;},_=(_0x2eaba9,_0x3dd236)=>(_0x61b382,_0x2f05fb)=>_0x3dd236(_0x61b382,_0x2f05fb,_0x2eaba9);let b=class extends c[_0x536ebc(0x207)]{constructor(_0x5a0aa7,_0x1ab882,_0x15eb73,_0xd1e1e4){const _0x549611=_0x536ebc;super(),this['_commentService']=_0x5a0aa7,this[_0x549611(0x20d)]=_0x1ab882,this[_0x549611(0x24e)]=_0x15eb73,this[_0x549611(0x1e9)]=_0xd1e1e4,this[_0x549611(0x249)](),this[_0x549611(0x220)]();}[_0x536ebc(0x220)](){const _0x13da7f=_0x536ebc;this[_0x13da7f(0x1ea)](this[_0x13da7f(0x20d)][_0x13da7f(0x1fa)][_0x13da7f(0x254)](E[_0x13da7f(0x222)](0x10))['subscribe'](_0x173cc9=>{const _0x33fa40=_0x13da7f,_0x4c0b55=new Set();_0x173cc9[_0x33fa40(0x24b)](_0x42be1f=>{const _0x4b2711=_0x33fa40;switch(_0x42be1f['type']){case _0x4b2711(0x1fd):{const _0x2705f5=_0x42be1f[_0x4b2711(0x243)]['personId'];_0x4c0b55[_0x4b2711(0x1fd)](_0x2705f5);break;}}}),x(this['_injector'],_0x4c0b55);}));}[_0x536ebc(0x249)](){const _0x33e86e=_0x536ebc;this[_0x33e86e(0x1ea)](this[_0x33e86e(0x248)][_0x33e86e(0x1fa)][_0x33e86e(0x212)](async _0x1add53=>{const _0x39fd20=_0x33e86e;var _0x2d15e2,_0x11f9b0;const _0x524163=this[_0x39fd20(0x20d)]['getThread'](_0x1add53[_0x39fd20(0x253)],_0x1add53[_0x39fd20(0x231)]);if(!_0x524163)return;const {unitId:_0x50cf01,subUnitId:_0x3cef35}=_0x524163;switch(_0x1add53[_0x39fd20(0x24c)]&&this[_0x39fd20(0x24e)][_0x39fd20(0x24a)](_0x1add53[_0x39fd20(0x24c)]),_0x1add53[_0x39fd20(0x272)]){case v[_0x39fd20(0x1ff)]:break;case v[_0x39fd20(0x20a)]:{this[_0x39fd20(0x20d)][_0x39fd20(0x245)](_0x50cf01,_0x3cef35,{'unitId':_0x50cf01,'subUnitId':_0x3cef35,'ref':'','id':_0x1add53[_0x39fd20(0x22b)],'dT':P(+_0x1add53[_0x39fd20(0x239)]),'threadId':_0x1add53[_0x39fd20(0x231)],'personId':(_0x11f9b0=(_0x2d15e2=_0x1add53[_0x39fd20(0x24c)])==null?void 0x0:_0x2d15e2[_0x39fd20(0x1e7)])!=null?_0x11f9b0:_0x1add53[_0x39fd20(0x244)],'text':JSON[_0x39fd20(0x240)](_0x1add53[_0x39fd20(0x22f)]),'parentId':_0x524163['id']});break;}case v[_0x39fd20(0x270)]:{const _0x40fec5=this[_0x39fd20(0x20d)][_0x39fd20(0x229)](_0x50cf01,_0x3cef35,_0x1add53[_0x39fd20(0x22b)]);_0x40fec5&&_0x40fec5['parentId']&&this['_threadCommentModel'][_0x39fd20(0x201)](_0x50cf01,_0x3cef35,_0x1add53[_0x39fd20(0x22b)]);break;}case v[_0x39fd20(0x262)]:{this[_0x39fd20(0x20d)][_0x39fd20(0x271)](_0x50cf01,_0x3cef35,{'commentId':_0x1add53['replyId'],'text':JSON[_0x39fd20(0x240)](_0x1add53[_0x39fd20(0x22f)])});break;}case v[_0x39fd20(0x200)]:{const _0x353df7=this['_threadCommentModel']['getThread'](_0x50cf01,_0x1add53[_0x39fd20(0x231)]);_0x353df7&&this[_0x39fd20(0x20d)][_0x39fd20(0x273)](_0x50cf01,_0x3cef35,_0x353df7['id'],_0x1add53[_0x39fd20(0x234)]===p[_0x39fd20(0x247)]);break;}}}));}};b=X([c[_0x536ebc(0x1fe)](c[_0x536ebc(0x1f2)][_0x536ebc(0x209)],b),_(0x0,c['Inject'](y[_0x536ebc(0x22a)])),_(0x1,c[_0x536ebc(0x1f0)](g[_0x536ebc(0x1ee)])),_(0x2,c[_0x536ebc(0x1f0)](c[_0x536ebc(0x26a)])),_(0x3,c[_0x536ebc(0x1f0)](c[_0x536ebc(0x1ef)]))],b);const k=_0x536ebc(0x1f9),ee={};var U=Object[_0x536ebc(0x25f)],re=Object[_0x536ebc(0x1e6)],te=(_0x5e6a34,_0x5dc25a,_0x209448)=>_0x5dc25a in _0x5e6a34?U(_0x5e6a34,_0x5dc25a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x209448}):_0x5e6a34[_0x5dc25a]=_0x209448,se=(_0x564ab8,_0x11c431,_0x1663a9,_0x3d644b)=>{const _0x58bcfc=_0x536ebc;for(var _0x4e00e1=_0x3d644b>0x1?void 0x0:_0x3d644b?re(_0x11c431,_0x1663a9):_0x11c431,_0x55277b=_0x564ab8[_0x58bcfc(0x216)]-0x1,_0x1c5eeb;_0x55277b>=0x0;_0x55277b--)(_0x1c5eeb=_0x564ab8[_0x55277b])&&(_0x4e00e1=(_0x3d644b?_0x1c5eeb(_0x11c431,_0x1663a9,_0x4e00e1):_0x1c5eeb(_0x4e00e1))||_0x4e00e1);return _0x3d644b&&_0x4e00e1&&U(_0x11c431,_0x1663a9,_0x4e00e1),_0x4e00e1;},T=(_0x56227b,_0x51befa)=>(_0x3b65bb,_0x2c6695)=>_0x51befa(_0x3b65bb,_0x2c6695,_0x56227b),R=(_0x9a3f92,_0x3a34a7,_0x23b946)=>te(_0x9a3f92,typeof _0x3a34a7!=_0x536ebc(0x256)?_0x3a34a7+'':_0x3a34a7,_0x23b946);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x536ebc(0x1f8)]{constructor(_0x31f21e=ee,_0xb96424,_0x1186fc){const _0x2151f4=_0x536ebc;super(),this[_0x2151f4(0x241)]=_0x31f21e,this['_injector']=_0xb96424,this[_0x2151f4(0x24d)]=_0x1186fc;const {..._0x5a7e93}=this[_0x2151f4(0x241)];this[_0x2151f4(0x24d)][_0x2151f4(0x1f3)](k,_0x5a7e93);}[_0x536ebc(0x213)](){const _0x60b0b1=_0x536ebc;[[D],[C],[f],[b]][_0x60b0b1(0x24b)](_0x4c80bf=>{const _0xf6b1ce=_0x60b0b1;this['_injector'][_0xf6b1ce(0x1fd)](_0x4c80bf);});}},R(exports[_0x536ebc(0x228)],'pluginName',q),R(exports[_0x536ebc(0x228)],_0x536ebc(0x272),c['UniverInstanceType'][_0x536ebc(0x275)]),exports['UniverThreadCommentDataSourcePlugin']=se([c[_0x536ebc(0x202)](g[_0x536ebc(0x258)],N[_0x536ebc(0x268)],y['UniverCollaborationClientPlugin']),T(0x1,c['Inject'](c[_0x536ebc(0x1ef)])),T(0x2,c[_0x536ebc(0x236)])],exports['UniverThreadCommentDataSourcePlugin']);
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)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x31765f=_0x49f7;(function(_0x27b174,_0x351bf8){const _0x47081f=_0x49f7,_0x3d77cc=_0x27b174();while(!![]){try{const _0x15a444=parseInt(_0x47081f(0x1c7))/0x1+-parseInt(_0x47081f(0x198))/0x2+parseInt(_0x47081f(0x1fb))/0x3*(-parseInt(_0x47081f(0x1e7))/0x4)+parseInt(_0x47081f(0x1a6))/0x5+-parseInt(_0x47081f(0x1ba))/0x6+-parseInt(_0x47081f(0x1e0))/0x7*(parseInt(_0x47081f(0x1a2))/0x8)+parseInt(_0x47081f(0x1ab))/0x9*(parseInt(_0x47081f(0x19d))/0xa);if(_0x15a444===_0x351bf8)break;else _0x3d77cc['push'](_0x3d77cc['shift']());}catch(_0x4f2f97){_0x3d77cc['push'](_0x3d77cc['shift']());}}}(_0x4272,0x78e20));import{UserManagerService as _0x528d19,Inject as _0x239a9d,Injector as _0x2bb676,CustomRangeType as _0x3f4ed2,OnLifecycle as _0x5ed997,LifecycleStages as _0x10741d,Disposable as _0x2aabe1,UniverInstanceType as _0x339b2a,DependentOn as _0x126a73,Plugin as _0x51349b,IConfigService as _0x15d434}from'@univerjs/core';import{IThreadCommentDataSourceService as _0x28c019,ThreadCommentModel as _0x299de3,UniverThreadCommentPlugin as _0x52dd79}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0xac6a15,UniverThreadCommentUIPlugin as _0x2efec0}from'@univerjs/thread-comment-ui';import{CollaborationSessionService as _0x94fa52,CommentService as _0x56df0e,UniverCollaborationClientPlugin as _0x41305d}from'@univerjs-pro/collaboration-client';import{HTTPService as _0x2944ec}from'@univerjs/network';import _0x4468e2 from'dayjs';import{bufferTime as _0x357fd5}from'rxjs';const X=_0x31765f(0x1b3);var v=(_0x1c4bdb=>(_0x1c4bdb[_0x1c4bdb[_0x31765f(0x1c9)]=0x0]=_0x31765f(0x1c9),_0x1c4bdb[_0x1c4bdb[_0x31765f(0x19b)]=0x1]='Solved',_0x1c4bdb[_0x1c4bdb[_0x31765f(0x196)]=-0x1]=_0x31765f(0x196),_0x1c4bdb))(v||{}),p=(_0x29c962=>(_0x29c962[_0x29c962['Unknown']=0x0]=_0x31765f(0x1c0),_0x29c962[_0x29c962[_0x31765f(0x1cd)]=0x1]=_0x31765f(0x1cd),_0x29c962[_0x29c962[_0x31765f(0x1da)]=0x2]=_0x31765f(0x1da),_0x29c962[_0x29c962[_0x31765f(0x1a8)]=0x3]='Edit',_0x29c962[_0x29c962['Delete']=0x4]='Delete',_0x29c962[_0x29c962[_0x31765f(0x18c)]=0x5]='Solve',_0x29c962[_0x29c962['UNRECOGNIZED']=-0x1]=_0x31765f(0x196),_0x29c962))(p||{});function _0x49f7(_0x43b3c0,_0x18f6ac){const _0x42720e=_0x4272();return _0x49f7=function(_0x49f759,_0x52d958){_0x49f759=_0x49f759-0x189;let _0x472675=_0x42720e[_0x49f759];return _0x472675;},_0x49f7(_0x43b3c0,_0x18f6ac);}const w=_0x25961a=>_0x4468e2(new Date(+_0x25961a))[_0x31765f(0x1eb)](_0x31765f(0x1f6)),k=async(_0x357a2e,_0x4c97d0)=>{const _0xca85ef=_0x31765f,_0x293576=_0x357a2e[_0xca85ef(0x1aa)](_0x528d19),_0x31203e=_0x357a2e['get'](_0x2944ec);_0x4c97d0['forEach'](_0x5aba22=>{const _0x50fefc=_0xca85ef;_0x293576[_0x50fefc(0x1c4)](_0x5aba22)&&_0x4c97d0[_0x50fefc(0x1bc)](_0x5aba22);}),_0x4c97d0[_0xca85ef(0x1af)]&&(await _0x31203e[_0xca85ef(0x1aa)](_0xca85ef(0x1f2),{'params':{'userIDs':[..._0x4c97d0]}}))[_0xca85ef(0x193)][_0xca85ef(0x19a)][_0xca85ef(0x1de)](_0x4f8a4d=>{const _0x3a60f3=_0xca85ef;_0x4f8a4d&&_0x293576[_0x3a60f3(0x1b8)](_0x4f8a4d);});};var ee=Object[_0x31765f(0x18a)],re=Object['getOwnPropertyDescriptor'],te=(_0x177611,_0x5780c9,_0x27e1af,_0x34fbd7)=>{for(var _0x1f0374=_0x34fbd7>0x1?void 0x0:_0x34fbd7?re(_0x5780c9,_0x27e1af):_0x5780c9,_0x51cae4=_0x177611['length']-0x1,_0x117cce;_0x51cae4>=0x0;_0x51cae4--)(_0x117cce=_0x177611[_0x51cae4])&&(_0x1f0374=(_0x34fbd7?_0x117cce(_0x5780c9,_0x27e1af,_0x1f0374):_0x117cce(_0x1f0374))||_0x1f0374);return _0x34fbd7&&_0x1f0374&&ee(_0x5780c9,_0x27e1af,_0x1f0374),_0x1f0374;},_=(_0x4d161b,_0x554e91)=>(_0x87cdc,_0x412e08)=>_0x554e91(_0x87cdc,_0x412e08,_0x4d161b);function se(_0x4986dd,_0x17afb7){const _0x83943b=_0x31765f,_0x2dea7a=_0x4986dd[_0x83943b(0x1a5)][0x0];return{..._0x17afb7,'id':_0x2dea7a[_0x83943b(0x1b9)],'resolved':_0x4986dd['solved']===0x1,'dT':w(_0x2dea7a['createTimestamp']),'personId':_0x2dea7a[_0x83943b(0x1ca)],'threadId':_0x2dea7a[_0x83943b(0x18f)]};}function oe(_0x13c882,_0x5244e6,_0x1912be){const _0x2e5bb8=_0x31765f;var _0x20aa65,_0x1aa4fc;if(((_0x1aa4fc=(_0x20aa65=_0x13c882==null?void 0x0:_0x13c882['replies'])==null?void 0x0:_0x20aa65[_0x2e5bb8(0x1e9)])!=null?_0x1aa4fc:0x0)>0x0){const _0x1a05d4=(_0x2e2e10,_0x12d4be)=>({'id':_0x2e2e10['replyId'],'threadId':_0x2e2e10[_0x2e5bb8(0x18f)],'dT':w(_0x2e2e10[_0x2e5bb8(0x1b5)]),'personId':_0x2e2e10[_0x2e5bb8(0x1ca)],'resolved':_0x13c882[_0x2e5bb8(0x1b4)]===v[_0x2e5bb8(0x19b)],'unitId':_0x5244e6,'subUnitId':_0x1912be,'text':JSON['parse'](_0x2e2e10[_0x2e5bb8(0x1ac)]),'parentId':_0x12d4be}),_0x882f13=_0x1a05d4(_0x13c882[_0x2e5bb8(0x1a5)][0x0]);return{..._0x882f13,'children':_0x13c882[_0x2e5bb8(0x1a5)][_0x2e5bb8(0x1ae)](0x1)['map'](_0x18f6dd=>_0x1a05d4(_0x18f6dd,_0x882f13['id']))};}return null;}let D=class{constructor(_0x76ef52,_0xe25453,_0x3dcea3,_0x4c89cb){const _0x10f4da=_0x31765f;this[_0x10f4da(0x1a7)]=_0x76ef52,this['_userService']=_0xe25453,this[_0x10f4da(0x1dd)]=_0x3dcea3,this[_0x10f4da(0x194)]=_0x4c89cb;}async[_0x31765f(0x1c6)](_0x51dc9e){const _0x1080ec=_0x31765f;var _0x245c6f,_0xe03186;const {parentId:_0x5a1501,unitId:_0x4b4d1e,text:_0x215906,threadId:_0x43b229}=_0x51dc9e,_0x62ef96=(_0xe03186=(_0x245c6f=_0x215906['customRanges'])==null?void 0x0:_0x245c6f[_0x1080ec(0x1ed)](_0x165785=>_0x165785[_0x1080ec(0x1cc)]===_0x3f4ed2[_0x1080ec(0x1e6)])['map'](_0x546704=>_0x546704[_0x1080ec(0x1a1)]))!=null?_0xe03186:[],_0x14dfdf=JSON[_0x1080ec(0x1c8)](_0x215906),_0x1e2fb5=(await this[_0x1080ec(0x1dd)][_0x1080ec(0x1a9)](_0x4b4d1e))[_0x1080ec(0x1f8)]();if(_0x5a1501){const _0x35f7fc={'memberId':_0x1e2fb5,'unitId':_0x4b4d1e,'content':_0x14dfdf,'mention':_0x62ef96,'threadId':_0x43b229},_0x11ef3f=(await this[_0x1080ec(0x1a7)]['post'](_0x1080ec(0x1d0)+_0x4b4d1e+_0x1080ec(0x1f9),{'body':_0x35f7fc}))[_0x1080ec(0x193)][_0x1080ec(0x1f3)];return{..._0x51dc9e,'id':_0x11ef3f['replyId'],'dT':_0x4468e2(+_0x11ef3f['createTimestamp'])[_0x1080ec(0x1eb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x11ef3f['userId']};}else{const _0x1fbf7d={'memberId':_0x1e2fb5,'unitId':_0x4b4d1e,'content':_0x14dfdf,'mention':_0x62ef96},_0xfbc2b0=await this[_0x1080ec(0x1a7)][_0x1080ec(0x195)](_0x1080ec(0x1d0)+_0x4b4d1e+_0x1080ec(0x1fa),{'body':_0x1fbf7d});return se(_0xfbc2b0[_0x1080ec(0x193)][_0x1080ec(0x19c)],_0x51dc9e);}}async[_0x31765f(0x1c5)](_0x44a7af){const _0x4990c6=_0x31765f;var _0x3fb743,_0x169945;const {text:_0x568730,unitId:_0x4dcb20}=_0x44a7af,_0x2c29fa=(_0x169945=(_0x3fb743=_0x568730['customRanges'])==null?void 0x0:_0x3fb743['filter'](_0x3eb537=>_0x3eb537[_0x4990c6(0x1cc)]===_0x3f4ed2[_0x4990c6(0x1e6)])[_0x4990c6(0x1bf)](_0x1be5f5=>_0x1be5f5[_0x4990c6(0x1a1)]))!=null?_0x169945:[],_0x53df80=JSON[_0x4990c6(0x1c8)](_0x568730),_0x50f60c=_0x44a7af[_0x4990c6(0x18f)],_0x50dead=_0x44a7af['id'],_0x398903={'memberId':(await this['_sessionService']['requireSession'](_0x4dcb20))[_0x4990c6(0x1f8)](),'unitId':_0x4dcb20,'threadId':_0x50f60c,'mention':_0x2c29fa,'content':_0x53df80,'replyId':_0x50dead},_0x17d5b2=await this[_0x4990c6(0x1a7)][_0x4990c6(0x195)](_0x4990c6(0x1d0)+_0x4dcb20+_0x4990c6(0x18b),{'body':_0x398903});return!_0x17d5b2[_0x4990c6(0x193)][_0x4990c6(0x1b7)]||_0x17d5b2[_0x4990c6(0x193)][_0x4990c6(0x1b7)]['code']===0x1;}async[_0x31765f(0x1f0)](_0x238e00){const _0x18b39f=_0x31765f,{unitId:_0x190f79}=_0x238e00,_0x5b317f=_0x238e00[_0x18b39f(0x18f)],_0x4b8448={'memberId':this[_0x18b39f(0x1b2)][_0x18b39f(0x1ea)]()[_0x18b39f(0x1d6)],'unitId':_0x190f79,'threadId':_0x5b317f,'solved':_0x238e00[_0x18b39f(0x1c3)]?v[_0x18b39f(0x19b)]:v[_0x18b39f(0x1c9)]},_0x5c8149=await this[_0x18b39f(0x1a7)]['post']('/universer-api/comment/unit/'+_0x190f79+_0x18b39f(0x1d3),{'body':_0x4b8448});return!_0x5c8149[_0x18b39f(0x193)]['error']||_0x5c8149[_0x18b39f(0x193)][_0x18b39f(0x1b7)][_0x18b39f(0x1d7)]===0x1;}async[_0x31765f(0x1e2)](_0x4099b1,_0x25d029,_0x4e03dd,_0x1fbe03){const _0x90bdfe=_0x31765f,_0x427ee6={'memberId':(await this['_sessionService'][_0x90bdfe(0x1a9)](_0x4099b1))['getMemberID'](),'threadId':_0x4e03dd,'replyId':_0x1fbe03,'unitId':_0x4099b1},_0x549f9c=await this[_0x90bdfe(0x1a7)]['post']('/universer-api/comment/unit/'+_0x4099b1+'/delete',{'body':_0x427ee6});return!_0x549f9c['body'][_0x90bdfe(0x1b7)]||_0x549f9c[_0x90bdfe(0x193)][_0x90bdfe(0x1b7)]['code']===0x1;}async['listComments'](_0x5d4ac1,_0x21b1d1,_0x178acd){const _0x3c76c8=_0x31765f,_0xd0c769={'unitId':_0x5d4ac1,'threadId':_0x178acd},_0x455aa4=await this[_0x3c76c8(0x1a7)]['post'](_0x3c76c8(0x1d0)+_0x5d4ac1+_0x3c76c8(0x1ce),{'body':_0xd0c769}),_0x20eb12=_0x178acd[_0x3c76c8(0x1bf)](_0x4569f3=>oe(_0x455aa4['body']['comments'][_0x4569f3],_0x5d4ac1,_0x21b1d1))['filter'](Boolean);return Object[_0x3c76c8(0x1e1)](_0x455aa4[_0x3c76c8(0x193)][_0x3c76c8(0x19a)])[_0x3c76c8(0x1de)](_0x4d15bf=>{const _0x24758a=_0x3c76c8;this[_0x24758a(0x1b2)][_0x24758a(0x1b8)](_0x4d15bf);}),_0x20eb12;}[_0x31765f(0x19f)](_0x470de4){const _0x5f2734=_0x31765f;return{'id':_0x470de4['id'],'threadId':_0x470de4[_0x5f2734(0x18f)],'ref':_0x470de4[_0x5f2734(0x1e5)]};}};D=te([_(0x0,_0x239a9d(_0x2944ec)),_(0x1,_0x239a9d(_0x528d19)),_(0x2,_0x239a9d(_0x94fa52)),_(0x3,_0x239a9d(_0x2bb676))],D);var ne=Object[_0x31765f(0x18a)],ie=Object['getOwnPropertyDescriptor'],ae=(_0xa84aaa,_0x120271,_0x152121,_0xe8727d)=>{const _0x8147f2=_0x31765f;for(var _0x43aaf1=_0xe8727d>0x1?void 0x0:_0xe8727d?ie(_0x120271,_0x152121):_0x120271,_0xcd7f3d=_0xa84aaa[_0x8147f2(0x1e9)]-0x1,_0x4b4098;_0xcd7f3d>=0x0;_0xcd7f3d--)(_0x4b4098=_0xa84aaa[_0xcd7f3d])&&(_0x43aaf1=(_0xe8727d?_0x4b4098(_0x120271,_0x152121,_0x43aaf1):_0x4b4098(_0x43aaf1))||_0x43aaf1);return _0xe8727d&&_0x43aaf1&&ne(_0x120271,_0x152121,_0x43aaf1),_0x43aaf1;},ce=(_0x169dcc,_0x51921e)=>(_0x3f9085,_0xcb1c19)=>_0x51921e(_0x3f9085,_0xcb1c19,_0x169dcc);let C=class{constructor(_0x3adf80){const _0x1c0b81=_0x31765f;this[_0x1c0b81(0x1a7)]=_0x3adf80;}async[_0x31765f(0x1b0)](_0x77ed5c,_0x138dcc,_0x1547e1){const _0x23d305=_0x31765f,_0x3e7f91=new URL(window[_0x23d305(0x1f1)]['href'])[_0x23d305(0x197)][_0x23d305(0x1aa)]('unit');if(!_0x3e7f91)return[];const _0x1e478b=window['location'][_0x23d305(0x1d4)],_0x1815e3=window['location']['protocol']==='https:'?_0x23d305(0x1a4):_0x23d305(0x1a0);return(await this['_httpService'][_0x23d305(0x1aa)](_0x1815e3+_0x23d305(0x1c1)+_0x1e478b+_0x23d305(0x1be),{'params':{'objectID':_0x3e7f91,'unitID':_0x3e7f91}}))[_0x23d305(0x193)]['collaborators'][_0x23d305(0x1bf)](_0x174129=>{const _0x3625a8=_0x23d305;var _0x26a3ec,_0x148f5d,_0x10ebfb,_0x2f0041,_0x16e2af,_0x5486c4;return{'id':(_0x148f5d=(_0x26a3ec=_0x174129[_0x3625a8(0x1ec)])==null?void 0x0:_0x26a3ec[_0x3625a8(0x1d6)])!=null?_0x148f5d:'','label':(_0x2f0041=(_0x10ebfb=_0x174129[_0x3625a8(0x1ec)])==null?void 0x0:_0x10ebfb[_0x3625a8(0x1ad)])!=null?_0x2f0041:'','icon':(_0x5486c4=(_0x16e2af=_0x174129[_0x3625a8(0x1ec)])==null?void 0x0:_0x16e2af[_0x3625a8(0x1d8)])!=null?_0x5486c4:'','type':_0x3625a8(0x1db)};});}};C=ae([ce(0x0,_0x239a9d(_0x2944ec))],C);var de=Object['defineProperty'],me=Object[_0x31765f(0x1e4)],le=(_0x27a0d2,_0x166e2a,_0x3dd188,_0x56102a)=>{const _0x3956bb=_0x31765f;for(var _0x341dec=_0x56102a>0x1?void 0x0:_0x56102a?me(_0x166e2a,_0x3dd188):_0x166e2a,_0x2da5c8=_0x27a0d2[_0x3956bb(0x1e9)]-0x1,_0x3b0d02;_0x2da5c8>=0x0;_0x2da5c8--)(_0x3b0d02=_0x27a0d2[_0x2da5c8])&&(_0x341dec=(_0x56102a?_0x3b0d02(_0x166e2a,_0x3dd188,_0x341dec):_0x3b0d02(_0x341dec))||_0x341dec);return _0x56102a&&_0x341dec&&de(_0x166e2a,_0x3dd188,_0x341dec),_0x341dec;},f=(_0x4a582c,_0x18c048)=>(_0x588c1f,_0x16c7ed)=>_0x18c048(_0x588c1f,_0x16c7ed,_0x4a582c);let S=class extends _0x2aabe1{constructor(_0x1bacde,_0x3f895e,_0x2332ec,_0x3b6a92){const _0x23037c=_0x31765f;super(),this[_0x23037c(0x190)]=_0x1bacde,this[_0x23037c(0x191)]=_0x3f895e,this[_0x23037c(0x1b6)]=_0x2332ec,this[_0x23037c(0x1d5)]=_0x3b6a92,this[_0x23037c(0x1d2)]();}[_0x31765f(0x1d2)](){const _0x380d0c=_0x31765f;this[_0x380d0c(0x190)][_0x380d0c(0x1c2)]=this[_0x380d0c(0x191)],this[_0x380d0c(0x190)][_0x380d0c(0x192)]=!0x1,this['_threadCommentMentionDataService'][_0x380d0c(0x1c2)]=this['_threadCommentMentionDataSource'];}};S=le([_0x5ed997(_0x10741d[_0x31765f(0x18d)],S),f(0x0,_0x28c019),f(0x1,_0x239a9d(D)),f(0x2,_0xac6a15),f(0x3,_0x239a9d(C))],S);var he=Object[_0x31765f(0x18a)],ue=Object[_0x31765f(0x1e4)],pe=(_0x2fd3b5,_0x3c3af6,_0x16a15f,_0x582dcc)=>{const _0x4f9016=_0x31765f;for(var _0xe74216=_0x582dcc>0x1?void 0x0:_0x582dcc?ue(_0x3c3af6,_0x16a15f):_0x3c3af6,_0x402a3d=_0x2fd3b5[_0x4f9016(0x1e9)]-0x1,_0x205b1a;_0x402a3d>=0x0;_0x402a3d--)(_0x205b1a=_0x2fd3b5[_0x402a3d])&&(_0xe74216=(_0x582dcc?_0x205b1a(_0x3c3af6,_0x16a15f,_0xe74216):_0x205b1a(_0xe74216))||_0xe74216);return _0x582dcc&&_0xe74216&&he(_0x3c3af6,_0x16a15f,_0xe74216),_0xe74216;},I=(_0x539204,_0x2f5f91)=>(_0x3b3a37,_0x51b68a)=>_0x2f5f91(_0x3b3a37,_0x51b68a,_0x539204);let b=class extends _0x2aabe1{constructor(_0x3a3eea,_0x3bacce,_0x3807fd,_0x56910d){const _0x1812d5=_0x31765f;super(),this[_0x1812d5(0x199)]=_0x3a3eea,this[_0x1812d5(0x1f4)]=_0x3bacce,this[_0x1812d5(0x1b2)]=_0x3807fd,this[_0x1812d5(0x194)]=_0x56910d,this[_0x1812d5(0x1ee)](),this[_0x1812d5(0x1ef)]();}['_initUserSync'](){const _0x194d1f=_0x31765f;this[_0x194d1f(0x1e8)](this[_0x194d1f(0x1f4)][_0x194d1f(0x1d9)][_0x194d1f(0x18e)](_0x357fd5(0x10))[_0x194d1f(0x1dc)](_0x1c4d80=>{const _0x533f33=new Set();_0x1c4d80['forEach'](_0x316229=>{const _0x355ab2=_0x49f7;switch(_0x316229['type']){case _0x355ab2(0x1d1):{const _0x10a50a=_0x316229['payload'][_0x355ab2(0x189)];_0x533f33[_0x355ab2(0x1d1)](_0x10a50a);break;}}}),k(this['_injector'],_0x533f33);}));}[_0x31765f(0x1ee)](){const _0x450306=_0x31765f;this[_0x450306(0x1e8)](this[_0x450306(0x199)]['commentUpdate$'][_0x450306(0x1dc)](async _0x5e0f08=>{const _0xd25802=_0x450306;var _0x3a250a,_0x49f5d0;const _0x1ccf95=this[_0xd25802(0x1f4)]['getThread'](_0x5e0f08[_0xd25802(0x1b1)],_0x5e0f08[_0xd25802(0x18f)]);if(!_0x1ccf95)return;const {unitId:_0x17e7bd,subUnitId:_0x202b06}=_0x1ccf95;switch(_0x5e0f08[_0xd25802(0x1db)]&&this[_0xd25802(0x1b2)]['addUser'](_0x5e0f08['user']),_0x5e0f08[_0xd25802(0x1cf)]){case p['Add']:break;case p[_0xd25802(0x1da)]:{this[_0xd25802(0x1f4)]['addComment'](_0x17e7bd,_0x202b06,{'unitId':_0x17e7bd,'subUnitId':_0x202b06,'ref':'','id':_0x5e0f08[_0xd25802(0x1b9)],'dT':w(+_0x5e0f08[_0xd25802(0x1b5)]),'threadId':_0x5e0f08[_0xd25802(0x18f)],'personId':(_0x49f5d0=(_0x3a250a=_0x5e0f08[_0xd25802(0x1db)])==null?void 0x0:_0x3a250a[_0xd25802(0x1d6)])!=null?_0x49f5d0:_0x5e0f08[_0xd25802(0x1ca)],'text':JSON[_0xd25802(0x1f5)](_0x5e0f08[_0xd25802(0x1ac)]),'parentId':_0x1ccf95['id']});break;}case p[_0xd25802(0x1bb)]:{const _0x295d47=this['_threadCommentModel'][_0xd25802(0x19e)](_0x17e7bd,_0x202b06,_0x5e0f08['replyId']);_0x295d47&&_0x295d47[_0xd25802(0x1df)]&&this[_0xd25802(0x1f4)][_0xd25802(0x1e2)](_0x17e7bd,_0x202b06,_0x5e0f08['replyId']);break;}case p[_0xd25802(0x1a8)]:{this[_0xd25802(0x1f4)]['updateComment'](_0x17e7bd,_0x202b06,{'commentId':_0x5e0f08[_0xd25802(0x1b9)],'text':JSON['parse'](_0x5e0f08[_0xd25802(0x1ac)])});break;}case p[_0xd25802(0x18c)]:{const _0x51b2b2=this[_0xd25802(0x1f4)][_0xd25802(0x1a3)](_0x17e7bd,_0x5e0f08[_0xd25802(0x18f)]);_0x51b2b2&&this[_0xd25802(0x1f4)][_0xd25802(0x1f0)](_0x17e7bd,_0x202b06,_0x51b2b2['id'],_0x5e0f08['solved']===v[_0xd25802(0x19b)]);break;}}}));}};b=pe([_0x5ed997(_0x10741d[_0x31765f(0x1e3)],b),I(0x0,_0x239a9d(_0x56df0e)),I(0x1,_0x239a9d(_0x299de3)),I(0x2,_0x239a9d(_0x528d19)),I(0x3,_0x239a9d(_0x2bb676))],b);function _0x4272(){const _0x5b4ace=['/solved','host','_threadCommentMentionDataSource','userID','code','avatar','commentUpdate$','Reply','user','subscribe','_sessionService','forEach','parentId','686qmOutL','values','deleteComment','Ready','getOwnPropertyDescriptor','ref','COMMENT','276sOhkKJ','disposeWithMe','length','getCurrentUser','format','subject','filter','_init','_initUserSync','resolveComment','location','/universer-api/user/list','reply','_threadCommentModel','parse','YYYY/MM/DD\x20HH:mm','_config','getMemberID','/reply','/add','26694KIXHIX','personId','defineProperty','/edit','Solve','Starting','pipe','threadId','_threadCommentDataSourceService','_threadCommentDataSource','syncUpdateMutationToColla','body','_injector','post','UNRECOGNIZED','searchParams','1855198XIUluK','_commentService','users','Solved','comment','280MONmQI','getComment','saveCommentToSnapshot','http','rangeId','78824gQlFqm','getThread','https','replies','331570TxwVOm','_httpService','Edit','requireSession','get','998388BhLRDA','content','name','slice','size','getMentions','unitId','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','createTimestamp','_threadCommentMentionDataService','error','addUser','replyId','5265192andlMg','Delete','delete','_configService','/universer-api/authz/collaborator','map','Unknown','://','dataSource','resolved','getUser','updateComment','addComment','707413nxknAd','stringify','OpenOrReOpen','userId','onStarting','rangeType','Add','/list','type','/universer-api/comment/unit/','add','_initDataSource'];_0x4272=function(){return _0x5b4ace;};return _0x4272();}const ve='thread-comment-data-source.config',_e={};var Y=Object[_0x31765f(0x18a)],fe=Object[_0x31765f(0x1e4)],Ie=(_0x242dca,_0x37a461,_0x492287)=>_0x37a461 in _0x242dca?Y(_0x242dca,_0x37a461,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x492287}):_0x242dca[_0x37a461]=_0x492287,Se=(_0x565948,_0x228ffa,_0x15cee4,_0x14af0c)=>{const _0x547ec1=_0x31765f;for(var _0x3df0a0=_0x14af0c>0x1?void 0x0:_0x14af0c?fe(_0x228ffa,_0x15cee4):_0x228ffa,_0xc7eb5b=_0x565948[_0x547ec1(0x1e9)]-0x1,_0x53c17b;_0xc7eb5b>=0x0;_0xc7eb5b--)(_0x53c17b=_0x565948[_0xc7eb5b])&&(_0x3df0a0=(_0x14af0c?_0x53c17b(_0x228ffa,_0x15cee4,_0x3df0a0):_0x53c17b(_0x3df0a0))||_0x3df0a0);return _0x14af0c&&_0x3df0a0&&Y(_0x228ffa,_0x15cee4,_0x3df0a0),_0x3df0a0;},j=(_0x1de245,_0xe7f0c2)=>(_0x5167fa,_0x3f8856)=>_0xe7f0c2(_0x5167fa,_0x3f8856,_0x1de245),G=(_0x112ae7,_0x3f3a9a,_0x4ed1cc)=>Ie(_0x112ae7,typeof _0x3f3a9a!='symbol'?_0x3f3a9a+'':_0x3f3a9a,_0x4ed1cc);let O=class extends _0x51349b{constructor(_0x1f77c2=_e,_0xaecccf,_0x228b3e){const _0x2cc739=_0x31765f;super(),this[_0x2cc739(0x1f7)]=_0x1f77c2,this[_0x2cc739(0x194)]=_0xaecccf,this['_configService']=_0x228b3e;const {..._0x27b173}=this[_0x2cc739(0x1f7)];this[_0x2cc739(0x1bd)]['setConfig'](ve,_0x27b173);}[_0x31765f(0x1cb)](){const _0x6c530f=_0x31765f;[[C],[D],[S],[b]][_0x6c530f(0x1de)](_0x6dec22=>{const _0x17a663=_0x6c530f;this[_0x17a663(0x194)][_0x17a663(0x1d1)](_0x6dec22);});}};G(O,'pluginName',X),G(O,_0x31765f(0x1cf),_0x339b2a['UNIVER_UNKNOWN']),O=Se([_0x126a73(_0x52dd79,_0x2efec0,_0x41305d),j(0x1,_0x239a9d(_0x2bb676)),j(0x2,_0x15d434)],O);export{O as UniverThreadCommentDataSourcePlugin};
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,5 +1,5 @@
1
- import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
2
1
  import { IUniverThreadCommentDataSourceConfig } from './controllers/config.schema';
2
+ import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
3
3
  export declare class UniverThreadCommentDataSourcePlugin extends Plugin {
4
4
  private readonly _config;
5
5
  protected _injector: Injector;
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x502dd8,_0x2676d8){const _0x5eea22=_0xb838,_0x51178d=_0x502dd8();while(!![]){try{const _0x4dadd1=-parseInt(_0x5eea22(0x131))/0x1+-parseInt(_0x5eea22(0x14d))/0x2*(parseInt(_0x5eea22(0x161))/0x3)+-parseInt(_0x5eea22(0x12b))/0x4*(-parseInt(_0x5eea22(0x18f))/0x5)+-parseInt(_0x5eea22(0x167))/0x6+-parseInt(_0x5eea22(0x180))/0x7*(parseInt(_0x5eea22(0x162))/0x8)+parseInt(_0x5eea22(0x179))/0x9+parseInt(_0x5eea22(0x156))/0xa*(parseInt(_0x5eea22(0x151))/0xb);if(_0x4dadd1===_0x2676d8)break;else _0x51178d['push'](_0x51178d['shift']());}catch(_0x119c52){_0x51178d['push'](_0x51178d['shift']());}}}(_0x34ea,0x6bf02),function(_0x125a08,_0x3ddc67){const _0x304f4f=_0xb838;typeof exports==_0x304f4f(0x133)&&typeof module<'u'?_0x3ddc67(exports,require('@univerjs/core'),require(_0x304f4f(0x168)),require(_0x304f4f(0x11c)),require(_0x304f4f(0x108)),require(_0x304f4f(0x121)),require('dayjs'),require(_0x304f4f(0x15c))):typeof define==_0x304f4f(0x10d)&&define['amd']?define([_0x304f4f(0x123),_0x304f4f(0x174),_0x304f4f(0x168),_0x304f4f(0x11c),_0x304f4f(0x108),_0x304f4f(0x121),_0x304f4f(0xff),_0x304f4f(0x15c)],_0x3ddc67):(_0x125a08=typeof globalThis<'u'?globalThis:_0x125a08||self,_0x3ddc67(_0x125a08['UniverThreadCommentDatasource']={},_0x125a08['UniverCore'],_0x125a08['UniverThreadComment'],_0x125a08['UniverThreadCommentUi'],_0x125a08[_0x304f4f(0x146)],_0x125a08[_0x304f4f(0x150)],_0x125a08[_0x304f4f(0xff)],_0x125a08[_0x304f4f(0x15c)]));}(this,function(_0x28ff37,_0x2f8dfc,_0x1e41b5,_0x403a44,_0x354310,_0x98bdec,_0x460625,_0x3f660d){'use strict';const _0x17094c=_0xb838;const _0x40cf9a='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x2d95cc=(_0x49ee54=>(_0x49ee54[_0x49ee54[_0x17094c(0x18b)]=0x0]=_0x17094c(0x18b),_0x49ee54[_0x49ee54[_0x17094c(0x17e)]=0x1]=_0x17094c(0x17e),_0x49ee54[_0x49ee54[_0x17094c(0x106)]=-0x1]=_0x17094c(0x106),_0x49ee54))(_0x2d95cc||{}),_0x13fb68=(_0x1b5117=>(_0x1b5117[_0x1b5117[_0x17094c(0x115)]=0x0]=_0x17094c(0x115),_0x1b5117[_0x1b5117[_0x17094c(0x11e)]=0x1]=_0x17094c(0x11e),_0x1b5117[_0x1b5117[_0x17094c(0x125)]=0x2]=_0x17094c(0x125),_0x1b5117[_0x1b5117['Edit']=0x3]=_0x17094c(0x135),_0x1b5117[_0x1b5117[_0x17094c(0x126)]=0x4]=_0x17094c(0x126),_0x1b5117[_0x1b5117['Solve']=0x5]=_0x17094c(0x142),_0x1b5117[_0x1b5117[_0x17094c(0x106)]=-0x1]=_0x17094c(0x106),_0x1b5117))(_0x13fb68||{});const _0x3bbabd=_0x86d533=>_0x460625(new Date(+_0x86d533))['format'](_0x17094c(0x14c)),_0x21f452=async(_0x1a3f6e,_0x1a4f81)=>{const _0xa26d8e=_0x17094c,_0x5e45b8=_0x1a3f6e['get'](_0x2f8dfc[_0xa26d8e(0x14b)]),_0x20dd2f=_0x1a3f6e[_0xa26d8e(0x173)](_0x98bdec[_0xa26d8e(0x155)]);_0x1a4f81[_0xa26d8e(0x185)](_0x13e94f=>{const _0x276df3=_0xa26d8e;_0x5e45b8[_0x276df3(0x186)](_0x13e94f)&&_0x1a4f81[_0x276df3(0x110)](_0x13e94f);}),_0x1a4f81[_0xa26d8e(0x15b)]&&(await _0x20dd2f['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x1a4f81]}}))[_0xa26d8e(0x10b)][_0xa26d8e(0x103)][_0xa26d8e(0x185)](_0x4890a5=>{_0x4890a5&&_0x5e45b8['addUser'](_0x4890a5);});};var _0x39a016=Object[_0x17094c(0x147)],_0x25aa48=Object[_0x17094c(0x17f)],_0x395ce1=(_0x1b2929,_0x206e73,_0x8d4b61,_0x36689f)=>{const _0x4653cd=_0x17094c;for(var _0x404fd3=_0x36689f>0x1?void 0x0:_0x36689f?_0x25aa48(_0x206e73,_0x8d4b61):_0x206e73,_0x3929f8=_0x1b2929[_0x4653cd(0x16e)]-0x1,_0x3488cd;_0x3929f8>=0x0;_0x3929f8--)(_0x3488cd=_0x1b2929[_0x3929f8])&&(_0x404fd3=(_0x36689f?_0x3488cd(_0x206e73,_0x8d4b61,_0x404fd3):_0x3488cd(_0x404fd3))||_0x404fd3);return _0x36689f&&_0x404fd3&&_0x39a016(_0x206e73,_0x8d4b61,_0x404fd3),_0x404fd3;},_0x18a7d9=(_0x55ebd3,_0x323745)=>(_0x2ef8bc,_0x3fe8a5)=>_0x323745(_0x2ef8bc,_0x3fe8a5,_0x55ebd3);function _0x3ce615(_0x1ec25d,_0x4e956c){const _0x350ea0=_0x17094c,_0x10fa95=_0x1ec25d['replies'][0x0];return{..._0x4e956c,'id':_0x10fa95[_0x350ea0(0x177)],'resolved':_0x1ec25d[_0x350ea0(0x17b)]===0x1,'dT':_0x3bbabd(_0x10fa95[_0x350ea0(0x120)]),'personId':_0x10fa95[_0x350ea0(0x13f)],'threadId':_0x10fa95[_0x350ea0(0x15a)]};}function _0x55a5a6(_0x2bc5db,_0x278895,_0x25b000){const _0x3f8a65=_0x17094c;var _0x35173a,_0xcd08f2;if(((_0xcd08f2=(_0x35173a=_0x2bc5db==null?void 0x0:_0x2bc5db[_0x3f8a65(0x15f)])==null?void 0x0:_0x35173a[_0x3f8a65(0x16e)])!=null?_0xcd08f2:0x0)>0x0){const _0x3f8bf9=(_0x21875b,_0x2a06e2)=>({'id':_0x21875b[_0x3f8a65(0x177)],'threadId':_0x21875b[_0x3f8a65(0x15a)],'dT':_0x3bbabd(_0x21875b[_0x3f8a65(0x120)]),'personId':_0x21875b['userId'],'resolved':_0x2bc5db[_0x3f8a65(0x17b)]===_0x2d95cc['Solved'],'unitId':_0x278895,'subUnitId':_0x25b000,'text':JSON[_0x3f8a65(0x16f)](_0x21875b['content']),'parentId':_0x2a06e2}),_0x19d842=_0x3f8bf9(_0x2bc5db[_0x3f8a65(0x15f)][0x0]);return{..._0x19d842,'children':_0x2bc5db[_0x3f8a65(0x15f)][_0x3f8a65(0x171)](0x1)[_0x3f8a65(0x183)](_0x5d0786=>_0x3f8bf9(_0x5d0786,_0x19d842['id']))};}return null;}let _0x4851af=class{constructor(_0x17bfa0,_0xd7f138,_0x3114dc,_0x555ef6){const _0x1540f2=_0x17094c;this['_httpService']=_0x17bfa0,this[_0x1540f2(0x145)]=_0xd7f138,this[_0x1540f2(0x14f)]=_0x3114dc,this[_0x1540f2(0x172)]=_0x555ef6;}async[_0x17094c(0x113)](_0x421f88){const _0x255a3c=_0x17094c;var _0x32fc19,_0x49e733;const {parentId:_0x5830a4,unitId:_0x279795,text:_0x576051,threadId:_0x4e1417}=_0x421f88,_0x416f6b=(_0x49e733=(_0x32fc19=_0x576051[_0x255a3c(0x11a)])==null?void 0x0:_0x32fc19[_0x255a3c(0x102)](_0x5e5999=>_0x5e5999[_0x255a3c(0x11b)]===_0x2f8dfc[_0x255a3c(0x14a)][_0x255a3c(0x153)])[_0x255a3c(0x183)](_0x4006de=>_0x4006de[_0x255a3c(0x178)]))!=null?_0x49e733:[],_0x558b6c=JSON[_0x255a3c(0x16c)](_0x576051),_0x4971db=(await this[_0x255a3c(0x14f)]['requireSession'](_0x279795))[_0x255a3c(0x188)]();if(_0x5830a4){const _0x27379a={'memberId':_0x4971db,'unitId':_0x279795,'content':_0x558b6c,'mention':_0x416f6b,'threadId':_0x4e1417},_0x1b825b=(await this['_httpService']['post'](_0x255a3c(0x159)+_0x279795+_0x255a3c(0x15e),{'body':_0x27379a}))[_0x255a3c(0x10b)][_0x255a3c(0x10a)];return{..._0x421f88,'id':_0x1b825b[_0x255a3c(0x177)],'dT':_0x460625(+_0x1b825b[_0x255a3c(0x120)])[_0x255a3c(0x17c)](_0x255a3c(0x14c)),'personId':_0x1b825b[_0x255a3c(0x13f)]};}else{const _0x5f1823={'memberId':_0x4971db,'unitId':_0x279795,'content':_0x558b6c,'mention':_0x416f6b},_0x121109=await this['_httpService']['post'](_0x255a3c(0x159)+_0x279795+_0x255a3c(0x137),{'body':_0x5f1823});return _0x3ce615(_0x121109[_0x255a3c(0x10b)][_0x255a3c(0x141)],_0x421f88);}}async[_0x17094c(0x100)](_0x9157d6){const _0x295bd0=_0x17094c;var _0x1d760c,_0x473913;const {text:_0x412edc,unitId:_0x1e1b6c}=_0x9157d6,_0x4db60d=(_0x473913=(_0x1d760c=_0x412edc[_0x295bd0(0x11a)])==null?void 0x0:_0x1d760c[_0x295bd0(0x102)](_0x2bfef2=>_0x2bfef2['rangeType']===_0x2f8dfc[_0x295bd0(0x14a)][_0x295bd0(0x153)])[_0x295bd0(0x183)](_0x3c0beb=>_0x3c0beb[_0x295bd0(0x178)]))!=null?_0x473913:[],_0x1723c4=JSON[_0x295bd0(0x16c)](_0x412edc),_0x4bf73d=_0x9157d6[_0x295bd0(0x15a)],_0x2ff47a=_0x9157d6['id'],_0x5a5e22={'memberId':(await this[_0x295bd0(0x14f)]['requireSession'](_0x1e1b6c))[_0x295bd0(0x188)](),'unitId':_0x1e1b6c,'threadId':_0x4bf73d,'mention':_0x4db60d,'content':_0x1723c4,'replyId':_0x2ff47a},_0x28cb67=await this[_0x295bd0(0x176)][_0x295bd0(0x17a)](_0x295bd0(0x159)+_0x1e1b6c+_0x295bd0(0x143),{'body':_0x5a5e22});return!_0x28cb67[_0x295bd0(0x10b)][_0x295bd0(0x10f)]||_0x28cb67[_0x295bd0(0x10b)][_0x295bd0(0x10f)]['code']===0x1;}async['resolveComment'](_0x37067b){const _0x5939be=_0x17094c,{unitId:_0x991f60}=_0x37067b,_0x4ef1d1=_0x37067b[_0x5939be(0x15a)],_0x694cf2={'memberId':this[_0x5939be(0x145)][_0x5939be(0xfb)]()[_0x5939be(0xfc)],'unitId':_0x991f60,'threadId':_0x4ef1d1,'solved':_0x37067b[_0x5939be(0x13b)]?_0x2d95cc[_0x5939be(0x17e)]:_0x2d95cc[_0x5939be(0x18b)]},_0x21dbcc=await this[_0x5939be(0x176)]['post'](_0x5939be(0x159)+_0x991f60+'/solved',{'body':_0x694cf2});return!_0x21dbcc[_0x5939be(0x10b)][_0x5939be(0x10f)]||_0x21dbcc['body']['error'][_0x5939be(0x144)]===0x1;}async[_0x17094c(0x14e)](_0x3f748e,_0x375b65,_0xdb279,_0x41d1a4){const _0x5d6efa=_0x17094c,_0x2525be={'memberId':(await this[_0x5d6efa(0x14f)][_0x5d6efa(0x10c)](_0x3f748e))[_0x5d6efa(0x188)](),'threadId':_0xdb279,'replyId':_0x41d1a4,'unitId':_0x3f748e},_0x28a358=await this['_httpService'][_0x5d6efa(0x17a)](_0x5d6efa(0x159)+_0x3f748e+_0x5d6efa(0x13c),{'body':_0x2525be});return!_0x28a358[_0x5d6efa(0x10b)][_0x5d6efa(0x10f)]||_0x28a358[_0x5d6efa(0x10b)]['error'][_0x5d6efa(0x144)]===0x1;}async[_0x17094c(0x152)](_0x971b75,_0xc3272d,_0x55e76c){const _0x387e14=_0x17094c,_0x5b2acc={'unitId':_0x971b75,'threadId':_0x55e76c},_0x580b27=await this[_0x387e14(0x176)][_0x387e14(0x17a)]('/universer-api/comment/unit/'+_0x971b75+_0x387e14(0xfe),{'body':_0x5b2acc}),_0x5ead10=_0x55e76c[_0x387e14(0x183)](_0x25d59e=>_0x55a5a6(_0x580b27[_0x387e14(0x10b)]['comments'][_0x25d59e],_0x971b75,_0xc3272d))['filter'](Boolean);return Object['values'](_0x580b27['body']['users'])[_0x387e14(0x185)](_0x377e12=>{const _0x223437=_0x387e14;this[_0x223437(0x145)]['addUser'](_0x377e12);}),_0x5ead10;}['saveCommentToSnapshot'](_0xc105b0){const _0x575ae8=_0x17094c;return{'id':_0xc105b0['id'],'threadId':_0xc105b0[_0x575ae8(0x15a)],'ref':_0xc105b0[_0x575ae8(0xfd)]};}};_0x4851af=_0x395ce1([_0x18a7d9(0x0,_0x2f8dfc[_0x17094c(0x116)](_0x98bdec[_0x17094c(0x155)])),_0x18a7d9(0x1,_0x2f8dfc['Inject'](_0x2f8dfc[_0x17094c(0x14b)])),_0x18a7d9(0x2,_0x2f8dfc[_0x17094c(0x116)](_0x354310[_0x17094c(0x12d)])),_0x18a7d9(0x3,_0x2f8dfc[_0x17094c(0x116)](_0x2f8dfc[_0x17094c(0x189)]))],_0x4851af);var _0x98df18=Object[_0x17094c(0x147)],_0xf6a991=Object['getOwnPropertyDescriptor'],_0x4d47d5=(_0x32a395,_0x33b436,_0x5386a6,_0x3837b2)=>{const _0x14f9f8=_0x17094c;for(var _0x5473f7=_0x3837b2>0x1?void 0x0:_0x3837b2?_0xf6a991(_0x33b436,_0x5386a6):_0x33b436,_0x458406=_0x32a395[_0x14f9f8(0x16e)]-0x1,_0x55a69d;_0x458406>=0x0;_0x458406--)(_0x55a69d=_0x32a395[_0x458406])&&(_0x5473f7=(_0x3837b2?_0x55a69d(_0x33b436,_0x5386a6,_0x5473f7):_0x55a69d(_0x5473f7))||_0x5473f7);return _0x3837b2&&_0x5473f7&&_0x98df18(_0x33b436,_0x5386a6,_0x5473f7),_0x5473f7;},_0x4d3475=(_0x33041d,_0x153a31)=>(_0x495c72,_0x3e856f)=>_0x153a31(_0x495c72,_0x3e856f,_0x33041d);let _0x43e2b7=class{constructor(_0x35271b){const _0x381cb7=_0x17094c;this[_0x381cb7(0x176)]=_0x35271b;}async[_0x17094c(0x148)](_0x1e5045,_0x5d07cb,_0x4de3ca){const _0x25d0e4=_0x17094c,_0x589aec=new URL(window['location'][_0x25d0e4(0x10e)])[_0x25d0e4(0x114)]['get'](_0x25d0e4(0x149));if(!_0x589aec)return[];const _0x5d2457=window['location'][_0x25d0e4(0x182)],_0x39a9c4=window['location'][_0x25d0e4(0x160)]===_0x25d0e4(0x101)?_0x25d0e4(0x18a):_0x25d0e4(0x175);return(await this['_httpService'][_0x25d0e4(0x173)](_0x39a9c4+_0x25d0e4(0x140)+_0x5d2457+_0x25d0e4(0x158),{'params':{'objectID':_0x589aec,'unitID':_0x589aec}}))[_0x25d0e4(0x10b)]['collaborators'][_0x25d0e4(0x183)](_0x4aeffb=>{const _0x17b416=_0x25d0e4;var _0xfd8929,_0x320491,_0x2ff8e4,_0x318123,_0x254230,_0x2df42f;return{'id':(_0x320491=(_0xfd8929=_0x4aeffb['subject'])==null?void 0x0:_0xfd8929[_0x17b416(0xfc)])!=null?_0x320491:'','label':(_0x318123=(_0x2ff8e4=_0x4aeffb[_0x17b416(0x129)])==null?void 0x0:_0x2ff8e4[_0x17b416(0x132)])!=null?_0x318123:'','icon':(_0x2df42f=(_0x254230=_0x4aeffb['subject'])==null?void 0x0:_0x254230['avatar'])!=null?_0x2df42f:'','type':_0x17b416(0x11f)};});}};_0x43e2b7=_0x4d47d5([_0x4d3475(0x0,_0x2f8dfc[_0x17094c(0x116)](_0x98bdec['HTTPService']))],_0x43e2b7);var _0x494236=Object[_0x17094c(0x147)],_0x5c6e76=Object[_0x17094c(0x17f)],_0x4c3795=(_0x470cf0,_0xc05c00,_0x41a88b,_0x515f16)=>{const _0x2ce0bc=_0x17094c;for(var _0x470d21=_0x515f16>0x1?void 0x0:_0x515f16?_0x5c6e76(_0xc05c00,_0x41a88b):_0xc05c00,_0x23b51a=_0x470cf0[_0x2ce0bc(0x16e)]-0x1,_0x483708;_0x23b51a>=0x0;_0x23b51a--)(_0x483708=_0x470cf0[_0x23b51a])&&(_0x470d21=(_0x515f16?_0x483708(_0xc05c00,_0x41a88b,_0x470d21):_0x483708(_0x470d21))||_0x470d21);return _0x515f16&&_0x470d21&&_0x494236(_0xc05c00,_0x41a88b,_0x470d21),_0x470d21;},_0x3f38be=(_0x61a94a,_0x568f56)=>(_0x5056b1,_0x418fdf)=>_0x568f56(_0x5056b1,_0x418fdf,_0x61a94a);let _0x2a1206=class extends _0x2f8dfc[_0x17094c(0x18c)]{constructor(_0x327058,_0x4ddf68,_0x52f602,_0x1ec06f){const _0x1af0a2=_0x17094c;super(),this[_0x1af0a2(0x163)]=_0x327058,this[_0x1af0a2(0x111)]=_0x4ddf68,this['_threadCommentMentionDataService']=_0x52f602,this[_0x1af0a2(0x130)]=_0x1ec06f,this[_0x1af0a2(0x127)]();}[_0x17094c(0x127)](){const _0x1abcce=_0x17094c;this[_0x1abcce(0x163)][_0x1abcce(0x105)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x1abcce(0x107)]=!0x1,this[_0x1abcce(0x12c)]['dataSource']=this[_0x1abcce(0x130)];}};_0x2a1206=_0x4c3795([_0x2f8dfc[_0x17094c(0x154)](_0x2f8dfc['LifecycleStages'][_0x17094c(0x12e)],_0x2a1206),_0x3f38be(0x0,_0x1e41b5[_0x17094c(0x164)]),_0x3f38be(0x1,_0x2f8dfc[_0x17094c(0x116)](_0x4851af)),_0x3f38be(0x2,_0x403a44[_0x17094c(0x15d)]),_0x3f38be(0x3,_0x2f8dfc[_0x17094c(0x116)](_0x43e2b7))],_0x2a1206);var _0x4a73b9=Object[_0x17094c(0x147)],_0x5c3794=Object[_0x17094c(0x17f)],_0xe972dc=(_0x5785a7,_0x4b76fd,_0xc709bc,_0x39a4f3)=>{const _0x52987b=_0x17094c;for(var _0x2abec6=_0x39a4f3>0x1?void 0x0:_0x39a4f3?_0x5c3794(_0x4b76fd,_0xc709bc):_0x4b76fd,_0x5f1686=_0x5785a7[_0x52987b(0x16e)]-0x1,_0xaa75c1;_0x5f1686>=0x0;_0x5f1686--)(_0xaa75c1=_0x5785a7[_0x5f1686])&&(_0x2abec6=(_0x39a4f3?_0xaa75c1(_0x4b76fd,_0xc709bc,_0x2abec6):_0xaa75c1(_0x2abec6))||_0x2abec6);return _0x39a4f3&&_0x2abec6&&_0x4a73b9(_0x4b76fd,_0xc709bc,_0x2abec6),_0x2abec6;},_0x168bd3=(_0x4a06ba,_0x1d5dd3)=>(_0x361a3b,_0x46a223)=>_0x1d5dd3(_0x361a3b,_0x46a223,_0x4a06ba);let _0x26b888=class extends _0x2f8dfc[_0x17094c(0x18c)]{constructor(_0x18e101,_0x21056a,_0x2f1a28,_0x1599ac){const _0x22398f=_0x17094c;super(),this[_0x22398f(0x184)]=_0x18e101,this['_threadCommentModel']=_0x21056a,this[_0x22398f(0x145)]=_0x2f1a28,this[_0x22398f(0x172)]=_0x1599ac,this[_0x22398f(0x124)](),this['_initUserSync']();}[_0x17094c(0x136)](){const _0x13109e=_0x17094c;this[_0x13109e(0x166)](this[_0x13109e(0x11d)][_0x13109e(0x16b)]['pipe'](_0x3f660d[_0x13109e(0x138)](0x10))[_0x13109e(0x13a)](_0x3b4cab=>{const _0xcedc97=_0x13109e,_0xc53499=new Set();_0x3b4cab['forEach'](_0x1db675=>{const _0x9de3ca=_0xb838;switch(_0x1db675[_0x9de3ca(0x112)]){case _0x9de3ca(0x13e):{const _0xe8d7bc=_0x1db675[_0x9de3ca(0x18d)]['personId'];_0xc53499['add'](_0xe8d7bc);break;}}}),_0x21f452(this[_0xcedc97(0x172)],_0xc53499);}));}['_init'](){const _0x544507=_0x17094c;this[_0x544507(0x166)](this['_commentService'][_0x544507(0x16b)][_0x544507(0x13a)](async _0x1594e5=>{const _0xc47650=_0x544507;var _0x145808,_0x53a1c1;const _0x5725f3=this[_0xc47650(0x11d)][_0xc47650(0x169)](_0x1594e5['unitId'],_0x1594e5['threadId']);if(!_0x5725f3)return;const {unitId:_0x19c4aa,subUnitId:_0x82f081}=_0x5725f3;switch(_0x1594e5[_0xc47650(0x11f)]&&this[_0xc47650(0x145)][_0xc47650(0x122)](_0x1594e5[_0xc47650(0x11f)]),_0x1594e5[_0xc47650(0x112)]){case _0x13fb68[_0xc47650(0x11e)]:break;case _0x13fb68[_0xc47650(0x125)]:{this[_0xc47650(0x11d)][_0xc47650(0x113)](_0x19c4aa,_0x82f081,{'unitId':_0x19c4aa,'subUnitId':_0x82f081,'ref':'','id':_0x1594e5[_0xc47650(0x177)],'dT':_0x3bbabd(+_0x1594e5[_0xc47650(0x120)]),'threadId':_0x1594e5[_0xc47650(0x15a)],'personId':(_0x53a1c1=(_0x145808=_0x1594e5['user'])==null?void 0x0:_0x145808[_0xc47650(0xfc)])!=null?_0x53a1c1:_0x1594e5[_0xc47650(0x13f)],'text':JSON[_0xc47650(0x16f)](_0x1594e5['content']),'parentId':_0x5725f3['id']});break;}case _0x13fb68['Delete']:{const _0x4e533f=this[_0xc47650(0x11d)]['getComment'](_0x19c4aa,_0x82f081,_0x1594e5['replyId']);_0x4e533f&&_0x4e533f[_0xc47650(0x118)]&&this[_0xc47650(0x11d)][_0xc47650(0x14e)](_0x19c4aa,_0x82f081,_0x1594e5[_0xc47650(0x177)]);break;}case _0x13fb68[_0xc47650(0x135)]:{this['_threadCommentModel'][_0xc47650(0x100)](_0x19c4aa,_0x82f081,{'commentId':_0x1594e5[_0xc47650(0x177)],'text':JSON[_0xc47650(0x16f)](_0x1594e5[_0xc47650(0x165)])});break;}case _0x13fb68[_0xc47650(0x142)]:{const _0x30e169=this['_threadCommentModel'][_0xc47650(0x169)](_0x19c4aa,_0x1594e5[_0xc47650(0x15a)]);_0x30e169&&this[_0xc47650(0x11d)]['resolveComment'](_0x19c4aa,_0x82f081,_0x30e169['id'],_0x1594e5['solved']===_0x2d95cc[_0xc47650(0x17e)]);break;}}}));}};_0x26b888=_0xe972dc([_0x2f8dfc[_0x17094c(0x154)](_0x2f8dfc[_0x17094c(0x18e)]['Ready'],_0x26b888),_0x168bd3(0x0,_0x2f8dfc[_0x17094c(0x116)](_0x354310[_0x17094c(0x12f)])),_0x168bd3(0x1,_0x2f8dfc[_0x17094c(0x116)](_0x1e41b5[_0x17094c(0x104)])),_0x168bd3(0x2,_0x2f8dfc[_0x17094c(0x116)](_0x2f8dfc[_0x17094c(0x14b)])),_0x168bd3(0x3,_0x2f8dfc[_0x17094c(0x116)](_0x2f8dfc[_0x17094c(0x189)]))],_0x26b888);const _0x4895a5=_0x17094c(0x181),_0x4729d6={};var _0x419c73=Object[_0x17094c(0x147)],_0x561cca=Object[_0x17094c(0x17f)],_0x3f3fa2=(_0x516804,_0xd93909,_0x15e32e)=>_0xd93909 in _0x516804?_0x419c73(_0x516804,_0xd93909,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x15e32e}):_0x516804[_0xd93909]=_0x15e32e,_0x599226=(_0x2038de,_0x371610,_0x517f75,_0x178d56)=>{const _0x1e61a3=_0x17094c;for(var _0x5870f4=_0x178d56>0x1?void 0x0:_0x178d56?_0x561cca(_0x371610,_0x517f75):_0x371610,_0xb0edf0=_0x2038de[_0x1e61a3(0x16e)]-0x1,_0x1d9a02;_0xb0edf0>=0x0;_0xb0edf0--)(_0x1d9a02=_0x2038de[_0xb0edf0])&&(_0x5870f4=(_0x178d56?_0x1d9a02(_0x371610,_0x517f75,_0x5870f4):_0x1d9a02(_0x5870f4))||_0x5870f4);return _0x178d56&&_0x5870f4&&_0x419c73(_0x371610,_0x517f75,_0x5870f4),_0x5870f4;},_0x27a95a=(_0x3877f1,_0x11f81b)=>(_0x183022,_0x4c0a43)=>_0x11f81b(_0x183022,_0x4c0a43,_0x3877f1),_0x219808=(_0x5e7a2c,_0x4d5421,_0x41ada8)=>_0x3f3fa2(_0x5e7a2c,typeof _0x4d5421!=_0x17094c(0x119)?_0x4d5421+'':_0x4d5421,_0x41ada8);_0x28ff37['UniverThreadCommentDataSourcePlugin']=class extends _0x2f8dfc['Plugin']{constructor(_0x3dc7c1=_0x4729d6,_0x28602d,_0x58b021){const _0x5998bd=_0x17094c;super(),this[_0x5998bd(0x157)]=_0x3dc7c1,this[_0x5998bd(0x172)]=_0x28602d,this[_0x5998bd(0x109)]=_0x58b021;const {..._0x34e9e6}=this[_0x5998bd(0x157)];this[_0x5998bd(0x109)][_0x5998bd(0x134)](_0x4895a5,_0x34e9e6);}[_0x17094c(0x13d)](){const _0x6d190c=_0x17094c;[[_0x43e2b7],[_0x4851af],[_0x2a1206],[_0x26b888]][_0x6d190c(0x185)](_0x1f3572=>{const _0xa27f38=_0x6d190c;this[_0xa27f38(0x172)][_0xa27f38(0x13e)](_0x1f3572);});}},_0x219808(_0x28ff37[_0x17094c(0x16d)],_0x17094c(0x12a),_0x40cf9a),_0x219808(_0x28ff37[_0x17094c(0x16d)],_0x17094c(0x112),_0x2f8dfc[_0x17094c(0x187)][_0x17094c(0x16a)]),_0x28ff37[_0x17094c(0x16d)]=_0x599226([_0x2f8dfc[_0x17094c(0x139)](_0x1e41b5[_0x17094c(0x17d)],_0x403a44['UniverThreadCommentUIPlugin'],_0x354310[_0x17094c(0x170)]),_0x27a95a(0x1,_0x2f8dfc[_0x17094c(0x116)](_0x2f8dfc[_0x17094c(0x189)])),_0x27a95a(0x2,_0x2f8dfc[_0x17094c(0x117)])],_0x28ff37['UniverThreadCommentDataSourcePlugin']),Object[_0x17094c(0x147)](_0x28ff37,Symbol['toStringTag'],{'value':_0x17094c(0x128)});}));function _0xb838(_0x4fad82,_0x193ad5){const _0x34eacb=_0x34ea();return _0xb838=function(_0xb83829,_0xf65a9e){_0xb83829=_0xb83829-0xfb;let _0xb25501=_0x34eacb[_0xb83829];return _0xb25501;},_0xb838(_0x4fad82,_0x193ad5);}function _0x34ea(){const _0x8e8250=['Injector','https','OpenOrReOpen','Disposable','payload','LifecycleStages','544445umdrsw','getCurrentUser','userID','ref','/list','dayjs','updateComment','https:','filter','users','ThreadCommentModel','dataSource','UNRECOGNIZED','syncUpdateMutationToColla','@univerjs-pro/collaboration-client','_configService','reply','body','requireSession','function','href','error','delete','_threadCommentDataSource','type','addComment','searchParams','Unknown','Inject','IConfigService','parentId','symbol','customRanges','rangeType','@univerjs/thread-comment-ui','_threadCommentModel','Add','user','createTimestamp','@univerjs/network','addUser','exports','_init','Reply','Delete','_initDataSource','Module','subject','pluginName','24yxPgMl','_threadCommentMentionDataService','CollaborationSessionService','Starting','CommentService','_threadCommentMentionDataSource','452059XmmYYO','name','object','setConfig','Edit','_initUserSync','/add','bufferTime','DependentOn','subscribe','resolved','/delete','onStarting','add','userId','://','comment','Solve','/edit','code','_userService','UniverCollaborationClient','defineProperty','getMentions','unit','CustomRangeType','UserManagerService','YYYY/MM/DD\x20HH:mm','1042134ZWDacG','deleteComment','_sessionService','UniverNetwork','913cddXxQ','listComments','COMMENT','OnLifecycle','HTTPService','85620GTjrkh','_config','/universer-api/authz/collaborator','/universer-api/comment/unit/','threadId','size','rxjs','IThreadCommentMentionDataService','/reply','replies','protocol','3GhCdJn','8904TloJKl','_threadCommentDataSourceService','IThreadCommentDataSourceService','content','disposeWithMe','1473414AvEMBc','@univerjs/thread-comment','getThread','UNIVER_UNKNOWN','commentUpdate$','stringify','UniverThreadCommentDataSourcePlugin','length','parse','UniverCollaborationClientPlugin','slice','_injector','get','@univerjs/core','http','_httpService','replyId','rangeId','5806782HaDqQo','post','solved','format','UniverThreadCommentPlugin','Solved','getOwnPropertyDescriptor','2191RENyoG','thread-comment-data-source.config','host','map','_commentService','forEach','getUser','UniverInstanceType','getMemberID'];_0x34ea=function(){return _0x8e8250;};return _0x34ea();}
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)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.2.15",
3
+ "version": "0.3.0-alpha.0",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,26 +45,31 @@
45
45
  "peerDependencies": {
46
46
  "dayjs": ">=1.11.0",
47
47
  "rxjs": ">=7.0.0",
48
- "@univerjs-pro/collaboration-client": "0.2.15",
49
- "@univerjs/core": "0.2.15",
50
- "@univerjs/network": "0.2.15",
51
- "@univerjs/thread-comment": "0.2.15",
52
- "@univerjs/thread-comment-ui": "0.2.15"
48
+ "@univerjs-pro/collaboration-client": "0.3.0-alpha.0",
49
+ "@univerjs/core": "0.3.0-alpha.0",
50
+ "@univerjs-pro/license": "0.3.0-alpha.0",
51
+ "@univerjs/thread-comment-ui": "0.3.0-alpha.0",
52
+ "@univerjs/network": "0.3.0-alpha.0",
53
+ "@univerjs/thread-comment": "0.3.0-alpha.0"
53
54
  },
54
55
  "dependencies": {
55
56
  "dayjs": "^1.11.13",
56
- "@univerjs-pro/facade": "0.2.15",
57
- "@univerjs/core": "0.2.15",
58
- "@univerjs/protocol": "0.1.39-alpha.15",
59
- "@univerjs/uniscript": "0.2.15",
60
- "@univerjs/network": "0.2.15"
57
+ "@univerjs-pro/collaboration-client": "0.3.0-alpha.0",
58
+ "@univerjs-pro/facade": "0.3.0-alpha.0",
59
+ "@univerjs/core": "0.3.0-alpha.0",
60
+ "@univerjs-pro/license": "0.3.0-alpha.0",
61
+ "@univerjs/network": "0.3.0-alpha.0",
62
+ "@univerjs/thread-comment": "0.3.0-alpha.0",
63
+ "@univerjs/protocol": "0.1.39-alpha.22",
64
+ "@univerjs/thread-comment-ui": "0.3.0-alpha.0",
65
+ "@univerjs/uniscript": "0.3.0-alpha.0"
61
66
  },
62
67
  "devDependencies": {
63
68
  "rxjs": "^7.8.1",
64
69
  "typescript": "^5.6.2",
65
- "vite": "^5.4.5",
66
- "vitest": "^2.1.0",
67
- "@univerjs-infra/shared": "0.2.15"
70
+ "vite": "^5.4.8",
71
+ "vitest": "^2.1.1",
72
+ "@univerjs-infra/shared": "0.3.0-alpha.0"
68
73
  },
69
74
  "univerSpace": {
70
75
  ".": {