@univerjs-pro/thread-comment-datasource 0.12.4-insiders.20251213-692494c → 0.13.0-insiders.20251215-64041bb

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 _0x39cd9e=_0x38c6;(function(_0x52ef9f,_0x13bb64){const _0x3e7288=_0x38c6,_0x17cb15=_0x52ef9f();while(!![]){try{const _0x4afee9=-parseInt(_0x3e7288(0x1cf))/0x1*(-parseInt(_0x3e7288(0x1f9))/0x2)+parseInt(_0x3e7288(0x1ba))/0x3*(parseInt(_0x3e7288(0x1d9))/0x4)+parseInt(_0x3e7288(0x1c0))/0x5*(parseInt(_0x3e7288(0x1b6))/0x6)+parseInt(_0x3e7288(0x206))/0x7+parseInt(_0x3e7288(0x1a9))/0x8+-parseInt(_0x3e7288(0x1be))/0x9*(parseInt(_0x3e7288(0x1d4))/0xa)+-parseInt(_0x3e7288(0x205))/0xb;if(_0x4afee9===_0x13bb64)break;else _0x17cb15['push'](_0x17cb15['shift']());}catch(_0x3477e2){_0x17cb15['push'](_0x17cb15['shift']());}}}(_0x15fe,0xb258b));Object[_0x39cd9e(0x1fb)](exports,Symbol[_0x39cd9e(0x1af)],{'value':_0x39cd9e(0x20a)});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=_0x39cd9e(0x1f8);var I=(_0x59d66b=>(_0x59d66b[_0x59d66b[_0x39cd9e(0x1bd)]=0x0]=_0x39cd9e(0x1bd),_0x59d66b[_0x59d66b['Solved']=0x1]=_0x39cd9e(0x1b9),_0x59d66b[_0x59d66b['UNRECOGNIZED']=-0x1]=_0x39cd9e(0x20c),_0x59d66b))(I||{}),v=(_0x29ce6f=>(_0x29ce6f[_0x29ce6f['Unknown']=0x0]=_0x39cd9e(0x1ac),_0x29ce6f[_0x29ce6f[_0x39cd9e(0x1b1)]=0x1]=_0x39cd9e(0x1b1),_0x29ce6f[_0x29ce6f['Reply']=0x2]='Reply',_0x29ce6f[_0x29ce6f[_0x39cd9e(0x213)]=0x3]='Edit',_0x29ce6f[_0x29ce6f[_0x39cd9e(0x1ee)]=0x4]=_0x39cd9e(0x1ee),_0x29ce6f[_0x29ce6f['Solve']=0x5]='Solve',_0x29ce6f[_0x29ce6f[_0x39cd9e(0x20c)]=-0x1]=_0x39cd9e(0x20c),_0x29ce6f))(v||{});const f=_0x335a82=>c[_0x39cd9e(0x1ce)](new Date(+_0x335a82))[_0x39cd9e(0x1f0)](_0x39cd9e(0x1c4)),R=async(_0x2ad364,_0x59fd93)=>{const _0x5446c1=_0x39cd9e,_0x519026=_0x2ad364[_0x5446c1(0x21f)](c[_0x5446c1(0x1ca)]),_0xfa0908=_0x2ad364[_0x5446c1(0x21f)](P['HTTPService']);_0x59fd93[_0x5446c1(0x21b)](_0x249f31=>{const _0x5a3723=_0x5446c1;_0x519026[_0x5a3723(0x1c8)](_0x249f31)&&_0x59fd93['delete'](_0x249f31);}),_0x59fd93[_0x5446c1(0x1bb)]&&(await _0xfa0908[_0x5446c1(0x21f)](_0x5446c1(0x1f1),{'params':{'userIDs':[..._0x59fd93]}}))[_0x5446c1(0x1a7)][_0x5446c1(0x208)][_0x5446c1(0x21b)](_0x14c117=>{const _0x46ef22=_0x5446c1;_0x14c117&&_0x519026[_0x46ef22(0x1c7)](_0x14c117);});};var $=Object[_0x39cd9e(0x20e)],E=(_0x55efa9,_0x4a4c41,_0x3c96a7,_0x140e3c)=>{const _0x52b430=_0x39cd9e;for(var _0x18d823=_0x140e3c>0x1?void 0x0:_0x140e3c?$(_0x4a4c41,_0x3c96a7):_0x4a4c41,_0x369789=_0x55efa9[_0x52b430(0x20b)]-0x1,_0x3ea411;_0x369789>=0x0;_0x369789--)(_0x3ea411=_0x55efa9[_0x369789])&&(_0x18d823=_0x3ea411(_0x18d823)||_0x18d823);return _0x18d823;},S=(_0x59ec5f,_0x13d378)=>(_0x6c8f45,_0x156d51)=>_0x13d378(_0x6c8f45,_0x156d51,_0x59ec5f);function _0x15fe(){const _0x55fc3d=['Reply','rangeId','Solved','249bpBMwi','size','UniverInstanceType','OpenOrReOpen','9mpCPEZ','threadId','2012295AaQOXl','_httpService','setConfig','comment','YYYY/MM/DD\x20HH:mm','type','personId','addUser','getUser','rangeType','UserManagerService','payload','replyId','userID','dayjs','430937zpSXBk','_commentService','map','addComment','unitId','11820310oPKDHC','getUnit','CustomRangeType','parse','dataSource','46388JCUfMB','content','onReady','_injector','UniverThreadCommentDataSourcePlugin','/reply','reply','_initDataSource','HTTPService','stringify','solved','_config','_sessionService','/add','customRanges','disposeWithMe','COMMENT','commentUpdate$','slice','_threadCommentModel','UniverCollaborationClientPlugin','Delete','find','format','/universer-api/user/list','/delete','error','deleteComment','resolved','resolveComment','Disposable','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','2zHyYMB','/universer-api/comment/unit/','defineProperty','add','CommentService','pipe','comments','replies','userId','IConfigService','post','Inject','24135452tCqUtX','7303142zEebVN','bufferTime','users','ThreadCommentModel','Module','length','UNRECOGNIZED','IThreadCommentDataSourceService','getOwnPropertyDescriptor','DependentOn','syncUpdateMutationToColla','ref','_userService','Edit','getCurrentUser','requireSession','_init','root','/list','/edit','UniverLicensePlugin','forEach','getMemberID','code','pluginName','get','createTimestamp','Injector','updateComment','_threadCommentDataSource','user','body','onStarting','10139336DlFlpy','subscribe','_threadCommentDataSourceService','Unknown','filter','merge','toStringTag','CollaborationSessionService','Add','Solve','Plugin','_configService','getComment','6xjHuOO'];_0x15fe=function(){return _0x55fc3d;};return _0x15fe();}function _0x38c6(_0xf01d7b,_0x214f47){_0xf01d7b=_0xf01d7b-0x1a4;const _0x15fe84=_0x15fe();let _0x38c69f=_0x15fe84[_0xf01d7b];return _0x38c69f;}let _=class extends c[_0x39cd9e(0x1f7)]{constructor(_0x2da5db,_0x21a9ed,_0x56f7c6,_0x11f535){const _0x571320=_0x39cd9e;super(),this[_0x571320(0x1d0)]=_0x2da5db,this['_threadCommentModel']=_0x21a9ed,this[_0x571320(0x212)]=_0x56f7c6,this['_injector']=_0x11f535,this[_0x571320(0x216)](),this['_initUserSync']();}['_initUserSync'](){const _0x5c112e=_0x39cd9e;this[_0x5c112e(0x1e8)](this[_0x5c112e(0x1ec)][_0x5c112e(0x1ea)][_0x5c112e(0x1fe)](j[_0x5c112e(0x207)](0x10))[_0x5c112e(0x1aa)](_0x5df37b=>{const _0x2bd787=_0x5c112e,_0x3e94ca=new Set();_0x5df37b[_0x2bd787(0x21b)](_0x17d075=>{const _0x1a7ddb=_0x2bd787;switch(_0x17d075[_0x1a7ddb(0x1c5)]){case _0x1a7ddb(0x1fc):{const _0x23e0e1=_0x17d075[_0x1a7ddb(0x1cb)][_0x1a7ddb(0x1c6)];_0x3e94ca[_0x1a7ddb(0x1fc)](_0x23e0e1);break;}}}),R(this[_0x2bd787(0x1dc)],_0x3e94ca);}));}[_0x39cd9e(0x216)](){const _0x5a95ab=_0x39cd9e;this[_0x5a95ab(0x1e8)](this[_0x5a95ab(0x1d0)][_0x5a95ab(0x1ea)][_0x5a95ab(0x1aa)](async _0xac9c68=>{const _0x2cce43=_0x5a95ab;var _0x397191,_0xc2c8f0,_0x5e34e6,_0x482301;const _0x381474=(_0x397191=this['_threadCommentModel'][_0x2cce43(0x1d5)](_0xac9c68[_0x2cce43(0x1d3)])['find'](_0x5ae257=>_0x5ae257[_0x2cce43(0x1bf)]===_0xac9c68['threadId']))==null?void 0x0:_0x397191['root'];if(!_0x381474)return;const {unitId:_0x49a13d,subUnitId:_0x516f78}=_0x381474;switch(_0xac9c68['user']&&this[_0x2cce43(0x212)][_0x2cce43(0x1c7)](_0xac9c68[_0x2cce43(0x1a6)]),_0xac9c68[_0x2cce43(0x1c5)]){case v['Add']:break;case v[_0x2cce43(0x1b7)]:{this[_0x2cce43(0x1ec)]['addComment'](_0x49a13d,_0x516f78,{'unitId':_0x49a13d,'subUnitId':_0x516f78,'ref':'','id':_0xac9c68[_0x2cce43(0x1cc)],'dT':f(+_0xac9c68[_0x2cce43(0x220)]),'threadId':_0xac9c68[_0x2cce43(0x1bf)],'personId':(_0x5e34e6=(_0xc2c8f0=_0xac9c68['user'])==null?void 0x0:_0xc2c8f0['userID'])!=null?_0x5e34e6:_0xac9c68[_0x2cce43(0x201)],'text':JSON[_0x2cce43(0x1d7)](_0xac9c68[_0x2cce43(0x1da)]),'parentId':_0x381474['id']});break;}case v[_0x2cce43(0x1ee)]:{const _0x10bc16=this[_0x2cce43(0x1ec)][_0x2cce43(0x1b5)](_0x49a13d,_0x516f78,_0xac9c68[_0x2cce43(0x1cc)]);_0x10bc16&&_0x10bc16['parentId']&&this[_0x2cce43(0x1ec)][_0x2cce43(0x1f4)](_0x49a13d,_0x516f78,_0xac9c68[_0x2cce43(0x1cc)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x2cce43(0x1a4)](_0x49a13d,_0x516f78,{'commentId':_0xac9c68[_0x2cce43(0x1cc)],'text':JSON[_0x2cce43(0x1d7)](_0xac9c68[_0x2cce43(0x1da)])});break;}case v[_0x2cce43(0x1b2)]:{const _0x3ed754=(_0x482301=this['_threadCommentModel']['getUnit'](_0xac9c68[_0x2cce43(0x1d3)])[_0x2cce43(0x1ef)](_0x4f38e5=>_0x4f38e5[_0x2cce43(0x1bf)]===_0xac9c68['threadId']))==null?void 0x0:_0x482301[_0x2cce43(0x217)];_0x3ed754&&this['_threadCommentModel'][_0x2cce43(0x1f6)](_0x49a13d,_0x516f78,_0x3ed754['id'],_0xac9c68[_0x2cce43(0x1e3)]===I[_0x2cce43(0x1b9)]);break;}}}));}};_=E([S(0x0,c[_0x39cd9e(0x204)](b[_0x39cd9e(0x1fd)])),S(0x1,c[_0x39cd9e(0x204)](M[_0x39cd9e(0x209)])),S(0x2,c[_0x39cd9e(0x204)](c[_0x39cd9e(0x1ca)])),S(0x3,c['Inject'](c[_0x39cd9e(0x221)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x39cd9e(0x20e)],x=(_0x375ea7,_0x8ffa94,_0xc4ccfc,_0x1df547)=>{for(var _0x3fd3ac=_0x1df547>0x1?void 0x0:_0x1df547?A(_0x8ffa94,_0xc4ccfc):_0x8ffa94,_0x15b061=_0x375ea7['length']-0x1,_0x3f151d;_0x15b061>=0x0;_0x15b061--)(_0x3f151d=_0x375ea7[_0x15b061])&&(_0x3fd3ac=_0x3f151d(_0x3fd3ac)||_0x3fd3ac);return _0x3fd3ac;},C=(_0x29e769,_0x33046a)=>(_0x4aa702,_0x1d5cd5)=>_0x33046a(_0x4aa702,_0x1d5cd5,_0x29e769);function Y(_0x127912,_0x235d92){const _0x2f9503=_0x39cd9e,_0x254c3c=_0x127912[_0x2f9503(0x200)][0x0];return{..._0x235d92,'id':_0x254c3c['replyId'],'resolved':_0x127912['solved']===0x1,'dT':f(_0x254c3c['createTimestamp']),'personId':_0x254c3c[_0x2f9503(0x201)],'threadId':_0x254c3c[_0x2f9503(0x1bf)]};}function G(_0x50de8f,_0x4c0c8c,_0x58e622){const _0x282034=_0x39cd9e;var _0x254d2e,_0x3cb45b;if(((_0x3cb45b=(_0x254d2e=_0x50de8f==null?void 0x0:_0x50de8f['replies'])==null?void 0x0:_0x254d2e[_0x282034(0x20b)])!=null?_0x3cb45b:0x0)>0x0){const _0x42299d=(_0x9741de,_0x4c6aa0)=>({'id':_0x9741de[_0x282034(0x1cc)],'threadId':_0x9741de[_0x282034(0x1bf)],'dT':f(_0x9741de[_0x282034(0x220)]),'personId':_0x9741de[_0x282034(0x201)],'resolved':_0x50de8f[_0x282034(0x1e3)]===I[_0x282034(0x1b9)],'unitId':_0x4c0c8c,'subUnitId':_0x58e622,'text':JSON[_0x282034(0x1d7)](_0x9741de['content']),'parentId':_0x4c6aa0}),_0x3f9946=_0x42299d(_0x50de8f[_0x282034(0x200)][0x0]);return{..._0x3f9946,'children':_0x50de8f['replies'][_0x282034(0x1eb)](0x1)[_0x282034(0x1d1)](_0x37bd25=>_0x42299d(_0x37bd25,_0x3f9946['id']))};}return null;}let p=class{constructor(_0x32b253,_0x105f27,_0xb282d3){const _0x4fb193=_0x39cd9e;this['_httpService']=_0x32b253,this[_0x4fb193(0x212)]=_0x105f27,this[_0x4fb193(0x1e5)]=_0xb282d3;}async[_0x39cd9e(0x1d2)](_0x27e7c3){const _0x214823=_0x39cd9e;var _0x266017,_0x213b88;const {parentId:_0x4b4bcb,unitId:_0x20c0ea,text:_0x23dfb8,threadId:_0x53ce3d}=_0x27e7c3,_0x5e65b0=(_0x213b88=(_0x266017=_0x23dfb8[_0x214823(0x1e7)])==null?void 0x0:_0x266017[_0x214823(0x1ad)](_0x54803e=>_0x54803e['rangeType']===c[_0x214823(0x1d6)][_0x214823(0x1e9)])[_0x214823(0x1d1)](_0x16195c=>_0x16195c[_0x214823(0x1b8)]))!=null?_0x213b88:[],_0x4249d1=JSON[_0x214823(0x1e2)](_0x23dfb8),_0x295c8c=(await this[_0x214823(0x1e5)]['requireSession'](_0x20c0ea))['getMemberID']();if(_0x4b4bcb){const _0x3cc9dd={'memberId':_0x295c8c,'unitId':_0x20c0ea,'content':_0x4249d1,'mention':_0x5e65b0,'threadId':_0x53ce3d},_0x45d314=(await this[_0x214823(0x1c1)][_0x214823(0x203)](_0x214823(0x1fa)+_0x20c0ea+_0x214823(0x1de),{'body':_0x3cc9dd}))[_0x214823(0x1a7)][_0x214823(0x1df)];return{..._0x27e7c3,'id':_0x45d314['replyId'],'dT':c['dayjs'](+_0x45d314[_0x214823(0x220)])[_0x214823(0x1f0)](_0x214823(0x1c4)),'personId':_0x45d314[_0x214823(0x201)]};}else{const _0x5cc501={'memberId':_0x295c8c,'unitId':_0x20c0ea,'content':_0x4249d1,'mention':_0x5e65b0},_0x41a5bd=await this[_0x214823(0x1c1)][_0x214823(0x203)](_0x214823(0x1fa)+_0x20c0ea+_0x214823(0x1e6),{'body':_0x5cc501});return Y(_0x41a5bd[_0x214823(0x1a7)][_0x214823(0x1c3)],_0x27e7c3);}}async[_0x39cd9e(0x1a4)](_0x5894b3){const _0xb64223=_0x39cd9e;var _0x2fa005,_0x1f0e42;const {text:_0x2faa29,unitId:_0x31585a}=_0x5894b3,_0x28ece3=(_0x1f0e42=(_0x2fa005=_0x2faa29[_0xb64223(0x1e7)])==null?void 0x0:_0x2fa005[_0xb64223(0x1ad)](_0x66e9d3=>_0x66e9d3[_0xb64223(0x1c9)]===c[_0xb64223(0x1d6)][_0xb64223(0x1e9)])[_0xb64223(0x1d1)](_0x205240=>_0x205240[_0xb64223(0x1b8)]))!=null?_0x1f0e42:[],_0x5dd23a=JSON[_0xb64223(0x1e2)](_0x2faa29),_0x22ef47=_0x5894b3[_0xb64223(0x1bf)],_0x5c8c7f=_0x5894b3['id'],_0x2fb54b={'memberId':(await this[_0xb64223(0x1e5)][_0xb64223(0x215)](_0x31585a))['getMemberID'](),'unitId':_0x31585a,'threadId':_0x22ef47,'mention':_0x28ece3,'content':_0x5dd23a,'replyId':_0x5c8c7f},_0x46105c=await this[_0xb64223(0x1c1)][_0xb64223(0x203)](_0xb64223(0x1fa)+_0x31585a+_0xb64223(0x219),{'body':_0x2fb54b});return!_0x46105c[_0xb64223(0x1a7)]['error']||_0x46105c[_0xb64223(0x1a7)]['error'][_0xb64223(0x21d)]===0x1;}async[_0x39cd9e(0x1f6)](_0x543e6f){const _0x315d61=_0x39cd9e,{unitId:_0x5c4233}=_0x543e6f,_0x44d0b4=_0x543e6f[_0x315d61(0x1bf)],_0x3aad58={'memberId':this[_0x315d61(0x212)][_0x315d61(0x214)]()[_0x315d61(0x1cd)],'unitId':_0x5c4233,'threadId':_0x44d0b4,'solved':_0x543e6f[_0x315d61(0x1f5)]?I[_0x315d61(0x1b9)]:I[_0x315d61(0x1bd)]},_0xe01942=await this[_0x315d61(0x1c1)][_0x315d61(0x203)](_0x315d61(0x1fa)+_0x5c4233+'/solved',{'body':_0x3aad58});return!_0xe01942[_0x315d61(0x1a7)][_0x315d61(0x1f3)]||_0xe01942['body']['error'][_0x315d61(0x21d)]===0x1;}async[_0x39cd9e(0x1f4)](_0x5706db,_0x3fff49,_0x1e0ab0,_0x416d69){const _0x20d756=_0x39cd9e,_0x3f07e1={'memberId':(await this[_0x20d756(0x1e5)][_0x20d756(0x215)](_0x5706db))[_0x20d756(0x21c)](),'threadId':_0x1e0ab0,'replyId':_0x416d69,'unitId':_0x5706db},_0x1e850b=await this['_httpService'][_0x20d756(0x203)]('/universer-api/comment/unit/'+_0x5706db+_0x20d756(0x1f2),{'body':_0x3f07e1});return!_0x1e850b[_0x20d756(0x1a7)]['error']||_0x1e850b[_0x20d756(0x1a7)][_0x20d756(0x1f3)][_0x20d756(0x21d)]===0x1;}async['listComments'](_0x1e23ac,_0x1df984,_0x68596e){const _0x5f1175=_0x39cd9e,_0x3d62ff={'unitId':_0x1e23ac,'threadId':_0x68596e},_0xf1439a=await this[_0x5f1175(0x1c1)][_0x5f1175(0x203)]('/universer-api/comment/unit/'+_0x1e23ac+_0x5f1175(0x218),{'body':_0x3d62ff}),_0x525acb=_0x68596e[_0x5f1175(0x1d1)](_0x2de6da=>G(_0xf1439a[_0x5f1175(0x1a7)][_0x5f1175(0x1ff)][_0x2de6da],_0x1e23ac,_0x1df984))[_0x5f1175(0x1ad)](Boolean);return Object['values'](_0xf1439a['body'][_0x5f1175(0x208)])[_0x5f1175(0x21b)](_0x44cc48=>{const _0x172627=_0x5f1175;this[_0x172627(0x212)][_0x172627(0x1c7)](_0x44cc48);}),_0x525acb;}['saveCommentToSnapshot'](_0x1b0559){const _0xfe797e=_0x39cd9e;return{'id':_0x1b0559['id'],'threadId':_0x1b0559['threadId'],'ref':_0x1b0559[_0xfe797e(0x211)]};}};p=x([C(0x0,c[_0x39cd9e(0x204)](P[_0x39cd9e(0x1e1)])),C(0x1,c[_0x39cd9e(0x204)](c[_0x39cd9e(0x1ca)])),C(0x2,c[_0x39cd9e(0x204)](b[_0x39cd9e(0x1b0)]))],p);var H=Object[_0x39cd9e(0x20e)],J=(_0x193889,_0x2279e4,_0x1ab2f3,_0x51fe45)=>{const _0x254668=_0x39cd9e;for(var _0x4c7c9f=_0x51fe45>0x1?void 0x0:_0x51fe45?H(_0x2279e4,_0x1ab2f3):_0x2279e4,_0x12d0df=_0x193889[_0x254668(0x20b)]-0x1,_0x212f0d;_0x12d0df>=0x0;_0x12d0df--)(_0x212f0d=_0x193889[_0x12d0df])&&(_0x4c7c9f=_0x212f0d(_0x4c7c9f)||_0x4c7c9f);return _0x4c7c9f;},y=(_0x4b7578,_0x563989)=>(_0x3c2530,_0x2a8fa)=>_0x563989(_0x3c2530,_0x2a8fa,_0x4b7578);let g=class extends c[_0x39cd9e(0x1f7)]{constructor(_0x45dd60,_0x90bb8f){const _0xff20d7=_0x39cd9e;super(),this['_threadCommentDataSourceService']=_0x45dd60,this[_0xff20d7(0x1a5)]=_0x90bb8f,this['_initDataSource']();}[_0x39cd9e(0x1e0)](){const _0x28ec03=_0x39cd9e;this['_threadCommentDataSourceService'][_0x28ec03(0x1d8)]=this[_0x28ec03(0x1a5)],this[_0x28ec03(0x1ab)][_0x28ec03(0x210)]=!0x1;}};g=J([y(0x0,M[_0x39cd9e(0x20d)]),y(0x1,c[_0x39cd9e(0x204)](p))],g);var F=Object['defineProperty'],L=Object[_0x39cd9e(0x20e)],Z=(_0x392561,_0x405ef9,_0x3ebddf)=>_0x405ef9 in _0x392561?F(_0x392561,_0x405ef9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3ebddf}):_0x392561[_0x405ef9]=_0x3ebddf,W=(_0x34959f,_0x26d0c0,_0x26c090,_0x935f06)=>{const _0x2f4759=_0x39cd9e;for(var _0x25cbb5=_0x935f06>0x1?void 0x0:_0x935f06?L(_0x26d0c0,_0x26c090):_0x26d0c0,_0x295489=_0x34959f[_0x2f4759(0x20b)]-0x1,_0x1d6f1a;_0x295489>=0x0;_0x295489--)(_0x1d6f1a=_0x34959f[_0x295489])&&(_0x25cbb5=_0x1d6f1a(_0x25cbb5)||_0x25cbb5);return _0x25cbb5;},O=(_0x8d4afb,_0x26c5a7)=>(_0x478488,_0x25ac6a)=>_0x26c5a7(_0x478488,_0x25ac6a,_0x8d4afb),N=(_0x5f34f9,_0x1de444,_0x52e4d8)=>Z(_0x5f34f9,typeof _0x1de444!='symbol'?_0x1de444+'':_0x1de444,_0x52e4d8);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x39cd9e(0x1b3)]{constructor(_0x4016de=D,_0x1a246a,_0x1029b6){const _0x130b86=_0x39cd9e;super(),this[_0x130b86(0x1e4)]=_0x4016de,this['_injector']=_0x1a246a,this['_configService']=_0x1029b6;const {..._0x2495d8}=c[_0x130b86(0x1ae)]({},D,this[_0x130b86(0x1e4)]);this[_0x130b86(0x1b4)][_0x130b86(0x1c2)](q,_0x2495d8);}[_0x39cd9e(0x1a8)](){const _0x50a008=_0x39cd9e;[[p],[g],[_]][_0x50a008(0x21b)](_0x1083e8=>{const _0x522b5c=_0x50a008;this[_0x522b5c(0x1dc)][_0x522b5c(0x1fc)](_0x1083e8);});}[_0x39cd9e(0x1db)](){const _0x2eb2a9=_0x39cd9e;this[_0x2eb2a9(0x1dc)][_0x2eb2a9(0x21f)](g),this[_0x2eb2a9(0x1dc)][_0x2eb2a9(0x21f)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x39cd9e(0x21e),U),N(exports[_0x39cd9e(0x1dd)],'type',c[_0x39cd9e(0x1bc)]['UNIVER_UNKNOWN']),exports[_0x39cd9e(0x1dd)]=W([c[_0x39cd9e(0x20f)](w['UniverThreadCommentUIPlugin'],b[_0x39cd9e(0x1ed)],T[_0x39cd9e(0x21a)]),O(0x1,c['Inject'](c[_0x39cd9e(0x221)])),O(0x2,c[_0x39cd9e(0x202)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x48f676=_0x2843;(function(_0x4df76c,_0x55a429){const _0x2cf12a=_0x2843,_0x32d310=_0x4df76c();while(!![]){try{const _0x22668c=-parseInt(_0x2cf12a(0x141))/0x1*(parseInt(_0x2cf12a(0x148))/0x2)+parseInt(_0x2cf12a(0x139))/0x3+parseInt(_0x2cf12a(0x132))/0x4+-parseInt(_0x2cf12a(0x145))/0x5*(parseInt(_0x2cf12a(0x127))/0x6)+-parseInt(_0x2cf12a(0x160))/0x7+-parseInt(_0x2cf12a(0x197))/0x8*(parseInt(_0x2cf12a(0x15c))/0x9)+parseInt(_0x2cf12a(0x12b))/0xa*(parseInt(_0x2cf12a(0x18c))/0xb);if(_0x22668c===_0x55a429)break;else _0x32d310['push'](_0x32d310['shift']());}catch(_0x57eb1f){_0x32d310['push'](_0x32d310['shift']());}}}(_0x2d4e,0x742c3));Object[_0x48f676(0x154)](exports,Symbol[_0x48f676(0x166)],{'value':_0x48f676(0x147)});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=_0x48f676(0x173);function _0x2d4e(){const _0x3e67cc=['solved','getMemberID','replyId','createTimestamp','values','UniverCollaborationClientPlugin','dayjs','deleteComment','UserManagerService','_userService','stringify','defineProperty','_threadCommentDataSource','_httpService','UniverThreadCommentUIPlugin','thread-comment-data-source.config','parentId','_config','saveCommentToSnapshot','9kplJUC','UNIVER_UNKNOWN','add','UniverLicensePlugin','4643492uMsGaj','disposeWithMe','requireSession','rangeType','getCurrentUser','replies','toStringTag','get','userId','Solved','/solved','Inject','rangeId','subscribe','reply','symbol','code','/delete','OpenOrReOpen','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','bufferTime','listComments','Plugin','threadId','_initDataSource','IConfigService','userID','unitId','format','Disposable','CommentService','forEach','_threadCommentDataSourceService','Delete','HTTPService','syncUpdateMutationToColla','_sessionService','find','CollaborationSessionService','updateComment','Edit','addComment','Add','282788CiwwBC','/add','merge','/list','delete','_threadCommentModel','/universer-api/user/list','CustomRangeType','body','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','37616wvEtGk','type','comments','/edit','onReady','COMMENT','_injector','pluginName','slice','customRanges','ThreadCommentModel','getOwnPropertyDescriptor','getComment','error','size','payload','content','12FGjiqs','Injector','IThreadCommentDataSourceService','filter','490rphaqH','_configService','getUser','Reply','getUnit','onStarting','/universer-api/comment/unit/','650372jwWVcX','_init','UniverThreadCommentDataSourcePlugin','post','parse','ref','users','1053987KEeUUV','resolveComment','DependentOn','addUser','map','Unknown','setConfig','commentUpdate$','1twwKCB','root','_commentService','/reply','1065715mulDHl','user','Module','406854PRrfkZ'];_0x2d4e=function(){return _0x3e67cc;};return _0x2d4e();}var I=(_0x41634f=>(_0x41634f[_0x41634f[_0x48f676(0x172)]=0x0]=_0x48f676(0x172),_0x41634f[_0x41634f['Solved']=0x1]=_0x48f676(0x169),_0x41634f[_0x41634f[_0x48f676(0x196)]=-0x1]='UNRECOGNIZED',_0x41634f))(I||{}),v=(_0x14797e=>(_0x14797e[_0x14797e[_0x48f676(0x13e)]=0x0]=_0x48f676(0x13e),_0x14797e[_0x14797e[_0x48f676(0x18b)]=0x1]='Add',_0x14797e[_0x14797e[_0x48f676(0x12e)]=0x2]='Reply',_0x14797e[_0x14797e[_0x48f676(0x189)]=0x3]=_0x48f676(0x189),_0x14797e[_0x14797e['Delete']=0x4]=_0x48f676(0x182),_0x14797e[_0x14797e['Solve']=0x5]='Solve',_0x14797e[_0x14797e[_0x48f676(0x196)]=-0x1]=_0x48f676(0x196),_0x14797e))(v||{});const f=_0x1e04d3=>c[_0x48f676(0x14f)](new Date(+_0x1e04d3))[_0x48f676(0x17d)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x10c30e,_0x1ab8cb)=>{const _0x236783=_0x48f676,_0x372fad=_0x10c30e[_0x236783(0x167)](c['UserManagerService']),_0x33aded=_0x10c30e[_0x236783(0x167)](P[_0x236783(0x183)]);_0x1ab8cb[_0x236783(0x180)](_0x5aa123=>{const _0x132f43=_0x236783;_0x372fad[_0x132f43(0x12d)](_0x5aa123)&&_0x1ab8cb[_0x132f43(0x190)](_0x5aa123);}),_0x1ab8cb[_0x236783(0x124)]&&(await _0x33aded['get'](_0x236783(0x192),{'params':{'userIDs':[..._0x1ab8cb]}}))[_0x236783(0x194)][_0x236783(0x138)][_0x236783(0x180)](_0x3d98a9=>{const _0x57c86f=_0x236783;_0x3d98a9&&_0x372fad[_0x57c86f(0x13c)](_0x3d98a9);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x5a317d,_0x5d1d30,_0x119224,_0x3940cb)=>{const _0x90d7fd=_0x48f676;for(var _0x156bfd=_0x3940cb>0x1?void 0x0:_0x3940cb?$(_0x5d1d30,_0x119224):_0x5d1d30,_0x133e6e=_0x5a317d[_0x90d7fd(0x174)]-0x1,_0x289cd3;_0x133e6e>=0x0;_0x133e6e--)(_0x289cd3=_0x5a317d[_0x133e6e])&&(_0x156bfd=_0x289cd3(_0x156bfd)||_0x156bfd);return _0x156bfd;},S=(_0xa3e717,_0x28699f)=>(_0x41ccbc,_0x1d9b7a)=>_0x28699f(_0x41ccbc,_0x1d9b7a,_0xa3e717);let _=class extends c[_0x48f676(0x17e)]{constructor(_0x4399c4,_0x3eacf3,_0x1ec672,_0x34a536){const _0x4615ff=_0x48f676;super(),this[_0x4615ff(0x143)]=_0x4399c4,this[_0x4615ff(0x191)]=_0x3eacf3,this[_0x4615ff(0x152)]=_0x1ec672,this[_0x4615ff(0x19d)]=_0x34a536,this[_0x4615ff(0x133)](),this['_initUserSync']();}['_initUserSync'](){const _0x1ba7e4=_0x48f676;this['disposeWithMe'](this[_0x1ba7e4(0x191)][_0x1ba7e4(0x140)]['pipe'](j[_0x1ba7e4(0x175)](0x10))['subscribe'](_0x1a2837=>{const _0x26675a=_0x1ba7e4,_0x3a0586=new Set();_0x1a2837[_0x26675a(0x180)](_0x5b74b2=>{const _0xddbf26=_0x26675a;switch(_0x5b74b2['type']){case'add':{const _0x36785c=_0x5b74b2[_0xddbf26(0x125)]['personId'];_0x3a0586['add'](_0x36785c);break;}}}),R(this[_0x26675a(0x19d)],_0x3a0586);}));}[_0x48f676(0x133)](){const _0x5a74e6=_0x48f676;this[_0x5a74e6(0x161)](this[_0x5a74e6(0x143)][_0x5a74e6(0x140)][_0x5a74e6(0x16d)](async _0x2279fe=>{const _0x592bd9=_0x5a74e6;var _0x516b21,_0x4677bf,_0x281487,_0x112452;const _0x2a7db6=(_0x516b21=this[_0x592bd9(0x191)][_0x592bd9(0x12f)](_0x2279fe[_0x592bd9(0x17c)])[_0x592bd9(0x186)](_0x656c2e=>_0x656c2e[_0x592bd9(0x178)]===_0x2279fe[_0x592bd9(0x178)]))==null?void 0x0:_0x516b21['root'];if(!_0x2a7db6)return;const {unitId:_0xc1ef27,subUnitId:_0x25fbcd}=_0x2a7db6;switch(_0x2279fe[_0x592bd9(0x146)]&&this[_0x592bd9(0x152)]['addUser'](_0x2279fe['user']),_0x2279fe[_0x592bd9(0x198)]){case v[_0x592bd9(0x18b)]:break;case v[_0x592bd9(0x12e)]:{this[_0x592bd9(0x191)][_0x592bd9(0x18a)](_0xc1ef27,_0x25fbcd,{'unitId':_0xc1ef27,'subUnitId':_0x25fbcd,'ref':'','id':_0x2279fe[_0x592bd9(0x14b)],'dT':f(+_0x2279fe[_0x592bd9(0x14c)]),'threadId':_0x2279fe[_0x592bd9(0x178)],'personId':(_0x281487=(_0x4677bf=_0x2279fe[_0x592bd9(0x146)])==null?void 0x0:_0x4677bf['userID'])!=null?_0x281487:_0x2279fe[_0x592bd9(0x168)],'text':JSON[_0x592bd9(0x136)](_0x2279fe[_0x592bd9(0x126)]),'parentId':_0x2a7db6['id']});break;}case v[_0x592bd9(0x182)]:{const _0x16bc25=this[_0x592bd9(0x191)][_0x592bd9(0x122)](_0xc1ef27,_0x25fbcd,_0x2279fe[_0x592bd9(0x14b)]);_0x16bc25&&_0x16bc25[_0x592bd9(0x159)]&&this[_0x592bd9(0x191)][_0x592bd9(0x150)](_0xc1ef27,_0x25fbcd,_0x2279fe[_0x592bd9(0x14b)]);break;}case v[_0x592bd9(0x189)]:{this['_threadCommentModel'][_0x592bd9(0x188)](_0xc1ef27,_0x25fbcd,{'commentId':_0x2279fe[_0x592bd9(0x14b)],'text':JSON['parse'](_0x2279fe[_0x592bd9(0x126)])});break;}case v['Solve']:{const _0x515e1c=(_0x112452=this[_0x592bd9(0x191)]['getUnit'](_0x2279fe[_0x592bd9(0x17c)])[_0x592bd9(0x186)](_0x1b1b1c=>_0x1b1b1c[_0x592bd9(0x178)]===_0x2279fe['threadId']))==null?void 0x0:_0x112452[_0x592bd9(0x142)];_0x515e1c&&this['_threadCommentModel'][_0x592bd9(0x13a)](_0xc1ef27,_0x25fbcd,_0x515e1c['id'],_0x2279fe[_0x592bd9(0x149)]===I[_0x592bd9(0x169)]);break;}}}));}};_=E([S(0x0,c[_0x48f676(0x16b)](b[_0x48f676(0x17f)])),S(0x1,c[_0x48f676(0x16b)](M[_0x48f676(0x1a1)])),S(0x2,c[_0x48f676(0x16b)](c[_0x48f676(0x151)])),S(0x3,c[_0x48f676(0x16b)](c[_0x48f676(0x128)]))],_);const q=_0x48f676(0x158),D={};var A=Object[_0x48f676(0x1a2)],x=(_0x367cb4,_0x41654f,_0xf8b352,_0xa4b56e)=>{const _0x4805fb=_0x48f676;for(var _0x2b0bab=_0xa4b56e>0x1?void 0x0:_0xa4b56e?A(_0x41654f,_0xf8b352):_0x41654f,_0x308784=_0x367cb4[_0x4805fb(0x174)]-0x1,_0x12addf;_0x308784>=0x0;_0x308784--)(_0x12addf=_0x367cb4[_0x308784])&&(_0x2b0bab=_0x12addf(_0x2b0bab)||_0x2b0bab);return _0x2b0bab;},C=(_0x1a3b1c,_0x46d900)=>(_0x365914,_0x3ababa)=>_0x46d900(_0x365914,_0x3ababa,_0x1a3b1c);function Y(_0x25599,_0x4667a6){const _0x235126=_0x48f676,_0x48a3fe=_0x25599['replies'][0x0];return{..._0x4667a6,'id':_0x48a3fe[_0x235126(0x14b)],'resolved':_0x25599[_0x235126(0x149)]===0x1,'dT':f(_0x48a3fe[_0x235126(0x14c)]),'personId':_0x48a3fe[_0x235126(0x168)],'threadId':_0x48a3fe[_0x235126(0x178)]};}function G(_0x15d58c,_0x1ff346,_0x3c8eed){const _0x174be0=_0x48f676;var _0x3f1df7,_0x308ce7;if(((_0x308ce7=(_0x3f1df7=_0x15d58c==null?void 0x0:_0x15d58c[_0x174be0(0x165)])==null?void 0x0:_0x3f1df7['length'])!=null?_0x308ce7:0x0)>0x0){const _0x1c4fae=(_0x56d4c2,_0x338fac)=>({'id':_0x56d4c2[_0x174be0(0x14b)],'threadId':_0x56d4c2[_0x174be0(0x178)],'dT':f(_0x56d4c2[_0x174be0(0x14c)]),'personId':_0x56d4c2[_0x174be0(0x168)],'resolved':_0x15d58c[_0x174be0(0x149)]===I[_0x174be0(0x169)],'unitId':_0x1ff346,'subUnitId':_0x3c8eed,'text':JSON[_0x174be0(0x136)](_0x56d4c2[_0x174be0(0x126)]),'parentId':_0x338fac}),_0x25e510=_0x1c4fae(_0x15d58c[_0x174be0(0x165)][0x0]);return{..._0x25e510,'children':_0x15d58c[_0x174be0(0x165)][_0x174be0(0x19f)](0x1)[_0x174be0(0x13d)](_0x310c9e=>_0x1c4fae(_0x310c9e,_0x25e510['id']))};}return null;}function _0x2843(_0x2c2223,_0x1c5f89){_0x2c2223=_0x2c2223-0x122;const _0x2d4e2d=_0x2d4e();let _0x284308=_0x2d4e2d[_0x2c2223];return _0x284308;}let p=class{constructor(_0xd8fc92,_0x4ac114,_0x16546b){const _0x4c04cf=_0x48f676;this[_0x4c04cf(0x156)]=_0xd8fc92,this[_0x4c04cf(0x152)]=_0x4ac114,this[_0x4c04cf(0x185)]=_0x16546b;}async['addComment'](_0x2e988b){const _0x2ccb8c=_0x48f676;var _0x40be24,_0x526c58;const {parentId:_0x388a9d,unitId:_0x50b333,text:_0x1bf648,threadId:_0x185feb}=_0x2e988b,_0x4f747e=(_0x526c58=(_0x40be24=_0x1bf648['customRanges'])==null?void 0x0:_0x40be24[_0x2ccb8c(0x12a)](_0x30ff62=>_0x30ff62[_0x2ccb8c(0x163)]===c[_0x2ccb8c(0x193)][_0x2ccb8c(0x19c)])[_0x2ccb8c(0x13d)](_0x29358a=>_0x29358a[_0x2ccb8c(0x16c)]))!=null?_0x526c58:[],_0x470bce=JSON[_0x2ccb8c(0x153)](_0x1bf648),_0x15c9b5=(await this[_0x2ccb8c(0x185)][_0x2ccb8c(0x162)](_0x50b333))[_0x2ccb8c(0x14a)]();if(_0x388a9d){const _0x2e8df5={'memberId':_0x15c9b5,'unitId':_0x50b333,'content':_0x470bce,'mention':_0x4f747e,'threadId':_0x185feb},_0x397d82=(await this[_0x2ccb8c(0x156)]['post'](_0x2ccb8c(0x131)+_0x50b333+_0x2ccb8c(0x144),{'body':_0x2e8df5}))[_0x2ccb8c(0x194)][_0x2ccb8c(0x16e)];return{..._0x2e988b,'id':_0x397d82[_0x2ccb8c(0x14b)],'dT':c[_0x2ccb8c(0x14f)](+_0x397d82[_0x2ccb8c(0x14c)])['format'](_0x2ccb8c(0x195)),'personId':_0x397d82['userId']};}else{const _0x48acfb={'memberId':_0x15c9b5,'unitId':_0x50b333,'content':_0x470bce,'mention':_0x4f747e},_0x440261=await this[_0x2ccb8c(0x156)]['post']('/universer-api/comment/unit/'+_0x50b333+_0x2ccb8c(0x18d),{'body':_0x48acfb});return Y(_0x440261[_0x2ccb8c(0x194)]['comment'],_0x2e988b);}}async['updateComment'](_0x302d81){const _0xe1f260=_0x48f676;var _0x556863,_0x3023eb;const {text:_0x2f8041,unitId:_0x570770}=_0x302d81,_0x4c8027=(_0x3023eb=(_0x556863=_0x2f8041[_0xe1f260(0x1a0)])==null?void 0x0:_0x556863[_0xe1f260(0x12a)](_0x286639=>_0x286639[_0xe1f260(0x163)]===c[_0xe1f260(0x193)]['COMMENT'])[_0xe1f260(0x13d)](_0x4b6cc6=>_0x4b6cc6['rangeId']))!=null?_0x3023eb:[],_0x386eb5=JSON[_0xe1f260(0x153)](_0x2f8041),_0x5c3143=_0x302d81['threadId'],_0x25ec5e=_0x302d81['id'],_0x1d3066={'memberId':(await this[_0xe1f260(0x185)]['requireSession'](_0x570770))[_0xe1f260(0x14a)](),'unitId':_0x570770,'threadId':_0x5c3143,'mention':_0x4c8027,'content':_0x386eb5,'replyId':_0x25ec5e},_0x5e13e3=await this[_0xe1f260(0x156)][_0xe1f260(0x135)](_0xe1f260(0x131)+_0x570770+_0xe1f260(0x19a),{'body':_0x1d3066});return!_0x5e13e3['body'][_0xe1f260(0x123)]||_0x5e13e3[_0xe1f260(0x194)]['error'][_0xe1f260(0x170)]===0x1;}async['resolveComment'](_0x1dc74c){const _0x160f04=_0x48f676,{unitId:_0x3b0466}=_0x1dc74c,_0x1608de=_0x1dc74c['threadId'],_0x2270b6={'memberId':this[_0x160f04(0x152)][_0x160f04(0x164)]()[_0x160f04(0x17b)],'unitId':_0x3b0466,'threadId':_0x1608de,'solved':_0x1dc74c['resolved']?I[_0x160f04(0x169)]:I[_0x160f04(0x172)]},_0x45c45a=await this[_0x160f04(0x156)][_0x160f04(0x135)](_0x160f04(0x131)+_0x3b0466+_0x160f04(0x16a),{'body':_0x2270b6});return!_0x45c45a[_0x160f04(0x194)][_0x160f04(0x123)]||_0x45c45a[_0x160f04(0x194)][_0x160f04(0x123)][_0x160f04(0x170)]===0x1;}async[_0x48f676(0x150)](_0x5b4251,_0x1ba8a9,_0x3e88de,_0x423484){const _0x2e8bef=_0x48f676,_0x88dc13={'memberId':(await this['_sessionService'][_0x2e8bef(0x162)](_0x5b4251))[_0x2e8bef(0x14a)](),'threadId':_0x3e88de,'replyId':_0x423484,'unitId':_0x5b4251},_0x456b5f=await this[_0x2e8bef(0x156)][_0x2e8bef(0x135)](_0x2e8bef(0x131)+_0x5b4251+_0x2e8bef(0x171),{'body':_0x88dc13});return!_0x456b5f[_0x2e8bef(0x194)][_0x2e8bef(0x123)]||_0x456b5f[_0x2e8bef(0x194)][_0x2e8bef(0x123)]['code']===0x1;}async[_0x48f676(0x176)](_0x3404e8,_0x302c29,_0x1c2656){const _0x1d2282=_0x48f676,_0x5d5854={'unitId':_0x3404e8,'threadId':_0x1c2656},_0x5af478=await this[_0x1d2282(0x156)][_0x1d2282(0x135)](_0x1d2282(0x131)+_0x3404e8+_0x1d2282(0x18f),{'body':_0x5d5854}),_0x2f8252=_0x1c2656[_0x1d2282(0x13d)](_0xf54b75=>G(_0x5af478[_0x1d2282(0x194)][_0x1d2282(0x199)][_0xf54b75],_0x3404e8,_0x302c29))['filter'](Boolean);return Object[_0x1d2282(0x14d)](_0x5af478['body']['users'])[_0x1d2282(0x180)](_0x211b33=>{const _0x4f0736=_0x1d2282;this[_0x4f0736(0x152)]['addUser'](_0x211b33);}),_0x2f8252;}[_0x48f676(0x15b)](_0x1f5f35){const _0x5c55da=_0x48f676;return{'id':_0x1f5f35['id'],'threadId':_0x1f5f35[_0x5c55da(0x178)],'ref':_0x1f5f35[_0x5c55da(0x137)]};}};p=x([C(0x0,c[_0x48f676(0x16b)](P[_0x48f676(0x183)])),C(0x1,c['Inject'](c[_0x48f676(0x151)])),C(0x2,c[_0x48f676(0x16b)](b[_0x48f676(0x187)]))],p);var H=Object[_0x48f676(0x1a2)],J=(_0x443d67,_0x4f84ba,_0x27bcce,_0x1cdf36)=>{const _0x4d5c59=_0x48f676;for(var _0x1af5b4=_0x1cdf36>0x1?void 0x0:_0x1cdf36?H(_0x4f84ba,_0x27bcce):_0x4f84ba,_0x31afec=_0x443d67[_0x4d5c59(0x174)]-0x1,_0x10caee;_0x31afec>=0x0;_0x31afec--)(_0x10caee=_0x443d67[_0x31afec])&&(_0x1af5b4=_0x10caee(_0x1af5b4)||_0x1af5b4);return _0x1af5b4;},y=(_0x40c90c,_0x541370)=>(_0x2edfe4,_0x15f0cf)=>_0x541370(_0x2edfe4,_0x15f0cf,_0x40c90c);let g=class extends c[_0x48f676(0x17e)]{constructor(_0x258d53,_0x5aa99b){const _0x1ee32d=_0x48f676;super(),this[_0x1ee32d(0x181)]=_0x258d53,this['_threadCommentDataSource']=_0x5aa99b,this[_0x1ee32d(0x179)]();}['_initDataSource'](){const _0x979689=_0x48f676;this['_threadCommentDataSourceService']['dataSource']=this[_0x979689(0x155)],this[_0x979689(0x181)][_0x979689(0x184)]=!0x1;}};g=J([y(0x0,M[_0x48f676(0x129)]),y(0x1,c[_0x48f676(0x16b)](p))],g);var F=Object[_0x48f676(0x154)],L=Object['getOwnPropertyDescriptor'],Z=(_0x46b85b,_0x2ae2ec,_0x20e74b)=>_0x2ae2ec in _0x46b85b?F(_0x46b85b,_0x2ae2ec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x20e74b}):_0x46b85b[_0x2ae2ec]=_0x20e74b,W=(_0x157a9d,_0x5debcf,_0x4576f5,_0x533d80)=>{for(var _0x2884b1=_0x533d80>0x1?void 0x0:_0x533d80?L(_0x5debcf,_0x4576f5):_0x5debcf,_0x3b4f87=_0x157a9d['length']-0x1,_0xcf8210;_0x3b4f87>=0x0;_0x3b4f87--)(_0xcf8210=_0x157a9d[_0x3b4f87])&&(_0x2884b1=_0xcf8210(_0x2884b1)||_0x2884b1);return _0x2884b1;},O=(_0x26e5c0,_0x2ecd2d)=>(_0x2624fe,_0x39ea6a)=>_0x2ecd2d(_0x2624fe,_0x39ea6a,_0x26e5c0),N=(_0x1dc7a7,_0x45d61d,_0x341225)=>Z(_0x1dc7a7,typeof _0x45d61d!=_0x48f676(0x16f)?_0x45d61d+'':_0x45d61d,_0x341225);exports[_0x48f676(0x134)]=class extends c[_0x48f676(0x177)]{constructor(_0x5034a2=D,_0x4f3159,_0x5de601){const _0x4d0fce=_0x48f676;super(),this['_config']=_0x5034a2,this[_0x4d0fce(0x19d)]=_0x4f3159,this[_0x4d0fce(0x12c)]=_0x5de601;const {..._0x438a81}=c[_0x4d0fce(0x18e)]({},D,this[_0x4d0fce(0x15a)]);this[_0x4d0fce(0x12c)][_0x4d0fce(0x13f)](q,_0x438a81);}[_0x48f676(0x130)](){const _0x5bc755=_0x48f676;[[p],[g],[_]][_0x5bc755(0x180)](_0x518bcf=>{const _0x4a8b88=_0x5bc755;this[_0x4a8b88(0x19d)][_0x4a8b88(0x15e)](_0x518bcf);});}[_0x48f676(0x19b)](){const _0x1e2ba8=_0x48f676;this[_0x1e2ba8(0x19d)][_0x1e2ba8(0x167)](g),this[_0x1e2ba8(0x19d)]['get'](_);}},N(exports[_0x48f676(0x134)],_0x48f676(0x19e),U),N(exports[_0x48f676(0x134)],'type',c['UniverInstanceType'][_0x48f676(0x15d)]),exports[_0x48f676(0x134)]=W([c[_0x48f676(0x13b)](w[_0x48f676(0x157)],b[_0x48f676(0x14e)],T[_0x48f676(0x15f)]),O(0x1,c[_0x48f676(0x16b)](c[_0x48f676(0x128)])),O(0x2,c[_0x48f676(0x17a)])],exports[_0x48f676(0x134)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1b503f=_0x53d2;(function(_0x5ecad4,_0x1ce279){const _0x4e49bf=_0x53d2,_0x29d002=_0x5ecad4();while(!![]){try{const _0x37fd48=-parseInt(_0x4e49bf(0x23b))/0x1+parseInt(_0x4e49bf(0x21b))/0x2+parseInt(_0x4e49bf(0x1ee))/0x3+parseInt(_0x4e49bf(0x226))/0x4*(-parseInt(_0x4e49bf(0x206))/0x5)+-parseInt(_0x4e49bf(0x223))/0x6+parseInt(_0x4e49bf(0x22d))/0x7*(-parseInt(_0x4e49bf(0x1eb))/0x8)+-parseInt(_0x4e49bf(0x1f0))/0x9*(-parseInt(_0x4e49bf(0x228))/0xa);if(_0x37fd48===_0x1ce279)break;else _0x29d002['push'](_0x29d002['shift']());}catch(_0x36ac3f){_0x29d002['push'](_0x29d002['shift']());}}}(_0x5491,0x3fd84));import{CommentService as _0x177479,CollaborationSessionService as _0x5d29c3,UniverCollaborationClientPlugin as _0x4ac8a8}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x54b9da}from'@univerjs-pro/license';import{dayjs as _0x5b328b,UserManagerService as _0x27b619,Inject as _0xe56929,Injector as _0x323c4c,Disposable as _0x496c11,CustomRangeType as _0x1a50f9,UniverInstanceType as _0x4ce168,DependentOn as _0x422474,IConfigService as _0x3cb82c,Plugin as _0x55d139,merge as _0xd65155}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x181ffd}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x34daab,IThreadCommentDataSourceService as _0x51dd11}from'@univerjs/thread-comment';import{bufferTime as _0x487d8e}from'rxjs';function _0x5491(){const _0x3cc461=['solved','35NuGFLm','getComment','map','slice','_httpService','/add','userID','_userService','Unknown','_config','Add','_configService','values','stringify','516782dtHjKf','userId','Solve','_injector','dataSource','body','error','delete','rangeType','replyId','resolved','length','_commentService','_threadCommentModel','/edit','185608fqMmaa','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','119997Jlgsit','size','12303CqawDH','deleteComment','commentUpdate$','requireSession','disposeWithMe','UNRECOGNIZED','resolveComment','onReady','updateComment','type','get','Solved','_threadCommentDataSourceService','symbol','root','find','_initUserSync','OpenOrReOpen','getOwnPropertyDescriptor','syncUpdateMutationToColla','ref','/reply','2311115sPwUbB','_init','rangeId','comments','add','code','_initDataSource','forEach','threadId','content','thread-comment-data-source.config','getUser','setConfig','user','replies','comment','Edit','parentId','Reply','Delete','createTimestamp','919058sOfUAk','addComment','format','onStarting','post','addUser','reply','getMemberID','2182446wvnrOQ','_threadCommentDataSource','/universer-api/comment/unit/','4OqzOCN','_sessionService','8930viHjRA','customRanges','/solved','parse'];_0x5491=function(){return _0x3cc461;};return _0x5491();}import{HTTPService as _0x4b3a69}from'@univerjs/network';const W=_0x1b503f(0x1ed);var I=(_0xf2fff0=>(_0xf2fff0[_0xf2fff0[_0x1b503f(0x201)]=0x0]=_0x1b503f(0x201),_0xf2fff0[_0xf2fff0[_0x1b503f(0x1fb)]=0x1]=_0x1b503f(0x1fb),_0xf2fff0[_0xf2fff0[_0x1b503f(0x1f5)]=-0x1]=_0x1b503f(0x1f5),_0xf2fff0))(I||{}),v=(_0x37b9a2=>(_0x37b9a2[_0x37b9a2[_0x1b503f(0x235)]=0x0]=_0x1b503f(0x235),_0x37b9a2[_0x37b9a2[_0x1b503f(0x237)]=0x1]=_0x1b503f(0x237),_0x37b9a2[_0x37b9a2[_0x1b503f(0x218)]=0x2]=_0x1b503f(0x218),_0x37b9a2[_0x37b9a2[_0x1b503f(0x216)]=0x3]=_0x1b503f(0x216),_0x37b9a2[_0x37b9a2[_0x1b503f(0x219)]=0x4]='Delete',_0x37b9a2[_0x37b9a2[_0x1b503f(0x23d)]=0x5]='Solve',_0x37b9a2[_0x37b9a2[_0x1b503f(0x1f5)]=-0x1]=_0x1b503f(0x1f5),_0x37b9a2))(v||{});const y=_0x1c2e89=>_0x5b328b(new Date(+_0x1c2e89))[_0x1b503f(0x21d)]('YYYY/MM/DD\x20HH:mm'),B=async(_0xc81d1c,_0x561816)=>{const _0x3a5f86=_0x1b503f,_0x2a6bcb=_0xc81d1c['get'](_0x27b619),_0x36d59e=_0xc81d1c['get'](_0x4b3a69);_0x561816[_0x3a5f86(0x20d)](_0xb2e873=>{const _0x3a3acb=_0x3a5f86;_0x2a6bcb[_0x3a3acb(0x211)](_0xb2e873)&&_0x561816[_0x3a3acb(0x1e3)](_0xb2e873);}),_0x561816[_0x3a5f86(0x1ef)]&&(await _0x36d59e[_0x3a5f86(0x1fa)]('/universer-api/user/list',{'params':{'userIDs':[..._0x561816]}}))['body'][_0x3a5f86(0x1ec)][_0x3a5f86(0x20d)](_0x43e85f=>{const _0x415732=_0x3a5f86;_0x43e85f&&_0x2a6bcb[_0x415732(0x220)](_0x43e85f);});};var K=Object[_0x1b503f(0x202)],V=(_0x387c97,_0x5c32d4,_0x428338,_0x5f41b7)=>{for(var _0xf0b265=_0x5f41b7>0x1?void 0x0:_0x5f41b7?K(_0x5c32d4,_0x428338):_0x5c32d4,_0x1395d6=_0x387c97['length']-0x1,_0x1bb40a;_0x1395d6>=0x0;_0x1395d6--)(_0x1bb40a=_0x387c97[_0x1395d6])&&(_0xf0b265=_0x1bb40a(_0xf0b265)||_0xf0b265);return _0xf0b265;},p=(_0x2fc504,_0x5c1669)=>(_0x2e4e18,_0x5f1862)=>_0x5c1669(_0x2e4e18,_0x5f1862,_0x2fc504);let _=class extends _0x496c11{constructor(_0x14c945,_0x1836d1,_0x3ec5a8,_0x27aa08){const _0x4f27a5=_0x1b503f;super(),this[_0x4f27a5(0x1e8)]=_0x14c945,this[_0x4f27a5(0x1e9)]=_0x1836d1,this['_userService']=_0x3ec5a8,this[_0x4f27a5(0x23e)]=_0x27aa08,this[_0x4f27a5(0x207)](),this[_0x4f27a5(0x200)]();}['_initUserSync'](){const _0x4cb21d=_0x1b503f;this[_0x4cb21d(0x1f4)](this[_0x4cb21d(0x1e9)][_0x4cb21d(0x1f2)]['pipe'](_0x487d8e(0x10))['subscribe'](_0x33590f=>{const _0x3e36e9=_0x4cb21d,_0x5b166c=new Set();_0x33590f[_0x3e36e9(0x20d)](_0x37ba4c=>{const _0x1133f2=_0x3e36e9;switch(_0x37ba4c[_0x1133f2(0x1f9)]){case _0x1133f2(0x20a):{const _0x330e8d=_0x37ba4c['payload']['personId'];_0x5b166c[_0x1133f2(0x20a)](_0x330e8d);break;}}}),B(this['_injector'],_0x5b166c);}));}[_0x1b503f(0x207)](){const _0x20b5b2=_0x1b503f;this['disposeWithMe'](this[_0x20b5b2(0x1e8)][_0x20b5b2(0x1f2)]['subscribe'](async _0x16eda5=>{const _0x56ef1b=_0x20b5b2;var _0x458bf3,_0xd96ddd,_0x4f9b16,_0x3ed873;const _0xb15ac0=(_0x458bf3=this[_0x56ef1b(0x1e9)]['getUnit'](_0x16eda5['unitId'])[_0x56ef1b(0x1ff)](_0x2752bb=>_0x2752bb['threadId']===_0x16eda5['threadId']))==null?void 0x0:_0x458bf3['root'];if(!_0xb15ac0)return;const {unitId:_0x23a6ff,subUnitId:_0x153a0a}=_0xb15ac0;switch(_0x16eda5[_0x56ef1b(0x213)]&&this[_0x56ef1b(0x234)][_0x56ef1b(0x220)](_0x16eda5[_0x56ef1b(0x213)]),_0x16eda5[_0x56ef1b(0x1f9)]){case v[_0x56ef1b(0x237)]:break;case v[_0x56ef1b(0x218)]:{this['_threadCommentModel'][_0x56ef1b(0x21c)](_0x23a6ff,_0x153a0a,{'unitId':_0x23a6ff,'subUnitId':_0x153a0a,'ref':'','id':_0x16eda5[_0x56ef1b(0x1e5)],'dT':y(+_0x16eda5[_0x56ef1b(0x21a)]),'threadId':_0x16eda5[_0x56ef1b(0x20e)],'personId':(_0x4f9b16=(_0xd96ddd=_0x16eda5['user'])==null?void 0x0:_0xd96ddd[_0x56ef1b(0x233)])!=null?_0x4f9b16:_0x16eda5[_0x56ef1b(0x23c)],'text':JSON[_0x56ef1b(0x22b)](_0x16eda5[_0x56ef1b(0x20f)]),'parentId':_0xb15ac0['id']});break;}case v[_0x56ef1b(0x219)]:{const _0x5eb921=this[_0x56ef1b(0x1e9)][_0x56ef1b(0x22e)](_0x23a6ff,_0x153a0a,_0x16eda5[_0x56ef1b(0x1e5)]);_0x5eb921&&_0x5eb921[_0x56ef1b(0x217)]&&this[_0x56ef1b(0x1e9)][_0x56ef1b(0x1f1)](_0x23a6ff,_0x153a0a,_0x16eda5[_0x56ef1b(0x1e5)]);break;}case v[_0x56ef1b(0x216)]:{this[_0x56ef1b(0x1e9)][_0x56ef1b(0x1f8)](_0x23a6ff,_0x153a0a,{'commentId':_0x16eda5[_0x56ef1b(0x1e5)],'text':JSON[_0x56ef1b(0x22b)](_0x16eda5[_0x56ef1b(0x20f)])});break;}case v[_0x56ef1b(0x23d)]:{const _0x3a9c54=(_0x3ed873=this[_0x56ef1b(0x1e9)]['getUnit'](_0x16eda5['unitId'])[_0x56ef1b(0x1ff)](_0x55c33d=>_0x55c33d[_0x56ef1b(0x20e)]===_0x16eda5[_0x56ef1b(0x20e)]))==null?void 0x0:_0x3ed873[_0x56ef1b(0x1fe)];_0x3a9c54&&this['_threadCommentModel'][_0x56ef1b(0x1f6)](_0x23a6ff,_0x153a0a,_0x3a9c54['id'],_0x16eda5['solved']===I[_0x56ef1b(0x1fb)]);break;}}}));}};_=V([p(0x0,_0xe56929(_0x177479)),p(0x1,_0xe56929(_0x34daab)),p(0x2,_0xe56929(_0x27b619)),p(0x3,_0xe56929(_0x323c4c))],_);const z=_0x1b503f(0x210),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1f24c0,_0xf3bd,_0x28f0f0,_0x2e75bb)=>{const _0xb8a12a=_0x1b503f;for(var _0x48e1eb=_0x2e75bb>0x1?void 0x0:_0x2e75bb?k(_0xf3bd,_0x28f0f0):_0xf3bd,_0x515e7d=_0x1f24c0[_0xb8a12a(0x1e7)]-0x1,_0x3ddbfb;_0x515e7d>=0x0;_0x515e7d--)(_0x3ddbfb=_0x1f24c0[_0x515e7d])&&(_0x48e1eb=_0x3ddbfb(_0x48e1eb)||_0x48e1eb);return _0x48e1eb;},b=(_0x342fff,_0x44dcd2)=>(_0xd804f3,_0x3c2e2b)=>_0x44dcd2(_0xd804f3,_0x3c2e2b,_0x342fff);function X(_0x480133,_0x29c503){const _0x525730=_0x1b503f,_0x5464c1=_0x480133[_0x525730(0x214)][0x0];return{..._0x29c503,'id':_0x5464c1['replyId'],'resolved':_0x480133[_0x525730(0x22c)]===0x1,'dT':y(_0x5464c1['createTimestamp']),'personId':_0x5464c1[_0x525730(0x23c)],'threadId':_0x5464c1[_0x525730(0x20e)]};}function ee(_0x409c40,_0x206ede,_0x172d6b){const _0x3ddf74=_0x1b503f;var _0x53b8bd,_0x5f5593;if(((_0x5f5593=(_0x53b8bd=_0x409c40==null?void 0x0:_0x409c40[_0x3ddf74(0x214)])==null?void 0x0:_0x53b8bd['length'])!=null?_0x5f5593:0x0)>0x0){const _0x18da36=(_0x12305d,_0x343833)=>({'id':_0x12305d['replyId'],'threadId':_0x12305d[_0x3ddf74(0x20e)],'dT':y(_0x12305d[_0x3ddf74(0x21a)]),'personId':_0x12305d[_0x3ddf74(0x23c)],'resolved':_0x409c40[_0x3ddf74(0x22c)]===I[_0x3ddf74(0x1fb)],'unitId':_0x206ede,'subUnitId':_0x172d6b,'text':JSON[_0x3ddf74(0x22b)](_0x12305d['content']),'parentId':_0x343833}),_0x16582e=_0x18da36(_0x409c40[_0x3ddf74(0x214)][0x0]);return{..._0x16582e,'children':_0x409c40['replies'][_0x3ddf74(0x230)](0x1)[_0x3ddf74(0x22f)](_0x498e08=>_0x18da36(_0x498e08,_0x16582e['id']))};}return null;}function _0x53d2(_0x2f8f1d,_0x3438e8){_0x2f8f1d=_0x2f8f1d-0x1e0;const _0x5491da=_0x5491();let _0x53d231=_0x5491da[_0x2f8f1d];return _0x53d231;}let S=class{constructor(_0x208ca2,_0xb7c40e,_0x2b4bcd){const _0x31a10c=_0x1b503f;this[_0x31a10c(0x231)]=_0x208ca2,this['_userService']=_0xb7c40e,this['_sessionService']=_0x2b4bcd;}async[_0x1b503f(0x21c)](_0x3a8e1e){const _0x387822=_0x1b503f;var _0x9a661d,_0x13e52b;const {parentId:_0x27a3df,unitId:_0x142237,text:_0xc8886c,threadId:_0x269136}=_0x3a8e1e,_0xd3b4d=(_0x13e52b=(_0x9a661d=_0xc8886c[_0x387822(0x229)])==null?void 0x0:_0x9a661d['filter'](_0x2f7eb3=>_0x2f7eb3[_0x387822(0x1e4)]===_0x1a50f9['COMMENT'])[_0x387822(0x22f)](_0x1c1b48=>_0x1c1b48[_0x387822(0x208)]))!=null?_0x13e52b:[],_0x49d2d5=JSON[_0x387822(0x23a)](_0xc8886c),_0x300ebf=(await this[_0x387822(0x227)][_0x387822(0x1f3)](_0x142237))[_0x387822(0x222)]();if(_0x27a3df){const _0x3167b1={'memberId':_0x300ebf,'unitId':_0x142237,'content':_0x49d2d5,'mention':_0xd3b4d,'threadId':_0x269136},_0x1b0851=(await this[_0x387822(0x231)][_0x387822(0x21f)](_0x387822(0x225)+_0x142237+_0x387822(0x205),{'body':_0x3167b1}))[_0x387822(0x1e1)][_0x387822(0x221)];return{..._0x3a8e1e,'id':_0x1b0851['replyId'],'dT':_0x5b328b(+_0x1b0851[_0x387822(0x21a)])[_0x387822(0x21d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1b0851[_0x387822(0x23c)]};}else{const _0x35be21={'memberId':_0x300ebf,'unitId':_0x142237,'content':_0x49d2d5,'mention':_0xd3b4d},_0x15fbab=await this[_0x387822(0x231)][_0x387822(0x21f)](_0x387822(0x225)+_0x142237+_0x387822(0x232),{'body':_0x35be21});return X(_0x15fbab['body'][_0x387822(0x215)],_0x3a8e1e);}}async['updateComment'](_0x260b35){const _0x5bf4f1=_0x1b503f;var _0x48ba6d,_0x2c4f10;const {text:_0x3e7bb0,unitId:_0x247ca6}=_0x260b35,_0xa1342a=(_0x2c4f10=(_0x48ba6d=_0x3e7bb0[_0x5bf4f1(0x229)])==null?void 0x0:_0x48ba6d['filter'](_0x308644=>_0x308644['rangeType']===_0x1a50f9['COMMENT'])[_0x5bf4f1(0x22f)](_0x20dca1=>_0x20dca1[_0x5bf4f1(0x208)]))!=null?_0x2c4f10:[],_0x45370b=JSON[_0x5bf4f1(0x23a)](_0x3e7bb0),_0x4be793=_0x260b35[_0x5bf4f1(0x20e)],_0x2a397e=_0x260b35['id'],_0x146dfa={'memberId':(await this[_0x5bf4f1(0x227)][_0x5bf4f1(0x1f3)](_0x247ca6))[_0x5bf4f1(0x222)](),'unitId':_0x247ca6,'threadId':_0x4be793,'mention':_0xa1342a,'content':_0x45370b,'replyId':_0x2a397e},_0xc37f2c=await this['_httpService'][_0x5bf4f1(0x21f)](_0x5bf4f1(0x225)+_0x247ca6+_0x5bf4f1(0x1ea),{'body':_0x146dfa});return!_0xc37f2c[_0x5bf4f1(0x1e1)]['error']||_0xc37f2c[_0x5bf4f1(0x1e1)][_0x5bf4f1(0x1e2)][_0x5bf4f1(0x20b)]===0x1;}async[_0x1b503f(0x1f6)](_0x32dd47){const _0x2e6f93=_0x1b503f,{unitId:_0xe790bb}=_0x32dd47,_0x28583f=_0x32dd47['threadId'],_0x4a030b={'memberId':this[_0x2e6f93(0x234)]['getCurrentUser']()[_0x2e6f93(0x233)],'unitId':_0xe790bb,'threadId':_0x28583f,'solved':_0x32dd47[_0x2e6f93(0x1e6)]?I['Solved']:I[_0x2e6f93(0x201)]},_0x16ef5a=await this[_0x2e6f93(0x231)][_0x2e6f93(0x21f)](_0x2e6f93(0x225)+_0xe790bb+_0x2e6f93(0x22a),{'body':_0x4a030b});return!_0x16ef5a[_0x2e6f93(0x1e1)][_0x2e6f93(0x1e2)]||_0x16ef5a[_0x2e6f93(0x1e1)][_0x2e6f93(0x1e2)][_0x2e6f93(0x20b)]===0x1;}async[_0x1b503f(0x1f1)](_0x162970,_0x2917ac,_0x44e83f,_0x49a38c){const _0x18cacb=_0x1b503f,_0x277b2c={'memberId':(await this[_0x18cacb(0x227)]['requireSession'](_0x162970))[_0x18cacb(0x222)](),'threadId':_0x44e83f,'replyId':_0x49a38c,'unitId':_0x162970},_0x54a4a7=await this[_0x18cacb(0x231)][_0x18cacb(0x21f)](_0x18cacb(0x225)+_0x162970+'/delete',{'body':_0x277b2c});return!_0x54a4a7[_0x18cacb(0x1e1)][_0x18cacb(0x1e2)]||_0x54a4a7['body'][_0x18cacb(0x1e2)][_0x18cacb(0x20b)]===0x1;}async['listComments'](_0xc26da1,_0x353bf2,_0x1474c8){const _0x368d91=_0x1b503f,_0x508603={'unitId':_0xc26da1,'threadId':_0x1474c8},_0x2160e7=await this['_httpService'][_0x368d91(0x21f)](_0x368d91(0x225)+_0xc26da1+'/list',{'body':_0x508603}),_0x171654=_0x1474c8[_0x368d91(0x22f)](_0x5d3b17=>ee(_0x2160e7[_0x368d91(0x1e1)][_0x368d91(0x209)][_0x5d3b17],_0xc26da1,_0x353bf2))['filter'](Boolean);return Object[_0x368d91(0x239)](_0x2160e7[_0x368d91(0x1e1)][_0x368d91(0x1ec)])['forEach'](_0x26e897=>{const _0x55d431=_0x368d91;this['_userService'][_0x55d431(0x220)](_0x26e897);}),_0x171654;}['saveCommentToSnapshot'](_0x31fc68){const _0x323f5d=_0x1b503f;return{'id':_0x31fc68['id'],'threadId':_0x31fc68[_0x323f5d(0x20e)],'ref':_0x31fc68[_0x323f5d(0x204)]};}};S=Q([b(0x0,_0xe56929(_0x4b3a69)),b(0x1,_0xe56929(_0x27b619)),b(0x2,_0xe56929(_0x5d29c3))],S);var re=Object[_0x1b503f(0x202)],te=(_0x31308c,_0x519ab1,_0x1537c5,_0x488aae)=>{const _0x23851c=_0x1b503f;for(var _0x9a3f9e=_0x488aae>0x1?void 0x0:_0x488aae?re(_0x519ab1,_0x1537c5):_0x519ab1,_0x5022eb=_0x31308c[_0x23851c(0x1e7)]-0x1,_0x51df2c;_0x5022eb>=0x0;_0x5022eb--)(_0x51df2c=_0x31308c[_0x5022eb])&&(_0x9a3f9e=_0x51df2c(_0x9a3f9e)||_0x9a3f9e);return _0x9a3f9e;},M=(_0x47f1ee,_0x349640)=>(_0x4c5a6a,_0x287107)=>_0x349640(_0x4c5a6a,_0x287107,_0x47f1ee);let f=class extends _0x496c11{constructor(_0x1641f1,_0x3b57a5){const _0x57bb5d=_0x1b503f;super(),this[_0x57bb5d(0x1fc)]=_0x1641f1,this[_0x57bb5d(0x224)]=_0x3b57a5,this[_0x57bb5d(0x20c)]();}[_0x1b503f(0x20c)](){const _0x3ad9e5=_0x1b503f;this[_0x3ad9e5(0x1fc)][_0x3ad9e5(0x1e0)]=this[_0x3ad9e5(0x224)],this[_0x3ad9e5(0x1fc)][_0x3ad9e5(0x203)]=!0x1;}};f=te([M(0x0,_0x51dd11),M(0x1,_0xe56929(S))],f);var se=Object['defineProperty'],oe=Object[_0x1b503f(0x202)],ne=(_0x1d8a02,_0x18bf9c,_0x4def72)=>_0x18bf9c in _0x1d8a02?se(_0x1d8a02,_0x18bf9c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4def72}):_0x1d8a02[_0x18bf9c]=_0x4def72,ie=(_0x5a19ac,_0x2db807,_0x5a85c7,_0x3253ec)=>{const _0x570c8=_0x1b503f;for(var _0x470026=_0x3253ec>0x1?void 0x0:_0x3253ec?oe(_0x2db807,_0x5a85c7):_0x2db807,_0x367189=_0x5a19ac[_0x570c8(0x1e7)]-0x1,_0x4e6bb1;_0x367189>=0x0;_0x367189--)(_0x4e6bb1=_0x5a19ac[_0x367189])&&(_0x470026=_0x4e6bb1(_0x470026)||_0x470026);return _0x470026;},N=(_0x5e90f2,_0x9bac7)=>(_0x5c2926,_0x28cdbd)=>_0x9bac7(_0x5c2926,_0x28cdbd,_0x5e90f2),$=(_0x3800b3,_0x502271,_0x56d1c4)=>ne(_0x3800b3,typeof _0x502271!=_0x1b503f(0x1fd)?_0x502271+'':_0x502271,_0x56d1c4);let g=class extends _0x55d139{constructor(_0x7eeebc=O,_0xf478b9,_0x2abb97){const _0x11c674=_0x1b503f;super(),this[_0x11c674(0x236)]=_0x7eeebc,this[_0x11c674(0x23e)]=_0xf478b9,this[_0x11c674(0x238)]=_0x2abb97;const {..._0x2a40dc}=_0xd65155({},O,this[_0x11c674(0x236)]);this[_0x11c674(0x238)][_0x11c674(0x212)](z,_0x2a40dc);}[_0x1b503f(0x21e)](){[[S],[f],[_]]['forEach'](_0x38d0ce=>{const _0x38b66d=_0x53d2;this[_0x38b66d(0x23e)][_0x38b66d(0x20a)](_0x38d0ce);});}[_0x1b503f(0x1f7)](){const _0x53289e=_0x1b503f;this[_0x53289e(0x23e)][_0x53289e(0x1fa)](f),this[_0x53289e(0x23e)][_0x53289e(0x1fa)](_);}};$(g,'pluginName',W),$(g,_0x1b503f(0x1f9),_0x4ce168['UNIVER_UNKNOWN']),g=ie([_0x422474(_0x181ffd,_0x4ac8a8,_0x54b9da),N(0x1,_0xe56929(_0x323c4c)),N(0x2,_0x3cb82c)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4fb932=_0x3851;(function(_0xc1e752,_0x44c97f){const _0x196dcc=_0x3851,_0x2198d9=_0xc1e752();while(!![]){try{const _0x1054ab=parseInt(_0x196dcc(0xcd))/0x1*(parseInt(_0x196dcc(0x88))/0x2)+-parseInt(_0x196dcc(0x8a))/0x3+-parseInt(_0x196dcc(0x90))/0x4*(parseInt(_0x196dcc(0xa9))/0x5)+parseInt(_0x196dcc(0xbf))/0x6+parseInt(_0x196dcc(0xc1))/0x7*(parseInt(_0x196dcc(0x86))/0x8)+-parseInt(_0x196dcc(0x97))/0x9*(parseInt(_0x196dcc(0xd2))/0xa)+parseInt(_0x196dcc(0xa8))/0xb*(parseInt(_0x196dcc(0x91))/0xc);if(_0x1054ab===_0x44c97f)break;else _0x2198d9['push'](_0x2198d9['shift']());}catch(_0x41f3e0){_0x2198d9['push'](_0x2198d9['shift']());}}}(_0x5bc4,0x2d923));import{CommentService as _0x3e5339,CollaborationSessionService as _0x153124,UniverCollaborationClientPlugin as _0x302632}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x21485d}from'@univerjs-pro/license';import{dayjs as _0x67181a,UserManagerService as _0x653602,Inject as _0x128bec,Injector as _0x4f226c,Disposable as _0x224507,CustomRangeType as _0x42ea01,UniverInstanceType as _0x49b985,DependentOn as _0x3d8f7e,IConfigService as _0x1d7854,Plugin as _0x58a3f6,merge as _0x348f8b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x95a849}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa6c183,IThreadCommentDataSourceService as _0x40cc3e}from'@univerjs/thread-comment';import{bufferTime as _0x152de6}from'rxjs';import{HTTPService as _0x29ca6e}from'@univerjs/network';const W=_0x4fb932(0xa5);var I=(_0x2f41c9=>(_0x2f41c9[_0x2f41c9[_0x4fb932(0x8e)]=0x0]=_0x4fb932(0x8e),_0x2f41c9[_0x2f41c9[_0x4fb932(0xde)]=0x1]='Solved',_0x2f41c9[_0x2f41c9[_0x4fb932(0xa2)]=-0x1]=_0x4fb932(0xa2),_0x2f41c9))(I||{}),v=(_0x3c6094=>(_0x3c6094[_0x3c6094[_0x4fb932(0x98)]=0x0]=_0x4fb932(0x98),_0x3c6094[_0x3c6094[_0x4fb932(0xce)]=0x1]='Add',_0x3c6094[_0x3c6094[_0x4fb932(0xca)]=0x2]=_0x4fb932(0xca),_0x3c6094[_0x3c6094[_0x4fb932(0xc3)]=0x3]='Edit',_0x3c6094[_0x3c6094[_0x4fb932(0x9c)]=0x4]='Delete',_0x3c6094[_0x3c6094[_0x4fb932(0xe4)]=0x5]='Solve',_0x3c6094[_0x3c6094['UNRECOGNIZED']=-0x1]=_0x4fb932(0xa2),_0x3c6094))(v||{});const y=_0x5e27f4=>_0x67181a(new Date(+_0x5e27f4))[_0x4fb932(0xc2)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x38ae86,_0x47839d)=>{const _0x275b16=_0x4fb932,_0x261f27=_0x38ae86[_0x275b16(0xbd)](_0x653602),_0x3ffd14=_0x38ae86[_0x275b16(0xbd)](_0x29ca6e);_0x47839d['forEach'](_0x3930a3=>{const _0x4b461c=_0x275b16;_0x261f27[_0x4b461c(0x8d)](_0x3930a3)&&_0x47839d[_0x4b461c(0xb8)](_0x3930a3);}),_0x47839d[_0x275b16(0xcc)]&&(await _0x3ffd14[_0x275b16(0xbd)](_0x275b16(0x96),{'params':{'userIDs':[..._0x47839d]}}))[_0x275b16(0xad)][_0x275b16(0xab)][_0x275b16(0x95)](_0x5be515=>{const _0x534620=_0x275b16;_0x5be515&&_0x261f27[_0x534620(0xe5)](_0x5be515);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x4f5a1e,_0x6e51c9,_0x549c61,_0x1ebac5)=>{for(var _0x3aea04=_0x1ebac5>0x1?void 0x0:_0x1ebac5?K(_0x6e51c9,_0x549c61):_0x6e51c9,_0x6b4c92=_0x4f5a1e['length']-0x1,_0x311cbd;_0x6b4c92>=0x0;_0x6b4c92--)(_0x311cbd=_0x4f5a1e[_0x6b4c92])&&(_0x3aea04=_0x311cbd(_0x3aea04)||_0x3aea04);return _0x3aea04;},p=(_0x1430d3,_0x4eac93)=>(_0x1ef89c,_0x3e8da3)=>_0x4eac93(_0x1ef89c,_0x3e8da3,_0x1430d3);let _=class extends _0x224507{constructor(_0x36c26f,_0x1e2605,_0x24b3db,_0x1990a9){const _0x381b33=_0x4fb932;super(),this['_commentService']=_0x36c26f,this[_0x381b33(0xa6)]=_0x1e2605,this['_userService']=_0x24b3db,this[_0x381b33(0xc5)]=_0x1990a9,this[_0x381b33(0xaf)](),this[_0x381b33(0xc9)]();}[_0x4fb932(0xc9)](){const _0x3e4c2f=_0x4fb932;this['disposeWithMe'](this[_0x3e4c2f(0xa6)]['commentUpdate$'][_0x3e4c2f(0xb9)](_0x152de6(0x10))['subscribe'](_0x303df7=>{const _0x213c4a=_0x3e4c2f,_0x3c06b9=new Set();_0x303df7[_0x213c4a(0x95)](_0xacd6f6=>{const _0x45ffa7=_0x213c4a;switch(_0xacd6f6[_0x45ffa7(0x8b)]){case _0x45ffa7(0xd3):{const _0x154b1b=_0xacd6f6[_0x45ffa7(0xe6)]['personId'];_0x3c06b9[_0x45ffa7(0xd3)](_0x154b1b);break;}}}),B(this[_0x213c4a(0xc5)],_0x3c06b9);}));}[_0x4fb932(0xaf)](){const _0x56913d=_0x4fb932;this[_0x56913d(0x85)](this[_0x56913d(0xc4)]['commentUpdate$'][_0x56913d(0xcb)](async _0x329b88=>{const _0x17084d=_0x56913d;var _0x5dd0db,_0x228fd9,_0x5759b1,_0x5ace2f;const _0x2c53b2=(_0x5dd0db=this[_0x17084d(0xa6)][_0x17084d(0xdb)](_0x329b88[_0x17084d(0xa1)])[_0x17084d(0xe1)](_0x21cd62=>_0x21cd62[_0x17084d(0xb4)]===_0x329b88[_0x17084d(0xb4)]))==null?void 0x0:_0x5dd0db[_0x17084d(0xa3)];if(!_0x2c53b2)return;const {unitId:_0x3f8026,subUnitId:_0xffb399}=_0x2c53b2;switch(_0x329b88[_0x17084d(0xa7)]&&this['_userService'][_0x17084d(0xe5)](_0x329b88[_0x17084d(0xa7)]),_0x329b88['type']){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0x17084d(0x9b)](_0x3f8026,_0xffb399,{'unitId':_0x3f8026,'subUnitId':_0xffb399,'ref':'','id':_0x329b88[_0x17084d(0xd1)],'dT':y(+_0x329b88[_0x17084d(0x8c)]),'threadId':_0x329b88[_0x17084d(0xb4)],'personId':(_0x5759b1=(_0x228fd9=_0x329b88[_0x17084d(0xa7)])==null?void 0x0:_0x228fd9[_0x17084d(0x99)])!=null?_0x5759b1:_0x329b88['userId'],'text':JSON[_0x17084d(0x8f)](_0x329b88['content']),'parentId':_0x2c53b2['id']});break;}case v['Delete']:{const _0x591a73=this[_0x17084d(0xa6)][_0x17084d(0xaa)](_0x3f8026,_0xffb399,_0x329b88[_0x17084d(0xd1)]);_0x591a73&&_0x591a73[_0x17084d(0xe0)]&&this[_0x17084d(0xa6)]['deleteComment'](_0x3f8026,_0xffb399,_0x329b88[_0x17084d(0xd1)]);break;}case v[_0x17084d(0xc3)]:{this[_0x17084d(0xa6)]['updateComment'](_0x3f8026,_0xffb399,{'commentId':_0x329b88['replyId'],'text':JSON['parse'](_0x329b88['content'])});break;}case v[_0x17084d(0xe4)]:{const _0x96ec5e=(_0x5ace2f=this[_0x17084d(0xa6)][_0x17084d(0xdb)](_0x329b88[_0x17084d(0xa1)])[_0x17084d(0xe1)](_0x4913db=>_0x4913db[_0x17084d(0xb4)]===_0x329b88[_0x17084d(0xb4)]))==null?void 0x0:_0x5ace2f[_0x17084d(0xa3)];_0x96ec5e&&this[_0x17084d(0xa6)]['resolveComment'](_0x3f8026,_0xffb399,_0x96ec5e['id'],_0x329b88[_0x17084d(0xbe)]===I[_0x17084d(0xde)]);break;}}}));}};_=V([p(0x0,_0x128bec(_0x3e5339)),p(0x1,_0x128bec(_0xa6c183)),p(0x2,_0x128bec(_0x653602)),p(0x3,_0x128bec(_0x4f226c))],_);const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x289d8c,_0xa98d1b,_0x266fa5,_0x22a279)=>{const _0x1626ed=_0x4fb932;for(var _0x218e22=_0x22a279>0x1?void 0x0:_0x22a279?k(_0xa98d1b,_0x266fa5):_0xa98d1b,_0xf5f4a0=_0x289d8c[_0x1626ed(0xd8)]-0x1,_0x21e9f0;_0xf5f4a0>=0x0;_0xf5f4a0--)(_0x21e9f0=_0x289d8c[_0xf5f4a0])&&(_0x218e22=_0x21e9f0(_0x218e22)||_0x218e22);return _0x218e22;},b=(_0xd59d05,_0x15acc2)=>(_0x3b59ff,_0x510660)=>_0x15acc2(_0x3b59ff,_0x510660,_0xd59d05);function _0x3851(_0x1d7e1c,_0x5adde3){_0x1d7e1c=_0x1d7e1c-0x82;const _0x5bc47e=_0x5bc4();let _0x38511f=_0x5bc47e[_0x1d7e1c];return _0x38511f;}function X(_0x11cae1,_0x5cb698){const _0x21836=_0x4fb932,_0x575525=_0x11cae1[_0x21836(0xbb)][0x0];return{..._0x5cb698,'id':_0x575525[_0x21836(0xd1)],'resolved':_0x11cae1[_0x21836(0xbe)]===0x1,'dT':y(_0x575525[_0x21836(0x8c)]),'personId':_0x575525['userId'],'threadId':_0x575525[_0x21836(0xb4)]};}function ee(_0x5e979b,_0x1117dc,_0x3012ef){const _0x43514c=_0x4fb932;var _0xc1188f,_0x233d81;if(((_0x233d81=(_0xc1188f=_0x5e979b==null?void 0x0:_0x5e979b[_0x43514c(0xbb)])==null?void 0x0:_0xc1188f[_0x43514c(0xd8)])!=null?_0x233d81:0x0)>0x0){const _0x3599ff=(_0x524cb9,_0x215f5a)=>({'id':_0x524cb9[_0x43514c(0xd1)],'threadId':_0x524cb9['threadId'],'dT':y(_0x524cb9[_0x43514c(0x8c)]),'personId':_0x524cb9[_0x43514c(0x9d)],'resolved':_0x5e979b[_0x43514c(0xbe)]===I['Solved'],'unitId':_0x1117dc,'subUnitId':_0x3012ef,'text':JSON['parse'](_0x524cb9['content']),'parentId':_0x215f5a}),_0x396132=_0x3599ff(_0x5e979b[_0x43514c(0xbb)][0x0]);return{..._0x396132,'children':_0x5e979b[_0x43514c(0xbb)][_0x43514c(0xb3)](0x1)[_0x43514c(0xa0)](_0x5c42b2=>_0x3599ff(_0x5c42b2,_0x396132['id']))};}return null;}let S=class{constructor(_0x42675d,_0x2538b5,_0x271cd3){const _0x4de1f6=_0x4fb932;this[_0x4de1f6(0xd9)]=_0x42675d,this[_0x4de1f6(0xd4)]=_0x2538b5,this[_0x4de1f6(0xda)]=_0x271cd3;}async[_0x4fb932(0x9b)](_0x594c2c){const _0x46c252=_0x4fb932;var _0x98fbab,_0x2c7d38;const {parentId:_0x48bc75,unitId:_0x43a20b,text:_0x5e569f,threadId:_0x5884d7}=_0x594c2c,_0x16d53d=(_0x2c7d38=(_0x98fbab=_0x5e569f[_0x46c252(0xb0)])==null?void 0x0:_0x98fbab[_0x46c252(0xb1)](_0x4efbf7=>_0x4efbf7['rangeType']===_0x42ea01[_0x46c252(0xc8)])[_0x46c252(0xa0)](_0x3c65c4=>_0x3c65c4['rangeId']))!=null?_0x2c7d38:[],_0x53a2c8=JSON[_0x46c252(0xba)](_0x5e569f),_0x4561b6=(await this[_0x46c252(0xda)]['requireSession'](_0x43a20b))[_0x46c252(0xdc)]();if(_0x48bc75){const _0xbd99f5={'memberId':_0x4561b6,'unitId':_0x43a20b,'content':_0x53a2c8,'mention':_0x16d53d,'threadId':_0x5884d7},_0x1f984f=(await this['_httpService'][_0x46c252(0x9e)]('/universer-api/comment/unit/'+_0x43a20b+'/reply',{'body':_0xbd99f5}))[_0x46c252(0xad)]['reply'];return{..._0x594c2c,'id':_0x1f984f[_0x46c252(0xd1)],'dT':_0x67181a(+_0x1f984f['createTimestamp'])[_0x46c252(0xc2)](_0x46c252(0xd7)),'personId':_0x1f984f[_0x46c252(0x9d)]};}else{const _0x142b70={'memberId':_0x4561b6,'unitId':_0x43a20b,'content':_0x53a2c8,'mention':_0x16d53d},_0x4d4647=await this[_0x46c252(0xd9)][_0x46c252(0x9e)](_0x46c252(0x89)+_0x43a20b+_0x46c252(0xa4),{'body':_0x142b70});return X(_0x4d4647[_0x46c252(0xad)][_0x46c252(0xe8)],_0x594c2c);}}async[_0x4fb932(0x94)](_0x27926d){const _0x117dcb=_0x4fb932;var _0x2dbded,_0x43a066;const {text:_0x189b17,unitId:_0x1f83e0}=_0x27926d,_0x30ca7f=(_0x43a066=(_0x2dbded=_0x189b17[_0x117dcb(0xb0)])==null?void 0x0:_0x2dbded[_0x117dcb(0xb1)](_0x2682c2=>_0x2682c2[_0x117dcb(0x82)]===_0x42ea01['COMMENT'])[_0x117dcb(0xa0)](_0x16919f=>_0x16919f[_0x117dcb(0xcf)]))!=null?_0x43a066:[],_0x522faa=JSON[_0x117dcb(0xba)](_0x189b17),_0x313f71=_0x27926d[_0x117dcb(0xb4)],_0x393243=_0x27926d['id'],_0x34c20c={'memberId':(await this['_sessionService'][_0x117dcb(0x9a)](_0x1f83e0))['getMemberID'](),'unitId':_0x1f83e0,'threadId':_0x313f71,'mention':_0x30ca7f,'content':_0x522faa,'replyId':_0x393243},_0x2ac145=await this[_0x117dcb(0xd9)][_0x117dcb(0x9e)](_0x117dcb(0x89)+_0x1f83e0+'/edit',{'body':_0x34c20c});return!_0x2ac145[_0x117dcb(0xad)]['error']||_0x2ac145[_0x117dcb(0xad)][_0x117dcb(0x9f)][_0x117dcb(0xd5)]===0x1;}async[_0x4fb932(0xb5)](_0x522b57){const _0x402511=_0x4fb932,{unitId:_0x2373d2}=_0x522b57,_0x596b2f=_0x522b57[_0x402511(0xb4)],_0x2f6612={'memberId':this[_0x402511(0xd4)][_0x402511(0xdf)]()[_0x402511(0x99)],'unitId':_0x2373d2,'threadId':_0x596b2f,'solved':_0x522b57[_0x402511(0x92)]?I[_0x402511(0xde)]:I[_0x402511(0x8e)]},_0x562f2b=await this[_0x402511(0xd9)][_0x402511(0x9e)](_0x402511(0x89)+_0x2373d2+_0x402511(0xd6),{'body':_0x2f6612});return!_0x562f2b[_0x402511(0xad)][_0x402511(0x9f)]||_0x562f2b[_0x402511(0xad)]['error'][_0x402511(0xd5)]===0x1;}async[_0x4fb932(0xc7)](_0x1f759f,_0xbe3d66,_0x51d002,_0x264644){const _0x13d110=_0x4fb932,_0x2f53bc={'memberId':(await this[_0x13d110(0xda)][_0x13d110(0x9a)](_0x1f759f))['getMemberID'](),'threadId':_0x51d002,'replyId':_0x264644,'unitId':_0x1f759f},_0x38bf6e=await this[_0x13d110(0xd9)][_0x13d110(0x9e)](_0x13d110(0x89)+_0x1f759f+'/delete',{'body':_0x2f53bc});return!_0x38bf6e[_0x13d110(0xad)][_0x13d110(0x9f)]||_0x38bf6e[_0x13d110(0xad)][_0x13d110(0x9f)][_0x13d110(0xd5)]===0x1;}async[_0x4fb932(0xac)](_0x1c4a1f,_0x2f7aad,_0x4c8daa){const _0x7e0295=_0x4fb932,_0x47abd0={'unitId':_0x1c4a1f,'threadId':_0x4c8daa},_0x579495=await this[_0x7e0295(0xd9)]['post'](_0x7e0295(0x89)+_0x1c4a1f+_0x7e0295(0xbc),{'body':_0x47abd0}),_0x42e971=_0x4c8daa[_0x7e0295(0xa0)](_0x4b9c42=>ee(_0x579495['body'][_0x7e0295(0xc6)][_0x4b9c42],_0x1c4a1f,_0x2f7aad))[_0x7e0295(0xb1)](Boolean);return Object['values'](_0x579495[_0x7e0295(0xad)][_0x7e0295(0xab)])[_0x7e0295(0x95)](_0x4f7f69=>{const _0x480c9f=_0x7e0295;this[_0x480c9f(0xd4)]['addUser'](_0x4f7f69);}),_0x42e971;}['saveCommentToSnapshot'](_0x4fed5f){const _0x172f82=_0x4fb932;return{'id':_0x4fed5f['id'],'threadId':_0x4fed5f[_0x172f82(0xb4)],'ref':_0x4fed5f[_0x172f82(0xb7)]};}};S=Q([b(0x0,_0x128bec(_0x29ca6e)),b(0x1,_0x128bec(_0x653602)),b(0x2,_0x128bec(_0x153124))],S);function _0x5bc4(){const _0x5e4d37=['type','createTimestamp','getUser','OpenOrReOpen','parse','40GvBiNF','12YHKSyo','resolved','syncUpdateMutationToColla','updateComment','forEach','/universer-api/user/list','115299FnLaTJ','Unknown','userID','requireSession','addComment','Delete','userId','post','error','map','unitId','UNRECOGNIZED','root','/add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','user','1644973WzqnLR','16615niFQMo','getComment','users','listComments','body','defineProperty','_init','customRanges','filter','setConfig','slice','threadId','resolveComment','_threadCommentDataSourceService','ref','delete','pipe','stringify','replies','/list','get','solved','668982ZzXfKv','getOwnPropertyDescriptor','42518KVyFRm','format','Edit','_commentService','_injector','comments','deleteComment','COMMENT','_initUserSync','Reply','subscribe','size','601uAgdHk','Add','rangeId','_config','replyId','10dsfoMF','add','_userService','code','/solved','YYYY/MM/DD\x20HH:mm','length','_httpService','_sessionService','getUnit','getMemberID','_initDataSource','Solved','getCurrentUser','parentId','find','pluginName','_threadCommentDataSource','Solve','addUser','payload','onReady','comment','rangeType','onStarting','_configService','disposeWithMe','8TKUnwx','dataSource','582YECVhX','/universer-api/comment/unit/','627915elAVhm'];_0x5bc4=function(){return _0x5e4d37;};return _0x5bc4();}var re=Object[_0x4fb932(0xc0)],te=(_0x240e22,_0x4fe0cc,_0x1396d8,_0x274ba3)=>{for(var _0x178cbb=_0x274ba3>0x1?void 0x0:_0x274ba3?re(_0x4fe0cc,_0x1396d8):_0x4fe0cc,_0x3338ab=_0x240e22['length']-0x1,_0x496294;_0x3338ab>=0x0;_0x3338ab--)(_0x496294=_0x240e22[_0x3338ab])&&(_0x178cbb=_0x496294(_0x178cbb)||_0x178cbb);return _0x178cbb;},M=(_0x4061b6,_0x166db9)=>(_0x16cb32,_0x551e95)=>_0x166db9(_0x16cb32,_0x551e95,_0x4061b6);let f=class extends _0x224507{constructor(_0x401ede,_0x35bfce){const _0x7651e9=_0x4fb932;super(),this[_0x7651e9(0xb6)]=_0x401ede,this[_0x7651e9(0xe3)]=_0x35bfce,this[_0x7651e9(0xdd)]();}[_0x4fb932(0xdd)](){const _0x1deaa7=_0x4fb932;this[_0x1deaa7(0xb6)][_0x1deaa7(0x87)]=this[_0x1deaa7(0xe3)],this[_0x1deaa7(0xb6)][_0x1deaa7(0x93)]=!0x1;}};f=te([M(0x0,_0x40cc3e),M(0x1,_0x128bec(S))],f);var se=Object[_0x4fb932(0xae)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x412e3b,_0x48474f,_0xfd20e7)=>_0x48474f in _0x412e3b?se(_0x412e3b,_0x48474f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xfd20e7}):_0x412e3b[_0x48474f]=_0xfd20e7,ie=(_0x4b7edf,_0x292da4,_0x28d3c0,_0x5f4356)=>{const _0x308822=_0x4fb932;for(var _0x396e71=_0x5f4356>0x1?void 0x0:_0x5f4356?oe(_0x292da4,_0x28d3c0):_0x292da4,_0x27b2c0=_0x4b7edf[_0x308822(0xd8)]-0x1,_0x5664a8;_0x27b2c0>=0x0;_0x27b2c0--)(_0x5664a8=_0x4b7edf[_0x27b2c0])&&(_0x396e71=_0x5664a8(_0x396e71)||_0x396e71);return _0x396e71;},N=(_0x4d4976,_0x237e50)=>(_0x25a0f7,_0xed0263)=>_0x237e50(_0x25a0f7,_0xed0263,_0x4d4976),$=(_0x3cd161,_0x53edce,_0x3e15e7)=>ne(_0x3cd161,typeof _0x53edce!='symbol'?_0x53edce+'':_0x53edce,_0x3e15e7);let g=class extends _0x58a3f6{constructor(_0x24634d=O,_0x111f43,_0x3e83fe){const _0x2aa71c=_0x4fb932;super(),this[_0x2aa71c(0xd0)]=_0x24634d,this[_0x2aa71c(0xc5)]=_0x111f43,this[_0x2aa71c(0x84)]=_0x3e83fe;const {..._0x2bac8c}=_0x348f8b({},O,this[_0x2aa71c(0xd0)]);this[_0x2aa71c(0x84)][_0x2aa71c(0xb2)](z,_0x2bac8c);}[_0x4fb932(0x83)](){const _0x5659e9=_0x4fb932;[[S],[f],[_]][_0x5659e9(0x95)](_0x303714=>{const _0x338f32=_0x5659e9;this[_0x338f32(0xc5)][_0x338f32(0xd3)](_0x303714);});}[_0x4fb932(0xe7)](){const _0xa8e340=_0x4fb932;this[_0xa8e340(0xc5)][_0xa8e340(0xbd)](f),this[_0xa8e340(0xc5)]['get'](_);}};$(g,_0x4fb932(0xe2),W),$(g,_0x4fb932(0x8b),_0x49b985['UNIVER_UNKNOWN']),g=ie([_0x3d8f7e(_0x95a849,_0x302632,_0x21485d),N(0x1,_0x128bec(_0x4f226c)),N(0x2,_0x1d7854)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1b503f=_0x53d2;(function(_0x5ecad4,_0x1ce279){const _0x4e49bf=_0x53d2,_0x29d002=_0x5ecad4();while(!![]){try{const _0x37fd48=-parseInt(_0x4e49bf(0x23b))/0x1+parseInt(_0x4e49bf(0x21b))/0x2+parseInt(_0x4e49bf(0x1ee))/0x3+parseInt(_0x4e49bf(0x226))/0x4*(-parseInt(_0x4e49bf(0x206))/0x5)+-parseInt(_0x4e49bf(0x223))/0x6+parseInt(_0x4e49bf(0x22d))/0x7*(-parseInt(_0x4e49bf(0x1eb))/0x8)+-parseInt(_0x4e49bf(0x1f0))/0x9*(-parseInt(_0x4e49bf(0x228))/0xa);if(_0x37fd48===_0x1ce279)break;else _0x29d002['push'](_0x29d002['shift']());}catch(_0x36ac3f){_0x29d002['push'](_0x29d002['shift']());}}}(_0x5491,0x3fd84));import{CommentService as _0x177479,CollaborationSessionService as _0x5d29c3,UniverCollaborationClientPlugin as _0x4ac8a8}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x54b9da}from'@univerjs-pro/license';import{dayjs as _0x5b328b,UserManagerService as _0x27b619,Inject as _0xe56929,Injector as _0x323c4c,Disposable as _0x496c11,CustomRangeType as _0x1a50f9,UniverInstanceType as _0x4ce168,DependentOn as _0x422474,IConfigService as _0x3cb82c,Plugin as _0x55d139,merge as _0xd65155}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x181ffd}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x34daab,IThreadCommentDataSourceService as _0x51dd11}from'@univerjs/thread-comment';import{bufferTime as _0x487d8e}from'rxjs';function _0x5491(){const _0x3cc461=['solved','35NuGFLm','getComment','map','slice','_httpService','/add','userID','_userService','Unknown','_config','Add','_configService','values','stringify','516782dtHjKf','userId','Solve','_injector','dataSource','body','error','delete','rangeType','replyId','resolved','length','_commentService','_threadCommentModel','/edit','185608fqMmaa','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','119997Jlgsit','size','12303CqawDH','deleteComment','commentUpdate$','requireSession','disposeWithMe','UNRECOGNIZED','resolveComment','onReady','updateComment','type','get','Solved','_threadCommentDataSourceService','symbol','root','find','_initUserSync','OpenOrReOpen','getOwnPropertyDescriptor','syncUpdateMutationToColla','ref','/reply','2311115sPwUbB','_init','rangeId','comments','add','code','_initDataSource','forEach','threadId','content','thread-comment-data-source.config','getUser','setConfig','user','replies','comment','Edit','parentId','Reply','Delete','createTimestamp','919058sOfUAk','addComment','format','onStarting','post','addUser','reply','getMemberID','2182446wvnrOQ','_threadCommentDataSource','/universer-api/comment/unit/','4OqzOCN','_sessionService','8930viHjRA','customRanges','/solved','parse'];_0x5491=function(){return _0x3cc461;};return _0x5491();}import{HTTPService as _0x4b3a69}from'@univerjs/network';const W=_0x1b503f(0x1ed);var I=(_0xf2fff0=>(_0xf2fff0[_0xf2fff0[_0x1b503f(0x201)]=0x0]=_0x1b503f(0x201),_0xf2fff0[_0xf2fff0[_0x1b503f(0x1fb)]=0x1]=_0x1b503f(0x1fb),_0xf2fff0[_0xf2fff0[_0x1b503f(0x1f5)]=-0x1]=_0x1b503f(0x1f5),_0xf2fff0))(I||{}),v=(_0x37b9a2=>(_0x37b9a2[_0x37b9a2[_0x1b503f(0x235)]=0x0]=_0x1b503f(0x235),_0x37b9a2[_0x37b9a2[_0x1b503f(0x237)]=0x1]=_0x1b503f(0x237),_0x37b9a2[_0x37b9a2[_0x1b503f(0x218)]=0x2]=_0x1b503f(0x218),_0x37b9a2[_0x37b9a2[_0x1b503f(0x216)]=0x3]=_0x1b503f(0x216),_0x37b9a2[_0x37b9a2[_0x1b503f(0x219)]=0x4]='Delete',_0x37b9a2[_0x37b9a2[_0x1b503f(0x23d)]=0x5]='Solve',_0x37b9a2[_0x37b9a2[_0x1b503f(0x1f5)]=-0x1]=_0x1b503f(0x1f5),_0x37b9a2))(v||{});const y=_0x1c2e89=>_0x5b328b(new Date(+_0x1c2e89))[_0x1b503f(0x21d)]('YYYY/MM/DD\x20HH:mm'),B=async(_0xc81d1c,_0x561816)=>{const _0x3a5f86=_0x1b503f,_0x2a6bcb=_0xc81d1c['get'](_0x27b619),_0x36d59e=_0xc81d1c['get'](_0x4b3a69);_0x561816[_0x3a5f86(0x20d)](_0xb2e873=>{const _0x3a3acb=_0x3a5f86;_0x2a6bcb[_0x3a3acb(0x211)](_0xb2e873)&&_0x561816[_0x3a3acb(0x1e3)](_0xb2e873);}),_0x561816[_0x3a5f86(0x1ef)]&&(await _0x36d59e[_0x3a5f86(0x1fa)]('/universer-api/user/list',{'params':{'userIDs':[..._0x561816]}}))['body'][_0x3a5f86(0x1ec)][_0x3a5f86(0x20d)](_0x43e85f=>{const _0x415732=_0x3a5f86;_0x43e85f&&_0x2a6bcb[_0x415732(0x220)](_0x43e85f);});};var K=Object[_0x1b503f(0x202)],V=(_0x387c97,_0x5c32d4,_0x428338,_0x5f41b7)=>{for(var _0xf0b265=_0x5f41b7>0x1?void 0x0:_0x5f41b7?K(_0x5c32d4,_0x428338):_0x5c32d4,_0x1395d6=_0x387c97['length']-0x1,_0x1bb40a;_0x1395d6>=0x0;_0x1395d6--)(_0x1bb40a=_0x387c97[_0x1395d6])&&(_0xf0b265=_0x1bb40a(_0xf0b265)||_0xf0b265);return _0xf0b265;},p=(_0x2fc504,_0x5c1669)=>(_0x2e4e18,_0x5f1862)=>_0x5c1669(_0x2e4e18,_0x5f1862,_0x2fc504);let _=class extends _0x496c11{constructor(_0x14c945,_0x1836d1,_0x3ec5a8,_0x27aa08){const _0x4f27a5=_0x1b503f;super(),this[_0x4f27a5(0x1e8)]=_0x14c945,this[_0x4f27a5(0x1e9)]=_0x1836d1,this['_userService']=_0x3ec5a8,this[_0x4f27a5(0x23e)]=_0x27aa08,this[_0x4f27a5(0x207)](),this[_0x4f27a5(0x200)]();}['_initUserSync'](){const _0x4cb21d=_0x1b503f;this[_0x4cb21d(0x1f4)](this[_0x4cb21d(0x1e9)][_0x4cb21d(0x1f2)]['pipe'](_0x487d8e(0x10))['subscribe'](_0x33590f=>{const _0x3e36e9=_0x4cb21d,_0x5b166c=new Set();_0x33590f[_0x3e36e9(0x20d)](_0x37ba4c=>{const _0x1133f2=_0x3e36e9;switch(_0x37ba4c[_0x1133f2(0x1f9)]){case _0x1133f2(0x20a):{const _0x330e8d=_0x37ba4c['payload']['personId'];_0x5b166c[_0x1133f2(0x20a)](_0x330e8d);break;}}}),B(this['_injector'],_0x5b166c);}));}[_0x1b503f(0x207)](){const _0x20b5b2=_0x1b503f;this['disposeWithMe'](this[_0x20b5b2(0x1e8)][_0x20b5b2(0x1f2)]['subscribe'](async _0x16eda5=>{const _0x56ef1b=_0x20b5b2;var _0x458bf3,_0xd96ddd,_0x4f9b16,_0x3ed873;const _0xb15ac0=(_0x458bf3=this[_0x56ef1b(0x1e9)]['getUnit'](_0x16eda5['unitId'])[_0x56ef1b(0x1ff)](_0x2752bb=>_0x2752bb['threadId']===_0x16eda5['threadId']))==null?void 0x0:_0x458bf3['root'];if(!_0xb15ac0)return;const {unitId:_0x23a6ff,subUnitId:_0x153a0a}=_0xb15ac0;switch(_0x16eda5[_0x56ef1b(0x213)]&&this[_0x56ef1b(0x234)][_0x56ef1b(0x220)](_0x16eda5[_0x56ef1b(0x213)]),_0x16eda5[_0x56ef1b(0x1f9)]){case v[_0x56ef1b(0x237)]:break;case v[_0x56ef1b(0x218)]:{this['_threadCommentModel'][_0x56ef1b(0x21c)](_0x23a6ff,_0x153a0a,{'unitId':_0x23a6ff,'subUnitId':_0x153a0a,'ref':'','id':_0x16eda5[_0x56ef1b(0x1e5)],'dT':y(+_0x16eda5[_0x56ef1b(0x21a)]),'threadId':_0x16eda5[_0x56ef1b(0x20e)],'personId':(_0x4f9b16=(_0xd96ddd=_0x16eda5['user'])==null?void 0x0:_0xd96ddd[_0x56ef1b(0x233)])!=null?_0x4f9b16:_0x16eda5[_0x56ef1b(0x23c)],'text':JSON[_0x56ef1b(0x22b)](_0x16eda5[_0x56ef1b(0x20f)]),'parentId':_0xb15ac0['id']});break;}case v[_0x56ef1b(0x219)]:{const _0x5eb921=this[_0x56ef1b(0x1e9)][_0x56ef1b(0x22e)](_0x23a6ff,_0x153a0a,_0x16eda5[_0x56ef1b(0x1e5)]);_0x5eb921&&_0x5eb921[_0x56ef1b(0x217)]&&this[_0x56ef1b(0x1e9)][_0x56ef1b(0x1f1)](_0x23a6ff,_0x153a0a,_0x16eda5[_0x56ef1b(0x1e5)]);break;}case v[_0x56ef1b(0x216)]:{this[_0x56ef1b(0x1e9)][_0x56ef1b(0x1f8)](_0x23a6ff,_0x153a0a,{'commentId':_0x16eda5[_0x56ef1b(0x1e5)],'text':JSON[_0x56ef1b(0x22b)](_0x16eda5[_0x56ef1b(0x20f)])});break;}case v[_0x56ef1b(0x23d)]:{const _0x3a9c54=(_0x3ed873=this[_0x56ef1b(0x1e9)]['getUnit'](_0x16eda5['unitId'])[_0x56ef1b(0x1ff)](_0x55c33d=>_0x55c33d[_0x56ef1b(0x20e)]===_0x16eda5[_0x56ef1b(0x20e)]))==null?void 0x0:_0x3ed873[_0x56ef1b(0x1fe)];_0x3a9c54&&this['_threadCommentModel'][_0x56ef1b(0x1f6)](_0x23a6ff,_0x153a0a,_0x3a9c54['id'],_0x16eda5['solved']===I[_0x56ef1b(0x1fb)]);break;}}}));}};_=V([p(0x0,_0xe56929(_0x177479)),p(0x1,_0xe56929(_0x34daab)),p(0x2,_0xe56929(_0x27b619)),p(0x3,_0xe56929(_0x323c4c))],_);const z=_0x1b503f(0x210),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1f24c0,_0xf3bd,_0x28f0f0,_0x2e75bb)=>{const _0xb8a12a=_0x1b503f;for(var _0x48e1eb=_0x2e75bb>0x1?void 0x0:_0x2e75bb?k(_0xf3bd,_0x28f0f0):_0xf3bd,_0x515e7d=_0x1f24c0[_0xb8a12a(0x1e7)]-0x1,_0x3ddbfb;_0x515e7d>=0x0;_0x515e7d--)(_0x3ddbfb=_0x1f24c0[_0x515e7d])&&(_0x48e1eb=_0x3ddbfb(_0x48e1eb)||_0x48e1eb);return _0x48e1eb;},b=(_0x342fff,_0x44dcd2)=>(_0xd804f3,_0x3c2e2b)=>_0x44dcd2(_0xd804f3,_0x3c2e2b,_0x342fff);function X(_0x480133,_0x29c503){const _0x525730=_0x1b503f,_0x5464c1=_0x480133[_0x525730(0x214)][0x0];return{..._0x29c503,'id':_0x5464c1['replyId'],'resolved':_0x480133[_0x525730(0x22c)]===0x1,'dT':y(_0x5464c1['createTimestamp']),'personId':_0x5464c1[_0x525730(0x23c)],'threadId':_0x5464c1[_0x525730(0x20e)]};}function ee(_0x409c40,_0x206ede,_0x172d6b){const _0x3ddf74=_0x1b503f;var _0x53b8bd,_0x5f5593;if(((_0x5f5593=(_0x53b8bd=_0x409c40==null?void 0x0:_0x409c40[_0x3ddf74(0x214)])==null?void 0x0:_0x53b8bd['length'])!=null?_0x5f5593:0x0)>0x0){const _0x18da36=(_0x12305d,_0x343833)=>({'id':_0x12305d['replyId'],'threadId':_0x12305d[_0x3ddf74(0x20e)],'dT':y(_0x12305d[_0x3ddf74(0x21a)]),'personId':_0x12305d[_0x3ddf74(0x23c)],'resolved':_0x409c40[_0x3ddf74(0x22c)]===I[_0x3ddf74(0x1fb)],'unitId':_0x206ede,'subUnitId':_0x172d6b,'text':JSON[_0x3ddf74(0x22b)](_0x12305d['content']),'parentId':_0x343833}),_0x16582e=_0x18da36(_0x409c40[_0x3ddf74(0x214)][0x0]);return{..._0x16582e,'children':_0x409c40['replies'][_0x3ddf74(0x230)](0x1)[_0x3ddf74(0x22f)](_0x498e08=>_0x18da36(_0x498e08,_0x16582e['id']))};}return null;}function _0x53d2(_0x2f8f1d,_0x3438e8){_0x2f8f1d=_0x2f8f1d-0x1e0;const _0x5491da=_0x5491();let _0x53d231=_0x5491da[_0x2f8f1d];return _0x53d231;}let S=class{constructor(_0x208ca2,_0xb7c40e,_0x2b4bcd){const _0x31a10c=_0x1b503f;this[_0x31a10c(0x231)]=_0x208ca2,this['_userService']=_0xb7c40e,this['_sessionService']=_0x2b4bcd;}async[_0x1b503f(0x21c)](_0x3a8e1e){const _0x387822=_0x1b503f;var _0x9a661d,_0x13e52b;const {parentId:_0x27a3df,unitId:_0x142237,text:_0xc8886c,threadId:_0x269136}=_0x3a8e1e,_0xd3b4d=(_0x13e52b=(_0x9a661d=_0xc8886c[_0x387822(0x229)])==null?void 0x0:_0x9a661d['filter'](_0x2f7eb3=>_0x2f7eb3[_0x387822(0x1e4)]===_0x1a50f9['COMMENT'])[_0x387822(0x22f)](_0x1c1b48=>_0x1c1b48[_0x387822(0x208)]))!=null?_0x13e52b:[],_0x49d2d5=JSON[_0x387822(0x23a)](_0xc8886c),_0x300ebf=(await this[_0x387822(0x227)][_0x387822(0x1f3)](_0x142237))[_0x387822(0x222)]();if(_0x27a3df){const _0x3167b1={'memberId':_0x300ebf,'unitId':_0x142237,'content':_0x49d2d5,'mention':_0xd3b4d,'threadId':_0x269136},_0x1b0851=(await this[_0x387822(0x231)][_0x387822(0x21f)](_0x387822(0x225)+_0x142237+_0x387822(0x205),{'body':_0x3167b1}))[_0x387822(0x1e1)][_0x387822(0x221)];return{..._0x3a8e1e,'id':_0x1b0851['replyId'],'dT':_0x5b328b(+_0x1b0851[_0x387822(0x21a)])[_0x387822(0x21d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1b0851[_0x387822(0x23c)]};}else{const _0x35be21={'memberId':_0x300ebf,'unitId':_0x142237,'content':_0x49d2d5,'mention':_0xd3b4d},_0x15fbab=await this[_0x387822(0x231)][_0x387822(0x21f)](_0x387822(0x225)+_0x142237+_0x387822(0x232),{'body':_0x35be21});return X(_0x15fbab['body'][_0x387822(0x215)],_0x3a8e1e);}}async['updateComment'](_0x260b35){const _0x5bf4f1=_0x1b503f;var _0x48ba6d,_0x2c4f10;const {text:_0x3e7bb0,unitId:_0x247ca6}=_0x260b35,_0xa1342a=(_0x2c4f10=(_0x48ba6d=_0x3e7bb0[_0x5bf4f1(0x229)])==null?void 0x0:_0x48ba6d['filter'](_0x308644=>_0x308644['rangeType']===_0x1a50f9['COMMENT'])[_0x5bf4f1(0x22f)](_0x20dca1=>_0x20dca1[_0x5bf4f1(0x208)]))!=null?_0x2c4f10:[],_0x45370b=JSON[_0x5bf4f1(0x23a)](_0x3e7bb0),_0x4be793=_0x260b35[_0x5bf4f1(0x20e)],_0x2a397e=_0x260b35['id'],_0x146dfa={'memberId':(await this[_0x5bf4f1(0x227)][_0x5bf4f1(0x1f3)](_0x247ca6))[_0x5bf4f1(0x222)](),'unitId':_0x247ca6,'threadId':_0x4be793,'mention':_0xa1342a,'content':_0x45370b,'replyId':_0x2a397e},_0xc37f2c=await this['_httpService'][_0x5bf4f1(0x21f)](_0x5bf4f1(0x225)+_0x247ca6+_0x5bf4f1(0x1ea),{'body':_0x146dfa});return!_0xc37f2c[_0x5bf4f1(0x1e1)]['error']||_0xc37f2c[_0x5bf4f1(0x1e1)][_0x5bf4f1(0x1e2)][_0x5bf4f1(0x20b)]===0x1;}async[_0x1b503f(0x1f6)](_0x32dd47){const _0x2e6f93=_0x1b503f,{unitId:_0xe790bb}=_0x32dd47,_0x28583f=_0x32dd47['threadId'],_0x4a030b={'memberId':this[_0x2e6f93(0x234)]['getCurrentUser']()[_0x2e6f93(0x233)],'unitId':_0xe790bb,'threadId':_0x28583f,'solved':_0x32dd47[_0x2e6f93(0x1e6)]?I['Solved']:I[_0x2e6f93(0x201)]},_0x16ef5a=await this[_0x2e6f93(0x231)][_0x2e6f93(0x21f)](_0x2e6f93(0x225)+_0xe790bb+_0x2e6f93(0x22a),{'body':_0x4a030b});return!_0x16ef5a[_0x2e6f93(0x1e1)][_0x2e6f93(0x1e2)]||_0x16ef5a[_0x2e6f93(0x1e1)][_0x2e6f93(0x1e2)][_0x2e6f93(0x20b)]===0x1;}async[_0x1b503f(0x1f1)](_0x162970,_0x2917ac,_0x44e83f,_0x49a38c){const _0x18cacb=_0x1b503f,_0x277b2c={'memberId':(await this[_0x18cacb(0x227)]['requireSession'](_0x162970))[_0x18cacb(0x222)](),'threadId':_0x44e83f,'replyId':_0x49a38c,'unitId':_0x162970},_0x54a4a7=await this[_0x18cacb(0x231)][_0x18cacb(0x21f)](_0x18cacb(0x225)+_0x162970+'/delete',{'body':_0x277b2c});return!_0x54a4a7[_0x18cacb(0x1e1)][_0x18cacb(0x1e2)]||_0x54a4a7['body'][_0x18cacb(0x1e2)][_0x18cacb(0x20b)]===0x1;}async['listComments'](_0xc26da1,_0x353bf2,_0x1474c8){const _0x368d91=_0x1b503f,_0x508603={'unitId':_0xc26da1,'threadId':_0x1474c8},_0x2160e7=await this['_httpService'][_0x368d91(0x21f)](_0x368d91(0x225)+_0xc26da1+'/list',{'body':_0x508603}),_0x171654=_0x1474c8[_0x368d91(0x22f)](_0x5d3b17=>ee(_0x2160e7[_0x368d91(0x1e1)][_0x368d91(0x209)][_0x5d3b17],_0xc26da1,_0x353bf2))['filter'](Boolean);return Object[_0x368d91(0x239)](_0x2160e7[_0x368d91(0x1e1)][_0x368d91(0x1ec)])['forEach'](_0x26e897=>{const _0x55d431=_0x368d91;this['_userService'][_0x55d431(0x220)](_0x26e897);}),_0x171654;}['saveCommentToSnapshot'](_0x31fc68){const _0x323f5d=_0x1b503f;return{'id':_0x31fc68['id'],'threadId':_0x31fc68[_0x323f5d(0x20e)],'ref':_0x31fc68[_0x323f5d(0x204)]};}};S=Q([b(0x0,_0xe56929(_0x4b3a69)),b(0x1,_0xe56929(_0x27b619)),b(0x2,_0xe56929(_0x5d29c3))],S);var re=Object[_0x1b503f(0x202)],te=(_0x31308c,_0x519ab1,_0x1537c5,_0x488aae)=>{const _0x23851c=_0x1b503f;for(var _0x9a3f9e=_0x488aae>0x1?void 0x0:_0x488aae?re(_0x519ab1,_0x1537c5):_0x519ab1,_0x5022eb=_0x31308c[_0x23851c(0x1e7)]-0x1,_0x51df2c;_0x5022eb>=0x0;_0x5022eb--)(_0x51df2c=_0x31308c[_0x5022eb])&&(_0x9a3f9e=_0x51df2c(_0x9a3f9e)||_0x9a3f9e);return _0x9a3f9e;},M=(_0x47f1ee,_0x349640)=>(_0x4c5a6a,_0x287107)=>_0x349640(_0x4c5a6a,_0x287107,_0x47f1ee);let f=class extends _0x496c11{constructor(_0x1641f1,_0x3b57a5){const _0x57bb5d=_0x1b503f;super(),this[_0x57bb5d(0x1fc)]=_0x1641f1,this[_0x57bb5d(0x224)]=_0x3b57a5,this[_0x57bb5d(0x20c)]();}[_0x1b503f(0x20c)](){const _0x3ad9e5=_0x1b503f;this[_0x3ad9e5(0x1fc)][_0x3ad9e5(0x1e0)]=this[_0x3ad9e5(0x224)],this[_0x3ad9e5(0x1fc)][_0x3ad9e5(0x203)]=!0x1;}};f=te([M(0x0,_0x51dd11),M(0x1,_0xe56929(S))],f);var se=Object['defineProperty'],oe=Object[_0x1b503f(0x202)],ne=(_0x1d8a02,_0x18bf9c,_0x4def72)=>_0x18bf9c in _0x1d8a02?se(_0x1d8a02,_0x18bf9c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4def72}):_0x1d8a02[_0x18bf9c]=_0x4def72,ie=(_0x5a19ac,_0x2db807,_0x5a85c7,_0x3253ec)=>{const _0x570c8=_0x1b503f;for(var _0x470026=_0x3253ec>0x1?void 0x0:_0x3253ec?oe(_0x2db807,_0x5a85c7):_0x2db807,_0x367189=_0x5a19ac[_0x570c8(0x1e7)]-0x1,_0x4e6bb1;_0x367189>=0x0;_0x367189--)(_0x4e6bb1=_0x5a19ac[_0x367189])&&(_0x470026=_0x4e6bb1(_0x470026)||_0x470026);return _0x470026;},N=(_0x5e90f2,_0x9bac7)=>(_0x5c2926,_0x28cdbd)=>_0x9bac7(_0x5c2926,_0x28cdbd,_0x5e90f2),$=(_0x3800b3,_0x502271,_0x56d1c4)=>ne(_0x3800b3,typeof _0x502271!=_0x1b503f(0x1fd)?_0x502271+'':_0x502271,_0x56d1c4);let g=class extends _0x55d139{constructor(_0x7eeebc=O,_0xf478b9,_0x2abb97){const _0x11c674=_0x1b503f;super(),this[_0x11c674(0x236)]=_0x7eeebc,this[_0x11c674(0x23e)]=_0xf478b9,this[_0x11c674(0x238)]=_0x2abb97;const {..._0x2a40dc}=_0xd65155({},O,this[_0x11c674(0x236)]);this[_0x11c674(0x238)][_0x11c674(0x212)](z,_0x2a40dc);}[_0x1b503f(0x21e)](){[[S],[f],[_]]['forEach'](_0x38d0ce=>{const _0x38b66d=_0x53d2;this[_0x38b66d(0x23e)][_0x38b66d(0x20a)](_0x38d0ce);});}[_0x1b503f(0x1f7)](){const _0x53289e=_0x1b503f;this[_0x53289e(0x23e)][_0x53289e(0x1fa)](f),this[_0x53289e(0x23e)][_0x53289e(0x1fa)](_);}};$(g,'pluginName',W),$(g,_0x1b503f(0x1f9),_0x4ce168['UNIVER_UNKNOWN']),g=ie([_0x422474(_0x181ffd,_0x4ac8a8,_0x54b9da),N(0x1,_0xe56929(_0x323c4c)),N(0x2,_0x3cb82c)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4fb932=_0x3851;(function(_0xc1e752,_0x44c97f){const _0x196dcc=_0x3851,_0x2198d9=_0xc1e752();while(!![]){try{const _0x1054ab=parseInt(_0x196dcc(0xcd))/0x1*(parseInt(_0x196dcc(0x88))/0x2)+-parseInt(_0x196dcc(0x8a))/0x3+-parseInt(_0x196dcc(0x90))/0x4*(parseInt(_0x196dcc(0xa9))/0x5)+parseInt(_0x196dcc(0xbf))/0x6+parseInt(_0x196dcc(0xc1))/0x7*(parseInt(_0x196dcc(0x86))/0x8)+-parseInt(_0x196dcc(0x97))/0x9*(parseInt(_0x196dcc(0xd2))/0xa)+parseInt(_0x196dcc(0xa8))/0xb*(parseInt(_0x196dcc(0x91))/0xc);if(_0x1054ab===_0x44c97f)break;else _0x2198d9['push'](_0x2198d9['shift']());}catch(_0x41f3e0){_0x2198d9['push'](_0x2198d9['shift']());}}}(_0x5bc4,0x2d923));import{CommentService as _0x3e5339,CollaborationSessionService as _0x153124,UniverCollaborationClientPlugin as _0x302632}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x21485d}from'@univerjs-pro/license';import{dayjs as _0x67181a,UserManagerService as _0x653602,Inject as _0x128bec,Injector as _0x4f226c,Disposable as _0x224507,CustomRangeType as _0x42ea01,UniverInstanceType as _0x49b985,DependentOn as _0x3d8f7e,IConfigService as _0x1d7854,Plugin as _0x58a3f6,merge as _0x348f8b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x95a849}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa6c183,IThreadCommentDataSourceService as _0x40cc3e}from'@univerjs/thread-comment';import{bufferTime as _0x152de6}from'rxjs';import{HTTPService as _0x29ca6e}from'@univerjs/network';const W=_0x4fb932(0xa5);var I=(_0x2f41c9=>(_0x2f41c9[_0x2f41c9[_0x4fb932(0x8e)]=0x0]=_0x4fb932(0x8e),_0x2f41c9[_0x2f41c9[_0x4fb932(0xde)]=0x1]='Solved',_0x2f41c9[_0x2f41c9[_0x4fb932(0xa2)]=-0x1]=_0x4fb932(0xa2),_0x2f41c9))(I||{}),v=(_0x3c6094=>(_0x3c6094[_0x3c6094[_0x4fb932(0x98)]=0x0]=_0x4fb932(0x98),_0x3c6094[_0x3c6094[_0x4fb932(0xce)]=0x1]='Add',_0x3c6094[_0x3c6094[_0x4fb932(0xca)]=0x2]=_0x4fb932(0xca),_0x3c6094[_0x3c6094[_0x4fb932(0xc3)]=0x3]='Edit',_0x3c6094[_0x3c6094[_0x4fb932(0x9c)]=0x4]='Delete',_0x3c6094[_0x3c6094[_0x4fb932(0xe4)]=0x5]='Solve',_0x3c6094[_0x3c6094['UNRECOGNIZED']=-0x1]=_0x4fb932(0xa2),_0x3c6094))(v||{});const y=_0x5e27f4=>_0x67181a(new Date(+_0x5e27f4))[_0x4fb932(0xc2)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x38ae86,_0x47839d)=>{const _0x275b16=_0x4fb932,_0x261f27=_0x38ae86[_0x275b16(0xbd)](_0x653602),_0x3ffd14=_0x38ae86[_0x275b16(0xbd)](_0x29ca6e);_0x47839d['forEach'](_0x3930a3=>{const _0x4b461c=_0x275b16;_0x261f27[_0x4b461c(0x8d)](_0x3930a3)&&_0x47839d[_0x4b461c(0xb8)](_0x3930a3);}),_0x47839d[_0x275b16(0xcc)]&&(await _0x3ffd14[_0x275b16(0xbd)](_0x275b16(0x96),{'params':{'userIDs':[..._0x47839d]}}))[_0x275b16(0xad)][_0x275b16(0xab)][_0x275b16(0x95)](_0x5be515=>{const _0x534620=_0x275b16;_0x5be515&&_0x261f27[_0x534620(0xe5)](_0x5be515);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x4f5a1e,_0x6e51c9,_0x549c61,_0x1ebac5)=>{for(var _0x3aea04=_0x1ebac5>0x1?void 0x0:_0x1ebac5?K(_0x6e51c9,_0x549c61):_0x6e51c9,_0x6b4c92=_0x4f5a1e['length']-0x1,_0x311cbd;_0x6b4c92>=0x0;_0x6b4c92--)(_0x311cbd=_0x4f5a1e[_0x6b4c92])&&(_0x3aea04=_0x311cbd(_0x3aea04)||_0x3aea04);return _0x3aea04;},p=(_0x1430d3,_0x4eac93)=>(_0x1ef89c,_0x3e8da3)=>_0x4eac93(_0x1ef89c,_0x3e8da3,_0x1430d3);let _=class extends _0x224507{constructor(_0x36c26f,_0x1e2605,_0x24b3db,_0x1990a9){const _0x381b33=_0x4fb932;super(),this['_commentService']=_0x36c26f,this[_0x381b33(0xa6)]=_0x1e2605,this['_userService']=_0x24b3db,this[_0x381b33(0xc5)]=_0x1990a9,this[_0x381b33(0xaf)](),this[_0x381b33(0xc9)]();}[_0x4fb932(0xc9)](){const _0x3e4c2f=_0x4fb932;this['disposeWithMe'](this[_0x3e4c2f(0xa6)]['commentUpdate$'][_0x3e4c2f(0xb9)](_0x152de6(0x10))['subscribe'](_0x303df7=>{const _0x213c4a=_0x3e4c2f,_0x3c06b9=new Set();_0x303df7[_0x213c4a(0x95)](_0xacd6f6=>{const _0x45ffa7=_0x213c4a;switch(_0xacd6f6[_0x45ffa7(0x8b)]){case _0x45ffa7(0xd3):{const _0x154b1b=_0xacd6f6[_0x45ffa7(0xe6)]['personId'];_0x3c06b9[_0x45ffa7(0xd3)](_0x154b1b);break;}}}),B(this[_0x213c4a(0xc5)],_0x3c06b9);}));}[_0x4fb932(0xaf)](){const _0x56913d=_0x4fb932;this[_0x56913d(0x85)](this[_0x56913d(0xc4)]['commentUpdate$'][_0x56913d(0xcb)](async _0x329b88=>{const _0x17084d=_0x56913d;var _0x5dd0db,_0x228fd9,_0x5759b1,_0x5ace2f;const _0x2c53b2=(_0x5dd0db=this[_0x17084d(0xa6)][_0x17084d(0xdb)](_0x329b88[_0x17084d(0xa1)])[_0x17084d(0xe1)](_0x21cd62=>_0x21cd62[_0x17084d(0xb4)]===_0x329b88[_0x17084d(0xb4)]))==null?void 0x0:_0x5dd0db[_0x17084d(0xa3)];if(!_0x2c53b2)return;const {unitId:_0x3f8026,subUnitId:_0xffb399}=_0x2c53b2;switch(_0x329b88[_0x17084d(0xa7)]&&this['_userService'][_0x17084d(0xe5)](_0x329b88[_0x17084d(0xa7)]),_0x329b88['type']){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0x17084d(0x9b)](_0x3f8026,_0xffb399,{'unitId':_0x3f8026,'subUnitId':_0xffb399,'ref':'','id':_0x329b88[_0x17084d(0xd1)],'dT':y(+_0x329b88[_0x17084d(0x8c)]),'threadId':_0x329b88[_0x17084d(0xb4)],'personId':(_0x5759b1=(_0x228fd9=_0x329b88[_0x17084d(0xa7)])==null?void 0x0:_0x228fd9[_0x17084d(0x99)])!=null?_0x5759b1:_0x329b88['userId'],'text':JSON[_0x17084d(0x8f)](_0x329b88['content']),'parentId':_0x2c53b2['id']});break;}case v['Delete']:{const _0x591a73=this[_0x17084d(0xa6)][_0x17084d(0xaa)](_0x3f8026,_0xffb399,_0x329b88[_0x17084d(0xd1)]);_0x591a73&&_0x591a73[_0x17084d(0xe0)]&&this[_0x17084d(0xa6)]['deleteComment'](_0x3f8026,_0xffb399,_0x329b88[_0x17084d(0xd1)]);break;}case v[_0x17084d(0xc3)]:{this[_0x17084d(0xa6)]['updateComment'](_0x3f8026,_0xffb399,{'commentId':_0x329b88['replyId'],'text':JSON['parse'](_0x329b88['content'])});break;}case v[_0x17084d(0xe4)]:{const _0x96ec5e=(_0x5ace2f=this[_0x17084d(0xa6)][_0x17084d(0xdb)](_0x329b88[_0x17084d(0xa1)])[_0x17084d(0xe1)](_0x4913db=>_0x4913db[_0x17084d(0xb4)]===_0x329b88[_0x17084d(0xb4)]))==null?void 0x0:_0x5ace2f[_0x17084d(0xa3)];_0x96ec5e&&this[_0x17084d(0xa6)]['resolveComment'](_0x3f8026,_0xffb399,_0x96ec5e['id'],_0x329b88[_0x17084d(0xbe)]===I[_0x17084d(0xde)]);break;}}}));}};_=V([p(0x0,_0x128bec(_0x3e5339)),p(0x1,_0x128bec(_0xa6c183)),p(0x2,_0x128bec(_0x653602)),p(0x3,_0x128bec(_0x4f226c))],_);const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x289d8c,_0xa98d1b,_0x266fa5,_0x22a279)=>{const _0x1626ed=_0x4fb932;for(var _0x218e22=_0x22a279>0x1?void 0x0:_0x22a279?k(_0xa98d1b,_0x266fa5):_0xa98d1b,_0xf5f4a0=_0x289d8c[_0x1626ed(0xd8)]-0x1,_0x21e9f0;_0xf5f4a0>=0x0;_0xf5f4a0--)(_0x21e9f0=_0x289d8c[_0xf5f4a0])&&(_0x218e22=_0x21e9f0(_0x218e22)||_0x218e22);return _0x218e22;},b=(_0xd59d05,_0x15acc2)=>(_0x3b59ff,_0x510660)=>_0x15acc2(_0x3b59ff,_0x510660,_0xd59d05);function _0x3851(_0x1d7e1c,_0x5adde3){_0x1d7e1c=_0x1d7e1c-0x82;const _0x5bc47e=_0x5bc4();let _0x38511f=_0x5bc47e[_0x1d7e1c];return _0x38511f;}function X(_0x11cae1,_0x5cb698){const _0x21836=_0x4fb932,_0x575525=_0x11cae1[_0x21836(0xbb)][0x0];return{..._0x5cb698,'id':_0x575525[_0x21836(0xd1)],'resolved':_0x11cae1[_0x21836(0xbe)]===0x1,'dT':y(_0x575525[_0x21836(0x8c)]),'personId':_0x575525['userId'],'threadId':_0x575525[_0x21836(0xb4)]};}function ee(_0x5e979b,_0x1117dc,_0x3012ef){const _0x43514c=_0x4fb932;var _0xc1188f,_0x233d81;if(((_0x233d81=(_0xc1188f=_0x5e979b==null?void 0x0:_0x5e979b[_0x43514c(0xbb)])==null?void 0x0:_0xc1188f[_0x43514c(0xd8)])!=null?_0x233d81:0x0)>0x0){const _0x3599ff=(_0x524cb9,_0x215f5a)=>({'id':_0x524cb9[_0x43514c(0xd1)],'threadId':_0x524cb9['threadId'],'dT':y(_0x524cb9[_0x43514c(0x8c)]),'personId':_0x524cb9[_0x43514c(0x9d)],'resolved':_0x5e979b[_0x43514c(0xbe)]===I['Solved'],'unitId':_0x1117dc,'subUnitId':_0x3012ef,'text':JSON['parse'](_0x524cb9['content']),'parentId':_0x215f5a}),_0x396132=_0x3599ff(_0x5e979b[_0x43514c(0xbb)][0x0]);return{..._0x396132,'children':_0x5e979b[_0x43514c(0xbb)][_0x43514c(0xb3)](0x1)[_0x43514c(0xa0)](_0x5c42b2=>_0x3599ff(_0x5c42b2,_0x396132['id']))};}return null;}let S=class{constructor(_0x42675d,_0x2538b5,_0x271cd3){const _0x4de1f6=_0x4fb932;this[_0x4de1f6(0xd9)]=_0x42675d,this[_0x4de1f6(0xd4)]=_0x2538b5,this[_0x4de1f6(0xda)]=_0x271cd3;}async[_0x4fb932(0x9b)](_0x594c2c){const _0x46c252=_0x4fb932;var _0x98fbab,_0x2c7d38;const {parentId:_0x48bc75,unitId:_0x43a20b,text:_0x5e569f,threadId:_0x5884d7}=_0x594c2c,_0x16d53d=(_0x2c7d38=(_0x98fbab=_0x5e569f[_0x46c252(0xb0)])==null?void 0x0:_0x98fbab[_0x46c252(0xb1)](_0x4efbf7=>_0x4efbf7['rangeType']===_0x42ea01[_0x46c252(0xc8)])[_0x46c252(0xa0)](_0x3c65c4=>_0x3c65c4['rangeId']))!=null?_0x2c7d38:[],_0x53a2c8=JSON[_0x46c252(0xba)](_0x5e569f),_0x4561b6=(await this[_0x46c252(0xda)]['requireSession'](_0x43a20b))[_0x46c252(0xdc)]();if(_0x48bc75){const _0xbd99f5={'memberId':_0x4561b6,'unitId':_0x43a20b,'content':_0x53a2c8,'mention':_0x16d53d,'threadId':_0x5884d7},_0x1f984f=(await this['_httpService'][_0x46c252(0x9e)]('/universer-api/comment/unit/'+_0x43a20b+'/reply',{'body':_0xbd99f5}))[_0x46c252(0xad)]['reply'];return{..._0x594c2c,'id':_0x1f984f[_0x46c252(0xd1)],'dT':_0x67181a(+_0x1f984f['createTimestamp'])[_0x46c252(0xc2)](_0x46c252(0xd7)),'personId':_0x1f984f[_0x46c252(0x9d)]};}else{const _0x142b70={'memberId':_0x4561b6,'unitId':_0x43a20b,'content':_0x53a2c8,'mention':_0x16d53d},_0x4d4647=await this[_0x46c252(0xd9)][_0x46c252(0x9e)](_0x46c252(0x89)+_0x43a20b+_0x46c252(0xa4),{'body':_0x142b70});return X(_0x4d4647[_0x46c252(0xad)][_0x46c252(0xe8)],_0x594c2c);}}async[_0x4fb932(0x94)](_0x27926d){const _0x117dcb=_0x4fb932;var _0x2dbded,_0x43a066;const {text:_0x189b17,unitId:_0x1f83e0}=_0x27926d,_0x30ca7f=(_0x43a066=(_0x2dbded=_0x189b17[_0x117dcb(0xb0)])==null?void 0x0:_0x2dbded[_0x117dcb(0xb1)](_0x2682c2=>_0x2682c2[_0x117dcb(0x82)]===_0x42ea01['COMMENT'])[_0x117dcb(0xa0)](_0x16919f=>_0x16919f[_0x117dcb(0xcf)]))!=null?_0x43a066:[],_0x522faa=JSON[_0x117dcb(0xba)](_0x189b17),_0x313f71=_0x27926d[_0x117dcb(0xb4)],_0x393243=_0x27926d['id'],_0x34c20c={'memberId':(await this['_sessionService'][_0x117dcb(0x9a)](_0x1f83e0))['getMemberID'](),'unitId':_0x1f83e0,'threadId':_0x313f71,'mention':_0x30ca7f,'content':_0x522faa,'replyId':_0x393243},_0x2ac145=await this[_0x117dcb(0xd9)][_0x117dcb(0x9e)](_0x117dcb(0x89)+_0x1f83e0+'/edit',{'body':_0x34c20c});return!_0x2ac145[_0x117dcb(0xad)]['error']||_0x2ac145[_0x117dcb(0xad)][_0x117dcb(0x9f)][_0x117dcb(0xd5)]===0x1;}async[_0x4fb932(0xb5)](_0x522b57){const _0x402511=_0x4fb932,{unitId:_0x2373d2}=_0x522b57,_0x596b2f=_0x522b57[_0x402511(0xb4)],_0x2f6612={'memberId':this[_0x402511(0xd4)][_0x402511(0xdf)]()[_0x402511(0x99)],'unitId':_0x2373d2,'threadId':_0x596b2f,'solved':_0x522b57[_0x402511(0x92)]?I[_0x402511(0xde)]:I[_0x402511(0x8e)]},_0x562f2b=await this[_0x402511(0xd9)][_0x402511(0x9e)](_0x402511(0x89)+_0x2373d2+_0x402511(0xd6),{'body':_0x2f6612});return!_0x562f2b[_0x402511(0xad)][_0x402511(0x9f)]||_0x562f2b[_0x402511(0xad)]['error'][_0x402511(0xd5)]===0x1;}async[_0x4fb932(0xc7)](_0x1f759f,_0xbe3d66,_0x51d002,_0x264644){const _0x13d110=_0x4fb932,_0x2f53bc={'memberId':(await this[_0x13d110(0xda)][_0x13d110(0x9a)](_0x1f759f))['getMemberID'](),'threadId':_0x51d002,'replyId':_0x264644,'unitId':_0x1f759f},_0x38bf6e=await this[_0x13d110(0xd9)][_0x13d110(0x9e)](_0x13d110(0x89)+_0x1f759f+'/delete',{'body':_0x2f53bc});return!_0x38bf6e[_0x13d110(0xad)][_0x13d110(0x9f)]||_0x38bf6e[_0x13d110(0xad)][_0x13d110(0x9f)][_0x13d110(0xd5)]===0x1;}async[_0x4fb932(0xac)](_0x1c4a1f,_0x2f7aad,_0x4c8daa){const _0x7e0295=_0x4fb932,_0x47abd0={'unitId':_0x1c4a1f,'threadId':_0x4c8daa},_0x579495=await this[_0x7e0295(0xd9)]['post'](_0x7e0295(0x89)+_0x1c4a1f+_0x7e0295(0xbc),{'body':_0x47abd0}),_0x42e971=_0x4c8daa[_0x7e0295(0xa0)](_0x4b9c42=>ee(_0x579495['body'][_0x7e0295(0xc6)][_0x4b9c42],_0x1c4a1f,_0x2f7aad))[_0x7e0295(0xb1)](Boolean);return Object['values'](_0x579495[_0x7e0295(0xad)][_0x7e0295(0xab)])[_0x7e0295(0x95)](_0x4f7f69=>{const _0x480c9f=_0x7e0295;this[_0x480c9f(0xd4)]['addUser'](_0x4f7f69);}),_0x42e971;}['saveCommentToSnapshot'](_0x4fed5f){const _0x172f82=_0x4fb932;return{'id':_0x4fed5f['id'],'threadId':_0x4fed5f[_0x172f82(0xb4)],'ref':_0x4fed5f[_0x172f82(0xb7)]};}};S=Q([b(0x0,_0x128bec(_0x29ca6e)),b(0x1,_0x128bec(_0x653602)),b(0x2,_0x128bec(_0x153124))],S);function _0x5bc4(){const _0x5e4d37=['type','createTimestamp','getUser','OpenOrReOpen','parse','40GvBiNF','12YHKSyo','resolved','syncUpdateMutationToColla','updateComment','forEach','/universer-api/user/list','115299FnLaTJ','Unknown','userID','requireSession','addComment','Delete','userId','post','error','map','unitId','UNRECOGNIZED','root','/add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','user','1644973WzqnLR','16615niFQMo','getComment','users','listComments','body','defineProperty','_init','customRanges','filter','setConfig','slice','threadId','resolveComment','_threadCommentDataSourceService','ref','delete','pipe','stringify','replies','/list','get','solved','668982ZzXfKv','getOwnPropertyDescriptor','42518KVyFRm','format','Edit','_commentService','_injector','comments','deleteComment','COMMENT','_initUserSync','Reply','subscribe','size','601uAgdHk','Add','rangeId','_config','replyId','10dsfoMF','add','_userService','code','/solved','YYYY/MM/DD\x20HH:mm','length','_httpService','_sessionService','getUnit','getMemberID','_initDataSource','Solved','getCurrentUser','parentId','find','pluginName','_threadCommentDataSource','Solve','addUser','payload','onReady','comment','rangeType','onStarting','_configService','disposeWithMe','8TKUnwx','dataSource','582YECVhX','/universer-api/comment/unit/','627915elAVhm'];_0x5bc4=function(){return _0x5e4d37;};return _0x5bc4();}var re=Object[_0x4fb932(0xc0)],te=(_0x240e22,_0x4fe0cc,_0x1396d8,_0x274ba3)=>{for(var _0x178cbb=_0x274ba3>0x1?void 0x0:_0x274ba3?re(_0x4fe0cc,_0x1396d8):_0x4fe0cc,_0x3338ab=_0x240e22['length']-0x1,_0x496294;_0x3338ab>=0x0;_0x3338ab--)(_0x496294=_0x240e22[_0x3338ab])&&(_0x178cbb=_0x496294(_0x178cbb)||_0x178cbb);return _0x178cbb;},M=(_0x4061b6,_0x166db9)=>(_0x16cb32,_0x551e95)=>_0x166db9(_0x16cb32,_0x551e95,_0x4061b6);let f=class extends _0x224507{constructor(_0x401ede,_0x35bfce){const _0x7651e9=_0x4fb932;super(),this[_0x7651e9(0xb6)]=_0x401ede,this[_0x7651e9(0xe3)]=_0x35bfce,this[_0x7651e9(0xdd)]();}[_0x4fb932(0xdd)](){const _0x1deaa7=_0x4fb932;this[_0x1deaa7(0xb6)][_0x1deaa7(0x87)]=this[_0x1deaa7(0xe3)],this[_0x1deaa7(0xb6)][_0x1deaa7(0x93)]=!0x1;}};f=te([M(0x0,_0x40cc3e),M(0x1,_0x128bec(S))],f);var se=Object[_0x4fb932(0xae)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x412e3b,_0x48474f,_0xfd20e7)=>_0x48474f in _0x412e3b?se(_0x412e3b,_0x48474f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xfd20e7}):_0x412e3b[_0x48474f]=_0xfd20e7,ie=(_0x4b7edf,_0x292da4,_0x28d3c0,_0x5f4356)=>{const _0x308822=_0x4fb932;for(var _0x396e71=_0x5f4356>0x1?void 0x0:_0x5f4356?oe(_0x292da4,_0x28d3c0):_0x292da4,_0x27b2c0=_0x4b7edf[_0x308822(0xd8)]-0x1,_0x5664a8;_0x27b2c0>=0x0;_0x27b2c0--)(_0x5664a8=_0x4b7edf[_0x27b2c0])&&(_0x396e71=_0x5664a8(_0x396e71)||_0x396e71);return _0x396e71;},N=(_0x4d4976,_0x237e50)=>(_0x25a0f7,_0xed0263)=>_0x237e50(_0x25a0f7,_0xed0263,_0x4d4976),$=(_0x3cd161,_0x53edce,_0x3e15e7)=>ne(_0x3cd161,typeof _0x53edce!='symbol'?_0x53edce+'':_0x53edce,_0x3e15e7);let g=class extends _0x58a3f6{constructor(_0x24634d=O,_0x111f43,_0x3e83fe){const _0x2aa71c=_0x4fb932;super(),this[_0x2aa71c(0xd0)]=_0x24634d,this[_0x2aa71c(0xc5)]=_0x111f43,this[_0x2aa71c(0x84)]=_0x3e83fe;const {..._0x2bac8c}=_0x348f8b({},O,this[_0x2aa71c(0xd0)]);this[_0x2aa71c(0x84)][_0x2aa71c(0xb2)](z,_0x2bac8c);}[_0x4fb932(0x83)](){const _0x5659e9=_0x4fb932;[[S],[f],[_]][_0x5659e9(0x95)](_0x303714=>{const _0x338f32=_0x5659e9;this[_0x338f32(0xc5)][_0x338f32(0xd3)](_0x303714);});}[_0x4fb932(0xe7)](){const _0xa8e340=_0x4fb932;this[_0xa8e340(0xc5)][_0xa8e340(0xbd)](f),this[_0xa8e340(0xc5)]['get'](_);}};$(g,_0x4fb932(0xe2),W),$(g,_0x4fb932(0x8b),_0x49b985['UNIVER_UNKNOWN']),g=ie([_0x3d8f7e(_0x95a849,_0x302632,_0x21485d),N(0x1,_0x128bec(_0x4f226c)),N(0x2,_0x1d7854)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x34d6(){const _0x1a1aaa=['rangeId','format','104855noEPLY','parentId','resolveComment','_threadCommentDataSource','getComment','replyId','getMemberID','UniverCollaborationClientPlugin','root','UniverThreadCommentUi','reply','UniverProThreadCommentDatasource','thread-comment-data-source.config','userID','stringify','body','CollaborationSessionService','find','@univerjs/network','_threadCommentModel','Solved','toStringTag','/delete','getOwnPropertyDescriptor','IConfigService','users','userId','_injector','Disposable','365853dyCtWG','onReady','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','error','HTTPService','commentUpdate$','96088UDjIVE','@univerjs-pro/collaboration-client','_userService','ThreadCommentModel','dayjs','rxjs','syncUpdateMutationToColla','153bSQpoB','UniverThreadCommentUIPlugin','UniverLicensePlugin','UniverProLicense','71320ZjrQVA','amd','subscribe','delete','@univerjs/core','_initUserSync','@univerjs/thread-comment-ui','content','3404688MRzOdT','COMMENT','user','function','CustomRangeType','rangeType','_threadCommentDataSourceService','addUser','disposeWithMe','Unknown','5bwmlnl','Add','unitId','getCurrentUser','customRanges','Reply','updateComment','_initDataSource','exports','type','personId','Inject','length','deleteComment','get','getUser','pluginName','UniverThreadComment','OpenOrReOpen','map','DependentOn','_commentService','onStarting','_init','ref','UniverInstanceType','add','size','_configService','UNRECOGNIZED','object','addComment','UserManagerService','dataSource','/list','pipe','1190812zcPYBh','getUnit','saveCommentToSnapshot','forEach','createTimestamp','UniverNetwork','2595420aTxPtt','Delete','UniverCore','YYYY/MM/DD\x20HH:mm','parse','10JhHBTt','symbol','/universer-api/comment/unit/','post','replies','filter','/universer-api/user/list','defineProperty','_config','_httpService','solved','/add','_sessionService','@univerjs-pro/license','2354NyFUrL','Injector','Solve','code','/reply','@univerjs/thread-comment','threadId','Edit','setConfig'];_0x34d6=function(){return _0x1a1aaa;};return _0x34d6();}function _0x43bd(_0x3fc643,_0x5192b9){_0x3fc643=_0x3fc643-0xb5;const _0x34d6f7=_0x34d6();let _0x43bdbb=_0x34d6f7[_0x3fc643];return _0x43bdbb;}(function(_0x1a4e67,_0x501141){const _0x7f0ca1=_0x43bd,_0x5286bd=_0x1a4e67();while(!![]){try{const _0x155c4c=parseInt(_0x7f0ca1(0xf0))/0x1+parseInt(_0x7f0ca1(0xd7))/0x2*(parseInt(_0x7f0ca1(0x10d))/0x3)+parseInt(_0x7f0ca1(0xd2))/0x4+-parseInt(_0x7f0ca1(0x132))/0x5*(-parseInt(_0x7f0ca1(0x128))/0x6)+parseInt(_0x7f0ca1(0xcc))/0x7+parseInt(_0x7f0ca1(0x115))/0x8*(-parseInt(_0x7f0ca1(0x11c))/0x9)+-parseInt(_0x7f0ca1(0x120))/0xa*(parseInt(_0x7f0ca1(0xe5))/0xb);if(_0x155c4c===_0x501141)break;else _0x5286bd['push'](_0x5286bd['shift']());}catch(_0x361105){_0x5286bd['push'](_0x5286bd['shift']());}}}(_0x34d6,0x5a7a2),function(_0x21ab4c,_0x9b5cfb){const _0x185dc1=_0x43bd;typeof exports==_0x185dc1(0xc6)&&typeof module<'u'?_0x9b5cfb(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==_0x185dc1(0x12b)&&define[_0x185dc1(0x121)]?define([_0x185dc1(0x13a),_0x185dc1(0x116),_0x185dc1(0xe4),_0x185dc1(0x124),_0x185dc1(0x126),_0x185dc1(0xea),_0x185dc1(0x11a),_0x185dc1(0x102)],_0x9b5cfb):(_0x21ab4c=typeof globalThis<'u'?globalThis:_0x21ab4c||self,_0x9b5cfb(_0x21ab4c[_0x185dc1(0xfb)]={},_0x21ab4c['UniverProCollaborationClient'],_0x21ab4c[_0x185dc1(0x11f)],_0x21ab4c[_0x185dc1(0xd4)],_0x21ab4c[_0x185dc1(0xf9)],_0x21ab4c[_0x185dc1(0xb9)],_0x21ab4c[_0x185dc1(0x11a)],_0x21ab4c[_0x185dc1(0xd1)]));}(this,function(_0x1cca1d,_0x4804be,_0x2bd3ee,_0x5c8b03,_0xb3c150,_0x332e6a,_0x2f63cc,_0x3ebd5e){'use strict';const _0x39b98c=_0x43bd;const _0x4b3b10=_0x39b98c(0x110);var _0x586a83=(_0x590c4b=>(_0x590c4b[_0x590c4b[_0x39b98c(0xba)]=0x0]=_0x39b98c(0xba),_0x590c4b[_0x590c4b[_0x39b98c(0x104)]=0x1]=_0x39b98c(0x104),_0x590c4b[_0x590c4b[_0x39b98c(0xc5)]=-0x1]=_0x39b98c(0xc5),_0x590c4b))(_0x586a83||{}),_0x1cb75e=(_0x5a29e1=>(_0x5a29e1[_0x5a29e1[_0x39b98c(0x131)]=0x0]='Unknown',_0x5a29e1[_0x5a29e1[_0x39b98c(0x133)]=0x1]='Add',_0x5a29e1[_0x5a29e1['Reply']=0x2]=_0x39b98c(0x137),_0x5a29e1[_0x5a29e1['Edit']=0x3]=_0x39b98c(0xec),_0x5a29e1[_0x5a29e1[_0x39b98c(0xd3)]=0x4]='Delete',_0x5a29e1[_0x5a29e1['Solve']=0x5]='Solve',_0x5a29e1[_0x5a29e1[_0x39b98c(0xc5)]=-0x1]='UNRECOGNIZED',_0x5a29e1))(_0x1cb75e||{});const _0x16c55a=_0x472564=>_0x5c8b03[_0x39b98c(0x119)](new Date(+_0x472564))[_0x39b98c(0xef)](_0x39b98c(0xd5)),_0x38a654=async(_0x13c5f2,_0x1ce11e)=>{const _0x5589b0=_0x39b98c,_0x4c626a=_0x13c5f2[_0x5589b0(0xb6)](_0x5c8b03[_0x5589b0(0xc8)]),_0x17b905=_0x13c5f2[_0x5589b0(0xb6)](_0x3ebd5e[_0x5589b0(0x113)]);_0x1ce11e[_0x5589b0(0xcf)](_0x2b7685=>{const _0x2a3947=_0x5589b0;_0x4c626a[_0x2a3947(0xb7)](_0x2b7685)&&_0x1ce11e[_0x2a3947(0x123)](_0x2b7685);}),_0x1ce11e[_0x5589b0(0xc3)]&&(await _0x17b905['get'](_0x5589b0(0xdd),{'params':{'userIDs':[..._0x1ce11e]}}))[_0x5589b0(0xff)][_0x5589b0(0x109)][_0x5589b0(0xcf)](_0x513687=>{const _0x42fcba=_0x5589b0;_0x513687&&_0x4c626a[_0x42fcba(0x12f)](_0x513687);});};var _0x4b12cb=Object['getOwnPropertyDescriptor'],_0x52e908=(_0x950eeb,_0x3dee68,_0x58f39a,_0x2e5b1c)=>{const _0x4cbccf=_0x39b98c;for(var _0x49bb23=_0x2e5b1c>0x1?void 0x0:_0x2e5b1c?_0x4b12cb(_0x3dee68,_0x58f39a):_0x3dee68,_0x30bd03=_0x950eeb[_0x4cbccf(0x13e)]-0x1,_0x129fa2;_0x30bd03>=0x0;_0x30bd03--)(_0x129fa2=_0x950eeb[_0x30bd03])&&(_0x49bb23=_0x129fa2(_0x49bb23)||_0x49bb23);return _0x49bb23;},_0x37510e=(_0xf7881e,_0x5d8825)=>(_0x3bc284,_0x1e6aca)=>_0x5d8825(_0x3bc284,_0x1e6aca,_0xf7881e);let _0x1c1924=class extends _0x5c8b03[_0x39b98c(0x10c)]{constructor(_0x4f8eed,_0xdf87bd,_0x3b2635,_0x2af54e){const _0x4ac3d0=_0x39b98c;super(),this['_commentService']=_0x4f8eed,this[_0x4ac3d0(0x103)]=_0xdf87bd,this['_userService']=_0x3b2635,this[_0x4ac3d0(0x10b)]=_0x2af54e,this[_0x4ac3d0(0xbf)](),this[_0x4ac3d0(0x125)]();}[_0x39b98c(0x125)](){const _0x571ad4=_0x39b98c;this[_0x571ad4(0x130)](this[_0x571ad4(0x103)][_0x571ad4(0x114)][_0x571ad4(0xcb)](_0x2f63cc['bufferTime'](0x10))[_0x571ad4(0x122)](_0x352044=>{const _0x16e39c=_0x571ad4,_0x428df9=new Set();_0x352044[_0x16e39c(0xcf)](_0x32abc9=>{const _0x904dac=_0x16e39c;switch(_0x32abc9[_0x904dac(0x13b)]){case'add':{const _0x128376=_0x32abc9['payload'][_0x904dac(0x13c)];_0x428df9[_0x904dac(0xc2)](_0x128376);break;}}}),_0x38a654(this[_0x16e39c(0x10b)],_0x428df9);}));}['_init'](){const _0x314883=_0x39b98c;this[_0x314883(0x130)](this[_0x314883(0xbd)][_0x314883(0x114)][_0x314883(0x122)](async _0x2f9015=>{const _0x49e2af=_0x314883;var _0x2101ea,_0xe50909,_0x338463,_0x11930b;const _0x39da5f=(_0x2101ea=this[_0x49e2af(0x103)][_0x49e2af(0xcd)](_0x2f9015[_0x49e2af(0x134)])[_0x49e2af(0x101)](_0x18bc57=>_0x18bc57[_0x49e2af(0xeb)]===_0x2f9015['threadId']))==null?void 0x0:_0x2101ea[_0x49e2af(0xf8)];if(!_0x39da5f)return;const {unitId:_0x2cdb83,subUnitId:_0x502351}=_0x39da5f;switch(_0x2f9015[_0x49e2af(0x12a)]&&this[_0x49e2af(0x117)]['addUser'](_0x2f9015[_0x49e2af(0x12a)]),_0x2f9015['type']){case _0x1cb75e[_0x49e2af(0x133)]:break;case _0x1cb75e['Reply']:{this['_threadCommentModel']['addComment'](_0x2cdb83,_0x502351,{'unitId':_0x2cdb83,'subUnitId':_0x502351,'ref':'','id':_0x2f9015[_0x49e2af(0xf5)],'dT':_0x16c55a(+_0x2f9015[_0x49e2af(0xd0)]),'threadId':_0x2f9015['threadId'],'personId':(_0x338463=(_0xe50909=_0x2f9015[_0x49e2af(0x12a)])==null?void 0x0:_0xe50909[_0x49e2af(0xfd)])!=null?_0x338463:_0x2f9015[_0x49e2af(0x10a)],'text':JSON[_0x49e2af(0xd6)](_0x2f9015[_0x49e2af(0x127)]),'parentId':_0x39da5f['id']});break;}case _0x1cb75e[_0x49e2af(0xd3)]:{const _0x539cd6=this[_0x49e2af(0x103)][_0x49e2af(0xf4)](_0x2cdb83,_0x502351,_0x2f9015[_0x49e2af(0xf5)]);_0x539cd6&&_0x539cd6[_0x49e2af(0xf1)]&&this[_0x49e2af(0x103)][_0x49e2af(0xb5)](_0x2cdb83,_0x502351,_0x2f9015[_0x49e2af(0xf5)]);break;}case _0x1cb75e['Edit']:{this[_0x49e2af(0x103)][_0x49e2af(0x138)](_0x2cdb83,_0x502351,{'commentId':_0x2f9015['replyId'],'text':JSON[_0x49e2af(0xd6)](_0x2f9015[_0x49e2af(0x127)])});break;}case _0x1cb75e[_0x49e2af(0xe7)]:{const _0x119090=(_0x11930b=this[_0x49e2af(0x103)]['getUnit'](_0x2f9015[_0x49e2af(0x134)])[_0x49e2af(0x101)](_0x4d8be0=>_0x4d8be0[_0x49e2af(0xeb)]===_0x2f9015[_0x49e2af(0xeb)]))==null?void 0x0:_0x11930b[_0x49e2af(0xf8)];_0x119090&&this[_0x49e2af(0x103)][_0x49e2af(0xf2)](_0x2cdb83,_0x502351,_0x119090['id'],_0x2f9015['solved']===_0x586a83['Solved']);break;}}}));}};_0x1c1924=_0x52e908([_0x37510e(0x0,_0x5c8b03[_0x39b98c(0x13d)](_0x4804be['CommentService'])),_0x37510e(0x1,_0x5c8b03['Inject'](_0x332e6a[_0x39b98c(0x118)])),_0x37510e(0x2,_0x5c8b03[_0x39b98c(0x13d)](_0x5c8b03['UserManagerService'])),_0x37510e(0x3,_0x5c8b03[_0x39b98c(0x13d)](_0x5c8b03[_0x39b98c(0xe6)]))],_0x1c1924);const _0x59b6ad=_0x39b98c(0xfc),_0xde8992={};var _0x20bc11=Object['getOwnPropertyDescriptor'],_0x3f4890=(_0x22a039,_0x459692,_0x2e0617,_0x3c6feb)=>{const _0x51c63a=_0x39b98c;for(var _0x6f956b=_0x3c6feb>0x1?void 0x0:_0x3c6feb?_0x20bc11(_0x459692,_0x2e0617):_0x459692,_0x488ad8=_0x22a039[_0x51c63a(0x13e)]-0x1,_0x38cd44;_0x488ad8>=0x0;_0x488ad8--)(_0x38cd44=_0x22a039[_0x488ad8])&&(_0x6f956b=_0x38cd44(_0x6f956b)||_0x6f956b);return _0x6f956b;},_0x1ae8bc=(_0x3e93d8,_0x50e3c7)=>(_0x465d16,_0x4a4d2c)=>_0x50e3c7(_0x465d16,_0x4a4d2c,_0x3e93d8);function _0x43c20a(_0x430fcf,_0x5d64e6){const _0x213364=_0x39b98c,_0x11a6a9=_0x430fcf[_0x213364(0xdb)][0x0];return{..._0x5d64e6,'id':_0x11a6a9['replyId'],'resolved':_0x430fcf[_0x213364(0xe1)]===0x1,'dT':_0x16c55a(_0x11a6a9[_0x213364(0xd0)]),'personId':_0x11a6a9[_0x213364(0x10a)],'threadId':_0x11a6a9['threadId']};}function _0x1043ed(_0x12f6bb,_0x3a2181,_0x10280c){const _0x1eee2d=_0x39b98c;var _0x1e83e8,_0x3b12ff;if(((_0x3b12ff=(_0x1e83e8=_0x12f6bb==null?void 0x0:_0x12f6bb[_0x1eee2d(0xdb)])==null?void 0x0:_0x1e83e8[_0x1eee2d(0x13e)])!=null?_0x3b12ff:0x0)>0x0){const _0x3e735=(_0x5392ab,_0x1b4a34)=>({'id':_0x5392ab[_0x1eee2d(0xf5)],'threadId':_0x5392ab[_0x1eee2d(0xeb)],'dT':_0x16c55a(_0x5392ab[_0x1eee2d(0xd0)]),'personId':_0x5392ab[_0x1eee2d(0x10a)],'resolved':_0x12f6bb[_0x1eee2d(0xe1)]===_0x586a83[_0x1eee2d(0x104)],'unitId':_0x3a2181,'subUnitId':_0x10280c,'text':JSON[_0x1eee2d(0xd6)](_0x5392ab['content']),'parentId':_0x1b4a34}),_0x3ea749=_0x3e735(_0x12f6bb['replies'][0x0]);return{..._0x3ea749,'children':_0x12f6bb['replies']['slice'](0x1)['map'](_0x344124=>_0x3e735(_0x344124,_0x3ea749['id']))};}return null;}let _0x4468b7=class{constructor(_0x4a2626,_0x2296de,_0x501509){const _0x4f015c=_0x39b98c;this[_0x4f015c(0xe0)]=_0x4a2626,this[_0x4f015c(0x117)]=_0x2296de,this['_sessionService']=_0x501509;}async[_0x39b98c(0xc7)](_0x1afbfc){const _0x3ac9db=_0x39b98c;var _0x37b489,_0x45abc9;const {parentId:_0x3d8861,unitId:_0x6db85c,text:_0x33297d,threadId:_0xdb32a3}=_0x1afbfc,_0x266fe1=(_0x45abc9=(_0x37b489=_0x33297d[_0x3ac9db(0x136)])==null?void 0x0:_0x37b489[_0x3ac9db(0xdc)](_0x56bcf9=>_0x56bcf9[_0x3ac9db(0x12d)]===_0x5c8b03[_0x3ac9db(0x12c)][_0x3ac9db(0x129)])[_0x3ac9db(0xbb)](_0x3d069a=>_0x3d069a[_0x3ac9db(0xee)]))!=null?_0x45abc9:[],_0x48b580=JSON['stringify'](_0x33297d),_0x17ad04=(await this['_sessionService'][_0x3ac9db(0x10f)](_0x6db85c))[_0x3ac9db(0xf6)]();if(_0x3d8861){const _0x3e0433={'memberId':_0x17ad04,'unitId':_0x6db85c,'content':_0x48b580,'mention':_0x266fe1,'threadId':_0xdb32a3},_0x334342=(await this['_httpService'][_0x3ac9db(0xda)]('/universer-api/comment/unit/'+_0x6db85c+_0x3ac9db(0xe9),{'body':_0x3e0433}))['body'][_0x3ac9db(0xfa)];return{..._0x1afbfc,'id':_0x334342[_0x3ac9db(0xf5)],'dT':_0x5c8b03['dayjs'](+_0x334342[_0x3ac9db(0xd0)])[_0x3ac9db(0xef)](_0x3ac9db(0xd5)),'personId':_0x334342[_0x3ac9db(0x10a)]};}else{const _0x1dba6c={'memberId':_0x17ad04,'unitId':_0x6db85c,'content':_0x48b580,'mention':_0x266fe1},_0x2c405b=await this[_0x3ac9db(0xe0)][_0x3ac9db(0xda)](_0x3ac9db(0xd9)+_0x6db85c+_0x3ac9db(0xe2),{'body':_0x1dba6c});return _0x43c20a(_0x2c405b[_0x3ac9db(0xff)]['comment'],_0x1afbfc);}}async[_0x39b98c(0x138)](_0x1ac5d1){const _0x4428ae=_0x39b98c;var _0x432f6b,_0x4230cb;const {text:_0x40cf19,unitId:_0x251e96}=_0x1ac5d1,_0x4275b2=(_0x4230cb=(_0x432f6b=_0x40cf19[_0x4428ae(0x136)])==null?void 0x0:_0x432f6b[_0x4428ae(0xdc)](_0x212642=>_0x212642[_0x4428ae(0x12d)]===_0x5c8b03[_0x4428ae(0x12c)][_0x4428ae(0x129)])[_0x4428ae(0xbb)](_0x2c24d3=>_0x2c24d3['rangeId']))!=null?_0x4230cb:[],_0x448792=JSON[_0x4428ae(0xfe)](_0x40cf19),_0x200d1a=_0x1ac5d1[_0x4428ae(0xeb)],_0x8befe6=_0x1ac5d1['id'],_0x2fc13b={'memberId':(await this[_0x4428ae(0xe3)][_0x4428ae(0x10f)](_0x251e96))['getMemberID'](),'unitId':_0x251e96,'threadId':_0x200d1a,'mention':_0x4275b2,'content':_0x448792,'replyId':_0x8befe6},_0x55cdbc=await this[_0x4428ae(0xe0)][_0x4428ae(0xda)](_0x4428ae(0xd9)+_0x251e96+'/edit',{'body':_0x2fc13b});return!_0x55cdbc[_0x4428ae(0xff)][_0x4428ae(0x112)]||_0x55cdbc[_0x4428ae(0xff)]['error'][_0x4428ae(0xe8)]===0x1;}async[_0x39b98c(0xf2)](_0x7ebaa1){const _0x1b4af5=_0x39b98c,{unitId:_0x2ac13f}=_0x7ebaa1,_0x281b7a=_0x7ebaa1[_0x1b4af5(0xeb)],_0x2a1a8d={'memberId':this[_0x1b4af5(0x117)][_0x1b4af5(0x135)]()['userID'],'unitId':_0x2ac13f,'threadId':_0x281b7a,'solved':_0x7ebaa1[_0x1b4af5(0x111)]?_0x586a83[_0x1b4af5(0x104)]:_0x586a83['OpenOrReOpen']},_0x107227=await this['_httpService'][_0x1b4af5(0xda)](_0x1b4af5(0xd9)+_0x2ac13f+'/solved',{'body':_0x2a1a8d});return!_0x107227[_0x1b4af5(0xff)][_0x1b4af5(0x112)]||_0x107227[_0x1b4af5(0xff)]['error'][_0x1b4af5(0xe8)]===0x1;}async[_0x39b98c(0xb5)](_0x375298,_0x3674d3,_0x1ff20a,_0x2a12a1){const _0x1d0697=_0x39b98c,_0x4e168d={'memberId':(await this[_0x1d0697(0xe3)][_0x1d0697(0x10f)](_0x375298))[_0x1d0697(0xf6)](),'threadId':_0x1ff20a,'replyId':_0x2a12a1,'unitId':_0x375298},_0x315086=await this[_0x1d0697(0xe0)]['post'](_0x1d0697(0xd9)+_0x375298+_0x1d0697(0x106),{'body':_0x4e168d});return!_0x315086[_0x1d0697(0xff)][_0x1d0697(0x112)]||_0x315086[_0x1d0697(0xff)][_0x1d0697(0x112)][_0x1d0697(0xe8)]===0x1;}async['listComments'](_0x29f7f1,_0xbae825,_0x223202){const _0x3fa659=_0x39b98c,_0x3f2529={'unitId':_0x29f7f1,'threadId':_0x223202},_0x403d36=await this['_httpService'][_0x3fa659(0xda)](_0x3fa659(0xd9)+_0x29f7f1+_0x3fa659(0xca),{'body':_0x3f2529}),_0x45be39=_0x223202[_0x3fa659(0xbb)](_0x46fddf=>_0x1043ed(_0x403d36['body']['comments'][_0x46fddf],_0x29f7f1,_0xbae825))[_0x3fa659(0xdc)](Boolean);return Object['values'](_0x403d36[_0x3fa659(0xff)][_0x3fa659(0x109)])['forEach'](_0x455e1c=>{const _0x54ef89=_0x3fa659;this['_userService'][_0x54ef89(0x12f)](_0x455e1c);}),_0x45be39;}[_0x39b98c(0xce)](_0x49754c){const _0x5aec63=_0x39b98c;return{'id':_0x49754c['id'],'threadId':_0x49754c[_0x5aec63(0xeb)],'ref':_0x49754c[_0x5aec63(0xc0)]};}};_0x4468b7=_0x3f4890([_0x1ae8bc(0x0,_0x5c8b03[_0x39b98c(0x13d)](_0x3ebd5e[_0x39b98c(0x113)])),_0x1ae8bc(0x1,_0x5c8b03['Inject'](_0x5c8b03[_0x39b98c(0xc8)])),_0x1ae8bc(0x2,_0x5c8b03[_0x39b98c(0x13d)](_0x4804be[_0x39b98c(0x100)]))],_0x4468b7);var _0x12367d=Object[_0x39b98c(0x107)],_0x3316fb=(_0x38ea25,_0x5827bb,_0x534bcd,_0x593865)=>{const _0x1314b5=_0x39b98c;for(var _0x3b8d0f=_0x593865>0x1?void 0x0:_0x593865?_0x12367d(_0x5827bb,_0x534bcd):_0x5827bb,_0x6ae820=_0x38ea25[_0x1314b5(0x13e)]-0x1,_0x2be5a4;_0x6ae820>=0x0;_0x6ae820--)(_0x2be5a4=_0x38ea25[_0x6ae820])&&(_0x3b8d0f=_0x2be5a4(_0x3b8d0f)||_0x3b8d0f);return _0x3b8d0f;},_0x7b172a=(_0x20fc52,_0x4178a9)=>(_0x42aa35,_0x5681cb)=>_0x4178a9(_0x42aa35,_0x5681cb,_0x20fc52);let _0x172f4f=class extends _0x5c8b03['Disposable']{constructor(_0x28ea53,_0x20a192){const _0x3a47e0=_0x39b98c;super(),this[_0x3a47e0(0x12e)]=_0x28ea53,this[_0x3a47e0(0xf3)]=_0x20a192,this[_0x3a47e0(0x139)]();}[_0x39b98c(0x139)](){const _0x5e8dd7=_0x39b98c;this['_threadCommentDataSourceService'][_0x5e8dd7(0xc9)]=this[_0x5e8dd7(0xf3)],this['_threadCommentDataSourceService'][_0x5e8dd7(0x11b)]=!0x1;}};_0x172f4f=_0x3316fb([_0x7b172a(0x0,_0x332e6a['IThreadCommentDataSourceService']),_0x7b172a(0x1,_0x5c8b03[_0x39b98c(0x13d)](_0x4468b7))],_0x172f4f);var _0x148c1f=Object[_0x39b98c(0xde)],_0x4a004a=Object[_0x39b98c(0x107)],_0x309698=(_0x1971d8,_0x2f4949,_0x3e0fca)=>_0x2f4949 in _0x1971d8?_0x148c1f(_0x1971d8,_0x2f4949,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e0fca}):_0x1971d8[_0x2f4949]=_0x3e0fca,_0x215408=(_0x7a883a,_0x26c37d,_0x4c5d8d,_0x49aaa5)=>{const _0x3d254e=_0x39b98c;for(var _0x46570b=_0x49aaa5>0x1?void 0x0:_0x49aaa5?_0x4a004a(_0x26c37d,_0x4c5d8d):_0x26c37d,_0x5d8317=_0x7a883a[_0x3d254e(0x13e)]-0x1,_0x32b7ec;_0x5d8317>=0x0;_0x5d8317--)(_0x32b7ec=_0x7a883a[_0x5d8317])&&(_0x46570b=_0x32b7ec(_0x46570b)||_0x46570b);return _0x46570b;},_0x1ea36f=(_0x37c14e,_0x2462ef)=>(_0x582504,_0x285073)=>_0x2462ef(_0x582504,_0x285073,_0x37c14e),_0x1d99dc=(_0x49a314,_0x20431e,_0x47e2d7)=>_0x309698(_0x49a314,typeof _0x20431e!=_0x39b98c(0xd8)?_0x20431e+'':_0x20431e,_0x47e2d7);_0x1cca1d['UniverThreadCommentDataSourcePlugin']=class extends _0x5c8b03['Plugin']{constructor(_0x148b01=_0xde8992,_0x467c5e,_0xf4ff8d){const _0x31a4a5=_0x39b98c;super(),this[_0x31a4a5(0xdf)]=_0x148b01,this[_0x31a4a5(0x10b)]=_0x467c5e,this[_0x31a4a5(0xc4)]=_0xf4ff8d;const {..._0x4d1928}=_0x5c8b03['merge']({},_0xde8992,this[_0x31a4a5(0xdf)]);this[_0x31a4a5(0xc4)][_0x31a4a5(0xed)](_0x59b6ad,_0x4d1928);}[_0x39b98c(0xbe)](){const _0x59a4bb=_0x39b98c;[[_0x4468b7],[_0x172f4f],[_0x1c1924]][_0x59a4bb(0xcf)](_0x25f6e8=>{const _0x47c4eb=_0x59a4bb;this[_0x47c4eb(0x10b)][_0x47c4eb(0xc2)](_0x25f6e8);});}[_0x39b98c(0x10e)](){const _0x31a8ac=_0x39b98c;this['_injector'][_0x31a8ac(0xb6)](_0x172f4f),this[_0x31a8ac(0x10b)]['get'](_0x1c1924);}},_0x1d99dc(_0x1cca1d['UniverThreadCommentDataSourcePlugin'],_0x39b98c(0xb8),_0x4b3b10),_0x1d99dc(_0x1cca1d['UniverThreadCommentDataSourcePlugin'],_0x39b98c(0x13b),_0x5c8b03[_0x39b98c(0xc1)]['UNIVER_UNKNOWN']),_0x1cca1d['UniverThreadCommentDataSourcePlugin']=_0x215408([_0x5c8b03[_0x39b98c(0xbc)](_0xb3c150[_0x39b98c(0x11d)],_0x4804be[_0x39b98c(0xf7)],_0x2bd3ee[_0x39b98c(0x11e)]),_0x1ea36f(0x1,_0x5c8b03[_0x39b98c(0x13d)](_0x5c8b03['Injector'])),_0x1ea36f(0x2,_0x5c8b03[_0x39b98c(0x108)])],_0x1cca1d['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x1cca1d,Symbol[_0x39b98c(0x105)],{'value':'Module'});}));
1
+ function _0x2373(_0x50b736,_0x3a5b2e){_0x50b736=_0x50b736-0x1d3;const _0x302449=_0x3024();let _0x2373d9=_0x302449[_0x50b736];return _0x2373d9;}function _0x3024(){const _0x2a2e04=['reply','@univerjs/thread-comment-ui','object','defineProperty','userId','pipe','size','_userService','ThreadCommentModel','forEach','subscribe','CollaborationSessionService','length','replyId','threadId','saveCommentToSnapshot','syncUpdateMutationToColla','CustomRangeType','replies','@univerjs/core','/list','/delete','map','setConfig','customRanges','root','find','deleteComment','comment','payload','Disposable','_threadCommentModel','stringify','COMMENT','filter','_threadCommentDataSourceService','requireSession','getOwnPropertyDescriptor','/edit','_sessionService','_threadCommentDataSource','UNIVER_UNKNOWN','_commentService','500255KvQMvS','Reply','addUser','@univerjs-pro/license','getUnit','content','607912FwCcgK','UniverLicensePlugin','dayjs','45zdANKb','@univerjs-pro/collaboration-client','user','225WCglUl','error','getCurrentUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_init','rangeType','Edit','44880DqhNAh','UniverCollaborationClientPlugin','UniverThreadCommentDataSourcePlugin','_initUserSync','resolved','OpenOrReOpen','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','UniverProLicense','_injector','UserManagerService','ref','@univerjs/thread-comment','UniverThreadComment','updateComment','UniverInstanceType','resolveComment','_config','disposeWithMe','Delete','users','Plugin','body','22844FhgZna','462424aTqPEV','6nofFwO','values','type','onStarting','DependentOn','IThreadCommentDataSourceService','commentUpdate$','310640twzsTq','Module','3167230uKMWyr','function','parse','UniverThreadCommentUIPlugin','rxjs','add','getUser','dataSource','addComment','Add','post','symbol','parentId','HTTPService','solved','unitId','code','get','exports','amd','pluginName','/universer-api/comment/unit/','_configService','getMemberID','UNRECOGNIZED','CommentService','_httpService','UniverProThreadCommentDatasource','slice','Inject','IConfigService','listComments','format','createTimestamp','Solve','_initDataSource','Injector','UniverCore','toStringTag','comments'];_0x3024=function(){return _0x2a2e04;};return _0x3024();}(function(_0x3d863e,_0x18d98d){const _0x47bec1=_0x2373,_0x366be7=_0x3d863e();while(!![]){try{const _0x18236a=parseInt(_0x47bec1(0x220))/0x1+-parseInt(_0x47bec1(0x238))/0x2+-parseInt(_0x47bec1(0x219))/0x3*(parseInt(_0x47bec1(0x237))/0x4)+parseInt(_0x47bec1(0x240))/0x5*(parseInt(_0x47bec1(0x239))/0x6)+parseInt(_0x47bec1(0x20d))/0x7+-parseInt(_0x47bec1(0x213))/0x8*(-parseInt(_0x47bec1(0x216))/0x9)+parseInt(_0x47bec1(0x242))/0xa;if(_0x18236a===_0x18d98d)break;else _0x366be7['push'](_0x366be7['shift']());}catch(_0x2d818a){_0x366be7['push'](_0x366be7['shift']());}}}(_0x3024,0x34a34),function(_0x25293b,_0xa6ed5d){const _0x4166e5=_0x2373;typeof exports==_0x4166e5(0x1e4)&&typeof module<'u'?_0xa6ed5d(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==_0x4166e5(0x243)&&define[_0x4166e5(0x255)]?define([_0x4166e5(0x254),_0x4166e5(0x217),_0x4166e5(0x210),_0x4166e5(0x1f5),_0x4166e5(0x1e3),_0x4166e5(0x22c),_0x4166e5(0x246),'@univerjs/network'],_0xa6ed5d):(_0x25293b=typeof globalThis<'u'?globalThis:_0x25293b||self,_0xa6ed5d(_0x25293b[_0x4166e5(0x1d5)]={},_0x25293b['UniverProCollaborationClient'],_0x25293b[_0x4166e5(0x228)],_0x25293b[_0x4166e5(0x1df)],_0x25293b['UniverThreadCommentUi'],_0x25293b[_0x4166e5(0x22d)],_0x25293b['rxjs'],_0x25293b['UniverNetwork']));}(this,function(_0x396d53,_0x23ce89,_0x3f5f49,_0x7e2ec,_0x53347e,_0x48618d,_0x257664,_0x384937){'use strict';const _0x1f5f39=_0x2373;const _0x4c3067=_0x1f5f39(0x21c);var _0xe7f05c=(_0x4723b2=>(_0x4723b2[_0x4723b2['OpenOrReOpen']=0x0]=_0x1f5f39(0x225),_0x4723b2[_0x4723b2['Solved']=0x1]='Solved',_0x4723b2[_0x4723b2[_0x1f5f39(0x25a)]=-0x1]=_0x1f5f39(0x25a),_0x4723b2))(_0xe7f05c||{}),_0x493f24=(_0x341691=>(_0x341691[_0x341691['Unknown']=0x0]='Unknown',_0x341691[_0x341691[_0x1f5f39(0x24b)]=0x1]=_0x1f5f39(0x24b),_0x341691[_0x341691[_0x1f5f39(0x20e)]=0x2]='Reply',_0x341691[_0x341691['Edit']=0x3]=_0x1f5f39(0x21f),_0x341691[_0x341691[_0x1f5f39(0x233)]=0x4]=_0x1f5f39(0x233),_0x341691[_0x341691[_0x1f5f39(0x1dc)]=0x5]=_0x1f5f39(0x1dc),_0x341691[_0x341691[_0x1f5f39(0x25a)]=-0x1]=_0x1f5f39(0x25a),_0x341691))(_0x493f24||{});const _0x25b1db=_0x8ba333=>_0x7e2ec[_0x1f5f39(0x215)](new Date(+_0x8ba333))[_0x1f5f39(0x1da)](_0x1f5f39(0x227)),_0x426506=async(_0x1c82e9,_0x4eafc2)=>{const _0x8c660a=_0x1f5f39,_0x32205a=_0x1c82e9[_0x8c660a(0x253)](_0x7e2ec[_0x8c660a(0x22a)]),_0x394cbf=_0x1c82e9[_0x8c660a(0x253)](_0x384937[_0x8c660a(0x24f)]);_0x4eafc2[_0x8c660a(0x1eb)](_0x3c01e0=>{const _0x42ba2e=_0x8c660a;_0x32205a[_0x42ba2e(0x248)](_0x3c01e0)&&_0x4eafc2['delete'](_0x3c01e0);}),_0x4eafc2[_0x8c660a(0x1e8)]&&(await _0x394cbf[_0x8c660a(0x253)](_0x8c660a(0x226),{'params':{'userIDs':[..._0x4eafc2]}}))[_0x8c660a(0x236)][_0x8c660a(0x234)][_0x8c660a(0x1eb)](_0x4f1dde=>{_0x4f1dde&&_0x32205a['addUser'](_0x4f1dde);});};var _0x524a9a=Object['getOwnPropertyDescriptor'],_0x35bcb0=(_0x5c9ddc,_0x5d7288,_0x26a353,_0x25dab6)=>{const _0x24d4d2=_0x1f5f39;for(var _0x26b55c=_0x25dab6>0x1?void 0x0:_0x25dab6?_0x524a9a(_0x5d7288,_0x26a353):_0x5d7288,_0x1d08db=_0x5c9ddc[_0x24d4d2(0x1ee)]-0x1,_0x47a467;_0x1d08db>=0x0;_0x1d08db--)(_0x47a467=_0x5c9ddc[_0x1d08db])&&(_0x26b55c=_0x47a467(_0x26b55c)||_0x26b55c);return _0x26b55c;},_0x2fe67e=(_0x49e349,_0x265de8)=>(_0x180535,_0x55e965)=>_0x265de8(_0x180535,_0x55e965,_0x49e349);let _0x12a999=class extends _0x7e2ec[_0x1f5f39(0x200)]{constructor(_0xd622f7,_0x30149f,_0x3ae35d,_0xfa996a){const _0x58abcf=_0x1f5f39;super(),this['_commentService']=_0xd622f7,this[_0x58abcf(0x201)]=_0x30149f,this[_0x58abcf(0x1e9)]=_0x3ae35d,this[_0x58abcf(0x229)]=_0xfa996a,this[_0x58abcf(0x21d)](),this[_0x58abcf(0x223)]();}['_initUserSync'](){const _0x1eb3d7=_0x1f5f39;this[_0x1eb3d7(0x232)](this[_0x1eb3d7(0x201)][_0x1eb3d7(0x23f)][_0x1eb3d7(0x1e7)](_0x257664['bufferTime'](0x10))[_0x1eb3d7(0x1ec)](_0x439756=>{const _0xaedd3a=_0x1eb3d7,_0xc138c2=new Set();_0x439756[_0xaedd3a(0x1eb)](_0x786694=>{const _0x15f769=_0xaedd3a;switch(_0x786694[_0x15f769(0x23b)]){case _0x15f769(0x247):{const _0x1c3b53=_0x786694[_0x15f769(0x1ff)]['personId'];_0xc138c2[_0x15f769(0x247)](_0x1c3b53);break;}}}),_0x426506(this['_injector'],_0xc138c2);}));}[_0x1f5f39(0x21d)](){const _0x4ecb34=_0x1f5f39;this[_0x4ecb34(0x232)](this[_0x4ecb34(0x20c)][_0x4ecb34(0x23f)]['subscribe'](async _0x294d09=>{const _0x1c82da=_0x4ecb34;var _0x1c7aa6,_0x17d4fb,_0x48c196,_0x58ba0d;const _0x4076e6=(_0x1c7aa6=this[_0x1c82da(0x201)][_0x1c82da(0x211)](_0x294d09['unitId'])[_0x1c82da(0x1fc)](_0x3a2023=>_0x3a2023[_0x1c82da(0x1f0)]===_0x294d09['threadId']))==null?void 0x0:_0x1c7aa6[_0x1c82da(0x1fb)];if(!_0x4076e6)return;const {unitId:_0x205a2a,subUnitId:_0x37a88c}=_0x4076e6;switch(_0x294d09['user']&&this[_0x1c82da(0x1e9)]['addUser'](_0x294d09[_0x1c82da(0x218)]),_0x294d09[_0x1c82da(0x23b)]){case _0x493f24['Add']:break;case _0x493f24['Reply']:{this[_0x1c82da(0x201)]['addComment'](_0x205a2a,_0x37a88c,{'unitId':_0x205a2a,'subUnitId':_0x37a88c,'ref':'','id':_0x294d09['replyId'],'dT':_0x25b1db(+_0x294d09[_0x1c82da(0x1db)]),'threadId':_0x294d09[_0x1c82da(0x1f0)],'personId':(_0x48c196=(_0x17d4fb=_0x294d09[_0x1c82da(0x218)])==null?void 0x0:_0x17d4fb['userID'])!=null?_0x48c196:_0x294d09[_0x1c82da(0x1e6)],'text':JSON[_0x1c82da(0x244)](_0x294d09[_0x1c82da(0x212)]),'parentId':_0x4076e6['id']});break;}case _0x493f24[_0x1c82da(0x233)]:{const _0x3f98f7=this['_threadCommentModel']['getComment'](_0x205a2a,_0x37a88c,_0x294d09[_0x1c82da(0x1ef)]);_0x3f98f7&&_0x3f98f7[_0x1c82da(0x24e)]&&this[_0x1c82da(0x201)][_0x1c82da(0x1fd)](_0x205a2a,_0x37a88c,_0x294d09[_0x1c82da(0x1ef)]);break;}case _0x493f24['Edit']:{this[_0x1c82da(0x201)][_0x1c82da(0x22e)](_0x205a2a,_0x37a88c,{'commentId':_0x294d09[_0x1c82da(0x1ef)],'text':JSON[_0x1c82da(0x244)](_0x294d09[_0x1c82da(0x212)])});break;}case _0x493f24[_0x1c82da(0x1dc)]:{const _0xe3d5c8=(_0x58ba0d=this['_threadCommentModel'][_0x1c82da(0x211)](_0x294d09[_0x1c82da(0x251)])['find'](_0x4470ba=>_0x4470ba[_0x1c82da(0x1f0)]===_0x294d09[_0x1c82da(0x1f0)]))==null?void 0x0:_0x58ba0d[_0x1c82da(0x1fb)];_0xe3d5c8&&this[_0x1c82da(0x201)]['resolveComment'](_0x205a2a,_0x37a88c,_0xe3d5c8['id'],_0x294d09[_0x1c82da(0x250)]===_0xe7f05c['Solved']);break;}}}));}};_0x12a999=_0x35bcb0([_0x2fe67e(0x0,_0x7e2ec[_0x1f5f39(0x1d7)](_0x23ce89[_0x1f5f39(0x1d3)])),_0x2fe67e(0x1,_0x7e2ec[_0x1f5f39(0x1d7)](_0x48618d[_0x1f5f39(0x1ea)])),_0x2fe67e(0x2,_0x7e2ec[_0x1f5f39(0x1d7)](_0x7e2ec[_0x1f5f39(0x22a)])),_0x2fe67e(0x3,_0x7e2ec['Inject'](_0x7e2ec['Injector']))],_0x12a999);const _0x34db90='thread-comment-data-source.config',_0x4cd41b={};var _0x300291=Object['getOwnPropertyDescriptor'],_0x22698f=(_0x57e3db,_0x3cabac,_0x581d0e,_0x22565f)=>{for(var _0x1cad57=_0x22565f>0x1?void 0x0:_0x22565f?_0x300291(_0x3cabac,_0x581d0e):_0x3cabac,_0x111ec0=_0x57e3db['length']-0x1,_0x3f7332;_0x111ec0>=0x0;_0x111ec0--)(_0x3f7332=_0x57e3db[_0x111ec0])&&(_0x1cad57=_0x3f7332(_0x1cad57)||_0x1cad57);return _0x1cad57;},_0x4e97e5=(_0x31aed8,_0x5da593)=>(_0xd0b8be,_0x3e4aed)=>_0x5da593(_0xd0b8be,_0x3e4aed,_0x31aed8);function _0x173e65(_0xd007b7,_0x4a842f){const _0x492838=_0x1f5f39,_0x216542=_0xd007b7[_0x492838(0x1f4)][0x0];return{..._0x4a842f,'id':_0x216542[_0x492838(0x1ef)],'resolved':_0xd007b7[_0x492838(0x250)]===0x1,'dT':_0x25b1db(_0x216542['createTimestamp']),'personId':_0x216542[_0x492838(0x1e6)],'threadId':_0x216542['threadId']};}function _0xa22d72(_0x742c20,_0x429dde,_0xcdd301){const _0x57c137=_0x1f5f39;var _0x5175ef,_0x4f448b;if(((_0x4f448b=(_0x5175ef=_0x742c20==null?void 0x0:_0x742c20['replies'])==null?void 0x0:_0x5175ef[_0x57c137(0x1ee)])!=null?_0x4f448b:0x0)>0x0){const _0x51636e=(_0x147688,_0x179863)=>({'id':_0x147688[_0x57c137(0x1ef)],'threadId':_0x147688[_0x57c137(0x1f0)],'dT':_0x25b1db(_0x147688[_0x57c137(0x1db)]),'personId':_0x147688[_0x57c137(0x1e6)],'resolved':_0x742c20[_0x57c137(0x250)]===_0xe7f05c['Solved'],'unitId':_0x429dde,'subUnitId':_0xcdd301,'text':JSON[_0x57c137(0x244)](_0x147688['content']),'parentId':_0x179863}),_0x116a44=_0x51636e(_0x742c20['replies'][0x0]);return{..._0x116a44,'children':_0x742c20['replies'][_0x57c137(0x1d6)](0x1)[_0x57c137(0x1f8)](_0x407b92=>_0x51636e(_0x407b92,_0x116a44['id']))};}return null;}let _0x4c9f94=class{constructor(_0xd3d0a7,_0x33e10c,_0x11e7e4){const _0x121bbe=_0x1f5f39;this[_0x121bbe(0x1d4)]=_0xd3d0a7,this[_0x121bbe(0x1e9)]=_0x33e10c,this[_0x121bbe(0x209)]=_0x11e7e4;}async[_0x1f5f39(0x24a)](_0x270c1f){const _0x133ee5=_0x1f5f39;var _0x214d46,_0x548c1d;const {parentId:_0xb890cf,unitId:_0x1cf97f,text:_0x5c6e4d,threadId:_0x5b0764}=_0x270c1f,_0x472e26=(_0x548c1d=(_0x214d46=_0x5c6e4d[_0x133ee5(0x1fa)])==null?void 0x0:_0x214d46[_0x133ee5(0x204)](_0x27606a=>_0x27606a['rangeType']===_0x7e2ec[_0x133ee5(0x1f3)][_0x133ee5(0x203)])['map'](_0x31851a=>_0x31851a['rangeId']))!=null?_0x548c1d:[],_0x411d70=JSON['stringify'](_0x5c6e4d),_0xee5e0e=(await this[_0x133ee5(0x209)]['requireSession'](_0x1cf97f))['getMemberID']();if(_0xb890cf){const _0x2e9d7f={'memberId':_0xee5e0e,'unitId':_0x1cf97f,'content':_0x411d70,'mention':_0x472e26,'threadId':_0x5b0764},_0xf940dd=(await this[_0x133ee5(0x1d4)][_0x133ee5(0x24c)](_0x133ee5(0x257)+_0x1cf97f+'/reply',{'body':_0x2e9d7f}))['body'][_0x133ee5(0x1e2)];return{..._0x270c1f,'id':_0xf940dd['replyId'],'dT':_0x7e2ec['dayjs'](+_0xf940dd[_0x133ee5(0x1db)])[_0x133ee5(0x1da)](_0x133ee5(0x227)),'personId':_0xf940dd[_0x133ee5(0x1e6)]};}else{const _0x4ed07e={'memberId':_0xee5e0e,'unitId':_0x1cf97f,'content':_0x411d70,'mention':_0x472e26},_0x5baae5=await this['_httpService']['post'](_0x133ee5(0x257)+_0x1cf97f+'/add',{'body':_0x4ed07e});return _0x173e65(_0x5baae5[_0x133ee5(0x236)][_0x133ee5(0x1fe)],_0x270c1f);}}async[_0x1f5f39(0x22e)](_0x27444e){const _0x5c9e3e=_0x1f5f39;var _0x4613d3,_0x26c698;const {text:_0x1da8d1,unitId:_0x205c8a}=_0x27444e,_0x4e5fe2=(_0x26c698=(_0x4613d3=_0x1da8d1[_0x5c9e3e(0x1fa)])==null?void 0x0:_0x4613d3['filter'](_0xb24801=>_0xb24801[_0x5c9e3e(0x21e)]===_0x7e2ec[_0x5c9e3e(0x1f3)]['COMMENT'])[_0x5c9e3e(0x1f8)](_0x42fe20=>_0x42fe20['rangeId']))!=null?_0x26c698:[],_0x544710=JSON[_0x5c9e3e(0x202)](_0x1da8d1),_0x464792=_0x27444e[_0x5c9e3e(0x1f0)],_0x5234d8=_0x27444e['id'],_0x1697a1={'memberId':(await this[_0x5c9e3e(0x209)]['requireSession'](_0x205c8a))[_0x5c9e3e(0x259)](),'unitId':_0x205c8a,'threadId':_0x464792,'mention':_0x4e5fe2,'content':_0x544710,'replyId':_0x5234d8},_0x6388aa=await this[_0x5c9e3e(0x1d4)]['post']('/universer-api/comment/unit/'+_0x205c8a+_0x5c9e3e(0x208),{'body':_0x1697a1});return!_0x6388aa[_0x5c9e3e(0x236)][_0x5c9e3e(0x21a)]||_0x6388aa[_0x5c9e3e(0x236)][_0x5c9e3e(0x21a)]['code']===0x1;}async[_0x1f5f39(0x230)](_0x31681d){const _0xeca917=_0x1f5f39,{unitId:_0x2242a1}=_0x31681d,_0x12ff9c=_0x31681d['threadId'],_0x9568c7={'memberId':this[_0xeca917(0x1e9)][_0xeca917(0x21b)]()['userID'],'unitId':_0x2242a1,'threadId':_0x12ff9c,'solved':_0x31681d[_0xeca917(0x224)]?_0xe7f05c['Solved']:_0xe7f05c[_0xeca917(0x225)]},_0x5ab012=await this[_0xeca917(0x1d4)]['post'](_0xeca917(0x257)+_0x2242a1+'/solved',{'body':_0x9568c7});return!_0x5ab012[_0xeca917(0x236)][_0xeca917(0x21a)]||_0x5ab012['body'][_0xeca917(0x21a)]['code']===0x1;}async[_0x1f5f39(0x1fd)](_0x53ee14,_0x5c0602,_0x23f24a,_0xdc2ed9){const _0x5c17a9=_0x1f5f39,_0x589828={'memberId':(await this[_0x5c17a9(0x209)][_0x5c17a9(0x206)](_0x53ee14))[_0x5c17a9(0x259)](),'threadId':_0x23f24a,'replyId':_0xdc2ed9,'unitId':_0x53ee14},_0x637260=await this[_0x5c17a9(0x1d4)][_0x5c17a9(0x24c)](_0x5c17a9(0x257)+_0x53ee14+_0x5c17a9(0x1f7),{'body':_0x589828});return!_0x637260[_0x5c17a9(0x236)][_0x5c17a9(0x21a)]||_0x637260[_0x5c17a9(0x236)][_0x5c17a9(0x21a)][_0x5c17a9(0x252)]===0x1;}async[_0x1f5f39(0x1d9)](_0x41a4b0,_0x5105f1,_0x368706){const _0xdc562f=_0x1f5f39,_0x295223={'unitId':_0x41a4b0,'threadId':_0x368706},_0x526809=await this['_httpService']['post'](_0xdc562f(0x257)+_0x41a4b0+_0xdc562f(0x1f6),{'body':_0x295223}),_0x78d5d0=_0x368706['map'](_0x14a273=>_0xa22d72(_0x526809['body'][_0xdc562f(0x1e1)][_0x14a273],_0x41a4b0,_0x5105f1))['filter'](Boolean);return Object[_0xdc562f(0x23a)](_0x526809['body'][_0xdc562f(0x234)])['forEach'](_0x2b42c3=>{const _0x420b84=_0xdc562f;this['_userService'][_0x420b84(0x20f)](_0x2b42c3);}),_0x78d5d0;}[_0x1f5f39(0x1f1)](_0x5ef7e5){const _0x2781f8=_0x1f5f39;return{'id':_0x5ef7e5['id'],'threadId':_0x5ef7e5[_0x2781f8(0x1f0)],'ref':_0x5ef7e5[_0x2781f8(0x22b)]};}};_0x4c9f94=_0x22698f([_0x4e97e5(0x0,_0x7e2ec[_0x1f5f39(0x1d7)](_0x384937[_0x1f5f39(0x24f)])),_0x4e97e5(0x1,_0x7e2ec['Inject'](_0x7e2ec['UserManagerService'])),_0x4e97e5(0x2,_0x7e2ec['Inject'](_0x23ce89[_0x1f5f39(0x1ed)]))],_0x4c9f94);var _0x39960b=Object[_0x1f5f39(0x207)],_0x109f0b=(_0x5245fe,_0x4cc220,_0x2fdf01,_0x55cf3d)=>{const _0x189d28=_0x1f5f39;for(var _0x529988=_0x55cf3d>0x1?void 0x0:_0x55cf3d?_0x39960b(_0x4cc220,_0x2fdf01):_0x4cc220,_0x84d596=_0x5245fe[_0x189d28(0x1ee)]-0x1,_0x3adc0e;_0x84d596>=0x0;_0x84d596--)(_0x3adc0e=_0x5245fe[_0x84d596])&&(_0x529988=_0x3adc0e(_0x529988)||_0x529988);return _0x529988;},_0x475288=(_0x20b3c9,_0x5bd3b3)=>(_0x11185d,_0x442f68)=>_0x5bd3b3(_0x11185d,_0x442f68,_0x20b3c9);let _0x4fd3ae=class extends _0x7e2ec[_0x1f5f39(0x200)]{constructor(_0xf1dd0a,_0x9a35a0){const _0x22aeb0=_0x1f5f39;super(),this[_0x22aeb0(0x205)]=_0xf1dd0a,this[_0x22aeb0(0x20a)]=_0x9a35a0,this[_0x22aeb0(0x1dd)]();}[_0x1f5f39(0x1dd)](){const _0x26048c=_0x1f5f39;this['_threadCommentDataSourceService'][_0x26048c(0x249)]=this[_0x26048c(0x20a)],this[_0x26048c(0x205)][_0x26048c(0x1f2)]=!0x1;}};_0x4fd3ae=_0x109f0b([_0x475288(0x0,_0x48618d[_0x1f5f39(0x23e)]),_0x475288(0x1,_0x7e2ec[_0x1f5f39(0x1d7)](_0x4c9f94))],_0x4fd3ae);var _0x111e1b=Object[_0x1f5f39(0x1e5)],_0x287f64=Object[_0x1f5f39(0x207)],_0x578645=(_0x4b7911,_0x6a8745,_0x219148)=>_0x6a8745 in _0x4b7911?_0x111e1b(_0x4b7911,_0x6a8745,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x219148}):_0x4b7911[_0x6a8745]=_0x219148,_0x67fc91=(_0x3ff769,_0x5dd8f0,_0x2aa9e3,_0x1595a8)=>{const _0x4c19ae=_0x1f5f39;for(var _0x20de4c=_0x1595a8>0x1?void 0x0:_0x1595a8?_0x287f64(_0x5dd8f0,_0x2aa9e3):_0x5dd8f0,_0xc1dd6a=_0x3ff769[_0x4c19ae(0x1ee)]-0x1,_0xa2f3d8;_0xc1dd6a>=0x0;_0xc1dd6a--)(_0xa2f3d8=_0x3ff769[_0xc1dd6a])&&(_0x20de4c=_0xa2f3d8(_0x20de4c)||_0x20de4c);return _0x20de4c;},_0x27ba05=(_0x38b2a6,_0x2a8639)=>(_0x395e4a,_0x1421eb)=>_0x2a8639(_0x395e4a,_0x1421eb,_0x38b2a6),_0x2e560b=(_0x28c655,_0x36c759,_0x231ee5)=>_0x578645(_0x28c655,typeof _0x36c759!=_0x1f5f39(0x24d)?_0x36c759+'':_0x36c759,_0x231ee5);_0x396d53[_0x1f5f39(0x222)]=class extends _0x7e2ec[_0x1f5f39(0x235)]{constructor(_0x1a46b9=_0x4cd41b,_0x131de4,_0x4d5873){const _0x56fa9f=_0x1f5f39;super(),this[_0x56fa9f(0x231)]=_0x1a46b9,this[_0x56fa9f(0x229)]=_0x131de4,this[_0x56fa9f(0x258)]=_0x4d5873;const {..._0x108cea}=_0x7e2ec['merge']({},_0x4cd41b,this[_0x56fa9f(0x231)]);this[_0x56fa9f(0x258)][_0x56fa9f(0x1f9)](_0x34db90,_0x108cea);}[_0x1f5f39(0x23c)](){const _0x79cf50=_0x1f5f39;[[_0x4c9f94],[_0x4fd3ae],[_0x12a999]][_0x79cf50(0x1eb)](_0x1fef4b=>{const _0x17cb87=_0x79cf50;this['_injector'][_0x17cb87(0x247)](_0x1fef4b);});}['onReady'](){const _0x481588=_0x1f5f39;this['_injector'][_0x481588(0x253)](_0x4fd3ae),this['_injector'][_0x481588(0x253)](_0x12a999);}},_0x2e560b(_0x396d53[_0x1f5f39(0x222)],_0x1f5f39(0x256),_0x4c3067),_0x2e560b(_0x396d53['UniverThreadCommentDataSourcePlugin'],'type',_0x7e2ec[_0x1f5f39(0x22f)][_0x1f5f39(0x20b)]),_0x396d53[_0x1f5f39(0x222)]=_0x67fc91([_0x7e2ec[_0x1f5f39(0x23d)](_0x53347e[_0x1f5f39(0x245)],_0x23ce89[_0x1f5f39(0x221)],_0x3f5f49[_0x1f5f39(0x214)]),_0x27ba05(0x1,_0x7e2ec[_0x1f5f39(0x1d7)](_0x7e2ec[_0x1f5f39(0x1de)])),_0x27ba05(0x2,_0x7e2ec[_0x1f5f39(0x1d8)])],_0x396d53['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x396d53,Symbol[_0x1f5f39(0x1e0)],{'value':_0x1f5f39(0x241)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.12.4-insiders.20251213-692494c",
3
+ "version": "0.13.0-insiders.20251215-64041bb",
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/core": "0.12.4-insiders.20251213-692494c",
48
+ "@univerjs-pro/collaboration-client": "0.13.0-insiders.20251215-64041bb",
49
+ "@univerjs/core": "0.13.0-insiders.20251215-64041bb",
50
+ "@univerjs-pro/license": "0.13.0-insiders.20251215-64041bb",
49
51
  "@univerjs/protocol": "0.1.47",
50
- "@univerjs-pro/license": "0.12.4-insiders.20251213-692494c",
51
- "@univerjs/thread-comment-ui": "0.12.4-insiders.20251213-692494c",
52
- "@univerjs/thread-comment": "0.12.4-insiders.20251213-692494c",
53
- "@univerjs/network": "0.12.4-insiders.20251213-692494c",
54
- "@univerjs-pro/collaboration-client": "0.12.4-insiders.20251213-692494c"
52
+ "@univerjs/network": "0.13.0-insiders.20251215-64041bb",
53
+ "@univerjs/thread-comment-ui": "0.13.0-insiders.20251215-64041bb",
54
+ "@univerjs/thread-comment": "0.13.0-insiders.20251215-64041bb"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
59
  "vite": "^7.2.7",
60
60
  "vitest": "^4.0.15",
61
- "@univerjs-infra/shared": "0.12.4"
61
+ "@univerjs-infra/shared": "0.13.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",