@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505221607 → 0.7.0-nightly.202505241606
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x29ba3e=_0x42d2;(function(_0x5d45a6,_0x8cc893){const _0x2c1263=_0x42d2,_0x3c8d93=_0x5d45a6();while(!![]){try{const _0x424b78=-parseInt(_0x2c1263(0x175))/0x1*(-parseInt(_0x2c1263(0x193))/0x2)+-parseInt(_0x2c1263(0x18e))/0x3+parseInt(_0x2c1263(0x176))/0x4+parseInt(_0x2c1263(0x172))/0x5+-parseInt(_0x2c1263(0x1c9))/0x6*(-parseInt(_0x2c1263(0x181))/0x7)+parseInt(_0x2c1263(0x1b6))/0x8+-parseInt(_0x2c1263(0x16e))/0x9*(parseInt(_0x2c1263(0x185))/0xa);if(_0x424b78===_0x8cc893)break;else _0x3c8d93['push'](_0x3c8d93['shift']());}catch(_0x5e1c76){_0x3c8d93['push'](_0x3c8d93['shift']());}}}(_0x8817,0x82d21));Object[_0x29ba3e(0x163)](exports,Symbol[_0x29ba3e(0x1ac)],{'value':'Module'});const b=require(_0x29ba3e(0x1b1)),T=require(_0x29ba3e(0x190)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x29ba3e(0x15c)),U=_0x29ba3e(0x18d);var I=(_0x52631b=>(_0x52631b[_0x52631b[_0x29ba3e(0x1be)]=0x0]='OpenOrReOpen',_0x52631b[_0x52631b[_0x29ba3e(0x1b4)]=0x1]='Solved',_0x52631b[_0x52631b[_0x29ba3e(0x1a2)]=-0x1]=_0x29ba3e(0x1a2),_0x52631b))(I||{}),v=(_0x5c064d=>(_0x5c064d[_0x5c064d[_0x29ba3e(0x1bb)]=0x0]=_0x29ba3e(0x1bb),_0x5c064d[_0x5c064d[_0x29ba3e(0x18a)]=0x1]='Add',_0x5c064d[_0x5c064d[_0x29ba3e(0x1a8)]=0x2]=_0x29ba3e(0x1a8),_0x5c064d[_0x5c064d[_0x29ba3e(0x160)]=0x3]='Edit',_0x5c064d[_0x5c064d[_0x29ba3e(0x189)]=0x4]=_0x29ba3e(0x189),_0x5c064d[_0x5c064d[_0x29ba3e(0x18c)]=0x5]=_0x29ba3e(0x18c),_0x5c064d[_0x5c064d[_0x29ba3e(0x1a2)]=-0x1]='UNRECOGNIZED',_0x5c064d))(v||{});const f=_0x45bef4=>c[_0x29ba3e(0x15f)](new Date(+_0x45bef4))[_0x29ba3e(0x1ab)](_0x29ba3e(0x156)),R=async(_0x3ffed0,_0x205ba9)=>{const _0x11c995=_0x29ba3e,_0x381057=_0x3ffed0[_0x11c995(0x199)](c['UserManagerService']),_0x3a6d7c=_0x3ffed0[_0x11c995(0x199)](P[_0x11c995(0x184)]);_0x205ba9['forEach'](_0x5bc10b=>{const _0x2301c9=_0x11c995;_0x381057[_0x2301c9(0x168)](_0x5bc10b)&&_0x205ba9['delete'](_0x5bc10b);}),_0x205ba9[_0x11c995(0x170)]&&(await _0x3a6d7c['get'](_0x11c995(0x1a5),{'params':{'userIDs':[..._0x205ba9]}}))['body'][_0x11c995(0x16c)][_0x11c995(0x1c7)](_0x2ae752=>{_0x2ae752&&_0x381057['addUser'](_0x2ae752);});};var $=Object[_0x29ba3e(0x1b7)],E=(_0x2e2ab,_0x78d144,_0x16e023,_0x568d1a)=>{const _0x26e969=_0x29ba3e;for(var _0x1a63ff=_0x568d1a>0x1?void 0x0:_0x568d1a?$(_0x78d144,_0x16e023):_0x78d144,_0x4b529b=_0x2e2ab[_0x26e969(0x174)]-0x1,_0x8ec4d5;_0x4b529b>=0x0;_0x4b529b--)(_0x8ec4d5=_0x2e2ab[_0x4b529b])&&(_0x1a63ff=_0x8ec4d5(_0x1a63ff)||_0x1a63ff);return _0x1a63ff;},S=(_0x3400d1,_0x313575)=>(_0x315a61,_0x151635)=>_0x313575(_0x315a61,_0x151635,_0x3400d1);let p=class extends c[_0x29ba3e(0x198)]{constructor(_0x18ee51,_0x4c5f64,_0x4517d1,_0x4632dd){const _0x23e5a1=_0x29ba3e;super(),this[_0x23e5a1(0x159)]=_0x18ee51,this['_threadCommentModel']=_0x4c5f64,this[_0x23e5a1(0x1b3)]=_0x4517d1,this[_0x23e5a1(0x16f)]=_0x4632dd,this[_0x23e5a1(0x165)](),this['_initUserSync']();}['_initUserSync'](){const _0x5dfcaa=_0x29ba3e;this[_0x5dfcaa(0x1c4)](this[_0x5dfcaa(0x1c6)]['commentUpdate$'][_0x5dfcaa(0x191)](w['bufferTime'](0x10))[_0x5dfcaa(0x1b0)](_0x587042=>{const _0x1e65b8=_0x5dfcaa,_0x499d3c=new Set();_0x587042[_0x1e65b8(0x1c7)](_0x22bfa0=>{const _0x4f1faf=_0x1e65b8;switch(_0x22bfa0[_0x4f1faf(0x19a)]){case _0x4f1faf(0x19f):{const _0x1de6ca=_0x22bfa0[_0x4f1faf(0x173)]['personId'];_0x499d3c[_0x4f1faf(0x19f)](_0x1de6ca);break;}}}),R(this['_injector'],_0x499d3c);}));}[_0x29ba3e(0x165)](){const _0x367f1c=_0x29ba3e;this['disposeWithMe'](this[_0x367f1c(0x159)][_0x367f1c(0x153)][_0x367f1c(0x1b0)](async _0x287429=>{const _0x599086=_0x367f1c;var _0x3c687d,_0x5eb102,_0x26c427,_0x4ba7c4;const _0x2e51ec=(_0x3c687d=this['_threadCommentModel']['getUnit'](_0x287429[_0x599086(0x179)])[_0x599086(0x19c)](_0xb737ec=>_0xb737ec[_0x599086(0x1a6)]===_0x287429[_0x599086(0x1a6)]))==null?void 0x0:_0x3c687d['root'];if(!_0x2e51ec)return;const {unitId:_0x136fb5,subUnitId:_0x40e679}=_0x2e51ec;switch(_0x287429[_0x599086(0x167)]&&this[_0x599086(0x1b3)][_0x599086(0x1b9)](_0x287429[_0x599086(0x167)]),_0x287429[_0x599086(0x19a)]){case v['Add']:break;case v['Reply']:{this[_0x599086(0x1c6)][_0x599086(0x17b)](_0x136fb5,_0x40e679,{'unitId':_0x136fb5,'subUnitId':_0x40e679,'ref':'','id':_0x287429['replyId'],'dT':f(+_0x287429['createTimestamp']),'threadId':_0x287429[_0x599086(0x1a6)],'personId':(_0x26c427=(_0x5eb102=_0x287429[_0x599086(0x167)])==null?void 0x0:_0x5eb102[_0x599086(0x187)])!=null?_0x26c427:_0x287429[_0x599086(0x197)],'text':JSON['parse'](_0x287429[_0x599086(0x1a9)]),'parentId':_0x2e51ec['id']});break;}case v[_0x599086(0x189)]:{const _0xa24e4e=this['_threadCommentModel']['getComment'](_0x136fb5,_0x40e679,_0x287429[_0x599086(0x1ba)]);_0xa24e4e&&_0xa24e4e[_0x599086(0x157)]&&this[_0x599086(0x1c6)][_0x599086(0x195)](_0x136fb5,_0x40e679,_0x287429['replyId']);break;}case v[_0x599086(0x160)]:{this[_0x599086(0x1c6)][_0x599086(0x18b)](_0x136fb5,_0x40e679,{'commentId':_0x287429[_0x599086(0x1ba)],'text':JSON['parse'](_0x287429[_0x599086(0x1a9)])});break;}case v[_0x599086(0x18c)]:{const _0x28d01f=(_0x4ba7c4=this[_0x599086(0x1c6)][_0x599086(0x1bc)](_0x287429[_0x599086(0x179)])['find'](_0x101927=>_0x101927['threadId']===_0x287429[_0x599086(0x1a6)]))==null?void 0x0:_0x4ba7c4[_0x599086(0x1bd)];_0x28d01f&&this[_0x599086(0x1c6)][_0x599086(0x166)](_0x136fb5,_0x40e679,_0x28d01f['id'],_0x287429[_0x599086(0x17e)]===I[_0x599086(0x1b4)]);break;}}}));}};p=E([S(0x0,c[_0x29ba3e(0x1ad)](b['CommentService'])),S(0x1,c[_0x29ba3e(0x1ad)](M[_0x29ba3e(0x16b)])),S(0x2,c['Inject'](c[_0x29ba3e(0x194)])),S(0x3,c[_0x29ba3e(0x1ad)](c[_0x29ba3e(0x1b2)]))],p);const q=_0x29ba3e(0x158),D={};var A=Object[_0x29ba3e(0x1b7)],x=(_0x527584,_0x4cd8ba,_0x5cb583,_0x109986)=>{const _0x4f9734=_0x29ba3e;for(var _0x31ddce=_0x109986>0x1?void 0x0:_0x109986?A(_0x4cd8ba,_0x5cb583):_0x4cd8ba,_0xbc1539=_0x527584[_0x4f9734(0x174)]-0x1,_0x192794;_0xbc1539>=0x0;_0xbc1539--)(_0x192794=_0x527584[_0xbc1539])&&(_0x31ddce=_0x192794(_0x31ddce)||_0x31ddce);return _0x31ddce;},_=(_0x37100c,_0x46f863)=>(_0x3820d2,_0x115cac)=>_0x46f863(_0x3820d2,_0x115cac,_0x37100c);function Y(_0x4b13e7,_0x559fd4){const _0x4a0711=_0x29ba3e,_0x5f43bc=_0x4b13e7[_0x4a0711(0x188)][0x0];return{..._0x559fd4,'id':_0x5f43bc[_0x4a0711(0x1ba)],'resolved':_0x4b13e7[_0x4a0711(0x17e)]===0x1,'dT':f(_0x5f43bc[_0x4a0711(0x1a3)]),'personId':_0x5f43bc[_0x4a0711(0x197)],'threadId':_0x5f43bc['threadId']};}function _0x42d2(_0x51c127,_0xe29ca6){const _0x881725=_0x8817();return _0x42d2=function(_0x42d236,_0x111f92){_0x42d236=_0x42d236-0x153;let _0x2865af=_0x881725[_0x42d236];return _0x2865af;},_0x42d2(_0x51c127,_0xe29ca6);}function G(_0x5f2fba,_0x2e0ea,_0x3922d2){const _0x149fee=_0x29ba3e;var _0x4a2923,_0x35e003;if(((_0x35e003=(_0x4a2923=_0x5f2fba==null?void 0x0:_0x5f2fba[_0x149fee(0x188)])==null?void 0x0:_0x4a2923[_0x149fee(0x174)])!=null?_0x35e003:0x0)>0x0){const _0x515348=(_0x3d7c57,_0x20cb50)=>({'id':_0x3d7c57[_0x149fee(0x1ba)],'threadId':_0x3d7c57[_0x149fee(0x1a6)],'dT':f(_0x3d7c57['createTimestamp']),'personId':_0x3d7c57[_0x149fee(0x197)],'resolved':_0x5f2fba['solved']===I[_0x149fee(0x1b4)],'unitId':_0x2e0ea,'subUnitId':_0x3922d2,'text':JSON[_0x149fee(0x1ae)](_0x3d7c57[_0x149fee(0x1a9)]),'parentId':_0x20cb50}),_0x56ec88=_0x515348(_0x5f2fba[_0x149fee(0x188)][0x0]);return{..._0x56ec88,'children':_0x5f2fba[_0x149fee(0x188)]['slice'](0x1)['map'](_0xbf0aa4=>_0x515348(_0xbf0aa4,_0x56ec88['id']))};}return null;}let g=class{constructor(_0x5b1acf,_0x4d9ea7,_0x407894,_0x3b77b7){const _0x29b49f=_0x29ba3e;this[_0x29b49f(0x1a7)]=_0x5b1acf,this[_0x29b49f(0x1b3)]=_0x4d9ea7,this[_0x29b49f(0x15a)]=_0x407894,this[_0x29b49f(0x16f)]=_0x3b77b7;}async[_0x29ba3e(0x17b)](_0x22c0b1){const _0x37af6d=_0x29ba3e;var _0x3391f4,_0x3110f0;const {parentId:_0x38d3b6,unitId:_0x1e3dbb,text:_0x22f85f,threadId:_0xcc623c}=_0x22c0b1,_0x4b70b8=(_0x3110f0=(_0x3391f4=_0x22f85f['customRanges'])==null?void 0x0:_0x3391f4[_0x37af6d(0x19b)](_0x453b89=>_0x453b89[_0x37af6d(0x15b)]===c[_0x37af6d(0x19d)][_0x37af6d(0x1c8)])['map'](_0x159e80=>_0x159e80[_0x37af6d(0x196)]))!=null?_0x3110f0:[],_0xc50bb8=JSON['stringify'](_0x22f85f),_0x59a5ac=(await this[_0x37af6d(0x15a)]['requireSession'](_0x1e3dbb))[_0x37af6d(0x16a)]();if(_0x38d3b6){const _0x1ecaad={'memberId':_0x59a5ac,'unitId':_0x1e3dbb,'content':_0xc50bb8,'mention':_0x4b70b8,'threadId':_0xcc623c},_0x57a297=(await this[_0x37af6d(0x1a7)]['post']('/universer-api/comment/unit/'+_0x1e3dbb+'/reply',{'body':_0x1ecaad}))[_0x37af6d(0x1a0)]['reply'];return{..._0x22c0b1,'id':_0x57a297['replyId'],'dT':c[_0x37af6d(0x15f)](+_0x57a297[_0x37af6d(0x1a3)])[_0x37af6d(0x1ab)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x57a297['userId']};}else{const _0xda3c93={'memberId':_0x59a5ac,'unitId':_0x1e3dbb,'content':_0xc50bb8,'mention':_0x4b70b8},_0x3e2684=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x1e3dbb+_0x37af6d(0x178),{'body':_0xda3c93});return Y(_0x3e2684[_0x37af6d(0x1a0)][_0x37af6d(0x180)],_0x22c0b1);}}async['updateComment'](_0x1fb8ce){const _0x46289b=_0x29ba3e;var _0x4cbd7b,_0x5492fb;const {text:_0x49c924,unitId:_0x3bc5db}=_0x1fb8ce,_0x1a885d=(_0x5492fb=(_0x4cbd7b=_0x49c924['customRanges'])==null?void 0x0:_0x4cbd7b[_0x46289b(0x19b)](_0x536682=>_0x536682[_0x46289b(0x15b)]===c['CustomRangeType'][_0x46289b(0x1c8)])[_0x46289b(0x192)](_0x35affc=>_0x35affc[_0x46289b(0x196)]))!=null?_0x5492fb:[],_0x34edbe=JSON[_0x46289b(0x16d)](_0x49c924),_0xa6c5ba=_0x1fb8ce[_0x46289b(0x1a6)],_0x231ae8=_0x1fb8ce['id'],_0x138f09={'memberId':(await this[_0x46289b(0x15a)]['requireSession'](_0x3bc5db))[_0x46289b(0x16a)](),'unitId':_0x3bc5db,'threadId':_0xa6c5ba,'mention':_0x1a885d,'content':_0x34edbe,'replyId':_0x231ae8},_0x30dd91=await this[_0x46289b(0x1a7)][_0x46289b(0x17f)]('/universer-api/comment/unit/'+_0x3bc5db+_0x46289b(0x161),{'body':_0x138f09});return!_0x30dd91[_0x46289b(0x1a0)]['error']||_0x30dd91[_0x46289b(0x1a0)]['error']['code']===0x1;}async[_0x29ba3e(0x166)](_0x268390){const _0x4c2cc8=_0x29ba3e,{unitId:_0x50aee9}=_0x268390,_0x34580d=_0x268390[_0x4c2cc8(0x1a6)],_0x1e420c={'memberId':this['_userService']['getCurrentUser']()[_0x4c2cc8(0x187)],'unitId':_0x50aee9,'threadId':_0x34580d,'solved':_0x268390[_0x4c2cc8(0x1b8)]?I[_0x4c2cc8(0x1b4)]:I[_0x4c2cc8(0x1be)]},_0xab983=await this[_0x4c2cc8(0x1a7)][_0x4c2cc8(0x17f)](_0x4c2cc8(0x15e)+_0x50aee9+_0x4c2cc8(0x154),{'body':_0x1e420c});return!_0xab983[_0x4c2cc8(0x1a0)]['error']||_0xab983[_0x4c2cc8(0x1a0)]['error']['code']===0x1;}async[_0x29ba3e(0x195)](_0x338e58,_0x1b8299,_0x244d52,_0x340385){const _0x3d3794=_0x29ba3e,_0x3e8244={'memberId':(await this[_0x3d3794(0x15a)][_0x3d3794(0x183)](_0x338e58))[_0x3d3794(0x16a)](),'threadId':_0x244d52,'replyId':_0x340385,'unitId':_0x338e58},_0x926209=await this[_0x3d3794(0x1a7)][_0x3d3794(0x17f)]('/universer-api/comment/unit/'+_0x338e58+_0x3d3794(0x186),{'body':_0x3e8244});return!_0x926209[_0x3d3794(0x1a0)][_0x3d3794(0x1af)]||_0x926209['body'][_0x3d3794(0x1af)][_0x3d3794(0x1c1)]===0x1;}async[_0x29ba3e(0x17d)](_0x2abea5,_0x10e06e,_0x5216d4){const _0x3b600c=_0x29ba3e,_0x157346={'unitId':_0x2abea5,'threadId':_0x5216d4},_0x141444=await this[_0x3b600c(0x1a7)]['post'](_0x3b600c(0x15e)+_0x2abea5+_0x3b600c(0x1c0),{'body':_0x157346}),_0x5b0e5d=_0x5216d4[_0x3b600c(0x192)](_0x1503be=>G(_0x141444[_0x3b600c(0x1a0)][_0x3b600c(0x18f)][_0x1503be],_0x2abea5,_0x10e06e))[_0x3b600c(0x19b)](Boolean);return Object['values'](_0x141444[_0x3b600c(0x1a0)][_0x3b600c(0x16c)])[_0x3b600c(0x1c7)](_0x3b5b56=>{const _0x511c95=_0x3b600c;this[_0x511c95(0x1b3)][_0x511c95(0x1b9)](_0x3b5b56);}),_0x5b0e5d;}[_0x29ba3e(0x19e)](_0x47e4ce){const _0x5ba665=_0x29ba3e;return{'id':_0x47e4ce['id'],'threadId':_0x47e4ce[_0x5ba665(0x1a6)],'ref':_0x47e4ce[_0x5ba665(0x15d)]};}};g=x([_(0x0,c[_0x29ba3e(0x1ad)](P[_0x29ba3e(0x184)])),_(0x1,c[_0x29ba3e(0x1ad)](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x29ba3e(0x1bf)])),_(0x3,c[_0x29ba3e(0x1ad)](c[_0x29ba3e(0x1b2)]))],g);var H=Object[_0x29ba3e(0x1b7)],J=(_0x56d558,_0x432744,_0x3578f0,_0x397593)=>{const _0x3b2071=_0x29ba3e;for(var _0x38c00e=_0x397593>0x1?void 0x0:_0x397593?H(_0x432744,_0x3578f0):_0x432744,_0x28340d=_0x56d558[_0x3b2071(0x174)]-0x1,_0x37b19f;_0x28340d>=0x0;_0x28340d--)(_0x37b19f=_0x56d558[_0x28340d])&&(_0x38c00e=_0x37b19f(_0x38c00e)||_0x38c00e);return _0x38c00e;},y=(_0x1b439a,_0x23a21b)=>(_0x175ee7,_0x2b492f)=>_0x23a21b(_0x175ee7,_0x2b492f,_0x1b439a);let C=class extends c[_0x29ba3e(0x198)]{constructor(_0x44d03b,_0x1211a8){const _0xb1f8fe=_0x29ba3e;super(),this[_0xb1f8fe(0x162)]=_0x44d03b,this['_threadCommentDataSource']=_0x1211a8,this[_0xb1f8fe(0x164)]();}[_0x29ba3e(0x164)](){const _0x5274ba=_0x29ba3e;this[_0x5274ba(0x162)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x5274ba(0x155)]=!0x1;}};function _0x8817(){const _0x1cdb8f=['stringify','15669QvepVh','_injector','size','_configService','4843100SmhNeW','payload','length','6OLXrZG','1511332iOrfQb','_config','/add','unitId','UniverThreadCommentDataSourcePlugin','addComment','pluginName','listComments','solved','post','comment','2908997tvCAHe','UniverInstanceType','requireSession','HTTPService','10690QZuzYO','/delete','userID','replies','Delete','Add','updateComment','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','792288YHcSzi','comments','@univerjs-pro/license','pipe','map','135444nBLfKj','UserManagerService','deleteComment','rangeId','userId','Disposable','get','type','filter','find','CustomRangeType','saveCommentToSnapshot','add','body','UniverCollaborationClientPlugin','UNRECOGNIZED','createTimestamp','DependentOn','/universer-api/user/list','threadId','_httpService','Reply','content','onReady','format','toStringTag','Inject','parse','error','subscribe','@univerjs-pro/collaboration-client','Injector','_userService','Solved','setConfig','3941680chATMC','getOwnPropertyDescriptor','resolved','addUser','replyId','Unknown','getUnit','root','OpenOrReOpen','CollaborationSessionService','/list','code','UNIVER_UNKNOWN','onStarting','disposeWithMe','UniverThreadCommentUIPlugin','_threadCommentModel','forEach','COMMENT','6RxzXyX','commentUpdate$','/solved','syncUpdateMutationToColla','YYYY/MM/DD\x20HH:mm','parentId','thread-comment-data-source.config','_commentService','_sessionService','rangeType','@univerjs/network','ref','/universer-api/comment/unit/','dayjs','Edit','/edit','_threadCommentDataSourceService','defineProperty','_initDataSource','_init','resolveComment','user','getUser','Plugin','getMemberID','ThreadCommentModel','users'];_0x8817=function(){return _0x1cdb8f;};return _0x8817();}C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x29ba3e(0x1ad)](g))],C);var F=Object[_0x29ba3e(0x163)],L=Object[_0x29ba3e(0x1b7)],Z=(_0x1cea6a,_0x4d17ba,_0x1ef833)=>_0x4d17ba in _0x1cea6a?F(_0x1cea6a,_0x4d17ba,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1ef833}):_0x1cea6a[_0x4d17ba]=_0x1ef833,W=(_0xb01c79,_0x43434f,_0x5b4263,_0x242243)=>{const _0x4ec4b0=_0x29ba3e;for(var _0x35e6d0=_0x242243>0x1?void 0x0:_0x242243?L(_0x43434f,_0x5b4263):_0x43434f,_0x509ddc=_0xb01c79[_0x4ec4b0(0x174)]-0x1,_0x110e25;_0x509ddc>=0x0;_0x509ddc--)(_0x110e25=_0xb01c79[_0x509ddc])&&(_0x35e6d0=_0x110e25(_0x35e6d0)||_0x35e6d0);return _0x35e6d0;},O=(_0x3b9d12,_0x4856d6)=>(_0x39deb1,_0x1dc8c7)=>_0x4856d6(_0x39deb1,_0x1dc8c7,_0x3b9d12),N=(_0x4ae883,_0x2b2c66,_0x2c6642)=>Z(_0x4ae883,typeof _0x2b2c66!='symbol'?_0x2b2c66+'':_0x2b2c66,_0x2c6642);exports[_0x29ba3e(0x17a)]=class extends c[_0x29ba3e(0x169)]{constructor(_0x48f3e3=D,_0x10944d,_0xa8d975){const _0x19c68e=_0x29ba3e;super(),this[_0x19c68e(0x177)]=_0x48f3e3,this[_0x19c68e(0x16f)]=_0x10944d,this[_0x19c68e(0x171)]=_0xa8d975;const {..._0x1fe772}=c['merge']({},D,this['_config']);this[_0x19c68e(0x171)][_0x19c68e(0x1b5)](q,_0x1fe772);}[_0x29ba3e(0x1c3)](){const _0x29c652=_0x29ba3e;[[g],[C],[p]][_0x29c652(0x1c7)](_0x39bd34=>{const _0x19515c=_0x29c652;this[_0x19515c(0x16f)][_0x19515c(0x19f)](_0x39bd34);});}[_0x29ba3e(0x1aa)](){const _0x8b9e61=_0x29ba3e;this['_injector'][_0x8b9e61(0x199)](C),this['_injector'][_0x8b9e61(0x199)](p);}},N(exports[_0x29ba3e(0x17a)],_0x29ba3e(0x17c),U),N(exports[_0x29ba3e(0x17a)],_0x29ba3e(0x19a),c[_0x29ba3e(0x182)][_0x29ba3e(0x1c2)]),exports[_0x29ba3e(0x17a)]=W([c[_0x29ba3e(0x1a4)](j[_0x29ba3e(0x1c5)],b[_0x29ba3e(0x1a1)],T['UniverLicensePlugin']),O(0x1,c[_0x29ba3e(0x1ad)](c['Injector'])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x444990=_0x4014;function _0x4014(_0x1f8217,_0x35ab7f){const _0x4e0e8c=_0x4e0e();return _0x4014=function(_0x401498,_0x45de70){_0x401498=_0x401498-0x13c;let _0x349ca9=_0x4e0e8c[_0x401498];return _0x349ca9;},_0x4014(_0x1f8217,_0x35ab7f);}(function(_0x221fca,_0x1f6e29){const _0x33b3e3=_0x4014,_0x4efeec=_0x221fca();while(!![]){try{const _0x12fb78=parseInt(_0x33b3e3(0x161))/0x1*(-parseInt(_0x33b3e3(0x146))/0x2)+parseInt(_0x33b3e3(0x173))/0x3*(-parseInt(_0x33b3e3(0x13c))/0x4)+parseInt(_0x33b3e3(0x18b))/0x5*(-parseInt(_0x33b3e3(0x19e))/0x6)+-parseInt(_0x33b3e3(0x160))/0x7+parseInt(_0x33b3e3(0x148))/0x8*(parseInt(_0x33b3e3(0x13e))/0x9)+-parseInt(_0x33b3e3(0x1a4))/0xa*(-parseInt(_0x33b3e3(0x182))/0xb)+parseInt(_0x33b3e3(0x141))/0xc*(parseInt(_0x33b3e3(0x186))/0xd);if(_0x12fb78===_0x1f6e29)break;else _0x4efeec['push'](_0x4efeec['shift']());}catch(_0x11ea45){_0x4efeec['push'](_0x4efeec['shift']());}}}(_0x4e0e,0x9c2bd));Object[_0x444990(0x17f)](exports,Symbol[_0x444990(0x1a2)],{'value':_0x444990(0x1b4)});function _0x4e0e(){const _0x4c82c6=['CommentService','_threadCommentDataSource','merge','symbol','rangeId','userID','Solved','content','get','stringify','solved','getCurrentUser','@univerjs/network','3989174woVEwf','546283iBmdsx','/solved','rxjs','_threadCommentModel','dayjs','post','replyId','deleteComment','root','subscribe','pluginName','UniverThreadCommentDataSourcePlugin','comments','@univerjs-pro/license','find','forEach','COMMENT','error','3TqwWkc','onStarting','values','CollaborationSessionService','UniverThreadCommentUIPlugin','filter','/add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','IThreadCommentDataSourceService','length','UNRECOGNIZED','defineProperty','unitId','YYYY/MM/DD\x20HH:mm','477884qXyLus','Unknown','user','UserManagerService','4616573LUqmPP','IConfigService','@univerjs-pro/collaboration-client','HTTPService','UniverCollaborationClientPlugin','93580oTUwtn','updateComment','onReady','getComment','_userService','resolveComment','Disposable','Inject','resolved','replies','/edit','/list','UniverInstanceType','Solve','_httpService','@univerjs/core','_config','users','map','42DhWtRS','dataSource','userId','getMemberID','toStringTag','threadId','190TgwgDd','addUser','getOwnPropertyDescriptor','/delete','Add','Injector','UniverLicensePlugin','thread-comment-data-source.config','CustomRangeType','/reply','/universer-api/comment/unit/','body','Delete','_commentService','Plugin','_configService','Module','comment','reply','_initUserSync','rangeType','@univerjs/thread-comment','format','customRanges','commentUpdate$','_injector','5093068EcNZzn','createTimestamp','36WPWLjF','getUnit','delete','60zfhwGE','disposeWithMe','Reply','payload','setConfig','2euAjwZ','_threadCommentDataSourceService','1118160lNSrne','_sessionService','type','_init','parse','code','Edit','OpenOrReOpen','_initDataSource','/universer-api/user/list','addComment'];_0x4e0e=function(){return _0x4c82c6;};return _0x4e0e();}const b=require(_0x444990(0x188)),T=require(_0x444990(0x16e)),c=require(_0x444990(0x19a)),j=require('@univerjs/thread-comment-ui'),M=require(_0x444990(0x1b9)),w=require(_0x444990(0x163)),P=require(_0x444990(0x15f)),U=_0x444990(0x17a);var I=(_0x4c3320=>(_0x4c3320[_0x4c3320['OpenOrReOpen']=0x0]=_0x444990(0x14f),_0x4c3320[_0x4c3320[_0x444990(0x159)]=0x1]=_0x444990(0x159),_0x4c3320[_0x4c3320[_0x444990(0x17e)]=-0x1]='UNRECOGNIZED',_0x4c3320))(I||{}),v=(_0x31bf7a=>(_0x31bf7a[_0x31bf7a[_0x444990(0x183)]=0x0]=_0x444990(0x183),_0x31bf7a[_0x31bf7a[_0x444990(0x1a8)]=0x1]=_0x444990(0x1a8),_0x31bf7a[_0x31bf7a[_0x444990(0x143)]=0x2]=_0x444990(0x143),_0x31bf7a[_0x31bf7a['Edit']=0x3]=_0x444990(0x14e),_0x31bf7a[_0x31bf7a['Delete']=0x4]=_0x444990(0x1b0),_0x31bf7a[_0x31bf7a[_0x444990(0x198)]=0x5]=_0x444990(0x198),_0x31bf7a[_0x31bf7a[_0x444990(0x17e)]=-0x1]=_0x444990(0x17e),_0x31bf7a))(v||{});const f=_0xca6986=>c[_0x444990(0x165)](new Date(+_0xca6986))[_0x444990(0x1ba)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x1e1164,_0x9baa00)=>{const _0x2694a8=_0x444990,_0x172b08=_0x1e1164[_0x2694a8(0x15b)](c['UserManagerService']),_0x3cf7de=_0x1e1164[_0x2694a8(0x15b)](P['HTTPService']);_0x9baa00[_0x2694a8(0x170)](_0x18870a=>{const _0x19c2da=_0x2694a8;_0x172b08['getUser'](_0x18870a)&&_0x9baa00[_0x19c2da(0x140)](_0x18870a);}),_0x9baa00['size']&&(await _0x3cf7de[_0x2694a8(0x15b)](_0x2694a8(0x151),{'params':{'userIDs':[..._0x9baa00]}}))['body'][_0x2694a8(0x19c)]['forEach'](_0x41dbc5=>{const _0x40b35f=_0x2694a8;_0x41dbc5&&_0x172b08[_0x40b35f(0x1a5)](_0x41dbc5);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x2e278e,_0xd9780a,_0x254b88,_0x2eb11c)=>{for(var _0x59b28e=_0x2eb11c>0x1?void 0x0:_0x2eb11c?$(_0xd9780a,_0x254b88):_0xd9780a,_0x13fdaf=_0x2e278e['length']-0x1,_0x376b57;_0x13fdaf>=0x0;_0x13fdaf--)(_0x376b57=_0x2e278e[_0x13fdaf])&&(_0x59b28e=_0x376b57(_0x59b28e)||_0x59b28e);return _0x59b28e;},S=(_0x457594,_0x76e887)=>(_0x9eb10,_0x4d63db)=>_0x76e887(_0x9eb10,_0x4d63db,_0x457594);let p=class extends c[_0x444990(0x191)]{constructor(_0x1e98d3,_0x4c1d08,_0x10042f,_0x31502f){const _0x572d89=_0x444990;super(),this[_0x572d89(0x1b1)]=_0x1e98d3,this[_0x572d89(0x164)]=_0x4c1d08,this[_0x572d89(0x18f)]=_0x10042f,this[_0x572d89(0x1bd)]=_0x31502f,this['_init'](),this[_0x572d89(0x1b7)]();}['_initUserSync'](){const _0x3de091=_0x444990;this[_0x3de091(0x142)](this['_threadCommentModel'][_0x3de091(0x1bc)]['pipe'](w['bufferTime'](0x10))['subscribe'](_0x34b0b0=>{const _0x66e41a=_0x3de091,_0x2f2e20=new Set();_0x34b0b0['forEach'](_0xcee43d=>{const _0x1e3b01=_0x4014;switch(_0xcee43d[_0x1e3b01(0x14a)]){case'add':{const _0x46d99d=_0xcee43d[_0x1e3b01(0x144)]['personId'];_0x2f2e20['add'](_0x46d99d);break;}}}),R(this[_0x66e41a(0x1bd)],_0x2f2e20);}));}[_0x444990(0x14b)](){const _0x3170e9=_0x444990;this['disposeWithMe'](this['_commentService'][_0x3170e9(0x1bc)][_0x3170e9(0x16a)](async _0x570230=>{const _0x4d23a8=_0x3170e9;var _0x3665ca,_0x5668a9,_0x37ea15,_0x1f2380;const _0x4e2d21=(_0x3665ca=this[_0x4d23a8(0x164)][_0x4d23a8(0x13f)](_0x570230[_0x4d23a8(0x180)])[_0x4d23a8(0x16f)](_0x290583=>_0x290583['threadId']===_0x570230[_0x4d23a8(0x1a3)]))==null?void 0x0:_0x3665ca[_0x4d23a8(0x169)];if(!_0x4e2d21)return;const {unitId:_0x23561c,subUnitId:_0x516b61}=_0x4e2d21;switch(_0x570230[_0x4d23a8(0x184)]&&this[_0x4d23a8(0x18f)]['addUser'](_0x570230[_0x4d23a8(0x184)]),_0x570230[_0x4d23a8(0x14a)]){case v[_0x4d23a8(0x1a8)]:break;case v[_0x4d23a8(0x143)]:{this[_0x4d23a8(0x164)][_0x4d23a8(0x152)](_0x23561c,_0x516b61,{'unitId':_0x23561c,'subUnitId':_0x516b61,'ref':'','id':_0x570230[_0x4d23a8(0x167)],'dT':f(+_0x570230[_0x4d23a8(0x13d)]),'threadId':_0x570230[_0x4d23a8(0x1a3)],'personId':(_0x37ea15=(_0x5668a9=_0x570230['user'])==null?void 0x0:_0x5668a9[_0x4d23a8(0x158)])!=null?_0x37ea15:_0x570230[_0x4d23a8(0x1a0)],'text':JSON[_0x4d23a8(0x14c)](_0x570230[_0x4d23a8(0x15a)]),'parentId':_0x4e2d21['id']});break;}case v[_0x4d23a8(0x1b0)]:{const _0x45b0b3=this[_0x4d23a8(0x164)][_0x4d23a8(0x18e)](_0x23561c,_0x516b61,_0x570230[_0x4d23a8(0x167)]);_0x45b0b3&&_0x45b0b3['parentId']&&this['_threadCommentModel'][_0x4d23a8(0x168)](_0x23561c,_0x516b61,_0x570230[_0x4d23a8(0x167)]);break;}case v['Edit']:{this[_0x4d23a8(0x164)][_0x4d23a8(0x18c)](_0x23561c,_0x516b61,{'commentId':_0x570230[_0x4d23a8(0x167)],'text':JSON[_0x4d23a8(0x14c)](_0x570230[_0x4d23a8(0x15a)])});break;}case v[_0x4d23a8(0x198)]:{const _0x52e14a=(_0x1f2380=this[_0x4d23a8(0x164)]['getUnit'](_0x570230[_0x4d23a8(0x180)])[_0x4d23a8(0x16f)](_0x25f2f0=>_0x25f2f0[_0x4d23a8(0x1a3)]===_0x570230[_0x4d23a8(0x1a3)]))==null?void 0x0:_0x1f2380[_0x4d23a8(0x169)];_0x52e14a&&this[_0x4d23a8(0x164)][_0x4d23a8(0x190)](_0x23561c,_0x516b61,_0x52e14a['id'],_0x570230[_0x4d23a8(0x15d)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x444990(0x192)](b[_0x444990(0x153)])),S(0x1,c[_0x444990(0x192)](M['ThreadCommentModel'])),S(0x2,c[_0x444990(0x192)](c[_0x444990(0x185)])),S(0x3,c[_0x444990(0x192)](c[_0x444990(0x1a9)]))],p);const q=_0x444990(0x1ab),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x127b30,_0x169359,_0x3a174b,_0xaf9644)=>{const _0x107f4e=_0x444990;for(var _0x14a8a8=_0xaf9644>0x1?void 0x0:_0xaf9644?A(_0x169359,_0x3a174b):_0x169359,_0x856333=_0x127b30[_0x107f4e(0x17d)]-0x1,_0x2eb7ed;_0x856333>=0x0;_0x856333--)(_0x2eb7ed=_0x127b30[_0x856333])&&(_0x14a8a8=_0x2eb7ed(_0x14a8a8)||_0x14a8a8);return _0x14a8a8;},_=(_0x21fe17,_0x40d0d9)=>(_0x3535b9,_0x28b632)=>_0x40d0d9(_0x3535b9,_0x28b632,_0x21fe17);function Y(_0x4d73b5,_0x2c1fea){const _0x5bb067=_0x444990,_0x58ae5f=_0x4d73b5[_0x5bb067(0x194)][0x0];return{..._0x2c1fea,'id':_0x58ae5f[_0x5bb067(0x167)],'resolved':_0x4d73b5[_0x5bb067(0x15d)]===0x1,'dT':f(_0x58ae5f[_0x5bb067(0x13d)]),'personId':_0x58ae5f['userId'],'threadId':_0x58ae5f['threadId']};}function G(_0xb8891a,_0x2f0a74,_0x38a5f8){const _0x5ecfc3=_0x444990;var _0x5d3612,_0x31c5f5;if(((_0x31c5f5=(_0x5d3612=_0xb8891a==null?void 0x0:_0xb8891a[_0x5ecfc3(0x194)])==null?void 0x0:_0x5d3612[_0x5ecfc3(0x17d)])!=null?_0x31c5f5:0x0)>0x0){const _0x5a8879=(_0x219f1f,_0x540761)=>({'id':_0x219f1f['replyId'],'threadId':_0x219f1f[_0x5ecfc3(0x1a3)],'dT':f(_0x219f1f[_0x5ecfc3(0x13d)]),'personId':_0x219f1f['userId'],'resolved':_0xb8891a[_0x5ecfc3(0x15d)]===I['Solved'],'unitId':_0x2f0a74,'subUnitId':_0x38a5f8,'text':JSON[_0x5ecfc3(0x14c)](_0x219f1f[_0x5ecfc3(0x15a)]),'parentId':_0x540761}),_0x4c0c6e=_0x5a8879(_0xb8891a[_0x5ecfc3(0x194)][0x0]);return{..._0x4c0c6e,'children':_0xb8891a['replies']['slice'](0x1)[_0x5ecfc3(0x19d)](_0x7bbcc2=>_0x5a8879(_0x7bbcc2,_0x4c0c6e['id']))};}return null;}let g=class{constructor(_0x3e102c,_0x2defb8,_0x38496e,_0x5d474c){const _0x3b07b1=_0x444990;this[_0x3b07b1(0x199)]=_0x3e102c,this['_userService']=_0x2defb8,this[_0x3b07b1(0x149)]=_0x38496e,this[_0x3b07b1(0x1bd)]=_0x5d474c;}async['addComment'](_0x214d76){const _0x52cdb2=_0x444990;var _0x21e1b3,_0x44d7ed;const {parentId:_0x4fb749,unitId:_0x56f580,text:_0x727d8a,threadId:_0x586c16}=_0x214d76,_0x2dc21c=(_0x44d7ed=(_0x21e1b3=_0x727d8a[_0x52cdb2(0x1bb)])==null?void 0x0:_0x21e1b3[_0x52cdb2(0x178)](_0x3a4173=>_0x3a4173[_0x52cdb2(0x1b8)]===c['CustomRangeType'][_0x52cdb2(0x171)])[_0x52cdb2(0x19d)](_0x375826=>_0x375826['rangeId']))!=null?_0x44d7ed:[],_0x24d855=JSON[_0x52cdb2(0x15c)](_0x727d8a),_0x4e1c3c=(await this[_0x52cdb2(0x149)][_0x52cdb2(0x17b)](_0x56f580))['getMemberID']();if(_0x4fb749){const _0x302e66={'memberId':_0x4e1c3c,'unitId':_0x56f580,'content':_0x24d855,'mention':_0x2dc21c,'threadId':_0x586c16},_0x5a4dc0=(await this[_0x52cdb2(0x199)][_0x52cdb2(0x166)](_0x52cdb2(0x1ae)+_0x56f580+_0x52cdb2(0x1ad),{'body':_0x302e66}))[_0x52cdb2(0x1af)][_0x52cdb2(0x1b6)];return{..._0x214d76,'id':_0x5a4dc0[_0x52cdb2(0x167)],'dT':c[_0x52cdb2(0x165)](+_0x5a4dc0[_0x52cdb2(0x13d)])[_0x52cdb2(0x1ba)](_0x52cdb2(0x181)),'personId':_0x5a4dc0['userId']};}else{const _0x15faf5={'memberId':_0x4e1c3c,'unitId':_0x56f580,'content':_0x24d855,'mention':_0x2dc21c},_0x11a2de=await this[_0x52cdb2(0x199)][_0x52cdb2(0x166)](_0x52cdb2(0x1ae)+_0x56f580+_0x52cdb2(0x179),{'body':_0x15faf5});return Y(_0x11a2de[_0x52cdb2(0x1af)][_0x52cdb2(0x1b5)],_0x214d76);}}async[_0x444990(0x18c)](_0x57a3fc){const _0x3610db=_0x444990;var _0x76c8cb,_0x3d6196;const {text:_0x3f5654,unitId:_0x2cf297}=_0x57a3fc,_0x26b436=(_0x3d6196=(_0x76c8cb=_0x3f5654[_0x3610db(0x1bb)])==null?void 0x0:_0x76c8cb[_0x3610db(0x178)](_0x26afcd=>_0x26afcd[_0x3610db(0x1b8)]===c[_0x3610db(0x1ac)][_0x3610db(0x171)])[_0x3610db(0x19d)](_0x4e07fb=>_0x4e07fb[_0x3610db(0x157)]))!=null?_0x3d6196:[],_0x5dece3=JSON[_0x3610db(0x15c)](_0x3f5654),_0x5bd27b=_0x57a3fc[_0x3610db(0x1a3)],_0x543ae0=_0x57a3fc['id'],_0x44d441={'memberId':(await this[_0x3610db(0x149)][_0x3610db(0x17b)](_0x2cf297))[_0x3610db(0x1a1)](),'unitId':_0x2cf297,'threadId':_0x5bd27b,'mention':_0x26b436,'content':_0x5dece3,'replyId':_0x543ae0},_0x4b72c4=await this['_httpService'][_0x3610db(0x166)](_0x3610db(0x1ae)+_0x2cf297+_0x3610db(0x195),{'body':_0x44d441});return!_0x4b72c4['body']['error']||_0x4b72c4[_0x3610db(0x1af)][_0x3610db(0x172)][_0x3610db(0x14d)]===0x1;}async['resolveComment'](_0x5dc68e){const _0x4ce88e=_0x444990,{unitId:_0x876bba}=_0x5dc68e,_0x2ec9a6=_0x5dc68e['threadId'],_0x31e232={'memberId':this[_0x4ce88e(0x18f)][_0x4ce88e(0x15e)]()['userID'],'unitId':_0x876bba,'threadId':_0x2ec9a6,'solved':_0x5dc68e[_0x4ce88e(0x193)]?I[_0x4ce88e(0x159)]:I[_0x4ce88e(0x14f)]},_0x41831f=await this[_0x4ce88e(0x199)][_0x4ce88e(0x166)](_0x4ce88e(0x1ae)+_0x876bba+_0x4ce88e(0x162),{'body':_0x31e232});return!_0x41831f[_0x4ce88e(0x1af)][_0x4ce88e(0x172)]||_0x41831f[_0x4ce88e(0x1af)][_0x4ce88e(0x172)][_0x4ce88e(0x14d)]===0x1;}async[_0x444990(0x168)](_0x3df187,_0x51b829,_0x13655b,_0x833810){const _0x2fb14a=_0x444990,_0x4d7321={'memberId':(await this[_0x2fb14a(0x149)][_0x2fb14a(0x17b)](_0x3df187))[_0x2fb14a(0x1a1)](),'threadId':_0x13655b,'replyId':_0x833810,'unitId':_0x3df187},_0x1ad100=await this['_httpService'][_0x2fb14a(0x166)](_0x2fb14a(0x1ae)+_0x3df187+_0x2fb14a(0x1a7),{'body':_0x4d7321});return!_0x1ad100[_0x2fb14a(0x1af)]['error']||_0x1ad100[_0x2fb14a(0x1af)][_0x2fb14a(0x172)]['code']===0x1;}async['listComments'](_0x150726,_0x4f6af8,_0x490e55){const _0x14abcb=_0x444990,_0x186358={'unitId':_0x150726,'threadId':_0x490e55},_0x426630=await this['_httpService'][_0x14abcb(0x166)](_0x14abcb(0x1ae)+_0x150726+_0x14abcb(0x196),{'body':_0x186358}),_0x446258=_0x490e55[_0x14abcb(0x19d)](_0x435115=>G(_0x426630[_0x14abcb(0x1af)][_0x14abcb(0x16d)][_0x435115],_0x150726,_0x4f6af8))[_0x14abcb(0x178)](Boolean);return Object[_0x14abcb(0x175)](_0x426630[_0x14abcb(0x1af)]['users'])[_0x14abcb(0x170)](_0xb0e210=>{const _0x364d31=_0x14abcb;this['_userService'][_0x364d31(0x1a5)](_0xb0e210);}),_0x446258;}['saveCommentToSnapshot'](_0x1d9dd0){const _0x306401=_0x444990;return{'id':_0x1d9dd0['id'],'threadId':_0x1d9dd0[_0x306401(0x1a3)],'ref':_0x1d9dd0['ref']};}};g=x([_(0x0,c['Inject'](P[_0x444990(0x189)])),_(0x1,c[_0x444990(0x192)](c[_0x444990(0x185)])),_(0x2,c['Inject'](b[_0x444990(0x176)])),_(0x3,c[_0x444990(0x192)](c[_0x444990(0x1a9)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x4cda63,_0x5d23ab,_0x59c923,_0xfd89f3)=>{const _0x3a79cf=_0x444990;for(var _0x5eeb1c=_0xfd89f3>0x1?void 0x0:_0xfd89f3?H(_0x5d23ab,_0x59c923):_0x5d23ab,_0x3d937b=_0x4cda63[_0x3a79cf(0x17d)]-0x1,_0x5b57f9;_0x3d937b>=0x0;_0x3d937b--)(_0x5b57f9=_0x4cda63[_0x3d937b])&&(_0x5eeb1c=_0x5b57f9(_0x5eeb1c)||_0x5eeb1c);return _0x5eeb1c;},y=(_0x451236,_0x44c315)=>(_0x3969c5,_0x21f6a3)=>_0x44c315(_0x3969c5,_0x21f6a3,_0x451236);let C=class extends c[_0x444990(0x191)]{constructor(_0x5bd023,_0x290d00){const _0x1a2c13=_0x444990;super(),this[_0x1a2c13(0x147)]=_0x5bd023,this[_0x1a2c13(0x154)]=_0x290d00,this[_0x1a2c13(0x150)]();}['_initDataSource'](){const _0x4a8b5a=_0x444990;this[_0x4a8b5a(0x147)][_0x4a8b5a(0x19f)]=this[_0x4a8b5a(0x154)],this[_0x4a8b5a(0x147)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x444990(0x17c)]),y(0x1,c[_0x444990(0x192)](g))],C);var F=Object[_0x444990(0x17f)],L=Object[_0x444990(0x1a6)],Z=(_0x255e70,_0x36786b,_0x5cb627)=>_0x36786b in _0x255e70?F(_0x255e70,_0x36786b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5cb627}):_0x255e70[_0x36786b]=_0x5cb627,W=(_0x6e7628,_0x16021b,_0x1b17c5,_0x2c2057)=>{const _0xe73a94=_0x444990;for(var _0x24bc6d=_0x2c2057>0x1?void 0x0:_0x2c2057?L(_0x16021b,_0x1b17c5):_0x16021b,_0x4dffef=_0x6e7628[_0xe73a94(0x17d)]-0x1,_0x5b06f3;_0x4dffef>=0x0;_0x4dffef--)(_0x5b06f3=_0x6e7628[_0x4dffef])&&(_0x24bc6d=_0x5b06f3(_0x24bc6d)||_0x24bc6d);return _0x24bc6d;},O=(_0x4faa36,_0x4ccbd7)=>(_0x141df0,_0x512ac5)=>_0x4ccbd7(_0x141df0,_0x512ac5,_0x4faa36),N=(_0x27fa45,_0x3aecc2,_0x15e001)=>Z(_0x27fa45,typeof _0x3aecc2!=_0x444990(0x156)?_0x3aecc2+'':_0x3aecc2,_0x15e001);exports[_0x444990(0x16c)]=class extends c[_0x444990(0x1b2)]{constructor(_0x19327d=D,_0x56cd96,_0x2feeb5){const _0x4ad3a7=_0x444990;super(),this[_0x4ad3a7(0x19b)]=_0x19327d,this[_0x4ad3a7(0x1bd)]=_0x56cd96,this[_0x4ad3a7(0x1b3)]=_0x2feeb5;const {..._0x27773e}=c[_0x4ad3a7(0x155)]({},D,this[_0x4ad3a7(0x19b)]);this[_0x4ad3a7(0x1b3)][_0x4ad3a7(0x145)](q,_0x27773e);}[_0x444990(0x174)](){[[g],[C],[p]]['forEach'](_0x1fed09=>{const _0x4f88a4=_0x4014;this[_0x4f88a4(0x1bd)]['add'](_0x1fed09);});}[_0x444990(0x18d)](){const _0xbd5c0b=_0x444990;this[_0xbd5c0b(0x1bd)][_0xbd5c0b(0x15b)](C),this[_0xbd5c0b(0x1bd)][_0xbd5c0b(0x15b)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x444990(0x16b),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x444990(0x14a),c[_0x444990(0x197)]['UNIVER_UNKNOWN']),exports[_0x444990(0x16c)]=W([c['DependentOn'](j[_0x444990(0x177)],b[_0x444990(0x18a)],T[_0x444990(0x1aa)]),O(0x1,c[_0x444990(0x192)](c['Injector'])),O(0x2,c[_0x444990(0x187)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3b930f=_0x1ed9;(function(_0x5a3fab,_0x3ade56){const _0x3ea66c=_0x1ed9,_0x3ef367=_0x5a3fab();while(!![]){try{const _0xcdaca2=-parseInt(_0x3ea66c(0x129))/0x1+-parseInt(_0x3ea66c(0xfd))/0x2+parseInt(_0x3ea66c(0x12a))/0x3*(-parseInt(_0x3ea66c(0x127))/0x4)+parseInt(_0x3ea66c(0x107))/0x5*(-parseInt(_0x3ea66c(0xf5))/0x6)+parseInt(_0x3ea66c(0x112))/0x7+parseInt(_0x3ea66c(0x13c))/0x8+parseInt(_0x3ea66c(0x11a))/0x9;if(_0xcdaca2===_0x3ade56)break;else _0x3ef367['push'](_0x3ef367['shift']());}catch(_0x52b464){_0x3ef367['push'](_0x3ef367['shift']());}}}(_0x11e5,0x80c64));import{CommentService as _0x414f8e,CollaborationSessionService as _0xaef2a2,UniverCollaborationClientPlugin as _0x3bdf52}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x176e92}from'@univerjs-pro/license';import{dayjs as _0x3c880e,UserManagerService as _0x3fb608,Inject as _0x437bc6,Injector as _0x15a572,Disposable as _0x3ff554,CustomRangeType as _0x391546,UniverInstanceType as _0x2b9512,DependentOn as _0x4931c0,IConfigService as _0x3f3f83,Plugin as _0x346ee2,merge as _0x4332ff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x281989}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x421bc8,IThreadCommentDataSourceService as _0x46dea4}from'@univerjs/thread-comment';import{bufferTime as _0xc510e8}from'rxjs';import{HTTPService as _0xe8b063}from'@univerjs/network';const W=_0x3b930f(0x111);var I=(_0x2aab50=>(_0x2aab50[_0x2aab50[_0x3b930f(0x120)]=0x0]=_0x3b930f(0x120),_0x2aab50[_0x2aab50['Solved']=0x1]=_0x3b930f(0x135),_0x2aab50[_0x2aab50[_0x3b930f(0xf0)]=-0x1]='UNRECOGNIZED',_0x2aab50))(I||{}),v=(_0x48069c=>(_0x48069c[_0x48069c[_0x3b930f(0x11c)]=0x0]='Unknown',_0x48069c[_0x48069c['Add']=0x1]='Add',_0x48069c[_0x48069c['Reply']=0x2]=_0x3b930f(0xf6),_0x48069c[_0x48069c[_0x3b930f(0xee)]=0x3]=_0x3b930f(0xee),_0x48069c[_0x48069c['Delete']=0x4]=_0x3b930f(0x130),_0x48069c[_0x48069c[_0x3b930f(0x10c)]=0x5]='Solve',_0x48069c[_0x48069c[_0x3b930f(0xf0)]=-0x1]=_0x3b930f(0xf0),_0x48069c))(v||{});function _0x11e5(){const _0x23d012=['Solved','replies','saveCommentToSnapshot','post','length','getMemberID','reply','1293144wrbHDR','rangeType','UNIVER_UNKNOWN','deleteComment','getCurrentUser','/solved','/universer-api/comment/unit/','user','listComments','/add','disposeWithMe','_initUserSync','addUser','body','error','userID','Edit','get','UNRECOGNIZED','/edit','slice','getUnit','subscribe','2086662cQtWvm','Reply','personId','solved','rangeId','_httpService','content','_sessionService','893016zUjMuY','unitId','resolved','stringify','find','filter','onReady','addComment','delete','parentId','5LWJdqV','code','type','pluginName','replyId','Solve','comment','_configService','/reply','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3443958lBpuAH','YYYY/MM/DD\x20HH:mm','resolveComment','pipe','userId','_threadCommentModel','_initDataSource','COMMENT','11855880LKIHvu','requireSession','Unknown','/universer-api/user/list','users','_injector','OpenOrReOpen','_init','getOwnPropertyDescriptor','add','map','updateComment','_threadCommentDataSource','64TfgAtO','createTimestamp','301180sMAWPu','65256vORMem','forEach','onStarting','_commentService','defineProperty','customRanges','Delete','_threadCommentDataSourceService','threadId','_userService','root'];_0x11e5=function(){return _0x23d012;};return _0x11e5();}const D=_0x271d0a=>_0x3c880e(new Date(+_0x271d0a))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x1ab571,_0x2b3a92)=>{const _0xb3ffa9=_0x3b930f,_0xa0a89a=_0x1ab571['get'](_0x3fb608),_0x3d3b8d=_0x1ab571[_0xb3ffa9(0xef)](_0xe8b063);_0x2b3a92[_0xb3ffa9(0x12b)](_0x58b7f8=>{const _0x48c244=_0xb3ffa9;_0xa0a89a['getUser'](_0x58b7f8)&&_0x2b3a92[_0x48c244(0x105)](_0x58b7f8);}),_0x2b3a92['size']&&(await _0x3d3b8d['get'](_0xb3ffa9(0x11d),{'params':{'userIDs':[..._0x2b3a92]}}))[_0xb3ffa9(0xeb)][_0xb3ffa9(0x11e)][_0xb3ffa9(0x12b)](_0x54ed3e=>{const _0x34de63=_0xb3ffa9;_0x54ed3e&&_0xa0a89a[_0x34de63(0x148)](_0x54ed3e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x15fdc0,_0x4ea8f0,_0x1958bd,_0x54f7ce)=>{const _0x1bf965=_0x3b930f;for(var _0x498005=_0x54f7ce>0x1?void 0x0:_0x54f7ce?K(_0x4ea8f0,_0x1958bd):_0x4ea8f0,_0x4e55d5=_0x15fdc0[_0x1bf965(0x139)]-0x1,_0x112a0b;_0x4e55d5>=0x0;_0x4e55d5--)(_0x112a0b=_0x15fdc0[_0x4e55d5])&&(_0x498005=_0x112a0b(_0x498005)||_0x498005);return _0x498005;},p=(_0x5391a2,_0x241a9f)=>(_0x2e1745,_0x243d99)=>_0x241a9f(_0x2e1745,_0x243d99,_0x5391a2);let S=class extends _0x3ff554{constructor(_0x1b5939,_0x2a573e,_0x1f82b5,_0x68359b){const _0x5a55f0=_0x3b930f;super(),this[_0x5a55f0(0x12d)]=_0x1b5939,this['_threadCommentModel']=_0x2a573e,this[_0x5a55f0(0x133)]=_0x1f82b5,this[_0x5a55f0(0x11f)]=_0x68359b,this[_0x5a55f0(0x121)](),this[_0x5a55f0(0x147)]();}[_0x3b930f(0x147)](){const _0x374dc8=_0x3b930f;this[_0x374dc8(0x146)](this['_threadCommentModel']['commentUpdate$'][_0x374dc8(0x115)](_0xc510e8(0x10))[_0x374dc8(0xf4)](_0x4661ba=>{const _0x12238c=new Set();_0x4661ba['forEach'](_0x46014a=>{const _0x2af8bb=_0x1ed9;switch(_0x46014a[_0x2af8bb(0x109)]){case _0x2af8bb(0x123):{const _0x1e6a99=_0x46014a['payload'][_0x2af8bb(0xf7)];_0x12238c[_0x2af8bb(0x123)](_0x1e6a99);break;}}}),B(this['_injector'],_0x12238c);}));}[_0x3b930f(0x121)](){const _0x1f8fc6=_0x3b930f;this[_0x1f8fc6(0x146)](this[_0x1f8fc6(0x12d)]['commentUpdate$']['subscribe'](async _0x459ee9=>{const _0x1c309e=_0x1f8fc6;var _0x4afa11,_0x259f0b,_0x1318cb,_0xebc42;const _0x476976=(_0x4afa11=this['_threadCommentModel'][_0x1c309e(0xf3)](_0x459ee9[_0x1c309e(0xfe)])[_0x1c309e(0x101)](_0x3266a5=>_0x3266a5[_0x1c309e(0x132)]===_0x459ee9[_0x1c309e(0x132)]))==null?void 0x0:_0x4afa11[_0x1c309e(0x134)];if(!_0x476976)return;const {unitId:_0x479142,subUnitId:_0x334bcd}=_0x476976;switch(_0x459ee9['user']&&this[_0x1c309e(0x133)][_0x1c309e(0x148)](_0x459ee9[_0x1c309e(0x143)]),_0x459ee9[_0x1c309e(0x109)]){case v[_0x1c309e(0x110)]:break;case v[_0x1c309e(0xf6)]:{this[_0x1c309e(0x117)][_0x1c309e(0x104)](_0x479142,_0x334bcd,{'unitId':_0x479142,'subUnitId':_0x334bcd,'ref':'','id':_0x459ee9[_0x1c309e(0x10b)],'dT':D(+_0x459ee9[_0x1c309e(0x128)]),'threadId':_0x459ee9[_0x1c309e(0x132)],'personId':(_0x1318cb=(_0x259f0b=_0x459ee9['user'])==null?void 0x0:_0x259f0b[_0x1c309e(0xed)])!=null?_0x1318cb:_0x459ee9[_0x1c309e(0x116)],'text':JSON['parse'](_0x459ee9[_0x1c309e(0xfb)]),'parentId':_0x476976['id']});break;}case v[_0x1c309e(0x130)]:{const _0x341547=this[_0x1c309e(0x117)]['getComment'](_0x479142,_0x334bcd,_0x459ee9[_0x1c309e(0x10b)]);_0x341547&&_0x341547[_0x1c309e(0x106)]&&this[_0x1c309e(0x117)][_0x1c309e(0x13f)](_0x479142,_0x334bcd,_0x459ee9[_0x1c309e(0x10b)]);break;}case v['Edit']:{this[_0x1c309e(0x117)][_0x1c309e(0x125)](_0x479142,_0x334bcd,{'commentId':_0x459ee9[_0x1c309e(0x10b)],'text':JSON['parse'](_0x459ee9[_0x1c309e(0xfb)])});break;}case v[_0x1c309e(0x10c)]:{const _0x60e75f=(_0xebc42=this[_0x1c309e(0x117)]['getUnit'](_0x459ee9[_0x1c309e(0xfe)])['find'](_0x485c6a=>_0x485c6a['threadId']===_0x459ee9[_0x1c309e(0x132)]))==null?void 0x0:_0xebc42[_0x1c309e(0x134)];_0x60e75f&&this[_0x1c309e(0x117)][_0x1c309e(0x114)](_0x479142,_0x334bcd,_0x60e75f['id'],_0x459ee9[_0x1c309e(0xf8)]===I[_0x1c309e(0x135)]);break;}}}));}};S=V([p(0x0,_0x437bc6(_0x414f8e)),p(0x1,_0x437bc6(_0x421bc8)),p(0x2,_0x437bc6(_0x3fb608)),p(0x3,_0x437bc6(_0x15a572))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x3b930f(0x122)],Q=(_0x6f8fec,_0x204480,_0x4e9b83,_0xa425ec)=>{const _0x449e11=_0x3b930f;for(var _0x15eed5=_0xa425ec>0x1?void 0x0:_0xa425ec?k(_0x204480,_0x4e9b83):_0x204480,_0x20bae6=_0x6f8fec[_0x449e11(0x139)]-0x1,_0x551f65;_0x20bae6>=0x0;_0x20bae6--)(_0x551f65=_0x6f8fec[_0x20bae6])&&(_0x15eed5=_0x551f65(_0x15eed5)||_0x15eed5);return _0x15eed5;},_=(_0x29e1e2,_0x2f89ef)=>(_0x6ef2d8,_0x460e8d)=>_0x2f89ef(_0x6ef2d8,_0x460e8d,_0x29e1e2);function X(_0x593227,_0x565992){const _0x5a77f5=_0x3b930f,_0x67525=_0x593227[_0x5a77f5(0x136)][0x0];return{..._0x565992,'id':_0x67525[_0x5a77f5(0x10b)],'resolved':_0x593227[_0x5a77f5(0xf8)]===0x1,'dT':D(_0x67525['createTimestamp']),'personId':_0x67525[_0x5a77f5(0x116)],'threadId':_0x67525['threadId']};}function ee(_0x52b7e2,_0x2b5c4a,_0x418d3c){const _0x103567=_0x3b930f;var _0xa98da6,_0x491cde;if(((_0x491cde=(_0xa98da6=_0x52b7e2==null?void 0x0:_0x52b7e2['replies'])==null?void 0x0:_0xa98da6['length'])!=null?_0x491cde:0x0)>0x0){const _0x27e079=(_0x2e6e6d,_0x27e73d)=>({'id':_0x2e6e6d[_0x103567(0x10b)],'threadId':_0x2e6e6d[_0x103567(0x132)],'dT':D(_0x2e6e6d[_0x103567(0x128)]),'personId':_0x2e6e6d[_0x103567(0x116)],'resolved':_0x52b7e2[_0x103567(0xf8)]===I['Solved'],'unitId':_0x2b5c4a,'subUnitId':_0x418d3c,'text':JSON['parse'](_0x2e6e6d[_0x103567(0xfb)]),'parentId':_0x27e73d}),_0xada8ed=_0x27e079(_0x52b7e2['replies'][0x0]);return{..._0xada8ed,'children':_0x52b7e2[_0x103567(0x136)][_0x103567(0xf2)](0x1)[_0x103567(0x124)](_0x57233f=>_0x27e079(_0x57233f,_0xada8ed['id']))};}return null;}let f=class{constructor(_0x430bdc,_0x31ce5e,_0x49fbcc,_0x8fe9b4){const _0x695651=_0x3b930f;this[_0x695651(0xfa)]=_0x430bdc,this[_0x695651(0x133)]=_0x31ce5e,this[_0x695651(0xfc)]=_0x49fbcc,this[_0x695651(0x11f)]=_0x8fe9b4;}async[_0x3b930f(0x104)](_0x2449da){const _0x5a0cd8=_0x3b930f;var _0x2f3643,_0x458f4d;const {parentId:_0x4d7db2,unitId:_0x457d04,text:_0x1b2ce0,threadId:_0x236616}=_0x2449da,_0x34619f=(_0x458f4d=(_0x2f3643=_0x1b2ce0[_0x5a0cd8(0x12f)])==null?void 0x0:_0x2f3643[_0x5a0cd8(0x102)](_0x232130=>_0x232130['rangeType']===_0x391546[_0x5a0cd8(0x119)])['map'](_0x1f0213=>_0x1f0213[_0x5a0cd8(0xf9)]))!=null?_0x458f4d:[],_0x172a16=JSON[_0x5a0cd8(0x100)](_0x1b2ce0),_0x38930d=(await this[_0x5a0cd8(0xfc)][_0x5a0cd8(0x11b)](_0x457d04))[_0x5a0cd8(0x13a)]();if(_0x4d7db2){const _0x4ff271={'memberId':_0x38930d,'unitId':_0x457d04,'content':_0x172a16,'mention':_0x34619f,'threadId':_0x236616},_0x484b55=(await this['_httpService']['post'](_0x5a0cd8(0x142)+_0x457d04+_0x5a0cd8(0x10f),{'body':_0x4ff271}))[_0x5a0cd8(0xeb)][_0x5a0cd8(0x13b)];return{..._0x2449da,'id':_0x484b55['replyId'],'dT':_0x3c880e(+_0x484b55[_0x5a0cd8(0x128)])['format'](_0x5a0cd8(0x113)),'personId':_0x484b55[_0x5a0cd8(0x116)]};}else{const _0x4e242f={'memberId':_0x38930d,'unitId':_0x457d04,'content':_0x172a16,'mention':_0x34619f},_0x369710=await this[_0x5a0cd8(0xfa)]['post']('/universer-api/comment/unit/'+_0x457d04+_0x5a0cd8(0x145),{'body':_0x4e242f});return X(_0x369710[_0x5a0cd8(0xeb)][_0x5a0cd8(0x10d)],_0x2449da);}}async[_0x3b930f(0x125)](_0x157618){const _0x5a8437=_0x3b930f;var _0x1bf790,_0x52192e;const {text:_0x140c1e,unitId:_0x47360c}=_0x157618,_0x591a64=(_0x52192e=(_0x1bf790=_0x140c1e[_0x5a8437(0x12f)])==null?void 0x0:_0x1bf790['filter'](_0x40f8ce=>_0x40f8ce[_0x5a8437(0x13d)]===_0x391546[_0x5a8437(0x119)])['map'](_0x50b84f=>_0x50b84f[_0x5a8437(0xf9)]))!=null?_0x52192e:[],_0x2c4b35=JSON[_0x5a8437(0x100)](_0x140c1e),_0x40dd89=_0x157618[_0x5a8437(0x132)],_0x4c9327=_0x157618['id'],_0x26001c={'memberId':(await this['_sessionService'][_0x5a8437(0x11b)](_0x47360c))[_0x5a8437(0x13a)](),'unitId':_0x47360c,'threadId':_0x40dd89,'mention':_0x591a64,'content':_0x2c4b35,'replyId':_0x4c9327},_0x28bd79=await this[_0x5a8437(0xfa)][_0x5a8437(0x138)](_0x5a8437(0x142)+_0x47360c+_0x5a8437(0xf1),{'body':_0x26001c});return!_0x28bd79['body'][_0x5a8437(0xec)]||_0x28bd79[_0x5a8437(0xeb)][_0x5a8437(0xec)][_0x5a8437(0x108)]===0x1;}async[_0x3b930f(0x114)](_0x5da6b9){const _0x154749=_0x3b930f,{unitId:_0x367c9c}=_0x5da6b9,_0x3d552d=_0x5da6b9[_0x154749(0x132)],_0x5a4581={'memberId':this[_0x154749(0x133)][_0x154749(0x140)]()[_0x154749(0xed)],'unitId':_0x367c9c,'threadId':_0x3d552d,'solved':_0x5da6b9[_0x154749(0xff)]?I[_0x154749(0x135)]:I['OpenOrReOpen']},_0x42d576=await this[_0x154749(0xfa)][_0x154749(0x138)](_0x154749(0x142)+_0x367c9c+_0x154749(0x141),{'body':_0x5a4581});return!_0x42d576[_0x154749(0xeb)]['error']||_0x42d576['body']['error'][_0x154749(0x108)]===0x1;}async[_0x3b930f(0x13f)](_0x1f798a,_0x2acf35,_0x39c7b0,_0x55400d){const _0x5c70bf=_0x3b930f,_0x236d2f={'memberId':(await this[_0x5c70bf(0xfc)][_0x5c70bf(0x11b)](_0x1f798a))[_0x5c70bf(0x13a)](),'threadId':_0x39c7b0,'replyId':_0x55400d,'unitId':_0x1f798a},_0x49c651=await this['_httpService'][_0x5c70bf(0x138)]('/universer-api/comment/unit/'+_0x1f798a+'/delete',{'body':_0x236d2f});return!_0x49c651['body'][_0x5c70bf(0xec)]||_0x49c651[_0x5c70bf(0xeb)][_0x5c70bf(0xec)]['code']===0x1;}async[_0x3b930f(0x144)](_0xc37af0,_0x5c4f68,_0x4d5c74){const _0x2a4cdd=_0x3b930f,_0x5e8b7c={'unitId':_0xc37af0,'threadId':_0x4d5c74},_0x4caa36=await this[_0x2a4cdd(0xfa)][_0x2a4cdd(0x138)](_0x2a4cdd(0x142)+_0xc37af0+'/list',{'body':_0x5e8b7c}),_0x5c8961=_0x4d5c74['map'](_0x2a4e6e=>ee(_0x4caa36[_0x2a4cdd(0xeb)]['comments'][_0x2a4e6e],_0xc37af0,_0x5c4f68))[_0x2a4cdd(0x102)](Boolean);return Object['values'](_0x4caa36['body'][_0x2a4cdd(0x11e)])[_0x2a4cdd(0x12b)](_0x2c6de4=>{const _0x31e655=_0x2a4cdd;this[_0x31e655(0x133)][_0x31e655(0x148)](_0x2c6de4);}),_0x5c8961;}[_0x3b930f(0x137)](_0x389478){const _0x380898=_0x3b930f;return{'id':_0x389478['id'],'threadId':_0x389478[_0x380898(0x132)],'ref':_0x389478['ref']};}};f=Q([_(0x0,_0x437bc6(_0xe8b063)),_(0x1,_0x437bc6(_0x3fb608)),_(0x2,_0x437bc6(_0xaef2a2)),_(0x3,_0x437bc6(_0x15a572))],f);function _0x1ed9(_0x1306fd,_0x3ec92a){const _0x11e519=_0x11e5();return _0x1ed9=function(_0x1ed926,_0x1066b1){_0x1ed926=_0x1ed926-0xeb;let _0x4d5ad7=_0x11e519[_0x1ed926];return _0x4d5ad7;},_0x1ed9(_0x1306fd,_0x3ec92a);}var re=Object['getOwnPropertyDescriptor'],te=(_0xaea167,_0x1ba864,_0x936e0b,_0xdc0046)=>{const _0x17eb2e=_0x3b930f;for(var _0x42a239=_0xdc0046>0x1?void 0x0:_0xdc0046?re(_0x1ba864,_0x936e0b):_0x1ba864,_0x5e366d=_0xaea167[_0x17eb2e(0x139)]-0x1,_0xb2cbce;_0x5e366d>=0x0;_0x5e366d--)(_0xb2cbce=_0xaea167[_0x5e366d])&&(_0x42a239=_0xb2cbce(_0x42a239)||_0x42a239);return _0x42a239;},N=(_0x51b8ae,_0x4cce0f)=>(_0x9a728d,_0x101f9e)=>_0x4cce0f(_0x9a728d,_0x101f9e,_0x51b8ae);let g=class extends _0x3ff554{constructor(_0x37c57d,_0x1c5598){const _0x9f3955=_0x3b930f;super(),this[_0x9f3955(0x131)]=_0x37c57d,this[_0x9f3955(0x126)]=_0x1c5598,this[_0x9f3955(0x118)]();}['_initDataSource'](){const _0x3ecae6=_0x3b930f;this[_0x3ecae6(0x131)]['dataSource']=this[_0x3ecae6(0x126)],this[_0x3ecae6(0x131)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x46dea4),N(0x1,_0x437bc6(f))],g);var se=Object[_0x3b930f(0x12e)],oe=Object[_0x3b930f(0x122)],ne=(_0x43f9e7,_0x36949b,_0x4d2ef5)=>_0x36949b in _0x43f9e7?se(_0x43f9e7,_0x36949b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d2ef5}):_0x43f9e7[_0x36949b]=_0x4d2ef5,ie=(_0x274387,_0x4e6235,_0x1ffd47,_0x4c2d8e)=>{for(var _0x823a41=_0x4c2d8e>0x1?void 0x0:_0x4c2d8e?oe(_0x4e6235,_0x1ffd47):_0x4e6235,_0x51024=_0x274387['length']-0x1,_0xfb48ea;_0x51024>=0x0;_0x51024--)(_0xfb48ea=_0x274387[_0x51024])&&(_0x823a41=_0xfb48ea(_0x823a41)||_0x823a41);return _0x823a41;},w=(_0x7a87d0,_0x31e103)=>(_0x4e80aa,_0x5215fe)=>_0x31e103(_0x4e80aa,_0x5215fe,_0x7a87d0),$=(_0x1beb94,_0xb556b,_0x410d98)=>ne(_0x1beb94,typeof _0xb556b!='symbol'?_0xb556b+'':_0xb556b,_0x410d98);let b=class extends _0x346ee2{constructor(_0x5d9882=M,_0x4c0805,_0x539a8f){const _0xa6b322=_0x3b930f;super(),this['_config']=_0x5d9882,this['_injector']=_0x4c0805,this[_0xa6b322(0x10e)]=_0x539a8f;const {..._0x415b8d}=_0x4332ff({},M,this['_config']);this[_0xa6b322(0x10e)]['setConfig'](z,_0x415b8d);}[_0x3b930f(0x12c)](){const _0x3985a0=_0x3b930f;[[f],[g],[S]][_0x3985a0(0x12b)](_0x5a57c0=>{const _0x330dc7=_0x3985a0;this[_0x330dc7(0x11f)]['add'](_0x5a57c0);});}[_0x3b930f(0x103)](){const _0x208e6d=_0x3b930f;this['_injector'][_0x208e6d(0xef)](g),this['_injector'][_0x208e6d(0xef)](S);}};$(b,_0x3b930f(0x10a),W),$(b,_0x3b930f(0x109),_0x2b9512[_0x3b930f(0x13e)]),b=ie([_0x4931c0(_0x281989,_0x3bdf52,_0x176e92),w(0x1,_0x437bc6(_0x15a572)),w(0x2,_0x3f3f83)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x538291=_0x2055;(function(_0x2199bb,_0x488327){const _0x30ccad=_0x2055,_0x1a1a7d=_0x2199bb();while(!![]){try{const _0x3304a7=-parseInt(_0x30ccad(0x17b))/0x1*(parseInt(_0x30ccad(0x1bc))/0x2)+-parseInt(_0x30ccad(0x1a3))/0x3*(parseInt(_0x30ccad(0x190))/0x4)+parseInt(_0x30ccad(0x193))/0x5*(-parseInt(_0x30ccad(0x1d3))/0x6)+parseInt(_0x30ccad(0x1b4))/0x7+parseInt(_0x30ccad(0x1ac))/0x8*(parseInt(_0x30ccad(0x18d))/0x9)+parseInt(_0x30ccad(0x1c8))/0xa+parseInt(_0x30ccad(0x1b7))/0xb;if(_0x3304a7===_0x488327)break;else _0x1a1a7d['push'](_0x1a1a7d['shift']());}catch(_0x2f3a6d){_0x1a1a7d['push'](_0x1a1a7d['shift']());}}}(_0x3bcc,0x3de09));function _0x3bcc(){const _0x12b173=['threadId','27NRirsB','requireSession','post','7244kReAcO','_configService','deleteComment','638545uszlaG','ref','_init','setConfig','Reply','code','saveCommentToSnapshot','getMemberID','/edit','_config','users','replies','pipe','resolveComment','getCurrentUser','YYYY/MM/DD\x20HH:mm','48nSlLuC','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','_sessionService','_httpService','Edit','userID','resolved','90776JnFdmT','_threadCommentDataSourceService','/universer-api/user/list','_initDataSource','user','reply','UNRECOGNIZED','getOwnPropertyDescriptor','423822idlzCi','Solve','getUser','1772353zQEwug','syncUpdateMutationToColla','Solved','length','OpenOrReOpen','2IFKSXl','/universer-api/comment/unit/','symbol','createTimestamp','subscribe','_initUserSync','customRanges','comments','content','map','parse','comment','1895180fDURGT','updateComment','parentId','onReady','type','filter','addComment','unitId','pluginName','body','/delete','6IFrCvt','/solved','userId','delete','COMMENT','_injector','format','rangeId','get','stringify','payload','find','dataSource','commentUpdate$','values','35094YIGGGH','defineProperty','disposeWithMe','_userService','error','add','/add','root','getComment','thread-comment-data-source.config','_threadCommentModel','_commentService','rangeType','Add','Unknown','Delete','replyId'];_0x3bcc=function(){return _0x12b173;};return _0x3bcc();}function _0x2055(_0x1eba7f,_0x2c9c60){const _0x3bcc10=_0x3bcc();return _0x2055=function(_0x2055bc,_0x262525){_0x2055bc=_0x2055bc-0x173;let _0x3d2650=_0x3bcc10[_0x2055bc];return _0x3d2650;},_0x2055(_0x1eba7f,_0x2c9c60);}import{CommentService as _0x1c15ac,CollaborationSessionService as _0x190768,UniverCollaborationClientPlugin as _0x38e298}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x15d46a}from'@univerjs-pro/license';import{dayjs as _0x2fc50a,UserManagerService as _0x28089d,Inject as _0x329691,Injector as _0x516ead,Disposable as _0x3745f8,CustomRangeType as _0x29ac7f,UniverInstanceType as _0x369264,DependentOn as _0x322c5e,IConfigService as _0x387356,Plugin as _0x41684c,merge as _0x4b727e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x7ab6ad}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2ef6b5,IThreadCommentDataSourceService as _0x3a072d}from'@univerjs/thread-comment';import{bufferTime as _0x309254}from'rxjs';import{HTTPService as _0x3ec942}from'@univerjs/network';const W=_0x538291(0x1a5);var I=(_0xa56933=>(_0xa56933[_0xa56933[_0x538291(0x1bb)]=0x0]=_0x538291(0x1bb),_0xa56933[_0xa56933[_0x538291(0x1b9)]=0x1]=_0x538291(0x1b9),_0xa56933[_0xa56933[_0x538291(0x1b2)]=-0x1]=_0x538291(0x1b2),_0xa56933))(I||{}),v=(_0x41679c=>(_0x41679c[_0x41679c[_0x538291(0x189)]=0x0]=_0x538291(0x189),_0x41679c[_0x41679c['Add']=0x1]=_0x538291(0x188),_0x41679c[_0x41679c[_0x538291(0x197)]=0x2]='Reply',_0x41679c[_0x41679c[_0x538291(0x1a9)]=0x3]=_0x538291(0x1a9),_0x41679c[_0x41679c[_0x538291(0x18a)]=0x4]=_0x538291(0x18a),_0x41679c[_0x41679c['Solve']=0x5]=_0x538291(0x1b5),_0x41679c[_0x41679c['UNRECOGNIZED']=-0x1]=_0x538291(0x1b2),_0x41679c))(v||{});const D=_0x8d4208=>_0x2fc50a(new Date(+_0x8d4208))[_0x538291(0x1d9)](_0x538291(0x1a2)),B=async(_0xccda61,_0x34c742)=>{const _0x4e13ff=_0x538291,_0xb877de=_0xccda61[_0x4e13ff(0x174)](_0x28089d),_0x25ed45=_0xccda61[_0x4e13ff(0x174)](_0x3ec942);_0x34c742[_0x4e13ff(0x1a4)](_0x32d03c=>{const _0x4123bd=_0x4e13ff;_0xb877de[_0x4123bd(0x1b6)](_0x32d03c)&&_0x34c742[_0x4123bd(0x1d6)](_0x32d03c);}),_0x34c742['size']&&(await _0x25ed45['get'](_0x4e13ff(0x1ae),{'params':{'userIDs':[..._0x34c742]}}))[_0x4e13ff(0x1d1)][_0x4e13ff(0x19d)][_0x4e13ff(0x1a4)](_0x119ea5=>{_0x119ea5&&_0xb877de['addUser'](_0x119ea5);});};var K=Object[_0x538291(0x1b3)],V=(_0x455b9c,_0x5a6467,_0x1bdf95,_0x444213)=>{for(var _0x35c436=_0x444213>0x1?void 0x0:_0x444213?K(_0x5a6467,_0x1bdf95):_0x5a6467,_0x1b5b54=_0x455b9c['length']-0x1,_0x2962e5;_0x1b5b54>=0x0;_0x1b5b54--)(_0x2962e5=_0x455b9c[_0x1b5b54])&&(_0x35c436=_0x2962e5(_0x35c436)||_0x35c436);return _0x35c436;},p=(_0x2168e9,_0x5f506e)=>(_0x1f3b7d,_0x7841a1)=>_0x5f506e(_0x1f3b7d,_0x7841a1,_0x2168e9);let S=class extends _0x3745f8{constructor(_0x38a8c5,_0xb3cdad,_0x5890df,_0x1c2049){const _0x3b61a0=_0x538291;super(),this[_0x3b61a0(0x186)]=_0x38a8c5,this[_0x3b61a0(0x185)]=_0xb3cdad,this[_0x3b61a0(0x17e)]=_0x5890df,this[_0x3b61a0(0x1d8)]=_0x1c2049,this[_0x3b61a0(0x195)](),this[_0x3b61a0(0x1c1)]();}[_0x538291(0x1c1)](){const _0x5b1783=_0x538291;this[_0x5b1783(0x17d)](this[_0x5b1783(0x185)][_0x5b1783(0x179)][_0x5b1783(0x19f)](_0x309254(0x10))[_0x5b1783(0x1c0)](_0x226f61=>{const _0x17e890=_0x5b1783,_0x5c8fd1=new Set();_0x226f61[_0x17e890(0x1a4)](_0x3bf874=>{const _0x3948b1=_0x17e890;switch(_0x3bf874[_0x3948b1(0x1cc)]){case _0x3948b1(0x180):{const _0x5cad9e=_0x3bf874[_0x3948b1(0x176)]['personId'];_0x5c8fd1[_0x3948b1(0x180)](_0x5cad9e);break;}}}),B(this[_0x17e890(0x1d8)],_0x5c8fd1);}));}[_0x538291(0x195)](){const _0x173566=_0x538291;this[_0x173566(0x17d)](this[_0x173566(0x186)][_0x173566(0x179)]['subscribe'](async _0x3757a8=>{const _0x2a4326=_0x173566;var _0x1079f0,_0x513fcb,_0x399fd0,_0x1b41a4;const _0x261fc5=(_0x1079f0=this[_0x2a4326(0x185)]['getUnit'](_0x3757a8[_0x2a4326(0x1cf)])[_0x2a4326(0x177)](_0x52efdf=>_0x52efdf[_0x2a4326(0x18c)]===_0x3757a8['threadId']))==null?void 0x0:_0x1079f0[_0x2a4326(0x182)];if(!_0x261fc5)return;const {unitId:_0x49e7b2,subUnitId:_0x48f14f}=_0x261fc5;switch(_0x3757a8[_0x2a4326(0x1b0)]&&this[_0x2a4326(0x17e)]['addUser'](_0x3757a8['user']),_0x3757a8[_0x2a4326(0x1cc)]){case v[_0x2a4326(0x188)]:break;case v['Reply']:{this[_0x2a4326(0x185)][_0x2a4326(0x1ce)](_0x49e7b2,_0x48f14f,{'unitId':_0x49e7b2,'subUnitId':_0x48f14f,'ref':'','id':_0x3757a8[_0x2a4326(0x18b)],'dT':D(+_0x3757a8[_0x2a4326(0x1bf)]),'threadId':_0x3757a8[_0x2a4326(0x18c)],'personId':(_0x399fd0=(_0x513fcb=_0x3757a8[_0x2a4326(0x1b0)])==null?void 0x0:_0x513fcb[_0x2a4326(0x1aa)])!=null?_0x399fd0:_0x3757a8['userId'],'text':JSON[_0x2a4326(0x1c6)](_0x3757a8[_0x2a4326(0x1c4)]),'parentId':_0x261fc5['id']});break;}case v[_0x2a4326(0x18a)]:{const _0x307deb=this[_0x2a4326(0x185)][_0x2a4326(0x183)](_0x49e7b2,_0x48f14f,_0x3757a8[_0x2a4326(0x18b)]);_0x307deb&&_0x307deb[_0x2a4326(0x1ca)]&&this['_threadCommentModel'][_0x2a4326(0x192)](_0x49e7b2,_0x48f14f,_0x3757a8[_0x2a4326(0x18b)]);break;}case v[_0x2a4326(0x1a9)]:{this['_threadCommentModel']['updateComment'](_0x49e7b2,_0x48f14f,{'commentId':_0x3757a8[_0x2a4326(0x18b)],'text':JSON[_0x2a4326(0x1c6)](_0x3757a8[_0x2a4326(0x1c4)])});break;}case v[_0x2a4326(0x1b5)]:{const _0x2cdfcc=(_0x1b41a4=this[_0x2a4326(0x185)]['getUnit'](_0x3757a8[_0x2a4326(0x1cf)])[_0x2a4326(0x177)](_0x2b702f=>_0x2b702f[_0x2a4326(0x18c)]===_0x3757a8['threadId']))==null?void 0x0:_0x1b41a4[_0x2a4326(0x182)];_0x2cdfcc&&this[_0x2a4326(0x185)][_0x2a4326(0x1a0)](_0x49e7b2,_0x48f14f,_0x2cdfcc['id'],_0x3757a8[_0x2a4326(0x1a6)]===I[_0x2a4326(0x1b9)]);break;}}}));}};S=V([p(0x0,_0x329691(_0x1c15ac)),p(0x1,_0x329691(_0x2ef6b5)),p(0x2,_0x329691(_0x28089d)),p(0x3,_0x329691(_0x516ead))],S);const z=_0x538291(0x184),M={};var k=Object[_0x538291(0x1b3)],Q=(_0x1f2b4f,_0xff8fc8,_0x5a0dc2,_0x53a9f5)=>{const _0x2b98ba=_0x538291;for(var _0x3cb3d4=_0x53a9f5>0x1?void 0x0:_0x53a9f5?k(_0xff8fc8,_0x5a0dc2):_0xff8fc8,_0x301514=_0x1f2b4f[_0x2b98ba(0x1ba)]-0x1,_0x358680;_0x301514>=0x0;_0x301514--)(_0x358680=_0x1f2b4f[_0x301514])&&(_0x3cb3d4=_0x358680(_0x3cb3d4)||_0x3cb3d4);return _0x3cb3d4;},_=(_0x119234,_0xcaf1f8)=>(_0x51066f,_0x1df5fc)=>_0xcaf1f8(_0x51066f,_0x1df5fc,_0x119234);function X(_0x520b7b,_0x2672bc){const _0x551ea5=_0x538291,_0x15cf3a=_0x520b7b[_0x551ea5(0x19e)][0x0];return{..._0x2672bc,'id':_0x15cf3a[_0x551ea5(0x18b)],'resolved':_0x520b7b[_0x551ea5(0x1a6)]===0x1,'dT':D(_0x15cf3a['createTimestamp']),'personId':_0x15cf3a['userId'],'threadId':_0x15cf3a['threadId']};}function ee(_0x8d6b51,_0x3cc82a,_0x3f9fb2){const _0x8fc40a=_0x538291;var _0x53dce2,_0x1d1ac1;if(((_0x1d1ac1=(_0x53dce2=_0x8d6b51==null?void 0x0:_0x8d6b51[_0x8fc40a(0x19e)])==null?void 0x0:_0x53dce2[_0x8fc40a(0x1ba)])!=null?_0x1d1ac1:0x0)>0x0){const _0x5c8fe1=(_0xeed7d0,_0x325a62)=>({'id':_0xeed7d0[_0x8fc40a(0x18b)],'threadId':_0xeed7d0[_0x8fc40a(0x18c)],'dT':D(_0xeed7d0['createTimestamp']),'personId':_0xeed7d0[_0x8fc40a(0x1d5)],'resolved':_0x8d6b51[_0x8fc40a(0x1a6)]===I[_0x8fc40a(0x1b9)],'unitId':_0x3cc82a,'subUnitId':_0x3f9fb2,'text':JSON[_0x8fc40a(0x1c6)](_0xeed7d0[_0x8fc40a(0x1c4)]),'parentId':_0x325a62}),_0x897949=_0x5c8fe1(_0x8d6b51['replies'][0x0]);return{..._0x897949,'children':_0x8d6b51[_0x8fc40a(0x19e)]['slice'](0x1)[_0x8fc40a(0x1c5)](_0x36de77=>_0x5c8fe1(_0x36de77,_0x897949['id']))};}return null;}let f=class{constructor(_0x36d7d3,_0x236f7c,_0x2729ce,_0x307b9b){const _0x16593c=_0x538291;this[_0x16593c(0x1a8)]=_0x36d7d3,this[_0x16593c(0x17e)]=_0x236f7c,this[_0x16593c(0x1a7)]=_0x2729ce,this[_0x16593c(0x1d8)]=_0x307b9b;}async[_0x538291(0x1ce)](_0x9d1832){const _0x45c7d8=_0x538291;var _0x4e0ed1,_0x99d1f2;const {parentId:_0x21c98f,unitId:_0x1ad9ab,text:_0x3ba24f,threadId:_0x10bea4}=_0x9d1832,_0x1aa727=(_0x99d1f2=(_0x4e0ed1=_0x3ba24f['customRanges'])==null?void 0x0:_0x4e0ed1[_0x45c7d8(0x1cd)](_0x5c4fe1=>_0x5c4fe1['rangeType']===_0x29ac7f[_0x45c7d8(0x1d7)])[_0x45c7d8(0x1c5)](_0x23631a=>_0x23631a[_0x45c7d8(0x173)]))!=null?_0x99d1f2:[],_0x2eaa3a=JSON[_0x45c7d8(0x175)](_0x3ba24f),_0x41fe6b=(await this[_0x45c7d8(0x1a7)][_0x45c7d8(0x18e)](_0x1ad9ab))[_0x45c7d8(0x19a)]();if(_0x21c98f){const _0x484fa8={'memberId':_0x41fe6b,'unitId':_0x1ad9ab,'content':_0x2eaa3a,'mention':_0x1aa727,'threadId':_0x10bea4},_0x35b2e2=(await this[_0x45c7d8(0x1a8)][_0x45c7d8(0x18f)](_0x45c7d8(0x1bd)+_0x1ad9ab+'/reply',{'body':_0x484fa8}))[_0x45c7d8(0x1d1)][_0x45c7d8(0x1b1)];return{..._0x9d1832,'id':_0x35b2e2[_0x45c7d8(0x18b)],'dT':_0x2fc50a(+_0x35b2e2[_0x45c7d8(0x1bf)])[_0x45c7d8(0x1d9)](_0x45c7d8(0x1a2)),'personId':_0x35b2e2[_0x45c7d8(0x1d5)]};}else{const _0x34bbfd={'memberId':_0x41fe6b,'unitId':_0x1ad9ab,'content':_0x2eaa3a,'mention':_0x1aa727},_0x565a61=await this[_0x45c7d8(0x1a8)][_0x45c7d8(0x18f)](_0x45c7d8(0x1bd)+_0x1ad9ab+_0x45c7d8(0x181),{'body':_0x34bbfd});return X(_0x565a61['body'][_0x45c7d8(0x1c7)],_0x9d1832);}}async[_0x538291(0x1c9)](_0x58d82b){const _0x4577ab=_0x538291;var _0x11da9a,_0x3dd819;const {text:_0x5f5a75,unitId:_0x8b3d30}=_0x58d82b,_0x24030d=(_0x3dd819=(_0x11da9a=_0x5f5a75[_0x4577ab(0x1c2)])==null?void 0x0:_0x11da9a[_0x4577ab(0x1cd)](_0x44a8dd=>_0x44a8dd[_0x4577ab(0x187)]===_0x29ac7f[_0x4577ab(0x1d7)])['map'](_0x328309=>_0x328309[_0x4577ab(0x173)]))!=null?_0x3dd819:[],_0x19cb58=JSON[_0x4577ab(0x175)](_0x5f5a75),_0xf76dbd=_0x58d82b['threadId'],_0x2cabc9=_0x58d82b['id'],_0x38828a={'memberId':(await this[_0x4577ab(0x1a7)][_0x4577ab(0x18e)](_0x8b3d30))[_0x4577ab(0x19a)](),'unitId':_0x8b3d30,'threadId':_0xf76dbd,'mention':_0x24030d,'content':_0x19cb58,'replyId':_0x2cabc9},_0x1b206c=await this[_0x4577ab(0x1a8)][_0x4577ab(0x18f)](_0x4577ab(0x1bd)+_0x8b3d30+_0x4577ab(0x19b),{'body':_0x38828a});return!_0x1b206c['body'][_0x4577ab(0x17f)]||_0x1b206c[_0x4577ab(0x1d1)][_0x4577ab(0x17f)]['code']===0x1;}async[_0x538291(0x1a0)](_0x11ce62){const _0x1d8a7b=_0x538291,{unitId:_0x345cac}=_0x11ce62,_0x1a5921=_0x11ce62['threadId'],_0x22bb61={'memberId':this[_0x1d8a7b(0x17e)][_0x1d8a7b(0x1a1)]()[_0x1d8a7b(0x1aa)],'unitId':_0x345cac,'threadId':_0x1a5921,'solved':_0x11ce62[_0x1d8a7b(0x1ab)]?I[_0x1d8a7b(0x1b9)]:I['OpenOrReOpen']},_0x4eea7f=await this['_httpService'][_0x1d8a7b(0x18f)]('/universer-api/comment/unit/'+_0x345cac+_0x1d8a7b(0x1d4),{'body':_0x22bb61});return!_0x4eea7f[_0x1d8a7b(0x1d1)][_0x1d8a7b(0x17f)]||_0x4eea7f['body'][_0x1d8a7b(0x17f)]['code']===0x1;}async[_0x538291(0x192)](_0x468974,_0x529428,_0x2624b8,_0xe6714){const _0x42526d=_0x538291,_0x3f4001={'memberId':(await this[_0x42526d(0x1a7)][_0x42526d(0x18e)](_0x468974))[_0x42526d(0x19a)](),'threadId':_0x2624b8,'replyId':_0xe6714,'unitId':_0x468974},_0x3cb96d=await this[_0x42526d(0x1a8)][_0x42526d(0x18f)](_0x42526d(0x1bd)+_0x468974+_0x42526d(0x1d2),{'body':_0x3f4001});return!_0x3cb96d['body'][_0x42526d(0x17f)]||_0x3cb96d['body']['error'][_0x42526d(0x198)]===0x1;}async['listComments'](_0x48c972,_0x14d79c,_0x5cbcc4){const _0x513782=_0x538291,_0x3e9161={'unitId':_0x48c972,'threadId':_0x5cbcc4},_0x155762=await this['_httpService'][_0x513782(0x18f)](_0x513782(0x1bd)+_0x48c972+'/list',{'body':_0x3e9161}),_0x5791ea=_0x5cbcc4[_0x513782(0x1c5)](_0x5d076c=>ee(_0x155762[_0x513782(0x1d1)][_0x513782(0x1c3)][_0x5d076c],_0x48c972,_0x14d79c))['filter'](Boolean);return Object[_0x513782(0x17a)](_0x155762[_0x513782(0x1d1)][_0x513782(0x19d)])[_0x513782(0x1a4)](_0x3d79ab=>{const _0x2b7ee8=_0x513782;this[_0x2b7ee8(0x17e)]['addUser'](_0x3d79ab);}),_0x5791ea;}[_0x538291(0x199)](_0x1e5a2d){const _0x44e406=_0x538291;return{'id':_0x1e5a2d['id'],'threadId':_0x1e5a2d[_0x44e406(0x18c)],'ref':_0x1e5a2d[_0x44e406(0x194)]};}};f=Q([_(0x0,_0x329691(_0x3ec942)),_(0x1,_0x329691(_0x28089d)),_(0x2,_0x329691(_0x190768)),_(0x3,_0x329691(_0x516ead))],f);var re=Object[_0x538291(0x1b3)],te=(_0x8041a6,_0xb50ba1,_0x1249f5,_0x27a16f)=>{const _0x180695=_0x538291;for(var _0x5c1b68=_0x27a16f>0x1?void 0x0:_0x27a16f?re(_0xb50ba1,_0x1249f5):_0xb50ba1,_0x52f524=_0x8041a6[_0x180695(0x1ba)]-0x1,_0x2c29e6;_0x52f524>=0x0;_0x52f524--)(_0x2c29e6=_0x8041a6[_0x52f524])&&(_0x5c1b68=_0x2c29e6(_0x5c1b68)||_0x5c1b68);return _0x5c1b68;},N=(_0x3ca649,_0x55dcb7)=>(_0x351829,_0x4ea4a2)=>_0x55dcb7(_0x351829,_0x4ea4a2,_0x3ca649);let g=class extends _0x3745f8{constructor(_0x54dfb6,_0x894be5){const _0x18d696=_0x538291;super(),this[_0x18d696(0x1ad)]=_0x54dfb6,this['_threadCommentDataSource']=_0x894be5,this[_0x18d696(0x1af)]();}[_0x538291(0x1af)](){const _0x4e5d2f=_0x538291;this['_threadCommentDataSourceService'][_0x4e5d2f(0x178)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x4e5d2f(0x1b8)]=!0x1;}};g=te([N(0x0,_0x3a072d),N(0x1,_0x329691(f))],g);var se=Object[_0x538291(0x17c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1270e6,_0x9d2c40,_0x4ee5b5)=>_0x9d2c40 in _0x1270e6?se(_0x1270e6,_0x9d2c40,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ee5b5}):_0x1270e6[_0x9d2c40]=_0x4ee5b5,ie=(_0x48c929,_0x408c92,_0x137a77,_0x291fdc)=>{const _0x3383cd=_0x538291;for(var _0x572b0a=_0x291fdc>0x1?void 0x0:_0x291fdc?oe(_0x408c92,_0x137a77):_0x408c92,_0x4d7c1c=_0x48c929[_0x3383cd(0x1ba)]-0x1,_0x406a04;_0x4d7c1c>=0x0;_0x4d7c1c--)(_0x406a04=_0x48c929[_0x4d7c1c])&&(_0x572b0a=_0x406a04(_0x572b0a)||_0x572b0a);return _0x572b0a;},w=(_0x5d543c,_0x40fa1b)=>(_0x3950f9,_0x1040ef)=>_0x40fa1b(_0x3950f9,_0x1040ef,_0x5d543c),$=(_0xc4b4f4,_0x2d6c68,_0xa676de)=>ne(_0xc4b4f4,typeof _0x2d6c68!=_0x538291(0x1be)?_0x2d6c68+'':_0x2d6c68,_0xa676de);let b=class extends _0x41684c{constructor(_0x3e48fc=M,_0x32d75d,_0x31acf9){const _0x192ce9=_0x538291;super(),this['_config']=_0x3e48fc,this[_0x192ce9(0x1d8)]=_0x32d75d,this[_0x192ce9(0x191)]=_0x31acf9;const {..._0x3a9ee7}=_0x4b727e({},M,this[_0x192ce9(0x19c)]);this[_0x192ce9(0x191)][_0x192ce9(0x196)](z,_0x3a9ee7);}['onStarting'](){const _0x5318cd=_0x538291;[[f],[g],[S]][_0x5318cd(0x1a4)](_0x38800f=>{const _0x14054d=_0x5318cd;this[_0x14054d(0x1d8)]['add'](_0x38800f);});}[_0x538291(0x1cb)](){const _0x586434=_0x538291;this[_0x586434(0x1d8)][_0x586434(0x174)](g),this[_0x586434(0x1d8)][_0x586434(0x174)](S);}};$(b,_0x538291(0x1d0),W),$(b,'type',_0x369264['UNIVER_UNKNOWN']),b=ie([_0x322c5e(_0x7ab6ad,_0x38e298,_0x15d46a),w(0x1,_0x329691(_0x516ead)),w(0x2,_0x387356)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3b930f=_0x1ed9;(function(_0x5a3fab,_0x3ade56){const _0x3ea66c=_0x1ed9,_0x3ef367=_0x5a3fab();while(!![]){try{const _0xcdaca2=-parseInt(_0x3ea66c(0x129))/0x1+-parseInt(_0x3ea66c(0xfd))/0x2+parseInt(_0x3ea66c(0x12a))/0x3*(-parseInt(_0x3ea66c(0x127))/0x4)+parseInt(_0x3ea66c(0x107))/0x5*(-parseInt(_0x3ea66c(0xf5))/0x6)+parseInt(_0x3ea66c(0x112))/0x7+parseInt(_0x3ea66c(0x13c))/0x8+parseInt(_0x3ea66c(0x11a))/0x9;if(_0xcdaca2===_0x3ade56)break;else _0x3ef367['push'](_0x3ef367['shift']());}catch(_0x52b464){_0x3ef367['push'](_0x3ef367['shift']());}}}(_0x11e5,0x80c64));import{CommentService as _0x414f8e,CollaborationSessionService as _0xaef2a2,UniverCollaborationClientPlugin as _0x3bdf52}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x176e92}from'@univerjs-pro/license';import{dayjs as _0x3c880e,UserManagerService as _0x3fb608,Inject as _0x437bc6,Injector as _0x15a572,Disposable as _0x3ff554,CustomRangeType as _0x391546,UniverInstanceType as _0x2b9512,DependentOn as _0x4931c0,IConfigService as _0x3f3f83,Plugin as _0x346ee2,merge as _0x4332ff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x281989}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x421bc8,IThreadCommentDataSourceService as _0x46dea4}from'@univerjs/thread-comment';import{bufferTime as _0xc510e8}from'rxjs';import{HTTPService as _0xe8b063}from'@univerjs/network';const W=_0x3b930f(0x111);var I=(_0x2aab50=>(_0x2aab50[_0x2aab50[_0x3b930f(0x120)]=0x0]=_0x3b930f(0x120),_0x2aab50[_0x2aab50['Solved']=0x1]=_0x3b930f(0x135),_0x2aab50[_0x2aab50[_0x3b930f(0xf0)]=-0x1]='UNRECOGNIZED',_0x2aab50))(I||{}),v=(_0x48069c=>(_0x48069c[_0x48069c[_0x3b930f(0x11c)]=0x0]='Unknown',_0x48069c[_0x48069c['Add']=0x1]='Add',_0x48069c[_0x48069c['Reply']=0x2]=_0x3b930f(0xf6),_0x48069c[_0x48069c[_0x3b930f(0xee)]=0x3]=_0x3b930f(0xee),_0x48069c[_0x48069c['Delete']=0x4]=_0x3b930f(0x130),_0x48069c[_0x48069c[_0x3b930f(0x10c)]=0x5]='Solve',_0x48069c[_0x48069c[_0x3b930f(0xf0)]=-0x1]=_0x3b930f(0xf0),_0x48069c))(v||{});function _0x11e5(){const _0x23d012=['Solved','replies','saveCommentToSnapshot','post','length','getMemberID','reply','1293144wrbHDR','rangeType','UNIVER_UNKNOWN','deleteComment','getCurrentUser','/solved','/universer-api/comment/unit/','user','listComments','/add','disposeWithMe','_initUserSync','addUser','body','error','userID','Edit','get','UNRECOGNIZED','/edit','slice','getUnit','subscribe','2086662cQtWvm','Reply','personId','solved','rangeId','_httpService','content','_sessionService','893016zUjMuY','unitId','resolved','stringify','find','filter','onReady','addComment','delete','parentId','5LWJdqV','code','type','pluginName','replyId','Solve','comment','_configService','/reply','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3443958lBpuAH','YYYY/MM/DD\x20HH:mm','resolveComment','pipe','userId','_threadCommentModel','_initDataSource','COMMENT','11855880LKIHvu','requireSession','Unknown','/universer-api/user/list','users','_injector','OpenOrReOpen','_init','getOwnPropertyDescriptor','add','map','updateComment','_threadCommentDataSource','64TfgAtO','createTimestamp','301180sMAWPu','65256vORMem','forEach','onStarting','_commentService','defineProperty','customRanges','Delete','_threadCommentDataSourceService','threadId','_userService','root'];_0x11e5=function(){return _0x23d012;};return _0x11e5();}const D=_0x271d0a=>_0x3c880e(new Date(+_0x271d0a))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x1ab571,_0x2b3a92)=>{const _0xb3ffa9=_0x3b930f,_0xa0a89a=_0x1ab571['get'](_0x3fb608),_0x3d3b8d=_0x1ab571[_0xb3ffa9(0xef)](_0xe8b063);_0x2b3a92[_0xb3ffa9(0x12b)](_0x58b7f8=>{const _0x48c244=_0xb3ffa9;_0xa0a89a['getUser'](_0x58b7f8)&&_0x2b3a92[_0x48c244(0x105)](_0x58b7f8);}),_0x2b3a92['size']&&(await _0x3d3b8d['get'](_0xb3ffa9(0x11d),{'params':{'userIDs':[..._0x2b3a92]}}))[_0xb3ffa9(0xeb)][_0xb3ffa9(0x11e)][_0xb3ffa9(0x12b)](_0x54ed3e=>{const _0x34de63=_0xb3ffa9;_0x54ed3e&&_0xa0a89a[_0x34de63(0x148)](_0x54ed3e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x15fdc0,_0x4ea8f0,_0x1958bd,_0x54f7ce)=>{const _0x1bf965=_0x3b930f;for(var _0x498005=_0x54f7ce>0x1?void 0x0:_0x54f7ce?K(_0x4ea8f0,_0x1958bd):_0x4ea8f0,_0x4e55d5=_0x15fdc0[_0x1bf965(0x139)]-0x1,_0x112a0b;_0x4e55d5>=0x0;_0x4e55d5--)(_0x112a0b=_0x15fdc0[_0x4e55d5])&&(_0x498005=_0x112a0b(_0x498005)||_0x498005);return _0x498005;},p=(_0x5391a2,_0x241a9f)=>(_0x2e1745,_0x243d99)=>_0x241a9f(_0x2e1745,_0x243d99,_0x5391a2);let S=class extends _0x3ff554{constructor(_0x1b5939,_0x2a573e,_0x1f82b5,_0x68359b){const _0x5a55f0=_0x3b930f;super(),this[_0x5a55f0(0x12d)]=_0x1b5939,this['_threadCommentModel']=_0x2a573e,this[_0x5a55f0(0x133)]=_0x1f82b5,this[_0x5a55f0(0x11f)]=_0x68359b,this[_0x5a55f0(0x121)](),this[_0x5a55f0(0x147)]();}[_0x3b930f(0x147)](){const _0x374dc8=_0x3b930f;this[_0x374dc8(0x146)](this['_threadCommentModel']['commentUpdate$'][_0x374dc8(0x115)](_0xc510e8(0x10))[_0x374dc8(0xf4)](_0x4661ba=>{const _0x12238c=new Set();_0x4661ba['forEach'](_0x46014a=>{const _0x2af8bb=_0x1ed9;switch(_0x46014a[_0x2af8bb(0x109)]){case _0x2af8bb(0x123):{const _0x1e6a99=_0x46014a['payload'][_0x2af8bb(0xf7)];_0x12238c[_0x2af8bb(0x123)](_0x1e6a99);break;}}}),B(this['_injector'],_0x12238c);}));}[_0x3b930f(0x121)](){const _0x1f8fc6=_0x3b930f;this[_0x1f8fc6(0x146)](this[_0x1f8fc6(0x12d)]['commentUpdate$']['subscribe'](async _0x459ee9=>{const _0x1c309e=_0x1f8fc6;var _0x4afa11,_0x259f0b,_0x1318cb,_0xebc42;const _0x476976=(_0x4afa11=this['_threadCommentModel'][_0x1c309e(0xf3)](_0x459ee9[_0x1c309e(0xfe)])[_0x1c309e(0x101)](_0x3266a5=>_0x3266a5[_0x1c309e(0x132)]===_0x459ee9[_0x1c309e(0x132)]))==null?void 0x0:_0x4afa11[_0x1c309e(0x134)];if(!_0x476976)return;const {unitId:_0x479142,subUnitId:_0x334bcd}=_0x476976;switch(_0x459ee9['user']&&this[_0x1c309e(0x133)][_0x1c309e(0x148)](_0x459ee9[_0x1c309e(0x143)]),_0x459ee9[_0x1c309e(0x109)]){case v[_0x1c309e(0x110)]:break;case v[_0x1c309e(0xf6)]:{this[_0x1c309e(0x117)][_0x1c309e(0x104)](_0x479142,_0x334bcd,{'unitId':_0x479142,'subUnitId':_0x334bcd,'ref':'','id':_0x459ee9[_0x1c309e(0x10b)],'dT':D(+_0x459ee9[_0x1c309e(0x128)]),'threadId':_0x459ee9[_0x1c309e(0x132)],'personId':(_0x1318cb=(_0x259f0b=_0x459ee9['user'])==null?void 0x0:_0x259f0b[_0x1c309e(0xed)])!=null?_0x1318cb:_0x459ee9[_0x1c309e(0x116)],'text':JSON['parse'](_0x459ee9[_0x1c309e(0xfb)]),'parentId':_0x476976['id']});break;}case v[_0x1c309e(0x130)]:{const _0x341547=this[_0x1c309e(0x117)]['getComment'](_0x479142,_0x334bcd,_0x459ee9[_0x1c309e(0x10b)]);_0x341547&&_0x341547[_0x1c309e(0x106)]&&this[_0x1c309e(0x117)][_0x1c309e(0x13f)](_0x479142,_0x334bcd,_0x459ee9[_0x1c309e(0x10b)]);break;}case v['Edit']:{this[_0x1c309e(0x117)][_0x1c309e(0x125)](_0x479142,_0x334bcd,{'commentId':_0x459ee9[_0x1c309e(0x10b)],'text':JSON['parse'](_0x459ee9[_0x1c309e(0xfb)])});break;}case v[_0x1c309e(0x10c)]:{const _0x60e75f=(_0xebc42=this[_0x1c309e(0x117)]['getUnit'](_0x459ee9[_0x1c309e(0xfe)])['find'](_0x485c6a=>_0x485c6a['threadId']===_0x459ee9[_0x1c309e(0x132)]))==null?void 0x0:_0xebc42[_0x1c309e(0x134)];_0x60e75f&&this[_0x1c309e(0x117)][_0x1c309e(0x114)](_0x479142,_0x334bcd,_0x60e75f['id'],_0x459ee9[_0x1c309e(0xf8)]===I[_0x1c309e(0x135)]);break;}}}));}};S=V([p(0x0,_0x437bc6(_0x414f8e)),p(0x1,_0x437bc6(_0x421bc8)),p(0x2,_0x437bc6(_0x3fb608)),p(0x3,_0x437bc6(_0x15a572))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x3b930f(0x122)],Q=(_0x6f8fec,_0x204480,_0x4e9b83,_0xa425ec)=>{const _0x449e11=_0x3b930f;for(var _0x15eed5=_0xa425ec>0x1?void 0x0:_0xa425ec?k(_0x204480,_0x4e9b83):_0x204480,_0x20bae6=_0x6f8fec[_0x449e11(0x139)]-0x1,_0x551f65;_0x20bae6>=0x0;_0x20bae6--)(_0x551f65=_0x6f8fec[_0x20bae6])&&(_0x15eed5=_0x551f65(_0x15eed5)||_0x15eed5);return _0x15eed5;},_=(_0x29e1e2,_0x2f89ef)=>(_0x6ef2d8,_0x460e8d)=>_0x2f89ef(_0x6ef2d8,_0x460e8d,_0x29e1e2);function X(_0x593227,_0x565992){const _0x5a77f5=_0x3b930f,_0x67525=_0x593227[_0x5a77f5(0x136)][0x0];return{..._0x565992,'id':_0x67525[_0x5a77f5(0x10b)],'resolved':_0x593227[_0x5a77f5(0xf8)]===0x1,'dT':D(_0x67525['createTimestamp']),'personId':_0x67525[_0x5a77f5(0x116)],'threadId':_0x67525['threadId']};}function ee(_0x52b7e2,_0x2b5c4a,_0x418d3c){const _0x103567=_0x3b930f;var _0xa98da6,_0x491cde;if(((_0x491cde=(_0xa98da6=_0x52b7e2==null?void 0x0:_0x52b7e2['replies'])==null?void 0x0:_0xa98da6['length'])!=null?_0x491cde:0x0)>0x0){const _0x27e079=(_0x2e6e6d,_0x27e73d)=>({'id':_0x2e6e6d[_0x103567(0x10b)],'threadId':_0x2e6e6d[_0x103567(0x132)],'dT':D(_0x2e6e6d[_0x103567(0x128)]),'personId':_0x2e6e6d[_0x103567(0x116)],'resolved':_0x52b7e2[_0x103567(0xf8)]===I['Solved'],'unitId':_0x2b5c4a,'subUnitId':_0x418d3c,'text':JSON['parse'](_0x2e6e6d[_0x103567(0xfb)]),'parentId':_0x27e73d}),_0xada8ed=_0x27e079(_0x52b7e2['replies'][0x0]);return{..._0xada8ed,'children':_0x52b7e2[_0x103567(0x136)][_0x103567(0xf2)](0x1)[_0x103567(0x124)](_0x57233f=>_0x27e079(_0x57233f,_0xada8ed['id']))};}return null;}let f=class{constructor(_0x430bdc,_0x31ce5e,_0x49fbcc,_0x8fe9b4){const _0x695651=_0x3b930f;this[_0x695651(0xfa)]=_0x430bdc,this[_0x695651(0x133)]=_0x31ce5e,this[_0x695651(0xfc)]=_0x49fbcc,this[_0x695651(0x11f)]=_0x8fe9b4;}async[_0x3b930f(0x104)](_0x2449da){const _0x5a0cd8=_0x3b930f;var _0x2f3643,_0x458f4d;const {parentId:_0x4d7db2,unitId:_0x457d04,text:_0x1b2ce0,threadId:_0x236616}=_0x2449da,_0x34619f=(_0x458f4d=(_0x2f3643=_0x1b2ce0[_0x5a0cd8(0x12f)])==null?void 0x0:_0x2f3643[_0x5a0cd8(0x102)](_0x232130=>_0x232130['rangeType']===_0x391546[_0x5a0cd8(0x119)])['map'](_0x1f0213=>_0x1f0213[_0x5a0cd8(0xf9)]))!=null?_0x458f4d:[],_0x172a16=JSON[_0x5a0cd8(0x100)](_0x1b2ce0),_0x38930d=(await this[_0x5a0cd8(0xfc)][_0x5a0cd8(0x11b)](_0x457d04))[_0x5a0cd8(0x13a)]();if(_0x4d7db2){const _0x4ff271={'memberId':_0x38930d,'unitId':_0x457d04,'content':_0x172a16,'mention':_0x34619f,'threadId':_0x236616},_0x484b55=(await this['_httpService']['post'](_0x5a0cd8(0x142)+_0x457d04+_0x5a0cd8(0x10f),{'body':_0x4ff271}))[_0x5a0cd8(0xeb)][_0x5a0cd8(0x13b)];return{..._0x2449da,'id':_0x484b55['replyId'],'dT':_0x3c880e(+_0x484b55[_0x5a0cd8(0x128)])['format'](_0x5a0cd8(0x113)),'personId':_0x484b55[_0x5a0cd8(0x116)]};}else{const _0x4e242f={'memberId':_0x38930d,'unitId':_0x457d04,'content':_0x172a16,'mention':_0x34619f},_0x369710=await this[_0x5a0cd8(0xfa)]['post']('/universer-api/comment/unit/'+_0x457d04+_0x5a0cd8(0x145),{'body':_0x4e242f});return X(_0x369710[_0x5a0cd8(0xeb)][_0x5a0cd8(0x10d)],_0x2449da);}}async[_0x3b930f(0x125)](_0x157618){const _0x5a8437=_0x3b930f;var _0x1bf790,_0x52192e;const {text:_0x140c1e,unitId:_0x47360c}=_0x157618,_0x591a64=(_0x52192e=(_0x1bf790=_0x140c1e[_0x5a8437(0x12f)])==null?void 0x0:_0x1bf790['filter'](_0x40f8ce=>_0x40f8ce[_0x5a8437(0x13d)]===_0x391546[_0x5a8437(0x119)])['map'](_0x50b84f=>_0x50b84f[_0x5a8437(0xf9)]))!=null?_0x52192e:[],_0x2c4b35=JSON[_0x5a8437(0x100)](_0x140c1e),_0x40dd89=_0x157618[_0x5a8437(0x132)],_0x4c9327=_0x157618['id'],_0x26001c={'memberId':(await this['_sessionService'][_0x5a8437(0x11b)](_0x47360c))[_0x5a8437(0x13a)](),'unitId':_0x47360c,'threadId':_0x40dd89,'mention':_0x591a64,'content':_0x2c4b35,'replyId':_0x4c9327},_0x28bd79=await this[_0x5a8437(0xfa)][_0x5a8437(0x138)](_0x5a8437(0x142)+_0x47360c+_0x5a8437(0xf1),{'body':_0x26001c});return!_0x28bd79['body'][_0x5a8437(0xec)]||_0x28bd79[_0x5a8437(0xeb)][_0x5a8437(0xec)][_0x5a8437(0x108)]===0x1;}async[_0x3b930f(0x114)](_0x5da6b9){const _0x154749=_0x3b930f,{unitId:_0x367c9c}=_0x5da6b9,_0x3d552d=_0x5da6b9[_0x154749(0x132)],_0x5a4581={'memberId':this[_0x154749(0x133)][_0x154749(0x140)]()[_0x154749(0xed)],'unitId':_0x367c9c,'threadId':_0x3d552d,'solved':_0x5da6b9[_0x154749(0xff)]?I[_0x154749(0x135)]:I['OpenOrReOpen']},_0x42d576=await this[_0x154749(0xfa)][_0x154749(0x138)](_0x154749(0x142)+_0x367c9c+_0x154749(0x141),{'body':_0x5a4581});return!_0x42d576[_0x154749(0xeb)]['error']||_0x42d576['body']['error'][_0x154749(0x108)]===0x1;}async[_0x3b930f(0x13f)](_0x1f798a,_0x2acf35,_0x39c7b0,_0x55400d){const _0x5c70bf=_0x3b930f,_0x236d2f={'memberId':(await this[_0x5c70bf(0xfc)][_0x5c70bf(0x11b)](_0x1f798a))[_0x5c70bf(0x13a)](),'threadId':_0x39c7b0,'replyId':_0x55400d,'unitId':_0x1f798a},_0x49c651=await this['_httpService'][_0x5c70bf(0x138)]('/universer-api/comment/unit/'+_0x1f798a+'/delete',{'body':_0x236d2f});return!_0x49c651['body'][_0x5c70bf(0xec)]||_0x49c651[_0x5c70bf(0xeb)][_0x5c70bf(0xec)]['code']===0x1;}async[_0x3b930f(0x144)](_0xc37af0,_0x5c4f68,_0x4d5c74){const _0x2a4cdd=_0x3b930f,_0x5e8b7c={'unitId':_0xc37af0,'threadId':_0x4d5c74},_0x4caa36=await this[_0x2a4cdd(0xfa)][_0x2a4cdd(0x138)](_0x2a4cdd(0x142)+_0xc37af0+'/list',{'body':_0x5e8b7c}),_0x5c8961=_0x4d5c74['map'](_0x2a4e6e=>ee(_0x4caa36[_0x2a4cdd(0xeb)]['comments'][_0x2a4e6e],_0xc37af0,_0x5c4f68))[_0x2a4cdd(0x102)](Boolean);return Object['values'](_0x4caa36['body'][_0x2a4cdd(0x11e)])[_0x2a4cdd(0x12b)](_0x2c6de4=>{const _0x31e655=_0x2a4cdd;this[_0x31e655(0x133)][_0x31e655(0x148)](_0x2c6de4);}),_0x5c8961;}[_0x3b930f(0x137)](_0x389478){const _0x380898=_0x3b930f;return{'id':_0x389478['id'],'threadId':_0x389478[_0x380898(0x132)],'ref':_0x389478['ref']};}};f=Q([_(0x0,_0x437bc6(_0xe8b063)),_(0x1,_0x437bc6(_0x3fb608)),_(0x2,_0x437bc6(_0xaef2a2)),_(0x3,_0x437bc6(_0x15a572))],f);function _0x1ed9(_0x1306fd,_0x3ec92a){const _0x11e519=_0x11e5();return _0x1ed9=function(_0x1ed926,_0x1066b1){_0x1ed926=_0x1ed926-0xeb;let _0x4d5ad7=_0x11e519[_0x1ed926];return _0x4d5ad7;},_0x1ed9(_0x1306fd,_0x3ec92a);}var re=Object['getOwnPropertyDescriptor'],te=(_0xaea167,_0x1ba864,_0x936e0b,_0xdc0046)=>{const _0x17eb2e=_0x3b930f;for(var _0x42a239=_0xdc0046>0x1?void 0x0:_0xdc0046?re(_0x1ba864,_0x936e0b):_0x1ba864,_0x5e366d=_0xaea167[_0x17eb2e(0x139)]-0x1,_0xb2cbce;_0x5e366d>=0x0;_0x5e366d--)(_0xb2cbce=_0xaea167[_0x5e366d])&&(_0x42a239=_0xb2cbce(_0x42a239)||_0x42a239);return _0x42a239;},N=(_0x51b8ae,_0x4cce0f)=>(_0x9a728d,_0x101f9e)=>_0x4cce0f(_0x9a728d,_0x101f9e,_0x51b8ae);let g=class extends _0x3ff554{constructor(_0x37c57d,_0x1c5598){const _0x9f3955=_0x3b930f;super(),this[_0x9f3955(0x131)]=_0x37c57d,this[_0x9f3955(0x126)]=_0x1c5598,this[_0x9f3955(0x118)]();}['_initDataSource'](){const _0x3ecae6=_0x3b930f;this[_0x3ecae6(0x131)]['dataSource']=this[_0x3ecae6(0x126)],this[_0x3ecae6(0x131)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x46dea4),N(0x1,_0x437bc6(f))],g);var se=Object[_0x3b930f(0x12e)],oe=Object[_0x3b930f(0x122)],ne=(_0x43f9e7,_0x36949b,_0x4d2ef5)=>_0x36949b in _0x43f9e7?se(_0x43f9e7,_0x36949b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d2ef5}):_0x43f9e7[_0x36949b]=_0x4d2ef5,ie=(_0x274387,_0x4e6235,_0x1ffd47,_0x4c2d8e)=>{for(var _0x823a41=_0x4c2d8e>0x1?void 0x0:_0x4c2d8e?oe(_0x4e6235,_0x1ffd47):_0x4e6235,_0x51024=_0x274387['length']-0x1,_0xfb48ea;_0x51024>=0x0;_0x51024--)(_0xfb48ea=_0x274387[_0x51024])&&(_0x823a41=_0xfb48ea(_0x823a41)||_0x823a41);return _0x823a41;},w=(_0x7a87d0,_0x31e103)=>(_0x4e80aa,_0x5215fe)=>_0x31e103(_0x4e80aa,_0x5215fe,_0x7a87d0),$=(_0x1beb94,_0xb556b,_0x410d98)=>ne(_0x1beb94,typeof _0xb556b!='symbol'?_0xb556b+'':_0xb556b,_0x410d98);let b=class extends _0x346ee2{constructor(_0x5d9882=M,_0x4c0805,_0x539a8f){const _0xa6b322=_0x3b930f;super(),this['_config']=_0x5d9882,this['_injector']=_0x4c0805,this[_0xa6b322(0x10e)]=_0x539a8f;const {..._0x415b8d}=_0x4332ff({},M,this['_config']);this[_0xa6b322(0x10e)]['setConfig'](z,_0x415b8d);}[_0x3b930f(0x12c)](){const _0x3985a0=_0x3b930f;[[f],[g],[S]][_0x3985a0(0x12b)](_0x5a57c0=>{const _0x330dc7=_0x3985a0;this[_0x330dc7(0x11f)]['add'](_0x5a57c0);});}[_0x3b930f(0x103)](){const _0x208e6d=_0x3b930f;this['_injector'][_0x208e6d(0xef)](g),this['_injector'][_0x208e6d(0xef)](S);}};$(b,_0x3b930f(0x10a),W),$(b,_0x3b930f(0x109),_0x2b9512[_0x3b930f(0x13e)]),b=ie([_0x4931c0(_0x281989,_0x3bdf52,_0x176e92),w(0x1,_0x437bc6(_0x15a572)),w(0x2,_0x3f3f83)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x538291=_0x2055;(function(_0x2199bb,_0x488327){const _0x30ccad=_0x2055,_0x1a1a7d=_0x2199bb();while(!![]){try{const _0x3304a7=-parseInt(_0x30ccad(0x17b))/0x1*(parseInt(_0x30ccad(0x1bc))/0x2)+-parseInt(_0x30ccad(0x1a3))/0x3*(parseInt(_0x30ccad(0x190))/0x4)+parseInt(_0x30ccad(0x193))/0x5*(-parseInt(_0x30ccad(0x1d3))/0x6)+parseInt(_0x30ccad(0x1b4))/0x7+parseInt(_0x30ccad(0x1ac))/0x8*(parseInt(_0x30ccad(0x18d))/0x9)+parseInt(_0x30ccad(0x1c8))/0xa+parseInt(_0x30ccad(0x1b7))/0xb;if(_0x3304a7===_0x488327)break;else _0x1a1a7d['push'](_0x1a1a7d['shift']());}catch(_0x2f3a6d){_0x1a1a7d['push'](_0x1a1a7d['shift']());}}}(_0x3bcc,0x3de09));function _0x3bcc(){const _0x12b173=['threadId','27NRirsB','requireSession','post','7244kReAcO','_configService','deleteComment','638545uszlaG','ref','_init','setConfig','Reply','code','saveCommentToSnapshot','getMemberID','/edit','_config','users','replies','pipe','resolveComment','getCurrentUser','YYYY/MM/DD\x20HH:mm','48nSlLuC','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','_sessionService','_httpService','Edit','userID','resolved','90776JnFdmT','_threadCommentDataSourceService','/universer-api/user/list','_initDataSource','user','reply','UNRECOGNIZED','getOwnPropertyDescriptor','423822idlzCi','Solve','getUser','1772353zQEwug','syncUpdateMutationToColla','Solved','length','OpenOrReOpen','2IFKSXl','/universer-api/comment/unit/','symbol','createTimestamp','subscribe','_initUserSync','customRanges','comments','content','map','parse','comment','1895180fDURGT','updateComment','parentId','onReady','type','filter','addComment','unitId','pluginName','body','/delete','6IFrCvt','/solved','userId','delete','COMMENT','_injector','format','rangeId','get','stringify','payload','find','dataSource','commentUpdate$','values','35094YIGGGH','defineProperty','disposeWithMe','_userService','error','add','/add','root','getComment','thread-comment-data-source.config','_threadCommentModel','_commentService','rangeType','Add','Unknown','Delete','replyId'];_0x3bcc=function(){return _0x12b173;};return _0x3bcc();}function _0x2055(_0x1eba7f,_0x2c9c60){const _0x3bcc10=_0x3bcc();return _0x2055=function(_0x2055bc,_0x262525){_0x2055bc=_0x2055bc-0x173;let _0x3d2650=_0x3bcc10[_0x2055bc];return _0x3d2650;},_0x2055(_0x1eba7f,_0x2c9c60);}import{CommentService as _0x1c15ac,CollaborationSessionService as _0x190768,UniverCollaborationClientPlugin as _0x38e298}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x15d46a}from'@univerjs-pro/license';import{dayjs as _0x2fc50a,UserManagerService as _0x28089d,Inject as _0x329691,Injector as _0x516ead,Disposable as _0x3745f8,CustomRangeType as _0x29ac7f,UniverInstanceType as _0x369264,DependentOn as _0x322c5e,IConfigService as _0x387356,Plugin as _0x41684c,merge as _0x4b727e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x7ab6ad}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2ef6b5,IThreadCommentDataSourceService as _0x3a072d}from'@univerjs/thread-comment';import{bufferTime as _0x309254}from'rxjs';import{HTTPService as _0x3ec942}from'@univerjs/network';const W=_0x538291(0x1a5);var I=(_0xa56933=>(_0xa56933[_0xa56933[_0x538291(0x1bb)]=0x0]=_0x538291(0x1bb),_0xa56933[_0xa56933[_0x538291(0x1b9)]=0x1]=_0x538291(0x1b9),_0xa56933[_0xa56933[_0x538291(0x1b2)]=-0x1]=_0x538291(0x1b2),_0xa56933))(I||{}),v=(_0x41679c=>(_0x41679c[_0x41679c[_0x538291(0x189)]=0x0]=_0x538291(0x189),_0x41679c[_0x41679c['Add']=0x1]=_0x538291(0x188),_0x41679c[_0x41679c[_0x538291(0x197)]=0x2]='Reply',_0x41679c[_0x41679c[_0x538291(0x1a9)]=0x3]=_0x538291(0x1a9),_0x41679c[_0x41679c[_0x538291(0x18a)]=0x4]=_0x538291(0x18a),_0x41679c[_0x41679c['Solve']=0x5]=_0x538291(0x1b5),_0x41679c[_0x41679c['UNRECOGNIZED']=-0x1]=_0x538291(0x1b2),_0x41679c))(v||{});const D=_0x8d4208=>_0x2fc50a(new Date(+_0x8d4208))[_0x538291(0x1d9)](_0x538291(0x1a2)),B=async(_0xccda61,_0x34c742)=>{const _0x4e13ff=_0x538291,_0xb877de=_0xccda61[_0x4e13ff(0x174)](_0x28089d),_0x25ed45=_0xccda61[_0x4e13ff(0x174)](_0x3ec942);_0x34c742[_0x4e13ff(0x1a4)](_0x32d03c=>{const _0x4123bd=_0x4e13ff;_0xb877de[_0x4123bd(0x1b6)](_0x32d03c)&&_0x34c742[_0x4123bd(0x1d6)](_0x32d03c);}),_0x34c742['size']&&(await _0x25ed45['get'](_0x4e13ff(0x1ae),{'params':{'userIDs':[..._0x34c742]}}))[_0x4e13ff(0x1d1)][_0x4e13ff(0x19d)][_0x4e13ff(0x1a4)](_0x119ea5=>{_0x119ea5&&_0xb877de['addUser'](_0x119ea5);});};var K=Object[_0x538291(0x1b3)],V=(_0x455b9c,_0x5a6467,_0x1bdf95,_0x444213)=>{for(var _0x35c436=_0x444213>0x1?void 0x0:_0x444213?K(_0x5a6467,_0x1bdf95):_0x5a6467,_0x1b5b54=_0x455b9c['length']-0x1,_0x2962e5;_0x1b5b54>=0x0;_0x1b5b54--)(_0x2962e5=_0x455b9c[_0x1b5b54])&&(_0x35c436=_0x2962e5(_0x35c436)||_0x35c436);return _0x35c436;},p=(_0x2168e9,_0x5f506e)=>(_0x1f3b7d,_0x7841a1)=>_0x5f506e(_0x1f3b7d,_0x7841a1,_0x2168e9);let S=class extends _0x3745f8{constructor(_0x38a8c5,_0xb3cdad,_0x5890df,_0x1c2049){const _0x3b61a0=_0x538291;super(),this[_0x3b61a0(0x186)]=_0x38a8c5,this[_0x3b61a0(0x185)]=_0xb3cdad,this[_0x3b61a0(0x17e)]=_0x5890df,this[_0x3b61a0(0x1d8)]=_0x1c2049,this[_0x3b61a0(0x195)](),this[_0x3b61a0(0x1c1)]();}[_0x538291(0x1c1)](){const _0x5b1783=_0x538291;this[_0x5b1783(0x17d)](this[_0x5b1783(0x185)][_0x5b1783(0x179)][_0x5b1783(0x19f)](_0x309254(0x10))[_0x5b1783(0x1c0)](_0x226f61=>{const _0x17e890=_0x5b1783,_0x5c8fd1=new Set();_0x226f61[_0x17e890(0x1a4)](_0x3bf874=>{const _0x3948b1=_0x17e890;switch(_0x3bf874[_0x3948b1(0x1cc)]){case _0x3948b1(0x180):{const _0x5cad9e=_0x3bf874[_0x3948b1(0x176)]['personId'];_0x5c8fd1[_0x3948b1(0x180)](_0x5cad9e);break;}}}),B(this[_0x17e890(0x1d8)],_0x5c8fd1);}));}[_0x538291(0x195)](){const _0x173566=_0x538291;this[_0x173566(0x17d)](this[_0x173566(0x186)][_0x173566(0x179)]['subscribe'](async _0x3757a8=>{const _0x2a4326=_0x173566;var _0x1079f0,_0x513fcb,_0x399fd0,_0x1b41a4;const _0x261fc5=(_0x1079f0=this[_0x2a4326(0x185)]['getUnit'](_0x3757a8[_0x2a4326(0x1cf)])[_0x2a4326(0x177)](_0x52efdf=>_0x52efdf[_0x2a4326(0x18c)]===_0x3757a8['threadId']))==null?void 0x0:_0x1079f0[_0x2a4326(0x182)];if(!_0x261fc5)return;const {unitId:_0x49e7b2,subUnitId:_0x48f14f}=_0x261fc5;switch(_0x3757a8[_0x2a4326(0x1b0)]&&this[_0x2a4326(0x17e)]['addUser'](_0x3757a8['user']),_0x3757a8[_0x2a4326(0x1cc)]){case v[_0x2a4326(0x188)]:break;case v['Reply']:{this[_0x2a4326(0x185)][_0x2a4326(0x1ce)](_0x49e7b2,_0x48f14f,{'unitId':_0x49e7b2,'subUnitId':_0x48f14f,'ref':'','id':_0x3757a8[_0x2a4326(0x18b)],'dT':D(+_0x3757a8[_0x2a4326(0x1bf)]),'threadId':_0x3757a8[_0x2a4326(0x18c)],'personId':(_0x399fd0=(_0x513fcb=_0x3757a8[_0x2a4326(0x1b0)])==null?void 0x0:_0x513fcb[_0x2a4326(0x1aa)])!=null?_0x399fd0:_0x3757a8['userId'],'text':JSON[_0x2a4326(0x1c6)](_0x3757a8[_0x2a4326(0x1c4)]),'parentId':_0x261fc5['id']});break;}case v[_0x2a4326(0x18a)]:{const _0x307deb=this[_0x2a4326(0x185)][_0x2a4326(0x183)](_0x49e7b2,_0x48f14f,_0x3757a8[_0x2a4326(0x18b)]);_0x307deb&&_0x307deb[_0x2a4326(0x1ca)]&&this['_threadCommentModel'][_0x2a4326(0x192)](_0x49e7b2,_0x48f14f,_0x3757a8[_0x2a4326(0x18b)]);break;}case v[_0x2a4326(0x1a9)]:{this['_threadCommentModel']['updateComment'](_0x49e7b2,_0x48f14f,{'commentId':_0x3757a8[_0x2a4326(0x18b)],'text':JSON[_0x2a4326(0x1c6)](_0x3757a8[_0x2a4326(0x1c4)])});break;}case v[_0x2a4326(0x1b5)]:{const _0x2cdfcc=(_0x1b41a4=this[_0x2a4326(0x185)]['getUnit'](_0x3757a8[_0x2a4326(0x1cf)])[_0x2a4326(0x177)](_0x2b702f=>_0x2b702f[_0x2a4326(0x18c)]===_0x3757a8['threadId']))==null?void 0x0:_0x1b41a4[_0x2a4326(0x182)];_0x2cdfcc&&this[_0x2a4326(0x185)][_0x2a4326(0x1a0)](_0x49e7b2,_0x48f14f,_0x2cdfcc['id'],_0x3757a8[_0x2a4326(0x1a6)]===I[_0x2a4326(0x1b9)]);break;}}}));}};S=V([p(0x0,_0x329691(_0x1c15ac)),p(0x1,_0x329691(_0x2ef6b5)),p(0x2,_0x329691(_0x28089d)),p(0x3,_0x329691(_0x516ead))],S);const z=_0x538291(0x184),M={};var k=Object[_0x538291(0x1b3)],Q=(_0x1f2b4f,_0xff8fc8,_0x5a0dc2,_0x53a9f5)=>{const _0x2b98ba=_0x538291;for(var _0x3cb3d4=_0x53a9f5>0x1?void 0x0:_0x53a9f5?k(_0xff8fc8,_0x5a0dc2):_0xff8fc8,_0x301514=_0x1f2b4f[_0x2b98ba(0x1ba)]-0x1,_0x358680;_0x301514>=0x0;_0x301514--)(_0x358680=_0x1f2b4f[_0x301514])&&(_0x3cb3d4=_0x358680(_0x3cb3d4)||_0x3cb3d4);return _0x3cb3d4;},_=(_0x119234,_0xcaf1f8)=>(_0x51066f,_0x1df5fc)=>_0xcaf1f8(_0x51066f,_0x1df5fc,_0x119234);function X(_0x520b7b,_0x2672bc){const _0x551ea5=_0x538291,_0x15cf3a=_0x520b7b[_0x551ea5(0x19e)][0x0];return{..._0x2672bc,'id':_0x15cf3a[_0x551ea5(0x18b)],'resolved':_0x520b7b[_0x551ea5(0x1a6)]===0x1,'dT':D(_0x15cf3a['createTimestamp']),'personId':_0x15cf3a['userId'],'threadId':_0x15cf3a['threadId']};}function ee(_0x8d6b51,_0x3cc82a,_0x3f9fb2){const _0x8fc40a=_0x538291;var _0x53dce2,_0x1d1ac1;if(((_0x1d1ac1=(_0x53dce2=_0x8d6b51==null?void 0x0:_0x8d6b51[_0x8fc40a(0x19e)])==null?void 0x0:_0x53dce2[_0x8fc40a(0x1ba)])!=null?_0x1d1ac1:0x0)>0x0){const _0x5c8fe1=(_0xeed7d0,_0x325a62)=>({'id':_0xeed7d0[_0x8fc40a(0x18b)],'threadId':_0xeed7d0[_0x8fc40a(0x18c)],'dT':D(_0xeed7d0['createTimestamp']),'personId':_0xeed7d0[_0x8fc40a(0x1d5)],'resolved':_0x8d6b51[_0x8fc40a(0x1a6)]===I[_0x8fc40a(0x1b9)],'unitId':_0x3cc82a,'subUnitId':_0x3f9fb2,'text':JSON[_0x8fc40a(0x1c6)](_0xeed7d0[_0x8fc40a(0x1c4)]),'parentId':_0x325a62}),_0x897949=_0x5c8fe1(_0x8d6b51['replies'][0x0]);return{..._0x897949,'children':_0x8d6b51[_0x8fc40a(0x19e)]['slice'](0x1)[_0x8fc40a(0x1c5)](_0x36de77=>_0x5c8fe1(_0x36de77,_0x897949['id']))};}return null;}let f=class{constructor(_0x36d7d3,_0x236f7c,_0x2729ce,_0x307b9b){const _0x16593c=_0x538291;this[_0x16593c(0x1a8)]=_0x36d7d3,this[_0x16593c(0x17e)]=_0x236f7c,this[_0x16593c(0x1a7)]=_0x2729ce,this[_0x16593c(0x1d8)]=_0x307b9b;}async[_0x538291(0x1ce)](_0x9d1832){const _0x45c7d8=_0x538291;var _0x4e0ed1,_0x99d1f2;const {parentId:_0x21c98f,unitId:_0x1ad9ab,text:_0x3ba24f,threadId:_0x10bea4}=_0x9d1832,_0x1aa727=(_0x99d1f2=(_0x4e0ed1=_0x3ba24f['customRanges'])==null?void 0x0:_0x4e0ed1[_0x45c7d8(0x1cd)](_0x5c4fe1=>_0x5c4fe1['rangeType']===_0x29ac7f[_0x45c7d8(0x1d7)])[_0x45c7d8(0x1c5)](_0x23631a=>_0x23631a[_0x45c7d8(0x173)]))!=null?_0x99d1f2:[],_0x2eaa3a=JSON[_0x45c7d8(0x175)](_0x3ba24f),_0x41fe6b=(await this[_0x45c7d8(0x1a7)][_0x45c7d8(0x18e)](_0x1ad9ab))[_0x45c7d8(0x19a)]();if(_0x21c98f){const _0x484fa8={'memberId':_0x41fe6b,'unitId':_0x1ad9ab,'content':_0x2eaa3a,'mention':_0x1aa727,'threadId':_0x10bea4},_0x35b2e2=(await this[_0x45c7d8(0x1a8)][_0x45c7d8(0x18f)](_0x45c7d8(0x1bd)+_0x1ad9ab+'/reply',{'body':_0x484fa8}))[_0x45c7d8(0x1d1)][_0x45c7d8(0x1b1)];return{..._0x9d1832,'id':_0x35b2e2[_0x45c7d8(0x18b)],'dT':_0x2fc50a(+_0x35b2e2[_0x45c7d8(0x1bf)])[_0x45c7d8(0x1d9)](_0x45c7d8(0x1a2)),'personId':_0x35b2e2[_0x45c7d8(0x1d5)]};}else{const _0x34bbfd={'memberId':_0x41fe6b,'unitId':_0x1ad9ab,'content':_0x2eaa3a,'mention':_0x1aa727},_0x565a61=await this[_0x45c7d8(0x1a8)][_0x45c7d8(0x18f)](_0x45c7d8(0x1bd)+_0x1ad9ab+_0x45c7d8(0x181),{'body':_0x34bbfd});return X(_0x565a61['body'][_0x45c7d8(0x1c7)],_0x9d1832);}}async[_0x538291(0x1c9)](_0x58d82b){const _0x4577ab=_0x538291;var _0x11da9a,_0x3dd819;const {text:_0x5f5a75,unitId:_0x8b3d30}=_0x58d82b,_0x24030d=(_0x3dd819=(_0x11da9a=_0x5f5a75[_0x4577ab(0x1c2)])==null?void 0x0:_0x11da9a[_0x4577ab(0x1cd)](_0x44a8dd=>_0x44a8dd[_0x4577ab(0x187)]===_0x29ac7f[_0x4577ab(0x1d7)])['map'](_0x328309=>_0x328309[_0x4577ab(0x173)]))!=null?_0x3dd819:[],_0x19cb58=JSON[_0x4577ab(0x175)](_0x5f5a75),_0xf76dbd=_0x58d82b['threadId'],_0x2cabc9=_0x58d82b['id'],_0x38828a={'memberId':(await this[_0x4577ab(0x1a7)][_0x4577ab(0x18e)](_0x8b3d30))[_0x4577ab(0x19a)](),'unitId':_0x8b3d30,'threadId':_0xf76dbd,'mention':_0x24030d,'content':_0x19cb58,'replyId':_0x2cabc9},_0x1b206c=await this[_0x4577ab(0x1a8)][_0x4577ab(0x18f)](_0x4577ab(0x1bd)+_0x8b3d30+_0x4577ab(0x19b),{'body':_0x38828a});return!_0x1b206c['body'][_0x4577ab(0x17f)]||_0x1b206c[_0x4577ab(0x1d1)][_0x4577ab(0x17f)]['code']===0x1;}async[_0x538291(0x1a0)](_0x11ce62){const _0x1d8a7b=_0x538291,{unitId:_0x345cac}=_0x11ce62,_0x1a5921=_0x11ce62['threadId'],_0x22bb61={'memberId':this[_0x1d8a7b(0x17e)][_0x1d8a7b(0x1a1)]()[_0x1d8a7b(0x1aa)],'unitId':_0x345cac,'threadId':_0x1a5921,'solved':_0x11ce62[_0x1d8a7b(0x1ab)]?I[_0x1d8a7b(0x1b9)]:I['OpenOrReOpen']},_0x4eea7f=await this['_httpService'][_0x1d8a7b(0x18f)]('/universer-api/comment/unit/'+_0x345cac+_0x1d8a7b(0x1d4),{'body':_0x22bb61});return!_0x4eea7f[_0x1d8a7b(0x1d1)][_0x1d8a7b(0x17f)]||_0x4eea7f['body'][_0x1d8a7b(0x17f)]['code']===0x1;}async[_0x538291(0x192)](_0x468974,_0x529428,_0x2624b8,_0xe6714){const _0x42526d=_0x538291,_0x3f4001={'memberId':(await this[_0x42526d(0x1a7)][_0x42526d(0x18e)](_0x468974))[_0x42526d(0x19a)](),'threadId':_0x2624b8,'replyId':_0xe6714,'unitId':_0x468974},_0x3cb96d=await this[_0x42526d(0x1a8)][_0x42526d(0x18f)](_0x42526d(0x1bd)+_0x468974+_0x42526d(0x1d2),{'body':_0x3f4001});return!_0x3cb96d['body'][_0x42526d(0x17f)]||_0x3cb96d['body']['error'][_0x42526d(0x198)]===0x1;}async['listComments'](_0x48c972,_0x14d79c,_0x5cbcc4){const _0x513782=_0x538291,_0x3e9161={'unitId':_0x48c972,'threadId':_0x5cbcc4},_0x155762=await this['_httpService'][_0x513782(0x18f)](_0x513782(0x1bd)+_0x48c972+'/list',{'body':_0x3e9161}),_0x5791ea=_0x5cbcc4[_0x513782(0x1c5)](_0x5d076c=>ee(_0x155762[_0x513782(0x1d1)][_0x513782(0x1c3)][_0x5d076c],_0x48c972,_0x14d79c))['filter'](Boolean);return Object[_0x513782(0x17a)](_0x155762[_0x513782(0x1d1)][_0x513782(0x19d)])[_0x513782(0x1a4)](_0x3d79ab=>{const _0x2b7ee8=_0x513782;this[_0x2b7ee8(0x17e)]['addUser'](_0x3d79ab);}),_0x5791ea;}[_0x538291(0x199)](_0x1e5a2d){const _0x44e406=_0x538291;return{'id':_0x1e5a2d['id'],'threadId':_0x1e5a2d[_0x44e406(0x18c)],'ref':_0x1e5a2d[_0x44e406(0x194)]};}};f=Q([_(0x0,_0x329691(_0x3ec942)),_(0x1,_0x329691(_0x28089d)),_(0x2,_0x329691(_0x190768)),_(0x3,_0x329691(_0x516ead))],f);var re=Object[_0x538291(0x1b3)],te=(_0x8041a6,_0xb50ba1,_0x1249f5,_0x27a16f)=>{const _0x180695=_0x538291;for(var _0x5c1b68=_0x27a16f>0x1?void 0x0:_0x27a16f?re(_0xb50ba1,_0x1249f5):_0xb50ba1,_0x52f524=_0x8041a6[_0x180695(0x1ba)]-0x1,_0x2c29e6;_0x52f524>=0x0;_0x52f524--)(_0x2c29e6=_0x8041a6[_0x52f524])&&(_0x5c1b68=_0x2c29e6(_0x5c1b68)||_0x5c1b68);return _0x5c1b68;},N=(_0x3ca649,_0x55dcb7)=>(_0x351829,_0x4ea4a2)=>_0x55dcb7(_0x351829,_0x4ea4a2,_0x3ca649);let g=class extends _0x3745f8{constructor(_0x54dfb6,_0x894be5){const _0x18d696=_0x538291;super(),this[_0x18d696(0x1ad)]=_0x54dfb6,this['_threadCommentDataSource']=_0x894be5,this[_0x18d696(0x1af)]();}[_0x538291(0x1af)](){const _0x4e5d2f=_0x538291;this['_threadCommentDataSourceService'][_0x4e5d2f(0x178)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x4e5d2f(0x1b8)]=!0x1;}};g=te([N(0x0,_0x3a072d),N(0x1,_0x329691(f))],g);var se=Object[_0x538291(0x17c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1270e6,_0x9d2c40,_0x4ee5b5)=>_0x9d2c40 in _0x1270e6?se(_0x1270e6,_0x9d2c40,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ee5b5}):_0x1270e6[_0x9d2c40]=_0x4ee5b5,ie=(_0x48c929,_0x408c92,_0x137a77,_0x291fdc)=>{const _0x3383cd=_0x538291;for(var _0x572b0a=_0x291fdc>0x1?void 0x0:_0x291fdc?oe(_0x408c92,_0x137a77):_0x408c92,_0x4d7c1c=_0x48c929[_0x3383cd(0x1ba)]-0x1,_0x406a04;_0x4d7c1c>=0x0;_0x4d7c1c--)(_0x406a04=_0x48c929[_0x4d7c1c])&&(_0x572b0a=_0x406a04(_0x572b0a)||_0x572b0a);return _0x572b0a;},w=(_0x5d543c,_0x40fa1b)=>(_0x3950f9,_0x1040ef)=>_0x40fa1b(_0x3950f9,_0x1040ef,_0x5d543c),$=(_0xc4b4f4,_0x2d6c68,_0xa676de)=>ne(_0xc4b4f4,typeof _0x2d6c68!=_0x538291(0x1be)?_0x2d6c68+'':_0x2d6c68,_0xa676de);let b=class extends _0x41684c{constructor(_0x3e48fc=M,_0x32d75d,_0x31acf9){const _0x192ce9=_0x538291;super(),this['_config']=_0x3e48fc,this[_0x192ce9(0x1d8)]=_0x32d75d,this[_0x192ce9(0x191)]=_0x31acf9;const {..._0x3a9ee7}=_0x4b727e({},M,this[_0x192ce9(0x19c)]);this[_0x192ce9(0x191)][_0x192ce9(0x196)](z,_0x3a9ee7);}['onStarting'](){const _0x5318cd=_0x538291;[[f],[g],[S]][_0x5318cd(0x1a4)](_0x38800f=>{const _0x14054d=_0x5318cd;this[_0x14054d(0x1d8)]['add'](_0x38800f);});}[_0x538291(0x1cb)](){const _0x586434=_0x538291;this[_0x586434(0x1d8)][_0x586434(0x174)](g),this[_0x586434(0x1d8)][_0x586434(0x174)](S);}};$(b,_0x538291(0x1d0),W),$(b,'type',_0x369264['UNIVER_UNKNOWN']),b=ie([_0x322c5e(_0x7ab6ad,_0x38e298,_0x15d46a),w(0x1,_0x329691(_0x516ead)),w(0x2,_0x387356)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4398(_0x461641,_0x467d6e){const _0x47e643=_0x47e6();return _0x4398=function(_0x439832,_0x5bb3a7){_0x439832=_0x439832-0x173;let _0x9c74f1=_0x47e643[_0x439832];return _0x9c74f1;},_0x4398(_0x461641,_0x467d6e);}(function(_0x20d3d8,_0x5292c9){const _0x34ae38=_0x4398,_0x3b1fa0=_0x20d3d8();while(!![]){try{const _0x19e5dd=-parseInt(_0x34ae38(0x180))/0x1+-parseInt(_0x34ae38(0x185))/0x2*(-parseInt(_0x34ae38(0x1d1))/0x3)+-parseInt(_0x34ae38(0x18a))/0x4+-parseInt(_0x34ae38(0x188))/0x5*(parseInt(_0x34ae38(0x1b7))/0x6)+-parseInt(_0x34ae38(0x1eb))/0x7*(parseInt(_0x34ae38(0x1e3))/0x8)+-parseInt(_0x34ae38(0x1c7))/0x9+-parseInt(_0x34ae38(0x1ad))/0xa*(-parseInt(_0x34ae38(0x1c5))/0xb);if(_0x19e5dd===_0x5292c9)break;else _0x3b1fa0['push'](_0x3b1fa0['shift']());}catch(_0x34472b){_0x3b1fa0['push'](_0x3b1fa0['shift']());}}}(_0x47e6,0x2a2f1),function(_0xfd4b7b,_0x834232){const _0x269ed4=_0x4398;typeof exports==_0x269ed4(0x17a)&&typeof module<'u'?_0x834232(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require(_0x269ed4(0x1bc)),require(_0x269ed4(0x18d)),require(_0x269ed4(0x1cb)),require(_0x269ed4(0x1a0)),require('@univerjs/network')):typeof define==_0x269ed4(0x1c2)&&define[_0x269ed4(0x1ca)]?define([_0x269ed4(0x1b8),'@univerjs-pro/collaboration-client',_0x269ed4(0x1ce),_0x269ed4(0x1bc),_0x269ed4(0x18d),_0x269ed4(0x1cb),'rxjs',_0x269ed4(0x1d5)],_0x834232):(_0xfd4b7b=typeof globalThis<'u'?globalThis:_0xfd4b7b||self,_0x834232(_0xfd4b7b['UniverProThreadCommentDatasource']={},_0xfd4b7b['UniverProCollaborationClient'],_0xfd4b7b[_0x269ed4(0x1d4)],_0xfd4b7b[_0x269ed4(0x1ea)],_0xfd4b7b['UniverThreadCommentUi'],_0xfd4b7b[_0x269ed4(0x1a6)],_0xfd4b7b[_0x269ed4(0x1a0)],_0xfd4b7b[_0x269ed4(0x1f3)]));}(this,function(_0x11ecc3,_0x5d20d9,_0x11ab02,_0x3c648d,_0x20cd00,_0x3b1059,_0xd85e6f,_0x48603c){'use strict';const _0x3f0ee5=_0x4398;const _0x29c887=_0x3f0ee5(0x191);var _0x8e7e8b=(_0x7fdf33=>(_0x7fdf33[_0x7fdf33[_0x3f0ee5(0x184)]=0x0]=_0x3f0ee5(0x184),_0x7fdf33[_0x7fdf33['Solved']=0x1]=_0x3f0ee5(0x1d7),_0x7fdf33[_0x7fdf33[_0x3f0ee5(0x1e1)]=-0x1]=_0x3f0ee5(0x1e1),_0x7fdf33))(_0x8e7e8b||{}),_0x7af052=(_0x1b5562=>(_0x1b5562[_0x1b5562['Unknown']=0x0]=_0x3f0ee5(0x1d6),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1e8)]=0x1]=_0x3f0ee5(0x1e8),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1f2)]=0x2]=_0x3f0ee5(0x1f2),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1cd)]=0x3]=_0x3f0ee5(0x1cd),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1c9)]=0x4]=_0x3f0ee5(0x1c9),_0x1b5562[_0x1b5562[_0x3f0ee5(0x189)]=0x5]=_0x3f0ee5(0x189),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1e1)]=-0x1]='UNRECOGNIZED',_0x1b5562))(_0x7af052||{});const _0x2a4927=_0x35fe8e=>_0x3c648d[_0x3f0ee5(0x19a)](new Date(+_0x35fe8e))['format']('YYYY/MM/DD\x20HH:mm'),_0x4a1b1f=async(_0x142d99,_0x3d0266)=>{const _0x4cbb8d=_0x3f0ee5,_0x91f4bb=_0x142d99['get'](_0x3c648d[_0x4cbb8d(0x19b)]),_0x2424fc=_0x142d99[_0x4cbb8d(0x1bf)](_0x48603c[_0x4cbb8d(0x1b4)]);_0x3d0266[_0x4cbb8d(0x1ab)](_0x1cc6a6=>{const _0x510e8a=_0x4cbb8d;_0x91f4bb[_0x510e8a(0x177)](_0x1cc6a6)&&_0x3d0266[_0x510e8a(0x1a1)](_0x1cc6a6);}),_0x3d0266['size']&&(await _0x2424fc[_0x4cbb8d(0x1bf)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3d0266]}}))[_0x4cbb8d(0x1d3)]['users'][_0x4cbb8d(0x1ab)](_0x249f94=>{const _0x2edff5=_0x4cbb8d;_0x249f94&&_0x91f4bb[_0x2edff5(0x18b)](_0x249f94);});};var _0x53e6be=Object[_0x3f0ee5(0x1f8)],_0x26083b=(_0x3ecb63,_0x11377e,_0x116f94,_0x2eed99)=>{const _0x4bcd19=_0x3f0ee5;for(var _0x2f7a34=_0x2eed99>0x1?void 0x0:_0x2eed99?_0x53e6be(_0x11377e,_0x116f94):_0x11377e,_0x12b210=_0x3ecb63[_0x4bcd19(0x199)]-0x1,_0x4276e0;_0x12b210>=0x0;_0x12b210--)(_0x4276e0=_0x3ecb63[_0x12b210])&&(_0x2f7a34=_0x4276e0(_0x2f7a34)||_0x2f7a34);return _0x2f7a34;},_0x4ffaf4=(_0x3cfbed,_0x1842ae)=>(_0x107fbb,_0x11981e)=>_0x1842ae(_0x107fbb,_0x11981e,_0x3cfbed);let _0xe4df36=class extends _0x3c648d[_0x3f0ee5(0x1db)]{constructor(_0x36d134,_0x1f7351,_0x591a2b,_0x2fb144){const _0x52c7e0=_0x3f0ee5;super(),this[_0x52c7e0(0x1aa)]=_0x36d134,this[_0x52c7e0(0x1f0)]=_0x1f7351,this[_0x52c7e0(0x1ee)]=_0x591a2b,this[_0x52c7e0(0x1d2)]=_0x2fb144,this['_init'](),this[_0x52c7e0(0x1af)]();}['_initUserSync'](){const _0x423b42=_0x3f0ee5;this[_0x423b42(0x1e7)](this[_0x423b42(0x1f0)][_0x423b42(0x179)][_0x423b42(0x183)](_0xd85e6f[_0x423b42(0x1dc)](0x10))[_0x423b42(0x19f)](_0x746cf8=>{const _0x43efdc=new Set();_0x746cf8['forEach'](_0x2bc85d=>{const _0x12b575=_0x4398;switch(_0x2bc85d[_0x12b575(0x187)]){case _0x12b575(0x176):{const _0x33cd34=_0x2bc85d['payload'][_0x12b575(0x19c)];_0x43efdc[_0x12b575(0x176)](_0x33cd34);break;}}}),_0x4a1b1f(this['_injector'],_0x43efdc);}));}[_0x3f0ee5(0x1f4)](){const _0x51a79c=_0x3f0ee5;this['disposeWithMe'](this[_0x51a79c(0x1aa)][_0x51a79c(0x179)][_0x51a79c(0x19f)](async _0x39f27e=>{const _0x5ee7f3=_0x51a79c;var _0x154b1b,_0x230e6b,_0x3397ac,_0x37082b;const _0x29bfc5=(_0x154b1b=this[_0x5ee7f3(0x1f0)][_0x5ee7f3(0x1b3)](_0x39f27e[_0x5ee7f3(0x197)])[_0x5ee7f3(0x181)](_0x517ee7=>_0x517ee7[_0x5ee7f3(0x1c1)]===_0x39f27e[_0x5ee7f3(0x1c1)]))==null?void 0x0:_0x154b1b[_0x5ee7f3(0x1ba)];if(!_0x29bfc5)return;const {unitId:_0x4e1cdc,subUnitId:_0x556f1c}=_0x29bfc5;switch(_0x39f27e[_0x5ee7f3(0x186)]&&this[_0x5ee7f3(0x1ee)][_0x5ee7f3(0x18b)](_0x39f27e[_0x5ee7f3(0x186)]),_0x39f27e[_0x5ee7f3(0x187)]){case _0x7af052[_0x5ee7f3(0x1e8)]:break;case _0x7af052[_0x5ee7f3(0x1f2)]:{this['_threadCommentModel']['addComment'](_0x4e1cdc,_0x556f1c,{'unitId':_0x4e1cdc,'subUnitId':_0x556f1c,'ref':'','id':_0x39f27e[_0x5ee7f3(0x1bd)],'dT':_0x2a4927(+_0x39f27e['createTimestamp']),'threadId':_0x39f27e[_0x5ee7f3(0x1c1)],'personId':(_0x3397ac=(_0x230e6b=_0x39f27e[_0x5ee7f3(0x186)])==null?void 0x0:_0x230e6b[_0x5ee7f3(0x1c3)])!=null?_0x3397ac:_0x39f27e[_0x5ee7f3(0x1d9)],'text':JSON[_0x5ee7f3(0x17e)](_0x39f27e[_0x5ee7f3(0x1a2)]),'parentId':_0x29bfc5['id']});break;}case _0x7af052['Delete']:{const _0x368463=this[_0x5ee7f3(0x1f0)][_0x5ee7f3(0x1ac)](_0x4e1cdc,_0x556f1c,_0x39f27e[_0x5ee7f3(0x1bd)]);_0x368463&&_0x368463[_0x5ee7f3(0x1ef)]&&this['_threadCommentModel'][_0x5ee7f3(0x1a7)](_0x4e1cdc,_0x556f1c,_0x39f27e[_0x5ee7f3(0x1bd)]);break;}case _0x7af052[_0x5ee7f3(0x1cd)]:{this[_0x5ee7f3(0x1f0)][_0x5ee7f3(0x17c)](_0x4e1cdc,_0x556f1c,{'commentId':_0x39f27e[_0x5ee7f3(0x1bd)],'text':JSON['parse'](_0x39f27e[_0x5ee7f3(0x1a2)])});break;}case _0x7af052[_0x5ee7f3(0x189)]:{const _0x29719b=(_0x37082b=this['_threadCommentModel'][_0x5ee7f3(0x1b3)](_0x39f27e[_0x5ee7f3(0x197)])[_0x5ee7f3(0x181)](_0x2a1dee=>_0x2a1dee[_0x5ee7f3(0x1c1)]===_0x39f27e[_0x5ee7f3(0x1c1)]))==null?void 0x0:_0x37082b[_0x5ee7f3(0x1ba)];_0x29719b&&this['_threadCommentModel'][_0x5ee7f3(0x1a9)](_0x4e1cdc,_0x556f1c,_0x29719b['id'],_0x39f27e[_0x5ee7f3(0x1e9)]===_0x8e7e8b[_0x5ee7f3(0x1d7)]);break;}}}));}};_0xe4df36=_0x26083b([_0x4ffaf4(0x0,_0x3c648d[_0x3f0ee5(0x1c0)](_0x5d20d9[_0x3f0ee5(0x1e2)])),_0x4ffaf4(0x1,_0x3c648d['Inject'](_0x3b1059['ThreadCommentModel'])),_0x4ffaf4(0x2,_0x3c648d[_0x3f0ee5(0x1c0)](_0x3c648d[_0x3f0ee5(0x19b)])),_0x4ffaf4(0x3,_0x3c648d['Inject'](_0x3c648d[_0x3f0ee5(0x1de)]))],_0xe4df36);const _0x3a876c=_0x3f0ee5(0x1e5),_0x1e4835={};var _0x20a5a8=Object['getOwnPropertyDescriptor'],_0x4f199e=(_0x1115d3,_0x406fc6,_0x62fb81,_0x19bf26)=>{for(var _0x3c981b=_0x19bf26>0x1?void 0x0:_0x19bf26?_0x20a5a8(_0x406fc6,_0x62fb81):_0x406fc6,_0x1ccb63=_0x1115d3['length']-0x1,_0x4d8b7f;_0x1ccb63>=0x0;_0x1ccb63--)(_0x4d8b7f=_0x1115d3[_0x1ccb63])&&(_0x3c981b=_0x4d8b7f(_0x3c981b)||_0x3c981b);return _0x3c981b;},_0x346b08=(_0x9ac741,_0x1997cb)=>(_0x5cc502,_0x10277c)=>_0x1997cb(_0x5cc502,_0x10277c,_0x9ac741);function _0x115485(_0x4dc836,_0x1d2a90){const _0x2755c8=_0x3f0ee5,_0x294372=_0x4dc836[_0x2755c8(0x17b)][0x0];return{..._0x1d2a90,'id':_0x294372[_0x2755c8(0x1bd)],'resolved':_0x4dc836[_0x2755c8(0x1e9)]===0x1,'dT':_0x2a4927(_0x294372[_0x2755c8(0x1c4)]),'personId':_0x294372[_0x2755c8(0x1d9)],'threadId':_0x294372[_0x2755c8(0x1c1)]};}function _0x532479(_0x188679,_0x16d735,_0xfbdf15){const _0x258c42=_0x3f0ee5;var _0x2b2a02,_0x508eb0;if(((_0x508eb0=(_0x2b2a02=_0x188679==null?void 0x0:_0x188679[_0x258c42(0x17b)])==null?void 0x0:_0x2b2a02[_0x258c42(0x199)])!=null?_0x508eb0:0x0)>0x0){const _0x1aed6b=(_0x9bbad3,_0x27e5c5)=>({'id':_0x9bbad3[_0x258c42(0x1bd)],'threadId':_0x9bbad3[_0x258c42(0x1c1)],'dT':_0x2a4927(_0x9bbad3[_0x258c42(0x1c4)]),'personId':_0x9bbad3[_0x258c42(0x1d9)],'resolved':_0x188679[_0x258c42(0x1e9)]===_0x8e7e8b[_0x258c42(0x1d7)],'unitId':_0x16d735,'subUnitId':_0xfbdf15,'text':JSON[_0x258c42(0x17e)](_0x9bbad3[_0x258c42(0x1a2)]),'parentId':_0x27e5c5}),_0x4f61a4=_0x1aed6b(_0x188679['replies'][0x0]);return{..._0x4f61a4,'children':_0x188679[_0x258c42(0x17b)][_0x258c42(0x1b6)](0x1)[_0x258c42(0x19e)](_0x243efa=>_0x1aed6b(_0x243efa,_0x4f61a4['id']))};}return null;}let _0x474c81=class{constructor(_0x30773b,_0x55b807,_0xdd47ff,_0x23fd3e){const _0x7c1530=_0x3f0ee5;this[_0x7c1530(0x1f5)]=_0x30773b,this[_0x7c1530(0x1ee)]=_0x55b807,this['_sessionService']=_0xdd47ff,this[_0x7c1530(0x1d2)]=_0x23fd3e;}async[_0x3f0ee5(0x1e0)](_0x2397f4){const _0x26a1e6=_0x3f0ee5;var _0x391b24,_0x5371db;const {parentId:_0x444621,unitId:_0xa1e839,text:_0x2eefdf,threadId:_0x32b298}=_0x2397f4,_0x4f9d41=(_0x5371db=(_0x391b24=_0x2eefdf['customRanges'])==null?void 0x0:_0x391b24[_0x26a1e6(0x182)](_0x1da5b7=>_0x1da5b7[_0x26a1e6(0x1b1)]===_0x3c648d[_0x26a1e6(0x1e6)][_0x26a1e6(0x1f7)])[_0x26a1e6(0x19e)](_0xf6d126=>_0xf6d126['rangeId']))!=null?_0x5371db:[],_0x2a765e=JSON['stringify'](_0x2eefdf),_0x4dd0d3=(await this[_0x26a1e6(0x1ed)][_0x26a1e6(0x1a4)](_0xa1e839))['getMemberID']();if(_0x444621){const _0x1b194d={'memberId':_0x4dd0d3,'unitId':_0xa1e839,'content':_0x2a765e,'mention':_0x4f9d41,'threadId':_0x32b298},_0x2f80fd=(await this[_0x26a1e6(0x1f5)][_0x26a1e6(0x193)]('/universer-api/comment/unit/'+_0xa1e839+_0x26a1e6(0x18c),{'body':_0x1b194d}))['body']['reply'];return{..._0x2397f4,'id':_0x2f80fd[_0x26a1e6(0x1bd)],'dT':_0x3c648d[_0x26a1e6(0x19a)](+_0x2f80fd[_0x26a1e6(0x1c4)])['format'](_0x26a1e6(0x1be)),'personId':_0x2f80fd[_0x26a1e6(0x1d9)]};}else{const _0x33b255={'memberId':_0x4dd0d3,'unitId':_0xa1e839,'content':_0x2a765e,'mention':_0x4f9d41},_0x400ff1=await this[_0x26a1e6(0x1f5)][_0x26a1e6(0x193)](_0x26a1e6(0x1da)+_0xa1e839+'/add',{'body':_0x33b255});return _0x115485(_0x400ff1['body'][_0x26a1e6(0x1d8)],_0x2397f4);}}async[_0x3f0ee5(0x17c)](_0x14700b){const _0x59762f=_0x3f0ee5;var _0x1b9466,_0xc7f378;const {text:_0x1041b5,unitId:_0x55907b}=_0x14700b,_0x5c9b21=(_0xc7f378=(_0x1b9466=_0x1041b5['customRanges'])==null?void 0x0:_0x1b9466['filter'](_0x393031=>_0x393031['rangeType']===_0x3c648d[_0x59762f(0x1e6)][_0x59762f(0x1f7)])[_0x59762f(0x19e)](_0x1eabaa=>_0x1eabaa[_0x59762f(0x1df)]))!=null?_0xc7f378:[],_0x2364dc=JSON[_0x59762f(0x1a3)](_0x1041b5),_0x579876=_0x14700b[_0x59762f(0x1c1)],_0x2481e8=_0x14700b['id'],_0x2b4bac={'memberId':(await this[_0x59762f(0x1ed)][_0x59762f(0x1a4)](_0x55907b))['getMemberID'](),'unitId':_0x55907b,'threadId':_0x579876,'mention':_0x5c9b21,'content':_0x2364dc,'replyId':_0x2481e8},_0x50fa94=await this[_0x59762f(0x1f5)]['post'](_0x59762f(0x1da)+_0x55907b+'/edit',{'body':_0x2b4bac});return!_0x50fa94[_0x59762f(0x1d3)][_0x59762f(0x17d)]||_0x50fa94[_0x59762f(0x1d3)]['error'][_0x59762f(0x196)]===0x1;}async['resolveComment'](_0x1cf1cd){const _0x8dad33=_0x3f0ee5,{unitId:_0x259342}=_0x1cf1cd,_0x442187=_0x1cf1cd[_0x8dad33(0x1c1)],_0x250538={'memberId':this['_userService'][_0x8dad33(0x1cf)]()['userID'],'unitId':_0x259342,'threadId':_0x442187,'solved':_0x1cf1cd[_0x8dad33(0x18f)]?_0x8e7e8b[_0x8dad33(0x1d7)]:_0x8e7e8b[_0x8dad33(0x184)]},_0x35c96a=await this[_0x8dad33(0x1f5)]['post'](_0x8dad33(0x1da)+_0x259342+'/solved',{'body':_0x250538});return!_0x35c96a[_0x8dad33(0x1d3)][_0x8dad33(0x17d)]||_0x35c96a['body'][_0x8dad33(0x17d)][_0x8dad33(0x196)]===0x1;}async[_0x3f0ee5(0x1a7)](_0x20431c,_0x2baf60,_0x88c2c,_0x2e3f6b){const _0x32fbd7=_0x3f0ee5,_0x53d7a9={'memberId':(await this[_0x32fbd7(0x1ed)][_0x32fbd7(0x1a4)](_0x20431c))[_0x32fbd7(0x1e4)](),'threadId':_0x88c2c,'replyId':_0x2e3f6b,'unitId':_0x20431c},_0x44e8b2=await this[_0x32fbd7(0x1f5)][_0x32fbd7(0x193)]('/universer-api/comment/unit/'+_0x20431c+_0x32fbd7(0x1ae),{'body':_0x53d7a9});return!_0x44e8b2[_0x32fbd7(0x1d3)]['error']||_0x44e8b2[_0x32fbd7(0x1d3)][_0x32fbd7(0x17d)]['code']===0x1;}async[_0x3f0ee5(0x1c6)](_0x4af09a,_0x3b9d05,_0x5afc38){const _0x267a51=_0x3f0ee5,_0x3996ed={'unitId':_0x4af09a,'threadId':_0x5afc38},_0x50f02b=await this[_0x267a51(0x1f5)][_0x267a51(0x193)](_0x267a51(0x1da)+_0x4af09a+_0x267a51(0x19d),{'body':_0x3996ed}),_0x37a4e4=_0x5afc38[_0x267a51(0x19e)](_0x4cf015=>_0x532479(_0x50f02b['body'][_0x267a51(0x1d0)][_0x4cf015],_0x4af09a,_0x3b9d05))[_0x267a51(0x182)](Boolean);return Object[_0x267a51(0x17f)](_0x50f02b[_0x267a51(0x1d3)][_0x267a51(0x1a8)])['forEach'](_0x151181=>{const _0x56a2c7=_0x267a51;this[_0x56a2c7(0x1ee)]['addUser'](_0x151181);}),_0x37a4e4;}[_0x3f0ee5(0x1c8)](_0x1e00a9){const _0x7e38fa=_0x3f0ee5;return{'id':_0x1e00a9['id'],'threadId':_0x1e00a9['threadId'],'ref':_0x1e00a9[_0x7e38fa(0x1b2)]};}};_0x474c81=_0x4f199e([_0x346b08(0x0,_0x3c648d[_0x3f0ee5(0x1c0)](_0x48603c[_0x3f0ee5(0x1b4)])),_0x346b08(0x1,_0x3c648d['Inject'](_0x3c648d[_0x3f0ee5(0x19b)])),_0x346b08(0x2,_0x3c648d['Inject'](_0x5d20d9[_0x3f0ee5(0x1ec)])),_0x346b08(0x3,_0x3c648d['Inject'](_0x3c648d['Injector']))],_0x474c81);var _0x252caa=Object[_0x3f0ee5(0x1f8)],_0x3c1b13=(_0x4db7a4,_0x26b578,_0x14d82b,_0x923c9d)=>{const _0x4c60ed=_0x3f0ee5;for(var _0x4ead20=_0x923c9d>0x1?void 0x0:_0x923c9d?_0x252caa(_0x26b578,_0x14d82b):_0x26b578,_0x3c33d6=_0x4db7a4[_0x4c60ed(0x199)]-0x1,_0x35134f;_0x3c33d6>=0x0;_0x3c33d6--)(_0x35134f=_0x4db7a4[_0x3c33d6])&&(_0x4ead20=_0x35134f(_0x4ead20)||_0x4ead20);return _0x4ead20;},_0x5089b5=(_0x593b97,_0x178217)=>(_0x47a566,_0x51bf38)=>_0x178217(_0x47a566,_0x51bf38,_0x593b97);let _0xd69d66=class extends _0x3c648d[_0x3f0ee5(0x1db)]{constructor(_0x483156,_0x52bda5){const _0x3200e7=_0x3f0ee5;super(),this[_0x3200e7(0x174)]=_0x483156,this['_threadCommentDataSource']=_0x52bda5,this[_0x3200e7(0x1dd)]();}[_0x3f0ee5(0x1dd)](){const _0x708a65=_0x3f0ee5;this['_threadCommentDataSourceService'][_0x708a65(0x190)]=this[_0x708a65(0x175)],this[_0x708a65(0x174)][_0x708a65(0x194)]=!0x1;}};_0xd69d66=_0x3c1b13([_0x5089b5(0x0,_0x3b1059[_0x3f0ee5(0x1bb)]),_0x5089b5(0x1,_0x3c648d[_0x3f0ee5(0x1c0)](_0x474c81))],_0xd69d66);var _0x212fd9=Object[_0x3f0ee5(0x1b0)],_0x1034f4=Object['getOwnPropertyDescriptor'],_0x168ad9=(_0x389b70,_0x164419,_0xb43a44)=>_0x164419 in _0x389b70?_0x212fd9(_0x389b70,_0x164419,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb43a44}):_0x389b70[_0x164419]=_0xb43a44,_0x542e7c=(_0x4377a4,_0x1bb03a,_0x2be553,_0x2b124c)=>{for(var _0x1bbc95=_0x2b124c>0x1?void 0x0:_0x2b124c?_0x1034f4(_0x1bb03a,_0x2be553):_0x1bb03a,_0x5c2fab=_0x4377a4['length']-0x1,_0x218a73;_0x5c2fab>=0x0;_0x5c2fab--)(_0x218a73=_0x4377a4[_0x5c2fab])&&(_0x1bbc95=_0x218a73(_0x1bbc95)||_0x1bbc95);return _0x1bbc95;},_0x57ee6b=(_0x4c0563,_0x10a7a2)=>(_0x595f52,_0x107929)=>_0x10a7a2(_0x595f52,_0x107929,_0x4c0563),_0x507446=(_0x996b54,_0x2e29fa,_0x2c5fff)=>_0x168ad9(_0x996b54,typeof _0x2e29fa!=_0x3f0ee5(0x1cc)?_0x2e29fa+'':_0x2e29fa,_0x2c5fff);_0x11ecc3[_0x3f0ee5(0x18e)]=class extends _0x3c648d['Plugin']{constructor(_0x1ae307=_0x1e4835,_0xbdb220,_0x43550a){const _0x11341=_0x3f0ee5;super(),this[_0x11341(0x1a5)]=_0x1ae307,this['_injector']=_0xbdb220,this['_configService']=_0x43550a;const {..._0xf4be42}=_0x3c648d[_0x11341(0x198)]({},_0x1e4835,this['_config']);this['_configService']['setConfig'](_0x3a876c,_0xf4be42);}[_0x3f0ee5(0x1f1)](){const _0x334300=_0x3f0ee5;[[_0x474c81],[_0xd69d66],[_0xe4df36]][_0x334300(0x1ab)](_0x5464b8=>{const _0x57f151=_0x334300;this[_0x57f151(0x1d2)]['add'](_0x5464b8);});}[_0x3f0ee5(0x1b5)](){const _0x15a2d3=_0x3f0ee5;this[_0x15a2d3(0x1d2)][_0x15a2d3(0x1bf)](_0xd69d66),this[_0x15a2d3(0x1d2)][_0x15a2d3(0x1bf)](_0xe4df36);}},_0x507446(_0x11ecc3[_0x3f0ee5(0x18e)],_0x3f0ee5(0x1b9),_0x29c887),_0x507446(_0x11ecc3[_0x3f0ee5(0x18e)],_0x3f0ee5(0x187),_0x3c648d[_0x3f0ee5(0x173)]['UNIVER_UNKNOWN']),_0x11ecc3['UniverThreadCommentDataSourcePlugin']=_0x542e7c([_0x3c648d[_0x3f0ee5(0x1f6)](_0x20cd00['UniverThreadCommentUIPlugin'],_0x5d20d9[_0x3f0ee5(0x178)],_0x11ab02[_0x3f0ee5(0x192)]),_0x57ee6b(0x1,_0x3c648d['Inject'](_0x3c648d['Injector'])),_0x57ee6b(0x2,_0x3c648d['IConfigService'])],_0x11ecc3[_0x3f0ee5(0x18e)]),Object[_0x3f0ee5(0x1b0)](_0x11ecc3,Symbol[_0x3f0ee5(0x195)],{'value':'Module'});}));function _0x47e6(){const _0x654b07=['onStarting','Reply','UniverNetwork','_init','_httpService','DependentOn','COMMENT','getOwnPropertyDescriptor','UniverInstanceType','_threadCommentDataSourceService','_threadCommentDataSource','add','getUser','UniverCollaborationClientPlugin','commentUpdate$','object','replies','updateComment','error','parse','values','235704ZrvHJl','find','filter','pipe','OpenOrReOpen','525810SnWKhA','user','type','64810YvrpQv','Solve','621744oQxwKT','addUser','/reply','@univerjs/thread-comment-ui','UniverThreadCommentDataSourcePlugin','resolved','dataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverLicensePlugin','post','syncUpdateMutationToColla','toStringTag','code','unitId','merge','length','dayjs','UserManagerService','personId','/list','map','subscribe','rxjs','delete','content','stringify','requireSession','_config','UniverThreadComment','deleteComment','users','resolveComment','_commentService','forEach','getComment','10yJXpld','/delete','_initUserSync','defineProperty','rangeType','ref','getUnit','HTTPService','onReady','slice','6Wyrbiq','exports','pluginName','root','IThreadCommentDataSourceService','@univerjs/core','replyId','YYYY/MM/DD\x20HH:mm','get','Inject','threadId','function','userID','createTimestamp','9977198WSAziX','listComments','3000780DgpskA','saveCommentToSnapshot','Delete','amd','@univerjs/thread-comment','symbol','Edit','@univerjs-pro/license','getCurrentUser','comments','3XwUWBE','_injector','body','UniverProLicense','@univerjs/network','Unknown','Solved','comment','userId','/universer-api/comment/unit/','Disposable','bufferTime','_initDataSource','Injector','rangeId','addComment','UNRECOGNIZED','CommentService','9272qjAZVp','getMemberID','thread-comment-data-source.config','CustomRangeType','disposeWithMe','Add','solved','UniverCore','1568wKsHLq','CollaborationSessionService','_sessionService','_userService','parentId','_threadCommentModel'];_0x47e6=function(){return _0x654b07;};return _0x47e6();}
|
|
1
|
+
function _0x511a(){const _0x2eba55=['pipe','type','HTTPService','949860XXOyLp','/add','UserManagerService','UniverNetwork','createTimestamp','UniverProLicense','subscribe','Unknown','filter','replyId','root','_init','personId','Injector','resolveComment','_initUserSync','customRanges','getMemberID','reply','addUser','object','_userService','map','UniverInstanceType','UniverLicensePlugin','@univerjs-pro/collaboration-client','65090xIopcw','_injector','_initDataSource','userId','user','/list','getOwnPropertyDescriptor','comments','error','_threadCommentDataSourceService','Add','24FwAfId','@univerjs/core','rangeId','Inject','parentId','rangeType','addComment','UniverThreadCommentUIPlugin','@univerjs/thread-comment-ui','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comment','threadId','Disposable','dayjs','payload','220jMakYv','getCurrentUser','/delete','size','432452zbeWyL','rxjs','OpenOrReOpen','disposeWithMe','@univerjs/thread-comment','55786ZaqKdg','UniverCore','onReady','ThreadCommentModel','UniverProThreadCommentDatasource','bufferTime','replies','parse','pluginName','find','code','getUser','thread-comment-data-source.config','add','forEach','CollaborationSessionService','_httpService','Solve','content','UniverThreadComment','Solved','updateComment','toStringTag','YYYY/MM/DD\x20HH:mm','format','UniverProCollaborationClient','Reply','solved','post','CustomRangeType','get','_config','amd','6WLZLDw','24925JgrQxF','Edit','defineProperty','_threadCommentDataSource','requireSession','length','@univerjs/network','2677024HWWJfk','CommentService','deleteComment','resolved','unitId','88839KXsVVN','symbol','_configService','UNIVER_UNKNOWN','@univerjs-pro/license','saveCommentToSnapshot','commentUpdate$','4jsUhHz','/universer-api/comment/unit/','body','Plugin','values','UNRECOGNIZED','userID','UniverThreadCommentDataSourcePlugin','_threadCommentModel','getUnit','listComments','DependentOn','Delete','_sessionService'];_0x511a=function(){return _0x2eba55;};return _0x511a();}function _0x25fe(_0x20a59d,_0x5b0339){const _0x511aa1=_0x511a();return _0x25fe=function(_0x25fe7d,_0x4b795d){_0x25fe7d=_0x25fe7d-0xcf;let _0x348d34=_0x511aa1[_0x25fe7d];return _0x348d34;},_0x25fe(_0x20a59d,_0x5b0339);}(function(_0x4dfa07,_0x3536bc){const _0x5b59d7=_0x25fe,_0x417a86=_0x4dfa07();while(!![]){try{const _0x9b51e3=parseInt(_0x5b59d7(0x108))/0x1+parseInt(_0x5b59d7(0x103))/0x2+parseInt(_0x5b59d7(0x14e))/0x3*(-parseInt(_0x5b59d7(0x13d))/0x4)+-parseInt(_0x5b59d7(0x12a))/0x5*(-parseInt(_0x5b59d7(0x129))/0x6)+parseInt(_0x5b59d7(0x131))/0x7+parseInt(_0x5b59d7(0xef))/0x8*(parseInt(_0x5b59d7(0x136))/0x9)+parseInt(_0x5b59d7(0xe4))/0xa*(-parseInt(_0x5b59d7(0xff))/0xb);if(_0x9b51e3===_0x3536bc)break;else _0x417a86['push'](_0x417a86['shift']());}catch(_0x4da99a){_0x417a86['push'](_0x417a86['shift']());}}}(_0x511a,0x3b242),function(_0x4769a6,_0x3dbadd){const _0x2efb78=_0x25fe;typeof exports==_0x2efb78(0xde)&&typeof module<'u'?_0x3dbadd(exports,require(_0x2efb78(0xe3)),require(_0x2efb78(0x13a)),require(_0x2efb78(0xf0)),require('@univerjs/thread-comment-ui'),require(_0x2efb78(0x107)),require(_0x2efb78(0x104)),require(_0x2efb78(0x130))):typeof define=='function'&&define[_0x2efb78(0x128)]?define(['exports',_0x2efb78(0xe3),'@univerjs-pro/license',_0x2efb78(0xf0),_0x2efb78(0xf7),_0x2efb78(0x107),_0x2efb78(0x104),_0x2efb78(0x130)],_0x3dbadd):(_0x4769a6=typeof globalThis<'u'?globalThis:_0x4769a6||self,_0x3dbadd(_0x4769a6[_0x2efb78(0x10c)]={},_0x4769a6[_0x2efb78(0x121)],_0x4769a6[_0x2efb78(0xcf)],_0x4769a6[_0x2efb78(0x109)],_0x4769a6['UniverThreadCommentUi'],_0x4769a6[_0x2efb78(0x11b)],_0x4769a6[_0x2efb78(0x104)],_0x4769a6[_0x2efb78(0x151)]));}(this,function(_0x24f1da,_0x372d68,_0x538c50,_0x25b392,_0x584479,_0x55314c,_0x38d11b,_0x2c508c){'use strict';const _0x56ddbb=_0x25fe;const _0x2f69d9=_0x56ddbb(0xf9);var _0x3b34bb=(_0x5cfdd5=>(_0x5cfdd5[_0x5cfdd5[_0x56ddbb(0x105)]=0x0]=_0x56ddbb(0x105),_0x5cfdd5[_0x5cfdd5[_0x56ddbb(0x11c)]=0x1]='Solved',_0x5cfdd5[_0x5cfdd5[_0x56ddbb(0x142)]=-0x1]='UNRECOGNIZED',_0x5cfdd5))(_0x3b34bb||{}),_0x1cbc4d=(_0x531341=>(_0x531341[_0x531341['Unknown']=0x0]=_0x56ddbb(0xd1),_0x531341[_0x531341[_0x56ddbb(0xee)]=0x1]=_0x56ddbb(0xee),_0x531341[_0x531341['Reply']=0x2]=_0x56ddbb(0x122),_0x531341[_0x531341[_0x56ddbb(0x12b)]=0x3]='Edit',_0x531341[_0x531341[_0x56ddbb(0x149)]=0x4]=_0x56ddbb(0x149),_0x531341[_0x531341[_0x56ddbb(0x119)]=0x5]=_0x56ddbb(0x119),_0x531341[_0x531341[_0x56ddbb(0x142)]=-0x1]=_0x56ddbb(0x142),_0x531341))(_0x1cbc4d||{});const _0x57307f=_0x3b4753=>_0x25b392[_0x56ddbb(0xfd)](new Date(+_0x3b4753))[_0x56ddbb(0x120)](_0x56ddbb(0x11f)),_0x55fdee=async(_0x50cdd5,_0x57a998)=>{const _0x3e2144=_0x56ddbb,_0x11ad5b=_0x50cdd5[_0x3e2144(0x126)](_0x25b392[_0x3e2144(0x150)]),_0x5712a7=_0x50cdd5[_0x3e2144(0x126)](_0x2c508c[_0x3e2144(0x14d)]);_0x57a998[_0x3e2144(0x116)](_0x596c31=>{const _0x32b74c=_0x3e2144;_0x11ad5b[_0x32b74c(0x113)](_0x596c31)&&_0x57a998['delete'](_0x596c31);}),_0x57a998[_0x3e2144(0x102)]&&(await _0x5712a7[_0x3e2144(0x126)]('/universer-api/user/list',{'params':{'userIDs':[..._0x57a998]}}))[_0x3e2144(0x13f)][_0x3e2144(0xf8)][_0x3e2144(0x116)](_0x5e9be9=>{const _0x11a4cf=_0x3e2144;_0x5e9be9&&_0x11ad5b[_0x11a4cf(0xdd)](_0x5e9be9);});};var _0x4a3493=Object[_0x56ddbb(0xea)],_0x2a24ad=(_0x75b29c,_0x2b07e4,_0x19d179,_0x3b59b7)=>{const _0x1d07e5=_0x56ddbb;for(var _0x34b13f=_0x3b59b7>0x1?void 0x0:_0x3b59b7?_0x4a3493(_0x2b07e4,_0x19d179):_0x2b07e4,_0x40a5e3=_0x75b29c[_0x1d07e5(0x12f)]-0x1,_0x4ff5d5;_0x40a5e3>=0x0;_0x40a5e3--)(_0x4ff5d5=_0x75b29c[_0x40a5e3])&&(_0x34b13f=_0x4ff5d5(_0x34b13f)||_0x34b13f);return _0x34b13f;},_0x888b6e=(_0x2ef694,_0x3a8229)=>(_0x34a205,_0x5b1467)=>_0x3a8229(_0x34a205,_0x5b1467,_0x2ef694);let _0x523feb=class extends _0x25b392[_0x56ddbb(0xfc)]{constructor(_0x169549,_0x14a32e,_0x534b01,_0x5d3656){const _0x21c1d5=_0x56ddbb;super(),this['_commentService']=_0x169549,this[_0x21c1d5(0x145)]=_0x14a32e,this[_0x21c1d5(0xdf)]=_0x534b01,this['_injector']=_0x5d3656,this['_init'](),this['_initUserSync']();}[_0x56ddbb(0xd9)](){const _0x5648f4=_0x56ddbb;this[_0x5648f4(0x106)](this[_0x5648f4(0x145)][_0x5648f4(0x13c)][_0x5648f4(0x14b)](_0x38d11b[_0x5648f4(0x10d)](0x10))[_0x5648f4(0xd0)](_0x1a8d59=>{const _0x4db600=_0x5648f4,_0x2aa8cc=new Set();_0x1a8d59[_0x4db600(0x116)](_0x4c2ec6=>{const _0x2fe55f=_0x4db600;switch(_0x4c2ec6['type']){case _0x2fe55f(0x115):{const _0x45e685=_0x4c2ec6[_0x2fe55f(0xfe)][_0x2fe55f(0xd6)];_0x2aa8cc['add'](_0x45e685);break;}}}),_0x55fdee(this[_0x4db600(0xe5)],_0x2aa8cc);}));}[_0x56ddbb(0xd5)](){const _0x517243=_0x56ddbb;this[_0x517243(0x106)](this['_commentService'][_0x517243(0x13c)][_0x517243(0xd0)](async _0x1c57f9=>{const _0xf0b260=_0x517243;var _0x57dc73,_0x16bffd,_0x4106e9,_0x5a41b0;const _0x337c91=(_0x57dc73=this['_threadCommentModel'][_0xf0b260(0x146)](_0x1c57f9[_0xf0b260(0x135)])[_0xf0b260(0x111)](_0x425c52=>_0x425c52[_0xf0b260(0xfb)]===_0x1c57f9[_0xf0b260(0xfb)]))==null?void 0x0:_0x57dc73[_0xf0b260(0xd4)];if(!_0x337c91)return;const {unitId:_0x28ad31,subUnitId:_0xedaf5c}=_0x337c91;switch(_0x1c57f9[_0xf0b260(0xe8)]&&this[_0xf0b260(0xdf)][_0xf0b260(0xdd)](_0x1c57f9[_0xf0b260(0xe8)]),_0x1c57f9['type']){case _0x1cbc4d[_0xf0b260(0xee)]:break;case _0x1cbc4d[_0xf0b260(0x122)]:{this['_threadCommentModel'][_0xf0b260(0xf5)](_0x28ad31,_0xedaf5c,{'unitId':_0x28ad31,'subUnitId':_0xedaf5c,'ref':'','id':_0x1c57f9[_0xf0b260(0xd3)],'dT':_0x57307f(+_0x1c57f9[_0xf0b260(0x152)]),'threadId':_0x1c57f9[_0xf0b260(0xfb)],'personId':(_0x4106e9=(_0x16bffd=_0x1c57f9[_0xf0b260(0xe8)])==null?void 0x0:_0x16bffd[_0xf0b260(0x143)])!=null?_0x4106e9:_0x1c57f9['userId'],'text':JSON[_0xf0b260(0x10f)](_0x1c57f9['content']),'parentId':_0x337c91['id']});break;}case _0x1cbc4d[_0xf0b260(0x149)]:{const _0x498a8e=this[_0xf0b260(0x145)]['getComment'](_0x28ad31,_0xedaf5c,_0x1c57f9[_0xf0b260(0xd3)]);_0x498a8e&&_0x498a8e[_0xf0b260(0xf3)]&&this['_threadCommentModel'][_0xf0b260(0x133)](_0x28ad31,_0xedaf5c,_0x1c57f9[_0xf0b260(0xd3)]);break;}case _0x1cbc4d[_0xf0b260(0x12b)]:{this[_0xf0b260(0x145)][_0xf0b260(0x11d)](_0x28ad31,_0xedaf5c,{'commentId':_0x1c57f9['replyId'],'text':JSON[_0xf0b260(0x10f)](_0x1c57f9['content'])});break;}case _0x1cbc4d[_0xf0b260(0x119)]:{const _0x298bbf=(_0x5a41b0=this[_0xf0b260(0x145)][_0xf0b260(0x146)](_0x1c57f9['unitId'])[_0xf0b260(0x111)](_0x517e8f=>_0x517e8f['threadId']===_0x1c57f9[_0xf0b260(0xfb)]))==null?void 0x0:_0x5a41b0[_0xf0b260(0xd4)];_0x298bbf&&this[_0xf0b260(0x145)][_0xf0b260(0xd8)](_0x28ad31,_0xedaf5c,_0x298bbf['id'],_0x1c57f9['solved']===_0x3b34bb[_0xf0b260(0x11c)]);break;}}}));}};_0x523feb=_0x2a24ad([_0x888b6e(0x0,_0x25b392[_0x56ddbb(0xf2)](_0x372d68[_0x56ddbb(0x132)])),_0x888b6e(0x1,_0x25b392[_0x56ddbb(0xf2)](_0x55314c[_0x56ddbb(0x10b)])),_0x888b6e(0x2,_0x25b392[_0x56ddbb(0xf2)](_0x25b392[_0x56ddbb(0x150)])),_0x888b6e(0x3,_0x25b392['Inject'](_0x25b392[_0x56ddbb(0xd7)]))],_0x523feb);const _0x540751=_0x56ddbb(0x114),_0x5a9e16={};var _0x40ea32=Object[_0x56ddbb(0xea)],_0x5a21ec=(_0x5d39b4,_0x39afe8,_0x648e76,_0x52f972)=>{for(var _0x403c09=_0x52f972>0x1?void 0x0:_0x52f972?_0x40ea32(_0x39afe8,_0x648e76):_0x39afe8,_0x2dabeb=_0x5d39b4['length']-0x1,_0x34715b;_0x2dabeb>=0x0;_0x2dabeb--)(_0x34715b=_0x5d39b4[_0x2dabeb])&&(_0x403c09=_0x34715b(_0x403c09)||_0x403c09);return _0x403c09;},_0x380a4f=(_0x59822c,_0x5e270d)=>(_0x1895d7,_0x31c988)=>_0x5e270d(_0x1895d7,_0x31c988,_0x59822c);function _0x4a9c8f(_0x3fd72a,_0x14837c){const _0x67b6bc=_0x56ddbb,_0x285078=_0x3fd72a['replies'][0x0];return{..._0x14837c,'id':_0x285078['replyId'],'resolved':_0x3fd72a[_0x67b6bc(0x123)]===0x1,'dT':_0x57307f(_0x285078[_0x67b6bc(0x152)]),'personId':_0x285078['userId'],'threadId':_0x285078['threadId']};}function _0x1bf24b(_0x4b2b5b,_0x2ff0c8,_0xb6ca2f){const _0x1576d9=_0x56ddbb;var _0x56af50,_0xc5c06;if(((_0xc5c06=(_0x56af50=_0x4b2b5b==null?void 0x0:_0x4b2b5b[_0x1576d9(0x10e)])==null?void 0x0:_0x56af50[_0x1576d9(0x12f)])!=null?_0xc5c06:0x0)>0x0){const _0x597d35=(_0x24b955,_0x5ccd67)=>({'id':_0x24b955['replyId'],'threadId':_0x24b955[_0x1576d9(0xfb)],'dT':_0x57307f(_0x24b955[_0x1576d9(0x152)]),'personId':_0x24b955[_0x1576d9(0xe7)],'resolved':_0x4b2b5b['solved']===_0x3b34bb['Solved'],'unitId':_0x2ff0c8,'subUnitId':_0xb6ca2f,'text':JSON['parse'](_0x24b955[_0x1576d9(0x11a)]),'parentId':_0x5ccd67}),_0x385e7=_0x597d35(_0x4b2b5b[_0x1576d9(0x10e)][0x0]);return{..._0x385e7,'children':_0x4b2b5b[_0x1576d9(0x10e)]['slice'](0x1)[_0x1576d9(0xe0)](_0x2339ce=>_0x597d35(_0x2339ce,_0x385e7['id']))};}return null;}let _0x172675=class{constructor(_0x2ffed3,_0x4e17f8,_0x1647fb,_0x19dbe1){const _0x2407a7=_0x56ddbb;this['_httpService']=_0x2ffed3,this[_0x2407a7(0xdf)]=_0x4e17f8,this[_0x2407a7(0x14a)]=_0x1647fb,this[_0x2407a7(0xe5)]=_0x19dbe1;}async['addComment'](_0xbf7f76){const _0x4f6114=_0x56ddbb;var _0x741e17,_0x529af8;const {parentId:_0x40b7c1,unitId:_0x399dde,text:_0x2c9245,threadId:_0x1591f8}=_0xbf7f76,_0x5e97b3=(_0x529af8=(_0x741e17=_0x2c9245[_0x4f6114(0xda)])==null?void 0x0:_0x741e17[_0x4f6114(0xd2)](_0xf0a0b8=>_0xf0a0b8[_0x4f6114(0xf4)]===_0x25b392['CustomRangeType']['COMMENT'])[_0x4f6114(0xe0)](_0x4040b4=>_0x4040b4[_0x4f6114(0xf1)]))!=null?_0x529af8:[],_0x1ac260=JSON['stringify'](_0x2c9245),_0x11a18c=(await this[_0x4f6114(0x14a)][_0x4f6114(0x12e)](_0x399dde))['getMemberID']();if(_0x40b7c1){const _0x146ecc={'memberId':_0x11a18c,'unitId':_0x399dde,'content':_0x1ac260,'mention':_0x5e97b3,'threadId':_0x1591f8},_0x42f292=(await this[_0x4f6114(0x118)][_0x4f6114(0x124)](_0x4f6114(0x13e)+_0x399dde+'/reply',{'body':_0x146ecc}))[_0x4f6114(0x13f)][_0x4f6114(0xdc)];return{..._0xbf7f76,'id':_0x42f292[_0x4f6114(0xd3)],'dT':_0x25b392['dayjs'](+_0x42f292['createTimestamp'])['format'](_0x4f6114(0x11f)),'personId':_0x42f292[_0x4f6114(0xe7)]};}else{const _0x34b0c4={'memberId':_0x11a18c,'unitId':_0x399dde,'content':_0x1ac260,'mention':_0x5e97b3},_0x2008da=await this[_0x4f6114(0x118)][_0x4f6114(0x124)]('/universer-api/comment/unit/'+_0x399dde+_0x4f6114(0x14f),{'body':_0x34b0c4});return _0x4a9c8f(_0x2008da[_0x4f6114(0x13f)][_0x4f6114(0xfa)],_0xbf7f76);}}async[_0x56ddbb(0x11d)](_0x3bb57f){const _0x5acfa4=_0x56ddbb;var _0x2b7391,_0x243866;const {text:_0x4b18ae,unitId:_0x45659d}=_0x3bb57f,_0xa711b7=(_0x243866=(_0x2b7391=_0x4b18ae[_0x5acfa4(0xda)])==null?void 0x0:_0x2b7391[_0x5acfa4(0xd2)](_0x47ecbc=>_0x47ecbc[_0x5acfa4(0xf4)]===_0x25b392[_0x5acfa4(0x125)]['COMMENT'])['map'](_0x535f4e=>_0x535f4e[_0x5acfa4(0xf1)]))!=null?_0x243866:[],_0x575ffe=JSON['stringify'](_0x4b18ae),_0x1d1c6=_0x3bb57f[_0x5acfa4(0xfb)],_0x2a094b=_0x3bb57f['id'],_0x243e85={'memberId':(await this[_0x5acfa4(0x14a)][_0x5acfa4(0x12e)](_0x45659d))[_0x5acfa4(0xdb)](),'unitId':_0x45659d,'threadId':_0x1d1c6,'mention':_0xa711b7,'content':_0x575ffe,'replyId':_0x2a094b},_0x2abe19=await this[_0x5acfa4(0x118)][_0x5acfa4(0x124)](_0x5acfa4(0x13e)+_0x45659d+'/edit',{'body':_0x243e85});return!_0x2abe19['body'][_0x5acfa4(0xec)]||_0x2abe19['body'][_0x5acfa4(0xec)][_0x5acfa4(0x112)]===0x1;}async[_0x56ddbb(0xd8)](_0x2ead13){const _0x124507=_0x56ddbb,{unitId:_0x4acd03}=_0x2ead13,_0x57200d=_0x2ead13[_0x124507(0xfb)],_0x51c4cb={'memberId':this['_userService'][_0x124507(0x100)]()[_0x124507(0x143)],'unitId':_0x4acd03,'threadId':_0x57200d,'solved':_0x2ead13[_0x124507(0x134)]?_0x3b34bb[_0x124507(0x11c)]:_0x3b34bb[_0x124507(0x105)]},_0x513b14=await this[_0x124507(0x118)][_0x124507(0x124)](_0x124507(0x13e)+_0x4acd03+'/solved',{'body':_0x51c4cb});return!_0x513b14[_0x124507(0x13f)][_0x124507(0xec)]||_0x513b14[_0x124507(0x13f)][_0x124507(0xec)][_0x124507(0x112)]===0x1;}async[_0x56ddbb(0x133)](_0x226acd,_0xbc52aa,_0x15c374,_0x39064d){const _0x45df2b=_0x56ddbb,_0x321360={'memberId':(await this['_sessionService'][_0x45df2b(0x12e)](_0x226acd))[_0x45df2b(0xdb)](),'threadId':_0x15c374,'replyId':_0x39064d,'unitId':_0x226acd},_0x771905=await this[_0x45df2b(0x118)][_0x45df2b(0x124)](_0x45df2b(0x13e)+_0x226acd+_0x45df2b(0x101),{'body':_0x321360});return!_0x771905[_0x45df2b(0x13f)][_0x45df2b(0xec)]||_0x771905[_0x45df2b(0x13f)][_0x45df2b(0xec)]['code']===0x1;}async[_0x56ddbb(0x147)](_0x38acb4,_0x1492c2,_0x436540){const _0x421be3=_0x56ddbb,_0x283c1f={'unitId':_0x38acb4,'threadId':_0x436540},_0x2ec7c9=await this['_httpService'][_0x421be3(0x124)](_0x421be3(0x13e)+_0x38acb4+_0x421be3(0xe9),{'body':_0x283c1f}),_0x462037=_0x436540[_0x421be3(0xe0)](_0x3295c3=>_0x1bf24b(_0x2ec7c9[_0x421be3(0x13f)][_0x421be3(0xeb)][_0x3295c3],_0x38acb4,_0x1492c2))[_0x421be3(0xd2)](Boolean);return Object[_0x421be3(0x141)](_0x2ec7c9[_0x421be3(0x13f)]['users'])[_0x421be3(0x116)](_0x527363=>{const _0x1c3991=_0x421be3;this[_0x1c3991(0xdf)]['addUser'](_0x527363);}),_0x462037;}[_0x56ddbb(0x13b)](_0x56ae1d){const _0x350568=_0x56ddbb;return{'id':_0x56ae1d['id'],'threadId':_0x56ae1d[_0x350568(0xfb)],'ref':_0x56ae1d['ref']};}};_0x172675=_0x5a21ec([_0x380a4f(0x0,_0x25b392[_0x56ddbb(0xf2)](_0x2c508c[_0x56ddbb(0x14d)])),_0x380a4f(0x1,_0x25b392[_0x56ddbb(0xf2)](_0x25b392[_0x56ddbb(0x150)])),_0x380a4f(0x2,_0x25b392[_0x56ddbb(0xf2)](_0x372d68[_0x56ddbb(0x117)])),_0x380a4f(0x3,_0x25b392[_0x56ddbb(0xf2)](_0x25b392[_0x56ddbb(0xd7)]))],_0x172675);var _0x1d61a2=Object[_0x56ddbb(0xea)],_0x56e75b=(_0x43ffe3,_0x58cce2,_0x4b0b3f,_0x44846c)=>{const _0x2493d6=_0x56ddbb;for(var _0x263263=_0x44846c>0x1?void 0x0:_0x44846c?_0x1d61a2(_0x58cce2,_0x4b0b3f):_0x58cce2,_0x4c2576=_0x43ffe3[_0x2493d6(0x12f)]-0x1,_0x2ba90d;_0x4c2576>=0x0;_0x4c2576--)(_0x2ba90d=_0x43ffe3[_0x4c2576])&&(_0x263263=_0x2ba90d(_0x263263)||_0x263263);return _0x263263;},_0x47e928=(_0x5bf162,_0x1d72d1)=>(_0x52deb9,_0x2924d9)=>_0x1d72d1(_0x52deb9,_0x2924d9,_0x5bf162);let _0x22b563=class extends _0x25b392[_0x56ddbb(0xfc)]{constructor(_0x48e1ad,_0x10881c){const _0xc1e7a1=_0x56ddbb;super(),this['_threadCommentDataSourceService']=_0x48e1ad,this[_0xc1e7a1(0x12d)]=_0x10881c,this[_0xc1e7a1(0xe6)]();}[_0x56ddbb(0xe6)](){const _0x4c6623=_0x56ddbb;this[_0x4c6623(0xed)]['dataSource']=this[_0x4c6623(0x12d)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x22b563=_0x56e75b([_0x47e928(0x0,_0x55314c['IThreadCommentDataSourceService']),_0x47e928(0x1,_0x25b392[_0x56ddbb(0xf2)](_0x172675))],_0x22b563);var _0x64ab7d=Object['defineProperty'],_0x5946f9=Object['getOwnPropertyDescriptor'],_0x4d6bdd=(_0x14ae54,_0x127eb9,_0x220473)=>_0x127eb9 in _0x14ae54?_0x64ab7d(_0x14ae54,_0x127eb9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x220473}):_0x14ae54[_0x127eb9]=_0x220473,_0xd2b78c=(_0x176d91,_0x218061,_0x118a83,_0x1cec75)=>{for(var _0x2b150f=_0x1cec75>0x1?void 0x0:_0x1cec75?_0x5946f9(_0x218061,_0x118a83):_0x218061,_0x231cbd=_0x176d91['length']-0x1,_0xa465ae;_0x231cbd>=0x0;_0x231cbd--)(_0xa465ae=_0x176d91[_0x231cbd])&&(_0x2b150f=_0xa465ae(_0x2b150f)||_0x2b150f);return _0x2b150f;},_0x20436a=(_0x29970a,_0x2bdedc)=>(_0x5d4a71,_0x5f10bb)=>_0x2bdedc(_0x5d4a71,_0x5f10bb,_0x29970a),_0x223641=(_0xb038fc,_0x362881,_0x187b28)=>_0x4d6bdd(_0xb038fc,typeof _0x362881!=_0x56ddbb(0x137)?_0x362881+'':_0x362881,_0x187b28);_0x24f1da[_0x56ddbb(0x144)]=class extends _0x25b392[_0x56ddbb(0x140)]{constructor(_0x1d2d5a=_0x5a9e16,_0x2b5226,_0x4207e9){const _0x386b11=_0x56ddbb;super(),this[_0x386b11(0x127)]=_0x1d2d5a,this[_0x386b11(0xe5)]=_0x2b5226,this[_0x386b11(0x138)]=_0x4207e9;const {..._0x1a5112}=_0x25b392['merge']({},_0x5a9e16,this[_0x386b11(0x127)]);this[_0x386b11(0x138)]['setConfig'](_0x540751,_0x1a5112);}['onStarting'](){const _0x1b409c=_0x56ddbb;[[_0x172675],[_0x22b563],[_0x523feb]][_0x1b409c(0x116)](_0x4c0292=>{const _0x4b89dc=_0x1b409c;this[_0x4b89dc(0xe5)][_0x4b89dc(0x115)](_0x4c0292);});}[_0x56ddbb(0x10a)](){const _0x4a576e=_0x56ddbb;this['_injector']['get'](_0x22b563),this[_0x4a576e(0xe5)][_0x4a576e(0x126)](_0x523feb);}},_0x223641(_0x24f1da[_0x56ddbb(0x144)],_0x56ddbb(0x110),_0x2f69d9),_0x223641(_0x24f1da[_0x56ddbb(0x144)],_0x56ddbb(0x14c),_0x25b392[_0x56ddbb(0xe1)][_0x56ddbb(0x139)]),_0x24f1da[_0x56ddbb(0x144)]=_0xd2b78c([_0x25b392[_0x56ddbb(0x148)](_0x584479[_0x56ddbb(0xf6)],_0x372d68['UniverCollaborationClientPlugin'],_0x538c50[_0x56ddbb(0xe2)]),_0x20436a(0x1,_0x25b392[_0x56ddbb(0xf2)](_0x25b392[_0x56ddbb(0xd7)])),_0x20436a(0x2,_0x25b392['IConfigService'])],_0x24f1da[_0x56ddbb(0x144)]),Object[_0x56ddbb(0x12c)](_0x24f1da,Symbol[_0x56ddbb(0x11e)],{'value':'Module'});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.7.0-nightly.
|
|
3
|
+
"version": "0.7.0-nightly.202505241606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.7.0-nightly.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/protocol": "0.1.
|
|
52
|
-
"@univerjs-
|
|
53
|
-
"@univerjs/thread-comment": "0.7.0-nightly.
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.7.0-nightly.202505241606",
|
|
49
|
+
"@univerjs-pro/license": "0.7.0-nightly.202505241606",
|
|
50
|
+
"@univerjs/core": "0.7.0-nightly.202505241606",
|
|
51
|
+
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
52
|
+
"@univerjs/thread-comment": "0.7.0-nightly.202505241606",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.7.0-nightly.202505241606",
|
|
54
|
+
"@univerjs/network": "0.7.0-nightly.202505241606"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|