@univerjs-pro/thread-comment-datasource 0.2.11 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/types/controllers/config.schema.d.ts +5 -0
- package/lib/types/plugin.d.ts +6 -3
- package/lib/umd/index.js +1 -1
- package/package.json +11 -11
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x338967=_0x4edd;(function(_0x48e543,_0x1413fd){const _0x32dde1=_0x4edd,_0x578f8b=_0x48e543();while(!![]){try{const _0x6c823c=parseInt(_0x32dde1(0x1c0))/0x1+-parseInt(_0x32dde1(0x176))/0x2*(parseInt(_0x32dde1(0x1b8))/0x3)+-parseInt(_0x32dde1(0x188))/0x4+-parseInt(_0x32dde1(0x1df))/0x5*(parseInt(_0x32dde1(0x196))/0x6)+parseInt(_0x32dde1(0x17b))/0x7+-parseInt(_0x32dde1(0x18f))/0x8+parseInt(_0x32dde1(0x18c))/0x9;if(_0x6c823c===_0x1413fd)break;else _0x578f8b['push'](_0x578f8b['shift']());}catch(_0x5420e7){_0x578f8b['push'](_0x578f8b['shift']());}}}(_0x58fd,0x405ff));Object[_0x338967(0x17a)](exports,Symbol[_0x338967(0x18a)],{'value':'Module'});const a=require(_0x338967(0x190)),g=require(_0x338967(0x1db)),T=require(_0x338967(0x1d0)),y=require(_0x338967(0x180)),O=require(_0x338967(0x19a)),$=require('dayjs'),R=require('rxjs'),q=_0x338967(0x1da);var p=(_0x221ac6=>(_0x221ac6[_0x221ac6[_0x338967(0x1ec)]=0x0]=_0x338967(0x1ec),_0x221ac6[_0x221ac6[_0x338967(0x1e9)]=0x1]=_0x338967(0x1e9),_0x221ac6[_0x221ac6['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x221ac6))(p||{}),v=(_0x1d0f3c=>(_0x1d0f3c[_0x1d0f3c[_0x338967(0x198)]=0x0]='Unknown',_0x1d0f3c[_0x1d0f3c[_0x338967(0x1a8)]=0x1]=_0x338967(0x1a8),_0x1d0f3c[_0x1d0f3c[_0x338967(0x1f4)]=0x2]=_0x338967(0x1f4),_0x1d0f3c[_0x1d0f3c[_0x338967(0x192)]=0x3]=_0x338967(0x192),_0x1d0f3c[_0x1d0f3c[_0x338967(0x1ca)]=0x4]='Delete',_0x1d0f3c[_0x1d0f3c[_0x338967(0x18e)]=0x5]=_0x338967(0x18e),_0x1d0f3c[_0x1d0f3c[_0x338967(0x1f1)]=-0x1]=_0x338967(0x1f1),_0x1d0f3c))(v||{});const P=_0x1d9ffe=>$(new Date(+_0x1d9ffe))[_0x338967(0x189)](_0x338967(0x1a5)),E=async(_0x19b7f2,_0x434887)=>{const _0x1abf5e=_0x338967,_0xbaad16=_0x19b7f2[_0x1abf5e(0x1c6)](a[_0x1abf5e(0x1de)]),_0x232d13=_0x19b7f2[_0x1abf5e(0x1c6)](O[_0x1abf5e(0x1a0)]);_0x434887[_0x1abf5e(0x174)](_0x1cc625=>{const _0x150b60=_0x1abf5e;_0xbaad16['getUser'](_0x1cc625)&&_0x434887[_0x150b60(0x17d)](_0x1cc625);}),_0x434887[_0x1abf5e(0x17c)]&&(await _0x232d13[_0x1abf5e(0x1c6)](_0x1abf5e(0x191),{'params':{'userIDs':[..._0x434887]}}))[_0x1abf5e(0x184)][_0x1abf5e(0x1d2)]['forEach'](_0xa936b0=>{const _0x482b18=_0x1abf5e;_0xa936b0&&_0xbaad16[_0x482b18(0x1a7)](_0xa936b0);});};var x=Object[_0x338967(0x17a)],H=Object['getOwnPropertyDescriptor'],Y=(_0x5a4617,_0xf8c4da,_0x1a5fa0,_0x5dd1b5)=>{const _0x4643f3=_0x338967;for(var _0x46e633=_0x5dd1b5>0x1?void 0x0:_0x5dd1b5?H(_0xf8c4da,_0x1a5fa0):_0xf8c4da,_0x154df8=_0x5a4617[_0x4643f3(0x1a3)]-0x1,_0x5d76a5;_0x154df8>=0x0;_0x154df8--)(_0x5d76a5=_0x5a4617[_0x154df8])&&(_0x46e633=(_0x5dd1b5?_0x5d76a5(_0xf8c4da,_0x1a5fa0,_0x46e633):_0x5d76a5(_0x46e633))||_0x46e633);return _0x5dd1b5&&_0x46e633&&x(_0xf8c4da,_0x1a5fa0,_0x46e633),_0x46e633;},I=(_0x1d944e,_0x56a6c7)=>(_0x1a3649,_0x38d7c3)=>_0x56a6c7(_0x1a3649,_0x38d7c3,_0x1d944e);function A(_0x524203,_0x46a277){const _0x1e720b=_0x338967,_0x835dc0=_0x524203[_0x1e720b(0x1dc)][0x0];return{..._0x46a277,'id':_0x835dc0['replyId'],'resolved':_0x524203['solved']===0x1,'dT':P(_0x835dc0[_0x1e720b(0x19b)]),'personId':_0x835dc0['userId'],'threadId':_0x835dc0[_0x1e720b(0x1b0)]};}function _0x58fd(){const _0x46683b=['_initUserSync','https','Solved','deleteComment','dataSource','OpenOrReOpen','subscribe','_commentService','addComment','UniverThreadCommentDataSourcePlugin','UNRECOGNIZED','Injector','userID','Reply','add','IThreadCommentDataSourceService','parse','forEach','ThreadCommentModel','2VgUPFB','replyId','getOwnPropertyDescriptor','href','defineProperty','931273hsUBbQ','size','delete','disposeWithMe','getMemberID','@univerjs-pro/collaboration-client','user','_userService','comments','body','rangeId','unitId','subject','1389228HDThJC','format','toStringTag','commentUpdate$','9675441BMSuwn','listComments','Solve','2298744WmHpGc','@univerjs/core','/universer-api/user/list','Edit','error','Ready','://','204GFRkmv','UniverCollaborationClientPlugin','Unknown','type','@univerjs/network','createTimestamp','slice','_init','onStarting','/delete','HTTPService','filter','resolved','length','comment','YYYY/MM/DD\x20HH:mm','content','addUser','Add','getThread','_sessionService','LifecycleStages','Disposable','parentId','avatar','UniverThreadCommentUIPlugin','threadId','requireSession','_threadCommentMentionDataService','_httpService','map','updateComment','stringify','solved','407157dtykwu','_threadCommentModel','UNIVER_UNKNOWN','resolveComment','_threadCommentDataSource','customRanges','UniverThreadCommentPlugin','/universer-api/comment/unit/','287986djlHtW','COMMENT','reply','getCurrentUser','_injector','host','get','protocol','http','personId','Delete','userId','symbol','_threadCommentMentionDataSource','code','CustomRangeType','@univerjs/thread-comment-ui','Inject','users','syncUpdateMutationToColla','_threadCommentDataSourceService','post','payload','ref','https:','UniverInstanceType','THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs/thread-comment','replies','location','UserManagerService','67945gXwBGe','searchParams','/list','Starting','/universer-api/authz/collaborator','/solved','Plugin','rangeType'];_0x58fd=function(){return _0x46683b;};return _0x58fd();}function L(_0x280c69,_0x4725e0,_0x3b065a){const _0x3139ad=_0x338967;var _0x5e2956,_0x2ce27c;if(((_0x2ce27c=(_0x5e2956=_0x280c69==null?void 0x0:_0x280c69[_0x3139ad(0x1dc)])==null?void 0x0:_0x5e2956['length'])!=null?_0x2ce27c:0x0)>0x0){const _0x3fa89c=(_0x230a4d,_0x34fde7)=>({'id':_0x230a4d['replyId'],'threadId':_0x230a4d[_0x3139ad(0x1b0)],'dT':P(_0x230a4d['createTimestamp']),'personId':_0x230a4d[_0x3139ad(0x1cb)],'resolved':_0x280c69['solved']===p['Solved'],'unitId':_0x4725e0,'subUnitId':_0x3b065a,'text':JSON['parse'](_0x230a4d[_0x3139ad(0x1a6)]),'parentId':_0x34fde7}),_0x33b92c=_0x3fa89c(_0x280c69[_0x3139ad(0x1dc)][0x0]);return{..._0x33b92c,'children':_0x280c69[_0x3139ad(0x1dc)][_0x3139ad(0x19c)](0x1)[_0x3139ad(0x1b4)](_0x4b602c=>_0x3fa89c(_0x4b602c,_0x33b92c['id']))};}return null;}let D=class{constructor(_0x53ce02,_0x5a854f,_0x1a88db,_0x3d65ae){const _0x5835fd=_0x338967;this[_0x5835fd(0x1b3)]=_0x53ce02,this[_0x5835fd(0x182)]=_0x5a854f,this['_sessionService']=_0x1a88db,this[_0x5835fd(0x1c4)]=_0x3d65ae;}async[_0x338967(0x1ef)](_0x2aba2b){const _0x3111d0=_0x338967;var _0x33ec62,_0x7a779c;const {parentId:_0x103eb8,unitId:_0x574bbc,text:_0x3016ff,threadId:_0x43d753}=_0x2aba2b,_0x45148e=(_0x7a779c=(_0x33ec62=_0x3016ff[_0x3111d0(0x1bd)])==null?void 0x0:_0x33ec62[_0x3111d0(0x1a1)](_0x277d99=>_0x277d99[_0x3111d0(0x1e6)]===a[_0x3111d0(0x1cf)][_0x3111d0(0x1c1)])[_0x3111d0(0x1b4)](_0x4fb443=>_0x4fb443[_0x3111d0(0x185)]))!=null?_0x7a779c:[],_0x2b5984=JSON['stringify'](_0x3016ff),_0x53ca79=(await this[_0x3111d0(0x1aa)][_0x3111d0(0x1b1)](_0x574bbc))[_0x3111d0(0x17f)]();if(_0x103eb8){const _0xe8c836={'memberId':_0x53ca79,'unitId':_0x574bbc,'content':_0x2b5984,'mention':_0x45148e,'threadId':_0x43d753},_0x5cd71a=(await this[_0x3111d0(0x1b3)]['post']('/universer-api/comment/unit/'+_0x574bbc+'/reply',{'body':_0xe8c836}))[_0x3111d0(0x184)][_0x3111d0(0x1c2)];return{..._0x2aba2b,'id':_0x5cd71a[_0x3111d0(0x177)],'dT':$(+_0x5cd71a['createTimestamp'])[_0x3111d0(0x189)](_0x3111d0(0x1a5)),'personId':_0x5cd71a[_0x3111d0(0x1cb)]};}else{const _0x56f376={'memberId':_0x53ca79,'unitId':_0x574bbc,'content':_0x2b5984,'mention':_0x45148e},_0x2dcfe0=await this[_0x3111d0(0x1b3)]['post'](_0x3111d0(0x1bf)+_0x574bbc+'/add',{'body':_0x56f376});return A(_0x2dcfe0[_0x3111d0(0x184)][_0x3111d0(0x1a4)],_0x2aba2b);}}async[_0x338967(0x1b5)](_0x195d31){const _0x363afa=_0x338967;var _0x470479,_0x29576c;const {text:_0x1aa110,unitId:_0x4bf50e}=_0x195d31,_0x32409b=(_0x29576c=(_0x470479=_0x1aa110[_0x363afa(0x1bd)])==null?void 0x0:_0x470479['filter'](_0x3144c7=>_0x3144c7[_0x363afa(0x1e6)]===a[_0x363afa(0x1cf)]['COMMENT'])[_0x363afa(0x1b4)](_0x49de1a=>_0x49de1a[_0x363afa(0x185)]))!=null?_0x29576c:[],_0x74d834=JSON[_0x363afa(0x1b6)](_0x1aa110),_0x4fb2aa=_0x195d31[_0x363afa(0x1b0)],_0x5231e2=_0x195d31['id'],_0x1dedb8={'memberId':(await this[_0x363afa(0x1aa)][_0x363afa(0x1b1)](_0x4bf50e))[_0x363afa(0x17f)](),'unitId':_0x4bf50e,'threadId':_0x4fb2aa,'mention':_0x32409b,'content':_0x74d834,'replyId':_0x5231e2},_0x36f265=await this[_0x363afa(0x1b3)][_0x363afa(0x1d5)](_0x363afa(0x1bf)+_0x4bf50e+'/edit',{'body':_0x1dedb8});return!_0x36f265['body'][_0x363afa(0x193)]||_0x36f265[_0x363afa(0x184)]['error'][_0x363afa(0x1ce)]===0x1;}async['resolveComment'](_0x4a6158){const _0x54828c=_0x338967,{unitId:_0x395a50}=_0x4a6158,_0x34c506=_0x4a6158[_0x54828c(0x1b0)],_0x13b991={'memberId':this[_0x54828c(0x182)][_0x54828c(0x1c3)]()['userID'],'unitId':_0x395a50,'threadId':_0x34c506,'solved':_0x4a6158[_0x54828c(0x1a2)]?p['Solved']:p['OpenOrReOpen']},_0x2ebae8=await this['_httpService'][_0x54828c(0x1d5)]('/universer-api/comment/unit/'+_0x395a50+_0x54828c(0x1e4),{'body':_0x13b991});return!_0x2ebae8[_0x54828c(0x184)][_0x54828c(0x193)]||_0x2ebae8['body']['error'][_0x54828c(0x1ce)]===0x1;}async['deleteComment'](_0x437e3d,_0x259b75,_0x4e2e05,_0x56e1c7){const _0x2f6289=_0x338967,_0x110d38={'memberId':(await this['_sessionService'][_0x2f6289(0x1b1)](_0x437e3d))[_0x2f6289(0x17f)](),'threadId':_0x4e2e05,'replyId':_0x56e1c7,'unitId':_0x437e3d},_0x26314e=await this[_0x2f6289(0x1b3)][_0x2f6289(0x1d5)]('/universer-api/comment/unit/'+_0x437e3d+_0x2f6289(0x19f),{'body':_0x110d38});return!_0x26314e[_0x2f6289(0x184)][_0x2f6289(0x193)]||_0x26314e[_0x2f6289(0x184)][_0x2f6289(0x193)][_0x2f6289(0x1ce)]===0x1;}async[_0x338967(0x18d)](_0x1f5490,_0x5cfaf9,_0x54c792){const _0xb0b9f3=_0x338967,_0x41d669={'unitId':_0x1f5490,'threadId':_0x54c792},_0x5bafff=await this['_httpService'][_0xb0b9f3(0x1d5)](_0xb0b9f3(0x1bf)+_0x1f5490+_0xb0b9f3(0x1e1),{'body':_0x41d669}),_0x475214=_0x54c792[_0xb0b9f3(0x1b4)](_0x3f301d=>L(_0x5bafff['body'][_0xb0b9f3(0x183)][_0x3f301d],_0x1f5490,_0x5cfaf9))[_0xb0b9f3(0x1a1)](Boolean);return Object['values'](_0x5bafff['body']['users'])['forEach'](_0x79ca44=>{const _0x4d6ff4=_0xb0b9f3;this[_0x4d6ff4(0x182)][_0x4d6ff4(0x1a7)](_0x79ca44);}),_0x475214;}['saveCommentToSnapshot'](_0x2cd23b){const _0xfab306=_0x338967;return{'id':_0x2cd23b['id'],'threadId':_0x2cd23b[_0xfab306(0x1b0)],'ref':_0x2cd23b[_0xfab306(0x1d7)]};}};D=Y([I(0x0,a[_0x338967(0x1d1)](O['HTTPService'])),I(0x1,a['Inject'](a['UserManagerService'])),I(0x2,a[_0x338967(0x1d1)](y['CollaborationSessionService'])),I(0x3,a[_0x338967(0x1d1)](a[_0x338967(0x1f2)]))],D);var G=Object[_0x338967(0x17a)],J=Object['getOwnPropertyDescriptor'],Z=(_0x1bdb49,_0xbdfda2,_0x34cfe9,_0x308920)=>{for(var _0x3562f6=_0x308920>0x1?void 0x0:_0x308920?J(_0xbdfda2,_0x34cfe9):_0xbdfda2,_0x3365a8=_0x1bdb49['length']-0x1,_0xa9f1e7;_0x3365a8>=0x0;_0x3365a8--)(_0xa9f1e7=_0x1bdb49[_0x3365a8])&&(_0x3562f6=(_0x308920?_0xa9f1e7(_0xbdfda2,_0x34cfe9,_0x3562f6):_0xa9f1e7(_0x3562f6))||_0x3562f6);return _0x308920&&_0x3562f6&&G(_0xbdfda2,_0x34cfe9,_0x3562f6),_0x3562f6;},F=(_0x32aab4,_0x293312)=>(_0x87d33d,_0x50d304)=>_0x293312(_0x87d33d,_0x50d304,_0x32aab4);let C=class{constructor(_0x3de386){const _0x191f92=_0x338967;this[_0x191f92(0x1b3)]=_0x3de386;}async['getMentions'](_0x33e03d,_0x291e45,_0x41ccd2){const _0x223a54=_0x338967,_0x55fce6=new URL(window[_0x223a54(0x1dd)][_0x223a54(0x179)])[_0x223a54(0x1e0)][_0x223a54(0x1c6)]('unit');if(!_0x55fce6)return[];const _0x1d11e7=window['location'][_0x223a54(0x1c5)],_0x12b8ee=window[_0x223a54(0x1dd)][_0x223a54(0x1c7)]===_0x223a54(0x1d8)?_0x223a54(0x1e8):_0x223a54(0x1c8);return(await this[_0x223a54(0x1b3)][_0x223a54(0x1c6)](_0x12b8ee+_0x223a54(0x195)+_0x1d11e7+_0x223a54(0x1e3),{'params':{'objectID':_0x55fce6,'unitID':_0x55fce6}}))[_0x223a54(0x184)]['collaborators']['map'](_0x1bd561=>{const _0x4d1e5a=_0x223a54;var _0x46dd0f,_0x95388a,_0x29f246,_0x42205b,_0x51549f,_0x1e434a;return{'id':(_0x95388a=(_0x46dd0f=_0x1bd561[_0x4d1e5a(0x187)])==null?void 0x0:_0x46dd0f[_0x4d1e5a(0x1f3)])!=null?_0x95388a:'','label':(_0x42205b=(_0x29f246=_0x1bd561[_0x4d1e5a(0x187)])==null?void 0x0:_0x29f246['name'])!=null?_0x42205b:'','icon':(_0x1e434a=(_0x51549f=_0x1bd561[_0x4d1e5a(0x187)])==null?void 0x0:_0x51549f[_0x4d1e5a(0x1ae)])!=null?_0x1e434a:'','type':'user'};});}};C=Z([F(0x0,a['Inject'](O[_0x338967(0x1a0)]))],C);var W=Object[_0x338967(0x17a)],z=Object[_0x338967(0x178)],B=(_0x54b469,_0xabc20b,_0x5e229a,_0x414406)=>{const _0x7a93d5=_0x338967;for(var _0x21128e=_0x414406>0x1?void 0x0:_0x414406?z(_0xabc20b,_0x5e229a):_0xabc20b,_0x37ac25=_0x54b469[_0x7a93d5(0x1a3)]-0x1,_0xfcb167;_0x37ac25>=0x0;_0x37ac25--)(_0xfcb167=_0x54b469[_0x37ac25])&&(_0x21128e=(_0x414406?_0xfcb167(_0xabc20b,_0x5e229a,_0x21128e):_0xfcb167(_0x21128e))||_0x21128e);return _0x414406&&_0x21128e&&W(_0xabc20b,_0x5e229a,_0x21128e),_0x21128e;},S=(_0x593e2d,_0x2399e6)=>(_0x21b0f8,_0x207883)=>_0x2399e6(_0x21b0f8,_0x207883,_0x593e2d);let b=class extends a['Disposable']{constructor(_0x289ac9,_0x26596d,_0x59b4e0,_0x46b0a6){const _0x3ffb34=_0x338967;super(),this['_threadCommentDataSourceService']=_0x289ac9,this[_0x3ffb34(0x1bc)]=_0x26596d,this['_threadCommentMentionDataService']=_0x59b4e0,this['_threadCommentMentionDataSource']=_0x46b0a6,this['_initDataSource']();}['_initDataSource'](){const _0x549146=_0x338967;this[_0x549146(0x1d4)][_0x549146(0x1eb)]=this[_0x549146(0x1bc)],this[_0x549146(0x1d4)][_0x549146(0x1d3)]=!0x1,this[_0x549146(0x1b2)]['dataSource']=this[_0x549146(0x1cd)];}};function _0x4edd(_0x37acf7,_0x5bf945){const _0x58fd2d=_0x58fd();return _0x4edd=function(_0x4eddc3,_0x40595c){_0x4eddc3=_0x4eddc3-0x171;let _0x97a7d0=_0x58fd2d[_0x4eddc3];return _0x97a7d0;},_0x4edd(_0x37acf7,_0x5bf945);}b=B([a['OnLifecycle'](a[_0x338967(0x1ab)][_0x338967(0x1e2)],b),S(0x0,g[_0x338967(0x172)]),S(0x1,a['Inject'](D)),S(0x2,T['IThreadCommentMentionDataService']),S(0x3,a['Inject'](C))],b);var K=Object[_0x338967(0x17a)],V=Object[_0x338967(0x178)],Q=(_0x555476,_0x4a418a,_0x20057d,_0x109766)=>{const _0xad49c7=_0x338967;for(var _0x4e5266=_0x109766>0x1?void 0x0:_0x109766?V(_0x4a418a,_0x20057d):_0x4a418a,_0x2176e1=_0x555476[_0xad49c7(0x1a3)]-0x1,_0x4a01ed;_0x2176e1>=0x0;_0x2176e1--)(_0x4a01ed=_0x555476[_0x2176e1])&&(_0x4e5266=(_0x109766?_0x4a01ed(_0x4a418a,_0x20057d,_0x4e5266):_0x4a01ed(_0x4e5266))||_0x4e5266);return _0x109766&&_0x4e5266&&K(_0x4a418a,_0x20057d,_0x4e5266),_0x4e5266;},_=(_0x4fb2c4,_0x4b2560)=>(_0x1e24fc,_0x40b10b)=>_0x4b2560(_0x1e24fc,_0x40b10b,_0x4fb2c4);let f=class extends a[_0x338967(0x1ac)]{constructor(_0x47fb92,_0x4ae539,_0x598f89,_0x453628){const _0x24c442=_0x338967;super(),this[_0x24c442(0x1ee)]=_0x47fb92,this[_0x24c442(0x1b9)]=_0x4ae539,this[_0x24c442(0x182)]=_0x598f89,this['_injector']=_0x453628,this[_0x24c442(0x19d)](),this[_0x24c442(0x1e7)]();}[_0x338967(0x1e7)](){const _0x55d817=_0x338967;this['disposeWithMe'](this['_threadCommentModel'][_0x55d817(0x18b)]['pipe'](R['bufferTime'](0x10))['subscribe'](_0x2928c2=>{const _0x5f1079=_0x55d817,_0x4b987f=new Set();_0x2928c2[_0x5f1079(0x174)](_0x107d53=>{const _0x40332c=_0x5f1079;switch(_0x107d53[_0x40332c(0x199)]){case _0x40332c(0x171):{const _0x307da5=_0x107d53[_0x40332c(0x1d6)][_0x40332c(0x1c9)];_0x4b987f[_0x40332c(0x171)](_0x307da5);break;}}}),E(this['_injector'],_0x4b987f);}));}[_0x338967(0x19d)](){const _0x2a05aa=_0x338967;this[_0x2a05aa(0x17e)](this[_0x2a05aa(0x1ee)][_0x2a05aa(0x18b)][_0x2a05aa(0x1ed)](async _0x510369=>{const _0x274aa7=_0x2a05aa;var _0x424aab,_0x5f366a;const _0x55da9a=this[_0x274aa7(0x1b9)][_0x274aa7(0x1a9)](_0x510369[_0x274aa7(0x186)],_0x510369[_0x274aa7(0x1b0)]);if(!_0x55da9a)return;const {unitId:_0x5a4e72,subUnitId:_0x195a98}=_0x55da9a;switch(_0x510369[_0x274aa7(0x181)]&&this[_0x274aa7(0x182)][_0x274aa7(0x1a7)](_0x510369[_0x274aa7(0x181)]),_0x510369[_0x274aa7(0x199)]){case v[_0x274aa7(0x1a8)]:break;case v[_0x274aa7(0x1f4)]:{this['_threadCommentModel']['addComment'](_0x5a4e72,_0x195a98,{'unitId':_0x5a4e72,'subUnitId':_0x195a98,'ref':'','id':_0x510369[_0x274aa7(0x177)],'dT':P(+_0x510369[_0x274aa7(0x19b)]),'threadId':_0x510369[_0x274aa7(0x1b0)],'personId':(_0x5f366a=(_0x424aab=_0x510369[_0x274aa7(0x181)])==null?void 0x0:_0x424aab[_0x274aa7(0x1f3)])!=null?_0x5f366a:_0x510369['userId'],'text':JSON[_0x274aa7(0x173)](_0x510369['content']),'parentId':_0x55da9a['id']});break;}case v[_0x274aa7(0x1ca)]:{const _0x171902=this[_0x274aa7(0x1b9)]['getComment'](_0x5a4e72,_0x195a98,_0x510369['replyId']);_0x171902&&_0x171902[_0x274aa7(0x1ad)]&&this[_0x274aa7(0x1b9)][_0x274aa7(0x1ea)](_0x5a4e72,_0x195a98,_0x510369[_0x274aa7(0x177)]);break;}case v['Edit']:{this[_0x274aa7(0x1b9)][_0x274aa7(0x1b5)](_0x5a4e72,_0x195a98,{'commentId':_0x510369[_0x274aa7(0x177)],'text':JSON['parse'](_0x510369[_0x274aa7(0x1a6)])});break;}case v[_0x274aa7(0x18e)]:{const _0xe39cd6=this[_0x274aa7(0x1b9)][_0x274aa7(0x1a9)](_0x5a4e72,_0x510369[_0x274aa7(0x1b0)]);_0xe39cd6&&this['_threadCommentModel'][_0x274aa7(0x1bb)](_0x5a4e72,_0x195a98,_0xe39cd6['id'],_0x510369[_0x274aa7(0x1b7)]===p[_0x274aa7(0x1e9)]);break;}}}));}};f=Q([a['OnLifecycle'](a[_0x338967(0x1ab)][_0x338967(0x194)],f),_(0x0,a['Inject'](y['CommentService'])),_(0x1,a['Inject'](g[_0x338967(0x175)])),_(0x2,a['Inject'](a['UserManagerService'])),_(0x3,a[_0x338967(0x1d1)](a['Injector']))],f);var N=Object['defineProperty'],X=Object[_0x338967(0x178)],k=(_0x374186,_0x13cda0,_0x3b1018)=>_0x13cda0 in _0x374186?N(_0x374186,_0x13cda0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b1018}):_0x374186[_0x13cda0]=_0x3b1018,ee=(_0x150bc1,_0x4d644c,_0x3217f7,_0x2e0a43)=>{const _0x10c991=_0x338967;for(var _0x17b565=_0x2e0a43>0x1?void 0x0:_0x2e0a43?X(_0x4d644c,_0x3217f7):_0x4d644c,_0x460bfe=_0x150bc1[_0x10c991(0x1a3)]-0x1,_0x2c8831;_0x460bfe>=0x0;_0x460bfe--)(_0x2c8831=_0x150bc1[_0x460bfe])&&(_0x17b565=(_0x2e0a43?_0x2c8831(_0x4d644c,_0x3217f7,_0x17b565):_0x2c8831(_0x17b565))||_0x17b565);return _0x2e0a43&&_0x17b565&&N(_0x4d644c,_0x3217f7,_0x17b565),_0x17b565;},re=(_0x4fcb47,_0x4ba339)=>(_0x1c81b8,_0x1150c2)=>_0x4ba339(_0x1c81b8,_0x1150c2,_0x4fcb47),U=(_0xb2848d,_0x213b16,_0x3bed66)=>k(_0xb2848d,typeof _0x213b16!=_0x338967(0x1cc)?_0x213b16+'':_0x213b16,_0x3bed66);exports['UniverThreadCommentDataSourcePlugin']=class extends a[_0x338967(0x1e5)]{constructor(_0x50638f,_0x5d6f19){const _0x3076c3=_0x338967;super(),this[_0x3076c3(0x1c4)]=_0x5d6f19;}[_0x338967(0x19e)](_0x2848f5){[[C],[D],[b],[f]]['forEach'](_0x284143=>{const _0x2dfeb6=_0x4edd;_0x2848f5[_0x2dfeb6(0x171)](_0x284143);});}},U(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',q),U(exports['UniverThreadCommentDataSourcePlugin'],_0x338967(0x199),a[_0x338967(0x1d9)][_0x338967(0x1ba)]),exports[_0x338967(0x1f0)]=ee([a['DependentOn'](g[_0x338967(0x1be)],T[_0x338967(0x1af)],y[_0x338967(0x197)]),re(0x1,a[_0x338967(0x1d1)](a[_0x338967(0x1f2)]))],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x554ab8=_0x4252;(function(_0x325eba,_0x21a7e9){const _0xd8f1b6=_0x4252,_0x15abb0=_0x325eba();while(!![]){try{const _0x4948fc=parseInt(_0xd8f1b6(0xb6))/0x1*(parseInt(_0xd8f1b6(0xaf))/0x2)+parseInt(_0xd8f1b6(0xd4))/0x3*(-parseInt(_0xd8f1b6(0xb3))/0x4)+parseInt(_0xd8f1b6(0xd7))/0x5+parseInt(_0xd8f1b6(0xff))/0x6+parseInt(_0xd8f1b6(0x8d))/0x7*(parseInt(_0xd8f1b6(0xaa))/0x8)+parseInt(_0xd8f1b6(0xe2))/0x9*(-parseInt(_0xd8f1b6(0x110))/0xa)+parseInt(_0xd8f1b6(0xfe))/0xb*(parseInt(_0xd8f1b6(0x86))/0xc);if(_0x4948fc===_0x21a7e9)break;else _0x15abb0['push'](_0x15abb0['shift']());}catch(_0x1e0335){_0x15abb0['push'](_0x15abb0['shift']());}}}(_0x3a83,0x81de5));function _0x4252(_0x1f4175,_0x35d423){const _0x3a83d2=_0x3a83();return _0x4252=function(_0x4252fc,_0x332ab1){_0x4252fc=_0x4252fc-0x82;let _0x43c411=_0x3a83d2[_0x4252fc];return _0x43c411;},_0x4252(_0x1f4175,_0x35d423);}Object['defineProperty'](exports,Symbol[_0x554ab8(0x95)],{'value':_0x554ab8(0x102)});const c=require(_0x554ab8(0xa3)),g=require('@univerjs/thread-comment'),N=require(_0x554ab8(0xe1)),y=require('@univerjs-pro/collaboration-client'),O=require(_0x554ab8(0xb9)),$=require(_0x554ab8(0xcd)),E=require(_0x554ab8(0x10e)),q='THREAD_COMMENT_DATA_SOURCE_PLUGIN';var p=(_0x574f7e=>(_0x574f7e[_0x574f7e[_0x554ab8(0x8b)]=0x0]=_0x554ab8(0x8b),_0x574f7e[_0x574f7e[_0x554ab8(0x8e)]=0x1]='Solved',_0x574f7e[_0x574f7e[_0x554ab8(0xbc)]=-0x1]=_0x554ab8(0xbc),_0x574f7e))(p||{}),v=(_0x71c60e=>(_0x71c60e[_0x71c60e[_0x554ab8(0xa0)]=0x0]='Unknown',_0x71c60e[_0x71c60e[_0x554ab8(0x101)]=0x1]=_0x554ab8(0x101),_0x71c60e[_0x71c60e[_0x554ab8(0xf1)]=0x2]='Reply',_0x71c60e[_0x71c60e[_0x554ab8(0x97)]=0x3]=_0x554ab8(0x97),_0x71c60e[_0x71c60e['Delete']=0x4]=_0x554ab8(0xd8),_0x71c60e[_0x71c60e[_0x554ab8(0x104)]=0x5]='Solve',_0x71c60e[_0x71c60e[_0x554ab8(0xbc)]=-0x1]=_0x554ab8(0xbc),_0x71c60e))(v||{});const P=_0x3db542=>$(new Date(+_0x3db542))[_0x554ab8(0x99)](_0x554ab8(0xd6)),x=async(_0x522bca,_0x2f4224)=>{const _0x59aca9=_0x554ab8,_0x590ba6=_0x522bca[_0x59aca9(0xac)](c[_0x59aca9(0xc3)]),_0x2ec2f4=_0x522bca['get'](O[_0x59aca9(0x10f)]);_0x2f4224['forEach'](_0x266a36=>{const _0x17e4a2=_0x59aca9;_0x590ba6[_0x17e4a2(0xae)](_0x266a36)&&_0x2f4224['delete'](_0x266a36);}),_0x2f4224[_0x59aca9(0x10b)]&&(await _0x2ec2f4[_0x59aca9(0xac)](_0x59aca9(0x108),{'params':{'userIDs':[..._0x2f4224]}}))['body'][_0x59aca9(0x106)][_0x59aca9(0x9e)](_0x5032a3=>{const _0x10cbbb=_0x59aca9;_0x5032a3&&_0x590ba6[_0x10cbbb(0xf5)](_0x5032a3);});};var Y=Object[_0x554ab8(0xd9)],G=Object[_0x554ab8(0xc7)],H=(_0x372fe3,_0x425ac1,_0x45964a,_0x23891f)=>{const _0xc78a78=_0x554ab8;for(var _0x1af61b=_0x23891f>0x1?void 0x0:_0x23891f?G(_0x425ac1,_0x45964a):_0x425ac1,_0x506a3a=_0x372fe3[_0xc78a78(0xde)]-0x1,_0x539e63;_0x506a3a>=0x0;_0x506a3a--)(_0x539e63=_0x372fe3[_0x506a3a])&&(_0x1af61b=(_0x23891f?_0x539e63(_0x425ac1,_0x45964a,_0x1af61b):_0x539e63(_0x1af61b))||_0x1af61b);return _0x23891f&&_0x1af61b&&Y(_0x425ac1,_0x45964a,_0x1af61b),_0x1af61b;},I=(_0x25a735,_0x5bea31)=>(_0x27888f,_0x21370d)=>_0x5bea31(_0x27888f,_0x21370d,_0x25a735);function L(_0x8f7121,_0x3ecf05){const _0x5d2d35=_0x554ab8,_0x4412c2=_0x8f7121[_0x5d2d35(0xb2)][0x0];return{..._0x3ecf05,'id':_0x4412c2[_0x5d2d35(0xec)],'resolved':_0x8f7121[_0x5d2d35(0x85)]===0x1,'dT':P(_0x4412c2[_0x5d2d35(0xe4)]),'personId':_0x4412c2[_0x5d2d35(0xa2)],'threadId':_0x4412c2[_0x5d2d35(0xdd)]};}function A(_0x2f3083,_0x15d175,_0x5badce){const _0x37c518=_0x554ab8;var _0x239d3a,_0x5877ea;if(((_0x5877ea=(_0x239d3a=_0x2f3083==null?void 0x0:_0x2f3083[_0x37c518(0xb2)])==null?void 0x0:_0x239d3a[_0x37c518(0xde)])!=null?_0x5877ea:0x0)>0x0){const _0x20804c=(_0x4ee987,_0x3f5cf0)=>({'id':_0x4ee987[_0x37c518(0xec)],'threadId':_0x4ee987[_0x37c518(0xdd)],'dT':P(_0x4ee987[_0x37c518(0xe4)]),'personId':_0x4ee987[_0x37c518(0xa2)],'resolved':_0x2f3083['solved']===p[_0x37c518(0x8e)],'unitId':_0x15d175,'subUnitId':_0x5badce,'text':JSON[_0x37c518(0xd1)](_0x4ee987['content']),'parentId':_0x3f5cf0}),_0x83e9a9=_0x20804c(_0x2f3083[_0x37c518(0xb2)][0x0]);return{..._0x83e9a9,'children':_0x2f3083[_0x37c518(0xb2)][_0x37c518(0xab)](0x1)[_0x37c518(0x90)](_0x17942f=>_0x20804c(_0x17942f,_0x83e9a9['id']))};}return null;}let C=class{constructor(_0x856ee6,_0x37bd05,_0x5297e0,_0x35990d){const _0x291a0a=_0x554ab8;this[_0x291a0a(0xdb)]=_0x856ee6,this[_0x291a0a(0xa7)]=_0x37bd05,this['_sessionService']=_0x5297e0,this[_0x291a0a(0xc5)]=_0x35990d;}async[_0x554ab8(0x107)](_0x27da1f){const _0x13e524=_0x554ab8;var _0x227b06,_0xd561c0;const {parentId:_0x385269,unitId:_0x1ca3f2,text:_0x630829,threadId:_0x26c955}=_0x27da1f,_0x511f64=(_0xd561c0=(_0x227b06=_0x630829[_0x13e524(0xfa)])==null?void 0x0:_0x227b06[_0x13e524(0xc8)](_0x5a2a5c=>_0x5a2a5c[_0x13e524(0xf2)]===c['CustomRangeType'][_0x13e524(0xe9)])[_0x13e524(0x90)](_0x45fb83=>_0x45fb83[_0x13e524(0x9b)]))!=null?_0xd561c0:[],_0x3e9aa8=JSON[_0x13e524(0x96)](_0x630829),_0x364029=(await this['_sessionService']['requireSession'](_0x1ca3f2))[_0x13e524(0x10a)]();if(_0x385269){const _0x5bc2d9={'memberId':_0x364029,'unitId':_0x1ca3f2,'content':_0x3e9aa8,'mention':_0x511f64,'threadId':_0x26c955},_0x5f23db=(await this[_0x13e524(0xdb)][_0x13e524(0x87)](_0x13e524(0xe6)+_0x1ca3f2+_0x13e524(0x89),{'body':_0x5bc2d9}))['body'][_0x13e524(0xc0)];return{..._0x27da1f,'id':_0x5f23db[_0x13e524(0xec)],'dT':$(+_0x5f23db[_0x13e524(0xe4)])[_0x13e524(0x99)](_0x13e524(0xd6)),'personId':_0x5f23db[_0x13e524(0xa2)]};}else{const _0x31f3a2={'memberId':_0x364029,'unitId':_0x1ca3f2,'content':_0x3e9aa8,'mention':_0x511f64},_0xb2438=await this[_0x13e524(0xdb)][_0x13e524(0x87)](_0x13e524(0xe6)+_0x1ca3f2+_0x13e524(0xcb),{'body':_0x31f3a2});return L(_0xb2438['body']['comment'],_0x27da1f);}}async[_0x554ab8(0xb0)](_0x2bc45c){const _0x587b41=_0x554ab8;var _0x1ad05b,_0x275b24;const {text:_0x549799,unitId:_0x51da56}=_0x2bc45c,_0x18142b=(_0x275b24=(_0x1ad05b=_0x549799[_0x587b41(0xfa)])==null?void 0x0:_0x1ad05b[_0x587b41(0xc8)](_0x12d5c5=>_0x12d5c5['rangeType']===c[_0x587b41(0xe8)][_0x587b41(0xe9)])[_0x587b41(0x90)](_0x35ee9e=>_0x35ee9e['rangeId']))!=null?_0x275b24:[],_0x37dbc8=JSON[_0x587b41(0x96)](_0x549799),_0x4554ec=_0x2bc45c[_0x587b41(0xdd)],_0x1c4f17=_0x2bc45c['id'],_0x2e6e57={'memberId':(await this['_sessionService'][_0x587b41(0xca)](_0x51da56))[_0x587b41(0x10a)](),'unitId':_0x51da56,'threadId':_0x4554ec,'mention':_0x18142b,'content':_0x37dbc8,'replyId':_0x1c4f17},_0x267fa4=await this[_0x587b41(0xdb)]['post'](_0x587b41(0xe6)+_0x51da56+_0x587b41(0xce),{'body':_0x2e6e57});return!_0x267fa4[_0x587b41(0xf4)][_0x587b41(0xdc)]||_0x267fa4[_0x587b41(0xf4)][_0x587b41(0xdc)][_0x587b41(0xef)]===0x1;}async[_0x554ab8(0xbb)](_0x321238){const _0x15c654=_0x554ab8,{unitId:_0x5e1df0}=_0x321238,_0x344d8a=_0x321238[_0x15c654(0xdd)],_0x11f762={'memberId':this[_0x15c654(0xa7)][_0x15c654(0xc4)]()[_0x15c654(0xf6)],'unitId':_0x5e1df0,'threadId':_0x344d8a,'solved':_0x321238[_0x15c654(0xf8)]?p[_0x15c654(0x8e)]:p[_0x15c654(0x8b)]},_0x518452=await this['_httpService']['post'](_0x15c654(0xe6)+_0x5e1df0+_0x15c654(0xa5),{'body':_0x11f762});return!_0x518452[_0x15c654(0xf4)][_0x15c654(0xdc)]||_0x518452[_0x15c654(0xf4)][_0x15c654(0xdc)]['code']===0x1;}async[_0x554ab8(0xcc)](_0x4a9244,_0x3fb863,_0x5127cc,_0x3a2bef){const _0x318e2c=_0x554ab8,_0x439932={'memberId':(await this[_0x318e2c(0xa8)][_0x318e2c(0xca)](_0x4a9244))[_0x318e2c(0x10a)](),'threadId':_0x5127cc,'replyId':_0x3a2bef,'unitId':_0x4a9244},_0x1b4deb=await this['_httpService'][_0x318e2c(0x87)](_0x318e2c(0xe6)+_0x4a9244+_0x318e2c(0xb4),{'body':_0x439932});return!_0x1b4deb[_0x318e2c(0xf4)][_0x318e2c(0xdc)]||_0x1b4deb[_0x318e2c(0xf4)][_0x318e2c(0xdc)][_0x318e2c(0xef)]===0x1;}async[_0x554ab8(0xfb)](_0x506b95,_0x4f8710,_0x1480d5){const _0x27b36=_0x554ab8,_0x4bac95={'unitId':_0x506b95,'threadId':_0x1480d5},_0x431236=await this[_0x27b36(0xdb)][_0x27b36(0x87)](_0x27b36(0xe6)+_0x506b95+_0x27b36(0x10d),{'body':_0x4bac95}),_0x144553=_0x1480d5['map'](_0x5582e6=>A(_0x431236[_0x27b36(0xf4)][_0x27b36(0x84)][_0x5582e6],_0x506b95,_0x4f8710))[_0x27b36(0xc8)](Boolean);return Object[_0x27b36(0x109)](_0x431236[_0x27b36(0xf4)][_0x27b36(0x106)])['forEach'](_0x478a75=>{const _0x2f1968=_0x27b36;this[_0x2f1968(0xa7)][_0x2f1968(0xf5)](_0x478a75);}),_0x144553;}[_0x554ab8(0x8f)](_0x273d8d){const _0x22aac5=_0x554ab8;return{'id':_0x273d8d['id'],'threadId':_0x273d8d[_0x22aac5(0xdd)],'ref':_0x273d8d['ref']};}};C=H([I(0x0,c[_0x554ab8(0x105)](O[_0x554ab8(0x10f)])),I(0x1,c[_0x554ab8(0x105)](c[_0x554ab8(0xc3)])),I(0x2,c[_0x554ab8(0x105)](y['CollaborationSessionService'])),I(0x3,c[_0x554ab8(0x105)](c[_0x554ab8(0xbe)]))],C);var J=Object['defineProperty'],F=Object[_0x554ab8(0xc7)],Z=(_0x2173aa,_0x86ca3,_0x2af8ab,_0x40c3e8)=>{const _0x49990a=_0x554ab8;for(var _0x2f9722=_0x40c3e8>0x1?void 0x0:_0x40c3e8?F(_0x86ca3,_0x2af8ab):_0x86ca3,_0x96eae8=_0x2173aa[_0x49990a(0xde)]-0x1,_0x36f788;_0x96eae8>=0x0;_0x96eae8--)(_0x36f788=_0x2173aa[_0x96eae8])&&(_0x2f9722=(_0x40c3e8?_0x36f788(_0x86ca3,_0x2af8ab,_0x2f9722):_0x36f788(_0x2f9722))||_0x2f9722);return _0x40c3e8&&_0x2f9722&&J(_0x86ca3,_0x2af8ab,_0x2f9722),_0x2f9722;},W=(_0x316da8,_0x240a01)=>(_0x4d7511,_0x21debf)=>_0x240a01(_0x4d7511,_0x21debf,_0x316da8);let D=class{constructor(_0x5c8d90){const _0x5c94b9=_0x554ab8;this[_0x5c94b9(0xdb)]=_0x5c8d90;}async[_0x554ab8(0xc9)](_0x2ab793,_0x1f9330,_0x2d69bb){const _0x2e7e5c=_0x554ab8,_0x6f6bbe=new URL(window[_0x2e7e5c(0xfc)][_0x2e7e5c(0xda)])[_0x2e7e5c(0xbf)][_0x2e7e5c(0xac)](_0x2e7e5c(0xe5));if(!_0x6f6bbe)return[];const _0x273fc4=window[_0x2e7e5c(0xfc)][_0x2e7e5c(0x10c)],_0x4fcaab=window[_0x2e7e5c(0xfc)][_0x2e7e5c(0x112)]==='https:'?_0x2e7e5c(0xc2):_0x2e7e5c(0xf7);return(await this[_0x2e7e5c(0xdb)][_0x2e7e5c(0xac)](_0x4fcaab+_0x2e7e5c(0xa9)+_0x273fc4+_0x2e7e5c(0xfd),{'params':{'objectID':_0x6f6bbe,'unitID':_0x6f6bbe}}))[_0x2e7e5c(0xf4)][_0x2e7e5c(0x100)][_0x2e7e5c(0x90)](_0xbc78e9=>{const _0x7de3db=_0x2e7e5c;var _0x394686,_0x22851f,_0x1627ba,_0x216901,_0xc8b96f,_0x384f1d;return{'id':(_0x22851f=(_0x394686=_0xbc78e9['subject'])==null?void 0x0:_0x394686[_0x7de3db(0xf6)])!=null?_0x22851f:'','label':(_0x216901=(_0x1627ba=_0xbc78e9[_0x7de3db(0xa6)])==null?void 0x0:_0x1627ba[_0x7de3db(0x88)])!=null?_0x216901:'','icon':(_0x384f1d=(_0xc8b96f=_0xbc78e9[_0x7de3db(0xa6)])==null?void 0x0:_0xc8b96f[_0x7de3db(0xe0)])!=null?_0x384f1d:'','type':_0x7de3db(0xa1)};});}};D=Z([W(0x0,c[_0x554ab8(0x105)](O[_0x554ab8(0x10f)]))],D);var z=Object['defineProperty'],B=Object[_0x554ab8(0xc7)],K=(_0x3a155e,_0x51e748,_0x11d325,_0x457d6f)=>{const _0x52489a=_0x554ab8;for(var _0x54c06a=_0x457d6f>0x1?void 0x0:_0x457d6f?B(_0x51e748,_0x11d325):_0x51e748,_0x5ccc48=_0x3a155e[_0x52489a(0xde)]-0x1,_0x531392;_0x5ccc48>=0x0;_0x5ccc48--)(_0x531392=_0x3a155e[_0x5ccc48])&&(_0x54c06a=(_0x457d6f?_0x531392(_0x51e748,_0x11d325,_0x54c06a):_0x531392(_0x54c06a))||_0x54c06a);return _0x457d6f&&_0x54c06a&&z(_0x51e748,_0x11d325,_0x54c06a),_0x54c06a;},S=(_0x3316a5,_0xf352d1)=>(_0x393ea9,_0x1a57e2)=>_0xf352d1(_0x393ea9,_0x1a57e2,_0x3316a5);let f=class extends c['Disposable']{constructor(_0x39eb8d,_0x1c91a9,_0xba7d24,_0x2b470d){const _0x203a18=_0x554ab8;super(),this[_0x203a18(0xd0)]=_0x39eb8d,this[_0x203a18(0xdf)]=_0x1c91a9,this[_0x203a18(0xb5)]=_0xba7d24,this[_0x203a18(0xb7)]=_0x2b470d,this[_0x203a18(0x98)]();}[_0x554ab8(0x98)](){const _0xe564ac=_0x554ab8;this[_0xe564ac(0xd0)][_0xe564ac(0x111)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0xe564ac(0x113)]=!0x1,this['_threadCommentMentionDataService'][_0xe564ac(0x111)]=this[_0xe564ac(0xb7)];}};f=K([c[_0x554ab8(0x9c)](c['LifecycleStages'][_0x554ab8(0x9d)],f),S(0x0,g[_0x554ab8(0xc1)]),S(0x1,c[_0x554ab8(0x105)](C)),S(0x2,N[_0x554ab8(0x93)]),S(0x3,c['Inject'](D))],f);var V=Object['defineProperty'],Q=Object[_0x554ab8(0xc7)],X=(_0x4f13d5,_0x4ebc90,_0x47f22f,_0x1bbcfd)=>{const _0x302872=_0x554ab8;for(var _0x1b4baf=_0x1bbcfd>0x1?void 0x0:_0x1bbcfd?Q(_0x4ebc90,_0x47f22f):_0x4ebc90,_0x5286f2=_0x4f13d5[_0x302872(0xde)]-0x1,_0x28c8e3;_0x5286f2>=0x0;_0x5286f2--)(_0x28c8e3=_0x4f13d5[_0x5286f2])&&(_0x1b4baf=(_0x1bbcfd?_0x28c8e3(_0x4ebc90,_0x47f22f,_0x1b4baf):_0x28c8e3(_0x1b4baf))||_0x1b4baf);return _0x1bbcfd&&_0x1b4baf&&V(_0x4ebc90,_0x47f22f,_0x1b4baf),_0x1b4baf;},_=(_0x8b1144,_0x1442a4)=>(_0x49d049,_0x46c4e5)=>_0x1442a4(_0x49d049,_0x46c4e5,_0x8b1144);let b=class extends c[_0x554ab8(0x103)]{constructor(_0x1a3564,_0x5719fb,_0x4c8146,_0x4018d5){const _0x18f7fe=_0x554ab8;super(),this[_0x18f7fe(0xe3)]=_0x1a3564,this[_0x18f7fe(0xd3)]=_0x5719fb,this[_0x18f7fe(0xa7)]=_0x4c8146,this['_injector']=_0x4018d5,this[_0x18f7fe(0xcf)](),this[_0x18f7fe(0xed)]();}[_0x554ab8(0xed)](){const _0x15536d=_0x554ab8;this[_0x15536d(0xf0)](this[_0x15536d(0xd3)][_0x15536d(0xa4)]['pipe'](E[_0x15536d(0x9a)](0x10))[_0x15536d(0xea)](_0x333207=>{const _0x1fbb1c=_0x15536d,_0x392b3c=new Set();_0x333207[_0x1fbb1c(0x9e)](_0x9525f1=>{const _0x5c040b=_0x1fbb1c;switch(_0x9525f1[_0x5c040b(0xee)]){case _0x5c040b(0xf3):{const _0x29fb73=_0x9525f1['payload'][_0x5c040b(0xb8)];_0x392b3c[_0x5c040b(0xf3)](_0x29fb73);break;}}}),x(this[_0x1fbb1c(0xc5)],_0x392b3c);}));}[_0x554ab8(0xcf)](){const _0xcdb557=_0x554ab8;this[_0xcdb557(0xf0)](this[_0xcdb557(0xe3)]['commentUpdate$']['subscribe'](async _0xe135ea=>{const _0x423f26=_0xcdb557;var _0x5808fb,_0x443816;const _0x4595a7=this[_0x423f26(0xd3)][_0x423f26(0xd2)](_0xe135ea['unitId'],_0xe135ea[_0x423f26(0xdd)]);if(!_0x4595a7)return;const {unitId:_0x13f44e,subUnitId:_0x5ec348}=_0x4595a7;switch(_0xe135ea[_0x423f26(0xa1)]&&this['_userService']['addUser'](_0xe135ea['user']),_0xe135ea[_0x423f26(0xee)]){case v[_0x423f26(0x101)]:break;case v[_0x423f26(0xf1)]:{this[_0x423f26(0xd3)][_0x423f26(0x107)](_0x13f44e,_0x5ec348,{'unitId':_0x13f44e,'subUnitId':_0x5ec348,'ref':'','id':_0xe135ea[_0x423f26(0xec)],'dT':P(+_0xe135ea['createTimestamp']),'threadId':_0xe135ea['threadId'],'personId':(_0x443816=(_0x5808fb=_0xe135ea[_0x423f26(0xa1)])==null?void 0x0:_0x5808fb[_0x423f26(0xf6)])!=null?_0x443816:_0xe135ea[_0x423f26(0xa2)],'text':JSON['parse'](_0xe135ea[_0x423f26(0xc6)]),'parentId':_0x4595a7['id']});break;}case v[_0x423f26(0xd8)]:{const _0x15b312=this[_0x423f26(0xd3)][_0x423f26(0x82)](_0x13f44e,_0x5ec348,_0xe135ea[_0x423f26(0xec)]);_0x15b312&&_0x15b312[_0x423f26(0xba)]&&this[_0x423f26(0xd3)][_0x423f26(0xcc)](_0x13f44e,_0x5ec348,_0xe135ea[_0x423f26(0xec)]);break;}case v[_0x423f26(0x97)]:{this[_0x423f26(0xd3)][_0x423f26(0xb0)](_0x13f44e,_0x5ec348,{'commentId':_0xe135ea[_0x423f26(0xec)],'text':JSON[_0x423f26(0xd1)](_0xe135ea['content'])});break;}case v['Solve']:{const _0x5c6a7a=this['_threadCommentModel']['getThread'](_0x13f44e,_0xe135ea[_0x423f26(0xdd)]);_0x5c6a7a&&this[_0x423f26(0xd3)][_0x423f26(0xbb)](_0x13f44e,_0x5ec348,_0x5c6a7a['id'],_0xe135ea['solved']===p[_0x423f26(0x8e)]);break;}}}));}};b=X([c['OnLifecycle'](c[_0x554ab8(0xe7)][_0x554ab8(0xad)],b),_(0x0,c[_0x554ab8(0x105)](y['CommentService'])),_(0x1,c['Inject'](g[_0x554ab8(0xbd)])),_(0x2,c[_0x554ab8(0x105)](c['UserManagerService'])),_(0x3,c[_0x554ab8(0x105)](c[_0x554ab8(0xbe)]))],b);const k=_0x554ab8(0xf9),ee={};var U=Object[_0x554ab8(0xd9)],re=Object['getOwnPropertyDescriptor'],te=(_0x583835,_0x5a496c,_0x5af694)=>_0x5a496c in _0x583835?U(_0x583835,_0x5a496c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5af694}):_0x583835[_0x5a496c]=_0x5af694,se=(_0x1a48a9,_0x861c7e,_0x3c4f4f,_0x48bbcf)=>{const _0x295832=_0x554ab8;for(var _0x246baa=_0x48bbcf>0x1?void 0x0:_0x48bbcf?re(_0x861c7e,_0x3c4f4f):_0x861c7e,_0x399b66=_0x1a48a9[_0x295832(0xde)]-0x1,_0x508e87;_0x399b66>=0x0;_0x399b66--)(_0x508e87=_0x1a48a9[_0x399b66])&&(_0x246baa=(_0x48bbcf?_0x508e87(_0x861c7e,_0x3c4f4f,_0x246baa):_0x508e87(_0x246baa))||_0x246baa);return _0x48bbcf&&_0x246baa&&U(_0x861c7e,_0x3c4f4f,_0x246baa),_0x246baa;},T=(_0x2d42fb,_0x4c691e)=>(_0x4f749c,_0x3efd98)=>_0x4c691e(_0x4f749c,_0x3efd98,_0x2d42fb),R=(_0x54bfc4,_0x12cd1d,_0x3e9748)=>te(_0x54bfc4,typeof _0x12cd1d!=_0x554ab8(0xb1)?_0x12cd1d+'':_0x12cd1d,_0x3e9748);function _0x3a83(){const _0x99fc82=['syncUpdateMutationToColla','getComment','UNIVER_UNKNOWN','comments','solved','12yJMlTP','post','name','/reply','UniverInstanceType','OpenOrReOpen','IConfigService','5473153DRacKP','Solved','saveCommentToSnapshot','map','DependentOn','UniverThreadCommentDataSourcePlugin','IThreadCommentMentionDataService','pluginName','toStringTag','stringify','Edit','_initDataSource','format','bufferTime','rangeId','OnLifecycle','Starting','forEach','UniverThreadCommentPlugin','Unknown','user','userId','@univerjs/core','commentUpdate$','/solved','subject','_userService','_sessionService','://','8cGKrvQ','slice','get','Ready','getUser','174516BJXyyJ','updateComment','symbol','replies','3736172gvGDWx','/delete','_threadCommentMentionDataService','3NpnCBL','_threadCommentMentionDataSource','personId','@univerjs/network','parentId','resolveComment','UNRECOGNIZED','ThreadCommentModel','Injector','searchParams','reply','IThreadCommentDataSourceService','https','UserManagerService','getCurrentUser','_injector','content','getOwnPropertyDescriptor','filter','getMentions','requireSession','/add','deleteComment','dayjs','/edit','_init','_threadCommentDataSourceService','parse','getThread','_threadCommentModel','3NtsUwu','onStarting','YYYY/MM/DD\x20HH:mm','3773670qOnlSW','Delete','defineProperty','href','_httpService','error','threadId','length','_threadCommentDataSource','avatar','@univerjs/thread-comment-ui','387oIAQLN','_commentService','createTimestamp','unit','/universer-api/comment/unit/','LifecycleStages','CustomRangeType','COMMENT','subscribe','_configService','replyId','_initUserSync','type','code','disposeWithMe','Reply','rangeType','add','body','addUser','userID','http','resolved','thread-comment-data-source.config','customRanges','listComments','location','/universer-api/authz/collaborator','6130069ubMJHd','141054jwtNeJ','collaborators','Add','Module','Disposable','Solve','Inject','users','addComment','/universer-api/user/list','values','getMemberID','size','host','/list','rxjs','HTTPService','212370ERVyPu','dataSource','protocol'];_0x3a83=function(){return _0x99fc82;};return _0x3a83();}exports[_0x554ab8(0x92)]=class extends c['Plugin']{constructor(_0x1773fb=ee,_0x35d89a,_0x461e64){const _0x56cfc9=_0x554ab8;super(),this['_config']=_0x1773fb,this[_0x56cfc9(0xc5)]=_0x35d89a,this[_0x56cfc9(0xeb)]=_0x461e64;const {..._0x4f669c}=this['_config'];this[_0x56cfc9(0xeb)]['setConfig'](k,_0x4f669c);}[_0x554ab8(0xd5)](){const _0x4aec82=_0x554ab8;[[D],[C],[f],[b]][_0x4aec82(0x9e)](_0x53fdac=>{const _0xa19662=_0x4aec82;this[_0xa19662(0xc5)]['add'](_0x53fdac);});}},R(exports[_0x554ab8(0x92)],_0x554ab8(0x94),q),R(exports[_0x554ab8(0x92)],'type',c[_0x554ab8(0x8a)][_0x554ab8(0x83)]),exports[_0x554ab8(0x92)]=se([c[_0x554ab8(0x91)](g[_0x554ab8(0x9f)],N['UniverThreadCommentUIPlugin'],y['UniverCollaborationClientPlugin']),T(0x1,c[_0x554ab8(0x105)](c[_0x554ab8(0xbe)])),T(0x2,c[_0x554ab8(0x8c)])],exports[_0x554ab8(0x92)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x143511=_0x322a;(function(_0x5efbee,_0xac3be2){const _0x1fa382=_0x322a,_0x34691d=_0x5efbee();while(!![]){try{const _0x4c37ee=parseInt(_0x1fa382(0xc6))/0x1*(-parseInt(_0x1fa382(0x97))/0x2)+-parseInt(_0x1fa382(0xcb))/0x3+parseInt(_0x1fa382(0xee))/0x4*(-parseInt(_0x1fa382(0xa9))/0x5)+-parseInt(_0x1fa382(0xf3))/0x6+-parseInt(_0x1fa382(0xba))/0x7+-parseInt(_0x1fa382(0xe3))/0x8*(parseInt(_0x1fa382(0x8e))/0x9)+-parseInt(_0x1fa382(0x8d))/0xa*(-parseInt(_0x1fa382(0xf0))/0xb);if(_0x4c37ee===_0xac3be2)break;else _0x34691d['push'](_0x34691d['shift']());}catch(_0x38249b){_0x34691d['push'](_0x34691d['shift']());}}}(_0x312c,0xec21d));import{UserManagerService as _0x5df1d1,Inject as _0x3812c1,Injector as _0x5a9d8e,CustomRangeType as _0x385822,OnLifecycle as _0x26df7f,LifecycleStages as _0x3fc83a,Disposable as _0x295544,UniverInstanceType as _0x4e03ab,DependentOn as _0x547640,Plugin as _0x33087c}from'@univerjs/core';import{IThreadCommentDataSourceService as _0x23f907,ThreadCommentModel as _0x58f947,UniverThreadCommentPlugin as _0x298c54}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0x1a4824,UniverThreadCommentUIPlugin as _0xe12c45}from'@univerjs/thread-comment-ui';import{CollaborationSessionService as _0xee5160,CommentService as _0x3ae437,UniverCollaborationClientPlugin as _0xea4fb8}from'@univerjs-pro/collaboration-client';import{HTTPService as _0x433638}from'@univerjs/network';import _0x24772b from'dayjs';function _0x322a(_0x18dc60,_0x49a468){const _0x312c1e=_0x312c();return _0x322a=function(_0x322aad,_0x873079){_0x322aad=_0x322aad-0x84;let _0x5aaa74=_0x312c1e[_0x322aad];return _0x5aaa74;},_0x322a(_0x18dc60,_0x49a468);}import{bufferTime as _0x3db047}from'rxjs';const V='THREAD_COMMENT_DATA_SOURCE_PLUGIN';var v=(_0x5d7dd3=>(_0x5d7dd3[_0x5d7dd3[_0x143511(0x91)]=0x0]=_0x143511(0x91),_0x5d7dd3[_0x5d7dd3['Solved']=0x1]=_0x143511(0xb6),_0x5d7dd3[_0x5d7dd3[_0x143511(0x93)]=-0x1]=_0x143511(0x93),_0x5d7dd3))(v||{}),p=(_0xd4625d=>(_0xd4625d[_0xd4625d['Unknown']=0x0]=_0x143511(0x9f),_0xd4625d[_0xd4625d[_0x143511(0xcf)]=0x1]=_0x143511(0xcf),_0xd4625d[_0xd4625d[_0x143511(0xa5)]=0x2]=_0x143511(0xa5),_0xd4625d[_0xd4625d['Edit']=0x3]=_0x143511(0xc4),_0xd4625d[_0xd4625d[_0x143511(0x85)]=0x4]=_0x143511(0x85),_0xd4625d[_0xd4625d[_0x143511(0xe8)]=0x5]=_0x143511(0xe8),_0xd4625d[_0xd4625d[_0x143511(0x93)]=-0x1]=_0x143511(0x93),_0xd4625d))(p||{});const w=_0x78c020=>_0x24772b(new Date(+_0x78c020))[_0x143511(0xca)](_0x143511(0xe1)),Q=async(_0x259563,_0x4c1083)=>{const _0x8c1aa0=_0x143511,_0x26ed3b=_0x259563[_0x8c1aa0(0xbe)](_0x5df1d1),_0x2aeb45=_0x259563[_0x8c1aa0(0xbe)](_0x433638);_0x4c1083[_0x8c1aa0(0xbc)](_0x17ffb7=>{const _0x1ec272=_0x8c1aa0;_0x26ed3b[_0x1ec272(0xd4)](_0x17ffb7)&&_0x4c1083[_0x1ec272(0xdd)](_0x17ffb7);}),_0x4c1083[_0x8c1aa0(0x8f)]&&(await _0x2aeb45[_0x8c1aa0(0xbe)](_0x8c1aa0(0xa2),{'params':{'userIDs':[..._0x4c1083]}}))[_0x8c1aa0(0xa0)]['users'][_0x8c1aa0(0xbc)](_0x3b60ba=>{const _0x228292=_0x8c1aa0;_0x3b60ba&&_0x26ed3b[_0x228292(0x98)](_0x3b60ba);});};var X=Object[_0x143511(0xa3)],k=Object[_0x143511(0xc9)],ee=(_0x45f155,_0xddd270,_0x2c037d,_0x2e84f6)=>{for(var _0x151e4d=_0x2e84f6>0x1?void 0x0:_0x2e84f6?k(_0xddd270,_0x2c037d):_0xddd270,_0x5f5cd5=_0x45f155['length']-0x1,_0x4cd2d8;_0x5f5cd5>=0x0;_0x5f5cd5--)(_0x4cd2d8=_0x45f155[_0x5f5cd5])&&(_0x151e4d=(_0x2e84f6?_0x4cd2d8(_0xddd270,_0x2c037d,_0x151e4d):_0x4cd2d8(_0x151e4d))||_0x151e4d);return _0x2e84f6&&_0x151e4d&&X(_0xddd270,_0x2c037d,_0x151e4d),_0x151e4d;},_=(_0x642b57,_0x5f3e20)=>(_0x389926,_0x352b81)=>_0x5f3e20(_0x389926,_0x352b81,_0x642b57);function re(_0x4a0b42,_0x59bbcf){const _0x1a3f6c=_0x143511,_0x2042c4=_0x4a0b42[_0x1a3f6c(0x88)][0x0];return{..._0x59bbcf,'id':_0x2042c4[_0x1a3f6c(0x86)],'resolved':_0x4a0b42[_0x1a3f6c(0xe7)]===0x1,'dT':w(_0x2042c4['createTimestamp']),'personId':_0x2042c4[_0x1a3f6c(0xa4)],'threadId':_0x2042c4[_0x1a3f6c(0xef)]};}function te(_0x12de68,_0x4354c,_0x222db2){const _0x484322=_0x143511;var _0x44afe6,_0x2ab616;if(((_0x2ab616=(_0x44afe6=_0x12de68==null?void 0x0:_0x12de68[_0x484322(0x88)])==null?void 0x0:_0x44afe6['length'])!=null?_0x2ab616:0x0)>0x0){const _0x4effe8=(_0x5b44c7,_0x331c5b)=>({'id':_0x5b44c7[_0x484322(0x86)],'threadId':_0x5b44c7['threadId'],'dT':w(_0x5b44c7['createTimestamp']),'personId':_0x5b44c7[_0x484322(0xa4)],'resolved':_0x12de68[_0x484322(0xe7)]===v[_0x484322(0xb6)],'unitId':_0x4354c,'subUnitId':_0x222db2,'text':JSON[_0x484322(0xa8)](_0x5b44c7['content']),'parentId':_0x331c5b}),_0x2ab751=_0x4effe8(_0x12de68[_0x484322(0x88)][0x0]);return{..._0x2ab751,'children':_0x12de68[_0x484322(0x88)][_0x484322(0xd8)](0x1)[_0x484322(0x9c)](_0x4b707a=>_0x4effe8(_0x4b707a,_0x2ab751['id']))};}return null;}let D=class{constructor(_0x3108e4,_0x5eb5e0,_0x5a0b8b,_0x426a87){const _0x462731=_0x143511;this[_0x462731(0xf1)]=_0x3108e4,this[_0x462731(0xcc)]=_0x5eb5e0,this['_sessionService']=_0x5a0b8b,this[_0x462731(0xeb)]=_0x426a87;}async[_0x143511(0xa1)](_0x29741e){const _0x76a63=_0x143511;var _0x7dc0c,_0x43cf69;const {parentId:_0x58af8a,unitId:_0x3c20c7,text:_0x500525,threadId:_0x26dd0e}=_0x29741e,_0x433ee7=(_0x43cf69=(_0x7dc0c=_0x500525['customRanges'])==null?void 0x0:_0x7dc0c[_0x76a63(0x8a)](_0x8b1ef9=>_0x8b1ef9[_0x76a63(0xe2)]===_0x385822['COMMENT'])[_0x76a63(0x9c)](_0x39585d=>_0x39585d[_0x76a63(0x92)]))!=null?_0x43cf69:[],_0x4841d3=JSON['stringify'](_0x500525),_0x51b6a2=(await this['_sessionService'][_0x76a63(0xb4)](_0x3c20c7))[_0x76a63(0xe5)]();if(_0x58af8a){const _0xf3c8fb={'memberId':_0x51b6a2,'unitId':_0x3c20c7,'content':_0x4841d3,'mention':_0x433ee7,'threadId':_0x26dd0e},_0x3675b6=(await this['_httpService'][_0x76a63(0xd6)](_0x76a63(0x9e)+_0x3c20c7+_0x76a63(0x89),{'body':_0xf3c8fb}))[_0x76a63(0xa0)][_0x76a63(0xc7)];return{..._0x29741e,'id':_0x3675b6['replyId'],'dT':_0x24772b(+_0x3675b6[_0x76a63(0xf2)])[_0x76a63(0xca)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3675b6['userId']};}else{const _0x41eb97={'memberId':_0x51b6a2,'unitId':_0x3c20c7,'content':_0x4841d3,'mention':_0x433ee7},_0x559765=await this[_0x76a63(0xf1)]['post'](_0x76a63(0x9e)+_0x3c20c7+_0x76a63(0xac),{'body':_0x41eb97});return re(_0x559765['body'][_0x76a63(0xf5)],_0x29741e);}}async[_0x143511(0xd9)](_0x32c49a){const _0x2d2fe1=_0x143511;var _0x2a8422,_0x12d3ea;const {text:_0x318ced,unitId:_0x5393cb}=_0x32c49a,_0x58ec3e=(_0x12d3ea=(_0x2a8422=_0x318ced[_0x2d2fe1(0xd5)])==null?void 0x0:_0x2a8422[_0x2d2fe1(0x8a)](_0x4fa10e=>_0x4fa10e['rangeType']===_0x385822[_0x2d2fe1(0xb7)])[_0x2d2fe1(0x9c)](_0x43993c=>_0x43993c[_0x2d2fe1(0x92)]))!=null?_0x12d3ea:[],_0x1e3781=JSON['stringify'](_0x318ced),_0x46b300=_0x32c49a['threadId'],_0x43994a=_0x32c49a['id'],_0x276a18={'memberId':(await this['_sessionService'][_0x2d2fe1(0xb4)](_0x5393cb))[_0x2d2fe1(0xe5)](),'unitId':_0x5393cb,'threadId':_0x46b300,'mention':_0x58ec3e,'content':_0x1e3781,'replyId':_0x43994a},_0x1a311a=await this[_0x2d2fe1(0xf1)][_0x2d2fe1(0xd6)]('/universer-api/comment/unit/'+_0x5393cb+_0x2d2fe1(0xcd),{'body':_0x276a18});return!_0x1a311a[_0x2d2fe1(0xa0)][_0x2d2fe1(0xe9)]||_0x1a311a[_0x2d2fe1(0xa0)]['error'][_0x2d2fe1(0xd3)]===0x1;}async[_0x143511(0xe0)](_0x18954e){const _0x2815d3=_0x143511,{unitId:_0x37ed62}=_0x18954e,_0x48dd86=_0x18954e['threadId'],_0x623d5d={'memberId':this[_0x2815d3(0xcc)][_0x2815d3(0xce)]()[_0x2815d3(0xad)],'unitId':_0x37ed62,'threadId':_0x48dd86,'solved':_0x18954e[_0x2815d3(0xc1)]?v[_0x2815d3(0xb6)]:v[_0x2815d3(0x91)]},_0x1ac204=await this[_0x2815d3(0xf1)][_0x2815d3(0xd6)](_0x2815d3(0x9e)+_0x37ed62+_0x2815d3(0xea),{'body':_0x623d5d});return!_0x1ac204[_0x2815d3(0xa0)][_0x2815d3(0xe9)]||_0x1ac204[_0x2815d3(0xa0)][_0x2815d3(0xe9)][_0x2815d3(0xd3)]===0x1;}async[_0x143511(0x99)](_0x5d7819,_0x1b54f1,_0x475e90,_0x4f8845){const _0x199a86=_0x143511,_0x2221da={'memberId':(await this[_0x199a86(0xb0)][_0x199a86(0xb4)](_0x5d7819))[_0x199a86(0xe5)](),'threadId':_0x475e90,'replyId':_0x4f8845,'unitId':_0x5d7819},_0x3b9199=await this[_0x199a86(0xf1)]['post'](_0x199a86(0x9e)+_0x5d7819+_0x199a86(0xbf),{'body':_0x2221da});return!_0x3b9199[_0x199a86(0xa0)][_0x199a86(0xe9)]||_0x3b9199['body'][_0x199a86(0xe9)]['code']===0x1;}async[_0x143511(0xbb)](_0x4931de,_0x510cfc,_0x1463c8){const _0x5d51e4=_0x143511,_0x25901f={'unitId':_0x4931de,'threadId':_0x1463c8},_0x52d0db=await this[_0x5d51e4(0xf1)][_0x5d51e4(0xd6)](_0x5d51e4(0x9e)+_0x4931de+_0x5d51e4(0xc5),{'body':_0x25901f}),_0x1cb69b=_0x1463c8[_0x5d51e4(0x9c)](_0x53a540=>te(_0x52d0db['body'][_0x5d51e4(0x8b)][_0x53a540],_0x4931de,_0x510cfc))[_0x5d51e4(0x8a)](Boolean);return Object[_0x5d51e4(0x84)](_0x52d0db[_0x5d51e4(0xa0)][_0x5d51e4(0xf4)])['forEach'](_0x41d9d0=>{const _0x57c600=_0x5d51e4;this[_0x57c600(0xcc)][_0x57c600(0x98)](_0x41d9d0);}),_0x1cb69b;}['saveCommentToSnapshot'](_0x538f7e){const _0x2a0150=_0x143511;return{'id':_0x538f7e['id'],'threadId':_0x538f7e[_0x2a0150(0xef)],'ref':_0x538f7e['ref']};}};D=ee([_(0x0,_0x3812c1(_0x433638)),_(0x1,_0x3812c1(_0x5df1d1)),_(0x2,_0x3812c1(_0xee5160)),_(0x3,_0x3812c1(_0x5a9d8e))],D);var se=Object[_0x143511(0xa3)],oe=Object[_0x143511(0xc9)],ne=(_0x58d4c7,_0x27b884,_0x1e527c,_0xb5d10a)=>{const _0x4d676b=_0x143511;for(var _0x5a5787=_0xb5d10a>0x1?void 0x0:_0xb5d10a?oe(_0x27b884,_0x1e527c):_0x27b884,_0xfac818=_0x58d4c7[_0x4d676b(0xdc)]-0x1,_0x145ece;_0xfac818>=0x0;_0xfac818--)(_0x145ece=_0x58d4c7[_0xfac818])&&(_0x5a5787=(_0xb5d10a?_0x145ece(_0x27b884,_0x1e527c,_0x5a5787):_0x145ece(_0x5a5787))||_0x5a5787);return _0xb5d10a&&_0x5a5787&&se(_0x27b884,_0x1e527c,_0x5a5787),_0x5a5787;},ie=(_0x3c2cfb,_0x2422c9)=>(_0x4cbdca,_0x590156)=>_0x2422c9(_0x4cbdca,_0x590156,_0x3c2cfb);let C=class{constructor(_0x55e89d){this['_httpService']=_0x55e89d;}async[_0x143511(0x90)](_0x2f0fe8,_0x104ad2,_0x10d33a){const _0x4670e7=_0x143511,_0x3bf87a=new URL(window[_0x4670e7(0xd1)]['href'])[_0x4670e7(0x96)][_0x4670e7(0xbe)](_0x4670e7(0xb2));if(!_0x3bf87a)return[];const _0x390b53=window[_0x4670e7(0xd1)][_0x4670e7(0xf6)],_0x37982c=window['location']['protocol']===_0x4670e7(0xda)?'https':'http';return(await this['_httpService'][_0x4670e7(0xbe)](_0x37982c+_0x4670e7(0xec)+_0x390b53+_0x4670e7(0x8c),{'params':{'objectID':_0x3bf87a,'unitID':_0x3bf87a}}))[_0x4670e7(0xa0)][_0x4670e7(0xe6)][_0x4670e7(0x9c)](_0x482ac4=>{const _0x240876=_0x4670e7;var _0x123461,_0x29e7c0,_0x213308,_0x3e9222,_0x92d2a0,_0x3c21e3;return{'id':(_0x29e7c0=(_0x123461=_0x482ac4['subject'])==null?void 0x0:_0x123461[_0x240876(0xad)])!=null?_0x29e7c0:'','label':(_0x3e9222=(_0x213308=_0x482ac4[_0x240876(0xc8)])==null?void 0x0:_0x213308[_0x240876(0xa7)])!=null?_0x3e9222:'','icon':(_0x3c21e3=(_0x92d2a0=_0x482ac4[_0x240876(0xc8)])==null?void 0x0:_0x92d2a0['avatar'])!=null?_0x3c21e3:'','type':'user'};});}};C=ne([ie(0x0,_0x3812c1(_0x433638))],C);var ae=Object[_0x143511(0xa3)],ce=Object[_0x143511(0xc9)],de=(_0x2e25f9,_0xa6830f,_0x223e96,_0xa00979)=>{const _0x359ee2=_0x143511;for(var _0x29f229=_0xa00979>0x1?void 0x0:_0xa00979?ce(_0xa6830f,_0x223e96):_0xa6830f,_0x22f186=_0x2e25f9[_0x359ee2(0xdc)]-0x1,_0x37cd74;_0x22f186>=0x0;_0x22f186--)(_0x37cd74=_0x2e25f9[_0x22f186])&&(_0x29f229=(_0xa00979?_0x37cd74(_0xa6830f,_0x223e96,_0x29f229):_0x37cd74(_0x29f229))||_0x29f229);return _0xa00979&&_0x29f229&&ae(_0xa6830f,_0x223e96,_0x29f229),_0x29f229;},I=(_0xbab565,_0xa35b9d)=>(_0x14cd84,_0x427abe)=>_0xa35b9d(_0x14cd84,_0x427abe,_0xbab565);let f=class extends _0x295544{constructor(_0x15ed56,_0x499564,_0x526d9f,_0x59567f){const _0x20736a=_0x143511;super(),this[_0x20736a(0x87)]=_0x15ed56,this[_0x20736a(0x94)]=_0x499564,this['_threadCommentMentionDataService']=_0x526d9f,this['_threadCommentMentionDataSource']=_0x59567f,this[_0x20736a(0x9a)]();}['_initDataSource'](){const _0xabade3=_0x143511;this[_0xabade3(0x87)][_0xabade3(0xaa)]=this[_0xabade3(0x94)],this[_0xabade3(0x87)][_0xabade3(0xa6)]=!0x1,this[_0xabade3(0xc2)]['dataSource']=this[_0xabade3(0xde)];}};function _0x312c(){const _0x2bd7ea=['66BAxGvM','_httpService','createTimestamp','3207366QKCgoV','users','comment','host','values','Delete','replyId','_threadCommentDataSourceService','replies','/reply','filter','comments','/universer-api/authz/collaborator','8323510ewenyx','117VVFdEA','size','getMentions','OpenOrReOpen','rangeId','UNRECOGNIZED','_threadCommentDataSource','content','searchParams','680402LYCheB','addUser','deleteComment','_initDataSource','commentUpdate$','map','Starting','/universer-api/comment/unit/','Unknown','body','addComment','/universer-api/user/list','defineProperty','userId','Reply','syncUpdateMutationToColla','name','parse','5ZTtcEV','dataSource','getThread','/add','userID','disposeWithMe','parentId','_sessionService','unitId','unit','type','requireSession','_initUserSync','Solved','COMMENT','onStarting','user','3863972rLCucR','listComments','forEach','add','get','/delete','UNIVER_UNKNOWN','resolved','_threadCommentMentionDataService','symbol','Edit','/list','2KvCejQ','reply','subject','getOwnPropertyDescriptor','format','494538JQPESO','_userService','/edit','getCurrentUser','Add','subscribe','location','_init','code','getUser','customRanges','post','payload','slice','updateComment','https:','getComment','length','delete','_threadCommentMentionDataSource','_threadCommentModel','resolveComment','YYYY/MM/DD\x20HH:mm','rangeType','867392eYBZAW','_commentService','getMemberID','collaborators','solved','Solve','error','/solved','_injector','://','pipe','2742368RpMRgA','threadId'];_0x312c=function(){return _0x2bd7ea;};return _0x312c();}f=de([_0x26df7f(_0x3fc83a[_0x143511(0x9d)],f),I(0x0,_0x23f907),I(0x1,_0x3812c1(D)),I(0x2,_0x1a4824),I(0x3,_0x3812c1(C))],f);var me=Object['defineProperty'],le=Object[_0x143511(0xc9)],he=(_0x4bbed7,_0x1a7ced,_0x4cd29d,_0x236891)=>{const _0x5bca4b=_0x143511;for(var _0x19b058=_0x236891>0x1?void 0x0:_0x236891?le(_0x1a7ced,_0x4cd29d):_0x1a7ced,_0x27ca6c=_0x4bbed7[_0x5bca4b(0xdc)]-0x1,_0x14a4c4;_0x27ca6c>=0x0;_0x27ca6c--)(_0x14a4c4=_0x4bbed7[_0x27ca6c])&&(_0x19b058=(_0x236891?_0x14a4c4(_0x1a7ced,_0x4cd29d,_0x19b058):_0x14a4c4(_0x19b058))||_0x19b058);return _0x236891&&_0x19b058&&me(_0x1a7ced,_0x4cd29d,_0x19b058),_0x19b058;},S=(_0x2f2cea,_0x2e7fb9)=>(_0x2d9fc2,_0x50a490)=>_0x2e7fb9(_0x2d9fc2,_0x50a490,_0x2f2cea);let b=class extends _0x295544{constructor(_0x3ef6d7,_0x4bc756,_0x491d02,_0x48fee7){const _0x46394f=_0x143511;super(),this[_0x46394f(0xe4)]=_0x3ef6d7,this[_0x46394f(0xdf)]=_0x4bc756,this[_0x46394f(0xcc)]=_0x491d02,this[_0x46394f(0xeb)]=_0x48fee7,this[_0x46394f(0xd2)](),this[_0x46394f(0xb5)]();}['_initUserSync'](){const _0x123849=_0x143511;this[_0x123849(0xae)](this['_threadCommentModel'][_0x123849(0x9b)][_0x123849(0xed)](_0x3db047(0x10))[_0x123849(0xd0)](_0x5b14c2=>{const _0x50bced=_0x123849,_0x123756=new Set();_0x5b14c2[_0x50bced(0xbc)](_0x1478f3=>{const _0x58a3fb=_0x50bced;switch(_0x1478f3[_0x58a3fb(0xb3)]){case _0x58a3fb(0xbd):{const _0xb3e8b2=_0x1478f3[_0x58a3fb(0xd7)]['personId'];_0x123756['add'](_0xb3e8b2);break;}}}),Q(this[_0x50bced(0xeb)],_0x123756);}));}[_0x143511(0xd2)](){const _0x1bd041=_0x143511;this[_0x1bd041(0xae)](this[_0x1bd041(0xe4)]['commentUpdate$'][_0x1bd041(0xd0)](async _0x2dc47b=>{const _0x488ef3=_0x1bd041;var _0x3c0eae,_0x47b93a;const _0x14d794=this[_0x488ef3(0xdf)][_0x488ef3(0xab)](_0x2dc47b[_0x488ef3(0xb1)],_0x2dc47b[_0x488ef3(0xef)]);if(!_0x14d794)return;const {unitId:_0xb61283,subUnitId:_0x3f7e24}=_0x14d794;switch(_0x2dc47b[_0x488ef3(0xb9)]&&this[_0x488ef3(0xcc)][_0x488ef3(0x98)](_0x2dc47b[_0x488ef3(0xb9)]),_0x2dc47b[_0x488ef3(0xb3)]){case p[_0x488ef3(0xcf)]:break;case p[_0x488ef3(0xa5)]:{this[_0x488ef3(0xdf)][_0x488ef3(0xa1)](_0xb61283,_0x3f7e24,{'unitId':_0xb61283,'subUnitId':_0x3f7e24,'ref':'','id':_0x2dc47b[_0x488ef3(0x86)],'dT':w(+_0x2dc47b['createTimestamp']),'threadId':_0x2dc47b[_0x488ef3(0xef)],'personId':(_0x47b93a=(_0x3c0eae=_0x2dc47b['user'])==null?void 0x0:_0x3c0eae[_0x488ef3(0xad)])!=null?_0x47b93a:_0x2dc47b['userId'],'text':JSON['parse'](_0x2dc47b[_0x488ef3(0x95)]),'parentId':_0x14d794['id']});break;}case p[_0x488ef3(0x85)]:{const _0x1c96eb=this[_0x488ef3(0xdf)][_0x488ef3(0xdb)](_0xb61283,_0x3f7e24,_0x2dc47b['replyId']);_0x1c96eb&&_0x1c96eb[_0x488ef3(0xaf)]&&this[_0x488ef3(0xdf)][_0x488ef3(0x99)](_0xb61283,_0x3f7e24,_0x2dc47b[_0x488ef3(0x86)]);break;}case p['Edit']:{this['_threadCommentModel']['updateComment'](_0xb61283,_0x3f7e24,{'commentId':_0x2dc47b[_0x488ef3(0x86)],'text':JSON[_0x488ef3(0xa8)](_0x2dc47b[_0x488ef3(0x95)])});break;}case p[_0x488ef3(0xe8)]:{const _0x229db5=this['_threadCommentModel'][_0x488ef3(0xab)](_0xb61283,_0x2dc47b[_0x488ef3(0xef)]);_0x229db5&&this['_threadCommentModel'][_0x488ef3(0xe0)](_0xb61283,_0x3f7e24,_0x229db5['id'],_0x2dc47b[_0x488ef3(0xe7)]===v[_0x488ef3(0xb6)]);break;}}}));}};b=he([_0x26df7f(_0x3fc83a['Ready'],b),S(0x0,_0x3812c1(_0x3ae437)),S(0x1,_0x3812c1(_0x58f947)),S(0x2,_0x3812c1(_0x5df1d1)),S(0x3,_0x3812c1(_0x5a9d8e))],b);var x=Object['defineProperty'],ue=Object[_0x143511(0xc9)],pe=(_0x5a2318,_0x1fd7e5,_0x1e2efc)=>_0x1fd7e5 in _0x5a2318?x(_0x5a2318,_0x1fd7e5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1e2efc}):_0x5a2318[_0x1fd7e5]=_0x1e2efc,ve=(_0x2df26a,_0x10581c,_0x5660d0,_0x49bb14)=>{const _0x17b7f1=_0x143511;for(var _0x51fbac=_0x49bb14>0x1?void 0x0:_0x49bb14?ue(_0x10581c,_0x5660d0):_0x10581c,_0xac086=_0x2df26a[_0x17b7f1(0xdc)]-0x1,_0xac9bc4;_0xac086>=0x0;_0xac086--)(_0xac9bc4=_0x2df26a[_0xac086])&&(_0x51fbac=(_0x49bb14?_0xac9bc4(_0x10581c,_0x5660d0,_0x51fbac):_0xac9bc4(_0x51fbac))||_0x51fbac);return _0x49bb14&&_0x51fbac&&x(_0x10581c,_0x5660d0,_0x51fbac),_0x51fbac;},_e=(_0x361bbf,_0x3b29ab)=>(_0x2828fd,_0x35a661)=>_0x3b29ab(_0x2828fd,_0x35a661,_0x361bbf),Y=(_0x3aad7e,_0x4bf138,_0x1a87b0)=>pe(_0x3aad7e,typeof _0x4bf138!=_0x143511(0xc3)?_0x4bf138+'':_0x4bf138,_0x1a87b0);let O=class extends _0x33087c{constructor(_0x2d4e93,_0x29ab83){const _0x599211=_0x143511;super(),this[_0x599211(0xeb)]=_0x29ab83;}[_0x143511(0xb8)](_0x24e6b4){const _0x246f4d=_0x143511;[[C],[D],[f],[b]][_0x246f4d(0xbc)](_0x4155e7=>{const _0x537578=_0x246f4d;_0x24e6b4[_0x537578(0xbd)](_0x4155e7);});}};Y(O,'pluginName',V),Y(O,_0x143511(0xb3),_0x4e03ab[_0x143511(0xc0)]),O=ve([_0x547640(_0x298c54,_0xe12c45,_0xea4fb8),_e(0x1,_0x3812c1(_0x5a9d8e))],O);export{O as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x57daae=_0x5e66;(function(_0x4f5e39,_0x42dbb6){const _0x93238a=_0x5e66,_0x5db486=_0x4f5e39();while(!![]){try{const _0x41bf0a=-parseInt(_0x93238a(0x152))/0x1*(-parseInt(_0x93238a(0x162))/0x2)+parseInt(_0x93238a(0x188))/0x3*(-parseInt(_0x93238a(0x174))/0x4)+-parseInt(_0x93238a(0x144))/0x5*(-parseInt(_0x93238a(0x13e))/0x6)+parseInt(_0x93238a(0x163))/0x7*(parseInt(_0x93238a(0x120))/0x8)+-parseInt(_0x93238a(0x177))/0x9+parseInt(_0x93238a(0x169))/0xa*(parseInt(_0x93238a(0x12f))/0xb)+parseInt(_0x93238a(0x189))/0xc*(-parseInt(_0x93238a(0x153))/0xd);if(_0x41bf0a===_0x42dbb6)break;else _0x5db486['push'](_0x5db486['shift']());}catch(_0x3f689){_0x5db486['push'](_0x5db486['shift']());}}}(_0x3651,0x840d5));import{UserManagerService as _0x144469,Inject as _0x48b871,Injector as _0x5bb0c9,CustomRangeType as _0x51828c,OnLifecycle as _0x51226a,LifecycleStages as _0x11d02a,Disposable as _0x37edbf,UniverInstanceType as _0x47e4f5,DependentOn as _0x188278,Plugin as _0x4ad81d,IConfigService as _0x13fea4}from'@univerjs/core';import{IThreadCommentDataSourceService as _0x2f460a,ThreadCommentModel as _0xe49716,UniverThreadCommentPlugin as _0x500e98}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0x1adcd6,UniverThreadCommentUIPlugin as _0x2867c8}from'@univerjs/thread-comment-ui';import{CollaborationSessionService as _0x273871,CommentService as _0x5726aa,UniverCollaborationClientPlugin as _0x2d92ac}from'@univerjs-pro/collaboration-client';import{HTTPService as _0xda76fa}from'@univerjs/network';import _0x5351a1 from'dayjs';import{bufferTime as _0x3b9b80}from'rxjs';const X=_0x57daae(0x124);var v=(_0x1b6924=>(_0x1b6924[_0x1b6924[_0x57daae(0x16a)]=0x0]='OpenOrReOpen',_0x1b6924[_0x1b6924[_0x57daae(0x155)]=0x1]=_0x57daae(0x155),_0x1b6924[_0x1b6924[_0x57daae(0x12a)]=-0x1]=_0x57daae(0x12a),_0x1b6924))(v||{}),p=(_0x402959=>(_0x402959[_0x402959[_0x57daae(0x14c)]=0x0]=_0x57daae(0x14c),_0x402959[_0x402959[_0x57daae(0x182)]=0x1]=_0x57daae(0x182),_0x402959[_0x402959[_0x57daae(0x15b)]=0x2]=_0x57daae(0x15b),_0x402959[_0x402959[_0x57daae(0x14b)]=0x3]=_0x57daae(0x14b),_0x402959[_0x402959['Delete']=0x4]='Delete',_0x402959[_0x402959[_0x57daae(0x15a)]=0x5]=_0x57daae(0x15a),_0x402959[_0x402959[_0x57daae(0x12a)]=-0x1]=_0x57daae(0x12a),_0x402959))(p||{});const w=_0x34d2a2=>_0x5351a1(new Date(+_0x34d2a2))[_0x57daae(0x175)](_0x57daae(0x136)),k=async(_0xda2644,_0x134207)=>{const _0x4e4fb9=_0x57daae,_0x5aa99c=_0xda2644[_0x4e4fb9(0x157)](_0x144469),_0x3989b2=_0xda2644[_0x4e4fb9(0x157)](_0xda76fa);_0x134207['forEach'](_0x16c553=>{const _0x440a5f=_0x4e4fb9;_0x5aa99c[_0x440a5f(0x151)](_0x16c553)&&_0x134207[_0x440a5f(0x13d)](_0x16c553);}),_0x134207[_0x4e4fb9(0x126)]&&(await _0x3989b2[_0x4e4fb9(0x157)](_0x4e4fb9(0x170),{'params':{'userIDs':[..._0x134207]}}))[_0x4e4fb9(0x14e)][_0x4e4fb9(0x167)][_0x4e4fb9(0x171)](_0x11f894=>{const _0x484193=_0x4e4fb9;_0x11f894&&_0x5aa99c[_0x484193(0x11f)](_0x11f894);});};var ee=Object[_0x57daae(0x18a)],re=Object[_0x57daae(0x148)],te=(_0x3a82ed,_0x1a4336,_0x323126,_0x29f1e4)=>{const _0x49d476=_0x57daae;for(var _0x158d1a=_0x29f1e4>0x1?void 0x0:_0x29f1e4?re(_0x1a4336,_0x323126):_0x1a4336,_0x4b0e19=_0x3a82ed[_0x49d476(0x154)]-0x1,_0x547e1e;_0x4b0e19>=0x0;_0x4b0e19--)(_0x547e1e=_0x3a82ed[_0x4b0e19])&&(_0x158d1a=(_0x29f1e4?_0x547e1e(_0x1a4336,_0x323126,_0x158d1a):_0x547e1e(_0x158d1a))||_0x158d1a);return _0x29f1e4&&_0x158d1a&&ee(_0x1a4336,_0x323126,_0x158d1a),_0x158d1a;},_=(_0x21acda,_0x34e35b)=>(_0x346092,_0x5196ba)=>_0x34e35b(_0x346092,_0x5196ba,_0x21acda);function se(_0x4b2747,_0x131dff){const _0x1dd221=_0x57daae,_0x296b8a=_0x4b2747[_0x1dd221(0x12e)][0x0];return{..._0x131dff,'id':_0x296b8a[_0x1dd221(0x186)],'resolved':_0x4b2747[_0x1dd221(0x172)]===0x1,'dT':w(_0x296b8a['createTimestamp']),'personId':_0x296b8a['userId'],'threadId':_0x296b8a[_0x1dd221(0x164)]};}function oe(_0x5d7cc3,_0x2738c1,_0x4967d9){const _0x329299=_0x57daae;var _0xbad04b,_0x18bd05;if(((_0x18bd05=(_0xbad04b=_0x5d7cc3==null?void 0x0:_0x5d7cc3[_0x329299(0x12e)])==null?void 0x0:_0xbad04b['length'])!=null?_0x18bd05:0x0)>0x0){const _0x3e4942=(_0xf5b4bf,_0x3fcf00)=>({'id':_0xf5b4bf[_0x329299(0x186)],'threadId':_0xf5b4bf[_0x329299(0x164)],'dT':w(_0xf5b4bf['createTimestamp']),'personId':_0xf5b4bf[_0x329299(0x15e)],'resolved':_0x5d7cc3[_0x329299(0x172)]===v[_0x329299(0x155)],'unitId':_0x2738c1,'subUnitId':_0x4967d9,'text':JSON[_0x329299(0x150)](_0xf5b4bf[_0x329299(0x137)]),'parentId':_0x3fcf00}),_0x377a5f=_0x3e4942(_0x5d7cc3[_0x329299(0x12e)][0x0]);return{..._0x377a5f,'children':_0x5d7cc3[_0x329299(0x12e)]['slice'](0x1)['map'](_0xe7bd51=>_0x3e4942(_0xe7bd51,_0x377a5f['id']))};}return null;}let D=class{constructor(_0x5ae976,_0x3daaa6,_0x541823,_0x1112e5){const _0x54cb83=_0x57daae;this[_0x54cb83(0x13f)]=_0x5ae976,this[_0x54cb83(0x12d)]=_0x3daaa6,this[_0x54cb83(0x17a)]=_0x541823,this[_0x54cb83(0x143)]=_0x1112e5;}async[_0x57daae(0x149)](_0x2cf591){const _0x2cc369=_0x57daae;var _0x3224bd,_0x1cddd6;const {parentId:_0x38aed0,unitId:_0x814b66,text:_0x2cc43b,threadId:_0x547260}=_0x2cf591,_0x5b86f8=(_0x1cddd6=(_0x3224bd=_0x2cc43b[_0x2cc369(0x139)])==null?void 0x0:_0x3224bd[_0x2cc369(0x140)](_0x4cebfc=>_0x4cebfc[_0x2cc369(0x16f)]===_0x51828c['COMMENT'])['map'](_0x5cd4b4=>_0x5cd4b4[_0x2cc369(0x17e)]))!=null?_0x1cddd6:[],_0x363783=JSON['stringify'](_0x2cc43b),_0x490087=(await this[_0x2cc369(0x17a)][_0x2cc369(0x127)](_0x814b66))[_0x2cc369(0x11d)]();if(_0x38aed0){const _0x57dd13={'memberId':_0x490087,'unitId':_0x814b66,'content':_0x363783,'mention':_0x5b86f8,'threadId':_0x547260},_0x1e1faf=(await this[_0x2cc369(0x13f)][_0x2cc369(0x12c)](_0x2cc369(0x145)+_0x814b66+_0x2cc369(0x16e),{'body':_0x57dd13}))[_0x2cc369(0x14e)][_0x2cc369(0x18e)];return{..._0x2cf591,'id':_0x1e1faf[_0x2cc369(0x186)],'dT':_0x5351a1(+_0x1e1faf['createTimestamp'])[_0x2cc369(0x175)](_0x2cc369(0x136)),'personId':_0x1e1faf[_0x2cc369(0x15e)]};}else{const _0x260621={'memberId':_0x490087,'unitId':_0x814b66,'content':_0x363783,'mention':_0x5b86f8},_0x2639e8=await this[_0x2cc369(0x13f)]['post'](_0x2cc369(0x145)+_0x814b66+_0x2cc369(0x17c),{'body':_0x260621});return se(_0x2639e8[_0x2cc369(0x14e)][_0x2cc369(0x166)],_0x2cf591);}}async[_0x57daae(0x12b)](_0x230fe8){const _0x58a85d=_0x57daae;var _0x421443,_0x2b79e6;const {text:_0x4c9f07,unitId:_0x3f023b}=_0x230fe8,_0x2a1995=(_0x2b79e6=(_0x421443=_0x4c9f07[_0x58a85d(0x139)])==null?void 0x0:_0x421443['filter'](_0x235206=>_0x235206['rangeType']===_0x51828c[_0x58a85d(0x187)])[_0x58a85d(0x11e)](_0x2d2a87=>_0x2d2a87[_0x58a85d(0x17e)]))!=null?_0x2b79e6:[],_0x41c92d=JSON['stringify'](_0x4c9f07),_0x3ad964=_0x230fe8[_0x58a85d(0x164)],_0x104126=_0x230fe8['id'],_0x188ca0={'memberId':(await this['_sessionService']['requireSession'](_0x3f023b))['getMemberID'](),'unitId':_0x3f023b,'threadId':_0x3ad964,'mention':_0x2a1995,'content':_0x41c92d,'replyId':_0x104126},_0x17ab08=await this[_0x58a85d(0x13f)]['post'](_0x58a85d(0x145)+_0x3f023b+_0x58a85d(0x11c),{'body':_0x188ca0});return!_0x17ab08[_0x58a85d(0x14e)][_0x58a85d(0x181)]||_0x17ab08[_0x58a85d(0x14e)]['error'][_0x58a85d(0x14a)]===0x1;}async['resolveComment'](_0x21922a){const _0x2e9ab2=_0x57daae,{unitId:_0x55e4af}=_0x21922a,_0x2d160b=_0x21922a[_0x2e9ab2(0x164)],_0x4c543a={'memberId':this[_0x2e9ab2(0x12d)][_0x2e9ab2(0x158)]()['userID'],'unitId':_0x55e4af,'threadId':_0x2d160b,'solved':_0x21922a[_0x2e9ab2(0x13a)]?v[_0x2e9ab2(0x155)]:v['OpenOrReOpen']},_0x51d300=await this[_0x2e9ab2(0x13f)]['post']('/universer-api/comment/unit/'+_0x55e4af+'/solved',{'body':_0x4c543a});return!_0x51d300[_0x2e9ab2(0x14e)][_0x2e9ab2(0x181)]||_0x51d300[_0x2e9ab2(0x14e)]['error']['code']===0x1;}async[_0x57daae(0x176)](_0x2cb512,_0x2f3823,_0x477857,_0x379c1c){const _0x253f61=_0x57daae,_0x1f0350={'memberId':(await this['_sessionService']['requireSession'](_0x2cb512))[_0x253f61(0x11d)](),'threadId':_0x477857,'replyId':_0x379c1c,'unitId':_0x2cb512},_0x55f460=await this[_0x253f61(0x13f)]['post']('/universer-api/comment/unit/'+_0x2cb512+_0x253f61(0x180),{'body':_0x1f0350});return!_0x55f460[_0x253f61(0x14e)]['error']||_0x55f460[_0x253f61(0x14e)][_0x253f61(0x181)][_0x253f61(0x14a)]===0x1;}async['listComments'](_0x3386a2,_0x3a0c9c,_0x5130c2){const _0x30bc9d=_0x57daae,_0x5f169d={'unitId':_0x3386a2,'threadId':_0x5130c2},_0x4e1687=await this[_0x30bc9d(0x13f)]['post'](_0x30bc9d(0x145)+_0x3386a2+_0x30bc9d(0x13c),{'body':_0x5f169d}),_0x169ecb=_0x5130c2[_0x30bc9d(0x11e)](_0x38d7d1=>oe(_0x4e1687[_0x30bc9d(0x14e)][_0x30bc9d(0x135)][_0x38d7d1],_0x3386a2,_0x3a0c9c))['filter'](Boolean);return Object[_0x30bc9d(0x17b)](_0x4e1687[_0x30bc9d(0x14e)][_0x30bc9d(0x167)])[_0x30bc9d(0x171)](_0x553b09=>{const _0x5bdd34=_0x30bc9d;this[_0x5bdd34(0x12d)][_0x5bdd34(0x11f)](_0x553b09);}),_0x169ecb;}[_0x57daae(0x123)](_0x37839e){const _0x2cc4ca=_0x57daae;return{'id':_0x37839e['id'],'threadId':_0x37839e[_0x2cc4ca(0x164)],'ref':_0x37839e[_0x2cc4ca(0x168)]};}};D=te([_(0x0,_0x48b871(_0xda76fa)),_(0x1,_0x48b871(_0x144469)),_(0x2,_0x48b871(_0x273871)),_(0x3,_0x48b871(_0x5bb0c9))],D);function _0x5e66(_0x1579a6,_0x3e1ca7){const _0x365181=_0x3651();return _0x5e66=function(_0x5e6673,_0x2e36bc){_0x5e6673=_0x5e6673-0x11b;let _0x49e7fa=_0x365181[_0x5e6673];return _0x49e7fa;},_0x5e66(_0x1579a6,_0x3e1ca7);}var ne=Object[_0x57daae(0x18a)],ie=Object[_0x57daae(0x148)],ae=(_0x4ba5a4,_0x269fac,_0xb8fe56,_0x17841f)=>{const _0x4a3258=_0x57daae;for(var _0x4045ab=_0x17841f>0x1?void 0x0:_0x17841f?ie(_0x269fac,_0xb8fe56):_0x269fac,_0x808105=_0x4ba5a4[_0x4a3258(0x154)]-0x1,_0x50b1b2;_0x808105>=0x0;_0x808105--)(_0x50b1b2=_0x4ba5a4[_0x808105])&&(_0x4045ab=(_0x17841f?_0x50b1b2(_0x269fac,_0xb8fe56,_0x4045ab):_0x50b1b2(_0x4045ab))||_0x4045ab);return _0x17841f&&_0x4045ab&&ne(_0x269fac,_0xb8fe56,_0x4045ab),_0x4045ab;},ce=(_0x32073c,_0x32e8dd)=>(_0x50efcc,_0x230083)=>_0x32e8dd(_0x50efcc,_0x230083,_0x32073c);let C=class{constructor(_0x2acfe8){this['_httpService']=_0x2acfe8;}async[_0x57daae(0x138)](_0x1e4b2e,_0x10e5ba,_0x20c308){const _0x1d2d35=_0x57daae,_0x4abed3=new URL(window[_0x1d2d35(0x14f)][_0x1d2d35(0x161)])['searchParams'][_0x1d2d35(0x157)](_0x1d2d35(0x156));if(!_0x4abed3)return[];const _0x4a2c14=window[_0x1d2d35(0x14f)][_0x1d2d35(0x125)],_0x595079=window['location'][_0x1d2d35(0x18d)]==='https:'?'https':_0x1d2d35(0x165);return(await this['_httpService'][_0x1d2d35(0x157)](_0x595079+'://'+_0x4a2c14+'/universer-api/authz/collaborator',{'params':{'objectID':_0x4abed3,'unitID':_0x4abed3}}))[_0x1d2d35(0x14e)]['collaborators'][_0x1d2d35(0x11e)](_0x412968=>{const _0x2504e1=_0x1d2d35;var _0x4dc623,_0x4eef6f,_0x415884,_0x5a546c,_0x30f157,_0xc89b98;return{'id':(_0x4eef6f=(_0x4dc623=_0x412968[_0x2504e1(0x134)])==null?void 0x0:_0x4dc623[_0x2504e1(0x133)])!=null?_0x4eef6f:'','label':(_0x5a546c=(_0x415884=_0x412968[_0x2504e1(0x134)])==null?void 0x0:_0x415884[_0x2504e1(0x146)])!=null?_0x5a546c:'','icon':(_0xc89b98=(_0x30f157=_0x412968[_0x2504e1(0x134)])==null?void 0x0:_0x30f157[_0x2504e1(0x159)])!=null?_0xc89b98:'','type':_0x2504e1(0x18b)};});}};C=ae([ce(0x0,_0x48b871(_0xda76fa))],C);var de=Object[_0x57daae(0x18a)],me=Object[_0x57daae(0x148)],le=(_0x38b808,_0x3b71fc,_0xdc3f33,_0x239502)=>{for(var _0x3de3ae=_0x239502>0x1?void 0x0:_0x239502?me(_0x3b71fc,_0xdc3f33):_0x3b71fc,_0x55e455=_0x38b808['length']-0x1,_0x1d3f10;_0x55e455>=0x0;_0x55e455--)(_0x1d3f10=_0x38b808[_0x55e455])&&(_0x3de3ae=(_0x239502?_0x1d3f10(_0x3b71fc,_0xdc3f33,_0x3de3ae):_0x1d3f10(_0x3de3ae))||_0x3de3ae);return _0x239502&&_0x3de3ae&&de(_0x3b71fc,_0xdc3f33,_0x3de3ae),_0x3de3ae;},f=(_0x14ba9e,_0x1eae69)=>(_0x2b20fa,_0x1d0d82)=>_0x1eae69(_0x2b20fa,_0x1d0d82,_0x14ba9e);let S=class extends _0x37edbf{constructor(_0x2ee944,_0x49fecb,_0x4e1000,_0x3d53d4){const _0x1d2403=_0x57daae;super(),this[_0x1d2403(0x16c)]=_0x2ee944,this[_0x1d2403(0x15d)]=_0x49fecb,this['_threadCommentMentionDataService']=_0x4e1000,this[_0x1d2403(0x160)]=_0x3d53d4,this[_0x1d2403(0x16b)]();}[_0x57daae(0x16b)](){const _0x4ba05b=_0x57daae;this['_threadCommentDataSourceService'][_0x4ba05b(0x15c)]=this[_0x4ba05b(0x15d)],this['_threadCommentDataSourceService'][_0x4ba05b(0x130)]=!0x1,this[_0x4ba05b(0x17d)][_0x4ba05b(0x15c)]=this['_threadCommentMentionDataSource'];}};S=le([_0x51226a(_0x11d02a['Starting'],S),f(0x0,_0x2f460a),f(0x1,_0x48b871(D)),f(0x2,_0x1adcd6),f(0x3,_0x48b871(C))],S);var he=Object[_0x57daae(0x18a)],ue=Object[_0x57daae(0x148)],pe=(_0xc7551,_0x4ea1e5,_0xa55741,_0x5e2dda)=>{const _0x497a89=_0x57daae;for(var _0x239e17=_0x5e2dda>0x1?void 0x0:_0x5e2dda?ue(_0x4ea1e5,_0xa55741):_0x4ea1e5,_0xe74f65=_0xc7551[_0x497a89(0x154)]-0x1,_0x824189;_0xe74f65>=0x0;_0xe74f65--)(_0x824189=_0xc7551[_0xe74f65])&&(_0x239e17=(_0x5e2dda?_0x824189(_0x4ea1e5,_0xa55741,_0x239e17):_0x824189(_0x239e17))||_0x239e17);return _0x5e2dda&&_0x239e17&&he(_0x4ea1e5,_0xa55741,_0x239e17),_0x239e17;},I=(_0x51e988,_0x5f24ac)=>(_0x60932c,_0x50e884)=>_0x5f24ac(_0x60932c,_0x50e884,_0x51e988);let b=class extends _0x37edbf{constructor(_0x1f61cc,_0x5c7786,_0x223401,_0x4710e8){const _0xca6b9c=_0x57daae;super(),this['_commentService']=_0x1f61cc,this[_0xca6b9c(0x179)]=_0x5c7786,this['_userService']=_0x223401,this[_0xca6b9c(0x143)]=_0x4710e8,this[_0xca6b9c(0x183)](),this[_0xca6b9c(0x15f)]();}[_0x57daae(0x15f)](){const _0x18c1dc=_0x57daae;this[_0x18c1dc(0x128)](this[_0x18c1dc(0x179)][_0x18c1dc(0x122)][_0x18c1dc(0x131)](_0x3b9b80(0x10))[_0x18c1dc(0x178)](_0x45c274=>{const _0x4987ac=_0x18c1dc,_0x77c438=new Set();_0x45c274[_0x4987ac(0x171)](_0x1c6efd=>{const _0x47e2ac=_0x4987ac;switch(_0x1c6efd[_0x47e2ac(0x173)]){case _0x47e2ac(0x185):{const _0x807625=_0x1c6efd['payload'][_0x47e2ac(0x17f)];_0x77c438[_0x47e2ac(0x185)](_0x807625);break;}}}),k(this[_0x4987ac(0x143)],_0x77c438);}));}[_0x57daae(0x183)](){const _0x4d0097=_0x57daae;this['disposeWithMe'](this[_0x4d0097(0x142)][_0x4d0097(0x122)][_0x4d0097(0x178)](async _0x275e17=>{const _0x1f236b=_0x4d0097;var _0x59e0a0,_0x153c05;const _0x78932a=this[_0x1f236b(0x179)][_0x1f236b(0x13b)](_0x275e17[_0x1f236b(0x129)],_0x275e17[_0x1f236b(0x164)]);if(!_0x78932a)return;const {unitId:_0x18f174,subUnitId:_0x5c478b}=_0x78932a;switch(_0x275e17['user']&&this['_userService']['addUser'](_0x275e17[_0x1f236b(0x18b)]),_0x275e17[_0x1f236b(0x173)]){case p[_0x1f236b(0x182)]:break;case p['Reply']:{this[_0x1f236b(0x179)][_0x1f236b(0x149)](_0x18f174,_0x5c478b,{'unitId':_0x18f174,'subUnitId':_0x5c478b,'ref':'','id':_0x275e17[_0x1f236b(0x186)],'dT':w(+_0x275e17[_0x1f236b(0x18c)]),'threadId':_0x275e17[_0x1f236b(0x164)],'personId':(_0x153c05=(_0x59e0a0=_0x275e17[_0x1f236b(0x18b)])==null?void 0x0:_0x59e0a0[_0x1f236b(0x133)])!=null?_0x153c05:_0x275e17[_0x1f236b(0x15e)],'text':JSON[_0x1f236b(0x150)](_0x275e17[_0x1f236b(0x137)]),'parentId':_0x78932a['id']});break;}case p['Delete']:{const _0xea9d35=this[_0x1f236b(0x179)][_0x1f236b(0x11b)](_0x18f174,_0x5c478b,_0x275e17['replyId']);_0xea9d35&&_0xea9d35[_0x1f236b(0x147)]&&this['_threadCommentModel'][_0x1f236b(0x176)](_0x18f174,_0x5c478b,_0x275e17[_0x1f236b(0x186)]);break;}case p['Edit']:{this['_threadCommentModel'][_0x1f236b(0x12b)](_0x18f174,_0x5c478b,{'commentId':_0x275e17[_0x1f236b(0x186)],'text':JSON[_0x1f236b(0x150)](_0x275e17[_0x1f236b(0x137)])});break;}case p[_0x1f236b(0x15a)]:{const _0x51bdd5=this[_0x1f236b(0x179)][_0x1f236b(0x13b)](_0x18f174,_0x275e17[_0x1f236b(0x164)]);_0x51bdd5&&this[_0x1f236b(0x179)][_0x1f236b(0x16d)](_0x18f174,_0x5c478b,_0x51bdd5['id'],_0x275e17['solved']===v['Solved']);break;}}}));}};b=pe([_0x51226a(_0x11d02a[_0x57daae(0x184)],b),I(0x0,_0x48b871(_0x5726aa)),I(0x1,_0x48b871(_0xe49716)),I(0x2,_0x48b871(_0x144469)),I(0x3,_0x48b871(_0x5bb0c9))],b);const ve='thread-comment-data-source.config',_e={};var Y=Object[_0x57daae(0x18a)],fe=Object[_0x57daae(0x148)],Ie=(_0x191cbc,_0x5bb1b7,_0x32a02f)=>_0x5bb1b7 in _0x191cbc?Y(_0x191cbc,_0x5bb1b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x32a02f}):_0x191cbc[_0x5bb1b7]=_0x32a02f,Se=(_0x4fb411,_0x53082c,_0x32a239,_0x107c10)=>{const _0x512030=_0x57daae;for(var _0x238611=_0x107c10>0x1?void 0x0:_0x107c10?fe(_0x53082c,_0x32a239):_0x53082c,_0x3b3dfb=_0x4fb411[_0x512030(0x154)]-0x1,_0x4df032;_0x3b3dfb>=0x0;_0x3b3dfb--)(_0x4df032=_0x4fb411[_0x3b3dfb])&&(_0x238611=(_0x107c10?_0x4df032(_0x53082c,_0x32a239,_0x238611):_0x4df032(_0x238611))||_0x238611);return _0x107c10&&_0x238611&&Y(_0x53082c,_0x32a239,_0x238611),_0x238611;},j=(_0x33540f,_0x75ad13)=>(_0xc61f77,_0x18600c)=>_0x75ad13(_0xc61f77,_0x18600c,_0x33540f),G=(_0x5d27f2,_0x43e539,_0x27be54)=>Ie(_0x5d27f2,typeof _0x43e539!='symbol'?_0x43e539+'':_0x43e539,_0x27be54);let O=class extends _0x4ad81d{constructor(_0x387449=_e,_0x4caed9,_0x39b338){const _0x22f84a=_0x57daae;super(),this[_0x22f84a(0x121)]=_0x387449,this['_injector']=_0x4caed9,this['_configService']=_0x39b338;const {..._0x6f6781}=this['_config'];this[_0x22f84a(0x141)][_0x22f84a(0x14d)](ve,_0x6f6781);}['onStarting'](){const _0x3d9d41=_0x57daae;[[C],[D],[S],[b]][_0x3d9d41(0x171)](_0x1a844b=>{const _0x4ef853=_0x3d9d41;this['_injector'][_0x4ef853(0x185)](_0x1a844b);});}};G(O,'pluginName',X),G(O,'type',_0x47e4f5[_0x57daae(0x132)]),O=Se([_0x188278(_0x500e98,_0x2867c8,_0x2d92ac),j(0x1,_0x48b871(_0x5bb0c9)),j(0x2,_0x13fea4)],O);export{O as UniverThreadCommentDataSourcePlugin};function _0x3651(){const _0xc8bc0b=['userID','subject','comments','YYYY/MM/DD\x20HH:mm','content','getMentions','customRanges','resolved','getThread','/list','delete','6bQWZHF','_httpService','filter','_configService','_commentService','_injector','177545mPKQrM','/universer-api/comment/unit/','name','parentId','getOwnPropertyDescriptor','addComment','code','Edit','Unknown','setConfig','body','location','parse','getUser','21gqAWEC','70265rkrIEO','length','Solved','unit','get','getCurrentUser','avatar','Solve','Reply','dataSource','_threadCommentDataSource','userId','_initUserSync','_threadCommentMentionDataSource','href','88702gscnqA','42KYFjQN','threadId','http','comment','users','ref','3829710padcIf','OpenOrReOpen','_initDataSource','_threadCommentDataSourceService','resolveComment','/reply','rangeType','/universer-api/user/list','forEach','solved','type','948076QySzms','format','deleteComment','4185549Xgwrsa','subscribe','_threadCommentModel','_sessionService','values','/add','_threadCommentMentionDataService','rangeId','personId','/delete','error','Add','_init','Ready','add','replyId','COMMENT','6pOWHNE','1752qWIFki','defineProperty','user','createTimestamp','protocol','reply','getComment','/edit','getMemberID','map','addUser','715056fnhiJL','_config','commentUpdate$','saveCommentToSnapshot','THREAD_COMMENT_DATA_SOURCE_PLUGIN','host','size','requireSession','disposeWithMe','unitId','UNRECOGNIZED','updateComment','post','_userService','replies','22LrDtcK','syncUpdateMutationToColla','pipe','UNIVER_UNKNOWN'];_0x3651=function(){return _0xc8bc0b;};return _0x3651();}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const PLUGIN_CONFIG_KEY = "thread-comment-data-source.config";
|
|
2
|
+
export declare const configSymbol: unique symbol;
|
|
3
|
+
export interface IUniverThreadCommentDataSourceConfig {
|
|
4
|
+
}
|
|
5
|
+
export declare const defaultPluginConfig: IUniverThreadCommentDataSourceConfig;
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
1
|
+
import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
|
+
import { IUniverThreadCommentDataSourceConfig } from './controllers/config.schema';
|
|
2
3
|
export declare class UniverThreadCommentDataSourcePlugin extends Plugin {
|
|
4
|
+
private readonly _config;
|
|
3
5
|
protected _injector: Injector;
|
|
6
|
+
private readonly _configService;
|
|
4
7
|
static pluginName: string;
|
|
5
8
|
static type: UniverInstanceType;
|
|
6
|
-
constructor(
|
|
7
|
-
onStarting(
|
|
9
|
+
constructor(_config: IUniverThreadCommentDataSourceConfig, _injector: Injector, _configService: IConfigService);
|
|
10
|
+
onStarting(): void;
|
|
8
11
|
}
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x207433,_0x362791){const _0x1d6924=_0x5d84,_0x24613b=_0x207433();while(!![]){try{const _0x400351=parseInt(_0x1d6924(0x155))/0x1*(parseInt(_0x1d6924(0x11f))/0x2)+parseInt(_0x1d6924(0x141))/0x3*(parseInt(_0x1d6924(0x128))/0x4)+parseInt(_0x1d6924(0x104))/0x5*(parseInt(_0x1d6924(0x133))/0x6)+parseInt(_0x1d6924(0x170))/0x7+parseInt(_0x1d6924(0x12d))/0x8+parseInt(_0x1d6924(0x103))/0x9*(-parseInt(_0x1d6924(0x15d))/0xa)+-parseInt(_0x1d6924(0x151))/0xb*(parseInt(_0x1d6924(0x102))/0xc);if(_0x400351===_0x362791)break;else _0x24613b['push'](_0x24613b['shift']());}catch(_0xf3dd29){_0x24613b['push'](_0x24613b['shift']());}}}(_0x206b,0x8c082),function(_0x5a8c67,_0x1b45ac){const _0x24696b=_0x5d84;typeof exports==_0x24696b(0x14e)&&typeof module<'u'?_0x1b45ac(exports,require(_0x24696b(0x139)),require(_0x24696b(0x117)),require(_0x24696b(0x140)),require(_0x24696b(0xfd)),require('@univerjs/network'),require('dayjs'),require(_0x24696b(0x153))):typeof define==_0x24696b(0x13f)&&define[_0x24696b(0x13a)]?define([_0x24696b(0x119),_0x24696b(0x139),_0x24696b(0x117),_0x24696b(0x140),_0x24696b(0xfd),_0x24696b(0x109),_0x24696b(0x113),_0x24696b(0x153)],_0x1b45ac):(_0x5a8c67=typeof globalThis<'u'?globalThis:_0x5a8c67||self,_0x1b45ac(_0x5a8c67['UniverThreadCommentDatasource']={},_0x5a8c67[_0x24696b(0x101)],_0x5a8c67[_0x24696b(0x135)],_0x5a8c67[_0x24696b(0x146)],_0x5a8c67[_0x24696b(0x10f)],_0x5a8c67[_0x24696b(0x107)],_0x5a8c67[_0x24696b(0x113)],_0x5a8c67[_0x24696b(0x153)]));}(this,function(_0x48fcbb,_0x8a051d,_0xbb6af7,_0x2225b0,_0x54cc54,_0x2b815e,_0x5d66e2,_0x1ab0e1){'use strict';const _0x54f122=_0x5d84;const _0x3467b7=_0x54f122(0x15c);var _0x398213=(_0x20d3d4=>(_0x20d3d4[_0x20d3d4['OpenOrReOpen']=0x0]=_0x54f122(0x12c),_0x20d3d4[_0x20d3d4['Solved']=0x1]=_0x54f122(0x130),_0x20d3d4[_0x20d3d4[_0x54f122(0x142)]=-0x1]=_0x54f122(0x142),_0x20d3d4))(_0x398213||{}),_0x1b5e47=(_0x3a2963=>(_0x3a2963[_0x3a2963['Unknown']=0x0]=_0x54f122(0xf4),_0x3a2963[_0x3a2963[_0x54f122(0xf7)]=0x1]=_0x54f122(0xf7),_0x3a2963[_0x3a2963['Reply']=0x2]=_0x54f122(0x149),_0x3a2963[_0x3a2963[_0x54f122(0x17a)]=0x3]='Edit',_0x3a2963[_0x3a2963[_0x54f122(0x112)]=0x4]='Delete',_0x3a2963[_0x3a2963[_0x54f122(0x100)]=0x5]=_0x54f122(0x100),_0x3a2963[_0x3a2963[_0x54f122(0x142)]=-0x1]=_0x54f122(0x142),_0x3a2963))(_0x1b5e47||{});const _0x415b40=_0x724240=>_0x5d66e2(new Date(+_0x724240))[_0x54f122(0x12a)](_0x54f122(0x177)),_0x4d6f9b=async(_0x3b3cd8,_0x402eda)=>{const _0x4ab957=_0x54f122,_0x25b4e5=_0x3b3cd8[_0x4ab957(0xf3)](_0x8a051d[_0x4ab957(0xf9)]),_0x2e38a0=_0x3b3cd8[_0x4ab957(0xf3)](_0x2b815e[_0x4ab957(0x179)]);_0x402eda[_0x4ab957(0xeb)](_0x2256a9=>{const _0x275c3f=_0x4ab957;_0x25b4e5[_0x275c3f(0x116)](_0x2256a9)&&_0x402eda[_0x275c3f(0x148)](_0x2256a9);}),_0x402eda[_0x4ab957(0x10a)]&&(await _0x2e38a0[_0x4ab957(0xf3)](_0x4ab957(0xf8),{'params':{'userIDs':[..._0x402eda]}}))[_0x4ab957(0x150)]['users'][_0x4ab957(0xeb)](_0x59664b=>{const _0x1a28ab=_0x4ab957;_0x59664b&&_0x25b4e5[_0x1a28ab(0x15b)](_0x59664b);});};var _0x2634cd=Object['defineProperty'],_0xe374b8=Object[_0x54f122(0x136)],_0x203dba=(_0x1c2d53,_0x5ae0f8,_0x13a255,_0x127d94)=>{const _0x5c52bd=_0x54f122;for(var _0x54f9ba=_0x127d94>0x1?void 0x0:_0x127d94?_0xe374b8(_0x5ae0f8,_0x13a255):_0x5ae0f8,_0x3fa3cf=_0x1c2d53[_0x5c52bd(0x175)]-0x1,_0x41f3ed;_0x3fa3cf>=0x0;_0x3fa3cf--)(_0x41f3ed=_0x1c2d53[_0x3fa3cf])&&(_0x54f9ba=(_0x127d94?_0x41f3ed(_0x5ae0f8,_0x13a255,_0x54f9ba):_0x41f3ed(_0x54f9ba))||_0x54f9ba);return _0x127d94&&_0x54f9ba&&_0x2634cd(_0x5ae0f8,_0x13a255,_0x54f9ba),_0x54f9ba;},_0x1c1f41=(_0x14bdee,_0x4b2b61)=>(_0x3cd880,_0x2d18cd)=>_0x4b2b61(_0x3cd880,_0x2d18cd,_0x14bdee);function _0x3c6a54(_0x841a16,_0x280b99){const _0x156a44=_0x54f122,_0x5a0628=_0x841a16[_0x156a44(0x145)][0x0];return{..._0x280b99,'id':_0x5a0628['replyId'],'resolved':_0x841a16[_0x156a44(0x138)]===0x1,'dT':_0x415b40(_0x5a0628['createTimestamp']),'personId':_0x5a0628[_0x156a44(0x11e)],'threadId':_0x5a0628[_0x156a44(0x12e)]};}function _0x2033ae(_0x172323,_0x61ad3a,_0xd329d){const _0x461557=_0x54f122;var _0x204d84,_0x2e963b;if(((_0x2e963b=(_0x204d84=_0x172323==null?void 0x0:_0x172323['replies'])==null?void 0x0:_0x204d84[_0x461557(0x175)])!=null?_0x2e963b:0x0)>0x0){const _0x1e852a=(_0x391103,_0x13b492)=>({'id':_0x391103[_0x461557(0x13c)],'threadId':_0x391103[_0x461557(0x12e)],'dT':_0x415b40(_0x391103['createTimestamp']),'personId':_0x391103[_0x461557(0x11e)],'resolved':_0x172323[_0x461557(0x138)]===_0x398213[_0x461557(0x130)],'unitId':_0x61ad3a,'subUnitId':_0xd329d,'text':JSON[_0x461557(0x161)](_0x391103['content']),'parentId':_0x13b492}),_0x19caf9=_0x1e852a(_0x172323['replies'][0x0]);return{..._0x19caf9,'children':_0x172323[_0x461557(0x145)]['slice'](0x1)[_0x461557(0x11c)](_0x161406=>_0x1e852a(_0x161406,_0x19caf9['id']))};}return null;}let _0x1326b1=class{constructor(_0x2981af,_0x1cef14,_0x2f5049,_0x3f8e24){const _0x1f2f99=_0x54f122;this['_httpService']=_0x2981af,this['_userService']=_0x1cef14,this[_0x1f2f99(0x171)]=_0x2f5049,this[_0x1f2f99(0x168)]=_0x3f8e24;}async[_0x54f122(0x134)](_0x3384a2){const _0x44db38=_0x54f122;var _0x2c115,_0xfc320f;const {parentId:_0x9327b0,unitId:_0x146078,text:_0x836d95,threadId:_0x10e7f6}=_0x3384a2,_0x3b5de2=(_0xfc320f=(_0x2c115=_0x836d95[_0x44db38(0x114)])==null?void 0x0:_0x2c115[_0x44db38(0xfc)](_0x10d995=>_0x10d995[_0x44db38(0xff)]===_0x8a051d[_0x44db38(0xee)][_0x44db38(0x16c)])['map'](_0x4d266b=>_0x4d266b[_0x44db38(0x121)]))!=null?_0xfc320f:[],_0x2fbaf4=JSON[_0x44db38(0x166)](_0x836d95),_0x15978f=(await this[_0x44db38(0x171)][_0x44db38(0x11a)](_0x146078))['getMemberID']();if(_0x9327b0){const _0x162eef={'memberId':_0x15978f,'unitId':_0x146078,'content':_0x2fbaf4,'mention':_0x3b5de2,'threadId':_0x10e7f6},_0x39cdcb=(await this[_0x44db38(0x167)][_0x44db38(0x143)](_0x44db38(0x14d)+_0x146078+_0x44db38(0x108),{'body':_0x162eef}))['body']['reply'];return{..._0x3384a2,'id':_0x39cdcb[_0x44db38(0x13c)],'dT':_0x5d66e2(+_0x39cdcb['createTimestamp'])[_0x44db38(0x12a)](_0x44db38(0x177)),'personId':_0x39cdcb[_0x44db38(0x11e)]};}else{const _0x586319={'memberId':_0x15978f,'unitId':_0x146078,'content':_0x2fbaf4,'mention':_0x3b5de2},_0x2aa9b7=await this[_0x44db38(0x167)][_0x44db38(0x143)](_0x44db38(0x14d)+_0x146078+_0x44db38(0xf0),{'body':_0x586319});return _0x3c6a54(_0x2aa9b7[_0x44db38(0x150)][_0x44db38(0x174)],_0x3384a2);}}async[_0x54f122(0x111)](_0x41855f){const _0x42e02e=_0x54f122;var _0x2f36aa,_0x1d06f2;const {text:_0x20515c,unitId:_0x243c00}=_0x41855f,_0x10562d=(_0x1d06f2=(_0x2f36aa=_0x20515c[_0x42e02e(0x114)])==null?void 0x0:_0x2f36aa[_0x42e02e(0xfc)](_0x562b2d=>_0x562b2d[_0x42e02e(0xff)]===_0x8a051d['CustomRangeType'][_0x42e02e(0x16c)])[_0x42e02e(0x11c)](_0x5b799b=>_0x5b799b[_0x42e02e(0x121)]))!=null?_0x1d06f2:[],_0x5b34a0=JSON[_0x42e02e(0x166)](_0x20515c),_0x2531fb=_0x41855f[_0x42e02e(0x12e)],_0x21efd7=_0x41855f['id'],_0x37fb67={'memberId':(await this[_0x42e02e(0x171)][_0x42e02e(0x11a)](_0x243c00))[_0x42e02e(0x15f)](),'unitId':_0x243c00,'threadId':_0x2531fb,'mention':_0x10562d,'content':_0x5b34a0,'replyId':_0x21efd7},_0x4ff8b1=await this['_httpService']['post'](_0x42e02e(0x14d)+_0x243c00+_0x42e02e(0x159),{'body':_0x37fb67});return!_0x4ff8b1[_0x42e02e(0x150)][_0x42e02e(0x154)]||_0x4ff8b1['body'][_0x42e02e(0x154)][_0x42e02e(0x158)]===0x1;}async[_0x54f122(0x13d)](_0x27e4a5){const _0x5000b0=_0x54f122,{unitId:_0x42ad7b}=_0x27e4a5,_0x4c5deb=_0x27e4a5['threadId'],_0x1efb9f={'memberId':this[_0x5000b0(0x156)][_0x5000b0(0x162)]()[_0x5000b0(0x163)],'unitId':_0x42ad7b,'threadId':_0x4c5deb,'solved':_0x27e4a5[_0x5000b0(0x13e)]?_0x398213[_0x5000b0(0x130)]:_0x398213[_0x5000b0(0x12c)]},_0x33a457=await this[_0x5000b0(0x167)][_0x5000b0(0x143)](_0x5000b0(0x14d)+_0x42ad7b+_0x5000b0(0x105),{'body':_0x1efb9f});return!_0x33a457['body'][_0x5000b0(0x154)]||_0x33a457[_0x5000b0(0x150)][_0x5000b0(0x154)][_0x5000b0(0x158)]===0x1;}async['deleteComment'](_0x1fba8b,_0x54e3f0,_0xb96160,_0x31322d){const _0x390326=_0x54f122,_0x16b06f={'memberId':(await this[_0x390326(0x171)][_0x390326(0x11a)](_0x1fba8b))[_0x390326(0x15f)](),'threadId':_0xb96160,'replyId':_0x31322d,'unitId':_0x1fba8b},_0x4f670c=await this['_httpService'][_0x390326(0x143)]('/universer-api/comment/unit/'+_0x1fba8b+'/delete',{'body':_0x16b06f});return!_0x4f670c[_0x390326(0x150)][_0x390326(0x154)]||_0x4f670c['body'][_0x390326(0x154)][_0x390326(0x158)]===0x1;}async['listComments'](_0x455c43,_0x6a0775,_0x25a10d){const _0x43db52=_0x54f122,_0x5490d8={'unitId':_0x455c43,'threadId':_0x25a10d},_0x3feb6d=await this[_0x43db52(0x167)]['post']('/universer-api/comment/unit/'+_0x455c43+_0x43db52(0xea),{'body':_0x5490d8}),_0x382787=_0x25a10d[_0x43db52(0x11c)](_0x3b196f=>_0x2033ae(_0x3feb6d[_0x43db52(0x150)][_0x43db52(0x160)][_0x3b196f],_0x455c43,_0x6a0775))[_0x43db52(0xfc)](Boolean);return Object[_0x43db52(0xfe)](_0x3feb6d['body'][_0x43db52(0x115)])[_0x43db52(0xeb)](_0x454d34=>{const _0x5f5d6a=_0x43db52;this[_0x5f5d6a(0x156)][_0x5f5d6a(0x15b)](_0x454d34);}),_0x382787;}[_0x54f122(0xed)](_0x89b73d){const _0xe5181c=_0x54f122;return{'id':_0x89b73d['id'],'threadId':_0x89b73d[_0xe5181c(0x12e)],'ref':_0x89b73d[_0xe5181c(0x123)]};}};_0x1326b1=_0x203dba([_0x1c1f41(0x0,_0x8a051d['Inject'](_0x2b815e['HTTPService'])),_0x1c1f41(0x1,_0x8a051d[_0x54f122(0x127)](_0x8a051d[_0x54f122(0xf9)])),_0x1c1f41(0x2,_0x8a051d[_0x54f122(0x127)](_0x54cc54[_0x54f122(0x132)])),_0x1c1f41(0x3,_0x8a051d['Inject'](_0x8a051d[_0x54f122(0x131)]))],_0x1326b1);var _0x571b27=Object[_0x54f122(0x164)],_0x42db20=Object[_0x54f122(0x136)],_0x2133a0=(_0x3edf4b,_0x136c36,_0x49a9b3,_0x506706)=>{const _0x5035bf=_0x54f122;for(var _0x3d651f=_0x506706>0x1?void 0x0:_0x506706?_0x42db20(_0x136c36,_0x49a9b3):_0x136c36,_0x34e260=_0x3edf4b[_0x5035bf(0x175)]-0x1,_0xe630f8;_0x34e260>=0x0;_0x34e260--)(_0xe630f8=_0x3edf4b[_0x34e260])&&(_0x3d651f=(_0x506706?_0xe630f8(_0x136c36,_0x49a9b3,_0x3d651f):_0xe630f8(_0x3d651f))||_0x3d651f);return _0x506706&&_0x3d651f&&_0x571b27(_0x136c36,_0x49a9b3,_0x3d651f),_0x3d651f;},_0x58576d=(_0x4f8d10,_0x503265)=>(_0x9d05be,_0x2a4749)=>_0x503265(_0x9d05be,_0x2a4749,_0x4f8d10);let _0x3c159e=class{constructor(_0x55825a){const _0x130763=_0x54f122;this[_0x130763(0x167)]=_0x55825a;}async[_0x54f122(0x11b)](_0x99a2de,_0x8f6a0c,_0x20ceba){const _0x1631b5=_0x54f122,_0x5e3f39=new URL(window['location'][_0x1631b5(0x129)])[_0x1631b5(0x14f)][_0x1631b5(0xf3)](_0x1631b5(0x126));if(!_0x5e3f39)return[];const _0x319e6d=window[_0x1631b5(0x172)][_0x1631b5(0xf6)],_0x3ecc77=window['location']['protocol']===_0x1631b5(0x16b)?_0x1631b5(0xf5):_0x1631b5(0x165);return(await this[_0x1631b5(0x167)]['get'](_0x3ecc77+_0x1631b5(0x14c)+_0x319e6d+'/universer-api/authz/collaborator',{'params':{'objectID':_0x5e3f39,'unitID':_0x5e3f39}}))[_0x1631b5(0x150)]['collaborators'][_0x1631b5(0x11c)](_0x543daa=>{const _0x327f32=_0x1631b5;var _0x303b27,_0x599f01,_0x375c02,_0x321933,_0x5a92b8,_0x50fede;return{'id':(_0x599f01=(_0x303b27=_0x543daa[_0x327f32(0x10b)])==null?void 0x0:_0x303b27[_0x327f32(0x163)])!=null?_0x599f01:'','label':(_0x321933=(_0x375c02=_0x543daa[_0x327f32(0x10b)])==null?void 0x0:_0x375c02[_0x327f32(0x118)])!=null?_0x321933:'','icon':(_0x50fede=(_0x5a92b8=_0x543daa[_0x327f32(0x10b)])==null?void 0x0:_0x5a92b8[_0x327f32(0x137)])!=null?_0x50fede:'','type':'user'};});}};_0x3c159e=_0x2133a0([_0x58576d(0x0,_0x8a051d[_0x54f122(0x127)](_0x2b815e[_0x54f122(0x179)]))],_0x3c159e);var _0x1cda65=Object[_0x54f122(0x164)],_0x3df826=Object[_0x54f122(0x136)],_0x1c614c=(_0x101d21,_0x26921a,_0x2e789a,_0x54930a)=>{const _0x2d00bd=_0x54f122;for(var _0x4dac21=_0x54930a>0x1?void 0x0:_0x54930a?_0x3df826(_0x26921a,_0x2e789a):_0x26921a,_0x2904bc=_0x101d21[_0x2d00bd(0x175)]-0x1,_0x189f7a;_0x2904bc>=0x0;_0x2904bc--)(_0x189f7a=_0x101d21[_0x2904bc])&&(_0x4dac21=(_0x54930a?_0x189f7a(_0x26921a,_0x2e789a,_0x4dac21):_0x189f7a(_0x4dac21))||_0x4dac21);return _0x54930a&&_0x4dac21&&_0x1cda65(_0x26921a,_0x2e789a,_0x4dac21),_0x4dac21;},_0x775770=(_0xe4f9c0,_0x2762ea)=>(_0x21086a,_0x326b0e)=>_0x2762ea(_0x21086a,_0x326b0e,_0xe4f9c0);let _0x360483=class extends _0x8a051d[_0x54f122(0x122)]{constructor(_0x477810,_0x4f7697,_0x2d6195,_0x56f455){const _0x867e36=_0x54f122;super(),this[_0x867e36(0x173)]=_0x477810,this[_0x867e36(0x10c)]=_0x4f7697,this[_0x867e36(0x10e)]=_0x2d6195,this['_threadCommentMentionDataSource']=_0x56f455,this['_initDataSource']();}[_0x54f122(0xe8)](){const _0x399473=_0x54f122;this[_0x399473(0x173)][_0x399473(0x124)]=this[_0x399473(0x10c)],this['_threadCommentDataSourceService'][_0x399473(0xef)]=!0x1,this[_0x399473(0x10e)]['dataSource']=this['_threadCommentMentionDataSource'];}};_0x360483=_0x1c614c([_0x8a051d[_0x54f122(0xfb)](_0x8a051d[_0x54f122(0x13b)]['Starting'],_0x360483),_0x775770(0x0,_0xbb6af7[_0x54f122(0x12f)]),_0x775770(0x1,_0x8a051d[_0x54f122(0x127)](_0x1326b1)),_0x775770(0x2,_0x2225b0[_0x54f122(0x120)]),_0x775770(0x3,_0x8a051d['Inject'](_0x3c159e))],_0x360483);var _0x44e577=Object[_0x54f122(0x164)],_0x3a975b=Object['getOwnPropertyDescriptor'],_0x12d1ec=(_0x180b25,_0x27b164,_0x5305b1,_0x1e96ef)=>{const _0x4d32e7=_0x54f122;for(var _0x10426b=_0x1e96ef>0x1?void 0x0:_0x1e96ef?_0x3a975b(_0x27b164,_0x5305b1):_0x27b164,_0x4fecdd=_0x180b25[_0x4d32e7(0x175)]-0x1,_0xe86f74;_0x4fecdd>=0x0;_0x4fecdd--)(_0xe86f74=_0x180b25[_0x4fecdd])&&(_0x10426b=(_0x1e96ef?_0xe86f74(_0x27b164,_0x5305b1,_0x10426b):_0xe86f74(_0x10426b))||_0x10426b);return _0x1e96ef&&_0x10426b&&_0x44e577(_0x27b164,_0x5305b1,_0x10426b),_0x10426b;},_0x8b6c46=(_0x375eba,_0x529638)=>(_0x2f623f,_0x59b893)=>_0x529638(_0x2f623f,_0x59b893,_0x375eba);let _0x458f18=class extends _0x8a051d[_0x54f122(0x122)]{constructor(_0x407ae6,_0x36aeb7,_0x52362d,_0x1ecdff){const _0xa97da=_0x54f122;super(),this[_0xa97da(0x11d)]=_0x407ae6,this['_threadCommentModel']=_0x36aeb7,this[_0xa97da(0x156)]=_0x52362d,this[_0xa97da(0x168)]=_0x1ecdff,this[_0xa97da(0x16e)](),this[_0xa97da(0x125)]();}['_initUserSync'](){const _0x491bd9=_0x54f122;this['disposeWithMe'](this[_0x491bd9(0x110)][_0x491bd9(0x15a)][_0x491bd9(0xfa)](_0x1ab0e1['bufferTime'](0x10))[_0x491bd9(0x157)](_0x5a83a3=>{const _0x550125=_0x491bd9,_0x48177a=new Set();_0x5a83a3[_0x550125(0xeb)](_0x23db0c=>{const _0x420e50=_0x550125;switch(_0x23db0c[_0x420e50(0x14a)]){case'add':{const _0x418b20=_0x23db0c[_0x420e50(0x10d)][_0x420e50(0x12b)];_0x48177a[_0x420e50(0x15e)](_0x418b20);break;}}}),_0x4d6f9b(this[_0x550125(0x168)],_0x48177a);}));}[_0x54f122(0x16e)](){const _0xb378c3=_0x54f122;this[_0xb378c3(0x106)](this[_0xb378c3(0x11d)][_0xb378c3(0x15a)][_0xb378c3(0x157)](async _0x250675=>{const _0x3d1687=_0xb378c3;var _0x32fc2a,_0x218095;const _0x1d096d=this['_threadCommentModel'][_0x3d1687(0xe7)](_0x250675[_0x3d1687(0xe9)],_0x250675[_0x3d1687(0x12e)]);if(!_0x1d096d)return;const {unitId:_0x56517f,subUnitId:_0x4247d3}=_0x1d096d;switch(_0x250675['user']&&this[_0x3d1687(0x156)][_0x3d1687(0x15b)](_0x250675['user']),_0x250675[_0x3d1687(0x14a)]){case _0x1b5e47[_0x3d1687(0xf7)]:break;case _0x1b5e47[_0x3d1687(0x149)]:{this[_0x3d1687(0x110)][_0x3d1687(0x134)](_0x56517f,_0x4247d3,{'unitId':_0x56517f,'subUnitId':_0x4247d3,'ref':'','id':_0x250675[_0x3d1687(0x13c)],'dT':_0x415b40(+_0x250675['createTimestamp']),'threadId':_0x250675[_0x3d1687(0x12e)],'personId':(_0x218095=(_0x32fc2a=_0x250675[_0x3d1687(0x176)])==null?void 0x0:_0x32fc2a[_0x3d1687(0x163)])!=null?_0x218095:_0x250675[_0x3d1687(0x11e)],'text':JSON[_0x3d1687(0x161)](_0x250675['content']),'parentId':_0x1d096d['id']});break;}case _0x1b5e47['Delete']:{const _0x33c543=this[_0x3d1687(0x110)][_0x3d1687(0xf1)](_0x56517f,_0x4247d3,_0x250675[_0x3d1687(0x13c)]);_0x33c543&&_0x33c543[_0x3d1687(0xf2)]&&this[_0x3d1687(0x110)][_0x3d1687(0xec)](_0x56517f,_0x4247d3,_0x250675[_0x3d1687(0x13c)]);break;}case _0x1b5e47[_0x3d1687(0x17a)]:{this[_0x3d1687(0x110)]['updateComment'](_0x56517f,_0x4247d3,{'commentId':_0x250675[_0x3d1687(0x13c)],'text':JSON[_0x3d1687(0x161)](_0x250675[_0x3d1687(0x147)])});break;}case _0x1b5e47[_0x3d1687(0x100)]:{const _0x3140ff=this['_threadCommentModel'][_0x3d1687(0xe7)](_0x56517f,_0x250675[_0x3d1687(0x12e)]);_0x3140ff&&this[_0x3d1687(0x110)][_0x3d1687(0x13d)](_0x56517f,_0x4247d3,_0x3140ff['id'],_0x250675[_0x3d1687(0x138)]===_0x398213['Solved']);break;}}}));}};_0x458f18=_0x12d1ec([_0x8a051d[_0x54f122(0xfb)](_0x8a051d['LifecycleStages']['Ready'],_0x458f18),_0x8b6c46(0x0,_0x8a051d[_0x54f122(0x127)](_0x54cc54[_0x54f122(0x14b)])),_0x8b6c46(0x1,_0x8a051d['Inject'](_0xbb6af7['ThreadCommentModel'])),_0x8b6c46(0x2,_0x8a051d[_0x54f122(0x127)](_0x8a051d['UserManagerService'])),_0x8b6c46(0x3,_0x8a051d[_0x54f122(0x127)](_0x8a051d['Injector']))],_0x458f18);var _0x2dbd4e=Object['defineProperty'],_0x232c9e=Object[_0x54f122(0x136)],_0x1dd134=(_0x2b92ba,_0x549b3a,_0x4e367d)=>_0x549b3a in _0x2b92ba?_0x2dbd4e(_0x2b92ba,_0x549b3a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e367d}):_0x2b92ba[_0x549b3a]=_0x4e367d,_0x4d6de5=(_0x282398,_0x520429,_0x52ea07,_0x52d2ce)=>{const _0x40e812=_0x54f122;for(var _0x3a7800=_0x52d2ce>0x1?void 0x0:_0x52d2ce?_0x232c9e(_0x520429,_0x52ea07):_0x520429,_0x7609d9=_0x282398[_0x40e812(0x175)]-0x1,_0x393ee3;_0x7609d9>=0x0;_0x7609d9--)(_0x393ee3=_0x282398[_0x7609d9])&&(_0x3a7800=(_0x52d2ce?_0x393ee3(_0x520429,_0x52ea07,_0x3a7800):_0x393ee3(_0x3a7800))||_0x3a7800);return _0x52d2ce&&_0x3a7800&&_0x2dbd4e(_0x520429,_0x52ea07,_0x3a7800),_0x3a7800;},_0x5c7766=(_0x464499,_0x4fbc0d)=>(_0x5c69a3,_0x27c0f6)=>_0x4fbc0d(_0x5c69a3,_0x27c0f6,_0x464499),_0x120d4c=(_0xff842d,_0x4d30ee,_0x2bcc95)=>_0x1dd134(_0xff842d,typeof _0x4d30ee!=_0x54f122(0x169)?_0x4d30ee+'':_0x4d30ee,_0x2bcc95);_0x48fcbb['UniverThreadCommentDataSourcePlugin']=class extends _0x8a051d['Plugin']{constructor(_0x17b8df,_0x26df6f){const _0x1754ff=_0x54f122;super(),this[_0x1754ff(0x168)]=_0x26df6f;}[_0x54f122(0x152)](_0x569172){[[_0x3c159e],[_0x1326b1],[_0x360483],[_0x458f18]]['forEach'](_0x443649=>{const _0x3da630=_0x5d84;_0x569172[_0x3da630(0x15e)](_0x443649);});}},_0x120d4c(_0x48fcbb[_0x54f122(0x178)],'pluginName',_0x3467b7),_0x120d4c(_0x48fcbb[_0x54f122(0x178)],_0x54f122(0x14a),_0x8a051d[_0x54f122(0x16d)][_0x54f122(0xe6)]),_0x48fcbb[_0x54f122(0x178)]=_0x4d6de5([_0x8a051d[_0x54f122(0x16a)](_0xbb6af7[_0x54f122(0x16f)],_0x2225b0['UniverThreadCommentUIPlugin'],_0x54cc54['UniverCollaborationClientPlugin']),_0x5c7766(0x1,_0x8a051d[_0x54f122(0x127)](_0x8a051d['Injector']))],_0x48fcbb[_0x54f122(0x178)]),Object['defineProperty'](_0x48fcbb,Symbol[_0x54f122(0x144)],{'value':'Module'});}));function _0x5d84(_0x4406e8,_0x26b07e){const _0x206b8a=_0x206b();return _0x5d84=function(_0x5d8462,_0x48b138){_0x5d8462=_0x5d8462-0xe6;let _0x1e7cb5=_0x206b8a[_0x5d8462];return _0x1e7cb5;},_0x5d84(_0x4406e8,_0x26b07e);}function _0x206b(){const _0x12fd22=['_threadCommentDataSourceService','comment','length','user','YYYY/MM/DD\x20HH:mm','UniverThreadCommentDataSourcePlugin','HTTPService','Edit','UNIVER_UNKNOWN','getThread','_initDataSource','unitId','/list','forEach','deleteComment','saveCommentToSnapshot','CustomRangeType','syncUpdateMutationToColla','/add','getComment','parentId','get','Unknown','https','host','Add','/universer-api/user/list','UserManagerService','pipe','OnLifecycle','filter','@univerjs-pro/collaboration-client','values','rangeType','Solve','UniverCore','36HDBSeW','55134hRehPT','9570sQYzTh','/solved','disposeWithMe','UniverNetwork','/reply','@univerjs/network','size','subject','_threadCommentDataSource','payload','_threadCommentMentionDataService','UniverCollaborationClient','_threadCommentModel','updateComment','Delete','dayjs','customRanges','users','getUser','@univerjs/thread-comment','name','exports','requireSession','getMentions','map','_commentService','userId','8NjEtMJ','IThreadCommentMentionDataService','rangeId','Disposable','ref','dataSource','_initUserSync','unit','Inject','4BPotRT','href','format','personId','OpenOrReOpen','4238816kUnELF','threadId','IThreadCommentDataSourceService','Solved','Injector','CollaborationSessionService','1644nTVZnt','addComment','UniverThreadComment','getOwnPropertyDescriptor','avatar','solved','@univerjs/core','amd','LifecycleStages','replyId','resolveComment','resolved','function','@univerjs/thread-comment-ui','3123123OiLSuX','UNRECOGNIZED','post','toStringTag','replies','UniverThreadCommentUi','content','delete','Reply','type','CommentService','://','/universer-api/comment/unit/','object','searchParams','body','9184571jdZzVv','onStarting','rxjs','error','144167ARnoRC','_userService','subscribe','code','/edit','commentUpdate$','addUser','THREAD_COMMENT_DATA_SOURCE_PLUGIN','830ItYfJm','add','getMemberID','comments','parse','getCurrentUser','userID','defineProperty','http','stringify','_httpService','_injector','symbol','DependentOn','https:','COMMENT','UniverInstanceType','_init','UniverThreadCommentPlugin','6404398mVYcPu','_sessionService','location'];_0x206b=function(){return _0x12fd22;};return _0x206b();}
|
|
1
|
+
(function(_0x18fec8,_0xf4c64e){const _0x1bbc00=_0xe498,_0xdb3ca7=_0x18fec8();while(!![]){try{const _0x10a951=-parseInt(_0x1bbc00(0x1c4))/0x1*(parseInt(_0x1bbc00(0x1c3))/0x2)+-parseInt(_0x1bbc00(0x231))/0x3*(-parseInt(_0x1bbc00(0x1c1))/0x4)+-parseInt(_0x1bbc00(0x1ce))/0x5*(parseInt(_0x1bbc00(0x1c0))/0x6)+-parseInt(_0x1bbc00(0x220))/0x7*(parseInt(_0x1bbc00(0x20a))/0x8)+-parseInt(_0x1bbc00(0x21d))/0x9+-parseInt(_0x1bbc00(0x1e9))/0xa+parseInt(_0x1bbc00(0x19f))/0xb;if(_0x10a951===_0xf4c64e)break;else _0xdb3ca7['push'](_0xdb3ca7['shift']());}catch(_0x476d7a){_0xdb3ca7['push'](_0xdb3ca7['shift']());}}}(_0x49cf,0x9e36f),function(_0x57caa8,_0x52dd98){const _0x5136a7=_0xe498;typeof exports==_0x5136a7(0x1b2)&&typeof module<'u'?_0x52dd98(exports,require(_0x5136a7(0x22c)),require(_0x5136a7(0x221)),require('@univerjs/thread-comment-ui'),require(_0x5136a7(0x228)),require(_0x5136a7(0x1ab)),require(_0x5136a7(0x230)),require(_0x5136a7(0x21e))):typeof define==_0x5136a7(0x1bc)&&define[_0x5136a7(0x1d6)]?define([_0x5136a7(0x22b),_0x5136a7(0x22c),'@univerjs/thread-comment',_0x5136a7(0x1ef),_0x5136a7(0x228),'@univerjs/network',_0x5136a7(0x230),_0x5136a7(0x21e)],_0x52dd98):(_0x57caa8=typeof globalThis<'u'?globalThis:_0x57caa8||self,_0x52dd98(_0x57caa8['UniverThreadCommentDatasource']={},_0x57caa8[_0x5136a7(0x1a5)],_0x57caa8[_0x5136a7(0x22e)],_0x57caa8[_0x5136a7(0x1a8)],_0x57caa8['UniverCollaborationClient'],_0x57caa8[_0x5136a7(0x212)],_0x57caa8[_0x5136a7(0x230)],_0x57caa8[_0x5136a7(0x21e)]));}(this,function(_0x5d32d4,_0x256344,_0x15323b,_0x1cba50,_0x5a3410,_0xcb20d2,_0x277d76,_0x45de69){'use strict';const _0xa0760e=_0xe498;const _0x5d21e7=_0xa0760e(0x1e3);var _0x176c49=(_0x1ede3c=>(_0x1ede3c[_0x1ede3c['OpenOrReOpen']=0x0]=_0xa0760e(0x1bd),_0x1ede3c[_0x1ede3c[_0xa0760e(0x1df)]=0x1]=_0xa0760e(0x1df),_0x1ede3c[_0x1ede3c[_0xa0760e(0x19c)]=-0x1]=_0xa0760e(0x19c),_0x1ede3c))(_0x176c49||{}),_0x2e242a=(_0x5e4557=>(_0x5e4557[_0x5e4557[_0xa0760e(0x205)]=0x0]='Unknown',_0x5e4557[_0x5e4557['Add']=0x1]=_0xa0760e(0x20e),_0x5e4557[_0x5e4557[_0xa0760e(0x214)]=0x2]=_0xa0760e(0x214),_0x5e4557[_0x5e4557['Edit']=0x3]='Edit',_0x5e4557[_0x5e4557[_0xa0760e(0x1b6)]=0x4]=_0xa0760e(0x1b6),_0x5e4557[_0x5e4557['Solve']=0x5]='Solve',_0x5e4557[_0x5e4557['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x5e4557))(_0x2e242a||{});const _0x1b8871=_0x25c869=>_0x277d76(new Date(+_0x25c869))[_0xa0760e(0x1f2)](_0xa0760e(0x1ea)),_0x4517f9=async(_0x21ea25,_0x37419b)=>{const _0xb7855=_0xa0760e,_0xddd8ff=_0x21ea25[_0xb7855(0x1b4)](_0x256344[_0xb7855(0x1f7)]),_0x55df9a=_0x21ea25[_0xb7855(0x1b4)](_0xcb20d2[_0xb7855(0x1b1)]);_0x37419b[_0xb7855(0x215)](_0x408285=>{const _0x33208d=_0xb7855;_0xddd8ff[_0x33208d(0x223)](_0x408285)&&_0x37419b['delete'](_0x408285);}),_0x37419b['size']&&(await _0x55df9a[_0xb7855(0x1b4)](_0xb7855(0x20b),{'params':{'userIDs':[..._0x37419b]}}))[_0xb7855(0x200)][_0xb7855(0x227)][_0xb7855(0x215)](_0x534940=>{const _0xf0bc02=_0xb7855;_0x534940&&_0xddd8ff[_0xf0bc02(0x1d0)](_0x534940);});};var _0x2a4f1e=Object[_0xa0760e(0x1a0)],_0x217bc8=Object[_0xa0760e(0x1bf)],_0x6bd9b4=(_0x41f386,_0x3b3716,_0x20b0cd,_0x344e56)=>{const _0x52d5cd=_0xa0760e;for(var _0x3f6dd9=_0x344e56>0x1?void 0x0:_0x344e56?_0x217bc8(_0x3b3716,_0x20b0cd):_0x3b3716,_0x2d77e8=_0x41f386[_0x52d5cd(0x208)]-0x1,_0xb93e81;_0x2d77e8>=0x0;_0x2d77e8--)(_0xb93e81=_0x41f386[_0x2d77e8])&&(_0x3f6dd9=(_0x344e56?_0xb93e81(_0x3b3716,_0x20b0cd,_0x3f6dd9):_0xb93e81(_0x3f6dd9))||_0x3f6dd9);return _0x344e56&&_0x3f6dd9&&_0x2a4f1e(_0x3b3716,_0x20b0cd,_0x3f6dd9),_0x3f6dd9;},_0x58e376=(_0x4c6d5b,_0x448d51)=>(_0x3db175,_0x8bd0f1)=>_0x448d51(_0x3db175,_0x8bd0f1,_0x4c6d5b);function _0x455bbf(_0x568cf6,_0x5f18f0){const _0x97a69f=_0xa0760e,_0x3383e6=_0x568cf6['replies'][0x0];return{..._0x5f18f0,'id':_0x3383e6[_0x97a69f(0x1fd)],'resolved':_0x568cf6[_0x97a69f(0x1a1)]===0x1,'dT':_0x1b8871(_0x3383e6['createTimestamp']),'personId':_0x3383e6[_0x97a69f(0x1f5)],'threadId':_0x3383e6[_0x97a69f(0x1d9)]};}function _0x10db83(_0x48ad93,_0x461576,_0x59196a){const _0x4c26c2=_0xa0760e;var _0x5a6ab5,_0x5b03eb;if(((_0x5b03eb=(_0x5a6ab5=_0x48ad93==null?void 0x0:_0x48ad93[_0x4c26c2(0x20c)])==null?void 0x0:_0x5a6ab5[_0x4c26c2(0x208)])!=null?_0x5b03eb:0x0)>0x0){const _0x1f8721=(_0x56d461,_0x354243)=>({'id':_0x56d461[_0x4c26c2(0x1fd)],'threadId':_0x56d461[_0x4c26c2(0x1d9)],'dT':_0x1b8871(_0x56d461[_0x4c26c2(0x1da)]),'personId':_0x56d461['userId'],'resolved':_0x48ad93['solved']===_0x176c49[_0x4c26c2(0x1df)],'unitId':_0x461576,'subUnitId':_0x59196a,'text':JSON['parse'](_0x56d461[_0x4c26c2(0x1a9)]),'parentId':_0x354243}),_0x270820=_0x1f8721(_0x48ad93[_0x4c26c2(0x20c)][0x0]);return{..._0x270820,'children':_0x48ad93['replies'][_0x4c26c2(0x1f0)](0x1)[_0x4c26c2(0x206)](_0x35c2dd=>_0x1f8721(_0x35c2dd,_0x270820['id']))};}return null;}let _0x74e989=class{constructor(_0x38aacc,_0x351b88,_0x416a9a,_0x2ea562){const _0x2e7e82=_0xa0760e;this['_httpService']=_0x38aacc,this['_userService']=_0x351b88,this['_sessionService']=_0x416a9a,this[_0x2e7e82(0x1c8)]=_0x2ea562;}async['addComment'](_0x51524d){const _0x55beb4=_0xa0760e;var _0x3e0e8d,_0x5acd3d;const {parentId:_0x52addb,unitId:_0x2f831f,text:_0x1a6e24,threadId:_0x35eea9}=_0x51524d,_0x497934=(_0x5acd3d=(_0x3e0e8d=_0x1a6e24[_0x55beb4(0x19d)])==null?void 0x0:_0x3e0e8d[_0x55beb4(0x22f)](_0x23da08=>_0x23da08[_0x55beb4(0x1d1)]===_0x256344[_0x55beb4(0x1a3)][_0x55beb4(0x1ad)])[_0x55beb4(0x206)](_0x50f3fc=>_0x50f3fc[_0x55beb4(0x21b)]))!=null?_0x5acd3d:[],_0x5ef27c=JSON['stringify'](_0x1a6e24),_0x35fe60=(await this['_sessionService'][_0x55beb4(0x1e7)](_0x2f831f))[_0x55beb4(0x224)]();if(_0x52addb){const _0x51622e={'memberId':_0x35fe60,'unitId':_0x2f831f,'content':_0x5ef27c,'mention':_0x497934,'threadId':_0x35eea9},_0x519d70=(await this[_0x55beb4(0x1d8)][_0x55beb4(0x1dd)](_0x55beb4(0x201)+_0x2f831f+_0x55beb4(0x1fc),{'body':_0x51622e}))['body'][_0x55beb4(0x1b0)];return{..._0x51524d,'id':_0x519d70[_0x55beb4(0x1fd)],'dT':_0x277d76(+_0x519d70[_0x55beb4(0x1da)])[_0x55beb4(0x1f2)](_0x55beb4(0x1ea)),'personId':_0x519d70['userId']};}else{const _0xcb020e={'memberId':_0x35fe60,'unitId':_0x2f831f,'content':_0x5ef27c,'mention':_0x497934},_0x1914cc=await this['_httpService'][_0x55beb4(0x1dd)](_0x55beb4(0x201)+_0x2f831f+'/add',{'body':_0xcb020e});return _0x455bbf(_0x1914cc[_0x55beb4(0x200)]['comment'],_0x51524d);}}async['updateComment'](_0x1aa8c5){const _0x5abfc9=_0xa0760e;var _0x35602a,_0x2dc503;const {text:_0x90967,unitId:_0x2f1ea3}=_0x1aa8c5,_0x830c4b=(_0x2dc503=(_0x35602a=_0x90967[_0x5abfc9(0x19d)])==null?void 0x0:_0x35602a['filter'](_0x3517f6=>_0x3517f6[_0x5abfc9(0x1d1)]===_0x256344['CustomRangeType'][_0x5abfc9(0x1ad)])[_0x5abfc9(0x206)](_0x140a24=>_0x140a24[_0x5abfc9(0x21b)]))!=null?_0x2dc503:[],_0x24b4f9=JSON['stringify'](_0x90967),_0x4b7cfa=_0x1aa8c5['threadId'],_0x4c367f=_0x1aa8c5['id'],_0x228996={'memberId':(await this[_0x5abfc9(0x1c2)][_0x5abfc9(0x1e7)](_0x2f1ea3))['getMemberID'](),'unitId':_0x2f1ea3,'threadId':_0x4b7cfa,'mention':_0x830c4b,'content':_0x24b4f9,'replyId':_0x4c367f},_0x5d056e=await this['_httpService'][_0x5abfc9(0x1dd)](_0x5abfc9(0x201)+_0x2f1ea3+_0x5abfc9(0x19a),{'body':_0x228996});return!_0x5d056e[_0x5abfc9(0x200)][_0x5abfc9(0x1c9)]||_0x5d056e[_0x5abfc9(0x200)][_0x5abfc9(0x1c9)][_0x5abfc9(0x210)]===0x1;}async[_0xa0760e(0x1cd)](_0x214701){const _0x5880da=_0xa0760e,{unitId:_0x349582}=_0x214701,_0x5710e3=_0x214701[_0x5880da(0x1d9)],_0x499d9d={'memberId':this['_userService']['getCurrentUser']()[_0x5880da(0x1e1)],'unitId':_0x349582,'threadId':_0x5710e3,'solved':_0x214701[_0x5880da(0x1d2)]?_0x176c49['Solved']:_0x176c49[_0x5880da(0x1bd)]},_0x19467f=await this[_0x5880da(0x1d8)][_0x5880da(0x1dd)]('/universer-api/comment/unit/'+_0x349582+_0x5880da(0x20d),{'body':_0x499d9d});return!_0x19467f[_0x5880da(0x200)][_0x5880da(0x1c9)]||_0x19467f[_0x5880da(0x200)]['error']['code']===0x1;}async[_0xa0760e(0x1c6)](_0x120c91,_0x4dccc3,_0x49e3eb,_0x24a4d6){const _0x33e831=_0xa0760e,_0x255007={'memberId':(await this[_0x33e831(0x1c2)]['requireSession'](_0x120c91))[_0x33e831(0x224)](),'threadId':_0x49e3eb,'replyId':_0x24a4d6,'unitId':_0x120c91},_0xc873b3=await this['_httpService'][_0x33e831(0x1dd)]('/universer-api/comment/unit/'+_0x120c91+_0x33e831(0x21f),{'body':_0x255007});return!_0xc873b3[_0x33e831(0x200)]['error']||_0xc873b3[_0x33e831(0x200)]['error']['code']===0x1;}async[_0xa0760e(0x1be)](_0xd792dd,_0x47f958,_0x2bd239){const _0xea57b3=_0xa0760e,_0x44c53c={'unitId':_0xd792dd,'threadId':_0x2bd239},_0x31c9e1=await this[_0xea57b3(0x1d8)]['post'](_0xea57b3(0x201)+_0xd792dd+_0xea57b3(0x1ae),{'body':_0x44c53c}),_0x19f9a0=_0x2bd239['map'](_0x2f61d5=>_0x10db83(_0x31c9e1[_0xea57b3(0x200)][_0xea57b3(0x1db)][_0x2f61d5],_0xd792dd,_0x47f958))[_0xea57b3(0x22f)](Boolean);return Object['values'](_0x31c9e1[_0xea57b3(0x200)][_0xea57b3(0x227)])['forEach'](_0x5bb9a2=>{const _0x220b16=_0xea57b3;this[_0x220b16(0x1f9)][_0x220b16(0x1d0)](_0x5bb9a2);}),_0x19f9a0;}[_0xa0760e(0x1ba)](_0x175ea7){const _0x5c422c=_0xa0760e;return{'id':_0x175ea7['id'],'threadId':_0x175ea7[_0x5c422c(0x1d9)],'ref':_0x175ea7[_0x5c422c(0x207)]};}};_0x74e989=_0x6bd9b4([_0x58e376(0x0,_0x256344[_0xa0760e(0x1a4)](_0xcb20d2['HTTPService'])),_0x58e376(0x1,_0x256344[_0xa0760e(0x1a4)](_0x256344[_0xa0760e(0x1f7)])),_0x58e376(0x2,_0x256344[_0xa0760e(0x1a4)](_0x5a3410[_0xa0760e(0x1a2)])),_0x58e376(0x3,_0x256344['Inject'](_0x256344[_0xa0760e(0x213)]))],_0x74e989);var _0x3c1606=Object[_0xa0760e(0x1a0)],_0x2ea119=Object[_0xa0760e(0x1bf)],_0x171e30=(_0x43e67b,_0x5ab0d6,_0x55258f,_0x32f498)=>{const _0x3c1433=_0xa0760e;for(var _0x94b192=_0x32f498>0x1?void 0x0:_0x32f498?_0x2ea119(_0x5ab0d6,_0x55258f):_0x5ab0d6,_0x2cabfb=_0x43e67b[_0x3c1433(0x208)]-0x1,_0x8fe507;_0x2cabfb>=0x0;_0x2cabfb--)(_0x8fe507=_0x43e67b[_0x2cabfb])&&(_0x94b192=(_0x32f498?_0x8fe507(_0x5ab0d6,_0x55258f,_0x94b192):_0x8fe507(_0x94b192))||_0x94b192);return _0x32f498&&_0x94b192&&_0x3c1606(_0x5ab0d6,_0x55258f,_0x94b192),_0x94b192;},_0x1ece0=(_0x4aee51,_0x77ab8f)=>(_0x8acf61,_0x12dce8)=>_0x77ab8f(_0x8acf61,_0x12dce8,_0x4aee51);let _0x2afb07=class{constructor(_0x503381){this['_httpService']=_0x503381;}async[_0xa0760e(0x1d3)](_0x143260,_0x476118,_0x2e9a2a){const _0x5cdce7=_0xa0760e,_0x45fa4b=new URL(window['location'][_0x5cdce7(0x226)])[_0x5cdce7(0x1b7)][_0x5cdce7(0x1b4)](_0x5cdce7(0x1dc));if(!_0x45fa4b)return[];const _0x544646=window[_0x5cdce7(0x1c7)]['host'],_0x3440ef=window[_0x5cdce7(0x1c7)]['protocol']===_0x5cdce7(0x1ff)?_0x5cdce7(0x1d7):_0x5cdce7(0x1cf);return(await this[_0x5cdce7(0x1d8)][_0x5cdce7(0x1b4)](_0x3440ef+'://'+_0x544646+_0x5cdce7(0x1cb),{'params':{'objectID':_0x45fa4b,'unitID':_0x45fa4b}}))['body'][_0x5cdce7(0x1de)][_0x5cdce7(0x206)](_0x2893df=>{const _0x200097=_0x5cdce7;var _0x3a6bfc,_0x198061,_0x447f1f,_0x12bcd6,_0x2ab2b0,_0x32cdee;return{'id':(_0x198061=(_0x3a6bfc=_0x2893df[_0x200097(0x21a)])==null?void 0x0:_0x3a6bfc[_0x200097(0x1e1)])!=null?_0x198061:'','label':(_0x12bcd6=(_0x447f1f=_0x2893df[_0x200097(0x21a)])==null?void 0x0:_0x447f1f['name'])!=null?_0x12bcd6:'','icon':(_0x32cdee=(_0x2ab2b0=_0x2893df[_0x200097(0x21a)])==null?void 0x0:_0x2ab2b0[_0x200097(0x1a6)])!=null?_0x32cdee:'','type':_0x200097(0x1f6)};});}};_0x2afb07=_0x171e30([_0x1ece0(0x0,_0x256344['Inject'](_0xcb20d2['HTTPService']))],_0x2afb07);var _0x4215f7=Object[_0xa0760e(0x1a0)],_0x234fc9=Object[_0xa0760e(0x1bf)],_0x50f521=(_0x215e74,_0x1299ea,_0x4c22da,_0x5cefdd)=>{const _0x3464cd=_0xa0760e;for(var _0x58babd=_0x5cefdd>0x1?void 0x0:_0x5cefdd?_0x234fc9(_0x1299ea,_0x4c22da):_0x1299ea,_0x13db21=_0x215e74[_0x3464cd(0x208)]-0x1,_0x3d64d2;_0x13db21>=0x0;_0x13db21--)(_0x3d64d2=_0x215e74[_0x13db21])&&(_0x58babd=(_0x5cefdd?_0x3d64d2(_0x1299ea,_0x4c22da,_0x58babd):_0x3d64d2(_0x58babd))||_0x58babd);return _0x5cefdd&&_0x58babd&&_0x4215f7(_0x1299ea,_0x4c22da,_0x58babd),_0x58babd;},_0x4f6ef2=(_0x56b3e1,_0x2a6d08)=>(_0x4abe62,_0xb8c978)=>_0x2a6d08(_0x4abe62,_0xb8c978,_0x56b3e1);let _0x39dbf4=class extends _0x256344['Disposable']{constructor(_0x39ef2d,_0x3ee405,_0x5edb58,_0xa3fe53){const _0xd01397=_0xa0760e;super(),this[_0xd01397(0x204)]=_0x39ef2d,this[_0xd01397(0x1f4)]=_0x3ee405,this[_0xd01397(0x218)]=_0x5edb58,this[_0xd01397(0x1e0)]=_0xa3fe53,this[_0xd01397(0x203)]();}[_0xa0760e(0x203)](){const _0x3e470d=_0xa0760e;this[_0x3e470d(0x204)][_0x3e470d(0x1aa)]=this['_threadCommentDataSource'],this[_0x3e470d(0x204)][_0x3e470d(0x1f8)]=!0x1,this[_0x3e470d(0x218)][_0x3e470d(0x1aa)]=this[_0x3e470d(0x1e0)];}};_0x39dbf4=_0x50f521([_0x256344[_0xa0760e(0x1d4)](_0x256344[_0xa0760e(0x1fe)][_0xa0760e(0x1e8)],_0x39dbf4),_0x4f6ef2(0x0,_0x15323b[_0xa0760e(0x1e4)]),_0x4f6ef2(0x1,_0x256344[_0xa0760e(0x1a4)](_0x74e989)),_0x4f6ef2(0x2,_0x1cba50[_0xa0760e(0x1e5)]),_0x4f6ef2(0x3,_0x256344['Inject'](_0x2afb07))],_0x39dbf4);var _0x2d7bfa=Object['defineProperty'],_0x3b66bd=Object['getOwnPropertyDescriptor'],_0x4e1aae=(_0x1c1ba8,_0x407236,_0xa60909,_0x28c862)=>{const _0x1de321=_0xa0760e;for(var _0x59b415=_0x28c862>0x1?void 0x0:_0x28c862?_0x3b66bd(_0x407236,_0xa60909):_0x407236,_0x5cf20c=_0x1c1ba8[_0x1de321(0x208)]-0x1,_0x1623b4;_0x5cf20c>=0x0;_0x5cf20c--)(_0x1623b4=_0x1c1ba8[_0x5cf20c])&&(_0x59b415=(_0x28c862?_0x1623b4(_0x407236,_0xa60909,_0x59b415):_0x1623b4(_0x59b415))||_0x59b415);return _0x28c862&&_0x59b415&&_0x2d7bfa(_0x407236,_0xa60909,_0x59b415),_0x59b415;},_0x653e47=(_0x460e66,_0x3ac5c6)=>(_0x4cbee2,_0x32bc7e)=>_0x3ac5c6(_0x4cbee2,_0x32bc7e,_0x460e66);let _0x16bfcd=class extends _0x256344['Disposable']{constructor(_0x5cfa3c,_0x4a2cf3,_0x30b8fc,_0x4f1970){const _0x9dfbcd=_0xa0760e;super(),this[_0x9dfbcd(0x1ee)]=_0x5cfa3c,this[_0x9dfbcd(0x19e)]=_0x4a2cf3,this[_0x9dfbcd(0x1f9)]=_0x30b8fc,this[_0x9dfbcd(0x1c8)]=_0x4f1970,this[_0x9dfbcd(0x211)](),this['_initUserSync']();}[_0xa0760e(0x216)](){const _0x67510a=_0xa0760e;this[_0x67510a(0x22a)](this[_0x67510a(0x19e)][_0x67510a(0x19b)][_0x67510a(0x20f)](_0x45de69[_0x67510a(0x209)](0x10))[_0x67510a(0x1c5)](_0x124eb4=>{const _0x1d07e8=_0x67510a,_0x183073=new Set();_0x124eb4[_0x1d07e8(0x215)](_0x4c4e3d=>{const _0x3fd604=_0x1d07e8;switch(_0x4c4e3d['type']){case _0x3fd604(0x1f3):{const _0x3877d6=_0x4c4e3d[_0x3fd604(0x1b3)][_0x3fd604(0x202)];_0x183073[_0x3fd604(0x1f3)](_0x3877d6);break;}}}),_0x4517f9(this[_0x1d07e8(0x1c8)],_0x183073);}));}['_init'](){const _0x1105f4=_0xa0760e;this[_0x1105f4(0x22a)](this[_0x1105f4(0x1ee)][_0x1105f4(0x19b)][_0x1105f4(0x1c5)](async _0x5b40b1=>{const _0x3debc4=_0x1105f4;var _0x3c442f,_0x2b49d2;const _0xe78af4=this[_0x3debc4(0x19e)][_0x3debc4(0x1ca)](_0x5b40b1[_0x3debc4(0x1e2)],_0x5b40b1[_0x3debc4(0x1d9)]);if(!_0xe78af4)return;const {unitId:_0x5e1292,subUnitId:_0x6898a8}=_0xe78af4;switch(_0x5b40b1['user']&&this['_userService']['addUser'](_0x5b40b1[_0x3debc4(0x1f6)]),_0x5b40b1[_0x3debc4(0x1ec)]){case _0x2e242a['Add']:break;case _0x2e242a[_0x3debc4(0x214)]:{this[_0x3debc4(0x19e)]['addComment'](_0x5e1292,_0x6898a8,{'unitId':_0x5e1292,'subUnitId':_0x6898a8,'ref':'','id':_0x5b40b1[_0x3debc4(0x1fd)],'dT':_0x1b8871(+_0x5b40b1[_0x3debc4(0x1da)]),'threadId':_0x5b40b1[_0x3debc4(0x1d9)],'personId':(_0x2b49d2=(_0x3c442f=_0x5b40b1[_0x3debc4(0x1f6)])==null?void 0x0:_0x3c442f['userID'])!=null?_0x2b49d2:_0x5b40b1[_0x3debc4(0x1f5)],'text':JSON[_0x3debc4(0x1a7)](_0x5b40b1[_0x3debc4(0x1a9)]),'parentId':_0xe78af4['id']});break;}case _0x2e242a[_0x3debc4(0x1b6)]:{const _0x4bdcff=this[_0x3debc4(0x19e)][_0x3debc4(0x1ed)](_0x5e1292,_0x6898a8,_0x5b40b1[_0x3debc4(0x1fd)]);_0x4bdcff&&_0x4bdcff[_0x3debc4(0x1d5)]&&this['_threadCommentModel'][_0x3debc4(0x1c6)](_0x5e1292,_0x6898a8,_0x5b40b1['replyId']);break;}case _0x2e242a[_0x3debc4(0x1fa)]:{this[_0x3debc4(0x19e)][_0x3debc4(0x229)](_0x5e1292,_0x6898a8,{'commentId':_0x5b40b1['replyId'],'text':JSON[_0x3debc4(0x1a7)](_0x5b40b1[_0x3debc4(0x1a9)])});break;}case _0x2e242a[_0x3debc4(0x1bb)]:{const _0x231261=this[_0x3debc4(0x19e)][_0x3debc4(0x1ca)](_0x5e1292,_0x5b40b1[_0x3debc4(0x1d9)]);_0x231261&&this[_0x3debc4(0x19e)][_0x3debc4(0x1cd)](_0x5e1292,_0x6898a8,_0x231261['id'],_0x5b40b1[_0x3debc4(0x1a1)]===_0x176c49['Solved']);break;}}}));}};_0x16bfcd=_0x4e1aae([_0x256344[_0xa0760e(0x1d4)](_0x256344[_0xa0760e(0x1fe)]['Ready'],_0x16bfcd),_0x653e47(0x0,_0x256344['Inject'](_0x5a3410['CommentService'])),_0x653e47(0x1,_0x256344[_0xa0760e(0x1a4)](_0x15323b[_0xa0760e(0x1fb)])),_0x653e47(0x2,_0x256344[_0xa0760e(0x1a4)](_0x256344['UserManagerService'])),_0x653e47(0x3,_0x256344[_0xa0760e(0x1a4)](_0x256344[_0xa0760e(0x213)]))],_0x16bfcd);const _0x33be12=_0xa0760e(0x1b5),_0x24153f={};var _0x55e0b0=Object[_0xa0760e(0x1a0)],_0x17f14b=Object['getOwnPropertyDescriptor'],_0x3808a8=(_0x2f3e2d,_0x461ded,_0x529289)=>_0x461ded in _0x2f3e2d?_0x55e0b0(_0x2f3e2d,_0x461ded,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x529289}):_0x2f3e2d[_0x461ded]=_0x529289,_0x5d0c8c=(_0x4e6d13,_0x3332ed,_0xee94a2,_0xe3fc07)=>{for(var _0x5e66b9=_0xe3fc07>0x1?void 0x0:_0xe3fc07?_0x17f14b(_0x3332ed,_0xee94a2):_0x3332ed,_0x1c0bee=_0x4e6d13['length']-0x1,_0x348ce5;_0x1c0bee>=0x0;_0x1c0bee--)(_0x348ce5=_0x4e6d13[_0x1c0bee])&&(_0x5e66b9=(_0xe3fc07?_0x348ce5(_0x3332ed,_0xee94a2,_0x5e66b9):_0x348ce5(_0x5e66b9))||_0x5e66b9);return _0xe3fc07&&_0x5e66b9&&_0x55e0b0(_0x3332ed,_0xee94a2,_0x5e66b9),_0x5e66b9;},_0x2ca5f7=(_0x288606,_0x3d380a)=>(_0x148893,_0x238e26)=>_0x3d380a(_0x148893,_0x238e26,_0x288606),_0x5f4c54=(_0x26c50a,_0x21baaf,_0x4ee91d)=>_0x3808a8(_0x26c50a,typeof _0x21baaf!=_0xa0760e(0x22d)?_0x21baaf+'':_0x21baaf,_0x4ee91d);_0x5d32d4[_0xa0760e(0x1eb)]=class extends _0x256344[_0xa0760e(0x1b9)]{constructor(_0x11a610=_0x24153f,_0x5d429b,_0x4cea2e){const _0x24c697=_0xa0760e;super(),this[_0x24c697(0x222)]=_0x11a610,this[_0x24c697(0x1c8)]=_0x5d429b,this[_0x24c697(0x217)]=_0x4cea2e;const {..._0xa3a50}=this['_config'];this[_0x24c697(0x217)][_0x24c697(0x225)](_0x33be12,_0xa3a50);}['onStarting'](){const _0x1bc39d=_0xa0760e;[[_0x2afb07],[_0x74e989],[_0x39dbf4],[_0x16bfcd]][_0x1bc39d(0x215)](_0x5b9a6c=>{const _0x28aec0=_0x1bc39d;this[_0x28aec0(0x1c8)][_0x28aec0(0x1f3)](_0x5b9a6c);});}},_0x5f4c54(_0x5d32d4[_0xa0760e(0x1eb)],_0xa0760e(0x1af),_0x5d21e7),_0x5f4c54(_0x5d32d4[_0xa0760e(0x1eb)],_0xa0760e(0x1ec),_0x256344[_0xa0760e(0x1cc)][_0xa0760e(0x1e6)]),_0x5d32d4['UniverThreadCommentDataSourcePlugin']=_0x5d0c8c([_0x256344['DependentOn'](_0x15323b['UniverThreadCommentPlugin'],_0x1cba50[_0xa0760e(0x21c)],_0x5a3410[_0xa0760e(0x219)]),_0x2ca5f7(0x1,_0x256344[_0xa0760e(0x1a4)](_0x256344[_0xa0760e(0x213)])),_0x2ca5f7(0x2,_0x256344[_0xa0760e(0x1f1)])],_0x5d32d4[_0xa0760e(0x1eb)]),Object[_0xa0760e(0x1a0)](_0x5d32d4,Symbol[_0xa0760e(0x1b8)],{'value':_0xa0760e(0x1ac)});}));function _0xe498(_0x4c856f,_0x45de7a){const _0x49cf1f=_0x49cf();return _0xe498=function(_0xe498be,_0x4deb3c){_0xe498be=_0xe498be-0x19a;let _0xf1f6df=_0x49cf1f[_0xe498be];return _0xf1f6df;},_0xe498(_0x4c856f,_0x45de7a);}function _0x49cf(){const _0x2fa7d7=['href','users','@univerjs-pro/collaboration-client','updateComment','disposeWithMe','exports','@univerjs/core','symbol','UniverThreadComment','filter','dayjs','3JZZSIi','/edit','commentUpdate$','UNRECOGNIZED','customRanges','_threadCommentModel','13497044oHPokG','defineProperty','solved','CollaborationSessionService','CustomRangeType','Inject','UniverCore','avatar','parse','UniverThreadCommentUi','content','dataSource','@univerjs/network','Module','COMMENT','/list','pluginName','reply','HTTPService','object','payload','get','thread-comment-data-source.config','Delete','searchParams','toStringTag','Plugin','saveCommentToSnapshot','Solve','function','OpenOrReOpen','listComments','getOwnPropertyDescriptor','558qrqSRe','3118012ftWVtg','_sessionService','33846fpULjO','8bNikFa','subscribe','deleteComment','location','_injector','error','getThread','/universer-api/authz/collaborator','UniverInstanceType','resolveComment','5530EgCCKW','http','addUser','rangeType','resolved','getMentions','OnLifecycle','parentId','amd','https','_httpService','threadId','createTimestamp','comments','unit','post','collaborators','Solved','_threadCommentMentionDataSource','userID','unitId','THREAD_COMMENT_DATA_SOURCE_PLUGIN','IThreadCommentDataSourceService','IThreadCommentMentionDataService','UNIVER_UNKNOWN','requireSession','Starting','368500CeTsTK','YYYY/MM/DD\x20HH:mm','UniverThreadCommentDataSourcePlugin','type','getComment','_commentService','@univerjs/thread-comment-ui','slice','IConfigService','format','add','_threadCommentDataSource','userId','user','UserManagerService','syncUpdateMutationToColla','_userService','Edit','ThreadCommentModel','/reply','replyId','LifecycleStages','https:','body','/universer-api/comment/unit/','personId','_initDataSource','_threadCommentDataSourceService','Unknown','map','ref','length','bufferTime','5688DrDlpE','/universer-api/user/list','replies','/solved','Add','pipe','code','_init','UniverNetwork','Injector','Reply','forEach','_initUserSync','_configService','_threadCommentMentionDataService','UniverCollaborationClientPlugin','subject','rangeId','UniverThreadCommentUIPlugin','7235505owjyGS','rxjs','/delete','2751LYWwXJ','@univerjs/thread-comment','_config','getUser','getMemberID','setConfig'];_0x49cf=function(){return _0x2fa7d7;};return _0x49cf();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"dayjs": ">=1.11.0",
|
|
47
47
|
"rxjs": ">=7.0.0",
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.2.
|
|
49
|
-
"@univerjs/core": "0.2.
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/thread-comment
|
|
52
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.2.12",
|
|
49
|
+
"@univerjs/core": "0.2.12",
|
|
50
|
+
"@univerjs/network": "0.2.12",
|
|
51
|
+
"@univerjs/thread-comment": "0.2.12",
|
|
52
|
+
"@univerjs/thread-comment-ui": "0.2.12"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@univerjs/protocol": "0.1.39-alpha.15"
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"typescript": "^5.5.4",
|
|
61
61
|
"vite": "^5.4.0",
|
|
62
62
|
"vitest": "^2.0.5",
|
|
63
|
-
"@univerjs-pro/facade": "0.2.
|
|
64
|
-
"@univerjs/core": "0.2.
|
|
65
|
-
"@univerjs/network": "0.2.
|
|
66
|
-
"@univerjs/
|
|
67
|
-
"@univerjs/
|
|
63
|
+
"@univerjs-pro/facade": "0.2.12",
|
|
64
|
+
"@univerjs/core": "0.2.12",
|
|
65
|
+
"@univerjs/network": "0.2.12",
|
|
66
|
+
"@univerjs/uniscript": "0.2.12",
|
|
67
|
+
"@univerjs/shared": "0.2.12"
|
|
68
68
|
},
|
|
69
69
|
"univerSpace": {
|
|
70
70
|
".": {
|