@univerjs-pro/thread-comment-datasource 0.8.1-nightly.202506171607 → 0.8.1-nightly.202506181607
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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x423b2e=_0x50e2;(function(_0x4c442f,_0x243b0a){const _0x16428a=_0x50e2,_0x5baaea=_0x4c442f();while(!![]){try{const _0x3e976a=-parseInt(_0x16428a(0x1e6))/0x1*(parseInt(_0x16428a(0x19e))/0x2)+-parseInt(_0x16428a(0x19c))/0x3*(-parseInt(_0x16428a(0x1eb))/0x4)+-parseInt(_0x16428a(0x1ef))/0x5*(-parseInt(_0x16428a(0x1d4))/0x6)+parseInt(_0x16428a(0x1da))/0x7+parseInt(_0x16428a(0x1c3))/0x8+-parseInt(_0x16428a(0x1b1))/0x9*(parseInt(_0x16428a(0x1c8))/0xa)+-parseInt(_0x16428a(0x1b6))/0xb;if(_0x3e976a===_0x243b0a)break;else _0x5baaea['push'](_0x5baaea['shift']());}catch(_0x39d6f9){_0x5baaea['push'](_0x5baaea['shift']());}}}(_0x295e,0xc03ef));Object[_0x423b2e(0x1d7)](exports,Symbol['toStringTag'],{'value':_0x423b2e(0x200)});const b=require(_0x423b2e(0x198)),T=require(_0x423b2e(0x191)),c=require(_0x423b2e(0x1e5)),j=require(_0x423b2e(0x1c0)),M=require('@univerjs/thread-comment'),w=require(_0x423b2e(0x1f4)),P=require(_0x423b2e(0x1af)),U=_0x423b2e(0x1c4);var I=(_0x69f9b7=>(_0x69f9b7[_0x69f9b7['OpenOrReOpen']=0x0]=_0x423b2e(0x1d6),_0x69f9b7[_0x69f9b7[_0x423b2e(0x1f2)]=0x1]=_0x423b2e(0x1f2),_0x69f9b7[_0x69f9b7[_0x423b2e(0x208)]=-0x1]=_0x423b2e(0x208),_0x69f9b7))(I||{}),v=(_0x3074c7=>(_0x3074c7[_0x3074c7[_0x423b2e(0x1b2)]=0x0]='Unknown',_0x3074c7[_0x3074c7[_0x423b2e(0x1f0)]=0x1]='Add',_0x3074c7[_0x3074c7[_0x423b2e(0x1ac)]=0x2]=_0x423b2e(0x1ac),_0x3074c7[_0x3074c7[_0x423b2e(0x1e1)]=0x3]='Edit',_0x3074c7[_0x3074c7['Delete']=0x4]='Delete',_0x3074c7[_0x3074c7['Solve']=0x5]='Solve',_0x3074c7[_0x3074c7[_0x423b2e(0x208)]=-0x1]=_0x423b2e(0x208),_0x3074c7))(v||{});const f=_0x124e59=>c[_0x423b2e(0x1a0)](new Date(+_0x124e59))[_0x423b2e(0x1e2)](_0x423b2e(0x202)),R=async(_0x2734b5,_0x857f34)=>{const _0x1bfc47=_0x423b2e,_0x11bfaa=_0x2734b5['get'](c[_0x1bfc47(0x196)]),_0x2424ad=_0x2734b5[_0x1bfc47(0x1c9)](P[_0x1bfc47(0x199)]);_0x857f34[_0x1bfc47(0x1ca)](_0x57036b=>{const _0x5707f6=_0x1bfc47;_0x11bfaa[_0x5707f6(0x1f8)](_0x57036b)&&_0x857f34[_0x5707f6(0x1dc)](_0x57036b);}),_0x857f34['size']&&(await _0x2424ad[_0x1bfc47(0x1c9)](_0x1bfc47(0x1db),{'params':{'userIDs':[..._0x857f34]}}))[_0x1bfc47(0x207)][_0x1bfc47(0x19b)][_0x1bfc47(0x1ca)](_0xb070ee=>{_0xb070ee&&_0x11bfaa['addUser'](_0xb070ee);});};function _0x295e(){const _0x3835d1=['unitId','IThreadCommentDataSourceService','values','Delete','symbol','Reply','Plugin','createTimestamp','@univerjs/network','rangeType','2937177KLOhNk','Unknown','getMemberID','find','threadId','4224385vyWEZs','subscribe','rangeId','error','_initUserSync','/list','IConfigService','_config','post','solved','@univerjs/thread-comment-ui','map','content','10000904BOYAVm','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','merge','parentId','stringify','30BYVpak','get','forEach','code','_injector','root','commentUpdate$','addComment','Disposable','onReady','replyId','requireSession','1374942qSEtWY','addUser','OpenOrReOpen','defineProperty','userID','reply','10008194HguDWg','/universer-api/user/list','delete','DependentOn','ThreadCommentModel','userId','listComments','Edit','format','personId','_sessionService','@univerjs/core','3OKzvMy','type','syncUpdateMutationToColla','_configService','getOwnPropertyDescriptor','3504Bsbzis','_init','/universer-api/comment/unit/','deleteComment','10KRDzlk','Add','ref','Solved','UNIVER_UNKNOWN','rxjs','COMMENT','updateComment','parse','getUser','Inject','resolveComment','comments','_commentService','filter','UniverInstanceType','UniverThreadCommentDataSourcePlugin','Module','CollaborationSessionService','YYYY/MM/DD\x20HH:mm','customRanges','_threadCommentModel','add','slice','body','UNRECOGNIZED','/edit','disposeWithMe','_threadCommentDataSourceService','_httpService','resolved','getUnit','pluginName','@univerjs-pro/license','_threadCommentDataSource','replies','/solved','Injector','UserManagerService','payload','@univerjs-pro/collaboration-client','HTTPService','UniverLicensePlugin','users','1632sHUkCW','CustomRangeType','976120GhnDjW','length','dayjs','onStarting','CommentService','saveCommentToSnapshot','_userService','user','_initDataSource'];_0x295e=function(){return _0x3835d1;};return _0x295e();}var $=Object['getOwnPropertyDescriptor'],E=(_0x44ee6d,_0x34d3ae,_0x316b06,_0x39c346)=>{for(var _0xce63d0=_0x39c346>0x1?void 0x0:_0x39c346?$(_0x34d3ae,_0x316b06):_0x34d3ae,_0x574781=_0x44ee6d['length']-0x1,_0x375b5e;_0x574781>=0x0;_0x574781--)(_0x375b5e=_0x44ee6d[_0x574781])&&(_0xce63d0=_0x375b5e(_0xce63d0)||_0xce63d0);return _0xce63d0;},S=(_0x312074,_0x5afbe3)=>(_0x5018d0,_0x529bce)=>_0x5afbe3(_0x5018d0,_0x529bce,_0x312074);let p=class extends c[_0x423b2e(0x1d0)]{constructor(_0x13edf3,_0xf8e0c6,_0x1d9b2c,_0x4799f6){const _0x543a13=_0x423b2e;super(),this[_0x543a13(0x1fc)]=_0x13edf3,this['_threadCommentModel']=_0xf8e0c6,this[_0x543a13(0x1a4)]=_0x1d9b2c,this[_0x543a13(0x1cc)]=_0x4799f6,this[_0x543a13(0x1ec)](),this[_0x543a13(0x1ba)]();}[_0x423b2e(0x1ba)](){const _0xacb164=_0x423b2e;this['disposeWithMe'](this[_0xacb164(0x204)][_0xacb164(0x1ce)]['pipe'](w['bufferTime'](0x10))[_0xacb164(0x1b7)](_0x3d47c2=>{const _0x339846=_0xacb164,_0xf71e29=new Set();_0x3d47c2['forEach'](_0xeadd17=>{const _0x261c94=_0x50e2;switch(_0xeadd17[_0x261c94(0x1e7)]){case _0x261c94(0x205):{const _0x57a410=_0xeadd17[_0x261c94(0x197)][_0x261c94(0x1e3)];_0xf71e29['add'](_0x57a410);break;}}}),R(this[_0x339846(0x1cc)],_0xf71e29);}));}[_0x423b2e(0x1ec)](){const _0x4f43c1=_0x423b2e;this[_0x4f43c1(0x20a)](this[_0x4f43c1(0x1fc)][_0x4f43c1(0x1ce)]['subscribe'](async _0x32dbf8=>{const _0xccf069=_0x4f43c1;var _0x2a3379,_0x207ce9,_0xc45812,_0x3e27cb;const _0x186a77=(_0x2a3379=this[_0xccf069(0x204)][_0xccf069(0x18f)](_0x32dbf8[_0xccf069(0x1a7)])['find'](_0x14e1da=>_0x14e1da[_0xccf069(0x1b5)]===_0x32dbf8[_0xccf069(0x1b5)]))==null?void 0x0:_0x2a3379[_0xccf069(0x1cd)];if(!_0x186a77)return;const {unitId:_0x363dac,subUnitId:_0x207ec6}=_0x186a77;switch(_0x32dbf8[_0xccf069(0x1a5)]&&this[_0xccf069(0x1a4)][_0xccf069(0x1d5)](_0x32dbf8[_0xccf069(0x1a5)]),_0x32dbf8['type']){case v['Add']:break;case v['Reply']:{this[_0xccf069(0x204)]['addComment'](_0x363dac,_0x207ec6,{'unitId':_0x363dac,'subUnitId':_0x207ec6,'ref':'','id':_0x32dbf8[_0xccf069(0x1d2)],'dT':f(+_0x32dbf8[_0xccf069(0x1ae)]),'threadId':_0x32dbf8['threadId'],'personId':(_0xc45812=(_0x207ce9=_0x32dbf8[_0xccf069(0x1a5)])==null?void 0x0:_0x207ce9[_0xccf069(0x1d8)])!=null?_0xc45812:_0x32dbf8[_0xccf069(0x1df)],'text':JSON[_0xccf069(0x1f7)](_0x32dbf8[_0xccf069(0x1c2)]),'parentId':_0x186a77['id']});break;}case v[_0xccf069(0x1aa)]:{const _0x146e4a=this[_0xccf069(0x204)]['getComment'](_0x363dac,_0x207ec6,_0x32dbf8[_0xccf069(0x1d2)]);_0x146e4a&&_0x146e4a[_0xccf069(0x1c6)]&&this[_0xccf069(0x204)][_0xccf069(0x1ee)](_0x363dac,_0x207ec6,_0x32dbf8[_0xccf069(0x1d2)]);break;}case v[_0xccf069(0x1e1)]:{this['_threadCommentModel'][_0xccf069(0x1f6)](_0x363dac,_0x207ec6,{'commentId':_0x32dbf8[_0xccf069(0x1d2)],'text':JSON[_0xccf069(0x1f7)](_0x32dbf8[_0xccf069(0x1c2)])});break;}case v['Solve']:{const _0x92f9c0=(_0x3e27cb=this[_0xccf069(0x204)]['getUnit'](_0x32dbf8[_0xccf069(0x1a7)])[_0xccf069(0x1b4)](_0x5bc6e1=>_0x5bc6e1['threadId']===_0x32dbf8['threadId']))==null?void 0x0:_0x3e27cb[_0xccf069(0x1cd)];_0x92f9c0&&this[_0xccf069(0x204)][_0xccf069(0x1fa)](_0x363dac,_0x207ec6,_0x92f9c0['id'],_0x32dbf8[_0xccf069(0x1bf)]===I[_0xccf069(0x1f2)]);break;}}}));}};p=E([S(0x0,c[_0x423b2e(0x1f9)](b[_0x423b2e(0x1a2)])),S(0x1,c[_0x423b2e(0x1f9)](M[_0x423b2e(0x1de)])),S(0x2,c[_0x423b2e(0x1f9)](c[_0x423b2e(0x196)])),S(0x3,c[_0x423b2e(0x1f9)](c[_0x423b2e(0x195)]))],p);const q='thread-comment-data-source.config',D={};function _0x50e2(_0x38f2c0,_0x3bee8b){const _0x295e61=_0x295e();return _0x50e2=function(_0x50e23e,_0xa9261d){_0x50e23e=_0x50e23e-0x18c;let _0xf3efc3=_0x295e61[_0x50e23e];return _0xf3efc3;},_0x50e2(_0x38f2c0,_0x3bee8b);}var A=Object[_0x423b2e(0x1ea)],x=(_0x165d6f,_0x3f9239,_0x113931,_0x2f695a)=>{const _0x2be4b5=_0x423b2e;for(var _0x3d8590=_0x2f695a>0x1?void 0x0:_0x2f695a?A(_0x3f9239,_0x113931):_0x3f9239,_0x49c512=_0x165d6f[_0x2be4b5(0x19f)]-0x1,_0x5a96be;_0x49c512>=0x0;_0x49c512--)(_0x5a96be=_0x165d6f[_0x49c512])&&(_0x3d8590=_0x5a96be(_0x3d8590)||_0x3d8590);return _0x3d8590;},_=(_0x480c3e,_0x49ea83)=>(_0x281878,_0x59c50c)=>_0x49ea83(_0x281878,_0x59c50c,_0x480c3e);function Y(_0x8dcb6b,_0x572c7a){const _0x2c94e6=_0x423b2e,_0x1ec727=_0x8dcb6b[_0x2c94e6(0x193)][0x0];return{..._0x572c7a,'id':_0x1ec727[_0x2c94e6(0x1d2)],'resolved':_0x8dcb6b[_0x2c94e6(0x1bf)]===0x1,'dT':f(_0x1ec727[_0x2c94e6(0x1ae)]),'personId':_0x1ec727[_0x2c94e6(0x1df)],'threadId':_0x1ec727['threadId']};}function G(_0x1219a3,_0x5d08b8,_0x204369){const _0x156f16=_0x423b2e;var _0x3bb440,_0x4d72b8;if(((_0x4d72b8=(_0x3bb440=_0x1219a3==null?void 0x0:_0x1219a3[_0x156f16(0x193)])==null?void 0x0:_0x3bb440[_0x156f16(0x19f)])!=null?_0x4d72b8:0x0)>0x0){const _0xa45b22=(_0x5df743,_0x3114a5)=>({'id':_0x5df743[_0x156f16(0x1d2)],'threadId':_0x5df743[_0x156f16(0x1b5)],'dT':f(_0x5df743['createTimestamp']),'personId':_0x5df743[_0x156f16(0x1df)],'resolved':_0x1219a3[_0x156f16(0x1bf)]===I[_0x156f16(0x1f2)],'unitId':_0x5d08b8,'subUnitId':_0x204369,'text':JSON['parse'](_0x5df743['content']),'parentId':_0x3114a5}),_0xb9ae43=_0xa45b22(_0x1219a3[_0x156f16(0x193)][0x0]);return{..._0xb9ae43,'children':_0x1219a3['replies'][_0x156f16(0x206)](0x1)[_0x156f16(0x1c1)](_0x487edc=>_0xa45b22(_0x487edc,_0xb9ae43['id']))};}return null;}let g=class{constructor(_0x47b7d3,_0x5e8683,_0x1340f3,_0x3bc2a7){const _0x823bbf=_0x423b2e;this['_httpService']=_0x47b7d3,this[_0x823bbf(0x1a4)]=_0x5e8683,this['_sessionService']=_0x1340f3,this[_0x823bbf(0x1cc)]=_0x3bc2a7;}async[_0x423b2e(0x1cf)](_0x5e0822){const _0xf03f13=_0x423b2e;var _0xea50c1,_0x1bdf8e;const {parentId:_0x30c70e,unitId:_0xbab247,text:_0x35a00c,threadId:_0x161729}=_0x5e0822,_0x1d13d3=(_0x1bdf8e=(_0xea50c1=_0x35a00c[_0xf03f13(0x203)])==null?void 0x0:_0xea50c1[_0xf03f13(0x1fd)](_0x3f1b2d=>_0x3f1b2d[_0xf03f13(0x1b0)]===c[_0xf03f13(0x19d)]['COMMENT'])[_0xf03f13(0x1c1)](_0x1c0093=>_0x1c0093['rangeId']))!=null?_0x1bdf8e:[],_0x3d059a=JSON['stringify'](_0x35a00c),_0x193c25=(await this[_0xf03f13(0x1e4)][_0xf03f13(0x1d3)](_0xbab247))[_0xf03f13(0x1b3)]();if(_0x30c70e){const _0x7b4ef1={'memberId':_0x193c25,'unitId':_0xbab247,'content':_0x3d059a,'mention':_0x1d13d3,'threadId':_0x161729},_0x409a37=(await this[_0xf03f13(0x18d)][_0xf03f13(0x1be)](_0xf03f13(0x1ed)+_0xbab247+'/reply',{'body':_0x7b4ef1}))['body'][_0xf03f13(0x1d9)];return{..._0x5e0822,'id':_0x409a37['replyId'],'dT':c['dayjs'](+_0x409a37[_0xf03f13(0x1ae)])['format'](_0xf03f13(0x202)),'personId':_0x409a37[_0xf03f13(0x1df)]};}else{const _0x1e0dc8={'memberId':_0x193c25,'unitId':_0xbab247,'content':_0x3d059a,'mention':_0x1d13d3},_0x2141d5=await this[_0xf03f13(0x18d)][_0xf03f13(0x1be)](_0xf03f13(0x1ed)+_0xbab247+'/add',{'body':_0x1e0dc8});return Y(_0x2141d5[_0xf03f13(0x207)]['comment'],_0x5e0822);}}async[_0x423b2e(0x1f6)](_0x5a545e){const _0x1185ad=_0x423b2e;var _0x1b479f,_0x1a0b18;const {text:_0x9b641f,unitId:_0x5dba18}=_0x5a545e,_0x54c8a8=(_0x1a0b18=(_0x1b479f=_0x9b641f['customRanges'])==null?void 0x0:_0x1b479f[_0x1185ad(0x1fd)](_0x26c5a1=>_0x26c5a1[_0x1185ad(0x1b0)]===c[_0x1185ad(0x19d)][_0x1185ad(0x1f5)])[_0x1185ad(0x1c1)](_0x348e49=>_0x348e49[_0x1185ad(0x1b8)]))!=null?_0x1a0b18:[],_0x2a86b3=JSON[_0x1185ad(0x1c7)](_0x9b641f),_0x2ef3cd=_0x5a545e[_0x1185ad(0x1b5)],_0x262916=_0x5a545e['id'],_0x340ab5={'memberId':(await this[_0x1185ad(0x1e4)][_0x1185ad(0x1d3)](_0x5dba18))[_0x1185ad(0x1b3)](),'unitId':_0x5dba18,'threadId':_0x2ef3cd,'mention':_0x54c8a8,'content':_0x2a86b3,'replyId':_0x262916},_0x41cf37=await this['_httpService'][_0x1185ad(0x1be)](_0x1185ad(0x1ed)+_0x5dba18+_0x1185ad(0x209),{'body':_0x340ab5});return!_0x41cf37[_0x1185ad(0x207)][_0x1185ad(0x1b9)]||_0x41cf37[_0x1185ad(0x207)][_0x1185ad(0x1b9)]['code']===0x1;}async[_0x423b2e(0x1fa)](_0x151f7a){const _0xb5ed5b=_0x423b2e,{unitId:_0x1c1381}=_0x151f7a,_0x23b245=_0x151f7a['threadId'],_0x29f3a4={'memberId':this[_0xb5ed5b(0x1a4)]['getCurrentUser']()[_0xb5ed5b(0x1d8)],'unitId':_0x1c1381,'threadId':_0x23b245,'solved':_0x151f7a[_0xb5ed5b(0x18e)]?I[_0xb5ed5b(0x1f2)]:I[_0xb5ed5b(0x1d6)]},_0x3473a2=await this[_0xb5ed5b(0x18d)][_0xb5ed5b(0x1be)]('/universer-api/comment/unit/'+_0x1c1381+_0xb5ed5b(0x194),{'body':_0x29f3a4});return!_0x3473a2[_0xb5ed5b(0x207)]['error']||_0x3473a2['body'][_0xb5ed5b(0x1b9)][_0xb5ed5b(0x1cb)]===0x1;}async[_0x423b2e(0x1ee)](_0x15c639,_0xdb1752,_0x2cf6c8,_0x341cbd){const _0x2f6242=_0x423b2e,_0x2f3750={'memberId':(await this[_0x2f6242(0x1e4)][_0x2f6242(0x1d3)](_0x15c639))[_0x2f6242(0x1b3)](),'threadId':_0x2cf6c8,'replyId':_0x341cbd,'unitId':_0x15c639},_0xc268a=await this['_httpService'][_0x2f6242(0x1be)](_0x2f6242(0x1ed)+_0x15c639+'/delete',{'body':_0x2f3750});return!_0xc268a[_0x2f6242(0x207)][_0x2f6242(0x1b9)]||_0xc268a['body'][_0x2f6242(0x1b9)]['code']===0x1;}async[_0x423b2e(0x1e0)](_0x2b14ed,_0x40d748,_0x503826){const _0x38e25b=_0x423b2e,_0x3960c1={'unitId':_0x2b14ed,'threadId':_0x503826},_0x18d6b6=await this['_httpService'][_0x38e25b(0x1be)](_0x38e25b(0x1ed)+_0x2b14ed+_0x38e25b(0x1bb),{'body':_0x3960c1}),_0x10a41b=_0x503826[_0x38e25b(0x1c1)](_0x4ae1ee=>G(_0x18d6b6[_0x38e25b(0x207)][_0x38e25b(0x1fb)][_0x4ae1ee],_0x2b14ed,_0x40d748))['filter'](Boolean);return Object[_0x38e25b(0x1a9)](_0x18d6b6[_0x38e25b(0x207)][_0x38e25b(0x19b)])['forEach'](_0x4047fc=>{const _0x22c347=_0x38e25b;this[_0x22c347(0x1a4)]['addUser'](_0x4047fc);}),_0x10a41b;}[_0x423b2e(0x1a3)](_0x5c5174){const _0x1aea9c=_0x423b2e;return{'id':_0x5c5174['id'],'threadId':_0x5c5174[_0x1aea9c(0x1b5)],'ref':_0x5c5174[_0x1aea9c(0x1f1)]};}};g=x([_(0x0,c[_0x423b2e(0x1f9)](P[_0x423b2e(0x199)])),_(0x1,c[_0x423b2e(0x1f9)](c['UserManagerService'])),_(0x2,c[_0x423b2e(0x1f9)](b[_0x423b2e(0x201)])),_(0x3,c[_0x423b2e(0x1f9)](c[_0x423b2e(0x195)]))],g);var H=Object[_0x423b2e(0x1ea)],J=(_0x49b545,_0x4e7f0f,_0x2d384a,_0x2fde4b)=>{const _0x3f4474=_0x423b2e;for(var _0x30472b=_0x2fde4b>0x1?void 0x0:_0x2fde4b?H(_0x4e7f0f,_0x2d384a):_0x4e7f0f,_0x372321=_0x49b545[_0x3f4474(0x19f)]-0x1,_0x3d0178;_0x372321>=0x0;_0x372321--)(_0x3d0178=_0x49b545[_0x372321])&&(_0x30472b=_0x3d0178(_0x30472b)||_0x30472b);return _0x30472b;},y=(_0xe9c683,_0x5da431)=>(_0x41b4c7,_0x32d73f)=>_0x5da431(_0x41b4c7,_0x32d73f,_0xe9c683);let C=class extends c[_0x423b2e(0x1d0)]{constructor(_0x6ec03c,_0x57e70e){const _0x133f5f=_0x423b2e;super(),this['_threadCommentDataSourceService']=_0x6ec03c,this[_0x133f5f(0x192)]=_0x57e70e,this[_0x133f5f(0x1a6)]();}['_initDataSource'](){const _0x476039=_0x423b2e;this[_0x476039(0x18c)]['dataSource']=this[_0x476039(0x192)],this[_0x476039(0x18c)][_0x476039(0x1e8)]=!0x1;}};C=J([y(0x0,M[_0x423b2e(0x1a8)]),y(0x1,c[_0x423b2e(0x1f9)](g))],C);var F=Object[_0x423b2e(0x1d7)],L=Object[_0x423b2e(0x1ea)],Z=(_0x1cd2ff,_0x1a7920,_0x265a07)=>_0x1a7920 in _0x1cd2ff?F(_0x1cd2ff,_0x1a7920,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x265a07}):_0x1cd2ff[_0x1a7920]=_0x265a07,W=(_0x162a3f,_0x4cd38e,_0x5eb2eb,_0x4cba4c)=>{const _0x5c2e4e=_0x423b2e;for(var _0xf6b3fb=_0x4cba4c>0x1?void 0x0:_0x4cba4c?L(_0x4cd38e,_0x5eb2eb):_0x4cd38e,_0x1c0545=_0x162a3f[_0x5c2e4e(0x19f)]-0x1,_0x199f31;_0x1c0545>=0x0;_0x1c0545--)(_0x199f31=_0x162a3f[_0x1c0545])&&(_0xf6b3fb=_0x199f31(_0xf6b3fb)||_0xf6b3fb);return _0xf6b3fb;},O=(_0x1d244e,_0x5e85e2)=>(_0x220a0a,_0x3068a5)=>_0x5e85e2(_0x220a0a,_0x3068a5,_0x1d244e),N=(_0x7f7a20,_0x42b7ac,_0x179dbd)=>Z(_0x7f7a20,typeof _0x42b7ac!=_0x423b2e(0x1ab)?_0x42b7ac+'':_0x42b7ac,_0x179dbd);exports[_0x423b2e(0x1ff)]=class extends c[_0x423b2e(0x1ad)]{constructor(_0x19ba7b=D,_0x2b97da,_0x4e03fc){const _0x28770e=_0x423b2e;super(),this[_0x28770e(0x1bd)]=_0x19ba7b,this[_0x28770e(0x1cc)]=_0x2b97da,this[_0x28770e(0x1e9)]=_0x4e03fc;const {..._0x42fc72}=c[_0x28770e(0x1c5)]({},D,this['_config']);this[_0x28770e(0x1e9)]['setConfig'](q,_0x42fc72);}[_0x423b2e(0x1a1)](){const _0x41369d=_0x423b2e;[[g],[C],[p]][_0x41369d(0x1ca)](_0xa02cfb=>{const _0x5d2c51=_0x41369d;this['_injector'][_0x5d2c51(0x205)](_0xa02cfb);});}[_0x423b2e(0x1d1)](){const _0x43f829=_0x423b2e;this[_0x43f829(0x1cc)][_0x43f829(0x1c9)](C),this['_injector'][_0x43f829(0x1c9)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x423b2e(0x190),U),N(exports[_0x423b2e(0x1ff)],_0x423b2e(0x1e7),c[_0x423b2e(0x1fe)][_0x423b2e(0x1f3)]),exports[_0x423b2e(0x1ff)]=W([c[_0x423b2e(0x1dd)](j['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x423b2e(0x19a)]),O(0x1,c[_0x423b2e(0x1f9)](c['Injector'])),O(0x2,c[_0x423b2e(0x1bc)])],exports[_0x423b2e(0x1ff)]);
|
|
1
|
+
'use strict';const _0x115ab7=_0x5725;(function(_0x1e0bae,_0xa9a9f0){const _0x1822dd=_0x5725,_0x2c9e10=_0x1e0bae();while(!![]){try{const _0x36006c=-parseInt(_0x1822dd(0x22e))/0x1+parseInt(_0x1822dd(0x1fe))/0x2*(parseInt(_0x1822dd(0x268))/0x3)+parseInt(_0x1822dd(0x1fa))/0x4*(parseInt(_0x1822dd(0x204))/0x5)+-parseInt(_0x1822dd(0x1f6))/0x6*(-parseInt(_0x1822dd(0x211))/0x7)+parseInt(_0x1822dd(0x236))/0x8*(parseInt(_0x1822dd(0x231))/0x9)+parseInt(_0x1822dd(0x1f3))/0xa+-parseInt(_0x1822dd(0x258))/0xb;if(_0x36006c===_0xa9a9f0)break;else _0x2c9e10['push'](_0x2c9e10['shift']());}catch(_0x2b7b23){_0x2c9e10['push'](_0x2c9e10['shift']());}}}(_0x486e,0x8315b));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x115ab7(0x217)});function _0x5725(_0x5653db,_0x154d51){const _0x486e47=_0x486e();return _0x5725=function(_0x572522,_0x18cae7){_0x572522=_0x572522-0x1e8;let _0x13f5b7=_0x486e47[_0x572522];return _0x13f5b7;},_0x5725(_0x5653db,_0x154d51);}const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require(_0x115ab7(0x1f7)),M=require(_0x115ab7(0x26d)),w=require(_0x115ab7(0x251)),P=require(_0x115ab7(0x1e9)),U=_0x115ab7(0x225);var I=(_0x2fdcc2=>(_0x2fdcc2[_0x2fdcc2[_0x115ab7(0x1f1)]=0x0]='OpenOrReOpen',_0x2fdcc2[_0x2fdcc2[_0x115ab7(0x21b)]=0x1]=_0x115ab7(0x21b),_0x2fdcc2[_0x2fdcc2[_0x115ab7(0x22a)]=-0x1]=_0x115ab7(0x22a),_0x2fdcc2))(I||{}),v=(_0x594017=>(_0x594017[_0x594017['Unknown']=0x0]=_0x115ab7(0x259),_0x594017[_0x594017[_0x115ab7(0x1fb)]=0x1]=_0x115ab7(0x1fb),_0x594017[_0x594017[_0x115ab7(0x247)]=0x2]=_0x115ab7(0x247),_0x594017[_0x594017[_0x115ab7(0x24b)]=0x3]=_0x115ab7(0x24b),_0x594017[_0x594017[_0x115ab7(0x250)]=0x4]=_0x115ab7(0x250),_0x594017[_0x594017[_0x115ab7(0x203)]=0x5]=_0x115ab7(0x203),_0x594017[_0x594017[_0x115ab7(0x22a)]=-0x1]=_0x115ab7(0x22a),_0x594017))(v||{});const f=_0x359066=>c[_0x115ab7(0x266)](new Date(+_0x359066))[_0x115ab7(0x20a)](_0x115ab7(0x210)),R=async(_0x8c682e,_0x2d616b)=>{const _0x22ec69=_0x115ab7,_0xc23481=_0x8c682e[_0x22ec69(0x21e)](c['UserManagerService']),_0x51bbce=_0x8c682e[_0x22ec69(0x21e)](P[_0x22ec69(0x24e)]);_0x2d616b['forEach'](_0x2dae2c=>{const _0x2d42ac=_0x22ec69;_0xc23481[_0x2d42ac(0x216)](_0x2dae2c)&&_0x2d616b[_0x2d42ac(0x1f4)](_0x2dae2c);}),_0x2d616b[_0x22ec69(0x239)]&&(await _0x51bbce[_0x22ec69(0x21e)](_0x22ec69(0x238),{'params':{'userIDs':[..._0x2d616b]}}))[_0x22ec69(0x25e)][_0x22ec69(0x20c)]['forEach'](_0x55c7a4=>{const _0x8f126b=_0x22ec69;_0x55c7a4&&_0xc23481[_0x8f126b(0x226)](_0x55c7a4);});};var $=Object[_0x115ab7(0x23d)],E=(_0x558e27,_0x43e14d,_0x295484,_0x28e870)=>{const _0x297dcc=_0x115ab7;for(var _0x4c9d86=_0x28e870>0x1?void 0x0:_0x28e870?$(_0x43e14d,_0x295484):_0x43e14d,_0x3924cd=_0x558e27[_0x297dcc(0x222)]-0x1,_0x44bbef;_0x3924cd>=0x0;_0x3924cd--)(_0x44bbef=_0x558e27[_0x3924cd])&&(_0x4c9d86=_0x44bbef(_0x4c9d86)||_0x4c9d86);return _0x4c9d86;},S=(_0x1e986c,_0x26c25d)=>(_0x5bcb28,_0x586aad)=>_0x26c25d(_0x5bcb28,_0x586aad,_0x1e986c);let p=class extends c[_0x115ab7(0x1f0)]{constructor(_0x27f1ee,_0x196f63,_0x447464,_0x1e8a4f){const _0x2430c7=_0x115ab7;super(),this[_0x2430c7(0x264)]=_0x27f1ee,this[_0x2430c7(0x1ef)]=_0x196f63,this['_userService']=_0x447464,this['_injector']=_0x1e8a4f,this['_init'](),this[_0x2430c7(0x212)]();}[_0x115ab7(0x212)](){const _0x153cec=_0x115ab7;this[_0x153cec(0x22d)](this[_0x153cec(0x1ef)][_0x153cec(0x20e)]['pipe'](w[_0x153cec(0x23a)](0x10))[_0x153cec(0x25b)](_0x250a70=>{const _0x1d6d73=_0x153cec,_0x40a42c=new Set();_0x250a70[_0x1d6d73(0x263)](_0xfeec2e=>{const _0x5d288f=_0x1d6d73;switch(_0xfeec2e[_0x5d288f(0x220)]){case'add':{const _0x543761=_0xfeec2e[_0x5d288f(0x252)][_0x5d288f(0x260)];_0x40a42c[_0x5d288f(0x246)](_0x543761);break;}}}),R(this[_0x1d6d73(0x249)],_0x40a42c);}));}[_0x115ab7(0x21a)](){const _0x3c721e=_0x115ab7;this['disposeWithMe'](this[_0x3c721e(0x264)][_0x3c721e(0x20e)]['subscribe'](async _0x524362=>{const _0x220abb=_0x3c721e;var _0x4aab8e,_0x54366f,_0x1ef2fc,_0x1b5ce9;const _0x5c9723=(_0x4aab8e=this['_threadCommentModel'][_0x220abb(0x25f)](_0x524362[_0x220abb(0x24c)])[_0x220abb(0x229)](_0x356a8a=>_0x356a8a['threadId']===_0x524362[_0x220abb(0x261)]))==null?void 0x0:_0x4aab8e[_0x220abb(0x21f)];if(!_0x5c9723)return;const {unitId:_0x3b7dbd,subUnitId:_0x3645b6}=_0x5c9723;switch(_0x524362[_0x220abb(0x206)]&&this[_0x220abb(0x224)]['addUser'](_0x524362[_0x220abb(0x206)]),_0x524362[_0x220abb(0x220)]){case v[_0x220abb(0x1fb)]:break;case v['Reply']:{this[_0x220abb(0x1ef)][_0x220abb(0x23c)](_0x3b7dbd,_0x3645b6,{'unitId':_0x3b7dbd,'subUnitId':_0x3645b6,'ref':'','id':_0x524362[_0x220abb(0x26b)],'dT':f(+_0x524362[_0x220abb(0x256)]),'threadId':_0x524362[_0x220abb(0x261)],'personId':(_0x1ef2fc=(_0x54366f=_0x524362[_0x220abb(0x206)])==null?void 0x0:_0x54366f[_0x220abb(0x262)])!=null?_0x1ef2fc:_0x524362[_0x220abb(0x209)],'text':JSON[_0x220abb(0x240)](_0x524362['content']),'parentId':_0x5c9723['id']});break;}case v[_0x220abb(0x250)]:{const _0x11b978=this['_threadCommentModel'][_0x220abb(0x269)](_0x3b7dbd,_0x3645b6,_0x524362[_0x220abb(0x26b)]);_0x11b978&&_0x11b978['parentId']&&this[_0x220abb(0x1ef)][_0x220abb(0x230)](_0x3b7dbd,_0x3645b6,_0x524362[_0x220abb(0x26b)]);break;}case v[_0x220abb(0x24b)]:{this[_0x220abb(0x1ef)][_0x220abb(0x221)](_0x3b7dbd,_0x3645b6,{'commentId':_0x524362[_0x220abb(0x26b)],'text':JSON[_0x220abb(0x240)](_0x524362[_0x220abb(0x1ff)])});break;}case v[_0x220abb(0x203)]:{const _0x1534a8=(_0x1b5ce9=this[_0x220abb(0x1ef)][_0x220abb(0x25f)](_0x524362[_0x220abb(0x24c)])['find'](_0x36eab1=>_0x36eab1[_0x220abb(0x261)]===_0x524362[_0x220abb(0x261)]))==null?void 0x0:_0x1b5ce9[_0x220abb(0x21f)];_0x1534a8&&this['_threadCommentModel'][_0x220abb(0x1fd)](_0x3b7dbd,_0x3645b6,_0x1534a8['id'],_0x524362[_0x220abb(0x219)]===I[_0x220abb(0x21b)]);break;}}}));}};p=E([S(0x0,c[_0x115ab7(0x24d)](b[_0x115ab7(0x223)])),S(0x1,c[_0x115ab7(0x24d)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x115ab7(0x25d)])),S(0x3,c[_0x115ab7(0x24d)](c['Injector']))],p);const q=_0x115ab7(0x22f),D={};var A=Object[_0x115ab7(0x23d)],x=(_0xac559a,_0x192cf3,_0x2ddab4,_0xe56f05)=>{const _0x12a496=_0x115ab7;for(var _0x5ce218=_0xe56f05>0x1?void 0x0:_0xe56f05?A(_0x192cf3,_0x2ddab4):_0x192cf3,_0x4d8141=_0xac559a[_0x12a496(0x222)]-0x1,_0x2857fb;_0x4d8141>=0x0;_0x4d8141--)(_0x2857fb=_0xac559a[_0x4d8141])&&(_0x5ce218=_0x2857fb(_0x5ce218)||_0x5ce218);return _0x5ce218;},_=(_0x5349ea,_0xe16d3b)=>(_0x2e3688,_0x49f2bf)=>_0xe16d3b(_0x2e3688,_0x49f2bf,_0x5349ea);function Y(_0x5c157e,_0x186906){const _0x265f41=_0x115ab7,_0x4b521c=_0x5c157e[_0x265f41(0x23e)][0x0];return{..._0x186906,'id':_0x4b521c['replyId'],'resolved':_0x5c157e[_0x265f41(0x219)]===0x1,'dT':f(_0x4b521c['createTimestamp']),'personId':_0x4b521c['userId'],'threadId':_0x4b521c['threadId']};}function G(_0x530f33,_0x262db4,_0x4e1356){const _0x7d77f8=_0x115ab7;var _0x540d6a,_0x37e6f5;if(((_0x37e6f5=(_0x540d6a=_0x530f33==null?void 0x0:_0x530f33[_0x7d77f8(0x23e)])==null?void 0x0:_0x540d6a[_0x7d77f8(0x222)])!=null?_0x37e6f5:0x0)>0x0){const _0x15ae20=(_0x3c4b72,_0x2fd86f)=>({'id':_0x3c4b72['replyId'],'threadId':_0x3c4b72['threadId'],'dT':f(_0x3c4b72[_0x7d77f8(0x256)]),'personId':_0x3c4b72[_0x7d77f8(0x209)],'resolved':_0x530f33[_0x7d77f8(0x219)]===I[_0x7d77f8(0x21b)],'unitId':_0x262db4,'subUnitId':_0x4e1356,'text':JSON[_0x7d77f8(0x240)](_0x3c4b72[_0x7d77f8(0x1ff)]),'parentId':_0x2fd86f}),_0x39d1ce=_0x15ae20(_0x530f33[_0x7d77f8(0x23e)][0x0]);return{..._0x39d1ce,'children':_0x530f33[_0x7d77f8(0x23e)][_0x7d77f8(0x265)](0x1)['map'](_0x5ea7ef=>_0x15ae20(_0x5ea7ef,_0x39d1ce['id']))};}return null;}let g=class{constructor(_0x2f05ed,_0x4c7de2,_0x78893a,_0x4f02af){const _0x33b693=_0x115ab7;this[_0x33b693(0x200)]=_0x2f05ed,this[_0x33b693(0x224)]=_0x4c7de2,this[_0x33b693(0x207)]=_0x78893a,this['_injector']=_0x4f02af;}async[_0x115ab7(0x23c)](_0x53ac95){const _0xc88fd2=_0x115ab7;var _0xa0cf9c,_0x4a5542;const {parentId:_0x317716,unitId:_0x3bb78b,text:_0x26b1a8,threadId:_0x54355d}=_0x53ac95,_0x5031ec=(_0x4a5542=(_0xa0cf9c=_0x26b1a8[_0xc88fd2(0x1ec)])==null?void 0x0:_0xa0cf9c['filter'](_0x3a8db0=>_0x3a8db0[_0xc88fd2(0x22c)]===c[_0xc88fd2(0x21c)][_0xc88fd2(0x1f5)])['map'](_0xd4320c=>_0xd4320c[_0xc88fd2(0x26c)]))!=null?_0x4a5542:[],_0x358f50=JSON[_0xc88fd2(0x20f)](_0x26b1a8),_0x5ccbbb=(await this[_0xc88fd2(0x207)][_0xc88fd2(0x235)](_0x3bb78b))[_0xc88fd2(0x213)]();if(_0x317716){const _0x49961b={'memberId':_0x5ccbbb,'unitId':_0x3bb78b,'content':_0x358f50,'mention':_0x5031ec,'threadId':_0x54355d},_0x45d93a=(await this[_0xc88fd2(0x200)]['post'](_0xc88fd2(0x228)+_0x3bb78b+_0xc88fd2(0x1fc),{'body':_0x49961b}))[_0xc88fd2(0x25e)][_0xc88fd2(0x1ed)];return{..._0x53ac95,'id':_0x45d93a['replyId'],'dT':c[_0xc88fd2(0x266)](+_0x45d93a['createTimestamp'])[_0xc88fd2(0x20a)](_0xc88fd2(0x210)),'personId':_0x45d93a[_0xc88fd2(0x209)]};}else{const _0x3eed09={'memberId':_0x5ccbbb,'unitId':_0x3bb78b,'content':_0x358f50,'mention':_0x5031ec},_0x60955b=await this[_0xc88fd2(0x200)][_0xc88fd2(0x1f2)](_0xc88fd2(0x228)+_0x3bb78b+_0xc88fd2(0x23b),{'body':_0x3eed09});return Y(_0x60955b[_0xc88fd2(0x25e)][_0xc88fd2(0x1ee)],_0x53ac95);}}async[_0x115ab7(0x221)](_0x34c480){const _0x1b14f1=_0x115ab7;var _0x27b426,_0x5ac05c;const {text:_0x35eecc,unitId:_0x2e3b2f}=_0x34c480,_0x461433=(_0x5ac05c=(_0x27b426=_0x35eecc[_0x1b14f1(0x1ec)])==null?void 0x0:_0x27b426[_0x1b14f1(0x241)](_0x50c230=>_0x50c230['rangeType']===c[_0x1b14f1(0x21c)][_0x1b14f1(0x1f5)])[_0x1b14f1(0x25c)](_0x20d523=>_0x20d523[_0x1b14f1(0x26c)]))!=null?_0x5ac05c:[],_0x2842af=JSON[_0x1b14f1(0x20f)](_0x35eecc),_0x1e673d=_0x34c480[_0x1b14f1(0x261)],_0x4ff7be=_0x34c480['id'],_0x3ded1d={'memberId':(await this[_0x1b14f1(0x207)][_0x1b14f1(0x235)](_0x2e3b2f))[_0x1b14f1(0x213)](),'unitId':_0x2e3b2f,'threadId':_0x1e673d,'mention':_0x461433,'content':_0x2842af,'replyId':_0x4ff7be},_0x35924d=await this[_0x1b14f1(0x200)][_0x1b14f1(0x1f2)](_0x1b14f1(0x228)+_0x2e3b2f+'/edit',{'body':_0x3ded1d});return!_0x35924d[_0x1b14f1(0x25e)][_0x1b14f1(0x208)]||_0x35924d[_0x1b14f1(0x25e)][_0x1b14f1(0x208)][_0x1b14f1(0x20d)]===0x1;}async[_0x115ab7(0x1fd)](_0x544431){const _0x51d017=_0x115ab7,{unitId:_0x503a1b}=_0x544431,_0x20f1fb=_0x544431[_0x51d017(0x261)],_0x380ca3={'memberId':this[_0x51d017(0x224)][_0x51d017(0x253)]()['userID'],'unitId':_0x503a1b,'threadId':_0x20f1fb,'solved':_0x544431[_0x51d017(0x242)]?I[_0x51d017(0x21b)]:I[_0x51d017(0x1f1)]},_0x261e56=await this[_0x51d017(0x200)][_0x51d017(0x1f2)](_0x51d017(0x228)+_0x503a1b+_0x51d017(0x201),{'body':_0x380ca3});return!_0x261e56[_0x51d017(0x25e)]['error']||_0x261e56[_0x51d017(0x25e)][_0x51d017(0x208)][_0x51d017(0x20d)]===0x1;}async[_0x115ab7(0x230)](_0x2f70dc,_0x1e6334,_0x5c0842,_0x181a12){const _0x1e6e3e=_0x115ab7,_0x4b17a0={'memberId':(await this[_0x1e6e3e(0x207)][_0x1e6e3e(0x235)](_0x2f70dc))[_0x1e6e3e(0x213)](),'threadId':_0x5c0842,'replyId':_0x181a12,'unitId':_0x2f70dc},_0x19ac5=await this['_httpService'][_0x1e6e3e(0x1f2)](_0x1e6e3e(0x228)+_0x2f70dc+_0x1e6e3e(0x243),{'body':_0x4b17a0});return!_0x19ac5['body'][_0x1e6e3e(0x208)]||_0x19ac5['body']['error'][_0x1e6e3e(0x20d)]===0x1;}async[_0x115ab7(0x1ea)](_0x172694,_0x29989a,_0x152cae){const _0x1cbbda=_0x115ab7,_0x4abb74={'unitId':_0x172694,'threadId':_0x152cae},_0x5ac064=await this[_0x1cbbda(0x200)]['post'](_0x1cbbda(0x228)+_0x172694+'/list',{'body':_0x4abb74}),_0x8ed1f6=_0x152cae['map'](_0xe5fedd=>G(_0x5ac064['body'][_0x1cbbda(0x1eb)][_0xe5fedd],_0x172694,_0x29989a))[_0x1cbbda(0x241)](Boolean);return Object[_0x1cbbda(0x267)](_0x5ac064['body'][_0x1cbbda(0x20c)])[_0x1cbbda(0x263)](_0x2c69e4=>{const _0x3ebd75=_0x1cbbda;this[_0x3ebd75(0x224)][_0x3ebd75(0x226)](_0x2c69e4);}),_0x8ed1f6;}[_0x115ab7(0x233)](_0x562899){return{'id':_0x562899['id'],'threadId':_0x562899['threadId'],'ref':_0x562899['ref']};}};g=x([_(0x0,c['Inject'](P[_0x115ab7(0x24e)])),_(0x1,c[_0x115ab7(0x24d)](c[_0x115ab7(0x25d)])),_(0x2,c[_0x115ab7(0x24d)](b[_0x115ab7(0x257)])),_(0x3,c[_0x115ab7(0x24d)](c[_0x115ab7(0x1f8)]))],g);var H=Object[_0x115ab7(0x23d)],J=(_0x3e2f3e,_0x927222,_0x5f0e00,_0x5af020)=>{const _0x13f0db=_0x115ab7;for(var _0x51020e=_0x5af020>0x1?void 0x0:_0x5af020?H(_0x927222,_0x5f0e00):_0x927222,_0x52ae40=_0x3e2f3e[_0x13f0db(0x222)]-0x1,_0x381e7f;_0x52ae40>=0x0;_0x52ae40--)(_0x381e7f=_0x3e2f3e[_0x52ae40])&&(_0x51020e=_0x381e7f(_0x51020e)||_0x51020e);return _0x51020e;},y=(_0x4948ee,_0x4b3a14)=>(_0x4ea3c4,_0x29103d)=>_0x4b3a14(_0x4ea3c4,_0x29103d,_0x4948ee);let C=class extends c[_0x115ab7(0x1f0)]{constructor(_0x4a95db,_0x115a20){const _0x858b8d=_0x115ab7;super(),this['_threadCommentDataSourceService']=_0x4a95db,this[_0x858b8d(0x248)]=_0x115a20,this['_initDataSource']();}[_0x115ab7(0x20b)](){const _0x1a0bc1=_0x115ab7;this[_0x1a0bc1(0x245)][_0x1a0bc1(0x255)]=this[_0x1a0bc1(0x248)],this[_0x1a0bc1(0x245)][_0x1a0bc1(0x23f)]=!0x1;}};C=J([y(0x0,M[_0x115ab7(0x1e8)]),y(0x1,c[_0x115ab7(0x24d)](g))],C);var F=Object[_0x115ab7(0x24f)],L=Object[_0x115ab7(0x23d)],Z=(_0x4b5c9f,_0x59f114,_0x27b8ef)=>_0x59f114 in _0x4b5c9f?F(_0x4b5c9f,_0x59f114,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x27b8ef}):_0x4b5c9f[_0x59f114]=_0x27b8ef,W=(_0x5dcc13,_0x3b6c39,_0x503855,_0x4a2d2d)=>{const _0x5a2734=_0x115ab7;for(var _0x541791=_0x4a2d2d>0x1?void 0x0:_0x4a2d2d?L(_0x3b6c39,_0x503855):_0x3b6c39,_0x41436d=_0x5dcc13[_0x5a2734(0x222)]-0x1,_0x10efc0;_0x41436d>=0x0;_0x41436d--)(_0x10efc0=_0x5dcc13[_0x41436d])&&(_0x541791=_0x10efc0(_0x541791)||_0x541791);return _0x541791;},O=(_0x153995,_0x14f635)=>(_0x545c7d,_0x2f1da7)=>_0x14f635(_0x545c7d,_0x2f1da7,_0x153995),N=(_0x37c1d5,_0x56bcbd,_0x3c1775)=>Z(_0x37c1d5,typeof _0x56bcbd!=_0x115ab7(0x244)?_0x56bcbd+'':_0x56bcbd,_0x3c1775);exports[_0x115ab7(0x254)]=class extends c[_0x115ab7(0x25a)]{constructor(_0x381cc6=D,_0x25bc17,_0x237783){const _0x57631e=_0x115ab7;super(),this[_0x57631e(0x24a)]=_0x381cc6,this[_0x57631e(0x249)]=_0x25bc17,this[_0x57631e(0x237)]=_0x237783;const {..._0x43df38}=c[_0x57631e(0x234)]({},D,this['_config']);this['_configService'][_0x57631e(0x215)](q,_0x43df38);}[_0x115ab7(0x21d)](){[[g],[C],[p]]['forEach'](_0xf82b90=>{const _0x259f26=_0x5725;this['_injector'][_0x259f26(0x246)](_0xf82b90);});}[_0x115ab7(0x202)](){const _0x43f7c1=_0x115ab7;this[_0x43f7c1(0x249)][_0x43f7c1(0x21e)](C),this[_0x43f7c1(0x249)][_0x43f7c1(0x21e)](p);}},N(exports[_0x115ab7(0x254)],_0x115ab7(0x218),U),N(exports[_0x115ab7(0x254)],_0x115ab7(0x220),c[_0x115ab7(0x205)][_0x115ab7(0x227)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x115ab7(0x214)](j[_0x115ab7(0x232)],b[_0x115ab7(0x1f9)],T[_0x115ab7(0x26a)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x115ab7(0x22b)])],exports[_0x115ab7(0x254)]);function _0x486e(){const _0x3b90fa=['replies','syncUpdateMutationToColla','parse','filter','resolved','/delete','symbol','_threadCommentDataSourceService','add','Reply','_threadCommentDataSource','_injector','_config','Edit','unitId','Inject','HTTPService','defineProperty','Delete','rxjs','payload','getCurrentUser','UniverThreadCommentDataSourcePlugin','dataSource','createTimestamp','CollaborationSessionService','16255613zJgQdL','Unknown','Plugin','subscribe','map','UserManagerService','body','getUnit','personId','threadId','userID','forEach','_commentService','slice','dayjs','values','1038354sDtuya','getComment','UniverLicensePlugin','replyId','rangeId','@univerjs/thread-comment','IThreadCommentDataSourceService','@univerjs/network','listComments','comments','customRanges','reply','comment','_threadCommentModel','Disposable','OpenOrReOpen','post','10708420doPToc','delete','COMMENT','6LIOnbe','@univerjs/thread-comment-ui','Injector','UniverCollaborationClientPlugin','2276356nhEfGk','Add','/reply','resolveComment','2jjKUwH','content','_httpService','/solved','onReady','Solve','5AOxZrf','UniverInstanceType','user','_sessionService','error','userId','format','_initDataSource','users','code','commentUpdate$','stringify','YYYY/MM/DD\x20HH:mm','46501zNaceb','_initUserSync','getMemberID','DependentOn','setConfig','getUser','Module','pluginName','solved','_init','Solved','CustomRangeType','onStarting','get','root','type','updateComment','length','CommentService','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','addUser','UNIVER_UNKNOWN','/universer-api/comment/unit/','find','UNRECOGNIZED','IConfigService','rangeType','disposeWithMe','423277gLFpEe','thread-comment-data-source.config','deleteComment','4007619OgiskN','UniverThreadCommentUIPlugin','saveCommentToSnapshot','merge','requireSession','8udnhCy','_configService','/universer-api/user/list','size','bufferTime','/add','addComment','getOwnPropertyDescriptor'];_0x486e=function(){return _0x3b90fa;};return _0x486e();}
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3c5135=_0x3870;(function(_0xf589c2,_0x1e5a0f){const _0x1da3c8=_0x3870,_0x39f498=_0xf589c2();while(!![]){try{const _0x5e72cd=-parseInt(_0x1da3c8(0x1ea))/0x1+-parseInt(_0x1da3c8(0x1df))/0x2+-parseInt(_0x1da3c8(0x20d))/0x3*(-parseInt(_0x1da3c8(0x1e8))/0x4)+parseInt(_0x1da3c8(0x1ec))/0x5*(-parseInt(_0x1da3c8(0x205))/0x6)+-parseInt(_0x1da3c8(0x213))/0x7+-parseInt(_0x1da3c8(0x21d))/0x8*(parseInt(_0x1da3c8(0x1fb))/0x9)+-parseInt(_0x1da3c8(0x1dc))/0xa*(-parseInt(_0x1da3c8(0x239))/0xb);if(_0x5e72cd===_0x1e5a0f)break;else _0x39f498['push'](_0x39f498['shift']());}catch(_0x3ad3c3){_0x39f498['push'](_0x39f498['shift']());}}}(_0x589f,0xbdb36));import{CommentService as _0x88e89,CollaborationSessionService as _0x5838b0,UniverCollaborationClientPlugin as _0x3a92c5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x527155}from'@univerjs-pro/license';import{dayjs as _0x4b45c4,UserManagerService as _0x186a88,Inject as _0x32221b,Injector as _0x111326,Disposable as _0x2d16e4,CustomRangeType as _0x59243c,UniverInstanceType as _0x128927,DependentOn as _0xb3f9ba,IConfigService as _0x4900d6,Plugin as _0x56778d,merge as _0x524225}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x29173f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x403e63,IThreadCommentDataSourceService as _0x4c88ca}from'@univerjs/thread-comment';import{bufferTime as _0x52175c}from'rxjs';import{HTTPService as _0xaaaee1}from'@univerjs/network';const W=_0x3c5135(0x1f9);var I=(_0x4fa48b=>(_0x4fa48b[_0x4fa48b['OpenOrReOpen']=0x0]=_0x3c5135(0x1e9),_0x4fa48b[_0x4fa48b[_0x3c5135(0x214)]=0x1]='Solved',_0x4fa48b[_0x4fa48b[_0x3c5135(0x20f)]=-0x1]='UNRECOGNIZED',_0x4fa48b))(I||{}),v=(_0x1d24bb=>(_0x1d24bb[_0x1d24bb['Unknown']=0x0]=_0x3c5135(0x233),_0x1d24bb[_0x1d24bb[_0x3c5135(0x228)]=0x1]=_0x3c5135(0x228),_0x1d24bb[_0x1d24bb[_0x3c5135(0x1f7)]=0x2]=_0x3c5135(0x1f7),_0x1d24bb[_0x1d24bb[_0x3c5135(0x21b)]=0x3]=_0x3c5135(0x21b),_0x1d24bb[_0x1d24bb[_0x3c5135(0x235)]=0x4]='Delete',_0x1d24bb[_0x1d24bb[_0x3c5135(0x234)]=0x5]=_0x3c5135(0x234),_0x1d24bb[_0x1d24bb[_0x3c5135(0x20f)]=-0x1]=_0x3c5135(0x20f),_0x1d24bb))(v||{});const D=_0x4f7e37=>_0x4b45c4(new Date(+_0x4f7e37))[_0x3c5135(0x1f5)](_0x3c5135(0x226)),B=async(_0x440d64,_0x4db659)=>{const _0x4d1164=_0x3c5135,_0x24ee7e=_0x440d64[_0x4d1164(0x222)](_0x186a88),_0x126f20=_0x440d64[_0x4d1164(0x222)](_0xaaaee1);_0x4db659[_0x4d1164(0x212)](_0x5c10f8=>{const _0x348397=_0x4d1164;_0x24ee7e['getUser'](_0x5c10f8)&&_0x4db659[_0x348397(0x1fd)](_0x5c10f8);}),_0x4db659[_0x4d1164(0x230)]&&(await _0x126f20[_0x4d1164(0x222)](_0x4d1164(0x215),{'params':{'userIDs':[..._0x4db659]}}))[_0x4d1164(0x238)][_0x4d1164(0x1e6)][_0x4d1164(0x212)](_0x67e1c5=>{_0x67e1c5&&_0x24ee7e['addUser'](_0x67e1c5);});};var K=Object[_0x3c5135(0x1e4)],V=(_0x45df26,_0x3ffa4c,_0x52d654,_0x38ab98)=>{for(var _0x4e462d=_0x38ab98>0x1?void 0x0:_0x38ab98?K(_0x3ffa4c,_0x52d654):_0x3ffa4c,_0x1ae012=_0x45df26['length']-0x1,_0x1d22f1;_0x1ae012>=0x0;_0x1ae012--)(_0x1d22f1=_0x45df26[_0x1ae012])&&(_0x4e462d=_0x1d22f1(_0x4e462d)||_0x4e462d);return _0x4e462d;},p=(_0x21a251,_0x3a5b5e)=>(_0x12860a,_0x1f6bc1)=>_0x3a5b5e(_0x12860a,_0x1f6bc1,_0x21a251);let S=class extends _0x2d16e4{constructor(_0x5aaff0,_0x4b6645,_0x61df03,_0x3a243f){const _0x4ed865=_0x3c5135;super(),this[_0x4ed865(0x1ed)]=_0x5aaff0,this['_threadCommentModel']=_0x4b6645,this['_userService']=_0x61df03,this['_injector']=_0x3a243f,this[_0x4ed865(0x21f)](),this[_0x4ed865(0x20c)]();}[_0x3c5135(0x20c)](){const _0x1fa245=_0x3c5135;this[_0x1fa245(0x223)](this['_threadCommentModel']['commentUpdate$'][_0x1fa245(0x1ff)](_0x52175c(0x10))[_0x1fa245(0x1eb)](_0x564dd8=>{const _0x19e818=_0x1fa245,_0x29f946=new Set();_0x564dd8[_0x19e818(0x212)](_0x29cd07=>{const _0x286ef6=_0x19e818;switch(_0x29cd07[_0x286ef6(0x227)]){case _0x286ef6(0x200):{const _0x43116b=_0x29cd07['payload']['personId'];_0x29f946[_0x286ef6(0x200)](_0x43116b);break;}}}),B(this[_0x19e818(0x1fc)],_0x29f946);}));}[_0x3c5135(0x21f)](){const _0x2ed653=_0x3c5135;this['disposeWithMe'](this[_0x2ed653(0x1ed)][_0x2ed653(0x1f1)][_0x2ed653(0x1eb)](async _0x6c9454=>{const _0x4ef2e9=_0x2ed653;var _0x3c4d5d,_0xe53c3c,_0x2fda70,_0x159ea0;const _0x485b9a=(_0x3c4d5d=this['_threadCommentModel'][_0x4ef2e9(0x207)](_0x6c9454[_0x4ef2e9(0x201)])['find'](_0x210648=>_0x210648[_0x4ef2e9(0x21a)]===_0x6c9454[_0x4ef2e9(0x21a)]))==null?void 0x0:_0x3c4d5d[_0x4ef2e9(0x237)];if(!_0x485b9a)return;const {unitId:_0x344f7e,subUnitId:_0x2b07bb}=_0x485b9a;switch(_0x6c9454['user']&&this[_0x4ef2e9(0x217)]['addUser'](_0x6c9454['user']),_0x6c9454[_0x4ef2e9(0x227)]){case v['Add']:break;case v[_0x4ef2e9(0x1f7)]:{this[_0x4ef2e9(0x1d9)][_0x4ef2e9(0x232)](_0x344f7e,_0x2b07bb,{'unitId':_0x344f7e,'subUnitId':_0x2b07bb,'ref':'','id':_0x6c9454[_0x4ef2e9(0x219)],'dT':D(+_0x6c9454[_0x4ef2e9(0x22b)]),'threadId':_0x6c9454[_0x4ef2e9(0x21a)],'personId':(_0x2fda70=(_0xe53c3c=_0x6c9454['user'])==null?void 0x0:_0xe53c3c[_0x4ef2e9(0x22f)])!=null?_0x2fda70:_0x6c9454['userId'],'text':JSON[_0x4ef2e9(0x22c)](_0x6c9454[_0x4ef2e9(0x22e)]),'parentId':_0x485b9a['id']});break;}case v[_0x4ef2e9(0x235)]:{const _0x153564=this[_0x4ef2e9(0x1d9)][_0x4ef2e9(0x1e0)](_0x344f7e,_0x2b07bb,_0x6c9454[_0x4ef2e9(0x219)]);_0x153564&&_0x153564[_0x4ef2e9(0x1f3)]&&this[_0x4ef2e9(0x1d9)][_0x4ef2e9(0x216)](_0x344f7e,_0x2b07bb,_0x6c9454[_0x4ef2e9(0x219)]);break;}case v[_0x4ef2e9(0x21b)]:{this['_threadCommentModel'][_0x4ef2e9(0x23a)](_0x344f7e,_0x2b07bb,{'commentId':_0x6c9454[_0x4ef2e9(0x219)],'text':JSON[_0x4ef2e9(0x22c)](_0x6c9454['content'])});break;}case v[_0x4ef2e9(0x234)]:{const _0x51609b=(_0x159ea0=this['_threadCommentModel'][_0x4ef2e9(0x207)](_0x6c9454[_0x4ef2e9(0x201)])[_0x4ef2e9(0x224)](_0x458776=>_0x458776[_0x4ef2e9(0x21a)]===_0x6c9454[_0x4ef2e9(0x21a)]))==null?void 0x0:_0x159ea0['root'];_0x51609b&&this[_0x4ef2e9(0x1d9)]['resolveComment'](_0x344f7e,_0x2b07bb,_0x51609b['id'],_0x6c9454[_0x4ef2e9(0x1dd)]===I[_0x4ef2e9(0x214)]);break;}}}));}};S=V([p(0x0,_0x32221b(_0x88e89)),p(0x1,_0x32221b(_0x403e63)),p(0x2,_0x32221b(_0x186a88)),p(0x3,_0x32221b(_0x111326))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x3c5135(0x1e4)],Q=(_0x1eb943,_0xfcac3c,_0x2075fe,_0x5ec63c)=>{for(var _0x2407cb=_0x5ec63c>0x1?void 0x0:_0x5ec63c?k(_0xfcac3c,_0x2075fe):_0xfcac3c,_0x8c097d=_0x1eb943['length']-0x1,_0x43c4f3;_0x8c097d>=0x0;_0x8c097d--)(_0x43c4f3=_0x1eb943[_0x8c097d])&&(_0x2407cb=_0x43c4f3(_0x2407cb)||_0x2407cb);return _0x2407cb;},_=(_0x512a06,_0x1144dc)=>(_0x27bd91,_0x29ad3f)=>_0x1144dc(_0x27bd91,_0x29ad3f,_0x512a06);function X(_0x19bf28,_0xab95db){const _0x1888b7=_0x3c5135,_0x15718b=_0x19bf28[_0x1888b7(0x202)][0x0];return{..._0xab95db,'id':_0x15718b[_0x1888b7(0x219)],'resolved':_0x19bf28['solved']===0x1,'dT':D(_0x15718b[_0x1888b7(0x22b)]),'personId':_0x15718b[_0x1888b7(0x1db)],'threadId':_0x15718b[_0x1888b7(0x21a)]};}function ee(_0x284771,_0x1a3f74,_0x4cd71d){const _0x27bb6=_0x3c5135;var _0x9fbd9d,_0x3dd20c;if(((_0x3dd20c=(_0x9fbd9d=_0x284771==null?void 0x0:_0x284771[_0x27bb6(0x202)])==null?void 0x0:_0x9fbd9d[_0x27bb6(0x20b)])!=null?_0x3dd20c:0x0)>0x0){const _0x5bfdfb=(_0x1e7ce7,_0x3d27a4)=>({'id':_0x1e7ce7[_0x27bb6(0x219)],'threadId':_0x1e7ce7[_0x27bb6(0x21a)],'dT':D(_0x1e7ce7[_0x27bb6(0x22b)]),'personId':_0x1e7ce7['userId'],'resolved':_0x284771[_0x27bb6(0x1dd)]===I['Solved'],'unitId':_0x1a3f74,'subUnitId':_0x4cd71d,'text':JSON[_0x27bb6(0x22c)](_0x1e7ce7[_0x27bb6(0x22e)]),'parentId':_0x3d27a4}),_0x40935b=_0x5bfdfb(_0x284771[_0x27bb6(0x202)][0x0]);return{..._0x40935b,'children':_0x284771[_0x27bb6(0x202)][_0x27bb6(0x1de)](0x1)[_0x27bb6(0x1f0)](_0x4d7dd6=>_0x5bfdfb(_0x4d7dd6,_0x40935b['id']))};}return null;}let f=class{constructor(_0x4a253c,_0x365c6d,_0x2feb75,_0x41793b){const _0x307d6a=_0x3c5135;this[_0x307d6a(0x1f4)]=_0x4a253c,this[_0x307d6a(0x217)]=_0x365c6d,this[_0x307d6a(0x1fa)]=_0x2feb75,this[_0x307d6a(0x1fc)]=_0x41793b;}async['addComment'](_0x263d3b){const _0x47d3a1=_0x3c5135;var _0x267c22,_0x2464e8;const {parentId:_0x211f52,unitId:_0x5a4f06,text:_0x11f849,threadId:_0x3ae703}=_0x263d3b,_0x4b0efd=(_0x2464e8=(_0x267c22=_0x11f849[_0x47d3a1(0x208)])==null?void 0x0:_0x267c22[_0x47d3a1(0x220)](_0x3d4fe0=>_0x3d4fe0[_0x47d3a1(0x236)]===_0x59243c['COMMENT'])['map'](_0x27206b=>_0x27206b['rangeId']))!=null?_0x2464e8:[],_0x143abe=JSON[_0x47d3a1(0x221)](_0x11f849),_0x4b3d4e=(await this[_0x47d3a1(0x1fa)][_0x47d3a1(0x1d8)](_0x5a4f06))[_0x47d3a1(0x203)]();if(_0x211f52){const _0x3dee42={'memberId':_0x4b3d4e,'unitId':_0x5a4f06,'content':_0x143abe,'mention':_0x4b0efd,'threadId':_0x3ae703},_0x20e76c=(await this[_0x47d3a1(0x1f4)]['post'](_0x47d3a1(0x225)+_0x5a4f06+_0x47d3a1(0x1e3),{'body':_0x3dee42}))['body'][_0x47d3a1(0x1fe)];return{..._0x263d3b,'id':_0x20e76c[_0x47d3a1(0x219)],'dT':_0x4b45c4(+_0x20e76c[_0x47d3a1(0x22b)])[_0x47d3a1(0x1f5)](_0x47d3a1(0x226)),'personId':_0x20e76c[_0x47d3a1(0x1db)]};}else{const _0x34046d={'memberId':_0x4b3d4e,'unitId':_0x5a4f06,'content':_0x143abe,'mention':_0x4b0efd},_0x2bb1cb=await this[_0x47d3a1(0x1f4)][_0x47d3a1(0x22d)]('/universer-api/comment/unit/'+_0x5a4f06+_0x47d3a1(0x22a),{'body':_0x34046d});return X(_0x2bb1cb[_0x47d3a1(0x238)][_0x47d3a1(0x1e7)],_0x263d3b);}}async[_0x3c5135(0x23a)](_0x575b70){const _0x16f867=_0x3c5135;var _0xa0702b,_0x14f95a;const {text:_0xa10731,unitId:_0x482b56}=_0x575b70,_0x1bf26e=(_0x14f95a=(_0xa0702b=_0xa10731['customRanges'])==null?void 0x0:_0xa0702b['filter'](_0x1b0ae6=>_0x1b0ae6['rangeType']===_0x59243c[_0x16f867(0x231)])[_0x16f867(0x1f0)](_0x102622=>_0x102622[_0x16f867(0x21e)]))!=null?_0x14f95a:[],_0x2dcc5e=JSON['stringify'](_0xa10731),_0x358060=_0x575b70[_0x16f867(0x21a)],_0x41bce4=_0x575b70['id'],_0x19de1e={'memberId':(await this['_sessionService'][_0x16f867(0x1d8)](_0x482b56))['getMemberID'](),'unitId':_0x482b56,'threadId':_0x358060,'mention':_0x1bf26e,'content':_0x2dcc5e,'replyId':_0x41bce4},_0x38025a=await this[_0x16f867(0x1f4)][_0x16f867(0x22d)](_0x16f867(0x225)+_0x482b56+_0x16f867(0x1f2),{'body':_0x19de1e});return!_0x38025a[_0x16f867(0x238)]['error']||_0x38025a['body'][_0x16f867(0x1f8)][_0x16f867(0x1e2)]===0x1;}async['resolveComment'](_0x3524a5){const _0x6d14be=_0x3c5135,{unitId:_0x550cc3}=_0x3524a5,_0xcc439d=_0x3524a5['threadId'],_0x257b07={'memberId':this['_userService'][_0x6d14be(0x1e5)]()[_0x6d14be(0x22f)],'unitId':_0x550cc3,'threadId':_0xcc439d,'solved':_0x3524a5[_0x6d14be(0x204)]?I[_0x6d14be(0x214)]:I[_0x6d14be(0x1e9)]},_0x1877d0=await this[_0x6d14be(0x1f4)][_0x6d14be(0x22d)](_0x6d14be(0x225)+_0x550cc3+_0x6d14be(0x209),{'body':_0x257b07});return!_0x1877d0[_0x6d14be(0x238)][_0x6d14be(0x1f8)]||_0x1877d0['body'][_0x6d14be(0x1f8)]['code']===0x1;}async[_0x3c5135(0x216)](_0x21826a,_0x5e0e6f,_0x5cc12d,_0x46a834){const _0xe9ab3f=_0x3c5135,_0xa17c5f={'memberId':(await this[_0xe9ab3f(0x1fa)][_0xe9ab3f(0x1d8)](_0x21826a))[_0xe9ab3f(0x203)](),'threadId':_0x5cc12d,'replyId':_0x46a834,'unitId':_0x21826a},_0x2c5599=await this[_0xe9ab3f(0x1f4)]['post'](_0xe9ab3f(0x225)+_0x21826a+_0xe9ab3f(0x20a),{'body':_0xa17c5f});return!_0x2c5599[_0xe9ab3f(0x238)][_0xe9ab3f(0x1f8)]||_0x2c5599[_0xe9ab3f(0x238)][_0xe9ab3f(0x1f8)][_0xe9ab3f(0x1e2)]===0x1;}async['listComments'](_0x2ed9a2,_0x10777e,_0x309b90){const _0x12da2f=_0x3c5135,_0x42c74f={'unitId':_0x2ed9a2,'threadId':_0x309b90},_0x1c353f=await this['_httpService'][_0x12da2f(0x22d)]('/universer-api/comment/unit/'+_0x2ed9a2+'/list',{'body':_0x42c74f}),_0x27dfae=_0x309b90[_0x12da2f(0x1f0)](_0x23c509=>ee(_0x1c353f[_0x12da2f(0x238)][_0x12da2f(0x21c)][_0x23c509],_0x2ed9a2,_0x10777e))[_0x12da2f(0x220)](Boolean);return Object[_0x12da2f(0x1e1)](_0x1c353f[_0x12da2f(0x238)][_0x12da2f(0x1e6)])[_0x12da2f(0x212)](_0x2b12ba=>{const _0x1cff92=_0x12da2f;this[_0x1cff92(0x217)]['addUser'](_0x2b12ba);}),_0x27dfae;}[_0x3c5135(0x1da)](_0x393ea6){const _0x233567=_0x3c5135;return{'id':_0x393ea6['id'],'threadId':_0x393ea6[_0x233567(0x21a)],'ref':_0x393ea6[_0x233567(0x1ee)]};}};f=Q([_(0x0,_0x32221b(_0xaaaee1)),_(0x1,_0x32221b(_0x186a88)),_(0x2,_0x32221b(_0x5838b0)),_(0x3,_0x32221b(_0x111326))],f);function _0x3870(_0x43a9b4,_0x424a26){const _0x589fd6=_0x589f();return _0x3870=function(_0x387005,_0x2f0107){_0x387005=_0x387005-0x1d8;let _0x3860e3=_0x589fd6[_0x387005];return _0x3860e3;},_0x3870(_0x43a9b4,_0x424a26);}var re=Object[_0x3c5135(0x1e4)],te=(_0xfecb85,_0x46e1d9,_0x2fe99e,_0x271384)=>{const _0xc5a04f=_0x3c5135;for(var _0x4cd31b=_0x271384>0x1?void 0x0:_0x271384?re(_0x46e1d9,_0x2fe99e):_0x46e1d9,_0x4f4796=_0xfecb85[_0xc5a04f(0x20b)]-0x1,_0x209202;_0x4f4796>=0x0;_0x4f4796--)(_0x209202=_0xfecb85[_0x4f4796])&&(_0x4cd31b=_0x209202(_0x4cd31b)||_0x4cd31b);return _0x4cd31b;},N=(_0x54ca7e,_0x35e2d7)=>(_0x36458b,_0x37f854)=>_0x35e2d7(_0x36458b,_0x37f854,_0x54ca7e);function _0x589f(){const _0x5c334a=['_userService','syncUpdateMutationToColla','replyId','threadId','Edit','comments','938104xjftjs','rangeId','_init','filter','stringify','get','disposeWithMe','find','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','type','Add','_initDataSource','/add','createTimestamp','parse','post','content','userID','size','COMMENT','addComment','Unknown','Solve','Delete','rangeType','root','body','979BgLDQe','updateComment','requireSession','_threadCommentModel','saveCommentToSnapshot','userId','537310cGEEAh','solved','slice','2872600lnARKO','getComment','values','code','/reply','getOwnPropertyDescriptor','getCurrentUser','users','comment','17708fVpgfC','OpenOrReOpen','955603zhCTqZ','subscribe','10kmFZmZ','_commentService','ref','UNIVER_UNKNOWN','map','commentUpdate$','/edit','parentId','_httpService','format','_threadCommentDataSourceService','Reply','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','99GPqoOj','_injector','delete','reply','pipe','add','unitId','replies','getMemberID','resolved','1805172nORszm','_config','getUnit','customRanges','/solved','/delete','length','_initUserSync','681FaUQtb','_threadCommentDataSource','UNRECOGNIZED','_configService','defineProperty','forEach','5085178klzQsT','Solved','/universer-api/user/list','deleteComment'];_0x589f=function(){return _0x5c334a;};return _0x589f();}let g=class extends _0x2d16e4{constructor(_0x18ada6,_0x2f1b0a){const _0x50fd59=_0x3c5135;super(),this[_0x50fd59(0x1f6)]=_0x18ada6,this['_threadCommentDataSource']=_0x2f1b0a,this[_0x50fd59(0x229)]();}[_0x3c5135(0x229)](){const _0x2f89fc=_0x3c5135;this[_0x2f89fc(0x1f6)]['dataSource']=this[_0x2f89fc(0x20e)],this['_threadCommentDataSourceService'][_0x2f89fc(0x218)]=!0x1;}};g=te([N(0x0,_0x4c88ca),N(0x1,_0x32221b(f))],g);var se=Object[_0x3c5135(0x211)],oe=Object[_0x3c5135(0x1e4)],ne=(_0x36138f,_0x4a24d2,_0x61eabb)=>_0x4a24d2 in _0x36138f?se(_0x36138f,_0x4a24d2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x61eabb}):_0x36138f[_0x4a24d2]=_0x61eabb,ie=(_0x5afa63,_0x3c3311,_0x3ac9ed,_0xb96dba)=>{for(var _0x20b8ba=_0xb96dba>0x1?void 0x0:_0xb96dba?oe(_0x3c3311,_0x3ac9ed):_0x3c3311,_0xf9471=_0x5afa63['length']-0x1,_0x3d76f5;_0xf9471>=0x0;_0xf9471--)(_0x3d76f5=_0x5afa63[_0xf9471])&&(_0x20b8ba=_0x3d76f5(_0x20b8ba)||_0x20b8ba);return _0x20b8ba;},w=(_0x2dc217,_0x2dffd2)=>(_0x3c6bed,_0x4fcfdf)=>_0x2dffd2(_0x3c6bed,_0x4fcfdf,_0x2dc217),$=(_0x4f9efc,_0x3ace6a,_0x2308a6)=>ne(_0x4f9efc,typeof _0x3ace6a!='symbol'?_0x3ace6a+'':_0x3ace6a,_0x2308a6);let b=class extends _0x56778d{constructor(_0x56ec22=M,_0x41831b,_0x274651){const _0x413e0f=_0x3c5135;super(),this[_0x413e0f(0x206)]=_0x56ec22,this[_0x413e0f(0x1fc)]=_0x41831b,this['_configService']=_0x274651;const {..._0x1fb9e8}=_0x524225({},M,this['_config']);this[_0x413e0f(0x210)]['setConfig'](z,_0x1fb9e8);}['onStarting'](){const _0x19186e=_0x3c5135;[[f],[g],[S]][_0x19186e(0x212)](_0x2229ac=>{const _0x58642e=_0x19186e;this[_0x58642e(0x1fc)]['add'](_0x2229ac);});}['onReady'](){const _0x4ed5a4=_0x3c5135;this['_injector'][_0x4ed5a4(0x222)](g),this[_0x4ed5a4(0x1fc)][_0x4ed5a4(0x222)](S);}};$(b,'pluginName',W),$(b,_0x3c5135(0x227),_0x128927[_0x3c5135(0x1ef)]),b=ie([_0xb3f9ba(_0x29173f,_0x3a92c5,_0x527155),w(0x1,_0x32221b(_0x111326)),w(0x2,_0x4900d6)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3c63ed=_0x686a;(function(_0x404739,_0x224a0e){const _0x3b87b4=_0x686a,_0x239fda=_0x404739();while(!![]){try{const _0x14235d=parseInt(_0x3b87b4(0x18c))/0x1+parseInt(_0x3b87b4(0x177))/0x2*(-parseInt(_0x3b87b4(0x1a8))/0x3)+-parseInt(_0x3b87b4(0x19c))/0x4*(parseInt(_0x3b87b4(0x16b))/0x5)+parseInt(_0x3b87b4(0x166))/0x6+-parseInt(_0x3b87b4(0x181))/0x7*(parseInt(_0x3b87b4(0x158))/0x8)+-parseInt(_0x3b87b4(0x185))/0x9+parseInt(_0x3b87b4(0x167))/0xa;if(_0x14235d===_0x224a0e)break;else _0x239fda['push'](_0x239fda['shift']());}catch(_0x5a5390){_0x239fda['push'](_0x239fda['shift']());}}}(_0x3bff,0x58c59));import{CommentService as _0x1f5f6e,CollaborationSessionService as _0x30fdc0,UniverCollaborationClientPlugin as _0x1f70fd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1df8ef}from'@univerjs-pro/license';import{dayjs as _0x14457b,UserManagerService as _0x317ae9,Inject as _0x425bc5,Injector as _0x344a66,Disposable as _0x2716e8,CustomRangeType as _0x4c58ab,UniverInstanceType as _0xe14618,DependentOn as _0x440a04,IConfigService as _0x5bacb3,Plugin as _0x417ad6,merge as _0x4aed61}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x21fc1f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59fb27,IThreadCommentDataSourceService as _0x581906}from'@univerjs/thread-comment';import{bufferTime as _0x96ccfa}from'rxjs';import{HTTPService as _0x304e86}from'@univerjs/network';const W=_0x3c63ed(0x1aa);var I=(_0x2e779d=>(_0x2e779d[_0x2e779d[_0x3c63ed(0x1a7)]=0x0]=_0x3c63ed(0x1a7),_0x2e779d[_0x2e779d[_0x3c63ed(0x189)]=0x1]=_0x3c63ed(0x189),_0x2e779d[_0x2e779d[_0x3c63ed(0x19b)]=-0x1]=_0x3c63ed(0x19b),_0x2e779d))(I||{}),v=(_0x55c348=>(_0x55c348[_0x55c348[_0x3c63ed(0x1ac)]=0x0]=_0x3c63ed(0x1ac),_0x55c348[_0x55c348[_0x3c63ed(0x18e)]=0x1]=_0x3c63ed(0x18e),_0x55c348[_0x55c348[_0x3c63ed(0x151)]=0x2]=_0x3c63ed(0x151),_0x55c348[_0x55c348[_0x3c63ed(0x1b2)]=0x3]=_0x3c63ed(0x1b2),_0x55c348[_0x55c348['Delete']=0x4]='Delete',_0x55c348[_0x55c348['Solve']=0x5]=_0x3c63ed(0x196),_0x55c348[_0x55c348[_0x3c63ed(0x19b)]=-0x1]='UNRECOGNIZED',_0x55c348))(v||{});const D=_0x3fe9d5=>_0x14457b(new Date(+_0x3fe9d5))[_0x3c63ed(0x19a)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1663fe,_0x58047a)=>{const _0x4cad74=_0x3c63ed,_0x572cc1=_0x1663fe[_0x4cad74(0x171)](_0x317ae9),_0x35d323=_0x1663fe[_0x4cad74(0x171)](_0x304e86);_0x58047a[_0x4cad74(0x16c)](_0x2f3979=>{_0x572cc1['getUser'](_0x2f3979)&&_0x58047a['delete'](_0x2f3979);}),_0x58047a['size']&&(await _0x35d323['get'](_0x4cad74(0x15b),{'params':{'userIDs':[..._0x58047a]}}))[_0x4cad74(0x172)]['users'][_0x4cad74(0x16c)](_0x5d1c9d=>{const _0x451b88=_0x4cad74;_0x5d1c9d&&_0x572cc1[_0x451b88(0x1a1)](_0x5d1c9d);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x451b27,_0x283e3c,_0x2793f8,_0x1b07cd)=>{const _0x58b18b=_0x3c63ed;for(var _0x6418b7=_0x1b07cd>0x1?void 0x0:_0x1b07cd?K(_0x283e3c,_0x2793f8):_0x283e3c,_0x14aaac=_0x451b27[_0x58b18b(0x183)]-0x1,_0x3c8ced;_0x14aaac>=0x0;_0x14aaac--)(_0x3c8ced=_0x451b27[_0x14aaac])&&(_0x6418b7=_0x3c8ced(_0x6418b7)||_0x6418b7);return _0x6418b7;},p=(_0x4f1aa2,_0x4012d1)=>(_0xa393cb,_0x26d387)=>_0x4012d1(_0xa393cb,_0x26d387,_0x4f1aa2);let S=class extends _0x2716e8{constructor(_0x23c5b7,_0x745ff8,_0x56678e,_0x128501){const _0xfa3853=_0x3c63ed;super(),this['_commentService']=_0x23c5b7,this[_0xfa3853(0x1a9)]=_0x745ff8,this[_0xfa3853(0x17d)]=_0x56678e,this[_0xfa3853(0x15c)]=_0x128501,this[_0xfa3853(0x14d)](),this[_0xfa3853(0x159)]();}[_0x3c63ed(0x159)](){const _0x5e4b01=_0x3c63ed;this['disposeWithMe'](this['_threadCommentModel'][_0x5e4b01(0x18a)][_0x5e4b01(0x18f)](_0x96ccfa(0x10))[_0x5e4b01(0x1a2)](_0x2682e5=>{const _0x480d90=_0x5e4b01,_0x32e5b3=new Set();_0x2682e5[_0x480d90(0x16c)](_0x3623e6=>{const _0x5bc62f=_0x480d90;switch(_0x3623e6[_0x5bc62f(0x165)]){case _0x5bc62f(0x164):{const _0x436779=_0x3623e6[_0x5bc62f(0x162)][_0x5bc62f(0x17e)];_0x32e5b3['add'](_0x436779);break;}}}),B(this[_0x480d90(0x15c)],_0x32e5b3);}));}[_0x3c63ed(0x14d)](){const _0xae3974=_0x3c63ed;this[_0xae3974(0x17a)](this[_0xae3974(0x1a6)][_0xae3974(0x18a)][_0xae3974(0x1a2)](async _0x5cc814=>{const _0x222feb=_0xae3974;var _0x3e32e0,_0x44e89d,_0x1eaf2e,_0x3f3b6e;const _0x2afde6=(_0x3e32e0=this[_0x222feb(0x1a9)][_0x222feb(0x195)](_0x5cc814[_0x222feb(0x173)])[_0x222feb(0x14c)](_0x475902=>_0x475902[_0x222feb(0x14f)]===_0x5cc814['threadId']))==null?void 0x0:_0x3e32e0[_0x222feb(0x180)];if(!_0x2afde6)return;const {unitId:_0x36011c,subUnitId:_0xa120c9}=_0x2afde6;switch(_0x5cc814[_0x222feb(0x150)]&&this[_0x222feb(0x17d)][_0x222feb(0x1a1)](_0x5cc814[_0x222feb(0x150)]),_0x5cc814[_0x222feb(0x165)]){case v['Add']:break;case v[_0x222feb(0x151)]:{this[_0x222feb(0x1a9)][_0x222feb(0x156)](_0x36011c,_0xa120c9,{'unitId':_0x36011c,'subUnitId':_0xa120c9,'ref':'','id':_0x5cc814[_0x222feb(0x15d)],'dT':D(+_0x5cc814[_0x222feb(0x15e)]),'threadId':_0x5cc814['threadId'],'personId':(_0x1eaf2e=(_0x44e89d=_0x5cc814[_0x222feb(0x150)])==null?void 0x0:_0x44e89d[_0x222feb(0x192)])!=null?_0x1eaf2e:_0x5cc814[_0x222feb(0x193)],'text':JSON['parse'](_0x5cc814[_0x222feb(0x1a5)]),'parentId':_0x2afde6['id']});break;}case v[_0x222feb(0x184)]:{const _0x3ebf55=this[_0x222feb(0x1a9)]['getComment'](_0x36011c,_0xa120c9,_0x5cc814[_0x222feb(0x15d)]);_0x3ebf55&&_0x3ebf55[_0x222feb(0x18d)]&&this[_0x222feb(0x1a9)][_0x222feb(0x1ad)](_0x36011c,_0xa120c9,_0x5cc814[_0x222feb(0x15d)]);break;}case v[_0x222feb(0x1b2)]:{this[_0x222feb(0x1a9)][_0x222feb(0x16f)](_0x36011c,_0xa120c9,{'commentId':_0x5cc814[_0x222feb(0x15d)],'text':JSON['parse'](_0x5cc814[_0x222feb(0x1a5)])});break;}case v[_0x222feb(0x196)]:{const _0x426ab9=(_0x3f3b6e=this['_threadCommentModel'][_0x222feb(0x195)](_0x5cc814[_0x222feb(0x173)])[_0x222feb(0x14c)](_0x5b4af8=>_0x5b4af8['threadId']===_0x5cc814['threadId']))==null?void 0x0:_0x3f3b6e[_0x222feb(0x180)];_0x426ab9&&this[_0x222feb(0x1a9)][_0x222feb(0x191)](_0x36011c,_0xa120c9,_0x426ab9['id'],_0x5cc814['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x425bc5(_0x1f5f6e)),p(0x1,_0x425bc5(_0x59fb27)),p(0x2,_0x425bc5(_0x317ae9)),p(0x3,_0x425bc5(_0x344a66))],S);const z=_0x3c63ed(0x174),M={};function _0x3bff(){const _0x355f1=['root','7xabFUC','code','length','Delete','6131556mzMgCx','post','YYYY/MM/DD\x20HH:mm','/list','Solved','commentUpdate$','comment','115822UkcxlL','parentId','Add','pipe','dataSource','resolveComment','userID','userId','map','getUnit','Solve','UNIVER_UNKNOWN','/edit','error','format','UNRECOGNIZED','2208904qfMuHp','symbol','_threadCommentDataSourceService','getOwnPropertyDescriptor','rangeId','addUser','subscribe','rangeType','/add','content','_commentService','OpenOrReOpen','98922IlwSnS','_threadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','Unknown','deleteComment','getMemberID','_httpService','solved','values','Edit','resolved','/universer-api/comment/unit/','find','_init','getCurrentUser','threadId','user','Reply','ref','_threadCommentDataSource','_sessionService','COMMENT','addComment','_config','4588808VLXIcy','_initUserSync','/solved','/universer-api/user/list','_injector','replyId','createTimestamp','defineProperty','syncUpdateMutationToColla','/delete','payload','slice','add','type','1837644xLbrNr','24740520IWwCBE','comments','parse','_configService','5gdDrDg','forEach','stringify','_initDataSource','updateComment','replies','get','body','unitId','thread-comment-data-source.config','filter','customRanges','44WDSRZx','users','requireSession','disposeWithMe','pluginName','saveCommentToSnapshot','_userService','personId','onReady'];_0x3bff=function(){return _0x355f1;};return _0x3bff();}var k=Object[_0x3c63ed(0x19f)],Q=(_0x2a53df,_0x46ffd6,_0x3eaaf3,_0x6fd965)=>{const _0x5ef11b=_0x3c63ed;for(var _0x41d4fc=_0x6fd965>0x1?void 0x0:_0x6fd965?k(_0x46ffd6,_0x3eaaf3):_0x46ffd6,_0x2b3a8a=_0x2a53df[_0x5ef11b(0x183)]-0x1,_0xdcbdb3;_0x2b3a8a>=0x0;_0x2b3a8a--)(_0xdcbdb3=_0x2a53df[_0x2b3a8a])&&(_0x41d4fc=_0xdcbdb3(_0x41d4fc)||_0x41d4fc);return _0x41d4fc;},_=(_0x307121,_0x2a147f)=>(_0x3b7da5,_0x296027)=>_0x2a147f(_0x3b7da5,_0x296027,_0x307121);function X(_0x24292c,_0x1654b7){const _0x52c8bd=_0x3c63ed,_0x1abff8=_0x24292c['replies'][0x0];return{..._0x1654b7,'id':_0x1abff8[_0x52c8bd(0x15d)],'resolved':_0x24292c[_0x52c8bd(0x1b0)]===0x1,'dT':D(_0x1abff8[_0x52c8bd(0x15e)]),'personId':_0x1abff8['userId'],'threadId':_0x1abff8[_0x52c8bd(0x14f)]};}function _0x686a(_0x5c6a6e,_0x288393){const _0x3bff5c=_0x3bff();return _0x686a=function(_0x686a8c,_0x412f48){_0x686a8c=_0x686a8c-0x14a;let _0x5f3735=_0x3bff5c[_0x686a8c];return _0x5f3735;},_0x686a(_0x5c6a6e,_0x288393);}function ee(_0x3305ff,_0x51a84d,_0x50c7b9){const _0x52f9b2=_0x3c63ed;var _0x477239,_0x4c047a;if(((_0x4c047a=(_0x477239=_0x3305ff==null?void 0x0:_0x3305ff['replies'])==null?void 0x0:_0x477239[_0x52f9b2(0x183)])!=null?_0x4c047a:0x0)>0x0){const _0x100400=(_0x20adbf,_0x20531b)=>({'id':_0x20adbf['replyId'],'threadId':_0x20adbf[_0x52f9b2(0x14f)],'dT':D(_0x20adbf[_0x52f9b2(0x15e)]),'personId':_0x20adbf[_0x52f9b2(0x193)],'resolved':_0x3305ff[_0x52f9b2(0x1b0)]===I['Solved'],'unitId':_0x51a84d,'subUnitId':_0x50c7b9,'text':JSON[_0x52f9b2(0x169)](_0x20adbf[_0x52f9b2(0x1a5)]),'parentId':_0x20531b}),_0xdd1115=_0x100400(_0x3305ff[_0x52f9b2(0x170)][0x0]);return{..._0xdd1115,'children':_0x3305ff[_0x52f9b2(0x170)][_0x52f9b2(0x163)](0x1)[_0x52f9b2(0x194)](_0x332701=>_0x100400(_0x332701,_0xdd1115['id']))};}return null;}let f=class{constructor(_0x47b64e,_0x425db8,_0x1cffad,_0x49b19a){const _0x2422cb=_0x3c63ed;this['_httpService']=_0x47b64e,this['_userService']=_0x425db8,this[_0x2422cb(0x154)]=_0x1cffad,this[_0x2422cb(0x15c)]=_0x49b19a;}async['addComment'](_0x18a112){const _0x37b0b0=_0x3c63ed;var _0x4de9cd,_0x5cc8a4;const {parentId:_0x18c17b,unitId:_0x268d8f,text:_0x13845d,threadId:_0x141ba7}=_0x18a112,_0xa56beb=(_0x5cc8a4=(_0x4de9cd=_0x13845d['customRanges'])==null?void 0x0:_0x4de9cd[_0x37b0b0(0x175)](_0x3e5fcd=>_0x3e5fcd['rangeType']===_0x4c58ab[_0x37b0b0(0x155)])[_0x37b0b0(0x194)](_0x5eea5a=>_0x5eea5a[_0x37b0b0(0x1a0)]))!=null?_0x5cc8a4:[],_0x1a54a2=JSON[_0x37b0b0(0x16d)](_0x13845d),_0x437d03=(await this[_0x37b0b0(0x154)]['requireSession'](_0x268d8f))[_0x37b0b0(0x1ae)]();if(_0x18c17b){const _0x440ce9={'memberId':_0x437d03,'unitId':_0x268d8f,'content':_0x1a54a2,'mention':_0xa56beb,'threadId':_0x141ba7},_0x2889dd=(await this[_0x37b0b0(0x1af)][_0x37b0b0(0x186)]('/universer-api/comment/unit/'+_0x268d8f+'/reply',{'body':_0x440ce9}))[_0x37b0b0(0x172)]['reply'];return{..._0x18a112,'id':_0x2889dd[_0x37b0b0(0x15d)],'dT':_0x14457b(+_0x2889dd[_0x37b0b0(0x15e)])[_0x37b0b0(0x19a)](_0x37b0b0(0x187)),'personId':_0x2889dd[_0x37b0b0(0x193)]};}else{const _0x5020e4={'memberId':_0x437d03,'unitId':_0x268d8f,'content':_0x1a54a2,'mention':_0xa56beb},_0x2e81b4=await this[_0x37b0b0(0x1af)]['post'](_0x37b0b0(0x14b)+_0x268d8f+_0x37b0b0(0x1a4),{'body':_0x5020e4});return X(_0x2e81b4[_0x37b0b0(0x172)][_0x37b0b0(0x18b)],_0x18a112);}}async[_0x3c63ed(0x16f)](_0x249932){const _0x5f4b14=_0x3c63ed;var _0x3ec8a5,_0x4e2358;const {text:_0x197fc4,unitId:_0x7f71fa}=_0x249932,_0x23abbe=(_0x4e2358=(_0x3ec8a5=_0x197fc4[_0x5f4b14(0x176)])==null?void 0x0:_0x3ec8a5[_0x5f4b14(0x175)](_0x444088=>_0x444088[_0x5f4b14(0x1a3)]===_0x4c58ab[_0x5f4b14(0x155)])[_0x5f4b14(0x194)](_0x367d9b=>_0x367d9b[_0x5f4b14(0x1a0)]))!=null?_0x4e2358:[],_0x4cbbb6=JSON[_0x5f4b14(0x16d)](_0x197fc4),_0x1aa320=_0x249932[_0x5f4b14(0x14f)],_0x46b9da=_0x249932['id'],_0x35c560={'memberId':(await this[_0x5f4b14(0x154)][_0x5f4b14(0x179)](_0x7f71fa))[_0x5f4b14(0x1ae)](),'unitId':_0x7f71fa,'threadId':_0x1aa320,'mention':_0x23abbe,'content':_0x4cbbb6,'replyId':_0x46b9da},_0x4f1b47=await this[_0x5f4b14(0x1af)][_0x5f4b14(0x186)](_0x5f4b14(0x14b)+_0x7f71fa+_0x5f4b14(0x198),{'body':_0x35c560});return!_0x4f1b47['body'][_0x5f4b14(0x199)]||_0x4f1b47[_0x5f4b14(0x172)][_0x5f4b14(0x199)][_0x5f4b14(0x182)]===0x1;}async[_0x3c63ed(0x191)](_0x392ce4){const _0x27730d=_0x3c63ed,{unitId:_0x2867dd}=_0x392ce4,_0x1d2b9d=_0x392ce4[_0x27730d(0x14f)],_0x4f08c0={'memberId':this['_userService'][_0x27730d(0x14e)]()[_0x27730d(0x192)],'unitId':_0x2867dd,'threadId':_0x1d2b9d,'solved':_0x392ce4[_0x27730d(0x14a)]?I[_0x27730d(0x189)]:I[_0x27730d(0x1a7)]},_0x5dd1d7=await this['_httpService'][_0x27730d(0x186)](_0x27730d(0x14b)+_0x2867dd+_0x27730d(0x15a),{'body':_0x4f08c0});return!_0x5dd1d7[_0x27730d(0x172)][_0x27730d(0x199)]||_0x5dd1d7[_0x27730d(0x172)][_0x27730d(0x199)][_0x27730d(0x182)]===0x1;}async[_0x3c63ed(0x1ad)](_0x94fe1e,_0x2ef399,_0x20550b,_0x294995){const _0xd1603e=_0x3c63ed,_0x12c4e1={'memberId':(await this['_sessionService'][_0xd1603e(0x179)](_0x94fe1e))[_0xd1603e(0x1ae)](),'threadId':_0x20550b,'replyId':_0x294995,'unitId':_0x94fe1e},_0x5481e4=await this[_0xd1603e(0x1af)][_0xd1603e(0x186)]('/universer-api/comment/unit/'+_0x94fe1e+_0xd1603e(0x161),{'body':_0x12c4e1});return!_0x5481e4['body'][_0xd1603e(0x199)]||_0x5481e4['body'][_0xd1603e(0x199)]['code']===0x1;}async['listComments'](_0x321d5c,_0x4b8858,_0xac451c){const _0x2c0667=_0x3c63ed,_0x25052d={'unitId':_0x321d5c,'threadId':_0xac451c},_0x1e52a4=await this[_0x2c0667(0x1af)]['post'](_0x2c0667(0x14b)+_0x321d5c+_0x2c0667(0x188),{'body':_0x25052d}),_0x56a9dd=_0xac451c['map'](_0x3a1138=>ee(_0x1e52a4['body'][_0x2c0667(0x168)][_0x3a1138],_0x321d5c,_0x4b8858))[_0x2c0667(0x175)](Boolean);return Object[_0x2c0667(0x1b1)](_0x1e52a4[_0x2c0667(0x172)][_0x2c0667(0x178)])[_0x2c0667(0x16c)](_0x1fc7b3=>{const _0x439cf7=_0x2c0667;this[_0x439cf7(0x17d)][_0x439cf7(0x1a1)](_0x1fc7b3);}),_0x56a9dd;}[_0x3c63ed(0x17c)](_0x537f4b){const _0x21bf08=_0x3c63ed;return{'id':_0x537f4b['id'],'threadId':_0x537f4b[_0x21bf08(0x14f)],'ref':_0x537f4b[_0x21bf08(0x152)]};}};f=Q([_(0x0,_0x425bc5(_0x304e86)),_(0x1,_0x425bc5(_0x317ae9)),_(0x2,_0x425bc5(_0x30fdc0)),_(0x3,_0x425bc5(_0x344a66))],f);var re=Object[_0x3c63ed(0x19f)],te=(_0x34183c,_0x4e4908,_0x4231c3,_0x40a9a0)=>{const _0x5da59a=_0x3c63ed;for(var _0x235181=_0x40a9a0>0x1?void 0x0:_0x40a9a0?re(_0x4e4908,_0x4231c3):_0x4e4908,_0x237e65=_0x34183c[_0x5da59a(0x183)]-0x1,_0x2f0892;_0x237e65>=0x0;_0x237e65--)(_0x2f0892=_0x34183c[_0x237e65])&&(_0x235181=_0x2f0892(_0x235181)||_0x235181);return _0x235181;},N=(_0x31157a,_0x51530e)=>(_0x543ed6,_0x1076f5)=>_0x51530e(_0x543ed6,_0x1076f5,_0x31157a);let g=class extends _0x2716e8{constructor(_0x2cd2c9,_0x51b281){const _0x365d70=_0x3c63ed;super(),this[_0x365d70(0x19e)]=_0x2cd2c9,this[_0x365d70(0x153)]=_0x51b281,this[_0x365d70(0x16e)]();}[_0x3c63ed(0x16e)](){const _0x2e4853=_0x3c63ed;this[_0x2e4853(0x19e)][_0x2e4853(0x190)]=this[_0x2e4853(0x153)],this['_threadCommentDataSourceService'][_0x2e4853(0x160)]=!0x1;}};g=te([N(0x0,_0x581906),N(0x1,_0x425bc5(f))],g);var se=Object[_0x3c63ed(0x15f)],oe=Object[_0x3c63ed(0x19f)],ne=(_0x479751,_0x4511e8,_0xd8d38)=>_0x4511e8 in _0x479751?se(_0x479751,_0x4511e8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd8d38}):_0x479751[_0x4511e8]=_0xd8d38,ie=(_0x5b84ea,_0x10579c,_0x4e461a,_0x1ea4d7)=>{const _0x44fd1d=_0x3c63ed;for(var _0x496f45=_0x1ea4d7>0x1?void 0x0:_0x1ea4d7?oe(_0x10579c,_0x4e461a):_0x10579c,_0x50cf11=_0x5b84ea[_0x44fd1d(0x183)]-0x1,_0x132741;_0x50cf11>=0x0;_0x50cf11--)(_0x132741=_0x5b84ea[_0x50cf11])&&(_0x496f45=_0x132741(_0x496f45)||_0x496f45);return _0x496f45;},w=(_0xcff464,_0x3f2ac1)=>(_0x1c76e7,_0x4831f0)=>_0x3f2ac1(_0x1c76e7,_0x4831f0,_0xcff464),$=(_0x26f3f0,_0x38520f,_0x2a7ef9)=>ne(_0x26f3f0,typeof _0x38520f!=_0x3c63ed(0x19d)?_0x38520f+'':_0x38520f,_0x2a7ef9);let b=class extends _0x417ad6{constructor(_0x15f88f=M,_0x160114,_0x298029){const _0x11e597=_0x3c63ed;super(),this[_0x11e597(0x157)]=_0x15f88f,this[_0x11e597(0x15c)]=_0x160114,this[_0x11e597(0x16a)]=_0x298029;const {..._0x35d6f0}=_0x4aed61({},M,this['_config']);this[_0x11e597(0x16a)][_0x11e597(0x1ab)](z,_0x35d6f0);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x5dac36=>{const _0x153554=_0x686a;this[_0x153554(0x15c)]['add'](_0x5dac36);});}[_0x3c63ed(0x17f)](){const _0x5ef403=_0x3c63ed;this[_0x5ef403(0x15c)]['get'](g),this['_injector'][_0x5ef403(0x171)](S);}};$(b,_0x3c63ed(0x17b),W),$(b,_0x3c63ed(0x165),_0xe14618[_0x3c63ed(0x197)]),b=ie([_0x440a04(_0x21fc1f,_0x1f70fd,_0x1df8ef),w(0x1,_0x425bc5(_0x344a66)),w(0x2,_0x5bacb3)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3c5135=_0x3870;(function(_0xf589c2,_0x1e5a0f){const _0x1da3c8=_0x3870,_0x39f498=_0xf589c2();while(!![]){try{const _0x5e72cd=-parseInt(_0x1da3c8(0x1ea))/0x1+-parseInt(_0x1da3c8(0x1df))/0x2+-parseInt(_0x1da3c8(0x20d))/0x3*(-parseInt(_0x1da3c8(0x1e8))/0x4)+parseInt(_0x1da3c8(0x1ec))/0x5*(-parseInt(_0x1da3c8(0x205))/0x6)+-parseInt(_0x1da3c8(0x213))/0x7+-parseInt(_0x1da3c8(0x21d))/0x8*(parseInt(_0x1da3c8(0x1fb))/0x9)+-parseInt(_0x1da3c8(0x1dc))/0xa*(-parseInt(_0x1da3c8(0x239))/0xb);if(_0x5e72cd===_0x1e5a0f)break;else _0x39f498['push'](_0x39f498['shift']());}catch(_0x3ad3c3){_0x39f498['push'](_0x39f498['shift']());}}}(_0x589f,0xbdb36));import{CommentService as _0x88e89,CollaborationSessionService as _0x5838b0,UniverCollaborationClientPlugin as _0x3a92c5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x527155}from'@univerjs-pro/license';import{dayjs as _0x4b45c4,UserManagerService as _0x186a88,Inject as _0x32221b,Injector as _0x111326,Disposable as _0x2d16e4,CustomRangeType as _0x59243c,UniverInstanceType as _0x128927,DependentOn as _0xb3f9ba,IConfigService as _0x4900d6,Plugin as _0x56778d,merge as _0x524225}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x29173f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x403e63,IThreadCommentDataSourceService as _0x4c88ca}from'@univerjs/thread-comment';import{bufferTime as _0x52175c}from'rxjs';import{HTTPService as _0xaaaee1}from'@univerjs/network';const W=_0x3c5135(0x1f9);var I=(_0x4fa48b=>(_0x4fa48b[_0x4fa48b['OpenOrReOpen']=0x0]=_0x3c5135(0x1e9),_0x4fa48b[_0x4fa48b[_0x3c5135(0x214)]=0x1]='Solved',_0x4fa48b[_0x4fa48b[_0x3c5135(0x20f)]=-0x1]='UNRECOGNIZED',_0x4fa48b))(I||{}),v=(_0x1d24bb=>(_0x1d24bb[_0x1d24bb['Unknown']=0x0]=_0x3c5135(0x233),_0x1d24bb[_0x1d24bb[_0x3c5135(0x228)]=0x1]=_0x3c5135(0x228),_0x1d24bb[_0x1d24bb[_0x3c5135(0x1f7)]=0x2]=_0x3c5135(0x1f7),_0x1d24bb[_0x1d24bb[_0x3c5135(0x21b)]=0x3]=_0x3c5135(0x21b),_0x1d24bb[_0x1d24bb[_0x3c5135(0x235)]=0x4]='Delete',_0x1d24bb[_0x1d24bb[_0x3c5135(0x234)]=0x5]=_0x3c5135(0x234),_0x1d24bb[_0x1d24bb[_0x3c5135(0x20f)]=-0x1]=_0x3c5135(0x20f),_0x1d24bb))(v||{});const D=_0x4f7e37=>_0x4b45c4(new Date(+_0x4f7e37))[_0x3c5135(0x1f5)](_0x3c5135(0x226)),B=async(_0x440d64,_0x4db659)=>{const _0x4d1164=_0x3c5135,_0x24ee7e=_0x440d64[_0x4d1164(0x222)](_0x186a88),_0x126f20=_0x440d64[_0x4d1164(0x222)](_0xaaaee1);_0x4db659[_0x4d1164(0x212)](_0x5c10f8=>{const _0x348397=_0x4d1164;_0x24ee7e['getUser'](_0x5c10f8)&&_0x4db659[_0x348397(0x1fd)](_0x5c10f8);}),_0x4db659[_0x4d1164(0x230)]&&(await _0x126f20[_0x4d1164(0x222)](_0x4d1164(0x215),{'params':{'userIDs':[..._0x4db659]}}))[_0x4d1164(0x238)][_0x4d1164(0x1e6)][_0x4d1164(0x212)](_0x67e1c5=>{_0x67e1c5&&_0x24ee7e['addUser'](_0x67e1c5);});};var K=Object[_0x3c5135(0x1e4)],V=(_0x45df26,_0x3ffa4c,_0x52d654,_0x38ab98)=>{for(var _0x4e462d=_0x38ab98>0x1?void 0x0:_0x38ab98?K(_0x3ffa4c,_0x52d654):_0x3ffa4c,_0x1ae012=_0x45df26['length']-0x1,_0x1d22f1;_0x1ae012>=0x0;_0x1ae012--)(_0x1d22f1=_0x45df26[_0x1ae012])&&(_0x4e462d=_0x1d22f1(_0x4e462d)||_0x4e462d);return _0x4e462d;},p=(_0x21a251,_0x3a5b5e)=>(_0x12860a,_0x1f6bc1)=>_0x3a5b5e(_0x12860a,_0x1f6bc1,_0x21a251);let S=class extends _0x2d16e4{constructor(_0x5aaff0,_0x4b6645,_0x61df03,_0x3a243f){const _0x4ed865=_0x3c5135;super(),this[_0x4ed865(0x1ed)]=_0x5aaff0,this['_threadCommentModel']=_0x4b6645,this['_userService']=_0x61df03,this['_injector']=_0x3a243f,this[_0x4ed865(0x21f)](),this[_0x4ed865(0x20c)]();}[_0x3c5135(0x20c)](){const _0x1fa245=_0x3c5135;this[_0x1fa245(0x223)](this['_threadCommentModel']['commentUpdate$'][_0x1fa245(0x1ff)](_0x52175c(0x10))[_0x1fa245(0x1eb)](_0x564dd8=>{const _0x19e818=_0x1fa245,_0x29f946=new Set();_0x564dd8[_0x19e818(0x212)](_0x29cd07=>{const _0x286ef6=_0x19e818;switch(_0x29cd07[_0x286ef6(0x227)]){case _0x286ef6(0x200):{const _0x43116b=_0x29cd07['payload']['personId'];_0x29f946[_0x286ef6(0x200)](_0x43116b);break;}}}),B(this[_0x19e818(0x1fc)],_0x29f946);}));}[_0x3c5135(0x21f)](){const _0x2ed653=_0x3c5135;this['disposeWithMe'](this[_0x2ed653(0x1ed)][_0x2ed653(0x1f1)][_0x2ed653(0x1eb)](async _0x6c9454=>{const _0x4ef2e9=_0x2ed653;var _0x3c4d5d,_0xe53c3c,_0x2fda70,_0x159ea0;const _0x485b9a=(_0x3c4d5d=this['_threadCommentModel'][_0x4ef2e9(0x207)](_0x6c9454[_0x4ef2e9(0x201)])['find'](_0x210648=>_0x210648[_0x4ef2e9(0x21a)]===_0x6c9454[_0x4ef2e9(0x21a)]))==null?void 0x0:_0x3c4d5d[_0x4ef2e9(0x237)];if(!_0x485b9a)return;const {unitId:_0x344f7e,subUnitId:_0x2b07bb}=_0x485b9a;switch(_0x6c9454['user']&&this[_0x4ef2e9(0x217)]['addUser'](_0x6c9454['user']),_0x6c9454[_0x4ef2e9(0x227)]){case v['Add']:break;case v[_0x4ef2e9(0x1f7)]:{this[_0x4ef2e9(0x1d9)][_0x4ef2e9(0x232)](_0x344f7e,_0x2b07bb,{'unitId':_0x344f7e,'subUnitId':_0x2b07bb,'ref':'','id':_0x6c9454[_0x4ef2e9(0x219)],'dT':D(+_0x6c9454[_0x4ef2e9(0x22b)]),'threadId':_0x6c9454[_0x4ef2e9(0x21a)],'personId':(_0x2fda70=(_0xe53c3c=_0x6c9454['user'])==null?void 0x0:_0xe53c3c[_0x4ef2e9(0x22f)])!=null?_0x2fda70:_0x6c9454['userId'],'text':JSON[_0x4ef2e9(0x22c)](_0x6c9454[_0x4ef2e9(0x22e)]),'parentId':_0x485b9a['id']});break;}case v[_0x4ef2e9(0x235)]:{const _0x153564=this[_0x4ef2e9(0x1d9)][_0x4ef2e9(0x1e0)](_0x344f7e,_0x2b07bb,_0x6c9454[_0x4ef2e9(0x219)]);_0x153564&&_0x153564[_0x4ef2e9(0x1f3)]&&this[_0x4ef2e9(0x1d9)][_0x4ef2e9(0x216)](_0x344f7e,_0x2b07bb,_0x6c9454[_0x4ef2e9(0x219)]);break;}case v[_0x4ef2e9(0x21b)]:{this['_threadCommentModel'][_0x4ef2e9(0x23a)](_0x344f7e,_0x2b07bb,{'commentId':_0x6c9454[_0x4ef2e9(0x219)],'text':JSON[_0x4ef2e9(0x22c)](_0x6c9454['content'])});break;}case v[_0x4ef2e9(0x234)]:{const _0x51609b=(_0x159ea0=this['_threadCommentModel'][_0x4ef2e9(0x207)](_0x6c9454[_0x4ef2e9(0x201)])[_0x4ef2e9(0x224)](_0x458776=>_0x458776[_0x4ef2e9(0x21a)]===_0x6c9454[_0x4ef2e9(0x21a)]))==null?void 0x0:_0x159ea0['root'];_0x51609b&&this[_0x4ef2e9(0x1d9)]['resolveComment'](_0x344f7e,_0x2b07bb,_0x51609b['id'],_0x6c9454[_0x4ef2e9(0x1dd)]===I[_0x4ef2e9(0x214)]);break;}}}));}};S=V([p(0x0,_0x32221b(_0x88e89)),p(0x1,_0x32221b(_0x403e63)),p(0x2,_0x32221b(_0x186a88)),p(0x3,_0x32221b(_0x111326))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x3c5135(0x1e4)],Q=(_0x1eb943,_0xfcac3c,_0x2075fe,_0x5ec63c)=>{for(var _0x2407cb=_0x5ec63c>0x1?void 0x0:_0x5ec63c?k(_0xfcac3c,_0x2075fe):_0xfcac3c,_0x8c097d=_0x1eb943['length']-0x1,_0x43c4f3;_0x8c097d>=0x0;_0x8c097d--)(_0x43c4f3=_0x1eb943[_0x8c097d])&&(_0x2407cb=_0x43c4f3(_0x2407cb)||_0x2407cb);return _0x2407cb;},_=(_0x512a06,_0x1144dc)=>(_0x27bd91,_0x29ad3f)=>_0x1144dc(_0x27bd91,_0x29ad3f,_0x512a06);function X(_0x19bf28,_0xab95db){const _0x1888b7=_0x3c5135,_0x15718b=_0x19bf28[_0x1888b7(0x202)][0x0];return{..._0xab95db,'id':_0x15718b[_0x1888b7(0x219)],'resolved':_0x19bf28['solved']===0x1,'dT':D(_0x15718b[_0x1888b7(0x22b)]),'personId':_0x15718b[_0x1888b7(0x1db)],'threadId':_0x15718b[_0x1888b7(0x21a)]};}function ee(_0x284771,_0x1a3f74,_0x4cd71d){const _0x27bb6=_0x3c5135;var _0x9fbd9d,_0x3dd20c;if(((_0x3dd20c=(_0x9fbd9d=_0x284771==null?void 0x0:_0x284771[_0x27bb6(0x202)])==null?void 0x0:_0x9fbd9d[_0x27bb6(0x20b)])!=null?_0x3dd20c:0x0)>0x0){const _0x5bfdfb=(_0x1e7ce7,_0x3d27a4)=>({'id':_0x1e7ce7[_0x27bb6(0x219)],'threadId':_0x1e7ce7[_0x27bb6(0x21a)],'dT':D(_0x1e7ce7[_0x27bb6(0x22b)]),'personId':_0x1e7ce7['userId'],'resolved':_0x284771[_0x27bb6(0x1dd)]===I['Solved'],'unitId':_0x1a3f74,'subUnitId':_0x4cd71d,'text':JSON[_0x27bb6(0x22c)](_0x1e7ce7[_0x27bb6(0x22e)]),'parentId':_0x3d27a4}),_0x40935b=_0x5bfdfb(_0x284771[_0x27bb6(0x202)][0x0]);return{..._0x40935b,'children':_0x284771[_0x27bb6(0x202)][_0x27bb6(0x1de)](0x1)[_0x27bb6(0x1f0)](_0x4d7dd6=>_0x5bfdfb(_0x4d7dd6,_0x40935b['id']))};}return null;}let f=class{constructor(_0x4a253c,_0x365c6d,_0x2feb75,_0x41793b){const _0x307d6a=_0x3c5135;this[_0x307d6a(0x1f4)]=_0x4a253c,this[_0x307d6a(0x217)]=_0x365c6d,this[_0x307d6a(0x1fa)]=_0x2feb75,this[_0x307d6a(0x1fc)]=_0x41793b;}async['addComment'](_0x263d3b){const _0x47d3a1=_0x3c5135;var _0x267c22,_0x2464e8;const {parentId:_0x211f52,unitId:_0x5a4f06,text:_0x11f849,threadId:_0x3ae703}=_0x263d3b,_0x4b0efd=(_0x2464e8=(_0x267c22=_0x11f849[_0x47d3a1(0x208)])==null?void 0x0:_0x267c22[_0x47d3a1(0x220)](_0x3d4fe0=>_0x3d4fe0[_0x47d3a1(0x236)]===_0x59243c['COMMENT'])['map'](_0x27206b=>_0x27206b['rangeId']))!=null?_0x2464e8:[],_0x143abe=JSON[_0x47d3a1(0x221)](_0x11f849),_0x4b3d4e=(await this[_0x47d3a1(0x1fa)][_0x47d3a1(0x1d8)](_0x5a4f06))[_0x47d3a1(0x203)]();if(_0x211f52){const _0x3dee42={'memberId':_0x4b3d4e,'unitId':_0x5a4f06,'content':_0x143abe,'mention':_0x4b0efd,'threadId':_0x3ae703},_0x20e76c=(await this[_0x47d3a1(0x1f4)]['post'](_0x47d3a1(0x225)+_0x5a4f06+_0x47d3a1(0x1e3),{'body':_0x3dee42}))['body'][_0x47d3a1(0x1fe)];return{..._0x263d3b,'id':_0x20e76c[_0x47d3a1(0x219)],'dT':_0x4b45c4(+_0x20e76c[_0x47d3a1(0x22b)])[_0x47d3a1(0x1f5)](_0x47d3a1(0x226)),'personId':_0x20e76c[_0x47d3a1(0x1db)]};}else{const _0x34046d={'memberId':_0x4b3d4e,'unitId':_0x5a4f06,'content':_0x143abe,'mention':_0x4b0efd},_0x2bb1cb=await this[_0x47d3a1(0x1f4)][_0x47d3a1(0x22d)]('/universer-api/comment/unit/'+_0x5a4f06+_0x47d3a1(0x22a),{'body':_0x34046d});return X(_0x2bb1cb[_0x47d3a1(0x238)][_0x47d3a1(0x1e7)],_0x263d3b);}}async[_0x3c5135(0x23a)](_0x575b70){const _0x16f867=_0x3c5135;var _0xa0702b,_0x14f95a;const {text:_0xa10731,unitId:_0x482b56}=_0x575b70,_0x1bf26e=(_0x14f95a=(_0xa0702b=_0xa10731['customRanges'])==null?void 0x0:_0xa0702b['filter'](_0x1b0ae6=>_0x1b0ae6['rangeType']===_0x59243c[_0x16f867(0x231)])[_0x16f867(0x1f0)](_0x102622=>_0x102622[_0x16f867(0x21e)]))!=null?_0x14f95a:[],_0x2dcc5e=JSON['stringify'](_0xa10731),_0x358060=_0x575b70[_0x16f867(0x21a)],_0x41bce4=_0x575b70['id'],_0x19de1e={'memberId':(await this['_sessionService'][_0x16f867(0x1d8)](_0x482b56))['getMemberID'](),'unitId':_0x482b56,'threadId':_0x358060,'mention':_0x1bf26e,'content':_0x2dcc5e,'replyId':_0x41bce4},_0x38025a=await this[_0x16f867(0x1f4)][_0x16f867(0x22d)](_0x16f867(0x225)+_0x482b56+_0x16f867(0x1f2),{'body':_0x19de1e});return!_0x38025a[_0x16f867(0x238)]['error']||_0x38025a['body'][_0x16f867(0x1f8)][_0x16f867(0x1e2)]===0x1;}async['resolveComment'](_0x3524a5){const _0x6d14be=_0x3c5135,{unitId:_0x550cc3}=_0x3524a5,_0xcc439d=_0x3524a5['threadId'],_0x257b07={'memberId':this['_userService'][_0x6d14be(0x1e5)]()[_0x6d14be(0x22f)],'unitId':_0x550cc3,'threadId':_0xcc439d,'solved':_0x3524a5[_0x6d14be(0x204)]?I[_0x6d14be(0x214)]:I[_0x6d14be(0x1e9)]},_0x1877d0=await this[_0x6d14be(0x1f4)][_0x6d14be(0x22d)](_0x6d14be(0x225)+_0x550cc3+_0x6d14be(0x209),{'body':_0x257b07});return!_0x1877d0[_0x6d14be(0x238)][_0x6d14be(0x1f8)]||_0x1877d0['body'][_0x6d14be(0x1f8)]['code']===0x1;}async[_0x3c5135(0x216)](_0x21826a,_0x5e0e6f,_0x5cc12d,_0x46a834){const _0xe9ab3f=_0x3c5135,_0xa17c5f={'memberId':(await this[_0xe9ab3f(0x1fa)][_0xe9ab3f(0x1d8)](_0x21826a))[_0xe9ab3f(0x203)](),'threadId':_0x5cc12d,'replyId':_0x46a834,'unitId':_0x21826a},_0x2c5599=await this[_0xe9ab3f(0x1f4)]['post'](_0xe9ab3f(0x225)+_0x21826a+_0xe9ab3f(0x20a),{'body':_0xa17c5f});return!_0x2c5599[_0xe9ab3f(0x238)][_0xe9ab3f(0x1f8)]||_0x2c5599[_0xe9ab3f(0x238)][_0xe9ab3f(0x1f8)][_0xe9ab3f(0x1e2)]===0x1;}async['listComments'](_0x2ed9a2,_0x10777e,_0x309b90){const _0x12da2f=_0x3c5135,_0x42c74f={'unitId':_0x2ed9a2,'threadId':_0x309b90},_0x1c353f=await this['_httpService'][_0x12da2f(0x22d)]('/universer-api/comment/unit/'+_0x2ed9a2+'/list',{'body':_0x42c74f}),_0x27dfae=_0x309b90[_0x12da2f(0x1f0)](_0x23c509=>ee(_0x1c353f[_0x12da2f(0x238)][_0x12da2f(0x21c)][_0x23c509],_0x2ed9a2,_0x10777e))[_0x12da2f(0x220)](Boolean);return Object[_0x12da2f(0x1e1)](_0x1c353f[_0x12da2f(0x238)][_0x12da2f(0x1e6)])[_0x12da2f(0x212)](_0x2b12ba=>{const _0x1cff92=_0x12da2f;this[_0x1cff92(0x217)]['addUser'](_0x2b12ba);}),_0x27dfae;}[_0x3c5135(0x1da)](_0x393ea6){const _0x233567=_0x3c5135;return{'id':_0x393ea6['id'],'threadId':_0x393ea6[_0x233567(0x21a)],'ref':_0x393ea6[_0x233567(0x1ee)]};}};f=Q([_(0x0,_0x32221b(_0xaaaee1)),_(0x1,_0x32221b(_0x186a88)),_(0x2,_0x32221b(_0x5838b0)),_(0x3,_0x32221b(_0x111326))],f);function _0x3870(_0x43a9b4,_0x424a26){const _0x589fd6=_0x589f();return _0x3870=function(_0x387005,_0x2f0107){_0x387005=_0x387005-0x1d8;let _0x3860e3=_0x589fd6[_0x387005];return _0x3860e3;},_0x3870(_0x43a9b4,_0x424a26);}var re=Object[_0x3c5135(0x1e4)],te=(_0xfecb85,_0x46e1d9,_0x2fe99e,_0x271384)=>{const _0xc5a04f=_0x3c5135;for(var _0x4cd31b=_0x271384>0x1?void 0x0:_0x271384?re(_0x46e1d9,_0x2fe99e):_0x46e1d9,_0x4f4796=_0xfecb85[_0xc5a04f(0x20b)]-0x1,_0x209202;_0x4f4796>=0x0;_0x4f4796--)(_0x209202=_0xfecb85[_0x4f4796])&&(_0x4cd31b=_0x209202(_0x4cd31b)||_0x4cd31b);return _0x4cd31b;},N=(_0x54ca7e,_0x35e2d7)=>(_0x36458b,_0x37f854)=>_0x35e2d7(_0x36458b,_0x37f854,_0x54ca7e);function _0x589f(){const _0x5c334a=['_userService','syncUpdateMutationToColla','replyId','threadId','Edit','comments','938104xjftjs','rangeId','_init','filter','stringify','get','disposeWithMe','find','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','type','Add','_initDataSource','/add','createTimestamp','parse','post','content','userID','size','COMMENT','addComment','Unknown','Solve','Delete','rangeType','root','body','979BgLDQe','updateComment','requireSession','_threadCommentModel','saveCommentToSnapshot','userId','537310cGEEAh','solved','slice','2872600lnARKO','getComment','values','code','/reply','getOwnPropertyDescriptor','getCurrentUser','users','comment','17708fVpgfC','OpenOrReOpen','955603zhCTqZ','subscribe','10kmFZmZ','_commentService','ref','UNIVER_UNKNOWN','map','commentUpdate$','/edit','parentId','_httpService','format','_threadCommentDataSourceService','Reply','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','99GPqoOj','_injector','delete','reply','pipe','add','unitId','replies','getMemberID','resolved','1805172nORszm','_config','getUnit','customRanges','/solved','/delete','length','_initUserSync','681FaUQtb','_threadCommentDataSource','UNRECOGNIZED','_configService','defineProperty','forEach','5085178klzQsT','Solved','/universer-api/user/list','deleteComment'];_0x589f=function(){return _0x5c334a;};return _0x589f();}let g=class extends _0x2d16e4{constructor(_0x18ada6,_0x2f1b0a){const _0x50fd59=_0x3c5135;super(),this[_0x50fd59(0x1f6)]=_0x18ada6,this['_threadCommentDataSource']=_0x2f1b0a,this[_0x50fd59(0x229)]();}[_0x3c5135(0x229)](){const _0x2f89fc=_0x3c5135;this[_0x2f89fc(0x1f6)]['dataSource']=this[_0x2f89fc(0x20e)],this['_threadCommentDataSourceService'][_0x2f89fc(0x218)]=!0x1;}};g=te([N(0x0,_0x4c88ca),N(0x1,_0x32221b(f))],g);var se=Object[_0x3c5135(0x211)],oe=Object[_0x3c5135(0x1e4)],ne=(_0x36138f,_0x4a24d2,_0x61eabb)=>_0x4a24d2 in _0x36138f?se(_0x36138f,_0x4a24d2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x61eabb}):_0x36138f[_0x4a24d2]=_0x61eabb,ie=(_0x5afa63,_0x3c3311,_0x3ac9ed,_0xb96dba)=>{for(var _0x20b8ba=_0xb96dba>0x1?void 0x0:_0xb96dba?oe(_0x3c3311,_0x3ac9ed):_0x3c3311,_0xf9471=_0x5afa63['length']-0x1,_0x3d76f5;_0xf9471>=0x0;_0xf9471--)(_0x3d76f5=_0x5afa63[_0xf9471])&&(_0x20b8ba=_0x3d76f5(_0x20b8ba)||_0x20b8ba);return _0x20b8ba;},w=(_0x2dc217,_0x2dffd2)=>(_0x3c6bed,_0x4fcfdf)=>_0x2dffd2(_0x3c6bed,_0x4fcfdf,_0x2dc217),$=(_0x4f9efc,_0x3ace6a,_0x2308a6)=>ne(_0x4f9efc,typeof _0x3ace6a!='symbol'?_0x3ace6a+'':_0x3ace6a,_0x2308a6);let b=class extends _0x56778d{constructor(_0x56ec22=M,_0x41831b,_0x274651){const _0x413e0f=_0x3c5135;super(),this[_0x413e0f(0x206)]=_0x56ec22,this[_0x413e0f(0x1fc)]=_0x41831b,this['_configService']=_0x274651;const {..._0x1fb9e8}=_0x524225({},M,this['_config']);this[_0x413e0f(0x210)]['setConfig'](z,_0x1fb9e8);}['onStarting'](){const _0x19186e=_0x3c5135;[[f],[g],[S]][_0x19186e(0x212)](_0x2229ac=>{const _0x58642e=_0x19186e;this[_0x58642e(0x1fc)]['add'](_0x2229ac);});}['onReady'](){const _0x4ed5a4=_0x3c5135;this['_injector'][_0x4ed5a4(0x222)](g),this[_0x4ed5a4(0x1fc)][_0x4ed5a4(0x222)](S);}};$(b,'pluginName',W),$(b,_0x3c5135(0x227),_0x128927[_0x3c5135(0x1ef)]),b=ie([_0xb3f9ba(_0x29173f,_0x3a92c5,_0x527155),w(0x1,_0x32221b(_0x111326)),w(0x2,_0x4900d6)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3c63ed=_0x686a;(function(_0x404739,_0x224a0e){const _0x3b87b4=_0x686a,_0x239fda=_0x404739();while(!![]){try{const _0x14235d=parseInt(_0x3b87b4(0x18c))/0x1+parseInt(_0x3b87b4(0x177))/0x2*(-parseInt(_0x3b87b4(0x1a8))/0x3)+-parseInt(_0x3b87b4(0x19c))/0x4*(parseInt(_0x3b87b4(0x16b))/0x5)+parseInt(_0x3b87b4(0x166))/0x6+-parseInt(_0x3b87b4(0x181))/0x7*(parseInt(_0x3b87b4(0x158))/0x8)+-parseInt(_0x3b87b4(0x185))/0x9+parseInt(_0x3b87b4(0x167))/0xa;if(_0x14235d===_0x224a0e)break;else _0x239fda['push'](_0x239fda['shift']());}catch(_0x5a5390){_0x239fda['push'](_0x239fda['shift']());}}}(_0x3bff,0x58c59));import{CommentService as _0x1f5f6e,CollaborationSessionService as _0x30fdc0,UniverCollaborationClientPlugin as _0x1f70fd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1df8ef}from'@univerjs-pro/license';import{dayjs as _0x14457b,UserManagerService as _0x317ae9,Inject as _0x425bc5,Injector as _0x344a66,Disposable as _0x2716e8,CustomRangeType as _0x4c58ab,UniverInstanceType as _0xe14618,DependentOn as _0x440a04,IConfigService as _0x5bacb3,Plugin as _0x417ad6,merge as _0x4aed61}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x21fc1f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59fb27,IThreadCommentDataSourceService as _0x581906}from'@univerjs/thread-comment';import{bufferTime as _0x96ccfa}from'rxjs';import{HTTPService as _0x304e86}from'@univerjs/network';const W=_0x3c63ed(0x1aa);var I=(_0x2e779d=>(_0x2e779d[_0x2e779d[_0x3c63ed(0x1a7)]=0x0]=_0x3c63ed(0x1a7),_0x2e779d[_0x2e779d[_0x3c63ed(0x189)]=0x1]=_0x3c63ed(0x189),_0x2e779d[_0x2e779d[_0x3c63ed(0x19b)]=-0x1]=_0x3c63ed(0x19b),_0x2e779d))(I||{}),v=(_0x55c348=>(_0x55c348[_0x55c348[_0x3c63ed(0x1ac)]=0x0]=_0x3c63ed(0x1ac),_0x55c348[_0x55c348[_0x3c63ed(0x18e)]=0x1]=_0x3c63ed(0x18e),_0x55c348[_0x55c348[_0x3c63ed(0x151)]=0x2]=_0x3c63ed(0x151),_0x55c348[_0x55c348[_0x3c63ed(0x1b2)]=0x3]=_0x3c63ed(0x1b2),_0x55c348[_0x55c348['Delete']=0x4]='Delete',_0x55c348[_0x55c348['Solve']=0x5]=_0x3c63ed(0x196),_0x55c348[_0x55c348[_0x3c63ed(0x19b)]=-0x1]='UNRECOGNIZED',_0x55c348))(v||{});const D=_0x3fe9d5=>_0x14457b(new Date(+_0x3fe9d5))[_0x3c63ed(0x19a)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1663fe,_0x58047a)=>{const _0x4cad74=_0x3c63ed,_0x572cc1=_0x1663fe[_0x4cad74(0x171)](_0x317ae9),_0x35d323=_0x1663fe[_0x4cad74(0x171)](_0x304e86);_0x58047a[_0x4cad74(0x16c)](_0x2f3979=>{_0x572cc1['getUser'](_0x2f3979)&&_0x58047a['delete'](_0x2f3979);}),_0x58047a['size']&&(await _0x35d323['get'](_0x4cad74(0x15b),{'params':{'userIDs':[..._0x58047a]}}))[_0x4cad74(0x172)]['users'][_0x4cad74(0x16c)](_0x5d1c9d=>{const _0x451b88=_0x4cad74;_0x5d1c9d&&_0x572cc1[_0x451b88(0x1a1)](_0x5d1c9d);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x451b27,_0x283e3c,_0x2793f8,_0x1b07cd)=>{const _0x58b18b=_0x3c63ed;for(var _0x6418b7=_0x1b07cd>0x1?void 0x0:_0x1b07cd?K(_0x283e3c,_0x2793f8):_0x283e3c,_0x14aaac=_0x451b27[_0x58b18b(0x183)]-0x1,_0x3c8ced;_0x14aaac>=0x0;_0x14aaac--)(_0x3c8ced=_0x451b27[_0x14aaac])&&(_0x6418b7=_0x3c8ced(_0x6418b7)||_0x6418b7);return _0x6418b7;},p=(_0x4f1aa2,_0x4012d1)=>(_0xa393cb,_0x26d387)=>_0x4012d1(_0xa393cb,_0x26d387,_0x4f1aa2);let S=class extends _0x2716e8{constructor(_0x23c5b7,_0x745ff8,_0x56678e,_0x128501){const _0xfa3853=_0x3c63ed;super(),this['_commentService']=_0x23c5b7,this[_0xfa3853(0x1a9)]=_0x745ff8,this[_0xfa3853(0x17d)]=_0x56678e,this[_0xfa3853(0x15c)]=_0x128501,this[_0xfa3853(0x14d)](),this[_0xfa3853(0x159)]();}[_0x3c63ed(0x159)](){const _0x5e4b01=_0x3c63ed;this['disposeWithMe'](this['_threadCommentModel'][_0x5e4b01(0x18a)][_0x5e4b01(0x18f)](_0x96ccfa(0x10))[_0x5e4b01(0x1a2)](_0x2682e5=>{const _0x480d90=_0x5e4b01,_0x32e5b3=new Set();_0x2682e5[_0x480d90(0x16c)](_0x3623e6=>{const _0x5bc62f=_0x480d90;switch(_0x3623e6[_0x5bc62f(0x165)]){case _0x5bc62f(0x164):{const _0x436779=_0x3623e6[_0x5bc62f(0x162)][_0x5bc62f(0x17e)];_0x32e5b3['add'](_0x436779);break;}}}),B(this[_0x480d90(0x15c)],_0x32e5b3);}));}[_0x3c63ed(0x14d)](){const _0xae3974=_0x3c63ed;this[_0xae3974(0x17a)](this[_0xae3974(0x1a6)][_0xae3974(0x18a)][_0xae3974(0x1a2)](async _0x5cc814=>{const _0x222feb=_0xae3974;var _0x3e32e0,_0x44e89d,_0x1eaf2e,_0x3f3b6e;const _0x2afde6=(_0x3e32e0=this[_0x222feb(0x1a9)][_0x222feb(0x195)](_0x5cc814[_0x222feb(0x173)])[_0x222feb(0x14c)](_0x475902=>_0x475902[_0x222feb(0x14f)]===_0x5cc814['threadId']))==null?void 0x0:_0x3e32e0[_0x222feb(0x180)];if(!_0x2afde6)return;const {unitId:_0x36011c,subUnitId:_0xa120c9}=_0x2afde6;switch(_0x5cc814[_0x222feb(0x150)]&&this[_0x222feb(0x17d)][_0x222feb(0x1a1)](_0x5cc814[_0x222feb(0x150)]),_0x5cc814[_0x222feb(0x165)]){case v['Add']:break;case v[_0x222feb(0x151)]:{this[_0x222feb(0x1a9)][_0x222feb(0x156)](_0x36011c,_0xa120c9,{'unitId':_0x36011c,'subUnitId':_0xa120c9,'ref':'','id':_0x5cc814[_0x222feb(0x15d)],'dT':D(+_0x5cc814[_0x222feb(0x15e)]),'threadId':_0x5cc814['threadId'],'personId':(_0x1eaf2e=(_0x44e89d=_0x5cc814[_0x222feb(0x150)])==null?void 0x0:_0x44e89d[_0x222feb(0x192)])!=null?_0x1eaf2e:_0x5cc814[_0x222feb(0x193)],'text':JSON['parse'](_0x5cc814[_0x222feb(0x1a5)]),'parentId':_0x2afde6['id']});break;}case v[_0x222feb(0x184)]:{const _0x3ebf55=this[_0x222feb(0x1a9)]['getComment'](_0x36011c,_0xa120c9,_0x5cc814[_0x222feb(0x15d)]);_0x3ebf55&&_0x3ebf55[_0x222feb(0x18d)]&&this[_0x222feb(0x1a9)][_0x222feb(0x1ad)](_0x36011c,_0xa120c9,_0x5cc814[_0x222feb(0x15d)]);break;}case v[_0x222feb(0x1b2)]:{this[_0x222feb(0x1a9)][_0x222feb(0x16f)](_0x36011c,_0xa120c9,{'commentId':_0x5cc814[_0x222feb(0x15d)],'text':JSON['parse'](_0x5cc814[_0x222feb(0x1a5)])});break;}case v[_0x222feb(0x196)]:{const _0x426ab9=(_0x3f3b6e=this['_threadCommentModel'][_0x222feb(0x195)](_0x5cc814[_0x222feb(0x173)])[_0x222feb(0x14c)](_0x5b4af8=>_0x5b4af8['threadId']===_0x5cc814['threadId']))==null?void 0x0:_0x3f3b6e[_0x222feb(0x180)];_0x426ab9&&this[_0x222feb(0x1a9)][_0x222feb(0x191)](_0x36011c,_0xa120c9,_0x426ab9['id'],_0x5cc814['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x425bc5(_0x1f5f6e)),p(0x1,_0x425bc5(_0x59fb27)),p(0x2,_0x425bc5(_0x317ae9)),p(0x3,_0x425bc5(_0x344a66))],S);const z=_0x3c63ed(0x174),M={};function _0x3bff(){const _0x355f1=['root','7xabFUC','code','length','Delete','6131556mzMgCx','post','YYYY/MM/DD\x20HH:mm','/list','Solved','commentUpdate$','comment','115822UkcxlL','parentId','Add','pipe','dataSource','resolveComment','userID','userId','map','getUnit','Solve','UNIVER_UNKNOWN','/edit','error','format','UNRECOGNIZED','2208904qfMuHp','symbol','_threadCommentDataSourceService','getOwnPropertyDescriptor','rangeId','addUser','subscribe','rangeType','/add','content','_commentService','OpenOrReOpen','98922IlwSnS','_threadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','Unknown','deleteComment','getMemberID','_httpService','solved','values','Edit','resolved','/universer-api/comment/unit/','find','_init','getCurrentUser','threadId','user','Reply','ref','_threadCommentDataSource','_sessionService','COMMENT','addComment','_config','4588808VLXIcy','_initUserSync','/solved','/universer-api/user/list','_injector','replyId','createTimestamp','defineProperty','syncUpdateMutationToColla','/delete','payload','slice','add','type','1837644xLbrNr','24740520IWwCBE','comments','parse','_configService','5gdDrDg','forEach','stringify','_initDataSource','updateComment','replies','get','body','unitId','thread-comment-data-source.config','filter','customRanges','44WDSRZx','users','requireSession','disposeWithMe','pluginName','saveCommentToSnapshot','_userService','personId','onReady'];_0x3bff=function(){return _0x355f1;};return _0x3bff();}var k=Object[_0x3c63ed(0x19f)],Q=(_0x2a53df,_0x46ffd6,_0x3eaaf3,_0x6fd965)=>{const _0x5ef11b=_0x3c63ed;for(var _0x41d4fc=_0x6fd965>0x1?void 0x0:_0x6fd965?k(_0x46ffd6,_0x3eaaf3):_0x46ffd6,_0x2b3a8a=_0x2a53df[_0x5ef11b(0x183)]-0x1,_0xdcbdb3;_0x2b3a8a>=0x0;_0x2b3a8a--)(_0xdcbdb3=_0x2a53df[_0x2b3a8a])&&(_0x41d4fc=_0xdcbdb3(_0x41d4fc)||_0x41d4fc);return _0x41d4fc;},_=(_0x307121,_0x2a147f)=>(_0x3b7da5,_0x296027)=>_0x2a147f(_0x3b7da5,_0x296027,_0x307121);function X(_0x24292c,_0x1654b7){const _0x52c8bd=_0x3c63ed,_0x1abff8=_0x24292c['replies'][0x0];return{..._0x1654b7,'id':_0x1abff8[_0x52c8bd(0x15d)],'resolved':_0x24292c[_0x52c8bd(0x1b0)]===0x1,'dT':D(_0x1abff8[_0x52c8bd(0x15e)]),'personId':_0x1abff8['userId'],'threadId':_0x1abff8[_0x52c8bd(0x14f)]};}function _0x686a(_0x5c6a6e,_0x288393){const _0x3bff5c=_0x3bff();return _0x686a=function(_0x686a8c,_0x412f48){_0x686a8c=_0x686a8c-0x14a;let _0x5f3735=_0x3bff5c[_0x686a8c];return _0x5f3735;},_0x686a(_0x5c6a6e,_0x288393);}function ee(_0x3305ff,_0x51a84d,_0x50c7b9){const _0x52f9b2=_0x3c63ed;var _0x477239,_0x4c047a;if(((_0x4c047a=(_0x477239=_0x3305ff==null?void 0x0:_0x3305ff['replies'])==null?void 0x0:_0x477239[_0x52f9b2(0x183)])!=null?_0x4c047a:0x0)>0x0){const _0x100400=(_0x20adbf,_0x20531b)=>({'id':_0x20adbf['replyId'],'threadId':_0x20adbf[_0x52f9b2(0x14f)],'dT':D(_0x20adbf[_0x52f9b2(0x15e)]),'personId':_0x20adbf[_0x52f9b2(0x193)],'resolved':_0x3305ff[_0x52f9b2(0x1b0)]===I['Solved'],'unitId':_0x51a84d,'subUnitId':_0x50c7b9,'text':JSON[_0x52f9b2(0x169)](_0x20adbf[_0x52f9b2(0x1a5)]),'parentId':_0x20531b}),_0xdd1115=_0x100400(_0x3305ff[_0x52f9b2(0x170)][0x0]);return{..._0xdd1115,'children':_0x3305ff[_0x52f9b2(0x170)][_0x52f9b2(0x163)](0x1)[_0x52f9b2(0x194)](_0x332701=>_0x100400(_0x332701,_0xdd1115['id']))};}return null;}let f=class{constructor(_0x47b64e,_0x425db8,_0x1cffad,_0x49b19a){const _0x2422cb=_0x3c63ed;this['_httpService']=_0x47b64e,this['_userService']=_0x425db8,this[_0x2422cb(0x154)]=_0x1cffad,this[_0x2422cb(0x15c)]=_0x49b19a;}async['addComment'](_0x18a112){const _0x37b0b0=_0x3c63ed;var _0x4de9cd,_0x5cc8a4;const {parentId:_0x18c17b,unitId:_0x268d8f,text:_0x13845d,threadId:_0x141ba7}=_0x18a112,_0xa56beb=(_0x5cc8a4=(_0x4de9cd=_0x13845d['customRanges'])==null?void 0x0:_0x4de9cd[_0x37b0b0(0x175)](_0x3e5fcd=>_0x3e5fcd['rangeType']===_0x4c58ab[_0x37b0b0(0x155)])[_0x37b0b0(0x194)](_0x5eea5a=>_0x5eea5a[_0x37b0b0(0x1a0)]))!=null?_0x5cc8a4:[],_0x1a54a2=JSON[_0x37b0b0(0x16d)](_0x13845d),_0x437d03=(await this[_0x37b0b0(0x154)]['requireSession'](_0x268d8f))[_0x37b0b0(0x1ae)]();if(_0x18c17b){const _0x440ce9={'memberId':_0x437d03,'unitId':_0x268d8f,'content':_0x1a54a2,'mention':_0xa56beb,'threadId':_0x141ba7},_0x2889dd=(await this[_0x37b0b0(0x1af)][_0x37b0b0(0x186)]('/universer-api/comment/unit/'+_0x268d8f+'/reply',{'body':_0x440ce9}))[_0x37b0b0(0x172)]['reply'];return{..._0x18a112,'id':_0x2889dd[_0x37b0b0(0x15d)],'dT':_0x14457b(+_0x2889dd[_0x37b0b0(0x15e)])[_0x37b0b0(0x19a)](_0x37b0b0(0x187)),'personId':_0x2889dd[_0x37b0b0(0x193)]};}else{const _0x5020e4={'memberId':_0x437d03,'unitId':_0x268d8f,'content':_0x1a54a2,'mention':_0xa56beb},_0x2e81b4=await this[_0x37b0b0(0x1af)]['post'](_0x37b0b0(0x14b)+_0x268d8f+_0x37b0b0(0x1a4),{'body':_0x5020e4});return X(_0x2e81b4[_0x37b0b0(0x172)][_0x37b0b0(0x18b)],_0x18a112);}}async[_0x3c63ed(0x16f)](_0x249932){const _0x5f4b14=_0x3c63ed;var _0x3ec8a5,_0x4e2358;const {text:_0x197fc4,unitId:_0x7f71fa}=_0x249932,_0x23abbe=(_0x4e2358=(_0x3ec8a5=_0x197fc4[_0x5f4b14(0x176)])==null?void 0x0:_0x3ec8a5[_0x5f4b14(0x175)](_0x444088=>_0x444088[_0x5f4b14(0x1a3)]===_0x4c58ab[_0x5f4b14(0x155)])[_0x5f4b14(0x194)](_0x367d9b=>_0x367d9b[_0x5f4b14(0x1a0)]))!=null?_0x4e2358:[],_0x4cbbb6=JSON[_0x5f4b14(0x16d)](_0x197fc4),_0x1aa320=_0x249932[_0x5f4b14(0x14f)],_0x46b9da=_0x249932['id'],_0x35c560={'memberId':(await this[_0x5f4b14(0x154)][_0x5f4b14(0x179)](_0x7f71fa))[_0x5f4b14(0x1ae)](),'unitId':_0x7f71fa,'threadId':_0x1aa320,'mention':_0x23abbe,'content':_0x4cbbb6,'replyId':_0x46b9da},_0x4f1b47=await this[_0x5f4b14(0x1af)][_0x5f4b14(0x186)](_0x5f4b14(0x14b)+_0x7f71fa+_0x5f4b14(0x198),{'body':_0x35c560});return!_0x4f1b47['body'][_0x5f4b14(0x199)]||_0x4f1b47[_0x5f4b14(0x172)][_0x5f4b14(0x199)][_0x5f4b14(0x182)]===0x1;}async[_0x3c63ed(0x191)](_0x392ce4){const _0x27730d=_0x3c63ed,{unitId:_0x2867dd}=_0x392ce4,_0x1d2b9d=_0x392ce4[_0x27730d(0x14f)],_0x4f08c0={'memberId':this['_userService'][_0x27730d(0x14e)]()[_0x27730d(0x192)],'unitId':_0x2867dd,'threadId':_0x1d2b9d,'solved':_0x392ce4[_0x27730d(0x14a)]?I[_0x27730d(0x189)]:I[_0x27730d(0x1a7)]},_0x5dd1d7=await this['_httpService'][_0x27730d(0x186)](_0x27730d(0x14b)+_0x2867dd+_0x27730d(0x15a),{'body':_0x4f08c0});return!_0x5dd1d7[_0x27730d(0x172)][_0x27730d(0x199)]||_0x5dd1d7[_0x27730d(0x172)][_0x27730d(0x199)][_0x27730d(0x182)]===0x1;}async[_0x3c63ed(0x1ad)](_0x94fe1e,_0x2ef399,_0x20550b,_0x294995){const _0xd1603e=_0x3c63ed,_0x12c4e1={'memberId':(await this['_sessionService'][_0xd1603e(0x179)](_0x94fe1e))[_0xd1603e(0x1ae)](),'threadId':_0x20550b,'replyId':_0x294995,'unitId':_0x94fe1e},_0x5481e4=await this[_0xd1603e(0x1af)][_0xd1603e(0x186)]('/universer-api/comment/unit/'+_0x94fe1e+_0xd1603e(0x161),{'body':_0x12c4e1});return!_0x5481e4['body'][_0xd1603e(0x199)]||_0x5481e4['body'][_0xd1603e(0x199)]['code']===0x1;}async['listComments'](_0x321d5c,_0x4b8858,_0xac451c){const _0x2c0667=_0x3c63ed,_0x25052d={'unitId':_0x321d5c,'threadId':_0xac451c},_0x1e52a4=await this[_0x2c0667(0x1af)]['post'](_0x2c0667(0x14b)+_0x321d5c+_0x2c0667(0x188),{'body':_0x25052d}),_0x56a9dd=_0xac451c['map'](_0x3a1138=>ee(_0x1e52a4['body'][_0x2c0667(0x168)][_0x3a1138],_0x321d5c,_0x4b8858))[_0x2c0667(0x175)](Boolean);return Object[_0x2c0667(0x1b1)](_0x1e52a4[_0x2c0667(0x172)][_0x2c0667(0x178)])[_0x2c0667(0x16c)](_0x1fc7b3=>{const _0x439cf7=_0x2c0667;this[_0x439cf7(0x17d)][_0x439cf7(0x1a1)](_0x1fc7b3);}),_0x56a9dd;}[_0x3c63ed(0x17c)](_0x537f4b){const _0x21bf08=_0x3c63ed;return{'id':_0x537f4b['id'],'threadId':_0x537f4b[_0x21bf08(0x14f)],'ref':_0x537f4b[_0x21bf08(0x152)]};}};f=Q([_(0x0,_0x425bc5(_0x304e86)),_(0x1,_0x425bc5(_0x317ae9)),_(0x2,_0x425bc5(_0x30fdc0)),_(0x3,_0x425bc5(_0x344a66))],f);var re=Object[_0x3c63ed(0x19f)],te=(_0x34183c,_0x4e4908,_0x4231c3,_0x40a9a0)=>{const _0x5da59a=_0x3c63ed;for(var _0x235181=_0x40a9a0>0x1?void 0x0:_0x40a9a0?re(_0x4e4908,_0x4231c3):_0x4e4908,_0x237e65=_0x34183c[_0x5da59a(0x183)]-0x1,_0x2f0892;_0x237e65>=0x0;_0x237e65--)(_0x2f0892=_0x34183c[_0x237e65])&&(_0x235181=_0x2f0892(_0x235181)||_0x235181);return _0x235181;},N=(_0x31157a,_0x51530e)=>(_0x543ed6,_0x1076f5)=>_0x51530e(_0x543ed6,_0x1076f5,_0x31157a);let g=class extends _0x2716e8{constructor(_0x2cd2c9,_0x51b281){const _0x365d70=_0x3c63ed;super(),this[_0x365d70(0x19e)]=_0x2cd2c9,this[_0x365d70(0x153)]=_0x51b281,this[_0x365d70(0x16e)]();}[_0x3c63ed(0x16e)](){const _0x2e4853=_0x3c63ed;this[_0x2e4853(0x19e)][_0x2e4853(0x190)]=this[_0x2e4853(0x153)],this['_threadCommentDataSourceService'][_0x2e4853(0x160)]=!0x1;}};g=te([N(0x0,_0x581906),N(0x1,_0x425bc5(f))],g);var se=Object[_0x3c63ed(0x15f)],oe=Object[_0x3c63ed(0x19f)],ne=(_0x479751,_0x4511e8,_0xd8d38)=>_0x4511e8 in _0x479751?se(_0x479751,_0x4511e8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd8d38}):_0x479751[_0x4511e8]=_0xd8d38,ie=(_0x5b84ea,_0x10579c,_0x4e461a,_0x1ea4d7)=>{const _0x44fd1d=_0x3c63ed;for(var _0x496f45=_0x1ea4d7>0x1?void 0x0:_0x1ea4d7?oe(_0x10579c,_0x4e461a):_0x10579c,_0x50cf11=_0x5b84ea[_0x44fd1d(0x183)]-0x1,_0x132741;_0x50cf11>=0x0;_0x50cf11--)(_0x132741=_0x5b84ea[_0x50cf11])&&(_0x496f45=_0x132741(_0x496f45)||_0x496f45);return _0x496f45;},w=(_0xcff464,_0x3f2ac1)=>(_0x1c76e7,_0x4831f0)=>_0x3f2ac1(_0x1c76e7,_0x4831f0,_0xcff464),$=(_0x26f3f0,_0x38520f,_0x2a7ef9)=>ne(_0x26f3f0,typeof _0x38520f!=_0x3c63ed(0x19d)?_0x38520f+'':_0x38520f,_0x2a7ef9);let b=class extends _0x417ad6{constructor(_0x15f88f=M,_0x160114,_0x298029){const _0x11e597=_0x3c63ed;super(),this[_0x11e597(0x157)]=_0x15f88f,this[_0x11e597(0x15c)]=_0x160114,this[_0x11e597(0x16a)]=_0x298029;const {..._0x35d6f0}=_0x4aed61({},M,this['_config']);this[_0x11e597(0x16a)][_0x11e597(0x1ab)](z,_0x35d6f0);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x5dac36=>{const _0x153554=_0x686a;this[_0x153554(0x15c)]['add'](_0x5dac36);});}[_0x3c63ed(0x17f)](){const _0x5ef403=_0x3c63ed;this[_0x5ef403(0x15c)]['get'](g),this['_injector'][_0x5ef403(0x171)](S);}};$(b,_0x3c63ed(0x17b),W),$(b,_0x3c63ed(0x165),_0xe14618[_0x3c63ed(0x197)]),b=ie([_0x440a04(_0x21fc1f,_0x1f70fd,_0x1df8ef),w(0x1,_0x425bc5(_0x344a66)),w(0x2,_0x5bacb3)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4ed8(){const _0x39b5c9=['1800189FEZlii','DependentOn','Add','format','47047avbLeC','_sessionService','@univerjs-pro/collaboration-client','rangeId','error','forEach','userId','root','resolveComment','_initUserSync','unitId','2076879dLdPVG','object','/universer-api/user/list','/list','threadId','users','thread-comment-data-source.config','stringify','/solved','dataSource','requireSession','post','_initDataSource','Edit','subscribe','298671OheraZ','length','solved','89228OYDmMC','Disposable','addComment','body','parentId','UniverLicensePlugin','personId','reply','type','/reply','getMemberID','YYYY/MM/DD\x20HH:mm','Solve','CollaborationSessionService','@univerjs-pro/license','Solved','deleteComment','size','@univerjs/thread-comment-ui','8ARuAgR','UserManagerService','UniverInstanceType','1870446JUBfCC','/add','_config','content','code','Delete','UniverCore','OpenOrReOpen','_configService','map','516524QNJctx','_httpService','Module','getCurrentUser','replyId','@univerjs/network','/edit','getOwnPropertyDescriptor','replies','addUser','Injector','_threadCommentDataSourceService','onStarting','commentUpdate$','rangeType','Inject','amd','IThreadCommentDataSourceService','defineProperty','UNRECOGNIZED','syncUpdateMutationToColla','/delete','CustomRangeType','filter','delete','getUnit','find','@univerjs/thread-comment','COMMENT','parse','user','add','HTTPService','_commentService','_threadCommentModel','Plugin','disposeWithMe','listComments','rxjs','65EOTbVL','function','_userService','UniverNetwork','UniverThreadCommentUIPlugin','get','updateComment','onReady','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs/core','pluginName','Unknown','createTimestamp','getUser','/universer-api/comment/unit/','comments','exports','UniverThreadComment','IConfigService','UniverProThreadCommentDatasource','dayjs','_init','_injector','bufferTime','UniverThreadCommentDataSourcePlugin'];_0x4ed8=function(){return _0x39b5c9;};return _0x4ed8();}function _0x1d5a(_0x573fae,_0x331d25){const _0x4ed850=_0x4ed8();return _0x1d5a=function(_0x1d5aad,_0x1f48cb){_0x1d5aad=_0x1d5aad-0x9c;let _0xd6ed26=_0x4ed850[_0x1d5aad];return _0xd6ed26;},_0x1d5a(_0x573fae,_0x331d25);}(function(_0x152de4,_0x22dc36){const _0x227d0a=_0x1d5a,_0x467f22=_0x152de4();while(!![]){try{const _0x5d9bde=-parseInt(_0x227d0a(0x114))/0x1+parseInt(_0x227d0a(0xd0))/0x2+parseInt(_0x227d0a(0xad))/0x3+-parseInt(_0x227d0a(0xb0))/0x4*(parseInt(_0x227d0a(0xf7))/0x5)+-parseInt(_0x227d0a(0xc6))/0x6+parseInt(_0x227d0a(0x9e))/0x7*(parseInt(_0x227d0a(0xc3))/0x8)+parseInt(_0x227d0a(0x110))/0x9;if(_0x5d9bde===_0x22dc36)break;else _0x467f22['push'](_0x467f22['shift']());}catch(_0x28d5a3){_0x467f22['push'](_0x467f22['shift']());}}}(_0x4ed8,0x323be),function(_0x25a8e0,_0xbbc4ab){const _0x355418=_0x1d5a;typeof exports==_0x355418(0x9f)&&typeof module<'u'?_0xbbc4ab(exports,require(_0x355418(0x116)),require('@univerjs-pro/license'),require(_0x355418(0x100)),require('@univerjs/thread-comment-ui'),require(_0x355418(0xeb)),require(_0x355418(0xf6)),require(_0x355418(0xd5))):typeof define==_0x355418(0xf8)&&define[_0x355418(0xe0)]?define([_0x355418(0x107),'@univerjs-pro/collaboration-client',_0x355418(0xbe),'@univerjs/core',_0x355418(0xc2),'@univerjs/thread-comment',_0x355418(0xf6),'@univerjs/network'],_0xbbc4ab):(_0x25a8e0=typeof globalThis<'u'?globalThis:_0x25a8e0||self,_0xbbc4ab(_0x25a8e0[_0x355418(0x10a)]={},_0x25a8e0['UniverProCollaborationClient'],_0x25a8e0['UniverProLicense'],_0x25a8e0[_0x355418(0xcc)],_0x25a8e0['UniverThreadCommentUi'],_0x25a8e0[_0x355418(0x108)],_0x25a8e0[_0x355418(0xf6)],_0x25a8e0[_0x355418(0xfa)]));}(this,function(_0x8187aa,_0x1765f4,_0x3d651f,_0x4c4d36,_0x2c95e6,_0x10f783,_0x5166ce,_0x34a951){'use strict';const _0x3f7229=_0x1d5a;const _0x22324a=_0x3f7229(0xff);var _0x13ea5d=(_0x4b79ff=>(_0x4b79ff[_0x4b79ff[_0x3f7229(0xcd)]=0x0]='OpenOrReOpen',_0x4b79ff[_0x4b79ff[_0x3f7229(0xbf)]=0x1]=_0x3f7229(0xbf),_0x4b79ff[_0x4b79ff[_0x3f7229(0xe3)]=-0x1]='UNRECOGNIZED',_0x4b79ff))(_0x13ea5d||{}),_0x3efbb5=(_0x2056be=>(_0x2056be[_0x2056be[_0x3f7229(0x102)]=0x0]=_0x3f7229(0x102),_0x2056be[_0x2056be['Add']=0x1]='Add',_0x2056be[_0x2056be['Reply']=0x2]='Reply',_0x2056be[_0x2056be[_0x3f7229(0xab)]=0x3]=_0x3f7229(0xab),_0x2056be[_0x2056be['Delete']=0x4]=_0x3f7229(0xcb),_0x2056be[_0x2056be[_0x3f7229(0xbc)]=0x5]=_0x3f7229(0xbc),_0x2056be[_0x2056be[_0x3f7229(0xe3)]=-0x1]='UNRECOGNIZED',_0x2056be))(_0x3efbb5||{});const _0x53b4fb=_0x3c34c5=>_0x4c4d36[_0x3f7229(0x10b)](new Date(+_0x3c34c5))[_0x3f7229(0x113)](_0x3f7229(0xbb)),_0x1b0836=async(_0xa086a,_0x6a9cd6)=>{const _0x3b0615=_0x3f7229,_0x2bde16=_0xa086a['get'](_0x4c4d36[_0x3b0615(0xc4)]),_0x4f104d=_0xa086a[_0x3b0615(0xfc)](_0x34a951[_0x3b0615(0xf0)]);_0x6a9cd6['forEach'](_0x2cfee2=>{const _0x2b9e31=_0x3b0615;_0x2bde16[_0x2b9e31(0x104)](_0x2cfee2)&&_0x6a9cd6[_0x2b9e31(0xe8)](_0x2cfee2);}),_0x6a9cd6[_0x3b0615(0xc1)]&&(await _0x4f104d[_0x3b0615(0xfc)](_0x3b0615(0xa0),{'params':{'userIDs':[..._0x6a9cd6]}}))[_0x3b0615(0xb3)][_0x3b0615(0xa3)][_0x3b0615(0x119)](_0xac267e=>{const _0x265049=_0x3b0615;_0xac267e&&_0x2bde16[_0x265049(0xd9)](_0xac267e);});};var _0x3fd38d=Object[_0x3f7229(0xd7)],_0x3a156b=(_0x3f02ed,_0x305ea8,_0x182cbf,_0x522e7b)=>{for(var _0x260381=_0x522e7b>0x1?void 0x0:_0x522e7b?_0x3fd38d(_0x305ea8,_0x182cbf):_0x305ea8,_0x33db2b=_0x3f02ed['length']-0x1,_0x331c40;_0x33db2b>=0x0;_0x33db2b--)(_0x331c40=_0x3f02ed[_0x33db2b])&&(_0x260381=_0x331c40(_0x260381)||_0x260381);return _0x260381;},_0x191102=(_0x566650,_0x34edf3)=>(_0x1ba545,_0x36aaf0)=>_0x34edf3(_0x1ba545,_0x36aaf0,_0x566650);let _0x2c0684=class extends _0x4c4d36[_0x3f7229(0xb1)]{constructor(_0x5dbe4d,_0x4ef742,_0x57b5ee,_0x2e69a8){const _0x9d130f=_0x3f7229;super(),this[_0x9d130f(0xf1)]=_0x5dbe4d,this[_0x9d130f(0xf2)]=_0x4ef742,this['_userService']=_0x57b5ee,this[_0x9d130f(0x10d)]=_0x2e69a8,this[_0x9d130f(0x10c)](),this[_0x9d130f(0x9c)]();}[_0x3f7229(0x9c)](){const _0x56e782=_0x3f7229;this[_0x56e782(0xf4)](this[_0x56e782(0xf2)][_0x56e782(0xdd)]['pipe'](_0x5166ce[_0x56e782(0x10e)](0x10))[_0x56e782(0xac)](_0x3ec44c=>{const _0x5b4e4d=_0x56e782,_0xd43d61=new Set();_0x3ec44c[_0x5b4e4d(0x119)](_0x1da153=>{const _0x506aa9=_0x5b4e4d;switch(_0x1da153[_0x506aa9(0xb8)]){case _0x506aa9(0xef):{const _0x439b3c=_0x1da153['payload'][_0x506aa9(0xb6)];_0xd43d61['add'](_0x439b3c);break;}}}),_0x1b0836(this['_injector'],_0xd43d61);}));}[_0x3f7229(0x10c)](){const _0x2917ab=_0x3f7229;this[_0x2917ab(0xf4)](this[_0x2917ab(0xf1)][_0x2917ab(0xdd)][_0x2917ab(0xac)](async _0x406edf=>{const _0x1e04ce=_0x2917ab;var _0x3de239,_0x36cb99,_0x11621e,_0x263e72;const _0xb27700=(_0x3de239=this[_0x1e04ce(0xf2)][_0x1e04ce(0xe9)](_0x406edf['unitId'])['find'](_0x408560=>_0x408560['threadId']===_0x406edf[_0x1e04ce(0xa2)]))==null?void 0x0:_0x3de239[_0x1e04ce(0x11b)];if(!_0xb27700)return;const {unitId:_0x1eefa5,subUnitId:_0x4db26a}=_0xb27700;switch(_0x406edf[_0x1e04ce(0xee)]&&this[_0x1e04ce(0xf9)][_0x1e04ce(0xd9)](_0x406edf['user']),_0x406edf['type']){case _0x3efbb5[_0x1e04ce(0x112)]:break;case _0x3efbb5['Reply']:{this[_0x1e04ce(0xf2)][_0x1e04ce(0xb2)](_0x1eefa5,_0x4db26a,{'unitId':_0x1eefa5,'subUnitId':_0x4db26a,'ref':'','id':_0x406edf[_0x1e04ce(0xd4)],'dT':_0x53b4fb(+_0x406edf[_0x1e04ce(0x103)]),'threadId':_0x406edf[_0x1e04ce(0xa2)],'personId':(_0x11621e=(_0x36cb99=_0x406edf[_0x1e04ce(0xee)])==null?void 0x0:_0x36cb99['userID'])!=null?_0x11621e:_0x406edf['userId'],'text':JSON[_0x1e04ce(0xed)](_0x406edf['content']),'parentId':_0xb27700['id']});break;}case _0x3efbb5[_0x1e04ce(0xcb)]:{const _0x50b5c6=this[_0x1e04ce(0xf2)]['getComment'](_0x1eefa5,_0x4db26a,_0x406edf[_0x1e04ce(0xd4)]);_0x50b5c6&&_0x50b5c6[_0x1e04ce(0xb4)]&&this[_0x1e04ce(0xf2)][_0x1e04ce(0xc0)](_0x1eefa5,_0x4db26a,_0x406edf[_0x1e04ce(0xd4)]);break;}case _0x3efbb5['Edit']:{this[_0x1e04ce(0xf2)]['updateComment'](_0x1eefa5,_0x4db26a,{'commentId':_0x406edf[_0x1e04ce(0xd4)],'text':JSON[_0x1e04ce(0xed)](_0x406edf[_0x1e04ce(0xc9)])});break;}case _0x3efbb5['Solve']:{const _0x2f6f7a=(_0x263e72=this[_0x1e04ce(0xf2)][_0x1e04ce(0xe9)](_0x406edf[_0x1e04ce(0x9d)])[_0x1e04ce(0xea)](_0x1e5513=>_0x1e5513['threadId']===_0x406edf[_0x1e04ce(0xa2)]))==null?void 0x0:_0x263e72[_0x1e04ce(0x11b)];_0x2f6f7a&&this['_threadCommentModel'][_0x1e04ce(0x11c)](_0x1eefa5,_0x4db26a,_0x2f6f7a['id'],_0x406edf[_0x1e04ce(0xaf)]===_0x13ea5d[_0x1e04ce(0xbf)]);break;}}}));}};_0x2c0684=_0x3a156b([_0x191102(0x0,_0x4c4d36[_0x3f7229(0xdf)](_0x1765f4['CommentService'])),_0x191102(0x1,_0x4c4d36['Inject'](_0x10f783['ThreadCommentModel'])),_0x191102(0x2,_0x4c4d36[_0x3f7229(0xdf)](_0x4c4d36[_0x3f7229(0xc4)])),_0x191102(0x3,_0x4c4d36['Inject'](_0x4c4d36['Injector']))],_0x2c0684);const _0xb24609=_0x3f7229(0xa4),_0x57b0be={};var _0x131d39=Object[_0x3f7229(0xd7)],_0x2dae21=(_0x2ec1bd,_0x1a0477,_0x27421d,_0x564929)=>{const _0x2360aa=_0x3f7229;for(var _0x2a6205=_0x564929>0x1?void 0x0:_0x564929?_0x131d39(_0x1a0477,_0x27421d):_0x1a0477,_0x356875=_0x2ec1bd[_0x2360aa(0xae)]-0x1,_0x4c62ed;_0x356875>=0x0;_0x356875--)(_0x4c62ed=_0x2ec1bd[_0x356875])&&(_0x2a6205=_0x4c62ed(_0x2a6205)||_0x2a6205);return _0x2a6205;},_0x232d9f=(_0x50a518,_0x4b852b)=>(_0x3b2823,_0x3e04e3)=>_0x4b852b(_0x3b2823,_0x3e04e3,_0x50a518);function _0x166fc4(_0x30eaa8,_0x5031cb){const _0x5750fd=_0x3f7229,_0x42ac7f=_0x30eaa8[_0x5750fd(0xd8)][0x0];return{..._0x5031cb,'id':_0x42ac7f[_0x5750fd(0xd4)],'resolved':_0x30eaa8[_0x5750fd(0xaf)]===0x1,'dT':_0x53b4fb(_0x42ac7f['createTimestamp']),'personId':_0x42ac7f[_0x5750fd(0x11a)],'threadId':_0x42ac7f['threadId']};}function _0x561575(_0x33f0d,_0x453546,_0x57f832){const _0x2f2b70=_0x3f7229;var _0x112636,_0x5852de;if(((_0x5852de=(_0x112636=_0x33f0d==null?void 0x0:_0x33f0d['replies'])==null?void 0x0:_0x112636[_0x2f2b70(0xae)])!=null?_0x5852de:0x0)>0x0){const _0x1aee37=(_0x12f6ff,_0x18fcb0)=>({'id':_0x12f6ff[_0x2f2b70(0xd4)],'threadId':_0x12f6ff[_0x2f2b70(0xa2)],'dT':_0x53b4fb(_0x12f6ff[_0x2f2b70(0x103)]),'personId':_0x12f6ff[_0x2f2b70(0x11a)],'resolved':_0x33f0d[_0x2f2b70(0xaf)]===_0x13ea5d['Solved'],'unitId':_0x453546,'subUnitId':_0x57f832,'text':JSON['parse'](_0x12f6ff[_0x2f2b70(0xc9)]),'parentId':_0x18fcb0}),_0x3444c4=_0x1aee37(_0x33f0d[_0x2f2b70(0xd8)][0x0]);return{..._0x3444c4,'children':_0x33f0d[_0x2f2b70(0xd8)]['slice'](0x1)[_0x2f2b70(0xcf)](_0x31d5c2=>_0x1aee37(_0x31d5c2,_0x3444c4['id']))};}return null;}let _0xf28e41=class{constructor(_0x44c719,_0x51c78f,_0x168dd0,_0x3baf8c){const _0x1a8909=_0x3f7229;this[_0x1a8909(0xd1)]=_0x44c719,this['_userService']=_0x51c78f,this[_0x1a8909(0x115)]=_0x168dd0,this[_0x1a8909(0x10d)]=_0x3baf8c;}async[_0x3f7229(0xb2)](_0x9084d7){const _0x1db296=_0x3f7229;var _0x551f65,_0x153e21;const {parentId:_0x2bed9a,unitId:_0x341eb0,text:_0x56a5fc,threadId:_0x312e07}=_0x9084d7,_0x596b2c=(_0x153e21=(_0x551f65=_0x56a5fc['customRanges'])==null?void 0x0:_0x551f65[_0x1db296(0xe7)](_0x2ec8a2=>_0x2ec8a2[_0x1db296(0xde)]===_0x4c4d36[_0x1db296(0xe6)][_0x1db296(0xec)])[_0x1db296(0xcf)](_0x247038=>_0x247038['rangeId']))!=null?_0x153e21:[],_0x3dc6de=JSON[_0x1db296(0xa5)](_0x56a5fc),_0x5155e2=(await this[_0x1db296(0x115)][_0x1db296(0xa8)](_0x341eb0))[_0x1db296(0xba)]();if(_0x2bed9a){const _0x13bf60={'memberId':_0x5155e2,'unitId':_0x341eb0,'content':_0x3dc6de,'mention':_0x596b2c,'threadId':_0x312e07},_0x549991=(await this[_0x1db296(0xd1)]['post']('/universer-api/comment/unit/'+_0x341eb0+_0x1db296(0xb9),{'body':_0x13bf60}))[_0x1db296(0xb3)][_0x1db296(0xb7)];return{..._0x9084d7,'id':_0x549991['replyId'],'dT':_0x4c4d36['dayjs'](+_0x549991[_0x1db296(0x103)])[_0x1db296(0x113)](_0x1db296(0xbb)),'personId':_0x549991['userId']};}else{const _0x4458a8={'memberId':_0x5155e2,'unitId':_0x341eb0,'content':_0x3dc6de,'mention':_0x596b2c},_0x53c45f=await this[_0x1db296(0xd1)][_0x1db296(0xa9)](_0x1db296(0x105)+_0x341eb0+_0x1db296(0xc7),{'body':_0x4458a8});return _0x166fc4(_0x53c45f[_0x1db296(0xb3)]['comment'],_0x9084d7);}}async[_0x3f7229(0xfd)](_0x2a8990){const _0x470688=_0x3f7229;var _0x65e54,_0x3563d6;const {text:_0x492357,unitId:_0x59a8b5}=_0x2a8990,_0x448b2b=(_0x3563d6=(_0x65e54=_0x492357['customRanges'])==null?void 0x0:_0x65e54[_0x470688(0xe7)](_0x481427=>_0x481427[_0x470688(0xde)]===_0x4c4d36['CustomRangeType'][_0x470688(0xec)])[_0x470688(0xcf)](_0x298003=>_0x298003[_0x470688(0x117)]))!=null?_0x3563d6:[],_0x2c4a92=JSON['stringify'](_0x492357),_0x4675bc=_0x2a8990[_0x470688(0xa2)],_0x4762b6=_0x2a8990['id'],_0x46a475={'memberId':(await this[_0x470688(0x115)]['requireSession'](_0x59a8b5))[_0x470688(0xba)](),'unitId':_0x59a8b5,'threadId':_0x4675bc,'mention':_0x448b2b,'content':_0x2c4a92,'replyId':_0x4762b6},_0x447809=await this[_0x470688(0xd1)][_0x470688(0xa9)](_0x470688(0x105)+_0x59a8b5+_0x470688(0xd6),{'body':_0x46a475});return!_0x447809[_0x470688(0xb3)][_0x470688(0x118)]||_0x447809[_0x470688(0xb3)]['error']['code']===0x1;}async[_0x3f7229(0x11c)](_0x60059a){const _0x1930c5=_0x3f7229,{unitId:_0x535d43}=_0x60059a,_0x29e50f=_0x60059a[_0x1930c5(0xa2)],_0x4cab42={'memberId':this['_userService'][_0x1930c5(0xd3)]()['userID'],'unitId':_0x535d43,'threadId':_0x29e50f,'solved':_0x60059a['resolved']?_0x13ea5d[_0x1930c5(0xbf)]:_0x13ea5d[_0x1930c5(0xcd)]},_0x472e33=await this[_0x1930c5(0xd1)][_0x1930c5(0xa9)](_0x1930c5(0x105)+_0x535d43+_0x1930c5(0xa6),{'body':_0x4cab42});return!_0x472e33[_0x1930c5(0xb3)]['error']||_0x472e33['body'][_0x1930c5(0x118)][_0x1930c5(0xca)]===0x1;}async[_0x3f7229(0xc0)](_0x4d0f98,_0x4f5041,_0x3222bc,_0x221ae9){const _0x30c071=_0x3f7229,_0x4246a4={'memberId':(await this[_0x30c071(0x115)][_0x30c071(0xa8)](_0x4d0f98))[_0x30c071(0xba)](),'threadId':_0x3222bc,'replyId':_0x221ae9,'unitId':_0x4d0f98},_0x568f9b=await this[_0x30c071(0xd1)][_0x30c071(0xa9)](_0x30c071(0x105)+_0x4d0f98+_0x30c071(0xe5),{'body':_0x4246a4});return!_0x568f9b['body']['error']||_0x568f9b[_0x30c071(0xb3)]['error'][_0x30c071(0xca)]===0x1;}async[_0x3f7229(0xf5)](_0x24671f,_0x403964,_0x4a8658){const _0x14aa00=_0x3f7229,_0x126f17={'unitId':_0x24671f,'threadId':_0x4a8658},_0x42763=await this[_0x14aa00(0xd1)][_0x14aa00(0xa9)](_0x14aa00(0x105)+_0x24671f+_0x14aa00(0xa1),{'body':_0x126f17}),_0x2a1a7f=_0x4a8658['map'](_0x47b5e7=>_0x561575(_0x42763[_0x14aa00(0xb3)][_0x14aa00(0x106)][_0x47b5e7],_0x24671f,_0x403964))[_0x14aa00(0xe7)](Boolean);return Object['values'](_0x42763[_0x14aa00(0xb3)][_0x14aa00(0xa3)])['forEach'](_0x5ae7fe=>{const _0x4607ec=_0x14aa00;this[_0x4607ec(0xf9)][_0x4607ec(0xd9)](_0x5ae7fe);}),_0x2a1a7f;}['saveCommentToSnapshot'](_0x43296c){const _0x63b4d1=_0x3f7229;return{'id':_0x43296c['id'],'threadId':_0x43296c[_0x63b4d1(0xa2)],'ref':_0x43296c['ref']};}};_0xf28e41=_0x2dae21([_0x232d9f(0x0,_0x4c4d36[_0x3f7229(0xdf)](_0x34a951[_0x3f7229(0xf0)])),_0x232d9f(0x1,_0x4c4d36['Inject'](_0x4c4d36['UserManagerService'])),_0x232d9f(0x2,_0x4c4d36[_0x3f7229(0xdf)](_0x1765f4[_0x3f7229(0xbd)])),_0x232d9f(0x3,_0x4c4d36[_0x3f7229(0xdf)](_0x4c4d36[_0x3f7229(0xda)]))],_0xf28e41);var _0x5f043c=Object['getOwnPropertyDescriptor'],_0x552284=(_0x4652eb,_0x2e8228,_0x3b8235,_0x48b6a0)=>{for(var _0x334ce3=_0x48b6a0>0x1?void 0x0:_0x48b6a0?_0x5f043c(_0x2e8228,_0x3b8235):_0x2e8228,_0x1cc624=_0x4652eb['length']-0x1,_0x3994a2;_0x1cc624>=0x0;_0x1cc624--)(_0x3994a2=_0x4652eb[_0x1cc624])&&(_0x334ce3=_0x3994a2(_0x334ce3)||_0x334ce3);return _0x334ce3;},_0x5d661f=(_0x1da13e,_0x1c0f52)=>(_0x32feb8,_0x3b907d)=>_0x1c0f52(_0x32feb8,_0x3b907d,_0x1da13e);let _0x308a4a=class extends _0x4c4d36[_0x3f7229(0xb1)]{constructor(_0x643285,_0x490b8d){const _0x1ebc4b=_0x3f7229;super(),this[_0x1ebc4b(0xdb)]=_0x643285,this['_threadCommentDataSource']=_0x490b8d,this[_0x1ebc4b(0xaa)]();}[_0x3f7229(0xaa)](){const _0x3542bf=_0x3f7229;this['_threadCommentDataSourceService'][_0x3542bf(0xa7)]=this['_threadCommentDataSource'],this[_0x3542bf(0xdb)][_0x3542bf(0xe4)]=!0x1;}};_0x308a4a=_0x552284([_0x5d661f(0x0,_0x10f783[_0x3f7229(0xe1)]),_0x5d661f(0x1,_0x4c4d36[_0x3f7229(0xdf)](_0xf28e41))],_0x308a4a);var _0x9edc54=Object[_0x3f7229(0xe2)],_0x549f00=Object['getOwnPropertyDescriptor'],_0xfa7958=(_0x16815e,_0x4157a5,_0x3f521c)=>_0x4157a5 in _0x16815e?_0x9edc54(_0x16815e,_0x4157a5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3f521c}):_0x16815e[_0x4157a5]=_0x3f521c,_0x5efc43=(_0x1cb7b4,_0x2f7ad0,_0x26aeb3,_0x545d8b)=>{for(var _0x70cee5=_0x545d8b>0x1?void 0x0:_0x545d8b?_0x549f00(_0x2f7ad0,_0x26aeb3):_0x2f7ad0,_0x4bd5c2=_0x1cb7b4['length']-0x1,_0x2a2ff0;_0x4bd5c2>=0x0;_0x4bd5c2--)(_0x2a2ff0=_0x1cb7b4[_0x4bd5c2])&&(_0x70cee5=_0x2a2ff0(_0x70cee5)||_0x70cee5);return _0x70cee5;},_0x35b380=(_0x567b96,_0xd74ee7)=>(_0x485317,_0x569991)=>_0xd74ee7(_0x485317,_0x569991,_0x567b96),_0x663ba8=(_0x8b9e1b,_0x363f91,_0x1535fb)=>_0xfa7958(_0x8b9e1b,typeof _0x363f91!='symbol'?_0x363f91+'':_0x363f91,_0x1535fb);_0x8187aa[_0x3f7229(0x10f)]=class extends _0x4c4d36[_0x3f7229(0xf3)]{constructor(_0x3b748b=_0x57b0be,_0x294b8d,_0x397a11){const _0x5187a0=_0x3f7229;super(),this[_0x5187a0(0xc8)]=_0x3b748b,this[_0x5187a0(0x10d)]=_0x294b8d,this[_0x5187a0(0xce)]=_0x397a11;const {..._0x5a72b8}=_0x4c4d36['merge']({},_0x57b0be,this[_0x5187a0(0xc8)]);this[_0x5187a0(0xce)]['setConfig'](_0xb24609,_0x5a72b8);}[_0x3f7229(0xdc)](){[[_0xf28e41],[_0x308a4a],[_0x2c0684]]['forEach'](_0x49dce5=>{this['_injector']['add'](_0x49dce5);});}[_0x3f7229(0xfe)](){const _0x150cfa=_0x3f7229;this['_injector']['get'](_0x308a4a),this[_0x150cfa(0x10d)][_0x150cfa(0xfc)](_0x2c0684);}},_0x663ba8(_0x8187aa[_0x3f7229(0x10f)],_0x3f7229(0x101),_0x22324a),_0x663ba8(_0x8187aa[_0x3f7229(0x10f)],'type',_0x4c4d36[_0x3f7229(0xc5)]['UNIVER_UNKNOWN']),_0x8187aa[_0x3f7229(0x10f)]=_0x5efc43([_0x4c4d36[_0x3f7229(0x111)](_0x2c95e6[_0x3f7229(0xfb)],_0x1765f4['UniverCollaborationClientPlugin'],_0x3d651f[_0x3f7229(0xb5)]),_0x35b380(0x1,_0x4c4d36[_0x3f7229(0xdf)](_0x4c4d36[_0x3f7229(0xda)])),_0x35b380(0x2,_0x4c4d36[_0x3f7229(0x109)])],_0x8187aa[_0x3f7229(0x10f)]),Object[_0x3f7229(0xe2)](_0x8187aa,Symbol['toStringTag'],{'value':_0x3f7229(0xd2)});}));
|
|
1
|
+
(function(_0x4f425f,_0x553422){const _0x56e436=_0x1b96,_0x5700fa=_0x4f425f();while(!![]){try{const _0x1bb94c=-parseInt(_0x56e436(0x187))/0x1*(parseInt(_0x56e436(0x18a))/0x2)+parseInt(_0x56e436(0x169))/0x3+parseInt(_0x56e436(0x16d))/0x4*(-parseInt(_0x56e436(0x160))/0x5)+parseInt(_0x56e436(0x1c2))/0x6+parseInt(_0x56e436(0x1bb))/0x7*(-parseInt(_0x56e436(0x1a8))/0x8)+parseInt(_0x56e436(0x1d4))/0x9*(-parseInt(_0x56e436(0x164))/0xa)+-parseInt(_0x56e436(0x168))/0xb*(-parseInt(_0x56e436(0x195))/0xc);if(_0x1bb94c===_0x553422)break;else _0x5700fa['push'](_0x5700fa['shift']());}catch(_0x527b31){_0x5700fa['push'](_0x5700fa['shift']());}}}(_0xf592,0x1fb5d),function(_0x205938,_0x36ef6b){const _0x2b9140=_0x1b96;typeof exports=='object'&&typeof module<'u'?_0x36ef6b(exports,require(_0x2b9140(0x19a)),require(_0x2b9140(0x1b7)),require(_0x2b9140(0x182)),require(_0x2b9140(0x1d3)),require(_0x2b9140(0x1a7)),require('rxjs'),require(_0x2b9140(0x184))):typeof define==_0x2b9140(0x1c3)&&define[_0x2b9140(0x1c8)]?define([_0x2b9140(0x17f),_0x2b9140(0x19a),_0x2b9140(0x1b7),'@univerjs/core',_0x2b9140(0x1d3),_0x2b9140(0x1a7),_0x2b9140(0x199),_0x2b9140(0x184)],_0x36ef6b):(_0x205938=typeof globalThis<'u'?globalThis:_0x205938||self,_0x36ef6b(_0x205938['UniverProThreadCommentDatasource']={},_0x205938[_0x2b9140(0x1b2)],_0x205938[_0x2b9140(0x194)],_0x205938['UniverCore'],_0x205938['UniverThreadCommentUi'],_0x205938[_0x2b9140(0x186)],_0x205938[_0x2b9140(0x199)],_0x205938['UniverNetwork']));}(this,function(_0x5f2d29,_0x3114cb,_0xe7522b,_0x5a4584,_0x53ff76,_0x1d5bd1,_0x425f98,_0x5eae30){'use strict';const _0x523c32=_0x1b96;const _0x1891ac=_0x523c32(0x1d9);var _0x560a64=(_0x5bac7a=>(_0x5bac7a[_0x5bac7a[_0x523c32(0x191)]=0x0]='OpenOrReOpen',_0x5bac7a[_0x5bac7a[_0x523c32(0x1c0)]=0x1]=_0x523c32(0x1c0),_0x5bac7a[_0x5bac7a[_0x523c32(0x171)]=-0x1]=_0x523c32(0x171),_0x5bac7a))(_0x560a64||{}),_0x5a5ab7=(_0x497d86=>(_0x497d86[_0x497d86['Unknown']=0x0]='Unknown',_0x497d86[_0x497d86[_0x523c32(0x1b1)]=0x1]=_0x523c32(0x1b1),_0x497d86[_0x497d86[_0x523c32(0x19c)]=0x2]='Reply',_0x497d86[_0x497d86[_0x523c32(0x1a3)]=0x3]='Edit',_0x497d86[_0x497d86[_0x523c32(0x1dc)]=0x4]=_0x523c32(0x1dc),_0x497d86[_0x497d86[_0x523c32(0x190)]=0x5]='Solve',_0x497d86[_0x497d86[_0x523c32(0x171)]=-0x1]=_0x523c32(0x171),_0x497d86))(_0x5a5ab7||{});const _0x571b60=_0x1b4cfe=>_0x5a4584['dayjs'](new Date(+_0x1b4cfe))['format'](_0x523c32(0x16c)),_0x4b38a0=async(_0x3dd1b5,_0x435f88)=>{const _0x1f154c=_0x523c32,_0x28cd9c=_0x3dd1b5[_0x1f154c(0x1b0)](_0x5a4584[_0x1f154c(0x170)]),_0x20e528=_0x3dd1b5[_0x1f154c(0x1b0)](_0x5eae30[_0x1f154c(0x181)]);_0x435f88[_0x1f154c(0x192)](_0x50f032=>{const _0x4dd7ba=_0x1f154c;_0x28cd9c[_0x4dd7ba(0x178)](_0x50f032)&&_0x435f88['delete'](_0x50f032);}),_0x435f88[_0x1f154c(0x1c4)]&&(await _0x20e528[_0x1f154c(0x1b0)](_0x1f154c(0x166),{'params':{'userIDs':[..._0x435f88]}}))[_0x1f154c(0x1e0)][_0x1f154c(0x185)][_0x1f154c(0x192)](_0x19643a=>{const _0x16d852=_0x1f154c;_0x19643a&&_0x28cd9c[_0x16d852(0x1d0)](_0x19643a);});};var _0x3cbd06=Object[_0x523c32(0x1bc)],_0x489706=(_0x4f8e9f,_0x4ca9eb,_0x44603e,_0x2dd702)=>{const _0x3f6f39=_0x523c32;for(var _0x130810=_0x2dd702>0x1?void 0x0:_0x2dd702?_0x3cbd06(_0x4ca9eb,_0x44603e):_0x4ca9eb,_0x10549e=_0x4f8e9f[_0x3f6f39(0x188)]-0x1,_0x21ef0d;_0x10549e>=0x0;_0x10549e--)(_0x21ef0d=_0x4f8e9f[_0x10549e])&&(_0x130810=_0x21ef0d(_0x130810)||_0x130810);return _0x130810;},_0x203176=(_0x547b22,_0x5480fc)=>(_0x3b364e,_0x43a11c)=>_0x5480fc(_0x3b364e,_0x43a11c,_0x547b22);let _0x36954c=class extends _0x5a4584[_0x523c32(0x1a2)]{constructor(_0x4a336f,_0x5da394,_0x8a09c,_0x2203b3){const _0x1543be=_0x523c32;super(),this[_0x1543be(0x1aa)]=_0x4a336f,this[_0x1543be(0x183)]=_0x5da394,this[_0x1543be(0x17d)]=_0x8a09c,this[_0x1543be(0x167)]=_0x2203b3,this[_0x1543be(0x179)](),this['_initUserSync']();}['_initUserSync'](){const _0x11c5e4=_0x523c32;this['disposeWithMe'](this[_0x11c5e4(0x183)][_0x11c5e4(0x162)][_0x11c5e4(0x1a9)](_0x425f98['bufferTime'](0x10))[_0x11c5e4(0x1c6)](_0x4a3820=>{const _0x1674c4=_0x11c5e4,_0x6b65f0=new Set();_0x4a3820[_0x1674c4(0x192)](_0x3be6ce=>{const _0x11e75e=_0x1674c4;switch(_0x3be6ce[_0x11e75e(0x1c5)]){case'add':{const _0x56d92e=_0x3be6ce[_0x11e75e(0x1da)][_0x11e75e(0x1c7)];_0x6b65f0[_0x11e75e(0x16a)](_0x56d92e);break;}}}),_0x4b38a0(this[_0x1674c4(0x167)],_0x6b65f0);}));}['_init'](){const _0x180834=_0x523c32;this[_0x180834(0x1e3)](this[_0x180834(0x1aa)][_0x180834(0x162)][_0x180834(0x1c6)](async _0x11ff8b=>{const _0x44774c=_0x180834;var _0x138bde,_0x32e228,_0x99230,_0x283095;const _0x2a8ead=(_0x138bde=this[_0x44774c(0x183)]['getUnit'](_0x11ff8b['unitId'])[_0x44774c(0x180)](_0x520a14=>_0x520a14[_0x44774c(0x1a6)]===_0x11ff8b[_0x44774c(0x1a6)]))==null?void 0x0:_0x138bde[_0x44774c(0x173)];if(!_0x2a8ead)return;const {unitId:_0x13d5c1,subUnitId:_0x51e12a}=_0x2a8ead;switch(_0x11ff8b[_0x44774c(0x172)]&&this[_0x44774c(0x17d)][_0x44774c(0x1d0)](_0x11ff8b[_0x44774c(0x172)]),_0x11ff8b[_0x44774c(0x1c5)]){case _0x5a5ab7[_0x44774c(0x1b1)]:break;case _0x5a5ab7[_0x44774c(0x19c)]:{this[_0x44774c(0x183)][_0x44774c(0x1b6)](_0x13d5c1,_0x51e12a,{'unitId':_0x13d5c1,'subUnitId':_0x51e12a,'ref':'','id':_0x11ff8b['replyId'],'dT':_0x571b60(+_0x11ff8b[_0x44774c(0x1c1)]),'threadId':_0x11ff8b['threadId'],'personId':(_0x99230=(_0x32e228=_0x11ff8b[_0x44774c(0x172)])==null?void 0x0:_0x32e228[_0x44774c(0x17e)])!=null?_0x99230:_0x11ff8b[_0x44774c(0x1cc)],'text':JSON['parse'](_0x11ff8b[_0x44774c(0x17c)]),'parentId':_0x2a8ead['id']});break;}case _0x5a5ab7['Delete']:{const _0x4b5275=this['_threadCommentModel'][_0x44774c(0x174)](_0x13d5c1,_0x51e12a,_0x11ff8b[_0x44774c(0x1df)]);_0x4b5275&&_0x4b5275[_0x44774c(0x1d7)]&&this[_0x44774c(0x183)][_0x44774c(0x163)](_0x13d5c1,_0x51e12a,_0x11ff8b[_0x44774c(0x1df)]);break;}case _0x5a5ab7[_0x44774c(0x1a3)]:{this[_0x44774c(0x183)]['updateComment'](_0x13d5c1,_0x51e12a,{'commentId':_0x11ff8b[_0x44774c(0x1df)],'text':JSON['parse'](_0x11ff8b[_0x44774c(0x17c)])});break;}case _0x5a5ab7[_0x44774c(0x190)]:{const _0x42a482=(_0x283095=this[_0x44774c(0x183)][_0x44774c(0x19f)](_0x11ff8b['unitId'])[_0x44774c(0x180)](_0x4964cb=>_0x4964cb['threadId']===_0x11ff8b[_0x44774c(0x1a6)]))==null?void 0x0:_0x283095[_0x44774c(0x173)];_0x42a482&&this[_0x44774c(0x183)][_0x44774c(0x1b9)](_0x13d5c1,_0x51e12a,_0x42a482['id'],_0x11ff8b[_0x44774c(0x193)]===_0x560a64['Solved']);break;}}}));}};_0x36954c=_0x489706([_0x203176(0x0,_0x5a4584['Inject'](_0x3114cb[_0x523c32(0x1ab)])),_0x203176(0x1,_0x5a4584[_0x523c32(0x16e)](_0x1d5bd1[_0x523c32(0x19b)])),_0x203176(0x2,_0x5a4584['Inject'](_0x5a4584[_0x523c32(0x170)])),_0x203176(0x3,_0x5a4584[_0x523c32(0x16e)](_0x5a4584[_0x523c32(0x197)]))],_0x36954c);const _0x984f58=_0x523c32(0x1ac),_0x39a2df={};var _0x2c5f27=Object[_0x523c32(0x1bc)],_0x1013b6=(_0x1499a7,_0x7bd32a,_0x194dd3,_0xe76220)=>{const _0xa4ff4d=_0x523c32;for(var _0x57ed29=_0xe76220>0x1?void 0x0:_0xe76220?_0x2c5f27(_0x7bd32a,_0x194dd3):_0x7bd32a,_0x442813=_0x1499a7[_0xa4ff4d(0x188)]-0x1,_0x128bbd;_0x442813>=0x0;_0x442813--)(_0x128bbd=_0x1499a7[_0x442813])&&(_0x57ed29=_0x128bbd(_0x57ed29)||_0x57ed29);return _0x57ed29;},_0x2ad279=(_0x3cea7e,_0x418e71)=>(_0x45bd4d,_0xb58a7e)=>_0x418e71(_0x45bd4d,_0xb58a7e,_0x3cea7e);function _0x5aea21(_0x120db0,_0x39962b){const _0x186ea6=_0x523c32,_0x3806a6=_0x120db0[_0x186ea6(0x1bf)][0x0];return{..._0x39962b,'id':_0x3806a6[_0x186ea6(0x1df)],'resolved':_0x120db0['solved']===0x1,'dT':_0x571b60(_0x3806a6['createTimestamp']),'personId':_0x3806a6[_0x186ea6(0x1cc)],'threadId':_0x3806a6[_0x186ea6(0x1a6)]};}function _0x2d932d(_0xde81d0,_0x3379de,_0xa0f14){const _0x37f801=_0x523c32;var _0x780ccd,_0x5c0110;if(((_0x5c0110=(_0x780ccd=_0xde81d0==null?void 0x0:_0xde81d0[_0x37f801(0x1bf)])==null?void 0x0:_0x780ccd[_0x37f801(0x188)])!=null?_0x5c0110:0x0)>0x0){const _0x5309ab=(_0x4c7e82,_0xfaf77)=>({'id':_0x4c7e82['replyId'],'threadId':_0x4c7e82[_0x37f801(0x1a6)],'dT':_0x571b60(_0x4c7e82['createTimestamp']),'personId':_0x4c7e82['userId'],'resolved':_0xde81d0[_0x37f801(0x193)]===_0x560a64[_0x37f801(0x1c0)],'unitId':_0x3379de,'subUnitId':_0xa0f14,'text':JSON[_0x37f801(0x15d)](_0x4c7e82['content']),'parentId':_0xfaf77}),_0x31c47d=_0x5309ab(_0xde81d0[_0x37f801(0x1bf)][0x0]);return{..._0x31c47d,'children':_0xde81d0['replies'][_0x37f801(0x16b)](0x1)[_0x37f801(0x18f)](_0x4005b4=>_0x5309ab(_0x4005b4,_0x31c47d['id']))};}return null;}let _0x6b5dff=class{constructor(_0x184193,_0x151e82,_0x1d0121,_0x5053dc){const _0x39d7e4=_0x523c32;this[_0x39d7e4(0x15e)]=_0x184193,this[_0x39d7e4(0x17d)]=_0x151e82,this[_0x39d7e4(0x1a0)]=_0x1d0121,this[_0x39d7e4(0x167)]=_0x5053dc;}async['addComment'](_0x58e7cd){const _0x4410ae=_0x523c32;var _0x367885,_0x2fa9dd;const {parentId:_0x1820b9,unitId:_0x2032e1,text:_0x26360d,threadId:_0x217f3e}=_0x58e7cd,_0xe85873=(_0x2fa9dd=(_0x367885=_0x26360d[_0x4410ae(0x175)])==null?void 0x0:_0x367885['filter'](_0x5d6b3e=>_0x5d6b3e['rangeType']===_0x5a4584[_0x4410ae(0x18e)]['COMMENT'])['map'](_0x543560=>_0x543560[_0x4410ae(0x1de)]))!=null?_0x2fa9dd:[],_0x4b1225=JSON[_0x4410ae(0x1db)](_0x26360d),_0x5b8c16=(await this['_sessionService'][_0x4410ae(0x17b)](_0x2032e1))[_0x4410ae(0x161)]();if(_0x1820b9){const _0x5a61fd={'memberId':_0x5b8c16,'unitId':_0x2032e1,'content':_0x4b1225,'mention':_0xe85873,'threadId':_0x217f3e},_0x4872e4=(await this[_0x4410ae(0x15e)]['post'](_0x4410ae(0x1cd)+_0x2032e1+_0x4410ae(0x1b5),{'body':_0x5a61fd}))[_0x4410ae(0x1e0)][_0x4410ae(0x1cb)];return{..._0x58e7cd,'id':_0x4872e4[_0x4410ae(0x1df)],'dT':_0x5a4584['dayjs'](+_0x4872e4[_0x4410ae(0x1c1)])[_0x4410ae(0x1bd)](_0x4410ae(0x16c)),'personId':_0x4872e4[_0x4410ae(0x1cc)]};}else{const _0x426e7c={'memberId':_0x5b8c16,'unitId':_0x2032e1,'content':_0x4b1225,'mention':_0xe85873},_0x571881=await this[_0x4410ae(0x15e)][_0x4410ae(0x1dd)](_0x4410ae(0x1cd)+_0x2032e1+_0x4410ae(0x196),{'body':_0x426e7c});return _0x5aea21(_0x571881[_0x4410ae(0x1e0)][_0x4410ae(0x18d)],_0x58e7cd);}}async[_0x523c32(0x15f)](_0x355415){const _0x1d1911=_0x523c32;var _0x4692f9,_0x5c5c00;const {text:_0x3ba571,unitId:_0x15d66a}=_0x355415,_0xc8b0a8=(_0x5c5c00=(_0x4692f9=_0x3ba571[_0x1d1911(0x175)])==null?void 0x0:_0x4692f9[_0x1d1911(0x18b)](_0x1c0372=>_0x1c0372['rangeType']===_0x5a4584['CustomRangeType']['COMMENT'])[_0x1d1911(0x18f)](_0x408293=>_0x408293['rangeId']))!=null?_0x5c5c00:[],_0x4a15b6=JSON[_0x1d1911(0x1db)](_0x3ba571),_0x3449e7=_0x355415[_0x1d1911(0x1a6)],_0x45d0bc=_0x355415['id'],_0x1a490c={'memberId':(await this[_0x1d1911(0x1a0)][_0x1d1911(0x17b)](_0x15d66a))['getMemberID'](),'unitId':_0x15d66a,'threadId':_0x3449e7,'mention':_0xc8b0a8,'content':_0x4a15b6,'replyId':_0x45d0bc},_0x359370=await this[_0x1d1911(0x15e)]['post'](_0x1d1911(0x1cd)+_0x15d66a+_0x1d1911(0x1d1),{'body':_0x1a490c});return!_0x359370['body'][_0x1d1911(0x1a4)]||_0x359370[_0x1d1911(0x1e0)]['error'][_0x1d1911(0x177)]===0x1;}async[_0x523c32(0x1b9)](_0x2c62f1){const _0x3a96e7=_0x523c32,{unitId:_0x241de6}=_0x2c62f1,_0x317ed7=_0x2c62f1[_0x3a96e7(0x1a6)],_0x430810={'memberId':this[_0x3a96e7(0x17d)]['getCurrentUser']()[_0x3a96e7(0x17e)],'unitId':_0x241de6,'threadId':_0x317ed7,'solved':_0x2c62f1[_0x3a96e7(0x1d5)]?_0x560a64[_0x3a96e7(0x1c0)]:_0x560a64[_0x3a96e7(0x191)]},_0xd4c93b=await this[_0x3a96e7(0x15e)][_0x3a96e7(0x1dd)](_0x3a96e7(0x1cd)+_0x241de6+_0x3a96e7(0x19e),{'body':_0x430810});return!_0xd4c93b[_0x3a96e7(0x1e0)][_0x3a96e7(0x1a4)]||_0xd4c93b[_0x3a96e7(0x1e0)][_0x3a96e7(0x1a4)]['code']===0x1;}async['deleteComment'](_0x49256c,_0x4ec05c,_0x18ff4c,_0x1f74f7){const _0x4f5490=_0x523c32,_0x865bfb={'memberId':(await this['_sessionService'][_0x4f5490(0x17b)](_0x49256c))[_0x4f5490(0x161)](),'threadId':_0x18ff4c,'replyId':_0x1f74f7,'unitId':_0x49256c},_0x2c2329=await this['_httpService'][_0x4f5490(0x1dd)](_0x4f5490(0x1cd)+_0x49256c+_0x4f5490(0x1a5),{'body':_0x865bfb});return!_0x2c2329[_0x4f5490(0x1e0)][_0x4f5490(0x1a4)]||_0x2c2329[_0x4f5490(0x1e0)][_0x4f5490(0x1a4)][_0x4f5490(0x177)]===0x1;}async[_0x523c32(0x16f)](_0x2cf57a,_0x1824d7,_0x13418d){const _0x3eb49a=_0x523c32,_0x482ddd={'unitId':_0x2cf57a,'threadId':_0x13418d},_0xb8653d=await this[_0x3eb49a(0x15e)]['post'](_0x3eb49a(0x1cd)+_0x2cf57a+'/list',{'body':_0x482ddd}),_0x1019f2=_0x13418d[_0x3eb49a(0x18f)](_0x3da56a=>_0x2d932d(_0xb8653d[_0x3eb49a(0x1e0)]['comments'][_0x3da56a],_0x2cf57a,_0x1824d7))[_0x3eb49a(0x18b)](Boolean);return Object[_0x3eb49a(0x165)](_0xb8653d['body'][_0x3eb49a(0x185)])[_0x3eb49a(0x192)](_0x54c671=>{const _0x3aa476=_0x3eb49a;this[_0x3aa476(0x17d)][_0x3aa476(0x1d0)](_0x54c671);}),_0x1019f2;}[_0x523c32(0x1d2)](_0x5e8519){const _0x34494b=_0x523c32;return{'id':_0x5e8519['id'],'threadId':_0x5e8519[_0x34494b(0x1a6)],'ref':_0x5e8519[_0x34494b(0x1ad)]};}};_0x6b5dff=_0x1013b6([_0x2ad279(0x0,_0x5a4584[_0x523c32(0x16e)](_0x5eae30[_0x523c32(0x181)])),_0x2ad279(0x1,_0x5a4584[_0x523c32(0x16e)](_0x5a4584[_0x523c32(0x170)])),_0x2ad279(0x2,_0x5a4584['Inject'](_0x3114cb[_0x523c32(0x1ae)])),_0x2ad279(0x3,_0x5a4584[_0x523c32(0x16e)](_0x5a4584[_0x523c32(0x197)]))],_0x6b5dff);var _0x47818f=Object[_0x523c32(0x1bc)],_0x1d7b98=(_0x435dde,_0x2446ba,_0x1adb9d,_0xa54e68)=>{const _0xdaf0fa=_0x523c32;for(var _0x484cc2=_0xa54e68>0x1?void 0x0:_0xa54e68?_0x47818f(_0x2446ba,_0x1adb9d):_0x2446ba,_0xabb17b=_0x435dde[_0xdaf0fa(0x188)]-0x1,_0x1cc669;_0xabb17b>=0x0;_0xabb17b--)(_0x1cc669=_0x435dde[_0xabb17b])&&(_0x484cc2=_0x1cc669(_0x484cc2)||_0x484cc2);return _0x484cc2;},_0x48d4dc=(_0x110433,_0xd394e7)=>(_0x13d46d,_0x18a322)=>_0xd394e7(_0x13d46d,_0x18a322,_0x110433);let _0x3d2a45=class extends _0x5a4584['Disposable']{constructor(_0x24338f,_0x1b343a){const _0x396fd7=_0x523c32;super(),this[_0x396fd7(0x1b4)]=_0x24338f,this[_0x396fd7(0x1b8)]=_0x1b343a,this[_0x396fd7(0x1be)]();}[_0x523c32(0x1be)](){const _0x353d0e=_0x523c32;this[_0x353d0e(0x1b4)]['dataSource']=this[_0x353d0e(0x1b8)],this[_0x353d0e(0x1b4)][_0x353d0e(0x1e2)]=!0x1;}};_0x3d2a45=_0x1d7b98([_0x48d4dc(0x0,_0x1d5bd1[_0x523c32(0x176)]),_0x48d4dc(0x1,_0x5a4584[_0x523c32(0x16e)](_0x6b5dff))],_0x3d2a45);var _0x21e692=Object[_0x523c32(0x198)],_0x376899=Object[_0x523c32(0x1bc)],_0x12c9b0=(_0x54e692,_0x5c3a12,_0x371a2a)=>_0x5c3a12 in _0x54e692?_0x21e692(_0x54e692,_0x5c3a12,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x371a2a}):_0x54e692[_0x5c3a12]=_0x371a2a,_0x4177ba=(_0x3c85e7,_0x17ce88,_0x57c1ab,_0x28efd7)=>{const _0x108b2f=_0x523c32;for(var _0x23da03=_0x28efd7>0x1?void 0x0:_0x28efd7?_0x376899(_0x17ce88,_0x57c1ab):_0x17ce88,_0x17edd0=_0x3c85e7[_0x108b2f(0x188)]-0x1,_0xa0502d;_0x17edd0>=0x0;_0x17edd0--)(_0xa0502d=_0x3c85e7[_0x17edd0])&&(_0x23da03=_0xa0502d(_0x23da03)||_0x23da03);return _0x23da03;},_0x5259a4=(_0x1700e3,_0x1f65a4)=>(_0x1ae344,_0xe7a688)=>_0x1f65a4(_0x1ae344,_0xe7a688,_0x1700e3),_0x3e40b9=(_0x43aff6,_0x5eb7f8,_0x5195ab)=>_0x12c9b0(_0x43aff6,typeof _0x5eb7f8!='symbol'?_0x5eb7f8+'':_0x5eb7f8,_0x5195ab);_0x5f2d29['UniverThreadCommentDataSourcePlugin']=class extends _0x5a4584[_0x523c32(0x19d)]{constructor(_0x4cc9cc=_0x39a2df,_0x145dd8,_0x352bd0){const _0x299eb6=_0x523c32;super(),this[_0x299eb6(0x18c)]=_0x4cc9cc,this['_injector']=_0x145dd8,this[_0x299eb6(0x1d6)]=_0x352bd0;const {..._0x4fc6f1}=_0x5a4584['merge']({},_0x39a2df,this[_0x299eb6(0x18c)]);this[_0x299eb6(0x1d6)][_0x299eb6(0x1d8)](_0x984f58,_0x4fc6f1);}[_0x523c32(0x1a1)](){[[_0x6b5dff],[_0x3d2a45],[_0x36954c]]['forEach'](_0x5f1d0b=>{const _0x5a8e27=_0x1b96;this[_0x5a8e27(0x167)]['add'](_0x5f1d0b);});}['onReady'](){const _0x5c548e=_0x523c32;this[_0x5c548e(0x167)][_0x5c548e(0x1b0)](_0x3d2a45),this['_injector'][_0x5c548e(0x1b0)](_0x36954c);}},_0x3e40b9(_0x5f2d29[_0x523c32(0x1ba)],_0x523c32(0x1ce),_0x1891ac),_0x3e40b9(_0x5f2d29[_0x523c32(0x1ba)],_0x523c32(0x1c5),_0x5a4584[_0x523c32(0x1c9)][_0x523c32(0x1ca)]),_0x5f2d29[_0x523c32(0x1ba)]=_0x4177ba([_0x5a4584[_0x523c32(0x1cf)](_0x53ff76[_0x523c32(0x17a)],_0x3114cb[_0x523c32(0x1af)],_0xe7522b['UniverLicensePlugin']),_0x5259a4(0x1,_0x5a4584[_0x523c32(0x16e)](_0x5a4584[_0x523c32(0x197)])),_0x5259a4(0x2,_0x5a4584[_0x523c32(0x1b3)])],_0x5f2d29[_0x523c32(0x1ba)]),Object[_0x523c32(0x198)](_0x5f2d29,Symbol[_0x523c32(0x1e1)],{'value':_0x523c32(0x189)});}));function _0x1b96(_0x48bb6d,_0x225f6a){const _0xf59250=_0xf592();return _0x1b96=function(_0x1b96d1,_0x48ef0b){_0x1b96d1=_0x1b96d1-0x15d;let _0x1e17e8=_0xf59250[_0x1b96d1];return _0x1e17e8;},_0x1b96(_0x48bb6d,_0x225f6a);}function _0xf592(){const _0x48a465=['/reply','addComment','@univerjs-pro/license','_threadCommentDataSource','resolveComment','UniverThreadCommentDataSourcePlugin','49CdaOPX','getOwnPropertyDescriptor','format','_initDataSource','replies','Solved','createTimestamp','560388JndqEk','function','size','type','subscribe','personId','amd','UniverInstanceType','UNIVER_UNKNOWN','reply','userId','/universer-api/comment/unit/','pluginName','DependentOn','addUser','/edit','saveCommentToSnapshot','@univerjs/thread-comment-ui','27LMHwTo','resolved','_configService','parentId','setConfig','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','payload','stringify','Delete','post','rangeId','replyId','body','toStringTag','syncUpdateMutationToColla','disposeWithMe','parse','_httpService','updateComment','184015wghJvz','getMemberID','commentUpdate$','deleteComment','635980AvlcRI','values','/universer-api/user/list','_injector','131659TJiQAZ','597324gJBwzl','add','slice','YYYY/MM/DD\x20HH:mm','16yTLzfV','Inject','listComments','UserManagerService','UNRECOGNIZED','user','root','getComment','customRanges','IThreadCommentDataSourceService','code','getUser','_init','UniverThreadCommentUIPlugin','requireSession','content','_userService','userID','exports','find','HTTPService','@univerjs/core','_threadCommentModel','@univerjs/network','users','UniverThreadComment','486aFpQVG','length','Module','36arWYgC','filter','_config','comment','CustomRangeType','map','Solve','OpenOrReOpen','forEach','solved','UniverProLicense','276iieizD','/add','Injector','defineProperty','rxjs','@univerjs-pro/collaboration-client','ThreadCommentModel','Reply','Plugin','/solved','getUnit','_sessionService','onStarting','Disposable','Edit','error','/delete','threadId','@univerjs/thread-comment','104176pCyoJZ','pipe','_commentService','CommentService','thread-comment-data-source.config','ref','CollaborationSessionService','UniverCollaborationClientPlugin','get','Add','UniverProCollaborationClient','IConfigService','_threadCommentDataSourceService'];_0xf592=function(){return _0x48a465;};return _0xf592();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.1-nightly.
|
|
3
|
+
"version": "0.8.1-nightly.202506181607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/license": "0.8.1-nightly.202506181607",
|
|
49
|
+
"@univerjs/network": "0.8.1-nightly.202506181607",
|
|
50
|
+
"@univerjs/core": "0.8.1-nightly.202506181607",
|
|
51
|
+
"@univerjs-pro/collaboration-client": "0.8.1-nightly.202506181607",
|
|
52
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/thread-comment
|
|
54
|
-
"@univerjs/thread-comment": "0.8.1-nightly.
|
|
53
|
+
"@univerjs/thread-comment": "0.8.1-nightly.202506181607",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.8.1-nightly.202506181607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|