@univerjs-pro/thread-comment-datasource 0.12.4-experimental.20251210-8d33c6e → 0.12.4-experimental.20251210-29c379a

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 _0x28d56f=_0xa6c0;(function(_0x18585f,_0x4ba20f){const _0x2d4015=_0xa6c0,_0x3f62b0=_0x18585f();while(!![]){try{const _0x22489d=-parseInt(_0x2d4015(0x22e))/0x1+-parseInt(_0x2d4015(0x21e))/0x2+parseInt(_0x2d4015(0x205))/0x3+-parseInt(_0x2d4015(0x1db))/0x4+-parseInt(_0x2d4015(0x208))/0x5+-parseInt(_0x2d4015(0x202))/0x6*(-parseInt(_0x2d4015(0x1de))/0x7)+parseInt(_0x2d4015(0x23d))/0x8;if(_0x22489d===_0x4ba20f)break;else _0x3f62b0['push'](_0x3f62b0['shift']());}catch(_0x22586e){_0x3f62b0['push'](_0x3f62b0['shift']());}}}(_0x4240,0xdcb17));Object[_0x28d56f(0x1e2)](exports,Symbol[_0x28d56f(0x1d9)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x28d56f(0x1ed);function _0xa6c0(_0x3b0839,_0x5af8dd){_0x3b0839=_0x3b0839-0x1cc;const _0x4240fb=_0x4240();let _0xa6c063=_0x4240fb[_0x3b0839];return _0xa6c063;}var I=(_0x30daf0=>(_0x30daf0[_0x30daf0[_0x28d56f(0x1e7)]=0x0]=_0x28d56f(0x1e7),_0x30daf0[_0x30daf0[_0x28d56f(0x1f1)]=0x1]=_0x28d56f(0x1f1),_0x30daf0[_0x30daf0[_0x28d56f(0x1e1)]=-0x1]=_0x28d56f(0x1e1),_0x30daf0))(I||{}),v=(_0x39f364=>(_0x39f364[_0x39f364[_0x28d56f(0x1fd)]=0x0]=_0x28d56f(0x1fd),_0x39f364[_0x39f364[_0x28d56f(0x1e5)]=0x1]=_0x28d56f(0x1e5),_0x39f364[_0x39f364['Reply']=0x2]=_0x28d56f(0x225),_0x39f364[_0x39f364['Edit']=0x3]=_0x28d56f(0x1d3),_0x39f364[_0x39f364['Delete']=0x4]=_0x28d56f(0x209),_0x39f364[_0x39f364['Solve']=0x5]=_0x28d56f(0x1e4),_0x39f364[_0x39f364[_0x28d56f(0x1e1)]=-0x1]=_0x28d56f(0x1e1),_0x39f364))(v||{});const f=_0x1ed9a5=>c[_0x28d56f(0x1e9)](new Date(+_0x1ed9a5))[_0x28d56f(0x22a)](_0x28d56f(0x223)),R=async(_0x36c6fe,_0x4f428c)=>{const _0x5a78a9=_0x28d56f,_0x58c1e4=_0x36c6fe[_0x5a78a9(0x224)](c[_0x5a78a9(0x217)]),_0x5e2531=_0x36c6fe[_0x5a78a9(0x224)](P[_0x5a78a9(0x1ec)]);_0x4f428c['forEach'](_0x4ea9b8=>{const _0x38a885=_0x5a78a9;_0x58c1e4[_0x38a885(0x1d0)](_0x4ea9b8)&&_0x4f428c[_0x38a885(0x220)](_0x4ea9b8);}),_0x4f428c[_0x5a78a9(0x23a)]&&(await _0x5e2531['get'](_0x5a78a9(0x200),{'params':{'userIDs':[..._0x4f428c]}}))['body']['users']['forEach'](_0x213201=>{const _0x596385=_0x5a78a9;_0x213201&&_0x58c1e4[_0x596385(0x218)](_0x213201);});};var $=Object[_0x28d56f(0x1e8)],E=(_0x2d6d77,_0x21a4e8,_0xd0357b,_0x4d91ff)=>{const _0x41a01f=_0x28d56f;for(var _0x411914=_0x4d91ff>0x1?void 0x0:_0x4d91ff?$(_0x21a4e8,_0xd0357b):_0x21a4e8,_0x53addd=_0x2d6d77[_0x41a01f(0x20b)]-0x1,_0x5c9e2c;_0x53addd>=0x0;_0x53addd--)(_0x5c9e2c=_0x2d6d77[_0x53addd])&&(_0x411914=_0x5c9e2c(_0x411914)||_0x411914);return _0x411914;},S=(_0x1fc235,_0x423dde)=>(_0x47f8d1,_0x483375)=>_0x423dde(_0x47f8d1,_0x483375,_0x1fc235);let _=class extends c[_0x28d56f(0x240)]{constructor(_0x2ea5d2,_0x2798d4,_0x4bc340,_0x4e06b2){const _0x298117=_0x28d56f;super(),this['_commentService']=_0x2ea5d2,this['_threadCommentModel']=_0x2798d4,this[_0x298117(0x20a)]=_0x4bc340,this[_0x298117(0x21d)]=_0x4e06b2,this[_0x298117(0x1ef)](),this[_0x298117(0x228)]();}[_0x28d56f(0x228)](){const _0x1e9553=_0x28d56f;this[_0x1e9553(0x206)](this[_0x1e9553(0x216)]['commentUpdate$'][_0x1e9553(0x203)](j[_0x1e9553(0x1d5)](0x10))[_0x1e9553(0x207)](_0x1e8472=>{const _0x467132=_0x1e9553,_0x47e0a9=new Set();_0x1e8472['forEach'](_0x52d306=>{const _0x5b0a28=_0xa6c0;switch(_0x52d306[_0x5b0a28(0x1d7)]){case'add':{const _0x3fdc64=_0x52d306[_0x5b0a28(0x1fc)][_0x5b0a28(0x239)];_0x47e0a9[_0x5b0a28(0x231)](_0x3fdc64);break;}}}),R(this[_0x467132(0x21d)],_0x47e0a9);}));}[_0x28d56f(0x1ef)](){const _0x3e6f68=_0x28d56f;this[_0x3e6f68(0x206)](this[_0x3e6f68(0x23b)][_0x3e6f68(0x234)][_0x3e6f68(0x207)](async _0x565678=>{const _0x315926=_0x3e6f68;var _0x68f716,_0x3f4691,_0x3c4cb3,_0x10beb1;const _0x4aa3d5=(_0x68f716=this[_0x315926(0x216)][_0x315926(0x1cd)](_0x565678[_0x315926(0x1e3)])[_0x315926(0x219)](_0x520b59=>_0x520b59[_0x315926(0x21a)]===_0x565678[_0x315926(0x21a)]))==null?void 0x0:_0x68f716[_0x315926(0x1f4)];if(!_0x4aa3d5)return;const {unitId:_0x78e629,subUnitId:_0x282c8d}=_0x4aa3d5;switch(_0x565678[_0x315926(0x1d1)]&&this[_0x315926(0x20a)][_0x315926(0x218)](_0x565678[_0x315926(0x1d1)]),_0x565678[_0x315926(0x1d7)]){case v[_0x315926(0x1e5)]:break;case v[_0x315926(0x225)]:{this[_0x315926(0x216)][_0x315926(0x1f5)](_0x78e629,_0x282c8d,{'unitId':_0x78e629,'subUnitId':_0x282c8d,'ref':'','id':_0x565678[_0x315926(0x1f7)],'dT':f(+_0x565678[_0x315926(0x1da)]),'threadId':_0x565678[_0x315926(0x21a)],'personId':(_0x3c4cb3=(_0x3f4691=_0x565678['user'])==null?void 0x0:_0x3f4691[_0x315926(0x1f9)])!=null?_0x3c4cb3:_0x565678['userId'],'text':JSON[_0x315926(0x1dd)](_0x565678[_0x315926(0x22d)]),'parentId':_0x4aa3d5['id']});break;}case v[_0x315926(0x209)]:{const _0x345061=this[_0x315926(0x216)][_0x315926(0x21f)](_0x78e629,_0x282c8d,_0x565678['replyId']);_0x345061&&_0x345061['parentId']&&this['_threadCommentModel'][_0x315926(0x214)](_0x78e629,_0x282c8d,_0x565678[_0x315926(0x1f7)]);break;}case v[_0x315926(0x1d3)]:{this[_0x315926(0x216)][_0x315926(0x23c)](_0x78e629,_0x282c8d,{'commentId':_0x565678[_0x315926(0x1f7)],'text':JSON['parse'](_0x565678['content'])});break;}case v[_0x315926(0x1e4)]:{const _0x4f84c0=(_0x10beb1=this[_0x315926(0x216)][_0x315926(0x1cd)](_0x565678[_0x315926(0x1e3)])['find'](_0x5e4b5b=>_0x5e4b5b[_0x315926(0x21a)]===_0x565678[_0x315926(0x21a)]))==null?void 0x0:_0x10beb1[_0x315926(0x1f4)];_0x4f84c0&&this[_0x315926(0x216)][_0x315926(0x1fe)](_0x78e629,_0x282c8d,_0x4f84c0['id'],_0x565678[_0x315926(0x1d8)]===I[_0x315926(0x1f1)]);break;}}}));}};function _0x4240(){const _0x5ca9af=['UniverInstanceType','_threadCommentDataSourceService','ThreadCommentModel','thread-comment-data-source.config','requireSession','getUnit','/list','CustomRangeType','getUser','user','rangeId','Edit','saveCommentToSnapshot','bufferTime','Inject','type','solved','toStringTag','createTimestamp','5528652bUvOwL','getCurrentUser','parse','186011WOIwUp','symbol','resolved','UNRECOGNIZED','defineProperty','unitId','Solve','Add','forEach','OpenOrReOpen','getOwnPropertyDescriptor','dayjs','rangeType','syncUpdateMutationToColla','HTTPService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','slice','_init','getMemberID','Solved','ref','map','root','addComment','customRanges','replyId','onStarting','userID','_httpService','_sessionService','payload','Unknown','resolveComment','DependentOn','/universer-api/user/list','comments','30OuCZxi','pipe','_configService','4842231KvmAAL','disposeWithMe','subscribe','4288345wRVwUy','Delete','_userService','length','_threadCommentDataSource','values','Injector','onReady','UniverThreadCommentUIPlugin','/reply','/add','error','deleteComment','Plugin','_threadCommentModel','UserManagerService','addUser','find','threadId','comment','/universer-api/comment/unit/','_injector','1966776HoiUmT','getComment','delete','code','listComments','YYYY/MM/DD\x20HH:mm','get','Reply','CommentService','filter','_initUserSync','/solved','format','UniverCollaborationClientPlugin','COMMENT','content','1171837qNmdoM','post','body','add','/delete','UniverThreadCommentDataSourcePlugin','commentUpdate$','_config','UNIVER_UNKNOWN','CollaborationSessionService','replies','personId','size','_commentService','updateComment','28416592UBEOvQ','userId','_initDataSource','Disposable'];_0x4240=function(){return _0x5ca9af;};return _0x4240();}_=E([S(0x0,c[_0x28d56f(0x1d6)](b[_0x28d56f(0x226)])),S(0x1,c['Inject'](M[_0x28d56f(0x243)])),S(0x2,c[_0x28d56f(0x1d6)](c['UserManagerService'])),S(0x3,c[_0x28d56f(0x1d6)](c[_0x28d56f(0x20e)]))],_);const q=_0x28d56f(0x244),D={};var A=Object[_0x28d56f(0x1e8)],x=(_0x223d2c,_0x3f383c,_0x87e35c,_0x138e1e)=>{for(var _0x5af175=_0x138e1e>0x1?void 0x0:_0x138e1e?A(_0x3f383c,_0x87e35c):_0x3f383c,_0x2a21e1=_0x223d2c['length']-0x1,_0x887c43;_0x2a21e1>=0x0;_0x2a21e1--)(_0x887c43=_0x223d2c[_0x2a21e1])&&(_0x5af175=_0x887c43(_0x5af175)||_0x5af175);return _0x5af175;},C=(_0x394ee3,_0x3f077a)=>(_0x24b19c,_0xee089d)=>_0x3f077a(_0x24b19c,_0xee089d,_0x394ee3);function Y(_0x2bbd2a,_0x29ec0c){const _0x5688cf=_0x28d56f,_0x2a7a5e=_0x2bbd2a[_0x5688cf(0x238)][0x0];return{..._0x29ec0c,'id':_0x2a7a5e['replyId'],'resolved':_0x2bbd2a[_0x5688cf(0x1d8)]===0x1,'dT':f(_0x2a7a5e['createTimestamp']),'personId':_0x2a7a5e['userId'],'threadId':_0x2a7a5e[_0x5688cf(0x21a)]};}function G(_0x596c93,_0x3b07ee,_0x5f510f){const _0x4b7698=_0x28d56f;var _0x2e3a0e,_0x1d6f7e;if(((_0x1d6f7e=(_0x2e3a0e=_0x596c93==null?void 0x0:_0x596c93[_0x4b7698(0x238)])==null?void 0x0:_0x2e3a0e['length'])!=null?_0x1d6f7e:0x0)>0x0){const _0x418c1f=(_0x45740b,_0x1790ec)=>({'id':_0x45740b[_0x4b7698(0x1f7)],'threadId':_0x45740b['threadId'],'dT':f(_0x45740b[_0x4b7698(0x1da)]),'personId':_0x45740b[_0x4b7698(0x23e)],'resolved':_0x596c93[_0x4b7698(0x1d8)]===I[_0x4b7698(0x1f1)],'unitId':_0x3b07ee,'subUnitId':_0x5f510f,'text':JSON[_0x4b7698(0x1dd)](_0x45740b['content']),'parentId':_0x1790ec}),_0x31cf47=_0x418c1f(_0x596c93['replies'][0x0]);return{..._0x31cf47,'children':_0x596c93[_0x4b7698(0x238)][_0x4b7698(0x1ee)](0x1)[_0x4b7698(0x1f3)](_0x55ad72=>_0x418c1f(_0x55ad72,_0x31cf47['id']))};}return null;}let p=class{constructor(_0x3de022,_0x33ca90,_0x583fe7){const _0x32119c=_0x28d56f;this[_0x32119c(0x1fa)]=_0x3de022,this[_0x32119c(0x20a)]=_0x33ca90,this[_0x32119c(0x1fb)]=_0x583fe7;}async['addComment'](_0x5b2833){const _0x3f4703=_0x28d56f;var _0x4641fb,_0x2c89c7;const {parentId:_0xefef75,unitId:_0x3666c8,text:_0x16e396,threadId:_0x1b5f4a}=_0x5b2833,_0x3ac9ad=(_0x2c89c7=(_0x4641fb=_0x16e396['customRanges'])==null?void 0x0:_0x4641fb[_0x3f4703(0x227)](_0x2c6394=>_0x2c6394[_0x3f4703(0x1ea)]===c[_0x3f4703(0x1cf)][_0x3f4703(0x22c)])[_0x3f4703(0x1f3)](_0x35063f=>_0x35063f[_0x3f4703(0x1d2)]))!=null?_0x2c89c7:[],_0xcc4b33=JSON['stringify'](_0x16e396),_0x2506de=(await this[_0x3f4703(0x1fb)][_0x3f4703(0x1cc)](_0x3666c8))['getMemberID']();if(_0xefef75){const _0x134f54={'memberId':_0x2506de,'unitId':_0x3666c8,'content':_0xcc4b33,'mention':_0x3ac9ad,'threadId':_0x1b5f4a},_0x54cdf7=(await this[_0x3f4703(0x1fa)]['post'](_0x3f4703(0x21c)+_0x3666c8+_0x3f4703(0x211),{'body':_0x134f54}))['body']['reply'];return{..._0x5b2833,'id':_0x54cdf7['replyId'],'dT':c[_0x3f4703(0x1e9)](+_0x54cdf7[_0x3f4703(0x1da)])[_0x3f4703(0x22a)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x54cdf7['userId']};}else{const _0x2c1fab={'memberId':_0x2506de,'unitId':_0x3666c8,'content':_0xcc4b33,'mention':_0x3ac9ad},_0x5291c8=await this['_httpService'][_0x3f4703(0x22f)](_0x3f4703(0x21c)+_0x3666c8+_0x3f4703(0x212),{'body':_0x2c1fab});return Y(_0x5291c8['body'][_0x3f4703(0x21b)],_0x5b2833);}}async[_0x28d56f(0x23c)](_0x30ebc1){const _0x1eb27b=_0x28d56f;var _0x3bdbc8,_0x43c0b5;const {text:_0x2cdc64,unitId:_0x235fcf}=_0x30ebc1,_0xd2eb8=(_0x43c0b5=(_0x3bdbc8=_0x2cdc64[_0x1eb27b(0x1f6)])==null?void 0x0:_0x3bdbc8['filter'](_0xe409da=>_0xe409da[_0x1eb27b(0x1ea)]===c['CustomRangeType'][_0x1eb27b(0x22c)])[_0x1eb27b(0x1f3)](_0x26443f=>_0x26443f[_0x1eb27b(0x1d2)]))!=null?_0x43c0b5:[],_0x2f8c72=JSON['stringify'](_0x2cdc64),_0x4a0ad2=_0x30ebc1[_0x1eb27b(0x21a)],_0x16d97c=_0x30ebc1['id'],_0x1198c7={'memberId':(await this['_sessionService'][_0x1eb27b(0x1cc)](_0x235fcf))[_0x1eb27b(0x1f0)](),'unitId':_0x235fcf,'threadId':_0x4a0ad2,'mention':_0xd2eb8,'content':_0x2f8c72,'replyId':_0x16d97c},_0x4c0977=await this[_0x1eb27b(0x1fa)][_0x1eb27b(0x22f)](_0x1eb27b(0x21c)+_0x235fcf+'/edit',{'body':_0x1198c7});return!_0x4c0977[_0x1eb27b(0x230)]['error']||_0x4c0977[_0x1eb27b(0x230)][_0x1eb27b(0x213)][_0x1eb27b(0x221)]===0x1;}async[_0x28d56f(0x1fe)](_0x46c185){const _0xa3cc9b=_0x28d56f,{unitId:_0x546617}=_0x46c185,_0x2196d2=_0x46c185[_0xa3cc9b(0x21a)],_0x383842={'memberId':this[_0xa3cc9b(0x20a)][_0xa3cc9b(0x1dc)]()['userID'],'unitId':_0x546617,'threadId':_0x2196d2,'solved':_0x46c185[_0xa3cc9b(0x1e0)]?I[_0xa3cc9b(0x1f1)]:I[_0xa3cc9b(0x1e7)]},_0x9fcbe1=await this[_0xa3cc9b(0x1fa)][_0xa3cc9b(0x22f)](_0xa3cc9b(0x21c)+_0x546617+_0xa3cc9b(0x229),{'body':_0x383842});return!_0x9fcbe1[_0xa3cc9b(0x230)][_0xa3cc9b(0x213)]||_0x9fcbe1['body'][_0xa3cc9b(0x213)]['code']===0x1;}async[_0x28d56f(0x214)](_0x3745e2,_0x4aaa93,_0xa10f7d,_0x174c32){const _0x594945=_0x28d56f,_0xd687ed={'memberId':(await this[_0x594945(0x1fb)][_0x594945(0x1cc)](_0x3745e2))[_0x594945(0x1f0)](),'threadId':_0xa10f7d,'replyId':_0x174c32,'unitId':_0x3745e2},_0x230b4c=await this['_httpService']['post'](_0x594945(0x21c)+_0x3745e2+_0x594945(0x232),{'body':_0xd687ed});return!_0x230b4c[_0x594945(0x230)][_0x594945(0x213)]||_0x230b4c[_0x594945(0x230)][_0x594945(0x213)][_0x594945(0x221)]===0x1;}async[_0x28d56f(0x222)](_0x1be9ba,_0x10bc87,_0x3d4aec){const _0xc48cdb=_0x28d56f,_0x52830b={'unitId':_0x1be9ba,'threadId':_0x3d4aec},_0x4ed1b6=await this[_0xc48cdb(0x1fa)][_0xc48cdb(0x22f)]('/universer-api/comment/unit/'+_0x1be9ba+_0xc48cdb(0x1ce),{'body':_0x52830b}),_0x38c029=_0x3d4aec['map'](_0x47a15d=>G(_0x4ed1b6[_0xc48cdb(0x230)][_0xc48cdb(0x201)][_0x47a15d],_0x1be9ba,_0x10bc87))['filter'](Boolean);return Object[_0xc48cdb(0x20d)](_0x4ed1b6[_0xc48cdb(0x230)]['users'])[_0xc48cdb(0x1e6)](_0x435856=>{const _0x54e831=_0xc48cdb;this['_userService'][_0x54e831(0x218)](_0x435856);}),_0x38c029;}[_0x28d56f(0x1d4)](_0x569c8e){const _0x17b3b2=_0x28d56f;return{'id':_0x569c8e['id'],'threadId':_0x569c8e['threadId'],'ref':_0x569c8e[_0x17b3b2(0x1f2)]};}};p=x([C(0x0,c[_0x28d56f(0x1d6)](P['HTTPService'])),C(0x1,c[_0x28d56f(0x1d6)](c[_0x28d56f(0x217)])),C(0x2,c[_0x28d56f(0x1d6)](b[_0x28d56f(0x237)]))],p);var H=Object[_0x28d56f(0x1e8)],J=(_0x36dccc,_0x20c3e1,_0x9406a8,_0x355012)=>{const _0x21d918=_0x28d56f;for(var _0x41291e=_0x355012>0x1?void 0x0:_0x355012?H(_0x20c3e1,_0x9406a8):_0x20c3e1,_0x1c62c0=_0x36dccc[_0x21d918(0x20b)]-0x1,_0x1294a5;_0x1c62c0>=0x0;_0x1c62c0--)(_0x1294a5=_0x36dccc[_0x1c62c0])&&(_0x41291e=_0x1294a5(_0x41291e)||_0x41291e);return _0x41291e;},y=(_0x35be39,_0x44e165)=>(_0xec0097,_0x2c4bbf)=>_0x44e165(_0xec0097,_0x2c4bbf,_0x35be39);let g=class extends c['Disposable']{constructor(_0xa27751,_0x3593f1){const _0x3b695c=_0x28d56f;super(),this[_0x3b695c(0x242)]=_0xa27751,this[_0x3b695c(0x20c)]=_0x3593f1,this[_0x3b695c(0x23f)]();}[_0x28d56f(0x23f)](){const _0x4f8bb2=_0x28d56f;this[_0x4f8bb2(0x242)]['dataSource']=this[_0x4f8bb2(0x20c)],this[_0x4f8bb2(0x242)][_0x4f8bb2(0x1eb)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x28d56f(0x1d6)](p))],g);var F=Object[_0x28d56f(0x1e2)],L=Object['getOwnPropertyDescriptor'],Z=(_0x2c76f6,_0x4fcfa8,_0x3fb0bb)=>_0x4fcfa8 in _0x2c76f6?F(_0x2c76f6,_0x4fcfa8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3fb0bb}):_0x2c76f6[_0x4fcfa8]=_0x3fb0bb,W=(_0x283ec0,_0x325550,_0x1a18f6,_0x229c56)=>{const _0x37dcea=_0x28d56f;for(var _0x1e9145=_0x229c56>0x1?void 0x0:_0x229c56?L(_0x325550,_0x1a18f6):_0x325550,_0x59dc0d=_0x283ec0[_0x37dcea(0x20b)]-0x1,_0x1f0343;_0x59dc0d>=0x0;_0x59dc0d--)(_0x1f0343=_0x283ec0[_0x59dc0d])&&(_0x1e9145=_0x1f0343(_0x1e9145)||_0x1e9145);return _0x1e9145;},O=(_0x59f610,_0x32d623)=>(_0x183832,_0x5f5750)=>_0x32d623(_0x183832,_0x5f5750,_0x59f610),N=(_0x355a68,_0x2463f8,_0x53221a)=>Z(_0x355a68,typeof _0x2463f8!=_0x28d56f(0x1df)?_0x2463f8+'':_0x2463f8,_0x53221a);exports[_0x28d56f(0x233)]=class extends c[_0x28d56f(0x215)]{constructor(_0x2715fe=D,_0x3ec710,_0x3ffb2f){const _0x677cc5=_0x28d56f;super(),this[_0x677cc5(0x235)]=_0x2715fe,this[_0x677cc5(0x21d)]=_0x3ec710,this[_0x677cc5(0x204)]=_0x3ffb2f;const {..._0x73481e}=c['merge']({},D,this[_0x677cc5(0x235)]);this[_0x677cc5(0x204)]['setConfig'](q,_0x73481e);}[_0x28d56f(0x1f8)](){const _0xe23203=_0x28d56f;[[p],[g],[_]][_0xe23203(0x1e6)](_0x48d4ce=>{const _0x381bb3=_0xe23203;this['_injector'][_0x381bb3(0x231)](_0x48d4ce);});}[_0x28d56f(0x20f)](){const _0x45d86b=_0x28d56f;this[_0x45d86b(0x21d)][_0x45d86b(0x224)](g),this[_0x45d86b(0x21d)][_0x45d86b(0x224)](_);}},N(exports[_0x28d56f(0x233)],'pluginName',U),N(exports[_0x28d56f(0x233)],'type',c[_0x28d56f(0x241)][_0x28d56f(0x236)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x28d56f(0x1ff)](w[_0x28d56f(0x210)],b[_0x28d56f(0x22b)],T['UniverLicensePlugin']),O(0x1,c[_0x28d56f(0x1d6)](c[_0x28d56f(0x20e)])),O(0x2,c['IConfigService'])],exports[_0x28d56f(0x233)]);
1
+ 'use strict';const _0x66c89=_0x347c;(function(_0x67cf03,_0x42dca9){const _0xae4057=_0x347c,_0x233d57=_0x67cf03();while(!![]){try{const _0x52db19=-parseInt(_0xae4057(0x148))/0x1*(parseInt(_0xae4057(0x18e))/0x2)+-parseInt(_0xae4057(0x162))/0x3+parseInt(_0xae4057(0x1a0))/0x4*(parseInt(_0xae4057(0x1a1))/0x5)+-parseInt(_0xae4057(0x147))/0x6*(parseInt(_0xae4057(0x1a8))/0x7)+-parseInt(_0xae4057(0x173))/0x8+-parseInt(_0xae4057(0x17c))/0x9+parseInt(_0xae4057(0x193))/0xa*(parseInt(_0xae4057(0x177))/0xb);if(_0x52db19===_0x42dca9)break;else _0x233d57['push'](_0x233d57['shift']());}catch(_0x48d094){_0x233d57['push'](_0x233d57['shift']());}}}(_0x385e,0x9845e));Object[_0x66c89(0x180)](exports,Symbol[_0x66c89(0x19b)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x66c89(0x175);var I=(_0x5d4ab0=>(_0x5d4ab0[_0x5d4ab0[_0x66c89(0x154)]=0x0]=_0x66c89(0x154),_0x5d4ab0[_0x5d4ab0[_0x66c89(0x18c)]=0x1]=_0x66c89(0x18c),_0x5d4ab0[_0x5d4ab0[_0x66c89(0x16b)]=-0x1]=_0x66c89(0x16b),_0x5d4ab0))(I||{}),v=(_0x4157fa=>(_0x4157fa[_0x4157fa['Unknown']=0x0]='Unknown',_0x4157fa[_0x4157fa[_0x66c89(0x166)]=0x1]='Add',_0x4157fa[_0x4157fa[_0x66c89(0x14c)]=0x2]='Reply',_0x4157fa[_0x4157fa[_0x66c89(0x1a2)]=0x3]=_0x66c89(0x1a2),_0x4157fa[_0x4157fa[_0x66c89(0x1b1)]=0x4]=_0x66c89(0x1b1),_0x4157fa[_0x4157fa['Solve']=0x5]='Solve',_0x4157fa[_0x4157fa[_0x66c89(0x16b)]=-0x1]=_0x66c89(0x16b),_0x4157fa))(v||{});const f=_0x2c5dee=>c[_0x66c89(0x192)](new Date(+_0x2c5dee))[_0x66c89(0x140)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x2acbcb,_0x3f262b)=>{const _0x595555=_0x66c89,_0x2048b4=_0x2acbcb[_0x595555(0x167)](c[_0x595555(0x159)]),_0x5a1327=_0x2acbcb[_0x595555(0x167)](P[_0x595555(0x1a7)]);_0x3f262b['forEach'](_0x1c321f=>{const _0x25f43a=_0x595555;_0x2048b4[_0x25f43a(0x1ae)](_0x1c321f)&&_0x3f262b['delete'](_0x1c321f);}),_0x3f262b[_0x595555(0x181)]&&(await _0x5a1327[_0x595555(0x167)](_0x595555(0x169),{'params':{'userIDs':[..._0x3f262b]}}))[_0x595555(0x182)][_0x595555(0x1a4)][_0x595555(0x198)](_0xb78124=>{_0xb78124&&_0x2048b4['addUser'](_0xb78124);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x47dc7b,_0x9f633,_0x36b723,_0x194f55)=>{const _0x221ee8=_0x66c89;for(var _0xefc8f3=_0x194f55>0x1?void 0x0:_0x194f55?$(_0x9f633,_0x36b723):_0x9f633,_0x4b9cd7=_0x47dc7b[_0x221ee8(0x19f)]-0x1,_0x482cf2;_0x4b9cd7>=0x0;_0x4b9cd7--)(_0x482cf2=_0x47dc7b[_0x4b9cd7])&&(_0xefc8f3=_0x482cf2(_0xefc8f3)||_0xefc8f3);return _0xefc8f3;},S=(_0x8b24e3,_0x32dcfd)=>(_0x34eb99,_0x314b64)=>_0x32dcfd(_0x34eb99,_0x314b64,_0x8b24e3);let _=class extends c['Disposable']{constructor(_0xb16d14,_0x4e1747,_0x12de62,_0x30e2b4){const _0x5ec4fd=_0x66c89;super(),this[_0x5ec4fd(0x184)]=_0xb16d14,this[_0x5ec4fd(0x1a5)]=_0x4e1747,this['_userService']=_0x12de62,this[_0x5ec4fd(0x15e)]=_0x30e2b4,this[_0x5ec4fd(0x172)](),this[_0x5ec4fd(0x19a)]();}['_initUserSync'](){const _0x54d6b8=_0x66c89;this[_0x54d6b8(0x142)](this['_threadCommentModel'][_0x54d6b8(0x171)][_0x54d6b8(0x153)](j['bufferTime'](0x10))[_0x54d6b8(0x1b0)](_0x3dff33=>{const _0xa2aad2=_0x54d6b8,_0x38d52c=new Set();_0x3dff33['forEach'](_0x1fedad=>{const _0x375c04=_0x347c;switch(_0x1fedad[_0x375c04(0x189)]){case _0x375c04(0x16c):{const _0x38079b=_0x1fedad[_0x375c04(0x179)]['personId'];_0x38d52c['add'](_0x38079b);break;}}}),R(this[_0xa2aad2(0x15e)],_0x38d52c);}));}['_init'](){const _0x52d70b=_0x66c89;this[_0x52d70b(0x142)](this[_0x52d70b(0x184)][_0x52d70b(0x171)]['subscribe'](async _0x158a15=>{const _0xc56e86=_0x52d70b;var _0xa4e34a,_0x23762c,_0x5c14b0,_0x52c322;const _0x3e5d01=(_0xa4e34a=this['_threadCommentModel'][_0xc56e86(0x178)](_0x158a15[_0xc56e86(0x18b)])[_0xc56e86(0x19d)](_0x2941dc=>_0x2941dc[_0xc56e86(0x158)]===_0x158a15[_0xc56e86(0x158)]))==null?void 0x0:_0xa4e34a['root'];if(!_0x3e5d01)return;const {unitId:_0x4a839b,subUnitId:_0x14fc09}=_0x3e5d01;switch(_0x158a15[_0xc56e86(0x168)]&&this[_0xc56e86(0x16a)][_0xc56e86(0x1aa)](_0x158a15['user']),_0x158a15['type']){case v['Add']:break;case v[_0xc56e86(0x14c)]:{this[_0xc56e86(0x1a5)][_0xc56e86(0x14a)](_0x4a839b,_0x14fc09,{'unitId':_0x4a839b,'subUnitId':_0x14fc09,'ref':'','id':_0x158a15[_0xc56e86(0x18f)],'dT':f(+_0x158a15['createTimestamp']),'threadId':_0x158a15[_0xc56e86(0x158)],'personId':(_0x5c14b0=(_0x23762c=_0x158a15[_0xc56e86(0x168)])==null?void 0x0:_0x23762c[_0xc56e86(0x143)])!=null?_0x5c14b0:_0x158a15[_0xc56e86(0x1a6)],'text':JSON['parse'](_0x158a15[_0xc56e86(0x144)]),'parentId':_0x3e5d01['id']});break;}case v[_0xc56e86(0x1b1)]:{const _0x3d657e=this[_0xc56e86(0x1a5)][_0xc56e86(0x146)](_0x4a839b,_0x14fc09,_0x158a15[_0xc56e86(0x18f)]);_0x3d657e&&_0x3d657e[_0xc56e86(0x186)]&&this[_0xc56e86(0x1a5)]['deleteComment'](_0x4a839b,_0x14fc09,_0x158a15[_0xc56e86(0x18f)]);break;}case v[_0xc56e86(0x1a2)]:{this[_0xc56e86(0x1a5)][_0xc56e86(0x190)](_0x4a839b,_0x14fc09,{'commentId':_0x158a15[_0xc56e86(0x18f)],'text':JSON[_0xc56e86(0x141)](_0x158a15[_0xc56e86(0x144)])});break;}case v[_0xc56e86(0x19e)]:{const _0x2173f9=(_0x52c322=this[_0xc56e86(0x1a5)]['getUnit'](_0x158a15[_0xc56e86(0x18b)])[_0xc56e86(0x19d)](_0xb02150=>_0xb02150[_0xc56e86(0x158)]===_0x158a15['threadId']))==null?void 0x0:_0x52c322['root'];_0x2173f9&&this['_threadCommentModel'][_0xc56e86(0x185)](_0x4a839b,_0x14fc09,_0x2173f9['id'],_0x158a15[_0xc56e86(0x14b)]===I[_0xc56e86(0x18c)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x66c89(0x17f)])),S(0x1,c[_0x66c89(0x160)](M['ThreadCommentModel'])),S(0x2,c[_0x66c89(0x160)](c['UserManagerService'])),S(0x3,c['Inject'](c['Injector']))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x66c89(0x15c)],x=(_0x245375,_0x44440b,_0x593c6c,_0x313d42)=>{const _0x4a989f=_0x66c89;for(var _0x4ce373=_0x313d42>0x1?void 0x0:_0x313d42?A(_0x44440b,_0x593c6c):_0x44440b,_0x20a6eb=_0x245375[_0x4a989f(0x19f)]-0x1,_0xae6ed2;_0x20a6eb>=0x0;_0x20a6eb--)(_0xae6ed2=_0x245375[_0x20a6eb])&&(_0x4ce373=_0xae6ed2(_0x4ce373)||_0x4ce373);return _0x4ce373;},C=(_0x13f766,_0xe22127)=>(_0x35757e,_0xb3a03a)=>_0xe22127(_0x35757e,_0xb3a03a,_0x13f766);function Y(_0xfe1d64,_0x43d95f){const _0x13c9fb=_0x66c89,_0x545ca6=_0xfe1d64['replies'][0x0];return{..._0x43d95f,'id':_0x545ca6[_0x13c9fb(0x18f)],'resolved':_0xfe1d64['solved']===0x1,'dT':f(_0x545ca6['createTimestamp']),'personId':_0x545ca6[_0x13c9fb(0x1a6)],'threadId':_0x545ca6[_0x13c9fb(0x158)]};}function G(_0x46435f,_0x25a935,_0x4db982){const _0x27ab42=_0x66c89;var _0xf53a83,_0x8f493d;if(((_0x8f493d=(_0xf53a83=_0x46435f==null?void 0x0:_0x46435f[_0x27ab42(0x174)])==null?void 0x0:_0xf53a83['length'])!=null?_0x8f493d:0x0)>0x0){const _0x112740=(_0x5072fe,_0x5214c4)=>({'id':_0x5072fe[_0x27ab42(0x18f)],'threadId':_0x5072fe[_0x27ab42(0x158)],'dT':f(_0x5072fe[_0x27ab42(0x14d)]),'personId':_0x5072fe['userId'],'resolved':_0x46435f[_0x27ab42(0x14b)]===I[_0x27ab42(0x18c)],'unitId':_0x25a935,'subUnitId':_0x4db982,'text':JSON[_0x27ab42(0x141)](_0x5072fe[_0x27ab42(0x144)]),'parentId':_0x5214c4}),_0x3280b3=_0x112740(_0x46435f[_0x27ab42(0x174)][0x0]);return{..._0x3280b3,'children':_0x46435f[_0x27ab42(0x174)][_0x27ab42(0x15d)](0x1)[_0x27ab42(0x155)](_0x95f8d3=>_0x112740(_0x95f8d3,_0x3280b3['id']))};}return null;}let p=class{constructor(_0x4309e8,_0xfc1495,_0x190dc3){const _0x4f7027=_0x66c89;this[_0x4f7027(0x163)]=_0x4309e8,this[_0x4f7027(0x16a)]=_0xfc1495,this['_sessionService']=_0x190dc3;}async[_0x66c89(0x14a)](_0x21ddcb){const _0x347d08=_0x66c89;var _0x3c7f7a,_0x4f331a;const {parentId:_0x4c6039,unitId:_0x266f2f,text:_0x49d410,threadId:_0x411cdd}=_0x21ddcb,_0x28e955=(_0x4f331a=(_0x3c7f7a=_0x49d410['customRanges'])==null?void 0x0:_0x3c7f7a['filter'](_0x55f045=>_0x55f045[_0x347d08(0x149)]===c[_0x347d08(0x18a)][_0x347d08(0x199)])[_0x347d08(0x155)](_0x40b6e5=>_0x40b6e5[_0x347d08(0x165)]))!=null?_0x4f331a:[],_0x55eb8a=JSON['stringify'](_0x49d410),_0x3cbc53=(await this[_0x347d08(0x15a)][_0x347d08(0x157)](_0x266f2f))['getMemberID']();if(_0x4c6039){const _0x27e9c7={'memberId':_0x3cbc53,'unitId':_0x266f2f,'content':_0x55eb8a,'mention':_0x28e955,'threadId':_0x411cdd},_0x21bc22=(await this[_0x347d08(0x163)][_0x347d08(0x16d)](_0x347d08(0x196)+_0x266f2f+_0x347d08(0x195),{'body':_0x27e9c7}))[_0x347d08(0x182)]['reply'];return{..._0x21ddcb,'id':_0x21bc22[_0x347d08(0x18f)],'dT':c[_0x347d08(0x192)](+_0x21bc22['createTimestamp'])[_0x347d08(0x140)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x21bc22[_0x347d08(0x1a6)]};}else{const _0x3a041c={'memberId':_0x3cbc53,'unitId':_0x266f2f,'content':_0x55eb8a,'mention':_0x28e955},_0xb15289=await this[_0x347d08(0x163)]['post'](_0x347d08(0x196)+_0x266f2f+_0x347d08(0x1af),{'body':_0x3a041c});return Y(_0xb15289['body'][_0x347d08(0x15b)],_0x21ddcb);}}async[_0x66c89(0x190)](_0x331e65){const _0x45b7eb=_0x66c89;var _0x4c9093,_0x133991;const {text:_0x35b493,unitId:_0x58e3ed}=_0x331e65,_0x3cf8c4=(_0x133991=(_0x4c9093=_0x35b493['customRanges'])==null?void 0x0:_0x4c9093[_0x45b7eb(0x161)](_0x555315=>_0x555315[_0x45b7eb(0x149)]===c[_0x45b7eb(0x18a)][_0x45b7eb(0x199)])[_0x45b7eb(0x155)](_0x2dd4b7=>_0x2dd4b7[_0x45b7eb(0x165)]))!=null?_0x133991:[],_0x256d64=JSON[_0x45b7eb(0x17a)](_0x35b493),_0x44e90b=_0x331e65['threadId'],_0x51f8ed=_0x331e65['id'],_0x52e24f={'memberId':(await this[_0x45b7eb(0x15a)][_0x45b7eb(0x157)](_0x58e3ed))['getMemberID'](),'unitId':_0x58e3ed,'threadId':_0x44e90b,'mention':_0x3cf8c4,'content':_0x256d64,'replyId':_0x51f8ed},_0x275d7f=await this[_0x45b7eb(0x163)]['post'](_0x45b7eb(0x196)+_0x58e3ed+_0x45b7eb(0x1a9),{'body':_0x52e24f});return!_0x275d7f[_0x45b7eb(0x182)][_0x45b7eb(0x19c)]||_0x275d7f['body'][_0x45b7eb(0x19c)][_0x45b7eb(0x1ad)]===0x1;}async['resolveComment'](_0x59e1ae){const _0x2c59bc=_0x66c89,{unitId:_0x28da7e}=_0x59e1ae,_0x263c5a=_0x59e1ae[_0x2c59bc(0x158)],_0x464778={'memberId':this[_0x2c59bc(0x16a)][_0x2c59bc(0x151)]()[_0x2c59bc(0x143)],'unitId':_0x28da7e,'threadId':_0x263c5a,'solved':_0x59e1ae[_0x2c59bc(0x150)]?I['Solved']:I[_0x2c59bc(0x154)]},_0xf9cbc9=await this['_httpService'][_0x2c59bc(0x16d)](_0x2c59bc(0x196)+_0x28da7e+_0x2c59bc(0x14f),{'body':_0x464778});return!_0xf9cbc9['body'][_0x2c59bc(0x19c)]||_0xf9cbc9[_0x2c59bc(0x182)][_0x2c59bc(0x19c)]['code']===0x1;}async['deleteComment'](_0x266256,_0x492be9,_0x534a29,_0x23d433){const _0x3406a3=_0x66c89,_0x332b58={'memberId':(await this[_0x3406a3(0x15a)]['requireSession'](_0x266256))['getMemberID'](),'threadId':_0x534a29,'replyId':_0x23d433,'unitId':_0x266256},_0x1dabbe=await this[_0x3406a3(0x163)]['post'](_0x3406a3(0x196)+_0x266256+_0x3406a3(0x1ac),{'body':_0x332b58});return!_0x1dabbe['body'][_0x3406a3(0x19c)]||_0x1dabbe[_0x3406a3(0x182)]['error'][_0x3406a3(0x1ad)]===0x1;}async[_0x66c89(0x16f)](_0x50a417,_0x40293e,_0xdcf7ea){const _0x2d3333=_0x66c89,_0x23a60f={'unitId':_0x50a417,'threadId':_0xdcf7ea},_0x3289fc=await this[_0x2d3333(0x163)][_0x2d3333(0x16d)](_0x2d3333(0x196)+_0x50a417+_0x2d3333(0x1a3),{'body':_0x23a60f}),_0x45b75b=_0xdcf7ea[_0x2d3333(0x155)](_0x30a7e5=>G(_0x3289fc[_0x2d3333(0x182)][_0x2d3333(0x17e)][_0x30a7e5],_0x50a417,_0x40293e))[_0x2d3333(0x161)](Boolean);return Object['values'](_0x3289fc['body'][_0x2d3333(0x1a4)])['forEach'](_0x533de6=>{const _0x2edd69=_0x2d3333;this['_userService'][_0x2edd69(0x1aa)](_0x533de6);}),_0x45b75b;}['saveCommentToSnapshot'](_0x1a2f6f){const _0x17ce33=_0x66c89;return{'id':_0x1a2f6f['id'],'threadId':_0x1a2f6f[_0x17ce33(0x158)],'ref':_0x1a2f6f[_0x17ce33(0x183)]};}};function _0x347c(_0x4c3421,_0x487e26){_0x4c3421=_0x4c3421-0x13e;const _0x385e62=_0x385e();let _0x347c5a=_0x385e62[_0x4c3421];return _0x347c5a;}p=x([C(0x0,c[_0x66c89(0x160)](P[_0x66c89(0x1a7)])),C(0x1,c[_0x66c89(0x160)](c[_0x66c89(0x159)])),C(0x2,c[_0x66c89(0x160)](b[_0x66c89(0x16e)]))],p);var H=Object[_0x66c89(0x15c)],J=(_0x11fae8,_0x16669e,_0x166aa3,_0x1ecc2d)=>{const _0x5e1847=_0x66c89;for(var _0x30e3d5=_0x1ecc2d>0x1?void 0x0:_0x1ecc2d?H(_0x16669e,_0x166aa3):_0x16669e,_0x134a43=_0x11fae8[_0x5e1847(0x19f)]-0x1,_0x35908c;_0x134a43>=0x0;_0x134a43--)(_0x35908c=_0x11fae8[_0x134a43])&&(_0x30e3d5=_0x35908c(_0x30e3d5)||_0x30e3d5);return _0x30e3d5;},y=(_0x22a6d5,_0x415db5)=>(_0xdfe1ff,_0x358666)=>_0x415db5(_0xdfe1ff,_0x358666,_0x22a6d5);let g=class extends c['Disposable']{constructor(_0x2db658,_0x1e6a7f){const _0x2f7f50=_0x66c89;super(),this[_0x2f7f50(0x156)]=_0x2db658,this[_0x2f7f50(0x13e)]=_0x1e6a7f,this[_0x2f7f50(0x176)]();}[_0x66c89(0x176)](){const _0x19deed=_0x66c89;this[_0x19deed(0x156)]['dataSource']=this[_0x19deed(0x13e)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x66c89(0x1ab)]),y(0x1,c[_0x66c89(0x160)](p))],g);var F=Object['defineProperty'],L=Object[_0x66c89(0x15c)],Z=(_0x2d79ac,_0xa60871,_0x39354b)=>_0xa60871 in _0x2d79ac?F(_0x2d79ac,_0xa60871,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39354b}):_0x2d79ac[_0xa60871]=_0x39354b,W=(_0x26d8ce,_0x690552,_0x1f8718,_0x4cb116)=>{for(var _0x1e94d3=_0x4cb116>0x1?void 0x0:_0x4cb116?L(_0x690552,_0x1f8718):_0x690552,_0x3236a7=_0x26d8ce['length']-0x1,_0x57fc3d;_0x3236a7>=0x0;_0x3236a7--)(_0x57fc3d=_0x26d8ce[_0x3236a7])&&(_0x1e94d3=_0x57fc3d(_0x1e94d3)||_0x1e94d3);return _0x1e94d3;},O=(_0x8fa8f8,_0x34bc57)=>(_0x2d6967,_0x33f383)=>_0x34bc57(_0x2d6967,_0x33f383,_0x8fa8f8),N=(_0x5ed8b4,_0x4674e8,_0x51ff46)=>Z(_0x5ed8b4,typeof _0x4674e8!='symbol'?_0x4674e8+'':_0x4674e8,_0x51ff46);function _0x385e(){const _0x9b1b61=['66fgABtk','623586WSjJAa','rangeType','addComment','solved','Reply','createTimestamp','pluginName','/solved','resolved','getCurrentUser','UniverThreadCommentDataSourcePlugin','pipe','OpenOrReOpen','map','_threadCommentDataSourceService','requireSession','threadId','UserManagerService','_sessionService','comment','getOwnPropertyDescriptor','slice','_injector','merge','Inject','filter','2884206PXAZqn','_httpService','IConfigService','rangeId','Add','get','user','/universer-api/user/list','_userService','UNRECOGNIZED','add','post','CollaborationSessionService','listComments','setConfig','commentUpdate$','_init','2285208TkZTXc','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','2497AewRLl','getUnit','payload','stringify','Injector','5098068GNojxR','UNIVER_UNKNOWN','comments','CommentService','defineProperty','size','body','ref','_commentService','resolveComment','parentId','UniverThreadCommentUIPlugin','UniverCollaborationClientPlugin','type','CustomRangeType','unitId','Solved','_config','2cFVarD','replyId','updateComment','Plugin','dayjs','164210fbJfgM','onReady','/reply','/universer-api/comment/unit/','onStarting','forEach','COMMENT','_initUserSync','toStringTag','error','find','Solve','length','22844Scxfcz','25YeWwHb','Edit','/list','users','_threadCommentModel','userId','HTTPService','442477XxcWpa','/edit','addUser','IThreadCommentDataSourceService','/delete','code','getUser','/add','subscribe','Delete','_threadCommentDataSource','UniverInstanceType','format','parse','disposeWithMe','userID','content','_configService','getComment'];_0x385e=function(){return _0x9b1b61;};return _0x385e();}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x66c89(0x191)]{constructor(_0x14009f=D,_0xcb3ec7,_0x1e018e){const _0x56b589=_0x66c89;super(),this['_config']=_0x14009f,this['_injector']=_0xcb3ec7,this[_0x56b589(0x145)]=_0x1e018e;const {..._0x16093e}=c[_0x56b589(0x15f)]({},D,this[_0x56b589(0x18d)]);this[_0x56b589(0x145)][_0x56b589(0x170)](q,_0x16093e);}[_0x66c89(0x197)](){const _0x45a84b=_0x66c89;[[p],[g],[_]][_0x45a84b(0x198)](_0x284075=>{const _0x199f97=_0x45a84b;this[_0x199f97(0x15e)]['add'](_0x284075);});}[_0x66c89(0x194)](){const _0x563bfa=_0x66c89;this[_0x563bfa(0x15e)]['get'](g),this[_0x563bfa(0x15e)]['get'](_);}},N(exports[_0x66c89(0x152)],_0x66c89(0x14e),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x66c89(0x189),c[_0x66c89(0x13f)][_0x66c89(0x17d)]),exports[_0x66c89(0x152)]=W([c['DependentOn'](w[_0x66c89(0x187)],b[_0x66c89(0x188)],T['UniverLicensePlugin']),O(0x1,c[_0x66c89(0x160)](c[_0x66c89(0x17b)])),O(0x2,c[_0x66c89(0x164)])],exports[_0x66c89(0x152)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x8ad51f=_0x8773;(function(_0x306054,_0x1732e1){const _0x500f51=_0x8773,_0x4e6d2d=_0x306054();while(!![]){try{const _0x591468=-parseInt(_0x500f51(0xee))/0x1+-parseInt(_0x500f51(0xed))/0x2*(parseInt(_0x500f51(0xb4))/0x3)+parseInt(_0x500f51(0xe0))/0x4+-parseInt(_0x500f51(0xc2))/0x5+-parseInt(_0x500f51(0x9e))/0x6+parseInt(_0x500f51(0xd5))/0x7+parseInt(_0x500f51(0x99))/0x8;if(_0x591468===_0x1732e1)break;else _0x4e6d2d['push'](_0x4e6d2d['shift']());}catch(_0x131558){_0x4e6d2d['push'](_0x4e6d2d['shift']());}}}(_0x4bac,0x1d70e));import{CommentService as _0x275388,CollaborationSessionService as _0x4cdd12,UniverCollaborationClientPlugin as _0x141d43}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4ff23d}from'@univerjs-pro/license';import{dayjs as _0x5b8721,UserManagerService as _0x5a8710,Inject as _0x262c9f,Injector as _0x4193c8,Disposable as _0x2134bf,CustomRangeType as _0x43b0a5,UniverInstanceType as _0x5a1685,DependentOn as _0x21e9b2,IConfigService as _0x592896,Plugin as _0x9beacc,merge as _0x4ed15d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x207a34}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x18e41d,IThreadCommentDataSourceService as _0x240ba1}from'@univerjs/thread-comment';function _0x8773(_0x302079,_0x1a27c2){_0x302079=_0x302079-0x8f;const _0x4bac1e=_0x4bac();let _0x87736d=_0x4bac1e[_0x302079];return _0x87736d;}import{bufferTime as _0x237e27}from'rxjs';import{HTTPService as _0x3d8493}from'@univerjs/network';const W=_0x8ad51f(0xf3);var I=(_0x5e5e84=>(_0x5e5e84[_0x5e5e84[_0x8ad51f(0x92)]=0x0]='OpenOrReOpen',_0x5e5e84[_0x5e5e84[_0x8ad51f(0xf0)]=0x1]='Solved',_0x5e5e84[_0x5e5e84[_0x8ad51f(0x9a)]=-0x1]=_0x8ad51f(0x9a),_0x5e5e84))(I||{}),v=(_0x4fb332=>(_0x4fb332[_0x4fb332['Unknown']=0x0]=_0x8ad51f(0xaa),_0x4fb332[_0x4fb332[_0x8ad51f(0xb6)]=0x1]=_0x8ad51f(0xb6),_0x4fb332[_0x4fb332[_0x8ad51f(0xac)]=0x2]=_0x8ad51f(0xac),_0x4fb332[_0x4fb332[_0x8ad51f(0x94)]=0x3]='Edit',_0x4fb332[_0x4fb332['Delete']=0x4]='Delete',_0x4fb332[_0x4fb332['Solve']=0x5]=_0x8ad51f(0x93),_0x4fb332[_0x4fb332['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x4fb332))(v||{});const y=_0x53755a=>_0x5b8721(new Date(+_0x53755a))['format'](_0x8ad51f(0xae)),B=async(_0x4d513c,_0x5dfb64)=>{const _0x1dbf0c=_0x8ad51f,_0x145f43=_0x4d513c['get'](_0x5a8710),_0x17bb54=_0x4d513c[_0x1dbf0c(0x97)](_0x3d8493);_0x5dfb64[_0x1dbf0c(0xdf)](_0x2fd628=>{const _0x134d25=_0x1dbf0c;_0x145f43[_0x134d25(0xd2)](_0x2fd628)&&_0x5dfb64[_0x134d25(0xc6)](_0x2fd628);}),_0x5dfb64[_0x1dbf0c(0xdc)]&&(await _0x17bb54['get'](_0x1dbf0c(0xaf),{'params':{'userIDs':[..._0x5dfb64]}}))[_0x1dbf0c(0xab)][_0x1dbf0c(0xbd)][_0x1dbf0c(0xdf)](_0x264357=>{_0x264357&&_0x145f43['addUser'](_0x264357);});};var K=Object[_0x8ad51f(0xd9)],V=(_0x120dbe,_0x753c9f,_0x4f8203,_0x365282)=>{for(var _0x477a06=_0x365282>0x1?void 0x0:_0x365282?K(_0x753c9f,_0x4f8203):_0x753c9f,_0x439e53=_0x120dbe['length']-0x1,_0x3325ca;_0x439e53>=0x0;_0x439e53--)(_0x3325ca=_0x120dbe[_0x439e53])&&(_0x477a06=_0x3325ca(_0x477a06)||_0x477a06);return _0x477a06;},p=(_0x1eea65,_0x4f4a15)=>(_0x504e26,_0x4eb83d)=>_0x4f4a15(_0x504e26,_0x4eb83d,_0x1eea65);let _=class extends _0x2134bf{constructor(_0x3d0d8d,_0x5b16fb,_0x1655ff,_0x5a7ce3){const _0x12e0bb=_0x8ad51f;super(),this[_0x12e0bb(0xc0)]=_0x3d0d8d,this[_0x12e0bb(0x95)]=_0x5b16fb,this[_0x12e0bb(0xcb)]=_0x1655ff,this[_0x12e0bb(0x9c)]=_0x5a7ce3,this['_init'](),this[_0x12e0bb(0xe4)]();}[_0x8ad51f(0xe4)](){const _0x530ba5=_0x8ad51f;this[_0x530ba5(0x96)](this[_0x530ba5(0x95)][_0x530ba5(0xeb)][_0x530ba5(0xb5)](_0x237e27(0x10))[_0x530ba5(0xa8)](_0x5ee955=>{const _0x23a248=_0x530ba5,_0x53334b=new Set();_0x5ee955[_0x23a248(0xdf)](_0xe95445=>{const _0x21c59d=_0x23a248;switch(_0xe95445[_0x21c59d(0xdd)]){case'add':{const _0x290b7e=_0xe95445[_0x21c59d(0xbe)]['personId'];_0x53334b['add'](_0x290b7e);break;}}}),B(this[_0x23a248(0x9c)],_0x53334b);}));}[_0x8ad51f(0xa2)](){const _0x1b44ea=_0x8ad51f;this[_0x1b44ea(0x96)](this[_0x1b44ea(0xc0)]['commentUpdate$'][_0x1b44ea(0xa8)](async _0x55cc83=>{const _0x67d1ef=_0x1b44ea;var _0x4e19ab,_0x243c75,_0x4f1837,_0x71de14;const _0xe812c5=(_0x4e19ab=this[_0x67d1ef(0x95)]['getUnit'](_0x55cc83[_0x67d1ef(0xb0)])[_0x67d1ef(0xc4)](_0xf07b48=>_0xf07b48[_0x67d1ef(0xbb)]===_0x55cc83[_0x67d1ef(0xbb)]))==null?void 0x0:_0x4e19ab[_0x67d1ef(0xa3)];if(!_0xe812c5)return;const {unitId:_0x413764,subUnitId:_0x3d785f}=_0xe812c5;switch(_0x55cc83[_0x67d1ef(0xec)]&&this[_0x67d1ef(0xcb)]['addUser'](_0x55cc83['user']),_0x55cc83[_0x67d1ef(0xdd)]){case v['Add']:break;case v[_0x67d1ef(0xac)]:{this['_threadCommentModel'][_0x67d1ef(0x8f)](_0x413764,_0x3d785f,{'unitId':_0x413764,'subUnitId':_0x3d785f,'ref':'','id':_0x55cc83[_0x67d1ef(0xe7)],'dT':y(+_0x55cc83[_0x67d1ef(0xd4)]),'threadId':_0x55cc83[_0x67d1ef(0xbb)],'personId':(_0x4f1837=(_0x243c75=_0x55cc83[_0x67d1ef(0xec)])==null?void 0x0:_0x243c75[_0x67d1ef(0xc1)])!=null?_0x4f1837:_0x55cc83[_0x67d1ef(0xa6)],'text':JSON['parse'](_0x55cc83[_0x67d1ef(0xd0)]),'parentId':_0xe812c5['id']});break;}case v[_0x67d1ef(0xb1)]:{const _0x16e5d8=this['_threadCommentModel']['getComment'](_0x413764,_0x3d785f,_0x55cc83[_0x67d1ef(0xe7)]);_0x16e5d8&&_0x16e5d8[_0x67d1ef(0xa7)]&&this[_0x67d1ef(0x95)][_0x67d1ef(0xe5)](_0x413764,_0x3d785f,_0x55cc83[_0x67d1ef(0xe7)]);break;}case v['Edit']:{this[_0x67d1ef(0x95)][_0x67d1ef(0x90)](_0x413764,_0x3d785f,{'commentId':_0x55cc83['replyId'],'text':JSON[_0x67d1ef(0xce)](_0x55cc83['content'])});break;}case v[_0x67d1ef(0x93)]:{const _0x131190=(_0x71de14=this[_0x67d1ef(0x95)][_0x67d1ef(0x98)](_0x55cc83[_0x67d1ef(0xb0)])[_0x67d1ef(0xc4)](_0x7d27f1=>_0x7d27f1[_0x67d1ef(0xbb)]===_0x55cc83[_0x67d1ef(0xbb)]))==null?void 0x0:_0x71de14[_0x67d1ef(0xa3)];_0x131190&&this[_0x67d1ef(0x95)][_0x67d1ef(0xb2)](_0x413764,_0x3d785f,_0x131190['id'],_0x55cc83['solved']===I[_0x67d1ef(0xf0)]);break;}}}));}};_=V([p(0x0,_0x262c9f(_0x275388)),p(0x1,_0x262c9f(_0x18e41d)),p(0x2,_0x262c9f(_0x5a8710)),p(0x3,_0x262c9f(_0x4193c8))],_);const z=_0x8ad51f(0x9b),O={};var k=Object[_0x8ad51f(0xd9)],Q=(_0x2357bb,_0x18e432,_0x16fe54,_0x2ea563)=>{const _0x26cd6b=_0x8ad51f;for(var _0x2c9f58=_0x2ea563>0x1?void 0x0:_0x2ea563?k(_0x18e432,_0x16fe54):_0x18e432,_0x1289ef=_0x2357bb[_0x26cd6b(0xf2)]-0x1,_0x1b4652;_0x1289ef>=0x0;_0x1289ef--)(_0x1b4652=_0x2357bb[_0x1289ef])&&(_0x2c9f58=_0x1b4652(_0x2c9f58)||_0x2c9f58);return _0x2c9f58;},b=(_0x518589,_0x17abdc)=>(_0x416285,_0x2d0a08)=>_0x17abdc(_0x416285,_0x2d0a08,_0x518589);function X(_0x5d7c98,_0x308ebd){const _0x1c9fbc=_0x8ad51f,_0x31ea06=_0x5d7c98[_0x1c9fbc(0xa0)][0x0];return{..._0x308ebd,'id':_0x31ea06[_0x1c9fbc(0xe7)],'resolved':_0x5d7c98[_0x1c9fbc(0xc5)]===0x1,'dT':y(_0x31ea06[_0x1c9fbc(0xd4)]),'personId':_0x31ea06[_0x1c9fbc(0xa6)],'threadId':_0x31ea06[_0x1c9fbc(0xbb)]};}function ee(_0x39f866,_0xaaf33a,_0x32e883){const _0x3dcb71=_0x8ad51f;var _0x1b91ad,_0x2c6c85;if(((_0x2c6c85=(_0x1b91ad=_0x39f866==null?void 0x0:_0x39f866[_0x3dcb71(0xa0)])==null?void 0x0:_0x1b91ad[_0x3dcb71(0xf2)])!=null?_0x2c6c85:0x0)>0x0){const _0x51a23b=(_0x7e773b,_0x323cf5)=>({'id':_0x7e773b[_0x3dcb71(0xe7)],'threadId':_0x7e773b['threadId'],'dT':y(_0x7e773b['createTimestamp']),'personId':_0x7e773b[_0x3dcb71(0xa6)],'resolved':_0x39f866[_0x3dcb71(0xc5)]===I[_0x3dcb71(0xf0)],'unitId':_0xaaf33a,'subUnitId':_0x32e883,'text':JSON[_0x3dcb71(0xce)](_0x7e773b[_0x3dcb71(0xd0)]),'parentId':_0x323cf5}),_0x56fa93=_0x51a23b(_0x39f866[_0x3dcb71(0xa0)][0x0]);return{..._0x56fa93,'children':_0x39f866['replies']['slice'](0x1)['map'](_0x314a39=>_0x51a23b(_0x314a39,_0x56fa93['id']))};}return null;}let S=class{constructor(_0x143f67,_0x28a788,_0x22d435){const _0x270fac=_0x8ad51f;this[_0x270fac(0xa1)]=_0x143f67,this[_0x270fac(0xcb)]=_0x28a788,this[_0x270fac(0xca)]=_0x22d435;}async['addComment'](_0x36b279){const _0x80f055=_0x8ad51f;var _0x295607,_0x512565;const {parentId:_0x4781f9,unitId:_0x641ddc,text:_0x31b6e1,threadId:_0x3d9574}=_0x36b279,_0x5c6ca3=(_0x512565=(_0x295607=_0x31b6e1['customRanges'])==null?void 0x0:_0x295607['filter'](_0x35d978=>_0x35d978[_0x80f055(0xd3)]===_0x43b0a5['COMMENT'])[_0x80f055(0xe6)](_0x56efd9=>_0x56efd9[_0x80f055(0xe2)]))!=null?_0x512565:[],_0x5bcefd=JSON[_0x80f055(0xcc)](_0x31b6e1),_0x2d451a=(await this[_0x80f055(0xca)][_0x80f055(0xe3)](_0x641ddc))['getMemberID']();if(_0x4781f9){const _0x3f563b={'memberId':_0x2d451a,'unitId':_0x641ddc,'content':_0x5bcefd,'mention':_0x5c6ca3,'threadId':_0x3d9574},_0x1738e0=(await this[_0x80f055(0xa1)]['post'](_0x80f055(0xd6)+_0x641ddc+'/reply',{'body':_0x3f563b}))['body']['reply'];return{..._0x36b279,'id':_0x1738e0['replyId'],'dT':_0x5b8721(+_0x1738e0[_0x80f055(0xd4)])[_0x80f055(0xda)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1738e0[_0x80f055(0xa6)]};}else{const _0x21cb50={'memberId':_0x2d451a,'unitId':_0x641ddc,'content':_0x5bcefd,'mention':_0x5c6ca3},_0x377129=await this[_0x80f055(0xa1)][_0x80f055(0xe8)](_0x80f055(0xd6)+_0x641ddc+_0x80f055(0xd7),{'body':_0x21cb50});return X(_0x377129[_0x80f055(0xab)]['comment'],_0x36b279);}}async[_0x8ad51f(0x90)](_0x1b2b7e){const _0x3e25aa=_0x8ad51f;var _0x242d99,_0x4704e2;const {text:_0x174f74,unitId:_0x3d0bbd}=_0x1b2b7e,_0x261d17=(_0x4704e2=(_0x242d99=_0x174f74[_0x3e25aa(0xb8)])==null?void 0x0:_0x242d99['filter'](_0x18fd9c=>_0x18fd9c[_0x3e25aa(0xd3)]===_0x43b0a5['COMMENT'])[_0x3e25aa(0xe6)](_0x10fde5=>_0x10fde5['rangeId']))!=null?_0x4704e2:[],_0x2dcd71=JSON[_0x3e25aa(0xcc)](_0x174f74),_0xc66813=_0x1b2b7e['threadId'],_0x5ba491=_0x1b2b7e['id'],_0x4858fb={'memberId':(await this[_0x3e25aa(0xca)]['requireSession'](_0x3d0bbd))[_0x3e25aa(0xa5)](),'unitId':_0x3d0bbd,'threadId':_0xc66813,'mention':_0x261d17,'content':_0x2dcd71,'replyId':_0x5ba491},_0x9b72b7=await this[_0x3e25aa(0xa1)]['post']('/universer-api/comment/unit/'+_0x3d0bbd+_0x3e25aa(0xf1),{'body':_0x4858fb});return!_0x9b72b7['body']['error']||_0x9b72b7[_0x3e25aa(0xab)]['error'][_0x3e25aa(0xea)]===0x1;}async['resolveComment'](_0x46ed9a){const _0x4c176f=_0x8ad51f,{unitId:_0x257513}=_0x46ed9a,_0x2e8ac4=_0x46ed9a[_0x4c176f(0xbb)],_0x265f92={'memberId':this[_0x4c176f(0xcb)][_0x4c176f(0xba)]()[_0x4c176f(0xc1)],'unitId':_0x257513,'threadId':_0x2e8ac4,'solved':_0x46ed9a[_0x4c176f(0xd8)]?I[_0x4c176f(0xf0)]:I[_0x4c176f(0x92)]},_0x4bb6ed=await this[_0x4c176f(0xa1)]['post'](_0x4c176f(0xd6)+_0x257513+_0x4c176f(0xdb),{'body':_0x265f92});return!_0x4bb6ed[_0x4c176f(0xab)][_0x4c176f(0xde)]||_0x4bb6ed[_0x4c176f(0xab)][_0x4c176f(0xde)][_0x4c176f(0xea)]===0x1;}async[_0x8ad51f(0xe5)](_0x32f95d,_0x3da458,_0x283a54,_0x5ef288){const _0x22f736=_0x8ad51f,_0x1f498e={'memberId':(await this[_0x22f736(0xca)][_0x22f736(0xe3)](_0x32f95d))['getMemberID'](),'threadId':_0x283a54,'replyId':_0x5ef288,'unitId':_0x32f95d},_0x55fc61=await this['_httpService'][_0x22f736(0xe8)](_0x22f736(0xd6)+_0x32f95d+_0x22f736(0x9f),{'body':_0x1f498e});return!_0x55fc61[_0x22f736(0xab)][_0x22f736(0xde)]||_0x55fc61['body'][_0x22f736(0xde)][_0x22f736(0xea)]===0x1;}async[_0x8ad51f(0x9d)](_0x1076d8,_0x5bb4a3,_0x489b3d){const _0x59c2ac=_0x8ad51f,_0x2232de={'unitId':_0x1076d8,'threadId':_0x489b3d},_0x18bf12=await this[_0x59c2ac(0xa1)]['post']('/universer-api/comment/unit/'+_0x1076d8+_0x59c2ac(0x91),{'body':_0x2232de}),_0x694b9f=_0x489b3d[_0x59c2ac(0xe6)](_0x1428fe=>ee(_0x18bf12[_0x59c2ac(0xab)][_0x59c2ac(0xbc)][_0x1428fe],_0x1076d8,_0x5bb4a3))[_0x59c2ac(0xb9)](Boolean);return Object[_0x59c2ac(0xc3)](_0x18bf12[_0x59c2ac(0xab)]['users'])[_0x59c2ac(0xdf)](_0x216203=>{const _0x16f714=_0x59c2ac;this[_0x16f714(0xcb)][_0x16f714(0xe9)](_0x216203);}),_0x694b9f;}[_0x8ad51f(0xbf)](_0x52d61a){const _0x535968=_0x8ad51f;return{'id':_0x52d61a['id'],'threadId':_0x52d61a[_0x535968(0xbb)],'ref':_0x52d61a['ref']};}};function _0x4bac(){const _0x5c4b55=['stringify','pluginName','parse','_configService','content','UNIVER_UNKNOWN','getUser','rangeType','createTimestamp','996079wdmfTd','/universer-api/comment/unit/','/add','resolved','getOwnPropertyDescriptor','format','/solved','size','type','error','forEach','65500eXhvMl','onStarting','rangeId','requireSession','_initUserSync','deleteComment','map','replyId','post','addUser','code','commentUpdate$','user','2070gmdnOt','235882iNKakf','_threadCommentDataSourceService','Solved','/edit','length','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','addComment','updateComment','/list','OpenOrReOpen','Solve','Edit','_threadCommentModel','disposeWithMe','get','getUnit','4889416AVMROx','UNRECOGNIZED','thread-comment-data-source.config','_injector','listComments','115914ywnlFj','/delete','replies','_httpService','_init','root','setConfig','getMemberID','userId','parentId','subscribe','_threadCommentDataSource','Unknown','body','Reply','_config','YYYY/MM/DD\x20HH:mm','/universer-api/user/list','unitId','Delete','resolveComment','syncUpdateMutationToColla','627gyARgb','pipe','Add','add','customRanges','filter','getCurrentUser','threadId','comments','users','payload','saveCommentToSnapshot','_commentService','userID','888715fcIxOd','values','find','solved','delete','symbol','onReady','defineProperty','_sessionService','_userService'];_0x4bac=function(){return _0x5c4b55;};return _0x4bac();}S=Q([b(0x0,_0x262c9f(_0x3d8493)),b(0x1,_0x262c9f(_0x5a8710)),b(0x2,_0x262c9f(_0x4cdd12))],S);var re=Object[_0x8ad51f(0xd9)],te=(_0xae06ec,_0x56bfe4,_0x12d5df,_0xb082e2)=>{const _0x42c264=_0x8ad51f;for(var _0x4f30bd=_0xb082e2>0x1?void 0x0:_0xb082e2?re(_0x56bfe4,_0x12d5df):_0x56bfe4,_0x752e89=_0xae06ec[_0x42c264(0xf2)]-0x1,_0x3184df;_0x752e89>=0x0;_0x752e89--)(_0x3184df=_0xae06ec[_0x752e89])&&(_0x4f30bd=_0x3184df(_0x4f30bd)||_0x4f30bd);return _0x4f30bd;},M=(_0x569782,_0x407a0a)=>(_0x285b74,_0x2a9d33)=>_0x407a0a(_0x285b74,_0x2a9d33,_0x569782);let f=class extends _0x2134bf{constructor(_0x4480da,_0x10a7dc){super(),this['_threadCommentDataSourceService']=_0x4480da,this['_threadCommentDataSource']=_0x10a7dc,this['_initDataSource']();}['_initDataSource'](){const _0x2422be=_0x8ad51f;this[_0x2422be(0xef)]['dataSource']=this[_0x2422be(0xa9)],this[_0x2422be(0xef)][_0x2422be(0xb3)]=!0x1;}};f=te([M(0x0,_0x240ba1),M(0x1,_0x262c9f(S))],f);var se=Object[_0x8ad51f(0xc9)],oe=Object[_0x8ad51f(0xd9)],ne=(_0x4d07a2,_0x55fab5,_0x5dd008)=>_0x55fab5 in _0x4d07a2?se(_0x4d07a2,_0x55fab5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5dd008}):_0x4d07a2[_0x55fab5]=_0x5dd008,ie=(_0x361730,_0x3e6ad9,_0x47b45d,_0x23b611)=>{const _0x51470a=_0x8ad51f;for(var _0x252da8=_0x23b611>0x1?void 0x0:_0x23b611?oe(_0x3e6ad9,_0x47b45d):_0x3e6ad9,_0x911678=_0x361730[_0x51470a(0xf2)]-0x1,_0x247d15;_0x911678>=0x0;_0x911678--)(_0x247d15=_0x361730[_0x911678])&&(_0x252da8=_0x247d15(_0x252da8)||_0x252da8);return _0x252da8;},N=(_0x4416a9,_0xb0c7f1)=>(_0x5e84b3,_0x5e2702)=>_0xb0c7f1(_0x5e84b3,_0x5e2702,_0x4416a9),$=(_0xfd1638,_0x24a8f8,_0xd71daf)=>ne(_0xfd1638,typeof _0x24a8f8!=_0x8ad51f(0xc7)?_0x24a8f8+'':_0x24a8f8,_0xd71daf);let g=class extends _0x9beacc{constructor(_0x55d7e4=O,_0x1981a3,_0x1c9e29){const _0xe16fe1=_0x8ad51f;super(),this[_0xe16fe1(0xad)]=_0x55d7e4,this[_0xe16fe1(0x9c)]=_0x1981a3,this[_0xe16fe1(0xcf)]=_0x1c9e29;const {..._0x5b37ee}=_0x4ed15d({},O,this[_0xe16fe1(0xad)]);this[_0xe16fe1(0xcf)][_0xe16fe1(0xa4)](z,_0x5b37ee);}[_0x8ad51f(0xe1)](){const _0x309146=_0x8ad51f;[[S],[f],[_]][_0x309146(0xdf)](_0x54bb4b=>{const _0x48d653=_0x309146;this[_0x48d653(0x9c)][_0x48d653(0xb7)](_0x54bb4b);});}[_0x8ad51f(0xc8)](){const _0x1de0f8=_0x8ad51f;this[_0x1de0f8(0x9c)][_0x1de0f8(0x97)](f),this[_0x1de0f8(0x9c)]['get'](_);}};$(g,_0x8ad51f(0xcd),W),$(g,_0x8ad51f(0xdd),_0x5a1685[_0x8ad51f(0xd1)]),g=ie([_0x21e9b2(_0x207a34,_0x141d43,_0x4ff23d),N(0x1,_0x262c9f(_0x4193c8)),N(0x2,_0x592896)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x5b6015=_0x5345;(function(_0x10be98,_0x1a3475){const _0x2b2dad=_0x5345,_0x16b182=_0x10be98();while(!![]){try{const _0x3787e3=parseInt(_0x2b2dad(0x7d))/0x1+parseInt(_0x2b2dad(0xad))/0x2*(-parseInt(_0x2b2dad(0x99))/0x3)+parseInt(_0x2b2dad(0xd4))/0x4*(-parseInt(_0x2b2dad(0xce))/0x5)+-parseInt(_0x2b2dad(0x8f))/0x6+parseInt(_0x2b2dad(0xdf))/0x7+-parseInt(_0x2b2dad(0x96))/0x8+-parseInt(_0x2b2dad(0xd8))/0x9*(-parseInt(_0x2b2dad(0xb8))/0xa);if(_0x3787e3===_0x1a3475)break;else _0x16b182['push'](_0x16b182['shift']());}catch(_0x4bfa2d){_0x16b182['push'](_0x16b182['shift']());}}}(_0x5a9e,0xce6df));import{CommentService as _0xca352f,CollaborationSessionService as _0x29ee25,UniverCollaborationClientPlugin as _0x177961}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4c7c0c}from'@univerjs-pro/license';function _0x5345(_0x74099f,_0x425bf1){_0x74099f=_0x74099f-0x7d;const _0x5a9ef1=_0x5a9e();let _0x53452f=_0x5a9ef1[_0x74099f];return _0x53452f;}import{dayjs as _0x26f78f,UserManagerService as _0x12114f,Inject as _0x4b0cba,Injector as _0x4d5ddb,Disposable as _0x3b3f77,CustomRangeType as _0x4307c4,UniverInstanceType as _0x2ab80c,DependentOn as _0x199c17,IConfigService as _0x1283d7,Plugin as _0xcfd23c,merge as _0x5c4574}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x38adf0}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x24071b,IThreadCommentDataSourceService as _0x33a4e7}from'@univerjs/thread-comment';function _0x5a9e(){const _0x26f432=['userId','_userService','Unknown','rangeType','5541090fCpPPt','/add','map','length','_config','commentUpdate$','4EIRzRC','rangeId','getOwnPropertyDescriptor','_initDataSource','9leerRd','customRanges','UNIVER_UNKNOWN','onReady','body','replyId','size','4094300VFjLVJ','/universer-api/comment/unit/','payload','500994CttkVm','Delete','OpenOrReOpen','users','_injector','/list','addComment','Solved','comments','resolveComment','getMemberID','replies','error','onStarting','resolved','defineProperty','COMMENT','updateComment','6361170kfwXoA','_sessionService','root','code','parentId','forEach','thread-comment-data-source.config','11350536RhjeHf','pipe','getCurrentUser','17691YtEilz','_commentService','symbol','user','parse','subscribe','_httpService','_configService','type','requireSession','stringify','/universer-api/user/list','solved','Edit','_init','_threadCommentModel','reply','deleteComment','Add','YYYY/MM/DD\x20HH:mm','382IWZQvC','getComment','_initUserSync','userID','post','format','syncUpdateMutationToColla','filter','find','addUser','unitId','44731980fqxCbN','UNRECOGNIZED','getUser','dataSource','get','/edit','/solved','setConfig','threadId','createTimestamp','Solve','add','values','_threadCommentDataSourceService','Reply','_threadCommentDataSource','content','listComments'];_0x5a9e=function(){return _0x26f432;};return _0x5a9e();}import{bufferTime as _0x10fefe}from'rxjs';import{HTTPService as _0x5d2f8c}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1d1bd2=>(_0x1d1bd2[_0x1d1bd2['OpenOrReOpen']=0x0]=_0x5b6015(0x7f),_0x1d1bd2[_0x1d1bd2[_0x5b6015(0x84)]=0x1]=_0x5b6015(0x84),_0x1d1bd2[_0x1d1bd2[_0x5b6015(0xb9)]=-0x1]=_0x5b6015(0xb9),_0x1d1bd2))(I||{}),v=(_0x8491ac=>(_0x8491ac[_0x8491ac['Unknown']=0x0]=_0x5b6015(0xcc),_0x8491ac[_0x8491ac[_0x5b6015(0xab)]=0x1]=_0x5b6015(0xab),_0x8491ac[_0x8491ac[_0x5b6015(0xc6)]=0x2]='Reply',_0x8491ac[_0x8491ac[_0x5b6015(0xa6)]=0x3]='Edit',_0x8491ac[_0x8491ac[_0x5b6015(0x7e)]=0x4]=_0x5b6015(0x7e),_0x8491ac[_0x8491ac[_0x5b6015(0xc2)]=0x5]=_0x5b6015(0xc2),_0x8491ac[_0x8491ac['UNRECOGNIZED']=-0x1]=_0x5b6015(0xb9),_0x8491ac))(v||{});const y=_0x2a6126=>_0x26f78f(new Date(+_0x2a6126))[_0x5b6015(0xb2)]('YYYY/MM/DD\x20HH:mm'),B=async(_0xf88bd,_0x126f9e)=>{const _0x5139bf=_0x5b6015,_0xe0419a=_0xf88bd['get'](_0x12114f),_0x329189=_0xf88bd[_0x5139bf(0xbc)](_0x5d2f8c);_0x126f9e[_0x5139bf(0x94)](_0x58c1e4=>{const _0x1d5339=_0x5139bf;_0xe0419a[_0x1d5339(0xba)](_0x58c1e4)&&_0x126f9e['delete'](_0x58c1e4);}),_0x126f9e[_0x5139bf(0xde)]&&(await _0x329189[_0x5139bf(0xbc)](_0x5139bf(0xa4),{'params':{'userIDs':[..._0x126f9e]}}))[_0x5139bf(0xdc)][_0x5139bf(0x80)][_0x5139bf(0x94)](_0x4f1556=>{const _0x162388=_0x5139bf;_0x4f1556&&_0xe0419a[_0x162388(0xb6)](_0x4f1556);});};var K=Object[_0x5b6015(0xd6)],V=(_0x5385d3,_0x198600,_0x656f50,_0x1dfa78)=>{for(var _0x2a8b14=_0x1dfa78>0x1?void 0x0:_0x1dfa78?K(_0x198600,_0x656f50):_0x198600,_0x1afcd6=_0x5385d3['length']-0x1,_0x212105;_0x1afcd6>=0x0;_0x1afcd6--)(_0x212105=_0x5385d3[_0x1afcd6])&&(_0x2a8b14=_0x212105(_0x2a8b14)||_0x2a8b14);return _0x2a8b14;},p=(_0x47a432,_0x47f724)=>(_0x1da5be,_0x29416c)=>_0x47f724(_0x1da5be,_0x29416c,_0x47a432);let _=class extends _0x3b3f77{constructor(_0x41e645,_0x3a0375,_0x3728ac,_0x3b04a7){const _0xce39cf=_0x5b6015;super(),this[_0xce39cf(0x9a)]=_0x41e645,this[_0xce39cf(0xa8)]=_0x3a0375,this[_0xce39cf(0xcb)]=_0x3728ac,this[_0xce39cf(0x81)]=_0x3b04a7,this['_init'](),this[_0xce39cf(0xaf)]();}[_0x5b6015(0xaf)](){const _0x5754b4=_0x5b6015;this['disposeWithMe'](this['_threadCommentModel'][_0x5754b4(0xd3)][_0x5754b4(0x97)](_0x10fefe(0x10))[_0x5754b4(0x9e)](_0x3ccadf=>{const _0x592f96=new Set();_0x3ccadf['forEach'](_0x5777ea=>{const _0x422de5=_0x5345;switch(_0x5777ea[_0x422de5(0xa1)]){case _0x422de5(0xc3):{const _0x401d7a=_0x5777ea[_0x422de5(0xe1)]['personId'];_0x592f96[_0x422de5(0xc3)](_0x401d7a);break;}}}),B(this['_injector'],_0x592f96);}));}[_0x5b6015(0xa7)](){const _0x4a35f6=_0x5b6015;this['disposeWithMe'](this[_0x4a35f6(0x9a)][_0x4a35f6(0xd3)][_0x4a35f6(0x9e)](async _0x2805fb=>{const _0x57a484=_0x4a35f6;var _0x2ac65b,_0x1f502d,_0x5a7f39,_0x326f3e;const _0x20859d=(_0x2ac65b=this[_0x57a484(0xa8)]['getUnit'](_0x2805fb[_0x57a484(0xb7)])['find'](_0x3a3fcc=>_0x3a3fcc['threadId']===_0x2805fb[_0x57a484(0xc0)]))==null?void 0x0:_0x2ac65b[_0x57a484(0x91)];if(!_0x20859d)return;const {unitId:_0x502519,subUnitId:_0x4814e6}=_0x20859d;switch(_0x2805fb[_0x57a484(0x9c)]&&this['_userService']['addUser'](_0x2805fb['user']),_0x2805fb[_0x57a484(0xa1)]){case v[_0x57a484(0xab)]:break;case v['Reply']:{this[_0x57a484(0xa8)]['addComment'](_0x502519,_0x4814e6,{'unitId':_0x502519,'subUnitId':_0x4814e6,'ref':'','id':_0x2805fb[_0x57a484(0xdd)],'dT':y(+_0x2805fb[_0x57a484(0xc1)]),'threadId':_0x2805fb[_0x57a484(0xc0)],'personId':(_0x5a7f39=(_0x1f502d=_0x2805fb[_0x57a484(0x9c)])==null?void 0x0:_0x1f502d[_0x57a484(0xb0)])!=null?_0x5a7f39:_0x2805fb[_0x57a484(0xca)],'text':JSON['parse'](_0x2805fb[_0x57a484(0xc8)]),'parentId':_0x20859d['id']});break;}case v[_0x57a484(0x7e)]:{const _0x13ff35=this['_threadCommentModel'][_0x57a484(0xae)](_0x502519,_0x4814e6,_0x2805fb[_0x57a484(0xdd)]);_0x13ff35&&_0x13ff35[_0x57a484(0x93)]&&this[_0x57a484(0xa8)]['deleteComment'](_0x502519,_0x4814e6,_0x2805fb[_0x57a484(0xdd)]);break;}case v[_0x57a484(0xa6)]:{this['_threadCommentModel'][_0x57a484(0x8e)](_0x502519,_0x4814e6,{'commentId':_0x2805fb[_0x57a484(0xdd)],'text':JSON[_0x57a484(0x9d)](_0x2805fb['content'])});break;}case v[_0x57a484(0xc2)]:{const _0x88b066=(_0x326f3e=this[_0x57a484(0xa8)]['getUnit'](_0x2805fb[_0x57a484(0xb7)])[_0x57a484(0xb5)](_0x6a6c52=>_0x6a6c52[_0x57a484(0xc0)]===_0x2805fb['threadId']))==null?void 0x0:_0x326f3e[_0x57a484(0x91)];_0x88b066&&this[_0x57a484(0xa8)]['resolveComment'](_0x502519,_0x4814e6,_0x88b066['id'],_0x2805fb[_0x57a484(0xa5)]===I[_0x57a484(0x84)]);break;}}}));}};_=V([p(0x0,_0x4b0cba(_0xca352f)),p(0x1,_0x4b0cba(_0x24071b)),p(0x2,_0x4b0cba(_0x12114f)),p(0x3,_0x4b0cba(_0x4d5ddb))],_);const z=_0x5b6015(0x95),O={};var k=Object[_0x5b6015(0xd6)],Q=(_0x579178,_0x45a366,_0x54e729,_0x442a64)=>{const _0x340b42=_0x5b6015;for(var _0x32938c=_0x442a64>0x1?void 0x0:_0x442a64?k(_0x45a366,_0x54e729):_0x45a366,_0x39ef0e=_0x579178[_0x340b42(0xd1)]-0x1,_0x31a940;_0x39ef0e>=0x0;_0x39ef0e--)(_0x31a940=_0x579178[_0x39ef0e])&&(_0x32938c=_0x31a940(_0x32938c)||_0x32938c);return _0x32938c;},b=(_0x251e75,_0x2bc54c)=>(_0x4b2abb,_0x45fc6f)=>_0x2bc54c(_0x4b2abb,_0x45fc6f,_0x251e75);function X(_0x163785,_0x79566d){const _0x502e60=_0x5b6015,_0x2580ec=_0x163785['replies'][0x0];return{..._0x79566d,'id':_0x2580ec[_0x502e60(0xdd)],'resolved':_0x163785[_0x502e60(0xa5)]===0x1,'dT':y(_0x2580ec[_0x502e60(0xc1)]),'personId':_0x2580ec[_0x502e60(0xca)],'threadId':_0x2580ec['threadId']};}function ee(_0x46ff52,_0x582897,_0x2a1027){const _0x5d77c1=_0x5b6015;var _0x208e1,_0x5e6007;if(((_0x5e6007=(_0x208e1=_0x46ff52==null?void 0x0:_0x46ff52[_0x5d77c1(0x88)])==null?void 0x0:_0x208e1['length'])!=null?_0x5e6007:0x0)>0x0){const _0x67fccd=(_0x4021e4,_0x5d2eca)=>({'id':_0x4021e4[_0x5d77c1(0xdd)],'threadId':_0x4021e4['threadId'],'dT':y(_0x4021e4[_0x5d77c1(0xc1)]),'personId':_0x4021e4['userId'],'resolved':_0x46ff52[_0x5d77c1(0xa5)]===I[_0x5d77c1(0x84)],'unitId':_0x582897,'subUnitId':_0x2a1027,'text':JSON[_0x5d77c1(0x9d)](_0x4021e4['content']),'parentId':_0x5d2eca}),_0x5d196a=_0x67fccd(_0x46ff52[_0x5d77c1(0x88)][0x0]);return{..._0x5d196a,'children':_0x46ff52['replies']['slice'](0x1)[_0x5d77c1(0xd0)](_0x47c3df=>_0x67fccd(_0x47c3df,_0x5d196a['id']))};}return null;}let S=class{constructor(_0x367a49,_0x106fa5,_0x5c327a){const _0x2696a8=_0x5b6015;this[_0x2696a8(0x9f)]=_0x367a49,this[_0x2696a8(0xcb)]=_0x106fa5,this[_0x2696a8(0x90)]=_0x5c327a;}async[_0x5b6015(0x83)](_0x2b1c62){const _0x50f4f0=_0x5b6015;var _0x4c08a5,_0x3eb1c3;const {parentId:_0x292928,unitId:_0x7c2ffa,text:_0x3ef9f1,threadId:_0x55b16f}=_0x2b1c62,_0x5db5c6=(_0x3eb1c3=(_0x4c08a5=_0x3ef9f1[_0x50f4f0(0xd9)])==null?void 0x0:_0x4c08a5[_0x50f4f0(0xb4)](_0x47f712=>_0x47f712[_0x50f4f0(0xcd)]===_0x4307c4[_0x50f4f0(0x8d)])['map'](_0x466759=>_0x466759[_0x50f4f0(0xd5)]))!=null?_0x3eb1c3:[],_0x4f578c=JSON[_0x50f4f0(0xa3)](_0x3ef9f1),_0x4ef1f2=(await this[_0x50f4f0(0x90)]['requireSession'](_0x7c2ffa))[_0x50f4f0(0x87)]();if(_0x292928){const _0x54f228={'memberId':_0x4ef1f2,'unitId':_0x7c2ffa,'content':_0x4f578c,'mention':_0x5db5c6,'threadId':_0x55b16f},_0x70e0d7=(await this[_0x50f4f0(0x9f)][_0x50f4f0(0xb1)]('/universer-api/comment/unit/'+_0x7c2ffa+'/reply',{'body':_0x54f228}))[_0x50f4f0(0xdc)][_0x50f4f0(0xa9)];return{..._0x2b1c62,'id':_0x70e0d7[_0x50f4f0(0xdd)],'dT':_0x26f78f(+_0x70e0d7[_0x50f4f0(0xc1)])['format'](_0x50f4f0(0xac)),'personId':_0x70e0d7[_0x50f4f0(0xca)]};}else{const _0x219d44={'memberId':_0x4ef1f2,'unitId':_0x7c2ffa,'content':_0x4f578c,'mention':_0x5db5c6},_0x229001=await this[_0x50f4f0(0x9f)]['post'](_0x50f4f0(0xe0)+_0x7c2ffa+_0x50f4f0(0xcf),{'body':_0x219d44});return X(_0x229001[_0x50f4f0(0xdc)]['comment'],_0x2b1c62);}}async[_0x5b6015(0x8e)](_0x53bcd2){const _0x344118=_0x5b6015;var _0x105992,_0x881ca2;const {text:_0x112d80,unitId:_0x59322c}=_0x53bcd2,_0x5947f5=(_0x881ca2=(_0x105992=_0x112d80[_0x344118(0xd9)])==null?void 0x0:_0x105992['filter'](_0xa590ac=>_0xa590ac[_0x344118(0xcd)]===_0x4307c4['COMMENT'])[_0x344118(0xd0)](_0x40ab16=>_0x40ab16[_0x344118(0xd5)]))!=null?_0x881ca2:[],_0x2fc807=JSON['stringify'](_0x112d80),_0x4ad30e=_0x53bcd2['threadId'],_0x16a054=_0x53bcd2['id'],_0x4ab5cf={'memberId':(await this[_0x344118(0x90)][_0x344118(0xa2)](_0x59322c))[_0x344118(0x87)](),'unitId':_0x59322c,'threadId':_0x4ad30e,'mention':_0x5947f5,'content':_0x2fc807,'replyId':_0x16a054},_0x28c765=await this[_0x344118(0x9f)][_0x344118(0xb1)](_0x344118(0xe0)+_0x59322c+_0x344118(0xbd),{'body':_0x4ab5cf});return!_0x28c765[_0x344118(0xdc)][_0x344118(0x89)]||_0x28c765[_0x344118(0xdc)][_0x344118(0x89)][_0x344118(0x92)]===0x1;}async[_0x5b6015(0x86)](_0x51e348){const _0x1ccda8=_0x5b6015,{unitId:_0x5cafea}=_0x51e348,_0x595bdf=_0x51e348[_0x1ccda8(0xc0)],_0x258f26={'memberId':this['_userService'][_0x1ccda8(0x98)]()[_0x1ccda8(0xb0)],'unitId':_0x5cafea,'threadId':_0x595bdf,'solved':_0x51e348[_0x1ccda8(0x8b)]?I[_0x1ccda8(0x84)]:I['OpenOrReOpen']},_0x265a05=await this[_0x1ccda8(0x9f)][_0x1ccda8(0xb1)](_0x1ccda8(0xe0)+_0x5cafea+_0x1ccda8(0xbe),{'body':_0x258f26});return!_0x265a05[_0x1ccda8(0xdc)]['error']||_0x265a05[_0x1ccda8(0xdc)][_0x1ccda8(0x89)][_0x1ccda8(0x92)]===0x1;}async[_0x5b6015(0xaa)](_0x38f219,_0x11bbab,_0x5c5187,_0x51860){const _0x43f33c=_0x5b6015,_0xff06f8={'memberId':(await this[_0x43f33c(0x90)][_0x43f33c(0xa2)](_0x38f219))[_0x43f33c(0x87)](),'threadId':_0x5c5187,'replyId':_0x51860,'unitId':_0x38f219},_0x1b8fe1=await this[_0x43f33c(0x9f)][_0x43f33c(0xb1)]('/universer-api/comment/unit/'+_0x38f219+'/delete',{'body':_0xff06f8});return!_0x1b8fe1[_0x43f33c(0xdc)][_0x43f33c(0x89)]||_0x1b8fe1[_0x43f33c(0xdc)][_0x43f33c(0x89)][_0x43f33c(0x92)]===0x1;}async[_0x5b6015(0xc9)](_0x2226e4,_0x2ff79,_0x409878){const _0x19f346=_0x5b6015,_0x1849de={'unitId':_0x2226e4,'threadId':_0x409878},_0x2f29b8=await this[_0x19f346(0x9f)][_0x19f346(0xb1)]('/universer-api/comment/unit/'+_0x2226e4+_0x19f346(0x82),{'body':_0x1849de}),_0x459bc6=_0x409878['map'](_0x296e7f=>ee(_0x2f29b8[_0x19f346(0xdc)][_0x19f346(0x85)][_0x296e7f],_0x2226e4,_0x2ff79))[_0x19f346(0xb4)](Boolean);return Object[_0x19f346(0xc4)](_0x2f29b8[_0x19f346(0xdc)][_0x19f346(0x80)])[_0x19f346(0x94)](_0x22b456=>{const _0x3402c6=_0x19f346;this['_userService'][_0x3402c6(0xb6)](_0x22b456);}),_0x459bc6;}['saveCommentToSnapshot'](_0x41a0df){const _0x3820e3=_0x5b6015;return{'id':_0x41a0df['id'],'threadId':_0x41a0df[_0x3820e3(0xc0)],'ref':_0x41a0df['ref']};}};S=Q([b(0x0,_0x4b0cba(_0x5d2f8c)),b(0x1,_0x4b0cba(_0x12114f)),b(0x2,_0x4b0cba(_0x29ee25))],S);var re=Object[_0x5b6015(0xd6)],te=(_0xb695cb,_0x5112ec,_0x39869f,_0x2099f3)=>{const _0xa703a8=_0x5b6015;for(var _0x2616a3=_0x2099f3>0x1?void 0x0:_0x2099f3?re(_0x5112ec,_0x39869f):_0x5112ec,_0x1f04bf=_0xb695cb[_0xa703a8(0xd1)]-0x1,_0x50f075;_0x1f04bf>=0x0;_0x1f04bf--)(_0x50f075=_0xb695cb[_0x1f04bf])&&(_0x2616a3=_0x50f075(_0x2616a3)||_0x2616a3);return _0x2616a3;},M=(_0x43e5b5,_0x50904f)=>(_0x219fb3,_0x4a5c75)=>_0x50904f(_0x219fb3,_0x4a5c75,_0x43e5b5);let f=class extends _0x3b3f77{constructor(_0xf490ac,_0xc6ed98){const _0x7e5e80=_0x5b6015;super(),this[_0x7e5e80(0xc5)]=_0xf490ac,this[_0x7e5e80(0xc7)]=_0xc6ed98,this[_0x7e5e80(0xd7)]();}[_0x5b6015(0xd7)](){const _0x28b28c=_0x5b6015;this['_threadCommentDataSourceService'][_0x28b28c(0xbb)]=this[_0x28b28c(0xc7)],this[_0x28b28c(0xc5)][_0x28b28c(0xb3)]=!0x1;}};f=te([M(0x0,_0x33a4e7),M(0x1,_0x4b0cba(S))],f);var se=Object[_0x5b6015(0x8c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x5393ea,_0x481c86,_0x3b993f)=>_0x481c86 in _0x5393ea?se(_0x5393ea,_0x481c86,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b993f}):_0x5393ea[_0x481c86]=_0x3b993f,ie=(_0x165abb,_0x970ce0,_0x352c3b,_0x34f17f)=>{const _0x34c5e0=_0x5b6015;for(var _0x1e27b7=_0x34f17f>0x1?void 0x0:_0x34f17f?oe(_0x970ce0,_0x352c3b):_0x970ce0,_0x23861c=_0x165abb[_0x34c5e0(0xd1)]-0x1,_0x3bf9a1;_0x23861c>=0x0;_0x23861c--)(_0x3bf9a1=_0x165abb[_0x23861c])&&(_0x1e27b7=_0x3bf9a1(_0x1e27b7)||_0x1e27b7);return _0x1e27b7;},N=(_0x34e02e,_0x929a64)=>(_0x1a277b,_0x4d57dd)=>_0x929a64(_0x1a277b,_0x4d57dd,_0x34e02e),$=(_0x42bf6c,_0x4e47f1,_0x907bc7)=>ne(_0x42bf6c,typeof _0x4e47f1!=_0x5b6015(0x9b)?_0x4e47f1+'':_0x4e47f1,_0x907bc7);let g=class extends _0xcfd23c{constructor(_0x5da0d0=O,_0x122318,_0x4213f4){const _0x2e46ea=_0x5b6015;super(),this[_0x2e46ea(0xd2)]=_0x5da0d0,this[_0x2e46ea(0x81)]=_0x122318,this[_0x2e46ea(0xa0)]=_0x4213f4;const {..._0xfc2f11}=_0x5c4574({},O,this[_0x2e46ea(0xd2)]);this[_0x2e46ea(0xa0)][_0x2e46ea(0xbf)](z,_0xfc2f11);}[_0x5b6015(0x8a)](){const _0x246acc=_0x5b6015;[[S],[f],[_]][_0x246acc(0x94)](_0x39d325=>{const _0x5e9d4e=_0x246acc;this['_injector'][_0x5e9d4e(0xc3)](_0x39d325);});}[_0x5b6015(0xdb)](){const _0x4c9225=_0x5b6015;this[_0x4c9225(0x81)][_0x4c9225(0xbc)](f),this[_0x4c9225(0x81)][_0x4c9225(0xbc)](_);}};$(g,'pluginName',W),$(g,_0x5b6015(0xa1),_0x2ab80c[_0x5b6015(0xda)]),g=ie([_0x199c17(_0x38adf0,_0x177961,_0x4c7c0c),N(0x1,_0x4b0cba(_0x4d5ddb)),N(0x2,_0x1283d7)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x8ad51f=_0x8773;(function(_0x306054,_0x1732e1){const _0x500f51=_0x8773,_0x4e6d2d=_0x306054();while(!![]){try{const _0x591468=-parseInt(_0x500f51(0xee))/0x1+-parseInt(_0x500f51(0xed))/0x2*(parseInt(_0x500f51(0xb4))/0x3)+parseInt(_0x500f51(0xe0))/0x4+-parseInt(_0x500f51(0xc2))/0x5+-parseInt(_0x500f51(0x9e))/0x6+parseInt(_0x500f51(0xd5))/0x7+parseInt(_0x500f51(0x99))/0x8;if(_0x591468===_0x1732e1)break;else _0x4e6d2d['push'](_0x4e6d2d['shift']());}catch(_0x131558){_0x4e6d2d['push'](_0x4e6d2d['shift']());}}}(_0x4bac,0x1d70e));import{CommentService as _0x275388,CollaborationSessionService as _0x4cdd12,UniverCollaborationClientPlugin as _0x141d43}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4ff23d}from'@univerjs-pro/license';import{dayjs as _0x5b8721,UserManagerService as _0x5a8710,Inject as _0x262c9f,Injector as _0x4193c8,Disposable as _0x2134bf,CustomRangeType as _0x43b0a5,UniverInstanceType as _0x5a1685,DependentOn as _0x21e9b2,IConfigService as _0x592896,Plugin as _0x9beacc,merge as _0x4ed15d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x207a34}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x18e41d,IThreadCommentDataSourceService as _0x240ba1}from'@univerjs/thread-comment';function _0x8773(_0x302079,_0x1a27c2){_0x302079=_0x302079-0x8f;const _0x4bac1e=_0x4bac();let _0x87736d=_0x4bac1e[_0x302079];return _0x87736d;}import{bufferTime as _0x237e27}from'rxjs';import{HTTPService as _0x3d8493}from'@univerjs/network';const W=_0x8ad51f(0xf3);var I=(_0x5e5e84=>(_0x5e5e84[_0x5e5e84[_0x8ad51f(0x92)]=0x0]='OpenOrReOpen',_0x5e5e84[_0x5e5e84[_0x8ad51f(0xf0)]=0x1]='Solved',_0x5e5e84[_0x5e5e84[_0x8ad51f(0x9a)]=-0x1]=_0x8ad51f(0x9a),_0x5e5e84))(I||{}),v=(_0x4fb332=>(_0x4fb332[_0x4fb332['Unknown']=0x0]=_0x8ad51f(0xaa),_0x4fb332[_0x4fb332[_0x8ad51f(0xb6)]=0x1]=_0x8ad51f(0xb6),_0x4fb332[_0x4fb332[_0x8ad51f(0xac)]=0x2]=_0x8ad51f(0xac),_0x4fb332[_0x4fb332[_0x8ad51f(0x94)]=0x3]='Edit',_0x4fb332[_0x4fb332['Delete']=0x4]='Delete',_0x4fb332[_0x4fb332['Solve']=0x5]=_0x8ad51f(0x93),_0x4fb332[_0x4fb332['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x4fb332))(v||{});const y=_0x53755a=>_0x5b8721(new Date(+_0x53755a))['format'](_0x8ad51f(0xae)),B=async(_0x4d513c,_0x5dfb64)=>{const _0x1dbf0c=_0x8ad51f,_0x145f43=_0x4d513c['get'](_0x5a8710),_0x17bb54=_0x4d513c[_0x1dbf0c(0x97)](_0x3d8493);_0x5dfb64[_0x1dbf0c(0xdf)](_0x2fd628=>{const _0x134d25=_0x1dbf0c;_0x145f43[_0x134d25(0xd2)](_0x2fd628)&&_0x5dfb64[_0x134d25(0xc6)](_0x2fd628);}),_0x5dfb64[_0x1dbf0c(0xdc)]&&(await _0x17bb54['get'](_0x1dbf0c(0xaf),{'params':{'userIDs':[..._0x5dfb64]}}))[_0x1dbf0c(0xab)][_0x1dbf0c(0xbd)][_0x1dbf0c(0xdf)](_0x264357=>{_0x264357&&_0x145f43['addUser'](_0x264357);});};var K=Object[_0x8ad51f(0xd9)],V=(_0x120dbe,_0x753c9f,_0x4f8203,_0x365282)=>{for(var _0x477a06=_0x365282>0x1?void 0x0:_0x365282?K(_0x753c9f,_0x4f8203):_0x753c9f,_0x439e53=_0x120dbe['length']-0x1,_0x3325ca;_0x439e53>=0x0;_0x439e53--)(_0x3325ca=_0x120dbe[_0x439e53])&&(_0x477a06=_0x3325ca(_0x477a06)||_0x477a06);return _0x477a06;},p=(_0x1eea65,_0x4f4a15)=>(_0x504e26,_0x4eb83d)=>_0x4f4a15(_0x504e26,_0x4eb83d,_0x1eea65);let _=class extends _0x2134bf{constructor(_0x3d0d8d,_0x5b16fb,_0x1655ff,_0x5a7ce3){const _0x12e0bb=_0x8ad51f;super(),this[_0x12e0bb(0xc0)]=_0x3d0d8d,this[_0x12e0bb(0x95)]=_0x5b16fb,this[_0x12e0bb(0xcb)]=_0x1655ff,this[_0x12e0bb(0x9c)]=_0x5a7ce3,this['_init'](),this[_0x12e0bb(0xe4)]();}[_0x8ad51f(0xe4)](){const _0x530ba5=_0x8ad51f;this[_0x530ba5(0x96)](this[_0x530ba5(0x95)][_0x530ba5(0xeb)][_0x530ba5(0xb5)](_0x237e27(0x10))[_0x530ba5(0xa8)](_0x5ee955=>{const _0x23a248=_0x530ba5,_0x53334b=new Set();_0x5ee955[_0x23a248(0xdf)](_0xe95445=>{const _0x21c59d=_0x23a248;switch(_0xe95445[_0x21c59d(0xdd)]){case'add':{const _0x290b7e=_0xe95445[_0x21c59d(0xbe)]['personId'];_0x53334b['add'](_0x290b7e);break;}}}),B(this[_0x23a248(0x9c)],_0x53334b);}));}[_0x8ad51f(0xa2)](){const _0x1b44ea=_0x8ad51f;this[_0x1b44ea(0x96)](this[_0x1b44ea(0xc0)]['commentUpdate$'][_0x1b44ea(0xa8)](async _0x55cc83=>{const _0x67d1ef=_0x1b44ea;var _0x4e19ab,_0x243c75,_0x4f1837,_0x71de14;const _0xe812c5=(_0x4e19ab=this[_0x67d1ef(0x95)]['getUnit'](_0x55cc83[_0x67d1ef(0xb0)])[_0x67d1ef(0xc4)](_0xf07b48=>_0xf07b48[_0x67d1ef(0xbb)]===_0x55cc83[_0x67d1ef(0xbb)]))==null?void 0x0:_0x4e19ab[_0x67d1ef(0xa3)];if(!_0xe812c5)return;const {unitId:_0x413764,subUnitId:_0x3d785f}=_0xe812c5;switch(_0x55cc83[_0x67d1ef(0xec)]&&this[_0x67d1ef(0xcb)]['addUser'](_0x55cc83['user']),_0x55cc83[_0x67d1ef(0xdd)]){case v['Add']:break;case v[_0x67d1ef(0xac)]:{this['_threadCommentModel'][_0x67d1ef(0x8f)](_0x413764,_0x3d785f,{'unitId':_0x413764,'subUnitId':_0x3d785f,'ref':'','id':_0x55cc83[_0x67d1ef(0xe7)],'dT':y(+_0x55cc83[_0x67d1ef(0xd4)]),'threadId':_0x55cc83[_0x67d1ef(0xbb)],'personId':(_0x4f1837=(_0x243c75=_0x55cc83[_0x67d1ef(0xec)])==null?void 0x0:_0x243c75[_0x67d1ef(0xc1)])!=null?_0x4f1837:_0x55cc83[_0x67d1ef(0xa6)],'text':JSON['parse'](_0x55cc83[_0x67d1ef(0xd0)]),'parentId':_0xe812c5['id']});break;}case v[_0x67d1ef(0xb1)]:{const _0x16e5d8=this['_threadCommentModel']['getComment'](_0x413764,_0x3d785f,_0x55cc83[_0x67d1ef(0xe7)]);_0x16e5d8&&_0x16e5d8[_0x67d1ef(0xa7)]&&this[_0x67d1ef(0x95)][_0x67d1ef(0xe5)](_0x413764,_0x3d785f,_0x55cc83[_0x67d1ef(0xe7)]);break;}case v['Edit']:{this[_0x67d1ef(0x95)][_0x67d1ef(0x90)](_0x413764,_0x3d785f,{'commentId':_0x55cc83['replyId'],'text':JSON[_0x67d1ef(0xce)](_0x55cc83['content'])});break;}case v[_0x67d1ef(0x93)]:{const _0x131190=(_0x71de14=this[_0x67d1ef(0x95)][_0x67d1ef(0x98)](_0x55cc83[_0x67d1ef(0xb0)])[_0x67d1ef(0xc4)](_0x7d27f1=>_0x7d27f1[_0x67d1ef(0xbb)]===_0x55cc83[_0x67d1ef(0xbb)]))==null?void 0x0:_0x71de14[_0x67d1ef(0xa3)];_0x131190&&this[_0x67d1ef(0x95)][_0x67d1ef(0xb2)](_0x413764,_0x3d785f,_0x131190['id'],_0x55cc83['solved']===I[_0x67d1ef(0xf0)]);break;}}}));}};_=V([p(0x0,_0x262c9f(_0x275388)),p(0x1,_0x262c9f(_0x18e41d)),p(0x2,_0x262c9f(_0x5a8710)),p(0x3,_0x262c9f(_0x4193c8))],_);const z=_0x8ad51f(0x9b),O={};var k=Object[_0x8ad51f(0xd9)],Q=(_0x2357bb,_0x18e432,_0x16fe54,_0x2ea563)=>{const _0x26cd6b=_0x8ad51f;for(var _0x2c9f58=_0x2ea563>0x1?void 0x0:_0x2ea563?k(_0x18e432,_0x16fe54):_0x18e432,_0x1289ef=_0x2357bb[_0x26cd6b(0xf2)]-0x1,_0x1b4652;_0x1289ef>=0x0;_0x1289ef--)(_0x1b4652=_0x2357bb[_0x1289ef])&&(_0x2c9f58=_0x1b4652(_0x2c9f58)||_0x2c9f58);return _0x2c9f58;},b=(_0x518589,_0x17abdc)=>(_0x416285,_0x2d0a08)=>_0x17abdc(_0x416285,_0x2d0a08,_0x518589);function X(_0x5d7c98,_0x308ebd){const _0x1c9fbc=_0x8ad51f,_0x31ea06=_0x5d7c98[_0x1c9fbc(0xa0)][0x0];return{..._0x308ebd,'id':_0x31ea06[_0x1c9fbc(0xe7)],'resolved':_0x5d7c98[_0x1c9fbc(0xc5)]===0x1,'dT':y(_0x31ea06[_0x1c9fbc(0xd4)]),'personId':_0x31ea06[_0x1c9fbc(0xa6)],'threadId':_0x31ea06[_0x1c9fbc(0xbb)]};}function ee(_0x39f866,_0xaaf33a,_0x32e883){const _0x3dcb71=_0x8ad51f;var _0x1b91ad,_0x2c6c85;if(((_0x2c6c85=(_0x1b91ad=_0x39f866==null?void 0x0:_0x39f866[_0x3dcb71(0xa0)])==null?void 0x0:_0x1b91ad[_0x3dcb71(0xf2)])!=null?_0x2c6c85:0x0)>0x0){const _0x51a23b=(_0x7e773b,_0x323cf5)=>({'id':_0x7e773b[_0x3dcb71(0xe7)],'threadId':_0x7e773b['threadId'],'dT':y(_0x7e773b['createTimestamp']),'personId':_0x7e773b[_0x3dcb71(0xa6)],'resolved':_0x39f866[_0x3dcb71(0xc5)]===I[_0x3dcb71(0xf0)],'unitId':_0xaaf33a,'subUnitId':_0x32e883,'text':JSON[_0x3dcb71(0xce)](_0x7e773b[_0x3dcb71(0xd0)]),'parentId':_0x323cf5}),_0x56fa93=_0x51a23b(_0x39f866[_0x3dcb71(0xa0)][0x0]);return{..._0x56fa93,'children':_0x39f866['replies']['slice'](0x1)['map'](_0x314a39=>_0x51a23b(_0x314a39,_0x56fa93['id']))};}return null;}let S=class{constructor(_0x143f67,_0x28a788,_0x22d435){const _0x270fac=_0x8ad51f;this[_0x270fac(0xa1)]=_0x143f67,this[_0x270fac(0xcb)]=_0x28a788,this[_0x270fac(0xca)]=_0x22d435;}async['addComment'](_0x36b279){const _0x80f055=_0x8ad51f;var _0x295607,_0x512565;const {parentId:_0x4781f9,unitId:_0x641ddc,text:_0x31b6e1,threadId:_0x3d9574}=_0x36b279,_0x5c6ca3=(_0x512565=(_0x295607=_0x31b6e1['customRanges'])==null?void 0x0:_0x295607['filter'](_0x35d978=>_0x35d978[_0x80f055(0xd3)]===_0x43b0a5['COMMENT'])[_0x80f055(0xe6)](_0x56efd9=>_0x56efd9[_0x80f055(0xe2)]))!=null?_0x512565:[],_0x5bcefd=JSON[_0x80f055(0xcc)](_0x31b6e1),_0x2d451a=(await this[_0x80f055(0xca)][_0x80f055(0xe3)](_0x641ddc))['getMemberID']();if(_0x4781f9){const _0x3f563b={'memberId':_0x2d451a,'unitId':_0x641ddc,'content':_0x5bcefd,'mention':_0x5c6ca3,'threadId':_0x3d9574},_0x1738e0=(await this[_0x80f055(0xa1)]['post'](_0x80f055(0xd6)+_0x641ddc+'/reply',{'body':_0x3f563b}))['body']['reply'];return{..._0x36b279,'id':_0x1738e0['replyId'],'dT':_0x5b8721(+_0x1738e0[_0x80f055(0xd4)])[_0x80f055(0xda)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1738e0[_0x80f055(0xa6)]};}else{const _0x21cb50={'memberId':_0x2d451a,'unitId':_0x641ddc,'content':_0x5bcefd,'mention':_0x5c6ca3},_0x377129=await this[_0x80f055(0xa1)][_0x80f055(0xe8)](_0x80f055(0xd6)+_0x641ddc+_0x80f055(0xd7),{'body':_0x21cb50});return X(_0x377129[_0x80f055(0xab)]['comment'],_0x36b279);}}async[_0x8ad51f(0x90)](_0x1b2b7e){const _0x3e25aa=_0x8ad51f;var _0x242d99,_0x4704e2;const {text:_0x174f74,unitId:_0x3d0bbd}=_0x1b2b7e,_0x261d17=(_0x4704e2=(_0x242d99=_0x174f74[_0x3e25aa(0xb8)])==null?void 0x0:_0x242d99['filter'](_0x18fd9c=>_0x18fd9c[_0x3e25aa(0xd3)]===_0x43b0a5['COMMENT'])[_0x3e25aa(0xe6)](_0x10fde5=>_0x10fde5['rangeId']))!=null?_0x4704e2:[],_0x2dcd71=JSON[_0x3e25aa(0xcc)](_0x174f74),_0xc66813=_0x1b2b7e['threadId'],_0x5ba491=_0x1b2b7e['id'],_0x4858fb={'memberId':(await this[_0x3e25aa(0xca)]['requireSession'](_0x3d0bbd))[_0x3e25aa(0xa5)](),'unitId':_0x3d0bbd,'threadId':_0xc66813,'mention':_0x261d17,'content':_0x2dcd71,'replyId':_0x5ba491},_0x9b72b7=await this[_0x3e25aa(0xa1)]['post']('/universer-api/comment/unit/'+_0x3d0bbd+_0x3e25aa(0xf1),{'body':_0x4858fb});return!_0x9b72b7['body']['error']||_0x9b72b7[_0x3e25aa(0xab)]['error'][_0x3e25aa(0xea)]===0x1;}async['resolveComment'](_0x46ed9a){const _0x4c176f=_0x8ad51f,{unitId:_0x257513}=_0x46ed9a,_0x2e8ac4=_0x46ed9a[_0x4c176f(0xbb)],_0x265f92={'memberId':this[_0x4c176f(0xcb)][_0x4c176f(0xba)]()[_0x4c176f(0xc1)],'unitId':_0x257513,'threadId':_0x2e8ac4,'solved':_0x46ed9a[_0x4c176f(0xd8)]?I[_0x4c176f(0xf0)]:I[_0x4c176f(0x92)]},_0x4bb6ed=await this[_0x4c176f(0xa1)]['post'](_0x4c176f(0xd6)+_0x257513+_0x4c176f(0xdb),{'body':_0x265f92});return!_0x4bb6ed[_0x4c176f(0xab)][_0x4c176f(0xde)]||_0x4bb6ed[_0x4c176f(0xab)][_0x4c176f(0xde)][_0x4c176f(0xea)]===0x1;}async[_0x8ad51f(0xe5)](_0x32f95d,_0x3da458,_0x283a54,_0x5ef288){const _0x22f736=_0x8ad51f,_0x1f498e={'memberId':(await this[_0x22f736(0xca)][_0x22f736(0xe3)](_0x32f95d))['getMemberID'](),'threadId':_0x283a54,'replyId':_0x5ef288,'unitId':_0x32f95d},_0x55fc61=await this['_httpService'][_0x22f736(0xe8)](_0x22f736(0xd6)+_0x32f95d+_0x22f736(0x9f),{'body':_0x1f498e});return!_0x55fc61[_0x22f736(0xab)][_0x22f736(0xde)]||_0x55fc61['body'][_0x22f736(0xde)][_0x22f736(0xea)]===0x1;}async[_0x8ad51f(0x9d)](_0x1076d8,_0x5bb4a3,_0x489b3d){const _0x59c2ac=_0x8ad51f,_0x2232de={'unitId':_0x1076d8,'threadId':_0x489b3d},_0x18bf12=await this[_0x59c2ac(0xa1)]['post']('/universer-api/comment/unit/'+_0x1076d8+_0x59c2ac(0x91),{'body':_0x2232de}),_0x694b9f=_0x489b3d[_0x59c2ac(0xe6)](_0x1428fe=>ee(_0x18bf12[_0x59c2ac(0xab)][_0x59c2ac(0xbc)][_0x1428fe],_0x1076d8,_0x5bb4a3))[_0x59c2ac(0xb9)](Boolean);return Object[_0x59c2ac(0xc3)](_0x18bf12[_0x59c2ac(0xab)]['users'])[_0x59c2ac(0xdf)](_0x216203=>{const _0x16f714=_0x59c2ac;this[_0x16f714(0xcb)][_0x16f714(0xe9)](_0x216203);}),_0x694b9f;}[_0x8ad51f(0xbf)](_0x52d61a){const _0x535968=_0x8ad51f;return{'id':_0x52d61a['id'],'threadId':_0x52d61a[_0x535968(0xbb)],'ref':_0x52d61a['ref']};}};function _0x4bac(){const _0x5c4b55=['stringify','pluginName','parse','_configService','content','UNIVER_UNKNOWN','getUser','rangeType','createTimestamp','996079wdmfTd','/universer-api/comment/unit/','/add','resolved','getOwnPropertyDescriptor','format','/solved','size','type','error','forEach','65500eXhvMl','onStarting','rangeId','requireSession','_initUserSync','deleteComment','map','replyId','post','addUser','code','commentUpdate$','user','2070gmdnOt','235882iNKakf','_threadCommentDataSourceService','Solved','/edit','length','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','addComment','updateComment','/list','OpenOrReOpen','Solve','Edit','_threadCommentModel','disposeWithMe','get','getUnit','4889416AVMROx','UNRECOGNIZED','thread-comment-data-source.config','_injector','listComments','115914ywnlFj','/delete','replies','_httpService','_init','root','setConfig','getMemberID','userId','parentId','subscribe','_threadCommentDataSource','Unknown','body','Reply','_config','YYYY/MM/DD\x20HH:mm','/universer-api/user/list','unitId','Delete','resolveComment','syncUpdateMutationToColla','627gyARgb','pipe','Add','add','customRanges','filter','getCurrentUser','threadId','comments','users','payload','saveCommentToSnapshot','_commentService','userID','888715fcIxOd','values','find','solved','delete','symbol','onReady','defineProperty','_sessionService','_userService'];_0x4bac=function(){return _0x5c4b55;};return _0x4bac();}S=Q([b(0x0,_0x262c9f(_0x3d8493)),b(0x1,_0x262c9f(_0x5a8710)),b(0x2,_0x262c9f(_0x4cdd12))],S);var re=Object[_0x8ad51f(0xd9)],te=(_0xae06ec,_0x56bfe4,_0x12d5df,_0xb082e2)=>{const _0x42c264=_0x8ad51f;for(var _0x4f30bd=_0xb082e2>0x1?void 0x0:_0xb082e2?re(_0x56bfe4,_0x12d5df):_0x56bfe4,_0x752e89=_0xae06ec[_0x42c264(0xf2)]-0x1,_0x3184df;_0x752e89>=0x0;_0x752e89--)(_0x3184df=_0xae06ec[_0x752e89])&&(_0x4f30bd=_0x3184df(_0x4f30bd)||_0x4f30bd);return _0x4f30bd;},M=(_0x569782,_0x407a0a)=>(_0x285b74,_0x2a9d33)=>_0x407a0a(_0x285b74,_0x2a9d33,_0x569782);let f=class extends _0x2134bf{constructor(_0x4480da,_0x10a7dc){super(),this['_threadCommentDataSourceService']=_0x4480da,this['_threadCommentDataSource']=_0x10a7dc,this['_initDataSource']();}['_initDataSource'](){const _0x2422be=_0x8ad51f;this[_0x2422be(0xef)]['dataSource']=this[_0x2422be(0xa9)],this[_0x2422be(0xef)][_0x2422be(0xb3)]=!0x1;}};f=te([M(0x0,_0x240ba1),M(0x1,_0x262c9f(S))],f);var se=Object[_0x8ad51f(0xc9)],oe=Object[_0x8ad51f(0xd9)],ne=(_0x4d07a2,_0x55fab5,_0x5dd008)=>_0x55fab5 in _0x4d07a2?se(_0x4d07a2,_0x55fab5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5dd008}):_0x4d07a2[_0x55fab5]=_0x5dd008,ie=(_0x361730,_0x3e6ad9,_0x47b45d,_0x23b611)=>{const _0x51470a=_0x8ad51f;for(var _0x252da8=_0x23b611>0x1?void 0x0:_0x23b611?oe(_0x3e6ad9,_0x47b45d):_0x3e6ad9,_0x911678=_0x361730[_0x51470a(0xf2)]-0x1,_0x247d15;_0x911678>=0x0;_0x911678--)(_0x247d15=_0x361730[_0x911678])&&(_0x252da8=_0x247d15(_0x252da8)||_0x252da8);return _0x252da8;},N=(_0x4416a9,_0xb0c7f1)=>(_0x5e84b3,_0x5e2702)=>_0xb0c7f1(_0x5e84b3,_0x5e2702,_0x4416a9),$=(_0xfd1638,_0x24a8f8,_0xd71daf)=>ne(_0xfd1638,typeof _0x24a8f8!=_0x8ad51f(0xc7)?_0x24a8f8+'':_0x24a8f8,_0xd71daf);let g=class extends _0x9beacc{constructor(_0x55d7e4=O,_0x1981a3,_0x1c9e29){const _0xe16fe1=_0x8ad51f;super(),this[_0xe16fe1(0xad)]=_0x55d7e4,this[_0xe16fe1(0x9c)]=_0x1981a3,this[_0xe16fe1(0xcf)]=_0x1c9e29;const {..._0x5b37ee}=_0x4ed15d({},O,this[_0xe16fe1(0xad)]);this[_0xe16fe1(0xcf)][_0xe16fe1(0xa4)](z,_0x5b37ee);}[_0x8ad51f(0xe1)](){const _0x309146=_0x8ad51f;[[S],[f],[_]][_0x309146(0xdf)](_0x54bb4b=>{const _0x48d653=_0x309146;this[_0x48d653(0x9c)][_0x48d653(0xb7)](_0x54bb4b);});}[_0x8ad51f(0xc8)](){const _0x1de0f8=_0x8ad51f;this[_0x1de0f8(0x9c)][_0x1de0f8(0x97)](f),this[_0x1de0f8(0x9c)]['get'](_);}};$(g,_0x8ad51f(0xcd),W),$(g,_0x8ad51f(0xdd),_0x5a1685[_0x8ad51f(0xd1)]),g=ie([_0x21e9b2(_0x207a34,_0x141d43,_0x4ff23d),N(0x1,_0x262c9f(_0x4193c8)),N(0x2,_0x592896)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x5b6015=_0x5345;(function(_0x10be98,_0x1a3475){const _0x2b2dad=_0x5345,_0x16b182=_0x10be98();while(!![]){try{const _0x3787e3=parseInt(_0x2b2dad(0x7d))/0x1+parseInt(_0x2b2dad(0xad))/0x2*(-parseInt(_0x2b2dad(0x99))/0x3)+parseInt(_0x2b2dad(0xd4))/0x4*(-parseInt(_0x2b2dad(0xce))/0x5)+-parseInt(_0x2b2dad(0x8f))/0x6+parseInt(_0x2b2dad(0xdf))/0x7+-parseInt(_0x2b2dad(0x96))/0x8+-parseInt(_0x2b2dad(0xd8))/0x9*(-parseInt(_0x2b2dad(0xb8))/0xa);if(_0x3787e3===_0x1a3475)break;else _0x16b182['push'](_0x16b182['shift']());}catch(_0x4bfa2d){_0x16b182['push'](_0x16b182['shift']());}}}(_0x5a9e,0xce6df));import{CommentService as _0xca352f,CollaborationSessionService as _0x29ee25,UniverCollaborationClientPlugin as _0x177961}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4c7c0c}from'@univerjs-pro/license';function _0x5345(_0x74099f,_0x425bf1){_0x74099f=_0x74099f-0x7d;const _0x5a9ef1=_0x5a9e();let _0x53452f=_0x5a9ef1[_0x74099f];return _0x53452f;}import{dayjs as _0x26f78f,UserManagerService as _0x12114f,Inject as _0x4b0cba,Injector as _0x4d5ddb,Disposable as _0x3b3f77,CustomRangeType as _0x4307c4,UniverInstanceType as _0x2ab80c,DependentOn as _0x199c17,IConfigService as _0x1283d7,Plugin as _0xcfd23c,merge as _0x5c4574}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x38adf0}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x24071b,IThreadCommentDataSourceService as _0x33a4e7}from'@univerjs/thread-comment';function _0x5a9e(){const _0x26f432=['userId','_userService','Unknown','rangeType','5541090fCpPPt','/add','map','length','_config','commentUpdate$','4EIRzRC','rangeId','getOwnPropertyDescriptor','_initDataSource','9leerRd','customRanges','UNIVER_UNKNOWN','onReady','body','replyId','size','4094300VFjLVJ','/universer-api/comment/unit/','payload','500994CttkVm','Delete','OpenOrReOpen','users','_injector','/list','addComment','Solved','comments','resolveComment','getMemberID','replies','error','onStarting','resolved','defineProperty','COMMENT','updateComment','6361170kfwXoA','_sessionService','root','code','parentId','forEach','thread-comment-data-source.config','11350536RhjeHf','pipe','getCurrentUser','17691YtEilz','_commentService','symbol','user','parse','subscribe','_httpService','_configService','type','requireSession','stringify','/universer-api/user/list','solved','Edit','_init','_threadCommentModel','reply','deleteComment','Add','YYYY/MM/DD\x20HH:mm','382IWZQvC','getComment','_initUserSync','userID','post','format','syncUpdateMutationToColla','filter','find','addUser','unitId','44731980fqxCbN','UNRECOGNIZED','getUser','dataSource','get','/edit','/solved','setConfig','threadId','createTimestamp','Solve','add','values','_threadCommentDataSourceService','Reply','_threadCommentDataSource','content','listComments'];_0x5a9e=function(){return _0x26f432;};return _0x5a9e();}import{bufferTime as _0x10fefe}from'rxjs';import{HTTPService as _0x5d2f8c}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1d1bd2=>(_0x1d1bd2[_0x1d1bd2['OpenOrReOpen']=0x0]=_0x5b6015(0x7f),_0x1d1bd2[_0x1d1bd2[_0x5b6015(0x84)]=0x1]=_0x5b6015(0x84),_0x1d1bd2[_0x1d1bd2[_0x5b6015(0xb9)]=-0x1]=_0x5b6015(0xb9),_0x1d1bd2))(I||{}),v=(_0x8491ac=>(_0x8491ac[_0x8491ac['Unknown']=0x0]=_0x5b6015(0xcc),_0x8491ac[_0x8491ac[_0x5b6015(0xab)]=0x1]=_0x5b6015(0xab),_0x8491ac[_0x8491ac[_0x5b6015(0xc6)]=0x2]='Reply',_0x8491ac[_0x8491ac[_0x5b6015(0xa6)]=0x3]='Edit',_0x8491ac[_0x8491ac[_0x5b6015(0x7e)]=0x4]=_0x5b6015(0x7e),_0x8491ac[_0x8491ac[_0x5b6015(0xc2)]=0x5]=_0x5b6015(0xc2),_0x8491ac[_0x8491ac['UNRECOGNIZED']=-0x1]=_0x5b6015(0xb9),_0x8491ac))(v||{});const y=_0x2a6126=>_0x26f78f(new Date(+_0x2a6126))[_0x5b6015(0xb2)]('YYYY/MM/DD\x20HH:mm'),B=async(_0xf88bd,_0x126f9e)=>{const _0x5139bf=_0x5b6015,_0xe0419a=_0xf88bd['get'](_0x12114f),_0x329189=_0xf88bd[_0x5139bf(0xbc)](_0x5d2f8c);_0x126f9e[_0x5139bf(0x94)](_0x58c1e4=>{const _0x1d5339=_0x5139bf;_0xe0419a[_0x1d5339(0xba)](_0x58c1e4)&&_0x126f9e['delete'](_0x58c1e4);}),_0x126f9e[_0x5139bf(0xde)]&&(await _0x329189[_0x5139bf(0xbc)](_0x5139bf(0xa4),{'params':{'userIDs':[..._0x126f9e]}}))[_0x5139bf(0xdc)][_0x5139bf(0x80)][_0x5139bf(0x94)](_0x4f1556=>{const _0x162388=_0x5139bf;_0x4f1556&&_0xe0419a[_0x162388(0xb6)](_0x4f1556);});};var K=Object[_0x5b6015(0xd6)],V=(_0x5385d3,_0x198600,_0x656f50,_0x1dfa78)=>{for(var _0x2a8b14=_0x1dfa78>0x1?void 0x0:_0x1dfa78?K(_0x198600,_0x656f50):_0x198600,_0x1afcd6=_0x5385d3['length']-0x1,_0x212105;_0x1afcd6>=0x0;_0x1afcd6--)(_0x212105=_0x5385d3[_0x1afcd6])&&(_0x2a8b14=_0x212105(_0x2a8b14)||_0x2a8b14);return _0x2a8b14;},p=(_0x47a432,_0x47f724)=>(_0x1da5be,_0x29416c)=>_0x47f724(_0x1da5be,_0x29416c,_0x47a432);let _=class extends _0x3b3f77{constructor(_0x41e645,_0x3a0375,_0x3728ac,_0x3b04a7){const _0xce39cf=_0x5b6015;super(),this[_0xce39cf(0x9a)]=_0x41e645,this[_0xce39cf(0xa8)]=_0x3a0375,this[_0xce39cf(0xcb)]=_0x3728ac,this[_0xce39cf(0x81)]=_0x3b04a7,this['_init'](),this[_0xce39cf(0xaf)]();}[_0x5b6015(0xaf)](){const _0x5754b4=_0x5b6015;this['disposeWithMe'](this['_threadCommentModel'][_0x5754b4(0xd3)][_0x5754b4(0x97)](_0x10fefe(0x10))[_0x5754b4(0x9e)](_0x3ccadf=>{const _0x592f96=new Set();_0x3ccadf['forEach'](_0x5777ea=>{const _0x422de5=_0x5345;switch(_0x5777ea[_0x422de5(0xa1)]){case _0x422de5(0xc3):{const _0x401d7a=_0x5777ea[_0x422de5(0xe1)]['personId'];_0x592f96[_0x422de5(0xc3)](_0x401d7a);break;}}}),B(this['_injector'],_0x592f96);}));}[_0x5b6015(0xa7)](){const _0x4a35f6=_0x5b6015;this['disposeWithMe'](this[_0x4a35f6(0x9a)][_0x4a35f6(0xd3)][_0x4a35f6(0x9e)](async _0x2805fb=>{const _0x57a484=_0x4a35f6;var _0x2ac65b,_0x1f502d,_0x5a7f39,_0x326f3e;const _0x20859d=(_0x2ac65b=this[_0x57a484(0xa8)]['getUnit'](_0x2805fb[_0x57a484(0xb7)])['find'](_0x3a3fcc=>_0x3a3fcc['threadId']===_0x2805fb[_0x57a484(0xc0)]))==null?void 0x0:_0x2ac65b[_0x57a484(0x91)];if(!_0x20859d)return;const {unitId:_0x502519,subUnitId:_0x4814e6}=_0x20859d;switch(_0x2805fb[_0x57a484(0x9c)]&&this['_userService']['addUser'](_0x2805fb['user']),_0x2805fb[_0x57a484(0xa1)]){case v[_0x57a484(0xab)]:break;case v['Reply']:{this[_0x57a484(0xa8)]['addComment'](_0x502519,_0x4814e6,{'unitId':_0x502519,'subUnitId':_0x4814e6,'ref':'','id':_0x2805fb[_0x57a484(0xdd)],'dT':y(+_0x2805fb[_0x57a484(0xc1)]),'threadId':_0x2805fb[_0x57a484(0xc0)],'personId':(_0x5a7f39=(_0x1f502d=_0x2805fb[_0x57a484(0x9c)])==null?void 0x0:_0x1f502d[_0x57a484(0xb0)])!=null?_0x5a7f39:_0x2805fb[_0x57a484(0xca)],'text':JSON['parse'](_0x2805fb[_0x57a484(0xc8)]),'parentId':_0x20859d['id']});break;}case v[_0x57a484(0x7e)]:{const _0x13ff35=this['_threadCommentModel'][_0x57a484(0xae)](_0x502519,_0x4814e6,_0x2805fb[_0x57a484(0xdd)]);_0x13ff35&&_0x13ff35[_0x57a484(0x93)]&&this[_0x57a484(0xa8)]['deleteComment'](_0x502519,_0x4814e6,_0x2805fb[_0x57a484(0xdd)]);break;}case v[_0x57a484(0xa6)]:{this['_threadCommentModel'][_0x57a484(0x8e)](_0x502519,_0x4814e6,{'commentId':_0x2805fb[_0x57a484(0xdd)],'text':JSON[_0x57a484(0x9d)](_0x2805fb['content'])});break;}case v[_0x57a484(0xc2)]:{const _0x88b066=(_0x326f3e=this[_0x57a484(0xa8)]['getUnit'](_0x2805fb[_0x57a484(0xb7)])[_0x57a484(0xb5)](_0x6a6c52=>_0x6a6c52[_0x57a484(0xc0)]===_0x2805fb['threadId']))==null?void 0x0:_0x326f3e[_0x57a484(0x91)];_0x88b066&&this[_0x57a484(0xa8)]['resolveComment'](_0x502519,_0x4814e6,_0x88b066['id'],_0x2805fb[_0x57a484(0xa5)]===I[_0x57a484(0x84)]);break;}}}));}};_=V([p(0x0,_0x4b0cba(_0xca352f)),p(0x1,_0x4b0cba(_0x24071b)),p(0x2,_0x4b0cba(_0x12114f)),p(0x3,_0x4b0cba(_0x4d5ddb))],_);const z=_0x5b6015(0x95),O={};var k=Object[_0x5b6015(0xd6)],Q=(_0x579178,_0x45a366,_0x54e729,_0x442a64)=>{const _0x340b42=_0x5b6015;for(var _0x32938c=_0x442a64>0x1?void 0x0:_0x442a64?k(_0x45a366,_0x54e729):_0x45a366,_0x39ef0e=_0x579178[_0x340b42(0xd1)]-0x1,_0x31a940;_0x39ef0e>=0x0;_0x39ef0e--)(_0x31a940=_0x579178[_0x39ef0e])&&(_0x32938c=_0x31a940(_0x32938c)||_0x32938c);return _0x32938c;},b=(_0x251e75,_0x2bc54c)=>(_0x4b2abb,_0x45fc6f)=>_0x2bc54c(_0x4b2abb,_0x45fc6f,_0x251e75);function X(_0x163785,_0x79566d){const _0x502e60=_0x5b6015,_0x2580ec=_0x163785['replies'][0x0];return{..._0x79566d,'id':_0x2580ec[_0x502e60(0xdd)],'resolved':_0x163785[_0x502e60(0xa5)]===0x1,'dT':y(_0x2580ec[_0x502e60(0xc1)]),'personId':_0x2580ec[_0x502e60(0xca)],'threadId':_0x2580ec['threadId']};}function ee(_0x46ff52,_0x582897,_0x2a1027){const _0x5d77c1=_0x5b6015;var _0x208e1,_0x5e6007;if(((_0x5e6007=(_0x208e1=_0x46ff52==null?void 0x0:_0x46ff52[_0x5d77c1(0x88)])==null?void 0x0:_0x208e1['length'])!=null?_0x5e6007:0x0)>0x0){const _0x67fccd=(_0x4021e4,_0x5d2eca)=>({'id':_0x4021e4[_0x5d77c1(0xdd)],'threadId':_0x4021e4['threadId'],'dT':y(_0x4021e4[_0x5d77c1(0xc1)]),'personId':_0x4021e4['userId'],'resolved':_0x46ff52[_0x5d77c1(0xa5)]===I[_0x5d77c1(0x84)],'unitId':_0x582897,'subUnitId':_0x2a1027,'text':JSON[_0x5d77c1(0x9d)](_0x4021e4['content']),'parentId':_0x5d2eca}),_0x5d196a=_0x67fccd(_0x46ff52[_0x5d77c1(0x88)][0x0]);return{..._0x5d196a,'children':_0x46ff52['replies']['slice'](0x1)[_0x5d77c1(0xd0)](_0x47c3df=>_0x67fccd(_0x47c3df,_0x5d196a['id']))};}return null;}let S=class{constructor(_0x367a49,_0x106fa5,_0x5c327a){const _0x2696a8=_0x5b6015;this[_0x2696a8(0x9f)]=_0x367a49,this[_0x2696a8(0xcb)]=_0x106fa5,this[_0x2696a8(0x90)]=_0x5c327a;}async[_0x5b6015(0x83)](_0x2b1c62){const _0x50f4f0=_0x5b6015;var _0x4c08a5,_0x3eb1c3;const {parentId:_0x292928,unitId:_0x7c2ffa,text:_0x3ef9f1,threadId:_0x55b16f}=_0x2b1c62,_0x5db5c6=(_0x3eb1c3=(_0x4c08a5=_0x3ef9f1[_0x50f4f0(0xd9)])==null?void 0x0:_0x4c08a5[_0x50f4f0(0xb4)](_0x47f712=>_0x47f712[_0x50f4f0(0xcd)]===_0x4307c4[_0x50f4f0(0x8d)])['map'](_0x466759=>_0x466759[_0x50f4f0(0xd5)]))!=null?_0x3eb1c3:[],_0x4f578c=JSON[_0x50f4f0(0xa3)](_0x3ef9f1),_0x4ef1f2=(await this[_0x50f4f0(0x90)]['requireSession'](_0x7c2ffa))[_0x50f4f0(0x87)]();if(_0x292928){const _0x54f228={'memberId':_0x4ef1f2,'unitId':_0x7c2ffa,'content':_0x4f578c,'mention':_0x5db5c6,'threadId':_0x55b16f},_0x70e0d7=(await this[_0x50f4f0(0x9f)][_0x50f4f0(0xb1)]('/universer-api/comment/unit/'+_0x7c2ffa+'/reply',{'body':_0x54f228}))[_0x50f4f0(0xdc)][_0x50f4f0(0xa9)];return{..._0x2b1c62,'id':_0x70e0d7[_0x50f4f0(0xdd)],'dT':_0x26f78f(+_0x70e0d7[_0x50f4f0(0xc1)])['format'](_0x50f4f0(0xac)),'personId':_0x70e0d7[_0x50f4f0(0xca)]};}else{const _0x219d44={'memberId':_0x4ef1f2,'unitId':_0x7c2ffa,'content':_0x4f578c,'mention':_0x5db5c6},_0x229001=await this[_0x50f4f0(0x9f)]['post'](_0x50f4f0(0xe0)+_0x7c2ffa+_0x50f4f0(0xcf),{'body':_0x219d44});return X(_0x229001[_0x50f4f0(0xdc)]['comment'],_0x2b1c62);}}async[_0x5b6015(0x8e)](_0x53bcd2){const _0x344118=_0x5b6015;var _0x105992,_0x881ca2;const {text:_0x112d80,unitId:_0x59322c}=_0x53bcd2,_0x5947f5=(_0x881ca2=(_0x105992=_0x112d80[_0x344118(0xd9)])==null?void 0x0:_0x105992['filter'](_0xa590ac=>_0xa590ac[_0x344118(0xcd)]===_0x4307c4['COMMENT'])[_0x344118(0xd0)](_0x40ab16=>_0x40ab16[_0x344118(0xd5)]))!=null?_0x881ca2:[],_0x2fc807=JSON['stringify'](_0x112d80),_0x4ad30e=_0x53bcd2['threadId'],_0x16a054=_0x53bcd2['id'],_0x4ab5cf={'memberId':(await this[_0x344118(0x90)][_0x344118(0xa2)](_0x59322c))[_0x344118(0x87)](),'unitId':_0x59322c,'threadId':_0x4ad30e,'mention':_0x5947f5,'content':_0x2fc807,'replyId':_0x16a054},_0x28c765=await this[_0x344118(0x9f)][_0x344118(0xb1)](_0x344118(0xe0)+_0x59322c+_0x344118(0xbd),{'body':_0x4ab5cf});return!_0x28c765[_0x344118(0xdc)][_0x344118(0x89)]||_0x28c765[_0x344118(0xdc)][_0x344118(0x89)][_0x344118(0x92)]===0x1;}async[_0x5b6015(0x86)](_0x51e348){const _0x1ccda8=_0x5b6015,{unitId:_0x5cafea}=_0x51e348,_0x595bdf=_0x51e348[_0x1ccda8(0xc0)],_0x258f26={'memberId':this['_userService'][_0x1ccda8(0x98)]()[_0x1ccda8(0xb0)],'unitId':_0x5cafea,'threadId':_0x595bdf,'solved':_0x51e348[_0x1ccda8(0x8b)]?I[_0x1ccda8(0x84)]:I['OpenOrReOpen']},_0x265a05=await this[_0x1ccda8(0x9f)][_0x1ccda8(0xb1)](_0x1ccda8(0xe0)+_0x5cafea+_0x1ccda8(0xbe),{'body':_0x258f26});return!_0x265a05[_0x1ccda8(0xdc)]['error']||_0x265a05[_0x1ccda8(0xdc)][_0x1ccda8(0x89)][_0x1ccda8(0x92)]===0x1;}async[_0x5b6015(0xaa)](_0x38f219,_0x11bbab,_0x5c5187,_0x51860){const _0x43f33c=_0x5b6015,_0xff06f8={'memberId':(await this[_0x43f33c(0x90)][_0x43f33c(0xa2)](_0x38f219))[_0x43f33c(0x87)](),'threadId':_0x5c5187,'replyId':_0x51860,'unitId':_0x38f219},_0x1b8fe1=await this[_0x43f33c(0x9f)][_0x43f33c(0xb1)]('/universer-api/comment/unit/'+_0x38f219+'/delete',{'body':_0xff06f8});return!_0x1b8fe1[_0x43f33c(0xdc)][_0x43f33c(0x89)]||_0x1b8fe1[_0x43f33c(0xdc)][_0x43f33c(0x89)][_0x43f33c(0x92)]===0x1;}async[_0x5b6015(0xc9)](_0x2226e4,_0x2ff79,_0x409878){const _0x19f346=_0x5b6015,_0x1849de={'unitId':_0x2226e4,'threadId':_0x409878},_0x2f29b8=await this[_0x19f346(0x9f)][_0x19f346(0xb1)]('/universer-api/comment/unit/'+_0x2226e4+_0x19f346(0x82),{'body':_0x1849de}),_0x459bc6=_0x409878['map'](_0x296e7f=>ee(_0x2f29b8[_0x19f346(0xdc)][_0x19f346(0x85)][_0x296e7f],_0x2226e4,_0x2ff79))[_0x19f346(0xb4)](Boolean);return Object[_0x19f346(0xc4)](_0x2f29b8[_0x19f346(0xdc)][_0x19f346(0x80)])[_0x19f346(0x94)](_0x22b456=>{const _0x3402c6=_0x19f346;this['_userService'][_0x3402c6(0xb6)](_0x22b456);}),_0x459bc6;}['saveCommentToSnapshot'](_0x41a0df){const _0x3820e3=_0x5b6015;return{'id':_0x41a0df['id'],'threadId':_0x41a0df[_0x3820e3(0xc0)],'ref':_0x41a0df['ref']};}};S=Q([b(0x0,_0x4b0cba(_0x5d2f8c)),b(0x1,_0x4b0cba(_0x12114f)),b(0x2,_0x4b0cba(_0x29ee25))],S);var re=Object[_0x5b6015(0xd6)],te=(_0xb695cb,_0x5112ec,_0x39869f,_0x2099f3)=>{const _0xa703a8=_0x5b6015;for(var _0x2616a3=_0x2099f3>0x1?void 0x0:_0x2099f3?re(_0x5112ec,_0x39869f):_0x5112ec,_0x1f04bf=_0xb695cb[_0xa703a8(0xd1)]-0x1,_0x50f075;_0x1f04bf>=0x0;_0x1f04bf--)(_0x50f075=_0xb695cb[_0x1f04bf])&&(_0x2616a3=_0x50f075(_0x2616a3)||_0x2616a3);return _0x2616a3;},M=(_0x43e5b5,_0x50904f)=>(_0x219fb3,_0x4a5c75)=>_0x50904f(_0x219fb3,_0x4a5c75,_0x43e5b5);let f=class extends _0x3b3f77{constructor(_0xf490ac,_0xc6ed98){const _0x7e5e80=_0x5b6015;super(),this[_0x7e5e80(0xc5)]=_0xf490ac,this[_0x7e5e80(0xc7)]=_0xc6ed98,this[_0x7e5e80(0xd7)]();}[_0x5b6015(0xd7)](){const _0x28b28c=_0x5b6015;this['_threadCommentDataSourceService'][_0x28b28c(0xbb)]=this[_0x28b28c(0xc7)],this[_0x28b28c(0xc5)][_0x28b28c(0xb3)]=!0x1;}};f=te([M(0x0,_0x33a4e7),M(0x1,_0x4b0cba(S))],f);var se=Object[_0x5b6015(0x8c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x5393ea,_0x481c86,_0x3b993f)=>_0x481c86 in _0x5393ea?se(_0x5393ea,_0x481c86,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b993f}):_0x5393ea[_0x481c86]=_0x3b993f,ie=(_0x165abb,_0x970ce0,_0x352c3b,_0x34f17f)=>{const _0x34c5e0=_0x5b6015;for(var _0x1e27b7=_0x34f17f>0x1?void 0x0:_0x34f17f?oe(_0x970ce0,_0x352c3b):_0x970ce0,_0x23861c=_0x165abb[_0x34c5e0(0xd1)]-0x1,_0x3bf9a1;_0x23861c>=0x0;_0x23861c--)(_0x3bf9a1=_0x165abb[_0x23861c])&&(_0x1e27b7=_0x3bf9a1(_0x1e27b7)||_0x1e27b7);return _0x1e27b7;},N=(_0x34e02e,_0x929a64)=>(_0x1a277b,_0x4d57dd)=>_0x929a64(_0x1a277b,_0x4d57dd,_0x34e02e),$=(_0x42bf6c,_0x4e47f1,_0x907bc7)=>ne(_0x42bf6c,typeof _0x4e47f1!=_0x5b6015(0x9b)?_0x4e47f1+'':_0x4e47f1,_0x907bc7);let g=class extends _0xcfd23c{constructor(_0x5da0d0=O,_0x122318,_0x4213f4){const _0x2e46ea=_0x5b6015;super(),this[_0x2e46ea(0xd2)]=_0x5da0d0,this[_0x2e46ea(0x81)]=_0x122318,this[_0x2e46ea(0xa0)]=_0x4213f4;const {..._0xfc2f11}=_0x5c4574({},O,this[_0x2e46ea(0xd2)]);this[_0x2e46ea(0xa0)][_0x2e46ea(0xbf)](z,_0xfc2f11);}[_0x5b6015(0x8a)](){const _0x246acc=_0x5b6015;[[S],[f],[_]][_0x246acc(0x94)](_0x39d325=>{const _0x5e9d4e=_0x246acc;this['_injector'][_0x5e9d4e(0xc3)](_0x39d325);});}[_0x5b6015(0xdb)](){const _0x4c9225=_0x5b6015;this[_0x4c9225(0x81)][_0x4c9225(0xbc)](f),this[_0x4c9225(0x81)][_0x4c9225(0xbc)](_);}};$(g,'pluginName',W),$(g,_0x5b6015(0xa1),_0x2ab80c[_0x5b6015(0xda)]),g=ie([_0x199c17(_0x38adf0,_0x177961,_0x4c7c0c),N(0x1,_0x4b0cba(_0x4d5ddb)),N(0x2,_0x1283d7)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0xd7e4(_0x1c38a0,_0x136738){_0x1c38a0=_0x1c38a0-0x193;const _0x340a0=_0x340a();let _0xd7e4c2=_0x340a0[_0x1c38a0];return _0xd7e4c2;}(function(_0x2f0bf7,_0x36dd8c){const _0x304d76=_0xd7e4,_0x3ae3ae=_0x2f0bf7();while(!![]){try{const _0x24f9f0=-parseInt(_0x304d76(0x1a6))/0x1*(-parseInt(_0x304d76(0x1ef))/0x2)+parseInt(_0x304d76(0x199))/0x3+-parseInt(_0x304d76(0x1df))/0x4+parseInt(_0x304d76(0x218))/0x5*(-parseInt(_0x304d76(0x202))/0x6)+parseInt(_0x304d76(0x19c))/0x7+-parseInt(_0x304d76(0x209))/0x8*(parseInt(_0x304d76(0x1d5))/0x9)+parseInt(_0x304d76(0x1ea))/0xa;if(_0x24f9f0===_0x36dd8c)break;else _0x3ae3ae['push'](_0x3ae3ae['shift']());}catch(_0x50ac5e){_0x3ae3ae['push'](_0x3ae3ae['shift']());}}}(_0x340a,0x44705),function(_0x3650f1,_0x353dd4){const _0x1124a4=_0xd7e4;typeof exports==_0x1124a4(0x1a2)&&typeof module<'u'?_0x353dd4(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x1124a4(0x21b)&&define['amd']?define(['exports',_0x1124a4(0x1be),_0x1124a4(0x198),_0x1124a4(0x1a8),_0x1124a4(0x204),'@univerjs/thread-comment','rxjs',_0x1124a4(0x1f0)],_0x353dd4):(_0x3650f1=typeof globalThis<'u'?globalThis:_0x3650f1||self,_0x353dd4(_0x3650f1[_0x1124a4(0x208)]={},_0x3650f1['UniverProCollaborationClient'],_0x3650f1[_0x1124a4(0x1f2)],_0x3650f1[_0x1124a4(0x20d)],_0x3650f1['UniverThreadCommentUi'],_0x3650f1[_0x1124a4(0x21c)],_0x3650f1[_0x1124a4(0x205)],_0x3650f1[_0x1124a4(0x1e0)]));}(this,function(_0x136b8b,_0x1e62b2,_0x379707,_0x4dad3b,_0x3f674b,_0x53582d,_0x1912ef,_0x508d1f){'use strict';const _0x2e613c=_0xd7e4;const _0x1e414f=_0x2e613c(0x19b);var _0x517355=(_0x1971fa=>(_0x1971fa[_0x1971fa['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x1971fa[_0x1971fa[_0x2e613c(0x201)]=0x1]=_0x2e613c(0x201),_0x1971fa[_0x1971fa['UNRECOGNIZED']=-0x1]=_0x2e613c(0x1cc),_0x1971fa))(_0x517355||{}),_0x1b5a67=(_0x361100=>(_0x361100[_0x361100[_0x2e613c(0x1e2)]=0x0]=_0x2e613c(0x1e2),_0x361100[_0x361100[_0x2e613c(0x195)]=0x1]='Add',_0x361100[_0x361100[_0x2e613c(0x214)]=0x2]=_0x2e613c(0x214),_0x361100[_0x361100[_0x2e613c(0x1c5)]=0x3]='Edit',_0x361100[_0x361100[_0x2e613c(0x207)]=0x4]=_0x2e613c(0x207),_0x361100[_0x361100[_0x2e613c(0x1bf)]=0x5]=_0x2e613c(0x1bf),_0x361100[_0x361100[_0x2e613c(0x1cc)]=-0x1]='UNRECOGNIZED',_0x361100))(_0x1b5a67||{});const _0x2111b8=_0xdaf244=>_0x4dad3b[_0x2e613c(0x1bb)](new Date(+_0xdaf244))[_0x2e613c(0x20c)](_0x2e613c(0x1cf)),_0x5a77de=async(_0x5499ed,_0xa49b55)=>{const _0x39d489=_0x2e613c,_0x2c956c=_0x5499ed[_0x39d489(0x1f6)](_0x4dad3b[_0x39d489(0x1ce)]),_0x96ee67=_0x5499ed[_0x39d489(0x1f6)](_0x508d1f['HTTPService']);_0xa49b55['forEach'](_0x42aed8=>{const _0x43e892=_0x39d489;_0x2c956c[_0x43e892(0x1a1)](_0x42aed8)&&_0xa49b55['delete'](_0x42aed8);}),_0xa49b55[_0x39d489(0x217)]&&(await _0x96ee67[_0x39d489(0x1f6)](_0x39d489(0x1e1),{'params':{'userIDs':[..._0xa49b55]}}))[_0x39d489(0x1f5)][_0x39d489(0x1d2)][_0x39d489(0x1b7)](_0x2be67f=>{const _0x36f7de=_0x39d489;_0x2be67f&&_0x2c956c[_0x36f7de(0x1af)](_0x2be67f);});};var _0x4e5df8=Object[_0x2e613c(0x1b3)],_0x4cb8a8=(_0x3935be,_0x114c8b,_0x379162,_0xa8b4)=>{const _0x9fb803=_0x2e613c;for(var _0x29a86f=_0xa8b4>0x1?void 0x0:_0xa8b4?_0x4e5df8(_0x114c8b,_0x379162):_0x114c8b,_0x47f362=_0x3935be[_0x9fb803(0x1b0)]-0x1,_0x4a94e5;_0x47f362>=0x0;_0x47f362--)(_0x4a94e5=_0x3935be[_0x47f362])&&(_0x29a86f=_0x4a94e5(_0x29a86f)||_0x29a86f);return _0x29a86f;},_0x2fb38e=(_0x4866c9,_0x3a8f76)=>(_0x3d66f4,_0x198209)=>_0x3a8f76(_0x3d66f4,_0x198209,_0x4866c9);let _0x5eb8aa=class extends _0x4dad3b[_0x2e613c(0x1d8)]{constructor(_0x5f0130,_0x1a6da2,_0x17fd87,_0x4323ec){const _0x54d017=_0x2e613c;super(),this['_commentService']=_0x5f0130,this['_threadCommentModel']=_0x1a6da2,this['_userService']=_0x17fd87,this[_0x54d017(0x1e9)]=_0x4323ec,this[_0x54d017(0x1eb)](),this[_0x54d017(0x1ae)]();}[_0x2e613c(0x1ae)](){const _0x35610a=_0x2e613c;this[_0x35610a(0x1a7)](this[_0x35610a(0x1b2)][_0x35610a(0x1c6)]['pipe'](_0x1912ef[_0x35610a(0x1c1)](0x10))[_0x35610a(0x19e)](_0x40fd72=>{const _0xb37e04=_0x35610a,_0x37530a=new Set();_0x40fd72['forEach'](_0x33e2a8=>{const _0x502284=_0xd7e4;switch(_0x33e2a8[_0x502284(0x1d1)]){case _0x502284(0x1b8):{const _0x2a089b=_0x33e2a8[_0x502284(0x1d4)][_0x502284(0x20a)];_0x37530a[_0x502284(0x1b8)](_0x2a089b);break;}}}),_0x5a77de(this[_0xb37e04(0x1e9)],_0x37530a);}));}[_0x2e613c(0x1eb)](){const _0x288d0d=_0x2e613c;this[_0x288d0d(0x1a7)](this[_0x288d0d(0x19a)][_0x288d0d(0x1c6)][_0x288d0d(0x19e)](async _0x8c7dc9=>{const _0x3369ef=_0x288d0d;var _0x4b9091,_0x175cd5,_0x525d1c,_0x28cd57;const _0x24c6db=(_0x4b9091=this[_0x3369ef(0x1b2)][_0x3369ef(0x1a0)](_0x8c7dc9['unitId'])['find'](_0x9b7ef3=>_0x9b7ef3[_0x3369ef(0x1c7)]===_0x8c7dc9[_0x3369ef(0x1c7)]))==null?void 0x0:_0x4b9091[_0x3369ef(0x19f)];if(!_0x24c6db)return;const {unitId:_0x2b0006,subUnitId:_0x1dd0b2}=_0x24c6db;switch(_0x8c7dc9['user']&&this['_userService'][_0x3369ef(0x1af)](_0x8c7dc9[_0x3369ef(0x1fd)]),_0x8c7dc9[_0x3369ef(0x1d1)]){case _0x1b5a67['Add']:break;case _0x1b5a67[_0x3369ef(0x214)]:{this[_0x3369ef(0x1b2)][_0x3369ef(0x1da)](_0x2b0006,_0x1dd0b2,{'unitId':_0x2b0006,'subUnitId':_0x1dd0b2,'ref':'','id':_0x8c7dc9[_0x3369ef(0x216)],'dT':_0x2111b8(+_0x8c7dc9[_0x3369ef(0x1a3)]),'threadId':_0x8c7dc9[_0x3369ef(0x1c7)],'personId':(_0x525d1c=(_0x175cd5=_0x8c7dc9['user'])==null?void 0x0:_0x175cd5[_0x3369ef(0x1e6)])!=null?_0x525d1c:_0x8c7dc9[_0x3369ef(0x1ed)],'text':JSON[_0x3369ef(0x210)](_0x8c7dc9[_0x3369ef(0x1d3)]),'parentId':_0x24c6db['id']});break;}case _0x1b5a67['Delete']:{const _0x3fc100=this[_0x3369ef(0x1b2)][_0x3369ef(0x20f)](_0x2b0006,_0x1dd0b2,_0x8c7dc9[_0x3369ef(0x216)]);_0x3fc100&&_0x3fc100['parentId']&&this[_0x3369ef(0x1b2)][_0x3369ef(0x1f7)](_0x2b0006,_0x1dd0b2,_0x8c7dc9[_0x3369ef(0x216)]);break;}case _0x1b5a67[_0x3369ef(0x1c5)]:{this[_0x3369ef(0x1b2)][_0x3369ef(0x1b9)](_0x2b0006,_0x1dd0b2,{'commentId':_0x8c7dc9[_0x3369ef(0x216)],'text':JSON[_0x3369ef(0x210)](_0x8c7dc9[_0x3369ef(0x1d3)])});break;}case _0x1b5a67[_0x3369ef(0x1bf)]:{const _0x202df6=(_0x28cd57=this[_0x3369ef(0x1b2)]['getUnit'](_0x8c7dc9[_0x3369ef(0x1c2)])[_0x3369ef(0x1dc)](_0xcf2925=>_0xcf2925[_0x3369ef(0x1c7)]===_0x8c7dc9[_0x3369ef(0x1c7)]))==null?void 0x0:_0x28cd57[_0x3369ef(0x19f)];_0x202df6&&this[_0x3369ef(0x1b2)][_0x3369ef(0x1c8)](_0x2b0006,_0x1dd0b2,_0x202df6['id'],_0x8c7dc9[_0x3369ef(0x1db)]===_0x517355[_0x3369ef(0x201)]);break;}}}));}};_0x5eb8aa=_0x4cb8a8([_0x2fb38e(0x0,_0x4dad3b[_0x2e613c(0x206)](_0x1e62b2[_0x2e613c(0x1c9)])),_0x2fb38e(0x1,_0x4dad3b[_0x2e613c(0x206)](_0x53582d[_0x2e613c(0x219)])),_0x2fb38e(0x2,_0x4dad3b[_0x2e613c(0x206)](_0x4dad3b[_0x2e613c(0x1ce)])),_0x2fb38e(0x3,_0x4dad3b[_0x2e613c(0x206)](_0x4dad3b['Injector']))],_0x5eb8aa);const _0x36af6e='thread-comment-data-source.config',_0x3ec8a4={};var _0x9b3fee=Object[_0x2e613c(0x1b3)],_0x447f49=(_0x115fd4,_0x190d32,_0x41a662,_0x4379e9)=>{const _0x10c5e9=_0x2e613c;for(var _0x5cf9b2=_0x4379e9>0x1?void 0x0:_0x4379e9?_0x9b3fee(_0x190d32,_0x41a662):_0x190d32,_0x45fdbb=_0x115fd4[_0x10c5e9(0x1b0)]-0x1,_0x50926f;_0x45fdbb>=0x0;_0x45fdbb--)(_0x50926f=_0x115fd4[_0x45fdbb])&&(_0x5cf9b2=_0x50926f(_0x5cf9b2)||_0x5cf9b2);return _0x5cf9b2;},_0xea352=(_0x1b0096,_0x144788)=>(_0x27cc0d,_0x57323c)=>_0x144788(_0x27cc0d,_0x57323c,_0x1b0096);function _0x12e7fd(_0x249416,_0x42f2ff){const _0x28cb8c=_0x2e613c,_0x1beb91=_0x249416[_0x28cb8c(0x1f8)][0x0];return{..._0x42f2ff,'id':_0x1beb91[_0x28cb8c(0x216)],'resolved':_0x249416[_0x28cb8c(0x1db)]===0x1,'dT':_0x2111b8(_0x1beb91[_0x28cb8c(0x1a3)]),'personId':_0x1beb91[_0x28cb8c(0x1ed)],'threadId':_0x1beb91[_0x28cb8c(0x1c7)]};}function _0x9fc0db(_0x565296,_0x485340,_0x35c945){const _0x29a6c0=_0x2e613c;var _0x5a6ebc,_0x103a3d;if(((_0x103a3d=(_0x5a6ebc=_0x565296==null?void 0x0:_0x565296[_0x29a6c0(0x1f8)])==null?void 0x0:_0x5a6ebc['length'])!=null?_0x103a3d:0x0)>0x0){const _0x382e77=(_0x166afa,_0xaded)=>({'id':_0x166afa[_0x29a6c0(0x216)],'threadId':_0x166afa[_0x29a6c0(0x1c7)],'dT':_0x2111b8(_0x166afa[_0x29a6c0(0x1a3)]),'personId':_0x166afa[_0x29a6c0(0x1ed)],'resolved':_0x565296[_0x29a6c0(0x1db)]===_0x517355[_0x29a6c0(0x201)],'unitId':_0x485340,'subUnitId':_0x35c945,'text':JSON['parse'](_0x166afa[_0x29a6c0(0x1d3)]),'parentId':_0xaded}),_0x23949a=_0x382e77(_0x565296[_0x29a6c0(0x1f8)][0x0]);return{..._0x23949a,'children':_0x565296[_0x29a6c0(0x1f8)][_0x29a6c0(0x213)](0x1)['map'](_0x1b25a8=>_0x382e77(_0x1b25a8,_0x23949a['id']))};}return null;}let _0x136092=class{constructor(_0x33319c,_0x2e58fa,_0x22a1ea){const _0x18556b=_0x2e613c;this[_0x18556b(0x1aa)]=_0x33319c,this[_0x18556b(0x21a)]=_0x2e58fa,this['_sessionService']=_0x22a1ea;}async[_0x2e613c(0x1da)](_0x82e42a){const _0x172f00=_0x2e613c;var _0x55cf29,_0x180eb3;const {parentId:_0x38bf67,unitId:_0x4acb5e,text:_0x110b57,threadId:_0x16072e}=_0x82e42a,_0x3cf0af=(_0x180eb3=(_0x55cf29=_0x110b57[_0x172f00(0x1c0)])==null?void 0x0:_0x55cf29[_0x172f00(0x1dd)](_0x31c672=>_0x31c672['rangeType']===_0x4dad3b[_0x172f00(0x20b)][_0x172f00(0x1b5)])[_0x172f00(0x1a9)](_0x18ddc8=>_0x18ddc8['rangeId']))!=null?_0x180eb3:[],_0x2eb393=JSON['stringify'](_0x110b57),_0x27cfda=(await this[_0x172f00(0x20e)]['requireSession'](_0x4acb5e))[_0x172f00(0x215)]();if(_0x38bf67){const _0x25ff50={'memberId':_0x27cfda,'unitId':_0x4acb5e,'content':_0x2eb393,'mention':_0x3cf0af,'threadId':_0x16072e},_0x573dc4=(await this[_0x172f00(0x1aa)]['post'](_0x172f00(0x1fb)+_0x4acb5e+_0x172f00(0x1f1),{'body':_0x25ff50}))[_0x172f00(0x1f5)]['reply'];return{..._0x82e42a,'id':_0x573dc4[_0x172f00(0x216)],'dT':_0x4dad3b[_0x172f00(0x1bb)](+_0x573dc4[_0x172f00(0x1a3)])['format'](_0x172f00(0x1cf)),'personId':_0x573dc4[_0x172f00(0x1ed)]};}else{const _0x361c73={'memberId':_0x27cfda,'unitId':_0x4acb5e,'content':_0x2eb393,'mention':_0x3cf0af},_0x5165d8=await this[_0x172f00(0x1aa)][_0x172f00(0x1fc)](_0x172f00(0x1fb)+_0x4acb5e+_0x172f00(0x194),{'body':_0x361c73});return _0x12e7fd(_0x5165d8[_0x172f00(0x1f5)][_0x172f00(0x1fe)],_0x82e42a);}}async['updateComment'](_0x419822){const _0x51ceb4=_0x2e613c;var _0x285db0,_0x2731c4;const {text:_0x18548c,unitId:_0x233367}=_0x419822,_0xbed82e=(_0x2731c4=(_0x285db0=_0x18548c[_0x51ceb4(0x1c0)])==null?void 0x0:_0x285db0[_0x51ceb4(0x1dd)](_0x3556c4=>_0x3556c4[_0x51ceb4(0x1ca)]===_0x4dad3b[_0x51ceb4(0x20b)]['COMMENT'])[_0x51ceb4(0x1a9)](_0x5a7089=>_0x5a7089[_0x51ceb4(0x1b1)]))!=null?_0x2731c4:[],_0x30c437=JSON['stringify'](_0x18548c),_0x6ea17=_0x419822['threadId'],_0x5dc985=_0x419822['id'],_0x17d99d={'memberId':(await this[_0x51ceb4(0x20e)][_0x51ceb4(0x1f9)](_0x233367))[_0x51ceb4(0x215)](),'unitId':_0x233367,'threadId':_0x6ea17,'mention':_0xbed82e,'content':_0x30c437,'replyId':_0x5dc985},_0x5eddd3=await this[_0x51ceb4(0x1aa)][_0x51ceb4(0x1fc)](_0x51ceb4(0x1fb)+_0x233367+_0x51ceb4(0x1a4),{'body':_0x17d99d});return!_0x5eddd3[_0x51ceb4(0x1f5)]['error']||_0x5eddd3['body'][_0x51ceb4(0x212)][_0x51ceb4(0x1b6)]===0x1;}async[_0x2e613c(0x1c8)](_0x350c04){const _0x48bb80=_0x2e613c,{unitId:_0x2f5c6e}=_0x350c04,_0x985c3d=_0x350c04[_0x48bb80(0x1c7)],_0x58ef20={'memberId':this[_0x48bb80(0x21a)][_0x48bb80(0x1ac)]()[_0x48bb80(0x1e6)],'unitId':_0x2f5c6e,'threadId':_0x985c3d,'solved':_0x350c04[_0x48bb80(0x1e3)]?_0x517355[_0x48bb80(0x201)]:_0x517355[_0x48bb80(0x1b4)]},_0x32edc3=await this['_httpService'][_0x48bb80(0x1fc)](_0x48bb80(0x1fb)+_0x2f5c6e+_0x48bb80(0x1bc),{'body':_0x58ef20});return!_0x32edc3[_0x48bb80(0x1f5)]['error']||_0x32edc3['body']['error'][_0x48bb80(0x1b6)]===0x1;}async['deleteComment'](_0x38cb46,_0x222b8c,_0x24a6a7,_0x1df7bd){const _0x558eb9=_0x2e613c,_0x271614={'memberId':(await this[_0x558eb9(0x20e)][_0x558eb9(0x1f9)](_0x38cb46))['getMemberID'](),'threadId':_0x24a6a7,'replyId':_0x1df7bd,'unitId':_0x38cb46},_0x318d69=await this['_httpService']['post'](_0x558eb9(0x1fb)+_0x38cb46+_0x558eb9(0x211),{'body':_0x271614});return!_0x318d69['body'][_0x558eb9(0x212)]||_0x318d69[_0x558eb9(0x1f5)][_0x558eb9(0x212)]['code']===0x1;}async['listComments'](_0x25b19d,_0xace74e,_0x52088c){const _0x41a31f=_0x2e613c,_0x40a196={'unitId':_0x25b19d,'threadId':_0x52088c},_0x574658=await this[_0x41a31f(0x1aa)]['post'](_0x41a31f(0x1fb)+_0x25b19d+_0x41a31f(0x1d6),{'body':_0x40a196}),_0x276aa1=_0x52088c[_0x41a31f(0x1a9)](_0x265751=>_0x9fc0db(_0x574658[_0x41a31f(0x1f5)][_0x41a31f(0x1e4)][_0x265751],_0x25b19d,_0xace74e))['filter'](Boolean);return Object[_0x41a31f(0x203)](_0x574658[_0x41a31f(0x1f5)][_0x41a31f(0x1d2)])[_0x41a31f(0x1b7)](_0x5c89b4=>{const _0x22e910=_0x41a31f;this[_0x22e910(0x21a)]['addUser'](_0x5c89b4);}),_0x276aa1;}[_0x2e613c(0x196)](_0x400272){const _0x28a83d=_0x2e613c;return{'id':_0x400272['id'],'threadId':_0x400272[_0x28a83d(0x1c7)],'ref':_0x400272[_0x28a83d(0x1d7)]};}};_0x136092=_0x447f49([_0xea352(0x0,_0x4dad3b['Inject'](_0x508d1f[_0x2e613c(0x1e7)])),_0xea352(0x1,_0x4dad3b[_0x2e613c(0x206)](_0x4dad3b[_0x2e613c(0x1ce)])),_0xea352(0x2,_0x4dad3b[_0x2e613c(0x206)](_0x1e62b2[_0x2e613c(0x1ad)]))],_0x136092);var _0x548b2d=Object['getOwnPropertyDescriptor'],_0x18496e=(_0x15a08f,_0x95ae03,_0x394059,_0x2b5f1e)=>{const _0x1d4742=_0x2e613c;for(var _0x5c2819=_0x2b5f1e>0x1?void 0x0:_0x2b5f1e?_0x548b2d(_0x95ae03,_0x394059):_0x95ae03,_0x1332d9=_0x15a08f[_0x1d4742(0x1b0)]-0x1,_0x519093;_0x1332d9>=0x0;_0x1332d9--)(_0x519093=_0x15a08f[_0x1332d9])&&(_0x5c2819=_0x519093(_0x5c2819)||_0x5c2819);return _0x5c2819;},_0x7695e8=(_0x42d9f0,_0x231943)=>(_0x125e41,_0x3835b6)=>_0x231943(_0x125e41,_0x3835b6,_0x42d9f0);let _0x5f0b9b=class extends _0x4dad3b['Disposable']{constructor(_0x2876a4,_0x968718){const _0x53fe7e=_0x2e613c;super(),this[_0x53fe7e(0x193)]=_0x2876a4,this['_threadCommentDataSource']=_0x968718,this['_initDataSource']();}[_0x2e613c(0x1ab)](){const _0x4ef63b=_0x2e613c;this[_0x4ef63b(0x193)][_0x4ef63b(0x1c3)]=this['_threadCommentDataSource'],this[_0x4ef63b(0x193)][_0x4ef63b(0x1e8)]=!0x1;}};_0x5f0b9b=_0x18496e([_0x7695e8(0x0,_0x53582d[_0x2e613c(0x1d9)]),_0x7695e8(0x1,_0x4dad3b[_0x2e613c(0x206)](_0x136092))],_0x5f0b9b);var _0x1a7f9a=Object[_0x2e613c(0x1ff)],_0x5b518a=Object[_0x2e613c(0x1b3)],_0xdad162=(_0x1fabf0,_0x181ebb,_0x19debf)=>_0x181ebb in _0x1fabf0?_0x1a7f9a(_0x1fabf0,_0x181ebb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x19debf}):_0x1fabf0[_0x181ebb]=_0x19debf,_0x256bd2=(_0x294e74,_0x4b9a03,_0x26aa8c,_0x10490b)=>{const _0x13b040=_0x2e613c;for(var _0x2b9c03=_0x10490b>0x1?void 0x0:_0x10490b?_0x5b518a(_0x4b9a03,_0x26aa8c):_0x4b9a03,_0x51143d=_0x294e74[_0x13b040(0x1b0)]-0x1,_0x654688;_0x51143d>=0x0;_0x51143d--)(_0x654688=_0x294e74[_0x51143d])&&(_0x2b9c03=_0x654688(_0x2b9c03)||_0x2b9c03);return _0x2b9c03;},_0x304f70=(_0x317fb3,_0x5bdded)=>(_0x3b9d71,_0x52d641)=>_0x5bdded(_0x3b9d71,_0x52d641,_0x317fb3),_0x3a8b80=(_0x6793e8,_0x1fb532,_0x22b8e3)=>_0xdad162(_0x6793e8,typeof _0x1fb532!='symbol'?_0x1fb532+'':_0x1fb532,_0x22b8e3);_0x136b8b[_0x2e613c(0x1cd)]=class extends _0x4dad3b[_0x2e613c(0x1cb)]{constructor(_0x577002=_0x3ec8a4,_0x52fb20,_0x2e0c08){const _0x190bb2=_0x2e613c;super(),this['_config']=_0x577002,this['_injector']=_0x52fb20,this['_configService']=_0x2e0c08;const {..._0x2da69d}=_0x4dad3b[_0x190bb2(0x1de)]({},_0x3ec8a4,this[_0x190bb2(0x197)]);this[_0x190bb2(0x19d)][_0x190bb2(0x1fa)](_0x36af6e,_0x2da69d);}[_0x2e613c(0x200)](){[[_0x136092],[_0x5f0b9b],[_0x5eb8aa]]['forEach'](_0x19c807=>{const _0x3b8b1a=_0xd7e4;this[_0x3b8b1a(0x1e9)][_0x3b8b1a(0x1b8)](_0x19c807);});}[_0x2e613c(0x1d0)](){const _0x1cf937=_0x2e613c;this[_0x1cf937(0x1e9)][_0x1cf937(0x1f6)](_0x5f0b9b),this[_0x1cf937(0x1e9)][_0x1cf937(0x1f6)](_0x5eb8aa);}},_0x3a8b80(_0x136b8b[_0x2e613c(0x1cd)],_0x2e613c(0x1f4),_0x1e414f),_0x3a8b80(_0x136b8b['UniverThreadCommentDataSourcePlugin'],_0x2e613c(0x1d1),_0x4dad3b[_0x2e613c(0x1f3)]['UNIVER_UNKNOWN']),_0x136b8b[_0x2e613c(0x1cd)]=_0x256bd2([_0x4dad3b[_0x2e613c(0x1e5)](_0x3f674b['UniverThreadCommentUIPlugin'],_0x1e62b2[_0x2e613c(0x1ee)],_0x379707[_0x2e613c(0x1a5)]),_0x304f70(0x1,_0x4dad3b[_0x2e613c(0x206)](_0x4dad3b[_0x2e613c(0x1bd)])),_0x304f70(0x2,_0x4dad3b[_0x2e613c(0x1c4)])],_0x136b8b['UniverThreadCommentDataSourcePlugin']),Object[_0x2e613c(0x1ff)](_0x136b8b,Symbol[_0x2e613c(0x1ba)],{'value':_0x2e613c(0x1ec)});}));function _0x340a(){const _0x435c69=['UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3080140glZyDF','_configService','subscribe','root','getUnit','getUser','object','createTimestamp','/edit','UniverLicensePlugin','617KoNxSA','disposeWithMe','@univerjs/core','map','_httpService','_initDataSource','getCurrentUser','CollaborationSessionService','_initUserSync','addUser','length','rangeId','_threadCommentModel','getOwnPropertyDescriptor','OpenOrReOpen','COMMENT','code','forEach','add','updateComment','toStringTag','dayjs','/solved','Injector','@univerjs-pro/collaboration-client','Solve','customRanges','bufferTime','unitId','dataSource','IConfigService','Edit','commentUpdate$','threadId','resolveComment','CommentService','rangeType','Plugin','UNRECOGNIZED','UniverThreadCommentDataSourcePlugin','UserManagerService','YYYY/MM/DD\x20HH:mm','onReady','type','users','content','payload','2833227EqaESc','/list','ref','Disposable','IThreadCommentDataSourceService','addComment','solved','find','filter','merge','145704PRTCyZ','UniverNetwork','/universer-api/user/list','Unknown','resolved','comments','DependentOn','userID','HTTPService','syncUpdateMutationToColla','_injector','882310GGbyzB','_init','Module','userId','UniverCollaborationClientPlugin','1442ULPxAu','@univerjs/network','/reply','UniverProLicense','UniverInstanceType','pluginName','body','get','deleteComment','replies','requireSession','setConfig','/universer-api/comment/unit/','post','user','comment','defineProperty','onStarting','Solved','1902AdLIst','values','@univerjs/thread-comment-ui','rxjs','Inject','Delete','UniverProThreadCommentDatasource','8PKKXfo','personId','CustomRangeType','format','UniverCore','_sessionService','getComment','parse','/delete','error','slice','Reply','getMemberID','replyId','size','8115ISZozO','ThreadCommentModel','_userService','function','UniverThreadComment','_threadCommentDataSourceService','/add','Add','saveCommentToSnapshot','_config','@univerjs-pro/license','518811uwmwtx','_commentService'];_0x340a=function(){return _0x435c69;};return _0x340a();}
1
+ function _0x4248(_0xdf34f0,_0x2310ad){_0xdf34f0=_0xdf34f0-0x12c;const _0x3bda66=_0x3bda();let _0x42487e=_0x3bda66[_0xdf34f0];return _0x42487e;}(function(_0x3984f9,_0x2cb49e){const _0x26c883=_0x4248,_0x21ddb2=_0x3984f9();while(!![]){try{const _0x5b7f28=parseInt(_0x26c883(0x17e))/0x1*(-parseInt(_0x26c883(0x182))/0x2)+-parseInt(_0x26c883(0x12e))/0x3+-parseInt(_0x26c883(0x160))/0x4+parseInt(_0x26c883(0x167))/0x5*(-parseInt(_0x26c883(0x14a))/0x6)+-parseInt(_0x26c883(0x181))/0x7+-parseInt(_0x26c883(0x198))/0x8+parseInt(_0x26c883(0x1a6))/0x9*(parseInt(_0x26c883(0x12d))/0xa);if(_0x5b7f28===_0x2cb49e)break;else _0x21ddb2['push'](_0x21ddb2['shift']());}catch(_0x37a86d){_0x21ddb2['push'](_0x21ddb2['shift']());}}}(_0x3bda,0xe14b2),function(_0x4cf0ad,_0x2cbc82){const _0x34a802=_0x4248;typeof exports==_0x34a802(0x13b)&&typeof module<'u'?_0x2cbc82(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x34a802(0x15a)&&define[_0x34a802(0x132)]?define([_0x34a802(0x175),_0x34a802(0x146),_0x34a802(0x184),_0x34a802(0x16f),_0x34a802(0x168),_0x34a802(0x18c),'rxjs',_0x34a802(0x189)],_0x2cbc82):(_0x4cf0ad=typeof globalThis<'u'?globalThis:_0x4cf0ad||self,_0x2cbc82(_0x4cf0ad['UniverProThreadCommentDatasource']={},_0x4cf0ad['UniverProCollaborationClient'],_0x4cf0ad['UniverProLicense'],_0x4cf0ad[_0x34a802(0x13a)],_0x4cf0ad[_0x34a802(0x144)],_0x4cf0ad[_0x34a802(0x173)],_0x4cf0ad[_0x34a802(0x131)],_0x4cf0ad[_0x34a802(0x185)]));}(this,function(_0x195de8,_0x2a52ea,_0x452d03,_0x4c82ca,_0x2aa394,_0x30dc8c,_0x4cc962,_0x8ca4ce){'use strict';const _0x437c14=_0x4248;const _0x5eb1ac=_0x437c14(0x1a8);var _0x7859da=(_0x3037a3=>(_0x3037a3[_0x3037a3[_0x437c14(0x135)]=0x0]=_0x437c14(0x135),_0x3037a3[_0x3037a3[_0x437c14(0x1a5)]=0x1]='Solved',_0x3037a3[_0x3037a3[_0x437c14(0x190)]=-0x1]='UNRECOGNIZED',_0x3037a3))(_0x7859da||{}),_0x4330df=(_0x5ad12f=>(_0x5ad12f[_0x5ad12f[_0x437c14(0x19e)]=0x0]=_0x437c14(0x19e),_0x5ad12f[_0x5ad12f[_0x437c14(0x194)]=0x1]=_0x437c14(0x194),_0x5ad12f[_0x5ad12f[_0x437c14(0x136)]=0x2]=_0x437c14(0x136),_0x5ad12f[_0x5ad12f[_0x437c14(0x16d)]=0x3]=_0x437c14(0x16d),_0x5ad12f[_0x5ad12f[_0x437c14(0x17c)]=0x4]=_0x437c14(0x17c),_0x5ad12f[_0x5ad12f['Solve']=0x5]='Solve',_0x5ad12f[_0x5ad12f[_0x437c14(0x190)]=-0x1]=_0x437c14(0x190),_0x5ad12f))(_0x4330df||{});const _0x416b7d=_0x13797a=>_0x4c82ca[_0x437c14(0x15d)](new Date(+_0x13797a))[_0x437c14(0x159)](_0x437c14(0x169)),_0x2d4877=async(_0xde571a,_0x13c13b)=>{const _0xf68269=_0x437c14,_0x482857=_0xde571a[_0xf68269(0x17d)](_0x4c82ca['UserManagerService']),_0x3f75ff=_0xde571a['get'](_0x8ca4ce['HTTPService']);_0x13c13b[_0xf68269(0x15e)](_0x3d488a=>{_0x482857['getUser'](_0x3d488a)&&_0x13c13b['delete'](_0x3d488a);}),_0x13c13b['size']&&(await _0x3f75ff[_0xf68269(0x17d)]('/universer-api/user/list',{'params':{'userIDs':[..._0x13c13b]}}))[_0xf68269(0x179)][_0xf68269(0x18d)]['forEach'](_0x423fea=>{const _0x4c56e4=_0xf68269;_0x423fea&&_0x482857[_0x4c56e4(0x19c)](_0x423fea);});};var _0x2c623d=Object['getOwnPropertyDescriptor'],_0x4f5771=(_0x559f48,_0x5cbb44,_0x56d96e,_0x2fc6b8)=>{const _0x1c9bd4=_0x437c14;for(var _0xcbc5e2=_0x2fc6b8>0x1?void 0x0:_0x2fc6b8?_0x2c623d(_0x5cbb44,_0x56d96e):_0x5cbb44,_0x274884=_0x559f48[_0x1c9bd4(0x18b)]-0x1,_0x29411c;_0x274884>=0x0;_0x274884--)(_0x29411c=_0x559f48[_0x274884])&&(_0xcbc5e2=_0x29411c(_0xcbc5e2)||_0xcbc5e2);return _0xcbc5e2;},_0x968b49=(_0x4f36f8,_0x16a422)=>(_0x1799ef,_0x2f6670)=>_0x16a422(_0x1799ef,_0x2f6670,_0x4f36f8);let _0x1417c0=class extends _0x4c82ca[_0x437c14(0x16c)]{constructor(_0x57949b,_0x4d06ce,_0x231aca,_0x995a7b){const _0x5bc46f=_0x437c14;super(),this[_0x5bc46f(0x15b)]=_0x57949b,this[_0x5bc46f(0x14e)]=_0x4d06ce,this[_0x5bc46f(0x14d)]=_0x231aca,this['_injector']=_0x995a7b,this[_0x5bc46f(0x14f)](),this[_0x5bc46f(0x145)]();}[_0x437c14(0x145)](){const _0x43f322=_0x437c14;this[_0x43f322(0x139)](this[_0x43f322(0x14e)][_0x43f322(0x140)][_0x43f322(0x141)](_0x4cc962[_0x43f322(0x170)](0x10))[_0x43f322(0x178)](_0x26e6a5=>{const _0x180780=_0x43f322,_0x3a1954=new Set();_0x26e6a5[_0x180780(0x15e)](_0x5cb876=>{const _0xb9f2e7=_0x180780;switch(_0x5cb876['type']){case _0xb9f2e7(0x147):{const _0x219be6=_0x5cb876['payload'][_0xb9f2e7(0x13f)];_0x3a1954[_0xb9f2e7(0x147)](_0x219be6);break;}}}),_0x2d4877(this['_injector'],_0x3a1954);}));}[_0x437c14(0x14f)](){const _0x4d1d07=_0x437c14;this[_0x4d1d07(0x139)](this[_0x4d1d07(0x15b)][_0x4d1d07(0x140)][_0x4d1d07(0x178)](async _0x4cf466=>{const _0x5acd53=_0x4d1d07;var _0x24a72b,_0x1c94b3,_0x3134cb,_0x501202;const _0x299e3e=(_0x24a72b=this[_0x5acd53(0x14e)][_0x5acd53(0x183)](_0x4cf466[_0x5acd53(0x18a)])[_0x5acd53(0x14c)](_0xb00cc6=>_0xb00cc6['threadId']===_0x4cf466['threadId']))==null?void 0x0:_0x24a72b[_0x5acd53(0x187)];if(!_0x299e3e)return;const {unitId:_0x5d5b60,subUnitId:_0x271111}=_0x299e3e;switch(_0x4cf466['user']&&this[_0x5acd53(0x14d)][_0x5acd53(0x19c)](_0x4cf466['user']),_0x4cf466['type']){case _0x4330df[_0x5acd53(0x194)]:break;case _0x4330df[_0x5acd53(0x136)]:{this[_0x5acd53(0x14e)][_0x5acd53(0x172)](_0x5d5b60,_0x271111,{'unitId':_0x5d5b60,'subUnitId':_0x271111,'ref':'','id':_0x4cf466['replyId'],'dT':_0x416b7d(+_0x4cf466[_0x5acd53(0x1a2)]),'threadId':_0x4cf466[_0x5acd53(0x161)],'personId':(_0x3134cb=(_0x1c94b3=_0x4cf466['user'])==null?void 0x0:_0x1c94b3['userID'])!=null?_0x3134cb:_0x4cf466[_0x5acd53(0x158)],'text':JSON['parse'](_0x4cf466['content']),'parentId':_0x299e3e['id']});break;}case _0x4330df['Delete']:{const _0x25dcca=this[_0x5acd53(0x14e)][_0x5acd53(0x196)](_0x5d5b60,_0x271111,_0x4cf466['replyId']);_0x25dcca&&_0x25dcca[_0x5acd53(0x15c)]&&this[_0x5acd53(0x14e)][_0x5acd53(0x162)](_0x5d5b60,_0x271111,_0x4cf466['replyId']);break;}case _0x4330df[_0x5acd53(0x16d)]:{this[_0x5acd53(0x14e)][_0x5acd53(0x153)](_0x5d5b60,_0x271111,{'commentId':_0x4cf466[_0x5acd53(0x188)],'text':JSON['parse'](_0x4cf466['content'])});break;}case _0x4330df[_0x5acd53(0x13c)]:{const _0x5046a3=(_0x501202=this['_threadCommentModel'][_0x5acd53(0x183)](_0x4cf466['unitId'])['find'](_0x5e2f76=>_0x5e2f76[_0x5acd53(0x161)]===_0x4cf466['threadId']))==null?void 0x0:_0x501202[_0x5acd53(0x187)];_0x5046a3&&this[_0x5acd53(0x14e)][_0x5acd53(0x186)](_0x5d5b60,_0x271111,_0x5046a3['id'],_0x4cf466['solved']===_0x7859da[_0x5acd53(0x1a5)]);break;}}}));}};_0x1417c0=_0x4f5771([_0x968b49(0x0,_0x4c82ca[_0x437c14(0x180)](_0x2a52ea[_0x437c14(0x1aa)])),_0x968b49(0x1,_0x4c82ca[_0x437c14(0x180)](_0x30dc8c[_0x437c14(0x16e)])),_0x968b49(0x2,_0x4c82ca['Inject'](_0x4c82ca[_0x437c14(0x143)])),_0x968b49(0x3,_0x4c82ca[_0x437c14(0x180)](_0x4c82ca[_0x437c14(0x199)]))],_0x1417c0);const _0x20cc5e=_0x437c14(0x171),_0x230dab={};var _0x286bb9=Object['getOwnPropertyDescriptor'],_0x1d0ad9=(_0x2b3944,_0x256871,_0x252112,_0x1f9910)=>{const _0x467ce6=_0x437c14;for(var _0x420641=_0x1f9910>0x1?void 0x0:_0x1f9910?_0x286bb9(_0x256871,_0x252112):_0x256871,_0xa63b84=_0x2b3944[_0x467ce6(0x18b)]-0x1,_0xba5054;_0xa63b84>=0x0;_0xa63b84--)(_0xba5054=_0x2b3944[_0xa63b84])&&(_0x420641=_0xba5054(_0x420641)||_0x420641);return _0x420641;},_0x2a8ef1=(_0x39a8a7,_0x4a799c)=>(_0x17ce2c,_0x21aa34)=>_0x4a799c(_0x17ce2c,_0x21aa34,_0x39a8a7);function _0x366ef8(_0xa53dcb,_0x4df3c1){const _0x1da4ad=_0x437c14,_0x3f9e6d=_0xa53dcb[_0x1da4ad(0x197)][0x0];return{..._0x4df3c1,'id':_0x3f9e6d[_0x1da4ad(0x188)],'resolved':_0xa53dcb['solved']===0x1,'dT':_0x416b7d(_0x3f9e6d['createTimestamp']),'personId':_0x3f9e6d[_0x1da4ad(0x158)],'threadId':_0x3f9e6d[_0x1da4ad(0x161)]};}function _0xdb0f61(_0xf1b55,_0x48cef7,_0x30770a){const _0x107f8f=_0x437c14;var _0x2e152f,_0x53b752;if(((_0x53b752=(_0x2e152f=_0xf1b55==null?void 0x0:_0xf1b55[_0x107f8f(0x197)])==null?void 0x0:_0x2e152f[_0x107f8f(0x18b)])!=null?_0x53b752:0x0)>0x0){const _0x2ece23=(_0x23e8d0,_0x2833f8)=>({'id':_0x23e8d0['replyId'],'threadId':_0x23e8d0[_0x107f8f(0x161)],'dT':_0x416b7d(_0x23e8d0[_0x107f8f(0x1a2)]),'personId':_0x23e8d0[_0x107f8f(0x158)],'resolved':_0xf1b55[_0x107f8f(0x16b)]===_0x7859da[_0x107f8f(0x1a5)],'unitId':_0x48cef7,'subUnitId':_0x30770a,'text':JSON[_0x107f8f(0x1ac)](_0x23e8d0[_0x107f8f(0x142)]),'parentId':_0x2833f8}),_0x27b8a5=_0x2ece23(_0xf1b55['replies'][0x0]);return{..._0x27b8a5,'children':_0xf1b55[_0x107f8f(0x197)][_0x107f8f(0x18f)](0x1)[_0x107f8f(0x14b)](_0x1938c4=>_0x2ece23(_0x1938c4,_0x27b8a5['id']))};}return null;}let _0x5724dd=class{constructor(_0x513aa9,_0x5da920,_0x2630ba){const _0x31ff97=_0x437c14;this['_httpService']=_0x513aa9,this[_0x31ff97(0x14d)]=_0x5da920,this['_sessionService']=_0x2630ba;}async['addComment'](_0x4b4458){const _0x8b57d=_0x437c14;var _0x5d5bcf,_0x904f35;const {parentId:_0x25a6b8,unitId:_0x2553d0,text:_0x2ca174,threadId:_0x218a75}=_0x4b4458,_0x8f5464=(_0x904f35=(_0x5d5bcf=_0x2ca174['customRanges'])==null?void 0x0:_0x5d5bcf['filter'](_0x3fdbd2=>_0x3fdbd2[_0x8b57d(0x17a)]===_0x4c82ca[_0x8b57d(0x150)][_0x8b57d(0x19a)])[_0x8b57d(0x14b)](_0x474d6f=>_0x474d6f['rangeId']))!=null?_0x904f35:[],_0x489d9c=JSON['stringify'](_0x2ca174),_0x51681c=(await this[_0x8b57d(0x130)][_0x8b57d(0x166)](_0x2553d0))[_0x8b57d(0x195)]();if(_0x25a6b8){const _0x2352b5={'memberId':_0x51681c,'unitId':_0x2553d0,'content':_0x489d9c,'mention':_0x8f5464,'threadId':_0x218a75},_0x411337=(await this[_0x8b57d(0x174)]['post']('/universer-api/comment/unit/'+_0x2553d0+'/reply',{'body':_0x2352b5}))[_0x8b57d(0x179)][_0x8b57d(0x17f)];return{..._0x4b4458,'id':_0x411337[_0x8b57d(0x188)],'dT':_0x4c82ca[_0x8b57d(0x15d)](+_0x411337[_0x8b57d(0x1a2)])['format'](_0x8b57d(0x169)),'personId':_0x411337[_0x8b57d(0x158)]};}else{const _0x34ce78={'memberId':_0x51681c,'unitId':_0x2553d0,'content':_0x489d9c,'mention':_0x8f5464},_0x1b9261=await this[_0x8b57d(0x174)][_0x8b57d(0x155)](_0x8b57d(0x176)+_0x2553d0+_0x8b57d(0x134),{'body':_0x34ce78});return _0x366ef8(_0x1b9261['body'][_0x8b57d(0x1a7)],_0x4b4458);}}async['updateComment'](_0x58205b){const _0x21ec1a=_0x437c14;var _0x4a0ee9,_0x55ad1c;const {text:_0x4257ee,unitId:_0x33a538}=_0x58205b,_0x69f8ab=(_0x55ad1c=(_0x4a0ee9=_0x4257ee['customRanges'])==null?void 0x0:_0x4a0ee9[_0x21ec1a(0x137)](_0x222358=>_0x222358['rangeType']===_0x4c82ca[_0x21ec1a(0x150)]['COMMENT'])[_0x21ec1a(0x14b)](_0x48564b=>_0x48564b[_0x21ec1a(0x157)]))!=null?_0x55ad1c:[],_0x31badd=JSON[_0x21ec1a(0x156)](_0x4257ee),_0x18c5b2=_0x58205b[_0x21ec1a(0x161)],_0x3e263e=_0x58205b['id'],_0x39a5c0={'memberId':(await this[_0x21ec1a(0x130)]['requireSession'](_0x33a538))['getMemberID'](),'unitId':_0x33a538,'threadId':_0x18c5b2,'mention':_0x69f8ab,'content':_0x31badd,'replyId':_0x3e263e},_0x2467be=await this['_httpService']['post'](_0x21ec1a(0x176)+_0x33a538+'/edit',{'body':_0x39a5c0});return!_0x2467be[_0x21ec1a(0x179)]['error']||_0x2467be[_0x21ec1a(0x179)][_0x21ec1a(0x13d)]['code']===0x1;}async['resolveComment'](_0x116bc2){const _0x243997=_0x437c14,{unitId:_0x1b27fa}=_0x116bc2,_0x4e9323=_0x116bc2[_0x243997(0x161)],_0xb097ec={'memberId':this[_0x243997(0x14d)][_0x243997(0x138)]()[_0x243997(0x154)],'unitId':_0x1b27fa,'threadId':_0x4e9323,'solved':_0x116bc2['resolved']?_0x7859da[_0x243997(0x1a5)]:_0x7859da[_0x243997(0x135)]},_0x348678=await this[_0x243997(0x174)][_0x243997(0x155)](_0x243997(0x176)+_0x1b27fa+'/solved',{'body':_0xb097ec});return!_0x348678[_0x243997(0x179)][_0x243997(0x13d)]||_0x348678['body']['error'][_0x243997(0x1ab)]===0x1;}async[_0x437c14(0x162)](_0x367235,_0x9d9823,_0x4527cc,_0x45ca38){const _0x434971=_0x437c14,_0xdb700b={'memberId':(await this[_0x434971(0x130)]['requireSession'](_0x367235))[_0x434971(0x195)](),'threadId':_0x4527cc,'replyId':_0x45ca38,'unitId':_0x367235},_0x435f3b=await this[_0x434971(0x174)][_0x434971(0x155)]('/universer-api/comment/unit/'+_0x367235+_0x434971(0x19f),{'body':_0xdb700b});return!_0x435f3b[_0x434971(0x179)][_0x434971(0x13d)]||_0x435f3b['body'][_0x434971(0x13d)][_0x434971(0x1ab)]===0x1;}async[_0x437c14(0x133)](_0xcad9d3,_0x5d1b37,_0x4330e0){const _0x1a12cc=_0x437c14,_0x5468d0={'unitId':_0xcad9d3,'threadId':_0x4330e0},_0x2ce540=await this['_httpService'][_0x1a12cc(0x155)]('/universer-api/comment/unit/'+_0xcad9d3+'/list',{'body':_0x5468d0}),_0x152596=_0x4330e0[_0x1a12cc(0x14b)](_0xd28abc=>_0xdb0f61(_0x2ce540[_0x1a12cc(0x179)][_0x1a12cc(0x16a)][_0xd28abc],_0xcad9d3,_0x5d1b37))['filter'](Boolean);return Object[_0x1a12cc(0x165)](_0x2ce540[_0x1a12cc(0x179)]['users'])[_0x1a12cc(0x15e)](_0x1934f1=>{const _0x1efafd=_0x1a12cc;this[_0x1efafd(0x14d)][_0x1efafd(0x19c)](_0x1934f1);}),_0x152596;}['saveCommentToSnapshot'](_0x2d9e06){const _0x37e4e2=_0x437c14;return{'id':_0x2d9e06['id'],'threadId':_0x2d9e06[_0x37e4e2(0x161)],'ref':_0x2d9e06[_0x37e4e2(0x148)]};}};_0x5724dd=_0x1d0ad9([_0x2a8ef1(0x0,_0x4c82ca[_0x437c14(0x180)](_0x8ca4ce[_0x437c14(0x19d)])),_0x2a8ef1(0x1,_0x4c82ca['Inject'](_0x4c82ca['UserManagerService'])),_0x2a8ef1(0x2,_0x4c82ca[_0x437c14(0x180)](_0x2a52ea[_0x437c14(0x1a9)]))],_0x5724dd);var _0x3f4e5d=Object[_0x437c14(0x192)],_0x4c0ba9=(_0x426f83,_0x4d945d,_0x390128,_0x23e558)=>{const _0x23b559=_0x437c14;for(var _0x3fd495=_0x23e558>0x1?void 0x0:_0x23e558?_0x3f4e5d(_0x4d945d,_0x390128):_0x4d945d,_0x1a14b3=_0x426f83[_0x23b559(0x18b)]-0x1,_0x3b73ae;_0x1a14b3>=0x0;_0x1a14b3--)(_0x3b73ae=_0x426f83[_0x1a14b3])&&(_0x3fd495=_0x3b73ae(_0x3fd495)||_0x3fd495);return _0x3fd495;},_0x1f2310=(_0x165d17,_0x1d930c)=>(_0x1b73e1,_0x73d5c4)=>_0x1d930c(_0x1b73e1,_0x73d5c4,_0x165d17);let _0x358942=class extends _0x4c82ca['Disposable']{constructor(_0x33aa47,_0x3750ac){const _0x4668c8=_0x437c14;super(),this[_0x4668c8(0x163)]=_0x33aa47,this[_0x4668c8(0x193)]=_0x3750ac,this[_0x4668c8(0x12f)]();}[_0x437c14(0x12f)](){const _0x387567=_0x437c14;this[_0x387567(0x163)]['dataSource']=this[_0x387567(0x193)],this[_0x387567(0x163)]['syncUpdateMutationToColla']=!0x1;}};_0x358942=_0x4c0ba9([_0x1f2310(0x0,_0x30dc8c[_0x437c14(0x177)]),_0x1f2310(0x1,_0x4c82ca['Inject'](_0x5724dd))],_0x358942);var _0x5254ed=Object['defineProperty'],_0x5d3f9d=Object['getOwnPropertyDescriptor'],_0x119651=(_0x26b0f5,_0x1763a5,_0x127f9a)=>_0x1763a5 in _0x26b0f5?_0x5254ed(_0x26b0f5,_0x1763a5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x127f9a}):_0x26b0f5[_0x1763a5]=_0x127f9a,_0x29ed63=(_0x59a08c,_0x381632,_0x35def7,_0x39b43e)=>{const _0x3c17c1=_0x437c14;for(var _0x2f6b5c=_0x39b43e>0x1?void 0x0:_0x39b43e?_0x5d3f9d(_0x381632,_0x35def7):_0x381632,_0x31f1a9=_0x59a08c[_0x3c17c1(0x18b)]-0x1,_0x267b22;_0x31f1a9>=0x0;_0x31f1a9--)(_0x267b22=_0x59a08c[_0x31f1a9])&&(_0x2f6b5c=_0x267b22(_0x2f6b5c)||_0x2f6b5c);return _0x2f6b5c;},_0x2a9ba8=(_0x17f94c,_0x2db662)=>(_0x45e7e2,_0x388599)=>_0x2db662(_0x45e7e2,_0x388599,_0x17f94c),_0x406575=(_0x1a4f8f,_0x20ccf6,_0x4c710f)=>_0x119651(_0x1a4f8f,typeof _0x20ccf6!=_0x437c14(0x1a3)?_0x20ccf6+'':_0x20ccf6,_0x4c710f);_0x195de8['UniverThreadCommentDataSourcePlugin']=class extends _0x4c82ca['Plugin']{constructor(_0x30825f=_0x230dab,_0x5f3bf1,_0x5f211e){const _0x4f93f1=_0x437c14;super(),this[_0x4f93f1(0x1a4)]=_0x30825f,this['_injector']=_0x5f3bf1,this['_configService']=_0x5f211e;const {..._0x61987a}=_0x4c82ca[_0x4f93f1(0x164)]({},_0x230dab,this[_0x4f93f1(0x1a4)]);this[_0x4f93f1(0x12c)]['setConfig'](_0x20cc5e,_0x61987a);}[_0x437c14(0x17b)](){[[_0x5724dd],[_0x358942],[_0x1417c0]]['forEach'](_0x1a54de=>{const _0x272186=_0x4248;this['_injector'][_0x272186(0x147)](_0x1a54de);});}[_0x437c14(0x191)](){const _0x37aa84=_0x437c14;this[_0x37aa84(0x1a1)]['get'](_0x358942),this[_0x37aa84(0x1a1)][_0x37aa84(0x17d)](_0x1417c0);}},_0x406575(_0x195de8['UniverThreadCommentDataSourcePlugin'],_0x437c14(0x18e),_0x5eb1ac),_0x406575(_0x195de8[_0x437c14(0x15f)],'type',_0x4c82ca[_0x437c14(0x13e)]['UNIVER_UNKNOWN']),_0x195de8[_0x437c14(0x15f)]=_0x29ed63([_0x4c82ca[_0x437c14(0x19b)](_0x2aa394['UniverThreadCommentUIPlugin'],_0x2a52ea['UniverCollaborationClientPlugin'],_0x452d03['UniverLicensePlugin']),_0x2a9ba8(0x1,_0x4c82ca[_0x437c14(0x180)](_0x4c82ca['Injector'])),_0x2a9ba8(0x2,_0x4c82ca[_0x437c14(0x149)])],_0x195de8[_0x437c14(0x15f)]),Object[_0x437c14(0x152)](_0x195de8,Symbol[_0x437c14(0x151)],{'value':_0x437c14(0x1a0)});}));function _0x3bda(){const _0x158641=['UniverInstanceType','personId','commentUpdate$','pipe','content','UserManagerService','UniverThreadCommentUi','_initUserSync','@univerjs-pro/collaboration-client','add','ref','IConfigService','395886eNbQpu','map','find','_userService','_threadCommentModel','_init','CustomRangeType','toStringTag','defineProperty','updateComment','userID','post','stringify','rangeId','userId','format','function','_commentService','parentId','dayjs','forEach','UniverThreadCommentDataSourcePlugin','658112rpgKdq','threadId','deleteComment','_threadCommentDataSourceService','merge','values','requireSession','130TAlvCr','@univerjs/thread-comment-ui','YYYY/MM/DD\x20HH:mm','comments','solved','Disposable','Edit','ThreadCommentModel','@univerjs/core','bufferTime','thread-comment-data-source.config','addComment','UniverThreadComment','_httpService','exports','/universer-api/comment/unit/','IThreadCommentDataSourceService','subscribe','body','rangeType','onStarting','Delete','get','13613wMhNWV','reply','Inject','7252882KgpxzN','202CRUXFv','getUnit','@univerjs-pro/license','UniverNetwork','resolveComment','root','replyId','@univerjs/network','unitId','length','@univerjs/thread-comment','users','pluginName','slice','UNRECOGNIZED','onReady','getOwnPropertyDescriptor','_threadCommentDataSource','Add','getMemberID','getComment','replies','13820104yvBuSJ','Injector','COMMENT','DependentOn','addUser','HTTPService','Unknown','/delete','Module','_injector','createTimestamp','symbol','_config','Solved','17862003qTUjXG','comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CollaborationSessionService','CommentService','code','parse','_configService','40YNPVLR','2991840wDTrNH','_initDataSource','_sessionService','rxjs','amd','listComments','/add','OpenOrReOpen','Reply','filter','getCurrentUser','disposeWithMe','UniverCore','object','Solve','error'];_0x3bda=function(){return _0x158641;};return _0x3bda();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.12.4-experimental.20251210-8d33c6e",
3
+ "version": "0.12.4-experimental.20251210-29c379a",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.12.4-experimental.20251210-8d33c6e",
49
- "@univerjs-pro/license": "0.12.4-experimental.20251210-8d33c6e",
50
- "@univerjs/network": "0.12.4-experimental.20251210-8d33c6e",
51
- "@univerjs/thread-comment": "0.12.4-experimental.20251210-8d33c6e",
52
- "@univerjs/thread-comment-ui": "0.12.4-experimental.20251210-8d33c6e",
48
+ "@univerjs-pro/collaboration-client": "0.12.4-experimental.20251210-29c379a",
49
+ "@univerjs/network": "0.12.4-experimental.20251210-29c379a",
50
+ "@univerjs-pro/license": "0.12.4-experimental.20251210-29c379a",
51
+ "@univerjs/thread-comment": "0.12.4-experimental.20251210-29c379a",
52
+ "@univerjs/core": "0.12.4-experimental.20251210-29c379a",
53
53
  "@univerjs/protocol": "0.1.47",
54
- "@univerjs/core": "0.12.4-experimental.20251210-8d33c6e"
54
+ "@univerjs/thread-comment-ui": "0.12.4-experimental.20251210-29c379a"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",