@univerjs-pro/thread-comment-datasource 0.15.1-insiders.20260117-8ce4a01 → 0.15.2-insiders.20260119-edc718c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x274287=_0xd467;(function(_0x4002f6,_0x4a6d70){const _0x1e4d8c=_0xd467,_0x29babe=_0x4002f6();while(!![]){try{const _0x6bc365=parseInt(_0x1e4d8c(0x194))/0x1*(parseInt(_0x1e4d8c(0x15c))/0x2)+parseInt(_0x1e4d8c(0x18e))/0x3*(parseInt(_0x1e4d8c(0x16f))/0x4)+-parseInt(_0x1e4d8c(0x12a))/0x5+-parseInt(_0x1e4d8c(0x182))/0x6*(parseInt(_0x1e4d8c(0x16a))/0x7)+parseInt(_0x1e4d8c(0x140))/0x8*(-parseInt(_0x1e4d8c(0x12c))/0x9)+-parseInt(_0x1e4d8c(0x185))/0xa*(parseInt(_0x1e4d8c(0x13e))/0xb)+-parseInt(_0x1e4d8c(0x13f))/0xc*(-parseInt(_0x1e4d8c(0x167))/0xd);if(_0x6bc365===_0x4a6d70)break;else _0x29babe['push'](_0x29babe['shift']());}catch(_0x5d9031){_0x29babe['push'](_0x29babe['shift']());}}}(_0xeaee,0xe3cf2));Object['defineProperty'](exports,Symbol[_0x274287(0x177)],{'value':_0x274287(0x145)});function _0xeaee(){const _0x3b4666=['_threadCommentDataSource','setConfig','9CdRXXQ','Add','Reply','customRanges','thread-comment-data-source.config','users','855719bfuuOh','getOwnPropertyDescriptor','UNIVER_UNKNOWN','Delete','threadId','resolved','/add','_initDataSource','onStarting','ref','format','HTTPService','userID','solved','_init','body','/universer-api/comment/unit/','OpenOrReOpen','/solved','7187640DZcYzB','_configService','2223zUcyRH','unitId','addUser','CollaborationSessionService','stringify','size','CommentService','_injector','_initUserSync','commentUpdate$','Injector','userId','Solved','reply','IThreadCommentDataSourceService','user','_threadCommentModel','rangeId','352nLQLfL','619428qKZbQn','15304QQlPeB','_commentService','add','getCurrentUser','getUnit','Module','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/list','error','deleteComment','parentId','code','rangeType','delete','getMemberID','length','symbol','dayjs','onReady','payload','_userService','Solve','createTimestamp','get','comment','personId','/delete','filter','2NCZDOo','dataSource','updateComment','find','_threadCommentDataSourceService','comments','pluginName','type','saveCommentToSnapshot','Unknown','parse','767URQKwP','replies','_sessionService','4984mbrWTE','UniverThreadCommentUIPlugin','ThreadCommentModel','addComment','UniverThreadCommentDataSourcePlugin','287916XJsARb','COMMENT','post','map','listComments','Disposable','Inject','/universer-api/user/list','toStringTag','resolveComment','Edit','root','content','_httpService','forEach','requireSession','slice','replyId','UNRECOGNIZED','7212tCYjao','_config','UniverInstanceType','130690CWJnHG','subscribe','UserManagerService','bufferTime','CustomRangeType','pipe','YYYY/MM/DD\x20HH:mm'];_0xeaee=function(){return _0x3b4666;};return _0xeaee();}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=_0x274287(0x146);var I=(_0x4c52b9=>(_0x4c52b9[_0x4c52b9[_0x274287(0x128)]=0x0]=_0x274287(0x128),_0x4c52b9[_0x4c52b9[_0x274287(0x138)]=0x1]=_0x274287(0x138),_0x4c52b9[_0x4c52b9[_0x274287(0x181)]=-0x1]=_0x274287(0x181),_0x4c52b9))(I||{}),v=(_0x21c2b4=>(_0x21c2b4[_0x21c2b4['Unknown']=0x0]=_0x274287(0x165),_0x21c2b4[_0x21c2b4[_0x274287(0x18f)]=0x1]=_0x274287(0x18f),_0x21c2b4[_0x21c2b4[_0x274287(0x190)]=0x2]='Reply',_0x21c2b4[_0x21c2b4[_0x274287(0x179)]=0x3]=_0x274287(0x179),_0x21c2b4[_0x21c2b4['Delete']=0x4]=_0x274287(0x197),_0x21c2b4[_0x21c2b4[_0x274287(0x155)]=0x5]=_0x274287(0x155),_0x21c2b4[_0x21c2b4['UNRECOGNIZED']=-0x1]=_0x274287(0x181),_0x21c2b4))(v||{});const f=_0x49db39=>c[_0x274287(0x151)](new Date(+_0x49db39))[_0x274287(0x19e)](_0x274287(0x18b)),R=async(_0x33b4ae,_0x519509)=>{const _0x4a0e14=_0x274287,_0x55ab80=_0x33b4ae[_0x4a0e14(0x157)](c[_0x4a0e14(0x187)]),_0x451392=_0x33b4ae['get'](P[_0x4a0e14(0x19f)]);_0x519509[_0x4a0e14(0x17d)](_0x38bba2=>{const _0x3282d8=_0x4a0e14;_0x55ab80['getUser'](_0x38bba2)&&_0x519509[_0x3282d8(0x14d)](_0x38bba2);}),_0x519509[_0x4a0e14(0x131)]&&(await _0x451392[_0x4a0e14(0x157)](_0x4a0e14(0x176),{'params':{'userIDs':[..._0x519509]}}))['body'][_0x4a0e14(0x193)][_0x4a0e14(0x17d)](_0x213276=>{const _0x4d0313=_0x4a0e14;_0x213276&&_0x55ab80[_0x4d0313(0x12e)](_0x213276);});};var $=Object[_0x274287(0x195)],E=(_0x33ff00,_0x58f79a,_0x4db735,_0x559478)=>{const _0x5a9e4c=_0x274287;for(var _0xc0e826=_0x559478>0x1?void 0x0:_0x559478?$(_0x58f79a,_0x4db735):_0x58f79a,_0xdbbfdc=_0x33ff00[_0x5a9e4c(0x14f)]-0x1,_0x9687c;_0xdbbfdc>=0x0;_0xdbbfdc--)(_0x9687c=_0x33ff00[_0xdbbfdc])&&(_0xc0e826=_0x9687c(_0xc0e826)||_0xc0e826);return _0xc0e826;},S=(_0x5ceafe,_0x2a39f2)=>(_0x5816e3,_0x1dd216)=>_0x2a39f2(_0x5816e3,_0x1dd216,_0x5ceafe);let _=class extends c[_0x274287(0x174)]{constructor(_0x3e9b14,_0xb64bc6,_0x561d9a,_0x34b0e6){const _0x37a070=_0x274287;super(),this[_0x37a070(0x141)]=_0x3e9b14,this[_0x37a070(0x13c)]=_0xb64bc6,this[_0x37a070(0x154)]=_0x561d9a,this['_injector']=_0x34b0e6,this[_0x37a070(0x1a2)](),this[_0x37a070(0x134)]();}[_0x274287(0x134)](){const _0x16d4dc=_0x274287;this['disposeWithMe'](this[_0x16d4dc(0x13c)][_0x16d4dc(0x135)][_0x16d4dc(0x18a)](j[_0x16d4dc(0x188)](0x10))[_0x16d4dc(0x186)](_0x2dbeaa=>{const _0x25087f=_0x16d4dc,_0x46a134=new Set();_0x2dbeaa[_0x25087f(0x17d)](_0x67c227=>{const _0x47a33d=_0x25087f;if(_0x67c227[_0x47a33d(0x163)]===_0x47a33d(0x142)){const _0x1a07cb=_0x67c227[_0x47a33d(0x153)][_0x47a33d(0x159)];_0x46a134[_0x47a33d(0x142)](_0x1a07cb);}}),R(this[_0x25087f(0x133)],_0x46a134);}));}[_0x274287(0x1a2)](){const _0x1c0ded=_0x274287;this['disposeWithMe'](this[_0x1c0ded(0x141)]['commentUpdate$'][_0x1c0ded(0x186)](async _0x1e9d6a=>{const _0x17ecc7=_0x1c0ded;var _0x1990fe,_0x43e560,_0x5d152b,_0x43396a;const _0x19938d=(_0x1990fe=this[_0x17ecc7(0x13c)][_0x17ecc7(0x144)](_0x1e9d6a['unitId'])[_0x17ecc7(0x15f)](_0x1f10f1=>_0x1f10f1[_0x17ecc7(0x198)]===_0x1e9d6a[_0x17ecc7(0x198)]))==null?void 0x0:_0x1990fe[_0x17ecc7(0x17a)];if(!_0x19938d)return;const {unitId:_0x21dc0b,subUnitId:_0x4bd178}=_0x19938d;switch(_0x1e9d6a[_0x17ecc7(0x13b)]&&this[_0x17ecc7(0x154)][_0x17ecc7(0x12e)](_0x1e9d6a[_0x17ecc7(0x13b)]),_0x1e9d6a[_0x17ecc7(0x163)]){case v[_0x17ecc7(0x18f)]:break;case v['Reply']:{this[_0x17ecc7(0x13c)][_0x17ecc7(0x16d)](_0x21dc0b,_0x4bd178,{'unitId':_0x21dc0b,'subUnitId':_0x4bd178,'ref':'','id':_0x1e9d6a[_0x17ecc7(0x180)],'dT':f(+_0x1e9d6a['createTimestamp']),'threadId':_0x1e9d6a[_0x17ecc7(0x198)],'personId':(_0x5d152b=(_0x43e560=_0x1e9d6a[_0x17ecc7(0x13b)])==null?void 0x0:_0x43e560['userID'])!=null?_0x5d152b:_0x1e9d6a[_0x17ecc7(0x137)],'text':JSON[_0x17ecc7(0x166)](_0x1e9d6a[_0x17ecc7(0x17b)]),'parentId':_0x19938d['id']});break;}case v[_0x17ecc7(0x197)]:{const _0x43f760=this['_threadCommentModel']['getComment'](_0x21dc0b,_0x4bd178,_0x1e9d6a[_0x17ecc7(0x180)]);_0x43f760&&_0x43f760[_0x17ecc7(0x14a)]&&this['_threadCommentModel']['deleteComment'](_0x21dc0b,_0x4bd178,_0x1e9d6a[_0x17ecc7(0x180)]);break;}case v[_0x17ecc7(0x179)]:{this['_threadCommentModel'][_0x17ecc7(0x15e)](_0x21dc0b,_0x4bd178,{'commentId':_0x1e9d6a[_0x17ecc7(0x180)],'text':JSON[_0x17ecc7(0x166)](_0x1e9d6a['content'])});break;}case v['Solve']:{const _0x10e09f=(_0x43396a=this[_0x17ecc7(0x13c)][_0x17ecc7(0x144)](_0x1e9d6a[_0x17ecc7(0x12d)])['find'](_0x58d382=>_0x58d382[_0x17ecc7(0x198)]===_0x1e9d6a[_0x17ecc7(0x198)]))==null?void 0x0:_0x43396a[_0x17ecc7(0x17a)];_0x10e09f&&this[_0x17ecc7(0x13c)][_0x17ecc7(0x178)](_0x21dc0b,_0x4bd178,_0x10e09f['id'],_0x1e9d6a['solved']===I[_0x17ecc7(0x138)]);break;}}}));}};_=E([S(0x0,c[_0x274287(0x175)](b[_0x274287(0x132)])),S(0x1,c['Inject'](M[_0x274287(0x16c)])),S(0x2,c[_0x274287(0x175)](c[_0x274287(0x187)])),S(0x3,c['Inject'](c[_0x274287(0x136)]))],_);function _0xd467(_0x497f97,_0x8cfd32){_0x497f97=_0x497f97-0x128;const _0xeaeec1=_0xeaee();let _0xd46745=_0xeaeec1[_0x497f97];return _0xd46745;}const q=_0x274287(0x192),D={};var A=Object[_0x274287(0x195)],x=(_0x583926,_0x355bbe,_0x225e65,_0x1bcc45)=>{for(var _0x409e71=_0x1bcc45>0x1?void 0x0:_0x1bcc45?A(_0x355bbe,_0x225e65):_0x355bbe,_0x42a918=_0x583926['length']-0x1,_0x5463d8;_0x42a918>=0x0;_0x42a918--)(_0x5463d8=_0x583926[_0x42a918])&&(_0x409e71=_0x5463d8(_0x409e71)||_0x409e71);return _0x409e71;},C=(_0x26b331,_0xa550b0)=>(_0x492bdc,_0x9c84f1)=>_0xa550b0(_0x492bdc,_0x9c84f1,_0x26b331);function Y(_0x37e4eb,_0x38428c){const _0x305449=_0x274287,_0x3386cb=_0x37e4eb[_0x305449(0x168)][0x0];return{..._0x38428c,'id':_0x3386cb['replyId'],'resolved':_0x37e4eb[_0x305449(0x1a1)]===0x1,'dT':f(_0x3386cb[_0x305449(0x156)]),'personId':_0x3386cb['userId'],'threadId':_0x3386cb[_0x305449(0x198)]};}function G(_0x4e35e7,_0x29a2ce,_0x22231f){const _0x210aeb=_0x274287;var _0xe4d461,_0x340bb1;if(((_0x340bb1=(_0xe4d461=_0x4e35e7==null?void 0x0:_0x4e35e7['replies'])==null?void 0x0:_0xe4d461['length'])!=null?_0x340bb1:0x0)>0x0){const _0x265183=(_0x5f2c57,_0x12b822)=>({'id':_0x5f2c57[_0x210aeb(0x180)],'threadId':_0x5f2c57[_0x210aeb(0x198)],'dT':f(_0x5f2c57[_0x210aeb(0x156)]),'personId':_0x5f2c57[_0x210aeb(0x137)],'resolved':_0x4e35e7[_0x210aeb(0x1a1)]===I[_0x210aeb(0x138)],'unitId':_0x29a2ce,'subUnitId':_0x22231f,'text':JSON[_0x210aeb(0x166)](_0x5f2c57[_0x210aeb(0x17b)]),'parentId':_0x12b822}),_0x546dd7=_0x265183(_0x4e35e7[_0x210aeb(0x168)][0x0]);return{..._0x546dd7,'children':_0x4e35e7['replies'][_0x210aeb(0x17f)](0x1)[_0x210aeb(0x172)](_0x31fef6=>_0x265183(_0x31fef6,_0x546dd7['id']))};}return null;}let p=class{constructor(_0xf45fc2,_0x178035,_0x48b0cb){const _0x4cb3bb=_0x274287;this[_0x4cb3bb(0x17c)]=_0xf45fc2,this[_0x4cb3bb(0x154)]=_0x178035,this[_0x4cb3bb(0x169)]=_0x48b0cb;}async[_0x274287(0x16d)](_0x469aec){const _0x288db8=_0x274287;var _0x20328d,_0x2b5797;const {parentId:_0x51c329,unitId:_0x57404c,text:_0x47567c,threadId:_0x5d908a}=_0x469aec,_0xd68525=(_0x2b5797=(_0x20328d=_0x47567c['customRanges'])==null?void 0x0:_0x20328d[_0x288db8(0x15b)](_0x425f0e=>_0x425f0e[_0x288db8(0x14c)]===c[_0x288db8(0x189)][_0x288db8(0x170)])[_0x288db8(0x172)](_0x251b36=>_0x251b36[_0x288db8(0x13d)]))!=null?_0x2b5797:[],_0x23cc10=JSON[_0x288db8(0x130)](_0x47567c),_0x5eb28f=(await this[_0x288db8(0x169)][_0x288db8(0x17e)](_0x57404c))['getMemberID']();if(_0x51c329){const _0x53be89={'memberId':_0x5eb28f,'unitId':_0x57404c,'content':_0x23cc10,'mention':_0xd68525,'threadId':_0x5d908a},_0x43df04=(await this[_0x288db8(0x17c)]['post'](_0x288db8(0x1a4)+_0x57404c+'/reply',{'body':_0x53be89}))[_0x288db8(0x1a3)][_0x288db8(0x139)];return{..._0x469aec,'id':_0x43df04[_0x288db8(0x180)],'dT':c['dayjs'](+_0x43df04[_0x288db8(0x156)])[_0x288db8(0x19e)](_0x288db8(0x18b)),'personId':_0x43df04[_0x288db8(0x137)]};}else{const _0x289c41={'memberId':_0x5eb28f,'unitId':_0x57404c,'content':_0x23cc10,'mention':_0xd68525},_0x65654a=await this[_0x288db8(0x17c)][_0x288db8(0x171)](_0x288db8(0x1a4)+_0x57404c+_0x288db8(0x19a),{'body':_0x289c41});return Y(_0x65654a[_0x288db8(0x1a3)][_0x288db8(0x158)],_0x469aec);}}async[_0x274287(0x15e)](_0x5ba16b){const _0x33a455=_0x274287;var _0x3c8f54,_0x4dae9f;const {text:_0x1357b1,unitId:_0xfc1a94}=_0x5ba16b,_0x11fc97=(_0x4dae9f=(_0x3c8f54=_0x1357b1[_0x33a455(0x191)])==null?void 0x0:_0x3c8f54[_0x33a455(0x15b)](_0x548a90=>_0x548a90['rangeType']===c['CustomRangeType']['COMMENT'])['map'](_0x177cc1=>_0x177cc1['rangeId']))!=null?_0x4dae9f:[],_0x35c6f0=JSON[_0x33a455(0x130)](_0x1357b1),_0x20bef0=_0x5ba16b[_0x33a455(0x198)],_0x153195=_0x5ba16b['id'],_0x404ece={'memberId':(await this[_0x33a455(0x169)]['requireSession'](_0xfc1a94))[_0x33a455(0x14e)](),'unitId':_0xfc1a94,'threadId':_0x20bef0,'mention':_0x11fc97,'content':_0x35c6f0,'replyId':_0x153195},_0x5bd04c=await this[_0x33a455(0x17c)][_0x33a455(0x171)](_0x33a455(0x1a4)+_0xfc1a94+'/edit',{'body':_0x404ece});return!_0x5bd04c['body'][_0x33a455(0x148)]||_0x5bd04c[_0x33a455(0x1a3)]['error'][_0x33a455(0x14b)]===0x1;}async[_0x274287(0x178)](_0x5b53bd){const _0xf3613b=_0x274287,{unitId:_0x4c6001}=_0x5b53bd,_0x234050=_0x5b53bd['threadId'],_0x11e199={'memberId':this[_0xf3613b(0x154)][_0xf3613b(0x143)]()[_0xf3613b(0x1a0)],'unitId':_0x4c6001,'threadId':_0x234050,'solved':_0x5b53bd[_0xf3613b(0x199)]?I[_0xf3613b(0x138)]:I[_0xf3613b(0x128)]},_0x3a3019=await this['_httpService'][_0xf3613b(0x171)](_0xf3613b(0x1a4)+_0x4c6001+_0xf3613b(0x129),{'body':_0x11e199});return!_0x3a3019[_0xf3613b(0x1a3)][_0xf3613b(0x148)]||_0x3a3019['body']['error']['code']===0x1;}async[_0x274287(0x149)](_0x3190de,_0x927faa,_0xc0a39,_0x9b2e8f){const _0x3d4839=_0x274287,_0x5b238e={'memberId':(await this[_0x3d4839(0x169)][_0x3d4839(0x17e)](_0x3190de))[_0x3d4839(0x14e)](),'threadId':_0xc0a39,'replyId':_0x9b2e8f,'unitId':_0x3190de},_0x2b701a=await this[_0x3d4839(0x17c)]['post'](_0x3d4839(0x1a4)+_0x3190de+_0x3d4839(0x15a),{'body':_0x5b238e});return!_0x2b701a[_0x3d4839(0x1a3)][_0x3d4839(0x148)]||_0x2b701a['body'][_0x3d4839(0x148)][_0x3d4839(0x14b)]===0x1;}async[_0x274287(0x173)](_0x781257,_0x14e0c0,_0x9cc629){const _0x101c7c=_0x274287,_0x284dde={'unitId':_0x781257,'threadId':_0x9cc629},_0x5f4d25=await this[_0x101c7c(0x17c)]['post'](_0x101c7c(0x1a4)+_0x781257+_0x101c7c(0x147),{'body':_0x284dde}),_0x30f29f=_0x9cc629[_0x101c7c(0x172)](_0x5dd780=>G(_0x5f4d25[_0x101c7c(0x1a3)][_0x101c7c(0x161)][_0x5dd780],_0x781257,_0x14e0c0))[_0x101c7c(0x15b)](Boolean);return Object['values'](_0x5f4d25[_0x101c7c(0x1a3)]['users'])[_0x101c7c(0x17d)](_0x392b0c=>{const _0x53e0e2=_0x101c7c;this[_0x53e0e2(0x154)]['addUser'](_0x392b0c);}),_0x30f29f;}[_0x274287(0x164)](_0x24a4b5){const _0x2184b1=_0x274287;return{'id':_0x24a4b5['id'],'threadId':_0x24a4b5['threadId'],'ref':_0x24a4b5[_0x2184b1(0x19d)]};}};p=x([C(0x0,c[_0x274287(0x175)](P[_0x274287(0x19f)])),C(0x1,c[_0x274287(0x175)](c[_0x274287(0x187)])),C(0x2,c['Inject'](b[_0x274287(0x12f)]))],p);var H=Object[_0x274287(0x195)],J=(_0x3bf1f9,_0x53e17a,_0xddce64,_0x106a6f)=>{const _0x45ee46=_0x274287;for(var _0x5c9b1e=_0x106a6f>0x1?void 0x0:_0x106a6f?H(_0x53e17a,_0xddce64):_0x53e17a,_0xda565e=_0x3bf1f9[_0x45ee46(0x14f)]-0x1,_0x153435;_0xda565e>=0x0;_0xda565e--)(_0x153435=_0x3bf1f9[_0xda565e])&&(_0x5c9b1e=_0x153435(_0x5c9b1e)||_0x5c9b1e);return _0x5c9b1e;},y=(_0x5b6aa1,_0x5b55a8)=>(_0x17111b,_0x25e7e9)=>_0x5b55a8(_0x17111b,_0x25e7e9,_0x5b6aa1);let g=class extends c[_0x274287(0x174)]{constructor(_0x421e5b,_0xba85e6){const _0x54fb31=_0x274287;super(),this['_threadCommentDataSourceService']=_0x421e5b,this[_0x54fb31(0x18c)]=_0xba85e6,this[_0x54fb31(0x19b)]();}[_0x274287(0x19b)](){const _0x38532b=_0x274287;this[_0x38532b(0x160)][_0x38532b(0x15d)]=this[_0x38532b(0x18c)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x274287(0x13a)]),y(0x1,c[_0x274287(0x175)](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x70eeaa,_0x25f254,_0x5b1e4c)=>_0x25f254 in _0x70eeaa?F(_0x70eeaa,_0x25f254,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5b1e4c}):_0x70eeaa[_0x25f254]=_0x5b1e4c,W=(_0x195843,_0x1bf81c,_0x999d0,_0x1aee17)=>{for(var _0x4f9a01=_0x1aee17>0x1?void 0x0:_0x1aee17?L(_0x1bf81c,_0x999d0):_0x1bf81c,_0x4e5610=_0x195843['length']-0x1,_0x35dc7a;_0x4e5610>=0x0;_0x4e5610--)(_0x35dc7a=_0x195843[_0x4e5610])&&(_0x4f9a01=_0x35dc7a(_0x4f9a01)||_0x4f9a01);return _0x4f9a01;},O=(_0x27567c,_0x659204)=>(_0x2fcdeb,_0xd654d)=>_0x659204(_0x2fcdeb,_0xd654d,_0x27567c),N=(_0x1223bc,_0x158418,_0x32e59a)=>Z(_0x1223bc,typeof _0x158418!=_0x274287(0x150)?_0x158418+'':_0x158418,_0x32e59a);exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x11f4b9=D,_0x5e4fee,_0x10309c){const _0x41ce0f=_0x274287;super(),this[_0x41ce0f(0x183)]=_0x11f4b9,this[_0x41ce0f(0x133)]=_0x5e4fee,this[_0x41ce0f(0x12b)]=_0x10309c;const {..._0x90902c}=c['merge']({},D,this[_0x41ce0f(0x183)]);this[_0x41ce0f(0x12b)][_0x41ce0f(0x18d)](q,_0x90902c);}[_0x274287(0x19c)](){const _0x6042d5=_0x274287;[[p],[g],[_]][_0x6042d5(0x17d)](_0x52d06d=>{const _0x349f39=_0x6042d5;this[_0x349f39(0x133)][_0x349f39(0x142)](_0x52d06d);});}[_0x274287(0x152)](){const _0x5869cd=_0x274287;this['_injector'][_0x5869cd(0x157)](g),this[_0x5869cd(0x133)]['get'](_);}},N(exports[_0x274287(0x16e)],_0x274287(0x162),U),N(exports[_0x274287(0x16e)],'type',c[_0x274287(0x184)][_0x274287(0x196)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](w[_0x274287(0x16b)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x274287(0x175)](c[_0x274287(0x136)])),O(0x2,c['IConfigService'])],exports[_0x274287(0x16e)]);
|
|
1
|
+
'use strict';const _0x4485d0=_0x4af3;function _0x4af3(_0x2131ce,_0x4077c7){_0x2131ce=_0x2131ce-0x117;const _0x5b48c2=_0x5b48();let _0x4af311=_0x5b48c2[_0x2131ce];return _0x4af311;}(function(_0x496217,_0x5a4f77){const _0x10fcae=_0x4af3,_0x2b210a=_0x496217();while(!![]){try{const _0x2f9152=parseInt(_0x10fcae(0x139))/0x1*(-parseInt(_0x10fcae(0x177))/0x2)+parseInt(_0x10fcae(0x11e))/0x3*(parseInt(_0x10fcae(0x164))/0x4)+-parseInt(_0x10fcae(0x171))/0x5*(parseInt(_0x10fcae(0x135))/0x6)+-parseInt(_0x10fcae(0x189))/0x7+-parseInt(_0x10fcae(0x140))/0x8+parseInt(_0x10fcae(0x187))/0x9*(parseInt(_0x10fcae(0x183))/0xa)+parseInt(_0x10fcae(0x16a))/0xb;if(_0x2f9152===_0x5a4f77)break;else _0x2b210a['push'](_0x2b210a['shift']());}catch(_0x4dd295){_0x2b210a['push'](_0x2b210a['shift']());}}}(_0x5b48,0xacd1f));Object[_0x4485d0(0x11f)](exports,Symbol[_0x4485d0(0x13c)],{'value':_0x4485d0(0x160)});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=_0x4485d0(0x14f);var I=(_0x74d356=>(_0x74d356[_0x74d356['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x74d356[_0x74d356['Solved']=0x1]=_0x4485d0(0x145),_0x74d356[_0x74d356[_0x4485d0(0x120)]=-0x1]=_0x4485d0(0x120),_0x74d356))(I||{}),v=(_0x4bf3e9=>(_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x168)]=0x0]='Unknown',_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x180)]=0x1]=_0x4485d0(0x180),_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x165)]=0x2]='Reply',_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x166)]=0x3]=_0x4485d0(0x166),_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x138)]=0x4]='Delete',_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x127)]=0x5]=_0x4485d0(0x127),_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x120)]=-0x1]=_0x4485d0(0x120),_0x4bf3e9))(v||{});function _0x5b48(){const _0xe90e07=['UniverThreadCommentUIPlugin','commentUpdate$','onReady','Add','onStarting','addComment','344210ukPQRk','getUnit','_threadCommentModel','_configService','81dCbCiz','post','345450sNtNeW','UserManagerService','UniverThreadCommentDataSourcePlugin','resolved','find','requireSession','IConfigService','stringify','_commentService','/universer-api/comment/unit/','userId','CustomRangeType','UniverInstanceType','1362162YoMzth','defineProperty','UNRECOGNIZED','pluginName','users','Inject','pipe','/universer-api/user/list','UniverCollaborationClientPlugin','Solve','COMMENT','ThreadCommentModel','symbol','body','solved','deleteComment','format','map','addUser','/edit','/solved','resolveComment','_threadCommentDataSourceService','66aINZdD','replies','saveCommentToSnapshot','Delete','1YsLOFV','payload','listComments','toStringTag','CollaborationSessionService','root','_config','5458744hkECLn','user','comment','_injector','comments','Solved','createTimestamp','length','replyId','/add','UniverLicensePlugin','/reply','slice','HTTPService','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','CommentService','customRanges','_initDataSource','threadId','IThreadCommentDataSourceService','getMemberID','rangeId','_threadCommentDataSource','Plugin','forEach','Injector','getOwnPropertyDescriptor','type','get','subscribe','Module','reply','error','rangeType','4FdJHjS','Reply','Edit','dayjs','Unknown','content','12047772owvyfQ','personId','userID','_initUserSync','values','filter','disposeWithMe','127795Rqufpj','bufferTime','_init','_sessionService','parse','getComment','276764PePFWi','YYYY/MM/DD\x20HH:mm','code','_httpService','getCurrentUser','parentId'];_0x5b48=function(){return _0xe90e07;};return _0x5b48();}const f=_0x285897=>c[_0x4485d0(0x167)](new Date(+_0x285897))[_0x4485d0(0x12e)](_0x4485d0(0x178)),R=async(_0x455202,_0xc32e69)=>{const _0x26fb46=_0x4485d0,_0xb8a3e1=_0x455202[_0x26fb46(0x15e)](c[_0x26fb46(0x18a)]),_0x25fbd1=_0x455202[_0x26fb46(0x15e)](P['HTTPService']);_0xc32e69[_0x26fb46(0x15a)](_0x1362d8=>{_0xb8a3e1['getUser'](_0x1362d8)&&_0xc32e69['delete'](_0x1362d8);}),_0xc32e69['size']&&(await _0x25fbd1[_0x26fb46(0x15e)](_0x26fb46(0x125),{'params':{'userIDs':[..._0xc32e69]}}))['body'][_0x26fb46(0x122)][_0x26fb46(0x15a)](_0x1ad742=>{_0x1ad742&&_0xb8a3e1['addUser'](_0x1ad742);});};var $=Object[_0x4485d0(0x15c)],E=(_0x56bd90,_0x1aec70,_0x48937c,_0x1d63b2)=>{const _0x22d3ee=_0x4485d0;for(var _0x4f4243=_0x1d63b2>0x1?void 0x0:_0x1d63b2?$(_0x1aec70,_0x48937c):_0x1aec70,_0x580166=_0x56bd90[_0x22d3ee(0x147)]-0x1,_0x41bcc5;_0x580166>=0x0;_0x580166--)(_0x41bcc5=_0x56bd90[_0x580166])&&(_0x4f4243=_0x41bcc5(_0x4f4243)||_0x4f4243);return _0x4f4243;},S=(_0x1f1d55,_0x47715b)=>(_0x1a9e7a,_0x4531bf)=>_0x47715b(_0x1a9e7a,_0x4531bf,_0x1f1d55);let _=class extends c['Disposable']{constructor(_0x253a8e,_0x5f83ae,_0x4813ac,_0x263eef){const _0x4060a4=_0x4485d0;super(),this[_0x4060a4(0x119)]=_0x253a8e,this[_0x4060a4(0x185)]=_0x5f83ae,this[_0x4060a4(0x150)]=_0x4813ac,this[_0x4060a4(0x143)]=_0x263eef,this['_init'](),this[_0x4060a4(0x16d)]();}['_initUserSync'](){const _0x390a22=_0x4485d0;this[_0x390a22(0x170)](this[_0x390a22(0x185)][_0x390a22(0x17e)][_0x390a22(0x124)](j[_0x390a22(0x172)](0x10))[_0x390a22(0x15f)](_0x684686=>{const _0x5eed94=_0x390a22,_0x5c1464=new Set();_0x684686[_0x5eed94(0x15a)](_0x80e962=>{const _0x95113a=_0x5eed94;if(_0x80e962[_0x95113a(0x15d)]===_0x95113a(0x14e)){const _0x3fa10f=_0x80e962[_0x95113a(0x13a)][_0x95113a(0x16b)];_0x5c1464[_0x95113a(0x14e)](_0x3fa10f);}}),R(this[_0x5eed94(0x143)],_0x5c1464);}));}[_0x4485d0(0x173)](){const _0x32f2b7=_0x4485d0;this[_0x32f2b7(0x170)](this['_commentService'][_0x32f2b7(0x17e)]['subscribe'](async _0x3b5bb2=>{const _0x450d6b=_0x32f2b7;var _0x2a27d0,_0x4a7102,_0x4e09d5,_0xebbe91;const _0x403e16=(_0x2a27d0=this[_0x450d6b(0x185)][_0x450d6b(0x184)](_0x3b5bb2['unitId'])[_0x450d6b(0x18d)](_0x42ae57=>_0x42ae57['threadId']===_0x3b5bb2[_0x450d6b(0x154)]))==null?void 0x0:_0x2a27d0[_0x450d6b(0x13e)];if(!_0x403e16)return;const {unitId:_0x24959e,subUnitId:_0x32cc45}=_0x403e16;switch(_0x3b5bb2[_0x450d6b(0x141)]&&this['_userService'][_0x450d6b(0x130)](_0x3b5bb2[_0x450d6b(0x141)]),_0x3b5bb2[_0x450d6b(0x15d)]){case v[_0x450d6b(0x180)]:break;case v['Reply']:{this[_0x450d6b(0x185)][_0x450d6b(0x182)](_0x24959e,_0x32cc45,{'unitId':_0x24959e,'subUnitId':_0x32cc45,'ref':'','id':_0x3b5bb2[_0x450d6b(0x148)],'dT':f(+_0x3b5bb2[_0x450d6b(0x146)]),'threadId':_0x3b5bb2[_0x450d6b(0x154)],'personId':(_0x4e09d5=(_0x4a7102=_0x3b5bb2[_0x450d6b(0x141)])==null?void 0x0:_0x4a7102['userID'])!=null?_0x4e09d5:_0x3b5bb2[_0x450d6b(0x11b)],'text':JSON[_0x450d6b(0x175)](_0x3b5bb2[_0x450d6b(0x169)]),'parentId':_0x403e16['id']});break;}case v[_0x450d6b(0x138)]:{const _0x7a2373=this[_0x450d6b(0x185)][_0x450d6b(0x176)](_0x24959e,_0x32cc45,_0x3b5bb2['replyId']);_0x7a2373&&_0x7a2373[_0x450d6b(0x17c)]&&this[_0x450d6b(0x185)][_0x450d6b(0x12d)](_0x24959e,_0x32cc45,_0x3b5bb2[_0x450d6b(0x148)]);break;}case v[_0x450d6b(0x166)]:{this[_0x450d6b(0x185)]['updateComment'](_0x24959e,_0x32cc45,{'commentId':_0x3b5bb2[_0x450d6b(0x148)],'text':JSON[_0x450d6b(0x175)](_0x3b5bb2[_0x450d6b(0x169)])});break;}case v['Solve']:{const _0x241a2b=(_0xebbe91=this[_0x450d6b(0x185)][_0x450d6b(0x184)](_0x3b5bb2['unitId'])[_0x450d6b(0x18d)](_0x1f5eb2=>_0x1f5eb2['threadId']===_0x3b5bb2[_0x450d6b(0x154)]))==null?void 0x0:_0xebbe91[_0x450d6b(0x13e)];_0x241a2b&&this['_threadCommentModel'][_0x450d6b(0x133)](_0x24959e,_0x32cc45,_0x241a2b['id'],_0x3b5bb2['solved']===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x4485d0(0x123)](b[_0x4485d0(0x151)])),S(0x1,c[_0x4485d0(0x123)](M[_0x4485d0(0x129)])),S(0x2,c[_0x4485d0(0x123)](c[_0x4485d0(0x18a)])),S(0x3,c[_0x4485d0(0x123)](c[_0x4485d0(0x15b)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x4485d0(0x15c)],x=(_0x3f83ed,_0x89d256,_0x2c7370,_0x96cfed)=>{const _0x5e2b09=_0x4485d0;for(var _0x5eb9eb=_0x96cfed>0x1?void 0x0:_0x96cfed?A(_0x89d256,_0x2c7370):_0x89d256,_0x5ef3cc=_0x3f83ed[_0x5e2b09(0x147)]-0x1,_0x370b60;_0x5ef3cc>=0x0;_0x5ef3cc--)(_0x370b60=_0x3f83ed[_0x5ef3cc])&&(_0x5eb9eb=_0x370b60(_0x5eb9eb)||_0x5eb9eb);return _0x5eb9eb;},C=(_0x103dd1,_0x10df01)=>(_0x227640,_0x186514)=>_0x10df01(_0x227640,_0x186514,_0x103dd1);function Y(_0x3bf569,_0xc28e10){const _0x20db1a=_0x4485d0,_0x25a38f=_0x3bf569[_0x20db1a(0x136)][0x0];return{..._0xc28e10,'id':_0x25a38f[_0x20db1a(0x148)],'resolved':_0x3bf569[_0x20db1a(0x12c)]===0x1,'dT':f(_0x25a38f[_0x20db1a(0x146)]),'personId':_0x25a38f[_0x20db1a(0x11b)],'threadId':_0x25a38f[_0x20db1a(0x154)]};}function G(_0x405378,_0x3dc330,_0x1ac440){const _0x31163a=_0x4485d0;var _0xa066e7,_0x46d2e5;if(((_0x46d2e5=(_0xa066e7=_0x405378==null?void 0x0:_0x405378['replies'])==null?void 0x0:_0xa066e7[_0x31163a(0x147)])!=null?_0x46d2e5:0x0)>0x0){const _0x356c56=(_0x1e49f0,_0x20d8d1)=>({'id':_0x1e49f0[_0x31163a(0x148)],'threadId':_0x1e49f0[_0x31163a(0x154)],'dT':f(_0x1e49f0[_0x31163a(0x146)]),'personId':_0x1e49f0['userId'],'resolved':_0x405378[_0x31163a(0x12c)]===I[_0x31163a(0x145)],'unitId':_0x3dc330,'subUnitId':_0x1ac440,'text':JSON[_0x31163a(0x175)](_0x1e49f0[_0x31163a(0x169)]),'parentId':_0x20d8d1}),_0x32b92d=_0x356c56(_0x405378['replies'][0x0]);return{..._0x32b92d,'children':_0x405378[_0x31163a(0x136)][_0x31163a(0x14c)](0x1)[_0x31163a(0x12f)](_0x470e50=>_0x356c56(_0x470e50,_0x32b92d['id']))};}return null;}let p=class{constructor(_0x3119c7,_0x2f3c74,_0x2d7c36){const _0x3a40b6=_0x4485d0;this[_0x3a40b6(0x17a)]=_0x3119c7,this['_userService']=_0x2f3c74,this[_0x3a40b6(0x174)]=_0x2d7c36;}async['addComment'](_0x19030c){const _0x2e074c=_0x4485d0;var _0x3dd260,_0x157e14;const {parentId:_0x42c4c5,unitId:_0x417165,text:_0x330a9b,threadId:_0x9306a7}=_0x19030c,_0x462c83=(_0x157e14=(_0x3dd260=_0x330a9b['customRanges'])==null?void 0x0:_0x3dd260['filter'](_0x332c39=>_0x332c39['rangeType']===c[_0x2e074c(0x11c)][_0x2e074c(0x128)])[_0x2e074c(0x12f)](_0x113a8d=>_0x113a8d[_0x2e074c(0x157)]))!=null?_0x157e14:[],_0xeac8b5=JSON[_0x2e074c(0x118)](_0x330a9b),_0x99bcbe=(await this[_0x2e074c(0x174)]['requireSession'](_0x417165))['getMemberID']();if(_0x42c4c5){const _0x280276={'memberId':_0x99bcbe,'unitId':_0x417165,'content':_0xeac8b5,'mention':_0x462c83,'threadId':_0x9306a7},_0x7ff0ef=(await this[_0x2e074c(0x17a)][_0x2e074c(0x188)](_0x2e074c(0x11a)+_0x417165+_0x2e074c(0x14b),{'body':_0x280276}))[_0x2e074c(0x12b)][_0x2e074c(0x161)];return{..._0x19030c,'id':_0x7ff0ef[_0x2e074c(0x148)],'dT':c['dayjs'](+_0x7ff0ef[_0x2e074c(0x146)])[_0x2e074c(0x12e)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x7ff0ef[_0x2e074c(0x11b)]};}else{const _0xe0ab31={'memberId':_0x99bcbe,'unitId':_0x417165,'content':_0xeac8b5,'mention':_0x462c83},_0x34e720=await this[_0x2e074c(0x17a)][_0x2e074c(0x188)]('/universer-api/comment/unit/'+_0x417165+_0x2e074c(0x149),{'body':_0xe0ab31});return Y(_0x34e720[_0x2e074c(0x12b)][_0x2e074c(0x142)],_0x19030c);}}async['updateComment'](_0x58d7d5){const _0x52c1a7=_0x4485d0;var _0x258127,_0x1dcecf;const {text:_0x4d198d,unitId:_0x1847ed}=_0x58d7d5,_0x579b6c=(_0x1dcecf=(_0x258127=_0x4d198d[_0x52c1a7(0x152)])==null?void 0x0:_0x258127[_0x52c1a7(0x16f)](_0x4f7132=>_0x4f7132[_0x52c1a7(0x163)]===c[_0x52c1a7(0x11c)][_0x52c1a7(0x128)])[_0x52c1a7(0x12f)](_0x974ce0=>_0x974ce0[_0x52c1a7(0x157)]))!=null?_0x1dcecf:[],_0x342f64=JSON[_0x52c1a7(0x118)](_0x4d198d),_0x1a472e=_0x58d7d5[_0x52c1a7(0x154)],_0x4f2624=_0x58d7d5['id'],_0x4cdfba={'memberId':(await this[_0x52c1a7(0x174)][_0x52c1a7(0x18e)](_0x1847ed))[_0x52c1a7(0x156)](),'unitId':_0x1847ed,'threadId':_0x1a472e,'mention':_0x579b6c,'content':_0x342f64,'replyId':_0x4f2624},_0x3197cd=await this[_0x52c1a7(0x17a)]['post'](_0x52c1a7(0x11a)+_0x1847ed+_0x52c1a7(0x131),{'body':_0x4cdfba});return!_0x3197cd[_0x52c1a7(0x12b)][_0x52c1a7(0x162)]||_0x3197cd[_0x52c1a7(0x12b)][_0x52c1a7(0x162)][_0x52c1a7(0x179)]===0x1;}async['resolveComment'](_0x5eb72f){const _0x5a0562=_0x4485d0,{unitId:_0x4288e9}=_0x5eb72f,_0x11c57f=_0x5eb72f[_0x5a0562(0x154)],_0x4af4e4={'memberId':this[_0x5a0562(0x150)][_0x5a0562(0x17b)]()[_0x5a0562(0x16c)],'unitId':_0x4288e9,'threadId':_0x11c57f,'solved':_0x5eb72f[_0x5a0562(0x18c)]?I[_0x5a0562(0x145)]:I['OpenOrReOpen']},_0x48b55e=await this[_0x5a0562(0x17a)][_0x5a0562(0x188)](_0x5a0562(0x11a)+_0x4288e9+_0x5a0562(0x132),{'body':_0x4af4e4});return!_0x48b55e[_0x5a0562(0x12b)][_0x5a0562(0x162)]||_0x48b55e[_0x5a0562(0x12b)][_0x5a0562(0x162)][_0x5a0562(0x179)]===0x1;}async[_0x4485d0(0x12d)](_0x608403,_0x7bc88c,_0x3f5ea1,_0x540086){const _0x5f581d=_0x4485d0,_0x3a8583={'memberId':(await this[_0x5f581d(0x174)][_0x5f581d(0x18e)](_0x608403))[_0x5f581d(0x156)](),'threadId':_0x3f5ea1,'replyId':_0x540086,'unitId':_0x608403},_0x511e5f=await this[_0x5f581d(0x17a)][_0x5f581d(0x188)]('/universer-api/comment/unit/'+_0x608403+'/delete',{'body':_0x3a8583});return!_0x511e5f['body'][_0x5f581d(0x162)]||_0x511e5f[_0x5f581d(0x12b)][_0x5f581d(0x162)][_0x5f581d(0x179)]===0x1;}async[_0x4485d0(0x13b)](_0x28fb89,_0x52aca7,_0x356263){const _0x19a231=_0x4485d0,_0x7f055c={'unitId':_0x28fb89,'threadId':_0x356263},_0x2fca40=await this[_0x19a231(0x17a)][_0x19a231(0x188)]('/universer-api/comment/unit/'+_0x28fb89+'/list',{'body':_0x7f055c}),_0x5c942b=_0x356263['map'](_0x1e0c4d=>G(_0x2fca40[_0x19a231(0x12b)][_0x19a231(0x144)][_0x1e0c4d],_0x28fb89,_0x52aca7))[_0x19a231(0x16f)](Boolean);return Object[_0x19a231(0x16e)](_0x2fca40[_0x19a231(0x12b)][_0x19a231(0x122)])[_0x19a231(0x15a)](_0x542868=>{const _0x45b658=_0x19a231;this['_userService'][_0x45b658(0x130)](_0x542868);}),_0x5c942b;}[_0x4485d0(0x137)](_0x1b7fc3){return{'id':_0x1b7fc3['id'],'threadId':_0x1b7fc3['threadId'],'ref':_0x1b7fc3['ref']};}};p=x([C(0x0,c['Inject'](P[_0x4485d0(0x14d)])),C(0x1,c['Inject'](c[_0x4485d0(0x18a)])),C(0x2,c[_0x4485d0(0x123)](b[_0x4485d0(0x13d)]))],p);var H=Object[_0x4485d0(0x15c)],J=(_0x21ffda,_0x3e7c90,_0x3b99ad,_0xcded46)=>{for(var _0x5de86d=_0xcded46>0x1?void 0x0:_0xcded46?H(_0x3e7c90,_0x3b99ad):_0x3e7c90,_0x571e3f=_0x21ffda['length']-0x1,_0x2eba8a;_0x571e3f>=0x0;_0x571e3f--)(_0x2eba8a=_0x21ffda[_0x571e3f])&&(_0x5de86d=_0x2eba8a(_0x5de86d)||_0x5de86d);return _0x5de86d;},y=(_0x3aaab7,_0x2fdb74)=>(_0x129747,_0x789f8d)=>_0x2fdb74(_0x129747,_0x789f8d,_0x3aaab7);let g=class extends c['Disposable']{constructor(_0x25c56b,_0x2fbc4d){const _0x224ed8=_0x4485d0;super(),this['_threadCommentDataSourceService']=_0x25c56b,this['_threadCommentDataSource']=_0x2fbc4d,this[_0x224ed8(0x153)]();}['_initDataSource'](){const _0xed1f4c=_0x4485d0;this[_0xed1f4c(0x134)]['dataSource']=this[_0xed1f4c(0x158)],this[_0xed1f4c(0x134)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4485d0(0x155)]),y(0x1,c['Inject'](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x2ea3cc,_0x5ef46d,_0x2b169c)=>_0x5ef46d in _0x2ea3cc?F(_0x2ea3cc,_0x5ef46d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2b169c}):_0x2ea3cc[_0x5ef46d]=_0x2b169c,W=(_0x5854c2,_0x1392be,_0x1b9687,_0x1ddbfc)=>{for(var _0x5133af=_0x1ddbfc>0x1?void 0x0:_0x1ddbfc?L(_0x1392be,_0x1b9687):_0x1392be,_0x1e77ba=_0x5854c2['length']-0x1,_0x32f5e5;_0x1e77ba>=0x0;_0x1e77ba--)(_0x32f5e5=_0x5854c2[_0x1e77ba])&&(_0x5133af=_0x32f5e5(_0x5133af)||_0x5133af);return _0x5133af;},O=(_0x4587ec,_0x4b6fbe)=>(_0x514f5a,_0x463206)=>_0x4b6fbe(_0x514f5a,_0x463206,_0x4587ec),N=(_0x5e7846,_0x465ab6,_0xf299ba)=>Z(_0x5e7846,typeof _0x465ab6!=_0x4485d0(0x12a)?_0x465ab6+'':_0x465ab6,_0xf299ba);exports[_0x4485d0(0x18b)]=class extends c[_0x4485d0(0x159)]{constructor(_0x18b9e3=D,_0x3934f7,_0xc2f1a6){const _0xb270cb=_0x4485d0;super(),this[_0xb270cb(0x13f)]=_0x18b9e3,this[_0xb270cb(0x143)]=_0x3934f7,this['_configService']=_0xc2f1a6;const {..._0x4d1d56}=c['merge']({},D,this['_config']);this[_0xb270cb(0x186)]['setConfig'](q,_0x4d1d56);}[_0x4485d0(0x181)](){const _0x39c08b=_0x4485d0;[[p],[g],[_]][_0x39c08b(0x15a)](_0x1a4202=>{const _0x45c622=_0x39c08b;this['_injector'][_0x45c622(0x14e)](_0x1a4202);});}[_0x4485d0(0x17f)](){const _0x48d98e=_0x4485d0;this['_injector']['get'](g),this[_0x48d98e(0x143)]['get'](_);}},N(exports[_0x4485d0(0x18b)],_0x4485d0(0x121),U),N(exports[_0x4485d0(0x18b)],_0x4485d0(0x15d),c[_0x4485d0(0x11d)]['UNIVER_UNKNOWN']),exports[_0x4485d0(0x18b)]=W([c['DependentOn'](w[_0x4485d0(0x17d)],b[_0x4485d0(0x126)],T[_0x4485d0(0x14a)]),O(0x1,c[_0x4485d0(0x123)](c[_0x4485d0(0x15b)])),O(0x2,c[_0x4485d0(0x117)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xa7205c=_0x46db;(function(_0x54d2e5,_0x4bfef5){const _0x21a789=_0x46db,_0x525a98=_0x54d2e5();while(!![]){try{const _0x3f2e73=-parseInt(_0x21a789(0x101))/0x1*(-parseInt(_0x21a789(0x142))/0x2)+parseInt(_0x21a789(0x144))/0x3+-parseInt(_0x21a789(0x10f))/0x4*(parseInt(_0x21a789(0x114))/0x5)+-parseInt(_0x21a789(0x139))/0x6*(parseInt(_0x21a789(0x109))/0x7)+-parseInt(_0x21a789(0xe7))/0x8*(-parseInt(_0x21a789(0x103))/0x9)+-parseInt(_0x21a789(0x14b))/0xa+-parseInt(_0x21a789(0xfb))/0xb*(-parseInt(_0x21a789(0x128))/0xc);if(_0x3f2e73===_0x4bfef5)break;else _0x525a98['push'](_0x525a98['shift']());}catch(_0x5d551e){_0x525a98['push'](_0x525a98['shift']());}}}(_0x41e7,0xaafa2));function _0x41e7(){const _0x43693c=['resolveComment','2246944bgWBir','rangeType','Solved','getOwnPropertyDescriptor','_injector','saveCommentToSnapshot','154404cJPkHj','OpenOrReOpen','subscribe','Delete','type','65nwuQSa','/delete','/universer-api/user/list','addComment','forEach','_sessionService','size','replyId','disposeWithMe','content','UNIVER_UNKNOWN','reply','code','/universer-api/comment/unit/','body','syncUpdateMutationToColla','createTimestamp','_threadCommentModel','userID','ref','11484828KMeGZi','getCurrentUser','comment','resolved','solved','/solved','Edit','post','COMMENT','map','find','/reply','getUser','parse','_configService','format','_threadCommentDataSource','24hGciXf','Solve','add','Unknown','stringify','onStarting','rangeId','replies','_init','6NxlRZA','dataSource','2157216dTtKTS','users','root','personId','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','filter','9477760ousEXe','customRanges','_initDataSource','updateComment','438928XTZpcj','_httpService','_userService','Add','unitId','length','getMemberID','_threadCommentDataSourceService','get','listComments','threadId','pluginName','getUnit','values','Reply','requireSession','getComment','_initUserSync','_commentService','slice','22YabrTj','user','userId','parentId','defineProperty','error','29137cNygfj','/list','117bAxHOw','pipe','deleteComment','addUser','payload'];_0x41e7=function(){return _0x43693c;};return _0x41e7();}import{CommentService as _0x15e370,CollaborationSessionService as _0x3318dd,UniverCollaborationClientPlugin as _0x2c98f7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x52f3b9}from'@univerjs-pro/license';import{dayjs as _0x4da51b,UserManagerService as _0x18abd9,Inject as _0x28a1f8,Injector as _0x54d40d,Disposable as _0x356b4e,CustomRangeType as _0x5db075,UniverInstanceType as _0x1945c7,DependentOn as _0x20ab80,IConfigService as _0x476b8d,Plugin as _0x88c673,merge as _0x403e38}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x798c6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2f4ecd,IThreadCommentDataSourceService as _0x450486}from'@univerjs/thread-comment';import{bufferTime as _0x19a41c}from'rxjs';import{HTTPService as _0x25424b}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1ca600=>(_0x1ca600[_0x1ca600['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x1ca600[_0x1ca600['Solved']=0x1]=_0xa7205c(0x10b),_0x1ca600[_0x1ca600[_0xa7205c(0x149)]=-0x1]=_0xa7205c(0x149),_0x1ca600))(I||{}),v=(_0x154422=>(_0x154422[_0x154422[_0xa7205c(0x13c)]=0x0]=_0xa7205c(0x13c),_0x154422[_0x154422[_0xa7205c(0xea)]=0x1]=_0xa7205c(0xea),_0x154422[_0x154422[_0xa7205c(0xf5)]=0x2]=_0xa7205c(0xf5),_0x154422[_0x154422[_0xa7205c(0x12e)]=0x3]=_0xa7205c(0x12e),_0x154422[_0x154422[_0xa7205c(0x112)]=0x4]=_0xa7205c(0x112),_0x154422[_0x154422[_0xa7205c(0x13a)]=0x5]='Solve',_0x154422[_0x154422[_0xa7205c(0x149)]=-0x1]=_0xa7205c(0x149),_0x154422))(v||{});const y=_0x3c251d=>_0x4da51b(new Date(+_0x3c251d))[_0xa7205c(0x137)](_0xa7205c(0x148)),B=async(_0x57d345,_0x16b1bb)=>{const _0x3c0404=_0xa7205c,_0x16d0d0=_0x57d345[_0x3c0404(0xef)](_0x18abd9),_0xe60297=_0x57d345[_0x3c0404(0xef)](_0x25424b);_0x16b1bb['forEach'](_0x264763=>{const _0x5945dc=_0x3c0404;_0x16d0d0[_0x5945dc(0x134)](_0x264763)&&_0x16b1bb['delete'](_0x264763);}),_0x16b1bb[_0x3c0404(0x11a)]&&(await _0xe60297[_0x3c0404(0xef)](_0x3c0404(0x116),{'params':{'userIDs':[..._0x16b1bb]}}))[_0x3c0404(0x122)]['users']['forEach'](_0x532d39=>{const _0x2c9b97=_0x3c0404;_0x532d39&&_0x16d0d0[_0x2c9b97(0x106)](_0x532d39);});};var K=Object[_0xa7205c(0x10c)],V=(_0x269718,_0x389a47,_0x27c4ca,_0x18011d)=>{const _0x2fb400=_0xa7205c;for(var _0x1a9484=_0x18011d>0x1?void 0x0:_0x18011d?K(_0x389a47,_0x27c4ca):_0x389a47,_0x518bc1=_0x269718[_0x2fb400(0xec)]-0x1,_0x20df37;_0x518bc1>=0x0;_0x518bc1--)(_0x20df37=_0x269718[_0x518bc1])&&(_0x1a9484=_0x20df37(_0x1a9484)||_0x1a9484);return _0x1a9484;},p=(_0x1854b0,_0x2ebcff)=>(_0x435eef,_0x373a06)=>_0x2ebcff(_0x435eef,_0x373a06,_0x1854b0);let _=class extends _0x356b4e{constructor(_0xad650c,_0x4327eb,_0x4b9f95,_0x5a3d1f){const _0xc992eb=_0xa7205c;super(),this[_0xc992eb(0xf9)]=_0xad650c,this[_0xc992eb(0x125)]=_0x4327eb,this['_userService']=_0x4b9f95,this[_0xc992eb(0x10d)]=_0x5a3d1f,this[_0xc992eb(0x141)](),this[_0xc992eb(0xf8)]();}[_0xa7205c(0xf8)](){const _0x584d40=_0xa7205c;this[_0x584d40(0x11c)](this[_0x584d40(0x125)]['commentUpdate$'][_0x584d40(0x104)](_0x19a41c(0x10))[_0x584d40(0x111)](_0x282326=>{const _0x761c5f=_0x584d40,_0x52c0b3=new Set();_0x282326[_0x761c5f(0x118)](_0xaa989f=>{const _0xf617c4=_0x761c5f;if(_0xaa989f[_0xf617c4(0x113)]===_0xf617c4(0x13b)){const _0x3b9b0e=_0xaa989f[_0xf617c4(0x107)][_0xf617c4(0x147)];_0x52c0b3[_0xf617c4(0x13b)](_0x3b9b0e);}}),B(this[_0x761c5f(0x10d)],_0x52c0b3);}));}[_0xa7205c(0x141)](){const _0x1ed4fd=_0xa7205c;this[_0x1ed4fd(0x11c)](this[_0x1ed4fd(0xf9)]['commentUpdate$'][_0x1ed4fd(0x111)](async _0x181340=>{const _0xc13be1=_0x1ed4fd;var _0x449eca,_0x1df1df,_0x478c1e,_0x560d03;const _0x400dea=(_0x449eca=this[_0xc13be1(0x125)][_0xc13be1(0xf3)](_0x181340[_0xc13be1(0xeb)])[_0xc13be1(0x132)](_0x1ce48=>_0x1ce48[_0xc13be1(0xf1)]===_0x181340[_0xc13be1(0xf1)]))==null?void 0x0:_0x449eca[_0xc13be1(0x146)];if(!_0x400dea)return;const {unitId:_0x310b82,subUnitId:_0x272fbd}=_0x400dea;switch(_0x181340['user']&&this[_0xc13be1(0xe9)][_0xc13be1(0x106)](_0x181340[_0xc13be1(0xfc)]),_0x181340[_0xc13be1(0x113)]){case v[_0xc13be1(0xea)]:break;case v[_0xc13be1(0xf5)]:{this[_0xc13be1(0x125)][_0xc13be1(0x117)](_0x310b82,_0x272fbd,{'unitId':_0x310b82,'subUnitId':_0x272fbd,'ref':'','id':_0x181340[_0xc13be1(0x11b)],'dT':y(+_0x181340['createTimestamp']),'threadId':_0x181340[_0xc13be1(0xf1)],'personId':(_0x478c1e=(_0x1df1df=_0x181340[_0xc13be1(0xfc)])==null?void 0x0:_0x1df1df[_0xc13be1(0x126)])!=null?_0x478c1e:_0x181340[_0xc13be1(0xfd)],'text':JSON[_0xc13be1(0x135)](_0x181340[_0xc13be1(0x11d)]),'parentId':_0x400dea['id']});break;}case v[_0xc13be1(0x112)]:{const _0x4e5aca=this[_0xc13be1(0x125)][_0xc13be1(0xf7)](_0x310b82,_0x272fbd,_0x181340[_0xc13be1(0x11b)]);_0x4e5aca&&_0x4e5aca[_0xc13be1(0xfe)]&&this[_0xc13be1(0x125)][_0xc13be1(0x105)](_0x310b82,_0x272fbd,_0x181340[_0xc13be1(0x11b)]);break;}case v[_0xc13be1(0x12e)]:{this[_0xc13be1(0x125)][_0xc13be1(0xe6)](_0x310b82,_0x272fbd,{'commentId':_0x181340[_0xc13be1(0x11b)],'text':JSON[_0xc13be1(0x135)](_0x181340[_0xc13be1(0x11d)])});break;}case v['Solve']:{const _0x3da7b6=(_0x560d03=this[_0xc13be1(0x125)][_0xc13be1(0xf3)](_0x181340[_0xc13be1(0xeb)])[_0xc13be1(0x132)](_0x424f00=>_0x424f00[_0xc13be1(0xf1)]===_0x181340[_0xc13be1(0xf1)]))==null?void 0x0:_0x560d03[_0xc13be1(0x146)];_0x3da7b6&&this[_0xc13be1(0x125)][_0xc13be1(0x108)](_0x310b82,_0x272fbd,_0x3da7b6['id'],_0x181340[_0xc13be1(0x12c)]===I[_0xc13be1(0x10b)]);break;}}}));}};_=V([p(0x0,_0x28a1f8(_0x15e370)),p(0x1,_0x28a1f8(_0x2f4ecd)),p(0x2,_0x28a1f8(_0x18abd9)),p(0x3,_0x28a1f8(_0x54d40d))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0xa7205c(0x10c)],Q=(_0x161695,_0x575575,_0x143ddf,_0x47172c)=>{const _0x39bac8=_0xa7205c;for(var _0x52dfd9=_0x47172c>0x1?void 0x0:_0x47172c?k(_0x575575,_0x143ddf):_0x575575,_0x3fef4a=_0x161695[_0x39bac8(0xec)]-0x1,_0x195f0d;_0x3fef4a>=0x0;_0x3fef4a--)(_0x195f0d=_0x161695[_0x3fef4a])&&(_0x52dfd9=_0x195f0d(_0x52dfd9)||_0x52dfd9);return _0x52dfd9;},b=(_0x71ed32,_0x44ec58)=>(_0x1ce371,_0x5ab356)=>_0x44ec58(_0x1ce371,_0x5ab356,_0x71ed32);function X(_0x332df4,_0x34216b){const _0x540151=_0xa7205c,_0x414cc7=_0x332df4[_0x540151(0x140)][0x0];return{..._0x34216b,'id':_0x414cc7[_0x540151(0x11b)],'resolved':_0x332df4[_0x540151(0x12c)]===0x1,'dT':y(_0x414cc7['createTimestamp']),'personId':_0x414cc7[_0x540151(0xfd)],'threadId':_0x414cc7[_0x540151(0xf1)]};}function ee(_0xa2d2c,_0x1806a9,_0x4b037){const _0x43fe8c=_0xa7205c;var _0x263503,_0x12748d;if(((_0x12748d=(_0x263503=_0xa2d2c==null?void 0x0:_0xa2d2c['replies'])==null?void 0x0:_0x263503[_0x43fe8c(0xec)])!=null?_0x12748d:0x0)>0x0){const _0x2a3e6d=(_0x59d83e,_0x27b302)=>({'id':_0x59d83e[_0x43fe8c(0x11b)],'threadId':_0x59d83e[_0x43fe8c(0xf1)],'dT':y(_0x59d83e[_0x43fe8c(0x124)]),'personId':_0x59d83e[_0x43fe8c(0xfd)],'resolved':_0xa2d2c[_0x43fe8c(0x12c)]===I[_0x43fe8c(0x10b)],'unitId':_0x1806a9,'subUnitId':_0x4b037,'text':JSON[_0x43fe8c(0x135)](_0x59d83e[_0x43fe8c(0x11d)]),'parentId':_0x27b302}),_0x52f67a=_0x2a3e6d(_0xa2d2c['replies'][0x0]);return{..._0x52f67a,'children':_0xa2d2c[_0x43fe8c(0x140)][_0x43fe8c(0xfa)](0x1)['map'](_0x4f4c0c=>_0x2a3e6d(_0x4f4c0c,_0x52f67a['id']))};}return null;}let S=class{constructor(_0x4387f3,_0x2f38c2,_0x5b4617){const _0x1b6ef5=_0xa7205c;this[_0x1b6ef5(0xe8)]=_0x4387f3,this[_0x1b6ef5(0xe9)]=_0x2f38c2,this[_0x1b6ef5(0x119)]=_0x5b4617;}async[_0xa7205c(0x117)](_0x6256c5){const _0x59ef37=_0xa7205c;var _0x38a59a,_0x2397b2;const {parentId:_0x30f50c,unitId:_0x2ad071,text:_0x3e1fd1,threadId:_0x39f2a5}=_0x6256c5,_0x348c74=(_0x2397b2=(_0x38a59a=_0x3e1fd1[_0x59ef37(0x14c)])==null?void 0x0:_0x38a59a['filter'](_0x2de910=>_0x2de910['rangeType']===_0x5db075[_0x59ef37(0x130)])['map'](_0x4460c6=>_0x4460c6[_0x59ef37(0x13f)]))!=null?_0x2397b2:[],_0x29224a=JSON[_0x59ef37(0x13d)](_0x3e1fd1),_0x2cf497=(await this[_0x59ef37(0x119)]['requireSession'](_0x2ad071))['getMemberID']();if(_0x30f50c){const _0x1e73e5={'memberId':_0x2cf497,'unitId':_0x2ad071,'content':_0x29224a,'mention':_0x348c74,'threadId':_0x39f2a5},_0xa9c426=(await this[_0x59ef37(0xe8)][_0x59ef37(0x12f)](_0x59ef37(0x121)+_0x2ad071+_0x59ef37(0x133),{'body':_0x1e73e5}))[_0x59ef37(0x122)][_0x59ef37(0x11f)];return{..._0x6256c5,'id':_0xa9c426['replyId'],'dT':_0x4da51b(+_0xa9c426[_0x59ef37(0x124)])[_0x59ef37(0x137)](_0x59ef37(0x148)),'personId':_0xa9c426['userId']};}else{const _0x1abd44={'memberId':_0x2cf497,'unitId':_0x2ad071,'content':_0x29224a,'mention':_0x348c74},_0x325d5a=await this[_0x59ef37(0xe8)][_0x59ef37(0x12f)]('/universer-api/comment/unit/'+_0x2ad071+'/add',{'body':_0x1abd44});return X(_0x325d5a[_0x59ef37(0x122)][_0x59ef37(0x12a)],_0x6256c5);}}async[_0xa7205c(0xe6)](_0x5d8413){const _0x3aa1c1=_0xa7205c;var _0x534e59,_0x180c52;const {text:_0x2de538,unitId:_0x52fb6a}=_0x5d8413,_0x3ef212=(_0x180c52=(_0x534e59=_0x2de538[_0x3aa1c1(0x14c)])==null?void 0x0:_0x534e59[_0x3aa1c1(0x14a)](_0x4abf8c=>_0x4abf8c[_0x3aa1c1(0x10a)]===_0x5db075[_0x3aa1c1(0x130)])[_0x3aa1c1(0x131)](_0x2eb69b=>_0x2eb69b[_0x3aa1c1(0x13f)]))!=null?_0x180c52:[],_0x3d4ca1=JSON[_0x3aa1c1(0x13d)](_0x2de538),_0x5df793=_0x5d8413[_0x3aa1c1(0xf1)],_0x12794f=_0x5d8413['id'],_0x3cf19e={'memberId':(await this['_sessionService'][_0x3aa1c1(0xf6)](_0x52fb6a))[_0x3aa1c1(0xed)](),'unitId':_0x52fb6a,'threadId':_0x5df793,'mention':_0x3ef212,'content':_0x3d4ca1,'replyId':_0x12794f},_0x22bdd7=await this['_httpService'][_0x3aa1c1(0x12f)]('/universer-api/comment/unit/'+_0x52fb6a+'/edit',{'body':_0x3cf19e});return!_0x22bdd7[_0x3aa1c1(0x122)][_0x3aa1c1(0x100)]||_0x22bdd7[_0x3aa1c1(0x122)][_0x3aa1c1(0x100)][_0x3aa1c1(0x120)]===0x1;}async[_0xa7205c(0x108)](_0xb09c76){const _0x12dfb0=_0xa7205c,{unitId:_0x460328}=_0xb09c76,_0x14e324=_0xb09c76[_0x12dfb0(0xf1)],_0x50c6c1={'memberId':this[_0x12dfb0(0xe9)][_0x12dfb0(0x129)]()[_0x12dfb0(0x126)],'unitId':_0x460328,'threadId':_0x14e324,'solved':_0xb09c76[_0x12dfb0(0x12b)]?I[_0x12dfb0(0x10b)]:I[_0x12dfb0(0x110)]},_0xa12614=await this[_0x12dfb0(0xe8)][_0x12dfb0(0x12f)](_0x12dfb0(0x121)+_0x460328+_0x12dfb0(0x12d),{'body':_0x50c6c1});return!_0xa12614[_0x12dfb0(0x122)]['error']||_0xa12614['body']['error'][_0x12dfb0(0x120)]===0x1;}async[_0xa7205c(0x105)](_0x28ddbd,_0x8fcfbe,_0x237c42,_0x2fb808){const _0xd06161=_0xa7205c,_0x5bed67={'memberId':(await this[_0xd06161(0x119)][_0xd06161(0xf6)](_0x28ddbd))[_0xd06161(0xed)](),'threadId':_0x237c42,'replyId':_0x2fb808,'unitId':_0x28ddbd},_0x40d8c5=await this[_0xd06161(0xe8)]['post'](_0xd06161(0x121)+_0x28ddbd+_0xd06161(0x115),{'body':_0x5bed67});return!_0x40d8c5[_0xd06161(0x122)][_0xd06161(0x100)]||_0x40d8c5['body']['error'][_0xd06161(0x120)]===0x1;}async[_0xa7205c(0xf0)](_0x55f1da,_0xa1539b,_0x2b42e4){const _0x149183=_0xa7205c,_0x14bc2b={'unitId':_0x55f1da,'threadId':_0x2b42e4},_0x2f5512=await this[_0x149183(0xe8)][_0x149183(0x12f)]('/universer-api/comment/unit/'+_0x55f1da+_0x149183(0x102),{'body':_0x14bc2b}),_0x373da4=_0x2b42e4[_0x149183(0x131)](_0x1d9a89=>ee(_0x2f5512[_0x149183(0x122)]['comments'][_0x1d9a89],_0x55f1da,_0xa1539b))['filter'](Boolean);return Object[_0x149183(0xf4)](_0x2f5512[_0x149183(0x122)][_0x149183(0x145)])[_0x149183(0x118)](_0x19c02a=>{const _0x355c65=_0x149183;this[_0x355c65(0xe9)][_0x355c65(0x106)](_0x19c02a);}),_0x373da4;}[_0xa7205c(0x10e)](_0x5c971b){const _0x1d58cf=_0xa7205c;return{'id':_0x5c971b['id'],'threadId':_0x5c971b[_0x1d58cf(0xf1)],'ref':_0x5c971b[_0x1d58cf(0x127)]};}};function _0x46db(_0x42809c,_0x44816e){_0x42809c=_0x42809c-0xe6;const _0x41e77d=_0x41e7();let _0x46db0a=_0x41e77d[_0x42809c];return _0x46db0a;}S=Q([b(0x0,_0x28a1f8(_0x25424b)),b(0x1,_0x28a1f8(_0x18abd9)),b(0x2,_0x28a1f8(_0x3318dd))],S);var re=Object[_0xa7205c(0x10c)],te=(_0x4b8a50,_0x5d2732,_0x5866ce,_0x2c164d)=>{const _0x5af5ed=_0xa7205c;for(var _0xc213b0=_0x2c164d>0x1?void 0x0:_0x2c164d?re(_0x5d2732,_0x5866ce):_0x5d2732,_0x2ee5b6=_0x4b8a50[_0x5af5ed(0xec)]-0x1,_0x48cd51;_0x2ee5b6>=0x0;_0x2ee5b6--)(_0x48cd51=_0x4b8a50[_0x2ee5b6])&&(_0xc213b0=_0x48cd51(_0xc213b0)||_0xc213b0);return _0xc213b0;},M=(_0x36fd81,_0x391074)=>(_0x295041,_0x3cf1b4)=>_0x391074(_0x295041,_0x3cf1b4,_0x36fd81);let f=class extends _0x356b4e{constructor(_0x28cbc5,_0x4d0518){const _0xa3ea57=_0xa7205c;super(),this[_0xa3ea57(0xee)]=_0x28cbc5,this[_0xa3ea57(0x138)]=_0x4d0518,this[_0xa3ea57(0x14d)]();}[_0xa7205c(0x14d)](){const _0x42859e=_0xa7205c;this['_threadCommentDataSourceService'][_0x42859e(0x143)]=this[_0x42859e(0x138)],this[_0x42859e(0xee)][_0x42859e(0x123)]=!0x1;}};f=te([M(0x0,_0x450486),M(0x1,_0x28a1f8(S))],f);var se=Object[_0xa7205c(0xff)],oe=Object[_0xa7205c(0x10c)],ne=(_0x2a8a3a,_0x48dd36,_0x1155f3)=>_0x48dd36 in _0x2a8a3a?se(_0x2a8a3a,_0x48dd36,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1155f3}):_0x2a8a3a[_0x48dd36]=_0x1155f3,ie=(_0x1876c3,_0x42b808,_0x38a856,_0x522b64)=>{for(var _0x551bde=_0x522b64>0x1?void 0x0:_0x522b64?oe(_0x42b808,_0x38a856):_0x42b808,_0x33c62f=_0x1876c3['length']-0x1,_0x1a898e;_0x33c62f>=0x0;_0x33c62f--)(_0x1a898e=_0x1876c3[_0x33c62f])&&(_0x551bde=_0x1a898e(_0x551bde)||_0x551bde);return _0x551bde;},N=(_0x3c5eb5,_0x293b8d)=>(_0x5a9e42,_0x402533)=>_0x293b8d(_0x5a9e42,_0x402533,_0x3c5eb5),$=(_0x421339,_0x26cb25,_0x179e6d)=>ne(_0x421339,typeof _0x26cb25!='symbol'?_0x26cb25+'':_0x26cb25,_0x179e6d);let g=class extends _0x88c673{constructor(_0x556791=O,_0x50e64a,_0x48aad2){const _0x559c89=_0xa7205c;super(),this['_config']=_0x556791,this[_0x559c89(0x10d)]=_0x50e64a,this[_0x559c89(0x136)]=_0x48aad2;const {..._0x2cecea}=_0x403e38({},O,this['_config']);this['_configService']['setConfig'](z,_0x2cecea);}[_0xa7205c(0x13e)](){const _0x556fb1=_0xa7205c;[[S],[f],[_]][_0x556fb1(0x118)](_0x34bdd9=>{this['_injector']['add'](_0x34bdd9);});}['onReady'](){const _0x28f55f=_0xa7205c;this[_0x28f55f(0x10d)][_0x28f55f(0xef)](f),this[_0x28f55f(0x10d)][_0x28f55f(0xef)](_);}};$(g,_0xa7205c(0xf2),W),$(g,'type',_0x1945c7[_0xa7205c(0x11e)]),g=ie([_0x20ab80(_0x798c6,_0x2c98f7,_0x52f3b9),N(0x1,_0x28a1f8(_0x54d40d)),N(0x2,_0x476b8d)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0xe6a052=_0x4fcb;(function(_0x24bf2d,_0x4f925b){const _0x7e76f8=_0x4fcb,_0x347f4d=_0x24bf2d();while(!![]){try{const _0x5d0bd8=parseInt(_0x7e76f8(0x1a2))/0x1+parseInt(_0x7e76f8(0x1a1))/0x2*(-parseInt(_0x7e76f8(0x17f))/0x3)+parseInt(_0x7e76f8(0x19d))/0x4+parseInt(_0x7e76f8(0x166))/0x5+parseInt(_0x7e76f8(0x160))/0x6+parseInt(_0x7e76f8(0x13f))/0x7*(parseInt(_0x7e76f8(0x15a))/0x8)+-parseInt(_0x7e76f8(0x164))/0x9;if(_0x5d0bd8===_0x4f925b)break;else _0x347f4d['push'](_0x347f4d['shift']());}catch(_0x38de5c){_0x347f4d['push'](_0x347f4d['shift']());}}}(_0x4b0e,0xef927));import{CommentService as _0xb08f,CollaborationSessionService as _0x567848,UniverCollaborationClientPlugin as _0x5ad52c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2fbf2b}from'@univerjs-pro/license';import{dayjs as _0x13a1d2,UserManagerService as _0x38029a,Inject as _0x12192d,Injector as _0xf533d4,Disposable as _0x2c54e0,CustomRangeType as _0x109d28,UniverInstanceType as _0x3870f6,DependentOn as _0x3bfe6e,IConfigService as _0x2536f6,Plugin as _0x348a81,merge as _0x20dbf3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4c1e57}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38ef02,IThreadCommentDataSourceService as _0x292b6b}from'@univerjs/thread-comment';function _0x4b0e(){const _0x148abd=['259862nRqodf','map','updateComment','rangeId','Edit','112GBCSbs','find','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','payload','addUser','size','solved','createTimestamp','format','_commentService','unitId','UNRECOGNIZED','symbol','/universer-api/user/list','_init','content','personId','filter','length','onStarting','stringify','rangeType','/list','pipe','_threadCommentDataSource','users','_initDataSource','250784IPgRwp','user','_threadCommentModel','get','post','/solved','1787670PPPbVs','body','replyId','slice','9090018NCQebj','parentId','8100085tYIXBn','pluginName','Add','customRanges','resolved','YYYY/MM/DD\x20HH:mm','Reply','_injector','delete','userID','forEach','_configService','Solve','OpenOrReOpen','userId','_httpService','_sessionService','onReady','commentUpdate$','comments','listComments','root','COMMENT','add','disposeWithMe','30RSChrF','deleteComment','reply','getMemberID','subscribe','requireSession','_threadCommentDataSourceService','code','Delete','getUnit','/add','_config','threadId','Solved','/universer-api/comment/unit/','Unknown','resolveComment','getCurrentUser','error','dataSource','getOwnPropertyDescriptor','_userService','replies','type','getComment','saveCommentToSnapshot','_initUserSync','values','thread-comment-data-source.config','defineProperty','4762428XHmqFc','parse','addComment','/edit','375742UBBABf'];_0x4b0e=function(){return _0x148abd;};return _0x4b0e();}import{bufferTime as _0x26be54}from'rxjs';import{HTTPService as _0x486692}from'@univerjs/network';const W=_0xe6a052(0x141);var I=(_0x12fb0b=>(_0x12fb0b[_0x12fb0b[_0xe6a052(0x173)]=0x0]=_0xe6a052(0x173),_0x12fb0b[_0x12fb0b['Solved']=0x1]=_0xe6a052(0x18c),_0x12fb0b[_0x12fb0b['UNRECOGNIZED']=-0x1]=_0xe6a052(0x14a),_0x12fb0b))(I||{}),v=(_0x475ce0=>(_0x475ce0[_0x475ce0[_0xe6a052(0x18e)]=0x0]='Unknown',_0x475ce0[_0x475ce0[_0xe6a052(0x168)]=0x1]=_0xe6a052(0x168),_0x475ce0[_0x475ce0[_0xe6a052(0x16c)]=0x2]=_0xe6a052(0x16c),_0x475ce0[_0x475ce0[_0xe6a052(0x13e)]=0x3]='Edit',_0x475ce0[_0x475ce0[_0xe6a052(0x187)]=0x4]=_0xe6a052(0x187),_0x475ce0[_0x475ce0[_0xe6a052(0x172)]=0x5]=_0xe6a052(0x172),_0x475ce0[_0x475ce0[_0xe6a052(0x14a)]=-0x1]=_0xe6a052(0x14a),_0x475ce0))(v||{});const y=_0x21d1d8=>_0x13a1d2(new Date(+_0x21d1d8))[_0xe6a052(0x147)](_0xe6a052(0x16b)),B=async(_0x3d10f5,_0x37c479)=>{const _0x1ff679=_0xe6a052,_0x56d22c=_0x3d10f5[_0x1ff679(0x15d)](_0x38029a),_0x2e17f9=_0x3d10f5[_0x1ff679(0x15d)](_0x486692);_0x37c479[_0x1ff679(0x170)](_0x72a39a=>{const _0x5ab5eb=_0x1ff679;_0x56d22c['getUser'](_0x72a39a)&&_0x37c479[_0x5ab5eb(0x16e)](_0x72a39a);}),_0x37c479[_0x1ff679(0x144)]&&(await _0x2e17f9[_0x1ff679(0x15d)](_0x1ff679(0x14c),{'params':{'userIDs':[..._0x37c479]}}))[_0x1ff679(0x161)][_0x1ff679(0x158)]['forEach'](_0xb175b8=>{const _0x317093=_0x1ff679;_0xb175b8&&_0x56d22c[_0x317093(0x143)](_0xb175b8);});};function _0x4fcb(_0x405347,_0x34f04e){_0x405347=_0x405347-0x13d;const _0x4b0e98=_0x4b0e();let _0x4fcb05=_0x4b0e98[_0x405347];return _0x4fcb05;}var K=Object['getOwnPropertyDescriptor'],V=(_0x5b1ef9,_0xdf9bbd,_0x17667b,_0x39b8a0)=>{for(var _0x3dc491=_0x39b8a0>0x1?void 0x0:_0x39b8a0?K(_0xdf9bbd,_0x17667b):_0xdf9bbd,_0x52b412=_0x5b1ef9['length']-0x1,_0x27386e;_0x52b412>=0x0;_0x52b412--)(_0x27386e=_0x5b1ef9[_0x52b412])&&(_0x3dc491=_0x27386e(_0x3dc491)||_0x3dc491);return _0x3dc491;},p=(_0x36b307,_0x42fa51)=>(_0x4feef0,_0x44690c)=>_0x42fa51(_0x4feef0,_0x44690c,_0x36b307);let _=class extends _0x2c54e0{constructor(_0x1d15a4,_0x181d93,_0x18b03b,_0x52786a){const _0x71fad4=_0xe6a052;super(),this['_commentService']=_0x1d15a4,this[_0x71fad4(0x15c)]=_0x181d93,this[_0x71fad4(0x194)]=_0x18b03b,this[_0x71fad4(0x16d)]=_0x52786a,this[_0x71fad4(0x14d)](),this[_0x71fad4(0x199)]();}['_initUserSync'](){const _0x2eb814=_0xe6a052;this[_0x2eb814(0x17e)](this[_0x2eb814(0x15c)][_0x2eb814(0x178)][_0x2eb814(0x156)](_0x26be54(0x10))['subscribe'](_0x3a642a=>{const _0x2ca5a0=_0x2eb814,_0x51c038=new Set();_0x3a642a['forEach'](_0x59daf8=>{const _0x3f0685=_0x4fcb;if(_0x59daf8[_0x3f0685(0x196)]===_0x3f0685(0x17d)){const _0x543e2e=_0x59daf8[_0x3f0685(0x142)][_0x3f0685(0x14f)];_0x51c038[_0x3f0685(0x17d)](_0x543e2e);}}),B(this[_0x2ca5a0(0x16d)],_0x51c038);}));}['_init'](){const _0x1da173=_0xe6a052;this[_0x1da173(0x17e)](this[_0x1da173(0x148)][_0x1da173(0x178)][_0x1da173(0x183)](async _0x440938=>{const _0x2f9c48=_0x1da173;var _0xcf35fd,_0x198d5e,_0x270bd2,_0x201a10;const _0x2b1dd3=(_0xcf35fd=this['_threadCommentModel'][_0x2f9c48(0x188)](_0x440938[_0x2f9c48(0x149)])['find'](_0xb5e806=>_0xb5e806[_0x2f9c48(0x18b)]===_0x440938[_0x2f9c48(0x18b)]))==null?void 0x0:_0xcf35fd['root'];if(!_0x2b1dd3)return;const {unitId:_0x193aee,subUnitId:_0xf933cd}=_0x2b1dd3;switch(_0x440938[_0x2f9c48(0x15b)]&&this[_0x2f9c48(0x194)]['addUser'](_0x440938[_0x2f9c48(0x15b)]),_0x440938[_0x2f9c48(0x196)]){case v['Add']:break;case v[_0x2f9c48(0x16c)]:{this[_0x2f9c48(0x15c)]['addComment'](_0x193aee,_0xf933cd,{'unitId':_0x193aee,'subUnitId':_0xf933cd,'ref':'','id':_0x440938[_0x2f9c48(0x162)],'dT':y(+_0x440938[_0x2f9c48(0x146)]),'threadId':_0x440938['threadId'],'personId':(_0x270bd2=(_0x198d5e=_0x440938[_0x2f9c48(0x15b)])==null?void 0x0:_0x198d5e[_0x2f9c48(0x16f)])!=null?_0x270bd2:_0x440938[_0x2f9c48(0x174)],'text':JSON['parse'](_0x440938['content']),'parentId':_0x2b1dd3['id']});break;}case v['Delete']:{const _0x50226b=this[_0x2f9c48(0x15c)][_0x2f9c48(0x197)](_0x193aee,_0xf933cd,_0x440938[_0x2f9c48(0x162)]);_0x50226b&&_0x50226b[_0x2f9c48(0x165)]&&this[_0x2f9c48(0x15c)]['deleteComment'](_0x193aee,_0xf933cd,_0x440938['replyId']);break;}case v['Edit']:{this[_0x2f9c48(0x15c)][_0x2f9c48(0x1a4)](_0x193aee,_0xf933cd,{'commentId':_0x440938[_0x2f9c48(0x162)],'text':JSON[_0x2f9c48(0x19e)](_0x440938[_0x2f9c48(0x14e)])});break;}case v[_0x2f9c48(0x172)]:{const _0x2b69e0=(_0x201a10=this[_0x2f9c48(0x15c)][_0x2f9c48(0x188)](_0x440938[_0x2f9c48(0x149)])[_0x2f9c48(0x140)](_0x2289b8=>_0x2289b8['threadId']===_0x440938['threadId']))==null?void 0x0:_0x201a10[_0x2f9c48(0x17b)];_0x2b69e0&&this[_0x2f9c48(0x15c)]['resolveComment'](_0x193aee,_0xf933cd,_0x2b69e0['id'],_0x440938[_0x2f9c48(0x145)]===I[_0x2f9c48(0x18c)]);break;}}}));}};_=V([p(0x0,_0x12192d(_0xb08f)),p(0x1,_0x12192d(_0x38ef02)),p(0x2,_0x12192d(_0x38029a)),p(0x3,_0x12192d(_0xf533d4))],_);const z=_0xe6a052(0x19b),O={};var k=Object[_0xe6a052(0x193)],Q=(_0x3e436f,_0x342a09,_0x235486,_0x395e32)=>{const _0x17517e=_0xe6a052;for(var _0xe70f30=_0x395e32>0x1?void 0x0:_0x395e32?k(_0x342a09,_0x235486):_0x342a09,_0x9acd04=_0x3e436f[_0x17517e(0x151)]-0x1,_0x2a9430;_0x9acd04>=0x0;_0x9acd04--)(_0x2a9430=_0x3e436f[_0x9acd04])&&(_0xe70f30=_0x2a9430(_0xe70f30)||_0xe70f30);return _0xe70f30;},b=(_0x5e3d88,_0x17fb4b)=>(_0x916747,_0x34bfe0)=>_0x17fb4b(_0x916747,_0x34bfe0,_0x5e3d88);function X(_0x225c7d,_0x121dbb){const _0x5d6d65=_0xe6a052,_0x4223e6=_0x225c7d[_0x5d6d65(0x195)][0x0];return{..._0x121dbb,'id':_0x4223e6[_0x5d6d65(0x162)],'resolved':_0x225c7d[_0x5d6d65(0x145)]===0x1,'dT':y(_0x4223e6[_0x5d6d65(0x146)]),'personId':_0x4223e6['userId'],'threadId':_0x4223e6[_0x5d6d65(0x18b)]};}function ee(_0x51a597,_0x48ca9c,_0x15ba24){const _0x5be51a=_0xe6a052;var _0x399abb,_0x269511;if(((_0x269511=(_0x399abb=_0x51a597==null?void 0x0:_0x51a597[_0x5be51a(0x195)])==null?void 0x0:_0x399abb[_0x5be51a(0x151)])!=null?_0x269511:0x0)>0x0){const _0x299127=(_0x5b580a,_0x36315a)=>({'id':_0x5b580a[_0x5be51a(0x162)],'threadId':_0x5b580a[_0x5be51a(0x18b)],'dT':y(_0x5b580a[_0x5be51a(0x146)]),'personId':_0x5b580a[_0x5be51a(0x174)],'resolved':_0x51a597[_0x5be51a(0x145)]===I[_0x5be51a(0x18c)],'unitId':_0x48ca9c,'subUnitId':_0x15ba24,'text':JSON[_0x5be51a(0x19e)](_0x5b580a[_0x5be51a(0x14e)]),'parentId':_0x36315a}),_0x57e257=_0x299127(_0x51a597['replies'][0x0]);return{..._0x57e257,'children':_0x51a597[_0x5be51a(0x195)][_0x5be51a(0x163)](0x1)[_0x5be51a(0x1a3)](_0x4e1e55=>_0x299127(_0x4e1e55,_0x57e257['id']))};}return null;}let S=class{constructor(_0x2fb2af,_0x331a75,_0x201029){const _0x31526c=_0xe6a052;this['_httpService']=_0x2fb2af,this[_0x31526c(0x194)]=_0x331a75,this[_0x31526c(0x176)]=_0x201029;}async[_0xe6a052(0x19f)](_0x4f4d22){const _0x941846=_0xe6a052;var _0x4a4924,_0x2a81ca;const {parentId:_0x40f5eb,unitId:_0x35db58,text:_0x4b9e4a,threadId:_0x226d71}=_0x4f4d22,_0x3bfcfa=(_0x2a81ca=(_0x4a4924=_0x4b9e4a[_0x941846(0x169)])==null?void 0x0:_0x4a4924[_0x941846(0x150)](_0x119034=>_0x119034['rangeType']===_0x109d28['COMMENT'])['map'](_0x2d7baf=>_0x2d7baf[_0x941846(0x13d)]))!=null?_0x2a81ca:[],_0xccb6a7=JSON[_0x941846(0x153)](_0x4b9e4a),_0x3559d5=(await this[_0x941846(0x176)][_0x941846(0x184)](_0x35db58))[_0x941846(0x182)]();if(_0x40f5eb){const _0x4b0454={'memberId':_0x3559d5,'unitId':_0x35db58,'content':_0xccb6a7,'mention':_0x3bfcfa,'threadId':_0x226d71},_0x2551c6=(await this[_0x941846(0x175)][_0x941846(0x15e)](_0x941846(0x18d)+_0x35db58+'/reply',{'body':_0x4b0454}))['body'][_0x941846(0x181)];return{..._0x4f4d22,'id':_0x2551c6[_0x941846(0x162)],'dT':_0x13a1d2(+_0x2551c6[_0x941846(0x146)])[_0x941846(0x147)](_0x941846(0x16b)),'personId':_0x2551c6[_0x941846(0x174)]};}else{const _0x2fe52f={'memberId':_0x3559d5,'unitId':_0x35db58,'content':_0xccb6a7,'mention':_0x3bfcfa},_0x57f240=await this[_0x941846(0x175)][_0x941846(0x15e)]('/universer-api/comment/unit/'+_0x35db58+_0x941846(0x189),{'body':_0x2fe52f});return X(_0x57f240['body']['comment'],_0x4f4d22);}}async[_0xe6a052(0x1a4)](_0x204d2c){const _0x4af545=_0xe6a052;var _0x50c019,_0x5b41f5;const {text:_0x174606,unitId:_0x590a43}=_0x204d2c,_0x2f3573=(_0x5b41f5=(_0x50c019=_0x174606[_0x4af545(0x169)])==null?void 0x0:_0x50c019[_0x4af545(0x150)](_0x3e709c=>_0x3e709c[_0x4af545(0x154)]===_0x109d28[_0x4af545(0x17c)])[_0x4af545(0x1a3)](_0x2f5c51=>_0x2f5c51[_0x4af545(0x13d)]))!=null?_0x5b41f5:[],_0x3b2046=JSON[_0x4af545(0x153)](_0x174606),_0x1ab213=_0x204d2c[_0x4af545(0x18b)],_0x2251fa=_0x204d2c['id'],_0x458644={'memberId':(await this[_0x4af545(0x176)][_0x4af545(0x184)](_0x590a43))[_0x4af545(0x182)](),'unitId':_0x590a43,'threadId':_0x1ab213,'mention':_0x2f3573,'content':_0x3b2046,'replyId':_0x2251fa},_0x34cc7f=await this[_0x4af545(0x175)][_0x4af545(0x15e)](_0x4af545(0x18d)+_0x590a43+_0x4af545(0x1a0),{'body':_0x458644});return!_0x34cc7f[_0x4af545(0x161)][_0x4af545(0x191)]||_0x34cc7f[_0x4af545(0x161)][_0x4af545(0x191)][_0x4af545(0x186)]===0x1;}async[_0xe6a052(0x18f)](_0x5f43cf){const _0x2aba21=_0xe6a052,{unitId:_0xdf3484}=_0x5f43cf,_0x55e94e=_0x5f43cf[_0x2aba21(0x18b)],_0x50c4ed={'memberId':this['_userService'][_0x2aba21(0x190)]()[_0x2aba21(0x16f)],'unitId':_0xdf3484,'threadId':_0x55e94e,'solved':_0x5f43cf[_0x2aba21(0x16a)]?I[_0x2aba21(0x18c)]:I[_0x2aba21(0x173)]},_0x16a97e=await this['_httpService'][_0x2aba21(0x15e)](_0x2aba21(0x18d)+_0xdf3484+_0x2aba21(0x15f),{'body':_0x50c4ed});return!_0x16a97e[_0x2aba21(0x161)][_0x2aba21(0x191)]||_0x16a97e['body']['error'][_0x2aba21(0x186)]===0x1;}async[_0xe6a052(0x180)](_0x271530,_0xf50eb9,_0x28df2e,_0x248c8c){const _0x3836f7=_0xe6a052,_0xd3644f={'memberId':(await this[_0x3836f7(0x176)]['requireSession'](_0x271530))[_0x3836f7(0x182)](),'threadId':_0x28df2e,'replyId':_0x248c8c,'unitId':_0x271530},_0x275028=await this[_0x3836f7(0x175)][_0x3836f7(0x15e)](_0x3836f7(0x18d)+_0x271530+'/delete',{'body':_0xd3644f});return!_0x275028[_0x3836f7(0x161)][_0x3836f7(0x191)]||_0x275028[_0x3836f7(0x161)][_0x3836f7(0x191)]['code']===0x1;}async[_0xe6a052(0x17a)](_0x4453c1,_0x6434b7,_0x1ee2a3){const _0x25e3f4=_0xe6a052,_0x2d3f00={'unitId':_0x4453c1,'threadId':_0x1ee2a3},_0x2be0c7=await this[_0x25e3f4(0x175)]['post'](_0x25e3f4(0x18d)+_0x4453c1+_0x25e3f4(0x155),{'body':_0x2d3f00}),_0xe05332=_0x1ee2a3[_0x25e3f4(0x1a3)](_0xedfe4e=>ee(_0x2be0c7[_0x25e3f4(0x161)][_0x25e3f4(0x179)][_0xedfe4e],_0x4453c1,_0x6434b7))[_0x25e3f4(0x150)](Boolean);return Object[_0x25e3f4(0x19a)](_0x2be0c7[_0x25e3f4(0x161)][_0x25e3f4(0x158)])[_0x25e3f4(0x170)](_0x5b1dbd=>{const _0x21e398=_0x25e3f4;this['_userService'][_0x21e398(0x143)](_0x5b1dbd);}),_0xe05332;}[_0xe6a052(0x198)](_0x2f98b8){const _0x509092=_0xe6a052;return{'id':_0x2f98b8['id'],'threadId':_0x2f98b8[_0x509092(0x18b)],'ref':_0x2f98b8['ref']};}};S=Q([b(0x0,_0x12192d(_0x486692)),b(0x1,_0x12192d(_0x38029a)),b(0x2,_0x12192d(_0x567848))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x2dda0e,_0x200e47,_0x463783,_0x11be95)=>{const _0x2c1743=_0xe6a052;for(var _0x3c821d=_0x11be95>0x1?void 0x0:_0x11be95?re(_0x200e47,_0x463783):_0x200e47,_0x3c887b=_0x2dda0e[_0x2c1743(0x151)]-0x1,_0x5c5162;_0x3c887b>=0x0;_0x3c887b--)(_0x5c5162=_0x2dda0e[_0x3c887b])&&(_0x3c821d=_0x5c5162(_0x3c821d)||_0x3c821d);return _0x3c821d;},M=(_0x251002,_0x4e911e)=>(_0x315f61,_0x22d594)=>_0x4e911e(_0x315f61,_0x22d594,_0x251002);let f=class extends _0x2c54e0{constructor(_0x214b15,_0x899d0e){const _0x268dc6=_0xe6a052;super(),this['_threadCommentDataSourceService']=_0x214b15,this[_0x268dc6(0x157)]=_0x899d0e,this['_initDataSource']();}[_0xe6a052(0x159)](){const _0x1d1a56=_0xe6a052;this[_0x1d1a56(0x185)][_0x1d1a56(0x192)]=this[_0x1d1a56(0x157)],this[_0x1d1a56(0x185)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x292b6b),M(0x1,_0x12192d(S))],f);var se=Object[_0xe6a052(0x19c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1f4026,_0x2caddf,_0x3d9fa6)=>_0x2caddf in _0x1f4026?se(_0x1f4026,_0x2caddf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d9fa6}):_0x1f4026[_0x2caddf]=_0x3d9fa6,ie=(_0x1e6e22,_0x374349,_0x45c5d2,_0x56e1a3)=>{const _0x27a7dd=_0xe6a052;for(var _0x4577e5=_0x56e1a3>0x1?void 0x0:_0x56e1a3?oe(_0x374349,_0x45c5d2):_0x374349,_0x4bae33=_0x1e6e22[_0x27a7dd(0x151)]-0x1,_0x55e71f;_0x4bae33>=0x0;_0x4bae33--)(_0x55e71f=_0x1e6e22[_0x4bae33])&&(_0x4577e5=_0x55e71f(_0x4577e5)||_0x4577e5);return _0x4577e5;},N=(_0x5952e0,_0x2439fe)=>(_0x44757f,_0x1fe3a5)=>_0x2439fe(_0x44757f,_0x1fe3a5,_0x5952e0),$=(_0x43f1a5,_0x37509a,_0x5aed8c)=>ne(_0x43f1a5,typeof _0x37509a!=_0xe6a052(0x14b)?_0x37509a+'':_0x37509a,_0x5aed8c);let g=class extends _0x348a81{constructor(_0x43b060=O,_0x56fb0b,_0xdb6bf4){const _0x3b877e=_0xe6a052;super(),this[_0x3b877e(0x18a)]=_0x43b060,this[_0x3b877e(0x16d)]=_0x56fb0b,this['_configService']=_0xdb6bf4;const {..._0x592d69}=_0x20dbf3({},O,this[_0x3b877e(0x18a)]);this[_0x3b877e(0x171)]['setConfig'](z,_0x592d69);}[_0xe6a052(0x152)](){const _0x45b801=_0xe6a052;[[S],[f],[_]][_0x45b801(0x170)](_0x5c8711=>{const _0x3fa95d=_0x45b801;this[_0x3fa95d(0x16d)]['add'](_0x5c8711);});}[_0xe6a052(0x177)](){const _0x11b704=_0xe6a052;this[_0x11b704(0x16d)]['get'](f),this[_0x11b704(0x16d)][_0x11b704(0x15d)](_);}};$(g,_0xe6a052(0x167),W),$(g,'type',_0x3870f6['UNIVER_UNKNOWN']),g=ie([_0x3bfe6e(_0x4c1e57,_0x5ad52c,_0x2fbf2b),N(0x1,_0x12192d(_0xf533d4)),N(0x2,_0x2536f6)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xa7205c=_0x46db;(function(_0x54d2e5,_0x4bfef5){const _0x21a789=_0x46db,_0x525a98=_0x54d2e5();while(!![]){try{const _0x3f2e73=-parseInt(_0x21a789(0x101))/0x1*(-parseInt(_0x21a789(0x142))/0x2)+parseInt(_0x21a789(0x144))/0x3+-parseInt(_0x21a789(0x10f))/0x4*(parseInt(_0x21a789(0x114))/0x5)+-parseInt(_0x21a789(0x139))/0x6*(parseInt(_0x21a789(0x109))/0x7)+-parseInt(_0x21a789(0xe7))/0x8*(-parseInt(_0x21a789(0x103))/0x9)+-parseInt(_0x21a789(0x14b))/0xa+-parseInt(_0x21a789(0xfb))/0xb*(-parseInt(_0x21a789(0x128))/0xc);if(_0x3f2e73===_0x4bfef5)break;else _0x525a98['push'](_0x525a98['shift']());}catch(_0x5d551e){_0x525a98['push'](_0x525a98['shift']());}}}(_0x41e7,0xaafa2));function _0x41e7(){const _0x43693c=['resolveComment','2246944bgWBir','rangeType','Solved','getOwnPropertyDescriptor','_injector','saveCommentToSnapshot','154404cJPkHj','OpenOrReOpen','subscribe','Delete','type','65nwuQSa','/delete','/universer-api/user/list','addComment','forEach','_sessionService','size','replyId','disposeWithMe','content','UNIVER_UNKNOWN','reply','code','/universer-api/comment/unit/','body','syncUpdateMutationToColla','createTimestamp','_threadCommentModel','userID','ref','11484828KMeGZi','getCurrentUser','comment','resolved','solved','/solved','Edit','post','COMMENT','map','find','/reply','getUser','parse','_configService','format','_threadCommentDataSource','24hGciXf','Solve','add','Unknown','stringify','onStarting','rangeId','replies','_init','6NxlRZA','dataSource','2157216dTtKTS','users','root','personId','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','filter','9477760ousEXe','customRanges','_initDataSource','updateComment','438928XTZpcj','_httpService','_userService','Add','unitId','length','getMemberID','_threadCommentDataSourceService','get','listComments','threadId','pluginName','getUnit','values','Reply','requireSession','getComment','_initUserSync','_commentService','slice','22YabrTj','user','userId','parentId','defineProperty','error','29137cNygfj','/list','117bAxHOw','pipe','deleteComment','addUser','payload'];_0x41e7=function(){return _0x43693c;};return _0x41e7();}import{CommentService as _0x15e370,CollaborationSessionService as _0x3318dd,UniverCollaborationClientPlugin as _0x2c98f7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x52f3b9}from'@univerjs-pro/license';import{dayjs as _0x4da51b,UserManagerService as _0x18abd9,Inject as _0x28a1f8,Injector as _0x54d40d,Disposable as _0x356b4e,CustomRangeType as _0x5db075,UniverInstanceType as _0x1945c7,DependentOn as _0x20ab80,IConfigService as _0x476b8d,Plugin as _0x88c673,merge as _0x403e38}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x798c6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2f4ecd,IThreadCommentDataSourceService as _0x450486}from'@univerjs/thread-comment';import{bufferTime as _0x19a41c}from'rxjs';import{HTTPService as _0x25424b}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1ca600=>(_0x1ca600[_0x1ca600['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x1ca600[_0x1ca600['Solved']=0x1]=_0xa7205c(0x10b),_0x1ca600[_0x1ca600[_0xa7205c(0x149)]=-0x1]=_0xa7205c(0x149),_0x1ca600))(I||{}),v=(_0x154422=>(_0x154422[_0x154422[_0xa7205c(0x13c)]=0x0]=_0xa7205c(0x13c),_0x154422[_0x154422[_0xa7205c(0xea)]=0x1]=_0xa7205c(0xea),_0x154422[_0x154422[_0xa7205c(0xf5)]=0x2]=_0xa7205c(0xf5),_0x154422[_0x154422[_0xa7205c(0x12e)]=0x3]=_0xa7205c(0x12e),_0x154422[_0x154422[_0xa7205c(0x112)]=0x4]=_0xa7205c(0x112),_0x154422[_0x154422[_0xa7205c(0x13a)]=0x5]='Solve',_0x154422[_0x154422[_0xa7205c(0x149)]=-0x1]=_0xa7205c(0x149),_0x154422))(v||{});const y=_0x3c251d=>_0x4da51b(new Date(+_0x3c251d))[_0xa7205c(0x137)](_0xa7205c(0x148)),B=async(_0x57d345,_0x16b1bb)=>{const _0x3c0404=_0xa7205c,_0x16d0d0=_0x57d345[_0x3c0404(0xef)](_0x18abd9),_0xe60297=_0x57d345[_0x3c0404(0xef)](_0x25424b);_0x16b1bb['forEach'](_0x264763=>{const _0x5945dc=_0x3c0404;_0x16d0d0[_0x5945dc(0x134)](_0x264763)&&_0x16b1bb['delete'](_0x264763);}),_0x16b1bb[_0x3c0404(0x11a)]&&(await _0xe60297[_0x3c0404(0xef)](_0x3c0404(0x116),{'params':{'userIDs':[..._0x16b1bb]}}))[_0x3c0404(0x122)]['users']['forEach'](_0x532d39=>{const _0x2c9b97=_0x3c0404;_0x532d39&&_0x16d0d0[_0x2c9b97(0x106)](_0x532d39);});};var K=Object[_0xa7205c(0x10c)],V=(_0x269718,_0x389a47,_0x27c4ca,_0x18011d)=>{const _0x2fb400=_0xa7205c;for(var _0x1a9484=_0x18011d>0x1?void 0x0:_0x18011d?K(_0x389a47,_0x27c4ca):_0x389a47,_0x518bc1=_0x269718[_0x2fb400(0xec)]-0x1,_0x20df37;_0x518bc1>=0x0;_0x518bc1--)(_0x20df37=_0x269718[_0x518bc1])&&(_0x1a9484=_0x20df37(_0x1a9484)||_0x1a9484);return _0x1a9484;},p=(_0x1854b0,_0x2ebcff)=>(_0x435eef,_0x373a06)=>_0x2ebcff(_0x435eef,_0x373a06,_0x1854b0);let _=class extends _0x356b4e{constructor(_0xad650c,_0x4327eb,_0x4b9f95,_0x5a3d1f){const _0xc992eb=_0xa7205c;super(),this[_0xc992eb(0xf9)]=_0xad650c,this[_0xc992eb(0x125)]=_0x4327eb,this['_userService']=_0x4b9f95,this[_0xc992eb(0x10d)]=_0x5a3d1f,this[_0xc992eb(0x141)](),this[_0xc992eb(0xf8)]();}[_0xa7205c(0xf8)](){const _0x584d40=_0xa7205c;this[_0x584d40(0x11c)](this[_0x584d40(0x125)]['commentUpdate$'][_0x584d40(0x104)](_0x19a41c(0x10))[_0x584d40(0x111)](_0x282326=>{const _0x761c5f=_0x584d40,_0x52c0b3=new Set();_0x282326[_0x761c5f(0x118)](_0xaa989f=>{const _0xf617c4=_0x761c5f;if(_0xaa989f[_0xf617c4(0x113)]===_0xf617c4(0x13b)){const _0x3b9b0e=_0xaa989f[_0xf617c4(0x107)][_0xf617c4(0x147)];_0x52c0b3[_0xf617c4(0x13b)](_0x3b9b0e);}}),B(this[_0x761c5f(0x10d)],_0x52c0b3);}));}[_0xa7205c(0x141)](){const _0x1ed4fd=_0xa7205c;this[_0x1ed4fd(0x11c)](this[_0x1ed4fd(0xf9)]['commentUpdate$'][_0x1ed4fd(0x111)](async _0x181340=>{const _0xc13be1=_0x1ed4fd;var _0x449eca,_0x1df1df,_0x478c1e,_0x560d03;const _0x400dea=(_0x449eca=this[_0xc13be1(0x125)][_0xc13be1(0xf3)](_0x181340[_0xc13be1(0xeb)])[_0xc13be1(0x132)](_0x1ce48=>_0x1ce48[_0xc13be1(0xf1)]===_0x181340[_0xc13be1(0xf1)]))==null?void 0x0:_0x449eca[_0xc13be1(0x146)];if(!_0x400dea)return;const {unitId:_0x310b82,subUnitId:_0x272fbd}=_0x400dea;switch(_0x181340['user']&&this[_0xc13be1(0xe9)][_0xc13be1(0x106)](_0x181340[_0xc13be1(0xfc)]),_0x181340[_0xc13be1(0x113)]){case v[_0xc13be1(0xea)]:break;case v[_0xc13be1(0xf5)]:{this[_0xc13be1(0x125)][_0xc13be1(0x117)](_0x310b82,_0x272fbd,{'unitId':_0x310b82,'subUnitId':_0x272fbd,'ref':'','id':_0x181340[_0xc13be1(0x11b)],'dT':y(+_0x181340['createTimestamp']),'threadId':_0x181340[_0xc13be1(0xf1)],'personId':(_0x478c1e=(_0x1df1df=_0x181340[_0xc13be1(0xfc)])==null?void 0x0:_0x1df1df[_0xc13be1(0x126)])!=null?_0x478c1e:_0x181340[_0xc13be1(0xfd)],'text':JSON[_0xc13be1(0x135)](_0x181340[_0xc13be1(0x11d)]),'parentId':_0x400dea['id']});break;}case v[_0xc13be1(0x112)]:{const _0x4e5aca=this[_0xc13be1(0x125)][_0xc13be1(0xf7)](_0x310b82,_0x272fbd,_0x181340[_0xc13be1(0x11b)]);_0x4e5aca&&_0x4e5aca[_0xc13be1(0xfe)]&&this[_0xc13be1(0x125)][_0xc13be1(0x105)](_0x310b82,_0x272fbd,_0x181340[_0xc13be1(0x11b)]);break;}case v[_0xc13be1(0x12e)]:{this[_0xc13be1(0x125)][_0xc13be1(0xe6)](_0x310b82,_0x272fbd,{'commentId':_0x181340[_0xc13be1(0x11b)],'text':JSON[_0xc13be1(0x135)](_0x181340[_0xc13be1(0x11d)])});break;}case v['Solve']:{const _0x3da7b6=(_0x560d03=this[_0xc13be1(0x125)][_0xc13be1(0xf3)](_0x181340[_0xc13be1(0xeb)])[_0xc13be1(0x132)](_0x424f00=>_0x424f00[_0xc13be1(0xf1)]===_0x181340[_0xc13be1(0xf1)]))==null?void 0x0:_0x560d03[_0xc13be1(0x146)];_0x3da7b6&&this[_0xc13be1(0x125)][_0xc13be1(0x108)](_0x310b82,_0x272fbd,_0x3da7b6['id'],_0x181340[_0xc13be1(0x12c)]===I[_0xc13be1(0x10b)]);break;}}}));}};_=V([p(0x0,_0x28a1f8(_0x15e370)),p(0x1,_0x28a1f8(_0x2f4ecd)),p(0x2,_0x28a1f8(_0x18abd9)),p(0x3,_0x28a1f8(_0x54d40d))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0xa7205c(0x10c)],Q=(_0x161695,_0x575575,_0x143ddf,_0x47172c)=>{const _0x39bac8=_0xa7205c;for(var _0x52dfd9=_0x47172c>0x1?void 0x0:_0x47172c?k(_0x575575,_0x143ddf):_0x575575,_0x3fef4a=_0x161695[_0x39bac8(0xec)]-0x1,_0x195f0d;_0x3fef4a>=0x0;_0x3fef4a--)(_0x195f0d=_0x161695[_0x3fef4a])&&(_0x52dfd9=_0x195f0d(_0x52dfd9)||_0x52dfd9);return _0x52dfd9;},b=(_0x71ed32,_0x44ec58)=>(_0x1ce371,_0x5ab356)=>_0x44ec58(_0x1ce371,_0x5ab356,_0x71ed32);function X(_0x332df4,_0x34216b){const _0x540151=_0xa7205c,_0x414cc7=_0x332df4[_0x540151(0x140)][0x0];return{..._0x34216b,'id':_0x414cc7[_0x540151(0x11b)],'resolved':_0x332df4[_0x540151(0x12c)]===0x1,'dT':y(_0x414cc7['createTimestamp']),'personId':_0x414cc7[_0x540151(0xfd)],'threadId':_0x414cc7[_0x540151(0xf1)]};}function ee(_0xa2d2c,_0x1806a9,_0x4b037){const _0x43fe8c=_0xa7205c;var _0x263503,_0x12748d;if(((_0x12748d=(_0x263503=_0xa2d2c==null?void 0x0:_0xa2d2c['replies'])==null?void 0x0:_0x263503[_0x43fe8c(0xec)])!=null?_0x12748d:0x0)>0x0){const _0x2a3e6d=(_0x59d83e,_0x27b302)=>({'id':_0x59d83e[_0x43fe8c(0x11b)],'threadId':_0x59d83e[_0x43fe8c(0xf1)],'dT':y(_0x59d83e[_0x43fe8c(0x124)]),'personId':_0x59d83e[_0x43fe8c(0xfd)],'resolved':_0xa2d2c[_0x43fe8c(0x12c)]===I[_0x43fe8c(0x10b)],'unitId':_0x1806a9,'subUnitId':_0x4b037,'text':JSON[_0x43fe8c(0x135)](_0x59d83e[_0x43fe8c(0x11d)]),'parentId':_0x27b302}),_0x52f67a=_0x2a3e6d(_0xa2d2c['replies'][0x0]);return{..._0x52f67a,'children':_0xa2d2c[_0x43fe8c(0x140)][_0x43fe8c(0xfa)](0x1)['map'](_0x4f4c0c=>_0x2a3e6d(_0x4f4c0c,_0x52f67a['id']))};}return null;}let S=class{constructor(_0x4387f3,_0x2f38c2,_0x5b4617){const _0x1b6ef5=_0xa7205c;this[_0x1b6ef5(0xe8)]=_0x4387f3,this[_0x1b6ef5(0xe9)]=_0x2f38c2,this[_0x1b6ef5(0x119)]=_0x5b4617;}async[_0xa7205c(0x117)](_0x6256c5){const _0x59ef37=_0xa7205c;var _0x38a59a,_0x2397b2;const {parentId:_0x30f50c,unitId:_0x2ad071,text:_0x3e1fd1,threadId:_0x39f2a5}=_0x6256c5,_0x348c74=(_0x2397b2=(_0x38a59a=_0x3e1fd1[_0x59ef37(0x14c)])==null?void 0x0:_0x38a59a['filter'](_0x2de910=>_0x2de910['rangeType']===_0x5db075[_0x59ef37(0x130)])['map'](_0x4460c6=>_0x4460c6[_0x59ef37(0x13f)]))!=null?_0x2397b2:[],_0x29224a=JSON[_0x59ef37(0x13d)](_0x3e1fd1),_0x2cf497=(await this[_0x59ef37(0x119)]['requireSession'](_0x2ad071))['getMemberID']();if(_0x30f50c){const _0x1e73e5={'memberId':_0x2cf497,'unitId':_0x2ad071,'content':_0x29224a,'mention':_0x348c74,'threadId':_0x39f2a5},_0xa9c426=(await this[_0x59ef37(0xe8)][_0x59ef37(0x12f)](_0x59ef37(0x121)+_0x2ad071+_0x59ef37(0x133),{'body':_0x1e73e5}))[_0x59ef37(0x122)][_0x59ef37(0x11f)];return{..._0x6256c5,'id':_0xa9c426['replyId'],'dT':_0x4da51b(+_0xa9c426[_0x59ef37(0x124)])[_0x59ef37(0x137)](_0x59ef37(0x148)),'personId':_0xa9c426['userId']};}else{const _0x1abd44={'memberId':_0x2cf497,'unitId':_0x2ad071,'content':_0x29224a,'mention':_0x348c74},_0x325d5a=await this[_0x59ef37(0xe8)][_0x59ef37(0x12f)]('/universer-api/comment/unit/'+_0x2ad071+'/add',{'body':_0x1abd44});return X(_0x325d5a[_0x59ef37(0x122)][_0x59ef37(0x12a)],_0x6256c5);}}async[_0xa7205c(0xe6)](_0x5d8413){const _0x3aa1c1=_0xa7205c;var _0x534e59,_0x180c52;const {text:_0x2de538,unitId:_0x52fb6a}=_0x5d8413,_0x3ef212=(_0x180c52=(_0x534e59=_0x2de538[_0x3aa1c1(0x14c)])==null?void 0x0:_0x534e59[_0x3aa1c1(0x14a)](_0x4abf8c=>_0x4abf8c[_0x3aa1c1(0x10a)]===_0x5db075[_0x3aa1c1(0x130)])[_0x3aa1c1(0x131)](_0x2eb69b=>_0x2eb69b[_0x3aa1c1(0x13f)]))!=null?_0x180c52:[],_0x3d4ca1=JSON[_0x3aa1c1(0x13d)](_0x2de538),_0x5df793=_0x5d8413[_0x3aa1c1(0xf1)],_0x12794f=_0x5d8413['id'],_0x3cf19e={'memberId':(await this['_sessionService'][_0x3aa1c1(0xf6)](_0x52fb6a))[_0x3aa1c1(0xed)](),'unitId':_0x52fb6a,'threadId':_0x5df793,'mention':_0x3ef212,'content':_0x3d4ca1,'replyId':_0x12794f},_0x22bdd7=await this['_httpService'][_0x3aa1c1(0x12f)]('/universer-api/comment/unit/'+_0x52fb6a+'/edit',{'body':_0x3cf19e});return!_0x22bdd7[_0x3aa1c1(0x122)][_0x3aa1c1(0x100)]||_0x22bdd7[_0x3aa1c1(0x122)][_0x3aa1c1(0x100)][_0x3aa1c1(0x120)]===0x1;}async[_0xa7205c(0x108)](_0xb09c76){const _0x12dfb0=_0xa7205c,{unitId:_0x460328}=_0xb09c76,_0x14e324=_0xb09c76[_0x12dfb0(0xf1)],_0x50c6c1={'memberId':this[_0x12dfb0(0xe9)][_0x12dfb0(0x129)]()[_0x12dfb0(0x126)],'unitId':_0x460328,'threadId':_0x14e324,'solved':_0xb09c76[_0x12dfb0(0x12b)]?I[_0x12dfb0(0x10b)]:I[_0x12dfb0(0x110)]},_0xa12614=await this[_0x12dfb0(0xe8)][_0x12dfb0(0x12f)](_0x12dfb0(0x121)+_0x460328+_0x12dfb0(0x12d),{'body':_0x50c6c1});return!_0xa12614[_0x12dfb0(0x122)]['error']||_0xa12614['body']['error'][_0x12dfb0(0x120)]===0x1;}async[_0xa7205c(0x105)](_0x28ddbd,_0x8fcfbe,_0x237c42,_0x2fb808){const _0xd06161=_0xa7205c,_0x5bed67={'memberId':(await this[_0xd06161(0x119)][_0xd06161(0xf6)](_0x28ddbd))[_0xd06161(0xed)](),'threadId':_0x237c42,'replyId':_0x2fb808,'unitId':_0x28ddbd},_0x40d8c5=await this[_0xd06161(0xe8)]['post'](_0xd06161(0x121)+_0x28ddbd+_0xd06161(0x115),{'body':_0x5bed67});return!_0x40d8c5[_0xd06161(0x122)][_0xd06161(0x100)]||_0x40d8c5['body']['error'][_0xd06161(0x120)]===0x1;}async[_0xa7205c(0xf0)](_0x55f1da,_0xa1539b,_0x2b42e4){const _0x149183=_0xa7205c,_0x14bc2b={'unitId':_0x55f1da,'threadId':_0x2b42e4},_0x2f5512=await this[_0x149183(0xe8)][_0x149183(0x12f)]('/universer-api/comment/unit/'+_0x55f1da+_0x149183(0x102),{'body':_0x14bc2b}),_0x373da4=_0x2b42e4[_0x149183(0x131)](_0x1d9a89=>ee(_0x2f5512[_0x149183(0x122)]['comments'][_0x1d9a89],_0x55f1da,_0xa1539b))['filter'](Boolean);return Object[_0x149183(0xf4)](_0x2f5512[_0x149183(0x122)][_0x149183(0x145)])[_0x149183(0x118)](_0x19c02a=>{const _0x355c65=_0x149183;this[_0x355c65(0xe9)][_0x355c65(0x106)](_0x19c02a);}),_0x373da4;}[_0xa7205c(0x10e)](_0x5c971b){const _0x1d58cf=_0xa7205c;return{'id':_0x5c971b['id'],'threadId':_0x5c971b[_0x1d58cf(0xf1)],'ref':_0x5c971b[_0x1d58cf(0x127)]};}};function _0x46db(_0x42809c,_0x44816e){_0x42809c=_0x42809c-0xe6;const _0x41e77d=_0x41e7();let _0x46db0a=_0x41e77d[_0x42809c];return _0x46db0a;}S=Q([b(0x0,_0x28a1f8(_0x25424b)),b(0x1,_0x28a1f8(_0x18abd9)),b(0x2,_0x28a1f8(_0x3318dd))],S);var re=Object[_0xa7205c(0x10c)],te=(_0x4b8a50,_0x5d2732,_0x5866ce,_0x2c164d)=>{const _0x5af5ed=_0xa7205c;for(var _0xc213b0=_0x2c164d>0x1?void 0x0:_0x2c164d?re(_0x5d2732,_0x5866ce):_0x5d2732,_0x2ee5b6=_0x4b8a50[_0x5af5ed(0xec)]-0x1,_0x48cd51;_0x2ee5b6>=0x0;_0x2ee5b6--)(_0x48cd51=_0x4b8a50[_0x2ee5b6])&&(_0xc213b0=_0x48cd51(_0xc213b0)||_0xc213b0);return _0xc213b0;},M=(_0x36fd81,_0x391074)=>(_0x295041,_0x3cf1b4)=>_0x391074(_0x295041,_0x3cf1b4,_0x36fd81);let f=class extends _0x356b4e{constructor(_0x28cbc5,_0x4d0518){const _0xa3ea57=_0xa7205c;super(),this[_0xa3ea57(0xee)]=_0x28cbc5,this[_0xa3ea57(0x138)]=_0x4d0518,this[_0xa3ea57(0x14d)]();}[_0xa7205c(0x14d)](){const _0x42859e=_0xa7205c;this['_threadCommentDataSourceService'][_0x42859e(0x143)]=this[_0x42859e(0x138)],this[_0x42859e(0xee)][_0x42859e(0x123)]=!0x1;}};f=te([M(0x0,_0x450486),M(0x1,_0x28a1f8(S))],f);var se=Object[_0xa7205c(0xff)],oe=Object[_0xa7205c(0x10c)],ne=(_0x2a8a3a,_0x48dd36,_0x1155f3)=>_0x48dd36 in _0x2a8a3a?se(_0x2a8a3a,_0x48dd36,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1155f3}):_0x2a8a3a[_0x48dd36]=_0x1155f3,ie=(_0x1876c3,_0x42b808,_0x38a856,_0x522b64)=>{for(var _0x551bde=_0x522b64>0x1?void 0x0:_0x522b64?oe(_0x42b808,_0x38a856):_0x42b808,_0x33c62f=_0x1876c3['length']-0x1,_0x1a898e;_0x33c62f>=0x0;_0x33c62f--)(_0x1a898e=_0x1876c3[_0x33c62f])&&(_0x551bde=_0x1a898e(_0x551bde)||_0x551bde);return _0x551bde;},N=(_0x3c5eb5,_0x293b8d)=>(_0x5a9e42,_0x402533)=>_0x293b8d(_0x5a9e42,_0x402533,_0x3c5eb5),$=(_0x421339,_0x26cb25,_0x179e6d)=>ne(_0x421339,typeof _0x26cb25!='symbol'?_0x26cb25+'':_0x26cb25,_0x179e6d);let g=class extends _0x88c673{constructor(_0x556791=O,_0x50e64a,_0x48aad2){const _0x559c89=_0xa7205c;super(),this['_config']=_0x556791,this[_0x559c89(0x10d)]=_0x50e64a,this[_0x559c89(0x136)]=_0x48aad2;const {..._0x2cecea}=_0x403e38({},O,this['_config']);this['_configService']['setConfig'](z,_0x2cecea);}[_0xa7205c(0x13e)](){const _0x556fb1=_0xa7205c;[[S],[f],[_]][_0x556fb1(0x118)](_0x34bdd9=>{this['_injector']['add'](_0x34bdd9);});}['onReady'](){const _0x28f55f=_0xa7205c;this[_0x28f55f(0x10d)][_0x28f55f(0xef)](f),this[_0x28f55f(0x10d)][_0x28f55f(0xef)](_);}};$(g,_0xa7205c(0xf2),W),$(g,'type',_0x1945c7[_0xa7205c(0x11e)]),g=ie([_0x20ab80(_0x798c6,_0x2c98f7,_0x52f3b9),N(0x1,_0x28a1f8(_0x54d40d)),N(0x2,_0x476b8d)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0xe6a052=_0x4fcb;(function(_0x24bf2d,_0x4f925b){const _0x7e76f8=_0x4fcb,_0x347f4d=_0x24bf2d();while(!![]){try{const _0x5d0bd8=parseInt(_0x7e76f8(0x1a2))/0x1+parseInt(_0x7e76f8(0x1a1))/0x2*(-parseInt(_0x7e76f8(0x17f))/0x3)+parseInt(_0x7e76f8(0x19d))/0x4+parseInt(_0x7e76f8(0x166))/0x5+parseInt(_0x7e76f8(0x160))/0x6+parseInt(_0x7e76f8(0x13f))/0x7*(parseInt(_0x7e76f8(0x15a))/0x8)+-parseInt(_0x7e76f8(0x164))/0x9;if(_0x5d0bd8===_0x4f925b)break;else _0x347f4d['push'](_0x347f4d['shift']());}catch(_0x38de5c){_0x347f4d['push'](_0x347f4d['shift']());}}}(_0x4b0e,0xef927));import{CommentService as _0xb08f,CollaborationSessionService as _0x567848,UniverCollaborationClientPlugin as _0x5ad52c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2fbf2b}from'@univerjs-pro/license';import{dayjs as _0x13a1d2,UserManagerService as _0x38029a,Inject as _0x12192d,Injector as _0xf533d4,Disposable as _0x2c54e0,CustomRangeType as _0x109d28,UniverInstanceType as _0x3870f6,DependentOn as _0x3bfe6e,IConfigService as _0x2536f6,Plugin as _0x348a81,merge as _0x20dbf3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4c1e57}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38ef02,IThreadCommentDataSourceService as _0x292b6b}from'@univerjs/thread-comment';function _0x4b0e(){const _0x148abd=['259862nRqodf','map','updateComment','rangeId','Edit','112GBCSbs','find','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','payload','addUser','size','solved','createTimestamp','format','_commentService','unitId','UNRECOGNIZED','symbol','/universer-api/user/list','_init','content','personId','filter','length','onStarting','stringify','rangeType','/list','pipe','_threadCommentDataSource','users','_initDataSource','250784IPgRwp','user','_threadCommentModel','get','post','/solved','1787670PPPbVs','body','replyId','slice','9090018NCQebj','parentId','8100085tYIXBn','pluginName','Add','customRanges','resolved','YYYY/MM/DD\x20HH:mm','Reply','_injector','delete','userID','forEach','_configService','Solve','OpenOrReOpen','userId','_httpService','_sessionService','onReady','commentUpdate$','comments','listComments','root','COMMENT','add','disposeWithMe','30RSChrF','deleteComment','reply','getMemberID','subscribe','requireSession','_threadCommentDataSourceService','code','Delete','getUnit','/add','_config','threadId','Solved','/universer-api/comment/unit/','Unknown','resolveComment','getCurrentUser','error','dataSource','getOwnPropertyDescriptor','_userService','replies','type','getComment','saveCommentToSnapshot','_initUserSync','values','thread-comment-data-source.config','defineProperty','4762428XHmqFc','parse','addComment','/edit','375742UBBABf'];_0x4b0e=function(){return _0x148abd;};return _0x4b0e();}import{bufferTime as _0x26be54}from'rxjs';import{HTTPService as _0x486692}from'@univerjs/network';const W=_0xe6a052(0x141);var I=(_0x12fb0b=>(_0x12fb0b[_0x12fb0b[_0xe6a052(0x173)]=0x0]=_0xe6a052(0x173),_0x12fb0b[_0x12fb0b['Solved']=0x1]=_0xe6a052(0x18c),_0x12fb0b[_0x12fb0b['UNRECOGNIZED']=-0x1]=_0xe6a052(0x14a),_0x12fb0b))(I||{}),v=(_0x475ce0=>(_0x475ce0[_0x475ce0[_0xe6a052(0x18e)]=0x0]='Unknown',_0x475ce0[_0x475ce0[_0xe6a052(0x168)]=0x1]=_0xe6a052(0x168),_0x475ce0[_0x475ce0[_0xe6a052(0x16c)]=0x2]=_0xe6a052(0x16c),_0x475ce0[_0x475ce0[_0xe6a052(0x13e)]=0x3]='Edit',_0x475ce0[_0x475ce0[_0xe6a052(0x187)]=0x4]=_0xe6a052(0x187),_0x475ce0[_0x475ce0[_0xe6a052(0x172)]=0x5]=_0xe6a052(0x172),_0x475ce0[_0x475ce0[_0xe6a052(0x14a)]=-0x1]=_0xe6a052(0x14a),_0x475ce0))(v||{});const y=_0x21d1d8=>_0x13a1d2(new Date(+_0x21d1d8))[_0xe6a052(0x147)](_0xe6a052(0x16b)),B=async(_0x3d10f5,_0x37c479)=>{const _0x1ff679=_0xe6a052,_0x56d22c=_0x3d10f5[_0x1ff679(0x15d)](_0x38029a),_0x2e17f9=_0x3d10f5[_0x1ff679(0x15d)](_0x486692);_0x37c479[_0x1ff679(0x170)](_0x72a39a=>{const _0x5ab5eb=_0x1ff679;_0x56d22c['getUser'](_0x72a39a)&&_0x37c479[_0x5ab5eb(0x16e)](_0x72a39a);}),_0x37c479[_0x1ff679(0x144)]&&(await _0x2e17f9[_0x1ff679(0x15d)](_0x1ff679(0x14c),{'params':{'userIDs':[..._0x37c479]}}))[_0x1ff679(0x161)][_0x1ff679(0x158)]['forEach'](_0xb175b8=>{const _0x317093=_0x1ff679;_0xb175b8&&_0x56d22c[_0x317093(0x143)](_0xb175b8);});};function _0x4fcb(_0x405347,_0x34f04e){_0x405347=_0x405347-0x13d;const _0x4b0e98=_0x4b0e();let _0x4fcb05=_0x4b0e98[_0x405347];return _0x4fcb05;}var K=Object['getOwnPropertyDescriptor'],V=(_0x5b1ef9,_0xdf9bbd,_0x17667b,_0x39b8a0)=>{for(var _0x3dc491=_0x39b8a0>0x1?void 0x0:_0x39b8a0?K(_0xdf9bbd,_0x17667b):_0xdf9bbd,_0x52b412=_0x5b1ef9['length']-0x1,_0x27386e;_0x52b412>=0x0;_0x52b412--)(_0x27386e=_0x5b1ef9[_0x52b412])&&(_0x3dc491=_0x27386e(_0x3dc491)||_0x3dc491);return _0x3dc491;},p=(_0x36b307,_0x42fa51)=>(_0x4feef0,_0x44690c)=>_0x42fa51(_0x4feef0,_0x44690c,_0x36b307);let _=class extends _0x2c54e0{constructor(_0x1d15a4,_0x181d93,_0x18b03b,_0x52786a){const _0x71fad4=_0xe6a052;super(),this['_commentService']=_0x1d15a4,this[_0x71fad4(0x15c)]=_0x181d93,this[_0x71fad4(0x194)]=_0x18b03b,this[_0x71fad4(0x16d)]=_0x52786a,this[_0x71fad4(0x14d)](),this[_0x71fad4(0x199)]();}['_initUserSync'](){const _0x2eb814=_0xe6a052;this[_0x2eb814(0x17e)](this[_0x2eb814(0x15c)][_0x2eb814(0x178)][_0x2eb814(0x156)](_0x26be54(0x10))['subscribe'](_0x3a642a=>{const _0x2ca5a0=_0x2eb814,_0x51c038=new Set();_0x3a642a['forEach'](_0x59daf8=>{const _0x3f0685=_0x4fcb;if(_0x59daf8[_0x3f0685(0x196)]===_0x3f0685(0x17d)){const _0x543e2e=_0x59daf8[_0x3f0685(0x142)][_0x3f0685(0x14f)];_0x51c038[_0x3f0685(0x17d)](_0x543e2e);}}),B(this[_0x2ca5a0(0x16d)],_0x51c038);}));}['_init'](){const _0x1da173=_0xe6a052;this[_0x1da173(0x17e)](this[_0x1da173(0x148)][_0x1da173(0x178)][_0x1da173(0x183)](async _0x440938=>{const _0x2f9c48=_0x1da173;var _0xcf35fd,_0x198d5e,_0x270bd2,_0x201a10;const _0x2b1dd3=(_0xcf35fd=this['_threadCommentModel'][_0x2f9c48(0x188)](_0x440938[_0x2f9c48(0x149)])['find'](_0xb5e806=>_0xb5e806[_0x2f9c48(0x18b)]===_0x440938[_0x2f9c48(0x18b)]))==null?void 0x0:_0xcf35fd['root'];if(!_0x2b1dd3)return;const {unitId:_0x193aee,subUnitId:_0xf933cd}=_0x2b1dd3;switch(_0x440938[_0x2f9c48(0x15b)]&&this[_0x2f9c48(0x194)]['addUser'](_0x440938[_0x2f9c48(0x15b)]),_0x440938[_0x2f9c48(0x196)]){case v['Add']:break;case v[_0x2f9c48(0x16c)]:{this[_0x2f9c48(0x15c)]['addComment'](_0x193aee,_0xf933cd,{'unitId':_0x193aee,'subUnitId':_0xf933cd,'ref':'','id':_0x440938[_0x2f9c48(0x162)],'dT':y(+_0x440938[_0x2f9c48(0x146)]),'threadId':_0x440938['threadId'],'personId':(_0x270bd2=(_0x198d5e=_0x440938[_0x2f9c48(0x15b)])==null?void 0x0:_0x198d5e[_0x2f9c48(0x16f)])!=null?_0x270bd2:_0x440938[_0x2f9c48(0x174)],'text':JSON['parse'](_0x440938['content']),'parentId':_0x2b1dd3['id']});break;}case v['Delete']:{const _0x50226b=this[_0x2f9c48(0x15c)][_0x2f9c48(0x197)](_0x193aee,_0xf933cd,_0x440938[_0x2f9c48(0x162)]);_0x50226b&&_0x50226b[_0x2f9c48(0x165)]&&this[_0x2f9c48(0x15c)]['deleteComment'](_0x193aee,_0xf933cd,_0x440938['replyId']);break;}case v['Edit']:{this[_0x2f9c48(0x15c)][_0x2f9c48(0x1a4)](_0x193aee,_0xf933cd,{'commentId':_0x440938[_0x2f9c48(0x162)],'text':JSON[_0x2f9c48(0x19e)](_0x440938[_0x2f9c48(0x14e)])});break;}case v[_0x2f9c48(0x172)]:{const _0x2b69e0=(_0x201a10=this[_0x2f9c48(0x15c)][_0x2f9c48(0x188)](_0x440938[_0x2f9c48(0x149)])[_0x2f9c48(0x140)](_0x2289b8=>_0x2289b8['threadId']===_0x440938['threadId']))==null?void 0x0:_0x201a10[_0x2f9c48(0x17b)];_0x2b69e0&&this[_0x2f9c48(0x15c)]['resolveComment'](_0x193aee,_0xf933cd,_0x2b69e0['id'],_0x440938[_0x2f9c48(0x145)]===I[_0x2f9c48(0x18c)]);break;}}}));}};_=V([p(0x0,_0x12192d(_0xb08f)),p(0x1,_0x12192d(_0x38ef02)),p(0x2,_0x12192d(_0x38029a)),p(0x3,_0x12192d(_0xf533d4))],_);const z=_0xe6a052(0x19b),O={};var k=Object[_0xe6a052(0x193)],Q=(_0x3e436f,_0x342a09,_0x235486,_0x395e32)=>{const _0x17517e=_0xe6a052;for(var _0xe70f30=_0x395e32>0x1?void 0x0:_0x395e32?k(_0x342a09,_0x235486):_0x342a09,_0x9acd04=_0x3e436f[_0x17517e(0x151)]-0x1,_0x2a9430;_0x9acd04>=0x0;_0x9acd04--)(_0x2a9430=_0x3e436f[_0x9acd04])&&(_0xe70f30=_0x2a9430(_0xe70f30)||_0xe70f30);return _0xe70f30;},b=(_0x5e3d88,_0x17fb4b)=>(_0x916747,_0x34bfe0)=>_0x17fb4b(_0x916747,_0x34bfe0,_0x5e3d88);function X(_0x225c7d,_0x121dbb){const _0x5d6d65=_0xe6a052,_0x4223e6=_0x225c7d[_0x5d6d65(0x195)][0x0];return{..._0x121dbb,'id':_0x4223e6[_0x5d6d65(0x162)],'resolved':_0x225c7d[_0x5d6d65(0x145)]===0x1,'dT':y(_0x4223e6[_0x5d6d65(0x146)]),'personId':_0x4223e6['userId'],'threadId':_0x4223e6[_0x5d6d65(0x18b)]};}function ee(_0x51a597,_0x48ca9c,_0x15ba24){const _0x5be51a=_0xe6a052;var _0x399abb,_0x269511;if(((_0x269511=(_0x399abb=_0x51a597==null?void 0x0:_0x51a597[_0x5be51a(0x195)])==null?void 0x0:_0x399abb[_0x5be51a(0x151)])!=null?_0x269511:0x0)>0x0){const _0x299127=(_0x5b580a,_0x36315a)=>({'id':_0x5b580a[_0x5be51a(0x162)],'threadId':_0x5b580a[_0x5be51a(0x18b)],'dT':y(_0x5b580a[_0x5be51a(0x146)]),'personId':_0x5b580a[_0x5be51a(0x174)],'resolved':_0x51a597[_0x5be51a(0x145)]===I[_0x5be51a(0x18c)],'unitId':_0x48ca9c,'subUnitId':_0x15ba24,'text':JSON[_0x5be51a(0x19e)](_0x5b580a[_0x5be51a(0x14e)]),'parentId':_0x36315a}),_0x57e257=_0x299127(_0x51a597['replies'][0x0]);return{..._0x57e257,'children':_0x51a597[_0x5be51a(0x195)][_0x5be51a(0x163)](0x1)[_0x5be51a(0x1a3)](_0x4e1e55=>_0x299127(_0x4e1e55,_0x57e257['id']))};}return null;}let S=class{constructor(_0x2fb2af,_0x331a75,_0x201029){const _0x31526c=_0xe6a052;this['_httpService']=_0x2fb2af,this[_0x31526c(0x194)]=_0x331a75,this[_0x31526c(0x176)]=_0x201029;}async[_0xe6a052(0x19f)](_0x4f4d22){const _0x941846=_0xe6a052;var _0x4a4924,_0x2a81ca;const {parentId:_0x40f5eb,unitId:_0x35db58,text:_0x4b9e4a,threadId:_0x226d71}=_0x4f4d22,_0x3bfcfa=(_0x2a81ca=(_0x4a4924=_0x4b9e4a[_0x941846(0x169)])==null?void 0x0:_0x4a4924[_0x941846(0x150)](_0x119034=>_0x119034['rangeType']===_0x109d28['COMMENT'])['map'](_0x2d7baf=>_0x2d7baf[_0x941846(0x13d)]))!=null?_0x2a81ca:[],_0xccb6a7=JSON[_0x941846(0x153)](_0x4b9e4a),_0x3559d5=(await this[_0x941846(0x176)][_0x941846(0x184)](_0x35db58))[_0x941846(0x182)]();if(_0x40f5eb){const _0x4b0454={'memberId':_0x3559d5,'unitId':_0x35db58,'content':_0xccb6a7,'mention':_0x3bfcfa,'threadId':_0x226d71},_0x2551c6=(await this[_0x941846(0x175)][_0x941846(0x15e)](_0x941846(0x18d)+_0x35db58+'/reply',{'body':_0x4b0454}))['body'][_0x941846(0x181)];return{..._0x4f4d22,'id':_0x2551c6[_0x941846(0x162)],'dT':_0x13a1d2(+_0x2551c6[_0x941846(0x146)])[_0x941846(0x147)](_0x941846(0x16b)),'personId':_0x2551c6[_0x941846(0x174)]};}else{const _0x2fe52f={'memberId':_0x3559d5,'unitId':_0x35db58,'content':_0xccb6a7,'mention':_0x3bfcfa},_0x57f240=await this[_0x941846(0x175)][_0x941846(0x15e)]('/universer-api/comment/unit/'+_0x35db58+_0x941846(0x189),{'body':_0x2fe52f});return X(_0x57f240['body']['comment'],_0x4f4d22);}}async[_0xe6a052(0x1a4)](_0x204d2c){const _0x4af545=_0xe6a052;var _0x50c019,_0x5b41f5;const {text:_0x174606,unitId:_0x590a43}=_0x204d2c,_0x2f3573=(_0x5b41f5=(_0x50c019=_0x174606[_0x4af545(0x169)])==null?void 0x0:_0x50c019[_0x4af545(0x150)](_0x3e709c=>_0x3e709c[_0x4af545(0x154)]===_0x109d28[_0x4af545(0x17c)])[_0x4af545(0x1a3)](_0x2f5c51=>_0x2f5c51[_0x4af545(0x13d)]))!=null?_0x5b41f5:[],_0x3b2046=JSON[_0x4af545(0x153)](_0x174606),_0x1ab213=_0x204d2c[_0x4af545(0x18b)],_0x2251fa=_0x204d2c['id'],_0x458644={'memberId':(await this[_0x4af545(0x176)][_0x4af545(0x184)](_0x590a43))[_0x4af545(0x182)](),'unitId':_0x590a43,'threadId':_0x1ab213,'mention':_0x2f3573,'content':_0x3b2046,'replyId':_0x2251fa},_0x34cc7f=await this[_0x4af545(0x175)][_0x4af545(0x15e)](_0x4af545(0x18d)+_0x590a43+_0x4af545(0x1a0),{'body':_0x458644});return!_0x34cc7f[_0x4af545(0x161)][_0x4af545(0x191)]||_0x34cc7f[_0x4af545(0x161)][_0x4af545(0x191)][_0x4af545(0x186)]===0x1;}async[_0xe6a052(0x18f)](_0x5f43cf){const _0x2aba21=_0xe6a052,{unitId:_0xdf3484}=_0x5f43cf,_0x55e94e=_0x5f43cf[_0x2aba21(0x18b)],_0x50c4ed={'memberId':this['_userService'][_0x2aba21(0x190)]()[_0x2aba21(0x16f)],'unitId':_0xdf3484,'threadId':_0x55e94e,'solved':_0x5f43cf[_0x2aba21(0x16a)]?I[_0x2aba21(0x18c)]:I[_0x2aba21(0x173)]},_0x16a97e=await this['_httpService'][_0x2aba21(0x15e)](_0x2aba21(0x18d)+_0xdf3484+_0x2aba21(0x15f),{'body':_0x50c4ed});return!_0x16a97e[_0x2aba21(0x161)][_0x2aba21(0x191)]||_0x16a97e['body']['error'][_0x2aba21(0x186)]===0x1;}async[_0xe6a052(0x180)](_0x271530,_0xf50eb9,_0x28df2e,_0x248c8c){const _0x3836f7=_0xe6a052,_0xd3644f={'memberId':(await this[_0x3836f7(0x176)]['requireSession'](_0x271530))[_0x3836f7(0x182)](),'threadId':_0x28df2e,'replyId':_0x248c8c,'unitId':_0x271530},_0x275028=await this[_0x3836f7(0x175)][_0x3836f7(0x15e)](_0x3836f7(0x18d)+_0x271530+'/delete',{'body':_0xd3644f});return!_0x275028[_0x3836f7(0x161)][_0x3836f7(0x191)]||_0x275028[_0x3836f7(0x161)][_0x3836f7(0x191)]['code']===0x1;}async[_0xe6a052(0x17a)](_0x4453c1,_0x6434b7,_0x1ee2a3){const _0x25e3f4=_0xe6a052,_0x2d3f00={'unitId':_0x4453c1,'threadId':_0x1ee2a3},_0x2be0c7=await this[_0x25e3f4(0x175)]['post'](_0x25e3f4(0x18d)+_0x4453c1+_0x25e3f4(0x155),{'body':_0x2d3f00}),_0xe05332=_0x1ee2a3[_0x25e3f4(0x1a3)](_0xedfe4e=>ee(_0x2be0c7[_0x25e3f4(0x161)][_0x25e3f4(0x179)][_0xedfe4e],_0x4453c1,_0x6434b7))[_0x25e3f4(0x150)](Boolean);return Object[_0x25e3f4(0x19a)](_0x2be0c7[_0x25e3f4(0x161)][_0x25e3f4(0x158)])[_0x25e3f4(0x170)](_0x5b1dbd=>{const _0x21e398=_0x25e3f4;this['_userService'][_0x21e398(0x143)](_0x5b1dbd);}),_0xe05332;}[_0xe6a052(0x198)](_0x2f98b8){const _0x509092=_0xe6a052;return{'id':_0x2f98b8['id'],'threadId':_0x2f98b8[_0x509092(0x18b)],'ref':_0x2f98b8['ref']};}};S=Q([b(0x0,_0x12192d(_0x486692)),b(0x1,_0x12192d(_0x38029a)),b(0x2,_0x12192d(_0x567848))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x2dda0e,_0x200e47,_0x463783,_0x11be95)=>{const _0x2c1743=_0xe6a052;for(var _0x3c821d=_0x11be95>0x1?void 0x0:_0x11be95?re(_0x200e47,_0x463783):_0x200e47,_0x3c887b=_0x2dda0e[_0x2c1743(0x151)]-0x1,_0x5c5162;_0x3c887b>=0x0;_0x3c887b--)(_0x5c5162=_0x2dda0e[_0x3c887b])&&(_0x3c821d=_0x5c5162(_0x3c821d)||_0x3c821d);return _0x3c821d;},M=(_0x251002,_0x4e911e)=>(_0x315f61,_0x22d594)=>_0x4e911e(_0x315f61,_0x22d594,_0x251002);let f=class extends _0x2c54e0{constructor(_0x214b15,_0x899d0e){const _0x268dc6=_0xe6a052;super(),this['_threadCommentDataSourceService']=_0x214b15,this[_0x268dc6(0x157)]=_0x899d0e,this['_initDataSource']();}[_0xe6a052(0x159)](){const _0x1d1a56=_0xe6a052;this[_0x1d1a56(0x185)][_0x1d1a56(0x192)]=this[_0x1d1a56(0x157)],this[_0x1d1a56(0x185)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x292b6b),M(0x1,_0x12192d(S))],f);var se=Object[_0xe6a052(0x19c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1f4026,_0x2caddf,_0x3d9fa6)=>_0x2caddf in _0x1f4026?se(_0x1f4026,_0x2caddf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d9fa6}):_0x1f4026[_0x2caddf]=_0x3d9fa6,ie=(_0x1e6e22,_0x374349,_0x45c5d2,_0x56e1a3)=>{const _0x27a7dd=_0xe6a052;for(var _0x4577e5=_0x56e1a3>0x1?void 0x0:_0x56e1a3?oe(_0x374349,_0x45c5d2):_0x374349,_0x4bae33=_0x1e6e22[_0x27a7dd(0x151)]-0x1,_0x55e71f;_0x4bae33>=0x0;_0x4bae33--)(_0x55e71f=_0x1e6e22[_0x4bae33])&&(_0x4577e5=_0x55e71f(_0x4577e5)||_0x4577e5);return _0x4577e5;},N=(_0x5952e0,_0x2439fe)=>(_0x44757f,_0x1fe3a5)=>_0x2439fe(_0x44757f,_0x1fe3a5,_0x5952e0),$=(_0x43f1a5,_0x37509a,_0x5aed8c)=>ne(_0x43f1a5,typeof _0x37509a!=_0xe6a052(0x14b)?_0x37509a+'':_0x37509a,_0x5aed8c);let g=class extends _0x348a81{constructor(_0x43b060=O,_0x56fb0b,_0xdb6bf4){const _0x3b877e=_0xe6a052;super(),this[_0x3b877e(0x18a)]=_0x43b060,this[_0x3b877e(0x16d)]=_0x56fb0b,this['_configService']=_0xdb6bf4;const {..._0x592d69}=_0x20dbf3({},O,this[_0x3b877e(0x18a)]);this[_0x3b877e(0x171)]['setConfig'](z,_0x592d69);}[_0xe6a052(0x152)](){const _0x45b801=_0xe6a052;[[S],[f],[_]][_0x45b801(0x170)](_0x5c8711=>{const _0x3fa95d=_0x45b801;this[_0x3fa95d(0x16d)]['add'](_0x5c8711);});}[_0xe6a052(0x177)](){const _0x11b704=_0xe6a052;this[_0x11b704(0x16d)]['get'](f),this[_0x11b704(0x16d)][_0x11b704(0x15d)](_);}};$(g,_0xe6a052(0x167),W),$(g,'type',_0x3870f6['UNIVER_UNKNOWN']),g=ie([_0x3bfe6e(_0x4c1e57,_0x5ad52c,_0x2fbf2b),N(0x1,_0x12192d(_0xf533d4)),N(0x2,_0x2536f6)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x31fa3c,_0x387e4d){const _0x3d6ccf=_0x7bf0,_0x356f01=_0x31fa3c();while(!![]){try{const _0x58498e=-parseInt(_0x3d6ccf(0x12e))/0x1+-parseInt(_0x3d6ccf(0x119))/0x2*(-parseInt(_0x3d6ccf(0xe9))/0x3)+parseInt(_0x3d6ccf(0xe8))/0x4*(parseInt(_0x3d6ccf(0x146))/0x5)+parseInt(_0x3d6ccf(0x11a))/0x6+-parseInt(_0x3d6ccf(0xf6))/0x7+-parseInt(_0x3d6ccf(0xca))/0x8+-parseInt(_0x3d6ccf(0xdb))/0x9*(-parseInt(_0x3d6ccf(0x120))/0xa);if(_0x58498e===_0x387e4d)break;else _0x356f01['push'](_0x356f01['shift']());}catch(_0x1fb6f0){_0x356f01['push'](_0x356f01['shift']());}}}(_0x1e71,0x18d15),function(_0x68ed5e,_0x531fd0){const _0x440882=_0x7bf0;typeof exports==_0x440882(0xd8)&&typeof module<'u'?_0x531fd0(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==_0x440882(0x104)&&define[_0x440882(0x13a)]?define([_0x440882(0xd5),_0x440882(0xef),_0x440882(0xf3),'@univerjs/core',_0x440882(0x131),_0x440882(0x117),'rxjs',_0x440882(0x126)],_0x531fd0):(_0x68ed5e=typeof globalThis<'u'?globalThis:_0x68ed5e||self,_0x531fd0(_0x68ed5e[_0x440882(0xeb)]={},_0x68ed5e[_0x440882(0xf7)],_0x68ed5e['UniverProLicense'],_0x68ed5e[_0x440882(0xfc)],_0x68ed5e['UniverThreadCommentUi'],_0x68ed5e['UniverThreadComment'],_0x68ed5e[_0x440882(0xd7)],_0x68ed5e[_0x440882(0x10e)]));}(this,function(_0x493579,_0x239869,_0x52c6be,_0x5c9a82,_0x153901,_0x6a4276,_0x56ece4,_0x1fc00b){'use strict';const _0x3271bc=_0x7bf0;const _0x404753='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x39bd4b=(_0x49323a=>(_0x49323a[_0x49323a['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x49323a[_0x49323a[_0x3271bc(0x114)]=0x1]=_0x3271bc(0x114),_0x49323a[_0x49323a[_0x3271bc(0x100)]=-0x1]=_0x3271bc(0x100),_0x49323a))(_0x39bd4b||{}),_0x47f367=(_0x4619d4=>(_0x4619d4[_0x4619d4['Unknown']=0x0]=_0x3271bc(0xd3),_0x4619d4[_0x4619d4['Add']=0x1]=_0x3271bc(0x148),_0x4619d4[_0x4619d4[_0x3271bc(0x108)]=0x2]=_0x3271bc(0x108),_0x4619d4[_0x4619d4['Edit']=0x3]=_0x3271bc(0x13c),_0x4619d4[_0x4619d4[_0x3271bc(0x10f)]=0x4]='Delete',_0x4619d4[_0x4619d4[_0x3271bc(0x144)]=0x5]=_0x3271bc(0x144),_0x4619d4[_0x4619d4[_0x3271bc(0x100)]=-0x1]=_0x3271bc(0x100),_0x4619d4))(_0x47f367||{});const _0x55c580=_0x4894cd=>_0x5c9a82[_0x3271bc(0xce)](new Date(+_0x4894cd))[_0x3271bc(0x115)](_0x3271bc(0x10b)),_0x428b40=async(_0x2c9d7c,_0x36654d)=>{const _0x56b366=_0x3271bc,_0x15c5c4=_0x2c9d7c['get'](_0x5c9a82[_0x56b366(0x14b)]),_0x536a38=_0x2c9d7c[_0x56b366(0x136)](_0x1fc00b[_0x56b366(0xfd)]);_0x36654d[_0x56b366(0xd2)](_0x13acc3=>{const _0x30051b=_0x56b366;_0x15c5c4[_0x30051b(0x12b)](_0x13acc3)&&_0x36654d[_0x30051b(0x140)](_0x13acc3);}),_0x36654d['size']&&(await _0x536a38[_0x56b366(0x136)](_0x56b366(0xcf),{'params':{'userIDs':[..._0x36654d]}}))[_0x56b366(0xe0)][_0x56b366(0x11e)][_0x56b366(0xd2)](_0x22902e=>{const _0x43bf86=_0x56b366;_0x22902e&&_0x15c5c4[_0x43bf86(0xd9)](_0x22902e);});};var _0x27575f=Object[_0x3271bc(0xc7)],_0x7b8758=(_0x4c5c45,_0x113d1d,_0x3709d0,_0x24b5bf)=>{for(var _0x537835=_0x24b5bf>0x1?void 0x0:_0x24b5bf?_0x27575f(_0x113d1d,_0x3709d0):_0x113d1d,_0x4148b9=_0x4c5c45['length']-0x1,_0x11002e;_0x4148b9>=0x0;_0x4148b9--)(_0x11002e=_0x4c5c45[_0x4148b9])&&(_0x537835=_0x11002e(_0x537835)||_0x537835);return _0x537835;},_0x3f1e5c=(_0x20d3aa,_0xad2120)=>(_0x180607,_0x1253e7)=>_0xad2120(_0x180607,_0x1253e7,_0x20d3aa);let _0x4a25b0=class extends _0x5c9a82['Disposable']{constructor(_0x2dd214,_0x2c2850,_0x4121ef,_0x3e0f03){const _0x1a76b4=_0x3271bc;super(),this[_0x1a76b4(0x133)]=_0x2dd214,this[_0x1a76b4(0xe3)]=_0x2c2850,this[_0x1a76b4(0x142)]=_0x4121ef,this[_0x1a76b4(0xf9)]=_0x3e0f03,this[_0x1a76b4(0xcb)](),this[_0x1a76b4(0x11f)]();}[_0x3271bc(0x11f)](){const _0x47a1d6=_0x3271bc;this[_0x47a1d6(0xf4)](this['_threadCommentModel'][_0x47a1d6(0x127)][_0x47a1d6(0x125)](_0x56ece4[_0x47a1d6(0x132)](0x10))[_0x47a1d6(0xed)](_0x4d2d57=>{const _0x604c5e=_0x47a1d6,_0x440ccf=new Set();_0x4d2d57['forEach'](_0x45c4ce=>{const _0x2e2927=_0x7bf0;if(_0x45c4ce['type']==='add'){const _0x2cdb9e=_0x45c4ce[_0x2e2927(0xe1)]['personId'];_0x440ccf[_0x2e2927(0x147)](_0x2cdb9e);}}),_0x428b40(this[_0x604c5e(0xf9)],_0x440ccf);}));}[_0x3271bc(0xcb)](){const _0x4c9a06=_0x3271bc;this[_0x4c9a06(0xf4)](this[_0x4c9a06(0x133)][_0x4c9a06(0x127)][_0x4c9a06(0xed)](async _0x5c3e2d=>{const _0x1a050d=_0x4c9a06;var _0x1f504a,_0x2f425a,_0x23698b,_0xb3552;const _0x4dc926=(_0x1f504a=this['_threadCommentModel']['getUnit'](_0x5c3e2d[_0x1a050d(0x14d)])['find'](_0xd3d6f=>_0xd3d6f[_0x1a050d(0x13d)]===_0x5c3e2d[_0x1a050d(0x13d)]))==null?void 0x0:_0x1f504a['root'];if(!_0x4dc926)return;const {unitId:_0x1d86cb,subUnitId:_0x11a20f}=_0x4dc926;switch(_0x5c3e2d[_0x1a050d(0xf2)]&&this[_0x1a050d(0x142)][_0x1a050d(0xd9)](_0x5c3e2d[_0x1a050d(0xf2)]),_0x5c3e2d[_0x1a050d(0xfe)]){case _0x47f367['Add']:break;case _0x47f367['Reply']:{this[_0x1a050d(0xe3)][_0x1a050d(0x145)](_0x1d86cb,_0x11a20f,{'unitId':_0x1d86cb,'subUnitId':_0x11a20f,'ref':'','id':_0x5c3e2d[_0x1a050d(0x123)],'dT':_0x55c580(+_0x5c3e2d['createTimestamp']),'threadId':_0x5c3e2d['threadId'],'personId':(_0x23698b=(_0x2f425a=_0x5c3e2d['user'])==null?void 0x0:_0x2f425a['userID'])!=null?_0x23698b:_0x5c3e2d[_0x1a050d(0x138)],'text':JSON[_0x1a050d(0x13b)](_0x5c3e2d[_0x1a050d(0x10d)]),'parentId':_0x4dc926['id']});break;}case _0x47f367[_0x1a050d(0x10f)]:{const _0x34fdbd=this[_0x1a050d(0xe3)][_0x1a050d(0x139)](_0x1d86cb,_0x11a20f,_0x5c3e2d[_0x1a050d(0x123)]);_0x34fdbd&&_0x34fdbd[_0x1a050d(0x14a)]&&this[_0x1a050d(0xe3)][_0x1a050d(0xd0)](_0x1d86cb,_0x11a20f,_0x5c3e2d[_0x1a050d(0x123)]);break;}case _0x47f367['Edit']:{this[_0x1a050d(0xe3)][_0x1a050d(0xea)](_0x1d86cb,_0x11a20f,{'commentId':_0x5c3e2d['replyId'],'text':JSON[_0x1a050d(0x13b)](_0x5c3e2d[_0x1a050d(0x10d)])});break;}case _0x47f367[_0x1a050d(0x144)]:{const _0x11da34=(_0xb3552=this[_0x1a050d(0xe3)][_0x1a050d(0xc9)](_0x5c3e2d[_0x1a050d(0x14d)])[_0x1a050d(0x143)](_0x51796f=>_0x51796f['threadId']===_0x5c3e2d[_0x1a050d(0x13d)]))==null?void 0x0:_0xb3552[_0x1a050d(0x149)];_0x11da34&&this[_0x1a050d(0xe3)][_0x1a050d(0x134)](_0x1d86cb,_0x11a20f,_0x11da34['id'],_0x5c3e2d['solved']===_0x39bd4b[_0x1a050d(0x114)]);break;}}}));}};_0x4a25b0=_0x7b8758([_0x3f1e5c(0x0,_0x5c9a82[_0x3271bc(0xd4)](_0x239869[_0x3271bc(0xf8)])),_0x3f1e5c(0x1,_0x5c9a82[_0x3271bc(0xd4)](_0x6a4276[_0x3271bc(0x14e)])),_0x3f1e5c(0x2,_0x5c9a82[_0x3271bc(0xd4)](_0x5c9a82[_0x3271bc(0x14b)])),_0x3f1e5c(0x3,_0x5c9a82[_0x3271bc(0xd4)](_0x5c9a82[_0x3271bc(0x105)]))],_0x4a25b0);const _0x1908f6='thread-comment-data-source.config',_0x3a28d0={};var _0x30b371=Object[_0x3271bc(0xc7)],_0x20e111=(_0x5abc25,_0x35a9c2,_0x49a17c,_0x3772f6)=>{const _0x45f99c=_0x3271bc;for(var _0x5b85b5=_0x3772f6>0x1?void 0x0:_0x3772f6?_0x30b371(_0x35a9c2,_0x49a17c):_0x35a9c2,_0x2d0b86=_0x5abc25[_0x45f99c(0xe5)]-0x1,_0x5c50c3;_0x2d0b86>=0x0;_0x2d0b86--)(_0x5c50c3=_0x5abc25[_0x2d0b86])&&(_0x5b85b5=_0x5c50c3(_0x5b85b5)||_0x5b85b5);return _0x5b85b5;},_0x142d77=(_0x5f2d53,_0x5f31fb)=>(_0x416972,_0x1ae9ee)=>_0x5f31fb(_0x416972,_0x1ae9ee,_0x5f2d53);function _0x2a8092(_0x1c6078,_0x3ef35a){const _0x29f466=_0x3271bc,_0x325932=_0x1c6078[_0x29f466(0x121)][0x0];return{..._0x3ef35a,'id':_0x325932['replyId'],'resolved':_0x1c6078[_0x29f466(0x12d)]===0x1,'dT':_0x55c580(_0x325932[_0x29f466(0x10c)]),'personId':_0x325932[_0x29f466(0x138)],'threadId':_0x325932['threadId']};}function _0x2cc8b6(_0x57156b,_0x2f89e5,_0x5b0664){const _0x418ed5=_0x3271bc;var _0x232fe9,_0xe115f7;if(((_0xe115f7=(_0x232fe9=_0x57156b==null?void 0x0:_0x57156b[_0x418ed5(0x121)])==null?void 0x0:_0x232fe9[_0x418ed5(0xe5)])!=null?_0xe115f7:0x0)>0x0){const _0x22d0d5=(_0x528c72,_0x5646b6)=>({'id':_0x528c72[_0x418ed5(0x123)],'threadId':_0x528c72['threadId'],'dT':_0x55c580(_0x528c72[_0x418ed5(0x10c)]),'personId':_0x528c72['userId'],'resolved':_0x57156b[_0x418ed5(0x12d)]===_0x39bd4b['Solved'],'unitId':_0x2f89e5,'subUnitId':_0x5b0664,'text':JSON['parse'](_0x528c72[_0x418ed5(0x10d)]),'parentId':_0x5646b6}),_0xa17b9a=_0x22d0d5(_0x57156b[_0x418ed5(0x121)][0x0]);return{..._0xa17b9a,'children':_0x57156b[_0x418ed5(0x121)]['slice'](0x1)[_0x418ed5(0xcd)](_0x50cd16=>_0x22d0d5(_0x50cd16,_0xa17b9a['id']))};}return null;}let _0x156bbf=class{constructor(_0x3c386d,_0x4d3288,_0x419503){const _0x261889=_0x3271bc;this[_0x261889(0xf5)]=_0x3c386d,this[_0x261889(0x142)]=_0x4d3288,this[_0x261889(0x11b)]=_0x419503;}async['addComment'](_0x42f6d7){const _0x19a092=_0x3271bc;var _0xc4050a,_0x874535;const {parentId:_0x112290,unitId:_0x4e9488,text:_0x197f04,threadId:_0x14f48d}=_0x42f6d7,_0x54a5fe=(_0x874535=(_0xc4050a=_0x197f04['customRanges'])==null?void 0x0:_0xc4050a[_0x19a092(0x110)](_0x992066=>_0x992066[_0x19a092(0xdf)]===_0x5c9a82[_0x19a092(0x103)]['COMMENT'])[_0x19a092(0xcd)](_0x17a798=>_0x17a798['rangeId']))!=null?_0x874535:[],_0xbd8df1=JSON[_0x19a092(0xd6)](_0x197f04),_0x46a64a=(await this['_sessionService'][_0x19a092(0x10a)](_0x4e9488))['getMemberID']();if(_0x112290){const _0x28a776={'memberId':_0x46a64a,'unitId':_0x4e9488,'content':_0xbd8df1,'mention':_0x54a5fe,'threadId':_0x14f48d},_0x5995eb=(await this['_httpService'][_0x19a092(0x107)](_0x19a092(0xda)+_0x4e9488+'/reply',{'body':_0x28a776}))['body']['reply'];return{..._0x42f6d7,'id':_0x5995eb[_0x19a092(0x123)],'dT':_0x5c9a82[_0x19a092(0xce)](+_0x5995eb[_0x19a092(0x10c)])[_0x19a092(0x115)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5995eb[_0x19a092(0x138)]};}else{const _0x5bfbbb={'memberId':_0x46a64a,'unitId':_0x4e9488,'content':_0xbd8df1,'mention':_0x54a5fe},_0x1e1ba9=await this[_0x19a092(0xf5)][_0x19a092(0x107)](_0x19a092(0xda)+_0x4e9488+_0x19a092(0xec),{'body':_0x5bfbbb});return _0x2a8092(_0x1e1ba9[_0x19a092(0xe0)][_0x19a092(0x12a)],_0x42f6d7);}}async[_0x3271bc(0xea)](_0x1b8a01){const _0x179623=_0x3271bc;var _0x3aaf70,_0xb663e2;const {text:_0x2334fd,unitId:_0x1f3843}=_0x1b8a01,_0x38435a=(_0xb663e2=(_0x3aaf70=_0x2334fd['customRanges'])==null?void 0x0:_0x3aaf70[_0x179623(0x110)](_0xc03c3b=>_0xc03c3b[_0x179623(0xdf)]===_0x5c9a82['CustomRangeType'][_0x179623(0xfb)])[_0x179623(0xcd)](_0x4e44ff=>_0x4e44ff[_0x179623(0x102)]))!=null?_0xb663e2:[],_0x11a971=JSON[_0x179623(0xd6)](_0x2334fd),_0x1f6318=_0x1b8a01[_0x179623(0x13d)],_0x41f250=_0x1b8a01['id'],_0x3398d8={'memberId':(await this[_0x179623(0x11b)]['requireSession'](_0x1f3843))[_0x179623(0x13e)](),'unitId':_0x1f3843,'threadId':_0x1f6318,'mention':_0x38435a,'content':_0x11a971,'replyId':_0x41f250},_0x571311=await this['_httpService'][_0x179623(0x107)](_0x179623(0xda)+_0x1f3843+_0x179623(0xe7),{'body':_0x3398d8});return!_0x571311[_0x179623(0xe0)][_0x179623(0x11c)]||_0x571311['body'][_0x179623(0x11c)]['code']===0x1;}async[_0x3271bc(0x134)](_0x53a73b){const _0x7bb84f=_0x3271bc,{unitId:_0x485e55}=_0x53a73b,_0x258fbc=_0x53a73b[_0x7bb84f(0x13d)],_0x15a0fa={'memberId':this[_0x7bb84f(0x142)][_0x7bb84f(0x13f)]()[_0x7bb84f(0x109)],'unitId':_0x485e55,'threadId':_0x258fbc,'solved':_0x53a73b[_0x7bb84f(0xff)]?_0x39bd4b[_0x7bb84f(0x114)]:_0x39bd4b[_0x7bb84f(0x128)]},_0x11751e=await this[_0x7bb84f(0xf5)][_0x7bb84f(0x107)]('/universer-api/comment/unit/'+_0x485e55+_0x7bb84f(0xc8),{'body':_0x15a0fa});return!_0x11751e[_0x7bb84f(0xe0)][_0x7bb84f(0x11c)]||_0x11751e['body'][_0x7bb84f(0x11c)][_0x7bb84f(0xdc)]===0x1;}async['deleteComment'](_0xe8993a,_0x3e2748,_0x2c23a9,_0x2c77bb){const _0x15713b=_0x3271bc,_0x321f47={'memberId':(await this[_0x15713b(0x11b)][_0x15713b(0x10a)](_0xe8993a))[_0x15713b(0x13e)](),'threadId':_0x2c23a9,'replyId':_0x2c77bb,'unitId':_0xe8993a},_0x1536e4=await this['_httpService'][_0x15713b(0x107)](_0x15713b(0xda)+_0xe8993a+_0x15713b(0xe2),{'body':_0x321f47});return!_0x1536e4[_0x15713b(0xe0)][_0x15713b(0x11c)]||_0x1536e4[_0x15713b(0xe0)][_0x15713b(0x11c)]['code']===0x1;}async[_0x3271bc(0x124)](_0x1a13dc,_0x38576f,_0x3d47e9){const _0x32eb4b=_0x3271bc,_0xe29d0a={'unitId':_0x1a13dc,'threadId':_0x3d47e9},_0x42fd1b=await this[_0x32eb4b(0xf5)][_0x32eb4b(0x107)](_0x32eb4b(0xda)+_0x1a13dc+_0x32eb4b(0xee),{'body':_0xe29d0a}),_0x21d62a=_0x3d47e9[_0x32eb4b(0xcd)](_0x4ad537=>_0x2cc8b6(_0x42fd1b[_0x32eb4b(0xe0)][_0x32eb4b(0xe4)][_0x4ad537],_0x1a13dc,_0x38576f))['filter'](Boolean);return Object[_0x32eb4b(0x11d)](_0x42fd1b['body']['users'])['forEach'](_0x99b37b=>{const _0x56f678=_0x32eb4b;this[_0x56f678(0x142)]['addUser'](_0x99b37b);}),_0x21d62a;}[_0x3271bc(0x111)](_0x58e2f9){const _0x90e8a2=_0x3271bc;return{'id':_0x58e2f9['id'],'threadId':_0x58e2f9['threadId'],'ref':_0x58e2f9[_0x90e8a2(0x113)]};}};_0x156bbf=_0x20e111([_0x142d77(0x0,_0x5c9a82[_0x3271bc(0xd4)](_0x1fc00b['HTTPService'])),_0x142d77(0x1,_0x5c9a82[_0x3271bc(0xd4)](_0x5c9a82[_0x3271bc(0x14b)])),_0x142d77(0x2,_0x5c9a82[_0x3271bc(0xd4)](_0x239869[_0x3271bc(0xf1)]))],_0x156bbf);var _0x119a1d=Object[_0x3271bc(0xc7)],_0x254f67=(_0x4b0b82,_0x3860a4,_0x1d7435,_0x42b375)=>{const _0x4b5248=_0x3271bc;for(var _0x24db03=_0x42b375>0x1?void 0x0:_0x42b375?_0x119a1d(_0x3860a4,_0x1d7435):_0x3860a4,_0x4d484d=_0x4b0b82[_0x4b5248(0xe5)]-0x1,_0x3d2e2a;_0x4d484d>=0x0;_0x4d484d--)(_0x3d2e2a=_0x4b0b82[_0x4d484d])&&(_0x24db03=_0x3d2e2a(_0x24db03)||_0x24db03);return _0x24db03;},_0x146329=(_0x5448cf,_0x22deda)=>(_0x9790a8,_0x5b5a68)=>_0x22deda(_0x9790a8,_0x5b5a68,_0x5448cf);let _0x46390e=class extends _0x5c9a82[_0x3271bc(0x12c)]{constructor(_0x21b9f7,_0x5c11e4){const _0x1c5897=_0x3271bc;super(),this[_0x1c5897(0xde)]=_0x21b9f7,this[_0x1c5897(0xfa)]=_0x5c11e4,this['_initDataSource']();}['_initDataSource'](){const _0x27b647=_0x3271bc;this[_0x27b647(0xde)][_0x27b647(0xe6)]=this[_0x27b647(0xfa)],this[_0x27b647(0xde)][_0x27b647(0xdd)]=!0x1;}};_0x46390e=_0x254f67([_0x146329(0x0,_0x6a4276[_0x3271bc(0x130)]),_0x146329(0x1,_0x5c9a82[_0x3271bc(0xd4)](_0x156bbf))],_0x46390e);var _0x52c7fd=Object[_0x3271bc(0x141)],_0x569ddc=Object[_0x3271bc(0xc7)],_0x13b162=(_0x328a16,_0x6cb625,_0x2184bf)=>_0x6cb625 in _0x328a16?_0x52c7fd(_0x328a16,_0x6cb625,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2184bf}):_0x328a16[_0x6cb625]=_0x2184bf,_0x5a3792=(_0x1a999,_0x786dc9,_0x19ec33,_0x295db4)=>{const _0x214d6b=_0x3271bc;for(var _0x519bb9=_0x295db4>0x1?void 0x0:_0x295db4?_0x569ddc(_0x786dc9,_0x19ec33):_0x786dc9,_0x4eea81=_0x1a999[_0x214d6b(0xe5)]-0x1,_0x2bc7bd;_0x4eea81>=0x0;_0x4eea81--)(_0x2bc7bd=_0x1a999[_0x4eea81])&&(_0x519bb9=_0x2bc7bd(_0x519bb9)||_0x519bb9);return _0x519bb9;},_0x5ca1e4=(_0xe5fcc1,_0x12ec80)=>(_0x2726d6,_0x4dc5b3)=>_0x12ec80(_0x2726d6,_0x4dc5b3,_0xe5fcc1),_0x2f01f2=(_0x57b874,_0x1515ef,_0x2a0258)=>_0x13b162(_0x57b874,typeof _0x1515ef!=_0x3271bc(0x112)?_0x1515ef+'':_0x1515ef,_0x2a0258);_0x493579['UniverThreadCommentDataSourcePlugin']=class extends _0x5c9a82['Plugin']{constructor(_0x53ba65=_0x3a28d0,_0x619cf8,_0x4b753c){const _0x1bc88a=_0x3271bc;super(),this[_0x1bc88a(0x116)]=_0x53ba65,this[_0x1bc88a(0xf9)]=_0x619cf8,this['_configService']=_0x4b753c;const {..._0x36c1d1}=_0x5c9a82[_0x1bc88a(0xcc)]({},_0x3a28d0,this[_0x1bc88a(0x116)]);this[_0x1bc88a(0xf0)][_0x1bc88a(0xd1)](_0x1908f6,_0x36c1d1);}[_0x3271bc(0x12f)](){const _0x1c5307=_0x3271bc;[[_0x156bbf],[_0x46390e],[_0x4a25b0]][_0x1c5307(0xd2)](_0x55a126=>{const _0x5e4f62=_0x1c5307;this[_0x5e4f62(0xf9)]['add'](_0x55a126);});}[_0x3271bc(0x137)](){const _0x498ac1=_0x3271bc;this[_0x498ac1(0xf9)]['get'](_0x46390e),this[_0x498ac1(0xf9)][_0x498ac1(0x136)](_0x4a25b0);}},_0x2f01f2(_0x493579['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x404753),_0x2f01f2(_0x493579[_0x3271bc(0x118)],_0x3271bc(0xfe),_0x5c9a82[_0x3271bc(0x129)]['UNIVER_UNKNOWN']),_0x493579[_0x3271bc(0x118)]=_0x5a3792([_0x5c9a82[_0x3271bc(0x135)](_0x153901['UniverThreadCommentUIPlugin'],_0x239869[_0x3271bc(0x14c)],_0x52c6be[_0x3271bc(0x122)]),_0x5ca1e4(0x1,_0x5c9a82['Inject'](_0x5c9a82[_0x3271bc(0x105)])),_0x5ca1e4(0x2,_0x5c9a82[_0x3271bc(0x106)])],_0x493579[_0x3271bc(0x118)]),Object['defineProperty'](_0x493579,Symbol[_0x3271bc(0x101)],{'value':'Module'});}));function _0x7bf0(_0x134e1a,_0x38b42d){_0x134e1a=_0x134e1a-0xc7;const _0x1e7193=_0x1e71();let _0x7bf0e6=_0x1e7193[_0x134e1a];return _0x7bf0e6;}function _0x1e71(){const _0x5d1cfb=['solved','48464TitTzn','onStarting','IThreadCommentDataSourceService','@univerjs/thread-comment-ui','bufferTime','_commentService','resolveComment','DependentOn','get','onReady','userId','getComment','amd','parse','Edit','threadId','getMemberID','getCurrentUser','delete','defineProperty','_userService','find','Solve','addComment','831055xTEehO','add','Add','root','parentId','UserManagerService','UniverCollaborationClientPlugin','unitId','ThreadCommentModel','getOwnPropertyDescriptor','/solved','getUnit','34152URQHoi','_init','merge','map','dayjs','/universer-api/user/list','deleteComment','setConfig','forEach','Unknown','Inject','exports','stringify','rxjs','object','addUser','/universer-api/comment/unit/','63XNCVFD','code','syncUpdateMutationToColla','_threadCommentDataSourceService','rangeType','body','payload','/delete','_threadCommentModel','comments','length','dataSource','/edit','4PfNdzq','1002axIqOC','updateComment','UniverProThreadCommentDatasource','/add','subscribe','/list','@univerjs-pro/collaboration-client','_configService','CollaborationSessionService','user','@univerjs-pro/license','disposeWithMe','_httpService','519673joOLmJ','UniverProCollaborationClient','CommentService','_injector','_threadCommentDataSource','COMMENT','UniverCore','HTTPService','type','resolved','UNRECOGNIZED','toStringTag','rangeId','CustomRangeType','function','Injector','IConfigService','post','Reply','userID','requireSession','YYYY/MM/DD\x20HH:mm','createTimestamp','content','UniverNetwork','Delete','filter','saveCommentToSnapshot','symbol','ref','Solved','format','_config','@univerjs/thread-comment','UniverThreadCommentDataSourcePlugin','184wDRHho','21948XYVBHM','_sessionService','error','values','users','_initUserSync','40040ISdDBl','replies','UniverLicensePlugin','replyId','listComments','pipe','@univerjs/network','commentUpdate$','OpenOrReOpen','UniverInstanceType','comment','getUser','Disposable'];_0x1e71=function(){return _0x5d1cfb;};return _0x1e71();}
|
|
1
|
+
function _0x429c(_0x514cc1,_0x15e815){_0x514cc1=_0x514cc1-0xe3;const _0x57f2ee=_0x57f2();let _0x429ce1=_0x57f2ee[_0x514cc1];return _0x429ce1;}(function(_0x197a96,_0x2a0c0a){const _0x3f671a=_0x429c,_0x6bcca1=_0x197a96();while(!![]){try{const _0xbf5d27=-parseInt(_0x3f671a(0x119))/0x1*(parseInt(_0x3f671a(0xf3))/0x2)+-parseInt(_0x3f671a(0xfc))/0x3*(parseInt(_0x3f671a(0x13f))/0x4)+-parseInt(_0x3f671a(0xe9))/0x5*(-parseInt(_0x3f671a(0x122))/0x6)+parseInt(_0x3f671a(0x158))/0x7+parseInt(_0x3f671a(0x14f))/0x8*(-parseInt(_0x3f671a(0x107))/0x9)+-parseInt(_0x3f671a(0x124))/0xa+-parseInt(_0x3f671a(0x15b))/0xb*(-parseInt(_0x3f671a(0x137))/0xc);if(_0xbf5d27===_0x2a0c0a)break;else _0x6bcca1['push'](_0x6bcca1['shift']());}catch(_0x2e5293){_0x6bcca1['push'](_0x6bcca1['shift']());}}}(_0x57f2,0x770db),function(_0x2bf953,_0x1c05ec){const _0x2d42aa=_0x429c;typeof exports=='object'&&typeof module<'u'?_0x1c05ec(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==_0x2d42aa(0x101)&&define[_0x2d42aa(0x152)]?define([_0x2d42aa(0x10e),_0x2d42aa(0x132),_0x2d42aa(0x14e),_0x2d42aa(0x12e),_0x2d42aa(0x125),_0x2d42aa(0xf5),_0x2d42aa(0xf0),_0x2d42aa(0x104)],_0x1c05ec):(_0x2bf953=typeof globalThis<'u'?globalThis:_0x2bf953||self,_0x1c05ec(_0x2bf953['UniverProThreadCommentDatasource']={},_0x2bf953[_0x2d42aa(0x140)],_0x2bf953[_0x2d42aa(0x13a)],_0x2bf953['UniverCore'],_0x2bf953['UniverThreadCommentUi'],_0x2bf953[_0x2d42aa(0x10b)],_0x2bf953[_0x2d42aa(0xf0)],_0x2bf953[_0x2d42aa(0xed)]));}(this,function(_0x2e86e2,_0x101de3,_0x572db9,_0x5edd3f,_0x525bd8,_0x5b30bc,_0x498f71,_0x431989){'use strict';const _0x263c48=_0x429c;const _0x907ed='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x3342ea=(_0x189a1e=>(_0x189a1e[_0x189a1e[_0x263c48(0x14d)]=0x0]='OpenOrReOpen',_0x189a1e[_0x189a1e[_0x263c48(0x142)]=0x1]=_0x263c48(0x142),_0x189a1e[_0x189a1e[_0x263c48(0x143)]=-0x1]=_0x263c48(0x143),_0x189a1e))(_0x3342ea||{}),_0x4e3d4b=(_0x29383a=>(_0x29383a[_0x29383a[_0x263c48(0x155)]=0x0]='Unknown',_0x29383a[_0x29383a['Add']=0x1]=_0x263c48(0x109),_0x29383a[_0x29383a['Reply']=0x2]=_0x263c48(0x165),_0x29383a[_0x29383a[_0x263c48(0x10a)]=0x3]=_0x263c48(0x10a),_0x29383a[_0x29383a[_0x263c48(0x11a)]=0x4]=_0x263c48(0x11a),_0x29383a[_0x29383a['Solve']=0x5]='Solve',_0x29383a[_0x29383a[_0x263c48(0x143)]=-0x1]=_0x263c48(0x143),_0x29383a))(_0x4e3d4b||{});const _0x10e43f=_0x31d7cb=>_0x5edd3f[_0x263c48(0x13e)](new Date(+_0x31d7cb))[_0x263c48(0xe6)](_0x263c48(0x134)),_0x23ebbc=async(_0x3a3613,_0x36592e)=>{const _0x510563=_0x263c48,_0x17466b=_0x3a3613[_0x510563(0x11b)](_0x5edd3f['UserManagerService']),_0x1324f6=_0x3a3613[_0x510563(0x11b)](_0x431989[_0x510563(0xef)]);_0x36592e[_0x510563(0xfa)](_0x10f3c6=>{const _0x51408f=_0x510563;_0x17466b[_0x51408f(0x161)](_0x10f3c6)&&_0x36592e['delete'](_0x10f3c6);}),_0x36592e['size']&&(await _0x1324f6[_0x510563(0x11b)](_0x510563(0x13c),{'params':{'userIDs':[..._0x36592e]}}))[_0x510563(0x10d)]['users'][_0x510563(0xfa)](_0x5130e3=>{_0x5130e3&&_0x17466b['addUser'](_0x5130e3);});};var _0x2c570c=Object[_0x263c48(0x157)],_0x46261c=(_0x59377d,_0x50994b,_0x3a49,_0x5ec3c2)=>{for(var _0x30b3da=_0x5ec3c2>0x1?void 0x0:_0x5ec3c2?_0x2c570c(_0x50994b,_0x3a49):_0x50994b,_0x3ba2c4=_0x59377d['length']-0x1,_0x53c46e;_0x3ba2c4>=0x0;_0x3ba2c4--)(_0x53c46e=_0x59377d[_0x3ba2c4])&&(_0x30b3da=_0x53c46e(_0x30b3da)||_0x30b3da);return _0x30b3da;},_0x4fbd81=(_0x5206a2,_0x589d41)=>(_0x588db2,_0x4160cf)=>_0x589d41(_0x588db2,_0x4160cf,_0x5206a2);let _0x6779bf=class extends _0x5edd3f[_0x263c48(0x156)]{constructor(_0x2677ba,_0xcea4d6,_0x4c2744,_0x3dd4c5){const _0x50994d=_0x263c48;super(),this[_0x50994d(0xf9)]=_0x2677ba,this[_0x50994d(0xfe)]=_0xcea4d6,this[_0x50994d(0x118)]=_0x4c2744,this[_0x50994d(0x133)]=_0x3dd4c5,this[_0x50994d(0x129)](),this[_0x50994d(0x117)]();}[_0x263c48(0x117)](){const _0x4d1550=_0x263c48;this[_0x4d1550(0x113)](this['_threadCommentModel'][_0x4d1550(0xf2)][_0x4d1550(0x120)](_0x498f71[_0x4d1550(0x100)](0x10))[_0x4d1550(0xe3)](_0x4435b5=>{const _0x3240f9=_0x4d1550,_0x962c49=new Set();_0x4435b5[_0x3240f9(0xfa)](_0x45e45d=>{const _0x502c22=_0x3240f9;if(_0x45e45d[_0x502c22(0xf4)]===_0x502c22(0x154)){const _0x3f30ba=_0x45e45d[_0x502c22(0x146)][_0x502c22(0xf1)];_0x962c49[_0x502c22(0x154)](_0x3f30ba);}}),_0x23ebbc(this['_injector'],_0x962c49);}));}['_init'](){const _0x4f4c00=_0x263c48;this[_0x4f4c00(0x113)](this[_0x4f4c00(0xf9)][_0x4f4c00(0xf2)][_0x4f4c00(0xe3)](async _0x5e5861=>{const _0x53eff6=_0x4f4c00;var _0x21e5b3,_0x111f94,_0x2a4076,_0x12d42c;const _0x372544=(_0x21e5b3=this[_0x53eff6(0xfe)]['getUnit'](_0x5e5861['unitId'])[_0x53eff6(0x111)](_0x4bdc1b=>_0x4bdc1b[_0x53eff6(0x15a)]===_0x5e5861['threadId']))==null?void 0x0:_0x21e5b3[_0x53eff6(0x141)];if(!_0x372544)return;const {unitId:_0x24f2ef,subUnitId:_0xf99ec7}=_0x372544;switch(_0x5e5861[_0x53eff6(0xfd)]&&this[_0x53eff6(0x118)][_0x53eff6(0x138)](_0x5e5861['user']),_0x5e5861[_0x53eff6(0xf4)]){case _0x4e3d4b['Add']:break;case _0x4e3d4b['Reply']:{this[_0x53eff6(0xfe)][_0x53eff6(0x108)](_0x24f2ef,_0xf99ec7,{'unitId':_0x24f2ef,'subUnitId':_0xf99ec7,'ref':'','id':_0x5e5861[_0x53eff6(0x149)],'dT':_0x10e43f(+_0x5e5861[_0x53eff6(0xe7)]),'threadId':_0x5e5861['threadId'],'personId':(_0x2a4076=(_0x111f94=_0x5e5861['user'])==null?void 0x0:_0x111f94['userID'])!=null?_0x2a4076:_0x5e5861['userId'],'text':JSON['parse'](_0x5e5861['content']),'parentId':_0x372544['id']});break;}case _0x4e3d4b[_0x53eff6(0x11a)]:{const _0x27b98b=this[_0x53eff6(0xfe)][_0x53eff6(0x115)](_0x24f2ef,_0xf99ec7,_0x5e5861[_0x53eff6(0x149)]);_0x27b98b&&_0x27b98b[_0x53eff6(0x151)]&&this[_0x53eff6(0xfe)]['deleteComment'](_0x24f2ef,_0xf99ec7,_0x5e5861[_0x53eff6(0x149)]);break;}case _0x4e3d4b[_0x53eff6(0x10a)]:{this[_0x53eff6(0xfe)]['updateComment'](_0x24f2ef,_0xf99ec7,{'commentId':_0x5e5861[_0x53eff6(0x149)],'text':JSON[_0x53eff6(0x121)](_0x5e5861[_0x53eff6(0x130)])});break;}case _0x4e3d4b[_0x53eff6(0x14a)]:{const _0x1a0549=(_0x12d42c=this[_0x53eff6(0xfe)][_0x53eff6(0x12b)](_0x5e5861[_0x53eff6(0x123)])['find'](_0x1fb3a6=>_0x1fb3a6[_0x53eff6(0x15a)]===_0x5e5861['threadId']))==null?void 0x0:_0x12d42c[_0x53eff6(0x141)];_0x1a0549&&this['_threadCommentModel'][_0x53eff6(0x13b)](_0x24f2ef,_0xf99ec7,_0x1a0549['id'],_0x5e5861['solved']===_0x3342ea[_0x53eff6(0x142)]);break;}}}));}};_0x6779bf=_0x46261c([_0x4fbd81(0x0,_0x5edd3f[_0x263c48(0x105)](_0x101de3['CommentService'])),_0x4fbd81(0x1,_0x5edd3f[_0x263c48(0x105)](_0x5b30bc[_0x263c48(0xf7)])),_0x4fbd81(0x2,_0x5edd3f[_0x263c48(0x105)](_0x5edd3f[_0x263c48(0xe4)])),_0x4fbd81(0x3,_0x5edd3f[_0x263c48(0x105)](_0x5edd3f['Injector']))],_0x6779bf);const _0x12ca71=_0x263c48(0x15e),_0x1c0e90={};var _0x1944b1=Object[_0x263c48(0x157)],_0x5ac215=(_0x1e6b68,_0x2354e7,_0x1902bd,_0xa61d8d)=>{for(var _0x5824a1=_0xa61d8d>0x1?void 0x0:_0xa61d8d?_0x1944b1(_0x2354e7,_0x1902bd):_0x2354e7,_0x58eea1=_0x1e6b68['length']-0x1,_0x2725c9;_0x58eea1>=0x0;_0x58eea1--)(_0x2725c9=_0x1e6b68[_0x58eea1])&&(_0x5824a1=_0x2725c9(_0x5824a1)||_0x5824a1);return _0x5824a1;},_0x34f093=(_0x1f2d59,_0x1932a3)=>(_0x31e27a,_0x39f6bc)=>_0x1932a3(_0x31e27a,_0x39f6bc,_0x1f2d59);function _0x1609c2(_0x306cb3,_0x29d0ef){const _0xe5944=_0x263c48,_0x27d389=_0x306cb3['replies'][0x0];return{..._0x29d0ef,'id':_0x27d389[_0xe5944(0x149)],'resolved':_0x306cb3['solved']===0x1,'dT':_0x10e43f(_0x27d389[_0xe5944(0xe7)]),'personId':_0x27d389[_0xe5944(0x131)],'threadId':_0x27d389[_0xe5944(0x15a)]};}function _0x34bcd1(_0x3747dd,_0x3c5601,_0x46a0ea){const _0x160d94=_0x263c48;var _0x50b01c,_0x56c518;if(((_0x56c518=(_0x50b01c=_0x3747dd==null?void 0x0:_0x3747dd[_0x160d94(0x163)])==null?void 0x0:_0x50b01c[_0x160d94(0x136)])!=null?_0x56c518:0x0)>0x0){const _0x6cd6ee=(_0x1c1d06,_0x37490a)=>({'id':_0x1c1d06[_0x160d94(0x149)],'threadId':_0x1c1d06[_0x160d94(0x15a)],'dT':_0x10e43f(_0x1c1d06[_0x160d94(0xe7)]),'personId':_0x1c1d06[_0x160d94(0x131)],'resolved':_0x3747dd['solved']===_0x3342ea[_0x160d94(0x142)],'unitId':_0x3c5601,'subUnitId':_0x46a0ea,'text':JSON[_0x160d94(0x121)](_0x1c1d06[_0x160d94(0x130)]),'parentId':_0x37490a}),_0x567fa1=_0x6cd6ee(_0x3747dd[_0x160d94(0x163)][0x0]);return{..._0x567fa1,'children':_0x3747dd['replies'][_0x160d94(0x15f)](0x1)['map'](_0x558c53=>_0x6cd6ee(_0x558c53,_0x567fa1['id']))};}return null;}let _0x19c89e=class{constructor(_0x257441,_0x100dac,_0xea8ec1){const _0x58a913=_0x263c48;this[_0x58a913(0x14c)]=_0x257441,this[_0x58a913(0x118)]=_0x100dac,this[_0x58a913(0xee)]=_0xea8ec1;}async['addComment'](_0x1d36e2){const _0x41d359=_0x263c48;var _0x474b99,_0x3a7801;const {parentId:_0x5a081d,unitId:_0x396374,text:_0x39c947,threadId:_0x347963}=_0x1d36e2,_0x4fec81=(_0x3a7801=(_0x474b99=_0x39c947[_0x41d359(0x112)])==null?void 0x0:_0x474b99['filter'](_0x54ab58=>_0x54ab58['rangeType']===_0x5edd3f[_0x41d359(0x150)][_0x41d359(0xea)])[_0x41d359(0x147)](_0x5c5c4f=>_0x5c5c4f['rangeId']))!=null?_0x3a7801:[],_0xf759ed=JSON[_0x41d359(0x144)](_0x39c947),_0x5a5ac7=(await this[_0x41d359(0xee)][_0x41d359(0x11f)](_0x396374))['getMemberID']();if(_0x5a081d){const _0x35700e={'memberId':_0x5a5ac7,'unitId':_0x396374,'content':_0xf759ed,'mention':_0x4fec81,'threadId':_0x347963},_0x4d5dbe=(await this['_httpService'][_0x41d359(0x135)]('/universer-api/comment/unit/'+_0x396374+_0x41d359(0x12f),{'body':_0x35700e}))[_0x41d359(0x10d)][_0x41d359(0x116)];return{..._0x1d36e2,'id':_0x4d5dbe[_0x41d359(0x149)],'dT':_0x5edd3f[_0x41d359(0x13e)](+_0x4d5dbe[_0x41d359(0xe7)])[_0x41d359(0xe6)](_0x41d359(0x134)),'personId':_0x4d5dbe[_0x41d359(0x131)]};}else{const _0x1a74f1={'memberId':_0x5a5ac7,'unitId':_0x396374,'content':_0xf759ed,'mention':_0x4fec81},_0x4066c2=await this[_0x41d359(0x14c)][_0x41d359(0x135)](_0x41d359(0xeb)+_0x396374+_0x41d359(0xe5),{'body':_0x1a74f1});return _0x1609c2(_0x4066c2[_0x41d359(0x10d)]['comment'],_0x1d36e2);}}async[_0x263c48(0x159)](_0x3ccf29){const _0x17a38e=_0x263c48;var _0x5e0cf4,_0x14eea9;const {text:_0x3eed50,unitId:_0x506b96}=_0x3ccf29,_0x20980e=(_0x14eea9=(_0x5e0cf4=_0x3eed50['customRanges'])==null?void 0x0:_0x5e0cf4['filter'](_0x226f4b=>_0x226f4b[_0x17a38e(0xe8)]===_0x5edd3f[_0x17a38e(0x150)][_0x17a38e(0xea)])[_0x17a38e(0x147)](_0x5b5b3a=>_0x5b5b3a[_0x17a38e(0x139)]))!=null?_0x14eea9:[],_0x56e599=JSON[_0x17a38e(0x144)](_0x3eed50),_0x6fc3ed=_0x3ccf29[_0x17a38e(0x15a)],_0x5e9b73=_0x3ccf29['id'],_0x48f79c={'memberId':(await this['_sessionService']['requireSession'](_0x506b96))['getMemberID'](),'unitId':_0x506b96,'threadId':_0x6fc3ed,'mention':_0x20980e,'content':_0x56e599,'replyId':_0x5e9b73},_0x1315bb=await this['_httpService'][_0x17a38e(0x135)]('/universer-api/comment/unit/'+_0x506b96+_0x17a38e(0x164),{'body':_0x48f79c});return!_0x1315bb[_0x17a38e(0x10d)][_0x17a38e(0x114)]||_0x1315bb[_0x17a38e(0x10d)][_0x17a38e(0x114)][_0x17a38e(0x12d)]===0x1;}async['resolveComment'](_0x1e897b){const _0x141703=_0x263c48,{unitId:_0x276d22}=_0x1e897b,_0x177686=_0x1e897b[_0x141703(0x15a)],_0x5f1f60={'memberId':this[_0x141703(0x118)]['getCurrentUser']()['userID'],'unitId':_0x276d22,'threadId':_0x177686,'solved':_0x1e897b['resolved']?_0x3342ea[_0x141703(0x142)]:_0x3342ea[_0x141703(0x14d)]},_0x1133d6=await this[_0x141703(0x14c)]['post'](_0x141703(0xeb)+_0x276d22+_0x141703(0x127),{'body':_0x5f1f60});return!_0x1133d6['body'][_0x141703(0x114)]||_0x1133d6[_0x141703(0x10d)][_0x141703(0x114)][_0x141703(0x12d)]===0x1;}async['deleteComment'](_0x391c99,_0xd17749,_0x81214,_0x4641d4){const _0x1f7102=_0x263c48,_0x27c233={'memberId':(await this[_0x1f7102(0xee)][_0x1f7102(0x11f)](_0x391c99))[_0x1f7102(0x10c)](),'threadId':_0x81214,'replyId':_0x4641d4,'unitId':_0x391c99},_0x2ff54e=await this['_httpService'][_0x1f7102(0x135)](_0x1f7102(0xeb)+_0x391c99+'/delete',{'body':_0x27c233});return!_0x2ff54e[_0x1f7102(0x10d)][_0x1f7102(0x114)]||_0x2ff54e[_0x1f7102(0x10d)][_0x1f7102(0x114)][_0x1f7102(0x12d)]===0x1;}async[_0x263c48(0xec)](_0x9b4fd8,_0x5a07ce,_0xcb10fc){const _0xb7121a=_0x263c48,_0x414c68={'unitId':_0x9b4fd8,'threadId':_0xcb10fc},_0x3e24d5=await this[_0xb7121a(0x14c)][_0xb7121a(0x135)]('/universer-api/comment/unit/'+_0x9b4fd8+'/list',{'body':_0x414c68}),_0x200b6c=_0xcb10fc[_0xb7121a(0x147)](_0x118d42=>_0x34bcd1(_0x3e24d5['body']['comments'][_0x118d42],_0x9b4fd8,_0x5a07ce))[_0xb7121a(0x167)](Boolean);return Object[_0xb7121a(0xf6)](_0x3e24d5[_0xb7121a(0x10d)]['users'])[_0xb7121a(0xfa)](_0x12205d=>{const _0x1f20eb=_0xb7121a;this['_userService'][_0x1f20eb(0x138)](_0x12205d);}),_0x200b6c;}[_0x263c48(0x153)](_0x5c1cbb){const _0xca3fce=_0x263c48;return{'id':_0x5c1cbb['id'],'threadId':_0x5c1cbb['threadId'],'ref':_0x5c1cbb[_0xca3fce(0x11e)]};}};_0x19c89e=_0x5ac215([_0x34f093(0x0,_0x5edd3f[_0x263c48(0x105)](_0x431989[_0x263c48(0xef)])),_0x34f093(0x1,_0x5edd3f[_0x263c48(0x105)](_0x5edd3f[_0x263c48(0xe4)])),_0x34f093(0x2,_0x5edd3f[_0x263c48(0x105)](_0x101de3[_0x263c48(0x110)]))],_0x19c89e);var _0x3af1fe=Object[_0x263c48(0x157)],_0x509cdb=(_0x1ffe20,_0x1e99ff,_0x30bcc0,_0x3bde0b)=>{const _0x586528=_0x263c48;for(var _0x102958=_0x3bde0b>0x1?void 0x0:_0x3bde0b?_0x3af1fe(_0x1e99ff,_0x30bcc0):_0x1e99ff,_0x4450aa=_0x1ffe20[_0x586528(0x136)]-0x1,_0x4fe9b8;_0x4450aa>=0x0;_0x4450aa--)(_0x4fe9b8=_0x1ffe20[_0x4450aa])&&(_0x102958=_0x4fe9b8(_0x102958)||_0x102958);return _0x102958;},_0x305309=(_0x47c6aa,_0x340e33)=>(_0x29236d,_0x2b420f)=>_0x340e33(_0x29236d,_0x2b420f,_0x47c6aa);let _0x4dd3c9=class extends _0x5edd3f[_0x263c48(0x156)]{constructor(_0x3b4b00,_0x32e66d){const _0x29d10d=_0x263c48;super(),this[_0x29d10d(0x148)]=_0x3b4b00,this['_threadCommentDataSource']=_0x32e66d,this[_0x29d10d(0x102)]();}[_0x263c48(0x102)](){const _0x1ceb63=_0x263c48;this[_0x1ceb63(0x148)]['dataSource']=this[_0x1ceb63(0x15d)],this[_0x1ceb63(0x148)][_0x1ceb63(0x12a)]=!0x1;}};_0x4dd3c9=_0x509cdb([_0x305309(0x0,_0x5b30bc['IThreadCommentDataSourceService']),_0x305309(0x1,_0x5edd3f['Inject'](_0x19c89e))],_0x4dd3c9);var _0x54904a=Object[_0x263c48(0x162)],_0x21b3b5=Object[_0x263c48(0x157)],_0x4e2eb3=(_0x36ecf8,_0x4966b0,_0x401b83)=>_0x4966b0 in _0x36ecf8?_0x54904a(_0x36ecf8,_0x4966b0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x401b83}):_0x36ecf8[_0x4966b0]=_0x401b83,_0xf6cd56=(_0x3615a2,_0x595323,_0x350e3e,_0x404de0)=>{const _0x363896=_0x263c48;for(var _0x3dd8a8=_0x404de0>0x1?void 0x0:_0x404de0?_0x21b3b5(_0x595323,_0x350e3e):_0x595323,_0xb42d7=_0x3615a2[_0x363896(0x136)]-0x1,_0x1ae9fa;_0xb42d7>=0x0;_0xb42d7--)(_0x1ae9fa=_0x3615a2[_0xb42d7])&&(_0x3dd8a8=_0x1ae9fa(_0x3dd8a8)||_0x3dd8a8);return _0x3dd8a8;},_0x58fd34=(_0x2e9c8b,_0xc4aec2)=>(_0x4d8a2b,_0xfd1169)=>_0xc4aec2(_0x4d8a2b,_0xfd1169,_0x2e9c8b),_0x1790c1=(_0x4362c8,_0x47d277,_0x2003af)=>_0x4e2eb3(_0x4362c8,typeof _0x47d277!=_0x263c48(0x126)?_0x47d277+'':_0x47d277,_0x2003af);_0x2e86e2[_0x263c48(0x15c)]=class extends _0x5edd3f[_0x263c48(0xf8)]{constructor(_0x1c3de2=_0x1c0e90,_0x4fb401,_0x426b56){const _0x5a9832=_0x263c48;super(),this['_config']=_0x1c3de2,this['_injector']=_0x4fb401,this[_0x5a9832(0x14b)]=_0x426b56;const {..._0x25dc97}=_0x5edd3f[_0x5a9832(0x106)]({},_0x1c0e90,this[_0x5a9832(0x10f)]);this['_configService'][_0x5a9832(0xfb)](_0x12ca71,_0x25dc97);}[_0x263c48(0x11d)](){const _0x5ebc1e=_0x263c48;[[_0x19c89e],[_0x4dd3c9],[_0x6779bf]][_0x5ebc1e(0xfa)](_0x727300=>{const _0x179447=_0x5ebc1e;this[_0x179447(0x133)][_0x179447(0x154)](_0x727300);});}[_0x263c48(0xff)](){const _0xdc3671=_0x263c48;this['_injector'][_0xdc3671(0x11b)](_0x4dd3c9),this[_0xdc3671(0x133)]['get'](_0x6779bf);}},_0x1790c1(_0x2e86e2[_0x263c48(0x15c)],_0x263c48(0x11c),_0x907ed),_0x1790c1(_0x2e86e2[_0x263c48(0x15c)],'type',_0x5edd3f[_0x263c48(0x128)][_0x263c48(0x13d)]),_0x2e86e2[_0x263c48(0x15c)]=_0xf6cd56([_0x5edd3f['DependentOn'](_0x525bd8['UniverThreadCommentUIPlugin'],_0x101de3['UniverCollaborationClientPlugin'],_0x572db9[_0x263c48(0x145)]),_0x58fd34(0x1,_0x5edd3f[_0x263c48(0x105)](_0x5edd3f[_0x263c48(0x166)])),_0x58fd34(0x2,_0x5edd3f[_0x263c48(0x12c)])],_0x2e86e2[_0x263c48(0x15c)]),Object[_0x263c48(0x162)](_0x2e86e2,Symbol[_0x263c48(0x103)],{'value':_0x263c48(0x160)});}));function _0x57f2(){const _0x5ca6f4=['syncUpdateMutationToColla','getUnit','IConfigService','code','@univerjs/core','/reply','content','userId','@univerjs-pro/collaboration-client','_injector','YYYY/MM/DD\x20HH:mm','post','length','372ErBjfr','addUser','rangeId','UniverProLicense','resolveComment','/universer-api/user/list','UNIVER_UNKNOWN','dayjs','4CBYCZs','UniverProCollaborationClient','root','Solved','UNRECOGNIZED','stringify','UniverLicensePlugin','payload','map','_threadCommentDataSourceService','replyId','Solve','_configService','_httpService','OpenOrReOpen','@univerjs-pro/license','7348976aBZEMH','CustomRangeType','parentId','amd','saveCommentToSnapshot','add','Unknown','Disposable','getOwnPropertyDescriptor','2524732cUOREB','updateComment','threadId','406274eeKnyA','UniverThreadCommentDataSourcePlugin','_threadCommentDataSource','thread-comment-data-source.config','slice','Module','getUser','defineProperty','replies','/edit','Reply','Injector','filter','subscribe','UserManagerService','/add','format','createTimestamp','rangeType','20ZiTLvq','COMMENT','/universer-api/comment/unit/','listComments','UniverNetwork','_sessionService','HTTPService','rxjs','personId','commentUpdate$','30ZjVZBU','type','@univerjs/thread-comment','values','ThreadCommentModel','Plugin','_commentService','forEach','setConfig','70302RoBKsK','user','_threadCommentModel','onReady','bufferTime','function','_initDataSource','toStringTag','@univerjs/network','Inject','merge','9gSwjAQ','addComment','Add','Edit','UniverThreadComment','getMemberID','body','exports','_config','CollaborationSessionService','find','customRanges','disposeWithMe','error','getComment','reply','_initUserSync','_userService','2130TGqpCY','Delete','get','pluginName','onStarting','ref','requireSession','pipe','parse','819216RZdQLJ','unitId','5901250RsYYTZ','@univerjs/thread-comment-ui','symbol','/solved','UniverInstanceType','_init'];_0x57f2=function(){return _0x5ca6f4;};return _0x57f2();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2-insiders.20260119-edc718c",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.15.
|
|
49
|
-
"@univerjs-pro/license": "0.15.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.15.2-insiders.20260119-edc718c",
|
|
49
|
+
"@univerjs-pro/license": "0.15.2-insiders.20260119-edc718c",
|
|
50
|
+
"@univerjs/network": "0.15.2-insiders.20260119-edc718c",
|
|
51
|
+
"@univerjs/core": "0.15.2-insiders.20260119-edc718c",
|
|
50
52
|
"@univerjs/protocol": "0.1.48",
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.15.1-insiders.20260117-8ce4a01",
|
|
54
|
-
"@univerjs/thread-comment": "0.15.1-insiders.20260117-8ce4a01"
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.15.2-insiders.20260119-edc718c",
|
|
54
|
+
"@univerjs/thread-comment": "0.15.2-insiders.20260119-edc718c"
|
|
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.16",
|
|
61
|
-
"@univerjs-infra/shared": "0.15.
|
|
61
|
+
"@univerjs-infra/shared": "0.15.2"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|