@univerjs-pro/thread-comment-datasource 0.6.2 → 0.6.3-nightly.202503041606
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/umd/index.js +1 -1
- package/package.json +10 -10
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x36155a=_0x5362;(function(_0x347c8f,_0x3f1e39){const _0xce9fd=_0x5362,_0x3518e1=_0x347c8f();while(!![]){try{const _0x2d6555=-parseInt(_0xce9fd(0x1b0))/0x1+-parseInt(_0xce9fd(0x1fb))/0x2*(parseInt(_0xce9fd(0x1f9))/0x3)+-parseInt(_0xce9fd(0x20e))/0x4*(parseInt(_0xce9fd(0x20b))/0x5)+parseInt(_0xce9fd(0x1a1))/0x6*(parseInt(_0xce9fd(0x1f3))/0x7)+-parseInt(_0xce9fd(0x191))/0x8*(-parseInt(_0xce9fd(0x1a5))/0x9)+parseInt(_0xce9fd(0x1a2))/0xa*(parseInt(_0xce9fd(0x1c5))/0xb)+parseInt(_0xce9fd(0x1b4))/0xc*(parseInt(_0xce9fd(0x1a6))/0xd);if(_0x2d6555===_0x3f1e39)break;else _0x3518e1['push'](_0x3518e1['shift']());}catch(_0x93f037){_0x3518e1['push'](_0x3518e1['shift']());}}}(_0x374e,0x49522));Object[_0x36155a(0x204)](exports,Symbol[_0x36155a(0x211)],{'value':_0x36155a(0x1fa)});const b=require(_0x36155a(0x210)),T=require(_0x36155a(0x1cb)),c=require(_0x36155a(0x1d6)),j=require('@univerjs/thread-comment-ui'),M=require(_0x36155a(0x1bf)),w=require(_0x36155a(0x1c6)),P=require(_0x36155a(0x1ab)),U=_0x36155a(0x1b8);var I=(_0x379c06=>(_0x379c06[_0x379c06[_0x36155a(0x1ef)]=0x0]=_0x36155a(0x1ef),_0x379c06[_0x379c06[_0x36155a(0x1cc)]=0x1]=_0x36155a(0x1cc),_0x379c06[_0x379c06['UNRECOGNIZED']=-0x1]=_0x36155a(0x18e),_0x379c06))(I||{}),v=(_0x1cc1a7=>(_0x1cc1a7[_0x1cc1a7[_0x36155a(0x1a9)]=0x0]=_0x36155a(0x1a9),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x1ca)]=0x1]=_0x36155a(0x1ca),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x1e2)]=0x2]=_0x36155a(0x1e2),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x194)]=0x3]=_0x36155a(0x194),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x196)]=0x4]=_0x36155a(0x196),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x19a)]=0x5]=_0x36155a(0x19a),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x18e)]=-0x1]=_0x36155a(0x18e),_0x1cc1a7))(v||{});const f=_0x1402e1=>c['dayjs'](new Date(+_0x1402e1))[_0x36155a(0x199)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x2f90d3,_0x47eb6a)=>{const _0x20cae1=_0x36155a,_0x484113=_0x2f90d3[_0x20cae1(0x1d3)](c[_0x20cae1(0x193)]),_0x259369=_0x2f90d3[_0x20cae1(0x1d3)](P['HTTPService']);_0x47eb6a[_0x20cae1(0x1db)](_0x3aa0bc=>{const _0x9bd1b1=_0x20cae1;_0x484113[_0x9bd1b1(0x212)](_0x3aa0bc)&&_0x47eb6a[_0x9bd1b1(0x1e1)](_0x3aa0bc);}),_0x47eb6a[_0x20cae1(0x19f)]&&(await _0x259369[_0x20cae1(0x1d3)](_0x20cae1(0x195),{'params':{'userIDs':[..._0x47eb6a]}}))[_0x20cae1(0x1f4)]['users']['forEach'](_0x40cd0e=>{const _0x13733f=_0x20cae1;_0x40cd0e&&_0x484113[_0x13733f(0x1f2)](_0x40cd0e);});};var $=Object[_0x36155a(0x1ba)],E=(_0x4dd63d,_0x388d68,_0x3f390c,_0x1d00c2)=>{const _0x4d09cb=_0x36155a;for(var _0x1d780c=_0x1d00c2>0x1?void 0x0:_0x1d00c2?$(_0x388d68,_0x3f390c):_0x388d68,_0x57408c=_0x4dd63d[_0x4d09cb(0x216)]-0x1,_0x1b2ece;_0x57408c>=0x0;_0x57408c--)(_0x1b2ece=_0x4dd63d[_0x57408c])&&(_0x1d780c=_0x1b2ece(_0x1d780c)||_0x1d780c);return _0x1d780c;},S=(_0x2c3e1d,_0x30500c)=>(_0x14eb89,_0x117599)=>_0x30500c(_0x14eb89,_0x117599,_0x2c3e1d);let p=class extends c['Disposable']{constructor(_0x3dd9c7,_0x46b594,_0x5e6e95,_0x48bd2f){const _0xc9e584=_0x36155a;super(),this[_0xc9e584(0x208)]=_0x3dd9c7,this[_0xc9e584(0x1e3)]=_0x46b594,this[_0xc9e584(0x1c3)]=_0x5e6e95,this[_0xc9e584(0x1fd)]=_0x48bd2f,this[_0xc9e584(0x217)](),this['_initUserSync']();}[_0x36155a(0x1ae)](){const _0x1fcc9b=_0x36155a;this['disposeWithMe'](this['_threadCommentModel'][_0x1fcc9b(0x19b)][_0x1fcc9b(0x19c)](w[_0x1fcc9b(0x1ff)](0x10))[_0x1fcc9b(0x1a0)](_0x405129=>{const _0x12bb9f=_0x1fcc9b,_0x33464a=new Set();_0x405129[_0x12bb9f(0x1db)](_0x5d2745=>{const _0x561fe4=_0x12bb9f;switch(_0x5d2745[_0x561fe4(0x1f7)]){case _0x561fe4(0x1d1):{const _0x4cc317=_0x5d2745['payload'][_0x561fe4(0x1e6)];_0x33464a[_0x561fe4(0x1d1)](_0x4cc317);break;}}}),R(this['_injector'],_0x33464a);}));}['_init'](){const _0x123b15=_0x36155a;this[_0x123b15(0x1e8)](this[_0x123b15(0x208)]['commentUpdate$']['subscribe'](async _0x3a64e7=>{const _0x4c5b9d=_0x123b15;var _0x6b3c04,_0x116769,_0x99df78,_0x3c8e22;const _0x51ab3c=(_0x6b3c04=this[_0x4c5b9d(0x1e3)]['getUnit'](_0x3a64e7['unitId'])['find'](_0x5b02a7=>_0x5b02a7[_0x4c5b9d(0x1c9)]===_0x3a64e7['threadId']))==null?void 0x0:_0x6b3c04[_0x4c5b9d(0x1d8)];if(!_0x51ab3c)return;const {unitId:_0x86b56c,subUnitId:_0x22696b}=_0x51ab3c;switch(_0x3a64e7[_0x4c5b9d(0x206)]&&this[_0x4c5b9d(0x1c3)][_0x4c5b9d(0x1f2)](_0x3a64e7[_0x4c5b9d(0x206)]),_0x3a64e7['type']){case v[_0x4c5b9d(0x1ca)]:break;case v[_0x4c5b9d(0x1e2)]:{this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1ce)](_0x86b56c,_0x22696b,{'unitId':_0x86b56c,'subUnitId':_0x22696b,'ref':'','id':_0x3a64e7['replyId'],'dT':f(+_0x3a64e7['createTimestamp']),'threadId':_0x3a64e7[_0x4c5b9d(0x1c9)],'personId':(_0x99df78=(_0x116769=_0x3a64e7[_0x4c5b9d(0x206)])==null?void 0x0:_0x116769['userID'])!=null?_0x99df78:_0x3a64e7[_0x4c5b9d(0x1d0)],'text':JSON[_0x4c5b9d(0x1c8)](_0x3a64e7[_0x4c5b9d(0x1f8)]),'parentId':_0x51ab3c['id']});break;}case v[_0x4c5b9d(0x196)]:{const _0x75d090=this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1d2)](_0x86b56c,_0x22696b,_0x3a64e7[_0x4c5b9d(0x198)]);_0x75d090&&_0x75d090[_0x4c5b9d(0x1ac)]&&this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x18d)](_0x86b56c,_0x22696b,_0x3a64e7[_0x4c5b9d(0x198)]);break;}case v['Edit']:{this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1f1)](_0x86b56c,_0x22696b,{'commentId':_0x3a64e7[_0x4c5b9d(0x198)],'text':JSON[_0x4c5b9d(0x1c8)](_0x3a64e7[_0x4c5b9d(0x1f8)])});break;}case v['Solve']:{const _0x189ade=(_0x3c8e22=this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1b3)](_0x3a64e7[_0x4c5b9d(0x201)])[_0x4c5b9d(0x1ea)](_0x1ab160=>_0x1ab160[_0x4c5b9d(0x1c9)]===_0x3a64e7[_0x4c5b9d(0x1c9)]))==null?void 0x0:_0x3c8e22[_0x4c5b9d(0x1d8)];_0x189ade&&this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1cd)](_0x86b56c,_0x22696b,_0x189ade['id'],_0x3a64e7[_0x4c5b9d(0x1c1)]===I[_0x4c5b9d(0x1cc)]);break;}}}));}};p=E([S(0x0,c[_0x36155a(0x197)](b['CommentService'])),S(0x1,c[_0x36155a(0x197)](M[_0x36155a(0x1b7)])),S(0x2,c[_0x36155a(0x197)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x36155a(0x218)]))],p);const q=_0x36155a(0x1e5),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x397994,_0xc93a58,_0x140f70,_0x39a49e)=>{for(var _0x46b8c1=_0x39a49e>0x1?void 0x0:_0x39a49e?A(_0xc93a58,_0x140f70):_0xc93a58,_0x486b26=_0x397994['length']-0x1,_0x26b1a0;_0x486b26>=0x0;_0x486b26--)(_0x26b1a0=_0x397994[_0x486b26])&&(_0x46b8c1=_0x26b1a0(_0x46b8c1)||_0x46b8c1);return _0x46b8c1;},_=(_0x49dde2,_0xb2f56b)=>(_0x3f0d1d,_0x3fbbd0)=>_0xb2f56b(_0x3f0d1d,_0x3fbbd0,_0x49dde2);function Y(_0x13b2e1,_0x2e9c72){const _0x2afc43=_0x36155a,_0xfc6e35=_0x13b2e1[_0x2afc43(0x1d4)][0x0];return{..._0x2e9c72,'id':_0xfc6e35[_0x2afc43(0x198)],'resolved':_0x13b2e1[_0x2afc43(0x1c1)]===0x1,'dT':f(_0xfc6e35[_0x2afc43(0x1be)]),'personId':_0xfc6e35['userId'],'threadId':_0xfc6e35[_0x2afc43(0x1c9)]};}function G(_0x2202c9,_0x18e323,_0x2ad138){const _0x4a1c0f=_0x36155a;var _0x5cee34,_0x36d095;if(((_0x36d095=(_0x5cee34=_0x2202c9==null?void 0x0:_0x2202c9[_0x4a1c0f(0x1d4)])==null?void 0x0:_0x5cee34[_0x4a1c0f(0x216)])!=null?_0x36d095:0x0)>0x0){const _0x45f42f=(_0x97dfde,_0x516cfc)=>({'id':_0x97dfde[_0x4a1c0f(0x198)],'threadId':_0x97dfde['threadId'],'dT':f(_0x97dfde[_0x4a1c0f(0x1be)]),'personId':_0x97dfde['userId'],'resolved':_0x2202c9[_0x4a1c0f(0x1c1)]===I[_0x4a1c0f(0x1cc)],'unitId':_0x18e323,'subUnitId':_0x2ad138,'text':JSON['parse'](_0x97dfde['content']),'parentId':_0x516cfc}),_0x38c074=_0x45f42f(_0x2202c9[_0x4a1c0f(0x1d4)][0x0]);return{..._0x38c074,'children':_0x2202c9[_0x4a1c0f(0x1d4)]['slice'](0x1)[_0x4a1c0f(0x203)](_0x1b9ed1=>_0x45f42f(_0x1b9ed1,_0x38c074['id']))};}return null;}let g=class{constructor(_0x3b1a11,_0xe94ebe,_0x261bb2,_0x402e99){const _0x3e6e7d=_0x36155a;this[_0x3e6e7d(0x1dd)]=_0x3b1a11,this['_userService']=_0xe94ebe,this[_0x3e6e7d(0x1ec)]=_0x261bb2,this[_0x3e6e7d(0x1fd)]=_0x402e99;}async[_0x36155a(0x1ce)](_0x1267d3){const _0xc24f0b=_0x36155a;var _0x3818d2,_0x564b78;const {parentId:_0x430103,unitId:_0xb10179,text:_0xb27a63,threadId:_0x21e17b}=_0x1267d3,_0x2b6590=(_0x564b78=(_0x3818d2=_0xb27a63[_0xc24f0b(0x1bb)])==null?void 0x0:_0x3818d2[_0xc24f0b(0x1bc)](_0x544b5a=>_0x544b5a[_0xc24f0b(0x1a3)]===c[_0xc24f0b(0x20a)]['COMMENT'])[_0xc24f0b(0x203)](_0x3717c2=>_0x3717c2['rangeId']))!=null?_0x564b78:[],_0x50bfae=JSON[_0xc24f0b(0x214)](_0xb27a63),_0x1723a6=(await this[_0xc24f0b(0x1ec)][_0xc24f0b(0x205)](_0xb10179))[_0xc24f0b(0x1d9)]();if(_0x430103){const _0x19a4e3={'memberId':_0x1723a6,'unitId':_0xb10179,'content':_0x50bfae,'mention':_0x2b6590,'threadId':_0x21e17b},_0x5a75d1=(await this[_0xc24f0b(0x1dd)][_0xc24f0b(0x202)](_0xc24f0b(0x1f5)+_0xb10179+_0xc24f0b(0x190),{'body':_0x19a4e3}))['body'][_0xc24f0b(0x1ee)];return{..._0x1267d3,'id':_0x5a75d1[_0xc24f0b(0x198)],'dT':c[_0xc24f0b(0x1c4)](+_0x5a75d1[_0xc24f0b(0x1be)])[_0xc24f0b(0x199)](_0xc24f0b(0x1e0)),'personId':_0x5a75d1['userId']};}else{const _0x28fa3b={'memberId':_0x1723a6,'unitId':_0xb10179,'content':_0x50bfae,'mention':_0x2b6590},_0x34712a=await this[_0xc24f0b(0x1dd)]['post'](_0xc24f0b(0x1f5)+_0xb10179+_0xc24f0b(0x1a7),{'body':_0x28fa3b});return Y(_0x34712a[_0xc24f0b(0x1f4)][_0xc24f0b(0x1ed)],_0x1267d3);}}async[_0x36155a(0x1f1)](_0xf5677a){const _0x25ae6b=_0x36155a;var _0x10cb9a,_0x3b42ec;const {text:_0x80b723,unitId:_0x37c048}=_0xf5677a,_0xf7f777=(_0x3b42ec=(_0x10cb9a=_0x80b723['customRanges'])==null?void 0x0:_0x10cb9a[_0x25ae6b(0x1bc)](_0x5802f9=>_0x5802f9[_0x25ae6b(0x1a3)]===c[_0x25ae6b(0x20a)][_0x25ae6b(0x1e9)])['map'](_0x156094=>_0x156094[_0x25ae6b(0x1cf)]))!=null?_0x3b42ec:[],_0x4ef2cf=JSON[_0x25ae6b(0x214)](_0x80b723),_0x438611=_0xf5677a[_0x25ae6b(0x1c9)],_0x8c5d84=_0xf5677a['id'],_0x3fe365={'memberId':(await this['_sessionService']['requireSession'](_0x37c048))[_0x25ae6b(0x1d9)](),'unitId':_0x37c048,'threadId':_0x438611,'mention':_0xf7f777,'content':_0x4ef2cf,'replyId':_0x8c5d84},_0x3f13ec=await this[_0x25ae6b(0x1dd)][_0x25ae6b(0x202)](_0x25ae6b(0x1f5)+_0x37c048+_0x25ae6b(0x1b1),{'body':_0x3fe365});return!_0x3f13ec[_0x25ae6b(0x1f4)]['error']||_0x3f13ec[_0x25ae6b(0x1f4)][_0x25ae6b(0x1fe)][_0x25ae6b(0x19e)]===0x1;}async[_0x36155a(0x1cd)](_0x43522d){const _0x37890c=_0x36155a,{unitId:_0x730f06}=_0x43522d,_0x505f0d=_0x43522d[_0x37890c(0x1c9)],_0x3d734c={'memberId':this[_0x37890c(0x1c3)][_0x37890c(0x1df)]()[_0x37890c(0x18f)],'unitId':_0x730f06,'threadId':_0x505f0d,'solved':_0x43522d[_0x37890c(0x1c7)]?I['Solved']:I[_0x37890c(0x1ef)]},_0x51c68e=await this['_httpService'][_0x37890c(0x202)](_0x37890c(0x1f5)+_0x730f06+_0x37890c(0x1de),{'body':_0x3d734c});return!_0x51c68e[_0x37890c(0x1f4)][_0x37890c(0x1fe)]||_0x51c68e[_0x37890c(0x1f4)][_0x37890c(0x1fe)][_0x37890c(0x19e)]===0x1;}async[_0x36155a(0x18d)](_0x5d96dc,_0x25f4b1,_0x32cd8a,_0x57ed6a){const _0xb9b723=_0x36155a,_0x3b2133={'memberId':(await this['_sessionService'][_0xb9b723(0x205)](_0x5d96dc))[_0xb9b723(0x1d9)](),'threadId':_0x32cd8a,'replyId':_0x57ed6a,'unitId':_0x5d96dc},_0x57993d=await this[_0xb9b723(0x1dd)]['post'](_0xb9b723(0x1f5)+_0x5d96dc+_0xb9b723(0x1b5),{'body':_0x3b2133});return!_0x57993d[_0xb9b723(0x1f4)][_0xb9b723(0x1fe)]||_0x57993d[_0xb9b723(0x1f4)][_0xb9b723(0x1fe)]['code']===0x1;}async[_0x36155a(0x1fc)](_0x19cb0a,_0x3c9975,_0x5c495e){const _0x4badca=_0x36155a,_0x2da396={'unitId':_0x19cb0a,'threadId':_0x5c495e},_0x10fcbe=await this[_0x4badca(0x1dd)]['post']('/universer-api/comment/unit/'+_0x19cb0a+_0x4badca(0x1c0),{'body':_0x2da396}),_0x41c389=_0x5c495e['map'](_0x5cbf2d=>G(_0x10fcbe['body']['comments'][_0x5cbf2d],_0x19cb0a,_0x3c9975))[_0x4badca(0x1bc)](Boolean);return Object[_0x4badca(0x1b6)](_0x10fcbe[_0x4badca(0x1f4)][_0x4badca(0x1ad)])[_0x4badca(0x1db)](_0x1d92e6=>{const _0x22a6cc=_0x4badca;this[_0x22a6cc(0x1c3)][_0x22a6cc(0x1f2)](_0x1d92e6);}),_0x41c389;}[_0x36155a(0x1a8)](_0x201acd){const _0x40a234=_0x36155a;return{'id':_0x201acd['id'],'threadId':_0x201acd[_0x40a234(0x1c9)],'ref':_0x201acd[_0x40a234(0x1e7)]};}};function _0x5362(_0x436b95,_0x3f2868){const _0x374eb0=_0x374e();return _0x5362=function(_0x5362cc,_0x3d30c1){_0x5362cc=_0x5362cc-0x18d;let _0x4108fb=_0x374eb0[_0x5362cc];return _0x4108fb;},_0x5362(_0x436b95,_0x3f2868);}g=x([_(0x0,c[_0x36155a(0x197)](P[_0x36155a(0x19d)])),_(0x1,c[_0x36155a(0x197)](c[_0x36155a(0x193)])),_(0x2,c['Inject'](b[_0x36155a(0x1aa)])),_(0x3,c[_0x36155a(0x197)](c[_0x36155a(0x218)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0xeb10eb,_0x12a2e9,_0x23d3a8,_0x8936b2)=>{const _0x3bf85f=_0x36155a;for(var _0xc21ae6=_0x8936b2>0x1?void 0x0:_0x8936b2?H(_0x12a2e9,_0x23d3a8):_0x12a2e9,_0x240712=_0xeb10eb[_0x3bf85f(0x216)]-0x1,_0x1ad6f8;_0x240712>=0x0;_0x240712--)(_0x1ad6f8=_0xeb10eb[_0x240712])&&(_0xc21ae6=_0x1ad6f8(_0xc21ae6)||_0xc21ae6);return _0xc21ae6;},y=(_0x4c3b62,_0x2d77cc)=>(_0x21316b,_0x3f0832)=>_0x2d77cc(_0x21316b,_0x3f0832,_0x4c3b62);let C=class extends c[_0x36155a(0x1bd)]{constructor(_0x1dde57,_0x365be2){const _0x16ef70=_0x36155a;super(),this[_0x16ef70(0x1c2)]=_0x1dde57,this[_0x16ef70(0x207)]=_0x365be2,this[_0x16ef70(0x1d5)]();}[_0x36155a(0x1d5)](){const _0x327b35=_0x36155a;this[_0x327b35(0x1c2)][_0x327b35(0x192)]=this[_0x327b35(0x207)],this[_0x327b35(0x1c2)][_0x327b35(0x1da)]=!0x1;}};function _0x374e(){const _0x4efb77=['forEach','pluginName','_httpService','/solved','getCurrentUser','YYYY/MM/DD\x20HH:mm','delete','Reply','_threadCommentModel','Plugin','thread-comment-data-source.config','personId','ref','disposeWithMe','COMMENT','find','symbol','_sessionService','comment','reply','OpenOrReOpen','UniverCollaborationClientPlugin','updateComment','addUser','49SNXnvx','body','/universer-api/comment/unit/','UNIVER_UNKNOWN','type','content','101397FGImzt','Module','2swsEtN','listComments','_injector','error','bufferTime','setConfig','unitId','post','map','defineProperty','requireSession','user','_threadCommentDataSource','_commentService','UniverThreadCommentUIPlugin','CustomRangeType','29740itYsBL','UniverInstanceType','_configService','8hIHRqJ','DependentOn','@univerjs-pro/collaboration-client','toStringTag','getUser','merge','stringify','onReady','length','_init','Injector','deleteComment','UNRECOGNIZED','userID','/reply','352392sDYQBa','dataSource','UserManagerService','Edit','/universer-api/user/list','Delete','Inject','replyId','format','Solve','commentUpdate$','pipe','HTTPService','code','size','subscribe','11838CiItpT','262970lTvodi','rangeType','UniverThreadCommentDataSourcePlugin','36DomRgc','3524339CNbVJC','/add','saveCommentToSnapshot','Unknown','CollaborationSessionService','@univerjs/network','parentId','users','_initUserSync','UniverLicensePlugin','193984hgzMXh','/edit','IThreadCommentDataSourceService','getUnit','12WQyekx','/delete','values','ThreadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','getOwnPropertyDescriptor','customRanges','filter','Disposable','createTimestamp','@univerjs/thread-comment','/list','solved','_threadCommentDataSourceService','_userService','dayjs','33KOqZCS','rxjs','resolved','parse','threadId','Add','@univerjs-pro/license','Solved','resolveComment','addComment','rangeId','userId','add','getComment','get','replies','_initDataSource','@univerjs/core','_config','root','getMemberID','syncUpdateMutationToColla'];_0x374e=function(){return _0x4efb77;};return _0x374e();}C=J([y(0x0,M[_0x36155a(0x1b2)]),y(0x1,c['Inject'](g))],C);var F=Object['defineProperty'],L=Object[_0x36155a(0x1ba)],Z=(_0x52ba7e,_0x4d94d3,_0x30f673)=>_0x4d94d3 in _0x52ba7e?F(_0x52ba7e,_0x4d94d3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x30f673}):_0x52ba7e[_0x4d94d3]=_0x30f673,W=(_0x4fab5a,_0x1abf17,_0x59833f,_0x49e22f)=>{const _0x55ca05=_0x36155a;for(var _0x5b7a76=_0x49e22f>0x1?void 0x0:_0x49e22f?L(_0x1abf17,_0x59833f):_0x1abf17,_0x5a598c=_0x4fab5a[_0x55ca05(0x216)]-0x1,_0xecbeff;_0x5a598c>=0x0;_0x5a598c--)(_0xecbeff=_0x4fab5a[_0x5a598c])&&(_0x5b7a76=_0xecbeff(_0x5b7a76)||_0x5b7a76);return _0x5b7a76;},O=(_0x28f1c7,_0x4a95fb)=>(_0x83ca4f,_0x3b537f)=>_0x4a95fb(_0x83ca4f,_0x3b537f,_0x28f1c7),N=(_0x2b4baa,_0x322063,_0x36a352)=>Z(_0x2b4baa,typeof _0x322063!=_0x36155a(0x1eb)?_0x322063+'':_0x322063,_0x36a352);exports[_0x36155a(0x1a4)]=class extends c[_0x36155a(0x1e4)]{constructor(_0xe0e9eb=D,_0x2a2dc1,_0x2d28f9){const _0x324650=_0x36155a;super(),this['_config']=_0xe0e9eb,this[_0x324650(0x1fd)]=_0x2a2dc1,this[_0x324650(0x20d)]=_0x2d28f9;const {..._0x39593f}=c[_0x324650(0x213)]({},D,this[_0x324650(0x1d7)]);this['_configService'][_0x324650(0x200)](q,_0x39593f);}['onStarting'](){[[g],[C],[p]]['forEach'](_0xb3d572=>{const _0x42799e=_0x5362;this[_0x42799e(0x1fd)][_0x42799e(0x1d1)](_0xb3d572);});}[_0x36155a(0x215)](){const _0xedb4de=_0x36155a;this[_0xedb4de(0x1fd)][_0xedb4de(0x1d3)](C),this[_0xedb4de(0x1fd)][_0xedb4de(0x1d3)](p);}},N(exports[_0x36155a(0x1a4)],_0x36155a(0x1dc),U),N(exports[_0x36155a(0x1a4)],_0x36155a(0x1f7),c[_0x36155a(0x20c)][_0x36155a(0x1f6)]),exports[_0x36155a(0x1a4)]=W([c[_0x36155a(0x20f)](j[_0x36155a(0x209)],b[_0x36155a(0x1f0)],T[_0x36155a(0x1af)]),O(0x1,c[_0x36155a(0x197)](c[_0x36155a(0x218)])),O(0x2,c[_0x36155a(0x1b9)])],exports[_0x36155a(0x1a4)]);
|
|
1
|
+
'use strict';const _0x5757c3=_0x1250;(function(_0x166d49,_0x4715b6){const _0x2bd5d5=_0x1250,_0x148f20=_0x166d49();while(!![]){try{const _0x24e03a=-parseInt(_0x2bd5d5(0x119))/0x1+parseInt(_0x2bd5d5(0x168))/0x2*(-parseInt(_0x2bd5d5(0x15e))/0x3)+parseInt(_0x2bd5d5(0x126))/0x4+parseInt(_0x2bd5d5(0x18a))/0x5+-parseInt(_0x2bd5d5(0x159))/0x6+parseInt(_0x2bd5d5(0x140))/0x7+parseInt(_0x2bd5d5(0x11b))/0x8;if(_0x24e03a===_0x4715b6)break;else _0x148f20['push'](_0x148f20['shift']());}catch(_0xbff3d){_0x148f20['push'](_0x148f20['shift']());}}}(_0xe3cd,0x6ea79));function _0x1250(_0x1b0c57,_0x594a4b){const _0xe3cd16=_0xe3cd();return _0x1250=function(_0x1250e5,_0x1a52d1){_0x1250e5=_0x1250e5-0x112;let _0x1024ff=_0xe3cd16[_0x1250e5];return _0x1024ff;},_0x1250(_0x1b0c57,_0x594a4b);}Object[_0x5757c3(0x14b)](exports,Symbol[_0x5757c3(0x14a)],{'value':'Module'});const b=require(_0x5757c3(0x171)),T=require(_0x5757c3(0x152)),c=require(_0x5757c3(0x166)),j=require(_0x5757c3(0x124)),M=require(_0x5757c3(0x161)),w=require('rxjs'),P=require(_0x5757c3(0x14c)),U=_0x5757c3(0x143);var I=(_0x539caf=>(_0x539caf[_0x539caf[_0x5757c3(0x11a)]=0x0]=_0x5757c3(0x11a),_0x539caf[_0x539caf[_0x5757c3(0x186)]=0x1]=_0x5757c3(0x186),_0x539caf[_0x539caf['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x539caf))(I||{}),v=(_0x3f8cf8=>(_0x3f8cf8[_0x3f8cf8[_0x5757c3(0x173)]=0x0]='Unknown',_0x3f8cf8[_0x3f8cf8['Add']=0x1]='Add',_0x3f8cf8[_0x3f8cf8[_0x5757c3(0x141)]=0x2]=_0x5757c3(0x141),_0x3f8cf8[_0x3f8cf8['Edit']=0x3]='Edit',_0x3f8cf8[_0x3f8cf8[_0x5757c3(0x136)]=0x4]=_0x5757c3(0x136),_0x3f8cf8[_0x3f8cf8[_0x5757c3(0x114)]=0x5]=_0x5757c3(0x114),_0x3f8cf8[_0x3f8cf8[_0x5757c3(0x13e)]=-0x1]=_0x5757c3(0x13e),_0x3f8cf8))(v||{});const f=_0xa50bd5=>c[_0x5757c3(0x148)](new Date(+_0xa50bd5))[_0x5757c3(0x179)](_0x5757c3(0x183)),R=async(_0x1fec34,_0x2b0b2b)=>{const _0x36da4e=_0x5757c3,_0x411f94=_0x1fec34[_0x36da4e(0x142)](c[_0x36da4e(0x17a)]),_0x45e8ea=_0x1fec34[_0x36da4e(0x142)](P[_0x36da4e(0x15a)]);_0x2b0b2b['forEach'](_0x4ac328=>{const _0x320918=_0x36da4e;_0x411f94[_0x320918(0x17c)](_0x4ac328)&&_0x2b0b2b[_0x320918(0x135)](_0x4ac328);}),_0x2b0b2b[_0x36da4e(0x15b)]&&(await _0x45e8ea[_0x36da4e(0x142)](_0x36da4e(0x167),{'params':{'userIDs':[..._0x2b0b2b]}}))[_0x36da4e(0x123)]['users'][_0x36da4e(0x145)](_0x32af80=>{const _0x1aadc2=_0x36da4e;_0x32af80&&_0x411f94[_0x1aadc2(0x180)](_0x32af80);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x18c786,_0x49277e,_0x2f778f,_0x490a9b)=>{const _0x2ebb1d=_0x5757c3;for(var _0x208263=_0x490a9b>0x1?void 0x0:_0x490a9b?$(_0x49277e,_0x2f778f):_0x49277e,_0x42ea22=_0x18c786[_0x2ebb1d(0x113)]-0x1,_0x5ba0d3;_0x42ea22>=0x0;_0x42ea22--)(_0x5ba0d3=_0x18c786[_0x42ea22])&&(_0x208263=_0x5ba0d3(_0x208263)||_0x208263);return _0x208263;},S=(_0x45a37a,_0x15689d)=>(_0x1cbd57,_0x2e0b4c)=>_0x15689d(_0x1cbd57,_0x2e0b4c,_0x45a37a);let p=class extends c[_0x5757c3(0x12c)]{constructor(_0x150a3f,_0x52d0bc,_0x5bacd3,_0x5335f3){const _0x4de7bb=_0x5757c3;super(),this[_0x4de7bb(0x11f)]=_0x150a3f,this[_0x4de7bb(0x130)]=_0x52d0bc,this[_0x4de7bb(0x13c)]=_0x5bacd3,this[_0x4de7bb(0x134)]=_0x5335f3,this[_0x4de7bb(0x138)](),this['_initUserSync']();}['_initUserSync'](){const _0x36f903=_0x5757c3;this[_0x36f903(0x122)](this[_0x36f903(0x130)][_0x36f903(0x17f)]['pipe'](w['bufferTime'](0x10))[_0x36f903(0x13d)](_0x49d1d6=>{const _0x1157c8=_0x36f903,_0x1d8141=new Set();_0x49d1d6[_0x1157c8(0x145)](_0x1d0af0=>{const _0x37d48d=_0x1157c8;switch(_0x1d0af0['type']){case _0x37d48d(0x14f):{const _0x38f756=_0x1d0af0[_0x37d48d(0x120)]['personId'];_0x1d8141['add'](_0x38f756);break;}}}),R(this[_0x1157c8(0x134)],_0x1d8141);}));}[_0x5757c3(0x138)](){const _0x18e273=_0x5757c3;this[_0x18e273(0x122)](this[_0x18e273(0x11f)]['commentUpdate$'][_0x18e273(0x13d)](async _0x362738=>{const _0x213aa5=_0x18e273;var _0x27f0c1,_0x5c88ce,_0x437b8c,_0x167f29;const _0x5cb856=(_0x27f0c1=this[_0x213aa5(0x130)]['getUnit'](_0x362738[_0x213aa5(0x13f)])[_0x213aa5(0x15c)](_0x7fdf04=>_0x7fdf04[_0x213aa5(0x13a)]===_0x362738['threadId']))==null?void 0x0:_0x27f0c1['root'];if(!_0x5cb856)return;const {unitId:_0x29dcde,subUnitId:_0x5c256a}=_0x5cb856;switch(_0x362738['user']&&this[_0x213aa5(0x13c)][_0x213aa5(0x180)](_0x362738['user']),_0x362738[_0x213aa5(0x187)]){case v['Add']:break;case v['Reply']:{this[_0x213aa5(0x130)]['addComment'](_0x29dcde,_0x5c256a,{'unitId':_0x29dcde,'subUnitId':_0x5c256a,'ref':'','id':_0x362738['replyId'],'dT':f(+_0x362738[_0x213aa5(0x157)]),'threadId':_0x362738[_0x213aa5(0x13a)],'personId':(_0x437b8c=(_0x5c88ce=_0x362738[_0x213aa5(0x144)])==null?void 0x0:_0x5c88ce[_0x213aa5(0x125)])!=null?_0x437b8c:_0x362738['userId'],'text':JSON[_0x213aa5(0x132)](_0x362738[_0x213aa5(0x139)]),'parentId':_0x5cb856['id']});break;}case v[_0x213aa5(0x136)]:{const _0x59383c=this[_0x213aa5(0x130)][_0x213aa5(0x163)](_0x29dcde,_0x5c256a,_0x362738['replyId']);_0x59383c&&_0x59383c[_0x213aa5(0x155)]&&this[_0x213aa5(0x130)][_0x213aa5(0x137)](_0x29dcde,_0x5c256a,_0x362738[_0x213aa5(0x14d)]);break;}case v['Edit']:{this[_0x213aa5(0x130)][_0x213aa5(0x127)](_0x29dcde,_0x5c256a,{'commentId':_0x362738[_0x213aa5(0x14d)],'text':JSON[_0x213aa5(0x132)](_0x362738['content'])});break;}case v[_0x213aa5(0x114)]:{const _0x552c21=(_0x167f29=this[_0x213aa5(0x130)][_0x213aa5(0x17d)](_0x362738['unitId'])[_0x213aa5(0x15c)](_0x51af26=>_0x51af26[_0x213aa5(0x13a)]===_0x362738[_0x213aa5(0x13a)]))==null?void 0x0:_0x167f29['root'];_0x552c21&&this[_0x213aa5(0x130)][_0x213aa5(0x15d)](_0x29dcde,_0x5c256a,_0x552c21['id'],_0x362738[_0x213aa5(0x11d)]===I[_0x213aa5(0x186)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x5757c3(0x178)])),S(0x1,c[_0x5757c3(0x160)](M[_0x5757c3(0x158)])),S(0x2,c[_0x5757c3(0x160)](c['UserManagerService'])),S(0x3,c[_0x5757c3(0x160)](c['Injector']))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x5757c3(0x15f)],x=(_0x31b398,_0x1fe7f9,_0x33dce3,_0x12df3a)=>{const _0x108c1a=_0x5757c3;for(var _0x3f1b8d=_0x12df3a>0x1?void 0x0:_0x12df3a?A(_0x1fe7f9,_0x33dce3):_0x1fe7f9,_0x5ca1e6=_0x31b398[_0x108c1a(0x113)]-0x1,_0x4f295a;_0x5ca1e6>=0x0;_0x5ca1e6--)(_0x4f295a=_0x31b398[_0x5ca1e6])&&(_0x3f1b8d=_0x4f295a(_0x3f1b8d)||_0x3f1b8d);return _0x3f1b8d;},_=(_0x25b645,_0x2ef445)=>(_0xd2aed1,_0x184666)=>_0x2ef445(_0xd2aed1,_0x184666,_0x25b645);function Y(_0x4ede84,_0x2a7d63){const _0x5eb2b2=_0x5757c3,_0x1d12fa=_0x4ede84[_0x5eb2b2(0x16b)][0x0];return{..._0x2a7d63,'id':_0x1d12fa['replyId'],'resolved':_0x4ede84['solved']===0x1,'dT':f(_0x1d12fa[_0x5eb2b2(0x157)]),'personId':_0x1d12fa[_0x5eb2b2(0x129)],'threadId':_0x1d12fa[_0x5eb2b2(0x13a)]};}function G(_0x56c76b,_0x9655be,_0x4309d1){const _0xaf5330=_0x5757c3;var _0x43605c,_0x582066;if(((_0x582066=(_0x43605c=_0x56c76b==null?void 0x0:_0x56c76b['replies'])==null?void 0x0:_0x43605c[_0xaf5330(0x113)])!=null?_0x582066:0x0)>0x0){const _0x137f0f=(_0x431b95,_0x584e2e)=>({'id':_0x431b95[_0xaf5330(0x14d)],'threadId':_0x431b95[_0xaf5330(0x13a)],'dT':f(_0x431b95[_0xaf5330(0x157)]),'personId':_0x431b95[_0xaf5330(0x129)],'resolved':_0x56c76b[_0xaf5330(0x11d)]===I[_0xaf5330(0x186)],'unitId':_0x9655be,'subUnitId':_0x4309d1,'text':JSON['parse'](_0x431b95['content']),'parentId':_0x584e2e}),_0x3473a1=_0x137f0f(_0x56c76b['replies'][0x0]);return{..._0x3473a1,'children':_0x56c76b['replies'][_0xaf5330(0x115)](0x1)[_0xaf5330(0x153)](_0x50f664=>_0x137f0f(_0x50f664,_0x3473a1['id']))};}return null;}let g=class{constructor(_0x21cb9a,_0x1ab13b,_0x2747c8,_0x5771ce){const _0x5ce055=_0x5757c3;this[_0x5ce055(0x169)]=_0x21cb9a,this[_0x5ce055(0x13c)]=_0x1ab13b,this['_sessionService']=_0x2747c8,this['_injector']=_0x5771ce;}async[_0x5757c3(0x172)](_0x40adef){const _0x21ae24=_0x5757c3;var _0x4b38e3,_0x14ff40;const {parentId:_0x47ff56,unitId:_0xe2c6ad,text:_0x3ec476,threadId:_0xc3ff6b}=_0x40adef,_0x52797e=(_0x14ff40=(_0x4b38e3=_0x3ec476[_0x21ae24(0x181)])==null?void 0x0:_0x4b38e3[_0x21ae24(0x154)](_0x51e58b=>_0x51e58b['rangeType']===c[_0x21ae24(0x117)][_0x21ae24(0x12a)])[_0x21ae24(0x153)](_0x2fd1af=>_0x2fd1af[_0x21ae24(0x13b)]))!=null?_0x14ff40:[],_0x2068c7=JSON['stringify'](_0x3ec476),_0x5b1448=(await this[_0x21ae24(0x16f)][_0x21ae24(0x146)](_0xe2c6ad))[_0x21ae24(0x185)]();if(_0x47ff56){const _0x4c56b4={'memberId':_0x5b1448,'unitId':_0xe2c6ad,'content':_0x2068c7,'mention':_0x52797e,'threadId':_0xc3ff6b},_0x50b7dc=(await this[_0x21ae24(0x169)][_0x21ae24(0x16e)]('/universer-api/comment/unit/'+_0xe2c6ad+'/reply',{'body':_0x4c56b4}))['body'][_0x21ae24(0x16c)];return{..._0x40adef,'id':_0x50b7dc[_0x21ae24(0x14d)],'dT':c[_0x21ae24(0x148)](+_0x50b7dc[_0x21ae24(0x157)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x50b7dc[_0x21ae24(0x129)]};}else{const _0x4f0e12={'memberId':_0x5b1448,'unitId':_0xe2c6ad,'content':_0x2068c7,'mention':_0x52797e},_0x468b80=await this[_0x21ae24(0x169)][_0x21ae24(0x16e)]('/universer-api/comment/unit/'+_0xe2c6ad+'/add',{'body':_0x4f0e12});return Y(_0x468b80[_0x21ae24(0x123)][_0x21ae24(0x189)],_0x40adef);}}async[_0x5757c3(0x127)](_0x28c16d){const _0xccfc7b=_0x5757c3;var _0x176a26,_0x1ab911;const {text:_0x2d22f8,unitId:_0x43ca50}=_0x28c16d,_0x51abfa=(_0x1ab911=(_0x176a26=_0x2d22f8[_0xccfc7b(0x181)])==null?void 0x0:_0x176a26[_0xccfc7b(0x154)](_0x58d9a6=>_0x58d9a6[_0xccfc7b(0x164)]===c[_0xccfc7b(0x117)]['COMMENT'])[_0xccfc7b(0x153)](_0x3ce7ba=>_0x3ce7ba[_0xccfc7b(0x13b)]))!=null?_0x1ab911:[],_0x396729=JSON[_0xccfc7b(0x12b)](_0x2d22f8),_0x5569a0=_0x28c16d[_0xccfc7b(0x13a)],_0x297654=_0x28c16d['id'],_0x5cc142={'memberId':(await this[_0xccfc7b(0x16f)][_0xccfc7b(0x146)](_0x43ca50))[_0xccfc7b(0x185)](),'unitId':_0x43ca50,'threadId':_0x5569a0,'mention':_0x51abfa,'content':_0x396729,'replyId':_0x297654},_0x4eabfa=await this[_0xccfc7b(0x169)][_0xccfc7b(0x16e)](_0xccfc7b(0x184)+_0x43ca50+_0xccfc7b(0x11c),{'body':_0x5cc142});return!_0x4eabfa[_0xccfc7b(0x123)][_0xccfc7b(0x156)]||_0x4eabfa['body'][_0xccfc7b(0x156)]['code']===0x1;}async[_0x5757c3(0x15d)](_0x4756ac){const _0x452b18=_0x5757c3,{unitId:_0x5d6996}=_0x4756ac,_0x27e3da=_0x4756ac[_0x452b18(0x13a)],_0x40770e={'memberId':this[_0x452b18(0x13c)]['getCurrentUser']()['userID'],'unitId':_0x5d6996,'threadId':_0x27e3da,'solved':_0x4756ac[_0x452b18(0x14e)]?I['Solved']:I[_0x452b18(0x11a)]},_0x20b482=await this[_0x452b18(0x169)][_0x452b18(0x16e)](_0x452b18(0x184)+_0x5d6996+'/solved',{'body':_0x40770e});return!_0x20b482[_0x452b18(0x123)][_0x452b18(0x156)]||_0x20b482[_0x452b18(0x123)]['error']['code']===0x1;}async[_0x5757c3(0x137)](_0xdadf7f,_0x27532f,_0x13857e,_0x597c2f){const _0x2cc32c=_0x5757c3,_0x288a58={'memberId':(await this[_0x2cc32c(0x16f)]['requireSession'](_0xdadf7f))[_0x2cc32c(0x185)](),'threadId':_0x13857e,'replyId':_0x597c2f,'unitId':_0xdadf7f},_0x18c4cd=await this[_0x2cc32c(0x169)][_0x2cc32c(0x16e)]('/universer-api/comment/unit/'+_0xdadf7f+_0x2cc32c(0x170),{'body':_0x288a58});return!_0x18c4cd[_0x2cc32c(0x123)]['error']||_0x18c4cd[_0x2cc32c(0x123)][_0x2cc32c(0x156)]['code']===0x1;}async[_0x5757c3(0x162)](_0x2cd94e,_0x123176,_0x54f253){const _0x59289f=_0x5757c3,_0x5672b9={'unitId':_0x2cd94e,'threadId':_0x54f253},_0x1946ce=await this['_httpService'][_0x59289f(0x16e)](_0x59289f(0x184)+_0x2cd94e+_0x59289f(0x12e),{'body':_0x5672b9}),_0x211856=_0x54f253['map'](_0x50af94=>G(_0x1946ce[_0x59289f(0x123)]['comments'][_0x50af94],_0x2cd94e,_0x123176))['filter'](Boolean);return Object[_0x59289f(0x118)](_0x1946ce['body'][_0x59289f(0x116)])['forEach'](_0xd2f555=>{const _0x1905a2=_0x59289f;this[_0x1905a2(0x13c)][_0x1905a2(0x180)](_0xd2f555);}),_0x211856;}['saveCommentToSnapshot'](_0x41d745){const _0x3ece84=_0x5757c3;return{'id':_0x41d745['id'],'threadId':_0x41d745[_0x3ece84(0x13a)],'ref':_0x41d745['ref']};}};g=x([_(0x0,c[_0x5757c3(0x160)](P[_0x5757c3(0x15a)])),_(0x1,c[_0x5757c3(0x160)](c[_0x5757c3(0x17a)])),_(0x2,c[_0x5757c3(0x160)](b[_0x5757c3(0x16d)])),_(0x3,c[_0x5757c3(0x160)](c[_0x5757c3(0x16a)]))],g);function _0xe3cd(){const _0x4d579e=['CollaborationSessionService','post','_sessionService','/delete','@univerjs-pro/collaboration-client','addComment','Unknown','_threadCommentDataSourceService','UniverCollaborationClientPlugin','onReady','symbol','CommentService','format','UserManagerService','onStarting','getUser','getUnit','dataSource','commentUpdate$','addUser','customRanges','_config','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','getMemberID','Solved','type','UniverLicensePlugin','comment','26490XIWWdH','pluginName','length','Solve','slice','users','CustomRangeType','values','93884xweojK','OpenOrReOpen','5495264TeSznd','/edit','solved','UniverThreadCommentDataSourcePlugin','_commentService','payload','_threadCommentDataSource','disposeWithMe','body','@univerjs/thread-comment-ui','userID','3054148zHUwYK','updateComment','DependentOn','userId','COMMENT','stringify','Disposable','_initDataSource','/list','setConfig','_threadCommentModel','UniverThreadCommentUIPlugin','parse','UniverInstanceType','_injector','delete','Delete','deleteComment','_init','content','threadId','rangeId','_userService','subscribe','UNRECOGNIZED','unitId','27993Eqjzdx','Reply','get','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','user','forEach','requireSession','UNIVER_UNKNOWN','dayjs','Plugin','toStringTag','defineProperty','@univerjs/network','replyId','resolved','add','IThreadCommentDataSourceService','IConfigService','@univerjs-pro/license','map','filter','parentId','error','createTimestamp','ThreadCommentModel','3910620hKtxKA','HTTPService','size','find','resolveComment','27bNaaiK','getOwnPropertyDescriptor','Inject','@univerjs/thread-comment','listComments','getComment','rangeType','syncUpdateMutationToColla','@univerjs/core','/universer-api/user/list','57966DVuuxJ','_httpService','Injector','replies','reply'];_0xe3cd=function(){return _0x4d579e;};return _0xe3cd();}var H=Object[_0x5757c3(0x15f)],J=(_0x1406b5,_0x2a0654,_0x362dea,_0x1522e8)=>{const _0x2c59da=_0x5757c3;for(var _0x433f2e=_0x1522e8>0x1?void 0x0:_0x1522e8?H(_0x2a0654,_0x362dea):_0x2a0654,_0x404d5d=_0x1406b5[_0x2c59da(0x113)]-0x1,_0x27c1b3;_0x404d5d>=0x0;_0x404d5d--)(_0x27c1b3=_0x1406b5[_0x404d5d])&&(_0x433f2e=_0x27c1b3(_0x433f2e)||_0x433f2e);return _0x433f2e;},y=(_0x4bde58,_0x3ea937)=>(_0x772bf9,_0x561999)=>_0x3ea937(_0x772bf9,_0x561999,_0x4bde58);let C=class extends c[_0x5757c3(0x12c)]{constructor(_0x46fd0d,_0x3991cc){const _0x12acbf=_0x5757c3;super(),this[_0x12acbf(0x174)]=_0x46fd0d,this[_0x12acbf(0x121)]=_0x3991cc,this[_0x12acbf(0x12d)]();}[_0x5757c3(0x12d)](){const _0x513d29=_0x5757c3;this[_0x513d29(0x174)][_0x513d29(0x17e)]=this['_threadCommentDataSource'],this[_0x513d29(0x174)][_0x513d29(0x165)]=!0x1;}};C=J([y(0x0,M[_0x5757c3(0x150)]),y(0x1,c[_0x5757c3(0x160)](g))],C);var F=Object[_0x5757c3(0x14b)],L=Object[_0x5757c3(0x15f)],Z=(_0x1807f2,_0x2080c1,_0x4e9463)=>_0x2080c1 in _0x1807f2?F(_0x1807f2,_0x2080c1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e9463}):_0x1807f2[_0x2080c1]=_0x4e9463,W=(_0x4ea60a,_0x2c5c07,_0x1d60fc,_0x3ee52f)=>{const _0x6cdd02=_0x5757c3;for(var _0x2a0cb6=_0x3ee52f>0x1?void 0x0:_0x3ee52f?L(_0x2c5c07,_0x1d60fc):_0x2c5c07,_0xf6c56f=_0x4ea60a[_0x6cdd02(0x113)]-0x1,_0x318261;_0xf6c56f>=0x0;_0xf6c56f--)(_0x318261=_0x4ea60a[_0xf6c56f])&&(_0x2a0cb6=_0x318261(_0x2a0cb6)||_0x2a0cb6);return _0x2a0cb6;},O=(_0x16b4b0,_0x1b7826)=>(_0x36cefd,_0x412545)=>_0x1b7826(_0x36cefd,_0x412545,_0x16b4b0),N=(_0x170ebf,_0x388770,_0x1b2637)=>Z(_0x170ebf,typeof _0x388770!=_0x5757c3(0x177)?_0x388770+'':_0x388770,_0x1b2637);exports[_0x5757c3(0x11e)]=class extends c[_0x5757c3(0x149)]{constructor(_0x58863a=D,_0xef94a1,_0xa1e559){const _0x289e7c=_0x5757c3;super(),this[_0x289e7c(0x182)]=_0x58863a,this[_0x289e7c(0x134)]=_0xef94a1,this['_configService']=_0xa1e559;const {..._0x29c51f}=c['merge']({},D,this[_0x289e7c(0x182)]);this['_configService'][_0x289e7c(0x12f)](q,_0x29c51f);}[_0x5757c3(0x17b)](){const _0x42828e=_0x5757c3;[[g],[C],[p]][_0x42828e(0x145)](_0x104f96=>{const _0xbb66f7=_0x42828e;this[_0xbb66f7(0x134)][_0xbb66f7(0x14f)](_0x104f96);});}[_0x5757c3(0x176)](){const _0x20f799=_0x5757c3;this[_0x20f799(0x134)][_0x20f799(0x142)](C),this[_0x20f799(0x134)]['get'](p);}},N(exports[_0x5757c3(0x11e)],_0x5757c3(0x112),U),N(exports[_0x5757c3(0x11e)],_0x5757c3(0x187),c[_0x5757c3(0x133)][_0x5757c3(0x147)]),exports[_0x5757c3(0x11e)]=W([c[_0x5757c3(0x128)](j[_0x5757c3(0x131)],b[_0x5757c3(0x175)],T[_0x5757c3(0x188)]),O(0x1,c['Inject'](c[_0x5757c3(0x16a)])),O(0x2,c[_0x5757c3(0x151)])],exports[_0x5757c3(0x11e)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x3767(){const _0x5233a8=['solved','addUser','getCurrentUser','rangeId','post','4154064AHckNC','thread-comment-data-source.config','Unknown','disposeWithMe','setConfig','root','updateComment','filter','Edit','getUser','_threadCommentDataSource','21847VoEvdh','_sessionService','body','length','onStarting','content','reply','customRanges','/edit','createTimestamp','addComment','_injector','Solve','ref','onReady','1900593PgXnwe','UNIVER_UNKNOWN','_config','user','format','/universer-api/user/list','/add','_httpService','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','YYYY/MM/DD\x20HH:mm','stringify','Delete','symbol','replies','Add','/list','get','slice','dataSource','add','unitId','_commentService','resolveComment','/reply','getComment','personId','2934FYSOcN','syncUpdateMutationToColla','userID','map','115100MLLqVg','_initUserSync','/universer-api/comment/unit/','Solved','OpenOrReOpen','code','commentUpdate$','type','requireSession','rangeType','pluginName','Reply','find','threadId','listComments','8630390Yumofa','getMemberID','getUnit','4675692FsTVDL','comments','parse','getOwnPropertyDescriptor','payload','3271586Xmexbm','parentId','subscribe','_threadCommentDataSourceService','_init','_userService','userId','_initDataSource','delete','deleteComment','1GVUxAp','users','saveCommentToSnapshot','size','_threadCommentModel','replyId','forEach','error'];_0x3767=function(){return _0x5233a8;};return _0x3767();}const _0x471d44=_0x4b1d;function _0x4b1d(_0x4517b0,_0x5e6e6a){const _0x37671b=_0x3767();return _0x4b1d=function(_0x4b1d76,_0x13d919){_0x4b1d76=_0x4b1d76-0x126;let _0xad7dff=_0x37671b[_0x4b1d76];return _0xad7dff;},_0x4b1d(_0x4517b0,_0x5e6e6a);}(function(_0x56376d,_0x57cdbb){const _0x2fe99a=_0x4b1d,_0x2c80b1=_0x56376d();while(!![]){try{const _0x5572ba=-parseInt(_0x2fe99a(0x13f))/0x1*(-parseInt(_0x2fe99a(0x135))/0x2)+-parseInt(_0x2fe99a(0x130))/0x3+-parseInt(_0x2fe99a(0x185))/0x4+parseInt(_0x2fe99a(0x12d))/0x5+parseInt(_0x2fe99a(0x181))/0x6*(-parseInt(_0x2fe99a(0x157))/0x7)+parseInt(_0x2fe99a(0x14c))/0x8+parseInt(_0x2fe99a(0x166))/0x9;if(_0x5572ba===_0x57cdbb)break;else _0x2c80b1['push'](_0x2c80b1['shift']());}catch(_0x8394ac){_0x2c80b1['push'](_0x2c80b1['shift']());}}}(_0x3767,0xeef6e));import{CommentService as _0x33903b,CollaborationSessionService as _0x57fc12,UniverCollaborationClientPlugin as _0x25f22d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4830c9}from'@univerjs-pro/license';import{dayjs as _0x542289,UserManagerService as _0x2f2550,Inject as _0x585a25,Injector as _0x38d7e2,Disposable as _0xd8303e,CustomRangeType as _0x5b5935,UniverInstanceType as _0xa7757e,DependentOn as _0x5eb8d0,IConfigService as _0x44404c,Plugin as _0x522f37,merge as _0x3dd9ff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x38085d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53494f,IThreadCommentDataSourceService as _0x28d703}from'@univerjs/thread-comment';import{bufferTime as _0x6080b5}from'rxjs';import{HTTPService as _0x2b4352}from'@univerjs/network';const W=_0x471d44(0x16f);var I=(_0x40630c=>(_0x40630c[_0x40630c[_0x471d44(0x189)]=0x0]=_0x471d44(0x189),_0x40630c[_0x40630c[_0x471d44(0x188)]=0x1]='Solved',_0x40630c[_0x40630c[_0x471d44(0x16e)]=-0x1]=_0x471d44(0x16e),_0x40630c))(I||{}),v=(_0x5f237c=>(_0x5f237c[_0x5f237c[_0x471d44(0x14e)]=0x0]=_0x471d44(0x14e),_0x5f237c[_0x5f237c[_0x471d44(0x175)]=0x1]='Add',_0x5f237c[_0x5f237c[_0x471d44(0x129)]=0x2]='Reply',_0x5f237c[_0x5f237c[_0x471d44(0x154)]=0x3]=_0x471d44(0x154),_0x5f237c[_0x5f237c['Delete']=0x4]=_0x471d44(0x172),_0x5f237c[_0x5f237c[_0x471d44(0x163)]=0x5]=_0x471d44(0x163),_0x5f237c[_0x5f237c['UNRECOGNIZED']=-0x1]=_0x471d44(0x16e),_0x5f237c))(v||{});const D=_0x4a2a4e=>_0x542289(new Date(+_0x4a2a4e))[_0x471d44(0x16a)](_0x471d44(0x170)),B=async(_0x27e73a,_0xb1756a)=>{const _0x53e5bd=_0x471d44,_0x1a24bb=_0x27e73a[_0x53e5bd(0x177)](_0x2f2550),_0x14693e=_0x27e73a[_0x53e5bd(0x177)](_0x2b4352);_0xb1756a['forEach'](_0xaf2485=>{const _0x1f1c0d=_0x53e5bd;_0x1a24bb[_0x1f1c0d(0x155)](_0xaf2485)&&_0xb1756a[_0x1f1c0d(0x13d)](_0xaf2485);}),_0xb1756a[_0x53e5bd(0x142)]&&(await _0x14693e[_0x53e5bd(0x177)](_0x53e5bd(0x16b),{'params':{'userIDs':[..._0xb1756a]}}))['body'][_0x53e5bd(0x140)]['forEach'](_0x5e6c0c=>{const _0x3d5a5e=_0x53e5bd;_0x5e6c0c&&_0x1a24bb[_0x3d5a5e(0x148)](_0x5e6c0c);});};var K=Object[_0x471d44(0x133)],V=(_0x368e01,_0x36656a,_0x487054,_0xb8eacb)=>{for(var _0x50c4a8=_0xb8eacb>0x1?void 0x0:_0xb8eacb?K(_0x36656a,_0x487054):_0x36656a,_0x52f94f=_0x368e01['length']-0x1,_0x43201b;_0x52f94f>=0x0;_0x52f94f--)(_0x43201b=_0x368e01[_0x52f94f])&&(_0x50c4a8=_0x43201b(_0x50c4a8)||_0x50c4a8);return _0x50c4a8;},p=(_0x407725,_0x1c159f)=>(_0x32831a,_0x38b1a3)=>_0x1c159f(_0x32831a,_0x38b1a3,_0x407725);let S=class extends _0xd8303e{constructor(_0x128ea7,_0x2eea8b,_0x29a2ff,_0x2e0f3e){const _0x12d17b=_0x471d44;super(),this['_commentService']=_0x128ea7,this[_0x12d17b(0x143)]=_0x2eea8b,this[_0x12d17b(0x13a)]=_0x29a2ff,this[_0x12d17b(0x162)]=_0x2e0f3e,this[_0x12d17b(0x139)](),this[_0x12d17b(0x186)]();}[_0x471d44(0x186)](){const _0x173794=_0x471d44;this[_0x173794(0x14f)](this[_0x173794(0x143)][_0x173794(0x18b)]['pipe'](_0x6080b5(0x10))[_0x173794(0x137)](_0x120f1f=>{const _0x212c6c=_0x173794,_0x528956=new Set();_0x120f1f[_0x212c6c(0x145)](_0x3573b8=>{const _0x1c0739=_0x212c6c;switch(_0x3573b8[_0x1c0739(0x18c)]){case _0x1c0739(0x17a):{const _0x56f427=_0x3573b8[_0x1c0739(0x134)][_0x1c0739(0x180)];_0x528956['add'](_0x56f427);break;}}}),B(this['_injector'],_0x528956);}));}[_0x471d44(0x139)](){const _0x1d7c68=_0x471d44;this[_0x1d7c68(0x14f)](this[_0x1d7c68(0x17c)][_0x1d7c68(0x18b)][_0x1d7c68(0x137)](async _0x9fe908=>{const _0x39dde8=_0x1d7c68;var _0xf88db7,_0x1b28d6,_0x1640a7,_0x3cfa2d;const _0x4f292b=(_0xf88db7=this[_0x39dde8(0x143)]['getUnit'](_0x9fe908[_0x39dde8(0x17b)])['find'](_0x48dffd=>_0x48dffd[_0x39dde8(0x12b)]===_0x9fe908[_0x39dde8(0x12b)]))==null?void 0x0:_0xf88db7['root'];if(!_0x4f292b)return;const {unitId:_0x4af91a,subUnitId:_0x9092ef}=_0x4f292b;switch(_0x9fe908[_0x39dde8(0x169)]&&this[_0x39dde8(0x13a)]['addUser'](_0x9fe908[_0x39dde8(0x169)]),_0x9fe908[_0x39dde8(0x18c)]){case v['Add']:break;case v['Reply']:{this[_0x39dde8(0x143)]['addComment'](_0x4af91a,_0x9092ef,{'unitId':_0x4af91a,'subUnitId':_0x9092ef,'ref':'','id':_0x9fe908[_0x39dde8(0x144)],'dT':D(+_0x9fe908[_0x39dde8(0x160)]),'threadId':_0x9fe908[_0x39dde8(0x12b)],'personId':(_0x1640a7=(_0x1b28d6=_0x9fe908['user'])==null?void 0x0:_0x1b28d6[_0x39dde8(0x183)])!=null?_0x1640a7:_0x9fe908[_0x39dde8(0x13b)],'text':JSON[_0x39dde8(0x132)](_0x9fe908[_0x39dde8(0x15c)]),'parentId':_0x4f292b['id']});break;}case v[_0x39dde8(0x172)]:{const _0x251db2=this['_threadCommentModel'][_0x39dde8(0x17f)](_0x4af91a,_0x9092ef,_0x9fe908['replyId']);_0x251db2&&_0x251db2[_0x39dde8(0x136)]&&this['_threadCommentModel'][_0x39dde8(0x13e)](_0x4af91a,_0x9092ef,_0x9fe908[_0x39dde8(0x144)]);break;}case v[_0x39dde8(0x154)]:{this['_threadCommentModel'][_0x39dde8(0x152)](_0x4af91a,_0x9092ef,{'commentId':_0x9fe908[_0x39dde8(0x144)],'text':JSON[_0x39dde8(0x132)](_0x9fe908[_0x39dde8(0x15c)])});break;}case v['Solve']:{const _0x213adc=(_0x3cfa2d=this[_0x39dde8(0x143)][_0x39dde8(0x12f)](_0x9fe908[_0x39dde8(0x17b)])[_0x39dde8(0x12a)](_0x17c11f=>_0x17c11f['threadId']===_0x9fe908['threadId']))==null?void 0x0:_0x3cfa2d[_0x39dde8(0x151)];_0x213adc&&this['_threadCommentModel'][_0x39dde8(0x17d)](_0x4af91a,_0x9092ef,_0x213adc['id'],_0x9fe908[_0x39dde8(0x147)]===I[_0x39dde8(0x188)]);break;}}}));}};S=V([p(0x0,_0x585a25(_0x33903b)),p(0x1,_0x585a25(_0x53494f)),p(0x2,_0x585a25(_0x2f2550)),p(0x3,_0x585a25(_0x38d7e2))],S);const z=_0x471d44(0x14d),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x51de9a,_0x239ad9,_0x2cce2e,_0x53e134)=>{const _0x143909=_0x471d44;for(var _0x1e7090=_0x53e134>0x1?void 0x0:_0x53e134?k(_0x239ad9,_0x2cce2e):_0x239ad9,_0xd443e9=_0x51de9a[_0x143909(0x15a)]-0x1,_0x50b3f2;_0xd443e9>=0x0;_0xd443e9--)(_0x50b3f2=_0x51de9a[_0xd443e9])&&(_0x1e7090=_0x50b3f2(_0x1e7090)||_0x1e7090);return _0x1e7090;},_=(_0x26d4d6,_0x48b834)=>(_0x276825,_0xd2df3d)=>_0x48b834(_0x276825,_0xd2df3d,_0x26d4d6);function X(_0x5d354c,_0x12f0c0){const _0x541d2f=_0x471d44,_0x3a906b=_0x5d354c[_0x541d2f(0x174)][0x0];return{..._0x12f0c0,'id':_0x3a906b[_0x541d2f(0x144)],'resolved':_0x5d354c[_0x541d2f(0x147)]===0x1,'dT':D(_0x3a906b[_0x541d2f(0x160)]),'personId':_0x3a906b[_0x541d2f(0x13b)],'threadId':_0x3a906b[_0x541d2f(0x12b)]};}function ee(_0x35b3d2,_0x33f0af,_0x60c4b5){const _0x30ede9=_0x471d44;var _0x239069,_0x532cef;if(((_0x532cef=(_0x239069=_0x35b3d2==null?void 0x0:_0x35b3d2['replies'])==null?void 0x0:_0x239069[_0x30ede9(0x15a)])!=null?_0x532cef:0x0)>0x0){const _0x24bdf0=(_0x187021,_0x4147a4)=>({'id':_0x187021[_0x30ede9(0x144)],'threadId':_0x187021[_0x30ede9(0x12b)],'dT':D(_0x187021[_0x30ede9(0x160)]),'personId':_0x187021['userId'],'resolved':_0x35b3d2['solved']===I['Solved'],'unitId':_0x33f0af,'subUnitId':_0x60c4b5,'text':JSON[_0x30ede9(0x132)](_0x187021[_0x30ede9(0x15c)]),'parentId':_0x4147a4}),_0x15d48a=_0x24bdf0(_0x35b3d2['replies'][0x0]);return{..._0x15d48a,'children':_0x35b3d2[_0x30ede9(0x174)][_0x30ede9(0x178)](0x1)[_0x30ede9(0x184)](_0x56f781=>_0x24bdf0(_0x56f781,_0x15d48a['id']))};}return null;}let f=class{constructor(_0x32bcbd,_0x36feeb,_0x5d84e6,_0x25eb31){const _0x1fe988=_0x471d44;this[_0x1fe988(0x16d)]=_0x32bcbd,this[_0x1fe988(0x13a)]=_0x36feeb,this[_0x1fe988(0x158)]=_0x5d84e6,this['_injector']=_0x25eb31;}async[_0x471d44(0x161)](_0x38196b){const _0x10b164=_0x471d44;var _0xcaf37b,_0x1b9e61;const {parentId:_0x275e51,unitId:_0x196b63,text:_0x14dcc1,threadId:_0x224f2a}=_0x38196b,_0x25cac2=(_0x1b9e61=(_0xcaf37b=_0x14dcc1['customRanges'])==null?void 0x0:_0xcaf37b[_0x10b164(0x153)](_0x291021=>_0x291021[_0x10b164(0x127)]===_0x5b5935['COMMENT'])[_0x10b164(0x184)](_0x2be23d=>_0x2be23d[_0x10b164(0x14a)]))!=null?_0x1b9e61:[],_0x5a7063=JSON[_0x10b164(0x171)](_0x14dcc1),_0x95c005=(await this[_0x10b164(0x158)][_0x10b164(0x126)](_0x196b63))[_0x10b164(0x12e)]();if(_0x275e51){const _0x40552e={'memberId':_0x95c005,'unitId':_0x196b63,'content':_0x5a7063,'mention':_0x25cac2,'threadId':_0x224f2a},_0x43617b=(await this[_0x10b164(0x16d)][_0x10b164(0x14b)](_0x10b164(0x187)+_0x196b63+_0x10b164(0x17e),{'body':_0x40552e}))['body'][_0x10b164(0x15d)];return{..._0x38196b,'id':_0x43617b['replyId'],'dT':_0x542289(+_0x43617b['createTimestamp'])[_0x10b164(0x16a)](_0x10b164(0x170)),'personId':_0x43617b[_0x10b164(0x13b)]};}else{const _0x3487a3={'memberId':_0x95c005,'unitId':_0x196b63,'content':_0x5a7063,'mention':_0x25cac2},_0x536e54=await this[_0x10b164(0x16d)][_0x10b164(0x14b)](_0x10b164(0x187)+_0x196b63+_0x10b164(0x16c),{'body':_0x3487a3});return X(_0x536e54[_0x10b164(0x159)]['comment'],_0x38196b);}}async['updateComment'](_0x2cc9fd){const _0x4c14fd=_0x471d44;var _0x9ddf99,_0x3b0d3a;const {text:_0x2892cc,unitId:_0x3ed4b2}=_0x2cc9fd,_0x112963=(_0x3b0d3a=(_0x9ddf99=_0x2892cc[_0x4c14fd(0x15e)])==null?void 0x0:_0x9ddf99[_0x4c14fd(0x153)](_0x3c85ba=>_0x3c85ba[_0x4c14fd(0x127)]===_0x5b5935['COMMENT'])['map'](_0x1ee985=>_0x1ee985[_0x4c14fd(0x14a)]))!=null?_0x3b0d3a:[],_0x45feac=JSON['stringify'](_0x2892cc),_0x51644f=_0x2cc9fd[_0x4c14fd(0x12b)],_0x4a7d86=_0x2cc9fd['id'],_0x46a03b={'memberId':(await this['_sessionService'][_0x4c14fd(0x126)](_0x3ed4b2))['getMemberID'](),'unitId':_0x3ed4b2,'threadId':_0x51644f,'mention':_0x112963,'content':_0x45feac,'replyId':_0x4a7d86},_0x42aed9=await this[_0x4c14fd(0x16d)][_0x4c14fd(0x14b)]('/universer-api/comment/unit/'+_0x3ed4b2+_0x4c14fd(0x15f),{'body':_0x46a03b});return!_0x42aed9[_0x4c14fd(0x159)][_0x4c14fd(0x146)]||_0x42aed9[_0x4c14fd(0x159)][_0x4c14fd(0x146)][_0x4c14fd(0x18a)]===0x1;}async[_0x471d44(0x17d)](_0x583b9d){const _0x387b43=_0x471d44,{unitId:_0x2c606a}=_0x583b9d,_0x13818a=_0x583b9d[_0x387b43(0x12b)],_0x4a443e={'memberId':this[_0x387b43(0x13a)][_0x387b43(0x149)]()[_0x387b43(0x183)],'unitId':_0x2c606a,'threadId':_0x13818a,'solved':_0x583b9d['resolved']?I[_0x387b43(0x188)]:I[_0x387b43(0x189)]},_0xe4c21a=await this[_0x387b43(0x16d)]['post']('/universer-api/comment/unit/'+_0x2c606a+'/solved',{'body':_0x4a443e});return!_0xe4c21a['body'][_0x387b43(0x146)]||_0xe4c21a[_0x387b43(0x159)][_0x387b43(0x146)]['code']===0x1;}async[_0x471d44(0x13e)](_0x38393e,_0x2eb112,_0x4ace57,_0x2809b9){const _0x2e628f=_0x471d44,_0x1e5a4b={'memberId':(await this['_sessionService'][_0x2e628f(0x126)](_0x38393e))[_0x2e628f(0x12e)](),'threadId':_0x4ace57,'replyId':_0x2809b9,'unitId':_0x38393e},_0x3f3636=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x38393e+'/delete',{'body':_0x1e5a4b});return!_0x3f3636[_0x2e628f(0x159)]['error']||_0x3f3636['body']['error'][_0x2e628f(0x18a)]===0x1;}async[_0x471d44(0x12c)](_0xbc7f52,_0x248a26,_0x3816b7){const _0x579359=_0x471d44,_0x2202a3={'unitId':_0xbc7f52,'threadId':_0x3816b7},_0x3c3116=await this[_0x579359(0x16d)][_0x579359(0x14b)]('/universer-api/comment/unit/'+_0xbc7f52+_0x579359(0x176),{'body':_0x2202a3}),_0x52e62a=_0x3816b7['map'](_0x50ab08=>ee(_0x3c3116['body'][_0x579359(0x131)][_0x50ab08],_0xbc7f52,_0x248a26))[_0x579359(0x153)](Boolean);return Object['values'](_0x3c3116['body']['users'])[_0x579359(0x145)](_0x1dc94d=>{const _0x1f1c78=_0x579359;this[_0x1f1c78(0x13a)][_0x1f1c78(0x148)](_0x1dc94d);}),_0x52e62a;}[_0x471d44(0x141)](_0x882e40){const _0x546fd7=_0x471d44;return{'id':_0x882e40['id'],'threadId':_0x882e40[_0x546fd7(0x12b)],'ref':_0x882e40[_0x546fd7(0x164)]};}};f=Q([_(0x0,_0x585a25(_0x2b4352)),_(0x1,_0x585a25(_0x2f2550)),_(0x2,_0x585a25(_0x57fc12)),_(0x3,_0x585a25(_0x38d7e2))],f);var re=Object[_0x471d44(0x133)],te=(_0x4d8d55,_0x3c08d0,_0x331d20,_0x526fd1)=>{const _0x5c0597=_0x471d44;for(var _0x46aeeb=_0x526fd1>0x1?void 0x0:_0x526fd1?re(_0x3c08d0,_0x331d20):_0x3c08d0,_0x2542d8=_0x4d8d55[_0x5c0597(0x15a)]-0x1,_0x2277fe;_0x2542d8>=0x0;_0x2542d8--)(_0x2277fe=_0x4d8d55[_0x2542d8])&&(_0x46aeeb=_0x2277fe(_0x46aeeb)||_0x46aeeb);return _0x46aeeb;},N=(_0x188d4c,_0x28561a)=>(_0x20fe74,_0x1281eb)=>_0x28561a(_0x20fe74,_0x1281eb,_0x188d4c);let g=class extends _0xd8303e{constructor(_0xa9e4c0,_0x30dbd7){const _0x20e9ff=_0x471d44;super(),this[_0x20e9ff(0x138)]=_0xa9e4c0,this[_0x20e9ff(0x156)]=_0x30dbd7,this[_0x20e9ff(0x13c)]();}['_initDataSource'](){const _0x57519e=_0x471d44;this['_threadCommentDataSourceService'][_0x57519e(0x179)]=this['_threadCommentDataSource'],this[_0x57519e(0x138)][_0x57519e(0x182)]=!0x1;}};g=te([N(0x0,_0x28d703),N(0x1,_0x585a25(f))],g);var se=Object['defineProperty'],oe=Object[_0x471d44(0x133)],ne=(_0x456740,_0xf43f12,_0xf1cd68)=>_0xf43f12 in _0x456740?se(_0x456740,_0xf43f12,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf1cd68}):_0x456740[_0xf43f12]=_0xf1cd68,ie=(_0x9fc310,_0x28407b,_0x227a99,_0x54bf50)=>{for(var _0x2dc6db=_0x54bf50>0x1?void 0x0:_0x54bf50?oe(_0x28407b,_0x227a99):_0x28407b,_0x57d890=_0x9fc310['length']-0x1,_0x377612;_0x57d890>=0x0;_0x57d890--)(_0x377612=_0x9fc310[_0x57d890])&&(_0x2dc6db=_0x377612(_0x2dc6db)||_0x2dc6db);return _0x2dc6db;},w=(_0x303ee3,_0x577386)=>(_0x3ec565,_0x4d3584)=>_0x577386(_0x3ec565,_0x4d3584,_0x303ee3),$=(_0x59955b,_0x1dbea9,_0x282183)=>ne(_0x59955b,typeof _0x1dbea9!=_0x471d44(0x173)?_0x1dbea9+'':_0x1dbea9,_0x282183);let b=class extends _0x522f37{constructor(_0x434a5a=M,_0x257695,_0x5f4bec){const _0x2ca925=_0x471d44;super(),this[_0x2ca925(0x168)]=_0x434a5a,this[_0x2ca925(0x162)]=_0x257695,this['_configService']=_0x5f4bec;const {..._0x360271}=_0x3dd9ff({},M,this[_0x2ca925(0x168)]);this['_configService'][_0x2ca925(0x150)](z,_0x360271);}[_0x471d44(0x15b)](){const _0x5999f6=_0x471d44;[[f],[g],[S]][_0x5999f6(0x145)](_0x581e38=>{const _0x41c65b=_0x5999f6;this[_0x41c65b(0x162)][_0x41c65b(0x17a)](_0x581e38);});}[_0x471d44(0x165)](){const _0x5467ad=_0x471d44;this['_injector'][_0x5467ad(0x177)](g),this[_0x5467ad(0x162)]['get'](S);}};$(b,_0x471d44(0x128),W),$(b,'type',_0xa7757e[_0x471d44(0x167)]),b=ie([_0x5eb8d0(_0x38085d,_0x25f22d,_0x4830c9),w(0x1,_0x585a25(_0x38d7e2)),w(0x2,_0x44404c)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x37cba9=_0xbc94;(function(_0x2b5ae1,_0x2593c6){const _0x24c699=_0xbc94,_0x3a984d=_0x2b5ae1();while(!![]){try{const _0x249600=-parseInt(_0x24c699(0xc4))/0x1*(-parseInt(_0x24c699(0x9f))/0x2)+-parseInt(_0x24c699(0xd0))/0x3*(-parseInt(_0x24c699(0x9e))/0x4)+-parseInt(_0x24c699(0xfb))/0x5*(parseInt(_0x24c699(0xc9))/0x6)+-parseInt(_0x24c699(0xdd))/0x7+parseInt(_0x24c699(0xa2))/0x8+parseInt(_0x24c699(0xf1))/0x9*(-parseInt(_0x24c699(0xf8))/0xa)+-parseInt(_0x24c699(0xb9))/0xb*(-parseInt(_0x24c699(0xb3))/0xc);if(_0x249600===_0x2593c6)break;else _0x3a984d['push'](_0x3a984d['shift']());}catch(_0x5548ed){_0x3a984d['push'](_0x3a984d['shift']());}}}(_0x297e,0x264f9));import{CommentService as _0xa8e691,CollaborationSessionService as _0x4863e0,UniverCollaborationClientPlugin as _0x3a85be}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x488690}from'@univerjs-pro/license';import{dayjs as _0x54dfd4,UserManagerService as _0x1b79d1,Inject as _0x595f9e,Injector as _0x3cbf61,Disposable as _0x5921d9,CustomRangeType as _0x169cdd,UniverInstanceType as _0x2c2048,DependentOn as _0x5cd6ae,IConfigService as _0x276a7a,Plugin as _0x48e5ba,merge as _0x33d62f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x174432}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2934c6,IThreadCommentDataSourceService as _0x35f280}from'@univerjs/thread-comment';import{bufferTime as _0xa450af}from'rxjs';import{HTTPService as _0x12f3bd}from'@univerjs/network';function _0x297e(){const _0x402e0f=['root','_httpService','_configService','Reply','find','delete','addComment','addUser','rangeId','deleteComment','_sessionService','991188qKetWk','Edit','values','getComment','COMMENT','solved','/universer-api/comment/unit/','10JsWWXW','user','subscribe','125735LRSxHh','disposeWithMe','_threadCommentModel','onReady','_initUserSync','saveCommentToSnapshot','symbol','userID','comment','resolveComment','/add','4xFztXA','44lULkHw','body','post','881552buUctX','filter','add','customRanges','defineProperty','code','_commentService','Solve','updateComment','size','getUser','getMemberID','content','getOwnPropertyDescriptor','resolved','UNIVER_UNKNOWN','commentUpdate$','48mMmEsr','listComments','error','getUnit','rangeType','length','319033MhXLDp','unitId','Delete','pipe','users','UNRECOGNIZED','onStarting','thread-comment-data-source.config','stringify','payload','/list','9144jLyCmz','createTimestamp','getCurrentUser','_threadCommentDataSourceService','dataSource','54sdTUlA','Add','Solved','requireSession','/edit','replies','format','451797phGLVS','Unknown','parse','get','setConfig','_initDataSource','forEach','userId','ref','_injector','_config','_init','_userService','592179gtVazL','type','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSource','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','map','replyId','threadId'];_0x297e=function(){return _0x402e0f;};return _0x297e();}const W=_0x37cba9(0xdf);var I=(_0x4c0d37=>(_0x4c0d37[_0x4c0d37[_0x37cba9(0xe2)]=0x0]=_0x37cba9(0xe2),_0x4c0d37[_0x4c0d37['Solved']=0x1]=_0x37cba9(0xcb),_0x4c0d37[_0x4c0d37[_0x37cba9(0xbe)]=-0x1]='UNRECOGNIZED',_0x4c0d37))(I||{}),v=(_0x5e7bce=>(_0x5e7bce[_0x5e7bce[_0x37cba9(0xd1)]=0x0]=_0x37cba9(0xd1),_0x5e7bce[_0x5e7bce['Add']=0x1]=_0x37cba9(0xca),_0x5e7bce[_0x5e7bce[_0x37cba9(0xe9)]=0x2]=_0x37cba9(0xe9),_0x5e7bce[_0x5e7bce[_0x37cba9(0xf2)]=0x3]='Edit',_0x5e7bce[_0x5e7bce[_0x37cba9(0xbb)]=0x4]=_0x37cba9(0xbb),_0x5e7bce[_0x5e7bce[_0x37cba9(0xa9)]=0x5]=_0x37cba9(0xa9),_0x5e7bce[_0x5e7bce[_0x37cba9(0xbe)]=-0x1]='UNRECOGNIZED',_0x5e7bce))(v||{});const D=_0x2fee55=>_0x54dfd4(new Date(+_0x2fee55))[_0x37cba9(0xcf)](_0x37cba9(0xe1)),B=async(_0x29385f,_0x1b29af)=>{const _0x36afde=_0x37cba9,_0xa3e74b=_0x29385f[_0x36afde(0xd3)](_0x1b79d1),_0x3bc76d=_0x29385f[_0x36afde(0xd3)](_0x12f3bd);_0x1b29af['forEach'](_0x4056a2=>{const _0x48cbd7=_0x36afde;_0xa3e74b[_0x48cbd7(0xac)](_0x4056a2)&&_0x1b29af[_0x48cbd7(0xeb)](_0x4056a2);}),_0x1b29af[_0x36afde(0xab)]&&(await _0x3bc76d[_0x36afde(0xd3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x1b29af]}}))[_0x36afde(0xa0)]['users'][_0x36afde(0xd6)](_0x26f78d=>{const _0x20a5e3=_0x36afde;_0x26f78d&&_0xa3e74b[_0x20a5e3(0xed)](_0x26f78d);});};var K=Object[_0x37cba9(0xaf)],V=(_0x18a17c,_0x57a5db,_0x337d47,_0x5cc75e)=>{const _0x136f9e=_0x37cba9;for(var _0x1c2580=_0x5cc75e>0x1?void 0x0:_0x5cc75e?K(_0x57a5db,_0x337d47):_0x57a5db,_0x258917=_0x18a17c[_0x136f9e(0xb8)]-0x1,_0x1ed0ee;_0x258917>=0x0;_0x258917--)(_0x1ed0ee=_0x18a17c[_0x258917])&&(_0x1c2580=_0x1ed0ee(_0x1c2580)||_0x1c2580);return _0x1c2580;},p=(_0x198ed9,_0x4f76e5)=>(_0x4b0320,_0x4adfb9)=>_0x4f76e5(_0x4b0320,_0x4adfb9,_0x198ed9);let S=class extends _0x5921d9{constructor(_0x509293,_0x30f06b,_0x581382,_0x2864b5){const _0x28769f=_0x37cba9;super(),this[_0x28769f(0xa8)]=_0x509293,this[_0x28769f(0x95)]=_0x30f06b,this[_0x28769f(0xdc)]=_0x581382,this[_0x28769f(0xd9)]=_0x2864b5,this[_0x28769f(0xdb)](),this[_0x28769f(0x97)]();}['_initUserSync'](){const _0x32658b=_0x37cba9;this['disposeWithMe'](this[_0x32658b(0x95)][_0x32658b(0xb2)][_0x32658b(0xbc)](_0xa450af(0x10))[_0x32658b(0xfa)](_0x112861=>{const _0x27acef=_0x32658b,_0x590815=new Set();_0x112861[_0x27acef(0xd6)](_0x1a5802=>{const _0x15c6c7=_0x27acef;switch(_0x1a5802[_0x15c6c7(0xde)]){case _0x15c6c7(0xa4):{const _0x20af90=_0x1a5802[_0x15c6c7(0xc2)]['personId'];_0x590815[_0x15c6c7(0xa4)](_0x20af90);break;}}}),B(this[_0x27acef(0xd9)],_0x590815);}));}[_0x37cba9(0xdb)](){const _0x108cc9=_0x37cba9;this[_0x108cc9(0x94)](this[_0x108cc9(0xa8)][_0x108cc9(0xb2)][_0x108cc9(0xfa)](async _0x21ad55=>{const _0x44d122=_0x108cc9;var _0xd89243,_0x402df8,_0x1c9d95,_0xac799b;const _0x582b79=(_0xd89243=this[_0x44d122(0x95)][_0x44d122(0xb6)](_0x21ad55[_0x44d122(0xba)])[_0x44d122(0xea)](_0x2f9449=>_0x2f9449[_0x44d122(0xe5)]===_0x21ad55['threadId']))==null?void 0x0:_0xd89243[_0x44d122(0xe6)];if(!_0x582b79)return;const {unitId:_0x388ce1,subUnitId:_0x39c7d8}=_0x582b79;switch(_0x21ad55['user']&&this[_0x44d122(0xdc)][_0x44d122(0xed)](_0x21ad55[_0x44d122(0xf9)]),_0x21ad55[_0x44d122(0xde)]){case v[_0x44d122(0xca)]:break;case v['Reply']:{this[_0x44d122(0x95)][_0x44d122(0xec)](_0x388ce1,_0x39c7d8,{'unitId':_0x388ce1,'subUnitId':_0x39c7d8,'ref':'','id':_0x21ad55[_0x44d122(0xe4)],'dT':D(+_0x21ad55[_0x44d122(0xc5)]),'threadId':_0x21ad55[_0x44d122(0xe5)],'personId':(_0x1c9d95=(_0x402df8=_0x21ad55[_0x44d122(0xf9)])==null?void 0x0:_0x402df8[_0x44d122(0x9a)])!=null?_0x1c9d95:_0x21ad55[_0x44d122(0xd7)],'text':JSON[_0x44d122(0xd2)](_0x21ad55[_0x44d122(0xae)]),'parentId':_0x582b79['id']});break;}case v[_0x44d122(0xbb)]:{const _0xc37e31=this['_threadCommentModel'][_0x44d122(0xf4)](_0x388ce1,_0x39c7d8,_0x21ad55[_0x44d122(0xe4)]);_0xc37e31&&_0xc37e31['parentId']&&this['_threadCommentModel'][_0x44d122(0xef)](_0x388ce1,_0x39c7d8,_0x21ad55[_0x44d122(0xe4)]);break;}case v[_0x44d122(0xf2)]:{this[_0x44d122(0x95)][_0x44d122(0xaa)](_0x388ce1,_0x39c7d8,{'commentId':_0x21ad55['replyId'],'text':JSON[_0x44d122(0xd2)](_0x21ad55[_0x44d122(0xae)])});break;}case v[_0x44d122(0xa9)]:{const _0xa04e05=(_0xac799b=this[_0x44d122(0x95)][_0x44d122(0xb6)](_0x21ad55[_0x44d122(0xba)])[_0x44d122(0xea)](_0x120c69=>_0x120c69[_0x44d122(0xe5)]===_0x21ad55[_0x44d122(0xe5)]))==null?void 0x0:_0xac799b[_0x44d122(0xe6)];_0xa04e05&&this[_0x44d122(0x95)][_0x44d122(0x9c)](_0x388ce1,_0x39c7d8,_0xa04e05['id'],_0x21ad55[_0x44d122(0xf6)]===I[_0x44d122(0xcb)]);break;}}}));}};S=V([p(0x0,_0x595f9e(_0xa8e691)),p(0x1,_0x595f9e(_0x2934c6)),p(0x2,_0x595f9e(_0x1b79d1)),p(0x3,_0x595f9e(_0x3cbf61))],S);const z=_0x37cba9(0xc0),M={};function _0xbc94(_0x18c9a8,_0x5d65f6){const _0x297e6b=_0x297e();return _0xbc94=function(_0xbc9469,_0x3e8d42){_0xbc9469=_0xbc9469-0x94;let _0x38132a=_0x297e6b[_0xbc9469];return _0x38132a;},_0xbc94(_0x18c9a8,_0x5d65f6);}var k=Object[_0x37cba9(0xaf)],Q=(_0x3ff8de,_0x26f54b,_0x4c5c3a,_0x459c44)=>{for(var _0xcb6563=_0x459c44>0x1?void 0x0:_0x459c44?k(_0x26f54b,_0x4c5c3a):_0x26f54b,_0x220f96=_0x3ff8de['length']-0x1,_0x1c44eb;_0x220f96>=0x0;_0x220f96--)(_0x1c44eb=_0x3ff8de[_0x220f96])&&(_0xcb6563=_0x1c44eb(_0xcb6563)||_0xcb6563);return _0xcb6563;},_=(_0x2fb9f2,_0x47f553)=>(_0x83c74e,_0x576594)=>_0x47f553(_0x83c74e,_0x576594,_0x2fb9f2);function X(_0x446a07,_0x47fada){const _0x293086=_0x37cba9,_0x2f5acb=_0x446a07[_0x293086(0xce)][0x0];return{..._0x47fada,'id':_0x2f5acb[_0x293086(0xe4)],'resolved':_0x446a07['solved']===0x1,'dT':D(_0x2f5acb[_0x293086(0xc5)]),'personId':_0x2f5acb[_0x293086(0xd7)],'threadId':_0x2f5acb['threadId']};}function ee(_0x37048a,_0x29e2ad,_0x3e74ac){const _0x4dd0b2=_0x37cba9;var _0x180bc3,_0x2d9ccc;if(((_0x2d9ccc=(_0x180bc3=_0x37048a==null?void 0x0:_0x37048a[_0x4dd0b2(0xce)])==null?void 0x0:_0x180bc3['length'])!=null?_0x2d9ccc:0x0)>0x0){const _0x643d27=(_0x96b20d,_0x55bcd2)=>({'id':_0x96b20d[_0x4dd0b2(0xe4)],'threadId':_0x96b20d[_0x4dd0b2(0xe5)],'dT':D(_0x96b20d[_0x4dd0b2(0xc5)]),'personId':_0x96b20d['userId'],'resolved':_0x37048a[_0x4dd0b2(0xf6)]===I[_0x4dd0b2(0xcb)],'unitId':_0x29e2ad,'subUnitId':_0x3e74ac,'text':JSON[_0x4dd0b2(0xd2)](_0x96b20d[_0x4dd0b2(0xae)]),'parentId':_0x55bcd2}),_0x3b37f3=_0x643d27(_0x37048a[_0x4dd0b2(0xce)][0x0]);return{..._0x3b37f3,'children':_0x37048a[_0x4dd0b2(0xce)]['slice'](0x1)[_0x4dd0b2(0xe3)](_0x31bb9b=>_0x643d27(_0x31bb9b,_0x3b37f3['id']))};}return null;}let f=class{constructor(_0x3ba34,_0x2e5711,_0x29ec06,_0x2d9d92){const _0x5b1c43=_0x37cba9;this[_0x5b1c43(0xe7)]=_0x3ba34,this[_0x5b1c43(0xdc)]=_0x2e5711,this['_sessionService']=_0x29ec06,this['_injector']=_0x2d9d92;}async['addComment'](_0x725fd){const _0x2d0149=_0x37cba9;var _0x56e30d,_0x391f2e;const {parentId:_0x3626b2,unitId:_0x1e0bc4,text:_0x3d687f,threadId:_0x1251ba}=_0x725fd,_0x3a5789=(_0x391f2e=(_0x56e30d=_0x3d687f[_0x2d0149(0xa5)])==null?void 0x0:_0x56e30d[_0x2d0149(0xa3)](_0x2503f3=>_0x2503f3[_0x2d0149(0xb7)]===_0x169cdd[_0x2d0149(0xf5)])[_0x2d0149(0xe3)](_0x1b5437=>_0x1b5437[_0x2d0149(0xee)]))!=null?_0x391f2e:[],_0x4b39d8=JSON[_0x2d0149(0xc1)](_0x3d687f),_0x355c0d=(await this[_0x2d0149(0xf0)][_0x2d0149(0xcc)](_0x1e0bc4))[_0x2d0149(0xad)]();if(_0x3626b2){const _0x1101b2={'memberId':_0x355c0d,'unitId':_0x1e0bc4,'content':_0x4b39d8,'mention':_0x3a5789,'threadId':_0x1251ba},_0x2eb8f6=(await this[_0x2d0149(0xe7)][_0x2d0149(0xa1)](_0x2d0149(0xf7)+_0x1e0bc4+'/reply',{'body':_0x1101b2}))[_0x2d0149(0xa0)]['reply'];return{..._0x725fd,'id':_0x2eb8f6[_0x2d0149(0xe4)],'dT':_0x54dfd4(+_0x2eb8f6[_0x2d0149(0xc5)])[_0x2d0149(0xcf)](_0x2d0149(0xe1)),'personId':_0x2eb8f6[_0x2d0149(0xd7)]};}else{const _0x25febf={'memberId':_0x355c0d,'unitId':_0x1e0bc4,'content':_0x4b39d8,'mention':_0x3a5789},_0x33f9be=await this[_0x2d0149(0xe7)]['post'](_0x2d0149(0xf7)+_0x1e0bc4+_0x2d0149(0x9d),{'body':_0x25febf});return X(_0x33f9be[_0x2d0149(0xa0)][_0x2d0149(0x9b)],_0x725fd);}}async[_0x37cba9(0xaa)](_0x5c760e){const _0x446f7c=_0x37cba9;var _0x981906,_0x4aaee8;const {text:_0x4b0641,unitId:_0x58b2b8}=_0x5c760e,_0x1ac9e3=(_0x4aaee8=(_0x981906=_0x4b0641[_0x446f7c(0xa5)])==null?void 0x0:_0x981906[_0x446f7c(0xa3)](_0x4bac8a=>_0x4bac8a[_0x446f7c(0xb7)]===_0x169cdd['COMMENT'])['map'](_0x173ab6=>_0x173ab6[_0x446f7c(0xee)]))!=null?_0x4aaee8:[],_0x3f3a01=JSON[_0x446f7c(0xc1)](_0x4b0641),_0xee1aff=_0x5c760e['threadId'],_0x58cc3a=_0x5c760e['id'],_0x6eefdf={'memberId':(await this[_0x446f7c(0xf0)]['requireSession'](_0x58b2b8))[_0x446f7c(0xad)](),'unitId':_0x58b2b8,'threadId':_0xee1aff,'mention':_0x1ac9e3,'content':_0x3f3a01,'replyId':_0x58cc3a},_0x3815ba=await this[_0x446f7c(0xe7)][_0x446f7c(0xa1)](_0x446f7c(0xf7)+_0x58b2b8+_0x446f7c(0xcd),{'body':_0x6eefdf});return!_0x3815ba[_0x446f7c(0xa0)][_0x446f7c(0xb5)]||_0x3815ba[_0x446f7c(0xa0)][_0x446f7c(0xb5)]['code']===0x1;}async[_0x37cba9(0x9c)](_0x12e1fc){const _0x5c1e47=_0x37cba9,{unitId:_0x5dcb01}=_0x12e1fc,_0x451bbf=_0x12e1fc[_0x5c1e47(0xe5)],_0x240668={'memberId':this[_0x5c1e47(0xdc)][_0x5c1e47(0xc6)]()[_0x5c1e47(0x9a)],'unitId':_0x5dcb01,'threadId':_0x451bbf,'solved':_0x12e1fc[_0x5c1e47(0xb0)]?I[_0x5c1e47(0xcb)]:I[_0x5c1e47(0xe2)]},_0x5cb998=await this['_httpService'][_0x5c1e47(0xa1)](_0x5c1e47(0xf7)+_0x5dcb01+'/solved',{'body':_0x240668});return!_0x5cb998['body']['error']||_0x5cb998[_0x5c1e47(0xa0)][_0x5c1e47(0xb5)][_0x5c1e47(0xa7)]===0x1;}async[_0x37cba9(0xef)](_0x4d6fc0,_0x4ceaf0,_0x1a000b,_0x1b802d){const _0x4b6bdf=_0x37cba9,_0xff889c={'memberId':(await this['_sessionService'][_0x4b6bdf(0xcc)](_0x4d6fc0))[_0x4b6bdf(0xad)](),'threadId':_0x1a000b,'replyId':_0x1b802d,'unitId':_0x4d6fc0},_0x5b1f82=await this[_0x4b6bdf(0xe7)][_0x4b6bdf(0xa1)](_0x4b6bdf(0xf7)+_0x4d6fc0+'/delete',{'body':_0xff889c});return!_0x5b1f82[_0x4b6bdf(0xa0)][_0x4b6bdf(0xb5)]||_0x5b1f82[_0x4b6bdf(0xa0)][_0x4b6bdf(0xb5)][_0x4b6bdf(0xa7)]===0x1;}async[_0x37cba9(0xb4)](_0x18290a,_0x335dce,_0x1d3f4c){const _0x1ff02f=_0x37cba9,_0x4f453d={'unitId':_0x18290a,'threadId':_0x1d3f4c},_0x3289c4=await this[_0x1ff02f(0xe7)][_0x1ff02f(0xa1)](_0x1ff02f(0xf7)+_0x18290a+_0x1ff02f(0xc3),{'body':_0x4f453d}),_0x33fc22=_0x1d3f4c[_0x1ff02f(0xe3)](_0x2622d3=>ee(_0x3289c4[_0x1ff02f(0xa0)]['comments'][_0x2622d3],_0x18290a,_0x335dce))['filter'](Boolean);return Object[_0x1ff02f(0xf3)](_0x3289c4[_0x1ff02f(0xa0)][_0x1ff02f(0xbd)])['forEach'](_0x41e699=>{const _0x585dec=_0x1ff02f;this['_userService'][_0x585dec(0xed)](_0x41e699);}),_0x33fc22;}[_0x37cba9(0x98)](_0x309bbb){const _0x2bb888=_0x37cba9;return{'id':_0x309bbb['id'],'threadId':_0x309bbb[_0x2bb888(0xe5)],'ref':_0x309bbb[_0x2bb888(0xd8)]};}};f=Q([_(0x0,_0x595f9e(_0x12f3bd)),_(0x1,_0x595f9e(_0x1b79d1)),_(0x2,_0x595f9e(_0x4863e0)),_(0x3,_0x595f9e(_0x3cbf61))],f);var re=Object[_0x37cba9(0xaf)],te=(_0x1dbd4f,_0x28c72f,_0x4f57d4,_0x50058c)=>{for(var _0x1ae202=_0x50058c>0x1?void 0x0:_0x50058c?re(_0x28c72f,_0x4f57d4):_0x28c72f,_0x54eb73=_0x1dbd4f['length']-0x1,_0x49bb1e;_0x54eb73>=0x0;_0x54eb73--)(_0x49bb1e=_0x1dbd4f[_0x54eb73])&&(_0x1ae202=_0x49bb1e(_0x1ae202)||_0x1ae202);return _0x1ae202;},N=(_0x12e9a7,_0x56870c)=>(_0x29c2a6,_0x444415)=>_0x56870c(_0x29c2a6,_0x444415,_0x12e9a7);let g=class extends _0x5921d9{constructor(_0x4f8339,_0x4bb21b){const _0x1925d4=_0x37cba9;super(),this['_threadCommentDataSourceService']=_0x4f8339,this[_0x1925d4(0xe0)]=_0x4bb21b,this[_0x1925d4(0xd5)]();}[_0x37cba9(0xd5)](){const _0x5b52e0=_0x37cba9;this[_0x5b52e0(0xc7)][_0x5b52e0(0xc8)]=this[_0x5b52e0(0xe0)],this[_0x5b52e0(0xc7)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x35f280),N(0x1,_0x595f9e(f))],g);var se=Object[_0x37cba9(0xa6)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x56cde3,_0x12a8de,_0x180bf4)=>_0x12a8de in _0x56cde3?se(_0x56cde3,_0x12a8de,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x180bf4}):_0x56cde3[_0x12a8de]=_0x180bf4,ie=(_0x308f55,_0x476cec,_0x2ace33,_0x59fe17)=>{const _0x28132b=_0x37cba9;for(var _0x588089=_0x59fe17>0x1?void 0x0:_0x59fe17?oe(_0x476cec,_0x2ace33):_0x476cec,_0x260432=_0x308f55[_0x28132b(0xb8)]-0x1,_0x5c93c6;_0x260432>=0x0;_0x260432--)(_0x5c93c6=_0x308f55[_0x260432])&&(_0x588089=_0x5c93c6(_0x588089)||_0x588089);return _0x588089;},w=(_0x41444b,_0x4bb032)=>(_0x16609d,_0x432469)=>_0x4bb032(_0x16609d,_0x432469,_0x41444b),$=(_0x2bcb9d,_0x2f9b91,_0x237b0a)=>ne(_0x2bcb9d,typeof _0x2f9b91!=_0x37cba9(0x99)?_0x2f9b91+'':_0x2f9b91,_0x237b0a);let b=class extends _0x48e5ba{constructor(_0x54bb76=M,_0x4f0de2,_0x4dd4ea){const _0xb7a997=_0x37cba9;super(),this['_config']=_0x54bb76,this[_0xb7a997(0xd9)]=_0x4f0de2,this[_0xb7a997(0xe8)]=_0x4dd4ea;const {..._0x1d62fc}=_0x33d62f({},M,this[_0xb7a997(0xda)]);this['_configService'][_0xb7a997(0xd4)](z,_0x1d62fc);}[_0x37cba9(0xbf)](){[[f],[g],[S]]['forEach'](_0x16b7d9=>{const _0x11626b=_0xbc94;this[_0x11626b(0xd9)][_0x11626b(0xa4)](_0x16b7d9);});}[_0x37cba9(0x96)](){const _0xb9b167=_0x37cba9;this[_0xb9b167(0xd9)][_0xb9b167(0xd3)](g),this[_0xb9b167(0xd9)][_0xb9b167(0xd3)](S);}};$(b,'pluginName',W),$(b,_0x37cba9(0xde),_0x2c2048[_0x37cba9(0xb1)]),b=ie([_0x5cd6ae(_0x174432,_0x3a85be,_0x488690),w(0x1,_0x595f9e(_0x3cbf61)),w(0x2,_0x276a7a)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x28d8(_0x2e18a7,_0x1c4bd5){const _0xe45183=_0xe451();return _0x28d8=function(_0x28d830,_0x1952ac){_0x28d830=_0x28d830-0x115;let _0x1a0f71=_0xe45183[_0x28d830];return _0x1a0f71;},_0x28d8(_0x2e18a7,_0x1c4bd5);}(function(_0x737da0,_0x2ebf78){const _0x440944=_0x28d8,_0x5deac3=_0x737da0();while(!![]){try{const _0x280ceb=-parseInt(_0x440944(0x130))/0x1+-parseInt(_0x440944(0x17d))/0x2*(parseInt(_0x440944(0x17a))/0x3)+-parseInt(_0x440944(0x173))/0x4*(parseInt(_0x440944(0x135))/0x5)+-parseInt(_0x440944(0x167))/0x6+-parseInt(_0x440944(0x179))/0x7*(parseInt(_0x440944(0x17b))/0x8)+parseInt(_0x440944(0x159))/0x9+parseInt(_0x440944(0x150))/0xa;if(_0x280ceb===_0x2ebf78)break;else _0x5deac3['push'](_0x5deac3['shift']());}catch(_0x246cda){_0x5deac3['push'](_0x5deac3['shift']());}}}(_0xe451,0xd33db),function(_0x56e5c8,_0x3eb2fb){const _0xfe108b=_0x28d8;typeof exports==_0xfe108b(0x160)&&typeof module<'u'?_0x3eb2fb(exports,require('@univerjs-pro/collaboration-client'),require(_0xfe108b(0x15e)),require(_0xfe108b(0x174)),require(_0xfe108b(0x151)),require(_0xfe108b(0x13d)),require(_0xfe108b(0x161)),require(_0xfe108b(0x158))):typeof define==_0xfe108b(0x15b)&&define[_0xfe108b(0x184)]?define([_0xfe108b(0x188),'@univerjs-pro/collaboration-client',_0xfe108b(0x15e),_0xfe108b(0x174),_0xfe108b(0x151),_0xfe108b(0x13d),_0xfe108b(0x161),_0xfe108b(0x158)],_0x3eb2fb):(_0x56e5c8=typeof globalThis<'u'?globalThis:_0x56e5c8||self,_0x3eb2fb(_0x56e5c8[_0xfe108b(0x180)]={},_0x56e5c8['UniverProCollaborationClient'],_0x56e5c8[_0xfe108b(0x183)],_0x56e5c8[_0xfe108b(0x162)],_0x56e5c8['UniverThreadCommentUi'],_0x56e5c8[_0xfe108b(0x178)],_0x56e5c8[_0xfe108b(0x161)],_0x56e5c8[_0xfe108b(0x12a)]));}(this,function(_0x3bc6a7,_0x433cce,_0x1b2383,_0x514b15,_0x561bbe,_0x289cbf,_0x250e03,_0x488e04){'use strict';const _0x39ff1a=_0x28d8;const _0x4e1eaa=_0x39ff1a(0x18d);var _0x299546=(_0x212bf6=>(_0x212bf6[_0x212bf6['OpenOrReOpen']=0x0]=_0x39ff1a(0x125),_0x212bf6[_0x212bf6[_0x39ff1a(0x12e)]=0x1]=_0x39ff1a(0x12e),_0x212bf6[_0x212bf6[_0x39ff1a(0x194)]=-0x1]='UNRECOGNIZED',_0x212bf6))(_0x299546||{}),_0x5fb325=(_0x3fd63b=>(_0x3fd63b[_0x3fd63b[_0x39ff1a(0x168)]=0x0]=_0x39ff1a(0x168),_0x3fd63b[_0x3fd63b['Add']=0x1]=_0x39ff1a(0x153),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x134)]=0x2]=_0x39ff1a(0x134),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x126)]=0x3]=_0x39ff1a(0x126),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x166)]=0x4]=_0x39ff1a(0x166),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x163)]=0x5]=_0x39ff1a(0x163),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x194)]=-0x1]=_0x39ff1a(0x194),_0x3fd63b))(_0x5fb325||{});const _0x261f0d=_0x40603b=>_0x514b15[_0x39ff1a(0x14b)](new Date(+_0x40603b))[_0x39ff1a(0x13b)](_0x39ff1a(0x11a)),_0x2ba4ef=async(_0x16c1a8,_0x30ae07)=>{const _0x2cf05a=_0x39ff1a,_0x37ae9f=_0x16c1a8[_0x2cf05a(0x16b)](_0x514b15[_0x2cf05a(0x147)]),_0x40c3f1=_0x16c1a8[_0x2cf05a(0x16b)](_0x488e04[_0x2cf05a(0x120)]);_0x30ae07['forEach'](_0x48c749=>{_0x37ae9f['getUser'](_0x48c749)&&_0x30ae07['delete'](_0x48c749);}),_0x30ae07[_0x2cf05a(0x136)]&&(await _0x40c3f1[_0x2cf05a(0x16b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x30ae07]}}))[_0x2cf05a(0x142)]['users'][_0x2cf05a(0x15c)](_0x581abf=>{const _0x385168=_0x2cf05a;_0x581abf&&_0x37ae9f[_0x385168(0x143)](_0x581abf);});};var _0x3e7340=Object['getOwnPropertyDescriptor'],_0x43b55f=(_0x3e2d90,_0x42c2cc,_0x5bae41,_0xb22255)=>{const _0x3e524c=_0x39ff1a;for(var _0x3a3b7f=_0xb22255>0x1?void 0x0:_0xb22255?_0x3e7340(_0x42c2cc,_0x5bae41):_0x42c2cc,_0x48690a=_0x3e2d90[_0x3e524c(0x118)]-0x1,_0x5b1768;_0x48690a>=0x0;_0x48690a--)(_0x5b1768=_0x3e2d90[_0x48690a])&&(_0x3a3b7f=_0x5b1768(_0x3a3b7f)||_0x3a3b7f);return _0x3a3b7f;},_0x62c980=(_0x18c22c,_0x43fb89)=>(_0x3ec1fa,_0x1833da)=>_0x43fb89(_0x3ec1fa,_0x1833da,_0x18c22c);let _0x52e0e4=class extends _0x514b15[_0x39ff1a(0x164)]{constructor(_0x5f3ab3,_0x2df38e,_0x52008d,_0xa513c7){const _0x56a037=_0x39ff1a;super(),this[_0x56a037(0x175)]=_0x5f3ab3,this[_0x56a037(0x140)]=_0x2df38e,this['_userService']=_0x52008d,this[_0x56a037(0x181)]=_0xa513c7,this[_0x56a037(0x131)](),this[_0x56a037(0x141)]();}[_0x39ff1a(0x141)](){const _0xcc0314=_0x39ff1a;this['disposeWithMe'](this[_0xcc0314(0x140)]['commentUpdate$'][_0xcc0314(0x145)](_0x250e03[_0xcc0314(0x123)](0x10))[_0xcc0314(0x11e)](_0x4557ea=>{const _0xbe4a9f=_0xcc0314,_0x506999=new Set();_0x4557ea[_0xbe4a9f(0x15c)](_0x277ffe=>{const _0x190a29=_0xbe4a9f;switch(_0x277ffe['type']){case _0x190a29(0x17f):{const _0x3288d9=_0x277ffe['payload'][_0x190a29(0x16f)];_0x506999[_0x190a29(0x17f)](_0x3288d9);break;}}}),_0x2ba4ef(this[_0xbe4a9f(0x181)],_0x506999);}));}[_0x39ff1a(0x131)](){const _0x10fab1=_0x39ff1a;this[_0x10fab1(0x18b)](this[_0x10fab1(0x175)]['commentUpdate$'][_0x10fab1(0x11e)](async _0x1175f9=>{const _0x3c4531=_0x10fab1;var _0x3ab5d3,_0x74ea7a,_0x2fd40b,_0x5d4d14;const _0x51b733=(_0x3ab5d3=this[_0x3c4531(0x140)][_0x3c4531(0x177)](_0x1175f9['unitId'])[_0x3c4531(0x154)](_0x6d54f3=>_0x6d54f3[_0x3c4531(0x137)]===_0x1175f9[_0x3c4531(0x137)]))==null?void 0x0:_0x3ab5d3[_0x3c4531(0x122)];if(!_0x51b733)return;const {unitId:_0x42f872,subUnitId:_0x2a5642}=_0x51b733;switch(_0x1175f9[_0x3c4531(0x18a)]&&this['_userService'][_0x3c4531(0x143)](_0x1175f9[_0x3c4531(0x18a)]),_0x1175f9[_0x3c4531(0x124)]){case _0x5fb325[_0x3c4531(0x153)]:break;case _0x5fb325[_0x3c4531(0x134)]:{this['_threadCommentModel'][_0x3c4531(0x12f)](_0x42f872,_0x2a5642,{'unitId':_0x42f872,'subUnitId':_0x2a5642,'ref':'','id':_0x1175f9[_0x3c4531(0x189)],'dT':_0x261f0d(+_0x1175f9[_0x3c4531(0x14d)]),'threadId':_0x1175f9['threadId'],'personId':(_0x2fd40b=(_0x74ea7a=_0x1175f9[_0x3c4531(0x18a)])==null?void 0x0:_0x74ea7a[_0x3c4531(0x185)])!=null?_0x2fd40b:_0x1175f9[_0x3c4531(0x171)],'text':JSON[_0x3c4531(0x148)](_0x1175f9[_0x3c4531(0x13a)]),'parentId':_0x51b733['id']});break;}case _0x5fb325['Delete']:{const _0x135f5a=this['_threadCommentModel'][_0x3c4531(0x13f)](_0x42f872,_0x2a5642,_0x1175f9[_0x3c4531(0x189)]);_0x135f5a&&_0x135f5a['parentId']&&this[_0x3c4531(0x140)][_0x3c4531(0x182)](_0x42f872,_0x2a5642,_0x1175f9['replyId']);break;}case _0x5fb325['Edit']:{this[_0x3c4531(0x140)][_0x3c4531(0x12d)](_0x42f872,_0x2a5642,{'commentId':_0x1175f9['replyId'],'text':JSON['parse'](_0x1175f9[_0x3c4531(0x13a)])});break;}case _0x5fb325[_0x3c4531(0x163)]:{const _0x5ec84e=(_0x5d4d14=this[_0x3c4531(0x140)]['getUnit'](_0x1175f9[_0x3c4531(0x121)])[_0x3c4531(0x154)](_0xf016b1=>_0xf016b1['threadId']===_0x1175f9[_0x3c4531(0x137)]))==null?void 0x0:_0x5d4d14[_0x3c4531(0x122)];_0x5ec84e&&this['_threadCommentModel']['resolveComment'](_0x42f872,_0x2a5642,_0x5ec84e['id'],_0x1175f9['solved']===_0x299546[_0x3c4531(0x12e)]);break;}}}));}};_0x52e0e4=_0x43b55f([_0x62c980(0x0,_0x514b15['Inject'](_0x433cce[_0x39ff1a(0x156)])),_0x62c980(0x1,_0x514b15['Inject'](_0x289cbf[_0x39ff1a(0x165)])),_0x62c980(0x2,_0x514b15[_0x39ff1a(0x144)](_0x514b15[_0x39ff1a(0x147)])),_0x62c980(0x3,_0x514b15['Inject'](_0x514b15['Injector']))],_0x52e0e4);const _0x32ebf5='thread-comment-data-source.config',_0x4e82a1={};var _0x2ce1e1=Object[_0x39ff1a(0x11f)],_0x32318a=(_0x23b9b2,_0x5d4ced,_0x1e8177,_0x1d7d5b)=>{const _0x1b8973=_0x39ff1a;for(var _0x4fa3c5=_0x1d7d5b>0x1?void 0x0:_0x1d7d5b?_0x2ce1e1(_0x5d4ced,_0x1e8177):_0x5d4ced,_0x2d2cd7=_0x23b9b2[_0x1b8973(0x118)]-0x1,_0x2c78f5;_0x2d2cd7>=0x0;_0x2d2cd7--)(_0x2c78f5=_0x23b9b2[_0x2d2cd7])&&(_0x4fa3c5=_0x2c78f5(_0x4fa3c5)||_0x4fa3c5);return _0x4fa3c5;},_0x1c4644=(_0x3b983c,_0x3b9658)=>(_0x22fd22,_0x356069)=>_0x3b9658(_0x22fd22,_0x356069,_0x3b983c);function _0x1de4da(_0x129b7b,_0x47e127){const _0x112af7=_0x39ff1a,_0x525712=_0x129b7b['replies'][0x0];return{..._0x47e127,'id':_0x525712[_0x112af7(0x189)],'resolved':_0x129b7b[_0x112af7(0x14a)]===0x1,'dT':_0x261f0d(_0x525712[_0x112af7(0x14d)]),'personId':_0x525712[_0x112af7(0x171)],'threadId':_0x525712[_0x112af7(0x137)]};}function _0x909113(_0x539bbd,_0x210351,_0x3f87e1){const _0x3db8f2=_0x39ff1a;var _0x1fa803,_0x5d0fa3;if(((_0x5d0fa3=(_0x1fa803=_0x539bbd==null?void 0x0:_0x539bbd[_0x3db8f2(0x176)])==null?void 0x0:_0x1fa803[_0x3db8f2(0x118)])!=null?_0x5d0fa3:0x0)>0x0){const _0x3ef28d=(_0x2bf431,_0x22d6c4)=>({'id':_0x2bf431[_0x3db8f2(0x189)],'threadId':_0x2bf431[_0x3db8f2(0x137)],'dT':_0x261f0d(_0x2bf431[_0x3db8f2(0x14d)]),'personId':_0x2bf431[_0x3db8f2(0x171)],'resolved':_0x539bbd['solved']===_0x299546[_0x3db8f2(0x12e)],'unitId':_0x210351,'subUnitId':_0x3f87e1,'text':JSON[_0x3db8f2(0x148)](_0x2bf431[_0x3db8f2(0x13a)]),'parentId':_0x22d6c4}),_0x2eb553=_0x3ef28d(_0x539bbd[_0x3db8f2(0x176)][0x0]);return{..._0x2eb553,'children':_0x539bbd[_0x3db8f2(0x176)][_0x3db8f2(0x11b)](0x1)[_0x3db8f2(0x149)](_0x4ddce8=>_0x3ef28d(_0x4ddce8,_0x2eb553['id']))};}return null;}let _0xc24ad0=class{constructor(_0x24026f,_0x5f245d,_0x2ba8d7,_0x17f2ad){const _0x2e0ec3=_0x39ff1a;this[_0x2e0ec3(0x17c)]=_0x24026f,this['_userService']=_0x5f245d,this['_sessionService']=_0x2ba8d7,this[_0x2e0ec3(0x181)]=_0x17f2ad;}async[_0x39ff1a(0x12f)](_0x1f2a98){const _0x38c028=_0x39ff1a;var _0x1720f7,_0x347cb5;const {parentId:_0x4ef067,unitId:_0x166a6d,text:_0x150974,threadId:_0x3e08f6}=_0x1f2a98,_0x500840=(_0x347cb5=(_0x1720f7=_0x150974[_0x38c028(0x18c)])==null?void 0x0:_0x1720f7[_0x38c028(0x127)](_0x8227b6=>_0x8227b6[_0x38c028(0x11d)]===_0x514b15['CustomRangeType'][_0x38c028(0x195)])[_0x38c028(0x149)](_0x145cb4=>_0x145cb4['rangeId']))!=null?_0x347cb5:[],_0x4859ab=JSON[_0x38c028(0x155)](_0x150974),_0x29fdb8=(await this[_0x38c028(0x157)]['requireSession'](_0x166a6d))[_0x38c028(0x16e)]();if(_0x4ef067){const _0x5a1d12={'memberId':_0x29fdb8,'unitId':_0x166a6d,'content':_0x4859ab,'mention':_0x500840,'threadId':_0x3e08f6},_0x51ef3f=(await this['_httpService'][_0x38c028(0x138)](_0x38c028(0x18f)+_0x166a6d+'/reply',{'body':_0x5a1d12}))[_0x38c028(0x142)][_0x38c028(0x15a)];return{..._0x1f2a98,'id':_0x51ef3f['replyId'],'dT':_0x514b15['dayjs'](+_0x51ef3f[_0x38c028(0x14d)])['format'](_0x38c028(0x11a)),'personId':_0x51ef3f['userId']};}else{const _0x36e0ff={'memberId':_0x29fdb8,'unitId':_0x166a6d,'content':_0x4859ab,'mention':_0x500840},_0x73d9a3=await this['_httpService'][_0x38c028(0x138)](_0x38c028(0x18f)+_0x166a6d+'/add',{'body':_0x36e0ff});return _0x1de4da(_0x73d9a3[_0x38c028(0x142)][_0x38c028(0x169)],_0x1f2a98);}}async[_0x39ff1a(0x12d)](_0x5a9fe3){const _0x4e620c=_0x39ff1a;var _0x4795ad,_0x26c8a7;const {text:_0x25c4ab,unitId:_0xe7c26a}=_0x5a9fe3,_0x1ec216=(_0x26c8a7=(_0x4795ad=_0x25c4ab['customRanges'])==null?void 0x0:_0x4795ad[_0x4e620c(0x127)](_0x5ab97d=>_0x5ab97d[_0x4e620c(0x11d)]===_0x514b15['CustomRangeType'][_0x4e620c(0x195)])[_0x4e620c(0x149)](_0x12dcdd=>_0x12dcdd[_0x4e620c(0x17e)]))!=null?_0x26c8a7:[],_0x14b51b=JSON[_0x4e620c(0x155)](_0x25c4ab),_0x12f209=_0x5a9fe3[_0x4e620c(0x137)],_0x5cac7e=_0x5a9fe3['id'],_0x426872={'memberId':(await this['_sessionService']['requireSession'](_0xe7c26a))[_0x4e620c(0x16e)](),'unitId':_0xe7c26a,'threadId':_0x12f209,'mention':_0x1ec216,'content':_0x14b51b,'replyId':_0x5cac7e},_0x50e5ea=await this['_httpService'][_0x4e620c(0x138)](_0x4e620c(0x18f)+_0xe7c26a+_0x4e620c(0x14e),{'body':_0x426872});return!_0x50e5ea[_0x4e620c(0x142)]['error']||_0x50e5ea[_0x4e620c(0x142)][_0x4e620c(0x12c)][_0x4e620c(0x193)]===0x1;}async[_0x39ff1a(0x116)](_0x5d8f3f){const _0x33234b=_0x39ff1a,{unitId:_0x3b60bf}=_0x5d8f3f,_0x2a40c9=_0x5d8f3f['threadId'],_0x4bcc0d={'memberId':this[_0x33234b(0x15f)][_0x33234b(0x146)]()[_0x33234b(0x185)],'unitId':_0x3b60bf,'threadId':_0x2a40c9,'solved':_0x5d8f3f[_0x33234b(0x12b)]?_0x299546[_0x33234b(0x12e)]:_0x299546[_0x33234b(0x125)]},_0x33528e=await this[_0x33234b(0x17c)]['post'](_0x33234b(0x18f)+_0x3b60bf+_0x33234b(0x129),{'body':_0x4bcc0d});return!_0x33528e['body']['error']||_0x33528e[_0x33234b(0x142)][_0x33234b(0x12c)][_0x33234b(0x193)]===0x1;}async[_0x39ff1a(0x182)](_0xca75ce,_0x35d151,_0x15dcd2,_0x2c0d7b){const _0x598356=_0x39ff1a,_0x16ef66={'memberId':(await this[_0x598356(0x157)]['requireSession'](_0xca75ce))['getMemberID'](),'threadId':_0x15dcd2,'replyId':_0x2c0d7b,'unitId':_0xca75ce},_0x2c6aad=await this['_httpService'][_0x598356(0x138)](_0x598356(0x18f)+_0xca75ce+_0x598356(0x133),{'body':_0x16ef66});return!_0x2c6aad[_0x598356(0x142)][_0x598356(0x12c)]||_0x2c6aad[_0x598356(0x142)]['error']['code']===0x1;}async['listComments'](_0x9e41a8,_0x22a1ee,_0x30617f){const _0x572724=_0x39ff1a,_0x127b24={'unitId':_0x9e41a8,'threadId':_0x30617f},_0x15eb15=await this['_httpService'][_0x572724(0x138)](_0x572724(0x18f)+_0x9e41a8+_0x572724(0x190),{'body':_0x127b24}),_0x2943e0=_0x30617f[_0x572724(0x149)](_0xab23a0=>_0x909113(_0x15eb15['body'][_0x572724(0x132)][_0xab23a0],_0x9e41a8,_0x22a1ee))[_0x572724(0x127)](Boolean);return Object['values'](_0x15eb15['body'][_0x572724(0x117)])[_0x572724(0x15c)](_0x459b1f=>{const _0x162f58=_0x572724;this[_0x162f58(0x15f)][_0x162f58(0x143)](_0x459b1f);}),_0x2943e0;}['saveCommentToSnapshot'](_0x2873ec){const _0x10c9eb=_0x39ff1a;return{'id':_0x2873ec['id'],'threadId':_0x2873ec[_0x10c9eb(0x137)],'ref':_0x2873ec[_0x10c9eb(0x16d)]};}};_0xc24ad0=_0x32318a([_0x1c4644(0x0,_0x514b15[_0x39ff1a(0x144)](_0x488e04[_0x39ff1a(0x120)])),_0x1c4644(0x1,_0x514b15[_0x39ff1a(0x144)](_0x514b15['UserManagerService'])),_0x1c4644(0x2,_0x514b15[_0x39ff1a(0x144)](_0x433cce[_0x39ff1a(0x14c)])),_0x1c4644(0x3,_0x514b15[_0x39ff1a(0x144)](_0x514b15[_0x39ff1a(0x16a)]))],_0xc24ad0);var _0x3e8732=Object[_0x39ff1a(0x11f)],_0x295c63=(_0x31f1b2,_0x3dea74,_0x5b028f,_0x5337a6)=>{const _0x29e976=_0x39ff1a;for(var _0x3fb7b6=_0x5337a6>0x1?void 0x0:_0x5337a6?_0x3e8732(_0x3dea74,_0x5b028f):_0x3dea74,_0x3bf6e6=_0x31f1b2[_0x29e976(0x118)]-0x1,_0x493d50;_0x3bf6e6>=0x0;_0x3bf6e6--)(_0x493d50=_0x31f1b2[_0x3bf6e6])&&(_0x3fb7b6=_0x493d50(_0x3fb7b6)||_0x3fb7b6);return _0x3fb7b6;},_0x36e747=(_0x1252c7,_0x1148cb)=>(_0x3888bd,_0xbb72ce)=>_0x1148cb(_0x3888bd,_0xbb72ce,_0x1252c7);let _0xce4b48=class extends _0x514b15[_0x39ff1a(0x164)]{constructor(_0x568040,_0x4d1166){const _0x4a2326=_0x39ff1a;super(),this[_0x4a2326(0x191)]=_0x568040,this['_threadCommentDataSource']=_0x4d1166,this['_initDataSource']();}[_0x39ff1a(0x15d)](){const _0x54159b=_0x39ff1a;this[_0x54159b(0x191)]['dataSource']=this[_0x54159b(0x16c)],this[_0x54159b(0x191)]['syncUpdateMutationToColla']=!0x1;}};_0xce4b48=_0x295c63([_0x36e747(0x0,_0x289cbf[_0x39ff1a(0x13c)]),_0x36e747(0x1,_0x514b15[_0x39ff1a(0x144)](_0xc24ad0))],_0xce4b48);var _0x4c7c2f=Object[_0x39ff1a(0x115)],_0x5d2e2b=Object[_0x39ff1a(0x11f)],_0xe8cb57=(_0x19a10a,_0x228aa3,_0x35eab3)=>_0x228aa3 in _0x19a10a?_0x4c7c2f(_0x19a10a,_0x228aa3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x35eab3}):_0x19a10a[_0x228aa3]=_0x35eab3,_0x58fa7b=(_0x1c1a31,_0x28d79a,_0x563487,_0x34197b)=>{const _0x5329ad=_0x39ff1a;for(var _0x46326a=_0x34197b>0x1?void 0x0:_0x34197b?_0x5d2e2b(_0x28d79a,_0x563487):_0x28d79a,_0x484530=_0x1c1a31[_0x5329ad(0x118)]-0x1,_0x207d85;_0x484530>=0x0;_0x484530--)(_0x207d85=_0x1c1a31[_0x484530])&&(_0x46326a=_0x207d85(_0x46326a)||_0x46326a);return _0x46326a;},_0x45423c=(_0x4fd6a5,_0x408011)=>(_0x43ea0c,_0x562c54)=>_0x408011(_0x43ea0c,_0x562c54,_0x4fd6a5),_0x1b9ecd=(_0x27fb26,_0x381767,_0x41265f)=>_0xe8cb57(_0x27fb26,typeof _0x381767!=_0x39ff1a(0x11c)?_0x381767+'':_0x381767,_0x41265f);_0x3bc6a7['UniverThreadCommentDataSourcePlugin']=class extends _0x514b15[_0x39ff1a(0x172)]{constructor(_0x198908=_0x4e82a1,_0x33cb24,_0x578cd2){const _0x12963a=_0x39ff1a;super(),this[_0x12963a(0x119)]=_0x198908,this[_0x12963a(0x181)]=_0x33cb24,this[_0x12963a(0x186)]=_0x578cd2;const {..._0x352027}=_0x514b15['merge']({},_0x4e82a1,this[_0x12963a(0x119)]);this[_0x12963a(0x186)][_0x12963a(0x170)](_0x32ebf5,_0x352027);}[_0x39ff1a(0x128)](){const _0x2e6d0a=_0x39ff1a;[[_0xc24ad0],[_0xce4b48],[_0x52e0e4]][_0x2e6d0a(0x15c)](_0x38e6a9=>{this['_injector']['add'](_0x38e6a9);});}['onReady'](){const _0x29da50=_0x39ff1a;this[_0x29da50(0x181)][_0x29da50(0x16b)](_0xce4b48),this[_0x29da50(0x181)][_0x29da50(0x16b)](_0x52e0e4);}},_0x1b9ecd(_0x3bc6a7['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x4e1eaa),_0x1b9ecd(_0x3bc6a7[_0x39ff1a(0x139)],_0x39ff1a(0x124),_0x514b15['UniverInstanceType'][_0x39ff1a(0x196)]),_0x3bc6a7[_0x39ff1a(0x139)]=_0x58fa7b([_0x514b15['DependentOn'](_0x561bbe[_0x39ff1a(0x13e)],_0x433cce[_0x39ff1a(0x192)],_0x1b2383[_0x39ff1a(0x14f)]),_0x45423c(0x1,_0x514b15[_0x39ff1a(0x144)](_0x514b15['Injector'])),_0x45423c(0x2,_0x514b15[_0x39ff1a(0x18e)])],_0x3bc6a7['UniverThreadCommentDataSourcePlugin']),Object[_0x39ff1a(0x115)](_0x3bc6a7,Symbol[_0x39ff1a(0x187)],{'value':_0x39ff1a(0x152)});}));function _0xe451(){const _0x1bda40=['resolveComment','users','length','_config','YYYY/MM/DD\x20HH:mm','slice','symbol','rangeType','subscribe','getOwnPropertyDescriptor','HTTPService','unitId','root','bufferTime','type','OpenOrReOpen','Edit','filter','onStarting','/solved','UniverNetwork','resolved','error','updateComment','Solved','addComment','1108509bhQbDs','_init','comments','/delete','Reply','155QEVSbh','size','threadId','post','UniverThreadCommentDataSourcePlugin','content','format','IThreadCommentDataSourceService','@univerjs/thread-comment','UniverThreadCommentUIPlugin','getComment','_threadCommentModel','_initUserSync','body','addUser','Inject','pipe','getCurrentUser','UserManagerService','parse','map','solved','dayjs','CollaborationSessionService','createTimestamp','/edit','UniverLicensePlugin','46848700YClbAh','@univerjs/thread-comment-ui','Module','Add','find','stringify','CommentService','_sessionService','@univerjs/network','3832911jGSiKB','reply','function','forEach','_initDataSource','@univerjs-pro/license','_userService','object','rxjs','UniverCore','Solve','Disposable','ThreadCommentModel','Delete','5526948swRozM','Unknown','comment','Injector','get','_threadCommentDataSource','ref','getMemberID','personId','setConfig','userId','Plugin','175196xsjvlw','@univerjs/core','_commentService','replies','getUnit','UniverThreadComment','19369URKQPz','141QTFfyu','952dOunuF','_httpService','22502dOOGLQ','rangeId','add','UniverProThreadCommentDatasource','_injector','deleteComment','UniverProLicense','amd','userID','_configService','toStringTag','exports','replyId','user','disposeWithMe','customRanges','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','/universer-api/comment/unit/','/list','_threadCommentDataSourceService','UniverCollaborationClientPlugin','code','UNRECOGNIZED','COMMENT','UNIVER_UNKNOWN','defineProperty'];_0xe451=function(){return _0x1bda40;};return _0xe451();}
|
|
1
|
+
function _0x11c5(_0x476dae,_0x17a7a6){const _0x1fb671=_0x1fb6();return _0x11c5=function(_0x11c566,_0x22d6e4){_0x11c566=_0x11c566-0x17a;let _0x1faa79=_0x1fb671[_0x11c566];return _0x1faa79;},_0x11c5(_0x476dae,_0x17a7a6);}(function(_0x454fba,_0x5933b1){const _0x45dedf=_0x11c5,_0x38eddb=_0x454fba();while(!![]){try{const _0x191434=-parseInt(_0x45dedf(0x1e3))/0x1*(-parseInt(_0x45dedf(0x1fd))/0x2)+parseInt(_0x45dedf(0x1cc))/0x3*(parseInt(_0x45dedf(0x1ed))/0x4)+parseInt(_0x45dedf(0x1bc))/0x5+-parseInt(_0x45dedf(0x19d))/0x6*(-parseInt(_0x45dedf(0x202))/0x7)+parseInt(_0x45dedf(0x1cd))/0x8*(parseInt(_0x45dedf(0x1ec))/0x9)+-parseInt(_0x45dedf(0x1fa))/0xa*(parseInt(_0x45dedf(0x185))/0xb)+-parseInt(_0x45dedf(0x1fc))/0xc;if(_0x191434===_0x5933b1)break;else _0x38eddb['push'](_0x38eddb['shift']());}catch(_0x4696c3){_0x38eddb['push'](_0x38eddb['shift']());}}}(_0x1fb6,0xc3162),function(_0x36fa83,_0x68c222){const _0x51851d=_0x11c5;typeof exports==_0x51851d(0x1de)&&typeof module<'u'?_0x68c222(exports,require(_0x51851d(0x1d8)),require(_0x51851d(0x1cb)),require(_0x51851d(0x1c6)),require('@univerjs/thread-comment-ui'),require(_0x51851d(0x1f7)),require(_0x51851d(0x1ee)),require('@univerjs/network')):typeof define==_0x51851d(0x191)&&define[_0x51851d(0x194)]?define([_0x51851d(0x1ad),_0x51851d(0x1d8),_0x51851d(0x1cb),_0x51851d(0x1c6),_0x51851d(0x1d6),'@univerjs/thread-comment','rxjs',_0x51851d(0x1bd)],_0x68c222):(_0x36fa83=typeof globalThis<'u'?globalThis:_0x36fa83||self,_0x68c222(_0x36fa83[_0x51851d(0x17f)]={},_0x36fa83['UniverProCollaborationClient'],_0x36fa83[_0x51851d(0x1d4)],_0x36fa83[_0x51851d(0x1b6)],_0x36fa83[_0x51851d(0x1d1)],_0x36fa83['UniverThreadComment'],_0x36fa83[_0x51851d(0x1ee)],_0x36fa83[_0x51851d(0x199)]));}(this,function(_0x15430f,_0x74718,_0x296f1f,_0x251eae,_0x1814b1,_0x7f5b4a,_0x208f85,_0x5f17b4){'use strict';const _0x3b82e6=_0x11c5;const _0x271bbc=_0x3b82e6(0x203);var _0x278abf=(_0x502872=>(_0x502872[_0x502872['OpenOrReOpen']=0x0]=_0x3b82e6(0x1ea),_0x502872[_0x502872[_0x3b82e6(0x201)]=0x1]='Solved',_0x502872[_0x502872['UNRECOGNIZED']=-0x1]=_0x3b82e6(0x1e7),_0x502872))(_0x278abf||{}),_0x33b13e=(_0x1449d0=>(_0x1449d0[_0x1449d0[_0x3b82e6(0x1c9)]=0x0]=_0x3b82e6(0x1c9),_0x1449d0[_0x1449d0[_0x3b82e6(0x1eb)]=0x1]=_0x3b82e6(0x1eb),_0x1449d0[_0x1449d0['Reply']=0x2]=_0x3b82e6(0x1a3),_0x1449d0[_0x1449d0['Edit']=0x3]=_0x3b82e6(0x1c1),_0x1449d0[_0x1449d0[_0x3b82e6(0x192)]=0x4]='Delete',_0x1449d0[_0x1449d0['Solve']=0x5]=_0x3b82e6(0x1db),_0x1449d0[_0x1449d0['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1449d0))(_0x33b13e||{});const _0x54780c=_0x71fea=>_0x251eae[_0x3b82e6(0x1e4)](new Date(+_0x71fea))[_0x3b82e6(0x17a)]('YYYY/MM/DD\x20HH:mm'),_0x4901e6=async(_0x4a03d0,_0x2fbf26)=>{const _0x45790b=_0x3b82e6,_0x18cadc=_0x4a03d0[_0x45790b(0x197)](_0x251eae[_0x45790b(0x1a2)]),_0x188dc2=_0x4a03d0[_0x45790b(0x197)](_0x5f17b4['HTTPService']);_0x2fbf26[_0x45790b(0x1c8)](_0x280c38=>{const _0x20ade9=_0x45790b;_0x18cadc[_0x20ade9(0x1c3)](_0x280c38)&&_0x2fbf26[_0x20ade9(0x1d9)](_0x280c38);}),_0x2fbf26[_0x45790b(0x18d)]&&(await _0x188dc2[_0x45790b(0x197)](_0x45790b(0x1d0),{'params':{'userIDs':[..._0x2fbf26]}}))['body'][_0x45790b(0x1dd)][_0x45790b(0x1c8)](_0x3cbabb=>{const _0x5cdd38=_0x45790b;_0x3cbabb&&_0x18cadc[_0x5cdd38(0x200)](_0x3cbabb);});};var _0x5b963d=Object[_0x3b82e6(0x1f2)],_0x1dce66=(_0x28ebf4,_0x3ef2da,_0x13b40d,_0x2dbdb5)=>{const _0x4b480b=_0x3b82e6;for(var _0x47c341=_0x2dbdb5>0x1?void 0x0:_0x2dbdb5?_0x5b963d(_0x3ef2da,_0x13b40d):_0x3ef2da,_0x1725dd=_0x28ebf4[_0x4b480b(0x19c)]-0x1,_0x315c2f;_0x1725dd>=0x0;_0x1725dd--)(_0x315c2f=_0x28ebf4[_0x1725dd])&&(_0x47c341=_0x315c2f(_0x47c341)||_0x47c341);return _0x47c341;},_0x2cfa8a=(_0x11c221,_0x71eb57)=>(_0x5304ff,_0x510019)=>_0x71eb57(_0x5304ff,_0x510019,_0x11c221);let _0x50d139=class extends _0x251eae[_0x3b82e6(0x1b5)]{constructor(_0x3804ef,_0x2c958d,_0x260812,_0x516648){const _0x4ebfa5=_0x3b82e6;super(),this['_commentService']=_0x3804ef,this[_0x4ebfa5(0x1ce)]=_0x2c958d,this[_0x4ebfa5(0x1d2)]=_0x260812,this['_injector']=_0x516648,this[_0x4ebfa5(0x1f6)](),this[_0x4ebfa5(0x19f)]();}[_0x3b82e6(0x19f)](){const _0x25d895=_0x3b82e6;this[_0x25d895(0x1ff)](this['_threadCommentModel']['commentUpdate$'][_0x25d895(0x1a6)](_0x208f85['bufferTime'](0x10))[_0x25d895(0x205)](_0xc9d619=>{const _0x13750a=new Set();_0xc9d619['forEach'](_0x1de8d7=>{const _0x3e2923=_0x11c5;switch(_0x1de8d7[_0x3e2923(0x1b0)]){case'add':{const _0x50bb05=_0x1de8d7[_0x3e2923(0x18a)][_0x3e2923(0x1f8)];_0x13750a[_0x3e2923(0x1f5)](_0x50bb05);break;}}}),_0x4901e6(this['_injector'],_0x13750a);}));}['_init'](){const _0x5b8dab=_0x3b82e6;this['disposeWithMe'](this[_0x5b8dab(0x196)][_0x5b8dab(0x1a8)][_0x5b8dab(0x205)](async _0x34a4d4=>{const _0x29790a=_0x5b8dab;var _0x4a3af1,_0x16075a,_0x4018db,_0x43b76c;const _0x563632=(_0x4a3af1=this['_threadCommentModel'][_0x29790a(0x1c5)](_0x34a4d4[_0x29790a(0x1bb)])[_0x29790a(0x19e)](_0x1c2f2f=>_0x1c2f2f[_0x29790a(0x188)]===_0x34a4d4['threadId']))==null?void 0x0:_0x4a3af1[_0x29790a(0x1f3)];if(!_0x563632)return;const {unitId:_0x12587d,subUnitId:_0x276986}=_0x563632;switch(_0x34a4d4[_0x29790a(0x18f)]&&this[_0x29790a(0x1d2)]['addUser'](_0x34a4d4[_0x29790a(0x18f)]),_0x34a4d4['type']){case _0x33b13e[_0x29790a(0x1eb)]:break;case _0x33b13e['Reply']:{this['_threadCommentModel'][_0x29790a(0x1bf)](_0x12587d,_0x276986,{'unitId':_0x12587d,'subUnitId':_0x276986,'ref':'','id':_0x34a4d4[_0x29790a(0x186)],'dT':_0x54780c(+_0x34a4d4[_0x29790a(0x1a9)]),'threadId':_0x34a4d4['threadId'],'personId':(_0x4018db=(_0x16075a=_0x34a4d4['user'])==null?void 0x0:_0x16075a[_0x29790a(0x1d3)])!=null?_0x4018db:_0x34a4d4['userId'],'text':JSON[_0x29790a(0x1b9)](_0x34a4d4[_0x29790a(0x1f9)]),'parentId':_0x563632['id']});break;}case _0x33b13e[_0x29790a(0x192)]:{const _0x8b14b7=this[_0x29790a(0x1ce)][_0x29790a(0x1e9)](_0x12587d,_0x276986,_0x34a4d4[_0x29790a(0x186)]);_0x8b14b7&&_0x8b14b7['parentId']&&this['_threadCommentModel'][_0x29790a(0x18e)](_0x12587d,_0x276986,_0x34a4d4['replyId']);break;}case _0x33b13e['Edit']:{this[_0x29790a(0x1ce)][_0x29790a(0x1a1)](_0x12587d,_0x276986,{'commentId':_0x34a4d4['replyId'],'text':JSON[_0x29790a(0x1b9)](_0x34a4d4[_0x29790a(0x1f9)])});break;}case _0x33b13e[_0x29790a(0x1db)]:{const _0x3c2536=(_0x43b76c=this['_threadCommentModel']['getUnit'](_0x34a4d4[_0x29790a(0x1bb)])['find'](_0xae3de4=>_0xae3de4[_0x29790a(0x188)]===_0x34a4d4[_0x29790a(0x188)]))==null?void 0x0:_0x43b76c[_0x29790a(0x1f3)];_0x3c2536&&this[_0x29790a(0x1ce)][_0x29790a(0x1fb)](_0x12587d,_0x276986,_0x3c2536['id'],_0x34a4d4[_0x29790a(0x18c)]===_0x278abf[_0x29790a(0x201)]);break;}}}));}};_0x50d139=_0x1dce66([_0x2cfa8a(0x0,_0x251eae[_0x3b82e6(0x1e5)](_0x74718['CommentService'])),_0x2cfa8a(0x1,_0x251eae['Inject'](_0x7f5b4a[_0x3b82e6(0x193)])),_0x2cfa8a(0x2,_0x251eae[_0x3b82e6(0x1e5)](_0x251eae['UserManagerService'])),_0x2cfa8a(0x3,_0x251eae['Inject'](_0x251eae[_0x3b82e6(0x17d)]))],_0x50d139);const _0x3bd3c4='thread-comment-data-source.config',_0x506daa={};var _0x32c09c=Object[_0x3b82e6(0x1f2)],_0x261aed=(_0x7bd477,_0x4dcca6,_0x5a3740,_0x383434)=>{const _0x47a8ee=_0x3b82e6;for(var _0x540dc4=_0x383434>0x1?void 0x0:_0x383434?_0x32c09c(_0x4dcca6,_0x5a3740):_0x4dcca6,_0x342ebe=_0x7bd477[_0x47a8ee(0x19c)]-0x1,_0xfadd74;_0x342ebe>=0x0;_0x342ebe--)(_0xfadd74=_0x7bd477[_0x342ebe])&&(_0x540dc4=_0xfadd74(_0x540dc4)||_0x540dc4);return _0x540dc4;},_0x110e12=(_0x172307,_0x421599)=>(_0x3f5a31,_0x3f3dca)=>_0x421599(_0x3f5a31,_0x3f3dca,_0x172307);function _0x1659f0(_0x181058,_0x34e60c){const _0x4859c7=_0x3b82e6,_0x47e972=_0x181058[_0x4859c7(0x206)][0x0];return{..._0x34e60c,'id':_0x47e972['replyId'],'resolved':_0x181058[_0x4859c7(0x18c)]===0x1,'dT':_0x54780c(_0x47e972[_0x4859c7(0x1a9)]),'personId':_0x47e972[_0x4859c7(0x1d7)],'threadId':_0x47e972[_0x4859c7(0x188)]};}function _0x5ed6db(_0x5cb150,_0x5c88fb,_0x1a21ee){const _0x3104ba=_0x3b82e6;var _0x4d79a0,_0x3a63de;if(((_0x3a63de=(_0x4d79a0=_0x5cb150==null?void 0x0:_0x5cb150[_0x3104ba(0x206)])==null?void 0x0:_0x4d79a0['length'])!=null?_0x3a63de:0x0)>0x0){const _0x2e1100=(_0x248b4a,_0x32409d)=>({'id':_0x248b4a[_0x3104ba(0x186)],'threadId':_0x248b4a['threadId'],'dT':_0x54780c(_0x248b4a[_0x3104ba(0x1a9)]),'personId':_0x248b4a[_0x3104ba(0x1d7)],'resolved':_0x5cb150[_0x3104ba(0x18c)]===_0x278abf[_0x3104ba(0x201)],'unitId':_0x5c88fb,'subUnitId':_0x1a21ee,'text':JSON[_0x3104ba(0x1b9)](_0x248b4a[_0x3104ba(0x1f9)]),'parentId':_0x32409d}),_0x5217cf=_0x2e1100(_0x5cb150[_0x3104ba(0x206)][0x0]);return{..._0x5217cf,'children':_0x5cb150[_0x3104ba(0x206)]['slice'](0x1)[_0x3104ba(0x198)](_0x2ffd3e=>_0x2e1100(_0x2ffd3e,_0x5217cf['id']))};}return null;}let _0x2872b8=class{constructor(_0x4cb8ac,_0x504835,_0x3fbf59,_0x59f2c7){const _0x573b9b=_0x3b82e6;this[_0x573b9b(0x1b1)]=_0x4cb8ac,this[_0x573b9b(0x1d2)]=_0x504835,this[_0x573b9b(0x184)]=_0x3fbf59,this[_0x573b9b(0x1f1)]=_0x59f2c7;}async[_0x3b82e6(0x1bf)](_0x51d8ed){const _0x3f6f1b=_0x3b82e6;var _0x506da4,_0x18fe44;const {parentId:_0x4b4a9e,unitId:_0x4128a8,text:_0x2f469e,threadId:_0x28f517}=_0x51d8ed,_0x418874=(_0x18fe44=(_0x506da4=_0x2f469e['customRanges'])==null?void 0x0:_0x506da4[_0x3f6f1b(0x1e6)](_0x4075d5=>_0x4075d5['rangeType']===_0x251eae['CustomRangeType'][_0x3f6f1b(0x1a7)])[_0x3f6f1b(0x198)](_0x15c891=>_0x15c891[_0x3f6f1b(0x1ab)]))!=null?_0x18fe44:[],_0x571cdc=JSON[_0x3f6f1b(0x1c4)](_0x2f469e),_0x28b4f0=(await this[_0x3f6f1b(0x184)][_0x3f6f1b(0x180)](_0x4128a8))[_0x3f6f1b(0x1ca)]();if(_0x4b4a9e){const _0x2c16c2={'memberId':_0x28b4f0,'unitId':_0x4128a8,'content':_0x571cdc,'mention':_0x418874,'threadId':_0x28f517},_0x43c1eb=(await this[_0x3f6f1b(0x1b1)][_0x3f6f1b(0x1a4)]('/universer-api/comment/unit/'+_0x4128a8+_0x3f6f1b(0x1cf),{'body':_0x2c16c2}))[_0x3f6f1b(0x1b7)][_0x3f6f1b(0x1b4)];return{..._0x51d8ed,'id':_0x43c1eb[_0x3f6f1b(0x186)],'dT':_0x251eae[_0x3f6f1b(0x1e4)](+_0x43c1eb[_0x3f6f1b(0x1a9)])['format'](_0x3f6f1b(0x1dc)),'personId':_0x43c1eb[_0x3f6f1b(0x1d7)]};}else{const _0x216781={'memberId':_0x28b4f0,'unitId':_0x4128a8,'content':_0x571cdc,'mention':_0x418874},_0xd69e58=await this[_0x3f6f1b(0x1b1)][_0x3f6f1b(0x1a4)](_0x3f6f1b(0x189)+_0x4128a8+_0x3f6f1b(0x1e1),{'body':_0x216781});return _0x1659f0(_0xd69e58[_0x3f6f1b(0x1b7)][_0x3f6f1b(0x17b)],_0x51d8ed);}}async['updateComment'](_0x594742){const _0x428bf6=_0x3b82e6;var _0x254173,_0xf52dd8;const {text:_0x204a57,unitId:_0x5b44ea}=_0x594742,_0x4fe4dc=(_0xf52dd8=(_0x254173=_0x204a57[_0x428bf6(0x1f0)])==null?void 0x0:_0x254173[_0x428bf6(0x1e6)](_0x53c11d=>_0x53c11d[_0x428bf6(0x1ef)]===_0x251eae[_0x428bf6(0x1d5)][_0x428bf6(0x1a7)])['map'](_0x3e76a5=>_0x3e76a5[_0x428bf6(0x1ab)]))!=null?_0xf52dd8:[],_0x2a5521=JSON[_0x428bf6(0x1c4)](_0x204a57),_0x5d3888=_0x594742['threadId'],_0x14c006=_0x594742['id'],_0x278eb3={'memberId':(await this[_0x428bf6(0x184)][_0x428bf6(0x180)](_0x5b44ea))[_0x428bf6(0x1ca)](),'unitId':_0x5b44ea,'threadId':_0x5d3888,'mention':_0x4fe4dc,'content':_0x2a5521,'replyId':_0x14c006},_0x207895=await this['_httpService'][_0x428bf6(0x1a4)]('/universer-api/comment/unit/'+_0x5b44ea+_0x428bf6(0x1c2),{'body':_0x278eb3});return!_0x207895[_0x428bf6(0x1b7)][_0x428bf6(0x190)]||_0x207895[_0x428bf6(0x1b7)]['error'][_0x428bf6(0x1c0)]===0x1;}async[_0x3b82e6(0x1fb)](_0x197c29){const _0x459164=_0x3b82e6,{unitId:_0x409c60}=_0x197c29,_0x28f7b9=_0x197c29[_0x459164(0x188)],_0x39e9bf={'memberId':this[_0x459164(0x1d2)]['getCurrentUser']()[_0x459164(0x1d3)],'unitId':_0x409c60,'threadId':_0x28f7b9,'solved':_0x197c29[_0x459164(0x1ae)]?_0x278abf['Solved']:_0x278abf[_0x459164(0x1ea)]},_0x53c5c2=await this[_0x459164(0x1b1)][_0x459164(0x1a4)](_0x459164(0x189)+_0x409c60+_0x459164(0x1b8),{'body':_0x39e9bf});return!_0x53c5c2['body']['error']||_0x53c5c2[_0x459164(0x1b7)][_0x459164(0x190)]['code']===0x1;}async[_0x3b82e6(0x18e)](_0x4e4dc2,_0x3a80f5,_0x670573,_0x4be7ff){const _0x50abb0=_0x3b82e6,_0x44f155={'memberId':(await this[_0x50abb0(0x184)][_0x50abb0(0x180)](_0x4e4dc2))[_0x50abb0(0x1ca)](),'threadId':_0x670573,'replyId':_0x4be7ff,'unitId':_0x4e4dc2},_0x144d69=await this[_0x50abb0(0x1b1)][_0x50abb0(0x1a4)](_0x50abb0(0x189)+_0x4e4dc2+_0x50abb0(0x1f4),{'body':_0x44f155});return!_0x144d69[_0x50abb0(0x1b7)][_0x50abb0(0x190)]||_0x144d69[_0x50abb0(0x1b7)][_0x50abb0(0x190)]['code']===0x1;}async[_0x3b82e6(0x17e)](_0x5be9f8,_0x58cf43,_0x407948){const _0x4f0c50=_0x3b82e6,_0x2ae165={'unitId':_0x5be9f8,'threadId':_0x407948},_0x1ce865=await this['_httpService']['post'](_0x4f0c50(0x189)+_0x5be9f8+_0x4f0c50(0x1ba),{'body':_0x2ae165}),_0x104c82=_0x407948[_0x4f0c50(0x198)](_0x16aebb=>_0x5ed6db(_0x1ce865[_0x4f0c50(0x1b7)][_0x4f0c50(0x1b2)][_0x16aebb],_0x5be9f8,_0x58cf43))[_0x4f0c50(0x1e6)](Boolean);return Object[_0x4f0c50(0x1e0)](_0x1ce865[_0x4f0c50(0x1b7)][_0x4f0c50(0x1dd)])['forEach'](_0x542431=>{const _0x16b9f7=_0x4f0c50;this[_0x16b9f7(0x1d2)]['addUser'](_0x542431);}),_0x104c82;}[_0x3b82e6(0x181)](_0x4dcf2e){const _0x348ac1=_0x3b82e6;return{'id':_0x4dcf2e['id'],'threadId':_0x4dcf2e[_0x348ac1(0x188)],'ref':_0x4dcf2e['ref']};}};_0x2872b8=_0x261aed([_0x110e12(0x0,_0x251eae['Inject'](_0x5f17b4[_0x3b82e6(0x1b3)])),_0x110e12(0x1,_0x251eae[_0x3b82e6(0x1e5)](_0x251eae[_0x3b82e6(0x1a2)])),_0x110e12(0x2,_0x251eae[_0x3b82e6(0x1e5)](_0x74718[_0x3b82e6(0x1df)])),_0x110e12(0x3,_0x251eae[_0x3b82e6(0x1e5)](_0x251eae[_0x3b82e6(0x17d)]))],_0x2872b8);var _0x5a2ac5=Object[_0x3b82e6(0x1f2)],_0x39cb76=(_0x288074,_0x26f1cd,_0x57fc05,_0x3434be)=>{const _0x5b3850=_0x3b82e6;for(var _0x40c176=_0x3434be>0x1?void 0x0:_0x3434be?_0x5a2ac5(_0x26f1cd,_0x57fc05):_0x26f1cd,_0x72438f=_0x288074[_0x5b3850(0x19c)]-0x1,_0x193186;_0x72438f>=0x0;_0x72438f--)(_0x193186=_0x288074[_0x72438f])&&(_0x40c176=_0x193186(_0x40c176)||_0x40c176);return _0x40c176;},_0x2ca815=(_0x575d66,_0x33b364)=>(_0x406e8a,_0x2c00bc)=>_0x33b364(_0x406e8a,_0x2c00bc,_0x575d66);let _0x2be26f=class extends _0x251eae[_0x3b82e6(0x1b5)]{constructor(_0x5e1ae9,_0x926947){const _0x388bae=_0x3b82e6;super(),this[_0x388bae(0x1e8)]=_0x5e1ae9,this[_0x388bae(0x1aa)]=_0x926947,this['_initDataSource']();}['_initDataSource'](){const _0x1416c5=_0x3b82e6;this[_0x1416c5(0x1e8)][_0x1416c5(0x195)]=this[_0x1416c5(0x1aa)],this[_0x1416c5(0x1e8)][_0x1416c5(0x19a)]=!0x1;}};_0x2be26f=_0x39cb76([_0x2ca815(0x0,_0x7f5b4a[_0x3b82e6(0x1ac)]),_0x2ca815(0x1,_0x251eae['Inject'](_0x2872b8))],_0x2be26f);var _0x2b2039=Object[_0x3b82e6(0x1a5)],_0x380c58=Object[_0x3b82e6(0x1f2)],_0x2043e3=(_0x1d633a,_0x4bad5e,_0x2be52c)=>_0x4bad5e in _0x1d633a?_0x2b2039(_0x1d633a,_0x4bad5e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2be52c}):_0x1d633a[_0x4bad5e]=_0x2be52c,_0x5b39ea=(_0x1cb04f,_0x579b0c,_0x580833,_0x30be29)=>{const _0x204a4f=_0x3b82e6;for(var _0x318b63=_0x30be29>0x1?void 0x0:_0x30be29?_0x380c58(_0x579b0c,_0x580833):_0x579b0c,_0x14f9ff=_0x1cb04f[_0x204a4f(0x19c)]-0x1,_0x5adbba;_0x14f9ff>=0x0;_0x14f9ff--)(_0x5adbba=_0x1cb04f[_0x14f9ff])&&(_0x318b63=_0x5adbba(_0x318b63)||_0x318b63);return _0x318b63;},_0x20ee44=(_0x23f8b6,_0x271b0c)=>(_0x3bc86d,_0x164ef0)=>_0x271b0c(_0x3bc86d,_0x164ef0,_0x23f8b6),_0x5ed408=(_0x36ee30,_0xb0d785,_0x1bdb63)=>_0x2043e3(_0x36ee30,typeof _0xb0d785!=_0x3b82e6(0x1c7)?_0xb0d785+'':_0xb0d785,_0x1bdb63);_0x15430f[_0x3b82e6(0x1af)]=class extends _0x251eae[_0x3b82e6(0x1be)]{constructor(_0x1aa45f=_0x506daa,_0x2175ce,_0x46b5ff){const _0x208fa2=_0x3b82e6;super(),this['_config']=_0x1aa45f,this[_0x208fa2(0x1f1)]=_0x2175ce,this[_0x208fa2(0x204)]=_0x46b5ff;const {..._0x396910}=_0x251eae[_0x208fa2(0x18b)]({},_0x506daa,this[_0x208fa2(0x1fe)]);this[_0x208fa2(0x204)][_0x208fa2(0x1e2)](_0x3bd3c4,_0x396910);}['onStarting'](){[[_0x2872b8],[_0x2be26f],[_0x50d139]]['forEach'](_0x34c59b=>{const _0x136144=_0x11c5;this[_0x136144(0x1f1)][_0x136144(0x1f5)](_0x34c59b);});}['onReady'](){const _0x145933=_0x3b82e6;this[_0x145933(0x1f1)][_0x145933(0x197)](_0x2be26f),this[_0x145933(0x1f1)][_0x145933(0x197)](_0x50d139);}},_0x5ed408(_0x15430f['UniverThreadCommentDataSourcePlugin'],_0x3b82e6(0x17c),_0x271bbc),_0x5ed408(_0x15430f[_0x3b82e6(0x1af)],_0x3b82e6(0x1b0),_0x251eae[_0x3b82e6(0x1da)]['UNIVER_UNKNOWN']),_0x15430f[_0x3b82e6(0x1af)]=_0x5b39ea([_0x251eae[_0x3b82e6(0x1a0)](_0x1814b1['UniverThreadCommentUIPlugin'],_0x74718[_0x3b82e6(0x19b)],_0x296f1f[_0x3b82e6(0x183)]),_0x20ee44(0x1,_0x251eae[_0x3b82e6(0x1e5)](_0x251eae[_0x3b82e6(0x17d)])),_0x20ee44(0x2,_0x251eae['IConfigService'])],_0x15430f['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x15430f,Symbol[_0x3b82e6(0x187)],{'value':_0x3b82e6(0x182)});}));function _0x1fb6(){const _0x3c3b38=['deleteComment','user','error','function','Delete','ThreadCommentModel','amd','dataSource','_commentService','get','map','UniverNetwork','syncUpdateMutationToColla','UniverCollaborationClientPlugin','length','12WiSpdx','find','_initUserSync','DependentOn','updateComment','UserManagerService','Reply','post','defineProperty','pipe','COMMENT','commentUpdate$','createTimestamp','_threadCommentDataSource','rangeId','IThreadCommentDataSourceService','exports','resolved','UniverThreadCommentDataSourcePlugin','type','_httpService','comments','HTTPService','reply','Disposable','UniverCore','body','/solved','parse','/list','unitId','1821035QAsUEK','@univerjs/network','Plugin','addComment','code','Edit','/edit','getUser','stringify','getUnit','@univerjs/core','symbol','forEach','Unknown','getMemberID','@univerjs-pro/license','177lHZZRs','512zclreM','_threadCommentModel','/reply','/universer-api/user/list','UniverThreadCommentUi','_userService','userID','UniverProLicense','CustomRangeType','@univerjs/thread-comment-ui','userId','@univerjs-pro/collaboration-client','delete','UniverInstanceType','Solve','YYYY/MM/DD\x20HH:mm','users','object','CollaborationSessionService','values','/add','setConfig','20913VYMhKc','dayjs','Inject','filter','UNRECOGNIZED','_threadCommentDataSourceService','getComment','OpenOrReOpen','Add','81918lSHTpD','59788KnaRfb','rxjs','rangeType','customRanges','_injector','getOwnPropertyDescriptor','root','/delete','add','_init','@univerjs/thread-comment','personId','content','1129910hSfnXS','resolveComment','20897952sNSCer','2PeqBur','_config','disposeWithMe','addUser','Solved','4396014MYOLOr','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_configService','subscribe','replies','format','comment','pluginName','Injector','listComments','UniverProThreadCommentDatasource','requireSession','saveCommentToSnapshot','Module','UniverLicensePlugin','_sessionService','55pjcTWn','replyId','toStringTag','threadId','/universer-api/comment/unit/','payload','merge','solved','size'];_0x1fb6=function(){return _0x3c3b38;};return _0x1fb6();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3-nightly.202503041606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.6.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.3-nightly.202503041606",
|
|
49
|
+
"@univerjs-pro/license": "0.6.3-nightly.202503041606",
|
|
50
|
+
"@univerjs/core": "0.6.3-nightly.202503041606",
|
|
51
|
+
"@univerjs/network": "0.6.3-nightly.202503041606",
|
|
52
|
+
"@univerjs/thread-comment-ui": "0.6.3-nightly.202503041606",
|
|
53
|
+
"@univerjs/thread-comment": "0.6.3-nightly.202503041606",
|
|
54
|
+
"@univerjs/protocol": "0.1.44-alpha.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
|
-
"typescript": "^5.
|
|
58
|
+
"typescript": "^5.8.2",
|
|
59
59
|
"vite": "^6.2.0",
|
|
60
60
|
"vitest": "^3.0.7",
|
|
61
|
-
"@univerjs-infra/shared": "0.6.
|
|
61
|
+
"@univerjs-infra/shared": "0.6.3"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|