@univerjs-pro/thread-comment-datasource 0.15.0-insiders.20251227-dafc157 → 0.15.0-insiders.20251227-453e4ff

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 _0x13d4a1=_0x4c62;(function(_0x4f9ace,_0x1acf44){const _0x32648b=_0x4c62,_0x84f544=_0x4f9ace();while(!![]){try{const _0x24b3c4=-parseInt(_0x32648b(0x1b2))/0x1+-parseInt(_0x32648b(0x1b6))/0x2+-parseInt(_0x32648b(0x165))/0x3+-parseInt(_0x32648b(0x171))/0x4+parseInt(_0x32648b(0x1bc))/0x5+parseInt(_0x32648b(0x16d))/0x6+parseInt(_0x32648b(0x1d8))/0x7*(parseInt(_0x32648b(0x1b5))/0x8);if(_0x24b3c4===_0x1acf44)break;else _0x84f544['push'](_0x84f544['shift']());}catch(_0x453ddb){_0x84f544['push'](_0x84f544['shift']());}}}(_0x24b1,0x637e5));Object[_0x13d4a1(0x1c6)](exports,Symbol[_0x13d4a1(0x18c)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x13d4a1(0x167);var I=(_0x41f059=>(_0x41f059[_0x41f059[_0x13d4a1(0x1c9)]=0x0]=_0x13d4a1(0x1c9),_0x41f059[_0x41f059[_0x13d4a1(0x173)]=0x1]=_0x13d4a1(0x173),_0x41f059[_0x41f059[_0x13d4a1(0x1cf)]=-0x1]='UNRECOGNIZED',_0x41f059))(I||{}),v=(_0x28d549=>(_0x28d549[_0x28d549[_0x13d4a1(0x1bd)]=0x0]=_0x13d4a1(0x1bd),_0x28d549[_0x28d549['Add']=0x1]='Add',_0x28d549[_0x28d549[_0x13d4a1(0x195)]=0x2]='Reply',_0x28d549[_0x28d549[_0x13d4a1(0x19d)]=0x3]=_0x13d4a1(0x19d),_0x28d549[_0x28d549[_0x13d4a1(0x1a3)]=0x4]=_0x13d4a1(0x1a3),_0x28d549[_0x28d549['Solve']=0x5]=_0x13d4a1(0x180),_0x28d549[_0x28d549['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x28d549))(v||{});const f=_0x19ecc9=>c[_0x13d4a1(0x1cb)](new Date(+_0x19ecc9))[_0x13d4a1(0x1ac)](_0x13d4a1(0x185)),R=async(_0x2b18e2,_0x550e08)=>{const _0x148830=_0x13d4a1,_0x1a14d5=_0x2b18e2[_0x148830(0x19a)](c[_0x148830(0x16f)]),_0x54efe8=_0x2b18e2['get'](P[_0x148830(0x1d5)]);_0x550e08[_0x148830(0x1a8)](_0x2a592e=>{const _0x418039=_0x148830;_0x1a14d5['getUser'](_0x2a592e)&&_0x550e08[_0x418039(0x18e)](_0x2a592e);}),_0x550e08[_0x148830(0x1b3)]&&(await _0x54efe8[_0x148830(0x19a)]('/universer-api/user/list',{'params':{'userIDs':[..._0x550e08]}}))[_0x148830(0x1d2)]['users'][_0x148830(0x1a8)](_0xa2d095=>{const _0x135869=_0x148830;_0xa2d095&&_0x1a14d5[_0x135869(0x1bf)](_0xa2d095);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x3751b9,_0x1ca702,_0x3e2e97,_0x10c95f)=>{const _0x171d40=_0x13d4a1;for(var _0x3c967c=_0x10c95f>0x1?void 0x0:_0x10c95f?$(_0x1ca702,_0x3e2e97):_0x1ca702,_0x383078=_0x3751b9[_0x171d40(0x1ad)]-0x1,_0x5f1b1e;_0x383078>=0x0;_0x383078--)(_0x5f1b1e=_0x3751b9[_0x383078])&&(_0x3c967c=_0x5f1b1e(_0x3c967c)||_0x3c967c);return _0x3c967c;},S=(_0x9879fa,_0x278abc)=>(_0x318ac9,_0x3e8336)=>_0x278abc(_0x318ac9,_0x3e8336,_0x9879fa);let _=class extends c[_0x13d4a1(0x1c7)]{constructor(_0x52d569,_0x590a81,_0x53db91,_0x5df782){const _0xc7e5e=_0x13d4a1;super(),this[_0xc7e5e(0x1b9)]=_0x52d569,this['_threadCommentModel']=_0x590a81,this[_0xc7e5e(0x178)]=_0x53db91,this[_0xc7e5e(0x181)]=_0x5df782,this[_0xc7e5e(0x1d3)](),this[_0xc7e5e(0x189)]();}[_0x13d4a1(0x189)](){const _0x5f0ee1=_0x13d4a1;this[_0x5f0ee1(0x17c)](this[_0x5f0ee1(0x1ae)][_0x5f0ee1(0x1d1)][_0x5f0ee1(0x176)](j[_0x5f0ee1(0x1c1)](0x10))[_0x5f0ee1(0x1b4)](_0x2ac2e4=>{const _0x3a68a2=_0x5f0ee1,_0xf83bc4=new Set();_0x2ac2e4[_0x3a68a2(0x1a8)](_0x4fc328=>{const _0x5a8764=_0x3a68a2;if(_0x4fc328[_0x5a8764(0x18a)]===_0x5a8764(0x1c3)){const _0x45fddc=_0x4fc328[_0x5a8764(0x1a4)][_0x5a8764(0x179)];_0xf83bc4[_0x5a8764(0x1c3)](_0x45fddc);}}),R(this['_injector'],_0xf83bc4);}));}['_init'](){const _0x7fa307=_0x13d4a1;this[_0x7fa307(0x17c)](this[_0x7fa307(0x1b9)]['commentUpdate$'][_0x7fa307(0x1b4)](async _0x270f8e=>{const _0x3d49f3=_0x7fa307;var _0x4d13a0,_0x331581,_0x12211b,_0x4af6c2;const _0x38e068=(_0x4d13a0=this[_0x3d49f3(0x1ae)][_0x3d49f3(0x188)](_0x270f8e[_0x3d49f3(0x191)])[_0x3d49f3(0x193)](_0x3f29e4=>_0x3f29e4[_0x3d49f3(0x1c5)]===_0x270f8e[_0x3d49f3(0x1c5)]))==null?void 0x0:_0x4d13a0[_0x3d49f3(0x1d0)];if(!_0x38e068)return;const {unitId:_0xdce9c5,subUnitId:_0x2ad708}=_0x38e068;switch(_0x270f8e[_0x3d49f3(0x177)]&&this[_0x3d49f3(0x178)][_0x3d49f3(0x1bf)](_0x270f8e[_0x3d49f3(0x177)]),_0x270f8e[_0x3d49f3(0x18a)]){case v[_0x3d49f3(0x175)]:break;case v['Reply']:{this[_0x3d49f3(0x1ae)][_0x3d49f3(0x170)](_0xdce9c5,_0x2ad708,{'unitId':_0xdce9c5,'subUnitId':_0x2ad708,'ref':'','id':_0x270f8e[_0x3d49f3(0x1a6)],'dT':f(+_0x270f8e[_0x3d49f3(0x174)]),'threadId':_0x270f8e[_0x3d49f3(0x1c5)],'personId':(_0x12211b=(_0x331581=_0x270f8e[_0x3d49f3(0x177)])==null?void 0x0:_0x331581[_0x3d49f3(0x19f)])!=null?_0x12211b:_0x270f8e[_0x3d49f3(0x1c2)],'text':JSON[_0x3d49f3(0x17f)](_0x270f8e[_0x3d49f3(0x196)]),'parentId':_0x38e068['id']});break;}case v[_0x3d49f3(0x1a3)]:{const _0x3614a5=this[_0x3d49f3(0x1ae)][_0x3d49f3(0x18d)](_0xdce9c5,_0x2ad708,_0x270f8e[_0x3d49f3(0x1a6)]);_0x3614a5&&_0x3614a5['parentId']&&this[_0x3d49f3(0x1ae)]['deleteComment'](_0xdce9c5,_0x2ad708,_0x270f8e['replyId']);break;}case v[_0x3d49f3(0x19d)]:{this[_0x3d49f3(0x1ae)]['updateComment'](_0xdce9c5,_0x2ad708,{'commentId':_0x270f8e[_0x3d49f3(0x1a6)],'text':JSON[_0x3d49f3(0x17f)](_0x270f8e[_0x3d49f3(0x196)])});break;}case v[_0x3d49f3(0x180)]:{const _0x27c1fb=(_0x4af6c2=this[_0x3d49f3(0x1ae)][_0x3d49f3(0x188)](_0x270f8e[_0x3d49f3(0x191)])['find'](_0x302215=>_0x302215['threadId']===_0x270f8e[_0x3d49f3(0x1c5)]))==null?void 0x0:_0x4af6c2['root'];_0x27c1fb&&this[_0x3d49f3(0x1ae)][_0x3d49f3(0x164)](_0xdce9c5,_0x2ad708,_0x27c1fb['id'],_0x270f8e[_0x3d49f3(0x17a)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x13d4a1(0x1ce)](b[_0x13d4a1(0x186)])),S(0x1,c[_0x13d4a1(0x1ce)](M[_0x13d4a1(0x19e)])),S(0x2,c[_0x13d4a1(0x1ce)](c[_0x13d4a1(0x16f)])),S(0x3,c['Inject'](c[_0x13d4a1(0x1a0)]))],_);const q=_0x13d4a1(0x19c),D={};var A=Object[_0x13d4a1(0x166)],x=(_0xf90e82,_0x34585e,_0x7c1149,_0x38ae80)=>{for(var _0x36c174=_0x38ae80>0x1?void 0x0:_0x38ae80?A(_0x34585e,_0x7c1149):_0x34585e,_0x42bff6=_0xf90e82['length']-0x1,_0x108b60;_0x42bff6>=0x0;_0x42bff6--)(_0x108b60=_0xf90e82[_0x42bff6])&&(_0x36c174=_0x108b60(_0x36c174)||_0x36c174);return _0x36c174;},C=(_0x1a50df,_0x526da1)=>(_0x4e4f98,_0x2ef325)=>_0x526da1(_0x4e4f98,_0x2ef325,_0x1a50df);function Y(_0x891eb8,_0x3a34af){const _0x2a6e8f=_0x13d4a1,_0x414500=_0x891eb8[_0x2a6e8f(0x182)][0x0];return{..._0x3a34af,'id':_0x414500[_0x2a6e8f(0x1a6)],'resolved':_0x891eb8[_0x2a6e8f(0x17a)]===0x1,'dT':f(_0x414500[_0x2a6e8f(0x174)]),'personId':_0x414500[_0x2a6e8f(0x1c2)],'threadId':_0x414500[_0x2a6e8f(0x1c5)]};}function G(_0x6f7d8c,_0x56d960,_0x2ffecc){const _0x109717=_0x13d4a1;var _0x5d7aa9,_0x2c853a;if(((_0x2c853a=(_0x5d7aa9=_0x6f7d8c==null?void 0x0:_0x6f7d8c[_0x109717(0x182)])==null?void 0x0:_0x5d7aa9[_0x109717(0x1ad)])!=null?_0x2c853a:0x0)>0x0){const _0x388aea=(_0x3dae22,_0x190295)=>({'id':_0x3dae22[_0x109717(0x1a6)],'threadId':_0x3dae22[_0x109717(0x1c5)],'dT':f(_0x3dae22[_0x109717(0x174)]),'personId':_0x3dae22[_0x109717(0x1c2)],'resolved':_0x6f7d8c[_0x109717(0x17a)]===I[_0x109717(0x173)],'unitId':_0x56d960,'subUnitId':_0x2ffecc,'text':JSON[_0x109717(0x17f)](_0x3dae22['content']),'parentId':_0x190295}),_0x27d2fc=_0x388aea(_0x6f7d8c['replies'][0x0]);return{..._0x27d2fc,'children':_0x6f7d8c[_0x109717(0x182)][_0x109717(0x18b)](0x1)[_0x109717(0x17d)](_0x28942a=>_0x388aea(_0x28942a,_0x27d2fc['id']))};}return null;}let p=class{constructor(_0x2b366a,_0xcb3bb9,_0x397f1e){const _0x63704e=_0x13d4a1;this[_0x63704e(0x1a2)]=_0x2b366a,this['_userService']=_0xcb3bb9,this[_0x63704e(0x1c8)]=_0x397f1e;}async[_0x13d4a1(0x170)](_0x1f4f56){const _0x38612c=_0x13d4a1;var _0x17e129,_0x12f580;const {parentId:_0x3fea18,unitId:_0x472edf,text:_0x116185,threadId:_0x150188}=_0x1f4f56,_0x2214a9=(_0x12f580=(_0x17e129=_0x116185[_0x38612c(0x19b)])==null?void 0x0:_0x17e129[_0x38612c(0x197)](_0x5ada07=>_0x5ada07[_0x38612c(0x199)]===c[_0x38612c(0x1ca)][_0x38612c(0x16a)])[_0x38612c(0x17d)](_0x3ea133=>_0x3ea133[_0x38612c(0x1a1)]))!=null?_0x12f580:[],_0x2c25fe=JSON[_0x38612c(0x1ab)](_0x116185),_0x5b876a=(await this['_sessionService'][_0x38612c(0x16b)](_0x472edf))[_0x38612c(0x172)]();if(_0x3fea18){const _0x12a8ec={'memberId':_0x5b876a,'unitId':_0x472edf,'content':_0x2c25fe,'mention':_0x2214a9,'threadId':_0x150188},_0x403af8=(await this['_httpService']['post'](_0x38612c(0x194)+_0x472edf+_0x38612c(0x1b8),{'body':_0x12a8ec}))[_0x38612c(0x1d2)][_0x38612c(0x183)];return{..._0x1f4f56,'id':_0x403af8[_0x38612c(0x1a6)],'dT':c['dayjs'](+_0x403af8[_0x38612c(0x174)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x403af8[_0x38612c(0x1c2)]};}else{const _0x37ad92={'memberId':_0x5b876a,'unitId':_0x472edf,'content':_0x2c25fe,'mention':_0x2214a9},_0x5c99a7=await this[_0x38612c(0x1a2)][_0x38612c(0x1d4)](_0x38612c(0x194)+_0x472edf+_0x38612c(0x17e),{'body':_0x37ad92});return Y(_0x5c99a7[_0x38612c(0x1d2)][_0x38612c(0x169)],_0x1f4f56);}}async['updateComment'](_0xb40da6){const _0x40cb94=_0x13d4a1;var _0x4cf713,_0x464175;const {text:_0x17e0d5,unitId:_0x443823}=_0xb40da6,_0x10403a=(_0x464175=(_0x4cf713=_0x17e0d5[_0x40cb94(0x19b)])==null?void 0x0:_0x4cf713['filter'](_0x6758f=>_0x6758f['rangeType']===c[_0x40cb94(0x1ca)][_0x40cb94(0x16a)])[_0x40cb94(0x17d)](_0x300ff0=>_0x300ff0[_0x40cb94(0x1a1)]))!=null?_0x464175:[],_0x5aa0b3=JSON[_0x40cb94(0x1ab)](_0x17e0d5),_0x152e5d=_0xb40da6[_0x40cb94(0x1c5)],_0x5f422f=_0xb40da6['id'],_0x19c836={'memberId':(await this[_0x40cb94(0x1c8)][_0x40cb94(0x16b)](_0x443823))['getMemberID'](),'unitId':_0x443823,'threadId':_0x152e5d,'mention':_0x10403a,'content':_0x5aa0b3,'replyId':_0x5f422f},_0x4f20db=await this[_0x40cb94(0x1a2)][_0x40cb94(0x1d4)]('/universer-api/comment/unit/'+_0x443823+_0x40cb94(0x168),{'body':_0x19c836});return!_0x4f20db[_0x40cb94(0x1d2)][_0x40cb94(0x1a7)]||_0x4f20db['body'][_0x40cb94(0x1a7)][_0x40cb94(0x198)]===0x1;}async[_0x13d4a1(0x164)](_0x474d1d){const _0x44faad=_0x13d4a1,{unitId:_0x23090f}=_0x474d1d,_0x19b0c2=_0x474d1d[_0x44faad(0x1c5)],_0x1719ba={'memberId':this['_userService'][_0x44faad(0x1a9)]()[_0x44faad(0x19f)],'unitId':_0x23090f,'threadId':_0x19b0c2,'solved':_0x474d1d['resolved']?I[_0x44faad(0x173)]:I['OpenOrReOpen']},_0x3060cd=await this[_0x44faad(0x1a2)][_0x44faad(0x1d4)](_0x44faad(0x194)+_0x23090f+'/solved',{'body':_0x1719ba});return!_0x3060cd[_0x44faad(0x1d2)][_0x44faad(0x1a7)]||_0x3060cd['body'][_0x44faad(0x1a7)][_0x44faad(0x198)]===0x1;}async[_0x13d4a1(0x16e)](_0x5b8e0a,_0x30b9ac,_0x5d8174,_0x590b98){const _0x14dd0e=_0x13d4a1,_0x30bf45={'memberId':(await this[_0x14dd0e(0x1c8)][_0x14dd0e(0x16b)](_0x5b8e0a))['getMemberID'](),'threadId':_0x5d8174,'replyId':_0x590b98,'unitId':_0x5b8e0a},_0x498ae8=await this[_0x14dd0e(0x1a2)][_0x14dd0e(0x1d4)](_0x14dd0e(0x194)+_0x5b8e0a+_0x14dd0e(0x18f),{'body':_0x30bf45});return!_0x498ae8[_0x14dd0e(0x1d2)][_0x14dd0e(0x1a7)]||_0x498ae8[_0x14dd0e(0x1d2)][_0x14dd0e(0x1a7)][_0x14dd0e(0x198)]===0x1;}async[_0x13d4a1(0x1ba)](_0x5ad6e7,_0x5a3d9e,_0x233c5d){const _0x257693=_0x13d4a1,_0x11a049={'unitId':_0x5ad6e7,'threadId':_0x233c5d},_0x1ee3bb=await this[_0x257693(0x1a2)][_0x257693(0x1d4)](_0x257693(0x194)+_0x5ad6e7+_0x257693(0x1cd),{'body':_0x11a049}),_0x340400=_0x233c5d[_0x257693(0x17d)](_0x469950=>G(_0x1ee3bb['body'][_0x257693(0x1aa)][_0x469950],_0x5ad6e7,_0x5a3d9e))[_0x257693(0x197)](Boolean);return Object['values'](_0x1ee3bb[_0x257693(0x1d2)][_0x257693(0x1c4)])[_0x257693(0x1a8)](_0x51db28=>{const _0x17e991=_0x257693;this[_0x17e991(0x178)][_0x17e991(0x1bf)](_0x51db28);}),_0x340400;}[_0x13d4a1(0x1d6)](_0x3d4b44){const _0x2a9a1a=_0x13d4a1;return{'id':_0x3d4b44['id'],'threadId':_0x3d4b44[_0x2a9a1a(0x1c5)],'ref':_0x3d4b44['ref']};}};p=x([C(0x0,c[_0x13d4a1(0x1ce)](P[_0x13d4a1(0x1d5)])),C(0x1,c[_0x13d4a1(0x1ce)](c[_0x13d4a1(0x16f)])),C(0x2,c[_0x13d4a1(0x1ce)](b['CollaborationSessionService']))],p);function _0x24b1(){const _0x516f32=['/add','parse','Solve','_injector','replies','reply','merge','YYYY/MM/DD\x20HH:mm','CommentService','dataSource','getUnit','_initUserSync','type','slice','toStringTag','getComment','delete','/delete','UniverInstanceType','unitId','UniverCollaborationClientPlugin','find','/universer-api/comment/unit/','Reply','content','filter','code','rangeType','get','customRanges','thread-comment-data-source.config','Edit','ThreadCommentModel','userID','Injector','rangeId','_httpService','Delete','payload','pluginName','replyId','error','forEach','getCurrentUser','comments','stringify','format','length','_threadCommentModel','_config','symbol','UniverThreadCommentDataSourcePlugin','162641DRXYoI','size','subscribe','6520HAoirE','1179608QPNwGD','onStarting','/reply','_commentService','listComments','_initDataSource','772590uXBczF','Unknown','_configService','addUser','UniverLicensePlugin','bufferTime','userId','add','users','threadId','defineProperty','Disposable','_sessionService','OpenOrReOpen','CustomRangeType','dayjs','_threadCommentDataSourceService','/list','Inject','UNRECOGNIZED','root','commentUpdate$','body','_init','post','HTTPService','saveCommentToSnapshot','UNIVER_UNKNOWN','14070KBdEES','resolveComment','303600gemJye','getOwnPropertyDescriptor','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/edit','comment','COMMENT','requireSession','_threadCommentDataSource','1460376TUOaxk','deleteComment','UserManagerService','addComment','3099576kYkRyv','getMemberID','Solved','createTimestamp','Add','pipe','user','_userService','personId','solved','IConfigService','disposeWithMe','map'];_0x24b1=function(){return _0x516f32;};return _0x24b1();}var H=Object[_0x13d4a1(0x166)],J=(_0x317244,_0x4f58ac,_0x4554a4,_0xd82070)=>{const _0x568ccb=_0x13d4a1;for(var _0x511319=_0xd82070>0x1?void 0x0:_0xd82070?H(_0x4f58ac,_0x4554a4):_0x4f58ac,_0x296874=_0x317244[_0x568ccb(0x1ad)]-0x1,_0x6c3c29;_0x296874>=0x0;_0x296874--)(_0x6c3c29=_0x317244[_0x296874])&&(_0x511319=_0x6c3c29(_0x511319)||_0x511319);return _0x511319;},y=(_0x136638,_0x26195f)=>(_0x2a3f35,_0x530d2f)=>_0x26195f(_0x2a3f35,_0x530d2f,_0x136638);function _0x4c62(_0x436606,_0xbe03d0){_0x436606=_0x436606-0x164;const _0x24b11e=_0x24b1();let _0x4c6221=_0x24b11e[_0x436606];return _0x4c6221;}let g=class extends c[_0x13d4a1(0x1c7)]{constructor(_0x4b4d16,_0x2b1598){const _0x3d06e9=_0x13d4a1;super(),this[_0x3d06e9(0x1cc)]=_0x4b4d16,this[_0x3d06e9(0x16c)]=_0x2b1598,this['_initDataSource']();}[_0x13d4a1(0x1bb)](){const _0x57edc9=_0x13d4a1;this['_threadCommentDataSourceService'][_0x57edc9(0x187)]=this[_0x57edc9(0x16c)],this[_0x57edc9(0x1cc)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x13d4a1(0x1ce)](p))],g);var F=Object['defineProperty'],L=Object[_0x13d4a1(0x166)],Z=(_0x65d812,_0x231cc1,_0x5a4089)=>_0x231cc1 in _0x65d812?F(_0x65d812,_0x231cc1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5a4089}):_0x65d812[_0x231cc1]=_0x5a4089,W=(_0x297882,_0x3758cf,_0x587e74,_0x590b73)=>{for(var _0x311938=_0x590b73>0x1?void 0x0:_0x590b73?L(_0x3758cf,_0x587e74):_0x3758cf,_0x1d2d40=_0x297882['length']-0x1,_0x12d111;_0x1d2d40>=0x0;_0x1d2d40--)(_0x12d111=_0x297882[_0x1d2d40])&&(_0x311938=_0x12d111(_0x311938)||_0x311938);return _0x311938;},O=(_0x528242,_0x8ec6fb)=>(_0x3c4e41,_0x2223d8)=>_0x8ec6fb(_0x3c4e41,_0x2223d8,_0x528242),N=(_0x2e013e,_0x1ea403,_0x162d15)=>Z(_0x2e013e,typeof _0x1ea403!=_0x13d4a1(0x1b0)?_0x1ea403+'':_0x1ea403,_0x162d15);exports[_0x13d4a1(0x1b1)]=class extends c['Plugin']{constructor(_0x210c8b=D,_0xea7596,_0x9915fe){const _0x3667ea=_0x13d4a1;super(),this[_0x3667ea(0x1af)]=_0x210c8b,this[_0x3667ea(0x181)]=_0xea7596,this[_0x3667ea(0x1be)]=_0x9915fe;const {..._0x458f1a}=c[_0x3667ea(0x184)]({},D,this[_0x3667ea(0x1af)]);this['_configService']['setConfig'](q,_0x458f1a);}[_0x13d4a1(0x1b7)](){const _0x4ec1c1=_0x13d4a1;[[p],[g],[_]][_0x4ec1c1(0x1a8)](_0x4a45a2=>{const _0x507331=_0x4ec1c1;this[_0x507331(0x181)]['add'](_0x4a45a2);});}['onReady'](){const _0x380601=_0x13d4a1;this[_0x380601(0x181)][_0x380601(0x19a)](g),this[_0x380601(0x181)][_0x380601(0x19a)](_);}},N(exports[_0x13d4a1(0x1b1)],_0x13d4a1(0x1a5),U),N(exports[_0x13d4a1(0x1b1)],_0x13d4a1(0x18a),c[_0x13d4a1(0x190)][_0x13d4a1(0x1d7)]),exports[_0x13d4a1(0x1b1)]=W([c['DependentOn'](w['UniverThreadCommentUIPlugin'],b[_0x13d4a1(0x192)],T[_0x13d4a1(0x1c0)]),O(0x1,c['Inject'](c[_0x13d4a1(0x1a0)])),O(0x2,c[_0x13d4a1(0x17b)])],exports[_0x13d4a1(0x1b1)]);
1
+ 'use strict';const _0x1e522b=_0x4117;(function(_0x56d183,_0x30f1a2){const _0x5848f3=_0x4117,_0x4a55d1=_0x56d183();while(!![]){try{const _0x4749be=-parseInt(_0x5848f3(0xc6))/0x1*(parseInt(_0x5848f3(0xdb))/0x2)+parseInt(_0x5848f3(0xd8))/0x3+-parseInt(_0x5848f3(0xc8))/0x4*(-parseInt(_0x5848f3(0xcc))/0x5)+parseInt(_0x5848f3(0x11f))/0x6+-parseInt(_0x5848f3(0xc9))/0x7+-parseInt(_0x5848f3(0x122))/0x8*(parseInt(_0x5848f3(0xec))/0x9)+parseInt(_0x5848f3(0x11e))/0xa*(parseInt(_0x5848f3(0x128))/0xb);if(_0x4749be===_0x30f1a2)break;else _0x4a55d1['push'](_0x4a55d1['shift']());}catch(_0x52a918){_0x4a55d1['push'](_0x4a55d1['shift']());}}}(_0x510a,0xd36b6));Object[_0x1e522b(0xf1)](exports,Symbol['toStringTag'],{'value':_0x1e522b(0x101)});function _0x510a(){const _0x8fe7af=['Reply','updateComment','length','getUnit','onStarting','userId','personId','addUser','user','getMemberID','UniverThreadCommentDataSourcePlugin','2294292FiefWx','UniverLicensePlugin','rangeType','1014KfOvVq','_injector','Delete','listComments','Unknown','add','Edit','_threadCommentDataSource','Add','bufferTime','/universer-api/comment/unit/','commentUpdate$','disposeWithMe','CustomRangeType','/list','merge','map','3307464xumwnN','userID','saveCommentToSnapshot','dataSource','root','defineProperty','resolved','_threadCommentDataSourceService','slice','requireSession','get','getCurrentUser','_threadCommentModel','UserManagerService','_initUserSync','solved','getUser','_configService','content','Injector','IThreadCommentDataSourceService','Module','comment','YYYY/MM/DD\x20HH:mm','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CommentService','UniverInstanceType','type','Disposable','customRanges','onReady','_config','/add','getComment','UniverCollaborationClientPlugin','values','addComment','replies','COMMENT','users','createTimestamp','UNRECOGNIZED','getOwnPropertyDescriptor','resolveComment','rangeId','post','thread-comment-data-source.config','deleteComment','OpenOrReOpen','Solved','30gUieOH','5802954ekIMan','find','subscribe','32IIKVkd','delete','parse','forEach','stringify','comments','3547907nKxHDu','_httpService','/solved','threadId','filter','_userService','syncUpdateMutationToColla','dayjs','CollaborationSessionService','HTTPService','Solve','replyId','format','error','_initDataSource','UniverThreadCommentUIPlugin','UNIVER_UNKNOWN','code','_sessionService','parentId','236TSpuza','body','3056IPYAVe','7846972qxvcJf','Inject','size','5740HGSixx'];_0x510a=function(){return _0x8fe7af;};return _0x510a();}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=_0x1e522b(0x104);var I=(_0x110166=>(_0x110166[_0x110166[_0x1e522b(0x11c)]=0x0]=_0x1e522b(0x11c),_0x110166[_0x110166[_0x1e522b(0x11d)]=0x1]='Solved',_0x110166[_0x110166['UNRECOGNIZED']=-0x1]=_0x1e522b(0x115),_0x110166))(I||{}),v=(_0x406134=>(_0x406134[_0x406134[_0x1e522b(0xdf)]=0x0]=_0x1e522b(0xdf),_0x406134[_0x406134[_0x1e522b(0xe3)]=0x1]=_0x1e522b(0xe3),_0x406134[_0x406134[_0x1e522b(0xcd)]=0x2]='Reply',_0x406134[_0x406134[_0x1e522b(0xe1)]=0x3]=_0x1e522b(0xe1),_0x406134[_0x406134['Delete']=0x4]=_0x1e522b(0xdd),_0x406134[_0x406134[_0x1e522b(0xbc)]=0x5]=_0x1e522b(0xbc),_0x406134[_0x406134[_0x1e522b(0x115)]=-0x1]=_0x1e522b(0x115),_0x406134))(v||{});const f=_0x3b57f2=>c[_0x1e522b(0xb9)](new Date(+_0x3b57f2))[_0x1e522b(0xbe)](_0x1e522b(0x103)),R=async(_0x396b6e,_0x210e65)=>{const _0x2b0ee9=_0x1e522b,_0x297a2e=_0x396b6e[_0x2b0ee9(0xf6)](c[_0x2b0ee9(0xf9)]),_0x3b085f=_0x396b6e['get'](P['HTTPService']);_0x210e65[_0x2b0ee9(0x125)](_0x1cd3d7=>{const _0x52153f=_0x2b0ee9;_0x297a2e[_0x52153f(0xfc)](_0x1cd3d7)&&_0x210e65[_0x52153f(0x123)](_0x1cd3d7);}),_0x210e65[_0x2b0ee9(0xcb)]&&(await _0x3b085f['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x210e65]}}))[_0x2b0ee9(0xc7)][_0x2b0ee9(0x113)][_0x2b0ee9(0x125)](_0x46ef70=>{const _0x228dae=_0x2b0ee9;_0x46ef70&&_0x297a2e[_0x228dae(0xd4)](_0x46ef70);});};var $=Object[_0x1e522b(0x116)],E=(_0x2015d9,_0x773162,_0x251cbd,_0x26324b)=>{const _0x41c383=_0x1e522b;for(var _0x5a8521=_0x26324b>0x1?void 0x0:_0x26324b?$(_0x773162,_0x251cbd):_0x773162,_0xf29172=_0x2015d9[_0x41c383(0xcf)]-0x1,_0x398c72;_0xf29172>=0x0;_0xf29172--)(_0x398c72=_0x2015d9[_0xf29172])&&(_0x5a8521=_0x398c72(_0x5a8521)||_0x5a8521);return _0x5a8521;},S=(_0x5c1f7b,_0x47c392)=>(_0x344bee,_0x2674cb)=>_0x47c392(_0x344bee,_0x2674cb,_0x5c1f7b);let _=class extends c[_0x1e522b(0x108)]{constructor(_0x4966e9,_0x13d24f,_0x5be808,_0x22cf8d){const _0x4e181f=_0x1e522b;super(),this['_commentService']=_0x4966e9,this[_0x4e181f(0xf8)]=_0x13d24f,this[_0x4e181f(0x12d)]=_0x5be808,this[_0x4e181f(0xdc)]=_0x22cf8d,this['_init'](),this['_initUserSync']();}[_0x1e522b(0xfa)](){const _0x4ed48f=_0x1e522b;this[_0x4ed48f(0xe7)](this['_threadCommentModel'][_0x4ed48f(0xe6)]['pipe'](j[_0x4ed48f(0xe4)](0x10))[_0x4ed48f(0x121)](_0x489938=>{const _0x377a06=_0x4ed48f,_0x4a6f25=new Set();_0x489938[_0x377a06(0x125)](_0x55bf33=>{const _0xaf6108=_0x377a06;if(_0x55bf33['type']===_0xaf6108(0xe0)){const _0x2b01e2=_0x55bf33['payload'][_0xaf6108(0xd3)];_0x4a6f25[_0xaf6108(0xe0)](_0x2b01e2);}}),R(this['_injector'],_0x4a6f25);}));}['_init'](){const _0x1dddb8=_0x1e522b;this[_0x1dddb8(0xe7)](this['_commentService'][_0x1dddb8(0xe6)][_0x1dddb8(0x121)](async _0x27bbcd=>{const _0x2d8fbb=_0x1dddb8;var _0x2fd092,_0x3e6e04,_0x39f5c0,_0x265e84;const _0x5785a2=(_0x2fd092=this[_0x2d8fbb(0xf8)][_0x2d8fbb(0xd0)](_0x27bbcd['unitId'])['find'](_0x812114=>_0x812114[_0x2d8fbb(0x12b)]===_0x27bbcd[_0x2d8fbb(0x12b)]))==null?void 0x0:_0x2fd092[_0x2d8fbb(0xf0)];if(!_0x5785a2)return;const {unitId:_0x595653,subUnitId:_0x452fb6}=_0x5785a2;switch(_0x27bbcd[_0x2d8fbb(0xd5)]&&this[_0x2d8fbb(0x12d)]['addUser'](_0x27bbcd[_0x2d8fbb(0xd5)]),_0x27bbcd[_0x2d8fbb(0x107)]){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0x2d8fbb(0x110)](_0x595653,_0x452fb6,{'unitId':_0x595653,'subUnitId':_0x452fb6,'ref':'','id':_0x27bbcd[_0x2d8fbb(0xbd)],'dT':f(+_0x27bbcd[_0x2d8fbb(0x114)]),'threadId':_0x27bbcd['threadId'],'personId':(_0x39f5c0=(_0x3e6e04=_0x27bbcd[_0x2d8fbb(0xd5)])==null?void 0x0:_0x3e6e04[_0x2d8fbb(0xed)])!=null?_0x39f5c0:_0x27bbcd[_0x2d8fbb(0xd2)],'text':JSON[_0x2d8fbb(0x124)](_0x27bbcd[_0x2d8fbb(0xfe)]),'parentId':_0x5785a2['id']});break;}case v['Delete']:{const _0x49ed17=this['_threadCommentModel'][_0x2d8fbb(0x10d)](_0x595653,_0x452fb6,_0x27bbcd[_0x2d8fbb(0xbd)]);_0x49ed17&&_0x49ed17[_0x2d8fbb(0xc5)]&&this[_0x2d8fbb(0xf8)][_0x2d8fbb(0x11b)](_0x595653,_0x452fb6,_0x27bbcd[_0x2d8fbb(0xbd)]);break;}case v[_0x2d8fbb(0xe1)]:{this[_0x2d8fbb(0xf8)][_0x2d8fbb(0xce)](_0x595653,_0x452fb6,{'commentId':_0x27bbcd[_0x2d8fbb(0xbd)],'text':JSON[_0x2d8fbb(0x124)](_0x27bbcd['content'])});break;}case v[_0x2d8fbb(0xbc)]:{const _0x806aa8=(_0x265e84=this[_0x2d8fbb(0xf8)][_0x2d8fbb(0xd0)](_0x27bbcd['unitId'])[_0x2d8fbb(0x120)](_0x29b41f=>_0x29b41f[_0x2d8fbb(0x12b)]===_0x27bbcd['threadId']))==null?void 0x0:_0x265e84[_0x2d8fbb(0xf0)];_0x806aa8&&this[_0x2d8fbb(0xf8)][_0x2d8fbb(0x117)](_0x595653,_0x452fb6,_0x806aa8['id'],_0x27bbcd[_0x2d8fbb(0xfb)]===I[_0x2d8fbb(0x11d)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x1e522b(0x105)])),S(0x1,c[_0x1e522b(0xca)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x1e522b(0xf9)])),S(0x3,c[_0x1e522b(0xca)](c['Injector']))],_);const q=_0x1e522b(0x11a),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0xdd4f4d,_0x21126e,_0x1bca17,_0x3553bb)=>{const _0x3d6607=_0x1e522b;for(var _0x44144b=_0x3553bb>0x1?void 0x0:_0x3553bb?A(_0x21126e,_0x1bca17):_0x21126e,_0x110af6=_0xdd4f4d[_0x3d6607(0xcf)]-0x1,_0x143032;_0x110af6>=0x0;_0x110af6--)(_0x143032=_0xdd4f4d[_0x110af6])&&(_0x44144b=_0x143032(_0x44144b)||_0x44144b);return _0x44144b;},C=(_0x52675f,_0x4dd336)=>(_0x5564cd,_0x53a7ac)=>_0x4dd336(_0x5564cd,_0x53a7ac,_0x52675f);function Y(_0xa3b25a,_0x47906a){const _0x34fd91=_0x1e522b,_0x3b435e=_0xa3b25a[_0x34fd91(0x111)][0x0];return{..._0x47906a,'id':_0x3b435e[_0x34fd91(0xbd)],'resolved':_0xa3b25a[_0x34fd91(0xfb)]===0x1,'dT':f(_0x3b435e[_0x34fd91(0x114)]),'personId':_0x3b435e[_0x34fd91(0xd2)],'threadId':_0x3b435e[_0x34fd91(0x12b)]};}function G(_0x2e5f87,_0x2e8d3d,_0x4449eb){const _0x4bbc99=_0x1e522b;var _0x18fe74,_0x18c4c1;if(((_0x18c4c1=(_0x18fe74=_0x2e5f87==null?void 0x0:_0x2e5f87[_0x4bbc99(0x111)])==null?void 0x0:_0x18fe74['length'])!=null?_0x18c4c1:0x0)>0x0){const _0x416c34=(_0xc7224,_0x17c9b9)=>({'id':_0xc7224[_0x4bbc99(0xbd)],'threadId':_0xc7224[_0x4bbc99(0x12b)],'dT':f(_0xc7224['createTimestamp']),'personId':_0xc7224[_0x4bbc99(0xd2)],'resolved':_0x2e5f87[_0x4bbc99(0xfb)]===I[_0x4bbc99(0x11d)],'unitId':_0x2e8d3d,'subUnitId':_0x4449eb,'text':JSON[_0x4bbc99(0x124)](_0xc7224[_0x4bbc99(0xfe)]),'parentId':_0x17c9b9}),_0x1a9bae=_0x416c34(_0x2e5f87[_0x4bbc99(0x111)][0x0]);return{..._0x1a9bae,'children':_0x2e5f87[_0x4bbc99(0x111)][_0x4bbc99(0xf4)](0x1)[_0x4bbc99(0xeb)](_0xcfb727=>_0x416c34(_0xcfb727,_0x1a9bae['id']))};}return null;}let p=class{constructor(_0x52febe,_0x2137c4,_0x39c7f1){const _0xa89b80=_0x1e522b;this[_0xa89b80(0x129)]=_0x52febe,this['_userService']=_0x2137c4,this[_0xa89b80(0xc4)]=_0x39c7f1;}async[_0x1e522b(0x110)](_0x4e2806){const _0x237ec8=_0x1e522b;var _0x4a2adc,_0x499338;const {parentId:_0x60b6b8,unitId:_0x4a9bc5,text:_0x3ac54c,threadId:_0x47bd12}=_0x4e2806,_0x5cd939=(_0x499338=(_0x4a2adc=_0x3ac54c[_0x237ec8(0x109)])==null?void 0x0:_0x4a2adc['filter'](_0x27dd20=>_0x27dd20[_0x237ec8(0xda)]===c[_0x237ec8(0xe8)][_0x237ec8(0x112)])[_0x237ec8(0xeb)](_0x343212=>_0x343212[_0x237ec8(0x118)]))!=null?_0x499338:[],_0x45ce81=JSON[_0x237ec8(0x126)](_0x3ac54c),_0x1949ba=(await this[_0x237ec8(0xc4)][_0x237ec8(0xf5)](_0x4a9bc5))[_0x237ec8(0xd6)]();if(_0x60b6b8){const _0x47ea7d={'memberId':_0x1949ba,'unitId':_0x4a9bc5,'content':_0x45ce81,'mention':_0x5cd939,'threadId':_0x47bd12},_0x2fabc6=(await this['_httpService'][_0x237ec8(0x119)](_0x237ec8(0xe5)+_0x4a9bc5+'/reply',{'body':_0x47ea7d}))[_0x237ec8(0xc7)]['reply'];return{..._0x4e2806,'id':_0x2fabc6[_0x237ec8(0xbd)],'dT':c[_0x237ec8(0xb9)](+_0x2fabc6['createTimestamp'])[_0x237ec8(0xbe)](_0x237ec8(0x103)),'personId':_0x2fabc6[_0x237ec8(0xd2)]};}else{const _0x3d2250={'memberId':_0x1949ba,'unitId':_0x4a9bc5,'content':_0x45ce81,'mention':_0x5cd939},_0x28e8d6=await this[_0x237ec8(0x129)][_0x237ec8(0x119)](_0x237ec8(0xe5)+_0x4a9bc5+_0x237ec8(0x10c),{'body':_0x3d2250});return Y(_0x28e8d6['body'][_0x237ec8(0x102)],_0x4e2806);}}async[_0x1e522b(0xce)](_0x10c0c0){const _0x564860=_0x1e522b;var _0x3ee5cb,_0xd7e3b5;const {text:_0x14bce6,unitId:_0x3b5a23}=_0x10c0c0,_0x5772b7=(_0xd7e3b5=(_0x3ee5cb=_0x14bce6[_0x564860(0x109)])==null?void 0x0:_0x3ee5cb[_0x564860(0x12c)](_0x2a4857=>_0x2a4857[_0x564860(0xda)]===c['CustomRangeType'][_0x564860(0x112)])['map'](_0x4dd0a5=>_0x4dd0a5[_0x564860(0x118)]))!=null?_0xd7e3b5:[],_0x8c7466=JSON[_0x564860(0x126)](_0x14bce6),_0x23ae68=_0x10c0c0[_0x564860(0x12b)],_0x570890=_0x10c0c0['id'],_0x2d2c3={'memberId':(await this[_0x564860(0xc4)][_0x564860(0xf5)](_0x3b5a23))[_0x564860(0xd6)](),'unitId':_0x3b5a23,'threadId':_0x23ae68,'mention':_0x5772b7,'content':_0x8c7466,'replyId':_0x570890},_0x58eb7c=await this[_0x564860(0x129)][_0x564860(0x119)](_0x564860(0xe5)+_0x3b5a23+'/edit',{'body':_0x2d2c3});return!_0x58eb7c[_0x564860(0xc7)][_0x564860(0xbf)]||_0x58eb7c[_0x564860(0xc7)]['error'][_0x564860(0xc3)]===0x1;}async['resolveComment'](_0x1743fe){const _0x4e3e3f=_0x1e522b,{unitId:_0x419b34}=_0x1743fe,_0x5d2566=_0x1743fe['threadId'],_0x3493e3={'memberId':this[_0x4e3e3f(0x12d)][_0x4e3e3f(0xf7)]()[_0x4e3e3f(0xed)],'unitId':_0x419b34,'threadId':_0x5d2566,'solved':_0x1743fe[_0x4e3e3f(0xf2)]?I['Solved']:I['OpenOrReOpen']},_0xfe9359=await this['_httpService'][_0x4e3e3f(0x119)](_0x4e3e3f(0xe5)+_0x419b34+_0x4e3e3f(0x12a),{'body':_0x3493e3});return!_0xfe9359[_0x4e3e3f(0xc7)][_0x4e3e3f(0xbf)]||_0xfe9359[_0x4e3e3f(0xc7)][_0x4e3e3f(0xbf)][_0x4e3e3f(0xc3)]===0x1;}async[_0x1e522b(0x11b)](_0xef69b5,_0x571b35,_0x7947bd,_0x59656f){const _0x371656=_0x1e522b,_0xc98568={'memberId':(await this[_0x371656(0xc4)][_0x371656(0xf5)](_0xef69b5))['getMemberID'](),'threadId':_0x7947bd,'replyId':_0x59656f,'unitId':_0xef69b5},_0x3bff21=await this[_0x371656(0x129)][_0x371656(0x119)](_0x371656(0xe5)+_0xef69b5+'/delete',{'body':_0xc98568});return!_0x3bff21[_0x371656(0xc7)]['error']||_0x3bff21['body'][_0x371656(0xbf)][_0x371656(0xc3)]===0x1;}async[_0x1e522b(0xde)](_0x3f8b6e,_0x56055f,_0x1e9144){const _0x2469e5=_0x1e522b,_0x31d71a={'unitId':_0x3f8b6e,'threadId':_0x1e9144},_0x416016=await this[_0x2469e5(0x129)][_0x2469e5(0x119)]('/universer-api/comment/unit/'+_0x3f8b6e+_0x2469e5(0xe9),{'body':_0x31d71a}),_0x2c8b84=_0x1e9144[_0x2469e5(0xeb)](_0x236830=>G(_0x416016[_0x2469e5(0xc7)][_0x2469e5(0x127)][_0x236830],_0x3f8b6e,_0x56055f))[_0x2469e5(0x12c)](Boolean);return Object[_0x2469e5(0x10f)](_0x416016[_0x2469e5(0xc7)][_0x2469e5(0x113)])[_0x2469e5(0x125)](_0x4e6d97=>{const _0x52ec9b=_0x2469e5;this[_0x52ec9b(0x12d)]['addUser'](_0x4e6d97);}),_0x2c8b84;}[_0x1e522b(0xee)](_0x326db1){return{'id':_0x326db1['id'],'threadId':_0x326db1['threadId'],'ref':_0x326db1['ref']};}};p=x([C(0x0,c['Inject'](P[_0x1e522b(0xbb)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x1e522b(0xca)](b[_0x1e522b(0xba)]))],p);var H=Object[_0x1e522b(0x116)],J=(_0x21bd68,_0x3eb8c1,_0x269252,_0x5562c4)=>{const _0x3dbd67=_0x1e522b;for(var _0x3a65cf=_0x5562c4>0x1?void 0x0:_0x5562c4?H(_0x3eb8c1,_0x269252):_0x3eb8c1,_0x4e4e2a=_0x21bd68[_0x3dbd67(0xcf)]-0x1,_0x95d0f4;_0x4e4e2a>=0x0;_0x4e4e2a--)(_0x95d0f4=_0x21bd68[_0x4e4e2a])&&(_0x3a65cf=_0x95d0f4(_0x3a65cf)||_0x3a65cf);return _0x3a65cf;},y=(_0x4cf990,_0x37ec0)=>(_0x8dfa54,_0x1597f4)=>_0x37ec0(_0x8dfa54,_0x1597f4,_0x4cf990);let g=class extends c[_0x1e522b(0x108)]{constructor(_0x502e40,_0x496369){const _0x119d76=_0x1e522b;super(),this[_0x119d76(0xf3)]=_0x502e40,this[_0x119d76(0xe2)]=_0x496369,this[_0x119d76(0xc0)]();}['_initDataSource'](){const _0x5678d6=_0x1e522b;this['_threadCommentDataSourceService'][_0x5678d6(0xef)]=this[_0x5678d6(0xe2)],this[_0x5678d6(0xf3)][_0x5678d6(0x12e)]=!0x1;}};g=J([y(0x0,M[_0x1e522b(0x100)]),y(0x1,c['Inject'](p))],g);function _0x4117(_0x3c872d,_0x44989d){_0x3c872d=_0x3c872d-0xb9;const _0x510aad=_0x510a();let _0x411747=_0x510aad[_0x3c872d];return _0x411747;}var F=Object[_0x1e522b(0xf1)],L=Object[_0x1e522b(0x116)],Z=(_0x2358c7,_0x55fa76,_0x4a04ad)=>_0x55fa76 in _0x2358c7?F(_0x2358c7,_0x55fa76,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4a04ad}):_0x2358c7[_0x55fa76]=_0x4a04ad,W=(_0x2cdbce,_0x558daa,_0x2ee825,_0x43c979)=>{const _0x3027a9=_0x1e522b;for(var _0x10d8e4=_0x43c979>0x1?void 0x0:_0x43c979?L(_0x558daa,_0x2ee825):_0x558daa,_0x4d8e2e=_0x2cdbce[_0x3027a9(0xcf)]-0x1,_0x236cfd;_0x4d8e2e>=0x0;_0x4d8e2e--)(_0x236cfd=_0x2cdbce[_0x4d8e2e])&&(_0x10d8e4=_0x236cfd(_0x10d8e4)||_0x10d8e4);return _0x10d8e4;},O=(_0x76693b,_0x218b86)=>(_0x43de39,_0x2c58ff)=>_0x218b86(_0x43de39,_0x2c58ff,_0x76693b),N=(_0x4ba8d5,_0x232e7b,_0x12a61b)=>Z(_0x4ba8d5,typeof _0x232e7b!='symbol'?_0x232e7b+'':_0x232e7b,_0x12a61b);exports[_0x1e522b(0xd7)]=class extends c['Plugin']{constructor(_0x1e632c=D,_0x6c973d,_0x509f66){const _0x4f4724=_0x1e522b;super(),this[_0x4f4724(0x10b)]=_0x1e632c,this['_injector']=_0x6c973d,this[_0x4f4724(0xfd)]=_0x509f66;const {..._0x43d04a}=c[_0x4f4724(0xea)]({},D,this[_0x4f4724(0x10b)]);this[_0x4f4724(0xfd)]['setConfig'](q,_0x43d04a);}[_0x1e522b(0xd1)](){const _0x265734=_0x1e522b;[[p],[g],[_]][_0x265734(0x125)](_0x432823=>{const _0x23f18b=_0x265734;this[_0x23f18b(0xdc)][_0x23f18b(0xe0)](_0x432823);});}[_0x1e522b(0x10a)](){const _0x124f52=_0x1e522b;this['_injector'][_0x124f52(0xf6)](g),this[_0x124f52(0xdc)][_0x124f52(0xf6)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x1e522b(0xd7)],_0x1e522b(0x107),c[_0x1e522b(0x106)][_0x1e522b(0xc2)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](w[_0x1e522b(0xc1)],b[_0x1e522b(0x10e)],T[_0x1e522b(0xd9)]),O(0x1,c[_0x1e522b(0xca)](c[_0x1e522b(0xff)])),O(0x2,c['IConfigService'])],exports[_0x1e522b(0xd7)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5bceff=_0x4698;(function(_0x100b92,_0x3ab457){const _0x5dbea3=_0x4698,_0x54fc11=_0x100b92();while(!![]){try{const _0x1714c6=parseInt(_0x5dbea3(0xc8))/0x1*(parseInt(_0x5dbea3(0xe8))/0x2)+-parseInt(_0x5dbea3(0xab))/0x3*(parseInt(_0x5dbea3(0xdf))/0x4)+parseInt(_0x5dbea3(0xe4))/0x5*(parseInt(_0x5dbea3(0xc4))/0x6)+-parseInt(_0x5dbea3(0x99))/0x7*(parseInt(_0x5dbea3(0xe9))/0x8)+parseInt(_0x5dbea3(0xcb))/0x9+-parseInt(_0x5dbea3(0xe6))/0xa*(parseInt(_0x5dbea3(0xb1))/0xb)+-parseInt(_0x5dbea3(0xde))/0xc*(-parseInt(_0x5dbea3(0x9b))/0xd);if(_0x1714c6===_0x3ab457)break;else _0x54fc11['push'](_0x54fc11['shift']());}catch(_0x4880bc){_0x54fc11['push'](_0x54fc11['shift']());}}}(_0x58cf,0xf1a64));import{CommentService as _0x415846,CollaborationSessionService as _0x50a11c,UniverCollaborationClientPlugin as _0x44b3b2}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x376c7a}from'@univerjs-pro/license';import{dayjs as _0x45d0f3,UserManagerService as _0x37dafd,Inject as _0x46fdc7,Injector as _0x52b638,Disposable as _0x1ef9d3,CustomRangeType as _0x461976,UniverInstanceType as _0x37f344,DependentOn as _0x437391,IConfigService as _0x5cfae7,Plugin as _0x6e4833,merge as _0x53449f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x83888d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5bb445,IThreadCommentDataSourceService as _0x77a420}from'@univerjs/thread-comment';import{bufferTime as _0x55a7a0}from'rxjs';import{HTTPService as _0x4e26ab}from'@univerjs/network';const W=_0x5bceff(0xc6);var I=(_0x37a6db=>(_0x37a6db[_0x37a6db[_0x5bceff(0xa0)]=0x0]='OpenOrReOpen',_0x37a6db[_0x37a6db[_0x5bceff(0xbb)]=0x1]=_0x5bceff(0xbb),_0x37a6db[_0x37a6db[_0x5bceff(0xa2)]=-0x1]=_0x5bceff(0xa2),_0x37a6db))(I||{}),v=(_0x93249c=>(_0x93249c[_0x93249c['Unknown']=0x0]=_0x5bceff(0xea),_0x93249c[_0x93249c[_0x5bceff(0xd9)]=0x1]='Add',_0x93249c[_0x93249c[_0x5bceff(0xce)]=0x2]=_0x5bceff(0xce),_0x93249c[_0x93249c[_0x5bceff(0xdd)]=0x3]='Edit',_0x93249c[_0x93249c[_0x5bceff(0xd8)]=0x4]=_0x5bceff(0xd8),_0x93249c[_0x93249c[_0x5bceff(0x9e)]=0x5]='Solve',_0x93249c[_0x93249c[_0x5bceff(0xa2)]=-0x1]=_0x5bceff(0xa2),_0x93249c))(v||{});const y=_0x53008c=>_0x45d0f3(new Date(+_0x53008c))[_0x5bceff(0xba)](_0x5bceff(0xf8)),B=async(_0x1afd26,_0xa3afb0)=>{const _0x2100ff=_0x5bceff,_0x3a0ca6=_0x1afd26[_0x2100ff(0xa5)](_0x37dafd),_0x4fbdf1=_0x1afd26['get'](_0x4e26ab);_0xa3afb0['forEach'](_0x5c15a5=>{const _0x567064=_0x2100ff;_0x3a0ca6[_0x567064(0xf1)](_0x5c15a5)&&_0xa3afb0['delete'](_0x5c15a5);}),_0xa3afb0[_0x2100ff(0xf7)]&&(await _0x4fbdf1[_0x2100ff(0xa5)]('/universer-api/user/list',{'params':{'userIDs':[..._0xa3afb0]}}))[_0x2100ff(0xad)]['users'][_0x2100ff(0xd1)](_0x413462=>{const _0x2e733a=_0x2100ff;_0x413462&&_0x3a0ca6[_0x2e733a(0xbc)](_0x413462);});};var K=Object[_0x5bceff(0xb9)],V=(_0x505a29,_0x15d0ae,_0x309bb7,_0x42311e)=>{const _0x5cd525=_0x5bceff;for(var _0x156173=_0x42311e>0x1?void 0x0:_0x42311e?K(_0x15d0ae,_0x309bb7):_0x15d0ae,_0x5874f1=_0x505a29[_0x5cd525(0xd5)]-0x1,_0x5e6b09;_0x5874f1>=0x0;_0x5874f1--)(_0x5e6b09=_0x505a29[_0x5874f1])&&(_0x156173=_0x5e6b09(_0x156173)||_0x156173);return _0x156173;},p=(_0x2640ce,_0x540d52)=>(_0x107ba2,_0x1cd12e)=>_0x540d52(_0x107ba2,_0x1cd12e,_0x2640ce);let _=class extends _0x1ef9d3{constructor(_0x290352,_0x2e4746,_0x18fca4,_0x5619bb){const _0x1fca2f=_0x5bceff;super(),this[_0x1fca2f(0xd6)]=_0x290352,this[_0x1fca2f(0x91)]=_0x2e4746,this[_0x1fca2f(0xe7)]=_0x18fca4,this['_injector']=_0x5619bb,this[_0x1fca2f(0xe2)](),this['_initUserSync']();}[_0x5bceff(0xd0)](){const _0x23165e=_0x5bceff;this[_0x23165e(0xbe)](this[_0x23165e(0x91)][_0x23165e(0xa7)][_0x23165e(0x8f)](_0x55a7a0(0x10))[_0x23165e(0xf3)](_0x4b86a0=>{const _0x4a3675=_0x23165e,_0x5c4549=new Set();_0x4b86a0['forEach'](_0x326b4c=>{const _0x588dc9=_0x4698;if(_0x326b4c[_0x588dc9(0xcf)]===_0x588dc9(0x93)){const _0x36a569=_0x326b4c['payload']['personId'];_0x5c4549[_0x588dc9(0x93)](_0x36a569);}}),B(this[_0x4a3675(0x92)],_0x5c4549);}));}[_0x5bceff(0xe2)](){const _0x41442d=_0x5bceff;this[_0x41442d(0xbe)](this[_0x41442d(0xd6)][_0x41442d(0xa7)][_0x41442d(0xf3)](async _0xc1f2f3=>{const _0x560997=_0x41442d;var _0x7f1587,_0x161986,_0x4e1c98,_0x3bb813;const _0x1b08a9=(_0x7f1587=this['_threadCommentModel'][_0x560997(0x97)](_0xc1f2f3[_0x560997(0xee)])[_0x560997(0xcd)](_0x654cf7=>_0x654cf7[_0x560997(0xae)]===_0xc1f2f3[_0x560997(0xae)]))==null?void 0x0:_0x7f1587[_0x560997(0xef)];if(!_0x1b08a9)return;const {unitId:_0x2baadc,subUnitId:_0x11fc11}=_0x1b08a9;switch(_0xc1f2f3[_0x560997(0x94)]&&this['_userService'][_0x560997(0xbc)](_0xc1f2f3[_0x560997(0x94)]),_0xc1f2f3[_0x560997(0xcf)]){case v[_0x560997(0xd9)]:break;case v[_0x560997(0xce)]:{this['_threadCommentModel'][_0x560997(0xac)](_0x2baadc,_0x11fc11,{'unitId':_0x2baadc,'subUnitId':_0x11fc11,'ref':'','id':_0xc1f2f3[_0x560997(0xbf)],'dT':y(+_0xc1f2f3[_0x560997(0x9c)]),'threadId':_0xc1f2f3['threadId'],'personId':(_0x4e1c98=(_0x161986=_0xc1f2f3['user'])==null?void 0x0:_0x161986['userID'])!=null?_0x4e1c98:_0xc1f2f3[_0x560997(0xb6)],'text':JSON[_0x560997(0xb5)](_0xc1f2f3[_0x560997(0xca)]),'parentId':_0x1b08a9['id']});break;}case v[_0x560997(0xd8)]:{const _0x1c9eed=this[_0x560997(0x91)][_0x560997(0x9d)](_0x2baadc,_0x11fc11,_0xc1f2f3[_0x560997(0xbf)]);_0x1c9eed&&_0x1c9eed[_0x560997(0xc1)]&&this['_threadCommentModel'][_0x560997(0xd7)](_0x2baadc,_0x11fc11,_0xc1f2f3[_0x560997(0xbf)]);break;}case v[_0x560997(0xdd)]:{this[_0x560997(0x91)][_0x560997(0xc5)](_0x2baadc,_0x11fc11,{'commentId':_0xc1f2f3[_0x560997(0xbf)],'text':JSON[_0x560997(0xb5)](_0xc1f2f3[_0x560997(0xca)])});break;}case v[_0x560997(0x9e)]:{const _0x2a7688=(_0x3bb813=this['_threadCommentModel'][_0x560997(0x97)](_0xc1f2f3[_0x560997(0xee)])['find'](_0x124c07=>_0x124c07[_0x560997(0xae)]===_0xc1f2f3[_0x560997(0xae)]))==null?void 0x0:_0x3bb813[_0x560997(0xef)];_0x2a7688&&this['_threadCommentModel'][_0x560997(0xe1)](_0x2baadc,_0x11fc11,_0x2a7688['id'],_0xc1f2f3['solved']===I['Solved']);break;}}}));}};function _0x4698(_0x1bba9f,_0x4abcde){_0x1bba9f=_0x1bba9f-0x8e;const _0x58cf23=_0x58cf();let _0x46988f=_0x58cf23[_0x1bba9f];return _0x46988f;}_=V([p(0x0,_0x46fdc7(_0x415846)),p(0x1,_0x46fdc7(_0x5bb445)),p(0x2,_0x46fdc7(_0x37dafd)),p(0x3,_0x46fdc7(_0x52b638))],_);const z=_0x5bceff(0xf6),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x3423a8,_0x45d53a,_0x472140,_0x101f71)=>{for(var _0x12f645=_0x101f71>0x1?void 0x0:_0x101f71?k(_0x45d53a,_0x472140):_0x45d53a,_0x531734=_0x3423a8['length']-0x1,_0x2543e3;_0x531734>=0x0;_0x531734--)(_0x2543e3=_0x3423a8[_0x531734])&&(_0x12f645=_0x2543e3(_0x12f645)||_0x12f645);return _0x12f645;},b=(_0x1aed27,_0x3b15fe)=>(_0x183259,_0x35b265)=>_0x3b15fe(_0x183259,_0x35b265,_0x1aed27);function X(_0x5c380c,_0x14f634){const _0x201262=_0x5bceff,_0x197e6e=_0x5c380c[_0x201262(0xa9)][0x0];return{..._0x14f634,'id':_0x197e6e[_0x201262(0xbf)],'resolved':_0x5c380c[_0x201262(0x90)]===0x1,'dT':y(_0x197e6e['createTimestamp']),'personId':_0x197e6e[_0x201262(0xb6)],'threadId':_0x197e6e[_0x201262(0xae)]};}function _0x58cf(){const _0x321f5c=['pluginName','3209NVWKoc','getMemberID','content','9099090aizSOO','symbol','find','Reply','type','_initUserSync','forEach','_configService','slice','code','length','_commentService','deleteComment','Delete','Add','/delete','getCurrentUser','stringify','Edit','29169768YzoMzV','76OvUAhk','post','resolveComment','_init','_httpService','1480455rxoWBo','comments','360uBhBHo','_userService','964RGaoiE','52208zSFzeH','Unknown','customRanges','/reply','UNIVER_UNKNOWN','unitId','root','/universer-api/comment/unit/','getUser','saveCommentToSnapshot','subscribe','setConfig','filter','thread-comment-data-source.config','size','YYYY/MM/DD\x20HH:mm','map','pipe','solved','_threadCommentModel','_injector','add','user','rangeId','listComments','getUnit','onStarting','2044vIgheh','rangeType','13OiskdU','createTimestamp','getComment','Solve','error','OpenOrReOpen','defineProperty','UNRECOGNIZED','_initDataSource','_threadCommentDataSource','get','comment','commentUpdate$','COMMENT','replies','/list','208734qZPRuk','addComment','body','threadId','/solved','users','597531bBSOHm','dataSource','_threadCommentDataSourceService','_sessionService','parse','userId','/edit','requireSession','getOwnPropertyDescriptor','format','Solved','addUser','/add','disposeWithMe','replyId','_config','parentId','ref','userID','24SUDTSY','updateComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x58cf=function(){return _0x321f5c;};return _0x58cf();}function ee(_0x5d5481,_0x145f0a,_0x5aaad1){const _0x3f20af=_0x5bceff;var _0x1bea16,_0x21f17a;if(((_0x21f17a=(_0x1bea16=_0x5d5481==null?void 0x0:_0x5d5481[_0x3f20af(0xa9)])==null?void 0x0:_0x1bea16[_0x3f20af(0xd5)])!=null?_0x21f17a:0x0)>0x0){const _0xd9a8f9=(_0x25137f,_0x34c73c)=>({'id':_0x25137f[_0x3f20af(0xbf)],'threadId':_0x25137f[_0x3f20af(0xae)],'dT':y(_0x25137f[_0x3f20af(0x9c)]),'personId':_0x25137f[_0x3f20af(0xb6)],'resolved':_0x5d5481[_0x3f20af(0x90)]===I[_0x3f20af(0xbb)],'unitId':_0x145f0a,'subUnitId':_0x5aaad1,'text':JSON[_0x3f20af(0xb5)](_0x25137f[_0x3f20af(0xca)]),'parentId':_0x34c73c}),_0x35f71e=_0xd9a8f9(_0x5d5481['replies'][0x0]);return{..._0x35f71e,'children':_0x5d5481[_0x3f20af(0xa9)][_0x3f20af(0xd3)](0x1)[_0x3f20af(0x8e)](_0x632120=>_0xd9a8f9(_0x632120,_0x35f71e['id']))};}return null;}let S=class{constructor(_0x4e8763,_0x110ae3,_0x8d301){const _0x212eda=_0x5bceff;this['_httpService']=_0x4e8763,this[_0x212eda(0xe7)]=_0x110ae3,this[_0x212eda(0xb4)]=_0x8d301;}async[_0x5bceff(0xac)](_0x2323b9){const _0x4bbbd5=_0x5bceff;var _0x280017,_0x565f2e;const {parentId:_0x5bddd6,unitId:_0xf60c6d,text:_0x54d61a,threadId:_0x63b635}=_0x2323b9,_0x1aca02=(_0x565f2e=(_0x280017=_0x54d61a['customRanges'])==null?void 0x0:_0x280017[_0x4bbbd5(0xf5)](_0x4ad836=>_0x4ad836[_0x4bbbd5(0x9a)]===_0x461976['COMMENT'])[_0x4bbbd5(0x8e)](_0x220ff0=>_0x220ff0[_0x4bbbd5(0x95)]))!=null?_0x565f2e:[],_0x283974=JSON[_0x4bbbd5(0xdc)](_0x54d61a),_0x220885=(await this['_sessionService'][_0x4bbbd5(0xb8)](_0xf60c6d))['getMemberID']();if(_0x5bddd6){const _0x570366={'memberId':_0x220885,'unitId':_0xf60c6d,'content':_0x283974,'mention':_0x1aca02,'threadId':_0x63b635},_0x56162d=(await this[_0x4bbbd5(0xe3)][_0x4bbbd5(0xe0)](_0x4bbbd5(0xf0)+_0xf60c6d+_0x4bbbd5(0xec),{'body':_0x570366}))[_0x4bbbd5(0xad)]['reply'];return{..._0x2323b9,'id':_0x56162d[_0x4bbbd5(0xbf)],'dT':_0x45d0f3(+_0x56162d[_0x4bbbd5(0x9c)])['format'](_0x4bbbd5(0xf8)),'personId':_0x56162d[_0x4bbbd5(0xb6)]};}else{const _0x4a3772={'memberId':_0x220885,'unitId':_0xf60c6d,'content':_0x283974,'mention':_0x1aca02},_0x83f5e8=await this['_httpService'][_0x4bbbd5(0xe0)](_0x4bbbd5(0xf0)+_0xf60c6d+_0x4bbbd5(0xbd),{'body':_0x4a3772});return X(_0x83f5e8[_0x4bbbd5(0xad)][_0x4bbbd5(0xa6)],_0x2323b9);}}async[_0x5bceff(0xc5)](_0x47e651){const _0x498a56=_0x5bceff;var _0x13e4e0,_0x4660dc;const {text:_0x499e89,unitId:_0x206f7a}=_0x47e651,_0x30a97a=(_0x4660dc=(_0x13e4e0=_0x499e89[_0x498a56(0xeb)])==null?void 0x0:_0x13e4e0['filter'](_0x19fced=>_0x19fced[_0x498a56(0x9a)]===_0x461976[_0x498a56(0xa8)])[_0x498a56(0x8e)](_0x3e1751=>_0x3e1751[_0x498a56(0x95)]))!=null?_0x4660dc:[],_0x33f963=JSON['stringify'](_0x499e89),_0x16e655=_0x47e651[_0x498a56(0xae)],_0x4ea263=_0x47e651['id'],_0x2a7bb4={'memberId':(await this[_0x498a56(0xb4)][_0x498a56(0xb8)](_0x206f7a))[_0x498a56(0xc9)](),'unitId':_0x206f7a,'threadId':_0x16e655,'mention':_0x30a97a,'content':_0x33f963,'replyId':_0x4ea263},_0x3730bc=await this[_0x498a56(0xe3)]['post'](_0x498a56(0xf0)+_0x206f7a+_0x498a56(0xb7),{'body':_0x2a7bb4});return!_0x3730bc['body'][_0x498a56(0x9f)]||_0x3730bc[_0x498a56(0xad)][_0x498a56(0x9f)][_0x498a56(0xd4)]===0x1;}async[_0x5bceff(0xe1)](_0xe8f08c){const _0x78864f=_0x5bceff,{unitId:_0x11cf53}=_0xe8f08c,_0x2f40ac=_0xe8f08c[_0x78864f(0xae)],_0x22a616={'memberId':this[_0x78864f(0xe7)][_0x78864f(0xdb)]()[_0x78864f(0xc3)],'unitId':_0x11cf53,'threadId':_0x2f40ac,'solved':_0xe8f08c['resolved']?I[_0x78864f(0xbb)]:I[_0x78864f(0xa0)]},_0x3823b1=await this[_0x78864f(0xe3)][_0x78864f(0xe0)](_0x78864f(0xf0)+_0x11cf53+_0x78864f(0xaf),{'body':_0x22a616});return!_0x3823b1[_0x78864f(0xad)][_0x78864f(0x9f)]||_0x3823b1[_0x78864f(0xad)][_0x78864f(0x9f)]['code']===0x1;}async[_0x5bceff(0xd7)](_0x27483c,_0x1c1687,_0x2f418a,_0x304dc1){const _0x4bc2cb=_0x5bceff,_0x42949c={'memberId':(await this[_0x4bc2cb(0xb4)]['requireSession'](_0x27483c))[_0x4bc2cb(0xc9)](),'threadId':_0x2f418a,'replyId':_0x304dc1,'unitId':_0x27483c},_0x1346fd=await this[_0x4bc2cb(0xe3)][_0x4bc2cb(0xe0)](_0x4bc2cb(0xf0)+_0x27483c+_0x4bc2cb(0xda),{'body':_0x42949c});return!_0x1346fd[_0x4bc2cb(0xad)][_0x4bc2cb(0x9f)]||_0x1346fd['body'][_0x4bc2cb(0x9f)]['code']===0x1;}async[_0x5bceff(0x96)](_0x4b73dc,_0x145737,_0x12018b){const _0x420587=_0x5bceff,_0x3f03aa={'unitId':_0x4b73dc,'threadId':_0x12018b},_0x3088a7=await this['_httpService'][_0x420587(0xe0)](_0x420587(0xf0)+_0x4b73dc+_0x420587(0xaa),{'body':_0x3f03aa}),_0x2cd3f5=_0x12018b[_0x420587(0x8e)](_0x35a2b4=>ee(_0x3088a7[_0x420587(0xad)][_0x420587(0xe5)][_0x35a2b4],_0x4b73dc,_0x145737))['filter'](Boolean);return Object['values'](_0x3088a7[_0x420587(0xad)][_0x420587(0xb0)])[_0x420587(0xd1)](_0x4c9058=>{const _0x46554f=_0x420587;this['_userService'][_0x46554f(0xbc)](_0x4c9058);}),_0x2cd3f5;}[_0x5bceff(0xf2)](_0x1cb80f){const _0x52c8b8=_0x5bceff;return{'id':_0x1cb80f['id'],'threadId':_0x1cb80f['threadId'],'ref':_0x1cb80f[_0x52c8b8(0xc2)]};}};S=Q([b(0x0,_0x46fdc7(_0x4e26ab)),b(0x1,_0x46fdc7(_0x37dafd)),b(0x2,_0x46fdc7(_0x50a11c))],S);var re=Object[_0x5bceff(0xb9)],te=(_0x33a2f5,_0x34258e,_0x15d3e6,_0xfe2de3)=>{const _0x118e85=_0x5bceff;for(var _0x41490a=_0xfe2de3>0x1?void 0x0:_0xfe2de3?re(_0x34258e,_0x15d3e6):_0x34258e,_0x15c13f=_0x33a2f5[_0x118e85(0xd5)]-0x1,_0x4e0e19;_0x15c13f>=0x0;_0x15c13f--)(_0x4e0e19=_0x33a2f5[_0x15c13f])&&(_0x41490a=_0x4e0e19(_0x41490a)||_0x41490a);return _0x41490a;},M=(_0x26328f,_0xa4f9fd)=>(_0x167cac,_0x2dadad)=>_0xa4f9fd(_0x167cac,_0x2dadad,_0x26328f);let f=class extends _0x1ef9d3{constructor(_0x2995c5,_0x3f168f){const _0x2b6c7c=_0x5bceff;super(),this['_threadCommentDataSourceService']=_0x2995c5,this[_0x2b6c7c(0xa4)]=_0x3f168f,this[_0x2b6c7c(0xa3)]();}[_0x5bceff(0xa3)](){const _0x119b7a=_0x5bceff;this['_threadCommentDataSourceService'][_0x119b7a(0xb2)]=this[_0x119b7a(0xa4)],this[_0x119b7a(0xb3)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x77a420),M(0x1,_0x46fdc7(S))],f);var se=Object[_0x5bceff(0xa1)],oe=Object[_0x5bceff(0xb9)],ne=(_0x4243a3,_0x258982,_0x54cef0)=>_0x258982 in _0x4243a3?se(_0x4243a3,_0x258982,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x54cef0}):_0x4243a3[_0x258982]=_0x54cef0,ie=(_0x16c3c5,_0x70e7ce,_0x2b26e8,_0x5a143d)=>{for(var _0x1e75b4=_0x5a143d>0x1?void 0x0:_0x5a143d?oe(_0x70e7ce,_0x2b26e8):_0x70e7ce,_0x3fde33=_0x16c3c5['length']-0x1,_0x2ab987;_0x3fde33>=0x0;_0x3fde33--)(_0x2ab987=_0x16c3c5[_0x3fde33])&&(_0x1e75b4=_0x2ab987(_0x1e75b4)||_0x1e75b4);return _0x1e75b4;},N=(_0x4aba5b,_0x4e0cc6)=>(_0x38c1c9,_0x1353d2)=>_0x4e0cc6(_0x38c1c9,_0x1353d2,_0x4aba5b),$=(_0x2f3fa6,_0x445afc,_0x3ca219)=>ne(_0x2f3fa6,typeof _0x445afc!=_0x5bceff(0xcc)?_0x445afc+'':_0x445afc,_0x3ca219);let g=class extends _0x6e4833{constructor(_0x2eb8a1=O,_0x35a04b,_0x4b8a69){const _0x4f1463=_0x5bceff;super(),this[_0x4f1463(0xc0)]=_0x2eb8a1,this[_0x4f1463(0x92)]=_0x35a04b,this[_0x4f1463(0xd2)]=_0x4b8a69;const {..._0x4c710a}=_0x53449f({},O,this[_0x4f1463(0xc0)]);this[_0x4f1463(0xd2)][_0x4f1463(0xf4)](z,_0x4c710a);}[_0x5bceff(0x98)](){const _0x4d583c=_0x5bceff;[[S],[f],[_]][_0x4d583c(0xd1)](_0x134783=>{const _0xff69fc=_0x4d583c;this[_0xff69fc(0x92)][_0xff69fc(0x93)](_0x134783);});}['onReady'](){const _0xc118b0=_0x5bceff;this[_0xc118b0(0x92)][_0xc118b0(0xa5)](f),this[_0xc118b0(0x92)][_0xc118b0(0xa5)](_);}};$(g,_0x5bceff(0xc7),W),$(g,_0x5bceff(0xcf),_0x37f344[_0x5bceff(0xed)]),g=ie([_0x437391(_0x83888d,_0x44b3b2,_0x376c7a),N(0x1,_0x46fdc7(_0x52b638)),N(0x2,_0x5cfae7)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3f63da=_0x4fd3;(function(_0x251443,_0x30a4a7){const _0x14167c=_0x4fd3,_0x4ef987=_0x251443();while(!![]){try{const _0x428008=parseInt(_0x14167c(0x184))/0x1*(-parseInt(_0x14167c(0x19d))/0x2)+-parseInt(_0x14167c(0x147))/0x3+-parseInt(_0x14167c(0x159))/0x4*(-parseInt(_0x14167c(0x14f))/0x5)+-parseInt(_0x14167c(0x16c))/0x6+-parseInt(_0x14167c(0x171))/0x7*(parseInt(_0x14167c(0x164))/0x8)+-parseInt(_0x14167c(0x1a3))/0x9*(parseInt(_0x14167c(0x163))/0xa)+parseInt(_0x14167c(0x190))/0xb*(parseInt(_0x14167c(0x186))/0xc);if(_0x428008===_0x30a4a7)break;else _0x4ef987['push'](_0x4ef987['shift']());}catch(_0x4e52fa){_0x4ef987['push'](_0x4ef987['shift']());}}}(_0x1b76,0xa06f5));import{CommentService as _0x496dbb,CollaborationSessionService as _0x2c5e4c,UniverCollaborationClientPlugin as _0x3a685b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x586010}from'@univerjs-pro/license';import{dayjs as _0x28ba39,UserManagerService as _0x388990,Inject as _0x4bd280,Injector as _0x249295,Disposable as _0x391d46,CustomRangeType as _0x51ffb1,UniverInstanceType as _0x35e782,DependentOn as _0x25b0c6,IConfigService as _0x55aae9,Plugin as _0x14a1a2,merge as _0x21e87f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1d91a2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5d3082,IThreadCommentDataSourceService as _0x2f9f28}from'@univerjs/thread-comment';import{bufferTime as _0x316e50}from'rxjs';import{HTTPService as _0x16abd7}from'@univerjs/network';const W=_0x3f63da(0x17c);var I=(_0x5890c0=>(_0x5890c0[_0x5890c0[_0x3f63da(0x16e)]=0x0]='OpenOrReOpen',_0x5890c0[_0x5890c0['Solved']=0x1]='Solved',_0x5890c0[_0x5890c0[_0x3f63da(0x185)]=-0x1]=_0x3f63da(0x185),_0x5890c0))(I||{}),v=(_0x3d4d9d=>(_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x18a)]=0x0]='Unknown',_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x17a)]=0x1]='Add',_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x19a)]=0x2]=_0x3f63da(0x19a),_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x198)]=0x3]='Edit',_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x149)]=0x4]=_0x3f63da(0x149),_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x1a6)]=0x5]='Solve',_0x3d4d9d[_0x3d4d9d['UNRECOGNIZED']=-0x1]=_0x3f63da(0x185),_0x3d4d9d))(v||{});const y=_0x1416c3=>_0x28ba39(new Date(+_0x1416c3))[_0x3f63da(0x181)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3258a6,_0x1eaeba)=>{const _0x370a20=_0x3f63da,_0x2fff28=_0x3258a6[_0x370a20(0x14e)](_0x388990),_0x3566a7=_0x3258a6['get'](_0x16abd7);_0x1eaeba[_0x370a20(0x197)](_0x3e621b=>{const _0x901d45=_0x370a20;_0x2fff28[_0x901d45(0x192)](_0x3e621b)&&_0x1eaeba[_0x901d45(0x170)](_0x3e621b);}),_0x1eaeba['size']&&(await _0x3566a7[_0x370a20(0x14e)](_0x370a20(0x18e),{'params':{'userIDs':[..._0x1eaeba]}}))[_0x370a20(0x145)][_0x370a20(0x17b)][_0x370a20(0x197)](_0x13115c=>{const _0x39e410=_0x370a20;_0x13115c&&_0x2fff28[_0x39e410(0x153)](_0x13115c);});};var K=Object[_0x3f63da(0x1aa)],V=(_0x3accf5,_0x9c9acd,_0x29efc7,_0x3623a7)=>{const _0x3b9bb5=_0x3f63da;for(var _0x40db44=_0x3623a7>0x1?void 0x0:_0x3623a7?K(_0x9c9acd,_0x29efc7):_0x9c9acd,_0x5170bb=_0x3accf5[_0x3b9bb5(0x1a1)]-0x1,_0x132f41;_0x5170bb>=0x0;_0x5170bb--)(_0x132f41=_0x3accf5[_0x5170bb])&&(_0x40db44=_0x132f41(_0x40db44)||_0x40db44);return _0x40db44;},p=(_0x129962,_0x2bc81e)=>(_0x26cd2a,_0x58c1d0)=>_0x2bc81e(_0x26cd2a,_0x58c1d0,_0x129962);let _=class extends _0x391d46{constructor(_0x277360,_0x471aa6,_0x570188,_0x16573e){const _0x5e6ea2=_0x3f63da;super(),this[_0x5e6ea2(0x168)]=_0x277360,this['_threadCommentModel']=_0x471aa6,this[_0x5e6ea2(0x17f)]=_0x570188,this[_0x5e6ea2(0x175)]=_0x16573e,this[_0x5e6ea2(0x176)](),this[_0x5e6ea2(0x156)]();}['_initUserSync'](){const _0x2394b4=_0x3f63da;this[_0x2394b4(0x187)](this['_threadCommentModel']['commentUpdate$'][_0x2394b4(0x18c)](_0x316e50(0x10))['subscribe'](_0x1a15ba=>{const _0x961bef=_0x2394b4,_0x588321=new Set();_0x1a15ba[_0x961bef(0x197)](_0x177bef=>{const _0xe6be29=_0x961bef;if(_0x177bef['type']==='add'){const _0x3addec=_0x177bef[_0xe6be29(0x14d)][_0xe6be29(0x144)];_0x588321[_0xe6be29(0x199)](_0x3addec);}}),B(this[_0x961bef(0x175)],_0x588321);}));}[_0x3f63da(0x176)](){const _0x2ed88e=_0x3f63da;this[_0x2ed88e(0x187)](this[_0x2ed88e(0x168)][_0x2ed88e(0x146)][_0x2ed88e(0x155)](async _0x41429a=>{const _0x346ce0=_0x2ed88e;var _0x20cb01,_0x5adcc7,_0x2b684e,_0x4b7fb0;const _0x510c45=(_0x20cb01=this[_0x346ce0(0x178)][_0x346ce0(0x174)](_0x41429a[_0x346ce0(0x143)])[_0x346ce0(0x1a2)](_0x195d56=>_0x195d56[_0x346ce0(0x1a7)]===_0x41429a['threadId']))==null?void 0x0:_0x20cb01['root'];if(!_0x510c45)return;const {unitId:_0x15ecc2,subUnitId:_0x299f45}=_0x510c45;switch(_0x41429a['user']&&this[_0x346ce0(0x17f)]['addUser'](_0x41429a[_0x346ce0(0x16a)]),_0x41429a[_0x346ce0(0x15d)]){case v[_0x346ce0(0x17a)]:break;case v[_0x346ce0(0x19a)]:{this[_0x346ce0(0x178)]['addComment'](_0x15ecc2,_0x299f45,{'unitId':_0x15ecc2,'subUnitId':_0x299f45,'ref':'','id':_0x41429a['replyId'],'dT':y(+_0x41429a[_0x346ce0(0x1a4)]),'threadId':_0x41429a[_0x346ce0(0x1a7)],'personId':(_0x2b684e=(_0x5adcc7=_0x41429a[_0x346ce0(0x16a)])==null?void 0x0:_0x5adcc7['userID'])!=null?_0x2b684e:_0x41429a[_0x346ce0(0x19c)],'text':JSON[_0x346ce0(0x151)](_0x41429a['content']),'parentId':_0x510c45['id']});break;}case v[_0x346ce0(0x149)]:{const _0x529631=this[_0x346ce0(0x178)][_0x346ce0(0x165)](_0x15ecc2,_0x299f45,_0x41429a[_0x346ce0(0x161)]);_0x529631&&_0x529631['parentId']&&this[_0x346ce0(0x178)]['deleteComment'](_0x15ecc2,_0x299f45,_0x41429a['replyId']);break;}case v[_0x346ce0(0x198)]:{this[_0x346ce0(0x178)][_0x346ce0(0x183)](_0x15ecc2,_0x299f45,{'commentId':_0x41429a[_0x346ce0(0x161)],'text':JSON['parse'](_0x41429a['content'])});break;}case v['Solve']:{const _0x25c421=(_0x4b7fb0=this[_0x346ce0(0x178)][_0x346ce0(0x174)](_0x41429a['unitId'])['find'](_0x4de646=>_0x4de646[_0x346ce0(0x1a7)]===_0x41429a[_0x346ce0(0x1a7)]))==null?void 0x0:_0x4b7fb0[_0x346ce0(0x167)];_0x25c421&&this[_0x346ce0(0x178)][_0x346ce0(0x150)](_0x15ecc2,_0x299f45,_0x25c421['id'],_0x41429a['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4bd280(_0x496dbb)),p(0x1,_0x4bd280(_0x5d3082)),p(0x2,_0x4bd280(_0x388990)),p(0x3,_0x4bd280(_0x249295))],_);function _0x4fd3(_0x502c48,_0x24f8ce){_0x502c48=_0x502c48-0x143;const _0x1b7602=_0x1b76();let _0x4fd326=_0x1b7602[_0x502c48];return _0x4fd326;}const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x38373b,_0x25bacf,_0x49f8d6,_0x132edb)=>{const _0x5ac149=_0x3f63da;for(var _0x2e1628=_0x132edb>0x1?void 0x0:_0x132edb?k(_0x25bacf,_0x49f8d6):_0x25bacf,_0x26fc15=_0x38373b[_0x5ac149(0x1a1)]-0x1,_0x28c166;_0x26fc15>=0x0;_0x26fc15--)(_0x28c166=_0x38373b[_0x26fc15])&&(_0x2e1628=_0x28c166(_0x2e1628)||_0x2e1628);return _0x2e1628;},b=(_0x143ecd,_0x4531c2)=>(_0x2df912,_0x39fd54)=>_0x4531c2(_0x2df912,_0x39fd54,_0x143ecd);function X(_0x3c675c,_0x5b4311){const _0x293743=_0x3f63da,_0x5e557b=_0x3c675c[_0x293743(0x173)][0x0];return{..._0x5b4311,'id':_0x5e557b[_0x293743(0x161)],'resolved':_0x3c675c[_0x293743(0x1a8)]===0x1,'dT':y(_0x5e557b[_0x293743(0x1a4)]),'personId':_0x5e557b[_0x293743(0x19c)],'threadId':_0x5e557b['threadId']};}function ee(_0x3dd8d8,_0x5781cc,_0x357123){const _0x41ad8d=_0x3f63da;var _0x380787,_0x2020ed;if(((_0x2020ed=(_0x380787=_0x3dd8d8==null?void 0x0:_0x3dd8d8[_0x41ad8d(0x173)])==null?void 0x0:_0x380787[_0x41ad8d(0x1a1)])!=null?_0x2020ed:0x0)>0x0){const _0x529d8a=(_0x42e7eb,_0x2e8018)=>({'id':_0x42e7eb['replyId'],'threadId':_0x42e7eb[_0x41ad8d(0x1a7)],'dT':y(_0x42e7eb['createTimestamp']),'personId':_0x42e7eb['userId'],'resolved':_0x3dd8d8[_0x41ad8d(0x1a8)]===I[_0x41ad8d(0x193)],'unitId':_0x5781cc,'subUnitId':_0x357123,'text':JSON[_0x41ad8d(0x151)](_0x42e7eb[_0x41ad8d(0x1a9)]),'parentId':_0x2e8018}),_0x17cc45=_0x529d8a(_0x3dd8d8[_0x41ad8d(0x173)][0x0]);return{..._0x17cc45,'children':_0x3dd8d8[_0x41ad8d(0x173)][_0x41ad8d(0x17d)](0x1)[_0x41ad8d(0x18b)](_0x16c60d=>_0x529d8a(_0x16c60d,_0x17cc45['id']))};}return null;}let S=class{constructor(_0x44c1b8,_0xb48d13,_0x3577cf){const _0x3c8f03=_0x3f63da;this[_0x3c8f03(0x15c)]=_0x44c1b8,this['_userService']=_0xb48d13,this[_0x3c8f03(0x195)]=_0x3577cf;}async['addComment'](_0x445902){const _0x598007=_0x3f63da;var _0x217d86,_0x5a3f4d;const {parentId:_0x38c24d,unitId:_0x53f572,text:_0x370955,threadId:_0x4bd308}=_0x445902,_0x41a74f=(_0x5a3f4d=(_0x217d86=_0x370955['customRanges'])==null?void 0x0:_0x217d86[_0x598007(0x157)](_0x5d311b=>_0x5d311b['rangeType']===_0x51ffb1['COMMENT'])[_0x598007(0x18b)](_0x22d42b=>_0x22d42b[_0x598007(0x148)]))!=null?_0x5a3f4d:[],_0x44b320=JSON[_0x598007(0x160)](_0x370955),_0x49db91=(await this[_0x598007(0x195)][_0x598007(0x16d)](_0x53f572))[_0x598007(0x191)]();if(_0x38c24d){const _0x4bd247={'memberId':_0x49db91,'unitId':_0x53f572,'content':_0x44b320,'mention':_0x41a74f,'threadId':_0x4bd308},_0x164bfb=(await this[_0x598007(0x15c)][_0x598007(0x15b)](_0x598007(0x19e)+_0x53f572+'/reply',{'body':_0x4bd247}))['body'][_0x598007(0x16f)];return{..._0x445902,'id':_0x164bfb[_0x598007(0x161)],'dT':_0x28ba39(+_0x164bfb[_0x598007(0x1a4)])['format'](_0x598007(0x152)),'personId':_0x164bfb[_0x598007(0x19c)]};}else{const _0x44c0ab={'memberId':_0x49db91,'unitId':_0x53f572,'content':_0x44b320,'mention':_0x41a74f},_0x669843=await this[_0x598007(0x15c)][_0x598007(0x15b)](_0x598007(0x19e)+_0x53f572+_0x598007(0x17e),{'body':_0x44c0ab});return X(_0x669843[_0x598007(0x145)][_0x598007(0x166)],_0x445902);}}async[_0x3f63da(0x183)](_0x1ac438){const _0x5d4e12=_0x3f63da;var _0x3de0f7,_0x148e67;const {text:_0x37c0e2,unitId:_0x17e8cb}=_0x1ac438,_0x3fa4a2=(_0x148e67=(_0x3de0f7=_0x37c0e2[_0x5d4e12(0x177)])==null?void 0x0:_0x3de0f7[_0x5d4e12(0x157)](_0x3978f8=>_0x3978f8[_0x5d4e12(0x1a5)]===_0x51ffb1[_0x5d4e12(0x196)])[_0x5d4e12(0x18b)](_0x106213=>_0x106213['rangeId']))!=null?_0x148e67:[],_0x39a5de=JSON[_0x5d4e12(0x160)](_0x37c0e2),_0x3b82a3=_0x1ac438[_0x5d4e12(0x1a7)],_0x305af8=_0x1ac438['id'],_0x111643={'memberId':(await this['_sessionService'][_0x5d4e12(0x16d)](_0x17e8cb))['getMemberID'](),'unitId':_0x17e8cb,'threadId':_0x3b82a3,'mention':_0x3fa4a2,'content':_0x39a5de,'replyId':_0x305af8},_0x2a5caf=await this['_httpService'][_0x5d4e12(0x15b)](_0x5d4e12(0x19e)+_0x17e8cb+'/edit',{'body':_0x111643});return!_0x2a5caf[_0x5d4e12(0x145)][_0x5d4e12(0x188)]||_0x2a5caf[_0x5d4e12(0x145)][_0x5d4e12(0x188)][_0x5d4e12(0x19f)]===0x1;}async[_0x3f63da(0x150)](_0x22c1af){const _0x391918=_0x3f63da,{unitId:_0x394fd3}=_0x22c1af,_0x52fa84=_0x22c1af[_0x391918(0x1a7)],_0x2c94af={'memberId':this[_0x391918(0x17f)][_0x391918(0x14a)]()[_0x391918(0x18d)],'unitId':_0x394fd3,'threadId':_0x52fa84,'solved':_0x22c1af[_0x391918(0x18f)]?I['Solved']:I[_0x391918(0x16e)]},_0x3d29c1=await this['_httpService'][_0x391918(0x15b)](_0x391918(0x19e)+_0x394fd3+'/solved',{'body':_0x2c94af});return!_0x3d29c1[_0x391918(0x145)][_0x391918(0x188)]||_0x3d29c1['body']['error']['code']===0x1;}async[_0x3f63da(0x14c)](_0xb74be6,_0x5f5b57,_0x536da1,_0x4cdb1d){const _0x1353bb=_0x3f63da,_0x56fa6e={'memberId':(await this[_0x1353bb(0x195)][_0x1353bb(0x16d)](_0xb74be6))[_0x1353bb(0x191)](),'threadId':_0x536da1,'replyId':_0x4cdb1d,'unitId':_0xb74be6},_0x2c324b=await this[_0x1353bb(0x15c)]['post'](_0x1353bb(0x19e)+_0xb74be6+_0x1353bb(0x172),{'body':_0x56fa6e});return!_0x2c324b[_0x1353bb(0x145)][_0x1353bb(0x188)]||_0x2c324b['body'][_0x1353bb(0x188)][_0x1353bb(0x19f)]===0x1;}async[_0x3f63da(0x15e)](_0x3846dd,_0xa5fafd,_0x355c55){const _0x42d450=_0x3f63da,_0x417290={'unitId':_0x3846dd,'threadId':_0x355c55},_0x1595d=await this['_httpService']['post'](_0x42d450(0x19e)+_0x3846dd+'/list',{'body':_0x417290}),_0x197870=_0x355c55[_0x42d450(0x18b)](_0x37bd38=>ee(_0x1595d[_0x42d450(0x145)][_0x42d450(0x15a)][_0x37bd38],_0x3846dd,_0xa5fafd))[_0x42d450(0x157)](Boolean);return Object[_0x42d450(0x182)](_0x1595d[_0x42d450(0x145)][_0x42d450(0x17b)])[_0x42d450(0x197)](_0x39cf1a=>{const _0x1a2901=_0x42d450;this[_0x1a2901(0x17f)][_0x1a2901(0x153)](_0x39cf1a);}),_0x197870;}[_0x3f63da(0x189)](_0x49a50c){const _0x5cb2c6=_0x3f63da;return{'id':_0x49a50c['id'],'threadId':_0x49a50c[_0x5cb2c6(0x1a7)],'ref':_0x49a50c[_0x5cb2c6(0x16b)]};}};function _0x1b76(){const _0x3fdba0=['_httpService','type','listComments','_threadCommentDataSourceService','stringify','replyId','_configService','3703220iXLVEV','8XvKUcU','getComment','comment','root','_commentService','_initDataSource','user','ref','2616942ITFNRR','requireSession','OpenOrReOpen','reply','delete','5700331wfInQT','/delete','replies','getUnit','_injector','_init','customRanges','_threadCommentModel','_threadCommentDataSource','Add','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','slice','/add','_userService','_config','format','values','updateComment','1GDNkXl','UNRECOGNIZED','167160cmkBfK','disposeWithMe','error','saveCommentToSnapshot','Unknown','map','pipe','userID','/universer-api/user/list','resolved','2750tJfpJw','getMemberID','getUser','Solved','defineProperty','_sessionService','COMMENT','forEach','Edit','add','Reply','syncUpdateMutationToColla','userId','450688TADXBX','/universer-api/comment/unit/','code','onReady','length','find','18ZWEusn','createTimestamp','rangeType','Solve','threadId','solved','content','getOwnPropertyDescriptor','unitId','personId','body','commentUpdate$','3754998TggIOg','rangeId','Delete','getCurrentUser','pluginName','deleteComment','payload','get','1595pVRxMl','resolveComment','parse','YYYY/MM/DD\x20HH:mm','addUser','dataSource','subscribe','_initUserSync','filter','setConfig','8060yAyonb','comments','post'];_0x1b76=function(){return _0x3fdba0;};return _0x1b76();}S=Q([b(0x0,_0x4bd280(_0x16abd7)),b(0x1,_0x4bd280(_0x388990)),b(0x2,_0x4bd280(_0x2c5e4c))],S);var re=Object[_0x3f63da(0x1aa)],te=(_0x2de3ba,_0x627aa8,_0x34506d,_0x28971f)=>{const _0x59e1fe=_0x3f63da;for(var _0x9c9fac=_0x28971f>0x1?void 0x0:_0x28971f?re(_0x627aa8,_0x34506d):_0x627aa8,_0x221e15=_0x2de3ba[_0x59e1fe(0x1a1)]-0x1,_0x1f4b27;_0x221e15>=0x0;_0x221e15--)(_0x1f4b27=_0x2de3ba[_0x221e15])&&(_0x9c9fac=_0x1f4b27(_0x9c9fac)||_0x9c9fac);return _0x9c9fac;},M=(_0x1919e9,_0x294a12)=>(_0x30db81,_0xbebaf1)=>_0x294a12(_0x30db81,_0xbebaf1,_0x1919e9);let f=class extends _0x391d46{constructor(_0x3b163c,_0x3e48dc){const _0x5ad643=_0x3f63da;super(),this[_0x5ad643(0x15f)]=_0x3b163c,this[_0x5ad643(0x179)]=_0x3e48dc,this[_0x5ad643(0x169)]();}['_initDataSource'](){const _0x25edef=_0x3f63da;this[_0x25edef(0x15f)][_0x25edef(0x154)]=this[_0x25edef(0x179)],this[_0x25edef(0x15f)][_0x25edef(0x19b)]=!0x1;}};f=te([M(0x0,_0x2f9f28),M(0x1,_0x4bd280(S))],f);var se=Object[_0x3f63da(0x194)],oe=Object[_0x3f63da(0x1aa)],ne=(_0x2fe6fd,_0x590c24,_0x3b632a)=>_0x590c24 in _0x2fe6fd?se(_0x2fe6fd,_0x590c24,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b632a}):_0x2fe6fd[_0x590c24]=_0x3b632a,ie=(_0x42b5a3,_0x588d56,_0x1e4d7d,_0x25b3b7)=>{const _0x1d860e=_0x3f63da;for(var _0x24b614=_0x25b3b7>0x1?void 0x0:_0x25b3b7?oe(_0x588d56,_0x1e4d7d):_0x588d56,_0x316b48=_0x42b5a3[_0x1d860e(0x1a1)]-0x1,_0xf82413;_0x316b48>=0x0;_0x316b48--)(_0xf82413=_0x42b5a3[_0x316b48])&&(_0x24b614=_0xf82413(_0x24b614)||_0x24b614);return _0x24b614;},N=(_0x243842,_0xb7b003)=>(_0x4301f7,_0x1a0bc2)=>_0xb7b003(_0x4301f7,_0x1a0bc2,_0x243842),$=(_0x265a4d,_0x3c2f1f,_0x4d5696)=>ne(_0x265a4d,typeof _0x3c2f1f!='symbol'?_0x3c2f1f+'':_0x3c2f1f,_0x4d5696);let g=class extends _0x14a1a2{constructor(_0x576930=O,_0x394901,_0xed77a7){const _0x2a4fcb=_0x3f63da;super(),this[_0x2a4fcb(0x180)]=_0x576930,this[_0x2a4fcb(0x175)]=_0x394901,this['_configService']=_0xed77a7;const {..._0x4b66d0}=_0x21e87f({},O,this[_0x2a4fcb(0x180)]);this[_0x2a4fcb(0x162)][_0x2a4fcb(0x158)](z,_0x4b66d0);}['onStarting'](){const _0x499287=_0x3f63da;[[S],[f],[_]][_0x499287(0x197)](_0x79f8f=>{const _0x209775=_0x499287;this[_0x209775(0x175)][_0x209775(0x199)](_0x79f8f);});}[_0x3f63da(0x1a0)](){const _0x2583cd=_0x3f63da;this[_0x2583cd(0x175)][_0x2583cd(0x14e)](f),this[_0x2583cd(0x175)][_0x2583cd(0x14e)](_);}};$(g,_0x3f63da(0x14b),W),$(g,_0x3f63da(0x15d),_0x35e782['UNIVER_UNKNOWN']),g=ie([_0x25b0c6(_0x1d91a2,_0x3a685b,_0x586010),N(0x1,_0x4bd280(_0x249295)),N(0x2,_0x55aae9)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5bceff=_0x4698;(function(_0x100b92,_0x3ab457){const _0x5dbea3=_0x4698,_0x54fc11=_0x100b92();while(!![]){try{const _0x1714c6=parseInt(_0x5dbea3(0xc8))/0x1*(parseInt(_0x5dbea3(0xe8))/0x2)+-parseInt(_0x5dbea3(0xab))/0x3*(parseInt(_0x5dbea3(0xdf))/0x4)+parseInt(_0x5dbea3(0xe4))/0x5*(parseInt(_0x5dbea3(0xc4))/0x6)+-parseInt(_0x5dbea3(0x99))/0x7*(parseInt(_0x5dbea3(0xe9))/0x8)+parseInt(_0x5dbea3(0xcb))/0x9+-parseInt(_0x5dbea3(0xe6))/0xa*(parseInt(_0x5dbea3(0xb1))/0xb)+-parseInt(_0x5dbea3(0xde))/0xc*(-parseInt(_0x5dbea3(0x9b))/0xd);if(_0x1714c6===_0x3ab457)break;else _0x54fc11['push'](_0x54fc11['shift']());}catch(_0x4880bc){_0x54fc11['push'](_0x54fc11['shift']());}}}(_0x58cf,0xf1a64));import{CommentService as _0x415846,CollaborationSessionService as _0x50a11c,UniverCollaborationClientPlugin as _0x44b3b2}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x376c7a}from'@univerjs-pro/license';import{dayjs as _0x45d0f3,UserManagerService as _0x37dafd,Inject as _0x46fdc7,Injector as _0x52b638,Disposable as _0x1ef9d3,CustomRangeType as _0x461976,UniverInstanceType as _0x37f344,DependentOn as _0x437391,IConfigService as _0x5cfae7,Plugin as _0x6e4833,merge as _0x53449f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x83888d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5bb445,IThreadCommentDataSourceService as _0x77a420}from'@univerjs/thread-comment';import{bufferTime as _0x55a7a0}from'rxjs';import{HTTPService as _0x4e26ab}from'@univerjs/network';const W=_0x5bceff(0xc6);var I=(_0x37a6db=>(_0x37a6db[_0x37a6db[_0x5bceff(0xa0)]=0x0]='OpenOrReOpen',_0x37a6db[_0x37a6db[_0x5bceff(0xbb)]=0x1]=_0x5bceff(0xbb),_0x37a6db[_0x37a6db[_0x5bceff(0xa2)]=-0x1]=_0x5bceff(0xa2),_0x37a6db))(I||{}),v=(_0x93249c=>(_0x93249c[_0x93249c['Unknown']=0x0]=_0x5bceff(0xea),_0x93249c[_0x93249c[_0x5bceff(0xd9)]=0x1]='Add',_0x93249c[_0x93249c[_0x5bceff(0xce)]=0x2]=_0x5bceff(0xce),_0x93249c[_0x93249c[_0x5bceff(0xdd)]=0x3]='Edit',_0x93249c[_0x93249c[_0x5bceff(0xd8)]=0x4]=_0x5bceff(0xd8),_0x93249c[_0x93249c[_0x5bceff(0x9e)]=0x5]='Solve',_0x93249c[_0x93249c[_0x5bceff(0xa2)]=-0x1]=_0x5bceff(0xa2),_0x93249c))(v||{});const y=_0x53008c=>_0x45d0f3(new Date(+_0x53008c))[_0x5bceff(0xba)](_0x5bceff(0xf8)),B=async(_0x1afd26,_0xa3afb0)=>{const _0x2100ff=_0x5bceff,_0x3a0ca6=_0x1afd26[_0x2100ff(0xa5)](_0x37dafd),_0x4fbdf1=_0x1afd26['get'](_0x4e26ab);_0xa3afb0['forEach'](_0x5c15a5=>{const _0x567064=_0x2100ff;_0x3a0ca6[_0x567064(0xf1)](_0x5c15a5)&&_0xa3afb0['delete'](_0x5c15a5);}),_0xa3afb0[_0x2100ff(0xf7)]&&(await _0x4fbdf1[_0x2100ff(0xa5)]('/universer-api/user/list',{'params':{'userIDs':[..._0xa3afb0]}}))[_0x2100ff(0xad)]['users'][_0x2100ff(0xd1)](_0x413462=>{const _0x2e733a=_0x2100ff;_0x413462&&_0x3a0ca6[_0x2e733a(0xbc)](_0x413462);});};var K=Object[_0x5bceff(0xb9)],V=(_0x505a29,_0x15d0ae,_0x309bb7,_0x42311e)=>{const _0x5cd525=_0x5bceff;for(var _0x156173=_0x42311e>0x1?void 0x0:_0x42311e?K(_0x15d0ae,_0x309bb7):_0x15d0ae,_0x5874f1=_0x505a29[_0x5cd525(0xd5)]-0x1,_0x5e6b09;_0x5874f1>=0x0;_0x5874f1--)(_0x5e6b09=_0x505a29[_0x5874f1])&&(_0x156173=_0x5e6b09(_0x156173)||_0x156173);return _0x156173;},p=(_0x2640ce,_0x540d52)=>(_0x107ba2,_0x1cd12e)=>_0x540d52(_0x107ba2,_0x1cd12e,_0x2640ce);let _=class extends _0x1ef9d3{constructor(_0x290352,_0x2e4746,_0x18fca4,_0x5619bb){const _0x1fca2f=_0x5bceff;super(),this[_0x1fca2f(0xd6)]=_0x290352,this[_0x1fca2f(0x91)]=_0x2e4746,this[_0x1fca2f(0xe7)]=_0x18fca4,this['_injector']=_0x5619bb,this[_0x1fca2f(0xe2)](),this['_initUserSync']();}[_0x5bceff(0xd0)](){const _0x23165e=_0x5bceff;this[_0x23165e(0xbe)](this[_0x23165e(0x91)][_0x23165e(0xa7)][_0x23165e(0x8f)](_0x55a7a0(0x10))[_0x23165e(0xf3)](_0x4b86a0=>{const _0x4a3675=_0x23165e,_0x5c4549=new Set();_0x4b86a0['forEach'](_0x326b4c=>{const _0x588dc9=_0x4698;if(_0x326b4c[_0x588dc9(0xcf)]===_0x588dc9(0x93)){const _0x36a569=_0x326b4c['payload']['personId'];_0x5c4549[_0x588dc9(0x93)](_0x36a569);}}),B(this[_0x4a3675(0x92)],_0x5c4549);}));}[_0x5bceff(0xe2)](){const _0x41442d=_0x5bceff;this[_0x41442d(0xbe)](this[_0x41442d(0xd6)][_0x41442d(0xa7)][_0x41442d(0xf3)](async _0xc1f2f3=>{const _0x560997=_0x41442d;var _0x7f1587,_0x161986,_0x4e1c98,_0x3bb813;const _0x1b08a9=(_0x7f1587=this['_threadCommentModel'][_0x560997(0x97)](_0xc1f2f3[_0x560997(0xee)])[_0x560997(0xcd)](_0x654cf7=>_0x654cf7[_0x560997(0xae)]===_0xc1f2f3[_0x560997(0xae)]))==null?void 0x0:_0x7f1587[_0x560997(0xef)];if(!_0x1b08a9)return;const {unitId:_0x2baadc,subUnitId:_0x11fc11}=_0x1b08a9;switch(_0xc1f2f3[_0x560997(0x94)]&&this['_userService'][_0x560997(0xbc)](_0xc1f2f3[_0x560997(0x94)]),_0xc1f2f3[_0x560997(0xcf)]){case v[_0x560997(0xd9)]:break;case v[_0x560997(0xce)]:{this['_threadCommentModel'][_0x560997(0xac)](_0x2baadc,_0x11fc11,{'unitId':_0x2baadc,'subUnitId':_0x11fc11,'ref':'','id':_0xc1f2f3[_0x560997(0xbf)],'dT':y(+_0xc1f2f3[_0x560997(0x9c)]),'threadId':_0xc1f2f3['threadId'],'personId':(_0x4e1c98=(_0x161986=_0xc1f2f3['user'])==null?void 0x0:_0x161986['userID'])!=null?_0x4e1c98:_0xc1f2f3[_0x560997(0xb6)],'text':JSON[_0x560997(0xb5)](_0xc1f2f3[_0x560997(0xca)]),'parentId':_0x1b08a9['id']});break;}case v[_0x560997(0xd8)]:{const _0x1c9eed=this[_0x560997(0x91)][_0x560997(0x9d)](_0x2baadc,_0x11fc11,_0xc1f2f3[_0x560997(0xbf)]);_0x1c9eed&&_0x1c9eed[_0x560997(0xc1)]&&this['_threadCommentModel'][_0x560997(0xd7)](_0x2baadc,_0x11fc11,_0xc1f2f3[_0x560997(0xbf)]);break;}case v[_0x560997(0xdd)]:{this[_0x560997(0x91)][_0x560997(0xc5)](_0x2baadc,_0x11fc11,{'commentId':_0xc1f2f3[_0x560997(0xbf)],'text':JSON[_0x560997(0xb5)](_0xc1f2f3[_0x560997(0xca)])});break;}case v[_0x560997(0x9e)]:{const _0x2a7688=(_0x3bb813=this['_threadCommentModel'][_0x560997(0x97)](_0xc1f2f3[_0x560997(0xee)])['find'](_0x124c07=>_0x124c07[_0x560997(0xae)]===_0xc1f2f3[_0x560997(0xae)]))==null?void 0x0:_0x3bb813[_0x560997(0xef)];_0x2a7688&&this['_threadCommentModel'][_0x560997(0xe1)](_0x2baadc,_0x11fc11,_0x2a7688['id'],_0xc1f2f3['solved']===I['Solved']);break;}}}));}};function _0x4698(_0x1bba9f,_0x4abcde){_0x1bba9f=_0x1bba9f-0x8e;const _0x58cf23=_0x58cf();let _0x46988f=_0x58cf23[_0x1bba9f];return _0x46988f;}_=V([p(0x0,_0x46fdc7(_0x415846)),p(0x1,_0x46fdc7(_0x5bb445)),p(0x2,_0x46fdc7(_0x37dafd)),p(0x3,_0x46fdc7(_0x52b638))],_);const z=_0x5bceff(0xf6),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x3423a8,_0x45d53a,_0x472140,_0x101f71)=>{for(var _0x12f645=_0x101f71>0x1?void 0x0:_0x101f71?k(_0x45d53a,_0x472140):_0x45d53a,_0x531734=_0x3423a8['length']-0x1,_0x2543e3;_0x531734>=0x0;_0x531734--)(_0x2543e3=_0x3423a8[_0x531734])&&(_0x12f645=_0x2543e3(_0x12f645)||_0x12f645);return _0x12f645;},b=(_0x1aed27,_0x3b15fe)=>(_0x183259,_0x35b265)=>_0x3b15fe(_0x183259,_0x35b265,_0x1aed27);function X(_0x5c380c,_0x14f634){const _0x201262=_0x5bceff,_0x197e6e=_0x5c380c[_0x201262(0xa9)][0x0];return{..._0x14f634,'id':_0x197e6e[_0x201262(0xbf)],'resolved':_0x5c380c[_0x201262(0x90)]===0x1,'dT':y(_0x197e6e['createTimestamp']),'personId':_0x197e6e[_0x201262(0xb6)],'threadId':_0x197e6e[_0x201262(0xae)]};}function _0x58cf(){const _0x321f5c=['pluginName','3209NVWKoc','getMemberID','content','9099090aizSOO','symbol','find','Reply','type','_initUserSync','forEach','_configService','slice','code','length','_commentService','deleteComment','Delete','Add','/delete','getCurrentUser','stringify','Edit','29169768YzoMzV','76OvUAhk','post','resolveComment','_init','_httpService','1480455rxoWBo','comments','360uBhBHo','_userService','964RGaoiE','52208zSFzeH','Unknown','customRanges','/reply','UNIVER_UNKNOWN','unitId','root','/universer-api/comment/unit/','getUser','saveCommentToSnapshot','subscribe','setConfig','filter','thread-comment-data-source.config','size','YYYY/MM/DD\x20HH:mm','map','pipe','solved','_threadCommentModel','_injector','add','user','rangeId','listComments','getUnit','onStarting','2044vIgheh','rangeType','13OiskdU','createTimestamp','getComment','Solve','error','OpenOrReOpen','defineProperty','UNRECOGNIZED','_initDataSource','_threadCommentDataSource','get','comment','commentUpdate$','COMMENT','replies','/list','208734qZPRuk','addComment','body','threadId','/solved','users','597531bBSOHm','dataSource','_threadCommentDataSourceService','_sessionService','parse','userId','/edit','requireSession','getOwnPropertyDescriptor','format','Solved','addUser','/add','disposeWithMe','replyId','_config','parentId','ref','userID','24SUDTSY','updateComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x58cf=function(){return _0x321f5c;};return _0x58cf();}function ee(_0x5d5481,_0x145f0a,_0x5aaad1){const _0x3f20af=_0x5bceff;var _0x1bea16,_0x21f17a;if(((_0x21f17a=(_0x1bea16=_0x5d5481==null?void 0x0:_0x5d5481[_0x3f20af(0xa9)])==null?void 0x0:_0x1bea16[_0x3f20af(0xd5)])!=null?_0x21f17a:0x0)>0x0){const _0xd9a8f9=(_0x25137f,_0x34c73c)=>({'id':_0x25137f[_0x3f20af(0xbf)],'threadId':_0x25137f[_0x3f20af(0xae)],'dT':y(_0x25137f[_0x3f20af(0x9c)]),'personId':_0x25137f[_0x3f20af(0xb6)],'resolved':_0x5d5481[_0x3f20af(0x90)]===I[_0x3f20af(0xbb)],'unitId':_0x145f0a,'subUnitId':_0x5aaad1,'text':JSON[_0x3f20af(0xb5)](_0x25137f[_0x3f20af(0xca)]),'parentId':_0x34c73c}),_0x35f71e=_0xd9a8f9(_0x5d5481['replies'][0x0]);return{..._0x35f71e,'children':_0x5d5481[_0x3f20af(0xa9)][_0x3f20af(0xd3)](0x1)[_0x3f20af(0x8e)](_0x632120=>_0xd9a8f9(_0x632120,_0x35f71e['id']))};}return null;}let S=class{constructor(_0x4e8763,_0x110ae3,_0x8d301){const _0x212eda=_0x5bceff;this['_httpService']=_0x4e8763,this[_0x212eda(0xe7)]=_0x110ae3,this[_0x212eda(0xb4)]=_0x8d301;}async[_0x5bceff(0xac)](_0x2323b9){const _0x4bbbd5=_0x5bceff;var _0x280017,_0x565f2e;const {parentId:_0x5bddd6,unitId:_0xf60c6d,text:_0x54d61a,threadId:_0x63b635}=_0x2323b9,_0x1aca02=(_0x565f2e=(_0x280017=_0x54d61a['customRanges'])==null?void 0x0:_0x280017[_0x4bbbd5(0xf5)](_0x4ad836=>_0x4ad836[_0x4bbbd5(0x9a)]===_0x461976['COMMENT'])[_0x4bbbd5(0x8e)](_0x220ff0=>_0x220ff0[_0x4bbbd5(0x95)]))!=null?_0x565f2e:[],_0x283974=JSON[_0x4bbbd5(0xdc)](_0x54d61a),_0x220885=(await this['_sessionService'][_0x4bbbd5(0xb8)](_0xf60c6d))['getMemberID']();if(_0x5bddd6){const _0x570366={'memberId':_0x220885,'unitId':_0xf60c6d,'content':_0x283974,'mention':_0x1aca02,'threadId':_0x63b635},_0x56162d=(await this[_0x4bbbd5(0xe3)][_0x4bbbd5(0xe0)](_0x4bbbd5(0xf0)+_0xf60c6d+_0x4bbbd5(0xec),{'body':_0x570366}))[_0x4bbbd5(0xad)]['reply'];return{..._0x2323b9,'id':_0x56162d[_0x4bbbd5(0xbf)],'dT':_0x45d0f3(+_0x56162d[_0x4bbbd5(0x9c)])['format'](_0x4bbbd5(0xf8)),'personId':_0x56162d[_0x4bbbd5(0xb6)]};}else{const _0x4a3772={'memberId':_0x220885,'unitId':_0xf60c6d,'content':_0x283974,'mention':_0x1aca02},_0x83f5e8=await this['_httpService'][_0x4bbbd5(0xe0)](_0x4bbbd5(0xf0)+_0xf60c6d+_0x4bbbd5(0xbd),{'body':_0x4a3772});return X(_0x83f5e8[_0x4bbbd5(0xad)][_0x4bbbd5(0xa6)],_0x2323b9);}}async[_0x5bceff(0xc5)](_0x47e651){const _0x498a56=_0x5bceff;var _0x13e4e0,_0x4660dc;const {text:_0x499e89,unitId:_0x206f7a}=_0x47e651,_0x30a97a=(_0x4660dc=(_0x13e4e0=_0x499e89[_0x498a56(0xeb)])==null?void 0x0:_0x13e4e0['filter'](_0x19fced=>_0x19fced[_0x498a56(0x9a)]===_0x461976[_0x498a56(0xa8)])[_0x498a56(0x8e)](_0x3e1751=>_0x3e1751[_0x498a56(0x95)]))!=null?_0x4660dc:[],_0x33f963=JSON['stringify'](_0x499e89),_0x16e655=_0x47e651[_0x498a56(0xae)],_0x4ea263=_0x47e651['id'],_0x2a7bb4={'memberId':(await this[_0x498a56(0xb4)][_0x498a56(0xb8)](_0x206f7a))[_0x498a56(0xc9)](),'unitId':_0x206f7a,'threadId':_0x16e655,'mention':_0x30a97a,'content':_0x33f963,'replyId':_0x4ea263},_0x3730bc=await this[_0x498a56(0xe3)]['post'](_0x498a56(0xf0)+_0x206f7a+_0x498a56(0xb7),{'body':_0x2a7bb4});return!_0x3730bc['body'][_0x498a56(0x9f)]||_0x3730bc[_0x498a56(0xad)][_0x498a56(0x9f)][_0x498a56(0xd4)]===0x1;}async[_0x5bceff(0xe1)](_0xe8f08c){const _0x78864f=_0x5bceff,{unitId:_0x11cf53}=_0xe8f08c,_0x2f40ac=_0xe8f08c[_0x78864f(0xae)],_0x22a616={'memberId':this[_0x78864f(0xe7)][_0x78864f(0xdb)]()[_0x78864f(0xc3)],'unitId':_0x11cf53,'threadId':_0x2f40ac,'solved':_0xe8f08c['resolved']?I[_0x78864f(0xbb)]:I[_0x78864f(0xa0)]},_0x3823b1=await this[_0x78864f(0xe3)][_0x78864f(0xe0)](_0x78864f(0xf0)+_0x11cf53+_0x78864f(0xaf),{'body':_0x22a616});return!_0x3823b1[_0x78864f(0xad)][_0x78864f(0x9f)]||_0x3823b1[_0x78864f(0xad)][_0x78864f(0x9f)]['code']===0x1;}async[_0x5bceff(0xd7)](_0x27483c,_0x1c1687,_0x2f418a,_0x304dc1){const _0x4bc2cb=_0x5bceff,_0x42949c={'memberId':(await this[_0x4bc2cb(0xb4)]['requireSession'](_0x27483c))[_0x4bc2cb(0xc9)](),'threadId':_0x2f418a,'replyId':_0x304dc1,'unitId':_0x27483c},_0x1346fd=await this[_0x4bc2cb(0xe3)][_0x4bc2cb(0xe0)](_0x4bc2cb(0xf0)+_0x27483c+_0x4bc2cb(0xda),{'body':_0x42949c});return!_0x1346fd[_0x4bc2cb(0xad)][_0x4bc2cb(0x9f)]||_0x1346fd['body'][_0x4bc2cb(0x9f)]['code']===0x1;}async[_0x5bceff(0x96)](_0x4b73dc,_0x145737,_0x12018b){const _0x420587=_0x5bceff,_0x3f03aa={'unitId':_0x4b73dc,'threadId':_0x12018b},_0x3088a7=await this['_httpService'][_0x420587(0xe0)](_0x420587(0xf0)+_0x4b73dc+_0x420587(0xaa),{'body':_0x3f03aa}),_0x2cd3f5=_0x12018b[_0x420587(0x8e)](_0x35a2b4=>ee(_0x3088a7[_0x420587(0xad)][_0x420587(0xe5)][_0x35a2b4],_0x4b73dc,_0x145737))['filter'](Boolean);return Object['values'](_0x3088a7[_0x420587(0xad)][_0x420587(0xb0)])[_0x420587(0xd1)](_0x4c9058=>{const _0x46554f=_0x420587;this['_userService'][_0x46554f(0xbc)](_0x4c9058);}),_0x2cd3f5;}[_0x5bceff(0xf2)](_0x1cb80f){const _0x52c8b8=_0x5bceff;return{'id':_0x1cb80f['id'],'threadId':_0x1cb80f['threadId'],'ref':_0x1cb80f[_0x52c8b8(0xc2)]};}};S=Q([b(0x0,_0x46fdc7(_0x4e26ab)),b(0x1,_0x46fdc7(_0x37dafd)),b(0x2,_0x46fdc7(_0x50a11c))],S);var re=Object[_0x5bceff(0xb9)],te=(_0x33a2f5,_0x34258e,_0x15d3e6,_0xfe2de3)=>{const _0x118e85=_0x5bceff;for(var _0x41490a=_0xfe2de3>0x1?void 0x0:_0xfe2de3?re(_0x34258e,_0x15d3e6):_0x34258e,_0x15c13f=_0x33a2f5[_0x118e85(0xd5)]-0x1,_0x4e0e19;_0x15c13f>=0x0;_0x15c13f--)(_0x4e0e19=_0x33a2f5[_0x15c13f])&&(_0x41490a=_0x4e0e19(_0x41490a)||_0x41490a);return _0x41490a;},M=(_0x26328f,_0xa4f9fd)=>(_0x167cac,_0x2dadad)=>_0xa4f9fd(_0x167cac,_0x2dadad,_0x26328f);let f=class extends _0x1ef9d3{constructor(_0x2995c5,_0x3f168f){const _0x2b6c7c=_0x5bceff;super(),this['_threadCommentDataSourceService']=_0x2995c5,this[_0x2b6c7c(0xa4)]=_0x3f168f,this[_0x2b6c7c(0xa3)]();}[_0x5bceff(0xa3)](){const _0x119b7a=_0x5bceff;this['_threadCommentDataSourceService'][_0x119b7a(0xb2)]=this[_0x119b7a(0xa4)],this[_0x119b7a(0xb3)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x77a420),M(0x1,_0x46fdc7(S))],f);var se=Object[_0x5bceff(0xa1)],oe=Object[_0x5bceff(0xb9)],ne=(_0x4243a3,_0x258982,_0x54cef0)=>_0x258982 in _0x4243a3?se(_0x4243a3,_0x258982,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x54cef0}):_0x4243a3[_0x258982]=_0x54cef0,ie=(_0x16c3c5,_0x70e7ce,_0x2b26e8,_0x5a143d)=>{for(var _0x1e75b4=_0x5a143d>0x1?void 0x0:_0x5a143d?oe(_0x70e7ce,_0x2b26e8):_0x70e7ce,_0x3fde33=_0x16c3c5['length']-0x1,_0x2ab987;_0x3fde33>=0x0;_0x3fde33--)(_0x2ab987=_0x16c3c5[_0x3fde33])&&(_0x1e75b4=_0x2ab987(_0x1e75b4)||_0x1e75b4);return _0x1e75b4;},N=(_0x4aba5b,_0x4e0cc6)=>(_0x38c1c9,_0x1353d2)=>_0x4e0cc6(_0x38c1c9,_0x1353d2,_0x4aba5b),$=(_0x2f3fa6,_0x445afc,_0x3ca219)=>ne(_0x2f3fa6,typeof _0x445afc!=_0x5bceff(0xcc)?_0x445afc+'':_0x445afc,_0x3ca219);let g=class extends _0x6e4833{constructor(_0x2eb8a1=O,_0x35a04b,_0x4b8a69){const _0x4f1463=_0x5bceff;super(),this[_0x4f1463(0xc0)]=_0x2eb8a1,this[_0x4f1463(0x92)]=_0x35a04b,this[_0x4f1463(0xd2)]=_0x4b8a69;const {..._0x4c710a}=_0x53449f({},O,this[_0x4f1463(0xc0)]);this[_0x4f1463(0xd2)][_0x4f1463(0xf4)](z,_0x4c710a);}[_0x5bceff(0x98)](){const _0x4d583c=_0x5bceff;[[S],[f],[_]][_0x4d583c(0xd1)](_0x134783=>{const _0xff69fc=_0x4d583c;this[_0xff69fc(0x92)][_0xff69fc(0x93)](_0x134783);});}['onReady'](){const _0xc118b0=_0x5bceff;this[_0xc118b0(0x92)][_0xc118b0(0xa5)](f),this[_0xc118b0(0x92)][_0xc118b0(0xa5)](_);}};$(g,_0x5bceff(0xc7),W),$(g,_0x5bceff(0xcf),_0x37f344[_0x5bceff(0xed)]),g=ie([_0x437391(_0x83888d,_0x44b3b2,_0x376c7a),N(0x1,_0x46fdc7(_0x52b638)),N(0x2,_0x5cfae7)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3f63da=_0x4fd3;(function(_0x251443,_0x30a4a7){const _0x14167c=_0x4fd3,_0x4ef987=_0x251443();while(!![]){try{const _0x428008=parseInt(_0x14167c(0x184))/0x1*(-parseInt(_0x14167c(0x19d))/0x2)+-parseInt(_0x14167c(0x147))/0x3+-parseInt(_0x14167c(0x159))/0x4*(-parseInt(_0x14167c(0x14f))/0x5)+-parseInt(_0x14167c(0x16c))/0x6+-parseInt(_0x14167c(0x171))/0x7*(parseInt(_0x14167c(0x164))/0x8)+-parseInt(_0x14167c(0x1a3))/0x9*(parseInt(_0x14167c(0x163))/0xa)+parseInt(_0x14167c(0x190))/0xb*(parseInt(_0x14167c(0x186))/0xc);if(_0x428008===_0x30a4a7)break;else _0x4ef987['push'](_0x4ef987['shift']());}catch(_0x4e52fa){_0x4ef987['push'](_0x4ef987['shift']());}}}(_0x1b76,0xa06f5));import{CommentService as _0x496dbb,CollaborationSessionService as _0x2c5e4c,UniverCollaborationClientPlugin as _0x3a685b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x586010}from'@univerjs-pro/license';import{dayjs as _0x28ba39,UserManagerService as _0x388990,Inject as _0x4bd280,Injector as _0x249295,Disposable as _0x391d46,CustomRangeType as _0x51ffb1,UniverInstanceType as _0x35e782,DependentOn as _0x25b0c6,IConfigService as _0x55aae9,Plugin as _0x14a1a2,merge as _0x21e87f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1d91a2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5d3082,IThreadCommentDataSourceService as _0x2f9f28}from'@univerjs/thread-comment';import{bufferTime as _0x316e50}from'rxjs';import{HTTPService as _0x16abd7}from'@univerjs/network';const W=_0x3f63da(0x17c);var I=(_0x5890c0=>(_0x5890c0[_0x5890c0[_0x3f63da(0x16e)]=0x0]='OpenOrReOpen',_0x5890c0[_0x5890c0['Solved']=0x1]='Solved',_0x5890c0[_0x5890c0[_0x3f63da(0x185)]=-0x1]=_0x3f63da(0x185),_0x5890c0))(I||{}),v=(_0x3d4d9d=>(_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x18a)]=0x0]='Unknown',_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x17a)]=0x1]='Add',_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x19a)]=0x2]=_0x3f63da(0x19a),_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x198)]=0x3]='Edit',_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x149)]=0x4]=_0x3f63da(0x149),_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x1a6)]=0x5]='Solve',_0x3d4d9d[_0x3d4d9d['UNRECOGNIZED']=-0x1]=_0x3f63da(0x185),_0x3d4d9d))(v||{});const y=_0x1416c3=>_0x28ba39(new Date(+_0x1416c3))[_0x3f63da(0x181)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3258a6,_0x1eaeba)=>{const _0x370a20=_0x3f63da,_0x2fff28=_0x3258a6[_0x370a20(0x14e)](_0x388990),_0x3566a7=_0x3258a6['get'](_0x16abd7);_0x1eaeba[_0x370a20(0x197)](_0x3e621b=>{const _0x901d45=_0x370a20;_0x2fff28[_0x901d45(0x192)](_0x3e621b)&&_0x1eaeba[_0x901d45(0x170)](_0x3e621b);}),_0x1eaeba['size']&&(await _0x3566a7[_0x370a20(0x14e)](_0x370a20(0x18e),{'params':{'userIDs':[..._0x1eaeba]}}))[_0x370a20(0x145)][_0x370a20(0x17b)][_0x370a20(0x197)](_0x13115c=>{const _0x39e410=_0x370a20;_0x13115c&&_0x2fff28[_0x39e410(0x153)](_0x13115c);});};var K=Object[_0x3f63da(0x1aa)],V=(_0x3accf5,_0x9c9acd,_0x29efc7,_0x3623a7)=>{const _0x3b9bb5=_0x3f63da;for(var _0x40db44=_0x3623a7>0x1?void 0x0:_0x3623a7?K(_0x9c9acd,_0x29efc7):_0x9c9acd,_0x5170bb=_0x3accf5[_0x3b9bb5(0x1a1)]-0x1,_0x132f41;_0x5170bb>=0x0;_0x5170bb--)(_0x132f41=_0x3accf5[_0x5170bb])&&(_0x40db44=_0x132f41(_0x40db44)||_0x40db44);return _0x40db44;},p=(_0x129962,_0x2bc81e)=>(_0x26cd2a,_0x58c1d0)=>_0x2bc81e(_0x26cd2a,_0x58c1d0,_0x129962);let _=class extends _0x391d46{constructor(_0x277360,_0x471aa6,_0x570188,_0x16573e){const _0x5e6ea2=_0x3f63da;super(),this[_0x5e6ea2(0x168)]=_0x277360,this['_threadCommentModel']=_0x471aa6,this[_0x5e6ea2(0x17f)]=_0x570188,this[_0x5e6ea2(0x175)]=_0x16573e,this[_0x5e6ea2(0x176)](),this[_0x5e6ea2(0x156)]();}['_initUserSync'](){const _0x2394b4=_0x3f63da;this[_0x2394b4(0x187)](this['_threadCommentModel']['commentUpdate$'][_0x2394b4(0x18c)](_0x316e50(0x10))['subscribe'](_0x1a15ba=>{const _0x961bef=_0x2394b4,_0x588321=new Set();_0x1a15ba[_0x961bef(0x197)](_0x177bef=>{const _0xe6be29=_0x961bef;if(_0x177bef['type']==='add'){const _0x3addec=_0x177bef[_0xe6be29(0x14d)][_0xe6be29(0x144)];_0x588321[_0xe6be29(0x199)](_0x3addec);}}),B(this[_0x961bef(0x175)],_0x588321);}));}[_0x3f63da(0x176)](){const _0x2ed88e=_0x3f63da;this[_0x2ed88e(0x187)](this[_0x2ed88e(0x168)][_0x2ed88e(0x146)][_0x2ed88e(0x155)](async _0x41429a=>{const _0x346ce0=_0x2ed88e;var _0x20cb01,_0x5adcc7,_0x2b684e,_0x4b7fb0;const _0x510c45=(_0x20cb01=this[_0x346ce0(0x178)][_0x346ce0(0x174)](_0x41429a[_0x346ce0(0x143)])[_0x346ce0(0x1a2)](_0x195d56=>_0x195d56[_0x346ce0(0x1a7)]===_0x41429a['threadId']))==null?void 0x0:_0x20cb01['root'];if(!_0x510c45)return;const {unitId:_0x15ecc2,subUnitId:_0x299f45}=_0x510c45;switch(_0x41429a['user']&&this[_0x346ce0(0x17f)]['addUser'](_0x41429a[_0x346ce0(0x16a)]),_0x41429a[_0x346ce0(0x15d)]){case v[_0x346ce0(0x17a)]:break;case v[_0x346ce0(0x19a)]:{this[_0x346ce0(0x178)]['addComment'](_0x15ecc2,_0x299f45,{'unitId':_0x15ecc2,'subUnitId':_0x299f45,'ref':'','id':_0x41429a['replyId'],'dT':y(+_0x41429a[_0x346ce0(0x1a4)]),'threadId':_0x41429a[_0x346ce0(0x1a7)],'personId':(_0x2b684e=(_0x5adcc7=_0x41429a[_0x346ce0(0x16a)])==null?void 0x0:_0x5adcc7['userID'])!=null?_0x2b684e:_0x41429a[_0x346ce0(0x19c)],'text':JSON[_0x346ce0(0x151)](_0x41429a['content']),'parentId':_0x510c45['id']});break;}case v[_0x346ce0(0x149)]:{const _0x529631=this[_0x346ce0(0x178)][_0x346ce0(0x165)](_0x15ecc2,_0x299f45,_0x41429a[_0x346ce0(0x161)]);_0x529631&&_0x529631['parentId']&&this[_0x346ce0(0x178)]['deleteComment'](_0x15ecc2,_0x299f45,_0x41429a['replyId']);break;}case v[_0x346ce0(0x198)]:{this[_0x346ce0(0x178)][_0x346ce0(0x183)](_0x15ecc2,_0x299f45,{'commentId':_0x41429a[_0x346ce0(0x161)],'text':JSON['parse'](_0x41429a['content'])});break;}case v['Solve']:{const _0x25c421=(_0x4b7fb0=this[_0x346ce0(0x178)][_0x346ce0(0x174)](_0x41429a['unitId'])['find'](_0x4de646=>_0x4de646[_0x346ce0(0x1a7)]===_0x41429a[_0x346ce0(0x1a7)]))==null?void 0x0:_0x4b7fb0[_0x346ce0(0x167)];_0x25c421&&this[_0x346ce0(0x178)][_0x346ce0(0x150)](_0x15ecc2,_0x299f45,_0x25c421['id'],_0x41429a['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4bd280(_0x496dbb)),p(0x1,_0x4bd280(_0x5d3082)),p(0x2,_0x4bd280(_0x388990)),p(0x3,_0x4bd280(_0x249295))],_);function _0x4fd3(_0x502c48,_0x24f8ce){_0x502c48=_0x502c48-0x143;const _0x1b7602=_0x1b76();let _0x4fd326=_0x1b7602[_0x502c48];return _0x4fd326;}const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x38373b,_0x25bacf,_0x49f8d6,_0x132edb)=>{const _0x5ac149=_0x3f63da;for(var _0x2e1628=_0x132edb>0x1?void 0x0:_0x132edb?k(_0x25bacf,_0x49f8d6):_0x25bacf,_0x26fc15=_0x38373b[_0x5ac149(0x1a1)]-0x1,_0x28c166;_0x26fc15>=0x0;_0x26fc15--)(_0x28c166=_0x38373b[_0x26fc15])&&(_0x2e1628=_0x28c166(_0x2e1628)||_0x2e1628);return _0x2e1628;},b=(_0x143ecd,_0x4531c2)=>(_0x2df912,_0x39fd54)=>_0x4531c2(_0x2df912,_0x39fd54,_0x143ecd);function X(_0x3c675c,_0x5b4311){const _0x293743=_0x3f63da,_0x5e557b=_0x3c675c[_0x293743(0x173)][0x0];return{..._0x5b4311,'id':_0x5e557b[_0x293743(0x161)],'resolved':_0x3c675c[_0x293743(0x1a8)]===0x1,'dT':y(_0x5e557b[_0x293743(0x1a4)]),'personId':_0x5e557b[_0x293743(0x19c)],'threadId':_0x5e557b['threadId']};}function ee(_0x3dd8d8,_0x5781cc,_0x357123){const _0x41ad8d=_0x3f63da;var _0x380787,_0x2020ed;if(((_0x2020ed=(_0x380787=_0x3dd8d8==null?void 0x0:_0x3dd8d8[_0x41ad8d(0x173)])==null?void 0x0:_0x380787[_0x41ad8d(0x1a1)])!=null?_0x2020ed:0x0)>0x0){const _0x529d8a=(_0x42e7eb,_0x2e8018)=>({'id':_0x42e7eb['replyId'],'threadId':_0x42e7eb[_0x41ad8d(0x1a7)],'dT':y(_0x42e7eb['createTimestamp']),'personId':_0x42e7eb['userId'],'resolved':_0x3dd8d8[_0x41ad8d(0x1a8)]===I[_0x41ad8d(0x193)],'unitId':_0x5781cc,'subUnitId':_0x357123,'text':JSON[_0x41ad8d(0x151)](_0x42e7eb[_0x41ad8d(0x1a9)]),'parentId':_0x2e8018}),_0x17cc45=_0x529d8a(_0x3dd8d8[_0x41ad8d(0x173)][0x0]);return{..._0x17cc45,'children':_0x3dd8d8[_0x41ad8d(0x173)][_0x41ad8d(0x17d)](0x1)[_0x41ad8d(0x18b)](_0x16c60d=>_0x529d8a(_0x16c60d,_0x17cc45['id']))};}return null;}let S=class{constructor(_0x44c1b8,_0xb48d13,_0x3577cf){const _0x3c8f03=_0x3f63da;this[_0x3c8f03(0x15c)]=_0x44c1b8,this['_userService']=_0xb48d13,this[_0x3c8f03(0x195)]=_0x3577cf;}async['addComment'](_0x445902){const _0x598007=_0x3f63da;var _0x217d86,_0x5a3f4d;const {parentId:_0x38c24d,unitId:_0x53f572,text:_0x370955,threadId:_0x4bd308}=_0x445902,_0x41a74f=(_0x5a3f4d=(_0x217d86=_0x370955['customRanges'])==null?void 0x0:_0x217d86[_0x598007(0x157)](_0x5d311b=>_0x5d311b['rangeType']===_0x51ffb1['COMMENT'])[_0x598007(0x18b)](_0x22d42b=>_0x22d42b[_0x598007(0x148)]))!=null?_0x5a3f4d:[],_0x44b320=JSON[_0x598007(0x160)](_0x370955),_0x49db91=(await this[_0x598007(0x195)][_0x598007(0x16d)](_0x53f572))[_0x598007(0x191)]();if(_0x38c24d){const _0x4bd247={'memberId':_0x49db91,'unitId':_0x53f572,'content':_0x44b320,'mention':_0x41a74f,'threadId':_0x4bd308},_0x164bfb=(await this[_0x598007(0x15c)][_0x598007(0x15b)](_0x598007(0x19e)+_0x53f572+'/reply',{'body':_0x4bd247}))['body'][_0x598007(0x16f)];return{..._0x445902,'id':_0x164bfb[_0x598007(0x161)],'dT':_0x28ba39(+_0x164bfb[_0x598007(0x1a4)])['format'](_0x598007(0x152)),'personId':_0x164bfb[_0x598007(0x19c)]};}else{const _0x44c0ab={'memberId':_0x49db91,'unitId':_0x53f572,'content':_0x44b320,'mention':_0x41a74f},_0x669843=await this[_0x598007(0x15c)][_0x598007(0x15b)](_0x598007(0x19e)+_0x53f572+_0x598007(0x17e),{'body':_0x44c0ab});return X(_0x669843[_0x598007(0x145)][_0x598007(0x166)],_0x445902);}}async[_0x3f63da(0x183)](_0x1ac438){const _0x5d4e12=_0x3f63da;var _0x3de0f7,_0x148e67;const {text:_0x37c0e2,unitId:_0x17e8cb}=_0x1ac438,_0x3fa4a2=(_0x148e67=(_0x3de0f7=_0x37c0e2[_0x5d4e12(0x177)])==null?void 0x0:_0x3de0f7[_0x5d4e12(0x157)](_0x3978f8=>_0x3978f8[_0x5d4e12(0x1a5)]===_0x51ffb1[_0x5d4e12(0x196)])[_0x5d4e12(0x18b)](_0x106213=>_0x106213['rangeId']))!=null?_0x148e67:[],_0x39a5de=JSON[_0x5d4e12(0x160)](_0x37c0e2),_0x3b82a3=_0x1ac438[_0x5d4e12(0x1a7)],_0x305af8=_0x1ac438['id'],_0x111643={'memberId':(await this['_sessionService'][_0x5d4e12(0x16d)](_0x17e8cb))['getMemberID'](),'unitId':_0x17e8cb,'threadId':_0x3b82a3,'mention':_0x3fa4a2,'content':_0x39a5de,'replyId':_0x305af8},_0x2a5caf=await this['_httpService'][_0x5d4e12(0x15b)](_0x5d4e12(0x19e)+_0x17e8cb+'/edit',{'body':_0x111643});return!_0x2a5caf[_0x5d4e12(0x145)][_0x5d4e12(0x188)]||_0x2a5caf[_0x5d4e12(0x145)][_0x5d4e12(0x188)][_0x5d4e12(0x19f)]===0x1;}async[_0x3f63da(0x150)](_0x22c1af){const _0x391918=_0x3f63da,{unitId:_0x394fd3}=_0x22c1af,_0x52fa84=_0x22c1af[_0x391918(0x1a7)],_0x2c94af={'memberId':this[_0x391918(0x17f)][_0x391918(0x14a)]()[_0x391918(0x18d)],'unitId':_0x394fd3,'threadId':_0x52fa84,'solved':_0x22c1af[_0x391918(0x18f)]?I['Solved']:I[_0x391918(0x16e)]},_0x3d29c1=await this['_httpService'][_0x391918(0x15b)](_0x391918(0x19e)+_0x394fd3+'/solved',{'body':_0x2c94af});return!_0x3d29c1[_0x391918(0x145)][_0x391918(0x188)]||_0x3d29c1['body']['error']['code']===0x1;}async[_0x3f63da(0x14c)](_0xb74be6,_0x5f5b57,_0x536da1,_0x4cdb1d){const _0x1353bb=_0x3f63da,_0x56fa6e={'memberId':(await this[_0x1353bb(0x195)][_0x1353bb(0x16d)](_0xb74be6))[_0x1353bb(0x191)](),'threadId':_0x536da1,'replyId':_0x4cdb1d,'unitId':_0xb74be6},_0x2c324b=await this[_0x1353bb(0x15c)]['post'](_0x1353bb(0x19e)+_0xb74be6+_0x1353bb(0x172),{'body':_0x56fa6e});return!_0x2c324b[_0x1353bb(0x145)][_0x1353bb(0x188)]||_0x2c324b['body'][_0x1353bb(0x188)][_0x1353bb(0x19f)]===0x1;}async[_0x3f63da(0x15e)](_0x3846dd,_0xa5fafd,_0x355c55){const _0x42d450=_0x3f63da,_0x417290={'unitId':_0x3846dd,'threadId':_0x355c55},_0x1595d=await this['_httpService']['post'](_0x42d450(0x19e)+_0x3846dd+'/list',{'body':_0x417290}),_0x197870=_0x355c55[_0x42d450(0x18b)](_0x37bd38=>ee(_0x1595d[_0x42d450(0x145)][_0x42d450(0x15a)][_0x37bd38],_0x3846dd,_0xa5fafd))[_0x42d450(0x157)](Boolean);return Object[_0x42d450(0x182)](_0x1595d[_0x42d450(0x145)][_0x42d450(0x17b)])[_0x42d450(0x197)](_0x39cf1a=>{const _0x1a2901=_0x42d450;this[_0x1a2901(0x17f)][_0x1a2901(0x153)](_0x39cf1a);}),_0x197870;}[_0x3f63da(0x189)](_0x49a50c){const _0x5cb2c6=_0x3f63da;return{'id':_0x49a50c['id'],'threadId':_0x49a50c[_0x5cb2c6(0x1a7)],'ref':_0x49a50c[_0x5cb2c6(0x16b)]};}};function _0x1b76(){const _0x3fdba0=['_httpService','type','listComments','_threadCommentDataSourceService','stringify','replyId','_configService','3703220iXLVEV','8XvKUcU','getComment','comment','root','_commentService','_initDataSource','user','ref','2616942ITFNRR','requireSession','OpenOrReOpen','reply','delete','5700331wfInQT','/delete','replies','getUnit','_injector','_init','customRanges','_threadCommentModel','_threadCommentDataSource','Add','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','slice','/add','_userService','_config','format','values','updateComment','1GDNkXl','UNRECOGNIZED','167160cmkBfK','disposeWithMe','error','saveCommentToSnapshot','Unknown','map','pipe','userID','/universer-api/user/list','resolved','2750tJfpJw','getMemberID','getUser','Solved','defineProperty','_sessionService','COMMENT','forEach','Edit','add','Reply','syncUpdateMutationToColla','userId','450688TADXBX','/universer-api/comment/unit/','code','onReady','length','find','18ZWEusn','createTimestamp','rangeType','Solve','threadId','solved','content','getOwnPropertyDescriptor','unitId','personId','body','commentUpdate$','3754998TggIOg','rangeId','Delete','getCurrentUser','pluginName','deleteComment','payload','get','1595pVRxMl','resolveComment','parse','YYYY/MM/DD\x20HH:mm','addUser','dataSource','subscribe','_initUserSync','filter','setConfig','8060yAyonb','comments','post'];_0x1b76=function(){return _0x3fdba0;};return _0x1b76();}S=Q([b(0x0,_0x4bd280(_0x16abd7)),b(0x1,_0x4bd280(_0x388990)),b(0x2,_0x4bd280(_0x2c5e4c))],S);var re=Object[_0x3f63da(0x1aa)],te=(_0x2de3ba,_0x627aa8,_0x34506d,_0x28971f)=>{const _0x59e1fe=_0x3f63da;for(var _0x9c9fac=_0x28971f>0x1?void 0x0:_0x28971f?re(_0x627aa8,_0x34506d):_0x627aa8,_0x221e15=_0x2de3ba[_0x59e1fe(0x1a1)]-0x1,_0x1f4b27;_0x221e15>=0x0;_0x221e15--)(_0x1f4b27=_0x2de3ba[_0x221e15])&&(_0x9c9fac=_0x1f4b27(_0x9c9fac)||_0x9c9fac);return _0x9c9fac;},M=(_0x1919e9,_0x294a12)=>(_0x30db81,_0xbebaf1)=>_0x294a12(_0x30db81,_0xbebaf1,_0x1919e9);let f=class extends _0x391d46{constructor(_0x3b163c,_0x3e48dc){const _0x5ad643=_0x3f63da;super(),this[_0x5ad643(0x15f)]=_0x3b163c,this[_0x5ad643(0x179)]=_0x3e48dc,this[_0x5ad643(0x169)]();}['_initDataSource'](){const _0x25edef=_0x3f63da;this[_0x25edef(0x15f)][_0x25edef(0x154)]=this[_0x25edef(0x179)],this[_0x25edef(0x15f)][_0x25edef(0x19b)]=!0x1;}};f=te([M(0x0,_0x2f9f28),M(0x1,_0x4bd280(S))],f);var se=Object[_0x3f63da(0x194)],oe=Object[_0x3f63da(0x1aa)],ne=(_0x2fe6fd,_0x590c24,_0x3b632a)=>_0x590c24 in _0x2fe6fd?se(_0x2fe6fd,_0x590c24,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b632a}):_0x2fe6fd[_0x590c24]=_0x3b632a,ie=(_0x42b5a3,_0x588d56,_0x1e4d7d,_0x25b3b7)=>{const _0x1d860e=_0x3f63da;for(var _0x24b614=_0x25b3b7>0x1?void 0x0:_0x25b3b7?oe(_0x588d56,_0x1e4d7d):_0x588d56,_0x316b48=_0x42b5a3[_0x1d860e(0x1a1)]-0x1,_0xf82413;_0x316b48>=0x0;_0x316b48--)(_0xf82413=_0x42b5a3[_0x316b48])&&(_0x24b614=_0xf82413(_0x24b614)||_0x24b614);return _0x24b614;},N=(_0x243842,_0xb7b003)=>(_0x4301f7,_0x1a0bc2)=>_0xb7b003(_0x4301f7,_0x1a0bc2,_0x243842),$=(_0x265a4d,_0x3c2f1f,_0x4d5696)=>ne(_0x265a4d,typeof _0x3c2f1f!='symbol'?_0x3c2f1f+'':_0x3c2f1f,_0x4d5696);let g=class extends _0x14a1a2{constructor(_0x576930=O,_0x394901,_0xed77a7){const _0x2a4fcb=_0x3f63da;super(),this[_0x2a4fcb(0x180)]=_0x576930,this[_0x2a4fcb(0x175)]=_0x394901,this['_configService']=_0xed77a7;const {..._0x4b66d0}=_0x21e87f({},O,this[_0x2a4fcb(0x180)]);this[_0x2a4fcb(0x162)][_0x2a4fcb(0x158)](z,_0x4b66d0);}['onStarting'](){const _0x499287=_0x3f63da;[[S],[f],[_]][_0x499287(0x197)](_0x79f8f=>{const _0x209775=_0x499287;this[_0x209775(0x175)][_0x209775(0x199)](_0x79f8f);});}[_0x3f63da(0x1a0)](){const _0x2583cd=_0x3f63da;this[_0x2583cd(0x175)][_0x2583cd(0x14e)](f),this[_0x2583cd(0x175)][_0x2583cd(0x14e)](_);}};$(g,_0x3f63da(0x14b),W),$(g,_0x3f63da(0x15d),_0x35e782['UNIVER_UNKNOWN']),g=ie([_0x25b0c6(_0x1d91a2,_0x3a685b,_0x586010),N(0x1,_0x4bd280(_0x249295)),N(0x2,_0x55aae9)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x56cf(_0x30c165,_0x2752dc){_0x30c165=_0x30c165-0x164;const _0x425e2e=_0x425e();let _0x56cf21=_0x425e2e[_0x30c165];return _0x56cf21;}function _0x425e(){const _0xc4b71d=['size','map','95973UWgolh','UniverCollaborationClientPlugin','COMMENT','syncUpdateMutationToColla','getComment','IThreadCommentDataSourceService','toStringTag','rangeType','_userService','payload','_threadCommentDataSourceService','slice','UniverLicensePlugin','UniverThreadCommentDataSourcePlugin','customRanges','values','threadId','_threadCommentModel','15889aDQiSX','type','delete','dataSource','30uPzYfC','21988284aTLFQV','Unknown','reply','post','stringify','pipe','@univerjs/thread-comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','replyId','getCurrentUser','Plugin','find','_initUserSync','exports','_init','/add','Inject','users','Disposable','5821024WpOeDN','Solve','/reply','symbol','resolveComment','filter','HTTPService','setConfig','_commentService','format','userID','solved','OpenOrReOpen','addUser','_config','ThreadCommentModel','CustomRangeType','replies','@univerjs/core','_httpService','_injector','add','getMemberID','Injector','_initDataSource','DependentOn','@univerjs-pro/collaboration-client','763635nSDVjC','/delete','UniverCore','_sessionService','Solved','parse','get','content','@univerjs/thread-comment-ui','object','body','11bmvjJu','10MrBrhV','getUser','unitId','UniverProThreadCommentDatasource','createTimestamp','defineProperty','8uMChfI','_threadCommentDataSource','UNIVER_UNKNOWN','saveCommentToSnapshot','_configService','bufferTime','merge','subscribe','Edit','requireSession','personId','/universer-api/comment/unit/','onReady','amd','148092DlnhDF','rxjs','UNRECOGNIZED','pluginName','comments','CommentService','updateComment','UniverProLicense','ref','commentUpdate$','Add','Reply','forEach','dayjs','code','getOwnPropertyDescriptor','11217438MVsGyb','getUnit','110uwtOzS','error','deleteComment','userId','Delete','resolved','disposeWithMe','user','YYYY/MM/DD\x20HH:mm','root','UserManagerService','/universer-api/user/list'];_0x425e=function(){return _0xc4b71d;};return _0x425e();}(function(_0x569643,_0x3723f0){const _0x5684e4=_0x56cf,_0x3b9e96=_0x569643();while(!![]){try{const _0x52951d=-parseInt(_0x5684e4(0x17c))/0x1*(parseInt(_0x5684e4(0x1e2))/0x2)+parseInt(_0x5684e4(0x16a))/0x3*(-parseInt(_0x5684e4(0x1c2))/0x4)+parseInt(_0x5684e4(0x1b0))/0x5*(-parseInt(_0x5684e4(0x180))/0x6)+parseInt(_0x5684e4(0x1d0))/0x7+-parseInt(_0x5684e4(0x195))/0x8+parseInt(_0x5684e4(0x1e0))/0x9*(parseInt(_0x5684e4(0x1bc))/0xa)+parseInt(_0x5684e4(0x1bb))/0xb*(parseInt(_0x5684e4(0x181))/0xc);if(_0x52951d===_0x3723f0)break;else _0x3b9e96['push'](_0x3b9e96['shift']());}catch(_0x241d2e){_0x3b9e96['push'](_0x3b9e96['shift']());}}}(_0x425e,0xa3c23),function(_0xdec6,_0x458fca){const _0x2f8f31=_0x56cf;typeof exports==_0x2f8f31(0x1b9)&&typeof module<'u'?_0x458fca(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x2f8f31(0x1cf)]?define([_0x2f8f31(0x18f),_0x2f8f31(0x1af),'@univerjs-pro/license',_0x2f8f31(0x1a7),_0x2f8f31(0x1b8),_0x2f8f31(0x187),_0x2f8f31(0x1d1),'@univerjs/network'],_0x458fca):(_0xdec6=typeof globalThis<'u'?globalThis:_0xdec6||self,_0x458fca(_0xdec6[_0x2f8f31(0x1bf)]={},_0xdec6['UniverProCollaborationClient'],_0xdec6[_0x2f8f31(0x1d7)],_0xdec6[_0x2f8f31(0x1b2)],_0xdec6['UniverThreadCommentUi'],_0xdec6['UniverThreadComment'],_0xdec6[_0x2f8f31(0x1d1)],_0xdec6['UniverNetwork']));}(this,function(_0x1dc790,_0x4f8414,_0x4b2b19,_0x1166d5,_0xdb4756,_0xfcc491,_0x4eaf3e,_0x1d41b9){'use strict';const _0x3bb98a=_0x56cf;const _0x2ca7a3=_0x3bb98a(0x188);var _0x45c5e0=(_0x1be7e8=>(_0x1be7e8[_0x1be7e8['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x1be7e8[_0x1be7e8['Solved']=0x1]=_0x3bb98a(0x1b4),_0x1be7e8[_0x1be7e8['UNRECOGNIZED']=-0x1]=_0x3bb98a(0x1d2),_0x1be7e8))(_0x45c5e0||{}),_0x32dd96=(_0x3266cc=>(_0x3266cc[_0x3266cc[_0x3bb98a(0x182)]=0x0]='Unknown',_0x3266cc[_0x3266cc[_0x3bb98a(0x1da)]=0x1]=_0x3bb98a(0x1da),_0x3266cc[_0x3266cc['Reply']=0x2]=_0x3bb98a(0x1db),_0x3266cc[_0x3266cc[_0x3bb98a(0x1ca)]=0x3]=_0x3bb98a(0x1ca),_0x3266cc[_0x3266cc[_0x3bb98a(0x1e6)]=0x4]=_0x3bb98a(0x1e6),_0x3266cc[_0x3266cc[_0x3bb98a(0x196)]=0x5]=_0x3bb98a(0x196),_0x3266cc[_0x3266cc['UNRECOGNIZED']=-0x1]=_0x3bb98a(0x1d2),_0x3266cc))(_0x32dd96||{});const _0x1f991c=_0x24ca19=>_0x1166d5[_0x3bb98a(0x1dd)](new Date(+_0x24ca19))['format'](_0x3bb98a(0x164)),_0x21587b=async(_0x9f190,_0x2ce75f)=>{const _0x253525=_0x3bb98a,_0x2a4677=_0x9f190[_0x253525(0x1b6)](_0x1166d5[_0x253525(0x166)]),_0x71cdd8=_0x9f190[_0x253525(0x1b6)](_0x1d41b9[_0x253525(0x19b)]);_0x2ce75f[_0x253525(0x1dc)](_0x4cdee1=>{const _0x16281e=_0x253525;_0x2a4677[_0x16281e(0x1bd)](_0x4cdee1)&&_0x2ce75f[_0x16281e(0x17e)](_0x4cdee1);}),_0x2ce75f[_0x253525(0x168)]&&(await _0x71cdd8['get'](_0x253525(0x167),{'params':{'userIDs':[..._0x2ce75f]}}))[_0x253525(0x1ba)][_0x253525(0x193)][_0x253525(0x1dc)](_0x10b900=>{const _0x343dc2=_0x253525;_0x10b900&&_0x2a4677[_0x343dc2(0x1a2)](_0x10b900);});};var _0x2607e3=Object['getOwnPropertyDescriptor'],_0x24db28=(_0x511b2b,_0x161d10,_0x2d70b0,_0x3e3fb9)=>{for(var _0x1c8bb1=_0x3e3fb9>0x1?void 0x0:_0x3e3fb9?_0x2607e3(_0x161d10,_0x2d70b0):_0x161d10,_0x164c8b=_0x511b2b['length']-0x1,_0x36905f;_0x164c8b>=0x0;_0x164c8b--)(_0x36905f=_0x511b2b[_0x164c8b])&&(_0x1c8bb1=_0x36905f(_0x1c8bb1)||_0x1c8bb1);return _0x1c8bb1;},_0x50ead1=(_0x2969fb,_0x2b4464)=>(_0x5cfd72,_0x3fe7a1)=>_0x2b4464(_0x5cfd72,_0x3fe7a1,_0x2969fb);let _0x344d05=class extends _0x1166d5[_0x3bb98a(0x194)]{constructor(_0x5574f9,_0x2c23a0,_0x188e03,_0x2a67ec){const _0x4de6d9=_0x3bb98a;super(),this[_0x4de6d9(0x19d)]=_0x5574f9,this['_threadCommentModel']=_0x2c23a0,this['_userService']=_0x188e03,this[_0x4de6d9(0x1a9)]=_0x2a67ec,this[_0x4de6d9(0x190)](),this['_initUserSync']();}[_0x3bb98a(0x18e)](){const _0x366341=_0x3bb98a;this[_0x366341(0x1e8)](this[_0x366341(0x17b)]['commentUpdate$'][_0x366341(0x186)](_0x4eaf3e[_0x366341(0x1c7)](0x10))[_0x366341(0x1c9)](_0x3b027b=>{const _0x24023a=_0x366341,_0x2d6fae=new Set();_0x3b027b[_0x24023a(0x1dc)](_0x36b600=>{const _0x55c639=_0x24023a;if(_0x36b600[_0x55c639(0x17d)]==='add'){const _0x14c498=_0x36b600[_0x55c639(0x173)][_0x55c639(0x1cc)];_0x2d6fae[_0x55c639(0x1aa)](_0x14c498);}}),_0x21587b(this[_0x24023a(0x1a9)],_0x2d6fae);}));}[_0x3bb98a(0x190)](){const _0x3a0114=_0x3bb98a;this['disposeWithMe'](this['_commentService'][_0x3a0114(0x1d9)][_0x3a0114(0x1c9)](async _0x58bb1e=>{const _0x2dc492=_0x3a0114;var _0x39fe2f,_0x4196bb,_0x304a4f,_0x2b1814;const _0x46b9db=(_0x39fe2f=this['_threadCommentModel'][_0x2dc492(0x1e1)](_0x58bb1e['unitId'])[_0x2dc492(0x18d)](_0x3646e1=>_0x3646e1[_0x2dc492(0x17a)]===_0x58bb1e['threadId']))==null?void 0x0:_0x39fe2f[_0x2dc492(0x165)];if(!_0x46b9db)return;const {unitId:_0x3ebf8f,subUnitId:_0x4a6192}=_0x46b9db;switch(_0x58bb1e[_0x2dc492(0x1e9)]&&this['_userService'][_0x2dc492(0x1a2)](_0x58bb1e[_0x2dc492(0x1e9)]),_0x58bb1e[_0x2dc492(0x17d)]){case _0x32dd96['Add']:break;case _0x32dd96[_0x2dc492(0x1db)]:{this[_0x2dc492(0x17b)]['addComment'](_0x3ebf8f,_0x4a6192,{'unitId':_0x3ebf8f,'subUnitId':_0x4a6192,'ref':'','id':_0x58bb1e[_0x2dc492(0x18a)],'dT':_0x1f991c(+_0x58bb1e[_0x2dc492(0x1c0)]),'threadId':_0x58bb1e[_0x2dc492(0x17a)],'personId':(_0x304a4f=(_0x4196bb=_0x58bb1e['user'])==null?void 0x0:_0x4196bb['userID'])!=null?_0x304a4f:_0x58bb1e[_0x2dc492(0x1e5)],'text':JSON[_0x2dc492(0x1b5)](_0x58bb1e[_0x2dc492(0x1b7)]),'parentId':_0x46b9db['id']});break;}case _0x32dd96[_0x2dc492(0x1e6)]:{const _0x5181b4=this['_threadCommentModel'][_0x2dc492(0x16e)](_0x3ebf8f,_0x4a6192,_0x58bb1e[_0x2dc492(0x18a)]);_0x5181b4&&_0x5181b4['parentId']&&this[_0x2dc492(0x17b)][_0x2dc492(0x1e4)](_0x3ebf8f,_0x4a6192,_0x58bb1e[_0x2dc492(0x18a)]);break;}case _0x32dd96[_0x2dc492(0x1ca)]:{this[_0x2dc492(0x17b)][_0x2dc492(0x1d6)](_0x3ebf8f,_0x4a6192,{'commentId':_0x58bb1e[_0x2dc492(0x18a)],'text':JSON[_0x2dc492(0x1b5)](_0x58bb1e[_0x2dc492(0x1b7)])});break;}case _0x32dd96['Solve']:{const _0x493cb9=(_0x2b1814=this['_threadCommentModel'][_0x2dc492(0x1e1)](_0x58bb1e[_0x2dc492(0x1be)])['find'](_0x233ba9=>_0x233ba9[_0x2dc492(0x17a)]===_0x58bb1e['threadId']))==null?void 0x0:_0x2b1814[_0x2dc492(0x165)];_0x493cb9&&this[_0x2dc492(0x17b)][_0x2dc492(0x199)](_0x3ebf8f,_0x4a6192,_0x493cb9['id'],_0x58bb1e[_0x2dc492(0x1a0)]===_0x45c5e0[_0x2dc492(0x1b4)]);break;}}}));}};_0x344d05=_0x24db28([_0x50ead1(0x0,_0x1166d5[_0x3bb98a(0x192)](_0x4f8414[_0x3bb98a(0x1d5)])),_0x50ead1(0x1,_0x1166d5[_0x3bb98a(0x192)](_0xfcc491[_0x3bb98a(0x1a4)])),_0x50ead1(0x2,_0x1166d5[_0x3bb98a(0x192)](_0x1166d5[_0x3bb98a(0x166)])),_0x50ead1(0x3,_0x1166d5[_0x3bb98a(0x192)](_0x1166d5[_0x3bb98a(0x1ac)]))],_0x344d05);const _0x48deeb='thread-comment-data-source.config',_0xdf36d9={};var _0x26c5ef=Object[_0x3bb98a(0x1df)],_0x537f0e=(_0x5204ab,_0x4a8224,_0x5c63f1,_0x3d4996)=>{const _0xbe3ed4=_0x3bb98a;for(var _0xf8c8f2=_0x3d4996>0x1?void 0x0:_0x3d4996?_0x26c5ef(_0x4a8224,_0x5c63f1):_0x4a8224,_0x51bdfd=_0x5204ab[_0xbe3ed4(0x189)]-0x1,_0x248740;_0x51bdfd>=0x0;_0x51bdfd--)(_0x248740=_0x5204ab[_0x51bdfd])&&(_0xf8c8f2=_0x248740(_0xf8c8f2)||_0xf8c8f2);return _0xf8c8f2;},_0x21a1c0=(_0x23c8bc,_0x5f12c0)=>(_0x1fa4fa,_0x43e9de)=>_0x5f12c0(_0x1fa4fa,_0x43e9de,_0x23c8bc);function _0x2d121e(_0xbf69e,_0x42bbd9){const _0x88a942=_0x3bb98a,_0xb03dc2=_0xbf69e[_0x88a942(0x1a6)][0x0];return{..._0x42bbd9,'id':_0xb03dc2[_0x88a942(0x18a)],'resolved':_0xbf69e['solved']===0x1,'dT':_0x1f991c(_0xb03dc2[_0x88a942(0x1c0)]),'personId':_0xb03dc2[_0x88a942(0x1e5)],'threadId':_0xb03dc2[_0x88a942(0x17a)]};}function _0x1ca3f1(_0x5aca00,_0x184361,_0x159f50){const _0x5d3f79=_0x3bb98a;var _0xb48102,_0x475fdc;if(((_0x475fdc=(_0xb48102=_0x5aca00==null?void 0x0:_0x5aca00[_0x5d3f79(0x1a6)])==null?void 0x0:_0xb48102[_0x5d3f79(0x189)])!=null?_0x475fdc:0x0)>0x0){const _0x24c145=(_0x2fafb6,_0x23f93a)=>({'id':_0x2fafb6[_0x5d3f79(0x18a)],'threadId':_0x2fafb6[_0x5d3f79(0x17a)],'dT':_0x1f991c(_0x2fafb6[_0x5d3f79(0x1c0)]),'personId':_0x2fafb6['userId'],'resolved':_0x5aca00['solved']===_0x45c5e0[_0x5d3f79(0x1b4)],'unitId':_0x184361,'subUnitId':_0x159f50,'text':JSON[_0x5d3f79(0x1b5)](_0x2fafb6[_0x5d3f79(0x1b7)]),'parentId':_0x23f93a}),_0x49bb67=_0x24c145(_0x5aca00[_0x5d3f79(0x1a6)][0x0]);return{..._0x49bb67,'children':_0x5aca00['replies'][_0x5d3f79(0x175)](0x1)[_0x5d3f79(0x169)](_0x4daf1f=>_0x24c145(_0x4daf1f,_0x49bb67['id']))};}return null;}let _0x258704=class{constructor(_0x72a77b,_0x1c8cba,_0x106030){const _0x2d5456=_0x3bb98a;this[_0x2d5456(0x1a8)]=_0x72a77b,this[_0x2d5456(0x172)]=_0x1c8cba,this['_sessionService']=_0x106030;}async['addComment'](_0x16f8de){const _0x16252a=_0x3bb98a;var _0x40325e,_0x3061db;const {parentId:_0x1b140d,unitId:_0x28c5cc,text:_0x76b634,threadId:_0xf3d2ae}=_0x16f8de,_0x44c26b=(_0x3061db=(_0x40325e=_0x76b634[_0x16252a(0x178)])==null?void 0x0:_0x40325e[_0x16252a(0x19a)](_0xd8a38f=>_0xd8a38f[_0x16252a(0x171)]===_0x1166d5[_0x16252a(0x1a5)][_0x16252a(0x16c)])['map'](_0xc58114=>_0xc58114['rangeId']))!=null?_0x3061db:[],_0x14e0a4=JSON['stringify'](_0x76b634),_0x555a3b=(await this['_sessionService'][_0x16252a(0x1cb)](_0x28c5cc))[_0x16252a(0x1ab)]();if(_0x1b140d){const _0x4185c5={'memberId':_0x555a3b,'unitId':_0x28c5cc,'content':_0x14e0a4,'mention':_0x44c26b,'threadId':_0xf3d2ae},_0x407bb7=(await this[_0x16252a(0x1a8)][_0x16252a(0x184)]('/universer-api/comment/unit/'+_0x28c5cc+_0x16252a(0x197),{'body':_0x4185c5}))[_0x16252a(0x1ba)][_0x16252a(0x183)];return{..._0x16f8de,'id':_0x407bb7[_0x16252a(0x18a)],'dT':_0x1166d5[_0x16252a(0x1dd)](+_0x407bb7[_0x16252a(0x1c0)])[_0x16252a(0x19e)](_0x16252a(0x164)),'personId':_0x407bb7[_0x16252a(0x1e5)]};}else{const _0x22f6fa={'memberId':_0x555a3b,'unitId':_0x28c5cc,'content':_0x14e0a4,'mention':_0x44c26b},_0x355995=await this[_0x16252a(0x1a8)]['post'](_0x16252a(0x1cd)+_0x28c5cc+_0x16252a(0x191),{'body':_0x22f6fa});return _0x2d121e(_0x355995[_0x16252a(0x1ba)]['comment'],_0x16f8de);}}async[_0x3bb98a(0x1d6)](_0x252308){const _0x38ecb9=_0x3bb98a;var _0x1f248a,_0x22c592;const {text:_0x28ef6b,unitId:_0xa9b6ea}=_0x252308,_0xb3f045=(_0x22c592=(_0x1f248a=_0x28ef6b['customRanges'])==null?void 0x0:_0x1f248a[_0x38ecb9(0x19a)](_0x49ecf9=>_0x49ecf9[_0x38ecb9(0x171)]===_0x1166d5[_0x38ecb9(0x1a5)][_0x38ecb9(0x16c)])['map'](_0x166e0a=>_0x166e0a['rangeId']))!=null?_0x22c592:[],_0x5a8369=JSON[_0x38ecb9(0x185)](_0x28ef6b),_0x1c8418=_0x252308[_0x38ecb9(0x17a)],_0x121775=_0x252308['id'],_0x47dc87={'memberId':(await this[_0x38ecb9(0x1b3)][_0x38ecb9(0x1cb)](_0xa9b6ea))[_0x38ecb9(0x1ab)](),'unitId':_0xa9b6ea,'threadId':_0x1c8418,'mention':_0xb3f045,'content':_0x5a8369,'replyId':_0x121775},_0x5c87ed=await this[_0x38ecb9(0x1a8)][_0x38ecb9(0x184)](_0x38ecb9(0x1cd)+_0xa9b6ea+'/edit',{'body':_0x47dc87});return!_0x5c87ed['body'][_0x38ecb9(0x1e3)]||_0x5c87ed[_0x38ecb9(0x1ba)][_0x38ecb9(0x1e3)][_0x38ecb9(0x1de)]===0x1;}async[_0x3bb98a(0x199)](_0x5ea99d){const _0x20c0eb=_0x3bb98a,{unitId:_0x53b8c8}=_0x5ea99d,_0x4db41f=_0x5ea99d[_0x20c0eb(0x17a)],_0x3c70ea={'memberId':this['_userService'][_0x20c0eb(0x18b)]()[_0x20c0eb(0x19f)],'unitId':_0x53b8c8,'threadId':_0x4db41f,'solved':_0x5ea99d[_0x20c0eb(0x1e7)]?_0x45c5e0[_0x20c0eb(0x1b4)]:_0x45c5e0[_0x20c0eb(0x1a1)]},_0x563050=await this['_httpService'][_0x20c0eb(0x184)](_0x20c0eb(0x1cd)+_0x53b8c8+'/solved',{'body':_0x3c70ea});return!_0x563050[_0x20c0eb(0x1ba)][_0x20c0eb(0x1e3)]||_0x563050[_0x20c0eb(0x1ba)][_0x20c0eb(0x1e3)][_0x20c0eb(0x1de)]===0x1;}async[_0x3bb98a(0x1e4)](_0x7a762c,_0x184496,_0x5325e6,_0x2f6cfc){const _0x25b706=_0x3bb98a,_0x305945={'memberId':(await this[_0x25b706(0x1b3)][_0x25b706(0x1cb)](_0x7a762c))[_0x25b706(0x1ab)](),'threadId':_0x5325e6,'replyId':_0x2f6cfc,'unitId':_0x7a762c},_0x2eb252=await this[_0x25b706(0x1a8)][_0x25b706(0x184)](_0x25b706(0x1cd)+_0x7a762c+_0x25b706(0x1b1),{'body':_0x305945});return!_0x2eb252['body'][_0x25b706(0x1e3)]||_0x2eb252[_0x25b706(0x1ba)]['error'][_0x25b706(0x1de)]===0x1;}async['listComments'](_0x31e92d,_0x4a7432,_0x3da76a){const _0x4caa56=_0x3bb98a,_0x5d5b2b={'unitId':_0x31e92d,'threadId':_0x3da76a},_0x154691=await this[_0x4caa56(0x1a8)][_0x4caa56(0x184)]('/universer-api/comment/unit/'+_0x31e92d+'/list',{'body':_0x5d5b2b}),_0x24a42d=_0x3da76a[_0x4caa56(0x169)](_0x136cc6=>_0x1ca3f1(_0x154691[_0x4caa56(0x1ba)][_0x4caa56(0x1d4)][_0x136cc6],_0x31e92d,_0x4a7432))['filter'](Boolean);return Object[_0x4caa56(0x179)](_0x154691[_0x4caa56(0x1ba)]['users'])[_0x4caa56(0x1dc)](_0x4d6334=>{const _0x4bc289=_0x4caa56;this[_0x4bc289(0x172)]['addUser'](_0x4d6334);}),_0x24a42d;}[_0x3bb98a(0x1c5)](_0x2298fe){const _0x380330=_0x3bb98a;return{'id':_0x2298fe['id'],'threadId':_0x2298fe[_0x380330(0x17a)],'ref':_0x2298fe[_0x380330(0x1d8)]};}};_0x258704=_0x537f0e([_0x21a1c0(0x0,_0x1166d5['Inject'](_0x1d41b9[_0x3bb98a(0x19b)])),_0x21a1c0(0x1,_0x1166d5[_0x3bb98a(0x192)](_0x1166d5[_0x3bb98a(0x166)])),_0x21a1c0(0x2,_0x1166d5[_0x3bb98a(0x192)](_0x4f8414['CollaborationSessionService']))],_0x258704);var _0x1cfaab=Object[_0x3bb98a(0x1df)],_0x53782b=(_0x122e46,_0x536bbc,_0x344be5,_0x2e9c07)=>{const _0x29defb=_0x3bb98a;for(var _0x15baf3=_0x2e9c07>0x1?void 0x0:_0x2e9c07?_0x1cfaab(_0x536bbc,_0x344be5):_0x536bbc,_0x497af7=_0x122e46[_0x29defb(0x189)]-0x1,_0x183932;_0x497af7>=0x0;_0x497af7--)(_0x183932=_0x122e46[_0x497af7])&&(_0x15baf3=_0x183932(_0x15baf3)||_0x15baf3);return _0x15baf3;},_0x3bf749=(_0x13bafa,_0x15eed2)=>(_0x144b63,_0x5f0281)=>_0x15eed2(_0x144b63,_0x5f0281,_0x13bafa);let _0x2e10af=class extends _0x1166d5[_0x3bb98a(0x194)]{constructor(_0x563fc4,_0x3554ee){const _0x2a0e2b=_0x3bb98a;super(),this[_0x2a0e2b(0x174)]=_0x563fc4,this[_0x2a0e2b(0x1c3)]=_0x3554ee,this[_0x2a0e2b(0x1ad)]();}['_initDataSource'](){const _0x55e48f=_0x3bb98a;this['_threadCommentDataSourceService'][_0x55e48f(0x17f)]=this['_threadCommentDataSource'],this[_0x55e48f(0x174)][_0x55e48f(0x16d)]=!0x1;}};_0x2e10af=_0x53782b([_0x3bf749(0x0,_0xfcc491[_0x3bb98a(0x16f)]),_0x3bf749(0x1,_0x1166d5[_0x3bb98a(0x192)](_0x258704))],_0x2e10af);var _0x56435a=Object[_0x3bb98a(0x1c1)],_0x4fcb5c=Object[_0x3bb98a(0x1df)],_0x70f627=(_0x5da2f7,_0x5181b5,_0x17f102)=>_0x5181b5 in _0x5da2f7?_0x56435a(_0x5da2f7,_0x5181b5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x17f102}):_0x5da2f7[_0x5181b5]=_0x17f102,_0x4be083=(_0x194e21,_0x449975,_0x32be48,_0x4fa9ce)=>{const _0x3297c3=_0x3bb98a;for(var _0x24a4dd=_0x4fa9ce>0x1?void 0x0:_0x4fa9ce?_0x4fcb5c(_0x449975,_0x32be48):_0x449975,_0x4f695a=_0x194e21[_0x3297c3(0x189)]-0x1,_0x186ef8;_0x4f695a>=0x0;_0x4f695a--)(_0x186ef8=_0x194e21[_0x4f695a])&&(_0x24a4dd=_0x186ef8(_0x24a4dd)||_0x24a4dd);return _0x24a4dd;},_0x1e2d68=(_0x5ce1c8,_0x5aa905)=>(_0xeda197,_0xd96c71)=>_0x5aa905(_0xeda197,_0xd96c71,_0x5ce1c8),_0x5be262=(_0x45805f,_0x295aad,_0xdf0cb0)=>_0x70f627(_0x45805f,typeof _0x295aad!=_0x3bb98a(0x198)?_0x295aad+'':_0x295aad,_0xdf0cb0);_0x1dc790[_0x3bb98a(0x177)]=class extends _0x1166d5[_0x3bb98a(0x18c)]{constructor(_0x181be8=_0xdf36d9,_0x2f94d4,_0x5ac4e0){const _0x287bd3=_0x3bb98a;super(),this[_0x287bd3(0x1a3)]=_0x181be8,this['_injector']=_0x2f94d4,this[_0x287bd3(0x1c6)]=_0x5ac4e0;const {..._0x1566fe}=_0x1166d5[_0x287bd3(0x1c8)]({},_0xdf36d9,this[_0x287bd3(0x1a3)]);this['_configService'][_0x287bd3(0x19c)](_0x48deeb,_0x1566fe);}['onStarting'](){const _0x4ec339=_0x3bb98a;[[_0x258704],[_0x2e10af],[_0x344d05]][_0x4ec339(0x1dc)](_0x4a8a60=>{const _0x163efb=_0x4ec339;this[_0x163efb(0x1a9)][_0x163efb(0x1aa)](_0x4a8a60);});}[_0x3bb98a(0x1ce)](){const _0x1b5425=_0x3bb98a;this[_0x1b5425(0x1a9)][_0x1b5425(0x1b6)](_0x2e10af),this['_injector']['get'](_0x344d05);}},_0x5be262(_0x1dc790['UniverThreadCommentDataSourcePlugin'],_0x3bb98a(0x1d3),_0x2ca7a3),_0x5be262(_0x1dc790[_0x3bb98a(0x177)],_0x3bb98a(0x17d),_0x1166d5['UniverInstanceType'][_0x3bb98a(0x1c4)]),_0x1dc790['UniverThreadCommentDataSourcePlugin']=_0x4be083([_0x1166d5[_0x3bb98a(0x1ae)](_0xdb4756['UniverThreadCommentUIPlugin'],_0x4f8414[_0x3bb98a(0x16b)],_0x4b2b19[_0x3bb98a(0x176)]),_0x1e2d68(0x1,_0x1166d5[_0x3bb98a(0x192)](_0x1166d5['Injector'])),_0x1e2d68(0x2,_0x1166d5['IConfigService'])],_0x1dc790[_0x3bb98a(0x177)]),Object[_0x3bb98a(0x1c1)](_0x1dc790,Symbol[_0x3bb98a(0x170)],{'value':'Module'});}));
1
+ (function(_0x33a348,_0x454e32){const _0x294c06=_0x3b71,_0x104e10=_0x33a348();while(!![]){try{const _0x3a389a=parseInt(_0x294c06(0x1d1))/0x1+-parseInt(_0x294c06(0x1f4))/0x2+-parseInt(_0x294c06(0x1c8))/0x3*(-parseInt(_0x294c06(0x1b5))/0x4)+-parseInt(_0x294c06(0x1be))/0x5+-parseInt(_0x294c06(0x198))/0x6+-parseInt(_0x294c06(0x1a2))/0x7*(-parseInt(_0x294c06(0x1ba))/0x8)+-parseInt(_0x294c06(0x1d7))/0x9;if(_0x3a389a===_0x454e32)break;else _0x104e10['push'](_0x104e10['shift']());}catch(_0x3fd076){_0x104e10['push'](_0x104e10['shift']());}}}(_0x1425,0x5cd9c),function(_0x228318,_0x2e3554){const _0x237aa9=_0x3b71;typeof exports=='object'&&typeof module<'u'?_0x2e3554(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==_0x237aa9(0x200)&&define[_0x237aa9(0x1b0)]?define([_0x237aa9(0x1a6),_0x237aa9(0x1ca),_0x237aa9(0x1dc),_0x237aa9(0x19d),_0x237aa9(0x1aa),_0x237aa9(0x1d0),'rxjs',_0x237aa9(0x1f9)],_0x2e3554):(_0x228318=typeof globalThis<'u'?globalThis:_0x228318||self,_0x2e3554(_0x228318['UniverProThreadCommentDatasource']={},_0x228318['UniverProCollaborationClient'],_0x228318[_0x237aa9(0x1c9)],_0x228318[_0x237aa9(0x1d4)],_0x228318[_0x237aa9(0x1dd)],_0x228318['UniverThreadComment'],_0x228318[_0x237aa9(0x1f1)],_0x228318[_0x237aa9(0x1f8)]));}(this,function(_0x5c66db,_0x3109f9,_0x2c14ba,_0x435600,_0x430df1,_0x43f7e7,_0x15d779,_0x3721b3){'use strict';const _0x1f6fc3=_0x3b71;const _0x4f28d3=_0x1f6fc3(0x202);var _0xfd3de0=(_0x4eeba4=>(_0x4eeba4[_0x4eeba4[_0x1f6fc3(0x1a4)]=0x0]='OpenOrReOpen',_0x4eeba4[_0x4eeba4[_0x1f6fc3(0x1e7)]=0x1]='Solved',_0x4eeba4[_0x4eeba4['UNRECOGNIZED']=-0x1]=_0x1f6fc3(0x1fc),_0x4eeba4))(_0xfd3de0||{}),_0x3560bc=(_0x5656d9=>(_0x5656d9[_0x5656d9[_0x1f6fc3(0x1e9)]=0x0]=_0x1f6fc3(0x1e9),_0x5656d9[_0x5656d9['Add']=0x1]=_0x1f6fc3(0x195),_0x5656d9[_0x5656d9[_0x1f6fc3(0x1e1)]=0x2]=_0x1f6fc3(0x1e1),_0x5656d9[_0x5656d9['Edit']=0x3]=_0x1f6fc3(0x1c3),_0x5656d9[_0x5656d9['Delete']=0x4]=_0x1f6fc3(0x1a3),_0x5656d9[_0x5656d9[_0x1f6fc3(0x1e5)]=0x5]='Solve',_0x5656d9[_0x5656d9[_0x1f6fc3(0x1fc)]=-0x1]=_0x1f6fc3(0x1fc),_0x5656d9))(_0x3560bc||{});const _0x3f665d=_0x540ca2=>_0x435600[_0x1f6fc3(0x201)](new Date(+_0x540ca2))[_0x1f6fc3(0x1b7)](_0x1f6fc3(0x1a8)),_0x4f97e3=async(_0x105a2d,_0x29a122)=>{const _0x5a7909=_0x1f6fc3,_0x16b67f=_0x105a2d['get'](_0x435600['UserManagerService']),_0x2b0a3d=_0x105a2d['get'](_0x3721b3[_0x5a7909(0x19c)]);_0x29a122['forEach'](_0x51a032=>{const _0x15be44=_0x5a7909;_0x16b67f[_0x15be44(0x1bc)](_0x51a032)&&_0x29a122[_0x15be44(0x1e4)](_0x51a032);}),_0x29a122[_0x5a7909(0x1bf)]&&(await _0x2b0a3d[_0x5a7909(0x1f2)](_0x5a7909(0x1d9),{'params':{'userIDs':[..._0x29a122]}}))['body'][_0x5a7909(0x1a7)]['forEach'](_0xf26e0c=>{const _0x49562e=_0x5a7909;_0xf26e0c&&_0x16b67f[_0x49562e(0x196)](_0xf26e0c);});};var _0x9210cd=Object[_0x1f6fc3(0x1e0)],_0x8596ba=(_0x228472,_0x27df00,_0x4495f8,_0xb5d5df)=>{const _0x1e217b=_0x1f6fc3;for(var _0x26dc0d=_0xb5d5df>0x1?void 0x0:_0xb5d5df?_0x9210cd(_0x27df00,_0x4495f8):_0x27df00,_0x2f06cf=_0x228472[_0x1e217b(0x1d5)]-0x1,_0x135bb4;_0x2f06cf>=0x0;_0x2f06cf--)(_0x135bb4=_0x228472[_0x2f06cf])&&(_0x26dc0d=_0x135bb4(_0x26dc0d)||_0x26dc0d);return _0x26dc0d;},_0x242fdb=(_0x14da01,_0x6f6cea)=>(_0x1b04a8,_0x50116c)=>_0x6f6cea(_0x1b04a8,_0x50116c,_0x14da01);let _0x1a82aa=class extends _0x435600[_0x1f6fc3(0x1c1)]{constructor(_0x196161,_0x3743db,_0x33776f,_0xfe1c60){const _0x446a66=_0x1f6fc3;super(),this[_0x446a66(0x20b)]=_0x196161,this['_threadCommentModel']=_0x3743db,this[_0x446a66(0x1cd)]=_0x33776f,this[_0x446a66(0x1df)]=_0xfe1c60,this[_0x446a66(0x1ed)](),this[_0x446a66(0x18e)]();}[_0x1f6fc3(0x18e)](){const _0x39dd85=_0x1f6fc3;this[_0x39dd85(0x1fd)](this['_threadCommentModel']['commentUpdate$'][_0x39dd85(0x1af)](_0x15d779[_0x39dd85(0x207)](0x10))['subscribe'](_0x197ba5=>{const _0x1c1b65=_0x39dd85,_0x18e5fa=new Set();_0x197ba5[_0x1c1b65(0x1b6)](_0x392402=>{const _0x40b0ef=_0x1c1b65;if(_0x392402[_0x40b0ef(0x190)]===_0x40b0ef(0x1b9)){const _0x3821ed=_0x392402['payload'][_0x40b0ef(0x191)];_0x18e5fa[_0x40b0ef(0x1b9)](_0x3821ed);}}),_0x4f97e3(this[_0x1c1b65(0x1df)],_0x18e5fa);}));}[_0x1f6fc3(0x1ed)](){const _0x395fc6=_0x1f6fc3;this['disposeWithMe'](this['_commentService'][_0x395fc6(0x1c6)][_0x395fc6(0x1d3)](async _0x54d038=>{const _0x376946=_0x395fc6;var _0x20e199,_0x5c8d7b,_0x157888,_0x490202;const _0x3cdc69=(_0x20e199=this[_0x376946(0x1a0)]['getUnit'](_0x54d038[_0x376946(0x1ad)])[_0x376946(0x18f)](_0x11b815=>_0x11b815['threadId']===_0x54d038[_0x376946(0x197)]))==null?void 0x0:_0x20e199['root'];if(!_0x3cdc69)return;const {unitId:_0x3e59fe,subUnitId:_0x4ef2da}=_0x3cdc69;switch(_0x54d038[_0x376946(0x1f6)]&&this['_userService'][_0x376946(0x196)](_0x54d038[_0x376946(0x1f6)]),_0x54d038[_0x376946(0x190)]){case _0x3560bc[_0x376946(0x195)]:break;case _0x3560bc[_0x376946(0x1e1)]:{this['_threadCommentModel'][_0x376946(0x194)](_0x3e59fe,_0x4ef2da,{'unitId':_0x3e59fe,'subUnitId':_0x4ef2da,'ref':'','id':_0x54d038[_0x376946(0x1b4)],'dT':_0x3f665d(+_0x54d038[_0x376946(0x1ac)]),'threadId':_0x54d038['threadId'],'personId':(_0x157888=(_0x5c8d7b=_0x54d038[_0x376946(0x1f6)])==null?void 0x0:_0x5c8d7b[_0x376946(0x1c7)])!=null?_0x157888:_0x54d038[_0x376946(0x1ef)],'text':JSON[_0x376946(0x1b1)](_0x54d038[_0x376946(0x1e8)]),'parentId':_0x3cdc69['id']});break;}case _0x3560bc[_0x376946(0x1a3)]:{const _0x57cc53=this[_0x376946(0x1a0)][_0x376946(0x1de)](_0x3e59fe,_0x4ef2da,_0x54d038[_0x376946(0x1b4)]);_0x57cc53&&_0x57cc53['parentId']&&this[_0x376946(0x1a0)]['deleteComment'](_0x3e59fe,_0x4ef2da,_0x54d038[_0x376946(0x1b4)]);break;}case _0x3560bc['Edit']:{this[_0x376946(0x1a0)][_0x376946(0x1ea)](_0x3e59fe,_0x4ef2da,{'commentId':_0x54d038[_0x376946(0x1b4)],'text':JSON[_0x376946(0x1b1)](_0x54d038[_0x376946(0x1e8)])});break;}case _0x3560bc[_0x376946(0x1e5)]:{const _0x1bdc7f=(_0x490202=this[_0x376946(0x1a0)]['getUnit'](_0x54d038[_0x376946(0x1ad)])['find'](_0x513cf3=>_0x513cf3[_0x376946(0x197)]===_0x54d038[_0x376946(0x197)]))==null?void 0x0:_0x490202['root'];_0x1bdc7f&&this[_0x376946(0x1a0)][_0x376946(0x1db)](_0x3e59fe,_0x4ef2da,_0x1bdc7f['id'],_0x54d038[_0x376946(0x1da)]===_0xfd3de0[_0x376946(0x1e7)]);break;}}}));}};_0x1a82aa=_0x8596ba([_0x242fdb(0x0,_0x435600['Inject'](_0x3109f9[_0x1f6fc3(0x1ee)])),_0x242fdb(0x1,_0x435600[_0x1f6fc3(0x1fb)](_0x43f7e7[_0x1f6fc3(0x203)])),_0x242fdb(0x2,_0x435600[_0x1f6fc3(0x1fb)](_0x435600[_0x1f6fc3(0x206)])),_0x242fdb(0x3,_0x435600[_0x1f6fc3(0x1fb)](_0x435600['Injector']))],_0x1a82aa);const _0x367050='thread-comment-data-source.config',_0x5cbe9e={};var _0x267b1a=Object[_0x1f6fc3(0x1e0)],_0x164540=(_0x237c81,_0x43bb97,_0xebc046,_0x3bbc18)=>{const _0x4be1fd=_0x1f6fc3;for(var _0x31f367=_0x3bbc18>0x1?void 0x0:_0x3bbc18?_0x267b1a(_0x43bb97,_0xebc046):_0x43bb97,_0x36f177=_0x237c81[_0x4be1fd(0x1d5)]-0x1,_0x1505a8;_0x36f177>=0x0;_0x36f177--)(_0x1505a8=_0x237c81[_0x36f177])&&(_0x31f367=_0x1505a8(_0x31f367)||_0x31f367);return _0x31f367;},_0x32d71d=(_0x1348ea,_0x31d27e)=>(_0x41b405,_0xf98095)=>_0x31d27e(_0x41b405,_0xf98095,_0x1348ea);function _0x4fa0e8(_0x4abbc6,_0x45c9e9){const _0x32de5f=_0x1f6fc3,_0xdd5a42=_0x4abbc6[_0x32de5f(0x1c2)][0x0];return{..._0x45c9e9,'id':_0xdd5a42[_0x32de5f(0x1b4)],'resolved':_0x4abbc6[_0x32de5f(0x1da)]===0x1,'dT':_0x3f665d(_0xdd5a42[_0x32de5f(0x1ac)]),'personId':_0xdd5a42[_0x32de5f(0x1ef)],'threadId':_0xdd5a42[_0x32de5f(0x197)]};}function _0x6db5e8(_0x40ebe0,_0x12c510,_0x5e1d04){const _0x30b713=_0x1f6fc3;var _0x4fca45,_0x32ca64;if(((_0x32ca64=(_0x4fca45=_0x40ebe0==null?void 0x0:_0x40ebe0[_0x30b713(0x1c2)])==null?void 0x0:_0x4fca45[_0x30b713(0x1d5)])!=null?_0x32ca64:0x0)>0x0){const _0x2b1c6b=(_0xdb478c,_0x55e0dc)=>({'id':_0xdb478c['replyId'],'threadId':_0xdb478c[_0x30b713(0x197)],'dT':_0x3f665d(_0xdb478c[_0x30b713(0x1ac)]),'personId':_0xdb478c[_0x30b713(0x1ef)],'resolved':_0x40ebe0[_0x30b713(0x1da)]===_0xfd3de0[_0x30b713(0x1e7)],'unitId':_0x12c510,'subUnitId':_0x5e1d04,'text':JSON[_0x30b713(0x1b1)](_0xdb478c[_0x30b713(0x1e8)]),'parentId':_0x55e0dc}),_0x7afead=_0x2b1c6b(_0x40ebe0[_0x30b713(0x1c2)][0x0]);return{..._0x7afead,'children':_0x40ebe0[_0x30b713(0x1c2)][_0x30b713(0x19e)](0x1)[_0x30b713(0x1c4)](_0x4dd978=>_0x2b1c6b(_0x4dd978,_0x7afead['id']))};}return null;}let _0x3683b8=class{constructor(_0xfaa002,_0x1071b6,_0x50dd41){const _0x26a578=_0x1f6fc3;this['_httpService']=_0xfaa002,this[_0x26a578(0x1cd)]=_0x1071b6,this['_sessionService']=_0x50dd41;}async['addComment'](_0x488df2){const _0x4b4014=_0x1f6fc3;var _0x10fd55,_0x4b095e;const {parentId:_0x1d9de0,unitId:_0x3eaa22,text:_0x2f602e,threadId:_0x2b66e2}=_0x488df2,_0x3df81c=(_0x4b095e=(_0x10fd55=_0x2f602e[_0x4b4014(0x1cb)])==null?void 0x0:_0x10fd55[_0x4b4014(0x1a9)](_0x2f86ea=>_0x2f86ea[_0x4b4014(0x1ab)]===_0x435600[_0x4b4014(0x1d8)]['COMMENT'])[_0x4b4014(0x1c4)](_0x56b1e3=>_0x56b1e3[_0x4b4014(0x1d2)]))!=null?_0x4b095e:[],_0x10eacc=JSON['stringify'](_0x2f602e),_0x2969bb=(await this['_sessionService'][_0x4b4014(0x1f0)](_0x3eaa22))[_0x4b4014(0x1cc)]();if(_0x1d9de0){const _0x25c021={'memberId':_0x2969bb,'unitId':_0x3eaa22,'content':_0x10eacc,'mention':_0x3df81c,'threadId':_0x2b66e2},_0x506b2d=(await this['_httpService'][_0x4b4014(0x19a)](_0x4b4014(0x19f)+_0x3eaa22+'/reply',{'body':_0x25c021}))['body'][_0x4b4014(0x20c)];return{..._0x488df2,'id':_0x506b2d[_0x4b4014(0x1b4)],'dT':_0x435600[_0x4b4014(0x201)](+_0x506b2d[_0x4b4014(0x1ac)])['format'](_0x4b4014(0x1a8)),'personId':_0x506b2d['userId']};}else{const _0x2b146b={'memberId':_0x2969bb,'unitId':_0x3eaa22,'content':_0x10eacc,'mention':_0x3df81c},_0x3b68df=await this['_httpService'][_0x4b4014(0x19a)]('/universer-api/comment/unit/'+_0x3eaa22+'/add',{'body':_0x2b146b});return _0x4fa0e8(_0x3b68df['body'][_0x4b4014(0x208)],_0x488df2);}}async[_0x1f6fc3(0x1ea)](_0x114ae7){const _0x547e6a=_0x1f6fc3;var _0x208f85,_0x309776;const {text:_0x192851,unitId:_0xcdd8d}=_0x114ae7,_0x3393e5=(_0x309776=(_0x208f85=_0x192851[_0x547e6a(0x1cb)])==null?void 0x0:_0x208f85['filter'](_0xe20462=>_0xe20462[_0x547e6a(0x1ab)]===_0x435600[_0x547e6a(0x1d8)]['COMMENT'])[_0x547e6a(0x1c4)](_0x5bc7e3=>_0x5bc7e3['rangeId']))!=null?_0x309776:[],_0x19bed4=JSON[_0x547e6a(0x192)](_0x192851),_0x15a878=_0x114ae7['threadId'],_0x475021=_0x114ae7['id'],_0xa6307c={'memberId':(await this['_sessionService'][_0x547e6a(0x1f0)](_0xcdd8d))[_0x547e6a(0x1cc)](),'unitId':_0xcdd8d,'threadId':_0x15a878,'mention':_0x3393e5,'content':_0x19bed4,'replyId':_0x475021},_0x5c0893=await this[_0x547e6a(0x20e)][_0x547e6a(0x19a)](_0x547e6a(0x19f)+_0xcdd8d+_0x547e6a(0x1f3),{'body':_0xa6307c});return!_0x5c0893[_0x547e6a(0x1f5)]['error']||_0x5c0893[_0x547e6a(0x1f5)][_0x547e6a(0x1eb)]['code']===0x1;}async[_0x1f6fc3(0x1db)](_0x2596e3){const _0x35aee5=_0x1f6fc3,{unitId:_0x91ff31}=_0x2596e3,_0x4289f0=_0x2596e3['threadId'],_0x17835c={'memberId':this[_0x35aee5(0x1cd)][_0x35aee5(0x1ae)]()['userID'],'unitId':_0x91ff31,'threadId':_0x4289f0,'solved':_0x2596e3[_0x35aee5(0x209)]?_0xfd3de0[_0x35aee5(0x1e7)]:_0xfd3de0['OpenOrReOpen']},_0x1ce424=await this[_0x35aee5(0x20e)]['post'](_0x35aee5(0x19f)+_0x91ff31+'/solved',{'body':_0x17835c});return!_0x1ce424[_0x35aee5(0x1f5)]['error']||_0x1ce424[_0x35aee5(0x1f5)]['error'][_0x35aee5(0x1b8)]===0x1;}async[_0x1f6fc3(0x1e3)](_0x2cb1ba,_0x50fde4,_0x11fe0f,_0x158ccd){const _0x3a218a=_0x1f6fc3,_0x1ed6fc={'memberId':(await this[_0x3a218a(0x1c0)][_0x3a218a(0x1f0)](_0x2cb1ba))[_0x3a218a(0x1cc)](),'threadId':_0x11fe0f,'replyId':_0x158ccd,'unitId':_0x2cb1ba},_0x3a8723=await this[_0x3a218a(0x20e)]['post'](_0x3a218a(0x19f)+_0x2cb1ba+'/delete',{'body':_0x1ed6fc});return!_0x3a8723[_0x3a218a(0x1f5)][_0x3a218a(0x1eb)]||_0x3a8723[_0x3a218a(0x1f5)]['error']['code']===0x1;}async[_0x1f6fc3(0x1bd)](_0x33b18e,_0x1742ac,_0x2f4c83){const _0x161296=_0x1f6fc3,_0x173b29={'unitId':_0x33b18e,'threadId':_0x2f4c83},_0x1df30a=await this[_0x161296(0x20e)][_0x161296(0x19a)](_0x161296(0x19f)+_0x33b18e+_0x161296(0x1e6),{'body':_0x173b29}),_0x35fffc=_0x2f4c83[_0x161296(0x1c4)](_0x4bd645=>_0x6db5e8(_0x1df30a[_0x161296(0x1f5)][_0x161296(0x1b2)][_0x4bd645],_0x33b18e,_0x1742ac))[_0x161296(0x1a9)](Boolean);return Object['values'](_0x1df30a['body']['users'])['forEach'](_0x59026e=>{const _0x36e4cc=_0x161296;this[_0x36e4cc(0x1cd)]['addUser'](_0x59026e);}),_0x35fffc;}['saveCommentToSnapshot'](_0x5dee7a){const _0x46b7a6=_0x1f6fc3;return{'id':_0x5dee7a['id'],'threadId':_0x5dee7a['threadId'],'ref':_0x5dee7a[_0x46b7a6(0x20d)]};}};_0x3683b8=_0x164540([_0x32d71d(0x0,_0x435600[_0x1f6fc3(0x1fb)](_0x3721b3['HTTPService'])),_0x32d71d(0x1,_0x435600['Inject'](_0x435600[_0x1f6fc3(0x206)])),_0x32d71d(0x2,_0x435600[_0x1f6fc3(0x1fb)](_0x3109f9['CollaborationSessionService']))],_0x3683b8);var _0x36736f=Object[_0x1f6fc3(0x1e0)],_0x363087=(_0x43af3f,_0x5ca66a,_0x167516,_0x2a49b7)=>{const _0x1e8106=_0x1f6fc3;for(var _0x376fb5=_0x2a49b7>0x1?void 0x0:_0x2a49b7?_0x36736f(_0x5ca66a,_0x167516):_0x5ca66a,_0x3a7055=_0x43af3f[_0x1e8106(0x1d5)]-0x1,_0x27aed9;_0x3a7055>=0x0;_0x3a7055--)(_0x27aed9=_0x43af3f[_0x3a7055])&&(_0x376fb5=_0x27aed9(_0x376fb5)||_0x376fb5);return _0x376fb5;},_0x264034=(_0x1ee23a,_0x449b40)=>(_0x2a71fc,_0x4baf0c)=>_0x449b40(_0x2a71fc,_0x4baf0c,_0x1ee23a);let _0x3aaaac=class extends _0x435600[_0x1f6fc3(0x1c1)]{constructor(_0x24b16a,_0x4b207a){const _0x360c92=_0x1f6fc3;super(),this['_threadCommentDataSourceService']=_0x24b16a,this[_0x360c92(0x1c5)]=_0x4b207a,this[_0x360c92(0x1ce)]();}['_initDataSource'](){const _0x112e0d=_0x1f6fc3;this[_0x112e0d(0x199)][_0x112e0d(0x1fa)]=this[_0x112e0d(0x1c5)],this[_0x112e0d(0x199)][_0x112e0d(0x1ff)]=!0x1;}};_0x3aaaac=_0x363087([_0x264034(0x0,_0x43f7e7['IThreadCommentDataSourceService']),_0x264034(0x1,_0x435600[_0x1f6fc3(0x1fb)](_0x3683b8))],_0x3aaaac);var _0x11e073=Object[_0x1f6fc3(0x1b3)],_0x64d474=Object[_0x1f6fc3(0x1e0)],_0x11cf60=(_0x2d45dc,_0x197082,_0x4d0c26)=>_0x197082 in _0x2d45dc?_0x11e073(_0x2d45dc,_0x197082,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d0c26}):_0x2d45dc[_0x197082]=_0x4d0c26,_0x778891=(_0x256d18,_0x47aea8,_0x13411e,_0x4ef87b)=>{const _0x30d350=_0x1f6fc3;for(var _0x5332f1=_0x4ef87b>0x1?void 0x0:_0x4ef87b?_0x64d474(_0x47aea8,_0x13411e):_0x47aea8,_0x515ae3=_0x256d18[_0x30d350(0x1d5)]-0x1,_0x56f13a;_0x515ae3>=0x0;_0x515ae3--)(_0x56f13a=_0x256d18[_0x515ae3])&&(_0x5332f1=_0x56f13a(_0x5332f1)||_0x5332f1);return _0x5332f1;},_0x29bbb5=(_0x340bec,_0x5b218)=>(_0x2f48d7,_0x1e5975)=>_0x5b218(_0x2f48d7,_0x1e5975,_0x340bec),_0x14ff36=(_0x3b13d3,_0xefb412,_0x10dc89)=>_0x11cf60(_0x3b13d3,typeof _0xefb412!=_0x1f6fc3(0x193)?_0xefb412+'':_0xefb412,_0x10dc89);_0x5c66db[_0x1f6fc3(0x19b)]=class extends _0x435600['Plugin']{constructor(_0xe8ec2c=_0x5cbe9e,_0x12ea05,_0x44ec7b){const _0x4feccc=_0x1f6fc3;super(),this[_0x4feccc(0x1f7)]=_0xe8ec2c,this[_0x4feccc(0x1df)]=_0x12ea05,this[_0x4feccc(0x1d6)]=_0x44ec7b;const {..._0xd65366}=_0x435600[_0x4feccc(0x204)]({},_0x5cbe9e,this[_0x4feccc(0x1f7)]);this['_configService'][_0x4feccc(0x18d)](_0x367050,_0xd65366);}[_0x1f6fc3(0x1cf)](){[[_0x3683b8],[_0x3aaaac],[_0x1a82aa]]['forEach'](_0x470452=>{const _0x30e3dc=_0x3b71;this[_0x30e3dc(0x1df)][_0x30e3dc(0x1b9)](_0x470452);});}['onReady'](){const _0x3e9421=_0x1f6fc3;this[_0x3e9421(0x1df)][_0x3e9421(0x1f2)](_0x3aaaac),this['_injector'][_0x3e9421(0x1f2)](_0x1a82aa);}},_0x14ff36(_0x5c66db[_0x1f6fc3(0x19b)],'pluginName',_0x4f28d3),_0x14ff36(_0x5c66db[_0x1f6fc3(0x19b)],'type',_0x435600[_0x1f6fc3(0x205)][_0x1f6fc3(0x1bb)]),_0x5c66db[_0x1f6fc3(0x19b)]=_0x778891([_0x435600[_0x1f6fc3(0x1a1)](_0x430df1['UniverThreadCommentUIPlugin'],_0x3109f9[_0x1f6fc3(0x1a5)],_0x2c14ba[_0x1f6fc3(0x1ec)]),_0x29bbb5(0x1,_0x435600[_0x1f6fc3(0x1fb)](_0x435600[_0x1f6fc3(0x20a)])),_0x29bbb5(0x2,_0x435600[_0x1f6fc3(0x18c)])],_0x5c66db[_0x1f6fc3(0x19b)]),Object['defineProperty'](_0x5c66db,Symbol[_0x1f6fc3(0x1e2)],{'value':_0x1f6fc3(0x1fe)});}));function _0x3b71(_0x71f311,_0x4bae76){_0x71f311=_0x71f311-0x18c;const _0x142521=_0x1425();let _0x3b7100=_0x142521[_0x71f311];return _0x3b7100;}function _0x1425(){const _0x1bed01=['YYYY/MM/DD\x20HH:mm','filter','@univerjs/thread-comment-ui','rangeType','createTimestamp','unitId','getCurrentUser','pipe','amd','parse','comments','defineProperty','replyId','48iDhUxt','forEach','format','code','add','191984aIctUD','UNIVER_UNKNOWN','getUser','listComments','1867140cvOXed','size','_sessionService','Disposable','replies','Edit','map','_threadCommentDataSource','commentUpdate$','userID','72354guWpsz','UniverProLicense','@univerjs-pro/collaboration-client','customRanges','getMemberID','_userService','_initDataSource','onStarting','@univerjs/thread-comment','634017GGandI','rangeId','subscribe','UniverCore','length','_configService','321156vhQHDw','CustomRangeType','/universer-api/user/list','solved','resolveComment','@univerjs-pro/license','UniverThreadCommentUi','getComment','_injector','getOwnPropertyDescriptor','Reply','toStringTag','deleteComment','delete','Solve','/list','Solved','content','Unknown','updateComment','error','UniverLicensePlugin','_init','CommentService','userId','requireSession','rxjs','get','/edit','127266njJhfp','body','user','_config','UniverNetwork','@univerjs/network','dataSource','Inject','UNRECOGNIZED','disposeWithMe','Module','syncUpdateMutationToColla','function','dayjs','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','ThreadCommentModel','merge','UniverInstanceType','UserManagerService','bufferTime','comment','resolved','Injector','_commentService','reply','ref','_httpService','IConfigService','setConfig','_initUserSync','find','type','personId','stringify','symbol','addComment','Add','addUser','threadId','3014016pWgcqd','_threadCommentDataSourceService','post','UniverThreadCommentDataSourcePlugin','HTTPService','@univerjs/core','slice','/universer-api/comment/unit/','_threadCommentModel','DependentOn','126IOiHya','Delete','OpenOrReOpen','UniverCollaborationClientPlugin','exports','users'];_0x1425=function(){return _0x1bed01;};return _0x1425();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.15.0-insiders.20251227-dafc157",
3
+ "version": "0.15.0-insiders.20251227-453e4ff",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.15.0-insiders.20251227-dafc157",
49
- "@univerjs-pro/license": "0.15.0-insiders.20251227-dafc157",
50
- "@univerjs/core": "0.15.0-insiders.20251227-dafc157",
51
- "@univerjs/network": "0.15.0-insiders.20251227-dafc157",
52
- "@univerjs/protocol": "0.1.48",
53
- "@univerjs/thread-comment": "0.15.0-insiders.20251227-dafc157",
54
- "@univerjs/thread-comment-ui": "0.15.0-insiders.20251227-dafc157"
48
+ "@univerjs-pro/collaboration-client": "0.15.0-insiders.20251227-453e4ff",
49
+ "@univerjs/core": "0.15.0-insiders.20251227-453e4ff",
50
+ "@univerjs/network": "0.15.0-insiders.20251227-453e4ff",
51
+ "@univerjs/thread-comment": "0.15.0-insiders.20251227-453e4ff",
52
+ "@univerjs/thread-comment-ui": "0.15.0-insiders.20251227-453e4ff",
53
+ "@univerjs-pro/license": "0.15.0-insiders.20251227-453e4ff",
54
+ "@univerjs/protocol": "0.1.48"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
59
  "vite": "^7.3.0",
60
60
  "vitest": "^4.0.16",
61
- "@univerjs-infra/shared": "0.15.0"
61
+ "@univerjs-infra/shared": "0.14.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",