@univerjs-pro/thread-comment-datasource 0.15.0-insiders.20251227-453e4ff → 0.15.0-insiders.20260106-79b11f9
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 +9 -9
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x1e522b=_0x4117;(function(_0x56d183,_0x30f1a2){const _0x5848f3=_0x4117,_0x4a55d1=_0x56d183();while(!![]){try{const _0x4749be=-parseInt(_0x5848f3(0xc6))/0x1*(parseInt(_0x5848f3(0xdb))/0x2)+parseInt(_0x5848f3(0xd8))/0x3+-parseInt(_0x5848f3(0xc8))/0x4*(-parseInt(_0x5848f3(0xcc))/0x5)+parseInt(_0x5848f3(0x11f))/0x6+-parseInt(_0x5848f3(0xc9))/0x7+-parseInt(_0x5848f3(0x122))/0x8*(parseInt(_0x5848f3(0xec))/0x9)+parseInt(_0x5848f3(0x11e))/0xa*(parseInt(_0x5848f3(0x128))/0xb);if(_0x4749be===_0x30f1a2)break;else _0x4a55d1['push'](_0x4a55d1['shift']());}catch(_0x52a918){_0x4a55d1['push'](_0x4a55d1['shift']());}}}(_0x510a,0xd36b6));Object[_0x1e522b(0xf1)](exports,Symbol['toStringTag'],{'value':_0x1e522b(0x101)});function _0x510a(){const _0x8fe7af=['Reply','updateComment','length','getUnit','onStarting','userId','personId','addUser','user','getMemberID','UniverThreadCommentDataSourcePlugin','2294292FiefWx','UniverLicensePlugin','rangeType','1014KfOvVq','_injector','Delete','listComments','Unknown','add','Edit','_threadCommentDataSource','Add','bufferTime','/universer-api/comment/unit/','commentUpdate$','disposeWithMe','CustomRangeType','/list','merge','map','3307464xumwnN','userID','saveCommentToSnapshot','dataSource','root','defineProperty','resolved','_threadCommentDataSourceService','slice','requireSession','get','getCurrentUser','_threadCommentModel','UserManagerService','_initUserSync','solved','getUser','_configService','content','Injector','IThreadCommentDataSourceService','Module','comment','YYYY/MM/DD\x20HH:mm','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CommentService','UniverInstanceType','type','Disposable','customRanges','onReady','_config','/add','getComment','UniverCollaborationClientPlugin','values','addComment','replies','COMMENT','users','createTimestamp','UNRECOGNIZED','getOwnPropertyDescriptor','resolveComment','rangeId','post','thread-comment-data-source.config','deleteComment','OpenOrReOpen','Solved','30gUieOH','5802954ekIMan','find','subscribe','32IIKVkd','delete','parse','forEach','stringify','comments','3547907nKxHDu','_httpService','/solved','threadId','filter','_userService','syncUpdateMutationToColla','dayjs','CollaborationSessionService','HTTPService','Solve','replyId','format','error','_initDataSource','UniverThreadCommentUIPlugin','UNIVER_UNKNOWN','code','_sessionService','parentId','236TSpuza','body','3056IPYAVe','7846972qxvcJf','Inject','size','5740HGSixx'];_0x510a=function(){return _0x8fe7af;};return _0x510a();}const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x1e522b(0x104);var I=(_0x110166=>(_0x110166[_0x110166[_0x1e522b(0x11c)]=0x0]=_0x1e522b(0x11c),_0x110166[_0x110166[_0x1e522b(0x11d)]=0x1]='Solved',_0x110166[_0x110166['UNRECOGNIZED']=-0x1]=_0x1e522b(0x115),_0x110166))(I||{}),v=(_0x406134=>(_0x406134[_0x406134[_0x1e522b(0xdf)]=0x0]=_0x1e522b(0xdf),_0x406134[_0x406134[_0x1e522b(0xe3)]=0x1]=_0x1e522b(0xe3),_0x406134[_0x406134[_0x1e522b(0xcd)]=0x2]='Reply',_0x406134[_0x406134[_0x1e522b(0xe1)]=0x3]=_0x1e522b(0xe1),_0x406134[_0x406134['Delete']=0x4]=_0x1e522b(0xdd),_0x406134[_0x406134[_0x1e522b(0xbc)]=0x5]=_0x1e522b(0xbc),_0x406134[_0x406134[_0x1e522b(0x115)]=-0x1]=_0x1e522b(0x115),_0x406134))(v||{});const f=_0x3b57f2=>c[_0x1e522b(0xb9)](new Date(+_0x3b57f2))[_0x1e522b(0xbe)](_0x1e522b(0x103)),R=async(_0x396b6e,_0x210e65)=>{const _0x2b0ee9=_0x1e522b,_0x297a2e=_0x396b6e[_0x2b0ee9(0xf6)](c[_0x2b0ee9(0xf9)]),_0x3b085f=_0x396b6e['get'](P['HTTPService']);_0x210e65[_0x2b0ee9(0x125)](_0x1cd3d7=>{const _0x52153f=_0x2b0ee9;_0x297a2e[_0x52153f(0xfc)](_0x1cd3d7)&&_0x210e65[_0x52153f(0x123)](_0x1cd3d7);}),_0x210e65[_0x2b0ee9(0xcb)]&&(await _0x3b085f['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x210e65]}}))[_0x2b0ee9(0xc7)][_0x2b0ee9(0x113)][_0x2b0ee9(0x125)](_0x46ef70=>{const _0x228dae=_0x2b0ee9;_0x46ef70&&_0x297a2e[_0x228dae(0xd4)](_0x46ef70);});};var $=Object[_0x1e522b(0x116)],E=(_0x2015d9,_0x773162,_0x251cbd,_0x26324b)=>{const _0x41c383=_0x1e522b;for(var _0x5a8521=_0x26324b>0x1?void 0x0:_0x26324b?$(_0x773162,_0x251cbd):_0x773162,_0xf29172=_0x2015d9[_0x41c383(0xcf)]-0x1,_0x398c72;_0xf29172>=0x0;_0xf29172--)(_0x398c72=_0x2015d9[_0xf29172])&&(_0x5a8521=_0x398c72(_0x5a8521)||_0x5a8521);return _0x5a8521;},S=(_0x5c1f7b,_0x47c392)=>(_0x344bee,_0x2674cb)=>_0x47c392(_0x344bee,_0x2674cb,_0x5c1f7b);let _=class extends c[_0x1e522b(0x108)]{constructor(_0x4966e9,_0x13d24f,_0x5be808,_0x22cf8d){const _0x4e181f=_0x1e522b;super(),this['_commentService']=_0x4966e9,this[_0x4e181f(0xf8)]=_0x13d24f,this[_0x4e181f(0x12d)]=_0x5be808,this[_0x4e181f(0xdc)]=_0x22cf8d,this['_init'](),this['_initUserSync']();}[_0x1e522b(0xfa)](){const _0x4ed48f=_0x1e522b;this[_0x4ed48f(0xe7)](this['_threadCommentModel'][_0x4ed48f(0xe6)]['pipe'](j[_0x4ed48f(0xe4)](0x10))[_0x4ed48f(0x121)](_0x489938=>{const _0x377a06=_0x4ed48f,_0x4a6f25=new Set();_0x489938[_0x377a06(0x125)](_0x55bf33=>{const _0xaf6108=_0x377a06;if(_0x55bf33['type']===_0xaf6108(0xe0)){const _0x2b01e2=_0x55bf33['payload'][_0xaf6108(0xd3)];_0x4a6f25[_0xaf6108(0xe0)](_0x2b01e2);}}),R(this['_injector'],_0x4a6f25);}));}['_init'](){const _0x1dddb8=_0x1e522b;this[_0x1dddb8(0xe7)](this['_commentService'][_0x1dddb8(0xe6)][_0x1dddb8(0x121)](async _0x27bbcd=>{const _0x2d8fbb=_0x1dddb8;var _0x2fd092,_0x3e6e04,_0x39f5c0,_0x265e84;const _0x5785a2=(_0x2fd092=this[_0x2d8fbb(0xf8)][_0x2d8fbb(0xd0)](_0x27bbcd['unitId'])['find'](_0x812114=>_0x812114[_0x2d8fbb(0x12b)]===_0x27bbcd[_0x2d8fbb(0x12b)]))==null?void 0x0:_0x2fd092[_0x2d8fbb(0xf0)];if(!_0x5785a2)return;const {unitId:_0x595653,subUnitId:_0x452fb6}=_0x5785a2;switch(_0x27bbcd[_0x2d8fbb(0xd5)]&&this[_0x2d8fbb(0x12d)]['addUser'](_0x27bbcd[_0x2d8fbb(0xd5)]),_0x27bbcd[_0x2d8fbb(0x107)]){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0x2d8fbb(0x110)](_0x595653,_0x452fb6,{'unitId':_0x595653,'subUnitId':_0x452fb6,'ref':'','id':_0x27bbcd[_0x2d8fbb(0xbd)],'dT':f(+_0x27bbcd[_0x2d8fbb(0x114)]),'threadId':_0x27bbcd['threadId'],'personId':(_0x39f5c0=(_0x3e6e04=_0x27bbcd[_0x2d8fbb(0xd5)])==null?void 0x0:_0x3e6e04[_0x2d8fbb(0xed)])!=null?_0x39f5c0:_0x27bbcd[_0x2d8fbb(0xd2)],'text':JSON[_0x2d8fbb(0x124)](_0x27bbcd[_0x2d8fbb(0xfe)]),'parentId':_0x5785a2['id']});break;}case v['Delete']:{const _0x49ed17=this['_threadCommentModel'][_0x2d8fbb(0x10d)](_0x595653,_0x452fb6,_0x27bbcd[_0x2d8fbb(0xbd)]);_0x49ed17&&_0x49ed17[_0x2d8fbb(0xc5)]&&this[_0x2d8fbb(0xf8)][_0x2d8fbb(0x11b)](_0x595653,_0x452fb6,_0x27bbcd[_0x2d8fbb(0xbd)]);break;}case v[_0x2d8fbb(0xe1)]:{this[_0x2d8fbb(0xf8)][_0x2d8fbb(0xce)](_0x595653,_0x452fb6,{'commentId':_0x27bbcd[_0x2d8fbb(0xbd)],'text':JSON[_0x2d8fbb(0x124)](_0x27bbcd['content'])});break;}case v[_0x2d8fbb(0xbc)]:{const _0x806aa8=(_0x265e84=this[_0x2d8fbb(0xf8)][_0x2d8fbb(0xd0)](_0x27bbcd['unitId'])[_0x2d8fbb(0x120)](_0x29b41f=>_0x29b41f[_0x2d8fbb(0x12b)]===_0x27bbcd['threadId']))==null?void 0x0:_0x265e84[_0x2d8fbb(0xf0)];_0x806aa8&&this[_0x2d8fbb(0xf8)][_0x2d8fbb(0x117)](_0x595653,_0x452fb6,_0x806aa8['id'],_0x27bbcd[_0x2d8fbb(0xfb)]===I[_0x2d8fbb(0x11d)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x1e522b(0x105)])),S(0x1,c[_0x1e522b(0xca)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x1e522b(0xf9)])),S(0x3,c[_0x1e522b(0xca)](c['Injector']))],_);const q=_0x1e522b(0x11a),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0xdd4f4d,_0x21126e,_0x1bca17,_0x3553bb)=>{const _0x3d6607=_0x1e522b;for(var _0x44144b=_0x3553bb>0x1?void 0x0:_0x3553bb?A(_0x21126e,_0x1bca17):_0x21126e,_0x110af6=_0xdd4f4d[_0x3d6607(0xcf)]-0x1,_0x143032;_0x110af6>=0x0;_0x110af6--)(_0x143032=_0xdd4f4d[_0x110af6])&&(_0x44144b=_0x143032(_0x44144b)||_0x44144b);return _0x44144b;},C=(_0x52675f,_0x4dd336)=>(_0x5564cd,_0x53a7ac)=>_0x4dd336(_0x5564cd,_0x53a7ac,_0x52675f);function Y(_0xa3b25a,_0x47906a){const _0x34fd91=_0x1e522b,_0x3b435e=_0xa3b25a[_0x34fd91(0x111)][0x0];return{..._0x47906a,'id':_0x3b435e[_0x34fd91(0xbd)],'resolved':_0xa3b25a[_0x34fd91(0xfb)]===0x1,'dT':f(_0x3b435e[_0x34fd91(0x114)]),'personId':_0x3b435e[_0x34fd91(0xd2)],'threadId':_0x3b435e[_0x34fd91(0x12b)]};}function G(_0x2e5f87,_0x2e8d3d,_0x4449eb){const _0x4bbc99=_0x1e522b;var _0x18fe74,_0x18c4c1;if(((_0x18c4c1=(_0x18fe74=_0x2e5f87==null?void 0x0:_0x2e5f87[_0x4bbc99(0x111)])==null?void 0x0:_0x18fe74['length'])!=null?_0x18c4c1:0x0)>0x0){const _0x416c34=(_0xc7224,_0x17c9b9)=>({'id':_0xc7224[_0x4bbc99(0xbd)],'threadId':_0xc7224[_0x4bbc99(0x12b)],'dT':f(_0xc7224['createTimestamp']),'personId':_0xc7224[_0x4bbc99(0xd2)],'resolved':_0x2e5f87[_0x4bbc99(0xfb)]===I[_0x4bbc99(0x11d)],'unitId':_0x2e8d3d,'subUnitId':_0x4449eb,'text':JSON[_0x4bbc99(0x124)](_0xc7224[_0x4bbc99(0xfe)]),'parentId':_0x17c9b9}),_0x1a9bae=_0x416c34(_0x2e5f87[_0x4bbc99(0x111)][0x0]);return{..._0x1a9bae,'children':_0x2e5f87[_0x4bbc99(0x111)][_0x4bbc99(0xf4)](0x1)[_0x4bbc99(0xeb)](_0xcfb727=>_0x416c34(_0xcfb727,_0x1a9bae['id']))};}return null;}let p=class{constructor(_0x52febe,_0x2137c4,_0x39c7f1){const _0xa89b80=_0x1e522b;this[_0xa89b80(0x129)]=_0x52febe,this['_userService']=_0x2137c4,this[_0xa89b80(0xc4)]=_0x39c7f1;}async[_0x1e522b(0x110)](_0x4e2806){const _0x237ec8=_0x1e522b;var _0x4a2adc,_0x499338;const {parentId:_0x60b6b8,unitId:_0x4a9bc5,text:_0x3ac54c,threadId:_0x47bd12}=_0x4e2806,_0x5cd939=(_0x499338=(_0x4a2adc=_0x3ac54c[_0x237ec8(0x109)])==null?void 0x0:_0x4a2adc['filter'](_0x27dd20=>_0x27dd20[_0x237ec8(0xda)]===c[_0x237ec8(0xe8)][_0x237ec8(0x112)])[_0x237ec8(0xeb)](_0x343212=>_0x343212[_0x237ec8(0x118)]))!=null?_0x499338:[],_0x45ce81=JSON[_0x237ec8(0x126)](_0x3ac54c),_0x1949ba=(await this[_0x237ec8(0xc4)][_0x237ec8(0xf5)](_0x4a9bc5))[_0x237ec8(0xd6)]();if(_0x60b6b8){const _0x47ea7d={'memberId':_0x1949ba,'unitId':_0x4a9bc5,'content':_0x45ce81,'mention':_0x5cd939,'threadId':_0x47bd12},_0x2fabc6=(await this['_httpService'][_0x237ec8(0x119)](_0x237ec8(0xe5)+_0x4a9bc5+'/reply',{'body':_0x47ea7d}))[_0x237ec8(0xc7)]['reply'];return{..._0x4e2806,'id':_0x2fabc6[_0x237ec8(0xbd)],'dT':c[_0x237ec8(0xb9)](+_0x2fabc6['createTimestamp'])[_0x237ec8(0xbe)](_0x237ec8(0x103)),'personId':_0x2fabc6[_0x237ec8(0xd2)]};}else{const _0x3d2250={'memberId':_0x1949ba,'unitId':_0x4a9bc5,'content':_0x45ce81,'mention':_0x5cd939},_0x28e8d6=await this[_0x237ec8(0x129)][_0x237ec8(0x119)](_0x237ec8(0xe5)+_0x4a9bc5+_0x237ec8(0x10c),{'body':_0x3d2250});return Y(_0x28e8d6['body'][_0x237ec8(0x102)],_0x4e2806);}}async[_0x1e522b(0xce)](_0x10c0c0){const _0x564860=_0x1e522b;var _0x3ee5cb,_0xd7e3b5;const {text:_0x14bce6,unitId:_0x3b5a23}=_0x10c0c0,_0x5772b7=(_0xd7e3b5=(_0x3ee5cb=_0x14bce6[_0x564860(0x109)])==null?void 0x0:_0x3ee5cb[_0x564860(0x12c)](_0x2a4857=>_0x2a4857[_0x564860(0xda)]===c['CustomRangeType'][_0x564860(0x112)])['map'](_0x4dd0a5=>_0x4dd0a5[_0x564860(0x118)]))!=null?_0xd7e3b5:[],_0x8c7466=JSON[_0x564860(0x126)](_0x14bce6),_0x23ae68=_0x10c0c0[_0x564860(0x12b)],_0x570890=_0x10c0c0['id'],_0x2d2c3={'memberId':(await this[_0x564860(0xc4)][_0x564860(0xf5)](_0x3b5a23))[_0x564860(0xd6)](),'unitId':_0x3b5a23,'threadId':_0x23ae68,'mention':_0x5772b7,'content':_0x8c7466,'replyId':_0x570890},_0x58eb7c=await this[_0x564860(0x129)][_0x564860(0x119)](_0x564860(0xe5)+_0x3b5a23+'/edit',{'body':_0x2d2c3});return!_0x58eb7c[_0x564860(0xc7)][_0x564860(0xbf)]||_0x58eb7c[_0x564860(0xc7)]['error'][_0x564860(0xc3)]===0x1;}async['resolveComment'](_0x1743fe){const _0x4e3e3f=_0x1e522b,{unitId:_0x419b34}=_0x1743fe,_0x5d2566=_0x1743fe['threadId'],_0x3493e3={'memberId':this[_0x4e3e3f(0x12d)][_0x4e3e3f(0xf7)]()[_0x4e3e3f(0xed)],'unitId':_0x419b34,'threadId':_0x5d2566,'solved':_0x1743fe[_0x4e3e3f(0xf2)]?I['Solved']:I['OpenOrReOpen']},_0xfe9359=await this['_httpService'][_0x4e3e3f(0x119)](_0x4e3e3f(0xe5)+_0x419b34+_0x4e3e3f(0x12a),{'body':_0x3493e3});return!_0xfe9359[_0x4e3e3f(0xc7)][_0x4e3e3f(0xbf)]||_0xfe9359[_0x4e3e3f(0xc7)][_0x4e3e3f(0xbf)][_0x4e3e3f(0xc3)]===0x1;}async[_0x1e522b(0x11b)](_0xef69b5,_0x571b35,_0x7947bd,_0x59656f){const _0x371656=_0x1e522b,_0xc98568={'memberId':(await this[_0x371656(0xc4)][_0x371656(0xf5)](_0xef69b5))['getMemberID'](),'threadId':_0x7947bd,'replyId':_0x59656f,'unitId':_0xef69b5},_0x3bff21=await this[_0x371656(0x129)][_0x371656(0x119)](_0x371656(0xe5)+_0xef69b5+'/delete',{'body':_0xc98568});return!_0x3bff21[_0x371656(0xc7)]['error']||_0x3bff21['body'][_0x371656(0xbf)][_0x371656(0xc3)]===0x1;}async[_0x1e522b(0xde)](_0x3f8b6e,_0x56055f,_0x1e9144){const _0x2469e5=_0x1e522b,_0x31d71a={'unitId':_0x3f8b6e,'threadId':_0x1e9144},_0x416016=await this[_0x2469e5(0x129)][_0x2469e5(0x119)]('/universer-api/comment/unit/'+_0x3f8b6e+_0x2469e5(0xe9),{'body':_0x31d71a}),_0x2c8b84=_0x1e9144[_0x2469e5(0xeb)](_0x236830=>G(_0x416016[_0x2469e5(0xc7)][_0x2469e5(0x127)][_0x236830],_0x3f8b6e,_0x56055f))[_0x2469e5(0x12c)](Boolean);return Object[_0x2469e5(0x10f)](_0x416016[_0x2469e5(0xc7)][_0x2469e5(0x113)])[_0x2469e5(0x125)](_0x4e6d97=>{const _0x52ec9b=_0x2469e5;this[_0x52ec9b(0x12d)]['addUser'](_0x4e6d97);}),_0x2c8b84;}[_0x1e522b(0xee)](_0x326db1){return{'id':_0x326db1['id'],'threadId':_0x326db1['threadId'],'ref':_0x326db1['ref']};}};p=x([C(0x0,c['Inject'](P[_0x1e522b(0xbb)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x1e522b(0xca)](b[_0x1e522b(0xba)]))],p);var H=Object[_0x1e522b(0x116)],J=(_0x21bd68,_0x3eb8c1,_0x269252,_0x5562c4)=>{const _0x3dbd67=_0x1e522b;for(var _0x3a65cf=_0x5562c4>0x1?void 0x0:_0x5562c4?H(_0x3eb8c1,_0x269252):_0x3eb8c1,_0x4e4e2a=_0x21bd68[_0x3dbd67(0xcf)]-0x1,_0x95d0f4;_0x4e4e2a>=0x0;_0x4e4e2a--)(_0x95d0f4=_0x21bd68[_0x4e4e2a])&&(_0x3a65cf=_0x95d0f4(_0x3a65cf)||_0x3a65cf);return _0x3a65cf;},y=(_0x4cf990,_0x37ec0)=>(_0x8dfa54,_0x1597f4)=>_0x37ec0(_0x8dfa54,_0x1597f4,_0x4cf990);let g=class extends c[_0x1e522b(0x108)]{constructor(_0x502e40,_0x496369){const _0x119d76=_0x1e522b;super(),this[_0x119d76(0xf3)]=_0x502e40,this[_0x119d76(0xe2)]=_0x496369,this[_0x119d76(0xc0)]();}['_initDataSource'](){const _0x5678d6=_0x1e522b;this['_threadCommentDataSourceService'][_0x5678d6(0xef)]=this[_0x5678d6(0xe2)],this[_0x5678d6(0xf3)][_0x5678d6(0x12e)]=!0x1;}};g=J([y(0x0,M[_0x1e522b(0x100)]),y(0x1,c['Inject'](p))],g);function _0x4117(_0x3c872d,_0x44989d){_0x3c872d=_0x3c872d-0xb9;const _0x510aad=_0x510a();let _0x411747=_0x510aad[_0x3c872d];return _0x411747;}var F=Object[_0x1e522b(0xf1)],L=Object[_0x1e522b(0x116)],Z=(_0x2358c7,_0x55fa76,_0x4a04ad)=>_0x55fa76 in _0x2358c7?F(_0x2358c7,_0x55fa76,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4a04ad}):_0x2358c7[_0x55fa76]=_0x4a04ad,W=(_0x2cdbce,_0x558daa,_0x2ee825,_0x43c979)=>{const _0x3027a9=_0x1e522b;for(var _0x10d8e4=_0x43c979>0x1?void 0x0:_0x43c979?L(_0x558daa,_0x2ee825):_0x558daa,_0x4d8e2e=_0x2cdbce[_0x3027a9(0xcf)]-0x1,_0x236cfd;_0x4d8e2e>=0x0;_0x4d8e2e--)(_0x236cfd=_0x2cdbce[_0x4d8e2e])&&(_0x10d8e4=_0x236cfd(_0x10d8e4)||_0x10d8e4);return _0x10d8e4;},O=(_0x76693b,_0x218b86)=>(_0x43de39,_0x2c58ff)=>_0x218b86(_0x43de39,_0x2c58ff,_0x76693b),N=(_0x4ba8d5,_0x232e7b,_0x12a61b)=>Z(_0x4ba8d5,typeof _0x232e7b!='symbol'?_0x232e7b+'':_0x232e7b,_0x12a61b);exports[_0x1e522b(0xd7)]=class extends c['Plugin']{constructor(_0x1e632c=D,_0x6c973d,_0x509f66){const _0x4f4724=_0x1e522b;super(),this[_0x4f4724(0x10b)]=_0x1e632c,this['_injector']=_0x6c973d,this[_0x4f4724(0xfd)]=_0x509f66;const {..._0x43d04a}=c[_0x4f4724(0xea)]({},D,this[_0x4f4724(0x10b)]);this[_0x4f4724(0xfd)]['setConfig'](q,_0x43d04a);}[_0x1e522b(0xd1)](){const _0x265734=_0x1e522b;[[p],[g],[_]][_0x265734(0x125)](_0x432823=>{const _0x23f18b=_0x265734;this[_0x23f18b(0xdc)][_0x23f18b(0xe0)](_0x432823);});}[_0x1e522b(0x10a)](){const _0x124f52=_0x1e522b;this['_injector'][_0x124f52(0xf6)](g),this[_0x124f52(0xdc)][_0x124f52(0xf6)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x1e522b(0xd7)],_0x1e522b(0x107),c[_0x1e522b(0x106)][_0x1e522b(0xc2)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](w[_0x1e522b(0xc1)],b[_0x1e522b(0x10e)],T[_0x1e522b(0xd9)]),O(0x1,c[_0x1e522b(0xca)](c[_0x1e522b(0xff)])),O(0x2,c['IConfigService'])],exports[_0x1e522b(0xd7)]);
|
|
1
|
+
'use strict';const _0x490bf3=_0x340a;function _0x340a(_0x483ae0,_0x1dd40c){_0x483ae0=_0x483ae0-0x131;const _0xfd9d8d=_0xfd9d();let _0x340a21=_0xfd9d8d[_0x483ae0];return _0x340a21;}(function(_0x256f54,_0x36c615){const _0x177f0d=_0x340a,_0x339d18=_0x256f54();while(!![]){try{const _0x4e7fee=parseInt(_0x177f0d(0x166))/0x1+parseInt(_0x177f0d(0x13e))/0x2*(-parseInt(_0x177f0d(0x150))/0x3)+-parseInt(_0x177f0d(0x182))/0x4+parseInt(_0x177f0d(0x18d))/0x5+-parseInt(_0x177f0d(0x153))/0x6+-parseInt(_0x177f0d(0x142))/0x7+-parseInt(_0x177f0d(0x17d))/0x8*(-parseInt(_0x177f0d(0x1a6))/0x9);if(_0x4e7fee===_0x36c615)break;else _0x339d18['push'](_0x339d18['shift']());}catch(_0x1effd7){_0x339d18['push'](_0x339d18['shift']());}}}(_0xfd9d,0xb47c8));Object[_0x490bf3(0x179)](exports,Symbol[_0x490bf3(0x140)],{'value':_0x490bf3(0x168)});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=_0x490bf3(0x136);var I=(_0x318737=>(_0x318737[_0x318737[_0x490bf3(0x16a)]=0x0]=_0x490bf3(0x16a),_0x318737[_0x318737[_0x490bf3(0x138)]=0x1]=_0x490bf3(0x138),_0x318737[_0x318737['UNRECOGNIZED']=-0x1]=_0x490bf3(0x13d),_0x318737))(I||{}),v=(_0x577594=>(_0x577594[_0x577594[_0x490bf3(0x169)]=0x0]=_0x490bf3(0x169),_0x577594[_0x577594[_0x490bf3(0x15e)]=0x1]='Add',_0x577594[_0x577594[_0x490bf3(0x13c)]=0x2]=_0x490bf3(0x13c),_0x577594[_0x577594[_0x490bf3(0x1a1)]=0x3]='Edit',_0x577594[_0x577594['Delete']=0x4]=_0x490bf3(0x18b),_0x577594[_0x577594['Solve']=0x5]='Solve',_0x577594[_0x577594['UNRECOGNIZED']=-0x1]=_0x490bf3(0x13d),_0x577594))(v||{});function _0xfd9d(){const _0x458331=['Inject','disposeWithMe','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','Solved','length','_threadCommentModel','post','Reply','UNRECOGNIZED','511148wVBHVm','Solve','toStringTag','thread-comment-data-source.config','21203XSfjga','replies','slice','_config','/edit','find','requireSession','values','resolveComment','COMMENT','content','resolved','body','customRanges','3BcPYEz','Injector','CollaborationSessionService','3945684kGzqjy','onStarting','filter','_initDataSource','UNIVER_UNKNOWN','YYYY/MM/DD\x20HH:mm','commentUpdate$','error','user','createTimestamp','_httpService','Add','replyId','getUser','unitId','reply','_userService','comment','_injector','1058715MJENlw','get','Module','Unknown','OpenOrReOpen','add','getComment','dataSource','syncUpdateMutationToColla','CommentService','delete','DependentOn','ref','/list','getMemberID','UniverLicensePlugin','getUnit','userId','HTTPService','defineProperty','symbol','bufferTime','subscribe','7056072KXperW','UniverCollaborationClientPlugin','Disposable','/universer-api/user/list','_sessionService','5840396mqRTqi','ThreadCommentModel','payload','forEach','threadId','addUser','solved','_threadCommentDataSource','rangeId','Delete','users','5874320ejhsxM','UniverInstanceType','_threadCommentDataSourceService','personId','map','pluginName','code','format','addComment','pipe','type','_initUserSync','root','/universer-api/comment/unit/','/add','deleteComment','IConfigService','stringify','userID','merge','Edit','parse','UniverThreadCommentUIPlugin','getCurrentUser','_configService','9bTkOEu','UniverThreadCommentDataSourcePlugin','CustomRangeType','rangeType','/delete','getOwnPropertyDescriptor','_init','dayjs','onReady'];_0xfd9d=function(){return _0x458331;};return _0xfd9d();}const f=_0xa993d2=>c[_0x490bf3(0x131)](new Date(+_0xa993d2))[_0x490bf3(0x194)](_0x490bf3(0x158)),R=async(_0x23a129,_0x2a585a)=>{const _0x1e9b40=_0x490bf3,_0x495c5d=_0x23a129['get'](c['UserManagerService']),_0x283e82=_0x23a129['get'](P[_0x1e9b40(0x178)]);_0x2a585a[_0x1e9b40(0x185)](_0x4630d5=>{const _0x594da2=_0x1e9b40;_0x495c5d[_0x594da2(0x160)](_0x4630d5)&&_0x2a585a[_0x594da2(0x170)](_0x4630d5);}),_0x2a585a['size']&&(await _0x283e82[_0x1e9b40(0x167)](_0x1e9b40(0x180),{'params':{'userIDs':[..._0x2a585a]}}))[_0x1e9b40(0x14e)][_0x1e9b40(0x18c)][_0x1e9b40(0x185)](_0x33c13c=>{const _0x58369e=_0x1e9b40;_0x33c13c&&_0x495c5d[_0x58369e(0x187)](_0x33c13c);});};var $=Object[_0x490bf3(0x1ab)],E=(_0x34869a,_0x152c12,_0x3fcc0e,_0x2a826e)=>{const _0x226fbb=_0x490bf3;for(var _0x224121=_0x2a826e>0x1?void 0x0:_0x2a826e?$(_0x152c12,_0x3fcc0e):_0x152c12,_0x3da877=_0x34869a[_0x226fbb(0x139)]-0x1,_0x229124;_0x3da877>=0x0;_0x3da877--)(_0x229124=_0x34869a[_0x3da877])&&(_0x224121=_0x229124(_0x224121)||_0x224121);return _0x224121;},S=(_0x6cec02,_0x2fa9b1)=>(_0x1991db,_0x3ef992)=>_0x2fa9b1(_0x1991db,_0x3ef992,_0x6cec02);let _=class extends c[_0x490bf3(0x17f)]{constructor(_0x7a9083,_0x76f598,_0x27bfc3,_0x2bc52d){const _0x2a1681=_0x490bf3;super(),this[_0x2a1681(0x135)]=_0x7a9083,this['_threadCommentModel']=_0x76f598,this[_0x2a1681(0x163)]=_0x27bfc3,this[_0x2a1681(0x165)]=_0x2bc52d,this[_0x2a1681(0x1ac)](),this[_0x2a1681(0x198)]();}[_0x490bf3(0x198)](){const _0x2e71b8=_0x490bf3;this['disposeWithMe'](this[_0x2e71b8(0x13a)][_0x2e71b8(0x159)][_0x2e71b8(0x196)](j[_0x2e71b8(0x17b)](0x10))[_0x2e71b8(0x17c)](_0x59a7fc=>{const _0x5793ca=_0x2e71b8,_0x179c4c=new Set();_0x59a7fc['forEach'](_0xf2d7b7=>{const _0x1f97db=_0x340a;if(_0xf2d7b7[_0x1f97db(0x197)]===_0x1f97db(0x16b)){const _0xd91582=_0xf2d7b7[_0x1f97db(0x184)][_0x1f97db(0x190)];_0x179c4c['add'](_0xd91582);}}),R(this[_0x5793ca(0x165)],_0x179c4c);}));}['_init'](){const _0x46db6e=_0x490bf3;this[_0x46db6e(0x134)](this[_0x46db6e(0x135)][_0x46db6e(0x159)][_0x46db6e(0x17c)](async _0x2ecb69=>{const _0x3a3ec4=_0x46db6e;var _0x1a6a5c,_0x173f1a,_0x5e0f0d,_0x3fab7f;const _0x163aa4=(_0x1a6a5c=this[_0x3a3ec4(0x13a)]['getUnit'](_0x2ecb69[_0x3a3ec4(0x161)])[_0x3a3ec4(0x147)](_0x4baab6=>_0x4baab6[_0x3a3ec4(0x186)]===_0x2ecb69[_0x3a3ec4(0x186)]))==null?void 0x0:_0x1a6a5c[_0x3a3ec4(0x199)];if(!_0x163aa4)return;const {unitId:_0x5bf306,subUnitId:_0x18f5fe}=_0x163aa4;switch(_0x2ecb69[_0x3a3ec4(0x15b)]&&this[_0x3a3ec4(0x163)]['addUser'](_0x2ecb69['user']),_0x2ecb69[_0x3a3ec4(0x197)]){case v[_0x3a3ec4(0x15e)]:break;case v[_0x3a3ec4(0x13c)]:{this[_0x3a3ec4(0x13a)][_0x3a3ec4(0x195)](_0x5bf306,_0x18f5fe,{'unitId':_0x5bf306,'subUnitId':_0x18f5fe,'ref':'','id':_0x2ecb69[_0x3a3ec4(0x15f)],'dT':f(+_0x2ecb69[_0x3a3ec4(0x15c)]),'threadId':_0x2ecb69['threadId'],'personId':(_0x5e0f0d=(_0x173f1a=_0x2ecb69[_0x3a3ec4(0x15b)])==null?void 0x0:_0x173f1a[_0x3a3ec4(0x19f)])!=null?_0x5e0f0d:_0x2ecb69[_0x3a3ec4(0x177)],'text':JSON[_0x3a3ec4(0x1a2)](_0x2ecb69[_0x3a3ec4(0x14c)]),'parentId':_0x163aa4['id']});break;}case v['Delete']:{const _0x73b6a9=this[_0x3a3ec4(0x13a)][_0x3a3ec4(0x16c)](_0x5bf306,_0x18f5fe,_0x2ecb69['replyId']);_0x73b6a9&&_0x73b6a9['parentId']&&this[_0x3a3ec4(0x13a)][_0x3a3ec4(0x19c)](_0x5bf306,_0x18f5fe,_0x2ecb69[_0x3a3ec4(0x15f)]);break;}case v[_0x3a3ec4(0x1a1)]:{this[_0x3a3ec4(0x13a)]['updateComment'](_0x5bf306,_0x18f5fe,{'commentId':_0x2ecb69[_0x3a3ec4(0x15f)],'text':JSON[_0x3a3ec4(0x1a2)](_0x2ecb69[_0x3a3ec4(0x14c)])});break;}case v[_0x3a3ec4(0x13f)]:{const _0x1b1103=(_0x3fab7f=this[_0x3a3ec4(0x13a)][_0x3a3ec4(0x176)](_0x2ecb69[_0x3a3ec4(0x161)])[_0x3a3ec4(0x147)](_0x415622=>_0x415622['threadId']===_0x2ecb69['threadId']))==null?void 0x0:_0x3fab7f[_0x3a3ec4(0x199)];_0x1b1103&&this['_threadCommentModel']['resolveComment'](_0x5bf306,_0x18f5fe,_0x1b1103['id'],_0x2ecb69['solved']===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x490bf3(0x133)](b[_0x490bf3(0x16f)])),S(0x1,c[_0x490bf3(0x133)](M[_0x490bf3(0x183)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c[_0x490bf3(0x133)](c[_0x490bf3(0x151)]))],_);const q=_0x490bf3(0x141),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x897f50,_0x316e8f,_0x2a53de,_0x5c9af9)=>{const _0x1c1a0b=_0x490bf3;for(var _0x45a3c6=_0x5c9af9>0x1?void 0x0:_0x5c9af9?A(_0x316e8f,_0x2a53de):_0x316e8f,_0x336113=_0x897f50[_0x1c1a0b(0x139)]-0x1,_0x1b20e7;_0x336113>=0x0;_0x336113--)(_0x1b20e7=_0x897f50[_0x336113])&&(_0x45a3c6=_0x1b20e7(_0x45a3c6)||_0x45a3c6);return _0x45a3c6;},C=(_0x26be76,_0x6c6374)=>(_0xc72fb5,_0x4dc27d)=>_0x6c6374(_0xc72fb5,_0x4dc27d,_0x26be76);function Y(_0x4cecdf,_0x316c4a){const _0x23f83f=_0x490bf3,_0x5cc2e9=_0x4cecdf['replies'][0x0];return{..._0x316c4a,'id':_0x5cc2e9[_0x23f83f(0x15f)],'resolved':_0x4cecdf[_0x23f83f(0x188)]===0x1,'dT':f(_0x5cc2e9[_0x23f83f(0x15c)]),'personId':_0x5cc2e9[_0x23f83f(0x177)],'threadId':_0x5cc2e9[_0x23f83f(0x186)]};}function G(_0x457cb1,_0x298fde,_0x6579f6){const _0x328a37=_0x490bf3;var _0xc9debc,_0x4c15d3;if(((_0x4c15d3=(_0xc9debc=_0x457cb1==null?void 0x0:_0x457cb1[_0x328a37(0x143)])==null?void 0x0:_0xc9debc[_0x328a37(0x139)])!=null?_0x4c15d3:0x0)>0x0){const _0x1095a9=(_0x3210e1,_0x2b293f)=>({'id':_0x3210e1['replyId'],'threadId':_0x3210e1[_0x328a37(0x186)],'dT':f(_0x3210e1[_0x328a37(0x15c)]),'personId':_0x3210e1[_0x328a37(0x177)],'resolved':_0x457cb1[_0x328a37(0x188)]===I['Solved'],'unitId':_0x298fde,'subUnitId':_0x6579f6,'text':JSON[_0x328a37(0x1a2)](_0x3210e1[_0x328a37(0x14c)]),'parentId':_0x2b293f}),_0x35c2b2=_0x1095a9(_0x457cb1[_0x328a37(0x143)][0x0]);return{..._0x35c2b2,'children':_0x457cb1['replies'][_0x328a37(0x144)](0x1)[_0x328a37(0x191)](_0x41d6fb=>_0x1095a9(_0x41d6fb,_0x35c2b2['id']))};}return null;}let p=class{constructor(_0x3a37db,_0x12cd94,_0x3bc7e4){const _0x4b3446=_0x490bf3;this[_0x4b3446(0x15d)]=_0x3a37db,this['_userService']=_0x12cd94,this[_0x4b3446(0x181)]=_0x3bc7e4;}async['addComment'](_0x5234df){const _0xbd8121=_0x490bf3;var _0x42620f,_0x23062d;const {parentId:_0x1e4ccf,unitId:_0x3c492e,text:_0x2ff610,threadId:_0x401e93}=_0x5234df,_0x2f080e=(_0x23062d=(_0x42620f=_0x2ff610[_0xbd8121(0x14f)])==null?void 0x0:_0x42620f[_0xbd8121(0x155)](_0x156a25=>_0x156a25['rangeType']===c[_0xbd8121(0x1a8)][_0xbd8121(0x14b)])[_0xbd8121(0x191)](_0x483abd=>_0x483abd[_0xbd8121(0x18a)]))!=null?_0x23062d:[],_0x2718eb=JSON[_0xbd8121(0x19e)](_0x2ff610),_0x6fcd92=(await this['_sessionService']['requireSession'](_0x3c492e))['getMemberID']();if(_0x1e4ccf){const _0x348535={'memberId':_0x6fcd92,'unitId':_0x3c492e,'content':_0x2718eb,'mention':_0x2f080e,'threadId':_0x401e93},_0x42501d=(await this[_0xbd8121(0x15d)][_0xbd8121(0x13b)](_0xbd8121(0x19a)+_0x3c492e+'/reply',{'body':_0x348535}))['body'][_0xbd8121(0x162)];return{..._0x5234df,'id':_0x42501d['replyId'],'dT':c[_0xbd8121(0x131)](+_0x42501d[_0xbd8121(0x15c)])[_0xbd8121(0x194)](_0xbd8121(0x158)),'personId':_0x42501d['userId']};}else{const _0x280a08={'memberId':_0x6fcd92,'unitId':_0x3c492e,'content':_0x2718eb,'mention':_0x2f080e},_0x562084=await this[_0xbd8121(0x15d)][_0xbd8121(0x13b)](_0xbd8121(0x19a)+_0x3c492e+_0xbd8121(0x19b),{'body':_0x280a08});return Y(_0x562084['body'][_0xbd8121(0x164)],_0x5234df);}}async['updateComment'](_0x160f0d){const _0x2ec0da=_0x490bf3;var _0x5666d9,_0x2cc852;const {text:_0xdba490,unitId:_0x161b16}=_0x160f0d,_0x11c674=(_0x2cc852=(_0x5666d9=_0xdba490[_0x2ec0da(0x14f)])==null?void 0x0:_0x5666d9[_0x2ec0da(0x155)](_0x59350f=>_0x59350f[_0x2ec0da(0x1a9)]===c[_0x2ec0da(0x1a8)][_0x2ec0da(0x14b)])[_0x2ec0da(0x191)](_0x1654e5=>_0x1654e5[_0x2ec0da(0x18a)]))!=null?_0x2cc852:[],_0x548fb4=JSON[_0x2ec0da(0x19e)](_0xdba490),_0xdb0f89=_0x160f0d[_0x2ec0da(0x186)],_0x57df65=_0x160f0d['id'],_0x395e43={'memberId':(await this[_0x2ec0da(0x181)]['requireSession'](_0x161b16))[_0x2ec0da(0x174)](),'unitId':_0x161b16,'threadId':_0xdb0f89,'mention':_0x11c674,'content':_0x548fb4,'replyId':_0x57df65},_0x180507=await this[_0x2ec0da(0x15d)][_0x2ec0da(0x13b)](_0x2ec0da(0x19a)+_0x161b16+_0x2ec0da(0x146),{'body':_0x395e43});return!_0x180507[_0x2ec0da(0x14e)]['error']||_0x180507['body'][_0x2ec0da(0x15a)][_0x2ec0da(0x193)]===0x1;}async[_0x490bf3(0x14a)](_0x329d97){const _0xa39596=_0x490bf3,{unitId:_0x366840}=_0x329d97,_0x59901d=_0x329d97['threadId'],_0x15152d={'memberId':this[_0xa39596(0x163)][_0xa39596(0x1a4)]()['userID'],'unitId':_0x366840,'threadId':_0x59901d,'solved':_0x329d97[_0xa39596(0x14d)]?I[_0xa39596(0x138)]:I['OpenOrReOpen']},_0xbeeeb0=await this[_0xa39596(0x15d)]['post']('/universer-api/comment/unit/'+_0x366840+'/solved',{'body':_0x15152d});return!_0xbeeeb0[_0xa39596(0x14e)][_0xa39596(0x15a)]||_0xbeeeb0['body'][_0xa39596(0x15a)][_0xa39596(0x193)]===0x1;}async[_0x490bf3(0x19c)](_0x5f35e2,_0x304d05,_0xdfffbe,_0x5d31eb){const _0x3fe81b=_0x490bf3,_0xe65a32={'memberId':(await this[_0x3fe81b(0x181)][_0x3fe81b(0x148)](_0x5f35e2))[_0x3fe81b(0x174)](),'threadId':_0xdfffbe,'replyId':_0x5d31eb,'unitId':_0x5f35e2},_0x43d306=await this[_0x3fe81b(0x15d)]['post']('/universer-api/comment/unit/'+_0x5f35e2+_0x3fe81b(0x1aa),{'body':_0xe65a32});return!_0x43d306['body'][_0x3fe81b(0x15a)]||_0x43d306[_0x3fe81b(0x14e)][_0x3fe81b(0x15a)][_0x3fe81b(0x193)]===0x1;}async['listComments'](_0x1e43af,_0x3678d1,_0x4abdee){const _0x529a23=_0x490bf3,_0x96859a={'unitId':_0x1e43af,'threadId':_0x4abdee},_0x426afc=await this[_0x529a23(0x15d)][_0x529a23(0x13b)](_0x529a23(0x19a)+_0x1e43af+_0x529a23(0x173),{'body':_0x96859a}),_0x1058ab=_0x4abdee[_0x529a23(0x191)](_0x3a58fb=>G(_0x426afc['body']['comments'][_0x3a58fb],_0x1e43af,_0x3678d1))[_0x529a23(0x155)](Boolean);return Object[_0x529a23(0x149)](_0x426afc[_0x529a23(0x14e)][_0x529a23(0x18c)])[_0x529a23(0x185)](_0x1956d2=>{const _0x38e302=_0x529a23;this[_0x38e302(0x163)][_0x38e302(0x187)](_0x1956d2);}),_0x1058ab;}['saveCommentToSnapshot'](_0x4fa31f){const _0x3ae513=_0x490bf3;return{'id':_0x4fa31f['id'],'threadId':_0x4fa31f['threadId'],'ref':_0x4fa31f[_0x3ae513(0x172)]};}};p=x([C(0x0,c['Inject'](P['HTTPService'])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x490bf3(0x133)](b[_0x490bf3(0x152)]))],p);var H=Object[_0x490bf3(0x1ab)],J=(_0x48e188,_0x576b2a,_0x5bd139,_0x5f0fd6)=>{const _0x3f63af=_0x490bf3;for(var _0x12a5a9=_0x5f0fd6>0x1?void 0x0:_0x5f0fd6?H(_0x576b2a,_0x5bd139):_0x576b2a,_0x1f1469=_0x48e188[_0x3f63af(0x139)]-0x1,_0x46796c;_0x1f1469>=0x0;_0x1f1469--)(_0x46796c=_0x48e188[_0x1f1469])&&(_0x12a5a9=_0x46796c(_0x12a5a9)||_0x12a5a9);return _0x12a5a9;},y=(_0x430236,_0x274343)=>(_0x541bf2,_0x286562)=>_0x274343(_0x541bf2,_0x286562,_0x430236);let g=class extends c[_0x490bf3(0x17f)]{constructor(_0x59d932,_0x902a20){const _0x496d30=_0x490bf3;super(),this['_threadCommentDataSourceService']=_0x59d932,this[_0x496d30(0x189)]=_0x902a20,this[_0x496d30(0x156)]();}['_initDataSource'](){const _0x3026f0=_0x490bf3;this[_0x3026f0(0x18f)][_0x3026f0(0x16d)]=this[_0x3026f0(0x189)],this[_0x3026f0(0x18f)][_0x3026f0(0x16e)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x490bf3(0x133)](p))],g);var F=Object['defineProperty'],L=Object[_0x490bf3(0x1ab)],Z=(_0x148c62,_0x313b9c,_0x4c5ed3)=>_0x313b9c in _0x148c62?F(_0x148c62,_0x313b9c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c5ed3}):_0x148c62[_0x313b9c]=_0x4c5ed3,W=(_0x54300a,_0x2d322b,_0x1403b7,_0xf5ccc0)=>{for(var _0x25cd08=_0xf5ccc0>0x1?void 0x0:_0xf5ccc0?L(_0x2d322b,_0x1403b7):_0x2d322b,_0xf87bac=_0x54300a['length']-0x1,_0x4b44c4;_0xf87bac>=0x0;_0xf87bac--)(_0x4b44c4=_0x54300a[_0xf87bac])&&(_0x25cd08=_0x4b44c4(_0x25cd08)||_0x25cd08);return _0x25cd08;},O=(_0x536880,_0x284c0e)=>(_0x5960cd,_0x37d45a)=>_0x284c0e(_0x5960cd,_0x37d45a,_0x536880),N=(_0x3000ba,_0x2a81e8,_0x507168)=>Z(_0x3000ba,typeof _0x2a81e8!=_0x490bf3(0x17a)?_0x2a81e8+'':_0x2a81e8,_0x507168);exports[_0x490bf3(0x1a7)]=class extends c['Plugin']{constructor(_0x591c8f=D,_0x102092,_0x42fa98){const _0x705b86=_0x490bf3;super(),this[_0x705b86(0x145)]=_0x591c8f,this[_0x705b86(0x165)]=_0x102092,this['_configService']=_0x42fa98;const {..._0x2019b9}=c[_0x705b86(0x1a0)]({},D,this[_0x705b86(0x145)]);this[_0x705b86(0x1a5)][_0x705b86(0x137)](q,_0x2019b9);}[_0x490bf3(0x154)](){const _0x3867cf=_0x490bf3;[[p],[g],[_]][_0x3867cf(0x185)](_0x347f46=>{const _0xb28030=_0x3867cf;this['_injector'][_0xb28030(0x16b)](_0x347f46);});}[_0x490bf3(0x132)](){const _0x176727=_0x490bf3;this[_0x176727(0x165)][_0x176727(0x167)](g),this[_0x176727(0x165)][_0x176727(0x167)](_);}},N(exports[_0x490bf3(0x1a7)],_0x490bf3(0x192),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0x490bf3(0x18e)][_0x490bf3(0x157)]),exports[_0x490bf3(0x1a7)]=W([c[_0x490bf3(0x171)](w[_0x490bf3(0x1a3)],b[_0x490bf3(0x17e)],T[_0x490bf3(0x175)]),O(0x1,c[_0x490bf3(0x133)](c[_0x490bf3(0x151)])),O(0x2,c[_0x490bf3(0x19d)])],exports[_0x490bf3(0x1a7)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3f63da=_0x4fd3;(function(_0x251443,_0x30a4a7){const _0x14167c=_0x4fd3,_0x4ef987=_0x251443();while(!![]){try{const _0x428008=parseInt(_0x14167c(0x184))/0x1*(-parseInt(_0x14167c(0x19d))/0x2)+-parseInt(_0x14167c(0x147))/0x3+-parseInt(_0x14167c(0x159))/0x4*(-parseInt(_0x14167c(0x14f))/0x5)+-parseInt(_0x14167c(0x16c))/0x6+-parseInt(_0x14167c(0x171))/0x7*(parseInt(_0x14167c(0x164))/0x8)+-parseInt(_0x14167c(0x1a3))/0x9*(parseInt(_0x14167c(0x163))/0xa)+parseInt(_0x14167c(0x190))/0xb*(parseInt(_0x14167c(0x186))/0xc);if(_0x428008===_0x30a4a7)break;else _0x4ef987['push'](_0x4ef987['shift']());}catch(_0x4e52fa){_0x4ef987['push'](_0x4ef987['shift']());}}}(_0x1b76,0xa06f5));import{CommentService as _0x496dbb,CollaborationSessionService as _0x2c5e4c,UniverCollaborationClientPlugin as _0x3a685b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x586010}from'@univerjs-pro/license';import{dayjs as _0x28ba39,UserManagerService as _0x388990,Inject as _0x4bd280,Injector as _0x249295,Disposable as _0x391d46,CustomRangeType as _0x51ffb1,UniverInstanceType as _0x35e782,DependentOn as _0x25b0c6,IConfigService as _0x55aae9,Plugin as _0x14a1a2,merge as _0x21e87f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1d91a2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5d3082,IThreadCommentDataSourceService as _0x2f9f28}from'@univerjs/thread-comment';import{bufferTime as _0x316e50}from'rxjs';import{HTTPService as _0x16abd7}from'@univerjs/network';const W=_0x3f63da(0x17c);var I=(_0x5890c0=>(_0x5890c0[_0x5890c0[_0x3f63da(0x16e)]=0x0]='OpenOrReOpen',_0x5890c0[_0x5890c0['Solved']=0x1]='Solved',_0x5890c0[_0x5890c0[_0x3f63da(0x185)]=-0x1]=_0x3f63da(0x185),_0x5890c0))(I||{}),v=(_0x3d4d9d=>(_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x18a)]=0x0]='Unknown',_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x17a)]=0x1]='Add',_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x19a)]=0x2]=_0x3f63da(0x19a),_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x198)]=0x3]='Edit',_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x149)]=0x4]=_0x3f63da(0x149),_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x1a6)]=0x5]='Solve',_0x3d4d9d[_0x3d4d9d['UNRECOGNIZED']=-0x1]=_0x3f63da(0x185),_0x3d4d9d))(v||{});const y=_0x1416c3=>_0x28ba39(new Date(+_0x1416c3))[_0x3f63da(0x181)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3258a6,_0x1eaeba)=>{const _0x370a20=_0x3f63da,_0x2fff28=_0x3258a6[_0x370a20(0x14e)](_0x388990),_0x3566a7=_0x3258a6['get'](_0x16abd7);_0x1eaeba[_0x370a20(0x197)](_0x3e621b=>{const _0x901d45=_0x370a20;_0x2fff28[_0x901d45(0x192)](_0x3e621b)&&_0x1eaeba[_0x901d45(0x170)](_0x3e621b);}),_0x1eaeba['size']&&(await _0x3566a7[_0x370a20(0x14e)](_0x370a20(0x18e),{'params':{'userIDs':[..._0x1eaeba]}}))[_0x370a20(0x145)][_0x370a20(0x17b)][_0x370a20(0x197)](_0x13115c=>{const _0x39e410=_0x370a20;_0x13115c&&_0x2fff28[_0x39e410(0x153)](_0x13115c);});};var K=Object[_0x3f63da(0x1aa)],V=(_0x3accf5,_0x9c9acd,_0x29efc7,_0x3623a7)=>{const _0x3b9bb5=_0x3f63da;for(var _0x40db44=_0x3623a7>0x1?void 0x0:_0x3623a7?K(_0x9c9acd,_0x29efc7):_0x9c9acd,_0x5170bb=_0x3accf5[_0x3b9bb5(0x1a1)]-0x1,_0x132f41;_0x5170bb>=0x0;_0x5170bb--)(_0x132f41=_0x3accf5[_0x5170bb])&&(_0x40db44=_0x132f41(_0x40db44)||_0x40db44);return _0x40db44;},p=(_0x129962,_0x2bc81e)=>(_0x26cd2a,_0x58c1d0)=>_0x2bc81e(_0x26cd2a,_0x58c1d0,_0x129962);let _=class extends _0x391d46{constructor(_0x277360,_0x471aa6,_0x570188,_0x16573e){const _0x5e6ea2=_0x3f63da;super(),this[_0x5e6ea2(0x168)]=_0x277360,this['_threadCommentModel']=_0x471aa6,this[_0x5e6ea2(0x17f)]=_0x570188,this[_0x5e6ea2(0x175)]=_0x16573e,this[_0x5e6ea2(0x176)](),this[_0x5e6ea2(0x156)]();}['_initUserSync'](){const _0x2394b4=_0x3f63da;this[_0x2394b4(0x187)](this['_threadCommentModel']['commentUpdate$'][_0x2394b4(0x18c)](_0x316e50(0x10))['subscribe'](_0x1a15ba=>{const _0x961bef=_0x2394b4,_0x588321=new Set();_0x1a15ba[_0x961bef(0x197)](_0x177bef=>{const _0xe6be29=_0x961bef;if(_0x177bef['type']==='add'){const _0x3addec=_0x177bef[_0xe6be29(0x14d)][_0xe6be29(0x144)];_0x588321[_0xe6be29(0x199)](_0x3addec);}}),B(this[_0x961bef(0x175)],_0x588321);}));}[_0x3f63da(0x176)](){const _0x2ed88e=_0x3f63da;this[_0x2ed88e(0x187)](this[_0x2ed88e(0x168)][_0x2ed88e(0x146)][_0x2ed88e(0x155)](async _0x41429a=>{const _0x346ce0=_0x2ed88e;var _0x20cb01,_0x5adcc7,_0x2b684e,_0x4b7fb0;const _0x510c45=(_0x20cb01=this[_0x346ce0(0x178)][_0x346ce0(0x174)](_0x41429a[_0x346ce0(0x143)])[_0x346ce0(0x1a2)](_0x195d56=>_0x195d56[_0x346ce0(0x1a7)]===_0x41429a['threadId']))==null?void 0x0:_0x20cb01['root'];if(!_0x510c45)return;const {unitId:_0x15ecc2,subUnitId:_0x299f45}=_0x510c45;switch(_0x41429a['user']&&this[_0x346ce0(0x17f)]['addUser'](_0x41429a[_0x346ce0(0x16a)]),_0x41429a[_0x346ce0(0x15d)]){case v[_0x346ce0(0x17a)]:break;case v[_0x346ce0(0x19a)]:{this[_0x346ce0(0x178)]['addComment'](_0x15ecc2,_0x299f45,{'unitId':_0x15ecc2,'subUnitId':_0x299f45,'ref':'','id':_0x41429a['replyId'],'dT':y(+_0x41429a[_0x346ce0(0x1a4)]),'threadId':_0x41429a[_0x346ce0(0x1a7)],'personId':(_0x2b684e=(_0x5adcc7=_0x41429a[_0x346ce0(0x16a)])==null?void 0x0:_0x5adcc7['userID'])!=null?_0x2b684e:_0x41429a[_0x346ce0(0x19c)],'text':JSON[_0x346ce0(0x151)](_0x41429a['content']),'parentId':_0x510c45['id']});break;}case v[_0x346ce0(0x149)]:{const _0x529631=this[_0x346ce0(0x178)][_0x346ce0(0x165)](_0x15ecc2,_0x299f45,_0x41429a[_0x346ce0(0x161)]);_0x529631&&_0x529631['parentId']&&this[_0x346ce0(0x178)]['deleteComment'](_0x15ecc2,_0x299f45,_0x41429a['replyId']);break;}case v[_0x346ce0(0x198)]:{this[_0x346ce0(0x178)][_0x346ce0(0x183)](_0x15ecc2,_0x299f45,{'commentId':_0x41429a[_0x346ce0(0x161)],'text':JSON['parse'](_0x41429a['content'])});break;}case v['Solve']:{const _0x25c421=(_0x4b7fb0=this[_0x346ce0(0x178)][_0x346ce0(0x174)](_0x41429a['unitId'])['find'](_0x4de646=>_0x4de646[_0x346ce0(0x1a7)]===_0x41429a[_0x346ce0(0x1a7)]))==null?void 0x0:_0x4b7fb0[_0x346ce0(0x167)];_0x25c421&&this[_0x346ce0(0x178)][_0x346ce0(0x150)](_0x15ecc2,_0x299f45,_0x25c421['id'],_0x41429a['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4bd280(_0x496dbb)),p(0x1,_0x4bd280(_0x5d3082)),p(0x2,_0x4bd280(_0x388990)),p(0x3,_0x4bd280(_0x249295))],_);function _0x4fd3(_0x502c48,_0x24f8ce){_0x502c48=_0x502c48-0x143;const _0x1b7602=_0x1b76();let _0x4fd326=_0x1b7602[_0x502c48];return _0x4fd326;}const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x38373b,_0x25bacf,_0x49f8d6,_0x132edb)=>{const _0x5ac149=_0x3f63da;for(var _0x2e1628=_0x132edb>0x1?void 0x0:_0x132edb?k(_0x25bacf,_0x49f8d6):_0x25bacf,_0x26fc15=_0x38373b[_0x5ac149(0x1a1)]-0x1,_0x28c166;_0x26fc15>=0x0;_0x26fc15--)(_0x28c166=_0x38373b[_0x26fc15])&&(_0x2e1628=_0x28c166(_0x2e1628)||_0x2e1628);return _0x2e1628;},b=(_0x143ecd,_0x4531c2)=>(_0x2df912,_0x39fd54)=>_0x4531c2(_0x2df912,_0x39fd54,_0x143ecd);function X(_0x3c675c,_0x5b4311){const _0x293743=_0x3f63da,_0x5e557b=_0x3c675c[_0x293743(0x173)][0x0];return{..._0x5b4311,'id':_0x5e557b[_0x293743(0x161)],'resolved':_0x3c675c[_0x293743(0x1a8)]===0x1,'dT':y(_0x5e557b[_0x293743(0x1a4)]),'personId':_0x5e557b[_0x293743(0x19c)],'threadId':_0x5e557b['threadId']};}function ee(_0x3dd8d8,_0x5781cc,_0x357123){const _0x41ad8d=_0x3f63da;var _0x380787,_0x2020ed;if(((_0x2020ed=(_0x380787=_0x3dd8d8==null?void 0x0:_0x3dd8d8[_0x41ad8d(0x173)])==null?void 0x0:_0x380787[_0x41ad8d(0x1a1)])!=null?_0x2020ed:0x0)>0x0){const _0x529d8a=(_0x42e7eb,_0x2e8018)=>({'id':_0x42e7eb['replyId'],'threadId':_0x42e7eb[_0x41ad8d(0x1a7)],'dT':y(_0x42e7eb['createTimestamp']),'personId':_0x42e7eb['userId'],'resolved':_0x3dd8d8[_0x41ad8d(0x1a8)]===I[_0x41ad8d(0x193)],'unitId':_0x5781cc,'subUnitId':_0x357123,'text':JSON[_0x41ad8d(0x151)](_0x42e7eb[_0x41ad8d(0x1a9)]),'parentId':_0x2e8018}),_0x17cc45=_0x529d8a(_0x3dd8d8[_0x41ad8d(0x173)][0x0]);return{..._0x17cc45,'children':_0x3dd8d8[_0x41ad8d(0x173)][_0x41ad8d(0x17d)](0x1)[_0x41ad8d(0x18b)](_0x16c60d=>_0x529d8a(_0x16c60d,_0x17cc45['id']))};}return null;}let S=class{constructor(_0x44c1b8,_0xb48d13,_0x3577cf){const _0x3c8f03=_0x3f63da;this[_0x3c8f03(0x15c)]=_0x44c1b8,this['_userService']=_0xb48d13,this[_0x3c8f03(0x195)]=_0x3577cf;}async['addComment'](_0x445902){const _0x598007=_0x3f63da;var _0x217d86,_0x5a3f4d;const {parentId:_0x38c24d,unitId:_0x53f572,text:_0x370955,threadId:_0x4bd308}=_0x445902,_0x41a74f=(_0x5a3f4d=(_0x217d86=_0x370955['customRanges'])==null?void 0x0:_0x217d86[_0x598007(0x157)](_0x5d311b=>_0x5d311b['rangeType']===_0x51ffb1['COMMENT'])[_0x598007(0x18b)](_0x22d42b=>_0x22d42b[_0x598007(0x148)]))!=null?_0x5a3f4d:[],_0x44b320=JSON[_0x598007(0x160)](_0x370955),_0x49db91=(await this[_0x598007(0x195)][_0x598007(0x16d)](_0x53f572))[_0x598007(0x191)]();if(_0x38c24d){const _0x4bd247={'memberId':_0x49db91,'unitId':_0x53f572,'content':_0x44b320,'mention':_0x41a74f,'threadId':_0x4bd308},_0x164bfb=(await this[_0x598007(0x15c)][_0x598007(0x15b)](_0x598007(0x19e)+_0x53f572+'/reply',{'body':_0x4bd247}))['body'][_0x598007(0x16f)];return{..._0x445902,'id':_0x164bfb[_0x598007(0x161)],'dT':_0x28ba39(+_0x164bfb[_0x598007(0x1a4)])['format'](_0x598007(0x152)),'personId':_0x164bfb[_0x598007(0x19c)]};}else{const _0x44c0ab={'memberId':_0x49db91,'unitId':_0x53f572,'content':_0x44b320,'mention':_0x41a74f},_0x669843=await this[_0x598007(0x15c)][_0x598007(0x15b)](_0x598007(0x19e)+_0x53f572+_0x598007(0x17e),{'body':_0x44c0ab});return X(_0x669843[_0x598007(0x145)][_0x598007(0x166)],_0x445902);}}async[_0x3f63da(0x183)](_0x1ac438){const _0x5d4e12=_0x3f63da;var _0x3de0f7,_0x148e67;const {text:_0x37c0e2,unitId:_0x17e8cb}=_0x1ac438,_0x3fa4a2=(_0x148e67=(_0x3de0f7=_0x37c0e2[_0x5d4e12(0x177)])==null?void 0x0:_0x3de0f7[_0x5d4e12(0x157)](_0x3978f8=>_0x3978f8[_0x5d4e12(0x1a5)]===_0x51ffb1[_0x5d4e12(0x196)])[_0x5d4e12(0x18b)](_0x106213=>_0x106213['rangeId']))!=null?_0x148e67:[],_0x39a5de=JSON[_0x5d4e12(0x160)](_0x37c0e2),_0x3b82a3=_0x1ac438[_0x5d4e12(0x1a7)],_0x305af8=_0x1ac438['id'],_0x111643={'memberId':(await this['_sessionService'][_0x5d4e12(0x16d)](_0x17e8cb))['getMemberID'](),'unitId':_0x17e8cb,'threadId':_0x3b82a3,'mention':_0x3fa4a2,'content':_0x39a5de,'replyId':_0x305af8},_0x2a5caf=await this['_httpService'][_0x5d4e12(0x15b)](_0x5d4e12(0x19e)+_0x17e8cb+'/edit',{'body':_0x111643});return!_0x2a5caf[_0x5d4e12(0x145)][_0x5d4e12(0x188)]||_0x2a5caf[_0x5d4e12(0x145)][_0x5d4e12(0x188)][_0x5d4e12(0x19f)]===0x1;}async[_0x3f63da(0x150)](_0x22c1af){const _0x391918=_0x3f63da,{unitId:_0x394fd3}=_0x22c1af,_0x52fa84=_0x22c1af[_0x391918(0x1a7)],_0x2c94af={'memberId':this[_0x391918(0x17f)][_0x391918(0x14a)]()[_0x391918(0x18d)],'unitId':_0x394fd3,'threadId':_0x52fa84,'solved':_0x22c1af[_0x391918(0x18f)]?I['Solved']:I[_0x391918(0x16e)]},_0x3d29c1=await this['_httpService'][_0x391918(0x15b)](_0x391918(0x19e)+_0x394fd3+'/solved',{'body':_0x2c94af});return!_0x3d29c1[_0x391918(0x145)][_0x391918(0x188)]||_0x3d29c1['body']['error']['code']===0x1;}async[_0x3f63da(0x14c)](_0xb74be6,_0x5f5b57,_0x536da1,_0x4cdb1d){const _0x1353bb=_0x3f63da,_0x56fa6e={'memberId':(await this[_0x1353bb(0x195)][_0x1353bb(0x16d)](_0xb74be6))[_0x1353bb(0x191)](),'threadId':_0x536da1,'replyId':_0x4cdb1d,'unitId':_0xb74be6},_0x2c324b=await this[_0x1353bb(0x15c)]['post'](_0x1353bb(0x19e)+_0xb74be6+_0x1353bb(0x172),{'body':_0x56fa6e});return!_0x2c324b[_0x1353bb(0x145)][_0x1353bb(0x188)]||_0x2c324b['body'][_0x1353bb(0x188)][_0x1353bb(0x19f)]===0x1;}async[_0x3f63da(0x15e)](_0x3846dd,_0xa5fafd,_0x355c55){const _0x42d450=_0x3f63da,_0x417290={'unitId':_0x3846dd,'threadId':_0x355c55},_0x1595d=await this['_httpService']['post'](_0x42d450(0x19e)+_0x3846dd+'/list',{'body':_0x417290}),_0x197870=_0x355c55[_0x42d450(0x18b)](_0x37bd38=>ee(_0x1595d[_0x42d450(0x145)][_0x42d450(0x15a)][_0x37bd38],_0x3846dd,_0xa5fafd))[_0x42d450(0x157)](Boolean);return Object[_0x42d450(0x182)](_0x1595d[_0x42d450(0x145)][_0x42d450(0x17b)])[_0x42d450(0x197)](_0x39cf1a=>{const _0x1a2901=_0x42d450;this[_0x1a2901(0x17f)][_0x1a2901(0x153)](_0x39cf1a);}),_0x197870;}[_0x3f63da(0x189)](_0x49a50c){const _0x5cb2c6=_0x3f63da;return{'id':_0x49a50c['id'],'threadId':_0x49a50c[_0x5cb2c6(0x1a7)],'ref':_0x49a50c[_0x5cb2c6(0x16b)]};}};function _0x1b76(){const _0x3fdba0=['_httpService','type','listComments','_threadCommentDataSourceService','stringify','replyId','_configService','3703220iXLVEV','8XvKUcU','getComment','comment','root','_commentService','_initDataSource','user','ref','2616942ITFNRR','requireSession','OpenOrReOpen','reply','delete','5700331wfInQT','/delete','replies','getUnit','_injector','_init','customRanges','_threadCommentModel','_threadCommentDataSource','Add','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','slice','/add','_userService','_config','format','values','updateComment','1GDNkXl','UNRECOGNIZED','167160cmkBfK','disposeWithMe','error','saveCommentToSnapshot','Unknown','map','pipe','userID','/universer-api/user/list','resolved','2750tJfpJw','getMemberID','getUser','Solved','defineProperty','_sessionService','COMMENT','forEach','Edit','add','Reply','syncUpdateMutationToColla','userId','450688TADXBX','/universer-api/comment/unit/','code','onReady','length','find','18ZWEusn','createTimestamp','rangeType','Solve','threadId','solved','content','getOwnPropertyDescriptor','unitId','personId','body','commentUpdate$','3754998TggIOg','rangeId','Delete','getCurrentUser','pluginName','deleteComment','payload','get','1595pVRxMl','resolveComment','parse','YYYY/MM/DD\x20HH:mm','addUser','dataSource','subscribe','_initUserSync','filter','setConfig','8060yAyonb','comments','post'];_0x1b76=function(){return _0x3fdba0;};return _0x1b76();}S=Q([b(0x0,_0x4bd280(_0x16abd7)),b(0x1,_0x4bd280(_0x388990)),b(0x2,_0x4bd280(_0x2c5e4c))],S);var re=Object[_0x3f63da(0x1aa)],te=(_0x2de3ba,_0x627aa8,_0x34506d,_0x28971f)=>{const _0x59e1fe=_0x3f63da;for(var _0x9c9fac=_0x28971f>0x1?void 0x0:_0x28971f?re(_0x627aa8,_0x34506d):_0x627aa8,_0x221e15=_0x2de3ba[_0x59e1fe(0x1a1)]-0x1,_0x1f4b27;_0x221e15>=0x0;_0x221e15--)(_0x1f4b27=_0x2de3ba[_0x221e15])&&(_0x9c9fac=_0x1f4b27(_0x9c9fac)||_0x9c9fac);return _0x9c9fac;},M=(_0x1919e9,_0x294a12)=>(_0x30db81,_0xbebaf1)=>_0x294a12(_0x30db81,_0xbebaf1,_0x1919e9);let f=class extends _0x391d46{constructor(_0x3b163c,_0x3e48dc){const _0x5ad643=_0x3f63da;super(),this[_0x5ad643(0x15f)]=_0x3b163c,this[_0x5ad643(0x179)]=_0x3e48dc,this[_0x5ad643(0x169)]();}['_initDataSource'](){const _0x25edef=_0x3f63da;this[_0x25edef(0x15f)][_0x25edef(0x154)]=this[_0x25edef(0x179)],this[_0x25edef(0x15f)][_0x25edef(0x19b)]=!0x1;}};f=te([M(0x0,_0x2f9f28),M(0x1,_0x4bd280(S))],f);var se=Object[_0x3f63da(0x194)],oe=Object[_0x3f63da(0x1aa)],ne=(_0x2fe6fd,_0x590c24,_0x3b632a)=>_0x590c24 in _0x2fe6fd?se(_0x2fe6fd,_0x590c24,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b632a}):_0x2fe6fd[_0x590c24]=_0x3b632a,ie=(_0x42b5a3,_0x588d56,_0x1e4d7d,_0x25b3b7)=>{const _0x1d860e=_0x3f63da;for(var _0x24b614=_0x25b3b7>0x1?void 0x0:_0x25b3b7?oe(_0x588d56,_0x1e4d7d):_0x588d56,_0x316b48=_0x42b5a3[_0x1d860e(0x1a1)]-0x1,_0xf82413;_0x316b48>=0x0;_0x316b48--)(_0xf82413=_0x42b5a3[_0x316b48])&&(_0x24b614=_0xf82413(_0x24b614)||_0x24b614);return _0x24b614;},N=(_0x243842,_0xb7b003)=>(_0x4301f7,_0x1a0bc2)=>_0xb7b003(_0x4301f7,_0x1a0bc2,_0x243842),$=(_0x265a4d,_0x3c2f1f,_0x4d5696)=>ne(_0x265a4d,typeof _0x3c2f1f!='symbol'?_0x3c2f1f+'':_0x3c2f1f,_0x4d5696);let g=class extends _0x14a1a2{constructor(_0x576930=O,_0x394901,_0xed77a7){const _0x2a4fcb=_0x3f63da;super(),this[_0x2a4fcb(0x180)]=_0x576930,this[_0x2a4fcb(0x175)]=_0x394901,this['_configService']=_0xed77a7;const {..._0x4b66d0}=_0x21e87f({},O,this[_0x2a4fcb(0x180)]);this[_0x2a4fcb(0x162)][_0x2a4fcb(0x158)](z,_0x4b66d0);}['onStarting'](){const _0x499287=_0x3f63da;[[S],[f],[_]][_0x499287(0x197)](_0x79f8f=>{const _0x209775=_0x499287;this[_0x209775(0x175)][_0x209775(0x199)](_0x79f8f);});}[_0x3f63da(0x1a0)](){const _0x2583cd=_0x3f63da;this[_0x2583cd(0x175)][_0x2583cd(0x14e)](f),this[_0x2583cd(0x175)][_0x2583cd(0x14e)](_);}};$(g,_0x3f63da(0x14b),W),$(g,_0x3f63da(0x15d),_0x35e782['UNIVER_UNKNOWN']),g=ie([_0x25b0c6(_0x1d91a2,_0x3a685b,_0x586010),N(0x1,_0x4bd280(_0x249295)),N(0x2,_0x55aae9)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x1db4(_0x2b44be,_0x19edba){_0x2b44be=_0x2b44be-0xf9;const _0x17c55a=_0x17c5();let _0x1db470=_0x17c55a[_0x2b44be];return _0x1db470;}const _0x452b23=_0x1db4;(function(_0x49ca60,_0x45c3b0){const _0x4a8af5=_0x1db4,_0x218d70=_0x49ca60();while(!![]){try{const _0x377ab4=parseInt(_0x4a8af5(0x11b))/0x1+-parseInt(_0x4a8af5(0x128))/0x2*(parseInt(_0x4a8af5(0x115))/0x3)+parseInt(_0x4a8af5(0x104))/0x4+-parseInt(_0x4a8af5(0x132))/0x5*(-parseInt(_0x4a8af5(0x126))/0x6)+-parseInt(_0x4a8af5(0x107))/0x7+-parseInt(_0x4a8af5(0x10a))/0x8+parseInt(_0x4a8af5(0x117))/0x9;if(_0x377ab4===_0x45c3b0)break;else _0x218d70['push'](_0x218d70['shift']());}catch(_0x47539c){_0x218d70['push'](_0x218d70['shift']());}}}(_0x17c5,0xec0b8));import{CommentService as _0x12c24f,CollaborationSessionService as _0x395936,UniverCollaborationClientPlugin as _0x354fd9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3ba035}from'@univerjs-pro/license';import{dayjs as _0xe06112,UserManagerService as _0x48d6a8,Inject as _0x437e4f,Injector as _0x50e8a0,Disposable as _0x4f537f,CustomRangeType as _0x128584,UniverInstanceType as _0x41babf,DependentOn as _0x49f4f5,IConfigService as _0x4181a7,Plugin as _0x37f55a,merge as _0x127711}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x36ebce}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3e56e2,IThreadCommentDataSourceService as _0x33be8b}from'@univerjs/thread-comment';import{bufferTime as _0x458aca}from'rxjs';import{HTTPService as _0x37c7be}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x17c5(){const _0x762096=['get','add','onReady','map','addComment','getCurrentUser','setConfig','customRanges','unitId','stringify','_threadCommentDataSourceService','replies','Reply','root','/add','resolved','/reply','replyId','disposeWithMe','reply','delete','userId','YYYY/MM/DD\x20HH:mm','dataSource','createTimestamp','/solved','commentUpdate$','subscribe','Add','comments','_threadCommentModel','format','onStarting','code','solved','_commentService','deleteComment','_config','defineProperty','_configService','userID','Delete','requireSession','UNIVER_UNKNOWN','Solved','getOwnPropertyDescriptor','values','5244256aaUntP','OpenOrReOpen','Solve','13519107xfKIVV','symbol','comment','1519848WYhYRI','parse','UNRECOGNIZED','length','_sessionService','getMemberID','updateComment','personId','thread-comment-data-source.config','threadId','listComments','3ZlkCIH','syncUpdateMutationToColla','11280600tmtsGf','resolveComment','_threadCommentDataSource','getUnit','314846PavOvV','COMMENT','Edit','addUser','/universer-api/comment/unit/','pluginName','_initUserSync','/list','user','rangeType','filter','6clGQyu','_injector','2378942HBpgKQ','Unknown','post','_httpService','/universer-api/user/list','payload','forEach','getUser','_init','body','6991415ejHbDA','slice','_initDataSource','parentId','error','content','_userService','type','rangeId'];_0x17c5=function(){return _0x762096;};return _0x17c5();}var I=(_0x10eddc=>(_0x10eddc[_0x10eddc[_0x452b23(0x105)]=0x0]='OpenOrReOpen',_0x10eddc[_0x10eddc[_0x452b23(0x101)]=0x1]=_0x452b23(0x101),_0x10eddc[_0x10eddc[_0x452b23(0x10c)]=-0x1]='UNRECOGNIZED',_0x10eddc))(I||{}),v=(_0x569aa1=>(_0x569aa1[_0x569aa1[_0x452b23(0x129)]=0x0]=_0x452b23(0x129),_0x569aa1[_0x569aa1[_0x452b23(0x157)]=0x1]=_0x452b23(0x157),_0x569aa1[_0x569aa1[_0x452b23(0x147)]=0x2]=_0x452b23(0x147),_0x569aa1[_0x569aa1[_0x452b23(0x11d)]=0x3]=_0x452b23(0x11d),_0x569aa1[_0x569aa1[_0x452b23(0xfe)]=0x4]=_0x452b23(0xfe),_0x569aa1[_0x569aa1[_0x452b23(0x106)]=0x5]='Solve',_0x569aa1[_0x569aa1[_0x452b23(0x10c)]=-0x1]=_0x452b23(0x10c),_0x569aa1))(v||{});const y=_0x3f4573=>_0xe06112(new Date(+_0x3f4573))[_0x452b23(0x15a)](_0x452b23(0x151)),B=async(_0x1e7ec3,_0x2b0b8d)=>{const _0x3a75d8=_0x452b23,_0x37a653=_0x1e7ec3['get'](_0x48d6a8),_0xc7daa2=_0x1e7ec3['get'](_0x37c7be);_0x2b0b8d['forEach'](_0x2f2895=>{const _0x1c235c=_0x1db4;_0x37a653[_0x1c235c(0x12f)](_0x2f2895)&&_0x2b0b8d[_0x1c235c(0x14f)](_0x2f2895);}),_0x2b0b8d['size']&&(await _0xc7daa2[_0x3a75d8(0x13b)](_0x3a75d8(0x12c),{'params':{'userIDs':[..._0x2b0b8d]}}))[_0x3a75d8(0x131)]['users'][_0x3a75d8(0x12e)](_0x3f0e93=>{const _0x8a7620=_0x3a75d8;_0x3f0e93&&_0x37a653[_0x8a7620(0x11e)](_0x3f0e93);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x1c7b92,_0x4c514b,_0x1f7845,_0x37e144)=>{for(var _0x2ed57f=_0x37e144>0x1?void 0x0:_0x37e144?K(_0x4c514b,_0x1f7845):_0x4c514b,_0x130caa=_0x1c7b92['length']-0x1,_0x20e6e0;_0x130caa>=0x0;_0x130caa--)(_0x20e6e0=_0x1c7b92[_0x130caa])&&(_0x2ed57f=_0x20e6e0(_0x2ed57f)||_0x2ed57f);return _0x2ed57f;},p=(_0x5af7b0,_0x493324)=>(_0x5c53d8,_0x508315)=>_0x493324(_0x5c53d8,_0x508315,_0x5af7b0);let _=class extends _0x4f537f{constructor(_0x507d4a,_0x1402d9,_0x203982,_0xedaf3c){const _0x5f530c=_0x452b23;super(),this[_0x5f530c(0x15e)]=_0x507d4a,this[_0x5f530c(0x159)]=_0x1402d9,this[_0x5f530c(0x138)]=_0x203982,this[_0x5f530c(0x127)]=_0xedaf3c,this[_0x5f530c(0x130)](),this[_0x5f530c(0x121)]();}['_initUserSync'](){const _0x53a591=_0x452b23;this[_0x53a591(0x14d)](this[_0x53a591(0x159)][_0x53a591(0x155)]['pipe'](_0x458aca(0x10))[_0x53a591(0x156)](_0x179017=>{const _0x201e87=_0x53a591,_0x2c2a9a=new Set();_0x179017[_0x201e87(0x12e)](_0x516510=>{const _0x12be3d=_0x201e87;if(_0x516510['type']===_0x12be3d(0x13c)){const _0x13152f=_0x516510[_0x12be3d(0x12d)][_0x12be3d(0x111)];_0x2c2a9a[_0x12be3d(0x13c)](_0x13152f);}}),B(this[_0x201e87(0x127)],_0x2c2a9a);}));}[_0x452b23(0x130)](){const _0x5d1f11=_0x452b23;this['disposeWithMe'](this['_commentService'][_0x5d1f11(0x155)][_0x5d1f11(0x156)](async _0x3031b1=>{const _0x316597=_0x5d1f11;var _0x2cc02c,_0x3b51d2,_0x37cab6,_0x5e8d73;const _0x268e04=(_0x2cc02c=this['_threadCommentModel'][_0x316597(0x11a)](_0x3031b1[_0x316597(0x143)])['find'](_0x473154=>_0x473154[_0x316597(0x113)]===_0x3031b1[_0x316597(0x113)]))==null?void 0x0:_0x2cc02c['root'];if(!_0x268e04)return;const {unitId:_0x5b3d28,subUnitId:_0x435b55}=_0x268e04;switch(_0x3031b1[_0x316597(0x123)]&&this['_userService'][_0x316597(0x11e)](_0x3031b1[_0x316597(0x123)]),_0x3031b1[_0x316597(0x139)]){case v[_0x316597(0x157)]:break;case v[_0x316597(0x147)]:{this['_threadCommentModel'][_0x316597(0x13f)](_0x5b3d28,_0x435b55,{'unitId':_0x5b3d28,'subUnitId':_0x435b55,'ref':'','id':_0x3031b1[_0x316597(0x14c)],'dT':y(+_0x3031b1[_0x316597(0x153)]),'threadId':_0x3031b1[_0x316597(0x113)],'personId':(_0x37cab6=(_0x3b51d2=_0x3031b1[_0x316597(0x123)])==null?void 0x0:_0x3b51d2[_0x316597(0xfd)])!=null?_0x37cab6:_0x3031b1[_0x316597(0x150)],'text':JSON[_0x316597(0x10b)](_0x3031b1[_0x316597(0x137)]),'parentId':_0x268e04['id']});break;}case v[_0x316597(0xfe)]:{const _0xeaa323=this[_0x316597(0x159)]['getComment'](_0x5b3d28,_0x435b55,_0x3031b1[_0x316597(0x14c)]);_0xeaa323&&_0xeaa323[_0x316597(0x135)]&&this[_0x316597(0x159)]['deleteComment'](_0x5b3d28,_0x435b55,_0x3031b1[_0x316597(0x14c)]);break;}case v[_0x316597(0x11d)]:{this[_0x316597(0x159)][_0x316597(0x110)](_0x5b3d28,_0x435b55,{'commentId':_0x3031b1[_0x316597(0x14c)],'text':JSON['parse'](_0x3031b1[_0x316597(0x137)])});break;}case v[_0x316597(0x106)]:{const _0x854ef1=(_0x5e8d73=this[_0x316597(0x159)]['getUnit'](_0x3031b1[_0x316597(0x143)])['find'](_0x2f3487=>_0x2f3487['threadId']===_0x3031b1[_0x316597(0x113)]))==null?void 0x0:_0x5e8d73[_0x316597(0x148)];_0x854ef1&&this[_0x316597(0x159)][_0x316597(0x118)](_0x5b3d28,_0x435b55,_0x854ef1['id'],_0x3031b1['solved']===I[_0x316597(0x101)]);break;}}}));}};_=V([p(0x0,_0x437e4f(_0x12c24f)),p(0x1,_0x437e4f(_0x3e56e2)),p(0x2,_0x437e4f(_0x48d6a8)),p(0x3,_0x437e4f(_0x50e8a0))],_);const z=_0x452b23(0x112),O={};var k=Object[_0x452b23(0x102)],Q=(_0x41e29a,_0x2956a7,_0x2595eb,_0x36088d)=>{for(var _0xaad226=_0x36088d>0x1?void 0x0:_0x36088d?k(_0x2956a7,_0x2595eb):_0x2956a7,_0x40a588=_0x41e29a['length']-0x1,_0x133b4d;_0x40a588>=0x0;_0x40a588--)(_0x133b4d=_0x41e29a[_0x40a588])&&(_0xaad226=_0x133b4d(_0xaad226)||_0xaad226);return _0xaad226;},b=(_0x4f7c9a,_0x168885)=>(_0x2bd8fc,_0x37a43b)=>_0x168885(_0x2bd8fc,_0x37a43b,_0x4f7c9a);function X(_0x350da9,_0x151f36){const _0x509d5d=_0x452b23,_0xa08899=_0x350da9[_0x509d5d(0x146)][0x0];return{..._0x151f36,'id':_0xa08899[_0x509d5d(0x14c)],'resolved':_0x350da9[_0x509d5d(0x15d)]===0x1,'dT':y(_0xa08899[_0x509d5d(0x153)]),'personId':_0xa08899[_0x509d5d(0x150)],'threadId':_0xa08899[_0x509d5d(0x113)]};}function ee(_0x1ddb27,_0x1e05f0,_0x306943){const _0x1128d1=_0x452b23;var _0x5dca3b,_0x169bd6;if(((_0x169bd6=(_0x5dca3b=_0x1ddb27==null?void 0x0:_0x1ddb27[_0x1128d1(0x146)])==null?void 0x0:_0x5dca3b['length'])!=null?_0x169bd6:0x0)>0x0){const _0x3fb377=(_0x52495b,_0x297119)=>({'id':_0x52495b['replyId'],'threadId':_0x52495b[_0x1128d1(0x113)],'dT':y(_0x52495b[_0x1128d1(0x153)]),'personId':_0x52495b['userId'],'resolved':_0x1ddb27[_0x1128d1(0x15d)]===I['Solved'],'unitId':_0x1e05f0,'subUnitId':_0x306943,'text':JSON[_0x1128d1(0x10b)](_0x52495b['content']),'parentId':_0x297119}),_0x2d13c4=_0x3fb377(_0x1ddb27[_0x1128d1(0x146)][0x0]);return{..._0x2d13c4,'children':_0x1ddb27['replies'][_0x1128d1(0x133)](0x1)[_0x1128d1(0x13e)](_0x3ef85a=>_0x3fb377(_0x3ef85a,_0x2d13c4['id']))};}return null;}let S=class{constructor(_0x7d1fcd,_0xce3f7,_0x157859){const _0x442d80=_0x452b23;this[_0x442d80(0x12b)]=_0x7d1fcd,this['_userService']=_0xce3f7,this[_0x442d80(0x10e)]=_0x157859;}async[_0x452b23(0x13f)](_0x19b0d3){const _0x5e68aa=_0x452b23;var _0x27e403,_0x29b3af;const {parentId:_0x36f965,unitId:_0x10ccae,text:_0x334a8b,threadId:_0x58c016}=_0x19b0d3,_0x1ed14e=(_0x29b3af=(_0x27e403=_0x334a8b[_0x5e68aa(0x142)])==null?void 0x0:_0x27e403[_0x5e68aa(0x125)](_0x50765c=>_0x50765c[_0x5e68aa(0x124)]===_0x128584[_0x5e68aa(0x11c)])[_0x5e68aa(0x13e)](_0xf4ee76=>_0xf4ee76['rangeId']))!=null?_0x29b3af:[],_0x3a8913=JSON['stringify'](_0x334a8b),_0x324d21=(await this[_0x5e68aa(0x10e)]['requireSession'](_0x10ccae))[_0x5e68aa(0x10f)]();if(_0x36f965){const _0x46402b={'memberId':_0x324d21,'unitId':_0x10ccae,'content':_0x3a8913,'mention':_0x1ed14e,'threadId':_0x58c016},_0x60c34b=(await this[_0x5e68aa(0x12b)][_0x5e68aa(0x12a)](_0x5e68aa(0x11f)+_0x10ccae+_0x5e68aa(0x14b),{'body':_0x46402b}))[_0x5e68aa(0x131)][_0x5e68aa(0x14e)];return{..._0x19b0d3,'id':_0x60c34b['replyId'],'dT':_0xe06112(+_0x60c34b['createTimestamp'])[_0x5e68aa(0x15a)](_0x5e68aa(0x151)),'personId':_0x60c34b[_0x5e68aa(0x150)]};}else{const _0x21ed5c={'memberId':_0x324d21,'unitId':_0x10ccae,'content':_0x3a8913,'mention':_0x1ed14e},_0x438825=await this['_httpService']['post'](_0x5e68aa(0x11f)+_0x10ccae+_0x5e68aa(0x149),{'body':_0x21ed5c});return X(_0x438825[_0x5e68aa(0x131)][_0x5e68aa(0x109)],_0x19b0d3);}}async[_0x452b23(0x110)](_0x42822e){const _0xd9dd6c=_0x452b23;var _0x38626c,_0x48240f;const {text:_0x1825a0,unitId:_0x449a64}=_0x42822e,_0x2037a7=(_0x48240f=(_0x38626c=_0x1825a0['customRanges'])==null?void 0x0:_0x38626c[_0xd9dd6c(0x125)](_0x26bb4e=>_0x26bb4e[_0xd9dd6c(0x124)]===_0x128584[_0xd9dd6c(0x11c)])[_0xd9dd6c(0x13e)](_0xf3484e=>_0xf3484e[_0xd9dd6c(0x13a)]))!=null?_0x48240f:[],_0x585f4a=JSON[_0xd9dd6c(0x144)](_0x1825a0),_0x2d8dde=_0x42822e[_0xd9dd6c(0x113)],_0x23f0c7=_0x42822e['id'],_0x5426c7={'memberId':(await this[_0xd9dd6c(0x10e)]['requireSession'](_0x449a64))[_0xd9dd6c(0x10f)](),'unitId':_0x449a64,'threadId':_0x2d8dde,'mention':_0x2037a7,'content':_0x585f4a,'replyId':_0x23f0c7},_0x56e7a7=await this['_httpService']['post'](_0xd9dd6c(0x11f)+_0x449a64+'/edit',{'body':_0x5426c7});return!_0x56e7a7['body'][_0xd9dd6c(0x136)]||_0x56e7a7['body'][_0xd9dd6c(0x136)][_0xd9dd6c(0x15c)]===0x1;}async[_0x452b23(0x118)](_0x3b4fe3){const _0xa112e8=_0x452b23,{unitId:_0x43bc74}=_0x3b4fe3,_0x3d1767=_0x3b4fe3[_0xa112e8(0x113)],_0x1b3b62={'memberId':this[_0xa112e8(0x138)][_0xa112e8(0x140)]()['userID'],'unitId':_0x43bc74,'threadId':_0x3d1767,'solved':_0x3b4fe3[_0xa112e8(0x14a)]?I[_0xa112e8(0x101)]:I[_0xa112e8(0x105)]},_0xc7700d=await this[_0xa112e8(0x12b)][_0xa112e8(0x12a)]('/universer-api/comment/unit/'+_0x43bc74+_0xa112e8(0x154),{'body':_0x1b3b62});return!_0xc7700d[_0xa112e8(0x131)][_0xa112e8(0x136)]||_0xc7700d[_0xa112e8(0x131)][_0xa112e8(0x136)]['code']===0x1;}async[_0x452b23(0xf9)](_0xdc9ee5,_0x2f425f,_0x2a74cb,_0x27dc83){const _0x593d3f=_0x452b23,_0x23fbea={'memberId':(await this['_sessionService'][_0x593d3f(0xff)](_0xdc9ee5))['getMemberID'](),'threadId':_0x2a74cb,'replyId':_0x27dc83,'unitId':_0xdc9ee5},_0x556321=await this[_0x593d3f(0x12b)][_0x593d3f(0x12a)](_0x593d3f(0x11f)+_0xdc9ee5+'/delete',{'body':_0x23fbea});return!_0x556321[_0x593d3f(0x131)][_0x593d3f(0x136)]||_0x556321[_0x593d3f(0x131)][_0x593d3f(0x136)][_0x593d3f(0x15c)]===0x1;}async[_0x452b23(0x114)](_0x304ca5,_0x40c13a,_0x1f35f7){const _0x2ea717=_0x452b23,_0x3639bb={'unitId':_0x304ca5,'threadId':_0x1f35f7},_0x144cc6=await this[_0x2ea717(0x12b)][_0x2ea717(0x12a)](_0x2ea717(0x11f)+_0x304ca5+_0x2ea717(0x122),{'body':_0x3639bb}),_0x343d2c=_0x1f35f7[_0x2ea717(0x13e)](_0x2f8761=>ee(_0x144cc6['body'][_0x2ea717(0x158)][_0x2f8761],_0x304ca5,_0x40c13a))[_0x2ea717(0x125)](Boolean);return Object[_0x2ea717(0x103)](_0x144cc6['body']['users'])['forEach'](_0x3b7e69=>{const _0x435c67=_0x2ea717;this[_0x435c67(0x138)][_0x435c67(0x11e)](_0x3b7e69);}),_0x343d2c;}['saveCommentToSnapshot'](_0x7a6e89){const _0x73331c=_0x452b23;return{'id':_0x7a6e89['id'],'threadId':_0x7a6e89[_0x73331c(0x113)],'ref':_0x7a6e89['ref']};}};S=Q([b(0x0,_0x437e4f(_0x37c7be)),b(0x1,_0x437e4f(_0x48d6a8)),b(0x2,_0x437e4f(_0x395936))],S);var re=Object[_0x452b23(0x102)],te=(_0x29be48,_0x2c84ec,_0x4a7ebd,_0x1af60a)=>{const _0x42d23f=_0x452b23;for(var _0x5391e7=_0x1af60a>0x1?void 0x0:_0x1af60a?re(_0x2c84ec,_0x4a7ebd):_0x2c84ec,_0x70053c=_0x29be48[_0x42d23f(0x10d)]-0x1,_0x19d67d;_0x70053c>=0x0;_0x70053c--)(_0x19d67d=_0x29be48[_0x70053c])&&(_0x5391e7=_0x19d67d(_0x5391e7)||_0x5391e7);return _0x5391e7;},M=(_0x2ad0cf,_0x516c13)=>(_0x55be30,_0x24d0d2)=>_0x516c13(_0x55be30,_0x24d0d2,_0x2ad0cf);let f=class extends _0x4f537f{constructor(_0x5f2187,_0x347bd3){const _0x46b6b9=_0x452b23;super(),this[_0x46b6b9(0x145)]=_0x5f2187,this[_0x46b6b9(0x119)]=_0x347bd3,this['_initDataSource']();}[_0x452b23(0x134)](){const _0x2a12ca=_0x452b23;this[_0x2a12ca(0x145)][_0x2a12ca(0x152)]=this[_0x2a12ca(0x119)],this[_0x2a12ca(0x145)][_0x2a12ca(0x116)]=!0x1;}};f=te([M(0x0,_0x33be8b),M(0x1,_0x437e4f(S))],f);var se=Object[_0x452b23(0xfb)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x252929,_0x35f054,_0x39c7fd)=>_0x35f054 in _0x252929?se(_0x252929,_0x35f054,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39c7fd}):_0x252929[_0x35f054]=_0x39c7fd,ie=(_0x587562,_0x49e33e,_0x34a790,_0x194ee)=>{const _0x5029aa=_0x452b23;for(var _0x52634c=_0x194ee>0x1?void 0x0:_0x194ee?oe(_0x49e33e,_0x34a790):_0x49e33e,_0x3111eb=_0x587562[_0x5029aa(0x10d)]-0x1,_0x404025;_0x3111eb>=0x0;_0x3111eb--)(_0x404025=_0x587562[_0x3111eb])&&(_0x52634c=_0x404025(_0x52634c)||_0x52634c);return _0x52634c;},N=(_0x13861f,_0x59622a)=>(_0x2849c4,_0x218c94)=>_0x59622a(_0x2849c4,_0x218c94,_0x13861f),$=(_0x1138f2,_0x322a97,_0x2cc85b)=>ne(_0x1138f2,typeof _0x322a97!=_0x452b23(0x108)?_0x322a97+'':_0x322a97,_0x2cc85b);let g=class extends _0x37f55a{constructor(_0x3a6c21=O,_0x25385d,_0x48ead6){const _0x437700=_0x452b23;super(),this[_0x437700(0xfa)]=_0x3a6c21,this[_0x437700(0x127)]=_0x25385d,this[_0x437700(0xfc)]=_0x48ead6;const {..._0x2c64dc}=_0x127711({},O,this[_0x437700(0xfa)]);this[_0x437700(0xfc)][_0x437700(0x141)](z,_0x2c64dc);}[_0x452b23(0x15b)](){const _0x23a1ac=_0x452b23;[[S],[f],[_]][_0x23a1ac(0x12e)](_0x5d54e9=>{const _0x54a9c1=_0x23a1ac;this['_injector'][_0x54a9c1(0x13c)](_0x5d54e9);});}[_0x452b23(0x13d)](){const _0x17c8b4=_0x452b23;this[_0x17c8b4(0x127)][_0x17c8b4(0x13b)](f),this['_injector'][_0x17c8b4(0x13b)](_);}};$(g,_0x452b23(0x120),W),$(g,_0x452b23(0x139),_0x41babf[_0x452b23(0x100)]),g=ie([_0x49f4f5(_0x36ebce,_0x354fd9,_0x3ba035),N(0x1,_0x437e4f(_0x50e8a0)),N(0x2,_0x4181a7)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3f63da=_0x4fd3;(function(_0x251443,_0x30a4a7){const _0x14167c=_0x4fd3,_0x4ef987=_0x251443();while(!![]){try{const _0x428008=parseInt(_0x14167c(0x184))/0x1*(-parseInt(_0x14167c(0x19d))/0x2)+-parseInt(_0x14167c(0x147))/0x3+-parseInt(_0x14167c(0x159))/0x4*(-parseInt(_0x14167c(0x14f))/0x5)+-parseInt(_0x14167c(0x16c))/0x6+-parseInt(_0x14167c(0x171))/0x7*(parseInt(_0x14167c(0x164))/0x8)+-parseInt(_0x14167c(0x1a3))/0x9*(parseInt(_0x14167c(0x163))/0xa)+parseInt(_0x14167c(0x190))/0xb*(parseInt(_0x14167c(0x186))/0xc);if(_0x428008===_0x30a4a7)break;else _0x4ef987['push'](_0x4ef987['shift']());}catch(_0x4e52fa){_0x4ef987['push'](_0x4ef987['shift']());}}}(_0x1b76,0xa06f5));import{CommentService as _0x496dbb,CollaborationSessionService as _0x2c5e4c,UniverCollaborationClientPlugin as _0x3a685b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x586010}from'@univerjs-pro/license';import{dayjs as _0x28ba39,UserManagerService as _0x388990,Inject as _0x4bd280,Injector as _0x249295,Disposable as _0x391d46,CustomRangeType as _0x51ffb1,UniverInstanceType as _0x35e782,DependentOn as _0x25b0c6,IConfigService as _0x55aae9,Plugin as _0x14a1a2,merge as _0x21e87f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1d91a2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5d3082,IThreadCommentDataSourceService as _0x2f9f28}from'@univerjs/thread-comment';import{bufferTime as _0x316e50}from'rxjs';import{HTTPService as _0x16abd7}from'@univerjs/network';const W=_0x3f63da(0x17c);var I=(_0x5890c0=>(_0x5890c0[_0x5890c0[_0x3f63da(0x16e)]=0x0]='OpenOrReOpen',_0x5890c0[_0x5890c0['Solved']=0x1]='Solved',_0x5890c0[_0x5890c0[_0x3f63da(0x185)]=-0x1]=_0x3f63da(0x185),_0x5890c0))(I||{}),v=(_0x3d4d9d=>(_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x18a)]=0x0]='Unknown',_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x17a)]=0x1]='Add',_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x19a)]=0x2]=_0x3f63da(0x19a),_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x198)]=0x3]='Edit',_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x149)]=0x4]=_0x3f63da(0x149),_0x3d4d9d[_0x3d4d9d[_0x3f63da(0x1a6)]=0x5]='Solve',_0x3d4d9d[_0x3d4d9d['UNRECOGNIZED']=-0x1]=_0x3f63da(0x185),_0x3d4d9d))(v||{});const y=_0x1416c3=>_0x28ba39(new Date(+_0x1416c3))[_0x3f63da(0x181)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3258a6,_0x1eaeba)=>{const _0x370a20=_0x3f63da,_0x2fff28=_0x3258a6[_0x370a20(0x14e)](_0x388990),_0x3566a7=_0x3258a6['get'](_0x16abd7);_0x1eaeba[_0x370a20(0x197)](_0x3e621b=>{const _0x901d45=_0x370a20;_0x2fff28[_0x901d45(0x192)](_0x3e621b)&&_0x1eaeba[_0x901d45(0x170)](_0x3e621b);}),_0x1eaeba['size']&&(await _0x3566a7[_0x370a20(0x14e)](_0x370a20(0x18e),{'params':{'userIDs':[..._0x1eaeba]}}))[_0x370a20(0x145)][_0x370a20(0x17b)][_0x370a20(0x197)](_0x13115c=>{const _0x39e410=_0x370a20;_0x13115c&&_0x2fff28[_0x39e410(0x153)](_0x13115c);});};var K=Object[_0x3f63da(0x1aa)],V=(_0x3accf5,_0x9c9acd,_0x29efc7,_0x3623a7)=>{const _0x3b9bb5=_0x3f63da;for(var _0x40db44=_0x3623a7>0x1?void 0x0:_0x3623a7?K(_0x9c9acd,_0x29efc7):_0x9c9acd,_0x5170bb=_0x3accf5[_0x3b9bb5(0x1a1)]-0x1,_0x132f41;_0x5170bb>=0x0;_0x5170bb--)(_0x132f41=_0x3accf5[_0x5170bb])&&(_0x40db44=_0x132f41(_0x40db44)||_0x40db44);return _0x40db44;},p=(_0x129962,_0x2bc81e)=>(_0x26cd2a,_0x58c1d0)=>_0x2bc81e(_0x26cd2a,_0x58c1d0,_0x129962);let _=class extends _0x391d46{constructor(_0x277360,_0x471aa6,_0x570188,_0x16573e){const _0x5e6ea2=_0x3f63da;super(),this[_0x5e6ea2(0x168)]=_0x277360,this['_threadCommentModel']=_0x471aa6,this[_0x5e6ea2(0x17f)]=_0x570188,this[_0x5e6ea2(0x175)]=_0x16573e,this[_0x5e6ea2(0x176)](),this[_0x5e6ea2(0x156)]();}['_initUserSync'](){const _0x2394b4=_0x3f63da;this[_0x2394b4(0x187)](this['_threadCommentModel']['commentUpdate$'][_0x2394b4(0x18c)](_0x316e50(0x10))['subscribe'](_0x1a15ba=>{const _0x961bef=_0x2394b4,_0x588321=new Set();_0x1a15ba[_0x961bef(0x197)](_0x177bef=>{const _0xe6be29=_0x961bef;if(_0x177bef['type']==='add'){const _0x3addec=_0x177bef[_0xe6be29(0x14d)][_0xe6be29(0x144)];_0x588321[_0xe6be29(0x199)](_0x3addec);}}),B(this[_0x961bef(0x175)],_0x588321);}));}[_0x3f63da(0x176)](){const _0x2ed88e=_0x3f63da;this[_0x2ed88e(0x187)](this[_0x2ed88e(0x168)][_0x2ed88e(0x146)][_0x2ed88e(0x155)](async _0x41429a=>{const _0x346ce0=_0x2ed88e;var _0x20cb01,_0x5adcc7,_0x2b684e,_0x4b7fb0;const _0x510c45=(_0x20cb01=this[_0x346ce0(0x178)][_0x346ce0(0x174)](_0x41429a[_0x346ce0(0x143)])[_0x346ce0(0x1a2)](_0x195d56=>_0x195d56[_0x346ce0(0x1a7)]===_0x41429a['threadId']))==null?void 0x0:_0x20cb01['root'];if(!_0x510c45)return;const {unitId:_0x15ecc2,subUnitId:_0x299f45}=_0x510c45;switch(_0x41429a['user']&&this[_0x346ce0(0x17f)]['addUser'](_0x41429a[_0x346ce0(0x16a)]),_0x41429a[_0x346ce0(0x15d)]){case v[_0x346ce0(0x17a)]:break;case v[_0x346ce0(0x19a)]:{this[_0x346ce0(0x178)]['addComment'](_0x15ecc2,_0x299f45,{'unitId':_0x15ecc2,'subUnitId':_0x299f45,'ref':'','id':_0x41429a['replyId'],'dT':y(+_0x41429a[_0x346ce0(0x1a4)]),'threadId':_0x41429a[_0x346ce0(0x1a7)],'personId':(_0x2b684e=(_0x5adcc7=_0x41429a[_0x346ce0(0x16a)])==null?void 0x0:_0x5adcc7['userID'])!=null?_0x2b684e:_0x41429a[_0x346ce0(0x19c)],'text':JSON[_0x346ce0(0x151)](_0x41429a['content']),'parentId':_0x510c45['id']});break;}case v[_0x346ce0(0x149)]:{const _0x529631=this[_0x346ce0(0x178)][_0x346ce0(0x165)](_0x15ecc2,_0x299f45,_0x41429a[_0x346ce0(0x161)]);_0x529631&&_0x529631['parentId']&&this[_0x346ce0(0x178)]['deleteComment'](_0x15ecc2,_0x299f45,_0x41429a['replyId']);break;}case v[_0x346ce0(0x198)]:{this[_0x346ce0(0x178)][_0x346ce0(0x183)](_0x15ecc2,_0x299f45,{'commentId':_0x41429a[_0x346ce0(0x161)],'text':JSON['parse'](_0x41429a['content'])});break;}case v['Solve']:{const _0x25c421=(_0x4b7fb0=this[_0x346ce0(0x178)][_0x346ce0(0x174)](_0x41429a['unitId'])['find'](_0x4de646=>_0x4de646[_0x346ce0(0x1a7)]===_0x41429a[_0x346ce0(0x1a7)]))==null?void 0x0:_0x4b7fb0[_0x346ce0(0x167)];_0x25c421&&this[_0x346ce0(0x178)][_0x346ce0(0x150)](_0x15ecc2,_0x299f45,_0x25c421['id'],_0x41429a['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4bd280(_0x496dbb)),p(0x1,_0x4bd280(_0x5d3082)),p(0x2,_0x4bd280(_0x388990)),p(0x3,_0x4bd280(_0x249295))],_);function _0x4fd3(_0x502c48,_0x24f8ce){_0x502c48=_0x502c48-0x143;const _0x1b7602=_0x1b76();let _0x4fd326=_0x1b7602[_0x502c48];return _0x4fd326;}const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x38373b,_0x25bacf,_0x49f8d6,_0x132edb)=>{const _0x5ac149=_0x3f63da;for(var _0x2e1628=_0x132edb>0x1?void 0x0:_0x132edb?k(_0x25bacf,_0x49f8d6):_0x25bacf,_0x26fc15=_0x38373b[_0x5ac149(0x1a1)]-0x1,_0x28c166;_0x26fc15>=0x0;_0x26fc15--)(_0x28c166=_0x38373b[_0x26fc15])&&(_0x2e1628=_0x28c166(_0x2e1628)||_0x2e1628);return _0x2e1628;},b=(_0x143ecd,_0x4531c2)=>(_0x2df912,_0x39fd54)=>_0x4531c2(_0x2df912,_0x39fd54,_0x143ecd);function X(_0x3c675c,_0x5b4311){const _0x293743=_0x3f63da,_0x5e557b=_0x3c675c[_0x293743(0x173)][0x0];return{..._0x5b4311,'id':_0x5e557b[_0x293743(0x161)],'resolved':_0x3c675c[_0x293743(0x1a8)]===0x1,'dT':y(_0x5e557b[_0x293743(0x1a4)]),'personId':_0x5e557b[_0x293743(0x19c)],'threadId':_0x5e557b['threadId']};}function ee(_0x3dd8d8,_0x5781cc,_0x357123){const _0x41ad8d=_0x3f63da;var _0x380787,_0x2020ed;if(((_0x2020ed=(_0x380787=_0x3dd8d8==null?void 0x0:_0x3dd8d8[_0x41ad8d(0x173)])==null?void 0x0:_0x380787[_0x41ad8d(0x1a1)])!=null?_0x2020ed:0x0)>0x0){const _0x529d8a=(_0x42e7eb,_0x2e8018)=>({'id':_0x42e7eb['replyId'],'threadId':_0x42e7eb[_0x41ad8d(0x1a7)],'dT':y(_0x42e7eb['createTimestamp']),'personId':_0x42e7eb['userId'],'resolved':_0x3dd8d8[_0x41ad8d(0x1a8)]===I[_0x41ad8d(0x193)],'unitId':_0x5781cc,'subUnitId':_0x357123,'text':JSON[_0x41ad8d(0x151)](_0x42e7eb[_0x41ad8d(0x1a9)]),'parentId':_0x2e8018}),_0x17cc45=_0x529d8a(_0x3dd8d8[_0x41ad8d(0x173)][0x0]);return{..._0x17cc45,'children':_0x3dd8d8[_0x41ad8d(0x173)][_0x41ad8d(0x17d)](0x1)[_0x41ad8d(0x18b)](_0x16c60d=>_0x529d8a(_0x16c60d,_0x17cc45['id']))};}return null;}let S=class{constructor(_0x44c1b8,_0xb48d13,_0x3577cf){const _0x3c8f03=_0x3f63da;this[_0x3c8f03(0x15c)]=_0x44c1b8,this['_userService']=_0xb48d13,this[_0x3c8f03(0x195)]=_0x3577cf;}async['addComment'](_0x445902){const _0x598007=_0x3f63da;var _0x217d86,_0x5a3f4d;const {parentId:_0x38c24d,unitId:_0x53f572,text:_0x370955,threadId:_0x4bd308}=_0x445902,_0x41a74f=(_0x5a3f4d=(_0x217d86=_0x370955['customRanges'])==null?void 0x0:_0x217d86[_0x598007(0x157)](_0x5d311b=>_0x5d311b['rangeType']===_0x51ffb1['COMMENT'])[_0x598007(0x18b)](_0x22d42b=>_0x22d42b[_0x598007(0x148)]))!=null?_0x5a3f4d:[],_0x44b320=JSON[_0x598007(0x160)](_0x370955),_0x49db91=(await this[_0x598007(0x195)][_0x598007(0x16d)](_0x53f572))[_0x598007(0x191)]();if(_0x38c24d){const _0x4bd247={'memberId':_0x49db91,'unitId':_0x53f572,'content':_0x44b320,'mention':_0x41a74f,'threadId':_0x4bd308},_0x164bfb=(await this[_0x598007(0x15c)][_0x598007(0x15b)](_0x598007(0x19e)+_0x53f572+'/reply',{'body':_0x4bd247}))['body'][_0x598007(0x16f)];return{..._0x445902,'id':_0x164bfb[_0x598007(0x161)],'dT':_0x28ba39(+_0x164bfb[_0x598007(0x1a4)])['format'](_0x598007(0x152)),'personId':_0x164bfb[_0x598007(0x19c)]};}else{const _0x44c0ab={'memberId':_0x49db91,'unitId':_0x53f572,'content':_0x44b320,'mention':_0x41a74f},_0x669843=await this[_0x598007(0x15c)][_0x598007(0x15b)](_0x598007(0x19e)+_0x53f572+_0x598007(0x17e),{'body':_0x44c0ab});return X(_0x669843[_0x598007(0x145)][_0x598007(0x166)],_0x445902);}}async[_0x3f63da(0x183)](_0x1ac438){const _0x5d4e12=_0x3f63da;var _0x3de0f7,_0x148e67;const {text:_0x37c0e2,unitId:_0x17e8cb}=_0x1ac438,_0x3fa4a2=(_0x148e67=(_0x3de0f7=_0x37c0e2[_0x5d4e12(0x177)])==null?void 0x0:_0x3de0f7[_0x5d4e12(0x157)](_0x3978f8=>_0x3978f8[_0x5d4e12(0x1a5)]===_0x51ffb1[_0x5d4e12(0x196)])[_0x5d4e12(0x18b)](_0x106213=>_0x106213['rangeId']))!=null?_0x148e67:[],_0x39a5de=JSON[_0x5d4e12(0x160)](_0x37c0e2),_0x3b82a3=_0x1ac438[_0x5d4e12(0x1a7)],_0x305af8=_0x1ac438['id'],_0x111643={'memberId':(await this['_sessionService'][_0x5d4e12(0x16d)](_0x17e8cb))['getMemberID'](),'unitId':_0x17e8cb,'threadId':_0x3b82a3,'mention':_0x3fa4a2,'content':_0x39a5de,'replyId':_0x305af8},_0x2a5caf=await this['_httpService'][_0x5d4e12(0x15b)](_0x5d4e12(0x19e)+_0x17e8cb+'/edit',{'body':_0x111643});return!_0x2a5caf[_0x5d4e12(0x145)][_0x5d4e12(0x188)]||_0x2a5caf[_0x5d4e12(0x145)][_0x5d4e12(0x188)][_0x5d4e12(0x19f)]===0x1;}async[_0x3f63da(0x150)](_0x22c1af){const _0x391918=_0x3f63da,{unitId:_0x394fd3}=_0x22c1af,_0x52fa84=_0x22c1af[_0x391918(0x1a7)],_0x2c94af={'memberId':this[_0x391918(0x17f)][_0x391918(0x14a)]()[_0x391918(0x18d)],'unitId':_0x394fd3,'threadId':_0x52fa84,'solved':_0x22c1af[_0x391918(0x18f)]?I['Solved']:I[_0x391918(0x16e)]},_0x3d29c1=await this['_httpService'][_0x391918(0x15b)](_0x391918(0x19e)+_0x394fd3+'/solved',{'body':_0x2c94af});return!_0x3d29c1[_0x391918(0x145)][_0x391918(0x188)]||_0x3d29c1['body']['error']['code']===0x1;}async[_0x3f63da(0x14c)](_0xb74be6,_0x5f5b57,_0x536da1,_0x4cdb1d){const _0x1353bb=_0x3f63da,_0x56fa6e={'memberId':(await this[_0x1353bb(0x195)][_0x1353bb(0x16d)](_0xb74be6))[_0x1353bb(0x191)](),'threadId':_0x536da1,'replyId':_0x4cdb1d,'unitId':_0xb74be6},_0x2c324b=await this[_0x1353bb(0x15c)]['post'](_0x1353bb(0x19e)+_0xb74be6+_0x1353bb(0x172),{'body':_0x56fa6e});return!_0x2c324b[_0x1353bb(0x145)][_0x1353bb(0x188)]||_0x2c324b['body'][_0x1353bb(0x188)][_0x1353bb(0x19f)]===0x1;}async[_0x3f63da(0x15e)](_0x3846dd,_0xa5fafd,_0x355c55){const _0x42d450=_0x3f63da,_0x417290={'unitId':_0x3846dd,'threadId':_0x355c55},_0x1595d=await this['_httpService']['post'](_0x42d450(0x19e)+_0x3846dd+'/list',{'body':_0x417290}),_0x197870=_0x355c55[_0x42d450(0x18b)](_0x37bd38=>ee(_0x1595d[_0x42d450(0x145)][_0x42d450(0x15a)][_0x37bd38],_0x3846dd,_0xa5fafd))[_0x42d450(0x157)](Boolean);return Object[_0x42d450(0x182)](_0x1595d[_0x42d450(0x145)][_0x42d450(0x17b)])[_0x42d450(0x197)](_0x39cf1a=>{const _0x1a2901=_0x42d450;this[_0x1a2901(0x17f)][_0x1a2901(0x153)](_0x39cf1a);}),_0x197870;}[_0x3f63da(0x189)](_0x49a50c){const _0x5cb2c6=_0x3f63da;return{'id':_0x49a50c['id'],'threadId':_0x49a50c[_0x5cb2c6(0x1a7)],'ref':_0x49a50c[_0x5cb2c6(0x16b)]};}};function _0x1b76(){const _0x3fdba0=['_httpService','type','listComments','_threadCommentDataSourceService','stringify','replyId','_configService','3703220iXLVEV','8XvKUcU','getComment','comment','root','_commentService','_initDataSource','user','ref','2616942ITFNRR','requireSession','OpenOrReOpen','reply','delete','5700331wfInQT','/delete','replies','getUnit','_injector','_init','customRanges','_threadCommentModel','_threadCommentDataSource','Add','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','slice','/add','_userService','_config','format','values','updateComment','1GDNkXl','UNRECOGNIZED','167160cmkBfK','disposeWithMe','error','saveCommentToSnapshot','Unknown','map','pipe','userID','/universer-api/user/list','resolved','2750tJfpJw','getMemberID','getUser','Solved','defineProperty','_sessionService','COMMENT','forEach','Edit','add','Reply','syncUpdateMutationToColla','userId','450688TADXBX','/universer-api/comment/unit/','code','onReady','length','find','18ZWEusn','createTimestamp','rangeType','Solve','threadId','solved','content','getOwnPropertyDescriptor','unitId','personId','body','commentUpdate$','3754998TggIOg','rangeId','Delete','getCurrentUser','pluginName','deleteComment','payload','get','1595pVRxMl','resolveComment','parse','YYYY/MM/DD\x20HH:mm','addUser','dataSource','subscribe','_initUserSync','filter','setConfig','8060yAyonb','comments','post'];_0x1b76=function(){return _0x3fdba0;};return _0x1b76();}S=Q([b(0x0,_0x4bd280(_0x16abd7)),b(0x1,_0x4bd280(_0x388990)),b(0x2,_0x4bd280(_0x2c5e4c))],S);var re=Object[_0x3f63da(0x1aa)],te=(_0x2de3ba,_0x627aa8,_0x34506d,_0x28971f)=>{const _0x59e1fe=_0x3f63da;for(var _0x9c9fac=_0x28971f>0x1?void 0x0:_0x28971f?re(_0x627aa8,_0x34506d):_0x627aa8,_0x221e15=_0x2de3ba[_0x59e1fe(0x1a1)]-0x1,_0x1f4b27;_0x221e15>=0x0;_0x221e15--)(_0x1f4b27=_0x2de3ba[_0x221e15])&&(_0x9c9fac=_0x1f4b27(_0x9c9fac)||_0x9c9fac);return _0x9c9fac;},M=(_0x1919e9,_0x294a12)=>(_0x30db81,_0xbebaf1)=>_0x294a12(_0x30db81,_0xbebaf1,_0x1919e9);let f=class extends _0x391d46{constructor(_0x3b163c,_0x3e48dc){const _0x5ad643=_0x3f63da;super(),this[_0x5ad643(0x15f)]=_0x3b163c,this[_0x5ad643(0x179)]=_0x3e48dc,this[_0x5ad643(0x169)]();}['_initDataSource'](){const _0x25edef=_0x3f63da;this[_0x25edef(0x15f)][_0x25edef(0x154)]=this[_0x25edef(0x179)],this[_0x25edef(0x15f)][_0x25edef(0x19b)]=!0x1;}};f=te([M(0x0,_0x2f9f28),M(0x1,_0x4bd280(S))],f);var se=Object[_0x3f63da(0x194)],oe=Object[_0x3f63da(0x1aa)],ne=(_0x2fe6fd,_0x590c24,_0x3b632a)=>_0x590c24 in _0x2fe6fd?se(_0x2fe6fd,_0x590c24,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b632a}):_0x2fe6fd[_0x590c24]=_0x3b632a,ie=(_0x42b5a3,_0x588d56,_0x1e4d7d,_0x25b3b7)=>{const _0x1d860e=_0x3f63da;for(var _0x24b614=_0x25b3b7>0x1?void 0x0:_0x25b3b7?oe(_0x588d56,_0x1e4d7d):_0x588d56,_0x316b48=_0x42b5a3[_0x1d860e(0x1a1)]-0x1,_0xf82413;_0x316b48>=0x0;_0x316b48--)(_0xf82413=_0x42b5a3[_0x316b48])&&(_0x24b614=_0xf82413(_0x24b614)||_0x24b614);return _0x24b614;},N=(_0x243842,_0xb7b003)=>(_0x4301f7,_0x1a0bc2)=>_0xb7b003(_0x4301f7,_0x1a0bc2,_0x243842),$=(_0x265a4d,_0x3c2f1f,_0x4d5696)=>ne(_0x265a4d,typeof _0x3c2f1f!='symbol'?_0x3c2f1f+'':_0x3c2f1f,_0x4d5696);let g=class extends _0x14a1a2{constructor(_0x576930=O,_0x394901,_0xed77a7){const _0x2a4fcb=_0x3f63da;super(),this[_0x2a4fcb(0x180)]=_0x576930,this[_0x2a4fcb(0x175)]=_0x394901,this['_configService']=_0xed77a7;const {..._0x4b66d0}=_0x21e87f({},O,this[_0x2a4fcb(0x180)]);this[_0x2a4fcb(0x162)][_0x2a4fcb(0x158)](z,_0x4b66d0);}['onStarting'](){const _0x499287=_0x3f63da;[[S],[f],[_]][_0x499287(0x197)](_0x79f8f=>{const _0x209775=_0x499287;this[_0x209775(0x175)][_0x209775(0x199)](_0x79f8f);});}[_0x3f63da(0x1a0)](){const _0x2583cd=_0x3f63da;this[_0x2583cd(0x175)][_0x2583cd(0x14e)](f),this[_0x2583cd(0x175)][_0x2583cd(0x14e)](_);}};$(g,_0x3f63da(0x14b),W),$(g,_0x3f63da(0x15d),_0x35e782['UNIVER_UNKNOWN']),g=ie([_0x25b0c6(_0x1d91a2,_0x3a685b,_0x586010),N(0x1,_0x4bd280(_0x249295)),N(0x2,_0x55aae9)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x1db4(_0x2b44be,_0x19edba){_0x2b44be=_0x2b44be-0xf9;const _0x17c55a=_0x17c5();let _0x1db470=_0x17c55a[_0x2b44be];return _0x1db470;}const _0x452b23=_0x1db4;(function(_0x49ca60,_0x45c3b0){const _0x4a8af5=_0x1db4,_0x218d70=_0x49ca60();while(!![]){try{const _0x377ab4=parseInt(_0x4a8af5(0x11b))/0x1+-parseInt(_0x4a8af5(0x128))/0x2*(parseInt(_0x4a8af5(0x115))/0x3)+parseInt(_0x4a8af5(0x104))/0x4+-parseInt(_0x4a8af5(0x132))/0x5*(-parseInt(_0x4a8af5(0x126))/0x6)+-parseInt(_0x4a8af5(0x107))/0x7+-parseInt(_0x4a8af5(0x10a))/0x8+parseInt(_0x4a8af5(0x117))/0x9;if(_0x377ab4===_0x45c3b0)break;else _0x218d70['push'](_0x218d70['shift']());}catch(_0x47539c){_0x218d70['push'](_0x218d70['shift']());}}}(_0x17c5,0xec0b8));import{CommentService as _0x12c24f,CollaborationSessionService as _0x395936,UniverCollaborationClientPlugin as _0x354fd9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3ba035}from'@univerjs-pro/license';import{dayjs as _0xe06112,UserManagerService as _0x48d6a8,Inject as _0x437e4f,Injector as _0x50e8a0,Disposable as _0x4f537f,CustomRangeType as _0x128584,UniverInstanceType as _0x41babf,DependentOn as _0x49f4f5,IConfigService as _0x4181a7,Plugin as _0x37f55a,merge as _0x127711}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x36ebce}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3e56e2,IThreadCommentDataSourceService as _0x33be8b}from'@univerjs/thread-comment';import{bufferTime as _0x458aca}from'rxjs';import{HTTPService as _0x37c7be}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x17c5(){const _0x762096=['get','add','onReady','map','addComment','getCurrentUser','setConfig','customRanges','unitId','stringify','_threadCommentDataSourceService','replies','Reply','root','/add','resolved','/reply','replyId','disposeWithMe','reply','delete','userId','YYYY/MM/DD\x20HH:mm','dataSource','createTimestamp','/solved','commentUpdate$','subscribe','Add','comments','_threadCommentModel','format','onStarting','code','solved','_commentService','deleteComment','_config','defineProperty','_configService','userID','Delete','requireSession','UNIVER_UNKNOWN','Solved','getOwnPropertyDescriptor','values','5244256aaUntP','OpenOrReOpen','Solve','13519107xfKIVV','symbol','comment','1519848WYhYRI','parse','UNRECOGNIZED','length','_sessionService','getMemberID','updateComment','personId','thread-comment-data-source.config','threadId','listComments','3ZlkCIH','syncUpdateMutationToColla','11280600tmtsGf','resolveComment','_threadCommentDataSource','getUnit','314846PavOvV','COMMENT','Edit','addUser','/universer-api/comment/unit/','pluginName','_initUserSync','/list','user','rangeType','filter','6clGQyu','_injector','2378942HBpgKQ','Unknown','post','_httpService','/universer-api/user/list','payload','forEach','getUser','_init','body','6991415ejHbDA','slice','_initDataSource','parentId','error','content','_userService','type','rangeId'];_0x17c5=function(){return _0x762096;};return _0x17c5();}var I=(_0x10eddc=>(_0x10eddc[_0x10eddc[_0x452b23(0x105)]=0x0]='OpenOrReOpen',_0x10eddc[_0x10eddc[_0x452b23(0x101)]=0x1]=_0x452b23(0x101),_0x10eddc[_0x10eddc[_0x452b23(0x10c)]=-0x1]='UNRECOGNIZED',_0x10eddc))(I||{}),v=(_0x569aa1=>(_0x569aa1[_0x569aa1[_0x452b23(0x129)]=0x0]=_0x452b23(0x129),_0x569aa1[_0x569aa1[_0x452b23(0x157)]=0x1]=_0x452b23(0x157),_0x569aa1[_0x569aa1[_0x452b23(0x147)]=0x2]=_0x452b23(0x147),_0x569aa1[_0x569aa1[_0x452b23(0x11d)]=0x3]=_0x452b23(0x11d),_0x569aa1[_0x569aa1[_0x452b23(0xfe)]=0x4]=_0x452b23(0xfe),_0x569aa1[_0x569aa1[_0x452b23(0x106)]=0x5]='Solve',_0x569aa1[_0x569aa1[_0x452b23(0x10c)]=-0x1]=_0x452b23(0x10c),_0x569aa1))(v||{});const y=_0x3f4573=>_0xe06112(new Date(+_0x3f4573))[_0x452b23(0x15a)](_0x452b23(0x151)),B=async(_0x1e7ec3,_0x2b0b8d)=>{const _0x3a75d8=_0x452b23,_0x37a653=_0x1e7ec3['get'](_0x48d6a8),_0xc7daa2=_0x1e7ec3['get'](_0x37c7be);_0x2b0b8d['forEach'](_0x2f2895=>{const _0x1c235c=_0x1db4;_0x37a653[_0x1c235c(0x12f)](_0x2f2895)&&_0x2b0b8d[_0x1c235c(0x14f)](_0x2f2895);}),_0x2b0b8d['size']&&(await _0xc7daa2[_0x3a75d8(0x13b)](_0x3a75d8(0x12c),{'params':{'userIDs':[..._0x2b0b8d]}}))[_0x3a75d8(0x131)]['users'][_0x3a75d8(0x12e)](_0x3f0e93=>{const _0x8a7620=_0x3a75d8;_0x3f0e93&&_0x37a653[_0x8a7620(0x11e)](_0x3f0e93);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x1c7b92,_0x4c514b,_0x1f7845,_0x37e144)=>{for(var _0x2ed57f=_0x37e144>0x1?void 0x0:_0x37e144?K(_0x4c514b,_0x1f7845):_0x4c514b,_0x130caa=_0x1c7b92['length']-0x1,_0x20e6e0;_0x130caa>=0x0;_0x130caa--)(_0x20e6e0=_0x1c7b92[_0x130caa])&&(_0x2ed57f=_0x20e6e0(_0x2ed57f)||_0x2ed57f);return _0x2ed57f;},p=(_0x5af7b0,_0x493324)=>(_0x5c53d8,_0x508315)=>_0x493324(_0x5c53d8,_0x508315,_0x5af7b0);let _=class extends _0x4f537f{constructor(_0x507d4a,_0x1402d9,_0x203982,_0xedaf3c){const _0x5f530c=_0x452b23;super(),this[_0x5f530c(0x15e)]=_0x507d4a,this[_0x5f530c(0x159)]=_0x1402d9,this[_0x5f530c(0x138)]=_0x203982,this[_0x5f530c(0x127)]=_0xedaf3c,this[_0x5f530c(0x130)](),this[_0x5f530c(0x121)]();}['_initUserSync'](){const _0x53a591=_0x452b23;this[_0x53a591(0x14d)](this[_0x53a591(0x159)][_0x53a591(0x155)]['pipe'](_0x458aca(0x10))[_0x53a591(0x156)](_0x179017=>{const _0x201e87=_0x53a591,_0x2c2a9a=new Set();_0x179017[_0x201e87(0x12e)](_0x516510=>{const _0x12be3d=_0x201e87;if(_0x516510['type']===_0x12be3d(0x13c)){const _0x13152f=_0x516510[_0x12be3d(0x12d)][_0x12be3d(0x111)];_0x2c2a9a[_0x12be3d(0x13c)](_0x13152f);}}),B(this[_0x201e87(0x127)],_0x2c2a9a);}));}[_0x452b23(0x130)](){const _0x5d1f11=_0x452b23;this['disposeWithMe'](this['_commentService'][_0x5d1f11(0x155)][_0x5d1f11(0x156)](async _0x3031b1=>{const _0x316597=_0x5d1f11;var _0x2cc02c,_0x3b51d2,_0x37cab6,_0x5e8d73;const _0x268e04=(_0x2cc02c=this['_threadCommentModel'][_0x316597(0x11a)](_0x3031b1[_0x316597(0x143)])['find'](_0x473154=>_0x473154[_0x316597(0x113)]===_0x3031b1[_0x316597(0x113)]))==null?void 0x0:_0x2cc02c['root'];if(!_0x268e04)return;const {unitId:_0x5b3d28,subUnitId:_0x435b55}=_0x268e04;switch(_0x3031b1[_0x316597(0x123)]&&this['_userService'][_0x316597(0x11e)](_0x3031b1[_0x316597(0x123)]),_0x3031b1[_0x316597(0x139)]){case v[_0x316597(0x157)]:break;case v[_0x316597(0x147)]:{this['_threadCommentModel'][_0x316597(0x13f)](_0x5b3d28,_0x435b55,{'unitId':_0x5b3d28,'subUnitId':_0x435b55,'ref':'','id':_0x3031b1[_0x316597(0x14c)],'dT':y(+_0x3031b1[_0x316597(0x153)]),'threadId':_0x3031b1[_0x316597(0x113)],'personId':(_0x37cab6=(_0x3b51d2=_0x3031b1[_0x316597(0x123)])==null?void 0x0:_0x3b51d2[_0x316597(0xfd)])!=null?_0x37cab6:_0x3031b1[_0x316597(0x150)],'text':JSON[_0x316597(0x10b)](_0x3031b1[_0x316597(0x137)]),'parentId':_0x268e04['id']});break;}case v[_0x316597(0xfe)]:{const _0xeaa323=this[_0x316597(0x159)]['getComment'](_0x5b3d28,_0x435b55,_0x3031b1[_0x316597(0x14c)]);_0xeaa323&&_0xeaa323[_0x316597(0x135)]&&this[_0x316597(0x159)]['deleteComment'](_0x5b3d28,_0x435b55,_0x3031b1[_0x316597(0x14c)]);break;}case v[_0x316597(0x11d)]:{this[_0x316597(0x159)][_0x316597(0x110)](_0x5b3d28,_0x435b55,{'commentId':_0x3031b1[_0x316597(0x14c)],'text':JSON['parse'](_0x3031b1[_0x316597(0x137)])});break;}case v[_0x316597(0x106)]:{const _0x854ef1=(_0x5e8d73=this[_0x316597(0x159)]['getUnit'](_0x3031b1[_0x316597(0x143)])['find'](_0x2f3487=>_0x2f3487['threadId']===_0x3031b1[_0x316597(0x113)]))==null?void 0x0:_0x5e8d73[_0x316597(0x148)];_0x854ef1&&this[_0x316597(0x159)][_0x316597(0x118)](_0x5b3d28,_0x435b55,_0x854ef1['id'],_0x3031b1['solved']===I[_0x316597(0x101)]);break;}}}));}};_=V([p(0x0,_0x437e4f(_0x12c24f)),p(0x1,_0x437e4f(_0x3e56e2)),p(0x2,_0x437e4f(_0x48d6a8)),p(0x3,_0x437e4f(_0x50e8a0))],_);const z=_0x452b23(0x112),O={};var k=Object[_0x452b23(0x102)],Q=(_0x41e29a,_0x2956a7,_0x2595eb,_0x36088d)=>{for(var _0xaad226=_0x36088d>0x1?void 0x0:_0x36088d?k(_0x2956a7,_0x2595eb):_0x2956a7,_0x40a588=_0x41e29a['length']-0x1,_0x133b4d;_0x40a588>=0x0;_0x40a588--)(_0x133b4d=_0x41e29a[_0x40a588])&&(_0xaad226=_0x133b4d(_0xaad226)||_0xaad226);return _0xaad226;},b=(_0x4f7c9a,_0x168885)=>(_0x2bd8fc,_0x37a43b)=>_0x168885(_0x2bd8fc,_0x37a43b,_0x4f7c9a);function X(_0x350da9,_0x151f36){const _0x509d5d=_0x452b23,_0xa08899=_0x350da9[_0x509d5d(0x146)][0x0];return{..._0x151f36,'id':_0xa08899[_0x509d5d(0x14c)],'resolved':_0x350da9[_0x509d5d(0x15d)]===0x1,'dT':y(_0xa08899[_0x509d5d(0x153)]),'personId':_0xa08899[_0x509d5d(0x150)],'threadId':_0xa08899[_0x509d5d(0x113)]};}function ee(_0x1ddb27,_0x1e05f0,_0x306943){const _0x1128d1=_0x452b23;var _0x5dca3b,_0x169bd6;if(((_0x169bd6=(_0x5dca3b=_0x1ddb27==null?void 0x0:_0x1ddb27[_0x1128d1(0x146)])==null?void 0x0:_0x5dca3b['length'])!=null?_0x169bd6:0x0)>0x0){const _0x3fb377=(_0x52495b,_0x297119)=>({'id':_0x52495b['replyId'],'threadId':_0x52495b[_0x1128d1(0x113)],'dT':y(_0x52495b[_0x1128d1(0x153)]),'personId':_0x52495b['userId'],'resolved':_0x1ddb27[_0x1128d1(0x15d)]===I['Solved'],'unitId':_0x1e05f0,'subUnitId':_0x306943,'text':JSON[_0x1128d1(0x10b)](_0x52495b['content']),'parentId':_0x297119}),_0x2d13c4=_0x3fb377(_0x1ddb27[_0x1128d1(0x146)][0x0]);return{..._0x2d13c4,'children':_0x1ddb27['replies'][_0x1128d1(0x133)](0x1)[_0x1128d1(0x13e)](_0x3ef85a=>_0x3fb377(_0x3ef85a,_0x2d13c4['id']))};}return null;}let S=class{constructor(_0x7d1fcd,_0xce3f7,_0x157859){const _0x442d80=_0x452b23;this[_0x442d80(0x12b)]=_0x7d1fcd,this['_userService']=_0xce3f7,this[_0x442d80(0x10e)]=_0x157859;}async[_0x452b23(0x13f)](_0x19b0d3){const _0x5e68aa=_0x452b23;var _0x27e403,_0x29b3af;const {parentId:_0x36f965,unitId:_0x10ccae,text:_0x334a8b,threadId:_0x58c016}=_0x19b0d3,_0x1ed14e=(_0x29b3af=(_0x27e403=_0x334a8b[_0x5e68aa(0x142)])==null?void 0x0:_0x27e403[_0x5e68aa(0x125)](_0x50765c=>_0x50765c[_0x5e68aa(0x124)]===_0x128584[_0x5e68aa(0x11c)])[_0x5e68aa(0x13e)](_0xf4ee76=>_0xf4ee76['rangeId']))!=null?_0x29b3af:[],_0x3a8913=JSON['stringify'](_0x334a8b),_0x324d21=(await this[_0x5e68aa(0x10e)]['requireSession'](_0x10ccae))[_0x5e68aa(0x10f)]();if(_0x36f965){const _0x46402b={'memberId':_0x324d21,'unitId':_0x10ccae,'content':_0x3a8913,'mention':_0x1ed14e,'threadId':_0x58c016},_0x60c34b=(await this[_0x5e68aa(0x12b)][_0x5e68aa(0x12a)](_0x5e68aa(0x11f)+_0x10ccae+_0x5e68aa(0x14b),{'body':_0x46402b}))[_0x5e68aa(0x131)][_0x5e68aa(0x14e)];return{..._0x19b0d3,'id':_0x60c34b['replyId'],'dT':_0xe06112(+_0x60c34b['createTimestamp'])[_0x5e68aa(0x15a)](_0x5e68aa(0x151)),'personId':_0x60c34b[_0x5e68aa(0x150)]};}else{const _0x21ed5c={'memberId':_0x324d21,'unitId':_0x10ccae,'content':_0x3a8913,'mention':_0x1ed14e},_0x438825=await this['_httpService']['post'](_0x5e68aa(0x11f)+_0x10ccae+_0x5e68aa(0x149),{'body':_0x21ed5c});return X(_0x438825[_0x5e68aa(0x131)][_0x5e68aa(0x109)],_0x19b0d3);}}async[_0x452b23(0x110)](_0x42822e){const _0xd9dd6c=_0x452b23;var _0x38626c,_0x48240f;const {text:_0x1825a0,unitId:_0x449a64}=_0x42822e,_0x2037a7=(_0x48240f=(_0x38626c=_0x1825a0['customRanges'])==null?void 0x0:_0x38626c[_0xd9dd6c(0x125)](_0x26bb4e=>_0x26bb4e[_0xd9dd6c(0x124)]===_0x128584[_0xd9dd6c(0x11c)])[_0xd9dd6c(0x13e)](_0xf3484e=>_0xf3484e[_0xd9dd6c(0x13a)]))!=null?_0x48240f:[],_0x585f4a=JSON[_0xd9dd6c(0x144)](_0x1825a0),_0x2d8dde=_0x42822e[_0xd9dd6c(0x113)],_0x23f0c7=_0x42822e['id'],_0x5426c7={'memberId':(await this[_0xd9dd6c(0x10e)]['requireSession'](_0x449a64))[_0xd9dd6c(0x10f)](),'unitId':_0x449a64,'threadId':_0x2d8dde,'mention':_0x2037a7,'content':_0x585f4a,'replyId':_0x23f0c7},_0x56e7a7=await this['_httpService']['post'](_0xd9dd6c(0x11f)+_0x449a64+'/edit',{'body':_0x5426c7});return!_0x56e7a7['body'][_0xd9dd6c(0x136)]||_0x56e7a7['body'][_0xd9dd6c(0x136)][_0xd9dd6c(0x15c)]===0x1;}async[_0x452b23(0x118)](_0x3b4fe3){const _0xa112e8=_0x452b23,{unitId:_0x43bc74}=_0x3b4fe3,_0x3d1767=_0x3b4fe3[_0xa112e8(0x113)],_0x1b3b62={'memberId':this[_0xa112e8(0x138)][_0xa112e8(0x140)]()['userID'],'unitId':_0x43bc74,'threadId':_0x3d1767,'solved':_0x3b4fe3[_0xa112e8(0x14a)]?I[_0xa112e8(0x101)]:I[_0xa112e8(0x105)]},_0xc7700d=await this[_0xa112e8(0x12b)][_0xa112e8(0x12a)]('/universer-api/comment/unit/'+_0x43bc74+_0xa112e8(0x154),{'body':_0x1b3b62});return!_0xc7700d[_0xa112e8(0x131)][_0xa112e8(0x136)]||_0xc7700d[_0xa112e8(0x131)][_0xa112e8(0x136)]['code']===0x1;}async[_0x452b23(0xf9)](_0xdc9ee5,_0x2f425f,_0x2a74cb,_0x27dc83){const _0x593d3f=_0x452b23,_0x23fbea={'memberId':(await this['_sessionService'][_0x593d3f(0xff)](_0xdc9ee5))['getMemberID'](),'threadId':_0x2a74cb,'replyId':_0x27dc83,'unitId':_0xdc9ee5},_0x556321=await this[_0x593d3f(0x12b)][_0x593d3f(0x12a)](_0x593d3f(0x11f)+_0xdc9ee5+'/delete',{'body':_0x23fbea});return!_0x556321[_0x593d3f(0x131)][_0x593d3f(0x136)]||_0x556321[_0x593d3f(0x131)][_0x593d3f(0x136)][_0x593d3f(0x15c)]===0x1;}async[_0x452b23(0x114)](_0x304ca5,_0x40c13a,_0x1f35f7){const _0x2ea717=_0x452b23,_0x3639bb={'unitId':_0x304ca5,'threadId':_0x1f35f7},_0x144cc6=await this[_0x2ea717(0x12b)][_0x2ea717(0x12a)](_0x2ea717(0x11f)+_0x304ca5+_0x2ea717(0x122),{'body':_0x3639bb}),_0x343d2c=_0x1f35f7[_0x2ea717(0x13e)](_0x2f8761=>ee(_0x144cc6['body'][_0x2ea717(0x158)][_0x2f8761],_0x304ca5,_0x40c13a))[_0x2ea717(0x125)](Boolean);return Object[_0x2ea717(0x103)](_0x144cc6['body']['users'])['forEach'](_0x3b7e69=>{const _0x435c67=_0x2ea717;this[_0x435c67(0x138)][_0x435c67(0x11e)](_0x3b7e69);}),_0x343d2c;}['saveCommentToSnapshot'](_0x7a6e89){const _0x73331c=_0x452b23;return{'id':_0x7a6e89['id'],'threadId':_0x7a6e89[_0x73331c(0x113)],'ref':_0x7a6e89['ref']};}};S=Q([b(0x0,_0x437e4f(_0x37c7be)),b(0x1,_0x437e4f(_0x48d6a8)),b(0x2,_0x437e4f(_0x395936))],S);var re=Object[_0x452b23(0x102)],te=(_0x29be48,_0x2c84ec,_0x4a7ebd,_0x1af60a)=>{const _0x42d23f=_0x452b23;for(var _0x5391e7=_0x1af60a>0x1?void 0x0:_0x1af60a?re(_0x2c84ec,_0x4a7ebd):_0x2c84ec,_0x70053c=_0x29be48[_0x42d23f(0x10d)]-0x1,_0x19d67d;_0x70053c>=0x0;_0x70053c--)(_0x19d67d=_0x29be48[_0x70053c])&&(_0x5391e7=_0x19d67d(_0x5391e7)||_0x5391e7);return _0x5391e7;},M=(_0x2ad0cf,_0x516c13)=>(_0x55be30,_0x24d0d2)=>_0x516c13(_0x55be30,_0x24d0d2,_0x2ad0cf);let f=class extends _0x4f537f{constructor(_0x5f2187,_0x347bd3){const _0x46b6b9=_0x452b23;super(),this[_0x46b6b9(0x145)]=_0x5f2187,this[_0x46b6b9(0x119)]=_0x347bd3,this['_initDataSource']();}[_0x452b23(0x134)](){const _0x2a12ca=_0x452b23;this[_0x2a12ca(0x145)][_0x2a12ca(0x152)]=this[_0x2a12ca(0x119)],this[_0x2a12ca(0x145)][_0x2a12ca(0x116)]=!0x1;}};f=te([M(0x0,_0x33be8b),M(0x1,_0x437e4f(S))],f);var se=Object[_0x452b23(0xfb)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x252929,_0x35f054,_0x39c7fd)=>_0x35f054 in _0x252929?se(_0x252929,_0x35f054,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39c7fd}):_0x252929[_0x35f054]=_0x39c7fd,ie=(_0x587562,_0x49e33e,_0x34a790,_0x194ee)=>{const _0x5029aa=_0x452b23;for(var _0x52634c=_0x194ee>0x1?void 0x0:_0x194ee?oe(_0x49e33e,_0x34a790):_0x49e33e,_0x3111eb=_0x587562[_0x5029aa(0x10d)]-0x1,_0x404025;_0x3111eb>=0x0;_0x3111eb--)(_0x404025=_0x587562[_0x3111eb])&&(_0x52634c=_0x404025(_0x52634c)||_0x52634c);return _0x52634c;},N=(_0x13861f,_0x59622a)=>(_0x2849c4,_0x218c94)=>_0x59622a(_0x2849c4,_0x218c94,_0x13861f),$=(_0x1138f2,_0x322a97,_0x2cc85b)=>ne(_0x1138f2,typeof _0x322a97!=_0x452b23(0x108)?_0x322a97+'':_0x322a97,_0x2cc85b);let g=class extends _0x37f55a{constructor(_0x3a6c21=O,_0x25385d,_0x48ead6){const _0x437700=_0x452b23;super(),this[_0x437700(0xfa)]=_0x3a6c21,this[_0x437700(0x127)]=_0x25385d,this[_0x437700(0xfc)]=_0x48ead6;const {..._0x2c64dc}=_0x127711({},O,this[_0x437700(0xfa)]);this[_0x437700(0xfc)][_0x437700(0x141)](z,_0x2c64dc);}[_0x452b23(0x15b)](){const _0x23a1ac=_0x452b23;[[S],[f],[_]][_0x23a1ac(0x12e)](_0x5d54e9=>{const _0x54a9c1=_0x23a1ac;this['_injector'][_0x54a9c1(0x13c)](_0x5d54e9);});}[_0x452b23(0x13d)](){const _0x17c8b4=_0x452b23;this[_0x17c8b4(0x127)][_0x17c8b4(0x13b)](f),this['_injector'][_0x17c8b4(0x13b)](_);}};$(g,_0x452b23(0x120),W),$(g,_0x452b23(0x139),_0x41babf[_0x452b23(0x100)]),g=ie([_0x49f4f5(_0x36ebce,_0x354fd9,_0x3ba035),N(0x1,_0x437e4f(_0x50e8a0)),N(0x2,_0x4181a7)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x33a348,_0x454e32){const _0x294c06=_0x3b71,_0x104e10=_0x33a348();while(!![]){try{const _0x3a389a=parseInt(_0x294c06(0x1d1))/0x1+-parseInt(_0x294c06(0x1f4))/0x2+-parseInt(_0x294c06(0x1c8))/0x3*(-parseInt(_0x294c06(0x1b5))/0x4)+-parseInt(_0x294c06(0x1be))/0x5+-parseInt(_0x294c06(0x198))/0x6+-parseInt(_0x294c06(0x1a2))/0x7*(-parseInt(_0x294c06(0x1ba))/0x8)+-parseInt(_0x294c06(0x1d7))/0x9;if(_0x3a389a===_0x454e32)break;else _0x104e10['push'](_0x104e10['shift']());}catch(_0x3fd076){_0x104e10['push'](_0x104e10['shift']());}}}(_0x1425,0x5cd9c),function(_0x228318,_0x2e3554){const _0x237aa9=_0x3b71;typeof exports=='object'&&typeof module<'u'?_0x2e3554(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x237aa9(0x200)&&define[_0x237aa9(0x1b0)]?define([_0x237aa9(0x1a6),_0x237aa9(0x1ca),_0x237aa9(0x1dc),_0x237aa9(0x19d),_0x237aa9(0x1aa),_0x237aa9(0x1d0),'rxjs',_0x237aa9(0x1f9)],_0x2e3554):(_0x228318=typeof globalThis<'u'?globalThis:_0x228318||self,_0x2e3554(_0x228318['UniverProThreadCommentDatasource']={},_0x228318['UniverProCollaborationClient'],_0x228318[_0x237aa9(0x1c9)],_0x228318[_0x237aa9(0x1d4)],_0x228318[_0x237aa9(0x1dd)],_0x228318['UniverThreadComment'],_0x228318[_0x237aa9(0x1f1)],_0x228318[_0x237aa9(0x1f8)]));}(this,function(_0x5c66db,_0x3109f9,_0x2c14ba,_0x435600,_0x430df1,_0x43f7e7,_0x15d779,_0x3721b3){'use strict';const _0x1f6fc3=_0x3b71;const _0x4f28d3=_0x1f6fc3(0x202);var _0xfd3de0=(_0x4eeba4=>(_0x4eeba4[_0x4eeba4[_0x1f6fc3(0x1a4)]=0x0]='OpenOrReOpen',_0x4eeba4[_0x4eeba4[_0x1f6fc3(0x1e7)]=0x1]='Solved',_0x4eeba4[_0x4eeba4['UNRECOGNIZED']=-0x1]=_0x1f6fc3(0x1fc),_0x4eeba4))(_0xfd3de0||{}),_0x3560bc=(_0x5656d9=>(_0x5656d9[_0x5656d9[_0x1f6fc3(0x1e9)]=0x0]=_0x1f6fc3(0x1e9),_0x5656d9[_0x5656d9['Add']=0x1]=_0x1f6fc3(0x195),_0x5656d9[_0x5656d9[_0x1f6fc3(0x1e1)]=0x2]=_0x1f6fc3(0x1e1),_0x5656d9[_0x5656d9['Edit']=0x3]=_0x1f6fc3(0x1c3),_0x5656d9[_0x5656d9['Delete']=0x4]=_0x1f6fc3(0x1a3),_0x5656d9[_0x5656d9[_0x1f6fc3(0x1e5)]=0x5]='Solve',_0x5656d9[_0x5656d9[_0x1f6fc3(0x1fc)]=-0x1]=_0x1f6fc3(0x1fc),_0x5656d9))(_0x3560bc||{});const _0x3f665d=_0x540ca2=>_0x435600[_0x1f6fc3(0x201)](new Date(+_0x540ca2))[_0x1f6fc3(0x1b7)](_0x1f6fc3(0x1a8)),_0x4f97e3=async(_0x105a2d,_0x29a122)=>{const _0x5a7909=_0x1f6fc3,_0x16b67f=_0x105a2d['get'](_0x435600['UserManagerService']),_0x2b0a3d=_0x105a2d['get'](_0x3721b3[_0x5a7909(0x19c)]);_0x29a122['forEach'](_0x51a032=>{const _0x15be44=_0x5a7909;_0x16b67f[_0x15be44(0x1bc)](_0x51a032)&&_0x29a122[_0x15be44(0x1e4)](_0x51a032);}),_0x29a122[_0x5a7909(0x1bf)]&&(await _0x2b0a3d[_0x5a7909(0x1f2)](_0x5a7909(0x1d9),{'params':{'userIDs':[..._0x29a122]}}))['body'][_0x5a7909(0x1a7)]['forEach'](_0xf26e0c=>{const _0x49562e=_0x5a7909;_0xf26e0c&&_0x16b67f[_0x49562e(0x196)](_0xf26e0c);});};var _0x9210cd=Object[_0x1f6fc3(0x1e0)],_0x8596ba=(_0x228472,_0x27df00,_0x4495f8,_0xb5d5df)=>{const _0x1e217b=_0x1f6fc3;for(var _0x26dc0d=_0xb5d5df>0x1?void 0x0:_0xb5d5df?_0x9210cd(_0x27df00,_0x4495f8):_0x27df00,_0x2f06cf=_0x228472[_0x1e217b(0x1d5)]-0x1,_0x135bb4;_0x2f06cf>=0x0;_0x2f06cf--)(_0x135bb4=_0x228472[_0x2f06cf])&&(_0x26dc0d=_0x135bb4(_0x26dc0d)||_0x26dc0d);return _0x26dc0d;},_0x242fdb=(_0x14da01,_0x6f6cea)=>(_0x1b04a8,_0x50116c)=>_0x6f6cea(_0x1b04a8,_0x50116c,_0x14da01);let _0x1a82aa=class extends _0x435600[_0x1f6fc3(0x1c1)]{constructor(_0x196161,_0x3743db,_0x33776f,_0xfe1c60){const _0x446a66=_0x1f6fc3;super(),this[_0x446a66(0x20b)]=_0x196161,this['_threadCommentModel']=_0x3743db,this[_0x446a66(0x1cd)]=_0x33776f,this[_0x446a66(0x1df)]=_0xfe1c60,this[_0x446a66(0x1ed)](),this[_0x446a66(0x18e)]();}[_0x1f6fc3(0x18e)](){const _0x39dd85=_0x1f6fc3;this[_0x39dd85(0x1fd)](this['_threadCommentModel']['commentUpdate$'][_0x39dd85(0x1af)](_0x15d779[_0x39dd85(0x207)](0x10))['subscribe'](_0x197ba5=>{const _0x1c1b65=_0x39dd85,_0x18e5fa=new Set();_0x197ba5[_0x1c1b65(0x1b6)](_0x392402=>{const _0x40b0ef=_0x1c1b65;if(_0x392402[_0x40b0ef(0x190)]===_0x40b0ef(0x1b9)){const _0x3821ed=_0x392402['payload'][_0x40b0ef(0x191)];_0x18e5fa[_0x40b0ef(0x1b9)](_0x3821ed);}}),_0x4f97e3(this[_0x1c1b65(0x1df)],_0x18e5fa);}));}[_0x1f6fc3(0x1ed)](){const _0x395fc6=_0x1f6fc3;this['disposeWithMe'](this['_commentService'][_0x395fc6(0x1c6)][_0x395fc6(0x1d3)](async _0x54d038=>{const _0x376946=_0x395fc6;var _0x20e199,_0x5c8d7b,_0x157888,_0x490202;const _0x3cdc69=(_0x20e199=this[_0x376946(0x1a0)]['getUnit'](_0x54d038[_0x376946(0x1ad)])[_0x376946(0x18f)](_0x11b815=>_0x11b815['threadId']===_0x54d038[_0x376946(0x197)]))==null?void 0x0:_0x20e199['root'];if(!_0x3cdc69)return;const {unitId:_0x3e59fe,subUnitId:_0x4ef2da}=_0x3cdc69;switch(_0x54d038[_0x376946(0x1f6)]&&this['_userService'][_0x376946(0x196)](_0x54d038[_0x376946(0x1f6)]),_0x54d038[_0x376946(0x190)]){case _0x3560bc[_0x376946(0x195)]:break;case _0x3560bc[_0x376946(0x1e1)]:{this['_threadCommentModel'][_0x376946(0x194)](_0x3e59fe,_0x4ef2da,{'unitId':_0x3e59fe,'subUnitId':_0x4ef2da,'ref':'','id':_0x54d038[_0x376946(0x1b4)],'dT':_0x3f665d(+_0x54d038[_0x376946(0x1ac)]),'threadId':_0x54d038['threadId'],'personId':(_0x157888=(_0x5c8d7b=_0x54d038[_0x376946(0x1f6)])==null?void 0x0:_0x5c8d7b[_0x376946(0x1c7)])!=null?_0x157888:_0x54d038[_0x376946(0x1ef)],'text':JSON[_0x376946(0x1b1)](_0x54d038[_0x376946(0x1e8)]),'parentId':_0x3cdc69['id']});break;}case _0x3560bc[_0x376946(0x1a3)]:{const _0x57cc53=this[_0x376946(0x1a0)][_0x376946(0x1de)](_0x3e59fe,_0x4ef2da,_0x54d038[_0x376946(0x1b4)]);_0x57cc53&&_0x57cc53['parentId']&&this[_0x376946(0x1a0)]['deleteComment'](_0x3e59fe,_0x4ef2da,_0x54d038[_0x376946(0x1b4)]);break;}case _0x3560bc['Edit']:{this[_0x376946(0x1a0)][_0x376946(0x1ea)](_0x3e59fe,_0x4ef2da,{'commentId':_0x54d038[_0x376946(0x1b4)],'text':JSON[_0x376946(0x1b1)](_0x54d038[_0x376946(0x1e8)])});break;}case _0x3560bc[_0x376946(0x1e5)]:{const _0x1bdc7f=(_0x490202=this[_0x376946(0x1a0)]['getUnit'](_0x54d038[_0x376946(0x1ad)])['find'](_0x513cf3=>_0x513cf3[_0x376946(0x197)]===_0x54d038[_0x376946(0x197)]))==null?void 0x0:_0x490202['root'];_0x1bdc7f&&this[_0x376946(0x1a0)][_0x376946(0x1db)](_0x3e59fe,_0x4ef2da,_0x1bdc7f['id'],_0x54d038[_0x376946(0x1da)]===_0xfd3de0[_0x376946(0x1e7)]);break;}}}));}};_0x1a82aa=_0x8596ba([_0x242fdb(0x0,_0x435600['Inject'](_0x3109f9[_0x1f6fc3(0x1ee)])),_0x242fdb(0x1,_0x435600[_0x1f6fc3(0x1fb)](_0x43f7e7[_0x1f6fc3(0x203)])),_0x242fdb(0x2,_0x435600[_0x1f6fc3(0x1fb)](_0x435600[_0x1f6fc3(0x206)])),_0x242fdb(0x3,_0x435600[_0x1f6fc3(0x1fb)](_0x435600['Injector']))],_0x1a82aa);const _0x367050='thread-comment-data-source.config',_0x5cbe9e={};var _0x267b1a=Object[_0x1f6fc3(0x1e0)],_0x164540=(_0x237c81,_0x43bb97,_0xebc046,_0x3bbc18)=>{const _0x4be1fd=_0x1f6fc3;for(var _0x31f367=_0x3bbc18>0x1?void 0x0:_0x3bbc18?_0x267b1a(_0x43bb97,_0xebc046):_0x43bb97,_0x36f177=_0x237c81[_0x4be1fd(0x1d5)]-0x1,_0x1505a8;_0x36f177>=0x0;_0x36f177--)(_0x1505a8=_0x237c81[_0x36f177])&&(_0x31f367=_0x1505a8(_0x31f367)||_0x31f367);return _0x31f367;},_0x32d71d=(_0x1348ea,_0x31d27e)=>(_0x41b405,_0xf98095)=>_0x31d27e(_0x41b405,_0xf98095,_0x1348ea);function _0x4fa0e8(_0x4abbc6,_0x45c9e9){const _0x32de5f=_0x1f6fc3,_0xdd5a42=_0x4abbc6[_0x32de5f(0x1c2)][0x0];return{..._0x45c9e9,'id':_0xdd5a42[_0x32de5f(0x1b4)],'resolved':_0x4abbc6[_0x32de5f(0x1da)]===0x1,'dT':_0x3f665d(_0xdd5a42[_0x32de5f(0x1ac)]),'personId':_0xdd5a42[_0x32de5f(0x1ef)],'threadId':_0xdd5a42[_0x32de5f(0x197)]};}function _0x6db5e8(_0x40ebe0,_0x12c510,_0x5e1d04){const _0x30b713=_0x1f6fc3;var _0x4fca45,_0x32ca64;if(((_0x32ca64=(_0x4fca45=_0x40ebe0==null?void 0x0:_0x40ebe0[_0x30b713(0x1c2)])==null?void 0x0:_0x4fca45[_0x30b713(0x1d5)])!=null?_0x32ca64:0x0)>0x0){const _0x2b1c6b=(_0xdb478c,_0x55e0dc)=>({'id':_0xdb478c['replyId'],'threadId':_0xdb478c[_0x30b713(0x197)],'dT':_0x3f665d(_0xdb478c[_0x30b713(0x1ac)]),'personId':_0xdb478c[_0x30b713(0x1ef)],'resolved':_0x40ebe0[_0x30b713(0x1da)]===_0xfd3de0[_0x30b713(0x1e7)],'unitId':_0x12c510,'subUnitId':_0x5e1d04,'text':JSON[_0x30b713(0x1b1)](_0xdb478c[_0x30b713(0x1e8)]),'parentId':_0x55e0dc}),_0x7afead=_0x2b1c6b(_0x40ebe0[_0x30b713(0x1c2)][0x0]);return{..._0x7afead,'children':_0x40ebe0[_0x30b713(0x1c2)][_0x30b713(0x19e)](0x1)[_0x30b713(0x1c4)](_0x4dd978=>_0x2b1c6b(_0x4dd978,_0x7afead['id']))};}return null;}let _0x3683b8=class{constructor(_0xfaa002,_0x1071b6,_0x50dd41){const _0x26a578=_0x1f6fc3;this['_httpService']=_0xfaa002,this[_0x26a578(0x1cd)]=_0x1071b6,this['_sessionService']=_0x50dd41;}async['addComment'](_0x488df2){const _0x4b4014=_0x1f6fc3;var _0x10fd55,_0x4b095e;const {parentId:_0x1d9de0,unitId:_0x3eaa22,text:_0x2f602e,threadId:_0x2b66e2}=_0x488df2,_0x3df81c=(_0x4b095e=(_0x10fd55=_0x2f602e[_0x4b4014(0x1cb)])==null?void 0x0:_0x10fd55[_0x4b4014(0x1a9)](_0x2f86ea=>_0x2f86ea[_0x4b4014(0x1ab)]===_0x435600[_0x4b4014(0x1d8)]['COMMENT'])[_0x4b4014(0x1c4)](_0x56b1e3=>_0x56b1e3[_0x4b4014(0x1d2)]))!=null?_0x4b095e:[],_0x10eacc=JSON['stringify'](_0x2f602e),_0x2969bb=(await this['_sessionService'][_0x4b4014(0x1f0)](_0x3eaa22))[_0x4b4014(0x1cc)]();if(_0x1d9de0){const _0x25c021={'memberId':_0x2969bb,'unitId':_0x3eaa22,'content':_0x10eacc,'mention':_0x3df81c,'threadId':_0x2b66e2},_0x506b2d=(await this['_httpService'][_0x4b4014(0x19a)](_0x4b4014(0x19f)+_0x3eaa22+'/reply',{'body':_0x25c021}))['body'][_0x4b4014(0x20c)];return{..._0x488df2,'id':_0x506b2d[_0x4b4014(0x1b4)],'dT':_0x435600[_0x4b4014(0x201)](+_0x506b2d[_0x4b4014(0x1ac)])['format'](_0x4b4014(0x1a8)),'personId':_0x506b2d['userId']};}else{const _0x2b146b={'memberId':_0x2969bb,'unitId':_0x3eaa22,'content':_0x10eacc,'mention':_0x3df81c},_0x3b68df=await this['_httpService'][_0x4b4014(0x19a)]('/universer-api/comment/unit/'+_0x3eaa22+'/add',{'body':_0x2b146b});return _0x4fa0e8(_0x3b68df['body'][_0x4b4014(0x208)],_0x488df2);}}async[_0x1f6fc3(0x1ea)](_0x114ae7){const _0x547e6a=_0x1f6fc3;var _0x208f85,_0x309776;const {text:_0x192851,unitId:_0xcdd8d}=_0x114ae7,_0x3393e5=(_0x309776=(_0x208f85=_0x192851[_0x547e6a(0x1cb)])==null?void 0x0:_0x208f85['filter'](_0xe20462=>_0xe20462[_0x547e6a(0x1ab)]===_0x435600[_0x547e6a(0x1d8)]['COMMENT'])[_0x547e6a(0x1c4)](_0x5bc7e3=>_0x5bc7e3['rangeId']))!=null?_0x309776:[],_0x19bed4=JSON[_0x547e6a(0x192)](_0x192851),_0x15a878=_0x114ae7['threadId'],_0x475021=_0x114ae7['id'],_0xa6307c={'memberId':(await this['_sessionService'][_0x547e6a(0x1f0)](_0xcdd8d))[_0x547e6a(0x1cc)](),'unitId':_0xcdd8d,'threadId':_0x15a878,'mention':_0x3393e5,'content':_0x19bed4,'replyId':_0x475021},_0x5c0893=await this[_0x547e6a(0x20e)][_0x547e6a(0x19a)](_0x547e6a(0x19f)+_0xcdd8d+_0x547e6a(0x1f3),{'body':_0xa6307c});return!_0x5c0893[_0x547e6a(0x1f5)]['error']||_0x5c0893[_0x547e6a(0x1f5)][_0x547e6a(0x1eb)]['code']===0x1;}async[_0x1f6fc3(0x1db)](_0x2596e3){const _0x35aee5=_0x1f6fc3,{unitId:_0x91ff31}=_0x2596e3,_0x4289f0=_0x2596e3['threadId'],_0x17835c={'memberId':this[_0x35aee5(0x1cd)][_0x35aee5(0x1ae)]()['userID'],'unitId':_0x91ff31,'threadId':_0x4289f0,'solved':_0x2596e3[_0x35aee5(0x209)]?_0xfd3de0[_0x35aee5(0x1e7)]:_0xfd3de0['OpenOrReOpen']},_0x1ce424=await this[_0x35aee5(0x20e)]['post'](_0x35aee5(0x19f)+_0x91ff31+'/solved',{'body':_0x17835c});return!_0x1ce424[_0x35aee5(0x1f5)]['error']||_0x1ce424[_0x35aee5(0x1f5)]['error'][_0x35aee5(0x1b8)]===0x1;}async[_0x1f6fc3(0x1e3)](_0x2cb1ba,_0x50fde4,_0x11fe0f,_0x158ccd){const _0x3a218a=_0x1f6fc3,_0x1ed6fc={'memberId':(await this[_0x3a218a(0x1c0)][_0x3a218a(0x1f0)](_0x2cb1ba))[_0x3a218a(0x1cc)](),'threadId':_0x11fe0f,'replyId':_0x158ccd,'unitId':_0x2cb1ba},_0x3a8723=await this[_0x3a218a(0x20e)]['post'](_0x3a218a(0x19f)+_0x2cb1ba+'/delete',{'body':_0x1ed6fc});return!_0x3a8723[_0x3a218a(0x1f5)][_0x3a218a(0x1eb)]||_0x3a8723[_0x3a218a(0x1f5)]['error']['code']===0x1;}async[_0x1f6fc3(0x1bd)](_0x33b18e,_0x1742ac,_0x2f4c83){const _0x161296=_0x1f6fc3,_0x173b29={'unitId':_0x33b18e,'threadId':_0x2f4c83},_0x1df30a=await this[_0x161296(0x20e)][_0x161296(0x19a)](_0x161296(0x19f)+_0x33b18e+_0x161296(0x1e6),{'body':_0x173b29}),_0x35fffc=_0x2f4c83[_0x161296(0x1c4)](_0x4bd645=>_0x6db5e8(_0x1df30a[_0x161296(0x1f5)][_0x161296(0x1b2)][_0x4bd645],_0x33b18e,_0x1742ac))[_0x161296(0x1a9)](Boolean);return Object['values'](_0x1df30a['body']['users'])['forEach'](_0x59026e=>{const _0x36e4cc=_0x161296;this[_0x36e4cc(0x1cd)]['addUser'](_0x59026e);}),_0x35fffc;}['saveCommentToSnapshot'](_0x5dee7a){const _0x46b7a6=_0x1f6fc3;return{'id':_0x5dee7a['id'],'threadId':_0x5dee7a['threadId'],'ref':_0x5dee7a[_0x46b7a6(0x20d)]};}};_0x3683b8=_0x164540([_0x32d71d(0x0,_0x435600[_0x1f6fc3(0x1fb)](_0x3721b3['HTTPService'])),_0x32d71d(0x1,_0x435600['Inject'](_0x435600[_0x1f6fc3(0x206)])),_0x32d71d(0x2,_0x435600[_0x1f6fc3(0x1fb)](_0x3109f9['CollaborationSessionService']))],_0x3683b8);var _0x36736f=Object[_0x1f6fc3(0x1e0)],_0x363087=(_0x43af3f,_0x5ca66a,_0x167516,_0x2a49b7)=>{const _0x1e8106=_0x1f6fc3;for(var _0x376fb5=_0x2a49b7>0x1?void 0x0:_0x2a49b7?_0x36736f(_0x5ca66a,_0x167516):_0x5ca66a,_0x3a7055=_0x43af3f[_0x1e8106(0x1d5)]-0x1,_0x27aed9;_0x3a7055>=0x0;_0x3a7055--)(_0x27aed9=_0x43af3f[_0x3a7055])&&(_0x376fb5=_0x27aed9(_0x376fb5)||_0x376fb5);return _0x376fb5;},_0x264034=(_0x1ee23a,_0x449b40)=>(_0x2a71fc,_0x4baf0c)=>_0x449b40(_0x2a71fc,_0x4baf0c,_0x1ee23a);let _0x3aaaac=class extends _0x435600[_0x1f6fc3(0x1c1)]{constructor(_0x24b16a,_0x4b207a){const _0x360c92=_0x1f6fc3;super(),this['_threadCommentDataSourceService']=_0x24b16a,this[_0x360c92(0x1c5)]=_0x4b207a,this[_0x360c92(0x1ce)]();}['_initDataSource'](){const _0x112e0d=_0x1f6fc3;this[_0x112e0d(0x199)][_0x112e0d(0x1fa)]=this[_0x112e0d(0x1c5)],this[_0x112e0d(0x199)][_0x112e0d(0x1ff)]=!0x1;}};_0x3aaaac=_0x363087([_0x264034(0x0,_0x43f7e7['IThreadCommentDataSourceService']),_0x264034(0x1,_0x435600[_0x1f6fc3(0x1fb)](_0x3683b8))],_0x3aaaac);var _0x11e073=Object[_0x1f6fc3(0x1b3)],_0x64d474=Object[_0x1f6fc3(0x1e0)],_0x11cf60=(_0x2d45dc,_0x197082,_0x4d0c26)=>_0x197082 in _0x2d45dc?_0x11e073(_0x2d45dc,_0x197082,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d0c26}):_0x2d45dc[_0x197082]=_0x4d0c26,_0x778891=(_0x256d18,_0x47aea8,_0x13411e,_0x4ef87b)=>{const _0x30d350=_0x1f6fc3;for(var _0x5332f1=_0x4ef87b>0x1?void 0x0:_0x4ef87b?_0x64d474(_0x47aea8,_0x13411e):_0x47aea8,_0x515ae3=_0x256d18[_0x30d350(0x1d5)]-0x1,_0x56f13a;_0x515ae3>=0x0;_0x515ae3--)(_0x56f13a=_0x256d18[_0x515ae3])&&(_0x5332f1=_0x56f13a(_0x5332f1)||_0x5332f1);return _0x5332f1;},_0x29bbb5=(_0x340bec,_0x5b218)=>(_0x2f48d7,_0x1e5975)=>_0x5b218(_0x2f48d7,_0x1e5975,_0x340bec),_0x14ff36=(_0x3b13d3,_0xefb412,_0x10dc89)=>_0x11cf60(_0x3b13d3,typeof _0xefb412!=_0x1f6fc3(0x193)?_0xefb412+'':_0xefb412,_0x10dc89);_0x5c66db[_0x1f6fc3(0x19b)]=class extends _0x435600['Plugin']{constructor(_0xe8ec2c=_0x5cbe9e,_0x12ea05,_0x44ec7b){const _0x4feccc=_0x1f6fc3;super(),this[_0x4feccc(0x1f7)]=_0xe8ec2c,this[_0x4feccc(0x1df)]=_0x12ea05,this[_0x4feccc(0x1d6)]=_0x44ec7b;const {..._0xd65366}=_0x435600[_0x4feccc(0x204)]({},_0x5cbe9e,this[_0x4feccc(0x1f7)]);this['_configService'][_0x4feccc(0x18d)](_0x367050,_0xd65366);}[_0x1f6fc3(0x1cf)](){[[_0x3683b8],[_0x3aaaac],[_0x1a82aa]]['forEach'](_0x470452=>{const _0x30e3dc=_0x3b71;this[_0x30e3dc(0x1df)][_0x30e3dc(0x1b9)](_0x470452);});}['onReady'](){const _0x3e9421=_0x1f6fc3;this[_0x3e9421(0x1df)][_0x3e9421(0x1f2)](_0x3aaaac),this['_injector'][_0x3e9421(0x1f2)](_0x1a82aa);}},_0x14ff36(_0x5c66db[_0x1f6fc3(0x19b)],'pluginName',_0x4f28d3),_0x14ff36(_0x5c66db[_0x1f6fc3(0x19b)],'type',_0x435600[_0x1f6fc3(0x205)][_0x1f6fc3(0x1bb)]),_0x5c66db[_0x1f6fc3(0x19b)]=_0x778891([_0x435600[_0x1f6fc3(0x1a1)](_0x430df1['UniverThreadCommentUIPlugin'],_0x3109f9[_0x1f6fc3(0x1a5)],_0x2c14ba[_0x1f6fc3(0x1ec)]),_0x29bbb5(0x1,_0x435600[_0x1f6fc3(0x1fb)](_0x435600[_0x1f6fc3(0x20a)])),_0x29bbb5(0x2,_0x435600[_0x1f6fc3(0x18c)])],_0x5c66db[_0x1f6fc3(0x19b)]),Object['defineProperty'](_0x5c66db,Symbol[_0x1f6fc3(0x1e2)],{'value':_0x1f6fc3(0x1fe)});}));function _0x3b71(_0x71f311,_0x4bae76){_0x71f311=_0x71f311-0x18c;const _0x142521=_0x1425();let _0x3b7100=_0x142521[_0x71f311];return _0x3b7100;}function _0x1425(){const _0x1bed01=['YYYY/MM/DD\x20HH:mm','filter','@univerjs/thread-comment-ui','rangeType','createTimestamp','unitId','getCurrentUser','pipe','amd','parse','comments','defineProperty','replyId','48iDhUxt','forEach','format','code','add','191984aIctUD','UNIVER_UNKNOWN','getUser','listComments','1867140cvOXed','size','_sessionService','Disposable','replies','Edit','map','_threadCommentDataSource','commentUpdate$','userID','72354guWpsz','UniverProLicense','@univerjs-pro/collaboration-client','customRanges','getMemberID','_userService','_initDataSource','onStarting','@univerjs/thread-comment','634017GGandI','rangeId','subscribe','UniverCore','length','_configService','321156vhQHDw','CustomRangeType','/universer-api/user/list','solved','resolveComment','@univerjs-pro/license','UniverThreadCommentUi','getComment','_injector','getOwnPropertyDescriptor','Reply','toStringTag','deleteComment','delete','Solve','/list','Solved','content','Unknown','updateComment','error','UniverLicensePlugin','_init','CommentService','userId','requireSession','rxjs','get','/edit','127266njJhfp','body','user','_config','UniverNetwork','@univerjs/network','dataSource','Inject','UNRECOGNIZED','disposeWithMe','Module','syncUpdateMutationToColla','function','dayjs','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','ThreadCommentModel','merge','UniverInstanceType','UserManagerService','bufferTime','comment','resolved','Injector','_commentService','reply','ref','_httpService','IConfigService','setConfig','_initUserSync','find','type','personId','stringify','symbol','addComment','Add','addUser','threadId','3014016pWgcqd','_threadCommentDataSourceService','post','UniverThreadCommentDataSourcePlugin','HTTPService','@univerjs/core','slice','/universer-api/comment/unit/','_threadCommentModel','DependentOn','126IOiHya','Delete','OpenOrReOpen','UniverCollaborationClientPlugin','exports','users'];_0x1425=function(){return _0x1bed01;};return _0x1425();}
|
|
1
|
+
(function(_0x6550cd,_0x2eb606){const _0x1d761e=_0x15ba,_0xc5ea97=_0x6550cd();while(!![]){try{const _0x5dd57e=-parseInt(_0x1d761e(0x1a5))/0x1+parseInt(_0x1d761e(0x171))/0x2*(parseInt(_0x1d761e(0x12f))/0x3)+parseInt(_0x1d761e(0x197))/0x4*(parseInt(_0x1d761e(0x15e))/0x5)+-parseInt(_0x1d761e(0x14e))/0x6*(parseInt(_0x1d761e(0x1a6))/0x7)+-parseInt(_0x1d761e(0x149))/0x8*(parseInt(_0x1d761e(0x1a4))/0x9)+-parseInt(_0x1d761e(0x175))/0xa+parseInt(_0x1d761e(0x12c))/0xb;if(_0x5dd57e===_0x2eb606)break;else _0xc5ea97['push'](_0xc5ea97['shift']());}catch(_0x13960d){_0xc5ea97['push'](_0xc5ea97['shift']());}}}(_0x5cb6,0xe64fb),function(_0x5ea73e,_0x20781c){const _0x48a8df=_0x15ba;typeof exports==_0x48a8df(0x19b)&&typeof module<'u'?_0x20781c(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==_0x48a8df(0x189)&&define[_0x48a8df(0x18f)]?define([_0x48a8df(0x18d),'@univerjs-pro/collaboration-client','@univerjs-pro/license','@univerjs/core',_0x48a8df(0x127),'@univerjs/thread-comment',_0x48a8df(0x15f),_0x48a8df(0x13b)],_0x20781c):(_0x5ea73e=typeof globalThis<'u'?globalThis:_0x5ea73e||self,_0x20781c(_0x5ea73e[_0x48a8df(0x140)]={},_0x5ea73e[_0x48a8df(0x157)],_0x5ea73e['UniverProLicense'],_0x5ea73e[_0x48a8df(0x18a)],_0x5ea73e[_0x48a8df(0x160)],_0x5ea73e[_0x48a8df(0x15c)],_0x5ea73e[_0x48a8df(0x15f)],_0x5ea73e[_0x48a8df(0x159)]));}(this,function(_0x3030e3,_0x4b21ca,_0x39a910,_0xf3e837,_0x4d34f3,_0x1ba242,_0x1b952c,_0x582645){'use strict';const _0x5696b7=_0x15ba;const _0x2c6c06=_0x5696b7(0x165);var _0x5a3be1=(_0x36909a=>(_0x36909a[_0x36909a[_0x5696b7(0x198)]=0x0]='OpenOrReOpen',_0x36909a[_0x36909a[_0x5696b7(0x17a)]=0x1]=_0x5696b7(0x17a),_0x36909a[_0x36909a[_0x5696b7(0x16c)]=-0x1]=_0x5696b7(0x16c),_0x36909a))(_0x5a3be1||{}),_0x345e42=(_0x95e09f=>(_0x95e09f[_0x95e09f[_0x5696b7(0x19d)]=0x0]=_0x5696b7(0x19d),_0x95e09f[_0x95e09f[_0x5696b7(0x135)]=0x1]=_0x5696b7(0x135),_0x95e09f[_0x95e09f[_0x5696b7(0x187)]=0x2]='Reply',_0x95e09f[_0x95e09f[_0x5696b7(0x177)]=0x3]=_0x5696b7(0x177),_0x95e09f[_0x95e09f[_0x5696b7(0x18b)]=0x4]=_0x5696b7(0x18b),_0x95e09f[_0x95e09f[_0x5696b7(0x191)]=0x5]=_0x5696b7(0x191),_0x95e09f[_0x95e09f['UNRECOGNIZED']=-0x1]=_0x5696b7(0x16c),_0x95e09f))(_0x345e42||{});const _0x13673c=_0x56710=>_0xf3e837[_0x5696b7(0x14d)](new Date(+_0x56710))[_0x5696b7(0x17b)](_0x5696b7(0x17f)),_0x11ea32=async(_0x5badde,_0x5cd8e4)=>{const _0x2490d7=_0x5696b7,_0x48f2b8=_0x5badde[_0x2490d7(0x16b)](_0xf3e837[_0x2490d7(0x132)]),_0x5124c4=_0x5badde[_0x2490d7(0x16b)](_0x582645[_0x2490d7(0x133)]);_0x5cd8e4[_0x2490d7(0x146)](_0x3d76c5=>{const _0x171825=_0x2490d7;_0x48f2b8[_0x171825(0x17d)](_0x3d76c5)&&_0x5cd8e4[_0x171825(0x16e)](_0x3d76c5);}),_0x5cd8e4['size']&&(await _0x5124c4[_0x2490d7(0x16b)](_0x2490d7(0x12a),{'params':{'userIDs':[..._0x5cd8e4]}}))[_0x2490d7(0x153)]['users'][_0x2490d7(0x146)](_0xd8c44f=>{const _0x1b63bf=_0x2490d7;_0xd8c44f&&_0x48f2b8[_0x1b63bf(0x17e)](_0xd8c44f);});};var _0x27188e=Object['getOwnPropertyDescriptor'],_0x52eae1=(_0x2270b8,_0x1df32f,_0x5a1edd,_0x464991)=>{for(var _0x4ea30d=_0x464991>0x1?void 0x0:_0x464991?_0x27188e(_0x1df32f,_0x5a1edd):_0x1df32f,_0x313a48=_0x2270b8['length']-0x1,_0x34c47b;_0x313a48>=0x0;_0x313a48--)(_0x34c47b=_0x2270b8[_0x313a48])&&(_0x4ea30d=_0x34c47b(_0x4ea30d)||_0x4ea30d);return _0x4ea30d;},_0x11270a=(_0x47fe00,_0x28116f)=>(_0x57922d,_0x520ec9)=>_0x28116f(_0x57922d,_0x520ec9,_0x47fe00);let _0x166c78=class extends _0xf3e837[_0x5696b7(0x156)]{constructor(_0x3f1495,_0x2d4d78,_0x4b2d0a,_0x5f3ab9){const _0x5822d4=_0x5696b7;super(),this[_0x5822d4(0x152)]=_0x3f1495,this['_threadCommentModel']=_0x2d4d78,this[_0x5822d4(0x14f)]=_0x4b2d0a,this[_0x5822d4(0x199)]=_0x5f3ab9,this[_0x5822d4(0x188)](),this[_0x5822d4(0x128)]();}[_0x5696b7(0x128)](){const _0x22704c=_0x5696b7;this[_0x22704c(0x167)](this[_0x22704c(0x12e)][_0x22704c(0x1a2)][_0x22704c(0x147)](_0x1b952c[_0x22704c(0x186)](0x10))[_0x22704c(0x16a)](_0x182182=>{const _0x42fbae=_0x22704c,_0x288c5c=new Set();_0x182182[_0x42fbae(0x146)](_0x29558b=>{const _0x169b3c=_0x42fbae;if(_0x29558b[_0x169b3c(0x13f)]==='add'){const _0x45063b=_0x29558b[_0x169b3c(0x164)]['personId'];_0x288c5c[_0x169b3c(0x15b)](_0x45063b);}}),_0x11ea32(this['_injector'],_0x288c5c);}));}[_0x5696b7(0x188)](){const _0x48c9ab=_0x5696b7;this['disposeWithMe'](this['_commentService'][_0x48c9ab(0x1a2)][_0x48c9ab(0x16a)](async _0x14fe3b=>{const _0x2df067=_0x48c9ab;var _0x167e1e,_0x15abe3,_0x4b9a73,_0x5e4953;const _0x24d0b8=(_0x167e1e=this[_0x2df067(0x12e)][_0x2df067(0x1a1)](_0x14fe3b[_0x2df067(0x155)])[_0x2df067(0x194)](_0x212605=>_0x212605[_0x2df067(0x141)]===_0x14fe3b['threadId']))==null?void 0x0:_0x167e1e[_0x2df067(0x1a3)];if(!_0x24d0b8)return;const {unitId:_0xdd0181,subUnitId:_0x131cbe}=_0x24d0b8;switch(_0x14fe3b[_0x2df067(0x172)]&&this[_0x2df067(0x14f)]['addUser'](_0x14fe3b[_0x2df067(0x172)]),_0x14fe3b[_0x2df067(0x13f)]){case _0x345e42[_0x2df067(0x135)]:break;case _0x345e42[_0x2df067(0x187)]:{this[_0x2df067(0x12e)][_0x2df067(0x143)](_0xdd0181,_0x131cbe,{'unitId':_0xdd0181,'subUnitId':_0x131cbe,'ref':'','id':_0x14fe3b[_0x2df067(0x131)],'dT':_0x13673c(+_0x14fe3b['createTimestamp']),'threadId':_0x14fe3b[_0x2df067(0x141)],'personId':(_0x4b9a73=(_0x15abe3=_0x14fe3b[_0x2df067(0x172)])==null?void 0x0:_0x15abe3[_0x2df067(0x13c)])!=null?_0x4b9a73:_0x14fe3b[_0x2df067(0x148)],'text':JSON[_0x2df067(0x16f)](_0x14fe3b[_0x2df067(0x151)]),'parentId':_0x24d0b8['id']});break;}case _0x345e42[_0x2df067(0x18b)]:{const _0x4e008b=this[_0x2df067(0x12e)]['getComment'](_0xdd0181,_0x131cbe,_0x14fe3b['replyId']);_0x4e008b&&_0x4e008b[_0x2df067(0x1a0)]&&this[_0x2df067(0x12e)][_0x2df067(0x192)](_0xdd0181,_0x131cbe,_0x14fe3b[_0x2df067(0x131)]);break;}case _0x345e42[_0x2df067(0x177)]:{this[_0x2df067(0x12e)][_0x2df067(0x129)](_0xdd0181,_0x131cbe,{'commentId':_0x14fe3b[_0x2df067(0x131)],'text':JSON[_0x2df067(0x16f)](_0x14fe3b[_0x2df067(0x151)])});break;}case _0x345e42['Solve']:{const _0x14203b=(_0x5e4953=this[_0x2df067(0x12e)]['getUnit'](_0x14fe3b['unitId'])['find'](_0x39744b=>_0x39744b[_0x2df067(0x141)]===_0x14fe3b[_0x2df067(0x141)]))==null?void 0x0:_0x5e4953['root'];_0x14203b&&this['_threadCommentModel']['resolveComment'](_0xdd0181,_0x131cbe,_0x14203b['id'],_0x14fe3b[_0x2df067(0x181)]===_0x5a3be1[_0x2df067(0x17a)]);break;}}}));}};_0x166c78=_0x52eae1([_0x11270a(0x0,_0xf3e837[_0x5696b7(0x176)](_0x4b21ca[_0x5696b7(0x19a)])),_0x11270a(0x1,_0xf3e837['Inject'](_0x1ba242[_0x5696b7(0x13d)])),_0x11270a(0x2,_0xf3e837[_0x5696b7(0x176)](_0xf3e837['UserManagerService'])),_0x11270a(0x3,_0xf3e837[_0x5696b7(0x176)](_0xf3e837[_0x5696b7(0x183)]))],_0x166c78);const _0x21e22f=_0x5696b7(0x195),_0x3c2b35={};var _0x5d48b9=Object[_0x5696b7(0x19f)],_0x4a8a0b=(_0xe42466,_0x3fd2dc,_0x455b39,_0x36774f)=>{for(var _0x9a409c=_0x36774f>0x1?void 0x0:_0x36774f?_0x5d48b9(_0x3fd2dc,_0x455b39):_0x3fd2dc,_0x5f4236=_0xe42466['length']-0x1,_0x566a2f;_0x5f4236>=0x0;_0x5f4236--)(_0x566a2f=_0xe42466[_0x5f4236])&&(_0x9a409c=_0x566a2f(_0x9a409c)||_0x9a409c);return _0x9a409c;},_0x1bf7aa=(_0x2dbde4,_0x1bc2e6)=>(_0x3321c9,_0x435e6a)=>_0x1bc2e6(_0x3321c9,_0x435e6a,_0x2dbde4);function _0x19252b(_0x4318ec,_0x40f306){const _0x216b1c=_0x5696b7,_0x9bea02=_0x4318ec[_0x216b1c(0x130)][0x0];return{..._0x40f306,'id':_0x9bea02[_0x216b1c(0x131)],'resolved':_0x4318ec[_0x216b1c(0x181)]===0x1,'dT':_0x13673c(_0x9bea02['createTimestamp']),'personId':_0x9bea02[_0x216b1c(0x148)],'threadId':_0x9bea02[_0x216b1c(0x141)]};}function _0x5c0df3(_0x19bbfa,_0x46d949,_0x1cd642){const _0xcda27c=_0x5696b7;var _0x34898e,_0x18b4b6;if(((_0x18b4b6=(_0x34898e=_0x19bbfa==null?void 0x0:_0x19bbfa['replies'])==null?void 0x0:_0x34898e['length'])!=null?_0x18b4b6:0x0)>0x0){const _0xb0149f=(_0x4ef017,_0x560f3f)=>({'id':_0x4ef017[_0xcda27c(0x131)],'threadId':_0x4ef017[_0xcda27c(0x141)],'dT':_0x13673c(_0x4ef017[_0xcda27c(0x169)]),'personId':_0x4ef017[_0xcda27c(0x148)],'resolved':_0x19bbfa[_0xcda27c(0x181)]===_0x5a3be1['Solved'],'unitId':_0x46d949,'subUnitId':_0x1cd642,'text':JSON['parse'](_0x4ef017['content']),'parentId':_0x560f3f}),_0x544745=_0xb0149f(_0x19bbfa[_0xcda27c(0x130)][0x0]);return{..._0x544745,'children':_0x19bbfa[_0xcda27c(0x130)][_0xcda27c(0x142)](0x1)[_0xcda27c(0x17c)](_0x2e7ede=>_0xb0149f(_0x2e7ede,_0x544745['id']))};}return null;}let _0x306148=class{constructor(_0x2a0bbd,_0x2b7e8b,_0xda57d4){const _0xf6c084=_0x5696b7;this[_0xf6c084(0x166)]=_0x2a0bbd,this[_0xf6c084(0x14f)]=_0x2b7e8b,this[_0xf6c084(0x138)]=_0xda57d4;}async[_0x5696b7(0x143)](_0x3dc416){const _0x24dea8=_0x5696b7;var _0x2782ff,_0xa6b69;const {parentId:_0x2e4142,unitId:_0x4f28d7,text:_0x337380,threadId:_0x4666cb}=_0x3dc416,_0x536ee4=(_0xa6b69=(_0x2782ff=_0x337380['customRanges'])==null?void 0x0:_0x2782ff['filter'](_0x335c23=>_0x335c23[_0x24dea8(0x193)]===_0xf3e837['CustomRangeType'][_0x24dea8(0x182)])[_0x24dea8(0x17c)](_0x2d1f7f=>_0x2d1f7f[_0x24dea8(0x13e)]))!=null?_0xa6b69:[],_0xedd2db=JSON['stringify'](_0x337380),_0x425038=(await this[_0x24dea8(0x138)][_0x24dea8(0x18c)](_0x4f28d7))['getMemberID']();if(_0x2e4142){const _0x4691e3={'memberId':_0x425038,'unitId':_0x4f28d7,'content':_0xedd2db,'mention':_0x536ee4,'threadId':_0x4666cb},_0xe7b8e7=(await this[_0x24dea8(0x166)]['post'](_0x24dea8(0x163)+_0x4f28d7+'/reply',{'body':_0x4691e3}))[_0x24dea8(0x153)][_0x24dea8(0x162)];return{..._0x3dc416,'id':_0xe7b8e7[_0x24dea8(0x131)],'dT':_0xf3e837['dayjs'](+_0xe7b8e7['createTimestamp'])[_0x24dea8(0x17b)](_0x24dea8(0x17f)),'personId':_0xe7b8e7['userId']};}else{const _0x5f5acf={'memberId':_0x425038,'unitId':_0x4f28d7,'content':_0xedd2db,'mention':_0x536ee4},_0x47adcd=await this[_0x24dea8(0x166)]['post'](_0x24dea8(0x163)+_0x4f28d7+_0x24dea8(0x145),{'body':_0x5f5acf});return _0x19252b(_0x47adcd[_0x24dea8(0x153)]['comment'],_0x3dc416);}}async['updateComment'](_0x4c7a9a){const _0x252cdf=_0x5696b7;var _0x42e865,_0x25d07d;const {text:_0x52273d,unitId:_0x34481b}=_0x4c7a9a,_0x52b3d8=(_0x25d07d=(_0x42e865=_0x52273d[_0x252cdf(0x161)])==null?void 0x0:_0x42e865[_0x252cdf(0x136)](_0x21334b=>_0x21334b[_0x252cdf(0x193)]===_0xf3e837[_0x252cdf(0x154)][_0x252cdf(0x182)])[_0x252cdf(0x17c)](_0x205f0d=>_0x205f0d[_0x252cdf(0x13e)]))!=null?_0x25d07d:[],_0x39602b=JSON['stringify'](_0x52273d),_0x58c1b=_0x4c7a9a['threadId'],_0x3bbfaa=_0x4c7a9a['id'],_0x36deca={'memberId':(await this[_0x252cdf(0x138)][_0x252cdf(0x18c)](_0x34481b))['getMemberID'](),'unitId':_0x34481b,'threadId':_0x58c1b,'mention':_0x52b3d8,'content':_0x39602b,'replyId':_0x3bbfaa},_0x103748=await this[_0x252cdf(0x166)][_0x252cdf(0x150)](_0x252cdf(0x163)+_0x34481b+_0x252cdf(0x139),{'body':_0x36deca});return!_0x103748[_0x252cdf(0x153)][_0x252cdf(0x158)]||_0x103748['body'][_0x252cdf(0x158)]['code']===0x1;}async[_0x5696b7(0x178)](_0x1c554e){const _0x5e5c2=_0x5696b7,{unitId:_0x1cad5f}=_0x1c554e,_0x1762c0=_0x1c554e[_0x5e5c2(0x141)],_0x575e45={'memberId':this[_0x5e5c2(0x14f)][_0x5e5c2(0x16d)]()[_0x5e5c2(0x13c)],'unitId':_0x1cad5f,'threadId':_0x1762c0,'solved':_0x1c554e[_0x5e5c2(0x1a7)]?_0x5a3be1[_0x5e5c2(0x17a)]:_0x5a3be1[_0x5e5c2(0x198)]},_0x252fef=await this['_httpService'][_0x5e5c2(0x150)](_0x5e5c2(0x163)+_0x1cad5f+_0x5e5c2(0x13a),{'body':_0x575e45});return!_0x252fef[_0x5e5c2(0x153)]['error']||_0x252fef[_0x5e5c2(0x153)][_0x5e5c2(0x158)]['code']===0x1;}async[_0x5696b7(0x192)](_0xfe8767,_0x38598f,_0x5eb1b6,_0x184ea1){const _0x54c1fb=_0x5696b7,_0x3804f1={'memberId':(await this[_0x54c1fb(0x138)][_0x54c1fb(0x18c)](_0xfe8767))['getMemberID'](),'threadId':_0x5eb1b6,'replyId':_0x184ea1,'unitId':_0xfe8767},_0x14332b=await this[_0x54c1fb(0x166)][_0x54c1fb(0x150)](_0x54c1fb(0x163)+_0xfe8767+_0x54c1fb(0x173),{'body':_0x3804f1});return!_0x14332b[_0x54c1fb(0x153)][_0x54c1fb(0x158)]||_0x14332b[_0x54c1fb(0x153)]['error']['code']===0x1;}async[_0x5696b7(0x179)](_0xa9b151,_0x135923,_0x1c1684){const _0x56cf82=_0x5696b7,_0x4703de={'unitId':_0xa9b151,'threadId':_0x1c1684},_0x21ef16=await this[_0x56cf82(0x166)]['post']('/universer-api/comment/unit/'+_0xa9b151+_0x56cf82(0x170),{'body':_0x4703de}),_0x38a1b7=_0x1c1684[_0x56cf82(0x17c)](_0x167696=>_0x5c0df3(_0x21ef16[_0x56cf82(0x153)]['comments'][_0x167696],_0xa9b151,_0x135923))[_0x56cf82(0x136)](Boolean);return Object['values'](_0x21ef16['body'][_0x56cf82(0x190)])[_0x56cf82(0x146)](_0xb2718a=>{const _0x298770=_0x56cf82;this['_userService'][_0x298770(0x17e)](_0xb2718a);}),_0x38a1b7;}['saveCommentToSnapshot'](_0x4dfc69){const _0x513504=_0x5696b7;return{'id':_0x4dfc69['id'],'threadId':_0x4dfc69[_0x513504(0x141)],'ref':_0x4dfc69[_0x513504(0x185)]};}};_0x306148=_0x4a8a0b([_0x1bf7aa(0x0,_0xf3e837[_0x5696b7(0x176)](_0x582645[_0x5696b7(0x133)])),_0x1bf7aa(0x1,_0xf3e837[_0x5696b7(0x176)](_0xf3e837[_0x5696b7(0x132)])),_0x1bf7aa(0x2,_0xf3e837[_0x5696b7(0x176)](_0x4b21ca[_0x5696b7(0x14b)]))],_0x306148);var _0x271b18=Object['getOwnPropertyDescriptor'],_0x49190f=(_0x3dcb0f,_0x2ac2ce,_0x538c39,_0x573f94)=>{const _0x5e49c7=_0x5696b7;for(var _0x4d836c=_0x573f94>0x1?void 0x0:_0x573f94?_0x271b18(_0x2ac2ce,_0x538c39):_0x2ac2ce,_0x8cd7cd=_0x3dcb0f[_0x5e49c7(0x196)]-0x1,_0x40d342;_0x8cd7cd>=0x0;_0x8cd7cd--)(_0x40d342=_0x3dcb0f[_0x8cd7cd])&&(_0x4d836c=_0x40d342(_0x4d836c)||_0x4d836c);return _0x4d836c;},_0x63cf87=(_0x2f94fc,_0x166b1f)=>(_0x4592e3,_0x300a28)=>_0x166b1f(_0x4592e3,_0x300a28,_0x2f94fc);let _0x561121=class extends _0xf3e837['Disposable']{constructor(_0x256854,_0x488ca7){const _0x14a100=_0x5696b7;super(),this[_0x14a100(0x14c)]=_0x256854,this[_0x14a100(0x12d)]=_0x488ca7,this[_0x14a100(0x180)]();}[_0x5696b7(0x180)](){const _0x444090=_0x5696b7;this[_0x444090(0x14c)][_0x444090(0x12b)]=this[_0x444090(0x12d)],this[_0x444090(0x14c)]['syncUpdateMutationToColla']=!0x1;}};_0x561121=_0x49190f([_0x63cf87(0x0,_0x1ba242[_0x5696b7(0x137)]),_0x63cf87(0x1,_0xf3e837[_0x5696b7(0x176)](_0x306148))],_0x561121);var _0xa4e1f0=Object['defineProperty'],_0x341afc=Object[_0x5696b7(0x19f)],_0x6d96e8=(_0x277830,_0x300906,_0xf45da6)=>_0x300906 in _0x277830?_0xa4e1f0(_0x277830,_0x300906,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf45da6}):_0x277830[_0x300906]=_0xf45da6,_0x3bd1ee=(_0x22f38b,_0x518c4a,_0x3c00c6,_0x41f6ec)=>{const _0x3379bd=_0x5696b7;for(var _0x12bf69=_0x41f6ec>0x1?void 0x0:_0x41f6ec?_0x341afc(_0x518c4a,_0x3c00c6):_0x518c4a,_0x58d7ac=_0x22f38b[_0x3379bd(0x196)]-0x1,_0x58e8fa;_0x58d7ac>=0x0;_0x58d7ac--)(_0x58e8fa=_0x22f38b[_0x58d7ac])&&(_0x12bf69=_0x58e8fa(_0x12bf69)||_0x12bf69);return _0x12bf69;},_0x3e4c9d=(_0x38f261,_0x32e982)=>(_0x179c9c,_0x510ba6)=>_0x32e982(_0x179c9c,_0x510ba6,_0x38f261),_0x5f0088=(_0x4eb085,_0x5a8226,_0x485513)=>_0x6d96e8(_0x4eb085,typeof _0x5a8226!='symbol'?_0x5a8226+'':_0x5a8226,_0x485513);_0x3030e3['UniverThreadCommentDataSourcePlugin']=class extends _0xf3e837['Plugin']{constructor(_0x35d621=_0x3c2b35,_0x67a318,_0x2e6db4){const _0x279b61=_0x5696b7;super(),this['_config']=_0x35d621,this['_injector']=_0x67a318,this[_0x279b61(0x18e)]=_0x2e6db4;const {..._0x30c316}=_0xf3e837['merge']({},_0x3c2b35,this['_config']);this[_0x279b61(0x18e)][_0x279b61(0x144)](_0x21e22f,_0x30c316);}['onStarting'](){[[_0x306148],[_0x561121],[_0x166c78]]['forEach'](_0x580514=>{const _0xd81108=_0x15ba;this[_0xd81108(0x199)][_0xd81108(0x15b)](_0x580514);});}[_0x5696b7(0x184)](){const _0x53a71d=_0x5696b7;this[_0x53a71d(0x199)][_0x53a71d(0x16b)](_0x561121),this[_0x53a71d(0x199)]['get'](_0x166c78);}},_0x5f0088(_0x3030e3['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x2c6c06),_0x5f0088(_0x3030e3[_0x5696b7(0x134)],_0x5696b7(0x13f),_0xf3e837[_0x5696b7(0x14a)][_0x5696b7(0x15a)]),_0x3030e3[_0x5696b7(0x134)]=_0x3bd1ee([_0xf3e837[_0x5696b7(0x19c)](_0x4d34f3['UniverThreadCommentUIPlugin'],_0x4b21ca['UniverCollaborationClientPlugin'],_0x39a910[_0x5696b7(0x174)]),_0x3e4c9d(0x1,_0xf3e837[_0x5696b7(0x176)](_0xf3e837[_0x5696b7(0x183)])),_0x3e4c9d(0x2,_0xf3e837[_0x5696b7(0x168)])],_0x3030e3[_0x5696b7(0x134)]),Object['defineProperty'](_0x3030e3,Symbol[_0x5696b7(0x15d)],{'value':_0x5696b7(0x19e)});}));function _0x15ba(_0x2f81b3,_0x385dfb){_0x2f81b3=_0x2f81b3-0x127;const _0x5cb612=_0x5cb6();let _0x15ba8f=_0x5cb612[_0x2f81b3];return _0x15ba8f;}function _0x5cb6(){const _0x5b3ed9=['/solved','@univerjs/network','userID','ThreadCommentModel','rangeId','type','UniverProThreadCommentDatasource','threadId','slice','addComment','setConfig','/add','forEach','pipe','userId','8768SaqAmt','UniverInstanceType','CollaborationSessionService','_threadCommentDataSourceService','dayjs','186OcwdcY','_userService','post','content','_commentService','body','CustomRangeType','unitId','Disposable','UniverProCollaborationClient','error','UniverNetwork','UNIVER_UNKNOWN','add','UniverThreadComment','toStringTag','19395uWJpgm','rxjs','UniverThreadCommentUi','customRanges','reply','/universer-api/comment/unit/','payload','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_httpService','disposeWithMe','IConfigService','createTimestamp','subscribe','get','UNRECOGNIZED','getCurrentUser','delete','parse','/list','10ywvzXw','user','/delete','UniverLicensePlugin','16103540zDUHGf','Inject','Edit','resolveComment','listComments','Solved','format','map','getUser','addUser','YYYY/MM/DD\x20HH:mm','_initDataSource','solved','COMMENT','Injector','onReady','ref','bufferTime','Reply','_init','function','UniverCore','Delete','requireSession','exports','_configService','amd','users','Solve','deleteComment','rangeType','find','thread-comment-data-source.config','length','1436ruTQpX','OpenOrReOpen','_injector','CommentService','object','DependentOn','Unknown','Module','getOwnPropertyDescriptor','parentId','getUnit','commentUpdate$','root','13779hoxkUf','1231907uTSKFW','66626CupMtI','resolved','@univerjs/thread-comment-ui','_initUserSync','updateComment','/universer-api/user/list','dataSource','36675254DnhVPD','_threadCommentDataSource','_threadCommentModel','619185CsdpRS','replies','replyId','UserManagerService','HTTPService','UniverThreadCommentDataSourcePlugin','Add','filter','IThreadCommentDataSourceService','_sessionService','/edit'];_0x5cb6=function(){return _0x5b3ed9;};return _0x5cb6();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.15.0-insiders.
|
|
3
|
+
"version": "0.15.0-insiders.20260106-79b11f9",
|
|
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/
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/network": "0.15.0-insiders.
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/thread-comment
|
|
53
|
-
"@univerjs-pro/
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/license": "0.15.0-insiders.20260106-79b11f9",
|
|
49
|
+
"@univerjs/protocol": "0.1.48",
|
|
50
|
+
"@univerjs/network": "0.15.0-insiders.20260106-79b11f9",
|
|
51
|
+
"@univerjs/core": "0.15.0-insiders.20260106-79b11f9",
|
|
52
|
+
"@univerjs/thread-comment": "0.15.0-insiders.20260106-79b11f9",
|
|
53
|
+
"@univerjs-pro/collaboration-client": "0.15.0-insiders.20260106-79b11f9",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.15.0-insiders.20260106-79b11f9"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
59
|
"vite": "^7.3.0",
|
|
60
60
|
"vitest": "^4.0.16",
|
|
61
|
-
"@univerjs-infra/shared": "0.
|
|
61
|
+
"@univerjs-infra/shared": "0.15.0"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|