@univerjs-pro/thread-comment-datasource 0.8.1-nightly.202506171607 → 0.8.1-nightly.202506191607
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 +8 -8
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 _0x15e887=_0x1164;(function(_0xc94286,_0xc09eb4){const _0x1dd8a4=_0x1164,_0x201b32=_0xc94286();while(!![]){try{const _0x227a56=-parseInt(_0x1dd8a4(0x90))/0x1+parseInt(_0x1dd8a4(0xbb))/0x2*(-parseInt(_0x1dd8a4(0xaf))/0x3)+parseInt(_0x1dd8a4(0xd1))/0x4*(parseInt(_0x1dd8a4(0xcd))/0x5)+parseInt(_0x1dd8a4(0x9f))/0x6+parseInt(_0x1dd8a4(0xad))/0x7+parseInt(_0x1dd8a4(0xd3))/0x8+-parseInt(_0x1dd8a4(0x76))/0x9;if(_0x227a56===_0xc09eb4)break;else _0x201b32['push'](_0x201b32['shift']());}catch(_0x34bb93){_0x201b32['push'](_0x201b32['shift']());}}}(_0x2408,0x9b654));Object[_0x15e887(0xa9)](exports,Symbol[_0x15e887(0x86)],{'value':_0x15e887(0x84)});const b=require(_0x15e887(0xb4)),T=require(_0x15e887(0xb9)),c=require(_0x15e887(0xd2)),j=require('@univerjs/thread-comment-ui'),M=require(_0x15e887(0x72)),w=require(_0x15e887(0x9a)),P=require(_0x15e887(0xdd)),U=_0x15e887(0x83);var I=(_0x409075=>(_0x409075[_0x409075[_0x15e887(0xcf)]=0x0]='OpenOrReOpen',_0x409075[_0x409075[_0x15e887(0xdc)]=0x1]='Solved',_0x409075[_0x409075[_0x15e887(0xbf)]=-0x1]=_0x15e887(0xbf),_0x409075))(I||{}),v=(_0x64cc74=>(_0x64cc74[_0x64cc74[_0x15e887(0x7c)]=0x0]=_0x15e887(0x7c),_0x64cc74[_0x64cc74[_0x15e887(0x98)]=0x1]=_0x15e887(0x98),_0x64cc74[_0x64cc74[_0x15e887(0xb2)]=0x2]=_0x15e887(0xb2),_0x64cc74[_0x64cc74[_0x15e887(0xb7)]=0x3]=_0x15e887(0xb7),_0x64cc74[_0x64cc74['Delete']=0x4]=_0x15e887(0xc1),_0x64cc74[_0x64cc74[_0x15e887(0x89)]=0x5]=_0x15e887(0x89),_0x64cc74[_0x64cc74[_0x15e887(0xbf)]=-0x1]=_0x15e887(0xbf),_0x64cc74))(v||{});const f=_0x174958=>c[_0x15e887(0x74)](new Date(+_0x174958))[_0x15e887(0x9b)](_0x15e887(0x88)),R=async(_0x3a6f29,_0x5b4863)=>{const _0x2a2c54=_0x15e887,_0xd62069=_0x3a6f29[_0x2a2c54(0x81)](c[_0x2a2c54(0xa6)]),_0x2263c0=_0x3a6f29[_0x2a2c54(0x81)](P[_0x2a2c54(0x8d)]);_0x5b4863[_0x2a2c54(0xc7)](_0x26ed8a=>{const _0x2fe49b=_0x2a2c54;_0xd62069[_0x2fe49b(0x71)](_0x26ed8a)&&_0x5b4863[_0x2fe49b(0xb3)](_0x26ed8a);}),_0x5b4863['size']&&(await _0x2263c0['get'](_0x2a2c54(0x7b),{'params':{'userIDs':[..._0x5b4863]}}))[_0x2a2c54(0x80)][_0x2a2c54(0x6b)]['forEach'](_0x55a796=>{const _0x55bd0f=_0x2a2c54;_0x55a796&&_0xd62069[_0x55bd0f(0x95)](_0x55a796);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x2d0e97,_0x245ede,_0x9f5764,_0x3cfac5)=>{const _0x280ca9=_0x15e887;for(var _0x26c222=_0x3cfac5>0x1?void 0x0:_0x3cfac5?$(_0x245ede,_0x9f5764):_0x245ede,_0x2a5c91=_0x2d0e97[_0x280ca9(0xc8)]-0x1,_0x1a8ab2;_0x2a5c91>=0x0;_0x2a5c91--)(_0x1a8ab2=_0x2d0e97[_0x2a5c91])&&(_0x26c222=_0x1a8ab2(_0x26c222)||_0x26c222);return _0x26c222;},S=(_0x40fbbf,_0x1454db)=>(_0x17e701,_0x12ffdc)=>_0x1454db(_0x17e701,_0x12ffdc,_0x40fbbf);let p=class extends c['Disposable']{constructor(_0x4b50c3,_0x5b0f26,_0x52850a,_0x567249){const _0x4e11f0=_0x15e887;super(),this[_0x4e11f0(0xb1)]=_0x4b50c3,this[_0x4e11f0(0x6d)]=_0x5b0f26,this[_0x4e11f0(0x68)]=_0x52850a,this[_0x4e11f0(0xd7)]=_0x567249,this[_0x4e11f0(0x8a)](),this[_0x4e11f0(0x96)]();}[_0x15e887(0x96)](){const _0x392376=_0x15e887;this[_0x392376(0xe0)](this[_0x392376(0x6d)][_0x392376(0x66)]['pipe'](w['bufferTime'](0x10))[_0x392376(0xc3)](_0x50b004=>{const _0x3c17f4=_0x392376,_0x6c13d4=new Set();_0x50b004[_0x3c17f4(0xc7)](_0x5cfe0f=>{const _0x21fcd8=_0x3c17f4;switch(_0x5cfe0f[_0x21fcd8(0xc5)]){case _0x21fcd8(0xa3):{const _0x176da1=_0x5cfe0f[_0x21fcd8(0xa4)][_0x21fcd8(0x75)];_0x6c13d4[_0x21fcd8(0xa3)](_0x176da1);break;}}}),R(this[_0x3c17f4(0xd7)],_0x6c13d4);}));}[_0x15e887(0x8a)](){const _0x5d4cff=_0x15e887;this[_0x5d4cff(0xe0)](this['_commentService']['commentUpdate$'][_0x5d4cff(0xc3)](async _0x59fd1d=>{const _0x1b875d=_0x5d4cff;var _0x2d838c,_0x56c1fb,_0x13a400,_0x10106f;const _0x571d25=(_0x2d838c=this[_0x1b875d(0x6d)][_0x1b875d(0xe3)](_0x59fd1d[_0x1b875d(0x97)])[_0x1b875d(0x78)](_0x47470e=>_0x47470e['threadId']===_0x59fd1d[_0x1b875d(0x7f)]))==null?void 0x0:_0x2d838c[_0x1b875d(0xbc)];if(!_0x571d25)return;const {unitId:_0x338f2e,subUnitId:_0x5e4b20}=_0x571d25;switch(_0x59fd1d[_0x1b875d(0xcc)]&&this['_userService']['addUser'](_0x59fd1d[_0x1b875d(0xcc)]),_0x59fd1d['type']){case v[_0x1b875d(0x98)]:break;case v[_0x1b875d(0xb2)]:{this[_0x1b875d(0x6d)][_0x1b875d(0xc6)](_0x338f2e,_0x5e4b20,{'unitId':_0x338f2e,'subUnitId':_0x5e4b20,'ref':'','id':_0x59fd1d[_0x1b875d(0xe2)],'dT':f(+_0x59fd1d[_0x1b875d(0xa7)]),'threadId':_0x59fd1d[_0x1b875d(0x7f)],'personId':(_0x13a400=(_0x56c1fb=_0x59fd1d[_0x1b875d(0xcc)])==null?void 0x0:_0x56c1fb[_0x1b875d(0xdf)])!=null?_0x13a400:_0x59fd1d[_0x1b875d(0x69)],'text':JSON[_0x1b875d(0xa5)](_0x59fd1d['content']),'parentId':_0x571d25['id']});break;}case v['Delete']:{const _0x3cd296=this[_0x1b875d(0x6d)][_0x1b875d(0x8c)](_0x338f2e,_0x5e4b20,_0x59fd1d[_0x1b875d(0xe2)]);_0x3cd296&&_0x3cd296[_0x1b875d(0xd4)]&&this[_0x1b875d(0x6d)][_0x1b875d(0xb0)](_0x338f2e,_0x5e4b20,_0x59fd1d[_0x1b875d(0xe2)]);break;}case v[_0x1b875d(0xb7)]:{this[_0x1b875d(0x6d)][_0x1b875d(0x79)](_0x338f2e,_0x5e4b20,{'commentId':_0x59fd1d[_0x1b875d(0xe2)],'text':JSON[_0x1b875d(0xa5)](_0x59fd1d[_0x1b875d(0xac)])});break;}case v[_0x1b875d(0x89)]:{const _0x5459a5=(_0x10106f=this[_0x1b875d(0x6d)][_0x1b875d(0xe3)](_0x59fd1d['unitId'])['find'](_0x186c6d=>_0x186c6d[_0x1b875d(0x7f)]===_0x59fd1d[_0x1b875d(0x7f)]))==null?void 0x0:_0x10106f[_0x1b875d(0xbc)];_0x5459a5&&this[_0x1b875d(0x6d)][_0x1b875d(0xc9)](_0x338f2e,_0x5e4b20,_0x5459a5['id'],_0x59fd1d[_0x1b875d(0x6c)]===I[_0x1b875d(0xdc)]);break;}}}));}};p=E([S(0x0,c[_0x15e887(0x67)](b[_0x15e887(0x70)])),S(0x1,c[_0x15e887(0x67)](M[_0x15e887(0xcb)])),S(0x2,c[_0x15e887(0x67)](c[_0x15e887(0xa6)])),S(0x3,c['Inject'](c['Injector']))],p);const q='thread-comment-data-source.config',D={};function _0x1164(_0x3df065,_0x1140e2){const _0x2408f7=_0x2408();return _0x1164=function(_0x116407,_0x228804){_0x116407=_0x116407-0x66;let _0x45596c=_0x2408f7[_0x116407];return _0x45596c;},_0x1164(_0x3df065,_0x1140e2);}function _0x2408(){const _0xaa8da1=['_commentService','Reply','delete','@univerjs-pro/collaboration-client','_configService','getCurrentUser','Edit','/edit','@univerjs-pro/license','UniverLicensePlugin','829742SnuhdU','root','onStarting','CustomRangeType','UNRECOGNIZED','/add','Delete','/universer-api/comment/unit/','subscribe','getMemberID','type','addComment','forEach','length','resolveComment','pluginName','ThreadCommentModel','user','96655cuweEf','UniverThreadCommentUIPlugin','OpenOrReOpen','error','16iNCLWT','@univerjs/core','9850200NCdclm','parentId','_config','code','_injector','requireSession','Injector','getOwnPropertyDescriptor','UniverInstanceType','Solved','@univerjs/network','ref','userID','disposeWithMe','IConfigService','replyId','getUnit','commentUpdate$','Inject','_userService','userId','setConfig','users','solved','_threadCommentModel','merge','customRanges','CommentService','getUser','@univerjs/thread-comment','UniverThreadCommentDataSourcePlugin','dayjs','personId','2585286jEAlWL','IThreadCommentDataSourceService','find','updateComment','listComments','/universer-api/user/list','Unknown','resolved','UniverCollaborationClientPlugin','threadId','body','get','CollaborationSessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Module','_sessionService','toStringTag','stringify','YYYY/MM/DD\x20HH:mm','Solve','_init','map','getComment','HTTPService','_initDataSource','syncUpdateMutationToColla','933907suLqSX','slice','replies','Disposable','Plugin','addUser','_initUserSync','unitId','Add','rangeType','rxjs','format','_threadCommentDataSourceService','comments','rangeId','1487022waSPhb','filter','/solved','saveCommentToSnapshot','add','payload','parse','UserManagerService','createTimestamp','post','defineProperty','_threadCommentDataSource','_httpService','content','5012672DPTOJx','reply','3OSfQFW','deleteComment'];_0x2408=function(){return _0xaa8da1;};return _0x2408();}var A=Object['getOwnPropertyDescriptor'],x=(_0x3def90,_0x2012e6,_0x497258,_0x431d10)=>{for(var _0x1ab9b1=_0x431d10>0x1?void 0x0:_0x431d10?A(_0x2012e6,_0x497258):_0x2012e6,_0xba4e9b=_0x3def90['length']-0x1,_0x1f5dcf;_0xba4e9b>=0x0;_0xba4e9b--)(_0x1f5dcf=_0x3def90[_0xba4e9b])&&(_0x1ab9b1=_0x1f5dcf(_0x1ab9b1)||_0x1ab9b1);return _0x1ab9b1;},_=(_0xe08f35,_0x59cd6c)=>(_0x240bfe,_0x2b2ea8)=>_0x59cd6c(_0x240bfe,_0x2b2ea8,_0xe08f35);function Y(_0x34c048,_0x2b119a){const _0x55f906=_0x15e887,_0x188f36=_0x34c048[_0x55f906(0x92)][0x0];return{..._0x2b119a,'id':_0x188f36[_0x55f906(0xe2)],'resolved':_0x34c048[_0x55f906(0x6c)]===0x1,'dT':f(_0x188f36[_0x55f906(0xa7)]),'personId':_0x188f36[_0x55f906(0x69)],'threadId':_0x188f36[_0x55f906(0x7f)]};}function G(_0x22a855,_0x439e76,_0x1d424f){const _0x1a2b06=_0x15e887;var _0x191195,_0x1b7c58;if(((_0x1b7c58=(_0x191195=_0x22a855==null?void 0x0:_0x22a855[_0x1a2b06(0x92)])==null?void 0x0:_0x191195['length'])!=null?_0x1b7c58:0x0)>0x0){const _0xae7a65=(_0xb6ed3e,_0x212744)=>({'id':_0xb6ed3e[_0x1a2b06(0xe2)],'threadId':_0xb6ed3e[_0x1a2b06(0x7f)],'dT':f(_0xb6ed3e['createTimestamp']),'personId':_0xb6ed3e[_0x1a2b06(0x69)],'resolved':_0x22a855[_0x1a2b06(0x6c)]===I['Solved'],'unitId':_0x439e76,'subUnitId':_0x1d424f,'text':JSON[_0x1a2b06(0xa5)](_0xb6ed3e[_0x1a2b06(0xac)]),'parentId':_0x212744}),_0x48a65f=_0xae7a65(_0x22a855[_0x1a2b06(0x92)][0x0]);return{..._0x48a65f,'children':_0x22a855[_0x1a2b06(0x92)][_0x1a2b06(0x91)](0x1)['map'](_0x2be706=>_0xae7a65(_0x2be706,_0x48a65f['id']))};}return null;}let g=class{constructor(_0x2cb202,_0x2dfdc3,_0x1aed90,_0x4f839){const _0x34f97a=_0x15e887;this[_0x34f97a(0xab)]=_0x2cb202,this[_0x34f97a(0x68)]=_0x2dfdc3,this['_sessionService']=_0x1aed90,this[_0x34f97a(0xd7)]=_0x4f839;}async[_0x15e887(0xc6)](_0x2fa197){const _0x1b6738=_0x15e887;var _0xd2f01a,_0x38bcd8;const {parentId:_0x2d71d2,unitId:_0x45acb1,text:_0xda47d0,threadId:_0x8d5d9e}=_0x2fa197,_0x424ecf=(_0x38bcd8=(_0xd2f01a=_0xda47d0[_0x1b6738(0x6f)])==null?void 0x0:_0xd2f01a[_0x1b6738(0xa0)](_0x1ac7c2=>_0x1ac7c2[_0x1b6738(0x99)]===c[_0x1b6738(0xbe)]['COMMENT'])[_0x1b6738(0x8b)](_0x34d31f=>_0x34d31f['rangeId']))!=null?_0x38bcd8:[],_0x11b823=JSON[_0x1b6738(0x87)](_0xda47d0),_0x3627e3=(await this['_sessionService']['requireSession'](_0x45acb1))['getMemberID']();if(_0x2d71d2){const _0x3646e9={'memberId':_0x3627e3,'unitId':_0x45acb1,'content':_0x11b823,'mention':_0x424ecf,'threadId':_0x8d5d9e},_0x580b9d=(await this[_0x1b6738(0xab)][_0x1b6738(0xa8)](_0x1b6738(0xc2)+_0x45acb1+'/reply',{'body':_0x3646e9}))[_0x1b6738(0x80)][_0x1b6738(0xae)];return{..._0x2fa197,'id':_0x580b9d[_0x1b6738(0xe2)],'dT':c[_0x1b6738(0x74)](+_0x580b9d[_0x1b6738(0xa7)])[_0x1b6738(0x9b)](_0x1b6738(0x88)),'personId':_0x580b9d['userId']};}else{const _0x43fa16={'memberId':_0x3627e3,'unitId':_0x45acb1,'content':_0x11b823,'mention':_0x424ecf},_0x561831=await this[_0x1b6738(0xab)][_0x1b6738(0xa8)](_0x1b6738(0xc2)+_0x45acb1+_0x1b6738(0xc0),{'body':_0x43fa16});return Y(_0x561831[_0x1b6738(0x80)]['comment'],_0x2fa197);}}async[_0x15e887(0x79)](_0x2db338){const _0x521cf5=_0x15e887;var _0x3fdc22,_0x194952;const {text:_0x5efe67,unitId:_0x2776ee}=_0x2db338,_0x363687=(_0x194952=(_0x3fdc22=_0x5efe67['customRanges'])==null?void 0x0:_0x3fdc22[_0x521cf5(0xa0)](_0x10e1af=>_0x10e1af[_0x521cf5(0x99)]===c[_0x521cf5(0xbe)]['COMMENT'])[_0x521cf5(0x8b)](_0x1e9c36=>_0x1e9c36[_0x521cf5(0x9e)]))!=null?_0x194952:[],_0x57b892=JSON['stringify'](_0x5efe67),_0x578bc6=_0x2db338[_0x521cf5(0x7f)],_0x2443fe=_0x2db338['id'],_0x5e7f2c={'memberId':(await this[_0x521cf5(0x85)][_0x521cf5(0xd8)](_0x2776ee))[_0x521cf5(0xc4)](),'unitId':_0x2776ee,'threadId':_0x578bc6,'mention':_0x363687,'content':_0x57b892,'replyId':_0x2443fe},_0x263c99=await this['_httpService'][_0x521cf5(0xa8)](_0x521cf5(0xc2)+_0x2776ee+_0x521cf5(0xb8),{'body':_0x5e7f2c});return!_0x263c99[_0x521cf5(0x80)][_0x521cf5(0xd0)]||_0x263c99['body'][_0x521cf5(0xd0)]['code']===0x1;}async[_0x15e887(0xc9)](_0x3299a9){const _0x5d9501=_0x15e887,{unitId:_0x3ce6a3}=_0x3299a9,_0x5edac0=_0x3299a9[_0x5d9501(0x7f)],_0x10f76b={'memberId':this[_0x5d9501(0x68)][_0x5d9501(0xb6)]()['userID'],'unitId':_0x3ce6a3,'threadId':_0x5edac0,'solved':_0x3299a9[_0x5d9501(0x7d)]?I['Solved']:I[_0x5d9501(0xcf)]},_0x26f14f=await this[_0x5d9501(0xab)][_0x5d9501(0xa8)](_0x5d9501(0xc2)+_0x3ce6a3+_0x5d9501(0xa1),{'body':_0x10f76b});return!_0x26f14f[_0x5d9501(0x80)][_0x5d9501(0xd0)]||_0x26f14f[_0x5d9501(0x80)][_0x5d9501(0xd0)][_0x5d9501(0xd6)]===0x1;}async['deleteComment'](_0x2b3263,_0x3cc3bd,_0x2c43e0,_0x1bad7f){const _0x516c3a=_0x15e887,_0x4dfe32={'memberId':(await this['_sessionService'][_0x516c3a(0xd8)](_0x2b3263))[_0x516c3a(0xc4)](),'threadId':_0x2c43e0,'replyId':_0x1bad7f,'unitId':_0x2b3263},_0x56852b=await this[_0x516c3a(0xab)][_0x516c3a(0xa8)](_0x516c3a(0xc2)+_0x2b3263+'/delete',{'body':_0x4dfe32});return!_0x56852b[_0x516c3a(0x80)]['error']||_0x56852b[_0x516c3a(0x80)][_0x516c3a(0xd0)]['code']===0x1;}async[_0x15e887(0x7a)](_0x3c3a4a,_0x3cface,_0x4dae9a){const _0x4d8de4=_0x15e887,_0x575243={'unitId':_0x3c3a4a,'threadId':_0x4dae9a},_0x5741ab=await this['_httpService'][_0x4d8de4(0xa8)]('/universer-api/comment/unit/'+_0x3c3a4a+'/list',{'body':_0x575243}),_0x3328cc=_0x4dae9a[_0x4d8de4(0x8b)](_0x1c8af8=>G(_0x5741ab[_0x4d8de4(0x80)][_0x4d8de4(0x9d)][_0x1c8af8],_0x3c3a4a,_0x3cface))[_0x4d8de4(0xa0)](Boolean);return Object['values'](_0x5741ab[_0x4d8de4(0x80)]['users'])[_0x4d8de4(0xc7)](_0x431778=>{const _0x3660c5=_0x4d8de4;this[_0x3660c5(0x68)][_0x3660c5(0x95)](_0x431778);}),_0x3328cc;}[_0x15e887(0xa2)](_0x4140b0){const _0x15992d=_0x15e887;return{'id':_0x4140b0['id'],'threadId':_0x4140b0[_0x15992d(0x7f)],'ref':_0x4140b0[_0x15992d(0xde)]};}};g=x([_(0x0,c['Inject'](P[_0x15e887(0x8d)])),_(0x1,c['Inject'](c[_0x15e887(0xa6)])),_(0x2,c['Inject'](b[_0x15e887(0x82)])),_(0x3,c[_0x15e887(0x67)](c[_0x15e887(0xd9)]))],g);var H=Object[_0x15e887(0xda)],J=(_0x271a28,_0x22f282,_0x4a4408,_0x5f3a3f)=>{for(var _0x1ef7ec=_0x5f3a3f>0x1?void 0x0:_0x5f3a3f?H(_0x22f282,_0x4a4408):_0x22f282,_0x296589=_0x271a28['length']-0x1,_0xd84bab;_0x296589>=0x0;_0x296589--)(_0xd84bab=_0x271a28[_0x296589])&&(_0x1ef7ec=_0xd84bab(_0x1ef7ec)||_0x1ef7ec);return _0x1ef7ec;},y=(_0x3959bc,_0x4f89fe)=>(_0x157237,_0x44122f)=>_0x4f89fe(_0x157237,_0x44122f,_0x3959bc);let C=class extends c[_0x15e887(0x93)]{constructor(_0x59ecb5,_0x48d5a7){const _0x2c585d=_0x15e887;super(),this[_0x2c585d(0x9c)]=_0x59ecb5,this[_0x2c585d(0xaa)]=_0x48d5a7,this['_initDataSource']();}[_0x15e887(0x8e)](){const _0x258fb0=_0x15e887;this['_threadCommentDataSourceService']['dataSource']=this[_0x258fb0(0xaa)],this['_threadCommentDataSourceService'][_0x258fb0(0x8f)]=!0x1;}};C=J([y(0x0,M[_0x15e887(0x77)]),y(0x1,c[_0x15e887(0x67)](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x43de76,_0x1e10d9,_0xaf3246)=>_0x1e10d9 in _0x43de76?F(_0x43de76,_0x1e10d9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xaf3246}):_0x43de76[_0x1e10d9]=_0xaf3246,W=(_0x9f9e4a,_0x5a309e,_0x4b2ee9,_0x3d2a97)=>{for(var _0x18042e=_0x3d2a97>0x1?void 0x0:_0x3d2a97?L(_0x5a309e,_0x4b2ee9):_0x5a309e,_0x53c0ca=_0x9f9e4a['length']-0x1,_0x1f2d1a;_0x53c0ca>=0x0;_0x53c0ca--)(_0x1f2d1a=_0x9f9e4a[_0x53c0ca])&&(_0x18042e=_0x1f2d1a(_0x18042e)||_0x18042e);return _0x18042e;},O=(_0x2a5ada,_0x3ee425)=>(_0xc26b77,_0x52bc35)=>_0x3ee425(_0xc26b77,_0x52bc35,_0x2a5ada),N=(_0x151059,_0x3f8807,_0x5dc914)=>Z(_0x151059,typeof _0x3f8807!='symbol'?_0x3f8807+'':_0x3f8807,_0x5dc914);exports[_0x15e887(0x73)]=class extends c[_0x15e887(0x94)]{constructor(_0x347475=D,_0xf483b1,_0x4d5b33){const _0x47b5ee=_0x15e887;super(),this[_0x47b5ee(0xd5)]=_0x347475,this[_0x47b5ee(0xd7)]=_0xf483b1,this[_0x47b5ee(0xb5)]=_0x4d5b33;const {..._0x52da4f}=c[_0x47b5ee(0x6e)]({},D,this[_0x47b5ee(0xd5)]);this[_0x47b5ee(0xb5)][_0x47b5ee(0x6a)](q,_0x52da4f);}[_0x15e887(0xbd)](){const _0x25088d=_0x15e887;[[g],[C],[p]][_0x25088d(0xc7)](_0x176f9b=>{const _0x16fe64=_0x25088d;this[_0x16fe64(0xd7)][_0x16fe64(0xa3)](_0x176f9b);});}['onReady'](){const _0x21eda9=_0x15e887;this[_0x21eda9(0xd7)]['get'](C),this[_0x21eda9(0xd7)][_0x21eda9(0x81)](p);}},N(exports[_0x15e887(0x73)],_0x15e887(0xca),U),N(exports[_0x15e887(0x73)],_0x15e887(0xc5),c[_0x15e887(0xdb)]['UNIVER_UNKNOWN']),exports[_0x15e887(0x73)]=W([c['DependentOn'](j[_0x15e887(0xce)],b[_0x15e887(0x7e)],T[_0x15e887(0xba)]),O(0x1,c['Inject'](c[_0x15e887(0xd9)])),O(0x2,c[_0x15e887(0xe1)])],exports[_0x15e887(0x73)]);
|
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 _0x12d45a=_0x3a84;(function(_0x36be8c,_0x2f4422){const _0xd59e30=_0x3a84,_0x40fac9=_0x36be8c();while(!![]){try{const _0x488205=-parseInt(_0xd59e30(0x1f3))/0x1+parseInt(_0xd59e30(0x1fa))/0x2+-parseInt(_0xd59e30(0x1c3))/0x3*(parseInt(_0xd59e30(0x1fe))/0x4)+-parseInt(_0xd59e30(0x210))/0x5*(-parseInt(_0xd59e30(0x201))/0x6)+parseInt(_0xd59e30(0x1f4))/0x7+parseInt(_0xd59e30(0x1e9))/0x8*(-parseInt(_0xd59e30(0x1c7))/0x9)+parseInt(_0xd59e30(0x205))/0xa;if(_0x488205===_0x2f4422)break;else _0x40fac9['push'](_0x40fac9['shift']());}catch(_0x8db9f0){_0x40fac9['push'](_0x40fac9['shift']());}}}(_0x11bf,0xef841));function _0x11bf(){const _0x59048e=['3829308VUgbIW','getUnit','disposeWithMe','4281864fIDPtZ','solved','comment','resolved','23753620oaHQvY','/universer-api/comment/unit/','reply','parse','_httpService','type','onReady','_userService','_threadCommentDataSource','users','add','5MHPmPg','find','_threadCommentDataSourceService','code','format','UNRECOGNIZED','map','requireSession','filter','YYYY/MM/DD\x20HH:mm','get','createTimestamp','rangeType','pipe','payload','3BmPnjs','getOwnPropertyDescriptor','/solved','dataSource','4730382nsvRCm','_initUserSync','OpenOrReOpen','deleteComment','/universer-api/user/list','resolveComment','customRanges','_sessionService','values','updateComment','commentUpdate$','Reply','ref','/delete','comments','error','body','Unknown','user','addUser','replyId','slice','_configService','Solved','/add','userId','stringify','root','forEach','Edit','userID','_init','Delete','length','8LFZrNt','size','unitId','symbol','getMemberID','Add','defineProperty','/reply','post','replies','1367467elFEQK','1493828FXuGCl','rangeId','_config','COMMENT','_commentService','_threadCommentModel','1058078ECvPSq','Solve','_injector','threadId'];_0x11bf=function(){return _0x59048e;};return _0x11bf();}import{CommentService as _0x22e3e6,CollaborationSessionService as _0x381696,UniverCollaborationClientPlugin as _0x2b1311}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xd2c18d}from'@univerjs-pro/license';import{dayjs as _0x565b79,UserManagerService as _0x9c2e12,Inject as _0x19cdec,Injector as _0x52d667,Disposable as _0xb6e203,CustomRangeType as _0x5043a7,UniverInstanceType as _0x23918e,DependentOn as _0xe2719d,IConfigService as _0x4d08cf,Plugin as _0x149da9,merge as _0x109bcd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xf7150a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x34633a,IThreadCommentDataSourceService as _0x53561c}from'@univerjs/thread-comment';import{bufferTime as _0x577fa8}from'rxjs';import{HTTPService as _0x4fe4d0}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3ad1b1=>(_0x3ad1b1[_0x3ad1b1[_0x12d45a(0x1c9)]=0x0]=_0x12d45a(0x1c9),_0x3ad1b1[_0x3ad1b1[_0x12d45a(0x1de)]=0x1]=_0x12d45a(0x1de),_0x3ad1b1[_0x3ad1b1[_0x12d45a(0x215)]=-0x1]=_0x12d45a(0x215),_0x3ad1b1))(I||{}),v=(_0xff201f=>(_0xff201f[_0xff201f['Unknown']=0x0]=_0x12d45a(0x1d8),_0xff201f[_0xff201f[_0x12d45a(0x1ee)]=0x1]=_0x12d45a(0x1ee),_0xff201f[_0xff201f['Reply']=0x2]=_0x12d45a(0x1d2),_0xff201f[_0xff201f['Edit']=0x3]=_0x12d45a(0x1e4),_0xff201f[_0xff201f[_0x12d45a(0x1e7)]=0x4]=_0x12d45a(0x1e7),_0xff201f[_0xff201f[_0x12d45a(0x1fb)]=0x5]='Solve',_0xff201f[_0xff201f['UNRECOGNIZED']=-0x1]=_0x12d45a(0x215),_0xff201f))(v||{});const D=_0x571835=>_0x565b79(new Date(+_0x571835))[_0x12d45a(0x214)](_0x12d45a(0x1bd)),B=async(_0x493aa9,_0x25db7e)=>{const _0x4d5679=_0x12d45a,_0x56883b=_0x493aa9['get'](_0x9c2e12),_0x422f1c=_0x493aa9[_0x4d5679(0x1be)](_0x4fe4d0);_0x25db7e[_0x4d5679(0x1e3)](_0x11523e=>{_0x56883b['getUser'](_0x11523e)&&_0x25db7e['delete'](_0x11523e);}),_0x25db7e[_0x4d5679(0x1ea)]&&(await _0x422f1c[_0x4d5679(0x1be)](_0x4d5679(0x1cb),{'params':{'userIDs':[..._0x25db7e]}}))[_0x4d5679(0x1d7)][_0x4d5679(0x20e)][_0x4d5679(0x1e3)](_0x36f6f5=>{const _0x45aefb=_0x4d5679;_0x36f6f5&&_0x56883b[_0x45aefb(0x1da)](_0x36f6f5);});};var K=Object[_0x12d45a(0x1c4)],V=(_0x20304a,_0x4160e5,_0x3702fb,_0x3cb104)=>{const _0xd1544d=_0x12d45a;for(var _0x3cd3f2=_0x3cb104>0x1?void 0x0:_0x3cb104?K(_0x4160e5,_0x3702fb):_0x4160e5,_0x2c35dc=_0x20304a[_0xd1544d(0x1e8)]-0x1,_0x455fad;_0x2c35dc>=0x0;_0x2c35dc--)(_0x455fad=_0x20304a[_0x2c35dc])&&(_0x3cd3f2=_0x455fad(_0x3cd3f2)||_0x3cd3f2);return _0x3cd3f2;},p=(_0x406d9c,_0x2175b0)=>(_0x217648,_0x43989c)=>_0x2175b0(_0x217648,_0x43989c,_0x406d9c);let S=class extends _0xb6e203{constructor(_0x4cb218,_0x15ae2d,_0x102d16,_0x5cc4da){const _0x304b49=_0x12d45a;super(),this[_0x304b49(0x1f8)]=_0x4cb218,this['_threadCommentModel']=_0x15ae2d,this[_0x304b49(0x20c)]=_0x102d16,this[_0x304b49(0x1fc)]=_0x5cc4da,this[_0x304b49(0x1e6)](),this[_0x304b49(0x1c8)]();}[_0x12d45a(0x1c8)](){const _0x238ae9=_0x12d45a;this[_0x238ae9(0x200)](this[_0x238ae9(0x1f9)][_0x238ae9(0x1d1)][_0x238ae9(0x1c1)](_0x577fa8(0x10))['subscribe'](_0x529784=>{const _0xaab34=_0x238ae9,_0x2e3700=new Set();_0x529784['forEach'](_0x1e77bd=>{const _0x6b2d23=_0x3a84;switch(_0x1e77bd[_0x6b2d23(0x20a)]){case _0x6b2d23(0x20f):{const _0x52f205=_0x1e77bd[_0x6b2d23(0x1c2)]['personId'];_0x2e3700[_0x6b2d23(0x20f)](_0x52f205);break;}}}),B(this[_0xaab34(0x1fc)],_0x2e3700);}));}['_init'](){const _0x49fdb4=_0x12d45a;this[_0x49fdb4(0x200)](this[_0x49fdb4(0x1f8)]['commentUpdate$']['subscribe'](async _0x16311d=>{const _0x422a99=_0x49fdb4;var _0x242109,_0x321693,_0x1ff50e,_0x1e1385;const _0x47f6d5=(_0x242109=this[_0x422a99(0x1f9)][_0x422a99(0x1ff)](_0x16311d[_0x422a99(0x1eb)])[_0x422a99(0x211)](_0x370219=>_0x370219[_0x422a99(0x1fd)]===_0x16311d[_0x422a99(0x1fd)]))==null?void 0x0:_0x242109[_0x422a99(0x1e2)];if(!_0x47f6d5)return;const {unitId:_0x373bf8,subUnitId:_0x5a6a08}=_0x47f6d5;switch(_0x16311d[_0x422a99(0x1d9)]&&this[_0x422a99(0x20c)]['addUser'](_0x16311d['user']),_0x16311d[_0x422a99(0x20a)]){case v[_0x422a99(0x1ee)]:break;case v[_0x422a99(0x1d2)]:{this[_0x422a99(0x1f9)]['addComment'](_0x373bf8,_0x5a6a08,{'unitId':_0x373bf8,'subUnitId':_0x5a6a08,'ref':'','id':_0x16311d[_0x422a99(0x1db)],'dT':D(+_0x16311d[_0x422a99(0x1bf)]),'threadId':_0x16311d[_0x422a99(0x1fd)],'personId':(_0x1ff50e=(_0x321693=_0x16311d[_0x422a99(0x1d9)])==null?void 0x0:_0x321693[_0x422a99(0x1e5)])!=null?_0x1ff50e:_0x16311d[_0x422a99(0x1e0)],'text':JSON[_0x422a99(0x208)](_0x16311d['content']),'parentId':_0x47f6d5['id']});break;}case v[_0x422a99(0x1e7)]:{const _0x1a810c=this['_threadCommentModel']['getComment'](_0x373bf8,_0x5a6a08,_0x16311d[_0x422a99(0x1db)]);_0x1a810c&&_0x1a810c['parentId']&&this[_0x422a99(0x1f9)][_0x422a99(0x1ca)](_0x373bf8,_0x5a6a08,_0x16311d[_0x422a99(0x1db)]);break;}case v[_0x422a99(0x1e4)]:{this[_0x422a99(0x1f9)]['updateComment'](_0x373bf8,_0x5a6a08,{'commentId':_0x16311d[_0x422a99(0x1db)],'text':JSON[_0x422a99(0x208)](_0x16311d['content'])});break;}case v[_0x422a99(0x1fb)]:{const _0x5eec2b=(_0x1e1385=this[_0x422a99(0x1f9)]['getUnit'](_0x16311d[_0x422a99(0x1eb)])[_0x422a99(0x211)](_0x347ed0=>_0x347ed0['threadId']===_0x16311d[_0x422a99(0x1fd)]))==null?void 0x0:_0x1e1385[_0x422a99(0x1e2)];_0x5eec2b&&this[_0x422a99(0x1f9)]['resolveComment'](_0x373bf8,_0x5a6a08,_0x5eec2b['id'],_0x16311d['solved']===I[_0x422a99(0x1de)]);break;}}}));}};S=V([p(0x0,_0x19cdec(_0x22e3e6)),p(0x1,_0x19cdec(_0x34633a)),p(0x2,_0x19cdec(_0x9c2e12)),p(0x3,_0x19cdec(_0x52d667))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x12d45a(0x1c4)],Q=(_0x2085b7,_0x51e25f,_0x2a5e56,_0x3a5e32)=>{for(var _0x11a874=_0x3a5e32>0x1?void 0x0:_0x3a5e32?k(_0x51e25f,_0x2a5e56):_0x51e25f,_0x1c4bb2=_0x2085b7['length']-0x1,_0x51ef98;_0x1c4bb2>=0x0;_0x1c4bb2--)(_0x51ef98=_0x2085b7[_0x1c4bb2])&&(_0x11a874=_0x51ef98(_0x11a874)||_0x11a874);return _0x11a874;},_=(_0x41b686,_0xcc772e)=>(_0x25d56b,_0x386ba5)=>_0xcc772e(_0x25d56b,_0x386ba5,_0x41b686);function X(_0x5dea90,_0x431833){const _0x5a6ed6=_0x12d45a,_0x20e83c=_0x5dea90['replies'][0x0];return{..._0x431833,'id':_0x20e83c['replyId'],'resolved':_0x5dea90['solved']===0x1,'dT':D(_0x20e83c[_0x5a6ed6(0x1bf)]),'personId':_0x20e83c[_0x5a6ed6(0x1e0)],'threadId':_0x20e83c[_0x5a6ed6(0x1fd)]};}function ee(_0x1699bb,_0x323e94,_0x37a7e5){const _0x2ec942=_0x12d45a;var _0x8f3ccd,_0x5d738a;if(((_0x5d738a=(_0x8f3ccd=_0x1699bb==null?void 0x0:_0x1699bb['replies'])==null?void 0x0:_0x8f3ccd['length'])!=null?_0x5d738a:0x0)>0x0){const _0xf015a3=(_0x2f2070,_0x50ff5f)=>({'id':_0x2f2070['replyId'],'threadId':_0x2f2070[_0x2ec942(0x1fd)],'dT':D(_0x2f2070[_0x2ec942(0x1bf)]),'personId':_0x2f2070[_0x2ec942(0x1e0)],'resolved':_0x1699bb[_0x2ec942(0x202)]===I[_0x2ec942(0x1de)],'unitId':_0x323e94,'subUnitId':_0x37a7e5,'text':JSON[_0x2ec942(0x208)](_0x2f2070['content']),'parentId':_0x50ff5f}),_0x389574=_0xf015a3(_0x1699bb[_0x2ec942(0x1f2)][0x0]);return{..._0x389574,'children':_0x1699bb['replies'][_0x2ec942(0x1dc)](0x1)[_0x2ec942(0x216)](_0x2e350b=>_0xf015a3(_0x2e350b,_0x389574['id']))};}return null;}let f=class{constructor(_0x5d7364,_0x353030,_0x239382,_0x170074){const _0xaa1d95=_0x12d45a;this[_0xaa1d95(0x209)]=_0x5d7364,this[_0xaa1d95(0x20c)]=_0x353030,this['_sessionService']=_0x239382,this[_0xaa1d95(0x1fc)]=_0x170074;}async['addComment'](_0x1fdea6){const _0x5ed334=_0x12d45a;var _0x44d5f3,_0x4c87c8;const {parentId:_0x33dac4,unitId:_0x4c1b31,text:_0x2cc5dc,threadId:_0x475679}=_0x1fdea6,_0x54587a=(_0x4c87c8=(_0x44d5f3=_0x2cc5dc[_0x5ed334(0x1cd)])==null?void 0x0:_0x44d5f3[_0x5ed334(0x1bc)](_0x4fb7f1=>_0x4fb7f1[_0x5ed334(0x1c0)]===_0x5043a7[_0x5ed334(0x1f7)])[_0x5ed334(0x216)](_0x4e8eb9=>_0x4e8eb9[_0x5ed334(0x1f5)]))!=null?_0x4c87c8:[],_0x11f288=JSON[_0x5ed334(0x1e1)](_0x2cc5dc),_0x2c8276=(await this[_0x5ed334(0x1ce)][_0x5ed334(0x217)](_0x4c1b31))[_0x5ed334(0x1ed)]();if(_0x33dac4){const _0x2614c2={'memberId':_0x2c8276,'unitId':_0x4c1b31,'content':_0x11f288,'mention':_0x54587a,'threadId':_0x475679},_0x1c1bca=(await this[_0x5ed334(0x209)]['post'](_0x5ed334(0x206)+_0x4c1b31+_0x5ed334(0x1f0),{'body':_0x2614c2}))['body'][_0x5ed334(0x207)];return{..._0x1fdea6,'id':_0x1c1bca[_0x5ed334(0x1db)],'dT':_0x565b79(+_0x1c1bca['createTimestamp'])[_0x5ed334(0x214)](_0x5ed334(0x1bd)),'personId':_0x1c1bca[_0x5ed334(0x1e0)]};}else{const _0x35916a={'memberId':_0x2c8276,'unitId':_0x4c1b31,'content':_0x11f288,'mention':_0x54587a},_0x361f68=await this[_0x5ed334(0x209)][_0x5ed334(0x1f1)](_0x5ed334(0x206)+_0x4c1b31+_0x5ed334(0x1df),{'body':_0x35916a});return X(_0x361f68[_0x5ed334(0x1d7)][_0x5ed334(0x203)],_0x1fdea6);}}async[_0x12d45a(0x1d0)](_0x5b63c1){const _0x16df6d=_0x12d45a;var _0x1d0d9b,_0x22e362;const {text:_0x309cf8,unitId:_0x1c2e80}=_0x5b63c1,_0x3d5b92=(_0x22e362=(_0x1d0d9b=_0x309cf8[_0x16df6d(0x1cd)])==null?void 0x0:_0x1d0d9b[_0x16df6d(0x1bc)](_0x902d5c=>_0x902d5c[_0x16df6d(0x1c0)]===_0x5043a7[_0x16df6d(0x1f7)])[_0x16df6d(0x216)](_0x246f4f=>_0x246f4f['rangeId']))!=null?_0x22e362:[],_0x4f5f52=JSON[_0x16df6d(0x1e1)](_0x309cf8),_0x9664e3=_0x5b63c1[_0x16df6d(0x1fd)],_0x41cee3=_0x5b63c1['id'],_0x2e61aa={'memberId':(await this['_sessionService'][_0x16df6d(0x217)](_0x1c2e80))[_0x16df6d(0x1ed)](),'unitId':_0x1c2e80,'threadId':_0x9664e3,'mention':_0x3d5b92,'content':_0x4f5f52,'replyId':_0x41cee3},_0x26038e=await this['_httpService'][_0x16df6d(0x1f1)](_0x16df6d(0x206)+_0x1c2e80+'/edit',{'body':_0x2e61aa});return!_0x26038e[_0x16df6d(0x1d7)]['error']||_0x26038e[_0x16df6d(0x1d7)]['error'][_0x16df6d(0x213)]===0x1;}async[_0x12d45a(0x1cc)](_0x2e99c6){const _0x7fe36c=_0x12d45a,{unitId:_0x31b4a6}=_0x2e99c6,_0x1a81b2=_0x2e99c6['threadId'],_0x22f31d={'memberId':this[_0x7fe36c(0x20c)]['getCurrentUser']()[_0x7fe36c(0x1e5)],'unitId':_0x31b4a6,'threadId':_0x1a81b2,'solved':_0x2e99c6[_0x7fe36c(0x204)]?I[_0x7fe36c(0x1de)]:I['OpenOrReOpen']},_0x5aef47=await this[_0x7fe36c(0x209)][_0x7fe36c(0x1f1)](_0x7fe36c(0x206)+_0x31b4a6+_0x7fe36c(0x1c5),{'body':_0x22f31d});return!_0x5aef47[_0x7fe36c(0x1d7)][_0x7fe36c(0x1d6)]||_0x5aef47[_0x7fe36c(0x1d7)][_0x7fe36c(0x1d6)][_0x7fe36c(0x213)]===0x1;}async[_0x12d45a(0x1ca)](_0x51aaa5,_0x187064,_0x22ae41,_0x1ffd43){const _0x38c4ad=_0x12d45a,_0x50400c={'memberId':(await this[_0x38c4ad(0x1ce)]['requireSession'](_0x51aaa5))[_0x38c4ad(0x1ed)](),'threadId':_0x22ae41,'replyId':_0x1ffd43,'unitId':_0x51aaa5},_0x2163a6=await this[_0x38c4ad(0x209)][_0x38c4ad(0x1f1)](_0x38c4ad(0x206)+_0x51aaa5+_0x38c4ad(0x1d4),{'body':_0x50400c});return!_0x2163a6['body'][_0x38c4ad(0x1d6)]||_0x2163a6[_0x38c4ad(0x1d7)]['error'][_0x38c4ad(0x213)]===0x1;}async['listComments'](_0x3a4e52,_0x3b418d,_0x51faf0){const _0x30010a=_0x12d45a,_0x44afcd={'unitId':_0x3a4e52,'threadId':_0x51faf0},_0x55dfe6=await this[_0x30010a(0x209)]['post'](_0x30010a(0x206)+_0x3a4e52+'/list',{'body':_0x44afcd}),_0x2d7b2a=_0x51faf0[_0x30010a(0x216)](_0x1ec3f9=>ee(_0x55dfe6[_0x30010a(0x1d7)][_0x30010a(0x1d5)][_0x1ec3f9],_0x3a4e52,_0x3b418d))[_0x30010a(0x1bc)](Boolean);return Object[_0x30010a(0x1cf)](_0x55dfe6['body'][_0x30010a(0x20e)])['forEach'](_0x203c22=>{const _0x40f698=_0x30010a;this[_0x40f698(0x20c)][_0x40f698(0x1da)](_0x203c22);}),_0x2d7b2a;}['saveCommentToSnapshot'](_0x2f6f97){const _0x5943f1=_0x12d45a;return{'id':_0x2f6f97['id'],'threadId':_0x2f6f97[_0x5943f1(0x1fd)],'ref':_0x2f6f97[_0x5943f1(0x1d3)]};}};f=Q([_(0x0,_0x19cdec(_0x4fe4d0)),_(0x1,_0x19cdec(_0x9c2e12)),_(0x2,_0x19cdec(_0x381696)),_(0x3,_0x19cdec(_0x52d667))],f);var re=Object[_0x12d45a(0x1c4)],te=(_0x21cce6,_0x21512d,_0x3146d3,_0x45275b)=>{for(var _0x176fdb=_0x45275b>0x1?void 0x0:_0x45275b?re(_0x21512d,_0x3146d3):_0x21512d,_0xab7ac7=_0x21cce6['length']-0x1,_0x488043;_0xab7ac7>=0x0;_0xab7ac7--)(_0x488043=_0x21cce6[_0xab7ac7])&&(_0x176fdb=_0x488043(_0x176fdb)||_0x176fdb);return _0x176fdb;},N=(_0x27b258,_0x3e9a43)=>(_0x47a59a,_0x3f7e54)=>_0x3e9a43(_0x47a59a,_0x3f7e54,_0x27b258);let g=class extends _0xb6e203{constructor(_0x5afa7b,_0x2f6088){const _0x28826c=_0x12d45a;super(),this[_0x28826c(0x212)]=_0x5afa7b,this['_threadCommentDataSource']=_0x2f6088,this['_initDataSource']();}['_initDataSource'](){const _0x123425=_0x12d45a;this[_0x123425(0x212)][_0x123425(0x1c6)]=this[_0x123425(0x20d)],this[_0x123425(0x212)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x53561c),N(0x1,_0x19cdec(f))],g);var se=Object[_0x12d45a(0x1ef)],oe=Object[_0x12d45a(0x1c4)],ne=(_0x57ee37,_0x23e766,_0x1cd8a2)=>_0x23e766 in _0x57ee37?se(_0x57ee37,_0x23e766,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1cd8a2}):_0x57ee37[_0x23e766]=_0x1cd8a2,ie=(_0xeca41b,_0x229020,_0x3ec319,_0x393822)=>{const _0x478b07=_0x12d45a;for(var _0x5f0601=_0x393822>0x1?void 0x0:_0x393822?oe(_0x229020,_0x3ec319):_0x229020,_0x2a81c7=_0xeca41b[_0x478b07(0x1e8)]-0x1,_0x1c3c5e;_0x2a81c7>=0x0;_0x2a81c7--)(_0x1c3c5e=_0xeca41b[_0x2a81c7])&&(_0x5f0601=_0x1c3c5e(_0x5f0601)||_0x5f0601);return _0x5f0601;},w=(_0x2653ba,_0x4fd4b3)=>(_0x5d26d7,_0x123938)=>_0x4fd4b3(_0x5d26d7,_0x123938,_0x2653ba),$=(_0x2b6688,_0x4642ca,_0x41e4d3)=>ne(_0x2b6688,typeof _0x4642ca!=_0x12d45a(0x1ec)?_0x4642ca+'':_0x4642ca,_0x41e4d3);function _0x3a84(_0x1ec578,_0x1877e5){const _0x11bf58=_0x11bf();return _0x3a84=function(_0x3a8429,_0x1837a4){_0x3a8429=_0x3a8429-0x1bc;let _0x190cf9=_0x11bf58[_0x3a8429];return _0x190cf9;},_0x3a84(_0x1ec578,_0x1877e5);}let b=class extends _0x149da9{constructor(_0x8c16ca=M,_0x14995d,_0x1bb6a7){const _0x9e6d35=_0x12d45a;super(),this[_0x9e6d35(0x1f6)]=_0x8c16ca,this[_0x9e6d35(0x1fc)]=_0x14995d,this[_0x9e6d35(0x1dd)]=_0x1bb6a7;const {..._0x56bec3}=_0x109bcd({},M,this[_0x9e6d35(0x1f6)]);this[_0x9e6d35(0x1dd)]['setConfig'](z,_0x56bec3);}['onStarting'](){const _0x134cec=_0x12d45a;[[f],[g],[S]][_0x134cec(0x1e3)](_0x2cec94=>{const _0x43ba92=_0x134cec;this[_0x43ba92(0x1fc)][_0x43ba92(0x20f)](_0x2cec94);});}[_0x12d45a(0x20b)](){const _0x3b2ea9=_0x12d45a;this['_injector'][_0x3b2ea9(0x1be)](g),this[_0x3b2ea9(0x1fc)][_0x3b2ea9(0x1be)](S);}};$(b,'pluginName',W),$(b,_0x12d45a(0x20a),_0x23918e['UNIVER_UNKNOWN']),b=ie([_0xe2719d(_0xf7150a,_0x2b1311,_0xd2c18d),w(0x1,_0x19cdec(_0x52d667)),w(0x2,_0x4d08cf)],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 _0x12d45a=_0x3a84;(function(_0x36be8c,_0x2f4422){const _0xd59e30=_0x3a84,_0x40fac9=_0x36be8c();while(!![]){try{const _0x488205=-parseInt(_0xd59e30(0x1f3))/0x1+parseInt(_0xd59e30(0x1fa))/0x2+-parseInt(_0xd59e30(0x1c3))/0x3*(parseInt(_0xd59e30(0x1fe))/0x4)+-parseInt(_0xd59e30(0x210))/0x5*(-parseInt(_0xd59e30(0x201))/0x6)+parseInt(_0xd59e30(0x1f4))/0x7+parseInt(_0xd59e30(0x1e9))/0x8*(-parseInt(_0xd59e30(0x1c7))/0x9)+parseInt(_0xd59e30(0x205))/0xa;if(_0x488205===_0x2f4422)break;else _0x40fac9['push'](_0x40fac9['shift']());}catch(_0x8db9f0){_0x40fac9['push'](_0x40fac9['shift']());}}}(_0x11bf,0xef841));function _0x11bf(){const _0x59048e=['3829308VUgbIW','getUnit','disposeWithMe','4281864fIDPtZ','solved','comment','resolved','23753620oaHQvY','/universer-api/comment/unit/','reply','parse','_httpService','type','onReady','_userService','_threadCommentDataSource','users','add','5MHPmPg','find','_threadCommentDataSourceService','code','format','UNRECOGNIZED','map','requireSession','filter','YYYY/MM/DD\x20HH:mm','get','createTimestamp','rangeType','pipe','payload','3BmPnjs','getOwnPropertyDescriptor','/solved','dataSource','4730382nsvRCm','_initUserSync','OpenOrReOpen','deleteComment','/universer-api/user/list','resolveComment','customRanges','_sessionService','values','updateComment','commentUpdate$','Reply','ref','/delete','comments','error','body','Unknown','user','addUser','replyId','slice','_configService','Solved','/add','userId','stringify','root','forEach','Edit','userID','_init','Delete','length','8LFZrNt','size','unitId','symbol','getMemberID','Add','defineProperty','/reply','post','replies','1367467elFEQK','1493828FXuGCl','rangeId','_config','COMMENT','_commentService','_threadCommentModel','1058078ECvPSq','Solve','_injector','threadId'];_0x11bf=function(){return _0x59048e;};return _0x11bf();}import{CommentService as _0x22e3e6,CollaborationSessionService as _0x381696,UniverCollaborationClientPlugin as _0x2b1311}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xd2c18d}from'@univerjs-pro/license';import{dayjs as _0x565b79,UserManagerService as _0x9c2e12,Inject as _0x19cdec,Injector as _0x52d667,Disposable as _0xb6e203,CustomRangeType as _0x5043a7,UniverInstanceType as _0x23918e,DependentOn as _0xe2719d,IConfigService as _0x4d08cf,Plugin as _0x149da9,merge as _0x109bcd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xf7150a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x34633a,IThreadCommentDataSourceService as _0x53561c}from'@univerjs/thread-comment';import{bufferTime as _0x577fa8}from'rxjs';import{HTTPService as _0x4fe4d0}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3ad1b1=>(_0x3ad1b1[_0x3ad1b1[_0x12d45a(0x1c9)]=0x0]=_0x12d45a(0x1c9),_0x3ad1b1[_0x3ad1b1[_0x12d45a(0x1de)]=0x1]=_0x12d45a(0x1de),_0x3ad1b1[_0x3ad1b1[_0x12d45a(0x215)]=-0x1]=_0x12d45a(0x215),_0x3ad1b1))(I||{}),v=(_0xff201f=>(_0xff201f[_0xff201f['Unknown']=0x0]=_0x12d45a(0x1d8),_0xff201f[_0xff201f[_0x12d45a(0x1ee)]=0x1]=_0x12d45a(0x1ee),_0xff201f[_0xff201f['Reply']=0x2]=_0x12d45a(0x1d2),_0xff201f[_0xff201f['Edit']=0x3]=_0x12d45a(0x1e4),_0xff201f[_0xff201f[_0x12d45a(0x1e7)]=0x4]=_0x12d45a(0x1e7),_0xff201f[_0xff201f[_0x12d45a(0x1fb)]=0x5]='Solve',_0xff201f[_0xff201f['UNRECOGNIZED']=-0x1]=_0x12d45a(0x215),_0xff201f))(v||{});const D=_0x571835=>_0x565b79(new Date(+_0x571835))[_0x12d45a(0x214)](_0x12d45a(0x1bd)),B=async(_0x493aa9,_0x25db7e)=>{const _0x4d5679=_0x12d45a,_0x56883b=_0x493aa9['get'](_0x9c2e12),_0x422f1c=_0x493aa9[_0x4d5679(0x1be)](_0x4fe4d0);_0x25db7e[_0x4d5679(0x1e3)](_0x11523e=>{_0x56883b['getUser'](_0x11523e)&&_0x25db7e['delete'](_0x11523e);}),_0x25db7e[_0x4d5679(0x1ea)]&&(await _0x422f1c[_0x4d5679(0x1be)](_0x4d5679(0x1cb),{'params':{'userIDs':[..._0x25db7e]}}))[_0x4d5679(0x1d7)][_0x4d5679(0x20e)][_0x4d5679(0x1e3)](_0x36f6f5=>{const _0x45aefb=_0x4d5679;_0x36f6f5&&_0x56883b[_0x45aefb(0x1da)](_0x36f6f5);});};var K=Object[_0x12d45a(0x1c4)],V=(_0x20304a,_0x4160e5,_0x3702fb,_0x3cb104)=>{const _0xd1544d=_0x12d45a;for(var _0x3cd3f2=_0x3cb104>0x1?void 0x0:_0x3cb104?K(_0x4160e5,_0x3702fb):_0x4160e5,_0x2c35dc=_0x20304a[_0xd1544d(0x1e8)]-0x1,_0x455fad;_0x2c35dc>=0x0;_0x2c35dc--)(_0x455fad=_0x20304a[_0x2c35dc])&&(_0x3cd3f2=_0x455fad(_0x3cd3f2)||_0x3cd3f2);return _0x3cd3f2;},p=(_0x406d9c,_0x2175b0)=>(_0x217648,_0x43989c)=>_0x2175b0(_0x217648,_0x43989c,_0x406d9c);let S=class extends _0xb6e203{constructor(_0x4cb218,_0x15ae2d,_0x102d16,_0x5cc4da){const _0x304b49=_0x12d45a;super(),this[_0x304b49(0x1f8)]=_0x4cb218,this['_threadCommentModel']=_0x15ae2d,this[_0x304b49(0x20c)]=_0x102d16,this[_0x304b49(0x1fc)]=_0x5cc4da,this[_0x304b49(0x1e6)](),this[_0x304b49(0x1c8)]();}[_0x12d45a(0x1c8)](){const _0x238ae9=_0x12d45a;this[_0x238ae9(0x200)](this[_0x238ae9(0x1f9)][_0x238ae9(0x1d1)][_0x238ae9(0x1c1)](_0x577fa8(0x10))['subscribe'](_0x529784=>{const _0xaab34=_0x238ae9,_0x2e3700=new Set();_0x529784['forEach'](_0x1e77bd=>{const _0x6b2d23=_0x3a84;switch(_0x1e77bd[_0x6b2d23(0x20a)]){case _0x6b2d23(0x20f):{const _0x52f205=_0x1e77bd[_0x6b2d23(0x1c2)]['personId'];_0x2e3700[_0x6b2d23(0x20f)](_0x52f205);break;}}}),B(this[_0xaab34(0x1fc)],_0x2e3700);}));}['_init'](){const _0x49fdb4=_0x12d45a;this[_0x49fdb4(0x200)](this[_0x49fdb4(0x1f8)]['commentUpdate$']['subscribe'](async _0x16311d=>{const _0x422a99=_0x49fdb4;var _0x242109,_0x321693,_0x1ff50e,_0x1e1385;const _0x47f6d5=(_0x242109=this[_0x422a99(0x1f9)][_0x422a99(0x1ff)](_0x16311d[_0x422a99(0x1eb)])[_0x422a99(0x211)](_0x370219=>_0x370219[_0x422a99(0x1fd)]===_0x16311d[_0x422a99(0x1fd)]))==null?void 0x0:_0x242109[_0x422a99(0x1e2)];if(!_0x47f6d5)return;const {unitId:_0x373bf8,subUnitId:_0x5a6a08}=_0x47f6d5;switch(_0x16311d[_0x422a99(0x1d9)]&&this[_0x422a99(0x20c)]['addUser'](_0x16311d['user']),_0x16311d[_0x422a99(0x20a)]){case v[_0x422a99(0x1ee)]:break;case v[_0x422a99(0x1d2)]:{this[_0x422a99(0x1f9)]['addComment'](_0x373bf8,_0x5a6a08,{'unitId':_0x373bf8,'subUnitId':_0x5a6a08,'ref':'','id':_0x16311d[_0x422a99(0x1db)],'dT':D(+_0x16311d[_0x422a99(0x1bf)]),'threadId':_0x16311d[_0x422a99(0x1fd)],'personId':(_0x1ff50e=(_0x321693=_0x16311d[_0x422a99(0x1d9)])==null?void 0x0:_0x321693[_0x422a99(0x1e5)])!=null?_0x1ff50e:_0x16311d[_0x422a99(0x1e0)],'text':JSON[_0x422a99(0x208)](_0x16311d['content']),'parentId':_0x47f6d5['id']});break;}case v[_0x422a99(0x1e7)]:{const _0x1a810c=this['_threadCommentModel']['getComment'](_0x373bf8,_0x5a6a08,_0x16311d[_0x422a99(0x1db)]);_0x1a810c&&_0x1a810c['parentId']&&this[_0x422a99(0x1f9)][_0x422a99(0x1ca)](_0x373bf8,_0x5a6a08,_0x16311d[_0x422a99(0x1db)]);break;}case v[_0x422a99(0x1e4)]:{this[_0x422a99(0x1f9)]['updateComment'](_0x373bf8,_0x5a6a08,{'commentId':_0x16311d[_0x422a99(0x1db)],'text':JSON[_0x422a99(0x208)](_0x16311d['content'])});break;}case v[_0x422a99(0x1fb)]:{const _0x5eec2b=(_0x1e1385=this[_0x422a99(0x1f9)]['getUnit'](_0x16311d[_0x422a99(0x1eb)])[_0x422a99(0x211)](_0x347ed0=>_0x347ed0['threadId']===_0x16311d[_0x422a99(0x1fd)]))==null?void 0x0:_0x1e1385[_0x422a99(0x1e2)];_0x5eec2b&&this[_0x422a99(0x1f9)]['resolveComment'](_0x373bf8,_0x5a6a08,_0x5eec2b['id'],_0x16311d['solved']===I[_0x422a99(0x1de)]);break;}}}));}};S=V([p(0x0,_0x19cdec(_0x22e3e6)),p(0x1,_0x19cdec(_0x34633a)),p(0x2,_0x19cdec(_0x9c2e12)),p(0x3,_0x19cdec(_0x52d667))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x12d45a(0x1c4)],Q=(_0x2085b7,_0x51e25f,_0x2a5e56,_0x3a5e32)=>{for(var _0x11a874=_0x3a5e32>0x1?void 0x0:_0x3a5e32?k(_0x51e25f,_0x2a5e56):_0x51e25f,_0x1c4bb2=_0x2085b7['length']-0x1,_0x51ef98;_0x1c4bb2>=0x0;_0x1c4bb2--)(_0x51ef98=_0x2085b7[_0x1c4bb2])&&(_0x11a874=_0x51ef98(_0x11a874)||_0x11a874);return _0x11a874;},_=(_0x41b686,_0xcc772e)=>(_0x25d56b,_0x386ba5)=>_0xcc772e(_0x25d56b,_0x386ba5,_0x41b686);function X(_0x5dea90,_0x431833){const _0x5a6ed6=_0x12d45a,_0x20e83c=_0x5dea90['replies'][0x0];return{..._0x431833,'id':_0x20e83c['replyId'],'resolved':_0x5dea90['solved']===0x1,'dT':D(_0x20e83c[_0x5a6ed6(0x1bf)]),'personId':_0x20e83c[_0x5a6ed6(0x1e0)],'threadId':_0x20e83c[_0x5a6ed6(0x1fd)]};}function ee(_0x1699bb,_0x323e94,_0x37a7e5){const _0x2ec942=_0x12d45a;var _0x8f3ccd,_0x5d738a;if(((_0x5d738a=(_0x8f3ccd=_0x1699bb==null?void 0x0:_0x1699bb['replies'])==null?void 0x0:_0x8f3ccd['length'])!=null?_0x5d738a:0x0)>0x0){const _0xf015a3=(_0x2f2070,_0x50ff5f)=>({'id':_0x2f2070['replyId'],'threadId':_0x2f2070[_0x2ec942(0x1fd)],'dT':D(_0x2f2070[_0x2ec942(0x1bf)]),'personId':_0x2f2070[_0x2ec942(0x1e0)],'resolved':_0x1699bb[_0x2ec942(0x202)]===I[_0x2ec942(0x1de)],'unitId':_0x323e94,'subUnitId':_0x37a7e5,'text':JSON[_0x2ec942(0x208)](_0x2f2070['content']),'parentId':_0x50ff5f}),_0x389574=_0xf015a3(_0x1699bb[_0x2ec942(0x1f2)][0x0]);return{..._0x389574,'children':_0x1699bb['replies'][_0x2ec942(0x1dc)](0x1)[_0x2ec942(0x216)](_0x2e350b=>_0xf015a3(_0x2e350b,_0x389574['id']))};}return null;}let f=class{constructor(_0x5d7364,_0x353030,_0x239382,_0x170074){const _0xaa1d95=_0x12d45a;this[_0xaa1d95(0x209)]=_0x5d7364,this[_0xaa1d95(0x20c)]=_0x353030,this['_sessionService']=_0x239382,this[_0xaa1d95(0x1fc)]=_0x170074;}async['addComment'](_0x1fdea6){const _0x5ed334=_0x12d45a;var _0x44d5f3,_0x4c87c8;const {parentId:_0x33dac4,unitId:_0x4c1b31,text:_0x2cc5dc,threadId:_0x475679}=_0x1fdea6,_0x54587a=(_0x4c87c8=(_0x44d5f3=_0x2cc5dc[_0x5ed334(0x1cd)])==null?void 0x0:_0x44d5f3[_0x5ed334(0x1bc)](_0x4fb7f1=>_0x4fb7f1[_0x5ed334(0x1c0)]===_0x5043a7[_0x5ed334(0x1f7)])[_0x5ed334(0x216)](_0x4e8eb9=>_0x4e8eb9[_0x5ed334(0x1f5)]))!=null?_0x4c87c8:[],_0x11f288=JSON[_0x5ed334(0x1e1)](_0x2cc5dc),_0x2c8276=(await this[_0x5ed334(0x1ce)][_0x5ed334(0x217)](_0x4c1b31))[_0x5ed334(0x1ed)]();if(_0x33dac4){const _0x2614c2={'memberId':_0x2c8276,'unitId':_0x4c1b31,'content':_0x11f288,'mention':_0x54587a,'threadId':_0x475679},_0x1c1bca=(await this[_0x5ed334(0x209)]['post'](_0x5ed334(0x206)+_0x4c1b31+_0x5ed334(0x1f0),{'body':_0x2614c2}))['body'][_0x5ed334(0x207)];return{..._0x1fdea6,'id':_0x1c1bca[_0x5ed334(0x1db)],'dT':_0x565b79(+_0x1c1bca['createTimestamp'])[_0x5ed334(0x214)](_0x5ed334(0x1bd)),'personId':_0x1c1bca[_0x5ed334(0x1e0)]};}else{const _0x35916a={'memberId':_0x2c8276,'unitId':_0x4c1b31,'content':_0x11f288,'mention':_0x54587a},_0x361f68=await this[_0x5ed334(0x209)][_0x5ed334(0x1f1)](_0x5ed334(0x206)+_0x4c1b31+_0x5ed334(0x1df),{'body':_0x35916a});return X(_0x361f68[_0x5ed334(0x1d7)][_0x5ed334(0x203)],_0x1fdea6);}}async[_0x12d45a(0x1d0)](_0x5b63c1){const _0x16df6d=_0x12d45a;var _0x1d0d9b,_0x22e362;const {text:_0x309cf8,unitId:_0x1c2e80}=_0x5b63c1,_0x3d5b92=(_0x22e362=(_0x1d0d9b=_0x309cf8[_0x16df6d(0x1cd)])==null?void 0x0:_0x1d0d9b[_0x16df6d(0x1bc)](_0x902d5c=>_0x902d5c[_0x16df6d(0x1c0)]===_0x5043a7[_0x16df6d(0x1f7)])[_0x16df6d(0x216)](_0x246f4f=>_0x246f4f['rangeId']))!=null?_0x22e362:[],_0x4f5f52=JSON[_0x16df6d(0x1e1)](_0x309cf8),_0x9664e3=_0x5b63c1[_0x16df6d(0x1fd)],_0x41cee3=_0x5b63c1['id'],_0x2e61aa={'memberId':(await this['_sessionService'][_0x16df6d(0x217)](_0x1c2e80))[_0x16df6d(0x1ed)](),'unitId':_0x1c2e80,'threadId':_0x9664e3,'mention':_0x3d5b92,'content':_0x4f5f52,'replyId':_0x41cee3},_0x26038e=await this['_httpService'][_0x16df6d(0x1f1)](_0x16df6d(0x206)+_0x1c2e80+'/edit',{'body':_0x2e61aa});return!_0x26038e[_0x16df6d(0x1d7)]['error']||_0x26038e[_0x16df6d(0x1d7)]['error'][_0x16df6d(0x213)]===0x1;}async[_0x12d45a(0x1cc)](_0x2e99c6){const _0x7fe36c=_0x12d45a,{unitId:_0x31b4a6}=_0x2e99c6,_0x1a81b2=_0x2e99c6['threadId'],_0x22f31d={'memberId':this[_0x7fe36c(0x20c)]['getCurrentUser']()[_0x7fe36c(0x1e5)],'unitId':_0x31b4a6,'threadId':_0x1a81b2,'solved':_0x2e99c6[_0x7fe36c(0x204)]?I[_0x7fe36c(0x1de)]:I['OpenOrReOpen']},_0x5aef47=await this[_0x7fe36c(0x209)][_0x7fe36c(0x1f1)](_0x7fe36c(0x206)+_0x31b4a6+_0x7fe36c(0x1c5),{'body':_0x22f31d});return!_0x5aef47[_0x7fe36c(0x1d7)][_0x7fe36c(0x1d6)]||_0x5aef47[_0x7fe36c(0x1d7)][_0x7fe36c(0x1d6)][_0x7fe36c(0x213)]===0x1;}async[_0x12d45a(0x1ca)](_0x51aaa5,_0x187064,_0x22ae41,_0x1ffd43){const _0x38c4ad=_0x12d45a,_0x50400c={'memberId':(await this[_0x38c4ad(0x1ce)]['requireSession'](_0x51aaa5))[_0x38c4ad(0x1ed)](),'threadId':_0x22ae41,'replyId':_0x1ffd43,'unitId':_0x51aaa5},_0x2163a6=await this[_0x38c4ad(0x209)][_0x38c4ad(0x1f1)](_0x38c4ad(0x206)+_0x51aaa5+_0x38c4ad(0x1d4),{'body':_0x50400c});return!_0x2163a6['body'][_0x38c4ad(0x1d6)]||_0x2163a6[_0x38c4ad(0x1d7)]['error'][_0x38c4ad(0x213)]===0x1;}async['listComments'](_0x3a4e52,_0x3b418d,_0x51faf0){const _0x30010a=_0x12d45a,_0x44afcd={'unitId':_0x3a4e52,'threadId':_0x51faf0},_0x55dfe6=await this[_0x30010a(0x209)]['post'](_0x30010a(0x206)+_0x3a4e52+'/list',{'body':_0x44afcd}),_0x2d7b2a=_0x51faf0[_0x30010a(0x216)](_0x1ec3f9=>ee(_0x55dfe6[_0x30010a(0x1d7)][_0x30010a(0x1d5)][_0x1ec3f9],_0x3a4e52,_0x3b418d))[_0x30010a(0x1bc)](Boolean);return Object[_0x30010a(0x1cf)](_0x55dfe6['body'][_0x30010a(0x20e)])['forEach'](_0x203c22=>{const _0x40f698=_0x30010a;this[_0x40f698(0x20c)][_0x40f698(0x1da)](_0x203c22);}),_0x2d7b2a;}['saveCommentToSnapshot'](_0x2f6f97){const _0x5943f1=_0x12d45a;return{'id':_0x2f6f97['id'],'threadId':_0x2f6f97[_0x5943f1(0x1fd)],'ref':_0x2f6f97[_0x5943f1(0x1d3)]};}};f=Q([_(0x0,_0x19cdec(_0x4fe4d0)),_(0x1,_0x19cdec(_0x9c2e12)),_(0x2,_0x19cdec(_0x381696)),_(0x3,_0x19cdec(_0x52d667))],f);var re=Object[_0x12d45a(0x1c4)],te=(_0x21cce6,_0x21512d,_0x3146d3,_0x45275b)=>{for(var _0x176fdb=_0x45275b>0x1?void 0x0:_0x45275b?re(_0x21512d,_0x3146d3):_0x21512d,_0xab7ac7=_0x21cce6['length']-0x1,_0x488043;_0xab7ac7>=0x0;_0xab7ac7--)(_0x488043=_0x21cce6[_0xab7ac7])&&(_0x176fdb=_0x488043(_0x176fdb)||_0x176fdb);return _0x176fdb;},N=(_0x27b258,_0x3e9a43)=>(_0x47a59a,_0x3f7e54)=>_0x3e9a43(_0x47a59a,_0x3f7e54,_0x27b258);let g=class extends _0xb6e203{constructor(_0x5afa7b,_0x2f6088){const _0x28826c=_0x12d45a;super(),this[_0x28826c(0x212)]=_0x5afa7b,this['_threadCommentDataSource']=_0x2f6088,this['_initDataSource']();}['_initDataSource'](){const _0x123425=_0x12d45a;this[_0x123425(0x212)][_0x123425(0x1c6)]=this[_0x123425(0x20d)],this[_0x123425(0x212)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x53561c),N(0x1,_0x19cdec(f))],g);var se=Object[_0x12d45a(0x1ef)],oe=Object[_0x12d45a(0x1c4)],ne=(_0x57ee37,_0x23e766,_0x1cd8a2)=>_0x23e766 in _0x57ee37?se(_0x57ee37,_0x23e766,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1cd8a2}):_0x57ee37[_0x23e766]=_0x1cd8a2,ie=(_0xeca41b,_0x229020,_0x3ec319,_0x393822)=>{const _0x478b07=_0x12d45a;for(var _0x5f0601=_0x393822>0x1?void 0x0:_0x393822?oe(_0x229020,_0x3ec319):_0x229020,_0x2a81c7=_0xeca41b[_0x478b07(0x1e8)]-0x1,_0x1c3c5e;_0x2a81c7>=0x0;_0x2a81c7--)(_0x1c3c5e=_0xeca41b[_0x2a81c7])&&(_0x5f0601=_0x1c3c5e(_0x5f0601)||_0x5f0601);return _0x5f0601;},w=(_0x2653ba,_0x4fd4b3)=>(_0x5d26d7,_0x123938)=>_0x4fd4b3(_0x5d26d7,_0x123938,_0x2653ba),$=(_0x2b6688,_0x4642ca,_0x41e4d3)=>ne(_0x2b6688,typeof _0x4642ca!=_0x12d45a(0x1ec)?_0x4642ca+'':_0x4642ca,_0x41e4d3);function _0x3a84(_0x1ec578,_0x1877e5){const _0x11bf58=_0x11bf();return _0x3a84=function(_0x3a8429,_0x1837a4){_0x3a8429=_0x3a8429-0x1bc;let _0x190cf9=_0x11bf58[_0x3a8429];return _0x190cf9;},_0x3a84(_0x1ec578,_0x1877e5);}let b=class extends _0x149da9{constructor(_0x8c16ca=M,_0x14995d,_0x1bb6a7){const _0x9e6d35=_0x12d45a;super(),this[_0x9e6d35(0x1f6)]=_0x8c16ca,this[_0x9e6d35(0x1fc)]=_0x14995d,this[_0x9e6d35(0x1dd)]=_0x1bb6a7;const {..._0x56bec3}=_0x109bcd({},M,this[_0x9e6d35(0x1f6)]);this[_0x9e6d35(0x1dd)]['setConfig'](z,_0x56bec3);}['onStarting'](){const _0x134cec=_0x12d45a;[[f],[g],[S]][_0x134cec(0x1e3)](_0x2cec94=>{const _0x43ba92=_0x134cec;this[_0x43ba92(0x1fc)][_0x43ba92(0x20f)](_0x2cec94);});}[_0x12d45a(0x20b)](){const _0x3b2ea9=_0x12d45a;this['_injector'][_0x3b2ea9(0x1be)](g),this[_0x3b2ea9(0x1fc)][_0x3b2ea9(0x1be)](S);}};$(b,'pluginName',W),$(b,_0x12d45a(0x20a),_0x23918e['UNIVER_UNKNOWN']),b=ie([_0xe2719d(_0xf7150a,_0x2b1311,_0xd2c18d),w(0x1,_0x19cdec(_0x52d667)),w(0x2,_0x4d08cf)],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 _0x504f(_0x3d3783,_0x4b086d){const _0x2beb64=_0x2beb();return _0x504f=function(_0x504fb3,_0x36ca12){_0x504fb3=_0x504fb3-0x104;let _0x1544a3=_0x2beb64[_0x504fb3];return _0x1544a3;},_0x504f(_0x3d3783,_0x4b086d);}(function(_0xef9201,_0x5c47d2){const _0x1b7051=_0x504f,_0xc2d545=_0xef9201();while(!![]){try{const _0x47dd81=-parseInt(_0x1b7051(0x137))/0x1*(-parseInt(_0x1b7051(0x11d))/0x2)+parseInt(_0x1b7051(0x123))/0x3+-parseInt(_0x1b7051(0x138))/0x4*(-parseInt(_0x1b7051(0x133))/0x5)+-parseInt(_0x1b7051(0x169))/0x6*(parseInt(_0x1b7051(0x153))/0x7)+-parseInt(_0x1b7051(0x126))/0x8*(parseInt(_0x1b7051(0x131))/0x9)+-parseInt(_0x1b7051(0x12b))/0xa*(-parseInt(_0x1b7051(0x10e))/0xb)+-parseInt(_0x1b7051(0x175))/0xc;if(_0x47dd81===_0x5c47d2)break;else _0xc2d545['push'](_0xc2d545['shift']());}catch(_0x1e0c14){_0xc2d545['push'](_0xc2d545['shift']());}}}(_0x2beb,0xec58c),function(_0x586042,_0x3b71f0){const _0x44fbea=_0x504f;typeof exports==_0x44fbea(0x14f)&&typeof module<'u'?_0x3b71f0(exports,require(_0x44fbea(0x14b)),require(_0x44fbea(0x130)),require('@univerjs/core'),require(_0x44fbea(0x14d)),require(_0x44fbea(0x10a)),require('rxjs'),require(_0x44fbea(0x156))):typeof define==_0x44fbea(0x139)&&define[_0x44fbea(0x148)]?define([_0x44fbea(0x152),_0x44fbea(0x14b),'@univerjs-pro/license',_0x44fbea(0x12e),_0x44fbea(0x14d),_0x44fbea(0x10a),_0x44fbea(0x142),_0x44fbea(0x156)],_0x3b71f0):(_0x586042=typeof globalThis<'u'?globalThis:_0x586042||self,_0x3b71f0(_0x586042[_0x44fbea(0x155)]={},_0x586042[_0x44fbea(0x140)],_0x586042[_0x44fbea(0x171)],_0x586042[_0x44fbea(0x16d)],_0x586042[_0x44fbea(0x12a)],_0x586042['UniverThreadComment'],_0x586042['rxjs'],_0x586042['UniverNetwork']));}(this,function(_0x1c2b26,_0x366672,_0x41f68d,_0x113df9,_0x3347a0,_0x5b6592,_0x4026f3,_0xb342fe){'use strict';const _0xb6be16=_0x504f;const _0x415b1a=_0xb6be16(0x15e);var _0x328b1c=(_0x354ec5=>(_0x354ec5[_0x354ec5['OpenOrReOpen']=0x0]=_0xb6be16(0x109),_0x354ec5[_0x354ec5['Solved']=0x1]='Solved',_0x354ec5[_0x354ec5['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x354ec5))(_0x328b1c||{}),_0x11c8cb=(_0x365df6=>(_0x365df6[_0x365df6[_0xb6be16(0x16f)]=0x0]=_0xb6be16(0x16f),_0x365df6[_0x365df6[_0xb6be16(0x14e)]=0x1]=_0xb6be16(0x14e),_0x365df6[_0x365df6[_0xb6be16(0x165)]=0x2]='Reply',_0x365df6[_0x365df6['Edit']=0x3]='Edit',_0x365df6[_0x365df6[_0xb6be16(0x167)]=0x4]=_0xb6be16(0x167),_0x365df6[_0x365df6[_0xb6be16(0x164)]=0x5]='Solve',_0x365df6[_0x365df6[_0xb6be16(0x11e)]=-0x1]=_0xb6be16(0x11e),_0x365df6))(_0x11c8cb||{});const _0x563f5d=_0x1443d9=>_0x113df9[_0xb6be16(0x105)](new Date(+_0x1443d9))[_0xb6be16(0x15f)](_0xb6be16(0x180)),_0x3b7dc3=async(_0x474375,_0x55f3ac)=>{const _0x4f5241=_0xb6be16,_0xb1b5a6=_0x474375[_0x4f5241(0x111)](_0x113df9[_0x4f5241(0x135)]),_0x53c9f0=_0x474375[_0x4f5241(0x111)](_0xb342fe[_0x4f5241(0x104)]);_0x55f3ac[_0x4f5241(0x12f)](_0x1e574e=>{const _0x1bd656=_0x4f5241;_0xb1b5a6[_0x1bd656(0x12c)](_0x1e574e)&&_0x55f3ac[_0x1bd656(0x17b)](_0x1e574e);}),_0x55f3ac[_0x4f5241(0x154)]&&(await _0x53c9f0[_0x4f5241(0x111)](_0x4f5241(0x15b),{'params':{'userIDs':[..._0x55f3ac]}}))['body'][_0x4f5241(0x129)]['forEach'](_0x4af82a=>{const _0x384425=_0x4f5241;_0x4af82a&&_0xb1b5a6[_0x384425(0x11a)](_0x4af82a);});};var _0x54817f=Object[_0xb6be16(0x184)],_0x39469e=(_0x29ea55,_0x57d0d4,_0x24a411,_0x2387cf)=>{const _0x285ba0=_0xb6be16;for(var _0x4583fa=_0x2387cf>0x1?void 0x0:_0x2387cf?_0x54817f(_0x57d0d4,_0x24a411):_0x57d0d4,_0x2637d3=_0x29ea55[_0x285ba0(0x125)]-0x1,_0x43d805;_0x2637d3>=0x0;_0x2637d3--)(_0x43d805=_0x29ea55[_0x2637d3])&&(_0x4583fa=_0x43d805(_0x4583fa)||_0x4583fa);return _0x4583fa;},_0x225588=(_0xcdb4d3,_0x5b74de)=>(_0x306496,_0x7595be)=>_0x5b74de(_0x306496,_0x7595be,_0xcdb4d3);let _0x46e779=class extends _0x113df9[_0xb6be16(0x17c)]{constructor(_0x35ed91,_0x5d2c50,_0x25b1e3,_0x829a22){const _0x36da21=_0xb6be16;super(),this[_0x36da21(0x182)]=_0x35ed91,this[_0x36da21(0x151)]=_0x5d2c50,this[_0x36da21(0x10c)]=_0x25b1e3,this['_injector']=_0x829a22,this[_0x36da21(0x145)](),this['_initUserSync']();}[_0xb6be16(0x189)](){const _0x36170e=_0xb6be16;this[_0x36170e(0x121)](this[_0x36170e(0x151)]['commentUpdate$'][_0x36170e(0x186)](_0x4026f3[_0x36170e(0x16a)](0x10))[_0x36170e(0x11b)](_0x51443b=>{const _0x1b641f=_0x36170e,_0x13942d=new Set();_0x51443b[_0x1b641f(0x12f)](_0x4a0fe9=>{const _0x48cc5c=_0x1b641f;switch(_0x4a0fe9[_0x48cc5c(0x14c)]){case'add':{const _0x412b22=_0x4a0fe9[_0x48cc5c(0x18b)][_0x48cc5c(0x15d)];_0x13942d['add'](_0x412b22);break;}}}),_0x3b7dc3(this[_0x1b641f(0x176)],_0x13942d);}));}[_0xb6be16(0x145)](){const _0x3628bc=_0xb6be16;this[_0x3628bc(0x121)](this['_commentService'][_0x3628bc(0x168)][_0x3628bc(0x11b)](async _0x46526e=>{const _0x1abd79=_0x3628bc;var _0x7e36bb,_0x533be2,_0x1cadd3,_0x32040f;const _0x18827c=(_0x7e36bb=this[_0x1abd79(0x151)][_0x1abd79(0x18a)](_0x46526e['unitId'])['find'](_0xeacffe=>_0xeacffe['threadId']===_0x46526e[_0x1abd79(0x124)]))==null?void 0x0:_0x7e36bb['root'];if(!_0x18827c)return;const {unitId:_0x599e58,subUnitId:_0x4e7217}=_0x18827c;switch(_0x46526e['user']&&this['_userService'][_0x1abd79(0x11a)](_0x46526e['user']),_0x46526e['type']){case _0x11c8cb['Add']:break;case _0x11c8cb[_0x1abd79(0x165)]:{this['_threadCommentModel'][_0x1abd79(0x10b)](_0x599e58,_0x4e7217,{'unitId':_0x599e58,'subUnitId':_0x4e7217,'ref':'','id':_0x46526e['replyId'],'dT':_0x563f5d(+_0x46526e['createTimestamp']),'threadId':_0x46526e[_0x1abd79(0x124)],'personId':(_0x1cadd3=(_0x533be2=_0x46526e[_0x1abd79(0x173)])==null?void 0x0:_0x533be2[_0x1abd79(0x108)])!=null?_0x1cadd3:_0x46526e[_0x1abd79(0x18e)],'text':JSON[_0x1abd79(0x13b)](_0x46526e[_0x1abd79(0x166)]),'parentId':_0x18827c['id']});break;}case _0x11c8cb['Delete']:{const _0x5cab2a=this[_0x1abd79(0x151)][_0x1abd79(0x144)](_0x599e58,_0x4e7217,_0x46526e[_0x1abd79(0x107)]);_0x5cab2a&&_0x5cab2a['parentId']&&this[_0x1abd79(0x151)]['deleteComment'](_0x599e58,_0x4e7217,_0x46526e['replyId']);break;}case _0x11c8cb[_0x1abd79(0x10d)]:{this[_0x1abd79(0x151)]['updateComment'](_0x599e58,_0x4e7217,{'commentId':_0x46526e[_0x1abd79(0x107)],'text':JSON[_0x1abd79(0x13b)](_0x46526e['content'])});break;}case _0x11c8cb[_0x1abd79(0x164)]:{const _0x368cf4=(_0x32040f=this['_threadCommentModel']['getUnit'](_0x46526e['unitId'])['find'](_0x437502=>_0x437502[_0x1abd79(0x124)]===_0x46526e[_0x1abd79(0x124)]))==null?void 0x0:_0x32040f[_0x1abd79(0x114)];_0x368cf4&&this[_0x1abd79(0x151)][_0x1abd79(0x141)](_0x599e58,_0x4e7217,_0x368cf4['id'],_0x46526e[_0x1abd79(0x11c)]===_0x328b1c[_0x1abd79(0x18c)]);break;}}}));}};_0x46e779=_0x39469e([_0x225588(0x0,_0x113df9[_0xb6be16(0x149)](_0x366672[_0xb6be16(0x18f)])),_0x225588(0x1,_0x113df9['Inject'](_0x5b6592[_0xb6be16(0x17d)])),_0x225588(0x2,_0x113df9[_0xb6be16(0x149)](_0x113df9[_0xb6be16(0x135)])),_0x225588(0x3,_0x113df9[_0xb6be16(0x149)](_0x113df9[_0xb6be16(0x17e)]))],_0x46e779);const _0x9c9214='thread-comment-data-source.config',_0x62060f={};var _0x8843a9=Object[_0xb6be16(0x184)],_0x3f3564=(_0x44bb5e,_0x1f9c63,_0xf6150f,_0x5f4756)=>{const _0x56defb=_0xb6be16;for(var _0x5c4c8c=_0x5f4756>0x1?void 0x0:_0x5f4756?_0x8843a9(_0x1f9c63,_0xf6150f):_0x1f9c63,_0x53c839=_0x44bb5e[_0x56defb(0x125)]-0x1,_0x3b4930;_0x53c839>=0x0;_0x53c839--)(_0x3b4930=_0x44bb5e[_0x53c839])&&(_0x5c4c8c=_0x3b4930(_0x5c4c8c)||_0x5c4c8c);return _0x5c4c8c;},_0x34e4ff=(_0x4f2c81,_0x58109b)=>(_0x33e18c,_0x5dba84)=>_0x58109b(_0x33e18c,_0x5dba84,_0x4f2c81);function _0x2b0333(_0x16f9b0,_0x1c98c1){const _0x55bf88=_0xb6be16,_0x306818=_0x16f9b0[_0x55bf88(0x174)][0x0];return{..._0x1c98c1,'id':_0x306818[_0x55bf88(0x107)],'resolved':_0x16f9b0['solved']===0x1,'dT':_0x563f5d(_0x306818[_0x55bf88(0x161)]),'personId':_0x306818[_0x55bf88(0x18e)],'threadId':_0x306818['threadId']};}function _0x1e6ba0(_0x798771,_0x17c28b,_0x46f6be){const _0x2f704c=_0xb6be16;var _0x43cb91,_0x16792d;if(((_0x16792d=(_0x43cb91=_0x798771==null?void 0x0:_0x798771['replies'])==null?void 0x0:_0x43cb91[_0x2f704c(0x125)])!=null?_0x16792d:0x0)>0x0){const _0x4d83a6=(_0x29b373,_0x1d0aae)=>({'id':_0x29b373[_0x2f704c(0x107)],'threadId':_0x29b373[_0x2f704c(0x124)],'dT':_0x563f5d(_0x29b373['createTimestamp']),'personId':_0x29b373[_0x2f704c(0x18e)],'resolved':_0x798771[_0x2f704c(0x11c)]===_0x328b1c[_0x2f704c(0x18c)],'unitId':_0x17c28b,'subUnitId':_0x46f6be,'text':JSON[_0x2f704c(0x13b)](_0x29b373[_0x2f704c(0x166)]),'parentId':_0x1d0aae}),_0x53af7d=_0x4d83a6(_0x798771[_0x2f704c(0x174)][0x0]);return{..._0x53af7d,'children':_0x798771['replies'][_0x2f704c(0x179)](0x1)[_0x2f704c(0x120)](_0x5e59d1=>_0x4d83a6(_0x5e59d1,_0x53af7d['id']))};}return null;}let _0xbd95cf=class{constructor(_0x1d0889,_0x387913,_0xd4530d,_0x1ded9b){const _0x46b1fd=_0xb6be16;this[_0x46b1fd(0x17a)]=_0x1d0889,this[_0x46b1fd(0x10c)]=_0x387913,this[_0x46b1fd(0x13f)]=_0xd4530d,this[_0x46b1fd(0x176)]=_0x1ded9b;}async['addComment'](_0x5820c2){const _0x2f01e9=_0xb6be16;var _0x255a19,_0x467f23;const {parentId:_0x5f10d3,unitId:_0x42d3ba,text:_0x4f0da7,threadId:_0x351005}=_0x5820c2,_0x37749b=(_0x467f23=(_0x255a19=_0x4f0da7['customRanges'])==null?void 0x0:_0x255a19[_0x2f01e9(0x170)](_0x434ac8=>_0x434ac8[_0x2f01e9(0x187)]===_0x113df9['CustomRangeType'][_0x2f01e9(0x147)])['map'](_0x576bee=>_0x576bee['rangeId']))!=null?_0x467f23:[],_0x586ce1=JSON[_0x2f01e9(0x116)](_0x4f0da7),_0x4adfbb=(await this[_0x2f01e9(0x13f)][_0x2f01e9(0x115)](_0x42d3ba))[_0x2f01e9(0x128)]();if(_0x5f10d3){const _0x2a44f9={'memberId':_0x4adfbb,'unitId':_0x42d3ba,'content':_0x586ce1,'mention':_0x37749b,'threadId':_0x351005},_0x5d5686=(await this[_0x2f01e9(0x17a)][_0x2f01e9(0x16b)]('/universer-api/comment/unit/'+_0x42d3ba+_0x2f01e9(0x13e),{'body':_0x2a44f9}))[_0x2f01e9(0x172)]['reply'];return{..._0x5820c2,'id':_0x5d5686[_0x2f01e9(0x107)],'dT':_0x113df9['dayjs'](+_0x5d5686['createTimestamp'])[_0x2f01e9(0x15f)](_0x2f01e9(0x180)),'personId':_0x5d5686[_0x2f01e9(0x18e)]};}else{const _0x2354af={'memberId':_0x4adfbb,'unitId':_0x42d3ba,'content':_0x586ce1,'mention':_0x37749b},_0x34087c=await this[_0x2f01e9(0x17a)]['post'](_0x2f01e9(0x160)+_0x42d3ba+_0x2f01e9(0x163),{'body':_0x2354af});return _0x2b0333(_0x34087c[_0x2f01e9(0x172)][_0x2f01e9(0x119)],_0x5820c2);}}async['updateComment'](_0xaa7abb){const _0x5f4767=_0xb6be16;var _0x4923c3,_0x410330;const {text:_0xa52ee9,unitId:_0x114951}=_0xaa7abb,_0x34355d=(_0x410330=(_0x4923c3=_0xa52ee9[_0x5f4767(0x181)])==null?void 0x0:_0x4923c3[_0x5f4767(0x170)](_0xe0383=>_0xe0383['rangeType']===_0x113df9[_0x5f4767(0x143)]['COMMENT'])[_0x5f4767(0x120)](_0x48b512=>_0x48b512[_0x5f4767(0x112)]))!=null?_0x410330:[],_0x24d784=JSON[_0x5f4767(0x116)](_0xa52ee9),_0x2537a0=_0xaa7abb[_0x5f4767(0x124)],_0xa76066=_0xaa7abb['id'],_0x571488={'memberId':(await this[_0x5f4767(0x13f)]['requireSession'](_0x114951))[_0x5f4767(0x128)](),'unitId':_0x114951,'threadId':_0x2537a0,'mention':_0x34355d,'content':_0x24d784,'replyId':_0xa76066},_0x5b3d8e=await this[_0x5f4767(0x17a)][_0x5f4767(0x16b)](_0x5f4767(0x160)+_0x114951+'/edit',{'body':_0x571488});return!_0x5b3d8e[_0x5f4767(0x172)][_0x5f4767(0x188)]||_0x5b3d8e[_0x5f4767(0x172)][_0x5f4767(0x188)][_0x5f4767(0x113)]===0x1;}async[_0xb6be16(0x141)](_0x583c32){const _0x26e6ae=_0xb6be16,{unitId:_0x18b7c3}=_0x583c32,_0x1e8abe=_0x583c32[_0x26e6ae(0x124)],_0x4664d3={'memberId':this[_0x26e6ae(0x10c)][_0x26e6ae(0x10f)]()['userID'],'unitId':_0x18b7c3,'threadId':_0x1e8abe,'solved':_0x583c32[_0x26e6ae(0x18d)]?_0x328b1c[_0x26e6ae(0x18c)]:_0x328b1c[_0x26e6ae(0x109)]},_0x3f92cf=await this[_0x26e6ae(0x17a)][_0x26e6ae(0x16b)](_0x26e6ae(0x160)+_0x18b7c3+_0x26e6ae(0x106),{'body':_0x4664d3});return!_0x3f92cf['body'][_0x26e6ae(0x188)]||_0x3f92cf[_0x26e6ae(0x172)][_0x26e6ae(0x188)][_0x26e6ae(0x113)]===0x1;}async[_0xb6be16(0x117)](_0x260b00,_0x32168b,_0x195463,_0xcf7f4d){const _0x767e69=_0xb6be16,_0xf64240={'memberId':(await this['_sessionService']['requireSession'](_0x260b00))[_0x767e69(0x128)](),'threadId':_0x195463,'replyId':_0xcf7f4d,'unitId':_0x260b00},_0x589163=await this['_httpService']['post'](_0x767e69(0x160)+_0x260b00+_0x767e69(0x159),{'body':_0xf64240});return!_0x589163[_0x767e69(0x172)][_0x767e69(0x188)]||_0x589163[_0x767e69(0x172)]['error'][_0x767e69(0x113)]===0x1;}async[_0xb6be16(0x134)](_0x303a69,_0xde8ecf,_0x3985f8){const _0x2d9253=_0xb6be16,_0x6f6d90={'unitId':_0x303a69,'threadId':_0x3985f8},_0x62bf38=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x303a69+'/list',{'body':_0x6f6d90}),_0x391737=_0x3985f8[_0x2d9253(0x120)](_0x29743f=>_0x1e6ba0(_0x62bf38[_0x2d9253(0x172)][_0x2d9253(0x12d)][_0x29743f],_0x303a69,_0xde8ecf))[_0x2d9253(0x170)](Boolean);return Object['values'](_0x62bf38[_0x2d9253(0x172)][_0x2d9253(0x129)])[_0x2d9253(0x12f)](_0x2e67e7=>{const _0x2ee731=_0x2d9253;this[_0x2ee731(0x10c)][_0x2ee731(0x11a)](_0x2e67e7);}),_0x391737;}[_0xb6be16(0x150)](_0x4af784){const _0xfff871=_0xb6be16;return{'id':_0x4af784['id'],'threadId':_0x4af784[_0xfff871(0x124)],'ref':_0x4af784['ref']};}};_0xbd95cf=_0x3f3564([_0x34e4ff(0x0,_0x113df9[_0xb6be16(0x149)](_0xb342fe[_0xb6be16(0x104)])),_0x34e4ff(0x1,_0x113df9[_0xb6be16(0x149)](_0x113df9[_0xb6be16(0x135)])),_0x34e4ff(0x2,_0x113df9[_0xb6be16(0x149)](_0x366672['CollaborationSessionService'])),_0x34e4ff(0x3,_0x113df9[_0xb6be16(0x149)](_0x113df9['Injector']))],_0xbd95cf);var _0x1d7c3a=Object[_0xb6be16(0x184)],_0x5e9d60=(_0x5048d3,_0xb19029,_0x33e48f,_0xb2dbd4)=>{const _0x94a060=_0xb6be16;for(var _0x37f290=_0xb2dbd4>0x1?void 0x0:_0xb2dbd4?_0x1d7c3a(_0xb19029,_0x33e48f):_0xb19029,_0x4eebf5=_0x5048d3[_0x94a060(0x125)]-0x1,_0x388699;_0x4eebf5>=0x0;_0x4eebf5--)(_0x388699=_0x5048d3[_0x4eebf5])&&(_0x37f290=_0x388699(_0x37f290)||_0x37f290);return _0x37f290;},_0xb492ee=(_0x5a865e,_0x39be70)=>(_0xeac5a9,_0x85be30)=>_0x39be70(_0xeac5a9,_0x85be30,_0x5a865e);let _0x5ecc8d=class extends _0x113df9['Disposable']{constructor(_0x20cb7c,_0x29cade){const _0x2e729f=_0xb6be16;super(),this[_0x2e729f(0x177)]=_0x20cb7c,this[_0x2e729f(0x13c)]=_0x29cade,this[_0x2e729f(0x118)]();}[_0xb6be16(0x118)](){const _0x120f6b=_0xb6be16;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x120f6b(0x177)][_0x120f6b(0x158)]=!0x1;}};_0x5ecc8d=_0x5e9d60([_0xb492ee(0x0,_0x5b6592[_0xb6be16(0x122)]),_0xb492ee(0x1,_0x113df9[_0xb6be16(0x149)](_0xbd95cf))],_0x5ecc8d);var _0x4a0d02=Object['defineProperty'],_0x5de1ab=Object[_0xb6be16(0x184)],_0x4a7c37=(_0x4771d4,_0x5301d3,_0x19c5ce)=>_0x5301d3 in _0x4771d4?_0x4a0d02(_0x4771d4,_0x5301d3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x19c5ce}):_0x4771d4[_0x5301d3]=_0x19c5ce,_0x3ee5aa=(_0x1ba157,_0x24d71b,_0x4ed905,_0x253fd3)=>{const _0x56f65d=_0xb6be16;for(var _0x85ca9a=_0x253fd3>0x1?void 0x0:_0x253fd3?_0x5de1ab(_0x24d71b,_0x4ed905):_0x24d71b,_0x5e2ecd=_0x1ba157[_0x56f65d(0x125)]-0x1,_0x3c2d48;_0x5e2ecd>=0x0;_0x5e2ecd--)(_0x3c2d48=_0x1ba157[_0x5e2ecd])&&(_0x85ca9a=_0x3c2d48(_0x85ca9a)||_0x85ca9a);return _0x85ca9a;},_0x4f9421=(_0x4c61cf,_0x2b2e7e)=>(_0x5e3159,_0x3902ea)=>_0x2b2e7e(_0x5e3159,_0x3902ea,_0x4c61cf),_0x99d5fe=(_0x3d3f80,_0x1065bb,_0x30c497)=>_0x4a7c37(_0x3d3f80,typeof _0x1065bb!='symbol'?_0x1065bb+'':_0x1065bb,_0x30c497);_0x1c2b26[_0xb6be16(0x127)]=class extends _0x113df9[_0xb6be16(0x17f)]{constructor(_0xdb803c=_0x62060f,_0x499f03,_0x386faf){const _0x1f91a2=_0xb6be16;super(),this[_0x1f91a2(0x178)]=_0xdb803c,this[_0x1f91a2(0x176)]=_0x499f03,this['_configService']=_0x386faf;const {..._0x3f56f9}=_0x113df9[_0x1f91a2(0x15c)]({},_0x62060f,this[_0x1f91a2(0x178)]);this[_0x1f91a2(0x132)][_0x1f91a2(0x16e)](_0x9c9214,_0x3f56f9);}[_0xb6be16(0x146)](){const _0x5eaabd=_0xb6be16;[[_0xbd95cf],[_0x5ecc8d],[_0x46e779]][_0x5eaabd(0x12f)](_0x4eb8bf=>{const _0x1a566a=_0x5eaabd;this[_0x1a566a(0x176)][_0x1a566a(0x11f)](_0x4eb8bf);});}[_0xb6be16(0x14a)](){const _0x388eb0=_0xb6be16;this['_injector'][_0x388eb0(0x111)](_0x5ecc8d),this[_0x388eb0(0x176)]['get'](_0x46e779);}},_0x99d5fe(_0x1c2b26[_0xb6be16(0x127)],_0xb6be16(0x183),_0x415b1a),_0x99d5fe(_0x1c2b26[_0xb6be16(0x127)],_0xb6be16(0x14c),_0x113df9[_0xb6be16(0x185)][_0xb6be16(0x15a)]),_0x1c2b26[_0xb6be16(0x127)]=_0x3ee5aa([_0x113df9[_0xb6be16(0x16c)](_0x3347a0[_0xb6be16(0x190)],_0x366672[_0xb6be16(0x110)],_0x41f68d[_0xb6be16(0x157)]),_0x4f9421(0x1,_0x113df9[_0xb6be16(0x149)](_0x113df9[_0xb6be16(0x17e)])),_0x4f9421(0x2,_0x113df9[_0xb6be16(0x162)])],_0x1c2b26[_0xb6be16(0x127)]),Object[_0xb6be16(0x136)](_0x1c2b26,Symbol[_0xb6be16(0x13a)],{'value':_0xb6be16(0x13d)});}));function _0x2beb(){const _0x1c69cd=['getUser','comments','@univerjs/core','forEach','@univerjs-pro/license','2451564kjqFar','_configService','2765HNAPvY','listComments','UserManagerService','defineProperty','1lbOUuY','13572UxMOvr','function','toStringTag','parse','_threadCommentDataSource','Module','/reply','_sessionService','UniverProCollaborationClient','resolveComment','rxjs','CustomRangeType','getComment','_init','onStarting','COMMENT','amd','Inject','onReady','@univerjs-pro/collaboration-client','type','@univerjs/thread-comment-ui','Add','object','saveCommentToSnapshot','_threadCommentModel','exports','2303GZnkBm','size','UniverProThreadCommentDatasource','@univerjs/network','UniverLicensePlugin','syncUpdateMutationToColla','/delete','UNIVER_UNKNOWN','/universer-api/user/list','merge','personId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','/universer-api/comment/unit/','createTimestamp','IConfigService','/add','Solve','Reply','content','Delete','commentUpdate$','15144wpsgfU','bufferTime','post','DependentOn','UniverCore','setConfig','Unknown','filter','UniverProLicense','body','user','replies','13070472VgtZCo','_injector','_threadCommentDataSourceService','_config','slice','_httpService','delete','Disposable','ThreadCommentModel','Injector','Plugin','YYYY/MM/DD\x20HH:mm','customRanges','_commentService','pluginName','getOwnPropertyDescriptor','UniverInstanceType','pipe','rangeType','error','_initUserSync','getUnit','payload','Solved','resolved','userId','CommentService','UniverThreadCommentUIPlugin','HTTPService','dayjs','/solved','replyId','userID','OpenOrReOpen','@univerjs/thread-comment','addComment','_userService','Edit','11qHeTaA','getCurrentUser','UniverCollaborationClientPlugin','get','rangeId','code','root','requireSession','stringify','deleteComment','_initDataSource','comment','addUser','subscribe','solved','2456752jMPYEI','UNRECOGNIZED','add','map','disposeWithMe','IThreadCommentDataSourceService','2378874IZOJIm','threadId','length','56LgRmvO','UniverThreadCommentDataSourcePlugin','getMemberID','users','UniverThreadCommentUi','8967870JGzyfk'];_0x2beb=function(){return _0x1c69cd;};return _0x2beb();}
|
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.202506191607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.8.1-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.8.1-nightly.
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.8.1-nightly.
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.8.1-nightly.202506191607",
|
|
49
|
+
"@univerjs-pro/license": "0.8.1-nightly.202506191607",
|
|
50
|
+
"@univerjs/core": "0.8.1-nightly.202506191607",
|
|
51
|
+
"@univerjs/network": "0.8.1-nightly.202506191607",
|
|
52
|
+
"@univerjs/thread-comment": "0.8.1-nightly.202506191607",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.8.1-nightly.202506191607",
|
|
54
|
+
"@univerjs/protocol": "0.1.47-alpha.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|