@univerjs-pro/thread-comment-datasource 0.2.15 → 0.3.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/types/plugin.d.ts +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +19 -14
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 _0x50539d=_0x47f8;function _0x2c92(){const _0x43da5b=['forEach','OnLifecycle','customRanges','code','_threadCommentMentionDataService','toStringTag','dataSource','Unknown','getComment','host','comment','/universer-api/authz/collaborator','IThreadCommentDataSourceService','resolved','_config','requireSession','_initDataSource','UniverInstanceType','UNRECOGNIZED','_configService','UniverThreadCommentUIPlugin','content','/edit','51248ZEdhga','_httpService','dayjs','Edit','Reply','filter','userID','_threadCommentModel','UniverThreadCommentPlugin','get','addComment','/reply','slice','commentUpdate$','symbol','_sessionService','userId','/add','error','rxjs','location','HTTPService','@univerjs/thread-comment','10350414MhHzHE','thread-comment-data-source.config','replies','@univerjs-pro/collaboration-client','setConfig','@univerjs/core','1gcoOSM','payload','OpenOrReOpen','length','reply','@univerjs/thread-comment-ui','post','https:','ThreadCommentModel','add','931GOaVzI','YYYY/MM/DD\x20HH:mm','UniverLicensePlugin','ref','://','Injector','collaborators','_threadCommentDataSource','getThread','993435ywjBhk','COMMENT','LifecycleStages','stringify','/delete','subscribe','disposeWithMe','listComments','unitId','_threadCommentMentionDataSource','users','Add','avatar','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','pluginName','_init','onStarting','user','protocol','getUser','unit','5355964LqWpBH','syncUpdateMutationToColla','subject','comments','searchParams','_threadCommentDataSourceService','replyId','defineProperty','Inject','values','Solved','/solved','47661570PGQlGI','3082124tItkIw','42SdffWU','getMentions','Plugin','https','UNIVER_UNKNOWN','/list','getOwnPropertyDescriptor','map','threadId','UserManagerService','CommentService','UniverThreadCommentDataSourcePlugin','resolveComment','body','personId','_userService','getCurrentUser','_injector','size','1301847uuhiSo','pipe','type','/universer-api/comment/unit/','getMemberID','parse','rangeType','addUser','createTimestamp','name','Delete','Ready','_commentService'];_0x2c92=function(){return _0x43da5b;};return _0x2c92();}(function(_0x5469db,_0x5af784){const _0x4247e0=_0x47f8,_0x2a379f=_0x5469db();while(!![]){try{const _0x2f5e12=parseInt(_0x4247e0(0x1b0))/0x1*(-parseInt(_0x4247e0(0x1e6))/0x2)+-parseInt(_0x4247e0(0x1fa))/0x3+-parseInt(_0x4247e0(0x1d9))/0x4+parseInt(_0x4247e0(0x1c3))/0x5*(parseInt(_0x4247e0(0x1e7))/0x6)+parseInt(_0x4247e0(0x1ba))/0x7*(-parseInt(_0x4247e0(0x193))/0x8)+-parseInt(_0x4247e0(0x1aa))/0x9+parseInt(_0x4247e0(0x1e5))/0xa;if(_0x2f5e12===_0x5af784)break;else _0x2a379f['push'](_0x2a379f['shift']());}catch(_0x2c65df){_0x2a379f['push'](_0x2a379f['shift']());}}}(_0x2c92,0xcd4d8));Object[_0x50539d(0x1e0)](exports,Symbol[_0x50539d(0x20c)],{'value':'Module'});const c=require(_0x50539d(0x1af)),g=require(_0x50539d(0x1a9)),N=require(_0x50539d(0x1b5)),y=require(_0x50539d(0x1ad)),E=require('@univerjs-pro/license'),q=require(_0x50539d(0x1a6)),O=require('@univerjs/network'),$=require(_0x50539d(0x195)),x=_0x50539d(0x1d0);var p=(_0xddacba=>(_0xddacba[_0xddacba[_0x50539d(0x1b2)]=0x0]=_0x50539d(0x1b2),_0xddacba[_0xddacba['Solved']=0x1]=_0x50539d(0x1e3),_0xddacba[_0xddacba[_0x50539d(0x18e)]=-0x1]=_0x50539d(0x18e),_0xddacba))(p||{}),v=(_0x3d547a=>(_0x3d547a[_0x3d547a['Unknown']=0x0]=_0x50539d(0x20e),_0x3d547a[_0x3d547a[_0x50539d(0x1ce)]=0x1]=_0x50539d(0x1ce),_0x3d547a[_0x3d547a['Reply']=0x2]='Reply',_0x3d547a[_0x3d547a[_0x50539d(0x196)]=0x3]=_0x50539d(0x196),_0x3d547a[_0x3d547a[_0x50539d(0x204)]=0x4]=_0x50539d(0x204),_0x3d547a[_0x3d547a['Solve']=0x5]='Solve',_0x3d547a[_0x3d547a[_0x50539d(0x18e)]=-0x1]=_0x50539d(0x18e),_0x3d547a))(v||{});const P=_0x10c5fe=>$(new Date(+_0x10c5fe))['format'](_0x50539d(0x1bb)),L=async(_0x396c58,_0x5632db)=>{const _0x1a5b78=_0x50539d,_0x4faadb=_0x396c58['get'](c[_0x1a5b78(0x1f0)]),_0x4b8e9a=_0x396c58[_0x1a5b78(0x19c)](O[_0x1a5b78(0x1a8)]);_0x5632db['forEach'](_0x1f9900=>{const _0x20fbb2=_0x1a5b78;_0x4faadb[_0x20fbb2(0x1d7)](_0x1f9900)&&_0x5632db['delete'](_0x1f9900);}),_0x5632db[_0x1a5b78(0x1f9)]&&(await _0x4b8e9a[_0x1a5b78(0x19c)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5632db]}}))[_0x1a5b78(0x1f4)][_0x1a5b78(0x1cd)][_0x1a5b78(0x207)](_0x557a45=>{const _0x5e9937=_0x1a5b78;_0x557a45&&_0x4faadb[_0x5e9937(0x201)](_0x557a45);});};var Y=Object[_0x50539d(0x1e0)],G=Object[_0x50539d(0x1ed)],H=(_0x4a77fa,_0x2ee927,_0x44001b,_0x54b175)=>{for(var _0x2f14fb=_0x54b175>0x1?void 0x0:_0x54b175?G(_0x2ee927,_0x44001b):_0x2ee927,_0xa2c84=_0x4a77fa['length']-0x1,_0x234b83;_0xa2c84>=0x0;_0xa2c84--)(_0x234b83=_0x4a77fa[_0xa2c84])&&(_0x2f14fb=(_0x54b175?_0x234b83(_0x2ee927,_0x44001b,_0x2f14fb):_0x234b83(_0x2f14fb))||_0x2f14fb);return _0x54b175&&_0x2f14fb&&Y(_0x2ee927,_0x44001b,_0x2f14fb),_0x2f14fb;},I=(_0x396fe0,_0x2b8a56)=>(_0x4d8296,_0x2e59f0)=>_0x2b8a56(_0x4d8296,_0x2e59f0,_0x396fe0);let f=class extends c['Disposable']{constructor(_0x9c29fb,_0xb6be02,_0x512584,_0x57b66a){const _0x52465d=_0x50539d;super(),this['_commentService']=_0x9c29fb,this['_threadCommentModel']=_0xb6be02,this[_0x52465d(0x1f6)]=_0x512584,this['_injector']=_0x57b66a,this[_0x52465d(0x1d3)](),this['_initUserSync']();}['_initUserSync'](){const _0x54a158=_0x50539d;this[_0x54a158(0x1c9)](this[_0x54a158(0x19a)]['commentUpdate$'][_0x54a158(0x1fb)](q['bufferTime'](0x10))[_0x54a158(0x1c8)](_0x251459=>{const _0x276441=_0x54a158,_0x5351a1=new Set();_0x251459[_0x276441(0x207)](_0x2310c0=>{const _0x4b9ca9=_0x276441;switch(_0x2310c0[_0x4b9ca9(0x1fc)]){case _0x4b9ca9(0x1b9):{const _0x15451f=_0x2310c0[_0x4b9ca9(0x1b1)][_0x4b9ca9(0x1f5)];_0x5351a1['add'](_0x15451f);break;}}}),L(this['_injector'],_0x5351a1);}));}[_0x50539d(0x1d3)](){const _0x40c78f=_0x50539d;this[_0x40c78f(0x1c9)](this[_0x40c78f(0x206)][_0x40c78f(0x1a0)][_0x40c78f(0x1c8)](async _0x7b2f89=>{const _0x31176e=_0x40c78f;var _0xa46c48,_0x22b4c3;const _0x18fb11=this['_threadCommentModel'][_0x31176e(0x1c2)](_0x7b2f89[_0x31176e(0x1cb)],_0x7b2f89[_0x31176e(0x1ef)]);if(!_0x18fb11)return;const {unitId:_0x352e85,subUnitId:_0x325527}=_0x18fb11;switch(_0x7b2f89['user']&&this['_userService']['addUser'](_0x7b2f89[_0x31176e(0x1d5)]),_0x7b2f89[_0x31176e(0x1fc)]){case v[_0x31176e(0x1ce)]:break;case v[_0x31176e(0x197)]:{this[_0x31176e(0x19a)][_0x31176e(0x19d)](_0x352e85,_0x325527,{'unitId':_0x352e85,'subUnitId':_0x325527,'ref':'','id':_0x7b2f89[_0x31176e(0x1df)],'dT':P(+_0x7b2f89[_0x31176e(0x202)]),'threadId':_0x7b2f89['threadId'],'personId':(_0x22b4c3=(_0xa46c48=_0x7b2f89[_0x31176e(0x1d5)])==null?void 0x0:_0xa46c48[_0x31176e(0x199)])!=null?_0x22b4c3:_0x7b2f89[_0x31176e(0x1a3)],'text':JSON[_0x31176e(0x1ff)](_0x7b2f89[_0x31176e(0x191)]),'parentId':_0x18fb11['id']});break;}case v[_0x31176e(0x204)]:{const _0x49705f=this[_0x31176e(0x19a)][_0x31176e(0x20f)](_0x352e85,_0x325527,_0x7b2f89[_0x31176e(0x1df)]);_0x49705f&&_0x49705f['parentId']&&this[_0x31176e(0x19a)]['deleteComment'](_0x352e85,_0x325527,_0x7b2f89[_0x31176e(0x1df)]);break;}case v[_0x31176e(0x196)]:{this[_0x31176e(0x19a)]['updateComment'](_0x352e85,_0x325527,{'commentId':_0x7b2f89[_0x31176e(0x1df)],'text':JSON[_0x31176e(0x1ff)](_0x7b2f89[_0x31176e(0x191)])});break;}case v['Solve']:{const _0x3b778f=this[_0x31176e(0x19a)][_0x31176e(0x1c2)](_0x352e85,_0x7b2f89[_0x31176e(0x1ef)]);_0x3b778f&&this['_threadCommentModel'][_0x31176e(0x1f3)](_0x352e85,_0x325527,_0x3b778f['id'],_0x7b2f89['solved']===p['Solved']);break;}}}));}};f=H([c['OnLifecycle'](c[_0x50539d(0x1c5)][_0x50539d(0x205)],f),I(0x0,c[_0x50539d(0x1e1)](y[_0x50539d(0x1f1)])),I(0x1,c[_0x50539d(0x1e1)](g[_0x50539d(0x1b8)])),I(0x2,c[_0x50539d(0x1e1)](c['UserManagerService'])),I(0x3,c[_0x50539d(0x1e1)](c[_0x50539d(0x1bf)]))],f);const A=_0x50539d(0x1ab),J={};var F=Object[_0x50539d(0x1e0)],Z=Object['getOwnPropertyDescriptor'],W=(_0x261eaa,_0x522eb5,_0x29a6cb,_0x3dc950)=>{for(var _0x2e8657=_0x3dc950>0x1?void 0x0:_0x3dc950?Z(_0x522eb5,_0x29a6cb):_0x522eb5,_0x3a81ee=_0x261eaa['length']-0x1,_0x28ca64;_0x3a81ee>=0x0;_0x3a81ee--)(_0x28ca64=_0x261eaa[_0x3a81ee])&&(_0x2e8657=(_0x3dc950?_0x28ca64(_0x522eb5,_0x29a6cb,_0x2e8657):_0x28ca64(_0x2e8657))||_0x2e8657);return _0x3dc950&&_0x2e8657&&F(_0x522eb5,_0x29a6cb,_0x2e8657),_0x2e8657;},S=(_0x38385e,_0x42354d)=>(_0x4df3bd,_0x2d7ebb)=>_0x42354d(_0x4df3bd,_0x2d7ebb,_0x38385e);function z(_0x5730af,_0x46c4d9){const _0x1d3949=_0x50539d,_0x50c3e7=_0x5730af[_0x1d3949(0x1ac)][0x0];return{..._0x46c4d9,'id':_0x50c3e7['replyId'],'resolved':_0x5730af['solved']===0x1,'dT':P(_0x50c3e7['createTimestamp']),'personId':_0x50c3e7['userId'],'threadId':_0x50c3e7[_0x1d3949(0x1ef)]};}function B(_0xda7ef4,_0x2f6b3b,_0x1ece20){const _0x2f4f14=_0x50539d;var _0x57d68a,_0x21b7a2;if(((_0x21b7a2=(_0x57d68a=_0xda7ef4==null?void 0x0:_0xda7ef4[_0x2f4f14(0x1ac)])==null?void 0x0:_0x57d68a[_0x2f4f14(0x1b3)])!=null?_0x21b7a2:0x0)>0x0){const _0x3628ee=(_0x4c1083,_0x566e42)=>({'id':_0x4c1083[_0x2f4f14(0x1df)],'threadId':_0x4c1083[_0x2f4f14(0x1ef)],'dT':P(_0x4c1083[_0x2f4f14(0x202)]),'personId':_0x4c1083[_0x2f4f14(0x1a3)],'resolved':_0xda7ef4['solved']===p[_0x2f4f14(0x1e3)],'unitId':_0x2f6b3b,'subUnitId':_0x1ece20,'text':JSON[_0x2f4f14(0x1ff)](_0x4c1083['content']),'parentId':_0x566e42}),_0x29175f=_0x3628ee(_0xda7ef4[_0x2f4f14(0x1ac)][0x0]);return{..._0x29175f,'children':_0xda7ef4[_0x2f4f14(0x1ac)][_0x2f4f14(0x19f)](0x1)[_0x2f4f14(0x1ee)](_0x1ea9e1=>_0x3628ee(_0x1ea9e1,_0x29175f['id']))};}return null;}let C=class{constructor(_0x5741c4,_0x5e1535,_0x17eaa3,_0x875db1){const _0x3ae825=_0x50539d;this[_0x3ae825(0x194)]=_0x5741c4,this['_userService']=_0x5e1535,this[_0x3ae825(0x1a2)]=_0x17eaa3,this[_0x3ae825(0x1f8)]=_0x875db1;}async[_0x50539d(0x19d)](_0x5e60df){const _0x40b6bf=_0x50539d;var _0x397b57,_0x18683f;const {parentId:_0x549fea,unitId:_0x2f312a,text:_0x231fd9,threadId:_0x1452a8}=_0x5e60df,_0x54bee9=(_0x18683f=(_0x397b57=_0x231fd9[_0x40b6bf(0x209)])==null?void 0x0:_0x397b57[_0x40b6bf(0x198)](_0x109bdb=>_0x109bdb[_0x40b6bf(0x200)]===c['CustomRangeType'][_0x40b6bf(0x1c4)])[_0x40b6bf(0x1ee)](_0x2a09be=>_0x2a09be['rangeId']))!=null?_0x18683f:[],_0x56559a=JSON[_0x40b6bf(0x1c6)](_0x231fd9),_0x3a05a0=(await this[_0x40b6bf(0x1a2)]['requireSession'](_0x2f312a))[_0x40b6bf(0x1fe)]();if(_0x549fea){const _0x4e88ac={'memberId':_0x3a05a0,'unitId':_0x2f312a,'content':_0x56559a,'mention':_0x54bee9,'threadId':_0x1452a8},_0x3ab7cd=(await this['_httpService'][_0x40b6bf(0x1b6)](_0x40b6bf(0x1fd)+_0x2f312a+_0x40b6bf(0x19e),{'body':_0x4e88ac}))[_0x40b6bf(0x1f4)][_0x40b6bf(0x1b4)];return{..._0x5e60df,'id':_0x3ab7cd[_0x40b6bf(0x1df)],'dT':$(+_0x3ab7cd[_0x40b6bf(0x202)])['format'](_0x40b6bf(0x1bb)),'personId':_0x3ab7cd[_0x40b6bf(0x1a3)]};}else{const _0x1d2e9a={'memberId':_0x3a05a0,'unitId':_0x2f312a,'content':_0x56559a,'mention':_0x54bee9},_0x58181a=await this[_0x40b6bf(0x194)][_0x40b6bf(0x1b6)](_0x40b6bf(0x1fd)+_0x2f312a+_0x40b6bf(0x1a4),{'body':_0x1d2e9a});return z(_0x58181a[_0x40b6bf(0x1f4)][_0x40b6bf(0x211)],_0x5e60df);}}async['updateComment'](_0x2ece23){const _0x4187d6=_0x50539d;var _0x576574,_0xc40e2f;const {text:_0x2d7671,unitId:_0x43386b}=_0x2ece23,_0x2cbdd1=(_0xc40e2f=(_0x576574=_0x2d7671[_0x4187d6(0x209)])==null?void 0x0:_0x576574[_0x4187d6(0x198)](_0x15c18a=>_0x15c18a[_0x4187d6(0x200)]===c['CustomRangeType'][_0x4187d6(0x1c4)])[_0x4187d6(0x1ee)](_0x4e28dd=>_0x4e28dd['rangeId']))!=null?_0xc40e2f:[],_0x6d2748=JSON[_0x4187d6(0x1c6)](_0x2d7671),_0x2fd12b=_0x2ece23[_0x4187d6(0x1ef)],_0x48cfec=_0x2ece23['id'],_0x3c033e={'memberId':(await this[_0x4187d6(0x1a2)][_0x4187d6(0x18b)](_0x43386b))[_0x4187d6(0x1fe)](),'unitId':_0x43386b,'threadId':_0x2fd12b,'mention':_0x2cbdd1,'content':_0x6d2748,'replyId':_0x48cfec},_0x242833=await this['_httpService'][_0x4187d6(0x1b6)]('/universer-api/comment/unit/'+_0x43386b+_0x4187d6(0x192),{'body':_0x3c033e});return!_0x242833[_0x4187d6(0x1f4)][_0x4187d6(0x1a5)]||_0x242833[_0x4187d6(0x1f4)]['error'][_0x4187d6(0x20a)]===0x1;}async['resolveComment'](_0x2911fb){const _0x48d8cb=_0x50539d,{unitId:_0x248253}=_0x2911fb,_0x488e76=_0x2911fb['threadId'],_0x440178={'memberId':this[_0x48d8cb(0x1f6)][_0x48d8cb(0x1f7)]()[_0x48d8cb(0x199)],'unitId':_0x248253,'threadId':_0x488e76,'solved':_0x2911fb[_0x48d8cb(0x214)]?p[_0x48d8cb(0x1e3)]:p[_0x48d8cb(0x1b2)]},_0x450f02=await this[_0x48d8cb(0x194)]['post']('/universer-api/comment/unit/'+_0x248253+_0x48d8cb(0x1e4),{'body':_0x440178});return!_0x450f02[_0x48d8cb(0x1f4)][_0x48d8cb(0x1a5)]||_0x450f02[_0x48d8cb(0x1f4)]['error'][_0x48d8cb(0x20a)]===0x1;}async['deleteComment'](_0x1d78da,_0x59dabe,_0x334034,_0x2e8edb){const _0x53fb44=_0x50539d,_0x418813={'memberId':(await this['_sessionService'][_0x53fb44(0x18b)](_0x1d78da))[_0x53fb44(0x1fe)](),'threadId':_0x334034,'replyId':_0x2e8edb,'unitId':_0x1d78da},_0xa91db1=await this[_0x53fb44(0x194)][_0x53fb44(0x1b6)](_0x53fb44(0x1fd)+_0x1d78da+_0x53fb44(0x1c7),{'body':_0x418813});return!_0xa91db1[_0x53fb44(0x1f4)][_0x53fb44(0x1a5)]||_0xa91db1[_0x53fb44(0x1f4)][_0x53fb44(0x1a5)]['code']===0x1;}async[_0x50539d(0x1ca)](_0x3a7723,_0x40a73d,_0x1a74e0){const _0x22c576=_0x50539d,_0x37a7f6={'unitId':_0x3a7723,'threadId':_0x1a74e0},_0x45ee08=await this[_0x22c576(0x194)][_0x22c576(0x1b6)](_0x22c576(0x1fd)+_0x3a7723+_0x22c576(0x1ec),{'body':_0x37a7f6}),_0x14a23f=_0x1a74e0[_0x22c576(0x1ee)](_0x35b90a=>B(_0x45ee08[_0x22c576(0x1f4)][_0x22c576(0x1dc)][_0x35b90a],_0x3a7723,_0x40a73d))[_0x22c576(0x198)](Boolean);return Object[_0x22c576(0x1e2)](_0x45ee08[_0x22c576(0x1f4)][_0x22c576(0x1cd)])[_0x22c576(0x207)](_0x8a6395=>{const _0x1a74cc=_0x22c576;this[_0x1a74cc(0x1f6)][_0x1a74cc(0x201)](_0x8a6395);}),_0x14a23f;}['saveCommentToSnapshot'](_0x275549){const _0x778b67=_0x50539d;return{'id':_0x275549['id'],'threadId':_0x275549[_0x778b67(0x1ef)],'ref':_0x275549[_0x778b67(0x1bd)]};}};C=W([S(0x0,c['Inject'](O['HTTPService'])),S(0x1,c[_0x50539d(0x1e1)](c[_0x50539d(0x1f0)])),S(0x2,c[_0x50539d(0x1e1)](y['CollaborationSessionService'])),S(0x3,c[_0x50539d(0x1e1)](c[_0x50539d(0x1bf)]))],C);var K=Object[_0x50539d(0x1e0)],V=Object[_0x50539d(0x1ed)],Q=(_0x24ed0c,_0x2bef9c,_0xd0096d,_0x3775b8)=>{const _0x4bfc37=_0x50539d;for(var _0x44d061=_0x3775b8>0x1?void 0x0:_0x3775b8?V(_0x2bef9c,_0xd0096d):_0x2bef9c,_0x4c7eb4=_0x24ed0c[_0x4bfc37(0x1b3)]-0x1,_0x2bf7ac;_0x4c7eb4>=0x0;_0x4c7eb4--)(_0x2bf7ac=_0x24ed0c[_0x4c7eb4])&&(_0x44d061=(_0x3775b8?_0x2bf7ac(_0x2bef9c,_0xd0096d,_0x44d061):_0x2bf7ac(_0x44d061))||_0x44d061);return _0x3775b8&&_0x44d061&&K(_0x2bef9c,_0xd0096d,_0x44d061),_0x44d061;},X=(_0x4b2a6b,_0x318f90)=>(_0x1f2765,_0x307439)=>_0x318f90(_0x1f2765,_0x307439,_0x4b2a6b);let D=class{constructor(_0x452304){const _0x27e141=_0x50539d;this[_0x27e141(0x194)]=_0x452304;}async[_0x50539d(0x1e8)](_0x32f909,_0x276f77,_0x47f7ce){const _0x1733b1=_0x50539d,_0x173f4a=new URL(window[_0x1733b1(0x1a7)]['href'])[_0x1733b1(0x1dd)]['get'](_0x1733b1(0x1d8));if(!_0x173f4a)return[];const _0x30c7aa=window[_0x1733b1(0x1a7)][_0x1733b1(0x210)],_0x2a6b16=window[_0x1733b1(0x1a7)][_0x1733b1(0x1d6)]===_0x1733b1(0x1b7)?_0x1733b1(0x1ea):'http';return(await this['_httpService'][_0x1733b1(0x19c)](_0x2a6b16+_0x1733b1(0x1be)+_0x30c7aa+_0x1733b1(0x212),{'params':{'objectID':_0x173f4a,'unitID':_0x173f4a}}))[_0x1733b1(0x1f4)][_0x1733b1(0x1c0)][_0x1733b1(0x1ee)](_0x8040e3=>{const _0x2e3f56=_0x1733b1;var _0x2162dc,_0x187f20,_0x1115e4,_0x445f82,_0x37a883,_0x33f784;return{'id':(_0x187f20=(_0x2162dc=_0x8040e3['subject'])==null?void 0x0:_0x2162dc[_0x2e3f56(0x199)])!=null?_0x187f20:'','label':(_0x445f82=(_0x1115e4=_0x8040e3[_0x2e3f56(0x1db)])==null?void 0x0:_0x1115e4[_0x2e3f56(0x203)])!=null?_0x445f82:'','icon':(_0x33f784=(_0x37a883=_0x8040e3[_0x2e3f56(0x1db)])==null?void 0x0:_0x37a883[_0x2e3f56(0x1cf)])!=null?_0x33f784:'','type':_0x2e3f56(0x1d5)};});}};D=Q([X(0x0,c[_0x50539d(0x1e1)](O[_0x50539d(0x1a8)]))],D);function _0x47f8(_0xc3419f,_0x58b90f){const _0x2c928d=_0x2c92();return _0x47f8=function(_0x47f81e,_0x4ad1ff){_0x47f81e=_0x47f81e-0x18b;let _0x350252=_0x2c928d[_0x47f81e];return _0x350252;},_0x47f8(_0xc3419f,_0x58b90f);}var k=Object[_0x50539d(0x1e0)],ee=Object[_0x50539d(0x1ed)],re=(_0x29f910,_0x2efe31,_0x40f44e,_0x5d2d66)=>{for(var _0x30f7c5=_0x5d2d66>0x1?void 0x0:_0x5d2d66?ee(_0x2efe31,_0x40f44e):_0x2efe31,_0x48f4e5=_0x29f910['length']-0x1,_0x270917;_0x48f4e5>=0x0;_0x48f4e5--)(_0x270917=_0x29f910[_0x48f4e5])&&(_0x30f7c5=(_0x5d2d66?_0x270917(_0x2efe31,_0x40f44e,_0x30f7c5):_0x270917(_0x30f7c5))||_0x30f7c5);return _0x5d2d66&&_0x30f7c5&&k(_0x2efe31,_0x40f44e,_0x30f7c5),_0x30f7c5;},_=(_0x467f81,_0x27b600)=>(_0x35a478,_0x356cc7)=>_0x27b600(_0x35a478,_0x356cc7,_0x467f81);let b=class extends c['Disposable']{constructor(_0xfdb7c,_0xbd4dda,_0x4068be,_0x207c01){const _0x47f4b6=_0x50539d;super(),this[_0x47f4b6(0x1de)]=_0xfdb7c,this[_0x47f4b6(0x1c1)]=_0xbd4dda,this[_0x47f4b6(0x20b)]=_0x4068be,this['_threadCommentMentionDataSource']=_0x207c01,this[_0x47f4b6(0x18c)]();}['_initDataSource'](){const _0x435208=_0x50539d;this[_0x435208(0x1de)][_0x435208(0x20d)]=this[_0x435208(0x1c1)],this[_0x435208(0x1de)][_0x435208(0x1da)]=!0x1,this['_threadCommentMentionDataService'][_0x435208(0x20d)]=this[_0x435208(0x1cc)];}};b=re([c[_0x50539d(0x208)](c[_0x50539d(0x1c5)]['Starting'],b),_(0x0,g[_0x50539d(0x213)]),_(0x1,c[_0x50539d(0x1e1)](C)),_(0x2,N['IThreadCommentMentionDataService']),_(0x3,c[_0x50539d(0x1e1)](D))],b);var U=Object[_0x50539d(0x1e0)],te=Object[_0x50539d(0x1ed)],se=(_0x3e584b,_0x539b19,_0x1bb44f)=>_0x539b19 in _0x3e584b?U(_0x3e584b,_0x539b19,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1bb44f}):_0x3e584b[_0x539b19]=_0x1bb44f,ne=(_0x56fc1f,_0x3fabac,_0x54e778,_0xf3fa54)=>{const _0x11eebc=_0x50539d;for(var _0x43fa5c=_0xf3fa54>0x1?void 0x0:_0xf3fa54?te(_0x3fabac,_0x54e778):_0x3fabac,_0x1b4d9f=_0x56fc1f[_0x11eebc(0x1b3)]-0x1,_0x202dd5;_0x1b4d9f>=0x0;_0x1b4d9f--)(_0x202dd5=_0x56fc1f[_0x1b4d9f])&&(_0x43fa5c=(_0xf3fa54?_0x202dd5(_0x3fabac,_0x54e778,_0x43fa5c):_0x202dd5(_0x43fa5c))||_0x43fa5c);return _0xf3fa54&&_0x43fa5c&&U(_0x3fabac,_0x54e778,_0x43fa5c),_0x43fa5c;},T=(_0x130afc,_0x1e773d)=>(_0x4ba982,_0x30e026)=>_0x1e773d(_0x4ba982,_0x30e026,_0x130afc),R=(_0x15dc9e,_0xc6a1b5,_0x47ee61)=>se(_0x15dc9e,typeof _0xc6a1b5!=_0x50539d(0x1a1)?_0xc6a1b5+'':_0xc6a1b5,_0x47ee61);exports[_0x50539d(0x1f2)]=class extends c[_0x50539d(0x1e9)]{constructor(_0x175a8e=J,_0x312077,_0x1569f7){const _0x33f209=_0x50539d;super(),this[_0x33f209(0x215)]=_0x175a8e,this[_0x33f209(0x1f8)]=_0x312077,this[_0x33f209(0x18f)]=_0x1569f7;const {..._0x32696c}=this[_0x33f209(0x215)];this[_0x33f209(0x18f)][_0x33f209(0x1ae)](A,_0x32696c);}[_0x50539d(0x1d4)](){const _0x41327e=_0x50539d;[[D],[C],[b],[f]][_0x41327e(0x207)](_0x371431=>{const _0x360dad=_0x41327e;this[_0x360dad(0x1f8)][_0x360dad(0x1b9)](_0x371431);});}},R(exports[_0x50539d(0x1f2)],_0x50539d(0x1d2),x),R(exports[_0x50539d(0x1f2)],_0x50539d(0x1fc),c[_0x50539d(0x18d)][_0x50539d(0x1eb)]),exports[_0x50539d(0x1f2)]=ne([c['DependentOn'](g[_0x50539d(0x19b)],N[_0x50539d(0x190)],y['UniverCollaborationClientPlugin'],E[_0x50539d(0x1bc)]),T(0x1,c[_0x50539d(0x1e1)](c[_0x50539d(0x1bf)])),T(0x2,c[_0x50539d(0x1d1)])],exports[_0x50539d(0x1f2)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _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 _0xe2d821=_0x47bf;(function(_0x36fb22,_0x3eb2e3){const _0x2ccc19=_0x47bf,_0x2e3c35=_0x36fb22();while(!![]){try{const _0x5af6bc=-parseInt(_0x2ccc19(0x1d0))/0x1*(parseInt(_0x2ccc19(0x1f9))/0x2)+-parseInt(_0x2ccc19(0x1cd))/0x3*(parseInt(_0x2ccc19(0x216))/0x4)+parseInt(_0x2ccc19(0x1e7))/0x5*(parseInt(_0x2ccc19(0x220))/0x6)+-parseInt(_0x2ccc19(0x1eb))/0x7+parseInt(_0x2ccc19(0x221))/0x8*(parseInt(_0x2ccc19(0x21a))/0x9)+-parseInt(_0x2ccc19(0x211))/0xa+parseInt(_0x2ccc19(0x1fe))/0xb;if(_0x5af6bc===_0x3eb2e3)break;else _0x2e3c35['push'](_0x2e3c35['shift']());}catch(_0x6bcd26){_0x2e3c35['push'](_0x2e3c35['shift']());}}}(_0x4787,0x2c482));import{UserManagerService as _0x1398ac,OnLifecycle as _0xb139a8,LifecycleStages as _0x117143,Inject as _0x2d90da,Injector as _0x442235,Disposable as _0x43bd51,CustomRangeType as _0x42157a,UniverInstanceType as _0x341ef4,DependentOn as _0x5d261a,Plugin as _0x476fc3,IConfigService as _0xaa26c7}from'@univerjs/core';import{ThreadCommentModel as _0x325738,IThreadCommentDataSourceService as _0x581213,UniverThreadCommentPlugin as _0x1d0b94}from'@univerjs/thread-comment';function _0x47bf(_0x3d2ff1,_0x2d6e9e){const _0x47877a=_0x4787();return _0x47bf=function(_0x47bf46,_0x4712b5){_0x47bf46=_0x47bf46-0x1c6;let _0xa787dd=_0x47877a[_0x47bf46];return _0xa787dd;},_0x47bf(_0x3d2ff1,_0x2d6e9e);}import{IThreadCommentMentionDataService as _0xaf4732,UniverThreadCommentUIPlugin as _0x403add}from'@univerjs/thread-comment-ui';import{CommentService as _0x49a6d4,CollaborationSessionService as _0x112c6e,UniverCollaborationClientPlugin as _0x36fe94}from'@univerjs-pro/collaboration-client';function _0x4787(){const _0x5a7c40=['resolved','user','2967560wlozQa','_threadCommentMentionDataSource','_threadCommentDataSourceService','Unknown','href','565788MkjjBw','_initUserSync','_threadCommentMentionDataService','/list','733599saCRug','getMentions','userId','_threadCommentModel','addComment','setConfig','150QntuwU','24SmDpHO','avatar','collaborators','values','Edit','location','/add','_userService','/solved','replyId','subscribe','OpenOrReOpen','updateComment','getCurrentUser','_threadCommentDataSource','Starting','subject','Ready','body','https','personId','pluginName','syncUpdateMutationToColla','http','YYYY/MM/DD\x20HH:mm','Solve','format','createTimestamp','disposeWithMe','getMemberID','requireSession','add','_init','_sessionService','deleteComment','3ZFLuwW','forEach','rangeId','5992IGFkVo','stringify','code','length','filter','post','listComments','UNRECOGNIZED','users','commentUpdate$','/universer-api/authz/collaborator','getUser','_injector','/reply','content','saveCommentToSnapshot','Add','comment','thread-comment-data-source.config','COMMENT','resolveComment','_commentService','/universer-api/user/list','16115UxHfXh','Delete','reply','https:','2255645AkgPLq','searchParams','replies','map','addUser','customRanges','userID','_initDataSource','Reply','threadId','_httpService','rangeType','_configService','unitId','4IYWYSO','error','_config','solved','UNIVER_UNKNOWN','6915612RpIrvX','unit','://','getThread','defineProperty','size','get','symbol','type','parse','/universer-api/comment/unit/','parentId','protocol','comments','getOwnPropertyDescriptor','Solved','/delete'];_0x4787=function(){return _0x5a7c40;};return _0x4787();}import{UniverLicensePlugin as _0x3dedcc}from'@univerjs-pro/license';import{bufferTime as _0xbf8a55}from'rxjs';import{HTTPService as _0x5d5f1d}from'@univerjs/network';import _0x3f611e from'dayjs';const k='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var v=(_0x465002=>(_0x465002[_0x465002[_0xe2d821(0x22c)]=0x0]=_0xe2d821(0x22c),_0x465002[_0x465002[_0xe2d821(0x20d)]=0x1]=_0xe2d821(0x20d),_0x465002[_0x465002[_0xe2d821(0x1d7)]=-0x1]='UNRECOGNIZED',_0x465002))(v||{}),p=(_0x144086=>(_0x144086[_0x144086['Unknown']=0x0]=_0xe2d821(0x214),_0x144086[_0x144086['Add']=0x1]=_0xe2d821(0x1e0),_0x144086[_0x144086[_0xe2d821(0x1f3)]=0x2]='Reply',_0x144086[_0x144086[_0xe2d821(0x225)]=0x3]=_0xe2d821(0x225),_0x144086[_0x144086[_0xe2d821(0x1e8)]=0x4]='Delete',_0x144086[_0x144086[_0xe2d821(0x23a)]=0x5]=_0xe2d821(0x23a),_0x144086[_0x144086[_0xe2d821(0x1d7)]=-0x1]=_0xe2d821(0x1d7),_0x144086))(p||{});const w=_0x4ef3f2=>_0x3f611e(new Date(+_0x4ef3f2))['format'](_0xe2d821(0x239)),ee=async(_0x59866d,_0x234fd4)=>{const _0x483c32=_0xe2d821,_0x2cad2b=_0x59866d[_0x483c32(0x204)](_0x1398ac),_0x447a00=_0x59866d[_0x483c32(0x204)](_0x5d5f1d);_0x234fd4[_0x483c32(0x1ce)](_0xb470fe=>{const _0x562aee=_0x483c32;_0x2cad2b[_0x562aee(0x1db)](_0xb470fe)&&_0x234fd4['delete'](_0xb470fe);}),_0x234fd4[_0x483c32(0x203)]&&(await _0x447a00[_0x483c32(0x204)](_0x483c32(0x1e6),{'params':{'userIDs':[..._0x234fd4]}}))['body'][_0x483c32(0x1d8)][_0x483c32(0x1ce)](_0x3a2af8=>{const _0x4ca3fc=_0x483c32;_0x3a2af8&&_0x2cad2b[_0x4ca3fc(0x1ef)](_0x3a2af8);});};var re=Object[_0xe2d821(0x202)],te=Object[_0xe2d821(0x20c)],se=(_0x43e9a5,_0x143b40,_0x22374e,_0x1740bd)=>{const _0x37a4df=_0xe2d821;for(var _0x227450=_0x1740bd>0x1?void 0x0:_0x1740bd?te(_0x143b40,_0x22374e):_0x143b40,_0x3733b4=_0x43e9a5[_0x37a4df(0x1d3)]-0x1,_0x45414c;_0x3733b4>=0x0;_0x3733b4--)(_0x45414c=_0x43e9a5[_0x3733b4])&&(_0x227450=(_0x1740bd?_0x45414c(_0x143b40,_0x22374e,_0x227450):_0x45414c(_0x227450))||_0x227450);return _0x1740bd&&_0x227450&&re(_0x143b40,_0x22374e,_0x227450),_0x227450;},_=(_0x2a20fc,_0x3fc782)=>(_0x192b2c,_0x56faad)=>_0x3fc782(_0x192b2c,_0x56faad,_0x2a20fc);let S=class extends _0x43bd51{constructor(_0x2b2042,_0x411052,_0x108d82,_0x4c459e){const _0x4fbd85=_0xe2d821;super(),this[_0x4fbd85(0x1e5)]=_0x2b2042,this[_0x4fbd85(0x21d)]=_0x411052,this['_userService']=_0x108d82,this[_0x4fbd85(0x1dc)]=_0x4c459e,this['_init'](),this[_0x4fbd85(0x217)]();}[_0xe2d821(0x217)](){const _0x38172b=_0xe2d821;this[_0x38172b(0x1c6)](this['_threadCommentModel']['commentUpdate$']['pipe'](_0xbf8a55(0x10))[_0x38172b(0x22b)](_0x375a8b=>{const _0x17f782=_0x38172b,_0x3ec57d=new Set();_0x375a8b[_0x17f782(0x1ce)](_0x42edc=>{const _0x672d07=_0x17f782;switch(_0x42edc[_0x672d07(0x206)]){case _0x672d07(0x1c9):{const _0x1315e9=_0x42edc['payload'][_0x672d07(0x235)];_0x3ec57d[_0x672d07(0x1c9)](_0x1315e9);break;}}}),ee(this[_0x17f782(0x1dc)],_0x3ec57d);}));}[_0xe2d821(0x1ca)](){const _0x2a9101=_0xe2d821;this[_0x2a9101(0x1c6)](this[_0x2a9101(0x1e5)][_0x2a9101(0x1d9)][_0x2a9101(0x22b)](async _0x4e9e0b=>{const _0x2a86d9=_0x2a9101;var _0x133e23,_0x4882e4;const _0x102695=this[_0x2a86d9(0x21d)][_0x2a86d9(0x201)](_0x4e9e0b[_0x2a86d9(0x1f8)],_0x4e9e0b[_0x2a86d9(0x1f4)]);if(!_0x102695)return;const {unitId:_0x4933a2,subUnitId:_0x2f615b}=_0x102695;switch(_0x4e9e0b[_0x2a86d9(0x210)]&&this[_0x2a86d9(0x228)][_0x2a86d9(0x1ef)](_0x4e9e0b['user']),_0x4e9e0b[_0x2a86d9(0x206)]){case p['Add']:break;case p[_0x2a86d9(0x1f3)]:{this['_threadCommentModel']['addComment'](_0x4933a2,_0x2f615b,{'unitId':_0x4933a2,'subUnitId':_0x2f615b,'ref':'','id':_0x4e9e0b[_0x2a86d9(0x22a)],'dT':w(+_0x4e9e0b[_0x2a86d9(0x23c)]),'threadId':_0x4e9e0b[_0x2a86d9(0x1f4)],'personId':(_0x4882e4=(_0x133e23=_0x4e9e0b[_0x2a86d9(0x210)])==null?void 0x0:_0x133e23[_0x2a86d9(0x1f1)])!=null?_0x4882e4:_0x4e9e0b[_0x2a86d9(0x21c)],'text':JSON['parse'](_0x4e9e0b[_0x2a86d9(0x1de)]),'parentId':_0x102695['id']});break;}case p[_0x2a86d9(0x1e8)]:{const _0x35f8f8=this[_0x2a86d9(0x21d)]['getComment'](_0x4933a2,_0x2f615b,_0x4e9e0b[_0x2a86d9(0x22a)]);_0x35f8f8&&_0x35f8f8[_0x2a86d9(0x209)]&&this[_0x2a86d9(0x21d)][_0x2a86d9(0x1cc)](_0x4933a2,_0x2f615b,_0x4e9e0b['replyId']);break;}case p[_0x2a86d9(0x225)]:{this[_0x2a86d9(0x21d)][_0x2a86d9(0x22d)](_0x4933a2,_0x2f615b,{'commentId':_0x4e9e0b['replyId'],'text':JSON['parse'](_0x4e9e0b['content'])});break;}case p[_0x2a86d9(0x23a)]:{const _0x232dc3=this[_0x2a86d9(0x21d)]['getThread'](_0x4933a2,_0x4e9e0b[_0x2a86d9(0x1f4)]);_0x232dc3&&this[_0x2a86d9(0x21d)][_0x2a86d9(0x1e4)](_0x4933a2,_0x2f615b,_0x232dc3['id'],_0x4e9e0b['solved']===v[_0x2a86d9(0x20d)]);break;}}}));}};S=se([_0xb139a8(_0x117143[_0xe2d821(0x232)],S),_(0x0,_0x2d90da(_0x49a6d4)),_(0x1,_0x2d90da(_0x325738)),_(0x2,_0x2d90da(_0x1398ac)),_(0x3,_0x2d90da(_0x442235))],S);const oe=_0xe2d821(0x1e2),ne={};var ie=Object[_0xe2d821(0x202)],ae=Object[_0xe2d821(0x20c)],ce=(_0xd1ee0a,_0x27d2ce,_0x2611f4,_0x5db2d5)=>{for(var _0x4a12d6=_0x5db2d5>0x1?void 0x0:_0x5db2d5?ae(_0x27d2ce,_0x2611f4):_0x27d2ce,_0x518224=_0xd1ee0a['length']-0x1,_0x54c2e1;_0x518224>=0x0;_0x518224--)(_0x54c2e1=_0xd1ee0a[_0x518224])&&(_0x4a12d6=(_0x5db2d5?_0x54c2e1(_0x27d2ce,_0x2611f4,_0x4a12d6):_0x54c2e1(_0x4a12d6))||_0x4a12d6);return _0x5db2d5&&_0x4a12d6&&ie(_0x27d2ce,_0x2611f4,_0x4a12d6),_0x4a12d6;},f=(_0x1dd823,_0x82c9dc)=>(_0x246586,_0x152f31)=>_0x82c9dc(_0x246586,_0x152f31,_0x1dd823);function de(_0x53f4d8,_0x17a138){const _0x503d44=_0xe2d821,_0x5a4e8b=_0x53f4d8[_0x503d44(0x1ed)][0x0];return{..._0x17a138,'id':_0x5a4e8b[_0x503d44(0x22a)],'resolved':_0x53f4d8['solved']===0x1,'dT':w(_0x5a4e8b[_0x503d44(0x23c)]),'personId':_0x5a4e8b[_0x503d44(0x21c)],'threadId':_0x5a4e8b[_0x503d44(0x1f4)]};}function me(_0x32f4b0,_0x354b8e,_0x331969){const _0x1f6216=_0xe2d821;var _0xc0ea01,_0x438dec;if(((_0x438dec=(_0xc0ea01=_0x32f4b0==null?void 0x0:_0x32f4b0[_0x1f6216(0x1ed)])==null?void 0x0:_0xc0ea01['length'])!=null?_0x438dec:0x0)>0x0){const _0x6158e7=(_0x5e0f99,_0x1423db)=>({'id':_0x5e0f99[_0x1f6216(0x22a)],'threadId':_0x5e0f99[_0x1f6216(0x1f4)],'dT':w(_0x5e0f99[_0x1f6216(0x23c)]),'personId':_0x5e0f99[_0x1f6216(0x21c)],'resolved':_0x32f4b0[_0x1f6216(0x1fc)]===v['Solved'],'unitId':_0x354b8e,'subUnitId':_0x331969,'text':JSON[_0x1f6216(0x207)](_0x5e0f99['content']),'parentId':_0x1423db}),_0x3821b4=_0x6158e7(_0x32f4b0[_0x1f6216(0x1ed)][0x0]);return{..._0x3821b4,'children':_0x32f4b0[_0x1f6216(0x1ed)]['slice'](0x1)[_0x1f6216(0x1ee)](_0x19bd1a=>_0x6158e7(_0x19bd1a,_0x3821b4['id']))};}return null;}let D=class{constructor(_0x954e61,_0x2149c1,_0x11e651,_0x1a8c25){const _0x7bcd6c=_0xe2d821;this[_0x7bcd6c(0x1f5)]=_0x954e61,this[_0x7bcd6c(0x228)]=_0x2149c1,this['_sessionService']=_0x11e651,this[_0x7bcd6c(0x1dc)]=_0x1a8c25;}async[_0xe2d821(0x21e)](_0x205a6f){const _0x383d77=_0xe2d821;var _0x370f6b,_0x24b8cb;const {parentId:_0x26e259,unitId:_0x12d956,text:_0x2d77dc,threadId:_0x330ceb}=_0x205a6f,_0x37e2be=(_0x24b8cb=(_0x370f6b=_0x2d77dc[_0x383d77(0x1f0)])==null?void 0x0:_0x370f6b[_0x383d77(0x1d4)](_0x2b3942=>_0x2b3942[_0x383d77(0x1f6)]===_0x42157a['COMMENT'])['map'](_0xb88ce9=>_0xb88ce9['rangeId']))!=null?_0x24b8cb:[],_0x3a45e6=JSON[_0x383d77(0x1d1)](_0x2d77dc),_0x5a00ab=(await this[_0x383d77(0x1cb)]['requireSession'](_0x12d956))[_0x383d77(0x1c7)]();if(_0x26e259){const _0x537642={'memberId':_0x5a00ab,'unitId':_0x12d956,'content':_0x3a45e6,'mention':_0x37e2be,'threadId':_0x330ceb},_0x2d97e6=(await this[_0x383d77(0x1f5)][_0x383d77(0x1d5)](_0x383d77(0x208)+_0x12d956+_0x383d77(0x1dd),{'body':_0x537642}))['body'][_0x383d77(0x1e9)];return{..._0x205a6f,'id':_0x2d97e6[_0x383d77(0x22a)],'dT':_0x3f611e(+_0x2d97e6[_0x383d77(0x23c)])[_0x383d77(0x23b)](_0x383d77(0x239)),'personId':_0x2d97e6[_0x383d77(0x21c)]};}else{const _0x5980e5={'memberId':_0x5a00ab,'unitId':_0x12d956,'content':_0x3a45e6,'mention':_0x37e2be},_0x3e8521=await this[_0x383d77(0x1f5)][_0x383d77(0x1d5)](_0x383d77(0x208)+_0x12d956+_0x383d77(0x227),{'body':_0x5980e5});return de(_0x3e8521[_0x383d77(0x233)][_0x383d77(0x1e1)],_0x205a6f);}}async['updateComment'](_0x2e0013){const _0x2cb7aa=_0xe2d821;var _0xa65634,_0x402789;const {text:_0x419ec2,unitId:_0x588705}=_0x2e0013,_0x204d2a=(_0x402789=(_0xa65634=_0x419ec2[_0x2cb7aa(0x1f0)])==null?void 0x0:_0xa65634[_0x2cb7aa(0x1d4)](_0x3438a8=>_0x3438a8['rangeType']===_0x42157a[_0x2cb7aa(0x1e3)])[_0x2cb7aa(0x1ee)](_0xacbc57=>_0xacbc57[_0x2cb7aa(0x1cf)]))!=null?_0x402789:[],_0x40daad=JSON[_0x2cb7aa(0x1d1)](_0x419ec2),_0x5de36f=_0x2e0013['threadId'],_0x23ef23=_0x2e0013['id'],_0x4cc1b2={'memberId':(await this['_sessionService'][_0x2cb7aa(0x1c8)](_0x588705))['getMemberID'](),'unitId':_0x588705,'threadId':_0x5de36f,'mention':_0x204d2a,'content':_0x40daad,'replyId':_0x23ef23},_0x152142=await this['_httpService'][_0x2cb7aa(0x1d5)](_0x2cb7aa(0x208)+_0x588705+'/edit',{'body':_0x4cc1b2});return!_0x152142['body'][_0x2cb7aa(0x1fa)]||_0x152142[_0x2cb7aa(0x233)][_0x2cb7aa(0x1fa)][_0x2cb7aa(0x1d2)]===0x1;}async[_0xe2d821(0x1e4)](_0x1f2b53){const _0x2cb29f=_0xe2d821,{unitId:_0xfb5da3}=_0x1f2b53,_0x57a6bf=_0x1f2b53[_0x2cb29f(0x1f4)],_0x4c47cb={'memberId':this[_0x2cb29f(0x228)][_0x2cb29f(0x22e)]()[_0x2cb29f(0x1f1)],'unitId':_0xfb5da3,'threadId':_0x57a6bf,'solved':_0x1f2b53[_0x2cb29f(0x20f)]?v['Solved']:v[_0x2cb29f(0x22c)]},_0x25e432=await this[_0x2cb29f(0x1f5)][_0x2cb29f(0x1d5)](_0x2cb29f(0x208)+_0xfb5da3+_0x2cb29f(0x229),{'body':_0x4c47cb});return!_0x25e432[_0x2cb29f(0x233)][_0x2cb29f(0x1fa)]||_0x25e432[_0x2cb29f(0x233)][_0x2cb29f(0x1fa)][_0x2cb29f(0x1d2)]===0x1;}async[_0xe2d821(0x1cc)](_0x24e441,_0x1360b3,_0x8767d4,_0x5e0e60){const _0x217c77=_0xe2d821,_0x31809b={'memberId':(await this[_0x217c77(0x1cb)]['requireSession'](_0x24e441))[_0x217c77(0x1c7)](),'threadId':_0x8767d4,'replyId':_0x5e0e60,'unitId':_0x24e441},_0x11ccfb=await this[_0x217c77(0x1f5)][_0x217c77(0x1d5)](_0x217c77(0x208)+_0x24e441+_0x217c77(0x20e),{'body':_0x31809b});return!_0x11ccfb[_0x217c77(0x233)][_0x217c77(0x1fa)]||_0x11ccfb['body']['error'][_0x217c77(0x1d2)]===0x1;}async[_0xe2d821(0x1d6)](_0x4a33d4,_0x3eedad,_0x29b67e){const _0x99202b=_0xe2d821,_0x3cddbf={'unitId':_0x4a33d4,'threadId':_0x29b67e},_0x54e030=await this[_0x99202b(0x1f5)][_0x99202b(0x1d5)](_0x99202b(0x208)+_0x4a33d4+_0x99202b(0x219),{'body':_0x3cddbf}),_0xe25644=_0x29b67e['map'](_0x140e45=>me(_0x54e030[_0x99202b(0x233)][_0x99202b(0x20b)][_0x140e45],_0x4a33d4,_0x3eedad))[_0x99202b(0x1d4)](Boolean);return Object[_0x99202b(0x224)](_0x54e030[_0x99202b(0x233)][_0x99202b(0x1d8)])['forEach'](_0x265408=>{const _0x4f59bc=_0x99202b;this[_0x4f59bc(0x228)][_0x4f59bc(0x1ef)](_0x265408);}),_0xe25644;}[_0xe2d821(0x1df)](_0x27ea67){const _0x48f42a=_0xe2d821;return{'id':_0x27ea67['id'],'threadId':_0x27ea67[_0x48f42a(0x1f4)],'ref':_0x27ea67['ref']};}};D=ce([f(0x0,_0x2d90da(_0x5d5f1d)),f(0x1,_0x2d90da(_0x1398ac)),f(0x2,_0x2d90da(_0x112c6e)),f(0x3,_0x2d90da(_0x442235))],D);var le=Object[_0xe2d821(0x202)],he=Object[_0xe2d821(0x20c)],ue=(_0x359e51,_0xfdeca1,_0x420911,_0x253204)=>{for(var _0x6ddbea=_0x253204>0x1?void 0x0:_0x253204?he(_0xfdeca1,_0x420911):_0xfdeca1,_0x8e7dc6=_0x359e51['length']-0x1,_0x5f2202;_0x8e7dc6>=0x0;_0x8e7dc6--)(_0x5f2202=_0x359e51[_0x8e7dc6])&&(_0x6ddbea=(_0x253204?_0x5f2202(_0xfdeca1,_0x420911,_0x6ddbea):_0x5f2202(_0x6ddbea))||_0x6ddbea);return _0x253204&&_0x6ddbea&&le(_0xfdeca1,_0x420911,_0x6ddbea),_0x6ddbea;},pe=(_0x421a0e,_0x52b954)=>(_0x1dbc2f,_0x266cdf)=>_0x52b954(_0x1dbc2f,_0x266cdf,_0x421a0e);let C=class{constructor(_0x2d1adf){const _0x4af55a=_0xe2d821;this[_0x4af55a(0x1f5)]=_0x2d1adf;}async[_0xe2d821(0x21b)](_0x24bf81,_0x128e7e,_0xbbf639){const _0x494c72=_0xe2d821,_0x3d7639=new URL(window[_0x494c72(0x226)][_0x494c72(0x215)])[_0x494c72(0x1ec)]['get'](_0x494c72(0x1ff));if(!_0x3d7639)return[];const _0x42c4e7=window['location']['host'],_0x4dcefc=window[_0x494c72(0x226)][_0x494c72(0x20a)]===_0x494c72(0x1ea)?_0x494c72(0x234):_0x494c72(0x238);return(await this[_0x494c72(0x1f5)]['get'](_0x4dcefc+_0x494c72(0x200)+_0x42c4e7+_0x494c72(0x1da),{'params':{'objectID':_0x3d7639,'unitID':_0x3d7639}}))['body'][_0x494c72(0x223)]['map'](_0x32c827=>{const _0x4e08a4=_0x494c72;var _0x3bdb92,_0x4ac0df,_0x30fb6d,_0x57f64b,_0x4ed56a,_0x3bf0db;return{'id':(_0x4ac0df=(_0x3bdb92=_0x32c827['subject'])==null?void 0x0:_0x3bdb92[_0x4e08a4(0x1f1)])!=null?_0x4ac0df:'','label':(_0x57f64b=(_0x30fb6d=_0x32c827[_0x4e08a4(0x231)])==null?void 0x0:_0x30fb6d['name'])!=null?_0x57f64b:'','icon':(_0x3bf0db=(_0x4ed56a=_0x32c827[_0x4e08a4(0x231)])==null?void 0x0:_0x4ed56a[_0x4e08a4(0x222)])!=null?_0x3bf0db:'','type':_0x4e08a4(0x210)};});}};C=ue([pe(0x0,_0x2d90da(_0x5d5f1d))],C);var ve=Object[_0xe2d821(0x202)],_e=Object['getOwnPropertyDescriptor'],fe=(_0x23f86f,_0x4614bf,_0x499f23,_0x2da4c2)=>{const _0xd38771=_0xe2d821;for(var _0x352a2a=_0x2da4c2>0x1?void 0x0:_0x2da4c2?_e(_0x4614bf,_0x499f23):_0x4614bf,_0x3acaa2=_0x23f86f[_0xd38771(0x1d3)]-0x1,_0x49dd88;_0x3acaa2>=0x0;_0x3acaa2--)(_0x49dd88=_0x23f86f[_0x3acaa2])&&(_0x352a2a=(_0x2da4c2?_0x49dd88(_0x4614bf,_0x499f23,_0x352a2a):_0x49dd88(_0x352a2a))||_0x352a2a);return _0x2da4c2&&_0x352a2a&&ve(_0x4614bf,_0x499f23,_0x352a2a),_0x352a2a;},I=(_0x10fb90,_0x1ef125)=>(_0x363704,_0x131786)=>_0x1ef125(_0x363704,_0x131786,_0x10fb90);let b=class extends _0x43bd51{constructor(_0x582823,_0x4fcdb8,_0x1d9f2d,_0x5cb4fb){const _0x1cfdf2=_0xe2d821;super(),this[_0x1cfdf2(0x213)]=_0x582823,this[_0x1cfdf2(0x22f)]=_0x4fcdb8,this[_0x1cfdf2(0x218)]=_0x1d9f2d,this[_0x1cfdf2(0x212)]=_0x5cb4fb,this['_initDataSource']();}[_0xe2d821(0x1f2)](){const _0x22d8a2=_0xe2d821;this[_0x22d8a2(0x213)]['dataSource']=this['_threadCommentDataSource'],this[_0x22d8a2(0x213)][_0x22d8a2(0x237)]=!0x1,this[_0x22d8a2(0x218)]['dataSource']=this[_0x22d8a2(0x212)];}};b=fe([_0xb139a8(_0x117143[_0xe2d821(0x230)],b),I(0x0,_0x581213),I(0x1,_0x2d90da(D)),I(0x2,_0xaf4732),I(0x3,_0x2d90da(C))],b);var Y=Object[_0xe2d821(0x202)],Ie=Object['getOwnPropertyDescriptor'],Se=(_0x5ea31d,_0x2932d9,_0x237cd1)=>_0x2932d9 in _0x5ea31d?Y(_0x5ea31d,_0x2932d9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x237cd1}):_0x5ea31d[_0x2932d9]=_0x237cd1,be=(_0x3a6cf2,_0x1a51df,_0x139c39,_0x3e9e48)=>{const _0x5b7e04=_0xe2d821;for(var _0x11647f=_0x3e9e48>0x1?void 0x0:_0x3e9e48?Ie(_0x1a51df,_0x139c39):_0x1a51df,_0xf8e7dc=_0x3a6cf2[_0x5b7e04(0x1d3)]-0x1,_0x29ac08;_0xf8e7dc>=0x0;_0xf8e7dc--)(_0x29ac08=_0x3a6cf2[_0xf8e7dc])&&(_0x11647f=(_0x3e9e48?_0x29ac08(_0x1a51df,_0x139c39,_0x11647f):_0x29ac08(_0x11647f))||_0x11647f);return _0x3e9e48&&_0x11647f&&Y(_0x1a51df,_0x139c39,_0x11647f),_0x11647f;},j=(_0x51ab07,_0x36c257)=>(_0x89857a,_0x51a2d7)=>_0x36c257(_0x89857a,_0x51a2d7,_0x51ab07),G=(_0x531c16,_0x3a4dfa,_0x47a9af)=>Se(_0x531c16,typeof _0x3a4dfa!=_0xe2d821(0x205)?_0x3a4dfa+'':_0x3a4dfa,_0x47a9af);let g=class extends _0x476fc3{constructor(_0xed6676=ne,_0x5a284a,_0x2ed4b5){const _0x4de551=_0xe2d821;super(),this[_0x4de551(0x1fb)]=_0xed6676,this['_injector']=_0x5a284a,this['_configService']=_0x2ed4b5;const {..._0x271fde}=this['_config'];this[_0x4de551(0x1f7)][_0x4de551(0x21f)](oe,_0x271fde);}['onStarting'](){const _0x4b8cfa=_0xe2d821;[[C],[D],[b],[S]][_0x4b8cfa(0x1ce)](_0x326bc4=>{const _0x377b21=_0x4b8cfa;this[_0x377b21(0x1dc)]['add'](_0x326bc4);});}};G(g,_0xe2d821(0x236),k),G(g,_0xe2d821(0x206),_0x341ef4[_0xe2d821(0x1fd)]),g=be([_0x5d261a(_0x1d0b94,_0x403add,_0x36fe94,_0x3dedcc),j(0x1,_0x2d90da(_0x442235)),j(0x2,_0xaa26c7)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -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(_0x288a7e,_0x5501ed){const _0x4b4a3e=_0x40bb,_0x1217e1=_0x288a7e();while(!![]){try{const _0xe93405=parseInt(_0x4b4a3e(0x11b))/0x1*(-parseInt(_0x4b4a3e(0x14a))/0x2)+parseInt(_0x4b4a3e(0x123))/0x3*(parseInt(_0x4b4a3e(0x103))/0x4)+-parseInt(_0x4b4a3e(0x152))/0x5*(parseInt(_0x4b4a3e(0x148))/0x6)+-parseInt(_0x4b4a3e(0x139))/0x7*(parseInt(_0x4b4a3e(0xf6))/0x8)+parseInt(_0x4b4a3e(0xf8))/0x9+parseInt(_0x4b4a3e(0x143))/0xa+-parseInt(_0x4b4a3e(0x14b))/0xb;if(_0xe93405===_0x5501ed)break;else _0x1217e1['push'](_0x1217e1['shift']());}catch(_0x1ccc8f){_0x1217e1['push'](_0x1217e1['shift']());}}}(_0x5a0e,0xdecfa),function(_0x2a5592,_0x4842d7){const _0x31b881=_0x40bb;typeof exports=='object'&&typeof module<'u'?_0x4842d7(exports,require(_0x31b881(0x101)),require(_0x31b881(0xf7)),require(_0x31b881(0xe9)),require(_0x31b881(0x10f)),require('@univerjs-pro/license'),require('rxjs'),require(_0x31b881(0xfa)),require('dayjs')):typeof define==_0x31b881(0x142)&&define[_0x31b881(0x13b)]?define([_0x31b881(0x160),'@univerjs/core',_0x31b881(0xf7),_0x31b881(0xe9),'@univerjs-pro/collaboration-client',_0x31b881(0xdf),'rxjs',_0x31b881(0xfa),'dayjs'],_0x4842d7):(_0x2a5592=typeof globalThis<'u'?globalThis:_0x2a5592||self,_0x4842d7(_0x2a5592[_0x31b881(0x13a)]={},_0x2a5592[_0x31b881(0xe4)],_0x2a5592[_0x31b881(0x12a)],_0x2a5592[_0x31b881(0x156)],_0x2a5592['UniverCollaborationClient'],_0x2a5592['UniverLicense'],_0x2a5592[_0x31b881(0x153)],_0x2a5592[_0x31b881(0x131)],_0x2a5592[_0x31b881(0xe1)]));}(this,function(_0x35516d,_0x5884e3,_0x47a0cf,_0x15ba5a,_0x2bc3ee,_0x495ec4,_0xd38334,_0x24a519,_0x445029){'use strict';const _0x114bcf=_0x40bb;const _0x5988b1=_0x114bcf(0xfe);var _0x276e42=(_0x102ddb=>(_0x102ddb[_0x102ddb[_0x114bcf(0xf3)]=0x0]='OpenOrReOpen',_0x102ddb[_0x102ddb[_0x114bcf(0xeb)]=0x1]=_0x114bcf(0xeb),_0x102ddb[_0x102ddb[_0x114bcf(0xea)]=-0x1]=_0x114bcf(0xea),_0x102ddb))(_0x276e42||{}),_0x412447=(_0x578556=>(_0x578556[_0x578556[_0x114bcf(0xdd)]=0x0]=_0x114bcf(0xdd),_0x578556[_0x578556[_0x114bcf(0x138)]=0x1]=_0x114bcf(0x138),_0x578556[_0x578556['Reply']=0x2]=_0x114bcf(0x15d),_0x578556[_0x578556[_0x114bcf(0xf5)]=0x3]='Edit',_0x578556[_0x578556[_0x114bcf(0xfc)]=0x4]=_0x114bcf(0xfc),_0x578556[_0x578556[_0x114bcf(0x15e)]=0x5]=_0x114bcf(0x15e),_0x578556[_0x578556[_0x114bcf(0xea)]=-0x1]='UNRECOGNIZED',_0x578556))(_0x412447||{});const _0x5c1fc0=_0x389f9e=>_0x445029(new Date(+_0x389f9e))[_0x114bcf(0xf1)]('YYYY/MM/DD\x20HH:mm'),_0x10b225=async(_0x23011e,_0x331cb2)=>{const _0x429b3d=_0x114bcf,_0x228159=_0x23011e['get'](_0x5884e3[_0x429b3d(0x109)]),_0x29b7ea=_0x23011e[_0x429b3d(0x10b)](_0x24a519[_0x429b3d(0x114)]);_0x331cb2[_0x429b3d(0x108)](_0x58de7d=>{const _0x3fd0d3=_0x429b3d;_0x228159[_0x3fd0d3(0x128)](_0x58de7d)&&_0x331cb2[_0x3fd0d3(0x12c)](_0x58de7d);}),_0x331cb2[_0x429b3d(0x105)]&&(await _0x29b7ea[_0x429b3d(0x10b)](_0x429b3d(0x133),{'params':{'userIDs':[..._0x331cb2]}}))[_0x429b3d(0x10e)][_0x429b3d(0x147)]['forEach'](_0x5b0b95=>{const _0x3879a4=_0x429b3d;_0x5b0b95&&_0x228159[_0x3879a4(0x115)](_0x5b0b95);});};var _0x21f306=Object[_0x114bcf(0x120)],_0x9c1afd=Object['getOwnPropertyDescriptor'],_0x18d26e=(_0x294375,_0x1e6643,_0x2acdc7,_0x531ec7)=>{for(var _0x16b3aa=_0x531ec7>0x1?void 0x0:_0x531ec7?_0x9c1afd(_0x1e6643,_0x2acdc7):_0x1e6643,_0x4d882d=_0x294375['length']-0x1,_0x3c572b;_0x4d882d>=0x0;_0x4d882d--)(_0x3c572b=_0x294375[_0x4d882d])&&(_0x16b3aa=(_0x531ec7?_0x3c572b(_0x1e6643,_0x2acdc7,_0x16b3aa):_0x3c572b(_0x16b3aa))||_0x16b3aa);return _0x531ec7&&_0x16b3aa&&_0x21f306(_0x1e6643,_0x2acdc7,_0x16b3aa),_0x16b3aa;},_0x126033=(_0x5e48ce,_0x2f0c6e)=>(_0x4f7ad2,_0x24ced8)=>_0x2f0c6e(_0x4f7ad2,_0x24ced8,_0x5e48ce);let _0x46ff54=class extends _0x5884e3[_0x114bcf(0x119)]{constructor(_0x20bd27,_0x44c580,_0x459861,_0x2b190d){const _0x11de71=_0x114bcf;super(),this[_0x11de71(0x157)]=_0x20bd27,this[_0x11de71(0xe7)]=_0x44c580,this['_userService']=_0x459861,this[_0x11de71(0x100)]=_0x2b190d,this[_0x11de71(0xf2)](),this['_initUserSync']();}['_initUserSync'](){const _0x546468=_0x114bcf;this[_0x546468(0x14d)](this[_0x546468(0xe7)][_0x546468(0x15f)][_0x546468(0x121)](_0xd38334[_0x546468(0x13f)](0x10))[_0x546468(0xf4)](_0x5eeabe=>{const _0x461852=_0x546468,_0xb3f17=new Set();_0x5eeabe[_0x461852(0x108)](_0x13f5b0=>{const _0x499ae0=_0x461852;switch(_0x13f5b0['type']){case _0x499ae0(0x146):{const _0x5d57bb=_0x13f5b0['payload'][_0x499ae0(0xe6)];_0xb3f17[_0x499ae0(0x146)](_0x5d57bb);break;}}}),_0x10b225(this['_injector'],_0xb3f17);}));}[_0x114bcf(0xf2)](){const _0x589cf2=_0x114bcf;this[_0x589cf2(0x14d)](this[_0x589cf2(0x157)][_0x589cf2(0x15f)][_0x589cf2(0xf4)](async _0x93c008=>{const _0xecd3f9=_0x589cf2;var _0xb2d297,_0xca670e;const _0x19afe5=this[_0xecd3f9(0xe7)][_0xecd3f9(0x137)](_0x93c008[_0xecd3f9(0x102)],_0x93c008[_0xecd3f9(0x151)]);if(!_0x19afe5)return;const {unitId:_0x508487,subUnitId:_0x3e4898}=_0x19afe5;switch(_0x93c008[_0xecd3f9(0x150)]&&this[_0xecd3f9(0xd6)][_0xecd3f9(0x115)](_0x93c008[_0xecd3f9(0x150)]),_0x93c008[_0xecd3f9(0x111)]){case _0x412447[_0xecd3f9(0x138)]:break;case _0x412447[_0xecd3f9(0x15d)]:{this[_0xecd3f9(0xe7)][_0xecd3f9(0x12e)](_0x508487,_0x3e4898,{'unitId':_0x508487,'subUnitId':_0x3e4898,'ref':'','id':_0x93c008[_0xecd3f9(0xe0)],'dT':_0x5c1fc0(+_0x93c008[_0xecd3f9(0x140)]),'threadId':_0x93c008[_0xecd3f9(0x151)],'personId':(_0xca670e=(_0xb2d297=_0x93c008['user'])==null?void 0x0:_0xb2d297[_0xecd3f9(0xfd)])!=null?_0xca670e:_0x93c008[_0xecd3f9(0x118)],'text':JSON['parse'](_0x93c008['content']),'parentId':_0x19afe5['id']});break;}case _0x412447[_0xecd3f9(0xfc)]:{const _0x9adc1=this[_0xecd3f9(0xe7)]['getComment'](_0x508487,_0x3e4898,_0x93c008[_0xecd3f9(0xe0)]);_0x9adc1&&_0x9adc1['parentId']&&this['_threadCommentModel']['deleteComment'](_0x508487,_0x3e4898,_0x93c008['replyId']);break;}case _0x412447['Edit']:{this[_0xecd3f9(0xe7)][_0xecd3f9(0x126)](_0x508487,_0x3e4898,{'commentId':_0x93c008[_0xecd3f9(0xe0)],'text':JSON[_0xecd3f9(0x15c)](_0x93c008['content'])});break;}case _0x412447[_0xecd3f9(0x15e)]:{const _0x5145eb=this['_threadCommentModel'][_0xecd3f9(0x137)](_0x508487,_0x93c008[_0xecd3f9(0x151)]);_0x5145eb&&this['_threadCommentModel']['resolveComment'](_0x508487,_0x3e4898,_0x5145eb['id'],_0x93c008[_0xecd3f9(0x11c)]===_0x276e42[_0xecd3f9(0xeb)]);break;}}}));}};_0x46ff54=_0x18d26e([_0x5884e3['OnLifecycle'](_0x5884e3['LifecycleStages']['Ready'],_0x46ff54),_0x126033(0x0,_0x5884e3[_0x114bcf(0x14e)](_0x2bc3ee[_0x114bcf(0x104)])),_0x126033(0x1,_0x5884e3[_0x114bcf(0x14e)](_0x47a0cf['ThreadCommentModel'])),_0x126033(0x2,_0x5884e3[_0x114bcf(0x14e)](_0x5884e3['UserManagerService'])),_0x126033(0x3,_0x5884e3[_0x114bcf(0x14e)](_0x5884e3['Injector']))],_0x46ff54);const _0x1bba56=_0x114bcf(0xf9),_0x17d309={};var _0x733f52=Object[_0x114bcf(0x120)],_0x570663=Object[_0x114bcf(0x12f)],_0x154237=(_0x266f42,_0x139424,_0x4aeeb1,_0x18a411)=>{const _0x534464=_0x114bcf;for(var _0x757265=_0x18a411>0x1?void 0x0:_0x18a411?_0x570663(_0x139424,_0x4aeeb1):_0x139424,_0x4f9449=_0x266f42[_0x534464(0x10a)]-0x1,_0x4751a4;_0x4f9449>=0x0;_0x4f9449--)(_0x4751a4=_0x266f42[_0x4f9449])&&(_0x757265=(_0x18a411?_0x4751a4(_0x139424,_0x4aeeb1,_0x757265):_0x4751a4(_0x757265))||_0x757265);return _0x18a411&&_0x757265&&_0x733f52(_0x139424,_0x4aeeb1,_0x757265),_0x757265;},_0x1c8759=(_0x3e6ee9,_0x44eadd)=>(_0x34ac4e,_0x3b8616)=>_0x44eadd(_0x34ac4e,_0x3b8616,_0x3e6ee9);function _0x25b9a(_0x1bce2e,_0xdc1321){const _0xf5c29b=_0x114bcf,_0x2c91de=_0x1bce2e[_0xf5c29b(0xee)][0x0];return{..._0xdc1321,'id':_0x2c91de[_0xf5c29b(0xe0)],'resolved':_0x1bce2e[_0xf5c29b(0x11c)]===0x1,'dT':_0x5c1fc0(_0x2c91de[_0xf5c29b(0x140)]),'personId':_0x2c91de[_0xf5c29b(0x118)],'threadId':_0x2c91de['threadId']};}function _0x1146aa(_0x1277e7,_0x1de0fe,_0x14570a){const _0x212ab1=_0x114bcf;var _0x1a906f,_0xbb33b5;if(((_0xbb33b5=(_0x1a906f=_0x1277e7==null?void 0x0:_0x1277e7[_0x212ab1(0xee)])==null?void 0x0:_0x1a906f['length'])!=null?_0xbb33b5:0x0)>0x0){const _0x2a2b4a=(_0x117050,_0x576855)=>({'id':_0x117050[_0x212ab1(0xe0)],'threadId':_0x117050[_0x212ab1(0x151)],'dT':_0x5c1fc0(_0x117050[_0x212ab1(0x140)]),'personId':_0x117050[_0x212ab1(0x118)],'resolved':_0x1277e7[_0x212ab1(0x11c)]===_0x276e42[_0x212ab1(0xeb)],'unitId':_0x1de0fe,'subUnitId':_0x14570a,'text':JSON[_0x212ab1(0x15c)](_0x117050['content']),'parentId':_0x576855}),_0x5be2d5=_0x2a2b4a(_0x1277e7[_0x212ab1(0xee)][0x0]);return{..._0x5be2d5,'children':_0x1277e7[_0x212ab1(0xee)][_0x212ab1(0x158)](0x1)['map'](_0x500aff=>_0x2a2b4a(_0x500aff,_0x5be2d5['id']))};}return null;}let _0x5c3061=class{constructor(_0x15b146,_0x333ebf,_0x26f889,_0x38adbf){const _0xb62f87=_0x114bcf;this['_httpService']=_0x15b146,this[_0xb62f87(0xd6)]=_0x333ebf,this[_0xb62f87(0xec)]=_0x26f889,this[_0xb62f87(0x100)]=_0x38adbf;}async['addComment'](_0x39a4e1){const _0x4bb2b1=_0x114bcf;var _0x27fb88,_0xcd5bce;const {parentId:_0x4aa864,unitId:_0x18bdb1,text:_0x43d7ab,threadId:_0x575f6c}=_0x39a4e1,_0x2ac051=(_0xcd5bce=(_0x27fb88=_0x43d7ab['customRanges'])==null?void 0x0:_0x27fb88[_0x4bb2b1(0x13c)](_0x310d73=>_0x310d73[_0x4bb2b1(0x10c)]===_0x5884e3[_0x4bb2b1(0x136)][_0x4bb2b1(0x141)])[_0x4bb2b1(0xde)](_0x4a621a=>_0x4a621a['rangeId']))!=null?_0xcd5bce:[],_0x4cec31=JSON[_0x4bb2b1(0xe3)](_0x43d7ab),_0x24a50b=(await this['_sessionService']['requireSession'](_0x18bdb1))[_0x4bb2b1(0x159)]();if(_0x4aa864){const _0x5a7396={'memberId':_0x24a50b,'unitId':_0x18bdb1,'content':_0x4cec31,'mention':_0x2ac051,'threadId':_0x575f6c},_0x3648db=(await this[_0x4bb2b1(0x144)][_0x4bb2b1(0x13d)](_0x4bb2b1(0x14f)+_0x18bdb1+'/reply',{'body':_0x5a7396}))['body'][_0x4bb2b1(0xda)];return{..._0x39a4e1,'id':_0x3648db[_0x4bb2b1(0xe0)],'dT':_0x445029(+_0x3648db[_0x4bb2b1(0x140)])[_0x4bb2b1(0xf1)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3648db[_0x4bb2b1(0x118)]};}else{const _0x54d67e={'memberId':_0x24a50b,'unitId':_0x18bdb1,'content':_0x4cec31,'mention':_0x2ac051},_0x52e53c=await this['_httpService'][_0x4bb2b1(0x13d)](_0x4bb2b1(0x14f)+_0x18bdb1+_0x4bb2b1(0x10d),{'body':_0x54d67e});return _0x25b9a(_0x52e53c[_0x4bb2b1(0x10e)]['comment'],_0x39a4e1);}}async[_0x114bcf(0x126)](_0xd01299){const _0x20416d=_0x114bcf;var _0xe86cd6,_0x29c86b;const {text:_0x19100a,unitId:_0x20697b}=_0xd01299,_0x5a9160=(_0x29c86b=(_0xe86cd6=_0x19100a['customRanges'])==null?void 0x0:_0xe86cd6['filter'](_0x4d0805=>_0x4d0805[_0x20416d(0x10c)]===_0x5884e3[_0x20416d(0x136)][_0x20416d(0x141)])[_0x20416d(0xde)](_0x4ffa2c=>_0x4ffa2c[_0x20416d(0x129)]))!=null?_0x29c86b:[],_0x19d688=JSON[_0x20416d(0xe3)](_0x19100a),_0x36f4a5=_0xd01299['threadId'],_0x5d66a1=_0xd01299['id'],_0x5ca41e={'memberId':(await this[_0x20416d(0xec)][_0x20416d(0x135)](_0x20697b))[_0x20416d(0x159)](),'unitId':_0x20697b,'threadId':_0x36f4a5,'mention':_0x5a9160,'content':_0x19d688,'replyId':_0x5d66a1},_0x208727=await this[_0x20416d(0x144)]['post']('/universer-api/comment/unit/'+_0x20697b+'/edit',{'body':_0x5ca41e});return!_0x208727[_0x20416d(0x10e)][_0x20416d(0x132)]||_0x208727[_0x20416d(0x10e)][_0x20416d(0x132)][_0x20416d(0x11f)]===0x1;}async[_0x114bcf(0x124)](_0x21833a){const _0x52ae3e=_0x114bcf,{unitId:_0x3a6809}=_0x21833a,_0x1c1cd3=_0x21833a[_0x52ae3e(0x151)],_0x248e0d={'memberId':this[_0x52ae3e(0xd6)]['getCurrentUser']()[_0x52ae3e(0xfd)],'unitId':_0x3a6809,'threadId':_0x1c1cd3,'solved':_0x21833a[_0x52ae3e(0x113)]?_0x276e42[_0x52ae3e(0xeb)]:_0x276e42[_0x52ae3e(0xf3)]},_0x8d7eee=await this[_0x52ae3e(0x144)][_0x52ae3e(0x13d)](_0x52ae3e(0x14f)+_0x3a6809+_0x52ae3e(0x155),{'body':_0x248e0d});return!_0x8d7eee[_0x52ae3e(0x10e)][_0x52ae3e(0x132)]||_0x8d7eee[_0x52ae3e(0x10e)][_0x52ae3e(0x132)][_0x52ae3e(0x11f)]===0x1;}async['deleteComment'](_0x2d0447,_0x1a10ad,_0x30a71e,_0x3895f2){const _0x202581=_0x114bcf,_0x199bbb={'memberId':(await this[_0x202581(0xec)][_0x202581(0x135)](_0x2d0447))[_0x202581(0x159)](),'threadId':_0x30a71e,'replyId':_0x3895f2,'unitId':_0x2d0447},_0x26df8f=await this[_0x202581(0x144)]['post'](_0x202581(0x14f)+_0x2d0447+_0x202581(0xd7),{'body':_0x199bbb});return!_0x26df8f[_0x202581(0x10e)]['error']||_0x26df8f['body']['error'][_0x202581(0x11f)]===0x1;}async[_0x114bcf(0x11d)](_0x341d6e,_0x26943b,_0x1ec63b){const _0x50d997=_0x114bcf,_0x18c92d={'unitId':_0x341d6e,'threadId':_0x1ec63b},_0x2c11e0=await this[_0x50d997(0x144)][_0x50d997(0x13d)](_0x50d997(0x14f)+_0x341d6e+_0x50d997(0xff),{'body':_0x18c92d}),_0x16ca65=_0x1ec63b[_0x50d997(0xde)](_0x34bad2=>_0x1146aa(_0x2c11e0[_0x50d997(0x10e)]['comments'][_0x34bad2],_0x341d6e,_0x26943b))[_0x50d997(0x13c)](Boolean);return Object[_0x50d997(0xe2)](_0x2c11e0[_0x50d997(0x10e)][_0x50d997(0x147)])['forEach'](_0x49c747=>{this['_userService']['addUser'](_0x49c747);}),_0x16ca65;}['saveCommentToSnapshot'](_0x496002){const _0x3e37d5=_0x114bcf;return{'id':_0x496002['id'],'threadId':_0x496002[_0x3e37d5(0x151)],'ref':_0x496002['ref']};}};_0x5c3061=_0x154237([_0x1c8759(0x0,_0x5884e3['Inject'](_0x24a519[_0x114bcf(0x114)])),_0x1c8759(0x1,_0x5884e3['Inject'](_0x5884e3[_0x114bcf(0x109)])),_0x1c8759(0x2,_0x5884e3[_0x114bcf(0x14e)](_0x2bc3ee[_0x114bcf(0x106)])),_0x1c8759(0x3,_0x5884e3[_0x114bcf(0x14e)](_0x5884e3['Injector']))],_0x5c3061);var _0x3d57ea=Object[_0x114bcf(0x120)],_0x43e2a3=Object[_0x114bcf(0x12f)],_0x2b00a3=(_0x29fc9f,_0x391d97,_0x274509,_0x3087de)=>{const _0x56f680=_0x114bcf;for(var _0x4d22a9=_0x3087de>0x1?void 0x0:_0x3087de?_0x43e2a3(_0x391d97,_0x274509):_0x391d97,_0x3373b3=_0x29fc9f[_0x56f680(0x10a)]-0x1,_0x13065c;_0x3373b3>=0x0;_0x3373b3--)(_0x13065c=_0x29fc9f[_0x3373b3])&&(_0x4d22a9=(_0x3087de?_0x13065c(_0x391d97,_0x274509,_0x4d22a9):_0x13065c(_0x4d22a9))||_0x4d22a9);return _0x3087de&&_0x4d22a9&&_0x3d57ea(_0x391d97,_0x274509,_0x4d22a9),_0x4d22a9;},_0x3583dd=(_0x30faaf,_0x520d90)=>(_0x12f3f0,_0x41bd3e)=>_0x520d90(_0x12f3f0,_0x41bd3e,_0x30faaf);let _0x1aaf47=class{constructor(_0x3ffccd){const _0x571559=_0x114bcf;this[_0x571559(0x144)]=_0x3ffccd;}async[_0x114bcf(0x12d)](_0x5b5cda,_0x299006,_0x2a8577){const _0x420b0f=_0x114bcf,_0x2ce15b=new URL(window['location'][_0x420b0f(0xd8)])[_0x420b0f(0xed)][_0x420b0f(0x10b)](_0x420b0f(0xf0));if(!_0x2ce15b)return[];const _0x1c4bc3=window[_0x420b0f(0xef)]['host'],_0x4e0b74=window['location'][_0x420b0f(0x117)]==='https:'?_0x420b0f(0x15a):'http';return(await this[_0x420b0f(0x144)][_0x420b0f(0x10b)](_0x4e0b74+'://'+_0x1c4bc3+'/universer-api/authz/collaborator',{'params':{'objectID':_0x2ce15b,'unitID':_0x2ce15b}}))[_0x420b0f(0x10e)][_0x420b0f(0xd9)]['map'](_0xd2a571=>{const _0x3481c2=_0x420b0f;var _0x35e145,_0x586e2f,_0x57ef87,_0x2c36fa,_0x570aed,_0x43b41b;return{'id':(_0x586e2f=(_0x35e145=_0xd2a571['subject'])==null?void 0x0:_0x35e145[_0x3481c2(0xfd)])!=null?_0x586e2f:'','label':(_0x2c36fa=(_0x57ef87=_0xd2a571['subject'])==null?void 0x0:_0x57ef87['name'])!=null?_0x2c36fa:'','icon':(_0x43b41b=(_0x570aed=_0xd2a571[_0x3481c2(0x107)])==null?void 0x0:_0x570aed[_0x3481c2(0x145)])!=null?_0x43b41b:'','type':'user'};});}};_0x1aaf47=_0x2b00a3([_0x3583dd(0x0,_0x5884e3[_0x114bcf(0x14e)](_0x24a519[_0x114bcf(0x114)]))],_0x1aaf47);var _0x59fa9f=Object[_0x114bcf(0x120)],_0x4e9b2b=Object['getOwnPropertyDescriptor'],_0x40f374=(_0xaad572,_0x253d30,_0x1bfc33,_0x3ffc16)=>{for(var _0x170acd=_0x3ffc16>0x1?void 0x0:_0x3ffc16?_0x4e9b2b(_0x253d30,_0x1bfc33):_0x253d30,_0x5a52f3=_0xaad572['length']-0x1,_0x488c94;_0x5a52f3>=0x0;_0x5a52f3--)(_0x488c94=_0xaad572[_0x5a52f3])&&(_0x170acd=(_0x3ffc16?_0x488c94(_0x253d30,_0x1bfc33,_0x170acd):_0x488c94(_0x170acd))||_0x170acd);return _0x3ffc16&&_0x170acd&&_0x59fa9f(_0x253d30,_0x1bfc33,_0x170acd),_0x170acd;},_0x449da5=(_0x226472,_0x9cce0)=>(_0x344e67,_0x28c026)=>_0x9cce0(_0x344e67,_0x28c026,_0x226472);let _0x3753c3=class extends _0x5884e3['Disposable']{constructor(_0x524067,_0x125d89,_0x1bb667,_0x3ae650){const _0x17ba00=_0x114bcf;super(),this[_0x17ba00(0xd4)]=_0x524067,this[_0x17ba00(0x112)]=_0x125d89,this[_0x17ba00(0xdc)]=_0x1bb667,this[_0x17ba00(0x11e)]=_0x3ae650,this[_0x17ba00(0x134)]();}['_initDataSource'](){const _0x53951b=_0x114bcf;this[_0x53951b(0xd4)][_0x53951b(0x130)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x53951b(0x110)]=!0x1,this[_0x53951b(0xdc)]['dataSource']=this[_0x53951b(0x11e)];}};_0x3753c3=_0x40f374([_0x5884e3[_0x114bcf(0x154)](_0x5884e3[_0x114bcf(0xd5)][_0x114bcf(0x116)],_0x3753c3),_0x449da5(0x0,_0x47a0cf['IThreadCommentDataSourceService']),_0x449da5(0x1,_0x5884e3[_0x114bcf(0x14e)](_0x5c3061)),_0x449da5(0x2,_0x15ba5a['IThreadCommentMentionDataService']),_0x449da5(0x3,_0x5884e3[_0x114bcf(0x14e)](_0x1aaf47))],_0x3753c3);var _0x26977c=Object['defineProperty'],_0x128639=Object[_0x114bcf(0x12f)],_0x1f0701=(_0xea266f,_0x372354,_0x40928d)=>_0x372354 in _0xea266f?_0x26977c(_0xea266f,_0x372354,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40928d}):_0xea266f[_0x372354]=_0x40928d,_0x295eba=(_0x2bc59d,_0x5a8588,_0x472865,_0x1ad5f6)=>{const _0x2de826=_0x114bcf;for(var _0x19557e=_0x1ad5f6>0x1?void 0x0:_0x1ad5f6?_0x128639(_0x5a8588,_0x472865):_0x5a8588,_0x416fb6=_0x2bc59d[_0x2de826(0x10a)]-0x1,_0x30127c;_0x416fb6>=0x0;_0x416fb6--)(_0x30127c=_0x2bc59d[_0x416fb6])&&(_0x19557e=(_0x1ad5f6?_0x30127c(_0x5a8588,_0x472865,_0x19557e):_0x30127c(_0x19557e))||_0x19557e);return _0x1ad5f6&&_0x19557e&&_0x26977c(_0x5a8588,_0x472865,_0x19557e),_0x19557e;},_0xfa89e1=(_0x3fb52e,_0xb3eaea)=>(_0xdb5f9c,_0x26dfe8)=>_0xb3eaea(_0xdb5f9c,_0x26dfe8,_0x3fb52e),_0x3898c8=(_0x3f5c1e,_0x150753,_0x148d4e)=>_0x1f0701(_0x3f5c1e,typeof _0x150753!=_0x114bcf(0x127)?_0x150753+'':_0x150753,_0x148d4e);_0x35516d[_0x114bcf(0xe8)]=class extends _0x5884e3[_0x114bcf(0x11a)]{constructor(_0x58938a=_0x17d309,_0xc31a52,_0x1c525d){const _0x5ed7c4=_0x114bcf;super(),this[_0x5ed7c4(0x122)]=_0x58938a,this[_0x5ed7c4(0x100)]=_0xc31a52,this[_0x5ed7c4(0xe5)]=_0x1c525d;const {..._0x390ccc}=this[_0x5ed7c4(0x122)];this[_0x5ed7c4(0xe5)][_0x5ed7c4(0xdb)](_0x1bba56,_0x390ccc);}[_0x114bcf(0x12b)](){[[_0x1aaf47],[_0x5c3061],[_0x3753c3],[_0x46ff54]]['forEach'](_0x5dc545=>{const _0x401c8d=_0x40bb;this['_injector'][_0x401c8d(0x146)](_0x5dc545);});}},_0x3898c8(_0x35516d[_0x114bcf(0xe8)],_0x114bcf(0x14c),_0x5988b1),_0x3898c8(_0x35516d[_0x114bcf(0xe8)],_0x114bcf(0x111),_0x5884e3['UniverInstanceType']['UNIVER_UNKNOWN']),_0x35516d['UniverThreadCommentDataSourcePlugin']=_0x295eba([_0x5884e3[_0x114bcf(0xfb)](_0x47a0cf['UniverThreadCommentPlugin'],_0x15ba5a['UniverThreadCommentUIPlugin'],_0x2bc3ee[_0x114bcf(0x15b)],_0x495ec4['UniverLicensePlugin']),_0xfa89e1(0x1,_0x5884e3['Inject'](_0x5884e3[_0x114bcf(0x125)])),_0xfa89e1(0x2,_0x5884e3[_0x114bcf(0x13e)])],_0x35516d['UniverThreadCommentDataSourcePlugin']),Object[_0x114bcf(0x120)](_0x35516d,Symbol[_0x114bcf(0x149)],{'value':'Module'});}));function _0x40bb(_0x253cda,_0x4518e1){const _0x5a0e31=_0x5a0e();return _0x40bb=function(_0x40bbb3,_0x466322){_0x40bbb3=_0x40bbb3-0xd4;let _0x4731b3=_0x5a0e31[_0x40bbb3];return _0x4731b3;},_0x40bb(_0x253cda,_0x4518e1);}function _0x5a0e(){const _0x128344=['Edit','16WhqLsz','@univerjs/thread-comment','1823319vlNvgm','thread-comment-data-source.config','@univerjs/network','DependentOn','Delete','userID','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/list','_injector','@univerjs/core','unitId','4964644hpITLq','CommentService','size','CollaborationSessionService','subject','forEach','UserManagerService','length','get','rangeType','/add','body','@univerjs-pro/collaboration-client','syncUpdateMutationToColla','type','_threadCommentDataSource','resolved','HTTPService','addUser','Starting','protocol','userId','Disposable','Plugin','770407FGcvgq','solved','listComments','_threadCommentMentionDataSource','code','defineProperty','pipe','_config','3eYdNwd','resolveComment','Injector','updateComment','symbol','getUser','rangeId','UniverThreadComment','onStarting','delete','getMentions','addComment','getOwnPropertyDescriptor','dataSource','UniverNetwork','error','/universer-api/user/list','_initDataSource','requireSession','CustomRangeType','getThread','Add','3393467OkRuTQ','UniverThreadCommentDatasource','amd','filter','post','IConfigService','bufferTime','createTimestamp','COMMENT','function','15960210WfbBRJ','_httpService','avatar','add','users','6kWNOMd','toStringTag','2BhWyOg','3769689jGGblY','pluginName','disposeWithMe','Inject','/universer-api/comment/unit/','user','threadId','222355LrsvnC','rxjs','OnLifecycle','/solved','UniverThreadCommentUi','_commentService','slice','getMemberID','https','UniverCollaborationClientPlugin','parse','Reply','Solve','commentUpdate$','exports','_threadCommentDataSourceService','LifecycleStages','_userService','/delete','href','collaborators','reply','setConfig','_threadCommentMentionDataService','Unknown','map','@univerjs-pro/license','replyId','dayjs','values','stringify','UniverCore','_configService','personId','_threadCommentModel','UniverThreadCommentDataSourcePlugin','@univerjs/thread-comment-ui','UNRECOGNIZED','Solved','_sessionService','searchParams','replies','location','unit','format','_init','OpenOrReOpen','subscribe'];_0x5a0e=function(){return _0x128344;};return _0x5a0e();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-alpha.1",
|
|
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.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/network": "0.
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/thread-comment
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.3.0-alpha.1",
|
|
49
|
+
"@univerjs-pro/license": "0.3.0-alpha.1",
|
|
50
|
+
"@univerjs/network": "0.3.0-alpha.1",
|
|
51
|
+
"@univerjs/core": "0.3.0-alpha.1",
|
|
52
|
+
"@univerjs/thread-comment": "0.3.0-alpha.1",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.3.0-alpha.1"
|
|
53
54
|
},
|
|
54
55
|
"dependencies": {
|
|
55
56
|
"dayjs": "^1.11.13",
|
|
56
|
-
"@univerjs-pro/
|
|
57
|
-
"@univerjs/
|
|
58
|
-
"@univerjs/
|
|
59
|
-
"@univerjs/
|
|
60
|
-
"@univerjs/
|
|
57
|
+
"@univerjs-pro/collaboration-client": "0.3.0-alpha.1",
|
|
58
|
+
"@univerjs-pro/license": "0.3.0-alpha.1",
|
|
59
|
+
"@univerjs-pro/facade": "0.3.0-alpha.1",
|
|
60
|
+
"@univerjs/network": "0.3.0-alpha.1",
|
|
61
|
+
"@univerjs/protocol": "0.1.39-alpha.22",
|
|
62
|
+
"@univerjs/core": "0.3.0-alpha.1",
|
|
63
|
+
"@univerjs/thread-comment": "0.3.0-alpha.1",
|
|
64
|
+
"@univerjs/thread-comment-ui": "0.3.0-alpha.1",
|
|
65
|
+
"@univerjs/uniscript": "0.3.0-alpha.1"
|
|
61
66
|
},
|
|
62
67
|
"devDependencies": {
|
|
63
68
|
"rxjs": "^7.8.1",
|
|
64
69
|
"typescript": "^5.6.2",
|
|
65
|
-
"vite": "^5.4.
|
|
66
|
-
"vitest": "^2.1.
|
|
67
|
-
"@univerjs-infra/shared": "0.
|
|
70
|
+
"vite": "^5.4.8",
|
|
71
|
+
"vitest": "^2.1.1",
|
|
72
|
+
"@univerjs-infra/shared": "0.3.0-alpha.1"
|
|
68
73
|
},
|
|
69
74
|
"univerSpace": {
|
|
70
75
|
".": {
|