@univerjs-pro/thread-comment-datasource 0.5.0-beta.0 → 0.5.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x2edc47=_0x1298;function _0x1298(_0x360d78,_0x47bf4c){const _0x169a38=_0x169a();return _0x1298=function(_0x1298d7,_0x1cd2d6){_0x1298d7=_0x1298d7-0xd8;let _0x491b1b=_0x169a38[_0x1298d7];return _0x491b1b;},_0x1298(_0x360d78,_0x47bf4c);}(function(_0x31cd86,_0x42e65c){const _0x1a7199=_0x1298,_0x5060ce=_0x31cd86();while(!![]){try{const _0x250a79=-parseInt(_0x1a7199(0x135))/0x1*(parseInt(_0x1a7199(0x159))/0x2)+parseInt(_0x1a7199(0x145))/0x3*(parseInt(_0x1a7199(0x139))/0x4)+parseInt(_0x1a7199(0xe7))/0x5+parseInt(_0x1a7199(0x138))/0x6+-parseInt(_0x1a7199(0x134))/0x7+-parseInt(_0x1a7199(0xe2))/0x8+parseInt(_0x1a7199(0xdc))/0x9;if(_0x250a79===_0x42e65c)break;else _0x5060ce['push'](_0x5060ce['shift']());}catch(_0x370b17){_0x5060ce['push'](_0x5060ce['shift']());}}}(_0x169a,0x66951));Object['defineProperty'](exports,Symbol[_0x2edc47(0x147)],{'value':'Module'});const c=require(_0x2edc47(0x149)),T=require(_0x2edc47(0x153)),g=require(_0x2edc47(0x154)),R=require(_0x2edc47(0x155)),N=require(_0x2edc47(0x151)),E=require(_0x2edc47(0x124)),O=require(_0x2edc47(0xf6)),q=_0x2edc47(0x105);function _0x169a(){const _0x38c259=['2199728tjjXpT','type','_init','location','onStarting','538125JyLuyX','UniverThreadCommentDataSourcePlugin','saveCommentToSnapshot','post','getMemberID','_threadCommentDataSourceService','content','replyId','disposeWithMe','YYYY/MM/DD\x20HH:mm','map','reply','subject','getOwnPropertyDescriptor','add','@univerjs/network','/universer-api/comment/unit/','resolveComment','onReady','CollaborationSessionService','commentUpdate$','UserManagerService','Unknown','_threadCommentDataSource','solved','_threadCommentMentionDataSource','getComment','threadId','userId','UniverLicensePlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','code','deleteComment','collaborators','_threadCommentMentionDataService','error','_injector','http','DependentOn','replies','filter','getCurrentUser','IThreadCommentMentionDataService','rangeId','/edit','UNIVER_UNKNOWN','setConfig','CustomRangeType','thread-comment-data-source.config','Solve','/list','Add','size','comment','stringify','userID','Solved','https','delete','_initUserSync','rxjs','href','root','find','format','Inject','Delete','IConfigService','length','/delete','personId','requireSession','getUnit','updateComment','resolved','forEach','302393kVOLka','2CDsMqE','pluginName','_threadCommentModel','339294vMGrBk','2860220WntIsw','getUser','UniverThreadCommentUIPlugin','_sessionService','https:','values','parse','body','_httpService','_configService','defineProperty','Reply','3VduPZu','COMMENT','toStringTag','HTTPService','@univerjs/core','Edit','payload','ref','dayjs','Disposable','/universer-api/authz/collaborator','host','@univerjs/thread-comment','_commentService','@univerjs/thread-comment-ui','@univerjs-pro/collaboration-client','@univerjs-pro/license','get','addComment','dataSource','707858nOJvNB','UNRECOGNIZED','users','unitId','pipe','createTimestamp','_userService','addUser','listComments','Plugin','searchParams','Injector','5102739vRSotr','CommentService','user','avatar','/reply','rangeType'];_0x169a=function(){return _0x38c259;};return _0x169a();}var I=(_0x5ec15d=>(_0x5ec15d[_0x5ec15d['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x5ec15d[_0x5ec15d['Solved']=0x1]='Solved',_0x5ec15d[_0x5ec15d[_0x2edc47(0x15a)]=-0x1]=_0x2edc47(0x15a),_0x5ec15d))(I||{}),v=(_0x25c83c=>(_0x25c83c[_0x25c83c[_0x2edc47(0xfd)]=0x0]='Unknown',_0x25c83c[_0x25c83c[_0x2edc47(0x11b)]=0x1]=_0x2edc47(0x11b),_0x25c83c[_0x25c83c[_0x2edc47(0x144)]=0x2]='Reply',_0x25c83c[_0x25c83c['Edit']=0x3]=_0x2edc47(0x14a),_0x25c83c[_0x25c83c[_0x2edc47(0x12a)]=0x4]=_0x2edc47(0x12a),_0x25c83c[_0x25c83c[_0x2edc47(0x119)]=0x5]=_0x2edc47(0x119),_0x25c83c[_0x25c83c[_0x2edc47(0x15a)]=-0x1]=_0x2edc47(0x15a),_0x25c83c))(v||{});const y=_0x3dbdcf=>c[_0x2edc47(0x14d)](new Date(+_0x3dbdcf))[_0x2edc47(0x128)](_0x2edc47(0xf0)),x=async(_0x2c0e6e,_0x4a43ae)=>{const _0x9b1f4f=_0x2edc47,_0xc15d16=_0x2c0e6e[_0x9b1f4f(0x156)](c['UserManagerService']),_0x66f891=_0x2c0e6e[_0x9b1f4f(0x156)](O['HTTPService']);_0x4a43ae[_0x9b1f4f(0x133)](_0x5a66fa=>{const _0x18f327=_0x9b1f4f;_0xc15d16[_0x18f327(0x13a)](_0x5a66fa)&&_0x4a43ae[_0x18f327(0x122)](_0x5a66fa);}),_0x4a43ae[_0x9b1f4f(0x11c)]&&(await _0x66f891[_0x9b1f4f(0x156)]('/universer-api/user/list',{'params':{'userIDs':[..._0x4a43ae]}}))[_0x9b1f4f(0x140)]['users']['forEach'](_0x5c8be8=>{const _0xe82671=_0x9b1f4f;_0x5c8be8&&_0xc15d16[_0xe82671(0x160)](_0x5c8be8);});};var Y=Object[_0x2edc47(0x143)],G=Object[_0x2edc47(0xf4)],H=(_0xf89604,_0x26d172,_0x45710f,_0x1d966e)=>{const _0x59736c=_0x2edc47;for(var _0x3b8015=_0x1d966e>0x1?void 0x0:_0x1d966e?G(_0x26d172,_0x45710f):_0x26d172,_0x5d708a=_0xf89604[_0x59736c(0x12c)]-0x1,_0x109e96;_0x5d708a>=0x0;_0x5d708a--)(_0x109e96=_0xf89604[_0x5d708a])&&(_0x3b8015=(_0x1d966e?_0x109e96(_0x26d172,_0x45710f,_0x3b8015):_0x109e96(_0x3b8015))||_0x3b8015);return _0x1d966e&&_0x3b8015&&Y(_0x26d172,_0x45710f,_0x3b8015),_0x3b8015;},p=(_0x3eeb48,_0x33ad9e)=>(_0x14b691,_0x4eea80)=>_0x33ad9e(_0x14b691,_0x4eea80,_0x3eeb48);let f=class extends c[_0x2edc47(0x14e)]{constructor(_0x56c039,_0x47f172,_0xf47db2,_0x126838){const _0x2781a0=_0x2edc47;super(),this[_0x2781a0(0x152)]=_0x56c039,this[_0x2781a0(0x137)]=_0x47f172,this[_0x2781a0(0x15f)]=_0xf47db2,this[_0x2781a0(0x10c)]=_0x126838,this[_0x2781a0(0xe4)](),this[_0x2781a0(0x123)]();}[_0x2edc47(0x123)](){const _0x16df3c=_0x2edc47;this[_0x16df3c(0xef)](this[_0x16df3c(0x137)][_0x16df3c(0xfb)][_0x16df3c(0x15d)](E['bufferTime'](0x10))['subscribe'](_0x316339=>{const _0x2bfe83=_0x16df3c,_0x3cce5e=new Set();_0x316339[_0x2bfe83(0x133)](_0x4f0fbb=>{const _0x3d982b=_0x2bfe83;switch(_0x4f0fbb[_0x3d982b(0xe3)]){case _0x3d982b(0xf5):{const _0x5cdff5=_0x4f0fbb[_0x3d982b(0x14b)][_0x3d982b(0x12e)];_0x3cce5e[_0x3d982b(0xf5)](_0x5cdff5);break;}}}),x(this[_0x2bfe83(0x10c)],_0x3cce5e);}));}['_init'](){const _0x2996d8=_0x2edc47;this[_0x2996d8(0xef)](this['_commentService'][_0x2996d8(0xfb)]['subscribe'](async _0x5bd6d3=>{const _0x33d5a5=_0x2996d8;var _0x1ad06c,_0x462285,_0x217c1c,_0x14d2bd;const _0x4ada09=(_0x1ad06c=this['_threadCommentModel'][_0x33d5a5(0x130)](_0x5bd6d3[_0x33d5a5(0x15c)])[_0x33d5a5(0x127)](_0x1367f4=>_0x1367f4[_0x33d5a5(0x102)]===_0x5bd6d3[_0x33d5a5(0x102)]))==null?void 0x0:_0x1ad06c[_0x33d5a5(0x126)];if(!_0x4ada09)return;const {unitId:_0x574998,subUnitId:_0x49f28a}=_0x4ada09;switch(_0x5bd6d3[_0x33d5a5(0xde)]&&this[_0x33d5a5(0x15f)]['addUser'](_0x5bd6d3[_0x33d5a5(0xde)]),_0x5bd6d3['type']){case v[_0x33d5a5(0x11b)]:break;case v[_0x33d5a5(0x144)]:{this['_threadCommentModel'][_0x33d5a5(0x157)](_0x574998,_0x49f28a,{'unitId':_0x574998,'subUnitId':_0x49f28a,'ref':'','id':_0x5bd6d3['replyId'],'dT':y(+_0x5bd6d3[_0x33d5a5(0x15e)]),'threadId':_0x5bd6d3[_0x33d5a5(0x102)],'personId':(_0x217c1c=(_0x462285=_0x5bd6d3[_0x33d5a5(0xde)])==null?void 0x0:_0x462285[_0x33d5a5(0x11f)])!=null?_0x217c1c:_0x5bd6d3[_0x33d5a5(0x103)],'text':JSON[_0x33d5a5(0x13f)](_0x5bd6d3['content']),'parentId':_0x4ada09['id']});break;}case v['Delete']:{const _0x27a59c=this[_0x33d5a5(0x137)][_0x33d5a5(0x101)](_0x574998,_0x49f28a,_0x5bd6d3[_0x33d5a5(0xee)]);_0x27a59c&&_0x27a59c['parentId']&&this[_0x33d5a5(0x137)]['deleteComment'](_0x574998,_0x49f28a,_0x5bd6d3['replyId']);break;}case v[_0x33d5a5(0x14a)]:{this[_0x33d5a5(0x137)][_0x33d5a5(0x131)](_0x574998,_0x49f28a,{'commentId':_0x5bd6d3[_0x33d5a5(0xee)],'text':JSON[_0x33d5a5(0x13f)](_0x5bd6d3[_0x33d5a5(0xed)])});break;}case v[_0x33d5a5(0x119)]:{const _0x4e8833=(_0x14d2bd=this['_threadCommentModel']['getUnit'](_0x5bd6d3[_0x33d5a5(0x15c)])['find'](_0x67416c=>_0x67416c['threadId']===_0x5bd6d3[_0x33d5a5(0x102)]))==null?void 0x0:_0x14d2bd['root'];_0x4e8833&&this[_0x33d5a5(0x137)][_0x33d5a5(0xf8)](_0x574998,_0x49f28a,_0x4e8833['id'],_0x5bd6d3[_0x33d5a5(0xff)]===I['Solved']);break;}}}));}};f=H([p(0x0,c[_0x2edc47(0x129)](g[_0x2edc47(0xdd)])),p(0x1,c[_0x2edc47(0x129)](N['ThreadCommentModel'])),p(0x2,c[_0x2edc47(0x129)](c[_0x2edc47(0xfc)])),p(0x3,c['Inject'](c[_0x2edc47(0xdb)]))],f);const A=_0x2edc47(0x118),J={};var L=Object[_0x2edc47(0x143)],F=Object[_0x2edc47(0xf4)],Z=(_0x444492,_0x488d5c,_0x585f7d,_0x1ba1b9)=>{for(var _0xfa40cb=_0x1ba1b9>0x1?void 0x0:_0x1ba1b9?F(_0x488d5c,_0x585f7d):_0x488d5c,_0x5a8746=_0x444492['length']-0x1,_0x1c2a47;_0x5a8746>=0x0;_0x5a8746--)(_0x1c2a47=_0x444492[_0x5a8746])&&(_0xfa40cb=(_0x1ba1b9?_0x1c2a47(_0x488d5c,_0x585f7d,_0xfa40cb):_0x1c2a47(_0xfa40cb))||_0xfa40cb);return _0x1ba1b9&&_0xfa40cb&&L(_0x488d5c,_0x585f7d,_0xfa40cb),_0xfa40cb;},_=(_0x447d4d,_0x1a8714)=>(_0x2c7218,_0x3c9be7)=>_0x1a8714(_0x2c7218,_0x3c9be7,_0x447d4d);function W(_0x2f2494,_0x2e68d2){const _0x11d7f5=_0x2edc47,_0x339725=_0x2f2494[_0x11d7f5(0x10f)][0x0];return{..._0x2e68d2,'id':_0x339725['replyId'],'resolved':_0x2f2494[_0x11d7f5(0xff)]===0x1,'dT':y(_0x339725[_0x11d7f5(0x15e)]),'personId':_0x339725['userId'],'threadId':_0x339725[_0x11d7f5(0x102)]};}function z(_0x58b50c,_0x282864,_0xc7b9f7){const _0x209b9a=_0x2edc47;var _0x51aaf9,_0x39d791;if(((_0x39d791=(_0x51aaf9=_0x58b50c==null?void 0x0:_0x58b50c[_0x209b9a(0x10f)])==null?void 0x0:_0x51aaf9[_0x209b9a(0x12c)])!=null?_0x39d791:0x0)>0x0){const _0x47308d=(_0x1fe209,_0x516f00)=>({'id':_0x1fe209[_0x209b9a(0xee)],'threadId':_0x1fe209[_0x209b9a(0x102)],'dT':y(_0x1fe209[_0x209b9a(0x15e)]),'personId':_0x1fe209[_0x209b9a(0x103)],'resolved':_0x58b50c['solved']===I[_0x209b9a(0x120)],'unitId':_0x282864,'subUnitId':_0xc7b9f7,'text':JSON[_0x209b9a(0x13f)](_0x1fe209[_0x209b9a(0xed)]),'parentId':_0x516f00}),_0x2e1eb0=_0x47308d(_0x58b50c['replies'][0x0]);return{..._0x2e1eb0,'children':_0x58b50c['replies']['slice'](0x1)[_0x209b9a(0xf1)](_0x117fcd=>_0x47308d(_0x117fcd,_0x2e1eb0['id']))};}return null;}let b=class{constructor(_0x4cbf1d,_0x5947e2,_0x2f3699,_0x463940){const _0x5ec1c5=_0x2edc47;this['_httpService']=_0x4cbf1d,this[_0x5ec1c5(0x15f)]=_0x5947e2,this[_0x5ec1c5(0x13c)]=_0x2f3699,this[_0x5ec1c5(0x10c)]=_0x463940;}async['addComment'](_0x26edbe){const _0x187989=_0x2edc47;var _0x5ac346,_0x178bd3;const {parentId:_0x1fd4f9,unitId:_0x3fe00a,text:_0x22b022,threadId:_0x424c05}=_0x26edbe,_0xa3d726=(_0x178bd3=(_0x5ac346=_0x22b022['customRanges'])==null?void 0x0:_0x5ac346['filter'](_0x6a7410=>_0x6a7410['rangeType']===c[_0x187989(0x117)][_0x187989(0x146)])[_0x187989(0xf1)](_0x4a9568=>_0x4a9568[_0x187989(0x113)]))!=null?_0x178bd3:[],_0x4c1b28=JSON[_0x187989(0x11e)](_0x22b022),_0x3bd405=(await this['_sessionService'][_0x187989(0x12f)](_0x3fe00a))[_0x187989(0xeb)]();if(_0x1fd4f9){const _0x61795f={'memberId':_0x3bd405,'unitId':_0x3fe00a,'content':_0x4c1b28,'mention':_0xa3d726,'threadId':_0x424c05},_0x1c10cf=(await this['_httpService'][_0x187989(0xea)](_0x187989(0xf7)+_0x3fe00a+_0x187989(0xe0),{'body':_0x61795f}))['body'][_0x187989(0xf2)];return{..._0x26edbe,'id':_0x1c10cf[_0x187989(0xee)],'dT':c[_0x187989(0x14d)](+_0x1c10cf[_0x187989(0x15e)])[_0x187989(0x128)](_0x187989(0xf0)),'personId':_0x1c10cf[_0x187989(0x103)]};}else{const _0x2aeb3b={'memberId':_0x3bd405,'unitId':_0x3fe00a,'content':_0x4c1b28,'mention':_0xa3d726},_0x1a8c50=await this[_0x187989(0x141)][_0x187989(0xea)](_0x187989(0xf7)+_0x3fe00a+'/add',{'body':_0x2aeb3b});return W(_0x1a8c50[_0x187989(0x140)][_0x187989(0x11d)],_0x26edbe);}}async[_0x2edc47(0x131)](_0x476bda){const _0x3fbc8e=_0x2edc47;var _0x5edfeb,_0x1c9370;const {text:_0x407527,unitId:_0x4f6d40}=_0x476bda,_0x24e75c=(_0x1c9370=(_0x5edfeb=_0x407527[_0x3fbc8e(0x106)])==null?void 0x0:_0x5edfeb[_0x3fbc8e(0x110)](_0xa5ff03=>_0xa5ff03[_0x3fbc8e(0xe1)]===c[_0x3fbc8e(0x117)][_0x3fbc8e(0x146)])[_0x3fbc8e(0xf1)](_0x50eba0=>_0x50eba0[_0x3fbc8e(0x113)]))!=null?_0x1c9370:[],_0x44caf9=JSON[_0x3fbc8e(0x11e)](_0x407527),_0x3dd11f=_0x476bda['threadId'],_0x550ee3=_0x476bda['id'],_0x335fc4={'memberId':(await this['_sessionService'][_0x3fbc8e(0x12f)](_0x4f6d40))[_0x3fbc8e(0xeb)](),'unitId':_0x4f6d40,'threadId':_0x3dd11f,'mention':_0x24e75c,'content':_0x44caf9,'replyId':_0x550ee3},_0x5de6d5=await this['_httpService'][_0x3fbc8e(0xea)](_0x3fbc8e(0xf7)+_0x4f6d40+_0x3fbc8e(0x114),{'body':_0x335fc4});return!_0x5de6d5['body'][_0x3fbc8e(0x10b)]||_0x5de6d5['body'][_0x3fbc8e(0x10b)]['code']===0x1;}async[_0x2edc47(0xf8)](_0x4f4d54){const _0x3b83ed=_0x2edc47,{unitId:_0x2b96de}=_0x4f4d54,_0x53ed30=_0x4f4d54[_0x3b83ed(0x102)],_0x4d610d={'memberId':this[_0x3b83ed(0x15f)][_0x3b83ed(0x111)]()['userID'],'unitId':_0x2b96de,'threadId':_0x53ed30,'solved':_0x4f4d54[_0x3b83ed(0x132)]?I[_0x3b83ed(0x120)]:I['OpenOrReOpen']},_0x15563e=await this['_httpService'][_0x3b83ed(0xea)](_0x3b83ed(0xf7)+_0x2b96de+'/solved',{'body':_0x4d610d});return!_0x15563e[_0x3b83ed(0x140)][_0x3b83ed(0x10b)]||_0x15563e[_0x3b83ed(0x140)][_0x3b83ed(0x10b)][_0x3b83ed(0x107)]===0x1;}async[_0x2edc47(0x108)](_0x46e7d8,_0x48d991,_0x31b9fb,_0x5aceeb){const _0x1c4938=_0x2edc47,_0xa5ba15={'memberId':(await this[_0x1c4938(0x13c)]['requireSession'](_0x46e7d8))[_0x1c4938(0xeb)](),'threadId':_0x31b9fb,'replyId':_0x5aceeb,'unitId':_0x46e7d8},_0x51216c=await this[_0x1c4938(0x141)]['post'](_0x1c4938(0xf7)+_0x46e7d8+_0x1c4938(0x12d),{'body':_0xa5ba15});return!_0x51216c[_0x1c4938(0x140)]['error']||_0x51216c[_0x1c4938(0x140)][_0x1c4938(0x10b)][_0x1c4938(0x107)]===0x1;}async[_0x2edc47(0xd8)](_0x33ffb6,_0x2fab75,_0x387425){const _0x525af8=_0x2edc47,_0x4e7e1a={'unitId':_0x33ffb6,'threadId':_0x387425},_0x5b943a=await this[_0x525af8(0x141)][_0x525af8(0xea)](_0x525af8(0xf7)+_0x33ffb6+_0x525af8(0x11a),{'body':_0x4e7e1a}),_0x41680d=_0x387425[_0x525af8(0xf1)](_0x14f020=>z(_0x5b943a[_0x525af8(0x140)]['comments'][_0x14f020],_0x33ffb6,_0x2fab75))[_0x525af8(0x110)](Boolean);return Object[_0x525af8(0x13e)](_0x5b943a['body'][_0x525af8(0x15b)])[_0x525af8(0x133)](_0x1fbf7b=>{const _0x18e8f5=_0x525af8;this[_0x18e8f5(0x15f)][_0x18e8f5(0x160)](_0x1fbf7b);}),_0x41680d;}[_0x2edc47(0xe9)](_0x14e395){const _0xb9163=_0x2edc47;return{'id':_0x14e395['id'],'threadId':_0x14e395[_0xb9163(0x102)],'ref':_0x14e395[_0xb9163(0x14c)]};}};b=Z([_(0x0,c[_0x2edc47(0x129)](O[_0x2edc47(0x148)])),_(0x1,c[_0x2edc47(0x129)](c[_0x2edc47(0xfc)])),_(0x2,c['Inject'](g[_0x2edc47(0xfa)])),_(0x3,c[_0x2edc47(0x129)](c['Injector']))],b);var B=Object[_0x2edc47(0x143)],K=Object[_0x2edc47(0xf4)],V=(_0x3d1141,_0x4a6a83,_0x1812c3,_0x41fda3)=>{const _0x9bb1ab=_0x2edc47;for(var _0x897884=_0x41fda3>0x1?void 0x0:_0x41fda3?K(_0x4a6a83,_0x1812c3):_0x4a6a83,_0x543446=_0x3d1141[_0x9bb1ab(0x12c)]-0x1,_0x2d95f5;_0x543446>=0x0;_0x543446--)(_0x2d95f5=_0x3d1141[_0x543446])&&(_0x897884=(_0x41fda3?_0x2d95f5(_0x4a6a83,_0x1812c3,_0x897884):_0x2d95f5(_0x897884))||_0x897884);return _0x41fda3&&_0x897884&&B(_0x4a6a83,_0x1812c3,_0x897884),_0x897884;},Q=(_0x3e5443,_0x1a651c)=>(_0x10c059,_0x3a40c5)=>_0x1a651c(_0x10c059,_0x3a40c5,_0x3e5443);let C=class{constructor(_0x2424bc){const _0x22b049=_0x2edc47;this[_0x22b049(0x141)]=_0x2424bc;}async['getMentions'](_0x4b3dd3,_0x517fa8,_0x222e7b){const _0x27678c=_0x2edc47,_0x42cd37=new URL(window[_0x27678c(0xe5)][_0x27678c(0x125)])[_0x27678c(0xda)]['get']('unit');if(!_0x42cd37)return[];const _0x1b04c6=window[_0x27678c(0xe5)][_0x27678c(0x150)],_0x303e20=window[_0x27678c(0xe5)]['protocol']===_0x27678c(0x13d)?_0x27678c(0x121):_0x27678c(0x10d);return(await this[_0x27678c(0x141)][_0x27678c(0x156)](_0x303e20+'://'+_0x1b04c6+_0x27678c(0x14f),{'params':{'objectID':_0x42cd37,'unitID':_0x42cd37}}))[_0x27678c(0x140)][_0x27678c(0x109)][_0x27678c(0xf1)](_0x3f8b28=>{const _0x35559b=_0x27678c;var _0x6a5e0d,_0x2d7c04,_0x104f52,_0x22a208,_0x29524e,_0x3fea7b;return{'id':(_0x2d7c04=(_0x6a5e0d=_0x3f8b28[_0x35559b(0xf3)])==null?void 0x0:_0x6a5e0d['userID'])!=null?_0x2d7c04:'','label':(_0x22a208=(_0x104f52=_0x3f8b28[_0x35559b(0xf3)])==null?void 0x0:_0x104f52['name'])!=null?_0x22a208:'','icon':(_0x3fea7b=(_0x29524e=_0x3f8b28['subject'])==null?void 0x0:_0x29524e[_0x35559b(0xdf)])!=null?_0x3fea7b:'','type':_0x35559b(0xde)};});}};C=V([Q(0x0,c[_0x2edc47(0x129)](O[_0x2edc47(0x148)]))],C);var X=Object[_0x2edc47(0x143)],k=Object[_0x2edc47(0xf4)],ee=(_0x532d05,_0x33bce3,_0x4844e1,_0x5a85d2)=>{const _0x256245=_0x2edc47;for(var _0xdd46e0=_0x5a85d2>0x1?void 0x0:_0x5a85d2?k(_0x33bce3,_0x4844e1):_0x33bce3,_0x5449ee=_0x532d05[_0x256245(0x12c)]-0x1,_0x43b5bf;_0x5449ee>=0x0;_0x5449ee--)(_0x43b5bf=_0x532d05[_0x5449ee])&&(_0xdd46e0=(_0x5a85d2?_0x43b5bf(_0x33bce3,_0x4844e1,_0xdd46e0):_0x43b5bf(_0xdd46e0))||_0xdd46e0);return _0x5a85d2&&_0xdd46e0&&X(_0x33bce3,_0x4844e1,_0xdd46e0),_0xdd46e0;},S=(_0x4b7735,_0x4c3981)=>(_0x2cfd89,_0x5cc1ed)=>_0x4c3981(_0x2cfd89,_0x5cc1ed,_0x4b7735);let D=class extends c[_0x2edc47(0x14e)]{constructor(_0x13ebae,_0x4f47ef,_0x4339bf,_0x5427f1){const _0x2883ac=_0x2edc47;super(),this[_0x2883ac(0xec)]=_0x13ebae,this[_0x2883ac(0xfe)]=_0x4f47ef,this[_0x2883ac(0x10a)]=_0x4339bf,this[_0x2883ac(0x100)]=_0x5427f1,this['_initDataSource']();}['_initDataSource'](){const _0xc5bb53=_0x2edc47;this[_0xc5bb53(0xec)][_0xc5bb53(0x158)]=this[_0xc5bb53(0xfe)],this[_0xc5bb53(0xec)]['syncUpdateMutationToColla']=!0x1,this[_0xc5bb53(0x10a)][_0xc5bb53(0x158)]=this['_threadCommentMentionDataSource'];}};D=ee([S(0x0,N['IThreadCommentDataSourceService']),S(0x1,c[_0x2edc47(0x129)](b)),S(0x2,T[_0x2edc47(0x112)]),S(0x3,c[_0x2edc47(0x129)](C))],D);var $=Object[_0x2edc47(0x143)],re=Object['getOwnPropertyDescriptor'],te=(_0x198651,_0x52a1e6,_0x39a461)=>_0x52a1e6 in _0x198651?$(_0x198651,_0x52a1e6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39a461}):_0x198651[_0x52a1e6]=_0x39a461,ne=(_0x179543,_0x458954,_0x45d339,_0x1b3064)=>{const _0x2831af=_0x2edc47;for(var _0x47b6a3=_0x1b3064>0x1?void 0x0:_0x1b3064?re(_0x458954,_0x45d339):_0x458954,_0x14934a=_0x179543[_0x2831af(0x12c)]-0x1,_0x4c8f85;_0x14934a>=0x0;_0x14934a--)(_0x4c8f85=_0x179543[_0x14934a])&&(_0x47b6a3=(_0x1b3064?_0x4c8f85(_0x458954,_0x45d339,_0x47b6a3):_0x4c8f85(_0x47b6a3))||_0x47b6a3);return _0x1b3064&&_0x47b6a3&&$(_0x458954,_0x45d339,_0x47b6a3),_0x47b6a3;},w=(_0x45e21a,_0x149a32)=>(_0x22a76d,_0x45df0f)=>_0x149a32(_0x22a76d,_0x45df0f,_0x45e21a),U=(_0x23623c,_0x1174e7,_0x1a7647)=>te(_0x23623c,typeof _0x1174e7!='symbol'?_0x1174e7+'':_0x1174e7,_0x1a7647);exports[_0x2edc47(0xe8)]=class extends c[_0x2edc47(0xd9)]{constructor(_0x16271e=J,_0x399028,_0x3be1fe){const _0x1fb909=_0x2edc47;super(),this['_config']=_0x16271e,this[_0x1fb909(0x10c)]=_0x399028,this[_0x1fb909(0x142)]=_0x3be1fe;const {..._0x13e725}=this['_config'];this['_configService'][_0x1fb909(0x116)](A,_0x13e725);}[_0x2edc47(0xe6)](){const _0x54c290=_0x2edc47;[[C],[b],[D],[f]][_0x54c290(0x133)](_0x38f412=>{const _0x76a8d7=_0x54c290;this[_0x76a8d7(0x10c)][_0x76a8d7(0xf5)](_0x38f412);});}[_0x2edc47(0xf9)](){const _0x1cd542=_0x2edc47;this[_0x1cd542(0x10c)][_0x1cd542(0x156)](D),this[_0x1cd542(0x10c)][_0x1cd542(0x156)](f);}},U(exports['UniverThreadCommentDataSourcePlugin'],_0x2edc47(0x136),q),U(exports[_0x2edc47(0xe8)],_0x2edc47(0xe3),c['UniverInstanceType'][_0x2edc47(0x115)]),exports[_0x2edc47(0xe8)]=ne([c[_0x2edc47(0x10e)](T[_0x2edc47(0x13b)],g['UniverCollaborationClientPlugin'],R[_0x2edc47(0x104)]),w(0x1,c[_0x2edc47(0x129)](c[_0x2edc47(0xdb)])),w(0x2,c[_0x2edc47(0x12b)])],exports[_0x2edc47(0xe8)]);
1
+ 'use strict';const _0x59f3b2=_0x58a9;(function(_0xba1e2e,_0x1adf19){const _0x8cc9a2=_0x58a9,_0x59cd91=_0xba1e2e();while(!![]){try{const _0x367a94=parseInt(_0x8cc9a2(0x117))/0x1+-parseInt(_0x8cc9a2(0x11e))/0x2*(parseInt(_0x8cc9a2(0x130))/0x3)+-parseInt(_0x8cc9a2(0x132))/0x4+parseInt(_0x8cc9a2(0x12b))/0x5*(parseInt(_0x8cc9a2(0xfd))/0x6)+-parseInt(_0x8cc9a2(0x11b))/0x7+parseInt(_0x8cc9a2(0x13b))/0x8+parseInt(_0x8cc9a2(0x11a))/0x9*(parseInt(_0x8cc9a2(0x118))/0xa);if(_0x367a94===_0x1adf19)break;else _0x59cd91['push'](_0x59cd91['shift']());}catch(_0x2bf125){_0x59cd91['push'](_0x59cd91['shift']());}}}(_0x1e88,0xe4640));function _0x1e88(){const _0x1b9b69=['dataSource','COMMENT','requireSession','defineProperty','/universer-api/comment/unit/','5363080WBgIcc','solved','IConfigService','saveCommentToSnapshot','Add','Plugin','Inject','YYYY/MM/DD\x20HH:mm','getCurrentUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','@univerjs/core','https','body','_threadCommentDataSource','resolved','name','rangeId','unit','Solved','_configService','replyId','/add','Module','onStarting','Delete','http','UNRECOGNIZED','dayjs','getMentions','ref','rangeType','thread-comment-data-source.config','_threadCommentMentionDataService','getOwnPropertyDescriptor','href','replies','searchParams','/universer-api/user/list','_threadCommentMentionDataSource','root','@univerjs/network','UNIVER_UNKNOWN','reply','comment','DependentOn','customRanges','/reply','type','_commentService','getUser','subject','post','protocol','deleteComment','slice','_threadCommentDataSourceService','subscribe','disposeWithMe','threadId','@univerjs/thread-comment','_injector','OpenOrReOpen','@univerjs-pro/collaboration-client','IThreadCommentDataSourceService','_initDataSource','IThreadCommentMentionDataService','toStringTag','_config','setConfig','updateComment','UniverThreadCommentUIPlugin','add','/edit','UserManagerService','UniverThreadCommentDataSourcePlugin','UniverLicensePlugin','Disposable','HTTPService','length','3663066TGTCJd','@univerjs-pro/license','userID','get','getUnit','forEach','_userService','error','@univerjs/thread-comment-ui','delete','/solved','userId','commentUpdate$','getMemberID','find','users','filter','comments','CustomRangeType','onReady','CommentService','_httpService','ThreadCommentModel','parse','syncUpdateMutationToColla','content','1740305fduneb','10fJvYgm','_sessionService','3353409OpdxJR','10272059pCgZpQ','bufferTime','format','136acGzwQ','Reply','size','Solve','listComments','map','addUser','code','collaborators','createTimestamp','Edit','host','_init','5fnVeXY','user','parentId','pluginName','CollaborationSessionService','34107OAafSV','stringify','871140PDVsHl','Injector','location','_threadCommentModel'];_0x1e88=function(){return _0x1b9b69;};return _0x1e88();}Object[_0x59f3b2(0x139)](exports,Symbol[_0x59f3b2(0xf0)],{'value':_0x59f3b2(0x152)});const c=require(_0x59f3b2(0x146)),T=require(_0x59f3b2(0x105)),g=require(_0x59f3b2(0xec)),R=require(_0x59f3b2(0xfe)),N=require(_0x59f3b2(0xe9)),E=require('rxjs'),O=require(_0x59f3b2(0x164)),q=_0x59f3b2(0x144);var I=(_0x3730d9=>(_0x3730d9[_0x3730d9['OpenOrReOpen']=0x0]=_0x59f3b2(0xeb),_0x3730d9[_0x3730d9[_0x59f3b2(0x14e)]=0x1]=_0x59f3b2(0x14e),_0x3730d9[_0x3730d9[_0x59f3b2(0x156)]=-0x1]=_0x59f3b2(0x156),_0x3730d9))(I||{}),v=(_0x4a9ca0=>(_0x4a9ca0[_0x4a9ca0['Unknown']=0x0]='Unknown',_0x4a9ca0[_0x4a9ca0[_0x59f3b2(0x13f)]=0x1]=_0x59f3b2(0x13f),_0x4a9ca0[_0x4a9ca0[_0x59f3b2(0x11f)]=0x2]='Reply',_0x4a9ca0[_0x4a9ca0['Edit']=0x3]=_0x59f3b2(0x128),_0x4a9ca0[_0x4a9ca0['Delete']=0x4]=_0x59f3b2(0x154),_0x4a9ca0[_0x4a9ca0[_0x59f3b2(0x121)]=0x5]='Solve',_0x4a9ca0[_0x4a9ca0[_0x59f3b2(0x156)]=-0x1]='UNRECOGNIZED',_0x4a9ca0))(v||{});const y=_0x19a465=>c['dayjs'](new Date(+_0x19a465))[_0x59f3b2(0x11d)](_0x59f3b2(0x142)),x=async(_0x4e8d1e,_0x39cf9f)=>{const _0x28e7df=_0x59f3b2,_0x10cc5a=_0x4e8d1e['get'](c['UserManagerService']),_0x2228ba=_0x4e8d1e[_0x28e7df(0x100)](O[_0x28e7df(0xfb)]);_0x39cf9f['forEach'](_0x69230=>{const _0x55f69c=_0x28e7df;_0x10cc5a[_0x55f69c(0x16d)](_0x69230)&&_0x39cf9f[_0x55f69c(0x106)](_0x69230);}),_0x39cf9f[_0x28e7df(0x120)]&&(await _0x2228ba['get'](_0x28e7df(0x161),{'params':{'userIDs':[..._0x39cf9f]}}))[_0x28e7df(0x148)]['users']['forEach'](_0x21d96b=>{const _0x272d88=_0x28e7df;_0x21d96b&&_0x10cc5a[_0x272d88(0x124)](_0x21d96b);});};var Y=Object[_0x59f3b2(0x139)],G=Object[_0x59f3b2(0x15d)],H=(_0x58e4a8,_0x36fe64,_0x529a58,_0x2f3908)=>{for(var _0x45c6ad=_0x2f3908>0x1?void 0x0:_0x2f3908?G(_0x36fe64,_0x529a58):_0x36fe64,_0x451fc7=_0x58e4a8['length']-0x1,_0x157883;_0x451fc7>=0x0;_0x451fc7--)(_0x157883=_0x58e4a8[_0x451fc7])&&(_0x45c6ad=(_0x2f3908?_0x157883(_0x36fe64,_0x529a58,_0x45c6ad):_0x157883(_0x45c6ad))||_0x45c6ad);return _0x2f3908&&_0x45c6ad&&Y(_0x36fe64,_0x529a58,_0x45c6ad),_0x45c6ad;},p=(_0x1daeef,_0x44a1f7)=>(_0x58d31d,_0x33f2a6)=>_0x44a1f7(_0x58d31d,_0x33f2a6,_0x1daeef);let f=class extends c[_0x59f3b2(0xfa)]{constructor(_0x1d42fc,_0x4ad309,_0x1f4c89,_0x19a1f0){const _0x514936=_0x59f3b2;super(),this[_0x514936(0x16c)]=_0x1d42fc,this[_0x514936(0x135)]=_0x4ad309,this[_0x514936(0x103)]=_0x1f4c89,this[_0x514936(0xea)]=_0x19a1f0,this[_0x514936(0x12a)](),this['_initUserSync']();}['_initUserSync'](){const _0x546de7=_0x59f3b2;this['disposeWithMe'](this[_0x546de7(0x135)][_0x546de7(0x109)]['pipe'](E[_0x546de7(0x11c)](0x10))[_0x546de7(0x174)](_0xc48d1b=>{const _0x5c5b77=_0x546de7,_0x3ea2d9=new Set();_0xc48d1b[_0x5c5b77(0x102)](_0x3f21bc=>{const _0x4a3df0=_0x5c5b77;switch(_0x3f21bc[_0x4a3df0(0x16b)]){case _0x4a3df0(0xf5):{const _0xb16c10=_0x3f21bc['payload']['personId'];_0x3ea2d9['add'](_0xb16c10);break;}}}),x(this[_0x5c5b77(0xea)],_0x3ea2d9);}));}[_0x59f3b2(0x12a)](){const _0x2521f5=_0x59f3b2;this[_0x2521f5(0x175)](this[_0x2521f5(0x16c)][_0x2521f5(0x109)]['subscribe'](async _0x11efc5=>{const _0x51cf9a=_0x2521f5;var _0x453f78,_0x455b7b,_0x28a413,_0x250bc3;const _0x1132fb=(_0x453f78=this[_0x51cf9a(0x135)][_0x51cf9a(0x101)](_0x11efc5['unitId'])['find'](_0x4e56de=>_0x4e56de[_0x51cf9a(0xe8)]===_0x11efc5[_0x51cf9a(0xe8)]))==null?void 0x0:_0x453f78[_0x51cf9a(0x163)];if(!_0x1132fb)return;const {unitId:_0x4be687,subUnitId:_0x330ab6}=_0x1132fb;switch(_0x11efc5[_0x51cf9a(0x12c)]&&this[_0x51cf9a(0x103)][_0x51cf9a(0x124)](_0x11efc5[_0x51cf9a(0x12c)]),_0x11efc5['type']){case v[_0x51cf9a(0x13f)]:break;case v['Reply']:{this[_0x51cf9a(0x135)]['addComment'](_0x4be687,_0x330ab6,{'unitId':_0x4be687,'subUnitId':_0x330ab6,'ref':'','id':_0x11efc5[_0x51cf9a(0x150)],'dT':y(+_0x11efc5['createTimestamp']),'threadId':_0x11efc5[_0x51cf9a(0xe8)],'personId':(_0x28a413=(_0x455b7b=_0x11efc5[_0x51cf9a(0x12c)])==null?void 0x0:_0x455b7b['userID'])!=null?_0x28a413:_0x11efc5[_0x51cf9a(0x108)],'text':JSON[_0x51cf9a(0x114)](_0x11efc5[_0x51cf9a(0x116)]),'parentId':_0x1132fb['id']});break;}case v[_0x51cf9a(0x154)]:{const _0x5c0b9a=this[_0x51cf9a(0x135)]['getComment'](_0x4be687,_0x330ab6,_0x11efc5[_0x51cf9a(0x150)]);_0x5c0b9a&&_0x5c0b9a[_0x51cf9a(0x12d)]&&this[_0x51cf9a(0x135)][_0x51cf9a(0x171)](_0x4be687,_0x330ab6,_0x11efc5[_0x51cf9a(0x150)]);break;}case v[_0x51cf9a(0x128)]:{this[_0x51cf9a(0x135)]['updateComment'](_0x4be687,_0x330ab6,{'commentId':_0x11efc5['replyId'],'text':JSON[_0x51cf9a(0x114)](_0x11efc5[_0x51cf9a(0x116)])});break;}case v[_0x51cf9a(0x121)]:{const _0x4b95fe=(_0x250bc3=this[_0x51cf9a(0x135)][_0x51cf9a(0x101)](_0x11efc5[_0x51cf9a(0x145)])[_0x51cf9a(0x10b)](_0x306597=>_0x306597[_0x51cf9a(0xe8)]===_0x11efc5[_0x51cf9a(0xe8)]))==null?void 0x0:_0x250bc3[_0x51cf9a(0x163)];_0x4b95fe&&this[_0x51cf9a(0x135)]['resolveComment'](_0x4be687,_0x330ab6,_0x4b95fe['id'],_0x11efc5['solved']===I[_0x51cf9a(0x14e)]);break;}}}));}};f=H([p(0x0,c[_0x59f3b2(0x141)](g[_0x59f3b2(0x111)])),p(0x1,c['Inject'](N[_0x59f3b2(0x113)])),p(0x2,c[_0x59f3b2(0x141)](c[_0x59f3b2(0xf7)])),p(0x3,c[_0x59f3b2(0x141)](c[_0x59f3b2(0x133)]))],f);const A=_0x59f3b2(0x15b),J={};var L=Object['defineProperty'],F=Object['getOwnPropertyDescriptor'],Z=(_0x56b905,_0x2e3cf4,_0x2cec60,_0x4fa45d)=>{const _0x12e8c0=_0x59f3b2;for(var _0x18e58e=_0x4fa45d>0x1?void 0x0:_0x4fa45d?F(_0x2e3cf4,_0x2cec60):_0x2e3cf4,_0x54bb79=_0x56b905[_0x12e8c0(0xfc)]-0x1,_0x1d693b;_0x54bb79>=0x0;_0x54bb79--)(_0x1d693b=_0x56b905[_0x54bb79])&&(_0x18e58e=(_0x4fa45d?_0x1d693b(_0x2e3cf4,_0x2cec60,_0x18e58e):_0x1d693b(_0x18e58e))||_0x18e58e);return _0x4fa45d&&_0x18e58e&&L(_0x2e3cf4,_0x2cec60,_0x18e58e),_0x18e58e;},_=(_0x58c802,_0x1e9e48)=>(_0x64daa5,_0x4b048c)=>_0x1e9e48(_0x64daa5,_0x4b048c,_0x58c802);function W(_0x2015ef,_0x568d20){const _0x4b1c56=_0x59f3b2,_0x3f7d7e=_0x2015ef['replies'][0x0];return{..._0x568d20,'id':_0x3f7d7e[_0x4b1c56(0x150)],'resolved':_0x2015ef[_0x4b1c56(0x13c)]===0x1,'dT':y(_0x3f7d7e[_0x4b1c56(0x127)]),'personId':_0x3f7d7e[_0x4b1c56(0x108)],'threadId':_0x3f7d7e['threadId']};}function z(_0x288c62,_0x11538d,_0x20772d){const _0x16d46f=_0x59f3b2;var _0x51b150,_0x27e7f3;if(((_0x27e7f3=(_0x51b150=_0x288c62==null?void 0x0:_0x288c62[_0x16d46f(0x15f)])==null?void 0x0:_0x51b150[_0x16d46f(0xfc)])!=null?_0x27e7f3:0x0)>0x0){const _0x22d1a7=(_0x592bb2,_0x38caad)=>({'id':_0x592bb2[_0x16d46f(0x150)],'threadId':_0x592bb2[_0x16d46f(0xe8)],'dT':y(_0x592bb2[_0x16d46f(0x127)]),'personId':_0x592bb2[_0x16d46f(0x108)],'resolved':_0x288c62[_0x16d46f(0x13c)]===I['Solved'],'unitId':_0x11538d,'subUnitId':_0x20772d,'text':JSON[_0x16d46f(0x114)](_0x592bb2[_0x16d46f(0x116)]),'parentId':_0x38caad}),_0x3130ea=_0x22d1a7(_0x288c62[_0x16d46f(0x15f)][0x0]);return{..._0x3130ea,'children':_0x288c62['replies'][_0x16d46f(0x172)](0x1)[_0x16d46f(0x123)](_0x51b243=>_0x22d1a7(_0x51b243,_0x3130ea['id']))};}return null;}function _0x58a9(_0x5c578e,_0x1a8227){const _0x1e881f=_0x1e88();return _0x58a9=function(_0x58a93a,_0x4bf14b){_0x58a93a=_0x58a93a-0xe8;let _0x416347=_0x1e881f[_0x58a93a];return _0x416347;},_0x58a9(_0x5c578e,_0x1a8227);}let b=class{constructor(_0x18e258,_0x3b1951,_0x368ca0,_0x5ea432){const _0x18ce29=_0x59f3b2;this['_httpService']=_0x18e258,this[_0x18ce29(0x103)]=_0x3b1951,this[_0x18ce29(0x119)]=_0x368ca0,this['_injector']=_0x5ea432;}async['addComment'](_0x2fcd96){const _0x54af11=_0x59f3b2;var _0x5793d0,_0x1f3acf;const {parentId:_0x2d35f1,unitId:_0x352229,text:_0x17ec1d,threadId:_0xf65726}=_0x2fcd96,_0x1d99bd=(_0x1f3acf=(_0x5793d0=_0x17ec1d[_0x54af11(0x169)])==null?void 0x0:_0x5793d0[_0x54af11(0x10d)](_0x3012c9=>_0x3012c9[_0x54af11(0x15a)]===c[_0x54af11(0x10f)][_0x54af11(0x137)])[_0x54af11(0x123)](_0x127eb5=>_0x127eb5[_0x54af11(0x14c)]))!=null?_0x1f3acf:[],_0x2a0880=JSON[_0x54af11(0x131)](_0x17ec1d),_0x1fb0fe=(await this['_sessionService'][_0x54af11(0x138)](_0x352229))[_0x54af11(0x10a)]();if(_0x2d35f1){const _0x57f4a9={'memberId':_0x1fb0fe,'unitId':_0x352229,'content':_0x2a0880,'mention':_0x1d99bd,'threadId':_0xf65726},_0x124f9e=(await this[_0x54af11(0x112)][_0x54af11(0x16f)](_0x54af11(0x13a)+_0x352229+_0x54af11(0x16a),{'body':_0x57f4a9}))['body'][_0x54af11(0x166)];return{..._0x2fcd96,'id':_0x124f9e[_0x54af11(0x150)],'dT':c[_0x54af11(0x157)](+_0x124f9e[_0x54af11(0x127)])[_0x54af11(0x11d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x124f9e['userId']};}else{const _0x241b8c={'memberId':_0x1fb0fe,'unitId':_0x352229,'content':_0x2a0880,'mention':_0x1d99bd},_0xdff3d0=await this['_httpService'][_0x54af11(0x16f)](_0x54af11(0x13a)+_0x352229+_0x54af11(0x151),{'body':_0x241b8c});return W(_0xdff3d0[_0x54af11(0x148)][_0x54af11(0x167)],_0x2fcd96);}}async[_0x59f3b2(0xf3)](_0x5ee066){const _0x384a23=_0x59f3b2;var _0x77de45,_0xd0dda3;const {text:_0x3820b5,unitId:_0x574e97}=_0x5ee066,_0x4940a5=(_0xd0dda3=(_0x77de45=_0x3820b5[_0x384a23(0x169)])==null?void 0x0:_0x77de45[_0x384a23(0x10d)](_0x143656=>_0x143656['rangeType']===c[_0x384a23(0x10f)][_0x384a23(0x137)])['map'](_0x317b17=>_0x317b17['rangeId']))!=null?_0xd0dda3:[],_0x4eb258=JSON[_0x384a23(0x131)](_0x3820b5),_0x1353dc=_0x5ee066[_0x384a23(0xe8)],_0x550ef0=_0x5ee066['id'],_0x24fa61={'memberId':(await this[_0x384a23(0x119)]['requireSession'](_0x574e97))['getMemberID'](),'unitId':_0x574e97,'threadId':_0x1353dc,'mention':_0x4940a5,'content':_0x4eb258,'replyId':_0x550ef0},_0x48e40b=await this[_0x384a23(0x112)][_0x384a23(0x16f)]('/universer-api/comment/unit/'+_0x574e97+_0x384a23(0xf6),{'body':_0x24fa61});return!_0x48e40b['body'][_0x384a23(0x104)]||_0x48e40b[_0x384a23(0x148)][_0x384a23(0x104)][_0x384a23(0x125)]===0x1;}async['resolveComment'](_0x67b7e2){const _0x3474c0=_0x59f3b2,{unitId:_0x684ead}=_0x67b7e2,_0x27a989=_0x67b7e2[_0x3474c0(0xe8)],_0x303073={'memberId':this['_userService'][_0x3474c0(0x143)]()[_0x3474c0(0xff)],'unitId':_0x684ead,'threadId':_0x27a989,'solved':_0x67b7e2[_0x3474c0(0x14a)]?I['Solved']:I['OpenOrReOpen']},_0x4122c8=await this['_httpService']['post'](_0x3474c0(0x13a)+_0x684ead+_0x3474c0(0x107),{'body':_0x303073});return!_0x4122c8[_0x3474c0(0x148)][_0x3474c0(0x104)]||_0x4122c8[_0x3474c0(0x148)][_0x3474c0(0x104)][_0x3474c0(0x125)]===0x1;}async[_0x59f3b2(0x171)](_0x307cc1,_0x18fb81,_0x169d4c,_0x223d11){const _0x2217e9=_0x59f3b2,_0x3af86e={'memberId':(await this['_sessionService'][_0x2217e9(0x138)](_0x307cc1))[_0x2217e9(0x10a)](),'threadId':_0x169d4c,'replyId':_0x223d11,'unitId':_0x307cc1},_0xfb8f4b=await this[_0x2217e9(0x112)][_0x2217e9(0x16f)](_0x2217e9(0x13a)+_0x307cc1+'/delete',{'body':_0x3af86e});return!_0xfb8f4b[_0x2217e9(0x148)][_0x2217e9(0x104)]||_0xfb8f4b[_0x2217e9(0x148)][_0x2217e9(0x104)][_0x2217e9(0x125)]===0x1;}async[_0x59f3b2(0x122)](_0x300d53,_0x8609a0,_0x46ff63){const _0x3e16a3=_0x59f3b2,_0x5a1aed={'unitId':_0x300d53,'threadId':_0x46ff63},_0x99c4d6=await this[_0x3e16a3(0x112)][_0x3e16a3(0x16f)](_0x3e16a3(0x13a)+_0x300d53+'/list',{'body':_0x5a1aed}),_0x445b54=_0x46ff63[_0x3e16a3(0x123)](_0x5d787d=>z(_0x99c4d6['body'][_0x3e16a3(0x10e)][_0x5d787d],_0x300d53,_0x8609a0))['filter'](Boolean);return Object['values'](_0x99c4d6[_0x3e16a3(0x148)][_0x3e16a3(0x10c)])[_0x3e16a3(0x102)](_0x432792=>{const _0xbbcc97=_0x3e16a3;this[_0xbbcc97(0x103)][_0xbbcc97(0x124)](_0x432792);}),_0x445b54;}[_0x59f3b2(0x13e)](_0x2e5cc4){const _0x1bd3e3=_0x59f3b2;return{'id':_0x2e5cc4['id'],'threadId':_0x2e5cc4[_0x1bd3e3(0xe8)],'ref':_0x2e5cc4[_0x1bd3e3(0x159)]};}};b=Z([_(0x0,c[_0x59f3b2(0x141)](O[_0x59f3b2(0xfb)])),_(0x1,c[_0x59f3b2(0x141)](c['UserManagerService'])),_(0x2,c[_0x59f3b2(0x141)](g[_0x59f3b2(0x12f)])),_(0x3,c[_0x59f3b2(0x141)](c[_0x59f3b2(0x133)]))],b);var B=Object[_0x59f3b2(0x139)],K=Object[_0x59f3b2(0x15d)],V=(_0x480b65,_0x5c3814,_0x3a3737,_0x4e631c)=>{const _0xa1129a=_0x59f3b2;for(var _0x3da29e=_0x4e631c>0x1?void 0x0:_0x4e631c?K(_0x5c3814,_0x3a3737):_0x5c3814,_0x1f6349=_0x480b65[_0xa1129a(0xfc)]-0x1,_0x27d238;_0x1f6349>=0x0;_0x1f6349--)(_0x27d238=_0x480b65[_0x1f6349])&&(_0x3da29e=(_0x4e631c?_0x27d238(_0x5c3814,_0x3a3737,_0x3da29e):_0x27d238(_0x3da29e))||_0x3da29e);return _0x4e631c&&_0x3da29e&&B(_0x5c3814,_0x3a3737,_0x3da29e),_0x3da29e;},Q=(_0x1f023e,_0x5c7f42)=>(_0x914754,_0xf95e78)=>_0x5c7f42(_0x914754,_0xf95e78,_0x1f023e);let C=class{constructor(_0x4ec9a2){this['_httpService']=_0x4ec9a2;}async[_0x59f3b2(0x158)](_0x514ab0,_0x1de753,_0x1d305f){const _0x8735dc=_0x59f3b2,_0xf3f2df=new URL(window['location'][_0x8735dc(0x15e)])[_0x8735dc(0x160)][_0x8735dc(0x100)](_0x8735dc(0x14d));if(!_0xf3f2df)return[];const _0xc0aa23=window[_0x8735dc(0x134)][_0x8735dc(0x129)],_0x39ca72=window[_0x8735dc(0x134)][_0x8735dc(0x170)]==='https:'?_0x8735dc(0x147):_0x8735dc(0x155);return(await this[_0x8735dc(0x112)][_0x8735dc(0x100)](_0x39ca72+'://'+_0xc0aa23+'/universer-api/authz/collaborator',{'params':{'objectID':_0xf3f2df,'unitID':_0xf3f2df}}))[_0x8735dc(0x148)][_0x8735dc(0x126)][_0x8735dc(0x123)](_0x4714de=>{const _0x5bd5f8=_0x8735dc;var _0x44e64e,_0x28a093,_0x3e961d,_0x121ec4,_0x4afb8c,_0x2335e9;return{'id':(_0x28a093=(_0x44e64e=_0x4714de['subject'])==null?void 0x0:_0x44e64e[_0x5bd5f8(0xff)])!=null?_0x28a093:'','label':(_0x121ec4=(_0x3e961d=_0x4714de['subject'])==null?void 0x0:_0x3e961d[_0x5bd5f8(0x14b)])!=null?_0x121ec4:'','icon':(_0x2335e9=(_0x4afb8c=_0x4714de[_0x5bd5f8(0x16e)])==null?void 0x0:_0x4afb8c['avatar'])!=null?_0x2335e9:'','type':'user'};});}};C=V([Q(0x0,c[_0x59f3b2(0x141)](O['HTTPService']))],C);var X=Object[_0x59f3b2(0x139)],k=Object['getOwnPropertyDescriptor'],ee=(_0x3a3f51,_0x53f81a,_0x42eb1e,_0x4bbcda)=>{const _0x387e19=_0x59f3b2;for(var _0x54e273=_0x4bbcda>0x1?void 0x0:_0x4bbcda?k(_0x53f81a,_0x42eb1e):_0x53f81a,_0x14eb5a=_0x3a3f51[_0x387e19(0xfc)]-0x1,_0x31be6f;_0x14eb5a>=0x0;_0x14eb5a--)(_0x31be6f=_0x3a3f51[_0x14eb5a])&&(_0x54e273=(_0x4bbcda?_0x31be6f(_0x53f81a,_0x42eb1e,_0x54e273):_0x31be6f(_0x54e273))||_0x54e273);return _0x4bbcda&&_0x54e273&&X(_0x53f81a,_0x42eb1e,_0x54e273),_0x54e273;},S=(_0x5d6968,_0x11d4f7)=>(_0x12cff6,_0x17ab63)=>_0x11d4f7(_0x12cff6,_0x17ab63,_0x5d6968);let D=class extends c[_0x59f3b2(0xfa)]{constructor(_0x38e9ea,_0x34675b,_0x934051,_0x1b970c){const _0x1611ae=_0x59f3b2;super(),this[_0x1611ae(0x173)]=_0x38e9ea,this[_0x1611ae(0x149)]=_0x34675b,this[_0x1611ae(0x15c)]=_0x934051,this['_threadCommentMentionDataSource']=_0x1b970c,this[_0x1611ae(0xee)]();}[_0x59f3b2(0xee)](){const _0x1d825f=_0x59f3b2;this[_0x1d825f(0x173)][_0x1d825f(0x136)]=this['_threadCommentDataSource'],this[_0x1d825f(0x173)][_0x1d825f(0x115)]=!0x1,this[_0x1d825f(0x15c)][_0x1d825f(0x136)]=this[_0x1d825f(0x162)];}};D=ee([S(0x0,N[_0x59f3b2(0xed)]),S(0x1,c['Inject'](b)),S(0x2,T[_0x59f3b2(0xef)]),S(0x3,c[_0x59f3b2(0x141)](C))],D);var $=Object['defineProperty'],re=Object[_0x59f3b2(0x15d)],te=(_0x3f3aaf,_0x299a4c,_0x4151a2)=>_0x299a4c in _0x3f3aaf?$(_0x3f3aaf,_0x299a4c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4151a2}):_0x3f3aaf[_0x299a4c]=_0x4151a2,ne=(_0x3398ba,_0x49a03f,_0x5d0131,_0x1ad031)=>{const _0x28e7a9=_0x59f3b2;for(var _0x40beda=_0x1ad031>0x1?void 0x0:_0x1ad031?re(_0x49a03f,_0x5d0131):_0x49a03f,_0x436862=_0x3398ba[_0x28e7a9(0xfc)]-0x1,_0x29742a;_0x436862>=0x0;_0x436862--)(_0x29742a=_0x3398ba[_0x436862])&&(_0x40beda=(_0x1ad031?_0x29742a(_0x49a03f,_0x5d0131,_0x40beda):_0x29742a(_0x40beda))||_0x40beda);return _0x1ad031&&_0x40beda&&$(_0x49a03f,_0x5d0131,_0x40beda),_0x40beda;},w=(_0x1f1a42,_0x522888)=>(_0xaf76ae,_0x23ac27)=>_0x522888(_0xaf76ae,_0x23ac27,_0x1f1a42),U=(_0x2c8e69,_0x272939,_0x5e8c4b)=>te(_0x2c8e69,typeof _0x272939!='symbol'?_0x272939+'':_0x272939,_0x5e8c4b);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x59f3b2(0x140)]{constructor(_0x37a806=J,_0x5b87af,_0x19dee7){const _0x1edff4=_0x59f3b2;super(),this[_0x1edff4(0xf1)]=_0x37a806,this[_0x1edff4(0xea)]=_0x5b87af,this[_0x1edff4(0x14f)]=_0x19dee7;const {..._0xf5ff53}=this['_config'];this[_0x1edff4(0x14f)][_0x1edff4(0xf2)](A,_0xf5ff53);}[_0x59f3b2(0x153)](){const _0x206f4d=_0x59f3b2;[[C],[b],[D],[f]][_0x206f4d(0x102)](_0xe5b93f=>{const _0x3bc807=_0x206f4d;this['_injector'][_0x3bc807(0xf5)](_0xe5b93f);});}[_0x59f3b2(0x110)](){const _0x5e7f1b=_0x59f3b2;this['_injector'][_0x5e7f1b(0x100)](D),this[_0x5e7f1b(0xea)][_0x5e7f1b(0x100)](f);}},U(exports[_0x59f3b2(0xf8)],_0x59f3b2(0x12e),q),U(exports['UniverThreadCommentDataSourcePlugin'],_0x59f3b2(0x16b),c['UniverInstanceType'][_0x59f3b2(0x165)]),exports[_0x59f3b2(0xf8)]=ne([c[_0x59f3b2(0x168)](T[_0x59f3b2(0xf4)],g['UniverCollaborationClientPlugin'],R[_0x59f3b2(0xf9)]),w(0x1,c[_0x59f3b2(0x141)](c[_0x59f3b2(0x133)])),w(0x2,c[_0x59f3b2(0x13d)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x165411=_0x18bf;function _0x18bf(_0xba645b,_0x495351){const _0x53798b=_0x5379();return _0x18bf=function(_0x18bf21,_0x25ccad){_0x18bf21=_0x18bf21-0xd4;let _0x54cb6d=_0x53798b[_0x18bf21];return _0x54cb6d;},_0x18bf(_0xba645b,_0x495351);}(function(_0x294a95,_0x45e0ba){const _0xeb0f8c=_0x18bf,_0x199a50=_0x294a95();while(!![]){try{const _0x5897f1=-parseInt(_0xeb0f8c(0x133))/0x1*(parseInt(_0xeb0f8c(0xf3))/0x2)+parseInt(_0xeb0f8c(0x10b))/0x3+parseInt(_0xeb0f8c(0x11b))/0x4+-parseInt(_0xeb0f8c(0x135))/0x5*(parseInt(_0xeb0f8c(0x103))/0x6)+-parseInt(_0xeb0f8c(0x140))/0x7+-parseInt(_0xeb0f8c(0x14a))/0x8+parseInt(_0xeb0f8c(0xe9))/0x9;if(_0x5897f1===_0x45e0ba)break;else _0x199a50['push'](_0x199a50['shift']());}catch(_0x13843e){_0x199a50['push'](_0x199a50['shift']());}}}(_0x5379,0x4e21e));import{dayjs as _0x544f73,UserManagerService as _0x56c9a5,Inject as _0x5ab968,Injector as _0x5c5722,Disposable as _0x51407a,CustomRangeType as _0x5104b1,UniverInstanceType as _0x43d71a,DependentOn as _0x34ac7a,Plugin as _0x63f8d0,IConfigService as _0x4621aa}from'@univerjs/core';import{IThreadCommentMentionDataService as _0x589933,UniverThreadCommentUIPlugin as _0x226a7b}from'@univerjs/thread-comment-ui';import{CommentService as _0xfb42c5,CollaborationSessionService as _0x56331a,UniverCollaborationClientPlugin as _0x1d6043}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x45aec0}from'@univerjs-pro/license';import{ThreadCommentModel as _0x46983a,IThreadCommentDataSourceService as _0xf55030}from'@univerjs/thread-comment';import{bufferTime as _0x5ee084}from'rxjs';import{HTTPService as _0x24ca9c}from'@univerjs/network';const V=_0x165411(0x13e);var v=(_0x330eef=>(_0x330eef[_0x330eef[_0x165411(0x12f)]=0x0]='OpenOrReOpen',_0x330eef[_0x330eef[_0x165411(0xf7)]=0x1]=_0x165411(0xf7),_0x330eef[_0x330eef[_0x165411(0x130)]=-0x1]=_0x165411(0x130),_0x330eef))(v||{}),p=(_0xf5f7e3=>(_0xf5f7e3[_0xf5f7e3['Unknown']=0x0]=_0x165411(0x102),_0xf5f7e3[_0xf5f7e3[_0x165411(0x145)]=0x1]=_0x165411(0x145),_0xf5f7e3[_0xf5f7e3[_0x165411(0xf8)]=0x2]=_0x165411(0xf8),_0xf5f7e3[_0xf5f7e3[_0x165411(0xf0)]=0x3]=_0x165411(0xf0),_0xf5f7e3[_0xf5f7e3[_0x165411(0x116)]=0x4]=_0x165411(0x116),_0xf5f7e3[_0xf5f7e3[_0x165411(0x10a)]=0x5]=_0x165411(0x10a),_0xf5f7e3[_0xf5f7e3[_0x165411(0x130)]=-0x1]=_0x165411(0x130),_0xf5f7e3))(p||{});const w=_0x768251=>_0x544f73(new Date(+_0x768251))[_0x165411(0xd6)](_0x165411(0x14b)),Q=async(_0x209612,_0x1a1730)=>{const _0x511310=_0x165411,_0x5537e4=_0x209612[_0x511310(0xef)](_0x56c9a5),_0x4afe8a=_0x209612[_0x511310(0xef)](_0x24ca9c);_0x1a1730[_0x511310(0xd9)](_0x42907f=>{const _0x578546=_0x511310;_0x5537e4[_0x578546(0x12e)](_0x42907f)&&_0x1a1730['delete'](_0x42907f);}),_0x1a1730['size']&&(await _0x4afe8a['get'](_0x511310(0xed),{'params':{'userIDs':[..._0x1a1730]}}))[_0x511310(0xec)][_0x511310(0x13b)][_0x511310(0xd9)](_0x363c33=>{_0x363c33&&_0x5537e4['addUser'](_0x363c33);});};var X=Object[_0x165411(0x125)],k=Object['getOwnPropertyDescriptor'],ee=(_0x4a6bff,_0x3946e5,_0x4885bf,_0x4222c4)=>{const _0x2d9936=_0x165411;for(var _0x32d07d=_0x4222c4>0x1?void 0x0:_0x4222c4?k(_0x3946e5,_0x4885bf):_0x3946e5,_0x2b8234=_0x4a6bff[_0x2d9936(0x149)]-0x1,_0x1306f0;_0x2b8234>=0x0;_0x2b8234--)(_0x1306f0=_0x4a6bff[_0x2b8234])&&(_0x32d07d=(_0x4222c4?_0x1306f0(_0x3946e5,_0x4885bf,_0x32d07d):_0x1306f0(_0x32d07d))||_0x32d07d);return _0x4222c4&&_0x32d07d&&X(_0x3946e5,_0x4885bf,_0x32d07d),_0x32d07d;},_=(_0x1e5e63,_0x4a9957)=>(_0x23837e,_0x1f05c8)=>_0x4a9957(_0x23837e,_0x1f05c8,_0x1e5e63);let S=class extends _0x51407a{constructor(_0x5b36dd,_0x36574a,_0x4b7640,_0x578ed6){const _0x4295c0=_0x165411;super(),this[_0x4295c0(0x129)]=_0x5b36dd,this[_0x4295c0(0x114)]=_0x36574a,this[_0x4295c0(0x131)]=_0x4b7640,this[_0x4295c0(0x11d)]=_0x578ed6,this[_0x4295c0(0x113)](),this[_0x4295c0(0xdf)]();}[_0x165411(0xdf)](){const _0x2dbd46=_0x165411;this[_0x2dbd46(0xeb)](this['_threadCommentModel'][_0x2dbd46(0xff)][_0x2dbd46(0x13d)](_0x5ee084(0x10))[_0x2dbd46(0x127)](_0x56e1db=>{const _0x17c5ba=_0x2dbd46,_0x45fb07=new Set();_0x56e1db['forEach'](_0x2672e7=>{const _0x3282ca=_0x18bf;switch(_0x2672e7[_0x3282ca(0xda)]){case'add':{const _0x164a97=_0x2672e7[_0x3282ca(0xdb)]['personId'];_0x45fb07[_0x3282ca(0x119)](_0x164a97);break;}}}),Q(this[_0x17c5ba(0x11d)],_0x45fb07);}));}[_0x165411(0x113)](){const _0x3e5eed=_0x165411;this[_0x3e5eed(0xeb)](this[_0x3e5eed(0x129)][_0x3e5eed(0xff)]['subscribe'](async _0x2f4b27=>{const _0x5869e3=_0x3e5eed;var _0x3e9050,_0x598eea,_0x2e104f,_0x1ac57e;const _0x208455=(_0x3e9050=this[_0x5869e3(0x114)][_0x5869e3(0x110)](_0x2f4b27[_0x5869e3(0x134)])[_0x5869e3(0x143)](_0x9a39b6=>_0x9a39b6[_0x5869e3(0xf5)]===_0x2f4b27[_0x5869e3(0xf5)]))==null?void 0x0:_0x3e9050[_0x5869e3(0x13f)];if(!_0x208455)return;const {unitId:_0x215a67,subUnitId:_0x1acf01}=_0x208455;switch(_0x2f4b27[_0x5869e3(0x104)]&&this[_0x5869e3(0x131)][_0x5869e3(0x11e)](_0x2f4b27['user']),_0x2f4b27[_0x5869e3(0xda)]){case p['Add']:break;case p[_0x5869e3(0xf8)]:{this['_threadCommentModel'][_0x5869e3(0x128)](_0x215a67,_0x1acf01,{'unitId':_0x215a67,'subUnitId':_0x1acf01,'ref':'','id':_0x2f4b27[_0x5869e3(0xd7)],'dT':w(+_0x2f4b27[_0x5869e3(0xde)]),'threadId':_0x2f4b27[_0x5869e3(0xf5)],'personId':(_0x2e104f=(_0x598eea=_0x2f4b27[_0x5869e3(0x104)])==null?void 0x0:_0x598eea['userID'])!=null?_0x2e104f:_0x2f4b27['userId'],'text':JSON[_0x5869e3(0xe1)](_0x2f4b27['content']),'parentId':_0x208455['id']});break;}case p[_0x5869e3(0x116)]:{const _0x30f86e=this['_threadCommentModel'][_0x5869e3(0x10f)](_0x215a67,_0x1acf01,_0x2f4b27[_0x5869e3(0xd7)]);_0x30f86e&&_0x30f86e[_0x5869e3(0x11f)]&&this['_threadCommentModel']['deleteComment'](_0x215a67,_0x1acf01,_0x2f4b27[_0x5869e3(0xd7)]);break;}case p[_0x5869e3(0xf0)]:{this[_0x5869e3(0x114)][_0x5869e3(0xfc)](_0x215a67,_0x1acf01,{'commentId':_0x2f4b27[_0x5869e3(0xd7)],'text':JSON[_0x5869e3(0xe1)](_0x2f4b27[_0x5869e3(0x105)])});break;}case p['Solve']:{const _0x4ef376=(_0x1ac57e=this[_0x5869e3(0x114)]['getUnit'](_0x2f4b27['unitId'])[_0x5869e3(0x143)](_0x499b0e=>_0x499b0e[_0x5869e3(0xf5)]===_0x2f4b27[_0x5869e3(0xf5)]))==null?void 0x0:_0x1ac57e['root'];_0x4ef376&&this[_0x5869e3(0x114)]['resolveComment'](_0x215a67,_0x1acf01,_0x4ef376['id'],_0x2f4b27[_0x5869e3(0x117)]===v[_0x5869e3(0xf7)]);break;}}}));}};S=ee([_(0x0,_0x5ab968(_0xfb42c5)),_(0x1,_0x5ab968(_0x46983a)),_(0x2,_0x5ab968(_0x56c9a5)),_(0x3,_0x5ab968(_0x5c5722))],S);const re='thread-comment-data-source.config',te={};var se=Object['defineProperty'],oe=Object[_0x165411(0x126)],ne=(_0x3cc503,_0x1fb04f,_0x5340e4,_0x3c6d0d)=>{const _0xe0dc2b=_0x165411;for(var _0x29eee7=_0x3c6d0d>0x1?void 0x0:_0x3c6d0d?oe(_0x1fb04f,_0x5340e4):_0x1fb04f,_0x31a76d=_0x3cc503[_0xe0dc2b(0x149)]-0x1,_0x54ec03;_0x31a76d>=0x0;_0x31a76d--)(_0x54ec03=_0x3cc503[_0x31a76d])&&(_0x29eee7=(_0x3c6d0d?_0x54ec03(_0x1fb04f,_0x5340e4,_0x29eee7):_0x54ec03(_0x29eee7))||_0x29eee7);return _0x3c6d0d&&_0x29eee7&&se(_0x1fb04f,_0x5340e4,_0x29eee7),_0x29eee7;},I=(_0x760781,_0x445533)=>(_0x30a22b,_0x25ad8d)=>_0x445533(_0x30a22b,_0x25ad8d,_0x760781);function ie(_0xeef66d,_0x55877c){const _0x2625f7=_0x165411,_0x4c4a36=_0xeef66d[_0x2625f7(0x137)][0x0];return{..._0x55877c,'id':_0x4c4a36['replyId'],'resolved':_0xeef66d[_0x2625f7(0x117)]===0x1,'dT':w(_0x4c4a36['createTimestamp']),'personId':_0x4c4a36[_0x2625f7(0xe3)],'threadId':_0x4c4a36[_0x2625f7(0xf5)]};}function ae(_0x346a91,_0x55bebb,_0x5a77ec){const _0x388900=_0x165411;var _0x136949,_0x34fdd3;if(((_0x34fdd3=(_0x136949=_0x346a91==null?void 0x0:_0x346a91[_0x388900(0x137)])==null?void 0x0:_0x136949[_0x388900(0x149)])!=null?_0x34fdd3:0x0)>0x0){const _0x1e132b=(_0x4011a3,_0x1356f2)=>({'id':_0x4011a3[_0x388900(0xd7)],'threadId':_0x4011a3[_0x388900(0xf5)],'dT':w(_0x4011a3[_0x388900(0xde)]),'personId':_0x4011a3[_0x388900(0xe3)],'resolved':_0x346a91[_0x388900(0x117)]===v[_0x388900(0xf7)],'unitId':_0x55bebb,'subUnitId':_0x5a77ec,'text':JSON[_0x388900(0xe1)](_0x4011a3[_0x388900(0x105)]),'parentId':_0x1356f2}),_0x2151ac=_0x1e132b(_0x346a91[_0x388900(0x137)][0x0]);return{..._0x2151ac,'children':_0x346a91[_0x388900(0x137)]['slice'](0x1)[_0x388900(0x11c)](_0x428381=>_0x1e132b(_0x428381,_0x2151ac['id']))};}return null;}let b=class{constructor(_0x1a3527,_0x12f004,_0x4164a4,_0x3d70f9){const _0x15b15c=_0x165411;this[_0x15b15c(0x101)]=_0x1a3527,this[_0x15b15c(0x131)]=_0x12f004,this['_sessionService']=_0x4164a4,this[_0x15b15c(0x11d)]=_0x3d70f9;}async[_0x165411(0x128)](_0xbe2ba2){const _0x1d8722=_0x165411;var _0x5ba066,_0x935f8d;const {parentId:_0x4067b9,unitId:_0x281065,text:_0xcffbb9,threadId:_0x4841d5}=_0xbe2ba2,_0x3e1fdc=(_0x935f8d=(_0x5ba066=_0xcffbb9[_0x1d8722(0xe0)])==null?void 0x0:_0x5ba066[_0x1d8722(0x108)](_0x34d78f=>_0x34d78f[_0x1d8722(0xe6)]===_0x5104b1[_0x1d8722(0x148)])[_0x1d8722(0x11c)](_0x4e3028=>_0x4e3028[_0x1d8722(0x141)]))!=null?_0x935f8d:[],_0x54783c=JSON[_0x1d8722(0xe5)](_0xcffbb9),_0x35bf6a=(await this[_0x1d8722(0x132)][_0x1d8722(0xf4)](_0x281065))['getMemberID']();if(_0x4067b9){const _0x2c0ac0={'memberId':_0x35bf6a,'unitId':_0x281065,'content':_0x54783c,'mention':_0x3e1fdc,'threadId':_0x4841d5},_0x4f5d51=(await this[_0x1d8722(0x101)]['post'](_0x1d8722(0x147)+_0x281065+_0x1d8722(0x12d),{'body':_0x2c0ac0}))['body'][_0x1d8722(0xf9)];return{..._0xbe2ba2,'id':_0x4f5d51[_0x1d8722(0xd7)],'dT':_0x544f73(+_0x4f5d51[_0x1d8722(0xde)])['format'](_0x1d8722(0x14b)),'personId':_0x4f5d51['userId']};}else{const _0x2f6a7d={'memberId':_0x35bf6a,'unitId':_0x281065,'content':_0x54783c,'mention':_0x3e1fdc},_0x3f8ed5=await this[_0x1d8722(0x101)][_0x1d8722(0xf2)](_0x1d8722(0x147)+_0x281065+_0x1d8722(0xdd),{'body':_0x2f6a7d});return ie(_0x3f8ed5[_0x1d8722(0xec)][_0x1d8722(0xe7)],_0xbe2ba2);}}async[_0x165411(0xfc)](_0x5d04ad){const _0x5550d9=_0x165411;var _0x3f4f20,_0x221776;const {text:_0x1b2fbe,unitId:_0x4db564}=_0x5d04ad,_0x140e92=(_0x221776=(_0x3f4f20=_0x1b2fbe['customRanges'])==null?void 0x0:_0x3f4f20['filter'](_0x1a836f=>_0x1a836f['rangeType']===_0x5104b1[_0x5550d9(0x148)])['map'](_0x99090=>_0x99090[_0x5550d9(0x141)]))!=null?_0x221776:[],_0x408836=JSON[_0x5550d9(0xe5)](_0x1b2fbe),_0x2969a6=_0x5d04ad[_0x5550d9(0xf5)],_0x51b473=_0x5d04ad['id'],_0x33a6f0={'memberId':(await this['_sessionService'][_0x5550d9(0xf4)](_0x4db564))[_0x5550d9(0xd5)](),'unitId':_0x4db564,'threadId':_0x2969a6,'mention':_0x140e92,'content':_0x408836,'replyId':_0x51b473},_0x4861d9=await this[_0x5550d9(0x101)][_0x5550d9(0xf2)](_0x5550d9(0x147)+_0x4db564+_0x5550d9(0x136),{'body':_0x33a6f0});return!_0x4861d9[_0x5550d9(0xec)][_0x5550d9(0xdc)]||_0x4861d9[_0x5550d9(0xec)][_0x5550d9(0xdc)]['code']===0x1;}async[_0x165411(0x112)](_0x871a6f){const _0x5a9760=_0x165411,{unitId:_0xf78653}=_0x871a6f,_0x4ee483=_0x871a6f[_0x5a9760(0xf5)],_0x21913f={'memberId':this[_0x5a9760(0x131)][_0x5a9760(0x10e)]()[_0x5a9760(0x142)],'unitId':_0xf78653,'threadId':_0x4ee483,'solved':_0x871a6f[_0x5a9760(0x109)]?v[_0x5a9760(0xf7)]:v[_0x5a9760(0x12f)]},_0x6bbff9=await this[_0x5a9760(0x101)][_0x5a9760(0xf2)](_0x5a9760(0x147)+_0xf78653+_0x5a9760(0x13a),{'body':_0x21913f});return!_0x6bbff9['body'][_0x5a9760(0xdc)]||_0x6bbff9[_0x5a9760(0xec)]['error'][_0x5a9760(0xfa)]===0x1;}async[_0x165411(0x121)](_0x27bc5f,_0x31d4d1,_0x4f6df9,_0x1f8de8){const _0x1cb491=_0x165411,_0x2357a1={'memberId':(await this[_0x1cb491(0x132)][_0x1cb491(0xf4)](_0x27bc5f))['getMemberID'](),'threadId':_0x4f6df9,'replyId':_0x1f8de8,'unitId':_0x27bc5f},_0x8cfb01=await this[_0x1cb491(0x101)][_0x1cb491(0xf2)]('/universer-api/comment/unit/'+_0x27bc5f+_0x1cb491(0x10c),{'body':_0x2357a1});return!_0x8cfb01[_0x1cb491(0xec)][_0x1cb491(0xdc)]||_0x8cfb01[_0x1cb491(0xec)][_0x1cb491(0xdc)][_0x1cb491(0xfa)]===0x1;}async[_0x165411(0x124)](_0x3a87f0,_0x5ec09c,_0x103c66){const _0x5d320b=_0x165411,_0x94ea2e={'unitId':_0x3a87f0,'threadId':_0x103c66},_0x341a14=await this[_0x5d320b(0x101)][_0x5d320b(0xf2)](_0x5d320b(0x147)+_0x3a87f0+_0x5d320b(0xf1),{'body':_0x94ea2e}),_0x182772=_0x103c66[_0x5d320b(0x11c)](_0x3c748f=>ae(_0x341a14['body'][_0x5d320b(0xe8)][_0x3c748f],_0x3a87f0,_0x5ec09c))[_0x5d320b(0x108)](Boolean);return Object[_0x5d320b(0x12b)](_0x341a14['body'][_0x5d320b(0x13b)])[_0x5d320b(0xd9)](_0x7fb67b=>{const _0x591f5b=_0x5d320b;this[_0x591f5b(0x131)][_0x591f5b(0x11e)](_0x7fb67b);}),_0x182772;}[_0x165411(0x111)](_0x5cf7d7){const _0x5ef43e=_0x165411;return{'id':_0x5cf7d7['id'],'threadId':_0x5cf7d7[_0x5ef43e(0xf5)],'ref':_0x5cf7d7[_0x5ef43e(0x139)]};}};b=ne([I(0x0,_0x5ab968(_0x24ca9c)),I(0x1,_0x5ab968(_0x56c9a5)),I(0x2,_0x5ab968(_0x56331a)),I(0x3,_0x5ab968(_0x5c5722))],b);var ce=Object[_0x165411(0x125)],de=Object[_0x165411(0x126)],me=(_0x45321d,_0x1362ca,_0x2dc45f,_0x3c6ec3)=>{const _0x5451c6=_0x165411;for(var _0x16761f=_0x3c6ec3>0x1?void 0x0:_0x3c6ec3?de(_0x1362ca,_0x2dc45f):_0x1362ca,_0x4e96d7=_0x45321d[_0x5451c6(0x149)]-0x1,_0xd85986;_0x4e96d7>=0x0;_0x4e96d7--)(_0xd85986=_0x45321d[_0x4e96d7])&&(_0x16761f=(_0x3c6ec3?_0xd85986(_0x1362ca,_0x2dc45f,_0x16761f):_0xd85986(_0x16761f))||_0x16761f);return _0x3c6ec3&&_0x16761f&&ce(_0x1362ca,_0x2dc45f,_0x16761f),_0x16761f;},le=(_0x4c81e1,_0x4d8f7f)=>(_0x4db787,_0x5b55eb)=>_0x4d8f7f(_0x4db787,_0x5b55eb,_0x4c81e1);let C=class{constructor(_0x14fc47){const _0x1ac2eb=_0x165411;this[_0x1ac2eb(0x101)]=_0x14fc47;}async[_0x165411(0xea)](_0x22510f,_0x8f0a5a,_0x7300cf){const _0x1becae=_0x165411,_0x2c3add=new URL(window[_0x1becae(0x120)][_0x1becae(0x146)])[_0x1becae(0xfe)][_0x1becae(0xef)](_0x1becae(0xfb));if(!_0x2c3add)return[];const _0x434d9c=window[_0x1becae(0x120)]['host'],_0xa11fc9=window[_0x1becae(0x120)]['protocol']===_0x1becae(0x100)?_0x1becae(0x138):_0x1becae(0xfd);return(await this[_0x1becae(0x101)][_0x1becae(0xef)](_0xa11fc9+'://'+_0x434d9c+_0x1becae(0xe4),{'params':{'objectID':_0x2c3add,'unitID':_0x2c3add}}))[_0x1becae(0xec)][_0x1becae(0x13c)][_0x1becae(0x11c)](_0x34539d=>{const _0x23288b=_0x1becae;var _0x406337,_0x275622,_0x116cac,_0x15b461,_0x4e8410,_0x80ceb6;return{'id':(_0x275622=(_0x406337=_0x34539d['subject'])==null?void 0x0:_0x406337['userID'])!=null?_0x275622:'','label':(_0x15b461=(_0x116cac=_0x34539d['subject'])==null?void 0x0:_0x116cac[_0x23288b(0xf6)])!=null?_0x15b461:'','icon':(_0x80ceb6=(_0x4e8410=_0x34539d[_0x23288b(0x12a)])==null?void 0x0:_0x4e8410[_0x23288b(0x11a)])!=null?_0x80ceb6:'','type':'user'};});}};C=me([le(0x0,_0x5ab968(_0x24ca9c))],C);var he=Object[_0x165411(0x125)],ue=Object[_0x165411(0x126)],pe=(_0x55e4c6,_0x1f7f06,_0x509092,_0x37207d)=>{const _0xee3abb=_0x165411;for(var _0x1ad78b=_0x37207d>0x1?void 0x0:_0x37207d?ue(_0x1f7f06,_0x509092):_0x1f7f06,_0x30f08a=_0x55e4c6[_0xee3abb(0x149)]-0x1,_0xd0389;_0x30f08a>=0x0;_0x30f08a--)(_0xd0389=_0x55e4c6[_0x30f08a])&&(_0x1ad78b=(_0x37207d?_0xd0389(_0x1f7f06,_0x509092,_0x1ad78b):_0xd0389(_0x1ad78b))||_0x1ad78b);return _0x37207d&&_0x1ad78b&&he(_0x1f7f06,_0x509092,_0x1ad78b),_0x1ad78b;},f=(_0x47ce2a,_0x5196d5)=>(_0x32d9d8,_0x27c63d)=>_0x5196d5(_0x32d9d8,_0x27c63d,_0x47ce2a);let D=class extends _0x51407a{constructor(_0xcf4dcf,_0x5f0526,_0x1a3010,_0x3bb97f){const _0x2709e6=_0x165411;super(),this['_threadCommentDataSourceService']=_0xcf4dcf,this[_0x2709e6(0x107)]=_0x5f0526,this[_0x2709e6(0x123)]=_0x1a3010,this[_0x2709e6(0xee)]=_0x3bb97f,this[_0x2709e6(0x10d)]();}[_0x165411(0x10d)](){const _0x39072d=_0x165411;this['_threadCommentDataSourceService']['dataSource']=this[_0x39072d(0x107)],this['_threadCommentDataSourceService'][_0x39072d(0xe2)]=!0x1,this['_threadCommentMentionDataService'][_0x39072d(0x118)]=this['_threadCommentMentionDataSource'];}};D=pe([f(0x0,_0xf55030),f(0x1,_0x5ab968(b)),f(0x2,_0x589933),f(0x3,_0x5ab968(C))],D);var E=Object[_0x165411(0x125)],ve=Object[_0x165411(0x126)],_e=(_0x1a600a,_0x59a3c0,_0x856980)=>_0x59a3c0 in _0x1a600a?E(_0x1a600a,_0x59a3c0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x856980}):_0x1a600a[_0x59a3c0]=_0x856980,Ie=(_0x4c5c28,_0x49eed7,_0x2a2647,_0x3e27c1)=>{const _0x43007d=_0x165411;for(var _0x12c596=_0x3e27c1>0x1?void 0x0:_0x3e27c1?ve(_0x49eed7,_0x2a2647):_0x49eed7,_0x7f534f=_0x4c5c28[_0x43007d(0x149)]-0x1,_0x263566;_0x7f534f>=0x0;_0x7f534f--)(_0x263566=_0x4c5c28[_0x7f534f])&&(_0x12c596=(_0x3e27c1?_0x263566(_0x49eed7,_0x2a2647,_0x12c596):_0x263566(_0x12c596))||_0x12c596);return _0x3e27c1&&_0x12c596&&E(_0x49eed7,_0x2a2647,_0x12c596),_0x12c596;},R=(_0x41f542,_0x3a52a5)=>(_0x352afa,_0x21be60)=>_0x3a52a5(_0x352afa,_0x21be60,_0x41f542),x=(_0x1e48f8,_0x21fdf2,_0x52bbbb)=>_e(_0x1e48f8,typeof _0x21fdf2!=_0x165411(0x144)?_0x21fdf2+'':_0x21fdf2,_0x52bbbb);let g=class extends _0x63f8d0{constructor(_0x4d4519=te,_0x350c7d,_0x7ec1a7){const _0x255e5b=_0x165411;super(),this[_0x255e5b(0xd4)]=_0x4d4519,this[_0x255e5b(0x11d)]=_0x350c7d,this['_configService']=_0x7ec1a7;const {..._0x45dc23}=this[_0x255e5b(0xd4)];this[_0x255e5b(0x122)]['setConfig'](re,_0x45dc23);}[_0x165411(0x12c)](){const _0xdfa7c1=_0x165411;[[C],[b],[D],[S]][_0xdfa7c1(0xd9)](_0x5ebe59=>{const _0x1f6cd3=_0xdfa7c1;this[_0x1f6cd3(0x11d)]['add'](_0x5ebe59);});}[_0x165411(0x106)](){const _0x2bb63f=_0x165411;this[_0x2bb63f(0x11d)]['get'](D),this[_0x2bb63f(0x11d)][_0x2bb63f(0xef)](S);}};x(g,_0x165411(0xd8),V),x(g,_0x165411(0xda),_0x43d71a[_0x165411(0x115)]),g=Ie([_0x34ac7a(_0x226a7b,_0x1d6043,_0x45aec0),R(0x1,_0x5ab968(_0x5c5722)),R(0x2,_0x4621aa)],g);export{g as UniverThreadCommentDataSourcePlugin};function _0x5379(){const _0x31fa2a=['syncUpdateMutationToColla','userId','/universer-api/authz/collaborator','stringify','rangeType','comment','comments','11069433HKwIBG','getMentions','disposeWithMe','body','/universer-api/user/list','_threadCommentMentionDataSource','get','Edit','/list','post','1486Qocmoq','requireSession','threadId','name','Solved','Reply','reply','code','unit','updateComment','http','searchParams','commentUpdate$','https:','_httpService','Unknown','6YkMzJK','user','content','onReady','_threadCommentDataSource','filter','resolved','Solve','1842975csYHbg','/delete','_initDataSource','getCurrentUser','getComment','getUnit','saveCommentToSnapshot','resolveComment','_init','_threadCommentModel','UNIVER_UNKNOWN','Delete','solved','dataSource','add','avatar','483696cNyhRE','map','_injector','addUser','parentId','location','deleteComment','_configService','_threadCommentMentionDataService','listComments','defineProperty','getOwnPropertyDescriptor','subscribe','addComment','_commentService','subject','values','onStarting','/reply','getUser','OpenOrReOpen','UNRECOGNIZED','_userService','_sessionService','829iJwgqN','unitId','2579470BZjBGO','/edit','replies','https','ref','/solved','users','collaborators','pipe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','root','3438883ZvwSBf','rangeId','userID','find','symbol','Add','href','/universer-api/comment/unit/','COMMENT','length','176368hndjwn','YYYY/MM/DD\x20HH:mm','_config','getMemberID','format','replyId','pluginName','forEach','type','payload','error','/add','createTimestamp','_initUserSync','customRanges','parse'];_0x5379=function(){return _0x31fa2a;};return _0x5379();}
1
+ const _0x5116d5=_0x38bd;(function(_0x56585d,_0x2dd86e){const _0x26348e=_0x38bd,_0x37cf85=_0x56585d();while(!![]){try{const _0x433fd6=-parseInt(_0x26348e(0x198))/0x1*(parseInt(_0x26348e(0x164))/0x2)+-parseInt(_0x26348e(0x1bb))/0x3*(-parseInt(_0x26348e(0x1b0))/0x4)+parseInt(_0x26348e(0x17d))/0x5+-parseInt(_0x26348e(0x16b))/0x6*(parseInt(_0x26348e(0x193))/0x7)+parseInt(_0x26348e(0x1a4))/0x8+parseInt(_0x26348e(0x1a6))/0x9+-parseInt(_0x26348e(0x176))/0xa;if(_0x433fd6===_0x2dd86e)break;else _0x37cf85['push'](_0x37cf85['shift']());}catch(_0x5ea45a){_0x37cf85['push'](_0x37cf85['shift']());}}}(_0xcda2,0x3c975));import{dayjs as _0x5b82f9,UserManagerService as _0x5b9fe0,Inject as _0x38a703,Injector as _0x34d019,Disposable as _0x227664,CustomRangeType as _0x406639,UniverInstanceType as _0x56b974,DependentOn as _0x1780b5,Plugin as _0x5cba6c,IConfigService as _0x4303ca}from'@univerjs/core';import{IThreadCommentMentionDataService as _0xe62f37,UniverThreadCommentUIPlugin as _0x8c592c}from'@univerjs/thread-comment-ui';import{CommentService as _0x2d9055,CollaborationSessionService as _0x2c4526,UniverCollaborationClientPlugin as _0x277d0a}from'@univerjs-pro/collaboration-client';function _0x38bd(_0x1f27fc,_0x461b24){const _0xcda28=_0xcda2();return _0x38bd=function(_0x38bdb3,_0x41baca){_0x38bdb3=_0x38bdb3-0x149;let _0x3ebc9b=_0xcda28[_0x38bdb3];return _0x3ebc9b;},_0x38bd(_0x1f27fc,_0x461b24);}import{UniverLicensePlugin as _0x37ac31}from'@univerjs-pro/license';import{ThreadCommentModel as _0x35aab2,IThreadCommentDataSourceService as _0x2b8c4b}from'@univerjs/thread-comment';import{bufferTime as _0x3a969e}from'rxjs';import{HTTPService as _0x2a663e}from'@univerjs/network';const V=_0x5116d5(0x16e);var v=(_0x1a3ea7=>(_0x1a3ea7[_0x1a3ea7[_0x5116d5(0x14d)]=0x0]='OpenOrReOpen',_0x1a3ea7[_0x1a3ea7[_0x5116d5(0x19c)]=0x1]=_0x5116d5(0x19c),_0x1a3ea7[_0x1a3ea7[_0x5116d5(0x199)]=-0x1]=_0x5116d5(0x199),_0x1a3ea7))(v||{}),p=(_0x13e1ed=>(_0x13e1ed[_0x13e1ed[_0x5116d5(0x1af)]=0x0]=_0x5116d5(0x1af),_0x13e1ed[_0x13e1ed['Add']=0x1]=_0x5116d5(0x159),_0x13e1ed[_0x13e1ed['Reply']=0x2]=_0x5116d5(0x156),_0x13e1ed[_0x13e1ed[_0x5116d5(0x18c)]=0x3]=_0x5116d5(0x18c),_0x13e1ed[_0x13e1ed[_0x5116d5(0x18f)]=0x4]='Delete',_0x13e1ed[_0x13e1ed['Solve']=0x5]='Solve',_0x13e1ed[_0x13e1ed[_0x5116d5(0x199)]=-0x1]='UNRECOGNIZED',_0x13e1ed))(p||{});const w=_0x4c7a0e=>_0x5b82f9(new Date(+_0x4c7a0e))[_0x5116d5(0x15a)](_0x5116d5(0x191)),Q=async(_0xc7dd87,_0x5e47d5)=>{const _0x3ca7dc=_0x5116d5,_0xb93b0a=_0xc7dd87[_0x3ca7dc(0x17f)](_0x5b9fe0),_0x456c3e=_0xc7dd87[_0x3ca7dc(0x17f)](_0x2a663e);_0x5e47d5[_0x3ca7dc(0x186)](_0x4011a5=>{const _0x13bf5a=_0x3ca7dc;_0xb93b0a['getUser'](_0x4011a5)&&_0x5e47d5[_0x13bf5a(0x1a9)](_0x4011a5);}),_0x5e47d5['size']&&(await _0x456c3e[_0x3ca7dc(0x17f)](_0x3ca7dc(0x157),{'params':{'userIDs':[..._0x5e47d5]}}))['body'][_0x3ca7dc(0x1b7)]['forEach'](_0x38f3ab=>{const _0x4b7f05=_0x3ca7dc;_0x38f3ab&&_0xb93b0a[_0x4b7f05(0x1ae)](_0x38f3ab);});};var X=Object['defineProperty'],k=Object[_0x5116d5(0x1b5)],ee=(_0xf874b9,_0x4e966d,_0x4f6424,_0x247295)=>{const _0x1cf98b=_0x5116d5;for(var _0x573813=_0x247295>0x1?void 0x0:_0x247295?k(_0x4e966d,_0x4f6424):_0x4e966d,_0x1d0ab6=_0xf874b9[_0x1cf98b(0x149)]-0x1,_0x525aef;_0x1d0ab6>=0x0;_0x1d0ab6--)(_0x525aef=_0xf874b9[_0x1d0ab6])&&(_0x573813=(_0x247295?_0x525aef(_0x4e966d,_0x4f6424,_0x573813):_0x525aef(_0x573813))||_0x573813);return _0x247295&&_0x573813&&X(_0x4e966d,_0x4f6424,_0x573813),_0x573813;},_=(_0x221be6,_0x1ea08a)=>(_0x49094b,_0x577909)=>_0x1ea08a(_0x49094b,_0x577909,_0x221be6);let S=class extends _0x227664{constructor(_0x175e5e,_0x1c89aa,_0x37a4a3,_0x35d79a){const _0x299627=_0x5116d5;super(),this[_0x299627(0x192)]=_0x175e5e,this[_0x299627(0x16d)]=_0x1c89aa,this[_0x299627(0x1b1)]=_0x37a4a3,this['_injector']=_0x35d79a,this['_init'](),this['_initUserSync']();}[_0x5116d5(0x152)](){const _0x1d9311=_0x5116d5;this[_0x1d9311(0x188)](this[_0x1d9311(0x16d)][_0x1d9311(0x181)][_0x1d9311(0x19d)](_0x3a969e(0x10))[_0x1d9311(0x168)](_0x48272b=>{const _0x569813=_0x1d9311,_0x22d4f8=new Set();_0x48272b[_0x569813(0x186)](_0x2d8ced=>{const _0x32e112=_0x569813;switch(_0x2d8ced[_0x32e112(0x1b2)]){case'add':{const _0x47302=_0x2d8ced[_0x32e112(0x1ab)][_0x32e112(0x19a)];_0x22d4f8[_0x32e112(0x16f)](_0x47302);break;}}}),Q(this[_0x569813(0x177)],_0x22d4f8);}));}[_0x5116d5(0x1a0)](){const _0xdf6dfd=_0x5116d5;this[_0xdf6dfd(0x188)](this['_commentService'][_0xdf6dfd(0x181)][_0xdf6dfd(0x168)](async _0x2e8e7b=>{const _0x52ea3e=_0xdf6dfd;var _0xac042,_0x1c7ca1,_0x147edf,_0x54dcef;const _0x54b465=(_0xac042=this[_0x52ea3e(0x16d)][_0x52ea3e(0x150)](_0x2e8e7b[_0x52ea3e(0x14c)])[_0x52ea3e(0x190)](_0x2d17ad=>_0x2d17ad[_0x52ea3e(0x15f)]===_0x2e8e7b['threadId']))==null?void 0x0:_0xac042['root'];if(!_0x54b465)return;const {unitId:_0x3632d9,subUnitId:_0x297e01}=_0x54b465;switch(_0x2e8e7b[_0x52ea3e(0x14b)]&&this[_0x52ea3e(0x1b1)][_0x52ea3e(0x1ae)](_0x2e8e7b[_0x52ea3e(0x14b)]),_0x2e8e7b[_0x52ea3e(0x1b2)]){case p[_0x52ea3e(0x159)]:break;case p[_0x52ea3e(0x156)]:{this['_threadCommentModel'][_0x52ea3e(0x178)](_0x3632d9,_0x297e01,{'unitId':_0x3632d9,'subUnitId':_0x297e01,'ref':'','id':_0x2e8e7b[_0x52ea3e(0x187)],'dT':w(+_0x2e8e7b[_0x52ea3e(0x18a)]),'threadId':_0x2e8e7b['threadId'],'personId':(_0x147edf=(_0x1c7ca1=_0x2e8e7b[_0x52ea3e(0x14b)])==null?void 0x0:_0x1c7ca1['userID'])!=null?_0x147edf:_0x2e8e7b[_0x52ea3e(0x19b)],'text':JSON['parse'](_0x2e8e7b[_0x52ea3e(0x1a5)]),'parentId':_0x54b465['id']});break;}case p[_0x52ea3e(0x18f)]:{const _0x45a79a=this[_0x52ea3e(0x16d)][_0x52ea3e(0x183)](_0x3632d9,_0x297e01,_0x2e8e7b[_0x52ea3e(0x187)]);_0x45a79a&&_0x45a79a['parentId']&&this[_0x52ea3e(0x16d)][_0x52ea3e(0x171)](_0x3632d9,_0x297e01,_0x2e8e7b['replyId']);break;}case p[_0x52ea3e(0x18c)]:{this['_threadCommentModel'][_0x52ea3e(0x172)](_0x3632d9,_0x297e01,{'commentId':_0x2e8e7b[_0x52ea3e(0x187)],'text':JSON['parse'](_0x2e8e7b[_0x52ea3e(0x1a5)])});break;}case p['Solve']:{const _0x3426be=(_0x54dcef=this[_0x52ea3e(0x16d)][_0x52ea3e(0x150)](_0x2e8e7b[_0x52ea3e(0x14c)])[_0x52ea3e(0x190)](_0x13ab25=>_0x13ab25[_0x52ea3e(0x15f)]===_0x2e8e7b[_0x52ea3e(0x15f)]))==null?void 0x0:_0x54dcef[_0x52ea3e(0x1b6)];_0x3426be&&this['_threadCommentModel'][_0x52ea3e(0x195)](_0x3632d9,_0x297e01,_0x3426be['id'],_0x2e8e7b['solved']===v[_0x52ea3e(0x19c)]);break;}}}));}};S=ee([_(0x0,_0x38a703(_0x2d9055)),_(0x1,_0x38a703(_0x35aab2)),_(0x2,_0x38a703(_0x5b9fe0)),_(0x3,_0x38a703(_0x34d019))],S);const re=_0x5116d5(0x170),te={};var se=Object[_0x5116d5(0x14f)],oe=Object[_0x5116d5(0x1b5)],ne=(_0x2f39d7,_0x55f108,_0x5775dc,_0x49f581)=>{const _0x20b774=_0x5116d5;for(var _0x3391e1=_0x49f581>0x1?void 0x0:_0x49f581?oe(_0x55f108,_0x5775dc):_0x55f108,_0x59363f=_0x2f39d7[_0x20b774(0x149)]-0x1,_0x4f2869;_0x59363f>=0x0;_0x59363f--)(_0x4f2869=_0x2f39d7[_0x59363f])&&(_0x3391e1=(_0x49f581?_0x4f2869(_0x55f108,_0x5775dc,_0x3391e1):_0x4f2869(_0x3391e1))||_0x3391e1);return _0x49f581&&_0x3391e1&&se(_0x55f108,_0x5775dc,_0x3391e1),_0x3391e1;},I=(_0x4e37c1,_0x2a0cff)=>(_0x2ed45e,_0x403fe8)=>_0x2a0cff(_0x2ed45e,_0x403fe8,_0x4e37c1);function ie(_0x308c3d,_0xca0161){const _0x263d2d=_0x5116d5,_0x3c4b0f=_0x308c3d[_0x263d2d(0x162)][0x0];return{..._0xca0161,'id':_0x3c4b0f[_0x263d2d(0x187)],'resolved':_0x308c3d[_0x263d2d(0x1b8)]===0x1,'dT':w(_0x3c4b0f[_0x263d2d(0x18a)]),'personId':_0x3c4b0f[_0x263d2d(0x19b)],'threadId':_0x3c4b0f[_0x263d2d(0x15f)]};}function ae(_0x395011,_0x432022,_0x48fe4e){const _0x2d80bb=_0x5116d5;var _0x295359,_0x114999;if(((_0x114999=(_0x295359=_0x395011==null?void 0x0:_0x395011[_0x2d80bb(0x162)])==null?void 0x0:_0x295359[_0x2d80bb(0x149)])!=null?_0x114999:0x0)>0x0){const _0x20f89d=(_0x5dd72d,_0x375a1b)=>({'id':_0x5dd72d['replyId'],'threadId':_0x5dd72d[_0x2d80bb(0x15f)],'dT':w(_0x5dd72d[_0x2d80bb(0x18a)]),'personId':_0x5dd72d['userId'],'resolved':_0x395011[_0x2d80bb(0x1b8)]===v[_0x2d80bb(0x19c)],'unitId':_0x432022,'subUnitId':_0x48fe4e,'text':JSON[_0x2d80bb(0x14a)](_0x5dd72d[_0x2d80bb(0x1a5)]),'parentId':_0x375a1b}),_0x32eeff=_0x20f89d(_0x395011[_0x2d80bb(0x162)][0x0]);return{..._0x32eeff,'children':_0x395011[_0x2d80bb(0x162)][_0x2d80bb(0x16a)](0x1)['map'](_0x33966a=>_0x20f89d(_0x33966a,_0x32eeff['id']))};}return null;}let b=class{constructor(_0xbbbcd2,_0x4a9817,_0x288801,_0x14f83e){const _0x3a4c3=_0x5116d5;this[_0x3a4c3(0x17b)]=_0xbbbcd2,this['_userService']=_0x4a9817,this[_0x3a4c3(0x185)]=_0x288801,this[_0x3a4c3(0x177)]=_0x14f83e;}async[_0x5116d5(0x178)](_0x204351){const _0x207ebf=_0x5116d5;var _0x23e0dd,_0x19bd85;const {parentId:_0x4981ac,unitId:_0x594875,text:_0x34e88a,threadId:_0x59ca97}=_0x204351,_0x1ac1f1=(_0x19bd85=(_0x23e0dd=_0x34e88a[_0x207ebf(0x166)])==null?void 0x0:_0x23e0dd[_0x207ebf(0x18d)](_0x1f6b5f=>_0x1f6b5f[_0x207ebf(0x167)]===_0x406639[_0x207ebf(0x155)])[_0x207ebf(0x1ba)](_0x4f3661=>_0x4f3661[_0x207ebf(0x151)]))!=null?_0x19bd85:[],_0xbd8283=JSON[_0x207ebf(0x161)](_0x34e88a),_0x486d66=(await this['_sessionService'][_0x207ebf(0x182)](_0x594875))[_0x207ebf(0x1ad)]();if(_0x4981ac){const _0x500d37={'memberId':_0x486d66,'unitId':_0x594875,'content':_0xbd8283,'mention':_0x1ac1f1,'threadId':_0x59ca97},_0x39cd24=(await this[_0x207ebf(0x17b)][_0x207ebf(0x197)]('/universer-api/comment/unit/'+_0x594875+_0x207ebf(0x184),{'body':_0x500d37}))[_0x207ebf(0x1a7)]['reply'];return{..._0x204351,'id':_0x39cd24[_0x207ebf(0x187)],'dT':_0x5b82f9(+_0x39cd24[_0x207ebf(0x18a)])[_0x207ebf(0x15a)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x39cd24['userId']};}else{const _0x4d808a={'memberId':_0x486d66,'unitId':_0x594875,'content':_0xbd8283,'mention':_0x1ac1f1},_0xaef706=await this[_0x207ebf(0x17b)][_0x207ebf(0x197)](_0x207ebf(0x18b)+_0x594875+_0x207ebf(0x1ac),{'body':_0x4d808a});return ie(_0xaef706['body']['comment'],_0x204351);}}async[_0x5116d5(0x172)](_0x48aa26){const _0x4a7b52=_0x5116d5;var _0x5b065f,_0x44e0ee;const {text:_0x43c9fb,unitId:_0x2096f5}=_0x48aa26,_0x21aa99=(_0x44e0ee=(_0x5b065f=_0x43c9fb[_0x4a7b52(0x166)])==null?void 0x0:_0x5b065f[_0x4a7b52(0x18d)](_0x2b1785=>_0x2b1785[_0x4a7b52(0x167)]===_0x406639[_0x4a7b52(0x155)])[_0x4a7b52(0x1ba)](_0x157b6b=>_0x157b6b['rangeId']))!=null?_0x44e0ee:[],_0xc86287=JSON[_0x4a7b52(0x161)](_0x43c9fb),_0x5d92bd=_0x48aa26[_0x4a7b52(0x15f)],_0x4724cd=_0x48aa26['id'],_0xd274c6={'memberId':(await this[_0x4a7b52(0x185)][_0x4a7b52(0x182)](_0x2096f5))[_0x4a7b52(0x1ad)](),'unitId':_0x2096f5,'threadId':_0x5d92bd,'mention':_0x21aa99,'content':_0xc86287,'replyId':_0x4724cd},_0x148054=await this['_httpService']['post'](_0x4a7b52(0x18b)+_0x2096f5+_0x4a7b52(0x173),{'body':_0xd274c6});return!_0x148054['body']['error']||_0x148054[_0x4a7b52(0x1a7)][_0x4a7b52(0x1a3)][_0x4a7b52(0x175)]===0x1;}async[_0x5116d5(0x195)](_0x5b5eb6){const _0x20c7e0=_0x5116d5,{unitId:_0x3fa0dd}=_0x5b5eb6,_0x525cf1=_0x5b5eb6[_0x20c7e0(0x15f)],_0x574d80={'memberId':this[_0x20c7e0(0x1b1)]['getCurrentUser']()[_0x20c7e0(0x180)],'unitId':_0x3fa0dd,'threadId':_0x525cf1,'solved':_0x5b5eb6[_0x20c7e0(0x15b)]?v[_0x20c7e0(0x19c)]:v['OpenOrReOpen']},_0x256ac0=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x3fa0dd+_0x20c7e0(0x1aa),{'body':_0x574d80});return!_0x256ac0[_0x20c7e0(0x1a7)][_0x20c7e0(0x1a3)]||_0x256ac0[_0x20c7e0(0x1a7)]['error'][_0x20c7e0(0x175)]===0x1;}async['deleteComment'](_0x17081f,_0x5a42d2,_0x379808,_0x436244){const _0x332409=_0x5116d5,_0x5e1c4b={'memberId':(await this['_sessionService'][_0x332409(0x182)](_0x17081f))['getMemberID'](),'threadId':_0x379808,'replyId':_0x436244,'unitId':_0x17081f},_0x445595=await this['_httpService']['post'](_0x332409(0x18b)+_0x17081f+_0x332409(0x18e),{'body':_0x5e1c4b});return!_0x445595[_0x332409(0x1a7)]['error']||_0x445595[_0x332409(0x1a7)][_0x332409(0x1a3)][_0x332409(0x175)]===0x1;}async['listComments'](_0x160162,_0x44835c,_0x2f5c47){const _0x445fc9=_0x5116d5,_0xea9999={'unitId':_0x160162,'threadId':_0x2f5c47},_0x56e1a0=await this[_0x445fc9(0x17b)][_0x445fc9(0x197)](_0x445fc9(0x18b)+_0x160162+_0x445fc9(0x153),{'body':_0xea9999}),_0x4c58ce=_0x2f5c47[_0x445fc9(0x1ba)](_0x57fe94=>ae(_0x56e1a0[_0x445fc9(0x1a7)][_0x445fc9(0x194)][_0x57fe94],_0x160162,_0x44835c))[_0x445fc9(0x18d)](Boolean);return Object['values'](_0x56e1a0[_0x445fc9(0x1a7)][_0x445fc9(0x1b7)])[_0x445fc9(0x186)](_0x1b89ca=>{const _0x5ed7e4=_0x445fc9;this[_0x5ed7e4(0x1b1)][_0x5ed7e4(0x1ae)](_0x1b89ca);}),_0x4c58ce;}[_0x5116d5(0x196)](_0x381ddc){const _0x3f9522=_0x5116d5;return{'id':_0x381ddc['id'],'threadId':_0x381ddc[_0x3f9522(0x15f)],'ref':_0x381ddc[_0x3f9522(0x15c)]};}};b=ne([I(0x0,_0x38a703(_0x2a663e)),I(0x1,_0x38a703(_0x5b9fe0)),I(0x2,_0x38a703(_0x2c4526)),I(0x3,_0x38a703(_0x34d019))],b);var ce=Object[_0x5116d5(0x14f)],de=Object['getOwnPropertyDescriptor'],me=(_0x3234dd,_0x387b15,_0x3054a9,_0x46ffde)=>{const _0x95525d=_0x5116d5;for(var _0x48e6e4=_0x46ffde>0x1?void 0x0:_0x46ffde?de(_0x387b15,_0x3054a9):_0x387b15,_0x37bbef=_0x3234dd[_0x95525d(0x149)]-0x1,_0xf12299;_0x37bbef>=0x0;_0x37bbef--)(_0xf12299=_0x3234dd[_0x37bbef])&&(_0x48e6e4=(_0x46ffde?_0xf12299(_0x387b15,_0x3054a9,_0x48e6e4):_0xf12299(_0x48e6e4))||_0x48e6e4);return _0x46ffde&&_0x48e6e4&&ce(_0x387b15,_0x3054a9,_0x48e6e4),_0x48e6e4;},le=(_0x320401,_0x3b8d02)=>(_0x55588f,_0x117802)=>_0x3b8d02(_0x55588f,_0x117802,_0x320401);let C=class{constructor(_0x566b2d){const _0x58ee5a=_0x5116d5;this[_0x58ee5a(0x17b)]=_0x566b2d;}async[_0x5116d5(0x14e)](_0x1d6024,_0x3eba85,_0x20d688){const _0x4aaba8=_0x5116d5,_0x991781=new URL(window[_0x4aaba8(0x15d)]['href'])[_0x4aaba8(0x189)][_0x4aaba8(0x17f)]('unit');if(!_0x991781)return[];const _0x1a6f82=window['location'][_0x4aaba8(0x160)],_0x47e170=window[_0x4aaba8(0x15d)][_0x4aaba8(0x1a2)]===_0x4aaba8(0x19f)?_0x4aaba8(0x17e):_0x4aaba8(0x1b3);return(await this[_0x4aaba8(0x17b)][_0x4aaba8(0x17f)](_0x47e170+'://'+_0x1a6f82+'/universer-api/authz/collaborator',{'params':{'objectID':_0x991781,'unitID':_0x991781}}))[_0x4aaba8(0x1a7)][_0x4aaba8(0x15e)][_0x4aaba8(0x1ba)](_0x2b22f2=>{const _0x43184c=_0x4aaba8;var _0x102dc5,_0x5318c4,_0x5a44fd,_0x50d30b,_0x165843,_0x4967a3;return{'id':(_0x5318c4=(_0x102dc5=_0x2b22f2[_0x43184c(0x163)])==null?void 0x0:_0x102dc5[_0x43184c(0x180)])!=null?_0x5318c4:'','label':(_0x50d30b=(_0x5a44fd=_0x2b22f2['subject'])==null?void 0x0:_0x5a44fd[_0x43184c(0x17c)])!=null?_0x50d30b:'','icon':(_0x4967a3=(_0x165843=_0x2b22f2[_0x43184c(0x163)])==null?void 0x0:_0x165843['avatar'])!=null?_0x4967a3:'','type':_0x43184c(0x14b)};});}};C=me([le(0x0,_0x38a703(_0x2a663e))],C);var he=Object['defineProperty'],ue=Object[_0x5116d5(0x1b5)],pe=(_0x347984,_0x40b537,_0x2b3d32,_0x43672e)=>{for(var _0x13411b=_0x43672e>0x1?void 0x0:_0x43672e?ue(_0x40b537,_0x2b3d32):_0x40b537,_0x1fecb5=_0x347984['length']-0x1,_0xb3c954;_0x1fecb5>=0x0;_0x1fecb5--)(_0xb3c954=_0x347984[_0x1fecb5])&&(_0x13411b=(_0x43672e?_0xb3c954(_0x40b537,_0x2b3d32,_0x13411b):_0xb3c954(_0x13411b))||_0x13411b);return _0x43672e&&_0x13411b&&he(_0x40b537,_0x2b3d32,_0x13411b),_0x13411b;},f=(_0x510625,_0x11a933)=>(_0x27b815,_0x4e8e55)=>_0x11a933(_0x27b815,_0x4e8e55,_0x510625);let D=class extends _0x227664{constructor(_0x1a7373,_0x3c4783,_0x482ef2,_0x40692a){const _0xbb59d9=_0x5116d5;super(),this[_0xbb59d9(0x154)]=_0x1a7373,this[_0xbb59d9(0x17a)]=_0x3c4783,this[_0xbb59d9(0x16c)]=_0x482ef2,this[_0xbb59d9(0x1a1)]=_0x40692a,this[_0xbb59d9(0x158)]();}[_0x5116d5(0x158)](){const _0x3ff87d=_0x5116d5;this[_0x3ff87d(0x154)][_0x3ff87d(0x19e)]=this['_threadCommentDataSource'],this[_0x3ff87d(0x154)][_0x3ff87d(0x179)]=!0x1,this[_0x3ff87d(0x16c)][_0x3ff87d(0x19e)]=this[_0x3ff87d(0x1a1)];}};D=pe([f(0x0,_0x2b8c4b),f(0x1,_0x38a703(b)),f(0x2,_0xe62f37),f(0x3,_0x38a703(C))],D);var E=Object[_0x5116d5(0x14f)],ve=Object[_0x5116d5(0x1b5)],_e=(_0x1eb892,_0x4d002d,_0x5a5436)=>_0x4d002d in _0x1eb892?E(_0x1eb892,_0x4d002d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5a5436}):_0x1eb892[_0x4d002d]=_0x5a5436,Ie=(_0x51aa34,_0x3465e2,_0x4d2d53,_0x4916d9)=>{const _0x326314=_0x5116d5;for(var _0x2eeac6=_0x4916d9>0x1?void 0x0:_0x4916d9?ve(_0x3465e2,_0x4d2d53):_0x3465e2,_0x5c678e=_0x51aa34[_0x326314(0x149)]-0x1,_0x2a12e9;_0x5c678e>=0x0;_0x5c678e--)(_0x2a12e9=_0x51aa34[_0x5c678e])&&(_0x2eeac6=(_0x4916d9?_0x2a12e9(_0x3465e2,_0x4d2d53,_0x2eeac6):_0x2a12e9(_0x2eeac6))||_0x2eeac6);return _0x4916d9&&_0x2eeac6&&E(_0x3465e2,_0x4d2d53,_0x2eeac6),_0x2eeac6;},R=(_0x8dd0fb,_0x12b651)=>(_0x54a009,_0x208dbd)=>_0x12b651(_0x54a009,_0x208dbd,_0x8dd0fb),x=(_0x133316,_0x4d8f66,_0x3abe9e)=>_e(_0x133316,typeof _0x4d8f66!='symbol'?_0x4d8f66+'':_0x4d8f66,_0x3abe9e);let g=class extends _0x5cba6c{constructor(_0x28847d=te,_0x18762c,_0x5f5c71){const _0x23d324=_0x5116d5;super(),this[_0x23d324(0x165)]=_0x28847d,this[_0x23d324(0x177)]=_0x18762c,this[_0x23d324(0x174)]=_0x5f5c71;const {..._0x29fe43}=this[_0x23d324(0x165)];this['_configService'][_0x23d324(0x1b4)](re,_0x29fe43);}['onStarting'](){[[C],[b],[D],[S]]['forEach'](_0x4c26bf=>{const _0x568664=_0x38bd;this[_0x568664(0x177)][_0x568664(0x16f)](_0x4c26bf);});}[_0x5116d5(0x169)](){const _0x1be756=_0x5116d5;this[_0x1be756(0x177)]['get'](D),this[_0x1be756(0x177)][_0x1be756(0x17f)](S);}};x(g,_0x5116d5(0x1b9),V),x(g,'type',_0x56b974[_0x5116d5(0x1a8)]),g=Ie([_0x1780b5(_0x8c592c,_0x277d0a,_0x37ac31),R(0x1,_0x38a703(_0x34d019)),R(0x2,_0x4303ca)],g);export{g as UniverThreadCommentDataSourcePlugin};function _0xcda2(){const _0x4b294e=['_configService','code','2429000GXdYDg','_injector','addComment','syncUpdateMutationToColla','_threadCommentDataSource','_httpService','name','713405BYOeAw','https','get','userID','commentUpdate$','requireSession','getComment','/reply','_sessionService','forEach','replyId','disposeWithMe','searchParams','createTimestamp','/universer-api/comment/unit/','Edit','filter','/delete','Delete','find','YYYY/MM/DD\x20HH:mm','_commentService','2338ynDaUM','comments','resolveComment','saveCommentToSnapshot','post','219113MjgfAM','UNRECOGNIZED','personId','userId','Solved','pipe','dataSource','https:','_init','_threadCommentMentionDataSource','protocol','error','3875008JVWHrg','content','1653228YleRYN','body','UNIVER_UNKNOWN','delete','/solved','payload','/add','getMemberID','addUser','Unknown','40244kjbgfN','_userService','type','http','setConfig','getOwnPropertyDescriptor','root','users','solved','pluginName','map','48sAtaCX','length','parse','user','unitId','OpenOrReOpen','getMentions','defineProperty','getUnit','rangeId','_initUserSync','/list','_threadCommentDataSourceService','COMMENT','Reply','/universer-api/user/list','_initDataSource','Add','format','resolved','ref','location','collaborators','threadId','host','stringify','replies','subject','4njXSQz','_config','customRanges','rangeType','subscribe','onReady','slice','762QlvZkF','_threadCommentMentionDataService','_threadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','add','thread-comment-data-source.config','deleteComment','updateComment','/edit'];_0xcda2=function(){return _0x4b294e;};return _0xcda2();}
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0xb9e4(){const _0x1fa6e6=['_threadCommentDataSourceService','3855415kcviVs','Solved','length','/universer-api/comment/unit/','https','4336810FtzrOj','_threadCommentDataSource','Delete','Edit','getOwnPropertyDescriptor','type','getCurrentUser','disposeWithMe','root','solved','replyId','Disposable','symbol','code','userId','resolved','HTTPService','values','UserManagerService','get','UniverCore','createTimestamp','dayjs','parse','body','UniverProCollaborationClient','comments','12VCVIVi','UniverInstanceType','93674aGNvWd','_threadCommentMentionDataService','payload','commentUpdate$','UniverLicensePlugin','Injector','UniverThreadCommentDataSourcePlugin','YYYY/MM/DD\x20HH:mm','href','map','Inject','pipe','@univerjs/core','OpenOrReOpen','1ysANDP','https:','add','_initDataSource','UniverCollaborationClientPlugin','_sessionService','507727NoSedJ','bufferTime','object','/add','unitId','_threadCommentModel','filter','stringify','location','users','find','/solved','COMMENT','Reply','host','toStringTag','avatar','_initUserSync','_httpService','personId','_userService','_commentService','@univerjs/thread-comment','ThreadCommentModel','_injector','rangeId','456CEoqZX','content','function','size','634716PPNIBl','userID','onReady','Module','Solve','Plugin','forEach','requireSession','deleteComment','replies','_init','_configService','subscribe','addComment','UniverThreadCommentUIPlugin','IThreadCommentDataSourceService','getUnit','defineProperty','subject','rangeType','Unknown','UniverThreadCommentUi','customRanges','exports','UniverProLicense','CustomRangeType','24UOlnGj','@univerjs-pro/collaboration-client','error','user','parentId','@univerjs-pro/license','name','Add','@univerjs/network','unit','setConfig','post','addUser','saveCommentToSnapshot','http','slice','onStarting','listComments','CommentService','@univerjs/thread-comment-ui','/edit','updateComment','getMemberID','threadId','1391364YQJire','66598NlFFUT','://','dataSource','rxjs','syncUpdateMutationToColla','UniverNetwork','DependentOn','UniverProThreadCommentDatasource','UNRECOGNIZED','searchParams'];_0xb9e4=function(){return _0x1fa6e6;};return _0xb9e4();}function _0x4450(_0x412e03,_0xfb47b2){const _0xb9e4f7=_0xb9e4();return _0x4450=function(_0x445017,_0x1355f2){_0x445017=_0x445017-0x158;let _0x1db701=_0xb9e4f7[_0x445017];return _0x1db701;},_0x4450(_0x412e03,_0xfb47b2);}(function(_0x538d09,_0x48d85d){const _0x4f180c=_0x4450,_0x4e4018=_0x538d09();while(!![]){try{const _0x3e68e8=parseInt(_0x4f180c(0x169))/0x1*(parseInt(_0x4f180c(0x15b))/0x2)+parseInt(_0x4f180c(0x18d))/0x3*(-parseInt(_0x4f180c(0x159))/0x4)+parseInt(_0x4f180c(0x1cb))/0x5+-parseInt(_0x4f180c(0x189))/0x6*(parseInt(_0x4f180c(0x1c0))/0x7)+parseInt(_0x4f180c(0x1a7))/0x8*(parseInt(_0x4f180c(0x1bf))/0x9)+parseInt(_0x4f180c(0x1d0))/0xa+parseInt(_0x4f180c(0x16f))/0xb;if(_0x3e68e8===_0x48d85d)break;else _0x4e4018['push'](_0x4e4018['shift']());}catch(_0x3cd771){_0x4e4018['push'](_0x4e4018['shift']());}}}(_0xb9e4,0x62936),function(_0x20c799,_0x543e6a){const _0x330073=_0x4450;typeof exports==_0x330073(0x171)&&typeof module<'u'?_0x543e6a(exports,require('@univerjs/core'),require(_0x330073(0x1ba)),require(_0x330073(0x1a8)),require(_0x330073(0x1ac)),require(_0x330073(0x185)),require(_0x330073(0x1c3)),require('@univerjs/network')):typeof define==_0x330073(0x18b)&&define['amd']?define([_0x330073(0x1a4),_0x330073(0x167),'@univerjs/thread-comment-ui',_0x330073(0x1a8),_0x330073(0x1ac),_0x330073(0x185),_0x330073(0x1c3),_0x330073(0x1af)],_0x543e6a):(_0x20c799=typeof globalThis<'u'?globalThis:_0x20c799||self,_0x543e6a(_0x20c799[_0x330073(0x1c7)]={},_0x20c799[_0x330073(0x1e4)],_0x20c799[_0x330073(0x1a2)],_0x20c799[_0x330073(0x1e9)],_0x20c799[_0x330073(0x1a5)],_0x20c799['UniverThreadComment'],_0x20c799['rxjs'],_0x20c799[_0x330073(0x1c5)]));}(this,function(_0x47b537,_0x264503,_0x377ea0,_0x333cc6,_0x357cdb,_0x4821ef,_0x9f2a88,_0x2db64e){'use strict';const _0x5c74a1=_0x4450;const _0x2d2546='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0xf08aad=(_0x41d7ca=>(_0x41d7ca[_0x41d7ca['OpenOrReOpen']=0x0]=_0x5c74a1(0x168),_0x41d7ca[_0x41d7ca[_0x5c74a1(0x1cc)]=0x1]=_0x5c74a1(0x1cc),_0x41d7ca[_0x41d7ca[_0x5c74a1(0x1c8)]=-0x1]='UNRECOGNIZED',_0x41d7ca))(_0xf08aad||{}),_0x28c20c=(_0x1d944d=>(_0x1d944d[_0x1d944d[_0x5c74a1(0x1a1)]=0x0]=_0x5c74a1(0x1a1),_0x1d944d[_0x1d944d[_0x5c74a1(0x1ae)]=0x1]='Add',_0x1d944d[_0x1d944d[_0x5c74a1(0x17c)]=0x2]=_0x5c74a1(0x17c),_0x1d944d[_0x1d944d[_0x5c74a1(0x1d3)]=0x3]=_0x5c74a1(0x1d3),_0x1d944d[_0x1d944d['Delete']=0x4]=_0x5c74a1(0x1d2),_0x1d944d[_0x1d944d[_0x5c74a1(0x191)]=0x5]=_0x5c74a1(0x191),_0x1d944d[_0x1d944d[_0x5c74a1(0x1c8)]=-0x1]=_0x5c74a1(0x1c8),_0x1d944d))(_0x28c20c||{});const _0x4d35ad=_0x1e964d=>_0x264503[_0x5c74a1(0x1e6)](new Date(+_0x1e964d))['format'](_0x5c74a1(0x162)),_0x13cf51=async(_0x11fe5b,_0x5ddee2)=>{const _0x1e2281=_0x5c74a1,_0x5573d8=_0x11fe5b['get'](_0x264503[_0x1e2281(0x1e2)]),_0x4cbb7f=_0x11fe5b[_0x1e2281(0x1e3)](_0x2db64e['HTTPService']);_0x5ddee2[_0x1e2281(0x193)](_0x221c8c=>{_0x5573d8['getUser'](_0x221c8c)&&_0x5ddee2['delete'](_0x221c8c);}),_0x5ddee2[_0x1e2281(0x18c)]&&(await _0x4cbb7f[_0x1e2281(0x1e3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5ddee2]}}))[_0x1e2281(0x1e8)]['users']['forEach'](_0x3fac6f=>{const _0x2a4d96=_0x1e2281;_0x3fac6f&&_0x5573d8[_0x2a4d96(0x1b3)](_0x3fac6f);});};var _0x875965=Object[_0x5c74a1(0x19e)],_0x246877=Object[_0x5c74a1(0x1d4)],_0x355d30=(_0x46a759,_0x1e8790,_0x1b835f,_0x20470d)=>{const _0x1baae9=_0x5c74a1;for(var _0x43957a=_0x20470d>0x1?void 0x0:_0x20470d?_0x246877(_0x1e8790,_0x1b835f):_0x1e8790,_0x5b2af1=_0x46a759[_0x1baae9(0x1cd)]-0x1,_0x18162b;_0x5b2af1>=0x0;_0x5b2af1--)(_0x18162b=_0x46a759[_0x5b2af1])&&(_0x43957a=(_0x20470d?_0x18162b(_0x1e8790,_0x1b835f,_0x43957a):_0x18162b(_0x43957a))||_0x43957a);return _0x20470d&&_0x43957a&&_0x875965(_0x1e8790,_0x1b835f,_0x43957a),_0x43957a;},_0x4d623e=(_0x28bc44,_0x247958)=>(_0x23b96d,_0x8ca8c2)=>_0x247958(_0x23b96d,_0x8ca8c2,_0x28bc44);let _0x44233d=class extends _0x264503[_0x5c74a1(0x1db)]{constructor(_0x28d663,_0x4b9dbb,_0xd4845d,_0x4bb856){const _0x2f8281=_0x5c74a1;super(),this['_commentService']=_0x28d663,this[_0x2f8281(0x174)]=_0x4b9dbb,this['_userService']=_0xd4845d,this['_injector']=_0x4bb856,this[_0x2f8281(0x197)](),this[_0x2f8281(0x180)]();}[_0x5c74a1(0x180)](){const _0x193f0d=_0x5c74a1;this['disposeWithMe'](this['_threadCommentModel'][_0x193f0d(0x15e)][_0x193f0d(0x166)](_0x9f2a88[_0x193f0d(0x170)](0x10))[_0x193f0d(0x199)](_0x5b0664=>{const _0x4ef41f=_0x193f0d,_0x38d2a6=new Set();_0x5b0664[_0x4ef41f(0x193)](_0x1763de=>{const _0x5ba3d9=_0x4ef41f;switch(_0x1763de[_0x5ba3d9(0x1d5)]){case _0x5ba3d9(0x16b):{const _0x156842=_0x1763de[_0x5ba3d9(0x15d)][_0x5ba3d9(0x182)];_0x38d2a6[_0x5ba3d9(0x16b)](_0x156842);break;}}}),_0x13cf51(this[_0x4ef41f(0x187)],_0x38d2a6);}));}[_0x5c74a1(0x197)](){const _0x30bcbc=_0x5c74a1;this[_0x30bcbc(0x1d7)](this[_0x30bcbc(0x184)][_0x30bcbc(0x15e)][_0x30bcbc(0x199)](async _0x23db68=>{const _0x1f00cb=_0x30bcbc;var _0x5eda8f,_0x5eaed7,_0x2a6606,_0x5f44ea;const _0x4338ba=(_0x5eda8f=this[_0x1f00cb(0x174)][_0x1f00cb(0x19d)](_0x23db68[_0x1f00cb(0x173)])[_0x1f00cb(0x179)](_0xb74a82=>_0xb74a82[_0x1f00cb(0x1be)]===_0x23db68[_0x1f00cb(0x1be)]))==null?void 0x0:_0x5eda8f[_0x1f00cb(0x1d8)];if(!_0x4338ba)return;const {unitId:_0xca3727,subUnitId:_0x48f563}=_0x4338ba;switch(_0x23db68['user']&&this[_0x1f00cb(0x183)][_0x1f00cb(0x1b3)](_0x23db68[_0x1f00cb(0x1aa)]),_0x23db68['type']){case _0x28c20c[_0x1f00cb(0x1ae)]:break;case _0x28c20c[_0x1f00cb(0x17c)]:{this[_0x1f00cb(0x174)][_0x1f00cb(0x19a)](_0xca3727,_0x48f563,{'unitId':_0xca3727,'subUnitId':_0x48f563,'ref':'','id':_0x23db68[_0x1f00cb(0x1da)],'dT':_0x4d35ad(+_0x23db68[_0x1f00cb(0x1e5)]),'threadId':_0x23db68[_0x1f00cb(0x1be)],'personId':(_0x2a6606=(_0x5eaed7=_0x23db68['user'])==null?void 0x0:_0x5eaed7[_0x1f00cb(0x18e)])!=null?_0x2a6606:_0x23db68['userId'],'text':JSON[_0x1f00cb(0x1e7)](_0x23db68[_0x1f00cb(0x18a)]),'parentId':_0x4338ba['id']});break;}case _0x28c20c[_0x1f00cb(0x1d2)]:{const _0x346184=this[_0x1f00cb(0x174)]['getComment'](_0xca3727,_0x48f563,_0x23db68[_0x1f00cb(0x1da)]);_0x346184&&_0x346184[_0x1f00cb(0x1ab)]&&this[_0x1f00cb(0x174)]['deleteComment'](_0xca3727,_0x48f563,_0x23db68[_0x1f00cb(0x1da)]);break;}case _0x28c20c[_0x1f00cb(0x1d3)]:{this['_threadCommentModel']['updateComment'](_0xca3727,_0x48f563,{'commentId':_0x23db68[_0x1f00cb(0x1da)],'text':JSON[_0x1f00cb(0x1e7)](_0x23db68[_0x1f00cb(0x18a)])});break;}case _0x28c20c[_0x1f00cb(0x191)]:{const _0x547861=(_0x5f44ea=this[_0x1f00cb(0x174)][_0x1f00cb(0x19d)](_0x23db68[_0x1f00cb(0x173)])[_0x1f00cb(0x179)](_0x2bbd6d=>_0x2bbd6d[_0x1f00cb(0x1be)]===_0x23db68[_0x1f00cb(0x1be)]))==null?void 0x0:_0x5f44ea[_0x1f00cb(0x1d8)];_0x547861&&this['_threadCommentModel']['resolveComment'](_0xca3727,_0x48f563,_0x547861['id'],_0x23db68[_0x1f00cb(0x1d9)]===_0xf08aad[_0x1f00cb(0x1cc)]);break;}}}));}};_0x44233d=_0x355d30([_0x4d623e(0x0,_0x264503[_0x5c74a1(0x165)](_0x333cc6[_0x5c74a1(0x1b9)])),_0x4d623e(0x1,_0x264503[_0x5c74a1(0x165)](_0x4821ef[_0x5c74a1(0x186)])),_0x4d623e(0x2,_0x264503[_0x5c74a1(0x165)](_0x264503['UserManagerService'])),_0x4d623e(0x3,_0x264503[_0x5c74a1(0x165)](_0x264503[_0x5c74a1(0x160)]))],_0x44233d);const _0x38f79e='thread-comment-data-source.config',_0x152376={};var _0x2260bf=Object[_0x5c74a1(0x19e)],_0x25b47f=Object[_0x5c74a1(0x1d4)],_0x289f37=(_0x3950c1,_0x4ef59b,_0x39d930,_0x3876b4)=>{const _0x396a2e=_0x5c74a1;for(var _0x4c9479=_0x3876b4>0x1?void 0x0:_0x3876b4?_0x25b47f(_0x4ef59b,_0x39d930):_0x4ef59b,_0x5d8441=_0x3950c1[_0x396a2e(0x1cd)]-0x1,_0x472ad9;_0x5d8441>=0x0;_0x5d8441--)(_0x472ad9=_0x3950c1[_0x5d8441])&&(_0x4c9479=(_0x3876b4?_0x472ad9(_0x4ef59b,_0x39d930,_0x4c9479):_0x472ad9(_0x4c9479))||_0x4c9479);return _0x3876b4&&_0x4c9479&&_0x2260bf(_0x4ef59b,_0x39d930,_0x4c9479),_0x4c9479;},_0x5d2d56=(_0xcd4068,_0x35c3dd)=>(_0x21f1cd,_0x799e7b)=>_0x35c3dd(_0x21f1cd,_0x799e7b,_0xcd4068);function _0x5d318a(_0xb0c4e3,_0x163f05){const _0x4969e5=_0x5c74a1,_0x4730ad=_0xb0c4e3[_0x4969e5(0x196)][0x0];return{..._0x163f05,'id':_0x4730ad[_0x4969e5(0x1da)],'resolved':_0xb0c4e3[_0x4969e5(0x1d9)]===0x1,'dT':_0x4d35ad(_0x4730ad[_0x4969e5(0x1e5)]),'personId':_0x4730ad[_0x4969e5(0x1de)],'threadId':_0x4730ad[_0x4969e5(0x1be)]};}function _0x9f2d80(_0x48b2c1,_0x545e58,_0x354639){const _0x38b220=_0x5c74a1;var _0x310fe1,_0x40029f;if(((_0x40029f=(_0x310fe1=_0x48b2c1==null?void 0x0:_0x48b2c1[_0x38b220(0x196)])==null?void 0x0:_0x310fe1[_0x38b220(0x1cd)])!=null?_0x40029f:0x0)>0x0){const _0x30ecd1=(_0x1ad858,_0x185d42)=>({'id':_0x1ad858[_0x38b220(0x1da)],'threadId':_0x1ad858['threadId'],'dT':_0x4d35ad(_0x1ad858[_0x38b220(0x1e5)]),'personId':_0x1ad858['userId'],'resolved':_0x48b2c1['solved']===_0xf08aad[_0x38b220(0x1cc)],'unitId':_0x545e58,'subUnitId':_0x354639,'text':JSON['parse'](_0x1ad858[_0x38b220(0x18a)]),'parentId':_0x185d42}),_0x6ff631=_0x30ecd1(_0x48b2c1[_0x38b220(0x196)][0x0]);return{..._0x6ff631,'children':_0x48b2c1[_0x38b220(0x196)][_0x38b220(0x1b6)](0x1)[_0x38b220(0x164)](_0x332d42=>_0x30ecd1(_0x332d42,_0x6ff631['id']))};}return null;}let _0x2ea70a=class{constructor(_0x46a210,_0x48b039,_0x15d284,_0x9f3a25){const _0x2c032e=_0x5c74a1;this[_0x2c032e(0x181)]=_0x46a210,this[_0x2c032e(0x183)]=_0x48b039,this['_sessionService']=_0x15d284,this[_0x2c032e(0x187)]=_0x9f3a25;}async['addComment'](_0x17d333){const _0x459151=_0x5c74a1;var _0x3b3187,_0x22c543;const {parentId:_0x51fa9e,unitId:_0x25abbe,text:_0x1a7f3b,threadId:_0x5714fe}=_0x17d333,_0x4623c0=(_0x22c543=(_0x3b3187=_0x1a7f3b['customRanges'])==null?void 0x0:_0x3b3187[_0x459151(0x175)](_0x4f95aa=>_0x4f95aa[_0x459151(0x1a0)]===_0x264503['CustomRangeType'][_0x459151(0x17b)])['map'](_0x3b73ae=>_0x3b73ae[_0x459151(0x188)]))!=null?_0x22c543:[],_0x3f5168=JSON['stringify'](_0x1a7f3b),_0x59c79b=(await this['_sessionService'][_0x459151(0x194)](_0x25abbe))['getMemberID']();if(_0x51fa9e){const _0x4b8ee={'memberId':_0x59c79b,'unitId':_0x25abbe,'content':_0x3f5168,'mention':_0x4623c0,'threadId':_0x5714fe},_0x3285dc=(await this[_0x459151(0x181)][_0x459151(0x1b2)](_0x459151(0x1ce)+_0x25abbe+'/reply',{'body':_0x4b8ee}))['body']['reply'];return{..._0x17d333,'id':_0x3285dc[_0x459151(0x1da)],'dT':_0x264503[_0x459151(0x1e6)](+_0x3285dc[_0x459151(0x1e5)])['format'](_0x459151(0x162)),'personId':_0x3285dc[_0x459151(0x1de)]};}else{const _0x44add7={'memberId':_0x59c79b,'unitId':_0x25abbe,'content':_0x3f5168,'mention':_0x4623c0},_0x5105c4=await this[_0x459151(0x181)]['post'](_0x459151(0x1ce)+_0x25abbe+_0x459151(0x172),{'body':_0x44add7});return _0x5d318a(_0x5105c4[_0x459151(0x1e8)]['comment'],_0x17d333);}}async[_0x5c74a1(0x1bc)](_0x568985){const _0xede20e=_0x5c74a1;var _0x2d33f0,_0x1161a9;const {text:_0x36c8a0,unitId:_0xc2b334}=_0x568985,_0x5c2d04=(_0x1161a9=(_0x2d33f0=_0x36c8a0[_0xede20e(0x1a3)])==null?void 0x0:_0x2d33f0['filter'](_0x86825b=>_0x86825b['rangeType']===_0x264503[_0xede20e(0x1a6)][_0xede20e(0x17b)])['map'](_0x42d4ea=>_0x42d4ea[_0xede20e(0x188)]))!=null?_0x1161a9:[],_0x3324d2=JSON[_0xede20e(0x176)](_0x36c8a0),_0x116da7=_0x568985['threadId'],_0x490542=_0x568985['id'],_0x2504ba={'memberId':(await this[_0xede20e(0x16e)][_0xede20e(0x194)](_0xc2b334))[_0xede20e(0x1bd)](),'unitId':_0xc2b334,'threadId':_0x116da7,'mention':_0x5c2d04,'content':_0x3324d2,'replyId':_0x490542},_0x19b7be=await this[_0xede20e(0x181)][_0xede20e(0x1b2)](_0xede20e(0x1ce)+_0xc2b334+_0xede20e(0x1bb),{'body':_0x2504ba});return!_0x19b7be[_0xede20e(0x1e8)][_0xede20e(0x1a9)]||_0x19b7be['body'][_0xede20e(0x1a9)][_0xede20e(0x1dd)]===0x1;}async['resolveComment'](_0x2130dd){const _0x304631=_0x5c74a1,{unitId:_0x170566}=_0x2130dd,_0x11a215=_0x2130dd[_0x304631(0x1be)],_0x182bfd={'memberId':this[_0x304631(0x183)][_0x304631(0x1d6)]()[_0x304631(0x18e)],'unitId':_0x170566,'threadId':_0x11a215,'solved':_0x2130dd[_0x304631(0x1df)]?_0xf08aad['Solved']:_0xf08aad[_0x304631(0x168)]},_0x4a3a45=await this[_0x304631(0x181)][_0x304631(0x1b2)]('/universer-api/comment/unit/'+_0x170566+_0x304631(0x17a),{'body':_0x182bfd});return!_0x4a3a45['body'][_0x304631(0x1a9)]||_0x4a3a45[_0x304631(0x1e8)][_0x304631(0x1a9)][_0x304631(0x1dd)]===0x1;}async[_0x5c74a1(0x195)](_0x4eeb8b,_0x2cc68b,_0x1b9495,_0x1c2a79){const _0x8e8971=_0x5c74a1,_0x4a933b={'memberId':(await this[_0x8e8971(0x16e)][_0x8e8971(0x194)](_0x4eeb8b))['getMemberID'](),'threadId':_0x1b9495,'replyId':_0x1c2a79,'unitId':_0x4eeb8b},_0x25b965=await this['_httpService'][_0x8e8971(0x1b2)]('/universer-api/comment/unit/'+_0x4eeb8b+'/delete',{'body':_0x4a933b});return!_0x25b965['body'][_0x8e8971(0x1a9)]||_0x25b965['body'][_0x8e8971(0x1a9)][_0x8e8971(0x1dd)]===0x1;}async[_0x5c74a1(0x1b8)](_0x408a97,_0x281b9c,_0x44402b){const _0x680559=_0x5c74a1,_0xb606c={'unitId':_0x408a97,'threadId':_0x44402b},_0x319573=await this[_0x680559(0x181)]['post'](_0x680559(0x1ce)+_0x408a97+'/list',{'body':_0xb606c}),_0x47a496=_0x44402b[_0x680559(0x164)](_0x21716c=>_0x9f2d80(_0x319573['body'][_0x680559(0x158)][_0x21716c],_0x408a97,_0x281b9c))[_0x680559(0x175)](Boolean);return Object[_0x680559(0x1e1)](_0x319573[_0x680559(0x1e8)][_0x680559(0x178)])[_0x680559(0x193)](_0x5ad06e=>{const _0x26f9cc=_0x680559;this[_0x26f9cc(0x183)][_0x26f9cc(0x1b3)](_0x5ad06e);}),_0x47a496;}[_0x5c74a1(0x1b4)](_0xe6a0da){const _0x2accb8=_0x5c74a1;return{'id':_0xe6a0da['id'],'threadId':_0xe6a0da[_0x2accb8(0x1be)],'ref':_0xe6a0da['ref']};}};_0x2ea70a=_0x289f37([_0x5d2d56(0x0,_0x264503[_0x5c74a1(0x165)](_0x2db64e[_0x5c74a1(0x1e0)])),_0x5d2d56(0x1,_0x264503['Inject'](_0x264503['UserManagerService'])),_0x5d2d56(0x2,_0x264503[_0x5c74a1(0x165)](_0x333cc6['CollaborationSessionService'])),_0x5d2d56(0x3,_0x264503[_0x5c74a1(0x165)](_0x264503[_0x5c74a1(0x160)]))],_0x2ea70a);var _0x21d5ef=Object['defineProperty'],_0x35c032=Object['getOwnPropertyDescriptor'],_0x245594=(_0x3195a2,_0x1db1d9,_0x2c19a4,_0x1deffc)=>{const _0x37757e=_0x5c74a1;for(var _0x582096=_0x1deffc>0x1?void 0x0:_0x1deffc?_0x35c032(_0x1db1d9,_0x2c19a4):_0x1db1d9,_0x45e6e3=_0x3195a2[_0x37757e(0x1cd)]-0x1,_0x25f625;_0x45e6e3>=0x0;_0x45e6e3--)(_0x25f625=_0x3195a2[_0x45e6e3])&&(_0x582096=(_0x1deffc?_0x25f625(_0x1db1d9,_0x2c19a4,_0x582096):_0x25f625(_0x582096))||_0x582096);return _0x1deffc&&_0x582096&&_0x21d5ef(_0x1db1d9,_0x2c19a4,_0x582096),_0x582096;},_0x464cc3=(_0x15fab3,_0xe593c1)=>(_0x2e7804,_0x48481c)=>_0xe593c1(_0x2e7804,_0x48481c,_0x15fab3);let _0x342f09=class{constructor(_0x491300){const _0x1feec4=_0x5c74a1;this[_0x1feec4(0x181)]=_0x491300;}async['getMentions'](_0x436fa1,_0x5f1811,_0x33675f){const _0x32442c=_0x5c74a1,_0x25294b=new URL(window[_0x32442c(0x177)][_0x32442c(0x163)])[_0x32442c(0x1c9)][_0x32442c(0x1e3)](_0x32442c(0x1b0));if(!_0x25294b)return[];const _0x13d658=window[_0x32442c(0x177)][_0x32442c(0x17d)],_0x4ef848=window[_0x32442c(0x177)]['protocol']===_0x32442c(0x16a)?_0x32442c(0x1cf):_0x32442c(0x1b5);return(await this[_0x32442c(0x181)][_0x32442c(0x1e3)](_0x4ef848+_0x32442c(0x1c1)+_0x13d658+'/universer-api/authz/collaborator',{'params':{'objectID':_0x25294b,'unitID':_0x25294b}}))[_0x32442c(0x1e8)]['collaborators']['map'](_0x527934=>{const _0x2ffdbb=_0x32442c;var _0x449f77,_0x218184,_0x1fb761,_0x5d5997,_0x2d2d3f,_0x59b7af;return{'id':(_0x218184=(_0x449f77=_0x527934[_0x2ffdbb(0x19f)])==null?void 0x0:_0x449f77[_0x2ffdbb(0x18e)])!=null?_0x218184:'','label':(_0x5d5997=(_0x1fb761=_0x527934[_0x2ffdbb(0x19f)])==null?void 0x0:_0x1fb761[_0x2ffdbb(0x1ad)])!=null?_0x5d5997:'','icon':(_0x59b7af=(_0x2d2d3f=_0x527934['subject'])==null?void 0x0:_0x2d2d3f[_0x2ffdbb(0x17f)])!=null?_0x59b7af:'','type':_0x2ffdbb(0x1aa)};});}};_0x342f09=_0x245594([_0x464cc3(0x0,_0x264503[_0x5c74a1(0x165)](_0x2db64e[_0x5c74a1(0x1e0)]))],_0x342f09);var _0x554bd5=Object[_0x5c74a1(0x19e)],_0x5e7237=Object[_0x5c74a1(0x1d4)],_0x4354ad=(_0x283812,_0x204740,_0x9cacf0,_0xf0fada)=>{const _0x3715b=_0x5c74a1;for(var _0x762757=_0xf0fada>0x1?void 0x0:_0xf0fada?_0x5e7237(_0x204740,_0x9cacf0):_0x204740,_0x493606=_0x283812[_0x3715b(0x1cd)]-0x1,_0x32d8a1;_0x493606>=0x0;_0x493606--)(_0x32d8a1=_0x283812[_0x493606])&&(_0x762757=(_0xf0fada?_0x32d8a1(_0x204740,_0x9cacf0,_0x762757):_0x32d8a1(_0x762757))||_0x762757);return _0xf0fada&&_0x762757&&_0x554bd5(_0x204740,_0x9cacf0,_0x762757),_0x762757;},_0x2a5c72=(_0x135068,_0x38a15e)=>(_0x31167b,_0x17d428)=>_0x38a15e(_0x31167b,_0x17d428,_0x135068);let _0x31f9d0=class extends _0x264503[_0x5c74a1(0x1db)]{constructor(_0x30bd6b,_0x413d31,_0x1d5616,_0x38c7e5){const _0x52ed16=_0x5c74a1;super(),this[_0x52ed16(0x1ca)]=_0x30bd6b,this[_0x52ed16(0x1d1)]=_0x413d31,this['_threadCommentMentionDataService']=_0x1d5616,this['_threadCommentMentionDataSource']=_0x38c7e5,this[_0x52ed16(0x16c)]();}[_0x5c74a1(0x16c)](){const _0x107c2b=_0x5c74a1;this[_0x107c2b(0x1ca)]['dataSource']=this[_0x107c2b(0x1d1)],this[_0x107c2b(0x1ca)][_0x107c2b(0x1c4)]=!0x1,this[_0x107c2b(0x15c)][_0x107c2b(0x1c2)]=this['_threadCommentMentionDataSource'];}};_0x31f9d0=_0x4354ad([_0x2a5c72(0x0,_0x4821ef[_0x5c74a1(0x19c)]),_0x2a5c72(0x1,_0x264503[_0x5c74a1(0x165)](_0x2ea70a)),_0x2a5c72(0x2,_0x377ea0['IThreadCommentMentionDataService']),_0x2a5c72(0x3,_0x264503['Inject'](_0x342f09))],_0x31f9d0);var _0x566f10=Object[_0x5c74a1(0x19e)],_0xb06199=Object[_0x5c74a1(0x1d4)],_0x213543=(_0x52381c,_0x4268d0,_0x5eb52b)=>_0x4268d0 in _0x52381c?_0x566f10(_0x52381c,_0x4268d0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5eb52b}):_0x52381c[_0x4268d0]=_0x5eb52b,_0x119808=(_0x48a16e,_0x1528b7,_0x265a9e,_0x3c3c3c)=>{const _0x287e4f=_0x5c74a1;for(var _0x58f94b=_0x3c3c3c>0x1?void 0x0:_0x3c3c3c?_0xb06199(_0x1528b7,_0x265a9e):_0x1528b7,_0x5197a7=_0x48a16e[_0x287e4f(0x1cd)]-0x1,_0x4bf2a5;_0x5197a7>=0x0;_0x5197a7--)(_0x4bf2a5=_0x48a16e[_0x5197a7])&&(_0x58f94b=(_0x3c3c3c?_0x4bf2a5(_0x1528b7,_0x265a9e,_0x58f94b):_0x4bf2a5(_0x58f94b))||_0x58f94b);return _0x3c3c3c&&_0x58f94b&&_0x566f10(_0x1528b7,_0x265a9e,_0x58f94b),_0x58f94b;},_0x15c869=(_0x21342a,_0x49ed9a)=>(_0x24eb6d,_0x4866e0)=>_0x49ed9a(_0x24eb6d,_0x4866e0,_0x21342a),_0x3c3232=(_0x3b7a51,_0x2669e7,_0x517dc7)=>_0x213543(_0x3b7a51,typeof _0x2669e7!=_0x5c74a1(0x1dc)?_0x2669e7+'':_0x2669e7,_0x517dc7);_0x47b537['UniverThreadCommentDataSourcePlugin']=class extends _0x264503[_0x5c74a1(0x192)]{constructor(_0x2527a2=_0x152376,_0x20ccc8,_0x55d272){const _0x1667fe=_0x5c74a1;super(),this['_config']=_0x2527a2,this['_injector']=_0x20ccc8,this['_configService']=_0x55d272;const {..._0x5e7270}=this['_config'];this[_0x1667fe(0x198)][_0x1667fe(0x1b1)](_0x38f79e,_0x5e7270);}[_0x5c74a1(0x1b7)](){const _0x1b30cb=_0x5c74a1;[[_0x342f09],[_0x2ea70a],[_0x31f9d0],[_0x44233d]][_0x1b30cb(0x193)](_0x568597=>{const _0x1e22a8=_0x1b30cb;this[_0x1e22a8(0x187)][_0x1e22a8(0x16b)](_0x568597);});}[_0x5c74a1(0x18f)](){const _0x294bc3=_0x5c74a1;this[_0x294bc3(0x187)][_0x294bc3(0x1e3)](_0x31f9d0),this[_0x294bc3(0x187)][_0x294bc3(0x1e3)](_0x44233d);}},_0x3c3232(_0x47b537[_0x5c74a1(0x161)],'pluginName',_0x2d2546),_0x3c3232(_0x47b537['UniverThreadCommentDataSourcePlugin'],_0x5c74a1(0x1d5),_0x264503[_0x5c74a1(0x15a)]['UNIVER_UNKNOWN']),_0x47b537[_0x5c74a1(0x161)]=_0x119808([_0x264503[_0x5c74a1(0x1c6)](_0x377ea0[_0x5c74a1(0x19b)],_0x333cc6[_0x5c74a1(0x16d)],_0x357cdb[_0x5c74a1(0x15f)]),_0x15c869(0x1,_0x264503[_0x5c74a1(0x165)](_0x264503['Injector'])),_0x15c869(0x2,_0x264503['IConfigService'])],_0x47b537[_0x5c74a1(0x161)]),Object[_0x5c74a1(0x19e)](_0x47b537,Symbol[_0x5c74a1(0x17e)],{'value':_0x5c74a1(0x190)});}));
1
+ function _0x1085(_0x330f90,_0x71315c){const _0x45cb86=_0x45cb();return _0x1085=function(_0x1085fa,_0x46606a){_0x1085fa=_0x1085fa-0xfe;let _0x2655bd=_0x45cb86[_0x1085fa];return _0x2655bd;},_0x1085(_0x330f90,_0x71315c);}(function(_0x1c3962,_0x38a0e2){const _0xcc7751=_0x1085,_0x25cd31=_0x1c3962();while(!![]){try{const _0x4ef23e=parseInt(_0xcc7751(0x155))/0x1+parseInt(_0xcc7751(0x119))/0x2+parseInt(_0xcc7751(0x193))/0x3*(-parseInt(_0xcc7751(0x15d))/0x4)+-parseInt(_0xcc7751(0x147))/0x5+-parseInt(_0xcc7751(0x16c))/0x6*(-parseInt(_0xcc7751(0x181))/0x7)+parseInt(_0xcc7751(0x18c))/0x8+-parseInt(_0xcc7751(0x157))/0x9;if(_0x4ef23e===_0x38a0e2)break;else _0x25cd31['push'](_0x25cd31['shift']());}catch(_0x1c931a){_0x25cd31['push'](_0x25cd31['shift']());}}}(_0x45cb,0xc73dd),function(_0x223df9,_0x2a32d0){const _0x169cb1=_0x1085;typeof exports==_0x169cb1(0x16e)&&typeof module<'u'?_0x2a32d0(exports,require('@univerjs/core'),require(_0x169cb1(0x13d)),require(_0x169cb1(0x178)),require(_0x169cb1(0x105)),require(_0x169cb1(0x13b)),require(_0x169cb1(0x128)),require(_0x169cb1(0x120))):typeof define=='function'&&define['amd']?define([_0x169cb1(0x106),_0x169cb1(0x188),'@univerjs/thread-comment-ui','@univerjs-pro/collaboration-client',_0x169cb1(0x105),_0x169cb1(0x13b),'rxjs',_0x169cb1(0x120)],_0x2a32d0):(_0x223df9=typeof globalThis<'u'?globalThis:_0x223df9||self,_0x2a32d0(_0x223df9[_0x169cb1(0x143)]={},_0x223df9['UniverCore'],_0x223df9[_0x169cb1(0x187)],_0x223df9[_0x169cb1(0x16d)],_0x223df9[_0x169cb1(0x160)],_0x223df9[_0x169cb1(0x144)],_0x223df9[_0x169cb1(0x128)],_0x223df9[_0x169cb1(0x12b)]));}(this,function(_0x17a296,_0x3d0190,_0x3ed21d,_0x3db026,_0x51384d,_0x5c0884,_0x1b5c0a,_0x49bd93){'use strict';const _0x2d1c5a=_0x1085;const _0x581514='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x5cda73=(_0x209b8d=>(_0x209b8d[_0x209b8d[_0x2d1c5a(0x121)]=0x0]=_0x2d1c5a(0x121),_0x209b8d[_0x209b8d[_0x2d1c5a(0x16f)]=0x1]=_0x2d1c5a(0x16f),_0x209b8d[_0x209b8d[_0x2d1c5a(0x137)]=-0x1]=_0x2d1c5a(0x137),_0x209b8d))(_0x5cda73||{}),_0x4aae21=(_0x569621=>(_0x569621[_0x569621[_0x2d1c5a(0x12c)]=0x0]=_0x2d1c5a(0x12c),_0x569621[_0x569621[_0x2d1c5a(0xfe)]=0x1]=_0x2d1c5a(0xfe),_0x569621[_0x569621['Reply']=0x2]=_0x2d1c5a(0x194),_0x569621[_0x569621[_0x2d1c5a(0x18f)]=0x3]=_0x2d1c5a(0x18f),_0x569621[_0x569621['Delete']=0x4]=_0x2d1c5a(0x15f),_0x569621[_0x569621[_0x2d1c5a(0x163)]=0x5]='Solve',_0x569621[_0x569621[_0x2d1c5a(0x137)]=-0x1]=_0x2d1c5a(0x137),_0x569621))(_0x4aae21||{});const _0x1d64e1=_0x32d4fa=>_0x3d0190[_0x2d1c5a(0x168)](new Date(+_0x32d4fa))['format'](_0x2d1c5a(0x17a)),_0x41e898=async(_0x1daffb,_0x2ae0d7)=>{const _0x49961f=_0x2d1c5a,_0x4f8c20=_0x1daffb[_0x49961f(0x191)](_0x3d0190[_0x49961f(0x11c)]),_0x50f0c5=_0x1daffb[_0x49961f(0x191)](_0x49bd93[_0x49961f(0x176)]);_0x2ae0d7[_0x49961f(0x11d)](_0x27ee20=>{const _0x12083e=_0x49961f;_0x4f8c20['getUser'](_0x27ee20)&&_0x2ae0d7[_0x12083e(0x124)](_0x27ee20);}),_0x2ae0d7[_0x49961f(0x156)]&&(await _0x50f0c5[_0x49961f(0x191)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2ae0d7]}}))[_0x49961f(0x141)][_0x49961f(0x177)][_0x49961f(0x11d)](_0x1f578d=>{const _0x5d3ae8=_0x49961f;_0x1f578d&&_0x4f8c20[_0x5d3ae8(0x111)](_0x1f578d);});};var _0x2b18e9=Object['defineProperty'],_0xaed435=Object['getOwnPropertyDescriptor'],_0xdbf4ec=(_0x3443bc,_0x3e2fe7,_0x3d4a6c,_0x5e2b31)=>{const _0x5b531d=_0x2d1c5a;for(var _0x15e483=_0x5e2b31>0x1?void 0x0:_0x5e2b31?_0xaed435(_0x3e2fe7,_0x3d4a6c):_0x3e2fe7,_0x229be8=_0x3443bc[_0x5b531d(0x104)]-0x1,_0x29a12f;_0x229be8>=0x0;_0x229be8--)(_0x29a12f=_0x3443bc[_0x229be8])&&(_0x15e483=(_0x5e2b31?_0x29a12f(_0x3e2fe7,_0x3d4a6c,_0x15e483):_0x29a12f(_0x15e483))||_0x15e483);return _0x5e2b31&&_0x15e483&&_0x2b18e9(_0x3e2fe7,_0x3d4a6c,_0x15e483),_0x15e483;},_0x470027=(_0x2a44f3,_0x529c33)=>(_0x166652,_0x92e77d)=>_0x529c33(_0x166652,_0x92e77d,_0x2a44f3);let _0x2c4030=class extends _0x3d0190['Disposable']{constructor(_0x1c592b,_0xef8ea5,_0x4e6c26,_0x22f0c3){const _0x6f6060=_0x2d1c5a;super(),this[_0x6f6060(0x11f)]=_0x1c592b,this[_0x6f6060(0x114)]=_0xef8ea5,this[_0x6f6060(0x151)]=_0x4e6c26,this[_0x6f6060(0x101)]=_0x22f0c3,this['_init'](),this[_0x6f6060(0x127)]();}[_0x2d1c5a(0x127)](){const _0x568e0e=_0x2d1c5a;this[_0x568e0e(0xff)](this['_threadCommentModel'][_0x568e0e(0x16a)][_0x568e0e(0x100)](_0x1b5c0a[_0x568e0e(0x15e)](0x10))['subscribe'](_0x496c60=>{const _0x35946b=new Set();_0x496c60['forEach'](_0x34a6dc=>{const _0xeb10e9=_0x1085;switch(_0x34a6dc[_0xeb10e9(0x117)]){case _0xeb10e9(0x139):{const _0x5d3422=_0x34a6dc[_0xeb10e9(0x17e)][_0xeb10e9(0x162)];_0x35946b[_0xeb10e9(0x139)](_0x5d3422);break;}}}),_0x41e898(this['_injector'],_0x35946b);}));}['_init'](){const _0x32d451=_0x2d1c5a;this[_0x32d451(0xff)](this['_commentService']['commentUpdate$'][_0x32d451(0x167)](async _0x490edc=>{const _0x159d32=_0x32d451;var _0x22400e,_0xc8d55f,_0x22c0dd,_0x4b8c1f;const _0x29d0eb=(_0x22400e=this['_threadCommentModel']['getUnit'](_0x490edc[_0x159d32(0x17d)])['find'](_0x43f4ee=>_0x43f4ee['threadId']===_0x490edc[_0x159d32(0x14f)]))==null?void 0x0:_0x22400e['root'];if(!_0x29d0eb)return;const {unitId:_0x117158,subUnitId:_0x3aafe5}=_0x29d0eb;switch(_0x490edc[_0x159d32(0x130)]&&this[_0x159d32(0x151)]['addUser'](_0x490edc['user']),_0x490edc[_0x159d32(0x117)]){case _0x4aae21[_0x159d32(0xfe)]:break;case _0x4aae21[_0x159d32(0x194)]:{this['_threadCommentModel']['addComment'](_0x117158,_0x3aafe5,{'unitId':_0x117158,'subUnitId':_0x3aafe5,'ref':'','id':_0x490edc['replyId'],'dT':_0x1d64e1(+_0x490edc['createTimestamp']),'threadId':_0x490edc[_0x159d32(0x14f)],'personId':(_0x22c0dd=(_0xc8d55f=_0x490edc[_0x159d32(0x130)])==null?void 0x0:_0xc8d55f[_0x159d32(0x171)])!=null?_0x22c0dd:_0x490edc['userId'],'text':JSON[_0x159d32(0x164)](_0x490edc[_0x159d32(0x180)]),'parentId':_0x29d0eb['id']});break;}case _0x4aae21[_0x159d32(0x15f)]:{const _0x55b8a5=this[_0x159d32(0x114)][_0x159d32(0x183)](_0x117158,_0x3aafe5,_0x490edc[_0x159d32(0x14e)]);_0x55b8a5&&_0x55b8a5['parentId']&&this[_0x159d32(0x114)][_0x159d32(0x140)](_0x117158,_0x3aafe5,_0x490edc[_0x159d32(0x14e)]);break;}case _0x4aae21['Edit']:{this[_0x159d32(0x114)][_0x159d32(0x134)](_0x117158,_0x3aafe5,{'commentId':_0x490edc[_0x159d32(0x14e)],'text':JSON[_0x159d32(0x164)](_0x490edc[_0x159d32(0x180)])});break;}case _0x4aae21[_0x159d32(0x163)]:{const _0x99e61a=(_0x4b8c1f=this[_0x159d32(0x114)][_0x159d32(0x174)](_0x490edc['unitId'])[_0x159d32(0x154)](_0x232300=>_0x232300['threadId']===_0x490edc[_0x159d32(0x14f)]))==null?void 0x0:_0x4b8c1f[_0x159d32(0x185)];_0x99e61a&&this[_0x159d32(0x114)]['resolveComment'](_0x117158,_0x3aafe5,_0x99e61a['id'],_0x490edc[_0x159d32(0x166)]===_0x5cda73[_0x159d32(0x16f)]);break;}}}));}};_0x2c4030=_0xdbf4ec([_0x470027(0x0,_0x3d0190[_0x2d1c5a(0x182)](_0x3db026[_0x2d1c5a(0x16b)])),_0x470027(0x1,_0x3d0190[_0x2d1c5a(0x182)](_0x5c0884['ThreadCommentModel'])),_0x470027(0x2,_0x3d0190[_0x2d1c5a(0x182)](_0x3d0190[_0x2d1c5a(0x11c)])),_0x470027(0x3,_0x3d0190[_0x2d1c5a(0x182)](_0x3d0190['Injector']))],_0x2c4030);const _0x168b3a=_0x2d1c5a(0x12d),_0x5c96e1={};var _0x3f3071=Object[_0x2d1c5a(0x18e)],_0x4e1f86=Object['getOwnPropertyDescriptor'],_0x34829b=(_0x4ac3ab,_0x20f67f,_0x137e72,_0x56aa0f)=>{for(var _0x42b400=_0x56aa0f>0x1?void 0x0:_0x56aa0f?_0x4e1f86(_0x20f67f,_0x137e72):_0x20f67f,_0x382a88=_0x4ac3ab['length']-0x1,_0x583b56;_0x382a88>=0x0;_0x382a88--)(_0x583b56=_0x4ac3ab[_0x382a88])&&(_0x42b400=(_0x56aa0f?_0x583b56(_0x20f67f,_0x137e72,_0x42b400):_0x583b56(_0x42b400))||_0x42b400);return _0x56aa0f&&_0x42b400&&_0x3f3071(_0x20f67f,_0x137e72,_0x42b400),_0x42b400;},_0x5b385f=(_0x3179ab,_0x2379b8)=>(_0x4ad694,_0x3d031b)=>_0x2379b8(_0x4ad694,_0x3d031b,_0x3179ab);function _0x287c05(_0x334b3e,_0x1c3ac9){const _0x1da2de=_0x2d1c5a,_0x316913=_0x334b3e[_0x1da2de(0x116)][0x0];return{..._0x1c3ac9,'id':_0x316913[_0x1da2de(0x14e)],'resolved':_0x334b3e[_0x1da2de(0x166)]===0x1,'dT':_0x1d64e1(_0x316913[_0x1da2de(0x123)]),'personId':_0x316913[_0x1da2de(0x12a)],'threadId':_0x316913[_0x1da2de(0x14f)]};}function _0x4513b1(_0x5c5d7f,_0xee5259,_0x1ea201){const _0x1aa179=_0x2d1c5a;var _0x30e012,_0x4a60c9;if(((_0x4a60c9=(_0x30e012=_0x5c5d7f==null?void 0x0:_0x5c5d7f['replies'])==null?void 0x0:_0x30e012[_0x1aa179(0x104)])!=null?_0x4a60c9:0x0)>0x0){const _0x33a106=(_0x413bee,_0x1ef023)=>({'id':_0x413bee[_0x1aa179(0x14e)],'threadId':_0x413bee['threadId'],'dT':_0x1d64e1(_0x413bee['createTimestamp']),'personId':_0x413bee['userId'],'resolved':_0x5c5d7f['solved']===_0x5cda73[_0x1aa179(0x16f)],'unitId':_0xee5259,'subUnitId':_0x1ea201,'text':JSON[_0x1aa179(0x164)](_0x413bee['content']),'parentId':_0x1ef023}),_0x2fcf35=_0x33a106(_0x5c5d7f['replies'][0x0]);return{..._0x2fcf35,'children':_0x5c5d7f[_0x1aa179(0x116)]['slice'](0x1)[_0x1aa179(0x17b)](_0x25c910=>_0x33a106(_0x25c910,_0x2fcf35['id']))};}return null;}let _0x4c567b=class{constructor(_0x504ccd,_0x440d1d,_0x13d849,_0x1e6654){const _0x21ba5d=_0x2d1c5a;this[_0x21ba5d(0x109)]=_0x504ccd,this[_0x21ba5d(0x151)]=_0x440d1d,this[_0x21ba5d(0x102)]=_0x13d849,this[_0x21ba5d(0x101)]=_0x1e6654;}async[_0x2d1c5a(0x126)](_0x2d47fd){const _0x30ca48=_0x2d1c5a;var _0x23c2b9,_0x54c2a1;const {parentId:_0x92c8a9,unitId:_0x5cc676,text:_0x3d84cf,threadId:_0x5735b3}=_0x2d47fd,_0x2e07a3=(_0x54c2a1=(_0x23c2b9=_0x3d84cf[_0x30ca48(0x135)])==null?void 0x0:_0x23c2b9['filter'](_0x3766f4=>_0x3766f4[_0x30ca48(0x15b)]===_0x3d0190[_0x30ca48(0x150)][_0x30ca48(0x18b)])[_0x30ca48(0x17b)](_0x3231ef=>_0x3231ef[_0x30ca48(0x122)]))!=null?_0x54c2a1:[],_0x57e106=JSON[_0x30ca48(0x14d)](_0x3d84cf),_0x44db1c=(await this[_0x30ca48(0x102)]['requireSession'](_0x5cc676))[_0x30ca48(0x18a)]();if(_0x92c8a9){const _0x20deb8={'memberId':_0x44db1c,'unitId':_0x5cc676,'content':_0x57e106,'mention':_0x2e07a3,'threadId':_0x5735b3},_0x5ed8eb=(await this['_httpService'][_0x30ca48(0x14b)]('/universer-api/comment/unit/'+_0x5cc676+_0x30ca48(0x192),{'body':_0x20deb8}))[_0x30ca48(0x141)][_0x30ca48(0x161)];return{..._0x2d47fd,'id':_0x5ed8eb[_0x30ca48(0x14e)],'dT':_0x3d0190[_0x30ca48(0x168)](+_0x5ed8eb[_0x30ca48(0x123)])['format'](_0x30ca48(0x17a)),'personId':_0x5ed8eb['userId']};}else{const _0x36ed66={'memberId':_0x44db1c,'unitId':_0x5cc676,'content':_0x57e106,'mention':_0x2e07a3},_0x2048d0=await this[_0x30ca48(0x109)][_0x30ca48(0x14b)](_0x30ca48(0x10a)+_0x5cc676+_0x30ca48(0x184),{'body':_0x36ed66});return _0x287c05(_0x2048d0[_0x30ca48(0x141)][_0x30ca48(0x17f)],_0x2d47fd);}}async[_0x2d1c5a(0x134)](_0xa03223){const _0x2b9009=_0x2d1c5a;var _0xd70d8b,_0x2971aa;const {text:_0xa9b207,unitId:_0x38e37f}=_0xa03223,_0x2a422d=(_0x2971aa=(_0xd70d8b=_0xa9b207[_0x2b9009(0x135)])==null?void 0x0:_0xd70d8b[_0x2b9009(0x175)](_0x2e447c=>_0x2e447c['rangeType']===_0x3d0190[_0x2b9009(0x150)]['COMMENT'])[_0x2b9009(0x17b)](_0x2a0ee2=>_0x2a0ee2[_0x2b9009(0x122)]))!=null?_0x2971aa:[],_0x27365a=JSON[_0x2b9009(0x14d)](_0xa9b207),_0xa8dbb2=_0xa03223[_0x2b9009(0x14f)],_0x32e73c=_0xa03223['id'],_0x30dbfc={'memberId':(await this[_0x2b9009(0x102)][_0x2b9009(0x11e)](_0x38e37f))['getMemberID'](),'unitId':_0x38e37f,'threadId':_0xa8dbb2,'mention':_0x2a422d,'content':_0x27365a,'replyId':_0x32e73c},_0x335d49=await this[_0x2b9009(0x109)]['post'](_0x2b9009(0x10a)+_0x38e37f+_0x2b9009(0x13f),{'body':_0x30dbfc});return!_0x335d49[_0x2b9009(0x141)][_0x2b9009(0x132)]||_0x335d49['body']['error'][_0x2b9009(0x107)]===0x1;}async[_0x2d1c5a(0x13e)](_0x25130f){const _0x3f746e=_0x2d1c5a,{unitId:_0x45df06}=_0x25130f,_0x4b542f=_0x25130f[_0x3f746e(0x14f)],_0x458032={'memberId':this['_userService'][_0x3f746e(0x10b)]()['userID'],'unitId':_0x45df06,'threadId':_0x4b542f,'solved':_0x25130f[_0x3f746e(0x138)]?_0x5cda73[_0x3f746e(0x16f)]:_0x5cda73[_0x3f746e(0x121)]},_0x5d5e33=await this[_0x3f746e(0x109)][_0x3f746e(0x14b)](_0x3f746e(0x10a)+_0x45df06+_0x3f746e(0x186),{'body':_0x458032});return!_0x5d5e33[_0x3f746e(0x141)]['error']||_0x5d5e33[_0x3f746e(0x141)][_0x3f746e(0x132)][_0x3f746e(0x107)]===0x1;}async[_0x2d1c5a(0x140)](_0x4bf704,_0x13e9f4,_0x4a7c8d,_0x3aaf08){const _0x2b2280=_0x2d1c5a,_0x2f3900={'memberId':(await this[_0x2b2280(0x102)][_0x2b2280(0x11e)](_0x4bf704))[_0x2b2280(0x18a)](),'threadId':_0x4a7c8d,'replyId':_0x3aaf08,'unitId':_0x4bf704},_0xc6ccca=await this[_0x2b2280(0x109)][_0x2b2280(0x14b)]('/universer-api/comment/unit/'+_0x4bf704+_0x2b2280(0x172),{'body':_0x2f3900});return!_0xc6ccca[_0x2b2280(0x141)][_0x2b2280(0x132)]||_0xc6ccca[_0x2b2280(0x141)][_0x2b2280(0x132)]['code']===0x1;}async['listComments'](_0x4daf68,_0x3df24c,_0x30e3d8){const _0x5d19cd=_0x2d1c5a,_0x76a77c={'unitId':_0x4daf68,'threadId':_0x30e3d8},_0x2dd97e=await this[_0x5d19cd(0x109)]['post'](_0x5d19cd(0x10a)+_0x4daf68+_0x5d19cd(0x179),{'body':_0x76a77c}),_0x3e6e53=_0x30e3d8[_0x5d19cd(0x17b)](_0x3a0879=>_0x4513b1(_0x2dd97e['body']['comments'][_0x3a0879],_0x4daf68,_0x3df24c))['filter'](Boolean);return Object[_0x5d19cd(0x112)](_0x2dd97e[_0x5d19cd(0x141)][_0x5d19cd(0x177)])[_0x5d19cd(0x11d)](_0x4e7ff0=>{const _0x434fbd=_0x5d19cd;this['_userService'][_0x434fbd(0x111)](_0x4e7ff0);}),_0x3e6e53;}['saveCommentToSnapshot'](_0x2a7527){const _0x25447e=_0x2d1c5a;return{'id':_0x2a7527['id'],'threadId':_0x2a7527[_0x25447e(0x14f)],'ref':_0x2a7527[_0x25447e(0x11b)]};}};_0x4c567b=_0x34829b([_0x5b385f(0x0,_0x3d0190[_0x2d1c5a(0x182)](_0x49bd93['HTTPService'])),_0x5b385f(0x1,_0x3d0190[_0x2d1c5a(0x182)](_0x3d0190[_0x2d1c5a(0x11c)])),_0x5b385f(0x2,_0x3d0190[_0x2d1c5a(0x182)](_0x3db026[_0x2d1c5a(0x10c)])),_0x5b385f(0x3,_0x3d0190[_0x2d1c5a(0x182)](_0x3d0190[_0x2d1c5a(0x10f)]))],_0x4c567b);var _0x570b55=Object[_0x2d1c5a(0x18e)],_0x4c869a=Object[_0x2d1c5a(0x145)],_0x2bb772=(_0x5d19b3,_0x75698f,_0x41601e,_0x4776a3)=>{const _0x42d174=_0x2d1c5a;for(var _0x5d00a1=_0x4776a3>0x1?void 0x0:_0x4776a3?_0x4c869a(_0x75698f,_0x41601e):_0x75698f,_0x372fde=_0x5d19b3[_0x42d174(0x104)]-0x1,_0x2d1d7c;_0x372fde>=0x0;_0x372fde--)(_0x2d1d7c=_0x5d19b3[_0x372fde])&&(_0x5d00a1=(_0x4776a3?_0x2d1d7c(_0x75698f,_0x41601e,_0x5d00a1):_0x2d1d7c(_0x5d00a1))||_0x5d00a1);return _0x4776a3&&_0x5d00a1&&_0x570b55(_0x75698f,_0x41601e,_0x5d00a1),_0x5d00a1;},_0x49a366=(_0x4fbd56,_0x28563b)=>(_0x62fef0,_0x2e0de7)=>_0x28563b(_0x62fef0,_0x2e0de7,_0x4fbd56);let _0x6c0c22=class{constructor(_0x8dc74c){const _0x9e5a88=_0x2d1c5a;this[_0x9e5a88(0x109)]=_0x8dc74c;}async[_0x2d1c5a(0x12e)](_0x44bee6,_0x20771b,_0x304520){const _0x58ba96=_0x2d1c5a,_0x5c5129=new URL(window[_0x58ba96(0x18d)][_0x58ba96(0x173)])['searchParams'][_0x58ba96(0x191)](_0x58ba96(0x110));if(!_0x5c5129)return[];const _0x45b2ad=window['location'][_0x58ba96(0x148)],_0x371842=window[_0x58ba96(0x18d)][_0x58ba96(0x158)]===_0x58ba96(0x12f)?_0x58ba96(0x165):_0x58ba96(0x13a);return(await this[_0x58ba96(0x109)][_0x58ba96(0x191)](_0x371842+_0x58ba96(0x149)+_0x45b2ad+_0x58ba96(0x103),{'params':{'objectID':_0x5c5129,'unitID':_0x5c5129}}))[_0x58ba96(0x141)][_0x58ba96(0x108)]['map'](_0x2a842b=>{const _0x1b1849=_0x58ba96;var _0x1e4d30,_0xf43929,_0x5015c8,_0x1c8f43,_0x561c23,_0x131e08;return{'id':(_0xf43929=(_0x1e4d30=_0x2a842b[_0x1b1849(0x113)])==null?void 0x0:_0x1e4d30[_0x1b1849(0x171)])!=null?_0xf43929:'','label':(_0x1c8f43=(_0x5015c8=_0x2a842b[_0x1b1849(0x113)])==null?void 0x0:_0x5015c8[_0x1b1849(0x15c)])!=null?_0x1c8f43:'','icon':(_0x131e08=(_0x561c23=_0x2a842b[_0x1b1849(0x113)])==null?void 0x0:_0x561c23[_0x1b1849(0x133)])!=null?_0x131e08:'','type':_0x1b1849(0x130)};});}};_0x6c0c22=_0x2bb772([_0x49a366(0x0,_0x3d0190[_0x2d1c5a(0x182)](_0x49bd93[_0x2d1c5a(0x176)]))],_0x6c0c22);var _0x37496f=Object[_0x2d1c5a(0x18e)],_0x2a227c=Object[_0x2d1c5a(0x145)],_0x4d0464=(_0xd2a913,_0x87dbce,_0x5883ab,_0x51ad35)=>{for(var _0x14a9f4=_0x51ad35>0x1?void 0x0:_0x51ad35?_0x2a227c(_0x87dbce,_0x5883ab):_0x87dbce,_0x44abcb=_0xd2a913['length']-0x1,_0x5f82e1;_0x44abcb>=0x0;_0x44abcb--)(_0x5f82e1=_0xd2a913[_0x44abcb])&&(_0x14a9f4=(_0x51ad35?_0x5f82e1(_0x87dbce,_0x5883ab,_0x14a9f4):_0x5f82e1(_0x14a9f4))||_0x14a9f4);return _0x51ad35&&_0x14a9f4&&_0x37496f(_0x87dbce,_0x5883ab,_0x14a9f4),_0x14a9f4;},_0x434cce=(_0x1e9d3e,_0x140f0b)=>(_0x18600b,_0x5bb0a4)=>_0x140f0b(_0x18600b,_0x5bb0a4,_0x1e9d3e);let _0x3d1a79=class extends _0x3d0190[_0x2d1c5a(0x125)]{constructor(_0x3b6ddb,_0x357b76,_0x337cf9,_0x481722){const _0x165423=_0x2d1c5a;super(),this[_0x165423(0x142)]=_0x3b6ddb,this[_0x165423(0x17c)]=_0x357b76,this[_0x165423(0x136)]=_0x337cf9,this[_0x165423(0x146)]=_0x481722,this[_0x165423(0x190)]();}[_0x2d1c5a(0x190)](){const _0x38ca74=_0x2d1c5a;this[_0x38ca74(0x142)][_0x38ca74(0x15a)]=this[_0x38ca74(0x17c)],this[_0x38ca74(0x142)][_0x38ca74(0x152)]=!0x1,this[_0x38ca74(0x136)]['dataSource']=this[_0x38ca74(0x146)];}};_0x3d1a79=_0x4d0464([_0x434cce(0x0,_0x5c0884['IThreadCommentDataSourceService']),_0x434cce(0x1,_0x3d0190[_0x2d1c5a(0x182)](_0x4c567b)),_0x434cce(0x2,_0x3ed21d[_0x2d1c5a(0x14c)]),_0x434cce(0x3,_0x3d0190[_0x2d1c5a(0x182)](_0x6c0c22))],_0x3d1a79);var _0x25b1bc=Object[_0x2d1c5a(0x18e)],_0x271190=Object[_0x2d1c5a(0x145)],_0x51ac44=(_0x241833,_0x23df0b,_0x468956)=>_0x23df0b in _0x241833?_0x25b1bc(_0x241833,_0x23df0b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x468956}):_0x241833[_0x23df0b]=_0x468956,_0x222d11=(_0x2385c4,_0x1ead91,_0x5319db,_0x2527a7)=>{const _0x478081=_0x2d1c5a;for(var _0x55b4d9=_0x2527a7>0x1?void 0x0:_0x2527a7?_0x271190(_0x1ead91,_0x5319db):_0x1ead91,_0x5b3d36=_0x2385c4[_0x478081(0x104)]-0x1,_0x196bb6;_0x5b3d36>=0x0;_0x5b3d36--)(_0x196bb6=_0x2385c4[_0x5b3d36])&&(_0x55b4d9=(_0x2527a7?_0x196bb6(_0x1ead91,_0x5319db,_0x55b4d9):_0x196bb6(_0x55b4d9))||_0x55b4d9);return _0x2527a7&&_0x55b4d9&&_0x25b1bc(_0x1ead91,_0x5319db,_0x55b4d9),_0x55b4d9;},_0x54454a=(_0x412be0,_0x463a27)=>(_0x108220,_0x1cfaae)=>_0x463a27(_0x108220,_0x1cfaae,_0x412be0),_0x3d7f66=(_0x3bb133,_0x545864,_0x5eac52)=>_0x51ac44(_0x3bb133,typeof _0x545864!=_0x2d1c5a(0x11a)?_0x545864+'':_0x545864,_0x5eac52);_0x17a296[_0x2d1c5a(0x159)]=class extends _0x3d0190[_0x2d1c5a(0x10e)]{constructor(_0x54fd89=_0x5c96e1,_0x322218,_0x48bb3f){const _0x37d3fc=_0x2d1c5a;super(),this['_config']=_0x54fd89,this['_injector']=_0x322218,this['_configService']=_0x48bb3f;const {..._0x3fd3f9}=this[_0x37d3fc(0x169)];this[_0x37d3fc(0x170)][_0x37d3fc(0x189)](_0x168b3a,_0x3fd3f9);}[_0x2d1c5a(0x131)](){const _0x2e3fbe=_0x2d1c5a;[[_0x6c0c22],[_0x4c567b],[_0x3d1a79],[_0x2c4030]][_0x2e3fbe(0x11d)](_0x3c3c13=>{const _0x20958e=_0x2e3fbe;this['_injector'][_0x20958e(0x139)](_0x3c3c13);});}[_0x2d1c5a(0x10d)](){const _0x31eae9=_0x2d1c5a;this[_0x31eae9(0x101)]['get'](_0x3d1a79),this[_0x31eae9(0x101)][_0x31eae9(0x191)](_0x2c4030);}},_0x3d7f66(_0x17a296['UniverThreadCommentDataSourcePlugin'],_0x2d1c5a(0x13c),_0x581514),_0x3d7f66(_0x17a296[_0x2d1c5a(0x159)],'type',_0x3d0190[_0x2d1c5a(0x129)][_0x2d1c5a(0x153)]),_0x17a296[_0x2d1c5a(0x159)]=_0x222d11([_0x3d0190['DependentOn'](_0x3ed21d['UniverThreadCommentUIPlugin'],_0x3db026[_0x2d1c5a(0x115)],_0x51384d[_0x2d1c5a(0x118)]),_0x54454a(0x1,_0x3d0190[_0x2d1c5a(0x182)](_0x3d0190[_0x2d1c5a(0x10f)])),_0x54454a(0x2,_0x3d0190['IConfigService'])],_0x17a296[_0x2d1c5a(0x159)]),Object['defineProperty'](_0x17a296,Symbol[_0x2d1c5a(0x14a)],{'value':'Module'});}));function _0x45cb(){const _0x4c3ba6=['delete','Disposable','addComment','_initUserSync','rxjs','UniverInstanceType','userId','UniverNetwork','Unknown','thread-comment-data-source.config','getMentions','https:','user','onStarting','error','avatar','updateComment','customRanges','_threadCommentMentionDataService','UNRECOGNIZED','resolved','add','http','@univerjs/thread-comment','pluginName','@univerjs/thread-comment-ui','resolveComment','/edit','deleteComment','body','_threadCommentDataSourceService','UniverProThreadCommentDatasource','UniverThreadComment','getOwnPropertyDescriptor','_threadCommentMentionDataSource','6846820HIrJlY','host','://','toStringTag','post','IThreadCommentMentionDataService','stringify','replyId','threadId','CustomRangeType','_userService','syncUpdateMutationToColla','UNIVER_UNKNOWN','find','748670RYfhYR','size','14296464KKikiZ','protocol','UniverThreadCommentDataSourcePlugin','dataSource','rangeType','name','580ElmYGS','bufferTime','Delete','UniverProLicense','reply','personId','Solve','parse','https','solved','subscribe','dayjs','_config','commentUpdate$','CommentService','4782FSQpvV','UniverProCollaborationClient','object','Solved','_configService','userID','/delete','href','getUnit','filter','HTTPService','users','@univerjs-pro/collaboration-client','/list','YYYY/MM/DD\x20HH:mm','map','_threadCommentDataSource','unitId','payload','comment','content','13615oBUuuF','Inject','getComment','/add','root','/solved','UniverThreadCommentUi','@univerjs/core','setConfig','getMemberID','COMMENT','7362024zfVyhe','location','defineProperty','Edit','_initDataSource','get','/reply','14718WcxWkQ','Reply','Add','disposeWithMe','pipe','_injector','_sessionService','/universer-api/authz/collaborator','length','@univerjs-pro/license','exports','code','collaborators','_httpService','/universer-api/comment/unit/','getCurrentUser','CollaborationSessionService','onReady','Plugin','Injector','unit','addUser','values','subject','_threadCommentModel','UniverCollaborationClientPlugin','replies','type','UniverLicensePlugin','2532470kOXJCz','symbol','ref','UserManagerService','forEach','requireSession','_commentService','@univerjs/network','OpenOrReOpen','rangeId','createTimestamp'];_0x45cb=function(){return _0x4c3ba6;};return _0x45cb();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.5.0-beta.0",
3
+ "version": "0.5.0-beta.1",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.5.0-beta.0",
49
- "@univerjs/core": "0.5.0-beta.0",
50
- "@univerjs-pro/license": "0.5.0-beta.0",
51
- "@univerjs/network": "0.5.0-beta.0",
52
- "@univerjs/thread-comment-ui": "0.5.0-beta.0",
53
- "@univerjs/thread-comment": "0.5.0-beta.0",
54
- "@univerjs/protocol": "0.1.39-alpha.45"
48
+ "@univerjs-pro/collaboration-client": "0.5.0-beta.1",
49
+ "@univerjs-pro/license": "0.5.0-beta.1",
50
+ "@univerjs/network": "0.5.0-beta.1",
51
+ "@univerjs/protocol": "0.1.39-alpha.45",
52
+ "@univerjs/core": "0.5.0-beta.1",
53
+ "@univerjs/thread-comment": "0.5.0-beta.1",
54
+ "@univerjs/thread-comment-ui": "0.5.0-beta.1"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.6.3",
59
59
  "vite": "^5.4.11",
60
60
  "vitest": "^2.1.5",
61
- "@univerjs-infra/shared": "0.5.0-beta.0"
61
+ "@univerjs-infra/shared": "0.5.0-beta.1"
62
62
  },
63
63
  "space": {
64
64
  ".": {