@univerjs-pro/thread-comment-datasource 0.16.0 → 0.16.1-insiders.20260311-074e8ca
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/types/plugin.d.ts +3 -2
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x79121e=_0x479c;(function(_0x30ed0f,_0x1d6395){const _0x1ef56a=_0x479c,_0x59982c=_0x30ed0f();while(!![]){try{const _0x4b4d69=-parseInt(_0x1ef56a(0x1ad))/0x1+parseInt(_0x1ef56a(0x1bd))/0x2+parseInt(_0x1ef56a(0x1a6))/0x3*(parseInt(_0x1ef56a(0x1d1))/0x4)+-parseInt(_0x1ef56a(0x1df))/0x5*(parseInt(_0x1ef56a(0x203))/0x6)+-parseInt(_0x1ef56a(0x1f9))/0x7+parseInt(_0x1ef56a(0x20d))/0x8+-parseInt(_0x1ef56a(0x1f5))/0x9*(-parseInt(_0x1ef56a(0x1b2))/0xa);if(_0x4b4d69===_0x1d6395)break;else _0x59982c['push'](_0x59982c['shift']());}catch(_0x24d1ce){_0x59982c['push'](_0x59982c['shift']());}}}(_0x46a9,0x98c46));function _0x46a9(){const _0x3f5857=['syncUpdateMutationToColla','_userService','Module','dataSource','_init','1087780jhnklr','listComments','Unknown','merge','subscribe','282350pdazoi','Reply','requireSession','_injector','getMemberID','getOwnPropertyDescriptor','resolveComment','personId','OpenOrReOpen','DependentOn','payload','1119676PmpPFq','/universer-api/user/list','userID','getComment','/list','Plugin','values','_config','UserManagerService','filter','UNRECOGNIZED','userId','CollaborationSessionService','_threadCommentDataSourceService','HTTPService','addComment','replies','UniverThreadCommentDataSourcePlugin','commentUpdate$','deleteComment','923004OexVZW','_initUserSync','_threadCommentModel','size','/edit','Delete','find','YYYY/MM/DD\x20HH:mm','length','parse','updateComment','stringify','type','ThreadCommentModel','5WaiWGT','content','getUnit','saveCommentToSnapshot','solved','_threadCommentDataSource','CustomRangeType','getUser','post','body','format','UniverInstanceType','Inject','Add','get','createTimestamp','_sessionService','slice','add','map','comments','users','315Epbvjc','/reply','_httpService','Solved','1674729QNcLvh','bufferTime','onReady','pipe','unitId','_initDataSource','rangeType','customRanges','_configService','defineProperty','731166sUtoZH','rangeId','addUser','/add','/universer-api/comment/unit/','replyId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentUIPlugin','Injector','code','520456lfKWNH','_commentService','user','disposeWithMe','CommentService','threadId','/delete','UniverCollaborationClientPlugin','toStringTag','forEach','dayjs','error','parentId','COMMENT','Solve','onStarting','setConfig','6zjoGjG','root'];_0x46a9=function(){return _0x3f5857;};return _0x46a9();}Object['defineProperty'](exports,Symbol[_0x79121e(0x19d)],{'value':_0x79121e(0x1aa)});function _0x479c(_0x6340a5,_0x359f30){_0x6340a5=_0x6340a5-0x19b;const _0x46a9ce=_0x46a9();let _0x479ca3=_0x46a9ce[_0x6340a5];return _0x479ca3;}const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x79121e(0x209);var I=(_0x40ba32=>(_0x40ba32[_0x40ba32['OpenOrReOpen']=0x0]=_0x79121e(0x1ba),_0x40ba32[_0x40ba32[_0x79121e(0x1f8)]=0x1]=_0x79121e(0x1f8),_0x40ba32[_0x40ba32[_0x79121e(0x1c7)]=-0x1]=_0x79121e(0x1c7),_0x40ba32))(I||{}),v=(_0x592b3f=>(_0x592b3f[_0x592b3f[_0x79121e(0x1af)]=0x0]=_0x79121e(0x1af),_0x592b3f[_0x592b3f[_0x79121e(0x1ec)]=0x1]=_0x79121e(0x1ec),_0x592b3f[_0x592b3f['Reply']=0x2]=_0x79121e(0x1b3),_0x592b3f[_0x592b3f['Edit']=0x3]='Edit',_0x592b3f[_0x592b3f[_0x79121e(0x1d6)]=0x4]=_0x79121e(0x1d6),_0x592b3f[_0x592b3f[_0x79121e(0x1a3)]=0x5]=_0x79121e(0x1a3),_0x592b3f[_0x592b3f[_0x79121e(0x1c7)]=-0x1]=_0x79121e(0x1c7),_0x592b3f))(v||{});const f=_0x582460=>c[_0x79121e(0x19f)](new Date(+_0x582460))[_0x79121e(0x1e9)](_0x79121e(0x1d8)),R=async(_0x4e3041,_0xea9010)=>{const _0x2c44a1=_0x79121e,_0x452570=_0x4e3041['get'](c[_0x2c44a1(0x1c5)]),_0x41d6ca=_0x4e3041[_0x2c44a1(0x1ed)](P['HTTPService']);_0xea9010[_0x2c44a1(0x19e)](_0x4d28c8=>{const _0x2c2c18=_0x2c44a1;_0x452570[_0x2c2c18(0x1e6)](_0x4d28c8)&&_0xea9010['delete'](_0x4d28c8);}),_0xea9010[_0x2c44a1(0x1d4)]&&(await _0x41d6ca[_0x2c44a1(0x1ed)](_0x2c44a1(0x1be),{'params':{'userIDs':[..._0xea9010]}}))[_0x2c44a1(0x1e8)]['users']['forEach'](_0x2aa5f7=>{const _0x40e412=_0x2c44a1;_0x2aa5f7&&_0x452570[_0x40e412(0x205)](_0x2aa5f7);});};var $=Object[_0x79121e(0x1b7)],E=(_0x2a98e1,_0x1eb9f2,_0x394122,_0x1db45a)=>{const _0x507493=_0x79121e;for(var _0x1700a8=_0x1db45a>0x1?void 0x0:_0x1db45a?$(_0x1eb9f2,_0x394122):_0x1eb9f2,_0x12e9fb=_0x2a98e1[_0x507493(0x1d9)]-0x1,_0x489005;_0x12e9fb>=0x0;_0x12e9fb--)(_0x489005=_0x2a98e1[_0x12e9fb])&&(_0x1700a8=_0x489005(_0x1700a8)||_0x1700a8);return _0x1700a8;},S=(_0x14306f,_0x18fcfc)=>(_0x4725ae,_0x315658)=>_0x18fcfc(_0x4725ae,_0x315658,_0x14306f);let _=class extends c['Disposable']{constructor(_0x29c658,_0x55ea4f,_0x1adfbe,_0x32de8b){const _0x1367d1=_0x79121e;super(),this[_0x1367d1(0x20e)]=_0x29c658,this[_0x1367d1(0x1d3)]=_0x55ea4f,this['_userService']=_0x1adfbe,this[_0x1367d1(0x1b5)]=_0x32de8b,this[_0x1367d1(0x1ac)](),this[_0x1367d1(0x1d2)]();}[_0x79121e(0x1d2)](){const _0x583c79=_0x79121e;this[_0x583c79(0x210)](this[_0x583c79(0x1d3)][_0x583c79(0x1cf)][_0x583c79(0x1fc)](j[_0x583c79(0x1fa)](0x10))[_0x583c79(0x1b1)](_0x462e27=>{const _0x47584f=_0x583c79,_0x43cc3c=new Set();_0x462e27[_0x47584f(0x19e)](_0x53349d=>{const _0x23c2be=_0x47584f;if(_0x53349d['type']===_0x23c2be(0x1f1)){const _0x302cde=_0x53349d[_0x23c2be(0x1bc)][_0x23c2be(0x1b9)];_0x43cc3c[_0x23c2be(0x1f1)](_0x302cde);}}),R(this[_0x47584f(0x1b5)],_0x43cc3c);}));}[_0x79121e(0x1ac)](){const _0x29d64b=_0x79121e;this['disposeWithMe'](this[_0x29d64b(0x20e)][_0x29d64b(0x1cf)][_0x29d64b(0x1b1)](async _0x5afc42=>{const _0x3e238d=_0x29d64b;var _0x299440,_0x5626de,_0x291b58,_0xcab014;const _0x1f1a5f=(_0x299440=this[_0x3e238d(0x1d3)][_0x3e238d(0x1e1)](_0x5afc42[_0x3e238d(0x1fd)])[_0x3e238d(0x1d7)](_0x510ced=>_0x510ced[_0x3e238d(0x212)]===_0x5afc42[_0x3e238d(0x212)]))==null?void 0x0:_0x299440['root'];if(!_0x1f1a5f)return;const {unitId:_0xe17eb4,subUnitId:_0x21811f}=_0x1f1a5f;switch(_0x5afc42[_0x3e238d(0x20f)]&&this[_0x3e238d(0x1a9)][_0x3e238d(0x205)](_0x5afc42['user']),_0x5afc42[_0x3e238d(0x1dd)]){case v['Add']:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0xe17eb4,_0x21811f,{'unitId':_0xe17eb4,'subUnitId':_0x21811f,'ref':'','id':_0x5afc42['replyId'],'dT':f(+_0x5afc42['createTimestamp']),'threadId':_0x5afc42['threadId'],'personId':(_0x291b58=(_0x5626de=_0x5afc42[_0x3e238d(0x20f)])==null?void 0x0:_0x5626de[_0x3e238d(0x1bf)])!=null?_0x291b58:_0x5afc42[_0x3e238d(0x1c8)],'text':JSON[_0x3e238d(0x1da)](_0x5afc42[_0x3e238d(0x1e0)]),'parentId':_0x1f1a5f['id']});break;}case v[_0x3e238d(0x1d6)]:{const _0x2c5f13=this['_threadCommentModel'][_0x3e238d(0x1c0)](_0xe17eb4,_0x21811f,_0x5afc42[_0x3e238d(0x208)]);_0x2c5f13&&_0x2c5f13[_0x3e238d(0x1a1)]&&this[_0x3e238d(0x1d3)]['deleteComment'](_0xe17eb4,_0x21811f,_0x5afc42['replyId']);break;}case v['Edit']:{this[_0x3e238d(0x1d3)][_0x3e238d(0x1db)](_0xe17eb4,_0x21811f,{'commentId':_0x5afc42[_0x3e238d(0x208)],'text':JSON[_0x3e238d(0x1da)](_0x5afc42[_0x3e238d(0x1e0)])});break;}case v[_0x3e238d(0x1a3)]:{const _0x32d2d9=(_0xcab014=this[_0x3e238d(0x1d3)]['getUnit'](_0x5afc42[_0x3e238d(0x1fd)])[_0x3e238d(0x1d7)](_0x2b2f11=>_0x2b2f11['threadId']===_0x5afc42[_0x3e238d(0x212)]))==null?void 0x0:_0xcab014[_0x3e238d(0x1a7)];_0x32d2d9&&this[_0x3e238d(0x1d3)]['resolveComment'](_0xe17eb4,_0x21811f,_0x32d2d9['id'],_0x5afc42[_0x3e238d(0x1e3)]===I[_0x3e238d(0x1f8)]);break;}}}));}};_=E([S(0x0,c[_0x79121e(0x1eb)](b[_0x79121e(0x211)])),S(0x1,c[_0x79121e(0x1eb)](M[_0x79121e(0x1de)])),S(0x2,c[_0x79121e(0x1eb)](c[_0x79121e(0x1c5)])),S(0x3,c[_0x79121e(0x1eb)](c[_0x79121e(0x20b)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x79121e(0x1b7)],x=(_0x3bfacc,_0x1c61bf,_0x630c5f,_0x517e23)=>{const _0x50f5b5=_0x79121e;for(var _0x5cbd9f=_0x517e23>0x1?void 0x0:_0x517e23?A(_0x1c61bf,_0x630c5f):_0x1c61bf,_0x53b2b7=_0x3bfacc[_0x50f5b5(0x1d9)]-0x1,_0x45465a;_0x53b2b7>=0x0;_0x53b2b7--)(_0x45465a=_0x3bfacc[_0x53b2b7])&&(_0x5cbd9f=_0x45465a(_0x5cbd9f)||_0x5cbd9f);return _0x5cbd9f;},C=(_0x28e9a9,_0x33d4a5)=>(_0x16ef13,_0x2cb8e4)=>_0x33d4a5(_0x16ef13,_0x2cb8e4,_0x28e9a9);function Y(_0x5d3c77,_0x288c26){const _0x299584=_0x79121e,_0x2418c5=_0x5d3c77[_0x299584(0x1cd)][0x0];return{..._0x288c26,'id':_0x2418c5[_0x299584(0x208)],'resolved':_0x5d3c77[_0x299584(0x1e3)]===0x1,'dT':f(_0x2418c5[_0x299584(0x1ee)]),'personId':_0x2418c5[_0x299584(0x1c8)],'threadId':_0x2418c5[_0x299584(0x212)]};}function G(_0x269a33,_0xf3461f,_0x53a13b){const _0x238fb9=_0x79121e;var _0x461647,_0x445dee;if(((_0x445dee=(_0x461647=_0x269a33==null?void 0x0:_0x269a33[_0x238fb9(0x1cd)])==null?void 0x0:_0x461647[_0x238fb9(0x1d9)])!=null?_0x445dee:0x0)>0x0){const _0x51b031=(_0x556907,_0x38bc1a)=>({'id':_0x556907['replyId'],'threadId':_0x556907[_0x238fb9(0x212)],'dT':f(_0x556907[_0x238fb9(0x1ee)]),'personId':_0x556907[_0x238fb9(0x1c8)],'resolved':_0x269a33['solved']===I[_0x238fb9(0x1f8)],'unitId':_0xf3461f,'subUnitId':_0x53a13b,'text':JSON[_0x238fb9(0x1da)](_0x556907[_0x238fb9(0x1e0)]),'parentId':_0x38bc1a}),_0x57935b=_0x51b031(_0x269a33['replies'][0x0]);return{..._0x57935b,'children':_0x269a33[_0x238fb9(0x1cd)][_0x238fb9(0x1f0)](0x1)['map'](_0x36fb87=>_0x51b031(_0x36fb87,_0x57935b['id']))};}return null;}let p=class{constructor(_0x1f8b8d,_0x4fad24,_0x2612c4){const _0x4c8bfb=_0x79121e;this[_0x4c8bfb(0x1f7)]=_0x1f8b8d,this[_0x4c8bfb(0x1a9)]=_0x4fad24,this[_0x4c8bfb(0x1ef)]=_0x2612c4;}async[_0x79121e(0x1cc)](_0x35a582){const _0x2b6a48=_0x79121e;var _0x30c1c4,_0x440f67;const {parentId:_0x15fca4,unitId:_0x3a77a4,text:_0x3ff7f2,threadId:_0x6f20d9}=_0x35a582,_0x3514d7=(_0x440f67=(_0x30c1c4=_0x3ff7f2[_0x2b6a48(0x200)])==null?void 0x0:_0x30c1c4[_0x2b6a48(0x1c6)](_0x181257=>_0x181257[_0x2b6a48(0x1ff)]===c[_0x2b6a48(0x1e5)][_0x2b6a48(0x1a2)])['map'](_0x1e26ff=>_0x1e26ff[_0x2b6a48(0x204)]))!=null?_0x440f67:[],_0x55f53f=JSON['stringify'](_0x3ff7f2),_0x273db9=(await this[_0x2b6a48(0x1ef)][_0x2b6a48(0x1b4)](_0x3a77a4))[_0x2b6a48(0x1b6)]();if(_0x15fca4){const _0x5852ae={'memberId':_0x273db9,'unitId':_0x3a77a4,'content':_0x55f53f,'mention':_0x3514d7,'threadId':_0x6f20d9},_0xf07921=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x3a77a4+_0x2b6a48(0x1f6),{'body':_0x5852ae}))[_0x2b6a48(0x1e8)]['reply'];return{..._0x35a582,'id':_0xf07921[_0x2b6a48(0x208)],'dT':c[_0x2b6a48(0x19f)](+_0xf07921['createTimestamp'])[_0x2b6a48(0x1e9)](_0x2b6a48(0x1d8)),'personId':_0xf07921['userId']};}else{const _0x40cef9={'memberId':_0x273db9,'unitId':_0x3a77a4,'content':_0x55f53f,'mention':_0x3514d7},_0x52153b=await this[_0x2b6a48(0x1f7)][_0x2b6a48(0x1e7)]('/universer-api/comment/unit/'+_0x3a77a4+_0x2b6a48(0x206),{'body':_0x40cef9});return Y(_0x52153b[_0x2b6a48(0x1e8)]['comment'],_0x35a582);}}async[_0x79121e(0x1db)](_0x4e51d7){const _0x414d5d=_0x79121e;var _0x4a1d3d,_0x3a0cba;const {text:_0x5dcd63,unitId:_0x15b7ae}=_0x4e51d7,_0x194410=(_0x3a0cba=(_0x4a1d3d=_0x5dcd63[_0x414d5d(0x200)])==null?void 0x0:_0x4a1d3d[_0x414d5d(0x1c6)](_0x32227e=>_0x32227e[_0x414d5d(0x1ff)]===c[_0x414d5d(0x1e5)][_0x414d5d(0x1a2)])[_0x414d5d(0x1f2)](_0x191780=>_0x191780[_0x414d5d(0x204)]))!=null?_0x3a0cba:[],_0x1184d3=JSON[_0x414d5d(0x1dc)](_0x5dcd63),_0x58bc6a=_0x4e51d7[_0x414d5d(0x212)],_0x431bd6=_0x4e51d7['id'],_0x2e42dc={'memberId':(await this[_0x414d5d(0x1ef)][_0x414d5d(0x1b4)](_0x15b7ae))[_0x414d5d(0x1b6)](),'unitId':_0x15b7ae,'threadId':_0x58bc6a,'mention':_0x194410,'content':_0x1184d3,'replyId':_0x431bd6},_0x574bc0=await this[_0x414d5d(0x1f7)]['post'](_0x414d5d(0x207)+_0x15b7ae+_0x414d5d(0x1d5),{'body':_0x2e42dc});return!_0x574bc0[_0x414d5d(0x1e8)][_0x414d5d(0x1a0)]||_0x574bc0[_0x414d5d(0x1e8)][_0x414d5d(0x1a0)][_0x414d5d(0x20c)]===0x1;}async[_0x79121e(0x1b8)](_0x1473b7){const _0x3ab992=_0x79121e,{unitId:_0x27623f}=_0x1473b7,_0x54432b=_0x1473b7[_0x3ab992(0x212)],_0xc41ed9={'memberId':this[_0x3ab992(0x1a9)]['getCurrentUser']()[_0x3ab992(0x1bf)],'unitId':_0x27623f,'threadId':_0x54432b,'solved':_0x1473b7['resolved']?I[_0x3ab992(0x1f8)]:I[_0x3ab992(0x1ba)]},_0x121ed3=await this[_0x3ab992(0x1f7)]['post'](_0x3ab992(0x207)+_0x27623f+'/solved',{'body':_0xc41ed9});return!_0x121ed3[_0x3ab992(0x1e8)][_0x3ab992(0x1a0)]||_0x121ed3[_0x3ab992(0x1e8)][_0x3ab992(0x1a0)][_0x3ab992(0x20c)]===0x1;}async[_0x79121e(0x1d0)](_0x3afd35,_0xec59ab,_0x2cd843,_0x29aa58){const _0x44c2ec=_0x79121e,_0x1535f6={'memberId':(await this[_0x44c2ec(0x1ef)][_0x44c2ec(0x1b4)](_0x3afd35))[_0x44c2ec(0x1b6)](),'threadId':_0x2cd843,'replyId':_0x29aa58,'unitId':_0x3afd35},_0x34333f=await this[_0x44c2ec(0x1f7)][_0x44c2ec(0x1e7)](_0x44c2ec(0x207)+_0x3afd35+_0x44c2ec(0x19b),{'body':_0x1535f6});return!_0x34333f[_0x44c2ec(0x1e8)][_0x44c2ec(0x1a0)]||_0x34333f['body'][_0x44c2ec(0x1a0)][_0x44c2ec(0x20c)]===0x1;}async[_0x79121e(0x1ae)](_0xeae2ce,_0x3de38b,_0x12cd25){const _0x32dc0b=_0x79121e,_0xb3fdcc={'unitId':_0xeae2ce,'threadId':_0x12cd25},_0x202ed1=await this[_0x32dc0b(0x1f7)][_0x32dc0b(0x1e7)](_0x32dc0b(0x207)+_0xeae2ce+_0x32dc0b(0x1c1),{'body':_0xb3fdcc}),_0x5c35ea=_0x12cd25[_0x32dc0b(0x1f2)](_0x1cabf3=>G(_0x202ed1[_0x32dc0b(0x1e8)][_0x32dc0b(0x1f3)][_0x1cabf3],_0xeae2ce,_0x3de38b))[_0x32dc0b(0x1c6)](Boolean);return Object[_0x32dc0b(0x1c3)](_0x202ed1[_0x32dc0b(0x1e8)][_0x32dc0b(0x1f4)])[_0x32dc0b(0x19e)](_0x5409e2=>{const _0x4fd513=_0x32dc0b;this[_0x4fd513(0x1a9)]['addUser'](_0x5409e2);}),_0x5c35ea;}[_0x79121e(0x1e2)](_0xd33b9d){const _0x3d59c9=_0x79121e;return{'id':_0xd33b9d['id'],'threadId':_0xd33b9d[_0x3d59c9(0x212)],'ref':_0xd33b9d['ref']};}};p=x([C(0x0,c[_0x79121e(0x1eb)](P[_0x79121e(0x1cb)])),C(0x1,c[_0x79121e(0x1eb)](c['UserManagerService'])),C(0x2,c['Inject'](b[_0x79121e(0x1c9)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x15ce0e,_0x40d903,_0xa4af7b,_0x151839)=>{const _0x12b060=_0x79121e;for(var _0x521f09=_0x151839>0x1?void 0x0:_0x151839?H(_0x40d903,_0xa4af7b):_0x40d903,_0x44d7a5=_0x15ce0e[_0x12b060(0x1d9)]-0x1,_0x108f5e;_0x44d7a5>=0x0;_0x44d7a5--)(_0x108f5e=_0x15ce0e[_0x44d7a5])&&(_0x521f09=_0x108f5e(_0x521f09)||_0x521f09);return _0x521f09;},y=(_0x30cbfa,_0x2c6210)=>(_0x251ac2,_0x4b6a92)=>_0x2c6210(_0x251ac2,_0x4b6a92,_0x30cbfa);let g=class extends c['Disposable']{constructor(_0x26fc68,_0x5bf604){const _0x4c7fb3=_0x79121e;super(),this[_0x4c7fb3(0x1ca)]=_0x26fc68,this[_0x4c7fb3(0x1e4)]=_0x5bf604,this[_0x4c7fb3(0x1fe)]();}[_0x79121e(0x1fe)](){const _0x30151d=_0x79121e;this['_threadCommentDataSourceService'][_0x30151d(0x1ab)]=this[_0x30151d(0x1e4)],this[_0x30151d(0x1ca)][_0x30151d(0x1a8)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x79121e(0x1eb)](p))],g);var F=Object[_0x79121e(0x202)],L=Object[_0x79121e(0x1b7)],Z=(_0x583dc8,_0x37cd95,_0x3655cc)=>_0x37cd95 in _0x583dc8?F(_0x583dc8,_0x37cd95,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3655cc}):_0x583dc8[_0x37cd95]=_0x3655cc,W=(_0x40f448,_0xa14a89,_0x5a0f00,_0x266660)=>{for(var _0x589061=_0x266660>0x1?void 0x0:_0x266660?L(_0xa14a89,_0x5a0f00):_0xa14a89,_0x432711=_0x40f448['length']-0x1,_0x2fc033;_0x432711>=0x0;_0x432711--)(_0x2fc033=_0x40f448[_0x432711])&&(_0x589061=_0x2fc033(_0x589061)||_0x589061);return _0x589061;},O=(_0x418cbb,_0x5313c2)=>(_0x4f8416,_0x1dcdd9)=>_0x5313c2(_0x4f8416,_0x1dcdd9,_0x418cbb),N=(_0x38473d,_0x4e6606,_0x50634b)=>Z(_0x38473d,typeof _0x4e6606!='symbol'?_0x4e6606+'':_0x4e6606,_0x50634b);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x79121e(0x1c2)]{constructor(_0x30bd56=D,_0x5a9e6c,_0x198924){const _0x19cdf0=_0x79121e;super(),this[_0x19cdf0(0x1c4)]=_0x30bd56,this[_0x19cdf0(0x1b5)]=_0x5a9e6c,this[_0x19cdf0(0x201)]=_0x198924;const {..._0xcfa4d3}=c[_0x19cdf0(0x1b0)]({},D,this[_0x19cdf0(0x1c4)]);this[_0x19cdf0(0x201)][_0x19cdf0(0x1a5)](q,_0xcfa4d3);}[_0x79121e(0x1a4)](){const _0x2470e5=_0x79121e;[[p],[g],[_]][_0x2470e5(0x19e)](_0x3e1f8c=>{const _0x1938d2=_0x2470e5;this['_injector'][_0x1938d2(0x1f1)](_0x3e1f8c);});}[_0x79121e(0x1fb)](){const _0x5388a2=_0x79121e;this[_0x5388a2(0x1b5)][_0x5388a2(0x1ed)](g),this[_0x5388a2(0x1b5)][_0x5388a2(0x1ed)](_);}},N(exports[_0x79121e(0x1ce)],'pluginName',U),N(exports[_0x79121e(0x1ce)],_0x79121e(0x1dd),c[_0x79121e(0x1ea)]['UNIVER_UNKNOWN']),exports[_0x79121e(0x1ce)]=W([c[_0x79121e(0x1bb)](w[_0x79121e(0x20a)],b[_0x79121e(0x19c)],T['UniverLicensePlugin']),O(0x1,c[_0x79121e(0x1eb)](c[_0x79121e(0x20b)])),O(0x2,c['IConfigService'])],exports[_0x79121e(0x1ce)]);
|
|
1
|
+
'use strict';function _0x2472(_0x2e1cad,_0x42e371){_0x2e1cad=_0x2e1cad-0x98;const _0x2f8914=_0x2f89();let _0x247273=_0x2f8914[_0x2e1cad];return _0x247273;}const _0x2dae74=_0x2472;(function(_0x2cf62d,_0x322d66){const _0xeb29ca=_0x2472,_0x493d38=_0x2cf62d();while(!![]){try{const _0x6642fb=-parseInt(_0xeb29ca(0xa4))/0x1*(parseInt(_0xeb29ca(0x106))/0x2)+-parseInt(_0xeb29ca(0xb6))/0x3+parseInt(_0xeb29ca(0x9d))/0x4+parseInt(_0xeb29ca(0xa0))/0x5*(-parseInt(_0xeb29ca(0xb2))/0x6)+parseInt(_0xeb29ca(0xd0))/0x7+parseInt(_0xeb29ca(0x98))/0x8*(-parseInt(_0xeb29ca(0xe1))/0x9)+parseInt(_0xeb29ca(0xcf))/0xa;if(_0x6642fb===_0x322d66)break;else _0x493d38['push'](_0x493d38['shift']());}catch(_0x19cf20){_0x493d38['push'](_0x493d38['shift']());}}}(_0x2f89,0xd219e));Object[_0x2dae74(0xfa)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),w=require('@univerjs-pro/license'),a=require('@univerjs/core'),N=require('@univerjs/thread-comment-ui'),P=require('@univerjs/thread-comment'),U=require('rxjs'),T=require('@univerjs/network'),R='@univerjs-pro/thread-comment-datasource',$=_0x2dae74(0x102),j={'name':R,'version':$},E=_0x2dae74(0xdc);var I=(_0x33aeff=>(_0x33aeff[_0x33aeff[_0x2dae74(0x112)]=0x0]=_0x2dae74(0x112),_0x33aeff[_0x33aeff[_0x2dae74(0xd4)]=0x1]=_0x2dae74(0xd4),_0x33aeff[_0x33aeff[_0x2dae74(0x10e)]=-0x1]=_0x2dae74(0x10e),_0x33aeff))(I||{}),v=(_0x4d8386=>(_0x4d8386[_0x4d8386[_0x2dae74(0xae)]=0x0]=_0x2dae74(0xae),_0x4d8386[_0x4d8386[_0x2dae74(0xdb)]=0x1]=_0x2dae74(0xdb),_0x4d8386[_0x4d8386[_0x2dae74(0xa6)]=0x2]=_0x2dae74(0xa6),_0x4d8386[_0x4d8386[_0x2dae74(0x104)]=0x3]=_0x2dae74(0x104),_0x4d8386[_0x4d8386[_0x2dae74(0xb0)]=0x4]=_0x2dae74(0xb0),_0x4d8386[_0x4d8386[_0x2dae74(0x10c)]=0x5]=_0x2dae74(0x10c),_0x4d8386[_0x4d8386[_0x2dae74(0x10e)]=-0x1]=_0x2dae74(0x10e),_0x4d8386))(v||{});const f=_0x6fb887=>a['dayjs'](new Date(+_0x6fb887))[_0x2dae74(0xd2)](_0x2dae74(0x109)),q=async(_0x1770b0,_0xfcc4fd)=>{const _0x3c2e12=_0x2dae74,_0x283dab=_0x1770b0[_0x3c2e12(0xbd)](a['UserManagerService']),_0x107614=_0x1770b0[_0x3c2e12(0xbd)](T['HTTPService']);_0xfcc4fd[_0x3c2e12(0xd3)](_0x56bd49=>{const _0x495c53=_0x3c2e12;_0x283dab[_0x495c53(0xe7)](_0x56bd49)&&_0xfcc4fd[_0x495c53(0x101)](_0x56bd49);}),_0xfcc4fd[_0x3c2e12(0xf1)]&&(await _0x107614[_0x3c2e12(0xbd)](_0x3c2e12(0xa3),{'params':{'userIDs':[..._0xfcc4fd]}}))['body'][_0x3c2e12(0xe4)]['forEach'](_0x769254=>{const _0x5f137f=_0x3c2e12;_0x769254&&_0x283dab[_0x5f137f(0xea)](_0x769254);});};var A=Object['getOwnPropertyDescriptor'],x=(_0x4f32e7,_0x5f037e,_0x4fd120,_0x42fb95)=>{const _0x1b3196=_0x2dae74;for(var _0x6de3f1=_0x42fb95>0x1?void 0x0:_0x42fb95?A(_0x5f037e,_0x4fd120):_0x5f037e,_0x39c584=_0x4f32e7[_0x1b3196(0xb5)]-0x1,_0x527319;_0x39c584>=0x0;_0x39c584--)(_0x527319=_0x4f32e7[_0x39c584])&&(_0x6de3f1=_0x527319(_0x6de3f1)||_0x6de3f1);return _0x6de3f1;},S=(_0xccc4db,_0x2b4514)=>(_0x40e863,_0xbefbdc)=>_0x2b4514(_0x40e863,_0xbefbdc,_0xccc4db);let _=class extends a[_0x2dae74(0xc1)]{constructor(_0x356461,_0x4bc027,_0x3ebd61,_0x49312c){const _0x9b86c1=_0x2dae74;super(),this['_commentService']=_0x356461,this[_0x9b86c1(0xf2)]=_0x4bc027,this['_userService']=_0x3ebd61,this[_0x9b86c1(0xc4)]=_0x49312c,this[_0x9b86c1(0xad)](),this[_0x9b86c1(0xcb)]();}[_0x2dae74(0xcb)](){const _0x35d519=_0x2dae74;this[_0x35d519(0xda)](this[_0x35d519(0xf2)][_0x35d519(0xc6)]['pipe'](U[_0x35d519(0xa7)](0x10))[_0x35d519(0xe2)](_0x5340c4=>{const _0x77d0d4=_0x35d519,_0x3156ba=new Set();_0x5340c4['forEach'](_0x6f8e46=>{const _0x53f556=_0x2472;if(_0x6f8e46['type']===_0x53f556(0xcc)){const _0x332de8=_0x6f8e46[_0x53f556(0xaf)][_0x53f556(0x10a)];_0x3156ba['add'](_0x332de8);}}),q(this[_0x77d0d4(0xc4)],_0x3156ba);}));}['_init'](){const _0x2ddf23=_0x2dae74;this['disposeWithMe'](this[_0x2ddf23(0x9c)][_0x2ddf23(0xc6)][_0x2ddf23(0xe2)](async _0x507e13=>{const _0x4703d6=_0x2ddf23;var _0x25ae2c,_0x2ff927,_0x368254,_0x3fff51;const _0x4569d3=(_0x25ae2c=this[_0x4703d6(0xf2)]['getUnit'](_0x507e13[_0x4703d6(0x103)])[_0x4703d6(0xe3)](_0x35aa8c=>_0x35aa8c['threadId']===_0x507e13[_0x4703d6(0xc8)]))==null?void 0x0:_0x25ae2c[_0x4703d6(0xbb)];if(!_0x4569d3)return;const {unitId:_0x9c7e2,subUnitId:_0x2e8001}=_0x4569d3;switch(_0x507e13['user']&&this['_userService'][_0x4703d6(0xea)](_0x507e13[_0x4703d6(0xc0)]),_0x507e13[_0x4703d6(0xf7)]){case v[_0x4703d6(0xdb)]:break;case v[_0x4703d6(0xa6)]:{this[_0x4703d6(0xf2)][_0x4703d6(0xef)](_0x9c7e2,_0x2e8001,{'unitId':_0x9c7e2,'subUnitId':_0x2e8001,'ref':'','id':_0x507e13[_0x4703d6(0xaa)],'dT':f(+_0x507e13[_0x4703d6(0xf0)]),'threadId':_0x507e13[_0x4703d6(0xc8)],'personId':(_0x368254=(_0x2ff927=_0x507e13['user'])==null?void 0x0:_0x2ff927['userID'])!=null?_0x368254:_0x507e13[_0x4703d6(0xbe)],'text':JSON[_0x4703d6(0xac)](_0x507e13[_0x4703d6(0x9f)]),'parentId':_0x4569d3['id']});break;}case v[_0x4703d6(0xb0)]:{const _0x513975=this[_0x4703d6(0xf2)][_0x4703d6(0x9a)](_0x9c7e2,_0x2e8001,_0x507e13[_0x4703d6(0xaa)]);_0x513975&&_0x513975[_0x4703d6(0xe8)]&&this[_0x4703d6(0xf2)][_0x4703d6(0xee)](_0x9c7e2,_0x2e8001,_0x507e13[_0x4703d6(0xaa)]);break;}case v[_0x4703d6(0x104)]:{this[_0x4703d6(0xf2)][_0x4703d6(0xdd)](_0x9c7e2,_0x2e8001,{'commentId':_0x507e13[_0x4703d6(0xaa)],'text':JSON[_0x4703d6(0xac)](_0x507e13[_0x4703d6(0x9f)])});break;}case v['Solve']:{const _0x575478=(_0x3fff51=this[_0x4703d6(0xf2)][_0x4703d6(0xd9)](_0x507e13['unitId'])[_0x4703d6(0xe3)](_0x17cb02=>_0x17cb02[_0x4703d6(0xc8)]===_0x507e13[_0x4703d6(0xc8)]))==null?void 0x0:_0x3fff51['root'];_0x575478&&this[_0x4703d6(0xf2)][_0x4703d6(0xec)](_0x9c7e2,_0x2e8001,_0x575478['id'],_0x507e13[_0x4703d6(0xb9)]===I['Solved']);break;}}}));}};_=x([S(0x0,a[_0x2dae74(0xff)](b[_0x2dae74(0xa1)])),S(0x1,a[_0x2dae74(0xff)](P[_0x2dae74(0xbf)])),S(0x2,a[_0x2dae74(0xff)](a['UserManagerService'])),S(0x3,a[_0x2dae74(0xff)](a[_0x2dae74(0xbc)]))],_);const Y='thread-comment-data-source.config',y={};var G=Object[_0x2dae74(0xa9)],H=(_0x3f6470,_0x175b6b,_0x39c249,_0x2dc204)=>{const _0x256c68=_0x2dae74;for(var _0x53288b=_0x2dc204>0x1?void 0x0:_0x2dc204?G(_0x175b6b,_0x39c249):_0x175b6b,_0x56d0d0=_0x3f6470[_0x256c68(0xb5)]-0x1,_0x3bef5b;_0x56d0d0>=0x0;_0x56d0d0--)(_0x3bef5b=_0x3f6470[_0x56d0d0])&&(_0x53288b=_0x3bef5b(_0x53288b)||_0x53288b);return _0x53288b;},C=(_0x4139d7,_0x2388dd)=>(_0x80f11e,_0x1f6082)=>_0x2388dd(_0x80f11e,_0x1f6082,_0x4139d7);function _0x2f89(){const _0x22039d=['map','root','Injector','get','userId','ThreadCommentModel','user','Disposable','getCurrentUser','onStarting','_injector','values','commentUpdate$','getMemberID','threadId','merge','onReady','_initUserSync','add','replies','rangeType','9417340tcZYjb','8010128XpHNwU','_sessionService','format','forEach','Solved','_configService','requireSession','/universer-api/comment/unit/','IThreadCommentDataSourceService','getUnit','disposeWithMe','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','updateComment','resolved','setConfig','/edit','324QcXjbq','subscribe','find','users','comments','_initDataSource','getUser','parentId','filter','addUser','DependentOn','resolveComment','version','deleteComment','addComment','createTimestamp','size','_threadCommentModel','symbol','syncUpdateMutationToColla','stringify','_threadCommentDataSource','type','COMMENT','HTTPService','defineProperty','dayjs','_httpService','rangeId','/list','Inject','/solved','delete','0.16.1-insiders.20260311-074e8ca','unitId','Edit','IConfigService','60UWwUat','CustomRangeType','_config','YYYY/MM/DD\x20HH:mm','personId','_threadCommentDataSourceService','Solve','/delete','UNRECOGNIZED','UserManagerService','UniverThreadCommentUIPlugin','body','OpenOrReOpen','post','userID','40376lUKSBs','_userService','getComment','ref','_commentService','1292604ZbgZNc','name','content','145ygESkP','CommentService','saveCommentToSnapshot','/universer-api/user/list','436yEhJkY','reply','Reply','bufferTime','customRanges','getOwnPropertyDescriptor','replyId','error','parse','_init','Unknown','payload','Delete','packageName','216174jqGcHe','code','UniverThreadCommentDataSourcePlugin','length','927006ZuXoav','comment','/add','solved'];_0x2f89=function(){return _0x22039d;};return _0x2f89();}function J(_0x40fff8,_0x1c0335){const _0x47eb1c=_0x2dae74,_0x25baac=_0x40fff8[_0x47eb1c(0xcd)][0x0];return{..._0x1c0335,'id':_0x25baac[_0x47eb1c(0xaa)],'resolved':_0x40fff8[_0x47eb1c(0xb9)]===0x1,'dT':f(_0x25baac[_0x47eb1c(0xf0)]),'personId':_0x25baac[_0x47eb1c(0xbe)],'threadId':_0x25baac['threadId']};}function F(_0x1d15a8,_0x39b9bd,_0x2150a7){const _0x17aa50=_0x2dae74;var _0x8ffbb7,_0x398044;if(((_0x398044=(_0x8ffbb7=_0x1d15a8==null?void 0x0:_0x1d15a8[_0x17aa50(0xcd)])==null?void 0x0:_0x8ffbb7['length'])!=null?_0x398044:0x0)>0x0){const _0x197ca6=(_0x4c6190,_0x39cdf1)=>({'id':_0x4c6190['replyId'],'threadId':_0x4c6190[_0x17aa50(0xc8)],'dT':f(_0x4c6190[_0x17aa50(0xf0)]),'personId':_0x4c6190['userId'],'resolved':_0x1d15a8[_0x17aa50(0xb9)]===I[_0x17aa50(0xd4)],'unitId':_0x39b9bd,'subUnitId':_0x2150a7,'text':JSON[_0x17aa50(0xac)](_0x4c6190['content']),'parentId':_0x39cdf1}),_0x3ecc26=_0x197ca6(_0x1d15a8['replies'][0x0]);return{..._0x3ecc26,'children':_0x1d15a8[_0x17aa50(0xcd)]['slice'](0x1)[_0x17aa50(0xba)](_0x54c899=>_0x197ca6(_0x54c899,_0x3ecc26['id']))};}return null;}let p=class{constructor(_0xcd076a,_0x4eaa36,_0xbe2cd6){const _0x5996c0=_0x2dae74;this[_0x5996c0(0xfc)]=_0xcd076a,this[_0x5996c0(0x99)]=_0x4eaa36,this['_sessionService']=_0xbe2cd6;}async['addComment'](_0x3a08b6){const _0x2addd6=_0x2dae74;var _0x4c887e,_0xa418e6;const {parentId:_0x1452fd,unitId:_0xc28974,text:_0x56f42b,threadId:_0xa7d3c3}=_0x3a08b6,_0x28c249=(_0xa418e6=(_0x4c887e=_0x56f42b['customRanges'])==null?void 0x0:_0x4c887e[_0x2addd6(0xe9)](_0x33610a=>_0x33610a[_0x2addd6(0xce)]===a[_0x2addd6(0x107)][_0x2addd6(0xf8)])['map'](_0x4d19e8=>_0x4d19e8[_0x2addd6(0xfd)]))!=null?_0xa418e6:[],_0x5005ac=JSON[_0x2addd6(0xf5)](_0x56f42b),_0x1d5059=(await this['_sessionService'][_0x2addd6(0xd6)](_0xc28974))[_0x2addd6(0xc7)]();if(_0x1452fd){const _0x518884={'memberId':_0x1d5059,'unitId':_0xc28974,'content':_0x5005ac,'mention':_0x28c249,'threadId':_0xa7d3c3},_0x1dd00f=(await this['_httpService'][_0x2addd6(0x113)](_0x2addd6(0xd7)+_0xc28974+'/reply',{'body':_0x518884}))[_0x2addd6(0x111)][_0x2addd6(0xa5)];return{..._0x3a08b6,'id':_0x1dd00f[_0x2addd6(0xaa)],'dT':a[_0x2addd6(0xfb)](+_0x1dd00f[_0x2addd6(0xf0)])['format'](_0x2addd6(0x109)),'personId':_0x1dd00f[_0x2addd6(0xbe)]};}else{const _0x58f48d={'memberId':_0x1d5059,'unitId':_0xc28974,'content':_0x5005ac,'mention':_0x28c249},_0x189314=await this[_0x2addd6(0xfc)]['post'](_0x2addd6(0xd7)+_0xc28974+_0x2addd6(0xb8),{'body':_0x58f48d});return J(_0x189314[_0x2addd6(0x111)][_0x2addd6(0xb7)],_0x3a08b6);}}async['updateComment'](_0x2a00bb){const _0x46c2c7=_0x2dae74;var _0x3117f1,_0xa0caf5;const {text:_0x40fdaf,unitId:_0x4c1be0}=_0x2a00bb,_0x2781aa=(_0xa0caf5=(_0x3117f1=_0x40fdaf[_0x46c2c7(0xa8)])==null?void 0x0:_0x3117f1[_0x46c2c7(0xe9)](_0x58af20=>_0x58af20[_0x46c2c7(0xce)]===a['CustomRangeType'][_0x46c2c7(0xf8)])[_0x46c2c7(0xba)](_0x4a5e28=>_0x4a5e28[_0x46c2c7(0xfd)]))!=null?_0xa0caf5:[],_0x3c5570=JSON[_0x46c2c7(0xf5)](_0x40fdaf),_0x2bd6ab=_0x2a00bb[_0x46c2c7(0xc8)],_0x3285e5=_0x2a00bb['id'],_0x92464d={'memberId':(await this[_0x46c2c7(0xd1)]['requireSession'](_0x4c1be0))[_0x46c2c7(0xc7)](),'unitId':_0x4c1be0,'threadId':_0x2bd6ab,'mention':_0x2781aa,'content':_0x3c5570,'replyId':_0x3285e5},_0x23dad8=await this[_0x46c2c7(0xfc)][_0x46c2c7(0x113)](_0x46c2c7(0xd7)+_0x4c1be0+_0x46c2c7(0xe0),{'body':_0x92464d});return!_0x23dad8['body'][_0x46c2c7(0xab)]||_0x23dad8[_0x46c2c7(0x111)][_0x46c2c7(0xab)]['code']===0x1;}async[_0x2dae74(0xec)](_0x1bae4d){const _0x53c073=_0x2dae74,{unitId:_0x3036db}=_0x1bae4d,_0x1f8f3b=_0x1bae4d['threadId'],_0x338aaf={'memberId':this[_0x53c073(0x99)][_0x53c073(0xc2)]()[_0x53c073(0x114)],'unitId':_0x3036db,'threadId':_0x1f8f3b,'solved':_0x1bae4d[_0x53c073(0xde)]?I['Solved']:I[_0x53c073(0x112)]},_0x570924=await this['_httpService'][_0x53c073(0x113)]('/universer-api/comment/unit/'+_0x3036db+_0x53c073(0x100),{'body':_0x338aaf});return!_0x570924[_0x53c073(0x111)][_0x53c073(0xab)]||_0x570924[_0x53c073(0x111)][_0x53c073(0xab)][_0x53c073(0xb3)]===0x1;}async[_0x2dae74(0xee)](_0x3027aa,_0x2508e1,_0x5f1879,_0xc2b3dc){const _0x51c178=_0x2dae74,_0x590bc0={'memberId':(await this[_0x51c178(0xd1)][_0x51c178(0xd6)](_0x3027aa))[_0x51c178(0xc7)](),'threadId':_0x5f1879,'replyId':_0xc2b3dc,'unitId':_0x3027aa},_0x3046ca=await this['_httpService'][_0x51c178(0x113)](_0x51c178(0xd7)+_0x3027aa+_0x51c178(0x10d),{'body':_0x590bc0});return!_0x3046ca[_0x51c178(0x111)][_0x51c178(0xab)]||_0x3046ca['body'][_0x51c178(0xab)][_0x51c178(0xb3)]===0x1;}async['listComments'](_0x339534,_0x36ef08,_0x20995e){const _0x2c5399=_0x2dae74,_0x596d72={'unitId':_0x339534,'threadId':_0x20995e},_0x43e19d=await this['_httpService'][_0x2c5399(0x113)](_0x2c5399(0xd7)+_0x339534+_0x2c5399(0xfe),{'body':_0x596d72}),_0x4e98f0=_0x20995e[_0x2c5399(0xba)](_0x288a04=>F(_0x43e19d[_0x2c5399(0x111)][_0x2c5399(0xe5)][_0x288a04],_0x339534,_0x36ef08))[_0x2c5399(0xe9)](Boolean);return Object[_0x2c5399(0xc5)](_0x43e19d['body'][_0x2c5399(0xe4)])['forEach'](_0x195d72=>{const _0x4eb610=_0x2c5399;this[_0x4eb610(0x99)][_0x4eb610(0xea)](_0x195d72);}),_0x4e98f0;}[_0x2dae74(0xa2)](_0x53081f){const _0x44c492=_0x2dae74;return{'id':_0x53081f['id'],'threadId':_0x53081f['threadId'],'ref':_0x53081f[_0x44c492(0x9b)]};}};p=H([C(0x0,a['Inject'](T[_0x2dae74(0xf9)])),C(0x1,a[_0x2dae74(0xff)](a[_0x2dae74(0x10f)])),C(0x2,a[_0x2dae74(0xff)](b['CollaborationSessionService']))],p);var L=Object[_0x2dae74(0xa9)],Z=(_0x1ba24a,_0x12b90a,_0xd678a4,_0xe693d3)=>{const _0x43d54b=_0x2dae74;for(var _0x2ed287=_0xe693d3>0x1?void 0x0:_0xe693d3?L(_0x12b90a,_0xd678a4):_0x12b90a,_0x59bf40=_0x1ba24a[_0x43d54b(0xb5)]-0x1,_0x1e2b57;_0x59bf40>=0x0;_0x59bf40--)(_0x1e2b57=_0x1ba24a[_0x59bf40])&&(_0x2ed287=_0x1e2b57(_0x2ed287)||_0x2ed287);return _0x2ed287;},O=(_0x7e3aa4,_0x5de092)=>(_0x50c9b1,_0x37ba1a)=>_0x5de092(_0x50c9b1,_0x37ba1a,_0x7e3aa4);let g=class extends a[_0x2dae74(0xc1)]{constructor(_0x315801,_0x20b75c){const _0x20c744=_0x2dae74;super(),this[_0x20c744(0x10b)]=_0x315801,this[_0x20c744(0xf6)]=_0x20b75c,this[_0x20c744(0xe6)]();}[_0x2dae74(0xe6)](){const _0x465548=_0x2dae74;this[_0x465548(0x10b)]['dataSource']=this['_threadCommentDataSource'],this[_0x465548(0x10b)][_0x465548(0xf4)]=!0x1;}};g=Z([O(0x0,P[_0x2dae74(0xd8)]),O(0x1,a[_0x2dae74(0xff)](p))],g);var k=Object['defineProperty'],B=Object['getOwnPropertyDescriptor'],W=(_0x149a91,_0x1a831c,_0x271439)=>_0x1a831c in _0x149a91?k(_0x149a91,_0x1a831c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x271439}):_0x149a91[_0x1a831c]=_0x271439,z=(_0x602b4d,_0x339d8e,_0x1a54ee,_0x5aa87d)=>{const _0x241c89=_0x2dae74;for(var _0x4e9a76=_0x5aa87d>0x1?void 0x0:_0x5aa87d?B(_0x339d8e,_0x1a54ee):_0x339d8e,_0x1b1b3b=_0x602b4d[_0x241c89(0xb5)]-0x1,_0x17bee2;_0x1b1b3b>=0x0;_0x1b1b3b--)(_0x17bee2=_0x602b4d[_0x1b1b3b])&&(_0x4e9a76=_0x17bee2(_0x4e9a76)||_0x4e9a76);return _0x4e9a76;},M=(_0x51b697,_0x2cdc16)=>(_0x4d3bac,_0x4b5a7a)=>_0x2cdc16(_0x4d3bac,_0x4b5a7a,_0x51b697),D=(_0x210eb1,_0x71993d,_0x3d3467)=>W(_0x210eb1,typeof _0x71993d!=_0x2dae74(0xf3)?_0x71993d+'':_0x71993d,_0x3d3467);exports[_0x2dae74(0xb4)]=class extends a['Plugin']{constructor(_0x50416b=y,_0x3b55e6,_0x2596ab){const _0x45b3e5=_0x2dae74;super(),this[_0x45b3e5(0x108)]=_0x50416b,this[_0x45b3e5(0xc4)]=_0x3b55e6,this[_0x45b3e5(0xd5)]=_0x2596ab;const {..._0x4a01b4}=a[_0x45b3e5(0xc9)]({},y,this[_0x45b3e5(0x108)]);this[_0x45b3e5(0xd5)][_0x45b3e5(0xdf)](Y,_0x4a01b4);}[_0x2dae74(0xc3)](){const _0x5f5a8f=_0x2dae74;[[p],[g],[_]][_0x5f5a8f(0xd3)](_0x4fd93f=>{const _0x8fe3fb=_0x5f5a8f;this[_0x8fe3fb(0xc4)]['add'](_0x4fd93f);});}[_0x2dae74(0xca)](){const _0x498a5e=_0x2dae74;this[_0x498a5e(0xc4)][_0x498a5e(0xbd)](g),this[_0x498a5e(0xc4)][_0x498a5e(0xbd)](_);}},D(exports[_0x2dae74(0xb4)],'pluginName',E),D(exports[_0x2dae74(0xb4)],_0x2dae74(0xb1),j[_0x2dae74(0x9e)]),D(exports[_0x2dae74(0xb4)],_0x2dae74(0xed),j[_0x2dae74(0xed)]),exports[_0x2dae74(0xb4)]=z([a[_0x2dae74(0xeb)](N[_0x2dae74(0x110)],b['UniverCollaborationClientPlugin'],w['UniverLicensePlugin']),M(0x1,a[_0x2dae74(0xff)](a[_0x2dae74(0xbc)])),M(0x2,a[_0x2dae74(0x105)])],exports[_0x2dae74(0xb4)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x16030e=_0x4fd3;(function(_0x570c,_0x4d7997){const _0x3d990a=_0x4fd3,_0x4e4308=_0x570c();while(!![]){try{const _0x103bbb=-parseInt(_0x3d990a(0x140))/0x1+-parseInt(_0x3d990a(0x186))/0x2+parseInt(_0x3d990a(0x18f))/0x3+-parseInt(_0x3d990a(0x17e))/0x4*(parseInt(_0x3d990a(0x179))/0x5)+-parseInt(_0x3d990a(0x146))/0x6+parseInt(_0x3d990a(0x135))/0x7*(parseInt(_0x3d990a(0x13c))/0x8)+parseInt(_0x3d990a(0x183))/0x9;if(_0x103bbb===_0x4d7997)break;else _0x4e4308['push'](_0x4e4308['shift']());}catch(_0x5004f4){_0x4e4308['push'](_0x4e4308['shift']());}}}(_0x4737,0x7f1cb));import{CommentService as _0x461905,CollaborationSessionService as _0x5409b3,UniverCollaborationClientPlugin as _0x32afc7}from'@univerjs-pro/collaboration-client';function _0x4737(){const _0x41a910=['/universer-api/comment/unit/','userId','onReady','Reply','deleteComment','getUnit','listComments','solved','resolveComment','/delete','replyId','commentUpdate$','personId','_configService','10JbznCh','symbol','find','/add','code','468612jUVmvX','_initUserSync','/universer-api/user/list','users','values','13170312CDXJTA','OpenOrReOpen','_userService','792528OCOSPx','getCurrentUser','filter','UNIVER_UNKNOWN','_httpService','_initDataSource','addComment','_config','unitId','2040699MSjwGq','setConfig','delete','error','getOwnPropertyDescriptor','saveCommentToSnapshot','forEach','parse','userID','21iszxVW','defineProperty','_sessionService','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','body','Add','1120672iHLxwB','addUser','content','subscribe','786605UwPaVy','add','_init','map','_injector','/list','3756162wvvWEk','/solved','getUser','updateComment','rangeType','disposeWithMe','size','Solved','_threadCommentModel','format','UNRECOGNIZED','rangeId','COMMENT','reply','createTimestamp','_threadCommentDataSourceService','Delete','slice','requireSession','Edit','length','Unknown','post','replies','getMemberID','Solve','threadId','parentId','stringify','customRanges','user','root','getComment','resolved','get','_commentService','/reply'];_0x4737=function(){return _0x41a910;};return _0x4737();}import{UniverLicensePlugin as _0x15cb9c}from'@univerjs-pro/license';import{dayjs as _0x3452f2,UserManagerService as _0x42539e,Inject as _0x232c4f,Injector as _0x291ac5,Disposable as _0x420710,CustomRangeType as _0x3f0bbe,UniverInstanceType as _0x2c1c94,DependentOn as _0x3102ce,Plugin as _0x1d2449,merge as _0x3b1644,IConfigService as _0x1b3c83}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x9ebaf1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x7b32fd,IThreadCommentDataSourceService as _0x25fc8b}from'@univerjs/thread-comment';import{bufferTime as _0x1985d4}from'rxjs';import{HTTPService as _0x349971}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x527823=>(_0x527823[_0x527823[_0x16030e(0x184)]=0x0]=_0x16030e(0x184),_0x527823[_0x527823[_0x16030e(0x14d)]=0x1]=_0x16030e(0x14d),_0x527823[_0x527823['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x527823))(I||{}),v=(_0x363897=>(_0x363897[_0x363897[_0x16030e(0x15b)]=0x0]=_0x16030e(0x15b),_0x363897[_0x363897[_0x16030e(0x13b)]=0x1]=_0x16030e(0x13b),_0x363897[_0x363897[_0x16030e(0x16e)]=0x2]=_0x16030e(0x16e),_0x363897[_0x363897[_0x16030e(0x159)]=0x3]=_0x16030e(0x159),_0x363897[_0x363897[_0x16030e(0x156)]=0x4]=_0x16030e(0x156),_0x363897[_0x363897[_0x16030e(0x15f)]=0x5]=_0x16030e(0x15f),_0x363897[_0x363897[_0x16030e(0x150)]=-0x1]=_0x16030e(0x150),_0x363897))(v||{});const y=_0x4d52b0=>_0x3452f2(new Date(+_0x4d52b0))[_0x16030e(0x14f)](_0x16030e(0x138)),B=async(_0x723b93,_0x38ae3d)=>{const _0x45ab6b=_0x16030e,_0x4d6b91=_0x723b93[_0x45ab6b(0x168)](_0x42539e),_0x1eb950=_0x723b93[_0x45ab6b(0x168)](_0x349971);_0x38ae3d[_0x45ab6b(0x132)](_0x2bbfb3=>{const _0x325383=_0x45ab6b;_0x4d6b91[_0x325383(0x148)](_0x2bbfb3)&&_0x38ae3d[_0x325383(0x191)](_0x2bbfb3);}),_0x38ae3d[_0x45ab6b(0x14c)]&&(await _0x1eb950[_0x45ab6b(0x168)](_0x45ab6b(0x180),{'params':{'userIDs':[..._0x38ae3d]}}))[_0x45ab6b(0x13a)][_0x45ab6b(0x181)][_0x45ab6b(0x132)](_0x574b81=>{const _0x10a9c9=_0x45ab6b;_0x574b81&&_0x4d6b91[_0x10a9c9(0x13d)](_0x574b81);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x422c9a,_0x41893e,_0x40d3c0,_0x4ede76)=>{for(var _0x7d4ceb=_0x4ede76>0x1?void 0x0:_0x4ede76?K(_0x41893e,_0x40d3c0):_0x41893e,_0x1e7fd5=_0x422c9a['length']-0x1,_0x3024da;_0x1e7fd5>=0x0;_0x1e7fd5--)(_0x3024da=_0x422c9a[_0x1e7fd5])&&(_0x7d4ceb=_0x3024da(_0x7d4ceb)||_0x7d4ceb);return _0x7d4ceb;},p=(_0x1fea2f,_0x161859)=>(_0x360840,_0x4929e1)=>_0x161859(_0x360840,_0x4929e1,_0x1fea2f);let _=class extends _0x420710{constructor(_0x4e5406,_0x3e96ae,_0x41e4e7,_0x4d4c75){const _0x49d77a=_0x16030e;super(),this[_0x49d77a(0x169)]=_0x4e5406,this['_threadCommentModel']=_0x3e96ae,this[_0x49d77a(0x185)]=_0x41e4e7,this[_0x49d77a(0x144)]=_0x4d4c75,this[_0x49d77a(0x142)](),this[_0x49d77a(0x17f)]();}[_0x16030e(0x17f)](){const _0x49cf73=_0x16030e;this[_0x49cf73(0x14b)](this[_0x49cf73(0x14e)][_0x49cf73(0x176)]['pipe'](_0x1985d4(0x10))['subscribe'](_0x5ee4c0=>{const _0x107253=_0x49cf73,_0x5f0f7b=new Set();_0x5ee4c0[_0x107253(0x132)](_0x1dd8a2=>{const _0x3a1b87=_0x107253;if(_0x1dd8a2['type']===_0x3a1b87(0x141)){const _0x1bb66f=_0x1dd8a2['payload'][_0x3a1b87(0x177)];_0x5f0f7b[_0x3a1b87(0x141)](_0x1bb66f);}}),B(this[_0x107253(0x144)],_0x5f0f7b);}));}[_0x16030e(0x142)](){const _0x3fe3f4=_0x16030e;this[_0x3fe3f4(0x14b)](this['_commentService'][_0x3fe3f4(0x176)][_0x3fe3f4(0x13f)](async _0x3162a4=>{const _0x1c2bc1=_0x3fe3f4;var _0xa9cacb,_0x3a6163,_0x5a3b2e,_0x178f57;const _0x59d2ff=(_0xa9cacb=this[_0x1c2bc1(0x14e)][_0x1c2bc1(0x170)](_0x3162a4[_0x1c2bc1(0x18e)])[_0x1c2bc1(0x17b)](_0xb58524=>_0xb58524[_0x1c2bc1(0x160)]===_0x3162a4['threadId']))==null?void 0x0:_0xa9cacb['root'];if(!_0x59d2ff)return;const {unitId:_0xd798b3,subUnitId:_0x46e6cd}=_0x59d2ff;switch(_0x3162a4['user']&&this[_0x1c2bc1(0x185)][_0x1c2bc1(0x13d)](_0x3162a4[_0x1c2bc1(0x164)]),_0x3162a4['type']){case v[_0x1c2bc1(0x13b)]:break;case v[_0x1c2bc1(0x16e)]:{this['_threadCommentModel']['addComment'](_0xd798b3,_0x46e6cd,{'unitId':_0xd798b3,'subUnitId':_0x46e6cd,'ref':'','id':_0x3162a4['replyId'],'dT':y(+_0x3162a4['createTimestamp']),'threadId':_0x3162a4['threadId'],'personId':(_0x5a3b2e=(_0x3a6163=_0x3162a4['user'])==null?void 0x0:_0x3a6163[_0x1c2bc1(0x134)])!=null?_0x5a3b2e:_0x3162a4['userId'],'text':JSON[_0x1c2bc1(0x133)](_0x3162a4[_0x1c2bc1(0x13e)]),'parentId':_0x59d2ff['id']});break;}case v[_0x1c2bc1(0x156)]:{const _0x42a236=this[_0x1c2bc1(0x14e)][_0x1c2bc1(0x166)](_0xd798b3,_0x46e6cd,_0x3162a4[_0x1c2bc1(0x175)]);_0x42a236&&_0x42a236[_0x1c2bc1(0x161)]&&this['_threadCommentModel']['deleteComment'](_0xd798b3,_0x46e6cd,_0x3162a4[_0x1c2bc1(0x175)]);break;}case v['Edit']:{this[_0x1c2bc1(0x14e)]['updateComment'](_0xd798b3,_0x46e6cd,{'commentId':_0x3162a4[_0x1c2bc1(0x175)],'text':JSON[_0x1c2bc1(0x133)](_0x3162a4[_0x1c2bc1(0x13e)])});break;}case v[_0x1c2bc1(0x15f)]:{const _0x153a77=(_0x178f57=this[_0x1c2bc1(0x14e)][_0x1c2bc1(0x170)](_0x3162a4[_0x1c2bc1(0x18e)])[_0x1c2bc1(0x17b)](_0x147fc5=>_0x147fc5['threadId']===_0x3162a4['threadId']))==null?void 0x0:_0x178f57[_0x1c2bc1(0x165)];_0x153a77&&this[_0x1c2bc1(0x14e)]['resolveComment'](_0xd798b3,_0x46e6cd,_0x153a77['id'],_0x3162a4[_0x1c2bc1(0x172)]===I[_0x1c2bc1(0x14d)]);break;}}}));}};_=V([p(0x0,_0x232c4f(_0x461905)),p(0x1,_0x232c4f(_0x7b32fd)),p(0x2,_0x232c4f(_0x42539e)),p(0x3,_0x232c4f(_0x291ac5))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x16030e(0x130)],Q=(_0x1cbaa2,_0x39d4b3,_0x2659d2,_0x4b1351)=>{const _0x285813=_0x16030e;for(var _0x3d2101=_0x4b1351>0x1?void 0x0:_0x4b1351?k(_0x39d4b3,_0x2659d2):_0x39d4b3,_0x2abc04=_0x1cbaa2[_0x285813(0x15a)]-0x1,_0x3a7ece;_0x2abc04>=0x0;_0x2abc04--)(_0x3a7ece=_0x1cbaa2[_0x2abc04])&&(_0x3d2101=_0x3a7ece(_0x3d2101)||_0x3d2101);return _0x3d2101;},b=(_0x54d628,_0x39f988)=>(_0x3a8cc9,_0x105b52)=>_0x39f988(_0x3a8cc9,_0x105b52,_0x54d628);function X(_0x4a8b4e,_0x1b8b6c){const _0x166944=_0x16030e,_0x205cea=_0x4a8b4e[_0x166944(0x15d)][0x0];return{..._0x1b8b6c,'id':_0x205cea['replyId'],'resolved':_0x4a8b4e[_0x166944(0x172)]===0x1,'dT':y(_0x205cea[_0x166944(0x154)]),'personId':_0x205cea['userId'],'threadId':_0x205cea[_0x166944(0x160)]};}function ee(_0x5944be,_0x41049d,_0x279b53){const _0x2e6a62=_0x16030e;var _0x2d3b89,_0x55de9e;if(((_0x55de9e=(_0x2d3b89=_0x5944be==null?void 0x0:_0x5944be[_0x2e6a62(0x15d)])==null?void 0x0:_0x2d3b89['length'])!=null?_0x55de9e:0x0)>0x0){const _0x3ebed1=(_0x1fc046,_0x205c33)=>({'id':_0x1fc046[_0x2e6a62(0x175)],'threadId':_0x1fc046[_0x2e6a62(0x160)],'dT':y(_0x1fc046[_0x2e6a62(0x154)]),'personId':_0x1fc046[_0x2e6a62(0x16c)],'resolved':_0x5944be[_0x2e6a62(0x172)]===I[_0x2e6a62(0x14d)],'unitId':_0x41049d,'subUnitId':_0x279b53,'text':JSON[_0x2e6a62(0x133)](_0x1fc046['content']),'parentId':_0x205c33}),_0x1970ce=_0x3ebed1(_0x5944be[_0x2e6a62(0x15d)][0x0]);return{..._0x1970ce,'children':_0x5944be[_0x2e6a62(0x15d)][_0x2e6a62(0x157)](0x1)['map'](_0xd684d9=>_0x3ebed1(_0xd684d9,_0x1970ce['id']))};}return null;}let S=class{constructor(_0x466874,_0x2f23b8,_0x83f2d0){const _0x1c7807=_0x16030e;this['_httpService']=_0x466874,this[_0x1c7807(0x185)]=_0x2f23b8,this[_0x1c7807(0x137)]=_0x83f2d0;}async[_0x16030e(0x18c)](_0x5aa5b4){const _0xc4f2e3=_0x16030e;var _0x581b45,_0x2930af;const {parentId:_0x8beb0c,unitId:_0x42cddc,text:_0x2cd8df,threadId:_0x342497}=_0x5aa5b4,_0x84a48f=(_0x2930af=(_0x581b45=_0x2cd8df[_0xc4f2e3(0x163)])==null?void 0x0:_0x581b45[_0xc4f2e3(0x188)](_0x1c8fc9=>_0x1c8fc9[_0xc4f2e3(0x14a)]===_0x3f0bbe[_0xc4f2e3(0x152)])[_0xc4f2e3(0x143)](_0x4ae62e=>_0x4ae62e[_0xc4f2e3(0x151)]))!=null?_0x2930af:[],_0x361378=JSON[_0xc4f2e3(0x162)](_0x2cd8df),_0x4cd559=(await this['_sessionService'][_0xc4f2e3(0x158)](_0x42cddc))[_0xc4f2e3(0x15e)]();if(_0x8beb0c){const _0x4888b4={'memberId':_0x4cd559,'unitId':_0x42cddc,'content':_0x361378,'mention':_0x84a48f,'threadId':_0x342497},_0x169cc2=(await this['_httpService']['post'](_0xc4f2e3(0x16b)+_0x42cddc+_0xc4f2e3(0x16a),{'body':_0x4888b4}))[_0xc4f2e3(0x13a)][_0xc4f2e3(0x153)];return{..._0x5aa5b4,'id':_0x169cc2[_0xc4f2e3(0x175)],'dT':_0x3452f2(+_0x169cc2['createTimestamp'])[_0xc4f2e3(0x14f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x169cc2['userId']};}else{const _0x240c86={'memberId':_0x4cd559,'unitId':_0x42cddc,'content':_0x361378,'mention':_0x84a48f},_0x517858=await this['_httpService'][_0xc4f2e3(0x15c)](_0xc4f2e3(0x16b)+_0x42cddc+_0xc4f2e3(0x17c),{'body':_0x240c86});return X(_0x517858[_0xc4f2e3(0x13a)]['comment'],_0x5aa5b4);}}async[_0x16030e(0x149)](_0x3ec974){const _0x3e9946=_0x16030e;var _0x136404,_0x29f46f;const {text:_0x5328b6,unitId:_0x1020df}=_0x3ec974,_0x4f98ac=(_0x29f46f=(_0x136404=_0x5328b6[_0x3e9946(0x163)])==null?void 0x0:_0x136404[_0x3e9946(0x188)](_0x45da1a=>_0x45da1a[_0x3e9946(0x14a)]===_0x3f0bbe[_0x3e9946(0x152)])[_0x3e9946(0x143)](_0x30a16e=>_0x30a16e[_0x3e9946(0x151)]))!=null?_0x29f46f:[],_0x1be7f9=JSON['stringify'](_0x5328b6),_0x409195=_0x3ec974[_0x3e9946(0x160)],_0x1d77f9=_0x3ec974['id'],_0x5d93e5={'memberId':(await this[_0x3e9946(0x137)][_0x3e9946(0x158)](_0x1020df))['getMemberID'](),'unitId':_0x1020df,'threadId':_0x409195,'mention':_0x4f98ac,'content':_0x1be7f9,'replyId':_0x1d77f9},_0x534ca5=await this[_0x3e9946(0x18a)][_0x3e9946(0x15c)](_0x3e9946(0x16b)+_0x1020df+'/edit',{'body':_0x5d93e5});return!_0x534ca5[_0x3e9946(0x13a)]['error']||_0x534ca5[_0x3e9946(0x13a)][_0x3e9946(0x12f)][_0x3e9946(0x17d)]===0x1;}async[_0x16030e(0x173)](_0x30c38f){const _0x1f349e=_0x16030e,{unitId:_0x5df38a}=_0x30c38f,_0x34d904=_0x30c38f[_0x1f349e(0x160)],_0x5d1d1d={'memberId':this['_userService'][_0x1f349e(0x187)]()[_0x1f349e(0x134)],'unitId':_0x5df38a,'threadId':_0x34d904,'solved':_0x30c38f[_0x1f349e(0x167)]?I[_0x1f349e(0x14d)]:I[_0x1f349e(0x184)]},_0xd8d62a=await this[_0x1f349e(0x18a)][_0x1f349e(0x15c)](_0x1f349e(0x16b)+_0x5df38a+_0x1f349e(0x147),{'body':_0x5d1d1d});return!_0xd8d62a['body'][_0x1f349e(0x12f)]||_0xd8d62a[_0x1f349e(0x13a)]['error'][_0x1f349e(0x17d)]===0x1;}async[_0x16030e(0x16f)](_0x233cbd,_0x1431f7,_0x2c4771,_0x4a6fb9){const _0x5f3859=_0x16030e,_0x146e76={'memberId':(await this[_0x5f3859(0x137)][_0x5f3859(0x158)](_0x233cbd))['getMemberID'](),'threadId':_0x2c4771,'replyId':_0x4a6fb9,'unitId':_0x233cbd},_0x5d9d95=await this[_0x5f3859(0x18a)][_0x5f3859(0x15c)]('/universer-api/comment/unit/'+_0x233cbd+_0x5f3859(0x174),{'body':_0x146e76});return!_0x5d9d95['body'][_0x5f3859(0x12f)]||_0x5d9d95['body'][_0x5f3859(0x12f)][_0x5f3859(0x17d)]===0x1;}async[_0x16030e(0x171)](_0x5d3103,_0x3bf490,_0x4af051){const _0xce3e3=_0x16030e,_0x4cbed0={'unitId':_0x5d3103,'threadId':_0x4af051},_0x313228=await this[_0xce3e3(0x18a)]['post'](_0xce3e3(0x16b)+_0x5d3103+_0xce3e3(0x145),{'body':_0x4cbed0}),_0x348243=_0x4af051[_0xce3e3(0x143)](_0x50c725=>ee(_0x313228[_0xce3e3(0x13a)]['comments'][_0x50c725],_0x5d3103,_0x3bf490))[_0xce3e3(0x188)](Boolean);return Object[_0xce3e3(0x182)](_0x313228[_0xce3e3(0x13a)][_0xce3e3(0x181)])[_0xce3e3(0x132)](_0x28339c=>{const _0x49ead5=_0xce3e3;this['_userService'][_0x49ead5(0x13d)](_0x28339c);}),_0x348243;}[_0x16030e(0x131)](_0x1eb535){const _0x27d827=_0x16030e;return{'id':_0x1eb535['id'],'threadId':_0x1eb535[_0x27d827(0x160)],'ref':_0x1eb535['ref']};}};S=Q([b(0x0,_0x232c4f(_0x349971)),b(0x1,_0x232c4f(_0x42539e)),b(0x2,_0x232c4f(_0x5409b3))],S);var re=Object[_0x16030e(0x130)],te=(_0x340d62,_0x4bf1e3,_0x194a5f,_0x323b25)=>{const _0x15bccb=_0x16030e;for(var _0x4be9d4=_0x323b25>0x1?void 0x0:_0x323b25?re(_0x4bf1e3,_0x194a5f):_0x4bf1e3,_0x5cde31=_0x340d62[_0x15bccb(0x15a)]-0x1,_0x532d70;_0x5cde31>=0x0;_0x5cde31--)(_0x532d70=_0x340d62[_0x5cde31])&&(_0x4be9d4=_0x532d70(_0x4be9d4)||_0x4be9d4);return _0x4be9d4;},M=(_0x527b20,_0x3999e6)=>(_0x2f7ae4,_0x3033d2)=>_0x3999e6(_0x2f7ae4,_0x3033d2,_0x527b20);let f=class extends _0x420710{constructor(_0x430d79,_0x3e9341){const _0x1c92bb=_0x16030e;super(),this[_0x1c92bb(0x155)]=_0x430d79,this[_0x1c92bb(0x139)]=_0x3e9341,this[_0x1c92bb(0x18b)]();}[_0x16030e(0x18b)](){const _0x1130fa=_0x16030e;this['_threadCommentDataSourceService']['dataSource']=this[_0x1130fa(0x139)],this[_0x1130fa(0x155)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x25fc8b),M(0x1,_0x232c4f(S))],f);var se=Object[_0x16030e(0x136)],oe=Object[_0x16030e(0x130)],ne=(_0x1e8655,_0xe483cf,_0x2a287a)=>_0xe483cf in _0x1e8655?se(_0x1e8655,_0xe483cf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2a287a}):_0x1e8655[_0xe483cf]=_0x2a287a,ie=(_0x368850,_0xcfcd19,_0x1a0bc3,_0x2961ac)=>{const _0x2278df=_0x16030e;for(var _0x4b8124=_0x2961ac>0x1?void 0x0:_0x2961ac?oe(_0xcfcd19,_0x1a0bc3):_0xcfcd19,_0x5b97dc=_0x368850[_0x2278df(0x15a)]-0x1,_0x46b769;_0x5b97dc>=0x0;_0x5b97dc--)(_0x46b769=_0x368850[_0x5b97dc])&&(_0x4b8124=_0x46b769(_0x4b8124)||_0x4b8124);return _0x4b8124;},N=(_0x36fac0,_0x48cb5a)=>(_0x30f48e,_0x41ee2f)=>_0x48cb5a(_0x30f48e,_0x41ee2f,_0x36fac0),$=(_0x44ddce,_0x5c2be8,_0x16c6a1)=>ne(_0x44ddce,typeof _0x5c2be8!=_0x16030e(0x17a)?_0x5c2be8+'':_0x5c2be8,_0x16c6a1);let g=class extends _0x1d2449{constructor(_0x5cbb9e=O,_0x239262,_0x20f637){const _0x3fb519=_0x16030e;super(),this[_0x3fb519(0x18d)]=_0x5cbb9e,this[_0x3fb519(0x144)]=_0x239262,this[_0x3fb519(0x178)]=_0x20f637;const {..._0x3e49c3}=_0x3b1644({},O,this[_0x3fb519(0x18d)]);this[_0x3fb519(0x178)][_0x3fb519(0x190)](z,_0x3e49c3);}['onStarting'](){const _0x5311fc=_0x16030e;[[S],[f],[_]][_0x5311fc(0x132)](_0x25b6ba=>{const _0x11db2d=_0x5311fc;this[_0x11db2d(0x144)][_0x11db2d(0x141)](_0x25b6ba);});}[_0x16030e(0x16d)](){const _0x6492c6=_0x16030e;this['_injector']['get'](f),this['_injector'][_0x6492c6(0x168)](_);}};function _0x4fd3(_0x4e73ca,_0x46251d){_0x4e73ca=_0x4e73ca-0x12f;const _0x473706=_0x4737();let _0x4fd327=_0x473706[_0x4e73ca];return _0x4fd327;}$(g,'pluginName',W),$(g,'type',_0x2c1c94[_0x16030e(0x189)]),g=ie([_0x3102ce(_0x9ebaf1,_0x32afc7,_0x15cb9c),N(0x1,_0x232c4f(_0x291ac5)),N(0x2,_0x1b3c83)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x396b67=_0x4b39;(function(_0x59d89e,_0x1415fe){const _0xc04aeb=_0x4b39,_0xb5b599=_0x59d89e();while(!![]){try{const _0x1f55ed=parseInt(_0xc04aeb(0x1c3))/0x1+-parseInt(_0xc04aeb(0x1a5))/0x2+-parseInt(_0xc04aeb(0x18b))/0x3*(parseInt(_0xc04aeb(0x1b6))/0x4)+-parseInt(_0xc04aeb(0x1ce))/0x5*(parseInt(_0xc04aeb(0x18d))/0x6)+parseInt(_0xc04aeb(0x1d2))/0x7+parseInt(_0xc04aeb(0x1d0))/0x8*(parseInt(_0xc04aeb(0x180))/0x9)+-parseInt(_0xc04aeb(0x1cb))/0xa*(-parseInt(_0xc04aeb(0x1c7))/0xb);if(_0x1f55ed===_0x1415fe)break;else _0xb5b599['push'](_0xb5b599['shift']());}catch(_0x547bda){_0xb5b599['push'](_0xb5b599['shift']());}}}(_0x1002,0x5d6e5));import{CommentService as _0x35a289,CollaborationSessionService as _0x2097ff,UniverCollaborationClientPlugin as _0x518739}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4e6017}from'@univerjs-pro/license';import{dayjs as _0x5be7bd,UserManagerService as _0x4ce912,Inject as _0x5d1d4d,Injector as _0x2ac6f7,Disposable as _0x13c308,CustomRangeType as _0x58edf4,DependentOn as _0x5b0ef6,Plugin as _0x10350b,merge as _0x2c69d3,IConfigService as _0xbc1f2f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x53655e}from'@univerjs/thread-comment-ui';function _0x4b39(_0x18051f,_0x3eef62){_0x18051f=_0x18051f-0x171;const _0x1002f2=_0x1002();let _0x4b390e=_0x1002f2[_0x18051f];return _0x4b390e;}import{ThreadCommentModel as _0xbd22f,IThreadCommentDataSourceService as _0x429993}from'@univerjs/thread-comment';import{bufferTime as _0x54f019}from'rxjs';import{HTTPService as _0x870ad7}from'@univerjs/network';function _0x1002(){const _0x38f0d9=['size','getComment','795664JeGjMA','getMemberID','/list','payload','_configService','comments','length','threadId','parse','onReady','/add','resolveComment','_initUserSync','UNRECOGNIZED','Solve','YYYY/MM/DD\x20HH:mm','code','8nfOTtA','user','thread-comment-data-source.config','resolved','error','getUnit','requireSession','personId','userId','Solved','/delete','content','_httpService','69001MQuZWM','_userService','add','_config','11796829ccZpKg','_threadCommentDataSource','filter','addUser','10ELOltq','rangeId','saveCommentToSnapshot','5ZnReJe','_initDataSource','7800DcPAHg','Add','4123091pJwiok','find','Delete','replies','subscribe','packageName','_threadCommentDataSourceService','delete','/universer-api/comment/unit/','setConfig','parentId','Reply','_commentService','updateComment','solved','format','getOwnPropertyDescriptor','defineProperty','Edit','forEach','values','1755kObkuW','rangeType','onStarting','commentUpdate$','customRanges','_sessionService','deleteComment','slice','ref','name','post','1086207NNTQgt','version','2495490OTxuEn','userID','body','@univerjs-pro/thread-comment-datasource','dataSource','createTimestamp','_injector','_threadCommentModel','replyId','unitId','disposeWithMe','map','addComment','stringify','comment','get','root','Unknown','type','users','OpenOrReOpen','symbol'];_0x1002=function(){return _0x38f0d9;};return _0x1002();}const k=_0x396b67(0x190),B='0.16.1-insiders.20260311-074e8ca',j={'name':k,'version':B},W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var p=(_0x1bc38e=>(_0x1bc38e[_0x1bc38e[_0x396b67(0x1a1)]=0x0]=_0x396b67(0x1a1),_0x1bc38e[_0x1bc38e[_0x396b67(0x1bf)]=0x1]='Solved',_0x1bc38e[_0x1bc38e[_0x396b67(0x1b2)]=-0x1]='UNRECOGNIZED',_0x1bc38e))(p||{}),v=(_0x2170c8=>(_0x2170c8[_0x2170c8[_0x396b67(0x19e)]=0x0]=_0x396b67(0x19e),_0x2170c8[_0x2170c8['Add']=0x1]=_0x396b67(0x1d1),_0x2170c8[_0x2170c8[_0x396b67(0x176)]=0x2]='Reply',_0x2170c8[_0x2170c8['Edit']=0x3]=_0x396b67(0x17d),_0x2170c8[_0x2170c8['Delete']=0x4]=_0x396b67(0x1d4),_0x2170c8[_0x2170c8[_0x396b67(0x1b3)]=0x5]='Solve',_0x2170c8[_0x2170c8[_0x396b67(0x1b2)]=-0x1]=_0x396b67(0x1b2),_0x2170c8))(v||{});const D=_0x1e6bcf=>_0x5be7bd(new Date(+_0x1e6bcf))[_0x396b67(0x17a)](_0x396b67(0x1b4)),z=async(_0x2f073d,_0x695b9f)=>{const _0x3e8a67=_0x396b67,_0x4f2e51=_0x2f073d[_0x3e8a67(0x19c)](_0x4ce912),_0x1aa252=_0x2f073d['get'](_0x870ad7);_0x695b9f[_0x3e8a67(0x17e)](_0x32d6de=>{const _0x1dfef4=_0x3e8a67;_0x4f2e51['getUser'](_0x32d6de)&&_0x695b9f[_0x1dfef4(0x172)](_0x32d6de);}),_0x695b9f[_0x3e8a67(0x1a3)]&&(await _0x1aa252[_0x3e8a67(0x19c)]('/universer-api/user/list',{'params':{'userIDs':[..._0x695b9f]}}))[_0x3e8a67(0x18f)]['users'][_0x3e8a67(0x17e)](_0x572f05=>{_0x572f05&&_0x4f2e51['addUser'](_0x572f05);});};var K=Object[_0x396b67(0x17b)],V=(_0x2b9428,_0xdb687f,_0x1dc8d2,_0x8edc28)=>{const _0x2b2ff2=_0x396b67;for(var _0x550759=_0x8edc28>0x1?void 0x0:_0x8edc28?K(_0xdb687f,_0x1dc8d2):_0xdb687f,_0x58cdb6=_0x2b9428[_0x2b2ff2(0x1ab)]-0x1,_0x41fc10;_0x58cdb6>=0x0;_0x58cdb6--)(_0x41fc10=_0x2b9428[_0x58cdb6])&&(_0x550759=_0x41fc10(_0x550759)||_0x550759);return _0x550759;},_=(_0x40ca2b,_0x1c1860)=>(_0x12cbc0,_0x982399)=>_0x1c1860(_0x12cbc0,_0x982399,_0x40ca2b);let S=class extends _0x13c308{constructor(_0x38ce6d,_0x7e226e,_0x537f30,_0x1b9da7){const _0x3230a6=_0x396b67;super(),this[_0x3230a6(0x177)]=_0x38ce6d,this['_threadCommentModel']=_0x7e226e,this[_0x3230a6(0x1c4)]=_0x537f30,this[_0x3230a6(0x193)]=_0x1b9da7,this['_init'](),this[_0x3230a6(0x1b1)]();}[_0x396b67(0x1b1)](){const _0x108582=_0x396b67;this['disposeWithMe'](this['_threadCommentModel'][_0x108582(0x183)]['pipe'](_0x54f019(0x10))[_0x108582(0x1d6)](_0x2a6c18=>{const _0xdc1934=_0x108582,_0x4ccf67=new Set();_0x2a6c18[_0xdc1934(0x17e)](_0x3b54c4=>{const _0x5ce8ad=_0xdc1934;if(_0x3b54c4['type']===_0x5ce8ad(0x1c5)){const _0x4732d5=_0x3b54c4[_0x5ce8ad(0x1a8)][_0x5ce8ad(0x1bd)];_0x4ccf67[_0x5ce8ad(0x1c5)](_0x4732d5);}}),z(this['_injector'],_0x4ccf67);}));}['_init'](){const _0x23b86b=_0x396b67;this[_0x23b86b(0x197)](this[_0x23b86b(0x177)]['commentUpdate$'][_0x23b86b(0x1d6)](async _0x59c95d=>{const _0x162075=_0x23b86b;var _0x631431,_0x288ceb,_0x439b12,_0x416ddf;const _0x12dffa=(_0x631431=this[_0x162075(0x194)]['getUnit'](_0x59c95d['unitId'])['find'](_0x5dd60c=>_0x5dd60c[_0x162075(0x1ac)]===_0x59c95d[_0x162075(0x1ac)]))==null?void 0x0:_0x631431[_0x162075(0x19d)];if(!_0x12dffa)return;const {unitId:_0x87cb8f,subUnitId:_0x51b90f}=_0x12dffa;switch(_0x59c95d[_0x162075(0x1b7)]&&this[_0x162075(0x1c4)][_0x162075(0x1ca)](_0x59c95d[_0x162075(0x1b7)]),_0x59c95d[_0x162075(0x19f)]){case v['Add']:break;case v[_0x162075(0x176)]:{this['_threadCommentModel'][_0x162075(0x199)](_0x87cb8f,_0x51b90f,{'unitId':_0x87cb8f,'subUnitId':_0x51b90f,'ref':'','id':_0x59c95d[_0x162075(0x195)],'dT':D(+_0x59c95d[_0x162075(0x192)]),'threadId':_0x59c95d['threadId'],'personId':(_0x439b12=(_0x288ceb=_0x59c95d[_0x162075(0x1b7)])==null?void 0x0:_0x288ceb['userID'])!=null?_0x439b12:_0x59c95d[_0x162075(0x1be)],'text':JSON[_0x162075(0x1ad)](_0x59c95d[_0x162075(0x1c1)]),'parentId':_0x12dffa['id']});break;}case v[_0x162075(0x1d4)]:{const _0x2a2500=this[_0x162075(0x194)][_0x162075(0x1a4)](_0x87cb8f,_0x51b90f,_0x59c95d[_0x162075(0x195)]);_0x2a2500&&_0x2a2500[_0x162075(0x175)]&&this['_threadCommentModel']['deleteComment'](_0x87cb8f,_0x51b90f,_0x59c95d[_0x162075(0x195)]);break;}case v['Edit']:{this[_0x162075(0x194)]['updateComment'](_0x87cb8f,_0x51b90f,{'commentId':_0x59c95d[_0x162075(0x195)],'text':JSON['parse'](_0x59c95d['content'])});break;}case v[_0x162075(0x1b3)]:{const _0xc6fdb0=(_0x416ddf=this['_threadCommentModel'][_0x162075(0x1bb)](_0x59c95d[_0x162075(0x196)])[_0x162075(0x1d3)](_0x5e5880=>_0x5e5880[_0x162075(0x1ac)]===_0x59c95d[_0x162075(0x1ac)]))==null?void 0x0:_0x416ddf[_0x162075(0x19d)];_0xc6fdb0&&this['_threadCommentModel']['resolveComment'](_0x87cb8f,_0x51b90f,_0xc6fdb0['id'],_0x59c95d[_0x162075(0x179)]===p[_0x162075(0x1bf)]);break;}}}));}};S=V([_(0x0,_0x5d1d4d(_0x35a289)),_(0x1,_0x5d1d4d(_0xbd22f)),_(0x2,_0x5d1d4d(_0x4ce912)),_(0x3,_0x5d1d4d(_0x2ac6f7))],S);const Q=_0x396b67(0x1b8),M={};var X=Object[_0x396b67(0x17b)],ee=(_0x2ef48c,_0x2ee6b5,_0x262b35,_0x14c093)=>{const _0x2ba543=_0x396b67;for(var _0x2cb38d=_0x14c093>0x1?void 0x0:_0x14c093?X(_0x2ee6b5,_0x262b35):_0x2ee6b5,_0xc50fe8=_0x2ef48c[_0x2ba543(0x1ab)]-0x1,_0x2de43b;_0xc50fe8>=0x0;_0xc50fe8--)(_0x2de43b=_0x2ef48c[_0xc50fe8])&&(_0x2cb38d=_0x2de43b(_0x2cb38d)||_0x2cb38d);return _0x2cb38d;},b=(_0x3c30a8,_0x1f2d6c)=>(_0xf59bdf,_0x3adc16)=>_0x1f2d6c(_0xf59bdf,_0x3adc16,_0x3c30a8);function re(_0x45b01c,_0x4fcb36){const _0x1109a4=_0x396b67,_0x97bfd3=_0x45b01c['replies'][0x0];return{..._0x4fcb36,'id':_0x97bfd3[_0x1109a4(0x195)],'resolved':_0x45b01c[_0x1109a4(0x179)]===0x1,'dT':D(_0x97bfd3[_0x1109a4(0x192)]),'personId':_0x97bfd3[_0x1109a4(0x1be)],'threadId':_0x97bfd3['threadId']};}function te(_0x57c35e,_0x227dd6,_0x385151){const _0x29d55f=_0x396b67;var _0x10916d,_0x4342ec;if(((_0x4342ec=(_0x10916d=_0x57c35e==null?void 0x0:_0x57c35e['replies'])==null?void 0x0:_0x10916d[_0x29d55f(0x1ab)])!=null?_0x4342ec:0x0)>0x0){const _0x4c8cff=(_0xfe5254,_0x58bbca)=>({'id':_0xfe5254[_0x29d55f(0x195)],'threadId':_0xfe5254[_0x29d55f(0x1ac)],'dT':D(_0xfe5254['createTimestamp']),'personId':_0xfe5254[_0x29d55f(0x1be)],'resolved':_0x57c35e['solved']===p['Solved'],'unitId':_0x227dd6,'subUnitId':_0x385151,'text':JSON[_0x29d55f(0x1ad)](_0xfe5254['content']),'parentId':_0x58bbca}),_0xf0485d=_0x4c8cff(_0x57c35e[_0x29d55f(0x1d5)][0x0]);return{..._0xf0485d,'children':_0x57c35e[_0x29d55f(0x1d5)][_0x29d55f(0x187)](0x1)[_0x29d55f(0x198)](_0x44dd05=>_0x4c8cff(_0x44dd05,_0xf0485d['id']))};}return null;}let f=class{constructor(_0x59a65c,_0x776780,_0x15725c){const _0x4d21ac=_0x396b67;this['_httpService']=_0x59a65c,this[_0x4d21ac(0x1c4)]=_0x776780,this[_0x4d21ac(0x185)]=_0x15725c;}async['addComment'](_0x27fd81){const _0x29ebf8=_0x396b67;var _0x10026a,_0x3c1b23;const {parentId:_0x15320d,unitId:_0x3ffb94,text:_0x3adc70,threadId:_0x53b577}=_0x27fd81,_0x135331=(_0x3c1b23=(_0x10026a=_0x3adc70[_0x29ebf8(0x184)])==null?void 0x0:_0x10026a[_0x29ebf8(0x1c9)](_0x76aada=>_0x76aada[_0x29ebf8(0x181)]===_0x58edf4['COMMENT'])['map'](_0x3270cc=>_0x3270cc[_0x29ebf8(0x1cc)]))!=null?_0x3c1b23:[],_0x315467=JSON[_0x29ebf8(0x19a)](_0x3adc70),_0x43366b=(await this[_0x29ebf8(0x185)][_0x29ebf8(0x1bc)](_0x3ffb94))[_0x29ebf8(0x1a6)]();if(_0x15320d){const _0x620108={'memberId':_0x43366b,'unitId':_0x3ffb94,'content':_0x315467,'mention':_0x135331,'threadId':_0x53b577},_0x31d0c0=(await this[_0x29ebf8(0x1c2)][_0x29ebf8(0x18a)](_0x29ebf8(0x173)+_0x3ffb94+'/reply',{'body':_0x620108}))[_0x29ebf8(0x18f)]['reply'];return{..._0x27fd81,'id':_0x31d0c0[_0x29ebf8(0x195)],'dT':_0x5be7bd(+_0x31d0c0[_0x29ebf8(0x192)])[_0x29ebf8(0x17a)](_0x29ebf8(0x1b4)),'personId':_0x31d0c0[_0x29ebf8(0x1be)]};}else{const _0x54542f={'memberId':_0x43366b,'unitId':_0x3ffb94,'content':_0x315467,'mention':_0x135331},_0x395624=await this[_0x29ebf8(0x1c2)]['post'](_0x29ebf8(0x173)+_0x3ffb94+_0x29ebf8(0x1af),{'body':_0x54542f});return re(_0x395624['body'][_0x29ebf8(0x19b)],_0x27fd81);}}async[_0x396b67(0x178)](_0x1878d5){const _0xb13d07=_0x396b67;var _0x4e3755,_0x332826;const {text:_0x1f6d34,unitId:_0x24794e}=_0x1878d5,_0x2afa02=(_0x332826=(_0x4e3755=_0x1f6d34[_0xb13d07(0x184)])==null?void 0x0:_0x4e3755[_0xb13d07(0x1c9)](_0x51dccc=>_0x51dccc['rangeType']===_0x58edf4['COMMENT'])['map'](_0x459773=>_0x459773[_0xb13d07(0x1cc)]))!=null?_0x332826:[],_0x5994d6=JSON[_0xb13d07(0x19a)](_0x1f6d34),_0x5461d2=_0x1878d5[_0xb13d07(0x1ac)],_0x43c3c3=_0x1878d5['id'],_0x556dd3={'memberId':(await this[_0xb13d07(0x185)][_0xb13d07(0x1bc)](_0x24794e))['getMemberID'](),'unitId':_0x24794e,'threadId':_0x5461d2,'mention':_0x2afa02,'content':_0x5994d6,'replyId':_0x43c3c3},_0x4f84f3=await this['_httpService'][_0xb13d07(0x18a)]('/universer-api/comment/unit/'+_0x24794e+'/edit',{'body':_0x556dd3});return!_0x4f84f3[_0xb13d07(0x18f)]['error']||_0x4f84f3[_0xb13d07(0x18f)]['error']['code']===0x1;}async[_0x396b67(0x1b0)](_0x7c19de){const _0xb04aaf=_0x396b67,{unitId:_0x19893e}=_0x7c19de,_0x14ad42=_0x7c19de[_0xb04aaf(0x1ac)],_0x42baeb={'memberId':this[_0xb04aaf(0x1c4)]['getCurrentUser']()[_0xb04aaf(0x18e)],'unitId':_0x19893e,'threadId':_0x14ad42,'solved':_0x7c19de[_0xb04aaf(0x1b9)]?p[_0xb04aaf(0x1bf)]:p['OpenOrReOpen']},_0x311b54=await this['_httpService'][_0xb04aaf(0x18a)](_0xb04aaf(0x173)+_0x19893e+'/solved',{'body':_0x42baeb});return!_0x311b54[_0xb04aaf(0x18f)][_0xb04aaf(0x1ba)]||_0x311b54[_0xb04aaf(0x18f)][_0xb04aaf(0x1ba)][_0xb04aaf(0x1b5)]===0x1;}async[_0x396b67(0x186)](_0x74be41,_0x3365dc,_0x512728,_0x1fcccc){const _0x421f18=_0x396b67,_0x5e82e3={'memberId':(await this['_sessionService'][_0x421f18(0x1bc)](_0x74be41))['getMemberID'](),'threadId':_0x512728,'replyId':_0x1fcccc,'unitId':_0x74be41},_0x335f79=await this[_0x421f18(0x1c2)][_0x421f18(0x18a)](_0x421f18(0x173)+_0x74be41+_0x421f18(0x1c0),{'body':_0x5e82e3});return!_0x335f79[_0x421f18(0x18f)][_0x421f18(0x1ba)]||_0x335f79[_0x421f18(0x18f)][_0x421f18(0x1ba)][_0x421f18(0x1b5)]===0x1;}async['listComments'](_0x3d86de,_0x1ddb0c,_0x163921){const _0x1ee7ed=_0x396b67,_0x404309={'unitId':_0x3d86de,'threadId':_0x163921},_0x5ae7de=await this[_0x1ee7ed(0x1c2)][_0x1ee7ed(0x18a)](_0x1ee7ed(0x173)+_0x3d86de+_0x1ee7ed(0x1a7),{'body':_0x404309}),_0x1056ea=_0x163921[_0x1ee7ed(0x198)](_0x5c1225=>te(_0x5ae7de[_0x1ee7ed(0x18f)][_0x1ee7ed(0x1aa)][_0x5c1225],_0x3d86de,_0x1ddb0c))[_0x1ee7ed(0x1c9)](Boolean);return Object[_0x1ee7ed(0x17f)](_0x5ae7de[_0x1ee7ed(0x18f)][_0x1ee7ed(0x1a0)])[_0x1ee7ed(0x17e)](_0x170275=>{const _0x34ac09=_0x1ee7ed;this[_0x34ac09(0x1c4)][_0x34ac09(0x1ca)](_0x170275);}),_0x1056ea;}[_0x396b67(0x1cd)](_0x4c13f3){const _0x117963=_0x396b67;return{'id':_0x4c13f3['id'],'threadId':_0x4c13f3[_0x117963(0x1ac)],'ref':_0x4c13f3[_0x117963(0x188)]};}};f=ee([b(0x0,_0x5d1d4d(_0x870ad7)),b(0x1,_0x5d1d4d(_0x4ce912)),b(0x2,_0x5d1d4d(_0x2097ff))],f);var se=Object['getOwnPropertyDescriptor'],oe=(_0x502745,_0x1fdd25,_0x430c3b,_0x459caf)=>{const _0x21c1b7=_0x396b67;for(var _0x17e168=_0x459caf>0x1?void 0x0:_0x459caf?se(_0x1fdd25,_0x430c3b):_0x1fdd25,_0x36c48a=_0x502745[_0x21c1b7(0x1ab)]-0x1,_0x341db3;_0x36c48a>=0x0;_0x36c48a--)(_0x341db3=_0x502745[_0x36c48a])&&(_0x17e168=_0x341db3(_0x17e168)||_0x17e168);return _0x17e168;},N=(_0x43bfcb,_0x12d89e)=>(_0x42930d,_0x508a06)=>_0x12d89e(_0x42930d,_0x508a06,_0x43bfcb);let g=class extends _0x13c308{constructor(_0x50111f,_0xb68f72){const _0x379eee=_0x396b67;super(),this[_0x379eee(0x171)]=_0x50111f,this[_0x379eee(0x1c8)]=_0xb68f72,this['_initDataSource']();}[_0x396b67(0x1cf)](){const _0xf5dc36=_0x396b67;this[_0xf5dc36(0x171)][_0xf5dc36(0x191)]=this[_0xf5dc36(0x1c8)],this[_0xf5dc36(0x171)]['syncUpdateMutationToColla']=!0x1;}};g=oe([N(0x0,_0x429993),N(0x1,_0x5d1d4d(f))],g);var ne=Object[_0x396b67(0x17c)],ie=Object['getOwnPropertyDescriptor'],ae=(_0x5690b2,_0xda6e30,_0x2970f4)=>_0xda6e30 in _0x5690b2?ne(_0x5690b2,_0xda6e30,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2970f4}):_0x5690b2[_0xda6e30]=_0x2970f4,ce=(_0xb7b678,_0x4d72f9,_0x5829c2,_0x30eace)=>{const _0x5cce9a=_0x396b67;for(var _0x13a04b=_0x30eace>0x1?void 0x0:_0x30eace?ie(_0x4d72f9,_0x5829c2):_0x4d72f9,_0x8473ca=_0xb7b678[_0x5cce9a(0x1ab)]-0x1,_0x4e26cd;_0x8473ca>=0x0;_0x8473ca--)(_0x4e26cd=_0xb7b678[_0x8473ca])&&(_0x13a04b=_0x4e26cd(_0x13a04b)||_0x13a04b);return _0x13a04b;},w=(_0x493bbe,_0x4f7ee6)=>(_0xa5262d,_0x5e3161)=>_0x4f7ee6(_0xa5262d,_0x5e3161,_0x493bbe),y=(_0x29d956,_0x25bef2,_0x13099f)=>ae(_0x29d956,typeof _0x25bef2!=_0x396b67(0x1a2)?_0x25bef2+'':_0x25bef2,_0x13099f);let I=class extends _0x10350b{constructor(_0x1e8431=M,_0x59ce00,_0x51741c){const _0x1c4cef=_0x396b67;super(),this[_0x1c4cef(0x1c6)]=_0x1e8431,this[_0x1c4cef(0x193)]=_0x59ce00,this[_0x1c4cef(0x1a9)]=_0x51741c;const {..._0x57a438}=_0x2c69d3({},M,this[_0x1c4cef(0x1c6)]);this[_0x1c4cef(0x1a9)][_0x1c4cef(0x174)](Q,_0x57a438);}[_0x396b67(0x182)](){const _0x64ea8=_0x396b67;[[f],[g],[S]][_0x64ea8(0x17e)](_0x49477e=>{const _0x4d0223=_0x64ea8;this[_0x4d0223(0x193)][_0x4d0223(0x1c5)](_0x49477e);});}[_0x396b67(0x1ae)](){const _0xc16d90=_0x396b67;this[_0xc16d90(0x193)]['get'](g),this[_0xc16d90(0x193)]['get'](S);}};y(I,'pluginName',W),y(I,_0x396b67(0x1d7),j[_0x396b67(0x189)]),y(I,_0x396b67(0x18c),j['version']),I=ce([_0x5b0ef6(_0x53655e,_0x518739,_0x4e6017),w(0x1,_0x5d1d4d(_0x2ac6f7)),w(0x2,_0xbc1f2f)],I);export{I as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x16030e=_0x4fd3;(function(_0x570c,_0x4d7997){const _0x3d990a=_0x4fd3,_0x4e4308=_0x570c();while(!![]){try{const _0x103bbb=-parseInt(_0x3d990a(0x140))/0x1+-parseInt(_0x3d990a(0x186))/0x2+parseInt(_0x3d990a(0x18f))/0x3+-parseInt(_0x3d990a(0x17e))/0x4*(parseInt(_0x3d990a(0x179))/0x5)+-parseInt(_0x3d990a(0x146))/0x6+parseInt(_0x3d990a(0x135))/0x7*(parseInt(_0x3d990a(0x13c))/0x8)+parseInt(_0x3d990a(0x183))/0x9;if(_0x103bbb===_0x4d7997)break;else _0x4e4308['push'](_0x4e4308['shift']());}catch(_0x5004f4){_0x4e4308['push'](_0x4e4308['shift']());}}}(_0x4737,0x7f1cb));import{CommentService as _0x461905,CollaborationSessionService as _0x5409b3,UniverCollaborationClientPlugin as _0x32afc7}from'@univerjs-pro/collaboration-client';function _0x4737(){const _0x41a910=['/universer-api/comment/unit/','userId','onReady','Reply','deleteComment','getUnit','listComments','solved','resolveComment','/delete','replyId','commentUpdate$','personId','_configService','10JbznCh','symbol','find','/add','code','468612jUVmvX','_initUserSync','/universer-api/user/list','users','values','13170312CDXJTA','OpenOrReOpen','_userService','792528OCOSPx','getCurrentUser','filter','UNIVER_UNKNOWN','_httpService','_initDataSource','addComment','_config','unitId','2040699MSjwGq','setConfig','delete','error','getOwnPropertyDescriptor','saveCommentToSnapshot','forEach','parse','userID','21iszxVW','defineProperty','_sessionService','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','body','Add','1120672iHLxwB','addUser','content','subscribe','786605UwPaVy','add','_init','map','_injector','/list','3756162wvvWEk','/solved','getUser','updateComment','rangeType','disposeWithMe','size','Solved','_threadCommentModel','format','UNRECOGNIZED','rangeId','COMMENT','reply','createTimestamp','_threadCommentDataSourceService','Delete','slice','requireSession','Edit','length','Unknown','post','replies','getMemberID','Solve','threadId','parentId','stringify','customRanges','user','root','getComment','resolved','get','_commentService','/reply'];_0x4737=function(){return _0x41a910;};return _0x4737();}import{UniverLicensePlugin as _0x15cb9c}from'@univerjs-pro/license';import{dayjs as _0x3452f2,UserManagerService as _0x42539e,Inject as _0x232c4f,Injector as _0x291ac5,Disposable as _0x420710,CustomRangeType as _0x3f0bbe,UniverInstanceType as _0x2c1c94,DependentOn as _0x3102ce,Plugin as _0x1d2449,merge as _0x3b1644,IConfigService as _0x1b3c83}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x9ebaf1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x7b32fd,IThreadCommentDataSourceService as _0x25fc8b}from'@univerjs/thread-comment';import{bufferTime as _0x1985d4}from'rxjs';import{HTTPService as _0x349971}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x527823=>(_0x527823[_0x527823[_0x16030e(0x184)]=0x0]=_0x16030e(0x184),_0x527823[_0x527823[_0x16030e(0x14d)]=0x1]=_0x16030e(0x14d),_0x527823[_0x527823['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x527823))(I||{}),v=(_0x363897=>(_0x363897[_0x363897[_0x16030e(0x15b)]=0x0]=_0x16030e(0x15b),_0x363897[_0x363897[_0x16030e(0x13b)]=0x1]=_0x16030e(0x13b),_0x363897[_0x363897[_0x16030e(0x16e)]=0x2]=_0x16030e(0x16e),_0x363897[_0x363897[_0x16030e(0x159)]=0x3]=_0x16030e(0x159),_0x363897[_0x363897[_0x16030e(0x156)]=0x4]=_0x16030e(0x156),_0x363897[_0x363897[_0x16030e(0x15f)]=0x5]=_0x16030e(0x15f),_0x363897[_0x363897[_0x16030e(0x150)]=-0x1]=_0x16030e(0x150),_0x363897))(v||{});const y=_0x4d52b0=>_0x3452f2(new Date(+_0x4d52b0))[_0x16030e(0x14f)](_0x16030e(0x138)),B=async(_0x723b93,_0x38ae3d)=>{const _0x45ab6b=_0x16030e,_0x4d6b91=_0x723b93[_0x45ab6b(0x168)](_0x42539e),_0x1eb950=_0x723b93[_0x45ab6b(0x168)](_0x349971);_0x38ae3d[_0x45ab6b(0x132)](_0x2bbfb3=>{const _0x325383=_0x45ab6b;_0x4d6b91[_0x325383(0x148)](_0x2bbfb3)&&_0x38ae3d[_0x325383(0x191)](_0x2bbfb3);}),_0x38ae3d[_0x45ab6b(0x14c)]&&(await _0x1eb950[_0x45ab6b(0x168)](_0x45ab6b(0x180),{'params':{'userIDs':[..._0x38ae3d]}}))[_0x45ab6b(0x13a)][_0x45ab6b(0x181)][_0x45ab6b(0x132)](_0x574b81=>{const _0x10a9c9=_0x45ab6b;_0x574b81&&_0x4d6b91[_0x10a9c9(0x13d)](_0x574b81);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x422c9a,_0x41893e,_0x40d3c0,_0x4ede76)=>{for(var _0x7d4ceb=_0x4ede76>0x1?void 0x0:_0x4ede76?K(_0x41893e,_0x40d3c0):_0x41893e,_0x1e7fd5=_0x422c9a['length']-0x1,_0x3024da;_0x1e7fd5>=0x0;_0x1e7fd5--)(_0x3024da=_0x422c9a[_0x1e7fd5])&&(_0x7d4ceb=_0x3024da(_0x7d4ceb)||_0x7d4ceb);return _0x7d4ceb;},p=(_0x1fea2f,_0x161859)=>(_0x360840,_0x4929e1)=>_0x161859(_0x360840,_0x4929e1,_0x1fea2f);let _=class extends _0x420710{constructor(_0x4e5406,_0x3e96ae,_0x41e4e7,_0x4d4c75){const _0x49d77a=_0x16030e;super(),this[_0x49d77a(0x169)]=_0x4e5406,this['_threadCommentModel']=_0x3e96ae,this[_0x49d77a(0x185)]=_0x41e4e7,this[_0x49d77a(0x144)]=_0x4d4c75,this[_0x49d77a(0x142)](),this[_0x49d77a(0x17f)]();}[_0x16030e(0x17f)](){const _0x49cf73=_0x16030e;this[_0x49cf73(0x14b)](this[_0x49cf73(0x14e)][_0x49cf73(0x176)]['pipe'](_0x1985d4(0x10))['subscribe'](_0x5ee4c0=>{const _0x107253=_0x49cf73,_0x5f0f7b=new Set();_0x5ee4c0[_0x107253(0x132)](_0x1dd8a2=>{const _0x3a1b87=_0x107253;if(_0x1dd8a2['type']===_0x3a1b87(0x141)){const _0x1bb66f=_0x1dd8a2['payload'][_0x3a1b87(0x177)];_0x5f0f7b[_0x3a1b87(0x141)](_0x1bb66f);}}),B(this[_0x107253(0x144)],_0x5f0f7b);}));}[_0x16030e(0x142)](){const _0x3fe3f4=_0x16030e;this[_0x3fe3f4(0x14b)](this['_commentService'][_0x3fe3f4(0x176)][_0x3fe3f4(0x13f)](async _0x3162a4=>{const _0x1c2bc1=_0x3fe3f4;var _0xa9cacb,_0x3a6163,_0x5a3b2e,_0x178f57;const _0x59d2ff=(_0xa9cacb=this[_0x1c2bc1(0x14e)][_0x1c2bc1(0x170)](_0x3162a4[_0x1c2bc1(0x18e)])[_0x1c2bc1(0x17b)](_0xb58524=>_0xb58524[_0x1c2bc1(0x160)]===_0x3162a4['threadId']))==null?void 0x0:_0xa9cacb['root'];if(!_0x59d2ff)return;const {unitId:_0xd798b3,subUnitId:_0x46e6cd}=_0x59d2ff;switch(_0x3162a4['user']&&this[_0x1c2bc1(0x185)][_0x1c2bc1(0x13d)](_0x3162a4[_0x1c2bc1(0x164)]),_0x3162a4['type']){case v[_0x1c2bc1(0x13b)]:break;case v[_0x1c2bc1(0x16e)]:{this['_threadCommentModel']['addComment'](_0xd798b3,_0x46e6cd,{'unitId':_0xd798b3,'subUnitId':_0x46e6cd,'ref':'','id':_0x3162a4['replyId'],'dT':y(+_0x3162a4['createTimestamp']),'threadId':_0x3162a4['threadId'],'personId':(_0x5a3b2e=(_0x3a6163=_0x3162a4['user'])==null?void 0x0:_0x3a6163[_0x1c2bc1(0x134)])!=null?_0x5a3b2e:_0x3162a4['userId'],'text':JSON[_0x1c2bc1(0x133)](_0x3162a4[_0x1c2bc1(0x13e)]),'parentId':_0x59d2ff['id']});break;}case v[_0x1c2bc1(0x156)]:{const _0x42a236=this[_0x1c2bc1(0x14e)][_0x1c2bc1(0x166)](_0xd798b3,_0x46e6cd,_0x3162a4[_0x1c2bc1(0x175)]);_0x42a236&&_0x42a236[_0x1c2bc1(0x161)]&&this['_threadCommentModel']['deleteComment'](_0xd798b3,_0x46e6cd,_0x3162a4[_0x1c2bc1(0x175)]);break;}case v['Edit']:{this[_0x1c2bc1(0x14e)]['updateComment'](_0xd798b3,_0x46e6cd,{'commentId':_0x3162a4[_0x1c2bc1(0x175)],'text':JSON[_0x1c2bc1(0x133)](_0x3162a4[_0x1c2bc1(0x13e)])});break;}case v[_0x1c2bc1(0x15f)]:{const _0x153a77=(_0x178f57=this[_0x1c2bc1(0x14e)][_0x1c2bc1(0x170)](_0x3162a4[_0x1c2bc1(0x18e)])[_0x1c2bc1(0x17b)](_0x147fc5=>_0x147fc5['threadId']===_0x3162a4['threadId']))==null?void 0x0:_0x178f57[_0x1c2bc1(0x165)];_0x153a77&&this[_0x1c2bc1(0x14e)]['resolveComment'](_0xd798b3,_0x46e6cd,_0x153a77['id'],_0x3162a4[_0x1c2bc1(0x172)]===I[_0x1c2bc1(0x14d)]);break;}}}));}};_=V([p(0x0,_0x232c4f(_0x461905)),p(0x1,_0x232c4f(_0x7b32fd)),p(0x2,_0x232c4f(_0x42539e)),p(0x3,_0x232c4f(_0x291ac5))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x16030e(0x130)],Q=(_0x1cbaa2,_0x39d4b3,_0x2659d2,_0x4b1351)=>{const _0x285813=_0x16030e;for(var _0x3d2101=_0x4b1351>0x1?void 0x0:_0x4b1351?k(_0x39d4b3,_0x2659d2):_0x39d4b3,_0x2abc04=_0x1cbaa2[_0x285813(0x15a)]-0x1,_0x3a7ece;_0x2abc04>=0x0;_0x2abc04--)(_0x3a7ece=_0x1cbaa2[_0x2abc04])&&(_0x3d2101=_0x3a7ece(_0x3d2101)||_0x3d2101);return _0x3d2101;},b=(_0x54d628,_0x39f988)=>(_0x3a8cc9,_0x105b52)=>_0x39f988(_0x3a8cc9,_0x105b52,_0x54d628);function X(_0x4a8b4e,_0x1b8b6c){const _0x166944=_0x16030e,_0x205cea=_0x4a8b4e[_0x166944(0x15d)][0x0];return{..._0x1b8b6c,'id':_0x205cea['replyId'],'resolved':_0x4a8b4e[_0x166944(0x172)]===0x1,'dT':y(_0x205cea[_0x166944(0x154)]),'personId':_0x205cea['userId'],'threadId':_0x205cea[_0x166944(0x160)]};}function ee(_0x5944be,_0x41049d,_0x279b53){const _0x2e6a62=_0x16030e;var _0x2d3b89,_0x55de9e;if(((_0x55de9e=(_0x2d3b89=_0x5944be==null?void 0x0:_0x5944be[_0x2e6a62(0x15d)])==null?void 0x0:_0x2d3b89['length'])!=null?_0x55de9e:0x0)>0x0){const _0x3ebed1=(_0x1fc046,_0x205c33)=>({'id':_0x1fc046[_0x2e6a62(0x175)],'threadId':_0x1fc046[_0x2e6a62(0x160)],'dT':y(_0x1fc046[_0x2e6a62(0x154)]),'personId':_0x1fc046[_0x2e6a62(0x16c)],'resolved':_0x5944be[_0x2e6a62(0x172)]===I[_0x2e6a62(0x14d)],'unitId':_0x41049d,'subUnitId':_0x279b53,'text':JSON[_0x2e6a62(0x133)](_0x1fc046['content']),'parentId':_0x205c33}),_0x1970ce=_0x3ebed1(_0x5944be[_0x2e6a62(0x15d)][0x0]);return{..._0x1970ce,'children':_0x5944be[_0x2e6a62(0x15d)][_0x2e6a62(0x157)](0x1)['map'](_0xd684d9=>_0x3ebed1(_0xd684d9,_0x1970ce['id']))};}return null;}let S=class{constructor(_0x466874,_0x2f23b8,_0x83f2d0){const _0x1c7807=_0x16030e;this['_httpService']=_0x466874,this[_0x1c7807(0x185)]=_0x2f23b8,this[_0x1c7807(0x137)]=_0x83f2d0;}async[_0x16030e(0x18c)](_0x5aa5b4){const _0xc4f2e3=_0x16030e;var _0x581b45,_0x2930af;const {parentId:_0x8beb0c,unitId:_0x42cddc,text:_0x2cd8df,threadId:_0x342497}=_0x5aa5b4,_0x84a48f=(_0x2930af=(_0x581b45=_0x2cd8df[_0xc4f2e3(0x163)])==null?void 0x0:_0x581b45[_0xc4f2e3(0x188)](_0x1c8fc9=>_0x1c8fc9[_0xc4f2e3(0x14a)]===_0x3f0bbe[_0xc4f2e3(0x152)])[_0xc4f2e3(0x143)](_0x4ae62e=>_0x4ae62e[_0xc4f2e3(0x151)]))!=null?_0x2930af:[],_0x361378=JSON[_0xc4f2e3(0x162)](_0x2cd8df),_0x4cd559=(await this['_sessionService'][_0xc4f2e3(0x158)](_0x42cddc))[_0xc4f2e3(0x15e)]();if(_0x8beb0c){const _0x4888b4={'memberId':_0x4cd559,'unitId':_0x42cddc,'content':_0x361378,'mention':_0x84a48f,'threadId':_0x342497},_0x169cc2=(await this['_httpService']['post'](_0xc4f2e3(0x16b)+_0x42cddc+_0xc4f2e3(0x16a),{'body':_0x4888b4}))[_0xc4f2e3(0x13a)][_0xc4f2e3(0x153)];return{..._0x5aa5b4,'id':_0x169cc2[_0xc4f2e3(0x175)],'dT':_0x3452f2(+_0x169cc2['createTimestamp'])[_0xc4f2e3(0x14f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x169cc2['userId']};}else{const _0x240c86={'memberId':_0x4cd559,'unitId':_0x42cddc,'content':_0x361378,'mention':_0x84a48f},_0x517858=await this['_httpService'][_0xc4f2e3(0x15c)](_0xc4f2e3(0x16b)+_0x42cddc+_0xc4f2e3(0x17c),{'body':_0x240c86});return X(_0x517858[_0xc4f2e3(0x13a)]['comment'],_0x5aa5b4);}}async[_0x16030e(0x149)](_0x3ec974){const _0x3e9946=_0x16030e;var _0x136404,_0x29f46f;const {text:_0x5328b6,unitId:_0x1020df}=_0x3ec974,_0x4f98ac=(_0x29f46f=(_0x136404=_0x5328b6[_0x3e9946(0x163)])==null?void 0x0:_0x136404[_0x3e9946(0x188)](_0x45da1a=>_0x45da1a[_0x3e9946(0x14a)]===_0x3f0bbe[_0x3e9946(0x152)])[_0x3e9946(0x143)](_0x30a16e=>_0x30a16e[_0x3e9946(0x151)]))!=null?_0x29f46f:[],_0x1be7f9=JSON['stringify'](_0x5328b6),_0x409195=_0x3ec974[_0x3e9946(0x160)],_0x1d77f9=_0x3ec974['id'],_0x5d93e5={'memberId':(await this[_0x3e9946(0x137)][_0x3e9946(0x158)](_0x1020df))['getMemberID'](),'unitId':_0x1020df,'threadId':_0x409195,'mention':_0x4f98ac,'content':_0x1be7f9,'replyId':_0x1d77f9},_0x534ca5=await this[_0x3e9946(0x18a)][_0x3e9946(0x15c)](_0x3e9946(0x16b)+_0x1020df+'/edit',{'body':_0x5d93e5});return!_0x534ca5[_0x3e9946(0x13a)]['error']||_0x534ca5[_0x3e9946(0x13a)][_0x3e9946(0x12f)][_0x3e9946(0x17d)]===0x1;}async[_0x16030e(0x173)](_0x30c38f){const _0x1f349e=_0x16030e,{unitId:_0x5df38a}=_0x30c38f,_0x34d904=_0x30c38f[_0x1f349e(0x160)],_0x5d1d1d={'memberId':this['_userService'][_0x1f349e(0x187)]()[_0x1f349e(0x134)],'unitId':_0x5df38a,'threadId':_0x34d904,'solved':_0x30c38f[_0x1f349e(0x167)]?I[_0x1f349e(0x14d)]:I[_0x1f349e(0x184)]},_0xd8d62a=await this[_0x1f349e(0x18a)][_0x1f349e(0x15c)](_0x1f349e(0x16b)+_0x5df38a+_0x1f349e(0x147),{'body':_0x5d1d1d});return!_0xd8d62a['body'][_0x1f349e(0x12f)]||_0xd8d62a[_0x1f349e(0x13a)]['error'][_0x1f349e(0x17d)]===0x1;}async[_0x16030e(0x16f)](_0x233cbd,_0x1431f7,_0x2c4771,_0x4a6fb9){const _0x5f3859=_0x16030e,_0x146e76={'memberId':(await this[_0x5f3859(0x137)][_0x5f3859(0x158)](_0x233cbd))['getMemberID'](),'threadId':_0x2c4771,'replyId':_0x4a6fb9,'unitId':_0x233cbd},_0x5d9d95=await this[_0x5f3859(0x18a)][_0x5f3859(0x15c)]('/universer-api/comment/unit/'+_0x233cbd+_0x5f3859(0x174),{'body':_0x146e76});return!_0x5d9d95['body'][_0x5f3859(0x12f)]||_0x5d9d95['body'][_0x5f3859(0x12f)][_0x5f3859(0x17d)]===0x1;}async[_0x16030e(0x171)](_0x5d3103,_0x3bf490,_0x4af051){const _0xce3e3=_0x16030e,_0x4cbed0={'unitId':_0x5d3103,'threadId':_0x4af051},_0x313228=await this[_0xce3e3(0x18a)]['post'](_0xce3e3(0x16b)+_0x5d3103+_0xce3e3(0x145),{'body':_0x4cbed0}),_0x348243=_0x4af051[_0xce3e3(0x143)](_0x50c725=>ee(_0x313228[_0xce3e3(0x13a)]['comments'][_0x50c725],_0x5d3103,_0x3bf490))[_0xce3e3(0x188)](Boolean);return Object[_0xce3e3(0x182)](_0x313228[_0xce3e3(0x13a)][_0xce3e3(0x181)])[_0xce3e3(0x132)](_0x28339c=>{const _0x49ead5=_0xce3e3;this['_userService'][_0x49ead5(0x13d)](_0x28339c);}),_0x348243;}[_0x16030e(0x131)](_0x1eb535){const _0x27d827=_0x16030e;return{'id':_0x1eb535['id'],'threadId':_0x1eb535[_0x27d827(0x160)],'ref':_0x1eb535['ref']};}};S=Q([b(0x0,_0x232c4f(_0x349971)),b(0x1,_0x232c4f(_0x42539e)),b(0x2,_0x232c4f(_0x5409b3))],S);var re=Object[_0x16030e(0x130)],te=(_0x340d62,_0x4bf1e3,_0x194a5f,_0x323b25)=>{const _0x15bccb=_0x16030e;for(var _0x4be9d4=_0x323b25>0x1?void 0x0:_0x323b25?re(_0x4bf1e3,_0x194a5f):_0x4bf1e3,_0x5cde31=_0x340d62[_0x15bccb(0x15a)]-0x1,_0x532d70;_0x5cde31>=0x0;_0x5cde31--)(_0x532d70=_0x340d62[_0x5cde31])&&(_0x4be9d4=_0x532d70(_0x4be9d4)||_0x4be9d4);return _0x4be9d4;},M=(_0x527b20,_0x3999e6)=>(_0x2f7ae4,_0x3033d2)=>_0x3999e6(_0x2f7ae4,_0x3033d2,_0x527b20);let f=class extends _0x420710{constructor(_0x430d79,_0x3e9341){const _0x1c92bb=_0x16030e;super(),this[_0x1c92bb(0x155)]=_0x430d79,this[_0x1c92bb(0x139)]=_0x3e9341,this[_0x1c92bb(0x18b)]();}[_0x16030e(0x18b)](){const _0x1130fa=_0x16030e;this['_threadCommentDataSourceService']['dataSource']=this[_0x1130fa(0x139)],this[_0x1130fa(0x155)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x25fc8b),M(0x1,_0x232c4f(S))],f);var se=Object[_0x16030e(0x136)],oe=Object[_0x16030e(0x130)],ne=(_0x1e8655,_0xe483cf,_0x2a287a)=>_0xe483cf in _0x1e8655?se(_0x1e8655,_0xe483cf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2a287a}):_0x1e8655[_0xe483cf]=_0x2a287a,ie=(_0x368850,_0xcfcd19,_0x1a0bc3,_0x2961ac)=>{const _0x2278df=_0x16030e;for(var _0x4b8124=_0x2961ac>0x1?void 0x0:_0x2961ac?oe(_0xcfcd19,_0x1a0bc3):_0xcfcd19,_0x5b97dc=_0x368850[_0x2278df(0x15a)]-0x1,_0x46b769;_0x5b97dc>=0x0;_0x5b97dc--)(_0x46b769=_0x368850[_0x5b97dc])&&(_0x4b8124=_0x46b769(_0x4b8124)||_0x4b8124);return _0x4b8124;},N=(_0x36fac0,_0x48cb5a)=>(_0x30f48e,_0x41ee2f)=>_0x48cb5a(_0x30f48e,_0x41ee2f,_0x36fac0),$=(_0x44ddce,_0x5c2be8,_0x16c6a1)=>ne(_0x44ddce,typeof _0x5c2be8!=_0x16030e(0x17a)?_0x5c2be8+'':_0x5c2be8,_0x16c6a1);let g=class extends _0x1d2449{constructor(_0x5cbb9e=O,_0x239262,_0x20f637){const _0x3fb519=_0x16030e;super(),this[_0x3fb519(0x18d)]=_0x5cbb9e,this[_0x3fb519(0x144)]=_0x239262,this[_0x3fb519(0x178)]=_0x20f637;const {..._0x3e49c3}=_0x3b1644({},O,this[_0x3fb519(0x18d)]);this[_0x3fb519(0x178)][_0x3fb519(0x190)](z,_0x3e49c3);}['onStarting'](){const _0x5311fc=_0x16030e;[[S],[f],[_]][_0x5311fc(0x132)](_0x25b6ba=>{const _0x11db2d=_0x5311fc;this[_0x11db2d(0x144)][_0x11db2d(0x141)](_0x25b6ba);});}[_0x16030e(0x16d)](){const _0x6492c6=_0x16030e;this['_injector']['get'](f),this['_injector'][_0x6492c6(0x168)](_);}};function _0x4fd3(_0x4e73ca,_0x46251d){_0x4e73ca=_0x4e73ca-0x12f;const _0x473706=_0x4737();let _0x4fd327=_0x473706[_0x4e73ca];return _0x4fd327;}$(g,'pluginName',W),$(g,'type',_0x2c1c94[_0x16030e(0x189)]),g=ie([_0x3102ce(_0x9ebaf1,_0x32afc7,_0x15cb9c),N(0x1,_0x232c4f(_0x291ac5)),N(0x2,_0x1b3c83)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x396b67=_0x4b39;(function(_0x59d89e,_0x1415fe){const _0xc04aeb=_0x4b39,_0xb5b599=_0x59d89e();while(!![]){try{const _0x1f55ed=parseInt(_0xc04aeb(0x1c3))/0x1+-parseInt(_0xc04aeb(0x1a5))/0x2+-parseInt(_0xc04aeb(0x18b))/0x3*(parseInt(_0xc04aeb(0x1b6))/0x4)+-parseInt(_0xc04aeb(0x1ce))/0x5*(parseInt(_0xc04aeb(0x18d))/0x6)+parseInt(_0xc04aeb(0x1d2))/0x7+parseInt(_0xc04aeb(0x1d0))/0x8*(parseInt(_0xc04aeb(0x180))/0x9)+-parseInt(_0xc04aeb(0x1cb))/0xa*(-parseInt(_0xc04aeb(0x1c7))/0xb);if(_0x1f55ed===_0x1415fe)break;else _0xb5b599['push'](_0xb5b599['shift']());}catch(_0x547bda){_0xb5b599['push'](_0xb5b599['shift']());}}}(_0x1002,0x5d6e5));import{CommentService as _0x35a289,CollaborationSessionService as _0x2097ff,UniverCollaborationClientPlugin as _0x518739}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4e6017}from'@univerjs-pro/license';import{dayjs as _0x5be7bd,UserManagerService as _0x4ce912,Inject as _0x5d1d4d,Injector as _0x2ac6f7,Disposable as _0x13c308,CustomRangeType as _0x58edf4,DependentOn as _0x5b0ef6,Plugin as _0x10350b,merge as _0x2c69d3,IConfigService as _0xbc1f2f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x53655e}from'@univerjs/thread-comment-ui';function _0x4b39(_0x18051f,_0x3eef62){_0x18051f=_0x18051f-0x171;const _0x1002f2=_0x1002();let _0x4b390e=_0x1002f2[_0x18051f];return _0x4b390e;}import{ThreadCommentModel as _0xbd22f,IThreadCommentDataSourceService as _0x429993}from'@univerjs/thread-comment';import{bufferTime as _0x54f019}from'rxjs';import{HTTPService as _0x870ad7}from'@univerjs/network';function _0x1002(){const _0x38f0d9=['size','getComment','795664JeGjMA','getMemberID','/list','payload','_configService','comments','length','threadId','parse','onReady','/add','resolveComment','_initUserSync','UNRECOGNIZED','Solve','YYYY/MM/DD\x20HH:mm','code','8nfOTtA','user','thread-comment-data-source.config','resolved','error','getUnit','requireSession','personId','userId','Solved','/delete','content','_httpService','69001MQuZWM','_userService','add','_config','11796829ccZpKg','_threadCommentDataSource','filter','addUser','10ELOltq','rangeId','saveCommentToSnapshot','5ZnReJe','_initDataSource','7800DcPAHg','Add','4123091pJwiok','find','Delete','replies','subscribe','packageName','_threadCommentDataSourceService','delete','/universer-api/comment/unit/','setConfig','parentId','Reply','_commentService','updateComment','solved','format','getOwnPropertyDescriptor','defineProperty','Edit','forEach','values','1755kObkuW','rangeType','onStarting','commentUpdate$','customRanges','_sessionService','deleteComment','slice','ref','name','post','1086207NNTQgt','version','2495490OTxuEn','userID','body','@univerjs-pro/thread-comment-datasource','dataSource','createTimestamp','_injector','_threadCommentModel','replyId','unitId','disposeWithMe','map','addComment','stringify','comment','get','root','Unknown','type','users','OpenOrReOpen','symbol'];_0x1002=function(){return _0x38f0d9;};return _0x1002();}const k=_0x396b67(0x190),B='0.16.1-insiders.20260311-074e8ca',j={'name':k,'version':B},W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var p=(_0x1bc38e=>(_0x1bc38e[_0x1bc38e[_0x396b67(0x1a1)]=0x0]=_0x396b67(0x1a1),_0x1bc38e[_0x1bc38e[_0x396b67(0x1bf)]=0x1]='Solved',_0x1bc38e[_0x1bc38e[_0x396b67(0x1b2)]=-0x1]='UNRECOGNIZED',_0x1bc38e))(p||{}),v=(_0x2170c8=>(_0x2170c8[_0x2170c8[_0x396b67(0x19e)]=0x0]=_0x396b67(0x19e),_0x2170c8[_0x2170c8['Add']=0x1]=_0x396b67(0x1d1),_0x2170c8[_0x2170c8[_0x396b67(0x176)]=0x2]='Reply',_0x2170c8[_0x2170c8['Edit']=0x3]=_0x396b67(0x17d),_0x2170c8[_0x2170c8['Delete']=0x4]=_0x396b67(0x1d4),_0x2170c8[_0x2170c8[_0x396b67(0x1b3)]=0x5]='Solve',_0x2170c8[_0x2170c8[_0x396b67(0x1b2)]=-0x1]=_0x396b67(0x1b2),_0x2170c8))(v||{});const D=_0x1e6bcf=>_0x5be7bd(new Date(+_0x1e6bcf))[_0x396b67(0x17a)](_0x396b67(0x1b4)),z=async(_0x2f073d,_0x695b9f)=>{const _0x3e8a67=_0x396b67,_0x4f2e51=_0x2f073d[_0x3e8a67(0x19c)](_0x4ce912),_0x1aa252=_0x2f073d['get'](_0x870ad7);_0x695b9f[_0x3e8a67(0x17e)](_0x32d6de=>{const _0x1dfef4=_0x3e8a67;_0x4f2e51['getUser'](_0x32d6de)&&_0x695b9f[_0x1dfef4(0x172)](_0x32d6de);}),_0x695b9f[_0x3e8a67(0x1a3)]&&(await _0x1aa252[_0x3e8a67(0x19c)]('/universer-api/user/list',{'params':{'userIDs':[..._0x695b9f]}}))[_0x3e8a67(0x18f)]['users'][_0x3e8a67(0x17e)](_0x572f05=>{_0x572f05&&_0x4f2e51['addUser'](_0x572f05);});};var K=Object[_0x396b67(0x17b)],V=(_0x2b9428,_0xdb687f,_0x1dc8d2,_0x8edc28)=>{const _0x2b2ff2=_0x396b67;for(var _0x550759=_0x8edc28>0x1?void 0x0:_0x8edc28?K(_0xdb687f,_0x1dc8d2):_0xdb687f,_0x58cdb6=_0x2b9428[_0x2b2ff2(0x1ab)]-0x1,_0x41fc10;_0x58cdb6>=0x0;_0x58cdb6--)(_0x41fc10=_0x2b9428[_0x58cdb6])&&(_0x550759=_0x41fc10(_0x550759)||_0x550759);return _0x550759;},_=(_0x40ca2b,_0x1c1860)=>(_0x12cbc0,_0x982399)=>_0x1c1860(_0x12cbc0,_0x982399,_0x40ca2b);let S=class extends _0x13c308{constructor(_0x38ce6d,_0x7e226e,_0x537f30,_0x1b9da7){const _0x3230a6=_0x396b67;super(),this[_0x3230a6(0x177)]=_0x38ce6d,this['_threadCommentModel']=_0x7e226e,this[_0x3230a6(0x1c4)]=_0x537f30,this[_0x3230a6(0x193)]=_0x1b9da7,this['_init'](),this[_0x3230a6(0x1b1)]();}[_0x396b67(0x1b1)](){const _0x108582=_0x396b67;this['disposeWithMe'](this['_threadCommentModel'][_0x108582(0x183)]['pipe'](_0x54f019(0x10))[_0x108582(0x1d6)](_0x2a6c18=>{const _0xdc1934=_0x108582,_0x4ccf67=new Set();_0x2a6c18[_0xdc1934(0x17e)](_0x3b54c4=>{const _0x5ce8ad=_0xdc1934;if(_0x3b54c4['type']===_0x5ce8ad(0x1c5)){const _0x4732d5=_0x3b54c4[_0x5ce8ad(0x1a8)][_0x5ce8ad(0x1bd)];_0x4ccf67[_0x5ce8ad(0x1c5)](_0x4732d5);}}),z(this['_injector'],_0x4ccf67);}));}['_init'](){const _0x23b86b=_0x396b67;this[_0x23b86b(0x197)](this[_0x23b86b(0x177)]['commentUpdate$'][_0x23b86b(0x1d6)](async _0x59c95d=>{const _0x162075=_0x23b86b;var _0x631431,_0x288ceb,_0x439b12,_0x416ddf;const _0x12dffa=(_0x631431=this[_0x162075(0x194)]['getUnit'](_0x59c95d['unitId'])['find'](_0x5dd60c=>_0x5dd60c[_0x162075(0x1ac)]===_0x59c95d[_0x162075(0x1ac)]))==null?void 0x0:_0x631431[_0x162075(0x19d)];if(!_0x12dffa)return;const {unitId:_0x87cb8f,subUnitId:_0x51b90f}=_0x12dffa;switch(_0x59c95d[_0x162075(0x1b7)]&&this[_0x162075(0x1c4)][_0x162075(0x1ca)](_0x59c95d[_0x162075(0x1b7)]),_0x59c95d[_0x162075(0x19f)]){case v['Add']:break;case v[_0x162075(0x176)]:{this['_threadCommentModel'][_0x162075(0x199)](_0x87cb8f,_0x51b90f,{'unitId':_0x87cb8f,'subUnitId':_0x51b90f,'ref':'','id':_0x59c95d[_0x162075(0x195)],'dT':D(+_0x59c95d[_0x162075(0x192)]),'threadId':_0x59c95d['threadId'],'personId':(_0x439b12=(_0x288ceb=_0x59c95d[_0x162075(0x1b7)])==null?void 0x0:_0x288ceb['userID'])!=null?_0x439b12:_0x59c95d[_0x162075(0x1be)],'text':JSON[_0x162075(0x1ad)](_0x59c95d[_0x162075(0x1c1)]),'parentId':_0x12dffa['id']});break;}case v[_0x162075(0x1d4)]:{const _0x2a2500=this[_0x162075(0x194)][_0x162075(0x1a4)](_0x87cb8f,_0x51b90f,_0x59c95d[_0x162075(0x195)]);_0x2a2500&&_0x2a2500[_0x162075(0x175)]&&this['_threadCommentModel']['deleteComment'](_0x87cb8f,_0x51b90f,_0x59c95d[_0x162075(0x195)]);break;}case v['Edit']:{this[_0x162075(0x194)]['updateComment'](_0x87cb8f,_0x51b90f,{'commentId':_0x59c95d[_0x162075(0x195)],'text':JSON['parse'](_0x59c95d['content'])});break;}case v[_0x162075(0x1b3)]:{const _0xc6fdb0=(_0x416ddf=this['_threadCommentModel'][_0x162075(0x1bb)](_0x59c95d[_0x162075(0x196)])[_0x162075(0x1d3)](_0x5e5880=>_0x5e5880[_0x162075(0x1ac)]===_0x59c95d[_0x162075(0x1ac)]))==null?void 0x0:_0x416ddf[_0x162075(0x19d)];_0xc6fdb0&&this['_threadCommentModel']['resolveComment'](_0x87cb8f,_0x51b90f,_0xc6fdb0['id'],_0x59c95d[_0x162075(0x179)]===p[_0x162075(0x1bf)]);break;}}}));}};S=V([_(0x0,_0x5d1d4d(_0x35a289)),_(0x1,_0x5d1d4d(_0xbd22f)),_(0x2,_0x5d1d4d(_0x4ce912)),_(0x3,_0x5d1d4d(_0x2ac6f7))],S);const Q=_0x396b67(0x1b8),M={};var X=Object[_0x396b67(0x17b)],ee=(_0x2ef48c,_0x2ee6b5,_0x262b35,_0x14c093)=>{const _0x2ba543=_0x396b67;for(var _0x2cb38d=_0x14c093>0x1?void 0x0:_0x14c093?X(_0x2ee6b5,_0x262b35):_0x2ee6b5,_0xc50fe8=_0x2ef48c[_0x2ba543(0x1ab)]-0x1,_0x2de43b;_0xc50fe8>=0x0;_0xc50fe8--)(_0x2de43b=_0x2ef48c[_0xc50fe8])&&(_0x2cb38d=_0x2de43b(_0x2cb38d)||_0x2cb38d);return _0x2cb38d;},b=(_0x3c30a8,_0x1f2d6c)=>(_0xf59bdf,_0x3adc16)=>_0x1f2d6c(_0xf59bdf,_0x3adc16,_0x3c30a8);function re(_0x45b01c,_0x4fcb36){const _0x1109a4=_0x396b67,_0x97bfd3=_0x45b01c['replies'][0x0];return{..._0x4fcb36,'id':_0x97bfd3[_0x1109a4(0x195)],'resolved':_0x45b01c[_0x1109a4(0x179)]===0x1,'dT':D(_0x97bfd3[_0x1109a4(0x192)]),'personId':_0x97bfd3[_0x1109a4(0x1be)],'threadId':_0x97bfd3['threadId']};}function te(_0x57c35e,_0x227dd6,_0x385151){const _0x29d55f=_0x396b67;var _0x10916d,_0x4342ec;if(((_0x4342ec=(_0x10916d=_0x57c35e==null?void 0x0:_0x57c35e['replies'])==null?void 0x0:_0x10916d[_0x29d55f(0x1ab)])!=null?_0x4342ec:0x0)>0x0){const _0x4c8cff=(_0xfe5254,_0x58bbca)=>({'id':_0xfe5254[_0x29d55f(0x195)],'threadId':_0xfe5254[_0x29d55f(0x1ac)],'dT':D(_0xfe5254['createTimestamp']),'personId':_0xfe5254[_0x29d55f(0x1be)],'resolved':_0x57c35e['solved']===p['Solved'],'unitId':_0x227dd6,'subUnitId':_0x385151,'text':JSON[_0x29d55f(0x1ad)](_0xfe5254['content']),'parentId':_0x58bbca}),_0xf0485d=_0x4c8cff(_0x57c35e[_0x29d55f(0x1d5)][0x0]);return{..._0xf0485d,'children':_0x57c35e[_0x29d55f(0x1d5)][_0x29d55f(0x187)](0x1)[_0x29d55f(0x198)](_0x44dd05=>_0x4c8cff(_0x44dd05,_0xf0485d['id']))};}return null;}let f=class{constructor(_0x59a65c,_0x776780,_0x15725c){const _0x4d21ac=_0x396b67;this['_httpService']=_0x59a65c,this[_0x4d21ac(0x1c4)]=_0x776780,this[_0x4d21ac(0x185)]=_0x15725c;}async['addComment'](_0x27fd81){const _0x29ebf8=_0x396b67;var _0x10026a,_0x3c1b23;const {parentId:_0x15320d,unitId:_0x3ffb94,text:_0x3adc70,threadId:_0x53b577}=_0x27fd81,_0x135331=(_0x3c1b23=(_0x10026a=_0x3adc70[_0x29ebf8(0x184)])==null?void 0x0:_0x10026a[_0x29ebf8(0x1c9)](_0x76aada=>_0x76aada[_0x29ebf8(0x181)]===_0x58edf4['COMMENT'])['map'](_0x3270cc=>_0x3270cc[_0x29ebf8(0x1cc)]))!=null?_0x3c1b23:[],_0x315467=JSON[_0x29ebf8(0x19a)](_0x3adc70),_0x43366b=(await this[_0x29ebf8(0x185)][_0x29ebf8(0x1bc)](_0x3ffb94))[_0x29ebf8(0x1a6)]();if(_0x15320d){const _0x620108={'memberId':_0x43366b,'unitId':_0x3ffb94,'content':_0x315467,'mention':_0x135331,'threadId':_0x53b577},_0x31d0c0=(await this[_0x29ebf8(0x1c2)][_0x29ebf8(0x18a)](_0x29ebf8(0x173)+_0x3ffb94+'/reply',{'body':_0x620108}))[_0x29ebf8(0x18f)]['reply'];return{..._0x27fd81,'id':_0x31d0c0[_0x29ebf8(0x195)],'dT':_0x5be7bd(+_0x31d0c0[_0x29ebf8(0x192)])[_0x29ebf8(0x17a)](_0x29ebf8(0x1b4)),'personId':_0x31d0c0[_0x29ebf8(0x1be)]};}else{const _0x54542f={'memberId':_0x43366b,'unitId':_0x3ffb94,'content':_0x315467,'mention':_0x135331},_0x395624=await this[_0x29ebf8(0x1c2)]['post'](_0x29ebf8(0x173)+_0x3ffb94+_0x29ebf8(0x1af),{'body':_0x54542f});return re(_0x395624['body'][_0x29ebf8(0x19b)],_0x27fd81);}}async[_0x396b67(0x178)](_0x1878d5){const _0xb13d07=_0x396b67;var _0x4e3755,_0x332826;const {text:_0x1f6d34,unitId:_0x24794e}=_0x1878d5,_0x2afa02=(_0x332826=(_0x4e3755=_0x1f6d34[_0xb13d07(0x184)])==null?void 0x0:_0x4e3755[_0xb13d07(0x1c9)](_0x51dccc=>_0x51dccc['rangeType']===_0x58edf4['COMMENT'])['map'](_0x459773=>_0x459773[_0xb13d07(0x1cc)]))!=null?_0x332826:[],_0x5994d6=JSON[_0xb13d07(0x19a)](_0x1f6d34),_0x5461d2=_0x1878d5[_0xb13d07(0x1ac)],_0x43c3c3=_0x1878d5['id'],_0x556dd3={'memberId':(await this[_0xb13d07(0x185)][_0xb13d07(0x1bc)](_0x24794e))['getMemberID'](),'unitId':_0x24794e,'threadId':_0x5461d2,'mention':_0x2afa02,'content':_0x5994d6,'replyId':_0x43c3c3},_0x4f84f3=await this['_httpService'][_0xb13d07(0x18a)]('/universer-api/comment/unit/'+_0x24794e+'/edit',{'body':_0x556dd3});return!_0x4f84f3[_0xb13d07(0x18f)]['error']||_0x4f84f3[_0xb13d07(0x18f)]['error']['code']===0x1;}async[_0x396b67(0x1b0)](_0x7c19de){const _0xb04aaf=_0x396b67,{unitId:_0x19893e}=_0x7c19de,_0x14ad42=_0x7c19de[_0xb04aaf(0x1ac)],_0x42baeb={'memberId':this[_0xb04aaf(0x1c4)]['getCurrentUser']()[_0xb04aaf(0x18e)],'unitId':_0x19893e,'threadId':_0x14ad42,'solved':_0x7c19de[_0xb04aaf(0x1b9)]?p[_0xb04aaf(0x1bf)]:p['OpenOrReOpen']},_0x311b54=await this['_httpService'][_0xb04aaf(0x18a)](_0xb04aaf(0x173)+_0x19893e+'/solved',{'body':_0x42baeb});return!_0x311b54[_0xb04aaf(0x18f)][_0xb04aaf(0x1ba)]||_0x311b54[_0xb04aaf(0x18f)][_0xb04aaf(0x1ba)][_0xb04aaf(0x1b5)]===0x1;}async[_0x396b67(0x186)](_0x74be41,_0x3365dc,_0x512728,_0x1fcccc){const _0x421f18=_0x396b67,_0x5e82e3={'memberId':(await this['_sessionService'][_0x421f18(0x1bc)](_0x74be41))['getMemberID'](),'threadId':_0x512728,'replyId':_0x1fcccc,'unitId':_0x74be41},_0x335f79=await this[_0x421f18(0x1c2)][_0x421f18(0x18a)](_0x421f18(0x173)+_0x74be41+_0x421f18(0x1c0),{'body':_0x5e82e3});return!_0x335f79[_0x421f18(0x18f)][_0x421f18(0x1ba)]||_0x335f79[_0x421f18(0x18f)][_0x421f18(0x1ba)][_0x421f18(0x1b5)]===0x1;}async['listComments'](_0x3d86de,_0x1ddb0c,_0x163921){const _0x1ee7ed=_0x396b67,_0x404309={'unitId':_0x3d86de,'threadId':_0x163921},_0x5ae7de=await this[_0x1ee7ed(0x1c2)][_0x1ee7ed(0x18a)](_0x1ee7ed(0x173)+_0x3d86de+_0x1ee7ed(0x1a7),{'body':_0x404309}),_0x1056ea=_0x163921[_0x1ee7ed(0x198)](_0x5c1225=>te(_0x5ae7de[_0x1ee7ed(0x18f)][_0x1ee7ed(0x1aa)][_0x5c1225],_0x3d86de,_0x1ddb0c))[_0x1ee7ed(0x1c9)](Boolean);return Object[_0x1ee7ed(0x17f)](_0x5ae7de[_0x1ee7ed(0x18f)][_0x1ee7ed(0x1a0)])[_0x1ee7ed(0x17e)](_0x170275=>{const _0x34ac09=_0x1ee7ed;this[_0x34ac09(0x1c4)][_0x34ac09(0x1ca)](_0x170275);}),_0x1056ea;}[_0x396b67(0x1cd)](_0x4c13f3){const _0x117963=_0x396b67;return{'id':_0x4c13f3['id'],'threadId':_0x4c13f3[_0x117963(0x1ac)],'ref':_0x4c13f3[_0x117963(0x188)]};}};f=ee([b(0x0,_0x5d1d4d(_0x870ad7)),b(0x1,_0x5d1d4d(_0x4ce912)),b(0x2,_0x5d1d4d(_0x2097ff))],f);var se=Object['getOwnPropertyDescriptor'],oe=(_0x502745,_0x1fdd25,_0x430c3b,_0x459caf)=>{const _0x21c1b7=_0x396b67;for(var _0x17e168=_0x459caf>0x1?void 0x0:_0x459caf?se(_0x1fdd25,_0x430c3b):_0x1fdd25,_0x36c48a=_0x502745[_0x21c1b7(0x1ab)]-0x1,_0x341db3;_0x36c48a>=0x0;_0x36c48a--)(_0x341db3=_0x502745[_0x36c48a])&&(_0x17e168=_0x341db3(_0x17e168)||_0x17e168);return _0x17e168;},N=(_0x43bfcb,_0x12d89e)=>(_0x42930d,_0x508a06)=>_0x12d89e(_0x42930d,_0x508a06,_0x43bfcb);let g=class extends _0x13c308{constructor(_0x50111f,_0xb68f72){const _0x379eee=_0x396b67;super(),this[_0x379eee(0x171)]=_0x50111f,this[_0x379eee(0x1c8)]=_0xb68f72,this['_initDataSource']();}[_0x396b67(0x1cf)](){const _0xf5dc36=_0x396b67;this[_0xf5dc36(0x171)][_0xf5dc36(0x191)]=this[_0xf5dc36(0x1c8)],this[_0xf5dc36(0x171)]['syncUpdateMutationToColla']=!0x1;}};g=oe([N(0x0,_0x429993),N(0x1,_0x5d1d4d(f))],g);var ne=Object[_0x396b67(0x17c)],ie=Object['getOwnPropertyDescriptor'],ae=(_0x5690b2,_0xda6e30,_0x2970f4)=>_0xda6e30 in _0x5690b2?ne(_0x5690b2,_0xda6e30,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2970f4}):_0x5690b2[_0xda6e30]=_0x2970f4,ce=(_0xb7b678,_0x4d72f9,_0x5829c2,_0x30eace)=>{const _0x5cce9a=_0x396b67;for(var _0x13a04b=_0x30eace>0x1?void 0x0:_0x30eace?ie(_0x4d72f9,_0x5829c2):_0x4d72f9,_0x8473ca=_0xb7b678[_0x5cce9a(0x1ab)]-0x1,_0x4e26cd;_0x8473ca>=0x0;_0x8473ca--)(_0x4e26cd=_0xb7b678[_0x8473ca])&&(_0x13a04b=_0x4e26cd(_0x13a04b)||_0x13a04b);return _0x13a04b;},w=(_0x493bbe,_0x4f7ee6)=>(_0xa5262d,_0x5e3161)=>_0x4f7ee6(_0xa5262d,_0x5e3161,_0x493bbe),y=(_0x29d956,_0x25bef2,_0x13099f)=>ae(_0x29d956,typeof _0x25bef2!=_0x396b67(0x1a2)?_0x25bef2+'':_0x25bef2,_0x13099f);let I=class extends _0x10350b{constructor(_0x1e8431=M,_0x59ce00,_0x51741c){const _0x1c4cef=_0x396b67;super(),this[_0x1c4cef(0x1c6)]=_0x1e8431,this[_0x1c4cef(0x193)]=_0x59ce00,this[_0x1c4cef(0x1a9)]=_0x51741c;const {..._0x57a438}=_0x2c69d3({},M,this[_0x1c4cef(0x1c6)]);this[_0x1c4cef(0x1a9)][_0x1c4cef(0x174)](Q,_0x57a438);}[_0x396b67(0x182)](){const _0x64ea8=_0x396b67;[[f],[g],[S]][_0x64ea8(0x17e)](_0x49477e=>{const _0x4d0223=_0x64ea8;this[_0x4d0223(0x193)][_0x4d0223(0x1c5)](_0x49477e);});}[_0x396b67(0x1ae)](){const _0xc16d90=_0x396b67;this[_0xc16d90(0x193)]['get'](g),this[_0xc16d90(0x193)]['get'](S);}};y(I,'pluginName',W),y(I,_0x396b67(0x1d7),j[_0x396b67(0x189)]),y(I,_0x396b67(0x18c),j['version']),I=ce([_0x5b0ef6(_0x53655e,_0x518739,_0x4e6017),w(0x1,_0x5d1d4d(_0x2ac6f7)),w(0x2,_0xbc1f2f)],I);export{I as UniverThreadCommentDataSourcePlugin};
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { IUniverThreadCommentDataSourceConfig } from './controllers/config.schema';
|
|
2
|
-
import { IConfigService, Injector, Plugin
|
|
2
|
+
import { IConfigService, Injector, Plugin } from '@univerjs/core';
|
|
3
3
|
export declare class UniverThreadCommentDataSourcePlugin extends Plugin {
|
|
4
4
|
private readonly _config;
|
|
5
5
|
protected _injector: Injector;
|
|
6
6
|
private readonly _configService;
|
|
7
7
|
static pluginName: string;
|
|
8
|
-
static
|
|
8
|
+
static packageName: string;
|
|
9
|
+
static version: string;
|
|
9
10
|
constructor(_config: IUniverThreadCommentDataSourceConfig | undefined, _injector: Injector, _configService: IConfigService);
|
|
10
11
|
onStarting(): void;
|
|
11
12
|
onReady(): void;
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x57c604,_0x5974a2){const _0x569ed6=_0x5bc3,_0x905308=_0x57c604();while(!![]){try{const _0x2f3681=-parseInt(_0x569ed6(0x17a))/0x1*(-parseInt(_0x569ed6(0x164))/0x2)+parseInt(_0x569ed6(0x128))/0x3*(parseInt(_0x569ed6(0x138))/0x4)+parseInt(_0x569ed6(0x199))/0x5*(parseInt(_0x569ed6(0x163))/0x6)+-parseInt(_0x569ed6(0x140))/0x7+-parseInt(_0x569ed6(0x15a))/0x8*(parseInt(_0x569ed6(0x14c))/0x9)+-parseInt(_0x569ed6(0x134))/0xa*(parseInt(_0x569ed6(0x13c))/0xb)+parseInt(_0x569ed6(0x14f))/0xc;if(_0x2f3681===_0x5974a2)break;else _0x905308['push'](_0x905308['shift']());}catch(_0x51c0c6){_0x905308['push'](_0x905308['shift']());}}}(_0x2f9b,0xb47ca),function(_0x78cfc1,_0x40245f){const _0x3139cf=_0x5bc3;typeof exports==_0x3139cf(0x125)&&typeof module<'u'?_0x40245f(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x3139cf(0x156)&&define[_0x3139cf(0x166)]?define([_0x3139cf(0x191),_0x3139cf(0x180),_0x3139cf(0x17b),_0x3139cf(0x142),_0x3139cf(0x19f),_0x3139cf(0x167),'rxjs',_0x3139cf(0x19a)],_0x40245f):(_0x78cfc1=typeof globalThis<'u'?globalThis:_0x78cfc1||self,_0x40245f(_0x78cfc1[_0x3139cf(0x148)]={},_0x78cfc1[_0x3139cf(0x147)],_0x78cfc1[_0x3139cf(0x135)],_0x78cfc1[_0x3139cf(0x176)],_0x78cfc1[_0x3139cf(0x187)],_0x78cfc1[_0x3139cf(0x14b)],_0x78cfc1[_0x3139cf(0x196)],_0x78cfc1['UniverNetwork']));}(this,function(_0x5e78cf,_0x15f612,_0x44a182,_0x405bac,_0x4892e8,_0x311be5,_0x17adfc,_0x5ed600){'use strict';const _0x1c1955=_0x5bc3;const _0x2b1af4='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x3fbe65=(_0x4e7c48=>(_0x4e7c48[_0x4e7c48[_0x1c1955(0x136)]=0x0]='OpenOrReOpen',_0x4e7c48[_0x4e7c48[_0x1c1955(0x15e)]=0x1]=_0x1c1955(0x15e),_0x4e7c48[_0x4e7c48[_0x1c1955(0x12d)]=-0x1]=_0x1c1955(0x12d),_0x4e7c48))(_0x3fbe65||{}),_0x4fe209=(_0x483d38=>(_0x483d38[_0x483d38['Unknown']=0x0]=_0x1c1955(0x17c),_0x483d38[_0x483d38[_0x1c1955(0x1a0)]=0x1]='Add',_0x483d38[_0x483d38[_0x1c1955(0x139)]=0x2]=_0x1c1955(0x139),_0x483d38[_0x483d38[_0x1c1955(0x189)]=0x3]=_0x1c1955(0x189),_0x483d38[_0x483d38[_0x1c1955(0x159)]=0x4]=_0x1c1955(0x159),_0x483d38[_0x483d38[_0x1c1955(0x1a1)]=0x5]=_0x1c1955(0x1a1),_0x483d38[_0x483d38[_0x1c1955(0x12d)]=-0x1]='UNRECOGNIZED',_0x483d38))(_0x4fe209||{});const _0x29a87b=_0x50ecb0=>_0x405bac[_0x1c1955(0x13f)](new Date(+_0x50ecb0))[_0x1c1955(0x1a3)](_0x1c1955(0x146)),_0xd4cde=async(_0x51d27a,_0x49b6b7)=>{const _0x552cba=_0x1c1955,_0x5b6ead=_0x51d27a[_0x552cba(0x18d)](_0x405bac[_0x552cba(0x1a2)]),_0x5b9d0b=_0x51d27a[_0x552cba(0x18d)](_0x5ed600[_0x552cba(0x16c)]);_0x49b6b7[_0x552cba(0x195)](_0x466a15=>{const _0x5cc41e=_0x552cba;_0x5b6ead[_0x5cc41e(0x175)](_0x466a15)&&_0x49b6b7[_0x5cc41e(0x12e)](_0x466a15);}),_0x49b6b7[_0x552cba(0x130)]&&(await _0x5b9d0b['get'](_0x552cba(0x14e),{'params':{'userIDs':[..._0x49b6b7]}}))[_0x552cba(0x132)][_0x552cba(0x15d)][_0x552cba(0x195)](_0x962960=>{const _0x14c810=_0x552cba;_0x962960&&_0x5b6ead[_0x14c810(0x16e)](_0x962960);});};var _0xead491=Object[_0x1c1955(0x145)],_0xcc1f5c=(_0x41490f,_0x418189,_0x4bcf6a,_0x23d2a0)=>{const _0x2a19cf=_0x1c1955;for(var _0x3e076d=_0x23d2a0>0x1?void 0x0:_0x23d2a0?_0xead491(_0x418189,_0x4bcf6a):_0x418189,_0x1f76c4=_0x41490f[_0x2a19cf(0x162)]-0x1,_0x296812;_0x1f76c4>=0x0;_0x1f76c4--)(_0x296812=_0x41490f[_0x1f76c4])&&(_0x3e076d=_0x296812(_0x3e076d)||_0x3e076d);return _0x3e076d;},_0x1031a3=(_0x5686b6,_0xffe9f)=>(_0x41350d,_0x2cb93c)=>_0xffe9f(_0x41350d,_0x2cb93c,_0x5686b6);let _0x4b9ada=class extends _0x405bac[_0x1c1955(0x182)]{constructor(_0x5efc45,_0x43d8bb,_0x3bfc2b,_0x3affc0){const _0x1c68b9=_0x1c1955;super(),this[_0x1c68b9(0x18b)]=_0x5efc45,this[_0x1c68b9(0x15f)]=_0x43d8bb,this[_0x1c68b9(0x13d)]=_0x3bfc2b,this[_0x1c68b9(0x173)]=_0x3affc0,this['_init'](),this['_initUserSync']();}[_0x1c1955(0x16f)](){const _0xb3117f=_0x1c1955;this['disposeWithMe'](this[_0xb3117f(0x15f)][_0xb3117f(0x12f)][_0xb3117f(0x1aa)](_0x17adfc[_0xb3117f(0x13b)](0x10))[_0xb3117f(0x151)](_0xdc6c58=>{const _0x5f2293=_0xb3117f,_0x185135=new Set();_0xdc6c58[_0x5f2293(0x195)](_0x59d02f=>{const _0x1600e2=_0x5f2293;if(_0x59d02f[_0x1600e2(0x137)]===_0x1600e2(0x15b)){const _0x6161d8=_0x59d02f['payload'][_0x1600e2(0x12a)];_0x185135[_0x1600e2(0x15b)](_0x6161d8);}}),_0xd4cde(this[_0x5f2293(0x173)],_0x185135);}));}[_0x1c1955(0x158)](){const _0x3a60fc=_0x1c1955;this['disposeWithMe'](this[_0x3a60fc(0x18b)][_0x3a60fc(0x12f)][_0x3a60fc(0x151)](async _0xf6c6f2=>{const _0x172f11=_0x3a60fc;var _0x156b1d,_0x55782c,_0x4ff649,_0x3d96c7;const _0x34fb79=(_0x156b1d=this[_0x172f11(0x15f)][_0x172f11(0x178)](_0xf6c6f2[_0x172f11(0x14a)])[_0x172f11(0x194)](_0x5f3b83=>_0x5f3b83[_0x172f11(0x174)]===_0xf6c6f2[_0x172f11(0x174)]))==null?void 0x0:_0x156b1d[_0x172f11(0x160)];if(!_0x34fb79)return;const {unitId:_0x4268d7,subUnitId:_0x86be2b}=_0x34fb79;switch(_0xf6c6f2[_0x172f11(0x131)]&&this['_userService'][_0x172f11(0x16e)](_0xf6c6f2['user']),_0xf6c6f2['type']){case _0x4fe209[_0x172f11(0x1a0)]:break;case _0x4fe209[_0x172f11(0x139)]:{this['_threadCommentModel']['addComment'](_0x4268d7,_0x86be2b,{'unitId':_0x4268d7,'subUnitId':_0x86be2b,'ref':'','id':_0xf6c6f2[_0x172f11(0x169)],'dT':_0x29a87b(+_0xf6c6f2['createTimestamp']),'threadId':_0xf6c6f2['threadId'],'personId':(_0x4ff649=(_0x55782c=_0xf6c6f2['user'])==null?void 0x0:_0x55782c[_0x172f11(0x12c)])!=null?_0x4ff649:_0xf6c6f2[_0x172f11(0x14d)],'text':JSON[_0x172f11(0x1a7)](_0xf6c6f2[_0x172f11(0x127)]),'parentId':_0x34fb79['id']});break;}case _0x4fe209[_0x172f11(0x159)]:{const _0x544131=this[_0x172f11(0x15f)][_0x172f11(0x188)](_0x4268d7,_0x86be2b,_0xf6c6f2[_0x172f11(0x169)]);_0x544131&&_0x544131[_0x172f11(0x177)]&&this['_threadCommentModel'][_0x172f11(0x16a)](_0x4268d7,_0x86be2b,_0xf6c6f2[_0x172f11(0x169)]);break;}case _0x4fe209[_0x172f11(0x189)]:{this[_0x172f11(0x15f)][_0x172f11(0x1a4)](_0x4268d7,_0x86be2b,{'commentId':_0xf6c6f2['replyId'],'text':JSON[_0x172f11(0x1a7)](_0xf6c6f2[_0x172f11(0x127)])});break;}case _0x4fe209['Solve']:{const _0x9b43a1=(_0x3d96c7=this[_0x172f11(0x15f)][_0x172f11(0x178)](_0xf6c6f2[_0x172f11(0x14a)])[_0x172f11(0x194)](_0x1a5377=>_0x1a5377[_0x172f11(0x174)]===_0xf6c6f2[_0x172f11(0x174)]))==null?void 0x0:_0x3d96c7['root'];_0x9b43a1&&this[_0x172f11(0x15f)][_0x172f11(0x1ac)](_0x4268d7,_0x86be2b,_0x9b43a1['id'],_0xf6c6f2[_0x172f11(0x17d)]===_0x3fbe65[_0x172f11(0x15e)]);break;}}}));}};_0x4b9ada=_0xcc1f5c([_0x1031a3(0x0,_0x405bac[_0x1c1955(0x19e)](_0x15f612['CommentService'])),_0x1031a3(0x1,_0x405bac['Inject'](_0x311be5['ThreadCommentModel'])),_0x1031a3(0x2,_0x405bac[_0x1c1955(0x19e)](_0x405bac['UserManagerService'])),_0x1031a3(0x3,_0x405bac[_0x1c1955(0x19e)](_0x405bac['Injector']))],_0x4b9ada);const _0x140c61=_0x1c1955(0x161),_0x44e49b={};var _0x2e5034=Object[_0x1c1955(0x145)],_0x82a4b4=(_0x1c17b7,_0x2715b2,_0x28c86e,_0x23a8c5)=>{const _0x3482b3=_0x1c1955;for(var _0x38ae86=_0x23a8c5>0x1?void 0x0:_0x23a8c5?_0x2e5034(_0x2715b2,_0x28c86e):_0x2715b2,_0x502e6=_0x1c17b7[_0x3482b3(0x162)]-0x1,_0x359400;_0x502e6>=0x0;_0x502e6--)(_0x359400=_0x1c17b7[_0x502e6])&&(_0x38ae86=_0x359400(_0x38ae86)||_0x38ae86);return _0x38ae86;},_0x191a8b=(_0x2ca38f,_0x4cb0d6)=>(_0x1ab6cf,_0x4c947c)=>_0x4cb0d6(_0x1ab6cf,_0x4c947c,_0x2ca38f);function _0x3a216(_0x3af326,_0x5a0f01){const _0x3c40dc=_0x1c1955,_0x470704=_0x3af326['replies'][0x0];return{..._0x5a0f01,'id':_0x470704[_0x3c40dc(0x169)],'resolved':_0x3af326[_0x3c40dc(0x17d)]===0x1,'dT':_0x29a87b(_0x470704[_0x3c40dc(0x18c)]),'personId':_0x470704[_0x3c40dc(0x14d)],'threadId':_0x470704[_0x3c40dc(0x174)]};}function _0x5df92e(_0x1d1097,_0x1b6629,_0x444ba3){const _0x29aa50=_0x1c1955;var _0x47d5c1,_0x114c01;if(((_0x114c01=(_0x47d5c1=_0x1d1097==null?void 0x0:_0x1d1097[_0x29aa50(0x133)])==null?void 0x0:_0x47d5c1[_0x29aa50(0x162)])!=null?_0x114c01:0x0)>0x0){const _0x4ff323=(_0x424f8d,_0x37bad)=>({'id':_0x424f8d[_0x29aa50(0x169)],'threadId':_0x424f8d[_0x29aa50(0x174)],'dT':_0x29a87b(_0x424f8d[_0x29aa50(0x18c)]),'personId':_0x424f8d[_0x29aa50(0x14d)],'resolved':_0x1d1097[_0x29aa50(0x17d)]===_0x3fbe65[_0x29aa50(0x15e)],'unitId':_0x1b6629,'subUnitId':_0x444ba3,'text':JSON[_0x29aa50(0x1a7)](_0x424f8d[_0x29aa50(0x127)]),'parentId':_0x37bad}),_0x30766c=_0x4ff323(_0x1d1097[_0x29aa50(0x133)][0x0]);return{..._0x30766c,'children':_0x1d1097[_0x29aa50(0x133)][_0x29aa50(0x190)](0x1)[_0x29aa50(0x157)](_0x239ec6=>_0x4ff323(_0x239ec6,_0x30766c['id']))};}return null;}let _0x51bae9=class{constructor(_0x83d480,_0x5ceea7,_0x827c32){const _0x47e51d=_0x1c1955;this[_0x47e51d(0x18e)]=_0x83d480,this[_0x47e51d(0x13d)]=_0x5ceea7,this[_0x47e51d(0x192)]=_0x827c32;}async[_0x1c1955(0x1ab)](_0x3d8309){const _0x1c5902=_0x1c1955;var _0x359795,_0x11289;const {parentId:_0x510fb3,unitId:_0x5ee124,text:_0x2396ea,threadId:_0x46ef1b}=_0x3d8309,_0x260296=(_0x11289=(_0x359795=_0x2396ea[_0x1c5902(0x12b)])==null?void 0x0:_0x359795[_0x1c5902(0x153)](_0x4c72a7=>_0x4c72a7[_0x1c5902(0x1ae)]===_0x405bac[_0x1c5902(0x144)][_0x1c5902(0x1ad)])[_0x1c5902(0x157)](_0x362fb2=>_0x362fb2[_0x1c5902(0x1a8)]))!=null?_0x11289:[],_0x204321=JSON[_0x1c5902(0x13e)](_0x2396ea),_0xb37b50=(await this[_0x1c5902(0x192)][_0x1c5902(0x154)](_0x5ee124))[_0x1c5902(0x193)]();if(_0x510fb3){const _0x2dab27={'memberId':_0xb37b50,'unitId':_0x5ee124,'content':_0x204321,'mention':_0x260296,'threadId':_0x46ef1b},_0x2bc355=(await this[_0x1c5902(0x18e)][_0x1c5902(0x15c)](_0x1c5902(0x19c)+_0x5ee124+_0x1c5902(0x1a9),{'body':_0x2dab27}))['body'][_0x1c5902(0x186)];return{..._0x3d8309,'id':_0x2bc355[_0x1c5902(0x169)],'dT':_0x405bac[_0x1c5902(0x13f)](+_0x2bc355[_0x1c5902(0x18c)])['format'](_0x1c5902(0x146)),'personId':_0x2bc355[_0x1c5902(0x14d)]};}else{const _0x288b58={'memberId':_0xb37b50,'unitId':_0x5ee124,'content':_0x204321,'mention':_0x260296},_0xaed123=await this[_0x1c5902(0x18e)][_0x1c5902(0x15c)](_0x1c5902(0x19c)+_0x5ee124+_0x1c5902(0x16d),{'body':_0x288b58});return _0x3a216(_0xaed123[_0x1c5902(0x132)]['comment'],_0x3d8309);}}async['updateComment'](_0x53e960){const _0x2907cb=_0x1c1955;var _0x34820a,_0x3376e0;const {text:_0x5a7110,unitId:_0x414434}=_0x53e960,_0x39cba2=(_0x3376e0=(_0x34820a=_0x5a7110[_0x2907cb(0x12b)])==null?void 0x0:_0x34820a[_0x2907cb(0x153)](_0x779168=>_0x779168[_0x2907cb(0x1ae)]===_0x405bac[_0x2907cb(0x144)][_0x2907cb(0x1ad)])[_0x2907cb(0x157)](_0x235e4b=>_0x235e4b[_0x2907cb(0x1a8)]))!=null?_0x3376e0:[],_0x2d3949=JSON[_0x2907cb(0x13e)](_0x5a7110),_0x2f4fd4=_0x53e960['threadId'],_0x14321e=_0x53e960['id'],_0x47f7eb={'memberId':(await this[_0x2907cb(0x192)]['requireSession'](_0x414434))['getMemberID'](),'unitId':_0x414434,'threadId':_0x2f4fd4,'mention':_0x39cba2,'content':_0x2d3949,'replyId':_0x14321e},_0x132095=await this['_httpService'][_0x2907cb(0x15c)](_0x2907cb(0x19c)+_0x414434+_0x2907cb(0x17e),{'body':_0x47f7eb});return!_0x132095[_0x2907cb(0x132)][_0x2907cb(0x171)]||_0x132095[_0x2907cb(0x132)]['error'][_0x2907cb(0x19b)]===0x1;}async[_0x1c1955(0x1ac)](_0x5159d6){const _0x595a5b=_0x1c1955,{unitId:_0x564e44}=_0x5159d6,_0x13ee1e=_0x5159d6[_0x595a5b(0x174)],_0x22dca1={'memberId':this['_userService'][_0x595a5b(0x17f)]()[_0x595a5b(0x12c)],'unitId':_0x564e44,'threadId':_0x13ee1e,'solved':_0x5159d6[_0x595a5b(0x185)]?_0x3fbe65[_0x595a5b(0x15e)]:_0x3fbe65[_0x595a5b(0x136)]},_0x57ed55=await this[_0x595a5b(0x18e)]['post'](_0x595a5b(0x19c)+_0x564e44+_0x595a5b(0x1a5),{'body':_0x22dca1});return!_0x57ed55[_0x595a5b(0x132)]['error']||_0x57ed55[_0x595a5b(0x132)][_0x595a5b(0x171)][_0x595a5b(0x19b)]===0x1;}async[_0x1c1955(0x16a)](_0x517dfb,_0x32051f,_0x2e1e59,_0x28851a){const _0x15a2f7=_0x1c1955,_0x36a492={'memberId':(await this[_0x15a2f7(0x192)][_0x15a2f7(0x154)](_0x517dfb))[_0x15a2f7(0x193)](),'threadId':_0x2e1e59,'replyId':_0x28851a,'unitId':_0x517dfb},_0x4ad057=await this['_httpService'][_0x15a2f7(0x15c)](_0x15a2f7(0x19c)+_0x517dfb+_0x15a2f7(0x1a6),{'body':_0x36a492});return!_0x4ad057[_0x15a2f7(0x132)][_0x15a2f7(0x171)]||_0x4ad057[_0x15a2f7(0x132)][_0x15a2f7(0x171)]['code']===0x1;}async[_0x1c1955(0x198)](_0x15a7ed,_0x1ce800,_0x541980){const _0x526016=_0x1c1955,_0x2c5078={'unitId':_0x15a7ed,'threadId':_0x541980},_0x2c5f90=await this[_0x526016(0x18e)][_0x526016(0x15c)]('/universer-api/comment/unit/'+_0x15a7ed+_0x526016(0x143),{'body':_0x2c5078}),_0x4e0f96=_0x541980[_0x526016(0x157)](_0x50b8f3=>_0x5df92e(_0x2c5f90[_0x526016(0x132)][_0x526016(0x124)][_0x50b8f3],_0x15a7ed,_0x1ce800))[_0x526016(0x153)](Boolean);return Object['values'](_0x2c5f90[_0x526016(0x132)][_0x526016(0x15d)])[_0x526016(0x195)](_0x454a18=>{const _0x28b42a=_0x526016;this[_0x28b42a(0x13d)][_0x28b42a(0x16e)](_0x454a18);}),_0x4e0f96;}[_0x1c1955(0x18f)](_0x33d316){const _0x2d8fa8=_0x1c1955;return{'id':_0x33d316['id'],'threadId':_0x33d316['threadId'],'ref':_0x33d316[_0x2d8fa8(0x197)]};}};_0x51bae9=_0x82a4b4([_0x191a8b(0x0,_0x405bac[_0x1c1955(0x19e)](_0x5ed600[_0x1c1955(0x16c)])),_0x191a8b(0x1,_0x405bac[_0x1c1955(0x19e)](_0x405bac[_0x1c1955(0x1a2)])),_0x191a8b(0x2,_0x405bac[_0x1c1955(0x19e)](_0x15f612[_0x1c1955(0x13a)]))],_0x51bae9);var _0x3ef5aa=Object[_0x1c1955(0x145)],_0x187fc5=(_0x586f4b,_0x2c05b3,_0x5af811,_0x31b719)=>{for(var _0x31c295=_0x31b719>0x1?void 0x0:_0x31b719?_0x3ef5aa(_0x2c05b3,_0x5af811):_0x2c05b3,_0x40fc92=_0x586f4b['length']-0x1,_0x905785;_0x40fc92>=0x0;_0x40fc92--)(_0x905785=_0x586f4b[_0x40fc92])&&(_0x31c295=_0x905785(_0x31c295)||_0x31c295);return _0x31c295;},_0xf86f18=(_0x1642cf,_0xd701cf)=>(_0x43eb1f,_0x4d9fe3)=>_0xd701cf(_0x43eb1f,_0x4d9fe3,_0x1642cf);let _0x3a71d5=class extends _0x405bac[_0x1c1955(0x182)]{constructor(_0xcfad3c,_0x38b2f8){const _0x3264a0=_0x1c1955;super(),this['_threadCommentDataSourceService']=_0xcfad3c,this[_0x3264a0(0x183)]=_0x38b2f8,this[_0x3264a0(0x126)]();}[_0x1c1955(0x126)](){const _0x2ab28c=_0x1c1955;this[_0x2ab28c(0x184)]['dataSource']=this[_0x2ab28c(0x183)],this[_0x2ab28c(0x184)]['syncUpdateMutationToColla']=!0x1;}};_0x3a71d5=_0x187fc5([_0xf86f18(0x0,_0x311be5[_0x1c1955(0x129)]),_0xf86f18(0x1,_0x405bac[_0x1c1955(0x19e)](_0x51bae9))],_0x3a71d5);var _0x531e13=Object[_0x1c1955(0x165)],_0x419cab=Object['getOwnPropertyDescriptor'],_0x3dcbfc=(_0x1149f0,_0x7a1d92,_0x3db071)=>_0x7a1d92 in _0x1149f0?_0x531e13(_0x1149f0,_0x7a1d92,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3db071}):_0x1149f0[_0x7a1d92]=_0x3db071,_0x3f807e=(_0x553520,_0x4c3816,_0x595a71,_0x4b5067)=>{const _0x4f501f=_0x1c1955;for(var _0x3360af=_0x4b5067>0x1?void 0x0:_0x4b5067?_0x419cab(_0x4c3816,_0x595a71):_0x4c3816,_0x34f44d=_0x553520[_0x4f501f(0x162)]-0x1,_0x29965a;_0x34f44d>=0x0;_0x34f44d--)(_0x29965a=_0x553520[_0x34f44d])&&(_0x3360af=_0x29965a(_0x3360af)||_0x3360af);return _0x3360af;},_0x4707b0=(_0x2f432e,_0x3396dc)=>(_0x3b7131,_0x132269)=>_0x3396dc(_0x3b7131,_0x132269,_0x2f432e),_0x30f6ba=(_0x155455,_0x5197f7,_0x30c1e9)=>_0x3dcbfc(_0x155455,typeof _0x5197f7!=_0x1c1955(0x172)?_0x5197f7+'':_0x5197f7,_0x30c1e9);_0x5e78cf[_0x1c1955(0x152)]=class extends _0x405bac[_0x1c1955(0x168)]{constructor(_0x1a1748=_0x44e49b,_0x1ce92e,_0x3d1e2a){const _0x1e8f52=_0x1c1955;super(),this['_config']=_0x1a1748,this[_0x1e8f52(0x173)]=_0x1ce92e,this[_0x1e8f52(0x170)]=_0x3d1e2a;const {..._0xd7b987}=_0x405bac[_0x1e8f52(0x19d)]({},_0x44e49b,this[_0x1e8f52(0x141)]);this['_configService']['setConfig'](_0x140c61,_0xd7b987);}[_0x1c1955(0x1af)](){const _0x264e64=_0x1c1955;[[_0x51bae9],[_0x3a71d5],[_0x4b9ada]][_0x264e64(0x195)](_0x5ff259=>{const _0x9bf9dc=_0x264e64;this['_injector'][_0x9bf9dc(0x15b)](_0x5ff259);});}[_0x1c1955(0x18a)](){const _0x2bad94=_0x1c1955;this[_0x2bad94(0x173)][_0x2bad94(0x18d)](_0x3a71d5),this[_0x2bad94(0x173)]['get'](_0x4b9ada);}},_0x30f6ba(_0x5e78cf[_0x1c1955(0x152)],'pluginName',_0x2b1af4),_0x30f6ba(_0x5e78cf[_0x1c1955(0x152)],_0x1c1955(0x137),_0x405bac['UniverInstanceType'][_0x1c1955(0x181)]),_0x5e78cf[_0x1c1955(0x152)]=_0x3f807e([_0x405bac[_0x1c1955(0x149)](_0x4892e8[_0x1c1955(0x155)],_0x15f612['UniverCollaborationClientPlugin'],_0x44a182[_0x1c1955(0x16b)]),_0x4707b0(0x1,_0x405bac[_0x1c1955(0x19e)](_0x405bac[_0x1c1955(0x150)])),_0x4707b0(0x2,_0x405bac['IConfigService'])],_0x5e78cf[_0x1c1955(0x152)]),Object[_0x1c1955(0x165)](_0x5e78cf,Symbol[_0x1c1955(0x179)],{'value':'Module'});}));function _0x5bc3(_0x563193,_0x3c949c){_0x563193=_0x563193-0x124;const _0x2f9bae=_0x2f9b();let _0x5bc35b=_0x2f9bae[_0x563193];return _0x5bc35b;}function _0x2f9b(){const _0x120d49=['Plugin','replyId','deleteComment','UniverLicensePlugin','HTTPService','/add','addUser','_initUserSync','_configService','error','symbol','_injector','threadId','getUser','UniverCore','parentId','getUnit','toStringTag','44186rOIGrc','@univerjs-pro/license','Unknown','solved','/edit','getCurrentUser','@univerjs-pro/collaboration-client','UNIVER_UNKNOWN','Disposable','_threadCommentDataSource','_threadCommentDataSourceService','resolved','reply','UniverThreadCommentUi','getComment','Edit','onReady','_commentService','createTimestamp','get','_httpService','saveCommentToSnapshot','slice','exports','_sessionService','getMemberID','find','forEach','rxjs','ref','listComments','348830FTOTZg','@univerjs/network','code','/universer-api/comment/unit/','merge','Inject','@univerjs/thread-comment-ui','Add','Solve','UserManagerService','format','updateComment','/solved','/delete','parse','rangeId','/reply','pipe','addComment','resolveComment','COMMENT','rangeType','onStarting','comments','object','_initDataSource','content','20985TeOMPg','IThreadCommentDataSourceService','personId','customRanges','userID','UNRECOGNIZED','delete','commentUpdate$','size','user','body','replies','1870PfUsKm','UniverProLicense','OpenOrReOpen','type','56eJYdzI','Reply','CollaborationSessionService','bufferTime','1177GSdVRH','_userService','stringify','dayjs','5757710PPrrpF','_config','@univerjs/core','/list','CustomRangeType','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','UniverProCollaborationClient','UniverProThreadCommentDatasource','DependentOn','unitId','UniverThreadComment','667782Qrmzfh','userId','/universer-api/user/list','1255212rCIEkZ','Injector','subscribe','UniverThreadCommentDataSourcePlugin','filter','requireSession','UniverThreadCommentUIPlugin','function','map','_init','Delete','8uAfoXQ','add','post','users','Solved','_threadCommentModel','root','thread-comment-data-source.config','length','30rafBRZ','50SnGLqT','defineProperty','amd','@univerjs/thread-comment'];_0x2f9b=function(){return _0x120d49;};return _0x2f9b();}
|
|
1
|
+
(function(_0x2bed1f,_0x53db2c){const _0x3449f9=_0x6b52,_0x3abf20=_0x2bed1f();while(!![]){try{const _0x5bd0a1=-parseInt(_0x3449f9(0x1d9))/0x1*(-parseInt(_0x3449f9(0x197))/0x2)+-parseInt(_0x3449f9(0x192))/0x3+parseInt(_0x3449f9(0x1c8))/0x4*(-parseInt(_0x3449f9(0x1b7))/0x5)+-parseInt(_0x3449f9(0x1c4))/0x6+parseInt(_0x3449f9(0x1eb))/0x7+-parseInt(_0x3449f9(0x199))/0x8+parseInt(_0x3449f9(0x1e0))/0x9;if(_0x5bd0a1===_0x53db2c)break;else _0x3abf20['push'](_0x3abf20['shift']());}catch(_0x4bcd2d){_0x3abf20['push'](_0x3abf20['shift']());}}}(_0x57fb,0xa9825),function(_0x433cac,_0x55be90){const _0x20567b=_0x6b52;typeof exports==_0x20567b(0x18d)&&typeof module<'u'?_0x55be90(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x20567b(0x1fb)&&define[_0x20567b(0x1e9)]?define([_0x20567b(0x1d5),_0x20567b(0x205),'@univerjs-pro/license',_0x20567b(0x1c2),_0x20567b(0x1e7),_0x20567b(0x1a9),_0x20567b(0x1e2),_0x20567b(0x1ac)],_0x55be90):(_0x433cac=typeof globalThis<'u'?globalThis:_0x433cac||self,_0x55be90(_0x433cac['UniverProThreadCommentDatasource']={},_0x433cac[_0x20567b(0x204)],_0x433cac[_0x20567b(0x1b6)],_0x433cac[_0x20567b(0x193)],_0x433cac[_0x20567b(0x191)],_0x433cac['UniverThreadComment'],_0x433cac[_0x20567b(0x1e2)],_0x433cac[_0x20567b(0x1d6)]));}(this,function(_0x4cec79,_0x4dd628,_0x118667,_0x5cd20e,_0x50eaff,_0x47a86f,_0x423ab0,_0x16aa8b){'use strict';const _0x259d78=_0x6b52;const _0x53664b={'name':_0x259d78(0x1bb),'version':'0.16.1-insiders.20260311-074e8ca'},_0x1ba377=_0x259d78(0x1ce);var _0x99c08d=(_0x4e720a=>(_0x4e720a[_0x4e720a['OpenOrReOpen']=0x0]=_0x259d78(0x1d8),_0x4e720a[_0x4e720a['Solved']=0x1]=_0x259d78(0x195),_0x4e720a[_0x4e720a['UNRECOGNIZED']=-0x1]=_0x259d78(0x1ea),_0x4e720a))(_0x99c08d||{}),_0x2dc6d3=(_0x1d1849=>(_0x1d1849[_0x1d1849[_0x259d78(0x20b)]=0x0]=_0x259d78(0x20b),_0x1d1849[_0x1d1849[_0x259d78(0x1ca)]=0x1]=_0x259d78(0x1ca),_0x1d1849[_0x1d1849[_0x259d78(0x1cb)]=0x2]=_0x259d78(0x1cb),_0x1d1849[_0x1d1849[_0x259d78(0x1a4)]=0x3]='Edit',_0x1d1849[_0x1d1849[_0x259d78(0x188)]=0x4]=_0x259d78(0x188),_0x1d1849[_0x1d1849[_0x259d78(0x1a0)]=0x5]='Solve',_0x1d1849[_0x1d1849[_0x259d78(0x1ea)]=-0x1]=_0x259d78(0x1ea),_0x1d1849))(_0x2dc6d3||{});const _0xf7ecee=_0x479ffe=>_0x5cd20e[_0x259d78(0x18c)](new Date(+_0x479ffe))['format'](_0x259d78(0x1f9)),_0x4e7632=async(_0x248fa7,_0x1f2294)=>{const _0x4a6b15=_0x259d78,_0x268e31=_0x248fa7['get'](_0x5cd20e['UserManagerService']),_0x42a483=_0x248fa7[_0x4a6b15(0x1d7)](_0x16aa8b['HTTPService']);_0x1f2294[_0x4a6b15(0x1f8)](_0x48484c=>{const _0x2fdbb9=_0x4a6b15;_0x268e31['getUser'](_0x48484c)&&_0x1f2294[_0x2fdbb9(0x1f2)](_0x48484c);}),_0x1f2294['size']&&(await _0x42a483[_0x4a6b15(0x1d7)](_0x4a6b15(0x1c9),{'params':{'userIDs':[..._0x1f2294]}}))[_0x4a6b15(0x1ad)][_0x4a6b15(0x1ff)][_0x4a6b15(0x1f8)](_0x1853cd=>{const _0x5b4369=_0x4a6b15;_0x1853cd&&_0x268e31[_0x5b4369(0x1ec)](_0x1853cd);});};var _0x587010=Object[_0x259d78(0x1ed)],_0x4a6d97=(_0x2f8e3a,_0x28179e,_0x1f2f2f,_0x38d20b)=>{const _0xcde3ff=_0x259d78;for(var _0x15197d=_0x38d20b>0x1?void 0x0:_0x38d20b?_0x587010(_0x28179e,_0x1f2f2f):_0x28179e,_0x17e773=_0x2f8e3a[_0xcde3ff(0x1ae)]-0x1,_0x2bf372;_0x17e773>=0x0;_0x17e773--)(_0x2bf372=_0x2f8e3a[_0x17e773])&&(_0x15197d=_0x2bf372(_0x15197d)||_0x15197d);return _0x15197d;},_0x1cad01=(_0x161f20,_0x251c1f)=>(_0x163485,_0x152439)=>_0x251c1f(_0x163485,_0x152439,_0x161f20);let _0x30c2c6=class extends _0x5cd20e[_0x259d78(0x1e4)]{constructor(_0x124523,_0x484408,_0x239abd,_0x1e2c0c){const _0x20ff4a=_0x259d78;super(),this[_0x20ff4a(0x1d2)]=_0x124523,this[_0x20ff4a(0x1c1)]=_0x484408,this[_0x20ff4a(0x194)]=_0x239abd,this[_0x20ff4a(0x1c7)]=_0x1e2c0c,this['_init'](),this['_initUserSync']();}[_0x259d78(0x209)](){const _0x11a4a7=_0x259d78;this[_0x11a4a7(0x1bf)](this[_0x11a4a7(0x1c1)][_0x11a4a7(0x1b9)][_0x11a4a7(0x1a3)](_0x423ab0[_0x11a4a7(0x186)](0x10))['subscribe'](_0x419c11=>{const _0x434075=_0x11a4a7,_0x5f5cf7=new Set();_0x419c11[_0x434075(0x1f8)](_0x10cf4d=>{const _0x84c406=_0x434075;if(_0x10cf4d[_0x84c406(0x190)]===_0x84c406(0x1b4)){const _0x17a7ef=_0x10cf4d['payload'][_0x84c406(0x198)];_0x5f5cf7[_0x84c406(0x1b4)](_0x17a7ef);}}),_0x4e7632(this[_0x434075(0x1c7)],_0x5f5cf7);}));}['_init'](){const _0x49111e=_0x259d78;this[_0x49111e(0x1bf)](this['_commentService'][_0x49111e(0x1b9)][_0x49111e(0x1ef)](async _0x3e4e3d=>{const _0x1377f9=_0x49111e;var _0x57a2d9,_0x4335da,_0x2b46bd,_0x77a1aa;const _0x174e32=(_0x57a2d9=this[_0x1377f9(0x1c1)][_0x1377f9(0x1db)](_0x3e4e3d['unitId'])[_0x1377f9(0x19a)](_0x1014c5=>_0x1014c5[_0x1377f9(0x19d)]===_0x3e4e3d[_0x1377f9(0x19d)]))==null?void 0x0:_0x57a2d9[_0x1377f9(0x1a5)];if(!_0x174e32)return;const {unitId:_0x12fd13,subUnitId:_0x2fb5ae}=_0x174e32;switch(_0x3e4e3d[_0x1377f9(0x185)]&&this[_0x1377f9(0x194)]['addUser'](_0x3e4e3d[_0x1377f9(0x185)]),_0x3e4e3d['type']){case _0x2dc6d3['Add']:break;case _0x2dc6d3[_0x1377f9(0x1cb)]:{this[_0x1377f9(0x1c1)][_0x1377f9(0x1a2)](_0x12fd13,_0x2fb5ae,{'unitId':_0x12fd13,'subUnitId':_0x2fb5ae,'ref':'','id':_0x3e4e3d[_0x1377f9(0x1e5)],'dT':_0xf7ecee(+_0x3e4e3d[_0x1377f9(0x202)]),'threadId':_0x3e4e3d[_0x1377f9(0x19d)],'personId':(_0x2b46bd=(_0x4335da=_0x3e4e3d[_0x1377f9(0x185)])==null?void 0x0:_0x4335da[_0x1377f9(0x1cf)])!=null?_0x2b46bd:_0x3e4e3d[_0x1377f9(0x1fd)],'text':JSON[_0x1377f9(0x20c)](_0x3e4e3d['content']),'parentId':_0x174e32['id']});break;}case _0x2dc6d3[_0x1377f9(0x188)]:{const _0x4aa59c=this[_0x1377f9(0x1c1)][_0x1377f9(0x200)](_0x12fd13,_0x2fb5ae,_0x3e4e3d[_0x1377f9(0x1e5)]);_0x4aa59c&&_0x4aa59c[_0x1377f9(0x196)]&&this['_threadCommentModel']['deleteComment'](_0x12fd13,_0x2fb5ae,_0x3e4e3d[_0x1377f9(0x1e5)]);break;}case _0x2dc6d3['Edit']:{this['_threadCommentModel'][_0x1377f9(0x1ab)](_0x12fd13,_0x2fb5ae,{'commentId':_0x3e4e3d[_0x1377f9(0x1e5)],'text':JSON[_0x1377f9(0x20c)](_0x3e4e3d[_0x1377f9(0x1dc)])});break;}case _0x2dc6d3[_0x1377f9(0x1a0)]:{const _0x2b5211=(_0x77a1aa=this[_0x1377f9(0x1c1)][_0x1377f9(0x1db)](_0x3e4e3d['unitId'])[_0x1377f9(0x19a)](_0x452e1a=>_0x452e1a[_0x1377f9(0x19d)]===_0x3e4e3d[_0x1377f9(0x19d)]))==null?void 0x0:_0x77a1aa[_0x1377f9(0x1a5)];_0x2b5211&&this[_0x1377f9(0x1c1)][_0x1377f9(0x1bd)](_0x12fd13,_0x2fb5ae,_0x2b5211['id'],_0x3e4e3d['solved']===_0x99c08d[_0x1377f9(0x195)]);break;}}}));}};_0x30c2c6=_0x4a6d97([_0x1cad01(0x0,_0x5cd20e[_0x259d78(0x19f)](_0x4dd628[_0x259d78(0x1b5)])),_0x1cad01(0x1,_0x5cd20e[_0x259d78(0x19f)](_0x47a86f['ThreadCommentModel'])),_0x1cad01(0x2,_0x5cd20e[_0x259d78(0x19f)](_0x5cd20e[_0x259d78(0x1fa)])),_0x1cad01(0x3,_0x5cd20e[_0x259d78(0x19f)](_0x5cd20e[_0x259d78(0x1ee)]))],_0x30c2c6);const _0x4ff807=_0x259d78(0x19e),_0xf5316e={};var _0x390cec=Object[_0x259d78(0x1ed)],_0xbc3eaa=(_0x588a42,_0x43cb2c,_0x496f38,_0x277f9e)=>{const _0x15c804=_0x259d78;for(var _0x5491bc=_0x277f9e>0x1?void 0x0:_0x277f9e?_0x390cec(_0x43cb2c,_0x496f38):_0x43cb2c,_0x53c97d=_0x588a42[_0x15c804(0x1ae)]-0x1,_0x1a643b;_0x53c97d>=0x0;_0x53c97d--)(_0x1a643b=_0x588a42[_0x53c97d])&&(_0x5491bc=_0x1a643b(_0x5491bc)||_0x5491bc);return _0x5491bc;},_0x23d60d=(_0x5d4297,_0x3217f6)=>(_0x2e62b9,_0x317e02)=>_0x3217f6(_0x2e62b9,_0x317e02,_0x5d4297);function _0x3e2f52(_0x4b20e0,_0x39fe56){const _0x1311fc=_0x259d78,_0x1ebde8=_0x4b20e0[_0x1311fc(0x1af)][0x0];return{..._0x39fe56,'id':_0x1ebde8[_0x1311fc(0x1e5)],'resolved':_0x4b20e0[_0x1311fc(0x1d3)]===0x1,'dT':_0xf7ecee(_0x1ebde8[_0x1311fc(0x202)]),'personId':_0x1ebde8[_0x1311fc(0x1fd)],'threadId':_0x1ebde8[_0x1311fc(0x19d)]};}function _0x328696(_0x247571,_0x3ebe13,_0x1b030c){const _0x416314=_0x259d78;var _0x2c797f,_0x4395b0;if(((_0x4395b0=(_0x2c797f=_0x247571==null?void 0x0:_0x247571[_0x416314(0x1af)])==null?void 0x0:_0x2c797f[_0x416314(0x1ae)])!=null?_0x4395b0:0x0)>0x0){const _0x1b47f8=(_0x1c3d95,_0xef4fd)=>({'id':_0x1c3d95['replyId'],'threadId':_0x1c3d95[_0x416314(0x19d)],'dT':_0xf7ecee(_0x1c3d95['createTimestamp']),'personId':_0x1c3d95[_0x416314(0x1fd)],'resolved':_0x247571[_0x416314(0x1d3)]===_0x99c08d[_0x416314(0x195)],'unitId':_0x3ebe13,'subUnitId':_0x1b030c,'text':JSON[_0x416314(0x20c)](_0x1c3d95[_0x416314(0x1dc)]),'parentId':_0xef4fd}),_0x506795=_0x1b47f8(_0x247571[_0x416314(0x1af)][0x0]);return{..._0x506795,'children':_0x247571[_0x416314(0x1af)][_0x416314(0x1f1)](0x1)['map'](_0x518529=>_0x1b47f8(_0x518529,_0x506795['id']))};}return null;}let _0x5a691f=class{constructor(_0x3b662d,_0x4a7acf,_0x47d215){const _0x568961=_0x259d78;this[_0x568961(0x1d4)]=_0x3b662d,this['_userService']=_0x4a7acf,this[_0x568961(0x1dd)]=_0x47d215;}async[_0x259d78(0x1a2)](_0x1d80f1){const _0x29022f=_0x259d78;var _0x5a805d,_0x10f868;const {parentId:_0x266d1e,unitId:_0x30b782,text:_0x2310fc,threadId:_0x519bcd}=_0x1d80f1,_0x1ad3d7=(_0x10f868=(_0x5a805d=_0x2310fc['customRanges'])==null?void 0x0:_0x5a805d[_0x29022f(0x1c5)](_0x3e5554=>_0x3e5554[_0x29022f(0x203)]===_0x5cd20e['CustomRangeType']['COMMENT'])['map'](_0x6b7ca9=>_0x6b7ca9[_0x29022f(0x1e6)]))!=null?_0x10f868:[],_0x27160b=JSON['stringify'](_0x2310fc),_0x442278=(await this[_0x29022f(0x1dd)][_0x29022f(0x1b8)](_0x30b782))[_0x29022f(0x208)]();if(_0x266d1e){const _0x4df694={'memberId':_0x442278,'unitId':_0x30b782,'content':_0x27160b,'mention':_0x1ad3d7,'threadId':_0x519bcd},_0xf81dd1=(await this[_0x29022f(0x1d4)][_0x29022f(0x1d0)](_0x29022f(0x18b)+_0x30b782+_0x29022f(0x1f0),{'body':_0x4df694}))[_0x29022f(0x1ad)]['reply'];return{..._0x1d80f1,'id':_0xf81dd1[_0x29022f(0x1e5)],'dT':_0x5cd20e['dayjs'](+_0xf81dd1[_0x29022f(0x202)])[_0x29022f(0x18e)](_0x29022f(0x1f9)),'personId':_0xf81dd1['userId']};}else{const _0x960066={'memberId':_0x442278,'unitId':_0x30b782,'content':_0x27160b,'mention':_0x1ad3d7},_0x34990e=await this[_0x29022f(0x1d4)][_0x29022f(0x1d0)](_0x29022f(0x18b)+_0x30b782+_0x29022f(0x1f6),{'body':_0x960066});return _0x3e2f52(_0x34990e[_0x29022f(0x1ad)]['comment'],_0x1d80f1);}}async[_0x259d78(0x1ab)](_0x5c2a41){const _0x3a50c1=_0x259d78;var _0x3e3c13,_0x27b835;const {text:_0x4a894a,unitId:_0xa9c0b3}=_0x5c2a41,_0x3a6589=(_0x27b835=(_0x3e3c13=_0x4a894a[_0x3a50c1(0x1f4)])==null?void 0x0:_0x3e3c13['filter'](_0x48d1eb=>_0x48d1eb[_0x3a50c1(0x203)]===_0x5cd20e[_0x3a50c1(0x1be)][_0x3a50c1(0x18f)])['map'](_0x44ba12=>_0x44ba12[_0x3a50c1(0x1e6)]))!=null?_0x27b835:[],_0x50f621=JSON[_0x3a50c1(0x1cd)](_0x4a894a),_0x35ec38=_0x5c2a41[_0x3a50c1(0x19d)],_0x51b53d=_0x5c2a41['id'],_0x27c128={'memberId':(await this[_0x3a50c1(0x1dd)][_0x3a50c1(0x1b8)](_0xa9c0b3))[_0x3a50c1(0x208)](),'unitId':_0xa9c0b3,'threadId':_0x35ec38,'mention':_0x3a6589,'content':_0x50f621,'replyId':_0x51b53d},_0x269b8a=await this['_httpService'][_0x3a50c1(0x1d0)](_0x3a50c1(0x18b)+_0xa9c0b3+'/edit',{'body':_0x27c128});return!_0x269b8a[_0x3a50c1(0x1ad)][_0x3a50c1(0x1a7)]||_0x269b8a[_0x3a50c1(0x1ad)][_0x3a50c1(0x1a7)][_0x3a50c1(0x1c3)]===0x1;}async[_0x259d78(0x1bd)](_0x2f019e){const _0x3410d8=_0x259d78,{unitId:_0xe37f9e}=_0x2f019e,_0x5c35c2=_0x2f019e[_0x3410d8(0x19d)],_0x3ab07a={'memberId':this[_0x3410d8(0x194)][_0x3410d8(0x1e3)]()[_0x3410d8(0x1cf)],'unitId':_0xe37f9e,'threadId':_0x5c35c2,'solved':_0x2f019e['resolved']?_0x99c08d['Solved']:_0x99c08d['OpenOrReOpen']},_0x53e7f9=await this[_0x3410d8(0x1d4)]['post'](_0x3410d8(0x18b)+_0xe37f9e+_0x3410d8(0x1d1),{'body':_0x3ab07a});return!_0x53e7f9[_0x3410d8(0x1ad)]['error']||_0x53e7f9[_0x3410d8(0x1ad)][_0x3410d8(0x1a7)]['code']===0x1;}async[_0x259d78(0x19c)](_0x1f2c3a,_0x383cda,_0x2cd0df,_0x410c3e){const _0x5615e3=_0x259d78,_0xafb4aa={'memberId':(await this['_sessionService'][_0x5615e3(0x1b8)](_0x1f2c3a))[_0x5615e3(0x208)](),'threadId':_0x2cd0df,'replyId':_0x410c3e,'unitId':_0x1f2c3a},_0x426b6b=await this['_httpService'][_0x5615e3(0x1d0)](_0x5615e3(0x18b)+_0x1f2c3a+_0x5615e3(0x1e1),{'body':_0xafb4aa});return!_0x426b6b[_0x5615e3(0x1ad)][_0x5615e3(0x1a7)]||_0x426b6b['body'][_0x5615e3(0x1a7)][_0x5615e3(0x1c3)]===0x1;}async['listComments'](_0x55ced7,_0x579915,_0x1b52f4){const _0x1a0e2f=_0x259d78,_0x134256={'unitId':_0x55ced7,'threadId':_0x1b52f4},_0x4d1d57=await this['_httpService'][_0x1a0e2f(0x1d0)]('/universer-api/comment/unit/'+_0x55ced7+_0x1a0e2f(0x18a),{'body':_0x134256}),_0x2b57a4=_0x1b52f4[_0x1a0e2f(0x1ba)](_0x11ac28=>_0x328696(_0x4d1d57['body'][_0x1a0e2f(0x1cc)][_0x11ac28],_0x55ced7,_0x579915))[_0x1a0e2f(0x1c5)](Boolean);return Object[_0x1a0e2f(0x1fc)](_0x4d1d57['body']['users'])[_0x1a0e2f(0x1f8)](_0xffae06=>{const _0x42dfdb=_0x1a0e2f;this[_0x42dfdb(0x194)]['addUser'](_0xffae06);}),_0x2b57a4;}[_0x259d78(0x1b3)](_0x1dd125){const _0x507ec1=_0x259d78;return{'id':_0x1dd125['id'],'threadId':_0x1dd125['threadId'],'ref':_0x1dd125[_0x507ec1(0x1a8)]};}};_0x5a691f=_0xbc3eaa([_0x23d60d(0x0,_0x5cd20e[_0x259d78(0x19f)](_0x16aa8b[_0x259d78(0x1df)])),_0x23d60d(0x1,_0x5cd20e[_0x259d78(0x19f)](_0x5cd20e[_0x259d78(0x1fa)])),_0x23d60d(0x2,_0x5cd20e[_0x259d78(0x19f)](_0x4dd628[_0x259d78(0x1f5)]))],_0x5a691f);var _0x19e99a=Object['getOwnPropertyDescriptor'],_0x2c5d6e=(_0x2be248,_0x5b33cc,_0x4f1ece,_0x41dc86)=>{const _0x21c215=_0x259d78;for(var _0x1b90cd=_0x41dc86>0x1?void 0x0:_0x41dc86?_0x19e99a(_0x5b33cc,_0x4f1ece):_0x5b33cc,_0x338260=_0x2be248[_0x21c215(0x1ae)]-0x1,_0x3585cf;_0x338260>=0x0;_0x338260--)(_0x3585cf=_0x2be248[_0x338260])&&(_0x1b90cd=_0x3585cf(_0x1b90cd)||_0x1b90cd);return _0x1b90cd;},_0x2bdfcc=(_0x5b5ceb,_0x1960ff)=>(_0x17944f,_0x262b20)=>_0x1960ff(_0x17944f,_0x262b20,_0x5b5ceb);let _0x3469a2=class extends _0x5cd20e[_0x259d78(0x1e4)]{constructor(_0x3f35de,_0x1231a8){const _0x17095d=_0x259d78;super(),this['_threadCommentDataSourceService']=_0x3f35de,this[_0x17095d(0x1aa)]=_0x1231a8,this[_0x17095d(0x1b2)]();}['_initDataSource'](){const _0x375e1a=_0x259d78;this[_0x375e1a(0x1de)][_0x375e1a(0x189)]=this[_0x375e1a(0x1aa)],this[_0x375e1a(0x1de)]['syncUpdateMutationToColla']=!0x1;}};_0x3469a2=_0x2c5d6e([_0x2bdfcc(0x0,_0x47a86f[_0x259d78(0x1b0)]),_0x2bdfcc(0x1,_0x5cd20e[_0x259d78(0x19f)](_0x5a691f))],_0x3469a2);var _0x5ee5ce=Object[_0x259d78(0x207)],_0x190542=Object[_0x259d78(0x1ed)],_0x4e6a48=(_0x18c83b,_0x2f2a1f,_0x3eac03)=>_0x2f2a1f in _0x18c83b?_0x5ee5ce(_0x18c83b,_0x2f2a1f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3eac03}):_0x18c83b[_0x2f2a1f]=_0x3eac03,_0x2d1f43=(_0x31c613,_0x3f1957,_0x27c94c,_0x168d88)=>{const _0x9d0fcd=_0x259d78;for(var _0x44105c=_0x168d88>0x1?void 0x0:_0x168d88?_0x190542(_0x3f1957,_0x27c94c):_0x3f1957,_0x3c6d80=_0x31c613[_0x9d0fcd(0x1ae)]-0x1,_0x55d382;_0x3c6d80>=0x0;_0x3c6d80--)(_0x55d382=_0x31c613[_0x3c6d80])&&(_0x44105c=_0x55d382(_0x44105c)||_0x44105c);return _0x44105c;},_0x15b0f6=(_0x4e0084,_0x5bb054)=>(_0x28a2e2,_0x26f533)=>_0x5bb054(_0x28a2e2,_0x26f533,_0x4e0084),_0x231d35=(_0x410b0f,_0x4230b,_0x3f507f)=>_0x4e6a48(_0x410b0f,typeof _0x4230b!=_0x259d78(0x1da)?_0x4230b+'':_0x4230b,_0x3f507f);_0x4cec79[_0x259d78(0x1a6)]=class extends _0x5cd20e['Plugin']{constructor(_0x54c615=_0xf5316e,_0x567daa,_0x494c02){const _0x3c94d2=_0x259d78;super(),this['_config']=_0x54c615,this[_0x3c94d2(0x1c7)]=_0x567daa,this[_0x3c94d2(0x1b1)]=_0x494c02;const {..._0x1eae0f}=_0x5cd20e[_0x3c94d2(0x206)]({},_0xf5316e,this[_0x3c94d2(0x1f3)]);this[_0x3c94d2(0x1b1)][_0x3c94d2(0x201)](_0x4ff807,_0x1eae0f);}[_0x259d78(0x1f7)](){const _0x53ca0f=_0x259d78;[[_0x5a691f],[_0x3469a2],[_0x30c2c6]][_0x53ca0f(0x1f8)](_0x5583a7=>{const _0x57fd5b=_0x53ca0f;this[_0x57fd5b(0x1c7)][_0x57fd5b(0x1b4)](_0x5583a7);});}[_0x259d78(0x1c0)](){const _0x55b2d4=_0x259d78;this[_0x55b2d4(0x1c7)][_0x55b2d4(0x1d7)](_0x3469a2),this[_0x55b2d4(0x1c7)]['get'](_0x30c2c6);}},_0x231d35(_0x4cec79[_0x259d78(0x1a6)],_0x259d78(0x1a1),_0x1ba377),_0x231d35(_0x4cec79['UniverThreadCommentDataSourcePlugin'],_0x259d78(0x187),_0x53664b[_0x259d78(0x1fe)]),_0x231d35(_0x4cec79[_0x259d78(0x1a6)],_0x259d78(0x1e8),_0x53664b[_0x259d78(0x1e8)]),_0x4cec79[_0x259d78(0x1a6)]=_0x2d1f43([_0x5cd20e[_0x259d78(0x1c6)](_0x50eaff[_0x259d78(0x20a)],_0x4dd628[_0x259d78(0x1bc)],_0x118667[_0x259d78(0x19b)]),_0x15b0f6(0x1,_0x5cd20e['Inject'](_0x5cd20e[_0x259d78(0x1ee)])),_0x15b0f6(0x2,_0x5cd20e['IConfigService'])],_0x4cec79[_0x259d78(0x1a6)]),Object['defineProperty'](_0x4cec79,Symbol['toStringTag'],{'value':'Module'});}));function _0x6b52(_0x52c21e,_0x2fb6cf){_0x52c21e=_0x52c21e-0x185;const _0x57fbcd=_0x57fb();let _0x6b52ab=_0x57fbcd[_0x52c21e];return _0x6b52ab;}function _0x57fb(){const _0x249f97=['customRanges','CollaborationSessionService','/add','onStarting','forEach','YYYY/MM/DD\x20HH:mm','UserManagerService','function','values','userId','name','users','getComment','setConfig','createTimestamp','rangeType','UniverProCollaborationClient','@univerjs-pro/collaboration-client','merge','defineProperty','getMemberID','_initUserSync','UniverThreadCommentUIPlugin','Unknown','parse','user','bufferTime','packageName','Delete','dataSource','/list','/universer-api/comment/unit/','dayjs','object','format','COMMENT','type','UniverThreadCommentUi','3705174HSRHAn','UniverCore','_userService','Solved','parentId','856468xlDOWL','personId','5409064ctLyZm','find','UniverLicensePlugin','deleteComment','threadId','thread-comment-data-source.config','Inject','Solve','pluginName','addComment','pipe','Edit','root','UniverThreadCommentDataSourcePlugin','error','ref','@univerjs/thread-comment','_threadCommentDataSource','updateComment','@univerjs/network','body','length','replies','IThreadCommentDataSourceService','_configService','_initDataSource','saveCommentToSnapshot','add','CommentService','UniverProLicense','5868925AnFjLV','requireSession','commentUpdate$','map','@univerjs-pro/thread-comment-datasource','UniverCollaborationClientPlugin','resolveComment','CustomRangeType','disposeWithMe','onReady','_threadCommentModel','@univerjs/core','code','6075468ULGmZp','filter','DependentOn','_injector','4CThfep','/universer-api/user/list','Add','Reply','comments','stringify','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userID','post','/solved','_commentService','solved','_httpService','exports','UniverNetwork','get','OpenOrReOpen','3Horwyj','symbol','getUnit','content','_sessionService','_threadCommentDataSourceService','HTTPService','29225700DstoZI','/delete','rxjs','getCurrentUser','Disposable','replyId','rangeId','@univerjs/thread-comment-ui','version','amd','UNRECOGNIZED','1819027dwhVJN','addUser','getOwnPropertyDescriptor','Injector','subscribe','/reply','slice','delete','_config'];_0x57fb=function(){return _0x249f97;};return _0x57fb();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1-insiders.20260311-074e8ca",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.16.
|
|
49
|
-
"@univerjs-pro/license": "0.16.
|
|
50
|
-
"@univerjs/core": "0.16.
|
|
51
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.16.1-insiders.20260311-074e8ca",
|
|
49
|
+
"@univerjs-pro/license": "0.16.1-insiders.20260311-074e8ca",
|
|
50
|
+
"@univerjs/core": "0.16.1-insiders.20260311-074e8ca",
|
|
51
|
+
"@univerjs/network": "0.16.1-insiders.20260311-074e8ca",
|
|
52
|
+
"@univerjs/thread-comment": "0.16.1-insiders.20260311-074e8ca",
|
|
52
53
|
"@univerjs/protocol": "0.1.48",
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.16.
|
|
54
|
-
"@univerjs/network": "0.16.0"
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.16.1-insiders.20260311-074e8ca"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
59
|
"vite": "^7.3.1",
|
|
60
60
|
"vitest": "^4.0.18",
|
|
61
|
-
"@univerjs-infra/shared": "0.16.
|
|
61
|
+
"@univerjs-infra/shared": "0.16.1"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|