@univerjs-pro/thread-comment-datasource 0.15.0-insiders.20260110-48b77c8 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x496397=_0x50c3;(function(_0xc5a695,_0x4537b5){const _0x4f1b7d=_0x50c3,_0xaa87cf=_0xc5a695();while(!![]){try{const _0x1fad32=-parseInt(_0x4f1b7d(0x21f))/0x1*(-parseInt(_0x4f1b7d(0x1d4))/0x2)+-parseInt(_0x4f1b7d(0x1dc))/0x3*(parseInt(_0x4f1b7d(0x1e9))/0x4)+-parseInt(_0x4f1b7d(0x1ab))/0x5+parseInt(_0x4f1b7d(0x1e7))/0x6*(parseInt(_0x4f1b7d(0x1c6))/0x7)+parseInt(_0x4f1b7d(0x1c0))/0x8+parseInt(_0x4f1b7d(0x1c5))/0x9*(parseInt(_0x4f1b7d(0x1f4))/0xa)+-parseInt(_0x4f1b7d(0x1d0))/0xb;if(_0x1fad32===_0x4537b5)break;else _0xaa87cf['push'](_0xaa87cf['shift']());}catch(_0x2af6c2){_0xaa87cf['push'](_0xaa87cf['shift']());}}}(_0xdb8f,0x20af4));Object[_0x496397(0x1f9)](exports,Symbol[_0x496397(0x21c)],{'value':_0x496397(0x1e4)});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=_0x496397(0x21e);function _0x50c3(_0x564d0a,_0x186c00){_0x564d0a=_0x564d0a-0x1a7;const _0xdb8f00=_0xdb8f();let _0x50c357=_0xdb8f00[_0x564d0a];return _0x50c357;}function _0xdb8f(){const _0x497def=['/list','symbol','parse','commentUpdate$','comment','UniverInstanceType','reply','threadId','HTTPService','_sessionService','UniverLicensePlugin','OpenOrReOpen','ThreadCommentModel','payload','forEach','pluginName','error','/solved','createTimestamp','userID','requireSession','getMemberID','toStringTag','bufferTime','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','19bfmGnq','customRanges','resolveComment','Reply','type','/edit','listComments','YYYY/MM/DD\x20HH:mm','_threadCommentModel','Add','UNIVER_UNKNOWN','1227810YSWNqT','/add','user','/universer-api/user/list','_configService','_threadCommentDataSourceService','UniverThreadCommentUIPlugin','getComment','IConfigService','get','dataSource','DependentOn','Plugin','saveCommentToSnapshot','map','length','CustomRangeType','_commentService','getOwnPropertyDescriptor','stringify','UserManagerService','807992GSYSnk','_config','addUser','_httpService','merge','2511NGJAhu','1403871DQCUzp','solved','delete','Edit','_initUserSync','parentId','thread-comment-data-source.config','userId','onStarting','deleteComment','3347762DpfsJl','find','/reply','personId','23158IhikXn','Unknown','Solved','_userService','_initDataSource','UNRECOGNIZED','setConfig','replies','789MVqPGr','values','Delete','root','filter','body','getUnit','COMMENT','Module','/universer-api/comment/unit/','Injector','6GTaVMW','CommentService','32fKGlgu','content','code','ref','rangeId','UniverThreadCommentDataSourcePlugin','comments','disposeWithMe','unitId','CollaborationSessionService','_injector','5890RtyYZh','resolved','subscribe','post','/delete','defineProperty','_init','getCurrentUser','users','format','Inject','dayjs','Solve','Disposable','replyId','add','addComment','rangeType'];_0xdb8f=function(){return _0x497def;};return _0xdb8f();}var I=(_0x43136f=>(_0x43136f[_0x43136f[_0x496397(0x211)]=0x0]=_0x496397(0x211),_0x43136f[_0x43136f[_0x496397(0x1d6)]=0x1]=_0x496397(0x1d6),_0x43136f[_0x43136f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x43136f))(I||{}),v=(_0x2aa0e1=>(_0x2aa0e1[_0x2aa0e1[_0x496397(0x1d5)]=0x0]=_0x496397(0x1d5),_0x2aa0e1[_0x2aa0e1[_0x496397(0x1a9)]=0x1]=_0x496397(0x1a9),_0x2aa0e1[_0x2aa0e1[_0x496397(0x222)]=0x2]=_0x496397(0x222),_0x2aa0e1[_0x2aa0e1[_0x496397(0x1c9)]=0x3]=_0x496397(0x1c9),_0x2aa0e1[_0x2aa0e1['Delete']=0x4]=_0x496397(0x1de),_0x2aa0e1[_0x2aa0e1[_0x496397(0x200)]=0x5]=_0x496397(0x200),_0x2aa0e1[_0x2aa0e1[_0x496397(0x1d9)]=-0x1]=_0x496397(0x1d9),_0x2aa0e1))(v||{});const f=_0x1667ee=>c[_0x496397(0x1ff)](new Date(+_0x1667ee))['format'](_0x496397(0x1a7)),R=async(_0x248ac6,_0x266cea)=>{const _0x12dac8=_0x496397,_0x3167ee=_0x248ac6[_0x12dac8(0x1b4)](c[_0x12dac8(0x1bf)]),_0x5e0250=_0x248ac6[_0x12dac8(0x1b4)](P[_0x12dac8(0x20e)]);_0x266cea[_0x12dac8(0x214)](_0x5be8d9=>{const _0x1c4a9d=_0x12dac8;_0x3167ee['getUser'](_0x5be8d9)&&_0x266cea[_0x1c4a9d(0x1c8)](_0x5be8d9);}),_0x266cea['size']&&(await _0x5e0250['get'](_0x12dac8(0x1ae),{'params':{'userIDs':[..._0x266cea]}}))[_0x12dac8(0x1e1)][_0x12dac8(0x1fc)][_0x12dac8(0x214)](_0x16a6ae=>{_0x16a6ae&&_0x3167ee['addUser'](_0x16a6ae);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x464cd2,_0x52f20b,_0x494bf2,_0x1f181d)=>{for(var _0x28aee2=_0x1f181d>0x1?void 0x0:_0x1f181d?$(_0x52f20b,_0x494bf2):_0x52f20b,_0x3d8017=_0x464cd2['length']-0x1,_0x4790a7;_0x3d8017>=0x0;_0x3d8017--)(_0x4790a7=_0x464cd2[_0x3d8017])&&(_0x28aee2=_0x4790a7(_0x28aee2)||_0x28aee2);return _0x28aee2;},S=(_0x27a8c2,_0x362b35)=>(_0x245357,_0x3631e6)=>_0x362b35(_0x245357,_0x3631e6,_0x27a8c2);let _=class extends c[_0x496397(0x201)]{constructor(_0x2eb10c,_0x1cbceb,_0x4d8e9a,_0xde809b){const _0x2d2e4a=_0x496397;super(),this[_0x2d2e4a(0x1bc)]=_0x2eb10c,this[_0x2d2e4a(0x1a8)]=_0x1cbceb,this['_userService']=_0x4d8e9a,this[_0x2d2e4a(0x1f3)]=_0xde809b,this[_0x2d2e4a(0x1fa)](),this[_0x2d2e4a(0x1ca)]();}[_0x496397(0x1ca)](){const _0x5ee67a=_0x496397;this[_0x5ee67a(0x1f0)](this[_0x5ee67a(0x1a8)][_0x5ee67a(0x209)]['pipe'](j[_0x5ee67a(0x21d)](0x10))['subscribe'](_0x1e888b=>{const _0xc2af8d=_0x5ee67a,_0x44e48c=new Set();_0x1e888b['forEach'](_0x40a87a=>{const _0x559c8a=_0x50c3;if(_0x40a87a[_0x559c8a(0x223)]==='add'){const _0x1c9b1e=_0x40a87a[_0x559c8a(0x213)][_0x559c8a(0x1d3)];_0x44e48c['add'](_0x1c9b1e);}}),R(this[_0xc2af8d(0x1f3)],_0x44e48c);}));}[_0x496397(0x1fa)](){const _0x2c8f54=_0x496397;this[_0x2c8f54(0x1f0)](this[_0x2c8f54(0x1bc)]['commentUpdate$'][_0x2c8f54(0x1f6)](async _0x2ef9d7=>{const _0x4db751=_0x2c8f54;var _0x59a91c,_0x296d28,_0x1d5504,_0x5caa74;const _0x280a59=(_0x59a91c=this['_threadCommentModel'][_0x4db751(0x1e2)](_0x2ef9d7[_0x4db751(0x1f1)])[_0x4db751(0x1d1)](_0x54a988=>_0x54a988[_0x4db751(0x20d)]===_0x2ef9d7['threadId']))==null?void 0x0:_0x59a91c[_0x4db751(0x1df)];if(!_0x280a59)return;const {unitId:_0x29cec8,subUnitId:_0x17124b}=_0x280a59;switch(_0x2ef9d7[_0x4db751(0x1ad)]&&this[_0x4db751(0x1d7)][_0x4db751(0x1c2)](_0x2ef9d7['user']),_0x2ef9d7[_0x4db751(0x223)]){case v[_0x4db751(0x1a9)]:break;case v['Reply']:{this[_0x4db751(0x1a8)][_0x4db751(0x204)](_0x29cec8,_0x17124b,{'unitId':_0x29cec8,'subUnitId':_0x17124b,'ref':'','id':_0x2ef9d7[_0x4db751(0x202)],'dT':f(+_0x2ef9d7[_0x4db751(0x218)]),'threadId':_0x2ef9d7[_0x4db751(0x20d)],'personId':(_0x1d5504=(_0x296d28=_0x2ef9d7[_0x4db751(0x1ad)])==null?void 0x0:_0x296d28[_0x4db751(0x219)])!=null?_0x1d5504:_0x2ef9d7[_0x4db751(0x1cd)],'text':JSON[_0x4db751(0x208)](_0x2ef9d7[_0x4db751(0x1ea)]),'parentId':_0x280a59['id']});break;}case v[_0x4db751(0x1de)]:{const _0x5696d4=this[_0x4db751(0x1a8)][_0x4db751(0x1b2)](_0x29cec8,_0x17124b,_0x2ef9d7[_0x4db751(0x202)]);_0x5696d4&&_0x5696d4[_0x4db751(0x1cb)]&&this['_threadCommentModel'][_0x4db751(0x1cf)](_0x29cec8,_0x17124b,_0x2ef9d7['replyId']);break;}case v[_0x4db751(0x1c9)]:{this['_threadCommentModel']['updateComment'](_0x29cec8,_0x17124b,{'commentId':_0x2ef9d7['replyId'],'text':JSON[_0x4db751(0x208)](_0x2ef9d7[_0x4db751(0x1ea)])});break;}case v[_0x4db751(0x200)]:{const _0x2a5702=(_0x5caa74=this[_0x4db751(0x1a8)][_0x4db751(0x1e2)](_0x2ef9d7['unitId'])['find'](_0xfc40db=>_0xfc40db[_0x4db751(0x20d)]===_0x2ef9d7[_0x4db751(0x20d)]))==null?void 0x0:_0x5caa74[_0x4db751(0x1df)];_0x2a5702&&this['_threadCommentModel']['resolveComment'](_0x29cec8,_0x17124b,_0x2a5702['id'],_0x2ef9d7[_0x4db751(0x1c7)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x496397(0x1fe)](b[_0x496397(0x1e8)])),S(0x1,c['Inject'](M[_0x496397(0x212)])),S(0x2,c[_0x496397(0x1fe)](c[_0x496397(0x1bf)])),S(0x3,c[_0x496397(0x1fe)](c[_0x496397(0x1e6)]))],_);const q=_0x496397(0x1cc),D={};var A=Object[_0x496397(0x1bd)],x=(_0x1526d9,_0x483b9f,_0x547e55,_0x1e96db)=>{const _0x461f32=_0x496397;for(var _0x69f86d=_0x1e96db>0x1?void 0x0:_0x1e96db?A(_0x483b9f,_0x547e55):_0x483b9f,_0x266e69=_0x1526d9[_0x461f32(0x1ba)]-0x1,_0x390216;_0x266e69>=0x0;_0x266e69--)(_0x390216=_0x1526d9[_0x266e69])&&(_0x69f86d=_0x390216(_0x69f86d)||_0x69f86d);return _0x69f86d;},C=(_0xc014bb,_0x58f93e)=>(_0x179bc9,_0x21a9f5)=>_0x58f93e(_0x179bc9,_0x21a9f5,_0xc014bb);function Y(_0x56bc64,_0x489b4b){const _0x4c7c77=_0x496397,_0x1357af=_0x56bc64[_0x4c7c77(0x1db)][0x0];return{..._0x489b4b,'id':_0x1357af[_0x4c7c77(0x202)],'resolved':_0x56bc64[_0x4c7c77(0x1c7)]===0x1,'dT':f(_0x1357af[_0x4c7c77(0x218)]),'personId':_0x1357af[_0x4c7c77(0x1cd)],'threadId':_0x1357af[_0x4c7c77(0x20d)]};}function G(_0x1ba542,_0x5b9e89,_0x58f40c){const _0x2f9a83=_0x496397;var _0x27e062,_0x4788ac;if(((_0x4788ac=(_0x27e062=_0x1ba542==null?void 0x0:_0x1ba542['replies'])==null?void 0x0:_0x27e062[_0x2f9a83(0x1ba)])!=null?_0x4788ac:0x0)>0x0){const _0x200589=(_0x12e432,_0x4211e2)=>({'id':_0x12e432[_0x2f9a83(0x202)],'threadId':_0x12e432[_0x2f9a83(0x20d)],'dT':f(_0x12e432[_0x2f9a83(0x218)]),'personId':_0x12e432[_0x2f9a83(0x1cd)],'resolved':_0x1ba542[_0x2f9a83(0x1c7)]===I[_0x2f9a83(0x1d6)],'unitId':_0x5b9e89,'subUnitId':_0x58f40c,'text':JSON[_0x2f9a83(0x208)](_0x12e432[_0x2f9a83(0x1ea)]),'parentId':_0x4211e2}),_0x48ca36=_0x200589(_0x1ba542[_0x2f9a83(0x1db)][0x0]);return{..._0x48ca36,'children':_0x1ba542[_0x2f9a83(0x1db)]['slice'](0x1)[_0x2f9a83(0x1b9)](_0x4d3044=>_0x200589(_0x4d3044,_0x48ca36['id']))};}return null;}let p=class{constructor(_0x9c412a,_0x11e429,_0x7d1c6a){const _0x22dba8=_0x496397;this[_0x22dba8(0x1c3)]=_0x9c412a,this['_userService']=_0x11e429,this[_0x22dba8(0x20f)]=_0x7d1c6a;}async[_0x496397(0x204)](_0x25dc89){const _0x68c67a=_0x496397;var _0x3953f7,_0x4df76e;const {parentId:_0x48dcbb,unitId:_0x5a8fdd,text:_0x1ec326,threadId:_0x4eebd8}=_0x25dc89,_0x3289c1=(_0x4df76e=(_0x3953f7=_0x1ec326[_0x68c67a(0x220)])==null?void 0x0:_0x3953f7['filter'](_0x451f9e=>_0x451f9e[_0x68c67a(0x205)]===c['CustomRangeType'][_0x68c67a(0x1e3)])[_0x68c67a(0x1b9)](_0x43eaca=>_0x43eaca[_0x68c67a(0x1ed)]))!=null?_0x4df76e:[],_0x284ea6=JSON[_0x68c67a(0x1be)](_0x1ec326),_0x13091a=(await this[_0x68c67a(0x20f)][_0x68c67a(0x21a)](_0x5a8fdd))[_0x68c67a(0x21b)]();if(_0x48dcbb){const _0x308350={'memberId':_0x13091a,'unitId':_0x5a8fdd,'content':_0x284ea6,'mention':_0x3289c1,'threadId':_0x4eebd8},_0x50a430=(await this[_0x68c67a(0x1c3)][_0x68c67a(0x1f7)](_0x68c67a(0x1e5)+_0x5a8fdd+_0x68c67a(0x1d2),{'body':_0x308350}))[_0x68c67a(0x1e1)][_0x68c67a(0x20c)];return{..._0x25dc89,'id':_0x50a430[_0x68c67a(0x202)],'dT':c['dayjs'](+_0x50a430[_0x68c67a(0x218)])[_0x68c67a(0x1fd)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x50a430['userId']};}else{const _0x484525={'memberId':_0x13091a,'unitId':_0x5a8fdd,'content':_0x284ea6,'mention':_0x3289c1},_0x5b1204=await this[_0x68c67a(0x1c3)][_0x68c67a(0x1f7)]('/universer-api/comment/unit/'+_0x5a8fdd+_0x68c67a(0x1ac),{'body':_0x484525});return Y(_0x5b1204[_0x68c67a(0x1e1)][_0x68c67a(0x20a)],_0x25dc89);}}async['updateComment'](_0x483d14){const _0x14b1e6=_0x496397;var _0x15fafa,_0x4ec84b;const {text:_0x7c98b,unitId:_0x2c1055}=_0x483d14,_0x294ac7=(_0x4ec84b=(_0x15fafa=_0x7c98b[_0x14b1e6(0x220)])==null?void 0x0:_0x15fafa[_0x14b1e6(0x1e0)](_0x1b5fa9=>_0x1b5fa9[_0x14b1e6(0x205)]===c[_0x14b1e6(0x1bb)][_0x14b1e6(0x1e3)])[_0x14b1e6(0x1b9)](_0x32769b=>_0x32769b[_0x14b1e6(0x1ed)]))!=null?_0x4ec84b:[],_0x1382ad=JSON[_0x14b1e6(0x1be)](_0x7c98b),_0x4a6c10=_0x483d14[_0x14b1e6(0x20d)],_0x5b5df7=_0x483d14['id'],_0x55f5ed={'memberId':(await this[_0x14b1e6(0x20f)][_0x14b1e6(0x21a)](_0x2c1055))[_0x14b1e6(0x21b)](),'unitId':_0x2c1055,'threadId':_0x4a6c10,'mention':_0x294ac7,'content':_0x1382ad,'replyId':_0x5b5df7},_0x59dd6a=await this['_httpService'][_0x14b1e6(0x1f7)](_0x14b1e6(0x1e5)+_0x2c1055+_0x14b1e6(0x224),{'body':_0x55f5ed});return!_0x59dd6a[_0x14b1e6(0x1e1)]['error']||_0x59dd6a['body'][_0x14b1e6(0x216)][_0x14b1e6(0x1eb)]===0x1;}async[_0x496397(0x221)](_0x501a4d){const _0x56e368=_0x496397,{unitId:_0x2a5048}=_0x501a4d,_0x9b76d3=_0x501a4d[_0x56e368(0x20d)],_0x532977={'memberId':this[_0x56e368(0x1d7)][_0x56e368(0x1fb)]()[_0x56e368(0x219)],'unitId':_0x2a5048,'threadId':_0x9b76d3,'solved':_0x501a4d[_0x56e368(0x1f5)]?I['Solved']:I['OpenOrReOpen']},_0x243baa=await this[_0x56e368(0x1c3)]['post']('/universer-api/comment/unit/'+_0x2a5048+_0x56e368(0x217),{'body':_0x532977});return!_0x243baa[_0x56e368(0x1e1)][_0x56e368(0x216)]||_0x243baa[_0x56e368(0x1e1)][_0x56e368(0x216)][_0x56e368(0x1eb)]===0x1;}async[_0x496397(0x1cf)](_0x29fbc3,_0x37afed,_0xd29964,_0x10b283){const _0x23d757=_0x496397,_0x66a3db={'memberId':(await this[_0x23d757(0x20f)][_0x23d757(0x21a)](_0x29fbc3))['getMemberID'](),'threadId':_0xd29964,'replyId':_0x10b283,'unitId':_0x29fbc3},_0x2d8fda=await this[_0x23d757(0x1c3)]['post']('/universer-api/comment/unit/'+_0x29fbc3+_0x23d757(0x1f8),{'body':_0x66a3db});return!_0x2d8fda[_0x23d757(0x1e1)][_0x23d757(0x216)]||_0x2d8fda[_0x23d757(0x1e1)][_0x23d757(0x216)][_0x23d757(0x1eb)]===0x1;}async[_0x496397(0x225)](_0x176412,_0x2741be,_0x1b30a0){const _0x4d95ce=_0x496397,_0x263b12={'unitId':_0x176412,'threadId':_0x1b30a0},_0x61f093=await this['_httpService'][_0x4d95ce(0x1f7)](_0x4d95ce(0x1e5)+_0x176412+_0x4d95ce(0x206),{'body':_0x263b12}),_0x27c620=_0x1b30a0['map'](_0x5c3dd1=>G(_0x61f093[_0x4d95ce(0x1e1)][_0x4d95ce(0x1ef)][_0x5c3dd1],_0x176412,_0x2741be))[_0x4d95ce(0x1e0)](Boolean);return Object[_0x4d95ce(0x1dd)](_0x61f093['body'][_0x4d95ce(0x1fc)])[_0x4d95ce(0x214)](_0x46fbb4=>{const _0x44d93e=_0x4d95ce;this['_userService'][_0x44d93e(0x1c2)](_0x46fbb4);}),_0x27c620;}[_0x496397(0x1b8)](_0x5ad51e){const _0x35cf07=_0x496397;return{'id':_0x5ad51e['id'],'threadId':_0x5ad51e[_0x35cf07(0x20d)],'ref':_0x5ad51e[_0x35cf07(0x1ec)]};}};p=x([C(0x0,c[_0x496397(0x1fe)](P[_0x496397(0x20e)])),C(0x1,c[_0x496397(0x1fe)](c[_0x496397(0x1bf)])),C(0x2,c[_0x496397(0x1fe)](b[_0x496397(0x1f2)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x3ac7b1,_0x279154,_0x22cdb2,_0x107095)=>{const _0xa43ed=_0x496397;for(var _0x203395=_0x107095>0x1?void 0x0:_0x107095?H(_0x279154,_0x22cdb2):_0x279154,_0x1a4ecd=_0x3ac7b1[_0xa43ed(0x1ba)]-0x1,_0x1f1e04;_0x1a4ecd>=0x0;_0x1a4ecd--)(_0x1f1e04=_0x3ac7b1[_0x1a4ecd])&&(_0x203395=_0x1f1e04(_0x203395)||_0x203395);return _0x203395;},y=(_0x554bfc,_0x398945)=>(_0x16ffc7,_0x2e41bd)=>_0x398945(_0x16ffc7,_0x2e41bd,_0x554bfc);let g=class extends c[_0x496397(0x201)]{constructor(_0x47c51f,_0x1bd6ff){super(),this['_threadCommentDataSourceService']=_0x47c51f,this['_threadCommentDataSource']=_0x1bd6ff,this['_initDataSource']();}[_0x496397(0x1d8)](){const _0x59dfe5=_0x496397;this['_threadCommentDataSourceService'][_0x59dfe5(0x1b5)]=this['_threadCommentDataSource'],this[_0x59dfe5(0x1b0)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x496397(0x1fe)](p))],g);var F=Object[_0x496397(0x1f9)],L=Object[_0x496397(0x1bd)],Z=(_0x189e48,_0x13121f,_0x5d1085)=>_0x13121f in _0x189e48?F(_0x189e48,_0x13121f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5d1085}):_0x189e48[_0x13121f]=_0x5d1085,W=(_0x5c8db4,_0x4ace0b,_0x203273,_0x2a54a7)=>{const _0x118798=_0x496397;for(var _0x3bfec4=_0x2a54a7>0x1?void 0x0:_0x2a54a7?L(_0x4ace0b,_0x203273):_0x4ace0b,_0x5b7b09=_0x5c8db4[_0x118798(0x1ba)]-0x1,_0x1ed0a8;_0x5b7b09>=0x0;_0x5b7b09--)(_0x1ed0a8=_0x5c8db4[_0x5b7b09])&&(_0x3bfec4=_0x1ed0a8(_0x3bfec4)||_0x3bfec4);return _0x3bfec4;},O=(_0x3e68b8,_0x55b7e3)=>(_0x2317f9,_0x3cb4a3)=>_0x55b7e3(_0x2317f9,_0x3cb4a3,_0x3e68b8),N=(_0x5214bf,_0x1557f9,_0x568ee1)=>Z(_0x5214bf,typeof _0x1557f9!=_0x496397(0x207)?_0x1557f9+'':_0x1557f9,_0x568ee1);exports[_0x496397(0x1ee)]=class extends c[_0x496397(0x1b7)]{constructor(_0x2a87a8=D,_0x298c19,_0xa6c756){const _0x525674=_0x496397;super(),this[_0x525674(0x1c1)]=_0x2a87a8,this[_0x525674(0x1f3)]=_0x298c19,this[_0x525674(0x1af)]=_0xa6c756;const {..._0x135a6d}=c[_0x525674(0x1c4)]({},D,this['_config']);this[_0x525674(0x1af)][_0x525674(0x1da)](q,_0x135a6d);}[_0x496397(0x1ce)](){const _0x57369d=_0x496397;[[p],[g],[_]][_0x57369d(0x214)](_0xfefbd4=>{const _0x5b34ff=_0x57369d;this[_0x5b34ff(0x1f3)][_0x5b34ff(0x203)](_0xfefbd4);});}['onReady'](){const _0x42e236=_0x496397;this['_injector'][_0x42e236(0x1b4)](g),this[_0x42e236(0x1f3)][_0x42e236(0x1b4)](_);}},N(exports[_0x496397(0x1ee)],_0x496397(0x215),U),N(exports[_0x496397(0x1ee)],_0x496397(0x223),c[_0x496397(0x20b)][_0x496397(0x1aa)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x496397(0x1b6)](w[_0x496397(0x1b1)],b['UniverCollaborationClientPlugin'],T[_0x496397(0x210)]),O(0x1,c[_0x496397(0x1fe)](c[_0x496397(0x1e6)])),O(0x2,c[_0x496397(0x1b3)])],exports[_0x496397(0x1ee)]);
1
+ 'use strict';const _0x4f5d82=_0xe2d6;(function(_0xc6f405,_0x2eacc0){const _0x46993d=_0xe2d6,_0x16adde=_0xc6f405();while(!![]){try{const _0x1dbda4=parseInt(_0x46993d(0xa2))/0x1*(parseInt(_0x46993d(0x86))/0x2)+-parseInt(_0x46993d(0xe0))/0x3*(parseInt(_0x46993d(0x6e))/0x4)+-parseInt(_0x46993d(0xa5))/0x5*(parseInt(_0x46993d(0x7d))/0x6)+parseInt(_0x46993d(0xa3))/0x7*(parseInt(_0x46993d(0xcc))/0x8)+parseInt(_0x46993d(0xb1))/0x9+parseInt(_0x46993d(0xde))/0xa*(-parseInt(_0x46993d(0x8d))/0xb)+parseInt(_0x46993d(0xa9))/0xc*(parseInt(_0x46993d(0xd7))/0xd);if(_0x1dbda4===_0x2eacc0)break;else _0x16adde['push'](_0x16adde['shift']());}catch(_0x2f44a8){_0x16adde['push'](_0x16adde['shift']());}}}(_0xf535,0xb42be));Object[_0x4f5d82(0xc2)](exports,Symbol['toStringTag'],{'value':_0x4f5d82(0xc9)});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=_0x4f5d82(0xa4);var I=(_0x46704d=>(_0x46704d[_0x46704d['OpenOrReOpen']=0x0]=_0x4f5d82(0xa6),_0x46704d[_0x46704d[_0x4f5d82(0xbc)]=0x1]='Solved',_0x46704d[_0x46704d[_0x4f5d82(0x8e)]=-0x1]=_0x4f5d82(0x8e),_0x46704d))(I||{}),v=(_0x419383=>(_0x419383[_0x419383[_0x4f5d82(0xab)]=0x0]=_0x4f5d82(0xab),_0x419383[_0x419383[_0x4f5d82(0xbe)]=0x1]=_0x4f5d82(0xbe),_0x419383[_0x419383[_0x4f5d82(0x82)]=0x2]=_0x4f5d82(0x82),_0x419383[_0x419383[_0x4f5d82(0x72)]=0x3]='Edit',_0x419383[_0x419383[_0x4f5d82(0xce)]=0x4]=_0x4f5d82(0xce),_0x419383[_0x419383[_0x4f5d82(0xd6)]=0x5]='Solve',_0x419383[_0x419383[_0x4f5d82(0x8e)]=-0x1]='UNRECOGNIZED',_0x419383))(v||{});const f=_0x5a4df7=>c[_0x4f5d82(0x70)](new Date(+_0x5a4df7))[_0x4f5d82(0xa7)](_0x4f5d82(0xae)),R=async(_0x4257e5,_0x282d28)=>{const _0x5a03e3=_0x4f5d82,_0x12904d=_0x4257e5[_0x5a03e3(0x87)](c[_0x5a03e3(0x74)]),_0x27903a=_0x4257e5[_0x5a03e3(0x87)](P[_0x5a03e3(0xc3)]);_0x282d28[_0x5a03e3(0xe1)](_0x292278=>{const _0x2ae769=_0x5a03e3;_0x12904d['getUser'](_0x292278)&&_0x282d28[_0x2ae769(0xdd)](_0x292278);}),_0x282d28[_0x5a03e3(0x75)]&&(await _0x27903a[_0x5a03e3(0x87)](_0x5a03e3(0x90),{'params':{'userIDs':[..._0x282d28]}}))[_0x5a03e3(0xc8)]['users'][_0x5a03e3(0xe1)](_0x2d5380=>{const _0x55e795=_0x5a03e3;_0x2d5380&&_0x12904d[_0x55e795(0xac)](_0x2d5380);});};var $=Object[_0x4f5d82(0x8b)],E=(_0x30ed37,_0x51c580,_0x2fbeca,_0x578e65)=>{for(var _0x474877=_0x578e65>0x1?void 0x0:_0x578e65?$(_0x51c580,_0x2fbeca):_0x51c580,_0x18906b=_0x30ed37['length']-0x1,_0x2958ba;_0x18906b>=0x0;_0x18906b--)(_0x2958ba=_0x30ed37[_0x18906b])&&(_0x474877=_0x2958ba(_0x474877)||_0x474877);return _0x474877;},S=(_0xadaaa7,_0x537e57)=>(_0x30c35b,_0x30c876)=>_0x537e57(_0x30c35b,_0x30c876,_0xadaaa7);let _=class extends c[_0x4f5d82(0xc7)]{constructor(_0x5c20db,_0x468a13,_0x309b53,_0x55c153){const _0x1ddf9f=_0x4f5d82;super(),this['_commentService']=_0x5c20db,this[_0x1ddf9f(0x94)]=_0x468a13,this[_0x1ddf9f(0x88)]=_0x309b53,this['_injector']=_0x55c153,this[_0x1ddf9f(0xa1)](),this[_0x1ddf9f(0xd5)]();}[_0x4f5d82(0xd5)](){const _0x1e6b9d=_0x4f5d82;this[_0x1e6b9d(0xc5)](this[_0x1e6b9d(0x94)][_0x1e6b9d(0x78)][_0x1e6b9d(0xd2)](j[_0x1e6b9d(0x93)](0x10))['subscribe'](_0x5b0c8b=>{const _0x4c5089=_0x1e6b9d,_0x30672b=new Set();_0x5b0c8b[_0x4c5089(0xe1)](_0x2d0fac=>{const _0x487e14=_0x4c5089;if(_0x2d0fac['type']===_0x487e14(0x79)){const _0x4fec1f=_0x2d0fac['payload'][_0x487e14(0x9e)];_0x30672b['add'](_0x4fec1f);}}),R(this[_0x4c5089(0xdf)],_0x30672b);}));}[_0x4f5d82(0xa1)](){const _0x4cfaab=_0x4f5d82;this['disposeWithMe'](this['_commentService'][_0x4cfaab(0x78)][_0x4cfaab(0x9a)](async _0x1dd632=>{const _0x13d0c5=_0x4cfaab;var _0x4c94d1,_0x25123f,_0x3a5e9a,_0x170465;const _0x364758=(_0x4c94d1=this[_0x13d0c5(0x94)][_0x13d0c5(0xc4)](_0x1dd632[_0x13d0c5(0xcd)])['find'](_0x2dc282=>_0x2dc282[_0x13d0c5(0xbf)]===_0x1dd632['threadId']))==null?void 0x0:_0x4c94d1[_0x13d0c5(0xa0)];if(!_0x364758)return;const {unitId:_0x3995eb,subUnitId:_0x20148d}=_0x364758;switch(_0x1dd632['user']&&this[_0x13d0c5(0x88)][_0x13d0c5(0xac)](_0x1dd632[_0x13d0c5(0xb7)]),_0x1dd632[_0x13d0c5(0x7a)]){case v[_0x13d0c5(0xbe)]:break;case v[_0x13d0c5(0x82)]:{this[_0x13d0c5(0x94)]['addComment'](_0x3995eb,_0x20148d,{'unitId':_0x3995eb,'subUnitId':_0x20148d,'ref':'','id':_0x1dd632['replyId'],'dT':f(+_0x1dd632[_0x13d0c5(0x85)]),'threadId':_0x1dd632[_0x13d0c5(0xbf)],'personId':(_0x3a5e9a=(_0x25123f=_0x1dd632[_0x13d0c5(0xb7)])==null?void 0x0:_0x25123f[_0x13d0c5(0xda)])!=null?_0x3a5e9a:_0x1dd632[_0x13d0c5(0xdc)],'text':JSON[_0x13d0c5(0x6d)](_0x1dd632[_0x13d0c5(0xd9)]),'parentId':_0x364758['id']});break;}case v[_0x13d0c5(0xce)]:{const _0x6a0636=this[_0x13d0c5(0x94)][_0x13d0c5(0xb9)](_0x3995eb,_0x20148d,_0x1dd632[_0x13d0c5(0xbd)]);_0x6a0636&&_0x6a0636[_0x13d0c5(0x71)]&&this[_0x13d0c5(0x94)][_0x13d0c5(0x6b)](_0x3995eb,_0x20148d,_0x1dd632['replyId']);break;}case v[_0x13d0c5(0x72)]:{this[_0x13d0c5(0x94)][_0x13d0c5(0x9f)](_0x3995eb,_0x20148d,{'commentId':_0x1dd632[_0x13d0c5(0xbd)],'text':JSON[_0x13d0c5(0x6d)](_0x1dd632[_0x13d0c5(0xd9)])});break;}case v['Solve']:{const _0x15e160=(_0x170465=this[_0x13d0c5(0x94)][_0x13d0c5(0xc4)](_0x1dd632[_0x13d0c5(0xcd)])['find'](_0x48bfa0=>_0x48bfa0['threadId']===_0x1dd632['threadId']))==null?void 0x0:_0x170465[_0x13d0c5(0xa0)];_0x15e160&&this[_0x13d0c5(0x94)][_0x13d0c5(0xd4)](_0x3995eb,_0x20148d,_0x15e160['id'],_0x1dd632[_0x13d0c5(0x73)]===I[_0x13d0c5(0xbc)]);break;}}}));}};_=E([S(0x0,c[_0x4f5d82(0xd8)](b['CommentService'])),S(0x1,c[_0x4f5d82(0xd8)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x4f5d82(0x74)])),S(0x3,c[_0x4f5d82(0xd8)](c[_0x4f5d82(0xcb)]))],_);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x20880d,_0x310abc,_0x55d938,_0x20e15b)=>{const _0x297285=_0x4f5d82;for(var _0x42341a=_0x20e15b>0x1?void 0x0:_0x20e15b?A(_0x310abc,_0x55d938):_0x310abc,_0x4f65a5=_0x20880d[_0x297285(0x77)]-0x1,_0x49943a;_0x4f65a5>=0x0;_0x4f65a5--)(_0x49943a=_0x20880d[_0x4f65a5])&&(_0x42341a=_0x49943a(_0x42341a)||_0x42341a);return _0x42341a;},C=(_0x57d1ef,_0x5884a6)=>(_0x13e13d,_0x4859bb)=>_0x5884a6(_0x13e13d,_0x4859bb,_0x57d1ef);function _0xf535(){const _0x5a6ebe=['bufferTime','_threadCommentModel','rangeType','CustomRangeType','getMemberID','UniverThreadCommentDataSourcePlugin','symbol','subscribe','getCurrentUser','_sessionService','UniverInstanceType','personId','updateComment','root','_init','1076975JgjLJz','357uDZMjK','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','6797685AmUmRg','OpenOrReOpen','format','_config','5352fhaDJO','customRanges','Unknown','addUser','onStarting','YYYY/MM/DD\x20HH:mm','values','map','7997886gtvgFj','_httpService','_threadCommentDataSource','merge','DependentOn','COMMENT','user','onReady','getComment','/universer-api/comment/unit/','code','Solved','replyId','Add','threadId','IThreadCommentDataSourceService','UniverLicensePlugin','defineProperty','HTTPService','getUnit','disposeWithMe','ref','Disposable','body','Module','requireSession','Injector','227208wyzrte','unitId','Delete','pluginName','comments','users','pipe','_threadCommentDataSourceService','resolveComment','_initUserSync','Solve','3809pYAOAO','Inject','content','userID','/edit','userId','delete','423730WcfhDI','_injector','66VODRQT','forEach','_initDataSource','deleteComment','filter','parse','162980lglJGd','stringify','dayjs','parentId','Edit','solved','UserManagerService','size','listComments','length','commentUpdate$','add','type','replies','_configService','6fPILeA','rangeId','error','/delete','CollaborationSessionService','Reply','resolved','slice','createTimestamp','2pojOmY','get','_userService','UniverThreadCommentUIPlugin','dataSource','getOwnPropertyDescriptor','saveCommentToSnapshot','143Xzvcvw','UNRECOGNIZED','UNIVER_UNKNOWN','/universer-api/user/list','post','/list'];_0xf535=function(){return _0x5a6ebe;};return _0xf535();}function _0xe2d6(_0x139a0c,_0x387bd4){_0x139a0c=_0x139a0c-0x6a;const _0xf535a1=_0xf535();let _0xe2d6c5=_0xf535a1[_0x139a0c];return _0xe2d6c5;}function Y(_0x3bac91,_0x2badd0){const _0x559d08=_0x4f5d82,_0x489f95=_0x3bac91[_0x559d08(0x7b)][0x0];return{..._0x2badd0,'id':_0x489f95[_0x559d08(0xbd)],'resolved':_0x3bac91[_0x559d08(0x73)]===0x1,'dT':f(_0x489f95[_0x559d08(0x85)]),'personId':_0x489f95[_0x559d08(0xdc)],'threadId':_0x489f95[_0x559d08(0xbf)]};}function G(_0x14adf5,_0x1b9034,_0x248c66){const _0x52bc6c=_0x4f5d82;var _0x1eeb7d,_0x5584b8;if(((_0x5584b8=(_0x1eeb7d=_0x14adf5==null?void 0x0:_0x14adf5[_0x52bc6c(0x7b)])==null?void 0x0:_0x1eeb7d[_0x52bc6c(0x77)])!=null?_0x5584b8:0x0)>0x0){const _0x29c9ba=(_0x594ebe,_0x1644ce)=>({'id':_0x594ebe[_0x52bc6c(0xbd)],'threadId':_0x594ebe[_0x52bc6c(0xbf)],'dT':f(_0x594ebe[_0x52bc6c(0x85)]),'personId':_0x594ebe[_0x52bc6c(0xdc)],'resolved':_0x14adf5[_0x52bc6c(0x73)]===I[_0x52bc6c(0xbc)],'unitId':_0x1b9034,'subUnitId':_0x248c66,'text':JSON[_0x52bc6c(0x6d)](_0x594ebe[_0x52bc6c(0xd9)]),'parentId':_0x1644ce}),_0x5afacd=_0x29c9ba(_0x14adf5[_0x52bc6c(0x7b)][0x0]);return{..._0x5afacd,'children':_0x14adf5[_0x52bc6c(0x7b)][_0x52bc6c(0x84)](0x1)['map'](_0x213ae9=>_0x29c9ba(_0x213ae9,_0x5afacd['id']))};}return null;}let p=class{constructor(_0x12eed7,_0x160e5d,_0x528b68){const _0x439388=_0x4f5d82;this[_0x439388(0xb2)]=_0x12eed7,this[_0x439388(0x88)]=_0x160e5d,this[_0x439388(0x9c)]=_0x528b68;}async['addComment'](_0x1eebf2){const _0x42f851=_0x4f5d82;var _0x38cce8,_0x377ddc;const {parentId:_0x31a327,unitId:_0x259262,text:_0x34336b,threadId:_0x40e57f}=_0x1eebf2,_0x556538=(_0x377ddc=(_0x38cce8=_0x34336b['customRanges'])==null?void 0x0:_0x38cce8[_0x42f851(0x6c)](_0x6b9fd4=>_0x6b9fd4['rangeType']===c[_0x42f851(0x96)][_0x42f851(0xb6)])[_0x42f851(0xb0)](_0x114b92=>_0x114b92[_0x42f851(0x7e)]))!=null?_0x377ddc:[],_0xf7e789=JSON[_0x42f851(0x6f)](_0x34336b),_0x120d12=(await this['_sessionService'][_0x42f851(0xca)](_0x259262))[_0x42f851(0x97)]();if(_0x31a327){const _0x2b1f09={'memberId':_0x120d12,'unitId':_0x259262,'content':_0xf7e789,'mention':_0x556538,'threadId':_0x40e57f},_0xdaa8d8=(await this[_0x42f851(0xb2)][_0x42f851(0x91)](_0x42f851(0xba)+_0x259262+'/reply',{'body':_0x2b1f09}))[_0x42f851(0xc8)]['reply'];return{..._0x1eebf2,'id':_0xdaa8d8[_0x42f851(0xbd)],'dT':c['dayjs'](+_0xdaa8d8[_0x42f851(0x85)])[_0x42f851(0xa7)](_0x42f851(0xae)),'personId':_0xdaa8d8['userId']};}else{const _0xd406e6={'memberId':_0x120d12,'unitId':_0x259262,'content':_0xf7e789,'mention':_0x556538},_0x4fdfca=await this['_httpService'][_0x42f851(0x91)]('/universer-api/comment/unit/'+_0x259262+'/add',{'body':_0xd406e6});return Y(_0x4fdfca[_0x42f851(0xc8)]['comment'],_0x1eebf2);}}async['updateComment'](_0x366375){const _0x242645=_0x4f5d82;var _0x4d0700,_0x2f9ddf;const {text:_0x18e31f,unitId:_0xed1719}=_0x366375,_0x353b16=(_0x2f9ddf=(_0x4d0700=_0x18e31f[_0x242645(0xaa)])==null?void 0x0:_0x4d0700['filter'](_0x1e3869=>_0x1e3869[_0x242645(0x95)]===c[_0x242645(0x96)]['COMMENT'])[_0x242645(0xb0)](_0x133419=>_0x133419[_0x242645(0x7e)]))!=null?_0x2f9ddf:[],_0x1eaa33=JSON[_0x242645(0x6f)](_0x18e31f),_0x2ccdb8=_0x366375[_0x242645(0xbf)],_0x22a956=_0x366375['id'],_0x71658a={'memberId':(await this[_0x242645(0x9c)][_0x242645(0xca)](_0xed1719))['getMemberID'](),'unitId':_0xed1719,'threadId':_0x2ccdb8,'mention':_0x353b16,'content':_0x1eaa33,'replyId':_0x22a956},_0x42b189=await this[_0x242645(0xb2)][_0x242645(0x91)](_0x242645(0xba)+_0xed1719+_0x242645(0xdb),{'body':_0x71658a});return!_0x42b189[_0x242645(0xc8)]['error']||_0x42b189[_0x242645(0xc8)][_0x242645(0x7f)][_0x242645(0xbb)]===0x1;}async[_0x4f5d82(0xd4)](_0x5f547c){const _0x5a2b89=_0x4f5d82,{unitId:_0x1053ce}=_0x5f547c,_0x26ef72=_0x5f547c[_0x5a2b89(0xbf)],_0x36ae0e={'memberId':this[_0x5a2b89(0x88)][_0x5a2b89(0x9b)]()[_0x5a2b89(0xda)],'unitId':_0x1053ce,'threadId':_0x26ef72,'solved':_0x5f547c[_0x5a2b89(0x83)]?I['Solved']:I[_0x5a2b89(0xa6)]},_0x51417f=await this[_0x5a2b89(0xb2)]['post']('/universer-api/comment/unit/'+_0x1053ce+'/solved',{'body':_0x36ae0e});return!_0x51417f[_0x5a2b89(0xc8)][_0x5a2b89(0x7f)]||_0x51417f[_0x5a2b89(0xc8)][_0x5a2b89(0x7f)][_0x5a2b89(0xbb)]===0x1;}async[_0x4f5d82(0x6b)](_0x464b6b,_0x4094b1,_0x2d560e,_0xf954d2){const _0x995937=_0x4f5d82,_0x5f42c7={'memberId':(await this[_0x995937(0x9c)][_0x995937(0xca)](_0x464b6b))['getMemberID'](),'threadId':_0x2d560e,'replyId':_0xf954d2,'unitId':_0x464b6b},_0x5e2e46=await this[_0x995937(0xb2)]['post'](_0x995937(0xba)+_0x464b6b+_0x995937(0x80),{'body':_0x5f42c7});return!_0x5e2e46[_0x995937(0xc8)]['error']||_0x5e2e46['body'][_0x995937(0x7f)]['code']===0x1;}async[_0x4f5d82(0x76)](_0x1f4017,_0x31ea29,_0x5efbd9){const _0x5795c9=_0x4f5d82,_0x32ed2f={'unitId':_0x1f4017,'threadId':_0x5efbd9},_0x23ecd4=await this[_0x5795c9(0xb2)][_0x5795c9(0x91)](_0x5795c9(0xba)+_0x1f4017+_0x5795c9(0x92),{'body':_0x32ed2f}),_0x2b2763=_0x5efbd9['map'](_0x2b475d=>G(_0x23ecd4[_0x5795c9(0xc8)][_0x5795c9(0xd0)][_0x2b475d],_0x1f4017,_0x31ea29))[_0x5795c9(0x6c)](Boolean);return Object[_0x5795c9(0xaf)](_0x23ecd4[_0x5795c9(0xc8)][_0x5795c9(0xd1)])[_0x5795c9(0xe1)](_0xa87dec=>{const _0x2ce8c8=_0x5795c9;this['_userService'][_0x2ce8c8(0xac)](_0xa87dec);}),_0x2b2763;}[_0x4f5d82(0x8c)](_0x5a57d2){const _0x3c519a=_0x4f5d82;return{'id':_0x5a57d2['id'],'threadId':_0x5a57d2[_0x3c519a(0xbf)],'ref':_0x5a57d2[_0x3c519a(0xc6)]};}};p=x([C(0x0,c['Inject'](P[_0x4f5d82(0xc3)])),C(0x1,c[_0x4f5d82(0xd8)](c[_0x4f5d82(0x74)])),C(0x2,c['Inject'](b[_0x4f5d82(0x81)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x1adfee,_0x4ab667,_0x2e8c43,_0x3bbb9b)=>{const _0x2bbfbd=_0x4f5d82;for(var _0x36a4d0=_0x3bbb9b>0x1?void 0x0:_0x3bbb9b?H(_0x4ab667,_0x2e8c43):_0x4ab667,_0x34b92a=_0x1adfee[_0x2bbfbd(0x77)]-0x1,_0x3e9723;_0x34b92a>=0x0;_0x34b92a--)(_0x3e9723=_0x1adfee[_0x34b92a])&&(_0x36a4d0=_0x3e9723(_0x36a4d0)||_0x36a4d0);return _0x36a4d0;},y=(_0x360761,_0x5728aa)=>(_0x52970b,_0x4df13b)=>_0x5728aa(_0x52970b,_0x4df13b,_0x360761);let g=class extends c[_0x4f5d82(0xc7)]{constructor(_0x9c5950,_0x13f590){const _0x23ff3a=_0x4f5d82;super(),this[_0x23ff3a(0xd3)]=_0x9c5950,this[_0x23ff3a(0xb3)]=_0x13f590,this[_0x23ff3a(0x6a)]();}[_0x4f5d82(0x6a)](){const _0x34010f=_0x4f5d82;this[_0x34010f(0xd3)][_0x34010f(0x8a)]=this[_0x34010f(0xb3)],this[_0x34010f(0xd3)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4f5d82(0xc0)]),y(0x1,c[_0x4f5d82(0xd8)](p))],g);var F=Object[_0x4f5d82(0xc2)],L=Object[_0x4f5d82(0x8b)],Z=(_0x1f1ef8,_0x490309,_0x388e38)=>_0x490309 in _0x1f1ef8?F(_0x1f1ef8,_0x490309,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x388e38}):_0x1f1ef8[_0x490309]=_0x388e38,W=(_0xcac7fb,_0x56a5dc,_0x411aa5,_0x2e0460)=>{const _0x27bb44=_0x4f5d82;for(var _0x2846ef=_0x2e0460>0x1?void 0x0:_0x2e0460?L(_0x56a5dc,_0x411aa5):_0x56a5dc,_0x142ab7=_0xcac7fb[_0x27bb44(0x77)]-0x1,_0x49d41a;_0x142ab7>=0x0;_0x142ab7--)(_0x49d41a=_0xcac7fb[_0x142ab7])&&(_0x2846ef=_0x49d41a(_0x2846ef)||_0x2846ef);return _0x2846ef;},O=(_0x5a867a,_0x1c0c5b)=>(_0xc8e5f4,_0x3b8719)=>_0x1c0c5b(_0xc8e5f4,_0x3b8719,_0x5a867a),N=(_0x4d06d0,_0x3f074f,_0x13dd63)=>Z(_0x4d06d0,typeof _0x3f074f!=_0x4f5d82(0x99)?_0x3f074f+'':_0x3f074f,_0x13dd63);exports[_0x4f5d82(0x98)]=class extends c['Plugin']{constructor(_0x341d2a=D,_0x45436f,_0x143fb8){const _0x114186=_0x4f5d82;super(),this[_0x114186(0xa8)]=_0x341d2a,this[_0x114186(0xdf)]=_0x45436f,this[_0x114186(0x7c)]=_0x143fb8;const {..._0x3e3563}=c[_0x114186(0xb4)]({},D,this[_0x114186(0xa8)]);this[_0x114186(0x7c)]['setConfig'](q,_0x3e3563);}[_0x4f5d82(0xad)](){const _0x26c372=_0x4f5d82;[[p],[g],[_]][_0x26c372(0xe1)](_0x2b8fe7=>{const _0x1b8393=_0x26c372;this[_0x1b8393(0xdf)][_0x1b8393(0x79)](_0x2b8fe7);});}[_0x4f5d82(0xb8)](){const _0x3825d8=_0x4f5d82;this[_0x3825d8(0xdf)][_0x3825d8(0x87)](g),this[_0x3825d8(0xdf)][_0x3825d8(0x87)](_);}},N(exports[_0x4f5d82(0x98)],_0x4f5d82(0xcf),U),N(exports[_0x4f5d82(0x98)],_0x4f5d82(0x7a),c[_0x4f5d82(0x9d)][_0x4f5d82(0x8f)]),exports[_0x4f5d82(0x98)]=W([c[_0x4f5d82(0xb5)](w[_0x4f5d82(0x89)],b['UniverCollaborationClientPlugin'],T[_0x4f5d82(0xc1)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x4f5d82(0x98)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x231458=_0x43f0;(function(_0x5102db,_0x2b7586){const _0x5b2b93=_0x43f0,_0x321477=_0x5102db();while(!![]){try{const _0x3c4b1c=parseInt(_0x5b2b93(0x74))/0x1*(parseInt(_0x5b2b93(0xc0))/0x2)+-parseInt(_0x5b2b93(0x75))/0x3+-parseInt(_0x5b2b93(0x98))/0x4*(parseInt(_0x5b2b93(0xcc))/0x5)+-parseInt(_0x5b2b93(0x78))/0x6+-parseInt(_0x5b2b93(0x6c))/0x7+-parseInt(_0x5b2b93(0x7a))/0x8*(parseInt(_0x5b2b93(0xc6))/0x9)+parseInt(_0x5b2b93(0xb2))/0xa;if(_0x3c4b1c===_0x2b7586)break;else _0x321477['push'](_0x321477['shift']());}catch(_0xb1d5e1){_0x321477['push'](_0x321477['shift']());}}}(_0x5e35,0x27ffd));import{CommentService as _0x20b5b6,CollaborationSessionService as _0x41a581,UniverCollaborationClientPlugin as _0x40c7ce}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3794a6}from'@univerjs-pro/license';import{dayjs as _0x1a50d1,UserManagerService as _0x1caf0d,Inject as _0x3fb278,Injector as _0x1416f8,Disposable as _0x519c68,CustomRangeType as _0x34627d,UniverInstanceType as _0x13e5ee,DependentOn as _0x326330,IConfigService as _0x25bde9,Plugin as _0x3e97cc,merge as _0x58bb88}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x47e1d5}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1b6328,IThreadCommentDataSourceService as _0x563d0d}from'@univerjs/thread-comment';import{bufferTime as _0x11cf83}from'rxjs';function _0x43f0(_0x22e547,_0x3e2ffa){_0x22e547=_0x22e547-0x64;const _0x5e3560=_0x5e35();let _0x43f0b7=_0x5e3560[_0x22e547];return _0x43f0b7;}import{HTTPService as _0x269dd4}from'@univerjs/network';const W=_0x231458(0x92);function _0x5e35(){const _0x2b0d9e=['Edit','add','14373WVenHI','getCurrentUser','length','symbol','post','_injector','5ERuIrS','_httpService','_initUserSync','/add','filter','subscribe','YYYY/MM/DD\x20HH:mm','syncUpdateMutationToColla','reply','forEach','1316322XwoJmL','delete','error','_initDataSource','commentUpdate$','Delete','comment','unitId','985pQWjHV','118935ZvVfhV','userId','/universer-api/user/list','197640heeEAB','_sessionService','1208zSADBw','threadId','values','Solve','users','find','_init','UNRECOGNIZED','thread-comment-data-source.config','getUnit','parentId','/universer-api/comment/unit/','createTimestamp','Add','disposeWithMe','body','UNIVER_UNKNOWN','addUser','_commentService','rangeId','pluginName','format','OpenOrReOpen','/edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','size','setConfig','replyId','customRanges','_threadCommentDataSource','422068wOmwwL','onStarting','getMemberID','_config','code','content','Solved','_threadCommentDataSourceService','rangeType','deleteComment','Unknown','_configService','root','parse','_userService','user','getComment','getUser','ref','Reply','dataSource','map','updateComment','_threadCommentModel','onReady','resolveComment','7307470gUJAHC','addComment','listComments','/solved','defineProperty','COMMENT','resolved','stringify','type','replies','requireSession','comments','getOwnPropertyDescriptor','payload','82xyhusV','solved','userID','get'];_0x5e35=function(){return _0x2b0d9e;};return _0x5e35();}var I=(_0x4ef7e3=>(_0x4ef7e3[_0x4ef7e3[_0x231458(0x90)]=0x0]=_0x231458(0x90),_0x4ef7e3[_0x4ef7e3[_0x231458(0x9e)]=0x1]=_0x231458(0x9e),_0x4ef7e3[_0x4ef7e3[_0x231458(0x81)]=-0x1]=_0x231458(0x81),_0x4ef7e3))(I||{}),v=(_0x4692a5=>(_0x4692a5[_0x4692a5['Unknown']=0x0]=_0x231458(0xa2),_0x4692a5[_0x4692a5[_0x231458(0x87)]=0x1]=_0x231458(0x87),_0x4692a5[_0x4692a5[_0x231458(0xab)]=0x2]=_0x231458(0xab),_0x4692a5[_0x4692a5[_0x231458(0xc4)]=0x3]=_0x231458(0xc4),_0x4692a5[_0x4692a5[_0x231458(0x71)]=0x4]=_0x231458(0x71),_0x4692a5[_0x4692a5['Solve']=0x5]=_0x231458(0x7d),_0x4692a5[_0x4692a5[_0x231458(0x81)]=-0x1]=_0x231458(0x81),_0x4692a5))(v||{});const y=_0x79c51e=>_0x1a50d1(new Date(+_0x79c51e))[_0x231458(0x8f)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3bb590,_0x1f806d)=>{const _0x4e232b=_0x231458,_0x4e6f18=_0x3bb590[_0x4e232b(0xc3)](_0x1caf0d),_0x1fcd03=_0x3bb590[_0x4e232b(0xc3)](_0x269dd4);_0x1f806d[_0x4e232b(0x6b)](_0x5550ed=>{const _0x345121=_0x4e232b;_0x4e6f18[_0x345121(0xa9)](_0x5550ed)&&_0x1f806d[_0x345121(0x6d)](_0x5550ed);}),_0x1f806d[_0x4e232b(0x93)]&&(await _0x1fcd03[_0x4e232b(0xc3)](_0x4e232b(0x77),{'params':{'userIDs':[..._0x1f806d]}}))[_0x4e232b(0x89)]['users'][_0x4e232b(0x6b)](_0x5e00e6=>{_0x5e00e6&&_0x4e6f18['addUser'](_0x5e00e6);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3c6b7e,_0x2021d1,_0x5daf91,_0x5c80f0)=>{const _0x54f4c0=_0x231458;for(var _0x106b8f=_0x5c80f0>0x1?void 0x0:_0x5c80f0?K(_0x2021d1,_0x5daf91):_0x2021d1,_0x304f60=_0x3c6b7e[_0x54f4c0(0xc8)]-0x1,_0x3d6e36;_0x304f60>=0x0;_0x304f60--)(_0x3d6e36=_0x3c6b7e[_0x304f60])&&(_0x106b8f=_0x3d6e36(_0x106b8f)||_0x106b8f);return _0x106b8f;},p=(_0xf9b229,_0x1eb5c0)=>(_0x3e81f1,_0x5f242c)=>_0x1eb5c0(_0x3e81f1,_0x5f242c,_0xf9b229);let _=class extends _0x519c68{constructor(_0x3616ae,_0x539f17,_0x2f208f,_0x468c09){const _0x49e627=_0x231458;super(),this['_commentService']=_0x3616ae,this[_0x49e627(0xaf)]=_0x539f17,this['_userService']=_0x2f208f,this[_0x49e627(0xcb)]=_0x468c09,this[_0x49e627(0x80)](),this['_initUserSync']();}[_0x231458(0x64)](){const _0x47fb5d=_0x231458;this[_0x47fb5d(0x88)](this[_0x47fb5d(0xaf)]['commentUpdate$']['pipe'](_0x11cf83(0x10))[_0x47fb5d(0x67)](_0x41f0a4=>{const _0x142e96=_0x47fb5d,_0x512799=new Set();_0x41f0a4[_0x142e96(0x6b)](_0x808872=>{const _0x17bc13=_0x142e96;if(_0x808872[_0x17bc13(0xba)]===_0x17bc13(0xc5)){const _0x299246=_0x808872[_0x17bc13(0xbf)]['personId'];_0x512799['add'](_0x299246);}}),B(this[_0x142e96(0xcb)],_0x512799);}));}['_init'](){const _0x1f6025=_0x231458;this[_0x1f6025(0x88)](this[_0x1f6025(0x8c)][_0x1f6025(0x70)][_0x1f6025(0x67)](async _0x10ff55=>{const _0x4a5eb3=_0x1f6025;var _0x3647c2,_0x3a598a,_0x5b8a40,_0x5511ab;const _0x43d6c9=(_0x3647c2=this[_0x4a5eb3(0xaf)][_0x4a5eb3(0x83)](_0x10ff55[_0x4a5eb3(0x73)])[_0x4a5eb3(0x7f)](_0x53ff03=>_0x53ff03[_0x4a5eb3(0x7b)]===_0x10ff55[_0x4a5eb3(0x7b)]))==null?void 0x0:_0x3647c2['root'];if(!_0x43d6c9)return;const {unitId:_0x399263,subUnitId:_0x40a574}=_0x43d6c9;switch(_0x10ff55[_0x4a5eb3(0xa7)]&&this[_0x4a5eb3(0xa6)][_0x4a5eb3(0x8b)](_0x10ff55[_0x4a5eb3(0xa7)]),_0x10ff55[_0x4a5eb3(0xba)]){case v[_0x4a5eb3(0x87)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x399263,_0x40a574,{'unitId':_0x399263,'subUnitId':_0x40a574,'ref':'','id':_0x10ff55['replyId'],'dT':y(+_0x10ff55[_0x4a5eb3(0x86)]),'threadId':_0x10ff55[_0x4a5eb3(0x7b)],'personId':(_0x5b8a40=(_0x3a598a=_0x10ff55[_0x4a5eb3(0xa7)])==null?void 0x0:_0x3a598a[_0x4a5eb3(0xc2)])!=null?_0x5b8a40:_0x10ff55[_0x4a5eb3(0x76)],'text':JSON['parse'](_0x10ff55[_0x4a5eb3(0x9d)]),'parentId':_0x43d6c9['id']});break;}case v['Delete']:{const _0x13e83f=this[_0x4a5eb3(0xaf)][_0x4a5eb3(0xa8)](_0x399263,_0x40a574,_0x10ff55['replyId']);_0x13e83f&&_0x13e83f[_0x4a5eb3(0x84)]&&this[_0x4a5eb3(0xaf)][_0x4a5eb3(0xa1)](_0x399263,_0x40a574,_0x10ff55[_0x4a5eb3(0x95)]);break;}case v['Edit']:{this[_0x4a5eb3(0xaf)]['updateComment'](_0x399263,_0x40a574,{'commentId':_0x10ff55[_0x4a5eb3(0x95)],'text':JSON[_0x4a5eb3(0xa5)](_0x10ff55[_0x4a5eb3(0x9d)])});break;}case v[_0x4a5eb3(0x7d)]:{const _0x30c189=(_0x5511ab=this[_0x4a5eb3(0xaf)]['getUnit'](_0x10ff55[_0x4a5eb3(0x73)])[_0x4a5eb3(0x7f)](_0x2cd669=>_0x2cd669['threadId']===_0x10ff55[_0x4a5eb3(0x7b)]))==null?void 0x0:_0x5511ab[_0x4a5eb3(0xa4)];_0x30c189&&this['_threadCommentModel']['resolveComment'](_0x399263,_0x40a574,_0x30c189['id'],_0x10ff55['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x3fb278(_0x20b5b6)),p(0x1,_0x3fb278(_0x1b6328)),p(0x2,_0x3fb278(_0x1caf0d)),p(0x3,_0x3fb278(_0x1416f8))],_);const z=_0x231458(0x82),O={};var k=Object[_0x231458(0xbe)],Q=(_0x584a99,_0x43e7eb,_0x2cebbb,_0x208e32)=>{const _0x456ba3=_0x231458;for(var _0x395a4a=_0x208e32>0x1?void 0x0:_0x208e32?k(_0x43e7eb,_0x2cebbb):_0x43e7eb,_0x4b94e3=_0x584a99[_0x456ba3(0xc8)]-0x1,_0x4ee66d;_0x4b94e3>=0x0;_0x4b94e3--)(_0x4ee66d=_0x584a99[_0x4b94e3])&&(_0x395a4a=_0x4ee66d(_0x395a4a)||_0x395a4a);return _0x395a4a;},b=(_0x42de08,_0x20225f)=>(_0x493f97,_0x2266f7)=>_0x20225f(_0x493f97,_0x2266f7,_0x42de08);function X(_0x27ade2,_0x4e6a02){const _0x373dfa=_0x231458,_0x1d0fc2=_0x27ade2[_0x373dfa(0xbb)][0x0];return{..._0x4e6a02,'id':_0x1d0fc2[_0x373dfa(0x95)],'resolved':_0x27ade2[_0x373dfa(0xc1)]===0x1,'dT':y(_0x1d0fc2[_0x373dfa(0x86)]),'personId':_0x1d0fc2[_0x373dfa(0x76)],'threadId':_0x1d0fc2['threadId']};}function ee(_0xc4f5c,_0x17465c,_0x5c5932){const _0x50bc7d=_0x231458;var _0x4317af,_0x316c56;if(((_0x316c56=(_0x4317af=_0xc4f5c==null?void 0x0:_0xc4f5c[_0x50bc7d(0xbb)])==null?void 0x0:_0x4317af[_0x50bc7d(0xc8)])!=null?_0x316c56:0x0)>0x0){const _0x1b85b0=(_0x503676,_0x102c51)=>({'id':_0x503676['replyId'],'threadId':_0x503676['threadId'],'dT':y(_0x503676[_0x50bc7d(0x86)]),'personId':_0x503676['userId'],'resolved':_0xc4f5c[_0x50bc7d(0xc1)]===I[_0x50bc7d(0x9e)],'unitId':_0x17465c,'subUnitId':_0x5c5932,'text':JSON[_0x50bc7d(0xa5)](_0x503676['content']),'parentId':_0x102c51}),_0x8f41eb=_0x1b85b0(_0xc4f5c[_0x50bc7d(0xbb)][0x0]);return{..._0x8f41eb,'children':_0xc4f5c[_0x50bc7d(0xbb)]['slice'](0x1)[_0x50bc7d(0xad)](_0x4605f7=>_0x1b85b0(_0x4605f7,_0x8f41eb['id']))};}return null;}let S=class{constructor(_0x47bedd,_0xa9358a,_0xf0de91){const _0x56c29e=_0x231458;this[_0x56c29e(0xcd)]=_0x47bedd,this[_0x56c29e(0xa6)]=_0xa9358a,this[_0x56c29e(0x79)]=_0xf0de91;}async[_0x231458(0xb3)](_0x2d48be){const _0x85b75d=_0x231458;var _0x4ce832,_0x61ac4;const {parentId:_0x336bac,unitId:_0x48fd40,text:_0x31ab99,threadId:_0x57ff7c}=_0x2d48be,_0x225db2=(_0x61ac4=(_0x4ce832=_0x31ab99[_0x85b75d(0x96)])==null?void 0x0:_0x4ce832[_0x85b75d(0x66)](_0x53528d=>_0x53528d[_0x85b75d(0xa0)]===_0x34627d[_0x85b75d(0xb7)])[_0x85b75d(0xad)](_0x2b515f=>_0x2b515f[_0x85b75d(0x8d)]))!=null?_0x61ac4:[],_0x3e1990=JSON[_0x85b75d(0xb9)](_0x31ab99),_0x4786f4=(await this['_sessionService'][_0x85b75d(0xbc)](_0x48fd40))[_0x85b75d(0x9a)]();if(_0x336bac){const _0xa7c55e={'memberId':_0x4786f4,'unitId':_0x48fd40,'content':_0x3e1990,'mention':_0x225db2,'threadId':_0x57ff7c},_0x45ffcc=(await this[_0x85b75d(0xcd)][_0x85b75d(0xca)](_0x85b75d(0x85)+_0x48fd40+'/reply',{'body':_0xa7c55e}))[_0x85b75d(0x89)][_0x85b75d(0x6a)];return{..._0x2d48be,'id':_0x45ffcc[_0x85b75d(0x95)],'dT':_0x1a50d1(+_0x45ffcc[_0x85b75d(0x86)])['format'](_0x85b75d(0x68)),'personId':_0x45ffcc[_0x85b75d(0x76)]};}else{const _0x414308={'memberId':_0x4786f4,'unitId':_0x48fd40,'content':_0x3e1990,'mention':_0x225db2},_0x33b3fc=await this[_0x85b75d(0xcd)][_0x85b75d(0xca)]('/universer-api/comment/unit/'+_0x48fd40+_0x85b75d(0x65),{'body':_0x414308});return X(_0x33b3fc[_0x85b75d(0x89)][_0x85b75d(0x72)],_0x2d48be);}}async[_0x231458(0xae)](_0x541770){const _0x3cf72a=_0x231458;var _0x28a5ee,_0x109011;const {text:_0x37bc5c,unitId:_0x2ff56e}=_0x541770,_0x4f476a=(_0x109011=(_0x28a5ee=_0x37bc5c[_0x3cf72a(0x96)])==null?void 0x0:_0x28a5ee[_0x3cf72a(0x66)](_0xc4082=>_0xc4082[_0x3cf72a(0xa0)]===_0x34627d[_0x3cf72a(0xb7)])['map'](_0x587523=>_0x587523['rangeId']))!=null?_0x109011:[],_0x1e6715=JSON[_0x3cf72a(0xb9)](_0x37bc5c),_0x2a50ed=_0x541770[_0x3cf72a(0x7b)],_0x227939=_0x541770['id'],_0x19ca49={'memberId':(await this[_0x3cf72a(0x79)][_0x3cf72a(0xbc)](_0x2ff56e))[_0x3cf72a(0x9a)](),'unitId':_0x2ff56e,'threadId':_0x2a50ed,'mention':_0x4f476a,'content':_0x1e6715,'replyId':_0x227939},_0x25c328=await this['_httpService'][_0x3cf72a(0xca)](_0x3cf72a(0x85)+_0x2ff56e+_0x3cf72a(0x91),{'body':_0x19ca49});return!_0x25c328['body'][_0x3cf72a(0x6e)]||_0x25c328[_0x3cf72a(0x89)]['error'][_0x3cf72a(0x9c)]===0x1;}async[_0x231458(0xb1)](_0x5e4769){const _0x30d8cb=_0x231458,{unitId:_0x13a05b}=_0x5e4769,_0xe85882=_0x5e4769[_0x30d8cb(0x7b)],_0x1d1a69={'memberId':this[_0x30d8cb(0xa6)][_0x30d8cb(0xc7)]()[_0x30d8cb(0xc2)],'unitId':_0x13a05b,'threadId':_0xe85882,'solved':_0x5e4769[_0x30d8cb(0xb8)]?I['Solved']:I[_0x30d8cb(0x90)]},_0x5409bb=await this[_0x30d8cb(0xcd)][_0x30d8cb(0xca)](_0x30d8cb(0x85)+_0x13a05b+_0x30d8cb(0xb5),{'body':_0x1d1a69});return!_0x5409bb['body'][_0x30d8cb(0x6e)]||_0x5409bb[_0x30d8cb(0x89)][_0x30d8cb(0x6e)][_0x30d8cb(0x9c)]===0x1;}async[_0x231458(0xa1)](_0x4953d3,_0x3f84a6,_0x31bd95,_0x115941){const _0x309135=_0x231458,_0x117c2={'memberId':(await this[_0x309135(0x79)][_0x309135(0xbc)](_0x4953d3))['getMemberID'](),'threadId':_0x31bd95,'replyId':_0x115941,'unitId':_0x4953d3},_0x422c3d=await this[_0x309135(0xcd)]['post'](_0x309135(0x85)+_0x4953d3+'/delete',{'body':_0x117c2});return!_0x422c3d[_0x309135(0x89)][_0x309135(0x6e)]||_0x422c3d['body'][_0x309135(0x6e)]['code']===0x1;}async[_0x231458(0xb4)](_0x4d4a98,_0xade5a0,_0x39c87f){const _0x4ac75=_0x231458,_0xd43ed0={'unitId':_0x4d4a98,'threadId':_0x39c87f},_0x5240bf=await this['_httpService']['post'](_0x4ac75(0x85)+_0x4d4a98+'/list',{'body':_0xd43ed0}),_0x35b5cf=_0x39c87f[_0x4ac75(0xad)](_0x373e1c=>ee(_0x5240bf[_0x4ac75(0x89)][_0x4ac75(0xbd)][_0x373e1c],_0x4d4a98,_0xade5a0))[_0x4ac75(0x66)](Boolean);return Object[_0x4ac75(0x7c)](_0x5240bf[_0x4ac75(0x89)][_0x4ac75(0x7e)])['forEach'](_0x4d7cda=>{const _0x5acd67=_0x4ac75;this[_0x5acd67(0xa6)][_0x5acd67(0x8b)](_0x4d7cda);}),_0x35b5cf;}['saveCommentToSnapshot'](_0x5a886f){const _0x37b405=_0x231458;return{'id':_0x5a886f['id'],'threadId':_0x5a886f[_0x37b405(0x7b)],'ref':_0x5a886f[_0x37b405(0xaa)]};}};S=Q([b(0x0,_0x3fb278(_0x269dd4)),b(0x1,_0x3fb278(_0x1caf0d)),b(0x2,_0x3fb278(_0x41a581))],S);var re=Object[_0x231458(0xbe)],te=(_0x57dcf0,_0x32b319,_0x576092,_0x518402)=>{const _0x50b58d=_0x231458;for(var _0x383283=_0x518402>0x1?void 0x0:_0x518402?re(_0x32b319,_0x576092):_0x32b319,_0x1d9cd9=_0x57dcf0[_0x50b58d(0xc8)]-0x1,_0x2849bc;_0x1d9cd9>=0x0;_0x1d9cd9--)(_0x2849bc=_0x57dcf0[_0x1d9cd9])&&(_0x383283=_0x2849bc(_0x383283)||_0x383283);return _0x383283;},M=(_0x4f6e49,_0x506561)=>(_0x3bc141,_0x25b58f)=>_0x506561(_0x3bc141,_0x25b58f,_0x4f6e49);let f=class extends _0x519c68{constructor(_0x3a175e,_0x25e067){const _0x20b3fd=_0x231458;super(),this[_0x20b3fd(0x9f)]=_0x3a175e,this[_0x20b3fd(0x97)]=_0x25e067,this[_0x20b3fd(0x6f)]();}[_0x231458(0x6f)](){const _0x47f909=_0x231458;this[_0x47f909(0x9f)][_0x47f909(0xac)]=this[_0x47f909(0x97)],this[_0x47f909(0x9f)][_0x47f909(0x69)]=!0x1;}};f=te([M(0x0,_0x563d0d),M(0x1,_0x3fb278(S))],f);var se=Object[_0x231458(0xb6)],oe=Object[_0x231458(0xbe)],ne=(_0x7d0e6a,_0x31e64d,_0x55a49f)=>_0x31e64d in _0x7d0e6a?se(_0x7d0e6a,_0x31e64d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x55a49f}):_0x7d0e6a[_0x31e64d]=_0x55a49f,ie=(_0x49da57,_0x121fac,_0x92989f,_0xa89334)=>{const _0x31be25=_0x231458;for(var _0x20f65b=_0xa89334>0x1?void 0x0:_0xa89334?oe(_0x121fac,_0x92989f):_0x121fac,_0x2c6408=_0x49da57[_0x31be25(0xc8)]-0x1,_0x53ec7d;_0x2c6408>=0x0;_0x2c6408--)(_0x53ec7d=_0x49da57[_0x2c6408])&&(_0x20f65b=_0x53ec7d(_0x20f65b)||_0x20f65b);return _0x20f65b;},N=(_0x27ebf2,_0x216e31)=>(_0x51c29b,_0x1cebb8)=>_0x216e31(_0x51c29b,_0x1cebb8,_0x27ebf2),$=(_0x4a1bfa,_0x3551cf,_0x44ab4f)=>ne(_0x4a1bfa,typeof _0x3551cf!=_0x231458(0xc9)?_0x3551cf+'':_0x3551cf,_0x44ab4f);let g=class extends _0x3e97cc{constructor(_0x1ba5e1=O,_0x29581f,_0x25a5ec){const _0xec65f7=_0x231458;super(),this[_0xec65f7(0x9b)]=_0x1ba5e1,this[_0xec65f7(0xcb)]=_0x29581f,this['_configService']=_0x25a5ec;const {..._0x56334c}=_0x58bb88({},O,this[_0xec65f7(0x9b)]);this[_0xec65f7(0xa3)][_0xec65f7(0x94)](z,_0x56334c);}[_0x231458(0x99)](){const _0x3a9dd8=_0x231458;[[S],[f],[_]][_0x3a9dd8(0x6b)](_0x569e31=>{const _0x284db3=_0x3a9dd8;this['_injector'][_0x284db3(0xc5)](_0x569e31);});}[_0x231458(0xb0)](){const _0x588446=_0x231458;this[_0x588446(0xcb)][_0x588446(0xc3)](f),this[_0x588446(0xcb)][_0x588446(0xc3)](_);}};$(g,_0x231458(0x8e),W),$(g,'type',_0x13e5ee[_0x231458(0x8a)]),g=ie([_0x326330(_0x47e1d5,_0x40c7ce,_0x3794a6),N(0x1,_0x3fb278(_0x1416f8)),N(0x2,_0x25bde9)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4180b1=_0x1b28;(function(_0x45c067,_0x51230a){const _0x42e990=_0x1b28,_0x246baa=_0x45c067();while(!![]){try{const _0x375104=-parseInt(_0x42e990(0x1c3))/0x1+parseInt(_0x42e990(0x1c2))/0x2+parseInt(_0x42e990(0x191))/0x3+parseInt(_0x42e990(0x1cb))/0x4+-parseInt(_0x42e990(0x1f6))/0x5*(-parseInt(_0x42e990(0x1d1))/0x6)+parseInt(_0x42e990(0x1a4))/0x7*(-parseInt(_0x42e990(0x19c))/0x8)+-parseInt(_0x42e990(0x1eb))/0x9;if(_0x375104===_0x51230a)break;else _0x246baa['push'](_0x246baa['shift']());}catch(_0x3f3f14){_0x246baa['push'](_0x246baa['shift']());}}}(_0x1166,0xa6f05));import{CommentService as _0x1bb26a,CollaborationSessionService as _0x4700fa,UniverCollaborationClientPlugin as _0x2add79}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3a6dc9}from'@univerjs-pro/license';import{dayjs as _0x30e5fe,UserManagerService as _0x51e746,Inject as _0x54c27f,Injector as _0x1bb80b,Disposable as _0x287a8e,CustomRangeType as _0x2aa294,UniverInstanceType as _0x140979,DependentOn as _0x5d589e,IConfigService as _0x4d8774,Plugin as _0x558095,merge as _0x599c45}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x31f759}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5bccec,IThreadCommentDataSourceService as _0x241c92}from'@univerjs/thread-comment';function _0x1b28(_0x586063,_0x361029){_0x586063=_0x586063-0x18e;const _0x11660c=_0x1166();let _0x1b28d9=_0x11660c[_0x586063];return _0x1b28d9;}function _0x1166(){const _0x18a0fa=['_httpService','Reply','find','threadId','commentUpdate$','syncUpdateMutationToColla','disposeWithMe','_init','getMemberID','OpenOrReOpen','8FmOohS','values','UNIVER_UNKNOWN','Solve','solved','content','replies','slice','4365298JBqJVa','dataSource','error','ref','_userService','requireSession','post','customRanges','comments','Delete','getCurrentUser','length','_injector','stringify','code','updateComment','symbol','_config','deleteComment','pipe','rangeType','/universer-api/user/list','listComments','thread-comment-data-source.config','payload','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','add','YYYY/MM/DD\x20HH:mm','userId','_threadCommentDataSourceService','605010drKAoN','239647NxdiYz','/list','_initDataSource','root','format','subscribe','/edit','personId','2724836LsGDtp','resolved','addComment','getUnit','map','_sessionService','7818AfBCEz','_commentService','Solved','_threadCommentModel','get','saveCommentToSnapshot','type','defineProperty','setConfig','getUser','unitId','COMMENT','Edit','onStarting','replyId','resolveComment','forEach','size','rangeId','/universer-api/comment/unit/','addUser','_threadCommentDataSource','/add','parentId','_initUserSync','getOwnPropertyDescriptor','6674544Ladixe','body','users','Unknown','pluginName','createTimestamp','_configService','parse','userID','UNRECOGNIZED','Add','3145LAjTUw','/solved','user','delete','filter','getComment','1456071pFSVhQ'];_0x1166=function(){return _0x18a0fa;};return _0x1166();}import{bufferTime as _0x545da4}from'rxjs';import{HTTPService as _0x163b66}from'@univerjs/network';const W=_0x4180b1(0x1bd);var I=(_0x2b5efb=>(_0x2b5efb[_0x2b5efb[_0x4180b1(0x19b)]=0x0]=_0x4180b1(0x19b),_0x2b5efb[_0x2b5efb[_0x4180b1(0x1d3)]=0x1]=_0x4180b1(0x1d3),_0x2b5efb[_0x2b5efb['UNRECOGNIZED']=-0x1]=_0x4180b1(0x1f4),_0x2b5efb))(I||{}),v=(_0x382e20=>(_0x382e20[_0x382e20[_0x4180b1(0x1ee)]=0x0]=_0x4180b1(0x1ee),_0x382e20[_0x382e20[_0x4180b1(0x1f5)]=0x1]=_0x4180b1(0x1f5),_0x382e20[_0x382e20[_0x4180b1(0x193)]=0x2]='Reply',_0x382e20[_0x382e20['Edit']=0x3]=_0x4180b1(0x1dd),_0x382e20[_0x382e20['Delete']=0x4]=_0x4180b1(0x1ad),_0x382e20[_0x382e20['Solve']=0x5]=_0x4180b1(0x19f),_0x382e20[_0x382e20[_0x4180b1(0x1f4)]=-0x1]=_0x4180b1(0x1f4),_0x382e20))(v||{});const y=_0x22a6f2=>_0x30e5fe(new Date(+_0x22a6f2))[_0x4180b1(0x1c7)](_0x4180b1(0x1bf)),B=async(_0x400022,_0x1d45c1)=>{const _0x1fbe53=_0x4180b1,_0x65dc99=_0x400022[_0x1fbe53(0x1d5)](_0x51e746),_0x28e80f=_0x400022[_0x1fbe53(0x1d5)](_0x163b66);_0x1d45c1[_0x1fbe53(0x1e1)](_0x419660=>{const _0xe41fd7=_0x1fbe53;_0x65dc99[_0xe41fd7(0x1da)](_0x419660)&&_0x1d45c1[_0xe41fd7(0x18e)](_0x419660);}),_0x1d45c1[_0x1fbe53(0x1e2)]&&(await _0x28e80f[_0x1fbe53(0x1d5)](_0x1fbe53(0x1b9),{'params':{'userIDs':[..._0x1d45c1]}}))[_0x1fbe53(0x1ec)][_0x1fbe53(0x1ed)]['forEach'](_0x10324e=>{_0x10324e&&_0x65dc99['addUser'](_0x10324e);});};var K=Object[_0x4180b1(0x1ea)],V=(_0x1ae3bc,_0x42c782,_0x21411a,_0x4ddfc5)=>{for(var _0x541b68=_0x4ddfc5>0x1?void 0x0:_0x4ddfc5?K(_0x42c782,_0x21411a):_0x42c782,_0x2f367e=_0x1ae3bc['length']-0x1,_0x3eb078;_0x2f367e>=0x0;_0x2f367e--)(_0x3eb078=_0x1ae3bc[_0x2f367e])&&(_0x541b68=_0x3eb078(_0x541b68)||_0x541b68);return _0x541b68;},p=(_0x1abbf9,_0xdb968d)=>(_0x1021e2,_0x840ee9)=>_0xdb968d(_0x1021e2,_0x840ee9,_0x1abbf9);let _=class extends _0x287a8e{constructor(_0x344e1b,_0x324a00,_0x2b4e2a,_0x1200e6){const _0x1eb32f=_0x4180b1;super(),this['_commentService']=_0x344e1b,this['_threadCommentModel']=_0x324a00,this[_0x1eb32f(0x1a8)]=_0x2b4e2a,this[_0x1eb32f(0x1b0)]=_0x1200e6,this[_0x1eb32f(0x199)](),this[_0x1eb32f(0x1e9)]();}[_0x4180b1(0x1e9)](){const _0x7d27d8=_0x4180b1;this['disposeWithMe'](this[_0x7d27d8(0x1d4)][_0x7d27d8(0x196)][_0x7d27d8(0x1b7)](_0x545da4(0x10))[_0x7d27d8(0x1c8)](_0x27832f=>{const _0xf5d0ab=_0x7d27d8,_0x5127f3=new Set();_0x27832f[_0xf5d0ab(0x1e1)](_0xfe75a2=>{const _0x346f30=_0xf5d0ab;if(_0xfe75a2['type']===_0x346f30(0x1be)){const _0x4b2e81=_0xfe75a2[_0x346f30(0x1bc)][_0x346f30(0x1ca)];_0x5127f3['add'](_0x4b2e81);}}),B(this[_0xf5d0ab(0x1b0)],_0x5127f3);}));}[_0x4180b1(0x199)](){const _0x2eecb9=_0x4180b1;this[_0x2eecb9(0x198)](this[_0x2eecb9(0x1d2)]['commentUpdate$'][_0x2eecb9(0x1c8)](async _0x3973d9=>{const _0x2f9ade=_0x2eecb9;var _0x30c52e,_0x47bfd2,_0x59621a,_0x2c5c24;const _0x2cf086=(_0x30c52e=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1ce)](_0x3973d9[_0x2f9ade(0x1db)])[_0x2f9ade(0x194)](_0x14fd6c=>_0x14fd6c[_0x2f9ade(0x195)]===_0x3973d9[_0x2f9ade(0x195)]))==null?void 0x0:_0x30c52e[_0x2f9ade(0x1c6)];if(!_0x2cf086)return;const {unitId:_0x1399a6,subUnitId:_0x26c242}=_0x2cf086;switch(_0x3973d9[_0x2f9ade(0x1f8)]&&this[_0x2f9ade(0x1a8)][_0x2f9ade(0x1e5)](_0x3973d9[_0x2f9ade(0x1f8)]),_0x3973d9[_0x2f9ade(0x1d7)]){case v[_0x2f9ade(0x1f5)]:break;case v[_0x2f9ade(0x193)]:{this[_0x2f9ade(0x1d4)]['addComment'](_0x1399a6,_0x26c242,{'unitId':_0x1399a6,'subUnitId':_0x26c242,'ref':'','id':_0x3973d9[_0x2f9ade(0x1df)],'dT':y(+_0x3973d9[_0x2f9ade(0x1f0)]),'threadId':_0x3973d9[_0x2f9ade(0x195)],'personId':(_0x59621a=(_0x47bfd2=_0x3973d9['user'])==null?void 0x0:_0x47bfd2['userID'])!=null?_0x59621a:_0x3973d9['userId'],'text':JSON[_0x2f9ade(0x1f2)](_0x3973d9['content']),'parentId':_0x2cf086['id']});break;}case v['Delete']:{const _0x1888c4=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x190)](_0x1399a6,_0x26c242,_0x3973d9[_0x2f9ade(0x1df)]);_0x1888c4&&_0x1888c4[_0x2f9ade(0x1e8)]&&this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1b6)](_0x1399a6,_0x26c242,_0x3973d9[_0x2f9ade(0x1df)]);break;}case v[_0x2f9ade(0x1dd)]:{this['_threadCommentModel'][_0x2f9ade(0x1b3)](_0x1399a6,_0x26c242,{'commentId':_0x3973d9[_0x2f9ade(0x1df)],'text':JSON[_0x2f9ade(0x1f2)](_0x3973d9['content'])});break;}case v[_0x2f9ade(0x19f)]:{const _0x566ab5=(_0x2c5c24=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1ce)](_0x3973d9[_0x2f9ade(0x1db)])[_0x2f9ade(0x194)](_0x1adc4f=>_0x1adc4f[_0x2f9ade(0x195)]===_0x3973d9['threadId']))==null?void 0x0:_0x2c5c24[_0x2f9ade(0x1c6)];_0x566ab5&&this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1e0)](_0x1399a6,_0x26c242,_0x566ab5['id'],_0x3973d9['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x54c27f(_0x1bb26a)),p(0x1,_0x54c27f(_0x5bccec)),p(0x2,_0x54c27f(_0x51e746)),p(0x3,_0x54c27f(_0x1bb80b))],_);const z=_0x4180b1(0x1bb),O={};var k=Object[_0x4180b1(0x1ea)],Q=(_0x401308,_0x2d430f,_0x548ef8,_0x48ae08)=>{const _0x51f55b=_0x4180b1;for(var _0x31d046=_0x48ae08>0x1?void 0x0:_0x48ae08?k(_0x2d430f,_0x548ef8):_0x2d430f,_0x521725=_0x401308[_0x51f55b(0x1af)]-0x1,_0x31273f;_0x521725>=0x0;_0x521725--)(_0x31273f=_0x401308[_0x521725])&&(_0x31d046=_0x31273f(_0x31d046)||_0x31d046);return _0x31d046;},b=(_0x2cbfd9,_0x440532)=>(_0x520e32,_0x259c16)=>_0x440532(_0x520e32,_0x259c16,_0x2cbfd9);function X(_0x4ff5ea,_0x4298c4){const _0x5abf8f=_0x4180b1,_0x564bcb=_0x4ff5ea[_0x5abf8f(0x1a2)][0x0];return{..._0x4298c4,'id':_0x564bcb[_0x5abf8f(0x1df)],'resolved':_0x4ff5ea[_0x5abf8f(0x1a0)]===0x1,'dT':y(_0x564bcb[_0x5abf8f(0x1f0)]),'personId':_0x564bcb[_0x5abf8f(0x1c0)],'threadId':_0x564bcb[_0x5abf8f(0x195)]};}function ee(_0x54080d,_0x4584f6,_0x13340a){const _0x4bf80d=_0x4180b1;var _0x445c99,_0x5c21d4;if(((_0x5c21d4=(_0x445c99=_0x54080d==null?void 0x0:_0x54080d[_0x4bf80d(0x1a2)])==null?void 0x0:_0x445c99[_0x4bf80d(0x1af)])!=null?_0x5c21d4:0x0)>0x0){const _0x4dc295=(_0xd8eeb5,_0x16f077)=>({'id':_0xd8eeb5['replyId'],'threadId':_0xd8eeb5[_0x4bf80d(0x195)],'dT':y(_0xd8eeb5[_0x4bf80d(0x1f0)]),'personId':_0xd8eeb5['userId'],'resolved':_0x54080d[_0x4bf80d(0x1a0)]===I[_0x4bf80d(0x1d3)],'unitId':_0x4584f6,'subUnitId':_0x13340a,'text':JSON[_0x4bf80d(0x1f2)](_0xd8eeb5[_0x4bf80d(0x1a1)]),'parentId':_0x16f077}),_0x3c9a6f=_0x4dc295(_0x54080d[_0x4bf80d(0x1a2)][0x0]);return{..._0x3c9a6f,'children':_0x54080d[_0x4bf80d(0x1a2)][_0x4bf80d(0x1a3)](0x1)[_0x4bf80d(0x1cf)](_0x4c18e7=>_0x4dc295(_0x4c18e7,_0x3c9a6f['id']))};}return null;}let S=class{constructor(_0x24b567,_0x2c79c5,_0x5bb221){const _0x3c1c12=_0x4180b1;this['_httpService']=_0x24b567,this[_0x3c1c12(0x1a8)]=_0x2c79c5,this[_0x3c1c12(0x1d0)]=_0x5bb221;}async[_0x4180b1(0x1cd)](_0x7a351f){const _0x42097a=_0x4180b1;var _0x14f825,_0x59c911;const {parentId:_0x2de79b,unitId:_0x551632,text:_0x4aba44,threadId:_0x51dbfb}=_0x7a351f,_0x431461=(_0x59c911=(_0x14f825=_0x4aba44[_0x42097a(0x1ab)])==null?void 0x0:_0x14f825[_0x42097a(0x18f)](_0x1596a5=>_0x1596a5[_0x42097a(0x1b8)]===_0x2aa294[_0x42097a(0x1dc)])[_0x42097a(0x1cf)](_0x5765e4=>_0x5765e4['rangeId']))!=null?_0x59c911:[],_0x123ef9=JSON[_0x42097a(0x1b1)](_0x4aba44),_0x2af36d=(await this[_0x42097a(0x1d0)][_0x42097a(0x1a9)](_0x551632))['getMemberID']();if(_0x2de79b){const _0x566cac={'memberId':_0x2af36d,'unitId':_0x551632,'content':_0x123ef9,'mention':_0x431461,'threadId':_0x51dbfb},_0x4710cf=(await this['_httpService'][_0x42097a(0x1aa)]('/universer-api/comment/unit/'+_0x551632+'/reply',{'body':_0x566cac}))[_0x42097a(0x1ec)]['reply'];return{..._0x7a351f,'id':_0x4710cf[_0x42097a(0x1df)],'dT':_0x30e5fe(+_0x4710cf['createTimestamp'])['format'](_0x42097a(0x1bf)),'personId':_0x4710cf[_0x42097a(0x1c0)]};}else{const _0x128dd9={'memberId':_0x2af36d,'unitId':_0x551632,'content':_0x123ef9,'mention':_0x431461},_0x55b263=await this[_0x42097a(0x192)]['post'](_0x42097a(0x1e4)+_0x551632+_0x42097a(0x1e7),{'body':_0x128dd9});return X(_0x55b263['body']['comment'],_0x7a351f);}}async[_0x4180b1(0x1b3)](_0x51b87d){const _0x189af2=_0x4180b1;var _0x20e6de,_0x226c8c;const {text:_0x3eac6b,unitId:_0x4ae742}=_0x51b87d,_0x5a7919=(_0x226c8c=(_0x20e6de=_0x3eac6b[_0x189af2(0x1ab)])==null?void 0x0:_0x20e6de[_0x189af2(0x18f)](_0x47f52d=>_0x47f52d['rangeType']===_0x2aa294[_0x189af2(0x1dc)])[_0x189af2(0x1cf)](_0x4a2ae5=>_0x4a2ae5[_0x189af2(0x1e3)]))!=null?_0x226c8c:[],_0xc200c6=JSON[_0x189af2(0x1b1)](_0x3eac6b),_0x2cfed9=_0x51b87d['threadId'],_0x4e46d6=_0x51b87d['id'],_0x65513a={'memberId':(await this[_0x189af2(0x1d0)][_0x189af2(0x1a9)](_0x4ae742))[_0x189af2(0x19a)](),'unitId':_0x4ae742,'threadId':_0x2cfed9,'mention':_0x5a7919,'content':_0xc200c6,'replyId':_0x4e46d6},_0x51d894=await this[_0x189af2(0x192)][_0x189af2(0x1aa)](_0x189af2(0x1e4)+_0x4ae742+_0x189af2(0x1c9),{'body':_0x65513a});return!_0x51d894[_0x189af2(0x1ec)]['error']||_0x51d894['body'][_0x189af2(0x1a6)][_0x189af2(0x1b2)]===0x1;}async[_0x4180b1(0x1e0)](_0x16d46d){const _0x5e02dd=_0x4180b1,{unitId:_0x3a8616}=_0x16d46d,_0x5be6dc=_0x16d46d[_0x5e02dd(0x195)],_0x5c6cad={'memberId':this['_userService'][_0x5e02dd(0x1ae)]()[_0x5e02dd(0x1f3)],'unitId':_0x3a8616,'threadId':_0x5be6dc,'solved':_0x16d46d[_0x5e02dd(0x1cc)]?I[_0x5e02dd(0x1d3)]:I[_0x5e02dd(0x19b)]},_0x35efe3=await this[_0x5e02dd(0x192)][_0x5e02dd(0x1aa)](_0x5e02dd(0x1e4)+_0x3a8616+_0x5e02dd(0x1f7),{'body':_0x5c6cad});return!_0x35efe3[_0x5e02dd(0x1ec)][_0x5e02dd(0x1a6)]||_0x35efe3[_0x5e02dd(0x1ec)][_0x5e02dd(0x1a6)][_0x5e02dd(0x1b2)]===0x1;}async[_0x4180b1(0x1b6)](_0x292e3b,_0x4fb793,_0x6fbc1,_0x121f2f){const _0x275376=_0x4180b1,_0x38970c={'memberId':(await this[_0x275376(0x1d0)]['requireSession'](_0x292e3b))[_0x275376(0x19a)](),'threadId':_0x6fbc1,'replyId':_0x121f2f,'unitId':_0x292e3b},_0x1de803=await this[_0x275376(0x192)][_0x275376(0x1aa)]('/universer-api/comment/unit/'+_0x292e3b+'/delete',{'body':_0x38970c});return!_0x1de803['body'][_0x275376(0x1a6)]||_0x1de803[_0x275376(0x1ec)][_0x275376(0x1a6)][_0x275376(0x1b2)]===0x1;}async[_0x4180b1(0x1ba)](_0x55381e,_0x1e90ed,_0xa7511){const _0x5d3fe3=_0x4180b1,_0x4cfdaa={'unitId':_0x55381e,'threadId':_0xa7511},_0x464474=await this[_0x5d3fe3(0x192)]['post']('/universer-api/comment/unit/'+_0x55381e+_0x5d3fe3(0x1c4),{'body':_0x4cfdaa}),_0x3d4464=_0xa7511[_0x5d3fe3(0x1cf)](_0x432373=>ee(_0x464474[_0x5d3fe3(0x1ec)][_0x5d3fe3(0x1ac)][_0x432373],_0x55381e,_0x1e90ed))['filter'](Boolean);return Object[_0x5d3fe3(0x19d)](_0x464474[_0x5d3fe3(0x1ec)][_0x5d3fe3(0x1ed)])[_0x5d3fe3(0x1e1)](_0xed875e=>{const _0xd9a734=_0x5d3fe3;this[_0xd9a734(0x1a8)][_0xd9a734(0x1e5)](_0xed875e);}),_0x3d4464;}[_0x4180b1(0x1d6)](_0xdc9b74){const _0x35ae6d=_0x4180b1;return{'id':_0xdc9b74['id'],'threadId':_0xdc9b74[_0x35ae6d(0x195)],'ref':_0xdc9b74[_0x35ae6d(0x1a7)]};}};S=Q([b(0x0,_0x54c27f(_0x163b66)),b(0x1,_0x54c27f(_0x51e746)),b(0x2,_0x54c27f(_0x4700fa))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x54ae4e,_0x34324a,_0x1bbce1,_0x2a5703)=>{for(var _0x2091cd=_0x2a5703>0x1?void 0x0:_0x2a5703?re(_0x34324a,_0x1bbce1):_0x34324a,_0x3ecbf2=_0x54ae4e['length']-0x1,_0x41d4e4;_0x3ecbf2>=0x0;_0x3ecbf2--)(_0x41d4e4=_0x54ae4e[_0x3ecbf2])&&(_0x2091cd=_0x41d4e4(_0x2091cd)||_0x2091cd);return _0x2091cd;},M=(_0x39762c,_0x3e5f19)=>(_0x335f35,_0x463934)=>_0x3e5f19(_0x335f35,_0x463934,_0x39762c);let f=class extends _0x287a8e{constructor(_0x59778c,_0xf8c71a){const _0x5e9f60=_0x4180b1;super(),this['_threadCommentDataSourceService']=_0x59778c,this['_threadCommentDataSource']=_0xf8c71a,this[_0x5e9f60(0x1c5)]();}[_0x4180b1(0x1c5)](){const _0x195265=_0x4180b1;this[_0x195265(0x1c1)][_0x195265(0x1a5)]=this[_0x195265(0x1e6)],this[_0x195265(0x1c1)][_0x195265(0x197)]=!0x1;}};f=te([M(0x0,_0x241c92),M(0x1,_0x54c27f(S))],f);var se=Object[_0x4180b1(0x1d8)],oe=Object[_0x4180b1(0x1ea)],ne=(_0x571635,_0x1c79d1,_0x3b87f3)=>_0x1c79d1 in _0x571635?se(_0x571635,_0x1c79d1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b87f3}):_0x571635[_0x1c79d1]=_0x3b87f3,ie=(_0xac8d0f,_0x20edc6,_0x2850e2,_0x5efb4e)=>{const _0x52f1fe=_0x4180b1;for(var _0x1f6064=_0x5efb4e>0x1?void 0x0:_0x5efb4e?oe(_0x20edc6,_0x2850e2):_0x20edc6,_0x2ae1f4=_0xac8d0f[_0x52f1fe(0x1af)]-0x1,_0x4597e2;_0x2ae1f4>=0x0;_0x2ae1f4--)(_0x4597e2=_0xac8d0f[_0x2ae1f4])&&(_0x1f6064=_0x4597e2(_0x1f6064)||_0x1f6064);return _0x1f6064;},N=(_0x53f721,_0x492d4e)=>(_0x3bb541,_0x4de18c)=>_0x492d4e(_0x3bb541,_0x4de18c,_0x53f721),$=(_0x1553f1,_0x5dafc0,_0x3f2344)=>ne(_0x1553f1,typeof _0x5dafc0!=_0x4180b1(0x1b4)?_0x5dafc0+'':_0x5dafc0,_0x3f2344);let g=class extends _0x558095{constructor(_0x4a397c=O,_0x3eae51,_0x15ae92){const _0x320c52=_0x4180b1;super(),this[_0x320c52(0x1b5)]=_0x4a397c,this['_injector']=_0x3eae51,this[_0x320c52(0x1f1)]=_0x15ae92;const {..._0x3b9956}=_0x599c45({},O,this[_0x320c52(0x1b5)]);this[_0x320c52(0x1f1)][_0x320c52(0x1d9)](z,_0x3b9956);}[_0x4180b1(0x1de)](){[[S],[f],[_]]['forEach'](_0x10f72e=>{const _0x666667=_0x1b28;this[_0x666667(0x1b0)][_0x666667(0x1be)](_0x10f72e);});}['onReady'](){const _0x4996bd=_0x4180b1;this['_injector'][_0x4996bd(0x1d5)](f),this[_0x4996bd(0x1b0)]['get'](_);}};$(g,_0x4180b1(0x1ef),W),$(g,_0x4180b1(0x1d7),_0x140979[_0x4180b1(0x19e)]),g=ie([_0x5d589e(_0x31f759,_0x2add79,_0x3a6dc9),N(0x1,_0x54c27f(_0x1bb80b)),N(0x2,_0x4d8774)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x231458=_0x43f0;(function(_0x5102db,_0x2b7586){const _0x5b2b93=_0x43f0,_0x321477=_0x5102db();while(!![]){try{const _0x3c4b1c=parseInt(_0x5b2b93(0x74))/0x1*(parseInt(_0x5b2b93(0xc0))/0x2)+-parseInt(_0x5b2b93(0x75))/0x3+-parseInt(_0x5b2b93(0x98))/0x4*(parseInt(_0x5b2b93(0xcc))/0x5)+-parseInt(_0x5b2b93(0x78))/0x6+-parseInt(_0x5b2b93(0x6c))/0x7+-parseInt(_0x5b2b93(0x7a))/0x8*(parseInt(_0x5b2b93(0xc6))/0x9)+parseInt(_0x5b2b93(0xb2))/0xa;if(_0x3c4b1c===_0x2b7586)break;else _0x321477['push'](_0x321477['shift']());}catch(_0xb1d5e1){_0x321477['push'](_0x321477['shift']());}}}(_0x5e35,0x27ffd));import{CommentService as _0x20b5b6,CollaborationSessionService as _0x41a581,UniverCollaborationClientPlugin as _0x40c7ce}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3794a6}from'@univerjs-pro/license';import{dayjs as _0x1a50d1,UserManagerService as _0x1caf0d,Inject as _0x3fb278,Injector as _0x1416f8,Disposable as _0x519c68,CustomRangeType as _0x34627d,UniverInstanceType as _0x13e5ee,DependentOn as _0x326330,IConfigService as _0x25bde9,Plugin as _0x3e97cc,merge as _0x58bb88}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x47e1d5}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1b6328,IThreadCommentDataSourceService as _0x563d0d}from'@univerjs/thread-comment';import{bufferTime as _0x11cf83}from'rxjs';function _0x43f0(_0x22e547,_0x3e2ffa){_0x22e547=_0x22e547-0x64;const _0x5e3560=_0x5e35();let _0x43f0b7=_0x5e3560[_0x22e547];return _0x43f0b7;}import{HTTPService as _0x269dd4}from'@univerjs/network';const W=_0x231458(0x92);function _0x5e35(){const _0x2b0d9e=['Edit','add','14373WVenHI','getCurrentUser','length','symbol','post','_injector','5ERuIrS','_httpService','_initUserSync','/add','filter','subscribe','YYYY/MM/DD\x20HH:mm','syncUpdateMutationToColla','reply','forEach','1316322XwoJmL','delete','error','_initDataSource','commentUpdate$','Delete','comment','unitId','985pQWjHV','118935ZvVfhV','userId','/universer-api/user/list','197640heeEAB','_sessionService','1208zSADBw','threadId','values','Solve','users','find','_init','UNRECOGNIZED','thread-comment-data-source.config','getUnit','parentId','/universer-api/comment/unit/','createTimestamp','Add','disposeWithMe','body','UNIVER_UNKNOWN','addUser','_commentService','rangeId','pluginName','format','OpenOrReOpen','/edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','size','setConfig','replyId','customRanges','_threadCommentDataSource','422068wOmwwL','onStarting','getMemberID','_config','code','content','Solved','_threadCommentDataSourceService','rangeType','deleteComment','Unknown','_configService','root','parse','_userService','user','getComment','getUser','ref','Reply','dataSource','map','updateComment','_threadCommentModel','onReady','resolveComment','7307470gUJAHC','addComment','listComments','/solved','defineProperty','COMMENT','resolved','stringify','type','replies','requireSession','comments','getOwnPropertyDescriptor','payload','82xyhusV','solved','userID','get'];_0x5e35=function(){return _0x2b0d9e;};return _0x5e35();}var I=(_0x4ef7e3=>(_0x4ef7e3[_0x4ef7e3[_0x231458(0x90)]=0x0]=_0x231458(0x90),_0x4ef7e3[_0x4ef7e3[_0x231458(0x9e)]=0x1]=_0x231458(0x9e),_0x4ef7e3[_0x4ef7e3[_0x231458(0x81)]=-0x1]=_0x231458(0x81),_0x4ef7e3))(I||{}),v=(_0x4692a5=>(_0x4692a5[_0x4692a5['Unknown']=0x0]=_0x231458(0xa2),_0x4692a5[_0x4692a5[_0x231458(0x87)]=0x1]=_0x231458(0x87),_0x4692a5[_0x4692a5[_0x231458(0xab)]=0x2]=_0x231458(0xab),_0x4692a5[_0x4692a5[_0x231458(0xc4)]=0x3]=_0x231458(0xc4),_0x4692a5[_0x4692a5[_0x231458(0x71)]=0x4]=_0x231458(0x71),_0x4692a5[_0x4692a5['Solve']=0x5]=_0x231458(0x7d),_0x4692a5[_0x4692a5[_0x231458(0x81)]=-0x1]=_0x231458(0x81),_0x4692a5))(v||{});const y=_0x79c51e=>_0x1a50d1(new Date(+_0x79c51e))[_0x231458(0x8f)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3bb590,_0x1f806d)=>{const _0x4e232b=_0x231458,_0x4e6f18=_0x3bb590[_0x4e232b(0xc3)](_0x1caf0d),_0x1fcd03=_0x3bb590[_0x4e232b(0xc3)](_0x269dd4);_0x1f806d[_0x4e232b(0x6b)](_0x5550ed=>{const _0x345121=_0x4e232b;_0x4e6f18[_0x345121(0xa9)](_0x5550ed)&&_0x1f806d[_0x345121(0x6d)](_0x5550ed);}),_0x1f806d[_0x4e232b(0x93)]&&(await _0x1fcd03[_0x4e232b(0xc3)](_0x4e232b(0x77),{'params':{'userIDs':[..._0x1f806d]}}))[_0x4e232b(0x89)]['users'][_0x4e232b(0x6b)](_0x5e00e6=>{_0x5e00e6&&_0x4e6f18['addUser'](_0x5e00e6);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3c6b7e,_0x2021d1,_0x5daf91,_0x5c80f0)=>{const _0x54f4c0=_0x231458;for(var _0x106b8f=_0x5c80f0>0x1?void 0x0:_0x5c80f0?K(_0x2021d1,_0x5daf91):_0x2021d1,_0x304f60=_0x3c6b7e[_0x54f4c0(0xc8)]-0x1,_0x3d6e36;_0x304f60>=0x0;_0x304f60--)(_0x3d6e36=_0x3c6b7e[_0x304f60])&&(_0x106b8f=_0x3d6e36(_0x106b8f)||_0x106b8f);return _0x106b8f;},p=(_0xf9b229,_0x1eb5c0)=>(_0x3e81f1,_0x5f242c)=>_0x1eb5c0(_0x3e81f1,_0x5f242c,_0xf9b229);let _=class extends _0x519c68{constructor(_0x3616ae,_0x539f17,_0x2f208f,_0x468c09){const _0x49e627=_0x231458;super(),this['_commentService']=_0x3616ae,this[_0x49e627(0xaf)]=_0x539f17,this['_userService']=_0x2f208f,this[_0x49e627(0xcb)]=_0x468c09,this[_0x49e627(0x80)](),this['_initUserSync']();}[_0x231458(0x64)](){const _0x47fb5d=_0x231458;this[_0x47fb5d(0x88)](this[_0x47fb5d(0xaf)]['commentUpdate$']['pipe'](_0x11cf83(0x10))[_0x47fb5d(0x67)](_0x41f0a4=>{const _0x142e96=_0x47fb5d,_0x512799=new Set();_0x41f0a4[_0x142e96(0x6b)](_0x808872=>{const _0x17bc13=_0x142e96;if(_0x808872[_0x17bc13(0xba)]===_0x17bc13(0xc5)){const _0x299246=_0x808872[_0x17bc13(0xbf)]['personId'];_0x512799['add'](_0x299246);}}),B(this[_0x142e96(0xcb)],_0x512799);}));}['_init'](){const _0x1f6025=_0x231458;this[_0x1f6025(0x88)](this[_0x1f6025(0x8c)][_0x1f6025(0x70)][_0x1f6025(0x67)](async _0x10ff55=>{const _0x4a5eb3=_0x1f6025;var _0x3647c2,_0x3a598a,_0x5b8a40,_0x5511ab;const _0x43d6c9=(_0x3647c2=this[_0x4a5eb3(0xaf)][_0x4a5eb3(0x83)](_0x10ff55[_0x4a5eb3(0x73)])[_0x4a5eb3(0x7f)](_0x53ff03=>_0x53ff03[_0x4a5eb3(0x7b)]===_0x10ff55[_0x4a5eb3(0x7b)]))==null?void 0x0:_0x3647c2['root'];if(!_0x43d6c9)return;const {unitId:_0x399263,subUnitId:_0x40a574}=_0x43d6c9;switch(_0x10ff55[_0x4a5eb3(0xa7)]&&this[_0x4a5eb3(0xa6)][_0x4a5eb3(0x8b)](_0x10ff55[_0x4a5eb3(0xa7)]),_0x10ff55[_0x4a5eb3(0xba)]){case v[_0x4a5eb3(0x87)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x399263,_0x40a574,{'unitId':_0x399263,'subUnitId':_0x40a574,'ref':'','id':_0x10ff55['replyId'],'dT':y(+_0x10ff55[_0x4a5eb3(0x86)]),'threadId':_0x10ff55[_0x4a5eb3(0x7b)],'personId':(_0x5b8a40=(_0x3a598a=_0x10ff55[_0x4a5eb3(0xa7)])==null?void 0x0:_0x3a598a[_0x4a5eb3(0xc2)])!=null?_0x5b8a40:_0x10ff55[_0x4a5eb3(0x76)],'text':JSON['parse'](_0x10ff55[_0x4a5eb3(0x9d)]),'parentId':_0x43d6c9['id']});break;}case v['Delete']:{const _0x13e83f=this[_0x4a5eb3(0xaf)][_0x4a5eb3(0xa8)](_0x399263,_0x40a574,_0x10ff55['replyId']);_0x13e83f&&_0x13e83f[_0x4a5eb3(0x84)]&&this[_0x4a5eb3(0xaf)][_0x4a5eb3(0xa1)](_0x399263,_0x40a574,_0x10ff55[_0x4a5eb3(0x95)]);break;}case v['Edit']:{this[_0x4a5eb3(0xaf)]['updateComment'](_0x399263,_0x40a574,{'commentId':_0x10ff55[_0x4a5eb3(0x95)],'text':JSON[_0x4a5eb3(0xa5)](_0x10ff55[_0x4a5eb3(0x9d)])});break;}case v[_0x4a5eb3(0x7d)]:{const _0x30c189=(_0x5511ab=this[_0x4a5eb3(0xaf)]['getUnit'](_0x10ff55[_0x4a5eb3(0x73)])[_0x4a5eb3(0x7f)](_0x2cd669=>_0x2cd669['threadId']===_0x10ff55[_0x4a5eb3(0x7b)]))==null?void 0x0:_0x5511ab[_0x4a5eb3(0xa4)];_0x30c189&&this['_threadCommentModel']['resolveComment'](_0x399263,_0x40a574,_0x30c189['id'],_0x10ff55['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x3fb278(_0x20b5b6)),p(0x1,_0x3fb278(_0x1b6328)),p(0x2,_0x3fb278(_0x1caf0d)),p(0x3,_0x3fb278(_0x1416f8))],_);const z=_0x231458(0x82),O={};var k=Object[_0x231458(0xbe)],Q=(_0x584a99,_0x43e7eb,_0x2cebbb,_0x208e32)=>{const _0x456ba3=_0x231458;for(var _0x395a4a=_0x208e32>0x1?void 0x0:_0x208e32?k(_0x43e7eb,_0x2cebbb):_0x43e7eb,_0x4b94e3=_0x584a99[_0x456ba3(0xc8)]-0x1,_0x4ee66d;_0x4b94e3>=0x0;_0x4b94e3--)(_0x4ee66d=_0x584a99[_0x4b94e3])&&(_0x395a4a=_0x4ee66d(_0x395a4a)||_0x395a4a);return _0x395a4a;},b=(_0x42de08,_0x20225f)=>(_0x493f97,_0x2266f7)=>_0x20225f(_0x493f97,_0x2266f7,_0x42de08);function X(_0x27ade2,_0x4e6a02){const _0x373dfa=_0x231458,_0x1d0fc2=_0x27ade2[_0x373dfa(0xbb)][0x0];return{..._0x4e6a02,'id':_0x1d0fc2[_0x373dfa(0x95)],'resolved':_0x27ade2[_0x373dfa(0xc1)]===0x1,'dT':y(_0x1d0fc2[_0x373dfa(0x86)]),'personId':_0x1d0fc2[_0x373dfa(0x76)],'threadId':_0x1d0fc2['threadId']};}function ee(_0xc4f5c,_0x17465c,_0x5c5932){const _0x50bc7d=_0x231458;var _0x4317af,_0x316c56;if(((_0x316c56=(_0x4317af=_0xc4f5c==null?void 0x0:_0xc4f5c[_0x50bc7d(0xbb)])==null?void 0x0:_0x4317af[_0x50bc7d(0xc8)])!=null?_0x316c56:0x0)>0x0){const _0x1b85b0=(_0x503676,_0x102c51)=>({'id':_0x503676['replyId'],'threadId':_0x503676['threadId'],'dT':y(_0x503676[_0x50bc7d(0x86)]),'personId':_0x503676['userId'],'resolved':_0xc4f5c[_0x50bc7d(0xc1)]===I[_0x50bc7d(0x9e)],'unitId':_0x17465c,'subUnitId':_0x5c5932,'text':JSON[_0x50bc7d(0xa5)](_0x503676['content']),'parentId':_0x102c51}),_0x8f41eb=_0x1b85b0(_0xc4f5c[_0x50bc7d(0xbb)][0x0]);return{..._0x8f41eb,'children':_0xc4f5c[_0x50bc7d(0xbb)]['slice'](0x1)[_0x50bc7d(0xad)](_0x4605f7=>_0x1b85b0(_0x4605f7,_0x8f41eb['id']))};}return null;}let S=class{constructor(_0x47bedd,_0xa9358a,_0xf0de91){const _0x56c29e=_0x231458;this[_0x56c29e(0xcd)]=_0x47bedd,this[_0x56c29e(0xa6)]=_0xa9358a,this[_0x56c29e(0x79)]=_0xf0de91;}async[_0x231458(0xb3)](_0x2d48be){const _0x85b75d=_0x231458;var _0x4ce832,_0x61ac4;const {parentId:_0x336bac,unitId:_0x48fd40,text:_0x31ab99,threadId:_0x57ff7c}=_0x2d48be,_0x225db2=(_0x61ac4=(_0x4ce832=_0x31ab99[_0x85b75d(0x96)])==null?void 0x0:_0x4ce832[_0x85b75d(0x66)](_0x53528d=>_0x53528d[_0x85b75d(0xa0)]===_0x34627d[_0x85b75d(0xb7)])[_0x85b75d(0xad)](_0x2b515f=>_0x2b515f[_0x85b75d(0x8d)]))!=null?_0x61ac4:[],_0x3e1990=JSON[_0x85b75d(0xb9)](_0x31ab99),_0x4786f4=(await this['_sessionService'][_0x85b75d(0xbc)](_0x48fd40))[_0x85b75d(0x9a)]();if(_0x336bac){const _0xa7c55e={'memberId':_0x4786f4,'unitId':_0x48fd40,'content':_0x3e1990,'mention':_0x225db2,'threadId':_0x57ff7c},_0x45ffcc=(await this[_0x85b75d(0xcd)][_0x85b75d(0xca)](_0x85b75d(0x85)+_0x48fd40+'/reply',{'body':_0xa7c55e}))[_0x85b75d(0x89)][_0x85b75d(0x6a)];return{..._0x2d48be,'id':_0x45ffcc[_0x85b75d(0x95)],'dT':_0x1a50d1(+_0x45ffcc[_0x85b75d(0x86)])['format'](_0x85b75d(0x68)),'personId':_0x45ffcc[_0x85b75d(0x76)]};}else{const _0x414308={'memberId':_0x4786f4,'unitId':_0x48fd40,'content':_0x3e1990,'mention':_0x225db2},_0x33b3fc=await this[_0x85b75d(0xcd)][_0x85b75d(0xca)]('/universer-api/comment/unit/'+_0x48fd40+_0x85b75d(0x65),{'body':_0x414308});return X(_0x33b3fc[_0x85b75d(0x89)][_0x85b75d(0x72)],_0x2d48be);}}async[_0x231458(0xae)](_0x541770){const _0x3cf72a=_0x231458;var _0x28a5ee,_0x109011;const {text:_0x37bc5c,unitId:_0x2ff56e}=_0x541770,_0x4f476a=(_0x109011=(_0x28a5ee=_0x37bc5c[_0x3cf72a(0x96)])==null?void 0x0:_0x28a5ee[_0x3cf72a(0x66)](_0xc4082=>_0xc4082[_0x3cf72a(0xa0)]===_0x34627d[_0x3cf72a(0xb7)])['map'](_0x587523=>_0x587523['rangeId']))!=null?_0x109011:[],_0x1e6715=JSON[_0x3cf72a(0xb9)](_0x37bc5c),_0x2a50ed=_0x541770[_0x3cf72a(0x7b)],_0x227939=_0x541770['id'],_0x19ca49={'memberId':(await this[_0x3cf72a(0x79)][_0x3cf72a(0xbc)](_0x2ff56e))[_0x3cf72a(0x9a)](),'unitId':_0x2ff56e,'threadId':_0x2a50ed,'mention':_0x4f476a,'content':_0x1e6715,'replyId':_0x227939},_0x25c328=await this['_httpService'][_0x3cf72a(0xca)](_0x3cf72a(0x85)+_0x2ff56e+_0x3cf72a(0x91),{'body':_0x19ca49});return!_0x25c328['body'][_0x3cf72a(0x6e)]||_0x25c328[_0x3cf72a(0x89)]['error'][_0x3cf72a(0x9c)]===0x1;}async[_0x231458(0xb1)](_0x5e4769){const _0x30d8cb=_0x231458,{unitId:_0x13a05b}=_0x5e4769,_0xe85882=_0x5e4769[_0x30d8cb(0x7b)],_0x1d1a69={'memberId':this[_0x30d8cb(0xa6)][_0x30d8cb(0xc7)]()[_0x30d8cb(0xc2)],'unitId':_0x13a05b,'threadId':_0xe85882,'solved':_0x5e4769[_0x30d8cb(0xb8)]?I['Solved']:I[_0x30d8cb(0x90)]},_0x5409bb=await this[_0x30d8cb(0xcd)][_0x30d8cb(0xca)](_0x30d8cb(0x85)+_0x13a05b+_0x30d8cb(0xb5),{'body':_0x1d1a69});return!_0x5409bb['body'][_0x30d8cb(0x6e)]||_0x5409bb[_0x30d8cb(0x89)][_0x30d8cb(0x6e)][_0x30d8cb(0x9c)]===0x1;}async[_0x231458(0xa1)](_0x4953d3,_0x3f84a6,_0x31bd95,_0x115941){const _0x309135=_0x231458,_0x117c2={'memberId':(await this[_0x309135(0x79)][_0x309135(0xbc)](_0x4953d3))['getMemberID'](),'threadId':_0x31bd95,'replyId':_0x115941,'unitId':_0x4953d3},_0x422c3d=await this[_0x309135(0xcd)]['post'](_0x309135(0x85)+_0x4953d3+'/delete',{'body':_0x117c2});return!_0x422c3d[_0x309135(0x89)][_0x309135(0x6e)]||_0x422c3d['body'][_0x309135(0x6e)]['code']===0x1;}async[_0x231458(0xb4)](_0x4d4a98,_0xade5a0,_0x39c87f){const _0x4ac75=_0x231458,_0xd43ed0={'unitId':_0x4d4a98,'threadId':_0x39c87f},_0x5240bf=await this['_httpService']['post'](_0x4ac75(0x85)+_0x4d4a98+'/list',{'body':_0xd43ed0}),_0x35b5cf=_0x39c87f[_0x4ac75(0xad)](_0x373e1c=>ee(_0x5240bf[_0x4ac75(0x89)][_0x4ac75(0xbd)][_0x373e1c],_0x4d4a98,_0xade5a0))[_0x4ac75(0x66)](Boolean);return Object[_0x4ac75(0x7c)](_0x5240bf[_0x4ac75(0x89)][_0x4ac75(0x7e)])['forEach'](_0x4d7cda=>{const _0x5acd67=_0x4ac75;this[_0x5acd67(0xa6)][_0x5acd67(0x8b)](_0x4d7cda);}),_0x35b5cf;}['saveCommentToSnapshot'](_0x5a886f){const _0x37b405=_0x231458;return{'id':_0x5a886f['id'],'threadId':_0x5a886f[_0x37b405(0x7b)],'ref':_0x5a886f[_0x37b405(0xaa)]};}};S=Q([b(0x0,_0x3fb278(_0x269dd4)),b(0x1,_0x3fb278(_0x1caf0d)),b(0x2,_0x3fb278(_0x41a581))],S);var re=Object[_0x231458(0xbe)],te=(_0x57dcf0,_0x32b319,_0x576092,_0x518402)=>{const _0x50b58d=_0x231458;for(var _0x383283=_0x518402>0x1?void 0x0:_0x518402?re(_0x32b319,_0x576092):_0x32b319,_0x1d9cd9=_0x57dcf0[_0x50b58d(0xc8)]-0x1,_0x2849bc;_0x1d9cd9>=0x0;_0x1d9cd9--)(_0x2849bc=_0x57dcf0[_0x1d9cd9])&&(_0x383283=_0x2849bc(_0x383283)||_0x383283);return _0x383283;},M=(_0x4f6e49,_0x506561)=>(_0x3bc141,_0x25b58f)=>_0x506561(_0x3bc141,_0x25b58f,_0x4f6e49);let f=class extends _0x519c68{constructor(_0x3a175e,_0x25e067){const _0x20b3fd=_0x231458;super(),this[_0x20b3fd(0x9f)]=_0x3a175e,this[_0x20b3fd(0x97)]=_0x25e067,this[_0x20b3fd(0x6f)]();}[_0x231458(0x6f)](){const _0x47f909=_0x231458;this[_0x47f909(0x9f)][_0x47f909(0xac)]=this[_0x47f909(0x97)],this[_0x47f909(0x9f)][_0x47f909(0x69)]=!0x1;}};f=te([M(0x0,_0x563d0d),M(0x1,_0x3fb278(S))],f);var se=Object[_0x231458(0xb6)],oe=Object[_0x231458(0xbe)],ne=(_0x7d0e6a,_0x31e64d,_0x55a49f)=>_0x31e64d in _0x7d0e6a?se(_0x7d0e6a,_0x31e64d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x55a49f}):_0x7d0e6a[_0x31e64d]=_0x55a49f,ie=(_0x49da57,_0x121fac,_0x92989f,_0xa89334)=>{const _0x31be25=_0x231458;for(var _0x20f65b=_0xa89334>0x1?void 0x0:_0xa89334?oe(_0x121fac,_0x92989f):_0x121fac,_0x2c6408=_0x49da57[_0x31be25(0xc8)]-0x1,_0x53ec7d;_0x2c6408>=0x0;_0x2c6408--)(_0x53ec7d=_0x49da57[_0x2c6408])&&(_0x20f65b=_0x53ec7d(_0x20f65b)||_0x20f65b);return _0x20f65b;},N=(_0x27ebf2,_0x216e31)=>(_0x51c29b,_0x1cebb8)=>_0x216e31(_0x51c29b,_0x1cebb8,_0x27ebf2),$=(_0x4a1bfa,_0x3551cf,_0x44ab4f)=>ne(_0x4a1bfa,typeof _0x3551cf!=_0x231458(0xc9)?_0x3551cf+'':_0x3551cf,_0x44ab4f);let g=class extends _0x3e97cc{constructor(_0x1ba5e1=O,_0x29581f,_0x25a5ec){const _0xec65f7=_0x231458;super(),this[_0xec65f7(0x9b)]=_0x1ba5e1,this[_0xec65f7(0xcb)]=_0x29581f,this['_configService']=_0x25a5ec;const {..._0x56334c}=_0x58bb88({},O,this[_0xec65f7(0x9b)]);this[_0xec65f7(0xa3)][_0xec65f7(0x94)](z,_0x56334c);}[_0x231458(0x99)](){const _0x3a9dd8=_0x231458;[[S],[f],[_]][_0x3a9dd8(0x6b)](_0x569e31=>{const _0x284db3=_0x3a9dd8;this['_injector'][_0x284db3(0xc5)](_0x569e31);});}[_0x231458(0xb0)](){const _0x588446=_0x231458;this[_0x588446(0xcb)][_0x588446(0xc3)](f),this[_0x588446(0xcb)][_0x588446(0xc3)](_);}};$(g,_0x231458(0x8e),W),$(g,'type',_0x13e5ee[_0x231458(0x8a)]),g=ie([_0x326330(_0x47e1d5,_0x40c7ce,_0x3794a6),N(0x1,_0x3fb278(_0x1416f8)),N(0x2,_0x25bde9)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4180b1=_0x1b28;(function(_0x45c067,_0x51230a){const _0x42e990=_0x1b28,_0x246baa=_0x45c067();while(!![]){try{const _0x375104=-parseInt(_0x42e990(0x1c3))/0x1+parseInt(_0x42e990(0x1c2))/0x2+parseInt(_0x42e990(0x191))/0x3+parseInt(_0x42e990(0x1cb))/0x4+-parseInt(_0x42e990(0x1f6))/0x5*(-parseInt(_0x42e990(0x1d1))/0x6)+parseInt(_0x42e990(0x1a4))/0x7*(-parseInt(_0x42e990(0x19c))/0x8)+-parseInt(_0x42e990(0x1eb))/0x9;if(_0x375104===_0x51230a)break;else _0x246baa['push'](_0x246baa['shift']());}catch(_0x3f3f14){_0x246baa['push'](_0x246baa['shift']());}}}(_0x1166,0xa6f05));import{CommentService as _0x1bb26a,CollaborationSessionService as _0x4700fa,UniverCollaborationClientPlugin as _0x2add79}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3a6dc9}from'@univerjs-pro/license';import{dayjs as _0x30e5fe,UserManagerService as _0x51e746,Inject as _0x54c27f,Injector as _0x1bb80b,Disposable as _0x287a8e,CustomRangeType as _0x2aa294,UniverInstanceType as _0x140979,DependentOn as _0x5d589e,IConfigService as _0x4d8774,Plugin as _0x558095,merge as _0x599c45}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x31f759}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5bccec,IThreadCommentDataSourceService as _0x241c92}from'@univerjs/thread-comment';function _0x1b28(_0x586063,_0x361029){_0x586063=_0x586063-0x18e;const _0x11660c=_0x1166();let _0x1b28d9=_0x11660c[_0x586063];return _0x1b28d9;}function _0x1166(){const _0x18a0fa=['_httpService','Reply','find','threadId','commentUpdate$','syncUpdateMutationToColla','disposeWithMe','_init','getMemberID','OpenOrReOpen','8FmOohS','values','UNIVER_UNKNOWN','Solve','solved','content','replies','slice','4365298JBqJVa','dataSource','error','ref','_userService','requireSession','post','customRanges','comments','Delete','getCurrentUser','length','_injector','stringify','code','updateComment','symbol','_config','deleteComment','pipe','rangeType','/universer-api/user/list','listComments','thread-comment-data-source.config','payload','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','add','YYYY/MM/DD\x20HH:mm','userId','_threadCommentDataSourceService','605010drKAoN','239647NxdiYz','/list','_initDataSource','root','format','subscribe','/edit','personId','2724836LsGDtp','resolved','addComment','getUnit','map','_sessionService','7818AfBCEz','_commentService','Solved','_threadCommentModel','get','saveCommentToSnapshot','type','defineProperty','setConfig','getUser','unitId','COMMENT','Edit','onStarting','replyId','resolveComment','forEach','size','rangeId','/universer-api/comment/unit/','addUser','_threadCommentDataSource','/add','parentId','_initUserSync','getOwnPropertyDescriptor','6674544Ladixe','body','users','Unknown','pluginName','createTimestamp','_configService','parse','userID','UNRECOGNIZED','Add','3145LAjTUw','/solved','user','delete','filter','getComment','1456071pFSVhQ'];_0x1166=function(){return _0x18a0fa;};return _0x1166();}import{bufferTime as _0x545da4}from'rxjs';import{HTTPService as _0x163b66}from'@univerjs/network';const W=_0x4180b1(0x1bd);var I=(_0x2b5efb=>(_0x2b5efb[_0x2b5efb[_0x4180b1(0x19b)]=0x0]=_0x4180b1(0x19b),_0x2b5efb[_0x2b5efb[_0x4180b1(0x1d3)]=0x1]=_0x4180b1(0x1d3),_0x2b5efb[_0x2b5efb['UNRECOGNIZED']=-0x1]=_0x4180b1(0x1f4),_0x2b5efb))(I||{}),v=(_0x382e20=>(_0x382e20[_0x382e20[_0x4180b1(0x1ee)]=0x0]=_0x4180b1(0x1ee),_0x382e20[_0x382e20[_0x4180b1(0x1f5)]=0x1]=_0x4180b1(0x1f5),_0x382e20[_0x382e20[_0x4180b1(0x193)]=0x2]='Reply',_0x382e20[_0x382e20['Edit']=0x3]=_0x4180b1(0x1dd),_0x382e20[_0x382e20['Delete']=0x4]=_0x4180b1(0x1ad),_0x382e20[_0x382e20['Solve']=0x5]=_0x4180b1(0x19f),_0x382e20[_0x382e20[_0x4180b1(0x1f4)]=-0x1]=_0x4180b1(0x1f4),_0x382e20))(v||{});const y=_0x22a6f2=>_0x30e5fe(new Date(+_0x22a6f2))[_0x4180b1(0x1c7)](_0x4180b1(0x1bf)),B=async(_0x400022,_0x1d45c1)=>{const _0x1fbe53=_0x4180b1,_0x65dc99=_0x400022[_0x1fbe53(0x1d5)](_0x51e746),_0x28e80f=_0x400022[_0x1fbe53(0x1d5)](_0x163b66);_0x1d45c1[_0x1fbe53(0x1e1)](_0x419660=>{const _0xe41fd7=_0x1fbe53;_0x65dc99[_0xe41fd7(0x1da)](_0x419660)&&_0x1d45c1[_0xe41fd7(0x18e)](_0x419660);}),_0x1d45c1[_0x1fbe53(0x1e2)]&&(await _0x28e80f[_0x1fbe53(0x1d5)](_0x1fbe53(0x1b9),{'params':{'userIDs':[..._0x1d45c1]}}))[_0x1fbe53(0x1ec)][_0x1fbe53(0x1ed)]['forEach'](_0x10324e=>{_0x10324e&&_0x65dc99['addUser'](_0x10324e);});};var K=Object[_0x4180b1(0x1ea)],V=(_0x1ae3bc,_0x42c782,_0x21411a,_0x4ddfc5)=>{for(var _0x541b68=_0x4ddfc5>0x1?void 0x0:_0x4ddfc5?K(_0x42c782,_0x21411a):_0x42c782,_0x2f367e=_0x1ae3bc['length']-0x1,_0x3eb078;_0x2f367e>=0x0;_0x2f367e--)(_0x3eb078=_0x1ae3bc[_0x2f367e])&&(_0x541b68=_0x3eb078(_0x541b68)||_0x541b68);return _0x541b68;},p=(_0x1abbf9,_0xdb968d)=>(_0x1021e2,_0x840ee9)=>_0xdb968d(_0x1021e2,_0x840ee9,_0x1abbf9);let _=class extends _0x287a8e{constructor(_0x344e1b,_0x324a00,_0x2b4e2a,_0x1200e6){const _0x1eb32f=_0x4180b1;super(),this['_commentService']=_0x344e1b,this['_threadCommentModel']=_0x324a00,this[_0x1eb32f(0x1a8)]=_0x2b4e2a,this[_0x1eb32f(0x1b0)]=_0x1200e6,this[_0x1eb32f(0x199)](),this[_0x1eb32f(0x1e9)]();}[_0x4180b1(0x1e9)](){const _0x7d27d8=_0x4180b1;this['disposeWithMe'](this[_0x7d27d8(0x1d4)][_0x7d27d8(0x196)][_0x7d27d8(0x1b7)](_0x545da4(0x10))[_0x7d27d8(0x1c8)](_0x27832f=>{const _0xf5d0ab=_0x7d27d8,_0x5127f3=new Set();_0x27832f[_0xf5d0ab(0x1e1)](_0xfe75a2=>{const _0x346f30=_0xf5d0ab;if(_0xfe75a2['type']===_0x346f30(0x1be)){const _0x4b2e81=_0xfe75a2[_0x346f30(0x1bc)][_0x346f30(0x1ca)];_0x5127f3['add'](_0x4b2e81);}}),B(this[_0xf5d0ab(0x1b0)],_0x5127f3);}));}[_0x4180b1(0x199)](){const _0x2eecb9=_0x4180b1;this[_0x2eecb9(0x198)](this[_0x2eecb9(0x1d2)]['commentUpdate$'][_0x2eecb9(0x1c8)](async _0x3973d9=>{const _0x2f9ade=_0x2eecb9;var _0x30c52e,_0x47bfd2,_0x59621a,_0x2c5c24;const _0x2cf086=(_0x30c52e=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1ce)](_0x3973d9[_0x2f9ade(0x1db)])[_0x2f9ade(0x194)](_0x14fd6c=>_0x14fd6c[_0x2f9ade(0x195)]===_0x3973d9[_0x2f9ade(0x195)]))==null?void 0x0:_0x30c52e[_0x2f9ade(0x1c6)];if(!_0x2cf086)return;const {unitId:_0x1399a6,subUnitId:_0x26c242}=_0x2cf086;switch(_0x3973d9[_0x2f9ade(0x1f8)]&&this[_0x2f9ade(0x1a8)][_0x2f9ade(0x1e5)](_0x3973d9[_0x2f9ade(0x1f8)]),_0x3973d9[_0x2f9ade(0x1d7)]){case v[_0x2f9ade(0x1f5)]:break;case v[_0x2f9ade(0x193)]:{this[_0x2f9ade(0x1d4)]['addComment'](_0x1399a6,_0x26c242,{'unitId':_0x1399a6,'subUnitId':_0x26c242,'ref':'','id':_0x3973d9[_0x2f9ade(0x1df)],'dT':y(+_0x3973d9[_0x2f9ade(0x1f0)]),'threadId':_0x3973d9[_0x2f9ade(0x195)],'personId':(_0x59621a=(_0x47bfd2=_0x3973d9['user'])==null?void 0x0:_0x47bfd2['userID'])!=null?_0x59621a:_0x3973d9['userId'],'text':JSON[_0x2f9ade(0x1f2)](_0x3973d9['content']),'parentId':_0x2cf086['id']});break;}case v['Delete']:{const _0x1888c4=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x190)](_0x1399a6,_0x26c242,_0x3973d9[_0x2f9ade(0x1df)]);_0x1888c4&&_0x1888c4[_0x2f9ade(0x1e8)]&&this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1b6)](_0x1399a6,_0x26c242,_0x3973d9[_0x2f9ade(0x1df)]);break;}case v[_0x2f9ade(0x1dd)]:{this['_threadCommentModel'][_0x2f9ade(0x1b3)](_0x1399a6,_0x26c242,{'commentId':_0x3973d9[_0x2f9ade(0x1df)],'text':JSON[_0x2f9ade(0x1f2)](_0x3973d9['content'])});break;}case v[_0x2f9ade(0x19f)]:{const _0x566ab5=(_0x2c5c24=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1ce)](_0x3973d9[_0x2f9ade(0x1db)])[_0x2f9ade(0x194)](_0x1adc4f=>_0x1adc4f[_0x2f9ade(0x195)]===_0x3973d9['threadId']))==null?void 0x0:_0x2c5c24[_0x2f9ade(0x1c6)];_0x566ab5&&this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1e0)](_0x1399a6,_0x26c242,_0x566ab5['id'],_0x3973d9['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x54c27f(_0x1bb26a)),p(0x1,_0x54c27f(_0x5bccec)),p(0x2,_0x54c27f(_0x51e746)),p(0x3,_0x54c27f(_0x1bb80b))],_);const z=_0x4180b1(0x1bb),O={};var k=Object[_0x4180b1(0x1ea)],Q=(_0x401308,_0x2d430f,_0x548ef8,_0x48ae08)=>{const _0x51f55b=_0x4180b1;for(var _0x31d046=_0x48ae08>0x1?void 0x0:_0x48ae08?k(_0x2d430f,_0x548ef8):_0x2d430f,_0x521725=_0x401308[_0x51f55b(0x1af)]-0x1,_0x31273f;_0x521725>=0x0;_0x521725--)(_0x31273f=_0x401308[_0x521725])&&(_0x31d046=_0x31273f(_0x31d046)||_0x31d046);return _0x31d046;},b=(_0x2cbfd9,_0x440532)=>(_0x520e32,_0x259c16)=>_0x440532(_0x520e32,_0x259c16,_0x2cbfd9);function X(_0x4ff5ea,_0x4298c4){const _0x5abf8f=_0x4180b1,_0x564bcb=_0x4ff5ea[_0x5abf8f(0x1a2)][0x0];return{..._0x4298c4,'id':_0x564bcb[_0x5abf8f(0x1df)],'resolved':_0x4ff5ea[_0x5abf8f(0x1a0)]===0x1,'dT':y(_0x564bcb[_0x5abf8f(0x1f0)]),'personId':_0x564bcb[_0x5abf8f(0x1c0)],'threadId':_0x564bcb[_0x5abf8f(0x195)]};}function ee(_0x54080d,_0x4584f6,_0x13340a){const _0x4bf80d=_0x4180b1;var _0x445c99,_0x5c21d4;if(((_0x5c21d4=(_0x445c99=_0x54080d==null?void 0x0:_0x54080d[_0x4bf80d(0x1a2)])==null?void 0x0:_0x445c99[_0x4bf80d(0x1af)])!=null?_0x5c21d4:0x0)>0x0){const _0x4dc295=(_0xd8eeb5,_0x16f077)=>({'id':_0xd8eeb5['replyId'],'threadId':_0xd8eeb5[_0x4bf80d(0x195)],'dT':y(_0xd8eeb5[_0x4bf80d(0x1f0)]),'personId':_0xd8eeb5['userId'],'resolved':_0x54080d[_0x4bf80d(0x1a0)]===I[_0x4bf80d(0x1d3)],'unitId':_0x4584f6,'subUnitId':_0x13340a,'text':JSON[_0x4bf80d(0x1f2)](_0xd8eeb5[_0x4bf80d(0x1a1)]),'parentId':_0x16f077}),_0x3c9a6f=_0x4dc295(_0x54080d[_0x4bf80d(0x1a2)][0x0]);return{..._0x3c9a6f,'children':_0x54080d[_0x4bf80d(0x1a2)][_0x4bf80d(0x1a3)](0x1)[_0x4bf80d(0x1cf)](_0x4c18e7=>_0x4dc295(_0x4c18e7,_0x3c9a6f['id']))};}return null;}let S=class{constructor(_0x24b567,_0x2c79c5,_0x5bb221){const _0x3c1c12=_0x4180b1;this['_httpService']=_0x24b567,this[_0x3c1c12(0x1a8)]=_0x2c79c5,this[_0x3c1c12(0x1d0)]=_0x5bb221;}async[_0x4180b1(0x1cd)](_0x7a351f){const _0x42097a=_0x4180b1;var _0x14f825,_0x59c911;const {parentId:_0x2de79b,unitId:_0x551632,text:_0x4aba44,threadId:_0x51dbfb}=_0x7a351f,_0x431461=(_0x59c911=(_0x14f825=_0x4aba44[_0x42097a(0x1ab)])==null?void 0x0:_0x14f825[_0x42097a(0x18f)](_0x1596a5=>_0x1596a5[_0x42097a(0x1b8)]===_0x2aa294[_0x42097a(0x1dc)])[_0x42097a(0x1cf)](_0x5765e4=>_0x5765e4['rangeId']))!=null?_0x59c911:[],_0x123ef9=JSON[_0x42097a(0x1b1)](_0x4aba44),_0x2af36d=(await this[_0x42097a(0x1d0)][_0x42097a(0x1a9)](_0x551632))['getMemberID']();if(_0x2de79b){const _0x566cac={'memberId':_0x2af36d,'unitId':_0x551632,'content':_0x123ef9,'mention':_0x431461,'threadId':_0x51dbfb},_0x4710cf=(await this['_httpService'][_0x42097a(0x1aa)]('/universer-api/comment/unit/'+_0x551632+'/reply',{'body':_0x566cac}))[_0x42097a(0x1ec)]['reply'];return{..._0x7a351f,'id':_0x4710cf[_0x42097a(0x1df)],'dT':_0x30e5fe(+_0x4710cf['createTimestamp'])['format'](_0x42097a(0x1bf)),'personId':_0x4710cf[_0x42097a(0x1c0)]};}else{const _0x128dd9={'memberId':_0x2af36d,'unitId':_0x551632,'content':_0x123ef9,'mention':_0x431461},_0x55b263=await this[_0x42097a(0x192)]['post'](_0x42097a(0x1e4)+_0x551632+_0x42097a(0x1e7),{'body':_0x128dd9});return X(_0x55b263['body']['comment'],_0x7a351f);}}async[_0x4180b1(0x1b3)](_0x51b87d){const _0x189af2=_0x4180b1;var _0x20e6de,_0x226c8c;const {text:_0x3eac6b,unitId:_0x4ae742}=_0x51b87d,_0x5a7919=(_0x226c8c=(_0x20e6de=_0x3eac6b[_0x189af2(0x1ab)])==null?void 0x0:_0x20e6de[_0x189af2(0x18f)](_0x47f52d=>_0x47f52d['rangeType']===_0x2aa294[_0x189af2(0x1dc)])[_0x189af2(0x1cf)](_0x4a2ae5=>_0x4a2ae5[_0x189af2(0x1e3)]))!=null?_0x226c8c:[],_0xc200c6=JSON[_0x189af2(0x1b1)](_0x3eac6b),_0x2cfed9=_0x51b87d['threadId'],_0x4e46d6=_0x51b87d['id'],_0x65513a={'memberId':(await this[_0x189af2(0x1d0)][_0x189af2(0x1a9)](_0x4ae742))[_0x189af2(0x19a)](),'unitId':_0x4ae742,'threadId':_0x2cfed9,'mention':_0x5a7919,'content':_0xc200c6,'replyId':_0x4e46d6},_0x51d894=await this[_0x189af2(0x192)][_0x189af2(0x1aa)](_0x189af2(0x1e4)+_0x4ae742+_0x189af2(0x1c9),{'body':_0x65513a});return!_0x51d894[_0x189af2(0x1ec)]['error']||_0x51d894['body'][_0x189af2(0x1a6)][_0x189af2(0x1b2)]===0x1;}async[_0x4180b1(0x1e0)](_0x16d46d){const _0x5e02dd=_0x4180b1,{unitId:_0x3a8616}=_0x16d46d,_0x5be6dc=_0x16d46d[_0x5e02dd(0x195)],_0x5c6cad={'memberId':this['_userService'][_0x5e02dd(0x1ae)]()[_0x5e02dd(0x1f3)],'unitId':_0x3a8616,'threadId':_0x5be6dc,'solved':_0x16d46d[_0x5e02dd(0x1cc)]?I[_0x5e02dd(0x1d3)]:I[_0x5e02dd(0x19b)]},_0x35efe3=await this[_0x5e02dd(0x192)][_0x5e02dd(0x1aa)](_0x5e02dd(0x1e4)+_0x3a8616+_0x5e02dd(0x1f7),{'body':_0x5c6cad});return!_0x35efe3[_0x5e02dd(0x1ec)][_0x5e02dd(0x1a6)]||_0x35efe3[_0x5e02dd(0x1ec)][_0x5e02dd(0x1a6)][_0x5e02dd(0x1b2)]===0x1;}async[_0x4180b1(0x1b6)](_0x292e3b,_0x4fb793,_0x6fbc1,_0x121f2f){const _0x275376=_0x4180b1,_0x38970c={'memberId':(await this[_0x275376(0x1d0)]['requireSession'](_0x292e3b))[_0x275376(0x19a)](),'threadId':_0x6fbc1,'replyId':_0x121f2f,'unitId':_0x292e3b},_0x1de803=await this[_0x275376(0x192)][_0x275376(0x1aa)]('/universer-api/comment/unit/'+_0x292e3b+'/delete',{'body':_0x38970c});return!_0x1de803['body'][_0x275376(0x1a6)]||_0x1de803[_0x275376(0x1ec)][_0x275376(0x1a6)][_0x275376(0x1b2)]===0x1;}async[_0x4180b1(0x1ba)](_0x55381e,_0x1e90ed,_0xa7511){const _0x5d3fe3=_0x4180b1,_0x4cfdaa={'unitId':_0x55381e,'threadId':_0xa7511},_0x464474=await this[_0x5d3fe3(0x192)]['post']('/universer-api/comment/unit/'+_0x55381e+_0x5d3fe3(0x1c4),{'body':_0x4cfdaa}),_0x3d4464=_0xa7511[_0x5d3fe3(0x1cf)](_0x432373=>ee(_0x464474[_0x5d3fe3(0x1ec)][_0x5d3fe3(0x1ac)][_0x432373],_0x55381e,_0x1e90ed))['filter'](Boolean);return Object[_0x5d3fe3(0x19d)](_0x464474[_0x5d3fe3(0x1ec)][_0x5d3fe3(0x1ed)])[_0x5d3fe3(0x1e1)](_0xed875e=>{const _0xd9a734=_0x5d3fe3;this[_0xd9a734(0x1a8)][_0xd9a734(0x1e5)](_0xed875e);}),_0x3d4464;}[_0x4180b1(0x1d6)](_0xdc9b74){const _0x35ae6d=_0x4180b1;return{'id':_0xdc9b74['id'],'threadId':_0xdc9b74[_0x35ae6d(0x195)],'ref':_0xdc9b74[_0x35ae6d(0x1a7)]};}};S=Q([b(0x0,_0x54c27f(_0x163b66)),b(0x1,_0x54c27f(_0x51e746)),b(0x2,_0x54c27f(_0x4700fa))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x54ae4e,_0x34324a,_0x1bbce1,_0x2a5703)=>{for(var _0x2091cd=_0x2a5703>0x1?void 0x0:_0x2a5703?re(_0x34324a,_0x1bbce1):_0x34324a,_0x3ecbf2=_0x54ae4e['length']-0x1,_0x41d4e4;_0x3ecbf2>=0x0;_0x3ecbf2--)(_0x41d4e4=_0x54ae4e[_0x3ecbf2])&&(_0x2091cd=_0x41d4e4(_0x2091cd)||_0x2091cd);return _0x2091cd;},M=(_0x39762c,_0x3e5f19)=>(_0x335f35,_0x463934)=>_0x3e5f19(_0x335f35,_0x463934,_0x39762c);let f=class extends _0x287a8e{constructor(_0x59778c,_0xf8c71a){const _0x5e9f60=_0x4180b1;super(),this['_threadCommentDataSourceService']=_0x59778c,this['_threadCommentDataSource']=_0xf8c71a,this[_0x5e9f60(0x1c5)]();}[_0x4180b1(0x1c5)](){const _0x195265=_0x4180b1;this[_0x195265(0x1c1)][_0x195265(0x1a5)]=this[_0x195265(0x1e6)],this[_0x195265(0x1c1)][_0x195265(0x197)]=!0x1;}};f=te([M(0x0,_0x241c92),M(0x1,_0x54c27f(S))],f);var se=Object[_0x4180b1(0x1d8)],oe=Object[_0x4180b1(0x1ea)],ne=(_0x571635,_0x1c79d1,_0x3b87f3)=>_0x1c79d1 in _0x571635?se(_0x571635,_0x1c79d1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b87f3}):_0x571635[_0x1c79d1]=_0x3b87f3,ie=(_0xac8d0f,_0x20edc6,_0x2850e2,_0x5efb4e)=>{const _0x52f1fe=_0x4180b1;for(var _0x1f6064=_0x5efb4e>0x1?void 0x0:_0x5efb4e?oe(_0x20edc6,_0x2850e2):_0x20edc6,_0x2ae1f4=_0xac8d0f[_0x52f1fe(0x1af)]-0x1,_0x4597e2;_0x2ae1f4>=0x0;_0x2ae1f4--)(_0x4597e2=_0xac8d0f[_0x2ae1f4])&&(_0x1f6064=_0x4597e2(_0x1f6064)||_0x1f6064);return _0x1f6064;},N=(_0x53f721,_0x492d4e)=>(_0x3bb541,_0x4de18c)=>_0x492d4e(_0x3bb541,_0x4de18c,_0x53f721),$=(_0x1553f1,_0x5dafc0,_0x3f2344)=>ne(_0x1553f1,typeof _0x5dafc0!=_0x4180b1(0x1b4)?_0x5dafc0+'':_0x5dafc0,_0x3f2344);let g=class extends _0x558095{constructor(_0x4a397c=O,_0x3eae51,_0x15ae92){const _0x320c52=_0x4180b1;super(),this[_0x320c52(0x1b5)]=_0x4a397c,this['_injector']=_0x3eae51,this[_0x320c52(0x1f1)]=_0x15ae92;const {..._0x3b9956}=_0x599c45({},O,this[_0x320c52(0x1b5)]);this[_0x320c52(0x1f1)][_0x320c52(0x1d9)](z,_0x3b9956);}[_0x4180b1(0x1de)](){[[S],[f],[_]]['forEach'](_0x10f72e=>{const _0x666667=_0x1b28;this[_0x666667(0x1b0)][_0x666667(0x1be)](_0x10f72e);});}['onReady'](){const _0x4996bd=_0x4180b1;this['_injector'][_0x4996bd(0x1d5)](f),this[_0x4996bd(0x1b0)]['get'](_);}};$(g,_0x4180b1(0x1ef),W),$(g,_0x4180b1(0x1d7),_0x140979[_0x4180b1(0x19e)]),g=ie([_0x5d589e(_0x31f759,_0x2add79,_0x3a6dc9),N(0x1,_0x54c27f(_0x1bb80b)),N(0x2,_0x4d8774)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1d47(){const _0x526205=['user','UniverThreadCommentDataSourcePlugin','defineProperty','1941597jjRLip','addComment','parse','Solved','forEach','onReady','content','UniverCollaborationClientPlugin','10UjQcSX','function','updateComment','type','_configService','replies','code','/universer-api/comment/unit/','pipe','createTimestamp','/add','/universer-api/user/list','Module','761718vsZgzY','format','_initUserSync','add','find','/list','HTTPService','merge','solved','_threadCommentModel','CommentService','rangeType','getOwnPropertyDescriptor','subscribe','UserManagerService','getComment','getMemberID','thread-comment-data-source.config','length','exports','_userService','296359yVblPy','UniverInstanceType','@univerjs-pro/license','saveCommentToSnapshot','pluginName','threadId','_injector','disposeWithMe','Disposable','payload','/solved','UniverThreadComment','resolveComment','UniverThreadCommentUIPlugin','customRanges','error','_config','reply','filter','comments','addUser','amd','_commentService','symbol','onStarting','@univerjs/thread-comment-ui','userID','personId','38960piiiQW','112AzaMgv','userId','unitId','Add','stringify','Reply','40700YiiGql','getCurrentUser','240GaaaMv','comment','DependentOn','_httpService','UNRECOGNIZED','UniverProThreadCommentDatasource','@univerjs-pro/collaboration-client','UniverProLicense','map','/delete','CollaborationSessionService','UniverCore','Injector','delete','YYYY/MM/DD\x20HH:mm','root','getUnit','Inject','@univerjs/network','_threadCommentDataSource','Solve','2581928CqmJtH','Edit','rangeId','146556sQRBZL','ref','rxjs','get','commentUpdate$','syncUpdateMutationToColla','bufferTime','dayjs','_threadCommentDataSourceService','replyId','_sessionService','1628OlTBXP','COMMENT','post','UniverThreadCommentUi','users','_initDataSource','UniverProCollaborationClient','Delete','UniverNetwork','CustomRangeType','deleteComment','listComments','@univerjs/thread-comment','resolved','object','OpenOrReOpen','parentId','/reply','body','requireSession','3usuhFu'];_0x1d47=function(){return _0x526205;};return _0x1d47();}function _0x4087(_0x31160d,_0x547d67){_0x31160d=_0x31160d-0x135;const _0x1d47b8=_0x1d47();let _0x4087f0=_0x1d47b8[_0x31160d];return _0x4087f0;}(function(_0x49302e,_0x467924){const _0x576ef5=_0x4087,_0x10abdd=_0x49302e();while(!![]){try{const _0x39ddd9=-parseInt(_0x576ef5(0x156))/0x1+-parseInt(_0x576ef5(0x18e))/0x2+parseInt(_0x576ef5(0x13d))/0x3*(-parseInt(_0x576ef5(0x1a5))/0x4)+-parseInt(_0x576ef5(0x187))/0x5*(parseInt(_0x576ef5(0x190))/0x6)+parseInt(_0x576ef5(0x16b))/0x7*(parseInt(_0x576ef5(0x188))/0x8)+parseInt(_0x576ef5(0x141))/0x9*(-parseInt(_0x576ef5(0x149))/0xa)+-parseInt(_0x576ef5(0x1b3))/0xb*(-parseInt(_0x576ef5(0x1a8))/0xc);if(_0x39ddd9===_0x467924)break;else _0x10abdd['push'](_0x10abdd['shift']());}catch(_0x38425b){_0x10abdd['push'](_0x10abdd['shift']());}}}(_0x1d47,0x6cb5f),function(_0x5ed46b,_0x4af973){const _0x19f574=_0x4087;typeof exports==_0x19f574(0x137)&&typeof module<'u'?_0x4af973(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==_0x19f574(0x14a)&&define[_0x19f574(0x180)]?define([_0x19f574(0x169),_0x19f574(0x196),_0x19f574(0x16d),'@univerjs/core',_0x19f574(0x184),_0x19f574(0x135),_0x19f574(0x1aa),_0x19f574(0x1a2)],_0x4af973):(_0x5ed46b=typeof globalThis<'u'?globalThis:_0x5ed46b||self,_0x4af973(_0x5ed46b[_0x19f574(0x195)]={},_0x5ed46b[_0x19f574(0x1b9)],_0x5ed46b[_0x19f574(0x197)],_0x5ed46b[_0x19f574(0x19b)],_0x5ed46b[_0x19f574(0x1b6)],_0x5ed46b[_0x19f574(0x176)],_0x5ed46b['rxjs'],_0x5ed46b[_0x19f574(0x1bb)]));}(this,function(_0x49d9d0,_0x3f551b,_0x440cb5,_0x4fe06f,_0x54f791,_0x1e3f01,_0x3ca38b,_0x5d6bde){'use strict';const _0x6736aa=_0x4087;const _0x56c31e='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x59ce22=(_0x3882d3=>(_0x3882d3[_0x3882d3['OpenOrReOpen']=0x0]=_0x6736aa(0x138),_0x3882d3[_0x3882d3['Solved']=0x1]=_0x6736aa(0x144),_0x3882d3[_0x3882d3[_0x6736aa(0x194)]=-0x1]=_0x6736aa(0x194),_0x3882d3))(_0x59ce22||{}),_0x1c27e3=(_0x296fe4=>(_0x296fe4[_0x296fe4['Unknown']=0x0]='Unknown',_0x296fe4[_0x296fe4[_0x6736aa(0x18b)]=0x1]=_0x6736aa(0x18b),_0x296fe4[_0x296fe4[_0x6736aa(0x18d)]=0x2]=_0x6736aa(0x18d),_0x296fe4[_0x296fe4[_0x6736aa(0x1a6)]=0x3]=_0x6736aa(0x1a6),_0x296fe4[_0x296fe4[_0x6736aa(0x1ba)]=0x4]=_0x6736aa(0x1ba),_0x296fe4[_0x296fe4['Solve']=0x5]=_0x6736aa(0x1a4),_0x296fe4[_0x296fe4[_0x6736aa(0x194)]=-0x1]=_0x6736aa(0x194),_0x296fe4))(_0x1c27e3||{});const _0x38a025=_0x212e95=>_0x4fe06f[_0x6736aa(0x1af)](new Date(+_0x212e95))[_0x6736aa(0x157)](_0x6736aa(0x19e)),_0x4b7d46=async(_0x3776d9,_0x5651b4)=>{const _0x1d02fc=_0x6736aa,_0xf64a32=_0x3776d9['get'](_0x4fe06f['UserManagerService']),_0x57cf63=_0x3776d9[_0x1d02fc(0x1ab)](_0x5d6bde[_0x1d02fc(0x15c)]);_0x5651b4[_0x1d02fc(0x145)](_0x5c34fe=>{const _0x484313=_0x1d02fc;_0xf64a32['getUser'](_0x5c34fe)&&_0x5651b4[_0x484313(0x19d)](_0x5c34fe);}),_0x5651b4['size']&&(await _0x57cf63[_0x1d02fc(0x1ab)](_0x1d02fc(0x154),{'params':{'userIDs':[..._0x5651b4]}}))['body'][_0x1d02fc(0x1b7)]['forEach'](_0x3de21c=>{const _0x1c7213=_0x1d02fc;_0x3de21c&&_0xf64a32[_0x1c7213(0x17f)](_0x3de21c);});};var _0x130ee3=Object[_0x6736aa(0x162)],_0x519187=(_0x1025b4,_0x338459,_0x17de55,_0x2b7874)=>{const _0xeadce8=_0x6736aa;for(var _0x2b7efa=_0x2b7874>0x1?void 0x0:_0x2b7874?_0x130ee3(_0x338459,_0x17de55):_0x338459,_0x12a4c0=_0x1025b4[_0xeadce8(0x168)]-0x1,_0x787621;_0x12a4c0>=0x0;_0x12a4c0--)(_0x787621=_0x1025b4[_0x12a4c0])&&(_0x2b7efa=_0x787621(_0x2b7efa)||_0x2b7efa);return _0x2b7efa;},_0x5d16ca=(_0x2aaace,_0xe6ae6c)=>(_0x244d3b,_0x1fd9fd)=>_0xe6ae6c(_0x244d3b,_0x1fd9fd,_0x2aaace);let _0x4be7f0=class extends _0x4fe06f[_0x6736aa(0x173)]{constructor(_0x23f436,_0x574643,_0xe221a3,_0x2d7070){const _0xcb0d8c=_0x6736aa;super(),this[_0xcb0d8c(0x181)]=_0x23f436,this['_threadCommentModel']=_0x574643,this[_0xcb0d8c(0x16a)]=_0xe221a3,this[_0xcb0d8c(0x171)]=_0x2d7070,this['_init'](),this[_0xcb0d8c(0x158)]();}['_initUserSync'](){const _0x2e610d=_0x6736aa;this[_0x2e610d(0x172)](this[_0x2e610d(0x15f)][_0x2e610d(0x1ac)][_0x2e610d(0x151)](_0x3ca38b[_0x2e610d(0x1ae)](0x10))[_0x2e610d(0x163)](_0x3e36b2=>{const _0x5e9012=_0x2e610d,_0x4f7834=new Set();_0x3e36b2[_0x5e9012(0x145)](_0x1c0676=>{const _0x33abde=_0x5e9012;if(_0x1c0676[_0x33abde(0x14c)]==='add'){const _0x1aaa6f=_0x1c0676[_0x33abde(0x174)][_0x33abde(0x186)];_0x4f7834[_0x33abde(0x159)](_0x1aaa6f);}}),_0x4b7d46(this[_0x5e9012(0x171)],_0x4f7834);}));}['_init'](){const _0x49d218=_0x6736aa;this[_0x49d218(0x172)](this[_0x49d218(0x181)][_0x49d218(0x1ac)]['subscribe'](async _0x144f8a=>{const _0x3e2eaa=_0x49d218;var _0x5da06e,_0x32eabc,_0x1df3e1,_0x2c8c21;const _0x2213f1=(_0x5da06e=this['_threadCommentModel'][_0x3e2eaa(0x1a0)](_0x144f8a[_0x3e2eaa(0x18a)])[_0x3e2eaa(0x15a)](_0x49137b=>_0x49137b[_0x3e2eaa(0x170)]===_0x144f8a[_0x3e2eaa(0x170)]))==null?void 0x0:_0x5da06e[_0x3e2eaa(0x19f)];if(!_0x2213f1)return;const {unitId:_0x1e94d4,subUnitId:_0xd0deb5}=_0x2213f1;switch(_0x144f8a[_0x3e2eaa(0x13e)]&&this[_0x3e2eaa(0x16a)][_0x3e2eaa(0x17f)](_0x144f8a[_0x3e2eaa(0x13e)]),_0x144f8a['type']){case _0x1c27e3['Add']:break;case _0x1c27e3['Reply']:{this[_0x3e2eaa(0x15f)][_0x3e2eaa(0x142)](_0x1e94d4,_0xd0deb5,{'unitId':_0x1e94d4,'subUnitId':_0xd0deb5,'ref':'','id':_0x144f8a['replyId'],'dT':_0x38a025(+_0x144f8a[_0x3e2eaa(0x152)]),'threadId':_0x144f8a[_0x3e2eaa(0x170)],'personId':(_0x1df3e1=(_0x32eabc=_0x144f8a[_0x3e2eaa(0x13e)])==null?void 0x0:_0x32eabc[_0x3e2eaa(0x185)])!=null?_0x1df3e1:_0x144f8a[_0x3e2eaa(0x189)],'text':JSON[_0x3e2eaa(0x143)](_0x144f8a[_0x3e2eaa(0x147)]),'parentId':_0x2213f1['id']});break;}case _0x1c27e3[_0x3e2eaa(0x1ba)]:{const _0x159895=this[_0x3e2eaa(0x15f)][_0x3e2eaa(0x165)](_0x1e94d4,_0xd0deb5,_0x144f8a[_0x3e2eaa(0x1b1)]);_0x159895&&_0x159895[_0x3e2eaa(0x139)]&&this['_threadCommentModel'][_0x3e2eaa(0x1bd)](_0x1e94d4,_0xd0deb5,_0x144f8a['replyId']);break;}case _0x1c27e3[_0x3e2eaa(0x1a6)]:{this[_0x3e2eaa(0x15f)][_0x3e2eaa(0x14b)](_0x1e94d4,_0xd0deb5,{'commentId':_0x144f8a[_0x3e2eaa(0x1b1)],'text':JSON[_0x3e2eaa(0x143)](_0x144f8a[_0x3e2eaa(0x147)])});break;}case _0x1c27e3[_0x3e2eaa(0x1a4)]:{const _0x2f6214=(_0x2c8c21=this[_0x3e2eaa(0x15f)][_0x3e2eaa(0x1a0)](_0x144f8a[_0x3e2eaa(0x18a)])[_0x3e2eaa(0x15a)](_0x58afec=>_0x58afec[_0x3e2eaa(0x170)]===_0x144f8a[_0x3e2eaa(0x170)]))==null?void 0x0:_0x2c8c21[_0x3e2eaa(0x19f)];_0x2f6214&&this[_0x3e2eaa(0x15f)][_0x3e2eaa(0x177)](_0x1e94d4,_0xd0deb5,_0x2f6214['id'],_0x144f8a[_0x3e2eaa(0x15e)]===_0x59ce22[_0x3e2eaa(0x144)]);break;}}}));}};_0x4be7f0=_0x519187([_0x5d16ca(0x0,_0x4fe06f['Inject'](_0x3f551b[_0x6736aa(0x160)])),_0x5d16ca(0x1,_0x4fe06f['Inject'](_0x1e3f01['ThreadCommentModel'])),_0x5d16ca(0x2,_0x4fe06f[_0x6736aa(0x1a1)](_0x4fe06f[_0x6736aa(0x164)])),_0x5d16ca(0x3,_0x4fe06f[_0x6736aa(0x1a1)](_0x4fe06f['Injector']))],_0x4be7f0);const _0x54c8e2=_0x6736aa(0x167),_0x438838={};var _0x5ed805=Object[_0x6736aa(0x162)],_0x51a55c=(_0x43ef4e,_0x290fa8,_0x134939,_0x4d6c29)=>{const _0x41ed2f=_0x6736aa;for(var _0xbf9309=_0x4d6c29>0x1?void 0x0:_0x4d6c29?_0x5ed805(_0x290fa8,_0x134939):_0x290fa8,_0x27d9dd=_0x43ef4e[_0x41ed2f(0x168)]-0x1,_0x20840e;_0x27d9dd>=0x0;_0x27d9dd--)(_0x20840e=_0x43ef4e[_0x27d9dd])&&(_0xbf9309=_0x20840e(_0xbf9309)||_0xbf9309);return _0xbf9309;},_0x4b82ef=(_0x335a4e,_0x3ed867)=>(_0x10bfb6,_0x11ceea)=>_0x3ed867(_0x10bfb6,_0x11ceea,_0x335a4e);function _0x2d0a7e(_0x376d71,_0x5cf0c3){const _0x1a1042=_0x6736aa,_0x391af1=_0x376d71[_0x1a1042(0x14e)][0x0];return{..._0x5cf0c3,'id':_0x391af1[_0x1a1042(0x1b1)],'resolved':_0x376d71[_0x1a1042(0x15e)]===0x1,'dT':_0x38a025(_0x391af1['createTimestamp']),'personId':_0x391af1[_0x1a1042(0x189)],'threadId':_0x391af1[_0x1a1042(0x170)]};}function _0x921182(_0x3f5f75,_0x49bd1e,_0x1bd971){const _0x601726=_0x6736aa;var _0x616c3b,_0x42b94e;if(((_0x42b94e=(_0x616c3b=_0x3f5f75==null?void 0x0:_0x3f5f75[_0x601726(0x14e)])==null?void 0x0:_0x616c3b['length'])!=null?_0x42b94e:0x0)>0x0){const _0x177f9c=(_0x74ea34,_0x1ac6e2)=>({'id':_0x74ea34['replyId'],'threadId':_0x74ea34['threadId'],'dT':_0x38a025(_0x74ea34['createTimestamp']),'personId':_0x74ea34[_0x601726(0x189)],'resolved':_0x3f5f75[_0x601726(0x15e)]===_0x59ce22['Solved'],'unitId':_0x49bd1e,'subUnitId':_0x1bd971,'text':JSON[_0x601726(0x143)](_0x74ea34['content']),'parentId':_0x1ac6e2}),_0xf1409e=_0x177f9c(_0x3f5f75[_0x601726(0x14e)][0x0]);return{..._0xf1409e,'children':_0x3f5f75[_0x601726(0x14e)]['slice'](0x1)[_0x601726(0x198)](_0x29bcd2=>_0x177f9c(_0x29bcd2,_0xf1409e['id']))};}return null;}let _0x2baa26=class{constructor(_0x5d2f19,_0x30fc30,_0x5f17ed){const _0x70d3a9=_0x6736aa;this['_httpService']=_0x5d2f19,this[_0x70d3a9(0x16a)]=_0x30fc30,this[_0x70d3a9(0x1b2)]=_0x5f17ed;}async['addComment'](_0x235877){const _0x600b12=_0x6736aa;var _0x4f6199,_0x2c3793;const {parentId:_0x1d6197,unitId:_0x4c90b4,text:_0x2a8f3e,threadId:_0x4f0392}=_0x235877,_0x38142e=(_0x2c3793=(_0x4f6199=_0x2a8f3e[_0x600b12(0x179)])==null?void 0x0:_0x4f6199[_0x600b12(0x17d)](_0x4c8bbc=>_0x4c8bbc[_0x600b12(0x161)]===_0x4fe06f['CustomRangeType']['COMMENT'])[_0x600b12(0x198)](_0x1e0a10=>_0x1e0a10[_0x600b12(0x1a7)]))!=null?_0x2c3793:[],_0x2cfb7a=JSON[_0x600b12(0x18c)](_0x2a8f3e),_0x47f7e7=(await this[_0x600b12(0x1b2)][_0x600b12(0x13c)](_0x4c90b4))[_0x600b12(0x166)]();if(_0x1d6197){const _0x1ea1a4={'memberId':_0x47f7e7,'unitId':_0x4c90b4,'content':_0x2cfb7a,'mention':_0x38142e,'threadId':_0x4f0392},_0x4514ca=(await this[_0x600b12(0x193)]['post'](_0x600b12(0x150)+_0x4c90b4+_0x600b12(0x13a),{'body':_0x1ea1a4}))['body'][_0x600b12(0x17c)];return{..._0x235877,'id':_0x4514ca[_0x600b12(0x1b1)],'dT':_0x4fe06f['dayjs'](+_0x4514ca[_0x600b12(0x152)])[_0x600b12(0x157)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4514ca['userId']};}else{const _0x44a0c4={'memberId':_0x47f7e7,'unitId':_0x4c90b4,'content':_0x2cfb7a,'mention':_0x38142e},_0x37cc02=await this[_0x600b12(0x193)][_0x600b12(0x1b5)](_0x600b12(0x150)+_0x4c90b4+_0x600b12(0x153),{'body':_0x44a0c4});return _0x2d0a7e(_0x37cc02[_0x600b12(0x13b)][_0x600b12(0x191)],_0x235877);}}async[_0x6736aa(0x14b)](_0x2a4959){const _0x17b6e0=_0x6736aa;var _0x2d4469,_0x5da2b4;const {text:_0xafad1a,unitId:_0x5cacc1}=_0x2a4959,_0x424ed1=(_0x5da2b4=(_0x2d4469=_0xafad1a[_0x17b6e0(0x179)])==null?void 0x0:_0x2d4469[_0x17b6e0(0x17d)](_0x147077=>_0x147077[_0x17b6e0(0x161)]===_0x4fe06f[_0x17b6e0(0x1bc)][_0x17b6e0(0x1b4)])[_0x17b6e0(0x198)](_0x3fb01d=>_0x3fb01d[_0x17b6e0(0x1a7)]))!=null?_0x5da2b4:[],_0x604f0=JSON[_0x17b6e0(0x18c)](_0xafad1a),_0x59ab49=_0x2a4959[_0x17b6e0(0x170)],_0x2c85d0=_0x2a4959['id'],_0x3011f2={'memberId':(await this[_0x17b6e0(0x1b2)]['requireSession'](_0x5cacc1))['getMemberID'](),'unitId':_0x5cacc1,'threadId':_0x59ab49,'mention':_0x424ed1,'content':_0x604f0,'replyId':_0x2c85d0},_0x356420=await this[_0x17b6e0(0x193)][_0x17b6e0(0x1b5)](_0x17b6e0(0x150)+_0x5cacc1+'/edit',{'body':_0x3011f2});return!_0x356420[_0x17b6e0(0x13b)][_0x17b6e0(0x17a)]||_0x356420[_0x17b6e0(0x13b)][_0x17b6e0(0x17a)][_0x17b6e0(0x14f)]===0x1;}async[_0x6736aa(0x177)](_0x440ffd){const _0x2831fb=_0x6736aa,{unitId:_0x5ddfb8}=_0x440ffd,_0x3a7e4c=_0x440ffd[_0x2831fb(0x170)],_0x222c5f={'memberId':this[_0x2831fb(0x16a)][_0x2831fb(0x18f)]()[_0x2831fb(0x185)],'unitId':_0x5ddfb8,'threadId':_0x3a7e4c,'solved':_0x440ffd[_0x2831fb(0x136)]?_0x59ce22[_0x2831fb(0x144)]:_0x59ce22[_0x2831fb(0x138)]},_0x2ad333=await this[_0x2831fb(0x193)][_0x2831fb(0x1b5)]('/universer-api/comment/unit/'+_0x5ddfb8+_0x2831fb(0x175),{'body':_0x222c5f});return!_0x2ad333[_0x2831fb(0x13b)]['error']||_0x2ad333[_0x2831fb(0x13b)][_0x2831fb(0x17a)][_0x2831fb(0x14f)]===0x1;}async[_0x6736aa(0x1bd)](_0x1b741e,_0x328642,_0x2785ae,_0x49c029){const _0x130167=_0x6736aa,_0x5b7d19={'memberId':(await this[_0x130167(0x1b2)]['requireSession'](_0x1b741e))['getMemberID'](),'threadId':_0x2785ae,'replyId':_0x49c029,'unitId':_0x1b741e},_0x228d28=await this[_0x130167(0x193)][_0x130167(0x1b5)](_0x130167(0x150)+_0x1b741e+_0x130167(0x199),{'body':_0x5b7d19});return!_0x228d28['body'][_0x130167(0x17a)]||_0x228d28[_0x130167(0x13b)][_0x130167(0x17a)]['code']===0x1;}async[_0x6736aa(0x1be)](_0x36e5d5,_0x48a751,_0x580ce0){const _0x180ccf=_0x6736aa,_0x53d613={'unitId':_0x36e5d5,'threadId':_0x580ce0},_0x187a4e=await this[_0x180ccf(0x193)][_0x180ccf(0x1b5)](_0x180ccf(0x150)+_0x36e5d5+_0x180ccf(0x15b),{'body':_0x53d613}),_0x57da0b=_0x580ce0[_0x180ccf(0x198)](_0x26c47e=>_0x921182(_0x187a4e[_0x180ccf(0x13b)][_0x180ccf(0x17e)][_0x26c47e],_0x36e5d5,_0x48a751))['filter'](Boolean);return Object['values'](_0x187a4e['body']['users'])[_0x180ccf(0x145)](_0x40a675=>{const _0x3c569e=_0x180ccf;this[_0x3c569e(0x16a)]['addUser'](_0x40a675);}),_0x57da0b;}[_0x6736aa(0x16e)](_0x47ae28){const _0x3f69c9=_0x6736aa;return{'id':_0x47ae28['id'],'threadId':_0x47ae28[_0x3f69c9(0x170)],'ref':_0x47ae28[_0x3f69c9(0x1a9)]};}};_0x2baa26=_0x51a55c([_0x4b82ef(0x0,_0x4fe06f[_0x6736aa(0x1a1)](_0x5d6bde[_0x6736aa(0x15c)])),_0x4b82ef(0x1,_0x4fe06f[_0x6736aa(0x1a1)](_0x4fe06f[_0x6736aa(0x164)])),_0x4b82ef(0x2,_0x4fe06f[_0x6736aa(0x1a1)](_0x3f551b[_0x6736aa(0x19a)]))],_0x2baa26);var _0x3e5146=Object[_0x6736aa(0x162)],_0x52cab3=(_0x217c01,_0xbd1b83,_0x1afa07,_0x5777bc)=>{for(var _0x560292=_0x5777bc>0x1?void 0x0:_0x5777bc?_0x3e5146(_0xbd1b83,_0x1afa07):_0xbd1b83,_0x4b1f5a=_0x217c01['length']-0x1,_0x11eb3e;_0x4b1f5a>=0x0;_0x4b1f5a--)(_0x11eb3e=_0x217c01[_0x4b1f5a])&&(_0x560292=_0x11eb3e(_0x560292)||_0x560292);return _0x560292;},_0x181612=(_0x653374,_0x8d9cc2)=>(_0x147275,_0x28d89a)=>_0x8d9cc2(_0x147275,_0x28d89a,_0x653374);let _0x5bfd8c=class extends _0x4fe06f[_0x6736aa(0x173)]{constructor(_0x2360e2,_0xe9c32e){const _0x401dbc=_0x6736aa;super(),this[_0x401dbc(0x1b0)]=_0x2360e2,this[_0x401dbc(0x1a3)]=_0xe9c32e,this[_0x401dbc(0x1b8)]();}[_0x6736aa(0x1b8)](){const _0x31cbe4=_0x6736aa;this[_0x31cbe4(0x1b0)]['dataSource']=this['_threadCommentDataSource'],this[_0x31cbe4(0x1b0)][_0x31cbe4(0x1ad)]=!0x1;}};_0x5bfd8c=_0x52cab3([_0x181612(0x0,_0x1e3f01['IThreadCommentDataSourceService']),_0x181612(0x1,_0x4fe06f[_0x6736aa(0x1a1)](_0x2baa26))],_0x5bfd8c);var _0x4aee73=Object[_0x6736aa(0x140)],_0x105302=Object[_0x6736aa(0x162)],_0x58450d=(_0x504751,_0x340921,_0x1f0908)=>_0x340921 in _0x504751?_0x4aee73(_0x504751,_0x340921,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1f0908}):_0x504751[_0x340921]=_0x1f0908,_0x5c856b=(_0x1032eb,_0x15fbf5,_0xa9f7af,_0x4a66bb)=>{for(var _0x28babe=_0x4a66bb>0x1?void 0x0:_0x4a66bb?_0x105302(_0x15fbf5,_0xa9f7af):_0x15fbf5,_0x34725e=_0x1032eb['length']-0x1,_0x50c1eb;_0x34725e>=0x0;_0x34725e--)(_0x50c1eb=_0x1032eb[_0x34725e])&&(_0x28babe=_0x50c1eb(_0x28babe)||_0x28babe);return _0x28babe;},_0x319192=(_0x5c20fe,_0x37d768)=>(_0x1797ae,_0x338610)=>_0x37d768(_0x1797ae,_0x338610,_0x5c20fe),_0x5946f7=(_0x1d2f33,_0x3bd1c8,_0x55886b)=>_0x58450d(_0x1d2f33,typeof _0x3bd1c8!=_0x6736aa(0x182)?_0x3bd1c8+'':_0x3bd1c8,_0x55886b);_0x49d9d0[_0x6736aa(0x13f)]=class extends _0x4fe06f['Plugin']{constructor(_0x566bcb=_0x438838,_0x7c444,_0x420d60){const _0x3ac20e=_0x6736aa;super(),this[_0x3ac20e(0x17b)]=_0x566bcb,this[_0x3ac20e(0x171)]=_0x7c444,this[_0x3ac20e(0x14d)]=_0x420d60;const {..._0x68044a}=_0x4fe06f[_0x3ac20e(0x15d)]({},_0x438838,this[_0x3ac20e(0x17b)]);this['_configService']['setConfig'](_0x54c8e2,_0x68044a);}[_0x6736aa(0x183)](){[[_0x2baa26],[_0x5bfd8c],[_0x4be7f0]]['forEach'](_0x1acba8=>{const _0x2ffcc7=_0x4087;this[_0x2ffcc7(0x171)][_0x2ffcc7(0x159)](_0x1acba8);});}[_0x6736aa(0x146)](){this['_injector']['get'](_0x5bfd8c),this['_injector']['get'](_0x4be7f0);}},_0x5946f7(_0x49d9d0[_0x6736aa(0x13f)],_0x6736aa(0x16f),_0x56c31e),_0x5946f7(_0x49d9d0[_0x6736aa(0x13f)],'type',_0x4fe06f[_0x6736aa(0x16c)]['UNIVER_UNKNOWN']),_0x49d9d0[_0x6736aa(0x13f)]=_0x5c856b([_0x4fe06f[_0x6736aa(0x192)](_0x54f791[_0x6736aa(0x178)],_0x3f551b[_0x6736aa(0x148)],_0x440cb5['UniverLicensePlugin']),_0x319192(0x1,_0x4fe06f['Inject'](_0x4fe06f[_0x6736aa(0x19c)])),_0x319192(0x2,_0x4fe06f['IConfigService'])],_0x49d9d0[_0x6736aa(0x13f)]),Object['defineProperty'](_0x49d9d0,Symbol['toStringTag'],{'value':_0x6736aa(0x155)});}));
1
+ function _0x45d5(_0x3630a8,_0x2d7338){_0x3630a8=_0x3630a8-0x1c2;const _0x5ce55d=_0x5ce5();let _0x45d544=_0x5ce55d[_0x3630a8];return _0x45d544;}(function(_0x14ec76,_0x5922ec){const _0x412d04=_0x45d5,_0x39b1c6=_0x14ec76();while(!![]){try{const _0x18ccbe=-parseInt(_0x412d04(0x1c8))/0x1+parseInt(_0x412d04(0x1d7))/0x2+-parseInt(_0x412d04(0x1e5))/0x3*(parseInt(_0x412d04(0x23d))/0x4)+-parseInt(_0x412d04(0x1ef))/0x5*(-parseInt(_0x412d04(0x1e7))/0x6)+parseInt(_0x412d04(0x22c))/0x7+parseInt(_0x412d04(0x24a))/0x8*(parseInt(_0x412d04(0x1dd))/0x9)+-parseInt(_0x412d04(0x22b))/0xa*(parseInt(_0x412d04(0x235))/0xb);if(_0x18ccbe===_0x5922ec)break;else _0x39b1c6['push'](_0x39b1c6['shift']());}catch(_0x4bb29c){_0x39b1c6['push'](_0x39b1c6['shift']());}}}(_0x5ce5,0x87a8f),function(_0x37caab,_0x99bb35){const _0x240389=_0x45d5;typeof exports==_0x240389(0x1e9)&&typeof module<'u'?_0x99bb35(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=='function'&&define['amd']?define([_0x240389(0x21d),_0x240389(0x209),_0x240389(0x1f7),_0x240389(0x202),_0x240389(0x1c6),_0x240389(0x210),'rxjs','@univerjs/network'],_0x99bb35):(_0x37caab=typeof globalThis<'u'?globalThis:_0x37caab||self,_0x99bb35(_0x37caab[_0x240389(0x1d2)]={},_0x37caab[_0x240389(0x1ec)],_0x37caab['UniverProLicense'],_0x37caab[_0x240389(0x243)],_0x37caab[_0x240389(0x228)],_0x37caab[_0x240389(0x203)],_0x37caab[_0x240389(0x1df)],_0x37caab['UniverNetwork']));}(this,function(_0x347b73,_0x4ebd7c,_0x240775,_0x3e06ff,_0x2663f5,_0x33dd0d,_0x1813bc,_0x1af0b5){'use strict';const _0x4a5f86=_0x45d5;const _0x36598d=_0x4a5f86(0x247);var _0x137c8d=(_0x23488f=>(_0x23488f[_0x23488f['OpenOrReOpen']=0x0]=_0x4a5f86(0x1d9),_0x23488f[_0x23488f[_0x4a5f86(0x1d8)]=0x1]=_0x4a5f86(0x1d8),_0x23488f[_0x23488f[_0x4a5f86(0x1d6)]=-0x1]=_0x4a5f86(0x1d6),_0x23488f))(_0x137c8d||{}),_0x3b65af=(_0x21e30c=>(_0x21e30c[_0x21e30c[_0x4a5f86(0x214)]=0x0]='Unknown',_0x21e30c[_0x21e30c['Add']=0x1]=_0x4a5f86(0x21e),_0x21e30c[_0x21e30c[_0x4a5f86(0x1f8)]=0x2]=_0x4a5f86(0x1f8),_0x21e30c[_0x21e30c['Edit']=0x3]='Edit',_0x21e30c[_0x21e30c['Delete']=0x4]='Delete',_0x21e30c[_0x21e30c[_0x4a5f86(0x220)]=0x5]='Solve',_0x21e30c[_0x21e30c['UNRECOGNIZED']=-0x1]=_0x4a5f86(0x1d6),_0x21e30c))(_0x3b65af||{});const _0x28e987=_0x2034d3=>_0x3e06ff[_0x4a5f86(0x1fd)](new Date(+_0x2034d3))[_0x4a5f86(0x244)](_0x4a5f86(0x227)),_0xdf3fa5=async(_0x119280,_0x584eb6)=>{const _0x394dc7=_0x4a5f86,_0x1a1b1d=_0x119280['get'](_0x3e06ff[_0x394dc7(0x23b)]),_0x188394=_0x119280['get'](_0x1af0b5['HTTPService']);_0x584eb6[_0x394dc7(0x23c)](_0x3b9dd6=>{const _0x273f20=_0x394dc7;_0x1a1b1d[_0x273f20(0x1c4)](_0x3b9dd6)&&_0x584eb6[_0x273f20(0x1c2)](_0x3b9dd6);}),_0x584eb6['size']&&(await _0x188394[_0x394dc7(0x1e2)](_0x394dc7(0x1cd),{'params':{'userIDs':[..._0x584eb6]}}))[_0x394dc7(0x200)][_0x394dc7(0x1e6)][_0x394dc7(0x23c)](_0x3b2a15=>{const _0x5f061c=_0x394dc7;_0x3b2a15&&_0x1a1b1d[_0x5f061c(0x233)](_0x3b2a15);});};var _0x2e2a50=Object['getOwnPropertyDescriptor'],_0x21ed80=(_0x2cfe27,_0x29a8d3,_0x1850f3,_0x21145a)=>{for(var _0x14baaa=_0x21145a>0x1?void 0x0:_0x21145a?_0x2e2a50(_0x29a8d3,_0x1850f3):_0x29a8d3,_0x50750c=_0x2cfe27['length']-0x1,_0x1c54d0;_0x50750c>=0x0;_0x50750c--)(_0x1c54d0=_0x2cfe27[_0x50750c])&&(_0x14baaa=_0x1c54d0(_0x14baaa)||_0x14baaa);return _0x14baaa;},_0x5b0d5f=(_0x32ca39,_0x2b8071)=>(_0x32c551,_0x3cbfc3)=>_0x2b8071(_0x32c551,_0x3cbfc3,_0x32ca39);let _0x5d5359=class extends _0x3e06ff['Disposable']{constructor(_0x321524,_0x53719b,_0x136be0,_0x2031b0){const _0x100ae5=_0x4a5f86;super(),this['_commentService']=_0x321524,this[_0x100ae5(0x1ca)]=_0x53719b,this[_0x100ae5(0x1f5)]=_0x136be0,this['_injector']=_0x2031b0,this['_init'](),this[_0x100ae5(0x229)]();}['_initUserSync'](){const _0x44a4a6=_0x4a5f86;this[_0x44a4a6(0x241)](this[_0x44a4a6(0x1ca)][_0x44a4a6(0x245)]['pipe'](_0x1813bc[_0x44a4a6(0x1de)](0x10))[_0x44a4a6(0x236)](_0x45c9d3=>{const _0x38ab73=_0x44a4a6,_0x34146b=new Set();_0x45c9d3['forEach'](_0xd935b7=>{const _0x3cbd3f=_0x45d5;if(_0xd935b7['type']==='add'){const _0x1db274=_0xd935b7['payload'][_0x3cbd3f(0x21a)];_0x34146b['add'](_0x1db274);}}),_0xdf3fa5(this[_0x38ab73(0x21c)],_0x34146b);}));}[_0x4a5f86(0x1c3)](){const _0x5e7c08=_0x4a5f86;this[_0x5e7c08(0x241)](this['_commentService']['commentUpdate$'][_0x5e7c08(0x236)](async _0x5ea791=>{const _0x504006=_0x5e7c08;var _0x6f6c5e,_0x2f0d80,_0x442cdc,_0x5037ab;const _0x37e1f6=(_0x6f6c5e=this[_0x504006(0x1ca)][_0x504006(0x1ea)](_0x5ea791['unitId'])[_0x504006(0x206)](_0x5e74dc=>_0x5e74dc[_0x504006(0x23e)]===_0x5ea791[_0x504006(0x23e)]))==null?void 0x0:_0x6f6c5e[_0x504006(0x1fe)];if(!_0x37e1f6)return;const {unitId:_0x5670c8,subUnitId:_0x4a78f9}=_0x37e1f6;switch(_0x5ea791['user']&&this['_userService'][_0x504006(0x233)](_0x5ea791['user']),_0x5ea791['type']){case _0x3b65af[_0x504006(0x21e)]:break;case _0x3b65af[_0x504006(0x1f8)]:{this[_0x504006(0x1ca)][_0x504006(0x24b)](_0x5670c8,_0x4a78f9,{'unitId':_0x5670c8,'subUnitId':_0x4a78f9,'ref':'','id':_0x5ea791['replyId'],'dT':_0x28e987(+_0x5ea791[_0x504006(0x1ff)]),'threadId':_0x5ea791['threadId'],'personId':(_0x442cdc=(_0x2f0d80=_0x5ea791[_0x504006(0x22a)])==null?void 0x0:_0x2f0d80['userID'])!=null?_0x442cdc:_0x5ea791['userId'],'text':JSON['parse'](_0x5ea791[_0x504006(0x216)]),'parentId':_0x37e1f6['id']});break;}case _0x3b65af[_0x504006(0x1f0)]:{const _0xf4c518=this['_threadCommentModel'][_0x504006(0x208)](_0x5670c8,_0x4a78f9,_0x5ea791[_0x504006(0x21f)]);_0xf4c518&&_0xf4c518[_0x504006(0x1db)]&&this['_threadCommentModel'][_0x504006(0x222)](_0x5670c8,_0x4a78f9,_0x5ea791[_0x504006(0x21f)]);break;}case _0x3b65af[_0x504006(0x1d4)]:{this[_0x504006(0x1ca)][_0x504006(0x223)](_0x5670c8,_0x4a78f9,{'commentId':_0x5ea791[_0x504006(0x21f)],'text':JSON[_0x504006(0x20f)](_0x5ea791['content'])});break;}case _0x3b65af[_0x504006(0x220)]:{const _0x50d3ae=(_0x5037ab=this['_threadCommentModel']['getUnit'](_0x5ea791['unitId'])[_0x504006(0x206)](_0x4adc1d=>_0x4adc1d['threadId']===_0x5ea791[_0x504006(0x23e)]))==null?void 0x0:_0x5037ab[_0x504006(0x1fe)];_0x50d3ae&&this[_0x504006(0x1ca)][_0x504006(0x1fb)](_0x5670c8,_0x4a78f9,_0x50d3ae['id'],_0x5ea791[_0x504006(0x23f)]===_0x137c8d[_0x504006(0x1d8)]);break;}}}));}};_0x5d5359=_0x21ed80([_0x5b0d5f(0x0,_0x3e06ff['Inject'](_0x4ebd7c[_0x4a5f86(0x1ce)])),_0x5b0d5f(0x1,_0x3e06ff[_0x4a5f86(0x234)](_0x33dd0d[_0x4a5f86(0x237)])),_0x5b0d5f(0x2,_0x3e06ff[_0x4a5f86(0x234)](_0x3e06ff[_0x4a5f86(0x23b)])),_0x5b0d5f(0x3,_0x3e06ff[_0x4a5f86(0x234)](_0x3e06ff[_0x4a5f86(0x207)]))],_0x5d5359);const _0x3b08bc=_0x4a5f86(0x1cb),_0x2833f6={};var _0x5535cd=Object['getOwnPropertyDescriptor'],_0x3bc456=(_0x386f89,_0x3704c2,_0x9f4572,_0x347c7f)=>{for(var _0x145ad8=_0x347c7f>0x1?void 0x0:_0x347c7f?_0x5535cd(_0x3704c2,_0x9f4572):_0x3704c2,_0x1713e9=_0x386f89['length']-0x1,_0x144881;_0x1713e9>=0x0;_0x1713e9--)(_0x144881=_0x386f89[_0x1713e9])&&(_0x145ad8=_0x144881(_0x145ad8)||_0x145ad8);return _0x145ad8;},_0x39995f=(_0x2cf4e5,_0x54847e)=>(_0x452b5f,_0x23464e)=>_0x54847e(_0x452b5f,_0x23464e,_0x2cf4e5);function _0x491fe1(_0x3adb6e,_0x487ec8){const _0x2d7e6c=_0x4a5f86,_0x3d4618=_0x3adb6e[_0x2d7e6c(0x249)][0x0];return{..._0x487ec8,'id':_0x3d4618['replyId'],'resolved':_0x3adb6e[_0x2d7e6c(0x23f)]===0x1,'dT':_0x28e987(_0x3d4618[_0x2d7e6c(0x1ff)]),'personId':_0x3d4618[_0x2d7e6c(0x1d5)],'threadId':_0x3d4618['threadId']};}function _0x1453e8(_0x39100f,_0x115db7,_0x370dd0){const _0x4c854f=_0x4a5f86;var _0x14679c,_0x9da0c5;if(((_0x9da0c5=(_0x14679c=_0x39100f==null?void 0x0:_0x39100f['replies'])==null?void 0x0:_0x14679c[_0x4c854f(0x1ee)])!=null?_0x9da0c5:0x0)>0x0){const _0x2d7006=(_0x4d85f8,_0x2fd07d)=>({'id':_0x4d85f8['replyId'],'threadId':_0x4d85f8[_0x4c854f(0x23e)],'dT':_0x28e987(_0x4d85f8['createTimestamp']),'personId':_0x4d85f8[_0x4c854f(0x1d5)],'resolved':_0x39100f[_0x4c854f(0x23f)]===_0x137c8d['Solved'],'unitId':_0x115db7,'subUnitId':_0x370dd0,'text':JSON[_0x4c854f(0x20f)](_0x4d85f8[_0x4c854f(0x216)]),'parentId':_0x2fd07d}),_0x487d6a=_0x2d7006(_0x39100f[_0x4c854f(0x249)][0x0]);return{..._0x487d6a,'children':_0x39100f[_0x4c854f(0x249)][_0x4c854f(0x231)](0x1)['map'](_0x4961b2=>_0x2d7006(_0x4961b2,_0x487d6a['id']))};}return null;}let _0x1f4fd0=class{constructor(_0x4a72e4,_0x38cbed,_0x32520e){const _0x476394=_0x4a5f86;this[_0x476394(0x1c5)]=_0x4a72e4,this[_0x476394(0x1f5)]=_0x38cbed,this[_0x476394(0x230)]=_0x32520e;}async[_0x4a5f86(0x24b)](_0x5a0c6a){const _0x4e0529=_0x4a5f86;var _0x511ce3,_0x5cfd87;const {parentId:_0x6364bd,unitId:_0x43319c,text:_0xcc0cd4,threadId:_0x1764f9}=_0x5a0c6a,_0x39cb58=(_0x5cfd87=(_0x511ce3=_0xcc0cd4[_0x4e0529(0x1ed)])==null?void 0x0:_0x511ce3[_0x4e0529(0x1d1)](_0x1c54a7=>_0x1c54a7[_0x4e0529(0x1d0)]===_0x3e06ff[_0x4e0529(0x1f3)][_0x4e0529(0x23a)])[_0x4e0529(0x215)](_0x435299=>_0x435299[_0x4e0529(0x20e)]))!=null?_0x5cfd87:[],_0xa00eb8=JSON[_0x4e0529(0x1f1)](_0xcc0cd4),_0x232f21=(await this[_0x4e0529(0x230)][_0x4e0529(0x1eb)](_0x43319c))[_0x4e0529(0x22f)]();if(_0x6364bd){const _0x44a4a4={'memberId':_0x232f21,'unitId':_0x43319c,'content':_0xa00eb8,'mention':_0x39cb58,'threadId':_0x1764f9},_0x507f29=(await this[_0x4e0529(0x1c5)][_0x4e0529(0x1c7)](_0x4e0529(0x1cc)+_0x43319c+_0x4e0529(0x1e0),{'body':_0x44a4a4}))[_0x4e0529(0x200)][_0x4e0529(0x1d3)];return{..._0x5a0c6a,'id':_0x507f29['replyId'],'dT':_0x3e06ff[_0x4e0529(0x1fd)](+_0x507f29[_0x4e0529(0x1ff)])[_0x4e0529(0x244)](_0x4e0529(0x227)),'personId':_0x507f29[_0x4e0529(0x1d5)]};}else{const _0x5ad1df={'memberId':_0x232f21,'unitId':_0x43319c,'content':_0xa00eb8,'mention':_0x39cb58},_0x3238d8=await this[_0x4e0529(0x1c5)]['post'](_0x4e0529(0x1cc)+_0x43319c+_0x4e0529(0x22d),{'body':_0x5ad1df});return _0x491fe1(_0x3238d8['body'][_0x4e0529(0x1da)],_0x5a0c6a);}}async[_0x4a5f86(0x223)](_0x2f44de){const _0x62a97c=_0x4a5f86;var _0x42c715,_0xa675e6;const {text:_0x5b96e4,unitId:_0x5ec067}=_0x2f44de,_0x5b2085=(_0xa675e6=(_0x42c715=_0x5b96e4['customRanges'])==null?void 0x0:_0x42c715[_0x62a97c(0x1d1)](_0x199fb5=>_0x199fb5['rangeType']===_0x3e06ff[_0x62a97c(0x1f3)][_0x62a97c(0x23a)])[_0x62a97c(0x215)](_0x522ffd=>_0x522ffd['rangeId']))!=null?_0xa675e6:[],_0x1aa76c=JSON[_0x62a97c(0x1f1)](_0x5b96e4),_0x1ea54e=_0x2f44de['threadId'],_0x13ce46=_0x2f44de['id'],_0xc67b3a={'memberId':(await this[_0x62a97c(0x230)][_0x62a97c(0x1eb)](_0x5ec067))[_0x62a97c(0x22f)](),'unitId':_0x5ec067,'threadId':_0x1ea54e,'mention':_0x5b2085,'content':_0x1aa76c,'replyId':_0x13ce46},_0x2e54f4=await this[_0x62a97c(0x1c5)]['post']('/universer-api/comment/unit/'+_0x5ec067+_0x62a97c(0x1e3),{'body':_0xc67b3a});return!_0x2e54f4[_0x62a97c(0x200)]['error']||_0x2e54f4['body'][_0x62a97c(0x1fc)][_0x62a97c(0x21b)]===0x1;}async[_0x4a5f86(0x1fb)](_0x3d21ca){const _0x557dad=_0x4a5f86,{unitId:_0x4e4d8c}=_0x3d21ca,_0x56efe9=_0x3d21ca[_0x557dad(0x23e)],_0xbaceb0={'memberId':this[_0x557dad(0x1f5)][_0x557dad(0x232)]()[_0x557dad(0x1f6)],'unitId':_0x4e4d8c,'threadId':_0x56efe9,'solved':_0x3d21ca[_0x557dad(0x1dc)]?_0x137c8d[_0x557dad(0x1d8)]:_0x137c8d['OpenOrReOpen']},_0x8679=await this['_httpService'][_0x557dad(0x1c7)](_0x557dad(0x1cc)+_0x4e4d8c+_0x557dad(0x1e1),{'body':_0xbaceb0});return!_0x8679[_0x557dad(0x200)][_0x557dad(0x1fc)]||_0x8679[_0x557dad(0x200)][_0x557dad(0x1fc)][_0x557dad(0x21b)]===0x1;}async[_0x4a5f86(0x222)](_0xe374d9,_0x32ada2,_0x4d56e9,_0x4cfccc){const _0xb98d56=_0x4a5f86,_0xeb324a={'memberId':(await this[_0xb98d56(0x230)]['requireSession'](_0xe374d9))['getMemberID'](),'threadId':_0x4d56e9,'replyId':_0x4cfccc,'unitId':_0xe374d9},_0x34cbe9=await this[_0xb98d56(0x1c5)][_0xb98d56(0x1c7)](_0xb98d56(0x1cc)+_0xe374d9+'/delete',{'body':_0xeb324a});return!_0x34cbe9['body']['error']||_0x34cbe9[_0xb98d56(0x200)][_0xb98d56(0x1fc)]['code']===0x1;}async[_0x4a5f86(0x226)](_0x2630cc,_0x476e15,_0x561546){const _0x36b49e=_0x4a5f86,_0x5137da={'unitId':_0x2630cc,'threadId':_0x561546},_0x2dfa12=await this[_0x36b49e(0x1c5)][_0x36b49e(0x1c7)]('/universer-api/comment/unit/'+_0x2630cc+_0x36b49e(0x211),{'body':_0x5137da}),_0x2e16f5=_0x561546[_0x36b49e(0x215)](_0x5e954c=>_0x1453e8(_0x2dfa12[_0x36b49e(0x200)][_0x36b49e(0x1fa)][_0x5e954c],_0x2630cc,_0x476e15))[_0x36b49e(0x1d1)](Boolean);return Object['values'](_0x2dfa12['body']['users'])['forEach'](_0x556976=>{const _0x61f727=_0x36b49e;this[_0x61f727(0x1f5)][_0x61f727(0x233)](_0x556976);}),_0x2e16f5;}[_0x4a5f86(0x1e8)](_0x103d13){const _0x48b8f4=_0x4a5f86;return{'id':_0x103d13['id'],'threadId':_0x103d13[_0x48b8f4(0x23e)],'ref':_0x103d13[_0x48b8f4(0x205)]};}};_0x1f4fd0=_0x3bc456([_0x39995f(0x0,_0x3e06ff[_0x4a5f86(0x234)](_0x1af0b5[_0x4a5f86(0x22e)])),_0x39995f(0x1,_0x3e06ff[_0x4a5f86(0x234)](_0x3e06ff[_0x4a5f86(0x23b)])),_0x39995f(0x2,_0x3e06ff['Inject'](_0x4ebd7c[_0x4a5f86(0x212)]))],_0x1f4fd0);var _0xbe8f6a=Object[_0x4a5f86(0x219)],_0x47fb0d=(_0x503f06,_0x433883,_0x1f461b,_0x2134c6)=>{const _0x41b0c6=_0x4a5f86;for(var _0x253a7f=_0x2134c6>0x1?void 0x0:_0x2134c6?_0xbe8f6a(_0x433883,_0x1f461b):_0x433883,_0x4be89c=_0x503f06[_0x41b0c6(0x1ee)]-0x1,_0x5cc202;_0x4be89c>=0x0;_0x4be89c--)(_0x5cc202=_0x503f06[_0x4be89c])&&(_0x253a7f=_0x5cc202(_0x253a7f)||_0x253a7f);return _0x253a7f;},_0x17dccf=(_0x427610,_0x48251c)=>(_0x2697bd,_0x29619d)=>_0x48251c(_0x2697bd,_0x29619d,_0x427610);let _0x15f3b5=class extends _0x3e06ff[_0x4a5f86(0x20d)]{constructor(_0x18b085,_0x124d80){const _0x55edde=_0x4a5f86;super(),this[_0x55edde(0x218)]=_0x18b085,this[_0x55edde(0x240)]=_0x124d80,this[_0x55edde(0x221)]();}[_0x4a5f86(0x221)](){const _0x57632e=_0x4a5f86;this[_0x57632e(0x218)][_0x57632e(0x217)]=this[_0x57632e(0x240)],this[_0x57632e(0x218)][_0x57632e(0x1f9)]=!0x1;}};_0x15f3b5=_0x47fb0d([_0x17dccf(0x0,_0x33dd0d['IThreadCommentDataSourceService']),_0x17dccf(0x1,_0x3e06ff['Inject'](_0x1f4fd0))],_0x15f3b5);var _0xbe078d=Object[_0x4a5f86(0x242)],_0x551b2d=Object['getOwnPropertyDescriptor'],_0x208660=(_0x222905,_0x20f503,_0x40ff55)=>_0x20f503 in _0x222905?_0xbe078d(_0x222905,_0x20f503,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40ff55}):_0x222905[_0x20f503]=_0x40ff55,_0x523ee5=(_0x51444d,_0x3df040,_0x4a7c20,_0x3b6212)=>{const _0x40805c=_0x4a5f86;for(var _0x388a5d=_0x3b6212>0x1?void 0x0:_0x3b6212?_0x551b2d(_0x3df040,_0x4a7c20):_0x3df040,_0x87a1ef=_0x51444d[_0x40805c(0x1ee)]-0x1,_0x282b63;_0x87a1ef>=0x0;_0x87a1ef--)(_0x282b63=_0x51444d[_0x87a1ef])&&(_0x388a5d=_0x282b63(_0x388a5d)||_0x388a5d);return _0x388a5d;},_0x35fc04=(_0x5bab6a,_0x1c0590)=>(_0x57ed95,_0x104d7b)=>_0x1c0590(_0x57ed95,_0x104d7b,_0x5bab6a),_0x4a2b1a=(_0x5e6134,_0x4426af,_0x4a29e0)=>_0x208660(_0x5e6134,typeof _0x4426af!=_0x4a5f86(0x239)?_0x4426af+'':_0x4426af,_0x4a29e0);_0x347b73[_0x4a5f86(0x225)]=class extends _0x3e06ff[_0x4a5f86(0x20b)]{constructor(_0x8c6c71=_0x2833f6,_0x2a11e6,_0x18fa5f){const _0x29e345=_0x4a5f86;super(),this[_0x29e345(0x1cf)]=_0x8c6c71,this[_0x29e345(0x21c)]=_0x2a11e6,this[_0x29e345(0x201)]=_0x18fa5f;const {..._0x4ec4ba}=_0x3e06ff[_0x29e345(0x238)]({},_0x2833f6,this[_0x29e345(0x1cf)]);this['_configService'][_0x29e345(0x20a)](_0x3b08bc,_0x4ec4ba);}['onStarting'](){const _0xc452ad=_0x4a5f86;[[_0x1f4fd0],[_0x15f3b5],[_0x5d5359]][_0xc452ad(0x23c)](_0x341205=>{const _0x5c69eb=_0xc452ad;this[_0x5c69eb(0x21c)][_0x5c69eb(0x1c9)](_0x341205);});}['onReady'](){const _0x229cfc=_0x4a5f86;this[_0x229cfc(0x21c)][_0x229cfc(0x1e2)](_0x15f3b5),this[_0x229cfc(0x21c)][_0x229cfc(0x1e2)](_0x5d5359);}},_0x4a2b1a(_0x347b73[_0x4a5f86(0x225)],_0x4a5f86(0x1f2),_0x36598d),_0x4a2b1a(_0x347b73[_0x4a5f86(0x225)],_0x4a5f86(0x20c),_0x3e06ff[_0x4a5f86(0x248)][_0x4a5f86(0x1f4)]),_0x347b73[_0x4a5f86(0x225)]=_0x523ee5([_0x3e06ff[_0x4a5f86(0x224)](_0x2663f5['UniverThreadCommentUIPlugin'],_0x4ebd7c['UniverCollaborationClientPlugin'],_0x240775[_0x4a5f86(0x204)]),_0x35fc04(0x1,_0x3e06ff['Inject'](_0x3e06ff[_0x4a5f86(0x207)])),_0x35fc04(0x2,_0x3e06ff[_0x4a5f86(0x213)])],_0x347b73[_0x4a5f86(0x225)]),Object[_0x4a5f86(0x242)](_0x347b73,Symbol[_0x4a5f86(0x246)],{'value':_0x4a5f86(0x1e4)});}));function _0x5ce5(){const _0x1f6733=['subscribe','ThreadCommentModel','merge','symbol','COMMENT','UserManagerService','forEach','3112gDADfb','threadId','solved','_threadCommentDataSource','disposeWithMe','defineProperty','UniverCore','format','commentUpdate$','toStringTag','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverInstanceType','replies','121512kJOafl','addComment','delete','_init','getUser','_httpService','@univerjs/thread-comment-ui','post','526050VjgGsV','add','_threadCommentModel','thread-comment-data-source.config','/universer-api/comment/unit/','/universer-api/user/list','CommentService','_config','rangeType','filter','UniverProThreadCommentDatasource','reply','Edit','userId','UNRECOGNIZED','963400RDVEDs','Solved','OpenOrReOpen','comment','parentId','resolved','153cmAsNs','bufferTime','rxjs','/reply','/solved','get','/edit','Module','222rxCXPr','users','6JlqmAk','saveCommentToSnapshot','object','getUnit','requireSession','UniverProCollaborationClient','customRanges','length','1408580xmhyuh','Delete','stringify','pluginName','CustomRangeType','UNIVER_UNKNOWN','_userService','userID','@univerjs-pro/license','Reply','syncUpdateMutationToColla','comments','resolveComment','error','dayjs','root','createTimestamp','body','_configService','@univerjs/core','UniverThreadComment','UniverLicensePlugin','ref','find','Injector','getComment','@univerjs-pro/collaboration-client','setConfig','Plugin','type','Disposable','rangeId','parse','@univerjs/thread-comment','/list','CollaborationSessionService','IConfigService','Unknown','map','content','dataSource','_threadCommentDataSourceService','getOwnPropertyDescriptor','personId','code','_injector','exports','Add','replyId','Solve','_initDataSource','deleteComment','updateComment','DependentOn','UniverThreadCommentDataSourcePlugin','listComments','YYYY/MM/DD\x20HH:mm','UniverThreadCommentUi','_initUserSync','user','90pFSppk','5622428iZyKNu','/add','HTTPService','getMemberID','_sessionService','slice','getCurrentUser','addUser','Inject','837892RGWzDU'];_0x5ce5=function(){return _0x1f6733;};return _0x5ce5();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.15.0-insiders.20260110-48b77c8",
3
+ "version": "0.15.1",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.15.0-insiders.20260110-48b77c8",
49
- "@univerjs-pro/license": "0.15.0-insiders.20260110-48b77c8",
50
- "@univerjs/network": "0.15.0-insiders.20260110-48b77c8",
51
- "@univerjs/core": "0.15.0-insiders.20260110-48b77c8",
52
- "@univerjs/thread-comment": "0.15.0-insiders.20260110-48b77c8",
48
+ "@univerjs-pro/collaboration-client": "0.15.1",
49
+ "@univerjs-pro/license": "0.15.1",
50
+ "@univerjs/core": "0.15.1",
53
51
  "@univerjs/protocol": "0.1.48",
54
- "@univerjs/thread-comment-ui": "0.15.0-insiders.20260110-48b77c8"
52
+ "@univerjs/network": "0.15.1",
53
+ "@univerjs/thread-comment": "0.15.1",
54
+ "@univerjs/thread-comment-ui": "0.15.1"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
59
  "vite": "^7.3.1",
60
60
  "vitest": "^4.0.16",
61
- "@univerjs-infra/shared": "0.15.0"
61
+ "@univerjs-infra/shared": "0.15.1"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",